@vue/compat 3.5.43 → 3.5.44

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.43
2
+ * @vue/compat v3.5.44
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
@@ -191,7 +191,7 @@ const isHTMLTag = /* @__PURE__ */ makeMap(HTML_TAGS);
191
191
  const isSVGTag = /* @__PURE__ */ makeMap(SVG_TAGS);
192
192
  const isMathMLTag = /* @__PURE__ */ makeMap(MATH_TAGS);
193
193
 
194
- const specialBooleanAttrs = `itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly`;
194
+ const specialBooleanAttrs = `itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,playsinline,readonly`;
195
195
  const isSpecialBooleanAttr = /* @__PURE__ */ makeMap(specialBooleanAttrs);
196
196
  const isBooleanAttr = /* @__PURE__ */ makeMap(
197
197
  specialBooleanAttrs + `,async,autofocus,autoplay,controls,default,defer,disabled,inert,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected`
@@ -1239,19 +1239,41 @@ const arrayInstrumentations = {
1239
1239
  };
1240
1240
  function iterator(self, method, wrapValue) {
1241
1241
  const arr = shallowReadArray(self);
1242
- const iter = arr[method]();
1242
+ const methodFn = arr[method];
1243
+ const iter = methodFn.call(arr);
1243
1244
  if (arr !== self && !isShallow(self)) {
1244
- iter._next = iter.next;
1245
- iter.next = () => {
1246
- const result = iter._next();
1247
- if (!result.done) {
1248
- result.value = wrapValue(result.value);
1245
+ if (iter[Symbol.toStringTag] === "Array Iterator") {
1246
+ const wrapped = Object.create(Object.getPrototypeOf(iter));
1247
+ wrapped.next = () => wrapResult(iter.next(), wrapValue);
1248
+ if (methodFn !== arrayProto[method]) {
1249
+ Object.defineProperties(wrapped, {
1250
+ return: {
1251
+ get() {
1252
+ const fn = iter.return;
1253
+ return typeof fn === "function" ? fn.bind(iter) : fn;
1254
+ }
1255
+ },
1256
+ throw: {
1257
+ get() {
1258
+ const fn = iter.throw;
1259
+ return typeof fn === "function" ? fn.bind(iter) : fn;
1260
+ }
1261
+ }
1262
+ });
1249
1263
  }
1250
- return result;
1251
- };
1264
+ return wrapped;
1265
+ }
1266
+ iter._next = iter.next;
1267
+ iter.next = () => wrapResult(iter._next(), wrapValue);
1252
1268
  }
1253
1269
  return iter;
1254
1270
  }
1271
+ function wrapResult(result, wrapValue) {
1272
+ if (!result.done) {
1273
+ result.value = wrapValue(result.value);
1274
+ }
1275
+ return result;
1276
+ }
1255
1277
  const arrayProto = Array.prototype;
1256
1278
  function apply(self, method, fn, thisArg, wrappedRetFn, args) {
1257
1279
  const arr = shallowReadArray(self);
@@ -1674,6 +1696,8 @@ function createInstrumentationGetter(isReadonly2, shallow) {
1674
1696
  return !isReadonly2;
1675
1697
  } else if (key === "__v_isReadonly") {
1676
1698
  return isReadonly2;
1699
+ } else if (key === "__v_isShallow") {
1700
+ return shallow;
1677
1701
  } else if (key === "__v_raw") {
1678
1702
  return target;
1679
1703
  }
@@ -2219,9 +2243,11 @@ function watch$1(source, cb, options = EMPTY_OBJ) {
2219
2243
  if (once && cb) {
2220
2244
  const _cb = cb;
2221
2245
  cb = (...args) => {
2222
- const res = _cb(...args);
2223
- watchHandle();
2224
- return res;
2246
+ try {
2247
+ return _cb(...args);
2248
+ } finally {
2249
+ watchHandle();
2250
+ }
2225
2251
  };
2226
2252
  }
2227
2253
  let oldValue = isMultiSource ? new Array(source.length).fill(INITIAL_WATCHER_VALUE) : INITIAL_WATCHER_VALUE;
@@ -2232,12 +2258,13 @@ function watch$1(source, cb, options = EMPTY_OBJ) {
2232
2258
  if (cb) {
2233
2259
  const newValue = effect.run();
2234
2260
  if (immediateFirstRun || deep || forceTrigger || (isMultiSource ? newValue.some((v, i) => hasChanged(v, oldValue[i])) : hasChanged(newValue, oldValue))) {
2235
- if (cleanup) {
2236
- cleanup();
2237
- }
2238
2261
  const currentWatcher = activeWatcher;
2239
- activeWatcher = effect;
2262
+ pauseTracking();
2240
2263
  try {
2264
+ if (cleanup) {
2265
+ cleanup();
2266
+ }
2267
+ activeWatcher = effect;
2241
2268
  const args = [
2242
2269
  newValue,
2243
2270
  // pass undefined as the old value when it's changed for the first time
@@ -2251,6 +2278,7 @@ function watch$1(source, cb, options = EMPTY_OBJ) {
2251
2278
  );
2252
2279
  } finally {
2253
2280
  activeWatcher = currentWatcher;
2281
+ resetTracking();
2254
2282
  }
2255
2283
  }
2256
2284
  } else {
@@ -2651,21 +2679,21 @@ function queuePostFlushCb(cb) {
2651
2679
  }
2652
2680
  queueFlush();
2653
2681
  }
2654
- function flushPreFlushCbs(instance, seen, i = flushIndex + 1) {
2682
+ function flushPreFlushCbs(instance, minUid, seen, i = flushIndex + 1) {
2655
2683
  {
2656
2684
  seen = seen || /* @__PURE__ */ new Map();
2657
2685
  }
2658
2686
  for (; i < queue.length; i++) {
2659
2687
  const cb = queue[i];
2660
2688
  if (cb && cb.flags & 2) {
2661
- if (instance && cb.id !== instance.uid) {
2689
+ if (instance && cb.id !== instance.uid || minUid !== void 0 && !(cb.id >= minUid)) {
2662
2690
  continue;
2663
2691
  }
2664
2692
  if (checkRecursiveUpdates(seen, cb)) {
2665
2693
  continue;
2666
2694
  }
2667
2695
  queue.splice(i, 1);
2668
- i--;
2696
+ i = instance ? i - 1 : flushIndex;
2669
2697
  if (cb.flags & 4) {
2670
2698
  cb.flags &= -2;
2671
2699
  }
@@ -2676,12 +2704,23 @@ function flushPreFlushCbs(instance, seen, i = flushIndex + 1) {
2676
2704
  }
2677
2705
  }
2678
2706
  }
2679
- function flushPostFlushCbs(seen) {
2707
+ function flushPostFlushCbs(seen, skip, minUid = 0) {
2680
2708
  if (pendingPostFlushCbs.length) {
2681
- const deduped = [...new Set(pendingPostFlushCbs)].sort(
2682
- (a, b) => getId(a) - getId(b)
2683
- );
2684
- pendingPostFlushCbs.length = 0;
2709
+ let cbs = pendingPostFlushCbs;
2710
+ let kept = 0;
2711
+ if (skip) {
2712
+ cbs = [];
2713
+ for (let i = 0; i < pendingPostFlushCbs.length; i++) {
2714
+ const cb = pendingPostFlushCbs[i];
2715
+ if (cb.i !== void 0 ? !cb.i || cb.i.uid < minUid : skip.has(cb)) {
2716
+ pendingPostFlushCbs[kept++] = cb;
2717
+ } else {
2718
+ cbs.push(cb);
2719
+ }
2720
+ }
2721
+ }
2722
+ const deduped = [...new Set(cbs)].sort((a, b) => getId(a) - getId(b));
2723
+ pendingPostFlushCbs.length = kept;
2685
2724
  if (activePostFlushCbs) {
2686
2725
  for (let i = 0; i < deduped.length; i++) {
2687
2726
  activePostFlushCbs.push(deduped[i]);
@@ -2707,6 +2746,22 @@ function flushPostFlushCbs(seen) {
2707
2746
  postFlushIndex = 0;
2708
2747
  }
2709
2748
  }
2749
+ let isFlushing = false;
2750
+ function flushOnAppMount(fn, minUid) {
2751
+ if (isFlushing) {
2752
+ fn();
2753
+ return;
2754
+ }
2755
+ const queued = minUid === void 0 ? void 0 : new Set(pendingPostFlushCbs);
2756
+ fn();
2757
+ isFlushing = true;
2758
+ try {
2759
+ flushPreFlushCbs(void 0, minUid);
2760
+ flushPostFlushCbs(void 0, queued, minUid);
2761
+ } finally {
2762
+ isFlushing = false;
2763
+ }
2764
+ }
2710
2765
  const getId = (job) => job.id == null ? job.flags & 2 ? -1 : Infinity : job.id;
2711
2766
  function flushJobs(seen) {
2712
2767
  {
@@ -3677,6 +3732,7 @@ function doWatch(source, cb, options = EMPTY_OBJ) {
3677
3732
  let isPre = false;
3678
3733
  if (flush === "post") {
3679
3734
  baseWatchOptions.scheduler = (job) => {
3735
+ job.i = instance;
3680
3736
  queuePostRenderEffect(job, instance && instance.suspense);
3681
3737
  };
3682
3738
  } else if (flush !== "sync") {
@@ -3978,7 +4034,11 @@ const TeleportImpl = {
3978
4034
  };
3979
4035
  function moveTeleport(vnode, container, parentAnchor, { o: { insert }, m: move }, moveType = 2) {
3980
4036
  if (moveType === 0) {
4037
+ if (vnode.targetStart) {
4038
+ insert(vnode.targetStart, container, parentAnchor);
4039
+ }
3981
4040
  insert(vnode.targetAnchor, container, parentAnchor);
4041
+ parentAnchor = vnode.targetAnchor;
3982
4042
  }
3983
4043
  const { el, anchor, shapeFlag, children, props } = vnode;
3984
4044
  const isReorder = moveType === 2;
@@ -4147,10 +4207,6 @@ const BaseTransitionPropsValidators = {
4147
4207
  onAfterAppear: TransitionHookValidator,
4148
4208
  onAppearCancelled: TransitionHookValidator
4149
4209
  };
4150
- const recursiveGetSubtree = (instance) => {
4151
- const subTree = instance.subTree;
4152
- return subTree.component ? recursiveGetSubtree(subTree.component) : subTree;
4153
- };
4154
4210
  const BaseTransitionImpl = {
4155
4211
  name: `BaseTransition`,
4156
4212
  props: BaseTransitionPropsValidators,
@@ -4191,7 +4247,7 @@ const BaseTransitionImpl = {
4191
4247
  setTransitionHooks(innerChild, enterHooks);
4192
4248
  }
4193
4249
  let oldInnerChild = instance.subTree && getInnerChild$1(instance.subTree);
4194
- if (oldInnerChild && oldInnerChild.type !== Comment && !isSameVNodeType(oldInnerChild, innerChild) && recursiveGetSubtree(instance).type !== Comment) {
4250
+ if (oldInnerChild && oldInnerChild.type !== Comment && !isSameVNodeType(oldInnerChild, innerChild) && getTransitionRoot(instance.subTree)) {
4195
4251
  let leavingHooks = resolveTransitionHooks(
4196
4252
  oldInnerChild,
4197
4253
  rawProps,
@@ -4327,8 +4383,15 @@ function resolveTransitionHooks(vnode, props, state, instance, postClone) {
4327
4383
  );
4328
4384
  }
4329
4385
  const leavingVNode = leavingVNodesCache[key];
4330
- if (leavingVNode && isSameVNodeType(vnode, leavingVNode) && leavingVNode.el[leaveCbKey]) {
4331
- leavingVNode.el[leaveCbKey]();
4386
+ if (leavingVNode && isSameVNodeType(vnode, leavingVNode)) {
4387
+ let leavingCb = leavingVNode.el[leaveCbKey];
4388
+ if (!leavingCb) {
4389
+ const leavingRoot = getTransitionRoot(leavingVNode);
4390
+ leavingCb = leavingRoot && leavingRoot.el[leaveCbKey];
4391
+ }
4392
+ if (leavingCb) {
4393
+ leavingCb();
4394
+ }
4332
4395
  }
4333
4396
  callHook(hook, [el]);
4334
4397
  },
@@ -4456,6 +4519,12 @@ function setTransitionHooks(vnode, hooks) {
4456
4519
  vnode.ssFallback.transition = hooks.clone(vnode.ssFallback);
4457
4520
  } else {
4458
4521
  vnode.transition = hooks;
4522
+ if (vnode.type === Fragment && isArray(vnode.children)) {
4523
+ const child = filterSingleRoot(vnode.children, false);
4524
+ if (child) {
4525
+ setTransitionHooks(child, hooks);
4526
+ }
4527
+ }
4459
4528
  }
4460
4529
  }
4461
4530
  function getTransitionRawChildren(children, keepComment = false, parentKey) {
@@ -4480,6 +4549,18 @@ function getTransitionRawChildren(children, keepComment = false, parentKey) {
4480
4549
  }
4481
4550
  return ret;
4482
4551
  }
4552
+ function getTransitionRoot(vnode) {
4553
+ if (vnode.component) {
4554
+ return getTransitionRoot(vnode.component.subTree);
4555
+ }
4556
+ if (vnode.type === Fragment) {
4557
+ const child = isArray(vnode.children) && filterSingleRoot(vnode.children, false);
4558
+ return child ? getTransitionRoot(child) : void 0;
4559
+ }
4560
+ if (vnode.type !== Comment) {
4561
+ return vnode;
4562
+ }
4563
+ }
4483
4564
 
4484
4565
  // @__NO_SIDE_EFFECTS__
4485
4566
  function defineComponent(options, extraOptions) {
@@ -5385,14 +5466,22 @@ const hydrateOnVisible = (opts) => (hydrate, forEach) => {
5385
5466
  break;
5386
5467
  }
5387
5468
  }, opts);
5388
- forEach((el) => {
5389
- if (!(el instanceof Element)) return;
5469
+ const observe = (el) => {
5390
5470
  if (elementIsVisibleInViewport(el)) {
5391
5471
  hydrate();
5392
5472
  ob.disconnect();
5393
5473
  return false;
5394
5474
  }
5475
+ if (getComputedStyle(el).display === "contents") {
5476
+ for (let i = 0; i < el.children.length; i++) {
5477
+ if (observe(el.children[i]) === false) return false;
5478
+ }
5479
+ }
5395
5480
  ob.observe(el);
5481
+ };
5482
+ forEach((el) => {
5483
+ if (!(el instanceof Element)) return;
5484
+ return observe(el);
5396
5485
  });
5397
5486
  return () => ob.disconnect();
5398
5487
  };
@@ -5749,6 +5838,7 @@ const KeepAliveImpl = {
5749
5838
  unmount(cached);
5750
5839
  } else if (current) {
5751
5840
  resetShapeFlag(current);
5841
+ if (cached) resetShapeFlag(cached);
5752
5842
  }
5753
5843
  cache.delete(key);
5754
5844
  keys.delete(key);
@@ -6331,9 +6421,11 @@ function renderList(source, renderItem, cache, index) {
6331
6421
  }
6332
6422
  } else if (typeof source === "number") {
6333
6423
  if (!Number.isInteger(source) || source < 0) {
6334
- warn$1(
6335
- `The v-for range expects a positive integer value but got ${source}.`
6336
- );
6424
+ {
6425
+ warn$1(
6426
+ `The v-for range expects a positive integer value but got ${source}.`
6427
+ );
6428
+ }
6337
6429
  ret = [];
6338
6430
  } else {
6339
6431
  ret = new Array(source);
@@ -6652,6 +6744,7 @@ function installCompatInstanceProperties(map) {
6652
6744
  $vnode: (i) => i.vnode,
6653
6745
  // some private properties that are likely accessed...
6654
6746
  _self: (i) => i.proxy,
6747
+ _setupProxy: (i) => i.setupState,
6655
6748
  _uid: (i) => i.uid,
6656
6749
  _data: (i) => i.data,
6657
6750
  _isMounted: (i) => i.isMounted,
@@ -7639,7 +7732,7 @@ function createCompatVue$1(createApp, createSingletonApp) {
7639
7732
  return vm;
7640
7733
  }
7641
7734
  }
7642
- Vue.version = `2.6.14-compat:${"3.5.43"}`;
7735
+ Vue.version = `2.6.14-compat:${"3.5.44"}`;
7643
7736
  Vue.config = singletonApp.config;
7644
7737
  Vue.use = (plugin, ...options) => {
7645
7738
  if (plugin && isFunction(plugin.install)) {
@@ -8796,7 +8889,7 @@ function hasPropsChanged(prevProps, nextProps, emitsOptions) {
8796
8889
  }
8797
8890
  for (let i = 0; i < nextKeys.length; i++) {
8798
8891
  const key = nextKeys[i];
8799
- if (hasPropValueChanged(nextProps, prevProps, key) && !isEmitListener(emitsOptions, key)) {
8892
+ if (!hasOwn(prevProps, key) || hasPropValueChanged(nextProps, prevProps, key) && !isEmitListener(emitsOptions, key)) {
8800
8893
  return true;
8801
8894
  }
8802
8895
  }
@@ -9907,15 +10000,16 @@ function baseCreateRenderer(options, createHydrationFns) {
9907
10000
  for (let i = 0; i < newChildren.length; i++) {
9908
10001
  const oldVNode = oldChildren[i];
9909
10002
  const newVNode = newChildren[i];
10003
+ const oldEl = oldVNode.el || resolveAsyncComponentPlaceholder(oldVNode);
9910
10004
  const container = (
9911
10005
  // oldVNode may be an errored async setup() component inside Suspense
9912
10006
  // which will not have a mounted element
9913
- oldVNode.el && // - In the case of a Fragment, we need to provide the actual parent
10007
+ oldEl && // - In the case of a Fragment, we need to provide the actual parent
9914
10008
  // of the Fragment itself so it can move its children.
9915
10009
  (oldVNode.type === Fragment || // - In the case of different nodes, there is going to be a replacement
9916
10010
  // which also requires the correct parent container
9917
10011
  !isSameVNodeType(oldVNode, newVNode) || // - In the case of a component, it could contain anything.
9918
- oldVNode.shapeFlag & (6 | 64 | 128)) ? hostParentNode(oldVNode.el) : (
10012
+ oldVNode.shapeFlag & (6 | 64 | 128)) ? hostParentNode(oldEl) : (
9919
10013
  // In other cases, the parent container is not actually used so we
9920
10014
  // just pass the block element here to avoid a DOM parentNode call.
9921
10015
  fallbackContainer
@@ -10080,7 +10174,12 @@ function baseCreateRenderer(options, createHydrationFns) {
10080
10174
  }
10081
10175
  if (isHmrUpdating) initialVNode.el = null;
10082
10176
  if (instance.asyncDep) {
10083
- parentSuspense && parentSuspense.registerDep(instance, setupRenderEffect, optimized);
10177
+ parentSuspense && parentSuspense.registerDep(
10178
+ instance,
10179
+ setupRenderEffect,
10180
+ optimized,
10181
+ namespace
10182
+ );
10084
10183
  if (!initialVNode.el) {
10085
10184
  const placeholder = instance.subTree = createVNode(Comment);
10086
10185
  processCommentNode(null, placeholder, container, anchor);
@@ -10110,6 +10209,7 @@ function baseCreateRenderer(options, createHydrationFns) {
10110
10209
  pushWarningContext(n2);
10111
10210
  }
10112
10211
  n2.el = n1.el;
10212
+ n2.placeholder = n1.placeholder;
10113
10213
  updateComponentPreRender(instance, n2, optimized);
10114
10214
  {
10115
10215
  popWarningContext();
@@ -10121,6 +10221,7 @@ function baseCreateRenderer(options, createHydrationFns) {
10121
10221
  }
10122
10222
  } else {
10123
10223
  n2.el = n1.el;
10224
+ n2.placeholder = n1.placeholder;
10124
10225
  instance.vnode = n2;
10125
10226
  }
10126
10227
  };
@@ -10798,18 +10899,9 @@ function baseCreateRenderer(options, createHydrationFns) {
10798
10899
  };
10799
10900
  const remove = (vnode) => {
10800
10901
  const { type, el, anchor, transition } = vnode;
10801
- if (type === Fragment) {
10802
- if (vnode.patchFlag > 0 && vnode.patchFlag & 2048 && transition && !transition.persisted) {
10803
- vnode.children.forEach((child) => {
10804
- if (child.type === Comment) {
10805
- hostRemove(child.el);
10806
- } else {
10807
- remove(child);
10808
- }
10809
- });
10810
- } else {
10811
- removeFragment(el, anchor);
10812
- }
10902
+ const isFragment = type === Fragment;
10903
+ if (isFragment && !transition) {
10904
+ removeFragment(el, anchor);
10813
10905
  return;
10814
10906
  }
10815
10907
  if (type === Static) {
@@ -10819,17 +10911,25 @@ function baseCreateRenderer(options, createHydrationFns) {
10819
10911
  }
10820
10912
  return;
10821
10913
  }
10914
+ const leavingNode = isFragment ? getTransitionRoot(vnode) : vnode;
10822
10915
  const performRemove = () => {
10823
- hostRemove(el);
10916
+ if (isFragment) {
10917
+ if (hostParentNode(el)) {
10918
+ removeFragment(el, anchor);
10919
+ }
10920
+ } else {
10921
+ hostRemove(el);
10922
+ }
10824
10923
  if (transition && !transition.persisted && transition.afterLeave) {
10825
10924
  transition.afterLeave();
10826
10925
  }
10827
10926
  };
10828
- if (vnode.shapeFlag & 1 && transition && !transition.persisted) {
10927
+ if (leavingNode && leavingNode.shapeFlag & 1 && transition && !transition.persisted) {
10829
10928
  const { leave, delayLeave } = transition;
10830
- const performLeave = () => leave(el, performRemove);
10929
+ const leavingEl = leavingNode.el;
10930
+ const performLeave = () => leave(leavingEl, performRemove);
10831
10931
  if (delayLeave) {
10832
- delayLeave(vnode.el, performRemove, performLeave);
10932
+ delayLeave(leavingEl, performRemove, performLeave);
10833
10933
  } else {
10834
10934
  performLeave();
10835
10935
  }
@@ -10899,32 +10999,26 @@ function baseCreateRenderer(options, createHydrationFns) {
10899
10999
  const teleportEnd = el && el[TeleportEndKey];
10900
11000
  return teleportEnd ? hostNextSibling(teleportEnd) : el;
10901
11001
  };
10902
- let isFlushing = false;
10903
11002
  const render = (vnode, container, namespace) => {
10904
- let instance;
10905
- if (vnode == null) {
10906
- if (container._vnode) {
10907
- unmount(container._vnode, null, null, true);
10908
- instance = container._vnode.component;
11003
+ const minUid = vnode && container._vnode ? void 0 : vnode && vnode.component ? vnode.component.uid : getNextUid();
11004
+ flushOnAppMount(() => {
11005
+ if (vnode == null) {
11006
+ if (container._vnode) {
11007
+ unmount(container._vnode, null, null, true);
11008
+ }
11009
+ } else {
11010
+ patch(
11011
+ container._vnode || null,
11012
+ vnode,
11013
+ container,
11014
+ null,
11015
+ null,
11016
+ null,
11017
+ namespace
11018
+ );
10909
11019
  }
10910
- } else {
10911
- patch(
10912
- container._vnode || null,
10913
- vnode,
10914
- container,
10915
- null,
10916
- null,
10917
- null,
10918
- namespace
10919
- );
10920
- }
10921
- container._vnode = vnode;
10922
- if (!isFlushing) {
10923
- isFlushing = true;
10924
- flushPreFlushCbs(instance);
10925
- flushPostFlushCbs();
10926
- isFlushing = false;
10927
- }
11020
+ container._vnode = vnode;
11021
+ }, minUid);
10928
11022
  };
10929
11023
  const internals = {
10930
11024
  p: patch,
@@ -11512,7 +11606,10 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
11512
11606
  next() {
11513
11607
  return suspense.activeBranch && next(suspense.activeBranch);
11514
11608
  },
11515
- registerDep(instance, setupRenderEffect, optimized2) {
11609
+ // `namespace` intentionally shadows the boundary's own: the dep must be
11610
+ // mounted with the namespace of the position it was rendered at, which can
11611
+ // differ from the boundary's (e.g. a component nested inside an <svg>).
11612
+ registerDep(instance, setupRenderEffect, optimized2, namespace2) {
11516
11613
  const isInPendingSuspense = !!suspense.pendingBranch;
11517
11614
  if (isInPendingSuspense) {
11518
11615
  suspense.deps++;
@@ -11525,7 +11622,7 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
11525
11622
  return;
11526
11623
  }
11527
11624
  unsetCurrentInstance();
11528
- if (hydratedEl && !instance.scope.active) {
11625
+ if (!instance.scope.active) {
11529
11626
  if (isInPendingSuspense && --suspense.deps === 0) {
11530
11627
  suspense.resolve();
11531
11628
  }
@@ -11552,7 +11649,7 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
11552
11649
  // consider the comment placeholder case.
11553
11650
  hydratedEl ? null : next(instance.subTree),
11554
11651
  suspense,
11555
- namespace,
11652
+ namespace2,
11556
11653
  optimized2
11557
11654
  );
11558
11655
  if (placeholder) {
@@ -12153,6 +12250,9 @@ function invokeVNodeHook(hook, instance, vnode, prevVNode = null) {
12153
12250
 
12154
12251
  const emptyAppContext = createAppContext();
12155
12252
  let uid = 0;
12253
+ function getNextUid() {
12254
+ return uid;
12255
+ }
12156
12256
  function createComponentInstance(vnode, parent, suspense) {
12157
12257
  const type = vnode.type;
12158
12258
  const appContext = (parent ? parent.appContext : vnode.appContext) || emptyAppContext;
@@ -12837,7 +12937,7 @@ function isMemoSame(cached, memo) {
12837
12937
  return true;
12838
12938
  }
12839
12939
 
12840
- const version = "3.5.43";
12940
+ const version = "3.5.44";
12841
12941
  const warn = warn$1 ;
12842
12942
  const ErrorTypeStrings = ErrorTypeStrings$1 ;
12843
12943
  const devtools = devtools$1 ;
@@ -13457,7 +13557,9 @@ function patchStyle(el, prev, next) {
13457
13557
  }
13458
13558
  }
13459
13559
  if (vShowOriginalDisplay in el) {
13460
- el[vShowOriginalDisplay] = hasControlledDisplay ? style.display : "";
13560
+ if (!isCssString || prev !== next) {
13561
+ el[vShowOriginalDisplay] = hasControlledDisplay ? style.display : "";
13562
+ }
13461
13563
  if (el[vShowHidden]) {
13462
13564
  style.display = "none";
13463
13565
  }
@@ -13983,7 +14085,9 @@ class VueElement extends BaseClass {
13983
14085
  "Custom element style injection is not supported when using shadowRoot: false"
13984
14086
  );
13985
14087
  }
13986
- this._mount(def);
14088
+ if (this._connected) {
14089
+ this._mount(def);
14090
+ }
13987
14091
  };
13988
14092
  const asyncDef = this._def.__asyncLoader;
13989
14093
  if (asyncDef) {
@@ -14353,6 +14457,7 @@ const positionMap = /* @__PURE__ */ new WeakMap();
14353
14457
  const newPositionMap = /* @__PURE__ */ new WeakMap();
14354
14458
  const moveCbKey = /* @__PURE__ */ Symbol("_moveCb");
14355
14459
  const enterCbKey = /* @__PURE__ */ Symbol("_enterCb");
14460
+ const pendingGroups = /* @__PURE__ */ new WeakMap();
14356
14461
  const decorate = (t) => {
14357
14462
  delete t.props.mode;
14358
14463
  {
@@ -14371,21 +14476,30 @@ const TransitionGroupImpl = /* @__PURE__ */ decorate({
14371
14476
  const state = useTransitionState();
14372
14477
  let prevChildren;
14373
14478
  let children;
14374
- onUpdated(() => {
14375
- if (!prevChildren.length) {
14376
- return;
14479
+ let origins;
14480
+ let moves;
14481
+ const willMove = () => {
14482
+ if (moves === void 0) {
14483
+ moves = prevChildren.length > 0 && hasCSSTransform(
14484
+ prevChildren[0].el,
14485
+ instance.vnode.el,
14486
+ resolveMoveClass(props)
14487
+ );
14377
14488
  }
14378
- const moveClass = props.moveClass || `${props.name || "v"}-move`;
14379
- if (!hasCSSTransform(
14380
- prevChildren[0].el,
14381
- instance.vnode.el,
14382
- moveClass
14383
- )) {
14489
+ return moves;
14490
+ };
14491
+ onUpdated(() => {
14492
+ pendingGroups.delete(instance);
14493
+ if (!willMove()) {
14384
14494
  prevChildren = [];
14495
+ origins = void 0;
14385
14496
  return;
14386
14497
  }
14498
+ const moveClass = resolveMoveClass(props);
14387
14499
  prevChildren.forEach(callPendingCbs);
14388
- prevChildren.forEach(recordPosition);
14500
+ const shift = origins && getOriginShift(origins, instance.vnode.el);
14501
+ origins = void 0;
14502
+ prevChildren.forEach((c) => recordPosition(c, shift));
14389
14503
  const movedChildren = prevChildren.filter(applyTranslation);
14390
14504
  forceReflow(instance.vnode.el);
14391
14505
  movedChildren.forEach((c) => {
@@ -14418,6 +14532,7 @@ const TransitionGroupImpl = /* @__PURE__ */ decorate({
14418
14532
  tag = "span";
14419
14533
  }
14420
14534
  prevChildren = [];
14535
+ moves = void 0;
14421
14536
  if (children) {
14422
14537
  for (let i = 0; i < children.length; i++) {
14423
14538
  const child = children[i];
@@ -14449,6 +14564,10 @@ const TransitionGroupImpl = /* @__PURE__ */ decorate({
14449
14564
  warn(`<TransitionGroup> children must be keyed.`);
14450
14565
  }
14451
14566
  }
14567
+ if (prevChildren.length) {
14568
+ origins = getOrigins(instance);
14569
+ pendingGroups.set(instance, willMove);
14570
+ }
14452
14571
  return createVNode(tag, null, children);
14453
14572
  };
14454
14573
  }
@@ -14463,8 +14582,11 @@ function callPendingCbs(c) {
14463
14582
  el[enterCbKey]();
14464
14583
  }
14465
14584
  }
14466
- function recordPosition(c) {
14467
- newPositionMap.set(c, getPosition(c.el));
14585
+ function resolveMoveClass(props) {
14586
+ return props.moveClass || `${props.name || "v"}-move`;
14587
+ }
14588
+ function recordPosition(c, shift) {
14589
+ newPositionMap.set(c, getPosition(c.el, shift));
14468
14590
  }
14469
14591
  function applyTranslation(c) {
14470
14592
  const oldPos = positionMap.get(c);
@@ -14488,13 +14610,41 @@ function applyTranslation(c) {
14488
14610
  return c;
14489
14611
  }
14490
14612
  }
14491
- function getPosition(el) {
14613
+ function getPosition(el, shift) {
14492
14614
  const rect = el.getBoundingClientRect();
14493
14615
  return {
14494
- left: rect.left,
14495
- top: rect.top
14616
+ left: rect.left - (shift ? shift.left : 0),
14617
+ top: rect.top - (shift ? shift.top : 0)
14496
14618
  };
14497
14619
  }
14620
+ function getOrigins(instance) {
14621
+ let origins;
14622
+ for (let group = instance.parent; group; group = group.parent) {
14623
+ const willMove = pendingGroups.get(group);
14624
+ if (willMove) {
14625
+ const item = findItem(group.vnode.el, instance.vnode.el);
14626
+ if (item) {
14627
+ (origins || (origins = [])).push(
14628
+ extend(getPosition(item), { item, willMove })
14629
+ );
14630
+ }
14631
+ }
14632
+ }
14633
+ return origins;
14634
+ }
14635
+ function findItem(root, node) {
14636
+ const container = root.nodeType === 1 ? root : root.parentNode;
14637
+ while (node && node.parentNode !== container) {
14638
+ node = node.parentNode;
14639
+ }
14640
+ if (node && node.nodeType === 1) {
14641
+ return node;
14642
+ }
14643
+ }
14644
+ function getOriginShift(origins, root) {
14645
+ const origin = origins.find((o) => o.willMove() && o.item.contains(root));
14646
+ return origin && getPosition(origin.item, origin);
14647
+ }
14498
14648
  function hasCSSTransform(el, root, moveClass) {
14499
14649
  const clone = el.cloneNode();
14500
14650
  const _vtc = el[vtcKey];