@vue/compat 3.5.0-alpha.5 → 3.5.0-beta.2
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/README.md +80 -80
- package/dist/vue-compat.d.ts +2 -2
- package/dist/vue.cjs.js +586 -215
- package/dist/vue.cjs.prod.js +524 -189
- package/dist/vue.esm-browser.js +556 -210
- package/dist/vue.esm-browser.prod.js +6 -6
- package/dist/vue.esm-bundler.js +556 -210
- package/dist/vue.global.js +545 -205
- package/dist/vue.global.prod.js +6 -6
- package/dist/vue.runtime.esm-browser.js +477 -180
- package/dist/vue.runtime.esm-browser.prod.js +2 -2
- package/dist/vue.runtime.esm-bundler.js +477 -180
- package/dist/vue.runtime.global.js +466 -175
- package/dist/vue.runtime.global.prod.js +2 -2
- package/package.json +3 -3
package/dist/vue.esm-bundler.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/compat v3.5.0-
|
|
2
|
+
* @vue/compat v3.5.0-beta.2
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -61,9 +61,11 @@ const cacheStringFunction = (fn) => {
|
|
|
61
61
|
};
|
|
62
62
|
};
|
|
63
63
|
const camelizeRE = /-(\w)/g;
|
|
64
|
-
const camelize = cacheStringFunction(
|
|
65
|
-
|
|
66
|
-
|
|
64
|
+
const camelize = cacheStringFunction(
|
|
65
|
+
(str) => {
|
|
66
|
+
return str.replace(camelizeRE, (_, c) => c ? c.toUpperCase() : "");
|
|
67
|
+
}
|
|
68
|
+
);
|
|
67
69
|
const hyphenateRE = /\B([A-Z])/g;
|
|
68
70
|
const hyphenate = cacheStringFunction(
|
|
69
71
|
(str) => str.replace(hyphenateRE, "-$1").toLowerCase()
|
|
@@ -71,10 +73,12 @@ const hyphenate = cacheStringFunction(
|
|
|
71
73
|
const capitalize = cacheStringFunction((str) => {
|
|
72
74
|
return str.charAt(0).toUpperCase() + str.slice(1);
|
|
73
75
|
});
|
|
74
|
-
const toHandlerKey = cacheStringFunction(
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
76
|
+
const toHandlerKey = cacheStringFunction(
|
|
77
|
+
(str) => {
|
|
78
|
+
const s = str ? `on${capitalize(str)}` : ``;
|
|
79
|
+
return s;
|
|
80
|
+
}
|
|
81
|
+
);
|
|
78
82
|
const hasChanged = (value, oldValue) => !Object.is(value, oldValue);
|
|
79
83
|
const invokeArrayFns = (fns, ...arg) => {
|
|
80
84
|
for (let i = 0; i < fns.length; i++) {
|
|
@@ -386,6 +390,7 @@ class EffectScope {
|
|
|
386
390
|
* @internal
|
|
387
391
|
*/
|
|
388
392
|
this.cleanups = [];
|
|
393
|
+
this._isPaused = false;
|
|
389
394
|
this.parent = activeEffectScope;
|
|
390
395
|
if (!detached && activeEffectScope) {
|
|
391
396
|
this.index = (activeEffectScope.scopes || (activeEffectScope.scopes = [])).push(
|
|
@@ -396,6 +401,37 @@ class EffectScope {
|
|
|
396
401
|
get active() {
|
|
397
402
|
return this._active;
|
|
398
403
|
}
|
|
404
|
+
pause() {
|
|
405
|
+
if (this._active) {
|
|
406
|
+
this._isPaused = true;
|
|
407
|
+
if (this.scopes) {
|
|
408
|
+
for (let i = 0, l = this.scopes.length; i < l; i++) {
|
|
409
|
+
this.scopes[i].pause();
|
|
410
|
+
}
|
|
411
|
+
}
|
|
412
|
+
for (let i = 0, l = this.effects.length; i < l; i++) {
|
|
413
|
+
this.effects[i].pause();
|
|
414
|
+
}
|
|
415
|
+
}
|
|
416
|
+
}
|
|
417
|
+
/**
|
|
418
|
+
* Resumes the effect scope, including all child scopes and effects.
|
|
419
|
+
*/
|
|
420
|
+
resume() {
|
|
421
|
+
if (this._active) {
|
|
422
|
+
if (this._isPaused) {
|
|
423
|
+
this._isPaused = false;
|
|
424
|
+
if (this.scopes) {
|
|
425
|
+
for (let i = 0, l = this.scopes.length; i < l; i++) {
|
|
426
|
+
this.scopes[i].resume();
|
|
427
|
+
}
|
|
428
|
+
}
|
|
429
|
+
for (let i = 0, l = this.effects.length; i < l; i++) {
|
|
430
|
+
this.effects[i].resume();
|
|
431
|
+
}
|
|
432
|
+
}
|
|
433
|
+
}
|
|
434
|
+
}
|
|
399
435
|
run(fn) {
|
|
400
436
|
if (this._active) {
|
|
401
437
|
const currentEffectScope = activeEffectScope;
|
|
@@ -466,6 +502,7 @@ function onScopeDispose(fn, failSilently = false) {
|
|
|
466
502
|
}
|
|
467
503
|
|
|
468
504
|
let activeSub;
|
|
505
|
+
const pausedQueueEffects = /* @__PURE__ */ new WeakSet();
|
|
469
506
|
class ReactiveEffect {
|
|
470
507
|
constructor(fn) {
|
|
471
508
|
this.fn = fn;
|
|
@@ -494,6 +531,18 @@ class ReactiveEffect {
|
|
|
494
531
|
activeEffectScope.effects.push(this);
|
|
495
532
|
}
|
|
496
533
|
}
|
|
534
|
+
pause() {
|
|
535
|
+
this.flags |= 64;
|
|
536
|
+
}
|
|
537
|
+
resume() {
|
|
538
|
+
if (this.flags & 64) {
|
|
539
|
+
this.flags &= ~64;
|
|
540
|
+
if (pausedQueueEffects.has(this)) {
|
|
541
|
+
pausedQueueEffects.delete(this);
|
|
542
|
+
this.trigger();
|
|
543
|
+
}
|
|
544
|
+
}
|
|
545
|
+
}
|
|
497
546
|
/**
|
|
498
547
|
* @internal
|
|
499
548
|
*/
|
|
@@ -501,9 +550,6 @@ class ReactiveEffect {
|
|
|
501
550
|
if (this.flags & 2 && !(this.flags & 32)) {
|
|
502
551
|
return;
|
|
503
552
|
}
|
|
504
|
-
if (this.flags & 64) {
|
|
505
|
-
return this.trigger();
|
|
506
|
-
}
|
|
507
553
|
if (!(this.flags & 8)) {
|
|
508
554
|
this.flags |= 8;
|
|
509
555
|
this.nextEffect = batchedEffect;
|
|
@@ -547,7 +593,9 @@ class ReactiveEffect {
|
|
|
547
593
|
}
|
|
548
594
|
}
|
|
549
595
|
trigger() {
|
|
550
|
-
if (this.
|
|
596
|
+
if (this.flags & 64) {
|
|
597
|
+
pausedQueueEffects.add(this);
|
|
598
|
+
} else if (this.scheduler) {
|
|
551
599
|
this.scheduler();
|
|
552
600
|
} else {
|
|
553
601
|
this.runIfDirty();
|
|
@@ -575,6 +623,7 @@ function endBatch() {
|
|
|
575
623
|
batchDepth--;
|
|
576
624
|
return;
|
|
577
625
|
}
|
|
626
|
+
batchDepth--;
|
|
578
627
|
let error;
|
|
579
628
|
while (batchedEffect) {
|
|
580
629
|
let e = batchedEffect;
|
|
@@ -593,7 +642,6 @@ function endBatch() {
|
|
|
593
642
|
e = next;
|
|
594
643
|
}
|
|
595
644
|
}
|
|
596
|
-
batchDepth--;
|
|
597
645
|
if (error) throw error;
|
|
598
646
|
}
|
|
599
647
|
function prepareDeps(sub) {
|
|
@@ -867,9 +915,15 @@ function addSub(link) {
|
|
|
867
915
|
link.dep.subs = link;
|
|
868
916
|
}
|
|
869
917
|
const targetMap = /* @__PURE__ */ new WeakMap();
|
|
870
|
-
const ITERATE_KEY = Symbol(
|
|
871
|
-
|
|
872
|
-
|
|
918
|
+
const ITERATE_KEY = Symbol(
|
|
919
|
+
!!(process.env.NODE_ENV !== "production") ? "Object iterate" : ""
|
|
920
|
+
);
|
|
921
|
+
const MAP_KEY_ITERATE_KEY = Symbol(
|
|
922
|
+
!!(process.env.NODE_ENV !== "production") ? "Map keys iterate" : ""
|
|
923
|
+
);
|
|
924
|
+
const ARRAY_ITERATE_KEY = Symbol(
|
|
925
|
+
!!(process.env.NODE_ENV !== "production") ? "Array iterate" : ""
|
|
926
|
+
);
|
|
873
927
|
function track(target, type, key) {
|
|
874
928
|
if (shouldTrack && activeSub) {
|
|
875
929
|
let depsMap = targetMap.get(target);
|
|
@@ -994,26 +1048,26 @@ const arrayInstrumentations = {
|
|
|
994
1048
|
});
|
|
995
1049
|
},
|
|
996
1050
|
every(fn, thisArg) {
|
|
997
|
-
return apply(this, "every", fn, thisArg);
|
|
1051
|
+
return apply(this, "every", fn, thisArg, void 0, arguments);
|
|
998
1052
|
},
|
|
999
1053
|
filter(fn, thisArg) {
|
|
1000
|
-
return apply(this, "filter", fn, thisArg, (v) => v.map(toReactive));
|
|
1054
|
+
return apply(this, "filter", fn, thisArg, (v) => v.map(toReactive), arguments);
|
|
1001
1055
|
},
|
|
1002
1056
|
find(fn, thisArg) {
|
|
1003
|
-
return apply(this, "find", fn, thisArg, toReactive);
|
|
1057
|
+
return apply(this, "find", fn, thisArg, toReactive, arguments);
|
|
1004
1058
|
},
|
|
1005
1059
|
findIndex(fn, thisArg) {
|
|
1006
|
-
return apply(this, "findIndex", fn, thisArg);
|
|
1060
|
+
return apply(this, "findIndex", fn, thisArg, void 0, arguments);
|
|
1007
1061
|
},
|
|
1008
1062
|
findLast(fn, thisArg) {
|
|
1009
|
-
return apply(this, "findLast", fn, thisArg, toReactive);
|
|
1063
|
+
return apply(this, "findLast", fn, thisArg, toReactive, arguments);
|
|
1010
1064
|
},
|
|
1011
1065
|
findLastIndex(fn, thisArg) {
|
|
1012
|
-
return apply(this, "findLastIndex", fn, thisArg);
|
|
1066
|
+
return apply(this, "findLastIndex", fn, thisArg, void 0, arguments);
|
|
1013
1067
|
},
|
|
1014
1068
|
// flat, flatMap could benefit from ARRAY_ITERATE but are not straight-forward to implement
|
|
1015
1069
|
forEach(fn, thisArg) {
|
|
1016
|
-
return apply(this, "forEach", fn, thisArg);
|
|
1070
|
+
return apply(this, "forEach", fn, thisArg, void 0, arguments);
|
|
1017
1071
|
},
|
|
1018
1072
|
includes(...args) {
|
|
1019
1073
|
return searchProxy(this, "includes", args);
|
|
@@ -1029,7 +1083,7 @@ const arrayInstrumentations = {
|
|
|
1029
1083
|
return searchProxy(this, "lastIndexOf", args);
|
|
1030
1084
|
},
|
|
1031
1085
|
map(fn, thisArg) {
|
|
1032
|
-
return apply(this, "map", fn, thisArg);
|
|
1086
|
+
return apply(this, "map", fn, thisArg, void 0, arguments);
|
|
1033
1087
|
},
|
|
1034
1088
|
pop() {
|
|
1035
1089
|
return noTracking(this, "pop");
|
|
@@ -1048,7 +1102,7 @@ const arrayInstrumentations = {
|
|
|
1048
1102
|
},
|
|
1049
1103
|
// slice could use ARRAY_ITERATE but also seems to beg for range tracking
|
|
1050
1104
|
some(fn, thisArg) {
|
|
1051
|
-
return apply(this, "some", fn, thisArg);
|
|
1105
|
+
return apply(this, "some", fn, thisArg, void 0, arguments);
|
|
1052
1106
|
},
|
|
1053
1107
|
splice(...args) {
|
|
1054
1108
|
return noTracking(this, "splice", args);
|
|
@@ -1084,8 +1138,13 @@ function iterator(self, method, wrapValue) {
|
|
|
1084
1138
|
}
|
|
1085
1139
|
return iter;
|
|
1086
1140
|
}
|
|
1087
|
-
|
|
1141
|
+
const arrayProto = Array.prototype;
|
|
1142
|
+
function apply(self, method, fn, thisArg, wrappedRetFn, args) {
|
|
1088
1143
|
const arr = shallowReadArray(self);
|
|
1144
|
+
let methodFn;
|
|
1145
|
+
if ((methodFn = arr[method]) !== arrayProto[method]) {
|
|
1146
|
+
return methodFn.apply(arr, args);
|
|
1147
|
+
}
|
|
1089
1148
|
let needsWrap = false;
|
|
1090
1149
|
let wrappedFn = fn;
|
|
1091
1150
|
if (arr !== self) {
|
|
@@ -1100,7 +1159,7 @@ function apply(self, method, fn, thisArg, wrappedRetFn) {
|
|
|
1100
1159
|
};
|
|
1101
1160
|
}
|
|
1102
1161
|
}
|
|
1103
|
-
const result = arr
|
|
1162
|
+
const result = methodFn.call(arr, wrappedFn, thisArg);
|
|
1104
1163
|
return needsWrap && wrappedRetFn ? wrappedRetFn(result) : result;
|
|
1105
1164
|
}
|
|
1106
1165
|
function reduce(self, method, fn, args) {
|
|
@@ -1163,7 +1222,7 @@ class BaseReactiveHandler {
|
|
|
1163
1222
|
return isShallow2;
|
|
1164
1223
|
} else if (key === "__v_raw") {
|
|
1165
1224
|
if (receiver === (isReadonly2 ? isShallow2 ? shallowReadonlyMap : readonlyMap : isShallow2 ? shallowReactiveMap : reactiveMap).get(target) || // receiver is not the reactive proxy, but has the same prototype
|
|
1166
|
-
// this means the
|
|
1225
|
+
// this means the receiver is a user proxy of the reactive proxy
|
|
1167
1226
|
Object.getPrototypeOf(target) === Object.getPrototypeOf(receiver)) {
|
|
1168
1227
|
return target;
|
|
1169
1228
|
}
|
|
@@ -1287,9 +1346,7 @@ class ReadonlyReactiveHandler extends BaseReactiveHandler {
|
|
|
1287
1346
|
}
|
|
1288
1347
|
const mutableHandlers = /* @__PURE__ */ new MutableReactiveHandler();
|
|
1289
1348
|
const readonlyHandlers = /* @__PURE__ */ new ReadonlyReactiveHandler();
|
|
1290
|
-
const shallowReactiveHandlers = /* @__PURE__ */ new MutableReactiveHandler(
|
|
1291
|
-
true
|
|
1292
|
-
);
|
|
1349
|
+
const shallowReactiveHandlers = /* @__PURE__ */ new MutableReactiveHandler(true);
|
|
1293
1350
|
const shallowReadonlyHandlers = /* @__PURE__ */ new ReadonlyReactiveHandler(true);
|
|
1294
1351
|
|
|
1295
1352
|
const toShallow = (value) => value;
|
|
@@ -1790,13 +1847,14 @@ function proxyRefs(objectWithRefs) {
|
|
|
1790
1847
|
class CustomRefImpl {
|
|
1791
1848
|
constructor(factory) {
|
|
1792
1849
|
this["__v_isRef"] = true;
|
|
1850
|
+
this._value = void 0;
|
|
1793
1851
|
const dep = this.dep = new Dep();
|
|
1794
1852
|
const { get, set } = factory(dep.track.bind(dep), dep.trigger.bind(dep));
|
|
1795
1853
|
this._get = get;
|
|
1796
1854
|
this._set = set;
|
|
1797
1855
|
}
|
|
1798
1856
|
get value() {
|
|
1799
|
-
return this._get();
|
|
1857
|
+
return this._value = this._get();
|
|
1800
1858
|
}
|
|
1801
1859
|
set value(newVal) {
|
|
1802
1860
|
this._set(newVal);
|
|
@@ -1821,10 +1879,11 @@ class ObjectRefImpl {
|
|
|
1821
1879
|
this._key = _key;
|
|
1822
1880
|
this._defaultValue = _defaultValue;
|
|
1823
1881
|
this["__v_isRef"] = true;
|
|
1882
|
+
this._value = void 0;
|
|
1824
1883
|
}
|
|
1825
1884
|
get value() {
|
|
1826
1885
|
const val = this._object[this._key];
|
|
1827
|
-
return val === void 0 ? this._defaultValue : val;
|
|
1886
|
+
return this._value = val === void 0 ? this._defaultValue : val;
|
|
1828
1887
|
}
|
|
1829
1888
|
set value(newVal) {
|
|
1830
1889
|
this._object[this._key] = newVal;
|
|
@@ -1838,9 +1897,10 @@ class GetterRefImpl {
|
|
|
1838
1897
|
this._getter = _getter;
|
|
1839
1898
|
this["__v_isRef"] = true;
|
|
1840
1899
|
this["__v_isReadonly"] = true;
|
|
1900
|
+
this._value = void 0;
|
|
1841
1901
|
}
|
|
1842
1902
|
get value() {
|
|
1843
|
-
return this._getter();
|
|
1903
|
+
return this._value = this._getter();
|
|
1844
1904
|
}
|
|
1845
1905
|
}
|
|
1846
1906
|
function toRef(source, key, defaultValue) {
|
|
@@ -1874,7 +1934,8 @@ class ComputedRefImpl {
|
|
|
1874
1934
|
/**
|
|
1875
1935
|
* @internal
|
|
1876
1936
|
*/
|
|
1877
|
-
this
|
|
1937
|
+
this.__v_isRef = true;
|
|
1938
|
+
// TODO isolatedDeclarations "__v_isReadonly"
|
|
1878
1939
|
// A computed is also a subscriber that tracks other deps
|
|
1879
1940
|
/**
|
|
1880
1941
|
* @internal
|
|
@@ -2504,6 +2565,9 @@ function reload(id, newComp) {
|
|
|
2504
2565
|
"[HMR] Root or manually mounted instance modified. Full reload required."
|
|
2505
2566
|
);
|
|
2506
2567
|
}
|
|
2568
|
+
if (instance.root.ce && instance !== instance.root) {
|
|
2569
|
+
instance.root.ce._removeChildStyle(oldComp);
|
|
2570
|
+
}
|
|
2507
2571
|
}
|
|
2508
2572
|
queuePostFlushCb(() => {
|
|
2509
2573
|
hmrDirtyComponents.clear();
|
|
@@ -2583,9 +2647,7 @@ function devtoolsInitApp(app, version) {
|
|
|
2583
2647
|
function devtoolsUnmountApp(app) {
|
|
2584
2648
|
emit$2("app:unmount" /* APP_UNMOUNT */, app);
|
|
2585
2649
|
}
|
|
2586
|
-
const devtoolsComponentAdded = /* @__PURE__ */ createDevtoolsComponentHook(
|
|
2587
|
-
"component:added" /* COMPONENT_ADDED */
|
|
2588
|
-
);
|
|
2650
|
+
const devtoolsComponentAdded = /* @__PURE__ */ createDevtoolsComponentHook("component:added" /* COMPONENT_ADDED */);
|
|
2589
2651
|
const devtoolsComponentUpdated = /* @__PURE__ */ createDevtoolsComponentHook("component:updated" /* COMPONENT_UPDATED */);
|
|
2590
2652
|
const _devtoolsComponentRemoved = /* @__PURE__ */ createDevtoolsComponentHook(
|
|
2591
2653
|
"component:removed" /* COMPONENT_REMOVED */
|
|
@@ -2609,12 +2671,8 @@ function createDevtoolsComponentHook(hook) {
|
|
|
2609
2671
|
);
|
|
2610
2672
|
};
|
|
2611
2673
|
}
|
|
2612
|
-
const devtoolsPerfStart = /* @__PURE__ */ createDevtoolsPerformanceHook(
|
|
2613
|
-
|
|
2614
|
-
);
|
|
2615
|
-
const devtoolsPerfEnd = /* @__PURE__ */ createDevtoolsPerformanceHook(
|
|
2616
|
-
"perf:end" /* PERFORMANCE_END */
|
|
2617
|
-
);
|
|
2674
|
+
const devtoolsPerfStart = /* @__PURE__ */ createDevtoolsPerformanceHook("perf:start" /* PERFORMANCE_START */);
|
|
2675
|
+
const devtoolsPerfEnd = /* @__PURE__ */ createDevtoolsPerformanceHook("perf:end" /* PERFORMANCE_END */);
|
|
2618
2676
|
function createDevtoolsPerformanceHook(hook) {
|
|
2619
2677
|
return (component, type, time) => {
|
|
2620
2678
|
emit$2(hook, component.appContext.app, component.uid, component, type, time);
|
|
@@ -4052,6 +4110,7 @@ const logMismatchError = () => {
|
|
|
4052
4110
|
const isSVGContainer = (container) => container.namespaceURI.includes("svg") && container.tagName !== "foreignObject";
|
|
4053
4111
|
const isMathMLContainer = (container) => container.namespaceURI.includes("MathML");
|
|
4054
4112
|
const getContainerType = (container) => {
|
|
4113
|
+
if (container.nodeType !== 1) return void 0;
|
|
4055
4114
|
if (isSVGContainer(container)) return "svg";
|
|
4056
4115
|
if (isMathMLContainer(container)) return "mathml";
|
|
4057
4116
|
return void 0;
|
|
@@ -4327,6 +4386,7 @@ Server rendered element contains more child nodes than client vdom.`
|
|
|
4327
4386
|
}
|
|
4328
4387
|
if (props) {
|
|
4329
4388
|
if (!!(process.env.NODE_ENV !== "production") || __VUE_PROD_HYDRATION_MISMATCH_DETAILS__ || forcePatch || !optimized || patchFlag & (16 | 32)) {
|
|
4389
|
+
const isCustomElement = el.tagName.includes("-");
|
|
4330
4390
|
for (const key in props) {
|
|
4331
4391
|
if ((!!(process.env.NODE_ENV !== "production") || __VUE_PROD_HYDRATION_MISMATCH_DETAILS__) && // #11189 skip if this node has directives that have created hooks
|
|
4332
4392
|
// as it could have mutated the DOM in any possible way
|
|
@@ -4334,7 +4394,7 @@ Server rendered element contains more child nodes than client vdom.`
|
|
|
4334
4394
|
logMismatchError();
|
|
4335
4395
|
}
|
|
4336
4396
|
if (forcePatch && (key.endsWith("value") || key === "indeterminate") || isOn(key) && !isReservedProp(key) || // force hydrate v-bind with .prop modifiers
|
|
4337
|
-
key[0] === ".") {
|
|
4397
|
+
key[0] === "." || isCustomElement) {
|
|
4338
4398
|
patchProp(el, key, null, props[key], void 0, parentComponent);
|
|
4339
4399
|
}
|
|
4340
4400
|
}
|
|
@@ -4670,24 +4730,19 @@ function isMismatchAllowed(el, allowedType) {
|
|
|
4670
4730
|
}
|
|
4671
4731
|
}
|
|
4672
4732
|
|
|
4673
|
-
const hydrateOnIdle = () => (hydrate) => {
|
|
4674
|
-
const id = requestIdleCallback(hydrate);
|
|
4733
|
+
const hydrateOnIdle = (timeout = 1e4) => (hydrate) => {
|
|
4734
|
+
const id = requestIdleCallback(hydrate, { timeout });
|
|
4675
4735
|
return () => cancelIdleCallback(id);
|
|
4676
4736
|
};
|
|
4677
|
-
const hydrateOnVisible = (
|
|
4678
|
-
const ob = new IntersectionObserver(
|
|
4679
|
-
(entries)
|
|
4680
|
-
|
|
4681
|
-
|
|
4682
|
-
|
|
4683
|
-
|
|
4684
|
-
break;
|
|
4685
|
-
}
|
|
4686
|
-
},
|
|
4687
|
-
{
|
|
4688
|
-
rootMargin: isString(margin) ? margin : margin + "px"
|
|
4737
|
+
const hydrateOnVisible = (opts) => (hydrate, forEach) => {
|
|
4738
|
+
const ob = new IntersectionObserver((entries) => {
|
|
4739
|
+
for (const e of entries) {
|
|
4740
|
+
if (!e.isIntersecting) continue;
|
|
4741
|
+
ob.disconnect();
|
|
4742
|
+
hydrate();
|
|
4743
|
+
break;
|
|
4689
4744
|
}
|
|
4690
|
-
);
|
|
4745
|
+
}, opts);
|
|
4691
4746
|
forEach((el) => ob.observe(el));
|
|
4692
4747
|
return () => ob.disconnect();
|
|
4693
4748
|
};
|
|
@@ -4995,14 +5050,14 @@ const KeepAliveImpl = {
|
|
|
4995
5050
|
function pruneCache(filter) {
|
|
4996
5051
|
cache.forEach((vnode, key) => {
|
|
4997
5052
|
const name = getComponentName(vnode.type);
|
|
4998
|
-
if (name &&
|
|
5053
|
+
if (name && !filter(name)) {
|
|
4999
5054
|
pruneCacheEntry(key);
|
|
5000
5055
|
}
|
|
5001
5056
|
});
|
|
5002
5057
|
}
|
|
5003
5058
|
function pruneCacheEntry(key) {
|
|
5004
5059
|
const cached = cache.get(key);
|
|
5005
|
-
if (!current || !isSameVNodeType(cached, current)) {
|
|
5060
|
+
if (cached && (!current || !isSameVNodeType(cached, current))) {
|
|
5006
5061
|
unmount(cached);
|
|
5007
5062
|
} else if (current) {
|
|
5008
5063
|
resetShapeFlag(current);
|
|
@@ -5064,6 +5119,10 @@ const KeepAliveImpl = {
|
|
|
5064
5119
|
return rawVNode;
|
|
5065
5120
|
}
|
|
5066
5121
|
let vnode = getInnerChild(rawVNode);
|
|
5122
|
+
if (vnode.type === Comment) {
|
|
5123
|
+
current = null;
|
|
5124
|
+
return vnode;
|
|
5125
|
+
}
|
|
5067
5126
|
const comp = vnode.type;
|
|
5068
5127
|
const name = getComponentName(
|
|
5069
5128
|
isAsyncWrapper(vnode) ? vnode.type.__asyncResolved || {} : comp
|
|
@@ -5113,6 +5172,7 @@ function matches(pattern, name) {
|
|
|
5113
5172
|
} else if (isString(pattern)) {
|
|
5114
5173
|
return pattern.split(",").includes(name);
|
|
5115
5174
|
} else if (isRegExp(pattern)) {
|
|
5175
|
+
pattern.lastIndex = 0;
|
|
5116
5176
|
return pattern.test(name);
|
|
5117
5177
|
}
|
|
5118
5178
|
return false;
|
|
@@ -5196,17 +5256,19 @@ const createHook = (lifecycle) => (hook, target = currentInstance) => {
|
|
|
5196
5256
|
};
|
|
5197
5257
|
const onBeforeMount = createHook("bm");
|
|
5198
5258
|
const onMounted = createHook("m");
|
|
5199
|
-
const onBeforeUpdate = createHook(
|
|
5259
|
+
const onBeforeUpdate = createHook(
|
|
5260
|
+
"bu"
|
|
5261
|
+
);
|
|
5200
5262
|
const onUpdated = createHook("u");
|
|
5201
|
-
const onBeforeUnmount = createHook(
|
|
5202
|
-
|
|
5203
|
-
const onServerPrefetch = createHook("sp");
|
|
5204
|
-
const onRenderTriggered = createHook(
|
|
5205
|
-
"rtg"
|
|
5263
|
+
const onBeforeUnmount = createHook(
|
|
5264
|
+
"bum"
|
|
5206
5265
|
);
|
|
5207
|
-
const
|
|
5208
|
-
|
|
5266
|
+
const onUnmounted = createHook("um");
|
|
5267
|
+
const onServerPrefetch = createHook(
|
|
5268
|
+
"sp"
|
|
5209
5269
|
);
|
|
5270
|
+
const onRenderTriggered = createHook("rtg");
|
|
5271
|
+
const onRenderTracked = createHook("rtc");
|
|
5210
5272
|
function onErrorCaptured(hook, target = currentInstance) {
|
|
5211
5273
|
injectHook("ec", hook, target);
|
|
5212
5274
|
}
|
|
@@ -5620,9 +5682,14 @@ function createSlots(slots, dynamicSlots) {
|
|
|
5620
5682
|
}
|
|
5621
5683
|
|
|
5622
5684
|
function renderSlot(slots, name, props = {}, fallback, noSlotted) {
|
|
5623
|
-
if (currentRenderingInstance.
|
|
5685
|
+
if (currentRenderingInstance.ce || currentRenderingInstance.parent && isAsyncWrapper(currentRenderingInstance.parent) && currentRenderingInstance.parent.ce) {
|
|
5624
5686
|
if (name !== "default") props.name = name;
|
|
5625
|
-
return
|
|
5687
|
+
return openBlock(), createBlock(
|
|
5688
|
+
Fragment,
|
|
5689
|
+
null,
|
|
5690
|
+
[createVNode("slot", props, fallback && fallback())],
|
|
5691
|
+
64
|
|
5692
|
+
);
|
|
5626
5693
|
}
|
|
5627
5694
|
let slot = slots[name];
|
|
5628
5695
|
if (!!(process.env.NODE_ENV !== "production") && slot && slot.length > 1) {
|
|
@@ -5924,6 +5991,7 @@ const publicPropertiesMap = (
|
|
|
5924
5991
|
$refs: (i) => !!(process.env.NODE_ENV !== "production") ? shallowReadonly(i.refs) : i.refs,
|
|
5925
5992
|
$parent: (i) => getPublicInstance(i.parent),
|
|
5926
5993
|
$root: (i) => getPublicInstance(i.root),
|
|
5994
|
+
$host: (i) => i.ce,
|
|
5927
5995
|
$emit: (i) => i.emit,
|
|
5928
5996
|
$options: (i) => __VUE_OPTIONS_API__ ? resolveMergedOptions(i) : i.type,
|
|
5929
5997
|
$forceUpdate: (i) => i.f || (i.f = () => {
|
|
@@ -6084,29 +6152,25 @@ if (!!(process.env.NODE_ENV !== "production") && true) {
|
|
|
6084
6152
|
return Reflect.ownKeys(target);
|
|
6085
6153
|
};
|
|
6086
6154
|
}
|
|
6087
|
-
const RuntimeCompiledPublicInstanceProxyHandlers = /* @__PURE__ */ extend(
|
|
6088
|
-
{
|
|
6089
|
-
|
|
6090
|
-
|
|
6091
|
-
|
|
6092
|
-
|
|
6093
|
-
|
|
6094
|
-
|
|
6095
|
-
|
|
6096
|
-
|
|
6097
|
-
|
|
6098
|
-
|
|
6099
|
-
|
|
6100
|
-
|
|
6101
|
-
|
|
6102
|
-
key
|
|
6103
|
-
)} should not start with _ which is a reserved prefix for Vue internals.`
|
|
6104
|
-
);
|
|
6105
|
-
}
|
|
6106
|
-
return has;
|
|
6155
|
+
const RuntimeCompiledPublicInstanceProxyHandlers = /* @__PURE__ */ extend({}, PublicInstanceProxyHandlers, {
|
|
6156
|
+
get(target, key) {
|
|
6157
|
+
if (key === Symbol.unscopables) {
|
|
6158
|
+
return;
|
|
6159
|
+
}
|
|
6160
|
+
return PublicInstanceProxyHandlers.get(target, key, target);
|
|
6161
|
+
},
|
|
6162
|
+
has(_, key) {
|
|
6163
|
+
const has = key[0] !== "_" && !isGloballyAllowed(key);
|
|
6164
|
+
if (!!(process.env.NODE_ENV !== "production") && !has && PublicInstanceProxyHandlers.has(_, key)) {
|
|
6165
|
+
warn$1(
|
|
6166
|
+
`Property ${JSON.stringify(
|
|
6167
|
+
key
|
|
6168
|
+
)} should not start with _ which is a reserved prefix for Vue internals.`
|
|
6169
|
+
);
|
|
6107
6170
|
}
|
|
6171
|
+
return has;
|
|
6108
6172
|
}
|
|
6109
|
-
);
|
|
6173
|
+
});
|
|
6110
6174
|
function createDevRenderContext(instance) {
|
|
6111
6175
|
const target = {};
|
|
6112
6176
|
Object.defineProperty(target, `_`, {
|
|
@@ -6795,7 +6859,7 @@ function createCompatVue$1(createApp, createSingletonApp) {
|
|
|
6795
6859
|
return vm;
|
|
6796
6860
|
}
|
|
6797
6861
|
}
|
|
6798
|
-
Vue.version = `2.6.14-compat:${"3.5.0-
|
|
6862
|
+
Vue.version = `2.6.14-compat:${"3.5.0-beta.2"}`;
|
|
6799
6863
|
Vue.config = singletonApp.config;
|
|
6800
6864
|
Vue.use = (plugin, ...options) => {
|
|
6801
6865
|
if (plugin && isFunction(plugin.install)) {
|
|
@@ -7068,7 +7132,7 @@ function installCompatMount(app, context, render) {
|
|
|
7068
7132
|
/* skip options */
|
|
7069
7133
|
);
|
|
7070
7134
|
}
|
|
7071
|
-
container.
|
|
7135
|
+
container.textContent = "";
|
|
7072
7136
|
render(vnode, container, namespace);
|
|
7073
7137
|
if (container instanceof Element) {
|
|
7074
7138
|
container.removeAttribute("v-cloak");
|
|
@@ -7282,7 +7346,7 @@ function createAppAPI(render, hydrate) {
|
|
|
7282
7346
|
If you want to mount another app on the same host container, you need to unmount the previous app by calling \`app.unmount()\` first.`
|
|
7283
7347
|
);
|
|
7284
7348
|
}
|
|
7285
|
-
const vnode = createVNode(rootComponent, rootProps);
|
|
7349
|
+
const vnode = app._ceVNode || createVNode(rootComponent, rootProps);
|
|
7286
7350
|
vnode.appContext = context;
|
|
7287
7351
|
if (namespace === true) {
|
|
7288
7352
|
namespace = "svg";
|
|
@@ -7387,7 +7451,7 @@ function provide(key, value) {
|
|
|
7387
7451
|
function inject(key, defaultValue, treatDefaultAsFactory = false) {
|
|
7388
7452
|
const instance = currentInstance || currentRenderingInstance;
|
|
7389
7453
|
if (instance || currentApp) {
|
|
7390
|
-
const provides = instance ? instance.parent == null ? instance.vnode.appContext && instance.vnode.appContext.provides : instance.parent.provides :
|
|
7454
|
+
const provides = currentApp ? currentApp._context.provides : instance ? instance.parent == null ? instance.vnode.appContext && instance.vnode.appContext.provides : instance.parent.provides : void 0;
|
|
7391
7455
|
if (provides && key in provides) {
|
|
7392
7456
|
return provides[key];
|
|
7393
7457
|
} else if (arguments.length > 1) {
|
|
@@ -7661,6 +7725,9 @@ function resolvePropValue(options, props, key, value, instance, isAbsent) {
|
|
|
7661
7725
|
} else {
|
|
7662
7726
|
value = defaultValue;
|
|
7663
7727
|
}
|
|
7728
|
+
if (instance.ce) {
|
|
7729
|
+
instance.ce._setProp(key, value);
|
|
7730
|
+
}
|
|
7664
7731
|
}
|
|
7665
7732
|
if (opt[0 /* shouldCast */]) {
|
|
7666
7733
|
if (isAbsent && !hasDefault) {
|
|
@@ -8701,8 +8768,8 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
8701
8768
|
const componentUpdateFn = () => {
|
|
8702
8769
|
if (!instance.isMounted) {
|
|
8703
8770
|
let vnodeHook;
|
|
8704
|
-
const { el, props
|
|
8705
|
-
const { bm, m, parent } = instance;
|
|
8771
|
+
const { el, props } = initialVNode;
|
|
8772
|
+
const { bm, m, parent, root, type } = instance;
|
|
8706
8773
|
const isAsyncWrapperVNode = isAsyncWrapper(initialVNode);
|
|
8707
8774
|
toggleRecurse(instance, false);
|
|
8708
8775
|
if (bm) {
|
|
@@ -8748,6 +8815,9 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
8748
8815
|
hydrateSubTree();
|
|
8749
8816
|
}
|
|
8750
8817
|
} else {
|
|
8818
|
+
if (root.ce) {
|
|
8819
|
+
root.ce._injectChildStyle(type);
|
|
8820
|
+
}
|
|
8751
8821
|
if (!!(process.env.NODE_ENV !== "production")) {
|
|
8752
8822
|
startMeasure(instance, `render`);
|
|
8753
8823
|
}
|
|
@@ -9451,13 +9521,13 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
9451
9521
|
namespace
|
|
9452
9522
|
);
|
|
9453
9523
|
}
|
|
9524
|
+
container._vnode = vnode;
|
|
9454
9525
|
if (!isFlushing) {
|
|
9455
9526
|
isFlushing = true;
|
|
9456
9527
|
flushPreFlushCbs();
|
|
9457
9528
|
flushPostFlushCbs();
|
|
9458
9529
|
isFlushing = false;
|
|
9459
9530
|
}
|
|
9460
|
-
container._vnode = vnode;
|
|
9461
9531
|
};
|
|
9462
9532
|
const internals = {
|
|
9463
9533
|
p: patch,
|
|
@@ -9631,14 +9701,9 @@ function doWatch(source, cb, {
|
|
|
9631
9701
|
const _cb = cb;
|
|
9632
9702
|
cb = (...args) => {
|
|
9633
9703
|
_cb(...args);
|
|
9634
|
-
|
|
9704
|
+
watchHandle();
|
|
9635
9705
|
};
|
|
9636
9706
|
}
|
|
9637
|
-
if (!!(process.env.NODE_ENV !== "production") && deep !== void 0 && typeof deep === "number") {
|
|
9638
|
-
warn$1(
|
|
9639
|
-
`watch() "deep" option with number value will be used as watch depth in future versions. Please use a boolean instead to avoid potential breakage.`
|
|
9640
|
-
);
|
|
9641
|
-
}
|
|
9642
9707
|
if (!!(process.env.NODE_ENV !== "production") && !cb) {
|
|
9643
9708
|
if (immediate !== void 0) {
|
|
9644
9709
|
warn$1(
|
|
@@ -9664,10 +9729,12 @@ function doWatch(source, cb, {
|
|
|
9664
9729
|
);
|
|
9665
9730
|
};
|
|
9666
9731
|
const instance = currentInstance;
|
|
9667
|
-
const reactiveGetter = (source2) =>
|
|
9668
|
-
|
|
9669
|
-
|
|
9670
|
-
|
|
9732
|
+
const reactiveGetter = (source2) => {
|
|
9733
|
+
if (deep) return source2;
|
|
9734
|
+
if (isShallow(source2) || deep === false || deep === 0)
|
|
9735
|
+
return traverse(source2, 1);
|
|
9736
|
+
return traverse(source2);
|
|
9737
|
+
};
|
|
9671
9738
|
let getter;
|
|
9672
9739
|
let forceTrigger = false;
|
|
9673
9740
|
let isMultiSource = false;
|
|
@@ -9723,7 +9790,8 @@ function doWatch(source, cb, {
|
|
|
9723
9790
|
}
|
|
9724
9791
|
if (cb && deep) {
|
|
9725
9792
|
const baseGetter = getter;
|
|
9726
|
-
|
|
9793
|
+
const depth = deep === true ? Infinity : deep;
|
|
9794
|
+
getter = () => traverse(baseGetter(), depth);
|
|
9727
9795
|
}
|
|
9728
9796
|
let cleanup;
|
|
9729
9797
|
let onCleanup = (fn) => {
|
|
@@ -9748,7 +9816,12 @@ function doWatch(source, cb, {
|
|
|
9748
9816
|
const ctx = useSSRContext();
|
|
9749
9817
|
ssrCleanup = ctx.__watcherHandles || (ctx.__watcherHandles = []);
|
|
9750
9818
|
} else {
|
|
9751
|
-
|
|
9819
|
+
const watchHandle2 = () => {
|
|
9820
|
+
};
|
|
9821
|
+
watchHandle2.stop = NOOP;
|
|
9822
|
+
watchHandle2.resume = NOOP;
|
|
9823
|
+
watchHandle2.pause = NOOP;
|
|
9824
|
+
return watchHandle2;
|
|
9752
9825
|
}
|
|
9753
9826
|
}
|
|
9754
9827
|
let oldValue = isMultiSource ? new Array(source.length).fill(INITIAL_WATCHER_VALUE) : INITIAL_WATCHER_VALUE;
|
|
@@ -9778,7 +9851,6 @@ function doWatch(source, cb, {
|
|
|
9778
9851
|
const effect = new ReactiveEffect(getter);
|
|
9779
9852
|
let scheduler;
|
|
9780
9853
|
if (flush === "sync") {
|
|
9781
|
-
effect.flags |= 64;
|
|
9782
9854
|
scheduler = job;
|
|
9783
9855
|
} else if (flush === "post") {
|
|
9784
9856
|
scheduler = () => queuePostRenderEffect(job, instance && instance.suspense);
|
|
@@ -9789,12 +9861,15 @@ function doWatch(source, cb, {
|
|
|
9789
9861
|
}
|
|
9790
9862
|
effect.scheduler = scheduler;
|
|
9791
9863
|
const scope = getCurrentScope();
|
|
9792
|
-
const
|
|
9864
|
+
const watchHandle = () => {
|
|
9793
9865
|
effect.stop();
|
|
9794
9866
|
if (scope) {
|
|
9795
9867
|
remove(scope.effects, effect);
|
|
9796
9868
|
}
|
|
9797
9869
|
};
|
|
9870
|
+
watchHandle.pause = effect.pause.bind(effect);
|
|
9871
|
+
watchHandle.resume = effect.resume.bind(effect);
|
|
9872
|
+
watchHandle.stop = watchHandle;
|
|
9798
9873
|
if (!!(process.env.NODE_ENV !== "production")) {
|
|
9799
9874
|
effect.onTrack = onTrack;
|
|
9800
9875
|
effect.onTrigger = onTrigger;
|
|
@@ -9813,8 +9888,8 @@ function doWatch(source, cb, {
|
|
|
9813
9888
|
} else {
|
|
9814
9889
|
effect.run();
|
|
9815
9890
|
}
|
|
9816
|
-
if (ssrCleanup) ssrCleanup.push(
|
|
9817
|
-
return
|
|
9891
|
+
if (ssrCleanup) ssrCleanup.push(watchHandle);
|
|
9892
|
+
return watchHandle;
|
|
9818
9893
|
}
|
|
9819
9894
|
function instanceWatch(source, value, options) {
|
|
9820
9895
|
const publicThis = this.proxy;
|
|
@@ -9904,7 +9979,8 @@ function useModel(props, name, options = EMPTY_OBJ) {
|
|
|
9904
9979
|
return options.get ? options.get(localValue) : localValue;
|
|
9905
9980
|
},
|
|
9906
9981
|
set(value) {
|
|
9907
|
-
|
|
9982
|
+
const emittedValue = options.set ? options.set(value) : value;
|
|
9983
|
+
if (!hasChanged(emittedValue, localValue) && !(prevSetValue !== EMPTY_OBJ && hasChanged(value, prevSetValue))) {
|
|
9908
9984
|
return;
|
|
9909
9985
|
}
|
|
9910
9986
|
const rawProps = i.vnode.props;
|
|
@@ -9913,7 +9989,6 @@ function useModel(props, name, options = EMPTY_OBJ) {
|
|
|
9913
9989
|
localValue = value;
|
|
9914
9990
|
trigger();
|
|
9915
9991
|
}
|
|
9916
|
-
const emittedValue = options.set ? options.set(value) : value;
|
|
9917
9992
|
i.emit(`update:${name}`, emittedValue);
|
|
9918
9993
|
if (hasChanged(value, emittedValue) && hasChanged(value, prevSetValue) && !hasChanged(emittedValue, prevEmittedValue)) {
|
|
9919
9994
|
trigger();
|
|
@@ -9951,9 +10026,9 @@ function emit(instance, event, ...rawArgs) {
|
|
|
9951
10026
|
} = instance;
|
|
9952
10027
|
if (emitsOptions) {
|
|
9953
10028
|
if (!(event in emitsOptions) && !(event.startsWith("hook:") || event.startsWith(compatModelEventPrefix))) {
|
|
9954
|
-
if (!propsOptions || !(toHandlerKey(event) in propsOptions)) {
|
|
10029
|
+
if (!propsOptions || !(toHandlerKey(camelize(event)) in propsOptions)) {
|
|
9955
10030
|
warn$1(
|
|
9956
|
-
`Component emitted event "${event}" but it is neither declared in the emits option nor as an "${toHandlerKey(event)}" prop.`
|
|
10031
|
+
`Component emitted event "${event}" but it is neither declared in the emits option nor as an "${toHandlerKey(camelize(event))}" prop.`
|
|
9957
10032
|
);
|
|
9958
10033
|
}
|
|
9959
10034
|
} else {
|
|
@@ -11898,11 +11973,16 @@ function useTemplateRef(key) {
|
|
|
11898
11973
|
const r = shallowRef(null);
|
|
11899
11974
|
if (i) {
|
|
11900
11975
|
const refs = i.refs === EMPTY_OBJ ? i.refs = {} : i.refs;
|
|
11901
|
-
|
|
11902
|
-
|
|
11903
|
-
|
|
11904
|
-
|
|
11905
|
-
|
|
11976
|
+
let desc;
|
|
11977
|
+
if (!!(process.env.NODE_ENV !== "production") && (desc = Object.getOwnPropertyDescriptor(refs, key)) && !desc.configurable) {
|
|
11978
|
+
warn$1(`useTemplateRef('${key}') already exists.`);
|
|
11979
|
+
} else {
|
|
11980
|
+
Object.defineProperty(refs, key, {
|
|
11981
|
+
enumerable: true,
|
|
11982
|
+
get: () => r.value,
|
|
11983
|
+
set: (val) => r.value = val
|
|
11984
|
+
});
|
|
11985
|
+
}
|
|
11906
11986
|
} else if (!!(process.env.NODE_ENV !== "production")) {
|
|
11907
11987
|
warn$1(
|
|
11908
11988
|
`useTemplateRef() is called when there is no active component instance to be associated with.`
|
|
@@ -12136,7 +12216,7 @@ function isMemoSame(cached, memo) {
|
|
|
12136
12216
|
return true;
|
|
12137
12217
|
}
|
|
12138
12218
|
|
|
12139
|
-
const version = "3.5.0-
|
|
12219
|
+
const version = "3.5.0-beta.2";
|
|
12140
12220
|
const warn = !!(process.env.NODE_ENV !== "production") ? warn$1 : NOOP;
|
|
12141
12221
|
const ErrorTypeStrings = ErrorTypeStrings$1 ;
|
|
12142
12222
|
const devtools = !!(process.env.NODE_ENV !== "production") || true ? devtools$1 : void 0;
|
|
@@ -12148,7 +12228,8 @@ const _ssrUtils = {
|
|
|
12148
12228
|
setCurrentRenderingInstance,
|
|
12149
12229
|
isVNode: isVNode,
|
|
12150
12230
|
normalizeVNode,
|
|
12151
|
-
getComponentPublicInstance
|
|
12231
|
+
getComponentPublicInstance,
|
|
12232
|
+
ensureValidVNode
|
|
12152
12233
|
};
|
|
12153
12234
|
const ssrUtils = _ssrUtils ;
|
|
12154
12235
|
const resolveFilter = resolveFilter$1 ;
|
|
@@ -12162,6 +12243,18 @@ const _compatUtils = {
|
|
|
12162
12243
|
const compatUtils = _compatUtils ;
|
|
12163
12244
|
const DeprecationTypes = DeprecationTypes$1 ;
|
|
12164
12245
|
|
|
12246
|
+
let policy = void 0;
|
|
12247
|
+
const tt = typeof window !== "undefined" && window.trustedTypes;
|
|
12248
|
+
if (tt) {
|
|
12249
|
+
try {
|
|
12250
|
+
policy = /* @__PURE__ */ tt.createPolicy("vue", {
|
|
12251
|
+
createHTML: (val) => val
|
|
12252
|
+
});
|
|
12253
|
+
} catch (e) {
|
|
12254
|
+
!!(process.env.NODE_ENV !== "production") && warn(`Error creating trusted types policy: ${e}`);
|
|
12255
|
+
}
|
|
12256
|
+
}
|
|
12257
|
+
const unsafeToTrustedHTML = policy ? (val) => policy.createHTML(val) : (val) => val;
|
|
12165
12258
|
const svgNS = "http://www.w3.org/2000/svg";
|
|
12166
12259
|
const mathmlNS = "http://www.w3.org/1998/Math/MathML";
|
|
12167
12260
|
const doc = typeof document !== "undefined" ? document : null;
|
|
@@ -12209,7 +12302,9 @@ const nodeOps = {
|
|
|
12209
12302
|
if (start === end || !(start = start.nextSibling)) break;
|
|
12210
12303
|
}
|
|
12211
12304
|
} else {
|
|
12212
|
-
templateContainer.innerHTML =
|
|
12305
|
+
templateContainer.innerHTML = unsafeToTrustedHTML(
|
|
12306
|
+
namespace === "svg" ? `<svg>${content}</svg>` : namespace === "mathml" ? `<math>${content}</math>` : content
|
|
12307
|
+
);
|
|
12213
12308
|
const template = templateContainer.content;
|
|
12214
12309
|
if (namespace === "svg" || namespace === "mathml") {
|
|
12215
12310
|
const wrapper = template.firstChild;
|
|
@@ -12616,11 +12711,17 @@ function useCssVars(getter) {
|
|
|
12616
12711
|
}
|
|
12617
12712
|
const setVars = () => {
|
|
12618
12713
|
const vars = getter(instance.proxy);
|
|
12619
|
-
|
|
12714
|
+
if (instance.ce) {
|
|
12715
|
+
setVarsOnNode(instance.ce, vars);
|
|
12716
|
+
} else {
|
|
12717
|
+
setVarsOnVNode(instance.subTree, vars);
|
|
12718
|
+
}
|
|
12620
12719
|
updateTeleports(vars);
|
|
12621
12720
|
};
|
|
12622
|
-
|
|
12721
|
+
onBeforeMount(() => {
|
|
12623
12722
|
watchPostEffect(setVars);
|
|
12723
|
+
});
|
|
12724
|
+
onMounted(() => {
|
|
12624
12725
|
const ob = new MutationObserver(setVars);
|
|
12625
12726
|
ob.observe(instance.subTree.el.parentNode, { childList: true });
|
|
12626
12727
|
onUnmounted(() => ob.disconnect());
|
|
@@ -13017,16 +13118,24 @@ function shouldSetAsProp(el, key, value, isSVG) {
|
|
|
13017
13118
|
if (isNativeOn(key) && isString(value)) {
|
|
13018
13119
|
return false;
|
|
13019
13120
|
}
|
|
13020
|
-
|
|
13121
|
+
if (key in el) {
|
|
13122
|
+
return true;
|
|
13123
|
+
}
|
|
13124
|
+
if (el._isVueCE && (/[A-Z]/.test(key) || !isString(value))) {
|
|
13125
|
+
return true;
|
|
13126
|
+
}
|
|
13127
|
+
return false;
|
|
13021
13128
|
}
|
|
13022
13129
|
|
|
13130
|
+
const REMOVAL = {};
|
|
13023
13131
|
/*! #__NO_SIDE_EFFECTS__ */
|
|
13024
13132
|
// @__NO_SIDE_EFFECTS__
|
|
13025
|
-
function defineCustomElement(options, extraOptions,
|
|
13133
|
+
function defineCustomElement(options, extraOptions, _createApp) {
|
|
13026
13134
|
const Comp = defineComponent(options, extraOptions);
|
|
13135
|
+
if (isPlainObject(Comp)) extend(Comp, extraOptions);
|
|
13027
13136
|
class VueCustomElement extends VueElement {
|
|
13028
13137
|
constructor(initialProps) {
|
|
13029
|
-
super(Comp, initialProps,
|
|
13138
|
+
super(Comp, initialProps, _createApp);
|
|
13030
13139
|
}
|
|
13031
13140
|
}
|
|
13032
13141
|
VueCustomElement.def = Comp;
|
|
@@ -13034,47 +13143,87 @@ function defineCustomElement(options, extraOptions, hydrate2) {
|
|
|
13034
13143
|
}
|
|
13035
13144
|
/*! #__NO_SIDE_EFFECTS__ */
|
|
13036
13145
|
const defineSSRCustomElement = /* @__NO_SIDE_EFFECTS__ */ (options, extraOptions) => {
|
|
13037
|
-
return /* @__PURE__ */ defineCustomElement(options, extraOptions,
|
|
13146
|
+
return /* @__PURE__ */ defineCustomElement(options, extraOptions, createSSRApp);
|
|
13038
13147
|
};
|
|
13039
13148
|
const BaseClass = typeof HTMLElement !== "undefined" ? HTMLElement : class {
|
|
13040
13149
|
};
|
|
13041
13150
|
class VueElement extends BaseClass {
|
|
13042
|
-
constructor(_def, _props = {},
|
|
13151
|
+
constructor(_def, _props = {}, _createApp = createApp) {
|
|
13043
13152
|
super();
|
|
13044
13153
|
this._def = _def;
|
|
13045
13154
|
this._props = _props;
|
|
13155
|
+
this._createApp = _createApp;
|
|
13156
|
+
this._isVueCE = true;
|
|
13046
13157
|
/**
|
|
13047
13158
|
* @internal
|
|
13048
13159
|
*/
|
|
13049
13160
|
this._instance = null;
|
|
13161
|
+
/**
|
|
13162
|
+
* @internal
|
|
13163
|
+
*/
|
|
13164
|
+
this._app = null;
|
|
13165
|
+
/**
|
|
13166
|
+
* @internal
|
|
13167
|
+
*/
|
|
13168
|
+
this._nonce = this._def.nonce;
|
|
13050
13169
|
this._connected = false;
|
|
13051
13170
|
this._resolved = false;
|
|
13052
13171
|
this._numberProps = null;
|
|
13172
|
+
this._styleChildren = /* @__PURE__ */ new WeakSet();
|
|
13053
13173
|
this._ob = null;
|
|
13054
|
-
if (this.shadowRoot &&
|
|
13055
|
-
|
|
13174
|
+
if (this.shadowRoot && _createApp !== createApp) {
|
|
13175
|
+
this._root = this.shadowRoot;
|
|
13056
13176
|
} else {
|
|
13057
13177
|
if (!!(process.env.NODE_ENV !== "production") && this.shadowRoot) {
|
|
13058
13178
|
warn(
|
|
13059
13179
|
`Custom element has pre-rendered declarative shadow root but is not defined as hydratable. Use \`defineSSRCustomElement\`.`
|
|
13060
13180
|
);
|
|
13061
13181
|
}
|
|
13062
|
-
|
|
13063
|
-
|
|
13064
|
-
this.
|
|
13182
|
+
if (_def.shadowRoot !== false) {
|
|
13183
|
+
this.attachShadow({ mode: "open" });
|
|
13184
|
+
this._root = this.shadowRoot;
|
|
13185
|
+
} else {
|
|
13186
|
+
this._root = this;
|
|
13065
13187
|
}
|
|
13066
13188
|
}
|
|
13189
|
+
if (!this._def.__asyncLoader) {
|
|
13190
|
+
this._resolveProps(this._def);
|
|
13191
|
+
}
|
|
13067
13192
|
}
|
|
13068
13193
|
connectedCallback() {
|
|
13194
|
+
if (!this.shadowRoot) {
|
|
13195
|
+
this._parseSlots();
|
|
13196
|
+
}
|
|
13069
13197
|
this._connected = true;
|
|
13198
|
+
let parent = this;
|
|
13199
|
+
while (parent = parent && (parent.parentNode || parent.host)) {
|
|
13200
|
+
if (parent instanceof VueElement) {
|
|
13201
|
+
this._parent = parent;
|
|
13202
|
+
break;
|
|
13203
|
+
}
|
|
13204
|
+
}
|
|
13070
13205
|
if (!this._instance) {
|
|
13071
13206
|
if (this._resolved) {
|
|
13207
|
+
this._setParent();
|
|
13072
13208
|
this._update();
|
|
13073
13209
|
} else {
|
|
13074
|
-
|
|
13210
|
+
if (parent && parent._pendingResolve) {
|
|
13211
|
+
this._pendingResolve = parent._pendingResolve.then(() => {
|
|
13212
|
+
this._pendingResolve = void 0;
|
|
13213
|
+
this._resolveDef();
|
|
13214
|
+
});
|
|
13215
|
+
} else {
|
|
13216
|
+
this._resolveDef();
|
|
13217
|
+
}
|
|
13075
13218
|
}
|
|
13076
13219
|
}
|
|
13077
13220
|
}
|
|
13221
|
+
_setParent(parent = this._parent) {
|
|
13222
|
+
if (parent) {
|
|
13223
|
+
this._instance.parent = parent._instance;
|
|
13224
|
+
this._instance.provides = parent._instance.provides;
|
|
13225
|
+
}
|
|
13226
|
+
}
|
|
13078
13227
|
disconnectedCallback() {
|
|
13079
13228
|
this._connected = false;
|
|
13080
13229
|
nextTick(() => {
|
|
@@ -13083,8 +13232,9 @@ class VueElement extends BaseClass {
|
|
|
13083
13232
|
this._ob.disconnect();
|
|
13084
13233
|
this._ob = null;
|
|
13085
13234
|
}
|
|
13086
|
-
|
|
13087
|
-
this._instance =
|
|
13235
|
+
this._app && this._app.unmount();
|
|
13236
|
+
this._instance.ce = void 0;
|
|
13237
|
+
this._app = this._instance = null;
|
|
13088
13238
|
}
|
|
13089
13239
|
});
|
|
13090
13240
|
}
|
|
@@ -13092,7 +13242,9 @@ class VueElement extends BaseClass {
|
|
|
13092
13242
|
* resolve inner component definition (handle possible async component)
|
|
13093
13243
|
*/
|
|
13094
13244
|
_resolveDef() {
|
|
13095
|
-
this.
|
|
13245
|
+
if (this._pendingResolve) {
|
|
13246
|
+
return;
|
|
13247
|
+
}
|
|
13096
13248
|
for (let i = 0; i < this.attributes.length; i++) {
|
|
13097
13249
|
this._setAttr(this.attributes[i].name);
|
|
13098
13250
|
}
|
|
@@ -13103,6 +13255,8 @@ class VueElement extends BaseClass {
|
|
|
13103
13255
|
});
|
|
13104
13256
|
this._ob.observe(this, { attributes: true });
|
|
13105
13257
|
const resolve = (def, isAsync = false) => {
|
|
13258
|
+
this._resolved = true;
|
|
13259
|
+
this._pendingResolve = void 0;
|
|
13106
13260
|
const { props, styles } = def;
|
|
13107
13261
|
let numberProps;
|
|
13108
13262
|
if (props && !isArray(props)) {
|
|
@@ -13120,22 +13274,53 @@ class VueElement extends BaseClass {
|
|
|
13120
13274
|
if (isAsync) {
|
|
13121
13275
|
this._resolveProps(def);
|
|
13122
13276
|
}
|
|
13123
|
-
this.
|
|
13124
|
-
|
|
13277
|
+
if (this.shadowRoot) {
|
|
13278
|
+
this._applyStyles(styles);
|
|
13279
|
+
} else if (!!(process.env.NODE_ENV !== "production") && styles) {
|
|
13280
|
+
warn(
|
|
13281
|
+
"Custom element style injection is not supported when using shadowRoot: false"
|
|
13282
|
+
);
|
|
13283
|
+
}
|
|
13284
|
+
this._mount(def);
|
|
13125
13285
|
};
|
|
13126
13286
|
const asyncDef = this._def.__asyncLoader;
|
|
13127
13287
|
if (asyncDef) {
|
|
13128
|
-
asyncDef().then(
|
|
13288
|
+
this._pendingResolve = asyncDef().then(
|
|
13289
|
+
(def) => resolve(this._def = def, true)
|
|
13290
|
+
);
|
|
13129
13291
|
} else {
|
|
13130
13292
|
resolve(this._def);
|
|
13131
13293
|
}
|
|
13132
13294
|
}
|
|
13295
|
+
_mount(def) {
|
|
13296
|
+
if ((!!(process.env.NODE_ENV !== "production") || __VUE_PROD_DEVTOOLS__) && !def.name) {
|
|
13297
|
+
def.name = "VueElement";
|
|
13298
|
+
}
|
|
13299
|
+
this._app = this._createApp(def);
|
|
13300
|
+
if (def.configureApp) {
|
|
13301
|
+
def.configureApp(this._app);
|
|
13302
|
+
}
|
|
13303
|
+
this._app._ceVNode = this._createVNode();
|
|
13304
|
+
this._app.mount(this._root);
|
|
13305
|
+
const exposed = this._instance && this._instance.exposed;
|
|
13306
|
+
if (!exposed) return;
|
|
13307
|
+
for (const key in exposed) {
|
|
13308
|
+
if (!hasOwn(this, key)) {
|
|
13309
|
+
Object.defineProperty(this, key, {
|
|
13310
|
+
// unwrap ref to be consistent with public instance behavior
|
|
13311
|
+
get: () => unref(exposed[key])
|
|
13312
|
+
});
|
|
13313
|
+
} else if (!!(process.env.NODE_ENV !== "production")) {
|
|
13314
|
+
warn(`Exposed property "${key}" already exists on custom element.`);
|
|
13315
|
+
}
|
|
13316
|
+
}
|
|
13317
|
+
}
|
|
13133
13318
|
_resolveProps(def) {
|
|
13134
13319
|
const { props } = def;
|
|
13135
13320
|
const declaredPropKeys = isArray(props) ? props : Object.keys(props || {});
|
|
13136
13321
|
for (const key of Object.keys(this)) {
|
|
13137
13322
|
if (key[0] !== "_" && declaredPropKeys.includes(key)) {
|
|
13138
|
-
this._setProp(key, this[key]
|
|
13323
|
+
this._setProp(key, this[key]);
|
|
13139
13324
|
}
|
|
13140
13325
|
}
|
|
13141
13326
|
for (const key of declaredPropKeys.map(camelize)) {
|
|
@@ -13144,18 +13329,20 @@ class VueElement extends BaseClass {
|
|
|
13144
13329
|
return this._getProp(key);
|
|
13145
13330
|
},
|
|
13146
13331
|
set(val) {
|
|
13147
|
-
this._setProp(key, val);
|
|
13332
|
+
this._setProp(key, val, true, true);
|
|
13148
13333
|
}
|
|
13149
13334
|
});
|
|
13150
13335
|
}
|
|
13151
13336
|
}
|
|
13152
13337
|
_setAttr(key) {
|
|
13153
|
-
|
|
13338
|
+
if (key.startsWith("data-v-")) return;
|
|
13339
|
+
const has = this.hasAttribute(key);
|
|
13340
|
+
let value = has ? this.getAttribute(key) : REMOVAL;
|
|
13154
13341
|
const camelKey = camelize(key);
|
|
13155
|
-
if (this._numberProps && this._numberProps[camelKey]) {
|
|
13342
|
+
if (has && this._numberProps && this._numberProps[camelKey]) {
|
|
13156
13343
|
value = toNumber(value);
|
|
13157
13344
|
}
|
|
13158
|
-
this._setProp(camelKey, value, false);
|
|
13345
|
+
this._setProp(camelKey, value, false, true);
|
|
13159
13346
|
}
|
|
13160
13347
|
/**
|
|
13161
13348
|
* @internal
|
|
@@ -13166,9 +13353,13 @@ class VueElement extends BaseClass {
|
|
|
13166
13353
|
/**
|
|
13167
13354
|
* @internal
|
|
13168
13355
|
*/
|
|
13169
|
-
_setProp(key, val, shouldReflect = true, shouldUpdate =
|
|
13356
|
+
_setProp(key, val, shouldReflect = true, shouldUpdate = false) {
|
|
13170
13357
|
if (val !== this._props[key]) {
|
|
13171
|
-
|
|
13358
|
+
if (val === REMOVAL) {
|
|
13359
|
+
delete this._props[key];
|
|
13360
|
+
} else {
|
|
13361
|
+
this._props[key] = val;
|
|
13362
|
+
}
|
|
13172
13363
|
if (shouldUpdate && this._instance) {
|
|
13173
13364
|
this._update();
|
|
13174
13365
|
}
|
|
@@ -13184,18 +13375,23 @@ class VueElement extends BaseClass {
|
|
|
13184
13375
|
}
|
|
13185
13376
|
}
|
|
13186
13377
|
_update() {
|
|
13187
|
-
render(this._createVNode(), this.
|
|
13378
|
+
render(this._createVNode(), this._root);
|
|
13188
13379
|
}
|
|
13189
13380
|
_createVNode() {
|
|
13190
|
-
const
|
|
13381
|
+
const baseProps = {};
|
|
13382
|
+
if (!this.shadowRoot) {
|
|
13383
|
+
baseProps.onVnodeMounted = baseProps.onVnodeUpdated = this._renderSlots.bind(this);
|
|
13384
|
+
}
|
|
13385
|
+
const vnode = createVNode(this._def, extend(baseProps, this._props));
|
|
13191
13386
|
if (!this._instance) {
|
|
13192
13387
|
vnode.ce = (instance) => {
|
|
13193
13388
|
this._instance = instance;
|
|
13389
|
+
instance.ce = this;
|
|
13194
13390
|
instance.isCE = true;
|
|
13195
13391
|
if (!!(process.env.NODE_ENV !== "production")) {
|
|
13196
13392
|
instance.ceReload = (newStyles) => {
|
|
13197
13393
|
if (this._styles) {
|
|
13198
|
-
this._styles.forEach((s) => this.
|
|
13394
|
+
this._styles.forEach((s) => this._root.removeChild(s));
|
|
13199
13395
|
this._styles.length = 0;
|
|
13200
13396
|
}
|
|
13201
13397
|
this._applyStyles(newStyles);
|
|
@@ -13205,9 +13401,10 @@ class VueElement extends BaseClass {
|
|
|
13205
13401
|
}
|
|
13206
13402
|
const dispatch = (event, args) => {
|
|
13207
13403
|
this.dispatchEvent(
|
|
13208
|
-
new CustomEvent(
|
|
13209
|
-
|
|
13210
|
-
|
|
13404
|
+
new CustomEvent(
|
|
13405
|
+
event,
|
|
13406
|
+
isPlainObject(args[0]) ? extend({ detail: args }, args[0]) : { detail: args }
|
|
13407
|
+
)
|
|
13211
13408
|
);
|
|
13212
13409
|
};
|
|
13213
13410
|
instance.emit = (event, ...args) => {
|
|
@@ -13216,30 +13413,126 @@ class VueElement extends BaseClass {
|
|
|
13216
13413
|
dispatch(hyphenate(event), args);
|
|
13217
13414
|
}
|
|
13218
13415
|
};
|
|
13219
|
-
|
|
13220
|
-
while (parent = parent && (parent.parentNode || parent.host)) {
|
|
13221
|
-
if (parent instanceof VueElement) {
|
|
13222
|
-
instance.parent = parent._instance;
|
|
13223
|
-
instance.provides = parent._instance.provides;
|
|
13224
|
-
break;
|
|
13225
|
-
}
|
|
13226
|
-
}
|
|
13416
|
+
this._setParent();
|
|
13227
13417
|
};
|
|
13228
13418
|
}
|
|
13229
13419
|
return vnode;
|
|
13230
13420
|
}
|
|
13231
|
-
_applyStyles(styles) {
|
|
13232
|
-
if (styles)
|
|
13233
|
-
|
|
13234
|
-
|
|
13235
|
-
|
|
13236
|
-
|
|
13237
|
-
|
|
13421
|
+
_applyStyles(styles, owner) {
|
|
13422
|
+
if (!styles) return;
|
|
13423
|
+
if (owner) {
|
|
13424
|
+
if (owner === this._def || this._styleChildren.has(owner)) {
|
|
13425
|
+
return;
|
|
13426
|
+
}
|
|
13427
|
+
this._styleChildren.add(owner);
|
|
13428
|
+
}
|
|
13429
|
+
const nonce = this._nonce;
|
|
13430
|
+
for (let i = styles.length - 1; i >= 0; i--) {
|
|
13431
|
+
const s = document.createElement("style");
|
|
13432
|
+
if (nonce) s.setAttribute("nonce", nonce);
|
|
13433
|
+
s.textContent = styles[i];
|
|
13434
|
+
this.shadowRoot.prepend(s);
|
|
13435
|
+
if (!!(process.env.NODE_ENV !== "production")) {
|
|
13436
|
+
if (owner) {
|
|
13437
|
+
if (owner.__hmrId) {
|
|
13438
|
+
if (!this._childStyles) this._childStyles = /* @__PURE__ */ new Map();
|
|
13439
|
+
let entry = this._childStyles.get(owner.__hmrId);
|
|
13440
|
+
if (!entry) {
|
|
13441
|
+
this._childStyles.set(owner.__hmrId, entry = []);
|
|
13442
|
+
}
|
|
13443
|
+
entry.push(s);
|
|
13444
|
+
}
|
|
13445
|
+
} else {
|
|
13238
13446
|
(this._styles || (this._styles = [])).push(s);
|
|
13239
13447
|
}
|
|
13240
|
-
}
|
|
13448
|
+
}
|
|
13449
|
+
}
|
|
13450
|
+
}
|
|
13451
|
+
/**
|
|
13452
|
+
* Only called when shaddowRoot is false
|
|
13453
|
+
*/
|
|
13454
|
+
_parseSlots() {
|
|
13455
|
+
const slots = this._slots = {};
|
|
13456
|
+
let n;
|
|
13457
|
+
while (n = this.firstChild) {
|
|
13458
|
+
const slotName = n.nodeType === 1 && n.getAttribute("slot") || "default";
|
|
13459
|
+
(slots[slotName] || (slots[slotName] = [])).push(n);
|
|
13460
|
+
this.removeChild(n);
|
|
13461
|
+
}
|
|
13462
|
+
}
|
|
13463
|
+
/**
|
|
13464
|
+
* Only called when shaddowRoot is false
|
|
13465
|
+
*/
|
|
13466
|
+
_renderSlots() {
|
|
13467
|
+
const outlets = this.querySelectorAll("slot");
|
|
13468
|
+
const scopeId = this._instance.type.__scopeId;
|
|
13469
|
+
for (let i = 0; i < outlets.length; i++) {
|
|
13470
|
+
const o = outlets[i];
|
|
13471
|
+
const slotName = o.getAttribute("name") || "default";
|
|
13472
|
+
const content = this._slots[slotName];
|
|
13473
|
+
const parent = o.parentNode;
|
|
13474
|
+
if (content) {
|
|
13475
|
+
for (const n of content) {
|
|
13476
|
+
if (scopeId && n.nodeType === 1) {
|
|
13477
|
+
const id = scopeId + "-s";
|
|
13478
|
+
const walker = document.createTreeWalker(n, 1);
|
|
13479
|
+
n.setAttribute(id, "");
|
|
13480
|
+
let child;
|
|
13481
|
+
while (child = walker.nextNode()) {
|
|
13482
|
+
child.setAttribute(id, "");
|
|
13483
|
+
}
|
|
13484
|
+
}
|
|
13485
|
+
parent.insertBefore(n, o);
|
|
13486
|
+
}
|
|
13487
|
+
} else {
|
|
13488
|
+
while (o.firstChild) parent.insertBefore(o.firstChild, o);
|
|
13489
|
+
}
|
|
13490
|
+
parent.removeChild(o);
|
|
13491
|
+
}
|
|
13492
|
+
}
|
|
13493
|
+
/**
|
|
13494
|
+
* @internal
|
|
13495
|
+
*/
|
|
13496
|
+
_injectChildStyle(comp) {
|
|
13497
|
+
this._applyStyles(comp.styles, comp);
|
|
13498
|
+
}
|
|
13499
|
+
/**
|
|
13500
|
+
* @internal
|
|
13501
|
+
*/
|
|
13502
|
+
_removeChildStyle(comp) {
|
|
13503
|
+
if (!!(process.env.NODE_ENV !== "production")) {
|
|
13504
|
+
this._styleChildren.delete(comp);
|
|
13505
|
+
if (this._childStyles && comp.__hmrId) {
|
|
13506
|
+
const oldStyles = this._childStyles.get(comp.__hmrId);
|
|
13507
|
+
if (oldStyles) {
|
|
13508
|
+
oldStyles.forEach((s) => this._root.removeChild(s));
|
|
13509
|
+
oldStyles.length = 0;
|
|
13510
|
+
}
|
|
13511
|
+
}
|
|
13512
|
+
}
|
|
13513
|
+
}
|
|
13514
|
+
}
|
|
13515
|
+
function useHost(caller) {
|
|
13516
|
+
const instance = getCurrentInstance();
|
|
13517
|
+
const el = instance && instance.ce;
|
|
13518
|
+
if (el) {
|
|
13519
|
+
return el;
|
|
13520
|
+
} else if (!!(process.env.NODE_ENV !== "production")) {
|
|
13521
|
+
if (!instance) {
|
|
13522
|
+
warn(
|
|
13523
|
+
`${caller || "useHost"} called without an active component instance.`
|
|
13524
|
+
);
|
|
13525
|
+
} else {
|
|
13526
|
+
warn(
|
|
13527
|
+
`${caller || "useHost"} can only be used in components defined via defineCustomElement.`
|
|
13528
|
+
);
|
|
13241
13529
|
}
|
|
13242
13530
|
}
|
|
13531
|
+
return null;
|
|
13532
|
+
}
|
|
13533
|
+
function useShadowRoot() {
|
|
13534
|
+
const el = !!(process.env.NODE_ENV !== "production") ? useHost("useShadowRoot") : useHost();
|
|
13535
|
+
return el && el.shadowRoot;
|
|
13243
13536
|
}
|
|
13244
13537
|
|
|
13245
13538
|
function useCssModule(name = "$style") {
|
|
@@ -13798,7 +14091,7 @@ const createApp = (...args) => {
|
|
|
13798
14091
|
const component = app._component;
|
|
13799
14092
|
if (!isFunction(component) && !component.render && !component.template) {
|
|
13800
14093
|
component.template = container.innerHTML;
|
|
13801
|
-
if (!!(process.env.NODE_ENV !== "production")) {
|
|
14094
|
+
if (!!(process.env.NODE_ENV !== "production") && container.nodeType === 1) {
|
|
13802
14095
|
for (let i = 0; i < container.attributes.length; i++) {
|
|
13803
14096
|
const attr = container.attributes[i];
|
|
13804
14097
|
if (attr.name !== "v-cloak" && /^(v-|:|@)/.test(attr.name)) {
|
|
@@ -13811,7 +14104,9 @@ const createApp = (...args) => {
|
|
|
13811
14104
|
}
|
|
13812
14105
|
}
|
|
13813
14106
|
}
|
|
13814
|
-
container.
|
|
14107
|
+
if (container.nodeType === 1) {
|
|
14108
|
+
container.textContent = "";
|
|
14109
|
+
}
|
|
13815
14110
|
const proxy = mount(container, false, resolveRootNamespace(container));
|
|
13816
14111
|
if (container instanceof Element) {
|
|
13817
14112
|
container.removeAttribute("v-cloak");
|
|
@@ -14045,9 +14340,11 @@ var runtimeDom = /*#__PURE__*/Object.freeze({
|
|
|
14045
14340
|
useAttrs: useAttrs,
|
|
14046
14341
|
useCssModule: useCssModule,
|
|
14047
14342
|
useCssVars: useCssVars,
|
|
14343
|
+
useHost: useHost,
|
|
14048
14344
|
useId: useId,
|
|
14049
14345
|
useModel: useModel,
|
|
14050
14346
|
useSSRContext: useSSRContext,
|
|
14347
|
+
useShadowRoot: useShadowRoot,
|
|
14051
14348
|
useSlots: useSlots,
|
|
14052
14349
|
useTemplateRef: useTemplateRef,
|
|
14053
14350
|
useTransitionState: useTransitionState,
|
|
@@ -14103,36 +14400,70 @@ const FRAGMENT = Symbol(!!(process.env.NODE_ENV !== "production") ? `Fragment` :
|
|
|
14103
14400
|
const TELEPORT = Symbol(!!(process.env.NODE_ENV !== "production") ? `Teleport` : ``);
|
|
14104
14401
|
const SUSPENSE = Symbol(!!(process.env.NODE_ENV !== "production") ? `Suspense` : ``);
|
|
14105
14402
|
const KEEP_ALIVE = Symbol(!!(process.env.NODE_ENV !== "production") ? `KeepAlive` : ``);
|
|
14106
|
-
const BASE_TRANSITION = Symbol(
|
|
14403
|
+
const BASE_TRANSITION = Symbol(
|
|
14404
|
+
!!(process.env.NODE_ENV !== "production") ? `BaseTransition` : ``
|
|
14405
|
+
);
|
|
14107
14406
|
const OPEN_BLOCK = Symbol(!!(process.env.NODE_ENV !== "production") ? `openBlock` : ``);
|
|
14108
14407
|
const CREATE_BLOCK = Symbol(!!(process.env.NODE_ENV !== "production") ? `createBlock` : ``);
|
|
14109
|
-
const CREATE_ELEMENT_BLOCK = Symbol(
|
|
14408
|
+
const CREATE_ELEMENT_BLOCK = Symbol(
|
|
14409
|
+
!!(process.env.NODE_ENV !== "production") ? `createElementBlock` : ``
|
|
14410
|
+
);
|
|
14110
14411
|
const CREATE_VNODE = Symbol(!!(process.env.NODE_ENV !== "production") ? `createVNode` : ``);
|
|
14111
|
-
const CREATE_ELEMENT_VNODE = Symbol(
|
|
14112
|
-
|
|
14113
|
-
|
|
14114
|
-
const
|
|
14115
|
-
|
|
14412
|
+
const CREATE_ELEMENT_VNODE = Symbol(
|
|
14413
|
+
!!(process.env.NODE_ENV !== "production") ? `createElementVNode` : ``
|
|
14414
|
+
);
|
|
14415
|
+
const CREATE_COMMENT = Symbol(
|
|
14416
|
+
!!(process.env.NODE_ENV !== "production") ? `createCommentVNode` : ``
|
|
14417
|
+
);
|
|
14418
|
+
const CREATE_TEXT = Symbol(
|
|
14419
|
+
!!(process.env.NODE_ENV !== "production") ? `createTextVNode` : ``
|
|
14420
|
+
);
|
|
14421
|
+
const CREATE_STATIC = Symbol(
|
|
14422
|
+
!!(process.env.NODE_ENV !== "production") ? `createStaticVNode` : ``
|
|
14423
|
+
);
|
|
14424
|
+
const RESOLVE_COMPONENT = Symbol(
|
|
14425
|
+
!!(process.env.NODE_ENV !== "production") ? `resolveComponent` : ``
|
|
14426
|
+
);
|
|
14116
14427
|
const RESOLVE_DYNAMIC_COMPONENT = Symbol(
|
|
14117
14428
|
!!(process.env.NODE_ENV !== "production") ? `resolveDynamicComponent` : ``
|
|
14118
14429
|
);
|
|
14119
|
-
const RESOLVE_DIRECTIVE = Symbol(
|
|
14120
|
-
|
|
14121
|
-
|
|
14430
|
+
const RESOLVE_DIRECTIVE = Symbol(
|
|
14431
|
+
!!(process.env.NODE_ENV !== "production") ? `resolveDirective` : ``
|
|
14432
|
+
);
|
|
14433
|
+
const RESOLVE_FILTER = Symbol(
|
|
14434
|
+
!!(process.env.NODE_ENV !== "production") ? `resolveFilter` : ``
|
|
14435
|
+
);
|
|
14436
|
+
const WITH_DIRECTIVES = Symbol(
|
|
14437
|
+
!!(process.env.NODE_ENV !== "production") ? `withDirectives` : ``
|
|
14438
|
+
);
|
|
14122
14439
|
const RENDER_LIST = Symbol(!!(process.env.NODE_ENV !== "production") ? `renderList` : ``);
|
|
14123
14440
|
const RENDER_SLOT = Symbol(!!(process.env.NODE_ENV !== "production") ? `renderSlot` : ``);
|
|
14124
14441
|
const CREATE_SLOTS = Symbol(!!(process.env.NODE_ENV !== "production") ? `createSlots` : ``);
|
|
14125
|
-
const TO_DISPLAY_STRING = Symbol(
|
|
14442
|
+
const TO_DISPLAY_STRING = Symbol(
|
|
14443
|
+
!!(process.env.NODE_ENV !== "production") ? `toDisplayString` : ``
|
|
14444
|
+
);
|
|
14126
14445
|
const MERGE_PROPS = Symbol(!!(process.env.NODE_ENV !== "production") ? `mergeProps` : ``);
|
|
14127
|
-
const NORMALIZE_CLASS = Symbol(
|
|
14128
|
-
|
|
14129
|
-
|
|
14130
|
-
const
|
|
14446
|
+
const NORMALIZE_CLASS = Symbol(
|
|
14447
|
+
!!(process.env.NODE_ENV !== "production") ? `normalizeClass` : ``
|
|
14448
|
+
);
|
|
14449
|
+
const NORMALIZE_STYLE = Symbol(
|
|
14450
|
+
!!(process.env.NODE_ENV !== "production") ? `normalizeStyle` : ``
|
|
14451
|
+
);
|
|
14452
|
+
const NORMALIZE_PROPS = Symbol(
|
|
14453
|
+
!!(process.env.NODE_ENV !== "production") ? `normalizeProps` : ``
|
|
14454
|
+
);
|
|
14455
|
+
const GUARD_REACTIVE_PROPS = Symbol(
|
|
14456
|
+
!!(process.env.NODE_ENV !== "production") ? `guardReactiveProps` : ``
|
|
14457
|
+
);
|
|
14131
14458
|
const TO_HANDLERS = Symbol(!!(process.env.NODE_ENV !== "production") ? `toHandlers` : ``);
|
|
14132
14459
|
const CAMELIZE = Symbol(!!(process.env.NODE_ENV !== "production") ? `camelize` : ``);
|
|
14133
14460
|
const CAPITALIZE = Symbol(!!(process.env.NODE_ENV !== "production") ? `capitalize` : ``);
|
|
14134
|
-
const TO_HANDLER_KEY = Symbol(
|
|
14135
|
-
|
|
14461
|
+
const TO_HANDLER_KEY = Symbol(
|
|
14462
|
+
!!(process.env.NODE_ENV !== "production") ? `toHandlerKey` : ``
|
|
14463
|
+
);
|
|
14464
|
+
const SET_BLOCK_TRACKING = Symbol(
|
|
14465
|
+
!!(process.env.NODE_ENV !== "production") ? `setBlockTracking` : ``
|
|
14466
|
+
);
|
|
14136
14467
|
const PUSH_SCOPE_ID = Symbol(!!(process.env.NODE_ENV !== "production") ? `pushScopeId` : ``);
|
|
14137
14468
|
const POP_SCOPE_ID = Symbol(!!(process.env.NODE_ENV !== "production") ? `popScopeId` : ``);
|
|
14138
14469
|
const WITH_CTX = Symbol(!!(process.env.NODE_ENV !== "production") ? `withCtx` : ``);
|
|
@@ -15301,8 +15632,9 @@ const isSimpleIdentifier = (name) => !nonIdentifierRE.test(name);
|
|
|
15301
15632
|
const validFirstIdentCharRE = /[A-Za-z_$\xA0-\uFFFF]/;
|
|
15302
15633
|
const validIdentCharRE = /[\.\?\w$\xA0-\uFFFF]/;
|
|
15303
15634
|
const whitespaceRE = /\s+[.[]\s*|\s*[.[]\s+/g;
|
|
15304
|
-
const
|
|
15305
|
-
|
|
15635
|
+
const getExpSource = (exp) => exp.type === 4 ? exp.content : exp.loc.source;
|
|
15636
|
+
const isMemberExpressionBrowser = (exp) => {
|
|
15637
|
+
const path = getExpSource(exp).trim().replace(whitespaceRE, (s) => s.trim());
|
|
15306
15638
|
let state = 0 /* inMemberExp */;
|
|
15307
15639
|
let stateStack = [];
|
|
15308
15640
|
let currentOpenBracketCount = 0;
|
|
@@ -15364,6 +15696,9 @@ const isMemberExpressionBrowser = (path) => {
|
|
|
15364
15696
|
return !currentOpenBracketCount && !currentOpenParensCount;
|
|
15365
15697
|
};
|
|
15366
15698
|
const isMemberExpression = isMemberExpressionBrowser ;
|
|
15699
|
+
const fnExpRE = /^\s*(async\s*)?(\([^)]*?\)|[\w$_]+)\s*(:[^=]+)?=>|^\s*(async\s+)?function(?:\s+[\w$]+)?\s*\(/;
|
|
15700
|
+
const isFnExpressionBrowser = (exp) => fnExpRE.test(getExpSource(exp));
|
|
15701
|
+
const isFnExpression = isFnExpressionBrowser ;
|
|
15367
15702
|
function assert(condition, msg) {
|
|
15368
15703
|
if (!condition) {
|
|
15369
15704
|
throw new Error(msg || `unexpected compiler condition`);
|
|
@@ -18357,7 +18692,7 @@ function resolveComponentType(node, context, ssr = false) {
|
|
|
18357
18692
|
} else {
|
|
18358
18693
|
exp = isProp.exp;
|
|
18359
18694
|
if (!exp) {
|
|
18360
|
-
exp = createSimpleExpression(`is`, false, isProp.loc);
|
|
18695
|
+
exp = createSimpleExpression(`is`, false, isProp.arg.loc);
|
|
18361
18696
|
}
|
|
18362
18697
|
}
|
|
18363
18698
|
if (exp) {
|
|
@@ -18861,7 +19196,6 @@ function processSlotOutlet(node, context) {
|
|
|
18861
19196
|
};
|
|
18862
19197
|
}
|
|
18863
19198
|
|
|
18864
|
-
const fnExpRE = /^\s*(async\s*)?(\([^)]*?\)|[\w$_]+)\s*(:[^=]+)?=>|^\s*(async\s+)?function(?:\s+[\w$]+)?\s*\(/;
|
|
18865
19199
|
const transformOn$1 = (dir, node, context, augmentor) => {
|
|
18866
19200
|
const { loc, modifiers, arg } = dir;
|
|
18867
19201
|
if (!dir.exp && !modifiers.length) {
|
|
@@ -18905,8 +19239,8 @@ const transformOn$1 = (dir, node, context, augmentor) => {
|
|
|
18905
19239
|
}
|
|
18906
19240
|
let shouldCache = context.cacheHandlers && !exp && !context.inVOnce;
|
|
18907
19241
|
if (exp) {
|
|
18908
|
-
const isMemberExp = isMemberExpression(exp
|
|
18909
|
-
const isInlineStatement = !(isMemberExp ||
|
|
19242
|
+
const isMemberExp = isMemberExpression(exp);
|
|
19243
|
+
const isInlineStatement = !(isMemberExp || isFnExpression(exp));
|
|
18910
19244
|
const hasMultipleStatements = exp.content.includes(`;`);
|
|
18911
19245
|
if (!!(process.env.NODE_ENV !== "production") && true) {
|
|
18912
19246
|
validateBrowserExpression(
|
|
@@ -19054,7 +19388,7 @@ const transformModel$1 = (dir, node, context) => {
|
|
|
19054
19388
|
return createTransformProps();
|
|
19055
19389
|
}
|
|
19056
19390
|
const maybeRef = false;
|
|
19057
|
-
if (!expString.trim() || !isMemberExpression(
|
|
19391
|
+
if (!expString.trim() || !isMemberExpression(exp) && !maybeRef) {
|
|
19058
19392
|
context.onError(
|
|
19059
19393
|
createCompilerError(42, exp.loc)
|
|
19060
19394
|
);
|
|
@@ -19330,15 +19664,27 @@ function baseCompile(source, options = {}) {
|
|
|
19330
19664
|
const noopDirectiveTransform = () => ({ props: [] });
|
|
19331
19665
|
|
|
19332
19666
|
const V_MODEL_RADIO = Symbol(!!(process.env.NODE_ENV !== "production") ? `vModelRadio` : ``);
|
|
19333
|
-
const V_MODEL_CHECKBOX = Symbol(
|
|
19667
|
+
const V_MODEL_CHECKBOX = Symbol(
|
|
19668
|
+
!!(process.env.NODE_ENV !== "production") ? `vModelCheckbox` : ``
|
|
19669
|
+
);
|
|
19334
19670
|
const V_MODEL_TEXT = Symbol(!!(process.env.NODE_ENV !== "production") ? `vModelText` : ``);
|
|
19335
|
-
const V_MODEL_SELECT = Symbol(
|
|
19336
|
-
|
|
19337
|
-
|
|
19338
|
-
const
|
|
19671
|
+
const V_MODEL_SELECT = Symbol(
|
|
19672
|
+
!!(process.env.NODE_ENV !== "production") ? `vModelSelect` : ``
|
|
19673
|
+
);
|
|
19674
|
+
const V_MODEL_DYNAMIC = Symbol(
|
|
19675
|
+
!!(process.env.NODE_ENV !== "production") ? `vModelDynamic` : ``
|
|
19676
|
+
);
|
|
19677
|
+
const V_ON_WITH_MODIFIERS = Symbol(
|
|
19678
|
+
!!(process.env.NODE_ENV !== "production") ? `vOnModifiersGuard` : ``
|
|
19679
|
+
);
|
|
19680
|
+
const V_ON_WITH_KEYS = Symbol(
|
|
19681
|
+
!!(process.env.NODE_ENV !== "production") ? `vOnKeysGuard` : ``
|
|
19682
|
+
);
|
|
19339
19683
|
const V_SHOW = Symbol(!!(process.env.NODE_ENV !== "production") ? `vShow` : ``);
|
|
19340
19684
|
const TRANSITION = Symbol(!!(process.env.NODE_ENV !== "production") ? `Transition` : ``);
|
|
19341
|
-
const TRANSITION_GROUP = Symbol(
|
|
19685
|
+
const TRANSITION_GROUP = Symbol(
|
|
19686
|
+
!!(process.env.NODE_ENV !== "production") ? `TransitionGroup` : ``
|
|
19687
|
+
);
|
|
19342
19688
|
registerRuntimeHelpers({
|
|
19343
19689
|
[V_MODEL_RADIO]: `vModelRadio`,
|
|
19344
19690
|
[V_MODEL_CHECKBOX]: `vModelCheckbox`,
|
|
@@ -20022,6 +20368,6 @@ registerRuntimeCompiler(compileToFunction);
|
|
|
20022
20368
|
const Vue = createCompatVue();
|
|
20023
20369
|
Vue.compile = compileToFunction;
|
|
20024
20370
|
|
|
20025
|
-
const
|
|
20371
|
+
const configureCompat = Vue.configureCompat;
|
|
20026
20372
|
|
|
20027
|
-
export { BaseTransition, BaseTransitionPropsValidators, Comment, DeprecationTypes, EffectScope, ErrorCodes, ErrorTypeStrings, Fragment, KeepAlive, ReactiveEffect, Static, Suspense, Teleport, Text, TrackOpTypes, Transition, TransitionGroup, TriggerOpTypes, VueElement, assertNumber, callWithAsyncErrorHandling, callWithErrorHandling, camelize, capitalize, cloneVNode, compatUtils, computed, configureCompat, createApp, createBlock, createCommentVNode, createElementBlock, createBaseVNode as createElementVNode, createHydrationRenderer, createPropsRestProxy, createRenderer, createSSRApp, createSlots, createStaticVNode, createTextVNode, createVNode, customRef, Vue as default, defineAsyncComponent, defineComponent, defineCustomElement, defineEmits, defineExpose, defineModel, defineOptions, defineProps, defineSSRCustomElement, defineSlots, devtools, effect, effectScope, getCurrentInstance, getCurrentScope, getTransitionRawChildren, guardReactiveProps, h, handleError, hasInjectionContext, hydrate, hydrateOnIdle, hydrateOnInteraction, hydrateOnMediaQuery, hydrateOnVisible, initCustomFormatter, initDirectivesForSSR, inject, isMemoSame, isProxy, isReactive, isReadonly, isRef, isRuntimeOnly, isShallow, isVNode, markRaw, mergeDefaults, mergeModels, mergeProps, nextTick, normalizeClass, normalizeProps, normalizeStyle, onActivated, onBeforeMount, onBeforeUnmount, onBeforeUpdate, onDeactivated, onErrorCaptured, onMounted, onRenderTracked, onRenderTriggered, onScopeDispose, onServerPrefetch, onUnmounted, onUpdated, openBlock, popScopeId, provide, proxyRefs, pushScopeId, queuePostFlushCb, reactive, readonly, ref, registerRuntimeCompiler, render, renderList, renderSlot, resolveComponent, resolveDirective, resolveDynamicComponent, resolveFilter, resolveTransitionHooks, setBlockTracking, setDevtoolsHook, setTransitionHooks, shallowReactive, shallowReadonly, shallowRef, ssrContextKey, ssrUtils, stop, toDisplayString, toHandlerKey, toHandlers, toRaw, toRef, toRefs, toValue, transformVNodeArgs, triggerRef, unref, useAttrs, useCssModule, useCssVars, useId, useModel, useSSRContext, useSlots, useTemplateRef, useTransitionState, vModelCheckbox, vModelDynamic, vModelRadio, vModelSelect, vModelText, vShow, version, warn, watch, watchEffect, watchPostEffect, watchSyncEffect, withAsyncContext, withCtx, withDefaults, withDirectives, withKeys, withMemo, withModifiers, withScopeId };
|
|
20373
|
+
export { BaseTransition, BaseTransitionPropsValidators, Comment, DeprecationTypes, EffectScope, ErrorCodes, ErrorTypeStrings, Fragment, KeepAlive, ReactiveEffect, Static, Suspense, Teleport, Text, TrackOpTypes, Transition, TransitionGroup, TriggerOpTypes, VueElement, assertNumber, callWithAsyncErrorHandling, callWithErrorHandling, camelize, capitalize, cloneVNode, compatUtils, computed, configureCompat, createApp, createBlock, createCommentVNode, createElementBlock, createBaseVNode as createElementVNode, createHydrationRenderer, createPropsRestProxy, createRenderer, createSSRApp, createSlots, createStaticVNode, createTextVNode, createVNode, customRef, Vue as default, defineAsyncComponent, defineComponent, defineCustomElement, defineEmits, defineExpose, defineModel, defineOptions, defineProps, defineSSRCustomElement, defineSlots, devtools, effect, effectScope, getCurrentInstance, getCurrentScope, getTransitionRawChildren, guardReactiveProps, h, handleError, hasInjectionContext, hydrate, hydrateOnIdle, hydrateOnInteraction, hydrateOnMediaQuery, hydrateOnVisible, initCustomFormatter, initDirectivesForSSR, inject, isMemoSame, isProxy, isReactive, isReadonly, isRef, isRuntimeOnly, isShallow, isVNode, markRaw, mergeDefaults, mergeModels, mergeProps, nextTick, normalizeClass, normalizeProps, normalizeStyle, onActivated, onBeforeMount, onBeforeUnmount, onBeforeUpdate, onDeactivated, onErrorCaptured, onMounted, onRenderTracked, onRenderTriggered, onScopeDispose, onServerPrefetch, onUnmounted, onUpdated, openBlock, popScopeId, provide, proxyRefs, pushScopeId, queuePostFlushCb, reactive, readonly, ref, registerRuntimeCompiler, render, renderList, renderSlot, resolveComponent, resolveDirective, resolveDynamicComponent, resolveFilter, resolveTransitionHooks, setBlockTracking, setDevtoolsHook, setTransitionHooks, shallowReactive, shallowReadonly, shallowRef, ssrContextKey, ssrUtils, stop, toDisplayString, toHandlerKey, toHandlers, toRaw, toRef, toRefs, toValue, transformVNodeArgs, triggerRef, unref, useAttrs, useCssModule, useCssVars, useHost, useId, useModel, useSSRContext, useShadowRoot, useSlots, useTemplateRef, useTransitionState, vModelCheckbox, vModelDynamic, vModelRadio, vModelSelect, vModelText, vShow, version, warn, watch, watchEffect, watchPostEffect, watchSyncEffect, withAsyncContext, withCtx, withDefaults, withDirectives, withKeys, withMemo, withModifiers, withScopeId };
|