@vue/compat 3.5.10 → 3.5.12
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.
- package/dist/vue.cjs.js +228 -259
- package/dist/vue.cjs.prod.js +204 -245
- package/dist/vue.esm-browser.js +227 -258
- package/dist/vue.esm-browser.prod.js +6 -6
- package/dist/vue.esm-bundler.js +227 -258
- package/dist/vue.global.js +218 -254
- package/dist/vue.global.prod.js +6 -6
- package/dist/vue.runtime.esm-browser.js +223 -257
- package/dist/vue.runtime.esm-browser.prod.js +2 -2
- package/dist/vue.runtime.esm-bundler.js +223 -257
- package/dist/vue.runtime.global.js +214 -253
- package/dist/vue.runtime.global.prod.js +2 -2
- package/package.json +2 -2
package/dist/vue.esm-browser.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/compat v3.5.
|
|
2
|
+
* @vue/compat v3.5.12
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -630,8 +630,14 @@ class ReactiveEffect {
|
|
|
630
630
|
}
|
|
631
631
|
let batchDepth = 0;
|
|
632
632
|
let batchedSub;
|
|
633
|
-
|
|
633
|
+
let batchedComputed;
|
|
634
|
+
function batch(sub, isComputed = false) {
|
|
634
635
|
sub.flags |= 8;
|
|
636
|
+
if (isComputed) {
|
|
637
|
+
sub.next = batchedComputed;
|
|
638
|
+
batchedComputed = sub;
|
|
639
|
+
return;
|
|
640
|
+
}
|
|
635
641
|
sub.next = batchedSub;
|
|
636
642
|
batchedSub = sub;
|
|
637
643
|
}
|
|
@@ -642,20 +648,22 @@ function endBatch() {
|
|
|
642
648
|
if (--batchDepth > 0) {
|
|
643
649
|
return;
|
|
644
650
|
}
|
|
651
|
+
if (batchedComputed) {
|
|
652
|
+
let e = batchedComputed;
|
|
653
|
+
batchedComputed = void 0;
|
|
654
|
+
while (e) {
|
|
655
|
+
const next = e.next;
|
|
656
|
+
e.next = void 0;
|
|
657
|
+
e.flags &= ~8;
|
|
658
|
+
e = next;
|
|
659
|
+
}
|
|
660
|
+
}
|
|
645
661
|
let error;
|
|
646
662
|
while (batchedSub) {
|
|
647
663
|
let e = batchedSub;
|
|
648
|
-
let next;
|
|
649
|
-
while (e) {
|
|
650
|
-
if (!(e.flags & 1)) {
|
|
651
|
-
e.flags &= ~8;
|
|
652
|
-
}
|
|
653
|
-
e = e.next;
|
|
654
|
-
}
|
|
655
|
-
e = batchedSub;
|
|
656
664
|
batchedSub = void 0;
|
|
657
665
|
while (e) {
|
|
658
|
-
next = e.next;
|
|
666
|
+
const next = e.next;
|
|
659
667
|
e.next = void 0;
|
|
660
668
|
e.flags &= ~8;
|
|
661
669
|
if (e.flags & 1) {
|
|
@@ -755,16 +763,16 @@ function removeSub(link, soft = false) {
|
|
|
755
763
|
nextSub.prevSub = prevSub;
|
|
756
764
|
link.nextSub = void 0;
|
|
757
765
|
}
|
|
758
|
-
if (dep.subs === link) {
|
|
759
|
-
dep.subs = prevSub;
|
|
760
|
-
}
|
|
761
766
|
if (dep.subsHead === link) {
|
|
762
767
|
dep.subsHead = nextSub;
|
|
763
768
|
}
|
|
764
|
-
if (
|
|
765
|
-
dep.
|
|
766
|
-
|
|
767
|
-
|
|
769
|
+
if (dep.subs === link) {
|
|
770
|
+
dep.subs = prevSub;
|
|
771
|
+
if (!prevSub && dep.computed) {
|
|
772
|
+
dep.computed.flags &= ~4;
|
|
773
|
+
for (let l = dep.computed.deps; l; l = l.nextDep) {
|
|
774
|
+
removeSub(l, true);
|
|
775
|
+
}
|
|
768
776
|
}
|
|
769
777
|
}
|
|
770
778
|
if (!soft && !--dep.sc && dep.map) {
|
|
@@ -851,7 +859,6 @@ class Dep {
|
|
|
851
859
|
/**
|
|
852
860
|
* For object property deps cleanup
|
|
853
861
|
*/
|
|
854
|
-
this.target = void 0;
|
|
855
862
|
this.map = void 0;
|
|
856
863
|
this.key = void 0;
|
|
857
864
|
/**
|
|
@@ -979,7 +986,6 @@ function track(target, type, key) {
|
|
|
979
986
|
let dep = depsMap.get(key);
|
|
980
987
|
if (!dep) {
|
|
981
988
|
depsMap.set(key, dep = new Dep());
|
|
982
|
-
dep.target = target;
|
|
983
989
|
dep.map = depsMap;
|
|
984
990
|
dep.key = key;
|
|
985
991
|
}
|
|
@@ -1026,7 +1032,7 @@ function trigger(target, type, key, newValue, oldValue, oldTarget) {
|
|
|
1026
1032
|
}
|
|
1027
1033
|
});
|
|
1028
1034
|
} else {
|
|
1029
|
-
if (key !== void 0) {
|
|
1035
|
+
if (key !== void 0 || depsMap.has(void 0)) {
|
|
1030
1036
|
run(depsMap.get(key));
|
|
1031
1037
|
}
|
|
1032
1038
|
if (isArrayIndex) {
|
|
@@ -1401,117 +1407,6 @@ const shallowReadonlyHandlers = /* @__PURE__ */ new ReadonlyReactiveHandler(true
|
|
|
1401
1407
|
|
|
1402
1408
|
const toShallow = (value) => value;
|
|
1403
1409
|
const getProto = (v) => Reflect.getPrototypeOf(v);
|
|
1404
|
-
function get(target, key, isReadonly2 = false, isShallow2 = false) {
|
|
1405
|
-
target = target["__v_raw"];
|
|
1406
|
-
const rawTarget = toRaw(target);
|
|
1407
|
-
const rawKey = toRaw(key);
|
|
1408
|
-
if (!isReadonly2) {
|
|
1409
|
-
if (hasChanged(key, rawKey)) {
|
|
1410
|
-
track(rawTarget, "get", key);
|
|
1411
|
-
}
|
|
1412
|
-
track(rawTarget, "get", rawKey);
|
|
1413
|
-
}
|
|
1414
|
-
const { has: has2 } = getProto(rawTarget);
|
|
1415
|
-
const wrap = isShallow2 ? toShallow : isReadonly2 ? toReadonly : toReactive;
|
|
1416
|
-
if (has2.call(rawTarget, key)) {
|
|
1417
|
-
return wrap(target.get(key));
|
|
1418
|
-
} else if (has2.call(rawTarget, rawKey)) {
|
|
1419
|
-
return wrap(target.get(rawKey));
|
|
1420
|
-
} else if (target !== rawTarget) {
|
|
1421
|
-
target.get(key);
|
|
1422
|
-
}
|
|
1423
|
-
}
|
|
1424
|
-
function has(key, isReadonly2 = false) {
|
|
1425
|
-
const target = this["__v_raw"];
|
|
1426
|
-
const rawTarget = toRaw(target);
|
|
1427
|
-
const rawKey = toRaw(key);
|
|
1428
|
-
if (!isReadonly2) {
|
|
1429
|
-
if (hasChanged(key, rawKey)) {
|
|
1430
|
-
track(rawTarget, "has", key);
|
|
1431
|
-
}
|
|
1432
|
-
track(rawTarget, "has", rawKey);
|
|
1433
|
-
}
|
|
1434
|
-
return key === rawKey ? target.has(key) : target.has(key) || target.has(rawKey);
|
|
1435
|
-
}
|
|
1436
|
-
function size(target, isReadonly2 = false) {
|
|
1437
|
-
target = target["__v_raw"];
|
|
1438
|
-
!isReadonly2 && track(toRaw(target), "iterate", ITERATE_KEY);
|
|
1439
|
-
return Reflect.get(target, "size", target);
|
|
1440
|
-
}
|
|
1441
|
-
function add(value, _isShallow = false) {
|
|
1442
|
-
if (!_isShallow && !isShallow(value) && !isReadonly(value)) {
|
|
1443
|
-
value = toRaw(value);
|
|
1444
|
-
}
|
|
1445
|
-
const target = toRaw(this);
|
|
1446
|
-
const proto = getProto(target);
|
|
1447
|
-
const hadKey = proto.has.call(target, value);
|
|
1448
|
-
if (!hadKey) {
|
|
1449
|
-
target.add(value);
|
|
1450
|
-
trigger(target, "add", value, value);
|
|
1451
|
-
}
|
|
1452
|
-
return this;
|
|
1453
|
-
}
|
|
1454
|
-
function set(key, value, _isShallow = false) {
|
|
1455
|
-
if (!_isShallow && !isShallow(value) && !isReadonly(value)) {
|
|
1456
|
-
value = toRaw(value);
|
|
1457
|
-
}
|
|
1458
|
-
const target = toRaw(this);
|
|
1459
|
-
const { has: has2, get: get2 } = getProto(target);
|
|
1460
|
-
let hadKey = has2.call(target, key);
|
|
1461
|
-
if (!hadKey) {
|
|
1462
|
-
key = toRaw(key);
|
|
1463
|
-
hadKey = has2.call(target, key);
|
|
1464
|
-
} else {
|
|
1465
|
-
checkIdentityKeys(target, has2, key);
|
|
1466
|
-
}
|
|
1467
|
-
const oldValue = get2.call(target, key);
|
|
1468
|
-
target.set(key, value);
|
|
1469
|
-
if (!hadKey) {
|
|
1470
|
-
trigger(target, "add", key, value);
|
|
1471
|
-
} else if (hasChanged(value, oldValue)) {
|
|
1472
|
-
trigger(target, "set", key, value, oldValue);
|
|
1473
|
-
}
|
|
1474
|
-
return this;
|
|
1475
|
-
}
|
|
1476
|
-
function deleteEntry(key) {
|
|
1477
|
-
const target = toRaw(this);
|
|
1478
|
-
const { has: has2, get: get2 } = getProto(target);
|
|
1479
|
-
let hadKey = has2.call(target, key);
|
|
1480
|
-
if (!hadKey) {
|
|
1481
|
-
key = toRaw(key);
|
|
1482
|
-
hadKey = has2.call(target, key);
|
|
1483
|
-
} else {
|
|
1484
|
-
checkIdentityKeys(target, has2, key);
|
|
1485
|
-
}
|
|
1486
|
-
const oldValue = get2 ? get2.call(target, key) : void 0;
|
|
1487
|
-
const result = target.delete(key);
|
|
1488
|
-
if (hadKey) {
|
|
1489
|
-
trigger(target, "delete", key, void 0, oldValue);
|
|
1490
|
-
}
|
|
1491
|
-
return result;
|
|
1492
|
-
}
|
|
1493
|
-
function clear() {
|
|
1494
|
-
const target = toRaw(this);
|
|
1495
|
-
const hadItems = target.size !== 0;
|
|
1496
|
-
const oldTarget = isMap(target) ? new Map(target) : new Set(target) ;
|
|
1497
|
-
const result = target.clear();
|
|
1498
|
-
if (hadItems) {
|
|
1499
|
-
trigger(target, "clear", void 0, void 0, oldTarget);
|
|
1500
|
-
}
|
|
1501
|
-
return result;
|
|
1502
|
-
}
|
|
1503
|
-
function createForEach(isReadonly2, isShallow2) {
|
|
1504
|
-
return function forEach(callback, thisArg) {
|
|
1505
|
-
const observed = this;
|
|
1506
|
-
const target = observed["__v_raw"];
|
|
1507
|
-
const rawTarget = toRaw(target);
|
|
1508
|
-
const wrap = isShallow2 ? toShallow : isReadonly2 ? toReadonly : toReactive;
|
|
1509
|
-
!isReadonly2 && track(rawTarget, "iterate", ITERATE_KEY);
|
|
1510
|
-
return target.forEach((value, key) => {
|
|
1511
|
-
return callback.call(thisArg, wrap(value), wrap(key), observed);
|
|
1512
|
-
});
|
|
1513
|
-
};
|
|
1514
|
-
}
|
|
1515
1410
|
function createIterableMethod(method, isReadonly2, isShallow2) {
|
|
1516
1411
|
return function(...args) {
|
|
1517
1412
|
const target = this["__v_raw"];
|
|
@@ -1554,71 +1449,134 @@ function createReadonlyMethod(type) {
|
|
|
1554
1449
|
return type === "delete" ? false : type === "clear" ? void 0 : this;
|
|
1555
1450
|
};
|
|
1556
1451
|
}
|
|
1557
|
-
function createInstrumentations() {
|
|
1558
|
-
const
|
|
1559
|
-
get(key) {
|
|
1560
|
-
return get(this, key);
|
|
1561
|
-
},
|
|
1562
|
-
get size() {
|
|
1563
|
-
return size(this);
|
|
1564
|
-
},
|
|
1565
|
-
has,
|
|
1566
|
-
add,
|
|
1567
|
-
set,
|
|
1568
|
-
delete: deleteEntry,
|
|
1569
|
-
clear,
|
|
1570
|
-
forEach: createForEach(false, false)
|
|
1571
|
-
};
|
|
1572
|
-
const shallowInstrumentations2 = {
|
|
1452
|
+
function createInstrumentations(readonly, shallow) {
|
|
1453
|
+
const instrumentations = {
|
|
1573
1454
|
get(key) {
|
|
1574
|
-
|
|
1575
|
-
|
|
1576
|
-
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
return get(this, key, true);
|
|
1593
|
-
},
|
|
1594
|
-
get size() {
|
|
1595
|
-
return size(this, true);
|
|
1596
|
-
},
|
|
1597
|
-
has(key) {
|
|
1598
|
-
return has.call(this, key, true);
|
|
1599
|
-
},
|
|
1600
|
-
add: createReadonlyMethod("add"),
|
|
1601
|
-
set: createReadonlyMethod("set"),
|
|
1602
|
-
delete: createReadonlyMethod("delete"),
|
|
1603
|
-
clear: createReadonlyMethod("clear"),
|
|
1604
|
-
forEach: createForEach(true, false)
|
|
1605
|
-
};
|
|
1606
|
-
const shallowReadonlyInstrumentations2 = {
|
|
1607
|
-
get(key) {
|
|
1608
|
-
return get(this, key, true, true);
|
|
1455
|
+
const target = this["__v_raw"];
|
|
1456
|
+
const rawTarget = toRaw(target);
|
|
1457
|
+
const rawKey = toRaw(key);
|
|
1458
|
+
if (!readonly) {
|
|
1459
|
+
if (hasChanged(key, rawKey)) {
|
|
1460
|
+
track(rawTarget, "get", key);
|
|
1461
|
+
}
|
|
1462
|
+
track(rawTarget, "get", rawKey);
|
|
1463
|
+
}
|
|
1464
|
+
const { has } = getProto(rawTarget);
|
|
1465
|
+
const wrap = shallow ? toShallow : readonly ? toReadonly : toReactive;
|
|
1466
|
+
if (has.call(rawTarget, key)) {
|
|
1467
|
+
return wrap(target.get(key));
|
|
1468
|
+
} else if (has.call(rawTarget, rawKey)) {
|
|
1469
|
+
return wrap(target.get(rawKey));
|
|
1470
|
+
} else if (target !== rawTarget) {
|
|
1471
|
+
target.get(key);
|
|
1472
|
+
}
|
|
1609
1473
|
},
|
|
1610
1474
|
get size() {
|
|
1611
|
-
|
|
1475
|
+
const target = this["__v_raw"];
|
|
1476
|
+
!readonly && track(toRaw(target), "iterate", ITERATE_KEY);
|
|
1477
|
+
return Reflect.get(target, "size", target);
|
|
1612
1478
|
},
|
|
1613
1479
|
has(key) {
|
|
1614
|
-
|
|
1480
|
+
const target = this["__v_raw"];
|
|
1481
|
+
const rawTarget = toRaw(target);
|
|
1482
|
+
const rawKey = toRaw(key);
|
|
1483
|
+
if (!readonly) {
|
|
1484
|
+
if (hasChanged(key, rawKey)) {
|
|
1485
|
+
track(rawTarget, "has", key);
|
|
1486
|
+
}
|
|
1487
|
+
track(rawTarget, "has", rawKey);
|
|
1488
|
+
}
|
|
1489
|
+
return key === rawKey ? target.has(key) : target.has(key) || target.has(rawKey);
|
|
1615
1490
|
},
|
|
1616
|
-
|
|
1617
|
-
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
|
|
1491
|
+
forEach(callback, thisArg) {
|
|
1492
|
+
const observed = this;
|
|
1493
|
+
const target = observed["__v_raw"];
|
|
1494
|
+
const rawTarget = toRaw(target);
|
|
1495
|
+
const wrap = shallow ? toShallow : readonly ? toReadonly : toReactive;
|
|
1496
|
+
!readonly && track(rawTarget, "iterate", ITERATE_KEY);
|
|
1497
|
+
return target.forEach((value, key) => {
|
|
1498
|
+
return callback.call(thisArg, wrap(value), wrap(key), observed);
|
|
1499
|
+
});
|
|
1500
|
+
}
|
|
1621
1501
|
};
|
|
1502
|
+
extend(
|
|
1503
|
+
instrumentations,
|
|
1504
|
+
readonly ? {
|
|
1505
|
+
add: createReadonlyMethod("add"),
|
|
1506
|
+
set: createReadonlyMethod("set"),
|
|
1507
|
+
delete: createReadonlyMethod("delete"),
|
|
1508
|
+
clear: createReadonlyMethod("clear")
|
|
1509
|
+
} : {
|
|
1510
|
+
add(value) {
|
|
1511
|
+
if (!shallow && !isShallow(value) && !isReadonly(value)) {
|
|
1512
|
+
value = toRaw(value);
|
|
1513
|
+
}
|
|
1514
|
+
const target = toRaw(this);
|
|
1515
|
+
const proto = getProto(target);
|
|
1516
|
+
const hadKey = proto.has.call(target, value);
|
|
1517
|
+
if (!hadKey) {
|
|
1518
|
+
target.add(value);
|
|
1519
|
+
trigger(target, "add", value, value);
|
|
1520
|
+
}
|
|
1521
|
+
return this;
|
|
1522
|
+
},
|
|
1523
|
+
set(key, value) {
|
|
1524
|
+
if (!shallow && !isShallow(value) && !isReadonly(value)) {
|
|
1525
|
+
value = toRaw(value);
|
|
1526
|
+
}
|
|
1527
|
+
const target = toRaw(this);
|
|
1528
|
+
const { has, get } = getProto(target);
|
|
1529
|
+
let hadKey = has.call(target, key);
|
|
1530
|
+
if (!hadKey) {
|
|
1531
|
+
key = toRaw(key);
|
|
1532
|
+
hadKey = has.call(target, key);
|
|
1533
|
+
} else {
|
|
1534
|
+
checkIdentityKeys(target, has, key);
|
|
1535
|
+
}
|
|
1536
|
+
const oldValue = get.call(target, key);
|
|
1537
|
+
target.set(key, value);
|
|
1538
|
+
if (!hadKey) {
|
|
1539
|
+
trigger(target, "add", key, value);
|
|
1540
|
+
} else if (hasChanged(value, oldValue)) {
|
|
1541
|
+
trigger(target, "set", key, value, oldValue);
|
|
1542
|
+
}
|
|
1543
|
+
return this;
|
|
1544
|
+
},
|
|
1545
|
+
delete(key) {
|
|
1546
|
+
const target = toRaw(this);
|
|
1547
|
+
const { has, get } = getProto(target);
|
|
1548
|
+
let hadKey = has.call(target, key);
|
|
1549
|
+
if (!hadKey) {
|
|
1550
|
+
key = toRaw(key);
|
|
1551
|
+
hadKey = has.call(target, key);
|
|
1552
|
+
} else {
|
|
1553
|
+
checkIdentityKeys(target, has, key);
|
|
1554
|
+
}
|
|
1555
|
+
const oldValue = get ? get.call(target, key) : void 0;
|
|
1556
|
+
const result = target.delete(key);
|
|
1557
|
+
if (hadKey) {
|
|
1558
|
+
trigger(target, "delete", key, void 0, oldValue);
|
|
1559
|
+
}
|
|
1560
|
+
return result;
|
|
1561
|
+
},
|
|
1562
|
+
clear() {
|
|
1563
|
+
const target = toRaw(this);
|
|
1564
|
+
const hadItems = target.size !== 0;
|
|
1565
|
+
const oldTarget = isMap(target) ? new Map(target) : new Set(target) ;
|
|
1566
|
+
const result = target.clear();
|
|
1567
|
+
if (hadItems) {
|
|
1568
|
+
trigger(
|
|
1569
|
+
target,
|
|
1570
|
+
"clear",
|
|
1571
|
+
void 0,
|
|
1572
|
+
void 0,
|
|
1573
|
+
oldTarget
|
|
1574
|
+
);
|
|
1575
|
+
}
|
|
1576
|
+
return result;
|
|
1577
|
+
}
|
|
1578
|
+
}
|
|
1579
|
+
);
|
|
1622
1580
|
const iteratorMethods = [
|
|
1623
1581
|
"keys",
|
|
1624
1582
|
"values",
|
|
@@ -1626,30 +1584,12 @@ function createInstrumentations() {
|
|
|
1626
1584
|
Symbol.iterator
|
|
1627
1585
|
];
|
|
1628
1586
|
iteratorMethods.forEach((method) => {
|
|
1629
|
-
|
|
1630
|
-
readonlyInstrumentations2[method] = createIterableMethod(method, true, false);
|
|
1631
|
-
shallowInstrumentations2[method] = createIterableMethod(method, false, true);
|
|
1632
|
-
shallowReadonlyInstrumentations2[method] = createIterableMethod(
|
|
1633
|
-
method,
|
|
1634
|
-
true,
|
|
1635
|
-
true
|
|
1636
|
-
);
|
|
1587
|
+
instrumentations[method] = createIterableMethod(method, readonly, shallow);
|
|
1637
1588
|
});
|
|
1638
|
-
return
|
|
1639
|
-
mutableInstrumentations2,
|
|
1640
|
-
readonlyInstrumentations2,
|
|
1641
|
-
shallowInstrumentations2,
|
|
1642
|
-
shallowReadonlyInstrumentations2
|
|
1643
|
-
];
|
|
1589
|
+
return instrumentations;
|
|
1644
1590
|
}
|
|
1645
|
-
const [
|
|
1646
|
-
mutableInstrumentations,
|
|
1647
|
-
readonlyInstrumentations,
|
|
1648
|
-
shallowInstrumentations,
|
|
1649
|
-
shallowReadonlyInstrumentations
|
|
1650
|
-
] = /* @__PURE__ */ createInstrumentations();
|
|
1651
1591
|
function createInstrumentationGetter(isReadonly2, shallow) {
|
|
1652
|
-
const instrumentations =
|
|
1592
|
+
const instrumentations = createInstrumentations(isReadonly2, shallow);
|
|
1653
1593
|
return (target, key, receiver) => {
|
|
1654
1594
|
if (key === "__v_isReactive") {
|
|
1655
1595
|
return !isReadonly2;
|
|
@@ -1677,9 +1617,9 @@ const readonlyCollectionHandlers = {
|
|
|
1677
1617
|
const shallowReadonlyCollectionHandlers = {
|
|
1678
1618
|
get: /* @__PURE__ */ createInstrumentationGetter(true, true)
|
|
1679
1619
|
};
|
|
1680
|
-
function checkIdentityKeys(target,
|
|
1620
|
+
function checkIdentityKeys(target, has, key) {
|
|
1681
1621
|
const rawKey = toRaw(key);
|
|
1682
|
-
if (rawKey !== key &&
|
|
1622
|
+
if (rawKey !== key && has.call(target, rawKey)) {
|
|
1683
1623
|
const type = toRawType(target);
|
|
1684
1624
|
warn$2(
|
|
1685
1625
|
`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.`
|
|
@@ -2015,7 +1955,7 @@ class ComputedRefImpl {
|
|
|
2015
1955
|
this.flags |= 16;
|
|
2016
1956
|
if (!(this.flags & 8) && // avoid infinite self recursion
|
|
2017
1957
|
activeSub !== this) {
|
|
2018
|
-
batch(this);
|
|
1958
|
+
batch(this, true);
|
|
2019
1959
|
return true;
|
|
2020
1960
|
}
|
|
2021
1961
|
}
|
|
@@ -2537,10 +2477,8 @@ function logError(err, type, contextVNode, throwInDev = true, throwInProd = fals
|
|
|
2537
2477
|
}
|
|
2538
2478
|
}
|
|
2539
2479
|
|
|
2540
|
-
let isFlushing = false;
|
|
2541
|
-
let isFlushPending = false;
|
|
2542
2480
|
const queue = [];
|
|
2543
|
-
let flushIndex =
|
|
2481
|
+
let flushIndex = -1;
|
|
2544
2482
|
const pendingPostFlushCbs = [];
|
|
2545
2483
|
let activePostFlushCbs = null;
|
|
2546
2484
|
let postFlushIndex = 0;
|
|
@@ -2552,7 +2490,7 @@ function nextTick(fn) {
|
|
|
2552
2490
|
return fn ? p.then(this ? fn.bind(this) : fn) : p;
|
|
2553
2491
|
}
|
|
2554
2492
|
function findInsertionIndex(id) {
|
|
2555
|
-
let start =
|
|
2493
|
+
let start = flushIndex + 1;
|
|
2556
2494
|
let end = queue.length;
|
|
2557
2495
|
while (start < end) {
|
|
2558
2496
|
const middle = start + end >>> 1;
|
|
@@ -2581,8 +2519,7 @@ function queueJob(job) {
|
|
|
2581
2519
|
}
|
|
2582
2520
|
}
|
|
2583
2521
|
function queueFlush() {
|
|
2584
|
-
if (!
|
|
2585
|
-
isFlushPending = true;
|
|
2522
|
+
if (!currentFlushPromise) {
|
|
2586
2523
|
currentFlushPromise = resolvedPromise.then(flushJobs);
|
|
2587
2524
|
}
|
|
2588
2525
|
}
|
|
@@ -2599,7 +2536,7 @@ function queuePostFlushCb(cb) {
|
|
|
2599
2536
|
}
|
|
2600
2537
|
queueFlush();
|
|
2601
2538
|
}
|
|
2602
|
-
function flushPreFlushCbs(instance, seen, i =
|
|
2539
|
+
function flushPreFlushCbs(instance, seen, i = flushIndex + 1) {
|
|
2603
2540
|
{
|
|
2604
2541
|
seen = seen || /* @__PURE__ */ new Map();
|
|
2605
2542
|
}
|
|
@@ -2655,8 +2592,6 @@ function flushPostFlushCbs(seen) {
|
|
|
2655
2592
|
}
|
|
2656
2593
|
const getId = (job) => job.id == null ? job.flags & 2 ? -1 : Infinity : job.id;
|
|
2657
2594
|
function flushJobs(seen) {
|
|
2658
|
-
isFlushPending = false;
|
|
2659
|
-
isFlushing = true;
|
|
2660
2595
|
{
|
|
2661
2596
|
seen = seen || /* @__PURE__ */ new Map();
|
|
2662
2597
|
}
|
|
@@ -2688,10 +2623,9 @@ function flushJobs(seen) {
|
|
|
2688
2623
|
job.flags &= ~1;
|
|
2689
2624
|
}
|
|
2690
2625
|
}
|
|
2691
|
-
flushIndex =
|
|
2626
|
+
flushIndex = -1;
|
|
2692
2627
|
queue.length = 0;
|
|
2693
2628
|
flushPostFlushCbs(seen);
|
|
2694
|
-
isFlushing = false;
|
|
2695
2629
|
currentFlushPromise = null;
|
|
2696
2630
|
if (queue.length || pendingPostFlushCbs.length) {
|
|
2697
2631
|
flushJobs(seen);
|
|
@@ -3639,7 +3573,7 @@ const TeleportImpl = {
|
|
|
3639
3573
|
}
|
|
3640
3574
|
if (!disabled) {
|
|
3641
3575
|
mount(target, targetAnchor);
|
|
3642
|
-
updateCssVars(n2);
|
|
3576
|
+
updateCssVars(n2, false);
|
|
3643
3577
|
}
|
|
3644
3578
|
} else if (!disabled) {
|
|
3645
3579
|
warn$1(
|
|
@@ -3651,7 +3585,7 @@ const TeleportImpl = {
|
|
|
3651
3585
|
};
|
|
3652
3586
|
if (disabled) {
|
|
3653
3587
|
mount(container, mainAnchor);
|
|
3654
|
-
updateCssVars(n2);
|
|
3588
|
+
updateCssVars(n2, true);
|
|
3655
3589
|
}
|
|
3656
3590
|
if (isTeleportDeferred(n2.props)) {
|
|
3657
3591
|
queuePostRenderEffect(mountToTarget, parentSuspense);
|
|
@@ -3741,7 +3675,7 @@ const TeleportImpl = {
|
|
|
3741
3675
|
);
|
|
3742
3676
|
}
|
|
3743
3677
|
}
|
|
3744
|
-
updateCssVars(n2);
|
|
3678
|
+
updateCssVars(n2, disabled);
|
|
3745
3679
|
}
|
|
3746
3680
|
},
|
|
3747
3681
|
remove(vnode, parentComponent, parentSuspense, { um: unmount, o: { remove: hostRemove } }, doRemove) {
|
|
@@ -3809,9 +3743,10 @@ function hydrateTeleport(node, vnode, parentComponent, parentSuspense, slotScope
|
|
|
3809
3743
|
querySelector
|
|
3810
3744
|
);
|
|
3811
3745
|
if (target) {
|
|
3746
|
+
const disabled = isTeleportDisabled(vnode.props);
|
|
3812
3747
|
const targetNode = target._lpa || target.firstChild;
|
|
3813
3748
|
if (vnode.shapeFlag & 16) {
|
|
3814
|
-
if (
|
|
3749
|
+
if (disabled) {
|
|
3815
3750
|
vnode.anchor = hydrateChildren(
|
|
3816
3751
|
nextSibling(node),
|
|
3817
3752
|
vnode,
|
|
@@ -3852,16 +3787,23 @@ function hydrateTeleport(node, vnode, parentComponent, parentSuspense, slotScope
|
|
|
3852
3787
|
);
|
|
3853
3788
|
}
|
|
3854
3789
|
}
|
|
3855
|
-
updateCssVars(vnode);
|
|
3790
|
+
updateCssVars(vnode, disabled);
|
|
3856
3791
|
}
|
|
3857
3792
|
return vnode.anchor && nextSibling(vnode.anchor);
|
|
3858
3793
|
}
|
|
3859
3794
|
const Teleport = TeleportImpl;
|
|
3860
|
-
function updateCssVars(vnode) {
|
|
3795
|
+
function updateCssVars(vnode, isDisabled) {
|
|
3861
3796
|
const ctx = vnode.ctx;
|
|
3862
3797
|
if (ctx && ctx.ut) {
|
|
3863
|
-
let node
|
|
3864
|
-
|
|
3798
|
+
let node, anchor;
|
|
3799
|
+
if (isDisabled) {
|
|
3800
|
+
node = vnode.el;
|
|
3801
|
+
anchor = vnode.anchor;
|
|
3802
|
+
} else {
|
|
3803
|
+
node = vnode.targetStart;
|
|
3804
|
+
anchor = vnode.targetAnchor;
|
|
3805
|
+
}
|
|
3806
|
+
while (node && node !== anchor) {
|
|
3865
3807
|
if (node.nodeType === 1) node.setAttribute("data-v-owner", ctx.uid);
|
|
3866
3808
|
node = node.nextSibling;
|
|
3867
3809
|
}
|
|
@@ -4314,8 +4256,15 @@ function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
|
|
|
4314
4256
|
const setupState = owner.setupState;
|
|
4315
4257
|
const rawSetupState = toRaw(setupState);
|
|
4316
4258
|
const canSetSetupRef = setupState === EMPTY_OBJ ? () => false : (key) => {
|
|
4317
|
-
|
|
4318
|
-
|
|
4259
|
+
{
|
|
4260
|
+
if (hasOwn(rawSetupState, key) && !isRef(rawSetupState[key])) {
|
|
4261
|
+
warn$1(
|
|
4262
|
+
`Template ref "${key}" used on a non-ref value. It will not work in the production build.`
|
|
4263
|
+
);
|
|
4264
|
+
}
|
|
4265
|
+
if (knownTemplateRefs.has(rawSetupState[key])) {
|
|
4266
|
+
return false;
|
|
4267
|
+
}
|
|
4319
4268
|
}
|
|
4320
4269
|
return hasOwn(rawSetupState, key);
|
|
4321
4270
|
};
|
|
@@ -4612,7 +4561,11 @@ function createHydrationFunctions(rendererInternals) {
|
|
|
4612
4561
|
}
|
|
4613
4562
|
let needCallTransitionHooks = false;
|
|
4614
4563
|
if (isTemplateNode(el)) {
|
|
4615
|
-
needCallTransitionHooks = needTransition(
|
|
4564
|
+
needCallTransitionHooks = needTransition(
|
|
4565
|
+
null,
|
|
4566
|
+
// no need check parentSuspense in hydration
|
|
4567
|
+
transition
|
|
4568
|
+
) && parentComponent && parentComponent.vnode.props && parentComponent.vnode.props.appear;
|
|
4616
4569
|
const content = el.content.firstChild;
|
|
4617
4570
|
if (needCallTransitionHooks) {
|
|
4618
4571
|
transition.beforeEnter(content);
|
|
@@ -5005,6 +4958,8 @@ function isMismatchAllowed(el, allowedType) {
|
|
|
5005
4958
|
}
|
|
5006
4959
|
}
|
|
5007
4960
|
|
|
4961
|
+
const requestIdleCallback = getGlobalThis().requestIdleCallback || ((cb) => setTimeout(cb, 1));
|
|
4962
|
+
const cancelIdleCallback = getGlobalThis().cancelIdleCallback || ((id) => clearTimeout(id));
|
|
5008
4963
|
const hydrateOnIdle = (timeout = 1e4) => (hydrate) => {
|
|
5009
4964
|
const id = requestIdleCallback(hydrate, { timeout });
|
|
5010
4965
|
return () => cancelIdleCallback(id);
|
|
@@ -5998,12 +5953,13 @@ function renderSlot(slots, name, props = {}, fallback, noSlotted) {
|
|
|
5998
5953
|
}
|
|
5999
5954
|
openBlock();
|
|
6000
5955
|
const validSlotContent = slot && ensureValidVNode(slot(props));
|
|
5956
|
+
const slotKey = props.key || // slot content array of a dynamic conditional slot may have a branch
|
|
5957
|
+
// key attached in the `createSlots` helper, respect that
|
|
5958
|
+
validSlotContent && validSlotContent.key;
|
|
6001
5959
|
const rendered = createBlock(
|
|
6002
5960
|
Fragment,
|
|
6003
5961
|
{
|
|
6004
|
-
key: (
|
|
6005
|
-
// key attached in the `createSlots` helper, respect that
|
|
6006
|
-
validSlotContent && validSlotContent.key || `_${name}`) + // #7256 force differentiate fallback content from actual content
|
|
5962
|
+
key: (slotKey && !isSymbol(slotKey) ? slotKey : `_${name}`) + // #7256 force differentiate fallback content from actual content
|
|
6007
5963
|
(!validSlotContent && fallback ? "_fb" : "")
|
|
6008
5964
|
},
|
|
6009
5965
|
validSlotContent || (fallback ? fallback() : []),
|
|
@@ -7172,7 +7128,7 @@ function createCompatVue$1(createApp, createSingletonApp) {
|
|
|
7172
7128
|
return vm;
|
|
7173
7129
|
}
|
|
7174
7130
|
}
|
|
7175
|
-
Vue.version = `2.6.14-compat:${"3.5.
|
|
7131
|
+
Vue.version = `2.6.14-compat:${"3.5.12"}`;
|
|
7176
7132
|
Vue.config = singletonApp.config;
|
|
7177
7133
|
Vue.use = (plugin, ...options) => {
|
|
7178
7134
|
if (plugin && isFunction(plugin.install)) {
|
|
@@ -8160,6 +8116,7 @@ function getType(ctor) {
|
|
|
8160
8116
|
function validateProps(rawProps, props, instance) {
|
|
8161
8117
|
const resolvedValues = toRaw(props);
|
|
8162
8118
|
const options = instance.propsOptions[0];
|
|
8119
|
+
const camelizePropsKey = Object.keys(rawProps).map((key) => camelize(key));
|
|
8163
8120
|
for (const key in options) {
|
|
8164
8121
|
let opt = options[key];
|
|
8165
8122
|
if (opt == null) continue;
|
|
@@ -8168,7 +8125,7 @@ function validateProps(rawProps, props, instance) {
|
|
|
8168
8125
|
resolvedValues[key],
|
|
8169
8126
|
opt,
|
|
8170
8127
|
shallowReadonly(resolvedValues) ,
|
|
8171
|
-
!
|
|
8128
|
+
!camelizePropsKey.includes(key)
|
|
8172
8129
|
);
|
|
8173
8130
|
}
|
|
8174
8131
|
}
|
|
@@ -9982,14 +9939,13 @@ function doWatch(source, cb, options = EMPTY_OBJ) {
|
|
|
9982
9939
|
}
|
|
9983
9940
|
const baseWatchOptions = extend({}, options);
|
|
9984
9941
|
baseWatchOptions.onWarn = warn$1;
|
|
9942
|
+
const runsImmediately = cb && immediate || !cb && flush !== "post";
|
|
9985
9943
|
let ssrCleanup;
|
|
9986
9944
|
if (isInSSRComponentSetup) {
|
|
9987
9945
|
if (flush === "sync") {
|
|
9988
9946
|
const ctx = useSSRContext();
|
|
9989
9947
|
ssrCleanup = ctx.__watcherHandles || (ctx.__watcherHandles = []);
|
|
9990
|
-
} else if (!
|
|
9991
|
-
baseWatchOptions.once = true;
|
|
9992
|
-
} else {
|
|
9948
|
+
} else if (!runsImmediately) {
|
|
9993
9949
|
const watchStopHandle = () => {
|
|
9994
9950
|
};
|
|
9995
9951
|
watchStopHandle.stop = NOOP;
|
|
@@ -10028,7 +9984,13 @@ function doWatch(source, cb, options = EMPTY_OBJ) {
|
|
|
10028
9984
|
}
|
|
10029
9985
|
};
|
|
10030
9986
|
const watchHandle = watch$1(source, cb, baseWatchOptions);
|
|
10031
|
-
if (
|
|
9987
|
+
if (isInSSRComponentSetup) {
|
|
9988
|
+
if (ssrCleanup) {
|
|
9989
|
+
ssrCleanup.push(watchHandle);
|
|
9990
|
+
} else if (runsImmediately) {
|
|
9991
|
+
watchHandle();
|
|
9992
|
+
}
|
|
9993
|
+
}
|
|
10032
9994
|
return watchHandle;
|
|
10033
9995
|
}
|
|
10034
9996
|
function instanceWatch(source, value, options) {
|
|
@@ -10063,19 +10025,19 @@ function useModel(props, name, options = EMPTY_OBJ) {
|
|
|
10063
10025
|
warn$1(`useModel() called without active instance.`);
|
|
10064
10026
|
return ref();
|
|
10065
10027
|
}
|
|
10066
|
-
|
|
10028
|
+
const camelizedName = camelize(name);
|
|
10029
|
+
if (!i.propsOptions[0][camelizedName]) {
|
|
10067
10030
|
warn$1(`useModel() called with prop "${name}" which is not declared.`);
|
|
10068
10031
|
return ref();
|
|
10069
10032
|
}
|
|
10070
|
-
const camelizedName = camelize(name);
|
|
10071
10033
|
const hyphenatedName = hyphenate(name);
|
|
10072
|
-
const modifiers = getModelModifiers(props,
|
|
10034
|
+
const modifiers = getModelModifiers(props, camelizedName);
|
|
10073
10035
|
const res = customRef((track, trigger) => {
|
|
10074
10036
|
let localValue;
|
|
10075
10037
|
let prevSetValue = EMPTY_OBJ;
|
|
10076
10038
|
let prevEmittedValue;
|
|
10077
10039
|
watchSyncEffect(() => {
|
|
10078
|
-
const propValue = props[
|
|
10040
|
+
const propValue = props[camelizedName];
|
|
10079
10041
|
if (hasChanged(localValue, propValue)) {
|
|
10080
10042
|
localValue = propValue;
|
|
10081
10043
|
trigger();
|
|
@@ -11797,9 +11759,9 @@ function setupStatefulComponent(instance, isSSR) {
|
|
|
11797
11759
|
}
|
|
11798
11760
|
const { setup } = Component;
|
|
11799
11761
|
if (setup) {
|
|
11762
|
+
pauseTracking();
|
|
11800
11763
|
const setupContext = instance.setupContext = setup.length > 1 ? createSetupContext(instance) : null;
|
|
11801
11764
|
const reset = setCurrentInstance(instance);
|
|
11802
|
-
pauseTracking();
|
|
11803
11765
|
const setupResult = callWithErrorHandling(
|
|
11804
11766
|
setup,
|
|
11805
11767
|
instance,
|
|
@@ -11809,10 +11771,13 @@ function setupStatefulComponent(instance, isSSR) {
|
|
|
11809
11771
|
setupContext
|
|
11810
11772
|
]
|
|
11811
11773
|
);
|
|
11774
|
+
const isAsyncSetup = isPromise(setupResult);
|
|
11812
11775
|
resetTracking();
|
|
11813
11776
|
reset();
|
|
11814
|
-
if (
|
|
11815
|
-
|
|
11777
|
+
if ((isAsyncSetup || instance.sp) && !isAsyncWrapper(instance)) {
|
|
11778
|
+
markAsyncBoundary(instance);
|
|
11779
|
+
}
|
|
11780
|
+
if (isAsyncSetup) {
|
|
11816
11781
|
setupResult.then(unsetCurrentInstance, unsetCurrentInstance);
|
|
11817
11782
|
if (isSSR) {
|
|
11818
11783
|
return setupResult.then((resolvedResult) => {
|
|
@@ -12287,7 +12252,7 @@ function isMemoSame(cached, memo) {
|
|
|
12287
12252
|
return true;
|
|
12288
12253
|
}
|
|
12289
12254
|
|
|
12290
|
-
const version = "3.5.
|
|
12255
|
+
const version = "3.5.12";
|
|
12291
12256
|
const warn = warn$1 ;
|
|
12292
12257
|
const ErrorTypeStrings = ErrorTypeStrings$1 ;
|
|
12293
12258
|
const devtools = devtools$1 ;
|
|
@@ -12992,7 +12957,7 @@ function compatCoerceAttr(el, key, value, instance = null) {
|
|
|
12992
12957
|
return false;
|
|
12993
12958
|
}
|
|
12994
12959
|
|
|
12995
|
-
function patchDOMProp(el, key, value, parentComponent) {
|
|
12960
|
+
function patchDOMProp(el, key, value, parentComponent, attrName) {
|
|
12996
12961
|
if (key === "innerHTML" || key === "textContent") {
|
|
12997
12962
|
if (value != null) {
|
|
12998
12963
|
el[key] = key === "innerHTML" ? unsafeToTrustedHTML(value) : value;
|
|
@@ -13056,7 +13021,7 @@ function patchDOMProp(el, key, value, parentComponent) {
|
|
|
13056
13021
|
);
|
|
13057
13022
|
}
|
|
13058
13023
|
}
|
|
13059
|
-
needRemove && el.removeAttribute(key);
|
|
13024
|
+
needRemove && el.removeAttribute(attrName || key);
|
|
13060
13025
|
}
|
|
13061
13026
|
|
|
13062
13027
|
function addEventListener(el, event, handler, options) {
|
|
@@ -13166,7 +13131,7 @@ const patchProp = (el, key, prevValue, nextValue, namespace, parentComponent) =>
|
|
|
13166
13131
|
// #11081 force set props for possible async custom element
|
|
13167
13132
|
el._isVueCE && (/[A-Z]/.test(key) || !isString(nextValue))
|
|
13168
13133
|
) {
|
|
13169
|
-
patchDOMProp(el, camelize(key), nextValue, parentComponent);
|
|
13134
|
+
patchDOMProp(el, camelize(key), nextValue, parentComponent, key);
|
|
13170
13135
|
} else {
|
|
13171
13136
|
if (key === "true-value") {
|
|
13172
13137
|
el._trueValue = nextValue;
|
|
@@ -13893,7 +13858,7 @@ const vModelCheckbox = {
|
|
|
13893
13858
|
setChecked(el, binding, vnode);
|
|
13894
13859
|
}
|
|
13895
13860
|
};
|
|
13896
|
-
function setChecked(el, { value }, vnode) {
|
|
13861
|
+
function setChecked(el, { value, oldValue }, vnode) {
|
|
13897
13862
|
el._modelValue = value;
|
|
13898
13863
|
let checked;
|
|
13899
13864
|
if (isArray(value)) {
|
|
@@ -13901,6 +13866,7 @@ function setChecked(el, { value }, vnode) {
|
|
|
13901
13866
|
} else if (isSet(value)) {
|
|
13902
13867
|
checked = value.has(vnode.props.value);
|
|
13903
13868
|
} else {
|
|
13869
|
+
if (value === oldValue) return;
|
|
13904
13870
|
checked = looseEqual(value, getCheckboxValue(el, true));
|
|
13905
13871
|
}
|
|
13906
13872
|
if (el.checked !== checked) {
|
|
@@ -16610,6 +16576,9 @@ function getLoc(start, end) {
|
|
|
16610
16576
|
source: end == null ? end : getSlice(start, end)
|
|
16611
16577
|
};
|
|
16612
16578
|
}
|
|
16579
|
+
function cloneLoc(loc) {
|
|
16580
|
+
return getLoc(loc.start.offset, loc.end.offset);
|
|
16581
|
+
}
|
|
16613
16582
|
function setLocEnd(loc, end) {
|
|
16614
16583
|
loc.end = tokenizer.getPos(end);
|
|
16615
16584
|
loc.source = getSlice(loc.start.offset, end);
|
|
@@ -17968,7 +17937,7 @@ function processIf(node, dir, context, processCodegen) {
|
|
|
17968
17937
|
const branch = createIfBranch(node, dir);
|
|
17969
17938
|
const ifNode = {
|
|
17970
17939
|
type: 9,
|
|
17971
|
-
loc: node.loc,
|
|
17940
|
+
loc: cloneLoc(node.loc),
|
|
17972
17941
|
branches: [branch]
|
|
17973
17942
|
};
|
|
17974
17943
|
context.replaceNode(ifNode);
|