@vue/compat 3.3.4 → 3.3.6
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.cjs.js +973 -963
- package/dist/vue.cjs.prod.js +823 -815
- package/dist/vue.esm-browser.js +1016 -1006
- package/dist/vue.esm-browser.prod.js +6 -1
- package/dist/vue.esm-bundler.js +1029 -1019
- package/dist/vue.global.js +1005 -995
- package/dist/vue.global.prod.js +6 -1
- package/dist/vue.runtime.esm-browser.js +1012 -997
- package/dist/vue.runtime.esm-browser.prod.js +6 -1
- package/dist/vue.runtime.esm-bundler.js +1018 -1003
- package/dist/vue.runtime.global.js +1002 -987
- package/dist/vue.runtime.global.prod.js +6 -1
- package/package.json +3 -3
package/dist/vue.esm-browser.js
CHANGED
|
@@ -34,7 +34,7 @@ const isString = (val) => typeof val === "string";
|
|
|
34
34
|
const isSymbol = (val) => typeof val === "symbol";
|
|
35
35
|
const isObject = (val) => val !== null && typeof val === "object";
|
|
36
36
|
const isPromise = (val) => {
|
|
37
|
-
return isObject(val) && isFunction(val.then) && isFunction(val.catch);
|
|
37
|
+
return (isObject(val) || isFunction(val)) && isFunction(val.then) && isFunction(val.catch);
|
|
38
38
|
};
|
|
39
39
|
const objectToString = Object.prototype.toString;
|
|
40
40
|
const toTypeString = (value) => objectToString.call(value);
|
|
@@ -65,12 +65,13 @@ const hyphenateRE = /\B([A-Z])/g;
|
|
|
65
65
|
const hyphenate = cacheStringFunction(
|
|
66
66
|
(str) => str.replace(hyphenateRE, "-$1").toLowerCase()
|
|
67
67
|
);
|
|
68
|
-
const capitalize = cacheStringFunction(
|
|
69
|
-
|
|
70
|
-
);
|
|
71
|
-
const toHandlerKey = cacheStringFunction(
|
|
72
|
-
|
|
73
|
-
|
|
68
|
+
const capitalize = cacheStringFunction((str) => {
|
|
69
|
+
return str.charAt(0).toUpperCase() + str.slice(1);
|
|
70
|
+
});
|
|
71
|
+
const toHandlerKey = cacheStringFunction((str) => {
|
|
72
|
+
const s = str ? `on${capitalize(str)}` : ``;
|
|
73
|
+
return s;
|
|
74
|
+
});
|
|
74
75
|
const hasChanged = (value, oldValue) => !Object.is(value, oldValue);
|
|
75
76
|
const invokeArrayFns = (fns, arg) => {
|
|
76
77
|
for (let i = 0; i < fns.length; i++) {
|
|
@@ -120,8 +121,8 @@ const slotFlagsText = {
|
|
|
120
121
|
[3]: "FORWARDED"
|
|
121
122
|
};
|
|
122
123
|
|
|
123
|
-
const
|
|
124
|
-
const
|
|
124
|
+
const GLOBALS_ALLOWED = "Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,console";
|
|
125
|
+
const isGloballyAllowed = /* @__PURE__ */ makeMap(GLOBALS_ALLOWED);
|
|
125
126
|
|
|
126
127
|
const range = 2;
|
|
127
128
|
function generateCodeFrame(source, start = 0, end = source.length) {
|
|
@@ -176,9 +177,7 @@ function normalizeStyle(value) {
|
|
|
176
177
|
}
|
|
177
178
|
}
|
|
178
179
|
return res;
|
|
179
|
-
} else if (isString(value)) {
|
|
180
|
-
return value;
|
|
181
|
-
} else if (isObject(value)) {
|
|
180
|
+
} else if (isString(value) || isObject(value)) {
|
|
182
181
|
return value;
|
|
183
182
|
}
|
|
184
183
|
}
|
|
@@ -527,7 +526,7 @@ function cleanupEffect(effect2) {
|
|
|
527
526
|
}
|
|
528
527
|
}
|
|
529
528
|
function effect(fn, options) {
|
|
530
|
-
if (fn.effect) {
|
|
529
|
+
if (fn.effect instanceof ReactiveEffect) {
|
|
531
530
|
fn = fn.effect.fn;
|
|
532
531
|
}
|
|
533
532
|
const _effect = new ReactiveEffect(fn);
|
|
@@ -693,10 +692,6 @@ const isNonTrackableKeys = /* @__PURE__ */ makeMap(`__proto__,__v_isRef,__isVue`
|
|
|
693
692
|
const builtInSymbols = new Set(
|
|
694
693
|
/* @__PURE__ */ Object.getOwnPropertyNames(Symbol).filter((key) => key !== "arguments" && key !== "caller").map((key) => Symbol[key]).filter(isSymbol)
|
|
695
694
|
);
|
|
696
|
-
const get$1 = /* @__PURE__ */ createGetter();
|
|
697
|
-
const shallowGet = /* @__PURE__ */ createGetter(false, true);
|
|
698
|
-
const readonlyGet = /* @__PURE__ */ createGetter(true);
|
|
699
|
-
const shallowReadonlyGet = /* @__PURE__ */ createGetter(true, true);
|
|
700
695
|
const arrayInstrumentations = /* @__PURE__ */ createArrayInstrumentations();
|
|
701
696
|
function createArrayInstrumentations() {
|
|
702
697
|
const instrumentations = {};
|
|
@@ -729,8 +724,13 @@ function hasOwnProperty(key) {
|
|
|
729
724
|
track(obj, "has", key);
|
|
730
725
|
return obj.hasOwnProperty(key);
|
|
731
726
|
}
|
|
732
|
-
|
|
733
|
-
|
|
727
|
+
class BaseReactiveHandler {
|
|
728
|
+
constructor(_isReadonly = false, _shallow = false) {
|
|
729
|
+
this._isReadonly = _isReadonly;
|
|
730
|
+
this._shallow = _shallow;
|
|
731
|
+
}
|
|
732
|
+
get(target, key, receiver) {
|
|
733
|
+
const isReadonly2 = this._isReadonly, shallow = this._shallow;
|
|
734
734
|
if (key === "__v_isReactive") {
|
|
735
735
|
return !isReadonly2;
|
|
736
736
|
} else if (key === "__v_isReadonly") {
|
|
@@ -766,17 +766,18 @@ function createGetter(isReadonly2 = false, shallow = false) {
|
|
|
766
766
|
return isReadonly2 ? readonly(res) : reactive(res);
|
|
767
767
|
}
|
|
768
768
|
return res;
|
|
769
|
-
}
|
|
769
|
+
}
|
|
770
770
|
}
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
771
|
+
class MutableReactiveHandler extends BaseReactiveHandler {
|
|
772
|
+
constructor(shallow = false) {
|
|
773
|
+
super(false, shallow);
|
|
774
|
+
}
|
|
775
|
+
set(target, key, value, receiver) {
|
|
775
776
|
let oldValue = target[key];
|
|
776
777
|
if (isReadonly(oldValue) && isRef(oldValue) && !isRef(value)) {
|
|
777
778
|
return false;
|
|
778
779
|
}
|
|
779
|
-
if (!
|
|
780
|
+
if (!this._shallow) {
|
|
780
781
|
if (!isShallow(value) && !isReadonly(value)) {
|
|
781
782
|
oldValue = toRaw(oldValue);
|
|
782
783
|
value = toRaw(value);
|
|
@@ -796,37 +797,36 @@ function createSetter(shallow = false) {
|
|
|
796
797
|
}
|
|
797
798
|
}
|
|
798
799
|
return result;
|
|
799
|
-
};
|
|
800
|
-
}
|
|
801
|
-
function deleteProperty(target, key) {
|
|
802
|
-
const hadKey = hasOwn(target, key);
|
|
803
|
-
const oldValue = target[key];
|
|
804
|
-
const result = Reflect.deleteProperty(target, key);
|
|
805
|
-
if (result && hadKey) {
|
|
806
|
-
trigger(target, "delete", key, void 0, oldValue);
|
|
807
800
|
}
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
801
|
+
deleteProperty(target, key) {
|
|
802
|
+
const hadKey = hasOwn(target, key);
|
|
803
|
+
const oldValue = target[key];
|
|
804
|
+
const result = Reflect.deleteProperty(target, key);
|
|
805
|
+
if (result && hadKey) {
|
|
806
|
+
trigger(target, "delete", key, void 0, oldValue);
|
|
807
|
+
}
|
|
808
|
+
return result;
|
|
809
|
+
}
|
|
810
|
+
has(target, key) {
|
|
811
|
+
const result = Reflect.has(target, key);
|
|
812
|
+
if (!isSymbol(key) || !builtInSymbols.has(key)) {
|
|
813
|
+
track(target, "has", key);
|
|
814
|
+
}
|
|
815
|
+
return result;
|
|
816
|
+
}
|
|
817
|
+
ownKeys(target) {
|
|
818
|
+
track(
|
|
819
|
+
target,
|
|
820
|
+
"iterate",
|
|
821
|
+
isArray(target) ? "length" : ITERATE_KEY
|
|
822
|
+
);
|
|
823
|
+
return Reflect.ownKeys(target);
|
|
814
824
|
}
|
|
815
|
-
return result;
|
|
816
|
-
}
|
|
817
|
-
function ownKeys(target) {
|
|
818
|
-
track(target, "iterate", isArray(target) ? "length" : ITERATE_KEY);
|
|
819
|
-
return Reflect.ownKeys(target);
|
|
820
825
|
}
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
has: has$1,
|
|
826
|
-
ownKeys
|
|
827
|
-
};
|
|
828
|
-
const readonlyHandlers = {
|
|
829
|
-
get: readonlyGet,
|
|
826
|
+
class ReadonlyReactiveHandler extends BaseReactiveHandler {
|
|
827
|
+
constructor(shallow = false) {
|
|
828
|
+
super(true, shallow);
|
|
829
|
+
}
|
|
830
830
|
set(target, key) {
|
|
831
831
|
{
|
|
832
832
|
warn$1(
|
|
@@ -835,7 +835,7 @@ const readonlyHandlers = {
|
|
|
835
835
|
);
|
|
836
836
|
}
|
|
837
837
|
return true;
|
|
838
|
-
}
|
|
838
|
+
}
|
|
839
839
|
deleteProperty(target, key) {
|
|
840
840
|
{
|
|
841
841
|
warn$1(
|
|
@@ -845,22 +845,13 @@ const readonlyHandlers = {
|
|
|
845
845
|
}
|
|
846
846
|
return true;
|
|
847
847
|
}
|
|
848
|
-
}
|
|
849
|
-
const
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
get: shallowGet,
|
|
854
|
-
set: shallowSet
|
|
855
|
-
}
|
|
856
|
-
);
|
|
857
|
-
const shallowReadonlyHandlers = /* @__PURE__ */ extend(
|
|
858
|
-
{},
|
|
859
|
-
readonlyHandlers,
|
|
860
|
-
{
|
|
861
|
-
get: shallowReadonlyGet
|
|
862
|
-
}
|
|
848
|
+
}
|
|
849
|
+
const mutableHandlers = /* @__PURE__ */ new MutableReactiveHandler();
|
|
850
|
+
const readonlyHandlers = /* @__PURE__ */ new ReadonlyReactiveHandler();
|
|
851
|
+
const shallowReactiveHandlers = /* @__PURE__ */ new MutableReactiveHandler(
|
|
852
|
+
true
|
|
863
853
|
);
|
|
854
|
+
const shallowReadonlyHandlers = /* @__PURE__ */ new ReadonlyReactiveHandler(true);
|
|
864
855
|
|
|
865
856
|
const toShallow = (value) => value;
|
|
866
857
|
const getProto = (v) => Reflect.getPrototypeOf(v);
|
|
@@ -869,7 +860,7 @@ function get(target, key, isReadonly = false, isShallow = false) {
|
|
|
869
860
|
const rawTarget = toRaw(target);
|
|
870
861
|
const rawKey = toRaw(key);
|
|
871
862
|
if (!isReadonly) {
|
|
872
|
-
if (key
|
|
863
|
+
if (hasChanged(key, rawKey)) {
|
|
873
864
|
track(rawTarget, "get", key);
|
|
874
865
|
}
|
|
875
866
|
track(rawTarget, "get", rawKey);
|
|
@@ -889,7 +880,7 @@ function has(key, isReadonly = false) {
|
|
|
889
880
|
const rawTarget = toRaw(target);
|
|
890
881
|
const rawKey = toRaw(key);
|
|
891
882
|
if (!isReadonly) {
|
|
892
|
-
if (key
|
|
883
|
+
if (hasChanged(key, rawKey)) {
|
|
893
884
|
track(rawTarget, "has", key);
|
|
894
885
|
}
|
|
895
886
|
track(rawTarget, "has", rawKey);
|
|
@@ -1419,11 +1410,7 @@ function toRef(source, key, defaultValue) {
|
|
|
1419
1410
|
}
|
|
1420
1411
|
function propertyToRef(source, key, defaultValue) {
|
|
1421
1412
|
const val = source[key];
|
|
1422
|
-
return isRef(val) ? val : new ObjectRefImpl(
|
|
1423
|
-
source,
|
|
1424
|
-
key,
|
|
1425
|
-
defaultValue
|
|
1426
|
-
);
|
|
1413
|
+
return isRef(val) ? val : new ObjectRefImpl(source, key, defaultValue);
|
|
1427
1414
|
}
|
|
1428
1415
|
|
|
1429
1416
|
class ComputedRefImpl {
|
|
@@ -3717,9 +3704,7 @@ function doWatch(source, cb, { immediate, deep, flush, onTrack, onTrigger } = EM
|
|
|
3717
3704
|
}
|
|
3718
3705
|
if (cb) {
|
|
3719
3706
|
const newValue = effect.run();
|
|
3720
|
-
if (deep || forceTrigger || (isMultiSource ? newValue.some(
|
|
3721
|
-
(v, i) => hasChanged(v, oldValue[i])
|
|
3722
|
-
) : hasChanged(newValue, oldValue)) || isArray(newValue) && isCompatEnabled$1("WATCH_ARRAY", instance)) {
|
|
3707
|
+
if (deep || forceTrigger || (isMultiSource ? newValue.some((v, i) => hasChanged(v, oldValue[i])) : hasChanged(newValue, oldValue)) || isArray(newValue) && isCompatEnabled$1("WATCH_ARRAY", instance)) {
|
|
3723
3708
|
if (cleanup) {
|
|
3724
3709
|
cleanup();
|
|
3725
3710
|
}
|
|
@@ -3893,6 +3878,8 @@ function invokeDirectiveHook(vnode, prevVNode, instance, name) {
|
|
|
3893
3878
|
}
|
|
3894
3879
|
}
|
|
3895
3880
|
|
|
3881
|
+
const leaveCbKey = Symbol("_leaveCb");
|
|
3882
|
+
const enterCbKey$1 = Symbol("_enterCb");
|
|
3896
3883
|
function useTransitionState() {
|
|
3897
3884
|
const state = {
|
|
3898
3885
|
isMounted: false,
|
|
@@ -4013,9 +4000,9 @@ const BaseTransitionImpl = {
|
|
|
4013
4000
|
oldInnerChild
|
|
4014
4001
|
);
|
|
4015
4002
|
leavingVNodesCache[String(oldInnerChild.key)] = oldInnerChild;
|
|
4016
|
-
el
|
|
4003
|
+
el[leaveCbKey] = () => {
|
|
4017
4004
|
earlyRemove();
|
|
4018
|
-
el
|
|
4005
|
+
el[leaveCbKey] = void 0;
|
|
4019
4006
|
delete enterHooks.delayedLeave;
|
|
4020
4007
|
};
|
|
4021
4008
|
enterHooks.delayedLeave = delayedLeave;
|
|
@@ -4089,15 +4076,15 @@ function resolveTransitionHooks(vnode, props, state, instance) {
|
|
|
4089
4076
|
return;
|
|
4090
4077
|
}
|
|
4091
4078
|
}
|
|
4092
|
-
if (el
|
|
4093
|
-
el
|
|
4079
|
+
if (el[leaveCbKey]) {
|
|
4080
|
+
el[leaveCbKey](
|
|
4094
4081
|
true
|
|
4095
4082
|
/* cancelled */
|
|
4096
4083
|
);
|
|
4097
4084
|
}
|
|
4098
4085
|
const leavingVNode = leavingVNodesCache[key];
|
|
4099
|
-
if (leavingVNode && isSameVNodeType(vnode, leavingVNode) && leavingVNode.el
|
|
4100
|
-
leavingVNode.el
|
|
4086
|
+
if (leavingVNode && isSameVNodeType(vnode, leavingVNode) && leavingVNode.el[leaveCbKey]) {
|
|
4087
|
+
leavingVNode.el[leaveCbKey]();
|
|
4101
4088
|
}
|
|
4102
4089
|
callHook(hook, [el]);
|
|
4103
4090
|
},
|
|
@@ -4115,7 +4102,7 @@ function resolveTransitionHooks(vnode, props, state, instance) {
|
|
|
4115
4102
|
}
|
|
4116
4103
|
}
|
|
4117
4104
|
let called = false;
|
|
4118
|
-
const done = el
|
|
4105
|
+
const done = el[enterCbKey$1] = (cancelled) => {
|
|
4119
4106
|
if (called)
|
|
4120
4107
|
return;
|
|
4121
4108
|
called = true;
|
|
@@ -4127,7 +4114,7 @@ function resolveTransitionHooks(vnode, props, state, instance) {
|
|
|
4127
4114
|
if (hooks.delayedLeave) {
|
|
4128
4115
|
hooks.delayedLeave();
|
|
4129
4116
|
}
|
|
4130
|
-
el
|
|
4117
|
+
el[enterCbKey$1] = void 0;
|
|
4131
4118
|
};
|
|
4132
4119
|
if (hook) {
|
|
4133
4120
|
callAsyncHook(hook, [el, done]);
|
|
@@ -4137,8 +4124,8 @@ function resolveTransitionHooks(vnode, props, state, instance) {
|
|
|
4137
4124
|
},
|
|
4138
4125
|
leave(el, remove) {
|
|
4139
4126
|
const key2 = String(vnode.key);
|
|
4140
|
-
if (el
|
|
4141
|
-
el
|
|
4127
|
+
if (el[enterCbKey$1]) {
|
|
4128
|
+
el[enterCbKey$1](
|
|
4142
4129
|
true
|
|
4143
4130
|
/* cancelled */
|
|
4144
4131
|
);
|
|
@@ -4148,7 +4135,7 @@ function resolveTransitionHooks(vnode, props, state, instance) {
|
|
|
4148
4135
|
}
|
|
4149
4136
|
callHook(onBeforeLeave, [el]);
|
|
4150
4137
|
let called = false;
|
|
4151
|
-
const done = el
|
|
4138
|
+
const done = el[leaveCbKey] = (cancelled) => {
|
|
4152
4139
|
if (called)
|
|
4153
4140
|
return;
|
|
4154
4141
|
called = true;
|
|
@@ -4158,7 +4145,7 @@ function resolveTransitionHooks(vnode, props, state, instance) {
|
|
|
4158
4145
|
} else {
|
|
4159
4146
|
callHook(onAfterLeave, [el]);
|
|
4160
4147
|
}
|
|
4161
|
-
el
|
|
4148
|
+
el[leaveCbKey] = void 0;
|
|
4162
4149
|
if (leavingVNodesCache[key2] === vnode) {
|
|
4163
4150
|
delete leavingVNodesCache[key2];
|
|
4164
4151
|
}
|
|
@@ -4220,6 +4207,8 @@ function getTransitionRawChildren(children, keepComment = false, parentKey) {
|
|
|
4220
4207
|
return ret;
|
|
4221
4208
|
}
|
|
4222
4209
|
|
|
4210
|
+
/*! #__NO_SIDE_EFFECTS__ */
|
|
4211
|
+
// @__NO_SIDE_EFFECTS__
|
|
4223
4212
|
function defineComponent(options, extraOptions) {
|
|
4224
4213
|
return isFunction(options) ? (
|
|
4225
4214
|
// #8326: extend call and options.name access are considered side-effects
|
|
@@ -4229,6 +4218,8 @@ function defineComponent(options, extraOptions) {
|
|
|
4229
4218
|
}
|
|
4230
4219
|
|
|
4231
4220
|
const isAsyncWrapper = (i) => !!i.type.__asyncLoader;
|
|
4221
|
+
/*! #__NO_SIDE_EFFECTS__ */
|
|
4222
|
+
// @__NO_SIDE_EFFECTS__
|
|
4232
4223
|
function defineAsyncComponent(source) {
|
|
4233
4224
|
if (isFunction(source)) {
|
|
4234
4225
|
source = { loader: source };
|
|
@@ -4960,7 +4951,7 @@ function defineLegacyVNodeProperties(vnode) {
|
|
|
4960
4951
|
}
|
|
4961
4952
|
}
|
|
4962
4953
|
|
|
4963
|
-
const normalizedFunctionalComponentMap = /* @__PURE__ */ new
|
|
4954
|
+
const normalizedFunctionalComponentMap = /* @__PURE__ */ new WeakMap();
|
|
4964
4955
|
const legacySlotProxyHandlers = {
|
|
4965
4956
|
get(target, key) {
|
|
4966
4957
|
const slot = target[key];
|
|
@@ -5241,6 +5232,7 @@ function legacyPrependModifier(value, symbol) {
|
|
|
5241
5232
|
function installCompatInstanceProperties(map) {
|
|
5242
5233
|
const set = (target, key, val) => {
|
|
5243
5234
|
target[key] = val;
|
|
5235
|
+
return target[key];
|
|
5244
5236
|
};
|
|
5245
5237
|
const del = (target, key) => {
|
|
5246
5238
|
delete target[key];
|
|
@@ -5518,7 +5510,7 @@ const RuntimeCompiledPublicInstanceProxyHandlers = /* @__PURE__ */ extend(
|
|
|
5518
5510
|
return PublicInstanceProxyHandlers.get(target, key, target);
|
|
5519
5511
|
},
|
|
5520
5512
|
has(_, key) {
|
|
5521
|
-
const has = key[0] !== "_" && !
|
|
5513
|
+
const has = key[0] !== "_" && !isGloballyAllowed(key);
|
|
5522
5514
|
if (!has && PublicInstanceProxyHandlers.has(_, key)) {
|
|
5523
5515
|
warn(
|
|
5524
5516
|
`Property ${JSON.stringify(
|
|
@@ -6255,7 +6247,7 @@ function createCompatVue$1(createApp, createSingletonApp) {
|
|
|
6255
6247
|
return vm;
|
|
6256
6248
|
}
|
|
6257
6249
|
}
|
|
6258
|
-
Vue.version = `2.6.14-compat:${"3.3.
|
|
6250
|
+
Vue.version = `2.6.14-compat:${"3.3.6"}`;
|
|
6259
6251
|
Vue.config = singletonApp.config;
|
|
6260
6252
|
Vue.use = (p, ...options) => {
|
|
6261
6253
|
if (p && isFunction(p.install)) {
|
|
@@ -6663,12 +6655,12 @@ function createAppAPI(render, hydrate) {
|
|
|
6663
6655
|
},
|
|
6664
6656
|
set() {
|
|
6665
6657
|
warn(
|
|
6666
|
-
`app.config.unwrapInjectedRef has been deprecated. 3.3 now
|
|
6658
|
+
`app.config.unwrapInjectedRef has been deprecated. 3.3 now always unwraps injected refs in Options API.`
|
|
6667
6659
|
);
|
|
6668
6660
|
}
|
|
6669
6661
|
});
|
|
6670
6662
|
}
|
|
6671
|
-
const installedPlugins = /* @__PURE__ */ new
|
|
6663
|
+
const installedPlugins = /* @__PURE__ */ new WeakSet();
|
|
6672
6664
|
let isMounted = false;
|
|
6673
6665
|
const app = context.app = {
|
|
6674
6666
|
_uid: uid$1++,
|
|
@@ -6750,10 +6742,7 @@ function createAppAPI(render, hydrate) {
|
|
|
6750
6742
|
If you want to mount another app on the same host container, you need to unmount the previous app by calling \`app.unmount()\` first.`
|
|
6751
6743
|
);
|
|
6752
6744
|
}
|
|
6753
|
-
const vnode = createVNode(
|
|
6754
|
-
rootComponent,
|
|
6755
|
-
rootProps
|
|
6756
|
-
);
|
|
6745
|
+
const vnode = createVNode(rootComponent, rootProps);
|
|
6757
6746
|
vnode.appContext = context;
|
|
6758
6747
|
{
|
|
6759
6748
|
context.reload = () => {
|
|
@@ -7412,7 +7401,7 @@ const updateSlots = (instance, children, optimized) => {
|
|
|
7412
7401
|
}
|
|
7413
7402
|
if (needDeletionCheck) {
|
|
7414
7403
|
for (const key in slots) {
|
|
7415
|
-
if (!isInternalKey(key) &&
|
|
7404
|
+
if (!isInternalKey(key) && deletionComparisonTarget[key] == null) {
|
|
7416
7405
|
delete slots[key];
|
|
7417
7406
|
}
|
|
7418
7407
|
}
|
|
@@ -7576,8 +7565,10 @@ function createHydrationFunctions(rendererInternals) {
|
|
|
7576
7565
|
hasMismatch = true;
|
|
7577
7566
|
warn(
|
|
7578
7567
|
`Hydration text mismatch:
|
|
7579
|
-
-
|
|
7580
|
-
|
|
7568
|
+
- Server rendered: ${JSON.stringify(
|
|
7569
|
+
node.data
|
|
7570
|
+
)}
|
|
7571
|
+
- Client rendered: ${JSON.stringify(vnode.children)}`
|
|
7581
7572
|
);
|
|
7582
7573
|
node.data = vnode.children;
|
|
7583
7574
|
}
|
|
@@ -7780,8 +7771,8 @@ function createHydrationFunctions(rendererInternals) {
|
|
|
7780
7771
|
hasMismatch = true;
|
|
7781
7772
|
warn(
|
|
7782
7773
|
`Hydration text content mismatch in <${vnode.type}>:
|
|
7783
|
-
-
|
|
7784
|
-
-
|
|
7774
|
+
- Server rendered: ${el.textContent}
|
|
7775
|
+
- Client rendered: ${vnode.children}`
|
|
7785
7776
|
);
|
|
7786
7777
|
el.textContent = vnode.children;
|
|
7787
7778
|
}
|
|
@@ -9563,6 +9554,10 @@ const TeleportImpl = {
|
|
|
9563
9554
|
internals,
|
|
9564
9555
|
1
|
|
9565
9556
|
);
|
|
9557
|
+
} else {
|
|
9558
|
+
if (n2.props && n1.props && n2.props.to !== n1.props.to) {
|
|
9559
|
+
n2.props.to = n1.props.to;
|
|
9560
|
+
}
|
|
9566
9561
|
}
|
|
9567
9562
|
} else {
|
|
9568
9563
|
if ((n2.props && n2.props.to) !== (n1.props && n1.props.to)) {
|
|
@@ -9603,19 +9598,18 @@ const TeleportImpl = {
|
|
|
9603
9598
|
if (target) {
|
|
9604
9599
|
hostRemove(targetAnchor);
|
|
9605
9600
|
}
|
|
9606
|
-
|
|
9607
|
-
|
|
9608
|
-
|
|
9609
|
-
|
|
9610
|
-
|
|
9611
|
-
|
|
9612
|
-
|
|
9613
|
-
|
|
9614
|
-
|
|
9615
|
-
|
|
9616
|
-
|
|
9617
|
-
|
|
9618
|
-
}
|
|
9601
|
+
doRemove && hostRemove(anchor);
|
|
9602
|
+
if (shapeFlag & 16) {
|
|
9603
|
+
const shouldRemove = doRemove || !isTeleportDisabled(props);
|
|
9604
|
+
for (let i = 0; i < children.length; i++) {
|
|
9605
|
+
const child = children[i];
|
|
9606
|
+
unmount(
|
|
9607
|
+
child,
|
|
9608
|
+
parentComponent,
|
|
9609
|
+
parentSuspense,
|
|
9610
|
+
shouldRemove,
|
|
9611
|
+
!!child.dynamicChildren
|
|
9612
|
+
);
|
|
9619
9613
|
}
|
|
9620
9614
|
}
|
|
9621
9615
|
},
|
|
@@ -9699,7 +9693,7 @@ function updateCssVars(vnode) {
|
|
|
9699
9693
|
const ctx = vnode.ctx;
|
|
9700
9694
|
if (ctx && ctx.ut) {
|
|
9701
9695
|
let node = vnode.children[0].el;
|
|
9702
|
-
while (node !== vnode.targetAnchor) {
|
|
9696
|
+
while (node && node !== vnode.targetAnchor) {
|
|
9703
9697
|
if (node.nodeType === 1)
|
|
9704
9698
|
node.setAttribute("data-v-owner", ctx.uid);
|
|
9705
9699
|
node = node.nextSibling;
|
|
@@ -9708,7 +9702,7 @@ function updateCssVars(vnode) {
|
|
|
9708
9702
|
}
|
|
9709
9703
|
}
|
|
9710
9704
|
|
|
9711
|
-
const normalizedAsyncComponentMap = /* @__PURE__ */ new
|
|
9705
|
+
const normalizedAsyncComponentMap = /* @__PURE__ */ new WeakMap();
|
|
9712
9706
|
function convertLegacyAsyncComponent(comp) {
|
|
9713
9707
|
if (normalizedAsyncComponentMap.has(comp)) {
|
|
9714
9708
|
return normalizedAsyncComponentMap.get(comp);
|
|
@@ -10416,9 +10410,12 @@ function finishComponentSetup(instance, isSSR, skipOptions) {
|
|
|
10416
10410
|
if (!skipOptions) {
|
|
10417
10411
|
setCurrentInstance(instance);
|
|
10418
10412
|
pauseTracking();
|
|
10419
|
-
|
|
10420
|
-
|
|
10421
|
-
|
|
10413
|
+
try {
|
|
10414
|
+
applyOptions(instance);
|
|
10415
|
+
} finally {
|
|
10416
|
+
resetTracking();
|
|
10417
|
+
unsetCurrentInstance();
|
|
10418
|
+
}
|
|
10422
10419
|
}
|
|
10423
10420
|
if (!Component.render && instance.render === NOOP && !isSSR) {
|
|
10424
10421
|
if (!compile$1 && Component.template) {
|
|
@@ -10784,7 +10781,7 @@ function isMemoSame(cached, memo) {
|
|
|
10784
10781
|
return true;
|
|
10785
10782
|
}
|
|
10786
10783
|
|
|
10787
|
-
const version = "3.3.
|
|
10784
|
+
const version = "3.3.6";
|
|
10788
10785
|
const ssrUtils = null;
|
|
10789
10786
|
const resolveFilter = resolveFilter$1 ;
|
|
10790
10787
|
const _compatUtils = {
|
|
@@ -10863,934 +10860,989 @@ const nodeOps = {
|
|
|
10863
10860
|
}
|
|
10864
10861
|
};
|
|
10865
10862
|
|
|
10866
|
-
|
|
10867
|
-
|
|
10868
|
-
|
|
10869
|
-
|
|
10870
|
-
|
|
10871
|
-
|
|
10872
|
-
|
|
10873
|
-
} else if (isSVG) {
|
|
10874
|
-
el.setAttribute("class", value);
|
|
10875
|
-
} else {
|
|
10876
|
-
el.className = value;
|
|
10877
|
-
}
|
|
10863
|
+
const TRANSITION$1 = "transition";
|
|
10864
|
+
const ANIMATION = "animation";
|
|
10865
|
+
const vtcKey = Symbol("_vtc");
|
|
10866
|
+
const Transition = (props, { slots }) => h(BaseTransition, resolveTransitionProps(props), slots);
|
|
10867
|
+
Transition.displayName = "Transition";
|
|
10868
|
+
{
|
|
10869
|
+
Transition.__isBuiltIn = true;
|
|
10878
10870
|
}
|
|
10879
|
-
|
|
10880
|
-
|
|
10881
|
-
|
|
10882
|
-
|
|
10883
|
-
|
|
10884
|
-
|
|
10885
|
-
|
|
10886
|
-
|
|
10887
|
-
|
|
10888
|
-
|
|
10889
|
-
|
|
10890
|
-
|
|
10891
|
-
|
|
10892
|
-
|
|
10893
|
-
|
|
10894
|
-
|
|
10895
|
-
|
|
10896
|
-
|
|
10897
|
-
|
|
10898
|
-
|
|
10899
|
-
|
|
10900
|
-
|
|
10901
|
-
|
|
10902
|
-
|
|
10903
|
-
|
|
10904
|
-
|
|
10905
|
-
|
|
10871
|
+
const DOMTransitionPropsValidators = {
|
|
10872
|
+
name: String,
|
|
10873
|
+
type: String,
|
|
10874
|
+
css: {
|
|
10875
|
+
type: Boolean,
|
|
10876
|
+
default: true
|
|
10877
|
+
},
|
|
10878
|
+
duration: [String, Number, Object],
|
|
10879
|
+
enterFromClass: String,
|
|
10880
|
+
enterActiveClass: String,
|
|
10881
|
+
enterToClass: String,
|
|
10882
|
+
appearFromClass: String,
|
|
10883
|
+
appearActiveClass: String,
|
|
10884
|
+
appearToClass: String,
|
|
10885
|
+
leaveFromClass: String,
|
|
10886
|
+
leaveActiveClass: String,
|
|
10887
|
+
leaveToClass: String
|
|
10888
|
+
};
|
|
10889
|
+
const TransitionPropsValidators = Transition.props = /* @__PURE__ */ extend(
|
|
10890
|
+
{},
|
|
10891
|
+
BaseTransitionPropsValidators,
|
|
10892
|
+
DOMTransitionPropsValidators
|
|
10893
|
+
);
|
|
10894
|
+
const callHook = (hook, args = []) => {
|
|
10895
|
+
if (isArray(hook)) {
|
|
10896
|
+
hook.forEach((h2) => h2(...args));
|
|
10897
|
+
} else if (hook) {
|
|
10898
|
+
hook(...args);
|
|
10906
10899
|
}
|
|
10907
|
-
}
|
|
10908
|
-
const
|
|
10909
|
-
|
|
10910
|
-
|
|
10911
|
-
|
|
10912
|
-
|
|
10913
|
-
|
|
10914
|
-
if (
|
|
10915
|
-
|
|
10916
|
-
{
|
|
10917
|
-
if (semicolonRE.test(val)) {
|
|
10918
|
-
warn(
|
|
10919
|
-
`Unexpected semicolon at the end of '${name}' style value: '${val}'`
|
|
10920
|
-
);
|
|
10921
|
-
}
|
|
10922
|
-
}
|
|
10923
|
-
if (name.startsWith("--")) {
|
|
10924
|
-
style.setProperty(name, val);
|
|
10925
|
-
} else {
|
|
10926
|
-
const prefixed = autoPrefix(style, name);
|
|
10927
|
-
if (importantRE.test(val)) {
|
|
10928
|
-
style.setProperty(
|
|
10929
|
-
hyphenate(prefixed),
|
|
10930
|
-
val.replace(importantRE, ""),
|
|
10931
|
-
"important"
|
|
10932
|
-
);
|
|
10933
|
-
} else {
|
|
10934
|
-
style[prefixed] = val;
|
|
10935
|
-
}
|
|
10900
|
+
};
|
|
10901
|
+
const hasExplicitCallback = (hook) => {
|
|
10902
|
+
return hook ? isArray(hook) ? hook.some((h2) => h2.length > 1) : hook.length > 1 : false;
|
|
10903
|
+
};
|
|
10904
|
+
function resolveTransitionProps(rawProps) {
|
|
10905
|
+
const baseProps = {};
|
|
10906
|
+
for (const key in rawProps) {
|
|
10907
|
+
if (!(key in DOMTransitionPropsValidators)) {
|
|
10908
|
+
baseProps[key] = rawProps[key];
|
|
10936
10909
|
}
|
|
10937
10910
|
}
|
|
10938
|
-
|
|
10939
|
-
|
|
10940
|
-
const prefixCache = {};
|
|
10941
|
-
function autoPrefix(style, rawName) {
|
|
10942
|
-
const cached = prefixCache[rawName];
|
|
10943
|
-
if (cached) {
|
|
10944
|
-
return cached;
|
|
10945
|
-
}
|
|
10946
|
-
let name = camelize(rawName);
|
|
10947
|
-
if (name !== "filter" && name in style) {
|
|
10948
|
-
return prefixCache[rawName] = name;
|
|
10949
|
-
}
|
|
10950
|
-
name = capitalize(name);
|
|
10951
|
-
for (let i = 0; i < prefixes.length; i++) {
|
|
10952
|
-
const prefixed = prefixes[i] + name;
|
|
10953
|
-
if (prefixed in style) {
|
|
10954
|
-
return prefixCache[rawName] = prefixed;
|
|
10955
|
-
}
|
|
10911
|
+
if (rawProps.css === false) {
|
|
10912
|
+
return baseProps;
|
|
10956
10913
|
}
|
|
10957
|
-
|
|
10958
|
-
|
|
10959
|
-
|
|
10960
|
-
|
|
10961
|
-
|
|
10962
|
-
|
|
10963
|
-
|
|
10964
|
-
|
|
10965
|
-
|
|
10966
|
-
|
|
10914
|
+
const {
|
|
10915
|
+
name = "v",
|
|
10916
|
+
type,
|
|
10917
|
+
duration,
|
|
10918
|
+
enterFromClass = `${name}-enter-from`,
|
|
10919
|
+
enterActiveClass = `${name}-enter-active`,
|
|
10920
|
+
enterToClass = `${name}-enter-to`,
|
|
10921
|
+
appearFromClass = enterFromClass,
|
|
10922
|
+
appearActiveClass = enterActiveClass,
|
|
10923
|
+
appearToClass = enterToClass,
|
|
10924
|
+
leaveFromClass = `${name}-leave-from`,
|
|
10925
|
+
leaveActiveClass = `${name}-leave-active`,
|
|
10926
|
+
leaveToClass = `${name}-leave-to`
|
|
10927
|
+
} = rawProps;
|
|
10928
|
+
const legacyClassEnabled = compatUtils.isCompatEnabled("TRANSITION_CLASSES", null);
|
|
10929
|
+
let legacyEnterFromClass;
|
|
10930
|
+
let legacyAppearFromClass;
|
|
10931
|
+
let legacyLeaveFromClass;
|
|
10932
|
+
if (legacyClassEnabled) {
|
|
10933
|
+
const toLegacyClass = (cls) => cls.replace(/-from$/, "");
|
|
10934
|
+
if (!rawProps.enterFromClass) {
|
|
10935
|
+
legacyEnterFromClass = toLegacyClass(enterFromClass);
|
|
10967
10936
|
}
|
|
10968
|
-
|
|
10969
|
-
|
|
10970
|
-
return;
|
|
10937
|
+
if (!rawProps.appearFromClass) {
|
|
10938
|
+
legacyAppearFromClass = toLegacyClass(appearFromClass);
|
|
10971
10939
|
}
|
|
10972
|
-
|
|
10973
|
-
|
|
10974
|
-
el.removeAttribute(key);
|
|
10975
|
-
} else {
|
|
10976
|
-
el.setAttribute(key, isBoolean ? "" : value);
|
|
10940
|
+
if (!rawProps.leaveFromClass) {
|
|
10941
|
+
legacyLeaveFromClass = toLegacyClass(leaveFromClass);
|
|
10977
10942
|
}
|
|
10978
10943
|
}
|
|
10979
|
-
|
|
10980
|
-
const
|
|
10981
|
-
|
|
10982
|
-
|
|
10983
|
-
|
|
10984
|
-
|
|
10985
|
-
|
|
10986
|
-
|
|
10987
|
-
|
|
10988
|
-
|
|
10989
|
-
|
|
10990
|
-
|
|
10991
|
-
|
|
10992
|
-
|
|
10944
|
+
const durations = normalizeDuration(duration);
|
|
10945
|
+
const enterDuration = durations && durations[0];
|
|
10946
|
+
const leaveDuration = durations && durations[1];
|
|
10947
|
+
const {
|
|
10948
|
+
onBeforeEnter,
|
|
10949
|
+
onEnter,
|
|
10950
|
+
onEnterCancelled,
|
|
10951
|
+
onLeave,
|
|
10952
|
+
onLeaveCancelled,
|
|
10953
|
+
onBeforeAppear = onBeforeEnter,
|
|
10954
|
+
onAppear = onEnter,
|
|
10955
|
+
onAppearCancelled = onEnterCancelled
|
|
10956
|
+
} = baseProps;
|
|
10957
|
+
const finishEnter = (el, isAppear, done) => {
|
|
10958
|
+
removeTransitionClass(el, isAppear ? appearToClass : enterToClass);
|
|
10959
|
+
removeTransitionClass(el, isAppear ? appearActiveClass : enterActiveClass);
|
|
10960
|
+
done && done();
|
|
10961
|
+
};
|
|
10962
|
+
const finishLeave = (el, done) => {
|
|
10963
|
+
el._isLeaving = false;
|
|
10964
|
+
removeTransitionClass(el, leaveFromClass);
|
|
10965
|
+
removeTransitionClass(el, leaveToClass);
|
|
10966
|
+
removeTransitionClass(el, leaveActiveClass);
|
|
10967
|
+
done && done();
|
|
10968
|
+
};
|
|
10969
|
+
const makeEnterHook = (isAppear) => {
|
|
10970
|
+
return (el, done) => {
|
|
10971
|
+
const hook = isAppear ? onAppear : onEnter;
|
|
10972
|
+
const resolve = () => finishEnter(el, isAppear, done);
|
|
10973
|
+
callHook(hook, [el, resolve]);
|
|
10974
|
+
nextFrame(() => {
|
|
10975
|
+
removeTransitionClass(el, isAppear ? appearFromClass : enterFromClass);
|
|
10976
|
+
if (legacyClassEnabled) {
|
|
10977
|
+
const legacyClass = isAppear ? legacyAppearFromClass : legacyEnterFromClass;
|
|
10978
|
+
if (legacyClass) {
|
|
10979
|
+
removeTransitionClass(el, legacyClass);
|
|
10980
|
+
}
|
|
10981
|
+
}
|
|
10982
|
+
addTransitionClass(el, isAppear ? appearToClass : enterToClass);
|
|
10983
|
+
if (!hasExplicitCallback(hook)) {
|
|
10984
|
+
whenTransitionEnds(el, type, enterDuration, resolve);
|
|
10985
|
+
}
|
|
10986
|
+
});
|
|
10987
|
+
};
|
|
10988
|
+
};
|
|
10989
|
+
return extend(baseProps, {
|
|
10990
|
+
onBeforeEnter(el) {
|
|
10991
|
+
callHook(onBeforeEnter, [el]);
|
|
10992
|
+
addTransitionClass(el, enterFromClass);
|
|
10993
|
+
if (legacyClassEnabled && legacyEnterFromClass) {
|
|
10994
|
+
addTransitionClass(el, legacyEnterFromClass);
|
|
10995
|
+
}
|
|
10996
|
+
addTransitionClass(el, enterActiveClass);
|
|
10997
|
+
},
|
|
10998
|
+
onBeforeAppear(el) {
|
|
10999
|
+
callHook(onBeforeAppear, [el]);
|
|
11000
|
+
addTransitionClass(el, appearFromClass);
|
|
11001
|
+
if (legacyClassEnabled && legacyAppearFromClass) {
|
|
11002
|
+
addTransitionClass(el, legacyAppearFromClass);
|
|
11003
|
+
}
|
|
11004
|
+
addTransitionClass(el, appearActiveClass);
|
|
11005
|
+
},
|
|
11006
|
+
onEnter: makeEnterHook(false),
|
|
11007
|
+
onAppear: makeEnterHook(true),
|
|
11008
|
+
onLeave(el, done) {
|
|
11009
|
+
el._isLeaving = true;
|
|
11010
|
+
const resolve = () => finishLeave(el, done);
|
|
11011
|
+
addTransitionClass(el, leaveFromClass);
|
|
11012
|
+
if (legacyClassEnabled && legacyLeaveFromClass) {
|
|
11013
|
+
addTransitionClass(el, legacyLeaveFromClass);
|
|
11014
|
+
}
|
|
11015
|
+
forceReflow();
|
|
11016
|
+
addTransitionClass(el, leaveActiveClass);
|
|
11017
|
+
nextFrame(() => {
|
|
11018
|
+
if (!el._isLeaving) {
|
|
11019
|
+
return;
|
|
11020
|
+
}
|
|
11021
|
+
removeTransitionClass(el, leaveFromClass);
|
|
11022
|
+
if (legacyClassEnabled && legacyLeaveFromClass) {
|
|
11023
|
+
removeTransitionClass(el, legacyLeaveFromClass);
|
|
11024
|
+
}
|
|
11025
|
+
addTransitionClass(el, leaveToClass);
|
|
11026
|
+
if (!hasExplicitCallback(onLeave)) {
|
|
11027
|
+
whenTransitionEnds(el, type, leaveDuration, resolve);
|
|
11028
|
+
}
|
|
11029
|
+
});
|
|
11030
|
+
callHook(onLeave, [el, resolve]);
|
|
11031
|
+
},
|
|
11032
|
+
onEnterCancelled(el) {
|
|
11033
|
+
finishEnter(el, false);
|
|
11034
|
+
callHook(onEnterCancelled, [el]);
|
|
11035
|
+
},
|
|
11036
|
+
onAppearCancelled(el) {
|
|
11037
|
+
finishEnter(el, true);
|
|
11038
|
+
callHook(onAppearCancelled, [el]);
|
|
11039
|
+
},
|
|
11040
|
+
onLeaveCancelled(el) {
|
|
11041
|
+
finishLeave(el);
|
|
11042
|
+
callHook(onLeaveCancelled, [el]);
|
|
10993
11043
|
}
|
|
10994
|
-
}
|
|
10995
|
-
"ATTR_FALSE_VALUE",
|
|
10996
|
-
instance,
|
|
10997
|
-
key
|
|
10998
|
-
)) {
|
|
10999
|
-
el.removeAttribute(key);
|
|
11000
|
-
return true;
|
|
11001
|
-
}
|
|
11002
|
-
return false;
|
|
11044
|
+
});
|
|
11003
11045
|
}
|
|
11004
|
-
|
|
11005
|
-
|
|
11006
|
-
|
|
11007
|
-
|
|
11008
|
-
|
|
11009
|
-
}
|
|
11010
|
-
el[key] = value == null ? "" : value;
|
|
11011
|
-
return;
|
|
11012
|
-
}
|
|
11013
|
-
const tag = el.tagName;
|
|
11014
|
-
if (key === "value" && tag !== "PROGRESS" && // custom elements may use _value internally
|
|
11015
|
-
!tag.includes("-")) {
|
|
11016
|
-
el._value = value;
|
|
11017
|
-
const oldValue = tag === "OPTION" ? el.getAttribute("value") : el.value;
|
|
11018
|
-
const newValue = value == null ? "" : value;
|
|
11019
|
-
if (oldValue !== newValue) {
|
|
11020
|
-
el.value = newValue;
|
|
11021
|
-
}
|
|
11022
|
-
if (value == null) {
|
|
11023
|
-
el.removeAttribute(key);
|
|
11024
|
-
}
|
|
11025
|
-
return;
|
|
11026
|
-
}
|
|
11027
|
-
let needRemove = false;
|
|
11028
|
-
if (value === "" || value == null) {
|
|
11029
|
-
const type = typeof el[key];
|
|
11030
|
-
if (type === "boolean") {
|
|
11031
|
-
value = includeBooleanAttr(value);
|
|
11032
|
-
} else if (value == null && type === "string") {
|
|
11033
|
-
value = "";
|
|
11034
|
-
needRemove = true;
|
|
11035
|
-
} else if (type === "number") {
|
|
11036
|
-
value = 0;
|
|
11037
|
-
needRemove = true;
|
|
11038
|
-
}
|
|
11046
|
+
function normalizeDuration(duration) {
|
|
11047
|
+
if (duration == null) {
|
|
11048
|
+
return null;
|
|
11049
|
+
} else if (isObject(duration)) {
|
|
11050
|
+
return [NumberOf(duration.enter), NumberOf(duration.leave)];
|
|
11039
11051
|
} else {
|
|
11040
|
-
|
|
11041
|
-
|
|
11042
|
-
parentComponent
|
|
11043
|
-
)) {
|
|
11044
|
-
const type = typeof el[key];
|
|
11045
|
-
if (type === "string" || type === "number") {
|
|
11046
|
-
compatUtils.warnDeprecation(
|
|
11047
|
-
"ATTR_FALSE_VALUE",
|
|
11048
|
-
parentComponent,
|
|
11049
|
-
key
|
|
11050
|
-
);
|
|
11051
|
-
value = type === "number" ? 0 : "";
|
|
11052
|
-
needRemove = true;
|
|
11053
|
-
}
|
|
11054
|
-
}
|
|
11055
|
-
}
|
|
11056
|
-
try {
|
|
11057
|
-
el[key] = value;
|
|
11058
|
-
} catch (e) {
|
|
11059
|
-
if (!needRemove) {
|
|
11060
|
-
warn(
|
|
11061
|
-
`Failed setting prop "${key}" on <${tag.toLowerCase()}>: value ${value} is invalid.`,
|
|
11062
|
-
e
|
|
11063
|
-
);
|
|
11064
|
-
}
|
|
11052
|
+
const n = NumberOf(duration);
|
|
11053
|
+
return [n, n];
|
|
11065
11054
|
}
|
|
11066
|
-
needRemove && el.removeAttribute(key);
|
|
11067
11055
|
}
|
|
11068
|
-
|
|
11069
|
-
|
|
11070
|
-
|
|
11056
|
+
function NumberOf(val) {
|
|
11057
|
+
const res = toNumber(val);
|
|
11058
|
+
{
|
|
11059
|
+
assertNumber(res, "<transition> explicit duration");
|
|
11060
|
+
}
|
|
11061
|
+
return res;
|
|
11071
11062
|
}
|
|
11072
|
-
function
|
|
11073
|
-
|
|
11063
|
+
function addTransitionClass(el, cls) {
|
|
11064
|
+
cls.split(/\s+/).forEach((c) => c && el.classList.add(c));
|
|
11065
|
+
(el[vtcKey] || (el[vtcKey] = /* @__PURE__ */ new Set())).add(cls);
|
|
11074
11066
|
}
|
|
11075
|
-
function
|
|
11076
|
-
|
|
11077
|
-
const
|
|
11078
|
-
if (
|
|
11079
|
-
|
|
11080
|
-
|
|
11081
|
-
|
|
11082
|
-
if (nextValue) {
|
|
11083
|
-
const invoker = invokers[rawName] = createInvoker(nextValue, instance);
|
|
11084
|
-
addEventListener(el, name, invoker, options);
|
|
11085
|
-
} else if (existingInvoker) {
|
|
11086
|
-
removeEventListener(el, name, existingInvoker, options);
|
|
11087
|
-
invokers[rawName] = void 0;
|
|
11067
|
+
function removeTransitionClass(el, cls) {
|
|
11068
|
+
cls.split(/\s+/).forEach((c) => c && el.classList.remove(c));
|
|
11069
|
+
const _vtc = el[vtcKey];
|
|
11070
|
+
if (_vtc) {
|
|
11071
|
+
_vtc.delete(cls);
|
|
11072
|
+
if (!_vtc.size) {
|
|
11073
|
+
el[vtcKey] = void 0;
|
|
11088
11074
|
}
|
|
11089
11075
|
}
|
|
11090
11076
|
}
|
|
11091
|
-
|
|
11092
|
-
|
|
11093
|
-
|
|
11094
|
-
|
|
11095
|
-
options = {};
|
|
11096
|
-
let m;
|
|
11097
|
-
while (m = name.match(optionsModifierRE)) {
|
|
11098
|
-
name = name.slice(0, name.length - m[0].length);
|
|
11099
|
-
options[m[0].toLowerCase()] = true;
|
|
11100
|
-
}
|
|
11101
|
-
}
|
|
11102
|
-
const event = name[2] === ":" ? name.slice(3) : hyphenate(name.slice(2));
|
|
11103
|
-
return [event, options];
|
|
11077
|
+
function nextFrame(cb) {
|
|
11078
|
+
requestAnimationFrame(() => {
|
|
11079
|
+
requestAnimationFrame(cb);
|
|
11080
|
+
});
|
|
11104
11081
|
}
|
|
11105
|
-
let
|
|
11106
|
-
|
|
11107
|
-
const
|
|
11108
|
-
|
|
11109
|
-
|
|
11110
|
-
|
|
11111
|
-
e._vts = Date.now();
|
|
11112
|
-
} else if (e._vts <= invoker.attached) {
|
|
11113
|
-
return;
|
|
11082
|
+
let endId = 0;
|
|
11083
|
+
function whenTransitionEnds(el, expectedType, explicitTimeout, resolve) {
|
|
11084
|
+
const id = el._endId = ++endId;
|
|
11085
|
+
const resolveIfNotStale = () => {
|
|
11086
|
+
if (id === el._endId) {
|
|
11087
|
+
resolve();
|
|
11114
11088
|
}
|
|
11115
|
-
callWithAsyncErrorHandling(
|
|
11116
|
-
patchStopImmediatePropagation(e, invoker.value),
|
|
11117
|
-
instance,
|
|
11118
|
-
5,
|
|
11119
|
-
[e]
|
|
11120
|
-
);
|
|
11121
11089
|
};
|
|
11122
|
-
|
|
11123
|
-
|
|
11124
|
-
return invoker;
|
|
11125
|
-
}
|
|
11126
|
-
function patchStopImmediatePropagation(e, value) {
|
|
11127
|
-
if (isArray(value)) {
|
|
11128
|
-
const originalStop = e.stopImmediatePropagation;
|
|
11129
|
-
e.stopImmediatePropagation = () => {
|
|
11130
|
-
originalStop.call(e);
|
|
11131
|
-
e._stopped = true;
|
|
11132
|
-
};
|
|
11133
|
-
return value.map((fn) => (e2) => !e2._stopped && fn && fn(e2));
|
|
11134
|
-
} else {
|
|
11135
|
-
return value;
|
|
11090
|
+
if (explicitTimeout) {
|
|
11091
|
+
return setTimeout(resolveIfNotStale, explicitTimeout);
|
|
11136
11092
|
}
|
|
11137
|
-
}
|
|
11138
|
-
|
|
11139
|
-
|
|
11140
|
-
|
|
11141
|
-
|
|
11142
|
-
|
|
11143
|
-
|
|
11144
|
-
|
|
11145
|
-
|
|
11146
|
-
|
|
11147
|
-
|
|
11093
|
+
const { type, timeout, propCount } = getTransitionInfo(el, expectedType);
|
|
11094
|
+
if (!type) {
|
|
11095
|
+
return resolve();
|
|
11096
|
+
}
|
|
11097
|
+
const endEvent = type + "end";
|
|
11098
|
+
let ended = 0;
|
|
11099
|
+
const end = () => {
|
|
11100
|
+
el.removeEventListener(endEvent, onEnd);
|
|
11101
|
+
resolveIfNotStale();
|
|
11102
|
+
};
|
|
11103
|
+
const onEnd = (e) => {
|
|
11104
|
+
if (e.target === el && ++ended >= propCount) {
|
|
11105
|
+
end();
|
|
11148
11106
|
}
|
|
11149
|
-
}
|
|
11150
|
-
|
|
11151
|
-
|
|
11152
|
-
|
|
11153
|
-
nextValue,
|
|
11154
|
-
prevChildren,
|
|
11155
|
-
parentComponent,
|
|
11156
|
-
parentSuspense,
|
|
11157
|
-
unmountChildren
|
|
11158
|
-
);
|
|
11159
|
-
} else {
|
|
11160
|
-
if (key === "true-value") {
|
|
11161
|
-
el._trueValue = nextValue;
|
|
11162
|
-
} else if (key === "false-value") {
|
|
11163
|
-
el._falseValue = nextValue;
|
|
11107
|
+
};
|
|
11108
|
+
setTimeout(() => {
|
|
11109
|
+
if (ended < propCount) {
|
|
11110
|
+
end();
|
|
11164
11111
|
}
|
|
11165
|
-
|
|
11166
|
-
|
|
11167
|
-
}
|
|
11168
|
-
function
|
|
11169
|
-
|
|
11170
|
-
|
|
11171
|
-
|
|
11112
|
+
}, timeout + 1);
|
|
11113
|
+
el.addEventListener(endEvent, onEnd);
|
|
11114
|
+
}
|
|
11115
|
+
function getTransitionInfo(el, expectedType) {
|
|
11116
|
+
const styles = window.getComputedStyle(el);
|
|
11117
|
+
const getStyleProperties = (key) => (styles[key] || "").split(", ");
|
|
11118
|
+
const transitionDelays = getStyleProperties(`${TRANSITION$1}Delay`);
|
|
11119
|
+
const transitionDurations = getStyleProperties(`${TRANSITION$1}Duration`);
|
|
11120
|
+
const transitionTimeout = getTimeout(transitionDelays, transitionDurations);
|
|
11121
|
+
const animationDelays = getStyleProperties(`${ANIMATION}Delay`);
|
|
11122
|
+
const animationDurations = getStyleProperties(`${ANIMATION}Duration`);
|
|
11123
|
+
const animationTimeout = getTimeout(animationDelays, animationDurations);
|
|
11124
|
+
let type = null;
|
|
11125
|
+
let timeout = 0;
|
|
11126
|
+
let propCount = 0;
|
|
11127
|
+
if (expectedType === TRANSITION$1) {
|
|
11128
|
+
if (transitionTimeout > 0) {
|
|
11129
|
+
type = TRANSITION$1;
|
|
11130
|
+
timeout = transitionTimeout;
|
|
11131
|
+
propCount = transitionDurations.length;
|
|
11172
11132
|
}
|
|
11173
|
-
|
|
11174
|
-
|
|
11133
|
+
} else if (expectedType === ANIMATION) {
|
|
11134
|
+
if (animationTimeout > 0) {
|
|
11135
|
+
type = ANIMATION;
|
|
11136
|
+
timeout = animationTimeout;
|
|
11137
|
+
propCount = animationDurations.length;
|
|
11175
11138
|
}
|
|
11176
|
-
|
|
11177
|
-
|
|
11178
|
-
|
|
11179
|
-
|
|
11139
|
+
} else {
|
|
11140
|
+
timeout = Math.max(transitionTimeout, animationTimeout);
|
|
11141
|
+
type = timeout > 0 ? transitionTimeout > animationTimeout ? TRANSITION$1 : ANIMATION : null;
|
|
11142
|
+
propCount = type ? type === TRANSITION$1 ? transitionDurations.length : animationDurations.length : 0;
|
|
11180
11143
|
}
|
|
11181
|
-
|
|
11182
|
-
|
|
11144
|
+
const hasTransform = type === TRANSITION$1 && /\b(transform|all)(,|$)/.test(
|
|
11145
|
+
getStyleProperties(`${TRANSITION$1}Property`).toString()
|
|
11146
|
+
);
|
|
11147
|
+
return {
|
|
11148
|
+
type,
|
|
11149
|
+
timeout,
|
|
11150
|
+
propCount,
|
|
11151
|
+
hasTransform
|
|
11152
|
+
};
|
|
11153
|
+
}
|
|
11154
|
+
function getTimeout(delays, durations) {
|
|
11155
|
+
while (delays.length < durations.length) {
|
|
11156
|
+
delays = delays.concat(delays);
|
|
11183
11157
|
}
|
|
11184
|
-
|
|
11185
|
-
|
|
11158
|
+
return Math.max(...durations.map((d, i) => toMs(d) + toMs(delays[i])));
|
|
11159
|
+
}
|
|
11160
|
+
function toMs(s) {
|
|
11161
|
+
if (s === "auto")
|
|
11162
|
+
return 0;
|
|
11163
|
+
return Number(s.slice(0, -1).replace(",", ".")) * 1e3;
|
|
11164
|
+
}
|
|
11165
|
+
function forceReflow() {
|
|
11166
|
+
return document.body.offsetHeight;
|
|
11167
|
+
}
|
|
11168
|
+
|
|
11169
|
+
function patchClass(el, value, isSVG) {
|
|
11170
|
+
const transitionClasses = el[vtcKey];
|
|
11171
|
+
if (transitionClasses) {
|
|
11172
|
+
value = (value ? [value, ...transitionClasses] : [...transitionClasses]).join(" ");
|
|
11186
11173
|
}
|
|
11187
|
-
if (
|
|
11188
|
-
|
|
11174
|
+
if (value == null) {
|
|
11175
|
+
el.removeAttribute("class");
|
|
11176
|
+
} else if (isSVG) {
|
|
11177
|
+
el.setAttribute("class", value);
|
|
11178
|
+
} else {
|
|
11179
|
+
el.className = value;
|
|
11189
11180
|
}
|
|
11190
|
-
|
|
11191
|
-
|
|
11181
|
+
}
|
|
11182
|
+
|
|
11183
|
+
const vShowOldKey = Symbol("_vod");
|
|
11184
|
+
const vShow = {
|
|
11185
|
+
beforeMount(el, { value }, { transition }) {
|
|
11186
|
+
el[vShowOldKey] = el.style.display === "none" ? "" : el.style.display;
|
|
11187
|
+
if (transition && value) {
|
|
11188
|
+
transition.beforeEnter(el);
|
|
11189
|
+
} else {
|
|
11190
|
+
setDisplay(el, value);
|
|
11191
|
+
}
|
|
11192
|
+
},
|
|
11193
|
+
mounted(el, { value }, { transition }) {
|
|
11194
|
+
if (transition && value) {
|
|
11195
|
+
transition.enter(el);
|
|
11196
|
+
}
|
|
11197
|
+
},
|
|
11198
|
+
updated(el, { value, oldValue }, { transition }) {
|
|
11199
|
+
if (!value === !oldValue)
|
|
11200
|
+
return;
|
|
11201
|
+
if (transition) {
|
|
11202
|
+
if (value) {
|
|
11203
|
+
transition.beforeEnter(el);
|
|
11204
|
+
setDisplay(el, true);
|
|
11205
|
+
transition.enter(el);
|
|
11206
|
+
} else {
|
|
11207
|
+
transition.leave(el, () => {
|
|
11208
|
+
setDisplay(el, false);
|
|
11209
|
+
});
|
|
11210
|
+
}
|
|
11211
|
+
} else {
|
|
11212
|
+
setDisplay(el, value);
|
|
11213
|
+
}
|
|
11214
|
+
},
|
|
11215
|
+
beforeUnmount(el, { value }) {
|
|
11216
|
+
setDisplay(el, value);
|
|
11192
11217
|
}
|
|
11193
|
-
|
|
11218
|
+
};
|
|
11219
|
+
function setDisplay(el, value) {
|
|
11220
|
+
el.style.display = value ? el[vShowOldKey] : "none";
|
|
11194
11221
|
}
|
|
11195
11222
|
|
|
11196
|
-
function
|
|
11197
|
-
const
|
|
11198
|
-
|
|
11199
|
-
|
|
11200
|
-
|
|
11223
|
+
function patchStyle(el, prev, next) {
|
|
11224
|
+
const style = el.style;
|
|
11225
|
+
const isCssString = isString(next);
|
|
11226
|
+
if (next && !isCssString) {
|
|
11227
|
+
if (prev && !isString(prev)) {
|
|
11228
|
+
for (const key in prev) {
|
|
11229
|
+
if (next[key] == null) {
|
|
11230
|
+
setStyle(style, key, "");
|
|
11231
|
+
}
|
|
11232
|
+
}
|
|
11233
|
+
}
|
|
11234
|
+
for (const key in next) {
|
|
11235
|
+
setStyle(style, key, next[key]);
|
|
11236
|
+
}
|
|
11237
|
+
} else {
|
|
11238
|
+
const currentDisplay = style.display;
|
|
11239
|
+
if (isCssString) {
|
|
11240
|
+
if (prev !== next) {
|
|
11241
|
+
style.cssText = next;
|
|
11242
|
+
}
|
|
11243
|
+
} else if (prev) {
|
|
11244
|
+
el.removeAttribute("style");
|
|
11245
|
+
}
|
|
11246
|
+
if (vShowOldKey in el) {
|
|
11247
|
+
style.display = currentDisplay;
|
|
11201
11248
|
}
|
|
11202
11249
|
}
|
|
11203
|
-
VueCustomElement.def = Comp;
|
|
11204
|
-
return VueCustomElement;
|
|
11205
11250
|
}
|
|
11206
|
-
const
|
|
11207
|
-
|
|
11208
|
-
|
|
11209
|
-
|
|
11210
|
-
|
|
11211
|
-
|
|
11212
|
-
|
|
11213
|
-
|
|
11214
|
-
|
|
11215
|
-
|
|
11216
|
-
/**
|
|
11217
|
-
* @internal
|
|
11218
|
-
*/
|
|
11219
|
-
this._instance = null;
|
|
11220
|
-
this._connected = false;
|
|
11221
|
-
this._resolved = false;
|
|
11222
|
-
this._numberProps = null;
|
|
11223
|
-
if (this.shadowRoot && hydrate2) {
|
|
11224
|
-
hydrate2(this._createVNode(), this.shadowRoot);
|
|
11225
|
-
} else {
|
|
11226
|
-
if (this.shadowRoot) {
|
|
11251
|
+
const semicolonRE = /[^\\];\s*$/;
|
|
11252
|
+
const importantRE = /\s*!important$/;
|
|
11253
|
+
function setStyle(style, name, val) {
|
|
11254
|
+
if (isArray(val)) {
|
|
11255
|
+
val.forEach((v) => setStyle(style, name, v));
|
|
11256
|
+
} else {
|
|
11257
|
+
if (val == null)
|
|
11258
|
+
val = "";
|
|
11259
|
+
{
|
|
11260
|
+
if (semicolonRE.test(val)) {
|
|
11227
11261
|
warn(
|
|
11228
|
-
`
|
|
11262
|
+
`Unexpected semicolon at the end of '${name}' style value: '${val}'`
|
|
11229
11263
|
);
|
|
11230
11264
|
}
|
|
11231
|
-
this.attachShadow({ mode: "open" });
|
|
11232
|
-
if (!this._def.__asyncLoader) {
|
|
11233
|
-
this._resolveProps(this._def);
|
|
11234
|
-
}
|
|
11235
11265
|
}
|
|
11236
|
-
|
|
11237
|
-
|
|
11238
|
-
|
|
11239
|
-
|
|
11240
|
-
if (
|
|
11241
|
-
|
|
11266
|
+
if (name.startsWith("--")) {
|
|
11267
|
+
style.setProperty(name, val);
|
|
11268
|
+
} else {
|
|
11269
|
+
const prefixed = autoPrefix(style, name);
|
|
11270
|
+
if (importantRE.test(val)) {
|
|
11271
|
+
style.setProperty(
|
|
11272
|
+
hyphenate(prefixed),
|
|
11273
|
+
val.replace(importantRE, ""),
|
|
11274
|
+
"important"
|
|
11275
|
+
);
|
|
11242
11276
|
} else {
|
|
11243
|
-
|
|
11277
|
+
style[prefixed] = val;
|
|
11244
11278
|
}
|
|
11245
11279
|
}
|
|
11246
11280
|
}
|
|
11247
|
-
|
|
11248
|
-
|
|
11249
|
-
|
|
11250
|
-
|
|
11251
|
-
|
|
11252
|
-
|
|
11253
|
-
|
|
11254
|
-
});
|
|
11281
|
+
}
|
|
11282
|
+
const prefixes = ["Webkit", "Moz", "ms"];
|
|
11283
|
+
const prefixCache = {};
|
|
11284
|
+
function autoPrefix(style, rawName) {
|
|
11285
|
+
const cached = prefixCache[rawName];
|
|
11286
|
+
if (cached) {
|
|
11287
|
+
return cached;
|
|
11255
11288
|
}
|
|
11256
|
-
|
|
11257
|
-
|
|
11258
|
-
|
|
11259
|
-
|
|
11260
|
-
|
|
11261
|
-
|
|
11262
|
-
|
|
11289
|
+
let name = camelize(rawName);
|
|
11290
|
+
if (name !== "filter" && name in style) {
|
|
11291
|
+
return prefixCache[rawName] = name;
|
|
11292
|
+
}
|
|
11293
|
+
name = capitalize(name);
|
|
11294
|
+
for (let i = 0; i < prefixes.length; i++) {
|
|
11295
|
+
const prefixed = prefixes[i] + name;
|
|
11296
|
+
if (prefixed in style) {
|
|
11297
|
+
return prefixCache[rawName] = prefixed;
|
|
11263
11298
|
}
|
|
11264
|
-
|
|
11265
|
-
|
|
11266
|
-
|
|
11267
|
-
|
|
11268
|
-
|
|
11269
|
-
|
|
11270
|
-
|
|
11271
|
-
|
|
11272
|
-
|
|
11273
|
-
for (const key in props) {
|
|
11274
|
-
const opt = props[key];
|
|
11275
|
-
if (opt === Number || opt && opt.type === Number) {
|
|
11276
|
-
if (key in this._props) {
|
|
11277
|
-
this._props[key] = toNumber(this._props[key]);
|
|
11278
|
-
}
|
|
11279
|
-
(numberProps || (numberProps = /* @__PURE__ */ Object.create(null)))[camelize(key)] = true;
|
|
11280
|
-
}
|
|
11281
|
-
}
|
|
11282
|
-
}
|
|
11283
|
-
this._numberProps = numberProps;
|
|
11284
|
-
if (isAsync) {
|
|
11285
|
-
this._resolveProps(def);
|
|
11286
|
-
}
|
|
11287
|
-
this._applyStyles(styles);
|
|
11288
|
-
this._update();
|
|
11289
|
-
};
|
|
11290
|
-
const asyncDef = this._def.__asyncLoader;
|
|
11291
|
-
if (asyncDef) {
|
|
11292
|
-
asyncDef().then((def) => resolve(def, true));
|
|
11299
|
+
}
|
|
11300
|
+
return rawName;
|
|
11301
|
+
}
|
|
11302
|
+
|
|
11303
|
+
const xlinkNS = "http://www.w3.org/1999/xlink";
|
|
11304
|
+
function patchAttr(el, key, value, isSVG, instance) {
|
|
11305
|
+
if (isSVG && key.startsWith("xlink:")) {
|
|
11306
|
+
if (value == null) {
|
|
11307
|
+
el.removeAttributeNS(xlinkNS, key.slice(6, key.length));
|
|
11293
11308
|
} else {
|
|
11294
|
-
|
|
11309
|
+
el.setAttributeNS(xlinkNS, key, value);
|
|
11295
11310
|
}
|
|
11296
|
-
}
|
|
11297
|
-
|
|
11298
|
-
|
|
11299
|
-
const declaredPropKeys = isArray(props) ? props : Object.keys(props || {});
|
|
11300
|
-
for (const key of Object.keys(this)) {
|
|
11301
|
-
if (key[0] !== "_" && declaredPropKeys.includes(key)) {
|
|
11302
|
-
this._setProp(key, this[key], true, false);
|
|
11303
|
-
}
|
|
11311
|
+
} else {
|
|
11312
|
+
if (compatCoerceAttr(el, key, value, instance)) {
|
|
11313
|
+
return;
|
|
11304
11314
|
}
|
|
11305
|
-
|
|
11306
|
-
|
|
11307
|
-
|
|
11308
|
-
|
|
11309
|
-
|
|
11310
|
-
set(val) {
|
|
11311
|
-
this._setProp(key, val);
|
|
11312
|
-
}
|
|
11313
|
-
});
|
|
11315
|
+
const isBoolean = isSpecialBooleanAttr(key);
|
|
11316
|
+
if (value == null || isBoolean && !includeBooleanAttr(value)) {
|
|
11317
|
+
el.removeAttribute(key);
|
|
11318
|
+
} else {
|
|
11319
|
+
el.setAttribute(key, isBoolean ? "" : value);
|
|
11314
11320
|
}
|
|
11315
11321
|
}
|
|
11316
|
-
|
|
11317
|
-
|
|
11318
|
-
|
|
11319
|
-
|
|
11320
|
-
|
|
11322
|
+
}
|
|
11323
|
+
const isEnumeratedAttr = /* @__PURE__ */ makeMap("contenteditable,draggable,spellcheck") ;
|
|
11324
|
+
function compatCoerceAttr(el, key, value, instance = null) {
|
|
11325
|
+
if (isEnumeratedAttr(key)) {
|
|
11326
|
+
const v2CoercedValue = value === null ? "false" : typeof value !== "boolean" && value !== void 0 ? "true" : null;
|
|
11327
|
+
if (v2CoercedValue && compatUtils.softAssertCompatEnabled(
|
|
11328
|
+
"ATTR_ENUMERATED_COERCION",
|
|
11329
|
+
instance,
|
|
11330
|
+
key,
|
|
11331
|
+
value,
|
|
11332
|
+
v2CoercedValue
|
|
11333
|
+
)) {
|
|
11334
|
+
el.setAttribute(key, v2CoercedValue);
|
|
11335
|
+
return true;
|
|
11321
11336
|
}
|
|
11322
|
-
|
|
11323
|
-
|
|
11324
|
-
|
|
11325
|
-
|
|
11326
|
-
|
|
11327
|
-
|
|
11328
|
-
return
|
|
11337
|
+
} else if (value === false && !isSpecialBooleanAttr(key) && compatUtils.softAssertCompatEnabled(
|
|
11338
|
+
"ATTR_FALSE_VALUE",
|
|
11339
|
+
instance,
|
|
11340
|
+
key
|
|
11341
|
+
)) {
|
|
11342
|
+
el.removeAttribute(key);
|
|
11343
|
+
return true;
|
|
11329
11344
|
}
|
|
11330
|
-
|
|
11331
|
-
|
|
11332
|
-
|
|
11333
|
-
|
|
11334
|
-
|
|
11335
|
-
|
|
11336
|
-
|
|
11337
|
-
this._update();
|
|
11338
|
-
}
|
|
11339
|
-
if (shouldReflect) {
|
|
11340
|
-
if (val === true) {
|
|
11341
|
-
this.setAttribute(hyphenate(key), "");
|
|
11342
|
-
} else if (typeof val === "string" || typeof val === "number") {
|
|
11343
|
-
this.setAttribute(hyphenate(key), val + "");
|
|
11344
|
-
} else if (!val) {
|
|
11345
|
-
this.removeAttribute(hyphenate(key));
|
|
11346
|
-
}
|
|
11347
|
-
}
|
|
11345
|
+
return false;
|
|
11346
|
+
}
|
|
11347
|
+
|
|
11348
|
+
function patchDOMProp(el, key, value, prevChildren, parentComponent, parentSuspense, unmountChildren) {
|
|
11349
|
+
if (key === "innerHTML" || key === "textContent") {
|
|
11350
|
+
if (prevChildren) {
|
|
11351
|
+
unmountChildren(prevChildren, parentComponent, parentSuspense);
|
|
11348
11352
|
}
|
|
11353
|
+
el[key] = value == null ? "" : value;
|
|
11354
|
+
return;
|
|
11349
11355
|
}
|
|
11350
|
-
|
|
11351
|
-
|
|
11356
|
+
const tag = el.tagName;
|
|
11357
|
+
if (key === "value" && tag !== "PROGRESS" && // custom elements may use _value internally
|
|
11358
|
+
!tag.includes("-")) {
|
|
11359
|
+
el._value = value;
|
|
11360
|
+
const oldValue = tag === "OPTION" ? el.getAttribute("value") : el.value;
|
|
11361
|
+
const newValue = value == null ? "" : value;
|
|
11362
|
+
if (oldValue !== newValue) {
|
|
11363
|
+
el.value = newValue;
|
|
11364
|
+
}
|
|
11365
|
+
if (value == null) {
|
|
11366
|
+
el.removeAttribute(key);
|
|
11367
|
+
}
|
|
11368
|
+
return;
|
|
11352
11369
|
}
|
|
11353
|
-
|
|
11354
|
-
|
|
11355
|
-
|
|
11356
|
-
|
|
11357
|
-
|
|
11358
|
-
|
|
11359
|
-
|
|
11360
|
-
|
|
11361
|
-
|
|
11362
|
-
|
|
11363
|
-
|
|
11364
|
-
|
|
11365
|
-
|
|
11366
|
-
|
|
11367
|
-
|
|
11368
|
-
|
|
11369
|
-
|
|
11370
|
-
|
|
11371
|
-
|
|
11372
|
-
|
|
11373
|
-
|
|
11374
|
-
|
|
11375
|
-
|
|
11376
|
-
|
|
11377
|
-
|
|
11378
|
-
|
|
11379
|
-
|
|
11380
|
-
dispatch(hyphenate(event), args);
|
|
11381
|
-
}
|
|
11382
|
-
};
|
|
11383
|
-
let parent = this;
|
|
11384
|
-
while (parent = parent && (parent.parentNode || parent.host)) {
|
|
11385
|
-
if (parent instanceof VueElement) {
|
|
11386
|
-
instance.parent = parent._instance;
|
|
11387
|
-
instance.provides = parent._instance.provides;
|
|
11388
|
-
break;
|
|
11389
|
-
}
|
|
11390
|
-
}
|
|
11391
|
-
};
|
|
11370
|
+
let needRemove = false;
|
|
11371
|
+
if (value === "" || value == null) {
|
|
11372
|
+
const type = typeof el[key];
|
|
11373
|
+
if (type === "boolean") {
|
|
11374
|
+
value = includeBooleanAttr(value);
|
|
11375
|
+
} else if (value == null && type === "string") {
|
|
11376
|
+
value = "";
|
|
11377
|
+
needRemove = true;
|
|
11378
|
+
} else if (type === "number") {
|
|
11379
|
+
value = 0;
|
|
11380
|
+
needRemove = true;
|
|
11381
|
+
}
|
|
11382
|
+
} else {
|
|
11383
|
+
if (value === false && compatUtils.isCompatEnabled(
|
|
11384
|
+
"ATTR_FALSE_VALUE",
|
|
11385
|
+
parentComponent
|
|
11386
|
+
)) {
|
|
11387
|
+
const type = typeof el[key];
|
|
11388
|
+
if (type === "string" || type === "number") {
|
|
11389
|
+
compatUtils.warnDeprecation(
|
|
11390
|
+
"ATTR_FALSE_VALUE",
|
|
11391
|
+
parentComponent,
|
|
11392
|
+
key
|
|
11393
|
+
);
|
|
11394
|
+
value = type === "number" ? 0 : "";
|
|
11395
|
+
needRemove = true;
|
|
11396
|
+
}
|
|
11392
11397
|
}
|
|
11393
|
-
return vnode;
|
|
11394
11398
|
}
|
|
11395
|
-
|
|
11396
|
-
|
|
11397
|
-
|
|
11398
|
-
|
|
11399
|
-
|
|
11400
|
-
|
|
11401
|
-
|
|
11402
|
-
|
|
11403
|
-
}
|
|
11404
|
-
});
|
|
11399
|
+
try {
|
|
11400
|
+
el[key] = value;
|
|
11401
|
+
} catch (e) {
|
|
11402
|
+
if (!needRemove) {
|
|
11403
|
+
warn(
|
|
11404
|
+
`Failed setting prop "${key}" on <${tag.toLowerCase()}>: value ${value} is invalid.`,
|
|
11405
|
+
e
|
|
11406
|
+
);
|
|
11405
11407
|
}
|
|
11406
11408
|
}
|
|
11409
|
+
needRemove && el.removeAttribute(key);
|
|
11407
11410
|
}
|
|
11408
11411
|
|
|
11409
|
-
function
|
|
11410
|
-
|
|
11411
|
-
|
|
11412
|
-
|
|
11413
|
-
|
|
11414
|
-
|
|
11412
|
+
function addEventListener(el, event, handler, options) {
|
|
11413
|
+
el.addEventListener(event, handler, options);
|
|
11414
|
+
}
|
|
11415
|
+
function removeEventListener(el, event, handler, options) {
|
|
11416
|
+
el.removeEventListener(event, handler, options);
|
|
11417
|
+
}
|
|
11418
|
+
const veiKey = Symbol("_vei");
|
|
11419
|
+
function patchEvent(el, rawName, prevValue, nextValue, instance = null) {
|
|
11420
|
+
const invokers = el[veiKey] || (el[veiKey] = {});
|
|
11421
|
+
const existingInvoker = invokers[rawName];
|
|
11422
|
+
if (nextValue && existingInvoker) {
|
|
11423
|
+
existingInvoker.value = nextValue;
|
|
11424
|
+
} else {
|
|
11425
|
+
const [name, options] = parseName(rawName);
|
|
11426
|
+
if (nextValue) {
|
|
11427
|
+
const invoker = invokers[rawName] = createInvoker(nextValue, instance);
|
|
11428
|
+
addEventListener(el, name, invoker, options);
|
|
11429
|
+
} else if (existingInvoker) {
|
|
11430
|
+
removeEventListener(el, name, existingInvoker, options);
|
|
11431
|
+
invokers[rawName] = void 0;
|
|
11415
11432
|
}
|
|
11416
|
-
|
|
11417
|
-
|
|
11418
|
-
|
|
11419
|
-
|
|
11433
|
+
}
|
|
11434
|
+
}
|
|
11435
|
+
const optionsModifierRE = /(?:Once|Passive|Capture)$/;
|
|
11436
|
+
function parseName(name) {
|
|
11437
|
+
let options;
|
|
11438
|
+
if (optionsModifierRE.test(name)) {
|
|
11439
|
+
options = {};
|
|
11440
|
+
let m;
|
|
11441
|
+
while (m = name.match(optionsModifierRE)) {
|
|
11442
|
+
name = name.slice(0, name.length - m[0].length);
|
|
11443
|
+
options[m[0].toLowerCase()] = true;
|
|
11420
11444
|
}
|
|
11421
|
-
|
|
11422
|
-
|
|
11423
|
-
|
|
11424
|
-
|
|
11445
|
+
}
|
|
11446
|
+
const event = name[2] === ":" ? name.slice(3) : hyphenate(name.slice(2));
|
|
11447
|
+
return [event, options];
|
|
11448
|
+
}
|
|
11449
|
+
let cachedNow = 0;
|
|
11450
|
+
const p = /* @__PURE__ */ Promise.resolve();
|
|
11451
|
+
const getNow = () => cachedNow || (p.then(() => cachedNow = 0), cachedNow = Date.now());
|
|
11452
|
+
function createInvoker(initialValue, instance) {
|
|
11453
|
+
const invoker = (e) => {
|
|
11454
|
+
if (!e._vts) {
|
|
11455
|
+
e._vts = Date.now();
|
|
11456
|
+
} else if (e._vts <= invoker.attached) {
|
|
11457
|
+
return;
|
|
11425
11458
|
}
|
|
11426
|
-
|
|
11459
|
+
callWithAsyncErrorHandling(
|
|
11460
|
+
patchStopImmediatePropagation(e, invoker.value),
|
|
11461
|
+
instance,
|
|
11462
|
+
5,
|
|
11463
|
+
[e]
|
|
11464
|
+
);
|
|
11465
|
+
};
|
|
11466
|
+
invoker.value = initialValue;
|
|
11467
|
+
invoker.attached = getNow();
|
|
11468
|
+
return invoker;
|
|
11469
|
+
}
|
|
11470
|
+
function patchStopImmediatePropagation(e, value) {
|
|
11471
|
+
if (isArray(value)) {
|
|
11472
|
+
const originalStop = e.stopImmediatePropagation;
|
|
11473
|
+
e.stopImmediatePropagation = () => {
|
|
11474
|
+
originalStop.call(e);
|
|
11475
|
+
e._stopped = true;
|
|
11476
|
+
};
|
|
11477
|
+
return value.map((fn) => (e2) => !e2._stopped && fn && fn(e2));
|
|
11478
|
+
} else {
|
|
11479
|
+
return value;
|
|
11427
11480
|
}
|
|
11428
11481
|
}
|
|
11429
11482
|
|
|
11430
|
-
|
|
11431
|
-
|
|
11432
|
-
if (
|
|
11433
|
-
|
|
11434
|
-
|
|
11483
|
+
const nativeOnRE = /^on[a-z]/;
|
|
11484
|
+
const patchProp = (el, key, prevValue, nextValue, isSVG = false, prevChildren, parentComponent, parentSuspense, unmountChildren) => {
|
|
11485
|
+
if (key === "class") {
|
|
11486
|
+
patchClass(el, nextValue, isSVG);
|
|
11487
|
+
} else if (key === "style") {
|
|
11488
|
+
patchStyle(el, prevValue, nextValue);
|
|
11489
|
+
} else if (isOn(key)) {
|
|
11490
|
+
if (!isModelListener(key)) {
|
|
11491
|
+
patchEvent(el, key, prevValue, nextValue, parentComponent);
|
|
11492
|
+
}
|
|
11493
|
+
} else if (key[0] === "." ? (key = key.slice(1), true) : key[0] === "^" ? (key = key.slice(1), false) : shouldSetAsProp(el, key, nextValue, isSVG)) {
|
|
11494
|
+
patchDOMProp(
|
|
11495
|
+
el,
|
|
11496
|
+
key,
|
|
11497
|
+
nextValue,
|
|
11498
|
+
prevChildren,
|
|
11499
|
+
parentComponent,
|
|
11500
|
+
parentSuspense,
|
|
11501
|
+
unmountChildren
|
|
11502
|
+
);
|
|
11503
|
+
} else {
|
|
11504
|
+
if (key === "true-value") {
|
|
11505
|
+
el._trueValue = nextValue;
|
|
11506
|
+
} else if (key === "false-value") {
|
|
11507
|
+
el._falseValue = nextValue;
|
|
11508
|
+
}
|
|
11509
|
+
patchAttr(el, key, nextValue, isSVG, parentComponent);
|
|
11435
11510
|
}
|
|
11436
|
-
|
|
11437
|
-
|
|
11438
|
-
|
|
11439
|
-
|
|
11440
|
-
|
|
11441
|
-
const setVars = () => {
|
|
11442
|
-
const vars = getter(instance.proxy);
|
|
11443
|
-
setVarsOnVNode(instance.subTree, vars);
|
|
11444
|
-
updateTeleports(vars);
|
|
11445
|
-
};
|
|
11446
|
-
watchPostEffect(setVars);
|
|
11447
|
-
onMounted(() => {
|
|
11448
|
-
const ob = new MutationObserver(setVars);
|
|
11449
|
-
ob.observe(instance.subTree.el.parentNode, { childList: true });
|
|
11450
|
-
onUnmounted(() => ob.disconnect());
|
|
11451
|
-
});
|
|
11452
|
-
}
|
|
11453
|
-
function setVarsOnVNode(vnode, vars) {
|
|
11454
|
-
if (vnode.shapeFlag & 128) {
|
|
11455
|
-
const suspense = vnode.suspense;
|
|
11456
|
-
vnode = suspense.activeBranch;
|
|
11457
|
-
if (suspense.pendingBranch && !suspense.isHydrating) {
|
|
11458
|
-
suspense.effects.push(() => {
|
|
11459
|
-
setVarsOnVNode(suspense.activeBranch, vars);
|
|
11460
|
-
});
|
|
11511
|
+
};
|
|
11512
|
+
function shouldSetAsProp(el, key, value, isSVG) {
|
|
11513
|
+
if (isSVG) {
|
|
11514
|
+
if (key === "innerHTML" || key === "textContent") {
|
|
11515
|
+
return true;
|
|
11461
11516
|
}
|
|
11517
|
+
if (key in el && nativeOnRE.test(key) && isFunction(value)) {
|
|
11518
|
+
return true;
|
|
11519
|
+
}
|
|
11520
|
+
return false;
|
|
11462
11521
|
}
|
|
11463
|
-
|
|
11464
|
-
|
|
11522
|
+
if (key === "spellcheck" || key === "draggable" || key === "translate") {
|
|
11523
|
+
return false;
|
|
11465
11524
|
}
|
|
11466
|
-
if (
|
|
11467
|
-
|
|
11468
|
-
} else if (vnode.type === Fragment) {
|
|
11469
|
-
vnode.children.forEach((c) => setVarsOnVNode(c, vars));
|
|
11470
|
-
} else if (vnode.type === Static) {
|
|
11471
|
-
let { el, anchor } = vnode;
|
|
11472
|
-
while (el) {
|
|
11473
|
-
setVarsOnNode(el, vars);
|
|
11474
|
-
if (el === anchor)
|
|
11475
|
-
break;
|
|
11476
|
-
el = el.nextSibling;
|
|
11477
|
-
}
|
|
11525
|
+
if (key === "form") {
|
|
11526
|
+
return false;
|
|
11478
11527
|
}
|
|
11479
|
-
|
|
11480
|
-
|
|
11481
|
-
|
|
11482
|
-
|
|
11483
|
-
|
|
11484
|
-
style.setProperty(`--${key}`, vars[key]);
|
|
11485
|
-
}
|
|
11528
|
+
if (key === "list" && el.tagName === "INPUT") {
|
|
11529
|
+
return false;
|
|
11530
|
+
}
|
|
11531
|
+
if (key === "type" && el.tagName === "TEXTAREA") {
|
|
11532
|
+
return false;
|
|
11486
11533
|
}
|
|
11534
|
+
if (nativeOnRE.test(key) && isString(value)) {
|
|
11535
|
+
return false;
|
|
11536
|
+
}
|
|
11537
|
+
return key in el;
|
|
11487
11538
|
}
|
|
11488
11539
|
|
|
11489
|
-
|
|
11490
|
-
|
|
11491
|
-
|
|
11492
|
-
|
|
11493
|
-
{
|
|
11494
|
-
|
|
11495
|
-
|
|
11496
|
-
|
|
11497
|
-
name: String,
|
|
11498
|
-
type: String,
|
|
11499
|
-
css: {
|
|
11500
|
-
type: Boolean,
|
|
11501
|
-
default: true
|
|
11502
|
-
},
|
|
11503
|
-
duration: [String, Number, Object],
|
|
11504
|
-
enterFromClass: String,
|
|
11505
|
-
enterActiveClass: String,
|
|
11506
|
-
enterToClass: String,
|
|
11507
|
-
appearFromClass: String,
|
|
11508
|
-
appearActiveClass: String,
|
|
11509
|
-
appearToClass: String,
|
|
11510
|
-
leaveFromClass: String,
|
|
11511
|
-
leaveActiveClass: String,
|
|
11512
|
-
leaveToClass: String
|
|
11513
|
-
};
|
|
11514
|
-
const TransitionPropsValidators = Transition.props = /* @__PURE__ */ extend(
|
|
11515
|
-
{},
|
|
11516
|
-
BaseTransitionPropsValidators,
|
|
11517
|
-
DOMTransitionPropsValidators
|
|
11518
|
-
);
|
|
11519
|
-
const callHook = (hook, args = []) => {
|
|
11520
|
-
if (isArray(hook)) {
|
|
11521
|
-
hook.forEach((h2) => h2(...args));
|
|
11522
|
-
} else if (hook) {
|
|
11523
|
-
hook(...args);
|
|
11540
|
+
/*! #__NO_SIDE_EFFECTS__ */
|
|
11541
|
+
// @__NO_SIDE_EFFECTS__
|
|
11542
|
+
function defineCustomElement(options, hydrate2) {
|
|
11543
|
+
const Comp = defineComponent(options);
|
|
11544
|
+
class VueCustomElement extends VueElement {
|
|
11545
|
+
constructor(initialProps) {
|
|
11546
|
+
super(Comp, initialProps, hydrate2);
|
|
11547
|
+
}
|
|
11524
11548
|
}
|
|
11549
|
+
VueCustomElement.def = Comp;
|
|
11550
|
+
return VueCustomElement;
|
|
11551
|
+
}
|
|
11552
|
+
/*! #__NO_SIDE_EFFECTS__ */
|
|
11553
|
+
const defineSSRCustomElement = /* @__NO_SIDE_EFFECTS__ */ (options) => {
|
|
11554
|
+
return /* @__PURE__ */ defineCustomElement(options, hydrate);
|
|
11525
11555
|
};
|
|
11526
|
-
const
|
|
11527
|
-
return hook ? isArray(hook) ? hook.some((h2) => h2.length > 1) : hook.length > 1 : false;
|
|
11556
|
+
const BaseClass = typeof HTMLElement !== "undefined" ? HTMLElement : class {
|
|
11528
11557
|
};
|
|
11529
|
-
|
|
11530
|
-
|
|
11531
|
-
|
|
11532
|
-
|
|
11533
|
-
|
|
11558
|
+
class VueElement extends BaseClass {
|
|
11559
|
+
constructor(_def, _props = {}, hydrate2) {
|
|
11560
|
+
super();
|
|
11561
|
+
this._def = _def;
|
|
11562
|
+
this._props = _props;
|
|
11563
|
+
/**
|
|
11564
|
+
* @internal
|
|
11565
|
+
*/
|
|
11566
|
+
this._instance = null;
|
|
11567
|
+
this._connected = false;
|
|
11568
|
+
this._resolved = false;
|
|
11569
|
+
this._numberProps = null;
|
|
11570
|
+
this._ob = null;
|
|
11571
|
+
if (this.shadowRoot && hydrate2) {
|
|
11572
|
+
hydrate2(this._createVNode(), this.shadowRoot);
|
|
11573
|
+
} else {
|
|
11574
|
+
if (this.shadowRoot) {
|
|
11575
|
+
warn(
|
|
11576
|
+
`Custom element has pre-rendered declarative shadow root but is not defined as hydratable. Use \`defineSSRCustomElement\`.`
|
|
11577
|
+
);
|
|
11578
|
+
}
|
|
11579
|
+
this.attachShadow({ mode: "open" });
|
|
11580
|
+
if (!this._def.__asyncLoader) {
|
|
11581
|
+
this._resolveProps(this._def);
|
|
11582
|
+
}
|
|
11534
11583
|
}
|
|
11535
11584
|
}
|
|
11536
|
-
|
|
11537
|
-
|
|
11538
|
-
|
|
11539
|
-
|
|
11540
|
-
|
|
11541
|
-
|
|
11542
|
-
|
|
11543
|
-
|
|
11544
|
-
enterActiveClass = `${name}-enter-active`,
|
|
11545
|
-
enterToClass = `${name}-enter-to`,
|
|
11546
|
-
appearFromClass = enterFromClass,
|
|
11547
|
-
appearActiveClass = enterActiveClass,
|
|
11548
|
-
appearToClass = enterToClass,
|
|
11549
|
-
leaveFromClass = `${name}-leave-from`,
|
|
11550
|
-
leaveActiveClass = `${name}-leave-active`,
|
|
11551
|
-
leaveToClass = `${name}-leave-to`
|
|
11552
|
-
} = rawProps;
|
|
11553
|
-
const legacyClassEnabled = compatUtils.isCompatEnabled("TRANSITION_CLASSES", null);
|
|
11554
|
-
let legacyEnterFromClass;
|
|
11555
|
-
let legacyAppearFromClass;
|
|
11556
|
-
let legacyLeaveFromClass;
|
|
11557
|
-
if (legacyClassEnabled) {
|
|
11558
|
-
const toLegacyClass = (cls) => cls.replace(/-from$/, "");
|
|
11559
|
-
if (!rawProps.enterFromClass) {
|
|
11560
|
-
legacyEnterFromClass = toLegacyClass(enterFromClass);
|
|
11561
|
-
}
|
|
11562
|
-
if (!rawProps.appearFromClass) {
|
|
11563
|
-
legacyAppearFromClass = toLegacyClass(appearFromClass);
|
|
11585
|
+
connectedCallback() {
|
|
11586
|
+
this._connected = true;
|
|
11587
|
+
if (!this._instance) {
|
|
11588
|
+
if (this._resolved) {
|
|
11589
|
+
this._update();
|
|
11590
|
+
} else {
|
|
11591
|
+
this._resolveDef();
|
|
11592
|
+
}
|
|
11564
11593
|
}
|
|
11565
|
-
|
|
11566
|
-
|
|
11594
|
+
}
|
|
11595
|
+
disconnectedCallback() {
|
|
11596
|
+
this._connected = false;
|
|
11597
|
+
if (this._ob) {
|
|
11598
|
+
this._ob.disconnect();
|
|
11599
|
+
this._ob = null;
|
|
11567
11600
|
}
|
|
11601
|
+
nextTick(() => {
|
|
11602
|
+
if (!this._connected) {
|
|
11603
|
+
render(null, this.shadowRoot);
|
|
11604
|
+
this._instance = null;
|
|
11605
|
+
}
|
|
11606
|
+
});
|
|
11568
11607
|
}
|
|
11569
|
-
|
|
11570
|
-
|
|
11571
|
-
|
|
11572
|
-
|
|
11573
|
-
|
|
11574
|
-
|
|
11575
|
-
|
|
11576
|
-
|
|
11577
|
-
|
|
11578
|
-
|
|
11579
|
-
|
|
11580
|
-
|
|
11581
|
-
|
|
11582
|
-
|
|
11583
|
-
|
|
11584
|
-
|
|
11585
|
-
|
|
11586
|
-
|
|
11587
|
-
|
|
11588
|
-
|
|
11589
|
-
|
|
11590
|
-
|
|
11591
|
-
|
|
11592
|
-
|
|
11593
|
-
|
|
11594
|
-
const makeEnterHook = (isAppear) => {
|
|
11595
|
-
return (el, done) => {
|
|
11596
|
-
const hook = isAppear ? onAppear : onEnter;
|
|
11597
|
-
const resolve = () => finishEnter(el, isAppear, done);
|
|
11598
|
-
callHook(hook, [el, resolve]);
|
|
11599
|
-
nextFrame(() => {
|
|
11600
|
-
removeTransitionClass(el, isAppear ? appearFromClass : enterFromClass);
|
|
11601
|
-
if (legacyClassEnabled) {
|
|
11602
|
-
const legacyClass = isAppear ? legacyAppearFromClass : legacyEnterFromClass;
|
|
11603
|
-
if (legacyClass) {
|
|
11604
|
-
removeTransitionClass(el, legacyClass);
|
|
11608
|
+
/**
|
|
11609
|
+
* resolve inner component definition (handle possible async component)
|
|
11610
|
+
*/
|
|
11611
|
+
_resolveDef() {
|
|
11612
|
+
this._resolved = true;
|
|
11613
|
+
for (let i = 0; i < this.attributes.length; i++) {
|
|
11614
|
+
this._setAttr(this.attributes[i].name);
|
|
11615
|
+
}
|
|
11616
|
+
this._ob = new MutationObserver((mutations) => {
|
|
11617
|
+
for (const m of mutations) {
|
|
11618
|
+
this._setAttr(m.attributeName);
|
|
11619
|
+
}
|
|
11620
|
+
});
|
|
11621
|
+
this._ob.observe(this, { attributes: true });
|
|
11622
|
+
const resolve = (def, isAsync = false) => {
|
|
11623
|
+
const { props, styles } = def;
|
|
11624
|
+
let numberProps;
|
|
11625
|
+
if (props && !isArray(props)) {
|
|
11626
|
+
for (const key in props) {
|
|
11627
|
+
const opt = props[key];
|
|
11628
|
+
if (opt === Number || opt && opt.type === Number) {
|
|
11629
|
+
if (key in this._props) {
|
|
11630
|
+
this._props[key] = toNumber(this._props[key]);
|
|
11631
|
+
}
|
|
11632
|
+
(numberProps || (numberProps = /* @__PURE__ */ Object.create(null)))[camelize(key)] = true;
|
|
11605
11633
|
}
|
|
11606
11634
|
}
|
|
11607
|
-
addTransitionClass(el, isAppear ? appearToClass : enterToClass);
|
|
11608
|
-
if (!hasExplicitCallback(hook)) {
|
|
11609
|
-
whenTransitionEnds(el, type, enterDuration, resolve);
|
|
11610
|
-
}
|
|
11611
|
-
});
|
|
11612
|
-
};
|
|
11613
|
-
};
|
|
11614
|
-
return extend(baseProps, {
|
|
11615
|
-
onBeforeEnter(el) {
|
|
11616
|
-
callHook(onBeforeEnter, [el]);
|
|
11617
|
-
addTransitionClass(el, enterFromClass);
|
|
11618
|
-
if (legacyClassEnabled && legacyEnterFromClass) {
|
|
11619
|
-
addTransitionClass(el, legacyEnterFromClass);
|
|
11620
11635
|
}
|
|
11621
|
-
|
|
11622
|
-
|
|
11623
|
-
|
|
11624
|
-
callHook(onBeforeAppear, [el]);
|
|
11625
|
-
addTransitionClass(el, appearFromClass);
|
|
11626
|
-
if (legacyClassEnabled && legacyAppearFromClass) {
|
|
11627
|
-
addTransitionClass(el, legacyAppearFromClass);
|
|
11636
|
+
this._numberProps = numberProps;
|
|
11637
|
+
if (isAsync) {
|
|
11638
|
+
this._resolveProps(def);
|
|
11628
11639
|
}
|
|
11629
|
-
|
|
11630
|
-
|
|
11631
|
-
|
|
11632
|
-
|
|
11633
|
-
|
|
11634
|
-
|
|
11635
|
-
|
|
11636
|
-
|
|
11637
|
-
|
|
11638
|
-
|
|
11640
|
+
this._applyStyles(styles);
|
|
11641
|
+
this._update();
|
|
11642
|
+
};
|
|
11643
|
+
const asyncDef = this._def.__asyncLoader;
|
|
11644
|
+
if (asyncDef) {
|
|
11645
|
+
asyncDef().then((def) => resolve(def, true));
|
|
11646
|
+
} else {
|
|
11647
|
+
resolve(this._def);
|
|
11648
|
+
}
|
|
11649
|
+
}
|
|
11650
|
+
_resolveProps(def) {
|
|
11651
|
+
const { props } = def;
|
|
11652
|
+
const declaredPropKeys = isArray(props) ? props : Object.keys(props || {});
|
|
11653
|
+
for (const key of Object.keys(this)) {
|
|
11654
|
+
if (key[0] !== "_" && declaredPropKeys.includes(key)) {
|
|
11655
|
+
this._setProp(key, this[key], true, false);
|
|
11639
11656
|
}
|
|
11640
|
-
|
|
11641
|
-
|
|
11642
|
-
|
|
11643
|
-
|
|
11644
|
-
return;
|
|
11657
|
+
}
|
|
11658
|
+
for (const key of declaredPropKeys.map(camelize)) {
|
|
11659
|
+
Object.defineProperty(this, key, {
|
|
11660
|
+
get() {
|
|
11661
|
+
return this._getProp(key);
|
|
11662
|
+
},
|
|
11663
|
+
set(val) {
|
|
11664
|
+
this._setProp(key, val);
|
|
11645
11665
|
}
|
|
11646
|
-
|
|
11647
|
-
|
|
11648
|
-
|
|
11666
|
+
});
|
|
11667
|
+
}
|
|
11668
|
+
}
|
|
11669
|
+
_setAttr(key) {
|
|
11670
|
+
let value = this.getAttribute(key);
|
|
11671
|
+
const camelKey = camelize(key);
|
|
11672
|
+
if (this._numberProps && this._numberProps[camelKey]) {
|
|
11673
|
+
value = toNumber(value);
|
|
11674
|
+
}
|
|
11675
|
+
this._setProp(camelKey, value, false);
|
|
11676
|
+
}
|
|
11677
|
+
/**
|
|
11678
|
+
* @internal
|
|
11679
|
+
*/
|
|
11680
|
+
_getProp(key) {
|
|
11681
|
+
return this._props[key];
|
|
11682
|
+
}
|
|
11683
|
+
/**
|
|
11684
|
+
* @internal
|
|
11685
|
+
*/
|
|
11686
|
+
_setProp(key, val, shouldReflect = true, shouldUpdate = true) {
|
|
11687
|
+
if (val !== this._props[key]) {
|
|
11688
|
+
this._props[key] = val;
|
|
11689
|
+
if (shouldUpdate && this._instance) {
|
|
11690
|
+
this._update();
|
|
11691
|
+
}
|
|
11692
|
+
if (shouldReflect) {
|
|
11693
|
+
if (val === true) {
|
|
11694
|
+
this.setAttribute(hyphenate(key), "");
|
|
11695
|
+
} else if (typeof val === "string" || typeof val === "number") {
|
|
11696
|
+
this.setAttribute(hyphenate(key), val + "");
|
|
11697
|
+
} else if (!val) {
|
|
11698
|
+
this.removeAttribute(hyphenate(key));
|
|
11699
|
+
}
|
|
11700
|
+
}
|
|
11701
|
+
}
|
|
11702
|
+
}
|
|
11703
|
+
_update() {
|
|
11704
|
+
render(this._createVNode(), this.shadowRoot);
|
|
11705
|
+
}
|
|
11706
|
+
_createVNode() {
|
|
11707
|
+
const vnode = createVNode(this._def, extend({}, this._props));
|
|
11708
|
+
if (!this._instance) {
|
|
11709
|
+
vnode.ce = (instance) => {
|
|
11710
|
+
this._instance = instance;
|
|
11711
|
+
instance.isCE = true;
|
|
11712
|
+
{
|
|
11713
|
+
instance.ceReload = (newStyles) => {
|
|
11714
|
+
if (this._styles) {
|
|
11715
|
+
this._styles.forEach((s) => this.shadowRoot.removeChild(s));
|
|
11716
|
+
this._styles.length = 0;
|
|
11717
|
+
}
|
|
11718
|
+
this._applyStyles(newStyles);
|
|
11719
|
+
this._instance = null;
|
|
11720
|
+
this._update();
|
|
11721
|
+
};
|
|
11649
11722
|
}
|
|
11650
|
-
|
|
11651
|
-
|
|
11652
|
-
|
|
11723
|
+
const dispatch = (event, args) => {
|
|
11724
|
+
this.dispatchEvent(
|
|
11725
|
+
new CustomEvent(event, {
|
|
11726
|
+
detail: args
|
|
11727
|
+
})
|
|
11728
|
+
);
|
|
11729
|
+
};
|
|
11730
|
+
instance.emit = (event, ...args) => {
|
|
11731
|
+
dispatch(event, args);
|
|
11732
|
+
if (hyphenate(event) !== event) {
|
|
11733
|
+
dispatch(hyphenate(event), args);
|
|
11734
|
+
}
|
|
11735
|
+
};
|
|
11736
|
+
let parent = this;
|
|
11737
|
+
while (parent = parent && (parent.parentNode || parent.host)) {
|
|
11738
|
+
if (parent instanceof VueElement) {
|
|
11739
|
+
instance.parent = parent._instance;
|
|
11740
|
+
instance.provides = parent._instance.provides;
|
|
11741
|
+
break;
|
|
11742
|
+
}
|
|
11743
|
+
}
|
|
11744
|
+
};
|
|
11745
|
+
}
|
|
11746
|
+
return vnode;
|
|
11747
|
+
}
|
|
11748
|
+
_applyStyles(styles) {
|
|
11749
|
+
if (styles) {
|
|
11750
|
+
styles.forEach((css) => {
|
|
11751
|
+
const s = document.createElement("style");
|
|
11752
|
+
s.textContent = css;
|
|
11753
|
+
this.shadowRoot.appendChild(s);
|
|
11754
|
+
{
|
|
11755
|
+
(this._styles || (this._styles = [])).push(s);
|
|
11653
11756
|
}
|
|
11654
11757
|
});
|
|
11655
|
-
callHook(onLeave, [el, resolve]);
|
|
11656
|
-
},
|
|
11657
|
-
onEnterCancelled(el) {
|
|
11658
|
-
finishEnter(el, false);
|
|
11659
|
-
callHook(onEnterCancelled, [el]);
|
|
11660
|
-
},
|
|
11661
|
-
onAppearCancelled(el) {
|
|
11662
|
-
finishEnter(el, true);
|
|
11663
|
-
callHook(onAppearCancelled, [el]);
|
|
11664
|
-
},
|
|
11665
|
-
onLeaveCancelled(el) {
|
|
11666
|
-
finishLeave(el);
|
|
11667
|
-
callHook(onLeaveCancelled, [el]);
|
|
11668
11758
|
}
|
|
11669
|
-
});
|
|
11670
|
-
}
|
|
11671
|
-
function normalizeDuration(duration) {
|
|
11672
|
-
if (duration == null) {
|
|
11673
|
-
return null;
|
|
11674
|
-
} else if (isObject(duration)) {
|
|
11675
|
-
return [NumberOf(duration.enter), NumberOf(duration.leave)];
|
|
11676
|
-
} else {
|
|
11677
|
-
const n = NumberOf(duration);
|
|
11678
|
-
return [n, n];
|
|
11679
11759
|
}
|
|
11680
11760
|
}
|
|
11681
|
-
|
|
11682
|
-
|
|
11761
|
+
|
|
11762
|
+
function useCssModule(name = "$style") {
|
|
11683
11763
|
{
|
|
11684
|
-
|
|
11685
|
-
|
|
11686
|
-
|
|
11687
|
-
|
|
11688
|
-
function addTransitionClass(el, cls) {
|
|
11689
|
-
cls.split(/\s+/).forEach((c) => c && el.classList.add(c));
|
|
11690
|
-
(el._vtc || (el._vtc = /* @__PURE__ */ new Set())).add(cls);
|
|
11691
|
-
}
|
|
11692
|
-
function removeTransitionClass(el, cls) {
|
|
11693
|
-
cls.split(/\s+/).forEach((c) => c && el.classList.remove(c));
|
|
11694
|
-
const { _vtc } = el;
|
|
11695
|
-
if (_vtc) {
|
|
11696
|
-
_vtc.delete(cls);
|
|
11697
|
-
if (!_vtc.size) {
|
|
11698
|
-
el._vtc = void 0;
|
|
11764
|
+
const instance = getCurrentInstance();
|
|
11765
|
+
if (!instance) {
|
|
11766
|
+
warn(`useCssModule must be called inside setup()`);
|
|
11767
|
+
return EMPTY_OBJ;
|
|
11699
11768
|
}
|
|
11700
|
-
|
|
11701
|
-
|
|
11702
|
-
|
|
11703
|
-
|
|
11704
|
-
requestAnimationFrame(cb);
|
|
11705
|
-
});
|
|
11706
|
-
}
|
|
11707
|
-
let endId = 0;
|
|
11708
|
-
function whenTransitionEnds(el, expectedType, explicitTimeout, resolve) {
|
|
11709
|
-
const id = el._endId = ++endId;
|
|
11710
|
-
const resolveIfNotStale = () => {
|
|
11711
|
-
if (id === el._endId) {
|
|
11712
|
-
resolve();
|
|
11769
|
+
const modules = instance.type.__cssModules;
|
|
11770
|
+
if (!modules) {
|
|
11771
|
+
warn(`Current instance does not have CSS modules injected.`);
|
|
11772
|
+
return EMPTY_OBJ;
|
|
11713
11773
|
}
|
|
11714
|
-
|
|
11715
|
-
|
|
11716
|
-
|
|
11774
|
+
const mod = modules[name];
|
|
11775
|
+
if (!mod) {
|
|
11776
|
+
warn(`Current instance does not have CSS module named "${name}".`);
|
|
11777
|
+
return EMPTY_OBJ;
|
|
11778
|
+
}
|
|
11779
|
+
return mod;
|
|
11717
11780
|
}
|
|
11718
|
-
|
|
11719
|
-
|
|
11720
|
-
|
|
11781
|
+
}
|
|
11782
|
+
|
|
11783
|
+
function useCssVars(getter) {
|
|
11784
|
+
const instance = getCurrentInstance();
|
|
11785
|
+
if (!instance) {
|
|
11786
|
+
warn(`useCssVars is called without current active component instance.`);
|
|
11787
|
+
return;
|
|
11721
11788
|
}
|
|
11722
|
-
const
|
|
11723
|
-
|
|
11724
|
-
|
|
11725
|
-
|
|
11726
|
-
resolveIfNotStale();
|
|
11789
|
+
const updateTeleports = instance.ut = (vars = getter(instance.proxy)) => {
|
|
11790
|
+
Array.from(
|
|
11791
|
+
document.querySelectorAll(`[data-v-owner="${instance.uid}"]`)
|
|
11792
|
+
).forEach((node) => setVarsOnNode(node, vars));
|
|
11727
11793
|
};
|
|
11728
|
-
const
|
|
11729
|
-
|
|
11730
|
-
|
|
11731
|
-
|
|
11794
|
+
const setVars = () => {
|
|
11795
|
+
const vars = getter(instance.proxy);
|
|
11796
|
+
setVarsOnVNode(instance.subTree, vars);
|
|
11797
|
+
updateTeleports(vars);
|
|
11732
11798
|
};
|
|
11733
|
-
|
|
11734
|
-
|
|
11735
|
-
|
|
11736
|
-
}
|
|
11737
|
-
|
|
11738
|
-
|
|
11799
|
+
watchPostEffect(setVars);
|
|
11800
|
+
onMounted(() => {
|
|
11801
|
+
const ob = new MutationObserver(setVars);
|
|
11802
|
+
ob.observe(instance.subTree.el.parentNode, { childList: true });
|
|
11803
|
+
onUnmounted(() => ob.disconnect());
|
|
11804
|
+
});
|
|
11739
11805
|
}
|
|
11740
|
-
function
|
|
11741
|
-
|
|
11742
|
-
|
|
11743
|
-
|
|
11744
|
-
|
|
11745
|
-
|
|
11746
|
-
|
|
11747
|
-
|
|
11748
|
-
const animationTimeout = getTimeout(animationDelays, animationDurations);
|
|
11749
|
-
let type = null;
|
|
11750
|
-
let timeout = 0;
|
|
11751
|
-
let propCount = 0;
|
|
11752
|
-
if (expectedType === TRANSITION$1) {
|
|
11753
|
-
if (transitionTimeout > 0) {
|
|
11754
|
-
type = TRANSITION$1;
|
|
11755
|
-
timeout = transitionTimeout;
|
|
11756
|
-
propCount = transitionDurations.length;
|
|
11806
|
+
function setVarsOnVNode(vnode, vars) {
|
|
11807
|
+
if (vnode.shapeFlag & 128) {
|
|
11808
|
+
const suspense = vnode.suspense;
|
|
11809
|
+
vnode = suspense.activeBranch;
|
|
11810
|
+
if (suspense.pendingBranch && !suspense.isHydrating) {
|
|
11811
|
+
suspense.effects.push(() => {
|
|
11812
|
+
setVarsOnVNode(suspense.activeBranch, vars);
|
|
11813
|
+
});
|
|
11757
11814
|
}
|
|
11758
|
-
}
|
|
11759
|
-
|
|
11760
|
-
|
|
11761
|
-
|
|
11762
|
-
|
|
11815
|
+
}
|
|
11816
|
+
while (vnode.component) {
|
|
11817
|
+
vnode = vnode.component.subTree;
|
|
11818
|
+
}
|
|
11819
|
+
if (vnode.shapeFlag & 1 && vnode.el) {
|
|
11820
|
+
setVarsOnNode(vnode.el, vars);
|
|
11821
|
+
} else if (vnode.type === Fragment) {
|
|
11822
|
+
vnode.children.forEach((c) => setVarsOnVNode(c, vars));
|
|
11823
|
+
} else if (vnode.type === Static) {
|
|
11824
|
+
let { el, anchor } = vnode;
|
|
11825
|
+
while (el) {
|
|
11826
|
+
setVarsOnNode(el, vars);
|
|
11827
|
+
if (el === anchor)
|
|
11828
|
+
break;
|
|
11829
|
+
el = el.nextSibling;
|
|
11763
11830
|
}
|
|
11764
|
-
} else {
|
|
11765
|
-
timeout = Math.max(transitionTimeout, animationTimeout);
|
|
11766
|
-
type = timeout > 0 ? transitionTimeout > animationTimeout ? TRANSITION$1 : ANIMATION : null;
|
|
11767
|
-
propCount = type ? type === TRANSITION$1 ? transitionDurations.length : animationDurations.length : 0;
|
|
11768
11831
|
}
|
|
11769
|
-
const hasTransform = type === TRANSITION$1 && /\b(transform|all)(,|$)/.test(
|
|
11770
|
-
getStyleProperties(`${TRANSITION$1}Property`).toString()
|
|
11771
|
-
);
|
|
11772
|
-
return {
|
|
11773
|
-
type,
|
|
11774
|
-
timeout,
|
|
11775
|
-
propCount,
|
|
11776
|
-
hasTransform
|
|
11777
|
-
};
|
|
11778
11832
|
}
|
|
11779
|
-
function
|
|
11780
|
-
|
|
11781
|
-
|
|
11833
|
+
function setVarsOnNode(el, vars) {
|
|
11834
|
+
if (el.nodeType === 1) {
|
|
11835
|
+
const style = el.style;
|
|
11836
|
+
for (const key in vars) {
|
|
11837
|
+
style.setProperty(`--${key}`, vars[key]);
|
|
11838
|
+
}
|
|
11782
11839
|
}
|
|
11783
|
-
return Math.max(...durations.map((d, i) => toMs(d) + toMs(delays[i])));
|
|
11784
|
-
}
|
|
11785
|
-
function toMs(s) {
|
|
11786
|
-
return Number(s.slice(0, -1).replace(",", ".")) * 1e3;
|
|
11787
|
-
}
|
|
11788
|
-
function forceReflow() {
|
|
11789
|
-
return document.body.offsetHeight;
|
|
11790
11840
|
}
|
|
11791
11841
|
|
|
11792
11842
|
const positionMap = /* @__PURE__ */ new WeakMap();
|
|
11793
11843
|
const newPositionMap = /* @__PURE__ */ new WeakMap();
|
|
11844
|
+
const moveCbKey = Symbol("_moveCb");
|
|
11845
|
+
const enterCbKey = Symbol("_enterCb");
|
|
11794
11846
|
const TransitionGroupImpl = {
|
|
11795
11847
|
name: "TransitionGroup",
|
|
11796
11848
|
props: /* @__PURE__ */ extend({}, TransitionPropsValidators, {
|
|
@@ -11823,13 +11875,13 @@ const TransitionGroupImpl = {
|
|
|
11823
11875
|
const style = el.style;
|
|
11824
11876
|
addTransitionClass(el, moveClass);
|
|
11825
11877
|
style.transform = style.webkitTransform = style.transitionDuration = "";
|
|
11826
|
-
const cb = el
|
|
11878
|
+
const cb = el[moveCbKey] = (e) => {
|
|
11827
11879
|
if (e && e.target !== el) {
|
|
11828
11880
|
return;
|
|
11829
11881
|
}
|
|
11830
11882
|
if (!e || /transform$/.test(e.propertyName)) {
|
|
11831
11883
|
el.removeEventListener("transitionend", cb);
|
|
11832
|
-
el
|
|
11884
|
+
el[moveCbKey] = null;
|
|
11833
11885
|
removeTransitionClass(el, moveClass);
|
|
11834
11886
|
}
|
|
11835
11887
|
};
|
|
@@ -11881,11 +11933,11 @@ const removeMode = (props) => delete props.mode;
|
|
|
11881
11933
|
const TransitionGroup = TransitionGroupImpl;
|
|
11882
11934
|
function callPendingCbs(c) {
|
|
11883
11935
|
const el = c.el;
|
|
11884
|
-
if (el
|
|
11885
|
-
el
|
|
11936
|
+
if (el[moveCbKey]) {
|
|
11937
|
+
el[moveCbKey]();
|
|
11886
11938
|
}
|
|
11887
|
-
if (el
|
|
11888
|
-
el
|
|
11939
|
+
if (el[enterCbKey]) {
|
|
11940
|
+
el[enterCbKey]();
|
|
11889
11941
|
}
|
|
11890
11942
|
}
|
|
11891
11943
|
function recordPosition(c) {
|
|
@@ -11905,8 +11957,9 @@ function applyTranslation(c) {
|
|
|
11905
11957
|
}
|
|
11906
11958
|
function hasCSSTransform(el, root, moveClass) {
|
|
11907
11959
|
const clone = el.cloneNode();
|
|
11908
|
-
|
|
11909
|
-
|
|
11960
|
+
const _vtc = el[vtcKey];
|
|
11961
|
+
if (_vtc) {
|
|
11962
|
+
_vtc.forEach((cls) => {
|
|
11910
11963
|
cls.split(/\s+/).forEach((c) => c && clone.classList.remove(c));
|
|
11911
11964
|
});
|
|
11912
11965
|
}
|
|
@@ -11933,9 +11986,10 @@ function onCompositionEnd(e) {
|
|
|
11933
11986
|
target.dispatchEvent(new Event("input"));
|
|
11934
11987
|
}
|
|
11935
11988
|
}
|
|
11989
|
+
const assignKey = Symbol("_assign");
|
|
11936
11990
|
const vModelText = {
|
|
11937
11991
|
created(el, { modifiers: { lazy, trim, number } }, vnode) {
|
|
11938
|
-
el
|
|
11992
|
+
el[assignKey] = getModelAssigner(vnode);
|
|
11939
11993
|
const castToNumber = number || vnode.props && vnode.props.type === "number";
|
|
11940
11994
|
addEventListener(el, lazy ? "change" : "input", (e) => {
|
|
11941
11995
|
if (e.target.composing)
|
|
@@ -11947,7 +12001,7 @@ const vModelText = {
|
|
|
11947
12001
|
if (castToNumber) {
|
|
11948
12002
|
domValue = looseToNumber(domValue);
|
|
11949
12003
|
}
|
|
11950
|
-
el
|
|
12004
|
+
el[assignKey](domValue);
|
|
11951
12005
|
});
|
|
11952
12006
|
if (trim) {
|
|
11953
12007
|
addEventListener(el, "change", () => {
|
|
@@ -11965,7 +12019,7 @@ const vModelText = {
|
|
|
11965
12019
|
el.value = value == null ? "" : value;
|
|
11966
12020
|
},
|
|
11967
12021
|
beforeUpdate(el, { value, modifiers: { lazy, trim, number } }, vnode) {
|
|
11968
|
-
el
|
|
12022
|
+
el[assignKey] = getModelAssigner(vnode);
|
|
11969
12023
|
if (el.composing)
|
|
11970
12024
|
return;
|
|
11971
12025
|
if (document.activeElement === el && el.type !== "range") {
|
|
@@ -11989,12 +12043,12 @@ const vModelCheckbox = {
|
|
|
11989
12043
|
// #4096 array checkboxes need to be deep traversed
|
|
11990
12044
|
deep: true,
|
|
11991
12045
|
created(el, _, vnode) {
|
|
11992
|
-
el
|
|
12046
|
+
el[assignKey] = getModelAssigner(vnode);
|
|
11993
12047
|
addEventListener(el, "change", () => {
|
|
11994
12048
|
const modelValue = el._modelValue;
|
|
11995
12049
|
const elementValue = getValue(el);
|
|
11996
12050
|
const checked = el.checked;
|
|
11997
|
-
const assign = el
|
|
12051
|
+
const assign = el[assignKey];
|
|
11998
12052
|
if (isArray(modelValue)) {
|
|
11999
12053
|
const index = looseIndexOf(modelValue, elementValue);
|
|
12000
12054
|
const found = index !== -1;
|
|
@@ -12021,7 +12075,7 @@ const vModelCheckbox = {
|
|
|
12021
12075
|
// set initial checked on mount to wait for true-value/false-value
|
|
12022
12076
|
mounted: setChecked,
|
|
12023
12077
|
beforeUpdate(el, binding, vnode) {
|
|
12024
|
-
el
|
|
12078
|
+
el[assignKey] = getModelAssigner(vnode);
|
|
12025
12079
|
setChecked(el, binding, vnode);
|
|
12026
12080
|
}
|
|
12027
12081
|
};
|
|
@@ -12038,13 +12092,13 @@ function setChecked(el, { value, oldValue }, vnode) {
|
|
|
12038
12092
|
const vModelRadio = {
|
|
12039
12093
|
created(el, { value }, vnode) {
|
|
12040
12094
|
el.checked = looseEqual(value, vnode.props.value);
|
|
12041
|
-
el
|
|
12095
|
+
el[assignKey] = getModelAssigner(vnode);
|
|
12042
12096
|
addEventListener(el, "change", () => {
|
|
12043
|
-
el
|
|
12097
|
+
el[assignKey](getValue(el));
|
|
12044
12098
|
});
|
|
12045
12099
|
},
|
|
12046
12100
|
beforeUpdate(el, { value, oldValue }, vnode) {
|
|
12047
|
-
el
|
|
12101
|
+
el[assignKey] = getModelAssigner(vnode);
|
|
12048
12102
|
if (value !== oldValue) {
|
|
12049
12103
|
el.checked = looseEqual(value, vnode.props.value);
|
|
12050
12104
|
}
|
|
@@ -12059,11 +12113,11 @@ const vModelSelect = {
|
|
|
12059
12113
|
const selectedVal = Array.prototype.filter.call(el.options, (o) => o.selected).map(
|
|
12060
12114
|
(o) => number ? looseToNumber(getValue(o)) : getValue(o)
|
|
12061
12115
|
);
|
|
12062
|
-
el
|
|
12116
|
+
el[assignKey](
|
|
12063
12117
|
el.multiple ? isSetModel ? new Set(selectedVal) : selectedVal : selectedVal[0]
|
|
12064
12118
|
);
|
|
12065
12119
|
});
|
|
12066
|
-
el
|
|
12120
|
+
el[assignKey] = getModelAssigner(vnode);
|
|
12067
12121
|
},
|
|
12068
12122
|
// set value in mounted & updated because <select> relies on its children
|
|
12069
12123
|
// <option>s.
|
|
@@ -12071,7 +12125,7 @@ const vModelSelect = {
|
|
|
12071
12125
|
setSelected(el, value);
|
|
12072
12126
|
},
|
|
12073
12127
|
beforeUpdate(el, _binding, vnode) {
|
|
12074
|
-
el
|
|
12128
|
+
el[assignKey] = getModelAssigner(vnode);
|
|
12075
12129
|
},
|
|
12076
12130
|
updated(el, { value }) {
|
|
12077
12131
|
setSelected(el, value);
|
|
@@ -12234,45 +12288,6 @@ const withKeys = (fn, modifiers) => {
|
|
|
12234
12288
|
};
|
|
12235
12289
|
};
|
|
12236
12290
|
|
|
12237
|
-
const vShow = {
|
|
12238
|
-
beforeMount(el, { value }, { transition }) {
|
|
12239
|
-
el._vod = el.style.display === "none" ? "" : el.style.display;
|
|
12240
|
-
if (transition && value) {
|
|
12241
|
-
transition.beforeEnter(el);
|
|
12242
|
-
} else {
|
|
12243
|
-
setDisplay(el, value);
|
|
12244
|
-
}
|
|
12245
|
-
},
|
|
12246
|
-
mounted(el, { value }, { transition }) {
|
|
12247
|
-
if (transition && value) {
|
|
12248
|
-
transition.enter(el);
|
|
12249
|
-
}
|
|
12250
|
-
},
|
|
12251
|
-
updated(el, { value, oldValue }, { transition }) {
|
|
12252
|
-
if (!value === !oldValue)
|
|
12253
|
-
return;
|
|
12254
|
-
if (transition) {
|
|
12255
|
-
if (value) {
|
|
12256
|
-
transition.beforeEnter(el);
|
|
12257
|
-
setDisplay(el, true);
|
|
12258
|
-
transition.enter(el);
|
|
12259
|
-
} else {
|
|
12260
|
-
transition.leave(el, () => {
|
|
12261
|
-
setDisplay(el, false);
|
|
12262
|
-
});
|
|
12263
|
-
}
|
|
12264
|
-
} else {
|
|
12265
|
-
setDisplay(el, value);
|
|
12266
|
-
}
|
|
12267
|
-
},
|
|
12268
|
-
beforeUnmount(el, { value }) {
|
|
12269
|
-
setDisplay(el, value);
|
|
12270
|
-
}
|
|
12271
|
-
};
|
|
12272
|
-
function setDisplay(el, value) {
|
|
12273
|
-
el.style.display = value ? el._vod : "none";
|
|
12274
|
-
}
|
|
12275
|
-
|
|
12276
12291
|
const rendererOptions = /* @__PURE__ */ extend({ patchProp }, nodeOps);
|
|
12277
12292
|
let renderer;
|
|
12278
12293
|
let enabledHydration = false;
|
|
@@ -13311,7 +13326,7 @@ function parseChildren(context, mode, ancestors) {
|
|
|
13311
13326
|
continue;
|
|
13312
13327
|
} else if (/[a-z]/i.test(s[2])) {
|
|
13313
13328
|
emitError(context, 23);
|
|
13314
|
-
parseTag(context,
|
|
13329
|
+
parseTag(context, 1 /* End */, parent);
|
|
13315
13330
|
continue;
|
|
13316
13331
|
} else {
|
|
13317
13332
|
emitError(
|
|
@@ -13472,7 +13487,7 @@ function parseElement(context, ancestors) {
|
|
|
13472
13487
|
const wasInPre = context.inPre;
|
|
13473
13488
|
const wasInVPre = context.inVPre;
|
|
13474
13489
|
const parent = last(ancestors);
|
|
13475
|
-
const element = parseTag(context,
|
|
13490
|
+
const element = parseTag(context, 0 /* Start */, parent);
|
|
13476
13491
|
const isPreBoundary = context.inPre && !wasInPre;
|
|
13477
13492
|
const isVPreBoundary = context.inVPre && !wasInVPre;
|
|
13478
13493
|
if (element.isSelfClosing || context.options.isVoidTag(element.tag)) {
|
|
@@ -13507,7 +13522,7 @@ function parseElement(context, ancestors) {
|
|
|
13507
13522
|
}
|
|
13508
13523
|
element.children = children;
|
|
13509
13524
|
if (startsWithEndTagOpen(context.source, element.tag)) {
|
|
13510
|
-
parseTag(context,
|
|
13525
|
+
parseTag(context, 1 /* End */, parent);
|
|
13511
13526
|
} else {
|
|
13512
13527
|
emitError(context, 24, 0, element.loc.start);
|
|
13513
13528
|
if (context.source.length === 0 && element.tag.toLowerCase() === "script") {
|
|
@@ -13526,11 +13541,6 @@ function parseElement(context, ancestors) {
|
|
|
13526
13541
|
}
|
|
13527
13542
|
return element;
|
|
13528
13543
|
}
|
|
13529
|
-
var TagType = /* @__PURE__ */ ((TagType2) => {
|
|
13530
|
-
TagType2[TagType2["Start"] = 0] = "Start";
|
|
13531
|
-
TagType2[TagType2["End"] = 1] = "End";
|
|
13532
|
-
return TagType2;
|
|
13533
|
-
})(TagType || {});
|
|
13534
13544
|
const isSpecialTemplateDirective = /* @__PURE__ */ makeMap(
|
|
13535
13545
|
`if,else,else-if,for,slot`
|
|
13536
13546
|
);
|
|
@@ -14298,7 +14308,7 @@ function createTransformContext(root, {
|
|
|
14298
14308
|
directives: /* @__PURE__ */ new Set(),
|
|
14299
14309
|
hoists: [],
|
|
14300
14310
|
imports: [],
|
|
14301
|
-
constantCache: /* @__PURE__ */ new
|
|
14311
|
+
constantCache: /* @__PURE__ */ new WeakMap(),
|
|
14302
14312
|
temps: 0,
|
|
14303
14313
|
cached: 0,
|
|
14304
14314
|
identifiers: /* @__PURE__ */ Object.create(null),
|