@vue/compat 3.5.13 → 3.5.15

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.13
2
+ * @vue/compat v3.5.15
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
@@ -396,6 +396,10 @@ class EffectScope {
396
396
  * @internal
397
397
  */
398
398
  this._active = true;
399
+ /**
400
+ * @internal track `on` calls, allow `on` call multiple times
401
+ */
402
+ this._on = 0;
399
403
  /**
400
404
  * @internal
401
405
  */
@@ -466,14 +470,20 @@ class EffectScope {
466
470
  * @internal
467
471
  */
468
472
  on() {
469
- activeEffectScope = this;
473
+ if (++this._on === 1) {
474
+ this.prevScope = activeEffectScope;
475
+ activeEffectScope = this;
476
+ }
470
477
  }
471
478
  /**
472
479
  * This should only be called on non-detached scopes
473
480
  * @internal
474
481
  */
475
482
  off() {
476
- activeEffectScope = this.parent;
483
+ if (this._on > 0 && --this._on === 0) {
484
+ activeEffectScope = this.prevScope;
485
+ this.prevScope = void 0;
486
+ }
477
487
  }
478
488
  stop(fromParent) {
479
489
  if (this._active) {
@@ -555,7 +565,7 @@ class ReactiveEffect {
555
565
  }
556
566
  resume() {
557
567
  if (this.flags & 64) {
558
- this.flags &= ~64;
568
+ this.flags &= -65;
559
569
  if (pausedQueueEffects.has(this)) {
560
570
  pausedQueueEffects.delete(this);
561
571
  this.trigger();
@@ -595,7 +605,7 @@ class ReactiveEffect {
595
605
  cleanupDeps(this);
596
606
  activeSub = prevEffect;
597
607
  shouldTrack = prevShouldTrack;
598
- this.flags &= ~2;
608
+ this.flags &= -3;
599
609
  }
600
610
  }
601
611
  stop() {
@@ -606,7 +616,7 @@ class ReactiveEffect {
606
616
  this.deps = this.depsTail = void 0;
607
617
  cleanupEffect(this);
608
618
  this.onStop && this.onStop();
609
- this.flags &= ~1;
619
+ this.flags &= -2;
610
620
  }
611
621
  }
612
622
  trigger() {
@@ -656,7 +666,7 @@ function endBatch() {
656
666
  while (e) {
657
667
  const next = e.next;
658
668
  e.next = void 0;
659
- e.flags &= ~8;
669
+ e.flags &= -9;
660
670
  e = next;
661
671
  }
662
672
  }
@@ -667,7 +677,7 @@ function endBatch() {
667
677
  while (e) {
668
678
  const next = e.next;
669
679
  e.next = void 0;
670
- e.flags &= ~8;
680
+ e.flags &= -9;
671
681
  if (e.flags & 1) {
672
682
  try {
673
683
  ;
@@ -723,17 +733,16 @@ function refreshComputed(computed) {
723
733
  if (computed.flags & 4 && !(computed.flags & 16)) {
724
734
  return;
725
735
  }
726
- computed.flags &= ~16;
736
+ computed.flags &= -17;
727
737
  if (computed.globalVersion === globalVersion) {
728
738
  return;
729
739
  }
730
740
  computed.globalVersion = globalVersion;
731
- const dep = computed.dep;
732
- computed.flags |= 2;
733
- if (dep.version > 0 && !computed.isSSR && computed.deps && !isDirty(computed)) {
734
- computed.flags &= ~2;
741
+ if (!computed.isSSR && computed.flags & 128 && (!computed.deps && !computed._dirty || !isDirty(computed))) {
735
742
  return;
736
743
  }
744
+ computed.flags |= 2;
745
+ const dep = computed.dep;
737
746
  const prevSub = activeSub;
738
747
  const prevShouldTrack = shouldTrack;
739
748
  activeSub = computed;
@@ -742,6 +751,7 @@ function refreshComputed(computed) {
742
751
  prepareDeps(computed);
743
752
  const value = computed.fn(computed._value);
744
753
  if (dep.version === 0 || hasChanged(value, computed._value)) {
754
+ computed.flags |= 128;
745
755
  computed._value = value;
746
756
  dep.version++;
747
757
  }
@@ -752,7 +762,7 @@ function refreshComputed(computed) {
752
762
  activeSub = prevSub;
753
763
  shouldTrack = prevShouldTrack;
754
764
  cleanupDeps(computed);
755
- computed.flags &= ~2;
765
+ computed.flags &= -3;
756
766
  }
757
767
  }
758
768
  function removeSub(link, soft = false) {
@@ -771,7 +781,7 @@ function removeSub(link, soft = false) {
771
781
  if (dep.subs === link) {
772
782
  dep.subs = prevSub;
773
783
  if (!prevSub && dep.computed) {
774
- dep.computed.flags &= ~4;
784
+ dep.computed.flags &= -5;
775
785
  for (let l = dep.computed.deps; l; l = l.nextDep) {
776
786
  removeSub(l, true);
777
787
  }
@@ -1708,14 +1718,14 @@ function createReactiveObject(target, isReadonly2, baseHandlers, collectionHandl
1708
1718
  if (target["__v_raw"] && !(isReadonly2 && target["__v_isReactive"])) {
1709
1719
  return target;
1710
1720
  }
1711
- const existingProxy = proxyMap.get(target);
1712
- if (existingProxy) {
1713
- return existingProxy;
1714
- }
1715
1721
  const targetType = getTargetType(target);
1716
1722
  if (targetType === 0 /* INVALID */) {
1717
1723
  return target;
1718
1724
  }
1725
+ const existingProxy = proxyMap.get(target);
1726
+ if (existingProxy) {
1727
+ return existingProxy;
1728
+ }
1719
1729
  const proxy = new Proxy(
1720
1730
  target,
1721
1731
  targetType === 2 /* COLLECTION */ ? collectionHandlers : baseHandlers
@@ -2144,11 +2154,11 @@ function watch$1(source, cb, options = EMPTY_OBJ) {
2144
2154
  oldValue === INITIAL_WATCHER_VALUE ? void 0 : isMultiSource && oldValue[0] === INITIAL_WATCHER_VALUE ? [] : oldValue,
2145
2155
  boundCleanup
2146
2156
  ];
2157
+ oldValue = newValue;
2147
2158
  call ? call(cb, 3, args) : (
2148
2159
  // @ts-expect-error
2149
2160
  cb(...args)
2150
2161
  );
2151
- oldValue = newValue;
2152
2162
  } finally {
2153
2163
  activeWatcher = currentWatcher;
2154
2164
  }
@@ -2570,11 +2580,11 @@ function flushPreFlushCbs(instance, seen, i = flushIndex + 1) {
2570
2580
  queue.splice(i, 1);
2571
2581
  i--;
2572
2582
  if (cb.flags & 4) {
2573
- cb.flags &= ~1;
2583
+ cb.flags &= -2;
2574
2584
  }
2575
2585
  cb();
2576
2586
  if (!(cb.flags & 4)) {
2577
- cb.flags &= ~1;
2587
+ cb.flags &= -2;
2578
2588
  }
2579
2589
  }
2580
2590
  }
@@ -2599,10 +2609,10 @@ function flushPostFlushCbs(seen) {
2599
2609
  continue;
2600
2610
  }
2601
2611
  if (cb.flags & 4) {
2602
- cb.flags &= ~1;
2612
+ cb.flags &= -2;
2603
2613
  }
2604
2614
  if (!(cb.flags & 8)) cb();
2605
- cb.flags &= ~1;
2615
+ cb.flags &= -2;
2606
2616
  }
2607
2617
  activePostFlushCbs = null;
2608
2618
  postFlushIndex = 0;
@@ -2638,7 +2648,7 @@ function flushJobs(seen) {
2638
2648
  for (; flushIndex < queue.length; flushIndex++) {
2639
2649
  const job = queue[flushIndex];
2640
2650
  if (job) {
2641
- job.flags &= ~1;
2651
+ job.flags &= -2;
2642
2652
  }
2643
2653
  }
2644
2654
  flushIndex = -1;
@@ -3609,15 +3619,16 @@ const TeleportImpl = {
3609
3619
  updateCssVars(n2, true);
3610
3620
  }
3611
3621
  if (isTeleportDeferred(n2.props)) {
3622
+ n2.el.__isMounted = false;
3612
3623
  queuePostRenderEffect(() => {
3613
3624
  mountToTarget();
3614
- n2.el.__isMounted = true;
3625
+ delete n2.el.__isMounted;
3615
3626
  }, parentSuspense);
3616
3627
  } else {
3617
3628
  mountToTarget();
3618
3629
  }
3619
3630
  } else {
3620
- if (isTeleportDeferred(n2.props) && !n1.el.__isMounted) {
3631
+ if (isTeleportDeferred(n2.props) && n1.el.__isMounted === false) {
3621
3632
  queuePostRenderEffect(() => {
3622
3633
  TeleportImpl.process(
3623
3634
  n1,
@@ -3631,7 +3642,6 @@ const TeleportImpl = {
3631
3642
  optimized,
3632
3643
  internals
3633
3644
  );
3634
- delete n1.el.__isMounted;
3635
3645
  }, parentSuspense);
3636
3646
  return;
3637
3647
  }
@@ -3658,7 +3668,7 @@ const TeleportImpl = {
3658
3668
  namespace,
3659
3669
  slotScopeIds
3660
3670
  );
3661
- traverseStaticChildren(n1, n2, true);
3671
+ traverseStaticChildren(n1, n2, !!!(process.env.NODE_ENV !== "production"));
3662
3672
  } else if (!optimized) {
3663
3673
  patchChildren(
3664
3674
  n1,
@@ -4178,7 +4188,7 @@ function getInnerChild$1(vnode) {
4178
4188
  }
4179
4189
  return vnode;
4180
4190
  }
4181
- if (!!(process.env.NODE_ENV !== "production") && vnode.component) {
4191
+ if (vnode.component) {
4182
4192
  return vnode.component.subTree;
4183
4193
  }
4184
4194
  const { shapeFlag, children } = vnode;
@@ -4623,6 +4633,8 @@ function createHydrationFunctions(rendererInternals) {
4623
4633
  ) && parentComponent && parentComponent.vnode.props && parentComponent.vnode.props.appear;
4624
4634
  const content = el.content.firstChild;
4625
4635
  if (needCallTransitionHooks) {
4636
+ const cls = content.getAttribute("class");
4637
+ if (cls) content.$cls = cls;
4626
4638
  transition.beforeEnter(content);
4627
4639
  }
4628
4640
  replaceNode(content, el, parentComponent);
@@ -4886,7 +4898,12 @@ function propHasMismatch(el, key, clientValue, vnode, instance) {
4886
4898
  let actual;
4887
4899
  let expected;
4888
4900
  if (key === "class") {
4889
- actual = el.getAttribute("class");
4901
+ if (el.$cls) {
4902
+ actual = el.$cls;
4903
+ delete el.$cls;
4904
+ } else {
4905
+ actual = el.getAttribute("class");
4906
+ }
4890
4907
  expected = normalizeClass(clientValue);
4891
4908
  if (!isSetEqual(toClassSet(actual || ""), toClassSet(expected))) {
4892
4909
  mismatchType = 2 /* CLASS */;
@@ -5181,14 +5198,25 @@ function defineAsyncComponent(source) {
5181
5198
  name: "AsyncComponentWrapper",
5182
5199
  __asyncLoader: load,
5183
5200
  __asyncHydrate(el, instance, hydrate) {
5201
+ let patched = false;
5184
5202
  const doHydrate = hydrateStrategy ? () => {
5203
+ const performHydrate = () => {
5204
+ if (!!(process.env.NODE_ENV !== "production") && patched) {
5205
+ warn$1(
5206
+ `Skipping lazy hydration for component '${getComponentName(resolvedComp)}': it was updated before lazy hydration performed.`
5207
+ );
5208
+ return;
5209
+ }
5210
+ hydrate();
5211
+ };
5185
5212
  const teardown = hydrateStrategy(
5186
- hydrate,
5213
+ performHydrate,
5187
5214
  (cb) => forEachElement(el, cb)
5188
5215
  );
5189
5216
  if (teardown) {
5190
5217
  (instance.bum || (instance.bum = [])).push(teardown);
5191
5218
  }
5219
+ (instance.u || (instance.u = [])).push(() => patched = true);
5192
5220
  } : hydrate;
5193
5221
  if (resolvedComp) {
5194
5222
  doHydrate();
@@ -5358,6 +5386,9 @@ const KeepAliveImpl = {
5358
5386
  if (!!(process.env.NODE_ENV !== "production") || __VUE_PROD_DEVTOOLS__) {
5359
5387
  devtoolsComponentAdded(instance2);
5360
5388
  }
5389
+ if (!!(process.env.NODE_ENV !== "production") && true) {
5390
+ instance2.__keepAliveStorageContainer = storageContainer;
5391
+ }
5361
5392
  };
5362
5393
  function unmount(vnode) {
5363
5394
  resetShapeFlag(vnode);
@@ -5445,7 +5476,7 @@ const KeepAliveImpl = {
5445
5476
  );
5446
5477
  const { include, exclude, max } = props;
5447
5478
  if (include && (!name || !matches(include, name)) || exclude && name && matches(exclude, name)) {
5448
- vnode.shapeFlag &= ~256;
5479
+ vnode.shapeFlag &= -257;
5449
5480
  current = vnode;
5450
5481
  return rawVNode;
5451
5482
  }
@@ -5536,8 +5567,8 @@ function injectToKeepAliveRoot(hook, type, target, keepAliveRoot) {
5536
5567
  }, target);
5537
5568
  }
5538
5569
  function resetShapeFlag(vnode) {
5539
- vnode.shapeFlag &= ~256;
5540
- vnode.shapeFlag &= ~512;
5570
+ vnode.shapeFlag &= -257;
5571
+ vnode.shapeFlag &= -513;
5541
5572
  }
5542
5573
  function getInnerChild(vnode) {
5543
5574
  return vnode.shapeFlag & 128 ? vnode.ssContent : vnode;
@@ -5939,14 +5970,16 @@ function renderList(source, renderItem, cache, index) {
5939
5970
  if (sourceIsArray || isString(source)) {
5940
5971
  const sourceIsReactiveArray = sourceIsArray && isReactive(source);
5941
5972
  let needsWrap = false;
5973
+ let isReadonlySource = false;
5942
5974
  if (sourceIsReactiveArray) {
5943
5975
  needsWrap = !isShallow(source);
5976
+ isReadonlySource = isReadonly(source);
5944
5977
  source = shallowReadArray(source);
5945
5978
  }
5946
5979
  ret = new Array(source.length);
5947
5980
  for (let i = 0, l = source.length; i < l; i++) {
5948
5981
  ret[i] = renderItem(
5949
- needsWrap ? toReactive(source[i]) : source[i],
5982
+ needsWrap ? isReadonlySource ? toReadonly(toReactive(source[i])) : toReactive(source[i]) : source[i],
5950
5983
  i,
5951
5984
  void 0,
5952
5985
  cached && cached[i]
@@ -7200,7 +7233,7 @@ function createCompatVue$1(createApp, createSingletonApp) {
7200
7233
  return vm;
7201
7234
  }
7202
7235
  }
7203
- Vue.version = `2.6.14-compat:${"3.5.13"}`;
7236
+ Vue.version = `2.6.14-compat:${"3.5.15"}`;
7204
7237
  Vue.config = singletonApp.config;
7205
7238
  Vue.use = (plugin, ...options) => {
7206
7239
  if (plugin && isFunction(plugin.install)) {
@@ -7696,11 +7729,9 @@ function createAppAPI(render, hydrate) {
7696
7729
  }
7697
7730
  if (!!(process.env.NODE_ENV !== "production")) {
7698
7731
  context.reload = () => {
7699
- render(
7700
- cloneVNode(vnode),
7701
- rootContainer,
7702
- namespace
7703
- );
7732
+ const cloned = cloneVNode(vnode);
7733
+ cloned.el = null;
7734
+ render(cloned, rootContainer, namespace);
7704
7735
  };
7705
7736
  }
7706
7737
  if (isHydrate && hydrate) {
@@ -7750,9 +7781,15 @@ If you want to remount the same app, move your app creation logic into a factory
7750
7781
  },
7751
7782
  provide(key, value) {
7752
7783
  if (!!(process.env.NODE_ENV !== "production") && key in context.provides) {
7753
- warn$1(
7754
- `App already provides property with key "${String(key)}". It will be overwritten with the new value.`
7755
- );
7784
+ if (hasOwn(context.provides, key)) {
7785
+ warn$1(
7786
+ `App already provides property with key "${String(key)}". It will be overwritten with the new value.`
7787
+ );
7788
+ } else {
7789
+ warn$1(
7790
+ `App already provides property with key "${String(key)}" inherited from its parent element. It will be overwritten with the new value.`
7791
+ );
7792
+ }
7756
7793
  }
7757
7794
  context.provides[key] = value;
7758
7795
  return app;
@@ -7792,7 +7829,7 @@ function provide(key, value) {
7792
7829
  function inject(key, defaultValue, treatDefaultAsFactory = false) {
7793
7830
  const instance = currentInstance || currentRenderingInstance;
7794
7831
  if (instance || currentApp) {
7795
- const provides = currentApp ? currentApp._context.provides : instance ? instance.parent == null ? instance.vnode.appContext && instance.vnode.appContext.provides : instance.parent.provides : void 0;
7832
+ let provides = currentApp ? currentApp._context.provides : instance ? instance.parent == null || instance.ce ? instance.vnode.appContext && instance.vnode.appContext.provides : instance.parent.provides : void 0;
7796
7833
  if (provides && key in provides) {
7797
7834
  return provides[key];
7798
7835
  } else if (arguments.length > 1) {
@@ -8298,7 +8335,7 @@ const normalizeSlot = (key, rawSlot, ctx) => {
8298
8335
  return rawSlot;
8299
8336
  }
8300
8337
  const normalized = withCtx((...args) => {
8301
- if (!!(process.env.NODE_ENV !== "production") && currentInstance && (!ctx || ctx.root === currentInstance.root)) {
8338
+ if (!!(process.env.NODE_ENV !== "production") && currentInstance && !(ctx === null && currentRenderingInstance) && !(ctx && ctx.root !== currentInstance.root)) {
8302
8339
  warn$1(
8303
8340
  `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.`
8304
8341
  );
@@ -8337,7 +8374,7 @@ const normalizeVNodeSlots = (instance, children) => {
8337
8374
  };
8338
8375
  const assignSlots = (slots, children, optimized) => {
8339
8376
  for (const key in children) {
8340
- if (optimized || key !== "_") {
8377
+ if (optimized || !isInternalKey(key)) {
8341
8378
  slots[key] = children[key];
8342
8379
  }
8343
8380
  }
@@ -8888,7 +8925,7 @@ function baseCreateRenderer(options, createHydrationFns) {
8888
8925
  (oldVNode.type === Fragment || // - In the case of different nodes, there is going to be a replacement
8889
8926
  // which also requires the correct parent container
8890
8927
  !isSameVNodeType(oldVNode, newVNode) || // - In the case of a component, it could contain anything.
8891
- oldVNode.shapeFlag & (6 | 64)) ? hostParentNode(oldVNode.el) : (
8928
+ oldVNode.shapeFlag & (6 | 64 | 128)) ? hostParentNode(oldVNode.el) : (
8892
8929
  // In other cases, the parent container is not actually used so we
8893
8930
  // just pass the block element here to avoid a DOM parentNode call.
8894
8931
  fallbackContainer
@@ -9062,8 +9099,8 @@ function baseCreateRenderer(options, createHydrationFns) {
9062
9099
  endMeasure(instance, `init`);
9063
9100
  }
9064
9101
  }
9102
+ if (!!(process.env.NODE_ENV !== "production") && isHmrUpdating) initialVNode.el = null;
9065
9103
  if (instance.asyncDep) {
9066
- if (!!(process.env.NODE_ENV !== "production") && isHmrUpdating) initialVNode.el = null;
9067
9104
  parentSuspense && parentSuspense.registerDep(instance, setupRenderEffect, optimized);
9068
9105
  if (!initialVNode.el) {
9069
9106
  const placeholder = instance.subTree = createVNode(Comment);
@@ -9649,7 +9686,13 @@ function baseCreateRenderer(options, createHydrationFns) {
9649
9686
  queuePostRenderEffect(() => transition.enter(el), parentSuspense);
9650
9687
  } else {
9651
9688
  const { leave, delayLeave, afterLeave } = transition;
9652
- const remove2 = () => hostInsert(el, container, anchor);
9689
+ const remove2 = () => {
9690
+ if (vnode.ctx.isUnmounted) {
9691
+ hostRemove(el);
9692
+ } else {
9693
+ hostInsert(el, container, anchor);
9694
+ }
9695
+ };
9653
9696
  const performLeave = () => {
9654
9697
  leave(el, () => {
9655
9698
  remove2();
@@ -9682,7 +9725,9 @@ function baseCreateRenderer(options, createHydrationFns) {
9682
9725
  optimized = false;
9683
9726
  }
9684
9727
  if (ref != null) {
9728
+ pauseTracking();
9685
9729
  setRef(ref, null, parentSuspense, vnode, true);
9730
+ resetTracking();
9686
9731
  }
9687
9732
  if (cacheIndex != null) {
9688
9733
  parentComponent.renderCache[cacheIndex] = void 0;
@@ -9794,12 +9839,27 @@ function baseCreateRenderer(options, createHydrationFns) {
9794
9839
  if (!!(process.env.NODE_ENV !== "production") && instance.type.__hmrId) {
9795
9840
  unregisterHMR(instance);
9796
9841
  }
9797
- const { bum, scope, job, subTree, um, m, a } = instance;
9842
+ const {
9843
+ bum,
9844
+ scope,
9845
+ job,
9846
+ subTree,
9847
+ um,
9848
+ m,
9849
+ a,
9850
+ parent,
9851
+ slots: { __: slotCacheKeys }
9852
+ } = instance;
9798
9853
  invalidateMount(m);
9799
9854
  invalidateMount(a);
9800
9855
  if (bum) {
9801
9856
  invokeArrayFns(bum);
9802
9857
  }
9858
+ if (parent && isArray(slotCacheKeys)) {
9859
+ slotCacheKeys.forEach((v) => {
9860
+ parent.renderCache[v] = void 0;
9861
+ });
9862
+ }
9803
9863
  if (isCompatEnabled$1("INSTANCE_EVENT_HOOKS", instance)) {
9804
9864
  instance.emit("hook:beforeDestroy");
9805
9865
  }
@@ -9904,8 +9964,8 @@ function toggleRecurse({ effect, job }, allowed) {
9904
9964
  effect.flags |= 32;
9905
9965
  job.flags |= 4;
9906
9966
  } else {
9907
- effect.flags &= ~32;
9908
- job.flags &= ~4;
9967
+ effect.flags &= -33;
9968
+ job.flags &= -5;
9909
9969
  }
9910
9970
  }
9911
9971
  function needTransition(parentSuspense, transition) {
@@ -9929,9 +9989,12 @@ function traverseStaticChildren(n1, n2, shallow = false) {
9929
9989
  if (c2.type === Text) {
9930
9990
  c2.el = c1.el;
9931
9991
  }
9932
- if (!!(process.env.NODE_ENV !== "production") && c2.type === Comment && !c2.el) {
9992
+ if (c2.type === Comment && !c2.el) {
9933
9993
  c2.el = c1.el;
9934
9994
  }
9995
+ if (!!(process.env.NODE_ENV !== "production")) {
9996
+ c2.el && (c2.el.__vnode = c2);
9997
+ }
9935
9998
  }
9936
9999
  }
9937
10000
  }
@@ -11362,8 +11425,8 @@ function isSameVNodeType(n1, n2) {
11362
11425
  if (!!(process.env.NODE_ENV !== "production") && n2.shapeFlag & 6 && n1.component) {
11363
11426
  const dirtyInstances = hmrDirtyComponents.get(n2.type);
11364
11427
  if (dirtyInstances && dirtyInstances.has(n1.component)) {
11365
- n1.shapeFlag &= ~256;
11366
- n2.shapeFlag &= ~512;
11428
+ n1.shapeFlag &= -257;
11429
+ n2.shapeFlag &= -513;
11367
11430
  return false;
11368
11431
  }
11369
11432
  }
@@ -11836,7 +11899,7 @@ function setupComponent(instance, isSSR = false, optimized = false) {
11836
11899
  const { props, children } = instance.vnode;
11837
11900
  const isStateful = isStatefulComponent(instance);
11838
11901
  initProps(instance, props, isStateful, isSSR);
11839
- initSlots(instance, children, optimized);
11902
+ initSlots(instance, children, optimized || isSSR);
11840
11903
  const setupResult = isStateful ? setupStatefulComponent(instance, isSSR) : void 0;
11841
11904
  isSSR && setInSSRSetupState(false);
11842
11905
  return setupResult;
@@ -12191,13 +12254,15 @@ function initCustomFormatter() {
12191
12254
  if (obj.__isVue) {
12192
12255
  return ["div", vueStyle, `VueInstance`];
12193
12256
  } else if (isRef(obj)) {
12257
+ pauseTracking();
12258
+ const value = obj.value;
12259
+ resetTracking();
12194
12260
  return [
12195
12261
  "div",
12196
12262
  {},
12197
12263
  ["span", vueStyle, genRefFlag(obj)],
12198
12264
  "<",
12199
- // avoid debugger accessing value affecting behavior
12200
- formatValue("_value" in obj ? obj._value : obj),
12265
+ formatValue(value),
12201
12266
  `>`
12202
12267
  ];
12203
12268
  } else if (isReactive(obj)) {
@@ -12378,7 +12443,7 @@ function isMemoSame(cached, memo) {
12378
12443
  return true;
12379
12444
  }
12380
12445
 
12381
- const version = "3.5.13";
12446
+ const version = "3.5.15";
12382
12447
  const warn = !!(process.env.NODE_ENV !== "production") ? warn$1 : NOOP;
12383
12448
  const ErrorTypeStrings = ErrorTypeStrings$1 ;
12384
12449
  const devtools = !!(process.env.NODE_ENV !== "production") || true ? devtools$1 : void 0;
@@ -13078,7 +13143,7 @@ function compatCoerceAttr(el, key, value, instance = null) {
13078
13143
  el.setAttribute(key, v2CoercedValue);
13079
13144
  return true;
13080
13145
  }
13081
- } else if (value === false && !isSpecialBooleanAttr(key) && compatUtils.isCompatEnabled("ATTR_FALSE_VALUE", instance)) {
13146
+ } else if (value === false && !(el.tagName === "INPUT" && key === "value") && !isSpecialBooleanAttr(key) && compatUtils.isCompatEnabled("ATTR_FALSE_VALUE", instance)) {
13082
13147
  compatUtils.warnDeprecation(
13083
13148
  "ATTR_FALSE_VALUE",
13084
13149
  instance,
@@ -13284,7 +13349,7 @@ function shouldSetAsProp(el, key, value, isSVG) {
13284
13349
  }
13285
13350
  return false;
13286
13351
  }
13287
- if (key === "spellcheck" || key === "draggable" || key === "translate") {
13352
+ if (key === "spellcheck" || key === "draggable" || key === "translate" || key === "autocorrect") {
13288
13353
  return false;
13289
13354
  }
13290
13355
  if (key === "form") {
@@ -13367,13 +13432,10 @@ class VueElement extends BaseClass {
13367
13432
  this._root = this;
13368
13433
  }
13369
13434
  }
13370
- if (!this._def.__asyncLoader) {
13371
- this._resolveProps(this._def);
13372
- }
13373
13435
  }
13374
13436
  connectedCallback() {
13375
13437
  if (!this.isConnected) return;
13376
- if (!this.shadowRoot) {
13438
+ if (!this.shadowRoot && !this._resolved) {
13377
13439
  this._parseSlots();
13378
13440
  }
13379
13441
  this._connected = true;
@@ -13386,8 +13448,7 @@ class VueElement extends BaseClass {
13386
13448
  }
13387
13449
  if (!this._instance) {
13388
13450
  if (this._resolved) {
13389
- this._setParent();
13390
- this._update();
13451
+ this._mount(this._def);
13391
13452
  } else {
13392
13453
  if (parent && parent._pendingResolve) {
13393
13454
  this._pendingResolve = parent._pendingResolve.then(() => {
@@ -13403,7 +13464,15 @@ class VueElement extends BaseClass {
13403
13464
  _setParent(parent = this._parent) {
13404
13465
  if (parent) {
13405
13466
  this._instance.parent = parent._instance;
13406
- this._instance.provides = parent._instance.provides;
13467
+ this._inheritParentContext(parent);
13468
+ }
13469
+ }
13470
+ _inheritParentContext(parent = this._parent) {
13471
+ if (parent && this._app) {
13472
+ Object.setPrototypeOf(
13473
+ this._app._context.provides,
13474
+ parent._instance.provides
13475
+ );
13407
13476
  }
13408
13477
  }
13409
13478
  disconnectedCallback() {
@@ -13453,9 +13522,7 @@ class VueElement extends BaseClass {
13453
13522
  }
13454
13523
  }
13455
13524
  this._numberProps = numberProps;
13456
- if (isAsync) {
13457
- this._resolveProps(def);
13458
- }
13525
+ this._resolveProps(def);
13459
13526
  if (this.shadowRoot) {
13460
13527
  this._applyStyles(styles);
13461
13528
  } else if (!!(process.env.NODE_ENV !== "production") && styles) {
@@ -13479,6 +13546,7 @@ class VueElement extends BaseClass {
13479
13546
  def.name = "VueElement";
13480
13547
  }
13481
13548
  this._app = this._createApp(def);
13549
+ this._inheritParentContext();
13482
13550
  if (def.configureApp) {
13483
13551
  def.configureApp(this._app);
13484
13552
  }
@@ -13563,7 +13631,9 @@ class VueElement extends BaseClass {
13563
13631
  }
13564
13632
  }
13565
13633
  _update() {
13566
- render(this._createVNode(), this._root);
13634
+ const vnode = this._createVNode();
13635
+ if (this._app) vnode.appContext = this._app._context;
13636
+ render(vnode, this._root);
13567
13637
  }
13568
13638
  _createVNode() {
13569
13639
  const baseProps = {};
@@ -13776,6 +13846,7 @@ const TransitionGroupImpl = /* @__PURE__ */ decorate({
13776
13846
  instance.vnode.el,
13777
13847
  moveClass
13778
13848
  )) {
13849
+ prevChildren = [];
13779
13850
  return;
13780
13851
  }
13781
13852
  prevChildren.forEach(callPendingCbs);
@@ -13799,6 +13870,7 @@ const TransitionGroupImpl = /* @__PURE__ */ decorate({
13799
13870
  };
13800
13871
  el.addEventListener("transitionend", cb);
13801
13872
  });
13873
+ prevChildren = [];
13802
13874
  });
13803
13875
  return () => {
13804
13876
  const rawProps = toRaw(props);
@@ -16290,7 +16362,7 @@ const tokenizer = new Tokenizer(stack, {
16290
16362
  "COMPILER_V_BIND_SYNC",
16291
16363
  currentOptions,
16292
16364
  currentProp.loc,
16293
- currentProp.rawName
16365
+ currentProp.arg.loc.source
16294
16366
  )) {
16295
16367
  currentProp.name = "model";
16296
16368
  currentProp.modifiers.splice(syncIndex, 1);
@@ -16866,6 +16938,7 @@ function walk(node, parent, context, doNotHoistNode = false, inFor = false) {
16866
16938
  }
16867
16939
  }
16868
16940
  let cachedAsArray = false;
16941
+ const slotCacheKeys = [];
16869
16942
  if (toCache.length === children.length && node.type === 1) {
16870
16943
  if (node.tagType === 0 && node.codegenNode && node.codegenNode.type === 13 && isArray(node.codegenNode.children)) {
16871
16944
  node.codegenNode.children = getCacheExpression(
@@ -16875,6 +16948,7 @@ function walk(node, parent, context, doNotHoistNode = false, inFor = false) {
16875
16948
  } else if (node.tagType === 1 && node.codegenNode && node.codegenNode.type === 13 && node.codegenNode.children && !isArray(node.codegenNode.children) && node.codegenNode.children.type === 15) {
16876
16949
  const slot = getSlotNode(node.codegenNode, "default");
16877
16950
  if (slot) {
16951
+ slotCacheKeys.push(context.cached.length);
16878
16952
  slot.returns = getCacheExpression(
16879
16953
  createArrayExpression(slot.returns)
16880
16954
  );
@@ -16884,6 +16958,7 @@ function walk(node, parent, context, doNotHoistNode = false, inFor = false) {
16884
16958
  const slotName = findDir(node, "slot", true);
16885
16959
  const slot = slotName && slotName.arg && getSlotNode(parent.codegenNode, slotName.arg);
16886
16960
  if (slot) {
16961
+ slotCacheKeys.push(context.cached.length);
16887
16962
  slot.returns = getCacheExpression(
16888
16963
  createArrayExpression(slot.returns)
16889
16964
  );
@@ -16893,9 +16968,18 @@ function walk(node, parent, context, doNotHoistNode = false, inFor = false) {
16893
16968
  }
16894
16969
  if (!cachedAsArray) {
16895
16970
  for (const child of toCache) {
16971
+ slotCacheKeys.push(context.cached.length);
16896
16972
  child.codegenNode = context.cache(child.codegenNode);
16897
16973
  }
16898
16974
  }
16975
+ 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) {
16976
+ node.codegenNode.children.properties.push(
16977
+ createObjectProperty(
16978
+ `__`,
16979
+ createSimpleExpression(JSON.stringify(slotCacheKeys), false)
16980
+ )
16981
+ );
16982
+ }
16899
16983
  function getCacheExpression(value) {
16900
16984
  const exp = context.cache(value);
16901
16985
  if (inFor && context.hmr) {
@@ -19059,9 +19143,8 @@ function buildProps(node, context, props = node.props, isComponent, isDynamicCom
19059
19143
  hasDynamicKeys = true;
19060
19144
  if (exp) {
19061
19145
  if (isVBind) {
19062
- pushRefVForMarker();
19063
- pushMergeArg();
19064
19146
  {
19147
+ pushMergeArg();
19065
19148
  if (!!(process.env.NODE_ENV !== "production")) {
19066
19149
  const hasOverridableKeys = mergeArgs.some((arg2) => {
19067
19150
  if (arg2.type === 15) {
@@ -19091,6 +19174,8 @@ function buildProps(node, context, props = node.props, isComponent, isDynamicCom
19091
19174
  continue;
19092
19175
  }
19093
19176
  }
19177
+ pushRefVForMarker();
19178
+ pushMergeArg();
19094
19179
  mergeArgs.push(exp);
19095
19180
  } else {
19096
19181
  pushMergeArg({
@@ -19599,8 +19684,7 @@ const transformModel$1 = (dir, node, context) => {
19599
19684
  context.onError(createCompilerError(44, exp.loc));
19600
19685
  return createTransformProps();
19601
19686
  }
19602
- const maybeRef = false;
19603
- if (!expString.trim() || !isMemberExpression(exp) && !maybeRef) {
19687
+ if (!expString.trim() || !isMemberExpression(exp) && true) {
19604
19688
  context.onError(
19605
19689
  createCompilerError(42, exp.loc)
19606
19690
  );
@@ -20324,6 +20408,9 @@ const ignoreSideEffectTags = (node, context) => {
20324
20408
  };
20325
20409
 
20326
20410
  function isValidHTMLNesting(parent, child) {
20411
+ if (parent === "template") {
20412
+ return true;
20413
+ }
20327
20414
  if (parent in onlyValidChildren) {
20328
20415
  return onlyValidChildren[parent].has(child);
20329
20416
  }