@vue/reactivity 3.4.14 → 3.4.16
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 +41 -34
- package/dist/reactivity.cjs.prod.js +39 -32
- package/dist/reactivity.esm-browser.js +41 -34
- package/dist/reactivity.esm-browser.prod.js +2 -2
- package/dist/reactivity.esm-bundler.js +41 -34
- package/dist/reactivity.global.js +41 -34
- package/dist/reactivity.global.prod.js +2 -2
- package/package.json +2 -2
package/dist/reactivity.cjs.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/reactivity v3.4.
|
|
2
|
+
* @vue/reactivity v3.4.16
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -124,7 +124,7 @@ class ReactiveEffect {
|
|
|
124
124
|
/**
|
|
125
125
|
* @internal
|
|
126
126
|
*/
|
|
127
|
-
this._dirtyLevel =
|
|
127
|
+
this._dirtyLevel = 4;
|
|
128
128
|
/**
|
|
129
129
|
* @internal
|
|
130
130
|
*/
|
|
@@ -144,26 +144,27 @@ class ReactiveEffect {
|
|
|
144
144
|
recordEffectScope(this, scope);
|
|
145
145
|
}
|
|
146
146
|
get dirty() {
|
|
147
|
-
if (this._dirtyLevel ===
|
|
147
|
+
if (this._dirtyLevel === 2 || this._dirtyLevel === 3) {
|
|
148
|
+
this._dirtyLevel = 1;
|
|
148
149
|
pauseTracking();
|
|
149
150
|
for (let i = 0; i < this._depsLength; i++) {
|
|
150
151
|
const dep = this.deps[i];
|
|
151
152
|
if (dep.computed) {
|
|
152
153
|
triggerComputed(dep.computed);
|
|
153
|
-
if (this._dirtyLevel >=
|
|
154
|
+
if (this._dirtyLevel >= 4) {
|
|
154
155
|
break;
|
|
155
156
|
}
|
|
156
157
|
}
|
|
157
158
|
}
|
|
158
|
-
if (this._dirtyLevel
|
|
159
|
+
if (this._dirtyLevel === 1) {
|
|
159
160
|
this._dirtyLevel = 0;
|
|
160
161
|
}
|
|
161
162
|
resetTracking();
|
|
162
163
|
}
|
|
163
|
-
return this._dirtyLevel >=
|
|
164
|
+
return this._dirtyLevel >= 4;
|
|
164
165
|
}
|
|
165
166
|
set dirty(v) {
|
|
166
|
-
this._dirtyLevel = v ?
|
|
167
|
+
this._dirtyLevel = v ? 4 : 0;
|
|
167
168
|
}
|
|
168
169
|
run() {
|
|
169
170
|
this._dirtyLevel = 0;
|
|
@@ -203,7 +204,7 @@ function preCleanupEffect(effect2) {
|
|
|
203
204
|
effect2._depsLength = 0;
|
|
204
205
|
}
|
|
205
206
|
function postCleanupEffect(effect2) {
|
|
206
|
-
if (effect2.deps
|
|
207
|
+
if (effect2.deps.length > effect2._depsLength) {
|
|
207
208
|
for (let i = effect2._depsLength; i < effect2.deps.length; i++) {
|
|
208
209
|
cleanupDepEffect(effect2.deps[i], effect2);
|
|
209
210
|
}
|
|
@@ -290,24 +291,23 @@ function triggerEffects(dep, dirtyLevel, debuggerEventExtraInfo) {
|
|
|
290
291
|
var _a;
|
|
291
292
|
pauseScheduling();
|
|
292
293
|
for (const effect2 of dep.keys()) {
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
if (effect2._dirtyLevel < dirtyLevel && !(effect2._runnings && !effect2.allowRecurse)) {
|
|
297
|
-
const lastDirtyLevel = effect2._dirtyLevel;
|
|
294
|
+
let tracking;
|
|
295
|
+
if (effect2._dirtyLevel < dirtyLevel && (tracking != null ? tracking : tracking = dep.get(effect2) === effect2._trackId)) {
|
|
296
|
+
effect2._shouldSchedule || (effect2._shouldSchedule = effect2._dirtyLevel === 0);
|
|
298
297
|
effect2._dirtyLevel = dirtyLevel;
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
298
|
+
}
|
|
299
|
+
if (effect2._shouldSchedule && (tracking != null ? tracking : tracking = dep.get(effect2) === effect2._trackId)) {
|
|
300
|
+
{
|
|
301
|
+
(_a = effect2.onTrigger) == null ? void 0 : _a.call(effect2, shared.extend({ effect: effect2 }, debuggerEventExtraInfo));
|
|
302
|
+
}
|
|
303
|
+
effect2.trigger();
|
|
304
|
+
if ((!effect2._runnings || effect2.allowRecurse) && effect2._dirtyLevel !== 2) {
|
|
305
|
+
effect2._shouldSchedule = false;
|
|
306
|
+
if (effect2.scheduler) {
|
|
307
|
+
queueEffectSchedulers.push(effect2.scheduler);
|
|
303
308
|
}
|
|
304
|
-
effect2.trigger();
|
|
305
309
|
}
|
|
306
310
|
}
|
|
307
|
-
if (effect2.scheduler && effect2._shouldSchedule && (!effect2._runnings || effect2.allowRecurse)) {
|
|
308
|
-
effect2._shouldSchedule = false;
|
|
309
|
-
queueEffectSchedulers.push(effect2.scheduler);
|
|
310
|
-
}
|
|
311
311
|
}
|
|
312
312
|
resetScheduling();
|
|
313
313
|
}
|
|
@@ -393,7 +393,7 @@ function trigger(target, type, key, newValue, oldValue, oldTarget) {
|
|
|
393
393
|
if (dep) {
|
|
394
394
|
triggerEffects(
|
|
395
395
|
dep,
|
|
396
|
-
|
|
396
|
+
4,
|
|
397
397
|
{
|
|
398
398
|
target,
|
|
399
399
|
type,
|
|
@@ -978,7 +978,9 @@ function toRaw(observed) {
|
|
|
978
978
|
return raw ? toRaw(raw) : observed;
|
|
979
979
|
}
|
|
980
980
|
function markRaw(value) {
|
|
981
|
-
|
|
981
|
+
if (Object.isExtensible(value)) {
|
|
982
|
+
shared.def(value, "__v_skip", true);
|
|
983
|
+
}
|
|
982
984
|
return value;
|
|
983
985
|
}
|
|
984
986
|
const toReactive = (value) => shared.isObject(value) ? reactive(value) : value;
|
|
@@ -992,7 +994,10 @@ class ComputedRefImpl {
|
|
|
992
994
|
this["__v_isReadonly"] = false;
|
|
993
995
|
this.effect = new ReactiveEffect(
|
|
994
996
|
() => getter(this._value),
|
|
995
|
-
() => triggerRefValue(
|
|
997
|
+
() => triggerRefValue(
|
|
998
|
+
this,
|
|
999
|
+
this.effect._dirtyLevel === 2 ? 2 : 3
|
|
1000
|
+
)
|
|
996
1001
|
);
|
|
997
1002
|
this.effect.computed = this;
|
|
998
1003
|
this.effect.active = this._cacheable = !isSSR;
|
|
@@ -1000,12 +1005,13 @@ class ComputedRefImpl {
|
|
|
1000
1005
|
}
|
|
1001
1006
|
get value() {
|
|
1002
1007
|
const self = toRaw(this);
|
|
1003
|
-
if (!self._cacheable || self.effect.dirty) {
|
|
1004
|
-
|
|
1005
|
-
triggerRefValue(self, 2);
|
|
1006
|
-
}
|
|
1008
|
+
if ((!self._cacheable || self.effect.dirty) && shared.hasChanged(self._value, self._value = self.effect.run())) {
|
|
1009
|
+
triggerRefValue(self, 4);
|
|
1007
1010
|
}
|
|
1008
1011
|
trackRefValue(self);
|
|
1012
|
+
if (self.effect._dirtyLevel >= 2) {
|
|
1013
|
+
triggerRefValue(self, 2);
|
|
1014
|
+
}
|
|
1009
1015
|
return self._value;
|
|
1010
1016
|
}
|
|
1011
1017
|
set value(newValue) {
|
|
@@ -1042,14 +1048,15 @@ function computed(getterOrOptions, debugOptions, isSSR = false) {
|
|
|
1042
1048
|
}
|
|
1043
1049
|
|
|
1044
1050
|
function trackRefValue(ref2) {
|
|
1051
|
+
var _a;
|
|
1045
1052
|
if (shouldTrack && activeEffect) {
|
|
1046
1053
|
ref2 = toRaw(ref2);
|
|
1047
1054
|
trackEffect(
|
|
1048
1055
|
activeEffect,
|
|
1049
|
-
ref2.dep
|
|
1056
|
+
(_a = ref2.dep) != null ? _a : ref2.dep = createDep(
|
|
1050
1057
|
() => ref2.dep = void 0,
|
|
1051
1058
|
ref2 instanceof ComputedRefImpl ? ref2 : void 0
|
|
1052
|
-
)
|
|
1059
|
+
),
|
|
1053
1060
|
{
|
|
1054
1061
|
target: ref2,
|
|
1055
1062
|
type: "get",
|
|
@@ -1058,7 +1065,7 @@ function trackRefValue(ref2) {
|
|
|
1058
1065
|
);
|
|
1059
1066
|
}
|
|
1060
1067
|
}
|
|
1061
|
-
function triggerRefValue(ref2, dirtyLevel =
|
|
1068
|
+
function triggerRefValue(ref2, dirtyLevel = 4, newVal) {
|
|
1062
1069
|
ref2 = toRaw(ref2);
|
|
1063
1070
|
const dep = ref2.dep;
|
|
1064
1071
|
if (dep) {
|
|
@@ -1107,12 +1114,12 @@ class RefImpl {
|
|
|
1107
1114
|
if (shared.hasChanged(newVal, this._rawValue)) {
|
|
1108
1115
|
this._rawValue = newVal;
|
|
1109
1116
|
this._value = useDirectValue ? newVal : toReactive(newVal);
|
|
1110
|
-
triggerRefValue(this,
|
|
1117
|
+
triggerRefValue(this, 4, newVal);
|
|
1111
1118
|
}
|
|
1112
1119
|
}
|
|
1113
1120
|
}
|
|
1114
1121
|
function triggerRef(ref2) {
|
|
1115
|
-
triggerRefValue(ref2,
|
|
1122
|
+
triggerRefValue(ref2, 4, ref2.value );
|
|
1116
1123
|
}
|
|
1117
1124
|
function unref(ref2) {
|
|
1118
1125
|
return isRef(ref2) ? ref2.value : ref2;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/reactivity v3.4.
|
|
2
|
+
* @vue/reactivity v3.4.16
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -114,7 +114,7 @@ class ReactiveEffect {
|
|
|
114
114
|
/**
|
|
115
115
|
* @internal
|
|
116
116
|
*/
|
|
117
|
-
this._dirtyLevel =
|
|
117
|
+
this._dirtyLevel = 4;
|
|
118
118
|
/**
|
|
119
119
|
* @internal
|
|
120
120
|
*/
|
|
@@ -134,26 +134,27 @@ class ReactiveEffect {
|
|
|
134
134
|
recordEffectScope(this, scope);
|
|
135
135
|
}
|
|
136
136
|
get dirty() {
|
|
137
|
-
if (this._dirtyLevel ===
|
|
137
|
+
if (this._dirtyLevel === 2 || this._dirtyLevel === 3) {
|
|
138
|
+
this._dirtyLevel = 1;
|
|
138
139
|
pauseTracking();
|
|
139
140
|
for (let i = 0; i < this._depsLength; i++) {
|
|
140
141
|
const dep = this.deps[i];
|
|
141
142
|
if (dep.computed) {
|
|
142
143
|
triggerComputed(dep.computed);
|
|
143
|
-
if (this._dirtyLevel >=
|
|
144
|
+
if (this._dirtyLevel >= 4) {
|
|
144
145
|
break;
|
|
145
146
|
}
|
|
146
147
|
}
|
|
147
148
|
}
|
|
148
|
-
if (this._dirtyLevel
|
|
149
|
+
if (this._dirtyLevel === 1) {
|
|
149
150
|
this._dirtyLevel = 0;
|
|
150
151
|
}
|
|
151
152
|
resetTracking();
|
|
152
153
|
}
|
|
153
|
-
return this._dirtyLevel >=
|
|
154
|
+
return this._dirtyLevel >= 4;
|
|
154
155
|
}
|
|
155
156
|
set dirty(v) {
|
|
156
|
-
this._dirtyLevel = v ?
|
|
157
|
+
this._dirtyLevel = v ? 4 : 0;
|
|
157
158
|
}
|
|
158
159
|
run() {
|
|
159
160
|
this._dirtyLevel = 0;
|
|
@@ -193,7 +194,7 @@ function preCleanupEffect(effect2) {
|
|
|
193
194
|
effect2._depsLength = 0;
|
|
194
195
|
}
|
|
195
196
|
function postCleanupEffect(effect2) {
|
|
196
|
-
if (effect2.deps
|
|
197
|
+
if (effect2.deps.length > effect2._depsLength) {
|
|
197
198
|
for (let i = effect2._depsLength; i < effect2.deps.length; i++) {
|
|
198
199
|
cleanupDepEffect(effect2.deps[i], effect2);
|
|
199
200
|
}
|
|
@@ -275,20 +276,19 @@ const queueEffectSchedulers = [];
|
|
|
275
276
|
function triggerEffects(dep, dirtyLevel, debuggerEventExtraInfo) {
|
|
276
277
|
pauseScheduling();
|
|
277
278
|
for (const effect2 of dep.keys()) {
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
if (effect2._dirtyLevel < dirtyLevel && !(effect2._runnings && !effect2.allowRecurse)) {
|
|
282
|
-
const lastDirtyLevel = effect2._dirtyLevel;
|
|
279
|
+
let tracking;
|
|
280
|
+
if (effect2._dirtyLevel < dirtyLevel && (tracking != null ? tracking : tracking = dep.get(effect2) === effect2._trackId)) {
|
|
281
|
+
effect2._shouldSchedule || (effect2._shouldSchedule = effect2._dirtyLevel === 0);
|
|
283
282
|
effect2._dirtyLevel = dirtyLevel;
|
|
284
|
-
if (lastDirtyLevel === 0) {
|
|
285
|
-
effect2._shouldSchedule = true;
|
|
286
|
-
effect2.trigger();
|
|
287
|
-
}
|
|
288
283
|
}
|
|
289
|
-
if (effect2.
|
|
290
|
-
effect2.
|
|
291
|
-
|
|
284
|
+
if (effect2._shouldSchedule && (tracking != null ? tracking : tracking = dep.get(effect2) === effect2._trackId)) {
|
|
285
|
+
effect2.trigger();
|
|
286
|
+
if ((!effect2._runnings || effect2.allowRecurse) && effect2._dirtyLevel !== 2) {
|
|
287
|
+
effect2._shouldSchedule = false;
|
|
288
|
+
if (effect2.scheduler) {
|
|
289
|
+
queueEffectSchedulers.push(effect2.scheduler);
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
292
|
}
|
|
293
293
|
}
|
|
294
294
|
resetScheduling();
|
|
@@ -369,7 +369,7 @@ function trigger(target, type, key, newValue, oldValue, oldTarget) {
|
|
|
369
369
|
if (dep) {
|
|
370
370
|
triggerEffects(
|
|
371
371
|
dep,
|
|
372
|
-
|
|
372
|
+
4);
|
|
373
373
|
}
|
|
374
374
|
}
|
|
375
375
|
resetScheduling();
|
|
@@ -909,7 +909,9 @@ function toRaw(observed) {
|
|
|
909
909
|
return raw ? toRaw(raw) : observed;
|
|
910
910
|
}
|
|
911
911
|
function markRaw(value) {
|
|
912
|
-
|
|
912
|
+
if (Object.isExtensible(value)) {
|
|
913
|
+
shared.def(value, "__v_skip", true);
|
|
914
|
+
}
|
|
913
915
|
return value;
|
|
914
916
|
}
|
|
915
917
|
const toReactive = (value) => shared.isObject(value) ? reactive(value) : value;
|
|
@@ -923,7 +925,10 @@ class ComputedRefImpl {
|
|
|
923
925
|
this["__v_isReadonly"] = false;
|
|
924
926
|
this.effect = new ReactiveEffect(
|
|
925
927
|
() => getter(this._value),
|
|
926
|
-
() => triggerRefValue(
|
|
928
|
+
() => triggerRefValue(
|
|
929
|
+
this,
|
|
930
|
+
this.effect._dirtyLevel === 2 ? 2 : 3
|
|
931
|
+
)
|
|
927
932
|
);
|
|
928
933
|
this.effect.computed = this;
|
|
929
934
|
this.effect.active = this._cacheable = !isSSR;
|
|
@@ -931,12 +936,13 @@ class ComputedRefImpl {
|
|
|
931
936
|
}
|
|
932
937
|
get value() {
|
|
933
938
|
const self = toRaw(this);
|
|
934
|
-
if (!self._cacheable || self.effect.dirty) {
|
|
935
|
-
|
|
936
|
-
triggerRefValue(self, 2);
|
|
937
|
-
}
|
|
939
|
+
if ((!self._cacheable || self.effect.dirty) && shared.hasChanged(self._value, self._value = self.effect.run())) {
|
|
940
|
+
triggerRefValue(self, 4);
|
|
938
941
|
}
|
|
939
942
|
trackRefValue(self);
|
|
943
|
+
if (self.effect._dirtyLevel >= 2) {
|
|
944
|
+
triggerRefValue(self, 2);
|
|
945
|
+
}
|
|
940
946
|
return self._value;
|
|
941
947
|
}
|
|
942
948
|
set value(newValue) {
|
|
@@ -967,17 +973,18 @@ function computed(getterOrOptions, debugOptions, isSSR = false) {
|
|
|
967
973
|
}
|
|
968
974
|
|
|
969
975
|
function trackRefValue(ref2) {
|
|
976
|
+
var _a;
|
|
970
977
|
if (shouldTrack && activeEffect) {
|
|
971
978
|
ref2 = toRaw(ref2);
|
|
972
979
|
trackEffect(
|
|
973
980
|
activeEffect,
|
|
974
|
-
ref2.dep
|
|
981
|
+
(_a = ref2.dep) != null ? _a : ref2.dep = createDep(
|
|
975
982
|
() => ref2.dep = void 0,
|
|
976
983
|
ref2 instanceof ComputedRefImpl ? ref2 : void 0
|
|
977
|
-
))
|
|
984
|
+
));
|
|
978
985
|
}
|
|
979
986
|
}
|
|
980
|
-
function triggerRefValue(ref2, dirtyLevel =
|
|
987
|
+
function triggerRefValue(ref2, dirtyLevel = 4, newVal) {
|
|
981
988
|
ref2 = toRaw(ref2);
|
|
982
989
|
const dep = ref2.dep;
|
|
983
990
|
if (dep) {
|
|
@@ -1019,12 +1026,12 @@ class RefImpl {
|
|
|
1019
1026
|
if (shared.hasChanged(newVal, this._rawValue)) {
|
|
1020
1027
|
this._rawValue = newVal;
|
|
1021
1028
|
this._value = useDirectValue ? newVal : toReactive(newVal);
|
|
1022
|
-
triggerRefValue(this,
|
|
1029
|
+
triggerRefValue(this, 4);
|
|
1023
1030
|
}
|
|
1024
1031
|
}
|
|
1025
1032
|
}
|
|
1026
1033
|
function triggerRef(ref2) {
|
|
1027
|
-
triggerRefValue(ref2,
|
|
1034
|
+
triggerRefValue(ref2, 4);
|
|
1028
1035
|
}
|
|
1029
1036
|
function unref(ref2) {
|
|
1030
1037
|
return isRef(ref2) ? ref2.value : ref2;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/reactivity v3.4.
|
|
2
|
+
* @vue/reactivity v3.4.16
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -159,7 +159,7 @@ class ReactiveEffect {
|
|
|
159
159
|
/**
|
|
160
160
|
* @internal
|
|
161
161
|
*/
|
|
162
|
-
this._dirtyLevel =
|
|
162
|
+
this._dirtyLevel = 4;
|
|
163
163
|
/**
|
|
164
164
|
* @internal
|
|
165
165
|
*/
|
|
@@ -179,26 +179,27 @@ class ReactiveEffect {
|
|
|
179
179
|
recordEffectScope(this, scope);
|
|
180
180
|
}
|
|
181
181
|
get dirty() {
|
|
182
|
-
if (this._dirtyLevel ===
|
|
182
|
+
if (this._dirtyLevel === 2 || this._dirtyLevel === 3) {
|
|
183
|
+
this._dirtyLevel = 1;
|
|
183
184
|
pauseTracking();
|
|
184
185
|
for (let i = 0; i < this._depsLength; i++) {
|
|
185
186
|
const dep = this.deps[i];
|
|
186
187
|
if (dep.computed) {
|
|
187
188
|
triggerComputed(dep.computed);
|
|
188
|
-
if (this._dirtyLevel >=
|
|
189
|
+
if (this._dirtyLevel >= 4) {
|
|
189
190
|
break;
|
|
190
191
|
}
|
|
191
192
|
}
|
|
192
193
|
}
|
|
193
|
-
if (this._dirtyLevel
|
|
194
|
+
if (this._dirtyLevel === 1) {
|
|
194
195
|
this._dirtyLevel = 0;
|
|
195
196
|
}
|
|
196
197
|
resetTracking();
|
|
197
198
|
}
|
|
198
|
-
return this._dirtyLevel >=
|
|
199
|
+
return this._dirtyLevel >= 4;
|
|
199
200
|
}
|
|
200
201
|
set dirty(v) {
|
|
201
|
-
this._dirtyLevel = v ?
|
|
202
|
+
this._dirtyLevel = v ? 4 : 0;
|
|
202
203
|
}
|
|
203
204
|
run() {
|
|
204
205
|
this._dirtyLevel = 0;
|
|
@@ -238,7 +239,7 @@ function preCleanupEffect(effect2) {
|
|
|
238
239
|
effect2._depsLength = 0;
|
|
239
240
|
}
|
|
240
241
|
function postCleanupEffect(effect2) {
|
|
241
|
-
if (effect2.deps
|
|
242
|
+
if (effect2.deps.length > effect2._depsLength) {
|
|
242
243
|
for (let i = effect2._depsLength; i < effect2.deps.length; i++) {
|
|
243
244
|
cleanupDepEffect(effect2.deps[i], effect2);
|
|
244
245
|
}
|
|
@@ -325,24 +326,23 @@ function triggerEffects(dep, dirtyLevel, debuggerEventExtraInfo) {
|
|
|
325
326
|
var _a;
|
|
326
327
|
pauseScheduling();
|
|
327
328
|
for (const effect2 of dep.keys()) {
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
if (effect2._dirtyLevel < dirtyLevel && !(effect2._runnings && !effect2.allowRecurse)) {
|
|
332
|
-
const lastDirtyLevel = effect2._dirtyLevel;
|
|
329
|
+
let tracking;
|
|
330
|
+
if (effect2._dirtyLevel < dirtyLevel && (tracking != null ? tracking : tracking = dep.get(effect2) === effect2._trackId)) {
|
|
331
|
+
effect2._shouldSchedule || (effect2._shouldSchedule = effect2._dirtyLevel === 0);
|
|
333
332
|
effect2._dirtyLevel = dirtyLevel;
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
333
|
+
}
|
|
334
|
+
if (effect2._shouldSchedule && (tracking != null ? tracking : tracking = dep.get(effect2) === effect2._trackId)) {
|
|
335
|
+
{
|
|
336
|
+
(_a = effect2.onTrigger) == null ? void 0 : _a.call(effect2, extend({ effect: effect2 }, debuggerEventExtraInfo));
|
|
337
|
+
}
|
|
338
|
+
effect2.trigger();
|
|
339
|
+
if ((!effect2._runnings || effect2.allowRecurse) && effect2._dirtyLevel !== 2) {
|
|
340
|
+
effect2._shouldSchedule = false;
|
|
341
|
+
if (effect2.scheduler) {
|
|
342
|
+
queueEffectSchedulers.push(effect2.scheduler);
|
|
338
343
|
}
|
|
339
|
-
effect2.trigger();
|
|
340
344
|
}
|
|
341
345
|
}
|
|
342
|
-
if (effect2.scheduler && effect2._shouldSchedule && (!effect2._runnings || effect2.allowRecurse)) {
|
|
343
|
-
effect2._shouldSchedule = false;
|
|
344
|
-
queueEffectSchedulers.push(effect2.scheduler);
|
|
345
|
-
}
|
|
346
346
|
}
|
|
347
347
|
resetScheduling();
|
|
348
348
|
}
|
|
@@ -428,7 +428,7 @@ function trigger(target, type, key, newValue, oldValue, oldTarget) {
|
|
|
428
428
|
if (dep) {
|
|
429
429
|
triggerEffects(
|
|
430
430
|
dep,
|
|
431
|
-
|
|
431
|
+
4,
|
|
432
432
|
{
|
|
433
433
|
target,
|
|
434
434
|
type,
|
|
@@ -1013,7 +1013,9 @@ function toRaw(observed) {
|
|
|
1013
1013
|
return raw ? toRaw(raw) : observed;
|
|
1014
1014
|
}
|
|
1015
1015
|
function markRaw(value) {
|
|
1016
|
-
|
|
1016
|
+
if (Object.isExtensible(value)) {
|
|
1017
|
+
def(value, "__v_skip", true);
|
|
1018
|
+
}
|
|
1017
1019
|
return value;
|
|
1018
1020
|
}
|
|
1019
1021
|
const toReactive = (value) => isObject(value) ? reactive(value) : value;
|
|
@@ -1027,7 +1029,10 @@ class ComputedRefImpl {
|
|
|
1027
1029
|
this["__v_isReadonly"] = false;
|
|
1028
1030
|
this.effect = new ReactiveEffect(
|
|
1029
1031
|
() => getter(this._value),
|
|
1030
|
-
() => triggerRefValue(
|
|
1032
|
+
() => triggerRefValue(
|
|
1033
|
+
this,
|
|
1034
|
+
this.effect._dirtyLevel === 2 ? 2 : 3
|
|
1035
|
+
)
|
|
1031
1036
|
);
|
|
1032
1037
|
this.effect.computed = this;
|
|
1033
1038
|
this.effect.active = this._cacheable = !isSSR;
|
|
@@ -1035,12 +1040,13 @@ class ComputedRefImpl {
|
|
|
1035
1040
|
}
|
|
1036
1041
|
get value() {
|
|
1037
1042
|
const self = toRaw(this);
|
|
1038
|
-
if (!self._cacheable || self.effect.dirty) {
|
|
1039
|
-
|
|
1040
|
-
triggerRefValue(self, 2);
|
|
1041
|
-
}
|
|
1043
|
+
if ((!self._cacheable || self.effect.dirty) && hasChanged(self._value, self._value = self.effect.run())) {
|
|
1044
|
+
triggerRefValue(self, 4);
|
|
1042
1045
|
}
|
|
1043
1046
|
trackRefValue(self);
|
|
1047
|
+
if (self.effect._dirtyLevel >= 2) {
|
|
1048
|
+
triggerRefValue(self, 2);
|
|
1049
|
+
}
|
|
1044
1050
|
return self._value;
|
|
1045
1051
|
}
|
|
1046
1052
|
set value(newValue) {
|
|
@@ -1077,14 +1083,15 @@ function computed(getterOrOptions, debugOptions, isSSR = false) {
|
|
|
1077
1083
|
}
|
|
1078
1084
|
|
|
1079
1085
|
function trackRefValue(ref2) {
|
|
1086
|
+
var _a;
|
|
1080
1087
|
if (shouldTrack && activeEffect) {
|
|
1081
1088
|
ref2 = toRaw(ref2);
|
|
1082
1089
|
trackEffect(
|
|
1083
1090
|
activeEffect,
|
|
1084
|
-
ref2.dep
|
|
1091
|
+
(_a = ref2.dep) != null ? _a : ref2.dep = createDep(
|
|
1085
1092
|
() => ref2.dep = void 0,
|
|
1086
1093
|
ref2 instanceof ComputedRefImpl ? ref2 : void 0
|
|
1087
|
-
)
|
|
1094
|
+
),
|
|
1088
1095
|
{
|
|
1089
1096
|
target: ref2,
|
|
1090
1097
|
type: "get",
|
|
@@ -1093,7 +1100,7 @@ function trackRefValue(ref2) {
|
|
|
1093
1100
|
);
|
|
1094
1101
|
}
|
|
1095
1102
|
}
|
|
1096
|
-
function triggerRefValue(ref2, dirtyLevel =
|
|
1103
|
+
function triggerRefValue(ref2, dirtyLevel = 4, newVal) {
|
|
1097
1104
|
ref2 = toRaw(ref2);
|
|
1098
1105
|
const dep = ref2.dep;
|
|
1099
1106
|
if (dep) {
|
|
@@ -1142,12 +1149,12 @@ class RefImpl {
|
|
|
1142
1149
|
if (hasChanged(newVal, this._rawValue)) {
|
|
1143
1150
|
this._rawValue = newVal;
|
|
1144
1151
|
this._value = useDirectValue ? newVal : toReactive(newVal);
|
|
1145
|
-
triggerRefValue(this,
|
|
1152
|
+
triggerRefValue(this, 4, newVal);
|
|
1146
1153
|
}
|
|
1147
1154
|
}
|
|
1148
1155
|
}
|
|
1149
1156
|
function triggerRef(ref2) {
|
|
1150
|
-
triggerRefValue(ref2,
|
|
1157
|
+
triggerRefValue(ref2, 4, ref2.value );
|
|
1151
1158
|
}
|
|
1152
1159
|
function unref(ref2) {
|
|
1153
1160
|
return isRef(ref2) ? ref2.value : ref2;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/reactivity v3.4.
|
|
2
|
+
* @vue/reactivity v3.4.16
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
6
|
-
function t(t,e){const s=new Set(t.split(","));return e?t=>s.has(t.toLowerCase()):t=>s.has(t)}const e=()=>{},s=Object.assign,n=Object.prototype.hasOwnProperty,i=(t,e)=>n.call(t,e),r=Array.isArray,c=t=>"[object Map]"===l(t),o=t=>"function"==typeof t,u=t=>"symbol"==typeof t,a=t=>null!==t&&"object"==typeof t,h=Object.prototype.toString,l=t=>h.call(t),_=t=>l(t).slice(8,-1),f=t=>"string"==typeof t&&"NaN"!==t&&"-"!==t[0]&&""+parseInt(t,10)===t,d=(t,e)=>!Object.is(t,e);let p,v;class g{constructor(t=!1){this.detached=t,this._active=!0,this.effects=[],this.cleanups=[],this.parent=p,!t&&p&&(this.index=(p.scopes||(p.scopes=[])).push(this)-1)}get active(){return this._active}run(t){if(this._active){const e=p;try{return p=this,t()}finally{p=e}}}on(){p=this}off(){p=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 y(t){return new g(t)}function w(t,e=p){e&&e.active&&e.effects.push(t)}function R(){return p}function b(t){p&&p.cleanups.push(t)}class S{constructor(t,e,s,n){this.fn=t,this.trigger=e,this.scheduler=s,this.active=!0,this.deps=[],this._dirtyLevel=2,this._trackId=0,this._runnings=0,this._shouldSchedule=!1,this._depsLength=0,w(this,n)}get dirty(){if(1===this._dirtyLevel){A();for(let t=0;t<this._depsLength;t++){const e=this.deps[t];if(e.computed&&(k(e.computed),this._dirtyLevel>=2))break}this._dirtyLevel<2&&(this._dirtyLevel=0),W()}return this._dirtyLevel>=2}set dirty(t){this._dirtyLevel=t?2:0}run(){if(this._dirtyLevel=0,!this.active)return this.fn();let t=x,e=v;try{return x=!0,v=this,this._runnings++,L(this),this.fn()}finally{E(this),this._runnings--,v=e,x=t}}stop(){var t;this.active&&(L(this),E(this),null==(t=this.onStop)||t.call(this),this.active=!1)}}function k(t){return t.value}function L(t){t._trackId++,t._depsLength=0}function E(t){if(t.deps&&t.deps.length>t._depsLength){for(let e=t._depsLength;e<t.deps.length;e++)O(t.deps[e],t);t.deps.length=t._depsLength}}function O(t,e){const s=t.get(e);void 0!==s&&e._trackId!==s&&(t.delete(e),0===t.size&&t.cleanup())}function m(t,n){t.effect instanceof S&&(t=t.effect.fn);const i=new S(t,e,(()=>{i.dirty&&i.run()}));n&&(s(i,n),n.scope&&w(i,n.scope)),n&&n.lazy||i.run();const r=i.run.bind(i);return r.effect=i,r}function j(t){t.effect.stop()}let x=!0,I=0;const P=[];function A(){P.push(x),x=!1}function M(){P.push(x),x=!0}function W(){const t=P.pop();x=void 0===t||t}function z(){I++}function V(){for(I--;!I&&T.length;)T.shift()()}function N(t,e,s){if(e.get(t)!==t._trackId){e.set(t,t._trackId);const s=t.deps[t._depsLength];s!==e?(s&&O(s,t),t.deps[t._depsLength++]=e):t._depsLength++}}const T=[];function D(t,e,s){z();for(const n of t.keys())if(t.get(n)===n._trackId){if(n._dirtyLevel<e&&(!n._runnings||n.allowRecurse)){const t=n._dirtyLevel;n._dirtyLevel=e,0===t&&(n._shouldSchedule=!0,n.trigger())}n.scheduler&&n._shouldSchedule&&(!n._runnings||n.allowRecurse)&&(n._shouldSchedule=!1,T.push(n.scheduler))}V()}const C=(t,e)=>{const s=new Map;return s.cleanup=t,s.computed=e,s},K=new WeakMap,H=Symbol(""),G=Symbol("");function Y(t,e,s){if(x&&v){let e=K.get(t);e||K.set(t,e=new Map);let n=e.get(s);n||e.set(s,n=C((()=>e.delete(s)))),N(v,n)}}function q(t,e,s,n,i,o){const a=K.get(t);if(!a)return;let h=[];if("clear"===e)h=[...a.values()];else if("length"===s&&r(t)){const t=Number(n);a.forEach(((e,s)=>{("length"===s||!u(s)&&s>=t)&&h.push(e)}))}else switch(void 0!==s&&h.push(a.get(s)),e){case"add":r(t)?f(s)&&h.push(a.get("length")):(h.push(a.get(H)),c(t)&&h.push(a.get(G)));break;case"delete":r(t)||(h.push(a.get(H)),c(t)&&h.push(a.get(G)));break;case"set":c(t)&&h.push(a.get(H))}z();for(const r of h)r&&D(r,2);V()}const B=t("__proto__,__v_isRef,__isVue"),F=new Set(Object.getOwnPropertyNames(Symbol).filter((t=>"arguments"!==t&&"caller"!==t)).map((t=>Symbol[t])).filter(u)),J=Q();function Q(){const t={};return["includes","indexOf","lastIndexOf"].forEach((e=>{t[e]=function(...t){const s=Dt(this);for(let e=0,i=this.length;e<i;e++)Y(s,0,e+"");const n=s[e](...t);return-1===n||!1===n?s[e](...t.map(Dt)):n}})),["push","pop","shift","unshift","splice"].forEach((e=>{t[e]=function(...t){A(),z();const s=Dt(this)[e].apply(this,t);return V(),W(),s}})),t}function U(t){const e=Dt(this);return Y(e,0,t),e.hasOwnProperty(t)}class X{constructor(t=!1,e=!1){this._isReadonly=t,this._shallow=e}get(t,e,s){const n=this._isReadonly,c=this._shallow;if("__v_isReactive"===e)return!n;if("__v_isReadonly"===e)return n;if("__v_isShallow"===e)return c;if("__v_raw"===e)return s===(n?c?xt:jt:c?mt:Ot).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(s)?t:void 0;const o=r(t);if(!n){if(o&&i(J,e))return Reflect.get(J,e,s);if("hasOwnProperty"===e)return U}const h=Reflect.get(t,e,s);return(u(e)?F.has(e):B(e))?h:(n||Y(t,0,e),c?h:Ft(h)?o&&f(e)?h:h.value:a(h)?n?At(h):It(h):h)}}class Z extends X{constructor(t=!1){super(!1,t)}set(t,e,s,n){let c=t[e];if(!this._shallow){const e=Vt(c);if(Nt(s)||Vt(s)||(c=Dt(c),s=Dt(s)),!r(t)&&Ft(c)&&!Ft(s))return!e&&(c.value=s,!0)}const o=r(t)&&f(e)?Number(e)<t.length:i(t,e),u=Reflect.set(t,e,s,n);return t===Dt(n)&&(o?d(s,c)&&q(t,"set",e,s):q(t,"add",e,s)),u}deleteProperty(t,e){const s=i(t,e),n=Reflect.deleteProperty(t,e);return n&&s&&q(t,"delete",e,void 0),n}has(t,e){const s=Reflect.has(t,e);return u(e)&&F.has(e)||Y(t,0,e),s}ownKeys(t){return Y(t,0,r(t)?"length":H),Reflect.ownKeys(t)}}class $ extends X{constructor(t=!1){super(!0,t)}set(t,e){return!0}deleteProperty(t,e){return!0}}const tt=new Z,et=new $,st=new Z(!0),nt=new $(!0),it=t=>t,rt=t=>Reflect.getPrototypeOf(t);function ct(t,e,s=!1,n=!1){const i=Dt(t=t.__v_raw),r=Dt(e);s||(d(e,r)&&Y(i,0,e),Y(i,0,r));const{has:c}=rt(i),o=n?it:s?Ht:Kt;return c.call(i,e)?o(t.get(e)):c.call(i,r)?o(t.get(r)):void(t!==i&&t.get(e))}function ot(t,e=!1){const s=this.__v_raw,n=Dt(s),i=Dt(t);return e||(d(t,i)&&Y(n,0,t),Y(n,0,i)),t===i?s.has(t):s.has(t)||s.has(i)}function ut(t,e=!1){return t=t.__v_raw,!e&&Y(Dt(t),0,H),Reflect.get(t,"size",t)}function at(t){t=Dt(t);const e=Dt(this);return rt(e).has.call(e,t)||(e.add(t),q(e,"add",t,t)),this}function ht(t,e){e=Dt(e);const s=Dt(this),{has:n,get:i}=rt(s);let r=n.call(s,t);r||(t=Dt(t),r=n.call(s,t));const c=i.call(s,t);return s.set(t,e),r?d(e,c)&&q(s,"set",t,e):q(s,"add",t,e),this}function lt(t){const e=Dt(this),{has:s,get:n}=rt(e);let i=s.call(e,t);i||(t=Dt(t),i=s.call(e,t)),n&&n.call(e,t);const r=e.delete(t);return i&&q(e,"delete",t,void 0),r}function _t(){const t=Dt(this),e=0!==t.size,s=t.clear();return e&&q(t,"clear",void 0,void 0),s}function ft(t,e){return function(s,n){const i=this,r=i.__v_raw,c=Dt(r),o=e?it:t?Ht:Kt;return!t&&Y(c,0,H),r.forEach(((t,e)=>s.call(n,o(t),o(e),i)))}}function dt(t,e,s){return function(...n){const i=this.__v_raw,r=Dt(i),o=c(r),u="entries"===t||t===Symbol.iterator&&o,a="keys"===t&&o,h=i[t](...n),l=s?it:e?Ht:Kt;return!e&&Y(r,0,a?G:H),{next(){const{value:t,done:e}=h.next();return e?{value:t,done:e}:{value:u?[l(t[0]),l(t[1])]:l(t),done:e}},[Symbol.iterator](){return this}}}}function pt(t){return function(...e){return"delete"!==t&&("clear"===t?void 0:this)}}function vt(){const t={get(t){return ct(this,t)},get size(){return ut(this)},has:ot,add:at,set:ht,delete:lt,clear:_t,forEach:ft(!1,!1)},e={get(t){return ct(this,t,!1,!0)},get size(){return ut(this)},has:ot,add:at,set:ht,delete:lt,clear:_t,forEach:ft(!1,!0)},s={get(t){return ct(this,t,!0)},get size(){return ut(this,!0)},has(t){return ot.call(this,t,!0)},add:pt("add"),set:pt("set"),delete:pt("delete"),clear:pt("clear"),forEach:ft(!0,!1)},n={get(t){return ct(this,t,!0,!0)},get size(){return ut(this,!0)},has(t){return ot.call(this,t,!0)},add:pt("add"),set:pt("set"),delete:pt("delete"),clear:pt("clear"),forEach:ft(!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[gt,yt,wt,Rt]=vt();function bt(t,e){const s=e?t?Rt:wt:t?yt:gt;return(e,n,r)=>"__v_isReactive"===n?!t:"__v_isReadonly"===n?t:"__v_raw"===n?e:Reflect.get(i(s,n)&&n in e?s:e,n,r)}const St={get:bt(!1,!1)},kt={get:bt(!1,!0)},Lt={get:bt(!0,!1)},Et={get:bt(!0,!0)},Ot=new WeakMap,mt=new WeakMap,jt=new WeakMap,xt=new WeakMap;function It(t){return Vt(t)?t:Wt(t,!1,tt,St,Ot)}function Pt(t){return Wt(t,!1,st,kt,mt)}function At(t){return Wt(t,!0,et,Lt,jt)}function Mt(t){return Wt(t,!0,nt,Et,xt)}function Wt(t,e,s,n,i){if(!a(t))return t;if(t.__v_raw&&(!e||!t.__v_isReactive))return t;const r=i.get(t);if(r)return r;const c=(o=t).__v_skip||!Object.isExtensible(o)?0:function(t){switch(t){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}(_(o));var o;if(0===c)return t;const u=new Proxy(t,2===c?n:s);return i.set(t,u),u}function zt(t){return Vt(t)?zt(t.__v_raw):!(!t||!t.__v_isReactive)}function Vt(t){return!(!t||!t.__v_isReadonly)}function Nt(t){return!(!t||!t.__v_isShallow)}function Tt(t){return zt(t)||Vt(t)}function Dt(t){const e=t&&t.__v_raw;return e?Dt(e):t}function Ct(t){return((t,e,s)=>{Object.defineProperty(t,e,{configurable:!0,enumerable:!1,value:s})})(t,"__v_skip",!0),t}const Kt=t=>a(t)?It(t):t,Ht=t=>a(t)?At(t):t;class Gt{constructor(t,e,s,n){this._setter=e,this.dep=void 0,this.__v_isRef=!0,this.__v_isReadonly=!1,this.effect=new S((()=>t(this._value)),(()=>Bt(this,1))),this.effect.computed=this,this.effect.active=this._cacheable=!n,this.__v_isReadonly=s}get value(){const t=Dt(this);return t._cacheable&&!t.effect.dirty||d(t._value,t._value=t.effect.run())&&Bt(t,2),qt(t),t._value}set value(t){this._setter(t)}get _dirty(){return this.effect.dirty}set _dirty(t){this.effect.dirty=t}}function Yt(t,s,n=!1){let i,r;const c=o(t);c?(i=t,r=e):(i=t.get,r=t.set);return new Gt(i,r,c||!r,n)}function qt(t){x&&v&&(t=Dt(t),N(v,t.dep||(t.dep=C((()=>t.dep=void 0),t instanceof Gt?t:void 0))))}function Bt(t,e=2,s){const n=(t=Dt(t)).dep;n&&D(n,e)}function Ft(t){return!(!t||!0!==t.__v_isRef)}function Jt(t){return Ut(t,!1)}function Qt(t){return Ut(t,!0)}function Ut(t,e){return Ft(t)?t:new Xt(t,e)}class Xt{constructor(t,e){this.__v_isShallow=e,this.dep=void 0,this.__v_isRef=!0,this._rawValue=e?t:Dt(t),this._value=e?t:Kt(t)}get value(){return qt(this),this._value}set value(t){const e=this.__v_isShallow||Nt(t)||Vt(t);t=e?t:Dt(t),d(t,this._rawValue)&&(this._rawValue=t,this._value=e?t:Kt(t),Bt(this,2))}}function Zt(t){Bt(t,2)}function $t(t){return Ft(t)?t.value:t}function te(t){return o(t)?t():$t(t)}const ee={get:(t,e,s)=>$t(Reflect.get(t,e,s)),set:(t,e,s,n)=>{const i=t[e];return Ft(i)&&!Ft(s)?(i.value=s,!0):Reflect.set(t,e,s,n)}};function se(t){return zt(t)?t:new Proxy(t,ee)}class ne{constructor(t){this.dep=void 0,this.__v_isRef=!0;const{get:e,set:s}=t((()=>qt(this)),(()=>Bt(this)));this._get=e,this._set=s}get value(){return this._get()}set value(t){this._set(t)}}function ie(t){return new ne(t)}function re(t){const e=r(t)?new Array(t.length):{};for(const s in t)e[s]=ae(t,s);return e}class ce{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=Dt(this._object),e=this._key,null==(s=K.get(t))?void 0:s.get(e);var t,e,s}}class oe{constructor(t){this._getter=t,this.__v_isRef=!0,this.__v_isReadonly=!0}get value(){return this._getter()}}function ue(t,e,s){return Ft(t)?t:o(t)?new oe(t):a(t)&&arguments.length>1?ae(t,e,s):Jt(t)}function ae(t,e,s){const n=t[e];return Ft(n)?n:new ce(t,e,s)}const he=Yt,le={GET:"get",HAS:"has",ITERATE:"iterate"},_e={SET:"set",ADD:"add",DELETE:"delete",CLEAR:"clear"},fe={SKIP:"__v_skip",IS_REACTIVE:"__v_isReactive",IS_READONLY:"__v_isReadonly",IS_SHALLOW:"__v_isShallow",RAW:"__v_raw"};export{g as EffectScope,H as ITERATE_KEY,S as ReactiveEffect,fe as ReactiveFlags,le as TrackOpTypes,_e as TriggerOpTypes,Yt as computed,ie as customRef,he as deferredComputed,m as effect,y as effectScope,M as enableTracking,R as getCurrentScope,Tt as isProxy,zt as isReactive,Vt as isReadonly,Ft as isRef,Nt as isShallow,Ct as markRaw,b as onScopeDispose,z as pauseScheduling,A as pauseTracking,se as proxyRefs,It as reactive,At as readonly,Jt as ref,V as resetScheduling,W as resetTracking,Pt as shallowReactive,Mt as shallowReadonly,Qt as shallowRef,j as stop,Dt as toRaw,ue as toRef,re as toRefs,te as toValue,Y as track,q as trigger,Zt as triggerRef,$t as unref};
|
|
6
|
+
function t(t,e){const s=new Set(t.split(","));return e?t=>s.has(t.toLowerCase()):t=>s.has(t)}const e=()=>{},s=Object.assign,n=Object.prototype.hasOwnProperty,i=(t,e)=>n.call(t,e),r=Array.isArray,c=t=>"[object Map]"===a(t),o=t=>"function"==typeof t,u=t=>"symbol"==typeof t,l=t=>null!==t&&"object"==typeof t,h=Object.prototype.toString,a=t=>h.call(t),_=t=>a(t).slice(8,-1),f=t=>"string"==typeof t&&"NaN"!==t&&"-"!==t[0]&&""+parseInt(t,10)===t,d=(t,e)=>!Object.is(t,e);let p,v;class g{constructor(t=!1){this.detached=t,this._active=!0,this.effects=[],this.cleanups=[],this.parent=p,!t&&p&&(this.index=(p.scopes||(p.scopes=[])).push(this)-1)}get active(){return this._active}run(t){if(this._active){const e=p;try{return p=this,t()}finally{p=e}}}on(){p=this}off(){p=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 y(t){return new g(t)}function w(t,e=p){e&&e.active&&e.effects.push(t)}function R(){return p}function b(t){p&&p.cleanups.push(t)}class L{constructor(t,e,s,n){this.fn=t,this.trigger=e,this.scheduler=s,this.active=!0,this.deps=[],this._dirtyLevel=4,this._trackId=0,this._runnings=0,this._shouldSchedule=!1,this._depsLength=0,w(this,n)}get dirty(){if(2===this._dirtyLevel||3===this._dirtyLevel){this._dirtyLevel=1,A();for(let t=0;t<this._depsLength;t++){const e=this.deps[t];if(e.computed&&(S(e.computed),this._dirtyLevel>=4))break}1===this._dirtyLevel&&(this._dirtyLevel=0),W()}return this._dirtyLevel>=4}set dirty(t){this._dirtyLevel=t?4:0}run(){if(this._dirtyLevel=0,!this.active)return this.fn();let t=x,e=v;try{return x=!0,v=this,this._runnings++,k(this),this.fn()}finally{E(this),this._runnings--,v=e,x=t}}stop(){var t;this.active&&(k(this),E(this),null==(t=this.onStop)||t.call(this),this.active=!1)}}function S(t){return t.value}function k(t){t._trackId++,t._depsLength=0}function E(t){if(t.deps.length>t._depsLength){for(let e=t._depsLength;e<t.deps.length;e++)O(t.deps[e],t);t.deps.length=t._depsLength}}function O(t,e){const s=t.get(e);void 0!==s&&e._trackId!==s&&(t.delete(e),0===t.size&&t.cleanup())}function m(t,n){t.effect instanceof L&&(t=t.effect.fn);const i=new L(t,e,(()=>{i.dirty&&i.run()}));n&&(s(i,n),n.scope&&w(i,n.scope)),n&&n.lazy||i.run();const r=i.run.bind(i);return r.effect=i,r}function j(t){t.effect.stop()}let x=!0,I=0;const P=[];function A(){P.push(x),x=!1}function M(){P.push(x),x=!0}function W(){const t=P.pop();x=void 0===t||t}function z(){I++}function V(){for(I--;!I&&T.length;)T.shift()()}function N(t,e,s){if(e.get(t)!==t._trackId){e.set(t,t._trackId);const s=t.deps[t._depsLength];s!==e?(s&&O(s,t),t.deps[t._depsLength++]=e):t._depsLength++}}const T=[];function D(t,e,s){z();for(const n of t.keys()){let s;n._dirtyLevel<e&&(null!=s?s:s=t.get(n)===n._trackId)&&(n._shouldSchedule||(n._shouldSchedule=0===n._dirtyLevel),n._dirtyLevel=e),n._shouldSchedule&&(null!=s?s:s=t.get(n)===n._trackId)&&(n.trigger(),n._runnings&&!n.allowRecurse||2===n._dirtyLevel||(n._shouldSchedule=!1,n.scheduler&&T.push(n.scheduler)))}V()}const C=(t,e)=>{const s=new Map;return s.cleanup=t,s.computed=e,s},K=new WeakMap,H=Symbol(""),G=Symbol("");function Y(t,e,s){if(x&&v){let e=K.get(t);e||K.set(t,e=new Map);let n=e.get(s);n||e.set(s,n=C((()=>e.delete(s)))),N(v,n)}}function q(t,e,s,n,i,o){const l=K.get(t);if(!l)return;let h=[];if("clear"===e)h=[...l.values()];else if("length"===s&&r(t)){const t=Number(n);l.forEach(((e,s)=>{("length"===s||!u(s)&&s>=t)&&h.push(e)}))}else switch(void 0!==s&&h.push(l.get(s)),e){case"add":r(t)?f(s)&&h.push(l.get("length")):(h.push(l.get(H)),c(t)&&h.push(l.get(G)));break;case"delete":r(t)||(h.push(l.get(H)),c(t)&&h.push(l.get(G)));break;case"set":c(t)&&h.push(l.get(H))}z();for(const r of h)r&&D(r,4);V()}const B=t("__proto__,__v_isRef,__isVue"),F=new Set(Object.getOwnPropertyNames(Symbol).filter((t=>"arguments"!==t&&"caller"!==t)).map((t=>Symbol[t])).filter(u)),J=Q();function Q(){const t={};return["includes","indexOf","lastIndexOf"].forEach((e=>{t[e]=function(...t){const s=Dt(this);for(let e=0,i=this.length;e<i;e++)Y(s,0,e+"");const n=s[e](...t);return-1===n||!1===n?s[e](...t.map(Dt)):n}})),["push","pop","shift","unshift","splice"].forEach((e=>{t[e]=function(...t){A(),z();const s=Dt(this)[e].apply(this,t);return V(),W(),s}})),t}function U(t){const e=Dt(this);return Y(e,0,t),e.hasOwnProperty(t)}class X{constructor(t=!1,e=!1){this._isReadonly=t,this._shallow=e}get(t,e,s){const n=this._isReadonly,c=this._shallow;if("__v_isReactive"===e)return!n;if("__v_isReadonly"===e)return n;if("__v_isShallow"===e)return c;if("__v_raw"===e)return s===(n?c?xt:jt:c?mt:Ot).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(s)?t:void 0;const o=r(t);if(!n){if(o&&i(J,e))return Reflect.get(J,e,s);if("hasOwnProperty"===e)return U}const h=Reflect.get(t,e,s);return(u(e)?F.has(e):B(e))?h:(n||Y(t,0,e),c?h:Ft(h)?o&&f(e)?h:h.value:l(h)?n?At(h):It(h):h)}}class Z extends X{constructor(t=!1){super(!1,t)}set(t,e,s,n){let c=t[e];if(!this._shallow){const e=Vt(c);if(Nt(s)||Vt(s)||(c=Dt(c),s=Dt(s)),!r(t)&&Ft(c)&&!Ft(s))return!e&&(c.value=s,!0)}const o=r(t)&&f(e)?Number(e)<t.length:i(t,e),u=Reflect.set(t,e,s,n);return t===Dt(n)&&(o?d(s,c)&&q(t,"set",e,s):q(t,"add",e,s)),u}deleteProperty(t,e){const s=i(t,e),n=Reflect.deleteProperty(t,e);return n&&s&&q(t,"delete",e,void 0),n}has(t,e){const s=Reflect.has(t,e);return u(e)&&F.has(e)||Y(t,0,e),s}ownKeys(t){return Y(t,0,r(t)?"length":H),Reflect.ownKeys(t)}}class $ extends X{constructor(t=!1){super(!0,t)}set(t,e){return!0}deleteProperty(t,e){return!0}}const tt=new Z,et=new $,st=new Z(!0),nt=new $(!0),it=t=>t,rt=t=>Reflect.getPrototypeOf(t);function ct(t,e,s=!1,n=!1){const i=Dt(t=t.__v_raw),r=Dt(e);s||(d(e,r)&&Y(i,0,e),Y(i,0,r));const{has:c}=rt(i),o=n?it:s?Ht:Kt;return c.call(i,e)?o(t.get(e)):c.call(i,r)?o(t.get(r)):void(t!==i&&t.get(e))}function ot(t,e=!1){const s=this.__v_raw,n=Dt(s),i=Dt(t);return e||(d(t,i)&&Y(n,0,t),Y(n,0,i)),t===i?s.has(t):s.has(t)||s.has(i)}function ut(t,e=!1){return t=t.__v_raw,!e&&Y(Dt(t),0,H),Reflect.get(t,"size",t)}function lt(t){t=Dt(t);const e=Dt(this);return rt(e).has.call(e,t)||(e.add(t),q(e,"add",t,t)),this}function ht(t,e){e=Dt(e);const s=Dt(this),{has:n,get:i}=rt(s);let r=n.call(s,t);r||(t=Dt(t),r=n.call(s,t));const c=i.call(s,t);return s.set(t,e),r?d(e,c)&&q(s,"set",t,e):q(s,"add",t,e),this}function at(t){const e=Dt(this),{has:s,get:n}=rt(e);let i=s.call(e,t);i||(t=Dt(t),i=s.call(e,t)),n&&n.call(e,t);const r=e.delete(t);return i&&q(e,"delete",t,void 0),r}function _t(){const t=Dt(this),e=0!==t.size,s=t.clear();return e&&q(t,"clear",void 0,void 0),s}function ft(t,e){return function(s,n){const i=this,r=i.__v_raw,c=Dt(r),o=e?it:t?Ht:Kt;return!t&&Y(c,0,H),r.forEach(((t,e)=>s.call(n,o(t),o(e),i)))}}function dt(t,e,s){return function(...n){const i=this.__v_raw,r=Dt(i),o=c(r),u="entries"===t||t===Symbol.iterator&&o,l="keys"===t&&o,h=i[t](...n),a=s?it:e?Ht:Kt;return!e&&Y(r,0,l?G:H),{next(){const{value:t,done:e}=h.next();return e?{value:t,done:e}:{value:u?[a(t[0]),a(t[1])]:a(t),done:e}},[Symbol.iterator](){return this}}}}function pt(t){return function(...e){return"delete"!==t&&("clear"===t?void 0:this)}}function vt(){const t={get(t){return ct(this,t)},get size(){return ut(this)},has:ot,add:lt,set:ht,delete:at,clear:_t,forEach:ft(!1,!1)},e={get(t){return ct(this,t,!1,!0)},get size(){return ut(this)},has:ot,add:lt,set:ht,delete:at,clear:_t,forEach:ft(!1,!0)},s={get(t){return ct(this,t,!0)},get size(){return ut(this,!0)},has(t){return ot.call(this,t,!0)},add:pt("add"),set:pt("set"),delete:pt("delete"),clear:pt("clear"),forEach:ft(!0,!1)},n={get(t){return ct(this,t,!0,!0)},get size(){return ut(this,!0)},has(t){return ot.call(this,t,!0)},add:pt("add"),set:pt("set"),delete:pt("delete"),clear:pt("clear"),forEach:ft(!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[gt,yt,wt,Rt]=vt();function bt(t,e){const s=e?t?Rt:wt:t?yt:gt;return(e,n,r)=>"__v_isReactive"===n?!t:"__v_isReadonly"===n?t:"__v_raw"===n?e:Reflect.get(i(s,n)&&n in e?s:e,n,r)}const Lt={get:bt(!1,!1)},St={get:bt(!1,!0)},kt={get:bt(!0,!1)},Et={get:bt(!0,!0)},Ot=new WeakMap,mt=new WeakMap,jt=new WeakMap,xt=new WeakMap;function It(t){return Vt(t)?t:Wt(t,!1,tt,Lt,Ot)}function Pt(t){return Wt(t,!1,st,St,mt)}function At(t){return Wt(t,!0,et,kt,jt)}function Mt(t){return Wt(t,!0,nt,Et,xt)}function Wt(t,e,s,n,i){if(!l(t))return t;if(t.__v_raw&&(!e||!t.__v_isReactive))return t;const r=i.get(t);if(r)return r;const c=(o=t).__v_skip||!Object.isExtensible(o)?0:function(t){switch(t){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}(_(o));var o;if(0===c)return t;const u=new Proxy(t,2===c?n:s);return i.set(t,u),u}function zt(t){return Vt(t)?zt(t.__v_raw):!(!t||!t.__v_isReactive)}function Vt(t){return!(!t||!t.__v_isReadonly)}function Nt(t){return!(!t||!t.__v_isShallow)}function Tt(t){return zt(t)||Vt(t)}function Dt(t){const e=t&&t.__v_raw;return e?Dt(e):t}function Ct(t){return Object.isExtensible(t)&&((t,e,s)=>{Object.defineProperty(t,e,{configurable:!0,enumerable:!1,value:s})})(t,"__v_skip",!0),t}const Kt=t=>l(t)?It(t):t,Ht=t=>l(t)?At(t):t;class Gt{constructor(t,e,s,n){this._setter=e,this.dep=void 0,this.__v_isRef=!0,this.__v_isReadonly=!1,this.effect=new L((()=>t(this._value)),(()=>Bt(this,2===this.effect._dirtyLevel?2:3))),this.effect.computed=this,this.effect.active=this._cacheable=!n,this.__v_isReadonly=s}get value(){const t=Dt(this);return t._cacheable&&!t.effect.dirty||!d(t._value,t._value=t.effect.run())||Bt(t,4),qt(t),t.effect._dirtyLevel>=2&&Bt(t,2),t._value}set value(t){this._setter(t)}get _dirty(){return this.effect.dirty}set _dirty(t){this.effect.dirty=t}}function Yt(t,s,n=!1){let i,r;const c=o(t);c?(i=t,r=e):(i=t.get,r=t.set);return new Gt(i,r,c||!r,n)}function qt(t){var e;x&&v&&(t=Dt(t),N(v,null!=(e=t.dep)?e:t.dep=C((()=>t.dep=void 0),t instanceof Gt?t:void 0)))}function Bt(t,e=4,s){const n=(t=Dt(t)).dep;n&&D(n,e)}function Ft(t){return!(!t||!0!==t.__v_isRef)}function Jt(t){return Ut(t,!1)}function Qt(t){return Ut(t,!0)}function Ut(t,e){return Ft(t)?t:new Xt(t,e)}class Xt{constructor(t,e){this.__v_isShallow=e,this.dep=void 0,this.__v_isRef=!0,this._rawValue=e?t:Dt(t),this._value=e?t:Kt(t)}get value(){return qt(this),this._value}set value(t){const e=this.__v_isShallow||Nt(t)||Vt(t);t=e?t:Dt(t),d(t,this._rawValue)&&(this._rawValue=t,this._value=e?t:Kt(t),Bt(this,4))}}function Zt(t){Bt(t,4)}function $t(t){return Ft(t)?t.value:t}function te(t){return o(t)?t():$t(t)}const ee={get:(t,e,s)=>$t(Reflect.get(t,e,s)),set:(t,e,s,n)=>{const i=t[e];return Ft(i)&&!Ft(s)?(i.value=s,!0):Reflect.set(t,e,s,n)}};function se(t){return zt(t)?t:new Proxy(t,ee)}class ne{constructor(t){this.dep=void 0,this.__v_isRef=!0;const{get:e,set:s}=t((()=>qt(this)),(()=>Bt(this)));this._get=e,this._set=s}get value(){return this._get()}set value(t){this._set(t)}}function ie(t){return new ne(t)}function re(t){const e=r(t)?new Array(t.length):{};for(const s in t)e[s]=le(t,s);return e}class ce{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=Dt(this._object),e=this._key,null==(s=K.get(t))?void 0:s.get(e);var t,e,s}}class oe{constructor(t){this._getter=t,this.__v_isRef=!0,this.__v_isReadonly=!0}get value(){return this._getter()}}function ue(t,e,s){return Ft(t)?t:o(t)?new oe(t):l(t)&&arguments.length>1?le(t,e,s):Jt(t)}function le(t,e,s){const n=t[e];return Ft(n)?n:new ce(t,e,s)}const he=Yt,ae={GET:"get",HAS:"has",ITERATE:"iterate"},_e={SET:"set",ADD:"add",DELETE:"delete",CLEAR:"clear"},fe={SKIP:"__v_skip",IS_REACTIVE:"__v_isReactive",IS_READONLY:"__v_isReadonly",IS_SHALLOW:"__v_isShallow",RAW:"__v_raw"};export{g as EffectScope,H as ITERATE_KEY,L as ReactiveEffect,fe as ReactiveFlags,ae as TrackOpTypes,_e as TriggerOpTypes,Yt as computed,ie as customRef,he as deferredComputed,m as effect,y as effectScope,M as enableTracking,R as getCurrentScope,Tt as isProxy,zt as isReactive,Vt as isReadonly,Ft as isRef,Nt as isShallow,Ct as markRaw,b as onScopeDispose,z as pauseScheduling,A as pauseTracking,se as proxyRefs,It as reactive,At as readonly,Jt as ref,V as resetScheduling,W as resetTracking,Pt as shallowReactive,Mt as shallowReadonly,Qt as shallowRef,j as stop,Dt as toRaw,ue as toRef,re as toRefs,te as toValue,Y as track,q as trigger,Zt as triggerRef,$t as unref};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/reactivity v3.4.
|
|
2
|
+
* @vue/reactivity v3.4.16
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -120,7 +120,7 @@ class ReactiveEffect {
|
|
|
120
120
|
/**
|
|
121
121
|
* @internal
|
|
122
122
|
*/
|
|
123
|
-
this._dirtyLevel =
|
|
123
|
+
this._dirtyLevel = 4;
|
|
124
124
|
/**
|
|
125
125
|
* @internal
|
|
126
126
|
*/
|
|
@@ -140,26 +140,27 @@ class ReactiveEffect {
|
|
|
140
140
|
recordEffectScope(this, scope);
|
|
141
141
|
}
|
|
142
142
|
get dirty() {
|
|
143
|
-
if (this._dirtyLevel ===
|
|
143
|
+
if (this._dirtyLevel === 2 || this._dirtyLevel === 3) {
|
|
144
|
+
this._dirtyLevel = 1;
|
|
144
145
|
pauseTracking();
|
|
145
146
|
for (let i = 0; i < this._depsLength; i++) {
|
|
146
147
|
const dep = this.deps[i];
|
|
147
148
|
if (dep.computed) {
|
|
148
149
|
triggerComputed(dep.computed);
|
|
149
|
-
if (this._dirtyLevel >=
|
|
150
|
+
if (this._dirtyLevel >= 4) {
|
|
150
151
|
break;
|
|
151
152
|
}
|
|
152
153
|
}
|
|
153
154
|
}
|
|
154
|
-
if (this._dirtyLevel
|
|
155
|
+
if (this._dirtyLevel === 1) {
|
|
155
156
|
this._dirtyLevel = 0;
|
|
156
157
|
}
|
|
157
158
|
resetTracking();
|
|
158
159
|
}
|
|
159
|
-
return this._dirtyLevel >=
|
|
160
|
+
return this._dirtyLevel >= 4;
|
|
160
161
|
}
|
|
161
162
|
set dirty(v) {
|
|
162
|
-
this._dirtyLevel = v ?
|
|
163
|
+
this._dirtyLevel = v ? 4 : 0;
|
|
163
164
|
}
|
|
164
165
|
run() {
|
|
165
166
|
this._dirtyLevel = 0;
|
|
@@ -199,7 +200,7 @@ function preCleanupEffect(effect2) {
|
|
|
199
200
|
effect2._depsLength = 0;
|
|
200
201
|
}
|
|
201
202
|
function postCleanupEffect(effect2) {
|
|
202
|
-
if (effect2.deps
|
|
203
|
+
if (effect2.deps.length > effect2._depsLength) {
|
|
203
204
|
for (let i = effect2._depsLength; i < effect2.deps.length; i++) {
|
|
204
205
|
cleanupDepEffect(effect2.deps[i], effect2);
|
|
205
206
|
}
|
|
@@ -286,24 +287,23 @@ function triggerEffects(dep, dirtyLevel, debuggerEventExtraInfo) {
|
|
|
286
287
|
var _a;
|
|
287
288
|
pauseScheduling();
|
|
288
289
|
for (const effect2 of dep.keys()) {
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
if (effect2._dirtyLevel < dirtyLevel && !(effect2._runnings && !effect2.allowRecurse)) {
|
|
293
|
-
const lastDirtyLevel = effect2._dirtyLevel;
|
|
290
|
+
let tracking;
|
|
291
|
+
if (effect2._dirtyLevel < dirtyLevel && (tracking != null ? tracking : tracking = dep.get(effect2) === effect2._trackId)) {
|
|
292
|
+
effect2._shouldSchedule || (effect2._shouldSchedule = effect2._dirtyLevel === 0);
|
|
294
293
|
effect2._dirtyLevel = dirtyLevel;
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
294
|
+
}
|
|
295
|
+
if (effect2._shouldSchedule && (tracking != null ? tracking : tracking = dep.get(effect2) === effect2._trackId)) {
|
|
296
|
+
if (!!(process.env.NODE_ENV !== "production")) {
|
|
297
|
+
(_a = effect2.onTrigger) == null ? void 0 : _a.call(effect2, extend({ effect: effect2 }, debuggerEventExtraInfo));
|
|
298
|
+
}
|
|
299
|
+
effect2.trigger();
|
|
300
|
+
if ((!effect2._runnings || effect2.allowRecurse) && effect2._dirtyLevel !== 2) {
|
|
301
|
+
effect2._shouldSchedule = false;
|
|
302
|
+
if (effect2.scheduler) {
|
|
303
|
+
queueEffectSchedulers.push(effect2.scheduler);
|
|
299
304
|
}
|
|
300
|
-
effect2.trigger();
|
|
301
305
|
}
|
|
302
306
|
}
|
|
303
|
-
if (effect2.scheduler && effect2._shouldSchedule && (!effect2._runnings || effect2.allowRecurse)) {
|
|
304
|
-
effect2._shouldSchedule = false;
|
|
305
|
-
queueEffectSchedulers.push(effect2.scheduler);
|
|
306
|
-
}
|
|
307
307
|
}
|
|
308
308
|
resetScheduling();
|
|
309
309
|
}
|
|
@@ -389,7 +389,7 @@ function trigger(target, type, key, newValue, oldValue, oldTarget) {
|
|
|
389
389
|
if (dep) {
|
|
390
390
|
triggerEffects(
|
|
391
391
|
dep,
|
|
392
|
-
|
|
392
|
+
4,
|
|
393
393
|
!!(process.env.NODE_ENV !== "production") ? {
|
|
394
394
|
target,
|
|
395
395
|
type,
|
|
@@ -974,7 +974,9 @@ function toRaw(observed) {
|
|
|
974
974
|
return raw ? toRaw(raw) : observed;
|
|
975
975
|
}
|
|
976
976
|
function markRaw(value) {
|
|
977
|
-
|
|
977
|
+
if (Object.isExtensible(value)) {
|
|
978
|
+
def(value, "__v_skip", true);
|
|
979
|
+
}
|
|
978
980
|
return value;
|
|
979
981
|
}
|
|
980
982
|
const toReactive = (value) => isObject(value) ? reactive(value) : value;
|
|
@@ -988,7 +990,10 @@ class ComputedRefImpl {
|
|
|
988
990
|
this["__v_isReadonly"] = false;
|
|
989
991
|
this.effect = new ReactiveEffect(
|
|
990
992
|
() => getter(this._value),
|
|
991
|
-
() => triggerRefValue(
|
|
993
|
+
() => triggerRefValue(
|
|
994
|
+
this,
|
|
995
|
+
this.effect._dirtyLevel === 2 ? 2 : 3
|
|
996
|
+
)
|
|
992
997
|
);
|
|
993
998
|
this.effect.computed = this;
|
|
994
999
|
this.effect.active = this._cacheable = !isSSR;
|
|
@@ -996,12 +1001,13 @@ class ComputedRefImpl {
|
|
|
996
1001
|
}
|
|
997
1002
|
get value() {
|
|
998
1003
|
const self = toRaw(this);
|
|
999
|
-
if (!self._cacheable || self.effect.dirty) {
|
|
1000
|
-
|
|
1001
|
-
triggerRefValue(self, 2);
|
|
1002
|
-
}
|
|
1004
|
+
if ((!self._cacheable || self.effect.dirty) && hasChanged(self._value, self._value = self.effect.run())) {
|
|
1005
|
+
triggerRefValue(self, 4);
|
|
1003
1006
|
}
|
|
1004
1007
|
trackRefValue(self);
|
|
1008
|
+
if (self.effect._dirtyLevel >= 2) {
|
|
1009
|
+
triggerRefValue(self, 2);
|
|
1010
|
+
}
|
|
1005
1011
|
return self._value;
|
|
1006
1012
|
}
|
|
1007
1013
|
set value(newValue) {
|
|
@@ -1038,14 +1044,15 @@ function computed(getterOrOptions, debugOptions, isSSR = false) {
|
|
|
1038
1044
|
}
|
|
1039
1045
|
|
|
1040
1046
|
function trackRefValue(ref2) {
|
|
1047
|
+
var _a;
|
|
1041
1048
|
if (shouldTrack && activeEffect) {
|
|
1042
1049
|
ref2 = toRaw(ref2);
|
|
1043
1050
|
trackEffect(
|
|
1044
1051
|
activeEffect,
|
|
1045
|
-
ref2.dep
|
|
1052
|
+
(_a = ref2.dep) != null ? _a : ref2.dep = createDep(
|
|
1046
1053
|
() => ref2.dep = void 0,
|
|
1047
1054
|
ref2 instanceof ComputedRefImpl ? ref2 : void 0
|
|
1048
|
-
)
|
|
1055
|
+
),
|
|
1049
1056
|
!!(process.env.NODE_ENV !== "production") ? {
|
|
1050
1057
|
target: ref2,
|
|
1051
1058
|
type: "get",
|
|
@@ -1054,7 +1061,7 @@ function trackRefValue(ref2) {
|
|
|
1054
1061
|
);
|
|
1055
1062
|
}
|
|
1056
1063
|
}
|
|
1057
|
-
function triggerRefValue(ref2, dirtyLevel =
|
|
1064
|
+
function triggerRefValue(ref2, dirtyLevel = 4, newVal) {
|
|
1058
1065
|
ref2 = toRaw(ref2);
|
|
1059
1066
|
const dep = ref2.dep;
|
|
1060
1067
|
if (dep) {
|
|
@@ -1103,12 +1110,12 @@ class RefImpl {
|
|
|
1103
1110
|
if (hasChanged(newVal, this._rawValue)) {
|
|
1104
1111
|
this._rawValue = newVal;
|
|
1105
1112
|
this._value = useDirectValue ? newVal : toReactive(newVal);
|
|
1106
|
-
triggerRefValue(this,
|
|
1113
|
+
triggerRefValue(this, 4, newVal);
|
|
1107
1114
|
}
|
|
1108
1115
|
}
|
|
1109
1116
|
}
|
|
1110
1117
|
function triggerRef(ref2) {
|
|
1111
|
-
triggerRefValue(ref2,
|
|
1118
|
+
triggerRefValue(ref2, 4, !!(process.env.NODE_ENV !== "production") ? ref2.value : void 0);
|
|
1112
1119
|
}
|
|
1113
1120
|
function unref(ref2) {
|
|
1114
1121
|
return isRef(ref2) ? ref2.value : ref2;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/reactivity v3.4.
|
|
2
|
+
* @vue/reactivity v3.4.16
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -162,7 +162,7 @@ var VueReactivity = (function (exports) {
|
|
|
162
162
|
/**
|
|
163
163
|
* @internal
|
|
164
164
|
*/
|
|
165
|
-
this._dirtyLevel =
|
|
165
|
+
this._dirtyLevel = 4;
|
|
166
166
|
/**
|
|
167
167
|
* @internal
|
|
168
168
|
*/
|
|
@@ -182,26 +182,27 @@ var VueReactivity = (function (exports) {
|
|
|
182
182
|
recordEffectScope(this, scope);
|
|
183
183
|
}
|
|
184
184
|
get dirty() {
|
|
185
|
-
if (this._dirtyLevel ===
|
|
185
|
+
if (this._dirtyLevel === 2 || this._dirtyLevel === 3) {
|
|
186
|
+
this._dirtyLevel = 1;
|
|
186
187
|
pauseTracking();
|
|
187
188
|
for (let i = 0; i < this._depsLength; i++) {
|
|
188
189
|
const dep = this.deps[i];
|
|
189
190
|
if (dep.computed) {
|
|
190
191
|
triggerComputed(dep.computed);
|
|
191
|
-
if (this._dirtyLevel >=
|
|
192
|
+
if (this._dirtyLevel >= 4) {
|
|
192
193
|
break;
|
|
193
194
|
}
|
|
194
195
|
}
|
|
195
196
|
}
|
|
196
|
-
if (this._dirtyLevel
|
|
197
|
+
if (this._dirtyLevel === 1) {
|
|
197
198
|
this._dirtyLevel = 0;
|
|
198
199
|
}
|
|
199
200
|
resetTracking();
|
|
200
201
|
}
|
|
201
|
-
return this._dirtyLevel >=
|
|
202
|
+
return this._dirtyLevel >= 4;
|
|
202
203
|
}
|
|
203
204
|
set dirty(v) {
|
|
204
|
-
this._dirtyLevel = v ?
|
|
205
|
+
this._dirtyLevel = v ? 4 : 0;
|
|
205
206
|
}
|
|
206
207
|
run() {
|
|
207
208
|
this._dirtyLevel = 0;
|
|
@@ -241,7 +242,7 @@ var VueReactivity = (function (exports) {
|
|
|
241
242
|
effect2._depsLength = 0;
|
|
242
243
|
}
|
|
243
244
|
function postCleanupEffect(effect2) {
|
|
244
|
-
if (effect2.deps
|
|
245
|
+
if (effect2.deps.length > effect2._depsLength) {
|
|
245
246
|
for (let i = effect2._depsLength; i < effect2.deps.length; i++) {
|
|
246
247
|
cleanupDepEffect(effect2.deps[i], effect2);
|
|
247
248
|
}
|
|
@@ -328,24 +329,23 @@ var VueReactivity = (function (exports) {
|
|
|
328
329
|
var _a;
|
|
329
330
|
pauseScheduling();
|
|
330
331
|
for (const effect2 of dep.keys()) {
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
if (effect2._dirtyLevel < dirtyLevel && !(effect2._runnings && !effect2.allowRecurse)) {
|
|
335
|
-
const lastDirtyLevel = effect2._dirtyLevel;
|
|
332
|
+
let tracking;
|
|
333
|
+
if (effect2._dirtyLevel < dirtyLevel && (tracking != null ? tracking : tracking = dep.get(effect2) === effect2._trackId)) {
|
|
334
|
+
effect2._shouldSchedule || (effect2._shouldSchedule = effect2._dirtyLevel === 0);
|
|
336
335
|
effect2._dirtyLevel = dirtyLevel;
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
336
|
+
}
|
|
337
|
+
if (effect2._shouldSchedule && (tracking != null ? tracking : tracking = dep.get(effect2) === effect2._trackId)) {
|
|
338
|
+
{
|
|
339
|
+
(_a = effect2.onTrigger) == null ? void 0 : _a.call(effect2, extend({ effect: effect2 }, debuggerEventExtraInfo));
|
|
340
|
+
}
|
|
341
|
+
effect2.trigger();
|
|
342
|
+
if ((!effect2._runnings || effect2.allowRecurse) && effect2._dirtyLevel !== 2) {
|
|
343
|
+
effect2._shouldSchedule = false;
|
|
344
|
+
if (effect2.scheduler) {
|
|
345
|
+
queueEffectSchedulers.push(effect2.scheduler);
|
|
341
346
|
}
|
|
342
|
-
effect2.trigger();
|
|
343
347
|
}
|
|
344
348
|
}
|
|
345
|
-
if (effect2.scheduler && effect2._shouldSchedule && (!effect2._runnings || effect2.allowRecurse)) {
|
|
346
|
-
effect2._shouldSchedule = false;
|
|
347
|
-
queueEffectSchedulers.push(effect2.scheduler);
|
|
348
|
-
}
|
|
349
349
|
}
|
|
350
350
|
resetScheduling();
|
|
351
351
|
}
|
|
@@ -431,7 +431,7 @@ var VueReactivity = (function (exports) {
|
|
|
431
431
|
if (dep) {
|
|
432
432
|
triggerEffects(
|
|
433
433
|
dep,
|
|
434
|
-
|
|
434
|
+
4,
|
|
435
435
|
{
|
|
436
436
|
target,
|
|
437
437
|
type,
|
|
@@ -1016,7 +1016,9 @@ var VueReactivity = (function (exports) {
|
|
|
1016
1016
|
return raw ? toRaw(raw) : observed;
|
|
1017
1017
|
}
|
|
1018
1018
|
function markRaw(value) {
|
|
1019
|
-
|
|
1019
|
+
if (Object.isExtensible(value)) {
|
|
1020
|
+
def(value, "__v_skip", true);
|
|
1021
|
+
}
|
|
1020
1022
|
return value;
|
|
1021
1023
|
}
|
|
1022
1024
|
const toReactive = (value) => isObject(value) ? reactive(value) : value;
|
|
@@ -1030,7 +1032,10 @@ var VueReactivity = (function (exports) {
|
|
|
1030
1032
|
this["__v_isReadonly"] = false;
|
|
1031
1033
|
this.effect = new ReactiveEffect(
|
|
1032
1034
|
() => getter(this._value),
|
|
1033
|
-
() => triggerRefValue(
|
|
1035
|
+
() => triggerRefValue(
|
|
1036
|
+
this,
|
|
1037
|
+
this.effect._dirtyLevel === 2 ? 2 : 3
|
|
1038
|
+
)
|
|
1034
1039
|
);
|
|
1035
1040
|
this.effect.computed = this;
|
|
1036
1041
|
this.effect.active = this._cacheable = !isSSR;
|
|
@@ -1038,12 +1043,13 @@ var VueReactivity = (function (exports) {
|
|
|
1038
1043
|
}
|
|
1039
1044
|
get value() {
|
|
1040
1045
|
const self = toRaw(this);
|
|
1041
|
-
if (!self._cacheable || self.effect.dirty) {
|
|
1042
|
-
|
|
1043
|
-
triggerRefValue(self, 2);
|
|
1044
|
-
}
|
|
1046
|
+
if ((!self._cacheable || self.effect.dirty) && hasChanged(self._value, self._value = self.effect.run())) {
|
|
1047
|
+
triggerRefValue(self, 4);
|
|
1045
1048
|
}
|
|
1046
1049
|
trackRefValue(self);
|
|
1050
|
+
if (self.effect._dirtyLevel >= 2) {
|
|
1051
|
+
triggerRefValue(self, 2);
|
|
1052
|
+
}
|
|
1047
1053
|
return self._value;
|
|
1048
1054
|
}
|
|
1049
1055
|
set value(newValue) {
|
|
@@ -1080,14 +1086,15 @@ var VueReactivity = (function (exports) {
|
|
|
1080
1086
|
}
|
|
1081
1087
|
|
|
1082
1088
|
function trackRefValue(ref2) {
|
|
1089
|
+
var _a;
|
|
1083
1090
|
if (shouldTrack && activeEffect) {
|
|
1084
1091
|
ref2 = toRaw(ref2);
|
|
1085
1092
|
trackEffect(
|
|
1086
1093
|
activeEffect,
|
|
1087
|
-
ref2.dep
|
|
1094
|
+
(_a = ref2.dep) != null ? _a : ref2.dep = createDep(
|
|
1088
1095
|
() => ref2.dep = void 0,
|
|
1089
1096
|
ref2 instanceof ComputedRefImpl ? ref2 : void 0
|
|
1090
|
-
)
|
|
1097
|
+
),
|
|
1091
1098
|
{
|
|
1092
1099
|
target: ref2,
|
|
1093
1100
|
type: "get",
|
|
@@ -1096,7 +1103,7 @@ var VueReactivity = (function (exports) {
|
|
|
1096
1103
|
);
|
|
1097
1104
|
}
|
|
1098
1105
|
}
|
|
1099
|
-
function triggerRefValue(ref2, dirtyLevel =
|
|
1106
|
+
function triggerRefValue(ref2, dirtyLevel = 4, newVal) {
|
|
1100
1107
|
ref2 = toRaw(ref2);
|
|
1101
1108
|
const dep = ref2.dep;
|
|
1102
1109
|
if (dep) {
|
|
@@ -1145,12 +1152,12 @@ var VueReactivity = (function (exports) {
|
|
|
1145
1152
|
if (hasChanged(newVal, this._rawValue)) {
|
|
1146
1153
|
this._rawValue = newVal;
|
|
1147
1154
|
this._value = useDirectValue ? newVal : toReactive(newVal);
|
|
1148
|
-
triggerRefValue(this,
|
|
1155
|
+
triggerRefValue(this, 4, newVal);
|
|
1149
1156
|
}
|
|
1150
1157
|
}
|
|
1151
1158
|
}
|
|
1152
1159
|
function triggerRef(ref2) {
|
|
1153
|
-
triggerRefValue(ref2,
|
|
1160
|
+
triggerRefValue(ref2, 4, ref2.value );
|
|
1154
1161
|
}
|
|
1155
1162
|
function unref(ref2) {
|
|
1156
1163
|
return isRef(ref2) ? ref2.value : ref2;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/reactivity v3.4.
|
|
2
|
+
* @vue/reactivity v3.4.16
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
6
|
-
var VueReactivity=function(t){"use strict";function e(t,e){const s=new Set(t.split(","));return e?t=>s.has(t.toLowerCase()):t=>s.has(t)}const s=()=>{},n=Object.assign,r=Object.prototype.hasOwnProperty,i=(t,e)=>r.call(t,e),c=Array.isArray,o=t=>"[object Map]"===f(t),u=t=>"function"==typeof t,a=t=>"symbol"==typeof t,l=t=>null!==t&&"object"==typeof t,h=Object.prototype.toString,f=t=>h.call(t),_=t=>f(t).slice(8,-1),d=t=>"string"==typeof t&&"NaN"!==t&&"-"!==t[0]&&""+parseInt(t,10)===t,p=(t,e)=>!Object.is(t,e);let v,g;class y{constructor(t=!1){this.detached=t,this._active=!0,this.effects=[],this.cleanups=[],this.parent=v,!t&&v&&(this.index=(v.scopes||(v.scopes=[])).push(this)-1)}get active(){return this._active}run(t){if(this._active){const e=v;try{return v=this,t()}finally{v=e}}}on(){v=this}off(){v=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 w(t,e=v){e&&e.active&&e.effects.push(t)}class R{constructor(t,e,s,n){this.fn=t,this.trigger=e,this.scheduler=s,this.active=!0,this.deps=[],this._dirtyLevel=2,this._trackId=0,this._runnings=0,this._shouldSchedule=!1,this._depsLength=0,w(this,n)}get dirty(){if(1===this._dirtyLevel){j();for(let t=0;t<this._depsLength;t++){const e=this.deps[t];if(e.computed&&(b(e.computed),this._dirtyLevel>=2))break}this._dirtyLevel<2&&(this._dirtyLevel=0),x()}return this._dirtyLevel>=2}set dirty(t){this._dirtyLevel=t?2:0}run(){if(this._dirtyLevel=0,!this.active)return this.fn();let t=L,e=g;try{return L=!0,g=this,this._runnings++,S(this),this.fn()}finally{k(this),this._runnings--,g=e,L=t}}stop(){var t;this.active&&(S(this),k(this),null==(t=this.onStop)||t.call(this),this.active=!1)}}function b(t){return t.value}function S(t){t._trackId++,t._depsLength=0}function k(t){if(t.deps&&t.deps.length>t._depsLength){for(let e=t._depsLength;e<t.deps.length;e++)E(t.deps[e],t);t.deps.length=t._depsLength}}function E(t,e){const s=t.get(e);void 0!==s&&e._trackId!==s&&(t.delete(e),0===t.size&&t.cleanup())}let L=!0,m=0;const O=[];function j(){O.push(L),L=!1}function x(){const t=O.pop();L=void 0===t||t}function I(){m++}function P(){for(m--;!m&&A.length;)A.shift()()}function T(t,e,s){if(e.get(t)!==t._trackId){e.set(t,t._trackId);const s=t.deps[t._depsLength];s!==e?(s&&E(s,t),t.deps[t._depsLength++]=e):t._depsLength++}}const A=[];function M(t,e,s){I();for(const n of t.keys())if(t.get(n)===n._trackId){if(n._dirtyLevel<e&&(!n._runnings||n.allowRecurse)){const t=n._dirtyLevel;n._dirtyLevel=e,0===t&&(n._shouldSchedule=!0,n.trigger())}n.scheduler&&n._shouldSchedule&&(!n._runnings||n.allowRecurse)&&(n._shouldSchedule=!1,A.push(n.scheduler))}P()}const V=(t,e)=>{const s=new Map;return s.cleanup=t,s.computed=e,s},W=new WeakMap,z=Symbol(""),N=Symbol("");function C(t,e,s){if(L&&g){let e=W.get(t);e||W.set(t,e=new Map);let n=e.get(s);n||e.set(s,n=V((()=>e.delete(s)))),T(g,n)}}function D(t,e,s,n,r,i){const u=W.get(t);if(!u)return;let l=[];if("clear"===e)l=[...u.values()];else if("length"===s&&c(t)){const t=Number(n);u.forEach(((e,s)=>{("length"===s||!a(s)&&s>=t)&&l.push(e)}))}else switch(void 0!==s&&l.push(u.get(s)),e){case"add":c(t)?d(s)&&l.push(u.get("length")):(l.push(u.get(z)),o(t)&&l.push(u.get(N)));break;case"delete":c(t)||(l.push(u.get(z)),o(t)&&l.push(u.get(N)));break;case"set":o(t)&&l.push(u.get(z))}I();for(const c of l)c&&M(c,2);P()}const K=e("__proto__,__v_isRef,__isVue"),H=new Set(Object.getOwnPropertyNames(Symbol).filter((t=>"arguments"!==t&&"caller"!==t)).map((t=>Symbol[t])).filter(a)),Y=F();function F(){const t={};return["includes","indexOf","lastIndexOf"].forEach((e=>{t[e]=function(...t){const s=Pt(this);for(let e=0,r=this.length;e<r;e++)C(s,0,e+"");const n=s[e](...t);return-1===n||!1===n?s[e](...t.map(Pt)):n}})),["push","pop","shift","unshift","splice"].forEach((e=>{t[e]=function(...t){j(),I();const s=Pt(this)[e].apply(this,t);return P(),x(),s}})),t}function G(t){const e=Pt(this);return C(e,0,t),e.hasOwnProperty(t)}class q{constructor(t=!1,e=!1){this._isReadonly=t,this._shallow=e}get(t,e,s){const n=this._isReadonly,r=this._shallow;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?Et:kt:r?St:bt).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(s)?t:void 0;const o=c(t);if(!n){if(o&&i(Y,e))return Reflect.get(Y,e,s);if("hasOwnProperty"===e)return G}const u=Reflect.get(t,e,s);return(a(e)?H.has(e):K(e))?u:(n||C(t,0,e),r?u:Nt(u)?o&&d(e)?u:u.value:l(u)?n?mt(u):Lt(u):u)}}class B extends q{constructor(t=!1){super(!1,t)}set(t,e,s,n){let r=t[e];if(!this._shallow){const e=xt(r);if(It(s)||xt(s)||(r=Pt(r),s=Pt(s)),!c(t)&&Nt(r)&&!Nt(s))return!e&&(r.value=s,!0)}const o=c(t)&&d(e)?Number(e)<t.length:i(t,e),u=Reflect.set(t,e,s,n);return t===Pt(n)&&(o?p(s,r)&&D(t,"set",e,s):D(t,"add",e,s)),u}deleteProperty(t,e){const s=i(t,e),n=Reflect.deleteProperty(t,e);return n&&s&&D(t,"delete",e,void 0),n}has(t,e){const s=Reflect.has(t,e);return a(e)&&H.has(e)||C(t,0,e),s}ownKeys(t){return C(t,0,c(t)?"length":z),Reflect.ownKeys(t)}}class J extends q{constructor(t=!1){super(!0,t)}set(t,e){return!0}deleteProperty(t,e){return!0}}const Q=new B,U=new J,X=new B(!0),Z=new J(!0),$=t=>t,tt=t=>Reflect.getPrototypeOf(t);function et(t,e,s=!1,n=!1){const r=Pt(t=t.__v_raw),i=Pt(e);s||(p(e,i)&&C(r,0,e),C(r,0,i));const{has:c}=tt(r),o=n?$:s?At:Tt;return c.call(r,e)?o(t.get(e)):c.call(r,i)?o(t.get(i)):void(t!==r&&t.get(e))}function st(t,e=!1){const s=this.__v_raw,n=Pt(s),r=Pt(t);return e||(p(t,r)&&C(n,0,t),C(n,0,r)),t===r?s.has(t):s.has(t)||s.has(r)}function nt(t,e=!1){return t=t.__v_raw,!e&&C(Pt(t),0,z),Reflect.get(t,"size",t)}function rt(t){t=Pt(t);const e=Pt(this);return tt(e).has.call(e,t)||(e.add(t),D(e,"add",t,t)),this}function it(t,e){e=Pt(e);const s=Pt(this),{has:n,get:r}=tt(s);let i=n.call(s,t);i||(t=Pt(t),i=n.call(s,t));const c=r.call(s,t);return s.set(t,e),i?p(e,c)&&D(s,"set",t,e):D(s,"add",t,e),this}function ct(t){const e=Pt(this),{has:s,get:n}=tt(e);let r=s.call(e,t);r||(t=Pt(t),r=s.call(e,t)),n&&n.call(e,t);const i=e.delete(t);return r&&D(e,"delete",t,void 0),i}function ot(){const t=Pt(this),e=0!==t.size,s=t.clear();return e&&D(t,"clear",void 0,void 0),s}function ut(t,e){return function(s,n){const r=this,i=r.__v_raw,c=Pt(i),o=e?$:t?At:Tt;return!t&&C(c,0,z),i.forEach(((t,e)=>s.call(n,o(t),o(e),r)))}}function at(t,e,s){return function(...n){const r=this.__v_raw,i=Pt(r),c=o(i),u="entries"===t||t===Symbol.iterator&&c,a="keys"===t&&c,l=r[t](...n),h=s?$:e?At:Tt;return!e&&C(i,0,a?N:z),{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 lt(t){return function(...e){return"delete"!==t&&("clear"===t?void 0:this)}}function ht(){const t={get(t){return et(this,t)},get size(){return nt(this)},has:st,add:rt,set:it,delete:ct,clear:ot,forEach:ut(!1,!1)},e={get(t){return et(this,t,!1,!0)},get size(){return nt(this)},has:st,add:rt,set:it,delete:ct,clear:ot,forEach:ut(!1,!0)},s={get(t){return et(this,t,!0)},get size(){return nt(this,!0)},has(t){return st.call(this,t,!0)},add:lt("add"),set:lt("set"),delete:lt("delete"),clear:lt("clear"),forEach:ut(!0,!1)},n={get(t){return et(this,t,!0,!0)},get size(){return nt(this,!0)},has(t){return st.call(this,t,!0)},add:lt("add"),set:lt("set"),delete:lt("delete"),clear:lt("clear"),forEach:ut(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach((r=>{t[r]=at(r,!1,!1),s[r]=at(r,!0,!1),e[r]=at(r,!1,!0),n[r]=at(r,!0,!0)})),[t,s,e,n]}const[ft,_t,dt,pt]=ht();function vt(t,e){const s=e?t?pt:dt:t?_t:ft;return(e,n,r)=>"__v_isReactive"===n?!t:"__v_isReadonly"===n?t:"__v_raw"===n?e:Reflect.get(i(s,n)&&n in e?s:e,n,r)}const gt={get:vt(!1,!1)},yt={get:vt(!1,!0)},wt={get:vt(!0,!1)},Rt={get:vt(!0,!0)},bt=new WeakMap,St=new WeakMap,kt=new WeakMap,Et=new WeakMap;function Lt(t){return xt(t)?t:Ot(t,!1,Q,gt,bt)}function mt(t){return Ot(t,!0,U,wt,kt)}function Ot(t,e,s,n,r){if(!l(t))return t;if(t.__v_raw&&(!e||!t.__v_isReactive))return t;const i=r.get(t);if(i)return i;const c=(o=t).__v_skip||!Object.isExtensible(o)?0:function(t){switch(t){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}(_(o));var o;if(0===c)return t;const u=new Proxy(t,2===c?n:s);return r.set(t,u),u}function jt(t){return xt(t)?jt(t.__v_raw):!(!t||!t.__v_isReactive)}function xt(t){return!(!t||!t.__v_isReadonly)}function It(t){return!(!t||!t.__v_isShallow)}function Pt(t){const e=t&&t.__v_raw;return e?Pt(e):t}const Tt=t=>l(t)?Lt(t):t,At=t=>l(t)?mt(t):t;class Mt{constructor(t,e,s,n){this._setter=e,this.dep=void 0,this.__v_isRef=!0,this.__v_isReadonly=!1,this.effect=new R((()=>t(this._value)),(()=>zt(this,1))),this.effect.computed=this,this.effect.active=this._cacheable=!n,this.__v_isReadonly=s}get value(){const t=Pt(this);return t._cacheable&&!t.effect.dirty||p(t._value,t._value=t.effect.run())&&zt(t,2),Wt(t),t._value}set value(t){this._setter(t)}get _dirty(){return this.effect.dirty}set _dirty(t){this.effect.dirty=t}}function Vt(t,e,n=!1){let r,i;const c=u(t);c?(r=t,i=s):(r=t.get,i=t.set);return new Mt(r,i,c||!i,n)}function Wt(t){L&&g&&(t=Pt(t),T(g,t.dep||(t.dep=V((()=>t.dep=void 0),t instanceof Mt?t:void 0))))}function zt(t,e=2,s){const n=(t=Pt(t)).dep;n&&M(n,e)}function Nt(t){return!(!t||!0!==t.__v_isRef)}function Ct(t){return Dt(t,!1)}function Dt(t,e){return Nt(t)?t:new Kt(t,e)}class Kt{constructor(t,e){this.__v_isShallow=e,this.dep=void 0,this.__v_isRef=!0,this._rawValue=e?t:Pt(t),this._value=e?t:Tt(t)}get value(){return Wt(this),this._value}set value(t){const e=this.__v_isShallow||It(t)||xt(t);t=e?t:Pt(t),p(t,this._rawValue)&&(this._rawValue=t,this._value=e?t:Tt(t),zt(this,2))}}function Ht(t){return Nt(t)?t.value:t}const Yt={get:(t,e,s)=>Ht(Reflect.get(t,e,s)),set:(t,e,s,n)=>{const r=t[e];return Nt(r)&&!Nt(s)?(r.value=s,!0):Reflect.set(t,e,s,n)}};class Ft{constructor(t){this.dep=void 0,this.__v_isRef=!0;const{get:e,set:s}=t((()=>Wt(this)),(()=>zt(this)));this._get=e,this._set=s}get value(){return this._get()}set value(t){this._set(t)}}class Gt{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=Pt(this._object),e=this._key,null==(s=W.get(t))?void 0:s.get(e);var t,e,s}}class qt{constructor(t){this._getter=t,this.__v_isRef=!0,this.__v_isReadonly=!0}get value(){return this._getter()}}function Bt(t,e,s){const n=t[e];return Nt(n)?n:new Gt(t,e,s)}const Jt=Vt;return t.EffectScope=y,t.ITERATE_KEY=z,t.ReactiveEffect=R,t.ReactiveFlags={SKIP:"__v_skip",IS_REACTIVE:"__v_isReactive",IS_READONLY:"__v_isReadonly",IS_SHALLOW:"__v_isShallow",RAW:"__v_raw"},t.TrackOpTypes={GET:"get",HAS:"has",ITERATE:"iterate"},t.TriggerOpTypes={SET:"set",ADD:"add",DELETE:"delete",CLEAR:"clear"},t.computed=Vt,t.customRef=function(t){return new Ft(t)},t.deferredComputed=Jt,t.effect=function(t,e){t.effect instanceof R&&(t=t.effect.fn);const r=new R(t,s,(()=>{r.dirty&&r.run()}));e&&(n(r,e),e.scope&&w(r,e.scope)),e&&e.lazy||r.run();const i=r.run.bind(r);return i.effect=r,i},t.effectScope=function(t){return new y(t)},t.enableTracking=function(){O.push(L),L=!0},t.getCurrentScope=function(){return v},t.isProxy=function(t){return jt(t)||xt(t)},t.isReactive=jt,t.isReadonly=xt,t.isRef=Nt,t.isShallow=It,t.markRaw=function(t){return((t,e,s)=>{Object.defineProperty(t,e,{configurable:!0,enumerable:!1,value:s})})(t,"__v_skip",!0),t},t.onScopeDispose=function(t){v&&v.cleanups.push(t)},t.pauseScheduling=I,t.pauseTracking=j,t.proxyRefs=function(t){return jt(t)?t:new Proxy(t,Yt)},t.reactive=Lt,t.readonly=mt,t.ref=Ct,t.resetScheduling=P,t.resetTracking=x,t.shallowReactive=function(t){return Ot(t,!1,X,yt,St)},t.shallowReadonly=function(t){return Ot(t,!0,Z,Rt,Et)},t.shallowRef=function(t){return Dt(t,!0)},t.stop=function(t){t.effect.stop()},t.toRaw=Pt,t.toRef=function(t,e,s){return Nt(t)?t:u(t)?new qt(t):l(t)&&arguments.length>1?Bt(t,e,s):Ct(t)},t.toRefs=function(t){const e=c(t)?new Array(t.length):{};for(const s in t)e[s]=Bt(t,s);return e},t.toValue=function(t){return u(t)?t():Ht(t)},t.track=C,t.trigger=D,t.triggerRef=function(t){zt(t,2)},t.unref=Ht,t}({});
|
|
6
|
+
var VueReactivity=function(t){"use strict";function e(t,e){const s=new Set(t.split(","));return e?t=>s.has(t.toLowerCase()):t=>s.has(t)}const s=()=>{},n=Object.assign,i=Object.prototype.hasOwnProperty,r=(t,e)=>i.call(t,e),c=Array.isArray,o=t=>"[object Map]"===f(t),u=t=>"function"==typeof t,a=t=>"symbol"==typeof t,l=t=>null!==t&&"object"==typeof t,h=Object.prototype.toString,f=t=>h.call(t),_=t=>f(t).slice(8,-1),d=t=>"string"==typeof t&&"NaN"!==t&&"-"!==t[0]&&""+parseInt(t,10)===t,p=(t,e)=>!Object.is(t,e);let v,g;class y{constructor(t=!1){this.detached=t,this._active=!0,this.effects=[],this.cleanups=[],this.parent=v,!t&&v&&(this.index=(v.scopes||(v.scopes=[])).push(this)-1)}get active(){return this._active}run(t){if(this._active){const e=v;try{return v=this,t()}finally{v=e}}}on(){v=this}off(){v=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 w(t,e=v){e&&e.active&&e.effects.push(t)}class R{constructor(t,e,s,n){this.fn=t,this.trigger=e,this.scheduler=s,this.active=!0,this.deps=[],this._dirtyLevel=4,this._trackId=0,this._runnings=0,this._shouldSchedule=!1,this._depsLength=0,w(this,n)}get dirty(){if(2===this._dirtyLevel||3===this._dirtyLevel){this._dirtyLevel=1,j();for(let t=0;t<this._depsLength;t++){const e=this.deps[t];if(e.computed&&(b(e.computed),this._dirtyLevel>=4))break}1===this._dirtyLevel&&(this._dirtyLevel=0),x()}return this._dirtyLevel>=4}set dirty(t){this._dirtyLevel=t?4:0}run(){if(this._dirtyLevel=0,!this.active)return this.fn();let t=E,e=g;try{return E=!0,g=this,this._runnings++,S(this),this.fn()}finally{k(this),this._runnings--,g=e,E=t}}stop(){var t;this.active&&(S(this),k(this),null==(t=this.onStop)||t.call(this),this.active=!1)}}function b(t){return t.value}function S(t){t._trackId++,t._depsLength=0}function k(t){if(t.deps.length>t._depsLength){for(let e=t._depsLength;e<t.deps.length;e++)L(t.deps[e],t);t.deps.length=t._depsLength}}function L(t,e){const s=t.get(e);void 0!==s&&e._trackId!==s&&(t.delete(e),0===t.size&&t.cleanup())}let E=!0,O=0;const m=[];function j(){m.push(E),E=!1}function x(){const t=m.pop();E=void 0===t||t}function I(){O++}function P(){for(O--;!O&&A.length;)A.shift()()}function T(t,e,s){if(e.get(t)!==t._trackId){e.set(t,t._trackId);const s=t.deps[t._depsLength];s!==e?(s&&L(s,t),t.deps[t._depsLength++]=e):t._depsLength++}}const A=[];function M(t,e,s){I();for(const n of t.keys()){let s;n._dirtyLevel<e&&(null!=s?s:s=t.get(n)===n._trackId)&&(n._shouldSchedule||(n._shouldSchedule=0===n._dirtyLevel),n._dirtyLevel=e),n._shouldSchedule&&(null!=s?s:s=t.get(n)===n._trackId)&&(n.trigger(),n._runnings&&!n.allowRecurse||2===n._dirtyLevel||(n._shouldSchedule=!1,n.scheduler&&A.push(n.scheduler)))}P()}const V=(t,e)=>{const s=new Map;return s.cleanup=t,s.computed=e,s},W=new WeakMap,z=Symbol(""),N=Symbol("");function C(t,e,s){if(E&&g){let e=W.get(t);e||W.set(t,e=new Map);let n=e.get(s);n||e.set(s,n=V((()=>e.delete(s)))),T(g,n)}}function D(t,e,s,n,i,r){const u=W.get(t);if(!u)return;let l=[];if("clear"===e)l=[...u.values()];else if("length"===s&&c(t)){const t=Number(n);u.forEach(((e,s)=>{("length"===s||!a(s)&&s>=t)&&l.push(e)}))}else switch(void 0!==s&&l.push(u.get(s)),e){case"add":c(t)?d(s)&&l.push(u.get("length")):(l.push(u.get(z)),o(t)&&l.push(u.get(N)));break;case"delete":c(t)||(l.push(u.get(z)),o(t)&&l.push(u.get(N)));break;case"set":o(t)&&l.push(u.get(z))}I();for(const c of l)c&&M(c,4);P()}const K=e("__proto__,__v_isRef,__isVue"),H=new Set(Object.getOwnPropertyNames(Symbol).filter((t=>"arguments"!==t&&"caller"!==t)).map((t=>Symbol[t])).filter(a)),Y=F();function F(){const t={};return["includes","indexOf","lastIndexOf"].forEach((e=>{t[e]=function(...t){const s=Pt(this);for(let e=0,i=this.length;e<i;e++)C(s,0,e+"");const n=s[e](...t);return-1===n||!1===n?s[e](...t.map(Pt)):n}})),["push","pop","shift","unshift","splice"].forEach((e=>{t[e]=function(...t){j(),I();const s=Pt(this)[e].apply(this,t);return P(),x(),s}})),t}function G(t){const e=Pt(this);return C(e,0,t),e.hasOwnProperty(t)}class q{constructor(t=!1,e=!1){this._isReadonly=t,this._shallow=e}get(t,e,s){const n=this._isReadonly,i=this._shallow;if("__v_isReactive"===e)return!n;if("__v_isReadonly"===e)return n;if("__v_isShallow"===e)return i;if("__v_raw"===e)return s===(n?i?Lt:kt:i?St:bt).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(s)?t:void 0;const o=c(t);if(!n){if(o&&r(Y,e))return Reflect.get(Y,e,s);if("hasOwnProperty"===e)return G}const u=Reflect.get(t,e,s);return(a(e)?H.has(e):K(e))?u:(n||C(t,0,e),i?u:Nt(u)?o&&d(e)?u:u.value:l(u)?n?Ot(u):Et(u):u)}}class B extends q{constructor(t=!1){super(!1,t)}set(t,e,s,n){let i=t[e];if(!this._shallow){const e=xt(i);if(It(s)||xt(s)||(i=Pt(i),s=Pt(s)),!c(t)&&Nt(i)&&!Nt(s))return!e&&(i.value=s,!0)}const o=c(t)&&d(e)?Number(e)<t.length:r(t,e),u=Reflect.set(t,e,s,n);return t===Pt(n)&&(o?p(s,i)&&D(t,"set",e,s):D(t,"add",e,s)),u}deleteProperty(t,e){const s=r(t,e),n=Reflect.deleteProperty(t,e);return n&&s&&D(t,"delete",e,void 0),n}has(t,e){const s=Reflect.has(t,e);return a(e)&&H.has(e)||C(t,0,e),s}ownKeys(t){return C(t,0,c(t)?"length":z),Reflect.ownKeys(t)}}class J extends q{constructor(t=!1){super(!0,t)}set(t,e){return!0}deleteProperty(t,e){return!0}}const Q=new B,U=new J,X=new B(!0),Z=new J(!0),$=t=>t,tt=t=>Reflect.getPrototypeOf(t);function et(t,e,s=!1,n=!1){const i=Pt(t=t.__v_raw),r=Pt(e);s||(p(e,r)&&C(i,0,e),C(i,0,r));const{has:c}=tt(i),o=n?$:s?At:Tt;return c.call(i,e)?o(t.get(e)):c.call(i,r)?o(t.get(r)):void(t!==i&&t.get(e))}function st(t,e=!1){const s=this.__v_raw,n=Pt(s),i=Pt(t);return e||(p(t,i)&&C(n,0,t),C(n,0,i)),t===i?s.has(t):s.has(t)||s.has(i)}function nt(t,e=!1){return t=t.__v_raw,!e&&C(Pt(t),0,z),Reflect.get(t,"size",t)}function it(t){t=Pt(t);const e=Pt(this);return tt(e).has.call(e,t)||(e.add(t),D(e,"add",t,t)),this}function rt(t,e){e=Pt(e);const s=Pt(this),{has:n,get:i}=tt(s);let r=n.call(s,t);r||(t=Pt(t),r=n.call(s,t));const c=i.call(s,t);return s.set(t,e),r?p(e,c)&&D(s,"set",t,e):D(s,"add",t,e),this}function ct(t){const e=Pt(this),{has:s,get:n}=tt(e);let i=s.call(e,t);i||(t=Pt(t),i=s.call(e,t)),n&&n.call(e,t);const r=e.delete(t);return i&&D(e,"delete",t,void 0),r}function ot(){const t=Pt(this),e=0!==t.size,s=t.clear();return e&&D(t,"clear",void 0,void 0),s}function ut(t,e){return function(s,n){const i=this,r=i.__v_raw,c=Pt(r),o=e?$:t?At:Tt;return!t&&C(c,0,z),r.forEach(((t,e)=>s.call(n,o(t),o(e),i)))}}function at(t,e,s){return function(...n){const i=this.__v_raw,r=Pt(i),c=o(r),u="entries"===t||t===Symbol.iterator&&c,a="keys"===t&&c,l=i[t](...n),h=s?$:e?At:Tt;return!e&&C(r,0,a?N:z),{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 lt(t){return function(...e){return"delete"!==t&&("clear"===t?void 0:this)}}function ht(){const t={get(t){return et(this,t)},get size(){return nt(this)},has:st,add:it,set:rt,delete:ct,clear:ot,forEach:ut(!1,!1)},e={get(t){return et(this,t,!1,!0)},get size(){return nt(this)},has:st,add:it,set:rt,delete:ct,clear:ot,forEach:ut(!1,!0)},s={get(t){return et(this,t,!0)},get size(){return nt(this,!0)},has(t){return st.call(this,t,!0)},add:lt("add"),set:lt("set"),delete:lt("delete"),clear:lt("clear"),forEach:ut(!0,!1)},n={get(t){return et(this,t,!0,!0)},get size(){return nt(this,!0)},has(t){return st.call(this,t,!0)},add:lt("add"),set:lt("set"),delete:lt("delete"),clear:lt("clear"),forEach:ut(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach((i=>{t[i]=at(i,!1,!1),s[i]=at(i,!0,!1),e[i]=at(i,!1,!0),n[i]=at(i,!0,!0)})),[t,s,e,n]}const[ft,_t,dt,pt]=ht();function vt(t,e){const s=e?t?pt:dt:t?_t:ft;return(e,n,i)=>"__v_isReactive"===n?!t:"__v_isReadonly"===n?t:"__v_raw"===n?e:Reflect.get(r(s,n)&&n in e?s:e,n,i)}const gt={get:vt(!1,!1)},yt={get:vt(!1,!0)},wt={get:vt(!0,!1)},Rt={get:vt(!0,!0)},bt=new WeakMap,St=new WeakMap,kt=new WeakMap,Lt=new WeakMap;function Et(t){return xt(t)?t:mt(t,!1,Q,gt,bt)}function Ot(t){return mt(t,!0,U,wt,kt)}function mt(t,e,s,n,i){if(!l(t))return t;if(t.__v_raw&&(!e||!t.__v_isReactive))return t;const r=i.get(t);if(r)return r;const c=(o=t).__v_skip||!Object.isExtensible(o)?0:function(t){switch(t){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}(_(o));var o;if(0===c)return t;const u=new Proxy(t,2===c?n:s);return i.set(t,u),u}function jt(t){return xt(t)?jt(t.__v_raw):!(!t||!t.__v_isReactive)}function xt(t){return!(!t||!t.__v_isReadonly)}function It(t){return!(!t||!t.__v_isShallow)}function Pt(t){const e=t&&t.__v_raw;return e?Pt(e):t}const Tt=t=>l(t)?Et(t):t,At=t=>l(t)?Ot(t):t;class Mt{constructor(t,e,s,n){this._setter=e,this.dep=void 0,this.__v_isRef=!0,this.__v_isReadonly=!1,this.effect=new R((()=>t(this._value)),(()=>zt(this,2===this.effect._dirtyLevel?2:3))),this.effect.computed=this,this.effect.active=this._cacheable=!n,this.__v_isReadonly=s}get value(){const t=Pt(this);return t._cacheable&&!t.effect.dirty||!p(t._value,t._value=t.effect.run())||zt(t,4),Wt(t),t.effect._dirtyLevel>=2&&zt(t,2),t._value}set value(t){this._setter(t)}get _dirty(){return this.effect.dirty}set _dirty(t){this.effect.dirty=t}}function Vt(t,e,n=!1){let i,r;const c=u(t);c?(i=t,r=s):(i=t.get,r=t.set);return new Mt(i,r,c||!r,n)}function Wt(t){var e;E&&g&&(t=Pt(t),T(g,null!=(e=t.dep)?e:t.dep=V((()=>t.dep=void 0),t instanceof Mt?t:void 0)))}function zt(t,e=4,s){const n=(t=Pt(t)).dep;n&&M(n,e)}function Nt(t){return!(!t||!0!==t.__v_isRef)}function Ct(t){return Dt(t,!1)}function Dt(t,e){return Nt(t)?t:new Kt(t,e)}class Kt{constructor(t,e){this.__v_isShallow=e,this.dep=void 0,this.__v_isRef=!0,this._rawValue=e?t:Pt(t),this._value=e?t:Tt(t)}get value(){return Wt(this),this._value}set value(t){const e=this.__v_isShallow||It(t)||xt(t);t=e?t:Pt(t),p(t,this._rawValue)&&(this._rawValue=t,this._value=e?t:Tt(t),zt(this,4))}}function Ht(t){return Nt(t)?t.value:t}const Yt={get:(t,e,s)=>Ht(Reflect.get(t,e,s)),set:(t,e,s,n)=>{const i=t[e];return Nt(i)&&!Nt(s)?(i.value=s,!0):Reflect.set(t,e,s,n)}};class Ft{constructor(t){this.dep=void 0,this.__v_isRef=!0;const{get:e,set:s}=t((()=>Wt(this)),(()=>zt(this)));this._get=e,this._set=s}get value(){return this._get()}set value(t){this._set(t)}}class Gt{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=Pt(this._object),e=this._key,null==(s=W.get(t))?void 0:s.get(e);var t,e,s}}class qt{constructor(t){this._getter=t,this.__v_isRef=!0,this.__v_isReadonly=!0}get value(){return this._getter()}}function Bt(t,e,s){const n=t[e];return Nt(n)?n:new Gt(t,e,s)}const Jt=Vt;return t.EffectScope=y,t.ITERATE_KEY=z,t.ReactiveEffect=R,t.ReactiveFlags={SKIP:"__v_skip",IS_REACTIVE:"__v_isReactive",IS_READONLY:"__v_isReadonly",IS_SHALLOW:"__v_isShallow",RAW:"__v_raw"},t.TrackOpTypes={GET:"get",HAS:"has",ITERATE:"iterate"},t.TriggerOpTypes={SET:"set",ADD:"add",DELETE:"delete",CLEAR:"clear"},t.computed=Vt,t.customRef=function(t){return new Ft(t)},t.deferredComputed=Jt,t.effect=function(t,e){t.effect instanceof R&&(t=t.effect.fn);const i=new R(t,s,(()=>{i.dirty&&i.run()}));e&&(n(i,e),e.scope&&w(i,e.scope)),e&&e.lazy||i.run();const r=i.run.bind(i);return r.effect=i,r},t.effectScope=function(t){return new y(t)},t.enableTracking=function(){m.push(E),E=!0},t.getCurrentScope=function(){return v},t.isProxy=function(t){return jt(t)||xt(t)},t.isReactive=jt,t.isReadonly=xt,t.isRef=Nt,t.isShallow=It,t.markRaw=function(t){return Object.isExtensible(t)&&((t,e,s)=>{Object.defineProperty(t,e,{configurable:!0,enumerable:!1,value:s})})(t,"__v_skip",!0),t},t.onScopeDispose=function(t){v&&v.cleanups.push(t)},t.pauseScheduling=I,t.pauseTracking=j,t.proxyRefs=function(t){return jt(t)?t:new Proxy(t,Yt)},t.reactive=Et,t.readonly=Ot,t.ref=Ct,t.resetScheduling=P,t.resetTracking=x,t.shallowReactive=function(t){return mt(t,!1,X,yt,St)},t.shallowReadonly=function(t){return mt(t,!0,Z,Rt,Lt)},t.shallowRef=function(t){return Dt(t,!0)},t.stop=function(t){t.effect.stop()},t.toRaw=Pt,t.toRef=function(t,e,s){return Nt(t)?t:u(t)?new qt(t):l(t)&&arguments.length>1?Bt(t,e,s):Ct(t)},t.toRefs=function(t){const e=c(t)?new Array(t.length):{};for(const s in t)e[s]=Bt(t,s);return e},t.toValue=function(t){return u(t)?t():Ht(t)},t.track=C,t.trigger=D,t.triggerRef=function(t){zt(t,4)},t.unref=Ht,t}({});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vue/reactivity",
|
|
3
|
-
"version": "3.4.
|
|
3
|
+
"version": "3.4.16",
|
|
4
4
|
"description": "@vue/reactivity",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"module": "dist/reactivity.esm-bundler.js",
|
|
@@ -50,6 +50,6 @@
|
|
|
50
50
|
},
|
|
51
51
|
"homepage": "https://github.com/vuejs/core/tree/main/packages/reactivity#readme",
|
|
52
52
|
"dependencies": {
|
|
53
|
-
"@vue/shared": "3.4.
|
|
53
|
+
"@vue/shared": "3.4.16"
|
|
54
54
|
}
|
|
55
55
|
}
|