@vue/compat 3.5.12 → 3.5.14

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.5.12
2
+ * @vue/compat v3.5.14
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
@@ -212,10 +212,9 @@ function parseStringStyle(cssText) {
212
212
  return ret;
213
213
  }
214
214
  function stringifyStyle(styles) {
215
+ if (!styles) return "";
216
+ if (isString(styles)) return styles;
215
217
  let ret = "";
216
- if (!styles || isString(styles)) {
217
- return ret;
218
- }
219
218
  for (const key in styles) {
220
219
  const value = styles[key];
221
220
  if (isString(value) || typeof value === "number") {
@@ -397,6 +396,10 @@ class EffectScope {
397
396
  * @internal
398
397
  */
399
398
  this._active = true;
399
+ /**
400
+ * @internal track `on` calls, allow `on` call multiple times
401
+ */
402
+ this._on = 0;
400
403
  /**
401
404
  * @internal
402
405
  */
@@ -467,28 +470,38 @@ class EffectScope {
467
470
  * @internal
468
471
  */
469
472
  on() {
470
- activeEffectScope = this;
473
+ if (++this._on === 1) {
474
+ this.prevScope = activeEffectScope;
475
+ activeEffectScope = this;
476
+ }
471
477
  }
472
478
  /**
473
479
  * This should only be called on non-detached scopes
474
480
  * @internal
475
481
  */
476
482
  off() {
477
- activeEffectScope = this.parent;
483
+ if (this._on > 0 && --this._on === 0) {
484
+ activeEffectScope = this.prevScope;
485
+ this.prevScope = void 0;
486
+ }
478
487
  }
479
488
  stop(fromParent) {
480
489
  if (this._active) {
490
+ this._active = false;
481
491
  let i, l;
482
492
  for (i = 0, l = this.effects.length; i < l; i++) {
483
493
  this.effects[i].stop();
484
494
  }
495
+ this.effects.length = 0;
485
496
  for (i = 0, l = this.cleanups.length; i < l; i++) {
486
497
  this.cleanups[i]();
487
498
  }
499
+ this.cleanups.length = 0;
488
500
  if (this.scopes) {
489
501
  for (i = 0, l = this.scopes.length; i < l; i++) {
490
502
  this.scopes[i].stop(true);
491
503
  }
504
+ this.scopes.length = 0;
492
505
  }
493
506
  if (!this.detached && this.parent && !fromParent) {
494
507
  const last = this.parent.scopes.pop();
@@ -498,7 +511,6 @@ class EffectScope {
498
511
  }
499
512
  }
500
513
  this.parent = void 0;
501
- this._active = false;
502
514
  }
503
515
  }
504
516
  }
@@ -553,7 +565,7 @@ class ReactiveEffect {
553
565
  }
554
566
  resume() {
555
567
  if (this.flags & 64) {
556
- this.flags &= ~64;
568
+ this.flags &= -65;
557
569
  if (pausedQueueEffects.has(this)) {
558
570
  pausedQueueEffects.delete(this);
559
571
  this.trigger();
@@ -593,7 +605,7 @@ class ReactiveEffect {
593
605
  cleanupDeps(this);
594
606
  activeSub = prevEffect;
595
607
  shouldTrack = prevShouldTrack;
596
- this.flags &= ~2;
608
+ this.flags &= -3;
597
609
  }
598
610
  }
599
611
  stop() {
@@ -604,7 +616,7 @@ class ReactiveEffect {
604
616
  this.deps = this.depsTail = void 0;
605
617
  cleanupEffect(this);
606
618
  this.onStop && this.onStop();
607
- this.flags &= ~1;
619
+ this.flags &= -2;
608
620
  }
609
621
  }
610
622
  trigger() {
@@ -654,7 +666,7 @@ function endBatch() {
654
666
  while (e) {
655
667
  const next = e.next;
656
668
  e.next = void 0;
657
- e.flags &= ~8;
669
+ e.flags &= -9;
658
670
  e = next;
659
671
  }
660
672
  }
@@ -665,7 +677,7 @@ function endBatch() {
665
677
  while (e) {
666
678
  const next = e.next;
667
679
  e.next = void 0;
668
- e.flags &= ~8;
680
+ e.flags &= -9;
669
681
  if (e.flags & 1) {
670
682
  try {
671
683
  ;
@@ -721,17 +733,16 @@ function refreshComputed(computed) {
721
733
  if (computed.flags & 4 && !(computed.flags & 16)) {
722
734
  return;
723
735
  }
724
- computed.flags &= ~16;
736
+ computed.flags &= -17;
725
737
  if (computed.globalVersion === globalVersion) {
726
738
  return;
727
739
  }
728
740
  computed.globalVersion = globalVersion;
729
- const dep = computed.dep;
730
- computed.flags |= 2;
731
- if (dep.version > 0 && !computed.isSSR && computed.deps && !isDirty(computed)) {
732
- computed.flags &= ~2;
741
+ if (!computed.isSSR && computed.flags & 128 && (!computed.deps && !computed._dirty || !isDirty(computed))) {
733
742
  return;
734
743
  }
744
+ computed.flags |= 2;
745
+ const dep = computed.dep;
735
746
  const prevSub = activeSub;
736
747
  const prevShouldTrack = shouldTrack;
737
748
  activeSub = computed;
@@ -740,6 +751,7 @@ function refreshComputed(computed) {
740
751
  prepareDeps(computed);
741
752
  const value = computed.fn(computed._value);
742
753
  if (dep.version === 0 || hasChanged(value, computed._value)) {
754
+ computed.flags |= 128;
743
755
  computed._value = value;
744
756
  dep.version++;
745
757
  }
@@ -750,7 +762,7 @@ function refreshComputed(computed) {
750
762
  activeSub = prevSub;
751
763
  shouldTrack = prevShouldTrack;
752
764
  cleanupDeps(computed);
753
- computed.flags &= ~2;
765
+ computed.flags &= -3;
754
766
  }
755
767
  }
756
768
  function removeSub(link, soft = false) {
@@ -769,7 +781,7 @@ function removeSub(link, soft = false) {
769
781
  if (dep.subs === link) {
770
782
  dep.subs = prevSub;
771
783
  if (!prevSub && dep.computed) {
772
- dep.computed.flags &= ~4;
784
+ dep.computed.flags &= -5;
773
785
  for (let l = dep.computed.deps; l; l = l.nextDep) {
774
786
  removeSub(l, true);
775
787
  }
@@ -1264,6 +1276,7 @@ class BaseReactiveHandler {
1264
1276
  this._isShallow = _isShallow;
1265
1277
  }
1266
1278
  get(target, key, receiver) {
1279
+ if (key === "__v_skip") return target["__v_skip"];
1267
1280
  const isReadonly2 = this._isReadonly, isShallow2 = this._isShallow;
1268
1281
  if (key === "__v_isReactive") {
1269
1282
  return !isReadonly2;
@@ -1701,14 +1714,14 @@ function createReactiveObject(target, isReadonly2, baseHandlers, collectionHandl
1701
1714
  if (target["__v_raw"] && !(isReadonly2 && target["__v_isReactive"])) {
1702
1715
  return target;
1703
1716
  }
1704
- const existingProxy = proxyMap.get(target);
1705
- if (existingProxy) {
1706
- return existingProxy;
1707
- }
1708
1717
  const targetType = getTargetType(target);
1709
1718
  if (targetType === 0 /* INVALID */) {
1710
1719
  return target;
1711
1720
  }
1721
+ const existingProxy = proxyMap.get(target);
1722
+ if (existingProxy) {
1723
+ return existingProxy;
1724
+ }
1712
1725
  const proxy = new Proxy(
1713
1726
  target,
1714
1727
  targetType === 2 /* COLLECTION */ ? collectionHandlers : baseHandlers
@@ -2100,7 +2113,7 @@ function watch$1(source, cb, options = EMPTY_OBJ) {
2100
2113
  const scope = getCurrentScope();
2101
2114
  const watchHandle = () => {
2102
2115
  effect.stop();
2103
- if (scope) {
2116
+ if (scope && scope.active) {
2104
2117
  remove(scope.effects, effect);
2105
2118
  }
2106
2119
  };
@@ -2552,11 +2565,11 @@ function flushPreFlushCbs(instance, seen, i = flushIndex + 1) {
2552
2565
  queue.splice(i, 1);
2553
2566
  i--;
2554
2567
  if (cb.flags & 4) {
2555
- cb.flags &= ~1;
2568
+ cb.flags &= -2;
2556
2569
  }
2557
2570
  cb();
2558
2571
  if (!(cb.flags & 4)) {
2559
- cb.flags &= ~1;
2572
+ cb.flags &= -2;
2560
2573
  }
2561
2574
  }
2562
2575
  }
@@ -2581,10 +2594,10 @@ function flushPostFlushCbs(seen) {
2581
2594
  continue;
2582
2595
  }
2583
2596
  if (cb.flags & 4) {
2584
- cb.flags &= ~1;
2597
+ cb.flags &= -2;
2585
2598
  }
2586
2599
  if (!(cb.flags & 8)) cb();
2587
- cb.flags &= ~1;
2600
+ cb.flags &= -2;
2588
2601
  }
2589
2602
  activePostFlushCbs = null;
2590
2603
  postFlushIndex = 0;
@@ -2620,7 +2633,7 @@ function flushJobs(seen) {
2620
2633
  for (; flushIndex < queue.length; flushIndex++) {
2621
2634
  const job = queue[flushIndex];
2622
2635
  if (job) {
2623
- job.flags &= ~1;
2636
+ job.flags &= -2;
2624
2637
  }
2625
2638
  }
2626
2639
  flushIndex = -1;
@@ -3588,11 +3601,32 @@ const TeleportImpl = {
3588
3601
  updateCssVars(n2, true);
3589
3602
  }
3590
3603
  if (isTeleportDeferred(n2.props)) {
3591
- queuePostRenderEffect(mountToTarget, parentSuspense);
3604
+ queuePostRenderEffect(() => {
3605
+ mountToTarget();
3606
+ n2.el.__isMounted = true;
3607
+ }, parentSuspense);
3592
3608
  } else {
3593
3609
  mountToTarget();
3594
3610
  }
3595
3611
  } else {
3612
+ if (isTeleportDeferred(n2.props) && !n1.el.__isMounted) {
3613
+ queuePostRenderEffect(() => {
3614
+ TeleportImpl.process(
3615
+ n1,
3616
+ n2,
3617
+ container,
3618
+ anchor,
3619
+ parentComponent,
3620
+ parentSuspense,
3621
+ namespace,
3622
+ slotScopeIds,
3623
+ optimized,
3624
+ internals
3625
+ );
3626
+ delete n1.el.__isMounted;
3627
+ }, parentSuspense);
3628
+ return;
3629
+ }
3596
3630
  n2.el = n1.el;
3597
3631
  n2.targetStart = n1.targetStart;
3598
3632
  const mainAnchor = n2.anchor = n1.anchor;
@@ -3616,7 +3650,7 @@ const TeleportImpl = {
3616
3650
  namespace,
3617
3651
  slotScopeIds
3618
3652
  );
3619
- traverseStaticChildren(n1, n2, true);
3653
+ traverseStaticChildren(n1, n2, false);
3620
3654
  } else if (!optimized) {
3621
3655
  patchChildren(
3622
3656
  n1,
@@ -3898,10 +3932,9 @@ const BaseTransitionImpl = {
3898
3932
  if (innerChild.type !== Comment) {
3899
3933
  setTransitionHooks(innerChild, enterHooks);
3900
3934
  }
3901
- const oldChild = instance.subTree;
3902
- const oldInnerChild = oldChild && getInnerChild$1(oldChild);
3935
+ let oldInnerChild = instance.subTree && getInnerChild$1(instance.subTree);
3903
3936
  if (oldInnerChild && oldInnerChild.type !== Comment && !isSameVNodeType(innerChild, oldInnerChild) && recursiveGetSubtree(instance).type !== Comment) {
3904
- const leavingHooks = resolveTransitionHooks(
3937
+ let leavingHooks = resolveTransitionHooks(
3905
3938
  oldInnerChild,
3906
3939
  rawProps,
3907
3940
  state,
@@ -3916,6 +3949,7 @@ const BaseTransitionImpl = {
3916
3949
  instance.update();
3917
3950
  }
3918
3951
  delete leavingHooks.afterLeave;
3952
+ oldInnerChild = void 0;
3919
3953
  };
3920
3954
  return emptyPlaceholder(child);
3921
3955
  } else if (mode === "in-out" && innerChild.type !== Comment) {
@@ -3929,10 +3963,19 @@ const BaseTransitionImpl = {
3929
3963
  earlyRemove();
3930
3964
  el[leaveCbKey] = void 0;
3931
3965
  delete enterHooks.delayedLeave;
3966
+ oldInnerChild = void 0;
3967
+ };
3968
+ enterHooks.delayedLeave = () => {
3969
+ delayedLeave();
3970
+ delete enterHooks.delayedLeave;
3971
+ oldInnerChild = void 0;
3932
3972
  };
3933
- enterHooks.delayedLeave = delayedLeave;
3934
3973
  };
3974
+ } else {
3975
+ oldInnerChild = void 0;
3935
3976
  }
3977
+ } else if (oldInnerChild) {
3978
+ oldInnerChild = void 0;
3936
3979
  }
3937
3980
  return child;
3938
3981
  };
@@ -4240,6 +4283,9 @@ function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
4240
4283
  return;
4241
4284
  }
4242
4285
  if (isAsyncWrapper(vnode) && !isUnmount) {
4286
+ if (vnode.shapeFlag & 512 && vnode.type.__asyncResolved && vnode.component.subTree.component) {
4287
+ setRef(rawRef, oldRawRef, parentSuspense, vnode.component.subTree);
4288
+ }
4243
4289
  return;
4244
4290
  }
4245
4291
  const refValue = vnode.shapeFlag & 4 ? getComponentPublicInstance(vnode.component) : vnode.el;
@@ -4504,7 +4550,7 @@ function createHydrationFunctions(rendererInternals) {
4504
4550
  getContainerType(container),
4505
4551
  optimized
4506
4552
  );
4507
- if (isAsyncWrapper(vnode)) {
4553
+ if (isAsyncWrapper(vnode) && !vnode.type.__asyncResolved) {
4508
4554
  let subTree;
4509
4555
  if (isFragmentStart) {
4510
4556
  subTree = createVNode(Fragment);
@@ -4773,6 +4819,10 @@ Server rendered element contains fewer child nodes than client vdom.`
4773
4819
  getContainerType(container),
4774
4820
  slotScopeIds
4775
4821
  );
4822
+ if (parentComponent) {
4823
+ parentComponent.vnode.el = vnode.el;
4824
+ updateHOCHostEl(parentComponent, vnode.el);
4825
+ }
4776
4826
  return next;
4777
4827
  };
4778
4828
  const locateClosingAnchor = (node, open = "[", close = "]") => {
@@ -5288,6 +5338,9 @@ const KeepAliveImpl = {
5288
5338
  {
5289
5339
  devtoolsComponentAdded(instance2);
5290
5340
  }
5341
+ {
5342
+ instance2.__keepAliveStorageContainer = storageContainer;
5343
+ }
5291
5344
  };
5292
5345
  function unmount(vnode) {
5293
5346
  resetShapeFlag(vnode);
@@ -5375,7 +5428,7 @@ const KeepAliveImpl = {
5375
5428
  );
5376
5429
  const { include, exclude, max } = props;
5377
5430
  if (include && (!name || !matches(include, name)) || exclude && name && matches(exclude, name)) {
5378
- vnode.shapeFlag &= ~256;
5431
+ vnode.shapeFlag &= -257;
5379
5432
  current = vnode;
5380
5433
  return rawVNode;
5381
5434
  }
@@ -5466,8 +5519,8 @@ function injectToKeepAliveRoot(hook, type, target, keepAliveRoot) {
5466
5519
  }, target);
5467
5520
  }
5468
5521
  function resetShapeFlag(vnode) {
5469
- vnode.shapeFlag &= ~256;
5470
- vnode.shapeFlag &= ~512;
5522
+ vnode.shapeFlag &= -257;
5523
+ vnode.shapeFlag &= -513;
5471
5524
  }
5472
5525
  function getInnerChild(vnode) {
5473
5526
  return vnode.shapeFlag & 128 ? vnode.ssContent : vnode;
@@ -5869,14 +5922,16 @@ function renderList(source, renderItem, cache, index) {
5869
5922
  if (sourceIsArray || isString(source)) {
5870
5923
  const sourceIsReactiveArray = sourceIsArray && isReactive(source);
5871
5924
  let needsWrap = false;
5925
+ let isReadonlySource = false;
5872
5926
  if (sourceIsReactiveArray) {
5873
5927
  needsWrap = !isShallow(source);
5928
+ isReadonlySource = isReadonly(source);
5874
5929
  source = shallowReadArray(source);
5875
5930
  }
5876
5931
  ret = new Array(source.length);
5877
5932
  for (let i = 0, l = source.length; i < l; i++) {
5878
5933
  ret[i] = renderItem(
5879
- needsWrap ? toReactive(source[i]) : source[i],
5934
+ needsWrap ? isReadonlySource ? toReadonly(toReactive(source[i])) : toReactive(source[i]) : source[i],
5880
5935
  i,
5881
5936
  void 0,
5882
5937
  cached && cached[i]
@@ -7128,7 +7183,7 @@ function createCompatVue$1(createApp, createSingletonApp) {
7128
7183
  return vm;
7129
7184
  }
7130
7185
  }
7131
- Vue.version = `2.6.14-compat:${"3.5.12"}`;
7186
+ Vue.version = `2.6.14-compat:${"3.5.14"}`;
7132
7187
  Vue.config = singletonApp.config;
7133
7188
  Vue.use = (plugin, ...options) => {
7134
7189
  if (plugin && isFunction(plugin.install)) {
@@ -7622,11 +7677,9 @@ function createAppAPI(render, hydrate) {
7622
7677
  }
7623
7678
  {
7624
7679
  context.reload = () => {
7625
- render(
7626
- cloneVNode(vnode),
7627
- rootContainer,
7628
- namespace
7629
- );
7680
+ const cloned = cloneVNode(vnode);
7681
+ cloned.el = null;
7682
+ render(cloned, rootContainer, namespace);
7630
7683
  };
7631
7684
  }
7632
7685
  if (isHydrate && hydrate) {
@@ -8224,7 +8277,7 @@ const normalizeSlot = (key, rawSlot, ctx) => {
8224
8277
  return rawSlot;
8225
8278
  }
8226
8279
  const normalized = withCtx((...args) => {
8227
- if (currentInstance && (!ctx || ctx.root === currentInstance.root)) {
8280
+ if (currentInstance && !(ctx === null && currentRenderingInstance) && !(ctx && ctx.root !== currentInstance.root)) {
8228
8281
  warn$1(
8229
8282
  `Slot "${key}" invoked outside of the render function: this will not track dependencies used in the slot. Invoke the slot function inside the render function instead.`
8230
8283
  );
@@ -8263,7 +8316,7 @@ const normalizeVNodeSlots = (instance, children) => {
8263
8316
  };
8264
8317
  const assignSlots = (slots, children, optimized) => {
8265
8318
  for (const key in children) {
8266
- if (optimized || key !== "_") {
8319
+ if (optimized || !isInternalKey(key)) {
8267
8320
  slots[key] = children[key];
8268
8321
  }
8269
8322
  }
@@ -8950,8 +9003,8 @@ function baseCreateRenderer(options, createHydrationFns) {
8950
9003
  endMeasure(instance, `init`);
8951
9004
  }
8952
9005
  }
9006
+ if (isHmrUpdating) initialVNode.el = null;
8953
9007
  if (instance.asyncDep) {
8954
- if (isHmrUpdating) initialVNode.el = null;
8955
9008
  parentSuspense && parentSuspense.registerDep(instance, setupRenderEffect, optimized);
8956
9009
  if (!initialVNode.el) {
8957
9010
  const placeholder = instance.subTree = createVNode(Comment);
@@ -9537,7 +9590,13 @@ function baseCreateRenderer(options, createHydrationFns) {
9537
9590
  queuePostRenderEffect(() => transition.enter(el), parentSuspense);
9538
9591
  } else {
9539
9592
  const { leave, delayLeave, afterLeave } = transition;
9540
- const remove2 = () => hostInsert(el, container, anchor);
9593
+ const remove2 = () => {
9594
+ if (vnode.ctx.isUnmounted) {
9595
+ hostRemove(el);
9596
+ } else {
9597
+ hostInsert(el, container, anchor);
9598
+ }
9599
+ };
9541
9600
  const performLeave = () => {
9542
9601
  leave(el, () => {
9543
9602
  remove2();
@@ -9570,7 +9629,9 @@ function baseCreateRenderer(options, createHydrationFns) {
9570
9629
  optimized = false;
9571
9630
  }
9572
9631
  if (ref != null) {
9632
+ pauseTracking();
9573
9633
  setRef(ref, null, parentSuspense, vnode, true);
9634
+ resetTracking();
9574
9635
  }
9575
9636
  if (cacheIndex != null) {
9576
9637
  parentComponent.renderCache[cacheIndex] = void 0;
@@ -9682,12 +9743,27 @@ function baseCreateRenderer(options, createHydrationFns) {
9682
9743
  if (instance.type.__hmrId) {
9683
9744
  unregisterHMR(instance);
9684
9745
  }
9685
- const { bum, scope, job, subTree, um, m, a } = instance;
9746
+ const {
9747
+ bum,
9748
+ scope,
9749
+ job,
9750
+ subTree,
9751
+ um,
9752
+ m,
9753
+ a,
9754
+ parent,
9755
+ slots: { __: slotCacheKeys }
9756
+ } = instance;
9686
9757
  invalidateMount(m);
9687
9758
  invalidateMount(a);
9688
9759
  if (bum) {
9689
9760
  invokeArrayFns(bum);
9690
9761
  }
9762
+ if (parent && isArray(slotCacheKeys)) {
9763
+ slotCacheKeys.forEach((v) => {
9764
+ parent.renderCache[v] = void 0;
9765
+ });
9766
+ }
9691
9767
  if (isCompatEnabled$1("INSTANCE_EVENT_HOOKS", instance)) {
9692
9768
  instance.emit("hook:beforeDestroy");
9693
9769
  }
@@ -9792,8 +9868,8 @@ function toggleRecurse({ effect, job }, allowed) {
9792
9868
  effect.flags |= 32;
9793
9869
  job.flags |= 4;
9794
9870
  } else {
9795
- effect.flags &= ~32;
9796
- job.flags &= ~4;
9871
+ effect.flags &= -33;
9872
+ job.flags &= -5;
9797
9873
  }
9798
9874
  }
9799
9875
  function needTransition(parentSuspense, transition) {
@@ -9820,6 +9896,9 @@ function traverseStaticChildren(n1, n2, shallow = false) {
9820
9896
  if (c2.type === Comment && !c2.el) {
9821
9897
  c2.el = c1.el;
9822
9898
  }
9899
+ {
9900
+ c2.el && (c2.el.__vnode = c2);
9901
+ }
9823
9902
  }
9824
9903
  }
9825
9904
  }
@@ -10343,7 +10422,7 @@ function renderComponentRoot(instance) {
10343
10422
  }
10344
10423
  if (extraAttrs.length) {
10345
10424
  warn$1(
10346
- `Extraneous non-props attributes (${extraAttrs.join(", ")}) were passed to component but could not be automatically inherited because component renders fragment or text root nodes.`
10425
+ `Extraneous non-props attributes (${extraAttrs.join(", ")}) were passed to component but could not be automatically inherited because component renders fragment or text or teleport root nodes.`
10347
10426
  );
10348
10427
  }
10349
10428
  if (eventAttrs.length) {
@@ -11204,9 +11283,9 @@ function closeBlock() {
11204
11283
  currentBlock = blockStack[blockStack.length - 1] || null;
11205
11284
  }
11206
11285
  let isBlockTreeEnabled = 1;
11207
- function setBlockTracking(value) {
11286
+ function setBlockTracking(value, inVOnce = false) {
11208
11287
  isBlockTreeEnabled += value;
11209
- if (value < 0 && currentBlock) {
11288
+ if (value < 0 && currentBlock && inVOnce) {
11210
11289
  currentBlock.hasOnce = true;
11211
11290
  }
11212
11291
  }
@@ -11250,8 +11329,8 @@ function isSameVNodeType(n1, n2) {
11250
11329
  if (n2.shapeFlag & 6 && n1.component) {
11251
11330
  const dirtyInstances = hmrDirtyComponents.get(n2.type);
11252
11331
  if (dirtyInstances && dirtyInstances.has(n1.component)) {
11253
- n1.shapeFlag &= ~256;
11254
- n2.shapeFlag &= ~512;
11332
+ n1.shapeFlag &= -257;
11333
+ n2.shapeFlag &= -513;
11255
11334
  return false;
11256
11335
  }
11257
11336
  }
@@ -11722,7 +11801,7 @@ function setupComponent(instance, isSSR = false, optimized = false) {
11722
11801
  const { props, children } = instance.vnode;
11723
11802
  const isStateful = isStatefulComponent(instance);
11724
11803
  initProps(instance, props, isStateful, isSSR);
11725
- initSlots(instance, children, optimized);
11804
+ initSlots(instance, children, optimized || isSSR);
11726
11805
  const setupResult = isStateful ? setupStatefulComponent(instance, isSSR) : void 0;
11727
11806
  isSSR && setInSSRSetupState(false);
11728
11807
  return setupResult;
@@ -12065,13 +12144,15 @@ function initCustomFormatter() {
12065
12144
  if (obj.__isVue) {
12066
12145
  return ["div", vueStyle, `VueInstance`];
12067
12146
  } else if (isRef(obj)) {
12147
+ pauseTracking();
12148
+ const value = obj.value;
12149
+ resetTracking();
12068
12150
  return [
12069
12151
  "div",
12070
12152
  {},
12071
12153
  ["span", vueStyle, genRefFlag(obj)],
12072
12154
  "<",
12073
- // avoid debugger accessing value affecting behavior
12074
- formatValue("_value" in obj ? obj._value : obj),
12155
+ formatValue(value),
12075
12156
  `>`
12076
12157
  ];
12077
12158
  } else if (isReactive(obj)) {
@@ -12252,7 +12333,7 @@ function isMemoSame(cached, memo) {
12252
12333
  return true;
12253
12334
  }
12254
12335
 
12255
- const version = "3.5.12";
12336
+ const version = "3.5.14";
12256
12337
  const warn = warn$1 ;
12257
12338
  const ErrorTypeStrings = ErrorTypeStrings$1 ;
12258
12339
  const devtools = devtools$1 ;
@@ -12462,7 +12543,8 @@ function resolveTransitionProps(rawProps) {
12462
12543
  onAppear = onEnter,
12463
12544
  onAppearCancelled = onEnterCancelled
12464
12545
  } = baseProps;
12465
- const finishEnter = (el, isAppear, done) => {
12546
+ const finishEnter = (el, isAppear, done, isCancelled) => {
12547
+ el._enterCancelled = isCancelled;
12466
12548
  removeTransitionClass(el, isAppear ? appearToClass : enterToClass);
12467
12549
  removeTransitionClass(el, isAppear ? appearActiveClass : enterActiveClass);
12468
12550
  done && done();
@@ -12520,8 +12602,13 @@ function resolveTransitionProps(rawProps) {
12520
12602
  if (legacyClassEnabled && legacyLeaveFromClass) {
12521
12603
  addTransitionClass(el, legacyLeaveFromClass);
12522
12604
  }
12523
- addTransitionClass(el, leaveActiveClass);
12524
- forceReflow();
12605
+ if (!el._enterCancelled) {
12606
+ forceReflow();
12607
+ addTransitionClass(el, leaveActiveClass);
12608
+ } else {
12609
+ addTransitionClass(el, leaveActiveClass);
12610
+ forceReflow();
12611
+ }
12525
12612
  nextFrame(() => {
12526
12613
  if (!el._isLeaving) {
12527
12614
  return;
@@ -12538,11 +12625,11 @@ function resolveTransitionProps(rawProps) {
12538
12625
  callHook(onLeave, [el, resolve]);
12539
12626
  },
12540
12627
  onEnterCancelled(el) {
12541
- finishEnter(el, false);
12628
+ finishEnter(el, false, void 0, true);
12542
12629
  callHook(onEnterCancelled, [el]);
12543
12630
  },
12544
12631
  onAppearCancelled(el) {
12545
- finishEnter(el, true);
12632
+ finishEnter(el, true, void 0, true);
12546
12633
  callHook(onAppearCancelled, [el]);
12547
12634
  },
12548
12635
  onLeaveCancelled(el) {
@@ -12762,10 +12849,11 @@ function useCssVars(getter) {
12762
12849
  }
12763
12850
  updateTeleports(vars);
12764
12851
  };
12765
- onBeforeMount(() => {
12766
- watchPostEffect(setVars);
12852
+ onBeforeUpdate(() => {
12853
+ queuePostFlushCb(setVars);
12767
12854
  });
12768
12855
  onMounted(() => {
12856
+ watch(setVars, NOOP, { flush: "post" });
12769
12857
  const ob = new MutationObserver(setVars);
12770
12858
  ob.observe(instance.subTree.el.parentNode, { childList: true });
12771
12859
  onUnmounted(() => ob.disconnect());
@@ -13151,7 +13239,7 @@ function shouldSetAsProp(el, key, value, isSVG) {
13151
13239
  }
13152
13240
  return false;
13153
13241
  }
13154
- if (key === "spellcheck" || key === "draggable" || key === "translate") {
13242
+ if (key === "spellcheck" || key === "draggable" || key === "translate" || key === "autocorrect") {
13155
13243
  return false;
13156
13244
  }
13157
13245
  if (key === "form") {
@@ -13416,6 +13504,8 @@ class VueElement extends BaseClass {
13416
13504
  this._update();
13417
13505
  }
13418
13506
  if (shouldReflect) {
13507
+ const ob = this._ob;
13508
+ ob && ob.disconnect();
13419
13509
  if (val === true) {
13420
13510
  this.setAttribute(hyphenate(key), "");
13421
13511
  } else if (typeof val === "string" || typeof val === "number") {
@@ -13423,6 +13513,7 @@ class VueElement extends BaseClass {
13423
13513
  } else if (!val) {
13424
13514
  this.removeAttribute(hyphenate(key));
13425
13515
  }
13516
+ ob && ob.observe(this, { attributes: true });
13426
13517
  }
13427
13518
  }
13428
13519
  }
@@ -13640,6 +13731,7 @@ const TransitionGroupImpl = /* @__PURE__ */ decorate({
13640
13731
  instance.vnode.el,
13641
13732
  moveClass
13642
13733
  )) {
13734
+ prevChildren = [];
13643
13735
  return;
13644
13736
  }
13645
13737
  prevChildren.forEach(callPendingCbs);
@@ -13663,6 +13755,7 @@ const TransitionGroupImpl = /* @__PURE__ */ decorate({
13663
13755
  };
13664
13756
  el.addEventListener("transitionend", cb);
13665
13757
  });
13758
+ prevChildren = [];
13666
13759
  });
13667
13760
  return () => {
13668
13761
  const rawProps = toRaw(props);
@@ -14698,12 +14791,13 @@ function createConditionalExpression(test, consequent, alternate, newline = true
14698
14791
  loc: locStub
14699
14792
  };
14700
14793
  }
14701
- function createCacheExpression(index, value, needPauseTracking = false) {
14794
+ function createCacheExpression(index, value, needPauseTracking = false, inVOnce = false) {
14702
14795
  return {
14703
14796
  type: 20,
14704
14797
  index,
14705
14798
  value,
14706
14799
  needPauseTracking,
14800
+ inVOnce,
14707
14801
  needArraySpread: false,
14708
14802
  loc: locStub
14709
14803
  };
@@ -16159,7 +16253,7 @@ const tokenizer = new Tokenizer(stack, {
16159
16253
  "COMPILER_V_BIND_SYNC",
16160
16254
  currentOptions,
16161
16255
  currentProp.loc,
16162
- currentProp.rawName
16256
+ currentProp.arg.loc.source
16163
16257
  )) {
16164
16258
  currentProp.name = "model";
16165
16259
  currentProp.modifiers.splice(syncIndex, 1);
@@ -16735,6 +16829,7 @@ function walk(node, parent, context, doNotHoistNode = false, inFor = false) {
16735
16829
  }
16736
16830
  }
16737
16831
  let cachedAsArray = false;
16832
+ const slotCacheKeys = [];
16738
16833
  if (toCache.length === children.length && node.type === 1) {
16739
16834
  if (node.tagType === 0 && node.codegenNode && node.codegenNode.type === 13 && isArray(node.codegenNode.children)) {
16740
16835
  node.codegenNode.children = getCacheExpression(
@@ -16744,6 +16839,7 @@ function walk(node, parent, context, doNotHoistNode = false, inFor = false) {
16744
16839
  } else if (node.tagType === 1 && node.codegenNode && node.codegenNode.type === 13 && node.codegenNode.children && !isArray(node.codegenNode.children) && node.codegenNode.children.type === 15) {
16745
16840
  const slot = getSlotNode(node.codegenNode, "default");
16746
16841
  if (slot) {
16842
+ slotCacheKeys.push(context.cached.length);
16747
16843
  slot.returns = getCacheExpression(
16748
16844
  createArrayExpression(slot.returns)
16749
16845
  );
@@ -16753,6 +16849,7 @@ function walk(node, parent, context, doNotHoistNode = false, inFor = false) {
16753
16849
  const slotName = findDir(node, "slot", true);
16754
16850
  const slot = slotName && slotName.arg && getSlotNode(parent.codegenNode, slotName.arg);
16755
16851
  if (slot) {
16852
+ slotCacheKeys.push(context.cached.length);
16756
16853
  slot.returns = getCacheExpression(
16757
16854
  createArrayExpression(slot.returns)
16758
16855
  );
@@ -16762,9 +16859,18 @@ function walk(node, parent, context, doNotHoistNode = false, inFor = false) {
16762
16859
  }
16763
16860
  if (!cachedAsArray) {
16764
16861
  for (const child of toCache) {
16862
+ slotCacheKeys.push(context.cached.length);
16765
16863
  child.codegenNode = context.cache(child.codegenNode);
16766
16864
  }
16767
16865
  }
16866
+ if (slotCacheKeys.length && node.type === 1 && node.tagType === 1 && node.codegenNode && node.codegenNode.type === 13 && node.codegenNode.children && !isArray(node.codegenNode.children) && node.codegenNode.children.type === 15) {
16867
+ node.codegenNode.children.properties.push(
16868
+ createObjectProperty(
16869
+ `__`,
16870
+ createSimpleExpression(JSON.stringify(slotCacheKeys), false)
16871
+ )
16872
+ );
16873
+ }
16768
16874
  function getCacheExpression(value) {
16769
16875
  const exp = context.cache(value);
16770
16876
  if (inFor && context.hmr) {
@@ -17087,11 +17193,12 @@ function createTransformContext(root, {
17087
17193
  identifier.hoisted = exp;
17088
17194
  return identifier;
17089
17195
  },
17090
- cache(exp, isVNode = false) {
17196
+ cache(exp, isVNode = false, inVOnce = false) {
17091
17197
  const cacheExp = createCacheExpression(
17092
17198
  context.cached.length,
17093
17199
  exp,
17094
- isVNode
17200
+ isVNode,
17201
+ inVOnce
17095
17202
  );
17096
17203
  context.cached.push(cacheExp);
17097
17204
  return cacheExp;
@@ -17804,7 +17911,9 @@ function genCacheExpression(node, context) {
17804
17911
  push(`_cache[${node.index}] || (`);
17805
17912
  if (needPauseTracking) {
17806
17913
  indent();
17807
- push(`${helper(SET_BLOCK_TRACKING)}(-1),`);
17914
+ push(`${helper(SET_BLOCK_TRACKING)}(-1`);
17915
+ if (node.inVOnce) push(`, true`);
17916
+ push(`),`);
17808
17917
  newline();
17809
17918
  push(`(`);
17810
17919
  }
@@ -17861,12 +17970,14 @@ const transformExpression = (node, context) => {
17861
17970
  context
17862
17971
  );
17863
17972
  } else if (node.type === 1) {
17973
+ const memo = findDir(node, "memo");
17864
17974
  for (let i = 0; i < node.props.length; i++) {
17865
17975
  const dir = node.props[i];
17866
17976
  if (dir.type === 7 && dir.name !== "for") {
17867
17977
  const exp = dir.exp;
17868
17978
  const arg = dir.arg;
17869
- if (exp && exp.type === 4 && !(dir.name === "on" && arg)) {
17979
+ if (exp && exp.type === 4 && !(dir.name === "on" && arg) && // key has been processed in transformFor(vMemo + vFor)
17980
+ !(memo && arg && arg.type === 4 && arg.content === "key")) {
17870
17981
  dir.exp = processExpression(
17871
17982
  exp,
17872
17983
  context,
@@ -18194,10 +18305,11 @@ const transformFor = createStructuralDirectiveTransform(
18194
18305
  const isTemplate = isTemplateNode(node);
18195
18306
  const memo = findDir(node, "memo");
18196
18307
  const keyProp = findProp(node, `key`, false, true);
18197
- if (keyProp && keyProp.type === 7 && !keyProp.exp) {
18308
+ const isDirKey = keyProp && keyProp.type === 7;
18309
+ if (isDirKey && !keyProp.exp) {
18198
18310
  transformBindShorthand(keyProp);
18199
18311
  }
18200
- const keyExp = keyProp && (keyProp.type === 6 ? keyProp.value ? createSimpleExpression(keyProp.value.content, true) : void 0 : keyProp.exp);
18312
+ let keyExp = keyProp && (keyProp.type === 6 ? keyProp.value ? createSimpleExpression(keyProp.value.content, true) : void 0 : keyProp.exp);
18201
18313
  const keyProperty = keyProp && keyExp ? createObjectProperty(`key`, keyExp) : null;
18202
18314
  const isStableFragment = forNode.source.type === 4 && forNode.source.constType > 0;
18203
18315
  const fragmentFlag = isStableFragment ? 64 : keyProp ? 128 : 256;
@@ -19436,8 +19548,8 @@ const transformOnce = (node, context) => {
19436
19548
  if (cur.codegenNode) {
19437
19549
  cur.codegenNode = context.cache(
19438
19550
  cur.codegenNode,
19551
+ true,
19439
19552
  true
19440
- /* isVNode */
19441
19553
  );
19442
19554
  }
19443
19555
  };
@@ -19459,8 +19571,7 @@ const transformModel$1 = (dir, node, context) => {
19459
19571
  context.onError(createCompilerError(44, exp.loc));
19460
19572
  return createTransformProps();
19461
19573
  }
19462
- const maybeRef = false;
19463
- if (!expString.trim() || !isMemberExpression(exp) && !maybeRef) {
19574
+ if (!expString.trim() || !isMemberExpression(exp) && true) {
19464
19575
  context.onError(
19465
19576
  createCompilerError(42, exp.loc)
19466
19577
  );