@vue/compat 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/compat v3.5.42
2
+ * @vue/compat 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 () {
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 () {
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 () {
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 () {
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 () {
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 () {
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 () {
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 () {
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 () {
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 () {
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 () {
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 () {
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 () {
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 () {
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 () {
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
  {
@@ -3711,6 +3787,7 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
3711
3787
  let isPre = false;
3712
3788
  if (flush === "post") {
3713
3789
  baseWatchOptions.scheduler = (job) => {
3790
+ job.i = instance;
3714
3791
  queuePostRenderEffect(job, instance && instance.suspense);
3715
3792
  };
3716
3793
  } else if (flush !== "sync") {
@@ -4005,7 +4082,11 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
4005
4082
  };
4006
4083
  function moveTeleport(vnode, container, parentAnchor, { o: { insert }, m: move }, moveType = 2) {
4007
4084
  if (moveType === 0) {
4085
+ if (vnode.targetStart) {
4086
+ insert(vnode.targetStart, container, parentAnchor);
4087
+ }
4008
4088
  insert(vnode.targetAnchor, container, parentAnchor);
4089
+ parentAnchor = vnode.targetAnchor;
4009
4090
  }
4010
4091
  const { el, anchor, shapeFlag, children, props } = vnode;
4011
4092
  const isReorder = moveType === 2;
@@ -4174,10 +4255,6 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
4174
4255
  onAfterAppear: TransitionHookValidator,
4175
4256
  onAppearCancelled: TransitionHookValidator
4176
4257
  };
4177
- const recursiveGetSubtree = (instance) => {
4178
- const subTree = instance.subTree;
4179
- return subTree.component ? recursiveGetSubtree(subTree.component) : subTree;
4180
- };
4181
4258
  const BaseTransitionImpl = {
4182
4259
  name: `BaseTransition`,
4183
4260
  props: BaseTransitionPropsValidators,
@@ -4218,7 +4295,7 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
4218
4295
  setTransitionHooks(innerChild, enterHooks);
4219
4296
  }
4220
4297
  let oldInnerChild = instance.subTree && getInnerChild$1(instance.subTree);
4221
- if (oldInnerChild && oldInnerChild.type !== Comment && !isSameVNodeType(oldInnerChild, innerChild) && recursiveGetSubtree(instance).type !== Comment) {
4298
+ if (oldInnerChild && oldInnerChild.type !== Comment && !isSameVNodeType(oldInnerChild, innerChild) && getTransitionRoot(instance.subTree)) {
4222
4299
  let leavingHooks = resolveTransitionHooks(
4223
4300
  oldInnerChild,
4224
4301
  rawProps,
@@ -4354,8 +4431,15 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
4354
4431
  );
4355
4432
  }
4356
4433
  const leavingVNode = leavingVNodesCache[key];
4357
- if (leavingVNode && isSameVNodeType(vnode, leavingVNode) && leavingVNode.el[leaveCbKey]) {
4358
- leavingVNode.el[leaveCbKey]();
4434
+ if (leavingVNode && isSameVNodeType(vnode, leavingVNode)) {
4435
+ let leavingCb = leavingVNode.el[leaveCbKey];
4436
+ if (!leavingCb) {
4437
+ const leavingRoot = getTransitionRoot(leavingVNode);
4438
+ leavingCb = leavingRoot && leavingRoot.el[leaveCbKey];
4439
+ }
4440
+ if (leavingCb) {
4441
+ leavingCb();
4442
+ }
4359
4443
  }
4360
4444
  callHook(hook, [el]);
4361
4445
  },
@@ -4483,6 +4567,12 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
4483
4567
  vnode.ssFallback.transition = hooks.clone(vnode.ssFallback);
4484
4568
  } else {
4485
4569
  vnode.transition = hooks;
4570
+ if (vnode.type === Fragment && isArray(vnode.children)) {
4571
+ const child = filterSingleRoot(vnode.children, false);
4572
+ if (child) {
4573
+ setTransitionHooks(child, hooks);
4574
+ }
4575
+ }
4486
4576
  }
4487
4577
  }
4488
4578
  function getTransitionRawChildren(children, keepComment = false, parentKey) {
@@ -4507,6 +4597,18 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
4507
4597
  }
4508
4598
  return ret;
4509
4599
  }
4600
+ function getTransitionRoot(vnode) {
4601
+ if (vnode.component) {
4602
+ return getTransitionRoot(vnode.component.subTree);
4603
+ }
4604
+ if (vnode.type === Fragment) {
4605
+ const child = isArray(vnode.children) && filterSingleRoot(vnode.children, false);
4606
+ return child ? getTransitionRoot(child) : void 0;
4607
+ }
4608
+ if (vnode.type !== Comment) {
4609
+ return vnode;
4610
+ }
4611
+ }
4510
4612
 
4511
4613
  // @__NO_SIDE_EFFECTS__
4512
4614
  function defineComponent(options, extraOptions) {
@@ -4880,13 +4982,15 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
4880
4982
  getContainerType(container),
4881
4983
  optimized
4882
4984
  );
4883
- if (isAsyncWrapper(vnode) && !vnode.component.subTree) {
4985
+ if ((isAsyncWrapper(vnode) || vnode.component.asyncDep) && !vnode.component.subTree) {
4884
4986
  let subTree;
4885
4987
  if (isFragmentStart) {
4886
4988
  subTree = createVNode(Static);
4887
4989
  subTree.anchor = nextNode ? nextNode.previousSibling : container.lastChild;
4888
4990
  } else {
4889
- subTree = node.nodeType === 3 ? createTextVNode("") : createVNode("div");
4991
+ subTree = node.nodeType === 3 ? createTextVNode("") : createVNode(
4992
+ node.nodeType === 8 ? Comment : "div"
4993
+ );
4890
4994
  }
4891
4995
  subTree.el = node;
4892
4996
  vnode.component.subTree = subTree;
@@ -5410,14 +5514,22 @@ Server rendered element contains fewer child nodes than client vdom.`
5410
5514
  break;
5411
5515
  }
5412
5516
  }, opts);
5413
- forEach((el) => {
5414
- if (!(el instanceof Element)) return;
5517
+ const observe = (el) => {
5415
5518
  if (elementIsVisibleInViewport(el)) {
5416
5519
  hydrate();
5417
5520
  ob.disconnect();
5418
5521
  return false;
5419
5522
  }
5523
+ if (getComputedStyle(el).display === "contents") {
5524
+ for (let i = 0; i < el.children.length; i++) {
5525
+ if (observe(el.children[i]) === false) return false;
5526
+ }
5527
+ }
5420
5528
  ob.observe(el);
5529
+ };
5530
+ forEach((el) => {
5531
+ if (!(el instanceof Element)) return;
5532
+ return observe(el);
5421
5533
  });
5422
5534
  return () => ob.disconnect();
5423
5535
  };
@@ -5768,6 +5880,7 @@ Server rendered element contains fewer child nodes than client vdom.`
5768
5880
  unmount(cached);
5769
5881
  } else if (current) {
5770
5882
  resetShapeFlag(current);
5883
+ if (cached) resetShapeFlag(cached);
5771
5884
  }
5772
5885
  cache.delete(key);
5773
5886
  keys.delete(key);
@@ -6350,9 +6463,11 @@ If this is a native custom element, make sure to exclude it from component resol
6350
6463
  }
6351
6464
  } else if (typeof source === "number") {
6352
6465
  if (!Number.isInteger(source) || source < 0) {
6353
- warn$1(
6354
- `The v-for range expects a positive integer value but got ${source}.`
6355
- );
6466
+ {
6467
+ warn$1(
6468
+ `The v-for range expects a positive integer value but got ${source}.`
6469
+ );
6470
+ }
6356
6471
  ret = [];
6357
6472
  } else {
6358
6473
  ret = new Array(source);
@@ -6671,6 +6786,7 @@ If this is a native custom element, make sure to exclude it from component resol
6671
6786
  $vnode: (i) => i.vnode,
6672
6787
  // some private properties that are likely accessed...
6673
6788
  _self: (i) => i.proxy,
6789
+ _setupProxy: (i) => i.setupState,
6674
6790
  _uid: (i) => i.uid,
6675
6791
  _data: (i) => i.data,
6676
6792
  _isMounted: (i) => i.isMounted,
@@ -7655,7 +7771,7 @@ If this is a native custom element, make sure to exclude it from component resol
7655
7771
  return vm;
7656
7772
  }
7657
7773
  }
7658
- Vue.version = `2.6.14-compat:${"3.5.42"}`;
7774
+ Vue.version = `2.6.14-compat:${"3.5.44"}`;
7659
7775
  Vue.config = singletonApp.config;
7660
7776
  Vue.use = (plugin, ...options) => {
7661
7777
  if (plugin && isFunction(plugin.install)) {
@@ -8812,7 +8928,7 @@ If you want to remount the same app, move your app creation logic into a factory
8812
8928
  }
8813
8929
  for (let i = 0; i < nextKeys.length; i++) {
8814
8930
  const key = nextKeys[i];
8815
- if (hasPropValueChanged(nextProps, prevProps, key) && !isEmitListener(emitsOptions, key)) {
8931
+ if (!hasOwn(prevProps, key) || hasPropValueChanged(nextProps, prevProps, key) && !isEmitListener(emitsOptions, key)) {
8816
8932
  return true;
8817
8933
  }
8818
8934
  }
@@ -9511,6 +9627,12 @@ If you want to remount the same app, move your app creation logic into a factory
9511
9627
  optimized = false;
9512
9628
  n2.dynamicChildren = null;
9513
9629
  }
9630
+ if (n2.dynamicChildren && n1 && n1.dynamicChildren && n1.dynamicChildren.hasOnce) {
9631
+ if (n2.dynamicChildren === EMPTY_ARR) {
9632
+ n2.dynamicChildren = [];
9633
+ }
9634
+ n2.dynamicChildren.hasOnce = true;
9635
+ }
9514
9636
  const { type, ref, shapeFlag } = n2;
9515
9637
  switch (type) {
9516
9638
  case Text:
@@ -9917,15 +10039,16 @@ If you want to remount the same app, move your app creation logic into a factory
9917
10039
  for (let i = 0; i < newChildren.length; i++) {
9918
10040
  const oldVNode = oldChildren[i];
9919
10041
  const newVNode = newChildren[i];
10042
+ const oldEl = oldVNode.el || resolveAsyncComponentPlaceholder(oldVNode);
9920
10043
  const container = (
9921
10044
  // oldVNode may be an errored async setup() component inside Suspense
9922
10045
  // which will not have a mounted element
9923
- oldVNode.el && // - In the case of a Fragment, we need to provide the actual parent
10046
+ oldEl && // - In the case of a Fragment, we need to provide the actual parent
9924
10047
  // of the Fragment itself so it can move its children.
9925
10048
  (oldVNode.type === Fragment || // - In the case of different nodes, there is going to be a replacement
9926
10049
  // which also requires the correct parent container
9927
10050
  !isSameVNodeType(oldVNode, newVNode) || // - In the case of a component, it could contain anything.
9928
- oldVNode.shapeFlag & (6 | 64 | 128)) ? hostParentNode(oldVNode.el) : (
10051
+ oldVNode.shapeFlag & (6 | 64 | 128)) ? hostParentNode(oldEl) : (
9929
10052
  // In other cases, the parent container is not actually used so we
9930
10053
  // just pass the block element here to avoid a DOM parentNode call.
9931
10054
  fallbackContainer
@@ -10090,7 +10213,12 @@ If you want to remount the same app, move your app creation logic into a factory
10090
10213
  }
10091
10214
  if (isHmrUpdating) initialVNode.el = null;
10092
10215
  if (instance.asyncDep) {
10093
- parentSuspense && parentSuspense.registerDep(instance, setupRenderEffect, optimized);
10216
+ parentSuspense && parentSuspense.registerDep(
10217
+ instance,
10218
+ setupRenderEffect,
10219
+ optimized,
10220
+ namespace
10221
+ );
10094
10222
  if (!initialVNode.el) {
10095
10223
  const placeholder = instance.subTree = createVNode(Comment);
10096
10224
  processCommentNode(null, placeholder, container, anchor);
@@ -10119,6 +10247,8 @@ If you want to remount the same app, move your app creation logic into a factory
10119
10247
  {
10120
10248
  pushWarningContext(n2);
10121
10249
  }
10250
+ n2.el = n1.el;
10251
+ n2.placeholder = n1.placeholder;
10122
10252
  updateComponentPreRender(instance, n2, optimized);
10123
10253
  {
10124
10254
  popWarningContext();
@@ -10130,6 +10260,7 @@ If you want to remount the same app, move your app creation logic into a factory
10130
10260
  }
10131
10261
  } else {
10132
10262
  n2.el = n1.el;
10263
+ n2.placeholder = n1.placeholder;
10133
10264
  instance.vnode = n2;
10134
10265
  }
10135
10266
  };
@@ -10734,7 +10865,7 @@ If you want to remount the same app, move your app creation logic into a factory
10734
10865
  cacheIndex,
10735
10866
  memo
10736
10867
  } = vnode;
10737
- if (patchFlag === -2) {
10868
+ if (patchFlag === -2 || dynamicChildren && dynamicChildren.hasOnce) {
10738
10869
  optimized = false;
10739
10870
  }
10740
10871
  if (ref != null) {
@@ -10742,7 +10873,7 @@ If you want to remount the same app, move your app creation logic into a factory
10742
10873
  setRef(ref, null, parentSuspense, vnode, true);
10743
10874
  resetTracking();
10744
10875
  }
10745
- if (cacheIndex != null) {
10876
+ if (cacheIndex != null && (!vnode.ctx || vnode.ctx === parentComponent)) {
10746
10877
  parentComponent.renderCache[cacheIndex] = void 0;
10747
10878
  }
10748
10879
  if (shapeFlag & 256) {
@@ -10807,35 +10938,37 @@ If you want to remount the same app, move your app creation logic into a factory
10807
10938
  };
10808
10939
  const remove = (vnode) => {
10809
10940
  const { type, el, anchor, transition } = vnode;
10810
- if (type === Fragment) {
10811
- if (vnode.patchFlag > 0 && vnode.patchFlag & 2048 && transition && !transition.persisted) {
10812
- vnode.children.forEach((child) => {
10813
- if (child.type === Comment) {
10814
- hostRemove(child.el);
10815
- } else {
10816
- remove(child);
10817
- }
10818
- });
10819
- } else {
10820
- removeFragment(el, anchor);
10821
- }
10941
+ const isFragment = type === Fragment;
10942
+ if (isFragment && !transition) {
10943
+ removeFragment(el, anchor);
10822
10944
  return;
10823
10945
  }
10824
10946
  if (type === Static) {
10825
10947
  removeStaticNode(vnode);
10948
+ if (transition && !transition.persisted && transition.afterLeave) {
10949
+ transition.afterLeave();
10950
+ }
10826
10951
  return;
10827
10952
  }
10953
+ const leavingNode = isFragment ? getTransitionRoot(vnode) : vnode;
10828
10954
  const performRemove = () => {
10829
- hostRemove(el);
10955
+ if (isFragment) {
10956
+ if (hostParentNode(el)) {
10957
+ removeFragment(el, anchor);
10958
+ }
10959
+ } else {
10960
+ hostRemove(el);
10961
+ }
10830
10962
  if (transition && !transition.persisted && transition.afterLeave) {
10831
10963
  transition.afterLeave();
10832
10964
  }
10833
10965
  };
10834
- if (vnode.shapeFlag & 1 && transition && !transition.persisted) {
10966
+ if (leavingNode && leavingNode.shapeFlag & 1 && transition && !transition.persisted) {
10835
10967
  const { leave, delayLeave } = transition;
10836
- const performLeave = () => leave(el, performRemove);
10968
+ const leavingEl = leavingNode.el;
10969
+ const performLeave = () => leave(leavingEl, performRemove);
10837
10970
  if (delayLeave) {
10838
- delayLeave(vnode.el, performRemove, performLeave);
10971
+ delayLeave(leavingEl, performRemove, performLeave);
10839
10972
  } else {
10840
10973
  performLeave();
10841
10974
  }
@@ -10869,6 +11002,9 @@ If you want to remount the same app, move your app creation logic into a factory
10869
11002
  if (job) {
10870
11003
  job.flags |= 8;
10871
11004
  unmount(subTree, instance, parentSuspense, doRemove);
11005
+ } else if (instance.vnode.el && subTree) {
11006
+ subTree.transition = instance.vnode.transition;
11007
+ unmount(subTree, instance, parentSuspense, doRemove);
10872
11008
  }
10873
11009
  if (um) {
10874
11010
  queuePostRenderEffect(um, parentSuspense);
@@ -10902,32 +11038,26 @@ If you want to remount the same app, move your app creation logic into a factory
10902
11038
  const teleportEnd = el && el[TeleportEndKey];
10903
11039
  return teleportEnd ? hostNextSibling(teleportEnd) : el;
10904
11040
  };
10905
- let isFlushing = false;
10906
11041
  const render = (vnode, container, namespace) => {
10907
- let instance;
10908
- if (vnode == null) {
10909
- if (container._vnode) {
10910
- unmount(container._vnode, null, null, true);
10911
- instance = container._vnode.component;
11042
+ const minUid = vnode && container._vnode ? void 0 : vnode && vnode.component ? vnode.component.uid : getNextUid();
11043
+ flushOnAppMount(() => {
11044
+ if (vnode == null) {
11045
+ if (container._vnode) {
11046
+ unmount(container._vnode, null, null, true);
11047
+ }
11048
+ } else {
11049
+ patch(
11050
+ container._vnode || null,
11051
+ vnode,
11052
+ container,
11053
+ null,
11054
+ null,
11055
+ null,
11056
+ namespace
11057
+ );
10912
11058
  }
10913
- } else {
10914
- patch(
10915
- container._vnode || null,
10916
- vnode,
10917
- container,
10918
- null,
10919
- null,
10920
- null,
10921
- namespace
10922
- );
10923
- }
10924
- container._vnode = vnode;
10925
- if (!isFlushing) {
10926
- isFlushing = true;
10927
- flushPreFlushCbs(instance);
10928
- flushPostFlushCbs();
10929
- isFlushing = false;
10930
- }
11059
+ container._vnode = vnode;
11060
+ }, minUid);
10931
11061
  };
10932
11062
  const internals = {
10933
11063
  p: patch,
@@ -11089,7 +11219,7 @@ If you want to remount the same app, move your app creation logic into a factory
11089
11219
  rendererInternals
11090
11220
  );
11091
11221
  } else {
11092
- if (parentSuspense && parentSuspense.deps > 0 && !n1.suspense.isInFallback) {
11222
+ if (parentSuspense && parentSuspense.deps > 0 && !n1.suspense.isInFallback && !parentSuspense.isHydrating) {
11093
11223
  n2.suspense = n1.suspense;
11094
11224
  n2.suspense.vnode = n2;
11095
11225
  n2.el = n1.el;
@@ -11175,10 +11305,12 @@ If you want to remount the same app, move your app creation logic into a factory
11175
11305
  if (pendingBranch) {
11176
11306
  suspense.pendingBranch = newBranch;
11177
11307
  if (isSameVNodeType(pendingBranch, newBranch)) {
11308
+ suspense.deps++;
11178
11309
  patch(
11179
11310
  pendingBranch,
11180
11311
  newBranch,
11181
- suspense.hiddenContainer,
11312
+ // a hydrating pending branch is adopted SSR DOM, already in place
11313
+ isHydrating ? container : suspense.hiddenContainer,
11182
11314
  null,
11183
11315
  parentComponent,
11184
11316
  suspense,
@@ -11186,6 +11318,7 @@ If you want to remount the same app, move your app creation logic into a factory
11186
11318
  slotScopeIds,
11187
11319
  optimized
11188
11320
  );
11321
+ suspense.deps--;
11189
11322
  if (suspense.deps <= 0) {
11190
11323
  suspense.resolve();
11191
11324
  } else if (isInFallback) {
@@ -11451,6 +11584,7 @@ If you want to remount the same app, move your app creation logic into a factory
11451
11584
  suspense.effects = [];
11452
11585
  if (isSuspensible) {
11453
11586
  if (parentSuspense && parentSuspense.pendingBranch && parentSuspenseId === parentSuspense.pendingId) {
11587
+ parentSuspenseId = void 0;
11454
11588
  parentSuspense.deps--;
11455
11589
  if (parentSuspense.deps === 0 && !sync) {
11456
11590
  parentSuspense.resolve();
@@ -11511,7 +11645,10 @@ If you want to remount the same app, move your app creation logic into a factory
11511
11645
  next() {
11512
11646
  return suspense.activeBranch && next(suspense.activeBranch);
11513
11647
  },
11514
- registerDep(instance, setupRenderEffect, optimized2) {
11648
+ // `namespace` intentionally shadows the boundary's own: the dep must be
11649
+ // mounted with the namespace of the position it was rendered at, which can
11650
+ // differ from the boundary's (e.g. a component nested inside an <svg>).
11651
+ registerDep(instance, setupRenderEffect, optimized2, namespace2) {
11515
11652
  const isInPendingSuspense = !!suspense.pendingBranch;
11516
11653
  if (isInPendingSuspense) {
11517
11654
  suspense.deps++;
@@ -11524,6 +11661,12 @@ If you want to remount the same app, move your app creation logic into a factory
11524
11661
  return;
11525
11662
  }
11526
11663
  unsetCurrentInstance();
11664
+ if (!instance.scope.active) {
11665
+ if (isInPendingSuspense && --suspense.deps === 0) {
11666
+ suspense.resolve();
11667
+ }
11668
+ return;
11669
+ }
11527
11670
  instance.asyncResolved = true;
11528
11671
  const { vnode: vnode2 } = instance;
11529
11672
  {
@@ -11545,7 +11688,7 @@ If you want to remount the same app, move your app creation logic into a factory
11545
11688
  // consider the comment placeholder case.
11546
11689
  hydratedEl ? null : next(instance.subTree),
11547
11690
  suspense,
11548
- namespace,
11691
+ namespace2,
11549
11692
  optimized2
11550
11693
  );
11551
11694
  if (placeholder) {
@@ -12009,7 +12152,8 @@ Component that was made reactive: `,
12009
12152
  el: vnode.el,
12010
12153
  anchor: vnode.anchor,
12011
12154
  ctx: vnode.ctx,
12012
- ce: vnode.ce
12155
+ ce: vnode.ce,
12156
+ cacheIndex: vnode.cacheIndex
12013
12157
  };
12014
12158
  if (transition && cloneTransition) {
12015
12159
  setTransitionHooks(
@@ -12145,6 +12289,9 @@ Component that was made reactive: `,
12145
12289
 
12146
12290
  const emptyAppContext = createAppContext();
12147
12291
  let uid = 0;
12292
+ function getNextUid() {
12293
+ return uid;
12294
+ }
12148
12295
  function createComponentInstance(vnode, parent, suspense) {
12149
12296
  const type = vnode.type;
12150
12297
  const appContext = (parent ? parent.appContext : vnode.appContext) || emptyAppContext;
@@ -12815,7 +12962,7 @@ Component that was made reactive: `,
12815
12962
  return true;
12816
12963
  }
12817
12964
 
12818
- const version = "3.5.42";
12965
+ const version = "3.5.44";
12819
12966
  const warn = warn$1 ;
12820
12967
  const ErrorTypeStrings = ErrorTypeStrings$1 ;
12821
12968
  const devtools = devtools$1 ;
@@ -13416,7 +13563,9 @@ Component that was made reactive: `,
13416
13563
  }
13417
13564
  }
13418
13565
  if (vShowOriginalDisplay in el) {
13419
- el[vShowOriginalDisplay] = hasControlledDisplay ? style.display : "";
13566
+ if (!isCssString || prev !== next) {
13567
+ el[vShowOriginalDisplay] = hasControlledDisplay ? style.display : "";
13568
+ }
13420
13569
  if (el[vShowHidden]) {
13421
13570
  style.display = "none";
13422
13571
  }
@@ -13942,7 +14091,9 @@ Expected function or array of functions, received type ${typeof value}.`
13942
14091
  "Custom element style injection is not supported when using shadowRoot: false"
13943
14092
  );
13944
14093
  }
13945
- this._mount(def);
14094
+ if (this._connected) {
14095
+ this._mount(def);
14096
+ }
13946
14097
  };
13947
14098
  const asyncDef = this._def.__asyncLoader;
13948
14099
  if (asyncDef) {
@@ -14300,6 +14451,7 @@ Expected function or array of functions, received type ${typeof value}.`
14300
14451
  const newPositionMap = /* @__PURE__ */ new WeakMap();
14301
14452
  const moveCbKey = /* @__PURE__ */ Symbol("_moveCb");
14302
14453
  const enterCbKey = /* @__PURE__ */ Symbol("_enterCb");
14454
+ const pendingGroups = /* @__PURE__ */ new WeakMap();
14303
14455
  const decorate = (t) => {
14304
14456
  delete t.props.mode;
14305
14457
  {
@@ -14318,21 +14470,30 @@ Expected function or array of functions, received type ${typeof value}.`
14318
14470
  const state = useTransitionState();
14319
14471
  let prevChildren;
14320
14472
  let children;
14321
- onUpdated(() => {
14322
- if (!prevChildren.length) {
14323
- return;
14473
+ let origins;
14474
+ let moves;
14475
+ const willMove = () => {
14476
+ if (moves === void 0) {
14477
+ moves = prevChildren.length > 0 && hasCSSTransform(
14478
+ prevChildren[0].el,
14479
+ instance.vnode.el,
14480
+ resolveMoveClass(props)
14481
+ );
14324
14482
  }
14325
- const moveClass = props.moveClass || `${props.name || "v"}-move`;
14326
- if (!hasCSSTransform(
14327
- prevChildren[0].el,
14328
- instance.vnode.el,
14329
- moveClass
14330
- )) {
14483
+ return moves;
14484
+ };
14485
+ onUpdated(() => {
14486
+ pendingGroups.delete(instance);
14487
+ if (!willMove()) {
14331
14488
  prevChildren = [];
14489
+ origins = void 0;
14332
14490
  return;
14333
14491
  }
14492
+ const moveClass = resolveMoveClass(props);
14334
14493
  prevChildren.forEach(callPendingCbs);
14335
- prevChildren.forEach(recordPosition);
14494
+ const shift = origins && getOriginShift(origins, instance.vnode.el);
14495
+ origins = void 0;
14496
+ prevChildren.forEach((c) => recordPosition(c, shift));
14336
14497
  const movedChildren = prevChildren.filter(applyTranslation);
14337
14498
  forceReflow(instance.vnode.el);
14338
14499
  movedChildren.forEach((c) => {
@@ -14365,6 +14526,7 @@ Expected function or array of functions, received type ${typeof value}.`
14365
14526
  tag = "span";
14366
14527
  }
14367
14528
  prevChildren = [];
14529
+ moves = void 0;
14368
14530
  if (children) {
14369
14531
  for (let i = 0; i < children.length; i++) {
14370
14532
  const child = children[i];
@@ -14396,6 +14558,10 @@ Expected function or array of functions, received type ${typeof value}.`
14396
14558
  warn(`<TransitionGroup> children must be keyed.`);
14397
14559
  }
14398
14560
  }
14561
+ if (prevChildren.length) {
14562
+ origins = getOrigins(instance);
14563
+ pendingGroups.set(instance, willMove);
14564
+ }
14399
14565
  return createVNode(tag, null, children);
14400
14566
  };
14401
14567
  }
@@ -14410,8 +14576,11 @@ Expected function or array of functions, received type ${typeof value}.`
14410
14576
  el[enterCbKey]();
14411
14577
  }
14412
14578
  }
14413
- function recordPosition(c) {
14414
- newPositionMap.set(c, getPosition(c.el));
14579
+ function resolveMoveClass(props) {
14580
+ return props.moveClass || `${props.name || "v"}-move`;
14581
+ }
14582
+ function recordPosition(c, shift) {
14583
+ newPositionMap.set(c, getPosition(c.el, shift));
14415
14584
  }
14416
14585
  function applyTranslation(c) {
14417
14586
  const oldPos = positionMap.get(c);
@@ -14435,13 +14604,41 @@ Expected function or array of functions, received type ${typeof value}.`
14435
14604
  return c;
14436
14605
  }
14437
14606
  }
14438
- function getPosition(el) {
14607
+ function getPosition(el, shift) {
14439
14608
  const rect = el.getBoundingClientRect();
14440
14609
  return {
14441
- left: rect.left,
14442
- top: rect.top
14610
+ left: rect.left - (shift ? shift.left : 0),
14611
+ top: rect.top - (shift ? shift.top : 0)
14443
14612
  };
14444
14613
  }
14614
+ function getOrigins(instance) {
14615
+ let origins;
14616
+ for (let group = instance.parent; group; group = group.parent) {
14617
+ const willMove = pendingGroups.get(group);
14618
+ if (willMove) {
14619
+ const item = findItem(group.vnode.el, instance.vnode.el);
14620
+ if (item) {
14621
+ (origins || (origins = [])).push(
14622
+ extend(getPosition(item), { item, willMove })
14623
+ );
14624
+ }
14625
+ }
14626
+ }
14627
+ return origins;
14628
+ }
14629
+ function findItem(root, node) {
14630
+ const container = root.nodeType === 1 ? root : root.parentNode;
14631
+ while (node && node.parentNode !== container) {
14632
+ node = node.parentNode;
14633
+ }
14634
+ if (node && node.nodeType === 1) {
14635
+ return node;
14636
+ }
14637
+ }
14638
+ function getOriginShift(origins, root) {
14639
+ const origin = origins.find((o) => o.willMove() && o.item.contains(root));
14640
+ return origin && getPosition(origin.item, origin);
14641
+ }
14445
14642
  function hasCSSTransform(el, root, moveClass) {
14446
14643
  const clone = el.cloneNode();
14447
14644
  const _vtc = el[vtcKey];
@@ -16383,7 +16580,8 @@ Make sure to use the production build (*.prod.js) when deploying for production.
16383
16580
  [42]: `v-model value must be a valid JavaScript member expression.`,
16384
16581
  [43]: `v-model cannot be used on v-for or v-slot scope variables because they are not writable.`,
16385
16582
  [44]: `v-model cannot be used on a prop, because local prop bindings are not writable.
16386
- Use a v-bind binding combined with a v-on listener that emits update:x event instead.`,
16583
+ Use a v-bind binding combined with a v-on listener that emits update:x event instead.
16584
+ For props declared with defineModel(), assign the returned ref to a variable and use v-model on that variable.`,
16387
16585
  [45]: `v-model cannot be used on a const binding because it is not writable.`,
16388
16586
  [46]: `Error parsing JavaScript expression: `,
16389
16587
  [47]: `<KeepAlive> expects exactly one child component.`,
@@ -18974,7 +19172,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
18974
19172
  createCompoundExpression([`const _memo = (`, memo.exp, `)`]),
18975
19173
  createCompoundExpression([
18976
19174
  `if (_cached && _cached.el`,
18977
- ...keyExp ? [` && _cached.key === `, keyExp] : [],
19175
+ ...keyExp ? [` && _cached.key === (`, keyExp, `)`] : [],
18978
19176
  ` && ${context.helperString(
18979
19177
  IS_MEMO_SAME
18980
19178
  )}(_cached, _memo)) return _cached`
@@ -20913,7 +21111,8 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
20913
21111
  if (!node.children.length) {
20914
21112
  return;
20915
21113
  }
20916
- if (hasMultipleChildren(node)) {
21114
+ const multipleChildren = hasMultipleChildren(node);
21115
+ if (multipleChildren) {
20917
21116
  context.onError(
20918
21117
  createDOMCompilerError(
20919
21118
  63,
@@ -21140,7 +21339,8 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
21140
21339
 
21141
21340
  const DOMNodeTransforms = [
21142
21341
  transformStyle,
21143
- ...[transformTransition, validateHtmlNesting]
21342
+ transformTransition,
21343
+ ...[validateHtmlNesting]
21144
21344
  ];
21145
21345
  const DOMDirectiveTransforms = {
21146
21346
  cloak: noopDirectiveTransform,