@vue/runtime-core 3.6.0-rc.4 → 3.6.0-rc.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @vue/runtime-core v3.6.0-rc.4
2
+ * @vue/runtime-core v3.6.0-rc.6
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
@@ -264,7 +264,7 @@ let currentFlushPromise = null;
264
264
  let jobsLength = 0;
265
265
  let flushIndex = 0;
266
266
  let postFlushIndex = 0;
267
- const resolvedPromise = /* @__PURE__ */ Promise.resolve();
267
+ const resolvedPromise = /*@__PURE__*/ Promise.resolve();
268
268
  const RECURSION_LIMIT = 100;
269
269
  function nextTick(fn) {
270
270
  const p = currentFlushPromise || resolvedPromise;
@@ -303,6 +303,7 @@ const doFlushJobs = () => {
303
303
  flushJobs();
304
304
  } catch (e) {
305
305
  currentFlushPromise = null;
306
+ if (jobsLength || postJobs.length) queueFlush();
306
307
  throw e;
307
308
  }
308
309
  };
@@ -310,9 +311,10 @@ function queueFlush() {
310
311
  if (!currentFlushPromise) currentFlushPromise = resolvedPromise.then(doFlushJobs);
311
312
  }
312
313
  function queuePostFlushCb(jobs, id = Infinity) {
313
- if (!isArray(jobs)) if (activePostJobs && id === -1) activePostJobs.splice(postFlushIndex, 0, jobs);
314
- else queueJobWorker(jobs, id, postJobs, postJobs.length, 0);
315
- else for (let i = 0; i < jobs.length; i++) queueJobWorker(jobs[i], id, postJobs, postJobs.length, 0);
314
+ if (!isArray(jobs)) {
315
+ if (activePostJobs && id === -1) activePostJobs.splice(postFlushIndex, 0, jobs);
316
+ else queueJobWorker(jobs, id, postJobs, postJobs.length, 0);
317
+ } else for (let i = 0; i < jobs.length; i++) queueJobWorker(jobs[i], id, postJobs, postJobs.length, 0);
316
318
  queueFlush();
317
319
  }
318
320
  function flushPreFlushCbs(instance, seen) {
@@ -326,8 +328,11 @@ function flushPreFlushCbs(instance, seen) {
326
328
  i--;
327
329
  jobsLength--;
328
330
  if (cb.flags & 2) cb.flags &= -2;
329
- cb();
330
- if (!(cb.flags & 2)) cb.flags &= -2;
331
+ try {
332
+ cb();
333
+ } finally {
334
+ if (!(cb.flags & 2)) cb.flags &= -2;
335
+ }
331
336
  }
332
337
  }
333
338
  function flushPostFlushCbs(seen) {
@@ -340,18 +345,22 @@ function flushPostFlushCbs(seen) {
340
345
  activePostJobs = postJobs;
341
346
  postJobs = [];
342
347
  if (!!(process.env.NODE_ENV !== "production")) seen = seen || /* @__PURE__ */ new Map();
343
- while (postFlushIndex < activePostJobs.length) {
344
- const cb = activePostJobs[postFlushIndex++];
345
- if (!!(process.env.NODE_ENV !== "production") && checkRecursiveUpdates(seen, cb)) continue;
346
- if (cb.flags & 2) cb.flags &= -2;
347
- if (!(cb.flags & 4)) try {
348
- cb();
349
- } finally {
350
- cb.flags &= -2;
348
+ try {
349
+ while (postFlushIndex < activePostJobs.length) {
350
+ const cb = activePostJobs[postFlushIndex++];
351
+ if (!!(process.env.NODE_ENV !== "production") && checkRecursiveUpdates(seen, cb)) continue;
352
+ if (cb.flags & 2) cb.flags &= -2;
353
+ if (!(cb.flags & 4)) try {
354
+ cb();
355
+ } finally {
356
+ if (!(cb.flags & 2)) cb.flags &= -2;
357
+ }
351
358
  }
359
+ } finally {
360
+ while (postFlushIndex < activePostJobs.length) activePostJobs[postFlushIndex++].flags &= -2;
361
+ activePostJobs = null;
362
+ postFlushIndex = 0;
352
363
  }
353
- activePostJobs = null;
354
- postFlushIndex = 0;
355
364
  }
356
365
  }
357
366
  let isFlushing = false;
@@ -361,9 +370,12 @@ let isFlushing = false;
361
370
  function flushOnAppMount(instance) {
362
371
  if (!isFlushing) {
363
372
  isFlushing = true;
364
- flushPreFlushCbs(instance);
365
- flushPostFlushCbs();
366
- isFlushing = false;
373
+ try {
374
+ flushPreFlushCbs(instance);
375
+ flushPostFlushCbs();
376
+ } finally {
377
+ isFlushing = false;
378
+ }
367
379
  }
368
380
  }
369
381
  function flushJobs(seen) {
@@ -393,8 +405,8 @@ function flushJobs(seen) {
393
405
  jobsLength = 0;
394
406
  jobs.length = 0;
395
407
  flushPostFlushCbs(seen);
396
- currentFlushPromise = null;
397
408
  if (jobsLength || postJobs.length) flushJobs(seen);
409
+ else currentFlushPromise = null;
398
410
  }
399
411
  }
400
412
  function checkRecursiveUpdates(seen, fn) {
@@ -425,6 +437,19 @@ if (!!(process.env.NODE_ENV !== "production")) getGlobalThis().__VUE_HMR_RUNTIME
425
437
  rerender: tryWrap(rerender),
426
438
  reload: tryWrap(reload)
427
439
  };
440
+ function runWithHmrUpdating(fn) {
441
+ isHmrUpdating = true;
442
+ let done = false;
443
+ try {
444
+ fn();
445
+ done = true;
446
+ } finally {
447
+ if (done) nextTick(() => {
448
+ isHmrUpdating = false;
449
+ });
450
+ else isHmrUpdating = false;
451
+ }
452
+ }
428
453
  const map = /* @__PURE__ */ new Map();
429
454
  function registerHMR(instance) {
430
455
  const id = instance.type.__hmrId;
@@ -466,18 +491,16 @@ function rerender(id, newRender) {
466
491
  instance.render = newRender;
467
492
  normalizeClassComponent(instance.type).render = newRender;
468
493
  }
469
- isHmrUpdating = true;
470
- if (instance.vapor) {
471
- if (!instance.isUnmounted) instance.hmrRerender();
472
- } else {
473
- const i = instance;
474
- if (!(i.effect.flags & 1024)) {
475
- i.renderCache = [];
476
- i.effect.run();
494
+ runWithHmrUpdating(() => {
495
+ if (instance.vapor) {
496
+ if (!instance.isUnmounted) instance.hmrRerender();
497
+ } else {
498
+ const i = instance;
499
+ if (!(i.effect.flags & 1024)) {
500
+ i.renderCache = [];
501
+ i.effect.run();
502
+ }
477
503
  }
478
- }
479
- nextTick(() => {
480
- isHmrUpdating = false;
481
504
  });
482
505
  });
483
506
  }
@@ -492,15 +515,17 @@ function reload(id, newComp) {
492
515
  for (const instance of instances) if (instance.root && instance.root.ce && instance !== instance.root) instance.root.ce._removeChildStyle(instance.type);
493
516
  const dirtyInstances = new Set(instances);
494
517
  const rerenderedParents = /* @__PURE__ */ new Set();
495
- for (const instance of instances) {
496
- const parent = instance.parent;
497
- if (parent) {
498
- if (!hasDirtyAncestor(instance, dirtyInstances) && !rerenderedParents.has(parent)) {
499
- rerenderedParents.add(parent);
500
- parent.hmrRerender();
501
- }
502
- } else instance.hmrReload(newComp);
503
- }
518
+ runWithHmrUpdating(() => {
519
+ for (const instance of instances) {
520
+ const parent = instance.parent;
521
+ if (parent) {
522
+ if (!hasDirtyAncestor(instance, dirtyInstances) && !rerenderedParents.has(parent)) {
523
+ rerenderedParents.add(parent);
524
+ parent.hmrRerender();
525
+ }
526
+ } else instance.hmrReload(newComp);
527
+ }
528
+ });
504
529
  } else {
505
530
  const parentUpdates = /* @__PURE__ */ new Map();
506
531
  const dirtyInstanceSet = new Set(instances);
@@ -534,21 +559,22 @@ function reload(id, newComp) {
534
559
  }
535
560
  parentUpdates.forEach((updates, parent) => {
536
561
  queueJob(() => {
537
- isHmrUpdating = true;
538
- if (parent.vapor) parent.hmrRerender();
539
- else {
540
- const i = parent;
541
- if (!(i.effect.flags & 1024)) {
542
- i.renderCache = [];
543
- i.effect.run();
544
- }
562
+ try {
563
+ runWithHmrUpdating(() => {
564
+ if (parent.vapor) parent.hmrRerender();
565
+ else {
566
+ const i = parent;
567
+ if (!(i.effect.flags & 1024)) {
568
+ i.renderCache = [];
569
+ i.effect.run();
570
+ }
571
+ }
572
+ });
573
+ } finally {
574
+ updates.forEach(([instance, dirtyInstances]) => {
575
+ dirtyInstances.delete(instance);
576
+ });
545
577
  }
546
- nextTick(() => {
547
- isHmrUpdating = false;
548
- });
549
- updates.forEach(([instance, dirtyInstances]) => {
550
- dirtyInstances.delete(instance);
551
- });
552
578
  });
553
579
  });
554
580
  }
@@ -617,20 +643,20 @@ function devtoolsInitApp(app, version) {
617
643
  function devtoolsUnmountApp(app) {
618
644
  emit$1("app:unmount", app);
619
645
  }
620
- const devtoolsComponentAdded = /* @__PURE__ */ createDevtoolsComponentHook("component:added");
621
- const devtoolsComponentUpdated = /* @__PURE__ */ createDevtoolsComponentHook("component:updated");
622
- const _devtoolsComponentRemoved = /* @__PURE__ */ createDevtoolsComponentHook("component:removed");
646
+ const devtoolsComponentAdded = /*@__PURE__*/ createDevtoolsComponentHook("component:added");
647
+ const devtoolsComponentUpdated = /*@__PURE__*/ createDevtoolsComponentHook("component:updated");
648
+ const _devtoolsComponentRemoved = /*@__PURE__*/ createDevtoolsComponentHook("component:removed");
623
649
  const devtoolsComponentRemoved = (component) => {
624
650
  if (devtools$1 && typeof devtools$1.cleanupBuffer === "function" && !devtools$1.cleanupBuffer(component)) _devtoolsComponentRemoved(component);
625
651
  };
626
- /* @__NO_SIDE_EFFECTS__ */
652
+ /*@__NO_SIDE_EFFECTS__*/
627
653
  function createDevtoolsComponentHook(hook) {
628
654
  return (component) => {
629
655
  emit$1(hook, component.appContext.app, component.uid, component.parent ? component.parent.uid : void 0, component);
630
656
  };
631
657
  }
632
- const devtoolsPerfStart = /* @__PURE__ */ createDevtoolsPerformanceHook("perf:start");
633
- const devtoolsPerfEnd = /* @__PURE__ */ createDevtoolsPerformanceHook("perf:end");
658
+ const devtoolsPerfStart = /*@__PURE__*/ createDevtoolsPerformanceHook("perf:start");
659
+ const devtoolsPerfEnd = /*@__PURE__*/ createDevtoolsPerformanceHook("perf:end");
634
660
  function createDevtoolsPerformanceHook(hook) {
635
661
  return (component, type, time) => {
636
662
  emit$1(hook, component.appContext.app, component.uid, component, type, time);
@@ -915,15 +941,16 @@ const isTargetSVG = (target) => typeof SVGElement !== "undefined" && target inst
915
941
  const isTargetMathML = (target) => typeof MathMLElement === "function" && target instanceof MathMLElement;
916
942
  const resolveTarget = (props, select) => {
917
943
  const targetSelector = props && props.to;
918
- if (isString(targetSelector)) if (!select) {
919
- process.env.NODE_ENV !== "production" && warn$1("Current renderer does not support string target for Teleports. (missing querySelector renderer option)");
920
- return null;
944
+ if (isString(targetSelector)) {
945
+ if (!select) {
946
+ process.env.NODE_ENV !== "production" && warn$1("Current renderer does not support string target for Teleports. (missing querySelector renderer option)");
947
+ return null;
948
+ } else {
949
+ const target = select(targetSelector);
950
+ if (!!(process.env.NODE_ENV !== "production") && !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.`);
951
+ return target;
952
+ }
921
953
  } else {
922
- const target = select(targetSelector);
923
- if (!!(process.env.NODE_ENV !== "production") && !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.`);
924
- return target;
925
- }
926
- else {
927
954
  if (!!(process.env.NODE_ENV !== "production") && !targetSelector && !isTeleportDisabled(props)) warn$1(`Invalid Teleport target: ${targetSelector}`);
928
955
  return targetSelector;
929
956
  }
@@ -961,7 +988,8 @@ const TeleportImpl = {
961
988
  if (pendingMounts.get(vnode) !== mountJob) return;
962
989
  pendingMounts.delete(vnode);
963
990
  if (isTeleportDisabled(vnode.props)) {
964
- mount(vnode, parentNode(vnode.el) || container, vnode.anchor);
991
+ const mountContainer = parentNode(vnode.el) || container;
992
+ mount(vnode, mountContainer, vnode.anchor);
965
993
  updateCssVars(vnode, true);
966
994
  }
967
995
  mountToTarget(vnode);
@@ -1070,15 +1098,17 @@ function hydrateTeleport(node, vnode, parentComponent, parentSuspense, slotScope
1070
1098
  const disabled = isTeleportDisabled(vnode.props);
1071
1099
  if (target) {
1072
1100
  const targetNode = target._lpa || target.firstChild;
1073
- if (vnode.shapeFlag & 16) if (disabled) {
1074
- hydrateDisabledTeleport(node, vnode);
1075
- hydrateAnchor(target, targetNode);
1076
- if (!vnode.targetAnchor) prepareAnchor(target, vnode, createText, insert, parentNode(node) === target ? node : null);
1077
- } else {
1078
- vnode.anchor = nextSibling(node);
1079
- hydrateAnchor(target, targetNode);
1080
- if (!vnode.targetAnchor) prepareAnchor(target, vnode, createText, insert);
1081
- hydrateChildren(targetNode && nextSibling(targetNode), vnode, target, parentComponent, parentSuspense, slotScopeIds, optimized);
1101
+ if (vnode.shapeFlag & 16) {
1102
+ if (disabled) {
1103
+ hydrateDisabledTeleport(node, vnode);
1104
+ hydrateAnchor(target, targetNode);
1105
+ if (!vnode.targetAnchor) prepareAnchor(target, vnode, createText, insert, parentNode(node) === target ? node : null);
1106
+ } else {
1107
+ vnode.anchor = nextSibling(node);
1108
+ hydrateAnchor(target, targetNode);
1109
+ if (!vnode.targetAnchor) prepareAnchor(target, vnode, createText, insert);
1110
+ hydrateChildren(targetNode && nextSibling(targetNode), vnode, target, parentComponent, parentSuspense, slotScopeIds, optimized);
1111
+ }
1082
1112
  }
1083
1113
  updateCssVars(vnode, disabled);
1084
1114
  } else if (disabled) {
@@ -1245,8 +1275,10 @@ function baseResolveTransitionHooks(context, props, state, instance) {
1245
1275
  persisted,
1246
1276
  beforeEnter(el) {
1247
1277
  let hook = onBeforeEnter;
1248
- if (!state.isMounted) if (appear) hook = onBeforeAppear || onBeforeEnter;
1249
- else return;
1278
+ if (!state.isMounted) {
1279
+ if (appear) hook = onBeforeAppear || onBeforeEnter;
1280
+ else return;
1281
+ }
1250
1282
  if (el[leaveCbKey]) el[leaveCbKey](true);
1251
1283
  earlyRemove();
1252
1284
  callHook(hook, [el]);
@@ -1256,11 +1288,13 @@ function baseResolveTransitionHooks(context, props, state, instance) {
1256
1288
  let hook = onEnter;
1257
1289
  let afterHook = onAfterEnter;
1258
1290
  let cancelHook = onEnterCancelled;
1259
- if (!state.isMounted) if (appear) {
1260
- hook = onAppear || onEnter;
1261
- afterHook = onAfterAppear || onAfterEnter;
1262
- cancelHook = onAppearCancelled || onEnterCancelled;
1263
- } else return;
1291
+ if (!state.isMounted) {
1292
+ if (appear) {
1293
+ hook = onAppear || onEnter;
1294
+ afterHook = onAfterAppear || onAfterEnter;
1295
+ cancelHook = onAppearCancelled || onEnterCancelled;
1296
+ } else return;
1297
+ }
1264
1298
  let called = false;
1265
1299
  el[enterCbKey] = (cancelled) => {
1266
1300
  if (called) return;
@@ -1437,9 +1471,9 @@ function checkTransitionMode(mode) {
1437
1471
  }
1438
1472
  //#endregion
1439
1473
  //#region packages/runtime-core/src/apiDefineComponent.ts
1440
- /* @__NO_SIDE_EFFECTS__ */
1474
+ /*@__NO_SIDE_EFFECTS__*/
1441
1475
  function defineComponent(options, extraOptions) {
1442
- return isFunction(options) ? extend({ name: options.name }, extraOptions, { setup: options }) : options;
1476
+ return isFunction(options) ? /*@__PURE__*/ (() => extend({ name: options.name }, extraOptions, { setup: options }))() : options;
1443
1477
  }
1444
1478
  //#endregion
1445
1479
  //#region packages/runtime-core/src/helpers/useId.ts
@@ -1536,15 +1570,16 @@ function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
1536
1570
  if (rawRef.f) {
1537
1571
  const existing = _isString ? canSetSetupRef(ref) ? setupState[ref] : refs[ref] : canSetRef(ref) || !rawRef.k ? ref.value : refs[rawRef.k];
1538
1572
  if (isUnmount) isArray(existing) && remove(existing, refValue);
1539
- else if (!isArray(existing)) if (_isString) {
1540
- refs[ref] = [refValue];
1541
- if (canSetSetupRef(ref)) setupState[ref] = refs[ref];
1542
- } else {
1543
- const newVal = [refValue];
1544
- if (canSetRef(ref, rawRef.k)) ref.value = newVal;
1545
- if (rawRef.k) refs[rawRef.k] = newVal;
1546
- }
1547
- else if (!existing.includes(refValue)) existing.push(refValue);
1573
+ else if (!isArray(existing)) {
1574
+ if (_isString) {
1575
+ refs[ref] = [refValue];
1576
+ if (canSetSetupRef(ref)) setupState[ref] = refs[ref];
1577
+ } else {
1578
+ const newVal = [refValue];
1579
+ if (canSetRef(ref, rawRef.k)) ref.value = newVal;
1580
+ if (rawRef.k) refs[rawRef.k] = newVal;
1581
+ }
1582
+ } else if (!existing.includes(refValue)) existing.push(refValue);
1548
1583
  } else if (_isString) {
1549
1584
  refs[ref] = value;
1550
1585
  if (canSetSetupRef(ref)) setupState[ref] = value;
@@ -1605,7 +1640,18 @@ const logMismatchError = () => {
1605
1640
  hasLoggedMismatchError = true;
1606
1641
  };
1607
1642
  const isSVGContainer = (container) => container.namespaceURI.includes("svg") && container.tagName !== "foreignObject";
1608
- const isMathMLContainer = (container) => container.namespaceURI.includes("MathML");
1643
+ const isMathMLContainer = (container) => {
1644
+ if (!container.namespaceURI.includes("MathML")) return false;
1645
+ if (container.tagName !== "annotation-xml") return true;
1646
+ const encoding = container.getAttribute("encoding");
1647
+ return !encoding || !encoding.includes("html");
1648
+ };
1649
+ /**
1650
+ * Resolve the element namespace a container's children should be created in.
1651
+ * The live DOM is the source of truth, so this also covers containers that are
1652
+ * only known at runtime (interop boundaries, teleport targets).
1653
+ * @internal
1654
+ */
1609
1655
  const getContainerType = (container) => {
1610
1656
  if (container.nodeType !== 1) return void 0;
1611
1657
  if (isSVGContainer(container)) return "svg";
@@ -1647,11 +1693,12 @@ function createHydrationFunctions(rendererInternals) {
1647
1693
  let nextNode = null;
1648
1694
  switch (type) {
1649
1695
  case Text:
1650
- if (domType !== 3) if (vnode.children === "") {
1651
- insert(vnode.el = createText(""), parentNode(node), node);
1652
- nextNode = node;
1653
- } else nextNode = onMismatch();
1654
- else {
1696
+ if (domType !== 3) {
1697
+ if (vnode.children === "") {
1698
+ insert(vnode.el = createText(""), parentNode(node), node);
1699
+ nextNode = node;
1700
+ } else nextNode = onMismatch();
1701
+ } else {
1655
1702
  if (node.data !== vnode.children) {
1656
1703
  (process.env.NODE_ENV !== "production" || __VUE_PROD_HYDRATION_MISMATCH_DETAILS__) && warn$1(`Hydration text mismatch in`, node.parentNode, `\n - rendered on server: ${JSON.stringify(node.data)}\n - expected on client: ${JSON.stringify(vnode.children)}`);
1657
1704
  logMismatchError();
@@ -1688,11 +1735,12 @@ function createHydrationFunctions(rendererInternals) {
1688
1735
  else nextNode = hydrateFragment(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized);
1689
1736
  break;
1690
1737
  case VaporSlot:
1691
- nextNode = getVaporInterface(parentComponent, vnode).hydrateSlot(vnode, node, parentComponent, parentSuspense);
1738
+ nextNode = getVaporInterface(parentComponent, vnode).hydrateSlot(vnode, node, parentComponent, parentSuspense, slotScopeIds);
1692
1739
  break;
1693
- default: if (shapeFlag & 1) if ((domType !== 1 || vnode.type.toLowerCase() !== node.tagName.toLowerCase()) && !isTemplateNode(node)) nextNode = onMismatch();
1694
- else nextNode = hydrateElement(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized);
1695
- else if (shapeFlag & 6) {
1740
+ default: if (shapeFlag & 1) {
1741
+ if ((domType !== 1 || vnode.type.toLowerCase() !== node.tagName.toLowerCase()) && !isTemplateNode(node)) nextNode = onMismatch();
1742
+ else nextNode = hydrateElement(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized);
1743
+ } else if (shapeFlag & 6) {
1696
1744
  vnode.slotScopeIds = slotScopeIds;
1697
1745
  const container = parentNode(node);
1698
1746
  if (isFragmentStart) nextNode = locateClosingAnchor(node);
@@ -1714,19 +1762,20 @@ function createHydrationFunctions(rendererInternals) {
1714
1762
  } else {
1715
1763
  mountComponent(vnode, container, null, parentComponent, parentSuspense, getContainerType(container), optimized);
1716
1764
  const component = vnode.component;
1717
- if (isAsyncWrapper(vnode) && !vnode.type.__asyncResolved || component.asyncDep && !component.asyncResolved) {
1765
+ if (!component.subTree && (isAsyncWrapper(vnode) || component.asyncDep && !component.asyncResolved)) {
1718
1766
  let subTree;
1719
1767
  if (isFragmentStart) {
1720
- subTree = createVNode(Fragment);
1768
+ subTree = createVNode(Static);
1721
1769
  subTree.anchor = nextNode ? nextNode.previousSibling : container.lastChild;
1722
1770
  } else subTree = node.nodeType === 3 ? createTextVNode("") : createVNode("div");
1723
1771
  subTree.el = node;
1724
1772
  component.subTree = subTree;
1725
1773
  }
1726
1774
  }
1727
- } else if (shapeFlag & 64) if (domType !== 8) nextNode = onMismatch();
1728
- else nextNode = vnode.type.hydrate(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized, rendererInternals, hydrateChildren);
1729
- else if (shapeFlag & 128) nextNode = vnode.type.hydrate(node, vnode, parentComponent, parentSuspense, getContainerType(parentNode(node)), slotScopeIds, optimized, rendererInternals, hydrateNode);
1775
+ } else if (shapeFlag & 64) {
1776
+ if (domType !== 8) nextNode = onMismatch();
1777
+ else nextNode = vnode.type.hydrate(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized, rendererInternals, hydrateChildren);
1778
+ } else if (shapeFlag & 128) nextNode = vnode.type.hydrate(node, vnode, parentComponent, parentSuspense, getContainerType(parentNode(node)), slotScopeIds, optimized, rendererInternals, hydrateNode);
1730
1779
  else if (!!(process.env.NODE_ENV !== "production") || __VUE_PROD_HYDRATION_MISMATCH_DETAILS__) warn$1("Invalid HostVNode type:", type, `(${typeof type})`);
1731
1780
  }
1732
1781
  if (ref != null) setRef(ref, null, parentSuspense, vnode);
@@ -1859,7 +1908,7 @@ function createHydrationFunctions(rendererInternals) {
1859
1908
  const container = parentNode(node);
1860
1909
  remove(node);
1861
1910
  patch(null, vnode, container, next, parentComponent, parentSuspense, getContainerType(container), slotScopeIds);
1862
- if (parentComponent) {
1911
+ if (parentComponent && parentComponent.vnode) {
1863
1912
  parentComponent.vnode.el = vnode.el;
1864
1913
  updateHOCHostEl(parentComponent, vnode.el);
1865
1914
  }
@@ -1871,8 +1920,10 @@ function createHydrationFunctions(rendererInternals) {
1871
1920
  node = nextSibling(node);
1872
1921
  if (node && isComment(node)) {
1873
1922
  if (node.data === open) match++;
1874
- if (node.data === close) if (match === 0) return nextSibling(node);
1875
- else match--;
1923
+ if (node.data === close) {
1924
+ if (match === 0) return nextSibling(node);
1925
+ else match--;
1926
+ }
1876
1927
  }
1877
1928
  }
1878
1929
  return node;
@@ -1882,7 +1933,7 @@ function createHydrationFunctions(rendererInternals) {
1882
1933
  if (parentNode) parentNode.replaceChild(newNode, oldNode);
1883
1934
  let parent = parentComponent;
1884
1935
  while (parent) {
1885
- if (parent.vnode.el === oldNode) parent.vnode.el = parent.subTree.el = newNode;
1936
+ if (parent.vnode && parent.vnode.el === oldNode) parent.vnode.el = parent.subTree.el = newNode;
1886
1937
  parent = parent.parent;
1887
1938
  }
1888
1939
  };
@@ -1894,7 +1945,7 @@ const isTemplateNode = (node) => {
1894
1945
  /**
1895
1946
  * Dev only
1896
1947
  */
1897
- const resourceProps = /* @__PURE__ */ new Set([
1948
+ const resourceProps = /*@__PURE__*/ new Set([
1898
1949
  "src",
1899
1950
  "srcset",
1900
1951
  "href",
@@ -2148,7 +2199,7 @@ function forEachElement(node, cb) {
2148
2199
  //#endregion
2149
2200
  //#region packages/runtime-core/src/apiAsyncComponent.ts
2150
2201
  const isAsyncWrapper = (i) => !!i.type.__asyncLoader;
2151
- /* @__NO_SIDE_EFFECTS__ */
2202
+ /*@__NO_SIDE_EFFECTS__*/
2152
2203
  function defineAsyncComponent(source) {
2153
2204
  const { load, getResolvedComp, setPendingRequest, source: { loadingComponent, errorComponent, delay, hydrate: hydrateStrategy, timeout, suspensible = true } } = createAsyncComponentContext(source);
2154
2205
  return /* @__PURE__ */ defineComponent({
@@ -2367,10 +2418,13 @@ const KeepAlive = {
2367
2418
  });
2368
2419
  let pendingCacheKey = null;
2369
2420
  const cacheSubtree = () => {
2370
- if (pendingCacheKey != null) if (isSuspense(keepAliveInstance.subTree.type)) queuePostRenderEffect(() => {
2371
- cache.set(pendingCacheKey, getInnerChild(keepAliveInstance.subTree));
2372
- }, void 0, keepAliveInstance.subTree.suspense);
2373
- else cache.set(pendingCacheKey, getInnerChild(keepAliveInstance.subTree));
2421
+ if (pendingCacheKey != null) {
2422
+ if (isSuspense(keepAliveInstance.subTree.type)) queuePostRenderEffect(() => {
2423
+ const vnode = getInnerChild(keepAliveInstance.subTree);
2424
+ if (vnode.component) cache.set(pendingCacheKey, vnode);
2425
+ }, void 0, keepAliveInstance.subTree.suspense);
2426
+ else cache.set(pendingCacheKey, getInnerChild(keepAliveInstance.subTree));
2427
+ }
2374
2428
  };
2375
2429
  onMounted(cacheSubtree);
2376
2430
  onUpdated(cacheSubtree);
@@ -2612,23 +2666,25 @@ function renderList(source, renderItem, cache, index) {
2612
2666
  }
2613
2667
  ret = new Array(source.length);
2614
2668
  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]);
2615
- } else if (typeof source === "number") if (!!(process.env.NODE_ENV !== "production") && (!Number.isInteger(source) || source < 0)) {
2616
- warn$1(`The v-for range expects a positive integer value but got ${source}.`);
2617
- ret = [];
2618
- } else {
2619
- ret = new Array(source);
2620
- for (let i = 0; i < source; i++) ret[i] = renderItem(i + 1, i, void 0, cached && cached[i]);
2621
- }
2622
- else if (isObject(source)) if (source[Symbol.iterator]) ret = Array.from(source, (item, i) => renderItem(item, i, void 0, cached && cached[i]));
2623
- else {
2624
- const keys = Object.keys(source);
2625
- ret = new Array(keys.length);
2626
- for (let i = 0, l = keys.length; i < l; i++) {
2627
- const key = keys[i];
2628
- ret[i] = renderItem(source[key], key, i, cached && cached[i]);
2669
+ } else if (typeof source === "number") {
2670
+ if (!!(process.env.NODE_ENV !== "production") && (!Number.isInteger(source) || source < 0)) {
2671
+ warn$1(`The v-for range expects a positive integer value but got ${source}.`);
2672
+ ret = [];
2673
+ } else {
2674
+ ret = new Array(source);
2675
+ for (let i = 0; i < source; i++) ret[i] = renderItem(i + 1, i, void 0, cached && cached[i]);
2629
2676
  }
2630
- }
2631
- else ret = [];
2677
+ } else if (isObject(source)) {
2678
+ if (source[Symbol.iterator]) ret = Array.from(source, (item, i) => renderItem(item, i, void 0, cached && cached[i]));
2679
+ else {
2680
+ const keys = Object.keys(source);
2681
+ ret = new Array(keys.length);
2682
+ for (let i = 0, l = keys.length; i < l; i++) {
2683
+ const key = keys[i];
2684
+ ret[i] = renderItem(source[key], key, i, cached && cached[i]);
2685
+ }
2686
+ }
2687
+ } else ret = [];
2632
2688
  if (cache) cache[index] = ret;
2633
2689
  return ret;
2634
2690
  }
@@ -2653,14 +2709,27 @@ function createSlots(slots, dynamicSlots) {
2653
2709
  //#endregion
2654
2710
  //#region packages/runtime-core/src/helpers/renderSlot.ts
2655
2711
  /**
2712
+ * Links a slot function to its raw vapor slot: a raw vapor slot carries
2713
+ * itself, and the wrapper the interop slots proxy hands out carries the raw
2714
+ * slot it wraps — one lookup answers both "is this a vapor slot" and
2715
+ * "which one". Internal to vapor interop.
2716
+ */
2717
+ const rawVaporSlotKey = Symbol(`rawVaporSlot`);
2718
+ /**
2719
+ * Marks a compiler-generated slot fallback as VDOM-rendered so the vapor
2720
+ * interop fallback chain renders it through the VDOM renderer. Internal to
2721
+ * vapor interop.
2722
+ */
2723
+ const vdomSlotFallbackKey = Symbol(`vdomSlotFallback`);
2724
+ /**
2656
2725
  * Compiler runtime helper for rendering `<slot/>`
2657
2726
  * @private
2658
2727
  */
2659
2728
  function renderSlot(slots, name, props, fallback, noSlotted, branchKey) {
2660
2729
  if (props == null) props = {};
2661
2730
  let slot = slots[name];
2662
- if (fallback) fallback.__vdom = true;
2663
- const vaporSlot = slot && (slot.__vs || (slot.__vapor ? slot : null));
2731
+ if (fallback) fallback[vdomSlotFallbackKey] = true;
2732
+ const vaporSlot = slot && slot[rawVaporSlotKey];
2664
2733
  if (vaporSlot) {
2665
2734
  const ret = (openBlock(), createBlock(VaporSlot, props));
2666
2735
  ret.vs = {
@@ -2737,11 +2806,38 @@ const getPublicInstance = (i) => {
2737
2806
  if (isStatefulComponent(i)) return getComponentPublicInstance(i);
2738
2807
  return getPublicInstance(i.parent);
2739
2808
  };
2809
+ const resolveDevRootEl = (vnode) => {
2810
+ let found = false;
2811
+ while (true) {
2812
+ if (vnode.patchFlag > 0 && vnode.patchFlag & 2048) {
2813
+ const root = filterSingleRoot(vnode.children);
2814
+ if (!root) return;
2815
+ vnode = root;
2816
+ found = true;
2817
+ continue;
2818
+ }
2819
+ const component = vnode.component;
2820
+ if (component && component.subTree) {
2821
+ vnode = component.subTree;
2822
+ continue;
2823
+ }
2824
+ const suspense = vnode.suspense;
2825
+ if (suspense && suspense.activeBranch) {
2826
+ vnode = suspense.activeBranch;
2827
+ continue;
2828
+ }
2829
+ return found ? vnode.el : void 0;
2830
+ }
2831
+ };
2832
+ const getDevRootFragmentEl = (i) => {
2833
+ const el = i.subTree && resolveDevRootEl(i.subTree);
2834
+ return el === void 0 ? i.vnode.el : el;
2835
+ };
2740
2836
  let publicPropertiesMap;
2741
2837
  const getPublicPropertiesMap = () => {
2742
2838
  if (!publicPropertiesMap) publicPropertiesMap = extend(Object.create(null), {
2743
2839
  $: (i) => i,
2744
- $el: (i) => i.vnode.el,
2840
+ $el: (i) => !!(process.env.NODE_ENV !== "production") ? getDevRootFragmentEl(i) : i.vnode.el,
2745
2841
  $data: (i) => i.data,
2746
2842
  $props: (i) => !!(process.env.NODE_ENV !== "production") ? shallowReadonly$1(i.props) : i.props,
2747
2843
  $attrs: (i) => !!(process.env.NODE_ENV !== "production") ? shallowReadonly$1(i.attrs) : i.attrs,
@@ -2847,7 +2943,7 @@ if (!!(process.env.NODE_ENV !== "production") && true) PublicInstanceProxyHandle
2847
2943
  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.");
2848
2944
  return Reflect.ownKeys(target);
2849
2945
  };
2850
- const RuntimeCompiledPublicInstanceProxyHandlers = /* @__PURE__ */ extend({}, PublicInstanceProxyHandlers, {
2946
+ const RuntimeCompiledPublicInstanceProxyHandlers = /*@__PURE__*/ extend({}, PublicInstanceProxyHandlers, {
2851
2947
  get(target, key) {
2852
2948
  if (key === Symbol.unscopables) return;
2853
2949
  return PublicInstanceProxyHandlers.get(target, key, target);
@@ -3019,12 +3115,13 @@ function mergeDefaults(raw, defaults) {
3019
3115
  for (const key in defaults) {
3020
3116
  if (key.startsWith("__skip")) continue;
3021
3117
  let opt = props[key];
3022
- if (opt) if (isArray(opt) || isFunction(opt)) opt = props[key] = {
3023
- type: opt,
3024
- default: defaults[key]
3025
- };
3026
- else opt.default = defaults[key];
3027
- else if (opt === null) opt = props[key] = { default: defaults[key] };
3118
+ if (opt) {
3119
+ if (isArray(opt) || isFunction(opt)) opt = props[key] = {
3120
+ type: opt,
3121
+ default: defaults[key]
3122
+ };
3123
+ else opt.default = defaults[key];
3124
+ } else if (opt === null) opt = props[key] = { default: defaults[key] };
3028
3125
  else if (!!(process.env.NODE_ENV !== "production")) warn$1(`props default key "${key}" has no corresponding declaration.`);
3029
3126
  if (opt && defaults[`__skip_${key}`]) opt.skipFactory = true;
3030
3127
  }
@@ -3168,11 +3265,12 @@ function applyOptions(instance) {
3168
3265
  const opt = computedOptions[key];
3169
3266
  const get = isFunction(opt) ? opt.bind(publicThis, publicThis) : isFunction(opt.get) ? opt.get.bind(publicThis, publicThis) : NOOP;
3170
3267
  if (!!(process.env.NODE_ENV !== "production") && get === NOOP) warn$1(`Computed property "${key}" has no getter.`);
3268
+ const set = !isFunction(opt) && isFunction(opt.set) ? opt.set.bind(publicThis) : !!(process.env.NODE_ENV !== "production") ? () => {
3269
+ warn$1(`Write operation failed: computed property "${key}" is readonly.`);
3270
+ } : NOOP;
3171
3271
  const c = computed({
3172
3272
  get,
3173
- set: !isFunction(opt) && isFunction(opt.set) ? opt.set.bind(publicThis) : !!(process.env.NODE_ENV !== "production") ? () => {
3174
- warn$1(`Write operation failed: computed property "${key}" is readonly.`);
3175
- } : NOOP
3273
+ set
3176
3274
  });
3177
3275
  Object.defineProperty(ctx, key, {
3178
3276
  enumerable: true,
@@ -3229,9 +3327,10 @@ function resolveInjections(injectOptions, ctx, checkDuplicateProperties = NOOP)
3229
3327
  for (const key in injectOptions) {
3230
3328
  const opt = injectOptions[key];
3231
3329
  let injected;
3232
- if (isObject(opt)) if ("default" in opt) injected = inject(opt.from || key, opt.default, true);
3233
- else injected = inject(opt.from || key);
3234
- else injected = inject(opt);
3330
+ if (isObject(opt)) {
3331
+ if ("default" in opt) injected = inject(opt.from || key, opt.default, true);
3332
+ else injected = inject(opt.from || key);
3333
+ } else injected = inject(opt);
3235
3334
  if (isRef$1(injected)) Object.defineProperty(ctx, key, {
3236
3335
  enumerable: true,
3237
3336
  configurable: true,
@@ -3252,13 +3351,14 @@ function createWatcher(raw, ctx, publicThis, key) {
3252
3351
  if (isFunction(handler)) watch(getter, handler);
3253
3352
  else if (!!(process.env.NODE_ENV !== "production")) warn$1(`Invalid watch handler specified by key "${raw}"`, handler);
3254
3353
  } else if (isFunction(raw)) watch(getter, raw.bind(publicThis));
3255
- else if (isObject(raw)) if (isArray(raw)) raw.forEach((r) => createWatcher(r, ctx, publicThis, key));
3256
- else {
3257
- const handler = isFunction(raw.handler) ? raw.handler.bind(publicThis) : ctx[raw.handler];
3258
- if (isFunction(handler)) watch(getter, handler, raw);
3259
- else if (!!(process.env.NODE_ENV !== "production")) warn$1(`Invalid watch handler specified by key "${raw.handler}"`, handler);
3260
- }
3261
- else if (!!(process.env.NODE_ENV !== "production")) warn$1(`Invalid watch option: "${key}"`, raw);
3354
+ else if (isObject(raw)) {
3355
+ if (isArray(raw)) raw.forEach((r) => createWatcher(r, ctx, publicThis, key));
3356
+ else {
3357
+ const handler = isFunction(raw.handler) ? raw.handler.bind(publicThis) : ctx[raw.handler];
3358
+ if (isFunction(handler)) watch(getter, handler, raw);
3359
+ else if (!!(process.env.NODE_ENV !== "production")) warn$1(`Invalid watch handler specified by key "${raw.handler}"`, handler);
3360
+ }
3361
+ } else if (!!(process.env.NODE_ENV !== "production")) warn$1(`Invalid watch option: "${key}"`, raw);
3262
3362
  }
3263
3363
  /**
3264
3364
  * Resolve merged options and cache it on the component.
@@ -3344,7 +3444,7 @@ function mergeObjectOptions(to, from) {
3344
3444
  }
3345
3445
  function mergeEmitsOrPropsOptions(to, from) {
3346
3446
  if (to) {
3347
- if (isArray(to) && isArray(from)) return [...new Set([...to, ...from])];
3447
+ if (isArray(to) && isArray(from)) return [.../* @__PURE__ */ new Set([...to, ...from])];
3348
3448
  return extend(Object.create(null), normalizePropsOrEmits(to), normalizePropsOrEmits(from !== null && from !== void 0 ? from : {}));
3349
3449
  } else return from;
3350
3450
  }
@@ -3469,8 +3569,10 @@ function createAppAPI(mount, unmount, getPublicInstance, render) {
3469
3569
  } else if (!!(process.env.NODE_ENV !== "production")) warn$1(`Cannot unmount an app that is not mounted.`);
3470
3570
  },
3471
3571
  provide(key, value) {
3472
- if (!!(process.env.NODE_ENV !== "production") && 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.`);
3473
- else warn$1(`App already provides property with key "${String(key)}" inherited from its parent element. It will be overwritten with the new value.`);
3572
+ if (!!(process.env.NODE_ENV !== "production") && key in context.provides) {
3573
+ if (hasOwn(context.provides, key)) warn$1(`App already provides property with key "${String(key)}". It will be overwritten with the new value.`);
3574
+ else warn$1(`App already provides property with key "${String(key)}" inherited from its parent element. It will be overwritten with the new value.`);
3575
+ }
3474
3576
  context.provides[key] = value;
3475
3577
  return app;
3476
3578
  },
@@ -3577,12 +3679,14 @@ function baseEmit(instance, props, getter, event, ...rawArgs) {
3577
3679
  if (instance.isUnmounted) return;
3578
3680
  if (!!(process.env.NODE_ENV !== "production")) {
3579
3681
  const { emitsOptions, propsOptions } = instance;
3580
- if (emitsOptions) if (!(event in emitsOptions) && true) {
3581
- if (!propsOptions || !propsOptions[0] || !(toHandlerKey$1(camelize$1(event)) in propsOptions[0])) warn$1(`Component emitted event "${event}" but it is neither declared in the emits option nor as an "${toHandlerKey$1(camelize$1(event))}" prop.`);
3582
- } else {
3583
- const validator = emitsOptions[event];
3584
- if (isFunction(validator)) {
3585
- if (!validator(...rawArgs)) warn$1(`Invalid event arguments: event validation failed for event "${event}".`);
3682
+ if (emitsOptions) {
3683
+ if (!(event in emitsOptions) && true) {
3684
+ if (!propsOptions || !propsOptions[0] || !(toHandlerKey$1(camelize$1(event)) in propsOptions[0])) warn$1(`Component emitted event "${event}" but it is neither declared in the emits option nor as an "${toHandlerKey$1(camelize$1(event))}" prop.`);
3685
+ } else {
3686
+ const validator = emitsOptions[event];
3687
+ if (isFunction(validator)) {
3688
+ if (!validator(...rawArgs)) warn$1(`Invalid event arguments: event validation failed for event "${event}".`);
3689
+ }
3586
3690
  }
3587
3691
  }
3588
3692
  }
@@ -3591,7 +3695,7 @@ function baseEmit(instance, props, getter, event, ...rawArgs) {
3591
3695
  const modifiers = isModelListener && getModelModifiers(props, event.slice(7), getter);
3592
3696
  if (modifiers) {
3593
3697
  if (modifiers.trim) args = rawArgs.map((a) => isString(a) ? a.trim() : a);
3594
- if (modifiers.number) args = rawArgs.map(looseToNumber);
3698
+ if (modifiers.number) args = args.map(looseToNumber);
3595
3699
  }
3596
3700
  if (!!(process.env.NODE_ENV !== "production") || __VUE_PROD_DEVTOOLS__) devtoolsComponentEmit(instance, event, args);
3597
3701
  if (!!(process.env.NODE_ENV !== "production")) {
@@ -3775,10 +3879,12 @@ function filterSingleRoot(children, recurse = true) {
3775
3879
  for (let i = 0; i < children.length; i++) {
3776
3880
  const child = children[i];
3777
3881
  if (isVNode(child)) {
3778
- if (child.type !== Comment || child.children === "v-if") if (singleRoot) return;
3779
- else {
3780
- singleRoot = child;
3781
- if (!!(process.env.NODE_ENV !== "production") && recurse && singleRoot.patchFlag > 0 && singleRoot.patchFlag & 2048) return filterSingleRoot(singleRoot.children);
3882
+ if (child.type !== Comment || child.children === "v-if") {
3883
+ if (singleRoot) return;
3884
+ else {
3885
+ singleRoot = child;
3886
+ if (!!(process.env.NODE_ENV !== "production") && recurse && singleRoot.patchFlag > 0 && singleRoot.patchFlag & 2048) return filterSingleRoot(singleRoot.children);
3887
+ }
3782
3888
  }
3783
3889
  } else return;
3784
3890
  }
@@ -3899,16 +4005,17 @@ function updateProps(instance, rawProps, rawPrevProps, optimized) {
3899
4005
  let key = propsToUpdate[i];
3900
4006
  if (isEmitListener(instance.emitsOptions, key)) continue;
3901
4007
  const value = rawProps[key];
3902
- if (options) if (hasOwn(attrs, key)) {
3903
- if (value !== attrs[key]) {
3904
- attrs[key] = value;
3905
- hasAttrsChanged = true;
4008
+ if (options) {
4009
+ if (hasOwn(attrs, key)) {
4010
+ if (value !== attrs[key]) {
4011
+ attrs[key] = value;
4012
+ hasAttrsChanged = true;
4013
+ }
4014
+ } else {
4015
+ const camelizedKey = camelize$1(key);
4016
+ props[camelizedKey] = resolvePropValue(options, camelizedKey, value, instance, baseResolveDefault);
3906
4017
  }
3907
- } else {
3908
- const camelizedKey = camelize$1(key);
3909
- props[camelizedKey] = resolvePropValue(options, camelizedKey, value, instance, baseResolveDefault);
3910
- }
3911
- else if (value !== attrs[key]) {
4018
+ } else if (value !== attrs[key]) {
3912
4019
  attrs[key] = value;
3913
4020
  hasAttrsChanged = true;
3914
4021
  }
@@ -3917,9 +4024,11 @@ function updateProps(instance, rawProps, rawPrevProps, optimized) {
3917
4024
  } else {
3918
4025
  if (setFullProps(instance, rawProps, props, attrs)) hasAttrsChanged = true;
3919
4026
  let kebabKey;
3920
- for (const key in rawCurrentProps) if (!rawProps || !hasOwn(rawProps, key) && ((kebabKey = hyphenate(key)) === key || !hasOwn(rawProps, kebabKey))) if (options) {
3921
- if (rawPrevProps && (rawPrevProps[key] !== void 0 || rawPrevProps[kebabKey] !== void 0)) props[key] = resolvePropValue(options, key, void 0, instance, baseResolveDefault, true);
3922
- } else delete props[key];
4027
+ for (const key in rawCurrentProps) if (!rawProps || !hasOwn(rawProps, key) && ((kebabKey = hyphenate(key)) === key || !hasOwn(rawProps, kebabKey))) {
4028
+ if (options) {
4029
+ if (rawPrevProps && (rawPrevProps[key] !== void 0 || rawPrevProps[kebabKey] !== void 0)) props[key] = resolvePropValue(options, key, void 0, instance, baseResolveDefault, true);
4030
+ } else delete props[key];
4031
+ }
3923
4032
  if (attrs !== rawCurrentProps) {
3924
4033
  for (const key in attrs) if (!rawProps || !hasOwn(rawProps, key) && true) {
3925
4034
  delete attrs[key];
@@ -3938,9 +4047,10 @@ function setFullProps(instance, rawProps, props, attrs) {
3938
4047
  if (isReservedProp(key)) continue;
3939
4048
  const value = rawProps[key];
3940
4049
  let camelKey;
3941
- if (options && hasOwn(options, camelKey = camelize$1(key))) if (!needCastKeys || !needCastKeys.includes(camelKey)) props[camelKey] = value;
3942
- else (rawCastValues || (rawCastValues = {}))[camelKey] = value;
3943
- else if (!isEmitListener(instance.emitsOptions, key)) {
4050
+ if (options && hasOwn(options, camelKey = camelize$1(key))) {
4051
+ if (!needCastKeys || !needCastKeys.includes(camelKey)) props[camelKey] = value;
4052
+ else (rawCastValues || (rawCastValues = {}))[camelKey] = value;
4053
+ } else if (!isEmitListener(instance.emitsOptions, key)) {
3944
4054
  if (!(key in attrs) || value !== attrs[key]) {
3945
4055
  attrs[key] = value;
3946
4056
  hasAttrsChanged = true;
@@ -4103,7 +4213,7 @@ function validateProp(key, value, propOptions, resolvedProps, isAbsent) {
4103
4213
  }
4104
4214
  if (validator && !validator(value, !!(process.env.NODE_ENV !== "production") ? shallowReadonly$1(resolvedProps) : resolvedProps)) warn$1("Invalid prop: custom validator check failed for prop \"" + key + "\".");
4105
4215
  }
4106
- const isSimpleType = /* @__PURE__ */ makeMap("String,Number,Boolean,Function,Symbol,BigInt");
4216
+ const isSimpleType = /*@__PURE__*/ makeMap("String,Number,Boolean,Function,Symbol,BigInt");
4107
4217
  /**
4108
4218
  * dev only
4109
4219
  */
@@ -4216,12 +4326,13 @@ const updateSlots = (instance, children, optimized) => {
4216
4326
  let deletionComparisonTarget = EMPTY_OBJ;
4217
4327
  if (vnode.shapeFlag & 32) {
4218
4328
  const type = children._;
4219
- if (type) if (!!(process.env.NODE_ENV !== "production") && isHmrUpdating) {
4220
- assignSlots(slots, children, optimized);
4221
- trigger(instance, "set", "$slots");
4222
- } else if (optimized && type === 1) needDeletionCheck = false;
4223
- else assignSlots(slots, children, optimized);
4224
- else {
4329
+ if (type) {
4330
+ if (!!(process.env.NODE_ENV !== "production") && isHmrUpdating) {
4331
+ assignSlots(slots, children, optimized);
4332
+ trigger(instance, "set", "$slots");
4333
+ } else if (optimized && type === 1) needDeletionCheck = false;
4334
+ else assignSlots(slots, children, optimized);
4335
+ } else {
4225
4336
  needDeletionCheck = !children.$stable;
4226
4337
  normalizeObjectSlots(children, slots, instance);
4227
4338
  }
@@ -4239,7 +4350,7 @@ const updateSlots = (instance, children, optimized) => {
4239
4350
  let supported;
4240
4351
  let perf;
4241
4352
  let cachedNow = 0;
4242
- const p = /* @__PURE__ */ Promise.resolve();
4353
+ const p = /*@__PURE__*/ Promise.resolve();
4243
4354
  const getNow = () => cachedNow || (p.then(() => cachedNow = 0), cachedNow = isSupported() ? perf.now() : Date.now());
4244
4355
  /**
4245
4356
  * @internal
@@ -4366,7 +4477,7 @@ function baseCreateRenderer(options, createHydrationFns) {
4366
4477
  processFragment(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);
4367
4478
  break;
4368
4479
  case VaporSlot:
4369
- getVaporInterface(parentComponent, n2).slot(n1, n2, container, anchor, parentComponent, parentSuspense);
4480
+ getVaporInterface(parentComponent, n2).slot(n1, n2, container, anchor, parentComponent, parentSuspense, slotScopeIds);
4370
4481
  break;
4371
4482
  default: if (shapeFlag & 1) processElement(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);
4372
4483
  else if (shapeFlag & 6) processComponent(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);
@@ -4487,7 +4598,10 @@ function baseCreateRenderer(options, createHydrationFns) {
4487
4598
  for (let i = 0; i < inheritedScopeIds.length; i++) hostSetScopeId(el, inheritedScopeIds[i]);
4488
4599
  };
4489
4600
  const mountChildren = (children, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, start = 0) => {
4490
- 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);
4601
+ for (let i = start; i < children.length; i++) {
4602
+ const child = children[i] = optimized ? cloneIfMounted(children[i]) : normalizeVNode(children[i]);
4603
+ patch(null, child, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);
4604
+ }
4491
4605
  };
4492
4606
  const patchElement = (n1, n2, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => {
4493
4607
  const el = n2.el = n1.el;
@@ -4499,6 +4613,7 @@ function baseCreateRenderer(options, createHydrationFns) {
4499
4613
  let vnodeHook;
4500
4614
  parentComponent && toggleRecurse(parentComponent, false);
4501
4615
  if (vnodeHook = newProps.onVnodeBeforeUpdate) invokeVNodeHook(vnodeHook, parentComponent, n2, n1);
4616
+ if (n2.ibu) n2.ibu();
4502
4617
  if (dirs) invokeDirectiveHook(n2, n1, parentComponent, "beforeUpdate");
4503
4618
  parentComponent && toggleRecurse(parentComponent, true);
4504
4619
  if (!!(process.env.NODE_ENV !== "production") && isHmrUpdating || dynamicChildren && (!n1.dynamicChildren || n1.dynamicChildren.length !== dynamicChildren.length)) {
@@ -4532,8 +4647,9 @@ function baseCreateRenderer(options, createHydrationFns) {
4532
4647
  if (n1.children !== n2.children) hostSetElementText(el, n2.children);
4533
4648
  }
4534
4649
  } else if (!optimized && dynamicChildren == null) patchProps(el, oldProps, newProps, parentComponent, namespace);
4535
- if ((vnodeHook = newProps.onVnodeUpdated) || dirs) queuePostRenderEffect(() => {
4650
+ if ((vnodeHook = newProps.onVnodeUpdated) || dirs || n2.iu) queuePostRenderEffect(() => {
4536
4651
  vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, n2, n1);
4652
+ n2.iu && n2.iu();
4537
4653
  dirs && invokeDirectiveHook(n2, n1, parentComponent, "updated");
4538
4654
  }, void 0, parentSuspense);
4539
4655
  };
@@ -4541,7 +4657,8 @@ function baseCreateRenderer(options, createHydrationFns) {
4541
4657
  for (let i = 0; i < newChildren.length; i++) {
4542
4658
  const oldVNode = oldChildren[i];
4543
4659
  const newVNode = newChildren[i];
4544
- patch(oldVNode, newVNode, oldVNode.el && (oldVNode.type === Fragment || !isSameVNodeType(oldVNode, newVNode) || oldVNode.shapeFlag & 198) ? hostParentNode(oldVNode.el) : fallbackContainer, null, parentComponent, parentSuspense, namespace, slotScopeIds, true);
4660
+ const container = oldVNode.el && (oldVNode.type === Fragment || !isSameVNodeType(oldVNode, newVNode) || oldVNode.shapeFlag & 198) ? hostParentNode(oldVNode.el) : fallbackContainer;
4661
+ patch(oldVNode, newVNode, container, null, parentComponent, parentSuspense, namespace, slotScopeIds, true);
4545
4662
  }
4546
4663
  };
4547
4664
  const patchProps = (el, oldProps, newProps, parentComponent, namespace) => {
@@ -4580,41 +4697,46 @@ function baseCreateRenderer(options, createHydrationFns) {
4580
4697
  };
4581
4698
  const processComponent = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => {
4582
4699
  n2.slotScopeIds = slotScopeIds;
4583
- if (n2.type.__vapor) if (n1 == null) if (n2.shapeFlag & 512) getVaporInterface(parentComponent, n2).activate(n2, container, anchor, parentComponent, parentSuspense);
4584
- else {
4585
- const vnodeBeforeMountHook = !isAsyncWrapper(n2) && n2.props && n2.props.onVnodeBeforeMount;
4586
- getVaporInterface(parentComponent, n2).mount(n2, container, anchor, parentComponent, parentSuspense, () => {
4587
- if (n2.dirs) {
4588
- invokeDirectiveHook(n2, null, parentComponent, "created");
4589
- invokeDirectiveHook(n2, null, parentComponent, "beforeMount");
4700
+ if (n2.type.__vapor) {
4701
+ if (n1 == null) {
4702
+ if (n2.shapeFlag & 512) getVaporInterface(parentComponent, n2).activate(n2, container, anchor, parentComponent, parentSuspense);
4703
+ else {
4704
+ const vnodeBeforeMountHook = !isAsyncWrapper(n2) && n2.props && n2.props.onVnodeBeforeMount;
4705
+ getVaporInterface(parentComponent, n2).mount(n2, container, anchor, parentComponent, parentSuspense, () => {
4706
+ if (n2.dirs) {
4707
+ invokeDirectiveHook(n2, null, parentComponent, "created");
4708
+ invokeDirectiveHook(n2, null, parentComponent, "beforeMount");
4709
+ }
4710
+ }, () => {
4711
+ if (vnodeBeforeMountHook) invokeVNodeHook(vnodeBeforeMountHook, parentComponent, n2);
4712
+ });
4713
+ if (n2.dirs) queuePostRenderEffect(() => invokeDirectiveHook(n2, null, parentComponent, "mounted"), void 0, parentSuspense);
4714
+ const vnodeMountedHook = !isAsyncWrapper(n2) && n2.props && n2.props.onVnodeMounted;
4715
+ if (vnodeMountedHook) {
4716
+ const scopedVNode = n2;
4717
+ queuePostRenderEffect(() => invokeVNodeHook(vnodeMountedHook, parentComponent, scopedVNode), void 0, parentSuspense);
4718
+ }
4590
4719
  }
4591
- }, () => {
4592
- if (vnodeBeforeMountHook) invokeVNodeHook(vnodeBeforeMountHook, parentComponent, n2);
4593
- });
4594
- if (n2.dirs) queuePostRenderEffect(() => invokeDirectiveHook(n2, null, parentComponent, "mounted"), void 0, parentSuspense);
4595
- const vnodeMountedHook = !isAsyncWrapper(n2) && n2.props && n2.props.onVnodeMounted;
4596
- if (vnodeMountedHook) {
4597
- const scopedVNode = n2;
4598
- queuePostRenderEffect(() => invokeVNodeHook(vnodeMountedHook, parentComponent, scopedVNode), void 0, parentSuspense);
4720
+ } else {
4721
+ const shouldUpdate = shouldUpdateComponent(n1, n2, optimized);
4722
+ getVaporInterface(parentComponent, n2).update(n1, n2, shouldUpdate, () => {
4723
+ if (n2.dirs) invokeDirectiveHook(n2, n1, parentComponent, "beforeUpdate");
4724
+ }, () => {
4725
+ const vnodeBeforeUpdateHook = n2.props && n2.props.onVnodeBeforeUpdate;
4726
+ if (vnodeBeforeUpdateHook) invokeVNodeHook(vnodeBeforeUpdateHook, parentComponent, n2, n1);
4727
+ if (n2.ibu) n2.ibu();
4728
+ });
4729
+ const vnodeUpdatedHook = n2.props && n2.props.onVnodeUpdated;
4730
+ if (shouldUpdate && (vnodeUpdatedHook || n2.dirs || n2.iu)) queuePostRenderEffect(() => {
4731
+ n2.dirs && invokeDirectiveHook(n2, n1, parentComponent, "updated");
4732
+ vnodeUpdatedHook && invokeVNodeHook(vnodeUpdatedHook, parentComponent, n2, n1);
4733
+ n2.iu && n2.iu();
4734
+ }, void 0, parentSuspense);
4599
4735
  }
4600
- }
4601
- else {
4602
- const shouldUpdate = shouldUpdateComponent(n1, n2, optimized);
4603
- getVaporInterface(parentComponent, n2).update(n1, n2, shouldUpdate, () => {
4604
- if (n2.dirs) invokeDirectiveHook(n2, n1, parentComponent, "beforeUpdate");
4605
- }, () => {
4606
- const vnodeBeforeUpdateHook = n2.props && n2.props.onVnodeBeforeUpdate;
4607
- if (vnodeBeforeUpdateHook) invokeVNodeHook(vnodeBeforeUpdateHook, parentComponent, n2, n1);
4608
- });
4609
- const vnodeUpdatedHook = n2.props && n2.props.onVnodeUpdated;
4610
- if (shouldUpdate && (vnodeUpdatedHook || n2.dirs)) queuePostRenderEffect(() => {
4611
- n2.dirs && invokeDirectiveHook(n2, n1, parentComponent, "updated");
4612
- vnodeUpdatedHook && invokeVNodeHook(vnodeUpdatedHook, parentComponent, n2, n1);
4613
- }, void 0, parentSuspense);
4614
- }
4615
- else if (n1 == null) if (n2.shapeFlag & 512) parentComponent.ctx.activate(n2, container, anchor, namespace, optimized);
4616
- else mountComponent(n2, container, anchor, parentComponent, parentSuspense, namespace, optimized);
4617
- else updateComponent(n1, n2, optimized);
4736
+ } else if (n1 == null) {
4737
+ if (n2.shapeFlag & 512) parentComponent.ctx.activate(n2, container, anchor, namespace, optimized);
4738
+ else mountComponent(n2, container, anchor, parentComponent, parentSuspense, namespace, optimized);
4739
+ } else updateComponent(n1, n2, optimized);
4618
4740
  };
4619
4741
  const mountComponent = (initialVNode, container, anchor, parentComponent, parentSuspense, namespace, optimized) => {
4620
4742
  const instance = initialVNode.component = createComponentInstance(initialVNode, parentComponent, parentSuspense);
@@ -4659,16 +4781,17 @@ function baseCreateRenderer(options, createHydrationFns) {
4659
4781
  };
4660
4782
  const updateComponent = (n1, n2, optimized) => {
4661
4783
  const instance = n2.component = n1.component;
4662
- if (shouldUpdateComponent(n1, n2, optimized)) if (instance.asyncDep && !instance.asyncResolved) {
4663
- if (!!(process.env.NODE_ENV !== "production")) pushWarningContext(n2);
4664
- updateComponentPreRender(instance, n2, optimized);
4665
- if (!!(process.env.NODE_ENV !== "production")) popWarningContext();
4666
- return;
4784
+ if (shouldUpdateComponent(n1, n2, optimized)) {
4785
+ if (instance.asyncDep && !instance.asyncResolved) {
4786
+ if (!!(process.env.NODE_ENV !== "production")) pushWarningContext(n2);
4787
+ updateComponentPreRender(instance, n2, optimized);
4788
+ if (!!(process.env.NODE_ENV !== "production")) popWarningContext();
4789
+ return;
4790
+ } else {
4791
+ instance.next = n2;
4792
+ instance.effect.run();
4793
+ }
4667
4794
  } else {
4668
- instance.next = n2;
4669
- instance.effect.run();
4670
- }
4671
- else {
4672
4795
  n2.el = n1.el;
4673
4796
  instance.vnode = n2;
4674
4797
  }
@@ -4768,6 +4891,7 @@ function baseCreateRenderer(options, createHydrationFns) {
4768
4891
  } else next = vnode;
4769
4892
  if (bu) invokeArrayFns(bu);
4770
4893
  if (vnodeHook = next.props && next.props.onVnodeBeforeUpdate) invokeVNodeHook(vnodeHook, parent, next, vnode);
4894
+ if (next.ibu) next.ibu();
4771
4895
  toggleRecurse(instance, true);
4772
4896
  if (!!(process.env.NODE_ENV !== "production")) startMeasure(instance, `render`);
4773
4897
  const nextTree = renderComponentRoot(instance);
@@ -4780,7 +4904,10 @@ function baseCreateRenderer(options, createHydrationFns) {
4780
4904
  next.el = nextTree.el;
4781
4905
  if (originNext === null) updateHOCHostEl(instance, nextTree.el);
4782
4906
  if (u) queuePostRenderEffect(u, void 0, parentSuspense);
4783
- if (vnodeHook = next.props && next.props.onVnodeUpdated) queuePostRenderEffect(() => invokeVNodeHook(vnodeHook, parent, next, vnode), void 0, parentSuspense);
4907
+ if ((vnodeHook = next.props && next.props.onVnodeUpdated) || next.iu) queuePostRenderEffect(() => {
4908
+ vnodeHook && invokeVNodeHook(vnodeHook, parent, next, vnode);
4909
+ next.iu && next.iu();
4910
+ }, void 0, parentSuspense);
4784
4911
  if (!!(process.env.NODE_ENV !== "production") || __VUE_PROD_DEVTOOLS__) devtoolsComponentUpdated(instance);
4785
4912
  if (!!(process.env.NODE_ENV !== "production")) popWarningContext();
4786
4913
  }
@@ -4820,9 +4947,10 @@ function baseCreateRenderer(options, createHydrationFns) {
4820
4947
  if (shapeFlag & 8) {
4821
4948
  if (prevShapeFlag & 16) unmountChildren(c1, parentComponent, parentSuspense);
4822
4949
  if (c2 !== c1) hostSetElementText(container, c2);
4823
- } else if (prevShapeFlag & 16) if (shapeFlag & 16) patchKeyedChildren(c1, c2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);
4824
- else unmountChildren(c1, parentComponent, parentSuspense, true);
4825
- else {
4950
+ } else if (prevShapeFlag & 16) {
4951
+ if (shapeFlag & 16) patchKeyedChildren(c1, c2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);
4952
+ else unmountChildren(c1, parentComponent, parentSuspense, true);
4953
+ } else {
4826
4954
  if (prevShapeFlag & 8) hostSetElementText(container, "");
4827
4955
  if (shapeFlag & 16) mountChildren(c2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);
4828
4956
  }
@@ -4921,8 +5049,10 @@ function baseCreateRenderer(options, createHydrationFns) {
4921
5049
  const anchorVNode = c2[nextIndex + 1];
4922
5050
  const anchor = nextIndex + 1 < l2 ? anchorVNode.el || resolveAsyncComponentPlaceholder(anchorVNode) : parentAnchor;
4923
5051
  if (newIndexToOldIndexMap[i] === 0) patch(null, nextChild, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);
4924
- else if (moved) if (j < 0 || i !== increasingNewIndexSequence[j]) move(nextChild, container, anchor, 2, parentComponent);
4925
- else j--;
5052
+ else if (moved) {
5053
+ if (j < 0 || i !== increasingNewIndexSequence[j]) move(nextChild, container, anchor, 2, parentComponent);
5054
+ else j--;
5055
+ }
4926
5056
  }
4927
5057
  }
4928
5058
  };
@@ -4954,26 +5084,27 @@ function baseCreateRenderer(options, createHydrationFns) {
4954
5084
  moveStaticNode(vnode, container, anchor);
4955
5085
  return;
4956
5086
  }
4957
- if (moveType !== 2 && shapeFlag & 1 && transition) if (moveType === 0) performTransitionEnter(el, transition, () => hostInsert(el, container, anchor), parentSuspense, true);
4958
- else {
4959
- const { leave, delayLeave, afterLeave } = transition;
4960
- const remove = () => {
4961
- if (vnode.ctx.isUnmounted) hostRemove(el);
4962
- else hostInsert(el, container, anchor);
4963
- };
4964
- const performLeave = () => {
4965
- const wasLeaving = el._isLeaving || !!el[leaveCbKey];
4966
- if (el._isLeaving) el[leaveCbKey](true);
4967
- if (transition.persisted && !wasLeaving) remove();
4968
- else leave(el, () => {
4969
- remove();
4970
- afterLeave && afterLeave();
4971
- });
4972
- };
4973
- if (delayLeave) delayLeave(el, remove, performLeave);
4974
- else performLeave();
4975
- }
4976
- else hostInsert(el, container, anchor);
5087
+ if (moveType !== 2 && shapeFlag & 1 && transition) {
5088
+ if (moveType === 0) performTransitionEnter(el, transition, () => hostInsert(el, container, anchor), parentSuspense, true);
5089
+ else {
5090
+ const { leave, delayLeave, afterLeave } = transition;
5091
+ const remove = () => {
5092
+ if (vnode.ctx.isUnmounted) hostRemove(el);
5093
+ else hostInsert(el, container, anchor);
5094
+ };
5095
+ const performLeave = () => {
5096
+ const wasLeaving = el._isLeaving || !!el[leaveCbKey];
5097
+ if (el._isLeaving) el[leaveCbKey](true);
5098
+ if (transition.persisted && !wasLeaving) remove();
5099
+ else leave(el, () => {
5100
+ remove();
5101
+ afterLeave && afterLeave();
5102
+ });
5103
+ };
5104
+ if (delayLeave) delayLeave(el, remove, performLeave);
5105
+ else performLeave();
5106
+ }
5107
+ } else hostInsert(el, container, anchor);
4977
5108
  };
4978
5109
  const unmount = (vnode, parentComponent, parentSuspense, doRemove = false, optimized = false) => {
4979
5110
  const { type, props, ref, children, dynamicChildren, shapeFlag, patchFlag, dirs, cacheIndex, memo } = vnode;
@@ -4993,16 +5124,17 @@ function baseCreateRenderer(options, createHydrationFns) {
4993
5124
  const shouldInvokeVnodeHook = !isAsyncWrapper(vnode);
4994
5125
  let vnodeHook;
4995
5126
  if (shouldInvokeVnodeHook && (vnodeHook = props && props.onVnodeBeforeUnmount)) invokeVNodeHook(vnodeHook, parentComponent, vnode);
4996
- if (shapeFlag & 6) if (isVaporComponent(type)) {
4997
- if (dirs) invokeDirectiveHook(vnode, null, parentComponent, "beforeUnmount");
4998
- getVaporInterface(parentComponent, vnode).unmount(vnode, doRemove, parentSuspense);
4999
- if (shouldInvokeVnodeHook && (vnodeHook = props && props.onVnodeUnmounted) || dirs) queuePostRenderEffect(() => {
5000
- dirs && invokeDirectiveHook(vnode, null, parentComponent, "unmounted");
5001
- vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, vnode);
5002
- }, void 0, parentSuspense);
5003
- return;
5004
- } else unmountComponent(vnode.component, parentSuspense, doRemove);
5005
- else {
5127
+ if (shapeFlag & 6) {
5128
+ if (isVaporComponent(type)) {
5129
+ if (dirs) invokeDirectiveHook(vnode, null, parentComponent, "beforeUnmount");
5130
+ getVaporInterface(parentComponent, vnode).unmount(vnode, doRemove, parentSuspense);
5131
+ if (shouldInvokeVnodeHook && (vnodeHook = props && props.onVnodeUnmounted) || dirs) queuePostRenderEffect(() => {
5132
+ dirs && invokeDirectiveHook(vnode, null, parentComponent, "unmounted");
5133
+ vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, vnode);
5134
+ }, void 0, parentSuspense);
5135
+ return;
5136
+ } else unmountComponent(vnode.component, parentSuspense, doRemove);
5137
+ } else {
5006
5138
  if (shapeFlag & 128) {
5007
5139
  vnode.suspense.unmount(parentSuspense, doRemove);
5008
5140
  return;
@@ -5134,12 +5266,14 @@ function resolveChildrenNamespace({ type, props }, currentNamespace) {
5134
5266
  return currentNamespace === "svg" && type === "foreignObject" || currentNamespace === "mathml" && type === "annotation-xml" && props && props.encoding && props.encoding.includes("html") ? void 0 : currentNamespace;
5135
5267
  }
5136
5268
  function toggleRecurse({ effect, job, vapor }, allowed) {
5137
- if (!vapor) if (allowed) {
5138
- effect.flags |= 128;
5139
- job.flags |= 2;
5140
- } else {
5141
- effect.flags &= -129;
5142
- job.flags &= -3;
5269
+ if (!vapor) {
5270
+ if (allowed) {
5271
+ effect.flags |= 128;
5272
+ job.flags |= 2;
5273
+ } else {
5274
+ effect.flags &= -129;
5275
+ job.flags &= -3;
5276
+ }
5143
5277
  }
5144
5278
  }
5145
5279
  function needTransition(parentSuspense, transition) {
@@ -5179,8 +5313,10 @@ function traverseStaticChildren(n1, n2, shallow = false) {
5179
5313
  }
5180
5314
  function locateNonHydratedAsyncRoot(instance) {
5181
5315
  const subComponent = instance.subTree && instance.subTree.component;
5182
- if (subComponent) if (subComponent.asyncDep && !subComponent.asyncResolved) return subComponent;
5183
- else return locateNonHydratedAsyncRoot(subComponent);
5316
+ if (subComponent) {
5317
+ if (subComponent.asyncDep && !subComponent.asyncResolved) return subComponent;
5318
+ else return locateNonHydratedAsyncRoot(subComponent);
5319
+ }
5184
5320
  }
5185
5321
  function invalidateMount(hooks) {
5186
5322
  if (hooks) for (let i = 0; i < hooks.length; i++) hooks[i].flags |= 4;
@@ -5224,7 +5360,7 @@ function isVaporComponent(type) {
5224
5360
  /**
5225
5361
  * shared between vdom and vapor
5226
5362
  */
5227
- function getInheritedScopeIds(vnode, parentComponent) {
5363
+ function getInheritedScopeIds(vnode, parentComponent, includeVaporRootIds = true) {
5228
5364
  const inheritedScopeIds = [];
5229
5365
  let currentParent = parentComponent;
5230
5366
  let currentVNode = vnode;
@@ -5240,6 +5376,8 @@ function getInheritedScopeIds(vnode, parentComponent) {
5240
5376
  currentParent = currentParent.parent;
5241
5377
  } else break;
5242
5378
  }
5379
+ const vaporScopeIds = includeVaporRootIds && currentVNode.vaporScopeIds;
5380
+ if (vaporScopeIds) inheritedScopeIds.push(...vaporScopeIds);
5243
5381
  return inheritedScopeIds;
5244
5382
  }
5245
5383
  function resolveAsyncComponentPlaceholder(anchorVnode) {
@@ -5299,7 +5437,7 @@ function patchSuspense(n1, n2, container, anchor, parentComponent, namespace, sl
5299
5437
  patch(pendingBranch, newBranch, suspense.hiddenContainer, null, parentComponent, suspense, namespace, slotScopeIds, optimized);
5300
5438
  if (suspense.deps <= 0) suspense.resolve();
5301
5439
  else if (isInFallback) {
5302
- if (!isHydrating) {
5440
+ if (!isHydrating && !suspense.isFallbackMountPending) {
5303
5441
  patch(activeBranch, newFallback, container, anchor, parentComponent, null, namespace, slotScopeIds, optimized);
5304
5442
  setActiveBranch(suspense, newFallback);
5305
5443
  }
@@ -5320,7 +5458,7 @@ function patchSuspense(n1, n2, container, anchor, parentComponent, namespace, sl
5320
5458
  if (isInFallback) {
5321
5459
  patch(null, newBranch, suspense.hiddenContainer, null, parentComponent, suspense, namespace, slotScopeIds, optimized);
5322
5460
  if (suspense.deps <= 0) suspense.resolve();
5323
- else {
5461
+ else if (!suspense.isFallbackMountPending) {
5324
5462
  patch(activeBranch, newFallback, container, anchor, parentComponent, null, namespace, slotScopeIds, optimized);
5325
5463
  setActiveBranch(suspense, newFallback);
5326
5464
  }
@@ -5448,8 +5586,9 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
5448
5586
  const mountFallback = () => {
5449
5587
  suspense.isFallbackMountPending = false;
5450
5588
  if (!suspense.isInFallback) return;
5451
- patch(null, fallbackVNode, container, anchor, parentComponent, null, namespace, slotScopeIds, optimized);
5452
- setActiveBranch(suspense, fallbackVNode);
5589
+ const latestFallback = suspense.vnode.ssFallback;
5590
+ patch(null, latestFallback, container, anchor, parentComponent, null, namespace, slotScopeIds, optimized);
5591
+ setActiveBranch(suspense, latestFallback);
5453
5592
  };
5454
5593
  const delayEnter = fallbackVNode.transition && fallbackVNode.transition.mode === "out-in";
5455
5594
  if (delayEnter) {
@@ -5525,9 +5664,10 @@ function normalizeSuspenseSlot(s) {
5525
5664
  return s;
5526
5665
  }
5527
5666
  function queueEffectWithSuspense(fn, id, suspense) {
5528
- if (suspense && suspense.pendingBranch) if (isArray(fn)) suspense.effects.push(...fn);
5529
- else suspense.effects.push(fn);
5530
- else queuePostFlushCb(fn, id);
5667
+ if (suspense && suspense.pendingBranch) {
5668
+ if (isArray(fn)) suspense.effects.push(...fn);
5669
+ else suspense.effects.push(fn);
5670
+ } else queuePostFlushCb(fn, id);
5531
5671
  }
5532
5672
  function setActiveBranch(suspense, branch) {
5533
5673
  suspense.activeBranch = branch;
@@ -5721,8 +5861,10 @@ function _createVNode(type, props = null, children = null, patchFlag = 0, dynami
5721
5861
  if (isVNode(type)) {
5722
5862
  const cloned = cloneVNode(type, props, true);
5723
5863
  if (children) normalizeChildren(cloned, children);
5724
- if (isBlockTreeEnabled > 0 && !isBlockNode && currentBlock) if (cloned.shapeFlag & 6) currentBlock[currentBlock.indexOf(type)] = cloned;
5725
- else currentBlock.push(cloned);
5864
+ if (isBlockTreeEnabled > 0 && !isBlockNode && currentBlock) {
5865
+ if (cloned.shapeFlag & 6) currentBlock[currentBlock.indexOf(type)] = cloned;
5866
+ else currentBlock.push(cloned);
5867
+ }
5726
5868
  cloned.patchFlag = -2;
5727
5869
  return cloned;
5728
5870
  }
@@ -5782,7 +5924,9 @@ function cloneVNode(vnode, extraProps, mergeRef = false, cloneTransition = false
5782
5924
  ce: vnode.ce,
5783
5925
  vi: vnode.vi,
5784
5926
  vs: cloneVaporSlotMeta(vnode),
5785
- vb: vnode.vb
5927
+ vb: vnode.vb,
5928
+ ibu: vnode.ibu,
5929
+ iu: vnode.iu
5786
5930
  };
5787
5931
  if (transition && cloneTransition) setTransitionHooks(cloned, transition.clone(cloned));
5788
5932
  return cloned;
@@ -5845,25 +5989,28 @@ function normalizeChildren(vnode, children) {
5845
5989
  const { shapeFlag } = vnode;
5846
5990
  if (children == null) children = null;
5847
5991
  else if (isArray(children)) type = 16;
5848
- else if (typeof children === "object") if (shapeFlag & 65) {
5849
- const slot = children.default;
5850
- if (slot) {
5851
- slot._c && (slot._d = false);
5852
- normalizeChildren(vnode, slot());
5853
- slot._c && (slot._d = true);
5854
- }
5855
- return;
5856
- } else {
5857
- type = 32;
5858
- const slotFlag = children._;
5859
- if (!slotFlag && !isInternalObject(children)) children._ctx = currentRenderingInstance;
5860
- else if (slotFlag === 3 && currentRenderingInstance) if (currentRenderingInstance.slots._ === 1) children._ = 1;
5861
- else {
5862
- children._ = 2;
5863
- vnode.patchFlag |= 1024;
5992
+ else if (typeof children === "object") {
5993
+ if (shapeFlag & 65) {
5994
+ const slot = children.default;
5995
+ if (slot) {
5996
+ slot._c && (slot._d = false);
5997
+ normalizeChildren(vnode, slot());
5998
+ slot._c && (slot._d = true);
5999
+ }
6000
+ return;
6001
+ } else {
6002
+ type = 32;
6003
+ const slotFlag = children._;
6004
+ if (!slotFlag && !isInternalObject(children)) children._ctx = currentRenderingInstance;
6005
+ else if (slotFlag === 3 && currentRenderingInstance) {
6006
+ if (currentRenderingInstance.slots._ === 1) children._ = 1;
6007
+ else {
6008
+ children._ = 2;
6009
+ vnode.patchFlag |= 1024;
6010
+ }
6011
+ }
5864
6012
  }
5865
- }
5866
- else if (isFunction(children)) {
6013
+ } else if (isFunction(children)) {
5867
6014
  if (shapeFlag & 65) {
5868
6015
  normalizeChildren(vnode, { default: children });
5869
6016
  return;
@@ -5981,7 +6128,7 @@ const useInstanceOption = (key, silent = false) => {
5981
6128
  };
5982
6129
  //#endregion
5983
6130
  //#region packages/runtime-core/src/component.ts
5984
- const emptyAppContext = /* @__PURE__ */ createAppContext();
6131
+ const emptyAppContext = /*@__PURE__*/ createAppContext();
5985
6132
  let uid = 0;
5986
6133
  /**
5987
6134
  * @internal for vapor
@@ -6135,9 +6282,10 @@ function setupStatefulComponent(instance, isSSR) {
6135
6282
  } else finishComponentSetup(instance, isSSR);
6136
6283
  }
6137
6284
  function handleSetupResult(instance, setupResult, isSSR) {
6138
- if (isFunction(setupResult)) if (instance.type.__ssrInlineRender) instance.ssrRender = setupResult;
6139
- else instance.render = setupResult;
6140
- else if (isObject(setupResult)) {
6285
+ if (isFunction(setupResult)) {
6286
+ if (instance.type.__ssrInlineRender) instance.ssrRender = setupResult;
6287
+ else instance.render = setupResult;
6288
+ } else if (isObject(setupResult)) {
6141
6289
  if (!!(process.env.NODE_ENV !== "production") && isVNode(setupResult)) warn$1("setup() should not return VNodes directly - return a render function instead.");
6142
6290
  if (!!(process.env.NODE_ENV !== "production") || __VUE_PROD_DEVTOOLS__) instance.devtoolsRawSetupState = setupResult;
6143
6291
  instance.setupState = proxyRefs$1(setupResult);
@@ -6188,10 +6336,12 @@ function finishComponentSetup(instance, isSSR, skipOptions) {
6188
6336
  restoreCurrentInstance(prevInstance);
6189
6337
  }
6190
6338
  }
6191
- if (!!(process.env.NODE_ENV !== "production") && !Component.render && instance.render === NOOP && !isSSR) if (!compile && Component.template)
6339
+ if (!!(process.env.NODE_ENV !== "production") && !Component.render && instance.render === NOOP && !isSSR) {
6340
+ if (!compile && Component.template)
6192
6341
  /* v8 ignore start */
6193
- warn$1("Component provided template option but runtime compilation is not supported in this build of Vue. Configure your bundler to alias \"vue\" to \"vue/dist/vue.esm-bundler.js\".");
6194
- else warn$1(`Component is missing template or render function: `, Component);
6342
+ warn$1("Component provided template option but runtime compilation is not supported in this build of Vue. Configure your bundler to alias \"vue\" to \"vue/dist/vue.esm-bundler.js\".");
6343
+ else warn$1(`Component is missing template or render function: `, Component);
6344
+ }
6195
6345
  }
6196
6346
  const attrsProxyHandlers = !!(process.env.NODE_ENV !== "production") ? {
6197
6347
  get(target, key) {
@@ -6309,11 +6459,12 @@ function h(type, propsOrChildren, children) {
6309
6459
  try {
6310
6460
  setBlockTracking(-1);
6311
6461
  const l = arguments.length;
6312
- if (l === 2) if (isObject(propsOrChildren) && !isArray(propsOrChildren)) {
6313
- if (isVNode(propsOrChildren)) return createVNode(type, null, [propsOrChildren]);
6314
- return createVNode(type, propsOrChildren);
6315
- } else return createVNode(type, null, propsOrChildren);
6316
- else {
6462
+ if (l === 2) {
6463
+ if (isObject(propsOrChildren) && !isArray(propsOrChildren)) {
6464
+ if (isVNode(propsOrChildren)) return createVNode(type, null, [propsOrChildren]);
6465
+ return createVNode(type, propsOrChildren);
6466
+ } else return createVNode(type, null, propsOrChildren);
6467
+ } else {
6317
6468
  if (l > 3) children = Array.prototype.slice.call(arguments, 2);
6318
6469
  else if (l === 3 && isVNode(children)) children = [children];
6319
6470
  return createVNode(type, propsOrChildren, children);
@@ -6505,7 +6656,7 @@ function isMemoSame(cached, memo) {
6505
6656
  }
6506
6657
  //#endregion
6507
6658
  //#region packages/runtime-core/src/index.ts
6508
- const version = "3.6.0-rc.4";
6659
+ const version = "3.6.0-rc.6";
6509
6660
  const warn = !!(process.env.NODE_ENV !== "production") ? warn$1 : NOOP;
6510
6661
  /**
6511
6662
  * Runtime error messages. Only exposed in dev or esm builds.
@@ -6540,4 +6691,4 @@ const resolveFilter = null;
6540
6691
  const compatUtils = null;
6541
6692
  const DeprecationTypes = null;
6542
6693
  //#endregion
6543
- export { BaseTransition, BaseTransitionPropsValidators, Comment, DeprecationTypes, EffectScope, ErrorCodes, ErrorTypeStrings, Fragment, KeepAlive, MismatchTypes, MoveType, NULL_DYNAMIC_COMPONENT, ReactiveEffect, SchedulerJobFlags, Static, Suspense, Teleport, Text, TrackOpTypes, TriggerOpTypes, VaporSlot, activate, assertNumber, baseEmit, baseNormalizePropsOptions, baseResolveTransitionHooks, callWithAsyncErrorHandling, callWithErrorHandling, camelize, capitalize, checkTransitionMode, cloneVNode, compatUtils, computed, createAppAPI, createAsyncComponentContext, createBlock, createCanSetSetupRefChecker, createCommentVNode, createElementBlock, createBaseVNode as createElementVNode, createHydrationRenderer, createInternalObject, createPropsRestProxy, createRenderer, createSlots, createStaticVNode, createTextVNode, createVNode, currentInstance, customRef, deactivate, defineAsyncComponent, defineComponent, defineEmits, defineExpose, defineModel, defineOptions, defineProps, defineSlots, devtools, devtoolsComponentAdded, effect, effectScope, endMeasure, ensureValidVNode, ensureVaporSlotFallback, expose, flushOnAppMount, getAttributeMismatch, getComponentName, getCurrentInstance, getCurrentScope, getCurrentWatcher, getFunctionalFallthrough, getInheritedScopeIds, getTransitionRawChildren, guardReactiveProps, h, handleError, hasInjectionContext, hydrateOnIdle, hydrateOnInteraction, hydrateOnMediaQuery, hydrateOnVisible, initCustomFormatter, initFeatureFlags, inject, invalidateMount, invokeDirectiveHook, isAsyncWrapper, isEmitListener, isFunctionalFallthroughKey, isHydrating, isHydratingEnabled, isKeepAlive, isMapEqual, isMemoSame, isMismatchAllowed, isProxy, isReactive, isReadonly, isRef, isRuntimeOnly, isSetEqual, isShallow, isTeleportDeferred, isTeleportDisabled, isTemplateNode, isTemplateRefKey, isVNode, isValidHtmlOrSvgAttribute, knownTemplateRefs, leaveCbKey, logMismatchError, markAsyncBoundary, markRaw, matches, mergeDefaults, mergeModels, mergeProps, nextTick, nextUid, normalizeClass, normalizeProps, normalizeRef, normalizeStyle, normalizeVNode, onActivated, onBeforeMount, onBeforeUnmount, onBeforeUpdate, onDeactivated, onErrorCaptured, onMounted, onRenderTracked, onRenderTriggered, onScopeDispose, onServerPrefetch, onUnmounted, onUpdated, onWatcherCleanup, openBlock, performAsyncHydrate, performTransitionEnter, performTransitionLeave, popScopeId, popWarningContext, prepareTransitionLeave, prepareTransitionSwitch, provide, proxyRefs, pushScopeId, pushWarningContext, queueJob, queuePostFlushCb, queuePostRenderEffect, reactive, readonly, ref, registerHMR, registerRuntimeCompiler, renderList, renderSlot, resetShapeFlag, resolveComponent, resolveDirective, resolveDynamicComponent, resolveFilter, resolvePropValue, resolveTarget as resolveTeleportTarget, resolveTransitionChild, resolveTransitionHooks, restoreCurrentInstance, setBlockTracking, setCurrentInstance, setCurrentRenderingInstance, setDevtoolsHook, setIsHydratingEnabled, setRef, setTransitionHooks, shallowReactive, shallowReadonly, shallowRef, shouldUpdateComponent, simpleSetCurrentInstance, ssrContextKey, ssrUtils, startMeasure, stop, toClassSet, toDisplayString, toHandlerKey, toHandlers, toRaw, toRef, toRefs, toStyleMap, toValue, transformVNodeArgs, triggerRef, unref, unregisterHMR, useAsyncComponentState, useAttrs, useId, useInstanceOption, useModel, useSSRContext, useSlots, useTemplateRef, useTransitionState, validateComponentName, validateProps, version, warn, warnExtraneousAttributes, warnPropMismatch, watch, watchEffect, watchPostEffect, watchSyncEffect, withAsyncContext, withCtx, withDefaults, withDirectives, withMemo, withScopeId };
6694
+ export { BaseTransition, BaseTransitionPropsValidators, Comment, DeprecationTypes, EffectScope, ErrorCodes, ErrorTypeStrings, Fragment, KeepAlive, MismatchTypes, MoveType, NULL_DYNAMIC_COMPONENT, ReactiveEffect, SchedulerJobFlags, Static, Suspense, Teleport, Text, TrackOpTypes, TriggerOpTypes, VaporSlot, activate, assertNumber, baseEmit, baseNormalizePropsOptions, baseResolveTransitionHooks, callWithAsyncErrorHandling, callWithErrorHandling, camelize, capitalize, checkTransitionMode, cloneVNode, compatUtils, computed, createAppAPI, createAsyncComponentContext, createBlock, createCanSetSetupRefChecker, createCommentVNode, createElementBlock, createBaseVNode as createElementVNode, createHydrationRenderer, createInternalObject, createPropsRestProxy, createRenderer, createSlots, createStaticVNode, createTextVNode, createVNode, currentInstance, customRef, deactivate, defineAsyncComponent, defineComponent, defineEmits, defineExpose, defineModel, defineOptions, defineProps, defineSlots, devtools, devtoolsComponentAdded, effect, effectScope, endMeasure, ensureValidVNode, ensureVaporSlotFallback, expose, filterModelListeners, flushOnAppMount, getAttributeMismatch, getComponentName, getContainerType, getCurrentInstance, getCurrentScope, getCurrentWatcher, getFunctionalFallthrough, getInheritedScopeIds, getTransitionRawChildren, guardReactiveProps, h, handleError, hasInjectionContext, hydrateOnIdle, hydrateOnInteraction, hydrateOnMediaQuery, hydrateOnVisible, initCustomFormatter, initFeatureFlags, inject, invalidateMount, invokeDirectiveHook, isAsyncWrapper, isEmitListener, isFunctionalFallthroughKey, isHydrating, isHydratingEnabled, isKeepAlive, isMapEqual, isMemoSame, isMismatchAllowed, isProxy, isReactive, isReadonly, isRef, isRuntimeOnly, isSetEqual, isShallow, isTeleportDeferred, isTeleportDisabled, isTemplateNode, isTemplateRefKey, isVNode, isValidHtmlOrSvgAttribute, knownTemplateRefs, leaveCbKey, logMismatchError, markAsyncBoundary, markRaw, matches, mergeDefaults, mergeModels, mergeProps, nextTick, nextUid, normalizeClass, normalizeProps, normalizeRef, normalizeStyle, normalizeVNode, onActivated, onBeforeMount, onBeforeUnmount, onBeforeUpdate, onDeactivated, onErrorCaptured, onMounted, onRenderTracked, onRenderTriggered, onScopeDispose, onServerPrefetch, onUnmounted, onUpdated, onWatcherCleanup, openBlock, performAsyncHydrate, performTransitionEnter, performTransitionLeave, popScopeId, popWarningContext, prepareTransitionLeave, prepareTransitionSwitch, provide, proxyRefs, pushScopeId, pushWarningContext, queueJob, queuePostFlushCb, queuePostRenderEffect, rawVaporSlotKey, reactive, readonly, ref, registerHMR, registerRuntimeCompiler, renderList, renderSlot, resetShapeFlag, resolveComponent, resolveDirective, resolveDynamicComponent, resolveFilter, resolvePropValue, resolveTarget as resolveTeleportTarget, resolveTransitionChild, resolveTransitionHooks, restoreCurrentInstance, setBlockTracking, setCurrentInstance, setCurrentRenderingInstance, setDevtoolsHook, setIsHydratingEnabled, setRef, setTransitionHooks, shallowReactive, shallowReadonly, shallowRef, shouldUpdateComponent, simpleSetCurrentInstance, ssrContextKey, ssrUtils, startMeasure, stop, toClassSet, toDisplayString, toHandlerKey, toHandlers, toRaw, toRef, toRefs, toStyleMap, toValue, transformVNodeArgs, triggerRef, unref, unregisterHMR, useAsyncComponentState, useAttrs, useId, useInstanceOption, useModel, useSSRContext, useSlots, useTemplateRef, useTransitionState, validateComponentName, validateProps, vdomSlotFallbackKey, version, warn, warnExtraneousAttributes, warnPropMismatch, watch, watchEffect, watchPostEffect, watchSyncEffect, withAsyncContext, withCtx, withDefaults, withDirectives, withMemo, withScopeId };