@vue/compat 3.4.0-alpha.3 → 3.4.0-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -11,8 +11,8 @@ var Vue = (function () {
11
11
  const NOOP = () => {
12
12
  };
13
13
  const NO = () => false;
14
- const onRE = /^on[^a-z]/;
15
- const isOn = (key) => onRE.test(key);
14
+ const isOn = (key) => key.charCodeAt(0) === 111 && key.charCodeAt(1) === 110 && // uppercase letter
15
+ (key.charCodeAt(2) > 122 || key.charCodeAt(2) < 97);
16
16
  const isModelListener = (key) => key.startsWith("onUpdate:");
17
17
  const extend = Object.assign;
18
18
  const remove = (arr, el) => {
@@ -120,7 +120,7 @@ var Vue = (function () {
120
120
  [3]: "FORWARDED"
121
121
  };
122
122
 
123
- const 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";
123
+ const 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";
124
124
  const isGloballyAllowed = /* @__PURE__ */ makeMap(GLOBALS_ALLOWED);
125
125
 
126
126
  const range = 2;
@@ -193,6 +193,20 @@ var Vue = (function () {
193
193
  });
194
194
  return ret;
195
195
  }
196
+ function stringifyStyle(styles) {
197
+ let ret = "";
198
+ if (!styles || isString(styles)) {
199
+ return ret;
200
+ }
201
+ for (const key in styles) {
202
+ const value = styles[key];
203
+ const normalizedKey = key.startsWith(`--`) ? key : hyphenate(key);
204
+ if (isString(value) || typeof value === "number") {
205
+ ret += `${normalizedKey}:${value};`;
206
+ }
207
+ }
208
+ return ret;
209
+ }
196
210
  function normalizeClass(value) {
197
211
  let res = "";
198
212
  if (isString(value)) {
@@ -228,16 +242,27 @@ var Vue = (function () {
228
242
 
229
243
  const 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";
230
244
  const 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";
245
+ const MATH_TAGS = "math,maction,annotation,annotation-xml,menclose,merror,mfenced,mfrac,mi,mmultiscripts,mn,mo,mover,mpadded,mphantom,mprescripts,mroot,mrow,ms,semantics,mspace,msqrt,mstyle,msub,msup,msubsup,mtable,mtd,mtext,mtr,munder,munderover";
231
246
  const VOID_TAGS = "area,base,br,col,embed,hr,img,input,link,meta,param,source,track,wbr";
232
247
  const isHTMLTag = /* @__PURE__ */ makeMap(HTML_TAGS);
233
248
  const isSVGTag = /* @__PURE__ */ makeMap(SVG_TAGS);
249
+ const isMathMLTag = /* @__PURE__ */ makeMap(MATH_TAGS);
234
250
  const isVoidTag = /* @__PURE__ */ makeMap(VOID_TAGS);
235
251
 
236
252
  const specialBooleanAttrs = `itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly`;
237
253
  const isSpecialBooleanAttr = /* @__PURE__ */ makeMap(specialBooleanAttrs);
254
+ const isBooleanAttr = /* @__PURE__ */ makeMap(
255
+ specialBooleanAttrs + `,async,autofocus,autoplay,controls,default,defer,disabled,hidden,inert,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected`
256
+ );
238
257
  function includeBooleanAttr(value) {
239
258
  return !!value || value === "";
240
259
  }
260
+ const isKnownHtmlAttr = /* @__PURE__ */ makeMap(
261
+ `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`
262
+ );
263
+ const isKnownSvgAttr = /* @__PURE__ */ makeMap(
264
+ `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`
265
+ );
241
266
 
242
267
  function looseCompareArrays(a, b) {
243
268
  if (a.length !== b.length)
@@ -299,20 +324,29 @@ var Vue = (function () {
299
324
  return replacer(_key, val.value);
300
325
  } else if (isMap(val)) {
301
326
  return {
302
- [`Map(${val.size})`]: [...val.entries()].reduce((entries, [key, val2]) => {
303
- entries[`${key} =>`] = val2;
304
- return entries;
305
- }, {})
327
+ [`Map(${val.size})`]: [...val.entries()].reduce(
328
+ (entries, [key, val2], i) => {
329
+ entries[stringifySymbol(key, i) + " =>"] = val2;
330
+ return entries;
331
+ },
332
+ {}
333
+ )
306
334
  };
307
335
  } else if (isSet(val)) {
308
336
  return {
309
- [`Set(${val.size})`]: [...val.values()]
337
+ [`Set(${val.size})`]: [...val.values()].map((v) => stringifySymbol(v))
310
338
  };
339
+ } else if (isSymbol(val)) {
340
+ return stringifySymbol(val);
311
341
  } else if (isObject(val) && !isArray(val) && !isPlainObject(val)) {
312
342
  return String(val);
313
343
  }
314
344
  return val;
315
345
  };
346
+ const stringifySymbol = (v, i = "") => {
347
+ var _a;
348
+ return isSymbol(v) ? `Symbol(${(_a = v.description) != null ? _a : i})` : v;
349
+ };
316
350
 
317
351
  function warn$1(msg, ...args) {
318
352
  console.warn(`[Vue warn] ${msg}`, ...args);
@@ -761,8 +795,13 @@ var Vue = (function () {
761
795
  return isReadonly2;
762
796
  } else if (key === "__v_isShallow") {
763
797
  return shallow;
764
- } else if (key === "__v_raw" && receiver === (isReadonly2 ? shallow ? shallowReadonlyMap : readonlyMap : shallow ? shallowReactiveMap : reactiveMap).get(target)) {
765
- return target;
798
+ } else if (key === "__v_raw") {
799
+ if (receiver === (isReadonly2 ? shallow ? shallowReadonlyMap : readonlyMap : shallow ? shallowReactiveMap : reactiveMap).get(target) || // receiver is not the reactive proxy, but has the same prototype
800
+ // this means the reciever is a user proxy of the reactive proxy
801
+ Object.getPrototypeOf(target) === Object.getPrototypeOf(receiver)) {
802
+ return target;
803
+ }
804
+ return;
766
805
  }
767
806
  const targetIsArray = isArray(target);
768
807
  if (!isReadonly2) {
@@ -798,17 +837,19 @@ var Vue = (function () {
798
837
  }
799
838
  set(target, key, value, receiver) {
800
839
  let oldValue = target[key];
801
- if (isReadonly(oldValue) && isRef(oldValue) && !isRef(value)) {
802
- return false;
803
- }
804
840
  if (!this._shallow) {
841
+ const isOldValueReadonly = isReadonly(oldValue);
805
842
  if (!isShallow(value) && !isReadonly(value)) {
806
843
  oldValue = toRaw(oldValue);
807
844
  value = toRaw(value);
808
845
  }
809
846
  if (!isArray(target) && isRef(oldValue) && !isRef(value)) {
810
- oldValue.value = value;
811
- return true;
847
+ if (isOldValueReadonly) {
848
+ return false;
849
+ } else {
850
+ oldValue.value = value;
851
+ return true;
852
+ }
812
853
  }
813
854
  }
814
855
  const hadKey = isArray(target) && isIntegerKey(key) ? Number(key) < target.length : hasOwn(target, key);
@@ -1501,6 +1542,18 @@ var Vue = (function () {
1501
1542
  return isRef(val) ? val : new ObjectRefImpl(source, key, defaultValue);
1502
1543
  }
1503
1544
 
1545
+ const TrackOpTypes = {
1546
+ "GET": "get",
1547
+ "HAS": "has",
1548
+ "ITERATE": "iterate"
1549
+ };
1550
+ const TriggerOpTypes = {
1551
+ "SET": "set",
1552
+ "ADD": "add",
1553
+ "DELETE": "delete",
1554
+ "CLEAR": "clear"
1555
+ };
1556
+
1504
1557
  const stack$1 = [];
1505
1558
  function pushWarningContext(vnode) {
1506
1559
  stack$1.push(vnode);
@@ -1615,6 +1668,38 @@ var Vue = (function () {
1615
1668
  }
1616
1669
  }
1617
1670
 
1671
+ const ErrorCodes = {
1672
+ "SETUP_FUNCTION": 0,
1673
+ "0": "SETUP_FUNCTION",
1674
+ "RENDER_FUNCTION": 1,
1675
+ "1": "RENDER_FUNCTION",
1676
+ "WATCH_GETTER": 2,
1677
+ "2": "WATCH_GETTER",
1678
+ "WATCH_CALLBACK": 3,
1679
+ "3": "WATCH_CALLBACK",
1680
+ "WATCH_CLEANUP": 4,
1681
+ "4": "WATCH_CLEANUP",
1682
+ "NATIVE_EVENT_HANDLER": 5,
1683
+ "5": "NATIVE_EVENT_HANDLER",
1684
+ "COMPONENT_EVENT_HANDLER": 6,
1685
+ "6": "COMPONENT_EVENT_HANDLER",
1686
+ "VNODE_HOOK": 7,
1687
+ "7": "VNODE_HOOK",
1688
+ "DIRECTIVE_HOOK": 8,
1689
+ "8": "DIRECTIVE_HOOK",
1690
+ "TRANSITION_HOOK": 9,
1691
+ "9": "TRANSITION_HOOK",
1692
+ "APP_ERROR_HANDLER": 10,
1693
+ "10": "APP_ERROR_HANDLER",
1694
+ "APP_WARN_HANDLER": 11,
1695
+ "11": "APP_WARN_HANDLER",
1696
+ "FUNCTION_REF": 12,
1697
+ "12": "FUNCTION_REF",
1698
+ "ASYNC_COMPONENT_LOADER": 13,
1699
+ "13": "ASYNC_COMPONENT_LOADER",
1700
+ "SCHEDULER": 14,
1701
+ "14": "SCHEDULER"
1702
+ };
1618
1703
  const ErrorTypeStrings$1 = {
1619
1704
  ["sp"]: "serverPrefetch hook",
1620
1705
  ["bc"]: "beforeCreate hook",
@@ -1786,13 +1871,16 @@ var Vue = (function () {
1786
1871
  }
1787
1872
  queueFlush();
1788
1873
  }
1789
- function flushPreFlushCbs(seen, i = isFlushing ? flushIndex + 1 : 0) {
1874
+ function flushPreFlushCbs(instance, seen, i = isFlushing ? flushIndex + 1 : 0) {
1790
1875
  {
1791
1876
  seen = seen || /* @__PURE__ */ new Map();
1792
1877
  }
1793
1878
  for (; i < queue.length; i++) {
1794
1879
  const cb = queue[i];
1795
1880
  if (cb && cb.pre) {
1881
+ if (instance && cb.id !== instance.uid) {
1882
+ continue;
1883
+ }
1796
1884
  if (checkRecursiveUpdates(seen, cb)) {
1797
1885
  continue;
1798
1886
  }
@@ -2097,6 +2185,50 @@ var Vue = (function () {
2097
2185
  );
2098
2186
  }
2099
2187
 
2188
+ const DeprecationTypes$1 = {
2189
+ "GLOBAL_MOUNT": "GLOBAL_MOUNT",
2190
+ "GLOBAL_MOUNT_CONTAINER": "GLOBAL_MOUNT_CONTAINER",
2191
+ "GLOBAL_EXTEND": "GLOBAL_EXTEND",
2192
+ "GLOBAL_PROTOTYPE": "GLOBAL_PROTOTYPE",
2193
+ "GLOBAL_SET": "GLOBAL_SET",
2194
+ "GLOBAL_DELETE": "GLOBAL_DELETE",
2195
+ "GLOBAL_OBSERVABLE": "GLOBAL_OBSERVABLE",
2196
+ "GLOBAL_PRIVATE_UTIL": "GLOBAL_PRIVATE_UTIL",
2197
+ "CONFIG_SILENT": "CONFIG_SILENT",
2198
+ "CONFIG_DEVTOOLS": "CONFIG_DEVTOOLS",
2199
+ "CONFIG_KEY_CODES": "CONFIG_KEY_CODES",
2200
+ "CONFIG_PRODUCTION_TIP": "CONFIG_PRODUCTION_TIP",
2201
+ "CONFIG_IGNORED_ELEMENTS": "CONFIG_IGNORED_ELEMENTS",
2202
+ "CONFIG_WHITESPACE": "CONFIG_WHITESPACE",
2203
+ "CONFIG_OPTION_MERGE_STRATS": "CONFIG_OPTION_MERGE_STRATS",
2204
+ "INSTANCE_SET": "INSTANCE_SET",
2205
+ "INSTANCE_DELETE": "INSTANCE_DELETE",
2206
+ "INSTANCE_DESTROY": "INSTANCE_DESTROY",
2207
+ "INSTANCE_EVENT_EMITTER": "INSTANCE_EVENT_EMITTER",
2208
+ "INSTANCE_EVENT_HOOKS": "INSTANCE_EVENT_HOOKS",
2209
+ "INSTANCE_CHILDREN": "INSTANCE_CHILDREN",
2210
+ "INSTANCE_LISTENERS": "INSTANCE_LISTENERS",
2211
+ "INSTANCE_SCOPED_SLOTS": "INSTANCE_SCOPED_SLOTS",
2212
+ "INSTANCE_ATTRS_CLASS_STYLE": "INSTANCE_ATTRS_CLASS_STYLE",
2213
+ "OPTIONS_DATA_FN": "OPTIONS_DATA_FN",
2214
+ "OPTIONS_DATA_MERGE": "OPTIONS_DATA_MERGE",
2215
+ "OPTIONS_BEFORE_DESTROY": "OPTIONS_BEFORE_DESTROY",
2216
+ "OPTIONS_DESTROYED": "OPTIONS_DESTROYED",
2217
+ "WATCH_ARRAY": "WATCH_ARRAY",
2218
+ "PROPS_DEFAULT_THIS": "PROPS_DEFAULT_THIS",
2219
+ "V_ON_KEYCODE_MODIFIER": "V_ON_KEYCODE_MODIFIER",
2220
+ "CUSTOM_DIR": "CUSTOM_DIR",
2221
+ "ATTR_FALSE_VALUE": "ATTR_FALSE_VALUE",
2222
+ "ATTR_ENUMERATED_COERCION": "ATTR_ENUMERATED_COERCION",
2223
+ "TRANSITION_CLASSES": "TRANSITION_CLASSES",
2224
+ "TRANSITION_GROUP_ROOT": "TRANSITION_GROUP_ROOT",
2225
+ "COMPONENT_ASYNC": "COMPONENT_ASYNC",
2226
+ "COMPONENT_FUNCTIONAL": "COMPONENT_FUNCTIONAL",
2227
+ "COMPONENT_V_MODEL": "COMPONENT_V_MODEL",
2228
+ "RENDER_FUNCTION": "RENDER_FUNCTION",
2229
+ "FILTERS": "FILTERS",
2230
+ "PRIVATE_APIS": "PRIVATE_APIS"
2231
+ };
2100
2232
  const deprecationData$1 = {
2101
2233
  ["GLOBAL_MOUNT"]: {
2102
2234
  message: `The global app bootstrapping API has changed: vm.$mount() and the "el" option have been removed. Use createApp(RootComponent).mount() instead.`,
@@ -3025,9 +3157,17 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
3025
3157
  return false;
3026
3158
  }
3027
3159
  function updateHOCHostEl({ vnode, parent }, el) {
3028
- while (parent && parent.subTree === vnode) {
3029
- (vnode = parent.vnode).el = el;
3030
- parent = parent.parent;
3160
+ while (parent) {
3161
+ const root = parent.subTree;
3162
+ if (root.suspense && root.suspense.activeBranch === vnode) {
3163
+ root.el = vnode.el;
3164
+ }
3165
+ if (root === vnode) {
3166
+ (vnode = parent.vnode).el = el;
3167
+ parent = parent.parent;
3168
+ } else {
3169
+ break;
3170
+ }
3031
3171
  }
3032
3172
  }
3033
3173
 
@@ -3091,6 +3231,7 @@ If this is a native custom element, make sure to exclude it from component resol
3091
3231
  }
3092
3232
 
3093
3233
  const isSuspense = (type) => type.__isSuspense;
3234
+ let suspenseId = 0;
3094
3235
  const SuspenseImpl = {
3095
3236
  name: "Suspense",
3096
3237
  // In order to make Suspense tree-shakable, we need to avoid importing it
@@ -3098,7 +3239,7 @@ If this is a native custom element, make sure to exclude it from component resol
3098
3239
  // on a vnode's type and calls the `process` method, passing in renderer
3099
3240
  // internals.
3100
3241
  __isSuspense: true,
3101
- process(n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized, rendererInternals) {
3242
+ process(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, rendererInternals) {
3102
3243
  if (n1 == null) {
3103
3244
  mountSuspense(
3104
3245
  n2,
@@ -3106,7 +3247,7 @@ If this is a native custom element, make sure to exclude it from component resol
3106
3247
  anchor,
3107
3248
  parentComponent,
3108
3249
  parentSuspense,
3109
- isSVG,
3250
+ namespace,
3110
3251
  slotScopeIds,
3111
3252
  optimized,
3112
3253
  rendererInternals
@@ -3118,7 +3259,7 @@ If this is a native custom element, make sure to exclude it from component resol
3118
3259
  container,
3119
3260
  anchor,
3120
3261
  parentComponent,
3121
- isSVG,
3262
+ namespace,
3122
3263
  slotScopeIds,
3123
3264
  optimized,
3124
3265
  rendererInternals
@@ -3136,7 +3277,7 @@ If this is a native custom element, make sure to exclude it from component resol
3136
3277
  eventListener();
3137
3278
  }
3138
3279
  }
3139
- function mountSuspense(vnode, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized, rendererInternals) {
3280
+ function mountSuspense(vnode, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, rendererInternals) {
3140
3281
  const {
3141
3282
  p: patch,
3142
3283
  o: { createElement }
@@ -3149,7 +3290,7 @@ If this is a native custom element, make sure to exclude it from component resol
3149
3290
  container,
3150
3291
  hiddenContainer,
3151
3292
  anchor,
3152
- isSVG,
3293
+ namespace,
3153
3294
  slotScopeIds,
3154
3295
  optimized,
3155
3296
  rendererInternals
@@ -3161,7 +3302,7 @@ If this is a native custom element, make sure to exclude it from component resol
3161
3302
  null,
3162
3303
  parentComponent,
3163
3304
  suspense,
3164
- isSVG,
3305
+ namespace,
3165
3306
  slotScopeIds
3166
3307
  );
3167
3308
  if (suspense.deps > 0) {
@@ -3175,7 +3316,7 @@ If this is a native custom element, make sure to exclude it from component resol
3175
3316
  parentComponent,
3176
3317
  null,
3177
3318
  // fallback tree will not have suspense context
3178
- isSVG,
3319
+ namespace,
3179
3320
  slotScopeIds
3180
3321
  );
3181
3322
  setActiveBranch(suspense, vnode.ssFallback);
@@ -3183,7 +3324,7 @@ If this is a native custom element, make sure to exclude it from component resol
3183
3324
  suspense.resolve(false, true);
3184
3325
  }
3185
3326
  }
3186
- function patchSuspense(n1, n2, container, anchor, parentComponent, isSVG, slotScopeIds, optimized, { p: patch, um: unmount, o: { createElement } }) {
3327
+ function patchSuspense(n1, n2, container, anchor, parentComponent, namespace, slotScopeIds, optimized, { p: patch, um: unmount, o: { createElement } }) {
3187
3328
  const suspense = n2.suspense = n1.suspense;
3188
3329
  suspense.vnode = n2;
3189
3330
  n2.el = n1.el;
@@ -3200,29 +3341,31 @@ If this is a native custom element, make sure to exclude it from component resol
3200
3341
  null,
3201
3342
  parentComponent,
3202
3343
  suspense,
3203
- isSVG,
3344
+ namespace,
3204
3345
  slotScopeIds,
3205
3346
  optimized
3206
3347
  );
3207
3348
  if (suspense.deps <= 0) {
3208
3349
  suspense.resolve();
3209
3350
  } else if (isInFallback) {
3210
- patch(
3211
- activeBranch,
3212
- newFallback,
3213
- container,
3214
- anchor,
3215
- parentComponent,
3216
- null,
3217
- // fallback tree will not have suspense context
3218
- isSVG,
3219
- slotScopeIds,
3220
- optimized
3221
- );
3222
- setActiveBranch(suspense, newFallback);
3351
+ if (!isHydrating) {
3352
+ patch(
3353
+ activeBranch,
3354
+ newFallback,
3355
+ container,
3356
+ anchor,
3357
+ parentComponent,
3358
+ null,
3359
+ // fallback tree will not have suspense context
3360
+ namespace,
3361
+ slotScopeIds,
3362
+ optimized
3363
+ );
3364
+ setActiveBranch(suspense, newFallback);
3365
+ }
3223
3366
  }
3224
3367
  } else {
3225
- suspense.pendingId++;
3368
+ suspense.pendingId = suspenseId++;
3226
3369
  if (isHydrating) {
3227
3370
  suspense.isHydrating = false;
3228
3371
  suspense.activeBranch = pendingBranch;
@@ -3240,7 +3383,7 @@ If this is a native custom element, make sure to exclude it from component resol
3240
3383
  null,
3241
3384
  parentComponent,
3242
3385
  suspense,
3243
- isSVG,
3386
+ namespace,
3244
3387
  slotScopeIds,
3245
3388
  optimized
3246
3389
  );
@@ -3255,7 +3398,7 @@ If this is a native custom element, make sure to exclude it from component resol
3255
3398
  parentComponent,
3256
3399
  null,
3257
3400
  // fallback tree will not have suspense context
3258
- isSVG,
3401
+ namespace,
3259
3402
  slotScopeIds,
3260
3403
  optimized
3261
3404
  );
@@ -3269,7 +3412,7 @@ If this is a native custom element, make sure to exclude it from component resol
3269
3412
  anchor,
3270
3413
  parentComponent,
3271
3414
  suspense,
3272
- isSVG,
3415
+ namespace,
3273
3416
  slotScopeIds,
3274
3417
  optimized
3275
3418
  );
@@ -3282,7 +3425,7 @@ If this is a native custom element, make sure to exclude it from component resol
3282
3425
  null,
3283
3426
  parentComponent,
3284
3427
  suspense,
3285
- isSVG,
3428
+ namespace,
3286
3429
  slotScopeIds,
3287
3430
  optimized
3288
3431
  );
@@ -3300,7 +3443,7 @@ If this is a native custom element, make sure to exclude it from component resol
3300
3443
  anchor,
3301
3444
  parentComponent,
3302
3445
  suspense,
3303
- isSVG,
3446
+ namespace,
3304
3447
  slotScopeIds,
3305
3448
  optimized
3306
3449
  );
@@ -3308,7 +3451,11 @@ If this is a native custom element, make sure to exclude it from component resol
3308
3451
  } else {
3309
3452
  triggerEvent(n2, "onPending");
3310
3453
  suspense.pendingBranch = newBranch;
3311
- suspense.pendingId++;
3454
+ if (newBranch.shapeFlag & 512) {
3455
+ suspense.pendingId = newBranch.component.suspenseId;
3456
+ } else {
3457
+ suspense.pendingId = suspenseId++;
3458
+ }
3312
3459
  patch(
3313
3460
  null,
3314
3461
  newBranch,
@@ -3316,7 +3463,7 @@ If this is a native custom element, make sure to exclude it from component resol
3316
3463
  null,
3317
3464
  parentComponent,
3318
3465
  suspense,
3319
- isSVG,
3466
+ namespace,
3320
3467
  slotScopeIds,
3321
3468
  optimized
3322
3469
  );
@@ -3338,7 +3485,7 @@ If this is a native custom element, make sure to exclude it from component resol
3338
3485
  }
3339
3486
  }
3340
3487
  let hasWarned = false;
3341
- function createSuspenseBoundary(vnode, parentSuspense, parentComponent, container, hiddenContainer, anchor, isSVG, slotScopeIds, optimized, rendererInternals, isHydrating = false) {
3488
+ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, container, hiddenContainer, anchor, namespace, slotScopeIds, optimized, rendererInternals, isHydrating = false) {
3342
3489
  if (!hasWarned) {
3343
3490
  hasWarned = true;
3344
3491
  console[console.info ? "info" : "log"](
@@ -3368,7 +3515,7 @@ If this is a native custom element, make sure to exclude it from component resol
3368
3515
  vnode,
3369
3516
  parent: parentSuspense,
3370
3517
  parentComponent,
3371
- isSVG,
3518
+ namespace,
3372
3519
  container,
3373
3520
  hiddenContainer,
3374
3521
  anchor,
@@ -3377,7 +3524,7 @@ If this is a native custom element, make sure to exclude it from component resol
3377
3524
  timeout: typeof timeout === "number" ? timeout : -1,
3378
3525
  activeBranch: null,
3379
3526
  pendingBranch: null,
3380
- isInFallback: true,
3527
+ isInFallback: !isHydrating,
3381
3528
  isHydrating,
3382
3529
  isUnmounted: false,
3383
3530
  effects: [],
@@ -3411,7 +3558,12 @@ If this is a native custom element, make sure to exclude it from component resol
3411
3558
  if (delayEnter) {
3412
3559
  activeBranch.transition.afterLeave = () => {
3413
3560
  if (pendingId === suspense.pendingId) {
3414
- move(pendingBranch, container2, anchor2, 0);
3561
+ move(
3562
+ pendingBranch,
3563
+ container2,
3564
+ next(activeBranch),
3565
+ 0
3566
+ );
3415
3567
  queuePostFlushCb(effects);
3416
3568
  }
3417
3569
  };
@@ -3456,7 +3608,7 @@ If this is a native custom element, make sure to exclude it from component resol
3456
3608
  if (!suspense.pendingBranch) {
3457
3609
  return;
3458
3610
  }
3459
- const { vnode: vnode2, activeBranch, parentComponent: parentComponent2, container: container2, isSVG: isSVG2 } = suspense;
3611
+ const { vnode: vnode2, activeBranch, parentComponent: parentComponent2, container: container2, namespace: namespace2 } = suspense;
3460
3612
  triggerEvent(vnode2, "onFallback");
3461
3613
  const anchor2 = next(activeBranch);
3462
3614
  const mountFallback = () => {
@@ -3471,7 +3623,7 @@ If this is a native custom element, make sure to exclude it from component resol
3471
3623
  parentComponent2,
3472
3624
  null,
3473
3625
  // fallback tree will not have suspense context
3474
- isSVG2,
3626
+ namespace2,
3475
3627
  slotScopeIds,
3476
3628
  optimized
3477
3629
  );
@@ -3534,7 +3686,7 @@ If this is a native custom element, make sure to exclude it from component resol
3534
3686
  // consider the comment placeholder case.
3535
3687
  hydratedEl ? null : next(instance.subTree),
3536
3688
  suspense,
3537
- isSVG,
3689
+ namespace,
3538
3690
  optimized
3539
3691
  );
3540
3692
  if (placeholder) {
@@ -3571,7 +3723,7 @@ If this is a native custom element, make sure to exclude it from component resol
3571
3723
  };
3572
3724
  return suspense;
3573
3725
  }
3574
- function hydrateSuspense(node, vnode, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized, rendererInternals, hydrateNode) {
3726
+ function hydrateSuspense(node, vnode, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, rendererInternals, hydrateNode) {
3575
3727
  const suspense = vnode.suspense = createSuspenseBoundary(
3576
3728
  vnode,
3577
3729
  parentSuspense,
@@ -3579,7 +3731,7 @@ If this is a native custom element, make sure to exclude it from component resol
3579
3731
  node.parentNode,
3580
3732
  document.createElement("div"),
3581
3733
  null,
3582
- isSVG,
3734
+ namespace,
3583
3735
  slotScopeIds,
3584
3736
  optimized,
3585
3737
  rendererInternals,
@@ -4521,7 +4673,7 @@ If this is a native custom element, make sure to exclude it from component resol
4521
4673
  }
4522
4674
  } = sharedContext;
4523
4675
  const storageContainer = createElement("div");
4524
- sharedContext.activate = (vnode, container, anchor, isSVG, optimized) => {
4676
+ sharedContext.activate = (vnode, container, anchor, namespace, optimized) => {
4525
4677
  const instance2 = vnode.component;
4526
4678
  move(vnode, container, anchor, 0, parentSuspense);
4527
4679
  patch(
@@ -4531,7 +4683,7 @@ If this is a native custom element, make sure to exclude it from component resol
4531
4683
  anchor,
4532
4684
  instance2,
4533
4685
  parentSuspense,
4534
- isSVG,
4686
+ namespace,
4535
4687
  vnode.slotScopeIds,
4536
4688
  optimized
4537
4689
  );
@@ -5719,7 +5871,7 @@ If this is a native custom element, make sure to exclude it from component resol
5719
5871
  function useAttrs() {
5720
5872
  return getContext().attrs;
5721
5873
  }
5722
- function useModel(props, name, options) {
5874
+ function useModel(props, name) {
5723
5875
  const i = getCurrentInstance();
5724
5876
  if (!i) {
5725
5877
  warn(`useModel() called without active instance.`);
@@ -5729,29 +5881,24 @@ If this is a native custom element, make sure to exclude it from component resol
5729
5881
  warn(`useModel() called with prop "${name}" which is not declared.`);
5730
5882
  return ref();
5731
5883
  }
5732
- if (options && options.local) {
5733
- const proxy = ref(props[name]);
5734
- watch(
5735
- () => props[name],
5736
- (v) => proxy.value = v
5737
- );
5738
- watch(proxy, (value) => {
5739
- if (value !== props[name]) {
5740
- i.emit(`update:${name}`, value);
5741
- }
5742
- });
5743
- return proxy;
5744
- } else {
5745
- return {
5746
- __v_isRef: true,
5747
- get value() {
5748
- return props[name];
5749
- },
5750
- set value(value) {
5751
- i.emit(`update:${name}`, value);
5884
+ let localValue;
5885
+ watchSyncEffect(() => {
5886
+ localValue = props[name];
5887
+ });
5888
+ return customRef((track, trigger) => ({
5889
+ get() {
5890
+ track();
5891
+ return localValue;
5892
+ },
5893
+ set(value) {
5894
+ const rawProps = i.vnode.props;
5895
+ if (!(rawProps && name in rawProps) && hasChanged(value, localValue)) {
5896
+ localValue = value;
5897
+ trigger();
5752
5898
  }
5753
- };
5754
- }
5899
+ i.emit(`update:${name}`, value);
5900
+ }
5901
+ }));
5755
5902
  }
5756
5903
  function getContext() {
5757
5904
  const i = getCurrentInstance();
@@ -6325,7 +6472,7 @@ If this is a native custom element, make sure to exclude it from component resol
6325
6472
  return vm;
6326
6473
  }
6327
6474
  }
6328
- Vue.version = `2.6.14-compat:${"3.4.0-alpha.3"}`;
6475
+ Vue.version = `2.6.14-compat:${"3.4.0-beta.1"}`;
6329
6476
  Vue.config = singletonApp.config;
6330
6477
  Vue.use = (p, ...options) => {
6331
6478
  if (p && isFunction(p.install)) {
@@ -6570,12 +6717,16 @@ If this is a native custom element, make sure to exclude it from component resol
6570
6717
  } else {
6571
6718
  container = selectorOrEl || document.createElement("div");
6572
6719
  }
6573
- const isSVG = container instanceof SVGElement;
6720
+ let namespace;
6721
+ if (container instanceof SVGElement)
6722
+ namespace = "svg";
6723
+ else if (typeof MathMLElement === "function" && container instanceof MathMLElement)
6724
+ namespace = "mathml";
6574
6725
  {
6575
6726
  context.reload = () => {
6576
6727
  const cloned = cloneVNode(vnode);
6577
6728
  cloned.component = null;
6578
- render(cloned, container, isSVG);
6729
+ render(cloned, container, namespace);
6579
6730
  };
6580
6731
  }
6581
6732
  if (hasNoRender && instance.render === emptyRender) {
@@ -6598,7 +6749,7 @@ If this is a native custom element, make sure to exclude it from component resol
6598
6749
  );
6599
6750
  }
6600
6751
  container.innerHTML = "";
6601
- render(vnode, container, isSVG);
6752
+ render(vnode, container, namespace);
6602
6753
  if (container instanceof Element) {
6603
6754
  container.removeAttribute("v-cloak");
6604
6755
  container.setAttribute("data-v-app", "");
@@ -6726,18 +6877,6 @@ If this is a native custom element, make sure to exclude it from component resol
6726
6877
  rootProps = null;
6727
6878
  }
6728
6879
  const context = createAppContext();
6729
- {
6730
- Object.defineProperty(context.config, "unwrapInjectedRef", {
6731
- get() {
6732
- return true;
6733
- },
6734
- set() {
6735
- warn(
6736
- `app.config.unwrapInjectedRef has been deprecated. 3.3 now always unwraps injected refs in Options API.`
6737
- );
6738
- }
6739
- });
6740
- }
6741
6880
  const installedPlugins = /* @__PURE__ */ new WeakSet();
6742
6881
  let isMounted = false;
6743
6882
  const app = context.app = {
@@ -6812,7 +6951,7 @@ If this is a native custom element, make sure to exclude it from component resol
6812
6951
  context.directives[name] = directive;
6813
6952
  return app;
6814
6953
  },
6815
- mount(rootContainer, isHydrate, isSVG) {
6954
+ mount(rootContainer, isHydrate, namespace) {
6816
6955
  if (!isMounted) {
6817
6956
  if (rootContainer.__vue_app__) {
6818
6957
  warn(
@@ -6822,15 +6961,24 @@ If this is a native custom element, make sure to exclude it from component resol
6822
6961
  }
6823
6962
  const vnode = createVNode(rootComponent, rootProps);
6824
6963
  vnode.appContext = context;
6964
+ if (namespace === true) {
6965
+ namespace = "svg";
6966
+ } else if (namespace === false) {
6967
+ namespace = void 0;
6968
+ }
6825
6969
  {
6826
6970
  context.reload = () => {
6827
- render(cloneVNode(vnode), rootContainer, isSVG);
6971
+ render(
6972
+ cloneVNode(vnode),
6973
+ rootContainer,
6974
+ namespace
6975
+ );
6828
6976
  };
6829
6977
  }
6830
6978
  if (isHydrate && hydrate) {
6831
6979
  hydrate(vnode, rootContainer);
6832
6980
  } else {
6833
- render(vnode, rootContainer, isSVG);
6981
+ render(vnode, rootContainer, namespace);
6834
6982
  }
6835
6983
  isMounted = true;
6836
6984
  app._container = rootContainer;
@@ -7295,11 +7443,12 @@ If you want to remount the same app, move your app creation logic into a factory
7295
7443
  key,
7296
7444
  resolvedValues[key],
7297
7445
  opt,
7446
+ shallowReadonly(resolvedValues) ,
7298
7447
  !hasOwn(rawProps, key) && !hasOwn(rawProps, hyphenate(key))
7299
7448
  );
7300
7449
  }
7301
7450
  }
7302
- function validateProp(name, value, prop, isAbsent) {
7451
+ function validateProp(name, value, prop, props, isAbsent) {
7303
7452
  const { type, required, validator, skipCheck } = prop;
7304
7453
  if (required && isAbsent) {
7305
7454
  warn('Missing required prop: "' + name + '"');
@@ -7322,7 +7471,7 @@ If you want to remount the same app, move your app creation logic into a factory
7322
7471
  return;
7323
7472
  }
7324
7473
  }
7325
- if (validator && !validator(value)) {
7474
+ if (validator && !validator(value, props)) {
7326
7475
  warn('Invalid prop: custom validator check failed for prop "' + name + '".');
7327
7476
  }
7328
7477
  }
@@ -7580,7 +7729,15 @@ If you want to remount the same app, move your app creation logic into a factory
7580
7729
  }
7581
7730
 
7582
7731
  let hasMismatch = false;
7583
- const isSVGContainer = (container) => /svg/.test(container.namespaceURI) && container.tagName !== "foreignObject";
7732
+ const isSVGContainer = (container) => container.namespaceURI.includes("svg") && container.tagName !== "foreignObject";
7733
+ const isMathMLContainer = (container) => container.namespaceURI.includes("MathML");
7734
+ const getContainerType = (container) => {
7735
+ if (isSVGContainer(container))
7736
+ return "svg";
7737
+ if (isMathMLContainer(container))
7738
+ return "mathml";
7739
+ return void 0;
7740
+ };
7584
7741
  const isComment = (node) => node.nodeType === 8 /* COMMENT */;
7585
7742
  function createHydrationFunctions(rendererInternals) {
7586
7743
  const {
@@ -7659,11 +7816,13 @@ If you want to remount the same app, move your app creation logic into a factory
7659
7816
  if (node.data !== vnode.children) {
7660
7817
  hasMismatch = true;
7661
7818
  warn(
7662
- `Hydration text mismatch:
7663
- - Server rendered: ${JSON.stringify(
7819
+ `Hydration text mismatch in`,
7820
+ node.parentNode,
7821
+ `
7822
+ - rendered on server: ${JSON.stringify(
7664
7823
  node.data
7665
7824
  )}
7666
- - Client rendered: ${JSON.stringify(vnode.children)}`
7825
+ - expected on client: ${JSON.stringify(vnode.children)}`
7667
7826
  );
7668
7827
  node.data = vnode.children;
7669
7828
  }
@@ -7749,7 +7908,7 @@ If you want to remount the same app, move your app creation logic into a factory
7749
7908
  null,
7750
7909
  parentComponent,
7751
7910
  parentSuspense,
7752
- isSVGContainer(container),
7911
+ getContainerType(container),
7753
7912
  optimized
7754
7913
  );
7755
7914
  if (isAsyncWrapper(vnode)) {
@@ -7784,7 +7943,7 @@ If you want to remount the same app, move your app creation logic into a factory
7784
7943
  vnode,
7785
7944
  parentComponent,
7786
7945
  parentSuspense,
7787
- isSVGContainer(parentNode(node)),
7946
+ getContainerType(parentNode(node)),
7788
7947
  slotScopeIds,
7789
7948
  optimized,
7790
7949
  rendererInternals,
@@ -7807,38 +7966,6 @@ If you want to remount the same app, move your app creation logic into a factory
7807
7966
  if (dirs) {
7808
7967
  invokeDirectiveHook(vnode, null, parentComponent, "created");
7809
7968
  }
7810
- if (props) {
7811
- if (forcePatch || !optimized || patchFlag & (16 | 32)) {
7812
- for (const key in props) {
7813
- if (forcePatch && (key.endsWith("value") || key === "indeterminate") || isOn(key) && !isReservedProp(key) || // force hydrate v-bind with .prop modifiers
7814
- key[0] === ".") {
7815
- patchProp(
7816
- el,
7817
- key,
7818
- null,
7819
- props[key],
7820
- false,
7821
- void 0,
7822
- parentComponent
7823
- );
7824
- }
7825
- }
7826
- } else if (props.onClick) {
7827
- patchProp(
7828
- el,
7829
- "onClick",
7830
- null,
7831
- props.onClick,
7832
- false,
7833
- void 0,
7834
- parentComponent
7835
- );
7836
- }
7837
- }
7838
- let vnodeHooks;
7839
- if (vnodeHooks = props && props.onVnodeBeforeMount) {
7840
- invokeVNodeHook(vnodeHooks, parentComponent, vnode);
7841
- }
7842
7969
  let needCallTransitionHooks = false;
7843
7970
  if (isTemplateNode(el)) {
7844
7971
  needCallTransitionHooks = needTransition(parentSuspense, transition) && parentComponent && parentComponent.vnode.props && parentComponent.vnode.props.appear;
@@ -7849,16 +7976,6 @@ If you want to remount the same app, move your app creation logic into a factory
7849
7976
  replaceNode(content, el, parentComponent);
7850
7977
  vnode.el = el = content;
7851
7978
  }
7852
- if (dirs) {
7853
- invokeDirectiveHook(vnode, null, parentComponent, "beforeMount");
7854
- }
7855
- if ((vnodeHooks = props && props.onVnodeMounted) || dirs || needCallTransitionHooks) {
7856
- queueEffectWithSuspense(() => {
7857
- vnodeHooks && invokeVNodeHook(vnodeHooks, parentComponent, vnode);
7858
- needCallTransitionHooks && transition.enter(el);
7859
- dirs && invokeDirectiveHook(vnode, null, parentComponent, "mounted");
7860
- }, parentSuspense);
7861
- }
7862
7979
  if (shapeFlag & 16 && // skip if element has innerHTML / textContent
7863
7980
  !(props && (props.innerHTML || props.textContent))) {
7864
7981
  let next = hydrateChildren(
@@ -7875,7 +7992,10 @@ If you want to remount the same app, move your app creation logic into a factory
7875
7992
  hasMismatch = true;
7876
7993
  if (!hasWarned) {
7877
7994
  warn(
7878
- `Hydration children mismatch in <${vnode.type}>: server rendered element contains more child nodes than client vdom.`
7995
+ `Hydration children mismatch on`,
7996
+ el,
7997
+ `
7998
+ Server rendered element contains more child nodes than client vdom.`
7879
7999
  );
7880
8000
  hasWarned = true;
7881
8001
  }
@@ -7887,13 +8007,50 @@ If you want to remount the same app, move your app creation logic into a factory
7887
8007
  if (el.textContent !== vnode.children) {
7888
8008
  hasMismatch = true;
7889
8009
  warn(
7890
- `Hydration text content mismatch in <${vnode.type}>:
7891
- - Server rendered: ${el.textContent}
7892
- - Client rendered: ${vnode.children}`
8010
+ `Hydration text content mismatch on`,
8011
+ el,
8012
+ `
8013
+ - rendered on server: ${el.textContent}
8014
+ - expected on client: ${vnode.children}`
7893
8015
  );
7894
8016
  el.textContent = vnode.children;
7895
8017
  }
7896
8018
  }
8019
+ if (props) {
8020
+ {
8021
+ for (const key in props) {
8022
+ if (propHasMismatch(el, key, props[key])) {
8023
+ hasMismatch = true;
8024
+ }
8025
+ if (forcePatch && (key.endsWith("value") || key === "indeterminate") || isOn(key) && !isReservedProp(key) || // force hydrate v-bind with .prop modifiers
8026
+ key[0] === ".") {
8027
+ patchProp(
8028
+ el,
8029
+ key,
8030
+ null,
8031
+ props[key],
8032
+ void 0,
8033
+ void 0,
8034
+ parentComponent
8035
+ );
8036
+ }
8037
+ }
8038
+ }
8039
+ }
8040
+ let vnodeHooks;
8041
+ if (vnodeHooks = props && props.onVnodeBeforeMount) {
8042
+ invokeVNodeHook(vnodeHooks, parentComponent, vnode);
8043
+ }
8044
+ if (dirs) {
8045
+ invokeDirectiveHook(vnode, null, parentComponent, "beforeMount");
8046
+ }
8047
+ if ((vnodeHooks = props && props.onVnodeMounted) || dirs || needCallTransitionHooks) {
8048
+ queueEffectWithSuspense(() => {
8049
+ vnodeHooks && invokeVNodeHook(vnodeHooks, parentComponent, vnode);
8050
+ needCallTransitionHooks && transition.enter(el);
8051
+ dirs && invokeDirectiveHook(vnode, null, parentComponent, "mounted");
8052
+ }, parentSuspense);
8053
+ }
7897
8054
  }
7898
8055
  return el.nextSibling;
7899
8056
  };
@@ -7919,7 +8076,10 @@ If you want to remount the same app, move your app creation logic into a factory
7919
8076
  hasMismatch = true;
7920
8077
  if (!hasWarned) {
7921
8078
  warn(
7922
- `Hydration children mismatch in <${container.tagName.toLowerCase()}>: server rendered element contains fewer child nodes than client vdom.`
8079
+ `Hydration children mismatch on`,
8080
+ container,
8081
+ `
8082
+ Server rendered element contains fewer child nodes than client vdom.`
7923
8083
  );
7924
8084
  hasWarned = true;
7925
8085
  }
@@ -7930,7 +8090,7 @@ If you want to remount the same app, move your app creation logic into a factory
7930
8090
  null,
7931
8091
  parentComponent,
7932
8092
  parentSuspense,
7933
- isSVGContainer(container),
8093
+ getContainerType(container),
7934
8094
  slotScopeIds
7935
8095
  );
7936
8096
  }
@@ -7964,12 +8124,12 @@ If you want to remount the same app, move your app creation logic into a factory
7964
8124
  hasMismatch = true;
7965
8125
  warn(
7966
8126
  `Hydration node mismatch:
7967
- - Client vnode:`,
7968
- vnode.type,
7969
- `
7970
- - Server rendered DOM:`,
8127
+ - rendered on server:`,
7971
8128
  node,
7972
- node.nodeType === 3 /* TEXT */ ? `(text)` : isComment(node) && node.data === "[" ? `(start of fragment)` : ``
8129
+ node.nodeType === 3 /* TEXT */ ? `(text)` : isComment(node) && node.data === "[" ? `(start of fragment)` : ``,
8130
+ `
8131
+ - expected on client:`,
8132
+ vnode.type
7973
8133
  );
7974
8134
  vnode.el = null;
7975
8135
  if (isFragment) {
@@ -7993,7 +8153,7 @@ If you want to remount the same app, move your app creation logic into a factory
7993
8153
  next,
7994
8154
  parentComponent,
7995
8155
  parentSuspense,
7996
- isSVGContainer(container),
8156
+ getContainerType(container),
7997
8157
  slotScopeIds
7998
8158
  );
7999
8159
  return next;
@@ -8034,6 +8194,46 @@ If you want to remount the same app, move your app creation logic into a factory
8034
8194
  };
8035
8195
  return [hydrate, hydrateNode];
8036
8196
  }
8197
+ function propHasMismatch(el, key, clientValue) {
8198
+ let mismatchType;
8199
+ let mismatchKey;
8200
+ let actual;
8201
+ let expected;
8202
+ if (key === "class") {
8203
+ actual = el.className;
8204
+ expected = normalizeClass(clientValue);
8205
+ if (actual !== expected) {
8206
+ mismatchType = mismatchKey = `class`;
8207
+ }
8208
+ } else if (key === "style") {
8209
+ actual = el.getAttribute("style");
8210
+ expected = isString(clientValue) ? clientValue : stringifyStyle(normalizeStyle(clientValue));
8211
+ if (actual !== expected) {
8212
+ mismatchType = mismatchKey = "style";
8213
+ }
8214
+ } else if (el instanceof SVGElement && isKnownSvgAttr(key) || el instanceof HTMLElement && (isBooleanAttr(key) || isKnownHtmlAttr(key))) {
8215
+ actual = el.hasAttribute(key) && el.getAttribute(key);
8216
+ expected = isBooleanAttr(key) ? includeBooleanAttr(clientValue) ? "" : false : clientValue == null ? false : String(clientValue);
8217
+ if (actual !== expected) {
8218
+ mismatchType = `attribute`;
8219
+ mismatchKey = key;
8220
+ }
8221
+ }
8222
+ if (mismatchType) {
8223
+ const format = (v) => v === false ? `(not rendered)` : `${mismatchKey}="${v}"`;
8224
+ warn(
8225
+ `Hydration ${mismatchType} mismatch on`,
8226
+ el,
8227
+ `
8228
+ - rendered on server: ${format(actual)}
8229
+ - expected on client: ${format(expected)}
8230
+ Note: this mismatch is check-only. The DOM will not be rectified in production due to performance overhead.
8231
+ You should fix the source of the mismatch.`
8232
+ );
8233
+ return true;
8234
+ }
8235
+ return false;
8236
+ }
8037
8237
 
8038
8238
  let supported;
8039
8239
  let perf;
@@ -8102,7 +8302,7 @@ If you want to remount the same app, move your app creation logic into a factory
8102
8302
  setScopeId: hostSetScopeId = NOOP,
8103
8303
  insertStaticContent: hostInsertStaticContent
8104
8304
  } = options;
8105
- const patch = (n1, n2, container, anchor = null, parentComponent = null, parentSuspense = null, isSVG = false, slotScopeIds = null, optimized = isHmrUpdating ? false : !!n2.dynamicChildren) => {
8305
+ const patch = (n1, n2, container, anchor = null, parentComponent = null, parentSuspense = null, namespace = void 0, slotScopeIds = null, optimized = isHmrUpdating ? false : !!n2.dynamicChildren) => {
8106
8306
  if (n1 === n2) {
8107
8307
  return;
8108
8308
  }
@@ -8125,9 +8325,9 @@ If you want to remount the same app, move your app creation logic into a factory
8125
8325
  break;
8126
8326
  case Static:
8127
8327
  if (n1 == null) {
8128
- mountStaticNode(n2, container, anchor, isSVG);
8328
+ mountStaticNode(n2, container, anchor, namespace);
8129
8329
  } else {
8130
- patchStaticNode(n1, n2, container, isSVG);
8330
+ patchStaticNode(n1, n2, container, namespace);
8131
8331
  }
8132
8332
  break;
8133
8333
  case Fragment:
@@ -8138,7 +8338,7 @@ If you want to remount the same app, move your app creation logic into a factory
8138
8338
  anchor,
8139
8339
  parentComponent,
8140
8340
  parentSuspense,
8141
- isSVG,
8341
+ namespace,
8142
8342
  slotScopeIds,
8143
8343
  optimized
8144
8344
  );
@@ -8152,7 +8352,7 @@ If you want to remount the same app, move your app creation logic into a factory
8152
8352
  anchor,
8153
8353
  parentComponent,
8154
8354
  parentSuspense,
8155
- isSVG,
8355
+ namespace,
8156
8356
  slotScopeIds,
8157
8357
  optimized
8158
8358
  );
@@ -8164,7 +8364,7 @@ If you want to remount the same app, move your app creation logic into a factory
8164
8364
  anchor,
8165
8365
  parentComponent,
8166
8366
  parentSuspense,
8167
- isSVG,
8367
+ namespace,
8168
8368
  slotScopeIds,
8169
8369
  optimized
8170
8370
  );
@@ -8176,7 +8376,7 @@ If you want to remount the same app, move your app creation logic into a factory
8176
8376
  anchor,
8177
8377
  parentComponent,
8178
8378
  parentSuspense,
8179
- isSVG,
8379
+ namespace,
8180
8380
  slotScopeIds,
8181
8381
  optimized,
8182
8382
  internals
@@ -8189,7 +8389,7 @@ If you want to remount the same app, move your app creation logic into a factory
8189
8389
  anchor,
8190
8390
  parentComponent,
8191
8391
  parentSuspense,
8192
- isSVG,
8392
+ namespace,
8193
8393
  slotScopeIds,
8194
8394
  optimized,
8195
8395
  internals
@@ -8227,17 +8427,17 @@ If you want to remount the same app, move your app creation logic into a factory
8227
8427
  n2.el = n1.el;
8228
8428
  }
8229
8429
  };
8230
- const mountStaticNode = (n2, container, anchor, isSVG) => {
8430
+ const mountStaticNode = (n2, container, anchor, namespace) => {
8231
8431
  [n2.el, n2.anchor] = hostInsertStaticContent(
8232
8432
  n2.children,
8233
8433
  container,
8234
8434
  anchor,
8235
- isSVG,
8435
+ namespace,
8236
8436
  n2.el,
8237
8437
  n2.anchor
8238
8438
  );
8239
8439
  };
8240
- const patchStaticNode = (n1, n2, container, isSVG) => {
8440
+ const patchStaticNode = (n1, n2, container, namespace) => {
8241
8441
  if (n2.children !== n1.children) {
8242
8442
  const anchor = hostNextSibling(n1.anchor);
8243
8443
  removeStaticNode(n1);
@@ -8245,7 +8445,7 @@ If you want to remount the same app, move your app creation logic into a factory
8245
8445
  n2.children,
8246
8446
  container,
8247
8447
  anchor,
8248
- isSVG
8448
+ namespace
8249
8449
  );
8250
8450
  } else {
8251
8451
  n2.el = n1.el;
@@ -8270,8 +8470,12 @@ If you want to remount the same app, move your app creation logic into a factory
8270
8470
  }
8271
8471
  hostRemove(anchor);
8272
8472
  };
8273
- const processElement = (n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized) => {
8274
- isSVG = isSVG || n2.type === "svg";
8473
+ const processElement = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => {
8474
+ if (n2.type === "svg") {
8475
+ namespace = "svg";
8476
+ } else if (n2.type === "math") {
8477
+ namespace = "mathml";
8478
+ }
8275
8479
  if (n1 == null) {
8276
8480
  mountElement(
8277
8481
  n2,
@@ -8279,7 +8483,7 @@ If you want to remount the same app, move your app creation logic into a factory
8279
8483
  anchor,
8280
8484
  parentComponent,
8281
8485
  parentSuspense,
8282
- isSVG,
8486
+ namespace,
8283
8487
  slotScopeIds,
8284
8488
  optimized
8285
8489
  );
@@ -8289,19 +8493,19 @@ If you want to remount the same app, move your app creation logic into a factory
8289
8493
  n2,
8290
8494
  parentComponent,
8291
8495
  parentSuspense,
8292
- isSVG,
8496
+ namespace,
8293
8497
  slotScopeIds,
8294
8498
  optimized
8295
8499
  );
8296
8500
  }
8297
8501
  };
8298
- const mountElement = (vnode, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized) => {
8502
+ const mountElement = (vnode, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => {
8299
8503
  let el;
8300
8504
  let vnodeHook;
8301
- const { type, props, shapeFlag, transition, dirs } = vnode;
8505
+ const { props, shapeFlag, transition, dirs } = vnode;
8302
8506
  el = vnode.el = hostCreateElement(
8303
8507
  vnode.type,
8304
- isSVG,
8508
+ namespace,
8305
8509
  props && props.is,
8306
8510
  props
8307
8511
  );
@@ -8314,7 +8518,7 @@ If you want to remount the same app, move your app creation logic into a factory
8314
8518
  null,
8315
8519
  parentComponent,
8316
8520
  parentSuspense,
8317
- isSVG && type !== "foreignObject",
8521
+ resolveChildrenNamespace(vnode, namespace),
8318
8522
  slotScopeIds,
8319
8523
  optimized
8320
8524
  );
@@ -8331,7 +8535,7 @@ If you want to remount the same app, move your app creation logic into a factory
8331
8535
  key,
8332
8536
  null,
8333
8537
  props[key],
8334
- isSVG,
8538
+ namespace,
8335
8539
  vnode.children,
8336
8540
  parentComponent,
8337
8541
  parentSuspense,
@@ -8340,7 +8544,7 @@ If you want to remount the same app, move your app creation logic into a factory
8340
8544
  }
8341
8545
  }
8342
8546
  if ("value" in props) {
8343
- hostPatchProp(el, "value", null, props.value);
8547
+ hostPatchProp(el, "value", null, props.value, namespace);
8344
8548
  }
8345
8549
  if (vnodeHook = props.onVnodeBeforeMount) {
8346
8550
  invokeVNodeHook(vnodeHook, parentComponent, vnode);
@@ -8398,7 +8602,7 @@ If you want to remount the same app, move your app creation logic into a factory
8398
8602
  }
8399
8603
  }
8400
8604
  };
8401
- const mountChildren = (children, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized, start = 0) => {
8605
+ const mountChildren = (children, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, start = 0) => {
8402
8606
  for (let i = start; i < children.length; i++) {
8403
8607
  const child = children[i] = optimized ? cloneIfMounted(children[i]) : normalizeVNode(children[i]);
8404
8608
  patch(
@@ -8408,13 +8612,13 @@ If you want to remount the same app, move your app creation logic into a factory
8408
8612
  anchor,
8409
8613
  parentComponent,
8410
8614
  parentSuspense,
8411
- isSVG,
8615
+ namespace,
8412
8616
  slotScopeIds,
8413
8617
  optimized
8414
8618
  );
8415
8619
  }
8416
8620
  };
8417
- const patchElement = (n1, n2, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized) => {
8621
+ const patchElement = (n1, n2, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => {
8418
8622
  const el = n2.el = n1.el;
8419
8623
  let { patchFlag, dynamicChildren, dirs } = n2;
8420
8624
  patchFlag |= n1.patchFlag & 16;
@@ -8434,7 +8638,6 @@ If you want to remount the same app, move your app creation logic into a factory
8434
8638
  optimized = false;
8435
8639
  dynamicChildren = null;
8436
8640
  }
8437
- const areChildrenSVG = isSVG && n2.type !== "foreignObject";
8438
8641
  if (dynamicChildren) {
8439
8642
  patchBlockChildren(
8440
8643
  n1.dynamicChildren,
@@ -8442,7 +8645,7 @@ If you want to remount the same app, move your app creation logic into a factory
8442
8645
  el,
8443
8646
  parentComponent,
8444
8647
  parentSuspense,
8445
- areChildrenSVG,
8648
+ resolveChildrenNamespace(n2, namespace),
8446
8649
  slotScopeIds
8447
8650
  );
8448
8651
  {
@@ -8456,7 +8659,7 @@ If you want to remount the same app, move your app creation logic into a factory
8456
8659
  null,
8457
8660
  parentComponent,
8458
8661
  parentSuspense,
8459
- areChildrenSVG,
8662
+ resolveChildrenNamespace(n2, namespace),
8460
8663
  slotScopeIds,
8461
8664
  false
8462
8665
  );
@@ -8470,16 +8673,16 @@ If you want to remount the same app, move your app creation logic into a factory
8470
8673
  newProps,
8471
8674
  parentComponent,
8472
8675
  parentSuspense,
8473
- isSVG
8676
+ namespace
8474
8677
  );
8475
8678
  } else {
8476
8679
  if (patchFlag & 2) {
8477
8680
  if (oldProps.class !== newProps.class) {
8478
- hostPatchProp(el, "class", null, newProps.class, isSVG);
8681
+ hostPatchProp(el, "class", null, newProps.class, namespace);
8479
8682
  }
8480
8683
  }
8481
8684
  if (patchFlag & 4) {
8482
- hostPatchProp(el, "style", oldProps.style, newProps.style, isSVG);
8685
+ hostPatchProp(el, "style", oldProps.style, newProps.style, namespace);
8483
8686
  }
8484
8687
  if (patchFlag & 8) {
8485
8688
  const propsToUpdate = n2.dynamicProps;
@@ -8493,7 +8696,7 @@ If you want to remount the same app, move your app creation logic into a factory
8493
8696
  key,
8494
8697
  prev,
8495
8698
  next,
8496
- isSVG,
8699
+ namespace,
8497
8700
  n1.children,
8498
8701
  parentComponent,
8499
8702
  parentSuspense,
@@ -8516,7 +8719,7 @@ If you want to remount the same app, move your app creation logic into a factory
8516
8719
  newProps,
8517
8720
  parentComponent,
8518
8721
  parentSuspense,
8519
- isSVG
8722
+ namespace
8520
8723
  );
8521
8724
  }
8522
8725
  if ((vnodeHook = newProps.onVnodeUpdated) || dirs) {
@@ -8526,7 +8729,7 @@ If you want to remount the same app, move your app creation logic into a factory
8526
8729
  }, parentSuspense);
8527
8730
  }
8528
8731
  };
8529
- const patchBlockChildren = (oldChildren, newChildren, fallbackContainer, parentComponent, parentSuspense, isSVG, slotScopeIds) => {
8732
+ const patchBlockChildren = (oldChildren, newChildren, fallbackContainer, parentComponent, parentSuspense, namespace, slotScopeIds) => {
8530
8733
  for (let i = 0; i < newChildren.length; i++) {
8531
8734
  const oldVNode = oldChildren[i];
8532
8735
  const newVNode = newChildren[i];
@@ -8551,13 +8754,13 @@ If you want to remount the same app, move your app creation logic into a factory
8551
8754
  null,
8552
8755
  parentComponent,
8553
8756
  parentSuspense,
8554
- isSVG,
8757
+ namespace,
8555
8758
  slotScopeIds,
8556
8759
  true
8557
8760
  );
8558
8761
  }
8559
8762
  };
8560
- const patchProps = (el, vnode, oldProps, newProps, parentComponent, parentSuspense, isSVG) => {
8763
+ const patchProps = (el, vnode, oldProps, newProps, parentComponent, parentSuspense, namespace) => {
8561
8764
  if (oldProps !== newProps) {
8562
8765
  if (oldProps !== EMPTY_OBJ) {
8563
8766
  for (const key in oldProps) {
@@ -8567,7 +8770,7 @@ If you want to remount the same app, move your app creation logic into a factory
8567
8770
  key,
8568
8771
  oldProps[key],
8569
8772
  null,
8570
- isSVG,
8773
+ namespace,
8571
8774
  vnode.children,
8572
8775
  parentComponent,
8573
8776
  parentSuspense,
@@ -8587,7 +8790,7 @@ If you want to remount the same app, move your app creation logic into a factory
8587
8790
  key,
8588
8791
  prev,
8589
8792
  next,
8590
- isSVG,
8793
+ namespace,
8591
8794
  vnode.children,
8592
8795
  parentComponent,
8593
8796
  parentSuspense,
@@ -8596,11 +8799,11 @@ If you want to remount the same app, move your app creation logic into a factory
8596
8799
  }
8597
8800
  }
8598
8801
  if ("value" in newProps) {
8599
- hostPatchProp(el, "value", oldProps.value, newProps.value);
8802
+ hostPatchProp(el, "value", oldProps.value, newProps.value, namespace);
8600
8803
  }
8601
8804
  }
8602
8805
  };
8603
- const processFragment = (n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized) => {
8806
+ const processFragment = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => {
8604
8807
  const fragmentStartAnchor = n2.el = n1 ? n1.el : hostCreateText("");
8605
8808
  const fragmentEndAnchor = n2.anchor = n1 ? n1.anchor : hostCreateText("");
8606
8809
  let { patchFlag, dynamicChildren, slotScopeIds: fragmentSlotScopeIds } = n2;
@@ -8624,7 +8827,7 @@ If you want to remount the same app, move your app creation logic into a factory
8624
8827
  fragmentEndAnchor,
8625
8828
  parentComponent,
8626
8829
  parentSuspense,
8627
- isSVG,
8830
+ namespace,
8628
8831
  slotScopeIds,
8629
8832
  optimized
8630
8833
  );
@@ -8638,7 +8841,7 @@ If you want to remount the same app, move your app creation logic into a factory
8638
8841
  container,
8639
8842
  parentComponent,
8640
8843
  parentSuspense,
8641
- isSVG,
8844
+ namespace,
8642
8845
  slotScopeIds
8643
8846
  );
8644
8847
  {
@@ -8652,14 +8855,14 @@ If you want to remount the same app, move your app creation logic into a factory
8652
8855
  fragmentEndAnchor,
8653
8856
  parentComponent,
8654
8857
  parentSuspense,
8655
- isSVG,
8858
+ namespace,
8656
8859
  slotScopeIds,
8657
8860
  optimized
8658
8861
  );
8659
8862
  }
8660
8863
  }
8661
8864
  };
8662
- const processComponent = (n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized) => {
8865
+ const processComponent = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => {
8663
8866
  n2.slotScopeIds = slotScopeIds;
8664
8867
  if (n1 == null) {
8665
8868
  if (n2.shapeFlag & 512) {
@@ -8667,7 +8870,7 @@ If you want to remount the same app, move your app creation logic into a factory
8667
8870
  n2,
8668
8871
  container,
8669
8872
  anchor,
8670
- isSVG,
8873
+ namespace,
8671
8874
  optimized
8672
8875
  );
8673
8876
  } else {
@@ -8677,7 +8880,7 @@ If you want to remount the same app, move your app creation logic into a factory
8677
8880
  anchor,
8678
8881
  parentComponent,
8679
8882
  parentSuspense,
8680
- isSVG,
8883
+ namespace,
8681
8884
  optimized
8682
8885
  );
8683
8886
  }
@@ -8685,7 +8888,7 @@ If you want to remount the same app, move your app creation logic into a factory
8685
8888
  updateComponent(n1, n2, optimized);
8686
8889
  }
8687
8890
  };
8688
- const mountComponent = (initialVNode, container, anchor, parentComponent, parentSuspense, isSVG, optimized) => {
8891
+ const mountComponent = (initialVNode, container, anchor, parentComponent, parentSuspense, namespace, optimized) => {
8689
8892
  const compatMountInstance = initialVNode.isCompatRoot && initialVNode.component;
8690
8893
  const instance = compatMountInstance || (initialVNode.component = createComponentInstance(
8691
8894
  initialVNode,
@@ -8717,17 +8920,17 @@ If you want to remount the same app, move your app creation logic into a factory
8717
8920
  const placeholder = instance.subTree = createVNode(Comment);
8718
8921
  processCommentNode(null, placeholder, container, anchor);
8719
8922
  }
8720
- return;
8923
+ } else {
8924
+ setupRenderEffect(
8925
+ instance,
8926
+ initialVNode,
8927
+ container,
8928
+ anchor,
8929
+ parentSuspense,
8930
+ namespace,
8931
+ optimized
8932
+ );
8721
8933
  }
8722
- setupRenderEffect(
8723
- instance,
8724
- initialVNode,
8725
- container,
8726
- anchor,
8727
- parentSuspense,
8728
- isSVG,
8729
- optimized
8730
- );
8731
8934
  {
8732
8935
  popWarningContext();
8733
8936
  endMeasure(instance, `mount`);
@@ -8756,7 +8959,7 @@ If you want to remount the same app, move your app creation logic into a factory
8756
8959
  instance.vnode = n2;
8757
8960
  }
8758
8961
  };
8759
- const setupRenderEffect = (instance, initialVNode, container, anchor, parentSuspense, isSVG, optimized) => {
8962
+ const setupRenderEffect = (instance, initialVNode, container, anchor, parentSuspense, namespace, optimized) => {
8760
8963
  const componentUpdateFn = () => {
8761
8964
  if (!instance.isMounted) {
8762
8965
  let vnodeHook;
@@ -8826,7 +9029,7 @@ If you want to remount the same app, move your app creation logic into a factory
8826
9029
  anchor,
8827
9030
  instance,
8828
9031
  parentSuspense,
8829
- isSVG
9032
+ namespace
8830
9033
  );
8831
9034
  {
8832
9035
  endMeasure(instance, `patch`);
@@ -8865,6 +9068,21 @@ If you want to remount the same app, move your app creation logic into a factory
8865
9068
  initialVNode = container = anchor = null;
8866
9069
  } else {
8867
9070
  let { next, bu, u, parent, vnode } = instance;
9071
+ {
9072
+ const nonHydratedAsyncRoot = locateNonHydratedAsyncRoot(instance);
9073
+ if (nonHydratedAsyncRoot) {
9074
+ if (next) {
9075
+ next.el = vnode.el;
9076
+ updateComponentPreRender(instance, next, optimized);
9077
+ }
9078
+ nonHydratedAsyncRoot.asyncDep.then(() => {
9079
+ if (!instance.isUnmounted) {
9080
+ componentUpdateFn();
9081
+ }
9082
+ });
9083
+ return;
9084
+ }
9085
+ }
8868
9086
  let originNext = next;
8869
9087
  let vnodeHook;
8870
9088
  {
@@ -8908,7 +9126,7 @@ If you want to remount the same app, move your app creation logic into a factory
8908
9126
  getNextHostNode(prevTree),
8909
9127
  instance,
8910
9128
  parentSuspense,
8911
- isSVG
9129
+ namespace
8912
9130
  );
8913
9131
  {
8914
9132
  endMeasure(instance, `patch`);
@@ -8969,10 +9187,10 @@ If you want to remount the same app, move your app creation logic into a factory
8969
9187
  updateProps(instance, nextVNode.props, prevProps, optimized);
8970
9188
  updateSlots(instance, nextVNode.children, optimized);
8971
9189
  pauseTracking();
8972
- flushPreFlushCbs();
9190
+ flushPreFlushCbs(instance);
8973
9191
  resetTracking();
8974
9192
  };
8975
- const patchChildren = (n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized = false) => {
9193
+ const patchChildren = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized = false) => {
8976
9194
  const c1 = n1 && n1.children;
8977
9195
  const prevShapeFlag = n1 ? n1.shapeFlag : 0;
8978
9196
  const c2 = n2.children;
@@ -8986,7 +9204,7 @@ If you want to remount the same app, move your app creation logic into a factory
8986
9204
  anchor,
8987
9205
  parentComponent,
8988
9206
  parentSuspense,
8989
- isSVG,
9207
+ namespace,
8990
9208
  slotScopeIds,
8991
9209
  optimized
8992
9210
  );
@@ -8999,7 +9217,7 @@ If you want to remount the same app, move your app creation logic into a factory
8999
9217
  anchor,
9000
9218
  parentComponent,
9001
9219
  parentSuspense,
9002
- isSVG,
9220
+ namespace,
9003
9221
  slotScopeIds,
9004
9222
  optimized
9005
9223
  );
@@ -9023,7 +9241,7 @@ If you want to remount the same app, move your app creation logic into a factory
9023
9241
  anchor,
9024
9242
  parentComponent,
9025
9243
  parentSuspense,
9026
- isSVG,
9244
+ namespace,
9027
9245
  slotScopeIds,
9028
9246
  optimized
9029
9247
  );
@@ -9041,7 +9259,7 @@ If you want to remount the same app, move your app creation logic into a factory
9041
9259
  anchor,
9042
9260
  parentComponent,
9043
9261
  parentSuspense,
9044
- isSVG,
9262
+ namespace,
9045
9263
  slotScopeIds,
9046
9264
  optimized
9047
9265
  );
@@ -9049,7 +9267,7 @@ If you want to remount the same app, move your app creation logic into a factory
9049
9267
  }
9050
9268
  }
9051
9269
  };
9052
- const patchUnkeyedChildren = (c1, c2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized) => {
9270
+ const patchUnkeyedChildren = (c1, c2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => {
9053
9271
  c1 = c1 || EMPTY_ARR;
9054
9272
  c2 = c2 || EMPTY_ARR;
9055
9273
  const oldLength = c1.length;
@@ -9065,7 +9283,7 @@ If you want to remount the same app, move your app creation logic into a factory
9065
9283
  null,
9066
9284
  parentComponent,
9067
9285
  parentSuspense,
9068
- isSVG,
9286
+ namespace,
9069
9287
  slotScopeIds,
9070
9288
  optimized
9071
9289
  );
@@ -9086,14 +9304,14 @@ If you want to remount the same app, move your app creation logic into a factory
9086
9304
  anchor,
9087
9305
  parentComponent,
9088
9306
  parentSuspense,
9089
- isSVG,
9307
+ namespace,
9090
9308
  slotScopeIds,
9091
9309
  optimized,
9092
9310
  commonLength
9093
9311
  );
9094
9312
  }
9095
9313
  };
9096
- const patchKeyedChildren = (c1, c2, container, parentAnchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized) => {
9314
+ const patchKeyedChildren = (c1, c2, container, parentAnchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => {
9097
9315
  let i = 0;
9098
9316
  const l2 = c2.length;
9099
9317
  let e1 = c1.length - 1;
@@ -9109,7 +9327,7 @@ If you want to remount the same app, move your app creation logic into a factory
9109
9327
  null,
9110
9328
  parentComponent,
9111
9329
  parentSuspense,
9112
- isSVG,
9330
+ namespace,
9113
9331
  slotScopeIds,
9114
9332
  optimized
9115
9333
  );
@@ -9129,7 +9347,7 @@ If you want to remount the same app, move your app creation logic into a factory
9129
9347
  null,
9130
9348
  parentComponent,
9131
9349
  parentSuspense,
9132
- isSVG,
9350
+ namespace,
9133
9351
  slotScopeIds,
9134
9352
  optimized
9135
9353
  );
@@ -9151,7 +9369,7 @@ If you want to remount the same app, move your app creation logic into a factory
9151
9369
  anchor,
9152
9370
  parentComponent,
9153
9371
  parentSuspense,
9154
- isSVG,
9372
+ namespace,
9155
9373
  slotScopeIds,
9156
9374
  optimized
9157
9375
  );
@@ -9221,7 +9439,7 @@ If you want to remount the same app, move your app creation logic into a factory
9221
9439
  null,
9222
9440
  parentComponent,
9223
9441
  parentSuspense,
9224
- isSVG,
9442
+ namespace,
9225
9443
  slotScopeIds,
9226
9444
  optimized
9227
9445
  );
@@ -9242,7 +9460,7 @@ If you want to remount the same app, move your app creation logic into a factory
9242
9460
  anchor,
9243
9461
  parentComponent,
9244
9462
  parentSuspense,
9245
- isSVG,
9463
+ namespace,
9246
9464
  slotScopeIds,
9247
9465
  optimized
9248
9466
  );
@@ -9472,13 +9690,21 @@ If you want to remount the same app, move your app creation logic into a factory
9472
9690
  }
9473
9691
  return hostNextSibling(vnode.anchor || vnode.el);
9474
9692
  };
9475
- const render = (vnode, container, isSVG) => {
9693
+ const render = (vnode, container, namespace) => {
9476
9694
  if (vnode == null) {
9477
9695
  if (container._vnode) {
9478
9696
  unmount(container._vnode, null, null, true);
9479
9697
  }
9480
9698
  } else {
9481
- patch(container._vnode || null, vnode, container, null, null, null, isSVG);
9699
+ patch(
9700
+ container._vnode || null,
9701
+ vnode,
9702
+ container,
9703
+ null,
9704
+ null,
9705
+ null,
9706
+ namespace
9707
+ );
9482
9708
  }
9483
9709
  flushPreFlushCbs();
9484
9710
  flushPostFlushCbs();
@@ -9509,6 +9735,9 @@ If you want to remount the same app, move your app creation logic into a factory
9509
9735
  createApp: createAppAPI(render, hydrate)
9510
9736
  };
9511
9737
  }
9738
+ function resolveChildrenNamespace({ type, props }, currentNamespace) {
9739
+ return currentNamespace === "svg" && type === "foreignObject" || currentNamespace === "mathml" && type === "annotation-xml" && props && props.encoding && props.encoding.includes("html") ? void 0 : currentNamespace;
9740
+ }
9512
9741
  function toggleRecurse({ effect, update }, allowed) {
9513
9742
  effect.allowRecurse = update.allowRecurse = allowed;
9514
9743
  }
@@ -9579,10 +9808,21 @@ If you want to remount the same app, move your app creation logic into a factory
9579
9808
  }
9580
9809
  return result;
9581
9810
  }
9811
+ function locateNonHydratedAsyncRoot(instance) {
9812
+ const subComponent = instance.subTree.component;
9813
+ if (subComponent) {
9814
+ if (subComponent.asyncDep && !subComponent.asyncResolved) {
9815
+ return subComponent;
9816
+ } else {
9817
+ return locateNonHydratedAsyncRoot(subComponent);
9818
+ }
9819
+ }
9820
+ }
9582
9821
 
9583
9822
  const isTeleport = (type) => type.__isTeleport;
9584
9823
  const isTeleportDisabled = (props) => props && (props.disabled || props.disabled === "");
9585
9824
  const isTargetSVG = (target) => typeof SVGElement !== "undefined" && target instanceof SVGElement;
9825
+ const isTargetMathML = (target) => typeof MathMLElement === "function" && target instanceof MathMLElement;
9586
9826
  const resolveTarget = (props, select) => {
9587
9827
  const targetSelector = props && props.to;
9588
9828
  if (isString(targetSelector)) {
@@ -9610,7 +9850,7 @@ If you want to remount the same app, move your app creation logic into a factory
9610
9850
  const TeleportImpl = {
9611
9851
  name: "Teleport",
9612
9852
  __isTeleport: true,
9613
- process(n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized, internals) {
9853
+ process(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, internals) {
9614
9854
  const {
9615
9855
  mc: mountChildren,
9616
9856
  pc: patchChildren,
@@ -9632,7 +9872,11 @@ If you want to remount the same app, move your app creation logic into a factory
9632
9872
  const targetAnchor = n2.targetAnchor = createText("");
9633
9873
  if (target) {
9634
9874
  insert(targetAnchor, target);
9635
- isSVG = isSVG || isTargetSVG(target);
9875
+ if (namespace === "svg" || isTargetSVG(target)) {
9876
+ namespace = "svg";
9877
+ } else if (namespace === "mathml" || isTargetMathML(target)) {
9878
+ namespace = "mathml";
9879
+ }
9636
9880
  } else if (!disabled) {
9637
9881
  warn("Invalid Teleport target on mount:", target, `(${typeof target})`);
9638
9882
  }
@@ -9644,7 +9888,7 @@ If you want to remount the same app, move your app creation logic into a factory
9644
9888
  anchor2,
9645
9889
  parentComponent,
9646
9890
  parentSuspense,
9647
- isSVG,
9891
+ namespace,
9648
9892
  slotScopeIds,
9649
9893
  optimized
9650
9894
  );
@@ -9663,7 +9907,11 @@ If you want to remount the same app, move your app creation logic into a factory
9663
9907
  const wasDisabled = isTeleportDisabled(n1.props);
9664
9908
  const currentContainer = wasDisabled ? container : target;
9665
9909
  const currentAnchor = wasDisabled ? mainAnchor : targetAnchor;
9666
- isSVG = isSVG || isTargetSVG(target);
9910
+ if (namespace === "svg" || isTargetSVG(target)) {
9911
+ namespace = "svg";
9912
+ } else if (namespace === "mathml" || isTargetMathML(target)) {
9913
+ namespace = "mathml";
9914
+ }
9667
9915
  if (dynamicChildren) {
9668
9916
  patchBlockChildren(
9669
9917
  n1.dynamicChildren,
@@ -9671,7 +9919,7 @@ If you want to remount the same app, move your app creation logic into a factory
9671
9919
  currentContainer,
9672
9920
  parentComponent,
9673
9921
  parentSuspense,
9674
- isSVG,
9922
+ namespace,
9675
9923
  slotScopeIds
9676
9924
  );
9677
9925
  traverseStaticChildren(n1, n2, true);
@@ -9683,7 +9931,7 @@ If you want to remount the same app, move your app creation logic into a factory
9683
9931
  currentAnchor,
9684
9932
  parentComponent,
9685
9933
  parentSuspense,
9686
- isSVG,
9934
+ namespace,
9687
9935
  slotScopeIds,
9688
9936
  false
9689
9937
  );
@@ -10367,10 +10615,14 @@ Component that was made reactive: `,
10367
10615
  let currentInstance = null;
10368
10616
  const getCurrentInstance = () => currentInstance || currentRenderingInstance;
10369
10617
  let internalSetCurrentInstance;
10618
+ let setInSSRSetupState;
10370
10619
  {
10371
10620
  internalSetCurrentInstance = (i) => {
10372
10621
  currentInstance = i;
10373
10622
  };
10623
+ setInSSRSetupState = (v) => {
10624
+ isInSSRComponentSetup = v;
10625
+ };
10374
10626
  }
10375
10627
  const setCurrentInstance = (instance) => {
10376
10628
  internalSetCurrentInstance(instance);
@@ -10394,13 +10646,13 @@ Component that was made reactive: `,
10394
10646
  }
10395
10647
  let isInSSRComponentSetup = false;
10396
10648
  function setupComponent(instance, isSSR = false) {
10397
- isInSSRComponentSetup = isSSR;
10649
+ isSSR && setInSSRSetupState(isSSR);
10398
10650
  const { props, children } = instance.vnode;
10399
10651
  const isStateful = isStatefulComponent(instance);
10400
10652
  initProps(instance, props, isStateful, isSSR);
10401
10653
  initSlots(instance, children);
10402
10654
  const setupResult = isStateful ? setupStatefulComponent(instance, isSSR) : void 0;
10403
- isInSSRComponentSetup = false;
10655
+ isSSR && setInSSRSetupState(false);
10404
10656
  return setupResult;
10405
10657
  }
10406
10658
  function setupStatefulComponent(instance, isSSR) {
@@ -10722,9 +10974,9 @@ Component that was made reactive: `,
10722
10974
  return;
10723
10975
  }
10724
10976
  const vueStyle = { style: "color:#3ba776" };
10725
- const numberStyle = { style: "color:#0b1bc9" };
10726
- const stringStyle = { style: "color:#b62e24" };
10727
- const keywordStyle = { style: "color:#9d288c" };
10977
+ const numberStyle = { style: "color:#1677ff" };
10978
+ const stringStyle = { style: "color:#f5222d" };
10979
+ const keywordStyle = { style: "color:#eb2f96" };
10728
10980
  const formatter = {
10729
10981
  header(obj) {
10730
10982
  if (!isObject(obj)) {
@@ -10918,7 +11170,7 @@ Component that was made reactive: `,
10918
11170
  return true;
10919
11171
  }
10920
11172
 
10921
- const version = "3.4.0-alpha.3";
11173
+ const version = "3.4.0-beta.1";
10922
11174
  const ErrorTypeStrings = ErrorTypeStrings$1 ;
10923
11175
  const ssrUtils = null;
10924
11176
  const resolveFilter = resolveFilter$1 ;
@@ -10930,8 +11182,10 @@ Component that was made reactive: `,
10930
11182
  softAssertCompatEnabled
10931
11183
  };
10932
11184
  const compatUtils = _compatUtils ;
11185
+ const DeprecationTypes = DeprecationTypes$1 ;
10933
11186
 
10934
11187
  const svgNS = "http://www.w3.org/2000/svg";
11188
+ const mathmlNS = "http://www.w3.org/1998/Math/MathML";
10935
11189
  const doc = typeof document !== "undefined" ? document : null;
10936
11190
  const templateContainer = doc && /* @__PURE__ */ doc.createElement("template");
10937
11191
  const nodeOps = {
@@ -10944,8 +11198,8 @@ Component that was made reactive: `,
10944
11198
  parent.removeChild(child);
10945
11199
  }
10946
11200
  },
10947
- createElement: (tag, isSVG, is, props) => {
10948
- const el = isSVG ? doc.createElementNS(svgNS, tag) : doc.createElement(tag, is ? { is } : void 0);
11201
+ createElement: (tag, namespace, is, props) => {
11202
+ const el = namespace === "svg" ? doc.createElementNS(svgNS, tag) : namespace === "mathml" ? doc.createElementNS(mathmlNS, tag) : doc.createElement(tag, is ? { is } : void 0);
10949
11203
  if (tag === "select" && props && props.multiple != null) {
10950
11204
  el.setAttribute("multiple", props.multiple);
10951
11205
  }
@@ -10969,7 +11223,7 @@ Component that was made reactive: `,
10969
11223
  // Reason: innerHTML.
10970
11224
  // Static content here can only come from compiled templates.
10971
11225
  // As long as the user only uses trusted templates, this is safe.
10972
- insertStaticContent(content, parent, anchor, isSVG, start, end) {
11226
+ insertStaticContent(content, parent, anchor, namespace, start, end) {
10973
11227
  const before = anchor ? anchor.previousSibling : parent.lastChild;
10974
11228
  if (start && (start === end || start.nextSibling)) {
10975
11229
  while (true) {
@@ -10978,9 +11232,9 @@ Component that was made reactive: `,
10978
11232
  break;
10979
11233
  }
10980
11234
  } else {
10981
- templateContainer.innerHTML = isSVG ? `<svg>${content}</svg>` : content;
11235
+ templateContainer.innerHTML = namespace === "svg" ? `<svg>${content}</svg>` : namespace === "mathml" ? `<math>${content}</math>` : content;
10982
11236
  const template = templateContainer.content;
10983
- if (isSVG) {
11237
+ if (namespace === "svg" || namespace === "mathml") {
10984
11238
  const wrapper = template.firstChild;
10985
11239
  while (wrapper.firstChild) {
10986
11240
  template.appendChild(wrapper.firstChild);
@@ -11618,8 +11872,10 @@ Component that was made reactive: `,
11618
11872
  }
11619
11873
  }
11620
11874
 
11621
- const nativeOnRE = /^on[a-z]/;
11622
- const patchProp = (el, key, prevValue, nextValue, isSVG = false, prevChildren, parentComponent, parentSuspense, unmountChildren) => {
11875
+ const isNativeOn = (key) => key.charCodeAt(0) === 111 && key.charCodeAt(1) === 110 && // lowercase letter
11876
+ key.charCodeAt(2) > 96 && key.charCodeAt(2) < 123;
11877
+ const patchProp = (el, key, prevValue, nextValue, namespace, prevChildren, parentComponent, parentSuspense, unmountChildren) => {
11878
+ const isSVG = namespace === "svg";
11623
11879
  if (key === "class") {
11624
11880
  patchClass(el, nextValue, isSVG);
11625
11881
  } else if (key === "style") {
@@ -11652,7 +11908,7 @@ Component that was made reactive: `,
11652
11908
  if (key === "innerHTML" || key === "textContent") {
11653
11909
  return true;
11654
11910
  }
11655
- if (key in el && nativeOnRE.test(key) && isFunction(value)) {
11911
+ if (key in el && isNativeOn(key) && isFunction(value)) {
11656
11912
  return true;
11657
11913
  }
11658
11914
  return false;
@@ -11669,7 +11925,13 @@ Component that was made reactive: `,
11669
11925
  if (key === "type" && el.tagName === "TEXTAREA") {
11670
11926
  return false;
11671
11927
  }
11672
- if (nativeOnRE.test(key) && isString(value)) {
11928
+ if (key === "width" || key === "height") {
11929
+ const tag = el.tagName;
11930
+ if (tag === "IMG" || tag === "VIDEO" || tag === "CANVAS" || tag === "SOURCE") {
11931
+ return false;
11932
+ }
11933
+ }
11934
+ if (isNativeOn(key) && isString(value)) {
11673
11935
  return false;
11674
11936
  }
11675
11937
  return key in el;
@@ -12347,14 +12609,14 @@ Component that was made reactive: `,
12347
12609
  exact: (e, modifiers) => systemModifiers.some((m) => e[`${m}Key`] && !modifiers.includes(m))
12348
12610
  };
12349
12611
  const withModifiers = (fn, modifiers) => {
12350
- return (event, ...args) => {
12612
+ return fn._withMods || (fn._withMods = (event, ...args) => {
12351
12613
  for (let i = 0; i < modifiers.length; i++) {
12352
12614
  const guard = modifierGuards[modifiers[i]];
12353
12615
  if (guard && guard(event, modifiers))
12354
12616
  return;
12355
12617
  }
12356
12618
  return fn(event, ...args);
12357
- };
12619
+ });
12358
12620
  };
12359
12621
  const keyNames = {
12360
12622
  esc: "escape",
@@ -12382,7 +12644,7 @@ Component that was made reactive: `,
12382
12644
  );
12383
12645
  }
12384
12646
  }
12385
- return (event) => {
12647
+ return fn._withKeys || (fn._withKeys = (event) => {
12386
12648
  if (!("key" in event)) {
12387
12649
  return;
12388
12650
  }
@@ -12410,7 +12672,7 @@ Component that was made reactive: `,
12410
12672
  }
12411
12673
  }
12412
12674
  }
12413
- };
12675
+ });
12414
12676
  };
12415
12677
 
12416
12678
  const rendererOptions = /* @__PURE__ */ extend({ patchProp }, nodeOps);
@@ -12458,7 +12720,7 @@ Component that was made reactive: `,
12458
12720
  }
12459
12721
  }
12460
12722
  container.innerHTML = "";
12461
- const proxy = mount(container, false, container instanceof SVGElement);
12723
+ const proxy = mount(container, false, resolveRootNamespace(container));
12462
12724
  if (container instanceof Element) {
12463
12725
  container.removeAttribute("v-cloak");
12464
12726
  container.setAttribute("data-v-app", "");
@@ -12477,14 +12739,22 @@ Component that was made reactive: `,
12477
12739
  app.mount = (containerOrSelector) => {
12478
12740
  const container = normalizeContainer(containerOrSelector);
12479
12741
  if (container) {
12480
- return mount(container, true, container instanceof SVGElement);
12742
+ return mount(container, true, resolveRootNamespace(container));
12481
12743
  }
12482
12744
  };
12483
12745
  return app;
12484
12746
  };
12747
+ function resolveRootNamespace(container) {
12748
+ if (container instanceof SVGElement) {
12749
+ return "svg";
12750
+ }
12751
+ if (typeof MathMLElement === "function" && container instanceof MathMLElement) {
12752
+ return "mathml";
12753
+ }
12754
+ }
12485
12755
  function injectNativeTagCheck(app) {
12486
12756
  Object.defineProperty(app.config, "isNativeTag", {
12487
- value: (tag) => isHTMLTag(tag) || isSVGTag(tag),
12757
+ value: (tag) => isHTMLTag(tag) || isSVGTag(tag) || isMathMLTag(tag),
12488
12758
  writable: false
12489
12759
  });
12490
12760
  }
@@ -12541,7 +12811,9 @@ Component that was made reactive: `,
12541
12811
  BaseTransition: BaseTransition,
12542
12812
  BaseTransitionPropsValidators: BaseTransitionPropsValidators,
12543
12813
  Comment: Comment,
12814
+ DeprecationTypes: DeprecationTypes,
12544
12815
  EffectScope: EffectScope,
12816
+ ErrorCodes: ErrorCodes,
12545
12817
  ErrorTypeStrings: ErrorTypeStrings,
12546
12818
  Fragment: Fragment,
12547
12819
  KeepAlive: KeepAlive,
@@ -12550,8 +12822,10 @@ Component that was made reactive: `,
12550
12822
  Suspense: Suspense,
12551
12823
  Teleport: Teleport,
12552
12824
  Text: Text,
12825
+ TrackOpTypes: TrackOpTypes,
12553
12826
  Transition: Transition,
12554
12827
  TransitionGroup: TransitionGroup,
12828
+ TriggerOpTypes: TriggerOpTypes,
12555
12829
  VueElement: VueElement,
12556
12830
  assertNumber: assertNumber,
12557
12831
  callWithAsyncErrorHandling: callWithAsyncErrorHandling,
@@ -13023,7 +13297,9 @@ Make sure to use the production build (*.prod.js) when deploying for production.
13023
13297
  this.inRCDATA = false;
13024
13298
  /** For disabling RCDATA tags handling */
13025
13299
  this.inXML = false;
13026
- /** Reocrd newline positions for fast line / column calculation */
13300
+ /** For disabling interpolation parsing in v-pre */
13301
+ this.inVPre = false;
13302
+ /** Record newline positions for fast line / column calculation */
13027
13303
  this.newlines = [];
13028
13304
  this.mode = 0;
13029
13305
  this.delimiterOpen = defaultDelimitersOpen;
@@ -13042,6 +13318,7 @@ Make sure to use the production build (*.prod.js) when deploying for production.
13042
13318
  this.sectionStart = 0;
13043
13319
  this.index = 0;
13044
13320
  this.baseState = 1;
13321
+ this.inRCDATA = false;
13045
13322
  this.currentSequence = void 0;
13046
13323
  this.newlines.length = 0;
13047
13324
  this.delimiterOpen = defaultDelimitersOpen;
@@ -13080,7 +13357,7 @@ Make sure to use the production build (*.prod.js) when deploying for production.
13080
13357
  }
13081
13358
  this.state = 5;
13082
13359
  this.sectionStart = this.index;
13083
- } else if (c === this.delimiterOpen[0]) {
13360
+ } else if (!this.inVPre && c === this.delimiterOpen[0]) {
13084
13361
  this.state = 2;
13085
13362
  this.delimiterIndex = 0;
13086
13363
  this.stateInterpolationOpen(c);
@@ -13895,16 +14172,14 @@ Make sure to use the production build (*.prod.js) when deploying for production.
13895
14172
  Use a v-bind binding combined with a v-on listener that emits update:x event instead.`,
13896
14173
  [45]: `Error parsing JavaScript expression: `,
13897
14174
  [46]: `<KeepAlive> expects exactly one child component.`,
14175
+ [51]: `@vnode-* hooks in templates are deprecated. Use the vue: prefix instead. For example, @vnode-mounted should be changed to @vue:mounted. @vnode-* hooks support will be removed in 3.4.`,
13898
14176
  // generic errors
13899
14177
  [47]: `"prefixIdentifiers" option is not supported in this build of compiler.`,
13900
14178
  [48]: `ES module mode is not supported in this build of compiler.`,
13901
14179
  [49]: `"cacheHandlers" option is only supported when the "prefixIdentifiers" option is enabled.`,
13902
14180
  [50]: `"scopeId" option is only supported in module mode.`,
13903
- // deprecations
13904
- [51]: `@vnode-* hooks in templates are deprecated. Use the vue: prefix instead. For example, @vnode-mounted should be changed to @vue:mounted. @vnode-* hooks support will be removed in 3.4.`,
13905
- [52]: `v-is="component-name" has been deprecated. Use is="vue:component-name" instead. v-is support will be removed in 3.4.`,
13906
14181
  // just to fulfill types
13907
- [53]: ``
14182
+ [52]: ``
13908
14183
  };
13909
14184
 
13910
14185
  const isStaticExp = (p) => p.type === 4 && p.isStatic;
@@ -14147,7 +14422,8 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
14147
14422
  isCustomElement: NO,
14148
14423
  onError: defaultOnError,
14149
14424
  onWarn: defaultOnWarn,
14150
- comments: true
14425
+ comments: true,
14426
+ prefixIdentifiers: false
14151
14427
  };
14152
14428
  let currentOptions = defaultParserOptions;
14153
14429
  let currentRoot = null;
@@ -14189,7 +14465,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
14189
14465
  }
14190
14466
  addNode({
14191
14467
  type: 5,
14192
- content: createSimpleExpression(exp, false, getLoc(innerStart, innerEnd)),
14468
+ content: createExp(exp, false, getLoc(innerStart, innerEnd)),
14193
14469
  loc: getLoc(start, end)
14194
14470
  });
14195
14471
  },
@@ -14282,7 +14558,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
14282
14558
  loc: getLoc(start)
14283
14559
  };
14284
14560
  if (name === "pre") {
14285
- inVPre = true;
14561
+ inVPre = tokenizer.inVPre = true;
14286
14562
  currentVPreBoundary = currentOpenTag;
14287
14563
  const props = currentOpenTag.props;
14288
14564
  for (let i = 0; i < props.length; i++) {
@@ -14302,7 +14578,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
14302
14578
  setLocEnd(currentProp.nameLoc, end);
14303
14579
  } else {
14304
14580
  const isStatic = arg[0] !== `[`;
14305
- currentProp.arg = createSimpleExpression(
14581
+ currentProp.arg = createExp(
14306
14582
  isStatic ? arg : arg.slice(1, -1),
14307
14583
  isStatic,
14308
14584
  getLoc(start, end),
@@ -14375,10 +14651,13 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
14375
14651
  tokenizer.enterRCDATA(toCharCodes(`</template`), 0);
14376
14652
  }
14377
14653
  } else {
14378
- currentProp.exp = createSimpleExpression(
14654
+ let expParseMode = 0 /* Normal */;
14655
+ currentProp.exp = createExp(
14379
14656
  currentAttrValue,
14380
14657
  false,
14381
- getLoc(currentAttrStartIndex, currentAttrEndIndex)
14658
+ getLoc(currentAttrStartIndex, currentAttrEndIndex),
14659
+ 0,
14660
+ expParseMode
14382
14661
  );
14383
14662
  if (currentProp.name === "for") {
14384
14663
  currentProp.forParseResult = parseForExpression(currentProp.exp);
@@ -14481,10 +14760,16 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
14481
14760
  if (!inMatch)
14482
14761
  return;
14483
14762
  const [, LHS, RHS] = inMatch;
14484
- const createAliasExpression = (content, offset) => {
14763
+ const createAliasExpression = (content, offset, asParam = false) => {
14485
14764
  const start = loc.start.offset + offset;
14486
14765
  const end = start + content.length;
14487
- return createSimpleExpression(content, false, getLoc(start, end));
14766
+ return createExp(
14767
+ content,
14768
+ false,
14769
+ getLoc(start, end),
14770
+ 0,
14771
+ asParam ? 1 /* Params */ : 0 /* Normal */
14772
+ );
14488
14773
  };
14489
14774
  const result = {
14490
14775
  source: createAliasExpression(RHS.trim(), exp.indexOf(RHS, LHS.length)),
@@ -14502,7 +14787,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
14502
14787
  let keyOffset;
14503
14788
  if (keyContent) {
14504
14789
  keyOffset = exp.indexOf(keyContent, trimmedOffset + valueContent.length);
14505
- result.key = createAliasExpression(keyContent, keyOffset);
14790
+ result.key = createAliasExpression(keyContent, keyOffset, true);
14506
14791
  }
14507
14792
  if (iteratorMatch[2]) {
14508
14793
  const indexContent = iteratorMatch[2].trim();
@@ -14512,13 +14797,14 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
14512
14797
  exp.indexOf(
14513
14798
  indexContent,
14514
14799
  result.key ? keyOffset + keyContent.length : trimmedOffset + valueContent.length
14515
- )
14800
+ ),
14801
+ true
14516
14802
  );
14517
14803
  }
14518
14804
  }
14519
14805
  }
14520
14806
  if (valueContent) {
14521
- result.value = createAliasExpression(valueContent, trimmedOffset);
14807
+ result.value = createAliasExpression(valueContent, trimmedOffset, true);
14522
14808
  }
14523
14809
  return result;
14524
14810
  }
@@ -14596,7 +14882,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
14596
14882
  inPre--;
14597
14883
  }
14598
14884
  if (currentVPreBoundary === el) {
14599
- inVPre = false;
14885
+ inVPre = tokenizer.inVPre = false;
14600
14886
  currentVPreBoundary = null;
14601
14887
  }
14602
14888
  if (tokenizer.inXML && (stack[0] ? stack[0].ns : currentOptions.ns) === 0) {
@@ -14831,8 +15117,14 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
14831
15117
  }
14832
15118
  return attr;
14833
15119
  }
14834
- function emitError(code, index) {
14835
- currentOptions.onError(createCompilerError(code, getLoc(index, index)));
15120
+ function createExp(content, isStatic = false, loc, constType = 0, parseMode = 0 /* Normal */) {
15121
+ const exp = createSimpleExpression(content, isStatic, loc, constType);
15122
+ return exp;
15123
+ }
15124
+ function emitError(code, index, message) {
15125
+ currentOptions.onError(
15126
+ createCompilerError(code, getLoc(index, index), void 0, message)
15127
+ );
14836
15128
  }
14837
15129
  function reset() {
14838
15130
  tokenizer.reset();
@@ -14863,6 +15155,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
14863
15155
  }
14864
15156
  }
14865
15157
  tokenizer.mode = currentOptions.parseMode === "html" ? 1 : currentOptions.parseMode === "sfc" ? 2 : 0;
15158
+ tokenizer.inXML = currentOptions.ns === 1 || currentOptions.ns === 2;
14866
15159
  const delimiters = options == null ? void 0 : options.delimiters;
14867
15160
  if (delimiters) {
14868
15161
  tokenizer.delimiterOpen = toCharCodes(delimiters[0]);
@@ -15147,6 +15440,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
15147
15440
  const nameMatch = filename.replace(/\?.*$/, "").match(/([^/\\]+)\.\w+$/);
15148
15441
  const context = {
15149
15442
  // options
15443
+ filename,
15150
15444
  selfName: nameMatch && capitalize(camelize(nameMatch[1])),
15151
15445
  prefixIdentifiers,
15152
15446
  hoistStatic: hoistStatic2,
@@ -16909,6 +17203,9 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
16909
17203
  if (isEventHandler && isReservedProp(name)) {
16910
17204
  hasVnodeHook = true;
16911
17205
  }
17206
+ if (isEventHandler && value.type === 14) {
17207
+ value = value.arguments[0];
17208
+ }
16912
17209
  if (value.type === 20 || (value.type === 4 || value.type === 8) && getConstantType(value, context) > 0) {
16913
17210
  return;
16914
17211
  }
@@ -17361,9 +17658,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
17361
17658
  if (arg.isStatic) {
17362
17659
  let rawName = arg.content;
17363
17660
  if (rawName.startsWith("vnode")) {
17364
- context.onWarn(
17365
- createCompilerError(51, arg.loc)
17366
- );
17661
+ context.onError(createCompilerError(51, arg.loc));
17367
17662
  }
17368
17663
  if (rawName.startsWith("vue:")) {
17369
17664
  rawName = `vnode-${rawName.slice(4)}`;
@@ -17856,12 +18151,14 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
17856
18151
  if (options.scopeId && !isModuleMode) {
17857
18152
  onError(createCompilerError(50));
17858
18153
  }
17859
- const ast = isString(source) ? baseParse(source, options) : source;
18154
+ const resolvedOptions = extend({}, options, {
18155
+ prefixIdentifiers
18156
+ });
18157
+ const ast = isString(source) ? baseParse(source, resolvedOptions) : source;
17860
18158
  const [nodeTransforms, directiveTransforms] = getBaseTransformPreset();
17861
18159
  transform(
17862
18160
  ast,
17863
- extend({}, options, {
17864
- prefixIdentifiers,
18161
+ extend({}, resolvedOptions, {
17865
18162
  nodeTransforms: [
17866
18163
  ...nodeTransforms,
17867
18164
  ...options.nodeTransforms || []
@@ -17875,12 +18172,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
17875
18172
  )
17876
18173
  })
17877
18174
  );
17878
- return generate(
17879
- ast,
17880
- extend({}, options, {
17881
- prefixIdentifiers
17882
- })
17883
- );
18175
+ return generate(ast, resolvedOptions);
17884
18176
  }
17885
18177
 
17886
18178
  const noopDirectiveTransform = () => ({ props: [] });
@@ -17925,7 +18217,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
17925
18217
  const parserOptions = {
17926
18218
  parseMode: "html",
17927
18219
  isVoidTag,
17928
- isNativeTag: (tag) => isHTMLTag(tag) || isSVGTag(tag),
18220
+ isNativeTag: (tag) => isHTMLTag(tag) || isSVGTag(tag) || isMathMLTag(tag),
17929
18221
  isPreTag: (tag) => tag === "pre",
17930
18222
  decodeEntities: decodeHtmlBrowser ,
17931
18223
  isBuiltInComponent: (tag) => {