@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
  **/
@@ -144,10 +144,9 @@ var Vue = (function () {
144
144
  return ret;
145
145
  }
146
146
  function stringifyStyle(styles) {
147
+ if (!styles) return "";
148
+ if (isString(styles)) return styles;
147
149
  let ret = "";
148
- if (!styles || isString(styles)) {
149
- return ret;
150
- }
151
150
  for (const key in styles) {
152
151
  const value = styles[key];
153
152
  if (isString(value) || typeof value === "number") {
@@ -408,17 +407,21 @@ var Vue = (function () {
408
407
  }
409
408
  stop(fromParent) {
410
409
  if (this._active) {
410
+ this._active = false;
411
411
  let i, l;
412
412
  for (i = 0, l = this.effects.length; i < l; i++) {
413
413
  this.effects[i].stop();
414
414
  }
415
+ this.effects.length = 0;
415
416
  for (i = 0, l = this.cleanups.length; i < l; i++) {
416
417
  this.cleanups[i]();
417
418
  }
419
+ this.cleanups.length = 0;
418
420
  if (this.scopes) {
419
421
  for (i = 0, l = this.scopes.length; i < l; i++) {
420
422
  this.scopes[i].stop(true);
421
423
  }
424
+ this.scopes.length = 0;
422
425
  }
423
426
  if (!this.detached && this.parent && !fromParent) {
424
427
  const last = this.parent.scopes.pop();
@@ -428,7 +431,6 @@ var Vue = (function () {
428
431
  }
429
432
  }
430
433
  this.parent = void 0;
431
- this._active = false;
432
434
  }
433
435
  }
434
436
  }
@@ -693,16 +695,16 @@ var Vue = (function () {
693
695
  nextSub.prevSub = prevSub;
694
696
  link.nextSub = void 0;
695
697
  }
696
- if (dep.subs === link) {
697
- dep.subs = prevSub;
698
- }
699
698
  if (dep.subsHead === link) {
700
699
  dep.subsHead = nextSub;
701
700
  }
702
- if (!dep.subs && dep.computed) {
703
- dep.computed.flags &= ~4;
704
- for (let l = dep.computed.deps; l; l = l.nextDep) {
705
- removeSub(l, true);
701
+ if (dep.subs === link) {
702
+ dep.subs = prevSub;
703
+ if (!prevSub && dep.computed) {
704
+ dep.computed.flags &= ~4;
705
+ for (let l = dep.computed.deps; l; l = l.nextDep) {
706
+ removeSub(l, true);
707
+ }
706
708
  }
707
709
  }
708
710
  if (!soft && !--dep.sc && dep.map) {
@@ -962,7 +964,7 @@ var Vue = (function () {
962
964
  }
963
965
  });
964
966
  } else {
965
- if (key !== void 0) {
967
+ if (key !== void 0 || depsMap.has(void 0)) {
966
968
  run(depsMap.get(key));
967
969
  }
968
970
  if (isArrayIndex) {
@@ -1194,6 +1196,7 @@ var Vue = (function () {
1194
1196
  this._isShallow = _isShallow;
1195
1197
  }
1196
1198
  get(target, key, receiver) {
1199
+ if (key === "__v_skip") return target["__v_skip"];
1197
1200
  const isReadonly2 = this._isReadonly, isShallow2 = this._isShallow;
1198
1201
  if (key === "__v_isReactive") {
1199
1202
  return !isReadonly2;
@@ -1337,117 +1340,6 @@ var Vue = (function () {
1337
1340
 
1338
1341
  const toShallow = (value) => value;
1339
1342
  const getProto = (v) => Reflect.getPrototypeOf(v);
1340
- function get(target, key, isReadonly2 = false, isShallow2 = false) {
1341
- target = target["__v_raw"];
1342
- const rawTarget = toRaw(target);
1343
- const rawKey = toRaw(key);
1344
- if (!isReadonly2) {
1345
- if (hasChanged(key, rawKey)) {
1346
- track(rawTarget, "get", key);
1347
- }
1348
- track(rawTarget, "get", rawKey);
1349
- }
1350
- const { has: has2 } = getProto(rawTarget);
1351
- const wrap = isShallow2 ? toShallow : isReadonly2 ? toReadonly : toReactive;
1352
- if (has2.call(rawTarget, key)) {
1353
- return wrap(target.get(key));
1354
- } else if (has2.call(rawTarget, rawKey)) {
1355
- return wrap(target.get(rawKey));
1356
- } else if (target !== rawTarget) {
1357
- target.get(key);
1358
- }
1359
- }
1360
- function has(key, isReadonly2 = false) {
1361
- const target = this["__v_raw"];
1362
- const rawTarget = toRaw(target);
1363
- const rawKey = toRaw(key);
1364
- if (!isReadonly2) {
1365
- if (hasChanged(key, rawKey)) {
1366
- track(rawTarget, "has", key);
1367
- }
1368
- track(rawTarget, "has", rawKey);
1369
- }
1370
- return key === rawKey ? target.has(key) : target.has(key) || target.has(rawKey);
1371
- }
1372
- function size(target, isReadonly2 = false) {
1373
- target = target["__v_raw"];
1374
- !isReadonly2 && track(toRaw(target), "iterate", ITERATE_KEY);
1375
- return Reflect.get(target, "size", target);
1376
- }
1377
- function add(value, _isShallow = false) {
1378
- if (!_isShallow && !isShallow(value) && !isReadonly(value)) {
1379
- value = toRaw(value);
1380
- }
1381
- const target = toRaw(this);
1382
- const proto = getProto(target);
1383
- const hadKey = proto.has.call(target, value);
1384
- if (!hadKey) {
1385
- target.add(value);
1386
- trigger(target, "add", value, value);
1387
- }
1388
- return this;
1389
- }
1390
- function set(key, value, _isShallow = false) {
1391
- if (!_isShallow && !isShallow(value) && !isReadonly(value)) {
1392
- value = toRaw(value);
1393
- }
1394
- const target = toRaw(this);
1395
- const { has: has2, get: get2 } = getProto(target);
1396
- let hadKey = has2.call(target, key);
1397
- if (!hadKey) {
1398
- key = toRaw(key);
1399
- hadKey = has2.call(target, key);
1400
- } else {
1401
- checkIdentityKeys(target, has2, key);
1402
- }
1403
- const oldValue = get2.call(target, key);
1404
- target.set(key, value);
1405
- if (!hadKey) {
1406
- trigger(target, "add", key, value);
1407
- } else if (hasChanged(value, oldValue)) {
1408
- trigger(target, "set", key, value, oldValue);
1409
- }
1410
- return this;
1411
- }
1412
- function deleteEntry(key) {
1413
- const target = toRaw(this);
1414
- const { has: has2, get: get2 } = getProto(target);
1415
- let hadKey = has2.call(target, key);
1416
- if (!hadKey) {
1417
- key = toRaw(key);
1418
- hadKey = has2.call(target, key);
1419
- } else {
1420
- checkIdentityKeys(target, has2, key);
1421
- }
1422
- const oldValue = get2 ? get2.call(target, key) : void 0;
1423
- const result = target.delete(key);
1424
- if (hadKey) {
1425
- trigger(target, "delete", key, void 0, oldValue);
1426
- }
1427
- return result;
1428
- }
1429
- function clear() {
1430
- const target = toRaw(this);
1431
- const hadItems = target.size !== 0;
1432
- const oldTarget = isMap(target) ? new Map(target) : new Set(target) ;
1433
- const result = target.clear();
1434
- if (hadItems) {
1435
- trigger(target, "clear", void 0, void 0, oldTarget);
1436
- }
1437
- return result;
1438
- }
1439
- function createForEach(isReadonly2, isShallow2) {
1440
- return function forEach(callback, thisArg) {
1441
- const observed = this;
1442
- const target = observed["__v_raw"];
1443
- const rawTarget = toRaw(target);
1444
- const wrap = isShallow2 ? toShallow : isReadonly2 ? toReadonly : toReactive;
1445
- !isReadonly2 && track(rawTarget, "iterate", ITERATE_KEY);
1446
- return target.forEach((value, key) => {
1447
- return callback.call(thisArg, wrap(value), wrap(key), observed);
1448
- });
1449
- };
1450
- }
1451
1343
  function createIterableMethod(method, isReadonly2, isShallow2) {
1452
1344
  return function(...args) {
1453
1345
  const target = this["__v_raw"];
@@ -1490,71 +1382,134 @@ var Vue = (function () {
1490
1382
  return type === "delete" ? false : type === "clear" ? void 0 : this;
1491
1383
  };
1492
1384
  }
1493
- function createInstrumentations() {
1494
- const mutableInstrumentations2 = {
1385
+ function createInstrumentations(readonly, shallow) {
1386
+ const instrumentations = {
1495
1387
  get(key) {
1496
- return get(this, key);
1497
- },
1498
- get size() {
1499
- return size(this);
1500
- },
1501
- has,
1502
- add,
1503
- set,
1504
- delete: deleteEntry,
1505
- clear,
1506
- forEach: createForEach(false, false)
1507
- };
1508
- const shallowInstrumentations2 = {
1509
- get(key) {
1510
- return get(this, key, false, true);
1511
- },
1512
- get size() {
1513
- return size(this);
1514
- },
1515
- has,
1516
- add(value) {
1517
- return add.call(this, value, true);
1518
- },
1519
- set(key, value) {
1520
- return set.call(this, key, value, true);
1521
- },
1522
- delete: deleteEntry,
1523
- clear,
1524
- forEach: createForEach(false, true)
1525
- };
1526
- const readonlyInstrumentations2 = {
1527
- get(key) {
1528
- return get(this, key, true);
1529
- },
1530
- get size() {
1531
- return size(this, true);
1532
- },
1533
- has(key) {
1534
- return has.call(this, key, true);
1535
- },
1536
- add: createReadonlyMethod("add"),
1537
- set: createReadonlyMethod("set"),
1538
- delete: createReadonlyMethod("delete"),
1539
- clear: createReadonlyMethod("clear"),
1540
- forEach: createForEach(true, false)
1541
- };
1542
- const shallowReadonlyInstrumentations2 = {
1543
- get(key) {
1544
- return get(this, key, true, true);
1388
+ const target = this["__v_raw"];
1389
+ const rawTarget = toRaw(target);
1390
+ const rawKey = toRaw(key);
1391
+ if (!readonly) {
1392
+ if (hasChanged(key, rawKey)) {
1393
+ track(rawTarget, "get", key);
1394
+ }
1395
+ track(rawTarget, "get", rawKey);
1396
+ }
1397
+ const { has } = getProto(rawTarget);
1398
+ const wrap = shallow ? toShallow : readonly ? toReadonly : toReactive;
1399
+ if (has.call(rawTarget, key)) {
1400
+ return wrap(target.get(key));
1401
+ } else if (has.call(rawTarget, rawKey)) {
1402
+ return wrap(target.get(rawKey));
1403
+ } else if (target !== rawTarget) {
1404
+ target.get(key);
1405
+ }
1545
1406
  },
1546
1407
  get size() {
1547
- return size(this, true);
1408
+ const target = this["__v_raw"];
1409
+ !readonly && track(toRaw(target), "iterate", ITERATE_KEY);
1410
+ return Reflect.get(target, "size", target);
1548
1411
  },
1549
1412
  has(key) {
1550
- return has.call(this, key, true);
1413
+ const target = this["__v_raw"];
1414
+ const rawTarget = toRaw(target);
1415
+ const rawKey = toRaw(key);
1416
+ if (!readonly) {
1417
+ if (hasChanged(key, rawKey)) {
1418
+ track(rawTarget, "has", key);
1419
+ }
1420
+ track(rawTarget, "has", rawKey);
1421
+ }
1422
+ return key === rawKey ? target.has(key) : target.has(key) || target.has(rawKey);
1551
1423
  },
1552
- add: createReadonlyMethod("add"),
1553
- set: createReadonlyMethod("set"),
1554
- delete: createReadonlyMethod("delete"),
1555
- clear: createReadonlyMethod("clear"),
1556
- forEach: createForEach(true, true)
1424
+ forEach(callback, thisArg) {
1425
+ const observed = this;
1426
+ const target = observed["__v_raw"];
1427
+ const rawTarget = toRaw(target);
1428
+ const wrap = shallow ? toShallow : readonly ? toReadonly : toReactive;
1429
+ !readonly && track(rawTarget, "iterate", ITERATE_KEY);
1430
+ return target.forEach((value, key) => {
1431
+ return callback.call(thisArg, wrap(value), wrap(key), observed);
1432
+ });
1433
+ }
1557
1434
  };
1435
+ extend(
1436
+ instrumentations,
1437
+ readonly ? {
1438
+ add: createReadonlyMethod("add"),
1439
+ set: createReadonlyMethod("set"),
1440
+ delete: createReadonlyMethod("delete"),
1441
+ clear: createReadonlyMethod("clear")
1442
+ } : {
1443
+ add(value) {
1444
+ if (!shallow && !isShallow(value) && !isReadonly(value)) {
1445
+ value = toRaw(value);
1446
+ }
1447
+ const target = toRaw(this);
1448
+ const proto = getProto(target);
1449
+ const hadKey = proto.has.call(target, value);
1450
+ if (!hadKey) {
1451
+ target.add(value);
1452
+ trigger(target, "add", value, value);
1453
+ }
1454
+ return this;
1455
+ },
1456
+ set(key, value) {
1457
+ if (!shallow && !isShallow(value) && !isReadonly(value)) {
1458
+ value = toRaw(value);
1459
+ }
1460
+ const target = toRaw(this);
1461
+ const { has, get } = getProto(target);
1462
+ let hadKey = has.call(target, key);
1463
+ if (!hadKey) {
1464
+ key = toRaw(key);
1465
+ hadKey = has.call(target, key);
1466
+ } else {
1467
+ checkIdentityKeys(target, has, key);
1468
+ }
1469
+ const oldValue = get.call(target, key);
1470
+ target.set(key, value);
1471
+ if (!hadKey) {
1472
+ trigger(target, "add", key, value);
1473
+ } else if (hasChanged(value, oldValue)) {
1474
+ trigger(target, "set", key, value, oldValue);
1475
+ }
1476
+ return this;
1477
+ },
1478
+ delete(key) {
1479
+ const target = toRaw(this);
1480
+ const { has, get } = getProto(target);
1481
+ let hadKey = has.call(target, key);
1482
+ if (!hadKey) {
1483
+ key = toRaw(key);
1484
+ hadKey = has.call(target, key);
1485
+ } else {
1486
+ checkIdentityKeys(target, has, key);
1487
+ }
1488
+ const oldValue = get ? get.call(target, key) : void 0;
1489
+ const result = target.delete(key);
1490
+ if (hadKey) {
1491
+ trigger(target, "delete", key, void 0, oldValue);
1492
+ }
1493
+ return result;
1494
+ },
1495
+ clear() {
1496
+ const target = toRaw(this);
1497
+ const hadItems = target.size !== 0;
1498
+ const oldTarget = isMap(target) ? new Map(target) : new Set(target) ;
1499
+ const result = target.clear();
1500
+ if (hadItems) {
1501
+ trigger(
1502
+ target,
1503
+ "clear",
1504
+ void 0,
1505
+ void 0,
1506
+ oldTarget
1507
+ );
1508
+ }
1509
+ return result;
1510
+ }
1511
+ }
1512
+ );
1558
1513
  const iteratorMethods = [
1559
1514
  "keys",
1560
1515
  "values",
@@ -1562,30 +1517,12 @@ var Vue = (function () {
1562
1517
  Symbol.iterator
1563
1518
  ];
1564
1519
  iteratorMethods.forEach((method) => {
1565
- mutableInstrumentations2[method] = createIterableMethod(method, false, false);
1566
- readonlyInstrumentations2[method] = createIterableMethod(method, true, false);
1567
- shallowInstrumentations2[method] = createIterableMethod(method, false, true);
1568
- shallowReadonlyInstrumentations2[method] = createIterableMethod(
1569
- method,
1570
- true,
1571
- true
1572
- );
1520
+ instrumentations[method] = createIterableMethod(method, readonly, shallow);
1573
1521
  });
1574
- return [
1575
- mutableInstrumentations2,
1576
- readonlyInstrumentations2,
1577
- shallowInstrumentations2,
1578
- shallowReadonlyInstrumentations2
1579
- ];
1522
+ return instrumentations;
1580
1523
  }
1581
- const [
1582
- mutableInstrumentations,
1583
- readonlyInstrumentations,
1584
- shallowInstrumentations,
1585
- shallowReadonlyInstrumentations
1586
- ] = /* @__PURE__ */ createInstrumentations();
1587
1524
  function createInstrumentationGetter(isReadonly2, shallow) {
1588
- const instrumentations = shallow ? isReadonly2 ? shallowReadonlyInstrumentations : shallowInstrumentations : isReadonly2 ? readonlyInstrumentations : mutableInstrumentations;
1525
+ const instrumentations = createInstrumentations(isReadonly2, shallow);
1589
1526
  return (target, key, receiver) => {
1590
1527
  if (key === "__v_isReactive") {
1591
1528
  return !isReadonly2;
@@ -1613,9 +1550,9 @@ var Vue = (function () {
1613
1550
  const shallowReadonlyCollectionHandlers = {
1614
1551
  get: /* @__PURE__ */ createInstrumentationGetter(true, true)
1615
1552
  };
1616
- function checkIdentityKeys(target, has2, key) {
1553
+ function checkIdentityKeys(target, has, key) {
1617
1554
  const rawKey = toRaw(key);
1618
- if (rawKey !== key && has2.call(target, rawKey)) {
1555
+ if (rawKey !== key && has.call(target, rawKey)) {
1619
1556
  const type = toRawType(target);
1620
1557
  warn$2(
1621
1558
  `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.`
@@ -2096,7 +2033,7 @@ var Vue = (function () {
2096
2033
  const scope = getCurrentScope();
2097
2034
  const watchHandle = () => {
2098
2035
  effect.stop();
2099
- if (scope) {
2036
+ if (scope && scope.active) {
2100
2037
  remove(scope.effects, effect);
2101
2038
  }
2102
2039
  };
@@ -3569,7 +3506,7 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
3569
3506
  }
3570
3507
  if (!disabled) {
3571
3508
  mount(target, targetAnchor);
3572
- updateCssVars(n2);
3509
+ updateCssVars(n2, false);
3573
3510
  }
3574
3511
  } else if (!disabled) {
3575
3512
  warn$1(
@@ -3581,14 +3518,35 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
3581
3518
  };
3582
3519
  if (disabled) {
3583
3520
  mount(container, mainAnchor);
3584
- updateCssVars(n2);
3521
+ updateCssVars(n2, true);
3585
3522
  }
3586
3523
  if (isTeleportDeferred(n2.props)) {
3587
- queuePostRenderEffect(mountToTarget, parentSuspense);
3524
+ queuePostRenderEffect(() => {
3525
+ mountToTarget();
3526
+ n2.el.__isMounted = true;
3527
+ }, parentSuspense);
3588
3528
  } else {
3589
3529
  mountToTarget();
3590
3530
  }
3591
3531
  } else {
3532
+ if (isTeleportDeferred(n2.props) && !n1.el.__isMounted) {
3533
+ queuePostRenderEffect(() => {
3534
+ TeleportImpl.process(
3535
+ n1,
3536
+ n2,
3537
+ container,
3538
+ anchor,
3539
+ parentComponent,
3540
+ parentSuspense,
3541
+ namespace,
3542
+ slotScopeIds,
3543
+ optimized,
3544
+ internals
3545
+ );
3546
+ delete n1.el.__isMounted;
3547
+ }, parentSuspense);
3548
+ return;
3549
+ }
3592
3550
  n2.el = n1.el;
3593
3551
  n2.targetStart = n1.targetStart;
3594
3552
  const mainAnchor = n2.anchor = n1.anchor;
@@ -3671,7 +3629,7 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
3671
3629
  );
3672
3630
  }
3673
3631
  }
3674
- updateCssVars(n2);
3632
+ updateCssVars(n2, disabled);
3675
3633
  }
3676
3634
  },
3677
3635
  remove(vnode, parentComponent, parentSuspense, { um: unmount, o: { remove: hostRemove } }, doRemove) {
@@ -3739,9 +3697,10 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
3739
3697
  querySelector
3740
3698
  );
3741
3699
  if (target) {
3700
+ const disabled = isTeleportDisabled(vnode.props);
3742
3701
  const targetNode = target._lpa || target.firstChild;
3743
3702
  if (vnode.shapeFlag & 16) {
3744
- if (isTeleportDisabled(vnode.props)) {
3703
+ if (disabled) {
3745
3704
  vnode.anchor = hydrateChildren(
3746
3705
  nextSibling(node),
3747
3706
  vnode,
@@ -3782,16 +3741,23 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
3782
3741
  );
3783
3742
  }
3784
3743
  }
3785
- updateCssVars(vnode);
3744
+ updateCssVars(vnode, disabled);
3786
3745
  }
3787
3746
  return vnode.anchor && nextSibling(vnode.anchor);
3788
3747
  }
3789
3748
  const Teleport = TeleportImpl;
3790
- function updateCssVars(vnode) {
3749
+ function updateCssVars(vnode, isDisabled) {
3791
3750
  const ctx = vnode.ctx;
3792
3751
  if (ctx && ctx.ut) {
3793
- let node = vnode.targetStart;
3794
- while (node && node !== vnode.targetAnchor) {
3752
+ let node, anchor;
3753
+ if (isDisabled) {
3754
+ node = vnode.el;
3755
+ anchor = vnode.anchor;
3756
+ } else {
3757
+ node = vnode.targetStart;
3758
+ anchor = vnode.targetAnchor;
3759
+ }
3760
+ while (node && node !== anchor) {
3795
3761
  if (node.nodeType === 1) node.setAttribute("data-v-owner", ctx.uid);
3796
3762
  node = node.nextSibling;
3797
3763
  }
@@ -3886,10 +3852,9 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
3886
3852
  if (innerChild.type !== Comment) {
3887
3853
  setTransitionHooks(innerChild, enterHooks);
3888
3854
  }
3889
- const oldChild = instance.subTree;
3890
- const oldInnerChild = oldChild && getInnerChild$1(oldChild);
3855
+ let oldInnerChild = instance.subTree && getInnerChild$1(instance.subTree);
3891
3856
  if (oldInnerChild && oldInnerChild.type !== Comment && !isSameVNodeType(innerChild, oldInnerChild) && recursiveGetSubtree(instance).type !== Comment) {
3892
- const leavingHooks = resolveTransitionHooks(
3857
+ let leavingHooks = resolveTransitionHooks(
3893
3858
  oldInnerChild,
3894
3859
  rawProps,
3895
3860
  state,
@@ -3904,6 +3869,7 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
3904
3869
  instance.update();
3905
3870
  }
3906
3871
  delete leavingHooks.afterLeave;
3872
+ oldInnerChild = void 0;
3907
3873
  };
3908
3874
  return emptyPlaceholder(child);
3909
3875
  } else if (mode === "in-out" && innerChild.type !== Comment) {
@@ -3917,10 +3883,19 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
3917
3883
  earlyRemove();
3918
3884
  el[leaveCbKey] = void 0;
3919
3885
  delete enterHooks.delayedLeave;
3886
+ oldInnerChild = void 0;
3887
+ };
3888
+ enterHooks.delayedLeave = () => {
3889
+ delayedLeave();
3890
+ delete enterHooks.delayedLeave;
3891
+ oldInnerChild = void 0;
3920
3892
  };
3921
- enterHooks.delayedLeave = delayedLeave;
3922
3893
  };
3894
+ } else {
3895
+ oldInnerChild = void 0;
3923
3896
  }
3897
+ } else if (oldInnerChild) {
3898
+ oldInnerChild = void 0;
3924
3899
  }
3925
3900
  return child;
3926
3901
  };
@@ -4228,6 +4203,9 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
4228
4203
  return;
4229
4204
  }
4230
4205
  if (isAsyncWrapper(vnode) && !isUnmount) {
4206
+ if (vnode.shapeFlag & 512 && vnode.type.__asyncResolved && vnode.component.subTree.component) {
4207
+ setRef(rawRef, oldRawRef, parentSuspense, vnode.component.subTree);
4208
+ }
4231
4209
  return;
4232
4210
  }
4233
4211
  const refValue = vnode.shapeFlag & 4 ? getComponentPublicInstance(vnode.component) : vnode.el;
@@ -4244,8 +4222,15 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
4244
4222
  const setupState = owner.setupState;
4245
4223
  const rawSetupState = toRaw(setupState);
4246
4224
  const canSetSetupRef = setupState === EMPTY_OBJ ? () => false : (key) => {
4247
- if (knownTemplateRefs.has(rawSetupState[key])) {
4248
- return false;
4225
+ {
4226
+ if (hasOwn(rawSetupState, key) && !isRef(rawSetupState[key])) {
4227
+ warn$1(
4228
+ `Template ref "${key}" used on a non-ref value. It will not work in the production build.`
4229
+ );
4230
+ }
4231
+ if (knownTemplateRefs.has(rawSetupState[key])) {
4232
+ return false;
4233
+ }
4249
4234
  }
4250
4235
  return hasOwn(rawSetupState, key);
4251
4236
  };
@@ -4485,7 +4470,7 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
4485
4470
  getContainerType(container),
4486
4471
  optimized
4487
4472
  );
4488
- if (isAsyncWrapper(vnode)) {
4473
+ if (isAsyncWrapper(vnode) && !vnode.type.__asyncResolved) {
4489
4474
  let subTree;
4490
4475
  if (isFragmentStart) {
4491
4476
  subTree = createVNode(Fragment);
@@ -4542,7 +4527,11 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
4542
4527
  }
4543
4528
  let needCallTransitionHooks = false;
4544
4529
  if (isTemplateNode(el)) {
4545
- needCallTransitionHooks = needTransition(parentSuspense, transition) && parentComponent && parentComponent.vnode.props && parentComponent.vnode.props.appear;
4530
+ needCallTransitionHooks = needTransition(
4531
+ null,
4532
+ // no need check parentSuspense in hydration
4533
+ transition
4534
+ ) && parentComponent && parentComponent.vnode.props && parentComponent.vnode.props.appear;
4546
4535
  const content = el.content.firstChild;
4547
4536
  if (needCallTransitionHooks) {
4548
4537
  transition.beforeEnter(content);
@@ -4750,6 +4739,10 @@ Server rendered element contains fewer child nodes than client vdom.`
4750
4739
  getContainerType(container),
4751
4740
  slotScopeIds
4752
4741
  );
4742
+ if (parentComponent) {
4743
+ parentComponent.vnode.el = vnode.el;
4744
+ updateHOCHostEl(parentComponent, vnode.el);
4745
+ }
4753
4746
  return next;
4754
4747
  };
4755
4748
  const locateClosingAnchor = (node, open = "[", close = "]") => {
@@ -4935,6 +4928,8 @@ Server rendered element contains fewer child nodes than client vdom.`
4935
4928
  }
4936
4929
  }
4937
4930
 
4931
+ const requestIdleCallback = getGlobalThis().requestIdleCallback || ((cb) => setTimeout(cb, 1));
4932
+ const cancelIdleCallback = getGlobalThis().cancelIdleCallback || ((id) => clearTimeout(id));
4938
4933
  const hydrateOnIdle = (timeout = 1e4) => (hydrate) => {
4939
4934
  const id = requestIdleCallback(hydrate, { timeout });
4940
4935
  return () => cancelIdleCallback(id);
@@ -5922,12 +5917,13 @@ If this is a native custom element, make sure to exclude it from component resol
5922
5917
  }
5923
5918
  openBlock();
5924
5919
  const validSlotContent = slot && ensureValidVNode(slot(props));
5920
+ const slotKey = props.key || // slot content array of a dynamic conditional slot may have a branch
5921
+ // key attached in the `createSlots` helper, respect that
5922
+ validSlotContent && validSlotContent.key;
5925
5923
  const rendered = createBlock(
5926
5924
  Fragment,
5927
5925
  {
5928
- key: (props.key || // slot content array of a dynamic conditional slot may have a branch
5929
- // key attached in the `createSlots` helper, respect that
5930
- validSlotContent && validSlotContent.key || `_${name}`) + // #7256 force differentiate fallback content from actual content
5926
+ key: (slotKey && !isSymbol(slotKey) ? slotKey : `_${name}`) + // #7256 force differentiate fallback content from actual content
5931
5927
  (!validSlotContent && fallback ? "_fb" : "")
5932
5928
  },
5933
5929
  validSlotContent || (fallback ? fallback() : []),
@@ -7093,7 +7089,7 @@ If this is a native custom element, make sure to exclude it from component resol
7093
7089
  return vm;
7094
7090
  }
7095
7091
  }
7096
- Vue.version = `2.6.14-compat:${"3.5.11"}`;
7092
+ Vue.version = `2.6.14-compat:${"3.5.13"}`;
7097
7093
  Vue.config = singletonApp.config;
7098
7094
  Vue.use = (plugin, ...options) => {
7099
7095
  if (plugin && isFunction(plugin.install)) {
@@ -8081,6 +8077,7 @@ If you want to remount the same app, move your app creation logic into a factory
8081
8077
  function validateProps(rawProps, props, instance) {
8082
8078
  const resolvedValues = toRaw(props);
8083
8079
  const options = instance.propsOptions[0];
8080
+ const camelizePropsKey = Object.keys(rawProps).map((key) => camelize(key));
8084
8081
  for (const key in options) {
8085
8082
  let opt = options[key];
8086
8083
  if (opt == null) continue;
@@ -8089,7 +8086,7 @@ If you want to remount the same app, move your app creation logic into a factory
8089
8086
  resolvedValues[key],
8090
8087
  opt,
8091
8088
  shallowReadonly(resolvedValues) ,
8092
- !hasOwn(rawProps, key) && !hasOwn(rawProps, hyphenate(key))
8089
+ !camelizePropsKey.includes(key)
8093
8090
  );
8094
8091
  }
8095
8092
  }
@@ -9961,19 +9958,19 @@ If you want to remount the same app, move your app creation logic into a factory
9961
9958
  warn$1(`useModel() called without active instance.`);
9962
9959
  return ref();
9963
9960
  }
9964
- if (!i.propsOptions[0][name]) {
9961
+ const camelizedName = camelize(name);
9962
+ if (!i.propsOptions[0][camelizedName]) {
9965
9963
  warn$1(`useModel() called with prop "${name}" which is not declared.`);
9966
9964
  return ref();
9967
9965
  }
9968
- const camelizedName = camelize(name);
9969
9966
  const hyphenatedName = hyphenate(name);
9970
- const modifiers = getModelModifiers(props, name);
9967
+ const modifiers = getModelModifiers(props, camelizedName);
9971
9968
  const res = customRef((track, trigger) => {
9972
9969
  let localValue;
9973
9970
  let prevSetValue = EMPTY_OBJ;
9974
9971
  let prevEmittedValue;
9975
9972
  watchSyncEffect(() => {
9976
- const propValue = props[name];
9973
+ const propValue = props[camelizedName];
9977
9974
  if (hasChanged(localValue, propValue)) {
9978
9975
  localValue = propValue;
9979
9976
  trigger();
@@ -10279,7 +10276,7 @@ If you want to remount the same app, move your app creation logic into a factory
10279
10276
  }
10280
10277
  if (extraAttrs.length) {
10281
10278
  warn$1(
10282
- `Extraneous non-props attributes (${extraAttrs.join(", ")}) were passed to component but could not be automatically inherited because component renders fragment or text root nodes.`
10279
+ `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.`
10283
10280
  );
10284
10281
  }
10285
10282
  if (eventAttrs.length) {
@@ -11140,9 +11137,9 @@ If you want to remount the same app, move your app creation logic into a factory
11140
11137
  currentBlock = blockStack[blockStack.length - 1] || null;
11141
11138
  }
11142
11139
  let isBlockTreeEnabled = 1;
11143
- function setBlockTracking(value) {
11140
+ function setBlockTracking(value, inVOnce = false) {
11144
11141
  isBlockTreeEnabled += value;
11145
- if (value < 0 && currentBlock) {
11142
+ if (value < 0 && currentBlock && inVOnce) {
11146
11143
  currentBlock.hasOnce = true;
11147
11144
  }
11148
11145
  }
@@ -11683,9 +11680,9 @@ Component that was made reactive: `,
11683
11680
  }
11684
11681
  const { setup } = Component;
11685
11682
  if (setup) {
11683
+ pauseTracking();
11686
11684
  const setupContext = instance.setupContext = setup.length > 1 ? createSetupContext(instance) : null;
11687
11685
  const reset = setCurrentInstance(instance);
11688
- pauseTracking();
11689
11686
  const setupResult = callWithErrorHandling(
11690
11687
  setup,
11691
11688
  instance,
@@ -11695,10 +11692,13 @@ Component that was made reactive: `,
11695
11692
  setupContext
11696
11693
  ]
11697
11694
  );
11695
+ const isAsyncSetup = isPromise(setupResult);
11698
11696
  resetTracking();
11699
11697
  reset();
11700
- if (isPromise(setupResult)) {
11701
- if (!isAsyncWrapper(instance)) markAsyncBoundary(instance);
11698
+ if ((isAsyncSetup || instance.sp) && !isAsyncWrapper(instance)) {
11699
+ markAsyncBoundary(instance);
11700
+ }
11701
+ if (isAsyncSetup) {
11702
11702
  setupResult.then(unsetCurrentInstance, unsetCurrentInstance);
11703
11703
  if (isSSR) {
11704
11704
  return setupResult.then((resolvedResult) => {
@@ -12171,7 +12171,7 @@ Component that was made reactive: `,
12171
12171
  return true;
12172
12172
  }
12173
12173
 
12174
- const version = "3.5.11";
12174
+ const version = "3.5.13";
12175
12175
  const warn = warn$1 ;
12176
12176
  const ErrorTypeStrings = ErrorTypeStrings$1 ;
12177
12177
  const devtools = devtools$1 ;
@@ -12369,7 +12369,8 @@ Component that was made reactive: `,
12369
12369
  onAppear = onEnter,
12370
12370
  onAppearCancelled = onEnterCancelled
12371
12371
  } = baseProps;
12372
- const finishEnter = (el, isAppear, done) => {
12372
+ const finishEnter = (el, isAppear, done, isCancelled) => {
12373
+ el._enterCancelled = isCancelled;
12373
12374
  removeTransitionClass(el, isAppear ? appearToClass : enterToClass);
12374
12375
  removeTransitionClass(el, isAppear ? appearActiveClass : enterActiveClass);
12375
12376
  done && done();
@@ -12427,8 +12428,13 @@ Component that was made reactive: `,
12427
12428
  if (legacyClassEnabled && legacyLeaveFromClass) {
12428
12429
  addTransitionClass(el, legacyLeaveFromClass);
12429
12430
  }
12430
- addTransitionClass(el, leaveActiveClass);
12431
- forceReflow();
12431
+ if (!el._enterCancelled) {
12432
+ forceReflow();
12433
+ addTransitionClass(el, leaveActiveClass);
12434
+ } else {
12435
+ addTransitionClass(el, leaveActiveClass);
12436
+ forceReflow();
12437
+ }
12432
12438
  nextFrame(() => {
12433
12439
  if (!el._isLeaving) {
12434
12440
  return;
@@ -12445,11 +12451,11 @@ Component that was made reactive: `,
12445
12451
  callHook(onLeave, [el, resolve]);
12446
12452
  },
12447
12453
  onEnterCancelled(el) {
12448
- finishEnter(el, false);
12454
+ finishEnter(el, false, void 0, true);
12449
12455
  callHook(onEnterCancelled, [el]);
12450
12456
  },
12451
12457
  onAppearCancelled(el) {
12452
- finishEnter(el, true);
12458
+ finishEnter(el, true, void 0, true);
12453
12459
  callHook(onAppearCancelled, [el]);
12454
12460
  },
12455
12461
  onLeaveCancelled(el) {
@@ -12662,10 +12668,11 @@ Component that was made reactive: `,
12662
12668
  }
12663
12669
  updateTeleports(vars);
12664
12670
  };
12665
- onBeforeMount(() => {
12666
- watchPostEffect(setVars);
12671
+ onBeforeUpdate(() => {
12672
+ queuePostFlushCb(setVars);
12667
12673
  });
12668
12674
  onMounted(() => {
12675
+ watch(setVars, NOOP, { flush: "post" });
12669
12676
  const ob = new MutationObserver(setVars);
12670
12677
  ob.observe(instance.subTree.el.parentNode, { childList: true });
12671
12678
  onUnmounted(() => ob.disconnect());
@@ -12857,7 +12864,7 @@ Component that was made reactive: `,
12857
12864
  return false;
12858
12865
  }
12859
12866
 
12860
- function patchDOMProp(el, key, value, parentComponent) {
12867
+ function patchDOMProp(el, key, value, parentComponent, attrName) {
12861
12868
  if (key === "innerHTML" || key === "textContent") {
12862
12869
  if (value != null) {
12863
12870
  el[key] = key === "innerHTML" ? unsafeToTrustedHTML(value) : value;
@@ -12921,7 +12928,7 @@ Component that was made reactive: `,
12921
12928
  );
12922
12929
  }
12923
12930
  }
12924
- needRemove && el.removeAttribute(key);
12931
+ needRemove && el.removeAttribute(attrName || key);
12925
12932
  }
12926
12933
 
12927
12934
  function addEventListener(el, event, handler, options) {
@@ -13031,7 +13038,7 @@ Expected function or array of functions, received type ${typeof value}.`
13031
13038
  // #11081 force set props for possible async custom element
13032
13039
  el._isVueCE && (/[A-Z]/.test(key) || !isString(nextValue))
13033
13040
  ) {
13034
- patchDOMProp(el, camelize(key), nextValue, parentComponent);
13041
+ patchDOMProp(el, camelize(key), nextValue, parentComponent, key);
13035
13042
  } else {
13036
13043
  if (key === "true-value") {
13037
13044
  el._trueValue = nextValue;
@@ -13316,6 +13323,8 @@ Expected function or array of functions, received type ${typeof value}.`
13316
13323
  this._update();
13317
13324
  }
13318
13325
  if (shouldReflect) {
13326
+ const ob = this._ob;
13327
+ ob && ob.disconnect();
13319
13328
  if (val === true) {
13320
13329
  this.setAttribute(hyphenate(key), "");
13321
13330
  } else if (typeof val === "string" || typeof val === "number") {
@@ -13323,6 +13332,7 @@ Expected function or array of functions, received type ${typeof value}.`
13323
13332
  } else if (!val) {
13324
13333
  this.removeAttribute(hyphenate(key));
13325
13334
  }
13335
+ ob && ob.observe(this, { attributes: true });
13326
13336
  }
13327
13337
  }
13328
13338
  }
@@ -13746,7 +13756,7 @@ Expected function or array of functions, received type ${typeof value}.`
13746
13756
  setChecked(el, binding, vnode);
13747
13757
  }
13748
13758
  };
13749
- function setChecked(el, { value }, vnode) {
13759
+ function setChecked(el, { value, oldValue }, vnode) {
13750
13760
  el._modelValue = value;
13751
13761
  let checked;
13752
13762
  if (isArray(value)) {
@@ -13754,6 +13764,7 @@ Expected function or array of functions, received type ${typeof value}.`
13754
13764
  } else if (isSet(value)) {
13755
13765
  checked = value.has(vnode.props.value);
13756
13766
  } else {
13767
+ if (value === oldValue) return;
13757
13768
  checked = looseEqual(value, getCheckboxValue(el, true));
13758
13769
  }
13759
13770
  if (el.checked !== checked) {