@vue/reactivity 3.5.0-alpha.1 → 3.5.0-alpha.3
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/reactivity.cjs.js +59 -51
- package/dist/reactivity.cjs.prod.js +54 -50
- package/dist/reactivity.d.ts +16 -13
- package/dist/reactivity.esm-browser.js +61 -52
- package/dist/reactivity.esm-browser.prod.js +2 -4
- package/dist/reactivity.esm-bundler.js +59 -51
- package/dist/reactivity.global.js +61 -52
- package/dist/reactivity.global.prod.js +2 -4
- package/package.json +2 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/reactivity v3.5.0-alpha.
|
|
2
|
+
* @vue/reactivity v3.5.0-alpha.3
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -36,10 +36,11 @@ const capitalize = cacheStringFunction((str) => {
|
|
|
36
36
|
return str.charAt(0).toUpperCase() + str.slice(1);
|
|
37
37
|
});
|
|
38
38
|
const hasChanged = (value, oldValue) => !Object.is(value, oldValue);
|
|
39
|
-
const def = (obj, key, value) => {
|
|
39
|
+
const def = (obj, key, value, writable = false) => {
|
|
40
40
|
Object.defineProperty(obj, key, {
|
|
41
41
|
configurable: true,
|
|
42
42
|
enumerable: false,
|
|
43
|
+
writable,
|
|
43
44
|
value
|
|
44
45
|
});
|
|
45
46
|
};
|
|
@@ -281,16 +282,14 @@ function endBatch() {
|
|
|
281
282
|
try {
|
|
282
283
|
e.trigger();
|
|
283
284
|
} catch (err) {
|
|
284
|
-
if (!error)
|
|
285
|
-
error = err;
|
|
285
|
+
if (!error) error = err;
|
|
286
286
|
}
|
|
287
287
|
}
|
|
288
288
|
e = next;
|
|
289
289
|
}
|
|
290
290
|
}
|
|
291
291
|
batchDepth--;
|
|
292
|
-
if (error)
|
|
293
|
-
throw error;
|
|
292
|
+
if (error) throw error;
|
|
294
293
|
}
|
|
295
294
|
function prepareDeps(sub) {
|
|
296
295
|
for (let link = sub.deps; link; link = link.nextDep) {
|
|
@@ -304,8 +303,7 @@ function cleanupDeps(sub) {
|
|
|
304
303
|
let tail = sub.depsTail;
|
|
305
304
|
for (let link = tail; link; link = link.prevDep) {
|
|
306
305
|
if (link.version === -1) {
|
|
307
|
-
if (link === tail)
|
|
308
|
-
tail = link.prevDep;
|
|
306
|
+
if (link === tail) tail = link.prevDep;
|
|
309
307
|
removeSub(link);
|
|
310
308
|
removeDep(link);
|
|
311
309
|
} else {
|
|
@@ -569,8 +567,7 @@ function addSub(link) {
|
|
|
569
567
|
const currentTail = link.dep.subs;
|
|
570
568
|
if (currentTail !== link) {
|
|
571
569
|
link.prevSub = currentTail;
|
|
572
|
-
if (currentTail)
|
|
573
|
-
currentTail.nextSub = link;
|
|
570
|
+
if (currentTail) currentTail.nextSub = link;
|
|
574
571
|
}
|
|
575
572
|
if (link.dep.subsHead === void 0) {
|
|
576
573
|
link.dep.subsHead = link;
|
|
@@ -676,8 +673,7 @@ function getDepFromReactive(object, key) {
|
|
|
676
673
|
|
|
677
674
|
function reactiveReadArray(array) {
|
|
678
675
|
const raw = toRaw(array);
|
|
679
|
-
if (raw === array)
|
|
680
|
-
return raw;
|
|
676
|
+
if (raw === array) return raw;
|
|
681
677
|
track(raw, "iterate", ARRAY_ITERATE_KEY);
|
|
682
678
|
return isShallow(array) ? raw : raw.map(toReactive);
|
|
683
679
|
}
|
|
@@ -851,8 +847,7 @@ const builtInSymbols = new Set(
|
|
|
851
847
|
/* @__PURE__ */ Object.getOwnPropertyNames(Symbol).filter((key) => key !== "arguments" && key !== "caller").map((key) => Symbol[key]).filter(isSymbol)
|
|
852
848
|
);
|
|
853
849
|
function hasOwnProperty(key) {
|
|
854
|
-
if (!isSymbol(key))
|
|
855
|
-
key = String(key);
|
|
850
|
+
if (!isSymbol(key)) key = String(key);
|
|
856
851
|
const obj = toRaw(this);
|
|
857
852
|
track(obj, "has", key);
|
|
858
853
|
return obj.hasOwnProperty(key);
|
|
@@ -1003,18 +998,18 @@ const shallowReadonlyHandlers = /* @__PURE__ */ new ReadonlyReactiveHandler(true
|
|
|
1003
998
|
|
|
1004
999
|
const toShallow = (value) => value;
|
|
1005
1000
|
const getProto = (v) => Reflect.getPrototypeOf(v);
|
|
1006
|
-
function get(target, key,
|
|
1001
|
+
function get(target, key, isReadonly2 = false, isShallow2 = false) {
|
|
1007
1002
|
target = target["__v_raw"];
|
|
1008
1003
|
const rawTarget = toRaw(target);
|
|
1009
1004
|
const rawKey = toRaw(key);
|
|
1010
|
-
if (!
|
|
1005
|
+
if (!isReadonly2) {
|
|
1011
1006
|
if (hasChanged(key, rawKey)) {
|
|
1012
1007
|
track(rawTarget, "get", key);
|
|
1013
1008
|
}
|
|
1014
1009
|
track(rawTarget, "get", rawKey);
|
|
1015
1010
|
}
|
|
1016
1011
|
const { has: has2 } = getProto(rawTarget);
|
|
1017
|
-
const wrap =
|
|
1012
|
+
const wrap = isShallow2 ? toShallow : isReadonly2 ? toReadonly : toReactive;
|
|
1018
1013
|
if (has2.call(rawTarget, key)) {
|
|
1019
1014
|
return wrap(target.get(key));
|
|
1020
1015
|
} else if (has2.call(rawTarget, rawKey)) {
|
|
@@ -1023,11 +1018,11 @@ function get(target, key, isReadonly = false, isShallow = false) {
|
|
|
1023
1018
|
target.get(key);
|
|
1024
1019
|
}
|
|
1025
1020
|
}
|
|
1026
|
-
function has(key,
|
|
1021
|
+
function has(key, isReadonly2 = false) {
|
|
1027
1022
|
const target = this["__v_raw"];
|
|
1028
1023
|
const rawTarget = toRaw(target);
|
|
1029
1024
|
const rawKey = toRaw(key);
|
|
1030
|
-
if (!
|
|
1025
|
+
if (!isReadonly2) {
|
|
1031
1026
|
if (hasChanged(key, rawKey)) {
|
|
1032
1027
|
track(rawTarget, "has", key);
|
|
1033
1028
|
}
|
|
@@ -1035,13 +1030,15 @@ function has(key, isReadonly = false) {
|
|
|
1035
1030
|
}
|
|
1036
1031
|
return key === rawKey ? target.has(key) : target.has(key) || target.has(rawKey);
|
|
1037
1032
|
}
|
|
1038
|
-
function size(target,
|
|
1033
|
+
function size(target, isReadonly2 = false) {
|
|
1039
1034
|
target = target["__v_raw"];
|
|
1040
|
-
!
|
|
1035
|
+
!isReadonly2 && track(toRaw(target), "iterate", ITERATE_KEY);
|
|
1041
1036
|
return Reflect.get(target, "size", target);
|
|
1042
1037
|
}
|
|
1043
|
-
function add(value) {
|
|
1044
|
-
value
|
|
1038
|
+
function add(value, _isShallow = false) {
|
|
1039
|
+
if (!_isShallow && !isShallow(value) && !isReadonly(value)) {
|
|
1040
|
+
value = toRaw(value);
|
|
1041
|
+
}
|
|
1045
1042
|
const target = toRaw(this);
|
|
1046
1043
|
const proto = getProto(target);
|
|
1047
1044
|
const hadKey = proto.has.call(target, value);
|
|
@@ -1051,8 +1048,10 @@ function add(value) {
|
|
|
1051
1048
|
}
|
|
1052
1049
|
return this;
|
|
1053
1050
|
}
|
|
1054
|
-
function set(key, value) {
|
|
1055
|
-
value
|
|
1051
|
+
function set(key, value, _isShallow = false) {
|
|
1052
|
+
if (!_isShallow && !isShallow(value) && !isReadonly(value)) {
|
|
1053
|
+
value = toRaw(value);
|
|
1054
|
+
}
|
|
1056
1055
|
const target = toRaw(this);
|
|
1057
1056
|
const { has: has2, get: get2 } = getProto(target);
|
|
1058
1057
|
let hadKey = has2.call(target, key);
|
|
@@ -1098,19 +1097,19 @@ function clear() {
|
|
|
1098
1097
|
}
|
|
1099
1098
|
return result;
|
|
1100
1099
|
}
|
|
1101
|
-
function createForEach(
|
|
1100
|
+
function createForEach(isReadonly2, isShallow2) {
|
|
1102
1101
|
return function forEach(callback, thisArg) {
|
|
1103
1102
|
const observed = this;
|
|
1104
1103
|
const target = observed["__v_raw"];
|
|
1105
1104
|
const rawTarget = toRaw(target);
|
|
1106
|
-
const wrap =
|
|
1107
|
-
!
|
|
1105
|
+
const wrap = isShallow2 ? toShallow : isReadonly2 ? toReadonly : toReactive;
|
|
1106
|
+
!isReadonly2 && track(rawTarget, "iterate", ITERATE_KEY);
|
|
1108
1107
|
return target.forEach((value, key) => {
|
|
1109
1108
|
return callback.call(thisArg, wrap(value), wrap(key), observed);
|
|
1110
1109
|
});
|
|
1111
1110
|
};
|
|
1112
1111
|
}
|
|
1113
|
-
function createIterableMethod(method,
|
|
1112
|
+
function createIterableMethod(method, isReadonly2, isShallow2) {
|
|
1114
1113
|
return function(...args) {
|
|
1115
1114
|
const target = this["__v_raw"];
|
|
1116
1115
|
const rawTarget = toRaw(target);
|
|
@@ -1118,8 +1117,8 @@ function createIterableMethod(method, isReadonly, isShallow) {
|
|
|
1118
1117
|
const isPair = method === "entries" || method === Symbol.iterator && targetIsMap;
|
|
1119
1118
|
const isKeyOnly = method === "keys" && targetIsMap;
|
|
1120
1119
|
const innerIterator = target[method](...args);
|
|
1121
|
-
const wrap =
|
|
1122
|
-
!
|
|
1120
|
+
const wrap = isShallow2 ? toShallow : isReadonly2 ? toReadonly : toReactive;
|
|
1121
|
+
!isReadonly2 && track(
|
|
1123
1122
|
rawTarget,
|
|
1124
1123
|
"iterate",
|
|
1125
1124
|
isKeyOnly ? MAP_KEY_ITERATE_KEY : ITERATE_KEY
|
|
@@ -1175,8 +1174,12 @@ function createInstrumentations() {
|
|
|
1175
1174
|
return size(this);
|
|
1176
1175
|
},
|
|
1177
1176
|
has,
|
|
1178
|
-
add
|
|
1179
|
-
|
|
1177
|
+
add(value) {
|
|
1178
|
+
return add.call(this, value, true);
|
|
1179
|
+
},
|
|
1180
|
+
set(key, value) {
|
|
1181
|
+
return set.call(this, key, value, true);
|
|
1182
|
+
},
|
|
1180
1183
|
delete: deleteEntry,
|
|
1181
1184
|
clear,
|
|
1182
1185
|
forEach: createForEach(false, true)
|
|
@@ -1242,13 +1245,13 @@ const [
|
|
|
1242
1245
|
shallowInstrumentations,
|
|
1243
1246
|
shallowReadonlyInstrumentations
|
|
1244
1247
|
] = /* @__PURE__ */ createInstrumentations();
|
|
1245
|
-
function createInstrumentationGetter(
|
|
1246
|
-
const instrumentations = shallow ?
|
|
1248
|
+
function createInstrumentationGetter(isReadonly2, shallow) {
|
|
1249
|
+
const instrumentations = shallow ? isReadonly2 ? shallowReadonlyInstrumentations : shallowInstrumentations : isReadonly2 ? readonlyInstrumentations : mutableInstrumentations;
|
|
1247
1250
|
return (target, key, receiver) => {
|
|
1248
1251
|
if (key === "__v_isReactive") {
|
|
1249
|
-
return !
|
|
1252
|
+
return !isReadonly2;
|
|
1250
1253
|
} else if (key === "__v_isReadonly") {
|
|
1251
|
-
return
|
|
1254
|
+
return isReadonly2;
|
|
1252
1255
|
} else if (key === "__v_raw") {
|
|
1253
1256
|
return target;
|
|
1254
1257
|
}
|
|
@@ -1344,7 +1347,11 @@ function shallowReadonly(target) {
|
|
|
1344
1347
|
function createReactiveObject(target, isReadonly2, baseHandlers, collectionHandlers, proxyMap) {
|
|
1345
1348
|
if (!isObject(target)) {
|
|
1346
1349
|
{
|
|
1347
|
-
warn(
|
|
1350
|
+
warn(
|
|
1351
|
+
`value cannot be made ${isReadonly2 ? "readonly" : "reactive"}: ${String(
|
|
1352
|
+
target
|
|
1353
|
+
)}`
|
|
1354
|
+
);
|
|
1348
1355
|
}
|
|
1349
1356
|
return target;
|
|
1350
1357
|
}
|
|
@@ -1395,7 +1402,7 @@ const toReactive = (value) => isObject(value) ? reactive(value) : value;
|
|
|
1395
1402
|
const toReadonly = (value) => isObject(value) ? readonly(value) : value;
|
|
1396
1403
|
|
|
1397
1404
|
function isRef(r) {
|
|
1398
|
-
return r ? r
|
|
1405
|
+
return r ? r["__v_isRef"] === true : false;
|
|
1399
1406
|
}
|
|
1400
1407
|
function ref(value) {
|
|
1401
1408
|
return createRef(value, false);
|
|
@@ -1410,12 +1417,13 @@ function createRef(rawValue, shallow) {
|
|
|
1410
1417
|
return new RefImpl(rawValue, shallow);
|
|
1411
1418
|
}
|
|
1412
1419
|
class RefImpl {
|
|
1413
|
-
constructor(value,
|
|
1414
|
-
this.__v_isShallow = __v_isShallow;
|
|
1420
|
+
constructor(value, isShallow2) {
|
|
1415
1421
|
this.dep = new Dep();
|
|
1416
|
-
this
|
|
1417
|
-
this
|
|
1418
|
-
this.
|
|
1422
|
+
this["__v_isRef"] = true;
|
|
1423
|
+
this["__v_isShallow"] = false;
|
|
1424
|
+
this._rawValue = isShallow2 ? value : toRaw(value);
|
|
1425
|
+
this._value = isShallow2 ? value : toReactive(value);
|
|
1426
|
+
this["__v_isShallow"] = isShallow2;
|
|
1419
1427
|
}
|
|
1420
1428
|
get value() {
|
|
1421
1429
|
{
|
|
@@ -1429,7 +1437,7 @@ class RefImpl {
|
|
|
1429
1437
|
}
|
|
1430
1438
|
set value(newValue) {
|
|
1431
1439
|
const oldValue = this._rawValue;
|
|
1432
|
-
const useDirectValue = this
|
|
1440
|
+
const useDirectValue = this["__v_isShallow"] || isShallow(newValue) || isReadonly(newValue);
|
|
1433
1441
|
newValue = useDirectValue ? newValue : toRaw(newValue);
|
|
1434
1442
|
if (hasChanged(newValue, oldValue)) {
|
|
1435
1443
|
this._rawValue = newValue;
|
|
@@ -1479,7 +1487,7 @@ function proxyRefs(objectWithRefs) {
|
|
|
1479
1487
|
}
|
|
1480
1488
|
class CustomRefImpl {
|
|
1481
1489
|
constructor(factory) {
|
|
1482
|
-
this
|
|
1490
|
+
this["__v_isRef"] = true;
|
|
1483
1491
|
const dep = this.dep = new Dep();
|
|
1484
1492
|
const { get, set } = factory(dep.track.bind(dep), dep.trigger.bind(dep));
|
|
1485
1493
|
this._get = get;
|
|
@@ -1510,7 +1518,7 @@ class ObjectRefImpl {
|
|
|
1510
1518
|
this._object = _object;
|
|
1511
1519
|
this._key = _key;
|
|
1512
1520
|
this._defaultValue = _defaultValue;
|
|
1513
|
-
this
|
|
1521
|
+
this["__v_isRef"] = true;
|
|
1514
1522
|
}
|
|
1515
1523
|
get value() {
|
|
1516
1524
|
const val = this._object[this._key];
|
|
@@ -1526,8 +1534,8 @@ class ObjectRefImpl {
|
|
|
1526
1534
|
class GetterRefImpl {
|
|
1527
1535
|
constructor(_getter) {
|
|
1528
1536
|
this._getter = _getter;
|
|
1529
|
-
this
|
|
1530
|
-
this
|
|
1537
|
+
this["__v_isRef"] = true;
|
|
1538
|
+
this["__v_isReadonly"] = true;
|
|
1531
1539
|
}
|
|
1532
1540
|
get value() {
|
|
1533
1541
|
return this._getter();
|
|
@@ -1564,7 +1572,7 @@ class ComputedRefImpl {
|
|
|
1564
1572
|
/**
|
|
1565
1573
|
* @internal
|
|
1566
1574
|
*/
|
|
1567
|
-
this
|
|
1575
|
+
this["__v_isRef"] = true;
|
|
1568
1576
|
// A computed is also a subscriber that tracks other deps
|
|
1569
1577
|
/**
|
|
1570
1578
|
* @internal
|
|
@@ -1584,7 +1592,7 @@ class ComputedRefImpl {
|
|
|
1584
1592
|
this.globalVersion = globalVersion - 1;
|
|
1585
1593
|
// for backwards compat
|
|
1586
1594
|
this.effect = this;
|
|
1587
|
-
this
|
|
1595
|
+
this["__v_isReadonly"] = !setter;
|
|
1588
1596
|
this.isSSR = isSSR;
|
|
1589
1597
|
}
|
|
1590
1598
|
/**
|
|
@@ -1649,7 +1657,8 @@ const ReactiveFlags = {
|
|
|
1649
1657
|
"IS_REACTIVE": "__v_isReactive",
|
|
1650
1658
|
"IS_READONLY": "__v_isReadonly",
|
|
1651
1659
|
"IS_SHALLOW": "__v_isShallow",
|
|
1652
|
-
"RAW": "__v_raw"
|
|
1660
|
+
"RAW": "__v_raw",
|
|
1661
|
+
"IS_REF": "__v_isRef"
|
|
1653
1662
|
};
|
|
1654
1663
|
|
|
1655
1664
|
export { ARRAY_ITERATE_KEY, EffectFlags, EffectScope, ITERATE_KEY, MAP_KEY_ITERATE_KEY, ReactiveEffect, ReactiveFlags, TrackOpTypes, TriggerOpTypes, computed, customRef, effect, effectScope, enableTracking, getCurrentScope, isProxy, isReactive, isReadonly, isRef, isShallow, markRaw, onEffectCleanup, onScopeDispose, pauseTracking, proxyRefs, reactive, reactiveReadArray, readonly, ref, resetTracking, shallowReactive, shallowReadArray, shallowReadonly, shallowRef, stop, toRaw, toReactive, toReadonly, toRef, toRefs, toValue, track, trigger, triggerRef, unref };
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/reactivity v3.5.0-alpha.
|
|
2
|
+
* @vue/reactivity v3.5.0-alpha.3
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
|
-
**/
|
|
6
|
-
/*! #__NO_SIDE_EFFECTS__ */
|
|
7
|
-
function t(t,e){const s=new Set(t.split(","));return t=>s.has(t)}const e=Object.assign,s=Object.prototype.hasOwnProperty,n=(t,e)=>s.call(t,e),i=Array.isArray,r=t=>"[object Map]"===l(t),o=t=>"function"==typeof t,c=t=>"symbol"==typeof t,u=t=>null!==t&&"object"==typeof t,a=Object.prototype.toString,l=t=>a.call(t),h=t=>l(t).slice(8,-1),f=t=>"string"==typeof t&&"NaN"!==t&&"-"!==t[0]&&""+parseInt(t,10)===t,p=(t,e)=>!Object.is(t,e);let d,v;class _{constructor(t=!1){this.detached=t,this._active=!0,this.effects=[],this.cleanups=[],this.parent=d,!t&&d&&(this.index=(d.scopes||(d.scopes=[])).push(this)-1)}get active(){return this._active}run(t){if(this._active){const e=d;try{return d=this,t()}finally{d=e}}}on(){d=this}off(){d=this.parent}stop(t){if(this._active){let e,s;for(e=0,s=this.effects.length;e<s;e++)this.effects[e].stop();for(e=0,s=this.cleanups.length;e<s;e++)this.cleanups[e]();if(this.scopes)for(e=0,s=this.scopes.length;e<s;e++)this.scopes[e].stop(!0);if(!this.detached&&this.parent&&!t){const t=this.parent.scopes.pop();t&&t!==this&&(this.parent.scopes[this.index]=t,t.index=this.index)}this.parent=void 0,this._active=!1}}}function g(t){return new _(t)}function y(){return d}function b(t,e=!1){d&&d.cleanups.push(t)}const w={ACTIVE:1,1:"ACTIVE",RUNNING:2,2:"RUNNING",TRACKING:4,4:"TRACKING",NOTIFIED:8,8:"NOTIFIED",DIRTY:16,16:"DIRTY",ALLOW_RECURSE:32,32:"ALLOW_RECURSE",NO_BATCH:64,64:"NO_BATCH"};class S{constructor(t){this.fn=t,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.nextEffect=void 0,this.cleanup=void 0,this.scheduler=void 0,d&&d.active&&d.effects.push(this)}notify(){if(!(2&this.flags)||32&this.flags)return 64&this.flags?this.trigger():void(8&this.flags||(this.flags|=8,this.nextEffect=R,R=this))}run(){if(!(1&this.flags))return this.fn();this.flags|=2,z(this),k(this);const t=v,e=N;v=this,N=!0;try{return this.fn()}finally{m(this),v=t,N=e,this.flags&=-3}}stop(){if(1&this.flags){for(let t=this.deps;t;t=t.nextDep)I(t);this.deps=this.depsTail=void 0,z(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){O(this)&&this.run()}get dirty(){return O(this)}}let R,x=0;function D(){x++}function E(){if(x>1)return void x--;let t;for(;R;){let s=R;for(R=void 0;s;){const n=s.nextEffect;if(s.nextEffect=void 0,s.flags&=-9,1&s.flags)try{s.trigger()}catch(e){t||(t=e)}s=n}}if(x--,t)throw t}function k(t){for(let e=t.deps;e;e=e.nextDep)e.version=-1,e.prevActiveLink=e.dep.activeLink,e.dep.activeLink=e}function m(t){let e,s=t.depsTail;for(let n=s;n;n=n.prevDep)-1===n.version?(n===s&&(s=n.prevDep),I(n),A(n)):e=n,n.dep.activeLink=n.prevActiveLink,n.prevActiveLink=void 0;t.deps=e,t.depsTail=s}function O(t){for(let e=t.deps;e;e=e.nextDep)if(e.dep.version!==e.version||e.dep.computed&&!1===T(e.dep.computed)||e.dep.version!==e.version)return!0;return!!t._dirty}function T(t){if(2&t.flags)return!1;if(4&t.flags&&!(16&t.flags))return;if(t.flags&=-17,t.globalVersion===G)return;t.globalVersion=G;const e=t.dep;if(t.flags|=2,e.version>0&&!t.isSSR&&!O(t))return void(t.flags&=-3);const s=v,n=N;v=t,N=!0;try{k(t);const s=t.fn();(0===e.version||p(s,t._value))&&(t._value=s,e.version++)}catch(i){throw e.version++,i}finally{v=s,N=n,m(t),t.flags&=-3}}function I(t){const{dep:e,prevSub:s,nextSub:n}=t;if(s&&(s.nextSub=n,t.prevSub=void 0),n&&(n.prevSub=s,t.nextSub=void 0),e.subs===t&&(e.subs=s),!e.subs&&e.computed){e.computed.flags&=-5;for(let t=e.computed.deps;t;t=t.nextDep)I(t)}}function A(t){const{prevDep:e,nextDep:s}=t;e&&(e.nextDep=s,t.prevDep=void 0),s&&(s.prevDep=e,t.nextDep=void 0)}function L(t,s){t.effect instanceof S&&(t=t.effect.fn);const n=new S(t);s&&e(n,s);try{n.run()}catch(r){throw n.stop(),r}const i=n.run.bind(n);return i.effect=n,i}function j(t){t.effect.stop()}let N=!0;const P=[];function V(){P.push(N),N=!1}function W(){P.push(N),N=!0}function C(){const t=P.pop();N=void 0===t||t}function M(t,e=!1){v instanceof S&&(v.cleanup=t)}function z(t){const{cleanup:e}=t;if(t.cleanup=void 0,e){const t=v;v=void 0;try{e()}finally{v=t}}}let G=0;class K{constructor(t){this.computed=t,this.version=0,this.activeLink=void 0,this.subs=void 0}track(t){if(!v||!N)return;let e=this.activeLink;if(void 0===e||e.sub!==v)e=this.activeLink={dep:this,sub:v,version:this.version,nextDep:void 0,prevDep:void 0,nextSub:void 0,prevSub:void 0,prevActiveLink:void 0},v.deps?(e.prevDep=v.depsTail,v.depsTail.nextDep=e,v.depsTail=e):v.deps=v.depsTail=e,4&v.flags&&H(e);else if(-1===e.version&&(e.version=this.version,e.nextDep)){const t=e.nextDep;t.prevDep=e.prevDep,e.prevDep&&(e.prevDep.nextDep=t),e.prevDep=v.depsTail,e.nextDep=void 0,v.depsTail.nextDep=e,v.depsTail=e,v.deps===e&&(v.deps=t)}return e}trigger(t){this.version++,G++,this.notify(t)}notify(t){D();try{0;for(let t=this.subs;t;t=t.prevSub)t.sub.notify()}finally{E()}}}function H(t){const e=t.dep.computed;if(e&&!t.dep.subs){e.flags|=20;for(let t=e.deps;t;t=t.nextDep)H(t)}const s=t.dep.subs;s!==t&&(t.prevSub=s,s&&(s.nextSub=t)),t.dep.subs=t}const U=new WeakMap,Y=Symbol(""),B=Symbol(""),F=Symbol("");function q(t,e,s){if(N&&v){let e=U.get(t);e||U.set(t,e=new Map);let n=e.get(s);n||e.set(s,n=new K),n.track()}}function J(t,e,s,n,o,u){const a=U.get(t);if(!a)return void G++;let l=[];if("clear"===e)l=[...a.values()];else{const o=i(t),u=o&&f(s);if(o&&"length"===s){const t=Number(n);a.forEach(((e,s)=>{("length"===s||s===F||!c(s)&&s>=t)&&l.push(e)}))}else{const n=t=>t&&l.push(t);switch(void 0!==s&&n(a.get(s)),u&&n(a.get(F)),e){case"add":o?u&&n(a.get("length")):(n(a.get(Y)),r(t)&&n(a.get(B)));break;case"delete":o||(n(a.get(Y)),r(t)&&n(a.get(B)));break;case"set":r(t)&&n(a.get(Y))}}}D();for(const i of l)i.trigger();E()}function Q(t){const e=Jt(t);return e===t?e:(q(e,0,F),Ft(t)?e:e.map(Xt))}function X(t){return q(t=Jt(t),0,F),t}const Z={__proto__:null,[Symbol.iterator](){return $(this,Symbol.iterator,Xt)},concat(...t){return Q(this).concat(...t.map((t=>Q(t))))},entries(){return $(this,"entries",(t=>(t[1]=Xt(t[1]),t)))},every(t,e){return tt(this,"every",t,e)},filter(t,e){const s=tt(this,"filter",t,e);return qt(this)&&!Ft(this)?s.map(Xt):s},find(t,e){const s=tt(this,"find",t,e);return qt(this)&&!Ft(this)?Xt(s):s},findIndex(t,e){return tt(this,"findIndex",t,e)},findLast(t,e){const s=tt(this,"findLast",t,e);return qt(this)&&!Ft(this)?Xt(s):s},findLastIndex(t,e){return tt(this,"findLastIndex",t,e)},forEach(t,e){return tt(this,"forEach",t,e)},includes(...t){return st(this,"includes",t)},indexOf(...t){return st(this,"indexOf",t)},join(t){return Q(this).join(t)},lastIndexOf(...t){return st(this,"lastIndexOf",t)},map(t,e){return tt(this,"map",t,e)},pop(){return nt(this,"pop")},push(...t){return nt(this,"push",t)},reduce(t,...e){return et(this,"reduce",t,e)},reduceRight(t,...e){return et(this,"reduceRight",t,e)},shift(){return nt(this,"shift")},some(t,e){return tt(this,"some",t,e)},splice(...t){return nt(this,"splice",t)},toReversed(){return Q(this).toReversed()},toSorted(t){return Q(this).toSorted(t)},toSpliced(...t){return Q(this).toSpliced(...t)},unshift(...t){return nt(this,"unshift",t)},values(){return $(this,"values",Xt)}};function $(t,e,s){const n=X(t),i=n[e]();return n===t||Ft(t)||(i._next=i.next,i.next=()=>{const t=i._next();return t.value&&(t.value=s(t.value)),t}),i}function tt(t,e,s,n){const i=X(t);let r=s;return i!==t&&(Ft(t)?s.length>2&&(r=function(e,n){return s.call(this,e,n,t)}):r=function(e,n){return s.call(this,Xt(e),n,t)}),i[e](r,n)}function et(t,e,s,n){const i=X(t);let r=s;return i!==t&&(Ft(t)?s.length>3&&(r=function(e,n,i){return s.call(this,e,n,i,t)}):r=function(e,n,i){return s.call(this,e,Xt(n),i,t)}),i[e](r,...n)}function st(t,e,s){const n=Jt(t);q(n,0,F);const i=n[e](...s);return-1!==i&&!1!==i||!qt(s[0])?i:(s[0]=Jt(s[0]),n[e](...s))}function nt(t,e,s=[]){V(),D();const n=Jt(t)[e].apply(t,s);return E(),C(),n}const it=t("__proto__,__v_isRef,__isVue"),rt=new Set(Object.getOwnPropertyNames(Symbol).filter((t=>"arguments"!==t&&"caller"!==t)).map((t=>Symbol[t])).filter(c));function ot(t){c(t)||(t=String(t));const e=Jt(this);return q(e,0,t),e.hasOwnProperty(t)}class ct{constructor(t=!1,e=!1){this._isReadonly=t,this._isShallow=e}get(t,e,s){const n=this._isReadonly,r=this._isShallow;if("__v_isReactive"===e)return!n;if("__v_isReadonly"===e)return n;if("__v_isShallow"===e)return r;if("__v_raw"===e)return s===(n?r?Mt:Ct:r?Wt:Vt).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(s)?t:void 0;const o=i(t);if(!n){let t;if(o&&(t=Z[e]))return t;if("hasOwnProperty"===e)return ot}const a=Reflect.get(t,e,$t(t)?t:s);return(c(e)?rt.has(e):it(e))?a:(n||q(t,0,e),r?a:$t(a)?o&&f(e)?a:a.value:u(a)?n?Kt(a):zt(a):a)}}class ut extends ct{constructor(t=!1){super(!1,t)}set(t,e,s,r){let o=t[e];if(!this._isShallow){const e=Bt(o);if(Ft(s)||Bt(s)||(o=Jt(o),s=Jt(s)),!i(t)&&$t(o)&&!$t(s))return!e&&(o.value=s,!0)}const c=i(t)&&f(e)?Number(e)<t.length:n(t,e),u=Reflect.set(t,e,s,r);return t===Jt(r)&&(c?p(s,o)&&J(t,"set",e,s):J(t,"add",e,s)),u}deleteProperty(t,e){const s=n(t,e),i=Reflect.deleteProperty(t,e);return i&&s&&J(t,"delete",e,void 0),i}has(t,e){const s=Reflect.has(t,e);return c(e)&&rt.has(e)||q(t,0,e),s}ownKeys(t){return q(t,0,i(t)?"length":Y),Reflect.ownKeys(t)}}class at extends ct{constructor(t=!1){super(!0,t)}set(t,e){return!0}deleteProperty(t,e){return!0}}const lt=new ut,ht=new at,ft=new ut(!0),pt=new at(!0),dt=t=>t,vt=t=>Reflect.getPrototypeOf(t);function _t(t,e,s=!1,n=!1){const i=Jt(t=t.__v_raw),r=Jt(e);s||(p(e,r)&&q(i,0,e),q(i,0,r));const{has:o}=vt(i),c=n?dt:s?Zt:Xt;return o.call(i,e)?c(t.get(e)):o.call(i,r)?c(t.get(r)):void(t!==i&&t.get(e))}function gt(t,e=!1){const s=this.__v_raw,n=Jt(s),i=Jt(t);return e||(p(t,i)&&q(n,0,t),q(n,0,i)),t===i?s.has(t):s.has(t)||s.has(i)}function yt(t,e=!1){return t=t.__v_raw,!e&&q(Jt(t),0,Y),Reflect.get(t,"size",t)}function bt(t){t=Jt(t);const e=Jt(this);return vt(e).has.call(e,t)||(e.add(t),J(e,"add",t,t)),this}function wt(t,e){e=Jt(e);const s=Jt(this),{has:n,get:i}=vt(s);let r=n.call(s,t);r||(t=Jt(t),r=n.call(s,t));const o=i.call(s,t);return s.set(t,e),r?p(e,o)&&J(s,"set",t,e):J(s,"add",t,e),this}function St(t){const e=Jt(this),{has:s,get:n}=vt(e);let i=s.call(e,t);i||(t=Jt(t),i=s.call(e,t)),n&&n.call(e,t);const r=e.delete(t);return i&&J(e,"delete",t,void 0),r}function Rt(){const t=Jt(this),e=0!==t.size,s=t.clear();return e&&J(t,"clear",void 0,void 0),s}function xt(t,e){return function(s,n){const i=this,r=i.__v_raw,o=Jt(r),c=e?dt:t?Zt:Xt;return!t&&q(o,0,Y),r.forEach(((t,e)=>s.call(n,c(t),c(e),i)))}}function Dt(t,e,s){return function(...n){const i=this.__v_raw,o=Jt(i),c=r(o),u="entries"===t||t===Symbol.iterator&&c,a="keys"===t&&c,l=i[t](...n),h=s?dt:e?Zt:Xt;return!e&&q(o,0,a?B:Y),{next(){const{value:t,done:e}=l.next();return e?{value:t,done:e}:{value:u?[h(t[0]),h(t[1])]:h(t),done:e}},[Symbol.iterator](){return this}}}}function Et(t){return function(...e){return"delete"!==t&&("clear"===t?void 0:this)}}function kt(){const t={get(t){return _t(this,t)},get size(){return yt(this)},has:gt,add:bt,set:wt,delete:St,clear:Rt,forEach:xt(!1,!1)},e={get(t){return _t(this,t,!1,!0)},get size(){return yt(this)},has:gt,add:bt,set:wt,delete:St,clear:Rt,forEach:xt(!1,!0)},s={get(t){return _t(this,t,!0)},get size(){return yt(this,!0)},has(t){return gt.call(this,t,!0)},add:Et("add"),set:Et("set"),delete:Et("delete"),clear:Et("clear"),forEach:xt(!0,!1)},n={get(t){return _t(this,t,!0,!0)},get size(){return yt(this,!0)},has(t){return gt.call(this,t,!0)},add:Et("add"),set:Et("set"),delete:Et("delete"),clear:Et("clear"),forEach:xt(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach((i=>{t[i]=Dt(i,!1,!1),s[i]=Dt(i,!0,!1),e[i]=Dt(i,!1,!0),n[i]=Dt(i,!0,!0)})),[t,s,e,n]}const[mt,Ot,Tt,It]=kt();function At(t,e){const s=e?t?It:Tt:t?Ot:mt;return(e,i,r)=>"__v_isReactive"===i?!t:"__v_isReadonly"===i?t:"__v_raw"===i?e:Reflect.get(n(s,i)&&i in e?s:e,i,r)}const Lt={get:At(!1,!1)},jt={get:At(!1,!0)},Nt={get:At(!0,!1)},Pt={get:At(!0,!0)},Vt=new WeakMap,Wt=new WeakMap,Ct=new WeakMap,Mt=new WeakMap;function zt(t){return Bt(t)?t:Ut(t,!1,lt,Lt,Vt)}function Gt(t){return Ut(t,!1,ft,jt,Wt)}function Kt(t){return Ut(t,!0,ht,Nt,Ct)}function Ht(t){return Ut(t,!0,pt,Pt,Mt)}function Ut(t,e,s,n,i){if(!u(t))return t;if(t.__v_raw&&(!e||!t.__v_isReactive))return t;const r=i.get(t);if(r)return r;const o=(c=t).__v_skip||!Object.isExtensible(c)?0:function(t){switch(t){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}(h(c));var c;if(0===o)return t;const a=new Proxy(t,2===o?n:s);return i.set(t,a),a}function Yt(t){return Bt(t)?Yt(t.__v_raw):!(!t||!t.__v_isReactive)}function Bt(t){return!(!t||!t.__v_isReadonly)}function Ft(t){return!(!t||!t.__v_isShallow)}function qt(t){return!!t&&!!t.__v_raw}function Jt(t){const e=t&&t.__v_raw;return e?Jt(e):t}function Qt(t){return Object.isExtensible(t)&&((t,e,s)=>{Object.defineProperty(t,e,{configurable:!0,enumerable:!1,value:s})})(t,"__v_skip",!0),t}const Xt=t=>u(t)?zt(t):t,Zt=t=>u(t)?Kt(t):t;function $t(t){return!!t&&!0===t.__v_isRef}function te(t){return se(t,!1)}function ee(t){return se(t,!0)}function se(t,e){return $t(t)?t:new ne(t,e)}class ne{constructor(t,e){this.__v_isShallow=e,this.dep=new K,this.__v_isRef=!0,this._rawValue=e?t:Jt(t),this._value=e?t:Xt(t)}get value(){return this.dep.track(),this._value}set value(t){const e=this._rawValue,s=this.__v_isShallow||Ft(t)||Bt(t);t=s?t:Jt(t),p(t,e)&&(this._rawValue=t,this._value=s?t:Xt(t),this.dep.trigger())}}function ie(t){t.dep.trigger()}function re(t){return $t(t)?t.value:t}function oe(t){return o(t)?t():re(t)}const ce={get:(t,e,s)=>re(Reflect.get(t,e,s)),set:(t,e,s,n)=>{const i=t[e];return $t(i)&&!$t(s)?(i.value=s,!0):Reflect.set(t,e,s,n)}};function ue(t){return Yt(t)?t:new Proxy(t,ce)}class ae{constructor(t){this.__v_isRef=!0;const e=this.dep=new K,{get:s,set:n}=t(e.track.bind(e),e.trigger.bind(e));this._get=s,this._set=n}get value(){return this._get()}set value(t){this._set(t)}}function le(t){return new ae(t)}function he(t){const e=i(t)?new Array(t.length):{};for(const s in t)e[s]=ve(t,s);return e}class fe{constructor(t,e,s){this._object=t,this._key=e,this._defaultValue=s,this.__v_isRef=!0}get value(){const t=this._object[this._key];return void 0===t?this._defaultValue:t}set value(t){this._object[this._key]=t}get dep(){return t=Jt(this._object),e=this._key,null==(s=U.get(t))?void 0:s.get(e);var t,e,s}}class pe{constructor(t){this._getter=t,this.__v_isRef=!0,this.__v_isReadonly=!0}get value(){return this._getter()}}function de(t,e,s){return $t(t)?t:o(t)?new pe(t):u(t)&&arguments.length>1?ve(t,e,s):te(t)}function ve(t,e,s){const n=t[e];return $t(n)?n:new fe(t,e,s)}class _e{constructor(t,e,s){this.fn=t,this.setter=e,this._value=void 0,this.dep=new K(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=G-1,this.effect=this,this.__v_isReadonly=!e,this.isSSR=s}notify(){v!==this&&(this.flags|=16,this.dep.notify())}get value(){const t=this.dep.track();return T(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function ge(t,e,s=!1){let n,i;o(t)?n=t:(n=t.get,i=t.set);return new _e(n,i,s)}const ye={GET:"get",HAS:"has",ITERATE:"iterate"},be={SET:"set",ADD:"add",DELETE:"delete",CLEAR:"clear"},we={SKIP:"__v_skip",IS_REACTIVE:"__v_isReactive",IS_READONLY:"__v_isReadonly",IS_SHALLOW:"__v_isShallow",RAW:"__v_raw"};export{F as ARRAY_ITERATE_KEY,w as EffectFlags,_ as EffectScope,Y as ITERATE_KEY,B as MAP_KEY_ITERATE_KEY,S as ReactiveEffect,we as ReactiveFlags,ye as TrackOpTypes,be as TriggerOpTypes,ge as computed,le as customRef,L as effect,g as effectScope,W as enableTracking,y as getCurrentScope,qt as isProxy,Yt as isReactive,Bt as isReadonly,$t as isRef,Ft as isShallow,Qt as markRaw,M as onEffectCleanup,b as onScopeDispose,V as pauseTracking,ue as proxyRefs,zt as reactive,Q as reactiveReadArray,Kt as readonly,te as ref,C as resetTracking,Gt as shallowReactive,X as shallowReadArray,Ht as shallowReadonly,ee as shallowRef,j as stop,Jt as toRaw,Xt as toReactive,Zt as toReadonly,de as toRef,he as toRefs,oe as toValue,q as track,J as trigger,ie as triggerRef,re as unref};
|
|
5
|
+
**//*! #__NO_SIDE_EFFECTS__ */let e,t,i;let r=Object.assign,s=Object.prototype.hasOwnProperty,n=(e,t)=>s.call(e,t),l=Array.isArray,a=e=>"[object Map]"===p(e),o=e=>"function"==typeof e,u=e=>"string"==typeof e,c=e=>"symbol"==typeof e,h=e=>null!==e&&"object"==typeof e,f=Object.prototype.toString,p=e=>f.call(e),d=e=>p(e).slice(8,-1),_=e=>u(e)&&"NaN"!==e&&"-"!==e[0]&&""+parseInt(e,10)===e,v=(e,t)=>!Object.is(e,t),g=(e,t,i,r=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:r,value:i})};class y{constructor(t=!1){this.detached=t,this._active=!0,this.effects=[],this.cleanups=[],this.parent=e,!t&&e&&(this.index=(e.scopes||(e.scopes=[])).push(this)-1)}get active(){return this._active}run(t){if(this._active){let i=e;try{return e=this,t()}finally{e=i}}}on(){e=this}off(){e=this.parent}stop(e){if(this._active){let t,i;for(t=0,i=this.effects.length;t<i;t++)this.effects[t].stop();for(t=0,i=this.cleanups.length;t<i;t++)this.cleanups[t]();if(this.scopes)for(t=0,i=this.scopes.length;t<i;t++)this.scopes[t].stop(!0);if(!this.detached&&this.parent&&!e){let e=this.parent.scopes.pop();e&&e!==this&&(this.parent.scopes[this.index]=e,e.index=this.index)}this.parent=void 0,this._active=!1}}}function R(e){return new y(e)}function w(){return e}function b(t,i=!1){e&&e.cleanups.push(t)}let S={ACTIVE:1,1:"ACTIVE",RUNNING:2,2:"RUNNING",TRACKING:4,4:"TRACKING",NOTIFIED:8,8:"NOTIFIED",DIRTY:16,16:"DIRTY",ALLOW_RECURSE:32,32:"ALLOW_RECURSE",NO_BATCH:64,64:"NO_BATCH"};class x{constructor(t){this.fn=t,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.nextEffect=void 0,this.cleanup=void 0,this.scheduler=void 0,e&&e.active&&e.effects.push(this)}notify(){if(!(2&this.flags)||32&this.flags){if(64&this.flags)return this.trigger();8&this.flags||(this.flags|=8,this.nextEffect=i,i=this)}}run(){if(!(1&this.flags))return this.fn();this.flags|=2,M(this),k(this);let e=t,i=j;t=this,j=!0;try{return this.fn()}finally{D(this),t=e,j=i,this.flags&=-3}}stop(){if(1&this.flags){for(let e=this.deps;e;e=e.nextDep)O(e);this.deps=this.depsTail=void 0,M(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){m(this)&&this.run()}get dirty(){return m(this)}}let E=0;function T(){let e;if(E>1){E--;return}for(;i;){let t=i;for(i=void 0;t;){let i=t.nextEffect;if(t.nextEffect=void 0,t.flags&=-9,1&t.flags)try{t.trigger()}catch(t){e||(e=t)}t=i}}if(E--,e)throw e}function k(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function D(e){let t;let i=e.depsTail;for(let e=i;e;e=e.prevDep)-1===e.version?(e===i&&(i=e.prevDep),O(e),function(e){let{prevDep:t,nextDep:i}=e;t&&(t.nextDep=i,e.prevDep=void 0),i&&(i.prevDep=t,e.nextDep=void 0)}(e)):t=e,e.dep.activeLink=e.prevActiveLink,e.prevActiveLink=void 0;e.deps=t,e.depsTail=i}function m(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&!1===A(t.dep.computed)||t.dep.version!==t.version)return!0;return!!e._dirty}function A(e){if(2&e.flags)return!1;if(4&e.flags&&!(16&e.flags)||(e.flags&=-17,e.globalVersion===K))return;e.globalVersion=K;let i=e.dep;if(e.flags|=2,i.version>0&&!e.isSSR&&!m(e)){e.flags&=-3;return}let r=t,s=j;t=e,j=!0;try{k(e);let t=e.fn();(0===i.version||v(t,e._value))&&(e._value=t,i.version++)}catch(e){throw i.version++,e}finally{t=r,j=s,D(e),e.flags&=-3}}function O(e){let{dep:t,prevSub:i,nextSub:r}=e;if(i&&(i.nextSub=r,e.prevSub=void 0),r&&(r.prevSub=i,e.nextSub=void 0),t.subs===e&&(t.subs=i),!t.subs&&t.computed){t.computed.flags&=-5;for(let e=t.computed.deps;e;e=e.nextDep)O(e)}}function I(e,t){e.effect instanceof x&&(e=e.effect.fn);let i=new x(e);t&&r(i,t);try{i.run()}catch(e){throw i.stop(),e}let s=i.run.bind(i);return s.effect=i,s}function L(e){e.effect.stop()}let j=!0,N=[];function P(){N.push(j),j=!1}function V(){N.push(j),j=!0}function C(){let e=N.pop();j=void 0===e||e}function W(e,i=!1){t instanceof x&&(t.cleanup=e)}function M(e){let{cleanup:i}=e;if(e.cleanup=void 0,i){let e=t;t=void 0;try{i()}finally{t=e}}}let K=0;class Y{constructor(e){this.computed=e,this.version=0,this.activeLink=void 0,this.subs=void 0}track(e){if(!t||!j)return;let i=this.activeLink;if(void 0===i||i.sub!==t)i=this.activeLink={dep:this,sub:t,version:this.version,nextDep:void 0,prevDep:void 0,nextSub:void 0,prevSub:void 0,prevActiveLink:void 0},t.deps?(i.prevDep=t.depsTail,t.depsTail.nextDep=i,t.depsTail=i):t.deps=t.depsTail=i,4&t.flags&&function e(t){let i=t.dep.computed;if(i&&!t.dep.subs){i.flags|=20;for(let t=i.deps;t;t=t.nextDep)e(t)}let r=t.dep.subs;r!==t&&(t.prevSub=r,r&&(r.nextSub=t)),t.dep.subs=t}(i);else if(-1===i.version&&(i.version=this.version,i.nextDep)){let e=i.nextDep;e.prevDep=i.prevDep,i.prevDep&&(i.prevDep.nextDep=e),i.prevDep=t.depsTail,i.nextDep=void 0,t.depsTail.nextDep=i,t.depsTail=i,t.deps===i&&(t.deps=e)}return i}trigger(e){this.version++,K++,this.notify(e)}notify(e){E++;try{for(let e=this.subs;e;e=e.prevSub)e.sub.notify()}finally{T()}}}let z=new WeakMap,F=Symbol(""),G=Symbol(""),H=Symbol("");function U(e,i,r){if(j&&t){let t=z.get(e);t||z.set(e,t=new Map);let i=t.get(r);i||t.set(r,i=new Y),i.track()}}function B(e,t,i,r,s,n){let o=z.get(e);if(!o){K++;return}let u=[];if("clear"===t)u=[...o.values()];else{let s=l(e),n=s&&_(i);if(s&&"length"===i){let e=Number(r);o.forEach((t,i)=>{("length"===i||i===H||!c(i)&&i>=e)&&u.push(t)})}else{let r=e=>e&&u.push(e);switch(void 0!==i&&r(o.get(i)),n&&r(o.get(H)),t){case"add":s?n&&r(o.get("length")):(r(o.get(F)),a(e)&&r(o.get(G)));break;case"delete":!s&&(r(o.get(F)),a(e)&&r(o.get(G)));break;case"set":a(e)&&r(o.get(F))}}}for(let e of(E++,u))e.trigger();T()}function q(e){let t=eU(e);return t===e?t:(U(t,"iterate",H),eG(e)?t:t.map(eq))}function J(e){return U(e=eU(e),"iterate",H),e}let Q={__proto__:null,[Symbol.iterator](){return X(this,Symbol.iterator,eq)},concat(...e){return q(this).concat(...e.map(e=>q(e)))},entries(){return X(this,"entries",e=>(e[1]=eq(e[1]),e))},every(e,t){return Z(this,"every",e,t)},filter(e,t){let i=Z(this,"filter",e,t);return eH(this)&&!eG(this)?i.map(eq):i},find(e,t){let i=Z(this,"find",e,t);return eH(this)&&!eG(this)?eq(i):i},findIndex(e,t){return Z(this,"findIndex",e,t)},findLast(e,t){let i=Z(this,"findLast",e,t);return eH(this)&&!eG(this)?eq(i):i},findLastIndex(e,t){return Z(this,"findLastIndex",e,t)},forEach(e,t){return Z(this,"forEach",e,t)},includes(...e){return ee(this,"includes",e)},indexOf(...e){return ee(this,"indexOf",e)},join(e){return q(this).join(e)},lastIndexOf(...e){return ee(this,"lastIndexOf",e)},map(e,t){return Z(this,"map",e,t)},pop(){return et(this,"pop")},push(...e){return et(this,"push",e)},reduce(e,...t){return $(this,"reduce",e,t)},reduceRight(e,...t){return $(this,"reduceRight",e,t)},shift(){return et(this,"shift")},some(e,t){return Z(this,"some",e,t)},splice(...e){return et(this,"splice",e)},toReversed(){return q(this).toReversed()},toSorted(e){return q(this).toSorted(e)},toSpliced(...e){return q(this).toSpliced(...e)},unshift(...e){return et(this,"unshift",e)},values(){return X(this,"values",eq)}};function X(e,t,i){let r=J(e),s=r[t]();return r===e||eG(e)||(s._next=s.next,s.next=()=>{let e=s._next();return e.value&&(e.value=i(e.value)),e}),s}function Z(e,t,i,r){let s=J(e),n=i;return s!==e&&(eG(e)?i.length>2&&(n=function(t,r){return i.call(this,t,r,e)}):n=function(t,r){return i.call(this,eq(t),r,e)}),s[t](n,r)}function $(e,t,i,r){let s=J(e),n=i;return s!==e&&(eG(e)?i.length>3&&(n=function(t,r,s){return i.call(this,t,r,s,e)}):n=function(t,r,s){return i.call(this,t,eq(r),s,e)}),s[t](n,...r)}function ee(e,t,i){let r=eU(e);U(r,"iterate",H);let s=r[t](...i);return(-1===s||!1===s)&&eH(i[0])?(i[0]=eU(i[0]),r[t](...i)):s}function et(e,t,i=[]){P(),E++;let r=eU(e)[t].apply(e,i);return T(),C(),r}let ei=function(e,t){let i=new Set(e.split(","));return e=>i.has(e)}("__proto__,__v_isRef,__isVue"),er=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>"arguments"!==e&&"caller"!==e).map(e=>Symbol[e]).filter(c));function es(e){c(e)||(e=String(e));let t=eU(this);return U(t,"has",e),t.hasOwnProperty(e)}class en{constructor(e=!1,t=!1){this._isReadonly=e,this._isShallow=t}get(e,t,i){let r=this._isReadonly,s=this._isShallow;if("__v_isReactive"===t)return!r;if("__v_isReadonly"===t)return r;if("__v_isShallow"===t)return s;if("__v_raw"===t)return i===(r?s?eV:eP:s?eN:ej).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(i)?e:void 0;let n=l(e);if(!r){let e;if(n&&(e=Q[t]))return e;if("hasOwnProperty"===t)return es}let a=Reflect.get(e,t,eQ(e)?e:i);return(c(t)?er.has(t):ei(t))?a:(r||U(e,"get",t),s)?a:eQ(a)?n&&_(t)?a:a.value:h(a)?r?eM(a):eC(a):a}}class el extends en{constructor(e=!1){super(!1,e)}set(e,t,i,r){let s=e[t];if(!this._isShallow){let t=eF(s);if(eG(i)||eF(i)||(s=eU(s),i=eU(i)),!l(e)&&eQ(s)&&!eQ(i))return!t&&(s.value=i,!0)}let a=l(e)&&_(t)?Number(t)<e.length:n(e,t),o=Reflect.set(e,t,i,r);return e===eU(r)&&(a?v(i,s)&&B(e,"set",t,i):B(e,"add",t,i)),o}deleteProperty(e,t){let i=n(e,t);e[t];let r=Reflect.deleteProperty(e,t);return r&&i&&B(e,"delete",t,void 0),r}has(e,t){let i=Reflect.has(e,t);return c(t)&&er.has(t)||U(e,"has",t),i}ownKeys(e){return U(e,"iterate",l(e)?"length":F),Reflect.ownKeys(e)}}class ea extends en{constructor(e=!1){super(!0,e)}set(e,t){return!0}deleteProperty(e,t){return!0}}let eo=new el,eu=new ea,ec=new el(!0),eh=new ea(!0),ef=e=>e,ep=e=>Reflect.getPrototypeOf(e);function ed(e,t,i=!1,r=!1){let s=eU(e=e.__v_raw),n=eU(t);i||(v(t,n)&&U(s,"get",t),U(s,"get",n));let{has:l}=ep(s),a=r?ef:i?eJ:eq;return l.call(s,t)?a(e.get(t)):l.call(s,n)?a(e.get(n)):void(e!==s&&e.get(t))}function e_(e,t=!1){let i=this.__v_raw,r=eU(i),s=eU(e);return t||(v(e,s)&&U(r,"has",e),U(r,"has",s)),e===s?i.has(e):i.has(e)||i.has(s)}function ev(e,t=!1){return e=e.__v_raw,t||U(eU(e),"iterate",F),Reflect.get(e,"size",e)}function eg(e,t=!1){t||eG(e)||eF(e)||(e=eU(e));let i=eU(this);return ep(i).has.call(i,e)||(i.add(e),B(i,"add",e,e)),this}function ey(e,t,i=!1){i||eG(t)||eF(t)||(t=eU(t));let r=eU(this),{has:s,get:n}=ep(r),l=s.call(r,e);l||(e=eU(e),l=s.call(r,e));let a=n.call(r,e);return r.set(e,t),l?v(t,a)&&B(r,"set",e,t):B(r,"add",e,t),this}function eR(e){let t=eU(this),{has:i,get:r}=ep(t),s=i.call(t,e);s||(e=eU(e),s=i.call(t,e)),r&&r.call(t,e);let n=t.delete(e);return s&&B(t,"delete",e,void 0),n}function ew(){let e=eU(this),t=0!==e.size,i=e.clear();return t&&B(e,"clear",void 0,void 0),i}function eb(e,t){return function(i,r){let s=this,n=s.__v_raw,l=eU(n),a=t?ef:e?eJ:eq;return e||U(l,"iterate",F),n.forEach((e,t)=>i.call(r,a(e),a(t),s))}}function eS(e,t,i){return function(...r){let s=this.__v_raw,n=eU(s),l=a(n),o="entries"===e||e===Symbol.iterator&&l,u=s[e](...r),c=i?ef:t?eJ:eq;return t||U(n,"iterate","keys"===e&&l?G:F),{next(){let{value:e,done:t}=u.next();return t?{value:e,done:t}:{value:o?[c(e[0]),c(e[1])]:c(e),done:t}},[Symbol.iterator](){return this}}}}function ex(e){return function(...t){return"delete"!==e&&("clear"===e?void 0:this)}}let[eE,eT,ek,eD]=function(){let e={get(e){return ed(this,e)},get size(){return ev(this)},has:e_,add:eg,set:ey,delete:eR,clear:ew,forEach:eb(!1,!1)},t={get(e){return ed(this,e,!1,!0)},get size(){return ev(this)},has:e_,add(e){return eg.call(this,e,!0)},set(e,t){return ey.call(this,e,t,!0)},delete:eR,clear:ew,forEach:eb(!1,!0)},i={get(e){return ed(this,e,!0)},get size(){return ev(this,!0)},has(e){return e_.call(this,e,!0)},add:ex("add"),set:ex("set"),delete:ex("delete"),clear:ex("clear"),forEach:eb(!0,!1)},r={get(e){return ed(this,e,!0,!0)},get size(){return ev(this,!0)},has(e){return e_.call(this,e,!0)},add:ex("add"),set:ex("set"),delete:ex("delete"),clear:ex("clear"),forEach:eb(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach(s=>{e[s]=eS(s,!1,!1),i[s]=eS(s,!0,!1),t[s]=eS(s,!1,!0),r[s]=eS(s,!0,!0)}),[e,i,t,r]}();function em(e,t){let i=t?e?eD:ek:e?eT:eE;return(t,r,s)=>"__v_isReactive"===r?!e:"__v_isReadonly"===r?e:"__v_raw"===r?t:Reflect.get(n(i,r)&&r in t?i:t,r,s)}let eA={get:em(!1,!1)},eO={get:em(!1,!0)},eI={get:em(!0,!1)},eL={get:em(!0,!0)},ej=new WeakMap,eN=new WeakMap,eP=new WeakMap,eV=new WeakMap;function eC(e){return eF(e)?e:eY(e,!1,eo,eA,ej)}function eW(e){return eY(e,!1,ec,eO,eN)}function eM(e){return eY(e,!0,eu,eI,eP)}function eK(e){return eY(e,!0,eh,eL,eV)}function eY(e,t,i,r,s){if(!h(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;let n=s.get(e);if(n)return n;let l=e.__v_skip||!Object.isExtensible(e)?0:function(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}(d(e));if(0===l)return e;let a=new Proxy(e,2===l?r:i);return s.set(e,a),a}function ez(e){return eF(e)?ez(e.__v_raw):!!(e&&e.__v_isReactive)}function eF(e){return!!(e&&e.__v_isReadonly)}function eG(e){return!!(e&&e.__v_isShallow)}function eH(e){return!!e&&!!e.__v_raw}function eU(e){let t=e&&e.__v_raw;return t?eU(t):e}function eB(e){return Object.isExtensible(e)&&g(e,"__v_skip",!0),e}let eq=e=>h(e)?eC(e):e,eJ=e=>h(e)?eM(e):e;function eQ(e){return!!e&&!0===e.__v_isRef}function eX(e){return e$(e,!1)}function eZ(e){return e$(e,!0)}function e$(e,t){return eQ(e)?e:new e0(e,t)}class e0{constructor(e,t){this.dep=new Y,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=t?e:eU(e),this._value=t?e:eq(e),this.__v_isShallow=t}get value(){return this.dep.track(),this._value}set value(e){let t=this._rawValue,i=this.__v_isShallow||eG(e)||eF(e);v(e=i?e:eU(e),t)&&(this._rawValue=e,this._value=i?e:eq(e),this.dep.trigger())}}function e1(e){e.dep.trigger()}function e2(e){return eQ(e)?e.value:e}function e6(e){return o(e)?e():e2(e)}let e3={get:(e,t,i)=>e2(Reflect.get(e,t,i)),set:(e,t,i,r)=>{let s=e[t];return eQ(s)&&!eQ(i)?(s.value=i,!0):Reflect.set(e,t,i,r)}};function e4(e){return ez(e)?e:new Proxy(e,e3)}class e8{constructor(e){this.__v_isRef=!0;let t=this.dep=new Y,{get:i,set:r}=e(t.track.bind(t),t.trigger.bind(t));this._get=i,this._set=r}get value(){return this._get()}set value(e){this._set(e)}}function e5(e){return new e8(e)}function e7(e){let t=l(e)?Array(e.length):{};for(let i in e)t[i]=ti(e,i);return t}class e9{constructor(e,t,i){this._object=e,this._key=t,this._defaultValue=i,this.__v_isRef=!0}get value(){let e=this._object[this._key];return void 0===e?this._defaultValue:e}set value(e){this._object[this._key]=e}get dep(){var e,t,i;return e=eU(this._object),t=this._key,null==(i=z.get(e))?void 0:i.get(t)}}class te{constructor(e){this._getter=e,this.__v_isRef=!0,this.__v_isReadonly=!0}get value(){return this._getter()}}function tt(e,t,i){return eQ(e)?e:o(e)?new te(e):h(e)&&arguments.length>1?ti(e,t,i):eX(e)}function ti(e,t,i){let r=e[t];return eQ(r)?r:new e9(e,t,i)}class tr{constructor(e,t,i){this.fn=e,this.setter=t,this._value=void 0,this.dep=new Y(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=K-1,this.effect=this,this.__v_isReadonly=!t,this.isSSR=i}notify(){t!==this&&(this.flags|=16,this.dep.notify())}get value(){let e=this.dep.track();return A(this),e&&(e.version=this.dep.version),this._value}set value(e){this.setter&&this.setter(e)}}function ts(e,t,i=!1){let r,s;return o(e)?r=e:(r=e.get,s=e.set),new tr(r,s,i)}let tn={GET:"get",HAS:"has",ITERATE:"iterate"},tl={SET:"set",ADD:"add",DELETE:"delete",CLEAR:"clear"},ta={SKIP:"__v_skip",IS_REACTIVE:"__v_isReactive",IS_READONLY:"__v_isReadonly",IS_SHALLOW:"__v_isShallow",RAW:"__v_raw",IS_REF:"__v_isRef"};export{H as ARRAY_ITERATE_KEY,S as EffectFlags,y as EffectScope,F as ITERATE_KEY,G as MAP_KEY_ITERATE_KEY,x as ReactiveEffect,ta as ReactiveFlags,tn as TrackOpTypes,tl as TriggerOpTypes,ts as computed,e5 as customRef,I as effect,R as effectScope,V as enableTracking,w as getCurrentScope,eH as isProxy,ez as isReactive,eF as isReadonly,eQ as isRef,eG as isShallow,eB as markRaw,W as onEffectCleanup,b as onScopeDispose,P as pauseTracking,e4 as proxyRefs,eC as reactive,q as reactiveReadArray,eM as readonly,eX as ref,C as resetTracking,eW as shallowReactive,J as shallowReadArray,eK as shallowReadonly,eZ as shallowRef,L as stop,eU as toRaw,eq as toReactive,eJ as toReadonly,tt as toRef,e7 as toRefs,e6 as toValue,U as track,B as trigger,e1 as triggerRef,e2 as unref};
|