@vue/runtime-dom 3.6.0-rc.1 → 3.6.0-rc.10

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.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @vue/runtime-dom v3.6.0-rc.1
2
+ * @vue/runtime-dom v3.6.0-rc.10
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
@@ -13,7 +13,7 @@ var VueRuntimeDOM = (function(exports) {
13
13
  * \/\*#\_\_PURE\_\_\*\/
14
14
  * So that they can be tree-shaken if necessary.
15
15
  */
16
- /* @__NO_SIDE_EFFECTS__ */
16
+ /*@__NO_SIDE_EFFECTS__*/
17
17
  function makeMap(str) {
18
18
  const map = Object.create(null);
19
19
  for (const key of str.split(",")) map[key] = 1;
@@ -57,9 +57,9 @@ var VueRuntimeDOM = (function(exports) {
57
57
  };
58
58
  const isPlainObject = (val) => toTypeString(val) === "[object Object]";
59
59
  const isIntegerKey = (key) => isString(key) && key !== "NaN" && key[0] !== "-" && "" + parseInt(key, 10) === key;
60
- const isReservedProp = /* @__PURE__ */ makeMap(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted");
61
- const isBuiltInTag = /* @__PURE__ */ makeMap("slot,component");
62
- const isBuiltInDirective = /* @__PURE__ */ makeMap("bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo");
60
+ const isReservedProp = /*@__PURE__*/ makeMap(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted");
61
+ const isBuiltInTag = /*#__PURE__*/ makeMap("slot,component");
62
+ const isBuiltInDirective = /*@__PURE__*/ makeMap("bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo");
63
63
  const cacheStringFunction = (fn) => {
64
64
  const cache = Object.create(null);
65
65
  return ((str) => {
@@ -133,7 +133,7 @@ var VueRuntimeDOM = (function(exports) {
133
133
  function canSetValueDirectly(tagName) {
134
134
  return tagName !== "PROGRESS" && !tagName.includes("-");
135
135
  }
136
- const isGloballyAllowed = /* @__PURE__ */ makeMap("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,Symbol");
136
+ const isGloballyAllowed = /*@__PURE__*/ makeMap("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,Symbol");
137
137
  //#endregion
138
138
  //#region packages/shared/src/normalizeProp.ts
139
139
  function normalizeStyle(value) {
@@ -149,10 +149,10 @@ var VueRuntimeDOM = (function(exports) {
149
149
  }
150
150
  const listDelimiterRE = /;(?![^(]*\))/g;
151
151
  const propertyDelimiterRE = /:([^]+)/;
152
- const styleCommentRE = /\/\*[^]*?\*\//g;
152
+ const styleCommentRE = /"(?:[^"\\]|\\[^])*"|'(?:[^'\\]|\\[^])*'|\\[^]|\/\*[^]*?\*\//g;
153
153
  function parseStringStyle(cssText) {
154
154
  const ret = {};
155
- cssText.replace(styleCommentRE, "").split(listDelimiterRE).forEach((item) => {
155
+ cssText.replace(styleCommentRE, (match) => match.startsWith("/*") ? "" : match).split(listDelimiterRE).forEach((item) => {
156
156
  if (item) {
157
157
  const tmp = item.split(propertyDelimiterRE);
158
158
  tmp.length > 1 && (ret[tmp[0].trim()] = tmp[1].trim());
@@ -201,17 +201,17 @@ var VueRuntimeDOM = (function(exports) {
201
201
  * Compiler only.
202
202
  * Do NOT use in runtime code paths unless behind `__DEV__` flag.
203
203
  */
204
- const isHTMLTag = /* @__PURE__ */ makeMap(HTML_TAGS);
204
+ const isHTMLTag = /*@__PURE__*/ makeMap(HTML_TAGS);
205
205
  /**
206
206
  * Compiler only.
207
207
  * Do NOT use in runtime code paths unless behind `__DEV__` flag.
208
208
  */
209
- const isSVGTag = /* @__PURE__ */ makeMap(SVG_TAGS);
209
+ const isSVGTag = /*@__PURE__*/ makeMap(SVG_TAGS);
210
210
  /**
211
211
  * Compiler only.
212
212
  * Do NOT use in runtime code paths unless behind `__DEV__` flag.
213
213
  */
214
- const isMathMLTag = /* @__PURE__ */ makeMap(MATH_TAGS);
214
+ const isMathMLTag = /*@__PURE__*/ makeMap(MATH_TAGS);
215
215
  //#endregion
216
216
  //#region packages/shared/src/domAttrConfig.ts
217
217
  /**
@@ -226,11 +226,11 @@ var VueRuntimeDOM = (function(exports) {
226
226
  * - readonly -> readOnly
227
227
  */
228
228
  const specialBooleanAttrs = `itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly`;
229
- const isSpecialBooleanAttr = /* @__PURE__ */ makeMap(specialBooleanAttrs);
229
+ const isSpecialBooleanAttr = /*@__PURE__*/ makeMap(specialBooleanAttrs);
230
230
  /**
231
231
  * The full list is needed during SSR to produce the correct initial markup.
232
232
  */
233
- const isBooleanAttr = /* @__PURE__ */ makeMap(specialBooleanAttrs + ",async,autofocus,autoplay,controls,default,defer,disabled,hidden,inert,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected");
233
+ const isBooleanAttr = /*@__PURE__*/ makeMap(specialBooleanAttrs + ",async,autofocus,autoplay,controls,default,defer,disabled,inert,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected");
234
234
  /**
235
235
  * Boolean attributes should be included if the value is truthy or ''.
236
236
  * e.g. `<select multiple>` compiles to `{ multiple: '' }`
@@ -244,11 +244,11 @@ var VueRuntimeDOM = (function(exports) {
244
244
  * Don't also forget to allow `data-*` and `aria-*`!
245
245
  * Generated from https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes
246
246
  */
247
- const isKnownHtmlAttr = /* @__PURE__ */ makeMap("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");
247
+ const isKnownHtmlAttr = /*@__PURE__*/ makeMap("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");
248
248
  /**
249
249
  * Generated from https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute
250
250
  */
251
- const isKnownSvgAttr = /* @__PURE__ */ makeMap("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");
251
+ const isKnownSvgAttr = /*@__PURE__*/ makeMap("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");
252
252
  /**
253
253
  * Shared between server-renderer and runtime-core hydration logic
254
254
  */
@@ -274,13 +274,54 @@ var VueRuntimeDOM = (function(exports) {
274
274
  }
275
275
  //#endregion
276
276
  //#region packages/shared/src/looseEqual.ts
277
- function looseCompareArrays(a, b) {
277
+ function looseCompareArrays(a, b, seen) {
278
278
  if (a.length !== b.length) return false;
279
279
  let equal = true;
280
- for (let i = 0; equal && i < a.length; i++) equal = looseEqual(a[i], b[i]);
280
+ for (let i = 0; equal && i < a.length; i++) equal = looseEqual(a[i], b[i], seen);
281
281
  return equal;
282
282
  }
283
- function looseEqual(a, b) {
283
+ function looseCompareCollections(a, b, seen) {
284
+ if (a.size !== b.size) return false;
285
+ const candidates = Array.from(b);
286
+ const matched = new Uint8Array(candidates.length);
287
+ for (const item of a) {
288
+ let index = -1;
289
+ for (let i = 0; i < candidates.length; i++) if (!matched[i] && looseEqual(item, candidates[i], seen)) {
290
+ index = i;
291
+ break;
292
+ }
293
+ if (index < 0) return false;
294
+ matched[index] = 1;
295
+ }
296
+ return true;
297
+ }
298
+ function looseCompareObjects(a, b, seen) {
299
+ let aValidType = isMap(a);
300
+ let bValidType = isMap(b);
301
+ if (aValidType || bValidType) return aValidType && bValidType ? looseCompareCollections(a, b, seen) : false;
302
+ aValidType = isSet(a);
303
+ bValidType = isSet(b);
304
+ if (aValidType || bValidType) return aValidType && bValidType ? looseCompareCollections(a, b, seen) : false;
305
+ if (Object.keys(a).length !== Object.keys(b).length) return false;
306
+ for (const key in a) {
307
+ const aHasKey = a.hasOwnProperty(key);
308
+ const bHasKey = b.hasOwnProperty(key);
309
+ if (aHasKey && !bHasKey || !aHasKey && bHasKey || !looseEqual(a[key], b[key], seen)) return false;
310
+ }
311
+ return String(a) === String(b);
312
+ }
313
+ function looseCompareNested(a, b, seen, compare) {
314
+ if (!seen) seen = [/* @__PURE__ */ new Map(), /* @__PURE__ */ new Map()];
315
+ const [seenA, seenB] = seen;
316
+ if (seenA.has(a) || seenB.has(b)) return seenA.get(a) === b && seenB.get(b) === a;
317
+ seenA.set(a, b);
318
+ seenB.set(b, a);
319
+ const equal = compare(a, b, seen);
320
+ seenA.delete(a);
321
+ seenB.delete(b);
322
+ return equal;
323
+ }
324
+ function looseEqual(a, b, seen) {
284
325
  if (a === b) return true;
285
326
  let aValidType = isDate(a);
286
327
  let bValidType = isDate(b);
@@ -290,17 +331,12 @@ var VueRuntimeDOM = (function(exports) {
290
331
  if (aValidType || bValidType) return a === b;
291
332
  aValidType = isArray(a);
292
333
  bValidType = isArray(b);
293
- if (aValidType || bValidType) return aValidType && bValidType ? looseCompareArrays(a, b) : false;
334
+ if (aValidType || bValidType) return aValidType && bValidType ? looseCompareNested(a, b, seen, looseCompareArrays) : false;
294
335
  aValidType = isObject(a);
295
336
  bValidType = isObject(b);
296
337
  if (aValidType || bValidType) {
297
338
  if (!aValidType || !bValidType) return false;
298
- if (Object.keys(a).length !== Object.keys(b).length) return false;
299
- for (const key in a) {
300
- const aHasKey = a.hasOwnProperty(key);
301
- const bHasKey = b.hasOwnProperty(key);
302
- if (aHasKey && !bHasKey || !aHasKey && bHasKey || !looseEqual(a[key], b[key])) return false;
303
- }
339
+ return looseCompareNested(a, b, seen, looseCompareObjects);
304
340
  }
305
341
  return String(a) === String(b);
306
342
  }
@@ -430,6 +466,8 @@ var VueRuntimeDOM = (function(exports) {
430
466
  function warn$2(msg, ...args) {
431
467
  console.warn(`[Vue warn] ${msg}`, ...args);
432
468
  }
469
+ //#endregion
470
+ //#region packages/reactivity/src/system.ts
433
471
  const notifyBuffer = [];
434
472
  let batchDepth = 0;
435
473
  let activeSub = void 0;
@@ -568,13 +606,23 @@ var VueRuntimeDOM = (function(exports) {
568
606
  sub.flags &= -5;
569
607
  }
570
608
  function flush() {
609
+ let hasError = false;
610
+ let error;
571
611
  while (notifyIndex < notifyBufferLength) {
572
612
  const effect = notifyBuffer[notifyIndex];
573
613
  notifyBuffer[notifyIndex++] = void 0;
574
- effect.notify();
614
+ try {
615
+ effect.notify();
616
+ } catch (err) {
617
+ if (!hasError) {
618
+ hasError = true;
619
+ error = err;
620
+ }
621
+ }
575
622
  }
576
623
  notifyIndex = 0;
577
624
  notifyBufferLength = 0;
625
+ if (hasError) throw error;
578
626
  }
579
627
  function checkDirty(link, sub) {
580
628
  let stack;
@@ -658,7 +706,7 @@ var VueRuntimeDOM = (function(exports) {
658
706
  }
659
707
  set subs(value) {
660
708
  this._subs = value;
661
- if (value === void 0) this.map.delete(this.key);
709
+ if (value === void 0 && this.map) this.map.delete(this.key);
662
710
  }
663
711
  };
664
712
  const targetMap = /* @__PURE__ */ new WeakMap();
@@ -741,9 +789,7 @@ var VueRuntimeDOM = (function(exports) {
741
789
  if (isMap(target)) run(depsMap.get(MAP_KEY_ITERATE_KEY));
742
790
  }
743
791
  break;
744
- case "set":
745
- if (isMap(target)) run(depsMap.get(ITERATE_KEY));
746
- break;
792
+ case "set": if (isMap(target)) run(depsMap.get(ITERATE_KEY));
747
793
  }
748
794
  }
749
795
  }
@@ -758,13 +804,17 @@ var VueRuntimeDOM = (function(exports) {
758
804
  /**
759
805
  * Track array iteration and return:
760
806
  * - if input is reactive: a cloned raw array with reactive values
761
- * - if input is non-reactive or shallowReactive: the original raw array
807
+ * - if input is readonly: a cloned raw array with readonly values, preserving
808
+ * reactivity
809
+ * - if input is raw or shallow: the original raw array
762
810
  */
763
811
  function reactiveReadArray(array) {
764
812
  const raw = /* @__PURE__ */ toRaw(array);
765
813
  if (raw === array) return raw;
766
814
  track(raw, "iterate", ARRAY_ITERATE_KEY);
767
- return /* @__PURE__ */ isShallow(array) ? raw : raw.map(toReactive);
815
+ if (/* @__PURE__ */ isShallow(array)) return raw;
816
+ if (!/* @__PURE__ */ isReadonly(array)) return raw.map(toReactive);
817
+ return /* @__PURE__ */ isReactive(array) ? raw.map((item) => toReadonly(toReactive(item))) : raw.map(toReadonly);
768
818
  }
769
819
  /**
770
820
  * Track array iteration and return raw array
@@ -940,8 +990,8 @@ var VueRuntimeDOM = (function(exports) {
940
990
  }
941
991
  //#endregion
942
992
  //#region packages/reactivity/src/baseHandlers.ts
943
- const isNonTrackableKeys = /* @__PURE__ */ makeMap(`__proto__,__v_isRef,__isVue`);
944
- const builtInSymbols = new Set(/* @__PURE__ */ Object.getOwnPropertyNames(Symbol).filter((key) => key !== "arguments" && key !== "caller").map((key) => Symbol[key]).filter(isSymbol));
993
+ const isNonTrackableKeys = /*@__PURE__*/ makeMap(`__proto__,__v_isRef,__isVue`);
994
+ const builtInSymbols = new Set(/*@__PURE__*/ Object.getOwnPropertyNames(Symbol).filter((key) => key !== "arguments" && key !== "caller").map((key) => Symbol[key]).filter(isSymbol));
945
995
  function hasOwnProperty(key) {
946
996
  if (!isSymbol(key)) key = String(key);
947
997
  const obj = /* @__PURE__ */ toRaw(this);
@@ -996,12 +1046,14 @@ var VueRuntimeDOM = (function(exports) {
996
1046
  oldValue = /* @__PURE__ */ toRaw(oldValue);
997
1047
  value = /* @__PURE__ */ toRaw(value);
998
1048
  }
999
- if (!isArrayWithIntegerKey && /* @__PURE__ */ isRef(oldValue) && !/* @__PURE__ */ isRef(value)) if (isOldValueReadonly) {
1000
- warn$2(`Set operation on key "${String(key)}" failed: target is readonly.`, target[key]);
1001
- return true;
1002
- } else {
1003
- oldValue.value = value;
1004
- return true;
1049
+ if (!isArrayWithIntegerKey && /* @__PURE__ */ isRef(oldValue) && !/* @__PURE__ */ isRef(value)) {
1050
+ if (isOldValueReadonly) {
1051
+ warn$2(`Set operation on key "${String(key)}" failed: target is readonly.`, target[key]);
1052
+ return true;
1053
+ } else {
1054
+ oldValue.value = value;
1055
+ return true;
1056
+ }
1005
1057
  }
1006
1058
  }
1007
1059
  const hadKey = isArrayWithIntegerKey ? Number(key) < target.length : hasOwn(target, key);
@@ -1042,10 +1094,10 @@ var VueRuntimeDOM = (function(exports) {
1042
1094
  return true;
1043
1095
  }
1044
1096
  };
1045
- const mutableHandlers = /* @__PURE__ */ new MutableReactiveHandler();
1046
- const readonlyHandlers = /* @__PURE__ */ new ReadonlyReactiveHandler();
1047
- const shallowReactiveHandlers = /* @__PURE__ */ new MutableReactiveHandler(true);
1048
- const shallowReadonlyHandlers = /* @__PURE__ */ new ReadonlyReactiveHandler(true);
1097
+ const mutableHandlers = /*@__PURE__*/ new MutableReactiveHandler();
1098
+ const readonlyHandlers = /*@__PURE__*/ new ReadonlyReactiveHandler();
1099
+ const shallowReactiveHandlers = /*@__PURE__*/ new MutableReactiveHandler(true);
1100
+ const shallowReadonlyHandlers = /*@__PURE__*/ new ReadonlyReactiveHandler(true);
1049
1101
  //#endregion
1050
1102
  //#region packages/reactivity/src/collectionHandlers.ts
1051
1103
  const toShallow = (value) => value;
@@ -1196,10 +1248,10 @@ var VueRuntimeDOM = (function(exports) {
1196
1248
  return Reflect.get(hasOwn(instrumentations, key) && key in target ? instrumentations : target, key, receiver);
1197
1249
  };
1198
1250
  }
1199
- const mutableCollectionHandlers = { get: /* @__PURE__ */ createInstrumentationGetter(false, false) };
1200
- const shallowCollectionHandlers = { get: /* @__PURE__ */ createInstrumentationGetter(false, true) };
1201
- const readonlyCollectionHandlers = { get: /* @__PURE__ */ createInstrumentationGetter(true, false) };
1202
- const shallowReadonlyCollectionHandlers = { get: /* @__PURE__ */ createInstrumentationGetter(true, true) };
1251
+ const mutableCollectionHandlers = { get: /*@__PURE__*/ createInstrumentationGetter(false, false) };
1252
+ const shallowCollectionHandlers = { get: /*@__PURE__*/ createInstrumentationGetter(false, true) };
1253
+ const readonlyCollectionHandlers = { get: /*@__PURE__*/ createInstrumentationGetter(true, false) };
1254
+ const shallowReadonlyCollectionHandlers = { get: /*@__PURE__*/ createInstrumentationGetter(true, true) };
1203
1255
  function checkIdentityKeys(target, has, key) {
1204
1256
  const rawKey = /* @__PURE__ */ toRaw(key);
1205
1257
  if (rawKey !== key && has.call(target, rawKey)) {
@@ -1224,7 +1276,7 @@ var VueRuntimeDOM = (function(exports) {
1224
1276
  default: return 0;
1225
1277
  }
1226
1278
  }
1227
- /* @__NO_SIDE_EFFECTS__ */
1279
+ /*@__NO_SIDE_EFFECTS__*/
1228
1280
  function reactive(target) {
1229
1281
  if (/* @__PURE__ */ isReadonly(target)) return target;
1230
1282
  return createReactiveObject(target, false, mutableHandlers, mutableCollectionHandlers, reactiveMap);
@@ -1259,7 +1311,7 @@ var VueRuntimeDOM = (function(exports) {
1259
1311
  * @param target - The source object.
1260
1312
  * @see {@link https://vuejs.org/api/reactivity-advanced.html#shallowreactive}
1261
1313
  */
1262
- /* @__NO_SIDE_EFFECTS__ */
1314
+ /*@__NO_SIDE_EFFECTS__*/
1263
1315
  function shallowReactive(target) {
1264
1316
  return createReactiveObject(target, false, shallowReactiveHandlers, shallowCollectionHandlers, shallowReactiveMap);
1265
1317
  }
@@ -1292,7 +1344,7 @@ var VueRuntimeDOM = (function(exports) {
1292
1344
  * @param target - The source object.
1293
1345
  * @see {@link https://vuejs.org/api/reactivity-core.html#readonly}
1294
1346
  */
1295
- /* @__NO_SIDE_EFFECTS__ */
1347
+ /*@__NO_SIDE_EFFECTS__*/
1296
1348
  function readonly(target) {
1297
1349
  return createReactiveObject(target, true, readonlyHandlers, readonlyCollectionHandlers, readonlyMap);
1298
1350
  }
@@ -1326,7 +1378,7 @@ var VueRuntimeDOM = (function(exports) {
1326
1378
  * @param target - The source object.
1327
1379
  * @see {@link https://vuejs.org/api/reactivity-advanced.html#shallowreadonly}
1328
1380
  */
1329
- /* @__NO_SIDE_EFFECTS__ */
1381
+ /*@__NO_SIDE_EFFECTS__*/
1330
1382
  function shallowReadonly(target) {
1331
1383
  return createReactiveObject(target, true, shallowReadonlyHandlers, shallowReadonlyCollectionHandlers, shallowReadonlyMap);
1332
1384
  }
@@ -1363,7 +1415,7 @@ var VueRuntimeDOM = (function(exports) {
1363
1415
  * @param value - The value to check.
1364
1416
  * @see {@link https://vuejs.org/api/reactivity-utilities.html#isreactive}
1365
1417
  */
1366
- /* @__NO_SIDE_EFFECTS__ */
1418
+ /*@__NO_SIDE_EFFECTS__*/
1367
1419
  function isReactive(value) {
1368
1420
  if (/* @__PURE__ */ isReadonly(value)) return /* @__PURE__ */ isReactive(value["__v_raw"]);
1369
1421
  return !!(value && value["__v_isReactive"]);
@@ -1379,11 +1431,11 @@ var VueRuntimeDOM = (function(exports) {
1379
1431
  * @param value - The value to check.
1380
1432
  * @see {@link https://vuejs.org/api/reactivity-utilities.html#isreadonly}
1381
1433
  */
1382
- /* @__NO_SIDE_EFFECTS__ */
1434
+ /*@__NO_SIDE_EFFECTS__*/
1383
1435
  function isReadonly(value) {
1384
1436
  return !!(value && value["__v_isReadonly"]);
1385
1437
  }
1386
- /* @__NO_SIDE_EFFECTS__ */
1438
+ /*@__NO_SIDE_EFFECTS__*/
1387
1439
  function isShallow(value) {
1388
1440
  return !!(value && value["__v_isShallow"]);
1389
1441
  }
@@ -1394,7 +1446,7 @@ var VueRuntimeDOM = (function(exports) {
1394
1446
  * @param value - The value to check.
1395
1447
  * @see {@link https://vuejs.org/api/reactivity-utilities.html#isproxy}
1396
1448
  */
1397
- /* @__NO_SIDE_EFFECTS__ */
1449
+ /*@__NO_SIDE_EFFECTS__*/
1398
1450
  function isProxy(value) {
1399
1451
  return value ? !!value["__v_raw"] : false;
1400
1452
  }
@@ -1421,7 +1473,7 @@ var VueRuntimeDOM = (function(exports) {
1421
1473
  * @param observed - The object for which the "raw" value is requested.
1422
1474
  * @see {@link https://vuejs.org/api/reactivity-advanced.html#toraw}
1423
1475
  */
1424
- /* @__NO_SIDE_EFFECTS__ */
1476
+ /*@__NO_SIDE_EFFECTS__*/
1425
1477
  function toRaw(observed) {
1426
1478
  const raw = observed && observed["__v_raw"];
1427
1479
  return raw ? /* @__PURE__ */ toRaw(raw) : observed;
@@ -1470,15 +1522,15 @@ var VueRuntimeDOM = (function(exports) {
1470
1522
  const toReadonly = (value) => isObject(value) ? /* @__PURE__ */ readonly(value) : value;
1471
1523
  //#endregion
1472
1524
  //#region packages/reactivity/src/ref.ts
1473
- /* @__NO_SIDE_EFFECTS__ */
1525
+ /*@__NO_SIDE_EFFECTS__*/
1474
1526
  function isRef(r) {
1475
1527
  return r ? r["__v_isRef"] === true : false;
1476
1528
  }
1477
- /* @__NO_SIDE_EFFECTS__ */
1529
+ /*@__NO_SIDE_EFFECTS__*/
1478
1530
  function ref(value) {
1479
1531
  return createRef(value, toReactive);
1480
1532
  }
1481
- /* @__NO_SIDE_EFFECTS__ */
1533
+ /*@__NO_SIDE_EFFECTS__*/
1482
1534
  function shallowRef(value) {
1483
1535
  return createRef(value);
1484
1536
  }
@@ -1681,7 +1733,7 @@ var VueRuntimeDOM = (function(exports) {
1681
1733
  * @param object - Reactive object to be made into an object of linked refs.
1682
1734
  * @see {@link https://vuejs.org/api/reactivity-utilities.html#torefs}
1683
1735
  */
1684
- /* @__NO_SIDE_EFFECTS__ */
1736
+ /*@__NO_SIDE_EFFECTS__*/
1685
1737
  function toRefs(object) {
1686
1738
  const ret = isArray(object) ? new Array(object.length) : {};
1687
1739
  for (const key in object) ret[key] = propertyToRef(object, key);
@@ -1732,7 +1784,7 @@ var VueRuntimeDOM = (function(exports) {
1732
1784
  return this._value = this._getter();
1733
1785
  }
1734
1786
  };
1735
- /* @__NO_SIDE_EFFECTS__ */
1787
+ /*@__NO_SIDE_EFFECTS__*/
1736
1788
  function toRef(source, key, defaultValue) {
1737
1789
  if (/* @__PURE__ */ isRef(source)) return source;
1738
1790
  else if (isFunction(source)) return new GetterRefImpl(source);
@@ -1798,10 +1850,12 @@ var VueRuntimeDOM = (function(exports) {
1798
1850
  get dirty() {
1799
1851
  const flags = this.flags;
1800
1852
  if (flags & 16) return true;
1801
- if (flags & 32) if (checkDirty(this.deps, this)) {
1802
- this.flags = flags | 16;
1803
- return true;
1804
- } else this.flags = flags & -33;
1853
+ if (flags & 32) {
1854
+ if (checkDirty(this.deps, this)) {
1855
+ this.flags = flags | 16;
1856
+ return true;
1857
+ } else this.flags = flags & -33;
1858
+ }
1805
1859
  return false;
1806
1860
  }
1807
1861
  };
@@ -1980,10 +2034,12 @@ var VueRuntimeDOM = (function(exports) {
1980
2034
  get _dirty() {
1981
2035
  const flags = this.flags;
1982
2036
  if (flags & 16) return true;
1983
- if (flags & 32) if (checkDirty(this.deps, this)) {
1984
- this.flags = flags | 16;
1985
- return true;
1986
- } else this.flags = flags & -33;
2037
+ if (flags & 32) {
2038
+ if (checkDirty(this.deps, this)) {
2039
+ this.flags = flags | 16;
2040
+ return true;
2041
+ } else this.flags = flags & -33;
2042
+ }
1987
2043
  return false;
1988
2044
  }
1989
2045
  /**
@@ -2044,7 +2100,7 @@ var VueRuntimeDOM = (function(exports) {
2044
2100
  }
2045
2101
  };
2046
2102
  setupOnTrigger(ComputedRefImpl);
2047
- /* @__NO_SIDE_EFFECTS__ */
2103
+ /*@__NO_SIDE_EFFECTS__*/
2048
2104
  function computed$1(getterOrOptions, debugOptions, isSSR = false) {
2049
2105
  let getter;
2050
2106
  let setter;
@@ -2122,25 +2178,26 @@ var VueRuntimeDOM = (function(exports) {
2122
2178
  else if (isFunction(s)) return call ? call(s, 2) : s();
2123
2179
  else warnInvalidSource(s, onWarn);
2124
2180
  });
2125
- } else if (isFunction(source)) if (cb) getter = call ? () => call(source, 2) : source;
2126
- else getter = () => {
2127
- if (this.cleanupsLength) {
2128
- const prevSub = setActiveSub();
2181
+ } else if (isFunction(source)) {
2182
+ if (cb) getter = call ? () => call(source, 2) : source;
2183
+ else getter = () => {
2184
+ if (this.cleanupsLength) {
2185
+ const prevSub = setActiveSub();
2186
+ try {
2187
+ cleanup(this);
2188
+ } finally {
2189
+ setActiveSub(prevSub);
2190
+ }
2191
+ }
2192
+ const currentEffect = activeWatcher;
2193
+ activeWatcher = this;
2129
2194
  try {
2130
- cleanup(this);
2195
+ return call ? call(source, 3, [this.boundCleanup]) : source(this.boundCleanup);
2131
2196
  } finally {
2132
- setActiveSub(prevSub);
2197
+ activeWatcher = currentEffect;
2133
2198
  }
2134
- }
2135
- const currentEffect = activeWatcher;
2136
- activeWatcher = this;
2137
- try {
2138
- return call ? call(source, 3, [this.boundCleanup]) : source(this.boundCleanup);
2139
- } finally {
2140
- activeWatcher = currentEffect;
2141
- }
2142
- };
2143
- else {
2199
+ };
2200
+ } else {
2144
2201
  getter = NOOP;
2145
2202
  warnInvalidSource(source, onWarn);
2146
2203
  }
@@ -2464,7 +2521,7 @@ var VueRuntimeDOM = (function(exports) {
2464
2521
  let jobsLength = 0;
2465
2522
  let flushIndex = 0;
2466
2523
  let postFlushIndex = 0;
2467
- const resolvedPromise = /* @__PURE__ */ Promise.resolve();
2524
+ const resolvedPromise = /*@__PURE__*/ Promise.resolve();
2468
2525
  const RECURSION_LIMIT = 100;
2469
2526
  function nextTick(fn) {
2470
2527
  const p = currentFlushPromise || resolvedPromise;
@@ -2503,6 +2560,7 @@ var VueRuntimeDOM = (function(exports) {
2503
2560
  flushJobs();
2504
2561
  } catch (e) {
2505
2562
  currentFlushPromise = null;
2563
+ if (jobsLength || postJobs.length) queueFlush();
2506
2564
  throw e;
2507
2565
  }
2508
2566
  };
@@ -2510,9 +2568,10 @@ var VueRuntimeDOM = (function(exports) {
2510
2568
  if (!currentFlushPromise) currentFlushPromise = resolvedPromise.then(doFlushJobs);
2511
2569
  }
2512
2570
  function queuePostFlushCb(jobs, id = Infinity) {
2513
- if (!isArray(jobs)) if (activePostJobs && id === -1) activePostJobs.splice(postFlushIndex, 0, jobs);
2514
- else queueJobWorker(jobs, id, postJobs, postJobs.length, 0);
2515
- else for (const job of jobs) queueJobWorker(job, id, postJobs, postJobs.length, 0);
2571
+ if (!isArray(jobs)) {
2572
+ if (activePostJobs && id === -1) activePostJobs.splice(postFlushIndex, 0, jobs);
2573
+ else queueJobWorker(jobs, id, postJobs, postJobs.length, 0);
2574
+ } else for (let i = 0; i < jobs.length; i++) queueJobWorker(jobs[i], id, postJobs, postJobs.length, 0);
2516
2575
  queueFlush();
2517
2576
  }
2518
2577
  function flushPreFlushCbs(instance, seen) {
@@ -2526,32 +2585,39 @@ var VueRuntimeDOM = (function(exports) {
2526
2585
  i--;
2527
2586
  jobsLength--;
2528
2587
  if (cb.flags & 2) cb.flags &= -2;
2529
- cb();
2530
- if (!(cb.flags & 2)) cb.flags &= -2;
2588
+ try {
2589
+ cb();
2590
+ } finally {
2591
+ if (!(cb.flags & 2)) cb.flags &= -2;
2592
+ }
2531
2593
  }
2532
2594
  }
2533
2595
  function flushPostFlushCbs(seen) {
2534
2596
  if (postJobs.length) {
2535
2597
  if (activePostJobs) {
2536
- activePostJobs.push(...postJobs);
2598
+ for (let i = 0; i < postJobs.length; i++) activePostJobs.push(postJobs[i]);
2537
2599
  postJobs.length = 0;
2538
2600
  return;
2539
2601
  }
2540
2602
  activePostJobs = postJobs;
2541
2603
  postJobs = [];
2542
2604
  seen = seen || /* @__PURE__ */ new Map();
2543
- while (postFlushIndex < activePostJobs.length) {
2544
- const cb = activePostJobs[postFlushIndex++];
2545
- if (checkRecursiveUpdates(seen, cb)) continue;
2546
- if (cb.flags & 2) cb.flags &= -2;
2547
- if (!(cb.flags & 4)) try {
2548
- cb();
2549
- } finally {
2550
- cb.flags &= -2;
2605
+ try {
2606
+ while (postFlushIndex < activePostJobs.length) {
2607
+ const cb = activePostJobs[postFlushIndex++];
2608
+ if (checkRecursiveUpdates(seen, cb)) continue;
2609
+ if (cb.flags & 2) cb.flags &= -2;
2610
+ if (!(cb.flags & 4)) try {
2611
+ cb();
2612
+ } finally {
2613
+ if (!(cb.flags & 2)) cb.flags &= -2;
2614
+ }
2551
2615
  }
2616
+ } finally {
2617
+ while (postFlushIndex < activePostJobs.length) activePostJobs[postFlushIndex++].flags &= -2;
2618
+ activePostJobs = null;
2619
+ postFlushIndex = 0;
2552
2620
  }
2553
- activePostJobs = null;
2554
- postFlushIndex = 0;
2555
2621
  }
2556
2622
  }
2557
2623
  let isFlushing = false;
@@ -2561,9 +2627,12 @@ var VueRuntimeDOM = (function(exports) {
2561
2627
  function flushOnAppMount(instance) {
2562
2628
  if (!isFlushing) {
2563
2629
  isFlushing = true;
2564
- flushPreFlushCbs(instance);
2565
- flushPostFlushCbs();
2566
- isFlushing = false;
2630
+ try {
2631
+ flushPreFlushCbs(instance);
2632
+ flushPostFlushCbs();
2633
+ } finally {
2634
+ isFlushing = false;
2635
+ }
2567
2636
  }
2568
2637
  }
2569
2638
  function flushJobs(seen) {
@@ -2593,8 +2662,8 @@ var VueRuntimeDOM = (function(exports) {
2593
2662
  jobsLength = 0;
2594
2663
  jobs.length = 0;
2595
2664
  flushPostFlushCbs(seen);
2596
- currentFlushPromise = null;
2597
2665
  if (jobsLength || postJobs.length) flushJobs(seen);
2666
+ else currentFlushPromise = null;
2598
2667
  }
2599
2668
  }
2600
2669
  function checkRecursiveUpdates(seen, fn) {
@@ -2625,6 +2694,19 @@ var VueRuntimeDOM = (function(exports) {
2625
2694
  rerender: tryWrap(rerender),
2626
2695
  reload: tryWrap(reload)
2627
2696
  };
2697
+ function runWithHmrUpdating(fn) {
2698
+ isHmrUpdating = true;
2699
+ let done = false;
2700
+ try {
2701
+ fn();
2702
+ done = true;
2703
+ } finally {
2704
+ if (done) nextTick(() => {
2705
+ isHmrUpdating = false;
2706
+ });
2707
+ else isHmrUpdating = false;
2708
+ }
2709
+ }
2628
2710
  const map = /* @__PURE__ */ new Map();
2629
2711
  function registerHMR(instance) {
2630
2712
  const id = instance.type.__hmrId;
@@ -2666,18 +2748,16 @@ var VueRuntimeDOM = (function(exports) {
2666
2748
  instance.render = newRender;
2667
2749
  normalizeClassComponent(instance.type).render = newRender;
2668
2750
  }
2669
- isHmrUpdating = true;
2670
- if (instance.vapor) {
2671
- if (!instance.isUnmounted) instance.hmrRerender();
2672
- } else {
2673
- const i = instance;
2674
- if (!(i.effect.flags & 1024)) {
2675
- i.renderCache = [];
2676
- i.effect.run();
2751
+ runWithHmrUpdating(() => {
2752
+ if (instance.vapor) {
2753
+ if (!instance.isUnmounted) instance.hmrRerender();
2754
+ } else {
2755
+ const i = instance;
2756
+ if (!(i.effect.flags & 1024)) {
2757
+ i.renderCache = [];
2758
+ i.effect.run();
2759
+ }
2677
2760
  }
2678
- }
2679
- nextTick(() => {
2680
- isHmrUpdating = false;
2681
2761
  });
2682
2762
  });
2683
2763
  }
@@ -2692,17 +2772,19 @@ var VueRuntimeDOM = (function(exports) {
2692
2772
  for (const instance of instances) if (instance.root && instance.root.ce && instance !== instance.root) instance.root.ce._removeChildStyle(instance.type);
2693
2773
  const dirtyInstances = new Set(instances);
2694
2774
  const rerenderedParents = /* @__PURE__ */ new Set();
2695
- for (const instance of instances) {
2696
- const parent = instance.parent;
2697
- if (parent) {
2698
- if (!hasDirtyAncestor(instance, dirtyInstances) && !rerenderedParents.has(parent)) {
2699
- rerenderedParents.add(parent);
2700
- parent.hmrRerender();
2701
- }
2702
- } else instance.hmrReload(newComp);
2703
- }
2775
+ runWithHmrUpdating(() => {
2776
+ for (const instance of instances) {
2777
+ const parent = instance.parent;
2778
+ if (parent) {
2779
+ if (!hasDirtyAncestor(instance, dirtyInstances) && !rerenderedParents.has(parent)) {
2780
+ rerenderedParents.add(parent);
2781
+ parent.hmrRerender();
2782
+ }
2783
+ } else instance.hmrReload(newComp);
2784
+ }
2785
+ });
2704
2786
  } else {
2705
- const parentUpdates = /* @__PURE__ */ new Map();
2787
+ const parents = /* @__PURE__ */ new Set();
2706
2788
  const dirtyInstanceSet = new Set(instances);
2707
2789
  for (const instance of instances) {
2708
2790
  const oldComp = normalizeClassComponent(instance.type);
@@ -2721,33 +2803,23 @@ var VueRuntimeDOM = (function(exports) {
2721
2803
  instance.ceReload(newComp.styles);
2722
2804
  dirtyInstances.delete(instance);
2723
2805
  } else if (instance.parent) {
2724
- const parent = instance.parent;
2725
- if (!hasDirtyAncestor(instance, dirtyInstanceSet)) {
2726
- let updates = parentUpdates.get(parent);
2727
- if (!updates) parentUpdates.set(parent, updates = []);
2728
- updates.push([instance, dirtyInstances]);
2729
- }
2806
+ if (!hasDirtyAncestor(instance, dirtyInstanceSet)) parents.add(instance.parent);
2730
2807
  } else if (instance.appContext.reload) instance.appContext.reload();
2731
2808
  else if (typeof window !== "undefined") window.location.reload();
2732
2809
  else console.warn("[HMR] Root or manually mounted instance modified. Full reload required.");
2733
2810
  if (instance.root.ce && instance !== instance.root) instance.root.ce._removeChildStyle(oldComp);
2734
2811
  }
2735
- parentUpdates.forEach((updates, parent) => {
2812
+ parents.forEach((parent) => {
2736
2813
  queueJob(() => {
2737
- isHmrUpdating = true;
2738
- if (parent.vapor) parent.hmrRerender();
2739
- else {
2740
- const i = parent;
2741
- if (!(i.effect.flags & 1024)) {
2742
- i.renderCache = [];
2743
- i.effect.run();
2814
+ runWithHmrUpdating(() => {
2815
+ if (parent.vapor) parent.hmrRerender();
2816
+ else {
2817
+ const i = parent;
2818
+ if (!(i.effect.flags & 1024)) {
2819
+ i.renderCache = [];
2820
+ i.effect.run();
2821
+ }
2744
2822
  }
2745
- }
2746
- nextTick(() => {
2747
- isHmrUpdating = false;
2748
- });
2749
- updates.forEach(([instance, dirtyInstances]) => {
2750
- dirtyInstances.delete(instance);
2751
2823
  });
2752
2824
  });
2753
2825
  });
@@ -2817,20 +2889,20 @@ var VueRuntimeDOM = (function(exports) {
2817
2889
  function devtoolsUnmountApp(app) {
2818
2890
  emit$1("app:unmount", app);
2819
2891
  }
2820
- const devtoolsComponentAdded = /* @__PURE__ */ createDevtoolsComponentHook("component:added");
2821
- const devtoolsComponentUpdated = /* @__PURE__ */ createDevtoolsComponentHook("component:updated");
2822
- const _devtoolsComponentRemoved = /* @__PURE__ */ createDevtoolsComponentHook("component:removed");
2892
+ const devtoolsComponentAdded = /*@__PURE__*/ createDevtoolsComponentHook("component:added");
2893
+ const devtoolsComponentUpdated = /*@__PURE__*/ createDevtoolsComponentHook("component:updated");
2894
+ const _devtoolsComponentRemoved = /*@__PURE__*/ createDevtoolsComponentHook("component:removed");
2823
2895
  const devtoolsComponentRemoved = (component) => {
2824
2896
  if (devtools$1 && typeof devtools$1.cleanupBuffer === "function" && !devtools$1.cleanupBuffer(component)) _devtoolsComponentRemoved(component);
2825
2897
  };
2826
- /* @__NO_SIDE_EFFECTS__ */
2898
+ /*@__NO_SIDE_EFFECTS__*/
2827
2899
  function createDevtoolsComponentHook(hook) {
2828
2900
  return (component) => {
2829
2901
  emit$1(hook, component.appContext.app, component.uid, component.parent ? component.parent.uid : void 0, component);
2830
2902
  };
2831
2903
  }
2832
- const devtoolsPerfStart = /* @__PURE__ */ createDevtoolsPerformanceHook("perf:start");
2833
- const devtoolsPerfEnd = /* @__PURE__ */ createDevtoolsPerformanceHook("perf:end");
2904
+ const devtoolsPerfStart = /*@__PURE__*/ createDevtoolsPerformanceHook("perf:start");
2905
+ const devtoolsPerfEnd = /*@__PURE__*/ createDevtoolsPerformanceHook("perf:end");
2834
2906
  function createDevtoolsPerformanceHook(hook) {
2835
2907
  return (component, type, time) => {
2836
2908
  emit$1(hook, component.appContext.app, component.uid, component, type, time);
@@ -3069,7 +3141,7 @@ var VueRuntimeDOM = (function(exports) {
3069
3141
  }
3070
3142
  const prev = setCurrentInstance(this);
3071
3143
  const res = doWatch(getter, cb.bind(publicThis), options);
3072
- setCurrentInstance(...prev);
3144
+ restoreCurrentInstance(prev);
3073
3145
  return res;
3074
3146
  }
3075
3147
  function createPathGetter(ctx, path) {
@@ -3091,15 +3163,16 @@ var VueRuntimeDOM = (function(exports) {
3091
3163
  const isTargetMathML = (target) => typeof MathMLElement === "function" && target instanceof MathMLElement;
3092
3164
  const resolveTarget = (props, select) => {
3093
3165
  const targetSelector = props && props.to;
3094
- if (isString(targetSelector)) if (!select) {
3095
- warn$1("Current renderer does not support string target for Teleports. (missing querySelector renderer option)");
3096
- return null;
3166
+ if (isString(targetSelector)) {
3167
+ if (!select) {
3168
+ warn$1("Current renderer does not support string target for Teleports. (missing querySelector renderer option)");
3169
+ return null;
3170
+ } else {
3171
+ const target = select(targetSelector);
3172
+ if (!target && !isTeleportDisabled(props)) warn$1(`Failed to locate Teleport target with selector "${targetSelector}". Note the target element must exist before the component is mounted - i.e. the target cannot be rendered by the component itself, and ideally should be outside of the entire Vue component tree.`);
3173
+ return target;
3174
+ }
3097
3175
  } else {
3098
- const target = select(targetSelector);
3099
- if (!target && !isTeleportDisabled(props)) warn$1(`Failed to locate Teleport target with selector "${targetSelector}". Note the target element must exist before the component is mounted - i.e. the target cannot be rendered by the component itself, and ideally should be outside of the entire Vue component tree.`);
3100
- return target;
3101
- }
3102
- else {
3103
3176
  if (!targetSelector && !isTeleportDisabled(props)) warn$1(`Invalid Teleport target: ${targetSelector}`);
3104
3177
  return targetSelector;
3105
3178
  }
@@ -3137,7 +3210,8 @@ var VueRuntimeDOM = (function(exports) {
3137
3210
  if (pendingMounts.get(vnode) !== mountJob) return;
3138
3211
  pendingMounts.delete(vnode);
3139
3212
  if (isTeleportDisabled(vnode.props)) {
3140
- mount(vnode, parentNode(vnode.el) || container, vnode.anchor);
3213
+ const mountContainer = parentNode(vnode.el) || container;
3214
+ mount(vnode, mountContainer, vnode.anchor);
3141
3215
  updateCssVars(vnode, true);
3142
3216
  }
3143
3217
  mountToTarget(vnode);
@@ -3246,15 +3320,17 @@ var VueRuntimeDOM = (function(exports) {
3246
3320
  const disabled = isTeleportDisabled(vnode.props);
3247
3321
  if (target) {
3248
3322
  const targetNode = target._lpa || target.firstChild;
3249
- if (vnode.shapeFlag & 16) if (disabled) {
3250
- hydrateDisabledTeleport(node, vnode);
3251
- hydrateAnchor(target, targetNode);
3252
- if (!vnode.targetAnchor) prepareAnchor(target, vnode, createText, insert, parentNode(node) === target ? node : null);
3253
- } else {
3254
- vnode.anchor = nextSibling(node);
3255
- hydrateAnchor(target, targetNode);
3256
- if (!vnode.targetAnchor) prepareAnchor(target, vnode, createText, insert);
3257
- hydrateChildren(targetNode && nextSibling(targetNode), vnode, target, parentComponent, parentSuspense, slotScopeIds, optimized);
3323
+ if (vnode.shapeFlag & 16) {
3324
+ if (disabled) {
3325
+ hydrateDisabledTeleport(node, vnode);
3326
+ hydrateAnchor(target, targetNode);
3327
+ if (!vnode.targetAnchor) prepareAnchor(target, vnode, createText, insert, parentNode(node) === target ? node : null);
3328
+ } else {
3329
+ vnode.anchor = nextSibling(node);
3330
+ hydrateAnchor(target, targetNode);
3331
+ if (!vnode.targetAnchor) prepareAnchor(target, vnode, createText, insert);
3332
+ hydrateChildren(targetNode && nextSibling(targetNode), vnode, target, parentComponent, parentSuspense, slotScopeIds, optimized);
3333
+ }
3258
3334
  }
3259
3335
  updateCssVars(vnode, disabled);
3260
3336
  } else if (disabled) {
@@ -3342,49 +3418,16 @@ var VueRuntimeDOM = (function(exports) {
3342
3418
  setup(props, { slots }) {
3343
3419
  const instance = getCurrentInstance();
3344
3420
  const state = useTransitionState();
3421
+ let resumeAfterLeave;
3345
3422
  return () => {
3346
- const children = slots.default && getTransitionRawChildren(slots.default(), true);
3347
- const child = children && children.length ? findNonCommentChild(children) : instance.subTree ? createCommentVNode() : void 0;
3423
+ const child = resolveTransitionChild(slots.default && slots.default(), !!instance.subTree);
3348
3424
  if (!child) return;
3349
3425
  const rawProps = /* @__PURE__ */ toRaw(props);
3350
3426
  const { mode } = rawProps;
3351
3427
  checkTransitionMode(mode);
3352
- if (state.isLeaving) return emptyPlaceholder(child);
3353
- const innerChild = getInnerChild$1(child);
3354
- if (!innerChild) return emptyPlaceholder(child);
3355
- let enterHooks = resolveTransitionHooks(innerChild, rawProps, state, instance, (hooks) => enterHooks = hooks);
3356
- if (innerChild.type !== Comment) setTransitionHooks(innerChild, enterHooks);
3357
- let oldInnerChild = instance.subTree && getInnerChild$1(instance.subTree);
3358
- if (oldInnerChild && oldInnerChild.type !== Comment && !isSameVNodeType(oldInnerChild, innerChild) && recursiveGetSubtree(instance).type !== Comment) {
3359
- let leavingHooks = resolveTransitionHooks(oldInnerChild, rawProps, state, instance);
3360
- setTransitionHooks(oldInnerChild, leavingHooks);
3361
- if (mode === "out-in" && innerChild.type !== Comment) {
3362
- state.isLeaving = true;
3363
- leavingHooks.afterLeave = () => {
3364
- state.isLeaving = false;
3365
- if (!(instance.job.flags & 4)) instance.update();
3366
- delete leavingHooks.afterLeave;
3367
- oldInnerChild = void 0;
3368
- };
3369
- return emptyPlaceholder(child);
3370
- } else if (mode === "in-out" && innerChild.type !== Comment) leavingHooks.delayLeave = (el, earlyRemove, delayedLeave) => {
3371
- const leavingVNodesCache = getLeavingNodesForType(state, oldInnerChild);
3372
- leavingVNodesCache[String(oldInnerChild.key)] = oldInnerChild;
3373
- el[leaveCbKey] = () => {
3374
- earlyRemove();
3375
- el[leaveCbKey] = void 0;
3376
- delete enterHooks.delayedLeave;
3377
- oldInnerChild = void 0;
3378
- };
3379
- enterHooks.delayedLeave = () => {
3380
- delayedLeave();
3381
- delete enterHooks.delayedLeave;
3382
- oldInnerChild = void 0;
3383
- };
3384
- };
3385
- else oldInnerChild = void 0;
3386
- } else if (oldInnerChild) oldInnerChild = void 0;
3387
- return child;
3428
+ return prepareTransitionSwitch(instance.subTree, child, rawProps, state, instance, mode === "out-in" ? resumeAfterLeave || (resumeAfterLeave = () => {
3429
+ if (!(instance.job.flags & 4)) instance.update();
3430
+ }) : NOOP);
3388
3431
  };
3389
3432
  }
3390
3433
  };
@@ -3453,8 +3496,10 @@ var VueRuntimeDOM = (function(exports) {
3453
3496
  persisted,
3454
3497
  beforeEnter(el) {
3455
3498
  let hook = onBeforeEnter;
3456
- if (!state.isMounted) if (appear) hook = onBeforeAppear || onBeforeEnter;
3457
- else return;
3499
+ if (!state.isMounted) {
3500
+ if (appear) hook = onBeforeAppear || onBeforeEnter;
3501
+ else return;
3502
+ }
3458
3503
  if (el[leaveCbKey]) el[leaveCbKey](true);
3459
3504
  earlyRemove();
3460
3505
  callHook(hook, [el]);
@@ -3464,11 +3509,13 @@ var VueRuntimeDOM = (function(exports) {
3464
3509
  let hook = onEnter;
3465
3510
  let afterHook = onAfterEnter;
3466
3511
  let cancelHook = onEnterCancelled;
3467
- if (!state.isMounted) if (appear) {
3468
- hook = onAppear || onEnter;
3469
- afterHook = onAfterAppear || onAfterEnter;
3470
- cancelHook = onAppearCancelled || onEnterCancelled;
3471
- } else return;
3512
+ if (!state.isMounted) {
3513
+ if (appear) {
3514
+ hook = onAppear || onEnter;
3515
+ afterHook = onAfterAppear || onAfterEnter;
3516
+ cancelHook = onAppearCancelled || onEnterCancelled;
3517
+ } else return;
3518
+ }
3472
3519
  let called = false;
3473
3520
  el[enterCbKey$1] = (cancelled) => {
3474
3521
  if (called) return;
@@ -3502,7 +3549,7 @@ var VueRuntimeDOM = (function(exports) {
3502
3549
  else done();
3503
3550
  },
3504
3551
  clone(node) {
3505
- return cloneHooks(node);
3552
+ return cloneHooks ? cloneHooks(node) : hooks;
3506
3553
  }
3507
3554
  };
3508
3555
  return hooks;
@@ -3526,16 +3573,91 @@ var VueRuntimeDOM = (function(exports) {
3526
3573
  if (shapeFlag & 32 && isFunction(children.default)) return children.default();
3527
3574
  }
3528
3575
  }
3576
+ function resolveTransitionChild(children, renderEmpty = false) {
3577
+ const branches = children && getTransitionRawChildren(children, true);
3578
+ return branches && branches.length ? findNonCommentChild(branches) : renderEmpty ? createCommentVNode() : void 0;
3579
+ }
3580
+ /**
3581
+ * @internal
3582
+ */
3583
+ function prepareTransitionSwitch(previous, next, props, state, instance, resumeAfterLeave, delayedLeaveSource) {
3584
+ if (state.isLeaving) return emptyPlaceholder(next);
3585
+ const nextInner = getInnerChild$1(next);
3586
+ if (!nextInner) return emptyPlaceholder(next);
3587
+ let enterHooks = resolveTransitionHooks(nextInner, props, state, instance, (hooks) => {
3588
+ if (delayedLeaveSource) forwardDelayedLeave(hooks, delayedLeaveSource);
3589
+ enterHooks = hooks;
3590
+ });
3591
+ if (delayedLeaveSource) forwardDelayedLeave(enterHooks, delayedLeaveSource);
3592
+ if (nextInner.type !== Comment) setTransitionHooks(nextInner, enterHooks);
3593
+ const mode = props.mode;
3594
+ const previousInner = previous && getInnerChild$1(previous);
3595
+ if (previous && previousInner && previousInner.type !== Comment && !isSameVNodeType(previousInner, nextInner) && (!previous.component || recursiveGetSubtree(previous.component).type !== Comment)) {
3596
+ const leavingHooks = prepareLeavingTransitionHooks(previousInner, props, state, instance);
3597
+ if (nextInner.type !== Comment && (mode === "out-in" || mode === "in-out") && applyTransitionModeSwitch(previousInner, leavingHooks, mode === "in-out" ? () => enterHooks : void 0, props, state, resumeAfterLeave)) return emptyPlaceholder(next);
3598
+ }
3599
+ return next;
3600
+ }
3601
+ function forwardDelayedLeave(hooks, source) {
3602
+ const delayedLeave = source && source.delayedLeave;
3603
+ if (!delayedLeave) return;
3604
+ hooks.delayedLeave = () => {
3605
+ if (source.delayedLeave === delayedLeave) delayedLeave();
3606
+ delete hooks.delayedLeave;
3607
+ };
3608
+ }
3609
+ function prepareLeavingTransitionHooks(previousInner, props, state, instance) {
3610
+ return setTransitionHooks(previousInner, resolveTransitionHooks(previousInner, props, state, instance));
3611
+ }
3612
+ function applyTransitionModeSwitch(leavingVNode, leavingHooks, getEnterHooks, props, state, resumeAfterLeave) {
3613
+ if (props.mode === "out-in") {
3614
+ state.isLeaving = true;
3615
+ leavingHooks.afterLeave = () => {
3616
+ state.isLeaving = false;
3617
+ resumeAfterLeave();
3618
+ delete leavingHooks.afterLeave;
3619
+ };
3620
+ return true;
3621
+ } else if (props.mode === "in-out" && getEnterHooks) {
3622
+ let delayedLeavingVNode = leavingVNode;
3623
+ leavingHooks.delayLeave = (el, earlyRemove, delayedLeave) => {
3624
+ const enterHooks = getEnterHooks();
3625
+ if (!enterHooks) {
3626
+ delayedLeave();
3627
+ return;
3628
+ }
3629
+ const vnode = delayedLeavingVNode;
3630
+ const leavingVNodesCache = getLeavingNodesForType(state, vnode);
3631
+ leavingVNodesCache[String(vnode.key)] = vnode;
3632
+ el[leaveCbKey] = () => {
3633
+ earlyRemove();
3634
+ el[leaveCbKey] = void 0;
3635
+ delete enterHooks.delayedLeave;
3636
+ delayedLeavingVNode = void 0;
3637
+ };
3638
+ enterHooks.delayedLeave = () => {
3639
+ delayedLeave();
3640
+ delete enterHooks.delayedLeave;
3641
+ delayedLeavingVNode = void 0;
3642
+ };
3643
+ };
3644
+ }
3645
+ return false;
3646
+ }
3529
3647
  function setTransitionHooks(vnode, hooks) {
3530
- if (vnode.shapeFlag & 6 && vnode.component) if (isVaporComponent(vnode.type)) getVaporInterface(vnode.component, vnode).setTransitionHooks(vnode.component, hooks);
3531
- else {
3648
+ if (vnode.shapeFlag & 6 && vnode.component) {
3532
3649
  vnode.transition = hooks;
3533
- setTransitionHooks(vnode.component.subTree, hooks);
3534
- }
3535
- else if (vnode.shapeFlag & 128) {
3536
- vnode.ssContent.transition = hooks.clone(vnode.ssContent);
3537
- vnode.ssFallback.transition = hooks.clone(vnode.ssFallback);
3650
+ if (isVaporComponent(vnode.type)) getVaporInterface(vnode.component, vnode).setTransitionHooks(vnode.component, hooks);
3651
+ else {
3652
+ const subTree = vnode.component.subTree;
3653
+ return setTransitionHooks(isTeleport(subTree.type) ? getInnerChild$1(subTree) || subTree : subTree, hooks);
3654
+ }
3655
+ } else if (vnode.shapeFlag & 128) {
3656
+ const contentHooks = vnode.ssContent.transition = hooks.clone(vnode.ssContent);
3657
+ const fallbackHooks = vnode.ssFallback.transition = hooks.clone(vnode.ssFallback);
3658
+ return vnode.suspense && vnode.suspense.activeBranch === vnode.ssFallback ? fallbackHooks : contentHooks;
3538
3659
  } else vnode.transition = hooks;
3660
+ return hooks;
3539
3661
  }
3540
3662
  function getTransitionRawChildren(children, keepComment = false, parentKey) {
3541
3663
  let ret = [];
@@ -3559,9 +3681,9 @@ var VueRuntimeDOM = (function(exports) {
3559
3681
  }
3560
3682
  //#endregion
3561
3683
  //#region packages/runtime-core/src/apiDefineComponent.ts
3562
- /* @__NO_SIDE_EFFECTS__ */
3684
+ /*@__NO_SIDE_EFFECTS__*/
3563
3685
  function defineComponent(options, extraOptions) {
3564
- return isFunction(options) ? extend({ name: options.name }, extraOptions, { setup: options }) : options;
3686
+ return isFunction(options) ? /*@__PURE__*/ (() => extend({ name: options.name }, extraOptions, { setup: options }))() : options;
3565
3687
  }
3566
3688
  //#endregion
3567
3689
  //#region packages/runtime-core/src/helpers/useId.ts
@@ -3658,15 +3780,16 @@ var VueRuntimeDOM = (function(exports) {
3658
3780
  if (rawRef.f) {
3659
3781
  const existing = _isString ? canSetSetupRef(ref) ? setupState[ref] : refs[ref] : canSetRef(ref) || !rawRef.k ? ref.value : refs[rawRef.k];
3660
3782
  if (isUnmount) isArray(existing) && remove(existing, refValue);
3661
- else if (!isArray(existing)) if (_isString) {
3662
- refs[ref] = [refValue];
3663
- if (canSetSetupRef(ref)) setupState[ref] = refs[ref];
3664
- } else {
3665
- const newVal = [refValue];
3666
- if (canSetRef(ref, rawRef.k)) ref.value = newVal;
3667
- if (rawRef.k) refs[rawRef.k] = newVal;
3668
- }
3669
- else if (!existing.includes(refValue)) existing.push(refValue);
3783
+ else if (!isArray(existing)) {
3784
+ if (_isString) {
3785
+ refs[ref] = [refValue];
3786
+ if (canSetSetupRef(ref)) setupState[ref] = refs[ref];
3787
+ } else {
3788
+ const newVal = [refValue];
3789
+ if (canSetRef(ref, rawRef.k)) ref.value = newVal;
3790
+ if (rawRef.k) refs[rawRef.k] = newVal;
3791
+ }
3792
+ } else if (!existing.includes(refValue)) existing.push(refValue);
3670
3793
  } else if (_isString) {
3671
3794
  refs[ref] = value;
3672
3795
  if (canSetSetupRef(ref)) setupState[ref] = value;
@@ -3718,7 +3841,18 @@ var VueRuntimeDOM = (function(exports) {
3718
3841
  hasLoggedMismatchError = true;
3719
3842
  };
3720
3843
  const isSVGContainer = (container) => container.namespaceURI.includes("svg") && container.tagName !== "foreignObject";
3721
- const isMathMLContainer = (container) => container.namespaceURI.includes("MathML");
3844
+ const isMathMLContainer = (container) => {
3845
+ if (!container.namespaceURI.includes("MathML")) return false;
3846
+ if (container.tagName !== "annotation-xml") return true;
3847
+ const encoding = container.getAttribute("encoding");
3848
+ return !encoding || !encoding.includes("html");
3849
+ };
3850
+ /**
3851
+ * Resolve the element namespace a container's children should be created in.
3852
+ * The live DOM is the source of truth, so this also covers containers that are
3853
+ * only known at runtime (interop boundaries, teleport targets).
3854
+ * @internal
3855
+ */
3722
3856
  const getContainerType = (container) => {
3723
3857
  if (container.nodeType !== 1) return void 0;
3724
3858
  if (isSVGContainer(container)) return "svg";
@@ -3742,7 +3876,7 @@ var VueRuntimeDOM = (function(exports) {
3742
3876
  };
3743
3877
  const hydrateNode = (node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized = false) => {
3744
3878
  optimized = optimized || !!vnode.dynamicChildren;
3745
- const isFragmentStart = isComment(node) && node.data === "[";
3879
+ const isFragmentStart = isComment(node) && (node.data === "[" || node.data === "(");
3746
3880
  const onMismatch = () => handleMismatch(node, vnode, parentComponent, parentSuspense, slotScopeIds, isFragmentStart);
3747
3881
  const { type, ref, shapeFlag, patchFlag } = vnode;
3748
3882
  let domType = node.nodeType;
@@ -3756,11 +3890,12 @@ var VueRuntimeDOM = (function(exports) {
3756
3890
  let nextNode = null;
3757
3891
  switch (type) {
3758
3892
  case Text:
3759
- if (domType !== 3) if (vnode.children === "") {
3760
- insert(vnode.el = createText(""), parentNode(node), node);
3761
- nextNode = node;
3762
- } else nextNode = onMismatch();
3763
- else {
3893
+ if (domType !== 3) {
3894
+ if (vnode.children === "") {
3895
+ insert(vnode.el = createText(""), parentNode(node), node);
3896
+ nextNode = node;
3897
+ } else nextNode = onMismatch();
3898
+ } else {
3764
3899
  if (node.data !== vnode.children) {
3765
3900
  warn$1(`Hydration text mismatch in`, node.parentNode, `\n - rendered on server: ${JSON.stringify(node.data)}\n - expected on client: ${JSON.stringify(vnode.children)}`);
3766
3901
  logMismatchError();
@@ -3797,45 +3932,35 @@ var VueRuntimeDOM = (function(exports) {
3797
3932
  else nextNode = hydrateFragment(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized);
3798
3933
  break;
3799
3934
  case VaporSlot:
3800
- nextNode = getVaporInterface(parentComponent, vnode).hydrateSlot(vnode, node, parentComponent, parentSuspense);
3935
+ nextNode = getVaporInterface(parentComponent, vnode).hydrateSlot(vnode, node, parentComponent, parentSuspense, slotScopeIds);
3801
3936
  break;
3802
- default: if (shapeFlag & 1) if ((domType !== 1 || vnode.type.toLowerCase() !== node.tagName.toLowerCase()) && !isTemplateNode(node)) nextNode = onMismatch();
3803
- else nextNode = hydrateElement(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized);
3804
- else if (shapeFlag & 6) {
3937
+ default: if (shapeFlag & 1) {
3938
+ if ((domType !== 1 || vnode.type.toLowerCase() !== node.tagName.toLowerCase()) && !isTemplateNode(node)) nextNode = onMismatch();
3939
+ else nextNode = hydrateElement(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized);
3940
+ } else if (shapeFlag & 6) {
3805
3941
  vnode.slotScopeIds = slotScopeIds;
3806
3942
  const container = parentNode(node);
3807
3943
  if (isFragmentStart) nextNode = locateClosingAnchor(node);
3808
3944
  else if (isComment(node) && node.data === "teleport start") nextNode = locateClosingAnchor(node, node.data, "teleport end");
3809
3945
  else nextNode = nextSibling(node);
3810
- if (vnode.type.__vapor) {
3811
- const vnodeBeforeMountHook = !isAsyncWrapper(vnode) && vnode.props && vnode.props.onVnodeBeforeMount;
3812
- getVaporInterface(parentComponent, vnode).hydrate(vnode, node, container, nextNode, parentComponent, parentSuspense, () => {
3813
- if (vnode.dirs) {
3814
- invokeDirectiveHook(vnode, null, parentComponent, "created");
3815
- invokeDirectiveHook(vnode, null, parentComponent, "beforeMount");
3816
- }
3817
- }, () => {
3818
- if (vnodeBeforeMountHook) invokeVNodeHook(vnodeBeforeMountHook, parentComponent, vnode);
3819
- });
3820
- if (vnode.dirs) queueEffectWithSuspense(() => invokeDirectiveHook(vnode, null, parentComponent, "mounted"), void 0, parentSuspense);
3821
- const vnodeMountedHook = !isAsyncWrapper(vnode) && vnode.props && vnode.props.onVnodeMounted;
3822
- if (vnodeMountedHook) queueEffectWithSuspense(() => invokeVNodeHook(vnodeMountedHook, parentComponent, vnode), void 0, parentSuspense);
3823
- } else {
3946
+ if (vnode.type.__vapor) getVaporInterface(parentComponent, vnode).hydrate(vnode, node, container, nextNode, parentComponent, parentSuspense);
3947
+ else {
3824
3948
  mountComponent(vnode, container, null, parentComponent, parentSuspense, getContainerType(container), optimized);
3825
3949
  const component = vnode.component;
3826
- if (isAsyncWrapper(vnode) && !vnode.type.__asyncResolved || component.asyncDep && !component.asyncResolved) {
3950
+ if (!component.subTree && (isAsyncWrapper(vnode) || component.asyncDep)) {
3827
3951
  let subTree;
3828
3952
  if (isFragmentStart) {
3829
- subTree = createVNode(Fragment);
3953
+ subTree = createVNode(Static);
3830
3954
  subTree.anchor = nextNode ? nextNode.previousSibling : container.lastChild;
3831
- } else subTree = node.nodeType === 3 ? createTextVNode("") : createVNode("div");
3955
+ } else subTree = node.nodeType === 3 ? createTextVNode("") : createVNode(node.nodeType === 8 ? Comment : "div");
3832
3956
  subTree.el = node;
3833
3957
  component.subTree = subTree;
3834
3958
  }
3835
3959
  }
3836
- } else if (shapeFlag & 64) if (domType !== 8) nextNode = onMismatch();
3837
- else nextNode = vnode.type.hydrate(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized, rendererInternals, hydrateChildren);
3838
- else if (shapeFlag & 128) nextNode = vnode.type.hydrate(node, vnode, parentComponent, parentSuspense, getContainerType(parentNode(node)), slotScopeIds, optimized, rendererInternals, hydrateNode);
3960
+ } else if (shapeFlag & 64) {
3961
+ if (domType !== 8) nextNode = onMismatch();
3962
+ else nextNode = vnode.type.hydrate(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized, rendererInternals, hydrateChildren);
3963
+ } else if (shapeFlag & 128) nextNode = vnode.type.hydrate(node, vnode, parentComponent, parentSuspense, getContainerType(parentNode(node)), slotScopeIds, optimized, rendererInternals, hydrateNode);
3839
3964
  else warn$1("Invalid HostVNode type:", type, `(${typeof type})`);
3840
3965
  }
3841
3966
  if (ref != null) setRef(ref, null, parentSuspense, vnode);
@@ -3887,7 +4012,10 @@ var VueRuntimeDOM = (function(exports) {
3887
4012
  const namespace = el.namespaceURI.includes("svg") ? "svg" : el.namespaceURI.includes("MathML") ? "mathml" : void 0;
3888
4013
  for (const key in props) {
3889
4014
  if (!(dirs && dirs.some((d) => d.dir.created)) && propHasMismatch(el, key, props[key], vnode, parentComponent)) logMismatchError();
3890
- if (forcePatch && (key.endsWith("value") || key === "indeterminate") || isOn(key) && !isReservedProp(key) || key[0] === "." || isCustomElement && !isReservedProp(key) || dynamicProps && dynamicProps.includes(key)) patchProp(el, key, null, props[key], namespace, parentComponent);
4015
+ if (forcePatch && (key.endsWith("value") || key === "indeterminate") || isOn(key) && !isReservedProp(key) || key[0] === "." || isCustomElement && !isReservedProp(key) || dynamicProps && dynamicProps.includes(key)) {
4016
+ if (isUnchangedResourceProp(el, key, props[key])) continue;
4017
+ patchProp(el, key, null, props[key], namespace, parentComponent);
4018
+ }
3891
4019
  }
3892
4020
  }
3893
4021
  let vnodeHooks;
@@ -3935,8 +4063,9 @@ var VueRuntimeDOM = (function(exports) {
3935
4063
  const { slotScopeIds: fragmentSlotScopeIds } = vnode;
3936
4064
  if (fragmentSlotScopeIds) slotScopeIds = slotScopeIds ? slotScopeIds.concat(fragmentSlotScopeIds) : fragmentSlotScopeIds;
3937
4065
  const container = parentNode(node);
3938
- const next = hydrateChildren(nextSibling(node), vnode, container, parentComponent, parentSuspense, slotScopeIds, optimized);
3939
- if (next && isComment(next) && next.data === "]") return nextSibling(vnode.anchor = next);
4066
+ const first = nextSibling(node);
4067
+ const next = vnode.vo && node.data === "(" ? getVaporInterface(parentComponent, vnode).hydrateSlotOutlet(vnode, node, parentComponent, parentSuspense, slotScopeIds) : hydrateChildren(first, vnode, container, parentComponent, parentSuspense, slotScopeIds, optimized);
4068
+ if (next && isComment(next) && next.data === (node.data === "(" ? ")" : "]")) return nextSibling(vnode.anchor = next);
3940
4069
  else {
3941
4070
  logMismatchError();
3942
4071
  insert(vnode.anchor = createComment(`]`), container, next);
@@ -3945,7 +4074,7 @@ var VueRuntimeDOM = (function(exports) {
3945
4074
  };
3946
4075
  const handleMismatch = (node, vnode, parentComponent, parentSuspense, slotScopeIds, isFragment) => {
3947
4076
  if (!isNodeMismatchAllowed(node, vnode)) {
3948
- warn$1(`Hydration node mismatch:\n- rendered on server:`, node, node.nodeType === 3 ? `(text)` : isComment(node) && node.data === "[" ? `(start of fragment)` : ``, `\n- expected on client:`, vnode.type);
4077
+ warn$1(`Hydration node mismatch:\n- rendered on server:`, node, node.nodeType === 3 ? `(text)` : isComment(node) && (node.data === "[" || node.data === "(") ? `(start of fragment)` : ``, `\n- expected on client:`, vnode.type);
3949
4078
  logMismatchError();
3950
4079
  }
3951
4080
  vnode.el = null;
@@ -3961,20 +4090,22 @@ var VueRuntimeDOM = (function(exports) {
3961
4090
  const container = parentNode(node);
3962
4091
  remove(node);
3963
4092
  patch(null, vnode, container, next, parentComponent, parentSuspense, getContainerType(container), slotScopeIds);
3964
- if (parentComponent) {
4093
+ if (parentComponent && parentComponent.vnode) {
3965
4094
  parentComponent.vnode.el = vnode.el;
3966
4095
  updateHOCHostEl(parentComponent, vnode.el);
3967
4096
  }
3968
4097
  return next;
3969
4098
  };
3970
- const locateClosingAnchor = (node, open = "[", close = "]") => {
4099
+ const locateClosingAnchor = (node, open = node && isComment(node) && node.data === "(" ? "(" : "[", close = open === "(" ? ")" : "]") => {
3971
4100
  let match = 0;
3972
4101
  while (node) {
3973
4102
  node = nextSibling(node);
3974
4103
  if (node && isComment(node)) {
3975
4104
  if (node.data === open) match++;
3976
- if (node.data === close) if (match === 0) return nextSibling(node);
3977
- else match--;
4105
+ if (node.data === close) {
4106
+ if (match === 0) return nextSibling(node);
4107
+ else match--;
4108
+ }
3978
4109
  }
3979
4110
  }
3980
4111
  return node;
@@ -3984,7 +4115,7 @@ var VueRuntimeDOM = (function(exports) {
3984
4115
  if (parentNode) parentNode.replaceChild(newNode, oldNode);
3985
4116
  let parent = parentComponent;
3986
4117
  while (parent) {
3987
- if (parent.vnode.el === oldNode) parent.vnode.el = parent.subTree.el = newNode;
4118
+ if (parent.vnode && parent.vnode.el === oldNode) parent.vnode.el = parent.subTree.el = newNode;
3988
4119
  parent = parent.parent;
3989
4120
  }
3990
4121
  };
@@ -3993,6 +4124,16 @@ var VueRuntimeDOM = (function(exports) {
3993
4124
  const isTemplateNode = (node) => {
3994
4125
  return node.nodeType === 1 && node.tagName === "TEMPLATE";
3995
4126
  };
4127
+ const resourceProps = /*@__PURE__*/ new Set([
4128
+ "src",
4129
+ "srcset",
4130
+ "href",
4131
+ "poster"
4132
+ ]);
4133
+ function isUnchangedResourceProp(el, key, clientValue) {
4134
+ if (!resourceProps.has(key)) return false;
4135
+ return el.getAttribute(key) === (clientValue == null ? null : `${clientValue}`);
4136
+ }
3996
4137
  /**
3997
4138
  * Dev only
3998
4139
  */
@@ -4036,7 +4177,10 @@ var VueRuntimeDOM = (function(exports) {
4036
4177
  function getAttributeMismatch(el, key, clientValue) {
4037
4178
  let actual;
4038
4179
  let expected;
4039
- if (isBooleanAttr(key)) {
4180
+ if (key === "hidden") {
4181
+ actual = normalizeHiddenValue(el.getAttribute(key));
4182
+ expected = normalizeHiddenValue(clientValue);
4183
+ } else if (isBooleanAttr(key)) {
4040
4184
  actual = el.hasAttribute(key);
4041
4185
  expected = includeBooleanAttr(clientValue);
4042
4186
  } else if (clientValue == null) {
@@ -4064,6 +4208,11 @@ var VueRuntimeDOM = (function(exports) {
4064
4208
  }
4065
4209
  return false;
4066
4210
  }
4211
+ function normalizeHiddenValue(value) {
4212
+ if (!isRenderableAttrValue(value)) return false;
4213
+ if (isString(value)) return value.toLowerCase() === "until-found" ? "until-found" : "";
4214
+ return includeBooleanAttr(value) ? "" : false;
4215
+ }
4067
4216
  function toClassSet(str) {
4068
4217
  return new Set(str.trim().split(/\s+/));
4069
4218
  }
@@ -4202,16 +4351,18 @@ var VueRuntimeDOM = (function(exports) {
4202
4351
  return teardown;
4203
4352
  };
4204
4353
  function forEachElement(node, cb) {
4205
- if (isComment(node) && node.data === "[") {
4354
+ if (isComment(node) && (node.data === "[" || node.data === "(")) {
4355
+ const open = node.data;
4356
+ const close = open === "[" ? "]" : ")";
4206
4357
  let depth = 1;
4207
4358
  let next = node.nextSibling;
4208
4359
  while (next) {
4209
4360
  if (next.nodeType === 1) {
4210
4361
  if (cb(next) === false) break;
4211
4362
  } else if (isComment(next)) {
4212
- if (next.data === "]") {
4363
+ if (next.data === close) {
4213
4364
  if (--depth === 0) break;
4214
- } else if (next.data === "[") depth++;
4365
+ } else if (next.data === open) depth++;
4215
4366
  }
4216
4367
  next = next.nextSibling;
4217
4368
  }
@@ -4220,14 +4371,14 @@ var VueRuntimeDOM = (function(exports) {
4220
4371
  //#endregion
4221
4372
  //#region packages/runtime-core/src/apiAsyncComponent.ts
4222
4373
  const isAsyncWrapper = (i) => !!i.type.__asyncLoader;
4223
- /* @__NO_SIDE_EFFECTS__ */
4374
+ /*@__NO_SIDE_EFFECTS__*/
4224
4375
  function defineAsyncComponent(source) {
4225
4376
  const { load, getResolvedComp, setPendingRequest, source: { loadingComponent, errorComponent, delay, hydrate: hydrateStrategy, timeout, suspensible = true } } = createAsyncComponentContext(source);
4226
4377
  return /* @__PURE__ */ defineComponent({
4227
4378
  name: "AsyncComponentWrapper",
4228
4379
  __asyncLoader: load,
4229
4380
  __asyncHydrate(el, instance, hydrate) {
4230
- performAsyncHydrate(el, instance, hydrate, getResolvedComp, load, hydrateStrategy);
4381
+ performAsyncHydrate(el, instance, hydrate, getResolvedComp, load, hydrateStrategy, true);
4231
4382
  },
4232
4383
  get __asyncResolved() {
4233
4384
  return getResolvedComp();
@@ -4346,10 +4497,10 @@ var VueRuntimeDOM = (function(exports) {
4346
4497
  * shared between core and vapor
4347
4498
  * @internal
4348
4499
  */
4349
- function performAsyncHydrate(el, instance, hydrate, getResolvedComp, load, hydrateStrategy) {
4500
+ function performAsyncHydrate(el, instance, hydrate, getResolvedComp, load, hydrateStrategy, skipIfUpdated) {
4350
4501
  const wasConnected = el.isConnected;
4351
4502
  let patched = false;
4352
- (instance.bu || (instance.bu = [])).push(() => patched = true);
4503
+ if (skipIfUpdated) (instance.bu || (instance.bu = [])).push(() => patched = true);
4353
4504
  const performHydrate = () => {
4354
4505
  if (patched) {
4355
4506
  {
@@ -4435,10 +4586,13 @@ var VueRuntimeDOM = (function(exports) {
4435
4586
  });
4436
4587
  let pendingCacheKey = null;
4437
4588
  const cacheSubtree = () => {
4438
- if (pendingCacheKey != null) if (isSuspense(keepAliveInstance.subTree.type)) queuePostRenderEffect(() => {
4439
- cache.set(pendingCacheKey, getInnerChild(keepAliveInstance.subTree));
4440
- }, void 0, keepAliveInstance.subTree.suspense);
4441
- else cache.set(pendingCacheKey, getInnerChild(keepAliveInstance.subTree));
4589
+ if (pendingCacheKey != null) {
4590
+ if (isSuspense(keepAliveInstance.subTree.type)) queuePostRenderEffect(() => {
4591
+ const vnode = getInnerChild(keepAliveInstance.subTree);
4592
+ if (vnode.component) cache.set(pendingCacheKey, vnode);
4593
+ }, void 0, keepAliveInstance.subTree.suspense);
4594
+ else cache.set(pendingCacheKey, getInnerChild(keepAliveInstance.subTree));
4595
+ }
4442
4596
  };
4443
4597
  onMounted(cacheSubtree);
4444
4598
  onUpdated(cacheSubtree);
@@ -4595,7 +4749,7 @@ var VueRuntimeDOM = (function(exports) {
4595
4749
  try {
4596
4750
  return callWithAsyncErrorHandling(hook, target, type, args);
4597
4751
  } finally {
4598
- setCurrentInstance(...prev);
4752
+ restoreCurrentInstance(prev);
4599
4753
  setActiveSub(prevSub);
4600
4754
  }
4601
4755
  });
@@ -4680,23 +4834,25 @@ var VueRuntimeDOM = (function(exports) {
4680
4834
  }
4681
4835
  ret = new Array(source.length);
4682
4836
  for (let i = 0, l = source.length; i < l; i++) ret[i] = renderItem(needsWrap ? isReadonlySource ? toReadonly(toReactive(source[i])) : toReactive(source[i]) : source[i], i, void 0, cached && cached[i]);
4683
- } else if (typeof source === "number") if (!Number.isInteger(source) || source < 0) {
4684
- warn$1(`The v-for range expects a positive integer value but got ${source}.`);
4685
- ret = [];
4686
- } else {
4687
- ret = new Array(source);
4688
- for (let i = 0; i < source; i++) ret[i] = renderItem(i + 1, i, void 0, cached && cached[i]);
4689
- }
4690
- else if (isObject(source)) if (source[Symbol.iterator]) ret = Array.from(source, (item, i) => renderItem(item, i, void 0, cached && cached[i]));
4691
- else {
4692
- const keys = Object.keys(source);
4693
- ret = new Array(keys.length);
4694
- for (let i = 0, l = keys.length; i < l; i++) {
4695
- const key = keys[i];
4696
- ret[i] = renderItem(source[key], key, i, cached && cached[i]);
4837
+ } else if (typeof source === "number") {
4838
+ if (!Number.isInteger(source) || source < 0) {
4839
+ warn$1(`The v-for range expects a positive integer value but got ${source}.`);
4840
+ ret = [];
4841
+ } else {
4842
+ ret = new Array(source);
4843
+ for (let i = 0; i < source; i++) ret[i] = renderItem(i + 1, i, void 0, cached && cached[i]);
4697
4844
  }
4698
- }
4699
- else ret = [];
4845
+ } else if (isObject(source)) {
4846
+ if (source[Symbol.iterator]) ret = Array.from(source, (item, i) => renderItem(item, i, void 0, cached && cached[i]));
4847
+ else {
4848
+ const keys = Object.keys(source);
4849
+ ret = new Array(keys.length);
4850
+ for (let i = 0, l = keys.length; i < l; i++) {
4851
+ const key = keys[i];
4852
+ ret[i] = renderItem(source[key], key, i, cached && cached[i]);
4853
+ }
4854
+ }
4855
+ } else ret = [];
4700
4856
  if (cache) cache[index] = ret;
4701
4857
  return ret;
4702
4858
  }
@@ -4721,18 +4877,28 @@ var VueRuntimeDOM = (function(exports) {
4721
4877
  //#endregion
4722
4878
  //#region packages/runtime-core/src/helpers/renderSlot.ts
4723
4879
  /**
4880
+ * Links a slot function to its raw vapor slot: a raw vapor slot carries
4881
+ * itself, and the wrapper the interop slots proxy hands out carries the raw
4882
+ * slot it wraps — one lookup answers both "is this a vapor slot" and
4883
+ * "which one". Internal to vapor interop.
4884
+ */
4885
+ const rawVaporSlotKey = Symbol(`rawVaporSlot`);
4886
+ /**
4724
4887
  * Compiler runtime helper for rendering `<slot/>`
4725
4888
  * @private
4726
4889
  */
4727
- function renderSlot(slots, name, props = {}, fallback, noSlotted, branchKey) {
4890
+ function renderSlot(slots, name, props, fallback, noSlotted, branchKey) {
4891
+ if (props == null) props = {};
4728
4892
  let slot = slots[name];
4729
- if (fallback) fallback.__vdom = true;
4730
- const vaporSlot = slot && (slot.__vs || (slot.__vapor ? slot : null));
4893
+ const vaporSlot = slot && slot[rawVaporSlotKey];
4731
4894
  if (vaporSlot) {
4732
4895
  const ret = (openBlock(), createBlock(VaporSlot, props));
4733
4896
  ret.vs = {
4734
4897
  slot: vaporSlot,
4735
- fallback
4898
+ outlets: fallback ? [{
4899
+ fallback,
4900
+ owner: currentRenderingInstance
4901
+ }] : void 0
4736
4902
  };
4737
4903
  if (!noSlotted && ret.scopeId) ret.slotScopeIds = [ret.scopeId + "-s"];
4738
4904
  return ret;
@@ -4753,9 +4919,15 @@ var VueRuntimeDOM = (function(exports) {
4753
4919
  let rendered;
4754
4920
  try {
4755
4921
  const validSlotContent = slot && ensureValidVNode(slot(props));
4756
- ensureVaporSlotFallback(validSlotContent, fallback);
4922
+ let attached = false;
4923
+ if (fallback && validSlotContent && currentRenderingInstance) {
4924
+ const interop = currentRenderingInstance.appContext.vapor;
4925
+ if (interop) attached = interop.attachSlotOutlet(validSlotContent, fallback, currentRenderingInstance);
4926
+ }
4757
4927
  const slotKey = props.key || branchKey || validSlotContent && validSlotContent.key;
4758
4928
  rendered = createBlock(Fragment, { key: (slotKey && !isSymbol(slotKey) ? slotKey : `_${name}`) + (!validSlotContent && fallback ? "_fb" : "") }, validSlotContent || (fallback ? fallback() : []), validSlotContent && slots._ === 1 ? 64 : -2);
4929
+ if (!validSlotContent && fallback) rendered.shapeFlag |= 1024;
4930
+ if (attached) rendered.vo = true;
4759
4931
  } catch (err) {
4760
4932
  for (let i = blockStack.length; i > prevStackSize; i--) closeBlock();
4761
4933
  throw err;
@@ -4773,10 +4945,6 @@ var VueRuntimeDOM = (function(exports) {
4773
4945
  return true;
4774
4946
  }) ? vnodes : null;
4775
4947
  }
4776
- function ensureVaporSlotFallback(vnodes, fallback) {
4777
- let vaporSlot;
4778
- if (vnodes && vnodes.length === 1 && isVNode(vnodes[0]) && (vaporSlot = vnodes[0].vs)) vaporSlot.outletFallback = fallback;
4779
- }
4780
4948
  //#endregion
4781
4949
  //#region packages/runtime-core/src/helpers/toHandlers.ts
4782
4950
  /**
@@ -4804,11 +4972,38 @@ var VueRuntimeDOM = (function(exports) {
4804
4972
  if (isStatefulComponent(i)) return getComponentPublicInstance(i);
4805
4973
  return getPublicInstance(i.parent);
4806
4974
  };
4975
+ const resolveDevRootEl = (vnode) => {
4976
+ let found = false;
4977
+ while (true) {
4978
+ if (vnode.patchFlag > 0 && vnode.patchFlag & 2048) {
4979
+ const root = filterSingleRoot(vnode.children);
4980
+ if (!root) return;
4981
+ vnode = root;
4982
+ found = true;
4983
+ continue;
4984
+ }
4985
+ const component = vnode.component;
4986
+ if (component && component.subTree) {
4987
+ vnode = component.subTree;
4988
+ continue;
4989
+ }
4990
+ const suspense = vnode.suspense;
4991
+ if (suspense && suspense.activeBranch) {
4992
+ vnode = suspense.activeBranch;
4993
+ continue;
4994
+ }
4995
+ return found ? vnode.el : void 0;
4996
+ }
4997
+ };
4998
+ const getDevRootFragmentEl = (i) => {
4999
+ const el = i.subTree && resolveDevRootEl(i.subTree);
5000
+ return el === void 0 ? i.vnode.el : el;
5001
+ };
4807
5002
  let publicPropertiesMap;
4808
5003
  const getPublicPropertiesMap = () => {
4809
5004
  if (!publicPropertiesMap) publicPropertiesMap = extend(Object.create(null), {
4810
5005
  $: (i) => i,
4811
- $el: (i) => i.vnode.el,
5006
+ $el: (i) => getDevRootFragmentEl(i),
4812
5007
  $data: (i) => i.data,
4813
5008
  $props: (i) => /* @__PURE__ */ shallowReadonly(i.props),
4814
5009
  $attrs: (i) => /* @__PURE__ */ shallowReadonly(i.attrs),
@@ -4914,7 +5109,7 @@ var VueRuntimeDOM = (function(exports) {
4914
5109
  warn$1("Avoid app logic that relies on enumerating keys on a component instance. The keys will be empty in production mode to avoid performance overhead.");
4915
5110
  return Reflect.ownKeys(target);
4916
5111
  };
4917
- const RuntimeCompiledPublicInstanceProxyHandlers = /* @__PURE__ */ extend({}, PublicInstanceProxyHandlers, {
5112
+ const RuntimeCompiledPublicInstanceProxyHandlers = /*@__PURE__*/ extend({}, PublicInstanceProxyHandlers, {
4918
5113
  get(target, key) {
4919
5114
  if (key === Symbol.unscopables) return;
4920
5115
  return PublicInstanceProxyHandlers.get(target, key, target);
@@ -5086,12 +5281,13 @@ var VueRuntimeDOM = (function(exports) {
5086
5281
  for (const key in defaults) {
5087
5282
  if (key.startsWith("__skip")) continue;
5088
5283
  let opt = props[key];
5089
- if (opt) if (isArray(opt) || isFunction(opt)) opt = props[key] = {
5090
- type: opt,
5091
- default: defaults[key]
5092
- };
5093
- else opt.default = defaults[key];
5094
- else if (opt === null) opt = props[key] = { default: defaults[key] };
5284
+ if (opt) {
5285
+ if (isArray(opt) || isFunction(opt)) opt = props[key] = {
5286
+ type: opt,
5287
+ default: defaults[key]
5288
+ };
5289
+ else opt.default = defaults[key];
5290
+ } else if (opt === null) opt = props[key] = { default: defaults[key] };
5095
5291
  else warn$1(`props default key "${key}" has no corresponding declaration.`);
5096
5292
  if (opt && defaults[`__skip_${key}`]) opt.skipFactory = true;
5097
5293
  }
@@ -5141,37 +5337,32 @@ var VueRuntimeDOM = (function(exports) {
5141
5337
  function withAsyncContext(getAwaitable) {
5142
5338
  const ctx = getCurrentGenericInstance();
5143
5339
  const inSSRSetup = isInSSRComponentSetup;
5144
- const restoreAsyncContext = ctx && ctx.restoreAsyncContext ? ctx.restoreAsyncContext.bind(ctx) : void 0;
5145
5340
  if (!ctx) warn$1("withAsyncContext called without active current instance. This is likely a bug.");
5146
5341
  let awaitable = getAwaitable();
5147
5342
  setCurrentInstance(null, void 0);
5148
5343
  if (inSSRSetup) setInSSRSetupState(false);
5149
5344
  const restore = () => {
5150
- const resetStoppedScope = ctx && !ctx.scope.active ? ctx.scope : void 0;
5345
+ const stoppedScope = ctx && !ctx.scope.active ? ctx.scope : void 0;
5151
5346
  setCurrentInstance(ctx);
5152
5347
  if (inSSRSetup) setInSSRSetupState(true);
5153
- const reset = restoreAsyncContext && restoreAsyncContext();
5154
- return () => {
5155
- if (reset) reset();
5156
- if (resetStoppedScope) resetStoppedScope.reset();
5157
- };
5348
+ return stoppedScope;
5158
5349
  };
5159
5350
  const cleanup = () => {
5160
5351
  setCurrentInstance(null, void 0);
5161
5352
  if (inSSRSetup) setInSSRSetupState(false);
5162
5353
  };
5163
5354
  if (isPromise(awaitable)) awaitable = awaitable.catch((e) => {
5164
- const reset = restore();
5355
+ const stoppedScope = restore();
5165
5356
  Promise.resolve().then(() => Promise.resolve().then(() => {
5166
- if (reset) reset();
5357
+ if (stoppedScope) stoppedScope.reset();
5167
5358
  cleanup();
5168
5359
  }));
5169
5360
  throw e;
5170
5361
  });
5171
5362
  return [awaitable, () => {
5172
- const reset = restore();
5363
+ const stoppedScope = restore();
5173
5364
  Promise.resolve().then(() => {
5174
- if (reset) reset();
5365
+ if (stoppedScope) stoppedScope.reset();
5175
5366
  cleanup();
5176
5367
  });
5177
5368
  }];
@@ -5234,11 +5425,12 @@ var VueRuntimeDOM = (function(exports) {
5234
5425
  const opt = computedOptions[key];
5235
5426
  const get = isFunction(opt) ? opt.bind(publicThis, publicThis) : isFunction(opt.get) ? opt.get.bind(publicThis, publicThis) : NOOP;
5236
5427
  if (get === NOOP) warn$1(`Computed property "${key}" has no getter.`);
5428
+ const set = !isFunction(opt) && isFunction(opt.set) ? opt.set.bind(publicThis) : () => {
5429
+ warn$1(`Write operation failed: computed property "${key}" is readonly.`);
5430
+ };
5237
5431
  const c = computed({
5238
5432
  get,
5239
- set: !isFunction(opt) && isFunction(opt.set) ? opt.set.bind(publicThis) : () => {
5240
- warn$1(`Write operation failed: computed property "${key}" is readonly.`);
5241
- }
5433
+ set
5242
5434
  });
5243
5435
  Object.defineProperty(ctx, key, {
5244
5436
  enumerable: true,
@@ -5294,9 +5486,10 @@ var VueRuntimeDOM = (function(exports) {
5294
5486
  for (const key in injectOptions) {
5295
5487
  const opt = injectOptions[key];
5296
5488
  let injected;
5297
- if (isObject(opt)) if ("default" in opt) injected = inject(opt.from || key, opt.default, true);
5298
- else injected = inject(opt.from || key);
5299
- else injected = inject(opt);
5489
+ if (isObject(opt)) {
5490
+ if ("default" in opt) injected = inject(opt.from || key, opt.default, true);
5491
+ else injected = inject(opt.from || key);
5492
+ } else injected = inject(opt);
5300
5493
  if (/* @__PURE__ */ isRef(injected)) Object.defineProperty(ctx, key, {
5301
5494
  enumerable: true,
5302
5495
  configurable: true,
@@ -5317,13 +5510,14 @@ var VueRuntimeDOM = (function(exports) {
5317
5510
  if (isFunction(handler)) watch(getter, handler);
5318
5511
  else warn$1(`Invalid watch handler specified by key "${raw}"`, handler);
5319
5512
  } else if (isFunction(raw)) watch(getter, raw.bind(publicThis));
5320
- else if (isObject(raw)) if (isArray(raw)) raw.forEach((r) => createWatcher(r, ctx, publicThis, key));
5321
- else {
5322
- const handler = isFunction(raw.handler) ? raw.handler.bind(publicThis) : ctx[raw.handler];
5323
- if (isFunction(handler)) watch(getter, handler, raw);
5324
- else warn$1(`Invalid watch handler specified by key "${raw.handler}"`, handler);
5325
- }
5326
- else warn$1(`Invalid watch option: "${key}"`, raw);
5513
+ else if (isObject(raw)) {
5514
+ if (isArray(raw)) raw.forEach((r) => createWatcher(r, ctx, publicThis, key));
5515
+ else {
5516
+ const handler = isFunction(raw.handler) ? raw.handler.bind(publicThis) : ctx[raw.handler];
5517
+ if (isFunction(handler)) watch(getter, handler, raw);
5518
+ else warn$1(`Invalid watch handler specified by key "${raw.handler}"`, handler);
5519
+ }
5520
+ } else warn$1(`Invalid watch option: "${key}"`, raw);
5327
5521
  }
5328
5522
  /**
5329
5523
  * Resolve merged options and cache it on the component.
@@ -5409,7 +5603,7 @@ var VueRuntimeDOM = (function(exports) {
5409
5603
  }
5410
5604
  function mergeEmitsOrPropsOptions(to, from) {
5411
5605
  if (to) {
5412
- if (isArray(to) && isArray(from)) return [...new Set([...to, ...from])];
5606
+ if (isArray(to) && isArray(from)) return [.../* @__PURE__ */ new Set([...to, ...from])];
5413
5607
  return extend(Object.create(null), normalizePropsOrEmits(to), normalizePropsOrEmits(from !== null && from !== void 0 ? from : {}));
5414
5608
  } else return from;
5415
5609
  }
@@ -5528,8 +5722,10 @@ var VueRuntimeDOM = (function(exports) {
5528
5722
  } else warn$1(`Cannot unmount an app that is not mounted.`);
5529
5723
  },
5530
5724
  provide(key, value) {
5531
- if (key in context.provides) if (hasOwn(context.provides, key)) warn$1(`App already provides property with key "${String(key)}". It will be overwritten with the new value.`);
5532
- else warn$1(`App already provides property with key "${String(key)}" inherited from its parent element. It will be overwritten with the new value.`);
5725
+ if (key in context.provides) {
5726
+ if (hasOwn(context.provides, key)) warn$1(`App already provides property with key "${String(key)}". It will be overwritten with the new value.`);
5727
+ else warn$1(`App already provides property with key "${String(key)}" inherited from its parent element. It will be overwritten with the new value.`);
5728
+ }
5533
5729
  context.provides[key] = value;
5534
5730
  return app;
5535
5731
  },
@@ -5568,13 +5764,17 @@ var VueRuntimeDOM = (function(exports) {
5568
5764
  const modifiers = getModelModifiers(props, camelizedName, defaultPropGetter);
5569
5765
  const res = customRef((track, trigger) => {
5570
5766
  let localValue;
5767
+ let prevPropValue = EMPTY_OBJ;
5571
5768
  let prevSetValue = EMPTY_OBJ;
5572
5769
  let prevEmittedValue;
5573
5770
  watchSyncEffect(() => {
5574
5771
  const propValue = props[camelizedName];
5575
- if (hasChanged(localValue, propValue)) {
5576
- localValue = propValue;
5577
- trigger();
5772
+ if (hasChanged(prevPropValue, propValue)) {
5773
+ prevPropValue = propValue;
5774
+ if (hasChanged(localValue, propValue)) {
5775
+ localValue = propValue;
5776
+ trigger();
5777
+ }
5578
5778
  }
5579
5779
  });
5580
5780
  return {
@@ -5636,12 +5836,14 @@ var VueRuntimeDOM = (function(exports) {
5636
5836
  if (instance.isUnmounted) return;
5637
5837
  {
5638
5838
  const { emitsOptions, propsOptions } = instance;
5639
- if (emitsOptions) if (!(event in emitsOptions) && true) {
5640
- if (!propsOptions || !propsOptions[0] || !(toHandlerKey(camelize(event)) in propsOptions[0])) warn$1(`Component emitted event "${event}" but it is neither declared in the emits option nor as an "${toHandlerKey(camelize(event))}" prop.`);
5641
- } else {
5642
- const validator = emitsOptions[event];
5643
- if (isFunction(validator)) {
5644
- if (!validator(...rawArgs)) warn$1(`Invalid event arguments: event validation failed for event "${event}".`);
5839
+ if (emitsOptions) {
5840
+ if (!(event in emitsOptions) && true) {
5841
+ if (!propsOptions || !propsOptions[0] || !(toHandlerKey(camelize(event)) in propsOptions[0])) warn$1(`Component emitted event "${event}" but it is neither declared in the emits option nor as an "${toHandlerKey(camelize(event))}" prop.`);
5842
+ } else {
5843
+ const validator = emitsOptions[event];
5844
+ if (isFunction(validator)) {
5845
+ if (!validator(...rawArgs)) warn$1(`Invalid event arguments: event validation failed for event "${event}".`);
5846
+ }
5645
5847
  }
5646
5848
  }
5647
5849
  }
@@ -5650,7 +5852,7 @@ var VueRuntimeDOM = (function(exports) {
5650
5852
  const modifiers = isModelListener && getModelModifiers(props, event.slice(7), getter);
5651
5853
  if (modifiers) {
5652
5854
  if (modifiers.trim) args = rawArgs.map((a) => isString(a) ? a.trim() : a);
5653
- if (modifiers.number) args = rawArgs.map(looseToNumber);
5855
+ if (modifiers.number) args = args.map(looseToNumber);
5654
5856
  }
5655
5857
  devtoolsComponentEmit(instance, event, args);
5656
5858
  {
@@ -5777,8 +5979,9 @@ var VueRuntimeDOM = (function(exports) {
5777
5979
  root.dirs = root.dirs ? root.dirs.concat(vnode.dirs) : vnode.dirs;
5778
5980
  }
5779
5981
  if (vnode.transition) {
5780
- if (!isElementRoot(root)) warn$1("Component inside <Transition> renders non-element root node that cannot be animated.");
5781
- setTransitionHooks(root, vnode.transition);
5982
+ const child = isTeleport(root.type) ? getInnerChild$1(root) || root : root;
5983
+ if (!isElementRoot(child)) warn$1("Component inside <Transition> renders non-element root node that cannot be animated.");
5984
+ setTransitionHooks(child, vnode.transition);
5782
5985
  }
5783
5986
  if (setRoot) setRoot(root);
5784
5987
  else result = root;
@@ -5829,18 +6032,21 @@ var VueRuntimeDOM = (function(exports) {
5829
6032
  for (let i = 0; i < children.length; i++) {
5830
6033
  const child = children[i];
5831
6034
  if (isVNode(child)) {
5832
- if (child.type !== Comment || child.children === "v-if") if (singleRoot) return;
5833
- else {
5834
- singleRoot = child;
5835
- if (recurse && singleRoot.patchFlag > 0 && singleRoot.patchFlag & 2048) return filterSingleRoot(singleRoot.children);
6035
+ if (child.type !== Comment || child.children === "v-if") {
6036
+ if (singleRoot) return;
6037
+ else {
6038
+ singleRoot = child;
6039
+ if (recurse && singleRoot.patchFlag > 0 && singleRoot.patchFlag & 2048) return filterSingleRoot(singleRoot.children);
6040
+ }
5836
6041
  }
5837
6042
  } else return;
5838
6043
  }
5839
6044
  return singleRoot;
5840
6045
  }
6046
+ const isFunctionalFallthroughKey = (key) => key === "class" || key === "style" || isOn(key);
5841
6047
  const getFunctionalFallthrough = (attrs) => {
5842
6048
  let res;
5843
- for (const key in attrs) if (key === "class" || key === "style" || isOn(key)) (res || (res = {}))[key] = attrs[key];
6049
+ for (const key in attrs) if (isFunctionalFallthroughKey(key)) (res || (res = {}))[key] = attrs[key];
5844
6050
  return res;
5845
6051
  };
5846
6052
  const filterModelListeners = (attrs, props) => {
@@ -5952,16 +6158,17 @@ var VueRuntimeDOM = (function(exports) {
5952
6158
  let key = propsToUpdate[i];
5953
6159
  if (isEmitListener(instance.emitsOptions, key)) continue;
5954
6160
  const value = rawProps[key];
5955
- if (options) if (hasOwn(attrs, key)) {
5956
- if (value !== attrs[key]) {
5957
- attrs[key] = value;
5958
- hasAttrsChanged = true;
6161
+ if (options) {
6162
+ if (hasOwn(attrs, key)) {
6163
+ if (value !== attrs[key]) {
6164
+ attrs[key] = value;
6165
+ hasAttrsChanged = true;
6166
+ }
6167
+ } else {
6168
+ const camelizedKey = camelize(key);
6169
+ props[camelizedKey] = resolvePropValue(options, camelizedKey, value, instance, baseResolveDefault);
5959
6170
  }
5960
- } else {
5961
- const camelizedKey = camelize(key);
5962
- props[camelizedKey] = resolvePropValue(options, camelizedKey, value, instance, baseResolveDefault);
5963
- }
5964
- else if (value !== attrs[key]) {
6171
+ } else if (value !== attrs[key]) {
5965
6172
  attrs[key] = value;
5966
6173
  hasAttrsChanged = true;
5967
6174
  }
@@ -5970,9 +6177,11 @@ var VueRuntimeDOM = (function(exports) {
5970
6177
  } else {
5971
6178
  if (setFullProps(instance, rawProps, props, attrs)) hasAttrsChanged = true;
5972
6179
  let kebabKey;
5973
- for (const key in rawCurrentProps) if (!rawProps || !hasOwn(rawProps, key) && ((kebabKey = hyphenate(key)) === key || !hasOwn(rawProps, kebabKey))) if (options) {
5974
- if (rawPrevProps && (rawPrevProps[key] !== void 0 || rawPrevProps[kebabKey] !== void 0)) props[key] = resolvePropValue(options, key, void 0, instance, baseResolveDefault, true);
5975
- } else delete props[key];
6180
+ for (const key in rawCurrentProps) if (!rawProps || !hasOwn(rawProps, key) && ((kebabKey = hyphenate(key)) === key || !hasOwn(rawProps, kebabKey))) {
6181
+ if (options) {
6182
+ if (rawPrevProps && (rawPrevProps[key] !== void 0 || rawPrevProps[kebabKey] !== void 0)) props[key] = resolvePropValue(options, key, void 0, instance, baseResolveDefault, true);
6183
+ } else delete props[key];
6184
+ }
5976
6185
  if (attrs !== rawCurrentProps) {
5977
6186
  for (const key in attrs) if (!rawProps || !hasOwn(rawProps, key) && true) {
5978
6187
  delete attrs[key];
@@ -5991,9 +6200,10 @@ var VueRuntimeDOM = (function(exports) {
5991
6200
  if (isReservedProp(key)) continue;
5992
6201
  const value = rawProps[key];
5993
6202
  let camelKey;
5994
- if (options && hasOwn(options, camelKey = camelize(key))) if (!needCastKeys || !needCastKeys.includes(camelKey)) props[camelKey] = value;
5995
- else (rawCastValues || (rawCastValues = {}))[camelKey] = value;
5996
- else if (!isEmitListener(instance.emitsOptions, key)) {
6203
+ if (options && hasOwn(options, camelKey = camelize(key))) {
6204
+ if (!needCastKeys || !needCastKeys.includes(camelKey)) props[camelKey] = value;
6205
+ else (rawCastValues || (rawCastValues = {}))[camelKey] = value;
6206
+ } else if (!isEmitListener(instance.emitsOptions, key)) {
5997
6207
  if (!(key in attrs) || value !== attrs[key]) {
5998
6208
  attrs[key] = value;
5999
6209
  hasAttrsChanged = true;
@@ -6040,7 +6250,7 @@ var VueRuntimeDOM = (function(exports) {
6040
6250
  const prev = setCurrentInstance(instance);
6041
6251
  const props = /* @__PURE__ */ toRaw(instance.props);
6042
6252
  value = factory.call(null, props);
6043
- setCurrentInstance(...prev);
6253
+ restoreCurrentInstance(prev);
6044
6254
  return value;
6045
6255
  }
6046
6256
  const mixinPropsCache = /* @__PURE__ */ new WeakMap();
@@ -6156,7 +6366,7 @@ var VueRuntimeDOM = (function(exports) {
6156
6366
  }
6157
6367
  if (validator && !validator(value, /* @__PURE__ */ shallowReadonly(resolvedProps))) warn$1("Invalid prop: custom validator check failed for prop \"" + key + "\".");
6158
6368
  }
6159
- const isSimpleType = /* @__PURE__ */ makeMap("String,Number,Boolean,Function,Symbol,BigInt");
6369
+ const isSimpleType = /*@__PURE__*/ makeMap("String,Number,Boolean,Function,Symbol,BigInt");
6160
6370
  /**
6161
6371
  * dev only
6162
6372
  */
@@ -6269,12 +6479,13 @@ var VueRuntimeDOM = (function(exports) {
6269
6479
  let deletionComparisonTarget = EMPTY_OBJ;
6270
6480
  if (vnode.shapeFlag & 32) {
6271
6481
  const type = children._;
6272
- if (type) if (isHmrUpdating) {
6273
- assignSlots(slots, children, optimized);
6274
- trigger(instance, "set", "$slots");
6275
- } else if (optimized && type === 1) needDeletionCheck = false;
6276
- else assignSlots(slots, children, optimized);
6277
- else {
6482
+ if (type) {
6483
+ if (isHmrUpdating) {
6484
+ assignSlots(slots, children, optimized);
6485
+ trigger(instance, "set", "$slots");
6486
+ } else if (optimized && type === 1) needDeletionCheck = false;
6487
+ else assignSlots(slots, children, optimized);
6488
+ } else {
6278
6489
  needDeletionCheck = !children.$stable;
6279
6490
  normalizeObjectSlots(children, slots, instance);
6280
6491
  }
@@ -6292,7 +6503,7 @@ var VueRuntimeDOM = (function(exports) {
6292
6503
  let supported;
6293
6504
  let perf;
6294
6505
  let cachedNow$1 = 0;
6295
- const p$1 = /* @__PURE__ */ Promise.resolve();
6506
+ const p$1 = /*@__PURE__*/ Promise.resolve();
6296
6507
  const getNow$1 = () => cachedNow$1 || (p$1.then(() => cachedNow$1 = 0), cachedNow$1 = isSupported() ? perf.now() : Date.now());
6297
6508
  /**
6298
6509
  * @internal
@@ -6373,6 +6584,10 @@ var VueRuntimeDOM = (function(exports) {
6373
6584
  optimized = false;
6374
6585
  n2.dynamicChildren = null;
6375
6586
  }
6587
+ if (n2.dynamicChildren && n1 && n1.dynamicChildren && n1.dynamicChildren.hasOnce) {
6588
+ if (n2.dynamicChildren === EMPTY_ARR) n2.dynamicChildren = [];
6589
+ n2.dynamicChildren.hasOnce = true;
6590
+ }
6376
6591
  const { type, ref, shapeFlag } = n2;
6377
6592
  switch (type) {
6378
6593
  case Text:
@@ -6389,7 +6604,7 @@ var VueRuntimeDOM = (function(exports) {
6389
6604
  processFragment(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);
6390
6605
  break;
6391
6606
  case VaporSlot:
6392
- getVaporInterface(parentComponent, n2).slot(n1, n2, container, anchor, parentComponent, parentSuspense);
6607
+ getVaporInterface(parentComponent, n2).slot(n1, n2, container, anchor, parentComponent, parentSuspense, slotScopeIds);
6393
6608
  break;
6394
6609
  default: if (shapeFlag & 1) processElement(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);
6395
6610
  else if (shapeFlag & 6) processComponent(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);
@@ -6508,7 +6723,10 @@ var VueRuntimeDOM = (function(exports) {
6508
6723
  for (let i = 0; i < inheritedScopeIds.length; i++) hostSetScopeId(el, inheritedScopeIds[i]);
6509
6724
  };
6510
6725
  const mountChildren = (children, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, start = 0) => {
6511
- for (let i = start; i < children.length; i++) patch(null, children[i] = optimized ? cloneIfMounted(children[i]) : normalizeVNode(children[i]), container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);
6726
+ for (let i = start; i < children.length; i++) {
6727
+ const child = children[i] = optimized ? cloneIfMounted(children[i]) : normalizeVNode(children[i]);
6728
+ patch(null, child, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);
6729
+ }
6512
6730
  };
6513
6731
  const patchElement = (n1, n2, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => {
6514
6732
  const el = n2.el = n1.el;
@@ -6520,6 +6738,7 @@ var VueRuntimeDOM = (function(exports) {
6520
6738
  let vnodeHook;
6521
6739
  parentComponent && toggleRecurse(parentComponent, false);
6522
6740
  if (vnodeHook = newProps.onVnodeBeforeUpdate) invokeVNodeHook(vnodeHook, parentComponent, n2, n1);
6741
+ if (n2.ibu) n2.ibu();
6523
6742
  if (dirs) invokeDirectiveHook(n2, n1, parentComponent, "beforeUpdate");
6524
6743
  parentComponent && toggleRecurse(parentComponent, true);
6525
6744
  if (isHmrUpdating || dynamicChildren && (!n1.dynamicChildren || n1.dynamicChildren.length !== dynamicChildren.length)) {
@@ -6553,8 +6772,9 @@ var VueRuntimeDOM = (function(exports) {
6553
6772
  if (n1.children !== n2.children) hostSetElementText(el, n2.children);
6554
6773
  }
6555
6774
  } else if (!optimized && dynamicChildren == null) patchProps(el, oldProps, newProps, parentComponent, namespace);
6556
- if ((vnodeHook = newProps.onVnodeUpdated) || dirs) queuePostRenderEffect(() => {
6775
+ if ((vnodeHook = newProps.onVnodeUpdated) || dirs || n2.iu) queuePostRenderEffect(() => {
6557
6776
  vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, n2, n1);
6777
+ n2.iu && n2.iu();
6558
6778
  dirs && invokeDirectiveHook(n2, n1, parentComponent, "updated");
6559
6779
  }, void 0, parentSuspense);
6560
6780
  };
@@ -6562,7 +6782,8 @@ var VueRuntimeDOM = (function(exports) {
6562
6782
  for (let i = 0; i < newChildren.length; i++) {
6563
6783
  const oldVNode = oldChildren[i];
6564
6784
  const newVNode = newChildren[i];
6565
- patch(oldVNode, newVNode, oldVNode.el && (oldVNode.type === Fragment || !isSameVNodeType(oldVNode, newVNode) || oldVNode.shapeFlag & 198) ? hostParentNode(oldVNode.el) : fallbackContainer, null, parentComponent, parentSuspense, namespace, slotScopeIds, true);
6785
+ const container = oldVNode.el && (oldVNode.type === Fragment || !isSameVNodeType(oldVNode, newVNode) || oldVNode.shapeFlag & 198) ? hostParentNode(oldVNode.el) : fallbackContainer;
6786
+ patch(oldVNode, newVNode, container, null, parentComponent, parentSuspense, namespace, slotScopeIds, true);
6566
6787
  }
6567
6788
  };
6568
6789
  const patchProps = (el, oldProps, newProps, parentComponent, namespace) => {
@@ -6600,41 +6821,15 @@ var VueRuntimeDOM = (function(exports) {
6600
6821
  };
6601
6822
  const processComponent = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => {
6602
6823
  n2.slotScopeIds = slotScopeIds;
6603
- if (n2.type.__vapor) if (n1 == null) if (n2.shapeFlag & 512) getVaporInterface(parentComponent, n2).activate(n2, container, anchor, parentComponent);
6604
- else {
6605
- const vnodeBeforeMountHook = !isAsyncWrapper(n2) && n2.props && n2.props.onVnodeBeforeMount;
6606
- getVaporInterface(parentComponent, n2).mount(n2, container, anchor, parentComponent, parentSuspense, () => {
6607
- if (n2.dirs) {
6608
- invokeDirectiveHook(n2, null, parentComponent, "created");
6609
- invokeDirectiveHook(n2, null, parentComponent, "beforeMount");
6610
- }
6611
- }, () => {
6612
- if (vnodeBeforeMountHook) invokeVNodeHook(vnodeBeforeMountHook, parentComponent, n2);
6613
- });
6614
- if (n2.dirs) queuePostRenderEffect(() => invokeDirectiveHook(n2, null, parentComponent, "mounted"), void 0, parentSuspense);
6615
- const vnodeMountedHook = !isAsyncWrapper(n2) && n2.props && n2.props.onVnodeMounted;
6616
- if (vnodeMountedHook) {
6617
- const scopedVNode = n2;
6618
- queuePostRenderEffect(() => invokeVNodeHook(vnodeMountedHook, parentComponent, scopedVNode), void 0, parentSuspense);
6619
- }
6620
- }
6621
- else {
6622
- const shouldUpdate = shouldUpdateComponent(n1, n2, optimized);
6623
- getVaporInterface(parentComponent, n2).update(n1, n2, shouldUpdate, () => {
6624
- if (n2.dirs) invokeDirectiveHook(n2, n1, parentComponent, "beforeUpdate");
6625
- }, () => {
6626
- const vnodeBeforeUpdateHook = n2.props && n2.props.onVnodeBeforeUpdate;
6627
- if (vnodeBeforeUpdateHook) invokeVNodeHook(vnodeBeforeUpdateHook, parentComponent, n2, n1);
6628
- });
6629
- const vnodeUpdatedHook = n2.props && n2.props.onVnodeUpdated;
6630
- if (shouldUpdate && (vnodeUpdatedHook || n2.dirs)) queuePostRenderEffect(() => {
6631
- n2.dirs && invokeDirectiveHook(n2, n1, parentComponent, "updated");
6632
- vnodeUpdatedHook && invokeVNodeHook(vnodeUpdatedHook, parentComponent, n2, n1);
6633
- }, void 0, parentSuspense);
6634
- }
6635
- else if (n1 == null) if (n2.shapeFlag & 512) parentComponent.ctx.activate(n2, container, anchor, namespace, optimized);
6636
- else mountComponent(n2, container, anchor, parentComponent, parentSuspense, namespace, optimized);
6637
- else updateComponent(n1, n2, optimized);
6824
+ if (n2.type.__vapor) {
6825
+ if (n1 == null) {
6826
+ if (n2.shapeFlag & 512) getVaporInterface(parentComponent, n2).activate(n2, container, anchor, parentComponent, parentSuspense);
6827
+ else getVaporInterface(parentComponent, n2).mount(n2, container, anchor, parentComponent, parentSuspense);
6828
+ } else getVaporInterface(parentComponent, n2).update(n1, n2, shouldUpdateComponent(n1, n2, optimized));
6829
+ } else if (n1 == null) {
6830
+ if (n2.shapeFlag & 512) parentComponent.ctx.activate(n2, container, anchor, namespace, optimized);
6831
+ else mountComponent(n2, container, anchor, parentComponent, parentSuspense, namespace, optimized);
6832
+ } else updateComponent(n1, n2, optimized);
6638
6833
  };
6639
6834
  const mountComponent = (initialVNode, container, anchor, parentComponent, parentSuspense, namespace, optimized) => {
6640
6835
  const instance = initialVNode.component = createComponentInstance(initialVNode, parentComponent, parentSuspense);
@@ -6675,16 +6870,18 @@ var VueRuntimeDOM = (function(exports) {
6675
6870
  };
6676
6871
  const updateComponent = (n1, n2, optimized) => {
6677
6872
  const instance = n2.component = n1.component;
6678
- if (shouldUpdateComponent(n1, n2, optimized)) if (instance.asyncDep && !instance.asyncResolved) {
6679
- pushWarningContext(n2);
6680
- updateComponentPreRender(instance, n2, optimized);
6681
- popWarningContext();
6682
- return;
6873
+ if (shouldUpdateComponent(n1, n2, optimized)) {
6874
+ if (instance.asyncDep && !instance.asyncResolved) {
6875
+ pushWarningContext(n2);
6876
+ n2.el = n1.el;
6877
+ updateComponentPreRender(instance, n2, optimized);
6878
+ popWarningContext();
6879
+ return;
6880
+ } else {
6881
+ instance.next = n2;
6882
+ instance.effect.run();
6883
+ }
6683
6884
  } else {
6684
- instance.next = n2;
6685
- instance.effect.run();
6686
- }
6687
- else {
6688
6885
  n2.el = n1.el;
6689
6886
  instance.vnode = n2;
6690
6887
  }
@@ -6782,6 +6979,7 @@ var VueRuntimeDOM = (function(exports) {
6782
6979
  } else next = vnode;
6783
6980
  if (bu) invokeArrayFns(bu);
6784
6981
  if (vnodeHook = next.props && next.props.onVnodeBeforeUpdate) invokeVNodeHook(vnodeHook, parent, next, vnode);
6982
+ if (next.ibu) next.ibu();
6785
6983
  toggleRecurse(instance, true);
6786
6984
  startMeasure(instance, `render`);
6787
6985
  const nextTree = renderComponentRoot(instance);
@@ -6794,7 +6992,10 @@ var VueRuntimeDOM = (function(exports) {
6794
6992
  next.el = nextTree.el;
6795
6993
  if (originNext === null) updateHOCHostEl(instance, nextTree.el);
6796
6994
  if (u) queuePostRenderEffect(u, void 0, parentSuspense);
6797
- if (vnodeHook = next.props && next.props.onVnodeUpdated) queuePostRenderEffect(() => invokeVNodeHook(vnodeHook, parent, next, vnode), void 0, parentSuspense);
6995
+ if ((vnodeHook = next.props && next.props.onVnodeUpdated) || next.iu) queuePostRenderEffect(() => {
6996
+ vnodeHook && invokeVNodeHook(vnodeHook, parent, next, vnode);
6997
+ next.iu && next.iu();
6998
+ }, void 0, parentSuspense);
6798
6999
  devtoolsComponentUpdated(instance);
6799
7000
  popWarningContext();
6800
7001
  }
@@ -6834,9 +7035,10 @@ var VueRuntimeDOM = (function(exports) {
6834
7035
  if (shapeFlag & 8) {
6835
7036
  if (prevShapeFlag & 16) unmountChildren(c1, parentComponent, parentSuspense);
6836
7037
  if (c2 !== c1) hostSetElementText(container, c2);
6837
- } else if (prevShapeFlag & 16) if (shapeFlag & 16) patchKeyedChildren(c1, c2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);
6838
- else unmountChildren(c1, parentComponent, parentSuspense, true);
6839
- else {
7038
+ } else if (prevShapeFlag & 16) {
7039
+ if (shapeFlag & 16) patchKeyedChildren(c1, c2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);
7040
+ else unmountChildren(c1, parentComponent, parentSuspense, true);
7041
+ } else {
6840
7042
  if (prevShapeFlag & 8) hostSetElementText(container, "");
6841
7043
  if (shapeFlag & 16) mountChildren(c2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);
6842
7044
  }
@@ -6935,15 +7137,17 @@ var VueRuntimeDOM = (function(exports) {
6935
7137
  const anchorVNode = c2[nextIndex + 1];
6936
7138
  const anchor = nextIndex + 1 < l2 ? anchorVNode.el || resolveAsyncComponentPlaceholder(anchorVNode) : parentAnchor;
6937
7139
  if (newIndexToOldIndexMap[i] === 0) patch(null, nextChild, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);
6938
- else if (moved) if (j < 0 || i !== increasingNewIndexSequence[j]) move(nextChild, container, anchor, 2, parentComponent);
6939
- else j--;
7140
+ else if (moved) {
7141
+ if (j < 0 || i !== increasingNewIndexSequence[j]) move(nextChild, container, anchor, 2, parentComponent);
7142
+ else j--;
7143
+ }
6940
7144
  }
6941
7145
  }
6942
7146
  };
6943
7147
  const move = (vnode, container, anchor, moveType, parentComponent, parentSuspense = null) => {
6944
7148
  const { el, type, transition, children, shapeFlag } = vnode;
6945
7149
  if (isVaporComponent(type) || type === VaporSlot) {
6946
- getVaporInterface(parentComponent, vnode).move(vnode, container, anchor, moveType);
7150
+ getVaporInterface(parentComponent, vnode).move(vnode, container, anchor, moveType, parentSuspense);
6947
7151
  return;
6948
7152
  }
6949
7153
  if (shapeFlag & 6) {
@@ -6968,54 +7172,37 @@ var VueRuntimeDOM = (function(exports) {
6968
7172
  moveStaticNode(vnode, container, anchor);
6969
7173
  return;
6970
7174
  }
6971
- if (moveType !== 2 && shapeFlag & 1 && transition) if (moveType === 0) performTransitionEnter(el, transition, () => hostInsert(el, container, anchor), parentSuspense, true);
6972
- else {
6973
- const { leave, delayLeave, afterLeave } = transition;
6974
- const remove = () => {
7175
+ if (moveType !== 2 && shapeFlag & 1 && transition) {
7176
+ if (moveType === 0) performTransitionEnter(el, transition, () => hostInsert(el, container, anchor), parentSuspense, true);
7177
+ else performTransitionLeave(el, transition, () => {
6975
7178
  if (vnode.ctx.isUnmounted) hostRemove(el);
6976
7179
  else hostInsert(el, container, anchor);
6977
- };
6978
- const performLeave = () => {
6979
- const wasLeaving = el._isLeaving || !!el[leaveCbKey];
6980
- if (el._isLeaving) el[leaveCbKey](true);
6981
- if (transition.persisted && !wasLeaving) remove();
6982
- else leave(el, () => {
6983
- remove();
6984
- afterLeave && afterLeave();
6985
- });
6986
- };
6987
- if (delayLeave) delayLeave(el, remove, performLeave);
6988
- else performLeave();
6989
- }
6990
- else hostInsert(el, container, anchor);
7180
+ }, true, true);
7181
+ } else hostInsert(el, container, anchor);
6991
7182
  };
6992
7183
  const unmount = (vnode, parentComponent, parentSuspense, doRemove = false, optimized = false) => {
6993
7184
  const { type, props, ref, children, dynamicChildren, shapeFlag, patchFlag, dirs, cacheIndex, memo } = vnode;
6994
- if (patchFlag === -2) optimized = false;
7185
+ if (patchFlag === -2 || dynamicChildren && dynamicChildren.hasOnce) optimized = false;
6995
7186
  if (ref != null) {
6996
7187
  const prevSub = setActiveSub();
6997
7188
  setRef(ref, null, parentSuspense, vnode, true);
6998
7189
  setActiveSub(prevSub);
6999
7190
  }
7000
- if (cacheIndex != null) parentComponent.renderCache[cacheIndex] = void 0;
7191
+ if (cacheIndex != null && (!vnode.ctx || vnode.ctx === parentComponent)) parentComponent.renderCache[cacheIndex] = void 0;
7001
7192
  if (shapeFlag & 256) {
7002
- if (isVaporComponent(vnode.type)) getVaporInterface(parentComponent, vnode).deactivate(vnode, parentComponent.ctx.getStorageContainer());
7193
+ if (isVaporComponent(vnode.type)) getVaporInterface(parentComponent, vnode).deactivate(vnode, parentComponent.ctx.getStorageContainer(), parentSuspense);
7003
7194
  else parentComponent.ctx.deactivate(vnode);
7004
7195
  return;
7005
7196
  }
7197
+ if (shapeFlag & 6 && isVaporComponent(type)) {
7198
+ getVaporInterface(parentComponent, vnode).unmount(vnode, doRemove, parentSuspense);
7199
+ return;
7200
+ }
7006
7201
  const shouldInvokeDirs = shapeFlag & 1 && dirs;
7007
7202
  const shouldInvokeVnodeHook = !isAsyncWrapper(vnode);
7008
7203
  let vnodeHook;
7009
7204
  if (shouldInvokeVnodeHook && (vnodeHook = props && props.onVnodeBeforeUnmount)) invokeVNodeHook(vnodeHook, parentComponent, vnode);
7010
- if (shapeFlag & 6) if (isVaporComponent(type)) {
7011
- if (dirs) invokeDirectiveHook(vnode, null, parentComponent, "beforeUnmount");
7012
- getVaporInterface(parentComponent, vnode).unmount(vnode, doRemove);
7013
- if (shouldInvokeVnodeHook && (vnodeHook = props && props.onVnodeUnmounted) || dirs) queuePostRenderEffect(() => {
7014
- dirs && invokeDirectiveHook(vnode, null, parentComponent, "unmounted");
7015
- vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, vnode);
7016
- }, void 0, parentSuspense);
7017
- return;
7018
- } else unmountComponent(vnode.component, parentSuspense, doRemove);
7205
+ if (shapeFlag & 6) unmountComponent(vnode.component, parentSuspense, doRemove);
7019
7206
  else {
7020
7207
  if (shapeFlag & 128) {
7021
7208
  vnode.suspense.unmount(parentSuspense, doRemove);
@@ -7026,7 +7213,7 @@ var VueRuntimeDOM = (function(exports) {
7026
7213
  else if (dynamicChildren && !dynamicChildren.hasOnce && (type !== Fragment || patchFlag > 0 && patchFlag & 64)) unmountChildren(dynamicChildren, parentComponent, parentSuspense, false, true);
7027
7214
  else if (type === Fragment && patchFlag & 384 || !optimized && shapeFlag & 16) unmountChildren(children, parentComponent, parentSuspense);
7028
7215
  if (type === VaporSlot) {
7029
- getVaporInterface(parentComponent, vnode).unmount(vnode, doRemove);
7216
+ getVaporInterface(parentComponent, vnode).unmount(vnode, doRemove, parentSuspense);
7030
7217
  return;
7031
7218
  }
7032
7219
  if (doRemove) remove(vnode);
@@ -7050,6 +7237,7 @@ var VueRuntimeDOM = (function(exports) {
7050
7237
  }
7051
7238
  if (type === Static) {
7052
7239
  removeStaticNode(vnode);
7240
+ if (transition && !transition.persisted && transition.afterLeave) transition.afterLeave();
7053
7241
  return;
7054
7242
  }
7055
7243
  if (transition) performTransitionLeave(el, transition, () => hostRemove(el), !!(vnode.shapeFlag & 1));
@@ -7074,7 +7262,10 @@ var VueRuntimeDOM = (function(exports) {
7074
7262
  if (effect) {
7075
7263
  effect.stop();
7076
7264
  unmount(subTree, instance, parentSuspense, doRemove);
7077
- } else if (doRemove && subTree && instance.vnode.el) remove(subTree);
7265
+ } else if (instance.vnode.el && subTree) {
7266
+ subTree.transition = instance.vnode.transition;
7267
+ unmount(subTree, instance, parentSuspense, doRemove);
7268
+ }
7078
7269
  if (um) queuePostRenderEffect(um, void 0, parentSuspense);
7079
7270
  queuePostRenderEffect(() => instance.isUnmounted = true, void 0, parentSuspense);
7080
7271
  devtoolsComponentRemoved(instance);
@@ -7148,12 +7339,14 @@ var VueRuntimeDOM = (function(exports) {
7148
7339
  return currentNamespace === "svg" && type === "foreignObject" || currentNamespace === "mathml" && type === "annotation-xml" && props && props.encoding && props.encoding.includes("html") ? void 0 : currentNamespace;
7149
7340
  }
7150
7341
  function toggleRecurse({ effect, job, vapor }, allowed) {
7151
- if (!vapor) if (allowed) {
7152
- effect.flags |= 128;
7153
- job.flags |= 2;
7154
- } else {
7155
- effect.flags &= -129;
7156
- job.flags &= -3;
7342
+ if (!vapor) {
7343
+ if (allowed) {
7344
+ effect.flags |= 128;
7345
+ job.flags |= 2;
7346
+ } else {
7347
+ effect.flags &= -129;
7348
+ job.flags &= -3;
7349
+ }
7157
7350
  }
7158
7351
  }
7159
7352
  function needTransition(parentSuspense, transition) {
@@ -7193,8 +7386,10 @@ var VueRuntimeDOM = (function(exports) {
7193
7386
  }
7194
7387
  function locateNonHydratedAsyncRoot(instance) {
7195
7388
  const subComponent = instance.subTree && instance.subTree.component;
7196
- if (subComponent) if (subComponent.asyncDep && !subComponent.asyncResolved) return subComponent;
7197
- else return locateNonHydratedAsyncRoot(subComponent);
7389
+ if (subComponent) {
7390
+ if (subComponent.asyncDep && !subComponent.asyncResolved) return subComponent;
7391
+ else return locateNonHydratedAsyncRoot(subComponent);
7392
+ }
7198
7393
  }
7199
7394
  function invalidateMount(hooks) {
7200
7395
  if (hooks) for (let i = 0; i < hooks.length; i++) hooks[i].flags |= 4;
@@ -7213,13 +7408,15 @@ var VueRuntimeDOM = (function(exports) {
7213
7408
  function performTransitionLeave(el, transition, remove, isElement = true, force = false) {
7214
7409
  const performRemove = () => {
7215
7410
  remove();
7216
- if (transition && !transition.persisted && transition.afterLeave) transition.afterLeave();
7411
+ if (transition && (force || !transition.persisted) && transition.afterLeave) transition.afterLeave();
7217
7412
  };
7218
7413
  if (force || isElement && transition && !transition.persisted) {
7219
7414
  const { leave, delayLeave } = transition;
7220
7415
  const performLeave = () => {
7416
+ const wasLeaving = el._isLeaving || !!el[leaveCbKey];
7221
7417
  if (el._isLeaving && force) el[leaveCbKey](true);
7222
- leave(el, performRemove);
7418
+ if (force && transition.persisted && !wasLeaving) remove();
7419
+ else leave(el, performRemove);
7223
7420
  };
7224
7421
  if (delayLeave) delayLeave(el, performRemove, performLeave);
7225
7422
  else performLeave();
@@ -7238,7 +7435,7 @@ var VueRuntimeDOM = (function(exports) {
7238
7435
  /**
7239
7436
  * shared between vdom and vapor
7240
7437
  */
7241
- function getInheritedScopeIds(vnode, parentComponent) {
7438
+ function getInheritedScopeIds(vnode, parentComponent, includeVaporRootIds = true) {
7242
7439
  const inheritedScopeIds = [];
7243
7440
  let currentParent = parentComponent;
7244
7441
  let currentVNode = vnode;
@@ -7254,6 +7451,8 @@ var VueRuntimeDOM = (function(exports) {
7254
7451
  currentParent = currentParent.parent;
7255
7452
  } else break;
7256
7453
  }
7454
+ const vaporScopeIds = includeVaporRootIds && currentVNode.vaporScopeIds;
7455
+ if (vaporScopeIds) inheritedScopeIds.push(...vaporScopeIds);
7257
7456
  return inheritedScopeIds;
7258
7457
  }
7259
7458
  function resolveAsyncComponentPlaceholder(anchorVnode) {
@@ -7272,7 +7471,7 @@ var VueRuntimeDOM = (function(exports) {
7272
7471
  process(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, rendererInternals) {
7273
7472
  if (n1 == null) mountSuspense(n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, rendererInternals);
7274
7473
  else {
7275
- if (parentSuspense && parentSuspense.deps > 0 && !n1.suspense.isInFallback) {
7474
+ if (parentSuspense && parentSuspense.deps > 0 && !n1.suspense.isInFallback && !parentSuspense.isHydrating) {
7276
7475
  n2.suspense = n1.suspense;
7277
7476
  n2.suspense.vnode = n2;
7278
7477
  n2.el = n1.el;
@@ -7310,10 +7509,12 @@ var VueRuntimeDOM = (function(exports) {
7310
7509
  if (pendingBranch) {
7311
7510
  suspense.pendingBranch = newBranch;
7312
7511
  if (isSameVNodeType(pendingBranch, newBranch)) {
7313
- patch(pendingBranch, newBranch, suspense.hiddenContainer, null, parentComponent, suspense, namespace, slotScopeIds, optimized);
7512
+ suspense.deps++;
7513
+ patch(pendingBranch, newBranch, isHydrating ? container : suspense.hiddenContainer, null, parentComponent, suspense, namespace, slotScopeIds, optimized);
7514
+ suspense.deps--;
7314
7515
  if (suspense.deps <= 0) suspense.resolve();
7315
7516
  else if (isInFallback) {
7316
- if (!isHydrating) {
7517
+ if (!isHydrating && !suspense.isFallbackMountPending) {
7317
7518
  patch(activeBranch, newFallback, container, anchor, parentComponent, null, namespace, slotScopeIds, optimized);
7318
7519
  setActiveBranch(suspense, newFallback);
7319
7520
  }
@@ -7325,12 +7526,16 @@ var VueRuntimeDOM = (function(exports) {
7325
7526
  suspense.activeBranch = pendingBranch;
7326
7527
  } else unmount(pendingBranch, parentComponent, suspense);
7327
7528
  suspense.deps = 0;
7529
+ for (let i = 0; i < suspense.effects.length; i++) {
7530
+ const effect = suspense.effects[i];
7531
+ if (effect.flags & 8) queuePostFlushCb(effect);
7532
+ }
7328
7533
  suspense.effects.length = 0;
7329
7534
  suspense.hiddenContainer = createElement("div");
7330
7535
  if (isInFallback) {
7331
7536
  patch(null, newBranch, suspense.hiddenContainer, null, parentComponent, suspense, namespace, slotScopeIds, optimized);
7332
7537
  if (suspense.deps <= 0) suspense.resolve();
7333
- else {
7538
+ else if (!suspense.isFallbackMountPending) {
7334
7539
  patch(activeBranch, newFallback, container, anchor, parentComponent, null, namespace, slotScopeIds, optimized);
7335
7540
  setActiveBranch(suspense, newFallback);
7336
7541
  }
@@ -7432,7 +7637,7 @@ var VueRuntimeDOM = (function(exports) {
7432
7637
  let hasUnresolvedAncestor = false;
7433
7638
  while (parent) {
7434
7639
  if (parent.pendingBranch) {
7435
- parent.effects.push(...effects);
7640
+ for (let i = 0; i < effects.length; i++) parent.effects.push(effects[i]);
7436
7641
  hasUnresolvedAncestor = true;
7437
7642
  break;
7438
7643
  }
@@ -7442,6 +7647,7 @@ var VueRuntimeDOM = (function(exports) {
7442
7647
  suspense.effects = [];
7443
7648
  if (isSuspensible) {
7444
7649
  if (parentSuspense && parentSuspense.pendingBranch && parentSuspenseId === parentSuspense.pendingId) {
7650
+ parentSuspenseId = void 0;
7445
7651
  parentSuspense.deps--;
7446
7652
  if (parentSuspense.deps === 0 && !sync) parentSuspense.resolve();
7447
7653
  }
@@ -7456,8 +7662,9 @@ var VueRuntimeDOM = (function(exports) {
7456
7662
  const mountFallback = () => {
7457
7663
  suspense.isFallbackMountPending = false;
7458
7664
  if (!suspense.isInFallback) return;
7459
- patch(null, fallbackVNode, container, anchor, parentComponent, null, namespace, slotScopeIds, optimized);
7460
- setActiveBranch(suspense, fallbackVNode);
7665
+ const latestFallback = suspense.vnode.ssFallback;
7666
+ patch(null, latestFallback, container, anchor, parentComponent, null, namespace, slotScopeIds, optimized);
7667
+ setActiveBranch(suspense, latestFallback);
7461
7668
  };
7462
7669
  const delayEnter = fallbackVNode.transition && fallbackVNode.transition.mode === "out-in";
7463
7670
  if (delayEnter) {
@@ -7478,11 +7685,16 @@ var VueRuntimeDOM = (function(exports) {
7478
7685
  registerDep(instance, onResolve) {
7479
7686
  const isInPendingSuspense = !!suspense.pendingBranch;
7480
7687
  if (isInPendingSuspense) suspense.deps++;
7688
+ const hydratedEl = instance.vnode && instance.vnode.el;
7481
7689
  instance.asyncDep.catch((err) => {
7482
7690
  handleError(err, instance, 0);
7483
7691
  }).then((asyncSetupResult) => {
7484
7692
  if (instance.isUnmounted || suspense.isUnmounted || suspense.pendingId !== instance.suspenseId) return;
7485
7693
  setCurrentInstance(null, void 0);
7694
+ if (hydratedEl && !instance.scope.active) {
7695
+ if (isInPendingSuspense && --suspense.deps === 0) suspense.resolve();
7696
+ return;
7697
+ }
7486
7698
  instance.asyncResolved = true;
7487
7699
  onResolve(asyncSetupResult);
7488
7700
  if (isInPendingSuspense && --suspense.deps === 0) suspense.resolve();
@@ -7533,9 +7745,10 @@ var VueRuntimeDOM = (function(exports) {
7533
7745
  return s;
7534
7746
  }
7535
7747
  function queueEffectWithSuspense(fn, id, suspense) {
7536
- if (suspense && suspense.pendingBranch) if (isArray(fn)) suspense.effects.push(...fn);
7537
- else suspense.effects.push(fn);
7538
- else queuePostFlushCb(fn, id);
7748
+ if (suspense && suspense.pendingBranch) {
7749
+ if (isArray(fn)) suspense.effects.push(...fn);
7750
+ else suspense.effects.push(fn);
7751
+ } else queuePostFlushCb(fn, id);
7539
7752
  }
7540
7753
  function setActiveBranch(suspense, branch) {
7541
7754
  suspense.activeBranch = branch;
@@ -7702,9 +7915,24 @@ var VueRuntimeDOM = (function(exports) {
7702
7915
  if (shapeFlag & 128) type.normalize(vnode);
7703
7916
  } else if (children) vnode.shapeFlag |= isString(children) ? 8 : 16;
7704
7917
  if (vnode.key !== vnode.key) warn$1(`VNode created with invalid key (NaN). VNode type:`, vnode.type);
7918
+ if (props && vnode.shapeFlag & 1) {
7919
+ const overwritingProp = props.innerHTML != null ? "innerHTML" : props.textContent != null ? "textContent" : null;
7920
+ if (overwritingProp && hasContentChildren(vnode.children)) warn$1(`The \`${overwritingProp}\` prop on <${vnode.type}> will override its children. Remove either the \`${overwritingProp}\` prop or the children.`);
7921
+ }
7705
7922
  if (isBlockTreeEnabled > 0 && !isBlockNode && currentBlock && (vnode.patchFlag > 0 || shapeFlag & 6) && vnode.patchFlag !== 32) currentBlock.push(vnode);
7706
7923
  return vnode;
7707
7924
  }
7925
+ /**
7926
+ * dev only
7927
+ * Whether children would actually render something. Empty text and empty
7928
+ * arrays are ignored, mirroring the compiler's `node.children.length` check
7929
+ * for `v-html` / `v-text`.
7930
+ */
7931
+ function hasContentChildren(children) {
7932
+ if (isString(children)) return children !== "";
7933
+ if (isArray(children)) return children.length > 0;
7934
+ return false;
7935
+ }
7708
7936
  const createVNode = createVNodeWithArgsTransform;
7709
7937
  function _createVNode(type, props = null, children = null, patchFlag = 0, dynamicProps = null, isBlockNode = false) {
7710
7938
  if (!type || type === NULL_DYNAMIC_COMPONENT) {
@@ -7714,8 +7942,10 @@ var VueRuntimeDOM = (function(exports) {
7714
7942
  if (isVNode(type)) {
7715
7943
  const cloned = cloneVNode(type, props, true);
7716
7944
  if (children) normalizeChildren(cloned, children);
7717
- if (isBlockTreeEnabled > 0 && !isBlockNode && currentBlock) if (cloned.shapeFlag & 6) currentBlock[currentBlock.indexOf(type)] = cloned;
7718
- else currentBlock.push(cloned);
7945
+ if (isBlockTreeEnabled > 0 && !isBlockNode && currentBlock) {
7946
+ if (cloned.shapeFlag & 6) currentBlock[currentBlock.indexOf(type)] = cloned;
7947
+ else currentBlock.push(cloned);
7948
+ }
7719
7949
  cloned.patchFlag = -2;
7720
7950
  return cloned;
7721
7951
  }
@@ -7775,7 +8005,10 @@ var VueRuntimeDOM = (function(exports) {
7775
8005
  ce: vnode.ce,
7776
8006
  vi: vnode.vi,
7777
8007
  vs: cloneVaporSlotMeta(vnode),
7778
- vb: vnode.vb
8008
+ vb: vnode.vb,
8009
+ ibu: vnode.ibu,
8010
+ iu: vnode.iu,
8011
+ cacheIndex: vnode.cacheIndex
7779
8012
  };
7780
8013
  if (transition && cloneTransition) setTransitionHooks(cloned, transition.clone(cloned));
7781
8014
  return cloned;
@@ -7785,8 +8018,7 @@ var VueRuntimeDOM = (function(exports) {
7785
8018
  if (!vaporSlot) return vaporSlot;
7786
8019
  const cloned = {
7787
8020
  slot: vaporSlot.slot,
7788
- fallback: vaporSlot.fallback,
7789
- outletFallback: vaporSlot.outletFallback
8021
+ outlets: vaporSlot.outlets
7790
8022
  };
7791
8023
  if (vnode.el) {
7792
8024
  cloned.state = vaporSlot.state;
@@ -7838,25 +8070,28 @@ var VueRuntimeDOM = (function(exports) {
7838
8070
  const { shapeFlag } = vnode;
7839
8071
  if (children == null) children = null;
7840
8072
  else if (isArray(children)) type = 16;
7841
- else if (typeof children === "object") if (shapeFlag & 65) {
7842
- const slot = children.default;
7843
- if (slot) {
7844
- slot._c && (slot._d = false);
7845
- normalizeChildren(vnode, slot());
7846
- slot._c && (slot._d = true);
7847
- }
7848
- return;
7849
- } else {
7850
- type = 32;
7851
- const slotFlag = children._;
7852
- if (!slotFlag && !isInternalObject(children)) children._ctx = currentRenderingInstance;
7853
- else if (slotFlag === 3 && currentRenderingInstance) if (currentRenderingInstance.slots._ === 1) children._ = 1;
7854
- else {
7855
- children._ = 2;
7856
- vnode.patchFlag |= 1024;
8073
+ else if (typeof children === "object") {
8074
+ if (shapeFlag & 65) {
8075
+ const slot = children.default;
8076
+ if (slot) {
8077
+ slot._c && (slot._d = false);
8078
+ normalizeChildren(vnode, slot());
8079
+ slot._c && (slot._d = true);
8080
+ }
8081
+ return;
8082
+ } else {
8083
+ type = 32;
8084
+ const slotFlag = children._;
8085
+ if (!slotFlag && !isInternalObject(children)) children._ctx = currentRenderingInstance;
8086
+ else if (slotFlag === 3 && currentRenderingInstance) {
8087
+ if (currentRenderingInstance.slots._ === 1) children._ = 1;
8088
+ else {
8089
+ children._ = 2;
8090
+ vnode.patchFlag |= 1024;
8091
+ }
8092
+ }
7857
8093
  }
7858
- }
7859
- else if (isFunction(children)) {
8094
+ } else if (isFunction(children)) {
7860
8095
  if (shapeFlag & 65) {
7861
8096
  normalizeChildren(vnode, { default: children });
7862
8097
  return;
@@ -7924,6 +8159,16 @@ var VueRuntimeDOM = (function(exports) {
7924
8159
  simpleSetCurrentInstance(instance);
7925
8160
  }
7926
8161
  };
8162
+ /**
8163
+ * Restores a snapshot returned by {@link setCurrentInstance}. Unlike calling
8164
+ * `setCurrentInstance(...prev)`, an `undefined` saved scope is restored
8165
+ * verbatim instead of re-triggering the `instance.scope` default.
8166
+ * @internal
8167
+ */
8168
+ const restoreCurrentInstance = (prev) => {
8169
+ setCurrentScope(prev[1]);
8170
+ simpleSetCurrentInstance(prev[0]);
8171
+ };
7927
8172
  const internalOptions = [
7928
8173
  "ce",
7929
8174
  "type",
@@ -7955,7 +8200,7 @@ var VueRuntimeDOM = (function(exports) {
7955
8200
  };
7956
8201
  //#endregion
7957
8202
  //#region packages/runtime-core/src/component.ts
7958
- const emptyAppContext = /* @__PURE__ */ createAppContext();
8203
+ const emptyAppContext = /*@__PURE__*/ createAppContext();
7959
8204
  let uid = 0;
7960
8205
  function createComponentInstance(vnode, parent, suspense) {
7961
8206
  const type = vnode.type;
@@ -8075,7 +8320,7 @@ var VueRuntimeDOM = (function(exports) {
8075
8320
  const setupResult = callWithErrorHandling(setup, instance, 0, [/* @__PURE__ */ shallowReadonly(instance.props), setupContext]);
8076
8321
  const isAsyncSetup = isPromise(setupResult);
8077
8322
  setActiveSub(prevSub);
8078
- setCurrentInstance(...prev);
8323
+ restoreCurrentInstance(prev);
8079
8324
  if ((isAsyncSetup || instance.sp) && !isAsyncWrapper(instance)) markAsyncBoundary(instance);
8080
8325
  if (isAsyncSetup) {
8081
8326
  const unsetCurrentInstance = () => {
@@ -8083,7 +8328,12 @@ var VueRuntimeDOM = (function(exports) {
8083
8328
  };
8084
8329
  setupResult.then(unsetCurrentInstance, unsetCurrentInstance);
8085
8330
  if (isSSR) return setupResult.then((resolvedResult) => {
8086
- handleSetupResult(instance, resolvedResult, isSSR);
8331
+ setInSSRSetupState(true);
8332
+ try {
8333
+ handleSetupResult(instance, resolvedResult, isSSR);
8334
+ } finally {
8335
+ setInSSRSetupState(false);
8336
+ }
8087
8337
  }).catch((e) => {
8088
8338
  handleError(e, instance, 0);
8089
8339
  });
@@ -8144,13 +8394,15 @@ var VueRuntimeDOM = (function(exports) {
8144
8394
  applyOptions(instance);
8145
8395
  } finally {
8146
8396
  setActiveSub(prevSub);
8147
- setCurrentInstance(...prevInstance);
8397
+ restoreCurrentInstance(prevInstance);
8148
8398
  }
8149
8399
  }
8150
- if (!Component.render && instance.render === NOOP && !isSSR) if (!compile && Component.template)
8400
+ if (!Component.render && instance.render === NOOP && !isSSR) {
8401
+ if (!compile && Component.template)
8151
8402
  /* v8 ignore start */
8152
- warn$1("Component provided template option but runtime compilation is not supported in this build of Vue. Use \"vue.global.js\" instead.");
8153
- else warn$1(`Component is missing template or render function: `, Component);
8403
+ warn$1("Component provided template option but runtime compilation is not supported in this build of Vue. Use \"vue.global.js\" instead.");
8404
+ else warn$1(`Component is missing template or render function: `, Component);
8405
+ }
8154
8406
  }
8155
8407
  const attrsProxyHandlers = {
8156
8408
  get(target, key) {
@@ -8213,14 +8465,13 @@ var VueRuntimeDOM = (function(exports) {
8213
8465
  if (instance.exposed) return instance.exposeProxy || (instance.exposeProxy = new Proxy(proxyRefs(markRaw(instance.exposed)), {
8214
8466
  get(target, key) {
8215
8467
  if (key in target) return target[key];
8216
- else {
8468
+ else if (!instance.vapor) {
8217
8469
  const publicPropertiesMap = getPublicPropertiesMap();
8218
8470
  if (key in publicPropertiesMap) return publicPropertiesMap[key](instance);
8219
8471
  }
8220
8472
  },
8221
8473
  has(target, key) {
8222
- const publicPropertiesMap = getPublicPropertiesMap();
8223
- return key in target || key in publicPropertiesMap;
8474
+ return key in target || !instance.vapor && key in getPublicPropertiesMap();
8224
8475
  }
8225
8476
  }));
8226
8477
  else return instance.proxy;
@@ -8258,11 +8509,12 @@ var VueRuntimeDOM = (function(exports) {
8258
8509
  try {
8259
8510
  setBlockTracking(-1);
8260
8511
  const l = arguments.length;
8261
- if (l === 2) if (isObject(propsOrChildren) && !isArray(propsOrChildren)) {
8262
- if (isVNode(propsOrChildren)) return createVNode(type, null, [propsOrChildren]);
8263
- return createVNode(type, propsOrChildren);
8264
- } else return createVNode(type, null, propsOrChildren);
8265
- else {
8512
+ if (l === 2) {
8513
+ if (isObject(propsOrChildren) && !isArray(propsOrChildren)) {
8514
+ if (isVNode(propsOrChildren)) return createVNode(type, null, [propsOrChildren]);
8515
+ return createVNode(type, propsOrChildren);
8516
+ } else return createVNode(type, null, propsOrChildren);
8517
+ } else {
8266
8518
  if (l > 3) children = Array.prototype.slice.call(arguments, 2);
8267
8519
  else if (l === 3 && isVNode(children)) children = [children];
8268
8520
  return createVNode(type, propsOrChildren, children);
@@ -8454,7 +8706,7 @@ var VueRuntimeDOM = (function(exports) {
8454
8706
  }
8455
8707
  //#endregion
8456
8708
  //#region packages/runtime-core/src/index.ts
8457
- const version = "3.6.0-rc.1";
8709
+ const version = "3.6.0-rc.10";
8458
8710
  const warn = warn$1;
8459
8711
  /**
8460
8712
  * Runtime error messages. Only exposed in dev or esm builds.
@@ -8482,7 +8734,7 @@ var VueRuntimeDOM = (function(exports) {
8482
8734
  let policy = void 0;
8483
8735
  const tt = typeof window !== "undefined" && window.trustedTypes;
8484
8736
  if (tt) try {
8485
- policy = /* @__PURE__ */ tt.createPolicy("vue", { createHTML: (val) => val });
8737
+ policy = /*@__PURE__*/ tt.createPolicy("vue", { createHTML: (val) => val });
8486
8738
  } catch (e) {
8487
8739
  warn(`Error creating trusted types policy: ${e}`);
8488
8740
  }
@@ -8490,7 +8742,7 @@ var VueRuntimeDOM = (function(exports) {
8490
8742
  const svgNS = "http://www.w3.org/2000/svg";
8491
8743
  const mathmlNS = "http://www.w3.org/1998/Math/MathML";
8492
8744
  const doc = typeof document !== "undefined" ? document : null;
8493
- const templateContainer = doc && /* @__PURE__ */ doc.createElement("template");
8745
+ const templateContainer = doc && /*@__PURE__*/ doc.createElement("template");
8494
8746
  const nodeOps = {
8495
8747
  insert: (child, parent, anchor) => {
8496
8748
  parent.insertBefore(child, anchor || null);
@@ -8564,7 +8816,7 @@ var VueRuntimeDOM = (function(exports) {
8564
8816
  leaveActiveClass: String,
8565
8817
  leaveToClass: String
8566
8818
  };
8567
- const TransitionPropsValidators = /* @__PURE__ */ extend({}, BaseTransitionPropsValidators, DOMTransitionPropsValidators);
8819
+ const TransitionPropsValidators = /*@__PURE__*/ extend({}, BaseTransitionPropsValidators, DOMTransitionPropsValidators);
8568
8820
  /**
8569
8821
  * Wrap logic that attaches extra properties to Transition in a function
8570
8822
  * so that it can be annotated as pure
@@ -8578,7 +8830,7 @@ var VueRuntimeDOM = (function(exports) {
8578
8830
  * DOM Transition is a higher-order-component based on the platform-agnostic
8579
8831
  * base Transition component, with DOM-specific logic.
8580
8832
  */
8581
- const Transition = /* @__PURE__ */ decorate$1((props, { slots }) => h(BaseTransition, resolveTransitionProps(props), slots));
8833
+ const Transition = /*@__PURE__*/ decorate$1((props, { slots }) => h(BaseTransition, resolveTransitionProps(props), slots));
8582
8834
  /**
8583
8835
  * #3227 Incoming hooks may be merged into arrays when wrapping Transition
8584
8836
  * with custom HOCs.
@@ -8800,14 +9052,15 @@ var VueRuntimeDOM = (function(exports) {
8800
9052
  },
8801
9053
  updated(el, { value, oldValue }, { transition }) {
8802
9054
  if (!value === !oldValue) return;
8803
- if (transition) if (value) {
8804
- transition.beforeEnter(el);
8805
- setDisplay(el, true);
8806
- transition.enter(el);
8807
- } else transition.leave(el, () => {
8808
- setDisplay(el, false);
8809
- });
8810
- else setDisplay(el, value);
9055
+ if (transition) {
9056
+ if (value) {
9057
+ transition.beforeEnter(el);
9058
+ setDisplay(el, true);
9059
+ transition.enter(el);
9060
+ } else transition.leave(el, () => {
9061
+ setDisplay(el, false);
9062
+ });
9063
+ } else setDisplay(el, value);
8811
9064
  },
8812
9065
  beforeUnmount(el, { value }) {
8813
9066
  setDisplay(el, value);
@@ -8826,49 +9079,20 @@ var VueRuntimeDOM = (function(exports) {
8826
9079
  */
8827
9080
  function useCssVars(getter) {
8828
9081
  const instance = getCurrentInstance();
8829
- const getVars = () => getter(instance.proxy);
8830
- const setVars = (vars) => {
8831
- if (instance.ce) setVarsOnNode(instance.ce, vars);
8832
- else setVarsOnVNode(instance.subTree, vars);
8833
- };
8834
- baseUseCssVars(instance, () => instance.subTree.el.parentNode, getVars, setVars);
8835
- }
8836
- function setVarsOnVNode(vnode, vars) {
8837
- if (vnode.shapeFlag & 128) {
8838
- const suspense = vnode.suspense;
8839
- vnode = suspense.activeBranch;
8840
- if (suspense.pendingBranch && !suspense.isHydrating) suspense.effects.push(() => {
8841
- setVarsOnVNode(suspense.activeBranch, vars);
8842
- });
8843
- }
8844
- while (vnode.component) vnode = vnode.component.subTree;
8845
- if (vnode.shapeFlag & 1 && vnode.el) setVarsOnNode(vnode.el, vars);
8846
- else if (vnode.type === Fragment) vnode.children.forEach((c) => setVarsOnVNode(c, vars));
8847
- else if (vnode.type === Static) {
8848
- let { el, anchor } = vnode;
8849
- while (el) {
8850
- setVarsOnNode(el, vars);
8851
- if (el === anchor) break;
8852
- el = el.nextSibling;
8853
- }
8854
- }
8855
- }
8856
- /**
8857
- * @internal
8858
- * shared between vdom and vapor
8859
- */
8860
- function baseUseCssVars(instance, getParentNode, getVars, setVars) {
8861
9082
  /* v8 ignore start */
8862
9083
  if (!instance) {
8863
9084
  warn(`useCssVars is called without current active component instance.`);
8864
9085
  return;
8865
9086
  }
9087
+ /* v8 ignore stop */
9088
+ const getVars = () => getter(instance.proxy);
8866
9089
  instance.getCssVars = getVars;
8867
9090
  const updateTeleports = instance.ut = (vars = getVars()) => {
8868
9091
  Array.from(document.querySelectorAll(`[data-v-owner="${instance.uid}"]`)).forEach((node) => setVarsOnNode(node, vars));
8869
9092
  };
8870
9093
  const applyCssVars = (vars = getVars()) => {
8871
- setVars(vars);
9094
+ if (instance.ce) setVarsOnNode(instance.ce, vars);
9095
+ else setVarsOnVNode(instance.subTree, vars);
8872
9096
  updateTeleports(vars);
8873
9097
  };
8874
9098
  onBeforeUpdate(() => {
@@ -8881,10 +9105,38 @@ var VueRuntimeDOM = (function(exports) {
8881
9105
  applyCssVars(vars);
8882
9106
  }, NOOP, { flush: "post" });
8883
9107
  const ob = new MutationObserver(() => applyCssVars());
8884
- ob.observe(getParentNode(), { childList: true });
9108
+ ob.observe(instance.subTree.el.parentNode, { childList: true });
8885
9109
  onUnmounted(() => ob.disconnect());
8886
9110
  });
8887
9111
  }
9112
+ function setVarsOnVNode(vnode, vars) {
9113
+ if (vnode.shapeFlag & 128) {
9114
+ const suspense = vnode.suspense;
9115
+ vnode = suspense.activeBranch;
9116
+ if (suspense.pendingBranch && !suspense.isHydrating) suspense.effects.push(() => {
9117
+ setVarsOnVNode(suspense.activeBranch, vars);
9118
+ });
9119
+ }
9120
+ while (vnode.component) {
9121
+ const component = vnode.component;
9122
+ if (component.vapor) {
9123
+ component.appContext.vapor.applyCssVars(vnode, vars);
9124
+ return;
9125
+ }
9126
+ vnode = vnode.component.subTree;
9127
+ }
9128
+ if (vnode.shapeFlag & 1 && vnode.el) setVarsOnNode(vnode.el, vars);
9129
+ else if (vnode.vb) vnode.ctx.appContext.vapor.applyCssVars(vnode, vars);
9130
+ else if (vnode.type === Fragment) vnode.children.forEach((c) => setVarsOnVNode(c, vars));
9131
+ else if (vnode.type === Static) {
9132
+ let { el, anchor } = vnode;
9133
+ while (el) {
9134
+ setVarsOnNode(el, vars);
9135
+ if (el === anchor) break;
9136
+ el = el.nextSibling;
9137
+ }
9138
+ }
9139
+ }
8888
9140
  /**
8889
9141
  * @internal
8890
9142
  * shared between vdom and vapor
@@ -8909,11 +9161,13 @@ var VueRuntimeDOM = (function(exports) {
8909
9161
  const isCssString = isString(next);
8910
9162
  let hasControlledDisplay = false;
8911
9163
  if (next && !isCssString) {
8912
- if (prev) if (!isString(prev)) {
8913
- for (const key in prev) if (next[key] == null) setStyle(style, key, "");
8914
- } else for (const prevStyle of prev.split(";")) {
8915
- const key = prevStyle.slice(0, prevStyle.indexOf(":")).trim();
8916
- if (next[key] == null) setStyle(style, key, "");
9164
+ if (prev) {
9165
+ if (!isString(prev)) {
9166
+ for (const key in prev) if (next[key] == null) setStyle(style, key, "");
9167
+ } else for (const prevStyle of prev.split(";")) {
9168
+ const key = prevStyle.slice(0, prevStyle.indexOf(":")).trim();
9169
+ if (next[key] == null) setStyle(style, key, "");
9170
+ }
8917
9171
  }
8918
9172
  for (const key in next) {
8919
9173
  if (key === "display") hasControlledDisplay = true;
@@ -8929,7 +9183,11 @@ var VueRuntimeDOM = (function(exports) {
8929
9183
  style.cssText = next;
8930
9184
  hasControlledDisplay = displayRE.test(next);
8931
9185
  }
8932
- } else if (prev) el.removeAttribute("style");
9186
+ } else if (prev) {
9187
+ const cssVarText = style[CSS_VAR_TEXT];
9188
+ if (cssVarText) style.cssText = cssVarText;
9189
+ else el.removeAttribute("style");
9190
+ }
8933
9191
  if (vShowOriginalDisplay in el) {
8934
9192
  el[vShowOriginalDisplay] = hasControlledDisplay ? style.display : "";
8935
9193
  if (el[vShowHidden]) style.display = "none";
@@ -8942,8 +9200,10 @@ var VueRuntimeDOM = (function(exports) {
8942
9200
  else {
8943
9201
  const val = rawVal == null ? "" : String(rawVal);
8944
9202
  if (semicolonRE.test(val)) warn(`Unexpected semicolon at the end of '${name}' style value: '${val}'`);
8945
- if (name.startsWith("--")) style.setProperty(name, val);
8946
- else {
9203
+ if (name.startsWith("--")) {
9204
+ if (importantRE.test(val)) style.setProperty(name, val.replace(importantRE, ""), "important");
9205
+ else style.setProperty(name, val);
9206
+ } else {
8947
9207
  const prefixed = autoPrefix(style, name);
8948
9208
  if (importantRE.test(val)) style.setProperty(hyphenate(prefixed), val.replace(importantRE, ""), "important");
8949
9209
  else style[prefixed] = val;
@@ -8980,9 +9240,10 @@ var VueRuntimeDOM = (function(exports) {
8980
9240
  //#region packages/runtime-dom/src/modules/attrs.ts
8981
9241
  const xlinkNS = "http://www.w3.org/1999/xlink";
8982
9242
  function patchAttr(el, key, value, isSVG, instance, isBoolean = isSpecialBooleanAttr(key)) {
8983
- if (isSVG && key.startsWith("xlink:")) if (value == null) el.removeAttributeNS(xlinkNS, key.slice(6, key.length));
8984
- else el.setAttributeNS(xlinkNS, key, value);
8985
- else if (value == null || isBoolean && !includeBooleanAttr(value)) el.removeAttribute(key);
9243
+ if (isSVG && key.startsWith("xlink:")) {
9244
+ if (value == null) el.removeAttributeNS(xlinkNS, key.slice(6, key.length));
9245
+ else el.setAttributeNS(xlinkNS, key, value);
9246
+ } else if (value == null || isBoolean && !includeBooleanAttr(value)) el.removeAttribute(key);
8986
9247
  else el.setAttribute(key, isBoolean ? "" : isSymbol(value) ? String(value) : value);
8987
9248
  }
8988
9249
  //#endregion
@@ -9055,7 +9316,7 @@ var VueRuntimeDOM = (function(exports) {
9055
9316
  return [name[2] === ":" ? name.slice(3) : hyphenate(name.slice(2)), options];
9056
9317
  }
9057
9318
  let cachedNow = 0;
9058
- const p = /* @__PURE__ */ Promise.resolve();
9319
+ const p = /*@__PURE__*/ Promise.resolve();
9059
9320
  const getNow = () => cachedNow || (p.then(() => cachedNow = 0), cachedNow = Date.now());
9060
9321
  function createInvoker(initialValue, instance) {
9061
9322
  const invoker = (e) => {
@@ -9123,7 +9384,7 @@ var VueRuntimeDOM = (function(exports) {
9123
9384
  //#endregion
9124
9385
  //#region packages/runtime-dom/src/apiCustomElement.ts
9125
9386
  const REMOVAL = {};
9126
- /* @__NO_SIDE_EFFECTS__ */
9387
+ /*@__NO_SIDE_EFFECTS__*/
9127
9388
  function defineCustomElement(options, extraOptions, _createApp) {
9128
9389
  let Comp = /* @__PURE__ */ defineComponent(options, extraOptions);
9129
9390
  if (isPlainObject(Comp)) Comp = extend({}, Comp, extraOptions);
@@ -9172,12 +9433,14 @@ var VueRuntimeDOM = (function(exports) {
9172
9433
  this._parent = parent;
9173
9434
  break;
9174
9435
  }
9175
- if (!this._instance) if (this._resolved) this._mountComponent(this._def);
9176
- else if (parent && parent._pendingResolve) this._pendingResolve = parent._pendingResolve.then(() => {
9177
- this._pendingResolve = void 0;
9178
- this._resolveDef();
9179
- });
9180
- else this._resolveDef();
9436
+ if (!this._instance) {
9437
+ if (this._resolved) this._mountComponent(this._def);
9438
+ else if (parent && parent._pendingResolve) this._pendingResolve = parent._pendingResolve.then(() => {
9439
+ this._pendingResolve = void 0;
9440
+ if (this.isConnected) return this._resolveDef();
9441
+ });
9442
+ else this._resolveDef();
9443
+ }
9181
9444
  }
9182
9445
  disconnectedCallback() {
9183
9446
  this._connected = false;
@@ -9211,7 +9474,7 @@ var VueRuntimeDOM = (function(exports) {
9211
9474
  * resolve inner component definition (handle possible async component)
9212
9475
  */
9213
9476
  _resolveDef() {
9214
- if (this._pendingResolve) return;
9477
+ if (this._pendingResolve) return this._pendingResolve;
9215
9478
  for (let i = 0; i < this.attributes.length; i++) this._setAttr(this.attributes[i].name);
9216
9479
  this._ob = new MutationObserver(this._processMutations.bind(this));
9217
9480
  this._ob.observe(this, { attributes: true });
@@ -9241,6 +9504,7 @@ var VueRuntimeDOM = (function(exports) {
9241
9504
  this._def = def;
9242
9505
  resolve(def);
9243
9506
  });
9507
+ return this._pendingResolve;
9244
9508
  } else resolve(this._def);
9245
9509
  }
9246
9510
  _mountComponent(def) {
@@ -9279,14 +9543,17 @@ var VueRuntimeDOM = (function(exports) {
9279
9543
  const { props } = def;
9280
9544
  const declaredPropKeys = isArray(props) ? props : Object.keys(props || {});
9281
9545
  for (const key of Object.keys(this)) if (key[0] !== "_" && declaredPropKeys.includes(key)) this._setProp(key, this[key]);
9282
- for (const key of declaredPropKeys.map(camelize)) Object.defineProperty(this, key, {
9283
- get() {
9284
- return this._getProp(key);
9285
- },
9286
- set(val) {
9287
- this._setProp(key, val, true, !this._patching);
9288
- }
9289
- });
9546
+ for (const key of declaredPropKeys.map(camelize)) {
9547
+ if (key in Object.getPrototypeOf(this)) warn(`Custom element prop "${key}" conflicts with an existing property on the element and will overwrite it.`);
9548
+ Object.defineProperty(this, key, {
9549
+ get() {
9550
+ return this._getProp(key);
9551
+ },
9552
+ set(val) {
9553
+ this._setProp(key, val, true, !this._patching);
9554
+ }
9555
+ });
9556
+ }
9290
9557
  }
9291
9558
  _setAttr(key) {
9292
9559
  if (key.startsWith("data-v-")) return;
@@ -9389,13 +9656,11 @@ var VueRuntimeDOM = (function(exports) {
9389
9656
  _renderSlots() {
9390
9657
  const outlets = this._getSlots();
9391
9658
  const scopeId = this._instance.type.__scopeId;
9392
- const slotReplacements = /* @__PURE__ */ new Map();
9393
9659
  for (let i = 0; i < outlets.length; i++) {
9394
9660
  const o = outlets[i];
9395
9661
  const slotName = o.getAttribute("name") || "default";
9396
9662
  const content = this._slots[slotName];
9397
9663
  const parent = o.parentNode;
9398
- const replacementNodes = [];
9399
9664
  if (content) for (const n of content) {
9400
9665
  if (scopeId && n.nodeType === 1) {
9401
9666
  const id = scopeId + "-s";
@@ -9405,20 +9670,10 @@ var VueRuntimeDOM = (function(exports) {
9405
9670
  while (child = walker.nextNode()) child.setAttribute(id, "");
9406
9671
  }
9407
9672
  parent.insertBefore(n, o);
9408
- replacementNodes.push(n);
9409
- }
9410
- else while (o.firstChild) {
9411
- const child = o.firstChild;
9412
- parent.insertBefore(child, o);
9413
- replacementNodes.push(child);
9414
9673
  }
9674
+ else while (o.firstChild) parent.insertBefore(o.firstChild, o);
9415
9675
  parent.removeChild(o);
9416
- slotReplacements.set(o, {
9417
- nodes: replacementNodes,
9418
- usedFallback: !content
9419
- });
9420
9676
  }
9421
- this._updateSlotNodes(slotReplacements);
9422
9677
  }
9423
9678
  /**
9424
9679
  * @internal
@@ -9457,7 +9712,7 @@ var VueRuntimeDOM = (function(exports) {
9457
9712
  * @internal
9458
9713
  */
9459
9714
  _hasShadowRoot() {
9460
- return this._def.shadowRoot !== false;
9715
+ return this._root !== this;
9461
9716
  }
9462
9717
  /**
9463
9718
  * @internal
@@ -9502,10 +9757,6 @@ var VueRuntimeDOM = (function(exports) {
9502
9757
  if (this._instance && this._instance.ce) this._instance.ce = void 0;
9503
9758
  this._app = this._instance = null;
9504
9759
  }
9505
- /**
9506
- * Only called when shadowRoot is false
9507
- */
9508
- _updateSlotNodes(replacements) {}
9509
9760
  _createVNode() {
9510
9761
  const baseProps = {};
9511
9762
  if (!this.shadowRoot) baseProps.onVnodeMounted = baseProps.onVnodeUpdated = this._renderSlots.bind(this);
@@ -9555,7 +9806,7 @@ var VueRuntimeDOM = (function(exports) {
9555
9806
  };
9556
9807
  const TransitionGroup = /* @__PURE__ */ decorate({
9557
9808
  name: "TransitionGroup",
9558
- props: /* @__PURE__ */ extend({}, TransitionPropsValidators, {
9809
+ props: /*@__PURE__*/ extend({}, TransitionPropsValidators, {
9559
9810
  tag: String,
9560
9811
  moveClass: String
9561
9812
  }),
@@ -9686,13 +9937,22 @@ var VueRuntimeDOM = (function(exports) {
9686
9937
  }
9687
9938
  }
9688
9939
  const assignKey = Symbol("_assign");
9940
+ const initialValueKey = Symbol("_initialValue");
9689
9941
  const vModelText = {
9690
9942
  created(el, { modifiers: { lazy, trim, number } }, vnode) {
9943
+ if (el.parentNode) {
9944
+ if (el.type === "text") el[initialValueKey] = el.defaultValue.replace(/[\r\n]/g, "");
9945
+ else if (el.type === "textarea") el[initialValueKey] = el.defaultValue.replace(/\r\n?/g, "\n");
9946
+ }
9691
9947
  el[assignKey] = getModelAssigner(vnode);
9692
9948
  vModelTextInit(el, trim, number || !!(vnode.props && vnode.props.type === "number"), lazy);
9693
9949
  },
9694
- mounted(el, { value }) {
9695
- el.value = value == null ? "" : value;
9950
+ mounted(el, { value, modifiers: { trim, number } }) {
9951
+ const newValue = value == null ? "" : value;
9952
+ const initialValue = el[initialValueKey];
9953
+ delete el[initialValueKey];
9954
+ if (initialValue !== void 0 && (el.type === "text" || el.type === "textarea") && el.value !== initialValue) el[assignKey](castValue(el.value, trim, number));
9955
+ else el.value = newValue;
9696
9956
  },
9697
9957
  beforeUpdate(el, { value, oldValue, modifiers: { lazy, trim, number } }, vnode) {
9698
9958
  el[assignKey] = getModelAssigner(vnode);
@@ -9827,19 +10087,39 @@ var VueRuntimeDOM = (function(exports) {
9827
10087
  el._modelValue = value;
9828
10088
  addEventListener(el, "change", () => {
9829
10089
  const selectedVal = Array.prototype.filter.call(el.options, (o) => o.selected).map((o) => number ? looseToNumber(getValue(o)) : getValue(o));
9830
- (set || el[assignKey])(el.multiple ? isSet(el._modelValue) ? new Set(selectedVal) : selectedVal : selectedVal[0]);
9831
- el._assigning = true;
9832
- nextTick(() => {
9833
- el._assigning = false;
9834
- });
10090
+ const multiple = el.multiple;
10091
+ const assignedValue = multiple ? isSet(el._modelValue) ? new Set(selectedVal) : selectedVal : selectedVal[0];
10092
+ const pending = el._pendingValue = [multiple, multiple ? isArray(assignedValue) ? selectedVal.slice() : selectedVal : assignedValue];
10093
+ try {
10094
+ (set || el[assignKey])(assignedValue);
10095
+ } finally {
10096
+ nextTick(() => {
10097
+ if (el._pendingValue === pending) el._pendingValue = void 0;
10098
+ });
10099
+ }
9835
10100
  });
9836
10101
  };
10102
+ function isSameSelectValue(value, assignedValue, multiple) {
10103
+ if (!multiple) return looseEqual(value, assignedValue);
10104
+ if (isArray(value)) return looseEqual(value, assignedValue);
10105
+ if (isSet(value)) {
10106
+ if (value.size !== assignedValue.length) return false;
10107
+ for (const item of assignedValue) if (!value.has(item)) return false;
10108
+ return true;
10109
+ }
10110
+ return false;
10111
+ }
9837
10112
  /**
9838
10113
  * @internal
9839
10114
  */
9840
10115
  const vModelSetSelected = (el, value) => {
9841
10116
  el._modelValue = value;
9842
- if (el._assigning) return;
10117
+ const pending = el._pendingValue;
10118
+ el._pendingValue = void 0;
10119
+ if (pending && pending[0] === el.multiple && isSameSelectValue(value, pending[1], pending[0])) return;
10120
+ setSelected(el, value);
10121
+ };
10122
+ function setSelected(el, value) {
9843
10123
  const isMultiple = el.multiple;
9844
10124
  const isArrayValue = isArray(value);
9845
10125
  if (isMultiple && !isArrayValue && !isSet(value)) {
@@ -9849,18 +10129,19 @@ var VueRuntimeDOM = (function(exports) {
9849
10129
  for (let i = 0, l = el.options.length; i < l; i++) {
9850
10130
  const option = el.options[i];
9851
10131
  const optionValue = getValue(option);
9852
- if (isMultiple) if (isArrayValue) {
9853
- const optionType = typeof optionValue;
9854
- if (optionType === "string" || optionType === "number") option.selected = value.some((v) => String(v) === String(optionValue));
9855
- else option.selected = looseIndexOf(value, optionValue) > -1;
9856
- } else option.selected = value.has(optionValue);
9857
- else if (looseEqual(getValue(option), value)) {
10132
+ if (isMultiple) {
10133
+ if (isArrayValue) {
10134
+ const optionType = typeof optionValue;
10135
+ if (optionType === "string" || optionType === "number") option.selected = value.some((v) => String(v) === String(optionValue));
10136
+ else option.selected = looseIndexOf(value, optionValue) > -1;
10137
+ } else option.selected = value.has(optionValue);
10138
+ } else if (looseEqual(getValue(option), value)) {
9858
10139
  if (el.selectedIndex !== i) el.selectedIndex = i;
9859
10140
  return;
9860
10141
  }
9861
10142
  }
9862
10143
  if (!isMultiple && el.selectedIndex !== -1) el.selectedIndex = -1;
9863
- };
10144
+ }
9864
10145
  /**
9865
10146
  * @internal retrieve raw value set via :value bindings
9866
10147
  */
@@ -9962,7 +10243,7 @@ var VueRuntimeDOM = (function(exports) {
9962
10243
  };
9963
10244
  //#endregion
9964
10245
  //#region packages/runtime-dom/src/index.ts
9965
- const rendererOptions = /* @__PURE__ */ extend({ patchProp }, nodeOps);
10246
+ const rendererOptions = /*@__PURE__*/ extend({ patchProp }, nodeOps);
9966
10247
  let renderer;
9967
10248
  let enabledHydration = false;
9968
10249
  function ensureRenderer() {