@vue/runtime-dom 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 VueRuntimeDOM = (function (exports) {
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) => {
@@ -97,7 +97,7 @@ var VueRuntimeDOM = (function (exports) {
97
97
  return _globalThis || (_globalThis = typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : {});
98
98
  };
99
99
 
100
- 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";
100
+ 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";
101
101
  const isGloballyAllowed = /* @__PURE__ */ makeMap(GLOBALS_ALLOWED);
102
102
 
103
103
  function normalizeStyle(value) {
@@ -130,6 +130,20 @@ var VueRuntimeDOM = (function (exports) {
130
130
  });
131
131
  return ret;
132
132
  }
133
+ function stringifyStyle(styles) {
134
+ let ret = "";
135
+ if (!styles || isString(styles)) {
136
+ return ret;
137
+ }
138
+ for (const key in styles) {
139
+ const value = styles[key];
140
+ const normalizedKey = key.startsWith(`--`) ? key : hyphenate(key);
141
+ if (isString(value) || typeof value === "number") {
142
+ ret += `${normalizedKey}:${value};`;
143
+ }
144
+ }
145
+ return ret;
146
+ }
133
147
  function normalizeClass(value) {
134
148
  let res = "";
135
149
  if (isString(value)) {
@@ -165,14 +179,25 @@ var VueRuntimeDOM = (function (exports) {
165
179
 
166
180
  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";
167
181
  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";
182
+ 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";
168
183
  const isHTMLTag = /* @__PURE__ */ makeMap(HTML_TAGS);
169
184
  const isSVGTag = /* @__PURE__ */ makeMap(SVG_TAGS);
185
+ const isMathMLTag = /* @__PURE__ */ makeMap(MATH_TAGS);
170
186
 
171
187
  const specialBooleanAttrs = `itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly`;
172
188
  const isSpecialBooleanAttr = /* @__PURE__ */ makeMap(specialBooleanAttrs);
189
+ const isBooleanAttr = /* @__PURE__ */ makeMap(
190
+ specialBooleanAttrs + `,async,autofocus,autoplay,controls,default,defer,disabled,hidden,inert,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected`
191
+ );
173
192
  function includeBooleanAttr(value) {
174
193
  return !!value || value === "";
175
194
  }
195
+ const isKnownHtmlAttr = /* @__PURE__ */ makeMap(
196
+ `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`
197
+ );
198
+ const isKnownSvgAttr = /* @__PURE__ */ makeMap(
199
+ `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`
200
+ );
176
201
 
177
202
  function looseCompareArrays(a, b) {
178
203
  if (a.length !== b.length)
@@ -234,20 +259,29 @@ var VueRuntimeDOM = (function (exports) {
234
259
  return replacer(_key, val.value);
235
260
  } else if (isMap(val)) {
236
261
  return {
237
- [`Map(${val.size})`]: [...val.entries()].reduce((entries, [key, val2]) => {
238
- entries[`${key} =>`] = val2;
239
- return entries;
240
- }, {})
262
+ [`Map(${val.size})`]: [...val.entries()].reduce(
263
+ (entries, [key, val2], i) => {
264
+ entries[stringifySymbol(key, i) + " =>"] = val2;
265
+ return entries;
266
+ },
267
+ {}
268
+ )
241
269
  };
242
270
  } else if (isSet(val)) {
243
271
  return {
244
- [`Set(${val.size})`]: [...val.values()]
272
+ [`Set(${val.size})`]: [...val.values()].map((v) => stringifySymbol(v))
245
273
  };
274
+ } else if (isSymbol(val)) {
275
+ return stringifySymbol(val);
246
276
  } else if (isObject(val) && !isArray(val) && !isPlainObject(val)) {
247
277
  return String(val);
248
278
  }
249
279
  return val;
250
280
  };
281
+ const stringifySymbol = (v, i = "") => {
282
+ var _a;
283
+ return isSymbol(v) ? `Symbol(${(_a = v.description) != null ? _a : i})` : v;
284
+ };
251
285
 
252
286
  function warn$1(msg, ...args) {
253
287
  console.warn(`[Vue warn] ${msg}`, ...args);
@@ -696,8 +730,13 @@ var VueRuntimeDOM = (function (exports) {
696
730
  return isReadonly2;
697
731
  } else if (key === "__v_isShallow") {
698
732
  return shallow;
699
- } else if (key === "__v_raw" && receiver === (isReadonly2 ? shallow ? shallowReadonlyMap : readonlyMap : shallow ? shallowReactiveMap : reactiveMap).get(target)) {
700
- return target;
733
+ } else if (key === "__v_raw") {
734
+ if (receiver === (isReadonly2 ? shallow ? shallowReadonlyMap : readonlyMap : shallow ? shallowReactiveMap : reactiveMap).get(target) || // receiver is not the reactive proxy, but has the same prototype
735
+ // this means the reciever is a user proxy of the reactive proxy
736
+ Object.getPrototypeOf(target) === Object.getPrototypeOf(receiver)) {
737
+ return target;
738
+ }
739
+ return;
701
740
  }
702
741
  const targetIsArray = isArray(target);
703
742
  if (!isReadonly2) {
@@ -733,17 +772,19 @@ var VueRuntimeDOM = (function (exports) {
733
772
  }
734
773
  set(target, key, value, receiver) {
735
774
  let oldValue = target[key];
736
- if (isReadonly(oldValue) && isRef(oldValue) && !isRef(value)) {
737
- return false;
738
- }
739
775
  if (!this._shallow) {
776
+ const isOldValueReadonly = isReadonly(oldValue);
740
777
  if (!isShallow(value) && !isReadonly(value)) {
741
778
  oldValue = toRaw(oldValue);
742
779
  value = toRaw(value);
743
780
  }
744
781
  if (!isArray(target) && isRef(oldValue) && !isRef(value)) {
745
- oldValue.value = value;
746
- return true;
782
+ if (isOldValueReadonly) {
783
+ return false;
784
+ } else {
785
+ oldValue.value = value;
786
+ return true;
787
+ }
747
788
  }
748
789
  }
749
790
  const hadKey = isArray(target) && isIntegerKey(key) ? Number(key) < target.length : hasOwn(target, key);
@@ -1436,6 +1477,18 @@ var VueRuntimeDOM = (function (exports) {
1436
1477
  return isRef(val) ? val : new ObjectRefImpl(source, key, defaultValue);
1437
1478
  }
1438
1479
 
1480
+ const TrackOpTypes = {
1481
+ "GET": "get",
1482
+ "HAS": "has",
1483
+ "ITERATE": "iterate"
1484
+ };
1485
+ const TriggerOpTypes = {
1486
+ "SET": "set",
1487
+ "ADD": "add",
1488
+ "DELETE": "delete",
1489
+ "CLEAR": "clear"
1490
+ };
1491
+
1439
1492
  const stack = [];
1440
1493
  function pushWarningContext(vnode) {
1441
1494
  stack.push(vnode);
@@ -1550,6 +1603,38 @@ var VueRuntimeDOM = (function (exports) {
1550
1603
  }
1551
1604
  }
1552
1605
 
1606
+ const ErrorCodes = {
1607
+ "SETUP_FUNCTION": 0,
1608
+ "0": "SETUP_FUNCTION",
1609
+ "RENDER_FUNCTION": 1,
1610
+ "1": "RENDER_FUNCTION",
1611
+ "WATCH_GETTER": 2,
1612
+ "2": "WATCH_GETTER",
1613
+ "WATCH_CALLBACK": 3,
1614
+ "3": "WATCH_CALLBACK",
1615
+ "WATCH_CLEANUP": 4,
1616
+ "4": "WATCH_CLEANUP",
1617
+ "NATIVE_EVENT_HANDLER": 5,
1618
+ "5": "NATIVE_EVENT_HANDLER",
1619
+ "COMPONENT_EVENT_HANDLER": 6,
1620
+ "6": "COMPONENT_EVENT_HANDLER",
1621
+ "VNODE_HOOK": 7,
1622
+ "7": "VNODE_HOOK",
1623
+ "DIRECTIVE_HOOK": 8,
1624
+ "8": "DIRECTIVE_HOOK",
1625
+ "TRANSITION_HOOK": 9,
1626
+ "9": "TRANSITION_HOOK",
1627
+ "APP_ERROR_HANDLER": 10,
1628
+ "10": "APP_ERROR_HANDLER",
1629
+ "APP_WARN_HANDLER": 11,
1630
+ "11": "APP_WARN_HANDLER",
1631
+ "FUNCTION_REF": 12,
1632
+ "12": "FUNCTION_REF",
1633
+ "ASYNC_COMPONENT_LOADER": 13,
1634
+ "13": "ASYNC_COMPONENT_LOADER",
1635
+ "SCHEDULER": 14,
1636
+ "14": "SCHEDULER"
1637
+ };
1553
1638
  const ErrorTypeStrings$1 = {
1554
1639
  ["sp"]: "serverPrefetch hook",
1555
1640
  ["bc"]: "beforeCreate hook",
@@ -1721,13 +1806,16 @@ var VueRuntimeDOM = (function (exports) {
1721
1806
  }
1722
1807
  queueFlush();
1723
1808
  }
1724
- function flushPreFlushCbs(seen, i = isFlushing ? flushIndex + 1 : 0) {
1809
+ function flushPreFlushCbs(instance, seen, i = isFlushing ? flushIndex + 1 : 0) {
1725
1810
  {
1726
1811
  seen = seen || /* @__PURE__ */ new Map();
1727
1812
  }
1728
1813
  for (; i < queue.length; i++) {
1729
1814
  const cb = queue[i];
1730
1815
  if (cb && cb.pre) {
1816
+ if (instance && cb.id !== instance.uid) {
1817
+ continue;
1818
+ }
1731
1819
  if (checkRecursiveUpdates(seen, cb)) {
1732
1820
  continue;
1733
1821
  }
@@ -2487,9 +2575,17 @@ var VueRuntimeDOM = (function (exports) {
2487
2575
  return false;
2488
2576
  }
2489
2577
  function updateHOCHostEl({ vnode, parent }, el) {
2490
- while (parent && parent.subTree === vnode) {
2491
- (vnode = parent.vnode).el = el;
2492
- parent = parent.parent;
2578
+ while (parent) {
2579
+ const root = parent.subTree;
2580
+ if (root.suspense && root.suspense.activeBranch === vnode) {
2581
+ root.el = vnode.el;
2582
+ }
2583
+ if (root === vnode) {
2584
+ (vnode = parent.vnode).el = el;
2585
+ parent = parent.parent;
2586
+ } else {
2587
+ break;
2588
+ }
2493
2589
  }
2494
2590
  }
2495
2591
 
@@ -2549,6 +2645,7 @@ If this is a native custom element, make sure to exclude it from component resol
2549
2645
  }
2550
2646
 
2551
2647
  const isSuspense = (type) => type.__isSuspense;
2648
+ let suspenseId = 0;
2552
2649
  const SuspenseImpl = {
2553
2650
  name: "Suspense",
2554
2651
  // In order to make Suspense tree-shakable, we need to avoid importing it
@@ -2556,7 +2653,7 @@ If this is a native custom element, make sure to exclude it from component resol
2556
2653
  // on a vnode's type and calls the `process` method, passing in renderer
2557
2654
  // internals.
2558
2655
  __isSuspense: true,
2559
- process(n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized, rendererInternals) {
2656
+ process(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, rendererInternals) {
2560
2657
  if (n1 == null) {
2561
2658
  mountSuspense(
2562
2659
  n2,
@@ -2564,7 +2661,7 @@ If this is a native custom element, make sure to exclude it from component resol
2564
2661
  anchor,
2565
2662
  parentComponent,
2566
2663
  parentSuspense,
2567
- isSVG,
2664
+ namespace,
2568
2665
  slotScopeIds,
2569
2666
  optimized,
2570
2667
  rendererInternals
@@ -2576,7 +2673,7 @@ If this is a native custom element, make sure to exclude it from component resol
2576
2673
  container,
2577
2674
  anchor,
2578
2675
  parentComponent,
2579
- isSVG,
2676
+ namespace,
2580
2677
  slotScopeIds,
2581
2678
  optimized,
2582
2679
  rendererInternals
@@ -2594,7 +2691,7 @@ If this is a native custom element, make sure to exclude it from component resol
2594
2691
  eventListener();
2595
2692
  }
2596
2693
  }
2597
- function mountSuspense(vnode, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized, rendererInternals) {
2694
+ function mountSuspense(vnode, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, rendererInternals) {
2598
2695
  const {
2599
2696
  p: patch,
2600
2697
  o: { createElement }
@@ -2607,7 +2704,7 @@ If this is a native custom element, make sure to exclude it from component resol
2607
2704
  container,
2608
2705
  hiddenContainer,
2609
2706
  anchor,
2610
- isSVG,
2707
+ namespace,
2611
2708
  slotScopeIds,
2612
2709
  optimized,
2613
2710
  rendererInternals
@@ -2619,7 +2716,7 @@ If this is a native custom element, make sure to exclude it from component resol
2619
2716
  null,
2620
2717
  parentComponent,
2621
2718
  suspense,
2622
- isSVG,
2719
+ namespace,
2623
2720
  slotScopeIds
2624
2721
  );
2625
2722
  if (suspense.deps > 0) {
@@ -2633,7 +2730,7 @@ If this is a native custom element, make sure to exclude it from component resol
2633
2730
  parentComponent,
2634
2731
  null,
2635
2732
  // fallback tree will not have suspense context
2636
- isSVG,
2733
+ namespace,
2637
2734
  slotScopeIds
2638
2735
  );
2639
2736
  setActiveBranch(suspense, vnode.ssFallback);
@@ -2641,7 +2738,7 @@ If this is a native custom element, make sure to exclude it from component resol
2641
2738
  suspense.resolve(false, true);
2642
2739
  }
2643
2740
  }
2644
- function patchSuspense(n1, n2, container, anchor, parentComponent, isSVG, slotScopeIds, optimized, { p: patch, um: unmount, o: { createElement } }) {
2741
+ function patchSuspense(n1, n2, container, anchor, parentComponent, namespace, slotScopeIds, optimized, { p: patch, um: unmount, o: { createElement } }) {
2645
2742
  const suspense = n2.suspense = n1.suspense;
2646
2743
  suspense.vnode = n2;
2647
2744
  n2.el = n1.el;
@@ -2658,29 +2755,31 @@ If this is a native custom element, make sure to exclude it from component resol
2658
2755
  null,
2659
2756
  parentComponent,
2660
2757
  suspense,
2661
- isSVG,
2758
+ namespace,
2662
2759
  slotScopeIds,
2663
2760
  optimized
2664
2761
  );
2665
2762
  if (suspense.deps <= 0) {
2666
2763
  suspense.resolve();
2667
2764
  } else if (isInFallback) {
2668
- patch(
2669
- activeBranch,
2670
- newFallback,
2671
- container,
2672
- anchor,
2673
- parentComponent,
2674
- null,
2675
- // fallback tree will not have suspense context
2676
- isSVG,
2677
- slotScopeIds,
2678
- optimized
2679
- );
2680
- setActiveBranch(suspense, newFallback);
2765
+ if (!isHydrating) {
2766
+ patch(
2767
+ activeBranch,
2768
+ newFallback,
2769
+ container,
2770
+ anchor,
2771
+ parentComponent,
2772
+ null,
2773
+ // fallback tree will not have suspense context
2774
+ namespace,
2775
+ slotScopeIds,
2776
+ optimized
2777
+ );
2778
+ setActiveBranch(suspense, newFallback);
2779
+ }
2681
2780
  }
2682
2781
  } else {
2683
- suspense.pendingId++;
2782
+ suspense.pendingId = suspenseId++;
2684
2783
  if (isHydrating) {
2685
2784
  suspense.isHydrating = false;
2686
2785
  suspense.activeBranch = pendingBranch;
@@ -2698,7 +2797,7 @@ If this is a native custom element, make sure to exclude it from component resol
2698
2797
  null,
2699
2798
  parentComponent,
2700
2799
  suspense,
2701
- isSVG,
2800
+ namespace,
2702
2801
  slotScopeIds,
2703
2802
  optimized
2704
2803
  );
@@ -2713,7 +2812,7 @@ If this is a native custom element, make sure to exclude it from component resol
2713
2812
  parentComponent,
2714
2813
  null,
2715
2814
  // fallback tree will not have suspense context
2716
- isSVG,
2815
+ namespace,
2717
2816
  slotScopeIds,
2718
2817
  optimized
2719
2818
  );
@@ -2727,7 +2826,7 @@ If this is a native custom element, make sure to exclude it from component resol
2727
2826
  anchor,
2728
2827
  parentComponent,
2729
2828
  suspense,
2730
- isSVG,
2829
+ namespace,
2731
2830
  slotScopeIds,
2732
2831
  optimized
2733
2832
  );
@@ -2740,7 +2839,7 @@ If this is a native custom element, make sure to exclude it from component resol
2740
2839
  null,
2741
2840
  parentComponent,
2742
2841
  suspense,
2743
- isSVG,
2842
+ namespace,
2744
2843
  slotScopeIds,
2745
2844
  optimized
2746
2845
  );
@@ -2758,7 +2857,7 @@ If this is a native custom element, make sure to exclude it from component resol
2758
2857
  anchor,
2759
2858
  parentComponent,
2760
2859
  suspense,
2761
- isSVG,
2860
+ namespace,
2762
2861
  slotScopeIds,
2763
2862
  optimized
2764
2863
  );
@@ -2766,7 +2865,11 @@ If this is a native custom element, make sure to exclude it from component resol
2766
2865
  } else {
2767
2866
  triggerEvent(n2, "onPending");
2768
2867
  suspense.pendingBranch = newBranch;
2769
- suspense.pendingId++;
2868
+ if (newBranch.shapeFlag & 512) {
2869
+ suspense.pendingId = newBranch.component.suspenseId;
2870
+ } else {
2871
+ suspense.pendingId = suspenseId++;
2872
+ }
2770
2873
  patch(
2771
2874
  null,
2772
2875
  newBranch,
@@ -2774,7 +2877,7 @@ If this is a native custom element, make sure to exclude it from component resol
2774
2877
  null,
2775
2878
  parentComponent,
2776
2879
  suspense,
2777
- isSVG,
2880
+ namespace,
2778
2881
  slotScopeIds,
2779
2882
  optimized
2780
2883
  );
@@ -2796,7 +2899,7 @@ If this is a native custom element, make sure to exclude it from component resol
2796
2899
  }
2797
2900
  }
2798
2901
  let hasWarned = false;
2799
- function createSuspenseBoundary(vnode, parentSuspense, parentComponent, container, hiddenContainer, anchor, isSVG, slotScopeIds, optimized, rendererInternals, isHydrating = false) {
2902
+ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, container, hiddenContainer, anchor, namespace, slotScopeIds, optimized, rendererInternals, isHydrating = false) {
2800
2903
  if (!hasWarned) {
2801
2904
  hasWarned = true;
2802
2905
  console[console.info ? "info" : "log"](
@@ -2826,7 +2929,7 @@ If this is a native custom element, make sure to exclude it from component resol
2826
2929
  vnode,
2827
2930
  parent: parentSuspense,
2828
2931
  parentComponent,
2829
- isSVG,
2932
+ namespace,
2830
2933
  container,
2831
2934
  hiddenContainer,
2832
2935
  anchor,
@@ -2835,7 +2938,7 @@ If this is a native custom element, make sure to exclude it from component resol
2835
2938
  timeout: typeof timeout === "number" ? timeout : -1,
2836
2939
  activeBranch: null,
2837
2940
  pendingBranch: null,
2838
- isInFallback: true,
2941
+ isInFallback: !isHydrating,
2839
2942
  isHydrating,
2840
2943
  isUnmounted: false,
2841
2944
  effects: [],
@@ -2869,7 +2972,12 @@ If this is a native custom element, make sure to exclude it from component resol
2869
2972
  if (delayEnter) {
2870
2973
  activeBranch.transition.afterLeave = () => {
2871
2974
  if (pendingId === suspense.pendingId) {
2872
- move(pendingBranch, container2, anchor2, 0);
2975
+ move(
2976
+ pendingBranch,
2977
+ container2,
2978
+ next(activeBranch),
2979
+ 0
2980
+ );
2873
2981
  queuePostFlushCb(effects);
2874
2982
  }
2875
2983
  };
@@ -2914,7 +3022,7 @@ If this is a native custom element, make sure to exclude it from component resol
2914
3022
  if (!suspense.pendingBranch) {
2915
3023
  return;
2916
3024
  }
2917
- const { vnode: vnode2, activeBranch, parentComponent: parentComponent2, container: container2, isSVG: isSVG2 } = suspense;
3025
+ const { vnode: vnode2, activeBranch, parentComponent: parentComponent2, container: container2, namespace: namespace2 } = suspense;
2918
3026
  triggerEvent(vnode2, "onFallback");
2919
3027
  const anchor2 = next(activeBranch);
2920
3028
  const mountFallback = () => {
@@ -2929,7 +3037,7 @@ If this is a native custom element, make sure to exclude it from component resol
2929
3037
  parentComponent2,
2930
3038
  null,
2931
3039
  // fallback tree will not have suspense context
2932
- isSVG2,
3040
+ namespace2,
2933
3041
  slotScopeIds,
2934
3042
  optimized
2935
3043
  );
@@ -2992,7 +3100,7 @@ If this is a native custom element, make sure to exclude it from component resol
2992
3100
  // consider the comment placeholder case.
2993
3101
  hydratedEl ? null : next(instance.subTree),
2994
3102
  suspense,
2995
- isSVG,
3103
+ namespace,
2996
3104
  optimized
2997
3105
  );
2998
3106
  if (placeholder) {
@@ -3029,7 +3137,7 @@ If this is a native custom element, make sure to exclude it from component resol
3029
3137
  };
3030
3138
  return suspense;
3031
3139
  }
3032
- function hydrateSuspense(node, vnode, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized, rendererInternals, hydrateNode) {
3140
+ function hydrateSuspense(node, vnode, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, rendererInternals, hydrateNode) {
3033
3141
  const suspense = vnode.suspense = createSuspenseBoundary(
3034
3142
  vnode,
3035
3143
  parentSuspense,
@@ -3037,7 +3145,7 @@ If this is a native custom element, make sure to exclude it from component resol
3037
3145
  node.parentNode,
3038
3146
  document.createElement("div"),
3039
3147
  null,
3040
- isSVG,
3148
+ namespace,
3041
3149
  slotScopeIds,
3042
3150
  optimized,
3043
3151
  rendererInternals,
@@ -3925,7 +4033,7 @@ If this is a native custom element, make sure to exclude it from component resol
3925
4033
  }
3926
4034
  } = sharedContext;
3927
4035
  const storageContainer = createElement("div");
3928
- sharedContext.activate = (vnode, container, anchor, isSVG, optimized) => {
4036
+ sharedContext.activate = (vnode, container, anchor, namespace, optimized) => {
3929
4037
  const instance2 = vnode.component;
3930
4038
  move(vnode, container, anchor, 0, parentSuspense);
3931
4039
  patch(
@@ -3935,7 +4043,7 @@ If this is a native custom element, make sure to exclude it from component resol
3935
4043
  anchor,
3936
4044
  instance2,
3937
4045
  parentSuspense,
3938
- isSVG,
4046
+ namespace,
3939
4047
  vnode.slotScopeIds,
3940
4048
  optimized
3941
4049
  );
@@ -4601,7 +4709,7 @@ If this is a native custom element, make sure to exclude it from component resol
4601
4709
  function useAttrs() {
4602
4710
  return getContext().attrs;
4603
4711
  }
4604
- function useModel(props, name, options) {
4712
+ function useModel(props, name) {
4605
4713
  const i = getCurrentInstance();
4606
4714
  if (!i) {
4607
4715
  warn(`useModel() called without active instance.`);
@@ -4611,29 +4719,24 @@ If this is a native custom element, make sure to exclude it from component resol
4611
4719
  warn(`useModel() called with prop "${name}" which is not declared.`);
4612
4720
  return ref();
4613
4721
  }
4614
- if (options && options.local) {
4615
- const proxy = ref(props[name]);
4616
- watch(
4617
- () => props[name],
4618
- (v) => proxy.value = v
4619
- );
4620
- watch(proxy, (value) => {
4621
- if (value !== props[name]) {
4622
- i.emit(`update:${name}`, value);
4623
- }
4624
- });
4625
- return proxy;
4626
- } else {
4627
- return {
4628
- __v_isRef: true,
4629
- get value() {
4630
- return props[name];
4631
- },
4632
- set value(value) {
4633
- i.emit(`update:${name}`, value);
4722
+ let localValue;
4723
+ watchSyncEffect(() => {
4724
+ localValue = props[name];
4725
+ });
4726
+ return customRef((track, trigger) => ({
4727
+ get() {
4728
+ track();
4729
+ return localValue;
4730
+ },
4731
+ set(value) {
4732
+ const rawProps = i.vnode.props;
4733
+ if (!(rawProps && name in rawProps) && hasChanged(value, localValue)) {
4734
+ localValue = value;
4735
+ trigger();
4634
4736
  }
4635
- };
4636
- }
4737
+ i.emit(`update:${name}`, value);
4738
+ }
4739
+ }));
4637
4740
  }
4638
4741
  function getContext() {
4639
4742
  const i = getCurrentInstance();
@@ -5153,18 +5256,6 @@ If this is a native custom element, make sure to exclude it from component resol
5153
5256
  rootProps = null;
5154
5257
  }
5155
5258
  const context = createAppContext();
5156
- {
5157
- Object.defineProperty(context.config, "unwrapInjectedRef", {
5158
- get() {
5159
- return true;
5160
- },
5161
- set() {
5162
- warn(
5163
- `app.config.unwrapInjectedRef has been deprecated. 3.3 now always unwraps injected refs in Options API.`
5164
- );
5165
- }
5166
- });
5167
- }
5168
5259
  const installedPlugins = /* @__PURE__ */ new WeakSet();
5169
5260
  let isMounted = false;
5170
5261
  const app = context.app = {
@@ -5239,7 +5330,7 @@ If this is a native custom element, make sure to exclude it from component resol
5239
5330
  context.directives[name] = directive;
5240
5331
  return app;
5241
5332
  },
5242
- mount(rootContainer, isHydrate, isSVG) {
5333
+ mount(rootContainer, isHydrate, namespace) {
5243
5334
  if (!isMounted) {
5244
5335
  if (rootContainer.__vue_app__) {
5245
5336
  warn(
@@ -5249,15 +5340,24 @@ If this is a native custom element, make sure to exclude it from component resol
5249
5340
  }
5250
5341
  const vnode = createVNode(rootComponent, rootProps);
5251
5342
  vnode.appContext = context;
5343
+ if (namespace === true) {
5344
+ namespace = "svg";
5345
+ } else if (namespace === false) {
5346
+ namespace = void 0;
5347
+ }
5252
5348
  {
5253
5349
  context.reload = () => {
5254
- render(cloneVNode(vnode), rootContainer, isSVG);
5350
+ render(
5351
+ cloneVNode(vnode),
5352
+ rootContainer,
5353
+ namespace
5354
+ );
5255
5355
  };
5256
5356
  }
5257
5357
  if (isHydrate && hydrate) {
5258
5358
  hydrate(vnode, rootContainer);
5259
5359
  } else {
5260
- render(vnode, rootContainer, isSVG);
5360
+ render(vnode, rootContainer, namespace);
5261
5361
  }
5262
5362
  isMounted = true;
5263
5363
  app._container = rootContainer;
@@ -5647,11 +5747,12 @@ If you want to remount the same app, move your app creation logic into a factory
5647
5747
  key,
5648
5748
  resolvedValues[key],
5649
5749
  opt,
5750
+ shallowReadonly(resolvedValues) ,
5650
5751
  !hasOwn(rawProps, key) && !hasOwn(rawProps, hyphenate(key))
5651
5752
  );
5652
5753
  }
5653
5754
  }
5654
- function validateProp(name, value, prop, isAbsent) {
5755
+ function validateProp(name, value, prop, props, isAbsent) {
5655
5756
  const { type, required, validator, skipCheck } = prop;
5656
5757
  if (required && isAbsent) {
5657
5758
  warn('Missing required prop: "' + name + '"');
@@ -5674,7 +5775,7 @@ If you want to remount the same app, move your app creation logic into a factory
5674
5775
  return;
5675
5776
  }
5676
5777
  }
5677
- if (validator && !validator(value)) {
5778
+ if (validator && !validator(value, props)) {
5678
5779
  warn('Invalid prop: custom validator check failed for prop "' + name + '".');
5679
5780
  }
5680
5781
  }
@@ -5930,7 +6031,15 @@ If you want to remount the same app, move your app creation logic into a factory
5930
6031
  }
5931
6032
 
5932
6033
  let hasMismatch = false;
5933
- const isSVGContainer = (container) => /svg/.test(container.namespaceURI) && container.tagName !== "foreignObject";
6034
+ const isSVGContainer = (container) => container.namespaceURI.includes("svg") && container.tagName !== "foreignObject";
6035
+ const isMathMLContainer = (container) => container.namespaceURI.includes("MathML");
6036
+ const getContainerType = (container) => {
6037
+ if (isSVGContainer(container))
6038
+ return "svg";
6039
+ if (isMathMLContainer(container))
6040
+ return "mathml";
6041
+ return void 0;
6042
+ };
5934
6043
  const isComment = (node) => node.nodeType === 8 /* COMMENT */;
5935
6044
  function createHydrationFunctions(rendererInternals) {
5936
6045
  const {
@@ -6009,11 +6118,13 @@ If you want to remount the same app, move your app creation logic into a factory
6009
6118
  if (node.data !== vnode.children) {
6010
6119
  hasMismatch = true;
6011
6120
  warn(
6012
- `Hydration text mismatch:
6013
- - Server rendered: ${JSON.stringify(
6121
+ `Hydration text mismatch in`,
6122
+ node.parentNode,
6123
+ `
6124
+ - rendered on server: ${JSON.stringify(
6014
6125
  node.data
6015
6126
  )}
6016
- - Client rendered: ${JSON.stringify(vnode.children)}`
6127
+ - expected on client: ${JSON.stringify(vnode.children)}`
6017
6128
  );
6018
6129
  node.data = vnode.children;
6019
6130
  }
@@ -6099,7 +6210,7 @@ If you want to remount the same app, move your app creation logic into a factory
6099
6210
  null,
6100
6211
  parentComponent,
6101
6212
  parentSuspense,
6102
- isSVGContainer(container),
6213
+ getContainerType(container),
6103
6214
  optimized
6104
6215
  );
6105
6216
  if (isAsyncWrapper(vnode)) {
@@ -6134,7 +6245,7 @@ If you want to remount the same app, move your app creation logic into a factory
6134
6245
  vnode,
6135
6246
  parentComponent,
6136
6247
  parentSuspense,
6137
- isSVGContainer(parentNode(node)),
6248
+ getContainerType(parentNode(node)),
6138
6249
  slotScopeIds,
6139
6250
  optimized,
6140
6251
  rendererInternals,
@@ -6157,38 +6268,6 @@ If you want to remount the same app, move your app creation logic into a factory
6157
6268
  if (dirs) {
6158
6269
  invokeDirectiveHook(vnode, null, parentComponent, "created");
6159
6270
  }
6160
- if (props) {
6161
- if (forcePatch || !optimized || patchFlag & (16 | 32)) {
6162
- for (const key in props) {
6163
- if (forcePatch && (key.endsWith("value") || key === "indeterminate") || isOn(key) && !isReservedProp(key) || // force hydrate v-bind with .prop modifiers
6164
- key[0] === ".") {
6165
- patchProp(
6166
- el,
6167
- key,
6168
- null,
6169
- props[key],
6170
- false,
6171
- void 0,
6172
- parentComponent
6173
- );
6174
- }
6175
- }
6176
- } else if (props.onClick) {
6177
- patchProp(
6178
- el,
6179
- "onClick",
6180
- null,
6181
- props.onClick,
6182
- false,
6183
- void 0,
6184
- parentComponent
6185
- );
6186
- }
6187
- }
6188
- let vnodeHooks;
6189
- if (vnodeHooks = props && props.onVnodeBeforeMount) {
6190
- invokeVNodeHook(vnodeHooks, parentComponent, vnode);
6191
- }
6192
6271
  let needCallTransitionHooks = false;
6193
6272
  if (isTemplateNode(el)) {
6194
6273
  needCallTransitionHooks = needTransition(parentSuspense, transition) && parentComponent && parentComponent.vnode.props && parentComponent.vnode.props.appear;
@@ -6199,16 +6278,6 @@ If you want to remount the same app, move your app creation logic into a factory
6199
6278
  replaceNode(content, el, parentComponent);
6200
6279
  vnode.el = el = content;
6201
6280
  }
6202
- if (dirs) {
6203
- invokeDirectiveHook(vnode, null, parentComponent, "beforeMount");
6204
- }
6205
- if ((vnodeHooks = props && props.onVnodeMounted) || dirs || needCallTransitionHooks) {
6206
- queueEffectWithSuspense(() => {
6207
- vnodeHooks && invokeVNodeHook(vnodeHooks, parentComponent, vnode);
6208
- needCallTransitionHooks && transition.enter(el);
6209
- dirs && invokeDirectiveHook(vnode, null, parentComponent, "mounted");
6210
- }, parentSuspense);
6211
- }
6212
6281
  if (shapeFlag & 16 && // skip if element has innerHTML / textContent
6213
6282
  !(props && (props.innerHTML || props.textContent))) {
6214
6283
  let next = hydrateChildren(
@@ -6225,7 +6294,10 @@ If you want to remount the same app, move your app creation logic into a factory
6225
6294
  hasMismatch = true;
6226
6295
  if (!hasWarned) {
6227
6296
  warn(
6228
- `Hydration children mismatch in <${vnode.type}>: server rendered element contains more child nodes than client vdom.`
6297
+ `Hydration children mismatch on`,
6298
+ el,
6299
+ `
6300
+ Server rendered element contains more child nodes than client vdom.`
6229
6301
  );
6230
6302
  hasWarned = true;
6231
6303
  }
@@ -6237,13 +6309,50 @@ If you want to remount the same app, move your app creation logic into a factory
6237
6309
  if (el.textContent !== vnode.children) {
6238
6310
  hasMismatch = true;
6239
6311
  warn(
6240
- `Hydration text content mismatch in <${vnode.type}>:
6241
- - Server rendered: ${el.textContent}
6242
- - Client rendered: ${vnode.children}`
6312
+ `Hydration text content mismatch on`,
6313
+ el,
6314
+ `
6315
+ - rendered on server: ${el.textContent}
6316
+ - expected on client: ${vnode.children}`
6243
6317
  );
6244
6318
  el.textContent = vnode.children;
6245
6319
  }
6246
6320
  }
6321
+ if (props) {
6322
+ {
6323
+ for (const key in props) {
6324
+ if (propHasMismatch(el, key, props[key])) {
6325
+ hasMismatch = true;
6326
+ }
6327
+ if (forcePatch && (key.endsWith("value") || key === "indeterminate") || isOn(key) && !isReservedProp(key) || // force hydrate v-bind with .prop modifiers
6328
+ key[0] === ".") {
6329
+ patchProp(
6330
+ el,
6331
+ key,
6332
+ null,
6333
+ props[key],
6334
+ void 0,
6335
+ void 0,
6336
+ parentComponent
6337
+ );
6338
+ }
6339
+ }
6340
+ }
6341
+ }
6342
+ let vnodeHooks;
6343
+ if (vnodeHooks = props && props.onVnodeBeforeMount) {
6344
+ invokeVNodeHook(vnodeHooks, parentComponent, vnode);
6345
+ }
6346
+ if (dirs) {
6347
+ invokeDirectiveHook(vnode, null, parentComponent, "beforeMount");
6348
+ }
6349
+ if ((vnodeHooks = props && props.onVnodeMounted) || dirs || needCallTransitionHooks) {
6350
+ queueEffectWithSuspense(() => {
6351
+ vnodeHooks && invokeVNodeHook(vnodeHooks, parentComponent, vnode);
6352
+ needCallTransitionHooks && transition.enter(el);
6353
+ dirs && invokeDirectiveHook(vnode, null, parentComponent, "mounted");
6354
+ }, parentSuspense);
6355
+ }
6247
6356
  }
6248
6357
  return el.nextSibling;
6249
6358
  };
@@ -6269,7 +6378,10 @@ If you want to remount the same app, move your app creation logic into a factory
6269
6378
  hasMismatch = true;
6270
6379
  if (!hasWarned) {
6271
6380
  warn(
6272
- `Hydration children mismatch in <${container.tagName.toLowerCase()}>: server rendered element contains fewer child nodes than client vdom.`
6381
+ `Hydration children mismatch on`,
6382
+ container,
6383
+ `
6384
+ Server rendered element contains fewer child nodes than client vdom.`
6273
6385
  );
6274
6386
  hasWarned = true;
6275
6387
  }
@@ -6280,7 +6392,7 @@ If you want to remount the same app, move your app creation logic into a factory
6280
6392
  null,
6281
6393
  parentComponent,
6282
6394
  parentSuspense,
6283
- isSVGContainer(container),
6395
+ getContainerType(container),
6284
6396
  slotScopeIds
6285
6397
  );
6286
6398
  }
@@ -6314,12 +6426,12 @@ If you want to remount the same app, move your app creation logic into a factory
6314
6426
  hasMismatch = true;
6315
6427
  warn(
6316
6428
  `Hydration node mismatch:
6317
- - Client vnode:`,
6318
- vnode.type,
6319
- `
6320
- - Server rendered DOM:`,
6429
+ - rendered on server:`,
6321
6430
  node,
6322
- node.nodeType === 3 /* TEXT */ ? `(text)` : isComment(node) && node.data === "[" ? `(start of fragment)` : ``
6431
+ node.nodeType === 3 /* TEXT */ ? `(text)` : isComment(node) && node.data === "[" ? `(start of fragment)` : ``,
6432
+ `
6433
+ - expected on client:`,
6434
+ vnode.type
6323
6435
  );
6324
6436
  vnode.el = null;
6325
6437
  if (isFragment) {
@@ -6343,7 +6455,7 @@ If you want to remount the same app, move your app creation logic into a factory
6343
6455
  next,
6344
6456
  parentComponent,
6345
6457
  parentSuspense,
6346
- isSVGContainer(container),
6458
+ getContainerType(container),
6347
6459
  slotScopeIds
6348
6460
  );
6349
6461
  return next;
@@ -6384,6 +6496,46 @@ If you want to remount the same app, move your app creation logic into a factory
6384
6496
  };
6385
6497
  return [hydrate, hydrateNode];
6386
6498
  }
6499
+ function propHasMismatch(el, key, clientValue) {
6500
+ let mismatchType;
6501
+ let mismatchKey;
6502
+ let actual;
6503
+ let expected;
6504
+ if (key === "class") {
6505
+ actual = el.className;
6506
+ expected = normalizeClass(clientValue);
6507
+ if (actual !== expected) {
6508
+ mismatchType = mismatchKey = `class`;
6509
+ }
6510
+ } else if (key === "style") {
6511
+ actual = el.getAttribute("style");
6512
+ expected = isString(clientValue) ? clientValue : stringifyStyle(normalizeStyle(clientValue));
6513
+ if (actual !== expected) {
6514
+ mismatchType = mismatchKey = "style";
6515
+ }
6516
+ } else if (el instanceof SVGElement && isKnownSvgAttr(key) || el instanceof HTMLElement && (isBooleanAttr(key) || isKnownHtmlAttr(key))) {
6517
+ actual = el.hasAttribute(key) && el.getAttribute(key);
6518
+ expected = isBooleanAttr(key) ? includeBooleanAttr(clientValue) ? "" : false : clientValue == null ? false : String(clientValue);
6519
+ if (actual !== expected) {
6520
+ mismatchType = `attribute`;
6521
+ mismatchKey = key;
6522
+ }
6523
+ }
6524
+ if (mismatchType) {
6525
+ const format = (v) => v === false ? `(not rendered)` : `${mismatchKey}="${v}"`;
6526
+ warn(
6527
+ `Hydration ${mismatchType} mismatch on`,
6528
+ el,
6529
+ `
6530
+ - rendered on server: ${format(actual)}
6531
+ - expected on client: ${format(expected)}
6532
+ Note: this mismatch is check-only. The DOM will not be rectified in production due to performance overhead.
6533
+ You should fix the source of the mismatch.`
6534
+ );
6535
+ return true;
6536
+ }
6537
+ return false;
6538
+ }
6387
6539
 
6388
6540
  let supported;
6389
6541
  let perf;
@@ -6452,7 +6604,7 @@ If you want to remount the same app, move your app creation logic into a factory
6452
6604
  setScopeId: hostSetScopeId = NOOP,
6453
6605
  insertStaticContent: hostInsertStaticContent
6454
6606
  } = options;
6455
- const patch = (n1, n2, container, anchor = null, parentComponent = null, parentSuspense = null, isSVG = false, slotScopeIds = null, optimized = isHmrUpdating ? false : !!n2.dynamicChildren) => {
6607
+ const patch = (n1, n2, container, anchor = null, parentComponent = null, parentSuspense = null, namespace = void 0, slotScopeIds = null, optimized = isHmrUpdating ? false : !!n2.dynamicChildren) => {
6456
6608
  if (n1 === n2) {
6457
6609
  return;
6458
6610
  }
@@ -6475,9 +6627,9 @@ If you want to remount the same app, move your app creation logic into a factory
6475
6627
  break;
6476
6628
  case Static:
6477
6629
  if (n1 == null) {
6478
- mountStaticNode(n2, container, anchor, isSVG);
6630
+ mountStaticNode(n2, container, anchor, namespace);
6479
6631
  } else {
6480
- patchStaticNode(n1, n2, container, isSVG);
6632
+ patchStaticNode(n1, n2, container, namespace);
6481
6633
  }
6482
6634
  break;
6483
6635
  case Fragment:
@@ -6488,7 +6640,7 @@ If you want to remount the same app, move your app creation logic into a factory
6488
6640
  anchor,
6489
6641
  parentComponent,
6490
6642
  parentSuspense,
6491
- isSVG,
6643
+ namespace,
6492
6644
  slotScopeIds,
6493
6645
  optimized
6494
6646
  );
@@ -6502,7 +6654,7 @@ If you want to remount the same app, move your app creation logic into a factory
6502
6654
  anchor,
6503
6655
  parentComponent,
6504
6656
  parentSuspense,
6505
- isSVG,
6657
+ namespace,
6506
6658
  slotScopeIds,
6507
6659
  optimized
6508
6660
  );
@@ -6514,7 +6666,7 @@ If you want to remount the same app, move your app creation logic into a factory
6514
6666
  anchor,
6515
6667
  parentComponent,
6516
6668
  parentSuspense,
6517
- isSVG,
6669
+ namespace,
6518
6670
  slotScopeIds,
6519
6671
  optimized
6520
6672
  );
@@ -6526,7 +6678,7 @@ If you want to remount the same app, move your app creation logic into a factory
6526
6678
  anchor,
6527
6679
  parentComponent,
6528
6680
  parentSuspense,
6529
- isSVG,
6681
+ namespace,
6530
6682
  slotScopeIds,
6531
6683
  optimized,
6532
6684
  internals
@@ -6539,7 +6691,7 @@ If you want to remount the same app, move your app creation logic into a factory
6539
6691
  anchor,
6540
6692
  parentComponent,
6541
6693
  parentSuspense,
6542
- isSVG,
6694
+ namespace,
6543
6695
  slotScopeIds,
6544
6696
  optimized,
6545
6697
  internals
@@ -6577,17 +6729,17 @@ If you want to remount the same app, move your app creation logic into a factory
6577
6729
  n2.el = n1.el;
6578
6730
  }
6579
6731
  };
6580
- const mountStaticNode = (n2, container, anchor, isSVG) => {
6732
+ const mountStaticNode = (n2, container, anchor, namespace) => {
6581
6733
  [n2.el, n2.anchor] = hostInsertStaticContent(
6582
6734
  n2.children,
6583
6735
  container,
6584
6736
  anchor,
6585
- isSVG,
6737
+ namespace,
6586
6738
  n2.el,
6587
6739
  n2.anchor
6588
6740
  );
6589
6741
  };
6590
- const patchStaticNode = (n1, n2, container, isSVG) => {
6742
+ const patchStaticNode = (n1, n2, container, namespace) => {
6591
6743
  if (n2.children !== n1.children) {
6592
6744
  const anchor = hostNextSibling(n1.anchor);
6593
6745
  removeStaticNode(n1);
@@ -6595,7 +6747,7 @@ If you want to remount the same app, move your app creation logic into a factory
6595
6747
  n2.children,
6596
6748
  container,
6597
6749
  anchor,
6598
- isSVG
6750
+ namespace
6599
6751
  );
6600
6752
  } else {
6601
6753
  n2.el = n1.el;
@@ -6620,8 +6772,12 @@ If you want to remount the same app, move your app creation logic into a factory
6620
6772
  }
6621
6773
  hostRemove(anchor);
6622
6774
  };
6623
- const processElement = (n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized) => {
6624
- isSVG = isSVG || n2.type === "svg";
6775
+ const processElement = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => {
6776
+ if (n2.type === "svg") {
6777
+ namespace = "svg";
6778
+ } else if (n2.type === "math") {
6779
+ namespace = "mathml";
6780
+ }
6625
6781
  if (n1 == null) {
6626
6782
  mountElement(
6627
6783
  n2,
@@ -6629,7 +6785,7 @@ If you want to remount the same app, move your app creation logic into a factory
6629
6785
  anchor,
6630
6786
  parentComponent,
6631
6787
  parentSuspense,
6632
- isSVG,
6788
+ namespace,
6633
6789
  slotScopeIds,
6634
6790
  optimized
6635
6791
  );
@@ -6639,19 +6795,19 @@ If you want to remount the same app, move your app creation logic into a factory
6639
6795
  n2,
6640
6796
  parentComponent,
6641
6797
  parentSuspense,
6642
- isSVG,
6798
+ namespace,
6643
6799
  slotScopeIds,
6644
6800
  optimized
6645
6801
  );
6646
6802
  }
6647
6803
  };
6648
- const mountElement = (vnode, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized) => {
6804
+ const mountElement = (vnode, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => {
6649
6805
  let el;
6650
6806
  let vnodeHook;
6651
- const { type, props, shapeFlag, transition, dirs } = vnode;
6807
+ const { props, shapeFlag, transition, dirs } = vnode;
6652
6808
  el = vnode.el = hostCreateElement(
6653
6809
  vnode.type,
6654
- isSVG,
6810
+ namespace,
6655
6811
  props && props.is,
6656
6812
  props
6657
6813
  );
@@ -6664,7 +6820,7 @@ If you want to remount the same app, move your app creation logic into a factory
6664
6820
  null,
6665
6821
  parentComponent,
6666
6822
  parentSuspense,
6667
- isSVG && type !== "foreignObject",
6823
+ resolveChildrenNamespace(vnode, namespace),
6668
6824
  slotScopeIds,
6669
6825
  optimized
6670
6826
  );
@@ -6681,7 +6837,7 @@ If you want to remount the same app, move your app creation logic into a factory
6681
6837
  key,
6682
6838
  null,
6683
6839
  props[key],
6684
- isSVG,
6840
+ namespace,
6685
6841
  vnode.children,
6686
6842
  parentComponent,
6687
6843
  parentSuspense,
@@ -6690,7 +6846,7 @@ If you want to remount the same app, move your app creation logic into a factory
6690
6846
  }
6691
6847
  }
6692
6848
  if ("value" in props) {
6693
- hostPatchProp(el, "value", null, props.value);
6849
+ hostPatchProp(el, "value", null, props.value, namespace);
6694
6850
  }
6695
6851
  if (vnodeHook = props.onVnodeBeforeMount) {
6696
6852
  invokeVNodeHook(vnodeHook, parentComponent, vnode);
@@ -6748,7 +6904,7 @@ If you want to remount the same app, move your app creation logic into a factory
6748
6904
  }
6749
6905
  }
6750
6906
  };
6751
- const mountChildren = (children, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized, start = 0) => {
6907
+ const mountChildren = (children, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, start = 0) => {
6752
6908
  for (let i = start; i < children.length; i++) {
6753
6909
  const child = children[i] = optimized ? cloneIfMounted(children[i]) : normalizeVNode(children[i]);
6754
6910
  patch(
@@ -6758,13 +6914,13 @@ If you want to remount the same app, move your app creation logic into a factory
6758
6914
  anchor,
6759
6915
  parentComponent,
6760
6916
  parentSuspense,
6761
- isSVG,
6917
+ namespace,
6762
6918
  slotScopeIds,
6763
6919
  optimized
6764
6920
  );
6765
6921
  }
6766
6922
  };
6767
- const patchElement = (n1, n2, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized) => {
6923
+ const patchElement = (n1, n2, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => {
6768
6924
  const el = n2.el = n1.el;
6769
6925
  let { patchFlag, dynamicChildren, dirs } = n2;
6770
6926
  patchFlag |= n1.patchFlag & 16;
@@ -6784,7 +6940,6 @@ If you want to remount the same app, move your app creation logic into a factory
6784
6940
  optimized = false;
6785
6941
  dynamicChildren = null;
6786
6942
  }
6787
- const areChildrenSVG = isSVG && n2.type !== "foreignObject";
6788
6943
  if (dynamicChildren) {
6789
6944
  patchBlockChildren(
6790
6945
  n1.dynamicChildren,
@@ -6792,7 +6947,7 @@ If you want to remount the same app, move your app creation logic into a factory
6792
6947
  el,
6793
6948
  parentComponent,
6794
6949
  parentSuspense,
6795
- areChildrenSVG,
6950
+ resolveChildrenNamespace(n2, namespace),
6796
6951
  slotScopeIds
6797
6952
  );
6798
6953
  {
@@ -6806,7 +6961,7 @@ If you want to remount the same app, move your app creation logic into a factory
6806
6961
  null,
6807
6962
  parentComponent,
6808
6963
  parentSuspense,
6809
- areChildrenSVG,
6964
+ resolveChildrenNamespace(n2, namespace),
6810
6965
  slotScopeIds,
6811
6966
  false
6812
6967
  );
@@ -6820,16 +6975,16 @@ If you want to remount the same app, move your app creation logic into a factory
6820
6975
  newProps,
6821
6976
  parentComponent,
6822
6977
  parentSuspense,
6823
- isSVG
6978
+ namespace
6824
6979
  );
6825
6980
  } else {
6826
6981
  if (patchFlag & 2) {
6827
6982
  if (oldProps.class !== newProps.class) {
6828
- hostPatchProp(el, "class", null, newProps.class, isSVG);
6983
+ hostPatchProp(el, "class", null, newProps.class, namespace);
6829
6984
  }
6830
6985
  }
6831
6986
  if (patchFlag & 4) {
6832
- hostPatchProp(el, "style", oldProps.style, newProps.style, isSVG);
6987
+ hostPatchProp(el, "style", oldProps.style, newProps.style, namespace);
6833
6988
  }
6834
6989
  if (patchFlag & 8) {
6835
6990
  const propsToUpdate = n2.dynamicProps;
@@ -6843,7 +6998,7 @@ If you want to remount the same app, move your app creation logic into a factory
6843
6998
  key,
6844
6999
  prev,
6845
7000
  next,
6846
- isSVG,
7001
+ namespace,
6847
7002
  n1.children,
6848
7003
  parentComponent,
6849
7004
  parentSuspense,
@@ -6866,7 +7021,7 @@ If you want to remount the same app, move your app creation logic into a factory
6866
7021
  newProps,
6867
7022
  parentComponent,
6868
7023
  parentSuspense,
6869
- isSVG
7024
+ namespace
6870
7025
  );
6871
7026
  }
6872
7027
  if ((vnodeHook = newProps.onVnodeUpdated) || dirs) {
@@ -6876,7 +7031,7 @@ If you want to remount the same app, move your app creation logic into a factory
6876
7031
  }, parentSuspense);
6877
7032
  }
6878
7033
  };
6879
- const patchBlockChildren = (oldChildren, newChildren, fallbackContainer, parentComponent, parentSuspense, isSVG, slotScopeIds) => {
7034
+ const patchBlockChildren = (oldChildren, newChildren, fallbackContainer, parentComponent, parentSuspense, namespace, slotScopeIds) => {
6880
7035
  for (let i = 0; i < newChildren.length; i++) {
6881
7036
  const oldVNode = oldChildren[i];
6882
7037
  const newVNode = newChildren[i];
@@ -6901,13 +7056,13 @@ If you want to remount the same app, move your app creation logic into a factory
6901
7056
  null,
6902
7057
  parentComponent,
6903
7058
  parentSuspense,
6904
- isSVG,
7059
+ namespace,
6905
7060
  slotScopeIds,
6906
7061
  true
6907
7062
  );
6908
7063
  }
6909
7064
  };
6910
- const patchProps = (el, vnode, oldProps, newProps, parentComponent, parentSuspense, isSVG) => {
7065
+ const patchProps = (el, vnode, oldProps, newProps, parentComponent, parentSuspense, namespace) => {
6911
7066
  if (oldProps !== newProps) {
6912
7067
  if (oldProps !== EMPTY_OBJ) {
6913
7068
  for (const key in oldProps) {
@@ -6917,7 +7072,7 @@ If you want to remount the same app, move your app creation logic into a factory
6917
7072
  key,
6918
7073
  oldProps[key],
6919
7074
  null,
6920
- isSVG,
7075
+ namespace,
6921
7076
  vnode.children,
6922
7077
  parentComponent,
6923
7078
  parentSuspense,
@@ -6937,7 +7092,7 @@ If you want to remount the same app, move your app creation logic into a factory
6937
7092
  key,
6938
7093
  prev,
6939
7094
  next,
6940
- isSVG,
7095
+ namespace,
6941
7096
  vnode.children,
6942
7097
  parentComponent,
6943
7098
  parentSuspense,
@@ -6946,11 +7101,11 @@ If you want to remount the same app, move your app creation logic into a factory
6946
7101
  }
6947
7102
  }
6948
7103
  if ("value" in newProps) {
6949
- hostPatchProp(el, "value", oldProps.value, newProps.value);
7104
+ hostPatchProp(el, "value", oldProps.value, newProps.value, namespace);
6950
7105
  }
6951
7106
  }
6952
7107
  };
6953
- const processFragment = (n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized) => {
7108
+ const processFragment = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => {
6954
7109
  const fragmentStartAnchor = n2.el = n1 ? n1.el : hostCreateText("");
6955
7110
  const fragmentEndAnchor = n2.anchor = n1 ? n1.anchor : hostCreateText("");
6956
7111
  let { patchFlag, dynamicChildren, slotScopeIds: fragmentSlotScopeIds } = n2;
@@ -6974,7 +7129,7 @@ If you want to remount the same app, move your app creation logic into a factory
6974
7129
  fragmentEndAnchor,
6975
7130
  parentComponent,
6976
7131
  parentSuspense,
6977
- isSVG,
7132
+ namespace,
6978
7133
  slotScopeIds,
6979
7134
  optimized
6980
7135
  );
@@ -6988,7 +7143,7 @@ If you want to remount the same app, move your app creation logic into a factory
6988
7143
  container,
6989
7144
  parentComponent,
6990
7145
  parentSuspense,
6991
- isSVG,
7146
+ namespace,
6992
7147
  slotScopeIds
6993
7148
  );
6994
7149
  {
@@ -7002,14 +7157,14 @@ If you want to remount the same app, move your app creation logic into a factory
7002
7157
  fragmentEndAnchor,
7003
7158
  parentComponent,
7004
7159
  parentSuspense,
7005
- isSVG,
7160
+ namespace,
7006
7161
  slotScopeIds,
7007
7162
  optimized
7008
7163
  );
7009
7164
  }
7010
7165
  }
7011
7166
  };
7012
- const processComponent = (n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized) => {
7167
+ const processComponent = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => {
7013
7168
  n2.slotScopeIds = slotScopeIds;
7014
7169
  if (n1 == null) {
7015
7170
  if (n2.shapeFlag & 512) {
@@ -7017,7 +7172,7 @@ If you want to remount the same app, move your app creation logic into a factory
7017
7172
  n2,
7018
7173
  container,
7019
7174
  anchor,
7020
- isSVG,
7175
+ namespace,
7021
7176
  optimized
7022
7177
  );
7023
7178
  } else {
@@ -7027,7 +7182,7 @@ If you want to remount the same app, move your app creation logic into a factory
7027
7182
  anchor,
7028
7183
  parentComponent,
7029
7184
  parentSuspense,
7030
- isSVG,
7185
+ namespace,
7031
7186
  optimized
7032
7187
  );
7033
7188
  }
@@ -7035,7 +7190,7 @@ If you want to remount the same app, move your app creation logic into a factory
7035
7190
  updateComponent(n1, n2, optimized);
7036
7191
  }
7037
7192
  };
7038
- const mountComponent = (initialVNode, container, anchor, parentComponent, parentSuspense, isSVG, optimized) => {
7193
+ const mountComponent = (initialVNode, container, anchor, parentComponent, parentSuspense, namespace, optimized) => {
7039
7194
  const instance = (initialVNode.component = createComponentInstance(
7040
7195
  initialVNode,
7041
7196
  parentComponent,
@@ -7066,17 +7221,17 @@ If you want to remount the same app, move your app creation logic into a factory
7066
7221
  const placeholder = instance.subTree = createVNode(Comment);
7067
7222
  processCommentNode(null, placeholder, container, anchor);
7068
7223
  }
7069
- return;
7224
+ } else {
7225
+ setupRenderEffect(
7226
+ instance,
7227
+ initialVNode,
7228
+ container,
7229
+ anchor,
7230
+ parentSuspense,
7231
+ namespace,
7232
+ optimized
7233
+ );
7070
7234
  }
7071
- setupRenderEffect(
7072
- instance,
7073
- initialVNode,
7074
- container,
7075
- anchor,
7076
- parentSuspense,
7077
- isSVG,
7078
- optimized
7079
- );
7080
7235
  {
7081
7236
  popWarningContext();
7082
7237
  endMeasure(instance, `mount`);
@@ -7105,7 +7260,7 @@ If you want to remount the same app, move your app creation logic into a factory
7105
7260
  instance.vnode = n2;
7106
7261
  }
7107
7262
  };
7108
- const setupRenderEffect = (instance, initialVNode, container, anchor, parentSuspense, isSVG, optimized) => {
7263
+ const setupRenderEffect = (instance, initialVNode, container, anchor, parentSuspense, namespace, optimized) => {
7109
7264
  const componentUpdateFn = () => {
7110
7265
  if (!instance.isMounted) {
7111
7266
  let vnodeHook;
@@ -7172,7 +7327,7 @@ If you want to remount the same app, move your app creation logic into a factory
7172
7327
  anchor,
7173
7328
  instance,
7174
7329
  parentSuspense,
7175
- isSVG
7330
+ namespace
7176
7331
  );
7177
7332
  {
7178
7333
  endMeasure(instance, `patch`);
@@ -7199,6 +7354,21 @@ If you want to remount the same app, move your app creation logic into a factory
7199
7354
  initialVNode = container = anchor = null;
7200
7355
  } else {
7201
7356
  let { next, bu, u, parent, vnode } = instance;
7357
+ {
7358
+ const nonHydratedAsyncRoot = locateNonHydratedAsyncRoot(instance);
7359
+ if (nonHydratedAsyncRoot) {
7360
+ if (next) {
7361
+ next.el = vnode.el;
7362
+ updateComponentPreRender(instance, next, optimized);
7363
+ }
7364
+ nonHydratedAsyncRoot.asyncDep.then(() => {
7365
+ if (!instance.isUnmounted) {
7366
+ componentUpdateFn();
7367
+ }
7368
+ });
7369
+ return;
7370
+ }
7371
+ }
7202
7372
  let originNext = next;
7203
7373
  let vnodeHook;
7204
7374
  {
@@ -7239,7 +7409,7 @@ If you want to remount the same app, move your app creation logic into a factory
7239
7409
  getNextHostNode(prevTree),
7240
7410
  instance,
7241
7411
  parentSuspense,
7242
- isSVG
7412
+ namespace
7243
7413
  );
7244
7414
  {
7245
7415
  endMeasure(instance, `patch`);
@@ -7294,10 +7464,10 @@ If you want to remount the same app, move your app creation logic into a factory
7294
7464
  updateProps(instance, nextVNode.props, prevProps, optimized);
7295
7465
  updateSlots(instance, nextVNode.children, optimized);
7296
7466
  pauseTracking();
7297
- flushPreFlushCbs();
7467
+ flushPreFlushCbs(instance);
7298
7468
  resetTracking();
7299
7469
  };
7300
- const patchChildren = (n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized = false) => {
7470
+ const patchChildren = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized = false) => {
7301
7471
  const c1 = n1 && n1.children;
7302
7472
  const prevShapeFlag = n1 ? n1.shapeFlag : 0;
7303
7473
  const c2 = n2.children;
@@ -7311,7 +7481,7 @@ If you want to remount the same app, move your app creation logic into a factory
7311
7481
  anchor,
7312
7482
  parentComponent,
7313
7483
  parentSuspense,
7314
- isSVG,
7484
+ namespace,
7315
7485
  slotScopeIds,
7316
7486
  optimized
7317
7487
  );
@@ -7324,7 +7494,7 @@ If you want to remount the same app, move your app creation logic into a factory
7324
7494
  anchor,
7325
7495
  parentComponent,
7326
7496
  parentSuspense,
7327
- isSVG,
7497
+ namespace,
7328
7498
  slotScopeIds,
7329
7499
  optimized
7330
7500
  );
@@ -7348,7 +7518,7 @@ If you want to remount the same app, move your app creation logic into a factory
7348
7518
  anchor,
7349
7519
  parentComponent,
7350
7520
  parentSuspense,
7351
- isSVG,
7521
+ namespace,
7352
7522
  slotScopeIds,
7353
7523
  optimized
7354
7524
  );
@@ -7366,7 +7536,7 @@ If you want to remount the same app, move your app creation logic into a factory
7366
7536
  anchor,
7367
7537
  parentComponent,
7368
7538
  parentSuspense,
7369
- isSVG,
7539
+ namespace,
7370
7540
  slotScopeIds,
7371
7541
  optimized
7372
7542
  );
@@ -7374,7 +7544,7 @@ If you want to remount the same app, move your app creation logic into a factory
7374
7544
  }
7375
7545
  }
7376
7546
  };
7377
- const patchUnkeyedChildren = (c1, c2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized) => {
7547
+ const patchUnkeyedChildren = (c1, c2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => {
7378
7548
  c1 = c1 || EMPTY_ARR;
7379
7549
  c2 = c2 || EMPTY_ARR;
7380
7550
  const oldLength = c1.length;
@@ -7390,7 +7560,7 @@ If you want to remount the same app, move your app creation logic into a factory
7390
7560
  null,
7391
7561
  parentComponent,
7392
7562
  parentSuspense,
7393
- isSVG,
7563
+ namespace,
7394
7564
  slotScopeIds,
7395
7565
  optimized
7396
7566
  );
@@ -7411,14 +7581,14 @@ If you want to remount the same app, move your app creation logic into a factory
7411
7581
  anchor,
7412
7582
  parentComponent,
7413
7583
  parentSuspense,
7414
- isSVG,
7584
+ namespace,
7415
7585
  slotScopeIds,
7416
7586
  optimized,
7417
7587
  commonLength
7418
7588
  );
7419
7589
  }
7420
7590
  };
7421
- const patchKeyedChildren = (c1, c2, container, parentAnchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized) => {
7591
+ const patchKeyedChildren = (c1, c2, container, parentAnchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => {
7422
7592
  let i = 0;
7423
7593
  const l2 = c2.length;
7424
7594
  let e1 = c1.length - 1;
@@ -7434,7 +7604,7 @@ If you want to remount the same app, move your app creation logic into a factory
7434
7604
  null,
7435
7605
  parentComponent,
7436
7606
  parentSuspense,
7437
- isSVG,
7607
+ namespace,
7438
7608
  slotScopeIds,
7439
7609
  optimized
7440
7610
  );
@@ -7454,7 +7624,7 @@ If you want to remount the same app, move your app creation logic into a factory
7454
7624
  null,
7455
7625
  parentComponent,
7456
7626
  parentSuspense,
7457
- isSVG,
7627
+ namespace,
7458
7628
  slotScopeIds,
7459
7629
  optimized
7460
7630
  );
@@ -7476,7 +7646,7 @@ If you want to remount the same app, move your app creation logic into a factory
7476
7646
  anchor,
7477
7647
  parentComponent,
7478
7648
  parentSuspense,
7479
- isSVG,
7649
+ namespace,
7480
7650
  slotScopeIds,
7481
7651
  optimized
7482
7652
  );
@@ -7546,7 +7716,7 @@ If you want to remount the same app, move your app creation logic into a factory
7546
7716
  null,
7547
7717
  parentComponent,
7548
7718
  parentSuspense,
7549
- isSVG,
7719
+ namespace,
7550
7720
  slotScopeIds,
7551
7721
  optimized
7552
7722
  );
@@ -7567,7 +7737,7 @@ If you want to remount the same app, move your app creation logic into a factory
7567
7737
  anchor,
7568
7738
  parentComponent,
7569
7739
  parentSuspense,
7570
- isSVG,
7740
+ namespace,
7571
7741
  slotScopeIds,
7572
7742
  optimized
7573
7743
  );
@@ -7788,13 +7958,21 @@ If you want to remount the same app, move your app creation logic into a factory
7788
7958
  }
7789
7959
  return hostNextSibling(vnode.anchor || vnode.el);
7790
7960
  };
7791
- const render = (vnode, container, isSVG) => {
7961
+ const render = (vnode, container, namespace) => {
7792
7962
  if (vnode == null) {
7793
7963
  if (container._vnode) {
7794
7964
  unmount(container._vnode, null, null, true);
7795
7965
  }
7796
7966
  } else {
7797
- patch(container._vnode || null, vnode, container, null, null, null, isSVG);
7967
+ patch(
7968
+ container._vnode || null,
7969
+ vnode,
7970
+ container,
7971
+ null,
7972
+ null,
7973
+ null,
7974
+ namespace
7975
+ );
7798
7976
  }
7799
7977
  flushPreFlushCbs();
7800
7978
  flushPostFlushCbs();
@@ -7825,6 +8003,9 @@ If you want to remount the same app, move your app creation logic into a factory
7825
8003
  createApp: createAppAPI(render, hydrate)
7826
8004
  };
7827
8005
  }
8006
+ function resolveChildrenNamespace({ type, props }, currentNamespace) {
8007
+ return currentNamespace === "svg" && type === "foreignObject" || currentNamespace === "mathml" && type === "annotation-xml" && props && props.encoding && props.encoding.includes("html") ? void 0 : currentNamespace;
8008
+ }
7828
8009
  function toggleRecurse({ effect, update }, allowed) {
7829
8010
  effect.allowRecurse = update.allowRecurse = allowed;
7830
8011
  }
@@ -7895,10 +8076,21 @@ If you want to remount the same app, move your app creation logic into a factory
7895
8076
  }
7896
8077
  return result;
7897
8078
  }
8079
+ function locateNonHydratedAsyncRoot(instance) {
8080
+ const subComponent = instance.subTree.component;
8081
+ if (subComponent) {
8082
+ if (subComponent.asyncDep && !subComponent.asyncResolved) {
8083
+ return subComponent;
8084
+ } else {
8085
+ return locateNonHydratedAsyncRoot(subComponent);
8086
+ }
8087
+ }
8088
+ }
7898
8089
 
7899
8090
  const isTeleport = (type) => type.__isTeleport;
7900
8091
  const isTeleportDisabled = (props) => props && (props.disabled || props.disabled === "");
7901
8092
  const isTargetSVG = (target) => typeof SVGElement !== "undefined" && target instanceof SVGElement;
8093
+ const isTargetMathML = (target) => typeof MathMLElement === "function" && target instanceof MathMLElement;
7902
8094
  const resolveTarget = (props, select) => {
7903
8095
  const targetSelector = props && props.to;
7904
8096
  if (isString(targetSelector)) {
@@ -7926,7 +8118,7 @@ If you want to remount the same app, move your app creation logic into a factory
7926
8118
  const TeleportImpl = {
7927
8119
  name: "Teleport",
7928
8120
  __isTeleport: true,
7929
- process(n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized, internals) {
8121
+ process(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, internals) {
7930
8122
  const {
7931
8123
  mc: mountChildren,
7932
8124
  pc: patchChildren,
@@ -7948,7 +8140,11 @@ If you want to remount the same app, move your app creation logic into a factory
7948
8140
  const targetAnchor = n2.targetAnchor = createText("");
7949
8141
  if (target) {
7950
8142
  insert(targetAnchor, target);
7951
- isSVG = isSVG || isTargetSVG(target);
8143
+ if (namespace === "svg" || isTargetSVG(target)) {
8144
+ namespace = "svg";
8145
+ } else if (namespace === "mathml" || isTargetMathML(target)) {
8146
+ namespace = "mathml";
8147
+ }
7952
8148
  } else if (!disabled) {
7953
8149
  warn("Invalid Teleport target on mount:", target, `(${typeof target})`);
7954
8150
  }
@@ -7960,7 +8156,7 @@ If you want to remount the same app, move your app creation logic into a factory
7960
8156
  anchor2,
7961
8157
  parentComponent,
7962
8158
  parentSuspense,
7963
- isSVG,
8159
+ namespace,
7964
8160
  slotScopeIds,
7965
8161
  optimized
7966
8162
  );
@@ -7979,7 +8175,11 @@ If you want to remount the same app, move your app creation logic into a factory
7979
8175
  const wasDisabled = isTeleportDisabled(n1.props);
7980
8176
  const currentContainer = wasDisabled ? container : target;
7981
8177
  const currentAnchor = wasDisabled ? mainAnchor : targetAnchor;
7982
- isSVG = isSVG || isTargetSVG(target);
8178
+ if (namespace === "svg" || isTargetSVG(target)) {
8179
+ namespace = "svg";
8180
+ } else if (namespace === "mathml" || isTargetMathML(target)) {
8181
+ namespace = "mathml";
8182
+ }
7983
8183
  if (dynamicChildren) {
7984
8184
  patchBlockChildren(
7985
8185
  n1.dynamicChildren,
@@ -7987,7 +8187,7 @@ If you want to remount the same app, move your app creation logic into a factory
7987
8187
  currentContainer,
7988
8188
  parentComponent,
7989
8189
  parentSuspense,
7990
- isSVG,
8190
+ namespace,
7991
8191
  slotScopeIds
7992
8192
  );
7993
8193
  traverseStaticChildren(n1, n2, true);
@@ -7999,7 +8199,7 @@ If you want to remount the same app, move your app creation logic into a factory
7999
8199
  currentAnchor,
8000
8200
  parentComponent,
8001
8201
  parentSuspense,
8002
- isSVG,
8202
+ namespace,
8003
8203
  slotScopeIds,
8004
8204
  false
8005
8205
  );
@@ -8622,10 +8822,14 @@ Component that was made reactive: `,
8622
8822
  let currentInstance = null;
8623
8823
  const getCurrentInstance = () => currentInstance || currentRenderingInstance;
8624
8824
  let internalSetCurrentInstance;
8825
+ let setInSSRSetupState;
8625
8826
  {
8626
8827
  internalSetCurrentInstance = (i) => {
8627
8828
  currentInstance = i;
8628
8829
  };
8830
+ setInSSRSetupState = (v) => {
8831
+ isInSSRComponentSetup = v;
8832
+ };
8629
8833
  }
8630
8834
  const setCurrentInstance = (instance) => {
8631
8835
  internalSetCurrentInstance(instance);
@@ -8649,13 +8853,13 @@ Component that was made reactive: `,
8649
8853
  }
8650
8854
  let isInSSRComponentSetup = false;
8651
8855
  function setupComponent(instance, isSSR = false) {
8652
- isInSSRComponentSetup = isSSR;
8856
+ isSSR && setInSSRSetupState(isSSR);
8653
8857
  const { props, children } = instance.vnode;
8654
8858
  const isStateful = isStatefulComponent(instance);
8655
8859
  initProps(instance, props, isStateful, isSSR);
8656
8860
  initSlots(instance, children);
8657
8861
  const setupResult = isStateful ? setupStatefulComponent(instance, isSSR) : void 0;
8658
- isInSSRComponentSetup = false;
8862
+ isSSR && setInSSRSetupState(false);
8659
8863
  return setupResult;
8660
8864
  }
8661
8865
  function setupStatefulComponent(instance, isSSR) {
@@ -8965,9 +9169,9 @@ Component that was made reactive: `,
8965
9169
  return;
8966
9170
  }
8967
9171
  const vueStyle = { style: "color:#3ba776" };
8968
- const numberStyle = { style: "color:#0b1bc9" };
8969
- const stringStyle = { style: "color:#b62e24" };
8970
- const keywordStyle = { style: "color:#9d288c" };
9172
+ const numberStyle = { style: "color:#1677ff" };
9173
+ const stringStyle = { style: "color:#f5222d" };
9174
+ const keywordStyle = { style: "color:#eb2f96" };
8971
9175
  const formatter = {
8972
9176
  header(obj) {
8973
9177
  if (!isObject(obj)) {
@@ -9161,13 +9365,15 @@ Component that was made reactive: `,
9161
9365
  return true;
9162
9366
  }
9163
9367
 
9164
- const version = "3.4.0-alpha.3";
9368
+ const version = "3.4.0-beta.1";
9165
9369
  const ErrorTypeStrings = ErrorTypeStrings$1 ;
9166
9370
  const ssrUtils = null;
9167
9371
  const resolveFilter = null;
9168
9372
  const compatUtils = null;
9373
+ const DeprecationTypes = null;
9169
9374
 
9170
9375
  const svgNS = "http://www.w3.org/2000/svg";
9376
+ const mathmlNS = "http://www.w3.org/1998/Math/MathML";
9171
9377
  const doc = typeof document !== "undefined" ? document : null;
9172
9378
  const templateContainer = doc && /* @__PURE__ */ doc.createElement("template");
9173
9379
  const nodeOps = {
@@ -9180,8 +9386,8 @@ Component that was made reactive: `,
9180
9386
  parent.removeChild(child);
9181
9387
  }
9182
9388
  },
9183
- createElement: (tag, isSVG, is, props) => {
9184
- const el = isSVG ? doc.createElementNS(svgNS, tag) : doc.createElement(tag, is ? { is } : void 0);
9389
+ createElement: (tag, namespace, is, props) => {
9390
+ const el = namespace === "svg" ? doc.createElementNS(svgNS, tag) : namespace === "mathml" ? doc.createElementNS(mathmlNS, tag) : doc.createElement(tag, is ? { is } : void 0);
9185
9391
  if (tag === "select" && props && props.multiple != null) {
9186
9392
  el.setAttribute("multiple", props.multiple);
9187
9393
  }
@@ -9205,7 +9411,7 @@ Component that was made reactive: `,
9205
9411
  // Reason: innerHTML.
9206
9412
  // Static content here can only come from compiled templates.
9207
9413
  // As long as the user only uses trusted templates, this is safe.
9208
- insertStaticContent(content, parent, anchor, isSVG, start, end) {
9414
+ insertStaticContent(content, parent, anchor, namespace, start, end) {
9209
9415
  const before = anchor ? anchor.previousSibling : parent.lastChild;
9210
9416
  if (start && (start === end || start.nextSibling)) {
9211
9417
  while (true) {
@@ -9214,9 +9420,9 @@ Component that was made reactive: `,
9214
9420
  break;
9215
9421
  }
9216
9422
  } else {
9217
- templateContainer.innerHTML = isSVG ? `<svg>${content}</svg>` : content;
9423
+ templateContainer.innerHTML = namespace === "svg" ? `<svg>${content}</svg>` : namespace === "mathml" ? `<math>${content}</math>` : content;
9218
9424
  const template = templateContainer.content;
9219
- if (isSVG) {
9425
+ if (namespace === "svg" || namespace === "mathml") {
9220
9426
  const wrapper = template.firstChild;
9221
9427
  while (wrapper.firstChild) {
9222
9428
  template.appendChild(wrapper.firstChild);
@@ -9774,8 +9980,10 @@ Component that was made reactive: `,
9774
9980
  }
9775
9981
  }
9776
9982
 
9777
- const nativeOnRE = /^on[a-z]/;
9778
- const patchProp = (el, key, prevValue, nextValue, isSVG = false, prevChildren, parentComponent, parentSuspense, unmountChildren) => {
9983
+ const isNativeOn = (key) => key.charCodeAt(0) === 111 && key.charCodeAt(1) === 110 && // lowercase letter
9984
+ key.charCodeAt(2) > 96 && key.charCodeAt(2) < 123;
9985
+ const patchProp = (el, key, prevValue, nextValue, namespace, prevChildren, parentComponent, parentSuspense, unmountChildren) => {
9986
+ const isSVG = namespace === "svg";
9779
9987
  if (key === "class") {
9780
9988
  patchClass(el, nextValue, isSVG);
9781
9989
  } else if (key === "style") {
@@ -9808,7 +10016,7 @@ Component that was made reactive: `,
9808
10016
  if (key === "innerHTML" || key === "textContent") {
9809
10017
  return true;
9810
10018
  }
9811
- if (key in el && nativeOnRE.test(key) && isFunction(value)) {
10019
+ if (key in el && isNativeOn(key) && isFunction(value)) {
9812
10020
  return true;
9813
10021
  }
9814
10022
  return false;
@@ -9825,7 +10033,13 @@ Component that was made reactive: `,
9825
10033
  if (key === "type" && el.tagName === "TEXTAREA") {
9826
10034
  return false;
9827
10035
  }
9828
- if (nativeOnRE.test(key) && isString(value)) {
10036
+ if (key === "width" || key === "height") {
10037
+ const tag = el.tagName;
10038
+ if (tag === "IMG" || tag === "VIDEO" || tag === "CANVAS" || tag === "SOURCE") {
10039
+ return false;
10040
+ }
10041
+ }
10042
+ if (isNativeOn(key) && isString(value)) {
9829
10043
  return false;
9830
10044
  }
9831
10045
  return key in el;
@@ -10494,14 +10708,14 @@ Component that was made reactive: `,
10494
10708
  exact: (e, modifiers) => systemModifiers.some((m) => e[`${m}Key`] && !modifiers.includes(m))
10495
10709
  };
10496
10710
  const withModifiers = (fn, modifiers) => {
10497
- return (event, ...args) => {
10711
+ return fn._withMods || (fn._withMods = (event, ...args) => {
10498
10712
  for (let i = 0; i < modifiers.length; i++) {
10499
10713
  const guard = modifierGuards[modifiers[i]];
10500
10714
  if (guard && guard(event, modifiers))
10501
10715
  return;
10502
10716
  }
10503
10717
  return fn(event, ...args);
10504
- };
10718
+ });
10505
10719
  };
10506
10720
  const keyNames = {
10507
10721
  esc: "escape",
@@ -10513,7 +10727,7 @@ Component that was made reactive: `,
10513
10727
  delete: "backspace"
10514
10728
  };
10515
10729
  const withKeys = (fn, modifiers) => {
10516
- return (event) => {
10730
+ return fn._withKeys || (fn._withKeys = (event) => {
10517
10731
  if (!("key" in event)) {
10518
10732
  return;
10519
10733
  }
@@ -10521,7 +10735,7 @@ Component that was made reactive: `,
10521
10735
  if (modifiers.some((k) => k === eventKey || keyNames[k] === eventKey)) {
10522
10736
  return fn(event);
10523
10737
  }
10524
- };
10738
+ });
10525
10739
  };
10526
10740
 
10527
10741
  const rendererOptions = /* @__PURE__ */ extend({ patchProp }, nodeOps);
@@ -10557,7 +10771,7 @@ Component that was made reactive: `,
10557
10771
  component.template = container.innerHTML;
10558
10772
  }
10559
10773
  container.innerHTML = "";
10560
- const proxy = mount(container, false, container instanceof SVGElement);
10774
+ const proxy = mount(container, false, resolveRootNamespace(container));
10561
10775
  if (container instanceof Element) {
10562
10776
  container.removeAttribute("v-cloak");
10563
10777
  container.setAttribute("data-v-app", "");
@@ -10576,14 +10790,22 @@ Component that was made reactive: `,
10576
10790
  app.mount = (containerOrSelector) => {
10577
10791
  const container = normalizeContainer(containerOrSelector);
10578
10792
  if (container) {
10579
- return mount(container, true, container instanceof SVGElement);
10793
+ return mount(container, true, resolveRootNamespace(container));
10580
10794
  }
10581
10795
  };
10582
10796
  return app;
10583
10797
  };
10798
+ function resolveRootNamespace(container) {
10799
+ if (container instanceof SVGElement) {
10800
+ return "svg";
10801
+ }
10802
+ if (typeof MathMLElement === "function" && container instanceof MathMLElement) {
10803
+ return "mathml";
10804
+ }
10805
+ }
10584
10806
  function injectNativeTagCheck(app) {
10585
10807
  Object.defineProperty(app.config, "isNativeTag", {
10586
- value: (tag) => isHTMLTag(tag) || isSVGTag(tag),
10808
+ value: (tag) => isHTMLTag(tag) || isSVGTag(tag) || isMathMLTag(tag),
10587
10809
  writable: false
10588
10810
  });
10589
10811
  }
@@ -10638,7 +10860,9 @@ Component that was made reactive: `,
10638
10860
  exports.BaseTransition = BaseTransition;
10639
10861
  exports.BaseTransitionPropsValidators = BaseTransitionPropsValidators;
10640
10862
  exports.Comment = Comment;
10863
+ exports.DeprecationTypes = DeprecationTypes;
10641
10864
  exports.EffectScope = EffectScope;
10865
+ exports.ErrorCodes = ErrorCodes;
10642
10866
  exports.ErrorTypeStrings = ErrorTypeStrings;
10643
10867
  exports.Fragment = Fragment;
10644
10868
  exports.KeepAlive = KeepAlive;
@@ -10647,8 +10871,10 @@ Component that was made reactive: `,
10647
10871
  exports.Suspense = Suspense;
10648
10872
  exports.Teleport = Teleport;
10649
10873
  exports.Text = Text;
10874
+ exports.TrackOpTypes = TrackOpTypes;
10650
10875
  exports.Transition = Transition;
10651
10876
  exports.TransitionGroup = TransitionGroup;
10877
+ exports.TriggerOpTypes = TriggerOpTypes;
10652
10878
  exports.VueElement = VueElement;
10653
10879
  exports.assertNumber = assertNumber;
10654
10880
  exports.callWithAsyncErrorHandling = callWithAsyncErrorHandling;