@vue-mini/core 1.1.1 → 1.2.0
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 +186 -237
- package/dist/vue-mini.cjs.prod.js +2 -2
- package/dist/vue-mini.d.ts +5 -11
- package/dist/vue-mini.esm-bundler.js +4 -10
- package/package.json +3 -3
package/dist/vue-mini.cjs.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* vue-mini v1.
|
|
2
|
+
* vue-mini v1.2.0
|
|
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.12
|
|
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.12
|
|
70
70
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
71
71
|
* @license MIT
|
|
72
72
|
**/
|
|
@@ -316,8 +316,14 @@ class ReactiveEffect {
|
|
|
316
316
|
}
|
|
317
317
|
let batchDepth = 0;
|
|
318
318
|
let batchedSub;
|
|
319
|
-
|
|
319
|
+
let batchedComputed;
|
|
320
|
+
function batch(sub, isComputed = false) {
|
|
320
321
|
sub.flags |= 8;
|
|
322
|
+
if (isComputed) {
|
|
323
|
+
sub.next = batchedComputed;
|
|
324
|
+
batchedComputed = sub;
|
|
325
|
+
return;
|
|
326
|
+
}
|
|
321
327
|
sub.next = batchedSub;
|
|
322
328
|
batchedSub = sub;
|
|
323
329
|
}
|
|
@@ -328,6 +334,16 @@ function endBatch() {
|
|
|
328
334
|
if (--batchDepth > 0) {
|
|
329
335
|
return;
|
|
330
336
|
}
|
|
337
|
+
if (batchedComputed) {
|
|
338
|
+
let e = batchedComputed;
|
|
339
|
+
batchedComputed = void 0;
|
|
340
|
+
while (e) {
|
|
341
|
+
const next = e.next;
|
|
342
|
+
e.next = void 0;
|
|
343
|
+
e.flags &= ~8;
|
|
344
|
+
e = next;
|
|
345
|
+
}
|
|
346
|
+
}
|
|
331
347
|
let error;
|
|
332
348
|
while (batchedSub) {
|
|
333
349
|
let e = batchedSub;
|
|
@@ -423,7 +439,7 @@ function refreshComputed(computed) {
|
|
|
423
439
|
computed.flags &= ~2;
|
|
424
440
|
}
|
|
425
441
|
}
|
|
426
|
-
function removeSub(link,
|
|
442
|
+
function removeSub(link, soft = false) {
|
|
427
443
|
const { dep, prevSub, nextSub } = link;
|
|
428
444
|
if (prevSub) {
|
|
429
445
|
prevSub.nextSub = nextSub;
|
|
@@ -433,23 +449,21 @@ function removeSub(link, fromComputed = false) {
|
|
|
433
449
|
nextSub.prevSub = prevSub;
|
|
434
450
|
link.nextSub = void 0;
|
|
435
451
|
}
|
|
436
|
-
if (dep.subs === link) {
|
|
437
|
-
dep.subs = prevSub;
|
|
438
|
-
}
|
|
439
452
|
if (dep.subsHead === link) {
|
|
440
453
|
dep.subsHead = nextSub;
|
|
441
454
|
}
|
|
442
|
-
if (
|
|
443
|
-
|
|
455
|
+
if (dep.subs === link) {
|
|
456
|
+
dep.subs = prevSub;
|
|
457
|
+
if (!prevSub && dep.computed) {
|
|
444
458
|
dep.computed.flags &= ~4;
|
|
445
459
|
for (let l = dep.computed.deps; l; l = l.nextDep) {
|
|
446
460
|
removeSub(l, true);
|
|
447
461
|
}
|
|
448
|
-
} else if (dep.map && !fromComputed) {
|
|
449
|
-
dep.map.delete(dep.key);
|
|
450
|
-
if (!dep.map.size) targetMap.delete(dep.target);
|
|
451
462
|
}
|
|
452
463
|
}
|
|
464
|
+
if (!soft && !--dep.sc && dep.map) {
|
|
465
|
+
dep.map.delete(dep.key);
|
|
466
|
+
}
|
|
453
467
|
}
|
|
454
468
|
function removeDep(link) {
|
|
455
469
|
const { prevDep, nextDep } = link;
|
|
@@ -531,9 +545,12 @@ class Dep {
|
|
|
531
545
|
/**
|
|
532
546
|
* For object property deps cleanup
|
|
533
547
|
*/
|
|
534
|
-
this.target = void 0;
|
|
535
548
|
this.map = void 0;
|
|
536
549
|
this.key = void 0;
|
|
550
|
+
/**
|
|
551
|
+
* Subscriber counter
|
|
552
|
+
*/
|
|
553
|
+
this.sc = 0;
|
|
537
554
|
{
|
|
538
555
|
this.subsHead = void 0;
|
|
539
556
|
}
|
|
@@ -552,9 +569,7 @@ class Dep {
|
|
|
552
569
|
activeSub.depsTail.nextDep = link;
|
|
553
570
|
activeSub.depsTail = link;
|
|
554
571
|
}
|
|
555
|
-
|
|
556
|
-
addSub(link);
|
|
557
|
-
}
|
|
572
|
+
addSub(link);
|
|
558
573
|
} else if (link.version === -1) {
|
|
559
574
|
link.version = this.version;
|
|
560
575
|
if (link.nextDep) {
|
|
@@ -618,22 +633,25 @@ class Dep {
|
|
|
618
633
|
}
|
|
619
634
|
}
|
|
620
635
|
function addSub(link) {
|
|
621
|
-
|
|
622
|
-
if (
|
|
623
|
-
computed
|
|
624
|
-
|
|
625
|
-
|
|
636
|
+
link.dep.sc++;
|
|
637
|
+
if (link.sub.flags & 4) {
|
|
638
|
+
const computed = link.dep.computed;
|
|
639
|
+
if (computed && !link.dep.subs) {
|
|
640
|
+
computed.flags |= 4 | 16;
|
|
641
|
+
for (let l = computed.deps; l; l = l.nextDep) {
|
|
642
|
+
addSub(l);
|
|
643
|
+
}
|
|
626
644
|
}
|
|
645
|
+
const currentTail = link.dep.subs;
|
|
646
|
+
if (currentTail !== link) {
|
|
647
|
+
link.prevSub = currentTail;
|
|
648
|
+
if (currentTail) currentTail.nextSub = link;
|
|
649
|
+
}
|
|
650
|
+
if (link.dep.subsHead === void 0) {
|
|
651
|
+
link.dep.subsHead = link;
|
|
652
|
+
}
|
|
653
|
+
link.dep.subs = link;
|
|
627
654
|
}
|
|
628
|
-
const currentTail = link.dep.subs;
|
|
629
|
-
if (currentTail !== link) {
|
|
630
|
-
link.prevSub = currentTail;
|
|
631
|
-
if (currentTail) currentTail.nextSub = link;
|
|
632
|
-
}
|
|
633
|
-
if (link.dep.subsHead === void 0) {
|
|
634
|
-
link.dep.subsHead = link;
|
|
635
|
-
}
|
|
636
|
-
link.dep.subs = link;
|
|
637
655
|
}
|
|
638
656
|
const targetMap = /* @__PURE__ */ new WeakMap();
|
|
639
657
|
const ITERATE_KEY = Symbol(
|
|
@@ -654,7 +672,6 @@ function track(target, type, key) {
|
|
|
654
672
|
let dep = depsMap.get(key);
|
|
655
673
|
if (!dep) {
|
|
656
674
|
depsMap.set(key, dep = new Dep());
|
|
657
|
-
dep.target = target;
|
|
658
675
|
dep.map = depsMap;
|
|
659
676
|
dep.key = key;
|
|
660
677
|
}
|
|
@@ -701,7 +718,7 @@ function trigger(target, type, key, newValue, oldValue, oldTarget) {
|
|
|
701
718
|
}
|
|
702
719
|
});
|
|
703
720
|
} else {
|
|
704
|
-
if (key !== void 0) {
|
|
721
|
+
if (key !== void 0 || depsMap.has(void 0)) {
|
|
705
722
|
run(depsMap.get(key));
|
|
706
723
|
}
|
|
707
724
|
if (isArrayIndex) {
|
|
@@ -737,8 +754,8 @@ function trigger(target, type, key, newValue, oldValue, oldTarget) {
|
|
|
737
754
|
endBatch();
|
|
738
755
|
}
|
|
739
756
|
function getDepFromReactive(object, key) {
|
|
740
|
-
|
|
741
|
-
return
|
|
757
|
+
const depMap = targetMap.get(object);
|
|
758
|
+
return depMap && depMap.get(key);
|
|
742
759
|
}
|
|
743
760
|
|
|
744
761
|
function reactiveReadArray(array) {
|
|
@@ -1076,117 +1093,6 @@ const shallowReadonlyHandlers = /* @__PURE__ */ new ReadonlyReactiveHandler(true
|
|
|
1076
1093
|
|
|
1077
1094
|
const toShallow = (value) => value;
|
|
1078
1095
|
const getProto = (v) => Reflect.getPrototypeOf(v);
|
|
1079
|
-
function get(target, key, isReadonly2 = false, isShallow2 = false) {
|
|
1080
|
-
target = target["__v_raw"];
|
|
1081
|
-
const rawTarget = toRaw(target);
|
|
1082
|
-
const rawKey = toRaw(key);
|
|
1083
|
-
if (!isReadonly2) {
|
|
1084
|
-
if (hasChanged(key, rawKey)) {
|
|
1085
|
-
track(rawTarget, "get", key);
|
|
1086
|
-
}
|
|
1087
|
-
track(rawTarget, "get", rawKey);
|
|
1088
|
-
}
|
|
1089
|
-
const { has: has2 } = getProto(rawTarget);
|
|
1090
|
-
const wrap = isShallow2 ? toShallow : isReadonly2 ? toReadonly : toReactive;
|
|
1091
|
-
if (has2.call(rawTarget, key)) {
|
|
1092
|
-
return wrap(target.get(key));
|
|
1093
|
-
} else if (has2.call(rawTarget, rawKey)) {
|
|
1094
|
-
return wrap(target.get(rawKey));
|
|
1095
|
-
} else if (target !== rawTarget) {
|
|
1096
|
-
target.get(key);
|
|
1097
|
-
}
|
|
1098
|
-
}
|
|
1099
|
-
function has(key, isReadonly2 = false) {
|
|
1100
|
-
const target = this["__v_raw"];
|
|
1101
|
-
const rawTarget = toRaw(target);
|
|
1102
|
-
const rawKey = toRaw(key);
|
|
1103
|
-
if (!isReadonly2) {
|
|
1104
|
-
if (hasChanged(key, rawKey)) {
|
|
1105
|
-
track(rawTarget, "has", key);
|
|
1106
|
-
}
|
|
1107
|
-
track(rawTarget, "has", rawKey);
|
|
1108
|
-
}
|
|
1109
|
-
return key === rawKey ? target.has(key) : target.has(key) || target.has(rawKey);
|
|
1110
|
-
}
|
|
1111
|
-
function size(target, isReadonly2 = false) {
|
|
1112
|
-
target = target["__v_raw"];
|
|
1113
|
-
!isReadonly2 && track(toRaw(target), "iterate", ITERATE_KEY);
|
|
1114
|
-
return Reflect.get(target, "size", target);
|
|
1115
|
-
}
|
|
1116
|
-
function add(value, _isShallow = false) {
|
|
1117
|
-
if (!_isShallow && !isShallow(value) && !isReadonly(value)) {
|
|
1118
|
-
value = toRaw(value);
|
|
1119
|
-
}
|
|
1120
|
-
const target = toRaw(this);
|
|
1121
|
-
const proto = getProto(target);
|
|
1122
|
-
const hadKey = proto.has.call(target, value);
|
|
1123
|
-
if (!hadKey) {
|
|
1124
|
-
target.add(value);
|
|
1125
|
-
trigger(target, "add", value, value);
|
|
1126
|
-
}
|
|
1127
|
-
return this;
|
|
1128
|
-
}
|
|
1129
|
-
function set(key, value, _isShallow = false) {
|
|
1130
|
-
if (!_isShallow && !isShallow(value) && !isReadonly(value)) {
|
|
1131
|
-
value = toRaw(value);
|
|
1132
|
-
}
|
|
1133
|
-
const target = toRaw(this);
|
|
1134
|
-
const { has: has2, get: get2 } = getProto(target);
|
|
1135
|
-
let hadKey = has2.call(target, key);
|
|
1136
|
-
if (!hadKey) {
|
|
1137
|
-
key = toRaw(key);
|
|
1138
|
-
hadKey = has2.call(target, key);
|
|
1139
|
-
} else {
|
|
1140
|
-
checkIdentityKeys(target, has2, key);
|
|
1141
|
-
}
|
|
1142
|
-
const oldValue = get2.call(target, key);
|
|
1143
|
-
target.set(key, value);
|
|
1144
|
-
if (!hadKey) {
|
|
1145
|
-
trigger(target, "add", key, value);
|
|
1146
|
-
} else if (hasChanged(value, oldValue)) {
|
|
1147
|
-
trigger(target, "set", key, value, oldValue);
|
|
1148
|
-
}
|
|
1149
|
-
return this;
|
|
1150
|
-
}
|
|
1151
|
-
function deleteEntry(key) {
|
|
1152
|
-
const target = toRaw(this);
|
|
1153
|
-
const { has: has2, get: get2 } = getProto(target);
|
|
1154
|
-
let hadKey = has2.call(target, key);
|
|
1155
|
-
if (!hadKey) {
|
|
1156
|
-
key = toRaw(key);
|
|
1157
|
-
hadKey = has2.call(target, key);
|
|
1158
|
-
} else {
|
|
1159
|
-
checkIdentityKeys(target, has2, key);
|
|
1160
|
-
}
|
|
1161
|
-
const oldValue = get2 ? get2.call(target, key) : void 0;
|
|
1162
|
-
const result = target.delete(key);
|
|
1163
|
-
if (hadKey) {
|
|
1164
|
-
trigger(target, "delete", key, void 0, oldValue);
|
|
1165
|
-
}
|
|
1166
|
-
return result;
|
|
1167
|
-
}
|
|
1168
|
-
function clear() {
|
|
1169
|
-
const target = toRaw(this);
|
|
1170
|
-
const hadItems = target.size !== 0;
|
|
1171
|
-
const oldTarget = isMap(target) ? new Map(target) : new Set(target) ;
|
|
1172
|
-
const result = target.clear();
|
|
1173
|
-
if (hadItems) {
|
|
1174
|
-
trigger(target, "clear", void 0, void 0, oldTarget);
|
|
1175
|
-
}
|
|
1176
|
-
return result;
|
|
1177
|
-
}
|
|
1178
|
-
function createForEach(isReadonly2, isShallow2) {
|
|
1179
|
-
return function forEach(callback, thisArg) {
|
|
1180
|
-
const observed = this;
|
|
1181
|
-
const target = observed["__v_raw"];
|
|
1182
|
-
const rawTarget = toRaw(target);
|
|
1183
|
-
const wrap = isShallow2 ? toShallow : isReadonly2 ? toReadonly : toReactive;
|
|
1184
|
-
!isReadonly2 && track(rawTarget, "iterate", ITERATE_KEY);
|
|
1185
|
-
return target.forEach((value, key) => {
|
|
1186
|
-
return callback.call(thisArg, wrap(value), wrap(key), observed);
|
|
1187
|
-
});
|
|
1188
|
-
};
|
|
1189
|
-
}
|
|
1190
1096
|
function createIterableMethod(method, isReadonly2, isShallow2) {
|
|
1191
1097
|
return function(...args) {
|
|
1192
1098
|
const target = this["__v_raw"];
|
|
@@ -1229,71 +1135,134 @@ function createReadonlyMethod(type) {
|
|
|
1229
1135
|
return type === "delete" ? false : type === "clear" ? void 0 : this;
|
|
1230
1136
|
};
|
|
1231
1137
|
}
|
|
1232
|
-
function createInstrumentations() {
|
|
1233
|
-
const
|
|
1138
|
+
function createInstrumentations(readonly, shallow) {
|
|
1139
|
+
const instrumentations = {
|
|
1234
1140
|
get(key) {
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
},
|
|
1254
|
-
has,
|
|
1255
|
-
add(value) {
|
|
1256
|
-
return add.call(this, value, true);
|
|
1257
|
-
},
|
|
1258
|
-
set(key, value) {
|
|
1259
|
-
return set.call(this, key, value, true);
|
|
1260
|
-
},
|
|
1261
|
-
delete: deleteEntry,
|
|
1262
|
-
clear,
|
|
1263
|
-
forEach: createForEach(false, true)
|
|
1264
|
-
};
|
|
1265
|
-
const readonlyInstrumentations2 = {
|
|
1266
|
-
get(key) {
|
|
1267
|
-
return get(this, key, true);
|
|
1268
|
-
},
|
|
1269
|
-
get size() {
|
|
1270
|
-
return size(this, true);
|
|
1271
|
-
},
|
|
1272
|
-
has(key) {
|
|
1273
|
-
return has.call(this, key, true);
|
|
1274
|
-
},
|
|
1275
|
-
add: createReadonlyMethod("add"),
|
|
1276
|
-
set: createReadonlyMethod("set"),
|
|
1277
|
-
delete: createReadonlyMethod("delete"),
|
|
1278
|
-
clear: createReadonlyMethod("clear"),
|
|
1279
|
-
forEach: createForEach(true, false)
|
|
1280
|
-
};
|
|
1281
|
-
const shallowReadonlyInstrumentations2 = {
|
|
1282
|
-
get(key) {
|
|
1283
|
-
return get(this, key, true, true);
|
|
1141
|
+
const target = this["__v_raw"];
|
|
1142
|
+
const rawTarget = toRaw(target);
|
|
1143
|
+
const rawKey = toRaw(key);
|
|
1144
|
+
if (!readonly) {
|
|
1145
|
+
if (hasChanged(key, rawKey)) {
|
|
1146
|
+
track(rawTarget, "get", key);
|
|
1147
|
+
}
|
|
1148
|
+
track(rawTarget, "get", rawKey);
|
|
1149
|
+
}
|
|
1150
|
+
const { has } = getProto(rawTarget);
|
|
1151
|
+
const wrap = shallow ? toShallow : readonly ? toReadonly : toReactive;
|
|
1152
|
+
if (has.call(rawTarget, key)) {
|
|
1153
|
+
return wrap(target.get(key));
|
|
1154
|
+
} else if (has.call(rawTarget, rawKey)) {
|
|
1155
|
+
return wrap(target.get(rawKey));
|
|
1156
|
+
} else if (target !== rawTarget) {
|
|
1157
|
+
target.get(key);
|
|
1158
|
+
}
|
|
1284
1159
|
},
|
|
1285
1160
|
get size() {
|
|
1286
|
-
|
|
1161
|
+
const target = this["__v_raw"];
|
|
1162
|
+
!readonly && track(toRaw(target), "iterate", ITERATE_KEY);
|
|
1163
|
+
return Reflect.get(target, "size", target);
|
|
1287
1164
|
},
|
|
1288
1165
|
has(key) {
|
|
1289
|
-
|
|
1166
|
+
const target = this["__v_raw"];
|
|
1167
|
+
const rawTarget = toRaw(target);
|
|
1168
|
+
const rawKey = toRaw(key);
|
|
1169
|
+
if (!readonly) {
|
|
1170
|
+
if (hasChanged(key, rawKey)) {
|
|
1171
|
+
track(rawTarget, "has", key);
|
|
1172
|
+
}
|
|
1173
|
+
track(rawTarget, "has", rawKey);
|
|
1174
|
+
}
|
|
1175
|
+
return key === rawKey ? target.has(key) : target.has(key) || target.has(rawKey);
|
|
1290
1176
|
},
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1177
|
+
forEach(callback, thisArg) {
|
|
1178
|
+
const observed = this;
|
|
1179
|
+
const target = observed["__v_raw"];
|
|
1180
|
+
const rawTarget = toRaw(target);
|
|
1181
|
+
const wrap = shallow ? toShallow : readonly ? toReadonly : toReactive;
|
|
1182
|
+
!readonly && track(rawTarget, "iterate", ITERATE_KEY);
|
|
1183
|
+
return target.forEach((value, key) => {
|
|
1184
|
+
return callback.call(thisArg, wrap(value), wrap(key), observed);
|
|
1185
|
+
});
|
|
1186
|
+
}
|
|
1296
1187
|
};
|
|
1188
|
+
extend$1(
|
|
1189
|
+
instrumentations,
|
|
1190
|
+
readonly ? {
|
|
1191
|
+
add: createReadonlyMethod("add"),
|
|
1192
|
+
set: createReadonlyMethod("set"),
|
|
1193
|
+
delete: createReadonlyMethod("delete"),
|
|
1194
|
+
clear: createReadonlyMethod("clear")
|
|
1195
|
+
} : {
|
|
1196
|
+
add(value) {
|
|
1197
|
+
if (!shallow && !isShallow(value) && !isReadonly(value)) {
|
|
1198
|
+
value = toRaw(value);
|
|
1199
|
+
}
|
|
1200
|
+
const target = toRaw(this);
|
|
1201
|
+
const proto = getProto(target);
|
|
1202
|
+
const hadKey = proto.has.call(target, value);
|
|
1203
|
+
if (!hadKey) {
|
|
1204
|
+
target.add(value);
|
|
1205
|
+
trigger(target, "add", value, value);
|
|
1206
|
+
}
|
|
1207
|
+
return this;
|
|
1208
|
+
},
|
|
1209
|
+
set(key, value) {
|
|
1210
|
+
if (!shallow && !isShallow(value) && !isReadonly(value)) {
|
|
1211
|
+
value = toRaw(value);
|
|
1212
|
+
}
|
|
1213
|
+
const target = toRaw(this);
|
|
1214
|
+
const { has, get } = getProto(target);
|
|
1215
|
+
let hadKey = has.call(target, key);
|
|
1216
|
+
if (!hadKey) {
|
|
1217
|
+
key = toRaw(key);
|
|
1218
|
+
hadKey = has.call(target, key);
|
|
1219
|
+
} else {
|
|
1220
|
+
checkIdentityKeys(target, has, key);
|
|
1221
|
+
}
|
|
1222
|
+
const oldValue = get.call(target, key);
|
|
1223
|
+
target.set(key, value);
|
|
1224
|
+
if (!hadKey) {
|
|
1225
|
+
trigger(target, "add", key, value);
|
|
1226
|
+
} else if (hasChanged(value, oldValue)) {
|
|
1227
|
+
trigger(target, "set", key, value, oldValue);
|
|
1228
|
+
}
|
|
1229
|
+
return this;
|
|
1230
|
+
},
|
|
1231
|
+
delete(key) {
|
|
1232
|
+
const target = toRaw(this);
|
|
1233
|
+
const { has, get } = getProto(target);
|
|
1234
|
+
let hadKey = has.call(target, key);
|
|
1235
|
+
if (!hadKey) {
|
|
1236
|
+
key = toRaw(key);
|
|
1237
|
+
hadKey = has.call(target, key);
|
|
1238
|
+
} else {
|
|
1239
|
+
checkIdentityKeys(target, has, key);
|
|
1240
|
+
}
|
|
1241
|
+
const oldValue = get ? get.call(target, key) : void 0;
|
|
1242
|
+
const result = target.delete(key);
|
|
1243
|
+
if (hadKey) {
|
|
1244
|
+
trigger(target, "delete", key, void 0, oldValue);
|
|
1245
|
+
}
|
|
1246
|
+
return result;
|
|
1247
|
+
},
|
|
1248
|
+
clear() {
|
|
1249
|
+
const target = toRaw(this);
|
|
1250
|
+
const hadItems = target.size !== 0;
|
|
1251
|
+
const oldTarget = isMap(target) ? new Map(target) : new Set(target) ;
|
|
1252
|
+
const result = target.clear();
|
|
1253
|
+
if (hadItems) {
|
|
1254
|
+
trigger(
|
|
1255
|
+
target,
|
|
1256
|
+
"clear",
|
|
1257
|
+
void 0,
|
|
1258
|
+
void 0,
|
|
1259
|
+
oldTarget
|
|
1260
|
+
);
|
|
1261
|
+
}
|
|
1262
|
+
return result;
|
|
1263
|
+
}
|
|
1264
|
+
}
|
|
1265
|
+
);
|
|
1297
1266
|
const iteratorMethods = [
|
|
1298
1267
|
"keys",
|
|
1299
1268
|
"values",
|
|
@@ -1301,30 +1270,12 @@ function createInstrumentations() {
|
|
|
1301
1270
|
Symbol.iterator
|
|
1302
1271
|
];
|
|
1303
1272
|
iteratorMethods.forEach((method) => {
|
|
1304
|
-
|
|
1305
|
-
readonlyInstrumentations2[method] = createIterableMethod(method, true, false);
|
|
1306
|
-
shallowInstrumentations2[method] = createIterableMethod(method, false, true);
|
|
1307
|
-
shallowReadonlyInstrumentations2[method] = createIterableMethod(
|
|
1308
|
-
method,
|
|
1309
|
-
true,
|
|
1310
|
-
true
|
|
1311
|
-
);
|
|
1273
|
+
instrumentations[method] = createIterableMethod(method, readonly, shallow);
|
|
1312
1274
|
});
|
|
1313
|
-
return
|
|
1314
|
-
mutableInstrumentations2,
|
|
1315
|
-
readonlyInstrumentations2,
|
|
1316
|
-
shallowInstrumentations2,
|
|
1317
|
-
shallowReadonlyInstrumentations2
|
|
1318
|
-
];
|
|
1275
|
+
return instrumentations;
|
|
1319
1276
|
}
|
|
1320
|
-
const [
|
|
1321
|
-
mutableInstrumentations,
|
|
1322
|
-
readonlyInstrumentations,
|
|
1323
|
-
shallowInstrumentations,
|
|
1324
|
-
shallowReadonlyInstrumentations
|
|
1325
|
-
] = /* @__PURE__ */ createInstrumentations();
|
|
1326
1277
|
function createInstrumentationGetter(isReadonly2, shallow) {
|
|
1327
|
-
const instrumentations =
|
|
1278
|
+
const instrumentations = createInstrumentations(isReadonly2, shallow);
|
|
1328
1279
|
return (target, key, receiver) => {
|
|
1329
1280
|
if (key === "__v_isReactive") {
|
|
1330
1281
|
return !isReadonly2;
|
|
@@ -1352,9 +1303,9 @@ const readonlyCollectionHandlers = {
|
|
|
1352
1303
|
const shallowReadonlyCollectionHandlers = {
|
|
1353
1304
|
get: /* @__PURE__ */ createInstrumentationGetter(true, true)
|
|
1354
1305
|
};
|
|
1355
|
-
function checkIdentityKeys(target,
|
|
1306
|
+
function checkIdentityKeys(target, has, key) {
|
|
1356
1307
|
const rawKey = toRaw(key);
|
|
1357
|
-
if (rawKey !== key &&
|
|
1308
|
+
if (rawKey !== key && has.call(target, rawKey)) {
|
|
1358
1309
|
const type = toRawType(target);
|
|
1359
1310
|
warn(
|
|
1360
1311
|
`Reactive ${type} contains both the raw and reactive versions of the same object${type === `Map` ? ` as keys` : ``}, which can lead to inconsistencies. Avoid differentiating between the raw and reactive versions of an object and only use the reactive version if possible.`
|
|
@@ -1674,6 +1625,10 @@ class ComputedRefImpl {
|
|
|
1674
1625
|
* @internal
|
|
1675
1626
|
*/
|
|
1676
1627
|
this.globalVersion = globalVersion - 1;
|
|
1628
|
+
/**
|
|
1629
|
+
* @internal
|
|
1630
|
+
*/
|
|
1631
|
+
this.next = void 0;
|
|
1677
1632
|
// for backwards compat
|
|
1678
1633
|
this.effect = this;
|
|
1679
1634
|
this["__v_isReadonly"] = !setter;
|
|
@@ -1686,7 +1641,7 @@ class ComputedRefImpl {
|
|
|
1686
1641
|
this.flags |= 16;
|
|
1687
1642
|
if (!(this.flags & 8) && // avoid infinite self recursion
|
|
1688
1643
|
activeSub !== this) {
|
|
1689
|
-
batch(this);
|
|
1644
|
+
batch(this, true);
|
|
1690
1645
|
return true;
|
|
1691
1646
|
}
|
|
1692
1647
|
}
|
|
@@ -1982,10 +1937,8 @@ var SchedulerJobFlags;
|
|
|
1982
1937
|
SchedulerJobFlags[SchedulerJobFlags["QUEUED"] = 1] = "QUEUED";
|
|
1983
1938
|
SchedulerJobFlags[SchedulerJobFlags["ALLOW_RECURSE"] = 4] = "ALLOW_RECURSE";
|
|
1984
1939
|
})(SchedulerJobFlags || (SchedulerJobFlags = {}));
|
|
1985
|
-
let isFlushing = false;
|
|
1986
|
-
let isFlushPending = false;
|
|
1987
1940
|
const queue = [];
|
|
1988
|
-
let flushIndex =
|
|
1941
|
+
let flushIndex = -1;
|
|
1989
1942
|
const pendingPostFlushCbs = [];
|
|
1990
1943
|
let activePostFlushCbs = null;
|
|
1991
1944
|
let postFlushIndex = 0;
|
|
@@ -2006,8 +1959,7 @@ function queueJob(job) {
|
|
|
2006
1959
|
}
|
|
2007
1960
|
}
|
|
2008
1961
|
function queueFlush() {
|
|
2009
|
-
if (!
|
|
2010
|
-
isFlushPending = true;
|
|
1962
|
+
if (!currentFlushPromise) {
|
|
2011
1963
|
// eslint-disable-next-line promise/prefer-await-to-then
|
|
2012
1964
|
currentFlushPromise = resolvedPromise.then(flushJobs);
|
|
2013
1965
|
}
|
|
@@ -2035,8 +1987,6 @@ function flushPostFlushCbs() {
|
|
|
2035
1987
|
}
|
|
2036
1988
|
}
|
|
2037
1989
|
function flushJobs(seen) {
|
|
2038
|
-
isFlushPending = false;
|
|
2039
|
-
isFlushing = true;
|
|
2040
1990
|
/* istanbul ignore else -- @preserve */
|
|
2041
1991
|
{
|
|
2042
1992
|
seen = seen || new Map();
|
|
@@ -2070,9 +2020,8 @@ function flushJobs(seen) {
|
|
|
2070
2020
|
const job = queue[flushIndex];
|
|
2071
2021
|
job.flags &= ~SchedulerJobFlags.QUEUED;
|
|
2072
2022
|
}
|
|
2073
|
-
flushIndex =
|
|
2023
|
+
flushIndex = -1;
|
|
2074
2024
|
queue.length = 0;
|
|
2075
|
-
isFlushing = false;
|
|
2076
2025
|
currentFlushPromise = null;
|
|
2077
2026
|
}
|
|
2078
2027
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* vue-mini v1.
|
|
2
|
+
* vue-mini v1.2.0
|
|
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]"===_(t),a=t=>"function"==typeof t,l=t=>"symbol"==typeof t,u=t=>null!==t&&"object"==typeof t,h=Object.prototype.toString,_=t=>h.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(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 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||R(this)}run(){if(!(1&this.flags))return this.fn();this.flags|=2,C(this),b(this);const t=E,e=P;E=this,P=!0;try{return this.fn()}finally{D(this),E=t,P=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,C(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){64&this.flags?g.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){y(this)&&this.run()}get dirty(){return y(this)}}let N,A=0;function R(t){t.flags|=8,t.next=N,N=t}function T(){A++}function m(){if(--A>0)return;let t;for(;N;){let e=N;for(N=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 b(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),I(n)):e=n,n.dep.activeLink=n.prevActiveLink,n.prevActiveLink=void 0,n=t}t.deps=e,t.depsTail=s}function y(t){for(let e=t.deps;e;e=e.nextDep)if(e.dep.version!==e.version||e.dep.computed&&(x(e.dep.computed)||e.dep.version!==e.version))return!0;return!!t._dirty}function x(t){if(4&t.flags&&!(16&t.flags))return;if(t.flags&=-17,t.globalVersion===k)return;t.globalVersion=k;const e=t.dep;if(t.flags|=2,e.version>0&&!t.isSSR&&t.deps&&!y(t))return void(t.flags&=-3);const s=E,n=P;E=t,P=!0;try{b(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,P=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),!s.subs)if(s.computed){s.computed.flags&=-5;for(let t=s.computed.deps;t;t=t.nextDep)L(t,!0)}else s.map&&!e&&(s.map.delete(s.key),s.map.size||V.delete(s.target))}function I(t){const{prevDep:e,nextDep:s}=t;e&&(e.nextDep=s,t.prevDep=void 0),s&&(s.prevDep=e,t.nextDep=void 0)}let P=!0;const w=[];function H(){w.push(P),P=!1}function U(){const t=w.pop();P=void 0===t||t}function C(t){const{cleanup:e}=t;if(t.cleanup=void 0,e){const t=E;E=void 0;try{e()}finally{E=t}}}let k=0;class M{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 j{constructor(t){this.computed=t,this.version=0,this.activeLink=void 0,this.subs=void 0,this.target=void 0,this.map=void 0,this.key=void 0}track(t){if(!E||!P||E===this.computed)return;let e=this.activeLink;if(void 0===e||e.sub!==E)e=this.activeLink=new M(E,this),E.deps?(e.prevDep=E.depsTail,E.depsTail.nextDep=e,E.depsTail=e):E.deps=E.depsTail=e,4&E.flags&&W(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++,k++,this.notify(t)}notify(t){T();try{0;for(let t=this.subs;t;t=t.prevSub)t.sub.notify()&&t.sub.dep.notify()}finally{m()}}}function W(t){const e=t.dep.computed;if(e&&!t.dep.subs){e.flags|=20;for(let t=e.deps;t;t=t.nextDep)W(t)}const s=t.dep.subs;s!==t&&(t.prevSub=s,s&&(s.nextSub=t)),t.dep.subs=t}const V=new WeakMap,G=Symbol(""),F=Symbol(""),Q=Symbol("");function B(t,e,s){if(P&&E){let e=V.get(t);e||V.set(t,e=new Map);let n=e.get(s);n||(e.set(s,n=new j),n.target=t,n.map=e,n.key=s),n.track()}}function Y(t,e,s,n,i,o){const a=V.get(t);if(!a)return void k++;const u=t=>{t&&t.trigger()};if(T(),"clear"===e)a.forEach(u);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)&&u(e)}))}else switch(void 0!==s&&u(a.get(s)),o&&u(a.get(Q)),e){case"add":i?o&&u(a.get("length")):(u(a.get(G)),c(t)&&u(a.get(F)));break;case"delete":i||(u(a.get(G)),c(t)&&u(a.get(F)));break;case"set":c(t)&&u(a.get(G))}}m()}function z(t){const e=zt(t);return e===t?e:(B(e,0,Q),Bt(t)?e:e.map(Xt))}function X(t){return B(t=zt(t),0,Q),t}const Z={__proto__:null,[Symbol.iterator](){return J(this,Symbol.iterator,Xt)},concat(...t){return z(this).concat(...t.map((t=>r(t)?z(t):t)))},entries(){return J(this,"entries",(t=>(t[1]=Xt(t[1]),t)))},every(t,e){return $(this,"every",t,e,void 0,arguments)},filter(t,e){return $(this,"filter",t,e,(t=>t.map(Xt)),arguments)},find(t,e){return $(this,"find",t,e,Xt,arguments)},findIndex(t,e){return $(this,"findIndex",t,e,void 0,arguments)},findLast(t,e){return $(this,"findLast",t,e,Xt,arguments)},findLastIndex(t,e){return $(this,"findLastIndex",t,e,void 0,arguments)},forEach(t,e){return $(this,"forEach",t,e,void 0,arguments)},includes(...t){return tt(this,"includes",t)},indexOf(...t){return tt(this,"indexOf",t)},join(t){return z(this).join(t)},lastIndexOf(...t){return tt(this,"lastIndexOf",t)},map(t,e){return $(this,"map",t,e,void 0,arguments)},pop(){return et(this,"pop")},push(...t){return et(this,"push",t)},reduce(t,...e){return q(this,"reduce",t,e)},reduceRight(t,...e){return q(this,"reduceRight",t,e)},shift(){return et(this,"shift")},some(t,e){return $(this,"some",t,e,void 0,arguments)},splice(...t){return et(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 et(this,"unshift",t)},values(){return J(this,"values",Xt)}};function J(t,e,s){const n=X(t),i=n[e]();return n===t||Bt(t)||(i._next=i.next,i.next=()=>{const t=i._next();return t.value&&(t.value=s(t.value)),t}),i}const K=Array.prototype;function $(t,e,s,n,i,o){const r=X(t),c=r!==t&&!Bt(t),a=r[e];if(a!==K[e]){const e=a.apply(t,o);return c?Xt(e):e}let l=s;r!==t&&(c?l=function(e,n){return s.call(this,Xt(e),n,t)}:s.length>2&&(l=function(e,n){return s.call(this,e,n,t)}));const u=a.call(r,l,n);return c&&i?i(u):u}function q(t,e,s,n){const i=X(t);let o=s;return i!==t&&(Bt(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,Xt(n),i,t)}),i[e](o,...n)}function tt(t,e,s){const n=zt(t);B(n,0,Q);const i=n[e](...s);return-1!==i&&!1!==i||!Yt(s[0])?i:(s[0]=zt(s[0]),n[e](...s))}function et(t,e,s=[]){H(),T();const n=zt(t)[e].apply(t,s);return m(),U(),n}const st=t("__proto__,__v_isRef,__isVue"),nt=new Set(Object.getOwnPropertyNames(Symbol).filter((t=>"arguments"!==t&&"caller"!==t)).map((t=>Symbol[t])).filter(l));function it(t){l(t)||(t=String(t));const e=zt(this);return B(e,0,t),e.hasOwnProperty(t)}class ot{constructor(t=!1,e=!1){this._isReadonly=t,this._isShallow=e}get(t,e,s){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?kt:Ct:i?Ut:Ht).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(s)?t:void 0;const o=r(t);if(!n){let t;if(o&&(t=Z[e]))return t;if("hasOwnProperty"===e)return it}const c=Reflect.get(t,e,Jt(t)?t:s);return(l(e)?nt.has(e):st(e))?c:(n||B(t,0,e),i?c:Jt(c)?o&&f(e)?c:c.value:u(c)?n?Vt(c):jt(c):c)}}class rt extends ot{constructor(t=!1){super(!1,t)}set(t,e,s,n){let i=t[e];if(!this._isShallow){const e=Qt(i);if(Bt(s)||Qt(s)||(i=zt(i),s=zt(s)),!r(t)&&Jt(i)&&!Jt(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,Jt(t)?t:n);return t===zt(n)&&(c?p(s,i)&&Y(t,"set",e,s):Y(t,"add",e,s)),a}deleteProperty(t,e){const s=o(t,e),n=Reflect.deleteProperty(t,e);return n&&s&&Y(t,"delete",e,void 0),n}has(t,e){const s=Reflect.has(t,e);return l(e)&&nt.has(e)||B(t,0,e),s}ownKeys(t){return B(t,0,r(t)?"length":G),Reflect.ownKeys(t)}}class ct extends ot{constructor(t=!1){super(!0,t)}set(t,e){return!0}deleteProperty(t,e){return!0}}const at=new rt,lt=new ct,ut=new rt(!0),ht=new ct(!0),_t=t=>t,ft=t=>Reflect.getPrototypeOf(t);function pt(t,e,s=!1,n=!1){const i=zt(t=t.__v_raw),o=zt(e);s||(p(e,o)&&B(i,0,e),B(i,0,o));const{has:r}=ft(i),c=n?_t:s?Zt:Xt;return r.call(i,e)?c(t.get(e)):r.call(i,o)?c(t.get(o)):void(t!==i&&t.get(e))}function dt(t,e=!1){const s=this.__v_raw,n=zt(s),i=zt(t);return e||(p(t,i)&&B(n,0,t),B(n,0,i)),t===i?s.has(t):s.has(t)||s.has(i)}function Et(t,e=!1){return t=t.__v_raw,!e&&B(zt(t),0,G),Reflect.get(t,"size",t)}function Ot(t,e=!1){e||Bt(t)||Qt(t)||(t=zt(t));const s=zt(this);return ft(s).has.call(s,t)||(s.add(t),Y(s,"add",t,t)),this}function vt(t,e,s=!1){s||Bt(e)||Qt(e)||(e=zt(e));const n=zt(this),{has:i,get:o}=ft(n);let r=i.call(n,t);r||(t=zt(t),r=i.call(n,t));const c=o.call(n,t);return n.set(t,e),r?p(e,c)&&Y(n,"set",t,e):Y(n,"add",t,e),this}function gt(t){const e=zt(this),{has:s,get:n}=ft(e);let i=s.call(e,t);i||(t=zt(t),i=s.call(e,t)),n&&n.call(e,t);const o=e.delete(t);return i&&Y(e,"delete",t,void 0),o}function St(){const t=zt(this),e=0!==t.size,s=t.clear();return e&&Y(t,"clear",void 0,void 0),s}function Nt(t,e){return function(s,n){const i=this,o=i.__v_raw,r=zt(o),c=e?_t:t?Zt:Xt;return!t&&B(r,0,G),o.forEach(((t,e)=>s.call(n,c(t),c(e),i)))}}function At(t,e,s){return function(...n){const i=this.__v_raw,o=zt(i),r=c(o),a="entries"===t||t===Symbol.iterator&&r,l="keys"===t&&r,u=i[t](...n),h=s?_t:e?Zt:Xt;return!e&&B(o,0,l?F:G),{next(){const{value:t,done:e}=u.next();return e?{value:t,done:e}:{value:a?[h(t[0]),h(t[1])]:h(t),done:e}},[Symbol.iterator](){return this}}}}function Rt(t){return function(...e){return"delete"!==t&&("clear"===t?void 0:this)}}function Tt(){const t={get(t){return pt(this,t)},get size(){return Et(this)},has:dt,add:Ot,set:vt,delete:gt,clear:St,forEach:Nt(!1,!1)},e={get(t){return pt(this,t,!1,!0)},get size(){return Et(this)},has:dt,add(t){return Ot.call(this,t,!0)},set(t,e){return vt.call(this,t,e,!0)},delete:gt,clear:St,forEach:Nt(!1,!0)},s={get(t){return pt(this,t,!0)},get size(){return Et(this,!0)},has(t){return dt.call(this,t,!0)},add:Rt("add"),set:Rt("set"),delete:Rt("delete"),clear:Rt("clear"),forEach:Nt(!0,!1)},n={get(t){return pt(this,t,!0,!0)},get size(){return Et(this,!0)},has(t){return dt.call(this,t,!0)},add:Rt("add"),set:Rt("set"),delete:Rt("delete"),clear:Rt("clear"),forEach:Nt(!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[mt,bt,Dt,yt]=Tt();function xt(t,e){const s=e?t?yt:Dt:t?bt:mt;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 Lt={get:xt(!1,!1)},It={get:xt(!1,!0)},Pt={get:xt(!0,!1)},wt={get:xt(!0,!0)},Ht=new WeakMap,Ut=new WeakMap,Ct=new WeakMap,kt=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=>_(t).slice(8,-1))(t))}function jt(t){return Qt(t)?t:Gt(t,!1,at,Lt,Ht)}function Wt(t){return Gt(t,!1,ut,It,Ut)}function Vt(t){return Gt(t,!0,lt,Pt,Ct)}function Gt(t,e,s,n,i){if(!u(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 Ft(t){return Qt(t)?Ft(t.__v_raw):!(!t||!t.__v_isReactive)}function Qt(t){return!(!t||!t.__v_isReadonly)}function Bt(t){return!(!t||!t.__v_isShallow)}function Yt(t){return!!t&&!!t.__v_raw}function zt(t){const e=t&&t.__v_raw;return e?zt(e):t}const Xt=t=>u(t)?jt(t):t,Zt=t=>u(t)?Vt(t):t;function Jt(t){return!!t&&!0===t.__v_isRef}function Kt(t){return $t(t,!1)}function $t(t,e){return Jt(t)?t:new qt(t,e)}class qt{constructor(t,e){this.dep=new j,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=e?t:zt(t),this._value=e?t:Xt(t),this.__v_isShallow=e}get value(){return this.dep.track(),this._value}set value(t){const e=this._rawValue,s=this.__v_isShallow||Bt(t)||Qt(t);t=s?t:zt(t),p(t,e)&&(this._rawValue=t,this._value=s?t:Xt(t),this.dep.trigger())}}function te(t){return Jt(t)?t.value:t}const ee={get:(t,e,s)=>"__v_raw"===e?t:te(Reflect.get(t,e,s)),set:(t,e,s,n)=>{const i=t[e];return Jt(i)&&!Jt(s)?(i.value=s,!0):Reflect.set(t,e,s,n)}};class se{constructor(t){this.__v_isRef=!0,this._value=void 0;const e=this.dep=new j,{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 ne{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 t=zt(this._object),e=this._key,null==(s=V.get(t))?void 0:s.get(e);var t,e,s}}class ie{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 oe(t,e,s){const n=t[e];return Jt(n)?n:new ne(t,e,s)}class re{constructor(t,e,s){this.fn=t,this.setter=e,this._value=void 0,this.dep=new j(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=k-1,this.effect=this,this.__v_isReadonly=!e,this.isSSR=s}notify(){if(this.flags|=16,!(8&this.flags)&&E!==this)return R(this),!0}get value(){const t=this.dep.track();return x(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}const ce={},ae=new WeakMap;let le;function ue(t,e=!1,s=le){if(s){let e=ae.get(s);e||ae.set(s,e=[]),e.push(t)}}function he(t,e=1/0,s){if(e<=0||!u(t)||t.__v_skip)return t;if((s=s||new Set).has(t))return t;if(s.add(t),e--,Jt(t))he(t.value,e,s);else if(r(t))for(let n=0;n<t.length;n++)he(t[n],e,s);else if("[object Set]"===_(t)||c(t))t.forEach((t=>{he(t,e,s)}));else if((t=>"[object Object]"===_(t))(t)){for(const n in t)he(t[n],e,s);for(const n of Object.getOwnPropertySymbols(t))Object.prototype.propertyIsEnumerable.call(t,n)&&he(t[n],e,s)}return t}const _e={},{isArray:fe}=Array,pe=Object.assign;function de(t,e){const s={};return Object.keys(t).forEach((n=>{e.includes(n)||(s[n]=t[n])})),s}function Ee(t){return Object.prototype.toString.call(t).slice(8,-1)}function Oe(t){return"function"==typeof t}function ve(t){return`__${t}__`}var ge;!function(t){t[t.QUEUED=1]="QUEUED",t[t.ALLOW_RECURSE=4]="ALLOW_RECURSE"}(ge||(ge={}));let Se=!1,Ne=!1;const Ae=[];let Re=0;const Te=[];let me=null,be=0;const De=Promise.resolve();let ye=null;function xe(t){t.flags&ge.QUEUED||(Ae.push(t),t.flags|=ge.QUEUED,Se||Ne||(Ne=!0,ye=De.then(Ie)))}function Le(){if(Te.length>0){for(me=[...new Set(Te)],Te.length=0,be=0;be<me.length;be++){const t=me[be];t.flags&ge.ALLOW_RECURSE&&(t.flags&=~ge.QUEUED),t(),t.flags&=~ge.QUEUED}me=null,be=0}}function Ie(t){Ne=!1,Se=!0;try{for(Re=0;Re<Ae.length;Re++){const t=Ae[Re];0,t.flags&ge.ALLOW_RECURSE&&(t.flags&=~ge.QUEUED),t(),t.flags&ge.ALLOW_RECURSE||(t.flags&=~ge.QUEUED)}}finally{for(;Re<Ae.length;Re++){Ae[Re].flags&=~ge.QUEUED}Re=0,Ae.length=0,Se=!1,ye=null}}function Pe(t,e,s){return we(t,e,s)}function we(t,n,i=_e){const{flush:o}=i,c=pe({},i);"post"===o?c.scheduler=t=>{!function(t){t.flags&ge.QUEUED||(Te.push(t),t.flags|=ge.QUEUED)}(t)}:"sync"!==o&&(c.scheduler=(t,e)=>{e?t():xe(t)}),c.augmentJob=t=>{n&&(t.flags|=ge.ALLOW_RECURSE)};const l=function(t,n,i=e){const{immediate:o,deep:c,once:l,scheduler:u,augmentJob:h,call:_}=i,f=t=>c?t:Bt(t)||!1===c||0===c?he(t,1):he(t);let d,E,O,g,N=!1,A=!1;if(Jt(t)?(E=()=>t.value,N=Bt(t)):Ft(t)?(E=()=>f(t),N=!0):r(t)?(A=!0,N=t.some((t=>Ft(t)||Bt(t))),E=()=>t.map((t=>Jt(t)?t.value:Ft(t)?f(t):a(t)?_?_(t,2):t():void 0))):E=a(t)?n?_?()=>_(t,2):t:()=>{if(O){H();try{O()}finally{U()}}const e=le;le=d;try{return _?_(t,3,[g]):t(g)}finally{le=e}}:s,n&&c){const t=E,e=!0===c?1/0:c;E=()=>he(t(),e)}const R=v(),T=()=>{d.stop(),R&&((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 m=A?new Array(t.length).fill(ce):ce;const b=t=>{if(1&d.flags&&(d.dirty||t))if(n){const t=d.run();if(c||N||(A?t.some(((t,e)=>p(t,m[e]))):p(t,m))){O&&O();const e=le;le=d;try{const e=[t,m===ce?void 0:A&&m[0]===ce?[]:m,g];_?_(n,3,e):n(...e),m=t}finally{le=e}}}else d.run()};return h&&h(b),d=new S(E),d.scheduler=u?()=>u(b,!1):b,g=t=>ue(t,!1,d),O=d.onStop=()=>{const t=ae.get(d);if(t){if(_)_(t,4);else for(const e of t)e();ae.delete(d)}},n?o?b(!0):m=d.run():u?u(b.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 He=Object.create(null);let Ue=null,Ce=null,ke=null;function Me(){return Ce||ke}var je,We,Ve;function Ge(t,e){const s=t[e];return function(...t){const n=this[ve(e)];n&&n.forEach((e=>e(...t))),void 0!==s&&s.call(this,...t)}}function Fe(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(Jt(t))return Fe(t.value);if(Yt(t))return Fe(zt(t));if(fe(t))return t.map((t=>Fe(t)));if(function(t){return"Object"===Ee(t)}(t)){const e={};return Object.keys(t).forEach((s=>{e[s]=Fe(t[s])})),e}throw new TypeError(`${Ee(t)} value is not supported`)}function Qe(t,e){var s;null!==(s=e)&&"object"==typeof s&&Pe(Jt(e)?e:()=>e,(()=>{this.setData({[t]:Fe(e)},Le)}),{deep:!0})}function Be(t,e){const s=t[e];return function(...t){const n=this[ve(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"}(je||(je={})),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"}(We||(We={})),function(t){t.ATTACHED="attached",t.READY="ready",t.MOVED="moved",t.DETACHED="detached",t.ERROR="error"}(Ve||(Ve={}));const Ye={[We.ON_SHOW]:"show",[We.ON_HIDE]:"hide",[We.ON_RESIZE]:"resize",[We.ON_ROUTE_DONE]:"routeDone",[Ve.READY]:We.ON_READY};function ze(t,e){return Je(e,t.lifetimes[e]||t[e])}function Xe(t,e){return Je(e,t.methods[e])}function Ze(t,e){return Je(e,t.pageLifetimes[Ye[e]])}function Je(t,e){const s=ve(t);return function(...t){const n=this[s];n&&n.forEach((e=>e(...t))),void 0!==e&&e.call(this,...t)}}const Ke=ds(je.ON_SHOW),$e=ds(je.ON_HIDE),qe=ds(je.ON_ERROR),ts=ds(je.ON_PAGE_NOT_FOUND),es=ds(je.ON_UNHANDLED_REJECTION),ss=ds(je.ON_THEME_CHANGE),ns=Es(We.ON_SHOW),is=Es(We.ON_HIDE),os=Es(We.ON_UNLOAD),rs=Es(We.ON_ROUTE_DONE),cs=Es(We.ON_PULL_DOWN_REFRESH),as=Es(We.ON_REACH_BOTTOM),ls=Es(We.ON_RESIZE),us=Es(We.ON_TAB_ITEM_TAP),hs=Os(We.ON_LOAD),_s=Os(Ve.MOVED),fs=Os(Ve.DETACHED),ps=Os(Ve.ERROR);function ds(t){return e=>{Ue&&vs(Ue,t,e)}}function Es(t){return e=>{const s=Me();s&&vs(s,t,e)}}function Os(t){return e=>{ke&&vs(ke,t,e)}}function vs(t,e,s){const n=ve(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 re(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=de(t,["setup"])}const n=s[je.ON_LAUNCH];s[je.ON_LAUNCH]=function(t){Ue=this;const s=e(t);void 0!==s&&Object.keys(s).forEach((t=>{this[t]=s[t]})),Ue=null,void 0!==n&&n.call(this,t)},s[je.ON_SHOW]=Ge(s,je.ON_SHOW),s[je.ON_HIDE]=Ge(s,je.ON_HIDE),s[je.ON_ERROR]=Ge(s,je.ON_ERROR),s[je.ON_PAGE_NOT_FOUND]=Ge(s,je.ON_PAGE_NOT_FOUND),s[je.ON_UNHANDLED_REJECTION]=Ge(s,je.ON_UNHANDLED_REJECTION),s[je.ON_THEME_CHANGE]=Ge(s,je.ON_THEME_CHANGE),App(s)},exports.customRef=function(t){return new se(t)},exports.defineComponent=function(t,e){let s,n;e=pe({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=de(t,["setup"]),n.properties&&(i=Object.keys(n.properties))}void 0===n.lifetimes&&(n.lifetimes={});const o=n.lifetimes[Ve.ATTACHED]||n[Ve.ATTACHED];n.lifetimes[Ve.ATTACHED]=function(){var t;this.__scope__=new O,ke=t=this,t.__scope__.on();const e={};i&&i.forEach((t=>{e[t]=this.data[t]})),this.__props__=Wt(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)},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]=Fe(s),Qe.call(this,e,s))})),void 0!==t&&this.setData(t,Le)}ke&&ke.__scope__.off(),ke=null,void 0!==o&&o.call(this)};const r=ze(n,Ve.DETACHED);return n.lifetimes[Ve.DETACHED]=function(){r.call(this),this.__scope__.stop()},n.lifetimes[Ve.READY]=Je(Ye[Ve.READY],n.lifetimes[Ve.READY]||n[Ve.READY]),n.lifetimes[Ve.MOVED]=ze(n,Ve.MOVED),n.lifetimes[Ve.ERROR]=ze(n,Ve.ERROR),void 0===n.methods&&(n.methods={}),(n.methods[We.ON_PAGE_SCROLL]||e.listenPageScroll)&&(n.methods[We.ON_PAGE_SCROLL]=Xe(n,We.ON_PAGE_SCROLL),n.methods.__listenPageScroll__=()=>!0),void 0===n.methods[We.ON_SHARE_APP_MESSAGE]&&e.canShareToOthers&&(n.methods[We.ON_SHARE_APP_MESSAGE]=function(t){const e=this[ve(We.ON_SHARE_APP_MESSAGE)];return e?e(t):{}},n.methods.__isInjectedShareToOthersHook__=()=>!0),void 0===n.methods[We.ON_SHARE_TIMELINE]&&e.canShareToTimeline&&(n.methods[We.ON_SHARE_TIMELINE]=function(){const t=this[ve(We.ON_SHARE_TIMELINE)];return t?t():{}},n.methods.__isInjectedShareToTimelineHook__=()=>!0),void 0===n.methods[We.ON_ADD_TO_FAVORITES]&&(n.methods[We.ON_ADD_TO_FAVORITES]=function(t){const e=this[ve(We.ON_ADD_TO_FAVORITES)];return e?e(t):{}},n.methods.__isInjectedFavoritesHook__=()=>!0),void 0===n.methods[We.ON_SAVE_EXIT_STATE]&&(n.methods[We.ON_SAVE_EXIT_STATE]=function(){const t=this[ve(We.ON_SAVE_EXIT_STATE)];return t?t():{data:void 0}},n.methods.__isInjectedExitStateHook__=()=>!0),n.methods[We.ON_LOAD]=Xe(n,We.ON_LOAD),n.methods[We.ON_PULL_DOWN_REFRESH]=Xe(n,We.ON_PULL_DOWN_REFRESH),n.methods[We.ON_REACH_BOTTOM]=Xe(n,We.ON_REACH_BOTTOM),n.methods[We.ON_TAB_ITEM_TAP]=Xe(n,We.ON_TAB_ITEM_TAP),void 0===n.pageLifetimes&&(n.pageLifetimes={}),n.pageLifetimes[Ye[We.ON_SHOW]]=Ze(n,We.ON_SHOW),n.pageLifetimes[Ye[We.ON_HIDE]]=Ze(n,We.ON_HIDE),n.pageLifetimes[Ye[We.ON_RESIZE]]=Ze(n,We.ON_RESIZE),n.pageLifetimes[Ye[We.ON_ROUTE_DONE]]=Ze(n,We.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=pe({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=de(t,["setup"])}const i=n[We.ON_LOAD];n[We.ON_LOAD]=function(t){var e;this.__scope__=new O,Ce=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)},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]=Fe(s),Qe.call(this,e,s))})),void 0!==t&&this.setData(t,Le)}Ce&&Ce.__scope__.off(),Ce=null,void 0!==i&&i.call(this,t)};const o=Be(n,We.ON_UNLOAD);n[We.ON_UNLOAD]=function(){o.call(this),this.__scope__.stop()},(n[We.ON_PAGE_SCROLL]||e.listenPageScroll)&&(n[We.ON_PAGE_SCROLL]=Be(n,We.ON_PAGE_SCROLL),n.__listenPageScroll__=()=>!0),void 0===n[We.ON_SHARE_APP_MESSAGE]&&e.canShareToOthers&&(n[We.ON_SHARE_APP_MESSAGE]=function(t){const e=this[ve(We.ON_SHARE_APP_MESSAGE)];return e?e(t):{}},n.__isInjectedShareToOthersHook__=()=>!0),void 0===n[We.ON_SHARE_TIMELINE]&&e.canShareToTimeline&&(n[We.ON_SHARE_TIMELINE]=function(){const t=this[ve(We.ON_SHARE_TIMELINE)];return t?t():{}},n.__isInjectedShareToTimelineHook__=()=>!0),void 0===n[We.ON_ADD_TO_FAVORITES]&&(n[We.ON_ADD_TO_FAVORITES]=function(t){const e=this[ve(We.ON_ADD_TO_FAVORITES)];return e?e(t):{}},n.__isInjectedFavoritesHook__=()=>!0),void 0===n[We.ON_SAVE_EXIT_STATE]&&(n[We.ON_SAVE_EXIT_STATE]=function(){const t=this[ve(We.ON_SAVE_EXIT_STATE)];return t?t():{data:void 0}},n.__isInjectedExitStateHook__=()=>!0),n[We.ON_SHOW]=Be(n,We.ON_SHOW),n[We.ON_READY]=Be(n,We.ON_READY),n[We.ON_HIDE]=Be(n,We.ON_HIDE),n[We.ON_ROUTE_DONE]=Be(n,We.ON_ROUTE_DONE),n[We.ON_PULL_DOWN_REFRESH]=Be(n,We.ON_PULL_DOWN_REFRESH),n[We.ON_REACH_BOTTOM]=Be(n,We.ON_REACH_BOTTOM),n[We.ON_RESIZE]=Be(n,We.ON_RESIZE),n[We.ON_TAB_ITEM_TAP]=Be(n,We.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 le},exports.inject=function(t,e,s=!1){return t in He?He[t]:arguments.length>1?s&&Oe(e)?e():e:void 0},exports.isProxy=Yt,exports.isReactive=Ft,exports.isReadonly=Qt,exports.isRef=Jt,exports.isShallow=Bt,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=ye||De;return t?e.then(t):e},exports.onAddToFavorites=t=>{const e=Me();if(e&&e.__isInjectedFavoritesHook__){const s=ve(We.ON_ADD_TO_FAVORITES);void 0===e[s]&&(e[s]=t)}},exports.onAppError=qe,exports.onAppHide=$e,exports.onAppShow=Ke,exports.onDetach=fs,exports.onError=ps,exports.onHide=is,exports.onLoad=hs,exports.onMove=_s,exports.onPageNotFound=ts,exports.onPageScroll=t=>{const e=Me();e&&e.__listenPageScroll__&&vs(e,We.ON_PAGE_SCROLL,t)},exports.onPullDownRefresh=cs,exports.onReachBottom=as,exports.onReady=t=>{const e=Me();e&&vs(e,We.ON_READY,t)},exports.onResize=ls,exports.onRouteDone=rs,exports.onSaveExitState=t=>{const e=Me();if(e&&e.__isInjectedExitStateHook__){const s=ve(We.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=Me();if(e&&e[We.ON_SHARE_APP_MESSAGE]&&e.__isInjectedShareToOthersHook__){const s=ve(We.ON_SHARE_APP_MESSAGE);void 0===e[s]&&(e[s]=t)}},exports.onShareTimeline=t=>{const e=Me();if(e&&e[We.ON_SHARE_TIMELINE]&&e.__isInjectedShareToTimelineHook__){const s=ve(We.ON_SHARE_TIMELINE);void 0===e[s]&&(e[s]=t)}},exports.onShow=ns,exports.onTabItemTap=us,exports.onThemeChange=ss,exports.onUnhandledRejection=es,exports.onUnload=os,exports.onWatcherCleanup=ue,exports.provide=function(t,e){He[t]=e},exports.proxyRefs=function(t){return Ft(t)?t:new Proxy(t,ee)},exports.reactive=jt,exports.readonly=Vt,exports.ref=Kt,exports.shallowReactive=Wt,exports.shallowReadonly=function(t){return Gt(t,!0,ht,wt,kt)},exports.shallowRef=function(t){return $t(t,!0)},exports.stop=function(t){t.effect.stop()},exports.toRaw=zt,exports.toRef=function(t,e,s){return Jt(t)?t:a(t)?new ie(t):u(t)&&arguments.length>1?oe(t,e,s):Kt(t)},exports.toRefs=function(t){const e=r(t)?new Array(t.length):{};for(const s in t)e[s]=oe(t,s);return e},exports.toValue=function(t){return a(t)?t():te(t)},exports.triggerRef=function(t){t.dep&&t.dep.trigger()},exports.unref=te,exports.watch=Pe,exports.watchEffect=function(t,e){return we(t,null,e)},exports.watchPostEffect=function(t,e){return we(t,null,{flush:"post"})},exports.watchSyncEffect=function(t,e){return we(t,null,{flush:"sync"})};
|
|
8
|
+
/*! #__NO_SIDE_EFFECTS__ */function e(e){const t=Object.create(null);for(const s of e.split(","))t[s]=1;return e=>e in t}const t={},s=()=>{},n=Object.assign,i=Object.prototype.hasOwnProperty,o=(e,t)=>i.call(e,t),r=Array.isArray,c=e=>"[object Map]"===u(e),a=e=>"function"==typeof e,l=e=>"symbol"==typeof e,_=e=>null!==e&&"object"==typeof e,h=Object.prototype.toString,u=e=>h.call(e),f=e=>"string"==typeof e&&"NaN"!==e&&"-"!==e[0]&&""+parseInt(e,10)===e,p=(e,t)=>!Object.is(e,t);let d,E;class O{constructor(e=!1){this.detached=e,this._active=!0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.parent=d,!e&&d&&(this.index=(d.scopes||(d.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){let e,t;if(this._isPaused=!0,this.scopes)for(e=0,t=this.scopes.length;e<t;e++)this.scopes[e].pause();for(e=0,t=this.effects.length;e<t;e++)this.effects[e].pause()}}resume(){if(this._active&&this._isPaused){let e,t;if(this._isPaused=!1,this.scopes)for(e=0,t=this.scopes.length;e<t;e++)this.scopes[e].resume();for(e=0,t=this.effects.length;e<t;e++)this.effects[e].resume()}}run(e){if(this._active){const t=d;try{return d=this,e()}finally{d=t}}}on(){d=this}off(){d=this.parent}stop(e){if(this._active){let t,s;for(t=0,s=this.effects.length;t<s;t++)this.effects[t].stop();for(t=0,s=this.cleanups.length;t<s;t++)this.cleanups[t]();if(this.scopes)for(t=0,s=this.scopes.length;t<s;t++)this.scopes[t].stop(!0);if(!this.detached&&this.parent&&!e){const e=this.parent.scopes.pop();e&&e!==this&&(this.parent.scopes[this.index]=e,e.index=this.index)}this.parent=void 0,this._active=!1}}}function v(){return d}const g=new WeakSet;class S{constructor(e){this.fn=e,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 e=E,t=w;E=this,w=!0;try{return this.fn()}finally{y(this),E=e,w=t,this.flags&=-3}}stop(){if(1&this.flags){for(let e=this.deps;e;e=e.nextDep)I(e);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 N,A,R=0;function T(e,t=!1){if(e.flags|=8,t)return e.next=A,void(A=e);e.next=N,N=e}function m(){R++}function b(){if(--R>0)return;if(A){let e=A;for(A=void 0;e;){const t=e.next;e.next=void 0,e.flags&=-9,e=t}}let e;for(;N;){let t=N;for(N=void 0;t;){const s=t.next;if(t.next=void 0,t.flags&=-9,1&t.flags)try{t.trigger()}catch(t){e||(e=t)}t=s}}if(e)throw e}function D(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function y(e){let t,s=e.depsTail,n=s;for(;n;){const e=n.prevDep;-1===n.version?(n===s&&(s=e),I(n),P(n)):t=n,n.dep.activeLink=n.prevActiveLink,n.prevActiveLink=void 0,n=e}e.deps=t,e.depsTail=s}function x(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(L(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function L(e){if(4&e.flags&&!(16&e.flags))return;if(e.flags&=-17,e.globalVersion===M)return;e.globalVersion=M;const t=e.dep;if(e.flags|=2,t.version>0&&!e.isSSR&&e.deps&&!x(e))return void(e.flags&=-3);const s=E,n=w;E=e,w=!0;try{D(e);const s=e.fn(e._value);(0===t.version||p(s,e._value))&&(e._value=s,t.version++)}catch(e){throw t.version++,e}finally{E=s,w=n,y(e),e.flags&=-3}}function I(e,t=!1){const{dep:s,prevSub:n,nextSub:i}=e;if(n&&(n.nextSub=i,e.prevSub=void 0),i&&(i.prevSub=n,e.nextSub=void 0),s.subs===e&&(s.subs=n,!n&&s.computed)){s.computed.flags&=-5;for(let e=s.computed.deps;e;e=e.nextDep)I(e,!0)}t||--s.sc||!s.map||s.map.delete(s.key)}function P(e){const{prevDep:t,nextDep:s}=e;t&&(t.nextDep=s,e.prevDep=void 0),s&&(s.prevDep=t,e.nextDep=void 0)}let w=!0;const H=[];function U(){H.push(w),w=!1}function C(){const e=H.pop();w=void 0===e||e}function k(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const e=E;E=void 0;try{t()}finally{E=e}}}let M=0;class j{constructor(e,t){this.sub=e,this.dep=t,this.version=t.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class W{constructor(e){this.computed=e,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0}track(e){if(!E||!w||E===this.computed)return;let t=this.activeLink;if(void 0===t||t.sub!==E)t=this.activeLink=new j(E,this),E.deps?(t.prevDep=E.depsTail,E.depsTail.nextDep=t,E.depsTail=t):E.deps=E.depsTail=t,V(t);else if(-1===t.version&&(t.version=this.version,t.nextDep)){const e=t.nextDep;e.prevDep=t.prevDep,t.prevDep&&(t.prevDep.nextDep=e),t.prevDep=E.depsTail,t.nextDep=void 0,E.depsTail.nextDep=t,E.depsTail=t,E.deps===t&&(E.deps=e)}return t}trigger(e){this.version++,M++,this.notify(e)}notify(e){m();try{0;for(let e=this.subs;e;e=e.prevSub)e.sub.notify()&&e.sub.dep.notify()}finally{b()}}}function V(e){if(e.dep.sc++,4&e.sub.flags){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let e=t.deps;e;e=e.nextDep)V(e)}const s=e.dep.subs;s!==e&&(e.prevSub=s,s&&(s.nextSub=e)),e.dep.subs=e}}const G=new WeakMap,F=Symbol(""),Q=Symbol(""),B=Symbol("");function Y(e,t,s){if(w&&E){let t=G.get(e);t||G.set(e,t=new Map);let n=t.get(s);n||(t.set(s,n=new W),n.map=t,n.key=s),n.track()}}function X(e,t,s,n,i,o){const a=G.get(e);if(!a)return void M++;const _=e=>{e&&e.trigger()};if(m(),"clear"===t)a.forEach(_);else{const i=r(e),o=i&&f(s);if(i&&"length"===s){const e=Number(n);a.forEach(((t,s)=>{("length"===s||s===B||!l(s)&&s>=e)&&_(t)}))}else switch((void 0!==s||a.has(void 0))&&_(a.get(s)),o&&_(a.get(B)),t){case"add":i?o&&_(a.get("length")):(_(a.get(F)),c(e)&&_(a.get(Q)));break;case"delete":i||(_(a.get(F)),c(e)&&_(a.get(Q)));break;case"set":c(e)&&_(a.get(F))}}b()}function Z(e){const t=Ue(e);return t===e?t:(Y(t,0,B),we(e)?t:t.map(Ce))}function z(e){return Y(e=Ue(e),0,B),e}const J={__proto__:null,[Symbol.iterator](){return K(this,Symbol.iterator,Ce)},concat(...e){return Z(this).concat(...e.map((e=>r(e)?Z(e):e)))},entries(){return K(this,"entries",(e=>(e[1]=Ce(e[1]),e)))},every(e,t){return q(this,"every",e,t,void 0,arguments)},filter(e,t){return q(this,"filter",e,t,(e=>e.map(Ce)),arguments)},find(e,t){return q(this,"find",e,t,Ce,arguments)},findIndex(e,t){return q(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return q(this,"findLast",e,t,Ce,arguments)},findLastIndex(e,t){return q(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return q(this,"forEach",e,t,void 0,arguments)},includes(...e){return te(this,"includes",e)},indexOf(...e){return te(this,"indexOf",e)},join(e){return Z(this).join(e)},lastIndexOf(...e){return te(this,"lastIndexOf",e)},map(e,t){return q(this,"map",e,t,void 0,arguments)},pop(){return se(this,"pop")},push(...e){return se(this,"push",e)},reduce(e,...t){return ee(this,"reduce",e,t)},reduceRight(e,...t){return ee(this,"reduceRight",e,t)},shift(){return se(this,"shift")},some(e,t){return q(this,"some",e,t,void 0,arguments)},splice(...e){return se(this,"splice",e)},toReversed(){return Z(this).toReversed()},toSorted(e){return Z(this).toSorted(e)},toSpliced(...e){return Z(this).toSpliced(...e)},unshift(...e){return se(this,"unshift",e)},values(){return K(this,"values",Ce)}};function K(e,t,s){const n=z(e),i=n[t]();return n===e||we(e)||(i._next=i.next,i.next=()=>{const e=i._next();return e.value&&(e.value=s(e.value)),e}),i}const $=Array.prototype;function q(e,t,s,n,i,o){const r=z(e),c=r!==e&&!we(e),a=r[t];if(a!==$[t]){const t=a.apply(e,o);return c?Ce(t):t}let l=s;r!==e&&(c?l=function(t,n){return s.call(this,Ce(t),n,e)}:s.length>2&&(l=function(t,n){return s.call(this,t,n,e)}));const _=a.call(r,l,n);return c&&i?i(_):_}function ee(e,t,s,n){const i=z(e);let o=s;return i!==e&&(we(e)?s.length>3&&(o=function(t,n,i){return s.call(this,t,n,i,e)}):o=function(t,n,i){return s.call(this,t,Ce(n),i,e)}),i[t](o,...n)}function te(e,t,s){const n=Ue(e);Y(n,0,B);const i=n[t](...s);return-1!==i&&!1!==i||!He(s[0])?i:(s[0]=Ue(s[0]),n[t](...s))}function se(e,t,s=[]){U(),m();const n=Ue(e)[t].apply(e,s);return b(),C(),n}const ne=e("__proto__,__v_isRef,__isVue"),ie=new Set(Object.getOwnPropertyNames(Symbol).filter((e=>"arguments"!==e&&"caller"!==e)).map((e=>Symbol[e])).filter(l));function oe(e){l(e)||(e=String(e));const t=Ue(this);return Y(t,0,e),t.hasOwnProperty(e)}class re{constructor(e=!1,t=!1){this._isReadonly=e,this._isShallow=t}get(e,t,s){const n=this._isReadonly,i=this._isShallow;if("__v_isReactive"===t)return!n;if("__v_isReadonly"===t)return n;if("__v_isShallow"===t)return i;if("__v_raw"===t)return s===(n?i?me:Te:i?Re:Ae).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(s)?e:void 0;const o=r(e);if(!n){let e;if(o&&(e=J[t]))return e;if("hasOwnProperty"===t)return oe}const c=Reflect.get(e,t,Me(e)?e:s);return(l(t)?ie.has(t):ne(t))?c:(n||Y(e,0,t),i?c:Me(c)?o&&f(t)?c:c.value:_(c)?n?xe(c):De(c):c)}}class ce extends re{constructor(e=!1){super(!1,e)}set(e,t,s,n){let i=e[t];if(!this._isShallow){const t=Pe(i);if(we(s)||Pe(s)||(i=Ue(i),s=Ue(s)),!r(e)&&Me(i)&&!Me(s))return!t&&(i.value=s,!0)}const c=r(e)&&f(t)?Number(t)<e.length:o(e,t),a=Reflect.set(e,t,s,Me(e)?e:n);return e===Ue(n)&&(c?p(s,i)&&X(e,"set",t,s):X(e,"add",t,s)),a}deleteProperty(e,t){const s=o(e,t),n=Reflect.deleteProperty(e,t);return n&&s&&X(e,"delete",t,void 0),n}has(e,t){const s=Reflect.has(e,t);return l(t)&&ie.has(t)||Y(e,0,t),s}ownKeys(e){return Y(e,0,r(e)?"length":F),Reflect.ownKeys(e)}}class ae extends re{constructor(e=!1){super(!0,e)}set(e,t){return!0}deleteProperty(e,t){return!0}}const le=new ce,_e=new ae,he=new ce(!0),ue=new ae(!0),fe=e=>e,pe=e=>Reflect.getPrototypeOf(e);function de(e){return function(...t){return"delete"!==e&&("clear"===e?void 0:this)}}function Ee(e,t){const s={get(s){const n=this.__v_raw,i=Ue(n),o=Ue(s);e||(p(s,o)&&Y(i,0,s),Y(i,0,o));const{has:r}=pe(i),c=t?fe:e?ke:Ce;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 t=this.__v_raw;return!e&&Y(Ue(t),0,F),Reflect.get(t,"size",t)},has(t){const s=this.__v_raw,n=Ue(s),i=Ue(t);return e||(p(t,i)&&Y(n,0,t),Y(n,0,i)),t===i?s.has(t):s.has(t)||s.has(i)},forEach(s,n){const i=this,o=i.__v_raw,r=Ue(o),c=t?fe:e?ke:Ce;return!e&&Y(r,0,F),o.forEach(((e,t)=>s.call(n,c(e),c(t),i)))}};n(s,e?{add:de("add"),set:de("set"),delete:de("delete"),clear:de("clear")}:{add(e){t||we(e)||Pe(e)||(e=Ue(e));const s=Ue(this);return pe(s).has.call(s,e)||(s.add(e),X(s,"add",e,e)),this},set(e,s){t||we(s)||Pe(s)||(s=Ue(s));const n=Ue(this),{has:i,get:o}=pe(n);let r=i.call(n,e);r||(e=Ue(e),r=i.call(n,e));const c=o.call(n,e);return n.set(e,s),r?p(s,c)&&X(n,"set",e,s):X(n,"add",e,s),this},delete(e){const t=Ue(this),{has:s,get:n}=pe(t);let i=s.call(t,e);i||(e=Ue(e),i=s.call(t,e)),n&&n.call(t,e);const o=t.delete(e);return i&&X(t,"delete",e,void 0),o},clear(){const e=Ue(this),t=0!==e.size,s=e.clear();return t&&X(e,"clear",void 0,void 0),s}});return["keys","values","entries",Symbol.iterator].forEach((n=>{s[n]=function(e,t,s){return function(...n){const i=this.__v_raw,o=Ue(i),r=c(o),a="entries"===e||e===Symbol.iterator&&r,l="keys"===e&&r,_=i[e](...n),h=s?fe:t?ke:Ce;return!t&&Y(o,0,l?Q:F),{next(){const{value:e,done:t}=_.next();return t?{value:e,done:t}:{value:a?[h(e[0]),h(e[1])]:h(e),done:t}},[Symbol.iterator](){return this}}}}(n,e,t)})),s}function Oe(e,t){const s=Ee(e,t);return(t,n,i)=>"__v_isReactive"===n?!e:"__v_isReadonly"===n?e:"__v_raw"===n?t:Reflect.get(o(s,n)&&n in t?s:t,n,i)}const ve={get:Oe(!1,!1)},ge={get:Oe(!1,!0)},Se={get:Oe(!0,!1)},Ne={get:Oe(!0,!0)},Ae=new WeakMap,Re=new WeakMap,Te=new WeakMap,me=new WeakMap;function be(e){return e.__v_skip||!Object.isExtensible(e)?0:function(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}((e=>u(e).slice(8,-1))(e))}function De(e){return Pe(e)?e:Le(e,!1,le,ve,Ae)}function ye(e){return Le(e,!1,he,ge,Re)}function xe(e){return Le(e,!0,_e,Se,Te)}function Le(e,t,s,n,i){if(!_(e))return e;if(e.__v_raw&&(!t||!e.__v_isReactive))return e;const o=i.get(e);if(o)return o;const r=be(e);if(0===r)return e;const c=new Proxy(e,2===r?n:s);return i.set(e,c),c}function Ie(e){return Pe(e)?Ie(e.__v_raw):!(!e||!e.__v_isReactive)}function Pe(e){return!(!e||!e.__v_isReadonly)}function we(e){return!(!e||!e.__v_isShallow)}function He(e){return!!e&&!!e.__v_raw}function Ue(e){const t=e&&e.__v_raw;return t?Ue(t):e}const Ce=e=>_(e)?De(e):e,ke=e=>_(e)?xe(e):e;function Me(e){return!!e&&!0===e.__v_isRef}function je(e){return We(e,!1)}function We(e,t){return Me(e)?e:new Ve(e,t)}class Ve{constructor(e,t){this.dep=new W,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=t?e:Ue(e),this._value=t?e:Ce(e),this.__v_isShallow=t}get value(){return this.dep.track(),this._value}set value(e){const t=this._rawValue,s=this.__v_isShallow||we(e)||Pe(e);e=s?e:Ue(e),p(e,t)&&(this._rawValue=e,this._value=s?e:Ce(e),this.dep.trigger())}}function Ge(e){return Me(e)?e.value:e}const Fe={get:(e,t,s)=>"__v_raw"===t?e:Ge(Reflect.get(e,t,s)),set:(e,t,s,n)=>{const i=e[t];return Me(i)&&!Me(s)?(i.value=s,!0):Reflect.set(e,t,s,n)}};class Qe{constructor(e){this.__v_isRef=!0,this._value=void 0;const t=this.dep=new W,{get:s,set:n}=e(t.track.bind(t),t.trigger.bind(t));this._get=s,this._set=n}get value(){return this._value=this._get()}set value(e){this._set(e)}}class Be{constructor(e,t,s){this._object=e,this._key=t,this._defaultValue=s,this.__v_isRef=!0,this._value=void 0}get value(){const e=this._object[this._key];return this._value=void 0===e?this._defaultValue:e}set value(e){this._object[this._key]=e}get dep(){return function(e,t){const s=G.get(e);return s&&s.get(t)}(Ue(this._object),this._key)}}class Ye{constructor(e){this._getter=e,this.__v_isRef=!0,this.__v_isReadonly=!0,this._value=void 0}get value(){return this._value=this._getter()}}function Xe(e,t,s){const n=e[t];return Me(n)?n:new Be(e,t,s)}class Ze{constructor(e,t,s){this.fn=e,this.setter=t,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=!t,this.isSSR=s}notify(){if(this.flags|=16,!(8&this.flags)&&E!==this)return T(this,!0),!0}get value(){const e=this.dep.track();return L(this),e&&(e.version=this.dep.version),this._value}set value(e){this.setter&&this.setter(e)}}const ze={},Je=new WeakMap;let Ke;function $e(e,t=!1,s=Ke){if(s){let t=Je.get(s);t||Je.set(s,t=[]),t.push(e)}}function qe(e,t=1/0,s){if(t<=0||!_(e)||e.__v_skip)return e;if((s=s||new Set).has(e))return e;if(s.add(e),t--,Me(e))qe(e.value,t,s);else if(r(e))for(let n=0;n<e.length;n++)qe(e[n],t,s);else if("[object Set]"===u(e)||c(e))e.forEach((e=>{qe(e,t,s)}));else if((e=>"[object Object]"===u(e))(e)){for(const n in e)qe(e[n],t,s);for(const n of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,n)&&qe(e[n],t,s)}return e}const et={},{isArray:tt}=Array,st=Object.assign;function nt(e,t){const s={};return Object.keys(e).forEach((n=>{t.includes(n)||(s[n]=e[n])})),s}function it(e){return Object.prototype.toString.call(e).slice(8,-1)}function ot(e){return"function"==typeof e}function rt(e){return`__${e}__`}var ct;!function(e){e[e.QUEUED=1]="QUEUED",e[e.ALLOW_RECURSE=4]="ALLOW_RECURSE"}(ct||(ct={}));const at=[];let lt=-1;const _t=[];let ht=null,ut=0;const ft=Promise.resolve();let pt=null;function dt(e){e.flags&ct.QUEUED||(at.push(e),e.flags|=ct.QUEUED,pt||(pt=ft.then(Ot)))}function Et(){if(_t.length>0){for(ht=[...new Set(_t)],_t.length=0,ut=0;ut<ht.length;ut++){const e=ht[ut];e.flags&ct.ALLOW_RECURSE&&(e.flags&=~ct.QUEUED),e(),e.flags&=~ct.QUEUED}ht=null,ut=0}}function Ot(e){try{for(lt=0;lt<at.length;lt++){const e=at[lt];0,e.flags&ct.ALLOW_RECURSE&&(e.flags&=~ct.QUEUED),e(),e.flags&ct.ALLOW_RECURSE||(e.flags&=~ct.QUEUED)}}finally{for(;lt<at.length;lt++){at[lt].flags&=~ct.QUEUED}lt=-1,at.length=0,pt=null}}function vt(e,t,s){return gt(e,t,s)}function gt(e,n,i=et){const{flush:o}=i,c=st({},i);"post"===o?c.scheduler=e=>{!function(e){e.flags&ct.QUEUED||(_t.push(e),e.flags|=ct.QUEUED)}(e)}:"sync"!==o&&(c.scheduler=(e,t)=>{t?e():dt(e)}),c.augmentJob=e=>{n&&(e.flags|=ct.ALLOW_RECURSE)};const l=function(e,n,i=t){const{immediate:o,deep:c,once:l,scheduler:_,augmentJob:h,call:u}=i,f=e=>c?e:we(e)||!1===c||0===c?qe(e,1):qe(e);let d,E,O,g,N=!1,A=!1;if(Me(e)?(E=()=>e.value,N=we(e)):Ie(e)?(E=()=>f(e),N=!0):r(e)?(A=!0,N=e.some((e=>Ie(e)||we(e))),E=()=>e.map((e=>Me(e)?e.value:Ie(e)?f(e):a(e)?u?u(e,2):e():void 0))):E=a(e)?n?u?()=>u(e,2):e:()=>{if(O){U();try{O()}finally{C()}}const t=Ke;Ke=d;try{return u?u(e,3,[g]):e(g)}finally{Ke=t}}:s,n&&c){const e=E,t=!0===c?1/0:c;E=()=>qe(e(),t)}const R=v(),T=()=>{d.stop(),R&&((e,t)=>{const s=e.indexOf(t);s>-1&&e.splice(s,1)})(R.effects,d)};if(l&&n){const e=n;n=(...t)=>{e(...t),T()}}let m=A?new Array(e.length).fill(ze):ze;const b=e=>{if(1&d.flags&&(d.dirty||e))if(n){const e=d.run();if(c||N||(A?e.some(((e,t)=>p(e,m[t]))):p(e,m))){O&&O();const t=Ke;Ke=d;try{const t=[e,m===ze?void 0:A&&m[0]===ze?[]:m,g];u?u(n,3,t):n(...t),m=e}finally{Ke=t}}}else d.run()};return h&&h(b),d=new S(E),d.scheduler=_?()=>_(b,!1):b,g=e=>$e(e,!1,d),O=d.onStop=()=>{const e=Je.get(d);if(e){if(u)u(e,4);else for(const t of e)t();Je.delete(d)}},n?o?b(!0):m=d.run():_?_(b.bind(null,!0),!0):d.run(),T.pause=d.pause.bind(d),T.resume=d.resume.bind(d),T.stop=T,T}(e,n,c);return l}const St=Object.create(null);let Nt=null,At=null,Rt=null;function Tt(){return At||Rt}var mt,bt,Dt;function yt(e,t){const s=e[t];return function(...e){const n=this[rt(t)];n&&n.forEach((t=>t(...e))),void 0!==s&&s.call(this,...e)}}function xt(e){if(function(e){const t=new Set(["undefined","boolean","number","string"]);return null===e||t.has(typeof e)}(e)||ot(e))return e;if(Me(e))return xt(e.value);if(He(e))return xt(Ue(e));if(tt(e))return e.map((e=>xt(e)));if(function(e){return"Object"===it(e)}(e)){const t={};return Object.keys(e).forEach((s=>{t[s]=xt(e[s])})),t}throw new TypeError(`${it(e)} value is not supported`)}function Lt(e,t){var s;null!==(s=t)&&"object"==typeof s&&vt(Me(t)?t:()=>t,(()=>{this.setData({[e]:xt(t)},Et)}),{deep:!0})}function It(e,t){const s=e[t];return function(...e){const n=this[rt(t)];n&&n.forEach((t=>t(...e))),void 0!==s&&s.call(this,...e)}}!function(e){e.ON_LAUNCH="onLaunch",e.ON_SHOW="onShow",e.ON_HIDE="onHide",e.ON_ERROR="onError",e.ON_PAGE_NOT_FOUND="onPageNotFound",e.ON_UNHANDLED_REJECTION="onUnhandledRejection",e.ON_THEME_CHANGE="onThemeChange"}(mt||(mt={})),function(e){e.ON_LOAD="onLoad",e.ON_SHOW="onShow",e.ON_READY="onReady",e.ON_HIDE="onHide",e.ON_UNLOAD="onUnload",e.ON_ROUTE_DONE="onRouteDone",e.ON_PULL_DOWN_REFRESH="onPullDownRefresh",e.ON_REACH_BOTTOM="onReachBottom",e.ON_PAGE_SCROLL="onPageScroll",e.ON_SHARE_APP_MESSAGE="onShareAppMessage",e.ON_SHARE_TIMELINE="onShareTimeline",e.ON_ADD_TO_FAVORITES="onAddToFavorites",e.ON_RESIZE="onResize",e.ON_TAB_ITEM_TAP="onTabItemTap",e.ON_SAVE_EXIT_STATE="onSaveExitState"}(bt||(bt={})),function(e){e.ATTACHED="attached",e.READY="ready",e.MOVED="moved",e.DETACHED="detached",e.ERROR="error"}(Dt||(Dt={}));const Pt={[bt.ON_SHOW]:"show",[bt.ON_HIDE]:"hide",[bt.ON_RESIZE]:"resize",[bt.ON_ROUTE_DONE]:"routeDone",[Dt.READY]:bt.ON_READY};function wt(e,t){return Ct(t,e.lifetimes[t]||e[t])}function Ht(e,t){return Ct(t,e.methods[t])}function Ut(e,t){return Ct(t,e.pageLifetimes[Pt[t]])}function Ct(e,t){const s=rt(e);return function(...e){const n=this[s];n&&n.forEach((t=>t(...e))),void 0!==t&&t.call(this,...e)}}const kt=ts(mt.ON_SHOW),Mt=ts(mt.ON_HIDE),jt=ts(mt.ON_ERROR),Wt=ts(mt.ON_PAGE_NOT_FOUND),Vt=ts(mt.ON_UNHANDLED_REJECTION),Gt=ts(mt.ON_THEME_CHANGE),Ft=ss(bt.ON_SHOW),Qt=ss(bt.ON_HIDE),Bt=ss(bt.ON_UNLOAD),Yt=ss(bt.ON_ROUTE_DONE),Xt=ss(bt.ON_PULL_DOWN_REFRESH),Zt=ss(bt.ON_REACH_BOTTOM),zt=ss(bt.ON_RESIZE),Jt=ss(bt.ON_TAB_ITEM_TAP),Kt=ns(bt.ON_LOAD),$t=ns(Dt.MOVED),qt=ns(Dt.DETACHED),es=ns(Dt.ERROR);function ts(e){return t=>{Nt&&is(Nt,e,t)}}function ss(e){return t=>{const s=Tt();s&&is(s,e,t)}}function ns(e){return t=>{Rt&&is(Rt,e,t)}}function is(e,t,s){const n=rt(t);void 0===e[n]&&(e[n]=[]),e[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(e,t,s=!1){let n,i;return a(e)?n=e:(n=e.get,i=e.set),new Ze(n,i,s)},exports.createApp=function(e){let t,s;if(ot(e))t=e,s={};else{if(void 0===e.setup)return void App(e);t=e.setup,s=nt(e,["setup"])}const n=s[mt.ON_LAUNCH];s[mt.ON_LAUNCH]=function(e){Nt=this;const s=t(e);void 0!==s&&Object.keys(s).forEach((e=>{this[e]=s[e]})),Nt=null,void 0!==n&&n.call(this,e)},s[mt.ON_SHOW]=yt(s,mt.ON_SHOW),s[mt.ON_HIDE]=yt(s,mt.ON_HIDE),s[mt.ON_ERROR]=yt(s,mt.ON_ERROR),s[mt.ON_PAGE_NOT_FOUND]=yt(s,mt.ON_PAGE_NOT_FOUND),s[mt.ON_UNHANDLED_REJECTION]=yt(s,mt.ON_UNHANDLED_REJECTION),s[mt.ON_THEME_CHANGE]=yt(s,mt.ON_THEME_CHANGE),App(s)},exports.customRef=function(e){return new Qe(e)},exports.defineComponent=function(e,t){let s,n;t=st({listenPageScroll:!1,canShareToOthers:!1,canShareToTimeline:!1},t);let i=null;if(ot(e))s=e,n={};else{if(void 0===e.setup)return Component(e);s=e.setup,n=nt(e,["setup"]),n.properties&&(i=Object.keys(n.properties))}void 0===n.lifetimes&&(n.lifetimes={});const o=n.lifetimes[Dt.ATTACHED]||n[Dt.ATTACHED];n.lifetimes[Dt.ATTACHED]=function(){var e;this.__scope__=new O,Rt=e=this,e.__scope__.on();const t={};i&&i.forEach((e=>{t[e]=this.data[e]})),this.__props__=ye(t);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)},r=s(this.__props__,n);if(void 0!==r){let e;Object.keys(r).forEach((t=>{const s=r[t];ot(s)?this[t]=s:(e=e||{},e[t]=xt(s),Lt.call(this,t,s))})),void 0!==e&&this.setData(e,Et)}Rt&&Rt.__scope__.off(),Rt=null,void 0!==o&&o.call(this)};const r=wt(n,Dt.DETACHED);return n.lifetimes[Dt.DETACHED]=function(){r.call(this),this.__scope__.stop()},n.lifetimes[Dt.READY]=Ct(Pt[Dt.READY],n.lifetimes[Dt.READY]||n[Dt.READY]),n.lifetimes[Dt.MOVED]=wt(n,Dt.MOVED),n.lifetimes[Dt.ERROR]=wt(n,Dt.ERROR),void 0===n.methods&&(n.methods={}),(n.methods[bt.ON_PAGE_SCROLL]||t.listenPageScroll)&&(n.methods[bt.ON_PAGE_SCROLL]=Ht(n,bt.ON_PAGE_SCROLL),n.methods.__listenPageScroll__=()=>!0),void 0===n.methods[bt.ON_SHARE_APP_MESSAGE]&&t.canShareToOthers&&(n.methods[bt.ON_SHARE_APP_MESSAGE]=function(e){const t=this[rt(bt.ON_SHARE_APP_MESSAGE)];return t?t(e):{}},n.methods.__isInjectedShareToOthersHook__=()=>!0),void 0===n.methods[bt.ON_SHARE_TIMELINE]&&t.canShareToTimeline&&(n.methods[bt.ON_SHARE_TIMELINE]=function(){const e=this[rt(bt.ON_SHARE_TIMELINE)];return e?e():{}},n.methods.__isInjectedShareToTimelineHook__=()=>!0),void 0===n.methods[bt.ON_ADD_TO_FAVORITES]&&(n.methods[bt.ON_ADD_TO_FAVORITES]=function(e){const t=this[rt(bt.ON_ADD_TO_FAVORITES)];return t?t(e):{}},n.methods.__isInjectedFavoritesHook__=()=>!0),void 0===n.methods[bt.ON_SAVE_EXIT_STATE]&&(n.methods[bt.ON_SAVE_EXIT_STATE]=function(){const e=this[rt(bt.ON_SAVE_EXIT_STATE)];return e?e():{data:void 0}},n.methods.__isInjectedExitStateHook__=()=>!0),n.methods[bt.ON_LOAD]=Ht(n,bt.ON_LOAD),n.methods[bt.ON_PULL_DOWN_REFRESH]=Ht(n,bt.ON_PULL_DOWN_REFRESH),n.methods[bt.ON_REACH_BOTTOM]=Ht(n,bt.ON_REACH_BOTTOM),n.methods[bt.ON_TAB_ITEM_TAP]=Ht(n,bt.ON_TAB_ITEM_TAP),void 0===n.pageLifetimes&&(n.pageLifetimes={}),n.pageLifetimes[Pt[bt.ON_SHOW]]=Ut(n,bt.ON_SHOW),n.pageLifetimes[Pt[bt.ON_HIDE]]=Ut(n,bt.ON_HIDE),n.pageLifetimes[Pt[bt.ON_RESIZE]]=Ut(n,bt.ON_RESIZE),n.pageLifetimes[Pt[bt.ON_ROUTE_DONE]]=Ut(n,bt.ON_ROUTE_DONE),i&&(void 0===n.observers&&(n.observers={}),i.forEach((e=>{const t=n.observers[e];n.observers[e]=function(s){this.__props__&&(this.__props__[e]=s),void 0!==t&&t.call(this,s)}}))),Component(n)},exports.definePage=function(e,t){let s,n;if(t=st({listenPageScroll:!1,canShareToOthers:!1,canShareToTimeline:!1},t),ot(e))s=e,n={};else{if(void 0===e.setup)return void Page(e);s=e.setup,n=nt(e,["setup"])}const i=n[bt.ON_LOAD];n[bt.ON_LOAD]=function(e){var t;this.__scope__=new O,At=t=this,t.__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)},o=s(e,n);if(void 0!==o){let e;Object.keys(o).forEach((t=>{const s=o[t];ot(s)?this[t]=s:(e=e||{},e[t]=xt(s),Lt.call(this,t,s))})),void 0!==e&&this.setData(e,Et)}At&&At.__scope__.off(),At=null,void 0!==i&&i.call(this,e)};const o=It(n,bt.ON_UNLOAD);n[bt.ON_UNLOAD]=function(){o.call(this),this.__scope__.stop()},(n[bt.ON_PAGE_SCROLL]||t.listenPageScroll)&&(n[bt.ON_PAGE_SCROLL]=It(n,bt.ON_PAGE_SCROLL),n.__listenPageScroll__=()=>!0),void 0===n[bt.ON_SHARE_APP_MESSAGE]&&t.canShareToOthers&&(n[bt.ON_SHARE_APP_MESSAGE]=function(e){const t=this[rt(bt.ON_SHARE_APP_MESSAGE)];return t?t(e):{}},n.__isInjectedShareToOthersHook__=()=>!0),void 0===n[bt.ON_SHARE_TIMELINE]&&t.canShareToTimeline&&(n[bt.ON_SHARE_TIMELINE]=function(){const e=this[rt(bt.ON_SHARE_TIMELINE)];return e?e():{}},n.__isInjectedShareToTimelineHook__=()=>!0),void 0===n[bt.ON_ADD_TO_FAVORITES]&&(n[bt.ON_ADD_TO_FAVORITES]=function(e){const t=this[rt(bt.ON_ADD_TO_FAVORITES)];return t?t(e):{}},n.__isInjectedFavoritesHook__=()=>!0),void 0===n[bt.ON_SAVE_EXIT_STATE]&&(n[bt.ON_SAVE_EXIT_STATE]=function(){const e=this[rt(bt.ON_SAVE_EXIT_STATE)];return e?e():{data:void 0}},n.__isInjectedExitStateHook__=()=>!0),n[bt.ON_SHOW]=It(n,bt.ON_SHOW),n[bt.ON_READY]=It(n,bt.ON_READY),n[bt.ON_HIDE]=It(n,bt.ON_HIDE),n[bt.ON_ROUTE_DONE]=It(n,bt.ON_ROUTE_DONE),n[bt.ON_PULL_DOWN_REFRESH]=It(n,bt.ON_PULL_DOWN_REFRESH),n[bt.ON_REACH_BOTTOM]=It(n,bt.ON_REACH_BOTTOM),n[bt.ON_RESIZE]=It(n,bt.ON_RESIZE),n[bt.ON_TAB_ITEM_TAP]=It(n,bt.ON_TAB_ITEM_TAP),Page(n)},exports.effect=function(e,t){e.effect instanceof S&&(e=e.effect.fn);const s=new S(e);t&&n(s,t);try{s.run()}catch(e){throw s.stop(),e}const i=s.run.bind(s);return i.effect=s,i},exports.effectScope=function(e){return new O(e)},exports.getCurrentScope=v,exports.getCurrentWatcher=function(){return Ke},exports.inject=function(e,t,s=!1){return e in St?St[e]:arguments.length>1?s&&ot(t)?t():t:void 0},exports.isProxy=He,exports.isReactive=Ie,exports.isReadonly=Pe,exports.isRef=Me,exports.isShallow=we,exports.markRaw=function(e){return!o(e,"__v_skip")&&Object.isExtensible(e)&&((e,t,s,n=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:n,value:s})})(e,"__v_skip",!0),e},exports.nextTick=function(e){const t=pt||ft;return e?t.then(e):t},exports.onAddToFavorites=e=>{const t=Tt();if(t&&t.__isInjectedFavoritesHook__){const s=rt(bt.ON_ADD_TO_FAVORITES);void 0===t[s]&&(t[s]=e)}},exports.onAppError=jt,exports.onAppHide=Mt,exports.onAppShow=kt,exports.onDetach=qt,exports.onError=es,exports.onHide=Qt,exports.onLoad=Kt,exports.onMove=$t,exports.onPageNotFound=Wt,exports.onPageScroll=e=>{const t=Tt();t&&t.__listenPageScroll__&&is(t,bt.ON_PAGE_SCROLL,e)},exports.onPullDownRefresh=Xt,exports.onReachBottom=Zt,exports.onReady=e=>{const t=Tt();t&&is(t,bt.ON_READY,e)},exports.onResize=zt,exports.onRouteDone=Yt,exports.onSaveExitState=e=>{const t=Tt();if(t&&t.__isInjectedExitStateHook__){const s=rt(bt.ON_SAVE_EXIT_STATE);void 0===t[s]&&(t[s]=e)}},exports.onScopeDispose=function(e,t=!1){d&&d.cleanups.push(e)},exports.onShareAppMessage=e=>{const t=Tt();if(t&&t[bt.ON_SHARE_APP_MESSAGE]&&t.__isInjectedShareToOthersHook__){const s=rt(bt.ON_SHARE_APP_MESSAGE);void 0===t[s]&&(t[s]=e)}},exports.onShareTimeline=e=>{const t=Tt();if(t&&t[bt.ON_SHARE_TIMELINE]&&t.__isInjectedShareToTimelineHook__){const s=rt(bt.ON_SHARE_TIMELINE);void 0===t[s]&&(t[s]=e)}},exports.onShow=Ft,exports.onTabItemTap=Jt,exports.onThemeChange=Gt,exports.onUnhandledRejection=Vt,exports.onUnload=Bt,exports.onWatcherCleanup=$e,exports.provide=function(e,t){St[e]=t},exports.proxyRefs=function(e){return Ie(e)?e:new Proxy(e,Fe)},exports.reactive=De,exports.readonly=xe,exports.ref=je,exports.shallowReactive=ye,exports.shallowReadonly=function(e){return Le(e,!0,ue,Ne,me)},exports.shallowRef=function(e){return We(e,!0)},exports.stop=function(e){e.effect.stop()},exports.toRaw=Ue,exports.toRef=function(e,t,s){return Me(e)?e:a(e)?new Ye(e):_(e)&&arguments.length>1?Xe(e,t,s):je(e)},exports.toRefs=function(e){const t=r(e)?new Array(e.length):{};for(const s in e)t[s]=Xe(e,s);return t},exports.toValue=function(e){return a(e)?e():Ge(e)},exports.triggerRef=function(e){e.dep&&e.dep.trigger()},exports.unref=Ge,exports.watch=vt,exports.watchEffect=function(e,t){return gt(e,null,t)},exports.watchPostEffect=function(e,t){return gt(e,null,{flush:"post"})},exports.watchSyncEffect=function(e,t){return gt(e,null,{flush:"sync"})};
|
package/dist/vue-mini.d.ts
CHANGED
|
@@ -58,23 +58,17 @@ declare function definePage<Data extends WechatMiniprogram.Page.DataOption, Cust
|
|
|
58
58
|
|
|
59
59
|
type ComponentContext = WechatMiniprogram.Component.InstanceProperties & Omit<WechatMiniprogram.Component.InstanceMethods<Record<string, any>>, 'setData' | 'groupSetData' | 'hasBehavior'>;
|
|
60
60
|
type ComponentSetup<Props extends Record<string, any>> = (this: void, props: Readonly<Props>, context: ComponentContext) => Bindings;
|
|
61
|
-
type
|
|
62
|
-
|
|
63
|
-
} & {
|
|
64
|
-
setup?: ComponentSetup<{}>;
|
|
65
|
-
};
|
|
66
|
-
type ComponentOptionsWithProps<Props extends WechatMiniprogram.Component.PropertyOption, Data extends WechatMiniprogram.Component.DataOption, Methods extends WechatMiniprogram.Component.MethodOption> = WechatMiniprogram.Component.Options<Data, Props, Methods> & {
|
|
67
|
-
setup?: ComponentSetup<PropertyOptionToData<Props>>;
|
|
61
|
+
type ComponentOptions<Props extends WechatMiniprogram.Component.PropertyOption, Data extends WechatMiniprogram.Component.DataOption, Methods extends WechatMiniprogram.Component.MethodOption, Behavior extends WechatMiniprogram.Component.BehaviorOption> = WechatMiniprogram.Component.Options<Data, Props, Methods, Behavior> & {
|
|
62
|
+
setup?: ComponentSetup<PropertyOptionToData<WechatMiniprogram.Component.FilterUnknownType<Props>>>;
|
|
68
63
|
};
|
|
69
64
|
/** * Temporary patch for https://github.com/wechat-miniprogram/api-typings/issues/97 ***/
|
|
70
65
|
type PropertyOptionToData<T extends WechatMiniprogram.Component.PropertyOption> = {
|
|
71
66
|
[Name in keyof T]: PropertyToData<T[Name]>;
|
|
72
67
|
};
|
|
73
|
-
type PropertyToData<T extends WechatMiniprogram.Component.AllProperty> = T extends WechatMiniprogram.Component.PropertyType ? WechatMiniprogram.Component.ValueType<T> : T extends WechatMiniprogram.Component.AllFullProperty ? T['optionalTypes'] extends OptionalTypes<infer Option> ? WechatMiniprogram.Component.
|
|
68
|
+
type PropertyToData<T extends WechatMiniprogram.Component.AllProperty> = T extends WechatMiniprogram.Component.PropertyType ? WechatMiniprogram.Component.ValueType<T> : T extends WechatMiniprogram.Component.AllFullProperty ? T['optionalTypes'] extends OptionalTypes<infer Option> ? WechatMiniprogram.Component.FullPropertyToData<T> | WechatMiniprogram.Component.ValueType<Option> : WechatMiniprogram.Component.FullPropertyToData<T> : never;
|
|
74
69
|
type OptionalTypes<T extends WechatMiniprogram.Component.PropertyType> = T[];
|
|
75
70
|
declare function defineComponent(setup: ComponentSetup<{}>, config?: Config): string;
|
|
76
|
-
declare function defineComponent<Data extends WechatMiniprogram.Component.DataOption, Methods extends WechatMiniprogram.Component.MethodOption>(options:
|
|
77
|
-
declare function defineComponent<Props extends WechatMiniprogram.Component.PropertyOption, Data extends WechatMiniprogram.Component.DataOption, Methods extends WechatMiniprogram.Component.MethodOption>(options: ComponentOptionsWithProps<Props, Data, Methods>, config?: Config): string;
|
|
71
|
+
declare function defineComponent<Props extends WechatMiniprogram.Component.PropertyOption, Data extends WechatMiniprogram.Component.DataOption, Methods extends WechatMiniprogram.Component.MethodOption, Behavior extends WechatMiniprogram.Component.BehaviorOption>(options: ComponentOptions<Props, Data, Methods, Behavior>, config?: Config): string;
|
|
78
72
|
|
|
79
73
|
declare const onAppShow: (hook: (options: WechatMiniprogram.App.LaunchShowOption) => unknown) => void;
|
|
80
74
|
declare const onAppHide: (hook: () => unknown) => void;
|
|
@@ -101,4 +95,4 @@ declare const onMove: (hook: () => unknown) => void;
|
|
|
101
95
|
declare const onDetach: (hook: () => unknown) => void;
|
|
102
96
|
declare const onError: (hook: (error: WechatMiniprogram.Error) => unknown) => void;
|
|
103
97
|
|
|
104
|
-
export { type AppOptions, type AppSetup, type Bindings, type ComponentContext, type
|
|
98
|
+
export { type AppOptions, type AppSetup, type Bindings, type ComponentContext, type ComponentOptions, type ComponentSetup, type Config, type InjectionKey, type MultiWatchSources, type PageContext, type PageOptions, type PageSetup, type Query, type WatchOptions, type WatchEffectOptions as WatchOptionsBase, 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 };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* vue-mini v1.
|
|
2
|
+
* vue-mini v1.2.0
|
|
3
3
|
* https://github.com/vue-mini/vue-mini
|
|
4
4
|
* (c) 2019-present Yang Mingshan
|
|
5
5
|
* @license MIT
|
|
@@ -48,10 +48,8 @@ var SchedulerJobFlags;
|
|
|
48
48
|
SchedulerJobFlags[SchedulerJobFlags["QUEUED"] = 1] = "QUEUED";
|
|
49
49
|
SchedulerJobFlags[SchedulerJobFlags["ALLOW_RECURSE"] = 4] = "ALLOW_RECURSE";
|
|
50
50
|
})(SchedulerJobFlags || (SchedulerJobFlags = {}));
|
|
51
|
-
let isFlushing = false;
|
|
52
|
-
let isFlushPending = false;
|
|
53
51
|
const queue = [];
|
|
54
|
-
let flushIndex =
|
|
52
|
+
let flushIndex = -1;
|
|
55
53
|
const pendingPostFlushCbs = [];
|
|
56
54
|
let activePostFlushCbs = null;
|
|
57
55
|
let postFlushIndex = 0;
|
|
@@ -72,8 +70,7 @@ function queueJob(job) {
|
|
|
72
70
|
}
|
|
73
71
|
}
|
|
74
72
|
function queueFlush() {
|
|
75
|
-
if (!
|
|
76
|
-
isFlushPending = true;
|
|
73
|
+
if (!currentFlushPromise) {
|
|
77
74
|
// eslint-disable-next-line promise/prefer-await-to-then
|
|
78
75
|
currentFlushPromise = resolvedPromise.then(flushJobs);
|
|
79
76
|
}
|
|
@@ -101,8 +98,6 @@ function flushPostFlushCbs() {
|
|
|
101
98
|
}
|
|
102
99
|
}
|
|
103
100
|
function flushJobs(seen) {
|
|
104
|
-
isFlushPending = false;
|
|
105
|
-
isFlushing = true;
|
|
106
101
|
/* istanbul ignore else -- @preserve */
|
|
107
102
|
if ((process.env.NODE_ENV !== 'production')) {
|
|
108
103
|
seen = seen || new Map();
|
|
@@ -137,9 +132,8 @@ function flushJobs(seen) {
|
|
|
137
132
|
const job = queue[flushIndex];
|
|
138
133
|
job.flags &= ~SchedulerJobFlags.QUEUED;
|
|
139
134
|
}
|
|
140
|
-
flushIndex =
|
|
135
|
+
flushIndex = -1;
|
|
141
136
|
queue.length = 0;
|
|
142
|
-
isFlushing = false;
|
|
143
137
|
currentFlushPromise = null;
|
|
144
138
|
}
|
|
145
139
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vue-mini/core",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2.0",
|
|
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.12",
|
|
36
|
+
"miniprogram-api-typings": "^4.0.1"
|
|
37
37
|
}
|
|
38
38
|
}
|