@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.cjs.js
CHANGED
|
@@ -40,7 +40,7 @@ const isString = (val) => typeof val === "string";
|
|
|
40
40
|
const isSymbol = (val) => typeof val === "symbol";
|
|
41
41
|
const isObject = (val) => val !== null && typeof val === "object";
|
|
42
42
|
const isPromise = (val) => {
|
|
43
|
-
return isObject(val) && isFunction(val.then) && isFunction(val.catch);
|
|
43
|
+
return (isObject(val) || isFunction(val)) && isFunction(val.then) && isFunction(val.catch);
|
|
44
44
|
};
|
|
45
45
|
const objectToString = Object.prototype.toString;
|
|
46
46
|
const toTypeString = (value) => objectToString.call(value);
|
|
@@ -71,12 +71,13 @@ const hyphenateRE = /\B([A-Z])/g;
|
|
|
71
71
|
const hyphenate = cacheStringFunction(
|
|
72
72
|
(str) => str.replace(hyphenateRE, "-$1").toLowerCase()
|
|
73
73
|
);
|
|
74
|
-
const capitalize = cacheStringFunction(
|
|
75
|
-
|
|
76
|
-
);
|
|
77
|
-
const toHandlerKey = cacheStringFunction(
|
|
78
|
-
|
|
79
|
-
|
|
74
|
+
const capitalize = cacheStringFunction((str) => {
|
|
75
|
+
return str.charAt(0).toUpperCase() + str.slice(1);
|
|
76
|
+
});
|
|
77
|
+
const toHandlerKey = cacheStringFunction((str) => {
|
|
78
|
+
const s = str ? `on${capitalize(str)}` : ``;
|
|
79
|
+
return s;
|
|
80
|
+
});
|
|
80
81
|
const hasChanged = (value, oldValue) => !Object.is(value, oldValue);
|
|
81
82
|
const invokeArrayFns = (fns, arg) => {
|
|
82
83
|
for (let i = 0; i < fns.length; i++) {
|
|
@@ -130,8 +131,8 @@ const slotFlagsText = {
|
|
|
130
131
|
[3]: "FORWARDED"
|
|
131
132
|
};
|
|
132
133
|
|
|
133
|
-
const
|
|
134
|
-
const
|
|
134
|
+
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";
|
|
135
|
+
const isGloballyAllowed = /* @__PURE__ */ makeMap(GLOBALS_ALLOWED);
|
|
135
136
|
|
|
136
137
|
const range = 2;
|
|
137
138
|
function generateCodeFrame(source, start = 0, end = source.length) {
|
|
@@ -186,9 +187,7 @@ function normalizeStyle(value) {
|
|
|
186
187
|
}
|
|
187
188
|
}
|
|
188
189
|
return res;
|
|
189
|
-
} else if (isString(value)) {
|
|
190
|
-
return value;
|
|
191
|
-
} else if (isObject(value)) {
|
|
190
|
+
} else if (isString(value) || isObject(value)) {
|
|
192
191
|
return value;
|
|
193
192
|
}
|
|
194
193
|
}
|
|
@@ -600,7 +599,7 @@ function cleanupEffect(effect2) {
|
|
|
600
599
|
}
|
|
601
600
|
}
|
|
602
601
|
function effect(fn, options) {
|
|
603
|
-
if (fn.effect) {
|
|
602
|
+
if (fn.effect instanceof ReactiveEffect) {
|
|
604
603
|
fn = fn.effect.fn;
|
|
605
604
|
}
|
|
606
605
|
const _effect = new ReactiveEffect(fn);
|
|
@@ -766,10 +765,6 @@ const isNonTrackableKeys = /* @__PURE__ */ makeMap(`__proto__,__v_isRef,__isVue`
|
|
|
766
765
|
const builtInSymbols = new Set(
|
|
767
766
|
/* @__PURE__ */ Object.getOwnPropertyNames(Symbol).filter((key) => key !== "arguments" && key !== "caller").map((key) => Symbol[key]).filter(isSymbol)
|
|
768
767
|
);
|
|
769
|
-
const get$1 = /* @__PURE__ */ createGetter();
|
|
770
|
-
const shallowGet = /* @__PURE__ */ createGetter(false, true);
|
|
771
|
-
const readonlyGet = /* @__PURE__ */ createGetter(true);
|
|
772
|
-
const shallowReadonlyGet = /* @__PURE__ */ createGetter(true, true);
|
|
773
768
|
const arrayInstrumentations = /* @__PURE__ */ createArrayInstrumentations();
|
|
774
769
|
function createArrayInstrumentations() {
|
|
775
770
|
const instrumentations = {};
|
|
@@ -802,8 +797,13 @@ function hasOwnProperty(key) {
|
|
|
802
797
|
track(obj, "has", key);
|
|
803
798
|
return obj.hasOwnProperty(key);
|
|
804
799
|
}
|
|
805
|
-
|
|
806
|
-
|
|
800
|
+
class BaseReactiveHandler {
|
|
801
|
+
constructor(_isReadonly = false, _shallow = false) {
|
|
802
|
+
this._isReadonly = _isReadonly;
|
|
803
|
+
this._shallow = _shallow;
|
|
804
|
+
}
|
|
805
|
+
get(target, key, receiver) {
|
|
806
|
+
const isReadonly2 = this._isReadonly, shallow = this._shallow;
|
|
807
807
|
if (key === "__v_isReactive") {
|
|
808
808
|
return !isReadonly2;
|
|
809
809
|
} else if (key === "__v_isReadonly") {
|
|
@@ -839,17 +839,18 @@ function createGetter(isReadonly2 = false, shallow = false) {
|
|
|
839
839
|
return isReadonly2 ? readonly(res) : reactive(res);
|
|
840
840
|
}
|
|
841
841
|
return res;
|
|
842
|
-
}
|
|
842
|
+
}
|
|
843
843
|
}
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
844
|
+
class MutableReactiveHandler extends BaseReactiveHandler {
|
|
845
|
+
constructor(shallow = false) {
|
|
846
|
+
super(false, shallow);
|
|
847
|
+
}
|
|
848
|
+
set(target, key, value, receiver) {
|
|
848
849
|
let oldValue = target[key];
|
|
849
850
|
if (isReadonly(oldValue) && isRef(oldValue) && !isRef(value)) {
|
|
850
851
|
return false;
|
|
851
852
|
}
|
|
852
|
-
if (!
|
|
853
|
+
if (!this._shallow) {
|
|
853
854
|
if (!isShallow(value) && !isReadonly(value)) {
|
|
854
855
|
oldValue = toRaw(oldValue);
|
|
855
856
|
value = toRaw(value);
|
|
@@ -869,37 +870,36 @@ function createSetter(shallow = false) {
|
|
|
869
870
|
}
|
|
870
871
|
}
|
|
871
872
|
return result;
|
|
872
|
-
};
|
|
873
|
-
}
|
|
874
|
-
function deleteProperty(target, key) {
|
|
875
|
-
const hadKey = hasOwn(target, key);
|
|
876
|
-
const oldValue = target[key];
|
|
877
|
-
const result = Reflect.deleteProperty(target, key);
|
|
878
|
-
if (result && hadKey) {
|
|
879
|
-
trigger(target, "delete", key, void 0, oldValue);
|
|
880
873
|
}
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
874
|
+
deleteProperty(target, key) {
|
|
875
|
+
const hadKey = hasOwn(target, key);
|
|
876
|
+
const oldValue = target[key];
|
|
877
|
+
const result = Reflect.deleteProperty(target, key);
|
|
878
|
+
if (result && hadKey) {
|
|
879
|
+
trigger(target, "delete", key, void 0, oldValue);
|
|
880
|
+
}
|
|
881
|
+
return result;
|
|
882
|
+
}
|
|
883
|
+
has(target, key) {
|
|
884
|
+
const result = Reflect.has(target, key);
|
|
885
|
+
if (!isSymbol(key) || !builtInSymbols.has(key)) {
|
|
886
|
+
track(target, "has", key);
|
|
887
|
+
}
|
|
888
|
+
return result;
|
|
889
|
+
}
|
|
890
|
+
ownKeys(target) {
|
|
891
|
+
track(
|
|
892
|
+
target,
|
|
893
|
+
"iterate",
|
|
894
|
+
isArray(target) ? "length" : ITERATE_KEY
|
|
895
|
+
);
|
|
896
|
+
return Reflect.ownKeys(target);
|
|
887
897
|
}
|
|
888
|
-
return result;
|
|
889
|
-
}
|
|
890
|
-
function ownKeys(target) {
|
|
891
|
-
track(target, "iterate", isArray(target) ? "length" : ITERATE_KEY);
|
|
892
|
-
return Reflect.ownKeys(target);
|
|
893
898
|
}
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
has: has$1,
|
|
899
|
-
ownKeys
|
|
900
|
-
};
|
|
901
|
-
const readonlyHandlers = {
|
|
902
|
-
get: readonlyGet,
|
|
899
|
+
class ReadonlyReactiveHandler extends BaseReactiveHandler {
|
|
900
|
+
constructor(shallow = false) {
|
|
901
|
+
super(true, shallow);
|
|
902
|
+
}
|
|
903
903
|
set(target, key) {
|
|
904
904
|
{
|
|
905
905
|
warn$1(
|
|
@@ -908,7 +908,7 @@ const readonlyHandlers = {
|
|
|
908
908
|
);
|
|
909
909
|
}
|
|
910
910
|
return true;
|
|
911
|
-
}
|
|
911
|
+
}
|
|
912
912
|
deleteProperty(target, key) {
|
|
913
913
|
{
|
|
914
914
|
warn$1(
|
|
@@ -918,22 +918,13 @@ const readonlyHandlers = {
|
|
|
918
918
|
}
|
|
919
919
|
return true;
|
|
920
920
|
}
|
|
921
|
-
}
|
|
922
|
-
const
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
get: shallowGet,
|
|
927
|
-
set: shallowSet
|
|
928
|
-
}
|
|
929
|
-
);
|
|
930
|
-
const shallowReadonlyHandlers = /* @__PURE__ */ extend(
|
|
931
|
-
{},
|
|
932
|
-
readonlyHandlers,
|
|
933
|
-
{
|
|
934
|
-
get: shallowReadonlyGet
|
|
935
|
-
}
|
|
921
|
+
}
|
|
922
|
+
const mutableHandlers = /* @__PURE__ */ new MutableReactiveHandler();
|
|
923
|
+
const readonlyHandlers = /* @__PURE__ */ new ReadonlyReactiveHandler();
|
|
924
|
+
const shallowReactiveHandlers = /* @__PURE__ */ new MutableReactiveHandler(
|
|
925
|
+
true
|
|
936
926
|
);
|
|
927
|
+
const shallowReadonlyHandlers = /* @__PURE__ */ new ReadonlyReactiveHandler(true);
|
|
937
928
|
|
|
938
929
|
const toShallow = (value) => value;
|
|
939
930
|
const getProto = (v) => Reflect.getPrototypeOf(v);
|
|
@@ -942,7 +933,7 @@ function get(target, key, isReadonly = false, isShallow = false) {
|
|
|
942
933
|
const rawTarget = toRaw(target);
|
|
943
934
|
const rawKey = toRaw(key);
|
|
944
935
|
if (!isReadonly) {
|
|
945
|
-
if (key
|
|
936
|
+
if (hasChanged(key, rawKey)) {
|
|
946
937
|
track(rawTarget, "get", key);
|
|
947
938
|
}
|
|
948
939
|
track(rawTarget, "get", rawKey);
|
|
@@ -962,7 +953,7 @@ function has(key, isReadonly = false) {
|
|
|
962
953
|
const rawTarget = toRaw(target);
|
|
963
954
|
const rawKey = toRaw(key);
|
|
964
955
|
if (!isReadonly) {
|
|
965
|
-
if (key
|
|
956
|
+
if (hasChanged(key, rawKey)) {
|
|
966
957
|
track(rawTarget, "has", key);
|
|
967
958
|
}
|
|
968
959
|
track(rawTarget, "has", rawKey);
|
|
@@ -1492,11 +1483,7 @@ function toRef(source, key, defaultValue) {
|
|
|
1492
1483
|
}
|
|
1493
1484
|
function propertyToRef(source, key, defaultValue) {
|
|
1494
1485
|
const val = source[key];
|
|
1495
|
-
return isRef(val) ? val : new ObjectRefImpl(
|
|
1496
|
-
source,
|
|
1497
|
-
key,
|
|
1498
|
-
defaultValue
|
|
1499
|
-
);
|
|
1486
|
+
return isRef(val) ? val : new ObjectRefImpl(source, key, defaultValue);
|
|
1500
1487
|
}
|
|
1501
1488
|
|
|
1502
1489
|
class ComputedRefImpl {
|
|
@@ -3809,9 +3796,7 @@ function doWatch(source, cb, { immediate, deep, flush, onTrack, onTrigger } = EM
|
|
|
3809
3796
|
}
|
|
3810
3797
|
if (cb) {
|
|
3811
3798
|
const newValue = effect.run();
|
|
3812
|
-
if (deep || forceTrigger || (isMultiSource ? newValue.some(
|
|
3813
|
-
(v, i) => hasChanged(v, oldValue[i])
|
|
3814
|
-
) : hasChanged(newValue, oldValue)) || isArray(newValue) && isCompatEnabled$1("WATCH_ARRAY", instance)) {
|
|
3799
|
+
if (deep || forceTrigger || (isMultiSource ? newValue.some((v, i) => hasChanged(v, oldValue[i])) : hasChanged(newValue, oldValue)) || isArray(newValue) && isCompatEnabled$1("WATCH_ARRAY", instance)) {
|
|
3815
3800
|
if (cleanup) {
|
|
3816
3801
|
cleanup();
|
|
3817
3802
|
}
|
|
@@ -3987,6 +3972,8 @@ function invokeDirectiveHook(vnode, prevVNode, instance, name) {
|
|
|
3987
3972
|
}
|
|
3988
3973
|
}
|
|
3989
3974
|
|
|
3975
|
+
const leaveCbKey = Symbol("_leaveCb");
|
|
3976
|
+
const enterCbKey$1 = Symbol("_enterCb");
|
|
3990
3977
|
function useTransitionState() {
|
|
3991
3978
|
const state = {
|
|
3992
3979
|
isMounted: false,
|
|
@@ -4107,9 +4094,9 @@ const BaseTransitionImpl = {
|
|
|
4107
4094
|
oldInnerChild
|
|
4108
4095
|
);
|
|
4109
4096
|
leavingVNodesCache[String(oldInnerChild.key)] = oldInnerChild;
|
|
4110
|
-
el
|
|
4097
|
+
el[leaveCbKey] = () => {
|
|
4111
4098
|
earlyRemove();
|
|
4112
|
-
el
|
|
4099
|
+
el[leaveCbKey] = void 0;
|
|
4113
4100
|
delete enterHooks.delayedLeave;
|
|
4114
4101
|
};
|
|
4115
4102
|
enterHooks.delayedLeave = delayedLeave;
|
|
@@ -4183,15 +4170,15 @@ function resolveTransitionHooks(vnode, props, state, instance) {
|
|
|
4183
4170
|
return;
|
|
4184
4171
|
}
|
|
4185
4172
|
}
|
|
4186
|
-
if (el
|
|
4187
|
-
el
|
|
4173
|
+
if (el[leaveCbKey]) {
|
|
4174
|
+
el[leaveCbKey](
|
|
4188
4175
|
true
|
|
4189
4176
|
/* cancelled */
|
|
4190
4177
|
);
|
|
4191
4178
|
}
|
|
4192
4179
|
const leavingVNode = leavingVNodesCache[key];
|
|
4193
|
-
if (leavingVNode && isSameVNodeType(vnode, leavingVNode) && leavingVNode.el
|
|
4194
|
-
leavingVNode.el
|
|
4180
|
+
if (leavingVNode && isSameVNodeType(vnode, leavingVNode) && leavingVNode.el[leaveCbKey]) {
|
|
4181
|
+
leavingVNode.el[leaveCbKey]();
|
|
4195
4182
|
}
|
|
4196
4183
|
callHook(hook, [el]);
|
|
4197
4184
|
},
|
|
@@ -4209,7 +4196,7 @@ function resolveTransitionHooks(vnode, props, state, instance) {
|
|
|
4209
4196
|
}
|
|
4210
4197
|
}
|
|
4211
4198
|
let called = false;
|
|
4212
|
-
const done = el
|
|
4199
|
+
const done = el[enterCbKey$1] = (cancelled) => {
|
|
4213
4200
|
if (called)
|
|
4214
4201
|
return;
|
|
4215
4202
|
called = true;
|
|
@@ -4221,7 +4208,7 @@ function resolveTransitionHooks(vnode, props, state, instance) {
|
|
|
4221
4208
|
if (hooks.delayedLeave) {
|
|
4222
4209
|
hooks.delayedLeave();
|
|
4223
4210
|
}
|
|
4224
|
-
el
|
|
4211
|
+
el[enterCbKey$1] = void 0;
|
|
4225
4212
|
};
|
|
4226
4213
|
if (hook) {
|
|
4227
4214
|
callAsyncHook(hook, [el, done]);
|
|
@@ -4231,8 +4218,8 @@ function resolveTransitionHooks(vnode, props, state, instance) {
|
|
|
4231
4218
|
},
|
|
4232
4219
|
leave(el, remove) {
|
|
4233
4220
|
const key2 = String(vnode.key);
|
|
4234
|
-
if (el
|
|
4235
|
-
el
|
|
4221
|
+
if (el[enterCbKey$1]) {
|
|
4222
|
+
el[enterCbKey$1](
|
|
4236
4223
|
true
|
|
4237
4224
|
/* cancelled */
|
|
4238
4225
|
);
|
|
@@ -4242,7 +4229,7 @@ function resolveTransitionHooks(vnode, props, state, instance) {
|
|
|
4242
4229
|
}
|
|
4243
4230
|
callHook(onBeforeLeave, [el]);
|
|
4244
4231
|
let called = false;
|
|
4245
|
-
const done = el
|
|
4232
|
+
const done = el[leaveCbKey] = (cancelled) => {
|
|
4246
4233
|
if (called)
|
|
4247
4234
|
return;
|
|
4248
4235
|
called = true;
|
|
@@ -4252,7 +4239,7 @@ function resolveTransitionHooks(vnode, props, state, instance) {
|
|
|
4252
4239
|
} else {
|
|
4253
4240
|
callHook(onAfterLeave, [el]);
|
|
4254
4241
|
}
|
|
4255
|
-
el
|
|
4242
|
+
el[leaveCbKey] = void 0;
|
|
4256
4243
|
if (leavingVNodesCache[key2] === vnode) {
|
|
4257
4244
|
delete leavingVNodesCache[key2];
|
|
4258
4245
|
}
|
|
@@ -4314,6 +4301,8 @@ function getTransitionRawChildren(children, keepComment = false, parentKey) {
|
|
|
4314
4301
|
return ret;
|
|
4315
4302
|
}
|
|
4316
4303
|
|
|
4304
|
+
/*! #__NO_SIDE_EFFECTS__ */
|
|
4305
|
+
// @__NO_SIDE_EFFECTS__
|
|
4317
4306
|
function defineComponent(options, extraOptions) {
|
|
4318
4307
|
return isFunction(options) ? (
|
|
4319
4308
|
// #8326: extend call and options.name access are considered side-effects
|
|
@@ -4323,6 +4312,8 @@ function defineComponent(options, extraOptions) {
|
|
|
4323
4312
|
}
|
|
4324
4313
|
|
|
4325
4314
|
const isAsyncWrapper = (i) => !!i.type.__asyncLoader;
|
|
4315
|
+
/*! #__NO_SIDE_EFFECTS__ */
|
|
4316
|
+
// @__NO_SIDE_EFFECTS__
|
|
4326
4317
|
function defineAsyncComponent(source) {
|
|
4327
4318
|
if (isFunction(source)) {
|
|
4328
4319
|
source = { loader: source };
|
|
@@ -5060,7 +5051,7 @@ function defineLegacyVNodeProperties(vnode) {
|
|
|
5060
5051
|
}
|
|
5061
5052
|
}
|
|
5062
5053
|
|
|
5063
|
-
const normalizedFunctionalComponentMap = /* @__PURE__ */ new
|
|
5054
|
+
const normalizedFunctionalComponentMap = /* @__PURE__ */ new WeakMap();
|
|
5064
5055
|
const legacySlotProxyHandlers = {
|
|
5065
5056
|
get(target, key) {
|
|
5066
5057
|
const slot = target[key];
|
|
@@ -5341,6 +5332,7 @@ function legacyPrependModifier(value, symbol) {
|
|
|
5341
5332
|
function installCompatInstanceProperties(map) {
|
|
5342
5333
|
const set = (target, key, val) => {
|
|
5343
5334
|
target[key] = val;
|
|
5335
|
+
return target[key];
|
|
5344
5336
|
};
|
|
5345
5337
|
const del = (target, key) => {
|
|
5346
5338
|
delete target[key];
|
|
@@ -5618,7 +5610,7 @@ const RuntimeCompiledPublicInstanceProxyHandlers = /* @__PURE__ */ extend(
|
|
|
5618
5610
|
return PublicInstanceProxyHandlers.get(target, key, target);
|
|
5619
5611
|
},
|
|
5620
5612
|
has(_, key) {
|
|
5621
|
-
const has = key[0] !== "_" && !
|
|
5613
|
+
const has = key[0] !== "_" && !isGloballyAllowed(key);
|
|
5622
5614
|
if (!has && PublicInstanceProxyHandlers.has(_, key)) {
|
|
5623
5615
|
warn(
|
|
5624
5616
|
`Property ${JSON.stringify(
|
|
@@ -6355,7 +6347,7 @@ function createCompatVue$1(createApp, createSingletonApp) {
|
|
|
6355
6347
|
return vm;
|
|
6356
6348
|
}
|
|
6357
6349
|
}
|
|
6358
|
-
Vue.version = `2.6.14-compat:${"3.3.
|
|
6350
|
+
Vue.version = `2.6.14-compat:${"3.3.6"}`;
|
|
6359
6351
|
Vue.config = singletonApp.config;
|
|
6360
6352
|
Vue.use = (p, ...options) => {
|
|
6361
6353
|
if (p && isFunction(p.install)) {
|
|
@@ -6763,12 +6755,12 @@ function createAppAPI(render, hydrate) {
|
|
|
6763
6755
|
},
|
|
6764
6756
|
set() {
|
|
6765
6757
|
warn(
|
|
6766
|
-
`app.config.unwrapInjectedRef has been deprecated. 3.3 now
|
|
6758
|
+
`app.config.unwrapInjectedRef has been deprecated. 3.3 now always unwraps injected refs in Options API.`
|
|
6767
6759
|
);
|
|
6768
6760
|
}
|
|
6769
6761
|
});
|
|
6770
6762
|
}
|
|
6771
|
-
const installedPlugins = /* @__PURE__ */ new
|
|
6763
|
+
const installedPlugins = /* @__PURE__ */ new WeakSet();
|
|
6772
6764
|
let isMounted = false;
|
|
6773
6765
|
const app = context.app = {
|
|
6774
6766
|
_uid: uid$1++,
|
|
@@ -6850,10 +6842,7 @@ function createAppAPI(render, hydrate) {
|
|
|
6850
6842
|
If you want to mount another app on the same host container, you need to unmount the previous app by calling \`app.unmount()\` first.`
|
|
6851
6843
|
);
|
|
6852
6844
|
}
|
|
6853
|
-
const vnode = createVNode(
|
|
6854
|
-
rootComponent,
|
|
6855
|
-
rootProps
|
|
6856
|
-
);
|
|
6845
|
+
const vnode = createVNode(rootComponent, rootProps);
|
|
6857
6846
|
vnode.appContext = context;
|
|
6858
6847
|
{
|
|
6859
6848
|
context.reload = () => {
|
|
@@ -7512,7 +7501,7 @@ const updateSlots = (instance, children, optimized) => {
|
|
|
7512
7501
|
}
|
|
7513
7502
|
if (needDeletionCheck) {
|
|
7514
7503
|
for (const key in slots) {
|
|
7515
|
-
if (!isInternalKey(key) &&
|
|
7504
|
+
if (!isInternalKey(key) && deletionComparisonTarget[key] == null) {
|
|
7516
7505
|
delete slots[key];
|
|
7517
7506
|
}
|
|
7518
7507
|
}
|
|
@@ -7676,8 +7665,10 @@ function createHydrationFunctions(rendererInternals) {
|
|
|
7676
7665
|
hasMismatch = true;
|
|
7677
7666
|
warn(
|
|
7678
7667
|
`Hydration text mismatch:
|
|
7679
|
-
-
|
|
7680
|
-
|
|
7668
|
+
- Server rendered: ${JSON.stringify(
|
|
7669
|
+
node.data
|
|
7670
|
+
)}
|
|
7671
|
+
- Client rendered: ${JSON.stringify(vnode.children)}`
|
|
7681
7672
|
);
|
|
7682
7673
|
node.data = vnode.children;
|
|
7683
7674
|
}
|
|
@@ -7880,8 +7871,8 @@ function createHydrationFunctions(rendererInternals) {
|
|
|
7880
7871
|
hasMismatch = true;
|
|
7881
7872
|
warn(
|
|
7882
7873
|
`Hydration text content mismatch in <${vnode.type}>:
|
|
7883
|
-
-
|
|
7884
|
-
-
|
|
7874
|
+
- Server rendered: ${el.textContent}
|
|
7875
|
+
- Client rendered: ${vnode.children}`
|
|
7885
7876
|
);
|
|
7886
7877
|
el.textContent = vnode.children;
|
|
7887
7878
|
}
|
|
@@ -9663,6 +9654,10 @@ const TeleportImpl = {
|
|
|
9663
9654
|
internals,
|
|
9664
9655
|
1
|
|
9665
9656
|
);
|
|
9657
|
+
} else {
|
|
9658
|
+
if (n2.props && n1.props && n2.props.to !== n1.props.to) {
|
|
9659
|
+
n2.props.to = n1.props.to;
|
|
9660
|
+
}
|
|
9666
9661
|
}
|
|
9667
9662
|
} else {
|
|
9668
9663
|
if ((n2.props && n2.props.to) !== (n1.props && n1.props.to)) {
|
|
@@ -9703,19 +9698,18 @@ const TeleportImpl = {
|
|
|
9703
9698
|
if (target) {
|
|
9704
9699
|
hostRemove(targetAnchor);
|
|
9705
9700
|
}
|
|
9706
|
-
|
|
9707
|
-
|
|
9708
|
-
|
|
9709
|
-
|
|
9710
|
-
|
|
9711
|
-
|
|
9712
|
-
|
|
9713
|
-
|
|
9714
|
-
|
|
9715
|
-
|
|
9716
|
-
|
|
9717
|
-
|
|
9718
|
-
}
|
|
9701
|
+
doRemove && hostRemove(anchor);
|
|
9702
|
+
if (shapeFlag & 16) {
|
|
9703
|
+
const shouldRemove = doRemove || !isTeleportDisabled(props);
|
|
9704
|
+
for (let i = 0; i < children.length; i++) {
|
|
9705
|
+
const child = children[i];
|
|
9706
|
+
unmount(
|
|
9707
|
+
child,
|
|
9708
|
+
parentComponent,
|
|
9709
|
+
parentSuspense,
|
|
9710
|
+
shouldRemove,
|
|
9711
|
+
!!child.dynamicChildren
|
|
9712
|
+
);
|
|
9719
9713
|
}
|
|
9720
9714
|
}
|
|
9721
9715
|
},
|
|
@@ -9799,7 +9793,7 @@ function updateCssVars(vnode) {
|
|
|
9799
9793
|
const ctx = vnode.ctx;
|
|
9800
9794
|
if (ctx && ctx.ut) {
|
|
9801
9795
|
let node = vnode.children[0].el;
|
|
9802
|
-
while (node !== vnode.targetAnchor) {
|
|
9796
|
+
while (node && node !== vnode.targetAnchor) {
|
|
9803
9797
|
if (node.nodeType === 1)
|
|
9804
9798
|
node.setAttribute("data-v-owner", ctx.uid);
|
|
9805
9799
|
node = node.nextSibling;
|
|
@@ -9808,7 +9802,7 @@ function updateCssVars(vnode) {
|
|
|
9808
9802
|
}
|
|
9809
9803
|
}
|
|
9810
9804
|
|
|
9811
|
-
const normalizedAsyncComponentMap = /* @__PURE__ */ new
|
|
9805
|
+
const normalizedAsyncComponentMap = /* @__PURE__ */ new WeakMap();
|
|
9812
9806
|
function convertLegacyAsyncComponent(comp) {
|
|
9813
9807
|
if (normalizedAsyncComponentMap.has(comp)) {
|
|
9814
9808
|
return normalizedAsyncComponentMap.get(comp);
|
|
@@ -10528,9 +10522,12 @@ function finishComponentSetup(instance, isSSR, skipOptions) {
|
|
|
10528
10522
|
if (!skipOptions) {
|
|
10529
10523
|
setCurrentInstance(instance);
|
|
10530
10524
|
pauseTracking();
|
|
10531
|
-
|
|
10532
|
-
|
|
10533
|
-
|
|
10525
|
+
try {
|
|
10526
|
+
applyOptions(instance);
|
|
10527
|
+
} finally {
|
|
10528
|
+
resetTracking();
|
|
10529
|
+
unsetCurrentInstance();
|
|
10530
|
+
}
|
|
10534
10531
|
}
|
|
10535
10532
|
if (!Component.render && instance.render === NOOP && !isSSR) {
|
|
10536
10533
|
if (!compile$1 && Component.template) {
|
|
@@ -10896,7 +10893,7 @@ function isMemoSame(cached, memo) {
|
|
|
10896
10893
|
return true;
|
|
10897
10894
|
}
|
|
10898
10895
|
|
|
10899
|
-
const version = "3.3.
|
|
10896
|
+
const version = "3.3.6";
|
|
10900
10897
|
const _ssrUtils = {
|
|
10901
10898
|
createComponentInstance,
|
|
10902
10899
|
setupComponent,
|
|
@@ -10983,133 +10980,486 @@ const nodeOps = {
|
|
|
10983
10980
|
}
|
|
10984
10981
|
};
|
|
10985
10982
|
|
|
10986
|
-
|
|
10987
|
-
|
|
10988
|
-
|
|
10989
|
-
|
|
10990
|
-
|
|
10991
|
-
|
|
10992
|
-
|
|
10993
|
-
} else if (isSVG) {
|
|
10994
|
-
el.setAttribute("class", value);
|
|
10995
|
-
} else {
|
|
10996
|
-
el.className = value;
|
|
10997
|
-
}
|
|
10983
|
+
const TRANSITION$1 = "transition";
|
|
10984
|
+
const ANIMATION = "animation";
|
|
10985
|
+
const vtcKey = Symbol("_vtc");
|
|
10986
|
+
const Transition = (props, { slots }) => h(BaseTransition, resolveTransitionProps(props), slots);
|
|
10987
|
+
Transition.displayName = "Transition";
|
|
10988
|
+
{
|
|
10989
|
+
Transition.__isBuiltIn = true;
|
|
10998
10990
|
}
|
|
10999
|
-
|
|
11000
|
-
|
|
11001
|
-
|
|
11002
|
-
|
|
11003
|
-
|
|
11004
|
-
|
|
11005
|
-
|
|
11006
|
-
|
|
11007
|
-
|
|
11008
|
-
|
|
11009
|
-
|
|
11010
|
-
|
|
11011
|
-
|
|
11012
|
-
|
|
11013
|
-
|
|
11014
|
-
|
|
11015
|
-
|
|
11016
|
-
|
|
11017
|
-
|
|
11018
|
-
|
|
11019
|
-
|
|
11020
|
-
|
|
11021
|
-
|
|
11022
|
-
|
|
11023
|
-
|
|
11024
|
-
|
|
11025
|
-
|
|
10991
|
+
const DOMTransitionPropsValidators = {
|
|
10992
|
+
name: String,
|
|
10993
|
+
type: String,
|
|
10994
|
+
css: {
|
|
10995
|
+
type: Boolean,
|
|
10996
|
+
default: true
|
|
10997
|
+
},
|
|
10998
|
+
duration: [String, Number, Object],
|
|
10999
|
+
enterFromClass: String,
|
|
11000
|
+
enterActiveClass: String,
|
|
11001
|
+
enterToClass: String,
|
|
11002
|
+
appearFromClass: String,
|
|
11003
|
+
appearActiveClass: String,
|
|
11004
|
+
appearToClass: String,
|
|
11005
|
+
leaveFromClass: String,
|
|
11006
|
+
leaveActiveClass: String,
|
|
11007
|
+
leaveToClass: String
|
|
11008
|
+
};
|
|
11009
|
+
const TransitionPropsValidators = Transition.props = /* @__PURE__ */ extend(
|
|
11010
|
+
{},
|
|
11011
|
+
BaseTransitionPropsValidators,
|
|
11012
|
+
DOMTransitionPropsValidators
|
|
11013
|
+
);
|
|
11014
|
+
const callHook = (hook, args = []) => {
|
|
11015
|
+
if (isArray(hook)) {
|
|
11016
|
+
hook.forEach((h2) => h2(...args));
|
|
11017
|
+
} else if (hook) {
|
|
11018
|
+
hook(...args);
|
|
11026
11019
|
}
|
|
11027
|
-
}
|
|
11028
|
-
const
|
|
11029
|
-
|
|
11030
|
-
|
|
11031
|
-
|
|
11032
|
-
|
|
11033
|
-
|
|
11034
|
-
if (
|
|
11035
|
-
|
|
11036
|
-
{
|
|
11037
|
-
if (semicolonRE.test(val)) {
|
|
11038
|
-
warn(
|
|
11039
|
-
`Unexpected semicolon at the end of '${name}' style value: '${val}'`
|
|
11040
|
-
);
|
|
11041
|
-
}
|
|
11042
|
-
}
|
|
11043
|
-
if (name.startsWith("--")) {
|
|
11044
|
-
style.setProperty(name, val);
|
|
11045
|
-
} else {
|
|
11046
|
-
const prefixed = autoPrefix(style, name);
|
|
11047
|
-
if (importantRE.test(val)) {
|
|
11048
|
-
style.setProperty(
|
|
11049
|
-
hyphenate(prefixed),
|
|
11050
|
-
val.replace(importantRE, ""),
|
|
11051
|
-
"important"
|
|
11052
|
-
);
|
|
11053
|
-
} else {
|
|
11054
|
-
style[prefixed] = val;
|
|
11055
|
-
}
|
|
11020
|
+
};
|
|
11021
|
+
const hasExplicitCallback = (hook) => {
|
|
11022
|
+
return hook ? isArray(hook) ? hook.some((h2) => h2.length > 1) : hook.length > 1 : false;
|
|
11023
|
+
};
|
|
11024
|
+
function resolveTransitionProps(rawProps) {
|
|
11025
|
+
const baseProps = {};
|
|
11026
|
+
for (const key in rawProps) {
|
|
11027
|
+
if (!(key in DOMTransitionPropsValidators)) {
|
|
11028
|
+
baseProps[key] = rawProps[key];
|
|
11056
11029
|
}
|
|
11057
11030
|
}
|
|
11058
|
-
|
|
11059
|
-
|
|
11060
|
-
const prefixCache = {};
|
|
11061
|
-
function autoPrefix(style, rawName) {
|
|
11062
|
-
const cached = prefixCache[rawName];
|
|
11063
|
-
if (cached) {
|
|
11064
|
-
return cached;
|
|
11065
|
-
}
|
|
11066
|
-
let name = camelize(rawName);
|
|
11067
|
-
if (name !== "filter" && name in style) {
|
|
11068
|
-
return prefixCache[rawName] = name;
|
|
11069
|
-
}
|
|
11070
|
-
name = capitalize(name);
|
|
11071
|
-
for (let i = 0; i < prefixes.length; i++) {
|
|
11072
|
-
const prefixed = prefixes[i] + name;
|
|
11073
|
-
if (prefixed in style) {
|
|
11074
|
-
return prefixCache[rawName] = prefixed;
|
|
11075
|
-
}
|
|
11031
|
+
if (rawProps.css === false) {
|
|
11032
|
+
return baseProps;
|
|
11076
11033
|
}
|
|
11077
|
-
|
|
11078
|
-
|
|
11079
|
-
|
|
11080
|
-
|
|
11081
|
-
|
|
11082
|
-
|
|
11083
|
-
|
|
11084
|
-
|
|
11085
|
-
|
|
11086
|
-
|
|
11034
|
+
const {
|
|
11035
|
+
name = "v",
|
|
11036
|
+
type,
|
|
11037
|
+
duration,
|
|
11038
|
+
enterFromClass = `${name}-enter-from`,
|
|
11039
|
+
enterActiveClass = `${name}-enter-active`,
|
|
11040
|
+
enterToClass = `${name}-enter-to`,
|
|
11041
|
+
appearFromClass = enterFromClass,
|
|
11042
|
+
appearActiveClass = enterActiveClass,
|
|
11043
|
+
appearToClass = enterToClass,
|
|
11044
|
+
leaveFromClass = `${name}-leave-from`,
|
|
11045
|
+
leaveActiveClass = `${name}-leave-active`,
|
|
11046
|
+
leaveToClass = `${name}-leave-to`
|
|
11047
|
+
} = rawProps;
|
|
11048
|
+
const legacyClassEnabled = compatUtils.isCompatEnabled("TRANSITION_CLASSES", null);
|
|
11049
|
+
let legacyEnterFromClass;
|
|
11050
|
+
let legacyAppearFromClass;
|
|
11051
|
+
let legacyLeaveFromClass;
|
|
11052
|
+
if (legacyClassEnabled) {
|
|
11053
|
+
const toLegacyClass = (cls) => cls.replace(/-from$/, "");
|
|
11054
|
+
if (!rawProps.enterFromClass) {
|
|
11055
|
+
legacyEnterFromClass = toLegacyClass(enterFromClass);
|
|
11087
11056
|
}
|
|
11088
|
-
|
|
11089
|
-
|
|
11090
|
-
return;
|
|
11057
|
+
if (!rawProps.appearFromClass) {
|
|
11058
|
+
legacyAppearFromClass = toLegacyClass(appearFromClass);
|
|
11091
11059
|
}
|
|
11092
|
-
|
|
11093
|
-
|
|
11094
|
-
el.removeAttribute(key);
|
|
11095
|
-
} else {
|
|
11096
|
-
el.setAttribute(key, isBoolean ? "" : value);
|
|
11060
|
+
if (!rawProps.leaveFromClass) {
|
|
11061
|
+
legacyLeaveFromClass = toLegacyClass(leaveFromClass);
|
|
11097
11062
|
}
|
|
11098
11063
|
}
|
|
11099
|
-
|
|
11100
|
-
const
|
|
11101
|
-
|
|
11102
|
-
|
|
11103
|
-
|
|
11104
|
-
|
|
11105
|
-
|
|
11106
|
-
|
|
11107
|
-
|
|
11108
|
-
|
|
11109
|
-
|
|
11110
|
-
|
|
11111
|
-
|
|
11112
|
-
|
|
11064
|
+
const durations = normalizeDuration(duration);
|
|
11065
|
+
const enterDuration = durations && durations[0];
|
|
11066
|
+
const leaveDuration = durations && durations[1];
|
|
11067
|
+
const {
|
|
11068
|
+
onBeforeEnter,
|
|
11069
|
+
onEnter,
|
|
11070
|
+
onEnterCancelled,
|
|
11071
|
+
onLeave,
|
|
11072
|
+
onLeaveCancelled,
|
|
11073
|
+
onBeforeAppear = onBeforeEnter,
|
|
11074
|
+
onAppear = onEnter,
|
|
11075
|
+
onAppearCancelled = onEnterCancelled
|
|
11076
|
+
} = baseProps;
|
|
11077
|
+
const finishEnter = (el, isAppear, done) => {
|
|
11078
|
+
removeTransitionClass(el, isAppear ? appearToClass : enterToClass);
|
|
11079
|
+
removeTransitionClass(el, isAppear ? appearActiveClass : enterActiveClass);
|
|
11080
|
+
done && done();
|
|
11081
|
+
};
|
|
11082
|
+
const finishLeave = (el, done) => {
|
|
11083
|
+
el._isLeaving = false;
|
|
11084
|
+
removeTransitionClass(el, leaveFromClass);
|
|
11085
|
+
removeTransitionClass(el, leaveToClass);
|
|
11086
|
+
removeTransitionClass(el, leaveActiveClass);
|
|
11087
|
+
done && done();
|
|
11088
|
+
};
|
|
11089
|
+
const makeEnterHook = (isAppear) => {
|
|
11090
|
+
return (el, done) => {
|
|
11091
|
+
const hook = isAppear ? onAppear : onEnter;
|
|
11092
|
+
const resolve = () => finishEnter(el, isAppear, done);
|
|
11093
|
+
callHook(hook, [el, resolve]);
|
|
11094
|
+
nextFrame(() => {
|
|
11095
|
+
removeTransitionClass(el, isAppear ? appearFromClass : enterFromClass);
|
|
11096
|
+
if (legacyClassEnabled) {
|
|
11097
|
+
const legacyClass = isAppear ? legacyAppearFromClass : legacyEnterFromClass;
|
|
11098
|
+
if (legacyClass) {
|
|
11099
|
+
removeTransitionClass(el, legacyClass);
|
|
11100
|
+
}
|
|
11101
|
+
}
|
|
11102
|
+
addTransitionClass(el, isAppear ? appearToClass : enterToClass);
|
|
11103
|
+
if (!hasExplicitCallback(hook)) {
|
|
11104
|
+
whenTransitionEnds(el, type, enterDuration, resolve);
|
|
11105
|
+
}
|
|
11106
|
+
});
|
|
11107
|
+
};
|
|
11108
|
+
};
|
|
11109
|
+
return extend(baseProps, {
|
|
11110
|
+
onBeforeEnter(el) {
|
|
11111
|
+
callHook(onBeforeEnter, [el]);
|
|
11112
|
+
addTransitionClass(el, enterFromClass);
|
|
11113
|
+
if (legacyClassEnabled && legacyEnterFromClass) {
|
|
11114
|
+
addTransitionClass(el, legacyEnterFromClass);
|
|
11115
|
+
}
|
|
11116
|
+
addTransitionClass(el, enterActiveClass);
|
|
11117
|
+
},
|
|
11118
|
+
onBeforeAppear(el) {
|
|
11119
|
+
callHook(onBeforeAppear, [el]);
|
|
11120
|
+
addTransitionClass(el, appearFromClass);
|
|
11121
|
+
if (legacyClassEnabled && legacyAppearFromClass) {
|
|
11122
|
+
addTransitionClass(el, legacyAppearFromClass);
|
|
11123
|
+
}
|
|
11124
|
+
addTransitionClass(el, appearActiveClass);
|
|
11125
|
+
},
|
|
11126
|
+
onEnter: makeEnterHook(false),
|
|
11127
|
+
onAppear: makeEnterHook(true),
|
|
11128
|
+
onLeave(el, done) {
|
|
11129
|
+
el._isLeaving = true;
|
|
11130
|
+
const resolve = () => finishLeave(el, done);
|
|
11131
|
+
addTransitionClass(el, leaveFromClass);
|
|
11132
|
+
if (legacyClassEnabled && legacyLeaveFromClass) {
|
|
11133
|
+
addTransitionClass(el, legacyLeaveFromClass);
|
|
11134
|
+
}
|
|
11135
|
+
forceReflow();
|
|
11136
|
+
addTransitionClass(el, leaveActiveClass);
|
|
11137
|
+
nextFrame(() => {
|
|
11138
|
+
if (!el._isLeaving) {
|
|
11139
|
+
return;
|
|
11140
|
+
}
|
|
11141
|
+
removeTransitionClass(el, leaveFromClass);
|
|
11142
|
+
if (legacyClassEnabled && legacyLeaveFromClass) {
|
|
11143
|
+
removeTransitionClass(el, legacyLeaveFromClass);
|
|
11144
|
+
}
|
|
11145
|
+
addTransitionClass(el, leaveToClass);
|
|
11146
|
+
if (!hasExplicitCallback(onLeave)) {
|
|
11147
|
+
whenTransitionEnds(el, type, leaveDuration, resolve);
|
|
11148
|
+
}
|
|
11149
|
+
});
|
|
11150
|
+
callHook(onLeave, [el, resolve]);
|
|
11151
|
+
},
|
|
11152
|
+
onEnterCancelled(el) {
|
|
11153
|
+
finishEnter(el, false);
|
|
11154
|
+
callHook(onEnterCancelled, [el]);
|
|
11155
|
+
},
|
|
11156
|
+
onAppearCancelled(el) {
|
|
11157
|
+
finishEnter(el, true);
|
|
11158
|
+
callHook(onAppearCancelled, [el]);
|
|
11159
|
+
},
|
|
11160
|
+
onLeaveCancelled(el) {
|
|
11161
|
+
finishLeave(el);
|
|
11162
|
+
callHook(onLeaveCancelled, [el]);
|
|
11163
|
+
}
|
|
11164
|
+
});
|
|
11165
|
+
}
|
|
11166
|
+
function normalizeDuration(duration) {
|
|
11167
|
+
if (duration == null) {
|
|
11168
|
+
return null;
|
|
11169
|
+
} else if (isObject(duration)) {
|
|
11170
|
+
return [NumberOf(duration.enter), NumberOf(duration.leave)];
|
|
11171
|
+
} else {
|
|
11172
|
+
const n = NumberOf(duration);
|
|
11173
|
+
return [n, n];
|
|
11174
|
+
}
|
|
11175
|
+
}
|
|
11176
|
+
function NumberOf(val) {
|
|
11177
|
+
const res = toNumber(val);
|
|
11178
|
+
{
|
|
11179
|
+
assertNumber(res, "<transition> explicit duration");
|
|
11180
|
+
}
|
|
11181
|
+
return res;
|
|
11182
|
+
}
|
|
11183
|
+
function addTransitionClass(el, cls) {
|
|
11184
|
+
cls.split(/\s+/).forEach((c) => c && el.classList.add(c));
|
|
11185
|
+
(el[vtcKey] || (el[vtcKey] = /* @__PURE__ */ new Set())).add(cls);
|
|
11186
|
+
}
|
|
11187
|
+
function removeTransitionClass(el, cls) {
|
|
11188
|
+
cls.split(/\s+/).forEach((c) => c && el.classList.remove(c));
|
|
11189
|
+
const _vtc = el[vtcKey];
|
|
11190
|
+
if (_vtc) {
|
|
11191
|
+
_vtc.delete(cls);
|
|
11192
|
+
if (!_vtc.size) {
|
|
11193
|
+
el[vtcKey] = void 0;
|
|
11194
|
+
}
|
|
11195
|
+
}
|
|
11196
|
+
}
|
|
11197
|
+
function nextFrame(cb) {
|
|
11198
|
+
requestAnimationFrame(() => {
|
|
11199
|
+
requestAnimationFrame(cb);
|
|
11200
|
+
});
|
|
11201
|
+
}
|
|
11202
|
+
let endId = 0;
|
|
11203
|
+
function whenTransitionEnds(el, expectedType, explicitTimeout, resolve) {
|
|
11204
|
+
const id = el._endId = ++endId;
|
|
11205
|
+
const resolveIfNotStale = () => {
|
|
11206
|
+
if (id === el._endId) {
|
|
11207
|
+
resolve();
|
|
11208
|
+
}
|
|
11209
|
+
};
|
|
11210
|
+
if (explicitTimeout) {
|
|
11211
|
+
return setTimeout(resolveIfNotStale, explicitTimeout);
|
|
11212
|
+
}
|
|
11213
|
+
const { type, timeout, propCount } = getTransitionInfo(el, expectedType);
|
|
11214
|
+
if (!type) {
|
|
11215
|
+
return resolve();
|
|
11216
|
+
}
|
|
11217
|
+
const endEvent = type + "end";
|
|
11218
|
+
let ended = 0;
|
|
11219
|
+
const end = () => {
|
|
11220
|
+
el.removeEventListener(endEvent, onEnd);
|
|
11221
|
+
resolveIfNotStale();
|
|
11222
|
+
};
|
|
11223
|
+
const onEnd = (e) => {
|
|
11224
|
+
if (e.target === el && ++ended >= propCount) {
|
|
11225
|
+
end();
|
|
11226
|
+
}
|
|
11227
|
+
};
|
|
11228
|
+
setTimeout(() => {
|
|
11229
|
+
if (ended < propCount) {
|
|
11230
|
+
end();
|
|
11231
|
+
}
|
|
11232
|
+
}, timeout + 1);
|
|
11233
|
+
el.addEventListener(endEvent, onEnd);
|
|
11234
|
+
}
|
|
11235
|
+
function getTransitionInfo(el, expectedType) {
|
|
11236
|
+
const styles = window.getComputedStyle(el);
|
|
11237
|
+
const getStyleProperties = (key) => (styles[key] || "").split(", ");
|
|
11238
|
+
const transitionDelays = getStyleProperties(`${TRANSITION$1}Delay`);
|
|
11239
|
+
const transitionDurations = getStyleProperties(`${TRANSITION$1}Duration`);
|
|
11240
|
+
const transitionTimeout = getTimeout(transitionDelays, transitionDurations);
|
|
11241
|
+
const animationDelays = getStyleProperties(`${ANIMATION}Delay`);
|
|
11242
|
+
const animationDurations = getStyleProperties(`${ANIMATION}Duration`);
|
|
11243
|
+
const animationTimeout = getTimeout(animationDelays, animationDurations);
|
|
11244
|
+
let type = null;
|
|
11245
|
+
let timeout = 0;
|
|
11246
|
+
let propCount = 0;
|
|
11247
|
+
if (expectedType === TRANSITION$1) {
|
|
11248
|
+
if (transitionTimeout > 0) {
|
|
11249
|
+
type = TRANSITION$1;
|
|
11250
|
+
timeout = transitionTimeout;
|
|
11251
|
+
propCount = transitionDurations.length;
|
|
11252
|
+
}
|
|
11253
|
+
} else if (expectedType === ANIMATION) {
|
|
11254
|
+
if (animationTimeout > 0) {
|
|
11255
|
+
type = ANIMATION;
|
|
11256
|
+
timeout = animationTimeout;
|
|
11257
|
+
propCount = animationDurations.length;
|
|
11258
|
+
}
|
|
11259
|
+
} else {
|
|
11260
|
+
timeout = Math.max(transitionTimeout, animationTimeout);
|
|
11261
|
+
type = timeout > 0 ? transitionTimeout > animationTimeout ? TRANSITION$1 : ANIMATION : null;
|
|
11262
|
+
propCount = type ? type === TRANSITION$1 ? transitionDurations.length : animationDurations.length : 0;
|
|
11263
|
+
}
|
|
11264
|
+
const hasTransform = type === TRANSITION$1 && /\b(transform|all)(,|$)/.test(
|
|
11265
|
+
getStyleProperties(`${TRANSITION$1}Property`).toString()
|
|
11266
|
+
);
|
|
11267
|
+
return {
|
|
11268
|
+
type,
|
|
11269
|
+
timeout,
|
|
11270
|
+
propCount,
|
|
11271
|
+
hasTransform
|
|
11272
|
+
};
|
|
11273
|
+
}
|
|
11274
|
+
function getTimeout(delays, durations) {
|
|
11275
|
+
while (delays.length < durations.length) {
|
|
11276
|
+
delays = delays.concat(delays);
|
|
11277
|
+
}
|
|
11278
|
+
return Math.max(...durations.map((d, i) => toMs(d) + toMs(delays[i])));
|
|
11279
|
+
}
|
|
11280
|
+
function toMs(s) {
|
|
11281
|
+
if (s === "auto")
|
|
11282
|
+
return 0;
|
|
11283
|
+
return Number(s.slice(0, -1).replace(",", ".")) * 1e3;
|
|
11284
|
+
}
|
|
11285
|
+
function forceReflow() {
|
|
11286
|
+
return document.body.offsetHeight;
|
|
11287
|
+
}
|
|
11288
|
+
|
|
11289
|
+
function patchClass(el, value, isSVG) {
|
|
11290
|
+
const transitionClasses = el[vtcKey];
|
|
11291
|
+
if (transitionClasses) {
|
|
11292
|
+
value = (value ? [value, ...transitionClasses] : [...transitionClasses]).join(" ");
|
|
11293
|
+
}
|
|
11294
|
+
if (value == null) {
|
|
11295
|
+
el.removeAttribute("class");
|
|
11296
|
+
} else if (isSVG) {
|
|
11297
|
+
el.setAttribute("class", value);
|
|
11298
|
+
} else {
|
|
11299
|
+
el.className = value;
|
|
11300
|
+
}
|
|
11301
|
+
}
|
|
11302
|
+
|
|
11303
|
+
const vShowOldKey = Symbol("_vod");
|
|
11304
|
+
const vShow = {
|
|
11305
|
+
beforeMount(el, { value }, { transition }) {
|
|
11306
|
+
el[vShowOldKey] = el.style.display === "none" ? "" : el.style.display;
|
|
11307
|
+
if (transition && value) {
|
|
11308
|
+
transition.beforeEnter(el);
|
|
11309
|
+
} else {
|
|
11310
|
+
setDisplay(el, value);
|
|
11311
|
+
}
|
|
11312
|
+
},
|
|
11313
|
+
mounted(el, { value }, { transition }) {
|
|
11314
|
+
if (transition && value) {
|
|
11315
|
+
transition.enter(el);
|
|
11316
|
+
}
|
|
11317
|
+
},
|
|
11318
|
+
updated(el, { value, oldValue }, { transition }) {
|
|
11319
|
+
if (!value === !oldValue)
|
|
11320
|
+
return;
|
|
11321
|
+
if (transition) {
|
|
11322
|
+
if (value) {
|
|
11323
|
+
transition.beforeEnter(el);
|
|
11324
|
+
setDisplay(el, true);
|
|
11325
|
+
transition.enter(el);
|
|
11326
|
+
} else {
|
|
11327
|
+
transition.leave(el, () => {
|
|
11328
|
+
setDisplay(el, false);
|
|
11329
|
+
});
|
|
11330
|
+
}
|
|
11331
|
+
} else {
|
|
11332
|
+
setDisplay(el, value);
|
|
11333
|
+
}
|
|
11334
|
+
},
|
|
11335
|
+
beforeUnmount(el, { value }) {
|
|
11336
|
+
setDisplay(el, value);
|
|
11337
|
+
}
|
|
11338
|
+
};
|
|
11339
|
+
function setDisplay(el, value) {
|
|
11340
|
+
el.style.display = value ? el[vShowOldKey] : "none";
|
|
11341
|
+
}
|
|
11342
|
+
function initVShowForSSR() {
|
|
11343
|
+
vShow.getSSRProps = ({ value }) => {
|
|
11344
|
+
if (!value) {
|
|
11345
|
+
return { style: { display: "none" } };
|
|
11346
|
+
}
|
|
11347
|
+
};
|
|
11348
|
+
}
|
|
11349
|
+
|
|
11350
|
+
function patchStyle(el, prev, next) {
|
|
11351
|
+
const style = el.style;
|
|
11352
|
+
const isCssString = isString(next);
|
|
11353
|
+
if (next && !isCssString) {
|
|
11354
|
+
if (prev && !isString(prev)) {
|
|
11355
|
+
for (const key in prev) {
|
|
11356
|
+
if (next[key] == null) {
|
|
11357
|
+
setStyle(style, key, "");
|
|
11358
|
+
}
|
|
11359
|
+
}
|
|
11360
|
+
}
|
|
11361
|
+
for (const key in next) {
|
|
11362
|
+
setStyle(style, key, next[key]);
|
|
11363
|
+
}
|
|
11364
|
+
} else {
|
|
11365
|
+
const currentDisplay = style.display;
|
|
11366
|
+
if (isCssString) {
|
|
11367
|
+
if (prev !== next) {
|
|
11368
|
+
style.cssText = next;
|
|
11369
|
+
}
|
|
11370
|
+
} else if (prev) {
|
|
11371
|
+
el.removeAttribute("style");
|
|
11372
|
+
}
|
|
11373
|
+
if (vShowOldKey in el) {
|
|
11374
|
+
style.display = currentDisplay;
|
|
11375
|
+
}
|
|
11376
|
+
}
|
|
11377
|
+
}
|
|
11378
|
+
const semicolonRE = /[^\\];\s*$/;
|
|
11379
|
+
const importantRE = /\s*!important$/;
|
|
11380
|
+
function setStyle(style, name, val) {
|
|
11381
|
+
if (isArray(val)) {
|
|
11382
|
+
val.forEach((v) => setStyle(style, name, v));
|
|
11383
|
+
} else {
|
|
11384
|
+
if (val == null)
|
|
11385
|
+
val = "";
|
|
11386
|
+
{
|
|
11387
|
+
if (semicolonRE.test(val)) {
|
|
11388
|
+
warn(
|
|
11389
|
+
`Unexpected semicolon at the end of '${name}' style value: '${val}'`
|
|
11390
|
+
);
|
|
11391
|
+
}
|
|
11392
|
+
}
|
|
11393
|
+
if (name.startsWith("--")) {
|
|
11394
|
+
style.setProperty(name, val);
|
|
11395
|
+
} else {
|
|
11396
|
+
const prefixed = autoPrefix(style, name);
|
|
11397
|
+
if (importantRE.test(val)) {
|
|
11398
|
+
style.setProperty(
|
|
11399
|
+
hyphenate(prefixed),
|
|
11400
|
+
val.replace(importantRE, ""),
|
|
11401
|
+
"important"
|
|
11402
|
+
);
|
|
11403
|
+
} else {
|
|
11404
|
+
style[prefixed] = val;
|
|
11405
|
+
}
|
|
11406
|
+
}
|
|
11407
|
+
}
|
|
11408
|
+
}
|
|
11409
|
+
const prefixes = ["Webkit", "Moz", "ms"];
|
|
11410
|
+
const prefixCache = {};
|
|
11411
|
+
function autoPrefix(style, rawName) {
|
|
11412
|
+
const cached = prefixCache[rawName];
|
|
11413
|
+
if (cached) {
|
|
11414
|
+
return cached;
|
|
11415
|
+
}
|
|
11416
|
+
let name = camelize(rawName);
|
|
11417
|
+
if (name !== "filter" && name in style) {
|
|
11418
|
+
return prefixCache[rawName] = name;
|
|
11419
|
+
}
|
|
11420
|
+
name = capitalize(name);
|
|
11421
|
+
for (let i = 0; i < prefixes.length; i++) {
|
|
11422
|
+
const prefixed = prefixes[i] + name;
|
|
11423
|
+
if (prefixed in style) {
|
|
11424
|
+
return prefixCache[rawName] = prefixed;
|
|
11425
|
+
}
|
|
11426
|
+
}
|
|
11427
|
+
return rawName;
|
|
11428
|
+
}
|
|
11429
|
+
|
|
11430
|
+
const xlinkNS = "http://www.w3.org/1999/xlink";
|
|
11431
|
+
function patchAttr(el, key, value, isSVG, instance) {
|
|
11432
|
+
if (isSVG && key.startsWith("xlink:")) {
|
|
11433
|
+
if (value == null) {
|
|
11434
|
+
el.removeAttributeNS(xlinkNS, key.slice(6, key.length));
|
|
11435
|
+
} else {
|
|
11436
|
+
el.setAttributeNS(xlinkNS, key, value);
|
|
11437
|
+
}
|
|
11438
|
+
} else {
|
|
11439
|
+
if (compatCoerceAttr(el, key, value, instance)) {
|
|
11440
|
+
return;
|
|
11441
|
+
}
|
|
11442
|
+
const isBoolean = isSpecialBooleanAttr(key);
|
|
11443
|
+
if (value == null || isBoolean && !includeBooleanAttr(value)) {
|
|
11444
|
+
el.removeAttribute(key);
|
|
11445
|
+
} else {
|
|
11446
|
+
el.setAttribute(key, isBoolean ? "" : value);
|
|
11447
|
+
}
|
|
11448
|
+
}
|
|
11449
|
+
}
|
|
11450
|
+
const isEnumeratedAttr = /* @__PURE__ */ makeMap("contenteditable,draggable,spellcheck") ;
|
|
11451
|
+
function compatCoerceAttr(el, key, value, instance = null) {
|
|
11452
|
+
if (isEnumeratedAttr(key)) {
|
|
11453
|
+
const v2CoercedValue = value === null ? "false" : typeof value !== "boolean" && value !== void 0 ? "true" : null;
|
|
11454
|
+
if (v2CoercedValue && compatUtils.softAssertCompatEnabled(
|
|
11455
|
+
"ATTR_ENUMERATED_COERCION",
|
|
11456
|
+
instance,
|
|
11457
|
+
key,
|
|
11458
|
+
value,
|
|
11459
|
+
v2CoercedValue
|
|
11460
|
+
)) {
|
|
11461
|
+
el.setAttribute(key, v2CoercedValue);
|
|
11462
|
+
return true;
|
|
11113
11463
|
}
|
|
11114
11464
|
} else if (value === false && !isSpecialBooleanAttr(key) && compatUtils.softAssertCompatEnabled(
|
|
11115
11465
|
"ATTR_FALSE_VALUE",
|
|
@@ -11164,698 +11514,407 @@ function patchDOMProp(el, key, value, prevChildren, parentComponent, parentSuspe
|
|
|
11164
11514
|
const type = typeof el[key];
|
|
11165
11515
|
if (type === "string" || type === "number") {
|
|
11166
11516
|
compatUtils.warnDeprecation(
|
|
11167
|
-
"ATTR_FALSE_VALUE",
|
|
11168
|
-
parentComponent,
|
|
11169
|
-
key
|
|
11170
|
-
);
|
|
11171
|
-
value = type === "number" ? 0 : "";
|
|
11172
|
-
needRemove = true;
|
|
11173
|
-
}
|
|
11174
|
-
}
|
|
11175
|
-
}
|
|
11176
|
-
try {
|
|
11177
|
-
el[key] = value;
|
|
11178
|
-
} catch (e) {
|
|
11179
|
-
if (!needRemove) {
|
|
11180
|
-
warn(
|
|
11181
|
-
`Failed setting prop "${key}" on <${tag.toLowerCase()}>: value ${value} is invalid.`,
|
|
11182
|
-
e
|
|
11183
|
-
);
|
|
11184
|
-
}
|
|
11185
|
-
}
|
|
11186
|
-
needRemove && el.removeAttribute(key);
|
|
11187
|
-
}
|
|
11188
|
-
|
|
11189
|
-
function addEventListener(el, event, handler, options) {
|
|
11190
|
-
el.addEventListener(event, handler, options);
|
|
11191
|
-
}
|
|
11192
|
-
function removeEventListener(el, event, handler, options) {
|
|
11193
|
-
el.removeEventListener(event, handler, options);
|
|
11194
|
-
}
|
|
11195
|
-
function patchEvent(el, rawName, prevValue, nextValue, instance = null) {
|
|
11196
|
-
const invokers = el._vei || (el._vei = {});
|
|
11197
|
-
const existingInvoker = invokers[rawName];
|
|
11198
|
-
if (nextValue && existingInvoker) {
|
|
11199
|
-
existingInvoker.value = nextValue;
|
|
11200
|
-
} else {
|
|
11201
|
-
const [name, options] = parseName(rawName);
|
|
11202
|
-
if (nextValue) {
|
|
11203
|
-
const invoker = invokers[rawName] = createInvoker(nextValue, instance);
|
|
11204
|
-
addEventListener(el, name, invoker, options);
|
|
11205
|
-
} else if (existingInvoker) {
|
|
11206
|
-
removeEventListener(el, name, existingInvoker, options);
|
|
11207
|
-
invokers[rawName] = void 0;
|
|
11208
|
-
}
|
|
11209
|
-
}
|
|
11210
|
-
}
|
|
11211
|
-
const optionsModifierRE = /(?:Once|Passive|Capture)$/;
|
|
11212
|
-
function parseName(name) {
|
|
11213
|
-
let options;
|
|
11214
|
-
if (optionsModifierRE.test(name)) {
|
|
11215
|
-
options = {};
|
|
11216
|
-
let m;
|
|
11217
|
-
while (m = name.match(optionsModifierRE)) {
|
|
11218
|
-
name = name.slice(0, name.length - m[0].length);
|
|
11219
|
-
options[m[0].toLowerCase()] = true;
|
|
11220
|
-
}
|
|
11221
|
-
}
|
|
11222
|
-
const event = name[2] === ":" ? name.slice(3) : hyphenate(name.slice(2));
|
|
11223
|
-
return [event, options];
|
|
11224
|
-
}
|
|
11225
|
-
let cachedNow = 0;
|
|
11226
|
-
const p = /* @__PURE__ */ Promise.resolve();
|
|
11227
|
-
const getNow = () => cachedNow || (p.then(() => cachedNow = 0), cachedNow = Date.now());
|
|
11228
|
-
function createInvoker(initialValue, instance) {
|
|
11229
|
-
const invoker = (e) => {
|
|
11230
|
-
if (!e._vts) {
|
|
11231
|
-
e._vts = Date.now();
|
|
11232
|
-
} else if (e._vts <= invoker.attached) {
|
|
11233
|
-
return;
|
|
11234
|
-
}
|
|
11235
|
-
callWithAsyncErrorHandling(
|
|
11236
|
-
patchStopImmediatePropagation(e, invoker.value),
|
|
11237
|
-
instance,
|
|
11238
|
-
5,
|
|
11239
|
-
[e]
|
|
11240
|
-
);
|
|
11241
|
-
};
|
|
11242
|
-
invoker.value = initialValue;
|
|
11243
|
-
invoker.attached = getNow();
|
|
11244
|
-
return invoker;
|
|
11245
|
-
}
|
|
11246
|
-
function patchStopImmediatePropagation(e, value) {
|
|
11247
|
-
if (isArray(value)) {
|
|
11248
|
-
const originalStop = e.stopImmediatePropagation;
|
|
11249
|
-
e.stopImmediatePropagation = () => {
|
|
11250
|
-
originalStop.call(e);
|
|
11251
|
-
e._stopped = true;
|
|
11252
|
-
};
|
|
11253
|
-
return value.map((fn) => (e2) => !e2._stopped && fn && fn(e2));
|
|
11254
|
-
} else {
|
|
11255
|
-
return value;
|
|
11256
|
-
}
|
|
11257
|
-
}
|
|
11258
|
-
|
|
11259
|
-
const nativeOnRE = /^on[a-z]/;
|
|
11260
|
-
const patchProp = (el, key, prevValue, nextValue, isSVG = false, prevChildren, parentComponent, parentSuspense, unmountChildren) => {
|
|
11261
|
-
if (key === "class") {
|
|
11262
|
-
patchClass(el, nextValue, isSVG);
|
|
11263
|
-
} else if (key === "style") {
|
|
11264
|
-
patchStyle(el, prevValue, nextValue);
|
|
11265
|
-
} else if (isOn(key)) {
|
|
11266
|
-
if (!isModelListener(key)) {
|
|
11267
|
-
patchEvent(el, key, prevValue, nextValue, parentComponent);
|
|
11268
|
-
}
|
|
11269
|
-
} else if (key[0] === "." ? (key = key.slice(1), true) : key[0] === "^" ? (key = key.slice(1), false) : shouldSetAsProp(el, key, nextValue, isSVG)) {
|
|
11270
|
-
patchDOMProp(
|
|
11271
|
-
el,
|
|
11272
|
-
key,
|
|
11273
|
-
nextValue,
|
|
11274
|
-
prevChildren,
|
|
11275
|
-
parentComponent,
|
|
11276
|
-
parentSuspense,
|
|
11277
|
-
unmountChildren
|
|
11278
|
-
);
|
|
11279
|
-
} else {
|
|
11280
|
-
if (key === "true-value") {
|
|
11281
|
-
el._trueValue = nextValue;
|
|
11282
|
-
} else if (key === "false-value") {
|
|
11283
|
-
el._falseValue = nextValue;
|
|
11284
|
-
}
|
|
11285
|
-
patchAttr(el, key, nextValue, isSVG, parentComponent);
|
|
11286
|
-
}
|
|
11287
|
-
};
|
|
11288
|
-
function shouldSetAsProp(el, key, value, isSVG) {
|
|
11289
|
-
if (isSVG) {
|
|
11290
|
-
if (key === "innerHTML" || key === "textContent") {
|
|
11291
|
-
return true;
|
|
11292
|
-
}
|
|
11293
|
-
if (key in el && nativeOnRE.test(key) && isFunction(value)) {
|
|
11294
|
-
return true;
|
|
11295
|
-
}
|
|
11296
|
-
return false;
|
|
11297
|
-
}
|
|
11298
|
-
if (key === "spellcheck" || key === "draggable" || key === "translate") {
|
|
11299
|
-
return false;
|
|
11300
|
-
}
|
|
11301
|
-
if (key === "form") {
|
|
11302
|
-
return false;
|
|
11303
|
-
}
|
|
11304
|
-
if (key === "list" && el.tagName === "INPUT") {
|
|
11305
|
-
return false;
|
|
11306
|
-
}
|
|
11307
|
-
if (key === "type" && el.tagName === "TEXTAREA") {
|
|
11308
|
-
return false;
|
|
11309
|
-
}
|
|
11310
|
-
if (nativeOnRE.test(key) && isString(value)) {
|
|
11311
|
-
return false;
|
|
11312
|
-
}
|
|
11313
|
-
return key in el;
|
|
11314
|
-
}
|
|
11315
|
-
|
|
11316
|
-
function defineCustomElement(options, hydrate2) {
|
|
11317
|
-
const Comp = defineComponent(options);
|
|
11318
|
-
class VueCustomElement extends VueElement {
|
|
11319
|
-
constructor(initialProps) {
|
|
11320
|
-
super(Comp, initialProps, hydrate2);
|
|
11321
|
-
}
|
|
11322
|
-
}
|
|
11323
|
-
VueCustomElement.def = Comp;
|
|
11324
|
-
return VueCustomElement;
|
|
11325
|
-
}
|
|
11326
|
-
const defineSSRCustomElement = (options) => {
|
|
11327
|
-
return defineCustomElement(options, hydrate);
|
|
11328
|
-
};
|
|
11329
|
-
const BaseClass = typeof HTMLElement !== "undefined" ? HTMLElement : class {
|
|
11330
|
-
};
|
|
11331
|
-
class VueElement extends BaseClass {
|
|
11332
|
-
constructor(_def, _props = {}, hydrate2) {
|
|
11333
|
-
super();
|
|
11334
|
-
this._def = _def;
|
|
11335
|
-
this._props = _props;
|
|
11336
|
-
/**
|
|
11337
|
-
* @internal
|
|
11338
|
-
*/
|
|
11339
|
-
this._instance = null;
|
|
11340
|
-
this._connected = false;
|
|
11341
|
-
this._resolved = false;
|
|
11342
|
-
this._numberProps = null;
|
|
11343
|
-
if (this.shadowRoot && hydrate2) {
|
|
11344
|
-
hydrate2(this._createVNode(), this.shadowRoot);
|
|
11345
|
-
} else {
|
|
11346
|
-
if (this.shadowRoot) {
|
|
11347
|
-
warn(
|
|
11348
|
-
`Custom element has pre-rendered declarative shadow root but is not defined as hydratable. Use \`defineSSRCustomElement\`.`
|
|
11349
|
-
);
|
|
11350
|
-
}
|
|
11351
|
-
this.attachShadow({ mode: "open" });
|
|
11352
|
-
if (!this._def.__asyncLoader) {
|
|
11353
|
-
this._resolveProps(this._def);
|
|
11354
|
-
}
|
|
11355
|
-
}
|
|
11356
|
-
}
|
|
11357
|
-
connectedCallback() {
|
|
11358
|
-
this._connected = true;
|
|
11359
|
-
if (!this._instance) {
|
|
11360
|
-
if (this._resolved) {
|
|
11361
|
-
this._update();
|
|
11362
|
-
} else {
|
|
11363
|
-
this._resolveDef();
|
|
11364
|
-
}
|
|
11365
|
-
}
|
|
11366
|
-
}
|
|
11367
|
-
disconnectedCallback() {
|
|
11368
|
-
this._connected = false;
|
|
11369
|
-
nextTick(() => {
|
|
11370
|
-
if (!this._connected) {
|
|
11371
|
-
render(null, this.shadowRoot);
|
|
11372
|
-
this._instance = null;
|
|
11373
|
-
}
|
|
11374
|
-
});
|
|
11375
|
-
}
|
|
11376
|
-
/**
|
|
11377
|
-
* resolve inner component definition (handle possible async component)
|
|
11378
|
-
*/
|
|
11379
|
-
_resolveDef() {
|
|
11380
|
-
this._resolved = true;
|
|
11381
|
-
for (let i = 0; i < this.attributes.length; i++) {
|
|
11382
|
-
this._setAttr(this.attributes[i].name);
|
|
11383
|
-
}
|
|
11384
|
-
new MutationObserver((mutations) => {
|
|
11385
|
-
for (const m of mutations) {
|
|
11386
|
-
this._setAttr(m.attributeName);
|
|
11387
|
-
}
|
|
11388
|
-
}).observe(this, { attributes: true });
|
|
11389
|
-
const resolve = (def, isAsync = false) => {
|
|
11390
|
-
const { props, styles } = def;
|
|
11391
|
-
let numberProps;
|
|
11392
|
-
if (props && !isArray(props)) {
|
|
11393
|
-
for (const key in props) {
|
|
11394
|
-
const opt = props[key];
|
|
11395
|
-
if (opt === Number || opt && opt.type === Number) {
|
|
11396
|
-
if (key in this._props) {
|
|
11397
|
-
this._props[key] = toNumber(this._props[key]);
|
|
11398
|
-
}
|
|
11399
|
-
(numberProps || (numberProps = /* @__PURE__ */ Object.create(null)))[camelize(key)] = true;
|
|
11400
|
-
}
|
|
11401
|
-
}
|
|
11402
|
-
}
|
|
11403
|
-
this._numberProps = numberProps;
|
|
11404
|
-
if (isAsync) {
|
|
11405
|
-
this._resolveProps(def);
|
|
11406
|
-
}
|
|
11407
|
-
this._applyStyles(styles);
|
|
11408
|
-
this._update();
|
|
11409
|
-
};
|
|
11410
|
-
const asyncDef = this._def.__asyncLoader;
|
|
11411
|
-
if (asyncDef) {
|
|
11412
|
-
asyncDef().then((def) => resolve(def, true));
|
|
11413
|
-
} else {
|
|
11414
|
-
resolve(this._def);
|
|
11415
|
-
}
|
|
11416
|
-
}
|
|
11417
|
-
_resolveProps(def) {
|
|
11418
|
-
const { props } = def;
|
|
11419
|
-
const declaredPropKeys = isArray(props) ? props : Object.keys(props || {});
|
|
11420
|
-
for (const key of Object.keys(this)) {
|
|
11421
|
-
if (key[0] !== "_" && declaredPropKeys.includes(key)) {
|
|
11422
|
-
this._setProp(key, this[key], true, false);
|
|
11517
|
+
"ATTR_FALSE_VALUE",
|
|
11518
|
+
parentComponent,
|
|
11519
|
+
key
|
|
11520
|
+
);
|
|
11521
|
+
value = type === "number" ? 0 : "";
|
|
11522
|
+
needRemove = true;
|
|
11423
11523
|
}
|
|
11424
11524
|
}
|
|
11425
|
-
for (const key of declaredPropKeys.map(camelize)) {
|
|
11426
|
-
Object.defineProperty(this, key, {
|
|
11427
|
-
get() {
|
|
11428
|
-
return this._getProp(key);
|
|
11429
|
-
},
|
|
11430
|
-
set(val) {
|
|
11431
|
-
this._setProp(key, val);
|
|
11432
|
-
}
|
|
11433
|
-
});
|
|
11434
|
-
}
|
|
11435
11525
|
}
|
|
11436
|
-
|
|
11437
|
-
|
|
11438
|
-
|
|
11439
|
-
if (
|
|
11440
|
-
|
|
11526
|
+
try {
|
|
11527
|
+
el[key] = value;
|
|
11528
|
+
} catch (e) {
|
|
11529
|
+
if (!needRemove) {
|
|
11530
|
+
warn(
|
|
11531
|
+
`Failed setting prop "${key}" on <${tag.toLowerCase()}>: value ${value} is invalid.`,
|
|
11532
|
+
e
|
|
11533
|
+
);
|
|
11441
11534
|
}
|
|
11442
|
-
this._setProp(camelKey, value, false);
|
|
11443
|
-
}
|
|
11444
|
-
/**
|
|
11445
|
-
* @internal
|
|
11446
|
-
*/
|
|
11447
|
-
_getProp(key) {
|
|
11448
|
-
return this._props[key];
|
|
11449
11535
|
}
|
|
11450
|
-
|
|
11451
|
-
|
|
11452
|
-
|
|
11453
|
-
|
|
11454
|
-
|
|
11455
|
-
|
|
11456
|
-
|
|
11457
|
-
|
|
11458
|
-
|
|
11459
|
-
|
|
11460
|
-
|
|
11461
|
-
|
|
11462
|
-
|
|
11463
|
-
|
|
11464
|
-
|
|
11465
|
-
|
|
11466
|
-
|
|
11467
|
-
|
|
11536
|
+
needRemove && el.removeAttribute(key);
|
|
11537
|
+
}
|
|
11538
|
+
|
|
11539
|
+
function addEventListener(el, event, handler, options) {
|
|
11540
|
+
el.addEventListener(event, handler, options);
|
|
11541
|
+
}
|
|
11542
|
+
function removeEventListener(el, event, handler, options) {
|
|
11543
|
+
el.removeEventListener(event, handler, options);
|
|
11544
|
+
}
|
|
11545
|
+
const veiKey = Symbol("_vei");
|
|
11546
|
+
function patchEvent(el, rawName, prevValue, nextValue, instance = null) {
|
|
11547
|
+
const invokers = el[veiKey] || (el[veiKey] = {});
|
|
11548
|
+
const existingInvoker = invokers[rawName];
|
|
11549
|
+
if (nextValue && existingInvoker) {
|
|
11550
|
+
existingInvoker.value = nextValue;
|
|
11551
|
+
} else {
|
|
11552
|
+
const [name, options] = parseName(rawName);
|
|
11553
|
+
if (nextValue) {
|
|
11554
|
+
const invoker = invokers[rawName] = createInvoker(nextValue, instance);
|
|
11555
|
+
addEventListener(el, name, invoker, options);
|
|
11556
|
+
} else if (existingInvoker) {
|
|
11557
|
+
removeEventListener(el, name, existingInvoker, options);
|
|
11558
|
+
invokers[rawName] = void 0;
|
|
11468
11559
|
}
|
|
11469
11560
|
}
|
|
11470
|
-
|
|
11471
|
-
|
|
11472
|
-
|
|
11473
|
-
|
|
11474
|
-
|
|
11475
|
-
|
|
11476
|
-
|
|
11477
|
-
|
|
11478
|
-
|
|
11479
|
-
|
|
11480
|
-
instance.ceReload = (newStyles) => {
|
|
11481
|
-
if (this._styles) {
|
|
11482
|
-
this._styles.forEach((s) => this.shadowRoot.removeChild(s));
|
|
11483
|
-
this._styles.length = 0;
|
|
11484
|
-
}
|
|
11485
|
-
this._applyStyles(newStyles);
|
|
11486
|
-
this._instance = null;
|
|
11487
|
-
this._update();
|
|
11488
|
-
};
|
|
11489
|
-
}
|
|
11490
|
-
const dispatch = (event, args) => {
|
|
11491
|
-
this.dispatchEvent(
|
|
11492
|
-
new CustomEvent(event, {
|
|
11493
|
-
detail: args
|
|
11494
|
-
})
|
|
11495
|
-
);
|
|
11496
|
-
};
|
|
11497
|
-
instance.emit = (event, ...args) => {
|
|
11498
|
-
dispatch(event, args);
|
|
11499
|
-
if (hyphenate(event) !== event) {
|
|
11500
|
-
dispatch(hyphenate(event), args);
|
|
11501
|
-
}
|
|
11502
|
-
};
|
|
11503
|
-
let parent = this;
|
|
11504
|
-
while (parent = parent && (parent.parentNode || parent.host)) {
|
|
11505
|
-
if (parent instanceof VueElement) {
|
|
11506
|
-
instance.parent = parent._instance;
|
|
11507
|
-
instance.provides = parent._instance.provides;
|
|
11508
|
-
break;
|
|
11509
|
-
}
|
|
11510
|
-
}
|
|
11511
|
-
};
|
|
11561
|
+
}
|
|
11562
|
+
const optionsModifierRE = /(?:Once|Passive|Capture)$/;
|
|
11563
|
+
function parseName(name) {
|
|
11564
|
+
let options;
|
|
11565
|
+
if (optionsModifierRE.test(name)) {
|
|
11566
|
+
options = {};
|
|
11567
|
+
let m;
|
|
11568
|
+
while (m = name.match(optionsModifierRE)) {
|
|
11569
|
+
name = name.slice(0, name.length - m[0].length);
|
|
11570
|
+
options[m[0].toLowerCase()] = true;
|
|
11512
11571
|
}
|
|
11513
|
-
return vnode;
|
|
11514
11572
|
}
|
|
11515
|
-
|
|
11516
|
-
|
|
11517
|
-
|
|
11518
|
-
|
|
11519
|
-
|
|
11520
|
-
|
|
11521
|
-
|
|
11522
|
-
|
|
11523
|
-
|
|
11524
|
-
|
|
11573
|
+
const event = name[2] === ":" ? name.slice(3) : hyphenate(name.slice(2));
|
|
11574
|
+
return [event, options];
|
|
11575
|
+
}
|
|
11576
|
+
let cachedNow = 0;
|
|
11577
|
+
const p = /* @__PURE__ */ Promise.resolve();
|
|
11578
|
+
const getNow = () => cachedNow || (p.then(() => cachedNow = 0), cachedNow = Date.now());
|
|
11579
|
+
function createInvoker(initialValue, instance) {
|
|
11580
|
+
const invoker = (e) => {
|
|
11581
|
+
if (!e._vts) {
|
|
11582
|
+
e._vts = Date.now();
|
|
11583
|
+
} else if (e._vts <= invoker.attached) {
|
|
11584
|
+
return;
|
|
11525
11585
|
}
|
|
11586
|
+
callWithAsyncErrorHandling(
|
|
11587
|
+
patchStopImmediatePropagation(e, invoker.value),
|
|
11588
|
+
instance,
|
|
11589
|
+
5,
|
|
11590
|
+
[e]
|
|
11591
|
+
);
|
|
11592
|
+
};
|
|
11593
|
+
invoker.value = initialValue;
|
|
11594
|
+
invoker.attached = getNow();
|
|
11595
|
+
return invoker;
|
|
11596
|
+
}
|
|
11597
|
+
function patchStopImmediatePropagation(e, value) {
|
|
11598
|
+
if (isArray(value)) {
|
|
11599
|
+
const originalStop = e.stopImmediatePropagation;
|
|
11600
|
+
e.stopImmediatePropagation = () => {
|
|
11601
|
+
originalStop.call(e);
|
|
11602
|
+
e._stopped = true;
|
|
11603
|
+
};
|
|
11604
|
+
return value.map((fn) => (e2) => !e2._stopped && fn && fn(e2));
|
|
11605
|
+
} else {
|
|
11606
|
+
return value;
|
|
11526
11607
|
}
|
|
11527
11608
|
}
|
|
11528
11609
|
|
|
11529
|
-
|
|
11530
|
-
|
|
11531
|
-
|
|
11532
|
-
|
|
11533
|
-
|
|
11534
|
-
|
|
11535
|
-
|
|
11536
|
-
|
|
11537
|
-
|
|
11538
|
-
warn(`Current instance does not have CSS modules injected.`);
|
|
11539
|
-
return EMPTY_OBJ;
|
|
11610
|
+
const nativeOnRE = /^on[a-z]/;
|
|
11611
|
+
const patchProp = (el, key, prevValue, nextValue, isSVG = false, prevChildren, parentComponent, parentSuspense, unmountChildren) => {
|
|
11612
|
+
if (key === "class") {
|
|
11613
|
+
patchClass(el, nextValue, isSVG);
|
|
11614
|
+
} else if (key === "style") {
|
|
11615
|
+
patchStyle(el, prevValue, nextValue);
|
|
11616
|
+
} else if (isOn(key)) {
|
|
11617
|
+
if (!isModelListener(key)) {
|
|
11618
|
+
patchEvent(el, key, prevValue, nextValue, parentComponent);
|
|
11540
11619
|
}
|
|
11541
|
-
|
|
11542
|
-
|
|
11543
|
-
|
|
11544
|
-
|
|
11620
|
+
} else if (key[0] === "." ? (key = key.slice(1), true) : key[0] === "^" ? (key = key.slice(1), false) : shouldSetAsProp(el, key, nextValue, isSVG)) {
|
|
11621
|
+
patchDOMProp(
|
|
11622
|
+
el,
|
|
11623
|
+
key,
|
|
11624
|
+
nextValue,
|
|
11625
|
+
prevChildren,
|
|
11626
|
+
parentComponent,
|
|
11627
|
+
parentSuspense,
|
|
11628
|
+
unmountChildren
|
|
11629
|
+
);
|
|
11630
|
+
} else {
|
|
11631
|
+
if (key === "true-value") {
|
|
11632
|
+
el._trueValue = nextValue;
|
|
11633
|
+
} else if (key === "false-value") {
|
|
11634
|
+
el._falseValue = nextValue;
|
|
11545
11635
|
}
|
|
11546
|
-
|
|
11636
|
+
patchAttr(el, key, nextValue, isSVG, parentComponent);
|
|
11547
11637
|
}
|
|
11548
|
-
}
|
|
11549
|
-
|
|
11550
|
-
function useCssVars(getter) {
|
|
11551
|
-
return;
|
|
11552
|
-
}
|
|
11553
|
-
|
|
11554
|
-
const TRANSITION$1 = "transition";
|
|
11555
|
-
const ANIMATION = "animation";
|
|
11556
|
-
const Transition = (props, { slots }) => h(BaseTransition, resolveTransitionProps(props), slots);
|
|
11557
|
-
Transition.displayName = "Transition";
|
|
11558
|
-
{
|
|
11559
|
-
Transition.__isBuiltIn = true;
|
|
11560
|
-
}
|
|
11561
|
-
const DOMTransitionPropsValidators = {
|
|
11562
|
-
name: String,
|
|
11563
|
-
type: String,
|
|
11564
|
-
css: {
|
|
11565
|
-
type: Boolean,
|
|
11566
|
-
default: true
|
|
11567
|
-
},
|
|
11568
|
-
duration: [String, Number, Object],
|
|
11569
|
-
enterFromClass: String,
|
|
11570
|
-
enterActiveClass: String,
|
|
11571
|
-
enterToClass: String,
|
|
11572
|
-
appearFromClass: String,
|
|
11573
|
-
appearActiveClass: String,
|
|
11574
|
-
appearToClass: String,
|
|
11575
|
-
leaveFromClass: String,
|
|
11576
|
-
leaveActiveClass: String,
|
|
11577
|
-
leaveToClass: String
|
|
11578
11638
|
};
|
|
11579
|
-
|
|
11580
|
-
{
|
|
11581
|
-
|
|
11582
|
-
|
|
11583
|
-
|
|
11584
|
-
|
|
11585
|
-
|
|
11586
|
-
|
|
11587
|
-
|
|
11588
|
-
|
|
11639
|
+
function shouldSetAsProp(el, key, value, isSVG) {
|
|
11640
|
+
if (isSVG) {
|
|
11641
|
+
if (key === "innerHTML" || key === "textContent") {
|
|
11642
|
+
return true;
|
|
11643
|
+
}
|
|
11644
|
+
if (key in el && nativeOnRE.test(key) && isFunction(value)) {
|
|
11645
|
+
return true;
|
|
11646
|
+
}
|
|
11647
|
+
return false;
|
|
11648
|
+
}
|
|
11649
|
+
if (key === "spellcheck" || key === "draggable" || key === "translate") {
|
|
11650
|
+
return false;
|
|
11651
|
+
}
|
|
11652
|
+
if (key === "form") {
|
|
11653
|
+
return false;
|
|
11654
|
+
}
|
|
11655
|
+
if (key === "list" && el.tagName === "INPUT") {
|
|
11656
|
+
return false;
|
|
11657
|
+
}
|
|
11658
|
+
if (key === "type" && el.tagName === "TEXTAREA") {
|
|
11659
|
+
return false;
|
|
11660
|
+
}
|
|
11661
|
+
if (nativeOnRE.test(key) && isString(value)) {
|
|
11662
|
+
return false;
|
|
11663
|
+
}
|
|
11664
|
+
return key in el;
|
|
11665
|
+
}
|
|
11666
|
+
|
|
11667
|
+
/*! #__NO_SIDE_EFFECTS__ */
|
|
11668
|
+
// @__NO_SIDE_EFFECTS__
|
|
11669
|
+
function defineCustomElement(options, hydrate2) {
|
|
11670
|
+
const Comp = defineComponent(options);
|
|
11671
|
+
class VueCustomElement extends VueElement {
|
|
11672
|
+
constructor(initialProps) {
|
|
11673
|
+
super(Comp, initialProps, hydrate2);
|
|
11674
|
+
}
|
|
11589
11675
|
}
|
|
11676
|
+
VueCustomElement.def = Comp;
|
|
11677
|
+
return VueCustomElement;
|
|
11678
|
+
}
|
|
11679
|
+
/*! #__NO_SIDE_EFFECTS__ */
|
|
11680
|
+
const defineSSRCustomElement = /* @__NO_SIDE_EFFECTS__ */ (options) => {
|
|
11681
|
+
return /* @__PURE__ */ defineCustomElement(options, hydrate);
|
|
11590
11682
|
};
|
|
11591
|
-
const
|
|
11592
|
-
return hook ? isArray(hook) ? hook.some((h2) => h2.length > 1) : hook.length > 1 : false;
|
|
11683
|
+
const BaseClass = typeof HTMLElement !== "undefined" ? HTMLElement : class {
|
|
11593
11684
|
};
|
|
11594
|
-
|
|
11595
|
-
|
|
11596
|
-
|
|
11597
|
-
|
|
11598
|
-
|
|
11685
|
+
class VueElement extends BaseClass {
|
|
11686
|
+
constructor(_def, _props = {}, hydrate2) {
|
|
11687
|
+
super();
|
|
11688
|
+
this._def = _def;
|
|
11689
|
+
this._props = _props;
|
|
11690
|
+
/**
|
|
11691
|
+
* @internal
|
|
11692
|
+
*/
|
|
11693
|
+
this._instance = null;
|
|
11694
|
+
this._connected = false;
|
|
11695
|
+
this._resolved = false;
|
|
11696
|
+
this._numberProps = null;
|
|
11697
|
+
this._ob = null;
|
|
11698
|
+
if (this.shadowRoot && hydrate2) {
|
|
11699
|
+
hydrate2(this._createVNode(), this.shadowRoot);
|
|
11700
|
+
} else {
|
|
11701
|
+
if (this.shadowRoot) {
|
|
11702
|
+
warn(
|
|
11703
|
+
`Custom element has pre-rendered declarative shadow root but is not defined as hydratable. Use \`defineSSRCustomElement\`.`
|
|
11704
|
+
);
|
|
11705
|
+
}
|
|
11706
|
+
this.attachShadow({ mode: "open" });
|
|
11707
|
+
if (!this._def.__asyncLoader) {
|
|
11708
|
+
this._resolveProps(this._def);
|
|
11709
|
+
}
|
|
11599
11710
|
}
|
|
11600
11711
|
}
|
|
11601
|
-
|
|
11602
|
-
|
|
11603
|
-
|
|
11604
|
-
|
|
11605
|
-
|
|
11606
|
-
|
|
11607
|
-
|
|
11608
|
-
|
|
11609
|
-
enterActiveClass = `${name}-enter-active`,
|
|
11610
|
-
enterToClass = `${name}-enter-to`,
|
|
11611
|
-
appearFromClass = enterFromClass,
|
|
11612
|
-
appearActiveClass = enterActiveClass,
|
|
11613
|
-
appearToClass = enterToClass,
|
|
11614
|
-
leaveFromClass = `${name}-leave-from`,
|
|
11615
|
-
leaveActiveClass = `${name}-leave-active`,
|
|
11616
|
-
leaveToClass = `${name}-leave-to`
|
|
11617
|
-
} = rawProps;
|
|
11618
|
-
const legacyClassEnabled = compatUtils.isCompatEnabled("TRANSITION_CLASSES", null);
|
|
11619
|
-
let legacyEnterFromClass;
|
|
11620
|
-
let legacyAppearFromClass;
|
|
11621
|
-
let legacyLeaveFromClass;
|
|
11622
|
-
if (legacyClassEnabled) {
|
|
11623
|
-
const toLegacyClass = (cls) => cls.replace(/-from$/, "");
|
|
11624
|
-
if (!rawProps.enterFromClass) {
|
|
11625
|
-
legacyEnterFromClass = toLegacyClass(enterFromClass);
|
|
11626
|
-
}
|
|
11627
|
-
if (!rawProps.appearFromClass) {
|
|
11628
|
-
legacyAppearFromClass = toLegacyClass(appearFromClass);
|
|
11712
|
+
connectedCallback() {
|
|
11713
|
+
this._connected = true;
|
|
11714
|
+
if (!this._instance) {
|
|
11715
|
+
if (this._resolved) {
|
|
11716
|
+
this._update();
|
|
11717
|
+
} else {
|
|
11718
|
+
this._resolveDef();
|
|
11719
|
+
}
|
|
11629
11720
|
}
|
|
11630
|
-
|
|
11631
|
-
|
|
11721
|
+
}
|
|
11722
|
+
disconnectedCallback() {
|
|
11723
|
+
this._connected = false;
|
|
11724
|
+
if (this._ob) {
|
|
11725
|
+
this._ob.disconnect();
|
|
11726
|
+
this._ob = null;
|
|
11632
11727
|
}
|
|
11728
|
+
nextTick(() => {
|
|
11729
|
+
if (!this._connected) {
|
|
11730
|
+
render(null, this.shadowRoot);
|
|
11731
|
+
this._instance = null;
|
|
11732
|
+
}
|
|
11733
|
+
});
|
|
11633
11734
|
}
|
|
11634
|
-
|
|
11635
|
-
|
|
11636
|
-
|
|
11637
|
-
|
|
11638
|
-
|
|
11639
|
-
|
|
11640
|
-
|
|
11641
|
-
|
|
11642
|
-
|
|
11643
|
-
|
|
11644
|
-
|
|
11645
|
-
|
|
11646
|
-
|
|
11647
|
-
|
|
11648
|
-
|
|
11649
|
-
|
|
11650
|
-
|
|
11651
|
-
|
|
11652
|
-
|
|
11653
|
-
|
|
11654
|
-
|
|
11655
|
-
|
|
11656
|
-
|
|
11657
|
-
|
|
11658
|
-
|
|
11659
|
-
const makeEnterHook = (isAppear) => {
|
|
11660
|
-
return (el, done) => {
|
|
11661
|
-
const hook = isAppear ? onAppear : onEnter;
|
|
11662
|
-
const resolve = () => finishEnter(el, isAppear, done);
|
|
11663
|
-
callHook(hook, [el, resolve]);
|
|
11664
|
-
nextFrame(() => {
|
|
11665
|
-
removeTransitionClass(el, isAppear ? appearFromClass : enterFromClass);
|
|
11666
|
-
if (legacyClassEnabled) {
|
|
11667
|
-
const legacyClass = isAppear ? legacyAppearFromClass : legacyEnterFromClass;
|
|
11668
|
-
if (legacyClass) {
|
|
11669
|
-
removeTransitionClass(el, legacyClass);
|
|
11735
|
+
/**
|
|
11736
|
+
* resolve inner component definition (handle possible async component)
|
|
11737
|
+
*/
|
|
11738
|
+
_resolveDef() {
|
|
11739
|
+
this._resolved = true;
|
|
11740
|
+
for (let i = 0; i < this.attributes.length; i++) {
|
|
11741
|
+
this._setAttr(this.attributes[i].name);
|
|
11742
|
+
}
|
|
11743
|
+
this._ob = new MutationObserver((mutations) => {
|
|
11744
|
+
for (const m of mutations) {
|
|
11745
|
+
this._setAttr(m.attributeName);
|
|
11746
|
+
}
|
|
11747
|
+
});
|
|
11748
|
+
this._ob.observe(this, { attributes: true });
|
|
11749
|
+
const resolve = (def, isAsync = false) => {
|
|
11750
|
+
const { props, styles } = def;
|
|
11751
|
+
let numberProps;
|
|
11752
|
+
if (props && !isArray(props)) {
|
|
11753
|
+
for (const key in props) {
|
|
11754
|
+
const opt = props[key];
|
|
11755
|
+
if (opt === Number || opt && opt.type === Number) {
|
|
11756
|
+
if (key in this._props) {
|
|
11757
|
+
this._props[key] = toNumber(this._props[key]);
|
|
11758
|
+
}
|
|
11759
|
+
(numberProps || (numberProps = /* @__PURE__ */ Object.create(null)))[camelize(key)] = true;
|
|
11670
11760
|
}
|
|
11671
11761
|
}
|
|
11672
|
-
addTransitionClass(el, isAppear ? appearToClass : enterToClass);
|
|
11673
|
-
if (!hasExplicitCallback(hook)) {
|
|
11674
|
-
whenTransitionEnds(el, type, enterDuration, resolve);
|
|
11675
|
-
}
|
|
11676
|
-
});
|
|
11677
|
-
};
|
|
11678
|
-
};
|
|
11679
|
-
return extend(baseProps, {
|
|
11680
|
-
onBeforeEnter(el) {
|
|
11681
|
-
callHook(onBeforeEnter, [el]);
|
|
11682
|
-
addTransitionClass(el, enterFromClass);
|
|
11683
|
-
if (legacyClassEnabled && legacyEnterFromClass) {
|
|
11684
|
-
addTransitionClass(el, legacyEnterFromClass);
|
|
11685
11762
|
}
|
|
11686
|
-
|
|
11687
|
-
|
|
11688
|
-
|
|
11689
|
-
callHook(onBeforeAppear, [el]);
|
|
11690
|
-
addTransitionClass(el, appearFromClass);
|
|
11691
|
-
if (legacyClassEnabled && legacyAppearFromClass) {
|
|
11692
|
-
addTransitionClass(el, legacyAppearFromClass);
|
|
11763
|
+
this._numberProps = numberProps;
|
|
11764
|
+
if (isAsync) {
|
|
11765
|
+
this._resolveProps(def);
|
|
11693
11766
|
}
|
|
11694
|
-
|
|
11695
|
-
|
|
11696
|
-
|
|
11697
|
-
|
|
11698
|
-
|
|
11699
|
-
|
|
11700
|
-
|
|
11701
|
-
|
|
11702
|
-
|
|
11703
|
-
|
|
11767
|
+
this._applyStyles(styles);
|
|
11768
|
+
this._update();
|
|
11769
|
+
};
|
|
11770
|
+
const asyncDef = this._def.__asyncLoader;
|
|
11771
|
+
if (asyncDef) {
|
|
11772
|
+
asyncDef().then((def) => resolve(def, true));
|
|
11773
|
+
} else {
|
|
11774
|
+
resolve(this._def);
|
|
11775
|
+
}
|
|
11776
|
+
}
|
|
11777
|
+
_resolveProps(def) {
|
|
11778
|
+
const { props } = def;
|
|
11779
|
+
const declaredPropKeys = isArray(props) ? props : Object.keys(props || {});
|
|
11780
|
+
for (const key of Object.keys(this)) {
|
|
11781
|
+
if (key[0] !== "_" && declaredPropKeys.includes(key)) {
|
|
11782
|
+
this._setProp(key, this[key], true, false);
|
|
11704
11783
|
}
|
|
11705
|
-
forceReflow();
|
|
11706
|
-
addTransitionClass(el, leaveActiveClass);
|
|
11707
|
-
nextFrame(() => {
|
|
11708
|
-
if (!el._isLeaving) {
|
|
11709
|
-
return;
|
|
11710
|
-
}
|
|
11711
|
-
removeTransitionClass(el, leaveFromClass);
|
|
11712
|
-
if (legacyClassEnabled && legacyLeaveFromClass) {
|
|
11713
|
-
removeTransitionClass(el, legacyLeaveFromClass);
|
|
11714
|
-
}
|
|
11715
|
-
addTransitionClass(el, leaveToClass);
|
|
11716
|
-
if (!hasExplicitCallback(onLeave)) {
|
|
11717
|
-
whenTransitionEnds(el, type, leaveDuration, resolve);
|
|
11718
|
-
}
|
|
11719
|
-
});
|
|
11720
|
-
callHook(onLeave, [el, resolve]);
|
|
11721
|
-
},
|
|
11722
|
-
onEnterCancelled(el) {
|
|
11723
|
-
finishEnter(el, false);
|
|
11724
|
-
callHook(onEnterCancelled, [el]);
|
|
11725
|
-
},
|
|
11726
|
-
onAppearCancelled(el) {
|
|
11727
|
-
finishEnter(el, true);
|
|
11728
|
-
callHook(onAppearCancelled, [el]);
|
|
11729
|
-
},
|
|
11730
|
-
onLeaveCancelled(el) {
|
|
11731
|
-
finishLeave(el);
|
|
11732
|
-
callHook(onLeaveCancelled, [el]);
|
|
11733
11784
|
}
|
|
11734
|
-
|
|
11735
|
-
|
|
11736
|
-
|
|
11737
|
-
|
|
11738
|
-
|
|
11739
|
-
|
|
11740
|
-
|
|
11741
|
-
|
|
11742
|
-
|
|
11743
|
-
|
|
11744
|
-
}
|
|
11745
|
-
}
|
|
11746
|
-
function NumberOf(val) {
|
|
11747
|
-
const res = toNumber(val);
|
|
11748
|
-
{
|
|
11749
|
-
assertNumber(res, "<transition> explicit duration");
|
|
11785
|
+
for (const key of declaredPropKeys.map(camelize)) {
|
|
11786
|
+
Object.defineProperty(this, key, {
|
|
11787
|
+
get() {
|
|
11788
|
+
return this._getProp(key);
|
|
11789
|
+
},
|
|
11790
|
+
set(val) {
|
|
11791
|
+
this._setProp(key, val);
|
|
11792
|
+
}
|
|
11793
|
+
});
|
|
11794
|
+
}
|
|
11750
11795
|
}
|
|
11751
|
-
|
|
11752
|
-
|
|
11753
|
-
|
|
11754
|
-
|
|
11755
|
-
|
|
11756
|
-
}
|
|
11757
|
-
function removeTransitionClass(el, cls) {
|
|
11758
|
-
cls.split(/\s+/).forEach((c) => c && el.classList.remove(c));
|
|
11759
|
-
const { _vtc } = el;
|
|
11760
|
-
if (_vtc) {
|
|
11761
|
-
_vtc.delete(cls);
|
|
11762
|
-
if (!_vtc.size) {
|
|
11763
|
-
el._vtc = void 0;
|
|
11796
|
+
_setAttr(key) {
|
|
11797
|
+
let value = this.getAttribute(key);
|
|
11798
|
+
const camelKey = camelize(key);
|
|
11799
|
+
if (this._numberProps && this._numberProps[camelKey]) {
|
|
11800
|
+
value = toNumber(value);
|
|
11764
11801
|
}
|
|
11802
|
+
this._setProp(camelKey, value, false);
|
|
11765
11803
|
}
|
|
11766
|
-
|
|
11767
|
-
|
|
11768
|
-
|
|
11769
|
-
|
|
11770
|
-
|
|
11771
|
-
}
|
|
11772
|
-
|
|
11773
|
-
|
|
11774
|
-
|
|
11775
|
-
|
|
11776
|
-
if (
|
|
11777
|
-
|
|
11804
|
+
/**
|
|
11805
|
+
* @internal
|
|
11806
|
+
*/
|
|
11807
|
+
_getProp(key) {
|
|
11808
|
+
return this._props[key];
|
|
11809
|
+
}
|
|
11810
|
+
/**
|
|
11811
|
+
* @internal
|
|
11812
|
+
*/
|
|
11813
|
+
_setProp(key, val, shouldReflect = true, shouldUpdate = true) {
|
|
11814
|
+
if (val !== this._props[key]) {
|
|
11815
|
+
this._props[key] = val;
|
|
11816
|
+
if (shouldUpdate && this._instance) {
|
|
11817
|
+
this._update();
|
|
11818
|
+
}
|
|
11819
|
+
if (shouldReflect) {
|
|
11820
|
+
if (val === true) {
|
|
11821
|
+
this.setAttribute(hyphenate(key), "");
|
|
11822
|
+
} else if (typeof val === "string" || typeof val === "number") {
|
|
11823
|
+
this.setAttribute(hyphenate(key), val + "");
|
|
11824
|
+
} else if (!val) {
|
|
11825
|
+
this.removeAttribute(hyphenate(key));
|
|
11826
|
+
}
|
|
11827
|
+
}
|
|
11778
11828
|
}
|
|
11779
|
-
};
|
|
11780
|
-
if (explicitTimeout) {
|
|
11781
|
-
return setTimeout(resolveIfNotStale, explicitTimeout);
|
|
11782
11829
|
}
|
|
11783
|
-
|
|
11784
|
-
|
|
11785
|
-
return resolve();
|
|
11830
|
+
_update() {
|
|
11831
|
+
render(this._createVNode(), this.shadowRoot);
|
|
11786
11832
|
}
|
|
11787
|
-
|
|
11788
|
-
|
|
11789
|
-
|
|
11790
|
-
|
|
11791
|
-
|
|
11792
|
-
|
|
11793
|
-
|
|
11794
|
-
|
|
11795
|
-
|
|
11833
|
+
_createVNode() {
|
|
11834
|
+
const vnode = createVNode(this._def, extend({}, this._props));
|
|
11835
|
+
if (!this._instance) {
|
|
11836
|
+
vnode.ce = (instance) => {
|
|
11837
|
+
this._instance = instance;
|
|
11838
|
+
instance.isCE = true;
|
|
11839
|
+
{
|
|
11840
|
+
instance.ceReload = (newStyles) => {
|
|
11841
|
+
if (this._styles) {
|
|
11842
|
+
this._styles.forEach((s) => this.shadowRoot.removeChild(s));
|
|
11843
|
+
this._styles.length = 0;
|
|
11844
|
+
}
|
|
11845
|
+
this._applyStyles(newStyles);
|
|
11846
|
+
this._instance = null;
|
|
11847
|
+
this._update();
|
|
11848
|
+
};
|
|
11849
|
+
}
|
|
11850
|
+
const dispatch = (event, args) => {
|
|
11851
|
+
this.dispatchEvent(
|
|
11852
|
+
new CustomEvent(event, {
|
|
11853
|
+
detail: args
|
|
11854
|
+
})
|
|
11855
|
+
);
|
|
11856
|
+
};
|
|
11857
|
+
instance.emit = (event, ...args) => {
|
|
11858
|
+
dispatch(event, args);
|
|
11859
|
+
if (hyphenate(event) !== event) {
|
|
11860
|
+
dispatch(hyphenate(event), args);
|
|
11861
|
+
}
|
|
11862
|
+
};
|
|
11863
|
+
let parent = this;
|
|
11864
|
+
while (parent = parent && (parent.parentNode || parent.host)) {
|
|
11865
|
+
if (parent instanceof VueElement) {
|
|
11866
|
+
instance.parent = parent._instance;
|
|
11867
|
+
instance.provides = parent._instance.provides;
|
|
11868
|
+
break;
|
|
11869
|
+
}
|
|
11870
|
+
}
|
|
11871
|
+
};
|
|
11796
11872
|
}
|
|
11797
|
-
|
|
11798
|
-
|
|
11799
|
-
|
|
11800
|
-
|
|
11873
|
+
return vnode;
|
|
11874
|
+
}
|
|
11875
|
+
_applyStyles(styles) {
|
|
11876
|
+
if (styles) {
|
|
11877
|
+
styles.forEach((css) => {
|
|
11878
|
+
const s = document.createElement("style");
|
|
11879
|
+
s.textContent = css;
|
|
11880
|
+
this.shadowRoot.appendChild(s);
|
|
11881
|
+
{
|
|
11882
|
+
(this._styles || (this._styles = [])).push(s);
|
|
11883
|
+
}
|
|
11884
|
+
});
|
|
11801
11885
|
}
|
|
11802
|
-
}
|
|
11803
|
-
el.addEventListener(endEvent, onEnd);
|
|
11886
|
+
}
|
|
11804
11887
|
}
|
|
11805
|
-
|
|
11806
|
-
|
|
11807
|
-
|
|
11808
|
-
|
|
11809
|
-
|
|
11810
|
-
|
|
11811
|
-
|
|
11812
|
-
const animationDurations = getStyleProperties(`${ANIMATION}Duration`);
|
|
11813
|
-
const animationTimeout = getTimeout(animationDelays, animationDurations);
|
|
11814
|
-
let type = null;
|
|
11815
|
-
let timeout = 0;
|
|
11816
|
-
let propCount = 0;
|
|
11817
|
-
if (expectedType === TRANSITION$1) {
|
|
11818
|
-
if (transitionTimeout > 0) {
|
|
11819
|
-
type = TRANSITION$1;
|
|
11820
|
-
timeout = transitionTimeout;
|
|
11821
|
-
propCount = transitionDurations.length;
|
|
11888
|
+
|
|
11889
|
+
function useCssModule(name = "$style") {
|
|
11890
|
+
{
|
|
11891
|
+
const instance = getCurrentInstance();
|
|
11892
|
+
if (!instance) {
|
|
11893
|
+
warn(`useCssModule must be called inside setup()`);
|
|
11894
|
+
return EMPTY_OBJ;
|
|
11822
11895
|
}
|
|
11823
|
-
|
|
11824
|
-
if (
|
|
11825
|
-
|
|
11826
|
-
|
|
11827
|
-
propCount = animationDurations.length;
|
|
11896
|
+
const modules = instance.type.__cssModules;
|
|
11897
|
+
if (!modules) {
|
|
11898
|
+
warn(`Current instance does not have CSS modules injected.`);
|
|
11899
|
+
return EMPTY_OBJ;
|
|
11828
11900
|
}
|
|
11829
|
-
|
|
11830
|
-
|
|
11831
|
-
|
|
11832
|
-
|
|
11833
|
-
|
|
11834
|
-
|
|
11835
|
-
getStyleProperties(`${TRANSITION$1}Property`).toString()
|
|
11836
|
-
);
|
|
11837
|
-
return {
|
|
11838
|
-
type,
|
|
11839
|
-
timeout,
|
|
11840
|
-
propCount,
|
|
11841
|
-
hasTransform
|
|
11842
|
-
};
|
|
11843
|
-
}
|
|
11844
|
-
function getTimeout(delays, durations) {
|
|
11845
|
-
while (delays.length < durations.length) {
|
|
11846
|
-
delays = delays.concat(delays);
|
|
11901
|
+
const mod = modules[name];
|
|
11902
|
+
if (!mod) {
|
|
11903
|
+
warn(`Current instance does not have CSS module named "${name}".`);
|
|
11904
|
+
return EMPTY_OBJ;
|
|
11905
|
+
}
|
|
11906
|
+
return mod;
|
|
11847
11907
|
}
|
|
11848
|
-
return Math.max(...durations.map((d, i) => toMs(d) + toMs(delays[i])));
|
|
11849
|
-
}
|
|
11850
|
-
function toMs(s) {
|
|
11851
|
-
return Number(s.slice(0, -1).replace(",", ".")) * 1e3;
|
|
11852
11908
|
}
|
|
11853
|
-
|
|
11854
|
-
|
|
11909
|
+
|
|
11910
|
+
function useCssVars(getter) {
|
|
11911
|
+
return;
|
|
11855
11912
|
}
|
|
11856
11913
|
|
|
11857
11914
|
const positionMap = /* @__PURE__ */ new WeakMap();
|
|
11858
11915
|
const newPositionMap = /* @__PURE__ */ new WeakMap();
|
|
11916
|
+
const moveCbKey = Symbol("_moveCb");
|
|
11917
|
+
const enterCbKey = Symbol("_enterCb");
|
|
11859
11918
|
const TransitionGroupImpl = {
|
|
11860
11919
|
name: "TransitionGroup",
|
|
11861
11920
|
props: /* @__PURE__ */ extend({}, TransitionPropsValidators, {
|
|
@@ -11888,13 +11947,13 @@ const TransitionGroupImpl = {
|
|
|
11888
11947
|
const style = el.style;
|
|
11889
11948
|
addTransitionClass(el, moveClass);
|
|
11890
11949
|
style.transform = style.webkitTransform = style.transitionDuration = "";
|
|
11891
|
-
const cb = el
|
|
11950
|
+
const cb = el[moveCbKey] = (e) => {
|
|
11892
11951
|
if (e && e.target !== el) {
|
|
11893
11952
|
return;
|
|
11894
11953
|
}
|
|
11895
11954
|
if (!e || /transform$/.test(e.propertyName)) {
|
|
11896
11955
|
el.removeEventListener("transitionend", cb);
|
|
11897
|
-
el
|
|
11956
|
+
el[moveCbKey] = null;
|
|
11898
11957
|
removeTransitionClass(el, moveClass);
|
|
11899
11958
|
}
|
|
11900
11959
|
};
|
|
@@ -11946,11 +12005,11 @@ const removeMode = (props) => delete props.mode;
|
|
|
11946
12005
|
const TransitionGroup = TransitionGroupImpl;
|
|
11947
12006
|
function callPendingCbs(c) {
|
|
11948
12007
|
const el = c.el;
|
|
11949
|
-
if (el
|
|
11950
|
-
el
|
|
12008
|
+
if (el[moveCbKey]) {
|
|
12009
|
+
el[moveCbKey]();
|
|
11951
12010
|
}
|
|
11952
|
-
if (el
|
|
11953
|
-
el
|
|
12011
|
+
if (el[enterCbKey]) {
|
|
12012
|
+
el[enterCbKey]();
|
|
11954
12013
|
}
|
|
11955
12014
|
}
|
|
11956
12015
|
function recordPosition(c) {
|
|
@@ -11970,8 +12029,9 @@ function applyTranslation(c) {
|
|
|
11970
12029
|
}
|
|
11971
12030
|
function hasCSSTransform(el, root, moveClass) {
|
|
11972
12031
|
const clone = el.cloneNode();
|
|
11973
|
-
|
|
11974
|
-
|
|
12032
|
+
const _vtc = el[vtcKey];
|
|
12033
|
+
if (_vtc) {
|
|
12034
|
+
_vtc.forEach((cls) => {
|
|
11975
12035
|
cls.split(/\s+/).forEach((c) => c && clone.classList.remove(c));
|
|
11976
12036
|
});
|
|
11977
12037
|
}
|
|
@@ -11998,9 +12058,10 @@ function onCompositionEnd(e) {
|
|
|
11998
12058
|
target.dispatchEvent(new Event("input"));
|
|
11999
12059
|
}
|
|
12000
12060
|
}
|
|
12061
|
+
const assignKey = Symbol("_assign");
|
|
12001
12062
|
const vModelText = {
|
|
12002
12063
|
created(el, { modifiers: { lazy, trim, number } }, vnode) {
|
|
12003
|
-
el
|
|
12064
|
+
el[assignKey] = getModelAssigner(vnode);
|
|
12004
12065
|
const castToNumber = number || vnode.props && vnode.props.type === "number";
|
|
12005
12066
|
addEventListener(el, lazy ? "change" : "input", (e) => {
|
|
12006
12067
|
if (e.target.composing)
|
|
@@ -12012,7 +12073,7 @@ const vModelText = {
|
|
|
12012
12073
|
if (castToNumber) {
|
|
12013
12074
|
domValue = looseToNumber(domValue);
|
|
12014
12075
|
}
|
|
12015
|
-
el
|
|
12076
|
+
el[assignKey](domValue);
|
|
12016
12077
|
});
|
|
12017
12078
|
if (trim) {
|
|
12018
12079
|
addEventListener(el, "change", () => {
|
|
@@ -12030,7 +12091,7 @@ const vModelText = {
|
|
|
12030
12091
|
el.value = value == null ? "" : value;
|
|
12031
12092
|
},
|
|
12032
12093
|
beforeUpdate(el, { value, modifiers: { lazy, trim, number } }, vnode) {
|
|
12033
|
-
el
|
|
12094
|
+
el[assignKey] = getModelAssigner(vnode);
|
|
12034
12095
|
if (el.composing)
|
|
12035
12096
|
return;
|
|
12036
12097
|
if (document.activeElement === el && el.type !== "range") {
|
|
@@ -12054,12 +12115,12 @@ const vModelCheckbox = {
|
|
|
12054
12115
|
// #4096 array checkboxes need to be deep traversed
|
|
12055
12116
|
deep: true,
|
|
12056
12117
|
created(el, _, vnode) {
|
|
12057
|
-
el
|
|
12118
|
+
el[assignKey] = getModelAssigner(vnode);
|
|
12058
12119
|
addEventListener(el, "change", () => {
|
|
12059
12120
|
const modelValue = el._modelValue;
|
|
12060
12121
|
const elementValue = getValue(el);
|
|
12061
12122
|
const checked = el.checked;
|
|
12062
|
-
const assign = el
|
|
12123
|
+
const assign = el[assignKey];
|
|
12063
12124
|
if (isArray(modelValue)) {
|
|
12064
12125
|
const index = looseIndexOf(modelValue, elementValue);
|
|
12065
12126
|
const found = index !== -1;
|
|
@@ -12086,7 +12147,7 @@ const vModelCheckbox = {
|
|
|
12086
12147
|
// set initial checked on mount to wait for true-value/false-value
|
|
12087
12148
|
mounted: setChecked,
|
|
12088
12149
|
beforeUpdate(el, binding, vnode) {
|
|
12089
|
-
el
|
|
12150
|
+
el[assignKey] = getModelAssigner(vnode);
|
|
12090
12151
|
setChecked(el, binding, vnode);
|
|
12091
12152
|
}
|
|
12092
12153
|
};
|
|
@@ -12103,13 +12164,13 @@ function setChecked(el, { value, oldValue }, vnode) {
|
|
|
12103
12164
|
const vModelRadio = {
|
|
12104
12165
|
created(el, { value }, vnode) {
|
|
12105
12166
|
el.checked = looseEqual(value, vnode.props.value);
|
|
12106
|
-
el
|
|
12167
|
+
el[assignKey] = getModelAssigner(vnode);
|
|
12107
12168
|
addEventListener(el, "change", () => {
|
|
12108
|
-
el
|
|
12169
|
+
el[assignKey](getValue(el));
|
|
12109
12170
|
});
|
|
12110
12171
|
},
|
|
12111
12172
|
beforeUpdate(el, { value, oldValue }, vnode) {
|
|
12112
|
-
el
|
|
12173
|
+
el[assignKey] = getModelAssigner(vnode);
|
|
12113
12174
|
if (value !== oldValue) {
|
|
12114
12175
|
el.checked = looseEqual(value, vnode.props.value);
|
|
12115
12176
|
}
|
|
@@ -12124,11 +12185,11 @@ const vModelSelect = {
|
|
|
12124
12185
|
const selectedVal = Array.prototype.filter.call(el.options, (o) => o.selected).map(
|
|
12125
12186
|
(o) => number ? looseToNumber(getValue(o)) : getValue(o)
|
|
12126
12187
|
);
|
|
12127
|
-
el
|
|
12188
|
+
el[assignKey](
|
|
12128
12189
|
el.multiple ? isSetModel ? new Set(selectedVal) : selectedVal : selectedVal[0]
|
|
12129
12190
|
);
|
|
12130
12191
|
});
|
|
12131
|
-
el
|
|
12192
|
+
el[assignKey] = getModelAssigner(vnode);
|
|
12132
12193
|
},
|
|
12133
12194
|
// set value in mounted & updated because <select> relies on its children
|
|
12134
12195
|
// <option>s.
|
|
@@ -12136,7 +12197,7 @@ const vModelSelect = {
|
|
|
12136
12197
|
setSelected(el, value);
|
|
12137
12198
|
},
|
|
12138
12199
|
beforeUpdate(el, _binding, vnode) {
|
|
12139
|
-
el
|
|
12200
|
+
el[assignKey] = getModelAssigner(vnode);
|
|
12140
12201
|
},
|
|
12141
12202
|
updated(el, { value }) {
|
|
12142
12203
|
setSelected(el, value);
|
|
@@ -12333,52 +12394,6 @@ const withKeys = (fn, modifiers) => {
|
|
|
12333
12394
|
};
|
|
12334
12395
|
};
|
|
12335
12396
|
|
|
12336
|
-
const vShow = {
|
|
12337
|
-
beforeMount(el, { value }, { transition }) {
|
|
12338
|
-
el._vod = el.style.display === "none" ? "" : el.style.display;
|
|
12339
|
-
if (transition && value) {
|
|
12340
|
-
transition.beforeEnter(el);
|
|
12341
|
-
} else {
|
|
12342
|
-
setDisplay(el, value);
|
|
12343
|
-
}
|
|
12344
|
-
},
|
|
12345
|
-
mounted(el, { value }, { transition }) {
|
|
12346
|
-
if (transition && value) {
|
|
12347
|
-
transition.enter(el);
|
|
12348
|
-
}
|
|
12349
|
-
},
|
|
12350
|
-
updated(el, { value, oldValue }, { transition }) {
|
|
12351
|
-
if (!value === !oldValue)
|
|
12352
|
-
return;
|
|
12353
|
-
if (transition) {
|
|
12354
|
-
if (value) {
|
|
12355
|
-
transition.beforeEnter(el);
|
|
12356
|
-
setDisplay(el, true);
|
|
12357
|
-
transition.enter(el);
|
|
12358
|
-
} else {
|
|
12359
|
-
transition.leave(el, () => {
|
|
12360
|
-
setDisplay(el, false);
|
|
12361
|
-
});
|
|
12362
|
-
}
|
|
12363
|
-
} else {
|
|
12364
|
-
setDisplay(el, value);
|
|
12365
|
-
}
|
|
12366
|
-
},
|
|
12367
|
-
beforeUnmount(el, { value }) {
|
|
12368
|
-
setDisplay(el, value);
|
|
12369
|
-
}
|
|
12370
|
-
};
|
|
12371
|
-
function setDisplay(el, value) {
|
|
12372
|
-
el.style.display = value ? el._vod : "none";
|
|
12373
|
-
}
|
|
12374
|
-
function initVShowForSSR() {
|
|
12375
|
-
vShow.getSSRProps = ({ value }) => {
|
|
12376
|
-
if (!value) {
|
|
12377
|
-
return { style: { display: "none" } };
|
|
12378
|
-
}
|
|
12379
|
-
};
|
|
12380
|
-
}
|
|
12381
|
-
|
|
12382
12397
|
const rendererOptions = /* @__PURE__ */ extend({ patchProp }, nodeOps);
|
|
12383
12398
|
let renderer;
|
|
12384
12399
|
let enabledHydration = false;
|
|
@@ -13396,7 +13411,7 @@ function parseChildren(context, mode, ancestors) {
|
|
|
13396
13411
|
continue;
|
|
13397
13412
|
} else if (/[a-z]/i.test(s[2])) {
|
|
13398
13413
|
emitError(context, 23);
|
|
13399
|
-
parseTag(context,
|
|
13414
|
+
parseTag(context, 1 /* End */, parent);
|
|
13400
13415
|
continue;
|
|
13401
13416
|
} else {
|
|
13402
13417
|
emitError(
|
|
@@ -13557,7 +13572,7 @@ function parseElement(context, ancestors) {
|
|
|
13557
13572
|
const wasInPre = context.inPre;
|
|
13558
13573
|
const wasInVPre = context.inVPre;
|
|
13559
13574
|
const parent = last(ancestors);
|
|
13560
|
-
const element = parseTag(context,
|
|
13575
|
+
const element = parseTag(context, 0 /* Start */, parent);
|
|
13561
13576
|
const isPreBoundary = context.inPre && !wasInPre;
|
|
13562
13577
|
const isVPreBoundary = context.inVPre && !wasInVPre;
|
|
13563
13578
|
if (element.isSelfClosing || context.options.isVoidTag(element.tag)) {
|
|
@@ -13592,7 +13607,7 @@ function parseElement(context, ancestors) {
|
|
|
13592
13607
|
}
|
|
13593
13608
|
element.children = children;
|
|
13594
13609
|
if (startsWithEndTagOpen(context.source, element.tag)) {
|
|
13595
|
-
parseTag(context,
|
|
13610
|
+
parseTag(context, 1 /* End */, parent);
|
|
13596
13611
|
} else {
|
|
13597
13612
|
emitError(context, 24, 0, element.loc.start);
|
|
13598
13613
|
if (context.source.length === 0 && element.tag.toLowerCase() === "script") {
|
|
@@ -13611,11 +13626,6 @@ function parseElement(context, ancestors) {
|
|
|
13611
13626
|
}
|
|
13612
13627
|
return element;
|
|
13613
13628
|
}
|
|
13614
|
-
var TagType = /* @__PURE__ */ ((TagType2) => {
|
|
13615
|
-
TagType2[TagType2["Start"] = 0] = "Start";
|
|
13616
|
-
TagType2[TagType2["End"] = 1] = "End";
|
|
13617
|
-
return TagType2;
|
|
13618
|
-
})(TagType || {});
|
|
13619
13629
|
const isSpecialTemplateDirective = /* @__PURE__ */ makeMap(
|
|
13620
13630
|
`if,else,else-if,for,slot`
|
|
13621
13631
|
);
|
|
@@ -14383,7 +14393,7 @@ function createTransformContext(root, {
|
|
|
14383
14393
|
directives: /* @__PURE__ */ new Set(),
|
|
14384
14394
|
hoists: [],
|
|
14385
14395
|
imports: [],
|
|
14386
|
-
constantCache: /* @__PURE__ */ new
|
|
14396
|
+
constantCache: /* @__PURE__ */ new WeakMap(),
|
|
14387
14397
|
temps: 0,
|
|
14388
14398
|
cached: 0,
|
|
14389
14399
|
identifiers: /* @__PURE__ */ Object.create(null),
|
|
@@ -15738,7 +15748,7 @@ function processExpression(node, context, asParams = false, asRawStatements = fa
|
|
|
15738
15748
|
const bailConstant = constantBailRE.test(rawExp);
|
|
15739
15749
|
if (isSimpleIdentifier(rawExp)) {
|
|
15740
15750
|
const isScopeVarReference = context.identifiers[rawExp];
|
|
15741
|
-
const isAllowedGlobal =
|
|
15751
|
+
const isAllowedGlobal = isGloballyAllowed(rawExp);
|
|
15742
15752
|
const isLiteral = isLiteralWhitelisted(rawExp);
|
|
15743
15753
|
if (!asParams && !isScopeVarReference && !isAllowedGlobal && !isLiteral) {
|
|
15744
15754
|
if (isConst(bindingMetadata[node.content])) {
|
|
@@ -15840,7 +15850,7 @@ function processExpression(node, context, asParams = false, asRawStatements = fa
|
|
|
15840
15850
|
return ret;
|
|
15841
15851
|
}
|
|
15842
15852
|
function canPrefix(id) {
|
|
15843
|
-
if (
|
|
15853
|
+
if (isGloballyAllowed(id.name)) {
|
|
15844
15854
|
return false;
|
|
15845
15855
|
}
|
|
15846
15856
|
if (id.name === "require") {
|