@vue/compat 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/compat v3.6.0-rc.1
2
+ * @vue/compat v3.6.0-rc.10
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
@@ -23,7 +23,7 @@ var __exportAll = (all, no_symbols) => {
23
23
  * \/\*#\_\_PURE\_\_\*\/
24
24
  * So that they can be tree-shaken if necessary.
25
25
  */
26
- /* @__NO_SIDE_EFFECTS__ */
26
+ /*@__NO_SIDE_EFFECTS__*/
27
27
  function makeMap(str) {
28
28
  const map = Object.create(null);
29
29
  for (const key of str.split(",")) map[key] = 1;
@@ -67,9 +67,9 @@ const toRawType = (value) => {
67
67
  };
68
68
  const isPlainObject = (val) => toTypeString(val) === "[object Object]";
69
69
  const isIntegerKey = (key) => isString(key) && key !== "NaN" && key[0] !== "-" && "" + parseInt(key, 10) === key;
70
- const isReservedProp = /* @__PURE__ */ makeMap(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted");
71
- const isBuiltInTag = /* @__PURE__ */ makeMap("slot,component");
72
- const isBuiltInDirective = /* @__PURE__ */ makeMap("bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo");
70
+ const isReservedProp = /*@__PURE__*/ makeMap(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted");
71
+ const isBuiltInTag = /*#__PURE__*/ makeMap("slot,component");
72
+ const isBuiltInDirective = /*@__PURE__*/ makeMap("bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo");
73
73
  const cacheStringFunction = (fn) => {
74
74
  const cache = Object.create(null);
75
75
  return ((str) => {
@@ -177,7 +177,7 @@ const slotFlagsText = {
177
177
  [2]: "DYNAMIC",
178
178
  [3]: "FORWARDED"
179
179
  };
180
- 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");
180
+ 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");
181
181
  //#endregion
182
182
  //#region packages/shared/src/codeframe.ts
183
183
  const range = 2;
@@ -231,10 +231,10 @@ function normalizeStyle(value) {
231
231
  }
232
232
  const listDelimiterRE = /;(?![^(]*\))/g;
233
233
  const propertyDelimiterRE = /:([^]+)/;
234
- const styleCommentRE = /\/\*[^]*?\*\//g;
234
+ const styleCommentRE = /"(?:[^"\\]|\\[^])*"|'(?:[^'\\]|\\[^])*'|\\[^]|\/\*[^]*?\*\//g;
235
235
  function parseStringStyle(cssText) {
236
236
  const ret = {};
237
- cssText.replace(styleCommentRE, "").split(listDelimiterRE).forEach((item) => {
237
+ cssText.replace(styleCommentRE, (match) => match.startsWith("/*") ? "" : match).split(listDelimiterRE).forEach((item) => {
238
238
  if (item) {
239
239
  const tmp = item.split(propertyDelimiterRE);
240
240
  tmp.length > 1 && (ret[tmp[0].trim()] = tmp[1].trim());
@@ -284,22 +284,22 @@ const VOID_TAGS = "area,base,br,col,embed,hr,img,input,link,meta,param,source,tr
284
284
  * Compiler only.
285
285
  * Do NOT use in runtime code paths unless behind `__DEV__` flag.
286
286
  */
287
- const isHTMLTag = /* @__PURE__ */ makeMap(HTML_TAGS);
287
+ const isHTMLTag = /*@__PURE__*/ makeMap(HTML_TAGS);
288
288
  /**
289
289
  * Compiler only.
290
290
  * Do NOT use in runtime code paths unless behind `__DEV__` flag.
291
291
  */
292
- const isSVGTag = /* @__PURE__ */ makeMap(SVG_TAGS);
292
+ const isSVGTag = /*@__PURE__*/ makeMap(SVG_TAGS);
293
293
  /**
294
294
  * Compiler only.
295
295
  * Do NOT use in runtime code paths unless behind `__DEV__` flag.
296
296
  */
297
- const isMathMLTag = /* @__PURE__ */ makeMap(MATH_TAGS);
297
+ const isMathMLTag = /*@__PURE__*/ makeMap(MATH_TAGS);
298
298
  /**
299
299
  * Compiler only.
300
300
  * Do NOT use in runtime code paths unless behind `__DEV__` flag.
301
301
  */
302
- const isVoidTag = /* @__PURE__ */ makeMap(VOID_TAGS);
302
+ const isVoidTag = /*@__PURE__*/ makeMap(VOID_TAGS);
303
303
  //#endregion
304
304
  //#region packages/shared/src/domAttrConfig.ts
305
305
  /**
@@ -314,11 +314,11 @@ const isVoidTag = /* @__PURE__ */ makeMap(VOID_TAGS);
314
314
  * - readonly -> readOnly
315
315
  */
316
316
  const specialBooleanAttrs = `itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly`;
317
- const isSpecialBooleanAttr = /* @__PURE__ */ makeMap(specialBooleanAttrs);
317
+ const isSpecialBooleanAttr = /*@__PURE__*/ makeMap(specialBooleanAttrs);
318
318
  /**
319
319
  * The full list is needed during SSR to produce the correct initial markup.
320
320
  */
321
- const isBooleanAttr = /* @__PURE__ */ makeMap(specialBooleanAttrs + ",async,autofocus,autoplay,controls,default,defer,disabled,hidden,inert,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected");
321
+ const isBooleanAttr = /*@__PURE__*/ makeMap(specialBooleanAttrs + ",async,autofocus,autoplay,controls,default,defer,disabled,inert,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected");
322
322
  /**
323
323
  * Boolean attributes should be included if the value is truthy or ''.
324
324
  * e.g. `<select multiple>` compiles to `{ multiple: '' }`
@@ -332,11 +332,11 @@ function includeBooleanAttr(value) {
332
332
  * Don't also forget to allow `data-*` and `aria-*`!
333
333
  * Generated from https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes
334
334
  */
335
- 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");
335
+ 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");
336
336
  /**
337
337
  * Generated from https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute
338
338
  */
339
- 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");
339
+ 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");
340
340
  /**
341
341
  * Shared between server-renderer and runtime-core hydration logic
342
342
  */
@@ -362,13 +362,54 @@ function getEscapedCssVarName(key, doubleEscape) {
362
362
  }
363
363
  //#endregion
364
364
  //#region packages/shared/src/looseEqual.ts
365
- function looseCompareArrays(a, b) {
365
+ function looseCompareArrays(a, b, seen) {
366
366
  if (a.length !== b.length) return false;
367
367
  let equal = true;
368
- for (let i = 0; equal && i < a.length; i++) equal = looseEqual(a[i], b[i]);
368
+ for (let i = 0; equal && i < a.length; i++) equal = looseEqual(a[i], b[i], seen);
369
369
  return equal;
370
370
  }
371
- function looseEqual(a, b) {
371
+ function looseCompareCollections(a, b, seen) {
372
+ if (a.size !== b.size) return false;
373
+ const candidates = Array.from(b);
374
+ const matched = new Uint8Array(candidates.length);
375
+ for (const item of a) {
376
+ let index = -1;
377
+ for (let i = 0; i < candidates.length; i++) if (!matched[i] && looseEqual(item, candidates[i], seen)) {
378
+ index = i;
379
+ break;
380
+ }
381
+ if (index < 0) return false;
382
+ matched[index] = 1;
383
+ }
384
+ return true;
385
+ }
386
+ function looseCompareObjects(a, b, seen) {
387
+ let aValidType = isMap(a);
388
+ let bValidType = isMap(b);
389
+ if (aValidType || bValidType) return aValidType && bValidType ? looseCompareCollections(a, b, seen) : false;
390
+ aValidType = isSet(a);
391
+ bValidType = isSet(b);
392
+ if (aValidType || bValidType) return aValidType && bValidType ? looseCompareCollections(a, b, seen) : false;
393
+ if (Object.keys(a).length !== Object.keys(b).length) return false;
394
+ for (const key in a) {
395
+ const aHasKey = a.hasOwnProperty(key);
396
+ const bHasKey = b.hasOwnProperty(key);
397
+ if (aHasKey && !bHasKey || !aHasKey && bHasKey || !looseEqual(a[key], b[key], seen)) return false;
398
+ }
399
+ return String(a) === String(b);
400
+ }
401
+ function looseCompareNested(a, b, seen, compare) {
402
+ if (!seen) seen = [/* @__PURE__ */ new Map(), /* @__PURE__ */ new Map()];
403
+ const [seenA, seenB] = seen;
404
+ if (seenA.has(a) || seenB.has(b)) return seenA.get(a) === b && seenB.get(b) === a;
405
+ seenA.set(a, b);
406
+ seenB.set(b, a);
407
+ const equal = compare(a, b, seen);
408
+ seenA.delete(a);
409
+ seenB.delete(b);
410
+ return equal;
411
+ }
412
+ function looseEqual(a, b, seen) {
372
413
  if (a === b) return true;
373
414
  let aValidType = isDate(a);
374
415
  let bValidType = isDate(b);
@@ -378,17 +419,12 @@ function looseEqual(a, b) {
378
419
  if (aValidType || bValidType) return a === b;
379
420
  aValidType = isArray(a);
380
421
  bValidType = isArray(b);
381
- if (aValidType || bValidType) return aValidType && bValidType ? looseCompareArrays(a, b) : false;
422
+ if (aValidType || bValidType) return aValidType && bValidType ? looseCompareNested(a, b, seen, looseCompareArrays) : false;
382
423
  aValidType = isObject(a);
383
424
  bValidType = isObject(b);
384
425
  if (aValidType || bValidType) {
385
426
  if (!aValidType || !bValidType) return false;
386
- if (Object.keys(a).length !== Object.keys(b).length) return false;
387
- for (const key in a) {
388
- const aHasKey = a.hasOwnProperty(key);
389
- const bHasKey = b.hasOwnProperty(key);
390
- if (aHasKey && !bHasKey || !aHasKey && bHasKey || !looseEqual(a[key], b[key])) return false;
391
- }
427
+ return looseCompareNested(a, b, seen, looseCompareObjects);
392
428
  }
393
429
  return String(a) === String(b);
394
430
  }
@@ -518,6 +554,8 @@ function setupFlagsHandler(target) {
518
554
  function warn$2(msg, ...args) {
519
555
  console.warn(`[Vue warn] ${msg}`, ...args);
520
556
  }
557
+ //#endregion
558
+ //#region packages/reactivity/src/system.ts
521
559
  const notifyBuffer = [];
522
560
  let batchDepth = 0;
523
561
  let activeSub = void 0;
@@ -656,13 +694,23 @@ function endTracking(sub, prevSub) {
656
694
  sub.flags &= -5;
657
695
  }
658
696
  function flush() {
697
+ let hasError = false;
698
+ let error;
659
699
  while (notifyIndex < notifyBufferLength) {
660
700
  const effect = notifyBuffer[notifyIndex];
661
701
  notifyBuffer[notifyIndex++] = void 0;
662
- effect.notify();
702
+ try {
703
+ effect.notify();
704
+ } catch (err) {
705
+ if (!hasError) {
706
+ hasError = true;
707
+ error = err;
708
+ }
709
+ }
663
710
  }
664
711
  notifyIndex = 0;
665
712
  notifyBufferLength = 0;
713
+ if (hasError) throw error;
666
714
  }
667
715
  function checkDirty(link, sub) {
668
716
  let stack;
@@ -746,7 +794,7 @@ var Dep = class {
746
794
  }
747
795
  set subs(value) {
748
796
  this._subs = value;
749
- if (value === void 0) this.map.delete(this.key);
797
+ if (value === void 0 && this.map) this.map.delete(this.key);
750
798
  }
751
799
  };
752
800
  const targetMap = /* @__PURE__ */ new WeakMap();
@@ -829,9 +877,7 @@ function trigger(target, type, key, newValue, oldValue, oldTarget) {
829
877
  if (isMap(target)) run(depsMap.get(MAP_KEY_ITERATE_KEY));
830
878
  }
831
879
  break;
832
- case "set":
833
- if (isMap(target)) run(depsMap.get(ITERATE_KEY));
834
- break;
880
+ case "set": if (isMap(target)) run(depsMap.get(ITERATE_KEY));
835
881
  }
836
882
  }
837
883
  }
@@ -846,13 +892,17 @@ function getDepFromReactive(object, key) {
846
892
  /**
847
893
  * Track array iteration and return:
848
894
  * - if input is reactive: a cloned raw array with reactive values
849
- * - if input is non-reactive or shallowReactive: the original raw array
895
+ * - if input is readonly: a cloned raw array with readonly values, preserving
896
+ * reactivity
897
+ * - if input is raw or shallow: the original raw array
850
898
  */
851
899
  function reactiveReadArray(array) {
852
900
  const raw = /* @__PURE__ */ toRaw(array);
853
901
  if (raw === array) return raw;
854
902
  track(raw, "iterate", ARRAY_ITERATE_KEY);
855
- return /* @__PURE__ */ isShallow(array) ? raw : raw.map(toReactive);
903
+ if (/* @__PURE__ */ isShallow(array)) return raw;
904
+ if (!/* @__PURE__ */ isReadonly(array)) return raw.map(toReactive);
905
+ return /* @__PURE__ */ isReactive(array) ? raw.map((item) => toReadonly(toReactive(item))) : raw.map(toReadonly);
856
906
  }
857
907
  /**
858
908
  * Track array iteration and return raw array
@@ -1028,8 +1078,8 @@ function noTracking(self, method, args = []) {
1028
1078
  }
1029
1079
  //#endregion
1030
1080
  //#region packages/reactivity/src/baseHandlers.ts
1031
- const isNonTrackableKeys = /* @__PURE__ */ makeMap(`__proto__,__v_isRef,__isVue`);
1032
- const builtInSymbols = new Set(/* @__PURE__ */ Object.getOwnPropertyNames(Symbol).filter((key) => key !== "arguments" && key !== "caller").map((key) => Symbol[key]).filter(isSymbol));
1081
+ const isNonTrackableKeys = /*@__PURE__*/ makeMap(`__proto__,__v_isRef,__isVue`);
1082
+ const builtInSymbols = new Set(/*@__PURE__*/ Object.getOwnPropertyNames(Symbol).filter((key) => key !== "arguments" && key !== "caller").map((key) => Symbol[key]).filter(isSymbol));
1033
1083
  function hasOwnProperty(key) {
1034
1084
  if (!isSymbol(key)) key = String(key);
1035
1085
  const obj = /* @__PURE__ */ toRaw(this);
@@ -1084,12 +1134,14 @@ var MutableReactiveHandler = class extends BaseReactiveHandler {
1084
1134
  oldValue = /* @__PURE__ */ toRaw(oldValue);
1085
1135
  value = /* @__PURE__ */ toRaw(value);
1086
1136
  }
1087
- if (!isArrayWithIntegerKey && /* @__PURE__ */ isRef(oldValue) && !/* @__PURE__ */ isRef(value)) if (isOldValueReadonly) {
1088
- warn$2(`Set operation on key "${String(key)}" failed: target is readonly.`, target[key]);
1089
- return true;
1090
- } else {
1091
- oldValue.value = value;
1092
- return true;
1137
+ if (!isArrayWithIntegerKey && /* @__PURE__ */ isRef(oldValue) && !/* @__PURE__ */ isRef(value)) {
1138
+ if (isOldValueReadonly) {
1139
+ warn$2(`Set operation on key "${String(key)}" failed: target is readonly.`, target[key]);
1140
+ return true;
1141
+ } else {
1142
+ oldValue.value = value;
1143
+ return true;
1144
+ }
1093
1145
  }
1094
1146
  }
1095
1147
  const hadKey = isArrayWithIntegerKey ? Number(key) < target.length : hasOwn(target, key);
@@ -1130,10 +1182,10 @@ var ReadonlyReactiveHandler = class extends BaseReactiveHandler {
1130
1182
  return true;
1131
1183
  }
1132
1184
  };
1133
- const mutableHandlers = /* @__PURE__ */ new MutableReactiveHandler();
1134
- const readonlyHandlers = /* @__PURE__ */ new ReadonlyReactiveHandler();
1135
- const shallowReactiveHandlers = /* @__PURE__ */ new MutableReactiveHandler(true);
1136
- const shallowReadonlyHandlers = /* @__PURE__ */ new ReadonlyReactiveHandler(true);
1185
+ const mutableHandlers = /*@__PURE__*/ new MutableReactiveHandler();
1186
+ const readonlyHandlers = /*@__PURE__*/ new ReadonlyReactiveHandler();
1187
+ const shallowReactiveHandlers = /*@__PURE__*/ new MutableReactiveHandler(true);
1188
+ const shallowReadonlyHandlers = /*@__PURE__*/ new ReadonlyReactiveHandler(true);
1137
1189
  //#endregion
1138
1190
  //#region packages/reactivity/src/collectionHandlers.ts
1139
1191
  const toShallow = (value) => value;
@@ -1284,10 +1336,10 @@ function createInstrumentationGetter(isReadonly, shallow) {
1284
1336
  return Reflect.get(hasOwn(instrumentations, key) && key in target ? instrumentations : target, key, receiver);
1285
1337
  };
1286
1338
  }
1287
- const mutableCollectionHandlers = { get: /* @__PURE__ */ createInstrumentationGetter(false, false) };
1288
- const shallowCollectionHandlers = { get: /* @__PURE__ */ createInstrumentationGetter(false, true) };
1289
- const readonlyCollectionHandlers = { get: /* @__PURE__ */ createInstrumentationGetter(true, false) };
1290
- const shallowReadonlyCollectionHandlers = { get: /* @__PURE__ */ createInstrumentationGetter(true, true) };
1339
+ const mutableCollectionHandlers = { get: /*@__PURE__*/ createInstrumentationGetter(false, false) };
1340
+ const shallowCollectionHandlers = { get: /*@__PURE__*/ createInstrumentationGetter(false, true) };
1341
+ const readonlyCollectionHandlers = { get: /*@__PURE__*/ createInstrumentationGetter(true, false) };
1342
+ const shallowReadonlyCollectionHandlers = { get: /*@__PURE__*/ createInstrumentationGetter(true, true) };
1291
1343
  function checkIdentityKeys(target, has, key) {
1292
1344
  const rawKey = /* @__PURE__ */ toRaw(key);
1293
1345
  if (rawKey !== key && has.call(target, rawKey)) {
@@ -1312,7 +1364,7 @@ function targetTypeMap(rawType) {
1312
1364
  default: return 0;
1313
1365
  }
1314
1366
  }
1315
- /* @__NO_SIDE_EFFECTS__ */
1367
+ /*@__NO_SIDE_EFFECTS__*/
1316
1368
  function reactive(target) {
1317
1369
  if (/* @__PURE__ */ isReadonly(target)) return target;
1318
1370
  return createReactiveObject(target, false, mutableHandlers, mutableCollectionHandlers, reactiveMap);
@@ -1347,7 +1399,7 @@ function reactive(target) {
1347
1399
  * @param target - The source object.
1348
1400
  * @see {@link https://vuejs.org/api/reactivity-advanced.html#shallowreactive}
1349
1401
  */
1350
- /* @__NO_SIDE_EFFECTS__ */
1402
+ /*@__NO_SIDE_EFFECTS__*/
1351
1403
  function shallowReactive(target) {
1352
1404
  return createReactiveObject(target, false, shallowReactiveHandlers, shallowCollectionHandlers, shallowReactiveMap);
1353
1405
  }
@@ -1380,7 +1432,7 @@ function shallowReactive(target) {
1380
1432
  * @param target - The source object.
1381
1433
  * @see {@link https://vuejs.org/api/reactivity-core.html#readonly}
1382
1434
  */
1383
- /* @__NO_SIDE_EFFECTS__ */
1435
+ /*@__NO_SIDE_EFFECTS__*/
1384
1436
  function readonly(target) {
1385
1437
  return createReactiveObject(target, true, readonlyHandlers, readonlyCollectionHandlers, readonlyMap);
1386
1438
  }
@@ -1414,7 +1466,7 @@ function readonly(target) {
1414
1466
  * @param target - The source object.
1415
1467
  * @see {@link https://vuejs.org/api/reactivity-advanced.html#shallowreadonly}
1416
1468
  */
1417
- /* @__NO_SIDE_EFFECTS__ */
1469
+ /*@__NO_SIDE_EFFECTS__*/
1418
1470
  function shallowReadonly(target) {
1419
1471
  return createReactiveObject(target, true, shallowReadonlyHandlers, shallowReadonlyCollectionHandlers, shallowReadonlyMap);
1420
1472
  }
@@ -1451,7 +1503,7 @@ function createReactiveObject(target, isReadonly, baseHandlers, collectionHandle
1451
1503
  * @param value - The value to check.
1452
1504
  * @see {@link https://vuejs.org/api/reactivity-utilities.html#isreactive}
1453
1505
  */
1454
- /* @__NO_SIDE_EFFECTS__ */
1506
+ /*@__NO_SIDE_EFFECTS__*/
1455
1507
  function isReactive(value) {
1456
1508
  if (/* @__PURE__ */ isReadonly(value)) return /* @__PURE__ */ isReactive(value["__v_raw"]);
1457
1509
  return !!(value && value["__v_isReactive"]);
@@ -1467,11 +1519,11 @@ function isReactive(value) {
1467
1519
  * @param value - The value to check.
1468
1520
  * @see {@link https://vuejs.org/api/reactivity-utilities.html#isreadonly}
1469
1521
  */
1470
- /* @__NO_SIDE_EFFECTS__ */
1522
+ /*@__NO_SIDE_EFFECTS__*/
1471
1523
  function isReadonly(value) {
1472
1524
  return !!(value && value["__v_isReadonly"]);
1473
1525
  }
1474
- /* @__NO_SIDE_EFFECTS__ */
1526
+ /*@__NO_SIDE_EFFECTS__*/
1475
1527
  function isShallow(value) {
1476
1528
  return !!(value && value["__v_isShallow"]);
1477
1529
  }
@@ -1482,7 +1534,7 @@ function isShallow(value) {
1482
1534
  * @param value - The value to check.
1483
1535
  * @see {@link https://vuejs.org/api/reactivity-utilities.html#isproxy}
1484
1536
  */
1485
- /* @__NO_SIDE_EFFECTS__ */
1537
+ /*@__NO_SIDE_EFFECTS__*/
1486
1538
  function isProxy(value) {
1487
1539
  return value ? !!value["__v_raw"] : false;
1488
1540
  }
@@ -1509,7 +1561,7 @@ function isProxy(value) {
1509
1561
  * @param observed - The object for which the "raw" value is requested.
1510
1562
  * @see {@link https://vuejs.org/api/reactivity-advanced.html#toraw}
1511
1563
  */
1512
- /* @__NO_SIDE_EFFECTS__ */
1564
+ /*@__NO_SIDE_EFFECTS__*/
1513
1565
  function toRaw(observed) {
1514
1566
  const raw = observed && observed["__v_raw"];
1515
1567
  return raw ? /* @__PURE__ */ toRaw(raw) : observed;
@@ -1558,15 +1610,15 @@ const toReactive = (value) => isObject(value) ? /* @__PURE__ */ reactive(value)
1558
1610
  const toReadonly = (value) => isObject(value) ? /* @__PURE__ */ readonly(value) : value;
1559
1611
  //#endregion
1560
1612
  //#region packages/reactivity/src/ref.ts
1561
- /* @__NO_SIDE_EFFECTS__ */
1613
+ /*@__NO_SIDE_EFFECTS__*/
1562
1614
  function isRef(r) {
1563
1615
  return r ? r["__v_isRef"] === true : false;
1564
1616
  }
1565
- /* @__NO_SIDE_EFFECTS__ */
1617
+ /*@__NO_SIDE_EFFECTS__*/
1566
1618
  function ref(value) {
1567
1619
  return createRef(value, toReactive);
1568
1620
  }
1569
- /* @__NO_SIDE_EFFECTS__ */
1621
+ /*@__NO_SIDE_EFFECTS__*/
1570
1622
  function shallowRef(value) {
1571
1623
  return createRef(value);
1572
1624
  }
@@ -1769,7 +1821,7 @@ function customRef(factory) {
1769
1821
  * @param object - Reactive object to be made into an object of linked refs.
1770
1822
  * @see {@link https://vuejs.org/api/reactivity-utilities.html#torefs}
1771
1823
  */
1772
- /* @__NO_SIDE_EFFECTS__ */
1824
+ /*@__NO_SIDE_EFFECTS__*/
1773
1825
  function toRefs(object) {
1774
1826
  const ret = isArray(object) ? new Array(object.length) : {};
1775
1827
  for (const key in object) ret[key] = propertyToRef(object, key);
@@ -1820,7 +1872,7 @@ var GetterRefImpl = class {
1820
1872
  return this._value = this._getter();
1821
1873
  }
1822
1874
  };
1823
- /* @__NO_SIDE_EFFECTS__ */
1875
+ /*@__NO_SIDE_EFFECTS__*/
1824
1876
  function toRef(source, key, defaultValue) {
1825
1877
  if (/* @__PURE__ */ isRef(source)) return source;
1826
1878
  else if (isFunction(source)) return new GetterRefImpl(source);
@@ -1886,10 +1938,12 @@ var ReactiveEffect = class {
1886
1938
  get dirty() {
1887
1939
  const flags = this.flags;
1888
1940
  if (flags & 16) return true;
1889
- if (flags & 32) if (checkDirty(this.deps, this)) {
1890
- this.flags = flags | 16;
1891
- return true;
1892
- } else this.flags = flags & -33;
1941
+ if (flags & 32) {
1942
+ if (checkDirty(this.deps, this)) {
1943
+ this.flags = flags | 16;
1944
+ return true;
1945
+ } else this.flags = flags & -33;
1946
+ }
1893
1947
  return false;
1894
1948
  }
1895
1949
  };
@@ -2068,10 +2122,12 @@ var ComputedRefImpl = class {
2068
2122
  get _dirty() {
2069
2123
  const flags = this.flags;
2070
2124
  if (flags & 16) return true;
2071
- if (flags & 32) if (checkDirty(this.deps, this)) {
2072
- this.flags = flags | 16;
2073
- return true;
2074
- } else this.flags = flags & -33;
2125
+ if (flags & 32) {
2126
+ if (checkDirty(this.deps, this)) {
2127
+ this.flags = flags | 16;
2128
+ return true;
2129
+ } else this.flags = flags & -33;
2130
+ }
2075
2131
  return false;
2076
2132
  }
2077
2133
  /**
@@ -2132,7 +2188,7 @@ var ComputedRefImpl = class {
2132
2188
  }
2133
2189
  };
2134
2190
  setupOnTrigger(ComputedRefImpl);
2135
- /* @__NO_SIDE_EFFECTS__ */
2191
+ /*@__NO_SIDE_EFFECTS__*/
2136
2192
  function computed$1(getterOrOptions, debugOptions, isSSR = false) {
2137
2193
  let getter;
2138
2194
  let setter;
@@ -2210,25 +2266,26 @@ var WatcherEffect = class extends ReactiveEffect {
2210
2266
  else if (isFunction(s)) return call ? call(s, 2) : s();
2211
2267
  else warnInvalidSource(s, onWarn);
2212
2268
  });
2213
- } else if (isFunction(source)) if (cb) getter = call ? () => call(source, 2) : source;
2214
- else getter = () => {
2215
- if (this.cleanupsLength) {
2216
- const prevSub = setActiveSub();
2269
+ } else if (isFunction(source)) {
2270
+ if (cb) getter = call ? () => call(source, 2) : source;
2271
+ else getter = () => {
2272
+ if (this.cleanupsLength) {
2273
+ const prevSub = setActiveSub();
2274
+ try {
2275
+ cleanup(this);
2276
+ } finally {
2277
+ setActiveSub(prevSub);
2278
+ }
2279
+ }
2280
+ const currentEffect = activeWatcher;
2281
+ activeWatcher = this;
2217
2282
  try {
2218
- cleanup(this);
2283
+ return call ? call(source, 3, [this.boundCleanup]) : source(this.boundCleanup);
2219
2284
  } finally {
2220
- setActiveSub(prevSub);
2285
+ activeWatcher = currentEffect;
2221
2286
  }
2222
- }
2223
- const currentEffect = activeWatcher;
2224
- activeWatcher = this;
2225
- try {
2226
- return call ? call(source, 3, [this.boundCleanup]) : source(this.boundCleanup);
2227
- } finally {
2228
- activeWatcher = currentEffect;
2229
- }
2230
- };
2231
- else {
2287
+ };
2288
+ } else {
2232
2289
  getter = NOOP;
2233
2290
  warnInvalidSource(source, onWarn);
2234
2291
  }
@@ -2552,7 +2609,7 @@ let currentFlushPromise = null;
2552
2609
  let jobsLength = 0;
2553
2610
  let flushIndex = 0;
2554
2611
  let postFlushIndex = 0;
2555
- const resolvedPromise = /* @__PURE__ */ Promise.resolve();
2612
+ const resolvedPromise = /*@__PURE__*/ Promise.resolve();
2556
2613
  const RECURSION_LIMIT = 100;
2557
2614
  function nextTick(fn) {
2558
2615
  const p = currentFlushPromise || resolvedPromise;
@@ -2591,6 +2648,7 @@ const doFlushJobs = () => {
2591
2648
  flushJobs();
2592
2649
  } catch (e) {
2593
2650
  currentFlushPromise = null;
2651
+ if (jobsLength || postJobs.length) queueFlush();
2594
2652
  throw e;
2595
2653
  }
2596
2654
  };
@@ -2598,9 +2656,10 @@ function queueFlush() {
2598
2656
  if (!currentFlushPromise) currentFlushPromise = resolvedPromise.then(doFlushJobs);
2599
2657
  }
2600
2658
  function queuePostFlushCb(jobs, id = Infinity) {
2601
- if (!isArray(jobs)) if (activePostJobs && id === -1) activePostJobs.splice(postFlushIndex, 0, jobs);
2602
- else queueJobWorker(jobs, id, postJobs, postJobs.length, 0);
2603
- else for (const job of jobs) queueJobWorker(job, id, postJobs, postJobs.length, 0);
2659
+ if (!isArray(jobs)) {
2660
+ if (activePostJobs && id === -1) activePostJobs.splice(postFlushIndex, 0, jobs);
2661
+ else queueJobWorker(jobs, id, postJobs, postJobs.length, 0);
2662
+ } else for (let i = 0; i < jobs.length; i++) queueJobWorker(jobs[i], id, postJobs, postJobs.length, 0);
2604
2663
  queueFlush();
2605
2664
  }
2606
2665
  function flushPreFlushCbs(instance, seen) {
@@ -2614,32 +2673,39 @@ function flushPreFlushCbs(instance, seen) {
2614
2673
  i--;
2615
2674
  jobsLength--;
2616
2675
  if (cb.flags & 2) cb.flags &= -2;
2617
- cb();
2618
- if (!(cb.flags & 2)) cb.flags &= -2;
2676
+ try {
2677
+ cb();
2678
+ } finally {
2679
+ if (!(cb.flags & 2)) cb.flags &= -2;
2680
+ }
2619
2681
  }
2620
2682
  }
2621
2683
  function flushPostFlushCbs(seen) {
2622
2684
  if (postJobs.length) {
2623
2685
  if (activePostJobs) {
2624
- activePostJobs.push(...postJobs);
2686
+ for (let i = 0; i < postJobs.length; i++) activePostJobs.push(postJobs[i]);
2625
2687
  postJobs.length = 0;
2626
2688
  return;
2627
2689
  }
2628
2690
  activePostJobs = postJobs;
2629
2691
  postJobs = [];
2630
2692
  seen = seen || /* @__PURE__ */ new Map();
2631
- while (postFlushIndex < activePostJobs.length) {
2632
- const cb = activePostJobs[postFlushIndex++];
2633
- if (checkRecursiveUpdates(seen, cb)) continue;
2634
- if (cb.flags & 2) cb.flags &= -2;
2635
- if (!(cb.flags & 4)) try {
2636
- cb();
2637
- } finally {
2638
- cb.flags &= -2;
2693
+ try {
2694
+ while (postFlushIndex < activePostJobs.length) {
2695
+ const cb = activePostJobs[postFlushIndex++];
2696
+ if (checkRecursiveUpdates(seen, cb)) continue;
2697
+ if (cb.flags & 2) cb.flags &= -2;
2698
+ if (!(cb.flags & 4)) try {
2699
+ cb();
2700
+ } finally {
2701
+ if (!(cb.flags & 2)) cb.flags &= -2;
2702
+ }
2639
2703
  }
2704
+ } finally {
2705
+ while (postFlushIndex < activePostJobs.length) activePostJobs[postFlushIndex++].flags &= -2;
2706
+ activePostJobs = null;
2707
+ postFlushIndex = 0;
2640
2708
  }
2641
- activePostJobs = null;
2642
- postFlushIndex = 0;
2643
2709
  }
2644
2710
  }
2645
2711
  let isFlushing = false;
@@ -2649,9 +2715,12 @@ let isFlushing = false;
2649
2715
  function flushOnAppMount(instance) {
2650
2716
  if (!isFlushing) {
2651
2717
  isFlushing = true;
2652
- flushPreFlushCbs(instance);
2653
- flushPostFlushCbs();
2654
- isFlushing = false;
2718
+ try {
2719
+ flushPreFlushCbs(instance);
2720
+ flushPostFlushCbs();
2721
+ } finally {
2722
+ isFlushing = false;
2723
+ }
2655
2724
  }
2656
2725
  }
2657
2726
  function flushJobs(seen) {
@@ -2681,8 +2750,8 @@ function flushJobs(seen) {
2681
2750
  jobsLength = 0;
2682
2751
  jobs.length = 0;
2683
2752
  flushPostFlushCbs(seen);
2684
- currentFlushPromise = null;
2685
2753
  if (jobsLength || postJobs.length) flushJobs(seen);
2754
+ else currentFlushPromise = null;
2686
2755
  }
2687
2756
  }
2688
2757
  function checkRecursiveUpdates(seen, fn) {
@@ -2713,6 +2782,19 @@ getGlobalThis().__VUE_HMR_RUNTIME__ = {
2713
2782
  rerender: tryWrap(rerender),
2714
2783
  reload: tryWrap(reload)
2715
2784
  };
2785
+ function runWithHmrUpdating(fn) {
2786
+ isHmrUpdating = true;
2787
+ let done = false;
2788
+ try {
2789
+ fn();
2790
+ done = true;
2791
+ } finally {
2792
+ if (done) nextTick(() => {
2793
+ isHmrUpdating = false;
2794
+ });
2795
+ else isHmrUpdating = false;
2796
+ }
2797
+ }
2716
2798
  const map = /* @__PURE__ */ new Map();
2717
2799
  function registerHMR(instance) {
2718
2800
  const id = instance.type.__hmrId;
@@ -2754,18 +2836,16 @@ function rerender(id, newRender) {
2754
2836
  instance.render = newRender;
2755
2837
  normalizeClassComponent(instance.type).render = newRender;
2756
2838
  }
2757
- isHmrUpdating = true;
2758
- if (instance.vapor) {
2759
- if (!instance.isUnmounted) instance.hmrRerender();
2760
- } else {
2761
- const i = instance;
2762
- if (!(i.effect.flags & 1024)) {
2763
- i.renderCache = [];
2764
- i.effect.run();
2839
+ runWithHmrUpdating(() => {
2840
+ if (instance.vapor) {
2841
+ if (!instance.isUnmounted) instance.hmrRerender();
2842
+ } else {
2843
+ const i = instance;
2844
+ if (!(i.effect.flags & 1024)) {
2845
+ i.renderCache = [];
2846
+ i.effect.run();
2847
+ }
2765
2848
  }
2766
- }
2767
- nextTick(() => {
2768
- isHmrUpdating = false;
2769
2849
  });
2770
2850
  });
2771
2851
  }
@@ -2780,17 +2860,19 @@ function reload(id, newComp) {
2780
2860
  for (const instance of instances) if (instance.root && instance.root.ce && instance !== instance.root) instance.root.ce._removeChildStyle(instance.type);
2781
2861
  const dirtyInstances = new Set(instances);
2782
2862
  const rerenderedParents = /* @__PURE__ */ new Set();
2783
- for (const instance of instances) {
2784
- const parent = instance.parent;
2785
- if (parent) {
2786
- if (!hasDirtyAncestor(instance, dirtyInstances) && !rerenderedParents.has(parent)) {
2787
- rerenderedParents.add(parent);
2788
- parent.hmrRerender();
2789
- }
2790
- } else instance.hmrReload(newComp);
2791
- }
2863
+ runWithHmrUpdating(() => {
2864
+ for (const instance of instances) {
2865
+ const parent = instance.parent;
2866
+ if (parent) {
2867
+ if (!hasDirtyAncestor(instance, dirtyInstances) && !rerenderedParents.has(parent)) {
2868
+ rerenderedParents.add(parent);
2869
+ parent.hmrRerender();
2870
+ }
2871
+ } else instance.hmrReload(newComp);
2872
+ }
2873
+ });
2792
2874
  } else {
2793
- const parentUpdates = /* @__PURE__ */ new Map();
2875
+ const parents = /* @__PURE__ */ new Set();
2794
2876
  const dirtyInstanceSet = new Set(instances);
2795
2877
  for (const instance of instances) {
2796
2878
  const oldComp = normalizeClassComponent(instance.type);
@@ -2809,33 +2891,23 @@ function reload(id, newComp) {
2809
2891
  instance.ceReload(newComp.styles);
2810
2892
  dirtyInstances.delete(instance);
2811
2893
  } else if (instance.parent) {
2812
- const parent = instance.parent;
2813
- if (!hasDirtyAncestor(instance, dirtyInstanceSet)) {
2814
- let updates = parentUpdates.get(parent);
2815
- if (!updates) parentUpdates.set(parent, updates = []);
2816
- updates.push([instance, dirtyInstances]);
2817
- }
2894
+ if (!hasDirtyAncestor(instance, dirtyInstanceSet)) parents.add(instance.parent);
2818
2895
  } else if (instance.appContext.reload) instance.appContext.reload();
2819
2896
  else if (typeof window !== "undefined") window.location.reload();
2820
2897
  else console.warn("[HMR] Root or manually mounted instance modified. Full reload required.");
2821
2898
  if (instance.root.ce && instance !== instance.root) instance.root.ce._removeChildStyle(oldComp);
2822
2899
  }
2823
- parentUpdates.forEach((updates, parent) => {
2900
+ parents.forEach((parent) => {
2824
2901
  queueJob(() => {
2825
- isHmrUpdating = true;
2826
- if (parent.vapor) parent.hmrRerender();
2827
- else {
2828
- const i = parent;
2829
- if (!(i.effect.flags & 1024)) {
2830
- i.renderCache = [];
2831
- i.effect.run();
2902
+ runWithHmrUpdating(() => {
2903
+ if (parent.vapor) parent.hmrRerender();
2904
+ else {
2905
+ const i = parent;
2906
+ if (!(i.effect.flags & 1024)) {
2907
+ i.renderCache = [];
2908
+ i.effect.run();
2909
+ }
2832
2910
  }
2833
- }
2834
- nextTick(() => {
2835
- isHmrUpdating = false;
2836
- });
2837
- updates.forEach(([instance, dirtyInstances]) => {
2838
- dirtyInstances.delete(instance);
2839
2911
  });
2840
2912
  });
2841
2913
  });
@@ -2905,20 +2977,20 @@ function devtoolsInitApp(app, version) {
2905
2977
  function devtoolsUnmountApp(app) {
2906
2978
  emit$2("app:unmount", app);
2907
2979
  }
2908
- const devtoolsComponentAdded = /* @__PURE__ */ createDevtoolsComponentHook("component:added");
2909
- const devtoolsComponentUpdated = /* @__PURE__ */ createDevtoolsComponentHook("component:updated");
2910
- const _devtoolsComponentRemoved = /* @__PURE__ */ createDevtoolsComponentHook("component:removed");
2980
+ const devtoolsComponentAdded = /*@__PURE__*/ createDevtoolsComponentHook("component:added");
2981
+ const devtoolsComponentUpdated = /*@__PURE__*/ createDevtoolsComponentHook("component:updated");
2982
+ const _devtoolsComponentRemoved = /*@__PURE__*/ createDevtoolsComponentHook("component:removed");
2911
2983
  const devtoolsComponentRemoved = (component) => {
2912
2984
  if (devtools$1 && typeof devtools$1.cleanupBuffer === "function" && !devtools$1.cleanupBuffer(component)) _devtoolsComponentRemoved(component);
2913
2985
  };
2914
- /* @__NO_SIDE_EFFECTS__ */
2986
+ /*@__NO_SIDE_EFFECTS__*/
2915
2987
  function createDevtoolsComponentHook(hook) {
2916
2988
  return (component) => {
2917
2989
  emit$2(hook, component.appContext.app, component.uid, component.parent ? component.parent.uid : void 0, component);
2918
2990
  };
2919
2991
  }
2920
- const devtoolsPerfStart = /* @__PURE__ */ createDevtoolsPerformanceHook("perf:start");
2921
- const devtoolsPerfEnd = /* @__PURE__ */ createDevtoolsPerformanceHook("perf:end");
2992
+ const devtoolsPerfStart = /*@__PURE__*/ createDevtoolsPerformanceHook("perf:start");
2993
+ const devtoolsPerfEnd = /*@__PURE__*/ createDevtoolsPerformanceHook("perf:end");
2922
2994
  function createDevtoolsPerformanceHook(hook) {
2923
2995
  return (component, type, time) => {
2924
2996
  emit$2(hook, component.appContext.app, component.uid, component, type, time);
@@ -3147,7 +3219,7 @@ function configureCompat$1(config) {
3147
3219
  validateCompatConfig(config);
3148
3220
  extend(globalCompatConfig, config);
3149
3221
  }
3150
- const seenConfigObjects = /* @__PURE__ */ new WeakSet();
3222
+ const seenConfigObjects = /*@__PURE__*/ new WeakSet();
3151
3223
  const warnedInvalidKeys = {};
3152
3224
  function validateCompatConfig(config, instance) {
3153
3225
  if (seenConfigObjects.has(config)) return;
@@ -3199,7 +3271,7 @@ function checkCompatEnabled$1(key, instance, ...args) {
3199
3271
  }
3200
3272
  //#endregion
3201
3273
  //#region packages/runtime-core/src/compat/instanceEventEmitter.ts
3202
- const eventRegistryMap = /* @__PURE__ */ new WeakMap();
3274
+ const eventRegistryMap = /*@__PURE__*/ new WeakMap();
3203
3275
  function getRegistry(instance) {
3204
3276
  let events = eventRegistryMap.get(instance);
3205
3277
  if (!events) eventRegistryMap.set(instance, events = Object.create(null));
@@ -3333,19 +3405,21 @@ const legacyDirectiveHookMap = {
3333
3405
  };
3334
3406
  function mapCompatDirectiveHook(name, dir, instance) {
3335
3407
  const mappedName = legacyDirectiveHookMap[name];
3336
- if (mappedName) if (isArray(mappedName)) {
3337
- const hook = [];
3338
- mappedName.forEach((mapped) => {
3339
- const mappedHook = dir[mapped];
3340
- if (mappedHook) {
3341
- softAssertCompatEnabled("CUSTOM_DIR", instance, mapped, name);
3342
- hook.push(mappedHook);
3343
- }
3344
- });
3345
- return hook.length ? hook : void 0;
3346
- } else {
3347
- if (dir[mappedName]) softAssertCompatEnabled("CUSTOM_DIR", instance, mappedName, name);
3348
- return dir[mappedName];
3408
+ if (mappedName) {
3409
+ if (isArray(mappedName)) {
3410
+ const hook = [];
3411
+ mappedName.forEach((mapped) => {
3412
+ const mappedHook = dir[mapped];
3413
+ if (mappedHook) {
3414
+ softAssertCompatEnabled("CUSTOM_DIR", instance, mapped, name);
3415
+ hook.push(mappedHook);
3416
+ }
3417
+ });
3418
+ return hook.length ? hook : void 0;
3419
+ } else {
3420
+ if (dir[mappedName]) softAssertCompatEnabled("CUSTOM_DIR", instance, mappedName, name);
3421
+ return dir[mappedName];
3422
+ }
3349
3423
  }
3350
3424
  }
3351
3425
  //#endregion
@@ -3512,7 +3586,7 @@ function instanceWatch(source, value, options) {
3512
3586
  }
3513
3587
  const prev = setCurrentInstance(this);
3514
3588
  const res = doWatch(getter, cb.bind(publicThis), options);
3515
- setCurrentInstance(...prev);
3589
+ restoreCurrentInstance(prev);
3516
3590
  return res;
3517
3591
  }
3518
3592
  function createPathGetter(ctx, path) {
@@ -3534,15 +3608,16 @@ const isTargetSVG = (target) => typeof SVGElement !== "undefined" && target inst
3534
3608
  const isTargetMathML = (target) => typeof MathMLElement === "function" && target instanceof MathMLElement;
3535
3609
  const resolveTarget = (props, select) => {
3536
3610
  const targetSelector = props && props.to;
3537
- if (isString(targetSelector)) if (!select) {
3538
- warn$1("Current renderer does not support string target for Teleports. (missing querySelector renderer option)");
3539
- return null;
3611
+ if (isString(targetSelector)) {
3612
+ if (!select) {
3613
+ warn$1("Current renderer does not support string target for Teleports. (missing querySelector renderer option)");
3614
+ return null;
3615
+ } else {
3616
+ const target = select(targetSelector);
3617
+ 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.`);
3618
+ return target;
3619
+ }
3540
3620
  } else {
3541
- const target = select(targetSelector);
3542
- 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.`);
3543
- return target;
3544
- }
3545
- else {
3546
3621
  if (!targetSelector && !isTeleportDisabled(props)) warn$1(`Invalid Teleport target: ${targetSelector}`);
3547
3622
  return targetSelector;
3548
3623
  }
@@ -3580,7 +3655,8 @@ const TeleportImpl = {
3580
3655
  if (pendingMounts.get(vnode) !== mountJob) return;
3581
3656
  pendingMounts.delete(vnode);
3582
3657
  if (isTeleportDisabled(vnode.props)) {
3583
- mount(vnode, parentNode(vnode.el) || container, vnode.anchor);
3658
+ const mountContainer = parentNode(vnode.el) || container;
3659
+ mount(vnode, mountContainer, vnode.anchor);
3584
3660
  updateCssVars(vnode, true);
3585
3661
  }
3586
3662
  mountToTarget(vnode);
@@ -3689,15 +3765,17 @@ function hydrateTeleport(node, vnode, parentComponent, parentSuspense, slotScope
3689
3765
  const disabled = isTeleportDisabled(vnode.props);
3690
3766
  if (target) {
3691
3767
  const targetNode = target._lpa || target.firstChild;
3692
- if (vnode.shapeFlag & 16) if (disabled) {
3693
- hydrateDisabledTeleport(node, vnode);
3694
- hydrateAnchor(target, targetNode);
3695
- if (!vnode.targetAnchor) prepareAnchor(target, vnode, createText, insert, parentNode(node) === target ? node : null);
3696
- } else {
3697
- vnode.anchor = nextSibling(node);
3698
- hydrateAnchor(target, targetNode);
3699
- if (!vnode.targetAnchor) prepareAnchor(target, vnode, createText, insert);
3700
- hydrateChildren(targetNode && nextSibling(targetNode), vnode, target, parentComponent, parentSuspense, slotScopeIds, optimized);
3768
+ if (vnode.shapeFlag & 16) {
3769
+ if (disabled) {
3770
+ hydrateDisabledTeleport(node, vnode);
3771
+ hydrateAnchor(target, targetNode);
3772
+ if (!vnode.targetAnchor) prepareAnchor(target, vnode, createText, insert, parentNode(node) === target ? node : null);
3773
+ } else {
3774
+ vnode.anchor = nextSibling(node);
3775
+ hydrateAnchor(target, targetNode);
3776
+ if (!vnode.targetAnchor) prepareAnchor(target, vnode, createText, insert);
3777
+ hydrateChildren(targetNode && nextSibling(targetNode), vnode, target, parentComponent, parentSuspense, slotScopeIds, optimized);
3778
+ }
3701
3779
  }
3702
3780
  updateCssVars(vnode, disabled);
3703
3781
  } else if (disabled) {
@@ -3785,49 +3863,16 @@ const BaseTransitionImpl = {
3785
3863
  setup(props, { slots }) {
3786
3864
  const instance = getCurrentInstance();
3787
3865
  const state = useTransitionState();
3866
+ let resumeAfterLeave;
3788
3867
  return () => {
3789
- const children = slots.default && getTransitionRawChildren(slots.default(), true);
3790
- const child = children && children.length ? findNonCommentChild(children) : instance.subTree ? createCommentVNode() : void 0;
3868
+ const child = resolveTransitionChild(slots.default && slots.default(), !!instance.subTree);
3791
3869
  if (!child) return;
3792
3870
  const rawProps = /* @__PURE__ */ toRaw(props);
3793
3871
  const { mode } = rawProps;
3794
3872
  checkTransitionMode(mode);
3795
- if (state.isLeaving) return emptyPlaceholder(child);
3796
- const innerChild = getInnerChild$1(child);
3797
- if (!innerChild) return emptyPlaceholder(child);
3798
- let enterHooks = resolveTransitionHooks(innerChild, rawProps, state, instance, (hooks) => enterHooks = hooks);
3799
- if (innerChild.type !== Comment) setTransitionHooks(innerChild, enterHooks);
3800
- let oldInnerChild = instance.subTree && getInnerChild$1(instance.subTree);
3801
- if (oldInnerChild && oldInnerChild.type !== Comment && !isSameVNodeType(oldInnerChild, innerChild) && recursiveGetSubtree(instance).type !== Comment) {
3802
- let leavingHooks = resolveTransitionHooks(oldInnerChild, rawProps, state, instance);
3803
- setTransitionHooks(oldInnerChild, leavingHooks);
3804
- if (mode === "out-in" && innerChild.type !== Comment) {
3805
- state.isLeaving = true;
3806
- leavingHooks.afterLeave = () => {
3807
- state.isLeaving = false;
3808
- if (!(instance.job.flags & 4)) instance.update();
3809
- delete leavingHooks.afterLeave;
3810
- oldInnerChild = void 0;
3811
- };
3812
- return emptyPlaceholder(child);
3813
- } else if (mode === "in-out" && innerChild.type !== Comment) leavingHooks.delayLeave = (el, earlyRemove, delayedLeave) => {
3814
- const leavingVNodesCache = getLeavingNodesForType(state, oldInnerChild);
3815
- leavingVNodesCache[String(oldInnerChild.key)] = oldInnerChild;
3816
- el[leaveCbKey] = () => {
3817
- earlyRemove();
3818
- el[leaveCbKey] = void 0;
3819
- delete enterHooks.delayedLeave;
3820
- oldInnerChild = void 0;
3821
- };
3822
- enterHooks.delayedLeave = () => {
3823
- delayedLeave();
3824
- delete enterHooks.delayedLeave;
3825
- oldInnerChild = void 0;
3826
- };
3827
- };
3828
- else oldInnerChild = void 0;
3829
- } else if (oldInnerChild) oldInnerChild = void 0;
3830
- return child;
3873
+ return prepareTransitionSwitch(instance.subTree, child, rawProps, state, instance, mode === "out-in" ? resumeAfterLeave || (resumeAfterLeave = () => {
3874
+ if (!(instance.job.flags & 4)) instance.update();
3875
+ }) : NOOP);
3831
3876
  };
3832
3877
  }
3833
3878
  };
@@ -3897,8 +3942,10 @@ function baseResolveTransitionHooks(context, props, state, instance) {
3897
3942
  persisted,
3898
3943
  beforeEnter(el) {
3899
3944
  let hook = onBeforeEnter;
3900
- if (!state.isMounted) if (appear) hook = onBeforeAppear || onBeforeEnter;
3901
- else return;
3945
+ if (!state.isMounted) {
3946
+ if (appear) hook = onBeforeAppear || onBeforeEnter;
3947
+ else return;
3948
+ }
3902
3949
  if (el[leaveCbKey]) el[leaveCbKey](true);
3903
3950
  earlyRemove();
3904
3951
  callHook(hook, [el]);
@@ -3908,11 +3955,13 @@ function baseResolveTransitionHooks(context, props, state, instance) {
3908
3955
  let hook = onEnter;
3909
3956
  let afterHook = onAfterEnter;
3910
3957
  let cancelHook = onEnterCancelled;
3911
- if (!state.isMounted) if (appear) {
3912
- hook = onAppear || onEnter;
3913
- afterHook = onAfterAppear || onAfterEnter;
3914
- cancelHook = onAppearCancelled || onEnterCancelled;
3915
- } else return;
3958
+ if (!state.isMounted) {
3959
+ if (appear) {
3960
+ hook = onAppear || onEnter;
3961
+ afterHook = onAfterAppear || onAfterEnter;
3962
+ cancelHook = onAppearCancelled || onEnterCancelled;
3963
+ } else return;
3964
+ }
3916
3965
  let called = false;
3917
3966
  el[enterCbKey$1] = (cancelled) => {
3918
3967
  if (called) return;
@@ -3946,7 +3995,7 @@ function baseResolveTransitionHooks(context, props, state, instance) {
3946
3995
  else done();
3947
3996
  },
3948
3997
  clone(node) {
3949
- return cloneHooks(node);
3998
+ return cloneHooks ? cloneHooks(node) : hooks;
3950
3999
  }
3951
4000
  };
3952
4001
  return hooks;
@@ -3970,16 +4019,91 @@ function getInnerChild$1(vnode) {
3970
4019
  if (shapeFlag & 32 && isFunction(children.default)) return children.default();
3971
4020
  }
3972
4021
  }
4022
+ function resolveTransitionChild(children, renderEmpty = false) {
4023
+ const branches = children && getTransitionRawChildren(children, true);
4024
+ return branches && branches.length ? findNonCommentChild(branches) : renderEmpty ? createCommentVNode() : void 0;
4025
+ }
4026
+ /**
4027
+ * @internal
4028
+ */
4029
+ function prepareTransitionSwitch(previous, next, props, state, instance, resumeAfterLeave, delayedLeaveSource) {
4030
+ if (state.isLeaving) return emptyPlaceholder(next);
4031
+ const nextInner = getInnerChild$1(next);
4032
+ if (!nextInner) return emptyPlaceholder(next);
4033
+ let enterHooks = resolveTransitionHooks(nextInner, props, state, instance, (hooks) => {
4034
+ if (delayedLeaveSource) forwardDelayedLeave(hooks, delayedLeaveSource);
4035
+ enterHooks = hooks;
4036
+ });
4037
+ if (delayedLeaveSource) forwardDelayedLeave(enterHooks, delayedLeaveSource);
4038
+ if (nextInner.type !== Comment) setTransitionHooks(nextInner, enterHooks);
4039
+ const mode = props.mode;
4040
+ const previousInner = previous && getInnerChild$1(previous);
4041
+ if (previous && previousInner && previousInner.type !== Comment && !isSameVNodeType(previousInner, nextInner) && (!previous.component || recursiveGetSubtree(previous.component).type !== Comment)) {
4042
+ const leavingHooks = prepareLeavingTransitionHooks(previousInner, props, state, instance);
4043
+ 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);
4044
+ }
4045
+ return next;
4046
+ }
4047
+ function forwardDelayedLeave(hooks, source) {
4048
+ const delayedLeave = source && source.delayedLeave;
4049
+ if (!delayedLeave) return;
4050
+ hooks.delayedLeave = () => {
4051
+ if (source.delayedLeave === delayedLeave) delayedLeave();
4052
+ delete hooks.delayedLeave;
4053
+ };
4054
+ }
4055
+ function prepareLeavingTransitionHooks(previousInner, props, state, instance) {
4056
+ return setTransitionHooks(previousInner, resolveTransitionHooks(previousInner, props, state, instance));
4057
+ }
4058
+ function applyTransitionModeSwitch(leavingVNode, leavingHooks, getEnterHooks, props, state, resumeAfterLeave) {
4059
+ if (props.mode === "out-in") {
4060
+ state.isLeaving = true;
4061
+ leavingHooks.afterLeave = () => {
4062
+ state.isLeaving = false;
4063
+ resumeAfterLeave();
4064
+ delete leavingHooks.afterLeave;
4065
+ };
4066
+ return true;
4067
+ } else if (props.mode === "in-out" && getEnterHooks) {
4068
+ let delayedLeavingVNode = leavingVNode;
4069
+ leavingHooks.delayLeave = (el, earlyRemove, delayedLeave) => {
4070
+ const enterHooks = getEnterHooks();
4071
+ if (!enterHooks) {
4072
+ delayedLeave();
4073
+ return;
4074
+ }
4075
+ const vnode = delayedLeavingVNode;
4076
+ const leavingVNodesCache = getLeavingNodesForType(state, vnode);
4077
+ leavingVNodesCache[String(vnode.key)] = vnode;
4078
+ el[leaveCbKey] = () => {
4079
+ earlyRemove();
4080
+ el[leaveCbKey] = void 0;
4081
+ delete enterHooks.delayedLeave;
4082
+ delayedLeavingVNode = void 0;
4083
+ };
4084
+ enterHooks.delayedLeave = () => {
4085
+ delayedLeave();
4086
+ delete enterHooks.delayedLeave;
4087
+ delayedLeavingVNode = void 0;
4088
+ };
4089
+ };
4090
+ }
4091
+ return false;
4092
+ }
3973
4093
  function setTransitionHooks(vnode, hooks) {
3974
- if (vnode.shapeFlag & 6 && vnode.component) if (isVaporComponent(vnode.type)) getVaporInterface(vnode.component, vnode).setTransitionHooks(vnode.component, hooks);
3975
- else {
4094
+ if (vnode.shapeFlag & 6 && vnode.component) {
3976
4095
  vnode.transition = hooks;
3977
- setTransitionHooks(vnode.component.subTree, hooks);
3978
- }
3979
- else if (vnode.shapeFlag & 128) {
3980
- vnode.ssContent.transition = hooks.clone(vnode.ssContent);
3981
- vnode.ssFallback.transition = hooks.clone(vnode.ssFallback);
4096
+ if (isVaporComponent(vnode.type)) getVaporInterface(vnode.component, vnode).setTransitionHooks(vnode.component, hooks);
4097
+ else {
4098
+ const subTree = vnode.component.subTree;
4099
+ return setTransitionHooks(isTeleport(subTree.type) ? getInnerChild$1(subTree) || subTree : subTree, hooks);
4100
+ }
4101
+ } else if (vnode.shapeFlag & 128) {
4102
+ const contentHooks = vnode.ssContent.transition = hooks.clone(vnode.ssContent);
4103
+ const fallbackHooks = vnode.ssFallback.transition = hooks.clone(vnode.ssFallback);
4104
+ return vnode.suspense && vnode.suspense.activeBranch === vnode.ssFallback ? fallbackHooks : contentHooks;
3982
4105
  } else vnode.transition = hooks;
4106
+ return hooks;
3983
4107
  }
3984
4108
  function getTransitionRawChildren(children, keepComment = false, parentKey) {
3985
4109
  let ret = [];
@@ -4003,9 +4127,9 @@ function checkTransitionMode(mode) {
4003
4127
  }
4004
4128
  //#endregion
4005
4129
  //#region packages/runtime-core/src/apiDefineComponent.ts
4006
- /* @__NO_SIDE_EFFECTS__ */
4130
+ /*@__NO_SIDE_EFFECTS__*/
4007
4131
  function defineComponent(options, extraOptions) {
4008
- return isFunction(options) ? extend({ name: options.name }, extraOptions, { setup: options }) : options;
4132
+ return isFunction(options) ? /*@__PURE__*/ (() => extend({ name: options.name }, extraOptions, { setup: options }))() : options;
4009
4133
  }
4010
4134
  //#endregion
4011
4135
  //#region packages/runtime-core/src/helpers/useId.ts
@@ -4102,15 +4226,16 @@ function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
4102
4226
  if (rawRef.f) {
4103
4227
  const existing = _isString ? canSetSetupRef(ref) ? setupState[ref] : refs[ref] : canSetRef(ref) || !rawRef.k ? ref.value : refs[rawRef.k];
4104
4228
  if (isUnmount) isArray(existing) && remove(existing, refValue);
4105
- else if (!isArray(existing)) if (_isString) {
4106
- refs[ref] = [refValue];
4107
- if (canSetSetupRef(ref)) setupState[ref] = refs[ref];
4108
- } else {
4109
- const newVal = [refValue];
4110
- if (canSetRef(ref, rawRef.k)) ref.value = newVal;
4111
- if (rawRef.k) refs[rawRef.k] = newVal;
4112
- }
4113
- else if (!existing.includes(refValue)) existing.push(refValue);
4229
+ else if (!isArray(existing)) {
4230
+ if (_isString) {
4231
+ refs[ref] = [refValue];
4232
+ if (canSetSetupRef(ref)) setupState[ref] = refs[ref];
4233
+ } else {
4234
+ const newVal = [refValue];
4235
+ if (canSetRef(ref, rawRef.k)) ref.value = newVal;
4236
+ if (rawRef.k) refs[rawRef.k] = newVal;
4237
+ }
4238
+ } else if (!existing.includes(refValue)) existing.push(refValue);
4114
4239
  } else if (_isString) {
4115
4240
  refs[ref] = value;
4116
4241
  if (canSetSetupRef(ref)) setupState[ref] = value;
@@ -4162,7 +4287,18 @@ const logMismatchError = () => {
4162
4287
  hasLoggedMismatchError = true;
4163
4288
  };
4164
4289
  const isSVGContainer = (container) => container.namespaceURI.includes("svg") && container.tagName !== "foreignObject";
4165
- const isMathMLContainer = (container) => container.namespaceURI.includes("MathML");
4290
+ const isMathMLContainer = (container) => {
4291
+ if (!container.namespaceURI.includes("MathML")) return false;
4292
+ if (container.tagName !== "annotation-xml") return true;
4293
+ const encoding = container.getAttribute("encoding");
4294
+ return !encoding || !encoding.includes("html");
4295
+ };
4296
+ /**
4297
+ * Resolve the element namespace a container's children should be created in.
4298
+ * The live DOM is the source of truth, so this also covers containers that are
4299
+ * only known at runtime (interop boundaries, teleport targets).
4300
+ * @internal
4301
+ */
4166
4302
  const getContainerType = (container) => {
4167
4303
  if (container.nodeType !== 1) return void 0;
4168
4304
  if (isSVGContainer(container)) return "svg";
@@ -4186,7 +4322,7 @@ function createHydrationFunctions(rendererInternals) {
4186
4322
  };
4187
4323
  const hydrateNode = (node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized = false) => {
4188
4324
  optimized = optimized || !!vnode.dynamicChildren;
4189
- const isFragmentStart = isComment(node) && node.data === "[";
4325
+ const isFragmentStart = isComment(node) && (node.data === "[" || node.data === "(");
4190
4326
  const onMismatch = () => handleMismatch(node, vnode, parentComponent, parentSuspense, slotScopeIds, isFragmentStart);
4191
4327
  const { type, ref, shapeFlag, patchFlag } = vnode;
4192
4328
  let domType = node.nodeType;
@@ -4200,11 +4336,12 @@ function createHydrationFunctions(rendererInternals) {
4200
4336
  let nextNode = null;
4201
4337
  switch (type) {
4202
4338
  case Text:
4203
- if (domType !== 3) if (vnode.children === "") {
4204
- insert(vnode.el = createText(""), parentNode(node), node);
4205
- nextNode = node;
4206
- } else nextNode = onMismatch();
4207
- else {
4339
+ if (domType !== 3) {
4340
+ if (vnode.children === "") {
4341
+ insert(vnode.el = createText(""), parentNode(node), node);
4342
+ nextNode = node;
4343
+ } else nextNode = onMismatch();
4344
+ } else {
4208
4345
  if (node.data !== vnode.children) {
4209
4346
  warn$1(`Hydration text mismatch in`, node.parentNode, `\n - rendered on server: ${JSON.stringify(node.data)}\n - expected on client: ${JSON.stringify(vnode.children)}`);
4210
4347
  logMismatchError();
@@ -4241,45 +4378,35 @@ function createHydrationFunctions(rendererInternals) {
4241
4378
  else nextNode = hydrateFragment(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized);
4242
4379
  break;
4243
4380
  case VaporSlot:
4244
- nextNode = getVaporInterface(parentComponent, vnode).hydrateSlot(vnode, node, parentComponent, parentSuspense);
4381
+ nextNode = getVaporInterface(parentComponent, vnode).hydrateSlot(vnode, node, parentComponent, parentSuspense, slotScopeIds);
4245
4382
  break;
4246
- default: if (shapeFlag & 1) if ((domType !== 1 || vnode.type.toLowerCase() !== node.tagName.toLowerCase()) && !isTemplateNode$1(node)) nextNode = onMismatch();
4247
- else nextNode = hydrateElement(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized);
4248
- else if (shapeFlag & 6) {
4383
+ default: if (shapeFlag & 1) {
4384
+ if ((domType !== 1 || vnode.type.toLowerCase() !== node.tagName.toLowerCase()) && !isTemplateNode$1(node)) nextNode = onMismatch();
4385
+ else nextNode = hydrateElement(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized);
4386
+ } else if (shapeFlag & 6) {
4249
4387
  vnode.slotScopeIds = slotScopeIds;
4250
4388
  const container = parentNode(node);
4251
4389
  if (isFragmentStart) nextNode = locateClosingAnchor(node);
4252
4390
  else if (isComment(node) && node.data === "teleport start") nextNode = locateClosingAnchor(node, node.data, "teleport end");
4253
4391
  else nextNode = nextSibling(node);
4254
- if (vnode.type.__vapor) {
4255
- const vnodeBeforeMountHook = !isAsyncWrapper(vnode) && vnode.props && vnode.props.onVnodeBeforeMount;
4256
- getVaporInterface(parentComponent, vnode).hydrate(vnode, node, container, nextNode, parentComponent, parentSuspense, () => {
4257
- if (vnode.dirs) {
4258
- invokeDirectiveHook(vnode, null, parentComponent, "created");
4259
- invokeDirectiveHook(vnode, null, parentComponent, "beforeMount");
4260
- }
4261
- }, () => {
4262
- if (vnodeBeforeMountHook) invokeVNodeHook(vnodeBeforeMountHook, parentComponent, vnode);
4263
- });
4264
- if (vnode.dirs) queueEffectWithSuspense(() => invokeDirectiveHook(vnode, null, parentComponent, "mounted"), void 0, parentSuspense);
4265
- const vnodeMountedHook = !isAsyncWrapper(vnode) && vnode.props && vnode.props.onVnodeMounted;
4266
- if (vnodeMountedHook) queueEffectWithSuspense(() => invokeVNodeHook(vnodeMountedHook, parentComponent, vnode), void 0, parentSuspense);
4267
- } else {
4392
+ if (vnode.type.__vapor) getVaporInterface(parentComponent, vnode).hydrate(vnode, node, container, nextNode, parentComponent, parentSuspense);
4393
+ else {
4268
4394
  mountComponent(vnode, container, null, parentComponent, parentSuspense, getContainerType(container), optimized);
4269
4395
  const component = vnode.component;
4270
- if (isAsyncWrapper(vnode) && !vnode.type.__asyncResolved || component.asyncDep && !component.asyncResolved) {
4396
+ if (!component.subTree && (isAsyncWrapper(vnode) || component.asyncDep)) {
4271
4397
  let subTree;
4272
4398
  if (isFragmentStart) {
4273
- subTree = createVNode(Fragment);
4399
+ subTree = createVNode(Static);
4274
4400
  subTree.anchor = nextNode ? nextNode.previousSibling : container.lastChild;
4275
- } else subTree = node.nodeType === 3 ? createTextVNode("") : createVNode("div");
4401
+ } else subTree = node.nodeType === 3 ? createTextVNode("") : createVNode(node.nodeType === 8 ? Comment : "div");
4276
4402
  subTree.el = node;
4277
4403
  component.subTree = subTree;
4278
4404
  }
4279
4405
  }
4280
- } else if (shapeFlag & 64) if (domType !== 8) nextNode = onMismatch();
4281
- else nextNode = vnode.type.hydrate(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized, rendererInternals, hydrateChildren);
4282
- else if (shapeFlag & 128) nextNode = vnode.type.hydrate(node, vnode, parentComponent, parentSuspense, getContainerType(parentNode(node)), slotScopeIds, optimized, rendererInternals, hydrateNode);
4406
+ } else if (shapeFlag & 64) {
4407
+ if (domType !== 8) nextNode = onMismatch();
4408
+ else nextNode = vnode.type.hydrate(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized, rendererInternals, hydrateChildren);
4409
+ } else if (shapeFlag & 128) nextNode = vnode.type.hydrate(node, vnode, parentComponent, parentSuspense, getContainerType(parentNode(node)), slotScopeIds, optimized, rendererInternals, hydrateNode);
4283
4410
  else warn$1("Invalid HostVNode type:", type, `(${typeof type})`);
4284
4411
  }
4285
4412
  if (ref != null) setRef(ref, null, parentSuspense, vnode);
@@ -4331,7 +4458,10 @@ function createHydrationFunctions(rendererInternals) {
4331
4458
  const namespace = el.namespaceURI.includes("svg") ? "svg" : el.namespaceURI.includes("MathML") ? "mathml" : void 0;
4332
4459
  for (const key in props) {
4333
4460
  if (!(dirs && dirs.some((d) => d.dir.created)) && propHasMismatch(el, key, props[key], vnode, parentComponent)) logMismatchError();
4334
- 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);
4461
+ if (forcePatch && (key.endsWith("value") || key === "indeterminate") || isOn(key) && !isReservedProp(key) || key[0] === "." || isCustomElement && !isReservedProp(key) || dynamicProps && dynamicProps.includes(key)) {
4462
+ if (isUnchangedResourceProp(el, key, props[key])) continue;
4463
+ patchProp(el, key, null, props[key], namespace, parentComponent);
4464
+ }
4335
4465
  }
4336
4466
  }
4337
4467
  let vnodeHooks;
@@ -4379,8 +4509,9 @@ function createHydrationFunctions(rendererInternals) {
4379
4509
  const { slotScopeIds: fragmentSlotScopeIds } = vnode;
4380
4510
  if (fragmentSlotScopeIds) slotScopeIds = slotScopeIds ? slotScopeIds.concat(fragmentSlotScopeIds) : fragmentSlotScopeIds;
4381
4511
  const container = parentNode(node);
4382
- const next = hydrateChildren(nextSibling(node), vnode, container, parentComponent, parentSuspense, slotScopeIds, optimized);
4383
- if (next && isComment(next) && next.data === "]") return nextSibling(vnode.anchor = next);
4512
+ const first = nextSibling(node);
4513
+ const next = vnode.vo && node.data === "(" ? getVaporInterface(parentComponent, vnode).hydrateSlotOutlet(vnode, node, parentComponent, parentSuspense, slotScopeIds) : hydrateChildren(first, vnode, container, parentComponent, parentSuspense, slotScopeIds, optimized);
4514
+ if (next && isComment(next) && next.data === (node.data === "(" ? ")" : "]")) return nextSibling(vnode.anchor = next);
4384
4515
  else {
4385
4516
  logMismatchError();
4386
4517
  insert(vnode.anchor = createComment(`]`), container, next);
@@ -4389,7 +4520,7 @@ function createHydrationFunctions(rendererInternals) {
4389
4520
  };
4390
4521
  const handleMismatch = (node, vnode, parentComponent, parentSuspense, slotScopeIds, isFragment) => {
4391
4522
  if (!isNodeMismatchAllowed(node, vnode)) {
4392
- 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);
4523
+ 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);
4393
4524
  logMismatchError();
4394
4525
  }
4395
4526
  vnode.el = null;
@@ -4405,20 +4536,22 @@ function createHydrationFunctions(rendererInternals) {
4405
4536
  const container = parentNode(node);
4406
4537
  remove(node);
4407
4538
  patch(null, vnode, container, next, parentComponent, parentSuspense, getContainerType(container), slotScopeIds);
4408
- if (parentComponent) {
4539
+ if (parentComponent && parentComponent.vnode) {
4409
4540
  parentComponent.vnode.el = vnode.el;
4410
4541
  updateHOCHostEl(parentComponent, vnode.el);
4411
4542
  }
4412
4543
  return next;
4413
4544
  };
4414
- const locateClosingAnchor = (node, open = "[", close = "]") => {
4545
+ const locateClosingAnchor = (node, open = node && isComment(node) && node.data === "(" ? "(" : "[", close = open === "(" ? ")" : "]") => {
4415
4546
  let match = 0;
4416
4547
  while (node) {
4417
4548
  node = nextSibling(node);
4418
4549
  if (node && isComment(node)) {
4419
4550
  if (node.data === open) match++;
4420
- if (node.data === close) if (match === 0) return nextSibling(node);
4421
- else match--;
4551
+ if (node.data === close) {
4552
+ if (match === 0) return nextSibling(node);
4553
+ else match--;
4554
+ }
4422
4555
  }
4423
4556
  }
4424
4557
  return node;
@@ -4428,7 +4561,7 @@ function createHydrationFunctions(rendererInternals) {
4428
4561
  if (parentNode) parentNode.replaceChild(newNode, oldNode);
4429
4562
  let parent = parentComponent;
4430
4563
  while (parent) {
4431
- if (parent.vnode.el === oldNode) parent.vnode.el = parent.subTree.el = newNode;
4564
+ if (parent.vnode && parent.vnode.el === oldNode) parent.vnode.el = parent.subTree.el = newNode;
4432
4565
  parent = parent.parent;
4433
4566
  }
4434
4567
  };
@@ -4437,6 +4570,16 @@ function createHydrationFunctions(rendererInternals) {
4437
4570
  const isTemplateNode$1 = (node) => {
4438
4571
  return node.nodeType === 1 && node.tagName === "TEMPLATE";
4439
4572
  };
4573
+ const resourceProps = /*@__PURE__*/ new Set([
4574
+ "src",
4575
+ "srcset",
4576
+ "href",
4577
+ "poster"
4578
+ ]);
4579
+ function isUnchangedResourceProp(el, key, clientValue) {
4580
+ if (!resourceProps.has(key)) return false;
4581
+ return el.getAttribute(key) === (clientValue == null ? null : `${clientValue}`);
4582
+ }
4440
4583
  /**
4441
4584
  * Dev only
4442
4585
  */
@@ -4480,7 +4623,10 @@ function propHasMismatch(el, key, clientValue, vnode, instance) {
4480
4623
  function getAttributeMismatch(el, key, clientValue) {
4481
4624
  let actual;
4482
4625
  let expected;
4483
- if (isBooleanAttr(key)) {
4626
+ if (key === "hidden") {
4627
+ actual = normalizeHiddenValue(el.getAttribute(key));
4628
+ expected = normalizeHiddenValue(clientValue);
4629
+ } else if (isBooleanAttr(key)) {
4484
4630
  actual = el.hasAttribute(key);
4485
4631
  expected = includeBooleanAttr(clientValue);
4486
4632
  } else if (clientValue == null) {
@@ -4508,6 +4654,11 @@ function warnPropMismatch(el, mismatchKey, mismatchType, actual, expected) {
4508
4654
  }
4509
4655
  return false;
4510
4656
  }
4657
+ function normalizeHiddenValue(value) {
4658
+ if (!isRenderableAttrValue(value)) return false;
4659
+ if (isString(value)) return value.toLowerCase() === "until-found" ? "until-found" : "";
4660
+ return includeBooleanAttr(value) ? "" : false;
4661
+ }
4511
4662
  function toClassSet(str) {
4512
4663
  return new Set(str.trim().split(/\s+/));
4513
4664
  }
@@ -4646,16 +4797,18 @@ const hydrateOnInteraction = (interactions = []) => (hydrate, forEach) => {
4646
4797
  return teardown;
4647
4798
  };
4648
4799
  function forEachElement(node, cb) {
4649
- if (isComment(node) && node.data === "[") {
4800
+ if (isComment(node) && (node.data === "[" || node.data === "(")) {
4801
+ const open = node.data;
4802
+ const close = open === "[" ? "]" : ")";
4650
4803
  let depth = 1;
4651
4804
  let next = node.nextSibling;
4652
4805
  while (next) {
4653
4806
  if (next.nodeType === 1) {
4654
4807
  if (cb(next) === false) break;
4655
4808
  } else if (isComment(next)) {
4656
- if (next.data === "]") {
4809
+ if (next.data === close) {
4657
4810
  if (--depth === 0) break;
4658
- } else if (next.data === "[") depth++;
4811
+ } else if (next.data === open) depth++;
4659
4812
  }
4660
4813
  next = next.nextSibling;
4661
4814
  }
@@ -4664,14 +4817,14 @@ function forEachElement(node, cb) {
4664
4817
  //#endregion
4665
4818
  //#region packages/runtime-core/src/apiAsyncComponent.ts
4666
4819
  const isAsyncWrapper = (i) => !!i.type.__asyncLoader;
4667
- /* @__NO_SIDE_EFFECTS__ */
4820
+ /*@__NO_SIDE_EFFECTS__*/
4668
4821
  function defineAsyncComponent(source) {
4669
4822
  const { load, getResolvedComp, setPendingRequest, source: { loadingComponent, errorComponent, delay, hydrate: hydrateStrategy, timeout, suspensible = true } } = createAsyncComponentContext(source);
4670
4823
  return /* @__PURE__ */ defineComponent({
4671
4824
  name: "AsyncComponentWrapper",
4672
4825
  __asyncLoader: load,
4673
4826
  __asyncHydrate(el, instance, hydrate) {
4674
- performAsyncHydrate(el, instance, hydrate, getResolvedComp, load, hydrateStrategy);
4827
+ performAsyncHydrate(el, instance, hydrate, getResolvedComp, load, hydrateStrategy, true);
4675
4828
  },
4676
4829
  get __asyncResolved() {
4677
4830
  return getResolvedComp();
@@ -4790,10 +4943,10 @@ const useAsyncComponentState = (delay, timeout, onError, instance = currentInsta
4790
4943
  * shared between core and vapor
4791
4944
  * @internal
4792
4945
  */
4793
- function performAsyncHydrate(el, instance, hydrate, getResolvedComp, load, hydrateStrategy) {
4946
+ function performAsyncHydrate(el, instance, hydrate, getResolvedComp, load, hydrateStrategy, skipIfUpdated) {
4794
4947
  const wasConnected = el.isConnected;
4795
4948
  let patched = false;
4796
- (instance.bu || (instance.bu = [])).push(() => patched = true);
4949
+ if (skipIfUpdated) (instance.bu || (instance.bu = [])).push(() => patched = true);
4797
4950
  const performHydrate = () => {
4798
4951
  if (patched) {
4799
4952
  {
@@ -4879,10 +5032,13 @@ const KeepAliveImpl = {
4879
5032
  });
4880
5033
  let pendingCacheKey = null;
4881
5034
  const cacheSubtree = () => {
4882
- if (pendingCacheKey != null) if (isSuspense(keepAliveInstance.subTree.type)) queuePostRenderEffect(() => {
4883
- cache.set(pendingCacheKey, getInnerChild(keepAliveInstance.subTree));
4884
- }, void 0, keepAliveInstance.subTree.suspense);
4885
- else cache.set(pendingCacheKey, getInnerChild(keepAliveInstance.subTree));
5035
+ if (pendingCacheKey != null) {
5036
+ if (isSuspense(keepAliveInstance.subTree.type)) queuePostRenderEffect(() => {
5037
+ const vnode = getInnerChild(keepAliveInstance.subTree);
5038
+ if (vnode.component) cache.set(pendingCacheKey, vnode);
5039
+ }, void 0, keepAliveInstance.subTree.suspense);
5040
+ else cache.set(pendingCacheKey, getInnerChild(keepAliveInstance.subTree));
5041
+ }
4886
5042
  };
4887
5043
  onMounted(cacheSubtree);
4888
5044
  onUpdated(cacheSubtree);
@@ -4953,7 +5109,7 @@ const decorate$2 = (t) => {
4953
5109
  t.__isBuiltIn = true;
4954
5110
  return t;
4955
5111
  };
4956
- const KeepAlive = /* @__PURE__ */ decorate$2(KeepAliveImpl);
5112
+ const KeepAlive = /*@__PURE__*/ decorate$2(KeepAliveImpl);
4957
5113
  function matches(pattern, name) {
4958
5114
  if (isArray(pattern)) return pattern.some((p) => matches(p, name));
4959
5115
  else if (isString(pattern)) return pattern.split(",").includes(name);
@@ -5044,7 +5200,7 @@ function injectHook(type, hook, target = currentInstance, prepend = false) {
5044
5200
  try {
5045
5201
  return callWithAsyncErrorHandling(hook, target, type, args);
5046
5202
  } finally {
5047
- setCurrentInstance(...prev);
5203
+ restoreCurrentInstance(prev);
5048
5204
  setActiveSub(prevSub);
5049
5205
  }
5050
5206
  });
@@ -5169,16 +5325,17 @@ function compatH(type, propsOrChildren, children) {
5169
5325
  }
5170
5326
  const l = arguments.length;
5171
5327
  const is2ndArgArrayChildren = isArray(propsOrChildren);
5172
- if (l === 2 || is2ndArgArrayChildren) if (isObject(propsOrChildren) && !is2ndArgArrayChildren) {
5173
- if (isVNode(propsOrChildren)) return convertLegacySlots(createVNode(type, null, [propsOrChildren]));
5174
- return convertLegacySlots(convertLegacyDirectives(createVNode(type, convertLegacyProps(propsOrChildren, type)), propsOrChildren));
5175
- } else return convertLegacySlots(createVNode(type, null, propsOrChildren));
5176
- else {
5328
+ if (l === 2 || is2ndArgArrayChildren) {
5329
+ if (isObject(propsOrChildren) && !is2ndArgArrayChildren) {
5330
+ if (isVNode(propsOrChildren)) return convertLegacySlots(createVNode(type, null, [propsOrChildren]));
5331
+ return convertLegacySlots(convertLegacyDirectives(createVNode(type, convertLegacyProps(propsOrChildren, type)), propsOrChildren));
5332
+ } else return convertLegacySlots(createVNode(type, null, propsOrChildren));
5333
+ } else {
5177
5334
  if (isVNode(children)) children = [children];
5178
5335
  return convertLegacySlots(convertLegacyDirectives(createVNode(type, convertLegacyProps(propsOrChildren, type), children), propsOrChildren));
5179
5336
  }
5180
5337
  }
5181
- const skipLegacyRootLevelProps = /* @__PURE__ */ makeMap("staticStyle,staticClass,directives,model,hook");
5338
+ const skipLegacyRootLevelProps = /*@__PURE__*/ makeMap("staticStyle,staticClass,directives,model,hook");
5182
5339
  function convertLegacyProps(legacyProps, type) {
5183
5340
  if (!legacyProps) return null;
5184
5341
  const converted = {};
@@ -5190,8 +5347,10 @@ function convertLegacyProps(legacyProps, type) {
5190
5347
  if (key === "nativeOn") handlerKey += `Native`;
5191
5348
  const existing = converted[handlerKey];
5192
5349
  const incoming = listeners[event];
5193
- if (existing !== incoming) if (existing) converted[handlerKey] = [].concat(existing, incoming);
5194
- else converted[handlerKey] = incoming;
5350
+ if (existing !== incoming) {
5351
+ if (existing) converted[handlerKey] = [].concat(existing, incoming);
5352
+ else converted[handlerKey] = incoming;
5353
+ }
5195
5354
  }
5196
5355
  } else if (!skipLegacyRootLevelProps(key)) converted[key] = legacyProps[key];
5197
5356
  if (legacyProps.staticClass) converted.class = normalizeClass([legacyProps.staticClass, converted.class]);
@@ -5290,7 +5449,7 @@ function convertLegacyFunctionalComponent(comp) {
5290
5449
  const legacyFn = comp.render;
5291
5450
  const Func = (props, ctx) => {
5292
5451
  const instance = getCurrentInstance();
5293
- return legacyFn(compatH, {
5452
+ const legacyCtx = {
5294
5453
  props,
5295
5454
  children: instance.vnode.children || [],
5296
5455
  data: instance.vnode.props || {},
@@ -5310,7 +5469,8 @@ function convertLegacyFunctionalComponent(comp) {
5310
5469
  }
5311
5470
  return {};
5312
5471
  }
5313
- });
5472
+ };
5473
+ return legacyFn(compatH, legacyCtx);
5314
5474
  };
5315
5475
  Func.props = comp.props;
5316
5476
  Func.displayName = comp.name;
@@ -5339,23 +5499,25 @@ function renderList(source, renderItem, cache, index) {
5339
5499
  }
5340
5500
  ret = new Array(source.length);
5341
5501
  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]);
5342
- } else if (typeof source === "number") if (!Number.isInteger(source) || source < 0) {
5343
- warn$1(`The v-for range expects a positive integer value but got ${source}.`);
5344
- ret = [];
5345
- } else {
5346
- ret = new Array(source);
5347
- for (let i = 0; i < source; i++) ret[i] = renderItem(i + 1, i, void 0, cached && cached[i]);
5348
- }
5349
- else if (isObject(source)) if (source[Symbol.iterator]) ret = Array.from(source, (item, i) => renderItem(item, i, void 0, cached && cached[i]));
5350
- else {
5351
- const keys = Object.keys(source);
5352
- ret = new Array(keys.length);
5353
- for (let i = 0, l = keys.length; i < l; i++) {
5354
- const key = keys[i];
5355
- ret[i] = renderItem(source[key], key, i, cached && cached[i]);
5502
+ } else if (typeof source === "number") {
5503
+ if (!Number.isInteger(source) || source < 0) {
5504
+ warn$1(`The v-for range expects a positive integer value but got ${source}.`);
5505
+ ret = [];
5506
+ } else {
5507
+ ret = new Array(source);
5508
+ for (let i = 0; i < source; i++) ret[i] = renderItem(i + 1, i, void 0, cached && cached[i]);
5356
5509
  }
5357
- }
5358
- else ret = [];
5510
+ } else if (isObject(source)) {
5511
+ if (source[Symbol.iterator]) ret = Array.from(source, (item, i) => renderItem(item, i, void 0, cached && cached[i]));
5512
+ else {
5513
+ const keys = Object.keys(source);
5514
+ ret = new Array(keys.length);
5515
+ for (let i = 0, l = keys.length; i < l; i++) {
5516
+ const key = keys[i];
5517
+ ret[i] = renderItem(source[key], key, i, cached && cached[i]);
5518
+ }
5519
+ }
5520
+ } else ret = [];
5359
5521
  if (cache) cache[index] = ret;
5360
5522
  return ret;
5361
5523
  }
@@ -5380,18 +5542,28 @@ function createSlots(slots, dynamicSlots) {
5380
5542
  //#endregion
5381
5543
  //#region packages/runtime-core/src/helpers/renderSlot.ts
5382
5544
  /**
5545
+ * Links a slot function to its raw vapor slot: a raw vapor slot carries
5546
+ * itself, and the wrapper the interop slots proxy hands out carries the raw
5547
+ * slot it wraps — one lookup answers both "is this a vapor slot" and
5548
+ * "which one". Internal to vapor interop.
5549
+ */
5550
+ const rawVaporSlotKey = Symbol(`rawVaporSlot`);
5551
+ /**
5383
5552
  * Compiler runtime helper for rendering `<slot/>`
5384
5553
  * @private
5385
5554
  */
5386
- function renderSlot(slots, name, props = {}, fallback, noSlotted, branchKey) {
5555
+ function renderSlot(slots, name, props, fallback, noSlotted, branchKey) {
5556
+ if (props == null) props = {};
5387
5557
  let slot = slots[name];
5388
- if (fallback) fallback.__vdom = true;
5389
- const vaporSlot = slot && (slot.__vs || (slot.__vapor ? slot : null));
5558
+ const vaporSlot = slot && slot[rawVaporSlotKey];
5390
5559
  if (vaporSlot) {
5391
5560
  const ret = (openBlock(), createBlock(VaporSlot, props));
5392
5561
  ret.vs = {
5393
5562
  slot: vaporSlot,
5394
- fallback
5563
+ outlets: fallback ? [{
5564
+ fallback,
5565
+ owner: currentRenderingInstance
5566
+ }] : void 0
5395
5567
  };
5396
5568
  if (!noSlotted && ret.scopeId) ret.slotScopeIds = [ret.scopeId + "-s"];
5397
5569
  return ret;
@@ -5412,9 +5584,15 @@ function renderSlot(slots, name, props = {}, fallback, noSlotted, branchKey) {
5412
5584
  let rendered;
5413
5585
  try {
5414
5586
  const validSlotContent = slot && ensureValidVNode(slot(props));
5415
- ensureVaporSlotFallback(validSlotContent, fallback);
5587
+ let attached = false;
5588
+ if (fallback && validSlotContent && currentRenderingInstance) {
5589
+ const interop = currentRenderingInstance.appContext.vapor;
5590
+ if (interop) attached = interop.attachSlotOutlet(validSlotContent, fallback, currentRenderingInstance);
5591
+ }
5416
5592
  const slotKey = props.key || branchKey || validSlotContent && validSlotContent.key;
5417
5593
  rendered = createBlock(Fragment, { key: (slotKey && !isSymbol(slotKey) ? slotKey : `_${name}`) + (!validSlotContent && fallback ? "_fb" : "") }, validSlotContent || (fallback ? fallback() : []), validSlotContent && slots._ === 1 ? 64 : -2);
5594
+ if (!validSlotContent && fallback) rendered.shapeFlag |= 1024;
5595
+ if (attached) rendered.vo = true;
5418
5596
  } catch (err) {
5419
5597
  for (let i = blockStack.length; i > prevStackSize; i--) closeBlock();
5420
5598
  throw err;
@@ -5432,10 +5610,6 @@ function ensureValidVNode(vnodes) {
5432
5610
  return true;
5433
5611
  }) ? vnodes : null;
5434
5612
  }
5435
- function ensureVaporSlotFallback(vnodes, fallback) {
5436
- let vaporSlot;
5437
- if (vnodes && vnodes.length === 1 && isVNode(vnodes[0]) && (vaporSlot = vnodes[0].vs)) vaporSlot.outletFallback = fallback;
5438
- }
5439
5613
  //#endregion
5440
5614
  //#region packages/runtime-core/src/helpers/toHandlers.ts
5441
5615
  /**
@@ -5494,12 +5668,14 @@ function legacyResolveScopedSlots(fns, raw, hasDynamicKeys) {
5494
5668
  function mapKeyToName(slots) {
5495
5669
  for (let i = 0; i < slots.length; i++) {
5496
5670
  const fn = slots[i];
5497
- if (fn) if (isArray(fn)) mapKeyToName(fn);
5498
- else fn.name = fn.key || "default";
5671
+ if (fn) {
5672
+ if (isArray(fn)) mapKeyToName(fn);
5673
+ else fn.name = fn.key || "default";
5674
+ }
5499
5675
  }
5500
5676
  return slots;
5501
5677
  }
5502
- const staticCacheMap = /* @__PURE__ */ new WeakMap();
5678
+ const staticCacheMap = /*@__PURE__*/ new WeakMap();
5503
5679
  function legacyRenderStatic(instance, index) {
5504
5680
  let cache = staticCacheMap.get(instance);
5505
5681
  if (!cache) staticCacheMap.set(instance, cache = []);
@@ -5632,11 +5808,38 @@ const getPublicInstance = (i) => {
5632
5808
  if (isStatefulComponent(i)) return getComponentPublicInstance(i);
5633
5809
  return getPublicInstance(i.parent);
5634
5810
  };
5811
+ const resolveDevRootEl = (vnode) => {
5812
+ let found = false;
5813
+ while (true) {
5814
+ if (vnode.patchFlag > 0 && vnode.patchFlag & 2048) {
5815
+ const root = filterSingleRoot(vnode.children);
5816
+ if (!root) return;
5817
+ vnode = root;
5818
+ found = true;
5819
+ continue;
5820
+ }
5821
+ const component = vnode.component;
5822
+ if (component && component.subTree) {
5823
+ vnode = component.subTree;
5824
+ continue;
5825
+ }
5826
+ const suspense = vnode.suspense;
5827
+ if (suspense && suspense.activeBranch) {
5828
+ vnode = suspense.activeBranch;
5829
+ continue;
5830
+ }
5831
+ return found ? vnode.el : void 0;
5832
+ }
5833
+ };
5834
+ const getDevRootFragmentEl = (i) => {
5835
+ const el = i.subTree && resolveDevRootEl(i.subTree);
5836
+ return el === void 0 ? i.vnode.el : el;
5837
+ };
5635
5838
  let publicPropertiesMap;
5636
5839
  const getPublicPropertiesMap = () => {
5637
5840
  if (!publicPropertiesMap) publicPropertiesMap = extend(Object.create(null), {
5638
5841
  $: (i) => i,
5639
- $el: (i) => i.vnode.el,
5842
+ $el: (i) => getDevRootFragmentEl(i),
5640
5843
  $data: (i) => i.data,
5641
5844
  $props: (i) => /* @__PURE__ */ shallowReadonly(i.props),
5642
5845
  $attrs: (i) => /* @__PURE__ */ shallowReadonly(i.attrs),
@@ -5749,7 +5952,7 @@ PublicInstanceProxyHandlers.ownKeys = (target) => {
5749
5952
  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.");
5750
5953
  return Reflect.ownKeys(target);
5751
5954
  };
5752
- const RuntimeCompiledPublicInstanceProxyHandlers = /* @__PURE__ */ extend({}, PublicInstanceProxyHandlers, {
5955
+ const RuntimeCompiledPublicInstanceProxyHandlers = /*@__PURE__*/ extend({}, PublicInstanceProxyHandlers, {
5753
5956
  get(target, key) {
5754
5957
  if (key === Symbol.unscopables) return;
5755
5958
  return PublicInstanceProxyHandlers.get(target, key, target);
@@ -5934,12 +6137,13 @@ function mergeDefaults(raw, defaults) {
5934
6137
  for (const key in defaults) {
5935
6138
  if (key.startsWith("__skip")) continue;
5936
6139
  let opt = props[key];
5937
- if (opt) if (isArray(opt) || isFunction(opt)) opt = props[key] = {
5938
- type: opt,
5939
- default: defaults[key]
5940
- };
5941
- else opt.default = defaults[key];
5942
- else if (opt === null) opt = props[key] = { default: defaults[key] };
6140
+ if (opt) {
6141
+ if (isArray(opt) || isFunction(opt)) opt = props[key] = {
6142
+ type: opt,
6143
+ default: defaults[key]
6144
+ };
6145
+ else opt.default = defaults[key];
6146
+ } else if (opt === null) opt = props[key] = { default: defaults[key] };
5943
6147
  else warn$1(`props default key "${key}" has no corresponding declaration.`);
5944
6148
  if (opt && defaults[`__skip_${key}`]) opt.skipFactory = true;
5945
6149
  }
@@ -5989,37 +6193,32 @@ function createPropsRestProxy(props, excludedKeys) {
5989
6193
  function withAsyncContext(getAwaitable) {
5990
6194
  const ctx = getCurrentGenericInstance();
5991
6195
  const inSSRSetup = isInSSRComponentSetup;
5992
- const restoreAsyncContext = ctx && ctx.restoreAsyncContext ? ctx.restoreAsyncContext.bind(ctx) : void 0;
5993
6196
  if (!ctx) warn$1("withAsyncContext called without active current instance. This is likely a bug.");
5994
6197
  let awaitable = getAwaitable();
5995
6198
  setCurrentInstance(null, void 0);
5996
6199
  if (inSSRSetup) setInSSRSetupState(false);
5997
6200
  const restore = () => {
5998
- const resetStoppedScope = ctx && !ctx.scope.active ? ctx.scope : void 0;
6201
+ const stoppedScope = ctx && !ctx.scope.active ? ctx.scope : void 0;
5999
6202
  setCurrentInstance(ctx);
6000
6203
  if (inSSRSetup) setInSSRSetupState(true);
6001
- const reset = restoreAsyncContext && restoreAsyncContext();
6002
- return () => {
6003
- if (reset) reset();
6004
- if (resetStoppedScope) resetStoppedScope.reset();
6005
- };
6204
+ return stoppedScope;
6006
6205
  };
6007
6206
  const cleanup = () => {
6008
6207
  setCurrentInstance(null, void 0);
6009
6208
  if (inSSRSetup) setInSSRSetupState(false);
6010
6209
  };
6011
6210
  if (isPromise(awaitable)) awaitable = awaitable.catch((e) => {
6012
- const reset = restore();
6211
+ const stoppedScope = restore();
6013
6212
  Promise.resolve().then(() => Promise.resolve().then(() => {
6014
- if (reset) reset();
6213
+ if (stoppedScope) stoppedScope.reset();
6015
6214
  cleanup();
6016
6215
  }));
6017
6216
  throw e;
6018
6217
  });
6019
6218
  return [awaitable, () => {
6020
- const reset = restore();
6219
+ const stoppedScope = restore();
6021
6220
  Promise.resolve().then(() => {
6022
- if (reset) reset();
6221
+ if (stoppedScope) stoppedScope.reset();
6023
6222
  cleanup();
6024
6223
  });
6025
6224
  }];
@@ -6082,11 +6281,12 @@ function applyOptions(instance) {
6082
6281
  const opt = computedOptions[key];
6083
6282
  const get = isFunction(opt) ? opt.bind(publicThis, publicThis) : isFunction(opt.get) ? opt.get.bind(publicThis, publicThis) : NOOP;
6084
6283
  if (get === NOOP) warn$1(`Computed property "${key}" has no getter.`);
6284
+ const set = !isFunction(opt) && isFunction(opt.set) ? opt.set.bind(publicThis) : () => {
6285
+ warn$1(`Write operation failed: computed property "${key}" is readonly.`);
6286
+ };
6085
6287
  const c = computed({
6086
6288
  get,
6087
- set: !isFunction(opt) && isFunction(opt.set) ? opt.set.bind(publicThis) : () => {
6088
- warn$1(`Write operation failed: computed property "${key}" is readonly.`);
6089
- }
6289
+ set
6090
6290
  });
6091
6291
  Object.defineProperty(ctx, key, {
6092
6292
  enumerable: true,
@@ -6145,9 +6345,10 @@ function resolveInjections(injectOptions, ctx, checkDuplicateProperties = NOOP)
6145
6345
  for (const key in injectOptions) {
6146
6346
  const opt = injectOptions[key];
6147
6347
  let injected;
6148
- if (isObject(opt)) if ("default" in opt) injected = inject(opt.from || key, opt.default, true);
6149
- else injected = inject(opt.from || key);
6150
- else injected = inject(opt);
6348
+ if (isObject(opt)) {
6349
+ if ("default" in opt) injected = inject(opt.from || key, opt.default, true);
6350
+ else injected = inject(opt.from || key);
6351
+ } else injected = inject(opt);
6151
6352
  if (/* @__PURE__ */ isRef(injected)) Object.defineProperty(ctx, key, {
6152
6353
  enumerable: true,
6153
6354
  configurable: true,
@@ -6167,7 +6368,8 @@ function createWatcher(raw, ctx, publicThis, key) {
6167
6368
  {
6168
6369
  const cur = getCurrentInstance();
6169
6370
  const instance = cur && getCurrentScope() === cur.scope ? cur : null;
6170
- if (isArray(getter()) && isCompatEnabled$1("WATCH_ARRAY", instance)) options.deep = true;
6371
+ const newValue = getter();
6372
+ if (isArray(newValue) && isCompatEnabled$1("WATCH_ARRAY", instance)) options.deep = true;
6171
6373
  const baseGetter = getter;
6172
6374
  getter = () => {
6173
6375
  const val = baseGetter();
@@ -6180,13 +6382,14 @@ function createWatcher(raw, ctx, publicThis, key) {
6180
6382
  if (isFunction(handler)) watch(getter, handler, options);
6181
6383
  else warn$1(`Invalid watch handler specified by key "${raw}"`, handler);
6182
6384
  } else if (isFunction(raw)) watch(getter, raw.bind(publicThis), options);
6183
- else if (isObject(raw)) if (isArray(raw)) raw.forEach((r) => createWatcher(r, ctx, publicThis, key));
6184
- else {
6185
- const handler = isFunction(raw.handler) ? raw.handler.bind(publicThis) : ctx[raw.handler];
6186
- if (isFunction(handler)) watch(getter, handler, extend(raw, options));
6187
- else warn$1(`Invalid watch handler specified by key "${raw.handler}"`, handler);
6188
- }
6189
- else warn$1(`Invalid watch option: "${key}"`, raw);
6385
+ else if (isObject(raw)) {
6386
+ if (isArray(raw)) raw.forEach((r) => createWatcher(r, ctx, publicThis, key));
6387
+ else {
6388
+ const handler = isFunction(raw.handler) ? raw.handler.bind(publicThis) : ctx[raw.handler];
6389
+ if (isFunction(handler)) watch(getter, handler, extend(raw, options));
6390
+ else warn$1(`Invalid watch handler specified by key "${raw.handler}"`, handler);
6391
+ }
6392
+ } else warn$1(`Invalid watch option: "${key}"`, raw);
6190
6393
  }
6191
6394
  /**
6192
6395
  * Resolve merged options and cache it on the component.
@@ -6200,12 +6403,13 @@ function resolveMergedOptions(instance) {
6200
6403
  const cached = cache.get(base);
6201
6404
  let resolved;
6202
6405
  if (cached) resolved = cached;
6203
- else if (!globalMixins.length && !mixins && !extendsOptions) if (isCompatEnabled$1("PRIVATE_APIS", instance)) {
6204
- resolved = extend({}, base);
6205
- resolved.parent = instance.parent && instance.parent.proxy;
6206
- resolved.propsData = instance.vnode.props;
6207
- } else resolved = base;
6208
- else {
6406
+ else if (!globalMixins.length && !mixins && !extendsOptions) {
6407
+ if (isCompatEnabled$1("PRIVATE_APIS", instance)) {
6408
+ resolved = extend({}, base);
6409
+ resolved.parent = instance.parent && instance.parent.proxy;
6410
+ resolved.propsData = instance.vnode.props;
6411
+ } else resolved = base;
6412
+ } else {
6209
6413
  resolved = {};
6210
6414
  if (globalMixins.length) globalMixins.forEach((m) => mergeOptions(resolved, m, optionMergeStrategies, true));
6211
6415
  mergeOptions(resolved, base, optionMergeStrategies);
@@ -6278,7 +6482,7 @@ function mergeObjectOptions(to, from) {
6278
6482
  }
6279
6483
  function mergeEmitsOrPropsOptions(to, from) {
6280
6484
  if (to) {
6281
- if (isArray(to) && isArray(from)) return [...new Set([...to, ...from])];
6485
+ if (isArray(to) && isArray(from)) return [.../* @__PURE__ */ new Set([...to, ...from])];
6282
6486
  return extend(Object.create(null), normalizePropsOrEmits(to), normalizePropsOrEmits(from !== null && from !== void 0 ? from : {}));
6283
6487
  } else return from;
6284
6488
  }
@@ -6339,7 +6543,7 @@ function createCompatVue$1(createApp, createSingletonApp) {
6339
6543
  if (options.el) return vm.$mount(options.el);
6340
6544
  else return vm;
6341
6545
  }
6342
- Vue.version = `2.6.14-compat:3.6.0-rc.1`;
6546
+ Vue.version = `2.6.14-compat:3.6.0-rc.10`;
6343
6547
  Vue.config = singletonApp.config;
6344
6548
  Vue.use = (plugin, ...options) => {
6345
6549
  if (plugin && isFunction(plugin.install)) plugin.install(Vue, ...options);
@@ -6729,8 +6933,10 @@ function createAppAPI(mount, unmount, getPublicInstance, render) {
6729
6933
  } else warn$1(`Cannot unmount an app that is not mounted.`);
6730
6934
  },
6731
6935
  provide(key, value) {
6732
- 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.`);
6733
- else warn$1(`App already provides property with key "${String(key)}" inherited from its parent element. It will be overwritten with the new value.`);
6936
+ if (key in context.provides) {
6937
+ if (hasOwn(context.provides, key)) warn$1(`App already provides property with key "${String(key)}". It will be overwritten with the new value.`);
6938
+ else warn$1(`App already provides property with key "${String(key)}" inherited from its parent element. It will be overwritten with the new value.`);
6939
+ }
6734
6940
  context.provides[key] = value;
6735
6941
  return app;
6736
6942
  },
@@ -6812,13 +7018,17 @@ function useModel(props, name, options = EMPTY_OBJ) {
6812
7018
  const modifiers = getModelModifiers(props, camelizedName, defaultPropGetter);
6813
7019
  const res = customRef((track, trigger) => {
6814
7020
  let localValue;
7021
+ let prevPropValue = EMPTY_OBJ;
6815
7022
  let prevSetValue = EMPTY_OBJ;
6816
7023
  let prevEmittedValue;
6817
7024
  watchSyncEffect(() => {
6818
7025
  const propValue = props[camelizedName];
6819
- if (hasChanged(localValue, propValue)) {
6820
- localValue = propValue;
6821
- trigger();
7026
+ if (hasChanged(prevPropValue, propValue)) {
7027
+ prevPropValue = propValue;
7028
+ if (hasChanged(localValue, propValue)) {
7029
+ localValue = propValue;
7030
+ trigger();
7031
+ }
6822
7032
  }
6823
7033
  });
6824
7034
  return {
@@ -6880,12 +7090,14 @@ function baseEmit(instance, props, getter, event, ...rawArgs) {
6880
7090
  if (instance.isUnmounted) return;
6881
7091
  {
6882
7092
  const { emitsOptions, propsOptions } = instance;
6883
- if (emitsOptions) if (!(event in emitsOptions) && !(event.startsWith("hook:") || event.startsWith(compatModelEventPrefix))) {
6884
- 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.`);
6885
- } else {
6886
- const validator = emitsOptions[event];
6887
- if (isFunction(validator)) {
6888
- if (!validator(...rawArgs)) warn$1(`Invalid event arguments: event validation failed for event "${event}".`);
7093
+ if (emitsOptions) {
7094
+ if (!(event in emitsOptions) && !(event.startsWith("hook:") || event.startsWith(compatModelEventPrefix))) {
7095
+ 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.`);
7096
+ } else {
7097
+ const validator = emitsOptions[event];
7098
+ if (isFunction(validator)) {
7099
+ if (!validator(...rawArgs)) warn$1(`Invalid event arguments: event validation failed for event "${event}".`);
7100
+ }
6889
7101
  }
6890
7102
  }
6891
7103
  }
@@ -6895,7 +7107,7 @@ function baseEmit(instance, props, getter, event, ...rawArgs) {
6895
7107
  const modifiers = isCompatModelListener ? props.modelModifiers : isModelListener && getModelModifiers(props, event.slice(7), getter);
6896
7108
  if (modifiers) {
6897
7109
  if (modifiers.trim) args = rawArgs.map((a) => isString(a) ? a.trim() : a);
6898
- if (modifiers.number) args = rawArgs.map(looseToNumber);
7110
+ if (modifiers.number) args = args.map(looseToNumber);
6899
7111
  }
6900
7112
  devtoolsComponentEmit(instance, event, args);
6901
7113
  {
@@ -7037,8 +7249,9 @@ function renderComponentRoot(instance) {
7037
7249
  root.dirs = root.dirs ? root.dirs.concat(vnode.dirs) : vnode.dirs;
7038
7250
  }
7039
7251
  if (vnode.transition) {
7040
- if (!isElementRoot(root)) warn$1("Component inside <Transition> renders non-element root node that cannot be animated.");
7041
- setTransitionHooks(root, vnode.transition);
7252
+ const child = isTeleport(root.type) ? getInnerChild$1(root) || root : root;
7253
+ if (!isElementRoot(child)) warn$1("Component inside <Transition> renders non-element root node that cannot be animated.");
7254
+ setTransitionHooks(child, vnode.transition);
7042
7255
  }
7043
7256
  if (setRoot) setRoot(root);
7044
7257
  else result = root;
@@ -7089,18 +7302,21 @@ function filterSingleRoot(children, recurse = true) {
7089
7302
  for (let i = 0; i < children.length; i++) {
7090
7303
  const child = children[i];
7091
7304
  if (isVNode(child)) {
7092
- if (child.type !== Comment || child.children === "v-if") if (singleRoot) return;
7093
- else {
7094
- singleRoot = child;
7095
- if (recurse && singleRoot.patchFlag > 0 && singleRoot.patchFlag & 2048) return filterSingleRoot(singleRoot.children);
7305
+ if (child.type !== Comment || child.children === "v-if") {
7306
+ if (singleRoot) return;
7307
+ else {
7308
+ singleRoot = child;
7309
+ if (recurse && singleRoot.patchFlag > 0 && singleRoot.patchFlag & 2048) return filterSingleRoot(singleRoot.children);
7310
+ }
7096
7311
  }
7097
7312
  } else return;
7098
7313
  }
7099
7314
  return singleRoot;
7100
7315
  }
7316
+ const isFunctionalFallthroughKey = (key) => key === "class" || key === "style" || isOn(key);
7101
7317
  const getFunctionalFallthrough = (attrs) => {
7102
7318
  let res;
7103
- for (const key in attrs) if (key === "class" || key === "style" || isOn(key)) (res || (res = {}))[key] = attrs[key];
7319
+ for (const key in attrs) if (isFunctionalFallthroughKey(key)) (res || (res = {}))[key] = attrs[key];
7104
7320
  return res;
7105
7321
  };
7106
7322
  const filterModelListeners = (attrs, props) => {
@@ -7236,16 +7452,17 @@ function updateProps(instance, rawProps, rawPrevProps, optimized) {
7236
7452
  let key = propsToUpdate[i];
7237
7453
  if (isEmitListener(instance.emitsOptions, key)) continue;
7238
7454
  const value = rawProps[key];
7239
- if (options) if (hasOwn(attrs, key)) {
7240
- if (value !== attrs[key]) {
7241
- attrs[key] = value;
7242
- hasAttrsChanged = true;
7455
+ if (options) {
7456
+ if (hasOwn(attrs, key)) {
7457
+ if (value !== attrs[key]) {
7458
+ attrs[key] = value;
7459
+ hasAttrsChanged = true;
7460
+ }
7461
+ } else {
7462
+ const camelizedKey = camelize(key);
7463
+ props[camelizedKey] = resolvePropValue(options, camelizedKey, value, instance, baseResolveDefault);
7243
7464
  }
7244
7465
  } else {
7245
- const camelizedKey = camelize(key);
7246
- props[camelizedKey] = resolvePropValue(options, camelizedKey, value, instance, baseResolveDefault);
7247
- }
7248
- else {
7249
7466
  if (isOn(key) && key.endsWith("Native")) key = key.slice(0, -6);
7250
7467
  else if (shouldSkipAttr(key, instance)) continue;
7251
7468
  if (value !== attrs[key]) {
@@ -7258,9 +7475,11 @@ function updateProps(instance, rawProps, rawPrevProps, optimized) {
7258
7475
  } else {
7259
7476
  if (setFullProps(instance, rawProps, props, attrs)) hasAttrsChanged = true;
7260
7477
  let kebabKey;
7261
- for (const key in rawCurrentProps) if (!rawProps || !hasOwn(rawProps, key) && ((kebabKey = hyphenate(key)) === key || !hasOwn(rawProps, kebabKey))) if (options) {
7262
- if (rawPrevProps && (rawPrevProps[key] !== void 0 || rawPrevProps[kebabKey] !== void 0)) props[key] = resolvePropValue(options, key, void 0, instance, baseResolveDefault, true);
7263
- } else delete props[key];
7478
+ for (const key in rawCurrentProps) if (!rawProps || !hasOwn(rawProps, key) && ((kebabKey = hyphenate(key)) === key || !hasOwn(rawProps, kebabKey))) {
7479
+ if (options) {
7480
+ if (rawPrevProps && (rawPrevProps[key] !== void 0 || rawPrevProps[kebabKey] !== void 0)) props[key] = resolvePropValue(options, key, void 0, instance, baseResolveDefault, true);
7481
+ } else delete props[key];
7482
+ }
7264
7483
  if (attrs !== rawCurrentProps) {
7265
7484
  for (const key in attrs) if (!rawProps || !hasOwn(rawProps, key) && !hasOwn(rawProps, key + "Native")) {
7266
7485
  delete attrs[key];
@@ -7281,9 +7500,10 @@ function setFullProps(instance, rawProps, props, attrs) {
7281
7500
  if (key === "inline-template") continue;
7282
7501
  const value = rawProps[key];
7283
7502
  let camelKey;
7284
- if (options && hasOwn(options, camelKey = camelize(key))) if (!needCastKeys || !needCastKeys.includes(camelKey)) props[camelKey] = value;
7285
- else (rawCastValues || (rawCastValues = {}))[camelKey] = value;
7286
- else if (!isEmitListener(instance.emitsOptions, key)) {
7503
+ if (options && hasOwn(options, camelKey = camelize(key))) {
7504
+ if (!needCastKeys || !needCastKeys.includes(camelKey)) props[camelKey] = value;
7505
+ else (rawCastValues || (rawCastValues = {}))[camelKey] = value;
7506
+ } else if (!isEmitListener(instance.emitsOptions, key)) {
7287
7507
  if (isOn(key) && key.endsWith("Native")) key = key.slice(0, -6);
7288
7508
  else if (shouldSkipAttr(key, instance)) continue;
7289
7509
  if (!(key in attrs) || value !== attrs[key]) {
@@ -7332,7 +7552,7 @@ function baseResolveDefault(factory, instance, key) {
7332
7552
  const prev = setCurrentInstance(instance);
7333
7553
  const props = /* @__PURE__ */ toRaw(instance.props);
7334
7554
  value = factory.call(isCompatEnabled$1("PROPS_DEFAULT_THIS", instance) ? createPropsDefaultThis(instance, props, key) : null, props);
7335
- setCurrentInstance(...prev);
7555
+ restoreCurrentInstance(prev);
7336
7556
  return value;
7337
7557
  }
7338
7558
  const mixinPropsCache = /* @__PURE__ */ new WeakMap();
@@ -7449,7 +7669,7 @@ function validateProp(key, value, propOptions, resolvedProps, isAbsent) {
7449
7669
  }
7450
7670
  if (validator && !validator(value, /* @__PURE__ */ shallowReadonly(resolvedProps))) warn$1("Invalid prop: custom validator check failed for prop \"" + key + "\".");
7451
7671
  }
7452
- const isSimpleType = /* @__PURE__ */ makeMap("String,Number,Boolean,Function,Symbol,BigInt");
7672
+ const isSimpleType = /*@__PURE__*/ makeMap("String,Number,Boolean,Function,Symbol,BigInt");
7453
7673
  /**
7454
7674
  * dev only
7455
7675
  */
@@ -7562,12 +7782,13 @@ const updateSlots = (instance, children, optimized) => {
7562
7782
  let deletionComparisonTarget = EMPTY_OBJ;
7563
7783
  if (vnode.shapeFlag & 32) {
7564
7784
  const type = children._;
7565
- if (type) if (isHmrUpdating) {
7566
- assignSlots(slots, children, optimized);
7567
- trigger(instance, "set", "$slots");
7568
- } else if (optimized && type === 1) needDeletionCheck = false;
7569
- else assignSlots(slots, children, optimized);
7570
- else {
7785
+ if (type) {
7786
+ if (isHmrUpdating) {
7787
+ assignSlots(slots, children, optimized);
7788
+ trigger(instance, "set", "$slots");
7789
+ } else if (optimized && type === 1) needDeletionCheck = false;
7790
+ else assignSlots(slots, children, optimized);
7791
+ } else {
7571
7792
  needDeletionCheck = !children.$stable;
7572
7793
  normalizeObjectSlots(children, slots, instance);
7573
7794
  }
@@ -7585,7 +7806,7 @@ const updateSlots = (instance, children, optimized) => {
7585
7806
  let supported;
7586
7807
  let perf;
7587
7808
  let cachedNow$1 = 0;
7588
- const p$1 = /* @__PURE__ */ Promise.resolve();
7809
+ const p$1 = /*@__PURE__*/ Promise.resolve();
7589
7810
  const getNow$1 = () => cachedNow$1 || (p$1.then(() => cachedNow$1 = 0), cachedNow$1 = isSupported() ? perf.now() : Date.now());
7590
7811
  /**
7591
7812
  * @internal
@@ -7666,6 +7887,10 @@ function baseCreateRenderer(options, createHydrationFns) {
7666
7887
  optimized = false;
7667
7888
  n2.dynamicChildren = null;
7668
7889
  }
7890
+ if (n2.dynamicChildren && n1 && n1.dynamicChildren && n1.dynamicChildren.hasOnce) {
7891
+ if (n2.dynamicChildren === EMPTY_ARR) n2.dynamicChildren = [];
7892
+ n2.dynamicChildren.hasOnce = true;
7893
+ }
7669
7894
  const { type, ref, shapeFlag } = n2;
7670
7895
  switch (type) {
7671
7896
  case Text:
@@ -7682,7 +7907,7 @@ function baseCreateRenderer(options, createHydrationFns) {
7682
7907
  processFragment(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);
7683
7908
  break;
7684
7909
  case VaporSlot:
7685
- getVaporInterface(parentComponent, n2).slot(n1, n2, container, anchor, parentComponent, parentSuspense);
7910
+ getVaporInterface(parentComponent, n2).slot(n1, n2, container, anchor, parentComponent, parentSuspense, slotScopeIds);
7686
7911
  break;
7687
7912
  default: if (shapeFlag & 1) processElement(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);
7688
7913
  else if (shapeFlag & 6) processComponent(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);
@@ -7801,7 +8026,10 @@ function baseCreateRenderer(options, createHydrationFns) {
7801
8026
  for (let i = 0; i < inheritedScopeIds.length; i++) hostSetScopeId(el, inheritedScopeIds[i]);
7802
8027
  };
7803
8028
  const mountChildren = (children, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, start = 0) => {
7804
- 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);
8029
+ for (let i = start; i < children.length; i++) {
8030
+ const child = children[i] = optimized ? cloneIfMounted(children[i]) : normalizeVNode(children[i]);
8031
+ patch(null, child, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);
8032
+ }
7805
8033
  };
7806
8034
  const patchElement = (n1, n2, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => {
7807
8035
  const el = n2.el = n1.el;
@@ -7813,6 +8041,7 @@ function baseCreateRenderer(options, createHydrationFns) {
7813
8041
  let vnodeHook;
7814
8042
  parentComponent && toggleRecurse(parentComponent, false);
7815
8043
  if (vnodeHook = newProps.onVnodeBeforeUpdate) invokeVNodeHook(vnodeHook, parentComponent, n2, n1);
8044
+ if (n2.ibu) n2.ibu();
7816
8045
  if (dirs) invokeDirectiveHook(n2, n1, parentComponent, "beforeUpdate");
7817
8046
  parentComponent && toggleRecurse(parentComponent, true);
7818
8047
  if (isHmrUpdating || dynamicChildren && (!n1.dynamicChildren || n1.dynamicChildren.length !== dynamicChildren.length)) {
@@ -7846,8 +8075,9 @@ function baseCreateRenderer(options, createHydrationFns) {
7846
8075
  if (n1.children !== n2.children) hostSetElementText(el, n2.children);
7847
8076
  }
7848
8077
  } else if (!optimized && dynamicChildren == null) patchProps(el, oldProps, newProps, parentComponent, namespace);
7849
- if ((vnodeHook = newProps.onVnodeUpdated) || dirs) queuePostRenderEffect(() => {
8078
+ if ((vnodeHook = newProps.onVnodeUpdated) || dirs || n2.iu) queuePostRenderEffect(() => {
7850
8079
  vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, n2, n1);
8080
+ n2.iu && n2.iu();
7851
8081
  dirs && invokeDirectiveHook(n2, n1, parentComponent, "updated");
7852
8082
  }, void 0, parentSuspense);
7853
8083
  };
@@ -7855,7 +8085,8 @@ function baseCreateRenderer(options, createHydrationFns) {
7855
8085
  for (let i = 0; i < newChildren.length; i++) {
7856
8086
  const oldVNode = oldChildren[i];
7857
8087
  const newVNode = newChildren[i];
7858
- patch(oldVNode, newVNode, oldVNode.el && (oldVNode.type === Fragment || !isSameVNodeType(oldVNode, newVNode) || oldVNode.shapeFlag & 198) ? hostParentNode(oldVNode.el) : fallbackContainer, null, parentComponent, parentSuspense, namespace, slotScopeIds, true);
8088
+ const container = oldVNode.el && (oldVNode.type === Fragment || !isSameVNodeType(oldVNode, newVNode) || oldVNode.shapeFlag & 198) ? hostParentNode(oldVNode.el) : fallbackContainer;
8089
+ patch(oldVNode, newVNode, container, null, parentComponent, parentSuspense, namespace, slotScopeIds, true);
7859
8090
  }
7860
8091
  };
7861
8092
  const patchProps = (el, oldProps, newProps, parentComponent, namespace) => {
@@ -7893,41 +8124,15 @@ function baseCreateRenderer(options, createHydrationFns) {
7893
8124
  };
7894
8125
  const processComponent = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => {
7895
8126
  n2.slotScopeIds = slotScopeIds;
7896
- if (n2.type.__vapor) if (n1 == null) if (n2.shapeFlag & 512) getVaporInterface(parentComponent, n2).activate(n2, container, anchor, parentComponent);
7897
- else {
7898
- const vnodeBeforeMountHook = !isAsyncWrapper(n2) && n2.props && n2.props.onVnodeBeforeMount;
7899
- getVaporInterface(parentComponent, n2).mount(n2, container, anchor, parentComponent, parentSuspense, () => {
7900
- if (n2.dirs) {
7901
- invokeDirectiveHook(n2, null, parentComponent, "created");
7902
- invokeDirectiveHook(n2, null, parentComponent, "beforeMount");
7903
- }
7904
- }, () => {
7905
- if (vnodeBeforeMountHook) invokeVNodeHook(vnodeBeforeMountHook, parentComponent, n2);
7906
- });
7907
- if (n2.dirs) queuePostRenderEffect(() => invokeDirectiveHook(n2, null, parentComponent, "mounted"), void 0, parentSuspense);
7908
- const vnodeMountedHook = !isAsyncWrapper(n2) && n2.props && n2.props.onVnodeMounted;
7909
- if (vnodeMountedHook) {
7910
- const scopedVNode = n2;
7911
- queuePostRenderEffect(() => invokeVNodeHook(vnodeMountedHook, parentComponent, scopedVNode), void 0, parentSuspense);
7912
- }
7913
- }
7914
- else {
7915
- const shouldUpdate = shouldUpdateComponent(n1, n2, optimized);
7916
- getVaporInterface(parentComponent, n2).update(n1, n2, shouldUpdate, () => {
7917
- if (n2.dirs) invokeDirectiveHook(n2, n1, parentComponent, "beforeUpdate");
7918
- }, () => {
7919
- const vnodeBeforeUpdateHook = n2.props && n2.props.onVnodeBeforeUpdate;
7920
- if (vnodeBeforeUpdateHook) invokeVNodeHook(vnodeBeforeUpdateHook, parentComponent, n2, n1);
7921
- });
7922
- const vnodeUpdatedHook = n2.props && n2.props.onVnodeUpdated;
7923
- if (shouldUpdate && (vnodeUpdatedHook || n2.dirs)) queuePostRenderEffect(() => {
7924
- n2.dirs && invokeDirectiveHook(n2, n1, parentComponent, "updated");
7925
- vnodeUpdatedHook && invokeVNodeHook(vnodeUpdatedHook, parentComponent, n2, n1);
7926
- }, void 0, parentSuspense);
7927
- }
7928
- else if (n1 == null) if (n2.shapeFlag & 512) parentComponent.ctx.activate(n2, container, anchor, namespace, optimized);
7929
- else mountComponent(n2, container, anchor, parentComponent, parentSuspense, namespace, optimized);
7930
- else updateComponent(n1, n2, optimized);
8127
+ if (n2.type.__vapor) {
8128
+ if (n1 == null) {
8129
+ if (n2.shapeFlag & 512) getVaporInterface(parentComponent, n2).activate(n2, container, anchor, parentComponent, parentSuspense);
8130
+ else getVaporInterface(parentComponent, n2).mount(n2, container, anchor, parentComponent, parentSuspense);
8131
+ } else getVaporInterface(parentComponent, n2).update(n1, n2, shouldUpdateComponent(n1, n2, optimized));
8132
+ } else if (n1 == null) {
8133
+ if (n2.shapeFlag & 512) parentComponent.ctx.activate(n2, container, anchor, namespace, optimized);
8134
+ else mountComponent(n2, container, anchor, parentComponent, parentSuspense, namespace, optimized);
8135
+ } else updateComponent(n1, n2, optimized);
7931
8136
  };
7932
8137
  const mountComponent = (initialVNode, container, anchor, parentComponent, parentSuspense, namespace, optimized) => {
7933
8138
  const compatMountInstance = initialVNode.isCompatRoot && initialVNode.component;
@@ -7971,16 +8176,18 @@ function baseCreateRenderer(options, createHydrationFns) {
7971
8176
  };
7972
8177
  const updateComponent = (n1, n2, optimized) => {
7973
8178
  const instance = n2.component = n1.component;
7974
- if (shouldUpdateComponent(n1, n2, optimized)) if (instance.asyncDep && !instance.asyncResolved) {
7975
- pushWarningContext(n2);
7976
- updateComponentPreRender(instance, n2, optimized);
7977
- popWarningContext();
7978
- return;
8179
+ if (shouldUpdateComponent(n1, n2, optimized)) {
8180
+ if (instance.asyncDep && !instance.asyncResolved) {
8181
+ pushWarningContext(n2);
8182
+ n2.el = n1.el;
8183
+ updateComponentPreRender(instance, n2, optimized);
8184
+ popWarningContext();
8185
+ return;
8186
+ } else {
8187
+ instance.next = n2;
8188
+ instance.effect.run();
8189
+ }
7979
8190
  } else {
7980
- instance.next = n2;
7981
- instance.effect.run();
7982
- }
7983
- else {
7984
8191
  n2.el = n1.el;
7985
8192
  instance.vnode = n2;
7986
8193
  }
@@ -8083,6 +8290,7 @@ function baseCreateRenderer(options, createHydrationFns) {
8083
8290
  } else next = vnode;
8084
8291
  if (bu) invokeArrayFns(bu);
8085
8292
  if (vnodeHook = next.props && next.props.onVnodeBeforeUpdate) invokeVNodeHook(vnodeHook, parent, next, vnode);
8293
+ if (next.ibu) next.ibu();
8086
8294
  if (isCompatEnabled$1("INSTANCE_EVENT_HOOKS", instance)) instance.emit("hook:beforeUpdate");
8087
8295
  toggleRecurse(instance, true);
8088
8296
  startMeasure(instance, `render`);
@@ -8096,7 +8304,10 @@ function baseCreateRenderer(options, createHydrationFns) {
8096
8304
  next.el = nextTree.el;
8097
8305
  if (originNext === null) updateHOCHostEl(instance, nextTree.el);
8098
8306
  if (u) queuePostRenderEffect(u, void 0, parentSuspense);
8099
- if (vnodeHook = next.props && next.props.onVnodeUpdated) queuePostRenderEffect(() => invokeVNodeHook(vnodeHook, parent, next, vnode), void 0, parentSuspense);
8307
+ if ((vnodeHook = next.props && next.props.onVnodeUpdated) || next.iu) queuePostRenderEffect(() => {
8308
+ vnodeHook && invokeVNodeHook(vnodeHook, parent, next, vnode);
8309
+ next.iu && next.iu();
8310
+ }, void 0, parentSuspense);
8100
8311
  if (isCompatEnabled$1("INSTANCE_EVENT_HOOKS", instance)) queuePostRenderEffect(() => instance.emit("hook:updated"), void 0, parentSuspense);
8101
8312
  devtoolsComponentUpdated(instance);
8102
8313
  popWarningContext();
@@ -8137,9 +8348,10 @@ function baseCreateRenderer(options, createHydrationFns) {
8137
8348
  if (shapeFlag & 8) {
8138
8349
  if (prevShapeFlag & 16) unmountChildren(c1, parentComponent, parentSuspense);
8139
8350
  if (c2 !== c1) hostSetElementText(container, c2);
8140
- } else if (prevShapeFlag & 16) if (shapeFlag & 16) patchKeyedChildren(c1, c2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);
8141
- else unmountChildren(c1, parentComponent, parentSuspense, true);
8142
- else {
8351
+ } else if (prevShapeFlag & 16) {
8352
+ if (shapeFlag & 16) patchKeyedChildren(c1, c2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);
8353
+ else unmountChildren(c1, parentComponent, parentSuspense, true);
8354
+ } else {
8143
8355
  if (prevShapeFlag & 8) hostSetElementText(container, "");
8144
8356
  if (shapeFlag & 16) mountChildren(c2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);
8145
8357
  }
@@ -8238,15 +8450,17 @@ function baseCreateRenderer(options, createHydrationFns) {
8238
8450
  const anchorVNode = c2[nextIndex + 1];
8239
8451
  const anchor = nextIndex + 1 < l2 ? anchorVNode.el || resolveAsyncComponentPlaceholder(anchorVNode) : parentAnchor;
8240
8452
  if (newIndexToOldIndexMap[i] === 0) patch(null, nextChild, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);
8241
- else if (moved) if (j < 0 || i !== increasingNewIndexSequence[j]) move(nextChild, container, anchor, 2, parentComponent);
8242
- else j--;
8453
+ else if (moved) {
8454
+ if (j < 0 || i !== increasingNewIndexSequence[j]) move(nextChild, container, anchor, 2, parentComponent);
8455
+ else j--;
8456
+ }
8243
8457
  }
8244
8458
  }
8245
8459
  };
8246
8460
  const move = (vnode, container, anchor, moveType, parentComponent, parentSuspense = null) => {
8247
8461
  const { el, type, transition, children, shapeFlag } = vnode;
8248
8462
  if (isVaporComponent(type) || type === VaporSlot) {
8249
- getVaporInterface(parentComponent, vnode).move(vnode, container, anchor, moveType);
8463
+ getVaporInterface(parentComponent, vnode).move(vnode, container, anchor, moveType, parentSuspense);
8250
8464
  return;
8251
8465
  }
8252
8466
  if (shapeFlag & 6) {
@@ -8271,54 +8485,37 @@ function baseCreateRenderer(options, createHydrationFns) {
8271
8485
  moveStaticNode(vnode, container, anchor);
8272
8486
  return;
8273
8487
  }
8274
- if (moveType !== 2 && shapeFlag & 1 && transition) if (moveType === 0) performTransitionEnter(el, transition, () => hostInsert(el, container, anchor), parentSuspense, true);
8275
- else {
8276
- const { leave, delayLeave, afterLeave } = transition;
8277
- const remove = () => {
8488
+ if (moveType !== 2 && shapeFlag & 1 && transition) {
8489
+ if (moveType === 0) performTransitionEnter(el, transition, () => hostInsert(el, container, anchor), parentSuspense, true);
8490
+ else performTransitionLeave(el, transition, () => {
8278
8491
  if (vnode.ctx.isUnmounted) hostRemove(el);
8279
8492
  else hostInsert(el, container, anchor);
8280
- };
8281
- const performLeave = () => {
8282
- const wasLeaving = el._isLeaving || !!el[leaveCbKey];
8283
- if (el._isLeaving) el[leaveCbKey](true);
8284
- if (transition.persisted && !wasLeaving) remove();
8285
- else leave(el, () => {
8286
- remove();
8287
- afterLeave && afterLeave();
8288
- });
8289
- };
8290
- if (delayLeave) delayLeave(el, remove, performLeave);
8291
- else performLeave();
8292
- }
8293
- else hostInsert(el, container, anchor);
8493
+ }, true, true);
8494
+ } else hostInsert(el, container, anchor);
8294
8495
  };
8295
8496
  const unmount = (vnode, parentComponent, parentSuspense, doRemove = false, optimized = false) => {
8296
8497
  const { type, props, ref, children, dynamicChildren, shapeFlag, patchFlag, dirs, cacheIndex, memo } = vnode;
8297
- if (patchFlag === -2) optimized = false;
8498
+ if (patchFlag === -2 || dynamicChildren && dynamicChildren.hasOnce) optimized = false;
8298
8499
  if (ref != null) {
8299
8500
  const prevSub = setActiveSub();
8300
8501
  setRef(ref, null, parentSuspense, vnode, true);
8301
8502
  setActiveSub(prevSub);
8302
8503
  }
8303
- if (cacheIndex != null) parentComponent.renderCache[cacheIndex] = void 0;
8504
+ if (cacheIndex != null && (!vnode.ctx || vnode.ctx === parentComponent)) parentComponent.renderCache[cacheIndex] = void 0;
8304
8505
  if (shapeFlag & 256) {
8305
- if (isVaporComponent(vnode.type)) getVaporInterface(parentComponent, vnode).deactivate(vnode, parentComponent.ctx.getStorageContainer());
8506
+ if (isVaporComponent(vnode.type)) getVaporInterface(parentComponent, vnode).deactivate(vnode, parentComponent.ctx.getStorageContainer(), parentSuspense);
8306
8507
  else parentComponent.ctx.deactivate(vnode);
8307
8508
  return;
8308
8509
  }
8510
+ if (shapeFlag & 6 && isVaporComponent(type)) {
8511
+ getVaporInterface(parentComponent, vnode).unmount(vnode, doRemove, parentSuspense);
8512
+ return;
8513
+ }
8309
8514
  const shouldInvokeDirs = shapeFlag & 1 && dirs;
8310
8515
  const shouldInvokeVnodeHook = !isAsyncWrapper(vnode);
8311
8516
  let vnodeHook;
8312
8517
  if (shouldInvokeVnodeHook && (vnodeHook = props && props.onVnodeBeforeUnmount)) invokeVNodeHook(vnodeHook, parentComponent, vnode);
8313
- if (shapeFlag & 6) if (isVaporComponent(type)) {
8314
- if (dirs) invokeDirectiveHook(vnode, null, parentComponent, "beforeUnmount");
8315
- getVaporInterface(parentComponent, vnode).unmount(vnode, doRemove);
8316
- if (shouldInvokeVnodeHook && (vnodeHook = props && props.onVnodeUnmounted) || dirs) queuePostRenderEffect(() => {
8317
- dirs && invokeDirectiveHook(vnode, null, parentComponent, "unmounted");
8318
- vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, vnode);
8319
- }, void 0, parentSuspense);
8320
- return;
8321
- } else unmountComponent(vnode.component, parentSuspense, doRemove);
8518
+ if (shapeFlag & 6) unmountComponent(vnode.component, parentSuspense, doRemove);
8322
8519
  else {
8323
8520
  if (shapeFlag & 128) {
8324
8521
  vnode.suspense.unmount(parentSuspense, doRemove);
@@ -8329,7 +8526,7 @@ function baseCreateRenderer(options, createHydrationFns) {
8329
8526
  else if (dynamicChildren && !dynamicChildren.hasOnce && (type !== Fragment || patchFlag > 0 && patchFlag & 64)) unmountChildren(dynamicChildren, parentComponent, parentSuspense, false, true);
8330
8527
  else if (type === Fragment && patchFlag & 384 || !optimized && shapeFlag & 16) unmountChildren(children, parentComponent, parentSuspense);
8331
8528
  if (type === VaporSlot) {
8332
- getVaporInterface(parentComponent, vnode).unmount(vnode, doRemove);
8529
+ getVaporInterface(parentComponent, vnode).unmount(vnode, doRemove, parentSuspense);
8333
8530
  return;
8334
8531
  }
8335
8532
  if (doRemove) remove(vnode);
@@ -8353,6 +8550,7 @@ function baseCreateRenderer(options, createHydrationFns) {
8353
8550
  }
8354
8551
  if (type === Static) {
8355
8552
  removeStaticNode(vnode);
8553
+ if (transition && !transition.persisted && transition.afterLeave) transition.afterLeave();
8356
8554
  return;
8357
8555
  }
8358
8556
  if (transition) performTransitionLeave(el, transition, () => hostRemove(el), !!(vnode.shapeFlag & 1));
@@ -8378,7 +8576,10 @@ function baseCreateRenderer(options, createHydrationFns) {
8378
8576
  if (effect) {
8379
8577
  effect.stop();
8380
8578
  unmount(subTree, instance, parentSuspense, doRemove);
8381
- } else if (doRemove && subTree && instance.vnode.el) remove(subTree);
8579
+ } else if (instance.vnode.el && subTree) {
8580
+ subTree.transition = instance.vnode.transition;
8581
+ unmount(subTree, instance, parentSuspense, doRemove);
8582
+ }
8382
8583
  if (um) queuePostRenderEffect(um, void 0, parentSuspense);
8383
8584
  if (isCompatEnabled$1("INSTANCE_EVENT_HOOKS", instance)) queuePostRenderEffect(() => instance.emit("hook:destroyed"), void 0, parentSuspense);
8384
8585
  queuePostRenderEffect(() => instance.isUnmounted = true, void 0, parentSuspense);
@@ -8453,12 +8654,14 @@ function resolveChildrenNamespace({ type, props }, currentNamespace) {
8453
8654
  return currentNamespace === "svg" && type === "foreignObject" || currentNamespace === "mathml" && type === "annotation-xml" && props && props.encoding && props.encoding.includes("html") ? void 0 : currentNamespace;
8454
8655
  }
8455
8656
  function toggleRecurse({ effect, job, vapor }, allowed) {
8456
- if (!vapor) if (allowed) {
8457
- effect.flags |= 128;
8458
- job.flags |= 2;
8459
- } else {
8460
- effect.flags &= -129;
8461
- job.flags &= -3;
8657
+ if (!vapor) {
8658
+ if (allowed) {
8659
+ effect.flags |= 128;
8660
+ job.flags |= 2;
8661
+ } else {
8662
+ effect.flags &= -129;
8663
+ job.flags &= -3;
8664
+ }
8462
8665
  }
8463
8666
  }
8464
8667
  function needTransition(parentSuspense, transition) {
@@ -8498,8 +8701,10 @@ function traverseStaticChildren(n1, n2, shallow = false) {
8498
8701
  }
8499
8702
  function locateNonHydratedAsyncRoot(instance) {
8500
8703
  const subComponent = instance.subTree && instance.subTree.component;
8501
- if (subComponent) if (subComponent.asyncDep && !subComponent.asyncResolved) return subComponent;
8502
- else return locateNonHydratedAsyncRoot(subComponent);
8704
+ if (subComponent) {
8705
+ if (subComponent.asyncDep && !subComponent.asyncResolved) return subComponent;
8706
+ else return locateNonHydratedAsyncRoot(subComponent);
8707
+ }
8503
8708
  }
8504
8709
  function invalidateMount(hooks) {
8505
8710
  if (hooks) for (let i = 0; i < hooks.length; i++) hooks[i].flags |= 4;
@@ -8518,13 +8723,15 @@ function performTransitionEnter(el, transition, insert, parentSuspense, force =
8518
8723
  function performTransitionLeave(el, transition, remove, isElement = true, force = false) {
8519
8724
  const performRemove = () => {
8520
8725
  remove();
8521
- if (transition && !transition.persisted && transition.afterLeave) transition.afterLeave();
8726
+ if (transition && (force || !transition.persisted) && transition.afterLeave) transition.afterLeave();
8522
8727
  };
8523
8728
  if (force || isElement && transition && !transition.persisted) {
8524
8729
  const { leave, delayLeave } = transition;
8525
8730
  const performLeave = () => {
8731
+ const wasLeaving = el._isLeaving || !!el[leaveCbKey];
8526
8732
  if (el._isLeaving && force) el[leaveCbKey](true);
8527
- leave(el, performRemove);
8733
+ if (force && transition.persisted && !wasLeaving) remove();
8734
+ else leave(el, performRemove);
8528
8735
  };
8529
8736
  if (delayLeave) delayLeave(el, performRemove, performLeave);
8530
8737
  else performLeave();
@@ -8543,7 +8750,7 @@ function isVaporComponent(type) {
8543
8750
  /**
8544
8751
  * shared between vdom and vapor
8545
8752
  */
8546
- function getInheritedScopeIds(vnode, parentComponent) {
8753
+ function getInheritedScopeIds(vnode, parentComponent, includeVaporRootIds = true) {
8547
8754
  const inheritedScopeIds = [];
8548
8755
  let currentParent = parentComponent;
8549
8756
  let currentVNode = vnode;
@@ -8559,6 +8766,8 @@ function getInheritedScopeIds(vnode, parentComponent) {
8559
8766
  currentParent = currentParent.parent;
8560
8767
  } else break;
8561
8768
  }
8769
+ const vaporScopeIds = includeVaporRootIds && currentVNode.vaporScopeIds;
8770
+ if (vaporScopeIds) inheritedScopeIds.push(...vaporScopeIds);
8562
8771
  return inheritedScopeIds;
8563
8772
  }
8564
8773
  function resolveAsyncComponentPlaceholder(anchorVnode) {
@@ -8577,7 +8786,7 @@ const Suspense = {
8577
8786
  process(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, rendererInternals) {
8578
8787
  if (n1 == null) mountSuspense(n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, rendererInternals);
8579
8788
  else {
8580
- if (parentSuspense && parentSuspense.deps > 0 && !n1.suspense.isInFallback) {
8789
+ if (parentSuspense && parentSuspense.deps > 0 && !n1.suspense.isInFallback && !parentSuspense.isHydrating) {
8581
8790
  n2.suspense = n1.suspense;
8582
8791
  n2.suspense.vnode = n2;
8583
8792
  n2.el = n1.el;
@@ -8615,10 +8824,12 @@ function patchSuspense(n1, n2, container, anchor, parentComponent, namespace, sl
8615
8824
  if (pendingBranch) {
8616
8825
  suspense.pendingBranch = newBranch;
8617
8826
  if (isSameVNodeType(pendingBranch, newBranch)) {
8618
- patch(pendingBranch, newBranch, suspense.hiddenContainer, null, parentComponent, suspense, namespace, slotScopeIds, optimized);
8827
+ suspense.deps++;
8828
+ patch(pendingBranch, newBranch, isHydrating ? container : suspense.hiddenContainer, null, parentComponent, suspense, namespace, slotScopeIds, optimized);
8829
+ suspense.deps--;
8619
8830
  if (suspense.deps <= 0) suspense.resolve();
8620
8831
  else if (isInFallback) {
8621
- if (!isHydrating) {
8832
+ if (!isHydrating && !suspense.isFallbackMountPending) {
8622
8833
  patch(activeBranch, newFallback, container, anchor, parentComponent, null, namespace, slotScopeIds, optimized);
8623
8834
  setActiveBranch(suspense, newFallback);
8624
8835
  }
@@ -8630,12 +8841,16 @@ function patchSuspense(n1, n2, container, anchor, parentComponent, namespace, sl
8630
8841
  suspense.activeBranch = pendingBranch;
8631
8842
  } else unmount(pendingBranch, parentComponent, suspense);
8632
8843
  suspense.deps = 0;
8844
+ for (let i = 0; i < suspense.effects.length; i++) {
8845
+ const effect = suspense.effects[i];
8846
+ if (effect.flags & 8) queuePostFlushCb(effect);
8847
+ }
8633
8848
  suspense.effects.length = 0;
8634
8849
  suspense.hiddenContainer = createElement("div");
8635
8850
  if (isInFallback) {
8636
8851
  patch(null, newBranch, suspense.hiddenContainer, null, parentComponent, suspense, namespace, slotScopeIds, optimized);
8637
8852
  if (suspense.deps <= 0) suspense.resolve();
8638
- else {
8853
+ else if (!suspense.isFallbackMountPending) {
8639
8854
  patch(activeBranch, newFallback, container, anchor, parentComponent, null, namespace, slotScopeIds, optimized);
8640
8855
  setActiveBranch(suspense, newFallback);
8641
8856
  }
@@ -8737,7 +8952,7 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
8737
8952
  let hasUnresolvedAncestor = false;
8738
8953
  while (parent) {
8739
8954
  if (parent.pendingBranch) {
8740
- parent.effects.push(...effects);
8955
+ for (let i = 0; i < effects.length; i++) parent.effects.push(effects[i]);
8741
8956
  hasUnresolvedAncestor = true;
8742
8957
  break;
8743
8958
  }
@@ -8747,6 +8962,7 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
8747
8962
  suspense.effects = [];
8748
8963
  if (isSuspensible) {
8749
8964
  if (parentSuspense && parentSuspense.pendingBranch && parentSuspenseId === parentSuspense.pendingId) {
8965
+ parentSuspenseId = void 0;
8750
8966
  parentSuspense.deps--;
8751
8967
  if (parentSuspense.deps === 0 && !sync) parentSuspense.resolve();
8752
8968
  }
@@ -8761,8 +8977,9 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
8761
8977
  const mountFallback = () => {
8762
8978
  suspense.isFallbackMountPending = false;
8763
8979
  if (!suspense.isInFallback) return;
8764
- patch(null, fallbackVNode, container, anchor, parentComponent, null, namespace, slotScopeIds, optimized);
8765
- setActiveBranch(suspense, fallbackVNode);
8980
+ const latestFallback = suspense.vnode.ssFallback;
8981
+ patch(null, latestFallback, container, anchor, parentComponent, null, namespace, slotScopeIds, optimized);
8982
+ setActiveBranch(suspense, latestFallback);
8766
8983
  };
8767
8984
  const delayEnter = fallbackVNode.transition && fallbackVNode.transition.mode === "out-in";
8768
8985
  if (delayEnter) {
@@ -8783,11 +9000,16 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
8783
9000
  registerDep(instance, onResolve) {
8784
9001
  const isInPendingSuspense = !!suspense.pendingBranch;
8785
9002
  if (isInPendingSuspense) suspense.deps++;
9003
+ const hydratedEl = instance.vnode && instance.vnode.el;
8786
9004
  instance.asyncDep.catch((err) => {
8787
9005
  handleError(err, instance, 0);
8788
9006
  }).then((asyncSetupResult) => {
8789
9007
  if (instance.isUnmounted || suspense.isUnmounted || suspense.pendingId !== instance.suspenseId) return;
8790
9008
  setCurrentInstance(null, void 0);
9009
+ if (hydratedEl && !instance.scope.active) {
9010
+ if (isInPendingSuspense && --suspense.deps === 0) suspense.resolve();
9011
+ return;
9012
+ }
8791
9013
  instance.asyncResolved = true;
8792
9014
  onResolve(asyncSetupResult);
8793
9015
  if (isInPendingSuspense && --suspense.deps === 0) suspense.resolve();
@@ -8838,9 +9060,10 @@ function normalizeSuspenseSlot(s) {
8838
9060
  return s;
8839
9061
  }
8840
9062
  function queueEffectWithSuspense(fn, id, suspense) {
8841
- if (suspense && suspense.pendingBranch) if (isArray(fn)) suspense.effects.push(...fn);
8842
- else suspense.effects.push(fn);
8843
- else queuePostFlushCb(fn, id);
9063
+ if (suspense && suspense.pendingBranch) {
9064
+ if (isArray(fn)) suspense.effects.push(...fn);
9065
+ else suspense.effects.push(fn);
9066
+ } else queuePostFlushCb(fn, id);
8844
9067
  }
8845
9068
  function setActiveBranch(suspense, branch) {
8846
9069
  suspense.activeBranch = branch;
@@ -9047,11 +9270,26 @@ function createBaseVNode(type, props = null, children = null, patchFlag = 0, dyn
9047
9270
  if (shapeFlag & 128) type.normalize(vnode);
9048
9271
  } else if (children) vnode.shapeFlag |= isString(children) ? 8 : 16;
9049
9272
  if (vnode.key !== vnode.key) warn$1(`VNode created with invalid key (NaN). VNode type:`, vnode.type);
9273
+ if (props && vnode.shapeFlag & 1) {
9274
+ const overwritingProp = props.innerHTML != null ? "innerHTML" : props.textContent != null ? "textContent" : null;
9275
+ 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.`);
9276
+ }
9050
9277
  if (isBlockTreeEnabled > 0 && !isBlockNode && currentBlock && (vnode.patchFlag > 0 || shapeFlag & 6) && vnode.patchFlag !== 32) currentBlock.push(vnode);
9051
9278
  convertLegacyVModelProps(vnode);
9052
9279
  defineLegacyVNodeProperties(vnode);
9053
9280
  return vnode;
9054
9281
  }
9282
+ /**
9283
+ * dev only
9284
+ * Whether children would actually render something. Empty text and empty
9285
+ * arrays are ignored, mirroring the compiler's `node.children.length` check
9286
+ * for `v-html` / `v-text`.
9287
+ */
9288
+ function hasContentChildren(children) {
9289
+ if (isString(children)) return children !== "";
9290
+ if (isArray(children)) return children.length > 0;
9291
+ return false;
9292
+ }
9055
9293
  const createVNode = createVNodeWithArgsTransform;
9056
9294
  function _createVNode(type, props = null, children = null, patchFlag = 0, dynamicProps = null, isBlockNode = false) {
9057
9295
  if (!type || type === NULL_DYNAMIC_COMPONENT) {
@@ -9061,8 +9299,10 @@ function _createVNode(type, props = null, children = null, patchFlag = 0, dynami
9061
9299
  if (isVNode(type)) {
9062
9300
  const cloned = cloneVNode(type, props, true);
9063
9301
  if (children) normalizeChildren(cloned, children);
9064
- if (isBlockTreeEnabled > 0 && !isBlockNode && currentBlock) if (cloned.shapeFlag & 6) currentBlock[currentBlock.indexOf(type)] = cloned;
9065
- else currentBlock.push(cloned);
9302
+ if (isBlockTreeEnabled > 0 && !isBlockNode && currentBlock) {
9303
+ if (cloned.shapeFlag & 6) currentBlock[currentBlock.indexOf(type)] = cloned;
9304
+ else currentBlock.push(cloned);
9305
+ }
9066
9306
  cloned.patchFlag = -2;
9067
9307
  return cloned;
9068
9308
  }
@@ -9123,7 +9363,10 @@ function cloneVNode(vnode, extraProps, mergeRef = false, cloneTransition = false
9123
9363
  ce: vnode.ce,
9124
9364
  vi: vnode.vi,
9125
9365
  vs: cloneVaporSlotMeta(vnode),
9126
- vb: vnode.vb
9366
+ vb: vnode.vb,
9367
+ ibu: vnode.ibu,
9368
+ iu: vnode.iu,
9369
+ cacheIndex: vnode.cacheIndex
9127
9370
  };
9128
9371
  if (transition && cloneTransition) setTransitionHooks(cloned, transition.clone(cloned));
9129
9372
  defineLegacyVNodeProperties(cloned);
@@ -9134,8 +9377,7 @@ function cloneVaporSlotMeta(vnode) {
9134
9377
  if (!vaporSlot) return vaporSlot;
9135
9378
  const cloned = {
9136
9379
  slot: vaporSlot.slot,
9137
- fallback: vaporSlot.fallback,
9138
- outletFallback: vaporSlot.outletFallback
9380
+ outlets: vaporSlot.outlets
9139
9381
  };
9140
9382
  if (vnode.el) {
9141
9383
  cloned.state = vaporSlot.state;
@@ -9187,25 +9429,28 @@ function normalizeChildren(vnode, children) {
9187
9429
  const { shapeFlag } = vnode;
9188
9430
  if (children == null) children = null;
9189
9431
  else if (isArray(children)) type = 16;
9190
- else if (typeof children === "object") if (shapeFlag & 65) {
9191
- const slot = children.default;
9192
- if (slot) {
9193
- slot._c && (slot._d = false);
9194
- normalizeChildren(vnode, slot());
9195
- slot._c && (slot._d = true);
9196
- }
9197
- return;
9198
- } else {
9199
- type = 32;
9200
- const slotFlag = children._;
9201
- if (!slotFlag && !isInternalObject(children)) children._ctx = currentRenderingInstance;
9202
- else if (slotFlag === 3 && currentRenderingInstance) if (currentRenderingInstance.slots._ === 1) children._ = 1;
9203
- else {
9204
- children._ = 2;
9205
- vnode.patchFlag |= 1024;
9432
+ else if (typeof children === "object") {
9433
+ if (shapeFlag & 65) {
9434
+ const slot = children.default;
9435
+ if (slot) {
9436
+ slot._c && (slot._d = false);
9437
+ normalizeChildren(vnode, slot());
9438
+ slot._c && (slot._d = true);
9439
+ }
9440
+ return;
9441
+ } else {
9442
+ type = 32;
9443
+ const slotFlag = children._;
9444
+ if (!slotFlag && !isInternalObject(children)) children._ctx = currentRenderingInstance;
9445
+ else if (slotFlag === 3 && currentRenderingInstance) {
9446
+ if (currentRenderingInstance.slots._ === 1) children._ = 1;
9447
+ else {
9448
+ children._ = 2;
9449
+ vnode.patchFlag |= 1024;
9450
+ }
9451
+ }
9206
9452
  }
9207
- }
9208
- else if (isFunction(children)) {
9453
+ } else if (isFunction(children)) {
9209
9454
  if (shapeFlag & 65) {
9210
9455
  normalizeChildren(vnode, { default: children });
9211
9456
  return;
@@ -9273,6 +9518,16 @@ const setCurrentInstance = (instance, scope = instance !== null ? instance.scope
9273
9518
  simpleSetCurrentInstance(instance);
9274
9519
  }
9275
9520
  };
9521
+ /**
9522
+ * Restores a snapshot returned by {@link setCurrentInstance}. Unlike calling
9523
+ * `setCurrentInstance(...prev)`, an `undefined` saved scope is restored
9524
+ * verbatim instead of re-triggering the `instance.scope` default.
9525
+ * @internal
9526
+ */
9527
+ const restoreCurrentInstance = (prev) => {
9528
+ setCurrentScope(prev[1]);
9529
+ simpleSetCurrentInstance(prev[0]);
9530
+ };
9276
9531
  const internalOptions = [
9277
9532
  "ce",
9278
9533
  "type",
@@ -9304,7 +9559,7 @@ const useInstanceOption = (key, silent = false) => {
9304
9559
  };
9305
9560
  //#endregion
9306
9561
  //#region packages/runtime-core/src/component.ts
9307
- const emptyAppContext = /* @__PURE__ */ createAppContext();
9562
+ const emptyAppContext = /*@__PURE__*/ createAppContext();
9308
9563
  let uid = 0;
9309
9564
  function createComponentInstance(vnode, parent, suspense) {
9310
9565
  const type = vnode.type;
@@ -9424,7 +9679,7 @@ function setupStatefulComponent(instance, isSSR) {
9424
9679
  const setupResult = callWithErrorHandling(setup, instance, 0, [/* @__PURE__ */ shallowReadonly(instance.props), setupContext]);
9425
9680
  const isAsyncSetup = isPromise(setupResult);
9426
9681
  setActiveSub(prevSub);
9427
- setCurrentInstance(...prev);
9682
+ restoreCurrentInstance(prev);
9428
9683
  if ((isAsyncSetup || instance.sp) && !isAsyncWrapper(instance)) markAsyncBoundary(instance);
9429
9684
  if (isAsyncSetup) {
9430
9685
  const unsetCurrentInstance = () => {
@@ -9432,7 +9687,12 @@ function setupStatefulComponent(instance, isSSR) {
9432
9687
  };
9433
9688
  setupResult.then(unsetCurrentInstance, unsetCurrentInstance);
9434
9689
  if (isSSR) return setupResult.then((resolvedResult) => {
9435
- handleSetupResult(instance, resolvedResult, isSSR);
9690
+ setInSSRSetupState(true);
9691
+ try {
9692
+ handleSetupResult(instance, resolvedResult, isSSR);
9693
+ } finally {
9694
+ setInSSRSetupState(false);
9695
+ }
9436
9696
  }).catch((e) => {
9437
9697
  handleError(e, instance, 0);
9438
9698
  });
@@ -9497,13 +9757,15 @@ function finishComponentSetup(instance, isSSR, skipOptions) {
9497
9757
  applyOptions(instance);
9498
9758
  } finally {
9499
9759
  setActiveSub(prevSub);
9500
- setCurrentInstance(...prevInstance);
9760
+ restoreCurrentInstance(prevInstance);
9501
9761
  }
9502
9762
  }
9503
- if (!Component.render && instance.render === NOOP && !isSSR) if (!compile$1 && Component.template)
9763
+ if (!Component.render && instance.render === NOOP && !isSSR) {
9764
+ if (!compile$1 && Component.template)
9504
9765
  /* v8 ignore start */
9505
- warn$1("Component provided template option but runtime compilation is not supported in this build of Vue. Use \"vue.esm-browser.js\" instead.");
9506
- else warn$1(`Component is missing template or render function: `, Component);
9766
+ warn$1("Component provided template option but runtime compilation is not supported in this build of Vue. Use \"vue.esm-browser.js\" instead.");
9767
+ else warn$1(`Component is missing template or render function: `, Component);
9768
+ }
9507
9769
  }
9508
9770
  const attrsProxyHandlers = {
9509
9771
  get(target, key) {
@@ -9566,14 +9828,13 @@ function getComponentPublicInstance(instance) {
9566
9828
  if (instance.exposed) return instance.exposeProxy || (instance.exposeProxy = new Proxy(proxyRefs(markRaw(instance.exposed)), {
9567
9829
  get(target, key) {
9568
9830
  if (key in target) return target[key];
9569
- else {
9831
+ else if (!instance.vapor) {
9570
9832
  const publicPropertiesMap = getPublicPropertiesMap();
9571
9833
  if (key in publicPropertiesMap) return publicPropertiesMap[key](instance);
9572
9834
  }
9573
9835
  },
9574
9836
  has(target, key) {
9575
- const publicPropertiesMap = getPublicPropertiesMap();
9576
- return key in target || key in publicPropertiesMap;
9837
+ return key in target || !instance.vapor && key in getPublicPropertiesMap();
9577
9838
  }
9578
9839
  }));
9579
9840
  else return instance.proxy;
@@ -9611,11 +9872,12 @@ function h(type, propsOrChildren, children) {
9611
9872
  try {
9612
9873
  setBlockTracking(-1);
9613
9874
  const l = arguments.length;
9614
- if (l === 2) if (isObject(propsOrChildren) && !isArray(propsOrChildren)) {
9615
- if (isVNode(propsOrChildren)) return createVNode(type, null, [propsOrChildren]);
9616
- return createVNode(type, propsOrChildren);
9617
- } else return createVNode(type, null, propsOrChildren);
9618
- else {
9875
+ if (l === 2) {
9876
+ if (isObject(propsOrChildren) && !isArray(propsOrChildren)) {
9877
+ if (isVNode(propsOrChildren)) return createVNode(type, null, [propsOrChildren]);
9878
+ return createVNode(type, propsOrChildren);
9879
+ } else return createVNode(type, null, propsOrChildren);
9880
+ } else {
9619
9881
  if (l > 3) children = Array.prototype.slice.call(arguments, 2);
9620
9882
  else if (l === 3 && isVNode(children)) children = [children];
9621
9883
  return createVNode(type, propsOrChildren, children);
@@ -9807,7 +10069,7 @@ function isMemoSame(cached, memo) {
9807
10069
  }
9808
10070
  //#endregion
9809
10071
  //#region packages/runtime-core/src/index.ts
9810
- const version = "3.6.0-rc.1";
10072
+ const version = "3.6.0-rc.10";
9811
10073
  const warn = warn$1;
9812
10074
  /**
9813
10075
  * Runtime error messages. Only exposed in dev or esm builds.
@@ -9841,7 +10103,7 @@ const DeprecationTypes = DeprecationTypes$1;
9841
10103
  let policy = void 0;
9842
10104
  const tt = typeof window !== "undefined" && window.trustedTypes;
9843
10105
  if (tt) try {
9844
- policy = /* @__PURE__ */ tt.createPolicy("vue", { createHTML: (val) => val });
10106
+ policy = /*@__PURE__*/ tt.createPolicy("vue", { createHTML: (val) => val });
9845
10107
  } catch (e) {
9846
10108
  warn(`Error creating trusted types policy: ${e}`);
9847
10109
  }
@@ -9849,7 +10111,7 @@ const unsafeToTrustedHTML = policy ? (val) => policy.createHTML(val) : (val) =>
9849
10111
  const svgNS = "http://www.w3.org/2000/svg";
9850
10112
  const mathmlNS = "http://www.w3.org/1998/Math/MathML";
9851
10113
  const doc = typeof document !== "undefined" ? document : null;
9852
- const templateContainer = doc && /* @__PURE__ */ doc.createElement("template");
10114
+ const templateContainer = doc && /*@__PURE__*/ doc.createElement("template");
9853
10115
  const nodeOps = {
9854
10116
  insert: (child, parent, anchor) => {
9855
10117
  parent.insertBefore(child, anchor || null);
@@ -9923,7 +10185,7 @@ const DOMTransitionPropsValidators = {
9923
10185
  leaveActiveClass: String,
9924
10186
  leaveToClass: String
9925
10187
  };
9926
- const TransitionPropsValidators = /* @__PURE__ */ extend({}, BaseTransitionPropsValidators, DOMTransitionPropsValidators);
10188
+ const TransitionPropsValidators = /*@__PURE__*/ extend({}, BaseTransitionPropsValidators, DOMTransitionPropsValidators);
9927
10189
  /**
9928
10190
  * Wrap logic that attaches extra properties to Transition in a function
9929
10191
  * so that it can be annotated as pure
@@ -9938,7 +10200,7 @@ const decorate$1 = (t) => {
9938
10200
  * DOM Transition is a higher-order-component based on the platform-agnostic
9939
10201
  * base Transition component, with DOM-specific logic.
9940
10202
  */
9941
- const Transition = /* @__PURE__ */ decorate$1((props, { slots }) => h(BaseTransition, resolveTransitionProps(props), slots));
10203
+ const Transition = /*@__PURE__*/ decorate$1((props, { slots }) => h(BaseTransition, resolveTransitionProps(props), slots));
9942
10204
  /**
9943
10205
  * #3227 Incoming hooks may be merged into arrays when wrapping Transition
9944
10206
  * with custom HOCs.
@@ -10178,14 +10440,15 @@ const vShow = {
10178
10440
  },
10179
10441
  updated(el, { value, oldValue }, { transition }) {
10180
10442
  if (!value === !oldValue) return;
10181
- if (transition) if (value) {
10182
- transition.beforeEnter(el);
10183
- setDisplay(el, true);
10184
- transition.enter(el);
10185
- } else transition.leave(el, () => {
10186
- setDisplay(el, false);
10187
- });
10188
- else setDisplay(el, value);
10443
+ if (transition) {
10444
+ if (value) {
10445
+ transition.beforeEnter(el);
10446
+ setDisplay(el, true);
10447
+ transition.enter(el);
10448
+ } else transition.leave(el, () => {
10449
+ setDisplay(el, false);
10450
+ });
10451
+ } else setDisplay(el, value);
10189
10452
  },
10190
10453
  beforeUnmount(el, { value }) {
10191
10454
  setDisplay(el, value);
@@ -10204,49 +10467,20 @@ const CSS_VAR_TEXT = Symbol("CSS_VAR_TEXT");
10204
10467
  */
10205
10468
  function useCssVars(getter) {
10206
10469
  const instance = getCurrentInstance();
10207
- const getVars = () => getter(instance.proxy);
10208
- const setVars = (vars) => {
10209
- if (instance.ce) setVarsOnNode(instance.ce, vars);
10210
- else setVarsOnVNode(instance.subTree, vars);
10211
- };
10212
- baseUseCssVars(instance, () => instance.subTree.el.parentNode, getVars, setVars);
10213
- }
10214
- function setVarsOnVNode(vnode, vars) {
10215
- if (vnode.shapeFlag & 128) {
10216
- const suspense = vnode.suspense;
10217
- vnode = suspense.activeBranch;
10218
- if (suspense.pendingBranch && !suspense.isHydrating) suspense.effects.push(() => {
10219
- setVarsOnVNode(suspense.activeBranch, vars);
10220
- });
10221
- }
10222
- while (vnode.component) vnode = vnode.component.subTree;
10223
- if (vnode.shapeFlag & 1 && vnode.el) setVarsOnNode(vnode.el, vars);
10224
- else if (vnode.type === Fragment) vnode.children.forEach((c) => setVarsOnVNode(c, vars));
10225
- else if (vnode.type === Static) {
10226
- let { el, anchor } = vnode;
10227
- while (el) {
10228
- setVarsOnNode(el, vars);
10229
- if (el === anchor) break;
10230
- el = el.nextSibling;
10231
- }
10232
- }
10233
- }
10234
- /**
10235
- * @internal
10236
- * shared between vdom and vapor
10237
- */
10238
- function baseUseCssVars(instance, getParentNode, getVars, setVars) {
10239
10470
  /* v8 ignore start */
10240
10471
  if (!instance) {
10241
10472
  warn(`useCssVars is called without current active component instance.`);
10242
10473
  return;
10243
10474
  }
10475
+ /* v8 ignore stop */
10476
+ const getVars = () => getter(instance.proxy);
10244
10477
  instance.getCssVars = getVars;
10245
10478
  const updateTeleports = instance.ut = (vars = getVars()) => {
10246
10479
  Array.from(document.querySelectorAll(`[data-v-owner="${instance.uid}"]`)).forEach((node) => setVarsOnNode(node, vars));
10247
10480
  };
10248
10481
  const applyCssVars = (vars = getVars()) => {
10249
- setVars(vars);
10482
+ if (instance.ce) setVarsOnNode(instance.ce, vars);
10483
+ else setVarsOnVNode(instance.subTree, vars);
10250
10484
  updateTeleports(vars);
10251
10485
  };
10252
10486
  onBeforeUpdate(() => {
@@ -10259,10 +10493,38 @@ function baseUseCssVars(instance, getParentNode, getVars, setVars) {
10259
10493
  applyCssVars(vars);
10260
10494
  }, NOOP, { flush: "post" });
10261
10495
  const ob = new MutationObserver(() => applyCssVars());
10262
- ob.observe(getParentNode(), { childList: true });
10496
+ ob.observe(instance.subTree.el.parentNode, { childList: true });
10263
10497
  onUnmounted(() => ob.disconnect());
10264
10498
  });
10265
10499
  }
10500
+ function setVarsOnVNode(vnode, vars) {
10501
+ if (vnode.shapeFlag & 128) {
10502
+ const suspense = vnode.suspense;
10503
+ vnode = suspense.activeBranch;
10504
+ if (suspense.pendingBranch && !suspense.isHydrating) suspense.effects.push(() => {
10505
+ setVarsOnVNode(suspense.activeBranch, vars);
10506
+ });
10507
+ }
10508
+ while (vnode.component) {
10509
+ const component = vnode.component;
10510
+ if (component.vapor) {
10511
+ component.appContext.vapor.applyCssVars(vnode, vars);
10512
+ return;
10513
+ }
10514
+ vnode = vnode.component.subTree;
10515
+ }
10516
+ if (vnode.shapeFlag & 1 && vnode.el) setVarsOnNode(vnode.el, vars);
10517
+ else if (vnode.vb) vnode.ctx.appContext.vapor.applyCssVars(vnode, vars);
10518
+ else if (vnode.type === Fragment) vnode.children.forEach((c) => setVarsOnVNode(c, vars));
10519
+ else if (vnode.type === Static) {
10520
+ let { el, anchor } = vnode;
10521
+ while (el) {
10522
+ setVarsOnNode(el, vars);
10523
+ if (el === anchor) break;
10524
+ el = el.nextSibling;
10525
+ }
10526
+ }
10527
+ }
10266
10528
  /**
10267
10529
  * @internal
10268
10530
  * shared between vdom and vapor
@@ -10287,11 +10549,13 @@ function patchStyle(el, prev, next) {
10287
10549
  const isCssString = isString(next);
10288
10550
  let hasControlledDisplay = false;
10289
10551
  if (next && !isCssString) {
10290
- if (prev) if (!isString(prev)) {
10291
- for (const key in prev) if (next[key] == null) setStyle(style, key, "");
10292
- } else for (const prevStyle of prev.split(";")) {
10293
- const key = prevStyle.slice(0, prevStyle.indexOf(":")).trim();
10294
- if (next[key] == null) setStyle(style, key, "");
10552
+ if (prev) {
10553
+ if (!isString(prev)) {
10554
+ for (const key in prev) if (next[key] == null) setStyle(style, key, "");
10555
+ } else for (const prevStyle of prev.split(";")) {
10556
+ const key = prevStyle.slice(0, prevStyle.indexOf(":")).trim();
10557
+ if (next[key] == null) setStyle(style, key, "");
10558
+ }
10295
10559
  }
10296
10560
  for (const key in next) {
10297
10561
  if (key === "display") hasControlledDisplay = true;
@@ -10307,7 +10571,11 @@ function patchStyle(el, prev, next) {
10307
10571
  style.cssText = next;
10308
10572
  hasControlledDisplay = displayRE.test(next);
10309
10573
  }
10310
- } else if (prev) el.removeAttribute("style");
10574
+ } else if (prev) {
10575
+ const cssVarText = style[CSS_VAR_TEXT];
10576
+ if (cssVarText) style.cssText = cssVarText;
10577
+ else el.removeAttribute("style");
10578
+ }
10311
10579
  if (vShowOriginalDisplay in el) {
10312
10580
  el[vShowOriginalDisplay] = hasControlledDisplay ? style.display : "";
10313
10581
  if (el[vShowHidden]) style.display = "none";
@@ -10320,8 +10588,10 @@ function setStyle(style, name, rawVal) {
10320
10588
  else {
10321
10589
  const val = rawVal == null ? "" : String(rawVal);
10322
10590
  if (semicolonRE.test(val)) warn(`Unexpected semicolon at the end of '${name}' style value: '${val}'`);
10323
- if (name.startsWith("--")) style.setProperty(name, val);
10324
- else {
10591
+ if (name.startsWith("--")) {
10592
+ if (importantRE.test(val)) style.setProperty(name, val.replace(importantRE, ""), "important");
10593
+ else style.setProperty(name, val);
10594
+ } else {
10325
10595
  const prefixed = autoPrefix(style, name);
10326
10596
  if (importantRE.test(val)) style.setProperty(hyphenate(prefixed), val.replace(importantRE, ""), "important");
10327
10597
  else style[prefixed] = val;
@@ -10358,15 +10628,16 @@ function shouldPreserveTextareaResizeStyle(el, key, prev, next) {
10358
10628
  //#region packages/runtime-dom/src/modules/attrs.ts
10359
10629
  const xlinkNS = "http://www.w3.org/1999/xlink";
10360
10630
  function patchAttr(el, key, value, isSVG, instance, isBoolean = isSpecialBooleanAttr(key)) {
10361
- if (isSVG && key.startsWith("xlink:")) if (value == null) el.removeAttributeNS(xlinkNS, key.slice(6, key.length));
10362
- else el.setAttributeNS(xlinkNS, key, value);
10363
- else {
10631
+ if (isSVG && key.startsWith("xlink:")) {
10632
+ if (value == null) el.removeAttributeNS(xlinkNS, key.slice(6, key.length));
10633
+ else el.setAttributeNS(xlinkNS, key, value);
10634
+ } else {
10364
10635
  if (compatCoerceAttr(el, key, value, instance)) return;
10365
10636
  if (value == null || isBoolean && !includeBooleanAttr(value)) el.removeAttribute(key);
10366
10637
  else el.setAttribute(key, isBoolean ? "" : isSymbol(value) ? String(value) : value);
10367
10638
  }
10368
10639
  }
10369
- const isEnumeratedAttr = /* @__PURE__ */ makeMap("contenteditable,draggable,spellcheck");
10640
+ const isEnumeratedAttr = /*@__PURE__*/ makeMap("contenteditable,draggable,spellcheck");
10370
10641
  function compatCoerceAttr(el, key, value, instance = null) {
10371
10642
  if (isEnumeratedAttr(key)) {
10372
10643
  const v2CoercedValue = value === void 0 ? null : value === null || value === false || value === "false" ? "false" : "true";
@@ -10458,7 +10729,7 @@ function parseEventName(name) {
10458
10729
  return [name[2] === ":" ? name.slice(3) : hyphenate(name.slice(2)), options];
10459
10730
  }
10460
10731
  let cachedNow = 0;
10461
- const p = /* @__PURE__ */ Promise.resolve();
10732
+ const p = /*@__PURE__*/ Promise.resolve();
10462
10733
  const getNow = () => cachedNow || (p.then(() => cachedNow = 0), cachedNow = Date.now());
10463
10734
  function createInvoker(initialValue, instance) {
10464
10735
  const invoker = (e) => {
@@ -10526,7 +10797,7 @@ function shouldSetAsPropForVueCE(el, key) {
10526
10797
  //#endregion
10527
10798
  //#region packages/runtime-dom/src/apiCustomElement.ts
10528
10799
  const REMOVAL = {};
10529
- /* @__NO_SIDE_EFFECTS__ */
10800
+ /*@__NO_SIDE_EFFECTS__*/
10530
10801
  function defineCustomElement(options, extraOptions, _createApp) {
10531
10802
  let Comp = /* @__PURE__ */ defineComponent(options, extraOptions);
10532
10803
  if (isPlainObject(Comp)) Comp = extend({}, Comp, extraOptions);
@@ -10575,12 +10846,14 @@ var VueElementBase = class VueElementBase extends BaseClass {
10575
10846
  this._parent = parent;
10576
10847
  break;
10577
10848
  }
10578
- if (!this._instance) if (this._resolved) this._mountComponent(this._def);
10579
- else if (parent && parent._pendingResolve) this._pendingResolve = parent._pendingResolve.then(() => {
10580
- this._pendingResolve = void 0;
10581
- this._resolveDef();
10582
- });
10583
- else this._resolveDef();
10849
+ if (!this._instance) {
10850
+ if (this._resolved) this._mountComponent(this._def);
10851
+ else if (parent && parent._pendingResolve) this._pendingResolve = parent._pendingResolve.then(() => {
10852
+ this._pendingResolve = void 0;
10853
+ if (this.isConnected) return this._resolveDef();
10854
+ });
10855
+ else this._resolveDef();
10856
+ }
10584
10857
  }
10585
10858
  disconnectedCallback() {
10586
10859
  this._connected = false;
@@ -10614,7 +10887,7 @@ var VueElementBase = class VueElementBase extends BaseClass {
10614
10887
  * resolve inner component definition (handle possible async component)
10615
10888
  */
10616
10889
  _resolveDef() {
10617
- if (this._pendingResolve) return;
10890
+ if (this._pendingResolve) return this._pendingResolve;
10618
10891
  for (let i = 0; i < this.attributes.length; i++) this._setAttr(this.attributes[i].name);
10619
10892
  this._ob = new MutationObserver(this._processMutations.bind(this));
10620
10893
  this._ob.observe(this, { attributes: true });
@@ -10644,6 +10917,7 @@ var VueElementBase = class VueElementBase extends BaseClass {
10644
10917
  this._def = def;
10645
10918
  resolve(def);
10646
10919
  });
10920
+ return this._pendingResolve;
10647
10921
  } else resolve(this._def);
10648
10922
  }
10649
10923
  _mountComponent(def) {
@@ -10682,14 +10956,17 @@ var VueElementBase = class VueElementBase extends BaseClass {
10682
10956
  const { props } = def;
10683
10957
  const declaredPropKeys = isArray(props) ? props : Object.keys(props || {});
10684
10958
  for (const key of Object.keys(this)) if (key[0] !== "_" && declaredPropKeys.includes(key)) this._setProp(key, this[key]);
10685
- for (const key of declaredPropKeys.map(camelize)) Object.defineProperty(this, key, {
10686
- get() {
10687
- return this._getProp(key);
10688
- },
10689
- set(val) {
10690
- this._setProp(key, val, true, !this._patching);
10691
- }
10692
- });
10959
+ for (const key of declaredPropKeys.map(camelize)) {
10960
+ if (key in Object.getPrototypeOf(this)) warn(`Custom element prop "${key}" conflicts with an existing property on the element and will overwrite it.`);
10961
+ Object.defineProperty(this, key, {
10962
+ get() {
10963
+ return this._getProp(key);
10964
+ },
10965
+ set(val) {
10966
+ this._setProp(key, val, true, !this._patching);
10967
+ }
10968
+ });
10969
+ }
10693
10970
  }
10694
10971
  _setAttr(key) {
10695
10972
  if (key.startsWith("data-v-")) return;
@@ -10792,13 +11069,11 @@ var VueElementBase = class VueElementBase extends BaseClass {
10792
11069
  _renderSlots() {
10793
11070
  const outlets = this._getSlots();
10794
11071
  const scopeId = this._instance.type.__scopeId;
10795
- const slotReplacements = /* @__PURE__ */ new Map();
10796
11072
  for (let i = 0; i < outlets.length; i++) {
10797
11073
  const o = outlets[i];
10798
11074
  const slotName = o.getAttribute("name") || "default";
10799
11075
  const content = this._slots[slotName];
10800
11076
  const parent = o.parentNode;
10801
- const replacementNodes = [];
10802
11077
  if (content) for (const n of content) {
10803
11078
  if (scopeId && n.nodeType === 1) {
10804
11079
  const id = scopeId + "-s";
@@ -10808,20 +11083,10 @@ var VueElementBase = class VueElementBase extends BaseClass {
10808
11083
  while (child = walker.nextNode()) child.setAttribute(id, "");
10809
11084
  }
10810
11085
  parent.insertBefore(n, o);
10811
- replacementNodes.push(n);
10812
- }
10813
- else while (o.firstChild) {
10814
- const child = o.firstChild;
10815
- parent.insertBefore(child, o);
10816
- replacementNodes.push(child);
10817
11086
  }
11087
+ else while (o.firstChild) parent.insertBefore(o.firstChild, o);
10818
11088
  parent.removeChild(o);
10819
- slotReplacements.set(o, {
10820
- nodes: replacementNodes,
10821
- usedFallback: !content
10822
- });
10823
11089
  }
10824
- this._updateSlotNodes(slotReplacements);
10825
11090
  }
10826
11091
  /**
10827
11092
  * @internal
@@ -10860,7 +11125,7 @@ var VueElementBase = class VueElementBase extends BaseClass {
10860
11125
  * @internal
10861
11126
  */
10862
11127
  _hasShadowRoot() {
10863
- return this._def.shadowRoot !== false;
11128
+ return this._root !== this;
10864
11129
  }
10865
11130
  /**
10866
11131
  * @internal
@@ -10905,10 +11170,6 @@ var VueElement = class extends VueElementBase {
10905
11170
  if (this._instance && this._instance.ce) this._instance.ce = void 0;
10906
11171
  this._app = this._instance = null;
10907
11172
  }
10908
- /**
10909
- * Only called when shadowRoot is false
10910
- */
10911
- _updateSlotNodes(replacements) {}
10912
11173
  _createVNode() {
10913
11174
  const baseProps = {};
10914
11175
  if (!this.shadowRoot) baseProps.onVnodeMounted = baseProps.onVnodeUpdated = this._renderSlots.bind(this);
@@ -10975,7 +11236,7 @@ const decorate = (t) => {
10975
11236
  };
10976
11237
  const TransitionGroup = /* @__PURE__ */ decorate({
10977
11238
  name: "TransitionGroup",
10978
- props: /* @__PURE__ */ extend({}, TransitionPropsValidators, {
11239
+ props: /*@__PURE__*/ extend({}, TransitionPropsValidators, {
10979
11240
  tag: String,
10980
11241
  moveClass: String
10981
11242
  }),
@@ -11107,13 +11368,22 @@ function onCompositionEnd(e) {
11107
11368
  }
11108
11369
  }
11109
11370
  const assignKey = Symbol("_assign");
11371
+ const initialValueKey = Symbol("_initialValue");
11110
11372
  const vModelText = {
11111
11373
  created(el, { modifiers: { lazy, trim, number } }, vnode) {
11374
+ if (el.parentNode) {
11375
+ if (el.type === "text") el[initialValueKey] = el.defaultValue.replace(/[\r\n]/g, "");
11376
+ else if (el.type === "textarea") el[initialValueKey] = el.defaultValue.replace(/\r\n?/g, "\n");
11377
+ }
11112
11378
  el[assignKey] = getModelAssigner(vnode);
11113
11379
  vModelTextInit(el, trim, number || !!(vnode.props && vnode.props.type === "number"), lazy);
11114
11380
  },
11115
- mounted(el, { value }) {
11116
- el.value = value == null ? "" : value;
11381
+ mounted(el, { value, modifiers: { trim, number } }) {
11382
+ const newValue = value == null ? "" : value;
11383
+ const initialValue = el[initialValueKey];
11384
+ delete el[initialValueKey];
11385
+ if (initialValue !== void 0 && (el.type === "text" || el.type === "textarea") && el.value !== initialValue) el[assignKey](castValue(el.value, trim, number));
11386
+ else el.value = newValue;
11117
11387
  },
11118
11388
  beforeUpdate(el, { value, oldValue, modifiers: { lazy, trim, number } }, vnode) {
11119
11389
  el[assignKey] = getModelAssigner(vnode);
@@ -11248,19 +11518,39 @@ const vModelSelectInit = (el, value, number, set) => {
11248
11518
  el._modelValue = value;
11249
11519
  addEventListener(el, "change", () => {
11250
11520
  const selectedVal = Array.prototype.filter.call(el.options, (o) => o.selected).map((o) => number ? looseToNumber(getValue(o)) : getValue(o));
11251
- (set || el[assignKey])(el.multiple ? isSet(el._modelValue) ? new Set(selectedVal) : selectedVal : selectedVal[0]);
11252
- el._assigning = true;
11253
- nextTick(() => {
11254
- el._assigning = false;
11255
- });
11521
+ const multiple = el.multiple;
11522
+ const assignedValue = multiple ? isSet(el._modelValue) ? new Set(selectedVal) : selectedVal : selectedVal[0];
11523
+ const pending = el._pendingValue = [multiple, multiple ? isArray(assignedValue) ? selectedVal.slice() : selectedVal : assignedValue];
11524
+ try {
11525
+ (set || el[assignKey])(assignedValue);
11526
+ } finally {
11527
+ nextTick(() => {
11528
+ if (el._pendingValue === pending) el._pendingValue = void 0;
11529
+ });
11530
+ }
11256
11531
  });
11257
11532
  };
11533
+ function isSameSelectValue(value, assignedValue, multiple) {
11534
+ if (!multiple) return looseEqual(value, assignedValue);
11535
+ if (isArray(value)) return looseEqual(value, assignedValue);
11536
+ if (isSet(value)) {
11537
+ if (value.size !== assignedValue.length) return false;
11538
+ for (const item of assignedValue) if (!value.has(item)) return false;
11539
+ return true;
11540
+ }
11541
+ return false;
11542
+ }
11258
11543
  /**
11259
11544
  * @internal
11260
11545
  */
11261
11546
  const vModelSetSelected = (el, value) => {
11262
11547
  el._modelValue = value;
11263
- if (el._assigning) return;
11548
+ const pending = el._pendingValue;
11549
+ el._pendingValue = void 0;
11550
+ if (pending && pending[0] === el.multiple && isSameSelectValue(value, pending[1], pending[0])) return;
11551
+ setSelected(el, value);
11552
+ };
11553
+ function setSelected(el, value) {
11264
11554
  const isMultiple = el.multiple;
11265
11555
  const isArrayValue = isArray(value);
11266
11556
  if (isMultiple && !isArrayValue && !isSet(value)) {
@@ -11270,18 +11560,19 @@ const vModelSetSelected = (el, value) => {
11270
11560
  for (let i = 0, l = el.options.length; i < l; i++) {
11271
11561
  const option = el.options[i];
11272
11562
  const optionValue = getValue(option);
11273
- if (isMultiple) if (isArrayValue) {
11274
- const optionType = typeof optionValue;
11275
- if (optionType === "string" || optionType === "number") option.selected = value.some((v) => String(v) === String(optionValue));
11276
- else option.selected = looseIndexOf(value, optionValue) > -1;
11277
- } else option.selected = value.has(optionValue);
11278
- else if (looseEqual(getValue(option), value)) {
11563
+ if (isMultiple) {
11564
+ if (isArrayValue) {
11565
+ const optionType = typeof optionValue;
11566
+ if (optionType === "string" || optionType === "number") option.selected = value.some((v) => String(v) === String(optionValue));
11567
+ else option.selected = looseIndexOf(value, optionValue) > -1;
11568
+ } else option.selected = value.has(optionValue);
11569
+ } else if (looseEqual(getValue(option), value)) {
11279
11570
  if (el.selectedIndex !== i) el.selectedIndex = i;
11280
11571
  return;
11281
11572
  }
11282
11573
  }
11283
11574
  if (!isMultiple && el.selectedIndex !== -1) el.selectedIndex = -1;
11284
- };
11575
+ }
11285
11576
  /**
11286
11577
  * @internal retrieve raw value set via :value bindings
11287
11578
  */
@@ -11577,7 +11868,7 @@ var src_exports = /* @__PURE__ */ __exportAll({
11577
11868
  withModifiers: () => withModifiers,
11578
11869
  withScopeId: () => withScopeId
11579
11870
  });
11580
- const rendererOptions = /* @__PURE__ */ extend({ patchProp }, nodeOps);
11871
+ const rendererOptions = /*@__PURE__*/ extend({ patchProp }, nodeOps);
11581
11872
  let renderer;
11582
11873
  let enabledHydration = false;
11583
11874
  function ensureRenderer() {
@@ -12128,13 +12419,14 @@ var Tokenizer = class {
12128
12419
  }
12129
12420
  }
12130
12421
  stateInterpolationOpen(c) {
12131
- if (c === this.delimiterOpen[this.delimiterIndex]) if (this.delimiterIndex === this.delimiterOpen.length - 1) {
12132
- const start = this.index + 1 - this.delimiterOpen.length;
12133
- if (start > this.sectionStart) this.cbs.ontext(this.sectionStart, start);
12134
- this.state = 3;
12135
- this.sectionStart = start;
12136
- } else this.delimiterIndex++;
12137
- else if (this.inRCDATA) {
12422
+ if (c === this.delimiterOpen[this.delimiterIndex]) {
12423
+ if (this.delimiterIndex === this.delimiterOpen.length - 1) {
12424
+ const start = this.index + 1 - this.delimiterOpen.length;
12425
+ if (start > this.sectionStart) this.cbs.ontext(this.sectionStart, start);
12426
+ this.state = 3;
12427
+ this.sectionStart = start;
12428
+ } else this.delimiterIndex++;
12429
+ } else if (this.inRCDATA) {
12138
12430
  this.state = 32;
12139
12431
  this.stateInRCDATA(c);
12140
12432
  } else {
@@ -12150,13 +12442,14 @@ var Tokenizer = class {
12150
12442
  }
12151
12443
  }
12152
12444
  stateInterpolationClose(c) {
12153
- if (c === this.delimiterClose[this.delimiterIndex]) if (this.delimiterIndex === this.delimiterClose.length - 1) {
12154
- this.cbs.oninterpolation(this.sectionStart, this.index + 1);
12155
- if (this.inRCDATA) this.state = 32;
12156
- else this.state = 1;
12157
- this.sectionStart = this.index + 1;
12158
- } else this.delimiterIndex++;
12159
- else {
12445
+ if (c === this.delimiterClose[this.delimiterIndex]) {
12446
+ if (this.delimiterIndex === this.delimiterClose.length - 1) {
12447
+ this.cbs.oninterpolation(this.sectionStart, this.index + 1);
12448
+ if (this.inRCDATA) this.state = 32;
12449
+ else this.state = 1;
12450
+ this.sectionStart = this.index + 1;
12451
+ } else this.delimiterIndex++;
12452
+ } else {
12160
12453
  this.state = 3;
12161
12454
  this.stateInterpolation(c);
12162
12455
  }
@@ -12271,9 +12564,10 @@ var Tokenizer = class {
12271
12564
  this.sectionStart = this.index;
12272
12565
  if (this.mode === 0) this.state = 6;
12273
12566
  else if (this.inSFCRoot) this.state = 34;
12274
- else if (!this.inXML) if (c === 116) this.state = 30;
12275
- else this.state = c === 115 ? 29 : 6;
12276
- else this.state = 6;
12567
+ else if (!this.inXML) {
12568
+ if (c === 116) this.state = 30;
12569
+ else this.state = c === 115 ? 29 : 6;
12570
+ } else this.state = 6;
12277
12571
  } else if (c === 47) this.state = 8;
12278
12572
  else {
12279
12573
  this.state = 1;
@@ -12626,9 +12920,7 @@ var Tokenizer = class {
12626
12920
  case 24:
12627
12921
  this.stateInProcessingInstruction(c);
12628
12922
  break;
12629
- case 33:
12630
- this.stateInEntity();
12631
- break;
12923
+ case 33: this.stateInEntity();
12632
12924
  }
12633
12925
  this.index++;
12634
12926
  }
@@ -12657,9 +12949,10 @@ var Tokenizer = class {
12657
12949
  handleTrailingData() {
12658
12950
  const endIndex = this.buffer.length;
12659
12951
  if (this.sectionStart >= endIndex) return;
12660
- if (this.state === 28) if (this.currentSequence === Sequences.CdataEnd) this.cbs.oncdata(this.sectionStart, endIndex);
12661
- else this.cbs.oncomment(this.sectionStart, endIndex);
12662
- else if (this.state === 6 || this.state === 11 || this.state === 18 || this.state === 17 || this.state === 12 || this.state === 13 || this.state === 14 || this.state === 15 || this.state === 16 || this.state === 20 || this.state === 19 || this.state === 21 || this.state === 9) {} else this.cbs.ontext(this.sectionStart, endIndex);
12952
+ if (this.state === 28) {
12953
+ if (this.currentSequence === Sequences.CdataEnd) this.cbs.oncdata(this.sectionStart, endIndex);
12954
+ else this.cbs.oncomment(this.sectionStart, endIndex);
12955
+ } else if (this.state === 6 || this.state === 11 || this.state === 18 || this.state === 17 || this.state === 12 || this.state === 13 || this.state === 14 || this.state === 15 || this.state === 16 || this.state === 20 || this.state === 19 || this.state === 21 || this.state === 9) {} else this.cbs.ontext(this.sectionStart, endIndex);
12663
12956
  }
12664
12957
  emitCodePoint(cp, consumed) {}
12665
12958
  };
@@ -12861,12 +13154,10 @@ const isMemberExpressionBrowser = (exp) => {
12861
13154
  if (!--currentOpenParensCount) state = stateStack.pop();
12862
13155
  }
12863
13156
  break;
12864
- case 3:
12865
- if (char === currentStringType) {
12866
- state = stateStack.pop();
12867
- currentStringType = null;
12868
- }
12869
- break;
13157
+ case 3: if (char === currentStringType) {
13158
+ state = stateStack.pop();
13159
+ currentStringType = null;
13160
+ }
12870
13161
  }
12871
13162
  }
12872
13163
  return !currentOpenBracketCount && !currentOpenParensCount;
@@ -12916,7 +13207,7 @@ function isTemplateNode(node) {
12916
13207
  function isSlotOutlet(node) {
12917
13208
  return node.type === 1 && node.tagType === 2;
12918
13209
  }
12919
- const propsHelperSet = new Set([NORMALIZE_PROPS, GUARD_REACTIVE_PROPS]);
13210
+ const propsHelperSet = /* @__PURE__ */ new Set([NORMALIZE_PROPS, GUARD_REACTIVE_PROPS]);
12920
13211
  function getUnnormalizedProps(props, callPath = []) {
12921
13212
  if (props && !isString(props) && props.type === 14) {
12922
13213
  const callee = props.callee;
@@ -12959,9 +13250,10 @@ function injectProp(node, prop, context) {
12959
13250
  propsWithInjection = createCallExpression(context.helper(MERGE_PROPS), [createObjectExpression([prop]), props]);
12960
13251
  if (parentCall && parentCall.callee === GUARD_REACTIVE_PROPS) parentCall = callPath[callPath.length - 2];
12961
13252
  }
12962
- if (node.type === 13) if (parentCall) parentCall.arguments[0] = propsWithInjection;
12963
- else node.props = propsWithInjection;
12964
- else if (parentCall) parentCall.arguments[0] = propsWithInjection;
13253
+ if (node.type === 13) {
13254
+ if (parentCall) parentCall.arguments[0] = propsWithInjection;
13255
+ else node.props = propsWithInjection;
13256
+ } else if (parentCall) parentCall.arguments[0] = propsWithInjection;
12965
13257
  else node.arguments[2] = propsWithInjection;
12966
13258
  }
12967
13259
  function injectSlotKey(node, prop) {
@@ -13236,10 +13528,7 @@ const tokenizer = new Tokenizer(stack, {
13236
13528
  case 18:
13237
13529
  case 19:
13238
13530
  case 20:
13239
- case 21:
13240
- emitError(9, end);
13241
- break;
13242
- default: break;
13531
+ case 21: emitError(9, end);
13243
13532
  }
13244
13533
  for (let index = 0; index < stack.length; index++) {
13245
13534
  onCloseTag(stack[index], end - 1);
@@ -13389,7 +13678,7 @@ function backTrack(index, c) {
13389
13678
  while (currentInput.charCodeAt(i) !== c && i >= 0) i--;
13390
13679
  return i;
13391
13680
  }
13392
- const specialTemplateDir = new Set([
13681
+ const specialTemplateDir = /* @__PURE__ */ new Set([
13393
13682
  "if",
13394
13683
  "else",
13395
13684
  "else-if",
@@ -13425,16 +13714,18 @@ function condenseWhitespace(nodes) {
13425
13714
  let removedWhitespace = false;
13426
13715
  for (let i = 0; i < nodes.length; i++) {
13427
13716
  const node = nodes[i];
13428
- if (node.type === 2) if (!inPre) {
13429
- if (isAllWhitespace(node.content)) {
13430
- const prev = nodes[i - 1] && nodes[i - 1].type;
13431
- const next = nodes[i + 1] && nodes[i + 1].type;
13432
- if (!prev || !next || shouldCondense && (prev === 3 && (next === 3 || next === 1) || prev === 1 && (next === 3 || next === 1 && hasNewlineChar(node.content)))) {
13433
- removedWhitespace = true;
13434
- nodes[i] = null;
13435
- } else node.content = " ";
13436
- } else if (shouldCondense) node.content = condense(node.content);
13437
- } else node.content = node.content.replace(windowsNewlineRE, "\n");
13717
+ if (node.type === 2) {
13718
+ if (!inPre) {
13719
+ if (isAllWhitespace(node.content)) {
13720
+ const prev = nodes[i - 1] && nodes[i - 1].type;
13721
+ const next = nodes[i + 1] && nodes[i + 1].type;
13722
+ if (!prev || !next || shouldCondense && (prev === 3 && (next === 3 || next === 1) || prev === 1 && (next === 3 || next === 1 && hasNewlineChar(node.content)))) {
13723
+ removedWhitespace = true;
13724
+ nodes[i] = null;
13725
+ } else node.content = " ";
13726
+ } else if (shouldCondense) node.content = condense(node.content);
13727
+ } else node.content = node.content.replace(windowsNewlineRE, "\n");
13728
+ }
13438
13729
  }
13439
13730
  return removedWhitespace ? nodes.filter(Boolean) : nodes;
13440
13731
  }
@@ -13695,7 +13986,7 @@ function getConstantType(node, context) {
13695
13986
  default: return 0;
13696
13987
  }
13697
13988
  }
13698
- const allowHoistedHelperSet = new Set([
13989
+ const allowHoistedHelperSet = /* @__PURE__ */ new Set([
13699
13990
  NORMALIZE_CLASS,
13700
13991
  NORMALIZE_STYLE,
13701
13992
  NORMALIZE_PROPS,
@@ -13739,7 +14030,7 @@ function getSelfName(filename) {
13739
14030
  const nameMatch = filename.replace(/\?.*$/, "").match(/([^/\\]+)\.\w+$/);
13740
14031
  return nameMatch ? capitalize(camelize(nameMatch[1])) : null;
13741
14032
  }
13742
- function createTransformContext(root, { filename = "", prefixIdentifiers = false, hoistStatic = false, hmr = false, cacheHandlers = false, nodeTransforms = [], directiveTransforms = {}, transformHoist = null, isBuiltInComponent = NOOP, isCustomElement = NOOP, expressionPlugins = [], scopeId = null, slotted = true, ssr = false, inSSR = false, ssrCssVars = ``, bindingMetadata = EMPTY_OBJ, inline = false, isTS = false, eventDelegation = true, onError = defaultOnError, onWarn = defaultOnWarn, compatConfig }) {
14033
+ function createTransformContext(root, { filename = "", prefixIdentifiers = false, hoistStatic = false, hmr = false, cacheHandlers = false, nodeTransforms = [], directiveTransforms = {}, transformHoist = null, isBuiltInComponent = NOOP, isCustomElement = NOOP, expressionPlugins = [], scopeId = null, slotted = true, ssr = false, inSSR = false, ssrCssVars = ``, bindingMetadata = EMPTY_OBJ, inline = false, isTS = false, onError = defaultOnError, onWarn = defaultOnWarn, compatConfig }) {
13743
14034
  const context = {
13744
14035
  filename,
13745
14036
  selfName: getSelfName(filename),
@@ -13761,7 +14052,6 @@ function createTransformContext(root, { filename = "", prefixIdentifiers = false
13761
14052
  bindingMetadata,
13762
14053
  inline,
13763
14054
  isTS,
13764
- eventDelegation,
13765
14055
  onError,
13766
14056
  onWarn,
13767
14057
  compatConfig,
@@ -13854,7 +14144,7 @@ function transform(root, options) {
13854
14144
  traverseNode(root, context);
13855
14145
  if (options.hoistStatic) cacheStatic(root, context);
13856
14146
  if (!options.ssr) createRootCodegen(root, context);
13857
- root.helpers = new Set([...context.helpers.keys()]);
14147
+ root.helpers = /* @__PURE__ */ new Set([...context.helpers.keys()]);
13858
14148
  root.components = [...context.components];
13859
14149
  root.directives = [...context.directives];
13860
14150
  root.imports = context.imports;
@@ -13901,8 +14191,10 @@ function traverseNode(node, context) {
13901
14191
  const exitFns = [];
13902
14192
  for (let i = 0; i < nodeTransforms.length; i++) {
13903
14193
  const onExit = nodeTransforms[i](node, context);
13904
- if (onExit) if (isArray(onExit)) exitFns.push(...onExit);
13905
- else exitFns.push(onExit);
14194
+ if (onExit) {
14195
+ if (isArray(onExit)) exitFns.push(...onExit);
14196
+ else exitFns.push(onExit);
14197
+ }
13906
14198
  if (!context.currentNode) return;
13907
14199
  else node = context.currentNode;
13908
14200
  }
@@ -13919,9 +14211,7 @@ function traverseNode(node, context) {
13919
14211
  case 10:
13920
14212
  case 11:
13921
14213
  case 1:
13922
- case 0:
13923
- traverseChildren(node, context);
13924
- break;
14214
+ case 0: traverseChildren(node, context);
13925
14215
  }
13926
14216
  context.currentNode = node;
13927
14217
  let i = exitFns.length;
@@ -14117,10 +14407,12 @@ function genNodeList(nodes, context, multilines = false, comma = true) {
14117
14407
  if (isString(node)) push(node, -3);
14118
14408
  else if (isArray(node)) genNodeListAsArray(node, context);
14119
14409
  else genNode(node, context);
14120
- if (i < nodes.length - 1) if (multilines) {
14121
- comma && push(",");
14122
- newline();
14123
- } else comma && push(", ");
14410
+ if (i < nodes.length - 1) {
14411
+ if (multilines) {
14412
+ comma && push(",");
14413
+ newline();
14414
+ } else comma && push(", ");
14415
+ }
14124
14416
  }
14125
14417
  }
14126
14418
  function genNode(node, context) {
@@ -14232,8 +14524,10 @@ function genVNodeCall(node, context) {
14232
14524
  const { push, helper, pure } = context;
14233
14525
  const { tag, props, children, patchFlag, dynamicProps, directives, isBlock, disableTracking, isComponent } = node;
14234
14526
  let patchFlagString;
14235
- if (patchFlag) if (patchFlag < 0) patchFlagString = patchFlag + ` /* ${PatchFlagNames[patchFlag]} */`;
14236
- else patchFlagString = patchFlag + ` /* ${Object.keys(PatchFlagNames).map(Number).filter((n) => n > 0 && patchFlag & n).map((n) => PatchFlagNames[n]).join(`, `)} */`;
14527
+ if (patchFlag) {
14528
+ if (patchFlag < 0) patchFlagString = patchFlag + ` /* ${PatchFlagNames[patchFlag]} */`;
14529
+ else patchFlagString = patchFlag + ` /* ${Object.keys(PatchFlagNames).map(Number).filter((n) => n > 0 && patchFlag & n).map((n) => PatchFlagNames[n]).join(`, `)} */`;
14530
+ }
14237
14531
  if (directives) push(helper(WITH_DIRECTIVES) + `(`);
14238
14532
  if (isBlock) push(`(${helper(OPEN_BLOCK)}(${disableTracking ? `true` : ``}), `);
14239
14533
  if (pure) push(PURE_ANNOTATION);
@@ -14502,16 +14796,17 @@ function createChildrenCodegenNode(branch, keyIndex, context) {
14502
14796
  const keyProperty = createObjectProperty(`key`, createSimpleExpression(`${keyIndex}`, false, locStub, 2));
14503
14797
  const { children } = branch;
14504
14798
  const firstChild = children[0];
14505
- if (children.length !== 1 || firstChild.type !== 1) if (children.length === 1 && firstChild.type === 11) {
14506
- const vnodeCall = firstChild.codegenNode;
14507
- injectProp(vnodeCall, keyProperty, context);
14508
- return vnodeCall;
14799
+ if (children.length !== 1 || firstChild.type !== 1) {
14800
+ if (children.length === 1 && firstChild.type === 11) {
14801
+ const vnodeCall = firstChild.codegenNode;
14802
+ injectProp(vnodeCall, keyProperty, context);
14803
+ return vnodeCall;
14804
+ } else {
14805
+ let patchFlag = 64;
14806
+ if (!branch.isTemplateIf && children.filter((c) => c.type !== 3).length === 1) patchFlag |= 2048;
14807
+ return createVNodeCall(context, helper(FRAGMENT), createObjectExpression([keyProperty]), children, patchFlag, void 0, void 0, true, false, false, branch.loc);
14808
+ }
14509
14809
  } else {
14510
- let patchFlag = 64;
14511
- if (!branch.isTemplateIf && children.filter((c) => c.type !== 3).length === 1) patchFlag |= 2048;
14512
- return createVNodeCall(context, helper(FRAGMENT), createObjectExpression([keyProperty]), children, patchFlag, void 0, void 0, true, false, false, branch.loc);
14513
- }
14514
- else {
14515
14810
  const ret = firstChild.codegenNode;
14516
14811
  const vnodeCall = getMemoedVNodeCall(ret);
14517
14812
  if (vnodeCall.type === 13) convertToBlock(vnodeCall, context);
@@ -14532,9 +14827,10 @@ function isSameKey(a, b) {
14532
14827
  return true;
14533
14828
  }
14534
14829
  function getParentCondition(node) {
14535
- while (true) if (node.type === 19) if (node.alternate.type === 19) node = node.alternate;
14536
- else return node;
14537
- else if (node.type === 20) node = node.value;
14830
+ while (true) if (node.type === 19) {
14831
+ if (node.alternate.type === 19) node = node.alternate;
14832
+ else return node;
14833
+ } else if (node.type === 20) node = node.value;
14538
14834
  }
14539
14835
  //#endregion
14540
14836
  //#region packages/compiler-core/src/transforms/vFor.ts
@@ -14572,15 +14868,24 @@ const transformFor = createStructuralDirectiveTransform("for", (node, dir, conte
14572
14868
  else {
14573
14869
  childBlock = children[0].codegenNode;
14574
14870
  if (isTemplate && keyProperty) injectProp(childBlock, keyProperty, context);
14575
- if (childBlock.isBlock !== !isStableFragment) if (childBlock.isBlock) {
14576
- removeHelper(OPEN_BLOCK);
14577
- removeHelper(getVNodeBlockHelper(context.inSSR, childBlock.isComponent));
14578
- } else removeHelper(getVNodeHelper(context.inSSR, childBlock.isComponent));
14579
- childBlock.isBlock = !isStableFragment;
14871
+ const shouldUseBlock = !isStableFragment || childBlock.isBlockRequired === true;
14872
+ if (childBlock.isBlock !== shouldUseBlock) {
14873
+ if (childBlock.isBlock) {
14874
+ removeHelper(OPEN_BLOCK);
14875
+ removeHelper(getVNodeBlockHelper(context.inSSR, childBlock.isComponent));
14876
+ } else removeHelper(getVNodeHelper(context.inSSR, childBlock.isComponent));
14877
+ }
14878
+ childBlock.isBlock = shouldUseBlock;
14580
14879
  if (childBlock.isBlock) {
14581
14880
  helper(OPEN_BLOCK);
14582
14881
  helper(getVNodeBlockHelper(context.inSSR, childBlock.isComponent));
14583
- } else helper(getVNodeHelper(context.inSSR, childBlock.isComponent));
14882
+ } else {
14883
+ helper(getVNodeHelper(context.inSSR, childBlock.isComponent));
14884
+ if (childBlock.needsPatch) {
14885
+ var _childBlock$patchFlag;
14886
+ childBlock.patchFlag = ((_childBlock$patchFlag = childBlock.patchFlag) !== null && _childBlock$patchFlag !== void 0 ? _childBlock$patchFlag : 0) | 512;
14887
+ }
14888
+ }
14584
14889
  }
14585
14890
  if (memo) {
14586
14891
  const loop = createFunctionExpression(createForLoopParams(forNode.parseResult, [createSimpleExpression(`_cached`)]));
@@ -14752,8 +15057,10 @@ function buildSlots(node, context, buildSlotFn = buildClientSlotFn) {
14752
15057
  return createObjectProperty(`default`, fn);
14753
15058
  };
14754
15059
  if (!hasTemplateSlots) slotsProperties.push(buildDefaultSlotProperty(void 0, children));
14755
- else if (implicitDefaultChildren.length && !implicitDefaultChildren.every(isWhitespaceText)) if (hasNamedDefaultSlot) context.onError(createCompilerError(39, implicitDefaultChildren[0].loc));
14756
- else slotsProperties.push(buildDefaultSlotProperty(void 0, implicitDefaultChildren));
15060
+ else if (implicitDefaultChildren.length && !implicitDefaultChildren.every(isWhitespaceText)) {
15061
+ if (hasNamedDefaultSlot) context.onError(createCompilerError(39, implicitDefaultChildren[0].loc));
15062
+ else slotsProperties.push(buildDefaultSlotProperty(void 0, implicitDefaultChildren));
15063
+ }
14757
15064
  }
14758
15065
  const slotFlag = hasDynamicSlots ? 2 : hasForwardedSlots(node.children) ? 3 : 1;
14759
15066
  let slots = createObjectExpression(slotsProperties.concat(createObjectProperty(`_`, createSimpleExpression(slotFlag + ` /* ${slotFlagsText[slotFlag]} */`, false))), loc);
@@ -14779,10 +15086,7 @@ function hasForwardedSlots(children) {
14779
15086
  if (hasForwardedSlots(child.branches)) return true;
14780
15087
  break;
14781
15088
  case 10:
14782
- case 11:
14783
- if (hasForwardedSlots(child.children)) return true;
14784
- break;
14785
- default: break;
15089
+ case 11: if (hasForwardedSlots(child.children)) return true;
14786
15090
  }
14787
15091
  }
14788
15092
  return false;
@@ -14804,12 +15108,16 @@ const transformElement = (node, context) => {
14804
15108
  let vnodeDynamicProps;
14805
15109
  let dynamicPropNames;
14806
15110
  let vnodeDirectives;
15111
+ let needsPatch = false;
15112
+ let isBlockRequired = false;
14807
15113
  let shouldUseBlock = isDynamicComponent || vnodeTag === TELEPORT || vnodeTag === SUSPENSE || !isComponent && (tag === "svg" || tag === "foreignObject" || tag === "math");
14808
15114
  if (props.length > 0) {
14809
15115
  const propsBuildResult = buildProps(node, context, void 0, isComponent, isDynamicComponent);
14810
15116
  vnodeProps = propsBuildResult.props;
14811
15117
  patchFlag = propsBuildResult.patchFlag;
14812
15118
  dynamicPropNames = propsBuildResult.dynamicPropNames;
15119
+ needsPatch = propsBuildResult.needsPatch;
15120
+ isBlockRequired = propsBuildResult.isBlockRequired;
14813
15121
  const directives = propsBuildResult.directives;
14814
15122
  vnodeDirectives = directives && directives.length ? createArrayExpression(directives.map((dir) => buildDirectiveArgs(dir, context))) : void 0;
14815
15123
  if (propsBuildResult.shouldUseBlock) shouldUseBlock = true;
@@ -14838,7 +15146,10 @@ const transformElement = (node, context) => {
14838
15146
  } else vnodeChildren = node.children;
14839
15147
  }
14840
15148
  if (dynamicPropNames && dynamicPropNames.length) vnodeDynamicProps = stringifyDynamicPropNames(dynamicPropNames);
14841
- node.codegenNode = createVNodeCall(context, vnodeTag, vnodeProps, vnodeChildren, patchFlag === 0 ? void 0 : patchFlag, vnodeDynamicProps, vnodeDirectives, !!shouldUseBlock, false, isComponent, node.loc);
15149
+ const vnodeCall = node.codegenNode = createVNodeCall(context, vnodeTag, vnodeProps, vnodeChildren, patchFlag === 0 ? void 0 : patchFlag, vnodeDynamicProps, vnodeDirectives, !!shouldUseBlock, false, isComponent, node.loc);
15150
+ needsPatch = needsPatch && (patchFlag === 0 || patchFlag === 32);
15151
+ if (needsPatch) vnodeCall.needsPatch = true;
15152
+ if (isBlockRequired) vnodeCall.isBlockRequired = true;
14842
15153
  };
14843
15154
  };
14844
15155
  function resolveComponentType(node, context, ssr = false) {
@@ -14872,6 +15183,7 @@ function buildProps(node, context, props = node.props, isComponent, isDynamicCom
14872
15183
  const runtimeDirectives = [];
14873
15184
  const hasChildren = children.length > 0;
14874
15185
  let shouldUseBlock = false;
15186
+ let isBlockRequired = false;
14875
15187
  let patchFlag = 0;
14876
15188
  let hasRef = false;
14877
15189
  let hasClassBinding = false;
@@ -14896,12 +15208,12 @@ function buildProps(node, context, props = node.props, isComponent, isDynamicCom
14896
15208
  const isEventHandler = isOn(name);
14897
15209
  if (isEventHandler && (!isComponent || isDynamicComponent) && name.toLowerCase() !== "onclick" && name !== "onUpdate:modelValue" && !isReservedProp(name)) hasHydrationEventBinding = true;
14898
15210
  if (isEventHandler && isReservedProp(name)) hasVnodeHook = true;
15211
+ if (name === "ref") hasRef = true;
14899
15212
  if (isEventHandler && value.type === 14) value = value.arguments[0];
14900
15213
  if (value.type === 20 || (value.type === 4 || value.type === 8) && getConstantType(value, context) > 0) return;
14901
- if (name === "ref") hasRef = true;
14902
- else if (name === "class") hasClassBinding = true;
15214
+ if (name === "class") hasClassBinding = true;
14903
15215
  else if (name === "style") hasStyleBinding = true;
14904
- else if (name !== "key" && !dynamicPropNames.includes(name)) dynamicPropNames.push(name);
15216
+ else if (name !== "ref" && name !== "key" && !dynamicPropNames.includes(name)) dynamicPropNames.push(name);
14905
15217
  if (isComponent && (name === "class" || name === "style") && !dynamicPropNames.includes(name)) dynamicPropNames.push(name);
14906
15218
  } else hasDynamicKeys = true;
14907
15219
  };
@@ -14927,33 +15239,38 @@ function buildProps(node, context, props = node.props, isComponent, isDynamicCom
14927
15239
  if (name === "once" || name === "memo") continue;
14928
15240
  if (name === "is" || isVBind && isStaticArgOf(arg, "is") && (isComponentTag(tag) || isCompatEnabled("COMPILER_IS_ON_ELEMENT", context))) continue;
14929
15241
  if (isVOn && ssr) continue;
14930
- if (isVBind && isStaticArgOf(arg, "key") || isVOn && hasChildren && isStaticArgOf(arg, "vue:before-update")) shouldUseBlock = true;
15242
+ if (isVBind && isStaticArgOf(arg, "key")) shouldUseBlock = true;
15243
+ if (isVOn && hasChildren && arg && isStaticExp(arg) && camelize(arg.content) === "vue:beforeUpdate") {
15244
+ shouldUseBlock = true;
15245
+ isBlockRequired = true;
15246
+ }
14931
15247
  if (isVBind && isStaticArgOf(arg, "ref")) pushRefVForMarker();
14932
15248
  if (!arg && (isVBind || isVOn)) {
14933
15249
  hasDynamicKeys = true;
14934
- if (exp) if (isVBind) {
14935
- pushMergeArg();
14936
- if (mergeArgs.some((arg) => {
14937
- if (arg.type === 15) return arg.properties.some(({ key }) => {
14938
- if (key.type !== 4 || !key.isStatic) return true;
14939
- return key.content !== "class" && key.content !== "style" && !isOn(key.content);
14940
- });
14941
- else return true;
14942
- })) checkCompatEnabled("COMPILER_V_BIND_OBJECT_ORDER", context, loc);
14943
- if (isCompatEnabled("COMPILER_V_BIND_OBJECT_ORDER", context)) {
14944
- mergeArgs.unshift(exp);
14945
- continue;
14946
- }
14947
- pushRefVForMarker();
14948
- pushMergeArg();
14949
- mergeArgs.push(exp);
14950
- } else pushMergeArg({
14951
- type: 14,
14952
- loc,
14953
- callee: context.helper(TO_HANDLERS),
14954
- arguments: isComponent ? [exp] : [exp, `true`]
14955
- });
14956
- else context.onError(createCompilerError(isVBind ? 34 : 35, loc));
15250
+ if (exp) {
15251
+ if (isVBind) {
15252
+ pushMergeArg();
15253
+ if (mergeArgs.some((arg) => {
15254
+ if (arg.type === 15) return arg.properties.some(({ key }) => {
15255
+ if (key.type !== 4 || !key.isStatic) return true;
15256
+ return key.content !== "class" && key.content !== "style" && !isOn(key.content);
15257
+ });
15258
+ else return true;
15259
+ })) checkCompatEnabled("COMPILER_V_BIND_OBJECT_ORDER", context, loc);
15260
+ if (isCompatEnabled("COMPILER_V_BIND_OBJECT_ORDER", context)) {
15261
+ mergeArgs.unshift(exp);
15262
+ continue;
15263
+ }
15264
+ pushRefVForMarker();
15265
+ pushMergeArg();
15266
+ mergeArgs.push(exp);
15267
+ } else pushMergeArg({
15268
+ type: 14,
15269
+ loc,
15270
+ callee: context.helper(TO_HANDLERS),
15271
+ arguments: isComponent ? [exp] : [exp, `true`]
15272
+ });
15273
+ } else context.onError(createCompilerError(isVBind ? 34 : 35, loc));
14957
15274
  continue;
14958
15275
  }
14959
15276
  if (isVBind && modifiers.some((mod) => mod.content === "prop")) patchFlag |= 32;
@@ -14969,7 +15286,10 @@ function buildProps(node, context, props = node.props, isComponent, isDynamicCom
14969
15286
  }
14970
15287
  } else if (!isBuiltInDirective(name)) {
14971
15288
  runtimeDirectives.push(prop);
14972
- if (hasChildren) shouldUseBlock = true;
15289
+ if (hasChildren) {
15290
+ shouldUseBlock = true;
15291
+ isBlockRequired = true;
15292
+ }
14973
15293
  }
14974
15294
  }
14975
15295
  }
@@ -14986,7 +15306,8 @@ function buildProps(node, context, props = node.props, isComponent, isDynamicCom
14986
15306
  if (dynamicPropNames.length) patchFlag |= 8;
14987
15307
  if (hasHydrationEventBinding) patchFlag |= 32;
14988
15308
  }
14989
- if (!shouldUseBlock && (patchFlag === 0 || patchFlag === 32) && (hasRef || hasVnodeHook || runtimeDirectives.length > 0)) patchFlag |= 512;
15309
+ const needsPatch = (patchFlag === 0 || patchFlag === 32) && (hasRef || hasVnodeHook || runtimeDirectives.length > 0);
15310
+ if (!shouldUseBlock && needsPatch) patchFlag |= 512;
14990
15311
  if (!context.inSSR && propsExpression) switch (propsExpression.type) {
14991
15312
  case 15:
14992
15313
  let classKeyIndex = -1;
@@ -15007,16 +15328,16 @@ function buildProps(node, context, props = node.props, isComponent, isDynamicCom
15007
15328
  } else propsExpression = createCallExpression(context.helper(NORMALIZE_PROPS), [propsExpression]);
15008
15329
  break;
15009
15330
  case 14: break;
15010
- default:
15011
- propsExpression = createCallExpression(context.helper(NORMALIZE_PROPS), [createCallExpression(context.helper(GUARD_REACTIVE_PROPS), [propsExpression])]);
15012
- break;
15331
+ default: propsExpression = createCallExpression(context.helper(NORMALIZE_PROPS), [createCallExpression(context.helper(GUARD_REACTIVE_PROPS), [propsExpression])]);
15013
15332
  }
15014
15333
  return {
15015
15334
  props: propsExpression,
15016
15335
  directives: runtimeDirectives,
15017
15336
  patchFlag,
15018
15337
  dynamicPropNames,
15019
- shouldUseBlock
15338
+ shouldUseBlock,
15339
+ needsPatch,
15340
+ isBlockRequired
15020
15341
  };
15021
15342
  }
15022
15343
  function dedupeProperties(properties) {
@@ -15113,10 +15434,12 @@ function processSlotOutlet(node, context) {
15113
15434
  for (let i = 0; i < node.props.length; i++) {
15114
15435
  const p = node.props[i];
15115
15436
  if (p.type === 6) {
15116
- if (p.value) if (p.name === "name") slotName = JSON.stringify(p.value.content);
15117
- else {
15118
- p.name = camelize(p.name);
15119
- nonNameProps.push(p);
15437
+ if (p.value) {
15438
+ if (p.name === "name") slotName = JSON.stringify(p.value.content);
15439
+ else {
15440
+ p.name = camelize(p.name);
15441
+ nonNameProps.push(p);
15442
+ }
15120
15443
  }
15121
15444
  } else if (p.name === "bind" && isStaticArgOf(p.arg, "name")) {
15122
15445
  if (p.exp) slotName = p.exp;
@@ -15142,17 +15465,18 @@ const transformOn$1 = (dir, node, context, augmentor) => {
15142
15465
  const { loc, modifiers, arg } = dir;
15143
15466
  if (!dir.exp && !modifiers.length) context.onError(createCompilerError(35, loc));
15144
15467
  let eventName;
15145
- if (arg.type === 4) if (arg.isStatic) {
15146
- let rawName = arg.content;
15147
- if (rawName.startsWith("vnode")) context.onError(createCompilerError(52, arg.loc));
15148
- if (rawName.startsWith("vue:")) rawName = `vnode-${rawName.slice(4)}`;
15149
- eventName = createSimpleExpression(node.tagType !== 0 || rawName.startsWith("vnode") || !/[A-Z]/.test(rawName) ? toHandlerKey(camelize(rawName)) : `on:${rawName}`, true, arg.loc);
15150
- } else eventName = createCompoundExpression([
15151
- `${context.helperString(TO_HANDLER_KEY)}(`,
15152
- arg,
15153
- `)`
15154
- ]);
15155
- else {
15468
+ if (arg.type === 4) {
15469
+ if (arg.isStatic) {
15470
+ let rawName = arg.content;
15471
+ if (rawName.startsWith("vnode")) context.onError(createCompilerError(52, arg.loc));
15472
+ if (rawName.startsWith("vue:")) rawName = `vnode-${rawName.slice(4)}`;
15473
+ eventName = createSimpleExpression(node.tagType !== 0 || rawName.startsWith("vnode") || !/[A-Z]/.test(rawName) ? toHandlerKey(camelize(rawName)) : `on:${rawName}`, true, arg.loc);
15474
+ } else eventName = createCompoundExpression([
15475
+ `${context.helperString(TO_HANDLER_KEY)}(`,
15476
+ arg,
15477
+ `)`
15478
+ ]);
15479
+ } else {
15156
15480
  eventName = arg;
15157
15481
  eventName.children.unshift(`${context.helperString(TO_HANDLER_KEY)}(`);
15158
15482
  eventName.children.push(`)`);
@@ -15188,11 +15512,14 @@ const transformBind = (dir, _node, context) => {
15188
15512
  arg.children.unshift(`(`);
15189
15513
  arg.children.push(`) || ""`);
15190
15514
  } else if (!arg.isStatic) arg.content = arg.content ? `${arg.content} || ""` : `""`;
15191
- if (modifiers.some((mod) => mod.content === "camel")) if (arg.type === 4) if (arg.isStatic) arg.content = camelize(arg.content);
15192
- else arg.content = `${context.helperString(CAMELIZE)}(${arg.content})`;
15193
- else {
15194
- arg.children.unshift(`${context.helperString(CAMELIZE)}(`);
15195
- arg.children.push(`)`);
15515
+ if (modifiers.some((mod) => mod.content === "camel")) {
15516
+ if (arg.type === 4) {
15517
+ if (arg.isStatic) arg.content = camelize(arg.content);
15518
+ else arg.content = `${context.helperString(CAMELIZE)}(${arg.content})`;
15519
+ } else {
15520
+ arg.children.unshift(`${context.helperString(CAMELIZE)}(`);
15521
+ arg.children.push(`)`);
15522
+ }
15196
15523
  }
15197
15524
  if (!context.inSSR) {
15198
15525
  if (modifiers.some((mod) => mod.content === "prop")) injectPrefix(arg, ".");
@@ -15201,9 +15528,10 @@ const transformBind = (dir, _node, context) => {
15201
15528
  return { props: [createObjectProperty(arg, exp)] };
15202
15529
  };
15203
15530
  const injectPrefix = (arg, prefix) => {
15204
- if (arg.type === 4) if (arg.isStatic) arg.content = prefix + arg.content;
15205
- else arg.content = `\`${prefix}\${${arg.content}}\``;
15206
- else {
15531
+ if (arg.type === 4) {
15532
+ if (arg.isStatic) arg.content = prefix + arg.content;
15533
+ else arg.content = `\`${prefix}\${${arg.content}}\``;
15534
+ } else {
15207
15535
  arg.children.unshift(`'${prefix}' + (`);
15208
15536
  arg.children.push(`)`);
15209
15537
  }
@@ -15350,11 +15678,12 @@ function parseFilter(node, context) {
15350
15678
  if (c === 96 && prev !== 92) inTemplateString = false;
15351
15679
  } else if (inRegex) {
15352
15680
  if (c === 47 && prev !== 92) inRegex = false;
15353
- } else if (c === 124 && exp.charCodeAt(i + 1) !== 124 && exp.charCodeAt(i - 1) !== 124 && !curly && !square && !paren) if (expression === void 0) {
15354
- lastFilterIndex = i + 1;
15355
- expression = exp.slice(0, i).trim();
15356
- } else pushFilter();
15357
- else {
15681
+ } else if (c === 124 && exp.charCodeAt(i + 1) !== 124 && exp.charCodeAt(i - 1) !== 124 && !curly && !square && !paren) {
15682
+ if (expression === void 0) {
15683
+ lastFilterIndex = i + 1;
15684
+ expression = exp.slice(0, i).trim();
15685
+ } else pushFilter();
15686
+ } else {
15358
15687
  switch (c) {
15359
15688
  case 34:
15360
15689
  inDouble = true;
@@ -15380,9 +15709,7 @@ function parseFilter(node, context) {
15380
15709
  case 123:
15381
15710
  curly++;
15382
15711
  break;
15383
- case 125:
15384
- curly--;
15385
- break;
15712
+ case 125: curly--;
15386
15713
  }
15387
15714
  if (c === 47) {
15388
15715
  let j = i - 1;
@@ -15658,9 +15985,7 @@ const transformModel = (dir, node, context) => {
15658
15985
  isInvalidType = true;
15659
15986
  context.onError(createDOMCompilerError(60, dir.loc));
15660
15987
  break;
15661
- default:
15662
- checkDuplicatedValue();
15663
- break;
15988
+ default: checkDuplicatedValue();
15664
15989
  }
15665
15990
  } else if (hasDynamicKeyVBind(node)) directiveToUse = V_MODEL_DYNAMIC;
15666
15991
  else checkDuplicatedValue();
@@ -15673,27 +15998,37 @@ const transformModel = (dir, node, context) => {
15673
15998
  };
15674
15999
  //#endregion
15675
16000
  //#region packages/compiler-dom/src/transforms/vOn.ts
15676
- const isEventOptionModifier = /* @__PURE__ */ makeMap(`passive,once,capture`);
15677
- const isNonKeyModifier = /* @__PURE__ */ makeMap("stop,prevent,self,ctrl,shift,alt,meta,exact,middle");
15678
- const maybeKeyModifier = /* @__PURE__ */ makeMap("left,right");
15679
- const isKeyboardEvent = /* @__PURE__ */ makeMap(`onkeyup,onkeydown,onkeypress`);
16001
+ const isEventOptionModifier = /*@__PURE__*/ makeMap(`passive,once,capture`);
16002
+ const isNonKeyModifier = /*@__PURE__*/ makeMap("stop,prevent,self,ctrl,shift,alt,meta,exact,middle");
16003
+ const maybeKeyModifier = /*@__PURE__*/ makeMap("left,right");
16004
+ const isKeyboardEvent = /*@__PURE__*/ makeMap(`onkeyup,onkeydown,onkeypress`);
15680
16005
  const resolveModifiers = (key, modifiers, context, loc) => {
15681
16006
  const keyModifiers = [];
15682
16007
  const nonKeyModifiers = [];
15683
16008
  const eventOptionModifiers = [];
15684
16009
  for (let i = 0; i < modifiers.length; i++) {
15685
16010
  const modifier = modifiers[i].content;
16011
+ if (modifier === "delegate") {
16012
+ if (context) {
16013
+ const error = /* @__PURE__ */ new SyntaxError(`.delegate modifier is only supported in Vapor components.`);
16014
+ error.loc = modifiers[i].loc;
16015
+ context.onWarn(error);
16016
+ }
16017
+ continue;
16018
+ }
15686
16019
  if (modifier === "native" && context && checkCompatEnabled("COMPILER_V_ON_NATIVE", context, loc)) eventOptionModifiers.push(modifier);
15687
16020
  else if (isEventOptionModifier(modifier)) eventOptionModifiers.push(modifier);
15688
16021
  else {
15689
16022
  const keyString = isString(key) ? key : isStaticExp(key) ? key.content : null;
15690
- if (maybeKeyModifier(modifier)) if (keyString) if (isKeyboardEvent(keyString.toLowerCase())) keyModifiers.push(modifier);
15691
- else nonKeyModifiers.push(modifier);
15692
- else {
15693
- keyModifiers.push(modifier);
15694
- nonKeyModifiers.push(modifier);
15695
- }
15696
- else if (isNonKeyModifier(modifier)) nonKeyModifiers.push(modifier);
16023
+ if (maybeKeyModifier(modifier)) {
16024
+ if (keyString) {
16025
+ if (isKeyboardEvent(keyString.toLowerCase())) keyModifiers.push(modifier);
16026
+ else nonKeyModifiers.push(modifier);
16027
+ } else {
16028
+ keyModifiers.push(modifier);
16029
+ nonKeyModifiers.push(modifier);
16030
+ }
16031
+ } else if (isNonKeyModifier(modifier)) nonKeyModifiers.push(modifier);
15697
16032
  else keyModifiers.push(modifier);
15698
16033
  }
15699
16034
  }
@@ -15808,7 +16143,7 @@ function isValidHTMLNesting(parent, child) {
15808
16143
  }
15809
16144
  return true;
15810
16145
  }
15811
- const headings = new Set([
16146
+ const headings = /* @__PURE__ */ new Set([
15812
16147
  "h1",
15813
16148
  "h2",
15814
16149
  "h3",
@@ -15820,7 +16155,7 @@ const emptySet = /* @__PURE__ */ new Set([]);
15820
16155
  /**
15821
16156
  * maps element to set of elements that can be it's children, no other */
15822
16157
  const onlyValidChildren = {
15823
- head: new Set([
16158
+ head: /* @__PURE__ */ new Set([
15824
16159
  "base",
15825
16160
  "basefront",
15826
16161
  "bgsound",
@@ -15833,24 +16168,24 @@ const onlyValidChildren = {
15833
16168
  "script",
15834
16169
  "template"
15835
16170
  ]),
15836
- optgroup: new Set(["option"]),
15837
- select: new Set([
16171
+ optgroup: /* @__PURE__ */ new Set(["option"]),
16172
+ select: /* @__PURE__ */ new Set([
15838
16173
  "optgroup",
15839
16174
  "option",
15840
16175
  "hr"
15841
16176
  ]),
15842
- table: new Set([
16177
+ table: /* @__PURE__ */ new Set([
15843
16178
  "caption",
15844
16179
  "colgroup",
15845
16180
  "tbody",
15846
16181
  "tfoot",
15847
16182
  "thead"
15848
16183
  ]),
15849
- tr: new Set(["td", "th"]),
15850
- colgroup: new Set(["col"]),
15851
- tbody: new Set(["tr"]),
15852
- thead: new Set(["tr"]),
15853
- tfoot: new Set(["tr"]),
16184
+ tr: /* @__PURE__ */ new Set(["td", "th"]),
16185
+ colgroup: /* @__PURE__ */ new Set(["col"]),
16186
+ tbody: /* @__PURE__ */ new Set(["tr"]),
16187
+ thead: /* @__PURE__ */ new Set(["tr"]),
16188
+ tfoot: /* @__PURE__ */ new Set(["tr"]),
15854
16189
  script: emptySet,
15855
16190
  iframe: emptySet,
15856
16191
  option: emptySet,
@@ -15861,30 +16196,30 @@ const onlyValidChildren = {
15861
16196
  /** maps elements to set of elements which can be it's parent, no other */
15862
16197
  const onlyValidParents = {
15863
16198
  html: emptySet,
15864
- body: new Set(["html"]),
15865
- head: new Set(["html"]),
15866
- td: new Set(["tr"]),
15867
- colgroup: new Set(["table"]),
15868
- caption: new Set(["table"]),
15869
- tbody: new Set(["table"]),
15870
- tfoot: new Set(["table"]),
15871
- col: new Set(["colgroup"]),
15872
- th: new Set(["tr"]),
15873
- thead: new Set(["table"]),
15874
- tr: new Set([
16199
+ body: /* @__PURE__ */ new Set(["html"]),
16200
+ head: /* @__PURE__ */ new Set(["html"]),
16201
+ td: /* @__PURE__ */ new Set(["tr"]),
16202
+ colgroup: /* @__PURE__ */ new Set(["table"]),
16203
+ caption: /* @__PURE__ */ new Set(["table"]),
16204
+ tbody: /* @__PURE__ */ new Set(["table"]),
16205
+ tfoot: /* @__PURE__ */ new Set(["table"]),
16206
+ col: /* @__PURE__ */ new Set(["colgroup"]),
16207
+ th: /* @__PURE__ */ new Set(["tr"]),
16208
+ thead: /* @__PURE__ */ new Set(["table"]),
16209
+ tr: /* @__PURE__ */ new Set([
15875
16210
  "tbody",
15876
16211
  "thead",
15877
16212
  "tfoot"
15878
16213
  ]),
15879
- dd: new Set(["dl", "div"]),
15880
- dt: new Set(["dl", "div"]),
15881
- figcaption: new Set(["figure"]),
15882
- summary: new Set(["details"]),
15883
- area: new Set(["map"])
16214
+ dd: /* @__PURE__ */ new Set(["dl", "div"]),
16215
+ dt: /* @__PURE__ */ new Set(["dl", "div"]),
16216
+ figcaption: /* @__PURE__ */ new Set(["figure"]),
16217
+ summary: /* @__PURE__ */ new Set(["details"]),
16218
+ area: /* @__PURE__ */ new Set(["map"])
15884
16219
  };
15885
16220
  /** maps element to set of elements that can not be it's children, others can */
15886
16221
  const knownInvalidChildren = {
15887
- p: new Set([
16222
+ p: /* @__PURE__ */ new Set([
15888
16223
  "address",
15889
16224
  "article",
15890
16225
  "aside",
@@ -15919,7 +16254,7 @@ const knownInvalidChildren = {
15919
16254
  "table",
15920
16255
  "ul"
15921
16256
  ]),
15922
- svg: new Set([
16257
+ svg: /* @__PURE__ */ new Set([
15923
16258
  "b",
15924
16259
  "blockquote",
15925
16260
  "br",
@@ -15960,12 +16295,12 @@ const knownInvalidChildren = {
15960
16295
  };
15961
16296
  /** maps element to set of elements that can not be it's parent, others can */
15962
16297
  const knownInvalidParents = {
15963
- a: new Set(["a"]),
15964
- button: new Set(["button"]),
15965
- dd: new Set(["dd", "dt"]),
15966
- dt: new Set(["dd", "dt"]),
15967
- form: new Set(["form"]),
15968
- li: new Set(["li"]),
16298
+ a: /* @__PURE__ */ new Set(["a"]),
16299
+ button: /* @__PURE__ */ new Set(["button"]),
16300
+ dd: /* @__PURE__ */ new Set(["dd", "dt"]),
16301
+ dt: /* @__PURE__ */ new Set(["dd", "dt"]),
16302
+ form: /* @__PURE__ */ new Set(["form"]),
16303
+ li: /* @__PURE__ */ new Set(["li"]),
15969
16304
  h1: headings,
15970
16305
  h2: headings,
15971
16306
  h3: headings,
@@ -16008,10 +16343,12 @@ function compile(src, options = {}) {
16008
16343
  //#region packages/vue-compat/src/index.ts
16009
16344
  const compileCache = Object.create(null);
16010
16345
  function compileToFunction(template, options) {
16011
- if (!isString(template)) if (template.nodeType) template = template.innerHTML;
16012
- else {
16013
- warn(`invalid template option: `, template);
16014
- return NOOP;
16346
+ if (!isString(template)) {
16347
+ if (template.nodeType) template = template.innerHTML;
16348
+ else {
16349
+ warn(`invalid template option: `, template);
16350
+ return NOOP;
16351
+ }
16015
16352
  }
16016
16353
  const key = genCacheKey(template, options);
16017
16354
  const cached = compileCache[key];