@vue-mini/core 1.2.2 → 1.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/vue-mini.cjs.js +82 -70
- package/dist/vue-mini.cjs.prod.js +2 -2
- package/dist/vue-mini.d.ts +5 -3
- package/dist/vue-mini.esm-bundler.js +4 -7
- package/package.json +3 -3
package/dist/vue-mini.cjs.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* vue-mini v1.2.
|
|
2
|
+
* vue-mini v1.2.4
|
|
3
3
|
* https://github.com/vue-mini/vue-mini
|
|
4
4
|
* (c) 2019-present Yang Mingshan
|
|
5
5
|
* @license MIT
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
'use strict';
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
|
-
* @vue/shared v3.5.
|
|
10
|
+
* @vue/shared v3.5.18
|
|
11
11
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
12
12
|
* @license MIT
|
|
13
13
|
**/
|
|
@@ -66,7 +66,7 @@ const def = (obj, key, value, writable = false) => {
|
|
|
66
66
|
};
|
|
67
67
|
|
|
68
68
|
/**
|
|
69
|
-
* @vue/reactivity v3.5.
|
|
69
|
+
* @vue/reactivity v3.5.18
|
|
70
70
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
71
71
|
* @license MIT
|
|
72
72
|
**/
|
|
@@ -83,6 +83,10 @@ class EffectScope {
|
|
|
83
83
|
* @internal
|
|
84
84
|
*/
|
|
85
85
|
this._active = true;
|
|
86
|
+
/**
|
|
87
|
+
* @internal track `on` calls, allow `on` call multiple times
|
|
88
|
+
*/
|
|
89
|
+
this._on = 0;
|
|
86
90
|
/**
|
|
87
91
|
* @internal
|
|
88
92
|
*/
|
|
@@ -153,14 +157,20 @@ class EffectScope {
|
|
|
153
157
|
* @internal
|
|
154
158
|
*/
|
|
155
159
|
on() {
|
|
156
|
-
|
|
160
|
+
if (++this._on === 1) {
|
|
161
|
+
this.prevScope = activeEffectScope;
|
|
162
|
+
activeEffectScope = this;
|
|
163
|
+
}
|
|
157
164
|
}
|
|
158
165
|
/**
|
|
159
166
|
* This should only be called on non-detached scopes
|
|
160
167
|
* @internal
|
|
161
168
|
*/
|
|
162
169
|
off() {
|
|
163
|
-
|
|
170
|
+
if (this._on > 0 && --this._on === 0) {
|
|
171
|
+
activeEffectScope = this.prevScope;
|
|
172
|
+
this.prevScope = void 0;
|
|
173
|
+
}
|
|
164
174
|
}
|
|
165
175
|
stop(fromParent) {
|
|
166
176
|
if (this._active) {
|
|
@@ -187,7 +197,7 @@ class EffectScope {
|
|
|
187
197
|
last.index = this.index;
|
|
188
198
|
}
|
|
189
199
|
}
|
|
190
|
-
this.parent =
|
|
200
|
+
this.parent = void 0;
|
|
191
201
|
}
|
|
192
202
|
}
|
|
193
203
|
}
|
|
@@ -215,11 +225,11 @@ class ReactiveEffect {
|
|
|
215
225
|
/**
|
|
216
226
|
* @internal
|
|
217
227
|
*/
|
|
218
|
-
this.deps =
|
|
228
|
+
this.deps = void 0;
|
|
219
229
|
/**
|
|
220
230
|
* @internal
|
|
221
231
|
*/
|
|
222
|
-
this.depsTail =
|
|
232
|
+
this.depsTail = void 0;
|
|
223
233
|
/**
|
|
224
234
|
* @internal
|
|
225
235
|
*/
|
|
@@ -227,12 +237,12 @@ class ReactiveEffect {
|
|
|
227
237
|
/**
|
|
228
238
|
* @internal
|
|
229
239
|
*/
|
|
230
|
-
this.next =
|
|
240
|
+
this.next = void 0;
|
|
231
241
|
/**
|
|
232
242
|
* @internal
|
|
233
243
|
*/
|
|
234
|
-
this.cleanup =
|
|
235
|
-
this.scheduler =
|
|
244
|
+
this.cleanup = void 0;
|
|
245
|
+
this.scheduler = void 0;
|
|
236
246
|
if (activeEffectScope && activeEffectScope.active) {
|
|
237
247
|
activeEffectScope.effects.push(this);
|
|
238
248
|
}
|
|
@@ -290,7 +300,7 @@ class ReactiveEffect {
|
|
|
290
300
|
for (let link = this.deps; link; link = link.nextDep) {
|
|
291
301
|
removeSub(link);
|
|
292
302
|
}
|
|
293
|
-
this.deps = this.depsTail =
|
|
303
|
+
this.deps = this.depsTail = void 0;
|
|
294
304
|
cleanupEffect(this);
|
|
295
305
|
this.onStop && this.onStop();
|
|
296
306
|
this.flags &= -2;
|
|
@@ -339,10 +349,10 @@ function endBatch() {
|
|
|
339
349
|
}
|
|
340
350
|
if (batchedComputed) {
|
|
341
351
|
let e = batchedComputed;
|
|
342
|
-
batchedComputed =
|
|
352
|
+
batchedComputed = void 0;
|
|
343
353
|
while (e) {
|
|
344
354
|
const next = e.next;
|
|
345
|
-
e.next =
|
|
355
|
+
e.next = void 0;
|
|
346
356
|
e.flags &= -9;
|
|
347
357
|
e = next;
|
|
348
358
|
}
|
|
@@ -350,10 +360,10 @@ function endBatch() {
|
|
|
350
360
|
let error;
|
|
351
361
|
while (batchedSub) {
|
|
352
362
|
let e = batchedSub;
|
|
353
|
-
batchedSub =
|
|
363
|
+
batchedSub = void 0;
|
|
354
364
|
while (e) {
|
|
355
365
|
const next = e.next;
|
|
356
|
-
e.next =
|
|
366
|
+
e.next = void 0;
|
|
357
367
|
e.flags &= -9;
|
|
358
368
|
if (e.flags & 1) {
|
|
359
369
|
try {
|
|
@@ -389,7 +399,7 @@ function cleanupDeps(sub) {
|
|
|
389
399
|
head = link;
|
|
390
400
|
}
|
|
391
401
|
link.dep.activeLink = link.prevActiveLink;
|
|
392
|
-
link.prevActiveLink =
|
|
402
|
+
link.prevActiveLink = void 0;
|
|
393
403
|
link = prev;
|
|
394
404
|
}
|
|
395
405
|
sub.deps = head;
|
|
@@ -415,12 +425,11 @@ function refreshComputed(computed) {
|
|
|
415
425
|
return;
|
|
416
426
|
}
|
|
417
427
|
computed.globalVersion = globalVersion;
|
|
418
|
-
|
|
419
|
-
computed.flags |= 2;
|
|
420
|
-
if (dep.version > 0 && !computed.isSSR && computed.deps && !isDirty(computed)) {
|
|
421
|
-
computed.flags &= -3;
|
|
428
|
+
if (!computed.isSSR && computed.flags & 128 && (!computed.deps && !computed._dirty || !isDirty(computed))) {
|
|
422
429
|
return;
|
|
423
430
|
}
|
|
431
|
+
computed.flags |= 2;
|
|
432
|
+
const dep = computed.dep;
|
|
424
433
|
const prevSub = activeSub;
|
|
425
434
|
const prevShouldTrack = shouldTrack;
|
|
426
435
|
activeSub = computed;
|
|
@@ -429,6 +438,7 @@ function refreshComputed(computed) {
|
|
|
429
438
|
prepareDeps(computed);
|
|
430
439
|
const value = computed.fn(computed._value);
|
|
431
440
|
if (dep.version === 0 || hasChanged(value, computed._value)) {
|
|
441
|
+
computed.flags |= 128;
|
|
432
442
|
computed._value = value;
|
|
433
443
|
dep.version++;
|
|
434
444
|
}
|
|
@@ -446,11 +456,11 @@ function removeSub(link, soft = false) {
|
|
|
446
456
|
const { dep, prevSub, nextSub } = link;
|
|
447
457
|
if (prevSub) {
|
|
448
458
|
prevSub.nextSub = nextSub;
|
|
449
|
-
link.prevSub =
|
|
459
|
+
link.prevSub = void 0;
|
|
450
460
|
}
|
|
451
461
|
if (nextSub) {
|
|
452
462
|
nextSub.prevSub = prevSub;
|
|
453
|
-
link.nextSub =
|
|
463
|
+
link.nextSub = void 0;
|
|
454
464
|
}
|
|
455
465
|
if (dep.subsHead === link) {
|
|
456
466
|
dep.subsHead = nextSub;
|
|
@@ -472,11 +482,11 @@ function removeDep(link) {
|
|
|
472
482
|
const { prevDep, nextDep } = link;
|
|
473
483
|
if (prevDep) {
|
|
474
484
|
prevDep.nextDep = nextDep;
|
|
475
|
-
link.prevDep =
|
|
485
|
+
link.prevDep = void 0;
|
|
476
486
|
}
|
|
477
487
|
if (nextDep) {
|
|
478
488
|
nextDep.prevDep = prevDep;
|
|
479
|
-
link.nextDep =
|
|
489
|
+
link.nextDep = void 0;
|
|
480
490
|
}
|
|
481
491
|
}
|
|
482
492
|
function effect(fn, options) {
|
|
@@ -508,14 +518,14 @@ function pauseTracking() {
|
|
|
508
518
|
}
|
|
509
519
|
function resetTracking() {
|
|
510
520
|
const last = trackStack.pop();
|
|
511
|
-
shouldTrack = last ===
|
|
521
|
+
shouldTrack = last === void 0 ? true : last;
|
|
512
522
|
}
|
|
513
523
|
function cleanupEffect(e) {
|
|
514
524
|
const { cleanup } = e;
|
|
515
|
-
e.cleanup =
|
|
525
|
+
e.cleanup = void 0;
|
|
516
526
|
if (cleanup) {
|
|
517
527
|
const prevSub = activeSub;
|
|
518
|
-
activeSub =
|
|
528
|
+
activeSub = void 0;
|
|
519
529
|
try {
|
|
520
530
|
cleanup();
|
|
521
531
|
} finally {
|
|
@@ -530,32 +540,37 @@ class Link {
|
|
|
530
540
|
this.sub = sub;
|
|
531
541
|
this.dep = dep;
|
|
532
542
|
this.version = dep.version;
|
|
533
|
-
this.nextDep = this.prevDep = this.nextSub = this.prevSub = this.prevActiveLink =
|
|
543
|
+
this.nextDep = this.prevDep = this.nextSub = this.prevSub = this.prevActiveLink = void 0;
|
|
534
544
|
}
|
|
535
545
|
}
|
|
536
546
|
class Dep {
|
|
547
|
+
// TODO isolatedDeclarations "__v_skip"
|
|
537
548
|
constructor(computed) {
|
|
538
549
|
this.computed = computed;
|
|
539
550
|
this.version = 0;
|
|
540
551
|
/**
|
|
541
552
|
* Link between this dep and the current active effect
|
|
542
553
|
*/
|
|
543
|
-
this.activeLink =
|
|
554
|
+
this.activeLink = void 0;
|
|
544
555
|
/**
|
|
545
556
|
* Doubly linked list representing the subscribing effects (tail)
|
|
546
557
|
*/
|
|
547
|
-
this.subs =
|
|
558
|
+
this.subs = void 0;
|
|
548
559
|
/**
|
|
549
560
|
* For object property deps cleanup
|
|
550
561
|
*/
|
|
551
|
-
this.map =
|
|
552
|
-
this.key =
|
|
562
|
+
this.map = void 0;
|
|
563
|
+
this.key = void 0;
|
|
553
564
|
/**
|
|
554
565
|
* Subscriber counter
|
|
555
566
|
*/
|
|
556
567
|
this.sc = 0;
|
|
568
|
+
/**
|
|
569
|
+
* @internal
|
|
570
|
+
*/
|
|
571
|
+
this.__v_skip = true;
|
|
557
572
|
{
|
|
558
|
-
this.subsHead =
|
|
573
|
+
this.subsHead = void 0;
|
|
559
574
|
}
|
|
560
575
|
}
|
|
561
576
|
track(debugInfo) {
|
|
@@ -563,7 +578,7 @@ class Dep {
|
|
|
563
578
|
return;
|
|
564
579
|
}
|
|
565
580
|
let link = this.activeLink;
|
|
566
|
-
if (link ===
|
|
581
|
+
if (link === void 0 || link.sub !== activeSub) {
|
|
567
582
|
link = this.activeLink = new Link(activeSub, this);
|
|
568
583
|
if (!activeSub.deps) {
|
|
569
584
|
activeSub.deps = activeSub.depsTail = link;
|
|
@@ -582,7 +597,7 @@ class Dep {
|
|
|
582
597
|
link.prevDep.nextDep = next;
|
|
583
598
|
}
|
|
584
599
|
link.prevDep = activeSub.depsTail;
|
|
585
|
-
link.nextDep =
|
|
600
|
+
link.nextDep = void 0;
|
|
586
601
|
activeSub.depsTail.nextDep = link;
|
|
587
602
|
activeSub.depsTail = link;
|
|
588
603
|
if (activeSub.deps === link) {
|
|
@@ -650,7 +665,7 @@ function addSub(link) {
|
|
|
650
665
|
link.prevSub = currentTail;
|
|
651
666
|
if (currentTail) currentTail.nextSub = link;
|
|
652
667
|
}
|
|
653
|
-
if (link.dep.subsHead ===
|
|
668
|
+
if (link.dep.subsHead === void 0) {
|
|
654
669
|
link.dep.subsHead = link;
|
|
655
670
|
}
|
|
656
671
|
link.dep.subs = link;
|
|
@@ -721,7 +736,7 @@ function trigger(target, type, key, newValue, oldValue, oldTarget) {
|
|
|
721
736
|
}
|
|
722
737
|
});
|
|
723
738
|
} else {
|
|
724
|
-
if (key !==
|
|
739
|
+
if (key !== void 0 || depsMap.has(void 0)) {
|
|
725
740
|
run(depsMap.get(key));
|
|
726
741
|
}
|
|
727
742
|
if (isArrayIndex) {
|
|
@@ -788,7 +803,7 @@ const arrayInstrumentations = {
|
|
|
788
803
|
});
|
|
789
804
|
},
|
|
790
805
|
every(fn, thisArg) {
|
|
791
|
-
return apply(this, "every", fn, thisArg,
|
|
806
|
+
return apply(this, "every", fn, thisArg, void 0, arguments);
|
|
792
807
|
},
|
|
793
808
|
filter(fn, thisArg) {
|
|
794
809
|
return apply(this, "filter", fn, thisArg, (v) => v.map(toReactive), arguments);
|
|
@@ -797,17 +812,17 @@ const arrayInstrumentations = {
|
|
|
797
812
|
return apply(this, "find", fn, thisArg, toReactive, arguments);
|
|
798
813
|
},
|
|
799
814
|
findIndex(fn, thisArg) {
|
|
800
|
-
return apply(this, "findIndex", fn, thisArg,
|
|
815
|
+
return apply(this, "findIndex", fn, thisArg, void 0, arguments);
|
|
801
816
|
},
|
|
802
817
|
findLast(fn, thisArg) {
|
|
803
818
|
return apply(this, "findLast", fn, thisArg, toReactive, arguments);
|
|
804
819
|
},
|
|
805
820
|
findLastIndex(fn, thisArg) {
|
|
806
|
-
return apply(this, "findLastIndex", fn, thisArg,
|
|
821
|
+
return apply(this, "findLastIndex", fn, thisArg, void 0, arguments);
|
|
807
822
|
},
|
|
808
823
|
// flat, flatMap could benefit from ARRAY_ITERATE but are not straight-forward to implement
|
|
809
824
|
forEach(fn, thisArg) {
|
|
810
|
-
return apply(this, "forEach", fn, thisArg,
|
|
825
|
+
return apply(this, "forEach", fn, thisArg, void 0, arguments);
|
|
811
826
|
},
|
|
812
827
|
includes(...args) {
|
|
813
828
|
return searchProxy(this, "includes", args);
|
|
@@ -823,7 +838,7 @@ const arrayInstrumentations = {
|
|
|
823
838
|
return searchProxy(this, "lastIndexOf", args);
|
|
824
839
|
},
|
|
825
840
|
map(fn, thisArg) {
|
|
826
|
-
return apply(this, "map", fn, thisArg,
|
|
841
|
+
return apply(this, "map", fn, thisArg, void 0, arguments);
|
|
827
842
|
},
|
|
828
843
|
pop() {
|
|
829
844
|
return noTracking(this, "pop");
|
|
@@ -842,7 +857,7 @@ const arrayInstrumentations = {
|
|
|
842
857
|
},
|
|
843
858
|
// slice could use ARRAY_ITERATE but also seems to beg for range tracking
|
|
844
859
|
some(fn, thisArg) {
|
|
845
|
-
return apply(this, "some", fn, thisArg,
|
|
860
|
+
return apply(this, "some", fn, thisArg, void 0, arguments);
|
|
846
861
|
},
|
|
847
862
|
splice(...args) {
|
|
848
863
|
return noTracking(this, "splice", args);
|
|
@@ -1047,7 +1062,7 @@ class MutableReactiveHandler extends BaseReactiveHandler {
|
|
|
1047
1062
|
const oldValue = target[key];
|
|
1048
1063
|
const result = Reflect.deleteProperty(target, key);
|
|
1049
1064
|
if (result && hadKey) {
|
|
1050
|
-
trigger(target, "delete", key,
|
|
1065
|
+
trigger(target, "delete", key, void 0, oldValue);
|
|
1051
1066
|
}
|
|
1052
1067
|
return result;
|
|
1053
1068
|
}
|
|
@@ -1136,7 +1151,7 @@ function createReadonlyMethod(type) {
|
|
|
1136
1151
|
toRaw(this)
|
|
1137
1152
|
);
|
|
1138
1153
|
}
|
|
1139
|
-
return type === "delete" ? false : type === "clear" ?
|
|
1154
|
+
return type === "delete" ? false : type === "clear" ? void 0 : this;
|
|
1140
1155
|
};
|
|
1141
1156
|
}
|
|
1142
1157
|
function createInstrumentations(readonly, shallow) {
|
|
@@ -1242,10 +1257,10 @@ function createInstrumentations(readonly, shallow) {
|
|
|
1242
1257
|
} else {
|
|
1243
1258
|
checkIdentityKeys(target, has, key);
|
|
1244
1259
|
}
|
|
1245
|
-
const oldValue = get ? get.call(target, key) :
|
|
1260
|
+
const oldValue = get ? get.call(target, key) : void 0;
|
|
1246
1261
|
const result = target.delete(key);
|
|
1247
1262
|
if (hadKey) {
|
|
1248
|
-
trigger(target, "delete", key,
|
|
1263
|
+
trigger(target, "delete", key, void 0, oldValue);
|
|
1249
1264
|
}
|
|
1250
1265
|
return result;
|
|
1251
1266
|
},
|
|
@@ -1258,8 +1273,8 @@ function createInstrumentations(readonly, shallow) {
|
|
|
1258
1273
|
trigger(
|
|
1259
1274
|
target,
|
|
1260
1275
|
"clear",
|
|
1261
|
-
|
|
1262
|
-
|
|
1276
|
+
void 0,
|
|
1277
|
+
void 0,
|
|
1263
1278
|
oldTarget
|
|
1264
1279
|
);
|
|
1265
1280
|
}
|
|
@@ -1391,14 +1406,14 @@ function createReactiveObject(target, isReadonly2, baseHandlers, collectionHandl
|
|
|
1391
1406
|
if (target["__v_raw"] && !(isReadonly2 && target["__v_isReactive"])) {
|
|
1392
1407
|
return target;
|
|
1393
1408
|
}
|
|
1394
|
-
const existingProxy = proxyMap.get(target);
|
|
1395
|
-
if (existingProxy) {
|
|
1396
|
-
return existingProxy;
|
|
1397
|
-
}
|
|
1398
1409
|
const targetType = getTargetType(target);
|
|
1399
1410
|
if (targetType === 0 /* INVALID */) {
|
|
1400
1411
|
return target;
|
|
1401
1412
|
}
|
|
1413
|
+
const existingProxy = proxyMap.get(target);
|
|
1414
|
+
if (existingProxy) {
|
|
1415
|
+
return existingProxy;
|
|
1416
|
+
}
|
|
1402
1417
|
const proxy = new Proxy(
|
|
1403
1418
|
target,
|
|
1404
1419
|
targetType === 2 /* COLLECTION */ ? collectionHandlers : baseHandlers
|
|
@@ -1523,7 +1538,7 @@ function proxyRefs(objectWithRefs) {
|
|
|
1523
1538
|
class CustomRefImpl {
|
|
1524
1539
|
constructor(factory) {
|
|
1525
1540
|
this["__v_isRef"] = true;
|
|
1526
|
-
this._value =
|
|
1541
|
+
this._value = void 0;
|
|
1527
1542
|
const dep = this.dep = new Dep();
|
|
1528
1543
|
const { get, set } = factory(dep.track.bind(dep), dep.trigger.bind(dep));
|
|
1529
1544
|
this._get = get;
|
|
@@ -1555,11 +1570,11 @@ class ObjectRefImpl {
|
|
|
1555
1570
|
this._key = _key;
|
|
1556
1571
|
this._defaultValue = _defaultValue;
|
|
1557
1572
|
this["__v_isRef"] = true;
|
|
1558
|
-
this._value =
|
|
1573
|
+
this._value = void 0;
|
|
1559
1574
|
}
|
|
1560
1575
|
get value() {
|
|
1561
1576
|
const val = this._object[this._key];
|
|
1562
|
-
return this._value = val ===
|
|
1577
|
+
return this._value = val === void 0 ? this._defaultValue : val;
|
|
1563
1578
|
}
|
|
1564
1579
|
set value(newVal) {
|
|
1565
1580
|
this._object[this._key] = newVal;
|
|
@@ -1573,7 +1588,7 @@ class GetterRefImpl {
|
|
|
1573
1588
|
this._getter = _getter;
|
|
1574
1589
|
this["__v_isRef"] = true;
|
|
1575
1590
|
this["__v_isReadonly"] = true;
|
|
1576
|
-
this._value =
|
|
1591
|
+
this._value = void 0;
|
|
1577
1592
|
}
|
|
1578
1593
|
get value() {
|
|
1579
1594
|
return this._value = this._getter();
|
|
@@ -1602,7 +1617,7 @@ class ComputedRefImpl {
|
|
|
1602
1617
|
/**
|
|
1603
1618
|
* @internal
|
|
1604
1619
|
*/
|
|
1605
|
-
this._value =
|
|
1620
|
+
this._value = void 0;
|
|
1606
1621
|
/**
|
|
1607
1622
|
* @internal
|
|
1608
1623
|
*/
|
|
@@ -1616,11 +1631,11 @@ class ComputedRefImpl {
|
|
|
1616
1631
|
/**
|
|
1617
1632
|
* @internal
|
|
1618
1633
|
*/
|
|
1619
|
-
this.deps =
|
|
1634
|
+
this.deps = void 0;
|
|
1620
1635
|
/**
|
|
1621
1636
|
* @internal
|
|
1622
1637
|
*/
|
|
1623
|
-
this.depsTail =
|
|
1638
|
+
this.depsTail = void 0;
|
|
1624
1639
|
/**
|
|
1625
1640
|
* @internal
|
|
1626
1641
|
*/
|
|
@@ -1632,7 +1647,7 @@ class ComputedRefImpl {
|
|
|
1632
1647
|
/**
|
|
1633
1648
|
* @internal
|
|
1634
1649
|
*/
|
|
1635
|
-
this.next =
|
|
1650
|
+
this.next = void 0;
|
|
1636
1651
|
// for backwards compat
|
|
1637
1652
|
this.effect = this;
|
|
1638
1653
|
this["__v_isReadonly"] = !setter;
|
|
@@ -1699,7 +1714,7 @@ const TriggerOpTypes = {
|
|
|
1699
1714
|
};
|
|
1700
1715
|
const INITIAL_WATCHER_VALUE = {};
|
|
1701
1716
|
const cleanupMap = /* @__PURE__ */ new WeakMap();
|
|
1702
|
-
let activeWatcher =
|
|
1717
|
+
let activeWatcher = void 0;
|
|
1703
1718
|
function getCurrentWatcher() {
|
|
1704
1719
|
return activeWatcher;
|
|
1705
1720
|
}
|
|
@@ -1820,11 +1835,11 @@ function watch$1(source, cb, options = EMPTY_OBJ$1) {
|
|
|
1820
1835
|
oldValue === INITIAL_WATCHER_VALUE ? void 0 : isMultiSource && oldValue[0] === INITIAL_WATCHER_VALUE ? [] : oldValue,
|
|
1821
1836
|
boundCleanup
|
|
1822
1837
|
];
|
|
1838
|
+
oldValue = newValue;
|
|
1823
1839
|
call ? call(cb, 3, args) : (
|
|
1824
1840
|
// @ts-expect-error
|
|
1825
1841
|
cb(...args)
|
|
1826
1842
|
);
|
|
1827
|
-
oldValue = newValue;
|
|
1828
1843
|
} finally {
|
|
1829
1844
|
activeWatcher = currentWatcher;
|
|
1830
1845
|
}
|
|
@@ -1946,7 +1961,7 @@ let flushIndex = -1;
|
|
|
1946
1961
|
const pendingPostFlushCbs = [];
|
|
1947
1962
|
let activePostFlushCbs = null;
|
|
1948
1963
|
let postFlushIndex = 0;
|
|
1949
|
-
// eslint-disable-next-line spaced-comment
|
|
1964
|
+
// eslint-disable-next-line @stylistic/spaced-comment
|
|
1950
1965
|
const resolvedPromise = /*@__PURE__*/ Promise.resolve();
|
|
1951
1966
|
let currentFlushPromise = null;
|
|
1952
1967
|
const RECURSION_LIMIT = 100;
|
|
@@ -1990,11 +2005,8 @@ function flushPostFlushCbs() {
|
|
|
1990
2005
|
postFlushIndex = 0;
|
|
1991
2006
|
}
|
|
1992
2007
|
}
|
|
1993
|
-
function flushJobs(
|
|
1994
|
-
|
|
1995
|
-
{
|
|
1996
|
-
seen = seen || new Map();
|
|
1997
|
-
}
|
|
2008
|
+
function flushJobs() {
|
|
2009
|
+
const seen = new Map() ;
|
|
1998
2010
|
// Conditional usage of checkRecursiveUpdate must be determined out of
|
|
1999
2011
|
// try ... catch block since Rollup by default de-optimizes treeshaking
|
|
2000
2012
|
// inside try-catch. This can leave all warning code unshaked. Although
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* vue-mini v1.2.
|
|
2
|
+
* vue-mini v1.2.4
|
|
3
3
|
* https://github.com/vue-mini/vue-mini
|
|
4
4
|
* (c) 2019-present Yang Mingshan
|
|
5
5
|
* @license MIT
|
|
6
6
|
*/
|
|
7
7
|
"use strict";
|
|
8
|
-
/*! #__NO_SIDE_EFFECTS__ */function t(t){const e=Object.create(null);for(const s of t.split(","))e[s]=1;return t=>t in e}const e={},s=()=>{},n=Object.assign,i=Object.prototype.hasOwnProperty,o=(t,e)=>i.call(t,e),r=Array.isArray,c=t=>"[object Map]"===u(t),a=t=>"function"==typeof t,l=t=>"symbol"==typeof t,h=t=>null!==t&&"object"==typeof t,_=Object.prototype.toString,u=t=>_.call(t),f=t=>"string"==typeof t&&"NaN"!==t&&"-"!==t[0]&&""+parseInt(t,10)===t,p=(t,e)=>!Object.is(t,e);let d,E;class O{constructor(t=!1){this.detached=t,this._active=!0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.parent=d,!t&&d&&(this.index=(d.scopes||(d.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){let t,e;if(this._isPaused=!0,this.scopes)for(t=0,e=this.scopes.length;t<e;t++)this.scopes[t].pause();for(t=0,e=this.effects.length;t<e;t++)this.effects[t].pause()}}resume(){if(this._active&&this._isPaused){let t,e;if(this._isPaused=!1,this.scopes)for(t=0,e=this.scopes.length;t<e;t++)this.scopes[t].resume();for(t=0,e=this.effects.length;t<e;t++)this.effects[t].resume()}}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(this._active=!1,e=0,s=this.effects.length;e<s;e++)this.effects[e].stop();for(this.effects.length=0,e=0,s=this.cleanups.length;e<s;e++)this.cleanups[e]();if(this.cleanups.length=0,this.scopes){for(e=0,s=this.scopes.length;e<s;e++)this.scopes[e].stop(!0);this.scopes.length=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}}}function v(){return d}const g=new WeakSet;class S{constructor(t){this.fn=t,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.next=void 0,this.cleanup=void 0,this.scheduler=void 0,d&&d.active&&d.effects.push(this)}pause(){this.flags|=64}resume(){64&this.flags&&(this.flags&=-65,g.has(this)&&(g.delete(this),this.trigger()))}notify(){2&this.flags&&!(32&this.flags)||8&this.flags||T(this)}run(){if(!(1&this.flags))return this.fn();this.flags|=2,k(this),D(this);const t=E,e=w;E=this,w=!0;try{return this.fn()}finally{y(this),E=t,w=e,this.flags&=-3}}stop(){if(1&this.flags){for(let t=this.deps;t;t=t.nextDep)L(t);this.deps=this.depsTail=void 0,k(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){64&this.flags?g.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){x(this)&&this.run()}get dirty(){return x(this)}}let A,N,R=0;function T(t,e=!1){if(t.flags|=8,e)return t.next=N,void(N=t);t.next=A,A=t}function b(){R++}function m(){if(--R>0)return;if(N){let t=N;for(N=void 0;t;){const e=t.next;t.next=void 0,t.flags&=-9,t=e}}let t;for(;A;){let e=A;for(A=void 0;e;){const s=e.next;if(e.next=void 0,e.flags&=-9,1&e.flags)try{e.trigger()}catch(e){t||(t=e)}e=s}}if(t)throw t}function D(t){for(let e=t.deps;e;e=e.nextDep)e.version=-1,e.prevActiveLink=e.dep.activeLink,e.dep.activeLink=e}function y(t){let e,s=t.depsTail,n=s;for(;n;){const t=n.prevDep;-1===n.version?(n===s&&(s=t),L(n),P(n)):e=n,n.dep.activeLink=n.prevActiveLink,n.prevActiveLink=void 0,n=t}t.deps=e,t.depsTail=s}function x(t){for(let e=t.deps;e;e=e.nextDep)if(e.dep.version!==e.version||e.dep.computed&&(I(e.dep.computed)||e.dep.version!==e.version))return!0;return!!t._dirty}function I(t){if(4&t.flags&&!(16&t.flags))return;if(t.flags&=-17,t.globalVersion===M)return;t.globalVersion=M;const e=t.dep;if(t.flags|=2,e.version>0&&!t.isSSR&&t.deps&&!x(t))return void(t.flags&=-3);const s=E,n=w;E=t,w=!0;try{D(t);const s=t.fn(t._value);(0===e.version||p(s,t._value))&&(t._value=s,e.version++)}catch(t){throw e.version++,t}finally{E=s,w=n,y(t),t.flags&=-3}}function L(t,e=!1){const{dep:s,prevSub:n,nextSub:i}=t;if(n&&(n.nextSub=i,t.prevSub=void 0),i&&(i.prevSub=n,t.nextSub=void 0),s.subs===t&&(s.subs=n,!n&&s.computed)){s.computed.flags&=-5;for(let t=s.computed.deps;t;t=t.nextDep)L(t,!0)}e||--s.sc||!s.map||s.map.delete(s.key)}function P(t){const{prevDep:e,nextDep:s}=t;e&&(e.nextDep=s,t.prevDep=void 0),s&&(s.prevDep=e,t.nextDep=void 0)}let w=!0;const H=[];function C(){H.push(w),w=!1}function U(){const t=H.pop();w=void 0===t||t}function k(t){const{cleanup:e}=t;if(t.cleanup=void 0,e){const t=E;E=void 0;try{e()}finally{E=t}}}let M=0;class j{constructor(t,e){this.sub=t,this.dep=e,this.version=e.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class W{constructor(t){this.computed=t,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0}track(t){if(!E||!w||E===this.computed)return;let e=this.activeLink;if(void 0===e||e.sub!==E)e=this.activeLink=new j(E,this),E.deps?(e.prevDep=E.depsTail,E.depsTail.nextDep=e,E.depsTail=e):E.deps=E.depsTail=e,V(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=E.depsTail,e.nextDep=void 0,E.depsTail.nextDep=e,E.depsTail=e,E.deps===e&&(E.deps=t)}return e}trigger(t){this.version++,M++,this.notify(t)}notify(t){b();try{0;for(let t=this.subs;t;t=t.prevSub)t.sub.notify()&&t.sub.dep.notify()}finally{m()}}}function V(t){if(t.dep.sc++,4&t.sub.flags){const e=t.dep.computed;if(e&&!t.dep.subs){e.flags|=20;for(let t=e.deps;t;t=t.nextDep)V(t)}const s=t.dep.subs;s!==t&&(t.prevSub=s,s&&(s.nextSub=t)),t.dep.subs=t}}const G=new WeakMap,F=Symbol(""),B=Symbol(""),Q=Symbol("");function Y(t,e,s){if(w&&E){let e=G.get(t);e||G.set(t,e=new Map);let n=e.get(s);n||(e.set(s,n=new W),n.map=e,n.key=s),n.track()}}function X(t,e,s,n,i,o){const a=G.get(t);if(!a)return void M++;const h=t=>{t&&t.trigger()};if(b(),"clear"===e)a.forEach(h);else{const i=r(t),o=i&&f(s);if(i&&"length"===s){const t=Number(n);a.forEach(((e,s)=>{("length"===s||s===Q||!l(s)&&s>=t)&&h(e)}))}else switch((void 0!==s||a.has(void 0))&&h(a.get(s)),o&&h(a.get(Q)),e){case"add":i?o&&h(a.get("length")):(h(a.get(F)),c(t)&&h(a.get(B)));break;case"delete":i||(h(a.get(F)),c(t)&&h(a.get(B)));break;case"set":c(t)&&h(a.get(F))}}m()}function Z(t){const e=Ct(t);return e===t?e:(Y(e,0,Q),wt(t)?e:e.map(Ut))}function z(t){return Y(t=Ct(t),0,Q),t}const J={__proto__:null,[Symbol.iterator](){return K(this,Symbol.iterator,Ut)},concat(...t){return Z(this).concat(...t.map((t=>r(t)?Z(t):t)))},entries(){return K(this,"entries",(t=>(t[1]=Ut(t[1]),t)))},every(t,e){return q(this,"every",t,e,void 0,arguments)},filter(t,e){return q(this,"filter",t,e,(t=>t.map(Ut)),arguments)},find(t,e){return q(this,"find",t,e,Ut,arguments)},findIndex(t,e){return q(this,"findIndex",t,e,void 0,arguments)},findLast(t,e){return q(this,"findLast",t,e,Ut,arguments)},findLastIndex(t,e){return q(this,"findLastIndex",t,e,void 0,arguments)},forEach(t,e){return q(this,"forEach",t,e,void 0,arguments)},includes(...t){return et(this,"includes",t)},indexOf(...t){return et(this,"indexOf",t)},join(t){return Z(this).join(t)},lastIndexOf(...t){return et(this,"lastIndexOf",t)},map(t,e){return q(this,"map",t,e,void 0,arguments)},pop(){return st(this,"pop")},push(...t){return st(this,"push",t)},reduce(t,...e){return tt(this,"reduce",t,e)},reduceRight(t,...e){return tt(this,"reduceRight",t,e)},shift(){return st(this,"shift")},some(t,e){return q(this,"some",t,e,void 0,arguments)},splice(...t){return st(this,"splice",t)},toReversed(){return Z(this).toReversed()},toSorted(t){return Z(this).toSorted(t)},toSpliced(...t){return Z(this).toSpliced(...t)},unshift(...t){return st(this,"unshift",t)},values(){return K(this,"values",Ut)}};function K(t,e,s){const n=z(t),i=n[e]();return n===t||wt(t)||(i._next=i.next,i.next=()=>{const t=i._next();return t.value&&(t.value=s(t.value)),t}),i}const $=Array.prototype;function q(t,e,s,n,i,o){const r=z(t),c=r!==t&&!wt(t),a=r[e];if(a!==$[e]){const e=a.apply(t,o);return c?Ut(e):e}let l=s;r!==t&&(c?l=function(e,n){return s.call(this,Ut(e),n,t)}:s.length>2&&(l=function(e,n){return s.call(this,e,n,t)}));const h=a.call(r,l,n);return c&&i?i(h):h}function tt(t,e,s,n){const i=z(t);let o=s;return i!==t&&(wt(t)?s.length>3&&(o=function(e,n,i){return s.call(this,e,n,i,t)}):o=function(e,n,i){return s.call(this,e,Ut(n),i,t)}),i[e](o,...n)}function et(t,e,s){const n=Ct(t);Y(n,0,Q);const i=n[e](...s);return-1!==i&&!1!==i||!Ht(s[0])?i:(s[0]=Ct(s[0]),n[e](...s))}function st(t,e,s=[]){C(),b();const n=Ct(t)[e].apply(t,s);return m(),U(),n}const nt=t("__proto__,__v_isRef,__isVue"),it=new Set(Object.getOwnPropertyNames(Symbol).filter((t=>"arguments"!==t&&"caller"!==t)).map((t=>Symbol[t])).filter(l));function ot(t){l(t)||(t=String(t));const e=Ct(this);return Y(e,0,t),e.hasOwnProperty(t)}class rt{constructor(t=!1,e=!1){this._isReadonly=t,this._isShallow=e}get(t,e,s){if("__v_skip"===e)return t.__v_skip;const n=this._isReadonly,i=this._isShallow;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?bt:Tt:i?Rt:Nt).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(s)?t:void 0;const o=r(t);if(!n){let t;if(o&&(t=J[e]))return t;if("hasOwnProperty"===e)return ot}const c=Reflect.get(t,e,Mt(t)?t:s);return(l(e)?it.has(e):nt(e))?c:(n||Y(t,0,e),i?c:Mt(c)?o&&f(e)?c:c.value:h(c)?n?xt(c):Dt(c):c)}}class ct extends rt{constructor(t=!1){super(!1,t)}set(t,e,s,n){let i=t[e];if(!this._isShallow){const e=Pt(i);if(wt(s)||Pt(s)||(i=Ct(i),s=Ct(s)),!r(t)&&Mt(i)&&!Mt(s))return!e&&(i.value=s,!0)}const c=r(t)&&f(e)?Number(e)<t.length:o(t,e),a=Reflect.set(t,e,s,Mt(t)?t:n);return t===Ct(n)&&(c?p(s,i)&&X(t,"set",e,s):X(t,"add",e,s)),a}deleteProperty(t,e){const s=o(t,e),n=Reflect.deleteProperty(t,e);return n&&s&&X(t,"delete",e,void 0),n}has(t,e){const s=Reflect.has(t,e);return l(e)&&it.has(e)||Y(t,0,e),s}ownKeys(t){return Y(t,0,r(t)?"length":F),Reflect.ownKeys(t)}}class at extends rt{constructor(t=!1){super(!0,t)}set(t,e){return!0}deleteProperty(t,e){return!0}}const lt=new ct,ht=new at,_t=new ct(!0),ut=new at(!0),ft=t=>t,pt=t=>Reflect.getPrototypeOf(t);function dt(t){return function(...e){return"delete"!==t&&("clear"===t?void 0:this)}}function Et(t,e){const s={get(s){const n=this.__v_raw,i=Ct(n),o=Ct(s);t||(p(s,o)&&Y(i,0,s),Y(i,0,o));const{has:r}=pt(i),c=e?ft:t?kt:Ut;return r.call(i,s)?c(n.get(s)):r.call(i,o)?c(n.get(o)):void(n!==i&&n.get(s))},get size(){const e=this.__v_raw;return!t&&Y(Ct(e),0,F),Reflect.get(e,"size",e)},has(e){const s=this.__v_raw,n=Ct(s),i=Ct(e);return t||(p(e,i)&&Y(n,0,e),Y(n,0,i)),e===i?s.has(e):s.has(e)||s.has(i)},forEach(s,n){const i=this,o=i.__v_raw,r=Ct(o),c=e?ft:t?kt:Ut;return!t&&Y(r,0,F),o.forEach(((t,e)=>s.call(n,c(t),c(e),i)))}};n(s,t?{add:dt("add"),set:dt("set"),delete:dt("delete"),clear:dt("clear")}:{add(t){e||wt(t)||Pt(t)||(t=Ct(t));const s=Ct(this);return pt(s).has.call(s,t)||(s.add(t),X(s,"add",t,t)),this},set(t,s){e||wt(s)||Pt(s)||(s=Ct(s));const n=Ct(this),{has:i,get:o}=pt(n);let r=i.call(n,t);r||(t=Ct(t),r=i.call(n,t));const c=o.call(n,t);return n.set(t,s),r?p(s,c)&&X(n,"set",t,s):X(n,"add",t,s),this},delete(t){const e=Ct(this),{has:s,get:n}=pt(e);let i=s.call(e,t);i||(t=Ct(t),i=s.call(e,t)),n&&n.call(e,t);const o=e.delete(t);return i&&X(e,"delete",t,void 0),o},clear(){const t=Ct(this),e=0!==t.size,s=t.clear();return e&&X(t,"clear",void 0,void 0),s}});return["keys","values","entries",Symbol.iterator].forEach((n=>{s[n]=function(t,e,s){return function(...n){const i=this.__v_raw,o=Ct(i),r=c(o),a="entries"===t||t===Symbol.iterator&&r,l="keys"===t&&r,h=i[t](...n),_=s?ft:e?kt:Ut;return!e&&Y(o,0,l?B:F),{next(){const{value:t,done:e}=h.next();return e?{value:t,done:e}:{value:a?[_(t[0]),_(t[1])]:_(t),done:e}},[Symbol.iterator](){return this}}}}(n,t,e)})),s}function Ot(t,e){const s=Et(t,e);return(e,n,i)=>"__v_isReactive"===n?!t:"__v_isReadonly"===n?t:"__v_raw"===n?e:Reflect.get(o(s,n)&&n in e?s:e,n,i)}const vt={get:Ot(!1,!1)},gt={get:Ot(!1,!0)},St={get:Ot(!0,!1)},At={get:Ot(!0,!0)},Nt=new WeakMap,Rt=new WeakMap,Tt=new WeakMap,bt=new WeakMap;function mt(t){return t.__v_skip||!Object.isExtensible(t)?0:function(t){switch(t){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}((t=>u(t).slice(8,-1))(t))}function Dt(t){return Pt(t)?t:It(t,!1,lt,vt,Nt)}function yt(t){return It(t,!1,_t,gt,Rt)}function xt(t){return It(t,!0,ht,St,Tt)}function It(t,e,s,n,i){if(!h(t))return t;if(t.__v_raw&&(!e||!t.__v_isReactive))return t;const o=i.get(t);if(o)return o;const r=mt(t);if(0===r)return t;const c=new Proxy(t,2===r?n:s);return i.set(t,c),c}function Lt(t){return Pt(t)?Lt(t.__v_raw):!(!t||!t.__v_isReactive)}function Pt(t){return!(!t||!t.__v_isReadonly)}function wt(t){return!(!t||!t.__v_isShallow)}function Ht(t){return!!t&&!!t.__v_raw}function Ct(t){const e=t&&t.__v_raw;return e?Ct(e):t}const Ut=t=>h(t)?Dt(t):t,kt=t=>h(t)?xt(t):t;function Mt(t){return!!t&&!0===t.__v_isRef}function jt(t){return Wt(t,!1)}function Wt(t,e){return Mt(t)?t:new Vt(t,e)}class Vt{constructor(t,e){this.dep=new W,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=e?t:Ct(t),this._value=e?t:Ut(t),this.__v_isShallow=e}get value(){return this.dep.track(),this._value}set value(t){const e=this._rawValue,s=this.__v_isShallow||wt(t)||Pt(t);t=s?t:Ct(t),p(t,e)&&(this._rawValue=t,this._value=s?t:Ut(t),this.dep.trigger())}}function Gt(t){return Mt(t)?t.value:t}const Ft={get:(t,e,s)=>"__v_raw"===e?t:Gt(Reflect.get(t,e,s)),set:(t,e,s,n)=>{const i=t[e];return Mt(i)&&!Mt(s)?(i.value=s,!0):Reflect.set(t,e,s,n)}};class Bt{constructor(t){this.__v_isRef=!0,this._value=void 0;const e=this.dep=new W,{get:s,set:n}=t(e.track.bind(e),e.trigger.bind(e));this._get=s,this._set=n}get value(){return this._value=this._get()}set value(t){this._set(t)}}class Qt{constructor(t,e,s){this._object=t,this._key=e,this._defaultValue=s,this.__v_isRef=!0,this._value=void 0}get value(){const t=this._object[this._key];return this._value=void 0===t?this._defaultValue:t}set value(t){this._object[this._key]=t}get dep(){return function(t,e){const s=G.get(t);return s&&s.get(e)}(Ct(this._object),this._key)}}class Yt{constructor(t){this._getter=t,this.__v_isRef=!0,this.__v_isReadonly=!0,this._value=void 0}get value(){return this._value=this._getter()}}function Xt(t,e,s){const n=t[e];return Mt(n)?n:new Qt(t,e,s)}class Zt{constructor(t,e,s){this.fn=t,this.setter=e,this._value=void 0,this.dep=new W(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=M-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!e,this.isSSR=s}notify(){if(this.flags|=16,!(8&this.flags)&&E!==this)return T(this,!0),!0}get value(){const t=this.dep.track();return I(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}const zt={},Jt=new WeakMap;let Kt;function $t(t,e=!1,s=Kt){if(s){let e=Jt.get(s);e||Jt.set(s,e=[]),e.push(t)}}function qt(t,e=1/0,s){if(e<=0||!h(t)||t.__v_skip)return t;if((s=s||new Set).has(t))return t;if(s.add(t),e--,Mt(t))qt(t.value,e,s);else if(r(t))for(let n=0;n<t.length;n++)qt(t[n],e,s);else if("[object Set]"===u(t)||c(t))t.forEach((t=>{qt(t,e,s)}));else if((t=>"[object Object]"===u(t))(t)){for(const n in t)qt(t[n],e,s);for(const n of Object.getOwnPropertySymbols(t))Object.prototype.propertyIsEnumerable.call(t,n)&&qt(t[n],e,s)}return t}const te={},{isArray:ee}=Array,se=Object.assign;function ne(t,e){const s={};return Object.keys(t).forEach((n=>{e.includes(n)||(s[n]=t[n])})),s}function ie(t){return Object.prototype.toString.call(t).slice(8,-1)}function oe(t){return"function"==typeof t}function re(t){return`__${t}__`}var ce;!function(t){t[t.QUEUED=1]="QUEUED",t[t.ALLOW_RECURSE=4]="ALLOW_RECURSE"}(ce||(ce={}));const ae=[];let le=-1;const he=[];let _e=null,ue=0;const fe=Promise.resolve();let pe=null;function de(t){t.flags&ce.QUEUED||(ae.push(t),t.flags|=ce.QUEUED,pe||(pe=fe.then(Oe)))}function Ee(){if(he.length>0){for(_e=[...new Set(he)],he.length=0,ue=0;ue<_e.length;ue++){const t=_e[ue];t.flags&ce.ALLOW_RECURSE&&(t.flags&=~ce.QUEUED),t(),t.flags&=~ce.QUEUED}_e=null,ue=0}}function Oe(t){try{for(le=0;le<ae.length;le++){const t=ae[le];0,t.flags&ce.ALLOW_RECURSE&&(t.flags&=~ce.QUEUED),t(),t.flags&ce.ALLOW_RECURSE||(t.flags&=~ce.QUEUED)}}finally{for(;le<ae.length;le++){ae[le].flags&=~ce.QUEUED}le=-1,ae.length=0,pe=null}}function ve(t,e,s){return ge(t,e,s)}function ge(t,n,i=te){const{flush:o}=i,c=se({},i);"post"===o?c.scheduler=t=>{!function(t){t.flags&ce.QUEUED||(he.push(t),t.flags|=ce.QUEUED)}(t)}:"sync"!==o&&(c.scheduler=(t,e)=>{e?t():de(t)}),c.augmentJob=t=>{n&&(t.flags|=ce.ALLOW_RECURSE)};const l=function(t,n,i=e){const{immediate:o,deep:c,once:l,scheduler:h,augmentJob:_,call:u}=i,f=t=>c?t:wt(t)||!1===c||0===c?qt(t,1):qt(t);let d,E,O,g,A=!1,N=!1;if(Mt(t)?(E=()=>t.value,A=wt(t)):Lt(t)?(E=()=>f(t),A=!0):r(t)?(N=!0,A=t.some((t=>Lt(t)||wt(t))),E=()=>t.map((t=>Mt(t)?t.value:Lt(t)?f(t):a(t)?u?u(t,2):t():void 0))):E=a(t)?n?u?()=>u(t,2):t:()=>{if(O){C();try{O()}finally{U()}}const e=Kt;Kt=d;try{return u?u(t,3,[g]):t(g)}finally{Kt=e}}:s,n&&c){const t=E,e=!0===c?1/0:c;E=()=>qt(t(),e)}const R=v(),T=()=>{d.stop(),R&&R.active&&((t,e)=>{const s=t.indexOf(e);s>-1&&t.splice(s,1)})(R.effects,d)};if(l&&n){const t=n;n=(...e)=>{t(...e),T()}}let b=N?new Array(t.length).fill(zt):zt;const m=t=>{if(1&d.flags&&(d.dirty||t))if(n){const t=d.run();if(c||A||(N?t.some(((t,e)=>p(t,b[e]))):p(t,b))){O&&O();const e=Kt;Kt=d;try{const e=[t,b===zt?void 0:N&&b[0]===zt?[]:b,g];u?u(n,3,e):n(...e),b=t}finally{Kt=e}}}else d.run()};return _&&_(m),d=new S(E),d.scheduler=h?()=>h(m,!1):m,g=t=>$t(t,!1,d),O=d.onStop=()=>{const t=Jt.get(d);if(t){if(u)u(t,4);else for(const e of t)e();Jt.delete(d)}},n?o?m(!0):b=d.run():h?h(m.bind(null,!0),!0):d.run(),T.pause=d.pause.bind(d),T.resume=d.resume.bind(d),T.stop=T,T}(t,n,c);return l}const Se=Object.create(null);let Ae=null,Ne=null,Re=null;function Te(){return Ne||Re}var be,me,De;function ye(t,e){const s=t[e];return function(...t){const n=this[re(e)];n&&n.forEach((e=>e(...t))),void 0!==s&&s.call(this,...t)}}function xe(t){if(function(t){const e=new Set(["undefined","boolean","number","string"]);return null===t||e.has(typeof t)}(t)||oe(t))return t;if(Mt(t))return xe(t.value);if(Ht(t))return xe(Ct(t));if(ee(t))return t.map((t=>xe(t)));if(function(t){return"Object"===ie(t)}(t)){const e={};return Object.keys(t).forEach((s=>{e[s]=xe(t[s])})),e}throw new TypeError(`${ie(t)} value is not supported`)}function Ie(t,e){var s;null!==(s=e)&&"object"==typeof s&&ve(Mt(e)?e:()=>e,(()=>{this.setData({[t]:xe(e)},Ee)}),{deep:!0})}function Le(t,e){const s=t[e];return function(...t){const n=this[re(e)];n&&n.forEach((e=>e(...t))),void 0!==s&&s.call(this,...t)}}!function(t){t.ON_LAUNCH="onLaunch",t.ON_SHOW="onShow",t.ON_HIDE="onHide",t.ON_ERROR="onError",t.ON_PAGE_NOT_FOUND="onPageNotFound",t.ON_UNHANDLED_REJECTION="onUnhandledRejection",t.ON_THEME_CHANGE="onThemeChange"}(be||(be={})),function(t){t.ON_LOAD="onLoad",t.ON_SHOW="onShow",t.ON_READY="onReady",t.ON_HIDE="onHide",t.ON_UNLOAD="onUnload",t.ON_ROUTE_DONE="onRouteDone",t.ON_PULL_DOWN_REFRESH="onPullDownRefresh",t.ON_REACH_BOTTOM="onReachBottom",t.ON_PAGE_SCROLL="onPageScroll",t.ON_SHARE_APP_MESSAGE="onShareAppMessage",t.ON_SHARE_TIMELINE="onShareTimeline",t.ON_ADD_TO_FAVORITES="onAddToFavorites",t.ON_RESIZE="onResize",t.ON_TAB_ITEM_TAP="onTabItemTap",t.ON_SAVE_EXIT_STATE="onSaveExitState"}(me||(me={})),function(t){t.ATTACHED="attached",t.READY="ready",t.MOVED="moved",t.DETACHED="detached",t.ERROR="error"}(De||(De={}));const Pe={[me.ON_SHOW]:"show",[me.ON_HIDE]:"hide",[me.ON_RESIZE]:"resize",[me.ON_ROUTE_DONE]:"routeDone",[De.READY]:me.ON_READY};function we(t,e){return Ue(e,t.lifetimes[e]||t[e])}function He(t,e){return Ue(e,t.methods[e])}function Ce(t,e){return Ue(e,t.pageLifetimes[Pe[e]])}function Ue(t,e){const s=re(t);return function(...t){const n=this[s];n&&n.forEach((e=>e(...t))),void 0!==e&&e.call(this,...t)}}const ke=es(be.ON_SHOW),Me=es(be.ON_HIDE),je=es(be.ON_ERROR),We=es(be.ON_PAGE_NOT_FOUND),Ve=es(be.ON_UNHANDLED_REJECTION),Ge=es(be.ON_THEME_CHANGE),Fe=ss(me.ON_SHOW),Be=ss(me.ON_HIDE),Qe=ss(me.ON_UNLOAD),Ye=ss(me.ON_ROUTE_DONE),Xe=ss(me.ON_PULL_DOWN_REFRESH),Ze=ss(me.ON_REACH_BOTTOM),ze=ss(me.ON_RESIZE),Je=ss(me.ON_TAB_ITEM_TAP),Ke=ns(me.ON_LOAD),$e=ns(De.MOVED),qe=ns(De.DETACHED),ts=ns(De.ERROR);function es(t){return e=>{Ae&&is(Ae,t,e)}}function ss(t){return e=>{const s=Te();s&&is(s,t,e)}}function ns(t){return e=>{Re&&is(Re,t,e)}}function is(t,e,s){const n=re(e);void 0===t[n]&&(t[n]=[]),t[n].push(s)}exports.EffectScope=O,exports.ReactiveEffect=S,exports.TrackOpTypes={GET:"get",HAS:"has",ITERATE:"iterate"},exports.TriggerOpTypes={SET:"set",ADD:"add",DELETE:"delete",CLEAR:"clear"},exports.computed=function(t,e,s=!1){let n,i;return a(t)?n=t:(n=t.get,i=t.set),new Zt(n,i,s)},exports.createApp=function(t){let e,s;if(oe(t))e=t,s={};else{if(void 0===t.setup)return void App(t);e=t.setup,s=ne(t,["setup"])}const n=s[be.ON_LAUNCH];s[be.ON_LAUNCH]=function(t){Ae=this;const s=e(t);void 0!==s&&Object.keys(s).forEach((t=>{this[t]=s[t]})),Ae=null,void 0!==n&&n.call(this,t)},s[be.ON_SHOW]=ye(s,be.ON_SHOW),s[be.ON_HIDE]=ye(s,be.ON_HIDE),s[be.ON_ERROR]=ye(s,be.ON_ERROR),s[be.ON_PAGE_NOT_FOUND]=ye(s,be.ON_PAGE_NOT_FOUND),s[be.ON_UNHANDLED_REJECTION]=ye(s,be.ON_UNHANDLED_REJECTION),s[be.ON_THEME_CHANGE]=ye(s,be.ON_THEME_CHANGE),App(s)},exports.customRef=function(t){return new Bt(t)},exports.defineComponent=function(t,e){let s,n;e=se({listenPageScroll:!1,canShareToOthers:!1,canShareToTimeline:!1},e);let i=null;if(oe(t))s=t,n={};else{if(void 0===t.setup)return Component(t);s=t.setup,n=ne(t,["setup"]),n.properties&&(i=Object.keys(n.properties))}void 0===n.lifetimes&&(n.lifetimes={});const o=n.lifetimes[De.ATTACHED]||n[De.ATTACHED];n.lifetimes[De.ATTACHED]=function(){var t;this.__scope__=new O,Re=t=this,t.__scope__.on();const e={};i&&i.forEach((t=>{e[t]=this.data[t]})),this.__props__=yt(e);const n={is:this.is,id:this.id,dataset:this.dataset,exitState:this.exitState,router:this.router,pageRouter:this.pageRouter,renderer:this.renderer,triggerEvent:this.triggerEvent.bind(this),createSelectorQuery:this.createSelectorQuery.bind(this),createIntersectionObserver:this.createIntersectionObserver.bind(this),createMediaQueryObserver:this.createMediaQueryObserver.bind(this),selectComponent:this.selectComponent.bind(this),selectAllComponents:this.selectAllComponents.bind(this),selectOwnerComponent:this.selectOwnerComponent.bind(this),getRelationNodes:this.getRelationNodes.bind(this),getTabBar:this.getTabBar.bind(this),getPageId:this.getPageId.bind(this),animate:this.animate.bind(this),clearAnimation:this.clearAnimation.bind(this),getOpenerEventChannel:this.getOpenerEventChannel.bind(this),applyAnimatedStyle:this.applyAnimatedStyle.bind(this),clearAnimatedStyle:this.clearAnimatedStyle.bind(this),setUpdatePerformanceListener:this.setUpdatePerformanceListener.bind(this),getPassiveEvent:this.getPassiveEvent.bind(this),setPassiveEvent:this.setPassiveEvent.bind(this),setInitialRenderingCache:this.setInitialRenderingCache.bind(this),getAppBar:this.getAppBar&&this.getAppBar.bind(this)},r=s(this.__props__,n);if(void 0!==r){let t;Object.keys(r).forEach((e=>{const s=r[e];oe(s)?this[e]=s:(t=t||{},t[e]=xe(s),Ie.call(this,e,s))})),void 0!==t&&this.setData(t,Ee)}Re&&Re.__scope__.off(),Re=null,void 0!==o&&o.call(this)};const r=we(n,De.DETACHED);return n.lifetimes[De.DETACHED]=function(){r.call(this),this.__scope__.stop()},n.lifetimes[De.READY]=Ue(Pe[De.READY],n.lifetimes[De.READY]||n[De.READY]),n.lifetimes[De.MOVED]=we(n,De.MOVED),n.lifetimes[De.ERROR]=we(n,De.ERROR),void 0===n.methods&&(n.methods={}),(n.methods[me.ON_PAGE_SCROLL]||e.listenPageScroll)&&(n.methods[me.ON_PAGE_SCROLL]=He(n,me.ON_PAGE_SCROLL),n.methods.__listenPageScroll__=()=>!0),void 0===n.methods[me.ON_SHARE_APP_MESSAGE]&&e.canShareToOthers&&(n.methods[me.ON_SHARE_APP_MESSAGE]=function(t){const e=this[re(me.ON_SHARE_APP_MESSAGE)];return e?e(t):{}},n.methods.__isInjectedShareToOthersHook__=()=>!0),void 0===n.methods[me.ON_SHARE_TIMELINE]&&e.canShareToTimeline&&(n.methods[me.ON_SHARE_TIMELINE]=function(){const t=this[re(me.ON_SHARE_TIMELINE)];return t?t():{}},n.methods.__isInjectedShareToTimelineHook__=()=>!0),void 0===n.methods[me.ON_ADD_TO_FAVORITES]&&(n.methods[me.ON_ADD_TO_FAVORITES]=function(t){const e=this[re(me.ON_ADD_TO_FAVORITES)];return e?e(t):{}},n.methods.__isInjectedFavoritesHook__=()=>!0),void 0===n.methods[me.ON_SAVE_EXIT_STATE]&&(n.methods[me.ON_SAVE_EXIT_STATE]=function(){const t=this[re(me.ON_SAVE_EXIT_STATE)];return t?t():{data:void 0}},n.methods.__isInjectedExitStateHook__=()=>!0),n.methods[me.ON_LOAD]=He(n,me.ON_LOAD),n.methods[me.ON_PULL_DOWN_REFRESH]=He(n,me.ON_PULL_DOWN_REFRESH),n.methods[me.ON_REACH_BOTTOM]=He(n,me.ON_REACH_BOTTOM),n.methods[me.ON_TAB_ITEM_TAP]=He(n,me.ON_TAB_ITEM_TAP),void 0===n.pageLifetimes&&(n.pageLifetimes={}),n.pageLifetimes[Pe[me.ON_SHOW]]=Ce(n,me.ON_SHOW),n.pageLifetimes[Pe[me.ON_HIDE]]=Ce(n,me.ON_HIDE),n.pageLifetimes[Pe[me.ON_RESIZE]]=Ce(n,me.ON_RESIZE),n.pageLifetimes[Pe[me.ON_ROUTE_DONE]]=Ce(n,me.ON_ROUTE_DONE),i&&(void 0===n.observers&&(n.observers={}),i.forEach((t=>{const e=n.observers[t];n.observers[t]=function(s){this.__props__&&(this.__props__[t]=s),void 0!==e&&e.call(this,s)}}))),Component(n)},exports.definePage=function(t,e){let s,n;if(e=se({listenPageScroll:!1,canShareToOthers:!1,canShareToTimeline:!1},e),oe(t))s=t,n={};else{if(void 0===t.setup)return void Page(t);s=t.setup,n=ne(t,["setup"])}const i=n[me.ON_LOAD];n[me.ON_LOAD]=function(t){var e;this.__scope__=new O,Ne=e=this,e.__scope__.on();const n={is:this.is,route:this.route,options:this.options,exitState:this.exitState,router:this.router,pageRouter:this.pageRouter,renderer:this.renderer,createSelectorQuery:this.createSelectorQuery.bind(this),createIntersectionObserver:this.createIntersectionObserver.bind(this),createMediaQueryObserver:this.createMediaQueryObserver.bind(this),selectComponent:this.selectComponent.bind(this),selectAllComponents:this.selectAllComponents.bind(this),getTabBar:this.getTabBar.bind(this),getPageId:this.getPageId.bind(this),animate:this.animate.bind(this),clearAnimation:this.clearAnimation.bind(this),getOpenerEventChannel:this.getOpenerEventChannel.bind(this),applyAnimatedStyle:this.applyAnimatedStyle.bind(this),clearAnimatedStyle:this.clearAnimatedStyle.bind(this),setUpdatePerformanceListener:this.setUpdatePerformanceListener.bind(this),getPassiveEvent:this.getPassiveEvent.bind(this),setPassiveEvent:this.setPassiveEvent.bind(this),setInitialRenderingCache:this.setInitialRenderingCache.bind(this),getAppBar:this.getAppBar&&this.getAppBar.bind(this)},o=s(t,n);if(void 0!==o){let t;Object.keys(o).forEach((e=>{const s=o[e];oe(s)?this[e]=s:(t=t||{},t[e]=xe(s),Ie.call(this,e,s))})),void 0!==t&&this.setData(t,Ee)}Ne&&Ne.__scope__.off(),Ne=null,void 0!==i&&i.call(this,t)};const o=Le(n,me.ON_UNLOAD);n[me.ON_UNLOAD]=function(){o.call(this),this.__scope__.stop()},(n[me.ON_PAGE_SCROLL]||e.listenPageScroll)&&(n[me.ON_PAGE_SCROLL]=Le(n,me.ON_PAGE_SCROLL),n.__listenPageScroll__=()=>!0),void 0===n[me.ON_SHARE_APP_MESSAGE]&&e.canShareToOthers&&(n[me.ON_SHARE_APP_MESSAGE]=function(t){const e=this[re(me.ON_SHARE_APP_MESSAGE)];return e?e(t):{}},n.__isInjectedShareToOthersHook__=()=>!0),void 0===n[me.ON_SHARE_TIMELINE]&&e.canShareToTimeline&&(n[me.ON_SHARE_TIMELINE]=function(){const t=this[re(me.ON_SHARE_TIMELINE)];return t?t():{}},n.__isInjectedShareToTimelineHook__=()=>!0),void 0===n[me.ON_ADD_TO_FAVORITES]&&(n[me.ON_ADD_TO_FAVORITES]=function(t){const e=this[re(me.ON_ADD_TO_FAVORITES)];return e?e(t):{}},n.__isInjectedFavoritesHook__=()=>!0),void 0===n[me.ON_SAVE_EXIT_STATE]&&(n[me.ON_SAVE_EXIT_STATE]=function(){const t=this[re(me.ON_SAVE_EXIT_STATE)];return t?t():{data:void 0}},n.__isInjectedExitStateHook__=()=>!0),n[me.ON_SHOW]=Le(n,me.ON_SHOW),n[me.ON_READY]=Le(n,me.ON_READY),n[me.ON_HIDE]=Le(n,me.ON_HIDE),n[me.ON_ROUTE_DONE]=Le(n,me.ON_ROUTE_DONE),n[me.ON_PULL_DOWN_REFRESH]=Le(n,me.ON_PULL_DOWN_REFRESH),n[me.ON_REACH_BOTTOM]=Le(n,me.ON_REACH_BOTTOM),n[me.ON_RESIZE]=Le(n,me.ON_RESIZE),n[me.ON_TAB_ITEM_TAP]=Le(n,me.ON_TAB_ITEM_TAP),Page(n)},exports.effect=function(t,e){t.effect instanceof S&&(t=t.effect.fn);const s=new S(t);e&&n(s,e);try{s.run()}catch(t){throw s.stop(),t}const i=s.run.bind(s);return i.effect=s,i},exports.effectScope=function(t){return new O(t)},exports.getCurrentScope=v,exports.getCurrentWatcher=function(){return Kt},exports.inject=function(t,e,s=!1){return t in Se?Se[t]:arguments.length>1?s&&oe(e)?e():e:void 0},exports.isProxy=Ht,exports.isReactive=Lt,exports.isReadonly=Pt,exports.isRef=Mt,exports.isShallow=wt,exports.markRaw=function(t){return!o(t,"__v_skip")&&Object.isExtensible(t)&&((t,e,s,n=!1)=>{Object.defineProperty(t,e,{configurable:!0,enumerable:!1,writable:n,value:s})})(t,"__v_skip",!0),t},exports.nextTick=function(t){const e=pe||fe;return t?e.then(t):e},exports.onAddToFavorites=t=>{const e=Te();if(e&&e.__isInjectedFavoritesHook__){const s=re(me.ON_ADD_TO_FAVORITES);void 0===e[s]&&(e[s]=t)}},exports.onAppError=je,exports.onAppHide=Me,exports.onAppShow=ke,exports.onDetach=qe,exports.onError=ts,exports.onHide=Be,exports.onLoad=Ke,exports.onMove=$e,exports.onPageNotFound=We,exports.onPageScroll=t=>{const e=Te();e&&e.__listenPageScroll__&&is(e,me.ON_PAGE_SCROLL,t)},exports.onPullDownRefresh=Xe,exports.onReachBottom=Ze,exports.onReady=t=>{const e=Te();e&&is(e,me.ON_READY,t)},exports.onResize=ze,exports.onRouteDone=Ye,exports.onSaveExitState=t=>{const e=Te();if(e&&e.__isInjectedExitStateHook__){const s=re(me.ON_SAVE_EXIT_STATE);void 0===e[s]&&(e[s]=t)}},exports.onScopeDispose=function(t,e=!1){d&&d.cleanups.push(t)},exports.onShareAppMessage=t=>{const e=Te();if(e&&e[me.ON_SHARE_APP_MESSAGE]&&e.__isInjectedShareToOthersHook__){const s=re(me.ON_SHARE_APP_MESSAGE);void 0===e[s]&&(e[s]=t)}},exports.onShareTimeline=t=>{const e=Te();if(e&&e[me.ON_SHARE_TIMELINE]&&e.__isInjectedShareToTimelineHook__){const s=re(me.ON_SHARE_TIMELINE);void 0===e[s]&&(e[s]=t)}},exports.onShow=Fe,exports.onTabItemTap=Je,exports.onThemeChange=Ge,exports.onUnhandledRejection=Ve,exports.onUnload=Qe,exports.onWatcherCleanup=$t,exports.provide=function(t,e){Se[t]=e},exports.proxyRefs=function(t){return Lt(t)?t:new Proxy(t,Ft)},exports.reactive=Dt,exports.readonly=xt,exports.ref=jt,exports.shallowReactive=yt,exports.shallowReadonly=function(t){return It(t,!0,ut,At,bt)},exports.shallowRef=function(t){return Wt(t,!0)},exports.stop=function(t){t.effect.stop()},exports.toRaw=Ct,exports.toRef=function(t,e,s){return Mt(t)?t:a(t)?new Yt(t):h(t)&&arguments.length>1?Xt(t,e,s):jt(t)},exports.toRefs=function(t){const e=r(t)?new Array(t.length):{};for(const s in t)e[s]=Xt(t,s);return e},exports.toValue=function(t){return a(t)?t():Gt(t)},exports.triggerRef=function(t){t.dep&&t.dep.trigger()},exports.unref=Gt,exports.watch=ve,exports.watchEffect=function(t,e){return ge(t,null,e)},exports.watchPostEffect=function(t,e){return ge(t,null,{flush:"post"})},exports.watchSyncEffect=function(t,e){return ge(t,null,{flush:"sync"})};
|
|
8
|
+
/*! #__NO_SIDE_EFFECTS__ */function t(t){const e=Object.create(null);for(const s of t.split(","))e[s]=1;return t=>t in e}const e={},s=()=>{},n=Object.assign,i=Object.prototype.hasOwnProperty,o=(t,e)=>i.call(t,e),r=Array.isArray,c=t=>"[object Map]"===u(t),a=t=>"function"==typeof t,h=t=>"symbol"==typeof t,l=t=>null!==t&&"object"==typeof t,_=Object.prototype.toString,u=t=>_.call(t),f=t=>"string"==typeof t&&"NaN"!==t&&"-"!==t[0]&&""+parseInt(t,10)===t,p=(t,e)=>!Object.is(t,e);let d,E;class O{constructor(t=!1){this.detached=t,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.parent=d,!t&&d&&(this.index=(d.scopes||(d.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){let t,e;if(this._isPaused=!0,this.scopes)for(t=0,e=this.scopes.length;t<e;t++)this.scopes[t].pause();for(t=0,e=this.effects.length;t<e;t++)this.effects[t].pause()}}resume(){if(this._active&&this._isPaused){let t,e;if(this._isPaused=!1,this.scopes)for(t=0,e=this.scopes.length;t<e;t++)this.scopes[t].resume();for(t=0,e=this.effects.length;t<e;t++)this.effects[t].resume()}}run(t){if(this._active){const e=d;try{return d=this,t()}finally{d=e}}}on(){1===++this._on&&(this.prevScope=d,d=this)}off(){this._on>0&&0===--this._on&&(d=this.prevScope,this.prevScope=void 0)}stop(t){if(this._active){let e,s;for(this._active=!1,e=0,s=this.effects.length;e<s;e++)this.effects[e].stop();for(this.effects.length=0,e=0,s=this.cleanups.length;e<s;e++)this.cleanups[e]();if(this.cleanups.length=0,this.scopes){for(e=0,s=this.scopes.length;e<s;e++)this.scopes[e].stop(!0);this.scopes.length=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}}}function v(){return d}const g=new WeakSet;class S{constructor(t){this.fn=t,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.next=void 0,this.cleanup=void 0,this.scheduler=void 0,d&&d.active&&d.effects.push(this)}pause(){this.flags|=64}resume(){64&this.flags&&(this.flags&=-65,g.has(this)&&(g.delete(this),this.trigger()))}notify(){2&this.flags&&!(32&this.flags)||8&this.flags||T(this)}run(){if(!(1&this.flags))return this.fn();this.flags|=2,k(this),y(this);const t=E,e=w;E=this,w=!0;try{return this.fn()}finally{D(this),E=t,w=e,this.flags&=-3}}stop(){if(1&this.flags){for(let t=this.deps;t;t=t.nextDep)L(t);this.deps=this.depsTail=void 0,k(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){64&this.flags?g.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){x(this)&&this.run()}get dirty(){return x(this)}}let A,N,R=0;function T(t,e=!1){if(t.flags|=8,e)return t.next=N,void(N=t);t.next=A,A=t}function b(){R++}function m(){if(--R>0)return;if(N){let t=N;for(N=void 0;t;){const e=t.next;t.next=void 0,t.flags&=-9,t=e}}let t;for(;A;){let e=A;for(A=void 0;e;){const s=e.next;if(e.next=void 0,e.flags&=-9,1&e.flags)try{e.trigger()}catch(e){t||(t=e)}e=s}}if(t)throw t}function y(t){for(let e=t.deps;e;e=e.nextDep)e.version=-1,e.prevActiveLink=e.dep.activeLink,e.dep.activeLink=e}function D(t){let e,s=t.depsTail,n=s;for(;n;){const t=n.prevDep;-1===n.version?(n===s&&(s=t),L(n),P(n)):e=n,n.dep.activeLink=n.prevActiveLink,n.prevActiveLink=void 0,n=t}t.deps=e,t.depsTail=s}function x(t){for(let e=t.deps;e;e=e.nextDep)if(e.dep.version!==e.version||e.dep.computed&&(I(e.dep.computed)||e.dep.version!==e.version))return!0;return!!t._dirty}function I(t){if(4&t.flags&&!(16&t.flags))return;if(t.flags&=-17,t.globalVersion===M)return;if(t.globalVersion=M,!t.isSSR&&128&t.flags&&(!t.deps&&!t._dirty||!x(t)))return;t.flags|=2;const e=t.dep,s=E,n=w;E=t,w=!0;try{y(t);const s=t.fn(t._value);(0===e.version||p(s,t._value))&&(t.flags|=128,t._value=s,e.version++)}catch(t){throw e.version++,t}finally{E=s,w=n,D(t),t.flags&=-3}}function L(t,e=!1){const{dep:s,prevSub:n,nextSub:i}=t;if(n&&(n.nextSub=i,t.prevSub=void 0),i&&(i.prevSub=n,t.nextSub=void 0),s.subs===t&&(s.subs=n,!n&&s.computed)){s.computed.flags&=-5;for(let t=s.computed.deps;t;t=t.nextDep)L(t,!0)}e||--s.sc||!s.map||s.map.delete(s.key)}function P(t){const{prevDep:e,nextDep:s}=t;e&&(e.nextDep=s,t.prevDep=void 0),s&&(s.prevDep=e,t.nextDep=void 0)}let w=!0;const H=[];function C(){H.push(w),w=!1}function U(){const t=H.pop();w=void 0===t||t}function k(t){const{cleanup:e}=t;if(t.cleanup=void 0,e){const t=E;E=void 0;try{e()}finally{E=t}}}let M=0;class j{constructor(t,e){this.sub=t,this.dep=e,this.version=e.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class W{constructor(t){this.computed=t,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(t){if(!E||!w||E===this.computed)return;let e=this.activeLink;if(void 0===e||e.sub!==E)e=this.activeLink=new j(E,this),E.deps?(e.prevDep=E.depsTail,E.depsTail.nextDep=e,E.depsTail=e):E.deps=E.depsTail=e,V(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=E.depsTail,e.nextDep=void 0,E.depsTail.nextDep=e,E.depsTail=e,E.deps===e&&(E.deps=t)}return e}trigger(t){this.version++,M++,this.notify(t)}notify(t){b();try{0;for(let t=this.subs;t;t=t.prevSub)t.sub.notify()&&t.sub.dep.notify()}finally{m()}}}function V(t){if(t.dep.sc++,4&t.sub.flags){const e=t.dep.computed;if(e&&!t.dep.subs){e.flags|=20;for(let t=e.deps;t;t=t.nextDep)V(t)}const s=t.dep.subs;s!==t&&(t.prevSub=s,s&&(s.nextSub=t)),t.dep.subs=t}}const G=new WeakMap,F=Symbol(""),B=Symbol(""),Q=Symbol("");function Y(t,e,s){if(w&&E){let e=G.get(t);e||G.set(t,e=new Map);let n=e.get(s);n||(e.set(s,n=new W),n.map=e,n.key=s),n.track()}}function X(t,e,s,n,i,o){const a=G.get(t);if(!a)return void M++;const l=t=>{t&&t.trigger()};if(b(),"clear"===e)a.forEach(l);else{const i=r(t),o=i&&f(s);if(i&&"length"===s){const t=Number(n);a.forEach((e,s)=>{("length"===s||s===Q||!h(s)&&s>=t)&&l(e)})}else switch((void 0!==s||a.has(void 0))&&l(a.get(s)),o&&l(a.get(Q)),e){case"add":i?o&&l(a.get("length")):(l(a.get(F)),c(t)&&l(a.get(B)));break;case"delete":i||(l(a.get(F)),c(t)&&l(a.get(B)));break;case"set":c(t)&&l(a.get(F))}}m()}function Z(t){const e=Ct(t);return e===t?e:(Y(e,0,Q),wt(t)?e:e.map(Ut))}function z(t){return Y(t=Ct(t),0,Q),t}const J={__proto__:null,[Symbol.iterator](){return K(this,Symbol.iterator,Ut)},concat(...t){return Z(this).concat(...t.map(t=>r(t)?Z(t):t))},entries(){return K(this,"entries",t=>(t[1]=Ut(t[1]),t))},every(t,e){return q(this,"every",t,e,void 0,arguments)},filter(t,e){return q(this,"filter",t,e,t=>t.map(Ut),arguments)},find(t,e){return q(this,"find",t,e,Ut,arguments)},findIndex(t,e){return q(this,"findIndex",t,e,void 0,arguments)},findLast(t,e){return q(this,"findLast",t,e,Ut,arguments)},findLastIndex(t,e){return q(this,"findLastIndex",t,e,void 0,arguments)},forEach(t,e){return q(this,"forEach",t,e,void 0,arguments)},includes(...t){return et(this,"includes",t)},indexOf(...t){return et(this,"indexOf",t)},join(t){return Z(this).join(t)},lastIndexOf(...t){return et(this,"lastIndexOf",t)},map(t,e){return q(this,"map",t,e,void 0,arguments)},pop(){return st(this,"pop")},push(...t){return st(this,"push",t)},reduce(t,...e){return tt(this,"reduce",t,e)},reduceRight(t,...e){return tt(this,"reduceRight",t,e)},shift(){return st(this,"shift")},some(t,e){return q(this,"some",t,e,void 0,arguments)},splice(...t){return st(this,"splice",t)},toReversed(){return Z(this).toReversed()},toSorted(t){return Z(this).toSorted(t)},toSpliced(...t){return Z(this).toSpliced(...t)},unshift(...t){return st(this,"unshift",t)},values(){return K(this,"values",Ut)}};function K(t,e,s){const n=z(t),i=n[e]();return n===t||wt(t)||(i._next=i.next,i.next=()=>{const t=i._next();return t.value&&(t.value=s(t.value)),t}),i}const $=Array.prototype;function q(t,e,s,n,i,o){const r=z(t),c=r!==t&&!wt(t),a=r[e];if(a!==$[e]){const e=a.apply(t,o);return c?Ut(e):e}let h=s;r!==t&&(c?h=function(e,n){return s.call(this,Ut(e),n,t)}:s.length>2&&(h=function(e,n){return s.call(this,e,n,t)}));const l=a.call(r,h,n);return c&&i?i(l):l}function tt(t,e,s,n){const i=z(t);let o=s;return i!==t&&(wt(t)?s.length>3&&(o=function(e,n,i){return s.call(this,e,n,i,t)}):o=function(e,n,i){return s.call(this,e,Ut(n),i,t)}),i[e](o,...n)}function et(t,e,s){const n=Ct(t);Y(n,0,Q);const i=n[e](...s);return-1!==i&&!1!==i||!Ht(s[0])?i:(s[0]=Ct(s[0]),n[e](...s))}function st(t,e,s=[]){C(),b();const n=Ct(t)[e].apply(t,s);return m(),U(),n}const nt=t("__proto__,__v_isRef,__isVue"),it=new Set(Object.getOwnPropertyNames(Symbol).filter(t=>"arguments"!==t&&"caller"!==t).map(t=>Symbol[t]).filter(h));function ot(t){h(t)||(t=String(t));const e=Ct(this);return Y(e,0,t),e.hasOwnProperty(t)}class rt{constructor(t=!1,e=!1){this._isReadonly=t,this._isShallow=e}get(t,e,s){if("__v_skip"===e)return t.__v_skip;const n=this._isReadonly,i=this._isShallow;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?bt:Tt:i?Rt:Nt).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(s)?t:void 0;const o=r(t);if(!n){let t;if(o&&(t=J[e]))return t;if("hasOwnProperty"===e)return ot}const c=Reflect.get(t,e,Mt(t)?t:s);return(h(e)?it.has(e):nt(e))?c:(n||Y(t,0,e),i?c:Mt(c)?o&&f(e)?c:c.value:l(c)?n?xt(c):yt(c):c)}}class ct extends rt{constructor(t=!1){super(!1,t)}set(t,e,s,n){let i=t[e];if(!this._isShallow){const e=Pt(i);if(wt(s)||Pt(s)||(i=Ct(i),s=Ct(s)),!r(t)&&Mt(i)&&!Mt(s))return!e&&(i.value=s,!0)}const c=r(t)&&f(e)?Number(e)<t.length:o(t,e),a=Reflect.set(t,e,s,Mt(t)?t:n);return t===Ct(n)&&(c?p(s,i)&&X(t,"set",e,s):X(t,"add",e,s)),a}deleteProperty(t,e){const s=o(t,e),n=Reflect.deleteProperty(t,e);return n&&s&&X(t,"delete",e,void 0),n}has(t,e){const s=Reflect.has(t,e);return h(e)&&it.has(e)||Y(t,0,e),s}ownKeys(t){return Y(t,0,r(t)?"length":F),Reflect.ownKeys(t)}}class at extends rt{constructor(t=!1){super(!0,t)}set(t,e){return!0}deleteProperty(t,e){return!0}}const ht=new ct,lt=new at,_t=new ct(!0),ut=new at(!0),ft=t=>t,pt=t=>Reflect.getPrototypeOf(t);function dt(t){return function(...e){return"delete"!==t&&("clear"===t?void 0:this)}}function Et(t,e){const s={get(s){const n=this.__v_raw,i=Ct(n),o=Ct(s);t||(p(s,o)&&Y(i,0,s),Y(i,0,o));const{has:r}=pt(i),c=e?ft:t?kt:Ut;return r.call(i,s)?c(n.get(s)):r.call(i,o)?c(n.get(o)):void(n!==i&&n.get(s))},get size(){const e=this.__v_raw;return!t&&Y(Ct(e),0,F),Reflect.get(e,"size",e)},has(e){const s=this.__v_raw,n=Ct(s),i=Ct(e);return t||(p(e,i)&&Y(n,0,e),Y(n,0,i)),e===i?s.has(e):s.has(e)||s.has(i)},forEach(s,n){const i=this,o=i.__v_raw,r=Ct(o),c=e?ft:t?kt:Ut;return!t&&Y(r,0,F),o.forEach((t,e)=>s.call(n,c(t),c(e),i))}};n(s,t?{add:dt("add"),set:dt("set"),delete:dt("delete"),clear:dt("clear")}:{add(t){e||wt(t)||Pt(t)||(t=Ct(t));const s=Ct(this);return pt(s).has.call(s,t)||(s.add(t),X(s,"add",t,t)),this},set(t,s){e||wt(s)||Pt(s)||(s=Ct(s));const n=Ct(this),{has:i,get:o}=pt(n);let r=i.call(n,t);r||(t=Ct(t),r=i.call(n,t));const c=o.call(n,t);return n.set(t,s),r?p(s,c)&&X(n,"set",t,s):X(n,"add",t,s),this},delete(t){const e=Ct(this),{has:s,get:n}=pt(e);let i=s.call(e,t);i||(t=Ct(t),i=s.call(e,t)),n&&n.call(e,t);const o=e.delete(t);return i&&X(e,"delete",t,void 0),o},clear(){const t=Ct(this),e=0!==t.size,s=t.clear();return e&&X(t,"clear",void 0,void 0),s}});return["keys","values","entries",Symbol.iterator].forEach(n=>{s[n]=function(t,e,s){return function(...n){const i=this.__v_raw,o=Ct(i),r=c(o),a="entries"===t||t===Symbol.iterator&&r,h="keys"===t&&r,l=i[t](...n),_=s?ft:e?kt:Ut;return!e&&Y(o,0,h?B:F),{next(){const{value:t,done:e}=l.next();return e?{value:t,done:e}:{value:a?[_(t[0]),_(t[1])]:_(t),done:e}},[Symbol.iterator](){return this}}}}(n,t,e)}),s}function Ot(t,e){const s=Et(t,e);return(e,n,i)=>"__v_isReactive"===n?!t:"__v_isReadonly"===n?t:"__v_raw"===n?e:Reflect.get(o(s,n)&&n in e?s:e,n,i)}const vt={get:Ot(!1,!1)},gt={get:Ot(!1,!0)},St={get:Ot(!0,!1)},At={get:Ot(!0,!0)},Nt=new WeakMap,Rt=new WeakMap,Tt=new WeakMap,bt=new WeakMap;function mt(t){return t.__v_skip||!Object.isExtensible(t)?0:function(t){switch(t){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}((t=>u(t).slice(8,-1))(t))}function yt(t){return Pt(t)?t:It(t,!1,ht,vt,Nt)}function Dt(t){return It(t,!1,_t,gt,Rt)}function xt(t){return It(t,!0,lt,St,Tt)}function It(t,e,s,n,i){if(!l(t))return t;if(t.__v_raw&&(!e||!t.__v_isReactive))return t;const o=mt(t);if(0===o)return t;const r=i.get(t);if(r)return r;const c=new Proxy(t,2===o?n:s);return i.set(t,c),c}function Lt(t){return Pt(t)?Lt(t.__v_raw):!(!t||!t.__v_isReactive)}function Pt(t){return!(!t||!t.__v_isReadonly)}function wt(t){return!(!t||!t.__v_isShallow)}function Ht(t){return!!t&&!!t.__v_raw}function Ct(t){const e=t&&t.__v_raw;return e?Ct(e):t}const Ut=t=>l(t)?yt(t):t,kt=t=>l(t)?xt(t):t;function Mt(t){return!!t&&!0===t.__v_isRef}function jt(t){return Wt(t,!1)}function Wt(t,e){return Mt(t)?t:new Vt(t,e)}class Vt{constructor(t,e){this.dep=new W,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=e?t:Ct(t),this._value=e?t:Ut(t),this.__v_isShallow=e}get value(){return this.dep.track(),this._value}set value(t){const e=this._rawValue,s=this.__v_isShallow||wt(t)||Pt(t);t=s?t:Ct(t),p(t,e)&&(this._rawValue=t,this._value=s?t:Ut(t),this.dep.trigger())}}function Gt(t){return Mt(t)?t.value:t}const Ft={get:(t,e,s)=>"__v_raw"===e?t:Gt(Reflect.get(t,e,s)),set:(t,e,s,n)=>{const i=t[e];return Mt(i)&&!Mt(s)?(i.value=s,!0):Reflect.set(t,e,s,n)}};class Bt{constructor(t){this.__v_isRef=!0,this._value=void 0;const e=this.dep=new W,{get:s,set:n}=t(e.track.bind(e),e.trigger.bind(e));this._get=s,this._set=n}get value(){return this._value=this._get()}set value(t){this._set(t)}}class Qt{constructor(t,e,s){this._object=t,this._key=e,this._defaultValue=s,this.__v_isRef=!0,this._value=void 0}get value(){const t=this._object[this._key];return this._value=void 0===t?this._defaultValue:t}set value(t){this._object[this._key]=t}get dep(){return function(t,e){const s=G.get(t);return s&&s.get(e)}(Ct(this._object),this._key)}}class Yt{constructor(t){this._getter=t,this.__v_isRef=!0,this.__v_isReadonly=!0,this._value=void 0}get value(){return this._value=this._getter()}}function Xt(t,e,s){const n=t[e];return Mt(n)?n:new Qt(t,e,s)}class Zt{constructor(t,e,s){this.fn=t,this.setter=e,this._value=void 0,this.dep=new W(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=M-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!e,this.isSSR=s}notify(){if(this.flags|=16,!(8&this.flags)&&E!==this)return T(this,!0),!0}get value(){const t=this.dep.track();return I(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}const zt={},Jt=new WeakMap;let Kt;function $t(t,e=!1,s=Kt){if(s){let e=Jt.get(s);e||Jt.set(s,e=[]),e.push(t)}}function qt(t,e=1/0,s){if(e<=0||!l(t)||t.__v_skip)return t;if((s=s||new Set).has(t))return t;if(s.add(t),e--,Mt(t))qt(t.value,e,s);else if(r(t))for(let n=0;n<t.length;n++)qt(t[n],e,s);else if("[object Set]"===u(t)||c(t))t.forEach(t=>{qt(t,e,s)});else if((t=>"[object Object]"===u(t))(t)){for(const n in t)qt(t[n],e,s);for(const n of Object.getOwnPropertySymbols(t))Object.prototype.propertyIsEnumerable.call(t,n)&&qt(t[n],e,s)}return t}const te={},{isArray:ee}=Array,se=Object.assign;function ne(t,e){const s={};return Object.keys(t).forEach(n=>{e.includes(n)||(s[n]=t[n])}),s}function ie(t){return Object.prototype.toString.call(t).slice(8,-1)}function oe(t){return"function"==typeof t}function re(t){return`__${t}__`}var ce;!function(t){t[t.QUEUED=1]="QUEUED",t[t.ALLOW_RECURSE=4]="ALLOW_RECURSE"}(ce||(ce={}));const ae=[];let he=-1;const le=[];let _e=null,ue=0;const fe=Promise.resolve();let pe=null;function de(t){t.flags&ce.QUEUED||(ae.push(t),t.flags|=ce.QUEUED,pe||(pe=fe.then(Oe)))}function Ee(){if(le.length>0){for(_e=[...new Set(le)],le.length=0,ue=0;ue<_e.length;ue++){const t=_e[ue];t.flags&ce.ALLOW_RECURSE&&(t.flags&=~ce.QUEUED),t(),t.flags&=~ce.QUEUED}_e=null,ue=0}}function Oe(){try{for(he=0;he<ae.length;he++){const t=ae[he];0,t.flags&ce.ALLOW_RECURSE&&(t.flags&=~ce.QUEUED),t(),t.flags&ce.ALLOW_RECURSE||(t.flags&=~ce.QUEUED)}}finally{for(;he<ae.length;he++){ae[he].flags&=~ce.QUEUED}he=-1,ae.length=0,pe=null}}function ve(t,e,s){return ge(t,e,s)}function ge(t,n,i=te){const{flush:o}=i,c=se({},i);"post"===o?c.scheduler=t=>{!function(t){t.flags&ce.QUEUED||(le.push(t),t.flags|=ce.QUEUED)}(t)}:"sync"!==o&&(c.scheduler=(t,e)=>{e?t():de(t)}),c.augmentJob=t=>{n&&(t.flags|=ce.ALLOW_RECURSE)};const h=function(t,n,i=e){const{immediate:o,deep:c,once:h,scheduler:l,augmentJob:_,call:u}=i,f=t=>c?t:wt(t)||!1===c||0===c?qt(t,1):qt(t);let d,E,O,g,A=!1,N=!1;if(Mt(t)?(E=()=>t.value,A=wt(t)):Lt(t)?(E=()=>f(t),A=!0):r(t)?(N=!0,A=t.some(t=>Lt(t)||wt(t)),E=()=>t.map(t=>Mt(t)?t.value:Lt(t)?f(t):a(t)?u?u(t,2):t():void 0)):E=a(t)?n?u?()=>u(t,2):t:()=>{if(O){C();try{O()}finally{U()}}const e=Kt;Kt=d;try{return u?u(t,3,[g]):t(g)}finally{Kt=e}}:s,n&&c){const t=E,e=!0===c?1/0:c;E=()=>qt(t(),e)}const R=v(),T=()=>{d.stop(),R&&R.active&&((t,e)=>{const s=t.indexOf(e);s>-1&&t.splice(s,1)})(R.effects,d)};if(h&&n){const t=n;n=(...e)=>{t(...e),T()}}let b=N?new Array(t.length).fill(zt):zt;const m=t=>{if(1&d.flags&&(d.dirty||t))if(n){const t=d.run();if(c||A||(N?t.some((t,e)=>p(t,b[e])):p(t,b))){O&&O();const e=Kt;Kt=d;try{const e=[t,b===zt?void 0:N&&b[0]===zt?[]:b,g];b=t,u?u(n,3,e):n(...e)}finally{Kt=e}}}else d.run()};return _&&_(m),d=new S(E),d.scheduler=l?()=>l(m,!1):m,g=t=>$t(t,!1,d),O=d.onStop=()=>{const t=Jt.get(d);if(t){if(u)u(t,4);else for(const e of t)e();Jt.delete(d)}},n?o?m(!0):b=d.run():l?l(m.bind(null,!0),!0):d.run(),T.pause=d.pause.bind(d),T.resume=d.resume.bind(d),T.stop=T,T}(t,n,c);return h}const Se=Object.create(null);let Ae=null,Ne=null,Re=null;function Te(){return Ne||Re}var be,me,ye;function De(t,e){const s=t[e];return function(...t){const n=this[re(e)];n&&n.forEach(e=>e(...t)),void 0!==s&&s.call(this,...t)}}function xe(t){if(function(t){const e=new Set(["undefined","boolean","number","string"]);return null===t||e.has(typeof t)}(t)||oe(t))return t;if(Mt(t))return xe(t.value);if(Ht(t))return xe(Ct(t));if(ee(t))return t.map(t=>xe(t));if(function(t){return"Object"===ie(t)}(t)){const e={};return Object.keys(t).forEach(s=>{e[s]=xe(t[s])}),e}throw new TypeError(`${ie(t)} value is not supported`)}function Ie(t,e){var s;null!==(s=e)&&"object"==typeof s&&ve(Mt(e)?e:()=>e,()=>{this.setData({[t]:xe(e)},Ee)},{deep:!0})}function Le(t,e){const s=t[e];return function(...t){const n=this[re(e)];n&&n.forEach(e=>e(...t)),void 0!==s&&s.call(this,...t)}}!function(t){t.ON_LAUNCH="onLaunch",t.ON_SHOW="onShow",t.ON_HIDE="onHide",t.ON_ERROR="onError",t.ON_PAGE_NOT_FOUND="onPageNotFound",t.ON_UNHANDLED_REJECTION="onUnhandledRejection",t.ON_THEME_CHANGE="onThemeChange"}(be||(be={})),function(t){t.ON_LOAD="onLoad",t.ON_SHOW="onShow",t.ON_READY="onReady",t.ON_HIDE="onHide",t.ON_UNLOAD="onUnload",t.ON_ROUTE_DONE="onRouteDone",t.ON_PULL_DOWN_REFRESH="onPullDownRefresh",t.ON_REACH_BOTTOM="onReachBottom",t.ON_PAGE_SCROLL="onPageScroll",t.ON_SHARE_APP_MESSAGE="onShareAppMessage",t.ON_SHARE_TIMELINE="onShareTimeline",t.ON_ADD_TO_FAVORITES="onAddToFavorites",t.ON_RESIZE="onResize",t.ON_TAB_ITEM_TAP="onTabItemTap",t.ON_SAVE_EXIT_STATE="onSaveExitState"}(me||(me={})),function(t){t.ATTACHED="attached",t.READY="ready",t.MOVED="moved",t.DETACHED="detached",t.ERROR="error"}(ye||(ye={}));const Pe={[me.ON_SHOW]:"show",[me.ON_HIDE]:"hide",[me.ON_RESIZE]:"resize",[me.ON_ROUTE_DONE]:"routeDone",[ye.READY]:me.ON_READY};function we(t,e){return Ue(e,t.lifetimes[e]||t[e])}function He(t,e){return Ue(e,t.methods[e])}function Ce(t,e){return Ue(e,t.pageLifetimes[Pe[e]])}function Ue(t,e){const s=re(t);return function(...t){const n=this[s];n&&n.forEach(e=>e(...t)),void 0!==e&&e.call(this,...t)}}const ke=es(be.ON_SHOW),Me=es(be.ON_HIDE),je=es(be.ON_ERROR),We=es(be.ON_PAGE_NOT_FOUND),Ve=es(be.ON_UNHANDLED_REJECTION),Ge=es(be.ON_THEME_CHANGE),Fe=ss(me.ON_SHOW),Be=ss(me.ON_HIDE),Qe=ss(me.ON_UNLOAD),Ye=ss(me.ON_ROUTE_DONE),Xe=ss(me.ON_PULL_DOWN_REFRESH),Ze=ss(me.ON_REACH_BOTTOM),ze=ss(me.ON_RESIZE),Je=ss(me.ON_TAB_ITEM_TAP),Ke=ns(me.ON_LOAD),$e=ns(ye.MOVED),qe=ns(ye.DETACHED),ts=ns(ye.ERROR);function es(t){return e=>{Ae&&is(Ae,t,e)}}function ss(t){return e=>{const s=Te();s&&is(s,t,e)}}function ns(t){return e=>{Re&&is(Re,t,e)}}function is(t,e,s){const n=re(e);void 0===t[n]&&(t[n]=[]),t[n].push(s)}exports.EffectScope=O,exports.ReactiveEffect=S,exports.TrackOpTypes={GET:"get",HAS:"has",ITERATE:"iterate"},exports.TriggerOpTypes={SET:"set",ADD:"add",DELETE:"delete",CLEAR:"clear"},exports.computed=function(t,e,s=!1){let n,i;return a(t)?n=t:(n=t.get,i=t.set),new Zt(n,i,s)},exports.createApp=function(t){let e,s;if(oe(t))e=t,s={};else{if(void 0===t.setup)return void App(t);e=t.setup,s=ne(t,["setup"])}const n=s[be.ON_LAUNCH];s[be.ON_LAUNCH]=function(t){Ae=this;const s=e(t);void 0!==s&&Object.keys(s).forEach(t=>{this[t]=s[t]}),Ae=null,void 0!==n&&n.call(this,t)},s[be.ON_SHOW]=De(s,be.ON_SHOW),s[be.ON_HIDE]=De(s,be.ON_HIDE),s[be.ON_ERROR]=De(s,be.ON_ERROR),s[be.ON_PAGE_NOT_FOUND]=De(s,be.ON_PAGE_NOT_FOUND),s[be.ON_UNHANDLED_REJECTION]=De(s,be.ON_UNHANDLED_REJECTION),s[be.ON_THEME_CHANGE]=De(s,be.ON_THEME_CHANGE),App(s)},exports.customRef=function(t){return new Bt(t)},exports.defineComponent=function(t,e){let s,n;e=se({listenPageScroll:!1,canShareToOthers:!1,canShareToTimeline:!1},e);let i=null;if(oe(t))s=t,n={};else{if(void 0===t.setup)return Component(t);s=t.setup,n=ne(t,["setup"]),n.properties&&(i=Object.keys(n.properties))}void 0===n.lifetimes&&(n.lifetimes={});const o=n.lifetimes[ye.ATTACHED]||n[ye.ATTACHED];n.lifetimes[ye.ATTACHED]=function(){var t;this.__scope__=new O,Re=t=this,t.__scope__.on();const e={};i&&i.forEach(t=>{e[t]=this.data[t]}),this.__props__=Dt(e);const n={is:this.is,id:this.id,dataset:this.dataset,exitState:this.exitState,router:this.router,pageRouter:this.pageRouter,renderer:this.renderer,triggerEvent:this.triggerEvent.bind(this),createSelectorQuery:this.createSelectorQuery.bind(this),createIntersectionObserver:this.createIntersectionObserver.bind(this),createMediaQueryObserver:this.createMediaQueryObserver.bind(this),selectComponent:this.selectComponent.bind(this),selectAllComponents:this.selectAllComponents.bind(this),selectOwnerComponent:this.selectOwnerComponent.bind(this),getRelationNodes:this.getRelationNodes.bind(this),getTabBar:this.getTabBar.bind(this),getPageId:this.getPageId.bind(this),animate:this.animate.bind(this),clearAnimation:this.clearAnimation.bind(this),getOpenerEventChannel:this.getOpenerEventChannel.bind(this),applyAnimatedStyle:this.applyAnimatedStyle.bind(this),clearAnimatedStyle:this.clearAnimatedStyle.bind(this),setUpdatePerformanceListener:this.setUpdatePerformanceListener.bind(this),getPassiveEvent:this.getPassiveEvent.bind(this),setPassiveEvent:this.setPassiveEvent.bind(this),setInitialRenderingCache:this.setInitialRenderingCache.bind(this),getAppBar:this.getAppBar&&this.getAppBar.bind(this)},r=s(this.__props__,n);if(void 0!==r){let t;Object.keys(r).forEach(e=>{const s=r[e];oe(s)?this[e]=s:(t=t||{},t[e]=xe(s),Ie.call(this,e,s))}),void 0!==t&&this.setData(t,Ee)}Re&&Re.__scope__.off(),Re=null,void 0!==o&&o.call(this)};const r=we(n,ye.DETACHED);return n.lifetimes[ye.DETACHED]=function(){r.call(this),this.__scope__.stop()},n.lifetimes[ye.READY]=Ue(Pe[ye.READY],n.lifetimes[ye.READY]||n[ye.READY]),n.lifetimes[ye.MOVED]=we(n,ye.MOVED),n.lifetimes[ye.ERROR]=we(n,ye.ERROR),void 0===n.methods&&(n.methods={}),(n.methods[me.ON_PAGE_SCROLL]||e.listenPageScroll)&&(n.methods[me.ON_PAGE_SCROLL]=He(n,me.ON_PAGE_SCROLL),n.methods.__listenPageScroll__=()=>!0),void 0===n.methods[me.ON_SHARE_APP_MESSAGE]&&e.canShareToOthers&&(n.methods[me.ON_SHARE_APP_MESSAGE]=function(t){const e=this[re(me.ON_SHARE_APP_MESSAGE)];return e?e(t):{}},n.methods.__isInjectedShareToOthersHook__=()=>!0),void 0===n.methods[me.ON_SHARE_TIMELINE]&&e.canShareToTimeline&&(n.methods[me.ON_SHARE_TIMELINE]=function(){const t=this[re(me.ON_SHARE_TIMELINE)];return t?t():{}},n.methods.__isInjectedShareToTimelineHook__=()=>!0),void 0===n.methods[me.ON_ADD_TO_FAVORITES]&&(n.methods[me.ON_ADD_TO_FAVORITES]=function(t){const e=this[re(me.ON_ADD_TO_FAVORITES)];return e?e(t):{}},n.methods.__isInjectedFavoritesHook__=()=>!0),void 0===n.methods[me.ON_SAVE_EXIT_STATE]&&(n.methods[me.ON_SAVE_EXIT_STATE]=function(){const t=this[re(me.ON_SAVE_EXIT_STATE)];return t?t():{data:void 0}},n.methods.__isInjectedExitStateHook__=()=>!0),n.methods[me.ON_LOAD]=He(n,me.ON_LOAD),n.methods[me.ON_PULL_DOWN_REFRESH]=He(n,me.ON_PULL_DOWN_REFRESH),n.methods[me.ON_REACH_BOTTOM]=He(n,me.ON_REACH_BOTTOM),n.methods[me.ON_TAB_ITEM_TAP]=He(n,me.ON_TAB_ITEM_TAP),void 0===n.pageLifetimes&&(n.pageLifetimes={}),n.pageLifetimes[Pe[me.ON_SHOW]]=Ce(n,me.ON_SHOW),n.pageLifetimes[Pe[me.ON_HIDE]]=Ce(n,me.ON_HIDE),n.pageLifetimes[Pe[me.ON_RESIZE]]=Ce(n,me.ON_RESIZE),n.pageLifetimes[Pe[me.ON_ROUTE_DONE]]=Ce(n,me.ON_ROUTE_DONE),i&&(void 0===n.observers&&(n.observers={}),i.forEach(t=>{const e=n.observers[t];n.observers[t]=function(s){this.__props__&&(this.__props__[t]=s),void 0!==e&&e.call(this,s)}})),Component(n)},exports.definePage=function(t,e){let s,n;if(e=se({listenPageScroll:!1,canShareToOthers:!1,canShareToTimeline:!1},e),oe(t))s=t,n={};else{if(void 0===t.setup)return void Page(t);s=t.setup,n=ne(t,["setup"])}const i=n[me.ON_LOAD];n[me.ON_LOAD]=function(t){var e;this.__scope__=new O,Ne=e=this,e.__scope__.on();const n={is:this.is,route:this.route,options:this.options,exitState:this.exitState,router:this.router,pageRouter:this.pageRouter,renderer:this.renderer,createSelectorQuery:this.createSelectorQuery.bind(this),createIntersectionObserver:this.createIntersectionObserver.bind(this),createMediaQueryObserver:this.createMediaQueryObserver.bind(this),selectComponent:this.selectComponent.bind(this),selectAllComponents:this.selectAllComponents.bind(this),getTabBar:this.getTabBar.bind(this),getPageId:this.getPageId.bind(this),animate:this.animate.bind(this),clearAnimation:this.clearAnimation.bind(this),getOpenerEventChannel:this.getOpenerEventChannel.bind(this),applyAnimatedStyle:this.applyAnimatedStyle.bind(this),clearAnimatedStyle:this.clearAnimatedStyle.bind(this),setUpdatePerformanceListener:this.setUpdatePerformanceListener.bind(this),getPassiveEvent:this.getPassiveEvent.bind(this),setPassiveEvent:this.setPassiveEvent.bind(this),setInitialRenderingCache:this.setInitialRenderingCache.bind(this),getAppBar:this.getAppBar&&this.getAppBar.bind(this)},o=s(t,n);if(void 0!==o){let t;Object.keys(o).forEach(e=>{const s=o[e];oe(s)?this[e]=s:(t=t||{},t[e]=xe(s),Ie.call(this,e,s))}),void 0!==t&&this.setData(t,Ee)}Ne&&Ne.__scope__.off(),Ne=null,void 0!==i&&i.call(this,t)};const o=Le(n,me.ON_UNLOAD);n[me.ON_UNLOAD]=function(){o.call(this),this.__scope__.stop()},(n[me.ON_PAGE_SCROLL]||e.listenPageScroll)&&(n[me.ON_PAGE_SCROLL]=Le(n,me.ON_PAGE_SCROLL),n.__listenPageScroll__=()=>!0),void 0===n[me.ON_SHARE_APP_MESSAGE]&&e.canShareToOthers&&(n[me.ON_SHARE_APP_MESSAGE]=function(t){const e=this[re(me.ON_SHARE_APP_MESSAGE)];return e?e(t):{}},n.__isInjectedShareToOthersHook__=()=>!0),void 0===n[me.ON_SHARE_TIMELINE]&&e.canShareToTimeline&&(n[me.ON_SHARE_TIMELINE]=function(){const t=this[re(me.ON_SHARE_TIMELINE)];return t?t():{}},n.__isInjectedShareToTimelineHook__=()=>!0),void 0===n[me.ON_ADD_TO_FAVORITES]&&(n[me.ON_ADD_TO_FAVORITES]=function(t){const e=this[re(me.ON_ADD_TO_FAVORITES)];return e?e(t):{}},n.__isInjectedFavoritesHook__=()=>!0),void 0===n[me.ON_SAVE_EXIT_STATE]&&(n[me.ON_SAVE_EXIT_STATE]=function(){const t=this[re(me.ON_SAVE_EXIT_STATE)];return t?t():{data:void 0}},n.__isInjectedExitStateHook__=()=>!0),n[me.ON_SHOW]=Le(n,me.ON_SHOW),n[me.ON_READY]=Le(n,me.ON_READY),n[me.ON_HIDE]=Le(n,me.ON_HIDE),n[me.ON_ROUTE_DONE]=Le(n,me.ON_ROUTE_DONE),n[me.ON_PULL_DOWN_REFRESH]=Le(n,me.ON_PULL_DOWN_REFRESH),n[me.ON_REACH_BOTTOM]=Le(n,me.ON_REACH_BOTTOM),n[me.ON_RESIZE]=Le(n,me.ON_RESIZE),n[me.ON_TAB_ITEM_TAP]=Le(n,me.ON_TAB_ITEM_TAP),Page(n)},exports.effect=function(t,e){t.effect instanceof S&&(t=t.effect.fn);const s=new S(t);e&&n(s,e);try{s.run()}catch(t){throw s.stop(),t}const i=s.run.bind(s);return i.effect=s,i},exports.effectScope=function(t){return new O(t)},exports.getCurrentScope=v,exports.getCurrentWatcher=function(){return Kt},exports.inject=function(t,e,s=!1){return t in Se?Se[t]:arguments.length>1?s&&oe(e)?e():e:void 0},exports.isProxy=Ht,exports.isReactive=Lt,exports.isReadonly=Pt,exports.isRef=Mt,exports.isShallow=wt,exports.markRaw=function(t){return!o(t,"__v_skip")&&Object.isExtensible(t)&&((t,e,s,n=!1)=>{Object.defineProperty(t,e,{configurable:!0,enumerable:!1,writable:n,value:s})})(t,"__v_skip",!0),t},exports.nextTick=function(t){const e=pe||fe;return t?e.then(t):e},exports.onAddToFavorites=t=>{const e=Te();if(e&&e.__isInjectedFavoritesHook__){const s=re(me.ON_ADD_TO_FAVORITES);void 0===e[s]&&(e[s]=t)}},exports.onAppError=je,exports.onAppHide=Me,exports.onAppShow=ke,exports.onDetach=qe,exports.onError=ts,exports.onHide=Be,exports.onLoad=Ke,exports.onMove=$e,exports.onPageNotFound=We,exports.onPageScroll=t=>{const e=Te();e&&e.__listenPageScroll__&&is(e,me.ON_PAGE_SCROLL,t)},exports.onPullDownRefresh=Xe,exports.onReachBottom=Ze,exports.onReady=t=>{const e=Te();e&&is(e,me.ON_READY,t)},exports.onResize=ze,exports.onRouteDone=Ye,exports.onSaveExitState=t=>{const e=Te();if(e&&e.__isInjectedExitStateHook__){const s=re(me.ON_SAVE_EXIT_STATE);void 0===e[s]&&(e[s]=t)}},exports.onScopeDispose=function(t,e=!1){d&&d.cleanups.push(t)},exports.onShareAppMessage=t=>{const e=Te();if(e&&e[me.ON_SHARE_APP_MESSAGE]&&e.__isInjectedShareToOthersHook__){const s=re(me.ON_SHARE_APP_MESSAGE);void 0===e[s]&&(e[s]=t)}},exports.onShareTimeline=t=>{const e=Te();if(e&&e[me.ON_SHARE_TIMELINE]&&e.__isInjectedShareToTimelineHook__){const s=re(me.ON_SHARE_TIMELINE);void 0===e[s]&&(e[s]=t)}},exports.onShow=Fe,exports.onTabItemTap=Je,exports.onThemeChange=Ge,exports.onUnhandledRejection=Ve,exports.onUnload=Qe,exports.onWatcherCleanup=$t,exports.provide=function(t,e){Se[t]=e},exports.proxyRefs=function(t){return Lt(t)?t:new Proxy(t,Ft)},exports.reactive=yt,exports.readonly=xt,exports.ref=jt,exports.shallowReactive=Dt,exports.shallowReadonly=function(t){return It(t,!0,ut,At,bt)},exports.shallowRef=function(t){return Wt(t,!0)},exports.stop=function(t){t.effect.stop()},exports.toRaw=Ct,exports.toRef=function(t,e,s){return Mt(t)?t:a(t)?new Yt(t):l(t)&&arguments.length>1?Xt(t,e,s):jt(t)},exports.toRefs=function(t){const e=r(t)?new Array(t.length):{};for(const s in t)e[s]=Xt(t,s);return e},exports.toValue=function(t){return a(t)?t():Gt(t)},exports.triggerRef=function(t){t.dep&&t.dep.trigger()},exports.unref=Gt,exports.watch=ve,exports.watchEffect=function(t,e){return ge(t,null,e)},exports.watchPostEffect=function(t,e){return ge(t,null,{flush:"post"})},exports.watchSyncEffect=function(t,e){return ge(t,null,{flush:"sync"})};
|
package/dist/vue-mini.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="miniprogram-api-typings" />
|
|
2
|
-
import {
|
|
2
|
+
import { WatchSource, WatchCallback, DebuggerOptions, WatchHandle, ReactiveMarker, WatchEffect } from '@vue/reactivity';
|
|
3
3
|
export { ComputedGetter, ComputedRef, ComputedSetter, CustomRefFactory, DebuggerEvent, DebuggerEventExtraInfo, DebuggerOptions, DeepReadonly, EffectScheduler, EffectScope, MaybeRef, MaybeRefOrGetter, Raw, Reactive, ReactiveEffect, ReactiveEffectOptions, ReactiveEffectRunner, ReactiveFlags, Ref, ShallowReactive, ShallowRef, ShallowUnwrapRef, ToRef, ToRefs, TrackOpTypes, TriggerOpTypes, UnwrapNestedRefs, UnwrapRef, WatchCallback, WatchEffect, WatchHandle, WatchSource, WatchStopHandle, WritableComputedOptions, WritableComputedRef, computed, customRef, effect, effectScope, getCurrentScope, getCurrentWatcher, isProxy, isReactive, isReadonly, isRef, isShallow, markRaw, onScopeDispose, onWatcherCleanup, proxyRefs, reactive, readonly, ref, shallowReactive, shallowReadonly, shallowRef, stop, toRaw, toRef, toRefs, toValue, triggerRef, unref } from '@vue/reactivity';
|
|
4
4
|
|
|
5
5
|
type MaybeUndefined<T, I> = I extends true ? T | undefined : T;
|
|
@@ -23,7 +23,8 @@ declare function watch<T extends Readonly<MultiWatchSources>, Immediate extends
|
|
|
23
23
|
declare function watch<T extends MultiWatchSources, Immediate extends Readonly<boolean> = false>(sources: [...T], cb: WatchCallback<MapSources<T, false>, MapSources<T, Immediate>>, options?: WatchOptions<Immediate>): WatchHandle;
|
|
24
24
|
declare function watch<T extends object, Immediate extends Readonly<boolean> = false>(source: T, cb: WatchCallback<T, MaybeUndefined<T, Immediate>>, options?: WatchOptions<Immediate>): WatchHandle;
|
|
25
25
|
|
|
26
|
-
declare function nextTick
|
|
26
|
+
declare function nextTick(): Promise<void>;
|
|
27
|
+
declare function nextTick<R>(fn: () => R | Promise<R>): Promise<R>;
|
|
27
28
|
|
|
28
29
|
interface InjectionConstraint<T> {
|
|
29
30
|
}
|
|
@@ -95,4 +96,5 @@ declare const onMove: (hook: () => unknown) => void;
|
|
|
95
96
|
declare const onDetach: (hook: () => unknown) => void;
|
|
96
97
|
declare const onError: (hook: (error: WechatMiniprogram.Error) => unknown) => void;
|
|
97
98
|
|
|
98
|
-
export {
|
|
99
|
+
export { createApp, defineComponent, definePage, inject, nextTick, onAddToFavorites, onAppError, onAppHide, onAppShow, onDetach, onError, onHide, onLoad, onMove, onPageNotFound, onPageScroll, onPullDownRefresh, onReachBottom, onReady, onResize, onRouteDone, onSaveExitState, onShareAppMessage, onShareTimeline, onShow, onTabItemTap, onThemeChange, onUnhandledRejection, onUnload, provide, watch, watchEffect, watchPostEffect, watchSyncEffect };
|
|
100
|
+
export type { AppOptions, AppSetup, Bindings, ComponentContext, ComponentOptions, ComponentSetup, Config, InjectionKey, MultiWatchSources, PageContext, PageOptions, PageSetup, Query, WatchOptions, WatchEffectOptions as WatchOptionsBase };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* vue-mini v1.2.
|
|
2
|
+
* vue-mini v1.2.4
|
|
3
3
|
* https://github.com/vue-mini/vue-mini
|
|
4
4
|
* (c) 2019-present Yang Mingshan
|
|
5
5
|
* @license MIT
|
|
@@ -53,7 +53,7 @@ let flushIndex = -1;
|
|
|
53
53
|
const pendingPostFlushCbs = [];
|
|
54
54
|
let activePostFlushCbs = null;
|
|
55
55
|
let postFlushIndex = 0;
|
|
56
|
-
// eslint-disable-next-line spaced-comment
|
|
56
|
+
// eslint-disable-next-line @stylistic/spaced-comment
|
|
57
57
|
const resolvedPromise = /*@__PURE__*/ Promise.resolve();
|
|
58
58
|
let currentFlushPromise = null;
|
|
59
59
|
const RECURSION_LIMIT = 100;
|
|
@@ -97,11 +97,8 @@ function flushPostFlushCbs() {
|
|
|
97
97
|
postFlushIndex = 0;
|
|
98
98
|
}
|
|
99
99
|
}
|
|
100
|
-
function flushJobs(
|
|
101
|
-
/* istanbul ignore
|
|
102
|
-
if ((process.env.NODE_ENV !== 'production')) {
|
|
103
|
-
seen = seen || new Map();
|
|
104
|
-
}
|
|
100
|
+
function flushJobs() {
|
|
101
|
+
const seen = (process.env.NODE_ENV !== 'production') ? new Map() : /* istanbul ignore next -- @preserve */ undefined;
|
|
105
102
|
// Conditional usage of checkRecursiveUpdate must be determined out of
|
|
106
103
|
// try ... catch block since Rollup by default de-optimizes treeshaking
|
|
107
104
|
// inside try-catch. This can leave all warning code unshaked. Although
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vue-mini/core",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.4",
|
|
4
4
|
"description": "基于 Vue 3 的小程序框架。简单,强大,高性能。 ",
|
|
5
5
|
"main": "dist/vue-mini.cjs.js",
|
|
6
6
|
"module": "dist/vue-mini.esm-bundler.js",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"小程序"
|
|
33
33
|
],
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@vue/reactivity": "3.5.
|
|
36
|
-
"miniprogram-api-typings": "
|
|
35
|
+
"@vue/reactivity": "3.5.18",
|
|
36
|
+
"miniprogram-api-typings": "~4.0.8"
|
|
37
37
|
}
|
|
38
38
|
}
|