{"version":3,"file":"vendor.js","sources":["../../../Program Files/HBuilderX/plugins/uniapp-cli-vite/node_modules/@vue/shared/dist/shared.esm-bundler.js","../../../Program Files/HBuilderX/plugins/uniapp-cli-vite/node_modules/@dcloudio/uni-i18n/dist/uni-i18n.es.js","../../../Program Files/HBuilderX/plugins/uniapp-cli-vite/node_modules/@dcloudio/uni-shared/dist/uni-shared.es.js","../../../Program Files/HBuilderX/plugins/uniapp-cli-vite/node_modules/@dcloudio/uni-mp-vue/dist/vue.runtime.esm.js","../../../Program Files/HBuilderX/plugins/uniapp-cli-vite/node_modules/@dcloudio/uni-mp-weixin/dist/uni.api.esm.js","../../../Program Files/HBuilderX/plugins/uniapp-cli-vite/node_modules/@dcloudio/uni-console/dist/index.esm.js","../../../Program Files/HBuilderX/plugins/uniapp-cli-vite/node_modules/@dcloudio/uni-mp-weixin/dist/uni.mp.esm.js"],"sourcesContent":["/**\r\n* @vue/shared v3.4.21\r\n* (c) 2018-present Yuxi (Evan) You and Vue contributors\r\n* @license MIT\r\n**/\r\nfunction makeMap(str, expectsLowerCase) {\r\n const set = new Set(str.split(\",\"));\r\n return expectsLowerCase ? (val) => set.has(val.toLowerCase()) : (val) => set.has(val);\r\n}\r\n\r\nconst EMPTY_OBJ = !!(process.env.NODE_ENV !== \"production\") ? Object.freeze({}) : {};\r\nconst EMPTY_ARR = !!(process.env.NODE_ENV !== \"production\") ? Object.freeze([]) : [];\r\nconst NOOP = () => {\r\n};\r\nconst NO = () => false;\r\nconst isOn = (key) => key.charCodeAt(0) === 111 && key.charCodeAt(1) === 110 && // uppercase letter\r\n(key.charCodeAt(2) > 122 || key.charCodeAt(2) < 97);\r\nconst isModelListener = (key) => key.startsWith(\"onUpdate:\");\r\nconst extend = Object.assign;\r\nconst remove = (arr, el) => {\r\n const i = arr.indexOf(el);\r\n if (i > -1) {\r\n arr.splice(i, 1);\r\n }\r\n};\r\nconst hasOwnProperty = Object.prototype.hasOwnProperty;\r\nconst hasOwn = (val, key) => hasOwnProperty.call(val, key);\r\nconst isArray = Array.isArray;\r\nconst isMap = (val) => toTypeString(val) === \"[object Map]\";\r\nconst isSet = (val) => toTypeString(val) === \"[object Set]\";\r\nconst isDate = (val) => toTypeString(val) === \"[object Date]\";\r\nconst isRegExp = (val) => toTypeString(val) === \"[object RegExp]\";\r\nconst isFunction = (val) => typeof val === \"function\";\r\nconst isString = (val) => typeof val === \"string\";\r\nconst isSymbol = (val) => typeof val === \"symbol\";\r\nconst isObject = (val) => val !== null && typeof val === \"object\";\r\nconst isPromise = (val) => {\r\n return (isObject(val) || isFunction(val)) && isFunction(val.then) && isFunction(val.catch);\r\n};\r\nconst objectToString = Object.prototype.toString;\r\nconst toTypeString = (value) => objectToString.call(value);\r\nconst toRawType = (value) => {\r\n return toTypeString(value).slice(8, -1);\r\n};\r\nconst isPlainObject = (val) => toTypeString(val) === \"[object Object]\";\r\nconst isIntegerKey = (key) => isString(key) && key !== \"NaN\" && key[0] !== \"-\" && \"\" + parseInt(key, 10) === key;\r\nconst isReservedProp = /* @__PURE__ */ makeMap(\r\n // the leading comma is intentional so empty string \"\" is also included\r\n \",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted\"\r\n);\r\nconst isBuiltInDirective = /* @__PURE__ */ makeMap(\r\n \"bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo\"\r\n);\r\nconst cacheStringFunction = (fn) => {\r\n const cache = /* @__PURE__ */ Object.create(null);\r\n return (str) => {\r\n const hit = cache[str];\r\n return hit || (cache[str] = fn(str));\r\n };\r\n};\r\nconst camelizeRE = /-(\\w)/g;\r\nconst camelize = cacheStringFunction((str) => {\r\n return str.replace(camelizeRE, (_, c) => c ? c.toUpperCase() : \"\");\r\n});\r\nconst hyphenateRE = /\\B([A-Z])/g;\r\nconst hyphenate = cacheStringFunction(\r\n (str) => str.replace(hyphenateRE, \"-$1\").toLowerCase()\r\n);\r\nconst capitalize = cacheStringFunction((str) => {\r\n return str.charAt(0).toUpperCase() + str.slice(1);\r\n});\r\nconst toHandlerKey = cacheStringFunction((str) => {\r\n const s = str ? `on${capitalize(str)}` : ``;\r\n return s;\r\n});\r\nconst hasChanged = (value, oldValue) => !Object.is(value, oldValue);\r\nconst invokeArrayFns = (fns, arg) => {\r\n for (let i = 0; i < fns.length; i++) {\r\n fns[i](arg);\r\n }\r\n};\r\nconst def = (obj, key, value) => {\r\n Object.defineProperty(obj, key, {\r\n configurable: true,\r\n enumerable: false,\r\n value\r\n });\r\n};\r\nconst looseToNumber = (val) => {\r\n const n = parseFloat(val);\r\n return isNaN(n) ? val : n;\r\n};\r\nconst toNumber = (val) => {\r\n const n = isString(val) ? Number(val) : NaN;\r\n return isNaN(n) ? val : n;\r\n};\r\nlet _globalThis;\r\nconst getGlobalThis = () => {\r\n return _globalThis || (_globalThis = typeof globalThis !== \"undefined\" ? globalThis : typeof self !== \"undefined\" ? self : typeof window !== \"undefined\" ? window : typeof global !== \"undefined\" ? global : {});\r\n};\r\nconst identRE = /^[_$a-zA-Z\\xA0-\\uFFFF][_$a-zA-Z0-9\\xA0-\\uFFFF]*$/;\r\nfunction genPropsAccessExp(name) {\r\n return identRE.test(name) ? `__props.${name}` : `__props[${JSON.stringify(name)}]`;\r\n}\r\n\r\nconst PatchFlags = {\r\n \"TEXT\": 1,\r\n \"1\": \"TEXT\",\r\n \"CLASS\": 2,\r\n \"2\": \"CLASS\",\r\n \"STYLE\": 4,\r\n \"4\": \"STYLE\",\r\n \"PROPS\": 8,\r\n \"8\": \"PROPS\",\r\n \"FULL_PROPS\": 16,\r\n \"16\": \"FULL_PROPS\",\r\n \"NEED_HYDRATION\": 32,\r\n \"32\": \"NEED_HYDRATION\",\r\n \"STABLE_FRAGMENT\": 64,\r\n \"64\": \"STABLE_FRAGMENT\",\r\n \"KEYED_FRAGMENT\": 128,\r\n \"128\": \"KEYED_FRAGMENT\",\r\n \"UNKEYED_FRAGMENT\": 256,\r\n \"256\": \"UNKEYED_FRAGMENT\",\r\n \"NEED_PATCH\": 512,\r\n \"512\": \"NEED_PATCH\",\r\n \"DYNAMIC_SLOTS\": 1024,\r\n \"1024\": \"DYNAMIC_SLOTS\",\r\n \"DEV_ROOT_FRAGMENT\": 2048,\r\n \"2048\": \"DEV_ROOT_FRAGMENT\",\r\n \"HOISTED\": -1,\r\n \"-1\": \"HOISTED\",\r\n \"BAIL\": -2,\r\n \"-2\": \"BAIL\"\r\n};\r\nconst PatchFlagNames = {\r\n [1]: `TEXT`,\r\n [2]: `CLASS`,\r\n [4]: `STYLE`,\r\n [8]: `PROPS`,\r\n [16]: `FULL_PROPS`,\r\n [32]: `NEED_HYDRATION`,\r\n [64]: `STABLE_FRAGMENT`,\r\n [128]: `KEYED_FRAGMENT`,\r\n [256]: `UNKEYED_FRAGMENT`,\r\n [512]: `NEED_PATCH`,\r\n [1024]: `DYNAMIC_SLOTS`,\r\n [2048]: `DEV_ROOT_FRAGMENT`,\r\n [-1]: `HOISTED`,\r\n [-2]: `BAIL`\r\n};\r\n\r\nconst ShapeFlags = {\r\n \"ELEMENT\": 1,\r\n \"1\": \"ELEMENT\",\r\n \"FUNCTIONAL_COMPONENT\": 2,\r\n \"2\": \"FUNCTIONAL_COMPONENT\",\r\n \"STATEFUL_COMPONENT\": 4,\r\n \"4\": \"STATEFUL_COMPONENT\",\r\n \"TEXT_CHILDREN\": 8,\r\n \"8\": \"TEXT_CHILDREN\",\r\n \"ARRAY_CHILDREN\": 16,\r\n \"16\": \"ARRAY_CHILDREN\",\r\n \"SLOTS_CHILDREN\": 32,\r\n \"32\": \"SLOTS_CHILDREN\",\r\n \"TELEPORT\": 64,\r\n \"64\": \"TELEPORT\",\r\n \"SUSPENSE\": 128,\r\n \"128\": \"SUSPENSE\",\r\n \"COMPONENT_SHOULD_KEEP_ALIVE\": 256,\r\n \"256\": \"COMPONENT_SHOULD_KEEP_ALIVE\",\r\n \"COMPONENT_KEPT_ALIVE\": 512,\r\n \"512\": \"COMPONENT_KEPT_ALIVE\",\r\n \"COMPONENT\": 6,\r\n \"6\": \"COMPONENT\"\r\n};\r\n\r\nconst SlotFlags = {\r\n \"STABLE\": 1,\r\n \"1\": \"STABLE\",\r\n \"DYNAMIC\": 2,\r\n \"2\": \"DYNAMIC\",\r\n \"FORWARDED\": 3,\r\n \"3\": \"FORWARDED\"\r\n};\r\nconst slotFlagsText = {\r\n [1]: \"STABLE\",\r\n [2]: \"DYNAMIC\",\r\n [3]: \"FORWARDED\"\r\n};\r\n\r\nconst GLOBALS_ALLOWED = \"Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,console,Error\";\r\nconst isGloballyAllowed = /* @__PURE__ */ makeMap(GLOBALS_ALLOWED);\r\nconst isGloballyWhitelisted = isGloballyAllowed;\r\n\r\nconst range = 2;\r\nfunction generateCodeFrame(source, start = 0, end = source.length) {\r\n let lines = source.split(/(\\r?\\n)/);\r\n const newlineSequences = lines.filter((_, idx) => idx % 2 === 1);\r\n lines = lines.filter((_, idx) => idx % 2 === 0);\r\n let count = 0;\r\n const res = [];\r\n for (let i = 0; i < lines.length; i++) {\r\n count += lines[i].length + (newlineSequences[i] && newlineSequences[i].length || 0);\r\n if (count >= start) {\r\n for (let j = i - range; j <= i + range || end > count; j++) {\r\n if (j < 0 || j >= lines.length)\r\n continue;\r\n const line = j + 1;\r\n res.push(\r\n `${line}${\" \".repeat(Math.max(3 - String(line).length, 0))}| ${lines[j]}`\r\n );\r\n const lineLength = lines[j].length;\r\n const newLineSeqLength = newlineSequences[j] && newlineSequences[j].length || 0;\r\n if (j === i) {\r\n const pad = start - (count - (lineLength + newLineSeqLength));\r\n const length = Math.max(\r\n 1,\r\n end > count ? lineLength - pad : end - start\r\n );\r\n res.push(` | ` + \" \".repeat(pad) + \"^\".repeat(length));\r\n } else if (j > i) {\r\n if (end > count) {\r\n const length = Math.max(Math.min(end - count, lineLength), 1);\r\n res.push(` | ` + \"^\".repeat(length));\r\n }\r\n count += lineLength + newLineSeqLength;\r\n }\r\n }\r\n break;\r\n }\r\n }\r\n return res.join(\"\\n\");\r\n}\r\n\r\nfunction normalizeStyle(value) {\r\n if (isArray(value)) {\r\n const res = {};\r\n for (let i = 0; i < value.length; i++) {\r\n const item = value[i];\r\n const normalized = isString(item) ? parseStringStyle(item) : normalizeStyle(item);\r\n if (normalized) {\r\n for (const key in normalized) {\r\n res[key] = normalized[key];\r\n }\r\n }\r\n }\r\n return res;\r\n } else if (isString(value) || isObject(value)) {\r\n return value;\r\n }\r\n}\r\nconst listDelimiterRE = /;(?![^(]*\\))/g;\r\nconst propertyDelimiterRE = /:([^]+)/;\r\nconst styleCommentRE = /\\/\\*[^]*?\\*\\//g;\r\nfunction parseStringStyle(cssText) {\r\n const ret = {};\r\n cssText.replace(styleCommentRE, \"\").split(listDelimiterRE).forEach((item) => {\r\n if (item) {\r\n const tmp = item.split(propertyDelimiterRE);\r\n tmp.length > 1 && (ret[tmp[0].trim()] = tmp[1].trim());\r\n }\r\n });\r\n return ret;\r\n}\r\nfunction stringifyStyle(styles) {\r\n let ret = \"\";\r\n if (!styles || isString(styles)) {\r\n return ret;\r\n }\r\n for (const key in styles) {\r\n const value = styles[key];\r\n const normalizedKey = key.startsWith(`--`) ? key : hyphenate(key);\r\n if (isString(value) || typeof value === \"number\") {\r\n ret += `${normalizedKey}:${value};`;\r\n }\r\n }\r\n return ret;\r\n}\r\nfunction normalizeClass(value) {\r\n let res = \"\";\r\n if (isString(value)) {\r\n res = value;\r\n } else if (isArray(value)) {\r\n for (let i = 0; i < value.length; i++) {\r\n const normalized = normalizeClass(value[i]);\r\n if (normalized) {\r\n res += normalized + \" \";\r\n }\r\n }\r\n } else if (isObject(value)) {\r\n for (const name in value) {\r\n if (value[name]) {\r\n res += name + \" \";\r\n }\r\n }\r\n }\r\n return res.trim();\r\n}\r\nfunction normalizeProps(props) {\r\n if (!props)\r\n return null;\r\n let { class: klass, style } = props;\r\n if (klass && !isString(klass)) {\r\n props.class = normalizeClass(klass);\r\n }\r\n if (style) {\r\n props.style = normalizeStyle(style);\r\n }\r\n return props;\r\n}\r\n\r\nconst HTML_TAGS = \"html,body,base,head,link,meta,style,title,address,article,aside,footer,header,hgroup,h1,h2,h3,h4,h5,h6,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,summary,template,blockquote,iframe,tfoot\";\r\nconst SVG_TAGS = \"svg,animate,animateMotion,animateTransform,circle,clipPath,color-profile,defs,desc,discard,ellipse,feBlend,feColorMatrix,feComponentTransfer,feComposite,feConvolveMatrix,feDiffuseLighting,feDisplacementMap,feDistantLight,feDropShadow,feFlood,feFuncA,feFuncB,feFuncG,feFuncR,feGaussianBlur,feImage,feMerge,feMergeNode,feMorphology,feOffset,fePointLight,feSpecularLighting,feSpotLight,feTile,feTurbulence,filter,foreignObject,g,hatch,hatchpath,image,line,linearGradient,marker,mask,mesh,meshgradient,meshpatch,meshrow,metadata,mpath,path,pattern,polygon,polyline,radialGradient,rect,set,solidcolor,stop,switch,symbol,text,textPath,title,tspan,unknown,use,view\";\r\nconst MATH_TAGS = \"annotation,annotation-xml,maction,maligngroup,malignmark,math,menclose,merror,mfenced,mfrac,mfraction,mglyph,mi,mlabeledtr,mlongdiv,mmultiscripts,mn,mo,mover,mpadded,mphantom,mprescripts,mroot,mrow,ms,mscarries,mscarry,msgroup,msline,mspace,msqrt,msrow,mstack,mstyle,msub,msubsup,msup,mtable,mtd,mtext,mtr,munder,munderover,none,semantics\";\r\nconst VOID_TAGS = \"area,base,br,col,embed,hr,img,input,link,meta,param,source,track,wbr\";\r\nconst isHTMLTag = /* @__PURE__ */ makeMap(HTML_TAGS);\r\nconst isSVGTag = /* @__PURE__ */ makeMap(SVG_TAGS);\r\nconst isMathMLTag = /* @__PURE__ */ makeMap(MATH_TAGS);\r\nconst isVoidTag = /* @__PURE__ */ makeMap(VOID_TAGS);\r\n\r\nconst specialBooleanAttrs = `itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly`;\r\nconst isSpecialBooleanAttr = /* @__PURE__ */ makeMap(specialBooleanAttrs);\r\nconst isBooleanAttr = /* @__PURE__ */ makeMap(\r\n specialBooleanAttrs + `,async,autofocus,autoplay,controls,default,defer,disabled,hidden,inert,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected`\r\n);\r\nfunction includeBooleanAttr(value) {\r\n return !!value || value === \"\";\r\n}\r\nconst unsafeAttrCharRE = /[>/=\"'\\u0009\\u000a\\u000c\\u0020]/;\r\nconst attrValidationCache = {};\r\nfunction isSSRSafeAttrName(name) {\r\n if (attrValidationCache.hasOwnProperty(name)) {\r\n return attrValidationCache[name];\r\n }\r\n const isUnsafe = unsafeAttrCharRE.test(name);\r\n if (isUnsafe) {\r\n console.error(`unsafe attribute name: ${name}`);\r\n }\r\n return attrValidationCache[name] = !isUnsafe;\r\n}\r\nconst propsToAttrMap = {\r\n acceptCharset: \"accept-charset\",\r\n className: \"class\",\r\n htmlFor: \"for\",\r\n httpEquiv: \"http-equiv\"\r\n};\r\nconst isKnownHtmlAttr = /* @__PURE__ */ makeMap(\r\n `accept,accept-charset,accesskey,action,align,allow,alt,async,autocapitalize,autocomplete,autofocus,autoplay,background,bgcolor,border,buffered,capture,challenge,charset,checked,cite,class,code,codebase,color,cols,colspan,content,contenteditable,contextmenu,controls,coords,crossorigin,csp,data,datetime,decoding,default,defer,dir,dirname,disabled,download,draggable,dropzone,enctype,enterkeyhint,for,form,formaction,formenctype,formmethod,formnovalidate,formtarget,headers,height,hidden,high,href,hreflang,http-equiv,icon,id,importance,inert,integrity,ismap,itemprop,keytype,kind,label,lang,language,loading,list,loop,low,manifest,max,maxlength,minlength,media,min,multiple,muted,name,novalidate,open,optimum,pattern,ping,placeholder,poster,preload,radiogroup,readonly,referrerpolicy,rel,required,reversed,rows,rowspan,sandbox,scope,scoped,selected,shape,size,sizes,slot,span,spellcheck,src,srcdoc,srclang,srcset,start,step,style,summary,tabindex,target,title,translate,type,usemap,value,width,wrap`\r\n);\r\nconst isKnownSvgAttr = /* @__PURE__ */ makeMap(\r\n `xmlns,accent-height,accumulate,additive,alignment-baseline,alphabetic,amplitude,arabic-form,ascent,attributeName,attributeType,azimuth,baseFrequency,baseline-shift,baseProfile,bbox,begin,bias,by,calcMode,cap-height,class,clip,clipPathUnits,clip-path,clip-rule,color,color-interpolation,color-interpolation-filters,color-profile,color-rendering,contentScriptType,contentStyleType,crossorigin,cursor,cx,cy,d,decelerate,descent,diffuseConstant,direction,display,divisor,dominant-baseline,dur,dx,dy,edgeMode,elevation,enable-background,end,exponent,fill,fill-opacity,fill-rule,filter,filterRes,filterUnits,flood-color,flood-opacity,font-family,font-size,font-size-adjust,font-stretch,font-style,font-variant,font-weight,format,from,fr,fx,fy,g1,g2,glyph-name,glyph-orientation-horizontal,glyph-orientation-vertical,glyphRef,gradientTransform,gradientUnits,hanging,height,href,hreflang,horiz-adv-x,horiz-origin-x,id,ideographic,image-rendering,in,in2,intercept,k,k1,k2,k3,k4,kernelMatrix,kernelUnitLength,kerning,keyPoints,keySplines,keyTimes,lang,lengthAdjust,letter-spacing,lighting-color,limitingConeAngle,local,marker-end,marker-mid,marker-start,markerHeight,markerUnits,markerWidth,mask,maskContentUnits,maskUnits,mathematical,max,media,method,min,mode,name,numOctaves,offset,opacity,operator,order,orient,orientation,origin,overflow,overline-position,overline-thickness,panose-1,paint-order,path,pathLength,patternContentUnits,patternTransform,patternUnits,ping,pointer-events,points,pointsAtX,pointsAtY,pointsAtZ,preserveAlpha,preserveAspectRatio,primitiveUnits,r,radius,referrerPolicy,refX,refY,rel,rendering-intent,repeatCount,repeatDur,requiredExtensions,requiredFeatures,restart,result,rotate,rx,ry,scale,seed,shape-rendering,slope,spacing,specularConstant,specularExponent,speed,spreadMethod,startOffset,stdDeviation,stemh,stemv,stitchTiles,stop-color,stop-opacity,strikethrough-position,strikethrough-thickness,string,stroke,stroke-dasharray,stroke-dashoffset,stroke-linecap,stroke-linejoin,stroke-miterlimit,stroke-opacity,stroke-width,style,surfaceScale,systemLanguage,tabindex,tableValues,target,targetX,targetY,text-anchor,text-decoration,text-rendering,textLength,to,transform,transform-origin,type,u1,u2,underline-position,underline-thickness,unicode,unicode-bidi,unicode-range,units-per-em,v-alphabetic,v-hanging,v-ideographic,v-mathematical,values,vector-effect,version,vert-adv-y,vert-origin-x,vert-origin-y,viewBox,viewTarget,visibility,width,widths,word-spacing,writing-mode,x,x-height,x1,x2,xChannelSelector,xlink:actuate,xlink:arcrole,xlink:href,xlink:role,xlink:show,xlink:title,xlink:type,xmlns:xlink,xml:base,xml:lang,xml:space,y,y1,y2,yChannelSelector,z,zoomAndPan`\r\n);\r\nfunction isRenderableAttrValue(value) {\r\n if (value == null) {\r\n return false;\r\n }\r\n const type = typeof value;\r\n return type === \"string\" || type === \"number\" || type === \"boolean\";\r\n}\r\n\r\nconst escapeRE = /[\"'&<>]/;\r\nfunction escapeHtml(string) {\r\n const str = \"\" + string;\r\n const match = escapeRE.exec(str);\r\n if (!match) {\r\n return str;\r\n }\r\n let html = \"\";\r\n let escaped;\r\n let index;\r\n let lastIndex = 0;\r\n for (index = match.index; index < str.length; index++) {\r\n switch (str.charCodeAt(index)) {\r\n case 34:\r\n escaped = \""\";\r\n break;\r\n case 38:\r\n escaped = \"&\";\r\n break;\r\n case 39:\r\n escaped = \"'\";\r\n break;\r\n case 60:\r\n escaped = \"<\";\r\n break;\r\n case 62:\r\n escaped = \">\";\r\n break;\r\n default:\r\n continue;\r\n }\r\n if (lastIndex !== index) {\r\n html += str.slice(lastIndex, index);\r\n }\r\n lastIndex = index + 1;\r\n html += escaped;\r\n }\r\n return lastIndex !== index ? html + str.slice(lastIndex, index) : html;\r\n}\r\nconst commentStripRE = /^-?>||--!>| looseEqual(item, val));\r\n}\r\n\r\nconst toDisplayString = (val) => {\r\n return isString(val) ? val : val == null ? \"\" : isArray(val) || isObject(val) && (val.toString === objectToString || !isFunction(val.toString)) ? JSON.stringify(val, replacer, 2) : String(val);\r\n};\r\nconst replacer = (_key, val) => {\r\n if (val && val.__v_isRef) {\r\n return replacer(_key, val.value);\r\n } else if (isMap(val)) {\r\n return {\r\n [`Map(${val.size})`]: [...val.entries()].reduce(\r\n (entries, [key, val2], i) => {\r\n entries[stringifySymbol(key, i) + \" =>\"] = val2;\r\n return entries;\r\n },\r\n {}\r\n )\r\n };\r\n } else if (isSet(val)) {\r\n return {\r\n [`Set(${val.size})`]: [...val.values()].map((v) => stringifySymbol(v))\r\n };\r\n } else if (isSymbol(val)) {\r\n return stringifySymbol(val);\r\n } else if (isObject(val) && !isArray(val) && !isPlainObject(val)) {\r\n return String(val);\r\n }\r\n return val;\r\n};\r\nconst stringifySymbol = (v, i = \"\") => {\r\n var _a;\r\n return isSymbol(v) ? `Symbol(${(_a = v.description) != null ? _a : i})` : v;\r\n};\r\n\r\nexport { EMPTY_ARR, EMPTY_OBJ, NO, NOOP, PatchFlagNames, PatchFlags, ShapeFlags, SlotFlags, camelize, capitalize, def, escapeHtml, escapeHtmlComment, extend, genPropsAccessExp, generateCodeFrame, getGlobalThis, hasChanged, hasOwn, hyphenate, includeBooleanAttr, invokeArrayFns, isArray, isBooleanAttr, isBuiltInDirective, isDate, isFunction, isGloballyAllowed, isGloballyWhitelisted, isHTMLTag, isIntegerKey, isKnownHtmlAttr, isKnownSvgAttr, isMap, isMathMLTag, isModelListener, isObject, isOn, isPlainObject, isPromise, isRegExp, isRenderableAttrValue, isReservedProp, isSSRSafeAttrName, isSVGTag, isSet, isSpecialBooleanAttr, isString, isSymbol, isVoidTag, looseEqual, looseIndexOf, looseToNumber, makeMap, normalizeClass, normalizeProps, normalizeStyle, objectToString, parseStringStyle, propsToAttrMap, remove, slotFlagsText, stringifyStyle, toDisplayString, toHandlerKey, toNumber, toRawType, toTypeString };\r\n","const isObject = (val) => val !== null && typeof val === 'object';\r\nconst defaultDelimiters = ['{', '}'];\r\nclass BaseFormatter {\r\n constructor() {\r\n this._caches = Object.create(null);\r\n }\r\n interpolate(message, values, delimiters = defaultDelimiters) {\r\n if (!values) {\r\n return [message];\r\n }\r\n let tokens = this._caches[message];\r\n if (!tokens) {\r\n tokens = parse(message, delimiters);\r\n this._caches[message] = tokens;\r\n }\r\n return compile(tokens, values);\r\n }\r\n}\r\nconst RE_TOKEN_LIST_VALUE = /^(?:\\d)+/;\r\nconst RE_TOKEN_NAMED_VALUE = /^(?:\\w)+/;\r\nfunction parse(format, [startDelimiter, endDelimiter]) {\r\n const tokens = [];\r\n let position = 0;\r\n let text = '';\r\n while (position < format.length) {\r\n let char = format[position++];\r\n if (char === startDelimiter) {\r\n if (text) {\r\n tokens.push({ type: 'text', value: text });\r\n }\r\n text = '';\r\n let sub = '';\r\n char = format[position++];\r\n while (char !== undefined && char !== endDelimiter) {\r\n sub += char;\r\n char = format[position++];\r\n }\r\n const isClosed = char === endDelimiter;\r\n const type = RE_TOKEN_LIST_VALUE.test(sub)\r\n ? 'list'\r\n : isClosed && RE_TOKEN_NAMED_VALUE.test(sub)\r\n ? 'named'\r\n : 'unknown';\r\n tokens.push({ value: sub, type });\r\n }\r\n // else if (char === '%') {\r\n // // when found rails i18n syntax, skip text capture\r\n // if (format[position] !== '{') {\r\n // text += char\r\n // }\r\n // }\r\n else {\r\n text += char;\r\n }\r\n }\r\n text && tokens.push({ type: 'text', value: text });\r\n return tokens;\r\n}\r\nfunction compile(tokens, values) {\r\n const compiled = [];\r\n let index = 0;\r\n const mode = Array.isArray(values)\r\n ? 'list'\r\n : isObject(values)\r\n ? 'named'\r\n : 'unknown';\r\n if (mode === 'unknown') {\r\n return compiled;\r\n }\r\n while (index < tokens.length) {\r\n const token = tokens[index];\r\n switch (token.type) {\r\n case 'text':\r\n compiled.push(token.value);\r\n break;\r\n case 'list':\r\n compiled.push(values[parseInt(token.value, 10)]);\r\n break;\r\n case 'named':\r\n if (mode === 'named') {\r\n compiled.push(values[token.value]);\r\n }\r\n else {\r\n if (process.env.NODE_ENV !== 'production') {\r\n console.warn(`Type of token '${token.type}' and format of value '${mode}' don't match!`);\r\n }\r\n }\r\n break;\r\n case 'unknown':\r\n if (process.env.NODE_ENV !== 'production') {\r\n console.warn(`Detect 'unknown' type of token!`);\r\n }\r\n break;\r\n }\r\n index++;\r\n }\r\n return compiled;\r\n}\r\n\r\nconst LOCALE_ZH_HANS = 'zh-Hans';\r\nconst LOCALE_ZH_HANT = 'zh-Hant';\r\nconst LOCALE_EN = 'en';\r\nconst LOCALE_FR = 'fr';\r\nconst LOCALE_ES = 'es';\r\nconst hasOwnProperty = Object.prototype.hasOwnProperty;\r\nconst hasOwn = (val, key) => hasOwnProperty.call(val, key);\r\nconst defaultFormatter = new BaseFormatter();\r\nfunction include(str, parts) {\r\n return !!parts.find((part) => str.indexOf(part) !== -1);\r\n}\r\nfunction startsWith(str, parts) {\r\n return parts.find((part) => str.indexOf(part) === 0);\r\n}\r\nfunction normalizeLocale(locale, messages) {\r\n if (!locale) {\r\n return;\r\n }\r\n locale = locale.trim().replace(/_/g, '-');\r\n if (messages && messages[locale]) {\r\n return locale;\r\n }\r\n locale = locale.toLowerCase();\r\n if (locale === 'chinese') {\r\n // 支付宝\r\n return LOCALE_ZH_HANS;\r\n }\r\n if (locale.indexOf('zh') === 0) {\r\n if (locale.indexOf('-hans') > -1) {\r\n return LOCALE_ZH_HANS;\r\n }\r\n if (locale.indexOf('-hant') > -1) {\r\n return LOCALE_ZH_HANT;\r\n }\r\n if (include(locale, ['-tw', '-hk', '-mo', '-cht'])) {\r\n return LOCALE_ZH_HANT;\r\n }\r\n return LOCALE_ZH_HANS;\r\n }\r\n let locales = [LOCALE_EN, LOCALE_FR, LOCALE_ES];\r\n if (messages && Object.keys(messages).length > 0) {\r\n locales = Object.keys(messages);\r\n }\r\n const lang = startsWith(locale, locales);\r\n if (lang) {\r\n return lang;\r\n }\r\n}\r\nclass I18n {\r\n constructor({ locale, fallbackLocale, messages, watcher, formater, }) {\r\n this.locale = LOCALE_EN;\r\n this.fallbackLocale = LOCALE_EN;\r\n this.message = {};\r\n this.messages = {};\r\n this.watchers = [];\r\n if (fallbackLocale) {\r\n this.fallbackLocale = fallbackLocale;\r\n }\r\n this.formater = formater || defaultFormatter;\r\n this.messages = messages || {};\r\n this.setLocale(locale || LOCALE_EN);\r\n if (watcher) {\r\n this.watchLocale(watcher);\r\n }\r\n }\r\n setLocale(locale) {\r\n const oldLocale = this.locale;\r\n this.locale = normalizeLocale(locale, this.messages) || this.fallbackLocale;\r\n if (!this.messages[this.locale]) {\r\n // 可能初始化时不存在\r\n this.messages[this.locale] = {};\r\n }\r\n this.message = this.messages[this.locale];\r\n // 仅发生变化时,通知\r\n if (oldLocale !== this.locale) {\r\n this.watchers.forEach((watcher) => {\r\n watcher(this.locale, oldLocale);\r\n });\r\n }\r\n }\r\n getLocale() {\r\n return this.locale;\r\n }\r\n watchLocale(fn) {\r\n const index = this.watchers.push(fn) - 1;\r\n return () => {\r\n this.watchers.splice(index, 1);\r\n };\r\n }\r\n add(locale, message, override = true) {\r\n const curMessages = this.messages[locale];\r\n if (curMessages) {\r\n if (override) {\r\n Object.assign(curMessages, message);\r\n }\r\n else {\r\n Object.keys(message).forEach((key) => {\r\n if (!hasOwn(curMessages, key)) {\r\n curMessages[key] = message[key];\r\n }\r\n });\r\n }\r\n }\r\n else {\r\n this.messages[locale] = message;\r\n }\r\n }\r\n f(message, values, delimiters) {\r\n return this.formater.interpolate(message, values, delimiters).join('');\r\n }\r\n t(key, locale, values) {\r\n let message = this.message;\r\n if (typeof locale === 'string') {\r\n locale = normalizeLocale(locale, this.messages);\r\n locale && (message = this.messages[locale]);\r\n }\r\n else {\r\n values = locale;\r\n }\r\n if (!hasOwn(message, key)) {\r\n console.warn(`Cannot translate the value of keypath ${key}. Use the value of keypath as default.`);\r\n return key;\r\n }\r\n return this.formater.interpolate(message[key], values).join('');\r\n }\r\n}\r\n\r\nfunction watchAppLocale(appVm, i18n) {\r\n // 需要保证 watch 的触发在组件渲染之前\r\n if (appVm.$watchLocale) {\r\n // vue2\r\n appVm.$watchLocale((newLocale) => {\r\n i18n.setLocale(newLocale);\r\n });\r\n }\r\n else {\r\n appVm.$watch(() => appVm.$locale, (newLocale) => {\r\n i18n.setLocale(newLocale);\r\n });\r\n }\r\n}\r\nfunction getDefaultLocale() {\r\n if (typeof uni !== 'undefined' && uni.getLocale) {\r\n return uni.getLocale();\r\n }\r\n // 小程序平台,uni 和 uni-i18n 互相引用,导致访问不到 uni,故在 global 上挂了 getLocale\r\n if (typeof global !== 'undefined' && global.getLocale) {\r\n return global.getLocale();\r\n }\r\n return LOCALE_EN;\r\n}\r\nfunction initVueI18n(locale, messages = {}, fallbackLocale, watcher) {\r\n // 兼容旧版本入参\r\n if (typeof locale !== 'string') {\r\n // ;[locale, messages] = [\r\n // messages as unknown as string,\r\n // locale as unknown as LocaleMessages,\r\n // ]\r\n // 暂不使用数组解构,uts编译器暂未支持。\r\n const options = [\r\n messages,\r\n locale,\r\n ];\r\n locale = options[0];\r\n messages = options[1];\r\n }\r\n if (typeof locale !== 'string') {\r\n // 因为小程序平台,uni-i18n 和 uni 互相引用,导致此时访问 uni 时,为 undefined\r\n locale = getDefaultLocale();\r\n }\r\n if (typeof fallbackLocale !== 'string') {\r\n fallbackLocale =\r\n (typeof __uniConfig !== 'undefined' && __uniConfig.fallbackLocale) ||\r\n LOCALE_EN;\r\n }\r\n const i18n = new I18n({\r\n locale,\r\n fallbackLocale,\r\n messages,\r\n watcher,\r\n });\r\n let t = (key, values) => {\r\n if (typeof getApp !== 'function') {\r\n // app view\r\n /* eslint-disable no-func-assign */\r\n t = function (key, values) {\r\n return i18n.t(key, values);\r\n };\r\n }\r\n else {\r\n let isWatchedAppLocale = false;\r\n t = function (key, values) {\r\n const appVm = getApp().$vm;\r\n // 可能$vm还不存在,比如在支付宝小程序中,组件定义较早,在props的default里使用了t()函数(如uni-goods-nav),此时app还未初始化\r\n // options: {\r\n // \ttype: Array,\r\n // \tdefault () {\r\n // \t\treturn [{\r\n // \t\t\ticon: 'shop',\r\n // \t\t\ttext: t(\"uni-goods-nav.options.shop\"),\r\n // \t\t}, {\r\n // \t\t\ticon: 'cart',\r\n // \t\t\ttext: t(\"uni-goods-nav.options.cart\")\r\n // \t\t}]\r\n // \t}\r\n // },\r\n if (appVm) {\r\n // 触发响应式\r\n appVm.$locale;\r\n if (!isWatchedAppLocale) {\r\n isWatchedAppLocale = true;\r\n watchAppLocale(appVm, i18n);\r\n }\r\n }\r\n return i18n.t(key, values);\r\n };\r\n }\r\n return t(key, values);\r\n };\r\n return {\r\n i18n,\r\n f(message, values, delimiters) {\r\n return i18n.f(message, values, delimiters);\r\n },\r\n t(key, values) {\r\n return t(key, values);\r\n },\r\n add(locale, message, override = true) {\r\n return i18n.add(locale, message, override);\r\n },\r\n watch(fn) {\r\n return i18n.watchLocale(fn);\r\n },\r\n getLocale() {\r\n return i18n.getLocale();\r\n },\r\n setLocale(newLocale) {\r\n return i18n.setLocale(newLocale);\r\n },\r\n };\r\n}\r\n\r\nconst isString = (val) => typeof val === 'string';\r\nlet formater;\r\nfunction hasI18nJson(jsonObj, delimiters) {\r\n if (!formater) {\r\n formater = new BaseFormatter();\r\n }\r\n return walkJsonObj(jsonObj, (jsonObj, key) => {\r\n const value = jsonObj[key];\r\n if (isString(value)) {\r\n if (isI18nStr(value, delimiters)) {\r\n return true;\r\n }\r\n }\r\n else {\r\n return hasI18nJson(value, delimiters);\r\n }\r\n });\r\n}\r\nfunction parseI18nJson(jsonObj, values, delimiters) {\r\n if (!formater) {\r\n formater = new BaseFormatter();\r\n }\r\n walkJsonObj(jsonObj, (jsonObj, key) => {\r\n const value = jsonObj[key];\r\n if (isString(value)) {\r\n if (isI18nStr(value, delimiters)) {\r\n jsonObj[key] = compileStr(value, values, delimiters);\r\n }\r\n }\r\n else {\r\n parseI18nJson(value, values, delimiters);\r\n }\r\n });\r\n return jsonObj;\r\n}\r\nfunction compileI18nJsonStr(jsonStr, { locale, locales, delimiters, }) {\r\n if (!isI18nStr(jsonStr, delimiters)) {\r\n return jsonStr;\r\n }\r\n if (!formater) {\r\n formater = new BaseFormatter();\r\n }\r\n const localeValues = [];\r\n Object.keys(locales).forEach((name) => {\r\n if (name !== locale) {\r\n localeValues.push({\r\n locale: name,\r\n values: locales[name],\r\n });\r\n }\r\n });\r\n localeValues.unshift({ locale, values: locales[locale] });\r\n try {\r\n return JSON.stringify(compileJsonObj(JSON.parse(jsonStr), localeValues, delimiters), null, 2);\r\n }\r\n catch (e) { }\r\n return jsonStr;\r\n}\r\nfunction isI18nStr(value, delimiters) {\r\n return value.indexOf(delimiters[0]) > -1;\r\n}\r\nfunction compileStr(value, values, delimiters) {\r\n return formater.interpolate(value, values, delimiters).join('');\r\n}\r\nfunction compileValue(jsonObj, key, localeValues, delimiters) {\r\n const value = jsonObj[key];\r\n if (isString(value)) {\r\n // 存在国际化\r\n if (isI18nStr(value, delimiters)) {\r\n jsonObj[key] = compileStr(value, localeValues[0].values, delimiters);\r\n if (localeValues.length > 1) {\r\n // 格式化国际化语言\r\n const valueLocales = (jsonObj[key + 'Locales'] = {});\r\n localeValues.forEach((localValue) => {\r\n valueLocales[localValue.locale] = compileStr(value, localValue.values, delimiters);\r\n });\r\n }\r\n }\r\n }\r\n else {\r\n compileJsonObj(value, localeValues, delimiters);\r\n }\r\n}\r\nfunction compileJsonObj(jsonObj, localeValues, delimiters) {\r\n walkJsonObj(jsonObj, (jsonObj, key) => {\r\n compileValue(jsonObj, key, localeValues, delimiters);\r\n });\r\n return jsonObj;\r\n}\r\nfunction walkJsonObj(jsonObj, walk) {\r\n if (Array.isArray(jsonObj)) {\r\n for (let i = 0; i < jsonObj.length; i++) {\r\n if (walk(jsonObj, i)) {\r\n return true;\r\n }\r\n }\r\n }\r\n else if (isObject(jsonObj)) {\r\n for (const key in jsonObj) {\r\n if (walk(jsonObj, key)) {\r\n return true;\r\n }\r\n }\r\n }\r\n return false;\r\n}\r\n\r\nfunction resolveLocale(locales) {\r\n return (locale) => {\r\n if (!locale) {\r\n return locale;\r\n }\r\n locale = normalizeLocale(locale) || locale;\r\n return resolveLocaleChain(locale).find((locale) => locales.indexOf(locale) > -1);\r\n };\r\n}\r\nfunction resolveLocaleChain(locale) {\r\n const chain = [];\r\n const tokens = locale.split('-');\r\n while (tokens.length) {\r\n chain.push(tokens.join('-'));\r\n tokens.pop();\r\n }\r\n return chain;\r\n}\r\n\r\nexport { BaseFormatter as Formatter, I18n, LOCALE_EN, LOCALE_ES, LOCALE_FR, LOCALE_ZH_HANS, LOCALE_ZH_HANT, compileI18nJsonStr, hasI18nJson, initVueI18n, isI18nStr, isString, normalizeLocale, parseI18nJson, resolveLocale };\r\n","import { isHTMLTag, isSVGTag, isString, isFunction, isPlainObject, hyphenate, camelize, normalizeStyle as normalizeStyle$1, parseStringStyle, isArray, normalizeClass as normalizeClass$1, extend, capitalize } from '@vue/shared';\r\n\r\nconst BUILT_IN_TAG_NAMES = [\r\n 'ad',\r\n 'ad-content-page',\r\n 'ad-draw',\r\n 'audio',\r\n 'button',\r\n 'camera',\r\n 'canvas',\r\n 'checkbox',\r\n 'checkbox-group',\r\n 'cover-image',\r\n 'cover-view',\r\n 'editor',\r\n 'form',\r\n 'functional-page-navigator',\r\n 'icon',\r\n 'image',\r\n 'input',\r\n 'label',\r\n 'live-player',\r\n 'live-pusher',\r\n 'map',\r\n 'movable-area',\r\n 'movable-view',\r\n 'navigator',\r\n 'official-account',\r\n 'open-data',\r\n 'picker',\r\n 'picker-view',\r\n 'picker-view-column',\r\n 'progress',\r\n 'radio',\r\n 'radio-group',\r\n 'rich-text',\r\n 'scroll-view',\r\n 'slider',\r\n 'swiper',\r\n 'swiper-item',\r\n 'switch',\r\n 'text',\r\n 'textarea',\r\n 'video',\r\n 'view',\r\n 'web-view',\r\n 'location-picker',\r\n 'location-view',\r\n];\r\nconst BUILT_IN_TAGS = BUILT_IN_TAG_NAMES.map((tag) => 'uni-' + tag);\r\nconst TAGS = [\r\n 'app',\r\n 'layout',\r\n 'content',\r\n 'main',\r\n 'top-window',\r\n 'left-window',\r\n 'right-window',\r\n 'tabbar',\r\n 'page',\r\n 'page-head',\r\n 'page-wrapper',\r\n 'page-body',\r\n 'page-refresh',\r\n 'actionsheet',\r\n 'modal',\r\n 'toast',\r\n 'resize-sensor',\r\n 'shadow-root',\r\n].map((tag) => 'uni-' + tag);\r\nconst NVUE_BUILT_IN_TAGS = [\r\n 'svg',\r\n 'view',\r\n 'a',\r\n 'div',\r\n 'img',\r\n 'image',\r\n 'text',\r\n 'span',\r\n 'input',\r\n 'textarea',\r\n 'spinner',\r\n 'select',\r\n // slider 被自定义 u-slider 替代\r\n // 'slider',\r\n 'slider-neighbor',\r\n 'indicator',\r\n 'canvas',\r\n 'list',\r\n 'cell',\r\n 'header',\r\n 'loading',\r\n 'loading-indicator',\r\n 'refresh',\r\n 'scrollable',\r\n 'scroller',\r\n 'video',\r\n 'web',\r\n 'embed',\r\n 'tabbar',\r\n 'tabheader',\r\n 'datepicker',\r\n 'timepicker',\r\n 'marquee',\r\n 'countdown',\r\n 'dc-switch',\r\n 'waterfall',\r\n 'richtext',\r\n 'recycle-list',\r\n 'u-scalable',\r\n 'barcode',\r\n 'gcanvas',\r\n];\r\nconst UVUE_BUILT_IN_TAGS = [\r\n 'ad',\r\n 'ad-content-page',\r\n 'ad-draw',\r\n 'native-view',\r\n 'loading-indicator',\r\n 'list-view',\r\n 'list-item',\r\n 'swiper',\r\n 'swiper-item',\r\n 'rich-text',\r\n 'sticky-view',\r\n 'sticky-header',\r\n 'sticky-section',\r\n // 自定义\r\n 'uni-slider',\r\n // 原生实现\r\n 'button',\r\n 'nested-scroll-header',\r\n 'nested-scroll-body',\r\n 'waterflow',\r\n 'flow-item',\r\n];\r\nconst UVUE_WEB_BUILT_IN_TAGS = [\r\n 'list-view',\r\n 'list-item',\r\n 'sticky-section',\r\n 'sticky-header',\r\n 'cloud-db-element',\r\n].map((tag) => 'uni-' + tag);\r\nconst UVUE_IOS_BUILT_IN_TAGS = [\r\n 'scroll-view',\r\n 'web-view',\r\n 'slider',\r\n 'form',\r\n 'switch',\r\n];\r\nconst NVUE_U_BUILT_IN_TAGS = [\r\n 'u-text',\r\n 'u-image',\r\n 'u-input',\r\n 'u-textarea',\r\n 'u-video',\r\n 'u-web-view',\r\n 'u-slider',\r\n 'u-ad',\r\n 'u-ad-draw',\r\n 'u-rich-text',\r\n];\r\nconst UNI_UI_CONFLICT_TAGS = ['list-item'].map((tag) => 'uni-' + tag);\r\nfunction isBuiltInComponent(tag) {\r\n if (UNI_UI_CONFLICT_TAGS.indexOf(tag) !== -1) {\r\n return false;\r\n }\r\n // h5 平台会被转换为 v-uni-\r\n const realTag = 'uni-' + tag.replace('v-uni-', '');\r\n // TODO 区分x和非x\r\n return (BUILT_IN_TAGS.indexOf(realTag) !== -1 ||\r\n UVUE_WEB_BUILT_IN_TAGS.indexOf(realTag) !== -1);\r\n}\r\nfunction isH5CustomElement(tag, isX = false) {\r\n if (isX && UVUE_WEB_BUILT_IN_TAGS.indexOf(tag) !== -1) {\r\n return true;\r\n }\r\n return TAGS.indexOf(tag) !== -1 || BUILT_IN_TAGS.indexOf(tag) !== -1;\r\n}\r\nfunction isUniXElement(name) {\r\n return /^I?Uni.*Element(?:Impl)?$/.test(name);\r\n}\r\nfunction isH5NativeTag(tag) {\r\n return (tag !== 'head' &&\r\n (isHTMLTag(tag) || isSVGTag(tag)) &&\r\n !isBuiltInComponent(tag));\r\n}\r\nfunction isAppNativeTag(tag) {\r\n return isHTMLTag(tag) || isSVGTag(tag) || isBuiltInComponent(tag);\r\n}\r\nconst NVUE_CUSTOM_COMPONENTS = [\r\n 'ad',\r\n 'ad-draw',\r\n 'button',\r\n 'checkbox-group',\r\n 'checkbox',\r\n 'form',\r\n 'icon',\r\n 'label',\r\n 'movable-area',\r\n 'movable-view',\r\n 'navigator',\r\n 'picker',\r\n 'progress',\r\n 'radio-group',\r\n 'radio',\r\n 'rich-text',\r\n 'swiper-item',\r\n 'swiper',\r\n 'switch',\r\n 'slider',\r\n 'picker-view',\r\n 'picker-view-column',\r\n];\r\n// 内置的easycom组件\r\nconst UVUE_BUILT_IN_EASY_COMPONENTS = ['map'];\r\nfunction isAppUVueBuiltInEasyComponent(tag) {\r\n return UVUE_BUILT_IN_EASY_COMPONENTS.includes(tag);\r\n}\r\n// 主要是指前端实现的组件列表\r\nconst UVUE_CUSTOM_COMPONENTS = [\r\n ...NVUE_CUSTOM_COMPONENTS,\r\n ...UVUE_BUILT_IN_EASY_COMPONENTS,\r\n];\r\nfunction isAppUVueNativeTag(tag) {\r\n // 前端实现的内置组件都会注册一个根组件\r\n if (tag.startsWith('uni-') && tag.endsWith('-element')) {\r\n return true;\r\n }\r\n if (UVUE_BUILT_IN_TAGS.includes(tag)) {\r\n return true;\r\n }\r\n if (UVUE_CUSTOM_COMPONENTS.includes(tag)) {\r\n return false;\r\n }\r\n if (isBuiltInComponent(tag)) {\r\n return true;\r\n }\r\n // u-text,u-video...\r\n if (NVUE_U_BUILT_IN_TAGS.includes(tag)) {\r\n return true;\r\n }\r\n return false;\r\n}\r\nfunction isAppIOSUVueNativeTag(tag) {\r\n // 前端实现的内置组件都会注册一个根组件\r\n if (tag.startsWith('uni-') && tag.endsWith('-element')) {\r\n return true;\r\n }\r\n if (NVUE_BUILT_IN_TAGS.includes(tag)) {\r\n return true;\r\n }\r\n if (UVUE_BUILT_IN_TAGS.includes(tag)) {\r\n return true;\r\n }\r\n if (UVUE_IOS_BUILT_IN_TAGS.includes(tag)) {\r\n return true;\r\n }\r\n return false;\r\n}\r\nfunction isAppNVueNativeTag(tag) {\r\n if (NVUE_BUILT_IN_TAGS.includes(tag)) {\r\n return true;\r\n }\r\n if (NVUE_CUSTOM_COMPONENTS.includes(tag)) {\r\n return false;\r\n }\r\n if (isBuiltInComponent(tag)) {\r\n return true;\r\n }\r\n // u-text,u-video...\r\n if (NVUE_U_BUILT_IN_TAGS.includes(tag)) {\r\n return true;\r\n }\r\n return false;\r\n}\r\nfunction isMiniProgramNativeTag(tag) {\r\n return isBuiltInComponent(tag);\r\n}\r\nfunction isMiniProgramUVueNativeTag(tag) {\r\n // 小程序平台内置的自定义元素,会被转换为 view\r\n if (tag.startsWith('uni-') && tag.endsWith('-element')) {\r\n return true;\r\n }\r\n return isBuiltInComponent(tag);\r\n}\r\nfunction createIsCustomElement(tags = []) {\r\n return function isCustomElement(tag) {\r\n return tags.includes(tag);\r\n };\r\n}\r\nfunction isComponentTag(tag) {\r\n return tag[0].toLowerCase() + tag.slice(1) === 'component';\r\n}\r\nconst COMPONENT_SELECTOR_PREFIX = 'uni-';\r\nconst COMPONENT_PREFIX = 'v-' + COMPONENT_SELECTOR_PREFIX;\r\n\r\nconst LINEFEED = '\\n';\r\nconst NAVBAR_HEIGHT = 44;\r\nconst TABBAR_HEIGHT = 50;\r\nconst ON_REACH_BOTTOM_DISTANCE = 50;\r\nconst RESPONSIVE_MIN_WIDTH = 768;\r\nconst UNI_STORAGE_LOCALE = 'UNI_LOCALE';\r\n// quickapp-webview 不能使用 default 作为插槽名称\r\nconst SLOT_DEFAULT_NAME = 'd';\r\nconst COMPONENT_NAME_PREFIX = 'VUni';\r\nconst I18N_JSON_DELIMITERS = ['%', '%'];\r\nconst PRIMARY_COLOR = '#007aff';\r\nconst SELECTED_COLOR = '#0062cc'; // 选中的颜色,如选项卡默认的选中颜色\r\nconst BACKGROUND_COLOR = '#f7f7f7'; // 背景色,如标题栏默认背景色\r\nconst UNI_SSR = '__uniSSR';\r\nconst UNI_SSR_TITLE = 'title';\r\nconst UNI_SSR_STORE = 'store';\r\nconst UNI_SSR_DATA = 'data';\r\nconst UNI_SSR_GLOBAL_DATA = 'globalData';\r\nconst SCHEME_RE = /^([a-z-]+:)?\\/\\//i;\r\nconst DATA_RE = /^data:.*,.*/;\r\nconst WEB_INVOKE_APPSERVICE = 'WEB_INVOKE_APPSERVICE';\r\nconst WXS_PROTOCOL = 'wxs://';\r\nconst JSON_PROTOCOL = 'json://';\r\nconst WXS_MODULES = 'wxsModules';\r\nconst RENDERJS_MODULES = 'renderjsModules';\r\n// lifecycle\r\n// App and Page\r\nconst ON_SHOW = 'onShow';\r\nconst ON_HIDE = 'onHide';\r\n//App\r\nconst ON_LAUNCH = 'onLaunch';\r\nconst ON_ERROR = 'onError';\r\nconst ON_THEME_CHANGE = 'onThemeChange';\r\nconst OFF_THEME_CHANGE = 'offThemeChange';\r\nconst ON_HOST_THEME_CHANGE = 'onHostThemeChange';\r\nconst OFF_HOST_THEME_CHANGE = 'offHostThemeChange';\r\nconst ON_KEYBOARD_HEIGHT_CHANGE = 'onKeyboardHeightChange';\r\nconst ON_PAGE_NOT_FOUND = 'onPageNotFound';\r\nconst ON_UNHANDLE_REJECTION = 'onUnhandledRejection';\r\nconst ON_EXIT = 'onExit';\r\n//Page\r\nconst ON_LOAD = 'onLoad';\r\nconst ON_READY = 'onReady';\r\nconst ON_UNLOAD = 'onUnload';\r\n// 百度特有\r\nconst ON_INIT = 'onInit';\r\n// 微信特有\r\nconst ON_SAVE_EXIT_STATE = 'onSaveExitState';\r\nconst ON_RESIZE = 'onResize';\r\nconst ON_BACK_PRESS = 'onBackPress';\r\nconst ON_PAGE_SCROLL = 'onPageScroll';\r\nconst ON_TAB_ITEM_TAP = 'onTabItemTap';\r\nconst ON_REACH_BOTTOM = 'onReachBottom';\r\nconst ON_PULL_DOWN_REFRESH = 'onPullDownRefresh';\r\nconst ON_SHARE_TIMELINE = 'onShareTimeline';\r\nconst ON_SHARE_CHAT = 'onShareChat'; // xhs-share\r\nconst ON_ADD_TO_FAVORITES = 'onAddToFavorites';\r\nconst ON_SHARE_APP_MESSAGE = 'onShareAppMessage';\r\n// navigationBar\r\nconst ON_NAVIGATION_BAR_BUTTON_TAP = 'onNavigationBarButtonTap';\r\nconst ON_NAVIGATION_BAR_CHANGE = 'onNavigationBarChange';\r\nconst ON_NAVIGATION_BAR_SEARCH_INPUT_CLICKED = 'onNavigationBarSearchInputClicked';\r\nconst ON_NAVIGATION_BAR_SEARCH_INPUT_CHANGED = 'onNavigationBarSearchInputChanged';\r\nconst ON_NAVIGATION_BAR_SEARCH_INPUT_CONFIRMED = 'onNavigationBarSearchInputConfirmed';\r\nconst ON_NAVIGATION_BAR_SEARCH_INPUT_FOCUS_CHANGED = 'onNavigationBarSearchInputFocusChanged';\r\n// framework\r\nconst ON_APP_ENTER_FOREGROUND = 'onAppEnterForeground';\r\nconst ON_APP_ENTER_BACKGROUND = 'onAppEnterBackground';\r\nconst ON_WEB_INVOKE_APP_SERVICE = 'onWebInvokeAppService';\r\nconst ON_WXS_INVOKE_CALL_METHOD = 'onWxsInvokeCallMethod';\r\n// mergeVirtualHostAttributes\r\nconst VIRTUAL_HOST_STYLE = 'virtualHostStyle';\r\nconst VIRTUAL_HOST_CLASS = 'virtualHostClass';\r\nconst VIRTUAL_HOST_HIDDEN = 'virtualHostHidden';\r\nconst VIRTUAL_HOST_ID = 'virtualHostId';\r\n\r\nfunction cache(fn) {\r\n const cache = Object.create(null);\r\n return (str) => {\r\n const hit = cache[str];\r\n return hit || (cache[str] = fn(str));\r\n };\r\n}\r\nfunction cacheStringFunction(fn) {\r\n return cache(fn);\r\n}\r\nfunction getLen(str = '') {\r\n return ('' + str).replace(/[^\\x00-\\xff]/g, '**').length;\r\n}\r\nfunction hasLeadingSlash(str) {\r\n return str.indexOf('/') === 0;\r\n}\r\nfunction addLeadingSlash(str) {\r\n return hasLeadingSlash(str) ? str : '/' + str;\r\n}\r\nfunction removeLeadingSlash(str) {\r\n return hasLeadingSlash(str) ? str.slice(1) : str;\r\n}\r\nconst invokeArrayFns = (fns, arg) => {\r\n let ret;\r\n for (let i = 0; i < fns.length; i++) {\r\n ret = fns[i](arg);\r\n }\r\n return ret;\r\n};\r\nfunction updateElementStyle(element, styles) {\r\n for (const attrName in styles) {\r\n element.style[attrName] = styles[attrName];\r\n }\r\n}\r\nfunction once(fn, ctx = null) {\r\n let res;\r\n return ((...args) => {\r\n if (fn) {\r\n res = fn.apply(ctx, args);\r\n fn = null;\r\n }\r\n return res;\r\n });\r\n}\r\nconst sanitise = (val) => (val && JSON.parse(JSON.stringify(val))) || val;\r\nconst _completeValue = (value) => (value > 9 ? value : '0' + value);\r\nfunction formatDateTime({ date = new Date(), mode = 'date' }) {\r\n if (mode === 'time') {\r\n return (_completeValue(date.getHours()) + ':' + _completeValue(date.getMinutes()));\r\n }\r\n else {\r\n return (date.getFullYear() +\r\n '-' +\r\n _completeValue(date.getMonth() + 1) +\r\n '-' +\r\n _completeValue(date.getDate()));\r\n }\r\n}\r\nfunction callOptions(options, data) {\r\n options = options || {};\r\n if (isString(data)) {\r\n data = {\r\n errMsg: data,\r\n };\r\n }\r\n if (/:ok$/.test(data.errMsg)) {\r\n if (isFunction(options.success)) {\r\n options.success(data);\r\n }\r\n }\r\n else {\r\n if (isFunction(options.fail)) {\r\n options.fail(data);\r\n }\r\n }\r\n if (isFunction(options.complete)) {\r\n options.complete(data);\r\n }\r\n}\r\nfunction getValueByDataPath(obj, path) {\r\n if (!isString(path)) {\r\n return;\r\n }\r\n path = path.replace(/\\[(\\d+)\\]/g, '.$1');\r\n const parts = path.split('.');\r\n let key = parts[0];\r\n if (!obj) {\r\n obj = {};\r\n }\r\n if (parts.length === 1) {\r\n return obj[key];\r\n }\r\n return getValueByDataPath(obj[key], parts.slice(1).join('.'));\r\n}\r\nfunction sortObject(obj) {\r\n let sortObj = {};\r\n if (isPlainObject(obj)) {\r\n Object.keys(obj)\r\n .sort()\r\n .forEach((key) => {\r\n const _key = key;\r\n sortObj[_key] = obj[_key];\r\n });\r\n }\r\n return !Object.keys(sortObj) ? obj : sortObj;\r\n}\r\nfunction getGlobalOnce() {\r\n if (typeof globalThis !== 'undefined') {\r\n return globalThis;\r\n }\r\n // worker\r\n if (typeof self !== 'undefined') {\r\n return self;\r\n }\r\n // browser\r\n if (typeof window !== 'undefined') {\r\n return window;\r\n }\r\n // nodejs\r\n // if (typeof global !== 'undefined') {\r\n // return global\r\n // }\r\n function g() {\r\n return this;\r\n }\r\n if (typeof g() !== 'undefined') {\r\n return g();\r\n }\r\n return (function () {\r\n return new Function('return this')();\r\n })();\r\n}\r\nlet g = undefined;\r\nfunction getGlobal() {\r\n if (g) {\r\n return g;\r\n }\r\n g = getGlobalOnce();\r\n return g;\r\n}\r\n\r\nfunction isComponentInternalInstance(vm) {\r\n return !!vm.appContext;\r\n}\r\nfunction resolveComponentInstance(instance) {\r\n return (instance &&\r\n (isComponentInternalInstance(instance) ? instance.proxy : instance));\r\n}\r\nfunction resolveOwnerVm(vm) {\r\n if (!vm) {\r\n return;\r\n }\r\n let componentName = vm.type.name;\r\n while (componentName && isBuiltInComponent(hyphenate(componentName))) {\r\n // ownerInstance 内置组件需要使用父 vm\r\n vm = vm.parent;\r\n componentName = vm.type.name;\r\n }\r\n return vm.proxy;\r\n}\r\nfunction isElement(el) {\r\n // Element\r\n return el.nodeType === 1;\r\n}\r\nfunction resolveOwnerEl(instance, multi = false) {\r\n const { vnode } = instance;\r\n if (isElement(vnode.el)) {\r\n return multi ? (vnode.el ? [vnode.el] : []) : vnode.el;\r\n }\r\n const { subTree } = instance;\r\n // ShapeFlags.ARRAY_CHILDREN = 1<<4\r\n if (subTree.shapeFlag & 16) {\r\n const elemVNodes = subTree.children.filter((vnode) => vnode.el && isElement(vnode.el));\r\n if (elemVNodes.length > 0) {\r\n if (multi) {\r\n return elemVNodes.map((node) => node.el);\r\n }\r\n return elemVNodes[0].el;\r\n }\r\n }\r\n return multi ? (vnode.el ? [vnode.el] : []) : vnode.el;\r\n}\r\nfunction dynamicSlotName(name) {\r\n return name === 'default' ? SLOT_DEFAULT_NAME : name;\r\n}\r\nconst customizeRE = /:/g;\r\nfunction customizeEvent(str) {\r\n return camelize(str.replace(customizeRE, '-'));\r\n}\r\nfunction normalizeStyle(value) {\r\n const g = getGlobal();\r\n if (g && g.UTSJSONObject && value instanceof g.UTSJSONObject) {\r\n const styleObject = {};\r\n g.UTSJSONObject.keys(value).forEach((key) => {\r\n styleObject[key] = value[key];\r\n });\r\n return normalizeStyle$1(styleObject);\r\n }\r\n else if (value instanceof Map) {\r\n const styleObject = {};\r\n value.forEach((value, key) => {\r\n styleObject[key] = value;\r\n });\r\n return normalizeStyle$1(styleObject);\r\n }\r\n else if (isString(value)) {\r\n return parseStringStyle(value);\r\n }\r\n else if (isArray(value)) {\r\n const res = {};\r\n for (let i = 0; i < value.length; i++) {\r\n const item = value[i];\r\n const normalized = isString(item)\r\n ? parseStringStyle(item)\r\n : normalizeStyle(item);\r\n if (normalized) {\r\n for (const key in normalized) {\r\n res[key] = normalized[key];\r\n }\r\n }\r\n }\r\n return res;\r\n }\r\n else {\r\n return normalizeStyle$1(value);\r\n }\r\n}\r\nfunction normalizeClass(value) {\r\n let res = '';\r\n const g = getGlobal();\r\n if (g && g.UTSJSONObject && value instanceof g.UTSJSONObject) {\r\n g.UTSJSONObject.keys(value).forEach((key) => {\r\n if (value[key]) {\r\n res += key + ' ';\r\n }\r\n });\r\n }\r\n else if (value instanceof Map) {\r\n value.forEach((value, key) => {\r\n if (value) {\r\n res += key + ' ';\r\n }\r\n });\r\n }\r\n else if (isArray(value)) {\r\n for (let i = 0; i < value.length; i++) {\r\n const normalized = normalizeClass(value[i]);\r\n if (normalized) {\r\n res += normalized + ' ';\r\n }\r\n }\r\n }\r\n else {\r\n res = normalizeClass$1(value);\r\n }\r\n return res.trim();\r\n}\r\nfunction normalizeProps(props) {\r\n if (!props)\r\n return null;\r\n let { class: klass, style } = props;\r\n if (klass && !isString(klass)) {\r\n props.class = normalizeClass(klass);\r\n }\r\n if (style) {\r\n props.style = normalizeStyle(style);\r\n }\r\n return props;\r\n}\r\n\r\nlet lastLogTime = 0;\r\nfunction formatLog(module, ...args) {\r\n const now = Date.now();\r\n const diff = lastLogTime ? now - lastLogTime : 0;\r\n lastLogTime = now;\r\n return `[${now}][${diff}ms][${module}]:${args\r\n .map((arg) => JSON.stringify(arg))\r\n .join(' ')}`;\r\n}\r\n\r\nfunction formatKey(key) {\r\n return camelize(key.substring(5));\r\n}\r\n// question/139181,增加副作用,避免 initCustomDataset 在 build 下被 tree-shaking\r\nconst initCustomDatasetOnce = /*#__PURE__*/ once((isBuiltInElement) => {\r\n isBuiltInElement =\r\n isBuiltInElement || ((el) => el.tagName.startsWith('UNI-'));\r\n const prototype = HTMLElement.prototype;\r\n const setAttribute = prototype.setAttribute;\r\n prototype.setAttribute = function (key, value) {\r\n if (key.startsWith('data-') && isBuiltInElement(this)) {\r\n const dataset = this.__uniDataset ||\r\n (this.__uniDataset = {});\r\n dataset[formatKey(key)] = value;\r\n }\r\n setAttribute.call(this, key, value);\r\n };\r\n const removeAttribute = prototype.removeAttribute;\r\n prototype.removeAttribute = function (key) {\r\n if (this.__uniDataset &&\r\n key.startsWith('data-') &&\r\n isBuiltInElement(this)) {\r\n delete this.__uniDataset[formatKey(key)];\r\n }\r\n removeAttribute.call(this, key);\r\n };\r\n});\r\nfunction getCustomDataset(el) {\r\n return extend({}, el.dataset, el.__uniDataset);\r\n}\r\n\r\nconst unitRE = new RegExp(`\"[^\"]+\"|'[^']+'|url\\\\([^)]+\\\\)|(\\\\d*\\\\.?\\\\d+)[r|u]px`, 'g');\r\nfunction toFixed(number, precision) {\r\n const multiplier = Math.pow(10, precision + 1);\r\n const wholeNumber = Math.floor(number * multiplier);\r\n return (Math.round(wholeNumber / 10) * 10) / multiplier;\r\n}\r\nconst defaultRpx2Unit = {\r\n unit: 'rem',\r\n unitRatio: 10 / 320,\r\n unitPrecision: 5,\r\n};\r\nconst defaultMiniProgramRpx2Unit = {\r\n unit: 'rpx',\r\n unitRatio: 1,\r\n unitPrecision: 1,\r\n};\r\nconst defaultNVueRpx2Unit = defaultMiniProgramRpx2Unit;\r\nfunction createRpx2Unit(unit, unitRatio, unitPrecision) {\r\n // ignore: rpxCalcIncludeWidth\r\n return (val) => val.replace(unitRE, (m, $1) => {\r\n if (!$1) {\r\n return m;\r\n }\r\n if (unitRatio === 1) {\r\n return `${$1}${unit}`;\r\n }\r\n const value = toFixed(parseFloat($1) * unitRatio, unitPrecision);\r\n return value === 0 ? '0' : `${value}${unit}`;\r\n });\r\n}\r\n\r\nfunction passive(passive) {\r\n return { passive };\r\n}\r\nfunction normalizeDataset(el) {\r\n // TODO\r\n return JSON.parse(JSON.stringify(el.dataset || {}));\r\n}\r\nfunction normalizeTarget(el) {\r\n const { id, offsetTop, offsetLeft } = el;\r\n return {\r\n id,\r\n dataset: getCustomDataset(el),\r\n offsetTop,\r\n offsetLeft,\r\n };\r\n}\r\nfunction addFont(family, source, desc) {\r\n const fonts = document.fonts;\r\n if (fonts) {\r\n const fontFace = new FontFace(family, source, desc);\r\n return fontFace.load().then(() => {\r\n fonts.add && fonts.add(fontFace);\r\n });\r\n }\r\n return new Promise((resolve) => {\r\n const style = document.createElement('style');\r\n const values = [];\r\n if (desc) {\r\n const { style, weight, stretch, unicodeRange, variant, featureSettings } = desc;\r\n style && values.push(`font-style:${style}`);\r\n weight && values.push(`font-weight:${weight}`);\r\n stretch && values.push(`font-stretch:${stretch}`);\r\n unicodeRange && values.push(`unicode-range:${unicodeRange}`);\r\n variant && values.push(`font-variant:${variant}`);\r\n featureSettings && values.push(`font-feature-settings:${featureSettings}`);\r\n }\r\n style.innerText = `@font-face{font-family:\"${family}\";src:${source};${values.join(';')}}`;\r\n document.head.appendChild(style);\r\n resolve();\r\n });\r\n}\r\nfunction scrollTo(scrollTop, duration, isH5) {\r\n if (isString(scrollTop)) {\r\n const el = document.querySelector(scrollTop);\r\n if (el) {\r\n const { top } = el.getBoundingClientRect();\r\n scrollTop = top + window.pageYOffset;\r\n // 如果存在,减去 高度\r\n const pageHeader = document.querySelector('uni-page-head');\r\n if (pageHeader) {\r\n scrollTop -= pageHeader.offsetHeight;\r\n }\r\n }\r\n }\r\n if (scrollTop < 0) {\r\n scrollTop = 0;\r\n }\r\n const documentElement = document.documentElement;\r\n const { clientHeight, scrollHeight } = documentElement;\r\n scrollTop = Math.min(scrollTop, scrollHeight - clientHeight);\r\n if (duration === 0) {\r\n // 部分浏览器(比如微信)中 scrollTop 的值需要通过 document.body 来控制\r\n documentElement.scrollTop = document.body.scrollTop = scrollTop;\r\n return;\r\n }\r\n if (window.scrollY === scrollTop) {\r\n return;\r\n }\r\n const scrollTo = (duration) => {\r\n if (duration <= 0) {\r\n window.scrollTo(0, scrollTop);\r\n return;\r\n }\r\n const distaince = scrollTop - window.scrollY;\r\n requestAnimationFrame(function () {\r\n window.scrollTo(0, window.scrollY + (distaince / duration) * 10);\r\n scrollTo(duration - 10);\r\n });\r\n };\r\n scrollTo(duration);\r\n}\r\n\r\nconst encode = encodeURIComponent;\r\nfunction stringifyQuery(obj, encodeStr = encode) {\r\n const res = obj\r\n ? Object.keys(obj)\r\n .map((key) => {\r\n let val = obj[key];\r\n if (typeof val === undefined || val === null) {\r\n val = '';\r\n }\r\n else if (isPlainObject(val)) {\r\n val = JSON.stringify(val);\r\n }\r\n return encodeStr(key) + '=' + encodeStr(val);\r\n })\r\n .filter((x) => x.length > 0)\r\n .join('&')\r\n : null;\r\n return res ? `?${res}` : '';\r\n}\r\n/**\r\n * Decode text using `decodeURIComponent`. Returns the original text if it\r\n * fails.\r\n *\r\n * @param text - string to decode\r\n * @returns decoded string\r\n */\r\nfunction decode(text) {\r\n try {\r\n return decodeURIComponent('' + text);\r\n }\r\n catch (err) { }\r\n return '' + text;\r\n}\r\nfunction decodedQuery(query = {}) {\r\n const decodedQuery = {};\r\n Object.keys(query).forEach((name) => {\r\n try {\r\n decodedQuery[name] = decode(query[name]);\r\n }\r\n catch (e) {\r\n decodedQuery[name] = query[name];\r\n }\r\n });\r\n return decodedQuery;\r\n}\r\nconst PLUS_RE = /\\+/g; // %2B\r\n/**\r\n * https://github.com/vuejs/vue-router-next/blob/master/src/query.ts\r\n * @internal\r\n *\r\n * @param search - search string to parse\r\n * @returns a query object\r\n */\r\nfunction parseQuery(search) {\r\n const query = {};\r\n // avoid creating an object with an empty key and empty value\r\n // because of split('&')\r\n if (search === '' || search === '?')\r\n return query;\r\n const hasLeadingIM = search[0] === '?';\r\n const searchParams = (hasLeadingIM ? search.slice(1) : search).split('&');\r\n for (let i = 0; i < searchParams.length; ++i) {\r\n // pre decode the + into space\r\n const searchParam = searchParams[i].replace(PLUS_RE, ' ');\r\n // allow the = character\r\n let eqPos = searchParam.indexOf('=');\r\n let key = decode(eqPos < 0 ? searchParam : searchParam.slice(0, eqPos));\r\n let value = eqPos < 0 ? null : decode(searchParam.slice(eqPos + 1));\r\n if (key in query) {\r\n // an extra variable for ts types\r\n let currentValue = query[key];\r\n if (!isArray(currentValue)) {\r\n currentValue = query[key] = [currentValue];\r\n }\r\n currentValue.push(value);\r\n }\r\n else {\r\n query[key] = value;\r\n }\r\n }\r\n return query;\r\n}\r\n\r\nfunction parseUrl(url) {\r\n const [path, querystring] = url.split('?', 2);\r\n return {\r\n path,\r\n query: parseQuery(querystring || ''),\r\n };\r\n}\r\n\r\nfunction parseNVueDataset(attr) {\r\n const dataset = {};\r\n if (attr) {\r\n Object.keys(attr).forEach((key) => {\r\n if (key.indexOf('data-') === 0) {\r\n dataset[key.replace('data-', '')] = attr[key];\r\n }\r\n });\r\n }\r\n return dataset;\r\n}\r\n\r\nfunction plusReady(callback) {\r\n if (!isFunction(callback)) {\r\n return;\r\n }\r\n if (window.plus) {\r\n return callback();\r\n }\r\n document.addEventListener('plusready', callback);\r\n}\r\n\r\nclass DOMException extends Error {\r\n constructor(message) {\r\n super(message);\r\n this.name = 'DOMException';\r\n }\r\n}\r\n\r\nfunction normalizeEventType(type, options) {\r\n if (options) {\r\n if (options.capture) {\r\n type += 'Capture';\r\n }\r\n if (options.once) {\r\n type += 'Once';\r\n }\r\n if (options.passive) {\r\n type += 'Passive';\r\n }\r\n }\r\n return `on${capitalize(camelize(type))}`;\r\n}\r\nclass UniEvent {\r\n constructor(type, opts) {\r\n this.defaultPrevented = false;\r\n this.timeStamp = Date.now();\r\n this._stop = false;\r\n this._end = false;\r\n this.type = type;\r\n this.bubbles = !!opts.bubbles;\r\n this.cancelable = !!opts.cancelable;\r\n }\r\n preventDefault() {\r\n this.defaultPrevented = true;\r\n }\r\n stopImmediatePropagation() {\r\n this._end = this._stop = true;\r\n }\r\n stopPropagation() {\r\n this._stop = true;\r\n }\r\n}\r\nfunction createUniEvent(evt) {\r\n if (evt instanceof UniEvent) {\r\n return evt;\r\n }\r\n const [type] = parseEventName(evt.type);\r\n const uniEvent = new UniEvent(type, {\r\n bubbles: false,\r\n cancelable: false,\r\n });\r\n extend(uniEvent, evt);\r\n return uniEvent;\r\n}\r\nclass UniEventTarget {\r\n constructor() {\r\n this.listeners = Object.create(null);\r\n }\r\n dispatchEvent(evt) {\r\n const listeners = this.listeners[evt.type];\r\n if (!listeners) {\r\n if ((process.env.NODE_ENV !== 'production')) {\r\n console.error(formatLog('dispatchEvent', this.nodeId), evt.type, 'not found');\r\n }\r\n return false;\r\n }\r\n // 格式化事件类型\r\n const event = createUniEvent(evt);\r\n const len = listeners.length;\r\n for (let i = 0; i < len; i++) {\r\n listeners[i].call(this, event);\r\n if (event._end) {\r\n break;\r\n }\r\n }\r\n return event.cancelable && event.defaultPrevented;\r\n }\r\n addEventListener(type, listener, options) {\r\n type = normalizeEventType(type, options);\r\n (this.listeners[type] || (this.listeners[type] = [])).push(listener);\r\n }\r\n removeEventListener(type, callback, options) {\r\n type = normalizeEventType(type, options);\r\n const listeners = this.listeners[type];\r\n if (!listeners) {\r\n return;\r\n }\r\n const index = listeners.indexOf(callback);\r\n if (index > -1) {\r\n listeners.splice(index, 1);\r\n }\r\n }\r\n}\r\nconst optionsModifierRE = /(?:Once|Passive|Capture)$/;\r\nfunction parseEventName(name) {\r\n let options;\r\n if (optionsModifierRE.test(name)) {\r\n options = {};\r\n let m;\r\n while ((m = name.match(optionsModifierRE))) {\r\n name = name.slice(0, name.length - m[0].length);\r\n options[m[0].toLowerCase()] = true;\r\n }\r\n }\r\n return [hyphenate(name.slice(2)), options];\r\n}\r\n\r\nconst EventModifierFlags = /*#__PURE__*/ (() => {\r\n return {\r\n stop: 1,\r\n prevent: 1 << 1,\r\n self: 1 << 2,\r\n };\r\n})();\r\nfunction encodeModifier(modifiers) {\r\n let flag = 0;\r\n if (modifiers.includes('stop')) {\r\n flag |= EventModifierFlags.stop;\r\n }\r\n if (modifiers.includes('prevent')) {\r\n flag |= EventModifierFlags.prevent;\r\n }\r\n if (modifiers.includes('self')) {\r\n flag |= EventModifierFlags.self;\r\n }\r\n return flag;\r\n}\r\n\r\nconst NODE_TYPE_PAGE = 0;\r\nconst NODE_TYPE_ELEMENT = 1;\r\nconst NODE_TYPE_TEXT = 3;\r\nconst NODE_TYPE_COMMENT = 8;\r\nfunction sibling(node, type) {\r\n const { parentNode } = node;\r\n if (!parentNode) {\r\n return null;\r\n }\r\n const { childNodes } = parentNode;\r\n return childNodes[childNodes.indexOf(node) + (type === 'n' ? 1 : -1)] || null;\r\n}\r\nfunction removeNode(node) {\r\n const { parentNode } = node;\r\n if (parentNode) {\r\n const { childNodes } = parentNode;\r\n const index = childNodes.indexOf(node);\r\n if (index > -1) {\r\n node.parentNode = null;\r\n childNodes.splice(index, 1);\r\n }\r\n }\r\n}\r\nfunction checkNodeId(node) {\r\n if (!node.nodeId && node.pageNode) {\r\n node.nodeId = node.pageNode.genId();\r\n }\r\n}\r\n// 为优化性能,各平台不使用proxy来实现node的操作拦截,而是直接通过pageNode定制\r\nclass UniNode extends UniEventTarget {\r\n constructor(nodeType, nodeName, container) {\r\n super();\r\n this.pageNode = null;\r\n this.parentNode = null;\r\n this._text = null;\r\n if (container) {\r\n const { pageNode } = container;\r\n if (pageNode) {\r\n this.pageNode = pageNode;\r\n this.nodeId = pageNode.genId();\r\n !pageNode.isUnmounted && pageNode.onCreate(this, nodeName);\r\n }\r\n }\r\n this.nodeType = nodeType;\r\n this.nodeName = nodeName;\r\n this.childNodes = [];\r\n }\r\n get firstChild() {\r\n return this.childNodes[0] || null;\r\n }\r\n get lastChild() {\r\n const { childNodes } = this;\r\n const length = childNodes.length;\r\n return length ? childNodes[length - 1] : null;\r\n }\r\n get nextSibling() {\r\n return sibling(this, 'n');\r\n }\r\n get nodeValue() {\r\n return null;\r\n }\r\n set nodeValue(_val) { }\r\n get textContent() {\r\n return this._text || '';\r\n }\r\n set textContent(text) {\r\n this._text = text;\r\n if (this.pageNode && !this.pageNode.isUnmounted) {\r\n this.pageNode.onTextContent(this, text);\r\n }\r\n }\r\n get parentElement() {\r\n const { parentNode } = this;\r\n if (parentNode && parentNode.nodeType === NODE_TYPE_ELEMENT) {\r\n return parentNode;\r\n }\r\n return null;\r\n }\r\n get previousSibling() {\r\n return sibling(this, 'p');\r\n }\r\n appendChild(newChild) {\r\n return this.insertBefore(newChild, null);\r\n }\r\n cloneNode(deep) {\r\n const cloned = extend(Object.create(Object.getPrototypeOf(this)), this);\r\n const { attributes } = cloned;\r\n if (attributes) {\r\n cloned.attributes = extend({}, attributes);\r\n }\r\n if (deep) {\r\n cloned.childNodes = cloned.childNodes.map((childNode) => childNode.cloneNode(true));\r\n }\r\n return cloned;\r\n }\r\n insertBefore(newChild, refChild) {\r\n // 先从现在的父节点移除(注意:不能触发onRemoveChild,否则会生成先remove该 id,再 insert)\r\n removeNode(newChild);\r\n newChild.pageNode = this.pageNode;\r\n newChild.parentNode = this;\r\n checkNodeId(newChild);\r\n const { childNodes } = this;\r\n if (refChild) {\r\n const index = childNodes.indexOf(refChild);\r\n if (index === -1) {\r\n throw new DOMException(`Failed to execute 'insertBefore' on 'Node': The node before which the new node is to be inserted is not a child of this node.`);\r\n }\r\n childNodes.splice(index, 0, newChild);\r\n }\r\n else {\r\n childNodes.push(newChild);\r\n }\r\n return this.pageNode && !this.pageNode.isUnmounted\r\n ? this.pageNode.onInsertBefore(this, newChild, refChild)\r\n : newChild;\r\n }\r\n removeChild(oldChild) {\r\n const { childNodes } = this;\r\n const index = childNodes.indexOf(oldChild);\r\n if (index === -1) {\r\n throw new DOMException(`Failed to execute 'removeChild' on 'Node': The node to be removed is not a child of this node.`);\r\n }\r\n oldChild.parentNode = null;\r\n childNodes.splice(index, 1);\r\n return this.pageNode && !this.pageNode.isUnmounted\r\n ? this.pageNode.onRemoveChild(oldChild)\r\n : oldChild;\r\n }\r\n}\r\nconst ATTR_CLASS = 'class';\r\nconst ATTR_STYLE = 'style';\r\nconst ATTR_INNER_HTML = 'innerHTML';\r\nconst ATTR_TEXT_CONTENT = 'textContent';\r\nconst ATTR_V_SHOW = '.vShow';\r\nconst ATTR_V_OWNER_ID = '.vOwnerId';\r\nconst ATTR_V_RENDERJS = '.vRenderjs';\r\nconst ATTR_CHANGE_PREFIX = 'change:';\r\nclass UniBaseNode extends UniNode {\r\n constructor(nodeType, nodeName, container) {\r\n super(nodeType, nodeName, container);\r\n this.attributes = Object.create(null);\r\n this.style = null;\r\n this.vShow = null;\r\n this._html = null;\r\n }\r\n get className() {\r\n return (this.attributes[ATTR_CLASS] || '');\r\n }\r\n set className(val) {\r\n this.setAttribute(ATTR_CLASS, val);\r\n }\r\n get innerHTML() {\r\n return '';\r\n }\r\n set innerHTML(html) {\r\n this._html = html;\r\n }\r\n addEventListener(type, listener, options) {\r\n super.addEventListener(type, listener, options);\r\n if (this.pageNode && !this.pageNode.isUnmounted) {\r\n if (listener.wxsEvent) {\r\n this.pageNode.onAddWxsEvent(this, normalizeEventType(type, options), listener.wxsEvent, encodeModifier(listener.modifiers || []));\r\n }\r\n else {\r\n this.pageNode.onAddEvent(this, normalizeEventType(type, options), encodeModifier(listener.modifiers || []));\r\n }\r\n }\r\n }\r\n removeEventListener(type, callback, options) {\r\n super.removeEventListener(type, callback, options);\r\n if (this.pageNode && !this.pageNode.isUnmounted) {\r\n this.pageNode.onRemoveEvent(this, normalizeEventType(type, options));\r\n }\r\n }\r\n getAttribute(qualifiedName) {\r\n if (qualifiedName === ATTR_STYLE) {\r\n return this.style;\r\n }\r\n return this.attributes[qualifiedName];\r\n }\r\n removeAttribute(qualifiedName) {\r\n if (qualifiedName == ATTR_STYLE) {\r\n this.style = null;\r\n }\r\n else {\r\n delete this.attributes[qualifiedName];\r\n }\r\n if (this.pageNode && !this.pageNode.isUnmounted) {\r\n this.pageNode.onRemoveAttribute(this, qualifiedName);\r\n }\r\n }\r\n setAttribute(qualifiedName, value) {\r\n if (qualifiedName === ATTR_STYLE) {\r\n this.style = value;\r\n }\r\n else {\r\n this.attributes[qualifiedName] = value;\r\n }\r\n if (this.pageNode && !this.pageNode.isUnmounted) {\r\n this.pageNode.onSetAttribute(this, qualifiedName, value);\r\n }\r\n }\r\n toJSON({ attr, normalize, } = {}) {\r\n const { attributes, style, listeners, _text } = this;\r\n const res = {};\r\n if (Object.keys(attributes).length) {\r\n res.a = normalize ? normalize(attributes) : attributes;\r\n }\r\n const events = Object.keys(listeners);\r\n if (events.length) {\r\n let w = undefined;\r\n const e = {};\r\n events.forEach((name) => {\r\n const handlers = listeners[name];\r\n if (handlers.length) {\r\n // 可能存在多个 handler 且不同 modifiers 吗?\r\n const { wxsEvent, modifiers } = handlers[0];\r\n const modifier = encodeModifier(modifiers || []);\r\n if (!wxsEvent) {\r\n e[name] = modifier;\r\n }\r\n else {\r\n if (!w) {\r\n w = {};\r\n }\r\n w[name] = [normalize ? normalize(wxsEvent) : wxsEvent, modifier];\r\n }\r\n }\r\n });\r\n res.e = normalize ? normalize(e, false) : e;\r\n if (w) {\r\n res.w = normalize ? normalize(w, false) : w;\r\n }\r\n }\r\n if (style !== null) {\r\n res.s = normalize ? normalize(style) : style;\r\n }\r\n if (!attr) {\r\n res.i = this.nodeId;\r\n res.n = this.nodeName;\r\n }\r\n if (_text !== null) {\r\n res.t = normalize ? normalize(_text) : _text;\r\n }\r\n return res;\r\n }\r\n}\r\n\r\nclass UniCommentNode extends UniNode {\r\n constructor(text, container) {\r\n super(NODE_TYPE_COMMENT, '#comment', container);\r\n this._text = (process.env.NODE_ENV !== 'production') ? text : '';\r\n }\r\n toJSON(opts = {}) {\r\n // 暂时不传递 text 到 view 层,没啥意义,节省点数据量\r\n return opts.attr\r\n ? {}\r\n : {\r\n i: this.nodeId,\r\n };\r\n // return opts.attr\r\n // ? { t: this._text as string }\r\n // : {\r\n // i: this.nodeId!,\r\n // t: this._text as string,\r\n // }\r\n }\r\n}\r\n\r\nclass UniElement extends UniBaseNode {\r\n constructor(nodeName, container) {\r\n super(NODE_TYPE_ELEMENT, nodeName.toUpperCase(), container);\r\n this.tagName = this.nodeName;\r\n }\r\n}\r\nclass UniInputElement extends UniElement {\r\n get value() {\r\n return this.getAttribute('value');\r\n }\r\n set value(val) {\r\n this.setAttribute('value', val);\r\n }\r\n}\r\nclass UniTextAreaElement extends UniInputElement {\r\n}\r\n\r\nclass UniTextNode extends UniBaseNode {\r\n constructor(text, container) {\r\n super(NODE_TYPE_TEXT, '#text', container);\r\n this._text = text;\r\n }\r\n get nodeValue() {\r\n return this._text || '';\r\n }\r\n set nodeValue(text) {\r\n this._text = text;\r\n if (this.pageNode && !this.pageNode.isUnmounted) {\r\n this.pageNode.onNodeValue(this, text);\r\n }\r\n }\r\n}\r\n\r\nconst forcePatchProps = {\r\n AD: ['data'],\r\n 'AD-DRAW': ['data'],\r\n 'LIVE-PLAYER': ['picture-in-picture-mode'],\r\n MAP: [\r\n 'markers',\r\n 'polyline',\r\n 'circles',\r\n 'controls',\r\n 'include-points',\r\n 'polygons',\r\n ],\r\n PICKER: ['range', 'value'],\r\n 'PICKER-VIEW': ['value'],\r\n 'RICH-TEXT': ['nodes'],\r\n VIDEO: ['danmu-list', 'header'],\r\n 'WEB-VIEW': ['webview-styles'],\r\n};\r\nconst forcePatchPropKeys = ['animation'];\r\n\r\nconst forcePatchProp = (el, key) => {\r\n if (forcePatchPropKeys.indexOf(key) > -1) {\r\n return true;\r\n }\r\n const keys = forcePatchProps[el.nodeName];\r\n if (keys && keys.indexOf(key) > -1) {\r\n return true;\r\n }\r\n return false;\r\n};\r\n\r\nconst ACTION_TYPE_PAGE_CREATE = 1;\r\nconst ACTION_TYPE_PAGE_CREATED = 2;\r\nconst ACTION_TYPE_CREATE = 3;\r\nconst ACTION_TYPE_INSERT = 4;\r\nconst ACTION_TYPE_REMOVE = 5;\r\nconst ACTION_TYPE_SET_ATTRIBUTE = 6;\r\nconst ACTION_TYPE_REMOVE_ATTRIBUTE = 7;\r\nconst ACTION_TYPE_ADD_EVENT = 8;\r\nconst ACTION_TYPE_REMOVE_EVENT = 9;\r\nconst ACTION_TYPE_SET_TEXT = 10;\r\nconst ACTION_TYPE_ADD_WXS_EVENT = 12;\r\nconst ACTION_TYPE_PAGE_SCROLL = 15;\r\nconst ACTION_TYPE_EVENT = 20;\r\n\r\n/**\r\n * 需要手动传入 timer,主要是解决 App 平台的定制 timer\r\n */\r\nfunction debounce(fn, delay, { clearTimeout, setTimeout }) {\r\n let timeout;\r\n const newFn = function () {\r\n clearTimeout(timeout);\r\n const timerFn = () => fn.apply(this, arguments);\r\n timeout = setTimeout(timerFn, delay);\r\n };\r\n newFn.cancel = function () {\r\n clearTimeout(timeout);\r\n };\r\n return newFn;\r\n}\r\n\r\nclass EventChannel {\r\n constructor(id, events) {\r\n this.id = id;\r\n this.listener = {};\r\n this.emitCache = [];\r\n if (events) {\r\n Object.keys(events).forEach((name) => {\r\n this.on(name, events[name]);\r\n });\r\n }\r\n }\r\n emit(eventName, ...args) {\r\n const fns = this.listener[eventName];\r\n if (!fns) {\r\n return this.emitCache.push({\r\n eventName,\r\n args,\r\n });\r\n }\r\n fns.forEach((opt) => {\r\n opt.fn.apply(opt.fn, args);\r\n });\r\n this.listener[eventName] = fns.filter((opt) => opt.type !== 'once');\r\n }\r\n on(eventName, fn) {\r\n this._addListener(eventName, 'on', fn);\r\n this._clearCache(eventName);\r\n }\r\n once(eventName, fn) {\r\n this._addListener(eventName, 'once', fn);\r\n this._clearCache(eventName);\r\n }\r\n off(eventName, fn) {\r\n const fns = this.listener[eventName];\r\n if (!fns) {\r\n return;\r\n }\r\n if (fn) {\r\n for (let i = 0; i < fns.length;) {\r\n if (fns[i].fn === fn) {\r\n fns.splice(i, 1);\r\n i--;\r\n }\r\n i++;\r\n }\r\n }\r\n else {\r\n delete this.listener[eventName];\r\n }\r\n }\r\n _clearCache(eventName) {\r\n for (let index = 0; index < this.emitCache.length; index++) {\r\n const cache = this.emitCache[index];\r\n const _name = eventName\r\n ? cache.eventName === eventName\r\n ? eventName\r\n : null\r\n : cache.eventName;\r\n if (!_name)\r\n continue;\r\n const location = this.emit.apply(this, [_name, ...cache.args]);\r\n if (typeof location === 'number') {\r\n this.emitCache.pop();\r\n continue;\r\n }\r\n this.emitCache.splice(index, 1);\r\n index--;\r\n }\r\n }\r\n _addListener(eventName, type, fn) {\r\n (this.listener[eventName] || (this.listener[eventName] = [])).push({\r\n fn,\r\n type,\r\n });\r\n }\r\n}\r\n\r\nconst PAGE_HOOKS = [\r\n ON_INIT,\r\n ON_LOAD,\r\n ON_SHOW,\r\n ON_HIDE,\r\n ON_UNLOAD,\r\n ON_BACK_PRESS,\r\n ON_PAGE_SCROLL,\r\n ON_TAB_ITEM_TAP,\r\n ON_REACH_BOTTOM,\r\n ON_PULL_DOWN_REFRESH,\r\n ON_SHARE_TIMELINE,\r\n ON_SHARE_APP_MESSAGE,\r\n ON_SHARE_CHAT,\r\n ON_ADD_TO_FAVORITES,\r\n ON_SAVE_EXIT_STATE,\r\n ON_NAVIGATION_BAR_BUTTON_TAP,\r\n ON_NAVIGATION_BAR_SEARCH_INPUT_CLICKED,\r\n ON_NAVIGATION_BAR_SEARCH_INPUT_CHANGED,\r\n ON_NAVIGATION_BAR_SEARCH_INPUT_CONFIRMED,\r\n ON_NAVIGATION_BAR_SEARCH_INPUT_FOCUS_CHANGED,\r\n];\r\nfunction isRootImmediateHook(name) {\r\n const PAGE_SYNC_HOOKS = [ON_LOAD, ON_SHOW];\r\n return PAGE_SYNC_HOOKS.indexOf(name) > -1;\r\n}\r\n// isRootImmediateHookX deprecated\r\nfunction isRootHook(name) {\r\n return PAGE_HOOKS.indexOf(name) > -1;\r\n}\r\nconst UniLifecycleHooks = [\r\n ON_SHOW,\r\n ON_HIDE,\r\n ON_LAUNCH,\r\n ON_ERROR,\r\n ON_THEME_CHANGE,\r\n ON_PAGE_NOT_FOUND,\r\n ON_UNHANDLE_REJECTION,\r\n ON_EXIT,\r\n ON_INIT,\r\n ON_LOAD,\r\n ON_READY,\r\n ON_UNLOAD,\r\n ON_RESIZE,\r\n ON_BACK_PRESS,\r\n ON_PAGE_SCROLL,\r\n ON_TAB_ITEM_TAP,\r\n ON_REACH_BOTTOM,\r\n ON_PULL_DOWN_REFRESH,\r\n ON_SHARE_TIMELINE,\r\n ON_ADD_TO_FAVORITES,\r\n ON_SHARE_APP_MESSAGE,\r\n ON_SHARE_CHAT,\r\n ON_SAVE_EXIT_STATE,\r\n ON_NAVIGATION_BAR_BUTTON_TAP,\r\n ON_NAVIGATION_BAR_SEARCH_INPUT_CLICKED,\r\n ON_NAVIGATION_BAR_SEARCH_INPUT_CHANGED,\r\n ON_NAVIGATION_BAR_SEARCH_INPUT_CONFIRMED,\r\n ON_NAVIGATION_BAR_SEARCH_INPUT_FOCUS_CHANGED,\r\n];\r\nconst MINI_PROGRAM_PAGE_RUNTIME_HOOKS = /*#__PURE__*/ (() => {\r\n return {\r\n onPageScroll: 1,\r\n onShareAppMessage: 1 << 1,\r\n onShareTimeline: 1 << 2,\r\n };\r\n})();\r\nfunction isUniLifecycleHook(name, value, checkType = true) {\r\n // 检查类型\r\n if (checkType && !isFunction(value)) {\r\n return false;\r\n }\r\n if (UniLifecycleHooks.indexOf(name) > -1) {\r\n // 已预定义\r\n return true;\r\n }\r\n else if (name.indexOf('on') === 0) {\r\n // 以 on 开头\r\n return true;\r\n }\r\n return false;\r\n}\r\n\r\nlet vueApp;\r\nconst createVueAppHooks = [];\r\n/**\r\n * 提供 createApp 的回调事件,方便三方插件接收 App 对象,处理挂靠全局 mixin 之类的逻辑\r\n */\r\nfunction onCreateVueApp(hook) {\r\n // TODO 每个 nvue 页面都会触发\r\n if (vueApp) {\r\n return hook(vueApp);\r\n }\r\n createVueAppHooks.push(hook);\r\n}\r\nfunction invokeCreateVueAppHook(app) {\r\n vueApp = app;\r\n createVueAppHooks.forEach((hook) => hook(app));\r\n}\r\nconst invokeCreateErrorHandler = once((app, createErrorHandler) => {\r\n // 不再判断开发者是否监听了onError,直接返回 createErrorHandler,内部 errorHandler 会调用开发者自定义的 errorHandler,以及判断开发者是否监听了onError\r\n return createErrorHandler(app);\r\n});\r\n\r\nconst E = function () {\r\n // Keep this empty so it's easier to inherit from\r\n // (via https://github.com/lipsmack from https://github.com/scottcorgan/tiny-emitter/issues/3)\r\n};\r\nE.prototype = {\r\n _id: 1,\r\n on: function (name, callback, ctx) {\r\n var e = this.e || (this.e = {});\r\n (e[name] || (e[name] = [])).push({\r\n fn: callback,\r\n ctx: ctx,\r\n _id: this._id,\r\n });\r\n return this._id++;\r\n },\r\n once: function (name, callback, ctx) {\r\n var self = this;\r\n function listener() {\r\n self.off(name, listener);\r\n callback.apply(ctx, arguments);\r\n }\r\n listener._ = callback;\r\n return this.on(name, listener, ctx);\r\n },\r\n emit: function (name) {\r\n var data = [].slice.call(arguments, 1);\r\n var evtArr = ((this.e || (this.e = {}))[name] || []).slice();\r\n var i = 0;\r\n var len = evtArr.length;\r\n for (i; i < len; i++) {\r\n evtArr[i].fn.apply(evtArr[i].ctx, data);\r\n }\r\n return this;\r\n },\r\n off: function (name, event) {\r\n var e = this.e || (this.e = {});\r\n var evts = e[name];\r\n var liveEvents = [];\r\n if (evts && event) {\r\n for (var i = evts.length - 1; i >= 0; i--) {\r\n if (evts[i].fn === event ||\r\n evts[i].fn._ === event ||\r\n evts[i]._id === event) {\r\n evts.splice(i, 1);\r\n break;\r\n }\r\n }\r\n liveEvents = evts;\r\n }\r\n // Remove event from queue to prevent memory leak\r\n // Suggested by https://github.com/lazd\r\n // Ref: https://github.com/scottcorgan/tiny-emitter/commit/c6ebfaa9bc973b33d110a84a307742b7cf94c953#commitcomment-5024910\r\n liveEvents.length ? (e[name] = liveEvents) : delete e[name];\r\n return this;\r\n },\r\n};\r\nvar E$1 = E;\r\n\r\nconst borderStyles = {\r\n black: 'rgba(0,0,0,0.4)',\r\n white: 'rgba(255,255,255,0.4)',\r\n};\r\nfunction normalizeTabBarStyles(borderStyle) {\r\n if (borderStyle && borderStyle in borderStyles) {\r\n return borderStyles[borderStyle];\r\n }\r\n return borderStyle;\r\n}\r\nfunction normalizeTitleColor(titleColor) {\r\n return titleColor === 'black' ? '#000000' : '#ffffff';\r\n}\r\nfunction resolveStringStyleItem(modeStyle, styleItem, key) {\r\n if (isString(styleItem) && styleItem.startsWith('@')) {\r\n const _key = styleItem.replace('@', '');\r\n let _styleItem = modeStyle[_key] || styleItem;\r\n switch (key) {\r\n case 'titleColor':\r\n _styleItem = normalizeTitleColor(_styleItem);\r\n break;\r\n case 'borderStyle':\r\n _styleItem = normalizeTabBarStyles(_styleItem);\r\n break;\r\n }\r\n return _styleItem;\r\n }\r\n return styleItem;\r\n}\r\nfunction normalizeStyles(pageStyle, themeConfig = {}, mode = 'light') {\r\n const modeStyle = themeConfig[mode];\r\n const styles = {};\r\n if (typeof modeStyle === 'undefined' || !pageStyle)\r\n return pageStyle;\r\n Object.keys(pageStyle).forEach((key) => {\r\n const styleItem = pageStyle[key]; // Object Array String\r\n const parseStyleItem = () => {\r\n if (isPlainObject(styleItem))\r\n return normalizeStyles(styleItem, themeConfig, mode);\r\n if (isArray(styleItem))\r\n return styleItem.map((item) => {\r\n if (typeof item === 'object')\r\n return normalizeStyles(item, themeConfig, mode);\r\n return resolveStringStyleItem(modeStyle, item);\r\n });\r\n return resolveStringStyleItem(modeStyle, styleItem, key);\r\n };\r\n styles[key] = parseStyleItem();\r\n });\r\n return styles;\r\n}\r\n\r\nfunction getEnvLocale() {\r\n const { env } = process;\r\n const lang = env.LC_ALL || env.LC_MESSAGES || env.LANG || env.LANGUAGE;\r\n return (lang && lang.replace(/[.:].*/, '')) || 'en';\r\n}\r\n\r\nexport { ACTION_TYPE_ADD_EVENT, ACTION_TYPE_ADD_WXS_EVENT, ACTION_TYPE_CREATE, ACTION_TYPE_EVENT, ACTION_TYPE_INSERT, ACTION_TYPE_PAGE_CREATE, ACTION_TYPE_PAGE_CREATED, ACTION_TYPE_PAGE_SCROLL, ACTION_TYPE_REMOVE, ACTION_TYPE_REMOVE_ATTRIBUTE, ACTION_TYPE_REMOVE_EVENT, ACTION_TYPE_SET_ATTRIBUTE, ACTION_TYPE_SET_TEXT, ATTR_CHANGE_PREFIX, ATTR_CLASS, ATTR_INNER_HTML, ATTR_STYLE, ATTR_TEXT_CONTENT, ATTR_V_OWNER_ID, ATTR_V_RENDERJS, ATTR_V_SHOW, BACKGROUND_COLOR, BUILT_IN_TAGS, BUILT_IN_TAG_NAMES, COMPONENT_NAME_PREFIX, COMPONENT_PREFIX, COMPONENT_SELECTOR_PREFIX, DATA_RE, E$1 as Emitter, EventChannel, EventModifierFlags, I18N_JSON_DELIMITERS, JSON_PROTOCOL, LINEFEED, MINI_PROGRAM_PAGE_RUNTIME_HOOKS, NAVBAR_HEIGHT, NODE_TYPE_COMMENT, NODE_TYPE_ELEMENT, NODE_TYPE_PAGE, NODE_TYPE_TEXT, NVUE_BUILT_IN_TAGS, NVUE_U_BUILT_IN_TAGS, OFF_HOST_THEME_CHANGE, OFF_THEME_CHANGE, ON_ADD_TO_FAVORITES, ON_APP_ENTER_BACKGROUND, ON_APP_ENTER_FOREGROUND, ON_BACK_PRESS, ON_ERROR, ON_EXIT, ON_HIDE, ON_HOST_THEME_CHANGE, ON_INIT, ON_KEYBOARD_HEIGHT_CHANGE, ON_LAUNCH, ON_LOAD, ON_NAVIGATION_BAR_BUTTON_TAP, ON_NAVIGATION_BAR_CHANGE, ON_NAVIGATION_BAR_SEARCH_INPUT_CHANGED, ON_NAVIGATION_BAR_SEARCH_INPUT_CLICKED, ON_NAVIGATION_BAR_SEARCH_INPUT_CONFIRMED, ON_NAVIGATION_BAR_SEARCH_INPUT_FOCUS_CHANGED, ON_PAGE_NOT_FOUND, ON_PAGE_SCROLL, ON_PULL_DOWN_REFRESH, ON_REACH_BOTTOM, ON_REACH_BOTTOM_DISTANCE, ON_READY, ON_RESIZE, ON_SAVE_EXIT_STATE, ON_SHARE_APP_MESSAGE, ON_SHARE_CHAT, ON_SHARE_TIMELINE, ON_SHOW, ON_TAB_ITEM_TAP, ON_THEME_CHANGE, ON_UNHANDLE_REJECTION, ON_UNLOAD, ON_WEB_INVOKE_APP_SERVICE, ON_WXS_INVOKE_CALL_METHOD, PLUS_RE, PRIMARY_COLOR, RENDERJS_MODULES, RESPONSIVE_MIN_WIDTH, SCHEME_RE, SELECTED_COLOR, SLOT_DEFAULT_NAME, TABBAR_HEIGHT, TAGS, UNI_SSR, UNI_SSR_DATA, UNI_SSR_GLOBAL_DATA, UNI_SSR_STORE, UNI_SSR_TITLE, UNI_STORAGE_LOCALE, UNI_UI_CONFLICT_TAGS, UVUE_BUILT_IN_TAGS, UVUE_IOS_BUILT_IN_TAGS, UVUE_WEB_BUILT_IN_TAGS, UniBaseNode, UniCommentNode, UniElement, UniEvent, UniInputElement, UniLifecycleHooks, UniNode, UniTextAreaElement, UniTextNode, VIRTUAL_HOST_CLASS, VIRTUAL_HOST_HIDDEN, VIRTUAL_HOST_ID, VIRTUAL_HOST_STYLE, WEB_INVOKE_APPSERVICE, WXS_MODULES, WXS_PROTOCOL, addFont, addLeadingSlash, borderStyles, cache, cacheStringFunction, callOptions, createIsCustomElement, createRpx2Unit, createUniEvent, customizeEvent, debounce, decode, decodedQuery, defaultMiniProgramRpx2Unit, defaultNVueRpx2Unit, defaultRpx2Unit, dynamicSlotName, forcePatchProp, formatDateTime, formatLog, getCustomDataset, getEnvLocale, getGlobal, getLen, getValueByDataPath, initCustomDatasetOnce, invokeArrayFns, invokeCreateErrorHandler, invokeCreateVueAppHook, isAppIOSUVueNativeTag, isAppNVueNativeTag, isAppNativeTag, isAppUVueBuiltInEasyComponent, isAppUVueNativeTag, isBuiltInComponent, isComponentInternalInstance, isComponentTag, isH5CustomElement, isH5NativeTag, isMiniProgramNativeTag, isMiniProgramUVueNativeTag, isRootHook, isRootImmediateHook, isUniLifecycleHook, isUniXElement, normalizeClass, normalizeDataset, normalizeEventType, normalizeProps, normalizeStyle, normalizeStyles, normalizeTabBarStyles, normalizeTarget, normalizeTitleColor, onCreateVueApp, once, parseEventName, parseNVueDataset, parseQuery, parseUrl, passive, plusReady, removeLeadingSlash, resolveComponentInstance, resolveOwnerEl, resolveOwnerVm, sanitise, scrollTo, sortObject, stringifyQuery, updateElementStyle };\r\n","import { isRootHook, getValueByDataPath, isUniLifecycleHook, ON_ERROR, UniLifecycleHooks, invokeCreateErrorHandler, dynamicSlotName } from '@dcloudio/uni-shared';\r\nimport { NOOP, extend, isSymbol, isObject, def, hasChanged, isFunction, isArray, isPromise, camelize, capitalize, EMPTY_OBJ, remove, toHandlerKey, hasOwn, hyphenate, isReservedProp, toRawType, isString, normalizeClass, normalizeStyle, isOn, toTypeString, isMap, isIntegerKey, isSet, isPlainObject, makeMap, invokeArrayFns, isBuiltInDirective, looseToNumber, NO, EMPTY_ARR, isModelListener, toNumber, toDisplayString } from '@vue/shared';\r\nexport { EMPTY_OBJ, camelize, normalizeClass, normalizeProps, normalizeStyle, toDisplayString, toHandlerKey } from '@vue/shared';\r\n\r\n/**\r\n* @dcloudio/uni-mp-vue v3.4.21\r\n* (c) 2018-present Yuxi (Evan) You and Vue contributors\r\n* @license MIT\r\n**/\r\n\r\nfunction warn$2(msg, ...args) {\r\n console.warn(`[Vue warn] ${msg}`, ...args);\r\n}\r\n\r\nlet activeEffectScope;\r\nclass EffectScope {\r\n constructor(detached = false) {\r\n this.detached = detached;\r\n /**\r\n * @internal\r\n */\r\n this._active = true;\r\n /**\r\n * @internal\r\n */\r\n this.effects = [];\r\n /**\r\n * @internal\r\n */\r\n this.cleanups = [];\r\n this.parent = activeEffectScope;\r\n if (!detached && activeEffectScope) {\r\n this.index = (activeEffectScope.scopes || (activeEffectScope.scopes = [])).push(\r\n this\r\n ) - 1;\r\n }\r\n }\r\n get active() {\r\n return this._active;\r\n }\r\n run(fn) {\r\n if (this._active) {\r\n const currentEffectScope = activeEffectScope;\r\n try {\r\n activeEffectScope = this;\r\n return fn();\r\n } finally {\r\n activeEffectScope = currentEffectScope;\r\n }\r\n } else if (!!(process.env.NODE_ENV !== \"production\")) {\r\n warn$2(`cannot run an inactive effect scope.`);\r\n }\r\n }\r\n /**\r\n * This should only be called on non-detached scopes\r\n * @internal\r\n */\r\n on() {\r\n activeEffectScope = this;\r\n }\r\n /**\r\n * This should only be called on non-detached scopes\r\n * @internal\r\n */\r\n off() {\r\n activeEffectScope = this.parent;\r\n }\r\n stop(fromParent) {\r\n if (this._active) {\r\n let i, l;\r\n for (i = 0, l = this.effects.length; i < l; i++) {\r\n this.effects[i].stop();\r\n }\r\n for (i = 0, l = this.cleanups.length; i < l; i++) {\r\n this.cleanups[i]();\r\n }\r\n if (this.scopes) {\r\n for (i = 0, l = this.scopes.length; i < l; i++) {\r\n this.scopes[i].stop(true);\r\n }\r\n }\r\n if (!this.detached && this.parent && !fromParent) {\r\n const last = this.parent.scopes.pop();\r\n if (last && last !== this) {\r\n this.parent.scopes[this.index] = last;\r\n last.index = this.index;\r\n }\r\n }\r\n this.parent = void 0;\r\n this._active = false;\r\n }\r\n }\r\n}\r\nfunction effectScope(detached) {\r\n return new EffectScope(detached);\r\n}\r\nfunction recordEffectScope(effect, scope = activeEffectScope) {\r\n if (scope && scope.active) {\r\n scope.effects.push(effect);\r\n }\r\n}\r\nfunction getCurrentScope() {\r\n return activeEffectScope;\r\n}\r\nfunction onScopeDispose(fn) {\r\n if (activeEffectScope) {\r\n activeEffectScope.cleanups.push(fn);\r\n } else if (!!(process.env.NODE_ENV !== \"production\")) {\r\n warn$2(\r\n `onScopeDispose() is called when there is no active effect scope to be associated with.`\r\n );\r\n }\r\n}\r\n\r\nlet activeEffect;\r\nclass ReactiveEffect {\r\n constructor(fn, trigger, scheduler, scope) {\r\n this.fn = fn;\r\n this.trigger = trigger;\r\n this.scheduler = scheduler;\r\n this.active = true;\r\n this.deps = [];\r\n /**\r\n * @internal\r\n */\r\n this._dirtyLevel = 4;\r\n /**\r\n * @internal\r\n */\r\n this._trackId = 0;\r\n /**\r\n * @internal\r\n */\r\n this._runnings = 0;\r\n /**\r\n * @internal\r\n */\r\n this._shouldSchedule = false;\r\n /**\r\n * @internal\r\n */\r\n this._depsLength = 0;\r\n recordEffectScope(this, scope);\r\n }\r\n get dirty() {\r\n if (this._dirtyLevel === 2 || this._dirtyLevel === 3) {\r\n this._dirtyLevel = 1;\r\n pauseTracking();\r\n for (let i = 0; i < this._depsLength; i++) {\r\n const dep = this.deps[i];\r\n if (dep.computed) {\r\n triggerComputed(dep.computed);\r\n if (this._dirtyLevel >= 4) {\r\n break;\r\n }\r\n }\r\n }\r\n if (this._dirtyLevel === 1) {\r\n this._dirtyLevel = 0;\r\n }\r\n resetTracking();\r\n }\r\n return this._dirtyLevel >= 4;\r\n }\r\n set dirty(v) {\r\n this._dirtyLevel = v ? 4 : 0;\r\n }\r\n run() {\r\n this._dirtyLevel = 0;\r\n if (!this.active) {\r\n return this.fn();\r\n }\r\n let lastShouldTrack = shouldTrack;\r\n let lastEffect = activeEffect;\r\n try {\r\n shouldTrack = true;\r\n activeEffect = this;\r\n this._runnings++;\r\n preCleanupEffect(this);\r\n return this.fn();\r\n } finally {\r\n postCleanupEffect(this);\r\n this._runnings--;\r\n activeEffect = lastEffect;\r\n shouldTrack = lastShouldTrack;\r\n }\r\n }\r\n stop() {\r\n var _a;\r\n if (this.active) {\r\n preCleanupEffect(this);\r\n postCleanupEffect(this);\r\n (_a = this.onStop) == null ? void 0 : _a.call(this);\r\n this.active = false;\r\n }\r\n }\r\n}\r\nfunction triggerComputed(computed) {\r\n return computed.value;\r\n}\r\nfunction preCleanupEffect(effect2) {\r\n effect2._trackId++;\r\n effect2._depsLength = 0;\r\n}\r\nfunction postCleanupEffect(effect2) {\r\n if (effect2.deps.length > effect2._depsLength) {\r\n for (let i = effect2._depsLength; i < effect2.deps.length; i++) {\r\n cleanupDepEffect(effect2.deps[i], effect2);\r\n }\r\n effect2.deps.length = effect2._depsLength;\r\n }\r\n}\r\nfunction cleanupDepEffect(dep, effect2) {\r\n const trackId = dep.get(effect2);\r\n if (trackId !== void 0 && effect2._trackId !== trackId) {\r\n dep.delete(effect2);\r\n if (dep.size === 0) {\r\n dep.cleanup();\r\n }\r\n }\r\n}\r\nfunction effect(fn, options) {\r\n if (fn.effect instanceof ReactiveEffect) {\r\n fn = fn.effect.fn;\r\n }\r\n const _effect = new ReactiveEffect(fn, NOOP, () => {\r\n if (_effect.dirty) {\r\n _effect.run();\r\n }\r\n });\r\n if (options) {\r\n extend(_effect, options);\r\n if (options.scope)\r\n recordEffectScope(_effect, options.scope);\r\n }\r\n if (!options || !options.lazy) {\r\n _effect.run();\r\n }\r\n const runner = _effect.run.bind(_effect);\r\n runner.effect = _effect;\r\n return runner;\r\n}\r\nfunction stop(runner) {\r\n runner.effect.stop();\r\n}\r\nlet shouldTrack = true;\r\nlet pauseScheduleStack = 0;\r\nconst trackStack = [];\r\nfunction pauseTracking() {\r\n trackStack.push(shouldTrack);\r\n shouldTrack = false;\r\n}\r\nfunction resetTracking() {\r\n const last = trackStack.pop();\r\n shouldTrack = last === void 0 ? true : last;\r\n}\r\nfunction pauseScheduling() {\r\n pauseScheduleStack++;\r\n}\r\nfunction resetScheduling() {\r\n pauseScheduleStack--;\r\n while (!pauseScheduleStack && queueEffectSchedulers.length) {\r\n queueEffectSchedulers.shift()();\r\n }\r\n}\r\nfunction trackEffect(effect2, dep, debuggerEventExtraInfo) {\r\n var _a;\r\n if (dep.get(effect2) !== effect2._trackId) {\r\n dep.set(effect2, effect2._trackId);\r\n const oldDep = effect2.deps[effect2._depsLength];\r\n if (oldDep !== dep) {\r\n if (oldDep) {\r\n cleanupDepEffect(oldDep, effect2);\r\n }\r\n effect2.deps[effect2._depsLength++] = dep;\r\n } else {\r\n effect2._depsLength++;\r\n }\r\n if (!!(process.env.NODE_ENV !== \"production\")) {\r\n (_a = effect2.onTrack) == null ? void 0 : _a.call(effect2, extend({ effect: effect2 }, debuggerEventExtraInfo));\r\n }\r\n }\r\n}\r\nconst queueEffectSchedulers = [];\r\nfunction triggerEffects(dep, dirtyLevel, debuggerEventExtraInfo) {\r\n var _a;\r\n pauseScheduling();\r\n for (const effect2 of dep.keys()) {\r\n let tracking;\r\n if (effect2._dirtyLevel < dirtyLevel && (tracking != null ? tracking : tracking = dep.get(effect2) === effect2._trackId)) {\r\n effect2._shouldSchedule || (effect2._shouldSchedule = effect2._dirtyLevel === 0);\r\n effect2._dirtyLevel = dirtyLevel;\r\n }\r\n if (effect2._shouldSchedule && (tracking != null ? tracking : tracking = dep.get(effect2) === effect2._trackId)) {\r\n if (!!(process.env.NODE_ENV !== \"production\")) {\r\n (_a = effect2.onTrigger) == null ? void 0 : _a.call(effect2, extend({ effect: effect2 }, debuggerEventExtraInfo));\r\n }\r\n effect2.trigger();\r\n if ((!effect2._runnings || effect2.allowRecurse) && effect2._dirtyLevel !== 2) {\r\n effect2._shouldSchedule = false;\r\n if (effect2.scheduler) {\r\n queueEffectSchedulers.push(effect2.scheduler);\r\n }\r\n }\r\n }\r\n }\r\n resetScheduling();\r\n}\r\n\r\nconst createDep = (cleanup, computed) => {\r\n const dep = /* @__PURE__ */ new Map();\r\n dep.cleanup = cleanup;\r\n dep.computed = computed;\r\n return dep;\r\n};\r\n\r\nconst targetMap = /* @__PURE__ */ new WeakMap();\r\nconst ITERATE_KEY = Symbol(!!(process.env.NODE_ENV !== \"production\") ? \"iterate\" : \"\");\r\nconst MAP_KEY_ITERATE_KEY = Symbol(!!(process.env.NODE_ENV !== \"production\") ? \"Map key iterate\" : \"\");\r\nfunction track(target, type, key) {\r\n if (shouldTrack && activeEffect) {\r\n let depsMap = targetMap.get(target);\r\n if (!depsMap) {\r\n targetMap.set(target, depsMap = /* @__PURE__ */ new Map());\r\n }\r\n let dep = depsMap.get(key);\r\n if (!dep) {\r\n depsMap.set(key, dep = createDep(() => depsMap.delete(key)));\r\n }\r\n trackEffect(\r\n activeEffect,\r\n dep,\r\n !!(process.env.NODE_ENV !== \"production\") ? {\r\n target,\r\n type,\r\n key\r\n } : void 0\r\n );\r\n }\r\n}\r\nfunction trigger(target, type, key, newValue, oldValue, oldTarget) {\r\n const depsMap = targetMap.get(target);\r\n if (!depsMap) {\r\n return;\r\n }\r\n let deps = [];\r\n if (type === \"clear\") {\r\n deps = [...depsMap.values()];\r\n } else if (key === \"length\" && isArray(target)) {\r\n const newLength = Number(newValue);\r\n depsMap.forEach((dep, key2) => {\r\n if (key2 === \"length\" || !isSymbol(key2) && key2 >= newLength) {\r\n deps.push(dep);\r\n }\r\n });\r\n } else {\r\n if (key !== void 0) {\r\n deps.push(depsMap.get(key));\r\n }\r\n switch (type) {\r\n case \"add\":\r\n if (!isArray(target)) {\r\n deps.push(depsMap.get(ITERATE_KEY));\r\n if (isMap(target)) {\r\n deps.push(depsMap.get(MAP_KEY_ITERATE_KEY));\r\n }\r\n } else if (isIntegerKey(key)) {\r\n deps.push(depsMap.get(\"length\"));\r\n }\r\n break;\r\n case \"delete\":\r\n if (!isArray(target)) {\r\n deps.push(depsMap.get(ITERATE_KEY));\r\n if (isMap(target)) {\r\n deps.push(depsMap.get(MAP_KEY_ITERATE_KEY));\r\n }\r\n }\r\n break;\r\n case \"set\":\r\n if (isMap(target)) {\r\n deps.push(depsMap.get(ITERATE_KEY));\r\n }\r\n break;\r\n }\r\n }\r\n pauseScheduling();\r\n for (const dep of deps) {\r\n if (dep) {\r\n triggerEffects(\r\n dep,\r\n 4,\r\n !!(process.env.NODE_ENV !== \"production\") ? {\r\n target,\r\n type,\r\n key,\r\n newValue,\r\n oldValue,\r\n oldTarget\r\n } : void 0\r\n );\r\n }\r\n }\r\n resetScheduling();\r\n}\r\nfunction getDepFromReactive(object, key) {\r\n var _a;\r\n return (_a = targetMap.get(object)) == null ? void 0 : _a.get(key);\r\n}\r\n\r\nconst isNonTrackableKeys = /* @__PURE__ */ makeMap(`__proto__,__v_isRef,__isVue`);\r\nconst builtInSymbols = new Set(\r\n /* @__PURE__ */ Object.getOwnPropertyNames(Symbol).filter((key) => key !== \"arguments\" && key !== \"caller\").map((key) => Symbol[key]).filter(isSymbol)\r\n);\r\nconst arrayInstrumentations = /* @__PURE__ */ createArrayInstrumentations();\r\nfunction createArrayInstrumentations() {\r\n const instrumentations = {};\r\n [\"includes\", \"indexOf\", \"lastIndexOf\"].forEach((key) => {\r\n instrumentations[key] = function(...args) {\r\n const arr = toRaw(this);\r\n for (let i = 0, l = this.length; i < l; i++) {\r\n track(arr, \"get\", i + \"\");\r\n }\r\n const res = arr[key](...args);\r\n if (res === -1 || res === false) {\r\n return arr[key](...args.map(toRaw));\r\n } else {\r\n return res;\r\n }\r\n };\r\n });\r\n [\"push\", \"pop\", \"shift\", \"unshift\", \"splice\"].forEach((key) => {\r\n instrumentations[key] = function(...args) {\r\n pauseTracking();\r\n pauseScheduling();\r\n const res = toRaw(this)[key].apply(this, args);\r\n resetScheduling();\r\n resetTracking();\r\n return res;\r\n };\r\n });\r\n return instrumentations;\r\n}\r\nfunction hasOwnProperty(key) {\r\n const obj = toRaw(this);\r\n track(obj, \"has\", key);\r\n return obj.hasOwnProperty(key);\r\n}\r\nclass BaseReactiveHandler {\r\n constructor(_isReadonly = false, _isShallow = false) {\r\n this._isReadonly = _isReadonly;\r\n this._isShallow = _isShallow;\r\n }\r\n get(target, key, receiver) {\r\n const isReadonly2 = this._isReadonly, isShallow2 = this._isShallow;\r\n if (key === \"__v_isReactive\") {\r\n return !isReadonly2;\r\n } else if (key === \"__v_isReadonly\") {\r\n return isReadonly2;\r\n } else if (key === \"__v_isShallow\") {\r\n return isShallow2;\r\n } else if (key === \"__v_raw\") {\r\n if (receiver === (isReadonly2 ? isShallow2 ? shallowReadonlyMap : readonlyMap : isShallow2 ? shallowReactiveMap : reactiveMap).get(target) || // receiver is not the reactive proxy, but has the same prototype\r\n // this means the reciever is a user proxy of the reactive proxy\r\n Object.getPrototypeOf(target) === Object.getPrototypeOf(receiver)) {\r\n return target;\r\n }\r\n return;\r\n }\r\n const targetIsArray = isArray(target);\r\n if (!isReadonly2) {\r\n if (targetIsArray && hasOwn(arrayInstrumentations, key)) {\r\n return Reflect.get(arrayInstrumentations, key, receiver);\r\n }\r\n if (key === \"hasOwnProperty\") {\r\n return hasOwnProperty;\r\n }\r\n }\r\n const res = Reflect.get(target, key, receiver);\r\n if (isSymbol(key) ? builtInSymbols.has(key) : isNonTrackableKeys(key)) {\r\n return res;\r\n }\r\n if (!isReadonly2) {\r\n track(target, \"get\", key);\r\n }\r\n if (isShallow2) {\r\n return res;\r\n }\r\n if (isRef(res)) {\r\n return targetIsArray && isIntegerKey(key) ? res : res.value;\r\n }\r\n if (isObject(res)) {\r\n return isReadonly2 ? readonly(res) : reactive(res);\r\n }\r\n return res;\r\n }\r\n}\r\nclass MutableReactiveHandler extends BaseReactiveHandler {\r\n constructor(isShallow2 = false) {\r\n super(false, isShallow2);\r\n }\r\n set(target, key, value, receiver) {\r\n let oldValue = target[key];\r\n if (!this._isShallow) {\r\n const isOldValueReadonly = isReadonly(oldValue);\r\n if (!isShallow(value) && !isReadonly(value)) {\r\n oldValue = toRaw(oldValue);\r\n value = toRaw(value);\r\n }\r\n if (!isArray(target) && isRef(oldValue) && !isRef(value)) {\r\n if (isOldValueReadonly) {\r\n return false;\r\n } else {\r\n oldValue.value = value;\r\n return true;\r\n }\r\n }\r\n }\r\n const hadKey = isArray(target) && isIntegerKey(key) ? Number(key) < target.length : hasOwn(target, key);\r\n const result = Reflect.set(target, key, value, receiver);\r\n if (target === toRaw(receiver)) {\r\n if (!hadKey) {\r\n trigger(target, \"add\", key, value);\r\n } else if (hasChanged(value, oldValue)) {\r\n trigger(target, \"set\", key, value, oldValue);\r\n }\r\n }\r\n return result;\r\n }\r\n deleteProperty(target, key) {\r\n const hadKey = hasOwn(target, key);\r\n const oldValue = target[key];\r\n const result = Reflect.deleteProperty(target, key);\r\n if (result && hadKey) {\r\n trigger(target, \"delete\", key, void 0, oldValue);\r\n }\r\n return result;\r\n }\r\n has(target, key) {\r\n const result = Reflect.has(target, key);\r\n if (!isSymbol(key) || !builtInSymbols.has(key)) {\r\n track(target, \"has\", key);\r\n }\r\n return result;\r\n }\r\n ownKeys(target) {\r\n track(\r\n target,\r\n \"iterate\",\r\n isArray(target) ? \"length\" : ITERATE_KEY\r\n );\r\n return Reflect.ownKeys(target);\r\n }\r\n}\r\nclass ReadonlyReactiveHandler extends BaseReactiveHandler {\r\n constructor(isShallow2 = false) {\r\n super(true, isShallow2);\r\n }\r\n set(target, key) {\r\n if (!!(process.env.NODE_ENV !== \"production\")) {\r\n warn$2(\r\n `Set operation on key \"${String(key)}\" failed: target is readonly.`,\r\n target\r\n );\r\n }\r\n return true;\r\n }\r\n deleteProperty(target, key) {\r\n if (!!(process.env.NODE_ENV !== \"production\")) {\r\n warn$2(\r\n `Delete operation on key \"${String(key)}\" failed: target is readonly.`,\r\n target\r\n );\r\n }\r\n return true;\r\n }\r\n}\r\nconst mutableHandlers = /* @__PURE__ */ new MutableReactiveHandler();\r\nconst readonlyHandlers = /* @__PURE__ */ new ReadonlyReactiveHandler();\r\nconst shallowReactiveHandlers = /* @__PURE__ */ new MutableReactiveHandler(\r\n true\r\n);\r\nconst shallowReadonlyHandlers = /* @__PURE__ */ new ReadonlyReactiveHandler(true);\r\n\r\nconst toShallow = (value) => value;\r\nconst getProto = (v) => Reflect.getPrototypeOf(v);\r\nfunction get(target, key, isReadonly = false, isShallow = false) {\r\n target = target[\"__v_raw\"];\r\n const rawTarget = toRaw(target);\r\n const rawKey = toRaw(key);\r\n if (!isReadonly) {\r\n if (hasChanged(key, rawKey)) {\r\n track(rawTarget, \"get\", key);\r\n }\r\n track(rawTarget, \"get\", rawKey);\r\n }\r\n const { has: has2 } = getProto(rawTarget);\r\n const wrap = isShallow ? toShallow : isReadonly ? toReadonly : toReactive;\r\n if (has2.call(rawTarget, key)) {\r\n return wrap(target.get(key));\r\n } else if (has2.call(rawTarget, rawKey)) {\r\n return wrap(target.get(rawKey));\r\n } else if (target !== rawTarget) {\r\n target.get(key);\r\n }\r\n}\r\nfunction has(key, isReadonly = false) {\r\n const target = this[\"__v_raw\"];\r\n const rawTarget = toRaw(target);\r\n const rawKey = toRaw(key);\r\n if (!isReadonly) {\r\n if (hasChanged(key, rawKey)) {\r\n track(rawTarget, \"has\", key);\r\n }\r\n track(rawTarget, \"has\", rawKey);\r\n }\r\n return key === rawKey ? target.has(key) : target.has(key) || target.has(rawKey);\r\n}\r\nfunction size(target, isReadonly = false) {\r\n target = target[\"__v_raw\"];\r\n !isReadonly && track(toRaw(target), \"iterate\", ITERATE_KEY);\r\n return Reflect.get(target, \"size\", target);\r\n}\r\nfunction add(value) {\r\n value = toRaw(value);\r\n const target = toRaw(this);\r\n const proto = getProto(target);\r\n const hadKey = proto.has.call(target, value);\r\n if (!hadKey) {\r\n target.add(value);\r\n trigger(target, \"add\", value, value);\r\n }\r\n return this;\r\n}\r\nfunction set$1(key, value) {\r\n value = toRaw(value);\r\n const target = toRaw(this);\r\n const { has: has2, get: get2 } = getProto(target);\r\n let hadKey = has2.call(target, key);\r\n if (!hadKey) {\r\n key = toRaw(key);\r\n hadKey = has2.call(target, key);\r\n } else if (!!(process.env.NODE_ENV !== \"production\")) {\r\n checkIdentityKeys(target, has2, key);\r\n }\r\n const oldValue = get2.call(target, key);\r\n target.set(key, value);\r\n if (!hadKey) {\r\n trigger(target, \"add\", key, value);\r\n } else if (hasChanged(value, oldValue)) {\r\n trigger(target, \"set\", key, value, oldValue);\r\n }\r\n return this;\r\n}\r\nfunction deleteEntry(key) {\r\n const target = toRaw(this);\r\n const { has: has2, get: get2 } = getProto(target);\r\n let hadKey = has2.call(target, key);\r\n if (!hadKey) {\r\n key = toRaw(key);\r\n hadKey = has2.call(target, key);\r\n } else if (!!(process.env.NODE_ENV !== \"production\")) {\r\n checkIdentityKeys(target, has2, key);\r\n }\r\n const oldValue = get2 ? get2.call(target, key) : void 0;\r\n const result = target.delete(key);\r\n if (hadKey) {\r\n trigger(target, \"delete\", key, void 0, oldValue);\r\n }\r\n return result;\r\n}\r\nfunction clear() {\r\n const target = toRaw(this);\r\n const hadItems = target.size !== 0;\r\n const oldTarget = !!(process.env.NODE_ENV !== \"production\") ? isMap(target) ? new Map(target) : new Set(target) : void 0;\r\n const result = target.clear();\r\n if (hadItems) {\r\n trigger(target, \"clear\", void 0, void 0, oldTarget);\r\n }\r\n return result;\r\n}\r\nfunction createForEach(isReadonly, isShallow) {\r\n return function forEach(callback, thisArg) {\r\n const observed = this;\r\n const target = observed[\"__v_raw\"];\r\n const rawTarget = toRaw(target);\r\n const wrap = isShallow ? toShallow : isReadonly ? toReadonly : toReactive;\r\n !isReadonly && track(rawTarget, \"iterate\", ITERATE_KEY);\r\n return target.forEach((value, key) => {\r\n return callback.call(thisArg, wrap(value), wrap(key), observed);\r\n });\r\n };\r\n}\r\nfunction createIterableMethod(method, isReadonly, isShallow) {\r\n return function(...args) {\r\n const target = this[\"__v_raw\"];\r\n const rawTarget = toRaw(target);\r\n const targetIsMap = isMap(rawTarget);\r\n const isPair = method === \"entries\" || method === Symbol.iterator && targetIsMap;\r\n const isKeyOnly = method === \"keys\" && targetIsMap;\r\n const innerIterator = target[method](...args);\r\n const wrap = isShallow ? toShallow : isReadonly ? toReadonly : toReactive;\r\n !isReadonly && track(\r\n rawTarget,\r\n \"iterate\",\r\n isKeyOnly ? MAP_KEY_ITERATE_KEY : ITERATE_KEY\r\n );\r\n return {\r\n // iterator protocol\r\n next() {\r\n const { value, done } = innerIterator.next();\r\n return done ? { value, done } : {\r\n value: isPair ? [wrap(value[0]), wrap(value[1])] : wrap(value),\r\n done\r\n };\r\n },\r\n // iterable protocol\r\n [Symbol.iterator]() {\r\n return this;\r\n }\r\n };\r\n };\r\n}\r\nfunction createReadonlyMethod(type) {\r\n return function(...args) {\r\n if (!!(process.env.NODE_ENV !== \"production\")) {\r\n const key = args[0] ? `on key \"${args[0]}\" ` : ``;\r\n warn$2(\r\n `${capitalize(type)} operation ${key}failed: target is readonly.`,\r\n toRaw(this)\r\n );\r\n }\r\n return type === \"delete\" ? false : type === \"clear\" ? void 0 : this;\r\n };\r\n}\r\nfunction createInstrumentations() {\r\n const mutableInstrumentations2 = {\r\n get(key) {\r\n return get(this, key);\r\n },\r\n get size() {\r\n return size(this);\r\n },\r\n has,\r\n add,\r\n set: set$1,\r\n delete: deleteEntry,\r\n clear,\r\n forEach: createForEach(false, false)\r\n };\r\n const shallowInstrumentations2 = {\r\n get(key) {\r\n return get(this, key, false, true);\r\n },\r\n get size() {\r\n return size(this);\r\n },\r\n has,\r\n add,\r\n set: set$1,\r\n delete: deleteEntry,\r\n clear,\r\n forEach: createForEach(false, true)\r\n };\r\n const readonlyInstrumentations2 = {\r\n get(key) {\r\n return get(this, key, true);\r\n },\r\n get size() {\r\n return size(this, true);\r\n },\r\n has(key) {\r\n return has.call(this, key, true);\r\n },\r\n add: createReadonlyMethod(\"add\"),\r\n set: createReadonlyMethod(\"set\"),\r\n delete: createReadonlyMethod(\"delete\"),\r\n clear: createReadonlyMethod(\"clear\"),\r\n forEach: createForEach(true, false)\r\n };\r\n const shallowReadonlyInstrumentations2 = {\r\n get(key) {\r\n return get(this, key, true, true);\r\n },\r\n get size() {\r\n return size(this, true);\r\n },\r\n has(key) {\r\n return has.call(this, key, true);\r\n },\r\n add: createReadonlyMethod(\"add\"),\r\n set: createReadonlyMethod(\"set\"),\r\n delete: createReadonlyMethod(\"delete\"),\r\n clear: createReadonlyMethod(\"clear\"),\r\n forEach: createForEach(true, true)\r\n };\r\n const iteratorMethods = [\r\n \"keys\",\r\n \"values\",\r\n \"entries\",\r\n Symbol.iterator\r\n ];\r\n iteratorMethods.forEach((method) => {\r\n mutableInstrumentations2[method] = createIterableMethod(method, false, false);\r\n readonlyInstrumentations2[method] = createIterableMethod(method, true, false);\r\n shallowInstrumentations2[method] = createIterableMethod(method, false, true);\r\n shallowReadonlyInstrumentations2[method] = createIterableMethod(\r\n method,\r\n true,\r\n true\r\n );\r\n });\r\n return [\r\n mutableInstrumentations2,\r\n readonlyInstrumentations2,\r\n shallowInstrumentations2,\r\n shallowReadonlyInstrumentations2\r\n ];\r\n}\r\nconst [\r\n mutableInstrumentations,\r\n readonlyInstrumentations,\r\n shallowInstrumentations,\r\n shallowReadonlyInstrumentations\r\n] = /* @__PURE__ */ createInstrumentations();\r\nfunction createInstrumentationGetter(isReadonly, shallow) {\r\n const instrumentations = shallow ? isReadonly ? shallowReadonlyInstrumentations : shallowInstrumentations : isReadonly ? readonlyInstrumentations : mutableInstrumentations;\r\n return (target, key, receiver) => {\r\n if (key === \"__v_isReactive\") {\r\n return !isReadonly;\r\n } else if (key === \"__v_isReadonly\") {\r\n return isReadonly;\r\n } else if (key === \"__v_raw\") {\r\n return target;\r\n }\r\n return Reflect.get(\r\n hasOwn(instrumentations, key) && key in target ? instrumentations : target,\r\n key,\r\n receiver\r\n );\r\n };\r\n}\r\nconst mutableCollectionHandlers = {\r\n get: /* @__PURE__ */ createInstrumentationGetter(false, false)\r\n};\r\nconst shallowCollectionHandlers = {\r\n get: /* @__PURE__ */ createInstrumentationGetter(false, true)\r\n};\r\nconst readonlyCollectionHandlers = {\r\n get: /* @__PURE__ */ createInstrumentationGetter(true, false)\r\n};\r\nconst shallowReadonlyCollectionHandlers = {\r\n get: /* @__PURE__ */ createInstrumentationGetter(true, true)\r\n};\r\nfunction checkIdentityKeys(target, has2, key) {\r\n const rawKey = toRaw(key);\r\n if (rawKey !== key && has2.call(target, rawKey)) {\r\n const type = toRawType(target);\r\n warn$2(\r\n `Reactive ${type} contains both the raw and reactive versions of the same object${type === `Map` ? ` as keys` : ``}, which can lead to inconsistencies. Avoid differentiating between the raw and reactive versions of an object and only use the reactive version if possible.`\r\n );\r\n }\r\n}\r\n\r\nconst reactiveMap = /* @__PURE__ */ new WeakMap();\r\nconst shallowReactiveMap = /* @__PURE__ */ new WeakMap();\r\nconst readonlyMap = /* @__PURE__ */ new WeakMap();\r\nconst shallowReadonlyMap = /* @__PURE__ */ new WeakMap();\r\nfunction targetTypeMap(rawType) {\r\n switch (rawType) {\r\n case \"Object\":\r\n case \"Array\":\r\n return 1 /* COMMON */;\r\n case \"Map\":\r\n case \"Set\":\r\n case \"WeakMap\":\r\n case \"WeakSet\":\r\n return 2 /* COLLECTION */;\r\n default:\r\n return 0 /* INVALID */;\r\n }\r\n}\r\nfunction getTargetType(value) {\r\n return value[\"__v_skip\"] || !Object.isExtensible(value) ? 0 /* INVALID */ : targetTypeMap(toRawType(value));\r\n}\r\nfunction reactive(target) {\r\n if (isReadonly(target)) {\r\n return target;\r\n }\r\n return createReactiveObject(\r\n target,\r\n false,\r\n mutableHandlers,\r\n mutableCollectionHandlers,\r\n reactiveMap\r\n );\r\n}\r\nfunction shallowReactive(target) {\r\n return createReactiveObject(\r\n target,\r\n false,\r\n shallowReactiveHandlers,\r\n shallowCollectionHandlers,\r\n shallowReactiveMap\r\n );\r\n}\r\nfunction readonly(target) {\r\n return createReactiveObject(\r\n target,\r\n true,\r\n readonlyHandlers,\r\n readonlyCollectionHandlers,\r\n readonlyMap\r\n );\r\n}\r\nfunction shallowReadonly(target) {\r\n return createReactiveObject(\r\n target,\r\n true,\r\n shallowReadonlyHandlers,\r\n shallowReadonlyCollectionHandlers,\r\n shallowReadonlyMap\r\n );\r\n}\r\nfunction createReactiveObject(target, isReadonly2, baseHandlers, collectionHandlers, proxyMap) {\r\n if (!isObject(target)) {\r\n if (!!(process.env.NODE_ENV !== \"production\")) {\r\n warn$2(`value cannot be made reactive: ${String(target)}`);\r\n }\r\n return target;\r\n }\r\n if (target[\"__v_raw\"] && !(isReadonly2 && target[\"__v_isReactive\"])) {\r\n return target;\r\n }\r\n const existingProxy = proxyMap.get(target);\r\n if (existingProxy) {\r\n return existingProxy;\r\n }\r\n const targetType = getTargetType(target);\r\n if (targetType === 0 /* INVALID */) {\r\n return target;\r\n }\r\n const proxy = new Proxy(\r\n target,\r\n targetType === 2 /* COLLECTION */ ? collectionHandlers : baseHandlers\r\n );\r\n proxyMap.set(target, proxy);\r\n return proxy;\r\n}\r\nfunction isReactive(value) {\r\n if (isReadonly(value)) {\r\n return isReactive(value[\"__v_raw\"]);\r\n }\r\n return !!(value && value[\"__v_isReactive\"]);\r\n}\r\nfunction isReadonly(value) {\r\n return !!(value && value[\"__v_isReadonly\"]);\r\n}\r\nfunction isShallow(value) {\r\n return !!(value && value[\"__v_isShallow\"]);\r\n}\r\nfunction isProxy(value) {\r\n return isReactive(value) || isReadonly(value);\r\n}\r\nfunction toRaw(observed) {\r\n const raw = observed && observed[\"__v_raw\"];\r\n return raw ? toRaw(raw) : observed;\r\n}\r\nfunction markRaw(value) {\r\n if (Object.isExtensible(value)) {\r\n def(value, \"__v_skip\", true);\r\n }\r\n return value;\r\n}\r\nconst toReactive = (value) => isObject(value) ? reactive(value) : value;\r\nconst toReadonly = (value) => isObject(value) ? readonly(value) : value;\r\n\r\nconst COMPUTED_SIDE_EFFECT_WARN = `Computed is still dirty after getter evaluation, likely because a computed is mutating its own dependency in its getter. State mutations in computed getters should be avoided. Check the docs for more details: https://vuejs.org/guide/essentials/computed.html#getters-should-be-side-effect-free`;\r\nclass ComputedRefImpl {\r\n constructor(getter, _setter, isReadonly, isSSR) {\r\n this.getter = getter;\r\n this._setter = _setter;\r\n this.dep = void 0;\r\n this.__v_isRef = true;\r\n this[\"__v_isReadonly\"] = false;\r\n this.effect = new ReactiveEffect(\r\n () => getter(this._value),\r\n () => triggerRefValue(\r\n this,\r\n this.effect._dirtyLevel === 2 ? 2 : 3\r\n )\r\n );\r\n this.effect.computed = this;\r\n this.effect.active = this._cacheable = !isSSR;\r\n this[\"__v_isReadonly\"] = isReadonly;\r\n }\r\n get value() {\r\n const self = toRaw(this);\r\n if ((!self._cacheable || self.effect.dirty) && hasChanged(self._value, self._value = self.effect.run())) {\r\n triggerRefValue(self, 4);\r\n }\r\n trackRefValue(self);\r\n if (self.effect._dirtyLevel >= 2) {\r\n if (!!(process.env.NODE_ENV !== \"production\") && this._warnRecursive) {\r\n warn$2(COMPUTED_SIDE_EFFECT_WARN, `\r\n\r\ngetter: `, this.getter);\r\n }\r\n triggerRefValue(self, 2);\r\n }\r\n return self._value;\r\n }\r\n set value(newValue) {\r\n this._setter(newValue);\r\n }\r\n // #region polyfill _dirty for backward compatibility third party code for Vue <= 3.3.x\r\n get _dirty() {\r\n return this.effect.dirty;\r\n }\r\n set _dirty(v) {\r\n this.effect.dirty = v;\r\n }\r\n // #endregion\r\n}\r\nfunction computed$1(getterOrOptions, debugOptions, isSSR = false) {\r\n let getter;\r\n let setter;\r\n const onlyGetter = isFunction(getterOrOptions);\r\n if (onlyGetter) {\r\n getter = getterOrOptions;\r\n setter = !!(process.env.NODE_ENV !== \"production\") ? () => {\r\n warn$2(\"Write operation failed: computed value is readonly\");\r\n } : NOOP;\r\n } else {\r\n getter = getterOrOptions.get;\r\n setter = getterOrOptions.set;\r\n }\r\n const cRef = new ComputedRefImpl(getter, setter, onlyGetter || !setter, isSSR);\r\n if (!!(process.env.NODE_ENV !== \"production\") && debugOptions && !isSSR) {\r\n cRef.effect.onTrack = debugOptions.onTrack;\r\n cRef.effect.onTrigger = debugOptions.onTrigger;\r\n }\r\n return cRef;\r\n}\r\n\r\nfunction trackRefValue(ref2) {\r\n var _a;\r\n if (shouldTrack && activeEffect) {\r\n ref2 = toRaw(ref2);\r\n trackEffect(\r\n activeEffect,\r\n (_a = ref2.dep) != null ? _a : ref2.dep = createDep(\r\n () => ref2.dep = void 0,\r\n ref2 instanceof ComputedRefImpl ? ref2 : void 0\r\n ),\r\n !!(process.env.NODE_ENV !== \"production\") ? {\r\n target: ref2,\r\n type: \"get\",\r\n key: \"value\"\r\n } : void 0\r\n );\r\n }\r\n}\r\nfunction triggerRefValue(ref2, dirtyLevel = 4, newVal) {\r\n ref2 = toRaw(ref2);\r\n const dep = ref2.dep;\r\n if (dep) {\r\n triggerEffects(\r\n dep,\r\n dirtyLevel,\r\n !!(process.env.NODE_ENV !== \"production\") ? {\r\n target: ref2,\r\n type: \"set\",\r\n key: \"value\",\r\n newValue: newVal\r\n } : void 0\r\n );\r\n }\r\n}\r\nfunction isRef(r) {\r\n return !!(r && r.__v_isRef === true);\r\n}\r\nfunction ref(value) {\r\n return createRef(value, false);\r\n}\r\nfunction shallowRef(value) {\r\n return createRef(value, true);\r\n}\r\nfunction createRef(rawValue, shallow) {\r\n if (isRef(rawValue)) {\r\n return rawValue;\r\n }\r\n return new RefImpl(rawValue, shallow);\r\n}\r\nclass RefImpl {\r\n constructor(value, __v_isShallow) {\r\n this.__v_isShallow = __v_isShallow;\r\n this.dep = void 0;\r\n this.__v_isRef = true;\r\n this._rawValue = __v_isShallow ? value : toRaw(value);\r\n this._value = __v_isShallow ? value : toReactive(value);\r\n }\r\n get value() {\r\n trackRefValue(this);\r\n return this._value;\r\n }\r\n set value(newVal) {\r\n const useDirectValue = this.__v_isShallow || isShallow(newVal) || isReadonly(newVal);\r\n newVal = useDirectValue ? newVal : toRaw(newVal);\r\n if (hasChanged(newVal, this._rawValue)) {\r\n this._rawValue = newVal;\r\n this._value = useDirectValue ? newVal : toReactive(newVal);\r\n triggerRefValue(this, 4, newVal);\r\n }\r\n }\r\n}\r\nfunction triggerRef(ref2) {\r\n triggerRefValue(ref2, 4, !!(process.env.NODE_ENV !== \"production\") ? ref2.value : void 0);\r\n}\r\nfunction unref(ref2) {\r\n return isRef(ref2) ? ref2.value : ref2;\r\n}\r\nfunction toValue(source) {\r\n return isFunction(source) ? source() : unref(source);\r\n}\r\nconst shallowUnwrapHandlers = {\r\n get: (target, key, receiver) => unref(Reflect.get(target, key, receiver)),\r\n set: (target, key, value, receiver) => {\r\n const oldValue = target[key];\r\n if (isRef(oldValue) && !isRef(value)) {\r\n oldValue.value = value;\r\n return true;\r\n } else {\r\n return Reflect.set(target, key, value, receiver);\r\n }\r\n }\r\n};\r\nfunction proxyRefs(objectWithRefs) {\r\n return isReactive(objectWithRefs) ? objectWithRefs : new Proxy(objectWithRefs, shallowUnwrapHandlers);\r\n}\r\nclass CustomRefImpl {\r\n constructor(factory) {\r\n this.dep = void 0;\r\n this.__v_isRef = true;\r\n const { get, set } = factory(\r\n () => trackRefValue(this),\r\n () => triggerRefValue(this)\r\n );\r\n this._get = get;\r\n this._set = set;\r\n }\r\n get value() {\r\n return this._get();\r\n }\r\n set value(newVal) {\r\n this._set(newVal);\r\n }\r\n}\r\nfunction customRef(factory) {\r\n return new CustomRefImpl(factory);\r\n}\r\nfunction toRefs(object) {\r\n if (!!(process.env.NODE_ENV !== \"production\") && !isProxy(object)) {\r\n warn$2(`toRefs() expects a reactive object but received a plain one.`);\r\n }\r\n const ret = isArray(object) ? new Array(object.length) : {};\r\n for (const key in object) {\r\n ret[key] = propertyToRef(object, key);\r\n }\r\n return ret;\r\n}\r\nclass ObjectRefImpl {\r\n constructor(_object, _key, _defaultValue) {\r\n this._object = _object;\r\n this._key = _key;\r\n this._defaultValue = _defaultValue;\r\n this.__v_isRef = true;\r\n }\r\n get value() {\r\n const val = this._object[this._key];\r\n return val === void 0 ? this._defaultValue : val;\r\n }\r\n set value(newVal) {\r\n this._object[this._key] = newVal;\r\n }\r\n get dep() {\r\n return getDepFromReactive(toRaw(this._object), this._key);\r\n }\r\n}\r\nclass GetterRefImpl {\r\n constructor(_getter) {\r\n this._getter = _getter;\r\n this.__v_isRef = true;\r\n this.__v_isReadonly = true;\r\n }\r\n get value() {\r\n return this._getter();\r\n }\r\n}\r\nfunction toRef(source, key, defaultValue) {\r\n if (isRef(source)) {\r\n return source;\r\n } else if (isFunction(source)) {\r\n return new GetterRefImpl(source);\r\n } else if (isObject(source) && arguments.length > 1) {\r\n return propertyToRef(source, key, defaultValue);\r\n } else {\r\n return ref(source);\r\n }\r\n}\r\nfunction propertyToRef(source, key, defaultValue) {\r\n const val = source[key];\r\n return isRef(val) ? val : new ObjectRefImpl(source, key, defaultValue);\r\n}\r\n\r\nconst stack = [];\r\nfunction pushWarningContext(vnode) {\r\n stack.push(vnode);\r\n}\r\nfunction popWarningContext() {\r\n stack.pop();\r\n}\r\nfunction warn$1(msg, ...args) {\r\n pauseTracking();\r\n const instance = stack.length ? stack[stack.length - 1].component : null;\r\n const appWarnHandler = instance && instance.appContext.config.warnHandler;\r\n const trace = getComponentTrace();\r\n if (appWarnHandler) {\r\n callWithErrorHandling(\r\n appWarnHandler,\r\n instance,\r\n 11,\r\n [\r\n msg + args.map((a) => {\r\n var _a, _b;\r\n return (_b = (_a = a.toString) == null ? void 0 : _a.call(a)) != null ? _b : JSON.stringify(a);\r\n }).join(\"\"),\r\n instance && instance.proxy,\r\n trace.map(\r\n ({ vnode }) => `at <${formatComponentName(instance, vnode.type)}>`\r\n ).join(\"\\n\"),\r\n trace\r\n ]\r\n );\r\n } else {\r\n const warnArgs = [`[Vue warn]: ${msg}`, ...args];\r\n if (trace.length && // avoid spamming console during tests\r\n true) {\r\n warnArgs.push(`\r\n`, ...formatTrace(trace));\r\n }\r\n console.warn(...warnArgs);\r\n }\r\n resetTracking();\r\n}\r\nfunction getComponentTrace() {\r\n let currentVNode = stack[stack.length - 1];\r\n if (!currentVNode) {\r\n return [];\r\n }\r\n const normalizedStack = [];\r\n while (currentVNode) {\r\n const last = normalizedStack[0];\r\n if (last && last.vnode === currentVNode) {\r\n last.recurseCount++;\r\n } else {\r\n normalizedStack.push({\r\n vnode: currentVNode,\r\n recurseCount: 0\r\n });\r\n }\r\n const parentInstance = currentVNode.component && currentVNode.component.parent;\r\n currentVNode = parentInstance && parentInstance.vnode;\r\n }\r\n return normalizedStack;\r\n}\r\nfunction formatTrace(trace) {\r\n const logs = [];\r\n trace.forEach((entry, i) => {\r\n logs.push(...i === 0 ? [] : [`\r\n`], ...formatTraceEntry(entry));\r\n });\r\n return logs;\r\n}\r\nfunction formatTraceEntry({ vnode, recurseCount }) {\r\n const postfix = recurseCount > 0 ? `... (${recurseCount} recursive calls)` : ``;\r\n const isRoot = vnode.component ? vnode.component.parent == null : false;\r\n const open = ` at <${formatComponentName(\r\n vnode.component,\r\n vnode.type,\r\n isRoot\r\n )}`;\r\n const close = `>` + postfix;\r\n return vnode.props ? [open, ...formatProps(vnode.props), close] : [open + close];\r\n}\r\nfunction formatProps(props) {\r\n const res = [];\r\n const keys = Object.keys(props);\r\n keys.slice(0, 3).forEach((key) => {\r\n res.push(...formatProp(key, props[key]));\r\n });\r\n if (keys.length > 3) {\r\n res.push(` ...`);\r\n }\r\n return res;\r\n}\r\nfunction formatProp(key, value, raw) {\r\n if (isString(value)) {\r\n value = JSON.stringify(value);\r\n return raw ? value : [`${key}=${value}`];\r\n } else if (typeof value === \"number\" || typeof value === \"boolean\" || value == null) {\r\n return raw ? value : [`${key}=${value}`];\r\n } else if (isRef(value)) {\r\n value = formatProp(key, toRaw(value.value), true);\r\n return raw ? value : [`${key}=Ref<`, value, `>`];\r\n } else if (isFunction(value)) {\r\n return [`${key}=fn${value.name ? `<${value.name}>` : ``}`];\r\n } else {\r\n value = toRaw(value);\r\n return raw ? value : [`${key}=`, value];\r\n }\r\n}\r\n\r\nconst ErrorTypeStrings = {\r\n [\"sp\"]: \"serverPrefetch hook\",\r\n [\"bc\"]: \"beforeCreate hook\",\r\n [\"c\"]: \"created hook\",\r\n [\"bm\"]: \"beforeMount hook\",\r\n [\"m\"]: \"mounted hook\",\r\n [\"bu\"]: \"beforeUpdate hook\",\r\n [\"u\"]: \"updated\",\r\n [\"bum\"]: \"beforeUnmount hook\",\r\n [\"um\"]: \"unmounted hook\",\r\n [\"a\"]: \"activated hook\",\r\n [\"da\"]: \"deactivated hook\",\r\n [\"ec\"]: \"errorCaptured hook\",\r\n [\"rtc\"]: \"renderTracked hook\",\r\n [\"rtg\"]: \"renderTriggered hook\",\r\n [0]: \"setup function\",\r\n [1]: \"render function\",\r\n [2]: \"watcher getter\",\r\n [3]: \"watcher callback\",\r\n [4]: \"watcher cleanup function\",\r\n [5]: \"native event handler\",\r\n [6]: \"component event handler\",\r\n [7]: \"vnode hook\",\r\n [8]: \"directive hook\",\r\n [9]: \"transition hook\",\r\n [10]: \"app errorHandler\",\r\n [11]: \"app warnHandler\",\r\n [12]: \"ref function\",\r\n [13]: \"async component loader\",\r\n [14]: \"scheduler flush. This is likely a Vue internals bug. Please open an issue at https://github.com/vuejs/core .\"\r\n};\r\nfunction callWithErrorHandling(fn, instance, type, args) {\r\n try {\r\n return args ? fn(...args) : fn();\r\n } catch (err) {\r\n handleError(err, instance, type);\r\n }\r\n}\r\nfunction callWithAsyncErrorHandling(fn, instance, type, args) {\r\n if (isFunction(fn)) {\r\n const res = callWithErrorHandling(fn, instance, type, args);\r\n if (res && isPromise(res)) {\r\n res.catch((err) => {\r\n handleError(err, instance, type);\r\n });\r\n }\r\n return res;\r\n }\r\n const values = [];\r\n for (let i = 0; i < fn.length; i++) {\r\n values.push(callWithAsyncErrorHandling(fn[i], instance, type, args));\r\n }\r\n return values;\r\n}\r\nfunction handleError(err, instance, type, throwInDev = true) {\r\n const contextVNode = instance ? instance.vnode : null;\r\n if (instance) {\r\n let cur = instance.parent;\r\n const exposedInstance = instance.proxy;\r\n const errorInfo = !!(process.env.NODE_ENV !== \"production\") ? ErrorTypeStrings[type] || type : `https://vuejs.org/error-reference/#runtime-${type}`;\r\n while (cur) {\r\n const errorCapturedHooks = cur.ec;\r\n if (errorCapturedHooks) {\r\n for (let i = 0; i < errorCapturedHooks.length; i++) {\r\n if (errorCapturedHooks[i](err, exposedInstance, errorInfo) === false) {\r\n return;\r\n }\r\n }\r\n }\r\n cur = cur.parent;\r\n }\r\n const appErrorHandler = instance.appContext.config.errorHandler;\r\n if (appErrorHandler) {\r\n callWithErrorHandling(\r\n appErrorHandler,\r\n null,\r\n 10,\r\n [err, exposedInstance, errorInfo]\r\n );\r\n return;\r\n }\r\n }\r\n logError(err, type, contextVNode, throwInDev);\r\n}\r\nfunction logError(err, type, contextVNode, throwInDev = true) {\r\n if (!!(process.env.NODE_ENV !== \"production\")) {\r\n const info = ErrorTypeStrings[type] || type;\r\n if (contextVNode) {\r\n pushWarningContext(contextVNode);\r\n }\r\n warn$1(`Unhandled error${info ? ` during execution of ${info}` : ``}`);\r\n if (contextVNode) {\r\n popWarningContext();\r\n }\r\n if (throwInDev) {\r\n console.error(err);\r\n } else {\r\n console.error(err);\r\n }\r\n } else {\r\n console.error(err);\r\n }\r\n}\r\n\r\nlet isFlushing = false;\r\nlet isFlushPending = false;\r\nconst queue = [];\r\nlet flushIndex = 0;\r\nconst pendingPostFlushCbs = [];\r\nlet activePostFlushCbs = null;\r\nlet postFlushIndex = 0;\r\nconst resolvedPromise = /* @__PURE__ */ Promise.resolve();\r\nlet currentFlushPromise = null;\r\nconst RECURSION_LIMIT = 100;\r\nfunction nextTick$1(fn) {\r\n const p = currentFlushPromise || resolvedPromise;\r\n return fn ? p.then(this ? fn.bind(this) : fn) : p;\r\n}\r\nfunction findInsertionIndex(id) {\r\n let start = flushIndex + 1;\r\n let end = queue.length;\r\n while (start < end) {\r\n const middle = start + end >>> 1;\r\n const middleJob = queue[middle];\r\n const middleJobId = getId(middleJob);\r\n if (middleJobId < id || middleJobId === id && middleJob.pre) {\r\n start = middle + 1;\r\n } else {\r\n end = middle;\r\n }\r\n }\r\n return start;\r\n}\r\nfunction queueJob(job) {\r\n if (!queue.length || !queue.includes(\r\n job,\r\n isFlushing && job.allowRecurse ? flushIndex + 1 : flushIndex\r\n )) {\r\n if (job.id == null) {\r\n queue.push(job);\r\n } else {\r\n queue.splice(findInsertionIndex(job.id), 0, job);\r\n }\r\n queueFlush();\r\n }\r\n}\r\nfunction queueFlush() {\r\n if (!isFlushing && !isFlushPending) {\r\n isFlushPending = true;\r\n currentFlushPromise = resolvedPromise.then(flushJobs);\r\n }\r\n}\r\nfunction hasQueueJob(job) {\r\n return queue.indexOf(job) > -1;\r\n}\r\nfunction invalidateJob(job) {\r\n const i = queue.indexOf(job);\r\n if (i > flushIndex) {\r\n queue.splice(i, 1);\r\n }\r\n}\r\nfunction queuePostFlushCb(cb) {\r\n if (!isArray(cb)) {\r\n if (!activePostFlushCbs || !activePostFlushCbs.includes(\r\n cb,\r\n cb.allowRecurse ? postFlushIndex + 1 : postFlushIndex\r\n )) {\r\n pendingPostFlushCbs.push(cb);\r\n }\r\n } else {\r\n pendingPostFlushCbs.push(...cb);\r\n }\r\n queueFlush();\r\n}\r\nfunction flushPreFlushCbs(instance, seen, i = isFlushing ? flushIndex + 1 : 0) {\r\n if (!!(process.env.NODE_ENV !== \"production\")) {\r\n seen = seen || /* @__PURE__ */ new Map();\r\n }\r\n for (; i < queue.length; i++) {\r\n const cb = queue[i];\r\n if (cb && cb.pre) {\r\n if (!!(process.env.NODE_ENV !== \"production\") && checkRecursiveUpdates(seen, cb)) {\r\n continue;\r\n }\r\n queue.splice(i, 1);\r\n i--;\r\n cb();\r\n }\r\n }\r\n}\r\nfunction flushPostFlushCbs(seen) {\r\n if (pendingPostFlushCbs.length) {\r\n const deduped = [...new Set(pendingPostFlushCbs)].sort(\r\n (a, b) => getId(a) - getId(b)\r\n );\r\n pendingPostFlushCbs.length = 0;\r\n if (activePostFlushCbs) {\r\n activePostFlushCbs.push(...deduped);\r\n return;\r\n }\r\n activePostFlushCbs = deduped;\r\n if (!!(process.env.NODE_ENV !== \"production\")) {\r\n seen = seen || /* @__PURE__ */ new Map();\r\n }\r\n for (postFlushIndex = 0; postFlushIndex < activePostFlushCbs.length; postFlushIndex++) {\r\n if (!!(process.env.NODE_ENV !== \"production\") && checkRecursiveUpdates(seen, activePostFlushCbs[postFlushIndex])) {\r\n continue;\r\n }\r\n activePostFlushCbs[postFlushIndex]();\r\n }\r\n activePostFlushCbs = null;\r\n postFlushIndex = 0;\r\n }\r\n}\r\nconst getId = (job) => job.id == null ? Infinity : job.id;\r\nconst comparator = (a, b) => {\r\n const diff = getId(a) - getId(b);\r\n if (diff === 0) {\r\n if (a.pre && !b.pre)\r\n return -1;\r\n if (b.pre && !a.pre)\r\n return 1;\r\n }\r\n return diff;\r\n};\r\nfunction flushJobs(seen) {\r\n isFlushPending = false;\r\n isFlushing = true;\r\n if (!!(process.env.NODE_ENV !== \"production\")) {\r\n seen = seen || /* @__PURE__ */ new Map();\r\n }\r\n queue.sort(comparator);\r\n const check = !!(process.env.NODE_ENV !== \"production\") ? (job) => checkRecursiveUpdates(seen, job) : NOOP;\r\n try {\r\n for (flushIndex = 0; flushIndex < queue.length; flushIndex++) {\r\n const job = queue[flushIndex];\r\n if (job && job.active !== false) {\r\n if (!!(process.env.NODE_ENV !== \"production\") && check(job)) {\r\n continue;\r\n }\r\n callWithErrorHandling(job, null, 14);\r\n }\r\n }\r\n } finally {\r\n flushIndex = 0;\r\n queue.length = 0;\r\n flushPostFlushCbs(seen);\r\n isFlushing = false;\r\n currentFlushPromise = null;\r\n if (queue.length || pendingPostFlushCbs.length) {\r\n flushJobs(seen);\r\n }\r\n }\r\n}\r\nfunction checkRecursiveUpdates(seen, fn) {\r\n if (!seen.has(fn)) {\r\n seen.set(fn, 1);\r\n } else {\r\n const count = seen.get(fn);\r\n if (count > RECURSION_LIMIT) {\r\n const instance = fn.ownerInstance;\r\n const componentName = instance && getComponentName(instance.type);\r\n handleError(\r\n `Maximum recursive updates exceeded${componentName ? ` in component <${componentName}>` : ``}. This means you have a reactive effect that is mutating its own dependencies and thus recursively triggering itself. Possible sources include component template, render function, updated hook or watcher source function.`,\r\n null,\r\n 10\r\n );\r\n return true;\r\n } else {\r\n seen.set(fn, count + 1);\r\n }\r\n }\r\n}\r\n\r\nlet devtools;\r\nlet buffer = [];\r\nlet devtoolsNotInstalled = false;\r\nfunction emit$1(event, ...args) {\r\n if (devtools) {\r\n devtools.emit(event, ...args);\r\n } else if (!devtoolsNotInstalled) {\r\n buffer.push({ event, args });\r\n }\r\n}\r\nfunction setDevtoolsHook(hook, target) {\r\n var _a, _b;\r\n devtools = hook;\r\n if (devtools) {\r\n devtools.enabled = true;\r\n buffer.forEach(({ event, args }) => devtools.emit(event, ...args));\r\n buffer = [];\r\n } else if (\r\n // handle late devtools injection - only do this if we are in an actual\r\n // browser environment to avoid the timer handle stalling test runner exit\r\n // (#4815)\r\n typeof window !== \"undefined\" && // some envs mock window but not fully\r\n window.HTMLElement && // also exclude jsdom\r\n !((_b = (_a = window.navigator) == null ? void 0 : _a.userAgent) == null ? void 0 : _b.includes(\"jsdom\"))\r\n ) {\r\n const replay = target.__VUE_DEVTOOLS_HOOK_REPLAY__ = target.__VUE_DEVTOOLS_HOOK_REPLAY__ || [];\r\n replay.push((newHook) => {\r\n setDevtoolsHook(newHook, target);\r\n });\r\n setTimeout(() => {\r\n if (!devtools) {\r\n target.__VUE_DEVTOOLS_HOOK_REPLAY__ = null;\r\n devtoolsNotInstalled = true;\r\n buffer = [];\r\n }\r\n }, 3e3);\r\n } else {\r\n devtoolsNotInstalled = true;\r\n buffer = [];\r\n }\r\n}\r\nfunction devtoolsInitApp(app, version) {\r\n emit$1(\"app:init\" /* APP_INIT */, app, version, {\r\n Fragment,\r\n Text,\r\n Comment,\r\n Static\r\n });\r\n}\r\nconst devtoolsComponentAdded = /* @__PURE__ */ createDevtoolsComponentHook(\r\n \"component:added\" /* COMPONENT_ADDED */\r\n);\r\nconst devtoolsComponentUpdated = /* @__PURE__ */ createDevtoolsComponentHook(\"component:updated\" /* COMPONENT_UPDATED */);\r\nconst _devtoolsComponentRemoved = /* @__PURE__ */ createDevtoolsComponentHook(\r\n \"component:removed\" /* COMPONENT_REMOVED */\r\n);\r\nconst devtoolsComponentRemoved = (component) => {\r\n if (devtools && typeof devtools.cleanupBuffer === \"function\" && // remove the component if it wasn't buffered\r\n !devtools.cleanupBuffer(component)) {\r\n _devtoolsComponentRemoved(component);\r\n }\r\n};\r\n/*! #__NO_SIDE_EFFECTS__ */\r\n// @__NO_SIDE_EFFECTS__\r\nfunction createDevtoolsComponentHook(hook) {\r\n return (component) => {\r\n emit$1(\r\n hook,\r\n component.appContext.app,\r\n component.uid,\r\n // fixed by xxxxxx\r\n // 为 0 是 App,无 parent 是 Page 指向 App\r\n component.uid === 0 ? void 0 : component.parent ? component.parent.uid : 0,\r\n component\r\n );\r\n };\r\n}\r\nconst devtoolsPerfStart = /* @__PURE__ */ createDevtoolsPerformanceHook(\r\n \"perf:start\" /* PERFORMANCE_START */\r\n);\r\nconst devtoolsPerfEnd = /* @__PURE__ */ createDevtoolsPerformanceHook(\r\n \"perf:end\" /* PERFORMANCE_END */\r\n);\r\nfunction createDevtoolsPerformanceHook(hook) {\r\n return (component, type, time) => {\r\n emit$1(hook, component.appContext.app, component.uid, component, type, time);\r\n };\r\n}\r\nfunction devtoolsComponentEmit(component, event, params) {\r\n emit$1(\r\n \"component:emit\" /* COMPONENT_EMIT */,\r\n component.appContext.app,\r\n component,\r\n event,\r\n params\r\n );\r\n}\r\n\r\nfunction emit(instance, event, ...rawArgs) {\r\n if (instance.isUnmounted)\r\n return;\r\n const props = instance.vnode.props || EMPTY_OBJ;\r\n if (!!(process.env.NODE_ENV !== \"production\")) {\r\n const {\r\n emitsOptions,\r\n propsOptions: [propsOptions]\r\n } = instance;\r\n if (emitsOptions) {\r\n if (!(event in emitsOptions) && true) {\r\n if (!propsOptions || !(toHandlerKey(event) in propsOptions)) {\r\n warn$1(\r\n `Component emitted event \"${event}\" but it is neither declared in the emits option nor as an \"${toHandlerKey(event)}\" prop.`\r\n );\r\n }\r\n } else {\r\n const validator = emitsOptions[event];\r\n if (isFunction(validator)) {\r\n const isValid = validator(...rawArgs);\r\n if (!isValid) {\r\n warn$1(\r\n `Invalid event arguments: event validation failed for event \"${event}\".`\r\n );\r\n }\r\n }\r\n }\r\n }\r\n }\r\n let args = rawArgs;\r\n const isModelListener = event.startsWith(\"update:\");\r\n const modelArg = isModelListener && event.slice(7);\r\n if (modelArg && modelArg in props) {\r\n const modifiersKey = `${modelArg === \"modelValue\" ? \"model\" : modelArg}Modifiers`;\r\n const { number, trim } = props[modifiersKey] || EMPTY_OBJ;\r\n if (trim) {\r\n args = rawArgs.map((a) => isString(a) ? a.trim() : a);\r\n }\r\n if (number) {\r\n args = rawArgs.map(looseToNumber);\r\n }\r\n }\r\n if (!!(process.env.NODE_ENV !== \"production\") || __VUE_PROD_DEVTOOLS__) {\r\n devtoolsComponentEmit(instance, event, args);\r\n }\r\n if (!!(process.env.NODE_ENV !== \"production\")) {\r\n const lowerCaseEvent = event.toLowerCase();\r\n if (lowerCaseEvent !== event && props[toHandlerKey(lowerCaseEvent)]) {\r\n warn$1(\r\n `Event \"${lowerCaseEvent}\" is emitted in component ${formatComponentName(\r\n instance,\r\n instance.type\r\n )} but the handler is registered for \"${event}\". Note that HTML attributes are case-insensitive and you cannot use v-on to listen to camelCase events when using in-DOM templates. You should probably use \"${hyphenate(\r\n event\r\n )}\" instead of \"${event}\".`\r\n );\r\n }\r\n }\r\n let handlerName;\r\n let handler = props[handlerName = toHandlerKey(event)] || // also try camelCase event handler (#2249)\r\n props[handlerName = toHandlerKey(camelize(event))];\r\n if (!handler && isModelListener) {\r\n handler = props[handlerName = toHandlerKey(hyphenate(event))];\r\n }\r\n if (handler) {\r\n callWithAsyncErrorHandling(\r\n handler,\r\n instance,\r\n 6,\r\n args\r\n );\r\n }\r\n const onceHandler = props[handlerName + `Once`];\r\n if (onceHandler) {\r\n if (!instance.emitted) {\r\n instance.emitted = {};\r\n } else if (instance.emitted[handlerName]) {\r\n return;\r\n }\r\n instance.emitted[handlerName] = true;\r\n callWithAsyncErrorHandling(\r\n onceHandler,\r\n instance,\r\n 6,\r\n args\r\n );\r\n }\r\n}\r\nfunction normalizeEmitsOptions(comp, appContext, asMixin = false) {\r\n const cache = appContext.emitsCache;\r\n const cached = cache.get(comp);\r\n if (cached !== void 0) {\r\n return cached;\r\n }\r\n const raw = comp.emits;\r\n let normalized = {};\r\n let hasExtends = false;\r\n if (__VUE_OPTIONS_API__ && !isFunction(comp)) {\r\n const extendEmits = (raw2) => {\r\n const normalizedFromExtend = normalizeEmitsOptions(raw2, appContext, true);\r\n if (normalizedFromExtend) {\r\n hasExtends = true;\r\n extend(normalized, normalizedFromExtend);\r\n }\r\n };\r\n if (!asMixin && appContext.mixins.length) {\r\n appContext.mixins.forEach(extendEmits);\r\n }\r\n if (comp.extends) {\r\n extendEmits(comp.extends);\r\n }\r\n if (comp.mixins) {\r\n comp.mixins.forEach(extendEmits);\r\n }\r\n }\r\n if (!raw && !hasExtends) {\r\n if (isObject(comp)) {\r\n cache.set(comp, null);\r\n }\r\n return null;\r\n }\r\n if (isArray(raw)) {\r\n raw.forEach((key) => normalized[key] = null);\r\n } else {\r\n extend(normalized, raw);\r\n }\r\n if (isObject(comp)) {\r\n cache.set(comp, normalized);\r\n }\r\n return normalized;\r\n}\r\nfunction isEmitListener(options, key) {\r\n if (!options || !isOn(key)) {\r\n return false;\r\n }\r\n key = key.slice(2).replace(/Once$/, \"\");\r\n return hasOwn(options, key[0].toLowerCase() + key.slice(1)) || hasOwn(options, hyphenate(key)) || hasOwn(options, key);\r\n}\r\n\r\nlet currentRenderingInstance = null;\r\nlet currentScopeId = null;\r\nfunction setCurrentRenderingInstance(instance) {\r\n const prev = currentRenderingInstance;\r\n currentRenderingInstance = instance;\r\n currentScopeId = instance && instance.type.__scopeId || null;\r\n return prev;\r\n}\r\nconst withScopeId = (_id) => withCtx;\r\nfunction withCtx(fn, ctx = currentRenderingInstance, isNonScopedSlot) {\r\n if (!ctx)\r\n return fn;\r\n if (fn._n) {\r\n return fn;\r\n }\r\n const renderFnWithContext = (...args) => {\r\n if (renderFnWithContext._d) {\r\n setBlockTracking(-1);\r\n }\r\n const prevInstance = setCurrentRenderingInstance(ctx);\r\n let res;\r\n try {\r\n res = fn(...args);\r\n } finally {\r\n setCurrentRenderingInstance(prevInstance);\r\n if (renderFnWithContext._d) {\r\n setBlockTracking(1);\r\n }\r\n }\r\n if (!!(process.env.NODE_ENV !== \"production\") || __VUE_PROD_DEVTOOLS__) {\r\n devtoolsComponentUpdated(ctx);\r\n }\r\n return res;\r\n };\r\n renderFnWithContext._n = true;\r\n renderFnWithContext._c = true;\r\n renderFnWithContext._d = true;\r\n return renderFnWithContext;\r\n}\r\n\r\nfunction markAttrsAccessed() {\r\n}\r\n\r\nconst COMPONENTS = \"components\";\r\nconst DIRECTIVES = \"directives\";\r\nfunction resolveComponent(name, maybeSelfReference) {\r\n return resolveAsset(COMPONENTS, name, true, maybeSelfReference) || name;\r\n}\r\nconst NULL_DYNAMIC_COMPONENT = Symbol.for(\"v-ndc\");\r\nfunction resolveDirective(name) {\r\n return resolveAsset(DIRECTIVES, name);\r\n}\r\nfunction resolveAsset(type, name, warnMissing = true, maybeSelfReference = false) {\r\n const instance = currentRenderingInstance || currentInstance;\r\n if (instance) {\r\n const Component = instance.type;\r\n if (type === COMPONENTS) {\r\n const selfName = getComponentName(\r\n Component,\r\n false\r\n );\r\n if (selfName && (selfName === name || selfName === camelize(name) || selfName === capitalize(camelize(name)))) {\r\n return Component;\r\n }\r\n }\r\n const res = (\r\n // local registration\r\n // check instance[type] first which is resolved for options API\r\n resolve(instance[type] || Component[type], name) || // global registration\r\n resolve(instance.appContext[type], name)\r\n );\r\n if (!res && maybeSelfReference) {\r\n return Component;\r\n }\r\n if (!!(process.env.NODE_ENV !== \"production\") && warnMissing && !res) {\r\n const extra = type === COMPONENTS ? `\r\nIf this is a native custom element, make sure to exclude it from component resolution via compilerOptions.isCustomElement.` : ``;\r\n warn$1(`Failed to resolve ${type.slice(0, -1)}: ${name}${extra}`);\r\n }\r\n return res;\r\n } else if (!!(process.env.NODE_ENV !== \"production\")) {\r\n warn$1(\r\n `resolve${capitalize(type.slice(0, -1))} can only be used in render() or setup().`\r\n );\r\n }\r\n}\r\nfunction resolve(registry, name) {\r\n return registry && (registry[name] || registry[camelize(name)] || registry[capitalize(camelize(name))]);\r\n}\r\n\r\nconst ssrContextKey = Symbol.for(\"v-scx\");\r\nconst useSSRContext = () => {\r\n {\r\n const ctx = inject(ssrContextKey);\r\n if (!ctx) {\r\n !!(process.env.NODE_ENV !== \"production\") && warn$1(\r\n `Server rendering context not provided. Make sure to only call useSSRContext() conditionally in the server build.`\r\n );\r\n }\r\n return ctx;\r\n }\r\n};\r\n\r\nfunction watchEffect(effect, options) {\r\n return doWatch(effect, null, options);\r\n}\r\nfunction watchPostEffect(effect, options) {\r\n return doWatch(\r\n effect,\r\n null,\r\n !!(process.env.NODE_ENV !== \"production\") ? extend({}, options, { flush: \"post\" }) : { flush: \"post\" }\r\n );\r\n}\r\nfunction watchSyncEffect(effect, options) {\r\n return doWatch(\r\n effect,\r\n null,\r\n !!(process.env.NODE_ENV !== \"production\") ? extend({}, options, { flush: \"sync\" }) : { flush: \"sync\" }\r\n );\r\n}\r\nconst INITIAL_WATCHER_VALUE = {};\r\nfunction watch(source, cb, options) {\r\n if (!!(process.env.NODE_ENV !== \"production\") && !isFunction(cb)) {\r\n warn$1(\r\n `\\`watch(fn, options?)\\` signature has been moved to a separate API. Use \\`watchEffect(fn, options?)\\` instead. \\`watch\\` now only supports \\`watch(source, cb, options?) signature.`\r\n );\r\n }\r\n return doWatch(source, cb, options);\r\n}\r\nfunction doWatch(source, cb, {\r\n immediate,\r\n deep,\r\n flush,\r\n once,\r\n onTrack,\r\n onTrigger\r\n} = EMPTY_OBJ) {\r\n if (cb && once) {\r\n const _cb = cb;\r\n cb = (...args) => {\r\n _cb(...args);\r\n unwatch();\r\n };\r\n }\r\n if (!!(process.env.NODE_ENV !== \"production\") && deep !== void 0 && typeof deep === \"number\") {\r\n warn$1(\r\n `watch() \"deep\" option with number value will be used as watch depth in future versions. Please use a boolean instead to avoid potential breakage.`\r\n );\r\n }\r\n if (!!(process.env.NODE_ENV !== \"production\") && !cb) {\r\n if (immediate !== void 0) {\r\n warn$1(\r\n `watch() \"immediate\" option is only respected when using the watch(source, callback, options?) signature.`\r\n );\r\n }\r\n if (deep !== void 0) {\r\n warn$1(\r\n `watch() \"deep\" option is only respected when using the watch(source, callback, options?) signature.`\r\n );\r\n }\r\n if (once !== void 0) {\r\n warn$1(\r\n `watch() \"once\" option is only respected when using the watch(source, callback, options?) signature.`\r\n );\r\n }\r\n }\r\n const warnInvalidSource = (s) => {\r\n warn$1(\r\n `Invalid watch source: `,\r\n s,\r\n `A watch source can only be a getter/effect function, a ref, a reactive object, or an array of these types.`\r\n );\r\n };\r\n const instance = currentInstance;\r\n const reactiveGetter = (source2) => deep === true ? source2 : (\r\n // for deep: false, only traverse root-level properties\r\n traverse(source2, deep === false ? 1 : void 0)\r\n );\r\n let getter;\r\n let forceTrigger = false;\r\n let isMultiSource = false;\r\n if (isRef(source)) {\r\n getter = () => source.value;\r\n forceTrigger = isShallow(source);\r\n } else if (isReactive(source)) {\r\n getter = () => reactiveGetter(source);\r\n forceTrigger = true;\r\n } else if (isArray(source)) {\r\n isMultiSource = true;\r\n forceTrigger = source.some((s) => isReactive(s) || isShallow(s));\r\n getter = () => source.map((s) => {\r\n if (isRef(s)) {\r\n return s.value;\r\n } else if (isReactive(s)) {\r\n return reactiveGetter(s);\r\n } else if (isFunction(s)) {\r\n return callWithErrorHandling(s, instance, 2);\r\n } else {\r\n !!(process.env.NODE_ENV !== \"production\") && warnInvalidSource(s);\r\n }\r\n });\r\n } else if (isFunction(source)) {\r\n if (cb) {\r\n getter = () => callWithErrorHandling(source, instance, 2);\r\n } else {\r\n getter = () => {\r\n if (cleanup) {\r\n cleanup();\r\n }\r\n return callWithAsyncErrorHandling(\r\n source,\r\n instance,\r\n 3,\r\n [onCleanup]\r\n );\r\n };\r\n }\r\n } else {\r\n getter = NOOP;\r\n !!(process.env.NODE_ENV !== \"production\") && warnInvalidSource(source);\r\n }\r\n if (cb && deep) {\r\n const baseGetter = getter;\r\n getter = () => traverse(baseGetter());\r\n }\r\n let cleanup;\r\n let onCleanup = (fn) => {\r\n cleanup = effect.onStop = () => {\r\n callWithErrorHandling(fn, instance, 4);\r\n cleanup = effect.onStop = void 0;\r\n };\r\n };\r\n let oldValue = isMultiSource ? new Array(source.length).fill(INITIAL_WATCHER_VALUE) : INITIAL_WATCHER_VALUE;\r\n const job = () => {\r\n if (!effect.active || !effect.dirty) {\r\n return;\r\n }\r\n if (cb) {\r\n const newValue = effect.run();\r\n if (deep || forceTrigger || (isMultiSource ? newValue.some((v, i) => hasChanged(v, oldValue[i])) : hasChanged(newValue, oldValue)) || false) {\r\n if (cleanup) {\r\n cleanup();\r\n }\r\n callWithAsyncErrorHandling(cb, instance, 3, [\r\n newValue,\r\n // pass undefined as the old value when it's changed for the first time\r\n oldValue === INITIAL_WATCHER_VALUE ? void 0 : isMultiSource && oldValue[0] === INITIAL_WATCHER_VALUE ? [] : oldValue,\r\n onCleanup\r\n ]);\r\n oldValue = newValue;\r\n }\r\n } else {\r\n effect.run();\r\n }\r\n };\r\n job.allowRecurse = !!cb;\r\n let scheduler;\r\n if (flush === \"sync\") {\r\n scheduler = job;\r\n } else if (flush === \"post\") {\r\n scheduler = () => queuePostRenderEffect$1(job, instance && instance.suspense);\r\n } else {\r\n job.pre = true;\r\n if (instance)\r\n job.id = instance.uid;\r\n scheduler = () => queueJob(job);\r\n }\r\n const effect = new ReactiveEffect(getter, NOOP, scheduler);\r\n const scope = getCurrentScope();\r\n const unwatch = () => {\r\n effect.stop();\r\n if (scope) {\r\n remove(scope.effects, effect);\r\n }\r\n };\r\n if (!!(process.env.NODE_ENV !== \"production\")) {\r\n effect.onTrack = onTrack;\r\n effect.onTrigger = onTrigger;\r\n }\r\n if (cb) {\r\n if (immediate) {\r\n job();\r\n } else {\r\n oldValue = effect.run();\r\n }\r\n } else if (flush === \"post\") {\r\n queuePostRenderEffect$1(\r\n effect.run.bind(effect),\r\n instance && instance.suspense\r\n );\r\n } else {\r\n effect.run();\r\n }\r\n return unwatch;\r\n}\r\nfunction instanceWatch(source, value, options) {\r\n const publicThis = this.proxy;\r\n const getter = isString(source) ? source.includes(\".\") ? createPathGetter(publicThis, source) : () => publicThis[source] : source.bind(publicThis, publicThis);\r\n let cb;\r\n if (isFunction(value)) {\r\n cb = value;\r\n } else {\r\n cb = value.handler;\r\n options = value;\r\n }\r\n const reset = setCurrentInstance(this);\r\n const res = doWatch(getter, cb.bind(publicThis), options);\r\n reset();\r\n return res;\r\n}\r\nfunction createPathGetter(ctx, path) {\r\n const segments = path.split(\".\");\r\n return () => {\r\n let cur = ctx;\r\n for (let i = 0; i < segments.length && cur; i++) {\r\n cur = cur[segments[i]];\r\n }\r\n return cur;\r\n };\r\n}\r\nfunction traverse(value, depth, currentDepth = 0, seen) {\r\n if (!isObject(value) || value[\"__v_skip\"]) {\r\n return value;\r\n }\r\n if (depth && depth > 0) {\r\n if (currentDepth >= depth) {\r\n return value;\r\n }\r\n currentDepth++;\r\n }\r\n seen = seen || /* @__PURE__ */ new Set();\r\n if (seen.has(value)) {\r\n return value;\r\n }\r\n seen.add(value);\r\n if (isRef(value)) {\r\n traverse(value.value, depth, currentDepth, seen);\r\n } else if (isArray(value)) {\r\n for (let i = 0; i < value.length; i++) {\r\n traverse(value[i], depth, currentDepth, seen);\r\n }\r\n } else if (isSet(value) || isMap(value)) {\r\n value.forEach((v) => {\r\n traverse(v, depth, currentDepth, seen);\r\n });\r\n } else if (isPlainObject(value)) {\r\n for (const key in value) {\r\n traverse(value[key], depth, currentDepth, seen);\r\n }\r\n }\r\n return value;\r\n}\r\n\r\nfunction validateDirectiveName(name) {\r\n if (isBuiltInDirective(name)) {\r\n warn$1(\"Do not use built-in directive ids as custom directive id: \" + name);\r\n }\r\n}\r\nfunction withDirectives(vnode, directives) {\r\n if (currentRenderingInstance === null) {\r\n !!(process.env.NODE_ENV !== \"production\") && warn$1(`withDirectives can only be used inside render functions.`);\r\n return vnode;\r\n }\r\n const instance = getExposeProxy(currentRenderingInstance) || currentRenderingInstance.proxy;\r\n const bindings = vnode.dirs || (vnode.dirs = []);\r\n for (let i = 0; i < directives.length; i++) {\r\n let [dir, value, arg, modifiers = EMPTY_OBJ] = directives[i];\r\n if (dir) {\r\n if (isFunction(dir)) {\r\n dir = {\r\n mounted: dir,\r\n updated: dir\r\n };\r\n }\r\n if (dir.deep) {\r\n traverse(value);\r\n }\r\n bindings.push({\r\n dir,\r\n instance,\r\n value,\r\n oldValue: void 0,\r\n arg,\r\n modifiers\r\n });\r\n }\r\n }\r\n return vnode;\r\n}\r\n\r\nfunction createAppContext() {\r\n return {\r\n app: null,\r\n config: {\r\n isNativeTag: NO,\r\n performance: false,\r\n globalProperties: {},\r\n optionMergeStrategies: {},\r\n errorHandler: void 0,\r\n warnHandler: void 0,\r\n compilerOptions: {}\r\n },\r\n mixins: [],\r\n components: {},\r\n directives: {},\r\n provides: /* @__PURE__ */ Object.create(null),\r\n optionsCache: /* @__PURE__ */ new WeakMap(),\r\n propsCache: /* @__PURE__ */ new WeakMap(),\r\n emitsCache: /* @__PURE__ */ new WeakMap()\r\n };\r\n}\r\nlet uid$1 = 0;\r\nfunction createAppAPI(render, hydrate) {\r\n return function createApp(rootComponent, rootProps = null) {\r\n if (!isFunction(rootComponent)) {\r\n rootComponent = extend({}, rootComponent);\r\n }\r\n if (rootProps != null && !isObject(rootProps)) {\r\n !!(process.env.NODE_ENV !== \"production\") && warn$1(`root props passed to app.mount() must be an object.`);\r\n rootProps = null;\r\n }\r\n const context = createAppContext();\r\n const installedPlugins = /* @__PURE__ */ new WeakSet();\r\n const app = context.app = {\r\n _uid: uid$1++,\r\n _component: rootComponent,\r\n _props: rootProps,\r\n _container: null,\r\n _context: context,\r\n _instance: null,\r\n version,\r\n get config() {\r\n return context.config;\r\n },\r\n set config(v) {\r\n if (!!(process.env.NODE_ENV !== \"production\")) {\r\n warn$1(\r\n `app.config cannot be replaced. Modify individual options instead.`\r\n );\r\n }\r\n },\r\n use(plugin, ...options) {\r\n if (installedPlugins.has(plugin)) {\r\n !!(process.env.NODE_ENV !== \"production\") && warn$1(`Plugin has already been applied to target app.`);\r\n } else if (plugin && isFunction(plugin.install)) {\r\n installedPlugins.add(plugin);\r\n plugin.install(app, ...options);\r\n } else if (isFunction(plugin)) {\r\n installedPlugins.add(plugin);\r\n plugin(app, ...options);\r\n } else if (!!(process.env.NODE_ENV !== \"production\")) {\r\n warn$1(\r\n `A plugin must either be a function or an object with an \"install\" function.`\r\n );\r\n }\r\n return app;\r\n },\r\n mixin(mixin) {\r\n if (__VUE_OPTIONS_API__) {\r\n if (!context.mixins.includes(mixin)) {\r\n context.mixins.push(mixin);\r\n } else if (!!(process.env.NODE_ENV !== \"production\")) {\r\n warn$1(\r\n \"Mixin has already been applied to target app\" + (mixin.name ? `: ${mixin.name}` : \"\")\r\n );\r\n }\r\n } else if (!!(process.env.NODE_ENV !== \"production\")) {\r\n warn$1(\"Mixins are only available in builds supporting Options API\");\r\n }\r\n return app;\r\n },\r\n component(name, component) {\r\n if (!!(process.env.NODE_ENV !== \"production\")) {\r\n validateComponentName(name, context.config);\r\n }\r\n if (!component) {\r\n return context.components[name];\r\n }\r\n if (!!(process.env.NODE_ENV !== \"production\") && context.components[name]) {\r\n warn$1(`Component \"${name}\" has already been registered in target app.`);\r\n }\r\n context.components[name] = component;\r\n return app;\r\n },\r\n directive(name, directive) {\r\n if (!!(process.env.NODE_ENV !== \"production\")) {\r\n validateDirectiveName(name);\r\n }\r\n if (!directive) {\r\n return context.directives[name];\r\n }\r\n if (!!(process.env.NODE_ENV !== \"production\") && context.directives[name]) {\r\n warn$1(`Directive \"${name}\" has already been registered in target app.`);\r\n }\r\n context.directives[name] = directive;\r\n return app;\r\n },\r\n // fixed by xxxxxx\r\n mount() {\r\n },\r\n // fixed by xxxxxx\r\n unmount() {\r\n },\r\n provide(key, value) {\r\n if (!!(process.env.NODE_ENV !== \"production\") && key in context.provides) {\r\n warn$1(\r\n `App already provides property with key \"${String(key)}\". It will be overwritten with the new value.`\r\n );\r\n }\r\n context.provides[key] = value;\r\n return app;\r\n },\r\n runWithContext(fn) {\r\n const lastApp = currentApp;\r\n currentApp = app;\r\n try {\r\n return fn();\r\n } finally {\r\n currentApp = lastApp;\r\n }\r\n }\r\n };\r\n return app;\r\n };\r\n}\r\nlet currentApp = null;\r\n\r\nfunction provide(key, value) {\r\n if (!currentInstance) {\r\n if (!!(process.env.NODE_ENV !== \"production\")) {\r\n warn$1(`provide() can only be used inside setup().`);\r\n }\r\n } else {\r\n let provides = currentInstance.provides;\r\n const parentProvides = currentInstance.parent && currentInstance.parent.provides;\r\n if (parentProvides === provides) {\r\n provides = currentInstance.provides = Object.create(parentProvides);\r\n }\r\n provides[key] = value;\r\n if (currentInstance.type.mpType === \"app\") {\r\n currentInstance.appContext.app.provide(key, value);\r\n }\r\n }\r\n}\r\nfunction inject(key, defaultValue, treatDefaultAsFactory = false) {\r\n const instance = currentInstance || currentRenderingInstance;\r\n if (instance || currentApp) {\r\n const provides = instance ? instance.parent == null ? instance.vnode.appContext && instance.vnode.appContext.provides : instance.parent.provides : currentApp._context.provides;\r\n if (provides && key in provides) {\r\n return provides[key];\r\n } else if (arguments.length > 1) {\r\n return treatDefaultAsFactory && isFunction(defaultValue) ? defaultValue.call(instance && instance.proxy) : defaultValue;\r\n } else if (!!(process.env.NODE_ENV !== \"production\")) {\r\n warn$1(`injection \"${String(key)}\" not found.`);\r\n }\r\n } else if (!!(process.env.NODE_ENV !== \"production\")) {\r\n warn$1(`inject() can only be used inside setup() or functional components.`);\r\n }\r\n}\r\nfunction hasInjectionContext() {\r\n return !!(currentInstance || currentRenderingInstance || currentApp);\r\n}\r\n\r\n/*! #__NO_SIDE_EFFECTS__ */\r\n// @__NO_SIDE_EFFECTS__\r\nfunction defineComponent(options, extraOptions) {\r\n return isFunction(options) ? (\r\n // #8326: extend call and options.name access are considered side-effects\r\n // by Rollup, so we have to wrap it in a pure-annotated IIFE.\r\n /* @__PURE__ */ (() => extend({ name: options.name }, extraOptions, { setup: options }))()\r\n ) : options;\r\n}\r\n\r\nconst isKeepAlive = (vnode) => vnode.type.__isKeepAlive;\r\nfunction onActivated(hook, target) {\r\n registerKeepAliveHook(hook, \"a\", target);\r\n}\r\nfunction onDeactivated(hook, target) {\r\n registerKeepAliveHook(hook, \"da\", target);\r\n}\r\nfunction registerKeepAliveHook(hook, type, target = currentInstance) {\r\n const wrappedHook = hook.__wdc || (hook.__wdc = () => {\r\n let current = target;\r\n while (current) {\r\n if (current.isDeactivated) {\r\n return;\r\n }\r\n current = current.parent;\r\n }\r\n return hook();\r\n });\r\n injectHook(type, wrappedHook, target);\r\n if (target) {\r\n let current = target.parent;\r\n while (current && current.parent) {\r\n if (isKeepAlive(current.parent.vnode)) {\r\n injectToKeepAliveRoot(wrappedHook, type, target, current);\r\n }\r\n current = current.parent;\r\n }\r\n }\r\n}\r\nfunction injectToKeepAliveRoot(hook, type, target, keepAliveRoot) {\r\n const injected = injectHook(\r\n type,\r\n hook,\r\n keepAliveRoot,\r\n true\r\n /* prepend */\r\n );\r\n onUnmounted(() => {\r\n remove(keepAliveRoot[type], injected);\r\n }, target);\r\n}\r\n\r\nfunction injectHook(type, hook, target = currentInstance, prepend = false) {\r\n if (target) {\r\n if (isRootHook(type)) {\r\n target = target.root;\r\n }\r\n const hooks = target[type] || (target[type] = []);\r\n const wrappedHook = hook.__weh || (hook.__weh = (...args) => {\r\n if (target.isUnmounted) {\r\n return;\r\n }\r\n pauseTracking();\r\n const reset = setCurrentInstance(target);\r\n const res = callWithAsyncErrorHandling(hook, target, type, args);\r\n reset();\r\n resetTracking();\r\n return res;\r\n });\r\n if (prepend) {\r\n hooks.unshift(wrappedHook);\r\n } else {\r\n hooks.push(wrappedHook);\r\n }\r\n return wrappedHook;\r\n } else if (!!(process.env.NODE_ENV !== \"production\")) {\r\n const apiName = toHandlerKey(\r\n (ErrorTypeStrings[type] || type.replace(/^on/, \"\")).replace(/ hook$/, \"\")\r\n );\r\n warn$1(\r\n `${apiName} is called when there is no active component instance to be associated with. Lifecycle injection APIs can only be used during execution of setup().` + (``)\r\n );\r\n }\r\n}\r\nconst createHook = (lifecycle) => (hook, target = currentInstance) => (\r\n // post-create lifecycle registrations are noops during SSR (except for serverPrefetch)\r\n (!isInSSRComponentSetup || lifecycle === \"sp\") && injectHook(lifecycle, (...args) => hook(...args), target)\r\n);\r\nconst onBeforeMount = createHook(\"bm\");\r\nconst onMounted = createHook(\"m\");\r\nconst onBeforeUpdate = createHook(\"bu\");\r\nconst onUpdated = createHook(\"u\");\r\nconst onBeforeUnmount = createHook(\"bum\");\r\nconst onUnmounted = createHook(\"um\");\r\nconst onServerPrefetch = createHook(\"sp\");\r\nconst onRenderTriggered = createHook(\r\n \"rtg\"\r\n);\r\nconst onRenderTracked = createHook(\r\n \"rtc\"\r\n);\r\nfunction onErrorCaptured(hook, target = currentInstance) {\r\n injectHook(\"ec\", hook, target);\r\n}\r\n\r\nfunction toHandlers(obj, preserveCaseIfNecessary) {\r\n const ret = {};\r\n if (!!(process.env.NODE_ENV !== \"production\") && !isObject(obj)) {\r\n warn$1(`v-on with no argument expects an object value.`);\r\n return ret;\r\n }\r\n for (const key in obj) {\r\n ret[preserveCaseIfNecessary && /[A-Z]/.test(key) ? `on:${key}` : toHandlerKey(key)] = obj[key];\r\n }\r\n return ret;\r\n}\r\n\r\nconst getPublicInstance = (i) => {\r\n if (!i)\r\n return null;\r\n if (isStatefulComponent(i))\r\n return getExposeProxy(i) || i.proxy;\r\n return getPublicInstance(i.parent);\r\n};\r\nconst publicPropertiesMap = (\r\n // Move PURE marker to new line to workaround compiler discarding it\r\n // due to type annotation\r\n /* @__PURE__ */ extend(/* @__PURE__ */ Object.create(null), {\r\n $: (i) => i,\r\n // fixed by xxxxxx vue-i18n 在 dev 模式,访问了 $el,故模拟一个假的\r\n // $el: i => i.vnode.el,\r\n $el: (i) => i.__$el || (i.__$el = {}),\r\n $data: (i) => i.data,\r\n $props: (i) => !!(process.env.NODE_ENV !== \"production\") ? shallowReadonly(i.props) : i.props,\r\n $attrs: (i) => !!(process.env.NODE_ENV !== \"production\") ? shallowReadonly(i.attrs) : i.attrs,\r\n $slots: (i) => !!(process.env.NODE_ENV !== \"production\") ? shallowReadonly(i.slots) : i.slots,\r\n $refs: (i) => !!(process.env.NODE_ENV !== \"production\") ? shallowReadonly(i.refs) : i.refs,\r\n $parent: (i) => getPublicInstance(i.parent),\r\n $root: (i) => getPublicInstance(i.root),\r\n $emit: (i) => i.emit,\r\n $options: (i) => __VUE_OPTIONS_API__ ? resolveMergedOptions(i) : i.type,\r\n $forceUpdate: (i) => i.f || (i.f = () => {\r\n i.effect.dirty = true;\r\n queueJob(i.update);\r\n }),\r\n // $nextTick: i => i.n || (i.n = nextTick.bind(i.proxy!)),// fixed by xxxxxx\r\n $watch: (i) => __VUE_OPTIONS_API__ ? instanceWatch.bind(i) : NOOP\r\n })\r\n);\r\nconst isReservedPrefix = (key) => key === \"_\" || key === \"$\";\r\nconst hasSetupBinding = (state, key) => state !== EMPTY_OBJ && !state.__isScriptSetup && hasOwn(state, key);\r\nconst PublicInstanceProxyHandlers = {\r\n get({ _: instance }, key) {\r\n const { ctx, setupState, data, props, accessCache, type, appContext } = instance;\r\n if (!!(process.env.NODE_ENV !== \"production\") && key === \"__isVue\") {\r\n return true;\r\n }\r\n let normalizedProps;\r\n if (key[0] !== \"$\") {\r\n const n = accessCache[key];\r\n if (n !== void 0) {\r\n switch (n) {\r\n case 1 /* SETUP */:\r\n return setupState[key];\r\n case 2 /* DATA */:\r\n return data[key];\r\n case 4 /* CONTEXT */:\r\n return ctx[key];\r\n case 3 /* PROPS */:\r\n return props[key];\r\n }\r\n } else if (hasSetupBinding(setupState, key)) {\r\n accessCache[key] = 1 /* SETUP */;\r\n return setupState[key];\r\n } else if (data !== EMPTY_OBJ && hasOwn(data, key)) {\r\n accessCache[key] = 2 /* DATA */;\r\n return data[key];\r\n } else if (\r\n // only cache other properties when instance has declared (thus stable)\r\n // props\r\n (normalizedProps = instance.propsOptions[0]) && hasOwn(normalizedProps, key)\r\n ) {\r\n accessCache[key] = 3 /* PROPS */;\r\n return props[key];\r\n } else if (ctx !== EMPTY_OBJ && hasOwn(ctx, key)) {\r\n accessCache[key] = 4 /* CONTEXT */;\r\n return ctx[key];\r\n } else if (!__VUE_OPTIONS_API__ || shouldCacheAccess) {\r\n accessCache[key] = 0 /* OTHER */;\r\n }\r\n }\r\n const publicGetter = publicPropertiesMap[key];\r\n let cssModule, globalProperties;\r\n if (publicGetter) {\r\n if (key === \"$attrs\") {\r\n track(instance, \"get\", key);\r\n !!(process.env.NODE_ENV !== \"production\") && markAttrsAccessed();\r\n } else if (!!(process.env.NODE_ENV !== \"production\") && key === \"$slots\") {\r\n track(instance, \"get\", key);\r\n }\r\n return publicGetter(instance);\r\n } else if (\r\n // css module (injected by vue-loader)\r\n (cssModule = type.__cssModules) && (cssModule = cssModule[key])\r\n ) {\r\n return cssModule;\r\n } else if (ctx !== EMPTY_OBJ && hasOwn(ctx, key)) {\r\n accessCache[key] = 4 /* CONTEXT */;\r\n return ctx[key];\r\n } else if (\r\n // global properties\r\n globalProperties = appContext.config.globalProperties, hasOwn(globalProperties, key)\r\n ) {\r\n {\r\n return globalProperties[key];\r\n }\r\n } else if (!!(process.env.NODE_ENV !== \"production\") && currentRenderingInstance && (!isString(key) || // #1091 avoid internal isRef/isVNode checks on component instance leading\r\n // to infinite warning loop\r\n key.indexOf(\"__v\") !== 0)) {\r\n if (data !== EMPTY_OBJ && isReservedPrefix(key[0]) && hasOwn(data, key)) {\r\n warn$1(\r\n `Property ${JSON.stringify(\r\n key\r\n )} must be accessed via $data because it starts with a reserved character (\"$\" or \"_\") and is not proxied on the render context.`\r\n );\r\n } else if (instance === currentRenderingInstance) {\r\n warn$1(\r\n `Property ${JSON.stringify(key)} was accessed during render but is not defined on instance.`\r\n );\r\n }\r\n }\r\n },\r\n set({ _: instance }, key, value) {\r\n const { data, setupState, ctx } = instance;\r\n if (hasSetupBinding(setupState, key)) {\r\n setupState[key] = value;\r\n return true;\r\n } else if (!!(process.env.NODE_ENV !== \"production\") && setupState.__isScriptSetup && hasOwn(setupState, key)) {\r\n warn$1(`Cannot mutate