vue 3.5.42 → 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 v3.5.42
2
+ * vue v3.5.44
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
@@ -202,10 +202,10 @@ var Vue = (function (exports) {
202
202
  }
203
203
  const listDelimiterRE = /;(?![^(]*\))/g;
204
204
  const propertyDelimiterRE = /:([^]+)/;
205
- const styleCommentRE = /\/\*[^]*?\*\//g;
205
+ const styleCommentRE = /"(?:[^"\\]|\\[^])*"|'(?:[^'\\]|\\[^])*'|\\[^]|\/\*[^]*?\*\//g;
206
206
  function parseStringStyle(cssText) {
207
207
  const ret = {};
208
- cssText.replace(styleCommentRE, "").split(listDelimiterRE).forEach((item) => {
208
+ cssText.replace(styleCommentRE, (match) => match.startsWith("/*") ? "" : match).split(listDelimiterRE).forEach((item) => {
209
209
  if (item) {
210
210
  const tmp = item.split(propertyDelimiterRE);
211
211
  tmp.length > 1 && (ret[tmp[0].trim()] = tmp[1].trim());
@@ -267,7 +267,7 @@ var Vue = (function (exports) {
267
267
  const isMathMLTag = /* @__PURE__ */ makeMap(MATH_TAGS);
268
268
  const isVoidTag = /* @__PURE__ */ makeMap(VOID_TAGS);
269
269
 
270
- const specialBooleanAttrs = `itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly`;
270
+ const specialBooleanAttrs = `itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,playsinline,readonly`;
271
271
  const isSpecialBooleanAttr = /* @__PURE__ */ makeMap(specialBooleanAttrs);
272
272
  const isBooleanAttr = /* @__PURE__ */ makeMap(
273
273
  specialBooleanAttrs + `,async,autofocus,autoplay,controls,default,defer,disabled,inert,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected`
@@ -297,22 +297,22 @@ var Vue = (function (exports) {
297
297
  );
298
298
  }
299
299
 
300
- function looseCompareArrays(a, b) {
300
+ function looseCompareArrays(a, b, seen) {
301
301
  if (a.length !== b.length) return false;
302
302
  let equal = true;
303
303
  for (let i = 0; equal && i < a.length; i++) {
304
- equal = looseEqual(a[i], b[i]);
304
+ equal = looseEqual(a[i], b[i], seen);
305
305
  }
306
306
  return equal;
307
307
  }
308
- function looseCompareCollections(a, b) {
308
+ function looseCompareCollections(a, b, seen) {
309
309
  if (a.size !== b.size) return false;
310
310
  const candidates = Array.from(b);
311
311
  const matched = new Uint8Array(candidates.length);
312
312
  for (const item of a) {
313
313
  let index = -1;
314
314
  for (let i = 0; i < candidates.length; i++) {
315
- if (!matched[i] && looseEqual(item, candidates[i])) {
315
+ if (!matched[i] && looseEqual(item, candidates[i], seen)) {
316
316
  index = i;
317
317
  break;
318
318
  }
@@ -322,7 +322,47 @@ var Vue = (function (exports) {
322
322
  }
323
323
  return true;
324
324
  }
325
- function looseEqual(a, b) {
325
+ function looseCompareObjects(a, b, seen) {
326
+ let aValidType = isMap(a);
327
+ let bValidType = isMap(b);
328
+ if (aValidType || bValidType) {
329
+ return aValidType && bValidType ? looseCompareCollections(a, b, seen) : false;
330
+ }
331
+ aValidType = isSet(a);
332
+ bValidType = isSet(b);
333
+ if (aValidType || bValidType) {
334
+ return aValidType && bValidType ? looseCompareCollections(a, b, seen) : false;
335
+ }
336
+ const aKeysCount = Object.keys(a).length;
337
+ const bKeysCount = Object.keys(b).length;
338
+ if (aKeysCount !== bKeysCount) {
339
+ return false;
340
+ }
341
+ for (const key in a) {
342
+ const aHasKey = a.hasOwnProperty(key);
343
+ const bHasKey = b.hasOwnProperty(key);
344
+ if (aHasKey && !bHasKey || !aHasKey && bHasKey || !looseEqual(a[key], b[key], seen)) {
345
+ return false;
346
+ }
347
+ }
348
+ return String(a) === String(b);
349
+ }
350
+ function looseCompareNested(a, b, seen, compare) {
351
+ if (!seen) {
352
+ seen = [/* @__PURE__ */ new Map(), /* @__PURE__ */ new Map()];
353
+ }
354
+ const [seenA, seenB] = seen;
355
+ if (seenA.has(a) || seenB.has(b)) {
356
+ return seenA.get(a) === b && seenB.get(b) === a;
357
+ }
358
+ seenA.set(a, b);
359
+ seenB.set(b, a);
360
+ const equal = compare(a, b, seen);
361
+ seenA.delete(a);
362
+ seenB.delete(b);
363
+ return equal;
364
+ }
365
+ function looseEqual(a, b, seen) {
326
366
  if (a === b) return true;
327
367
  let aValidType = isDate(a);
328
368
  let bValidType = isDate(b);
@@ -337,7 +377,7 @@ var Vue = (function (exports) {
337
377
  aValidType = isArray(a);
338
378
  bValidType = isArray(b);
339
379
  if (aValidType || bValidType) {
340
- return aValidType && bValidType ? looseCompareArrays(a, b) : false;
380
+ return aValidType && bValidType ? looseCompareNested(a, b, seen, looseCompareArrays) : false;
341
381
  }
342
382
  aValidType = isObject(a);
343
383
  bValidType = isObject(b);
@@ -345,28 +385,7 @@ var Vue = (function (exports) {
345
385
  if (!aValidType || !bValidType) {
346
386
  return false;
347
387
  }
348
- aValidType = isMap(a);
349
- bValidType = isMap(b);
350
- if (aValidType || bValidType) {
351
- return aValidType && bValidType ? looseCompareCollections(a, b) : false;
352
- }
353
- aValidType = isSet(a);
354
- bValidType = isSet(b);
355
- if (aValidType || bValidType) {
356
- return aValidType && bValidType ? looseCompareCollections(a, b) : false;
357
- }
358
- const aKeysCount = Object.keys(a).length;
359
- const bKeysCount = Object.keys(b).length;
360
- if (aKeysCount !== bKeysCount) {
361
- return false;
362
- }
363
- for (const key in a) {
364
- const aHasKey = a.hasOwnProperty(key);
365
- const bHasKey = b.hasOwnProperty(key);
366
- if (aHasKey && !bHasKey || !aHasKey && bHasKey || !looseEqual(a[key], b[key])) {
367
- return false;
368
- }
369
- }
388
+ return looseCompareNested(a, b, seen, looseCompareObjects);
370
389
  }
371
390
  return String(a) === String(b);
372
391
  }
@@ -1167,7 +1186,9 @@ var Vue = (function (exports) {
1167
1186
  const raw = toRaw(array);
1168
1187
  if (raw === array) return raw;
1169
1188
  track(raw, "iterate", ARRAY_ITERATE_KEY);
1170
- return isShallow(array) ? raw : raw.map(toReactive);
1189
+ if (isShallow(array)) return raw;
1190
+ if (!isReadonly(array)) return raw.map(toReactive);
1191
+ return isReactive(array) ? raw.map((item) => toReadonly(toReactive(item))) : raw.map(toReadonly);
1171
1192
  }
1172
1193
  function shallowReadArray(arr) {
1173
1194
  track(arr = toRaw(arr), "iterate", ARRAY_ITERATE_KEY);
@@ -1294,19 +1315,41 @@ var Vue = (function (exports) {
1294
1315
  };
1295
1316
  function iterator(self, method, wrapValue) {
1296
1317
  const arr = shallowReadArray(self);
1297
- const iter = arr[method]();
1318
+ const methodFn = arr[method];
1319
+ const iter = methodFn.call(arr);
1298
1320
  if (arr !== self && !isShallow(self)) {
1299
- iter._next = iter.next;
1300
- iter.next = () => {
1301
- const result = iter._next();
1302
- if (!result.done) {
1303
- result.value = wrapValue(result.value);
1321
+ if (iter[Symbol.toStringTag] === "Array Iterator") {
1322
+ const wrapped = Object.create(Object.getPrototypeOf(iter));
1323
+ wrapped.next = () => wrapResult(iter.next(), wrapValue);
1324
+ if (methodFn !== arrayProto[method]) {
1325
+ Object.defineProperties(wrapped, {
1326
+ return: {
1327
+ get() {
1328
+ const fn = iter.return;
1329
+ return typeof fn === "function" ? fn.bind(iter) : fn;
1330
+ }
1331
+ },
1332
+ throw: {
1333
+ get() {
1334
+ const fn = iter.throw;
1335
+ return typeof fn === "function" ? fn.bind(iter) : fn;
1336
+ }
1337
+ }
1338
+ });
1304
1339
  }
1305
- return result;
1306
- };
1340
+ return wrapped;
1341
+ }
1342
+ iter._next = iter.next;
1343
+ iter.next = () => wrapResult(iter._next(), wrapValue);
1307
1344
  }
1308
1345
  return iter;
1309
1346
  }
1347
+ function wrapResult(result, wrapValue) {
1348
+ if (!result.done) {
1349
+ result.value = wrapValue(result.value);
1350
+ }
1351
+ return result;
1352
+ }
1310
1353
  const arrayProto = Array.prototype;
1311
1354
  function apply(self, method, fn, thisArg, wrappedRetFn, args) {
1312
1355
  const arr = shallowReadArray(self);
@@ -1729,6 +1772,8 @@ var Vue = (function (exports) {
1729
1772
  return !isReadonly2;
1730
1773
  } else if (key === "__v_isReadonly") {
1731
1774
  return isReadonly2;
1775
+ } else if (key === "__v_isShallow") {
1776
+ return shallow;
1732
1777
  } else if (key === "__v_raw") {
1733
1778
  return target;
1734
1779
  }
@@ -2274,9 +2319,11 @@ var Vue = (function (exports) {
2274
2319
  if (once && cb) {
2275
2320
  const _cb = cb;
2276
2321
  cb = (...args) => {
2277
- const res = _cb(...args);
2278
- watchHandle();
2279
- return res;
2322
+ try {
2323
+ return _cb(...args);
2324
+ } finally {
2325
+ watchHandle();
2326
+ }
2280
2327
  };
2281
2328
  }
2282
2329
  let oldValue = isMultiSource ? new Array(source.length).fill(INITIAL_WATCHER_VALUE) : INITIAL_WATCHER_VALUE;
@@ -2287,12 +2334,13 @@ var Vue = (function (exports) {
2287
2334
  if (cb) {
2288
2335
  const newValue = effect.run();
2289
2336
  if (immediateFirstRun || deep || forceTrigger || (isMultiSource ? newValue.some((v, i) => hasChanged(v, oldValue[i])) : hasChanged(newValue, oldValue))) {
2290
- if (cleanup) {
2291
- cleanup();
2292
- }
2293
2337
  const currentWatcher = activeWatcher;
2294
- activeWatcher = effect;
2338
+ pauseTracking();
2295
2339
  try {
2340
+ if (cleanup) {
2341
+ cleanup();
2342
+ }
2343
+ activeWatcher = effect;
2296
2344
  const args = [
2297
2345
  newValue,
2298
2346
  // pass undefined as the old value when it's changed for the first time
@@ -2306,6 +2354,7 @@ var Vue = (function (exports) {
2306
2354
  );
2307
2355
  } finally {
2308
2356
  activeWatcher = currentWatcher;
2357
+ resetTracking();
2309
2358
  }
2310
2359
  }
2311
2360
  } else {
@@ -2706,21 +2755,21 @@ var Vue = (function (exports) {
2706
2755
  }
2707
2756
  queueFlush();
2708
2757
  }
2709
- function flushPreFlushCbs(instance, seen, i = flushIndex + 1) {
2758
+ function flushPreFlushCbs(instance, minUid, seen, i = flushIndex + 1) {
2710
2759
  {
2711
2760
  seen = seen || /* @__PURE__ */ new Map();
2712
2761
  }
2713
2762
  for (; i < queue.length; i++) {
2714
2763
  const cb = queue[i];
2715
2764
  if (cb && cb.flags & 2) {
2716
- if (instance && cb.id !== instance.uid) {
2765
+ if (instance && cb.id !== instance.uid || minUid !== void 0 && !(cb.id >= minUid)) {
2717
2766
  continue;
2718
2767
  }
2719
2768
  if (checkRecursiveUpdates(seen, cb)) {
2720
2769
  continue;
2721
2770
  }
2722
2771
  queue.splice(i, 1);
2723
- i--;
2772
+ i = instance ? i - 1 : flushIndex;
2724
2773
  if (cb.flags & 4) {
2725
2774
  cb.flags &= -2;
2726
2775
  }
@@ -2731,12 +2780,23 @@ var Vue = (function (exports) {
2731
2780
  }
2732
2781
  }
2733
2782
  }
2734
- function flushPostFlushCbs(seen) {
2783
+ function flushPostFlushCbs(seen, skip, minUid = 0) {
2735
2784
  if (pendingPostFlushCbs.length) {
2736
- const deduped = [...new Set(pendingPostFlushCbs)].sort(
2737
- (a, b) => getId(a) - getId(b)
2738
- );
2739
- pendingPostFlushCbs.length = 0;
2785
+ let cbs = pendingPostFlushCbs;
2786
+ let kept = 0;
2787
+ if (skip) {
2788
+ cbs = [];
2789
+ for (let i = 0; i < pendingPostFlushCbs.length; i++) {
2790
+ const cb = pendingPostFlushCbs[i];
2791
+ if (cb.i !== void 0 ? !cb.i || cb.i.uid < minUid : skip.has(cb)) {
2792
+ pendingPostFlushCbs[kept++] = cb;
2793
+ } else {
2794
+ cbs.push(cb);
2795
+ }
2796
+ }
2797
+ }
2798
+ const deduped = [...new Set(cbs)].sort((a, b) => getId(a) - getId(b));
2799
+ pendingPostFlushCbs.length = kept;
2740
2800
  if (activePostFlushCbs) {
2741
2801
  for (let i = 0; i < deduped.length; i++) {
2742
2802
  activePostFlushCbs.push(deduped[i]);
@@ -2762,6 +2822,22 @@ var Vue = (function (exports) {
2762
2822
  postFlushIndex = 0;
2763
2823
  }
2764
2824
  }
2825
+ let isFlushing = false;
2826
+ function flushOnAppMount(fn, minUid) {
2827
+ if (isFlushing) {
2828
+ fn();
2829
+ return;
2830
+ }
2831
+ const queued = minUid === void 0 ? void 0 : new Set(pendingPostFlushCbs);
2832
+ fn();
2833
+ isFlushing = true;
2834
+ try {
2835
+ flushPreFlushCbs(void 0, minUid);
2836
+ flushPostFlushCbs(void 0, queued, minUid);
2837
+ } finally {
2838
+ isFlushing = false;
2839
+ }
2840
+ }
2765
2841
  const getId = (job) => job.id == null ? job.flags & 2 ? -1 : Infinity : job.id;
2766
2842
  function flushJobs(seen) {
2767
2843
  {
@@ -3242,6 +3318,7 @@ var Vue = (function (exports) {
3242
3318
  let isPre = false;
3243
3319
  if (flush === "post") {
3244
3320
  baseWatchOptions.scheduler = (job) => {
3321
+ job.i = instance;
3245
3322
  queuePostRenderEffect(job, instance && instance.suspense);
3246
3323
  };
3247
3324
  } else if (flush !== "sync") {
@@ -3536,7 +3613,11 @@ var Vue = (function (exports) {
3536
3613
  };
3537
3614
  function moveTeleport(vnode, container, parentAnchor, { o: { insert }, m: move }, moveType = 2) {
3538
3615
  if (moveType === 0) {
3616
+ if (vnode.targetStart) {
3617
+ insert(vnode.targetStart, container, parentAnchor);
3618
+ }
3539
3619
  insert(vnode.targetAnchor, container, parentAnchor);
3620
+ parentAnchor = vnode.targetAnchor;
3540
3621
  }
3541
3622
  const { el, anchor, shapeFlag, children, props } = vnode;
3542
3623
  const isReorder = moveType === 2;
@@ -3705,10 +3786,6 @@ var Vue = (function (exports) {
3705
3786
  onAfterAppear: TransitionHookValidator,
3706
3787
  onAppearCancelled: TransitionHookValidator
3707
3788
  };
3708
- const recursiveGetSubtree = (instance) => {
3709
- const subTree = instance.subTree;
3710
- return subTree.component ? recursiveGetSubtree(subTree.component) : subTree;
3711
- };
3712
3789
  const BaseTransitionImpl = {
3713
3790
  name: `BaseTransition`,
3714
3791
  props: BaseTransitionPropsValidators,
@@ -3749,7 +3826,7 @@ var Vue = (function (exports) {
3749
3826
  setTransitionHooks(innerChild, enterHooks);
3750
3827
  }
3751
3828
  let oldInnerChild = instance.subTree && getInnerChild$1(instance.subTree);
3752
- if (oldInnerChild && oldInnerChild.type !== Comment && !isSameVNodeType(oldInnerChild, innerChild) && recursiveGetSubtree(instance).type !== Comment) {
3829
+ if (oldInnerChild && oldInnerChild.type !== Comment && !isSameVNodeType(oldInnerChild, innerChild) && getTransitionRoot(instance.subTree)) {
3753
3830
  let leavingHooks = resolveTransitionHooks(
3754
3831
  oldInnerChild,
3755
3832
  rawProps,
@@ -3882,8 +3959,15 @@ var Vue = (function (exports) {
3882
3959
  );
3883
3960
  }
3884
3961
  const leavingVNode = leavingVNodesCache[key];
3885
- if (leavingVNode && isSameVNodeType(vnode, leavingVNode) && leavingVNode.el[leaveCbKey]) {
3886
- leavingVNode.el[leaveCbKey]();
3962
+ if (leavingVNode && isSameVNodeType(vnode, leavingVNode)) {
3963
+ let leavingCb = leavingVNode.el[leaveCbKey];
3964
+ if (!leavingCb) {
3965
+ const leavingRoot = getTransitionRoot(leavingVNode);
3966
+ leavingCb = leavingRoot && leavingRoot.el[leaveCbKey];
3967
+ }
3968
+ if (leavingCb) {
3969
+ leavingCb();
3970
+ }
3887
3971
  }
3888
3972
  callHook(hook, [el]);
3889
3973
  },
@@ -4011,6 +4095,12 @@ var Vue = (function (exports) {
4011
4095
  vnode.ssFallback.transition = hooks.clone(vnode.ssFallback);
4012
4096
  } else {
4013
4097
  vnode.transition = hooks;
4098
+ if (vnode.type === Fragment && isArray(vnode.children)) {
4099
+ const child = filterSingleRoot(vnode.children, false);
4100
+ if (child) {
4101
+ setTransitionHooks(child, hooks);
4102
+ }
4103
+ }
4014
4104
  }
4015
4105
  }
4016
4106
  function getTransitionRawChildren(children, keepComment = false, parentKey) {
@@ -4035,6 +4125,18 @@ var Vue = (function (exports) {
4035
4125
  }
4036
4126
  return ret;
4037
4127
  }
4128
+ function getTransitionRoot(vnode) {
4129
+ if (vnode.component) {
4130
+ return getTransitionRoot(vnode.component.subTree);
4131
+ }
4132
+ if (vnode.type === Fragment) {
4133
+ const child = isArray(vnode.children) && filterSingleRoot(vnode.children, false);
4134
+ return child ? getTransitionRoot(child) : void 0;
4135
+ }
4136
+ if (vnode.type !== Comment) {
4137
+ return vnode;
4138
+ }
4139
+ }
4038
4140
 
4039
4141
  // @__NO_SIDE_EFFECTS__
4040
4142
  function defineComponent(options, extraOptions) {
@@ -4408,13 +4510,15 @@ var Vue = (function (exports) {
4408
4510
  getContainerType(container),
4409
4511
  optimized
4410
4512
  );
4411
- if (isAsyncWrapper(vnode) && !vnode.component.subTree) {
4513
+ if ((isAsyncWrapper(vnode) || vnode.component.asyncDep) && !vnode.component.subTree) {
4412
4514
  let subTree;
4413
4515
  if (isFragmentStart) {
4414
4516
  subTree = createVNode(Static);
4415
4517
  subTree.anchor = nextNode ? nextNode.previousSibling : container.lastChild;
4416
4518
  } else {
4417
- subTree = node.nodeType === 3 ? createTextVNode("") : createVNode("div");
4519
+ subTree = node.nodeType === 3 ? createTextVNode("") : createVNode(
4520
+ node.nodeType === 8 ? Comment : "div"
4521
+ );
4418
4522
  }
4419
4523
  subTree.el = node;
4420
4524
  vnode.component.subTree = subTree;
@@ -4938,14 +5042,22 @@ Server rendered element contains fewer child nodes than client vdom.`
4938
5042
  break;
4939
5043
  }
4940
5044
  }, opts);
4941
- forEach((el) => {
4942
- if (!(el instanceof Element)) return;
5045
+ const observe = (el) => {
4943
5046
  if (elementIsVisibleInViewport(el)) {
4944
5047
  hydrate();
4945
5048
  ob.disconnect();
4946
5049
  return false;
4947
5050
  }
5051
+ if (getComputedStyle(el).display === "contents") {
5052
+ for (let i = 0; i < el.children.length; i++) {
5053
+ if (observe(el.children[i]) === false) return false;
5054
+ }
5055
+ }
4948
5056
  ob.observe(el);
5057
+ };
5058
+ forEach((el) => {
5059
+ if (!(el instanceof Element)) return;
5060
+ return observe(el);
4949
5061
  });
4950
5062
  return () => ob.disconnect();
4951
5063
  };
@@ -5296,6 +5408,7 @@ Server rendered element contains fewer child nodes than client vdom.`
5296
5408
  unmount(cached);
5297
5409
  } else if (current) {
5298
5410
  resetShapeFlag(current);
5411
+ if (cached) resetShapeFlag(cached);
5299
5412
  }
5300
5413
  cache.delete(key);
5301
5414
  keys.delete(key);
@@ -5587,9 +5700,11 @@ If this is a native custom element, make sure to exclude it from component resol
5587
5700
  }
5588
5701
  } else if (typeof source === "number") {
5589
5702
  if (!Number.isInteger(source) || source < 0) {
5590
- warn$1(
5591
- `The v-for range expects a positive integer value but got ${source}.`
5592
- );
5703
+ {
5704
+ warn$1(
5705
+ `The v-for range expects a positive integer value but got ${source}.`
5706
+ );
5707
+ }
5593
5708
  ret = [];
5594
5709
  } else {
5595
5710
  ret = new Array(source);
@@ -7224,7 +7339,7 @@ If you want to remount the same app, move your app creation logic into a factory
7224
7339
  }
7225
7340
  for (let i = 0; i < nextKeys.length; i++) {
7226
7341
  const key = nextKeys[i];
7227
- if (hasPropValueChanged(nextProps, prevProps, key) && !isEmitListener(emitsOptions, key)) {
7342
+ if (!hasOwn(prevProps, key) || hasPropValueChanged(nextProps, prevProps, key) && !isEmitListener(emitsOptions, key)) {
7228
7343
  return true;
7229
7344
  }
7230
7345
  }
@@ -7851,6 +7966,12 @@ If you want to remount the same app, move your app creation logic into a factory
7851
7966
  optimized = false;
7852
7967
  n2.dynamicChildren = null;
7853
7968
  }
7969
+ if (n2.dynamicChildren && n1 && n1.dynamicChildren && n1.dynamicChildren.hasOnce) {
7970
+ if (n2.dynamicChildren === EMPTY_ARR) {
7971
+ n2.dynamicChildren = [];
7972
+ }
7973
+ n2.dynamicChildren.hasOnce = true;
7974
+ }
7854
7975
  const { type, ref, shapeFlag } = n2;
7855
7976
  switch (type) {
7856
7977
  case Text:
@@ -8257,15 +8378,16 @@ If you want to remount the same app, move your app creation logic into a factory
8257
8378
  for (let i = 0; i < newChildren.length; i++) {
8258
8379
  const oldVNode = oldChildren[i];
8259
8380
  const newVNode = newChildren[i];
8381
+ const oldEl = oldVNode.el || resolveAsyncComponentPlaceholder(oldVNode);
8260
8382
  const container = (
8261
8383
  // oldVNode may be an errored async setup() component inside Suspense
8262
8384
  // which will not have a mounted element
8263
- oldVNode.el && // - In the case of a Fragment, we need to provide the actual parent
8385
+ oldEl && // - In the case of a Fragment, we need to provide the actual parent
8264
8386
  // of the Fragment itself so it can move its children.
8265
8387
  (oldVNode.type === Fragment || // - In the case of different nodes, there is going to be a replacement
8266
8388
  // which also requires the correct parent container
8267
8389
  !isSameVNodeType(oldVNode, newVNode) || // - In the case of a component, it could contain anything.
8268
- oldVNode.shapeFlag & (6 | 64 | 128)) ? hostParentNode(oldVNode.el) : (
8390
+ oldVNode.shapeFlag & (6 | 64 | 128)) ? hostParentNode(oldEl) : (
8269
8391
  // In other cases, the parent container is not actually used so we
8270
8392
  // just pass the block element here to avoid a DOM parentNode call.
8271
8393
  fallbackContainer
@@ -8429,7 +8551,12 @@ If you want to remount the same app, move your app creation logic into a factory
8429
8551
  }
8430
8552
  if (isHmrUpdating) initialVNode.el = null;
8431
8553
  if (instance.asyncDep) {
8432
- parentSuspense && parentSuspense.registerDep(instance, setupRenderEffect, optimized);
8554
+ parentSuspense && parentSuspense.registerDep(
8555
+ instance,
8556
+ setupRenderEffect,
8557
+ optimized,
8558
+ namespace
8559
+ );
8433
8560
  if (!initialVNode.el) {
8434
8561
  const placeholder = instance.subTree = createVNode(Comment);
8435
8562
  processCommentNode(null, placeholder, container, anchor);
@@ -8458,6 +8585,8 @@ If you want to remount the same app, move your app creation logic into a factory
8458
8585
  {
8459
8586
  pushWarningContext(n2);
8460
8587
  }
8588
+ n2.el = n1.el;
8589
+ n2.placeholder = n1.placeholder;
8461
8590
  updateComponentPreRender(instance, n2, optimized);
8462
8591
  {
8463
8592
  popWarningContext();
@@ -8469,6 +8598,7 @@ If you want to remount the same app, move your app creation logic into a factory
8469
8598
  }
8470
8599
  } else {
8471
8600
  n2.el = n1.el;
8601
+ n2.placeholder = n1.placeholder;
8472
8602
  instance.vnode = n2;
8473
8603
  }
8474
8604
  };
@@ -9049,7 +9179,7 @@ If you want to remount the same app, move your app creation logic into a factory
9049
9179
  cacheIndex,
9050
9180
  memo
9051
9181
  } = vnode;
9052
- if (patchFlag === -2) {
9182
+ if (patchFlag === -2 || dynamicChildren && dynamicChildren.hasOnce) {
9053
9183
  optimized = false;
9054
9184
  }
9055
9185
  if (ref != null) {
@@ -9057,7 +9187,7 @@ If you want to remount the same app, move your app creation logic into a factory
9057
9187
  setRef(ref, null, parentSuspense, vnode, true);
9058
9188
  resetTracking();
9059
9189
  }
9060
- if (cacheIndex != null) {
9190
+ if (cacheIndex != null && (!vnode.ctx || vnode.ctx === parentComponent)) {
9061
9191
  parentComponent.renderCache[cacheIndex] = void 0;
9062
9192
  }
9063
9193
  if (shapeFlag & 256) {
@@ -9122,35 +9252,37 @@ If you want to remount the same app, move your app creation logic into a factory
9122
9252
  };
9123
9253
  const remove = (vnode) => {
9124
9254
  const { type, el, anchor, transition } = vnode;
9125
- if (type === Fragment) {
9126
- if (vnode.patchFlag > 0 && vnode.patchFlag & 2048 && transition && !transition.persisted) {
9127
- vnode.children.forEach((child) => {
9128
- if (child.type === Comment) {
9129
- hostRemove(child.el);
9130
- } else {
9131
- remove(child);
9132
- }
9133
- });
9134
- } else {
9135
- removeFragment(el, anchor);
9136
- }
9255
+ const isFragment = type === Fragment;
9256
+ if (isFragment && !transition) {
9257
+ removeFragment(el, anchor);
9137
9258
  return;
9138
9259
  }
9139
9260
  if (type === Static) {
9140
9261
  removeStaticNode(vnode);
9262
+ if (transition && !transition.persisted && transition.afterLeave) {
9263
+ transition.afterLeave();
9264
+ }
9141
9265
  return;
9142
9266
  }
9267
+ const leavingNode = isFragment ? getTransitionRoot(vnode) : vnode;
9143
9268
  const performRemove = () => {
9144
- hostRemove(el);
9269
+ if (isFragment) {
9270
+ if (hostParentNode(el)) {
9271
+ removeFragment(el, anchor);
9272
+ }
9273
+ } else {
9274
+ hostRemove(el);
9275
+ }
9145
9276
  if (transition && !transition.persisted && transition.afterLeave) {
9146
9277
  transition.afterLeave();
9147
9278
  }
9148
9279
  };
9149
- if (vnode.shapeFlag & 1 && transition && !transition.persisted) {
9280
+ if (leavingNode && leavingNode.shapeFlag & 1 && transition && !transition.persisted) {
9150
9281
  const { leave, delayLeave } = transition;
9151
- const performLeave = () => leave(el, performRemove);
9282
+ const leavingEl = leavingNode.el;
9283
+ const performLeave = () => leave(leavingEl, performRemove);
9152
9284
  if (delayLeave) {
9153
- delayLeave(vnode.el, performRemove, performLeave);
9285
+ delayLeave(leavingEl, performRemove, performLeave);
9154
9286
  } else {
9155
9287
  performLeave();
9156
9288
  }
@@ -9181,6 +9313,9 @@ If you want to remount the same app, move your app creation logic into a factory
9181
9313
  if (job) {
9182
9314
  job.flags |= 8;
9183
9315
  unmount(subTree, instance, parentSuspense, doRemove);
9316
+ } else if (instance.vnode.el && subTree) {
9317
+ subTree.transition = instance.vnode.transition;
9318
+ unmount(subTree, instance, parentSuspense, doRemove);
9184
9319
  }
9185
9320
  if (um) {
9186
9321
  queuePostRenderEffect(um, parentSuspense);
@@ -9208,32 +9343,26 @@ If you want to remount the same app, move your app creation logic into a factory
9208
9343
  const teleportEnd = el && el[TeleportEndKey];
9209
9344
  return teleportEnd ? hostNextSibling(teleportEnd) : el;
9210
9345
  };
9211
- let isFlushing = false;
9212
9346
  const render = (vnode, container, namespace) => {
9213
- let instance;
9214
- if (vnode == null) {
9215
- if (container._vnode) {
9216
- unmount(container._vnode, null, null, true);
9217
- instance = container._vnode.component;
9347
+ const minUid = vnode && container._vnode ? void 0 : vnode && vnode.component ? vnode.component.uid : getNextUid();
9348
+ flushOnAppMount(() => {
9349
+ if (vnode == null) {
9350
+ if (container._vnode) {
9351
+ unmount(container._vnode, null, null, true);
9352
+ }
9353
+ } else {
9354
+ patch(
9355
+ container._vnode || null,
9356
+ vnode,
9357
+ container,
9358
+ null,
9359
+ null,
9360
+ null,
9361
+ namespace
9362
+ );
9218
9363
  }
9219
- } else {
9220
- patch(
9221
- container._vnode || null,
9222
- vnode,
9223
- container,
9224
- null,
9225
- null,
9226
- null,
9227
- namespace
9228
- );
9229
- }
9230
- container._vnode = vnode;
9231
- if (!isFlushing) {
9232
- isFlushing = true;
9233
- flushPreFlushCbs(instance);
9234
- flushPostFlushCbs();
9235
- isFlushing = false;
9236
- }
9364
+ container._vnode = vnode;
9365
+ }, minUid);
9237
9366
  };
9238
9367
  const internals = {
9239
9368
  p: patch,
@@ -9395,7 +9524,7 @@ If you want to remount the same app, move your app creation logic into a factory
9395
9524
  rendererInternals
9396
9525
  );
9397
9526
  } else {
9398
- if (parentSuspense && parentSuspense.deps > 0 && !n1.suspense.isInFallback) {
9527
+ if (parentSuspense && parentSuspense.deps > 0 && !n1.suspense.isInFallback && !parentSuspense.isHydrating) {
9399
9528
  n2.suspense = n1.suspense;
9400
9529
  n2.suspense.vnode = n2;
9401
9530
  n2.el = n1.el;
@@ -9481,10 +9610,12 @@ If you want to remount the same app, move your app creation logic into a factory
9481
9610
  if (pendingBranch) {
9482
9611
  suspense.pendingBranch = newBranch;
9483
9612
  if (isSameVNodeType(pendingBranch, newBranch)) {
9613
+ suspense.deps++;
9484
9614
  patch(
9485
9615
  pendingBranch,
9486
9616
  newBranch,
9487
- suspense.hiddenContainer,
9617
+ // a hydrating pending branch is adopted SSR DOM, already in place
9618
+ isHydrating ? container : suspense.hiddenContainer,
9488
9619
  null,
9489
9620
  parentComponent,
9490
9621
  suspense,
@@ -9492,6 +9623,7 @@ If you want to remount the same app, move your app creation logic into a factory
9492
9623
  slotScopeIds,
9493
9624
  optimized
9494
9625
  );
9626
+ suspense.deps--;
9495
9627
  if (suspense.deps <= 0) {
9496
9628
  suspense.resolve();
9497
9629
  } else if (isInFallback) {
@@ -9757,6 +9889,7 @@ If you want to remount the same app, move your app creation logic into a factory
9757
9889
  suspense.effects = [];
9758
9890
  if (isSuspensible) {
9759
9891
  if (parentSuspense && parentSuspense.pendingBranch && parentSuspenseId === parentSuspense.pendingId) {
9892
+ parentSuspenseId = void 0;
9760
9893
  parentSuspense.deps--;
9761
9894
  if (parentSuspense.deps === 0 && !sync) {
9762
9895
  parentSuspense.resolve();
@@ -9817,7 +9950,10 @@ If you want to remount the same app, move your app creation logic into a factory
9817
9950
  next() {
9818
9951
  return suspense.activeBranch && next(suspense.activeBranch);
9819
9952
  },
9820
- registerDep(instance, setupRenderEffect, optimized2) {
9953
+ // `namespace` intentionally shadows the boundary's own: the dep must be
9954
+ // mounted with the namespace of the position it was rendered at, which can
9955
+ // differ from the boundary's (e.g. a component nested inside an <svg>).
9956
+ registerDep(instance, setupRenderEffect, optimized2, namespace2) {
9821
9957
  const isInPendingSuspense = !!suspense.pendingBranch;
9822
9958
  if (isInPendingSuspense) {
9823
9959
  suspense.deps++;
@@ -9830,6 +9966,12 @@ If you want to remount the same app, move your app creation logic into a factory
9830
9966
  return;
9831
9967
  }
9832
9968
  unsetCurrentInstance();
9969
+ if (!instance.scope.active) {
9970
+ if (isInPendingSuspense && --suspense.deps === 0) {
9971
+ suspense.resolve();
9972
+ }
9973
+ return;
9974
+ }
9833
9975
  instance.asyncResolved = true;
9834
9976
  const { vnode: vnode2 } = instance;
9835
9977
  {
@@ -9851,7 +9993,7 @@ If you want to remount the same app, move your app creation logic into a factory
9851
9993
  // consider the comment placeholder case.
9852
9994
  hydratedEl ? null : next(instance.subTree),
9853
9995
  suspense,
9854
- namespace,
9996
+ namespace2,
9855
9997
  optimized2
9856
9998
  );
9857
9999
  if (placeholder) {
@@ -10251,7 +10393,8 @@ Component that was made reactive: `,
10251
10393
  el: vnode.el,
10252
10394
  anchor: vnode.anchor,
10253
10395
  ctx: vnode.ctx,
10254
- ce: vnode.ce
10396
+ ce: vnode.ce,
10397
+ cacheIndex: vnode.cacheIndex
10255
10398
  };
10256
10399
  if (transition && cloneTransition) {
10257
10400
  setTransitionHooks(
@@ -10384,6 +10527,9 @@ Component that was made reactive: `,
10384
10527
 
10385
10528
  const emptyAppContext = createAppContext();
10386
10529
  let uid = 0;
10530
+ function getNextUid() {
10531
+ return uid;
10532
+ }
10387
10533
  function createComponentInstance(vnode, parent, suspense) {
10388
10534
  const type = vnode.type;
10389
10535
  const appContext = (parent ? parent.appContext : vnode.appContext) || emptyAppContext;
@@ -11042,7 +11188,7 @@ Component that was made reactive: `,
11042
11188
  return true;
11043
11189
  }
11044
11190
 
11045
- const version = "3.5.42";
11191
+ const version = "3.5.44";
11046
11192
  const warn = warn$1 ;
11047
11193
  const ErrorTypeStrings = ErrorTypeStrings$1 ;
11048
11194
  const devtools = devtools$1 ;
@@ -11599,7 +11745,9 @@ Component that was made reactive: `,
11599
11745
  }
11600
11746
  }
11601
11747
  if (vShowOriginalDisplay in el) {
11602
- el[vShowOriginalDisplay] = hasControlledDisplay ? style.display : "";
11748
+ if (!isCssString || prev !== next) {
11749
+ el[vShowOriginalDisplay] = hasControlledDisplay ? style.display : "";
11750
+ }
11603
11751
  if (el[vShowHidden]) {
11604
11752
  style.display = "none";
11605
11753
  }
@@ -12081,7 +12229,9 @@ Expected function or array of functions, received type ${typeof value}.`
12081
12229
  "Custom element style injection is not supported when using shadowRoot: false"
12082
12230
  );
12083
12231
  }
12084
- this._mount(def);
12232
+ if (this._connected) {
12233
+ this._mount(def);
12234
+ }
12085
12235
  };
12086
12236
  const asyncDef = this._def.__asyncLoader;
12087
12237
  if (asyncDef) {
@@ -12439,6 +12589,7 @@ Expected function or array of functions, received type ${typeof value}.`
12439
12589
  const newPositionMap = /* @__PURE__ */ new WeakMap();
12440
12590
  const moveCbKey = /* @__PURE__ */ Symbol("_moveCb");
12441
12591
  const enterCbKey = /* @__PURE__ */ Symbol("_enterCb");
12592
+ const pendingGroups = /* @__PURE__ */ new WeakMap();
12442
12593
  const decorate = (t) => {
12443
12594
  delete t.props.mode;
12444
12595
  return t;
@@ -12454,21 +12605,30 @@ Expected function or array of functions, received type ${typeof value}.`
12454
12605
  const state = useTransitionState();
12455
12606
  let prevChildren;
12456
12607
  let children;
12457
- onUpdated(() => {
12458
- if (!prevChildren.length) {
12459
- return;
12608
+ let origins;
12609
+ let moves;
12610
+ const willMove = () => {
12611
+ if (moves === void 0) {
12612
+ moves = prevChildren.length > 0 && hasCSSTransform(
12613
+ prevChildren[0].el,
12614
+ instance.vnode.el,
12615
+ resolveMoveClass(props)
12616
+ );
12460
12617
  }
12461
- const moveClass = props.moveClass || `${props.name || "v"}-move`;
12462
- if (!hasCSSTransform(
12463
- prevChildren[0].el,
12464
- instance.vnode.el,
12465
- moveClass
12466
- )) {
12618
+ return moves;
12619
+ };
12620
+ onUpdated(() => {
12621
+ pendingGroups.delete(instance);
12622
+ if (!willMove()) {
12467
12623
  prevChildren = [];
12624
+ origins = void 0;
12468
12625
  return;
12469
12626
  }
12627
+ const moveClass = resolveMoveClass(props);
12470
12628
  prevChildren.forEach(callPendingCbs);
12471
- prevChildren.forEach(recordPosition);
12629
+ const shift = origins && getOriginShift(origins, instance.vnode.el);
12630
+ origins = void 0;
12631
+ prevChildren.forEach((c) => recordPosition(c, shift));
12472
12632
  const movedChildren = prevChildren.filter(applyTranslation);
12473
12633
  forceReflow(instance.vnode.el);
12474
12634
  movedChildren.forEach((c) => {
@@ -12495,6 +12655,7 @@ Expected function or array of functions, received type ${typeof value}.`
12495
12655
  const cssTransitionProps = resolveTransitionProps(rawProps);
12496
12656
  let tag = rawProps.tag || Fragment;
12497
12657
  prevChildren = [];
12658
+ moves = void 0;
12498
12659
  if (children) {
12499
12660
  for (let i = 0; i < children.length; i++) {
12500
12661
  const child = children[i];
@@ -12526,6 +12687,10 @@ Expected function or array of functions, received type ${typeof value}.`
12526
12687
  warn(`<TransitionGroup> children must be keyed.`);
12527
12688
  }
12528
12689
  }
12690
+ if (prevChildren.length) {
12691
+ origins = getOrigins(instance);
12692
+ pendingGroups.set(instance, willMove);
12693
+ }
12529
12694
  return createVNode(tag, null, children);
12530
12695
  };
12531
12696
  }
@@ -12540,8 +12705,11 @@ Expected function or array of functions, received type ${typeof value}.`
12540
12705
  el[enterCbKey]();
12541
12706
  }
12542
12707
  }
12543
- function recordPosition(c) {
12544
- newPositionMap.set(c, getPosition(c.el));
12708
+ function resolveMoveClass(props) {
12709
+ return props.moveClass || `${props.name || "v"}-move`;
12710
+ }
12711
+ function recordPosition(c, shift) {
12712
+ newPositionMap.set(c, getPosition(c.el, shift));
12545
12713
  }
12546
12714
  function applyTranslation(c) {
12547
12715
  const oldPos = positionMap.get(c);
@@ -12565,13 +12733,41 @@ Expected function or array of functions, received type ${typeof value}.`
12565
12733
  return c;
12566
12734
  }
12567
12735
  }
12568
- function getPosition(el) {
12736
+ function getPosition(el, shift) {
12569
12737
  const rect = el.getBoundingClientRect();
12570
12738
  return {
12571
- left: rect.left,
12572
- top: rect.top
12739
+ left: rect.left - (shift ? shift.left : 0),
12740
+ top: rect.top - (shift ? shift.top : 0)
12573
12741
  };
12574
12742
  }
12743
+ function getOrigins(instance) {
12744
+ let origins;
12745
+ for (let group = instance.parent; group; group = group.parent) {
12746
+ const willMove = pendingGroups.get(group);
12747
+ if (willMove) {
12748
+ const item = findItem(group.vnode.el, instance.vnode.el);
12749
+ if (item) {
12750
+ (origins || (origins = [])).push(
12751
+ extend(getPosition(item), { item, willMove })
12752
+ );
12753
+ }
12754
+ }
12755
+ }
12756
+ return origins;
12757
+ }
12758
+ function findItem(root, node) {
12759
+ const container = root.nodeType === 1 ? root : root.parentNode;
12760
+ while (node && node.parentNode !== container) {
12761
+ node = node.parentNode;
12762
+ }
12763
+ if (node && node.nodeType === 1) {
12764
+ return node;
12765
+ }
12766
+ }
12767
+ function getOriginShift(origins, root) {
12768
+ const origin = origins.find((o) => o.willMove() && o.item.contains(root));
12769
+ return origin && getPosition(origin.item, origin);
12770
+ }
12575
12771
  function hasCSSTransform(el, root, moveClass) {
12576
12772
  const clone = el.cloneNode();
12577
12773
  const _vtc = el[vtcKey];
@@ -14204,7 +14400,8 @@ Make sure to use the production build (*.prod.js) when deploying for production.
14204
14400
  [42]: `v-model value must be a valid JavaScript member expression.`,
14205
14401
  [43]: `v-model cannot be used on v-for or v-slot scope variables because they are not writable.`,
14206
14402
  [44]: `v-model cannot be used on a prop, because local prop bindings are not writable.
14207
- Use a v-bind binding combined with a v-on listener that emits update:x event instead.`,
14403
+ Use a v-bind binding combined with a v-on listener that emits update:x event instead.
14404
+ For props declared with defineModel(), assign the returned ref to a variable and use v-model on that variable.`,
14208
14405
  [45]: `v-model cannot be used on a const binding because it is not writable.`,
14209
14406
  [46]: `Error parsing JavaScript expression: `,
14210
14407
  [47]: `<KeepAlive> expects exactly one child component.`,
@@ -16698,7 +16895,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
16698
16895
  createCompoundExpression([`const _memo = (`, memo.exp, `)`]),
16699
16896
  createCompoundExpression([
16700
16897
  `if (_cached && _cached.el`,
16701
- ...keyExp ? [` && _cached.key === `, keyExp] : [],
16898
+ ...keyExp ? [` && _cached.key === (`, keyExp, `)`] : [],
16702
16899
  ` && ${context.helperString(
16703
16900
  IS_MEMO_SAME
16704
16901
  )}(_cached, _memo)) return _cached`
@@ -18439,7 +18636,8 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
18439
18636
  if (!node.children.length) {
18440
18637
  return;
18441
18638
  }
18442
- if (hasMultipleChildren(node)) {
18639
+ const multipleChildren = hasMultipleChildren(node);
18640
+ if (multipleChildren) {
18443
18641
  context.onError(
18444
18642
  createDOMCompilerError(
18445
18643
  63,
@@ -18666,7 +18864,8 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
18666
18864
 
18667
18865
  const DOMNodeTransforms = [
18668
18866
  transformStyle,
18669
- ...[transformTransition, validateHtmlNesting]
18867
+ transformTransition,
18868
+ ...[validateHtmlNesting]
18670
18869
  ];
18671
18870
  const DOMDirectiveTransforms = {
18672
18871
  cloak: noopDirectiveTransform,