@vue/compat 3.5.11 → 3.5.13

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.11
2
+ * @vue/compat v3.5.13
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
@@ -215,10 +215,9 @@ var Vue = (function () {
215
215
  return ret;
216
216
  }
217
217
  function stringifyStyle(styles) {
218
+ if (!styles) return "";
219
+ if (isString(styles)) return styles;
218
220
  let ret = "";
219
- if (!styles || isString(styles)) {
220
- return ret;
221
- }
222
221
  for (const key in styles) {
223
222
  const value = styles[key];
224
223
  if (isString(value) || typeof value === "number") {
@@ -481,17 +480,21 @@ var Vue = (function () {
481
480
  }
482
481
  stop(fromParent) {
483
482
  if (this._active) {
483
+ this._active = false;
484
484
  let i, l;
485
485
  for (i = 0, l = this.effects.length; i < l; i++) {
486
486
  this.effects[i].stop();
487
487
  }
488
+ this.effects.length = 0;
488
489
  for (i = 0, l = this.cleanups.length; i < l; i++) {
489
490
  this.cleanups[i]();
490
491
  }
492
+ this.cleanups.length = 0;
491
493
  if (this.scopes) {
492
494
  for (i = 0, l = this.scopes.length; i < l; i++) {
493
495
  this.scopes[i].stop(true);
494
496
  }
497
+ this.scopes.length = 0;
495
498
  }
496
499
  if (!this.detached && this.parent && !fromParent) {
497
500
  const last = this.parent.scopes.pop();
@@ -501,7 +504,6 @@ var Vue = (function () {
501
504
  }
502
505
  }
503
506
  this.parent = void 0;
504
- this._active = false;
505
507
  }
506
508
  }
507
509
  }
@@ -766,16 +768,16 @@ var Vue = (function () {
766
768
  nextSub.prevSub = prevSub;
767
769
  link.nextSub = void 0;
768
770
  }
769
- if (dep.subs === link) {
770
- dep.subs = prevSub;
771
- }
772
771
  if (dep.subsHead === link) {
773
772
  dep.subsHead = nextSub;
774
773
  }
775
- if (!dep.subs && dep.computed) {
776
- dep.computed.flags &= ~4;
777
- for (let l = dep.computed.deps; l; l = l.nextDep) {
778
- removeSub(l, true);
774
+ if (dep.subs === link) {
775
+ dep.subs = prevSub;
776
+ if (!prevSub && dep.computed) {
777
+ dep.computed.flags &= ~4;
778
+ for (let l = dep.computed.deps; l; l = l.nextDep) {
779
+ removeSub(l, true);
780
+ }
779
781
  }
780
782
  }
781
783
  if (!soft && !--dep.sc && dep.map) {
@@ -1035,7 +1037,7 @@ var Vue = (function () {
1035
1037
  }
1036
1038
  });
1037
1039
  } else {
1038
- if (key !== void 0) {
1040
+ if (key !== void 0 || depsMap.has(void 0)) {
1039
1041
  run(depsMap.get(key));
1040
1042
  }
1041
1043
  if (isArrayIndex) {
@@ -1267,6 +1269,7 @@ var Vue = (function () {
1267
1269
  this._isShallow = _isShallow;
1268
1270
  }
1269
1271
  get(target, key, receiver) {
1272
+ if (key === "__v_skip") return target["__v_skip"];
1270
1273
  const isReadonly2 = this._isReadonly, isShallow2 = this._isShallow;
1271
1274
  if (key === "__v_isReactive") {
1272
1275
  return !isReadonly2;
@@ -1410,117 +1413,6 @@ var Vue = (function () {
1410
1413
 
1411
1414
  const toShallow = (value) => value;
1412
1415
  const getProto = (v) => Reflect.getPrototypeOf(v);
1413
- function get(target, key, isReadonly2 = false, isShallow2 = false) {
1414
- target = target["__v_raw"];
1415
- const rawTarget = toRaw(target);
1416
- const rawKey = toRaw(key);
1417
- if (!isReadonly2) {
1418
- if (hasChanged(key, rawKey)) {
1419
- track(rawTarget, "get", key);
1420
- }
1421
- track(rawTarget, "get", rawKey);
1422
- }
1423
- const { has: has2 } = getProto(rawTarget);
1424
- const wrap = isShallow2 ? toShallow : isReadonly2 ? toReadonly : toReactive;
1425
- if (has2.call(rawTarget, key)) {
1426
- return wrap(target.get(key));
1427
- } else if (has2.call(rawTarget, rawKey)) {
1428
- return wrap(target.get(rawKey));
1429
- } else if (target !== rawTarget) {
1430
- target.get(key);
1431
- }
1432
- }
1433
- function has(key, isReadonly2 = false) {
1434
- const target = this["__v_raw"];
1435
- const rawTarget = toRaw(target);
1436
- const rawKey = toRaw(key);
1437
- if (!isReadonly2) {
1438
- if (hasChanged(key, rawKey)) {
1439
- track(rawTarget, "has", key);
1440
- }
1441
- track(rawTarget, "has", rawKey);
1442
- }
1443
- return key === rawKey ? target.has(key) : target.has(key) || target.has(rawKey);
1444
- }
1445
- function size(target, isReadonly2 = false) {
1446
- target = target["__v_raw"];
1447
- !isReadonly2 && track(toRaw(target), "iterate", ITERATE_KEY);
1448
- return Reflect.get(target, "size", target);
1449
- }
1450
- function add(value, _isShallow = false) {
1451
- if (!_isShallow && !isShallow(value) && !isReadonly(value)) {
1452
- value = toRaw(value);
1453
- }
1454
- const target = toRaw(this);
1455
- const proto = getProto(target);
1456
- const hadKey = proto.has.call(target, value);
1457
- if (!hadKey) {
1458
- target.add(value);
1459
- trigger(target, "add", value, value);
1460
- }
1461
- return this;
1462
- }
1463
- function set(key, value, _isShallow = false) {
1464
- if (!_isShallow && !isShallow(value) && !isReadonly(value)) {
1465
- value = toRaw(value);
1466
- }
1467
- const target = toRaw(this);
1468
- const { has: has2, get: get2 } = getProto(target);
1469
- let hadKey = has2.call(target, key);
1470
- if (!hadKey) {
1471
- key = toRaw(key);
1472
- hadKey = has2.call(target, key);
1473
- } else {
1474
- checkIdentityKeys(target, has2, key);
1475
- }
1476
- const oldValue = get2.call(target, key);
1477
- target.set(key, value);
1478
- if (!hadKey) {
1479
- trigger(target, "add", key, value);
1480
- } else if (hasChanged(value, oldValue)) {
1481
- trigger(target, "set", key, value, oldValue);
1482
- }
1483
- return this;
1484
- }
1485
- function deleteEntry(key) {
1486
- const target = toRaw(this);
1487
- const { has: has2, get: get2 } = getProto(target);
1488
- let hadKey = has2.call(target, key);
1489
- if (!hadKey) {
1490
- key = toRaw(key);
1491
- hadKey = has2.call(target, key);
1492
- } else {
1493
- checkIdentityKeys(target, has2, key);
1494
- }
1495
- const oldValue = get2 ? get2.call(target, key) : void 0;
1496
- const result = target.delete(key);
1497
- if (hadKey) {
1498
- trigger(target, "delete", key, void 0, oldValue);
1499
- }
1500
- return result;
1501
- }
1502
- function clear() {
1503
- const target = toRaw(this);
1504
- const hadItems = target.size !== 0;
1505
- const oldTarget = isMap(target) ? new Map(target) : new Set(target) ;
1506
- const result = target.clear();
1507
- if (hadItems) {
1508
- trigger(target, "clear", void 0, void 0, oldTarget);
1509
- }
1510
- return result;
1511
- }
1512
- function createForEach(isReadonly2, isShallow2) {
1513
- return function forEach(callback, thisArg) {
1514
- const observed = this;
1515
- const target = observed["__v_raw"];
1516
- const rawTarget = toRaw(target);
1517
- const wrap = isShallow2 ? toShallow : isReadonly2 ? toReadonly : toReactive;
1518
- !isReadonly2 && track(rawTarget, "iterate", ITERATE_KEY);
1519
- return target.forEach((value, key) => {
1520
- return callback.call(thisArg, wrap(value), wrap(key), observed);
1521
- });
1522
- };
1523
- }
1524
1416
  function createIterableMethod(method, isReadonly2, isShallow2) {
1525
1417
  return function(...args) {
1526
1418
  const target = this["__v_raw"];
@@ -1563,71 +1455,134 @@ var Vue = (function () {
1563
1455
  return type === "delete" ? false : type === "clear" ? void 0 : this;
1564
1456
  };
1565
1457
  }
1566
- function createInstrumentations() {
1567
- const mutableInstrumentations2 = {
1458
+ function createInstrumentations(readonly, shallow) {
1459
+ const instrumentations = {
1568
1460
  get(key) {
1569
- return get(this, key);
1570
- },
1571
- get size() {
1572
- return size(this);
1573
- },
1574
- has,
1575
- add,
1576
- set,
1577
- delete: deleteEntry,
1578
- clear,
1579
- forEach: createForEach(false, false)
1580
- };
1581
- const shallowInstrumentations2 = {
1582
- get(key) {
1583
- return get(this, key, false, true);
1584
- },
1585
- get size() {
1586
- return size(this);
1587
- },
1588
- has,
1589
- add(value) {
1590
- return add.call(this, value, true);
1591
- },
1592
- set(key, value) {
1593
- return set.call(this, key, value, true);
1594
- },
1595
- delete: deleteEntry,
1596
- clear,
1597
- forEach: createForEach(false, true)
1598
- };
1599
- const readonlyInstrumentations2 = {
1600
- get(key) {
1601
- return get(this, key, true);
1602
- },
1603
- get size() {
1604
- return size(this, true);
1605
- },
1606
- has(key) {
1607
- return has.call(this, key, true);
1608
- },
1609
- add: createReadonlyMethod("add"),
1610
- set: createReadonlyMethod("set"),
1611
- delete: createReadonlyMethod("delete"),
1612
- clear: createReadonlyMethod("clear"),
1613
- forEach: createForEach(true, false)
1614
- };
1615
- const shallowReadonlyInstrumentations2 = {
1616
- get(key) {
1617
- return get(this, key, true, true);
1461
+ const target = this["__v_raw"];
1462
+ const rawTarget = toRaw(target);
1463
+ const rawKey = toRaw(key);
1464
+ if (!readonly) {
1465
+ if (hasChanged(key, rawKey)) {
1466
+ track(rawTarget, "get", key);
1467
+ }
1468
+ track(rawTarget, "get", rawKey);
1469
+ }
1470
+ const { has } = getProto(rawTarget);
1471
+ const wrap = shallow ? toShallow : readonly ? toReadonly : toReactive;
1472
+ if (has.call(rawTarget, key)) {
1473
+ return wrap(target.get(key));
1474
+ } else if (has.call(rawTarget, rawKey)) {
1475
+ return wrap(target.get(rawKey));
1476
+ } else if (target !== rawTarget) {
1477
+ target.get(key);
1478
+ }
1618
1479
  },
1619
1480
  get size() {
1620
- return size(this, true);
1481
+ const target = this["__v_raw"];
1482
+ !readonly && track(toRaw(target), "iterate", ITERATE_KEY);
1483
+ return Reflect.get(target, "size", target);
1621
1484
  },
1622
1485
  has(key) {
1623
- return has.call(this, key, true);
1486
+ const target = this["__v_raw"];
1487
+ const rawTarget = toRaw(target);
1488
+ const rawKey = toRaw(key);
1489
+ if (!readonly) {
1490
+ if (hasChanged(key, rawKey)) {
1491
+ track(rawTarget, "has", key);
1492
+ }
1493
+ track(rawTarget, "has", rawKey);
1494
+ }
1495
+ return key === rawKey ? target.has(key) : target.has(key) || target.has(rawKey);
1624
1496
  },
1625
- add: createReadonlyMethod("add"),
1626
- set: createReadonlyMethod("set"),
1627
- delete: createReadonlyMethod("delete"),
1628
- clear: createReadonlyMethod("clear"),
1629
- forEach: createForEach(true, true)
1497
+ forEach(callback, thisArg) {
1498
+ const observed = this;
1499
+ const target = observed["__v_raw"];
1500
+ const rawTarget = toRaw(target);
1501
+ const wrap = shallow ? toShallow : readonly ? toReadonly : toReactive;
1502
+ !readonly && track(rawTarget, "iterate", ITERATE_KEY);
1503
+ return target.forEach((value, key) => {
1504
+ return callback.call(thisArg, wrap(value), wrap(key), observed);
1505
+ });
1506
+ }
1630
1507
  };
1508
+ extend(
1509
+ instrumentations,
1510
+ readonly ? {
1511
+ add: createReadonlyMethod("add"),
1512
+ set: createReadonlyMethod("set"),
1513
+ delete: createReadonlyMethod("delete"),
1514
+ clear: createReadonlyMethod("clear")
1515
+ } : {
1516
+ add(value) {
1517
+ if (!shallow && !isShallow(value) && !isReadonly(value)) {
1518
+ value = toRaw(value);
1519
+ }
1520
+ const target = toRaw(this);
1521
+ const proto = getProto(target);
1522
+ const hadKey = proto.has.call(target, value);
1523
+ if (!hadKey) {
1524
+ target.add(value);
1525
+ trigger(target, "add", value, value);
1526
+ }
1527
+ return this;
1528
+ },
1529
+ set(key, value) {
1530
+ if (!shallow && !isShallow(value) && !isReadonly(value)) {
1531
+ value = toRaw(value);
1532
+ }
1533
+ const target = toRaw(this);
1534
+ const { has, get } = getProto(target);
1535
+ let hadKey = has.call(target, key);
1536
+ if (!hadKey) {
1537
+ key = toRaw(key);
1538
+ hadKey = has.call(target, key);
1539
+ } else {
1540
+ checkIdentityKeys(target, has, key);
1541
+ }
1542
+ const oldValue = get.call(target, key);
1543
+ target.set(key, value);
1544
+ if (!hadKey) {
1545
+ trigger(target, "add", key, value);
1546
+ } else if (hasChanged(value, oldValue)) {
1547
+ trigger(target, "set", key, value, oldValue);
1548
+ }
1549
+ return this;
1550
+ },
1551
+ delete(key) {
1552
+ const target = toRaw(this);
1553
+ const { has, get } = getProto(target);
1554
+ let hadKey = has.call(target, key);
1555
+ if (!hadKey) {
1556
+ key = toRaw(key);
1557
+ hadKey = has.call(target, key);
1558
+ } else {
1559
+ checkIdentityKeys(target, has, key);
1560
+ }
1561
+ const oldValue = get ? get.call(target, key) : void 0;
1562
+ const result = target.delete(key);
1563
+ if (hadKey) {
1564
+ trigger(target, "delete", key, void 0, oldValue);
1565
+ }
1566
+ return result;
1567
+ },
1568
+ clear() {
1569
+ const target = toRaw(this);
1570
+ const hadItems = target.size !== 0;
1571
+ const oldTarget = isMap(target) ? new Map(target) : new Set(target) ;
1572
+ const result = target.clear();
1573
+ if (hadItems) {
1574
+ trigger(
1575
+ target,
1576
+ "clear",
1577
+ void 0,
1578
+ void 0,
1579
+ oldTarget
1580
+ );
1581
+ }
1582
+ return result;
1583
+ }
1584
+ }
1585
+ );
1631
1586
  const iteratorMethods = [
1632
1587
  "keys",
1633
1588
  "values",
@@ -1635,30 +1590,12 @@ var Vue = (function () {
1635
1590
  Symbol.iterator
1636
1591
  ];
1637
1592
  iteratorMethods.forEach((method) => {
1638
- mutableInstrumentations2[method] = createIterableMethod(method, false, false);
1639
- readonlyInstrumentations2[method] = createIterableMethod(method, true, false);
1640
- shallowInstrumentations2[method] = createIterableMethod(method, false, true);
1641
- shallowReadonlyInstrumentations2[method] = createIterableMethod(
1642
- method,
1643
- true,
1644
- true
1645
- );
1593
+ instrumentations[method] = createIterableMethod(method, readonly, shallow);
1646
1594
  });
1647
- return [
1648
- mutableInstrumentations2,
1649
- readonlyInstrumentations2,
1650
- shallowInstrumentations2,
1651
- shallowReadonlyInstrumentations2
1652
- ];
1595
+ return instrumentations;
1653
1596
  }
1654
- const [
1655
- mutableInstrumentations,
1656
- readonlyInstrumentations,
1657
- shallowInstrumentations,
1658
- shallowReadonlyInstrumentations
1659
- ] = /* @__PURE__ */ createInstrumentations();
1660
1597
  function createInstrumentationGetter(isReadonly2, shallow) {
1661
- const instrumentations = shallow ? isReadonly2 ? shallowReadonlyInstrumentations : shallowInstrumentations : isReadonly2 ? readonlyInstrumentations : mutableInstrumentations;
1598
+ const instrumentations = createInstrumentations(isReadonly2, shallow);
1662
1599
  return (target, key, receiver) => {
1663
1600
  if (key === "__v_isReactive") {
1664
1601
  return !isReadonly2;
@@ -1686,9 +1623,9 @@ var Vue = (function () {
1686
1623
  const shallowReadonlyCollectionHandlers = {
1687
1624
  get: /* @__PURE__ */ createInstrumentationGetter(true, true)
1688
1625
  };
1689
- function checkIdentityKeys(target, has2, key) {
1626
+ function checkIdentityKeys(target, has, key) {
1690
1627
  const rawKey = toRaw(key);
1691
- if (rawKey !== key && has2.call(target, rawKey)) {
1628
+ if (rawKey !== key && has.call(target, rawKey)) {
1692
1629
  const type = toRawType(target);
1693
1630
  warn$2(
1694
1631
  `Reactive ${type} contains both the raw and reactive versions of the same object${type === `Map` ? ` as keys` : ``}, which can lead to inconsistencies. Avoid differentiating between the raw and reactive versions of an object and only use the reactive version if possible.`
@@ -2169,7 +2106,7 @@ var Vue = (function () {
2169
2106
  const scope = getCurrentScope();
2170
2107
  const watchHandle = () => {
2171
2108
  effect.stop();
2172
- if (scope) {
2109
+ if (scope && scope.active) {
2173
2110
  remove(scope.effects, effect);
2174
2111
  }
2175
2112
  };
@@ -3642,7 +3579,7 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
3642
3579
  }
3643
3580
  if (!disabled) {
3644
3581
  mount(target, targetAnchor);
3645
- updateCssVars(n2);
3582
+ updateCssVars(n2, false);
3646
3583
  }
3647
3584
  } else if (!disabled) {
3648
3585
  warn$1(
@@ -3654,14 +3591,35 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
3654
3591
  };
3655
3592
  if (disabled) {
3656
3593
  mount(container, mainAnchor);
3657
- updateCssVars(n2);
3594
+ updateCssVars(n2, true);
3658
3595
  }
3659
3596
  if (isTeleportDeferred(n2.props)) {
3660
- queuePostRenderEffect(mountToTarget, parentSuspense);
3597
+ queuePostRenderEffect(() => {
3598
+ mountToTarget();
3599
+ n2.el.__isMounted = true;
3600
+ }, parentSuspense);
3661
3601
  } else {
3662
3602
  mountToTarget();
3663
3603
  }
3664
3604
  } else {
3605
+ if (isTeleportDeferred(n2.props) && !n1.el.__isMounted) {
3606
+ queuePostRenderEffect(() => {
3607
+ TeleportImpl.process(
3608
+ n1,
3609
+ n2,
3610
+ container,
3611
+ anchor,
3612
+ parentComponent,
3613
+ parentSuspense,
3614
+ namespace,
3615
+ slotScopeIds,
3616
+ optimized,
3617
+ internals
3618
+ );
3619
+ delete n1.el.__isMounted;
3620
+ }, parentSuspense);
3621
+ return;
3622
+ }
3665
3623
  n2.el = n1.el;
3666
3624
  n2.targetStart = n1.targetStart;
3667
3625
  const mainAnchor = n2.anchor = n1.anchor;
@@ -3744,7 +3702,7 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
3744
3702
  );
3745
3703
  }
3746
3704
  }
3747
- updateCssVars(n2);
3705
+ updateCssVars(n2, disabled);
3748
3706
  }
3749
3707
  },
3750
3708
  remove(vnode, parentComponent, parentSuspense, { um: unmount, o: { remove: hostRemove } }, doRemove) {
@@ -3812,9 +3770,10 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
3812
3770
  querySelector
3813
3771
  );
3814
3772
  if (target) {
3773
+ const disabled = isTeleportDisabled(vnode.props);
3815
3774
  const targetNode = target._lpa || target.firstChild;
3816
3775
  if (vnode.shapeFlag & 16) {
3817
- if (isTeleportDisabled(vnode.props)) {
3776
+ if (disabled) {
3818
3777
  vnode.anchor = hydrateChildren(
3819
3778
  nextSibling(node),
3820
3779
  vnode,
@@ -3855,16 +3814,23 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
3855
3814
  );
3856
3815
  }
3857
3816
  }
3858
- updateCssVars(vnode);
3817
+ updateCssVars(vnode, disabled);
3859
3818
  }
3860
3819
  return vnode.anchor && nextSibling(vnode.anchor);
3861
3820
  }
3862
3821
  const Teleport = TeleportImpl;
3863
- function updateCssVars(vnode) {
3822
+ function updateCssVars(vnode, isDisabled) {
3864
3823
  const ctx = vnode.ctx;
3865
3824
  if (ctx && ctx.ut) {
3866
- let node = vnode.targetStart;
3867
- while (node && node !== vnode.targetAnchor) {
3825
+ let node, anchor;
3826
+ if (isDisabled) {
3827
+ node = vnode.el;
3828
+ anchor = vnode.anchor;
3829
+ } else {
3830
+ node = vnode.targetStart;
3831
+ anchor = vnode.targetAnchor;
3832
+ }
3833
+ while (node && node !== anchor) {
3868
3834
  if (node.nodeType === 1) node.setAttribute("data-v-owner", ctx.uid);
3869
3835
  node = node.nextSibling;
3870
3836
  }
@@ -3959,10 +3925,9 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
3959
3925
  if (innerChild.type !== Comment) {
3960
3926
  setTransitionHooks(innerChild, enterHooks);
3961
3927
  }
3962
- const oldChild = instance.subTree;
3963
- const oldInnerChild = oldChild && getInnerChild$1(oldChild);
3928
+ let oldInnerChild = instance.subTree && getInnerChild$1(instance.subTree);
3964
3929
  if (oldInnerChild && oldInnerChild.type !== Comment && !isSameVNodeType(innerChild, oldInnerChild) && recursiveGetSubtree(instance).type !== Comment) {
3965
- const leavingHooks = resolveTransitionHooks(
3930
+ let leavingHooks = resolveTransitionHooks(
3966
3931
  oldInnerChild,
3967
3932
  rawProps,
3968
3933
  state,
@@ -3977,6 +3942,7 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
3977
3942
  instance.update();
3978
3943
  }
3979
3944
  delete leavingHooks.afterLeave;
3945
+ oldInnerChild = void 0;
3980
3946
  };
3981
3947
  return emptyPlaceholder(child);
3982
3948
  } else if (mode === "in-out" && innerChild.type !== Comment) {
@@ -3990,10 +3956,19 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
3990
3956
  earlyRemove();
3991
3957
  el[leaveCbKey] = void 0;
3992
3958
  delete enterHooks.delayedLeave;
3959
+ oldInnerChild = void 0;
3960
+ };
3961
+ enterHooks.delayedLeave = () => {
3962
+ delayedLeave();
3963
+ delete enterHooks.delayedLeave;
3964
+ oldInnerChild = void 0;
3993
3965
  };
3994
- enterHooks.delayedLeave = delayedLeave;
3995
3966
  };
3967
+ } else {
3968
+ oldInnerChild = void 0;
3996
3969
  }
3970
+ } else if (oldInnerChild) {
3971
+ oldInnerChild = void 0;
3997
3972
  }
3998
3973
  return child;
3999
3974
  };
@@ -4301,6 +4276,9 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
4301
4276
  return;
4302
4277
  }
4303
4278
  if (isAsyncWrapper(vnode) && !isUnmount) {
4279
+ if (vnode.shapeFlag & 512 && vnode.type.__asyncResolved && vnode.component.subTree.component) {
4280
+ setRef(rawRef, oldRawRef, parentSuspense, vnode.component.subTree);
4281
+ }
4304
4282
  return;
4305
4283
  }
4306
4284
  const refValue = vnode.shapeFlag & 4 ? getComponentPublicInstance(vnode.component) : vnode.el;
@@ -4317,8 +4295,15 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
4317
4295
  const setupState = owner.setupState;
4318
4296
  const rawSetupState = toRaw(setupState);
4319
4297
  const canSetSetupRef = setupState === EMPTY_OBJ ? () => false : (key) => {
4320
- if (knownTemplateRefs.has(rawSetupState[key])) {
4321
- return false;
4298
+ {
4299
+ if (hasOwn(rawSetupState, key) && !isRef(rawSetupState[key])) {
4300
+ warn$1(
4301
+ `Template ref "${key}" used on a non-ref value. It will not work in the production build.`
4302
+ );
4303
+ }
4304
+ if (knownTemplateRefs.has(rawSetupState[key])) {
4305
+ return false;
4306
+ }
4322
4307
  }
4323
4308
  return hasOwn(rawSetupState, key);
4324
4309
  };
@@ -4558,7 +4543,7 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
4558
4543
  getContainerType(container),
4559
4544
  optimized
4560
4545
  );
4561
- if (isAsyncWrapper(vnode)) {
4546
+ if (isAsyncWrapper(vnode) && !vnode.type.__asyncResolved) {
4562
4547
  let subTree;
4563
4548
  if (isFragmentStart) {
4564
4549
  subTree = createVNode(Fragment);
@@ -4615,7 +4600,11 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
4615
4600
  }
4616
4601
  let needCallTransitionHooks = false;
4617
4602
  if (isTemplateNode(el)) {
4618
- needCallTransitionHooks = needTransition(parentSuspense, transition) && parentComponent && parentComponent.vnode.props && parentComponent.vnode.props.appear;
4603
+ needCallTransitionHooks = needTransition(
4604
+ null,
4605
+ // no need check parentSuspense in hydration
4606
+ transition
4607
+ ) && parentComponent && parentComponent.vnode.props && parentComponent.vnode.props.appear;
4619
4608
  const content = el.content.firstChild;
4620
4609
  if (needCallTransitionHooks) {
4621
4610
  transition.beforeEnter(content);
@@ -4823,6 +4812,10 @@ Server rendered element contains fewer child nodes than client vdom.`
4823
4812
  getContainerType(container),
4824
4813
  slotScopeIds
4825
4814
  );
4815
+ if (parentComponent) {
4816
+ parentComponent.vnode.el = vnode.el;
4817
+ updateHOCHostEl(parentComponent, vnode.el);
4818
+ }
4826
4819
  return next;
4827
4820
  };
4828
4821
  const locateClosingAnchor = (node, open = "[", close = "]") => {
@@ -5008,6 +5001,8 @@ Server rendered element contains fewer child nodes than client vdom.`
5008
5001
  }
5009
5002
  }
5010
5003
 
5004
+ const requestIdleCallback = getGlobalThis().requestIdleCallback || ((cb) => setTimeout(cb, 1));
5005
+ const cancelIdleCallback = getGlobalThis().cancelIdleCallback || ((id) => clearTimeout(id));
5011
5006
  const hydrateOnIdle = (timeout = 1e4) => (hydrate) => {
5012
5007
  const id = requestIdleCallback(hydrate, { timeout });
5013
5008
  return () => cancelIdleCallback(id);
@@ -5995,12 +5990,13 @@ If this is a native custom element, make sure to exclude it from component resol
5995
5990
  }
5996
5991
  openBlock();
5997
5992
  const validSlotContent = slot && ensureValidVNode(slot(props));
5993
+ const slotKey = props.key || // slot content array of a dynamic conditional slot may have a branch
5994
+ // key attached in the `createSlots` helper, respect that
5995
+ validSlotContent && validSlotContent.key;
5998
5996
  const rendered = createBlock(
5999
5997
  Fragment,
6000
5998
  {
6001
- key: (props.key || // slot content array of a dynamic conditional slot may have a branch
6002
- // key attached in the `createSlots` helper, respect that
6003
- validSlotContent && validSlotContent.key || `_${name}`) + // #7256 force differentiate fallback content from actual content
5999
+ key: (slotKey && !isSymbol(slotKey) ? slotKey : `_${name}`) + // #7256 force differentiate fallback content from actual content
6004
6000
  (!validSlotContent && fallback ? "_fb" : "")
6005
6001
  },
6006
6002
  validSlotContent || (fallback ? fallback() : []),
@@ -7166,7 +7162,7 @@ If this is a native custom element, make sure to exclude it from component resol
7166
7162
  return vm;
7167
7163
  }
7168
7164
  }
7169
- Vue.version = `2.6.14-compat:${"3.5.11"}`;
7165
+ Vue.version = `2.6.14-compat:${"3.5.13"}`;
7170
7166
  Vue.config = singletonApp.config;
7171
7167
  Vue.use = (plugin, ...options) => {
7172
7168
  if (plugin && isFunction(plugin.install)) {
@@ -8154,6 +8150,7 @@ If you want to remount the same app, move your app creation logic into a factory
8154
8150
  function validateProps(rawProps, props, instance) {
8155
8151
  const resolvedValues = toRaw(props);
8156
8152
  const options = instance.propsOptions[0];
8153
+ const camelizePropsKey = Object.keys(rawProps).map((key) => camelize(key));
8157
8154
  for (const key in options) {
8158
8155
  let opt = options[key];
8159
8156
  if (opt == null) continue;
@@ -8162,7 +8159,7 @@ If you want to remount the same app, move your app creation logic into a factory
8162
8159
  resolvedValues[key],
8163
8160
  opt,
8164
8161
  shallowReadonly(resolvedValues) ,
8165
- !hasOwn(rawProps, key) && !hasOwn(rawProps, hyphenate(key))
8162
+ !camelizePropsKey.includes(key)
8166
8163
  );
8167
8164
  }
8168
8165
  }
@@ -10034,19 +10031,19 @@ If you want to remount the same app, move your app creation logic into a factory
10034
10031
  warn$1(`useModel() called without active instance.`);
10035
10032
  return ref();
10036
10033
  }
10037
- if (!i.propsOptions[0][name]) {
10034
+ const camelizedName = camelize(name);
10035
+ if (!i.propsOptions[0][camelizedName]) {
10038
10036
  warn$1(`useModel() called with prop "${name}" which is not declared.`);
10039
10037
  return ref();
10040
10038
  }
10041
- const camelizedName = camelize(name);
10042
10039
  const hyphenatedName = hyphenate(name);
10043
- const modifiers = getModelModifiers(props, name);
10040
+ const modifiers = getModelModifiers(props, camelizedName);
10044
10041
  const res = customRef((track, trigger) => {
10045
10042
  let localValue;
10046
10043
  let prevSetValue = EMPTY_OBJ;
10047
10044
  let prevEmittedValue;
10048
10045
  watchSyncEffect(() => {
10049
- const propValue = props[name];
10046
+ const propValue = props[camelizedName];
10050
10047
  if (hasChanged(localValue, propValue)) {
10051
10048
  localValue = propValue;
10052
10049
  trigger();
@@ -10352,7 +10349,7 @@ If you want to remount the same app, move your app creation logic into a factory
10352
10349
  }
10353
10350
  if (extraAttrs.length) {
10354
10351
  warn$1(
10355
- `Extraneous non-props attributes (${extraAttrs.join(", ")}) were passed to component but could not be automatically inherited because component renders fragment or text root nodes.`
10352
+ `Extraneous non-props attributes (${extraAttrs.join(", ")}) were passed to component but could not be automatically inherited because component renders fragment or text or teleport root nodes.`
10356
10353
  );
10357
10354
  }
10358
10355
  if (eventAttrs.length) {
@@ -11213,9 +11210,9 @@ If you want to remount the same app, move your app creation logic into a factory
11213
11210
  currentBlock = blockStack[blockStack.length - 1] || null;
11214
11211
  }
11215
11212
  let isBlockTreeEnabled = 1;
11216
- function setBlockTracking(value) {
11213
+ function setBlockTracking(value, inVOnce = false) {
11217
11214
  isBlockTreeEnabled += value;
11218
- if (value < 0 && currentBlock) {
11215
+ if (value < 0 && currentBlock && inVOnce) {
11219
11216
  currentBlock.hasOnce = true;
11220
11217
  }
11221
11218
  }
@@ -11756,9 +11753,9 @@ Component that was made reactive: `,
11756
11753
  }
11757
11754
  const { setup } = Component;
11758
11755
  if (setup) {
11756
+ pauseTracking();
11759
11757
  const setupContext = instance.setupContext = setup.length > 1 ? createSetupContext(instance) : null;
11760
11758
  const reset = setCurrentInstance(instance);
11761
- pauseTracking();
11762
11759
  const setupResult = callWithErrorHandling(
11763
11760
  setup,
11764
11761
  instance,
@@ -11768,10 +11765,13 @@ Component that was made reactive: `,
11768
11765
  setupContext
11769
11766
  ]
11770
11767
  );
11768
+ const isAsyncSetup = isPromise(setupResult);
11771
11769
  resetTracking();
11772
11770
  reset();
11773
- if (isPromise(setupResult)) {
11774
- if (!isAsyncWrapper(instance)) markAsyncBoundary(instance);
11771
+ if ((isAsyncSetup || instance.sp) && !isAsyncWrapper(instance)) {
11772
+ markAsyncBoundary(instance);
11773
+ }
11774
+ if (isAsyncSetup) {
11775
11775
  setupResult.then(unsetCurrentInstance, unsetCurrentInstance);
11776
11776
  if (isSSR) {
11777
11777
  return setupResult.then((resolvedResult) => {
@@ -12244,7 +12244,7 @@ Component that was made reactive: `,
12244
12244
  return true;
12245
12245
  }
12246
12246
 
12247
- const version = "3.5.11";
12247
+ const version = "3.5.13";
12248
12248
  const warn = warn$1 ;
12249
12249
  const ErrorTypeStrings = ErrorTypeStrings$1 ;
12250
12250
  const devtools = devtools$1 ;
@@ -12442,7 +12442,8 @@ Component that was made reactive: `,
12442
12442
  onAppear = onEnter,
12443
12443
  onAppearCancelled = onEnterCancelled
12444
12444
  } = baseProps;
12445
- const finishEnter = (el, isAppear, done) => {
12445
+ const finishEnter = (el, isAppear, done, isCancelled) => {
12446
+ el._enterCancelled = isCancelled;
12446
12447
  removeTransitionClass(el, isAppear ? appearToClass : enterToClass);
12447
12448
  removeTransitionClass(el, isAppear ? appearActiveClass : enterActiveClass);
12448
12449
  done && done();
@@ -12500,8 +12501,13 @@ Component that was made reactive: `,
12500
12501
  if (legacyClassEnabled && legacyLeaveFromClass) {
12501
12502
  addTransitionClass(el, legacyLeaveFromClass);
12502
12503
  }
12503
- addTransitionClass(el, leaveActiveClass);
12504
- forceReflow();
12504
+ if (!el._enterCancelled) {
12505
+ forceReflow();
12506
+ addTransitionClass(el, leaveActiveClass);
12507
+ } else {
12508
+ addTransitionClass(el, leaveActiveClass);
12509
+ forceReflow();
12510
+ }
12505
12511
  nextFrame(() => {
12506
12512
  if (!el._isLeaving) {
12507
12513
  return;
@@ -12518,11 +12524,11 @@ Component that was made reactive: `,
12518
12524
  callHook(onLeave, [el, resolve]);
12519
12525
  },
12520
12526
  onEnterCancelled(el) {
12521
- finishEnter(el, false);
12527
+ finishEnter(el, false, void 0, true);
12522
12528
  callHook(onEnterCancelled, [el]);
12523
12529
  },
12524
12530
  onAppearCancelled(el) {
12525
- finishEnter(el, true);
12531
+ finishEnter(el, true, void 0, true);
12526
12532
  callHook(onAppearCancelled, [el]);
12527
12533
  },
12528
12534
  onLeaveCancelled(el) {
@@ -12735,10 +12741,11 @@ Component that was made reactive: `,
12735
12741
  }
12736
12742
  updateTeleports(vars);
12737
12743
  };
12738
- onBeforeMount(() => {
12739
- watchPostEffect(setVars);
12744
+ onBeforeUpdate(() => {
12745
+ queuePostFlushCb(setVars);
12740
12746
  });
12741
12747
  onMounted(() => {
12748
+ watch(setVars, NOOP, { flush: "post" });
12742
12749
  const ob = new MutationObserver(setVars);
12743
12750
  ob.observe(instance.subTree.el.parentNode, { childList: true });
12744
12751
  onUnmounted(() => ob.disconnect());
@@ -12930,7 +12937,7 @@ Component that was made reactive: `,
12930
12937
  return false;
12931
12938
  }
12932
12939
 
12933
- function patchDOMProp(el, key, value, parentComponent) {
12940
+ function patchDOMProp(el, key, value, parentComponent, attrName) {
12934
12941
  if (key === "innerHTML" || key === "textContent") {
12935
12942
  if (value != null) {
12936
12943
  el[key] = key === "innerHTML" ? unsafeToTrustedHTML(value) : value;
@@ -12994,7 +13001,7 @@ Component that was made reactive: `,
12994
13001
  );
12995
13002
  }
12996
13003
  }
12997
- needRemove && el.removeAttribute(key);
13004
+ needRemove && el.removeAttribute(attrName || key);
12998
13005
  }
12999
13006
 
13000
13007
  function addEventListener(el, event, handler, options) {
@@ -13104,7 +13111,7 @@ Expected function or array of functions, received type ${typeof value}.`
13104
13111
  // #11081 force set props for possible async custom element
13105
13112
  el._isVueCE && (/[A-Z]/.test(key) || !isString(nextValue))
13106
13113
  ) {
13107
- patchDOMProp(el, camelize(key), nextValue, parentComponent);
13114
+ patchDOMProp(el, camelize(key), nextValue, parentComponent, key);
13108
13115
  } else {
13109
13116
  if (key === "true-value") {
13110
13117
  el._trueValue = nextValue;
@@ -13389,6 +13396,8 @@ Expected function or array of functions, received type ${typeof value}.`
13389
13396
  this._update();
13390
13397
  }
13391
13398
  if (shouldReflect) {
13399
+ const ob = this._ob;
13400
+ ob && ob.disconnect();
13392
13401
  if (val === true) {
13393
13402
  this.setAttribute(hyphenate(key), "");
13394
13403
  } else if (typeof val === "string" || typeof val === "number") {
@@ -13396,6 +13405,7 @@ Expected function or array of functions, received type ${typeof value}.`
13396
13405
  } else if (!val) {
13397
13406
  this.removeAttribute(hyphenate(key));
13398
13407
  }
13408
+ ob && ob.observe(this, { attributes: true });
13399
13409
  }
13400
13410
  }
13401
13411
  }
@@ -13819,7 +13829,7 @@ Expected function or array of functions, received type ${typeof value}.`
13819
13829
  setChecked(el, binding, vnode);
13820
13830
  }
13821
13831
  };
13822
- function setChecked(el, { value }, vnode) {
13832
+ function setChecked(el, { value, oldValue }, vnode) {
13823
13833
  el._modelValue = value;
13824
13834
  let checked;
13825
13835
  if (isArray(value)) {
@@ -13827,6 +13837,7 @@ Expected function or array of functions, received type ${typeof value}.`
13827
13837
  } else if (isSet(value)) {
13828
13838
  checked = value.has(vnode.props.value);
13829
13839
  } else {
13840
+ if (value === oldValue) return;
13830
13841
  checked = looseEqual(value, getCheckboxValue(el, true));
13831
13842
  }
13832
13843
  if (el.checked !== checked) {
@@ -14617,12 +14628,13 @@ Make sure to use the production build (*.prod.js) when deploying for production.
14617
14628
  loc: locStub
14618
14629
  };
14619
14630
  }
14620
- function createCacheExpression(index, value, needPauseTracking = false) {
14631
+ function createCacheExpression(index, value, needPauseTracking = false, inVOnce = false) {
14621
14632
  return {
14622
14633
  type: 20,
14623
14634
  index,
14624
14635
  value,
14625
14636
  needPauseTracking,
14637
+ inVOnce,
14626
14638
  needArraySpread: false,
14627
14639
  loc: locStub
14628
14640
  };
@@ -16495,6 +16507,9 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
16495
16507
  source: end == null ? end : getSlice(start, end)
16496
16508
  };
16497
16509
  }
16510
+ function cloneLoc(loc) {
16511
+ return getLoc(loc.start.offset, loc.end.offset);
16512
+ }
16498
16513
  function setLocEnd(loc, end) {
16499
16514
  loc.end = tokenizer.getPos(end);
16500
16515
  loc.source = getSlice(loc.start.offset, end);
@@ -17003,11 +17018,12 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
17003
17018
  identifier.hoisted = exp;
17004
17019
  return identifier;
17005
17020
  },
17006
- cache(exp, isVNode = false) {
17021
+ cache(exp, isVNode = false, inVOnce = false) {
17007
17022
  const cacheExp = createCacheExpression(
17008
17023
  context.cached.length,
17009
17024
  exp,
17010
- isVNode
17025
+ isVNode,
17026
+ inVOnce
17011
17027
  );
17012
17028
  context.cached.push(cacheExp);
17013
17029
  return cacheExp;
@@ -17720,7 +17736,9 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
17720
17736
  push(`_cache[${node.index}] || (`);
17721
17737
  if (needPauseTracking) {
17722
17738
  indent();
17723
- push(`${helper(SET_BLOCK_TRACKING)}(-1),`);
17739
+ push(`${helper(SET_BLOCK_TRACKING)}(-1`);
17740
+ if (node.inVOnce) push(`, true`);
17741
+ push(`),`);
17724
17742
  newline();
17725
17743
  push(`(`);
17726
17744
  }
@@ -17777,12 +17795,14 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
17777
17795
  context
17778
17796
  );
17779
17797
  } else if (node.type === 1) {
17798
+ const memo = findDir(node, "memo");
17780
17799
  for (let i = 0; i < node.props.length; i++) {
17781
17800
  const dir = node.props[i];
17782
17801
  if (dir.type === 7 && dir.name !== "for") {
17783
17802
  const exp = dir.exp;
17784
17803
  const arg = dir.arg;
17785
- if (exp && exp.type === 4 && !(dir.name === "on" && arg)) {
17804
+ if (exp && exp.type === 4 && !(dir.name === "on" && arg) && // key has been processed in transformFor(vMemo + vFor)
17805
+ !(memo && arg && arg.type === 4 && arg.content === "key")) {
17786
17806
  dir.exp = processExpression(
17787
17807
  exp,
17788
17808
  context,
@@ -17853,7 +17873,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
17853
17873
  const branch = createIfBranch(node, dir);
17854
17874
  const ifNode = {
17855
17875
  type: 9,
17856
- loc: node.loc,
17876
+ loc: cloneLoc(node.loc),
17857
17877
  branches: [branch]
17858
17878
  };
17859
17879
  context.replaceNode(ifNode);
@@ -18110,10 +18130,11 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
18110
18130
  const isTemplate = isTemplateNode(node);
18111
18131
  const memo = findDir(node, "memo");
18112
18132
  const keyProp = findProp(node, `key`, false, true);
18113
- if (keyProp && keyProp.type === 7 && !keyProp.exp) {
18133
+ const isDirKey = keyProp && keyProp.type === 7;
18134
+ if (isDirKey && !keyProp.exp) {
18114
18135
  transformBindShorthand(keyProp);
18115
18136
  }
18116
- const keyExp = keyProp && (keyProp.type === 6 ? keyProp.value ? createSimpleExpression(keyProp.value.content, true) : void 0 : keyProp.exp);
18137
+ let keyExp = keyProp && (keyProp.type === 6 ? keyProp.value ? createSimpleExpression(keyProp.value.content, true) : void 0 : keyProp.exp);
18117
18138
  const keyProperty = keyProp && keyExp ? createObjectProperty(`key`, keyExp) : null;
18118
18139
  const isStableFragment = forNode.source.type === 4 && forNode.source.constType > 0;
18119
18140
  const fragmentFlag = isStableFragment ? 64 : keyProp ? 128 : 256;
@@ -19352,8 +19373,8 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
19352
19373
  if (cur.codegenNode) {
19353
19374
  cur.codegenNode = context.cache(
19354
19375
  cur.codegenNode,
19376
+ true,
19355
19377
  true
19356
- /* isVNode */
19357
19378
  );
19358
19379
  }
19359
19380
  };