@vue/compat 3.6.0-alpha.2 → 3.6.0-alpha.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +0 -1
- package/dist/vue.cjs.js +1232 -822
- package/dist/vue.cjs.prod.js +1041 -669
- package/dist/vue.esm-browser.js +1161 -793
- package/dist/vue.esm-browser.prod.js +10 -9
- package/dist/vue.esm-bundler.js +1222 -796
- package/dist/vue.global.js +1157 -789
- package/dist/vue.global.prod.js +10 -9
- package/dist/vue.runtime.esm-browser.js +1161 -793
- package/dist/vue.runtime.esm-browser.prod.js +10 -9
- package/dist/vue.runtime.esm-bundler.js +1222 -796
- package/dist/vue.runtime.global.js +1157 -789
- package/dist/vue.runtime.global.prod.js +10 -9
- package/package.json +3 -3
package/dist/vue.esm-bundler.js
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/compat v3.6.0-alpha.
|
|
2
|
+
* @vue/compat v3.6.0-alpha.4
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
6
|
-
/*! #__NO_SIDE_EFFECTS__ */
|
|
7
6
|
// @__NO_SIDE_EFFECTS__
|
|
8
7
|
function makeMap(str) {
|
|
9
8
|
const map = /* @__PURE__ */ Object.create(null);
|
|
@@ -59,10 +58,10 @@ const isBuiltInDirective = /* @__PURE__ */ makeMap(
|
|
|
59
58
|
);
|
|
60
59
|
const cacheStringFunction = (fn) => {
|
|
61
60
|
const cache = /* @__PURE__ */ Object.create(null);
|
|
62
|
-
return (str) => {
|
|
61
|
+
return ((str) => {
|
|
63
62
|
const hit = cache[str];
|
|
64
63
|
return hit || (cache[str] = fn(str));
|
|
65
|
-
};
|
|
64
|
+
});
|
|
66
65
|
};
|
|
67
66
|
const camelizeRE = /-(\w)/g;
|
|
68
67
|
const camelizeReplacer = (_, c) => c ? c.toUpperCase() : "";
|
|
@@ -82,6 +81,9 @@ const toHandlerKey = cacheStringFunction(
|
|
|
82
81
|
return s;
|
|
83
82
|
}
|
|
84
83
|
);
|
|
84
|
+
const getModifierPropName = (name) => {
|
|
85
|
+
return `${name === "modelValue" || name === "model-value" ? "model" : name}Modifiers${name === "model" ? "$" : ""}`;
|
|
86
|
+
};
|
|
85
87
|
const hasChanged = (value, oldValue) => !Object.is(value, oldValue);
|
|
86
88
|
const invokeArrayFns = (fns, ...arg) => {
|
|
87
89
|
for (let i = 0; i < fns.length; i++) {
|
|
@@ -308,6 +310,9 @@ function shouldSetAsAttr(tagName, key) {
|
|
|
308
310
|
if ((key === "width" || key === "height") && (tagName === "IMG" || tagName === "VIDEO" || tagName === "CANVAS" || tagName === "SOURCE")) {
|
|
309
311
|
return true;
|
|
310
312
|
}
|
|
313
|
+
if (key === "sandbox" && tagName === "IFRAME") {
|
|
314
|
+
return true;
|
|
315
|
+
}
|
|
311
316
|
return false;
|
|
312
317
|
}
|
|
313
318
|
|
|
@@ -497,6 +502,7 @@ var ReactiveFlags = /* @__PURE__ */ ((ReactiveFlags2) => {
|
|
|
497
502
|
const notifyBuffer = [];
|
|
498
503
|
let batchDepth = 0;
|
|
499
504
|
let activeSub = void 0;
|
|
505
|
+
let globalVersion = 0;
|
|
500
506
|
let notifyIndex = 0;
|
|
501
507
|
let notifyBufferLength = 0;
|
|
502
508
|
function setActiveSub(sub) {
|
|
@@ -519,17 +525,18 @@ function link(dep, sub) {
|
|
|
519
525
|
if (prevDep !== void 0 && prevDep.dep === dep) {
|
|
520
526
|
return;
|
|
521
527
|
}
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
sub.depsTail = nextDep;
|
|
528
|
-
return;
|
|
529
|
-
}
|
|
528
|
+
const nextDep = prevDep !== void 0 ? prevDep.nextDep : sub.deps;
|
|
529
|
+
if (nextDep !== void 0 && nextDep.dep === dep) {
|
|
530
|
+
nextDep.version = globalVersion;
|
|
531
|
+
sub.depsTail = nextDep;
|
|
532
|
+
return;
|
|
530
533
|
}
|
|
531
534
|
const prevSub = dep.subsTail;
|
|
535
|
+
if (prevSub !== void 0 && prevSub.version === globalVersion && prevSub.sub === sub) {
|
|
536
|
+
return;
|
|
537
|
+
}
|
|
532
538
|
const newLink = sub.depsTail = dep.subsTail = {
|
|
539
|
+
version: globalVersion,
|
|
533
540
|
dep,
|
|
534
541
|
sub,
|
|
535
542
|
prevDep,
|
|
@@ -635,6 +642,7 @@ function propagate(link2) {
|
|
|
635
642
|
} while (true);
|
|
636
643
|
}
|
|
637
644
|
function startTracking(sub) {
|
|
645
|
+
++globalVersion;
|
|
638
646
|
sub.depsTail = void 0;
|
|
639
647
|
sub.flags = sub.flags & -57 | 4 /* RecursedCheck */;
|
|
640
648
|
return setActiveSub(sub);
|
|
@@ -735,18 +743,12 @@ function shallowPropagate(link2) {
|
|
|
735
743
|
} while (link2 !== void 0);
|
|
736
744
|
}
|
|
737
745
|
function isValidLink(checkLink, sub) {
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
}
|
|
745
|
-
if (link2 === depsTail) {
|
|
746
|
-
break;
|
|
747
|
-
}
|
|
748
|
-
link2 = link2.nextDep;
|
|
749
|
-
} while (link2 !== void 0);
|
|
746
|
+
let link2 = sub.depsTail;
|
|
747
|
+
while (link2 !== void 0) {
|
|
748
|
+
if (link2 === checkLink) {
|
|
749
|
+
return true;
|
|
750
|
+
}
|
|
751
|
+
link2 = link2.prevDep;
|
|
750
752
|
}
|
|
751
753
|
return false;
|
|
752
754
|
}
|
|
@@ -1001,7 +1003,7 @@ const arrayInstrumentations = {
|
|
|
1001
1003
|
join(separator) {
|
|
1002
1004
|
return reactiveReadArray(this).join(separator);
|
|
1003
1005
|
},
|
|
1004
|
-
// keys() iterator only reads `length`, no
|
|
1006
|
+
// keys() iterator only reads `length`, no optimization required
|
|
1005
1007
|
lastIndexOf(...args) {
|
|
1006
1008
|
return searchProxy(this, "lastIndexOf", args);
|
|
1007
1009
|
},
|
|
@@ -1053,7 +1055,7 @@ function iterator(self, method, wrapValue) {
|
|
|
1053
1055
|
iter._next = iter.next;
|
|
1054
1056
|
iter.next = () => {
|
|
1055
1057
|
const result = iter._next();
|
|
1056
|
-
if (result.
|
|
1058
|
+
if (!result.done) {
|
|
1057
1059
|
result.value = wrapValue(result.value);
|
|
1058
1060
|
}
|
|
1059
1061
|
return result;
|
|
@@ -1184,7 +1186,8 @@ class BaseReactiveHandler {
|
|
|
1184
1186
|
return res;
|
|
1185
1187
|
}
|
|
1186
1188
|
if (isRef(res)) {
|
|
1187
|
-
|
|
1189
|
+
const value = targetIsArray && isIntegerKey(key) ? res : res.value;
|
|
1190
|
+
return isReadonly2 && isObject(value) ? readonly(value) : value;
|
|
1188
1191
|
}
|
|
1189
1192
|
if (isObject(res)) {
|
|
1190
1193
|
return isReadonly2 ? readonly(res) : reactive(res);
|
|
@@ -1206,7 +1209,13 @@ class MutableReactiveHandler extends BaseReactiveHandler {
|
|
|
1206
1209
|
}
|
|
1207
1210
|
if (!isArray(target) && isRef(oldValue) && !isRef(value)) {
|
|
1208
1211
|
if (isOldValueReadonly) {
|
|
1209
|
-
|
|
1212
|
+
if (!!(process.env.NODE_ENV !== "production")) {
|
|
1213
|
+
warn$2(
|
|
1214
|
+
`Set operation on key "${String(key)}" failed: target is readonly.`,
|
|
1215
|
+
target[key]
|
|
1216
|
+
);
|
|
1217
|
+
}
|
|
1218
|
+
return true;
|
|
1210
1219
|
} else {
|
|
1211
1220
|
oldValue.value = value;
|
|
1212
1221
|
return true;
|
|
@@ -1351,7 +1360,7 @@ function createInstrumentations(readonly, shallow) {
|
|
|
1351
1360
|
get size() {
|
|
1352
1361
|
const target = this["__v_raw"];
|
|
1353
1362
|
!readonly && track(toRaw(target), "iterate", ITERATE_KEY);
|
|
1354
|
-
return
|
|
1363
|
+
return target.size;
|
|
1355
1364
|
},
|
|
1356
1365
|
has(key) {
|
|
1357
1366
|
const target = this["__v_raw"];
|
|
@@ -2354,11 +2363,11 @@ function traverse(value, depth = Infinity, seen) {
|
|
|
2354
2363
|
if (depth <= 0 || !isObject(value) || value["__v_skip"]) {
|
|
2355
2364
|
return value;
|
|
2356
2365
|
}
|
|
2357
|
-
seen = seen || /* @__PURE__ */ new
|
|
2358
|
-
if (seen.
|
|
2366
|
+
seen = seen || /* @__PURE__ */ new Map();
|
|
2367
|
+
if ((seen.get(value) || 0) >= depth) {
|
|
2359
2368
|
return value;
|
|
2360
2369
|
}
|
|
2361
|
-
seen.
|
|
2370
|
+
seen.set(value, depth);
|
|
2362
2371
|
depth--;
|
|
2363
2372
|
if (isRef(value)) {
|
|
2364
2373
|
traverse(value.value, depth, seen);
|
|
@@ -2909,8 +2918,10 @@ function rerender(id, newRender) {
|
|
|
2909
2918
|
instance.hmrRerender();
|
|
2910
2919
|
} else {
|
|
2911
2920
|
const i = instance;
|
|
2912
|
-
i.
|
|
2913
|
-
|
|
2921
|
+
if (!(i.effect.flags & 1024)) {
|
|
2922
|
+
i.renderCache = [];
|
|
2923
|
+
i.effect.run();
|
|
2924
|
+
}
|
|
2914
2925
|
}
|
|
2915
2926
|
nextTick(() => {
|
|
2916
2927
|
isHmrUpdating = false;
|
|
@@ -2923,7 +2934,12 @@ function reload(id, newComp) {
|
|
|
2923
2934
|
newComp = normalizeClassComponent(newComp);
|
|
2924
2935
|
updateComponentDef(record.initialDef, newComp);
|
|
2925
2936
|
const instances = [...record.instances];
|
|
2926
|
-
if (newComp.__vapor) {
|
|
2937
|
+
if (newComp.__vapor && !instances.some((i) => i.ceReload)) {
|
|
2938
|
+
for (const instance of instances) {
|
|
2939
|
+
if (instance.root && instance.root.ce && instance !== instance.root) {
|
|
2940
|
+
instance.root.ce._removeChildStyle(instance.type);
|
|
2941
|
+
}
|
|
2942
|
+
}
|
|
2927
2943
|
for (const instance of instances) {
|
|
2928
2944
|
instance.hmrReload(newComp);
|
|
2929
2945
|
}
|
|
@@ -2952,7 +2968,10 @@ function reload(id, newComp) {
|
|
|
2952
2968
|
if (parent.vapor) {
|
|
2953
2969
|
parent.hmrRerender();
|
|
2954
2970
|
} else {
|
|
2955
|
-
parent.effect.
|
|
2971
|
+
if (!(parent.effect.flags & 1024)) {
|
|
2972
|
+
parent.renderCache = [];
|
|
2973
|
+
parent.effect.run();
|
|
2974
|
+
}
|
|
2956
2975
|
}
|
|
2957
2976
|
nextTick(() => {
|
|
2958
2977
|
isHmrUpdating = false;
|
|
@@ -3062,7 +3081,6 @@ const devtoolsComponentRemoved = (component) => {
|
|
|
3062
3081
|
_devtoolsComponentRemoved(component);
|
|
3063
3082
|
}
|
|
3064
3083
|
};
|
|
3065
|
-
/*! #__NO_SIDE_EFFECTS__ */
|
|
3066
3084
|
// @__NO_SIDE_EFFECTS__
|
|
3067
3085
|
function createDevtoolsComponentHook(hook) {
|
|
3068
3086
|
return (component) => {
|
|
@@ -3779,9 +3797,6 @@ const TeleportImpl = {
|
|
|
3779
3797
|
insert(mainAnchor, container, anchor);
|
|
3780
3798
|
const mount = (container2, anchor2) => {
|
|
3781
3799
|
if (shapeFlag & 16) {
|
|
3782
|
-
if (parentComponent && parentComponent.isCE) {
|
|
3783
|
-
parentComponent.ce._teleportTarget = container2;
|
|
3784
|
-
}
|
|
3785
3800
|
mountChildren(
|
|
3786
3801
|
children,
|
|
3787
3802
|
container2,
|
|
@@ -3803,6 +3818,9 @@ const TeleportImpl = {
|
|
|
3803
3818
|
} else if (namespace !== "mathml" && isTargetMathML(target)) {
|
|
3804
3819
|
namespace = "mathml";
|
|
3805
3820
|
}
|
|
3821
|
+
if (parentComponent && parentComponent.isCE) {
|
|
3822
|
+
(parentComponent.ce._teleportTargets || (parentComponent.ce._teleportTargets = /* @__PURE__ */ new Set())).add(target);
|
|
3823
|
+
}
|
|
3806
3824
|
if (!disabled) {
|
|
3807
3825
|
mount(target, targetAnchor);
|
|
3808
3826
|
updateCssVars(n2, false);
|
|
@@ -4003,26 +4021,34 @@ function moveTeleport(vnode, container, parentAnchor, { o: { insert }, m: move }
|
|
|
4003
4021
|
function hydrateTeleport(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized, {
|
|
4004
4022
|
o: { nextSibling, parentNode, querySelector, insert, createText }
|
|
4005
4023
|
}, hydrateChildren) {
|
|
4024
|
+
function hydrateDisabledTeleport(node2, vnode2, targetStart, targetAnchor) {
|
|
4025
|
+
vnode2.anchor = hydrateChildren(
|
|
4026
|
+
nextSibling(node2),
|
|
4027
|
+
vnode2,
|
|
4028
|
+
parentNode(node2),
|
|
4029
|
+
parentComponent,
|
|
4030
|
+
parentSuspense,
|
|
4031
|
+
slotScopeIds,
|
|
4032
|
+
optimized
|
|
4033
|
+
);
|
|
4034
|
+
vnode2.targetStart = targetStart;
|
|
4035
|
+
vnode2.targetAnchor = targetAnchor;
|
|
4036
|
+
}
|
|
4006
4037
|
const target = vnode.target = resolveTarget(
|
|
4007
4038
|
vnode.props,
|
|
4008
4039
|
querySelector
|
|
4009
4040
|
);
|
|
4041
|
+
const disabled = isTeleportDisabled(vnode.props);
|
|
4010
4042
|
if (target) {
|
|
4011
|
-
const disabled = isTeleportDisabled(vnode.props);
|
|
4012
4043
|
const targetNode = target._lpa || target.firstChild;
|
|
4013
4044
|
if (vnode.shapeFlag & 16) {
|
|
4014
4045
|
if (disabled) {
|
|
4015
|
-
|
|
4016
|
-
|
|
4046
|
+
hydrateDisabledTeleport(
|
|
4047
|
+
node,
|
|
4017
4048
|
vnode,
|
|
4018
|
-
|
|
4019
|
-
|
|
4020
|
-
parentSuspense,
|
|
4021
|
-
slotScopeIds,
|
|
4022
|
-
optimized
|
|
4049
|
+
targetNode,
|
|
4050
|
+
targetNode && nextSibling(targetNode)
|
|
4023
4051
|
);
|
|
4024
|
-
vnode.targetStart = targetNode;
|
|
4025
|
-
vnode.targetAnchor = targetNode && nextSibling(targetNode);
|
|
4026
4052
|
} else {
|
|
4027
4053
|
vnode.anchor = nextSibling(node);
|
|
4028
4054
|
let targetAnchor = targetNode;
|
|
@@ -4053,6 +4079,10 @@ function hydrateTeleport(node, vnode, parentComponent, parentSuspense, slotScope
|
|
|
4053
4079
|
}
|
|
4054
4080
|
}
|
|
4055
4081
|
updateCssVars(vnode, disabled);
|
|
4082
|
+
} else if (disabled) {
|
|
4083
|
+
if (vnode.shapeFlag & 16) {
|
|
4084
|
+
hydrateDisabledTeleport(node, vnode, node, nextSibling(node));
|
|
4085
|
+
}
|
|
4056
4086
|
}
|
|
4057
4087
|
return vnode.anchor && nextSibling(vnode.anchor);
|
|
4058
4088
|
}
|
|
@@ -4093,7 +4123,7 @@ function useTransitionState() {
|
|
|
4093
4123
|
isMounted: false,
|
|
4094
4124
|
isLeaving: false,
|
|
4095
4125
|
isUnmounting: false,
|
|
4096
|
-
|
|
4126
|
+
leavingNodes: /* @__PURE__ */ new Map()
|
|
4097
4127
|
};
|
|
4098
4128
|
onMounted(() => {
|
|
4099
4129
|
state.isMounted = true;
|
|
@@ -4125,7 +4155,7 @@ const BaseTransitionPropsValidators = {
|
|
|
4125
4155
|
onAppearCancelled: TransitionHookValidator
|
|
4126
4156
|
};
|
|
4127
4157
|
const recursiveGetSubtree = (instance) => {
|
|
4128
|
-
const subTree = instance.subTree;
|
|
4158
|
+
const subTree = instance.type.__vapor ? instance.block : instance.subTree;
|
|
4129
4159
|
return subTree.component ? recursiveGetSubtree(subTree.component) : subTree;
|
|
4130
4160
|
};
|
|
4131
4161
|
const BaseTransitionImpl = {
|
|
@@ -4142,9 +4172,7 @@ const BaseTransitionImpl = {
|
|
|
4142
4172
|
const child = findNonCommentChild(children);
|
|
4143
4173
|
const rawProps = toRaw(props);
|
|
4144
4174
|
const { mode } = rawProps;
|
|
4145
|
-
|
|
4146
|
-
warn$1(`invalid <transition> mode: ${mode}`);
|
|
4147
|
-
}
|
|
4175
|
+
checkTransitionMode(mode);
|
|
4148
4176
|
if (state.isLeaving) {
|
|
4149
4177
|
return emptyPlaceholder(child);
|
|
4150
4178
|
}
|
|
@@ -4164,7 +4192,7 @@ const BaseTransitionImpl = {
|
|
|
4164
4192
|
setTransitionHooks(innerChild, enterHooks);
|
|
4165
4193
|
}
|
|
4166
4194
|
let oldInnerChild = instance.subTree && getInnerChild$1(instance.subTree);
|
|
4167
|
-
if (oldInnerChild && oldInnerChild.type !== Comment && !isSameVNodeType(
|
|
4195
|
+
if (oldInnerChild && oldInnerChild.type !== Comment && !isSameVNodeType(oldInnerChild, innerChild) && recursiveGetSubtree(instance).type !== Comment) {
|
|
4168
4196
|
let leavingHooks = resolveTransitionHooks(
|
|
4169
4197
|
oldInnerChild,
|
|
4170
4198
|
rawProps,
|
|
@@ -4237,15 +4265,53 @@ function findNonCommentChild(children) {
|
|
|
4237
4265
|
}
|
|
4238
4266
|
const BaseTransition = BaseTransitionImpl;
|
|
4239
4267
|
function getLeavingNodesForType(state, vnode) {
|
|
4240
|
-
const {
|
|
4241
|
-
let leavingVNodesCache =
|
|
4268
|
+
const { leavingNodes } = state;
|
|
4269
|
+
let leavingVNodesCache = leavingNodes.get(vnode.type);
|
|
4242
4270
|
if (!leavingVNodesCache) {
|
|
4243
4271
|
leavingVNodesCache = /* @__PURE__ */ Object.create(null);
|
|
4244
|
-
|
|
4272
|
+
leavingNodes.set(vnode.type, leavingVNodesCache);
|
|
4245
4273
|
}
|
|
4246
4274
|
return leavingVNodesCache;
|
|
4247
4275
|
}
|
|
4248
4276
|
function resolveTransitionHooks(vnode, props, state, instance, postClone) {
|
|
4277
|
+
const key = String(vnode.key);
|
|
4278
|
+
const leavingVNodesCache = getLeavingNodesForType(state, vnode);
|
|
4279
|
+
const context = {
|
|
4280
|
+
setLeavingNodeCache: () => {
|
|
4281
|
+
leavingVNodesCache[key] = vnode;
|
|
4282
|
+
},
|
|
4283
|
+
unsetLeavingNodeCache: () => {
|
|
4284
|
+
if (leavingVNodesCache[key] === vnode) {
|
|
4285
|
+
delete leavingVNodesCache[key];
|
|
4286
|
+
}
|
|
4287
|
+
},
|
|
4288
|
+
earlyRemove: () => {
|
|
4289
|
+
const leavingVNode = leavingVNodesCache[key];
|
|
4290
|
+
if (leavingVNode && isSameVNodeType(vnode, leavingVNode) && leavingVNode.el[leaveCbKey]) {
|
|
4291
|
+
leavingVNode.el[leaveCbKey]();
|
|
4292
|
+
}
|
|
4293
|
+
},
|
|
4294
|
+
cloneHooks: (vnode2) => {
|
|
4295
|
+
const hooks = resolveTransitionHooks(
|
|
4296
|
+
vnode2,
|
|
4297
|
+
props,
|
|
4298
|
+
state,
|
|
4299
|
+
instance,
|
|
4300
|
+
postClone
|
|
4301
|
+
);
|
|
4302
|
+
if (postClone) postClone(hooks);
|
|
4303
|
+
return hooks;
|
|
4304
|
+
}
|
|
4305
|
+
};
|
|
4306
|
+
return baseResolveTransitionHooks(context, props, state, instance);
|
|
4307
|
+
}
|
|
4308
|
+
function baseResolveTransitionHooks(context, props, state, instance) {
|
|
4309
|
+
const {
|
|
4310
|
+
setLeavingNodeCache,
|
|
4311
|
+
unsetLeavingNodeCache,
|
|
4312
|
+
earlyRemove,
|
|
4313
|
+
cloneHooks
|
|
4314
|
+
} = context;
|
|
4249
4315
|
const {
|
|
4250
4316
|
appear,
|
|
4251
4317
|
mode,
|
|
@@ -4263,8 +4329,6 @@ function resolveTransitionHooks(vnode, props, state, instance, postClone) {
|
|
|
4263
4329
|
onAfterAppear,
|
|
4264
4330
|
onAppearCancelled
|
|
4265
4331
|
} = props;
|
|
4266
|
-
const key = String(vnode.key);
|
|
4267
|
-
const leavingVNodesCache = getLeavingNodesForType(state, vnode);
|
|
4268
4332
|
const callHook = (hook, args) => {
|
|
4269
4333
|
hook && callWithAsyncErrorHandling(
|
|
4270
4334
|
hook,
|
|
@@ -4300,10 +4364,7 @@ function resolveTransitionHooks(vnode, props, state, instance, postClone) {
|
|
|
4300
4364
|
/* cancelled */
|
|
4301
4365
|
);
|
|
4302
4366
|
}
|
|
4303
|
-
|
|
4304
|
-
if (leavingVNode && isSameVNodeType(vnode, leavingVNode) && leavingVNode.el[leaveCbKey]) {
|
|
4305
|
-
leavingVNode.el[leaveCbKey]();
|
|
4306
|
-
}
|
|
4367
|
+
earlyRemove();
|
|
4307
4368
|
callHook(hook, [el]);
|
|
4308
4369
|
},
|
|
4309
4370
|
enter(el) {
|
|
@@ -4340,7 +4401,6 @@ function resolveTransitionHooks(vnode, props, state, instance, postClone) {
|
|
|
4340
4401
|
}
|
|
4341
4402
|
},
|
|
4342
4403
|
leave(el, remove) {
|
|
4343
|
-
const key2 = String(vnode.key);
|
|
4344
4404
|
if (el[enterCbKey$1]) {
|
|
4345
4405
|
el[enterCbKey$1](
|
|
4346
4406
|
true
|
|
@@ -4362,27 +4422,17 @@ function resolveTransitionHooks(vnode, props, state, instance, postClone) {
|
|
|
4362
4422
|
callHook(onAfterLeave, [el]);
|
|
4363
4423
|
}
|
|
4364
4424
|
el[leaveCbKey] = void 0;
|
|
4365
|
-
|
|
4366
|
-
delete leavingVNodesCache[key2];
|
|
4367
|
-
}
|
|
4425
|
+
unsetLeavingNodeCache(el);
|
|
4368
4426
|
};
|
|
4369
|
-
|
|
4427
|
+
setLeavingNodeCache(el);
|
|
4370
4428
|
if (onLeave) {
|
|
4371
4429
|
callAsyncHook(onLeave, [el, done]);
|
|
4372
4430
|
} else {
|
|
4373
4431
|
done();
|
|
4374
4432
|
}
|
|
4375
4433
|
},
|
|
4376
|
-
clone(
|
|
4377
|
-
|
|
4378
|
-
vnode2,
|
|
4379
|
-
props,
|
|
4380
|
-
state,
|
|
4381
|
-
instance,
|
|
4382
|
-
postClone
|
|
4383
|
-
);
|
|
4384
|
-
if (postClone) postClone(hooks2);
|
|
4385
|
-
return hooks2;
|
|
4434
|
+
clone(node) {
|
|
4435
|
+
return cloneHooks(node);
|
|
4386
4436
|
}
|
|
4387
4437
|
};
|
|
4388
4438
|
return hooks;
|
|
@@ -4416,8 +4466,15 @@ function getInnerChild$1(vnode) {
|
|
|
4416
4466
|
}
|
|
4417
4467
|
function setTransitionHooks(vnode, hooks) {
|
|
4418
4468
|
if (vnode.shapeFlag & 6 && vnode.component) {
|
|
4419
|
-
vnode.
|
|
4420
|
-
|
|
4469
|
+
if (vnode.type.__vapor) {
|
|
4470
|
+
getVaporInterface(vnode.component, vnode).setTransitionHooks(
|
|
4471
|
+
vnode.component,
|
|
4472
|
+
hooks
|
|
4473
|
+
);
|
|
4474
|
+
} else {
|
|
4475
|
+
vnode.transition = hooks;
|
|
4476
|
+
setTransitionHooks(vnode.component.subTree, hooks);
|
|
4477
|
+
}
|
|
4421
4478
|
} else if (vnode.shapeFlag & 128) {
|
|
4422
4479
|
vnode.ssContent.transition = hooks.clone(vnode.ssContent);
|
|
4423
4480
|
vnode.ssFallback.transition = hooks.clone(vnode.ssFallback);
|
|
@@ -4447,8 +4504,12 @@ function getTransitionRawChildren(children, keepComment = false, parentKey) {
|
|
|
4447
4504
|
}
|
|
4448
4505
|
return ret;
|
|
4449
4506
|
}
|
|
4507
|
+
function checkTransitionMode(mode) {
|
|
4508
|
+
if (!!(process.env.NODE_ENV !== "production") && mode && mode !== "in-out" && mode !== "out-in" && mode !== "default") {
|
|
4509
|
+
warn$1(`invalid <transition> mode: ${mode}`);
|
|
4510
|
+
}
|
|
4511
|
+
}
|
|
4450
4512
|
|
|
4451
|
-
/*! #__NO_SIDE_EFFECTS__ */
|
|
4452
4513
|
// @__NO_SIDE_EFFECTS__
|
|
4453
4514
|
function defineComponent(options, extraOptions) {
|
|
4454
4515
|
return isFunction(options) ? (
|
|
@@ -4501,6 +4562,7 @@ function useTemplateRef(key) {
|
|
|
4501
4562
|
return ret;
|
|
4502
4563
|
}
|
|
4503
4564
|
|
|
4565
|
+
const pendingSetRefMap = /* @__PURE__ */ new WeakMap();
|
|
4504
4566
|
function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
|
|
4505
4567
|
if (isArray(rawRef)) {
|
|
4506
4568
|
rawRef.forEach(
|
|
@@ -4532,28 +4594,23 @@ function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
|
|
|
4532
4594
|
const oldRef = oldRawRef && oldRawRef.r;
|
|
4533
4595
|
const refs = owner.refs === EMPTY_OBJ ? owner.refs = {} : owner.refs;
|
|
4534
4596
|
const setupState = owner.setupState;
|
|
4535
|
-
const
|
|
4536
|
-
const
|
|
4537
|
-
|
|
4538
|
-
if (hasOwn(rawSetupState, key) && !isRef(rawSetupState[key])) {
|
|
4539
|
-
warn$1(
|
|
4540
|
-
`Template ref "${key}" used on a non-ref value. It will not work in the production build.`
|
|
4541
|
-
);
|
|
4542
|
-
}
|
|
4543
|
-
if (knownTemplateRefs.has(rawSetupState[key])) {
|
|
4544
|
-
return false;
|
|
4545
|
-
}
|
|
4546
|
-
}
|
|
4547
|
-
return hasOwn(rawSetupState, key);
|
|
4597
|
+
const canSetSetupRef = createCanSetSetupRefChecker(setupState);
|
|
4598
|
+
const canSetRef = (ref2) => {
|
|
4599
|
+
return !!!(process.env.NODE_ENV !== "production") || !knownTemplateRefs.has(ref2);
|
|
4548
4600
|
};
|
|
4549
4601
|
if (oldRef != null && oldRef !== ref) {
|
|
4602
|
+
invalidatePendingSetRef(oldRawRef);
|
|
4550
4603
|
if (isString(oldRef)) {
|
|
4551
4604
|
refs[oldRef] = null;
|
|
4552
4605
|
if (canSetSetupRef(oldRef)) {
|
|
4553
4606
|
setupState[oldRef] = null;
|
|
4554
4607
|
}
|
|
4555
4608
|
} else if (isRef(oldRef)) {
|
|
4556
|
-
oldRef
|
|
4609
|
+
if (canSetRef(oldRef)) {
|
|
4610
|
+
oldRef.value = null;
|
|
4611
|
+
}
|
|
4612
|
+
const oldRawRefAtom = oldRawRef;
|
|
4613
|
+
if (oldRawRefAtom.k) refs[oldRawRefAtom.k] = null;
|
|
4557
4614
|
}
|
|
4558
4615
|
}
|
|
4559
4616
|
if (isFunction(ref)) {
|
|
@@ -4564,7 +4621,7 @@ function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
|
|
|
4564
4621
|
if (_isString || _isRef) {
|
|
4565
4622
|
const doSet = () => {
|
|
4566
4623
|
if (rawRef.f) {
|
|
4567
|
-
const existing = _isString ? canSetSetupRef(ref) ? setupState[ref] : refs[ref] : ref.value;
|
|
4624
|
+
const existing = _isString ? canSetSetupRef(ref) ? setupState[ref] : refs[ref] : canSetRef(ref) || !rawRef.k ? ref.value : refs[rawRef.k];
|
|
4568
4625
|
if (isUnmount) {
|
|
4569
4626
|
isArray(existing) && remove(existing, refValue);
|
|
4570
4627
|
} else {
|
|
@@ -4575,8 +4632,11 @@ function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
|
|
|
4575
4632
|
setupState[ref] = refs[ref];
|
|
4576
4633
|
}
|
|
4577
4634
|
} else {
|
|
4578
|
-
|
|
4579
|
-
if (
|
|
4635
|
+
const newVal = [refValue];
|
|
4636
|
+
if (canSetRef(ref)) {
|
|
4637
|
+
ref.value = newVal;
|
|
4638
|
+
}
|
|
4639
|
+
if (rawRef.k) refs[rawRef.k] = newVal;
|
|
4580
4640
|
}
|
|
4581
4641
|
} else if (!existing.includes(refValue)) {
|
|
4582
4642
|
existing.push(refValue);
|
|
@@ -4588,15 +4648,23 @@ function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
|
|
|
4588
4648
|
setupState[ref] = value;
|
|
4589
4649
|
}
|
|
4590
4650
|
} else if (_isRef) {
|
|
4591
|
-
ref
|
|
4651
|
+
if (canSetRef(ref)) {
|
|
4652
|
+
ref.value = value;
|
|
4653
|
+
}
|
|
4592
4654
|
if (rawRef.k) refs[rawRef.k] = value;
|
|
4593
4655
|
} else if (!!(process.env.NODE_ENV !== "production")) {
|
|
4594
4656
|
warn$1("Invalid template ref type:", ref, `(${typeof ref})`);
|
|
4595
4657
|
}
|
|
4596
4658
|
};
|
|
4597
4659
|
if (value) {
|
|
4598
|
-
|
|
4660
|
+
const job = () => {
|
|
4661
|
+
doSet();
|
|
4662
|
+
pendingSetRefMap.delete(rawRef);
|
|
4663
|
+
};
|
|
4664
|
+
pendingSetRefMap.set(rawRef, job);
|
|
4665
|
+
queuePostRenderEffect(job, -1, parentSuspense);
|
|
4599
4666
|
} else {
|
|
4667
|
+
invalidatePendingSetRef(rawRef);
|
|
4600
4668
|
doSet();
|
|
4601
4669
|
}
|
|
4602
4670
|
} else if (!!(process.env.NODE_ENV !== "production")) {
|
|
@@ -4604,6 +4672,29 @@ function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
|
|
|
4604
4672
|
}
|
|
4605
4673
|
}
|
|
4606
4674
|
}
|
|
4675
|
+
function createCanSetSetupRefChecker(setupState) {
|
|
4676
|
+
const rawSetupState = toRaw(setupState);
|
|
4677
|
+
return setupState === void 0 || setupState === EMPTY_OBJ ? NO : (key) => {
|
|
4678
|
+
if (!!(process.env.NODE_ENV !== "production")) {
|
|
4679
|
+
if (hasOwn(rawSetupState, key) && !isRef(rawSetupState[key])) {
|
|
4680
|
+
warn$1(
|
|
4681
|
+
`Template ref "${key}" used on a non-ref value. It will not work in the production build.`
|
|
4682
|
+
);
|
|
4683
|
+
}
|
|
4684
|
+
if (knownTemplateRefs.has(rawSetupState[key])) {
|
|
4685
|
+
return false;
|
|
4686
|
+
}
|
|
4687
|
+
}
|
|
4688
|
+
return hasOwn(rawSetupState, key);
|
|
4689
|
+
};
|
|
4690
|
+
}
|
|
4691
|
+
function invalidatePendingSetRef(rawRef) {
|
|
4692
|
+
const pendingSetRef = pendingSetRefMap.get(rawRef);
|
|
4693
|
+
if (pendingSetRef) {
|
|
4694
|
+
pendingSetRef.flags |= 4;
|
|
4695
|
+
pendingSetRefMap.delete(rawRef);
|
|
4696
|
+
}
|
|
4697
|
+
}
|
|
4607
4698
|
|
|
4608
4699
|
let hasLoggedMismatchError = false;
|
|
4609
4700
|
const logMismatchError = () => {
|
|
@@ -4700,7 +4791,7 @@ function createHydrationFunctions(rendererInternals) {
|
|
|
4700
4791
|
}
|
|
4701
4792
|
break;
|
|
4702
4793
|
case Comment:
|
|
4703
|
-
if (isTemplateNode(node)) {
|
|
4794
|
+
if (isTemplateNode$1(node)) {
|
|
4704
4795
|
nextNode = nextSibling(node);
|
|
4705
4796
|
replaceNode(
|
|
4706
4797
|
vnode.el = node.content.firstChild,
|
|
@@ -4748,9 +4839,15 @@ function createHydrationFunctions(rendererInternals) {
|
|
|
4748
4839
|
);
|
|
4749
4840
|
}
|
|
4750
4841
|
break;
|
|
4842
|
+
case VaporSlot:
|
|
4843
|
+
nextNode = getVaporInterface(parentComponent, vnode).hydrateSlot(
|
|
4844
|
+
vnode,
|
|
4845
|
+
node
|
|
4846
|
+
);
|
|
4847
|
+
break;
|
|
4751
4848
|
default:
|
|
4752
4849
|
if (shapeFlag & 1) {
|
|
4753
|
-
if ((domType !== 1 || vnode.type.toLowerCase() !== node.tagName.toLowerCase()) && !isTemplateNode(node)) {
|
|
4850
|
+
if ((domType !== 1 || vnode.type.toLowerCase() !== node.tagName.toLowerCase()) && !isTemplateNode$1(node)) {
|
|
4754
4851
|
nextNode = onMismatch();
|
|
4755
4852
|
} else {
|
|
4756
4853
|
nextNode = hydrateElement(
|
|
@@ -4763,9 +4860,6 @@ function createHydrationFunctions(rendererInternals) {
|
|
|
4763
4860
|
);
|
|
4764
4861
|
}
|
|
4765
4862
|
} else if (shapeFlag & 6) {
|
|
4766
|
-
if (vnode.type.__vapor) {
|
|
4767
|
-
throw new Error("Vapor component hydration is not supported yet.");
|
|
4768
|
-
}
|
|
4769
4863
|
vnode.slotScopeIds = slotScopeIds;
|
|
4770
4864
|
const container = parentNode(node);
|
|
4771
4865
|
if (isFragmentStart) {
|
|
@@ -4775,15 +4869,25 @@ function createHydrationFunctions(rendererInternals) {
|
|
|
4775
4869
|
} else {
|
|
4776
4870
|
nextNode = nextSibling(node);
|
|
4777
4871
|
}
|
|
4778
|
-
|
|
4779
|
-
vnode
|
|
4780
|
-
|
|
4781
|
-
|
|
4782
|
-
|
|
4783
|
-
|
|
4784
|
-
|
|
4785
|
-
|
|
4786
|
-
|
|
4872
|
+
if (vnode.type.__vapor) {
|
|
4873
|
+
getVaporInterface(parentComponent, vnode).hydrate(
|
|
4874
|
+
vnode,
|
|
4875
|
+
node,
|
|
4876
|
+
container,
|
|
4877
|
+
null,
|
|
4878
|
+
parentComponent
|
|
4879
|
+
);
|
|
4880
|
+
} else {
|
|
4881
|
+
mountComponent(
|
|
4882
|
+
vnode,
|
|
4883
|
+
container,
|
|
4884
|
+
null,
|
|
4885
|
+
parentComponent,
|
|
4886
|
+
parentSuspense,
|
|
4887
|
+
getContainerType(container),
|
|
4888
|
+
optimized
|
|
4889
|
+
);
|
|
4890
|
+
}
|
|
4787
4891
|
if (isAsyncWrapper(vnode) && !vnode.type.__asyncResolved) {
|
|
4788
4892
|
let subTree;
|
|
4789
4893
|
if (isFragmentStart) {
|
|
@@ -4840,7 +4944,7 @@ function createHydrationFunctions(rendererInternals) {
|
|
|
4840
4944
|
invokeDirectiveHook(vnode, null, parentComponent, "created");
|
|
4841
4945
|
}
|
|
4842
4946
|
let needCallTransitionHooks = false;
|
|
4843
|
-
if (isTemplateNode(el)) {
|
|
4947
|
+
if (isTemplateNode$1(el)) {
|
|
4844
4948
|
needCallTransitionHooks = needTransition(
|
|
4845
4949
|
null,
|
|
4846
4950
|
// no need check parentSuspense in hydration
|
|
@@ -4868,7 +4972,7 @@ function createHydrationFunctions(rendererInternals) {
|
|
|
4868
4972
|
);
|
|
4869
4973
|
let hasWarned = false;
|
|
4870
4974
|
while (next) {
|
|
4871
|
-
if (!isMismatchAllowed(el, 1
|
|
4975
|
+
if (!isMismatchAllowed(el, 1)) {
|
|
4872
4976
|
if ((!!(process.env.NODE_ENV !== "production") || __VUE_PROD_HYDRATION_MISMATCH_DETAILS__) && !hasWarned) {
|
|
4873
4977
|
warn$1(
|
|
4874
4978
|
`Hydration children mismatch on`,
|
|
@@ -4889,14 +4993,16 @@ Server rendered element contains more child nodes than client vdom.`
|
|
|
4889
4993
|
if (clientText[0] === "\n" && (el.tagName === "PRE" || el.tagName === "TEXTAREA")) {
|
|
4890
4994
|
clientText = clientText.slice(1);
|
|
4891
4995
|
}
|
|
4892
|
-
|
|
4893
|
-
|
|
4996
|
+
const { textContent } = el;
|
|
4997
|
+
if (textContent !== clientText && // innerHTML normalize \r\n or \r into a single \n in the DOM
|
|
4998
|
+
textContent !== clientText.replace(/\r\n|\r/g, "\n")) {
|
|
4999
|
+
if (!isMismatchAllowed(el, 0)) {
|
|
4894
5000
|
(!!(process.env.NODE_ENV !== "production") || __VUE_PROD_HYDRATION_MISMATCH_DETAILS__) && warn$1(
|
|
4895
5001
|
`Hydration text content mismatch on`,
|
|
4896
5002
|
el,
|
|
4897
5003
|
`
|
|
4898
|
-
- rendered on server: ${
|
|
4899
|
-
- expected on client: ${
|
|
5004
|
+
- rendered on server: ${textContent}
|
|
5005
|
+
- expected on client: ${clientText}`
|
|
4900
5006
|
);
|
|
4901
5007
|
logMismatchError();
|
|
4902
5008
|
}
|
|
@@ -4983,7 +5089,7 @@ Server rendered element contains more child nodes than client vdom.`
|
|
|
4983
5089
|
} else if (isText && !vnode.children) {
|
|
4984
5090
|
insert(vnode.el = createText(""), container);
|
|
4985
5091
|
} else {
|
|
4986
|
-
if (!isMismatchAllowed(container, 1
|
|
5092
|
+
if (!isMismatchAllowed(container, 1)) {
|
|
4987
5093
|
if ((!!(process.env.NODE_ENV !== "production") || __VUE_PROD_HYDRATION_MISMATCH_DETAILS__) && !hasWarned) {
|
|
4988
5094
|
warn$1(
|
|
4989
5095
|
`Hydration children mismatch on`,
|
|
@@ -5033,7 +5139,7 @@ Server rendered element contains fewer child nodes than client vdom.`
|
|
|
5033
5139
|
}
|
|
5034
5140
|
};
|
|
5035
5141
|
const handleMismatch = (node, vnode, parentComponent, parentSuspense, slotScopeIds, isFragment) => {
|
|
5036
|
-
if (!isMismatchAllowed(node.parentElement, 1
|
|
5142
|
+
if (!isMismatchAllowed(node.parentElement, 1)) {
|
|
5037
5143
|
(!!(process.env.NODE_ENV !== "production") || __VUE_PROD_HYDRATION_MISMATCH_DETAILS__) && warn$1(
|
|
5038
5144
|
`Hydration node mismatch:
|
|
5039
5145
|
- rendered on server:`,
|
|
@@ -5106,11 +5212,11 @@ Server rendered element contains fewer child nodes than client vdom.`
|
|
|
5106
5212
|
parent = parent.parent;
|
|
5107
5213
|
}
|
|
5108
5214
|
};
|
|
5109
|
-
const isTemplateNode = (node) => {
|
|
5110
|
-
return node.nodeType === 1 && node.tagName === "TEMPLATE";
|
|
5111
|
-
};
|
|
5112
5215
|
return [hydrate, hydrateNode];
|
|
5113
5216
|
}
|
|
5217
|
+
const isTemplateNode$1 = (node) => {
|
|
5218
|
+
return node.nodeType === 1 && node.tagName === "TEMPLATE";
|
|
5219
|
+
};
|
|
5114
5220
|
function propHasMismatch(el, key, clientValue, vnode, instance) {
|
|
5115
5221
|
let mismatchType;
|
|
5116
5222
|
let mismatchKey;
|
|
@@ -5125,7 +5231,7 @@ function propHasMismatch(el, key, clientValue, vnode, instance) {
|
|
|
5125
5231
|
}
|
|
5126
5232
|
expected = normalizeClass(clientValue);
|
|
5127
5233
|
if (!isSetEqual(toClassSet(actual || ""), toClassSet(expected))) {
|
|
5128
|
-
mismatchType = 2
|
|
5234
|
+
mismatchType = 2;
|
|
5129
5235
|
mismatchKey = `class`;
|
|
5130
5236
|
}
|
|
5131
5237
|
} else if (key === "style") {
|
|
@@ -5144,31 +5250,43 @@ function propHasMismatch(el, key, clientValue, vnode, instance) {
|
|
|
5144
5250
|
resolveCssVars(instance, vnode, expectedMap);
|
|
5145
5251
|
}
|
|
5146
5252
|
if (!isMapEqual(actualMap, expectedMap)) {
|
|
5147
|
-
mismatchType = 3
|
|
5253
|
+
mismatchType = 3;
|
|
5148
5254
|
mismatchKey = "style";
|
|
5149
5255
|
}
|
|
5150
|
-
} else if (
|
|
5151
|
-
|
|
5152
|
-
actual = el.hasAttribute(key);
|
|
5153
|
-
expected = includeBooleanAttr(clientValue);
|
|
5154
|
-
} else if (clientValue == null) {
|
|
5155
|
-
actual = el.hasAttribute(key);
|
|
5156
|
-
expected = false;
|
|
5157
|
-
} else {
|
|
5158
|
-
if (el.hasAttribute(key)) {
|
|
5159
|
-
actual = el.getAttribute(key);
|
|
5160
|
-
} else if (key === "value" && el.tagName === "TEXTAREA") {
|
|
5161
|
-
actual = el.value;
|
|
5162
|
-
} else {
|
|
5163
|
-
actual = false;
|
|
5164
|
-
}
|
|
5165
|
-
expected = isRenderableAttrValue(clientValue) ? String(clientValue) : false;
|
|
5166
|
-
}
|
|
5256
|
+
} else if (isValidHtmlOrSvgAttribute(el, key)) {
|
|
5257
|
+
({ actual, expected } = getAttributeMismatch(el, key, clientValue));
|
|
5167
5258
|
if (actual !== expected) {
|
|
5168
|
-
mismatchType = 4
|
|
5259
|
+
mismatchType = 4;
|
|
5169
5260
|
mismatchKey = key;
|
|
5170
5261
|
}
|
|
5171
5262
|
}
|
|
5263
|
+
return warnPropMismatch(el, mismatchKey, mismatchType, actual, expected);
|
|
5264
|
+
}
|
|
5265
|
+
function getAttributeMismatch(el, key, clientValue) {
|
|
5266
|
+
let actual;
|
|
5267
|
+
let expected;
|
|
5268
|
+
if (isBooleanAttr(key)) {
|
|
5269
|
+
actual = el.hasAttribute(key);
|
|
5270
|
+
expected = includeBooleanAttr(clientValue);
|
|
5271
|
+
} else if (clientValue == null) {
|
|
5272
|
+
actual = el.hasAttribute(key);
|
|
5273
|
+
expected = false;
|
|
5274
|
+
} else {
|
|
5275
|
+
if (el.hasAttribute(key)) {
|
|
5276
|
+
actual = el.getAttribute(key);
|
|
5277
|
+
} else if (key === "value" && el.tagName === "TEXTAREA") {
|
|
5278
|
+
actual = el.value;
|
|
5279
|
+
} else {
|
|
5280
|
+
actual = false;
|
|
5281
|
+
}
|
|
5282
|
+
expected = isRenderableAttrValue(clientValue) ? String(clientValue) : false;
|
|
5283
|
+
}
|
|
5284
|
+
return { actual, expected };
|
|
5285
|
+
}
|
|
5286
|
+
function isValidHtmlOrSvgAttribute(el, key) {
|
|
5287
|
+
return el instanceof SVGElement && isKnownSvgAttr(key) || el instanceof HTMLElement && (isBooleanAttr(key) || isKnownHtmlAttr(key));
|
|
5288
|
+
}
|
|
5289
|
+
function warnPropMismatch(el, mismatchKey, mismatchType, actual, expected) {
|
|
5172
5290
|
if (mismatchType != null && !isMismatchAllowed(el, mismatchType)) {
|
|
5173
5291
|
const format = (v) => v === false ? `(not rendered)` : `${mismatchKey}="${v}"`;
|
|
5174
5292
|
const preSegment = `Hydration ${MismatchTypeString[mismatchType]} mismatch on`;
|
|
@@ -5239,15 +5357,27 @@ function resolveCssVars(instance, vnode, expectedMap) {
|
|
|
5239
5357
|
}
|
|
5240
5358
|
}
|
|
5241
5359
|
const allowMismatchAttr = "data-allow-mismatch";
|
|
5360
|
+
const MismatchTypes = {
|
|
5361
|
+
"TEXT": 0,
|
|
5362
|
+
"0": "TEXT",
|
|
5363
|
+
"CHILDREN": 1,
|
|
5364
|
+
"1": "CHILDREN",
|
|
5365
|
+
"CLASS": 2,
|
|
5366
|
+
"2": "CLASS",
|
|
5367
|
+
"STYLE": 3,
|
|
5368
|
+
"3": "STYLE",
|
|
5369
|
+
"ATTRIBUTE": 4,
|
|
5370
|
+
"4": "ATTRIBUTE"
|
|
5371
|
+
};
|
|
5242
5372
|
const MismatchTypeString = {
|
|
5243
|
-
[0
|
|
5244
|
-
[1
|
|
5245
|
-
[2
|
|
5246
|
-
[3
|
|
5247
|
-
[4
|
|
5373
|
+
[0]: "text",
|
|
5374
|
+
[1]: "children",
|
|
5375
|
+
[2]: "class",
|
|
5376
|
+
[3]: "style",
|
|
5377
|
+
[4]: "attribute"
|
|
5248
5378
|
};
|
|
5249
5379
|
function isMismatchAllowed(el, allowedType) {
|
|
5250
|
-
if (allowedType === 0
|
|
5380
|
+
if (allowedType === 0 || allowedType === 1) {
|
|
5251
5381
|
while (el && !el.hasAttribute(allowMismatchAttr)) {
|
|
5252
5382
|
el = el.parentElement;
|
|
5253
5383
|
}
|
|
@@ -5259,7 +5389,7 @@ function isMismatchAllowed(el, allowedType) {
|
|
|
5259
5389
|
return true;
|
|
5260
5390
|
} else {
|
|
5261
5391
|
const list = allowedAttr.split(",");
|
|
5262
|
-
if (allowedType === 0
|
|
5392
|
+
if (allowedType === 0 && list.includes("children")) {
|
|
5263
5393
|
return true;
|
|
5264
5394
|
}
|
|
5265
5395
|
return list.includes(MismatchTypeString[allowedType]);
|
|
@@ -5316,7 +5446,9 @@ const hydrateOnInteraction = (interactions = []) => (hydrate, forEach) => {
|
|
|
5316
5446
|
hasHydrated = true;
|
|
5317
5447
|
teardown();
|
|
5318
5448
|
hydrate();
|
|
5319
|
-
|
|
5449
|
+
if (!(`$evt${e.type}` in e.target)) {
|
|
5450
|
+
e.target.dispatchEvent(new e.constructor(e.type, e));
|
|
5451
|
+
}
|
|
5320
5452
|
}
|
|
5321
5453
|
};
|
|
5322
5454
|
const teardown = () => {
|
|
@@ -5358,104 +5490,46 @@ function forEachElement(node, cb) {
|
|
|
5358
5490
|
}
|
|
5359
5491
|
|
|
5360
5492
|
const isAsyncWrapper = (i) => !!i.type.__asyncLoader;
|
|
5361
|
-
/*! #__NO_SIDE_EFFECTS__ */
|
|
5362
5493
|
// @__NO_SIDE_EFFECTS__
|
|
5363
5494
|
function defineAsyncComponent(source) {
|
|
5364
|
-
if (isFunction(source)) {
|
|
5365
|
-
source = { loader: source };
|
|
5366
|
-
}
|
|
5367
5495
|
const {
|
|
5368
|
-
|
|
5369
|
-
|
|
5370
|
-
|
|
5371
|
-
|
|
5372
|
-
|
|
5373
|
-
|
|
5374
|
-
|
|
5375
|
-
|
|
5376
|
-
|
|
5377
|
-
|
|
5378
|
-
|
|
5379
|
-
|
|
5380
|
-
let retries = 0;
|
|
5381
|
-
const retry = () => {
|
|
5382
|
-
retries++;
|
|
5383
|
-
pendingRequest = null;
|
|
5384
|
-
return load();
|
|
5385
|
-
};
|
|
5386
|
-
const load = () => {
|
|
5387
|
-
let thisRequest;
|
|
5388
|
-
return pendingRequest || (thisRequest = pendingRequest = loader().catch((err) => {
|
|
5389
|
-
err = err instanceof Error ? err : new Error(String(err));
|
|
5390
|
-
if (userOnError) {
|
|
5391
|
-
return new Promise((resolve, reject) => {
|
|
5392
|
-
const userRetry = () => resolve(retry());
|
|
5393
|
-
const userFail = () => reject(err);
|
|
5394
|
-
userOnError(err, userRetry, userFail, retries + 1);
|
|
5395
|
-
});
|
|
5396
|
-
} else {
|
|
5397
|
-
throw err;
|
|
5398
|
-
}
|
|
5399
|
-
}).then((comp) => {
|
|
5400
|
-
if (thisRequest !== pendingRequest && pendingRequest) {
|
|
5401
|
-
return pendingRequest;
|
|
5402
|
-
}
|
|
5403
|
-
if (!!(process.env.NODE_ENV !== "production") && !comp) {
|
|
5404
|
-
warn$1(
|
|
5405
|
-
`Async component loader resolved to undefined. If you are using retry(), make sure to return its return value.`
|
|
5406
|
-
);
|
|
5407
|
-
}
|
|
5408
|
-
if (comp && (comp.__esModule || comp[Symbol.toStringTag] === "Module")) {
|
|
5409
|
-
comp = comp.default;
|
|
5410
|
-
}
|
|
5411
|
-
if (!!(process.env.NODE_ENV !== "production") && comp && !isObject(comp) && !isFunction(comp)) {
|
|
5412
|
-
throw new Error(`Invalid async component load result: ${comp}`);
|
|
5413
|
-
}
|
|
5414
|
-
resolvedComp = comp;
|
|
5415
|
-
return comp;
|
|
5416
|
-
}));
|
|
5417
|
-
};
|
|
5496
|
+
load,
|
|
5497
|
+
getResolvedComp,
|
|
5498
|
+
setPendingRequest,
|
|
5499
|
+
source: {
|
|
5500
|
+
loadingComponent,
|
|
5501
|
+
errorComponent,
|
|
5502
|
+
delay,
|
|
5503
|
+
hydrate: hydrateStrategy,
|
|
5504
|
+
timeout,
|
|
5505
|
+
suspensible = true
|
|
5506
|
+
}
|
|
5507
|
+
} = createAsyncComponentContext(source);
|
|
5418
5508
|
return defineComponent({
|
|
5419
5509
|
name: "AsyncComponentWrapper",
|
|
5420
5510
|
__asyncLoader: load,
|
|
5421
5511
|
__asyncHydrate(el, instance, hydrate) {
|
|
5422
|
-
|
|
5423
|
-
|
|
5424
|
-
|
|
5425
|
-
|
|
5426
|
-
|
|
5427
|
-
|
|
5428
|
-
|
|
5429
|
-
|
|
5430
|
-
}
|
|
5431
|
-
hydrate();
|
|
5432
|
-
};
|
|
5433
|
-
const teardown = hydrateStrategy(
|
|
5434
|
-
performHydrate,
|
|
5435
|
-
(cb) => forEachElement(el, cb)
|
|
5436
|
-
);
|
|
5437
|
-
if (teardown) {
|
|
5438
|
-
(instance.bum || (instance.bum = [])).push(teardown);
|
|
5439
|
-
}
|
|
5440
|
-
(instance.u || (instance.u = [])).push(() => patched = true);
|
|
5441
|
-
} : hydrate;
|
|
5442
|
-
if (resolvedComp) {
|
|
5443
|
-
doHydrate();
|
|
5444
|
-
} else {
|
|
5445
|
-
load().then(() => !instance.isUnmounted && doHydrate());
|
|
5446
|
-
}
|
|
5512
|
+
performAsyncHydrate(
|
|
5513
|
+
el,
|
|
5514
|
+
instance,
|
|
5515
|
+
hydrate,
|
|
5516
|
+
getResolvedComp,
|
|
5517
|
+
load,
|
|
5518
|
+
hydrateStrategy
|
|
5519
|
+
);
|
|
5447
5520
|
},
|
|
5448
5521
|
get __asyncResolved() {
|
|
5449
|
-
return
|
|
5522
|
+
return getResolvedComp();
|
|
5450
5523
|
},
|
|
5451
5524
|
setup() {
|
|
5452
5525
|
const instance = currentInstance;
|
|
5453
5526
|
markAsyncBoundary(instance);
|
|
5527
|
+
let resolvedComp = getResolvedComp();
|
|
5454
5528
|
if (resolvedComp) {
|
|
5455
5529
|
return () => createInnerComp(resolvedComp, instance);
|
|
5456
5530
|
}
|
|
5457
5531
|
const onError = (err) => {
|
|
5458
|
-
|
|
5532
|
+
setPendingRequest(null);
|
|
5459
5533
|
handleError(
|
|
5460
5534
|
err,
|
|
5461
5535
|
instance,
|
|
@@ -5473,25 +5547,11 @@ function defineAsyncComponent(source) {
|
|
|
5473
5547
|
}) : null;
|
|
5474
5548
|
});
|
|
5475
5549
|
}
|
|
5476
|
-
const loaded =
|
|
5477
|
-
|
|
5478
|
-
|
|
5479
|
-
|
|
5480
|
-
|
|
5481
|
-
delayed.value = false;
|
|
5482
|
-
}, delay);
|
|
5483
|
-
}
|
|
5484
|
-
if (timeout != null) {
|
|
5485
|
-
setTimeout(() => {
|
|
5486
|
-
if (!loaded.value && !error.value) {
|
|
5487
|
-
const err = new Error(
|
|
5488
|
-
`Async component timed out after ${timeout}ms.`
|
|
5489
|
-
);
|
|
5490
|
-
onError(err);
|
|
5491
|
-
error.value = err;
|
|
5492
|
-
}
|
|
5493
|
-
}, timeout);
|
|
5494
|
-
}
|
|
5550
|
+
const { loaded, error, delayed } = useAsyncComponentState(
|
|
5551
|
+
delay,
|
|
5552
|
+
timeout,
|
|
5553
|
+
onError
|
|
5554
|
+
);
|
|
5495
5555
|
load().then(() => {
|
|
5496
5556
|
loaded.value = true;
|
|
5497
5557
|
if (instance.parent && instance.parent.vnode && isKeepAlive(instance.parent.vnode)) {
|
|
@@ -5502,6 +5562,7 @@ function defineAsyncComponent(source) {
|
|
|
5502
5562
|
error.value = err;
|
|
5503
5563
|
});
|
|
5504
5564
|
return () => {
|
|
5565
|
+
resolvedComp = getResolvedComp();
|
|
5505
5566
|
if (loaded.value && resolvedComp) {
|
|
5506
5567
|
return createInnerComp(resolvedComp, instance);
|
|
5507
5568
|
} else if (error.value && errorComponent) {
|
|
@@ -5509,7 +5570,10 @@ function defineAsyncComponent(source) {
|
|
|
5509
5570
|
error: error.value
|
|
5510
5571
|
});
|
|
5511
5572
|
} else if (loadingComponent && !delayed.value) {
|
|
5512
|
-
return
|
|
5573
|
+
return createInnerComp(
|
|
5574
|
+
loadingComponent,
|
|
5575
|
+
instance
|
|
5576
|
+
);
|
|
5513
5577
|
}
|
|
5514
5578
|
};
|
|
5515
5579
|
}
|
|
@@ -5523,6 +5587,108 @@ function createInnerComp(comp, parent) {
|
|
|
5523
5587
|
delete parent.vnode.ce;
|
|
5524
5588
|
return vnode;
|
|
5525
5589
|
}
|
|
5590
|
+
function createAsyncComponentContext(source) {
|
|
5591
|
+
if (isFunction(source)) {
|
|
5592
|
+
source = { loader: source };
|
|
5593
|
+
}
|
|
5594
|
+
const { loader, onError: userOnError } = source;
|
|
5595
|
+
let pendingRequest = null;
|
|
5596
|
+
let resolvedComp;
|
|
5597
|
+
let retries = 0;
|
|
5598
|
+
const retry = () => {
|
|
5599
|
+
retries++;
|
|
5600
|
+
pendingRequest = null;
|
|
5601
|
+
return load();
|
|
5602
|
+
};
|
|
5603
|
+
const load = () => {
|
|
5604
|
+
let thisRequest;
|
|
5605
|
+
return pendingRequest || (thisRequest = pendingRequest = loader().catch((err) => {
|
|
5606
|
+
err = err instanceof Error ? err : new Error(String(err));
|
|
5607
|
+
if (userOnError) {
|
|
5608
|
+
return new Promise((resolve, reject) => {
|
|
5609
|
+
const userRetry = () => resolve(retry());
|
|
5610
|
+
const userFail = () => reject(err);
|
|
5611
|
+
userOnError(err, userRetry, userFail, retries + 1);
|
|
5612
|
+
});
|
|
5613
|
+
} else {
|
|
5614
|
+
throw err;
|
|
5615
|
+
}
|
|
5616
|
+
}).then((comp) => {
|
|
5617
|
+
if (thisRequest !== pendingRequest && pendingRequest) {
|
|
5618
|
+
return pendingRequest;
|
|
5619
|
+
}
|
|
5620
|
+
if (!!(process.env.NODE_ENV !== "production") && !comp) {
|
|
5621
|
+
warn$1(
|
|
5622
|
+
`Async component loader resolved to undefined. If you are using retry(), make sure to return its return value.`
|
|
5623
|
+
);
|
|
5624
|
+
}
|
|
5625
|
+
if (comp && (comp.__esModule || comp[Symbol.toStringTag] === "Module")) {
|
|
5626
|
+
comp = comp.default;
|
|
5627
|
+
}
|
|
5628
|
+
if (!!(process.env.NODE_ENV !== "production") && comp && !isObject(comp) && !isFunction(comp)) {
|
|
5629
|
+
throw new Error(`Invalid async component load result: ${comp}`);
|
|
5630
|
+
}
|
|
5631
|
+
resolvedComp = comp;
|
|
5632
|
+
return comp;
|
|
5633
|
+
}));
|
|
5634
|
+
};
|
|
5635
|
+
return {
|
|
5636
|
+
load,
|
|
5637
|
+
source,
|
|
5638
|
+
getResolvedComp: () => resolvedComp,
|
|
5639
|
+
setPendingRequest: (request) => pendingRequest = request
|
|
5640
|
+
};
|
|
5641
|
+
}
|
|
5642
|
+
const useAsyncComponentState = (delay, timeout, onError) => {
|
|
5643
|
+
const loaded = ref(false);
|
|
5644
|
+
const error = ref();
|
|
5645
|
+
const delayed = ref(!!delay);
|
|
5646
|
+
if (delay) {
|
|
5647
|
+
setTimeout(() => {
|
|
5648
|
+
delayed.value = false;
|
|
5649
|
+
}, delay);
|
|
5650
|
+
}
|
|
5651
|
+
if (timeout != null) {
|
|
5652
|
+
setTimeout(() => {
|
|
5653
|
+
if (!loaded.value && !error.value) {
|
|
5654
|
+
const err = new Error(`Async component timed out after ${timeout}ms.`);
|
|
5655
|
+
onError(err);
|
|
5656
|
+
error.value = err;
|
|
5657
|
+
}
|
|
5658
|
+
}, timeout);
|
|
5659
|
+
}
|
|
5660
|
+
return { loaded, error, delayed };
|
|
5661
|
+
};
|
|
5662
|
+
function performAsyncHydrate(el, instance, hydrate, getResolvedComp, load, hydrateStrategy) {
|
|
5663
|
+
let patched = false;
|
|
5664
|
+
(instance.bu || (instance.bu = [])).push(() => patched = true);
|
|
5665
|
+
const performHydrate = () => {
|
|
5666
|
+
if (patched) {
|
|
5667
|
+
if (!!(process.env.NODE_ENV !== "production")) {
|
|
5668
|
+
const resolvedComp = getResolvedComp();
|
|
5669
|
+
warn$1(
|
|
5670
|
+
`Skipping lazy hydration for component '${getComponentName(resolvedComp) || resolvedComp.__file}': it was updated before lazy hydration performed.`
|
|
5671
|
+
);
|
|
5672
|
+
}
|
|
5673
|
+
return;
|
|
5674
|
+
}
|
|
5675
|
+
hydrate();
|
|
5676
|
+
};
|
|
5677
|
+
const doHydrate = hydrateStrategy ? () => {
|
|
5678
|
+
const teardown = hydrateStrategy(
|
|
5679
|
+
performHydrate,
|
|
5680
|
+
(cb) => forEachElement(el, cb)
|
|
5681
|
+
);
|
|
5682
|
+
if (teardown) {
|
|
5683
|
+
(instance.bum || (instance.bum = [])).push(teardown);
|
|
5684
|
+
}
|
|
5685
|
+
} : performHydrate;
|
|
5686
|
+
if (getResolvedComp()) {
|
|
5687
|
+
doHydrate();
|
|
5688
|
+
} else {
|
|
5689
|
+
load().then(() => !instance.isUnmounted && doHydrate());
|
|
5690
|
+
}
|
|
5691
|
+
}
|
|
5526
5692
|
|
|
5527
5693
|
const isKeepAlive = (vnode) => vnode.type.__isKeepAlive;
|
|
5528
5694
|
const KeepAliveImpl = {
|
|
@@ -5552,86 +5718,37 @@ const KeepAliveImpl = {
|
|
|
5552
5718
|
keepAliveInstance.__v_cache = cache;
|
|
5553
5719
|
}
|
|
5554
5720
|
const parentSuspense = keepAliveInstance.suspense;
|
|
5721
|
+
const { renderer } = sharedContext;
|
|
5555
5722
|
const {
|
|
5556
|
-
|
|
5557
|
-
|
|
5558
|
-
|
|
5559
|
-
um: _unmount,
|
|
5560
|
-
o: { createElement }
|
|
5561
|
-
}
|
|
5562
|
-
} = sharedContext;
|
|
5723
|
+
um: _unmount,
|
|
5724
|
+
o: { createElement }
|
|
5725
|
+
} = renderer;
|
|
5563
5726
|
const storageContainer = createElement("div");
|
|
5727
|
+
sharedContext.getStorageContainer = () => storageContainer;
|
|
5728
|
+
sharedContext.getCachedComponent = (vnode) => {
|
|
5729
|
+
const key = vnode.key == null ? vnode.type : vnode.key;
|
|
5730
|
+
return cache.get(key);
|
|
5731
|
+
};
|
|
5564
5732
|
sharedContext.activate = (vnode, container, anchor, namespace, optimized) => {
|
|
5565
|
-
|
|
5566
|
-
move(
|
|
5733
|
+
activate(
|
|
5567
5734
|
vnode,
|
|
5568
5735
|
container,
|
|
5569
5736
|
anchor,
|
|
5570
|
-
|
|
5737
|
+
renderer,
|
|
5571
5738
|
keepAliveInstance,
|
|
5572
|
-
parentSuspense
|
|
5573
|
-
);
|
|
5574
|
-
patch(
|
|
5575
|
-
instance.vnode,
|
|
5576
|
-
vnode,
|
|
5577
|
-
container,
|
|
5578
|
-
anchor,
|
|
5579
|
-
instance,
|
|
5580
5739
|
parentSuspense,
|
|
5581
5740
|
namespace,
|
|
5582
|
-
vnode.slotScopeIds,
|
|
5583
5741
|
optimized
|
|
5584
5742
|
);
|
|
5585
|
-
queuePostRenderEffect(
|
|
5586
|
-
() => {
|
|
5587
|
-
instance.isDeactivated = false;
|
|
5588
|
-
if (instance.a) {
|
|
5589
|
-
invokeArrayFns(instance.a);
|
|
5590
|
-
}
|
|
5591
|
-
const vnodeHook = vnode.props && vnode.props.onVnodeMounted;
|
|
5592
|
-
if (vnodeHook) {
|
|
5593
|
-
invokeVNodeHook(vnodeHook, instance.parent, vnode);
|
|
5594
|
-
}
|
|
5595
|
-
},
|
|
5596
|
-
void 0,
|
|
5597
|
-
parentSuspense
|
|
5598
|
-
);
|
|
5599
|
-
if (!!(process.env.NODE_ENV !== "production") || __VUE_PROD_DEVTOOLS__) {
|
|
5600
|
-
devtoolsComponentAdded(instance);
|
|
5601
|
-
}
|
|
5602
5743
|
};
|
|
5603
5744
|
sharedContext.deactivate = (vnode) => {
|
|
5604
|
-
|
|
5605
|
-
invalidateMount(instance.m);
|
|
5606
|
-
invalidateMount(instance.a);
|
|
5607
|
-
move(
|
|
5745
|
+
deactivate(
|
|
5608
5746
|
vnode,
|
|
5609
5747
|
storageContainer,
|
|
5610
|
-
|
|
5611
|
-
1,
|
|
5748
|
+
renderer,
|
|
5612
5749
|
keepAliveInstance,
|
|
5613
5750
|
parentSuspense
|
|
5614
5751
|
);
|
|
5615
|
-
queuePostRenderEffect(
|
|
5616
|
-
() => {
|
|
5617
|
-
if (instance.da) {
|
|
5618
|
-
invokeArrayFns(instance.da);
|
|
5619
|
-
}
|
|
5620
|
-
const vnodeHook = vnode.props && vnode.props.onVnodeUnmounted;
|
|
5621
|
-
if (vnodeHook) {
|
|
5622
|
-
invokeVNodeHook(vnodeHook, instance.parent, vnode);
|
|
5623
|
-
}
|
|
5624
|
-
instance.isDeactivated = true;
|
|
5625
|
-
},
|
|
5626
|
-
void 0,
|
|
5627
|
-
parentSuspense
|
|
5628
|
-
);
|
|
5629
|
-
if (!!(process.env.NODE_ENV !== "production") || __VUE_PROD_DEVTOOLS__) {
|
|
5630
|
-
devtoolsComponentAdded(instance);
|
|
5631
|
-
}
|
|
5632
|
-
if (!!(process.env.NODE_ENV !== "production") && true) {
|
|
5633
|
-
instance.__keepAliveStorageContainer = storageContainer;
|
|
5634
|
-
}
|
|
5635
5752
|
};
|
|
5636
5753
|
function unmount(vnode) {
|
|
5637
5754
|
resetShapeFlag(vnode);
|
|
@@ -5782,7 +5899,7 @@ function onActivated(hook, target) {
|
|
|
5782
5899
|
function onDeactivated(hook, target) {
|
|
5783
5900
|
registerKeepAliveHook(hook, "da", target);
|
|
5784
5901
|
}
|
|
5785
|
-
function registerKeepAliveHook(hook, type, target =
|
|
5902
|
+
function registerKeepAliveHook(hook, type, target = getCurrentGenericInstance()) {
|
|
5786
5903
|
const wrappedHook = hook.__wdc || (hook.__wdc = () => {
|
|
5787
5904
|
let current = target;
|
|
5788
5905
|
while (current) {
|
|
@@ -5796,32 +5913,98 @@ function registerKeepAliveHook(hook, type, target = getCurrentInstance()) {
|
|
|
5796
5913
|
injectHook(type, wrappedHook, target);
|
|
5797
5914
|
if (target) {
|
|
5798
5915
|
let current = target.parent;
|
|
5799
|
-
while (current && current.parent
|
|
5800
|
-
|
|
5916
|
+
while (current && current.parent) {
|
|
5917
|
+
let parent = current.parent;
|
|
5918
|
+
if (isKeepAlive(parent.vapor ? parent : parent.vnode)) {
|
|
5801
5919
|
injectToKeepAliveRoot(wrappedHook, type, target, current);
|
|
5802
5920
|
}
|
|
5803
5921
|
current = current.parent;
|
|
5804
5922
|
}
|
|
5805
5923
|
}
|
|
5806
5924
|
}
|
|
5807
|
-
function injectToKeepAliveRoot(hook, type, target, keepAliveRoot) {
|
|
5808
|
-
const injected = injectHook(
|
|
5809
|
-
type,
|
|
5810
|
-
hook,
|
|
5811
|
-
keepAliveRoot,
|
|
5812
|
-
true
|
|
5813
|
-
/* prepend */
|
|
5925
|
+
function injectToKeepAliveRoot(hook, type, target, keepAliveRoot) {
|
|
5926
|
+
const injected = injectHook(
|
|
5927
|
+
type,
|
|
5928
|
+
hook,
|
|
5929
|
+
keepAliveRoot,
|
|
5930
|
+
true
|
|
5931
|
+
/* prepend */
|
|
5932
|
+
);
|
|
5933
|
+
onUnmounted(() => {
|
|
5934
|
+
remove(keepAliveRoot[type], injected);
|
|
5935
|
+
}, target);
|
|
5936
|
+
}
|
|
5937
|
+
function resetShapeFlag(vnode) {
|
|
5938
|
+
vnode.shapeFlag &= -257;
|
|
5939
|
+
vnode.shapeFlag &= -513;
|
|
5940
|
+
}
|
|
5941
|
+
function getInnerChild(vnode) {
|
|
5942
|
+
return vnode.shapeFlag & 128 ? vnode.ssContent : vnode;
|
|
5943
|
+
}
|
|
5944
|
+
function activate(vnode, container, anchor, { p: patch, m: move }, parentComponent, parentSuspense, namespace, optimized) {
|
|
5945
|
+
const instance = vnode.component;
|
|
5946
|
+
move(
|
|
5947
|
+
vnode,
|
|
5948
|
+
container,
|
|
5949
|
+
anchor,
|
|
5950
|
+
0,
|
|
5951
|
+
parentComponent,
|
|
5952
|
+
parentSuspense
|
|
5953
|
+
);
|
|
5954
|
+
patch(
|
|
5955
|
+
instance.vnode,
|
|
5956
|
+
vnode,
|
|
5957
|
+
container,
|
|
5958
|
+
anchor,
|
|
5959
|
+
instance,
|
|
5960
|
+
parentSuspense,
|
|
5961
|
+
namespace,
|
|
5962
|
+
vnode.slotScopeIds,
|
|
5963
|
+
optimized
|
|
5964
|
+
);
|
|
5965
|
+
queuePostRenderEffect(
|
|
5966
|
+
() => {
|
|
5967
|
+
instance.isDeactivated = false;
|
|
5968
|
+
if (instance.a) {
|
|
5969
|
+
invokeArrayFns(instance.a);
|
|
5970
|
+
}
|
|
5971
|
+
const vnodeHook = vnode.props && vnode.props.onVnodeMounted;
|
|
5972
|
+
if (vnodeHook) {
|
|
5973
|
+
invokeVNodeHook(vnodeHook, instance.parent, vnode);
|
|
5974
|
+
}
|
|
5975
|
+
},
|
|
5976
|
+
void 0,
|
|
5977
|
+
parentSuspense
|
|
5978
|
+
);
|
|
5979
|
+
if (!!(process.env.NODE_ENV !== "production") || __VUE_PROD_DEVTOOLS__) {
|
|
5980
|
+
devtoolsComponentAdded(instance);
|
|
5981
|
+
}
|
|
5982
|
+
}
|
|
5983
|
+
function deactivate(vnode, container, { m: move }, parentComponent, parentSuspense) {
|
|
5984
|
+
const instance = vnode.component;
|
|
5985
|
+
invalidateMount(instance.m);
|
|
5986
|
+
invalidateMount(instance.a);
|
|
5987
|
+
move(vnode, container, null, 1, parentComponent, parentSuspense);
|
|
5988
|
+
queuePostRenderEffect(
|
|
5989
|
+
() => {
|
|
5990
|
+
if (instance.da) {
|
|
5991
|
+
invokeArrayFns(instance.da);
|
|
5992
|
+
}
|
|
5993
|
+
const vnodeHook = vnode.props && vnode.props.onVnodeUnmounted;
|
|
5994
|
+
if (vnodeHook) {
|
|
5995
|
+
invokeVNodeHook(vnodeHook, instance.parent, vnode);
|
|
5996
|
+
}
|
|
5997
|
+
instance.isDeactivated = true;
|
|
5998
|
+
},
|
|
5999
|
+
void 0,
|
|
6000
|
+
parentSuspense
|
|
5814
6001
|
);
|
|
5815
|
-
|
|
5816
|
-
|
|
5817
|
-
}
|
|
5818
|
-
|
|
5819
|
-
|
|
5820
|
-
|
|
5821
|
-
vnode.shapeFlag &= -513;
|
|
5822
|
-
}
|
|
5823
|
-
function getInnerChild(vnode) {
|
|
5824
|
-
return vnode.shapeFlag & 128 ? vnode.ssContent : vnode;
|
|
6002
|
+
if (!!(process.env.NODE_ENV !== "production") || __VUE_PROD_DEVTOOLS__) {
|
|
6003
|
+
devtoolsComponentAdded(instance);
|
|
6004
|
+
}
|
|
6005
|
+
if (!!(process.env.NODE_ENV !== "production") && true) {
|
|
6006
|
+
instance.__keepAliveStorageContainer = container;
|
|
6007
|
+
}
|
|
5825
6008
|
}
|
|
5826
6009
|
|
|
5827
6010
|
function injectHook(type, hook, target = currentInstance, prepend = false) {
|
|
@@ -6298,12 +6481,13 @@ function renderSlot(slots, name, props = {}, fallback, noSlotted) {
|
|
|
6298
6481
|
return ret;
|
|
6299
6482
|
}
|
|
6300
6483
|
if (currentRenderingInstance && (currentRenderingInstance.ce || currentRenderingInstance.parent && isAsyncWrapper(currentRenderingInstance.parent) && currentRenderingInstance.parent.ce)) {
|
|
6484
|
+
const hasProps = Object.keys(props).length > 0;
|
|
6301
6485
|
if (name !== "default") props.name = name;
|
|
6302
6486
|
return openBlock(), createBlock(
|
|
6303
6487
|
Fragment,
|
|
6304
6488
|
null,
|
|
6305
6489
|
[createVNode("slot", props, fallback && fallback())],
|
|
6306
|
-
64
|
|
6490
|
+
hasProps ? -2 : 64
|
|
6307
6491
|
);
|
|
6308
6492
|
}
|
|
6309
6493
|
if (!!(process.env.NODE_ENV !== "production") && slot && slot.length > 1) {
|
|
@@ -6317,6 +6501,7 @@ function renderSlot(slots, name, props = {}, fallback, noSlotted) {
|
|
|
6317
6501
|
}
|
|
6318
6502
|
openBlock();
|
|
6319
6503
|
const validSlotContent = slot && ensureValidVNode(slot(props));
|
|
6504
|
+
ensureVaporSlotFallback(validSlotContent, fallback);
|
|
6320
6505
|
const slotKey = props.key || // slot content array of a dynamic conditional slot may have a branch
|
|
6321
6506
|
// key attached in the `createSlots` helper, respect that
|
|
6322
6507
|
validSlotContent && validSlotContent.key;
|
|
@@ -6346,6 +6531,14 @@ function ensureValidVNode(vnodes) {
|
|
|
6346
6531
|
return true;
|
|
6347
6532
|
}) ? vnodes : null;
|
|
6348
6533
|
}
|
|
6534
|
+
function ensureVaporSlotFallback(vnodes, fallback) {
|
|
6535
|
+
let vaporSlot;
|
|
6536
|
+
if (vnodes && vnodes.length === 1 && isVNode(vnodes[0]) && (vaporSlot = vnodes[0].vs)) {
|
|
6537
|
+
if (!vaporSlot.fallback && fallback) {
|
|
6538
|
+
vaporSlot.fallback = fallback;
|
|
6539
|
+
}
|
|
6540
|
+
}
|
|
6541
|
+
}
|
|
6349
6542
|
|
|
6350
6543
|
function toHandlers(obj, preserveCaseIfNecessary) {
|
|
6351
6544
|
const ret = {};
|
|
@@ -6407,7 +6600,7 @@ function legacyRenderSlot(instance, name, fallback, props, bindObject) {
|
|
|
6407
6600
|
}
|
|
6408
6601
|
return renderSlot(instance.slots, name, props, fallback && (() => fallback));
|
|
6409
6602
|
}
|
|
6410
|
-
function
|
|
6603
|
+
function legacyResolveScopedSlots(fns, raw, hasDynamicKeys) {
|
|
6411
6604
|
return createSlots(
|
|
6412
6605
|
raw || { $stable: !hasDynamicKeys },
|
|
6413
6606
|
mapKeyToName(fns)
|
|
@@ -6574,7 +6767,7 @@ function installCompatInstanceProperties(map) {
|
|
|
6574
6767
|
_b: () => legacyBindObjectProps,
|
|
6575
6768
|
_v: () => createTextVNode,
|
|
6576
6769
|
_e: () => createCommentVNode,
|
|
6577
|
-
_u: () =>
|
|
6770
|
+
_u: () => legacyResolveScopedSlots,
|
|
6578
6771
|
_g: () => legacyBindObjectListeners,
|
|
6579
6772
|
_d: () => legacyBindDynamicKeys,
|
|
6580
6773
|
_p: () => legacyPrependModifier
|
|
@@ -6648,7 +6841,7 @@ const PublicInstanceProxyHandlers = {
|
|
|
6648
6841
|
} else if (hasSetupBinding(setupState, key)) {
|
|
6649
6842
|
accessCache[key] = 1 /* SETUP */;
|
|
6650
6843
|
return setupState[key];
|
|
6651
|
-
} else if (data !== EMPTY_OBJ && hasOwn(data, key)) {
|
|
6844
|
+
} else if (__VUE_OPTIONS_API__ && data !== EMPTY_OBJ && hasOwn(data, key)) {
|
|
6652
6845
|
accessCache[key] = 2 /* DATA */;
|
|
6653
6846
|
return data[key];
|
|
6654
6847
|
} else if (
|
|
@@ -6720,7 +6913,7 @@ const PublicInstanceProxyHandlers = {
|
|
|
6720
6913
|
} else if (!!(process.env.NODE_ENV !== "production") && setupState.__isScriptSetup && hasOwn(setupState, key)) {
|
|
6721
6914
|
warn$1(`Cannot mutate <script setup> binding "${key}" from Options API.`);
|
|
6722
6915
|
return false;
|
|
6723
|
-
} else if (data !== EMPTY_OBJ && hasOwn(data, key)) {
|
|
6916
|
+
} else if (__VUE_OPTIONS_API__ && data !== EMPTY_OBJ && hasOwn(data, key)) {
|
|
6724
6917
|
data[key] = value;
|
|
6725
6918
|
return true;
|
|
6726
6919
|
} else if (hasOwn(instance.props, key)) {
|
|
@@ -6746,10 +6939,10 @@ const PublicInstanceProxyHandlers = {
|
|
|
6746
6939
|
return true;
|
|
6747
6940
|
},
|
|
6748
6941
|
has({
|
|
6749
|
-
_: { data, setupState, accessCache, ctx, appContext, propsOptions }
|
|
6942
|
+
_: { data, setupState, accessCache, ctx, appContext, propsOptions, type }
|
|
6750
6943
|
}, key) {
|
|
6751
|
-
let normalizedProps;
|
|
6752
|
-
return !!accessCache[key] || data !== EMPTY_OBJ && hasOwn(data, key) || hasSetupBinding(setupState, key) || (normalizedProps = propsOptions[0]) && hasOwn(normalizedProps, key) || hasOwn(ctx, key) || hasOwn(publicPropertiesMap, key) || hasOwn(appContext.config.globalProperties, key);
|
|
6944
|
+
let normalizedProps, cssModules;
|
|
6945
|
+
return !!(accessCache[key] || __VUE_OPTIONS_API__ && data !== EMPTY_OBJ && key[0] !== "$" && hasOwn(data, key) || hasSetupBinding(setupState, key) || (normalizedProps = propsOptions[0]) && hasOwn(normalizedProps, key) || hasOwn(ctx, key) || hasOwn(publicPropertiesMap, key) || hasOwn(appContext.config.globalProperties, key) || (cssModules = type.__cssModules) && cssModules[key]);
|
|
6753
6946
|
},
|
|
6754
6947
|
defineProperty(target, key, descriptor) {
|
|
6755
6948
|
if (descriptor.get != null) {
|
|
@@ -6901,15 +7094,15 @@ function withDefaults(props, defaults) {
|
|
|
6901
7094
|
return null;
|
|
6902
7095
|
}
|
|
6903
7096
|
function useSlots() {
|
|
6904
|
-
return getContext().slots;
|
|
7097
|
+
return getContext("useSlots").slots;
|
|
6905
7098
|
}
|
|
6906
7099
|
function useAttrs() {
|
|
6907
|
-
return getContext().attrs;
|
|
7100
|
+
return getContext("useAttrs").attrs;
|
|
6908
7101
|
}
|
|
6909
|
-
function getContext() {
|
|
7102
|
+
function getContext(calledFunctionName) {
|
|
6910
7103
|
const i = getCurrentGenericInstance();
|
|
6911
7104
|
if (!!(process.env.NODE_ENV !== "production") && !i) {
|
|
6912
|
-
warn$1(
|
|
7105
|
+
warn$1(`${calledFunctionName}() called without active instance.`);
|
|
6913
7106
|
}
|
|
6914
7107
|
if (i.vapor) {
|
|
6915
7108
|
return i;
|
|
@@ -7175,7 +7368,8 @@ function applyOptions(instance) {
|
|
|
7175
7368
|
expose.forEach((key) => {
|
|
7176
7369
|
Object.defineProperty(exposed, key, {
|
|
7177
7370
|
get: () => publicThis[key],
|
|
7178
|
-
set: (val) => publicThis[key] = val
|
|
7371
|
+
set: (val) => publicThis[key] = val,
|
|
7372
|
+
enumerable: true
|
|
7179
7373
|
});
|
|
7180
7374
|
});
|
|
7181
7375
|
} else if (!instance.exposed) {
|
|
@@ -7501,7 +7695,7 @@ function createCompatVue$1(createApp, createSingletonApp) {
|
|
|
7501
7695
|
return vm;
|
|
7502
7696
|
}
|
|
7503
7697
|
}
|
|
7504
|
-
Vue.version = `2.6.14-compat:${"3.6.0-alpha.
|
|
7698
|
+
Vue.version = `2.6.14-compat:${"3.6.0-alpha.4"}`;
|
|
7505
7699
|
Vue.config = singletonApp.config;
|
|
7506
7700
|
Vue.use = (plugin, ...options) => {
|
|
7507
7701
|
if (plugin && isFunction(plugin.install)) {
|
|
@@ -7515,22 +7709,22 @@ function createCompatVue$1(createApp, createSingletonApp) {
|
|
|
7515
7709
|
singletonApp.mixin(m);
|
|
7516
7710
|
return Vue;
|
|
7517
7711
|
};
|
|
7518
|
-
Vue.component = (name, comp) => {
|
|
7712
|
+
Vue.component = ((name, comp) => {
|
|
7519
7713
|
if (comp) {
|
|
7520
7714
|
singletonApp.component(name, comp);
|
|
7521
7715
|
return Vue;
|
|
7522
7716
|
} else {
|
|
7523
7717
|
return singletonApp.component(name);
|
|
7524
7718
|
}
|
|
7525
|
-
};
|
|
7526
|
-
Vue.directive = (name, dir) => {
|
|
7719
|
+
});
|
|
7720
|
+
Vue.directive = ((name, dir) => {
|
|
7527
7721
|
if (dir) {
|
|
7528
7722
|
singletonApp.directive(name, dir);
|
|
7529
7723
|
return Vue;
|
|
7530
7724
|
} else {
|
|
7531
7725
|
return singletonApp.directive(name);
|
|
7532
7726
|
}
|
|
7533
|
-
};
|
|
7727
|
+
});
|
|
7534
7728
|
Vue.options = { _base: Vue };
|
|
7535
7729
|
let cid = 1;
|
|
7536
7730
|
Vue.cid = cid;
|
|
@@ -7593,14 +7787,14 @@ function createCompatVue$1(createApp, createSingletonApp) {
|
|
|
7593
7787
|
assertCompatEnabled("GLOBAL_OBSERVABLE", null);
|
|
7594
7788
|
return reactive(target);
|
|
7595
7789
|
};
|
|
7596
|
-
Vue.filter = (name, filter) => {
|
|
7790
|
+
Vue.filter = ((name, filter) => {
|
|
7597
7791
|
if (filter) {
|
|
7598
7792
|
singletonApp.filter(name, filter);
|
|
7599
7793
|
return Vue;
|
|
7600
7794
|
} else {
|
|
7601
7795
|
return singletonApp.filter(name);
|
|
7602
7796
|
}
|
|
7603
|
-
};
|
|
7797
|
+
});
|
|
7604
7798
|
const util = {
|
|
7605
7799
|
warn: !!(process.env.NODE_ENV !== "production") ? warn$1 : NOOP,
|
|
7606
7800
|
extend,
|
|
@@ -7759,7 +7953,7 @@ function installCompatMount(app, context, render) {
|
|
|
7759
7953
|
if (!!(process.env.NODE_ENV !== "production")) {
|
|
7760
7954
|
for (let i = 0; i < container.attributes.length; i++) {
|
|
7761
7955
|
const attr = container.attributes[i];
|
|
7762
|
-
if (attr.name !== "v-cloak" && /^(v-|:|@)/.test(attr.name)) {
|
|
7956
|
+
if (attr.name !== "v-cloak" && /^(?:v-|:|@)/.test(attr.name)) {
|
|
7763
7957
|
warnDeprecation$1("GLOBAL_MOUNT_CONTAINER", null);
|
|
7764
7958
|
break;
|
|
7765
7959
|
}
|
|
@@ -8595,7 +8789,7 @@ function isBoolean(...args) {
|
|
|
8595
8789
|
return args.some((elem) => elem.toLowerCase() === "boolean");
|
|
8596
8790
|
}
|
|
8597
8791
|
|
|
8598
|
-
const isInternalKey = (key) => key
|
|
8792
|
+
const isInternalKey = (key) => key === "_" || key === "_ctx" || key === "$stable";
|
|
8599
8793
|
const normalizeSlotValue = (value) => isArray(value) ? value.map(normalizeVNode) : [normalizeVNode(value)];
|
|
8600
8794
|
const normalizeSlot = (key, rawSlot, ctx) => {
|
|
8601
8795
|
if (rawSlot._n) {
|
|
@@ -8649,8 +8843,6 @@ const assignSlots = (slots, children, optimized) => {
|
|
|
8649
8843
|
const initSlots = (instance, children, optimized) => {
|
|
8650
8844
|
const slots = instance.slots = createInternalObject();
|
|
8651
8845
|
if (instance.vnode.shapeFlag & 32) {
|
|
8652
|
-
const cacheIndexes = children.__;
|
|
8653
|
-
if (cacheIndexes) def(slots, "__", cacheIndexes, true);
|
|
8654
8846
|
const type = children._;
|
|
8655
8847
|
if (type) {
|
|
8656
8848
|
assignSlots(slots, children, optimized);
|
|
@@ -8714,12 +8906,10 @@ function endMeasure(instance, type) {
|
|
|
8714
8906
|
if (instance.appContext.config.performance && isSupported()) {
|
|
8715
8907
|
const startTag = `vue-${type}-${instance.uid}`;
|
|
8716
8908
|
const endTag = startTag + `:end`;
|
|
8909
|
+
const measureName = `<${formatComponentName(instance, instance.type)}> ${type}`;
|
|
8717
8910
|
perf.mark(endTag);
|
|
8718
|
-
perf.measure(
|
|
8719
|
-
|
|
8720
|
-
startTag,
|
|
8721
|
-
endTag
|
|
8722
|
-
);
|
|
8911
|
+
perf.measure(measureName, startTag, endTag);
|
|
8912
|
+
perf.clearMeasures(measureName);
|
|
8723
8913
|
perf.clearMarks(startTag);
|
|
8724
8914
|
perf.clearMarks(endTag);
|
|
8725
8915
|
}
|
|
@@ -8996,15 +9186,25 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
8996
9186
|
optimized
|
|
8997
9187
|
);
|
|
8998
9188
|
} else {
|
|
8999
|
-
|
|
9000
|
-
|
|
9001
|
-
|
|
9002
|
-
|
|
9003
|
-
|
|
9004
|
-
|
|
9005
|
-
|
|
9006
|
-
|
|
9007
|
-
|
|
9189
|
+
const customElement = !!(n1.el && n1.el._isVueCE) ? n1.el : null;
|
|
9190
|
+
try {
|
|
9191
|
+
if (customElement) {
|
|
9192
|
+
customElement._beginPatch();
|
|
9193
|
+
}
|
|
9194
|
+
patchElement(
|
|
9195
|
+
n1,
|
|
9196
|
+
n2,
|
|
9197
|
+
parentComponent,
|
|
9198
|
+
parentSuspense,
|
|
9199
|
+
namespace,
|
|
9200
|
+
slotScopeIds,
|
|
9201
|
+
optimized
|
|
9202
|
+
);
|
|
9203
|
+
} finally {
|
|
9204
|
+
if (customElement) {
|
|
9205
|
+
customElement._endPatch();
|
|
9206
|
+
}
|
|
9207
|
+
}
|
|
9008
9208
|
}
|
|
9009
9209
|
};
|
|
9010
9210
|
const mountElement = (vnode, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => {
|
|
@@ -9055,16 +9255,20 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
9055
9255
|
if (dirs) {
|
|
9056
9256
|
invokeDirectiveHook(vnode, null, parentComponent, "beforeMount");
|
|
9057
9257
|
}
|
|
9058
|
-
|
|
9059
|
-
|
|
9060
|
-
|
|
9258
|
+
if (transition) {
|
|
9259
|
+
performTransitionEnter(
|
|
9260
|
+
el,
|
|
9261
|
+
transition,
|
|
9262
|
+
() => hostInsert(el, container, anchor),
|
|
9263
|
+
parentSuspense
|
|
9264
|
+
);
|
|
9265
|
+
} else {
|
|
9266
|
+
hostInsert(el, container, anchor);
|
|
9061
9267
|
}
|
|
9062
|
-
|
|
9063
|
-
if ((vnodeHook = props && props.onVnodeMounted) || needCallTransitionHooks || dirs) {
|
|
9268
|
+
if ((vnodeHook = props && props.onVnodeMounted) || dirs) {
|
|
9064
9269
|
queuePostRenderEffect(
|
|
9065
9270
|
() => {
|
|
9066
9271
|
vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, vnode);
|
|
9067
|
-
needCallTransitionHooks && transition.enter(el);
|
|
9068
9272
|
dirs && invokeDirectiveHook(vnode, null, parentComponent, "mounted");
|
|
9069
9273
|
},
|
|
9070
9274
|
void 0,
|
|
@@ -9081,21 +9285,9 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
9081
9285
|
hostSetScopeId(el, slotScopeIds[i]);
|
|
9082
9286
|
}
|
|
9083
9287
|
}
|
|
9084
|
-
|
|
9085
|
-
|
|
9086
|
-
|
|
9087
|
-
subTree = filterSingleRoot(subTree.children) || subTree;
|
|
9088
|
-
}
|
|
9089
|
-
if (vnode === subTree || isSuspense(subTree.type) && (subTree.ssContent === vnode || subTree.ssFallback === vnode)) {
|
|
9090
|
-
const parentVNode = parentComponent.vnode;
|
|
9091
|
-
setScopeId(
|
|
9092
|
-
el,
|
|
9093
|
-
parentVNode,
|
|
9094
|
-
parentVNode.scopeId,
|
|
9095
|
-
parentVNode.slotScopeIds,
|
|
9096
|
-
parentComponent.parent
|
|
9097
|
-
);
|
|
9098
|
-
}
|
|
9288
|
+
const inheritedScopeIds = getInheritedScopeIds(vnode, parentComponent);
|
|
9289
|
+
for (let i = 0; i < inheritedScopeIds.length; i++) {
|
|
9290
|
+
hostSetScopeId(el, inheritedScopeIds[i]);
|
|
9099
9291
|
}
|
|
9100
9292
|
};
|
|
9101
9293
|
const mountChildren = (children, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, start = 0) => {
|
|
@@ -9347,12 +9539,21 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
9347
9539
|
n2.slotScopeIds = slotScopeIds;
|
|
9348
9540
|
if (n2.type.__vapor) {
|
|
9349
9541
|
if (n1 == null) {
|
|
9350
|
-
|
|
9351
|
-
n2
|
|
9352
|
-
|
|
9353
|
-
|
|
9354
|
-
|
|
9355
|
-
|
|
9542
|
+
if (n2.shapeFlag & 512) {
|
|
9543
|
+
getVaporInterface(parentComponent, n2).activate(
|
|
9544
|
+
n2,
|
|
9545
|
+
container,
|
|
9546
|
+
anchor,
|
|
9547
|
+
parentComponent
|
|
9548
|
+
);
|
|
9549
|
+
} else {
|
|
9550
|
+
getVaporInterface(parentComponent, n2).mount(
|
|
9551
|
+
n2,
|
|
9552
|
+
container,
|
|
9553
|
+
anchor,
|
|
9554
|
+
parentComponent
|
|
9555
|
+
);
|
|
9556
|
+
}
|
|
9356
9557
|
} else {
|
|
9357
9558
|
getVaporInterface(parentComponent, n2).update(
|
|
9358
9559
|
n1,
|
|
@@ -9416,6 +9617,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
9416
9617
|
if (!initialVNode.el) {
|
|
9417
9618
|
const placeholder = instance.subTree = createVNode(Comment);
|
|
9418
9619
|
processCommentNode(null, placeholder, container, anchor);
|
|
9620
|
+
initialVNode.placeholder = placeholder.el;
|
|
9419
9621
|
}
|
|
9420
9622
|
} else {
|
|
9421
9623
|
setupRenderEffect(
|
|
@@ -9983,7 +10185,11 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
9983
10185
|
for (i = toBePatched - 1; i >= 0; i--) {
|
|
9984
10186
|
const nextIndex = s2 + i;
|
|
9985
10187
|
const nextChild = c2[nextIndex];
|
|
9986
|
-
const
|
|
10188
|
+
const anchorVNode = c2[nextIndex + 1];
|
|
10189
|
+
const anchor = nextIndex + 1 < l2 ? (
|
|
10190
|
+
// #13559, fallback to el placeholder for unresolved async component
|
|
10191
|
+
anchorVNode.el || anchorVNode.placeholder
|
|
10192
|
+
) : parentAnchor;
|
|
9987
10193
|
if (newIndexToOldIndexMap[i] === 0) {
|
|
9988
10194
|
patch(
|
|
9989
10195
|
null,
|
|
@@ -10063,12 +10269,12 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
10063
10269
|
const needTransition2 = moveType !== 2 && shapeFlag & 1 && transition;
|
|
10064
10270
|
if (needTransition2) {
|
|
10065
10271
|
if (moveType === 0) {
|
|
10066
|
-
|
|
10067
|
-
|
|
10068
|
-
|
|
10069
|
-
() =>
|
|
10070
|
-
|
|
10071
|
-
|
|
10272
|
+
performTransitionEnter(
|
|
10273
|
+
el,
|
|
10274
|
+
transition,
|
|
10275
|
+
() => hostInsert(el, container, anchor),
|
|
10276
|
+
parentSuspense,
|
|
10277
|
+
true
|
|
10072
10278
|
);
|
|
10073
10279
|
} else {
|
|
10074
10280
|
const { leave, delayLeave, afterLeave } = transition;
|
|
@@ -10080,6 +10286,12 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
10080
10286
|
}
|
|
10081
10287
|
};
|
|
10082
10288
|
const performLeave = () => {
|
|
10289
|
+
if (el._isLeaving) {
|
|
10290
|
+
el[leaveCbKey](
|
|
10291
|
+
true
|
|
10292
|
+
/* cancelled */
|
|
10293
|
+
);
|
|
10294
|
+
}
|
|
10083
10295
|
leave(el, () => {
|
|
10084
10296
|
remove2();
|
|
10085
10297
|
afterLeave && afterLeave();
|
|
@@ -10119,7 +10331,14 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
10119
10331
|
parentComponent.renderCache[cacheIndex] = void 0;
|
|
10120
10332
|
}
|
|
10121
10333
|
if (shapeFlag & 256) {
|
|
10122
|
-
|
|
10334
|
+
if (vnode.type.__vapor) {
|
|
10335
|
+
getVaporInterface(parentComponent, vnode).deactivate(
|
|
10336
|
+
vnode,
|
|
10337
|
+
parentComponent.ctx.getStorageContainer()
|
|
10338
|
+
);
|
|
10339
|
+
} else {
|
|
10340
|
+
parentComponent.ctx.deactivate(vnode);
|
|
10341
|
+
}
|
|
10123
10342
|
return;
|
|
10124
10343
|
}
|
|
10125
10344
|
const shouldInvokeDirs = shapeFlag & 1 && dirs;
|
|
@@ -10207,22 +10426,15 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
10207
10426
|
removeStaticNode(vnode);
|
|
10208
10427
|
return;
|
|
10209
10428
|
}
|
|
10210
|
-
|
|
10211
|
-
|
|
10212
|
-
|
|
10213
|
-
transition
|
|
10214
|
-
|
|
10215
|
-
|
|
10216
|
-
|
|
10217
|
-
const { leave, delayLeave } = transition;
|
|
10218
|
-
const performLeave = () => leave(el, performRemove);
|
|
10219
|
-
if (delayLeave) {
|
|
10220
|
-
delayLeave(vnode.el, performRemove, performLeave);
|
|
10221
|
-
} else {
|
|
10222
|
-
performLeave();
|
|
10223
|
-
}
|
|
10429
|
+
if (transition) {
|
|
10430
|
+
performTransitionLeave(
|
|
10431
|
+
el,
|
|
10432
|
+
transition,
|
|
10433
|
+
() => hostRemove(el),
|
|
10434
|
+
!!(vnode.shapeFlag & 1)
|
|
10435
|
+
);
|
|
10224
10436
|
} else {
|
|
10225
|
-
|
|
10437
|
+
hostRemove(el);
|
|
10226
10438
|
}
|
|
10227
10439
|
};
|
|
10228
10440
|
const removeFragment = (cur, end) => {
|
|
@@ -10238,27 +10450,12 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
10238
10450
|
if (!!(process.env.NODE_ENV !== "production") && instance.type.__hmrId) {
|
|
10239
10451
|
unregisterHMR(instance);
|
|
10240
10452
|
}
|
|
10241
|
-
const {
|
|
10242
|
-
bum,
|
|
10243
|
-
scope,
|
|
10244
|
-
effect,
|
|
10245
|
-
subTree,
|
|
10246
|
-
um,
|
|
10247
|
-
m,
|
|
10248
|
-
a,
|
|
10249
|
-
parent,
|
|
10250
|
-
slots: { __: slotCacheKeys }
|
|
10251
|
-
} = instance;
|
|
10453
|
+
const { bum, scope, effect, subTree, um, m, a } = instance;
|
|
10252
10454
|
invalidateMount(m);
|
|
10253
10455
|
invalidateMount(a);
|
|
10254
10456
|
if (bum) {
|
|
10255
10457
|
invokeArrayFns(bum);
|
|
10256
10458
|
}
|
|
10257
|
-
if (parent && isArray(slotCacheKeys)) {
|
|
10258
|
-
slotCacheKeys.forEach((v) => {
|
|
10259
|
-
parent.renderCache[v] = void 0;
|
|
10260
|
-
});
|
|
10261
|
-
}
|
|
10262
10459
|
if (isCompatEnabled$1("INSTANCE_EVENT_HOOKS", instance)) {
|
|
10263
10460
|
instance.emit("hook:beforeDestroy");
|
|
10264
10461
|
}
|
|
@@ -10282,12 +10479,6 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
10282
10479
|
void 0,
|
|
10283
10480
|
parentSuspense
|
|
10284
10481
|
);
|
|
10285
|
-
if (parentSuspense && parentSuspense.pendingBranch && !parentSuspense.isUnmounted && instance.asyncDep && !instance.asyncResolved && instance.suspenseId === parentSuspense.pendingId) {
|
|
10286
|
-
parentSuspense.deps--;
|
|
10287
|
-
if (parentSuspense.deps === 0) {
|
|
10288
|
-
parentSuspense.resolve();
|
|
10289
|
-
}
|
|
10290
|
-
}
|
|
10291
10482
|
if (!!(process.env.NODE_ENV !== "production") || __VUE_PROD_DEVTOOLS__) {
|
|
10292
10483
|
devtoolsComponentRemoved(instance);
|
|
10293
10484
|
}
|
|
@@ -10300,7 +10491,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
10300
10491
|
const getNextHostNode = (vnode) => {
|
|
10301
10492
|
if (vnode.shapeFlag & 6) {
|
|
10302
10493
|
if (vnode.type.__vapor) {
|
|
10303
|
-
return hostNextSibling(vnode.
|
|
10494
|
+
return hostNextSibling(vnode.anchor);
|
|
10304
10495
|
}
|
|
10305
10496
|
return getNextHostNode(vnode.component.subTree);
|
|
10306
10497
|
}
|
|
@@ -10378,6 +10569,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
10378
10569
|
return {
|
|
10379
10570
|
render,
|
|
10380
10571
|
hydrate,
|
|
10572
|
+
hydrateNode,
|
|
10381
10573
|
internals,
|
|
10382
10574
|
createApp: createAppAPI(
|
|
10383
10575
|
mountApp,
|
|
@@ -10419,7 +10611,8 @@ function traverseStaticChildren(n1, n2, shallow = false) {
|
|
|
10419
10611
|
if (!shallow && c2.patchFlag !== -2)
|
|
10420
10612
|
traverseStaticChildren(c1, c2);
|
|
10421
10613
|
}
|
|
10422
|
-
if (c2.type === Text
|
|
10614
|
+
if (c2.type === Text && // avoid cached text nodes retaining detached dom nodes
|
|
10615
|
+
c2.patchFlag !== -1) {
|
|
10423
10616
|
c2.el = c1.el;
|
|
10424
10617
|
}
|
|
10425
10618
|
if (c2.type === Comment && !c2.el) {
|
|
@@ -10432,7 +10625,7 @@ function traverseStaticChildren(n1, n2, shallow = false) {
|
|
|
10432
10625
|
}
|
|
10433
10626
|
}
|
|
10434
10627
|
function locateNonHydratedAsyncRoot(instance) {
|
|
10435
|
-
const subComponent = instance.
|
|
10628
|
+
const subComponent = instance.subTree && instance.subTree.component;
|
|
10436
10629
|
if (subComponent) {
|
|
10437
10630
|
if (subComponent.asyncDep && !subComponent.asyncResolved) {
|
|
10438
10631
|
return subComponent;
|
|
@@ -10447,6 +10640,34 @@ function invalidateMount(hooks) {
|
|
|
10447
10640
|
hooks[i].flags |= 4;
|
|
10448
10641
|
}
|
|
10449
10642
|
}
|
|
10643
|
+
function performTransitionEnter(el, transition, insert, parentSuspense, force = false) {
|
|
10644
|
+
if (force || needTransition(parentSuspense, transition)) {
|
|
10645
|
+
transition.beforeEnter(el);
|
|
10646
|
+
insert();
|
|
10647
|
+
queuePostRenderEffect(() => transition.enter(el), void 0, parentSuspense);
|
|
10648
|
+
} else {
|
|
10649
|
+
insert();
|
|
10650
|
+
}
|
|
10651
|
+
}
|
|
10652
|
+
function performTransitionLeave(el, transition, remove, isElement = true) {
|
|
10653
|
+
const performRemove = () => {
|
|
10654
|
+
remove();
|
|
10655
|
+
if (transition && !transition.persisted && transition.afterLeave) {
|
|
10656
|
+
transition.afterLeave();
|
|
10657
|
+
}
|
|
10658
|
+
};
|
|
10659
|
+
if (isElement && transition && !transition.persisted) {
|
|
10660
|
+
const { leave, delayLeave } = transition;
|
|
10661
|
+
const performLeave = () => leave(el, performRemove);
|
|
10662
|
+
if (delayLeave) {
|
|
10663
|
+
delayLeave(el, performRemove, performLeave);
|
|
10664
|
+
} else {
|
|
10665
|
+
performLeave();
|
|
10666
|
+
}
|
|
10667
|
+
} else {
|
|
10668
|
+
performRemove();
|
|
10669
|
+
}
|
|
10670
|
+
}
|
|
10450
10671
|
function getVaporInterface(instance, vnode) {
|
|
10451
10672
|
const ctx = instance ? instance.appContext : vnode.appContext;
|
|
10452
10673
|
const res = ctx && ctx.vapor;
|
|
@@ -10461,6 +10682,32 @@ app.use(vaporInteropPlugin)
|
|
|
10461
10682
|
}
|
|
10462
10683
|
return res;
|
|
10463
10684
|
}
|
|
10685
|
+
function getInheritedScopeIds(vnode, parentComponent) {
|
|
10686
|
+
const inheritedScopeIds = [];
|
|
10687
|
+
let currentParent = parentComponent;
|
|
10688
|
+
let currentVNode = vnode;
|
|
10689
|
+
while (currentParent) {
|
|
10690
|
+
let subTree = currentParent.subTree;
|
|
10691
|
+
if (!subTree) break;
|
|
10692
|
+
if (!!(process.env.NODE_ENV !== "production") && subTree.patchFlag > 0 && subTree.patchFlag & 2048) {
|
|
10693
|
+
subTree = filterSingleRoot(subTree.children) || subTree;
|
|
10694
|
+
}
|
|
10695
|
+
if (currentVNode === subTree || isSuspense(subTree.type) && (subTree.ssContent === currentVNode || subTree.ssFallback === currentVNode)) {
|
|
10696
|
+
const parentVNode = currentParent.vnode;
|
|
10697
|
+
if (parentVNode.scopeId) {
|
|
10698
|
+
inheritedScopeIds.push(parentVNode.scopeId);
|
|
10699
|
+
}
|
|
10700
|
+
if (parentVNode.slotScopeIds) {
|
|
10701
|
+
inheritedScopeIds.push(...parentVNode.slotScopeIds);
|
|
10702
|
+
}
|
|
10703
|
+
currentVNode = parentVNode;
|
|
10704
|
+
currentParent = currentParent.parent;
|
|
10705
|
+
} else {
|
|
10706
|
+
break;
|
|
10707
|
+
}
|
|
10708
|
+
}
|
|
10709
|
+
return inheritedScopeIds;
|
|
10710
|
+
}
|
|
10464
10711
|
|
|
10465
10712
|
const ssrContextKey = Symbol.for("v-scx");
|
|
10466
10713
|
const useSSRContext = () => {
|
|
@@ -10704,7 +10951,7 @@ function useModel(props, name, options = EMPTY_OBJ) {
|
|
|
10704
10951
|
return res;
|
|
10705
10952
|
}
|
|
10706
10953
|
const getModelModifiers = (props, modelName, getter) => {
|
|
10707
|
-
return
|
|
10954
|
+
return getter(props, getModifierPropName(modelName)) || getter(props, `${camelize(modelName)}Modifiers`) || getter(props, `${hyphenate(modelName)}Modifiers`);
|
|
10708
10955
|
};
|
|
10709
10956
|
|
|
10710
10957
|
function emit(instance, event, ...rawArgs) {
|
|
@@ -10809,8 +11056,9 @@ function baseEmit(instance, props, getter, event, ...rawArgs) {
|
|
|
10809
11056
|
function defaultPropGetter(props, key) {
|
|
10810
11057
|
return props[key];
|
|
10811
11058
|
}
|
|
11059
|
+
const mixinEmitsCache = /* @__PURE__ */ new WeakMap();
|
|
10812
11060
|
function normalizeEmitsOptions(comp, appContext, asMixin = false) {
|
|
10813
|
-
const cache = appContext.emitsCache;
|
|
11061
|
+
const cache = __VUE_OPTIONS_API__ && asMixin ? mixinEmitsCache : appContext.emitsCache;
|
|
10814
11062
|
const cached = cache.get(comp);
|
|
10815
11063
|
if (cached !== void 0) {
|
|
10816
11064
|
return cached;
|
|
@@ -11282,7 +11530,7 @@ function patchSuspense(n1, n2, container, anchor, parentComponent, namespace, sl
|
|
|
11282
11530
|
const { activeBranch, pendingBranch, isInFallback, isHydrating } = suspense;
|
|
11283
11531
|
if (pendingBranch) {
|
|
11284
11532
|
suspense.pendingBranch = newBranch;
|
|
11285
|
-
if (isSameVNodeType(
|
|
11533
|
+
if (isSameVNodeType(pendingBranch, newBranch)) {
|
|
11286
11534
|
patch(
|
|
11287
11535
|
pendingBranch,
|
|
11288
11536
|
newBranch,
|
|
@@ -11353,7 +11601,7 @@ function patchSuspense(n1, n2, container, anchor, parentComponent, namespace, sl
|
|
|
11353
11601
|
);
|
|
11354
11602
|
setActiveBranch(suspense, newFallback);
|
|
11355
11603
|
}
|
|
11356
|
-
} else if (activeBranch && isSameVNodeType(
|
|
11604
|
+
} else if (activeBranch && isSameVNodeType(activeBranch, newBranch)) {
|
|
11357
11605
|
patch(
|
|
11358
11606
|
activeBranch,
|
|
11359
11607
|
newBranch,
|
|
@@ -11384,7 +11632,7 @@ function patchSuspense(n1, n2, container, anchor, parentComponent, namespace, sl
|
|
|
11384
11632
|
}
|
|
11385
11633
|
}
|
|
11386
11634
|
} else {
|
|
11387
|
-
if (activeBranch && isSameVNodeType(
|
|
11635
|
+
if (activeBranch && isSameVNodeType(activeBranch, newBranch)) {
|
|
11388
11636
|
patch(
|
|
11389
11637
|
activeBranch,
|
|
11390
11638
|
newBranch,
|
|
@@ -11497,7 +11745,8 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|
|
11497
11745
|
pendingId,
|
|
11498
11746
|
effects,
|
|
11499
11747
|
parentComponent: parentComponent2,
|
|
11500
|
-
container: container2
|
|
11748
|
+
container: container2,
|
|
11749
|
+
isInFallback
|
|
11501
11750
|
} = suspense;
|
|
11502
11751
|
let delayEnter = false;
|
|
11503
11752
|
if (suspense.isHydrating) {
|
|
@@ -11515,6 +11764,9 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|
|
11515
11764
|
parentComponent2
|
|
11516
11765
|
);
|
|
11517
11766
|
queuePostFlushCb(effects);
|
|
11767
|
+
if (isInFallback && vnode2.ssFallback) {
|
|
11768
|
+
vnode2.ssFallback.el = null;
|
|
11769
|
+
}
|
|
11518
11770
|
}
|
|
11519
11771
|
};
|
|
11520
11772
|
}
|
|
@@ -11523,6 +11775,9 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|
|
11523
11775
|
anchor = next(activeBranch);
|
|
11524
11776
|
}
|
|
11525
11777
|
unmount(activeBranch, parentComponent2, suspense, true);
|
|
11778
|
+
if (!delayEnter && isInFallback && vnode2.ssFallback) {
|
|
11779
|
+
vnode2.ssFallback.el = null;
|
|
11780
|
+
}
|
|
11526
11781
|
}
|
|
11527
11782
|
if (!delayEnter) {
|
|
11528
11783
|
move(
|
|
@@ -11647,6 +11902,7 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|
|
11647
11902
|
optimized2
|
|
11648
11903
|
);
|
|
11649
11904
|
if (placeholder) {
|
|
11905
|
+
vnode2.placeholder = null;
|
|
11650
11906
|
remove(placeholder);
|
|
11651
11907
|
}
|
|
11652
11908
|
updateHOCHostEl(instance, vnode2.el);
|
|
@@ -11909,15 +12165,11 @@ const createVNodeWithArgsTransform = (...args) => {
|
|
|
11909
12165
|
);
|
|
11910
12166
|
};
|
|
11911
12167
|
const normalizeKey = ({ key }) => key != null ? key : null;
|
|
11912
|
-
const normalizeRef = ({
|
|
11913
|
-
ref,
|
|
11914
|
-
ref_key,
|
|
11915
|
-
ref_for
|
|
11916
|
-
}) => {
|
|
12168
|
+
const normalizeRef = ({ ref, ref_key, ref_for }, i = currentRenderingInstance) => {
|
|
11917
12169
|
if (typeof ref === "number") {
|
|
11918
12170
|
ref = "" + ref;
|
|
11919
12171
|
}
|
|
11920
|
-
return ref != null ? isString(ref) || isRef(ref) || isFunction(ref) ? { i
|
|
12172
|
+
return ref != null ? isString(ref) || isRef(ref) || isFunction(ref) ? { i, r: ref, k: ref_key, f: !!ref_for } : ref : null;
|
|
11921
12173
|
};
|
|
11922
12174
|
function createBaseVNode(type, props = null, children = null, patchFlag = 0, dynamicProps = null, shapeFlag = type === Fragment ? 0 : 1, isBlockNode = false, needFullChildrenNormalization = false) {
|
|
11923
12175
|
const vnode = {
|
|
@@ -12090,6 +12342,7 @@ function cloneVNode(vnode, extraProps, mergeRef = false, cloneTransition = false
|
|
|
12090
12342
|
suspense: vnode.suspense,
|
|
12091
12343
|
ssContent: vnode.ssContent && cloneVNode(vnode.ssContent),
|
|
12092
12344
|
ssFallback: vnode.ssFallback && cloneVNode(vnode.ssFallback),
|
|
12345
|
+
placeholder: vnode.placeholder,
|
|
12093
12346
|
el: vnode.el,
|
|
12094
12347
|
anchor: vnode.anchor,
|
|
12095
12348
|
ctx: vnode.ctx,
|
|
@@ -12252,6 +12505,25 @@ const setCurrentInstance = (instance, scope = instance !== null ? instance.scope
|
|
|
12252
12505
|
simpleSetCurrentInstance(instance);
|
|
12253
12506
|
}
|
|
12254
12507
|
};
|
|
12508
|
+
const internalOptions = ["ce", "type"];
|
|
12509
|
+
const useInstanceOption = (key, silent = false) => {
|
|
12510
|
+
const instance = getCurrentGenericInstance();
|
|
12511
|
+
if (!instance) {
|
|
12512
|
+
if (!!(process.env.NODE_ENV !== "production") && !silent) {
|
|
12513
|
+
warn$1(`useInstanceOption called without an active component instance.`);
|
|
12514
|
+
}
|
|
12515
|
+
return { hasInstance: false, value: void 0 };
|
|
12516
|
+
}
|
|
12517
|
+
if (!internalOptions.includes(key)) {
|
|
12518
|
+
if (!!(process.env.NODE_ENV !== "production")) {
|
|
12519
|
+
warn$1(
|
|
12520
|
+
`useInstanceOption only accepts ${internalOptions.map((k) => `'${k}'`).join(", ")} as key, got '${key}'.`
|
|
12521
|
+
);
|
|
12522
|
+
}
|
|
12523
|
+
return { hasInstance: true, value: void 0 };
|
|
12524
|
+
}
|
|
12525
|
+
return { hasInstance: true, value: instance[key] };
|
|
12526
|
+
};
|
|
12255
12527
|
|
|
12256
12528
|
const emptyAppContext = createAppContext();
|
|
12257
12529
|
let uid = 0;
|
|
@@ -12648,7 +12920,7 @@ function getComponentPublicInstance(instance) {
|
|
|
12648
12920
|
return instance.proxy;
|
|
12649
12921
|
}
|
|
12650
12922
|
}
|
|
12651
|
-
const classifyRE = /(?:^|[-_])
|
|
12923
|
+
const classifyRE = /(?:^|[-_])\w/g;
|
|
12652
12924
|
const classify = (str) => str.replace(classifyRE, (c) => c.toUpperCase()).replace(/[-_]/g, "");
|
|
12653
12925
|
function getComponentName(Component, includeInferred = true) {
|
|
12654
12926
|
return isFunction(Component) ? Component.displayName || Component.name : Component.name || includeInferred && Component.__name;
|
|
@@ -12684,23 +12956,28 @@ const computed = (getterOrOptions, debugOptions) => {
|
|
|
12684
12956
|
};
|
|
12685
12957
|
|
|
12686
12958
|
function h(type, propsOrChildren, children) {
|
|
12687
|
-
|
|
12688
|
-
|
|
12689
|
-
|
|
12690
|
-
|
|
12691
|
-
|
|
12959
|
+
try {
|
|
12960
|
+
setBlockTracking(-1);
|
|
12961
|
+
const l = arguments.length;
|
|
12962
|
+
if (l === 2) {
|
|
12963
|
+
if (isObject(propsOrChildren) && !isArray(propsOrChildren)) {
|
|
12964
|
+
if (isVNode(propsOrChildren)) {
|
|
12965
|
+
return createVNode(type, null, [propsOrChildren]);
|
|
12966
|
+
}
|
|
12967
|
+
return createVNode(type, propsOrChildren);
|
|
12968
|
+
} else {
|
|
12969
|
+
return createVNode(type, null, propsOrChildren);
|
|
12692
12970
|
}
|
|
12693
|
-
return createVNode(type, propsOrChildren);
|
|
12694
12971
|
} else {
|
|
12695
|
-
|
|
12696
|
-
|
|
12697
|
-
|
|
12698
|
-
|
|
12699
|
-
|
|
12700
|
-
|
|
12701
|
-
children = [children];
|
|
12972
|
+
if (l > 3) {
|
|
12973
|
+
children = Array.prototype.slice.call(arguments, 2);
|
|
12974
|
+
} else if (l === 3 && isVNode(children)) {
|
|
12975
|
+
children = [children];
|
|
12976
|
+
}
|
|
12977
|
+
return createVNode(type, propsOrChildren, children);
|
|
12702
12978
|
}
|
|
12703
|
-
|
|
12979
|
+
} finally {
|
|
12980
|
+
setBlockTracking(1);
|
|
12704
12981
|
}
|
|
12705
12982
|
}
|
|
12706
12983
|
|
|
@@ -12910,7 +13187,7 @@ function isMemoSame(cached, memo) {
|
|
|
12910
13187
|
return true;
|
|
12911
13188
|
}
|
|
12912
13189
|
|
|
12913
|
-
const version = "3.6.0-alpha.
|
|
13190
|
+
const version = "3.6.0-alpha.4";
|
|
12914
13191
|
const warn = !!(process.env.NODE_ENV !== "production") ? warn$1 : NOOP;
|
|
12915
13192
|
const ErrorTypeStrings = ErrorTypeStrings$1 ;
|
|
12916
13193
|
const devtools = !!(process.env.NODE_ENV !== "production") || true ? devtools$1 : void 0;
|
|
@@ -13180,11 +13457,11 @@ function resolveTransitionProps(rawProps) {
|
|
|
13180
13457
|
addTransitionClass(el, legacyLeaveFromClass);
|
|
13181
13458
|
}
|
|
13182
13459
|
if (!el._enterCancelled) {
|
|
13183
|
-
forceReflow();
|
|
13460
|
+
forceReflow(el);
|
|
13184
13461
|
addTransitionClass(el, leaveActiveClass);
|
|
13185
13462
|
} else {
|
|
13186
13463
|
addTransitionClass(el, leaveActiveClass);
|
|
13187
|
-
forceReflow();
|
|
13464
|
+
forceReflow(el);
|
|
13188
13465
|
}
|
|
13189
13466
|
nextFrame(() => {
|
|
13190
13467
|
if (!el._isLeaving) {
|
|
@@ -13313,7 +13590,7 @@ function getTransitionInfo(el, expectedType) {
|
|
|
13313
13590
|
type = timeout > 0 ? transitionTimeout > animationTimeout ? TRANSITION$1 : ANIMATION : null;
|
|
13314
13591
|
propCount = type ? type === TRANSITION$1 ? transitionDurations.length : animationDurations.length : 0;
|
|
13315
13592
|
}
|
|
13316
|
-
const hasTransform = type === TRANSITION$1 && /\b(transform|all)(
|
|
13593
|
+
const hasTransform = type === TRANSITION$1 && /\b(?:transform|all)(?:,|$)/.test(
|
|
13317
13594
|
getStyleProperties(`${TRANSITION$1}Property`).toString()
|
|
13318
13595
|
);
|
|
13319
13596
|
return {
|
|
@@ -13333,8 +13610,9 @@ function toMs(s) {
|
|
|
13333
13610
|
if (s === "auto") return 0;
|
|
13334
13611
|
return Number(s.slice(0, -1).replace(",", ".")) * 1e3;
|
|
13335
13612
|
}
|
|
13336
|
-
function forceReflow() {
|
|
13337
|
-
|
|
13613
|
+
function forceReflow(el) {
|
|
13614
|
+
const targetDocument = el ? el.ownerDocument : document;
|
|
13615
|
+
return targetDocument.body.offsetHeight;
|
|
13338
13616
|
}
|
|
13339
13617
|
|
|
13340
13618
|
function patchClass(el, value, isSVG) {
|
|
@@ -13354,6 +13632,8 @@ function patchClass(el, value, isSVG) {
|
|
|
13354
13632
|
const vShowOriginalDisplay = Symbol("_vod");
|
|
13355
13633
|
const vShowHidden = Symbol("_vsh");
|
|
13356
13634
|
const vShow = {
|
|
13635
|
+
// used for prop mismatch check during hydration
|
|
13636
|
+
name: "show",
|
|
13357
13637
|
beforeMount(el, { value }, { transition }) {
|
|
13358
13638
|
el[vShowOriginalDisplay] = el.style.display === "none" ? "" : el.style.display;
|
|
13359
13639
|
if (transition && value) {
|
|
@@ -13387,9 +13667,6 @@ const vShow = {
|
|
|
13387
13667
|
setDisplay(el, value);
|
|
13388
13668
|
}
|
|
13389
13669
|
};
|
|
13390
|
-
if (!!(process.env.NODE_ENV !== "production")) {
|
|
13391
|
-
vShow.name = "show";
|
|
13392
|
-
}
|
|
13393
13670
|
function setDisplay(el, value) {
|
|
13394
13671
|
el.style.display = value ? el[vShowOriginalDisplay] : "none";
|
|
13395
13672
|
el[vShowHidden] = !value;
|
|
@@ -13475,7 +13752,7 @@ function setVarsOnNode(el, vars) {
|
|
|
13475
13752
|
}
|
|
13476
13753
|
}
|
|
13477
13754
|
|
|
13478
|
-
const displayRE = /(
|
|
13755
|
+
const displayRE = /(?:^|;)\s*display\s*:/;
|
|
13479
13756
|
function patchStyle(el, prev, next) {
|
|
13480
13757
|
const style = el.style;
|
|
13481
13758
|
const isCssString = isString(next);
|
|
@@ -13824,11 +14101,10 @@ function shouldSetAsProp(el, key, value, isSVG) {
|
|
|
13824
14101
|
}
|
|
13825
14102
|
|
|
13826
14103
|
const REMOVAL = {};
|
|
13827
|
-
/*! #__NO_SIDE_EFFECTS__ */
|
|
13828
14104
|
// @__NO_SIDE_EFFECTS__
|
|
13829
14105
|
function defineCustomElement(options, extraOptions, _createApp) {
|
|
13830
|
-
|
|
13831
|
-
if (isPlainObject(Comp)) extend(Comp, extraOptions);
|
|
14106
|
+
let Comp = defineComponent(options, extraOptions);
|
|
14107
|
+
if (isPlainObject(Comp)) Comp = extend({}, Comp, extraOptions);
|
|
13832
14108
|
class VueCustomElement extends VueElement {
|
|
13833
14109
|
constructor(initialProps) {
|
|
13834
14110
|
super(Comp, initialProps, _createApp);
|
|
@@ -13837,18 +14113,14 @@ function defineCustomElement(options, extraOptions, _createApp) {
|
|
|
13837
14113
|
VueCustomElement.def = Comp;
|
|
13838
14114
|
return VueCustomElement;
|
|
13839
14115
|
}
|
|
13840
|
-
|
|
13841
|
-
const defineSSRCustomElement = /* @__NO_SIDE_EFFECTS__ */ (options, extraOptions) => {
|
|
14116
|
+
const defineSSRCustomElement = (/* @__NO_SIDE_EFFECTS__ */ (options, extraOptions) => {
|
|
13842
14117
|
return /* @__PURE__ */ defineCustomElement(options, extraOptions, createSSRApp);
|
|
13843
|
-
};
|
|
14118
|
+
});
|
|
13844
14119
|
const BaseClass = typeof HTMLElement !== "undefined" ? HTMLElement : class {
|
|
13845
14120
|
};
|
|
13846
|
-
class
|
|
13847
|
-
constructor(
|
|
14121
|
+
class VueElementBase extends BaseClass {
|
|
14122
|
+
constructor(def, props = {}, createAppFn) {
|
|
13848
14123
|
super();
|
|
13849
|
-
this._def = _def;
|
|
13850
|
-
this._props = _props;
|
|
13851
|
-
this._createApp = _createApp;
|
|
13852
14124
|
this._isVueCE = true;
|
|
13853
14125
|
/**
|
|
13854
14126
|
* @internal
|
|
@@ -13858,25 +14130,26 @@ class VueElement extends BaseClass {
|
|
|
13858
14130
|
* @internal
|
|
13859
14131
|
*/
|
|
13860
14132
|
this._app = null;
|
|
13861
|
-
/**
|
|
13862
|
-
* @internal
|
|
13863
|
-
*/
|
|
13864
|
-
this._nonce = this._def.nonce;
|
|
13865
14133
|
this._connected = false;
|
|
13866
14134
|
this._resolved = false;
|
|
13867
14135
|
this._numberProps = null;
|
|
13868
14136
|
this._styleChildren = /* @__PURE__ */ new WeakSet();
|
|
14137
|
+
this._patching = false;
|
|
14138
|
+
this._dirty = false;
|
|
13869
14139
|
this._ob = null;
|
|
13870
|
-
|
|
14140
|
+
this._def = def;
|
|
14141
|
+
this._props = props;
|
|
14142
|
+
this._createApp = createAppFn;
|
|
14143
|
+
this._nonce = def.nonce;
|
|
14144
|
+
if (this._needsHydration()) {
|
|
13871
14145
|
this._root = this.shadowRoot;
|
|
13872
14146
|
} else {
|
|
13873
|
-
if (
|
|
13874
|
-
|
|
13875
|
-
|
|
14147
|
+
if (def.shadowRoot !== false) {
|
|
14148
|
+
this.attachShadow(
|
|
14149
|
+
extend({}, def.shadowRootOptions, {
|
|
14150
|
+
mode: "open"
|
|
14151
|
+
})
|
|
13876
14152
|
);
|
|
13877
|
-
}
|
|
13878
|
-
if (_def.shadowRoot !== false) {
|
|
13879
|
-
this.attachShadow({ mode: "open" });
|
|
13880
14153
|
this._root = this.shadowRoot;
|
|
13881
14154
|
} else {
|
|
13882
14155
|
this._root = this;
|
|
@@ -13891,14 +14164,14 @@ class VueElement extends BaseClass {
|
|
|
13891
14164
|
this._connected = true;
|
|
13892
14165
|
let parent = this;
|
|
13893
14166
|
while (parent = parent && (parent.parentNode || parent.host)) {
|
|
13894
|
-
if (parent instanceof
|
|
14167
|
+
if (parent instanceof VueElementBase) {
|
|
13895
14168
|
this._parent = parent;
|
|
13896
14169
|
break;
|
|
13897
14170
|
}
|
|
13898
14171
|
}
|
|
13899
14172
|
if (!this._instance) {
|
|
13900
14173
|
if (this._resolved) {
|
|
13901
|
-
this.
|
|
14174
|
+
this._mountComponent(this._def);
|
|
13902
14175
|
} else {
|
|
13903
14176
|
if (parent && parent._pendingResolve) {
|
|
13904
14177
|
this._pendingResolve = parent._pendingResolve.then(() => {
|
|
@@ -13911,8 +14184,24 @@ class VueElement extends BaseClass {
|
|
|
13911
14184
|
}
|
|
13912
14185
|
}
|
|
13913
14186
|
}
|
|
14187
|
+
disconnectedCallback() {
|
|
14188
|
+
this._connected = false;
|
|
14189
|
+
nextTick(() => {
|
|
14190
|
+
if (!this._connected) {
|
|
14191
|
+
if (this._ob) {
|
|
14192
|
+
this._ob.disconnect();
|
|
14193
|
+
this._ob = null;
|
|
14194
|
+
}
|
|
14195
|
+
this._unmount();
|
|
14196
|
+
if (this._teleportTargets) {
|
|
14197
|
+
this._teleportTargets.clear();
|
|
14198
|
+
this._teleportTargets = void 0;
|
|
14199
|
+
}
|
|
14200
|
+
}
|
|
14201
|
+
});
|
|
14202
|
+
}
|
|
13914
14203
|
_setParent(parent = this._parent) {
|
|
13915
|
-
if (parent) {
|
|
14204
|
+
if (parent && this._instance) {
|
|
13916
14205
|
this._instance.parent = parent._instance;
|
|
13917
14206
|
this._inheritParentContext(parent);
|
|
13918
14207
|
}
|
|
@@ -13925,19 +14214,10 @@ class VueElement extends BaseClass {
|
|
|
13925
14214
|
);
|
|
13926
14215
|
}
|
|
13927
14216
|
}
|
|
13928
|
-
|
|
13929
|
-
|
|
13930
|
-
|
|
13931
|
-
|
|
13932
|
-
if (this._ob) {
|
|
13933
|
-
this._ob.disconnect();
|
|
13934
|
-
this._ob = null;
|
|
13935
|
-
}
|
|
13936
|
-
this._app && this._app.unmount();
|
|
13937
|
-
if (this._instance) this._instance.ce = void 0;
|
|
13938
|
-
this._app = this._instance = null;
|
|
13939
|
-
}
|
|
13940
|
-
});
|
|
14217
|
+
_processMutations(mutations) {
|
|
14218
|
+
for (const m of mutations) {
|
|
14219
|
+
this._setAttr(m.attributeName);
|
|
14220
|
+
}
|
|
13941
14221
|
}
|
|
13942
14222
|
/**
|
|
13943
14223
|
* resolve inner component definition (handle possible async component)
|
|
@@ -13949,13 +14229,9 @@ class VueElement extends BaseClass {
|
|
|
13949
14229
|
for (let i = 0; i < this.attributes.length; i++) {
|
|
13950
14230
|
this._setAttr(this.attributes[i].name);
|
|
13951
14231
|
}
|
|
13952
|
-
this._ob = new MutationObserver((
|
|
13953
|
-
for (const m of mutations) {
|
|
13954
|
-
this._setAttr(m.attributeName);
|
|
13955
|
-
}
|
|
13956
|
-
});
|
|
14232
|
+
this._ob = new MutationObserver(this._processMutations.bind(this));
|
|
13957
14233
|
this._ob.observe(this, { attributes: true });
|
|
13958
|
-
const resolve = (def
|
|
14234
|
+
const resolve = (def) => {
|
|
13959
14235
|
this._resolved = true;
|
|
13960
14236
|
this._pendingResolve = void 0;
|
|
13961
14237
|
const { props, styles } = def;
|
|
@@ -13980,29 +14256,25 @@ class VueElement extends BaseClass {
|
|
|
13980
14256
|
"Custom element style injection is not supported when using shadowRoot: false"
|
|
13981
14257
|
);
|
|
13982
14258
|
}
|
|
13983
|
-
this.
|
|
14259
|
+
this._mountComponent(def);
|
|
13984
14260
|
};
|
|
13985
14261
|
const asyncDef = this._def.__asyncLoader;
|
|
13986
14262
|
if (asyncDef) {
|
|
14263
|
+
const { configureApp } = this._def;
|
|
13987
14264
|
this._pendingResolve = asyncDef().then((def) => {
|
|
13988
|
-
def.configureApp =
|
|
13989
|
-
|
|
14265
|
+
def.configureApp = configureApp;
|
|
14266
|
+
this._def = def;
|
|
14267
|
+
resolve(def);
|
|
13990
14268
|
});
|
|
13991
14269
|
} else {
|
|
13992
14270
|
resolve(this._def);
|
|
13993
14271
|
}
|
|
13994
14272
|
}
|
|
13995
|
-
|
|
13996
|
-
|
|
13997
|
-
|
|
13998
|
-
|
|
13999
|
-
|
|
14000
|
-
this._inheritParentContext();
|
|
14001
|
-
if (def.configureApp) {
|
|
14002
|
-
def.configureApp(this._app);
|
|
14003
|
-
}
|
|
14004
|
-
this._app._ceVNode = this._createVNode();
|
|
14005
|
-
this._app.mount(this._root);
|
|
14273
|
+
_mountComponent(def) {
|
|
14274
|
+
this._mount(def);
|
|
14275
|
+
this._processExposed();
|
|
14276
|
+
}
|
|
14277
|
+
_processExposed() {
|
|
14006
14278
|
const exposed = this._instance && this._instance.exposed;
|
|
14007
14279
|
if (!exposed) return;
|
|
14008
14280
|
for (const key in exposed) {
|
|
@@ -14016,6 +14288,38 @@ class VueElement extends BaseClass {
|
|
|
14016
14288
|
}
|
|
14017
14289
|
}
|
|
14018
14290
|
}
|
|
14291
|
+
_processInstance() {
|
|
14292
|
+
this._instance.ce = this;
|
|
14293
|
+
this._instance.isCE = true;
|
|
14294
|
+
if (!!(process.env.NODE_ENV !== "production")) {
|
|
14295
|
+
this._instance.ceReload = (newStyles) => {
|
|
14296
|
+
if (this._styles) {
|
|
14297
|
+
this._styles.forEach((s) => this._root.removeChild(s));
|
|
14298
|
+
this._styles.length = 0;
|
|
14299
|
+
}
|
|
14300
|
+
this._applyStyles(newStyles);
|
|
14301
|
+
if (!this._instance.vapor) {
|
|
14302
|
+
this._instance = null;
|
|
14303
|
+
}
|
|
14304
|
+
this._update();
|
|
14305
|
+
};
|
|
14306
|
+
}
|
|
14307
|
+
const dispatch = (event, args) => {
|
|
14308
|
+
this.dispatchEvent(
|
|
14309
|
+
new CustomEvent(
|
|
14310
|
+
event,
|
|
14311
|
+
isPlainObject(args[0]) ? extend({ detail: args }, args[0]) : { detail: args }
|
|
14312
|
+
)
|
|
14313
|
+
);
|
|
14314
|
+
};
|
|
14315
|
+
this._instance.emit = (event, ...args) => {
|
|
14316
|
+
dispatch(event, args);
|
|
14317
|
+
if (hyphenate(event) !== event) {
|
|
14318
|
+
dispatch(hyphenate(event), args);
|
|
14319
|
+
}
|
|
14320
|
+
};
|
|
14321
|
+
this._setParent();
|
|
14322
|
+
}
|
|
14019
14323
|
_resolveProps(def) {
|
|
14020
14324
|
const { props } = def;
|
|
14021
14325
|
const declaredPropKeys = isArray(props) ? props : Object.keys(props || {});
|
|
@@ -14030,7 +14334,7 @@ class VueElement extends BaseClass {
|
|
|
14030
14334
|
return this._getProp(key);
|
|
14031
14335
|
},
|
|
14032
14336
|
set(val) {
|
|
14033
|
-
this._setProp(key, val, true,
|
|
14337
|
+
this._setProp(key, val, true, !this._patching);
|
|
14034
14338
|
}
|
|
14035
14339
|
});
|
|
14036
14340
|
}
|
|
@@ -14056,11 +14360,12 @@ class VueElement extends BaseClass {
|
|
|
14056
14360
|
*/
|
|
14057
14361
|
_setProp(key, val, shouldReflect = true, shouldUpdate = false) {
|
|
14058
14362
|
if (val !== this._props[key]) {
|
|
14363
|
+
this._dirty = true;
|
|
14059
14364
|
if (val === REMOVAL) {
|
|
14060
14365
|
delete this._props[key];
|
|
14061
14366
|
} else {
|
|
14062
14367
|
this._props[key] = val;
|
|
14063
|
-
if (key === "key" && this._app) {
|
|
14368
|
+
if (key === "key" && this._app && this._app._ceVNode) {
|
|
14064
14369
|
this._app._ceVNode.key = val;
|
|
14065
14370
|
}
|
|
14066
14371
|
}
|
|
@@ -14069,7 +14374,10 @@ class VueElement extends BaseClass {
|
|
|
14069
14374
|
}
|
|
14070
14375
|
if (shouldReflect) {
|
|
14071
14376
|
const ob = this._ob;
|
|
14072
|
-
|
|
14377
|
+
if (ob) {
|
|
14378
|
+
this._processMutations(ob.takeRecords());
|
|
14379
|
+
ob.disconnect();
|
|
14380
|
+
}
|
|
14073
14381
|
if (val === true) {
|
|
14074
14382
|
this.setAttribute(hyphenate(key), "");
|
|
14075
14383
|
} else if (typeof val === "string" || typeof val === "number") {
|
|
@@ -14081,52 +14389,6 @@ class VueElement extends BaseClass {
|
|
|
14081
14389
|
}
|
|
14082
14390
|
}
|
|
14083
14391
|
}
|
|
14084
|
-
_update() {
|
|
14085
|
-
const vnode = this._createVNode();
|
|
14086
|
-
if (this._app) vnode.appContext = this._app._context;
|
|
14087
|
-
render(vnode, this._root);
|
|
14088
|
-
}
|
|
14089
|
-
_createVNode() {
|
|
14090
|
-
const baseProps = {};
|
|
14091
|
-
if (!this.shadowRoot) {
|
|
14092
|
-
baseProps.onVnodeMounted = baseProps.onVnodeUpdated = this._renderSlots.bind(this);
|
|
14093
|
-
}
|
|
14094
|
-
const vnode = createVNode(this._def, extend(baseProps, this._props));
|
|
14095
|
-
if (!this._instance) {
|
|
14096
|
-
vnode.ce = (instance) => {
|
|
14097
|
-
this._instance = instance;
|
|
14098
|
-
instance.ce = this;
|
|
14099
|
-
instance.isCE = true;
|
|
14100
|
-
if (!!(process.env.NODE_ENV !== "production")) {
|
|
14101
|
-
instance.ceReload = (newStyles) => {
|
|
14102
|
-
if (this._styles) {
|
|
14103
|
-
this._styles.forEach((s) => this._root.removeChild(s));
|
|
14104
|
-
this._styles.length = 0;
|
|
14105
|
-
}
|
|
14106
|
-
this._applyStyles(newStyles);
|
|
14107
|
-
this._instance = null;
|
|
14108
|
-
this._update();
|
|
14109
|
-
};
|
|
14110
|
-
}
|
|
14111
|
-
const dispatch = (event, args) => {
|
|
14112
|
-
this.dispatchEvent(
|
|
14113
|
-
new CustomEvent(
|
|
14114
|
-
event,
|
|
14115
|
-
isPlainObject(args[0]) ? extend({ detail: args }, args[0]) : { detail: args }
|
|
14116
|
-
)
|
|
14117
|
-
);
|
|
14118
|
-
};
|
|
14119
|
-
instance.emit = (event, ...args) => {
|
|
14120
|
-
dispatch(event, args);
|
|
14121
|
-
if (hyphenate(event) !== event) {
|
|
14122
|
-
dispatch(hyphenate(event), args);
|
|
14123
|
-
}
|
|
14124
|
-
};
|
|
14125
|
-
this._setParent();
|
|
14126
|
-
};
|
|
14127
|
-
}
|
|
14128
|
-
return vnode;
|
|
14129
|
-
}
|
|
14130
14392
|
_applyStyles(styles, owner) {
|
|
14131
14393
|
if (!styles) return;
|
|
14132
14394
|
if (owner) {
|
|
@@ -14173,13 +14435,15 @@ class VueElement extends BaseClass {
|
|
|
14173
14435
|
* Only called when shadowRoot is false
|
|
14174
14436
|
*/
|
|
14175
14437
|
_renderSlots() {
|
|
14176
|
-
const outlets =
|
|
14438
|
+
const outlets = this._getSlots();
|
|
14177
14439
|
const scopeId = this._instance.type.__scopeId;
|
|
14440
|
+
const slotReplacements = /* @__PURE__ */ new Map();
|
|
14178
14441
|
for (let i = 0; i < outlets.length; i++) {
|
|
14179
14442
|
const o = outlets[i];
|
|
14180
14443
|
const slotName = o.getAttribute("name") || "default";
|
|
14181
14444
|
const content = this._slots[slotName];
|
|
14182
14445
|
const parent = o.parentNode;
|
|
14446
|
+
const replacementNodes = [];
|
|
14183
14447
|
if (content) {
|
|
14184
14448
|
for (const n of content) {
|
|
14185
14449
|
if (scopeId && n.nodeType === 1) {
|
|
@@ -14192,18 +14456,58 @@ class VueElement extends BaseClass {
|
|
|
14192
14456
|
}
|
|
14193
14457
|
}
|
|
14194
14458
|
parent.insertBefore(n, o);
|
|
14459
|
+
replacementNodes.push(n);
|
|
14195
14460
|
}
|
|
14196
14461
|
} else {
|
|
14197
|
-
while (o.firstChild)
|
|
14462
|
+
while (o.firstChild) {
|
|
14463
|
+
const child = o.firstChild;
|
|
14464
|
+
parent.insertBefore(child, o);
|
|
14465
|
+
replacementNodes.push(child);
|
|
14466
|
+
}
|
|
14198
14467
|
}
|
|
14199
14468
|
parent.removeChild(o);
|
|
14469
|
+
slotReplacements.set(o, replacementNodes);
|
|
14470
|
+
}
|
|
14471
|
+
this._updateSlotNodes(slotReplacements);
|
|
14472
|
+
}
|
|
14473
|
+
/**
|
|
14474
|
+
* @internal
|
|
14475
|
+
*/
|
|
14476
|
+
_getSlots() {
|
|
14477
|
+
const roots = [this];
|
|
14478
|
+
if (this._teleportTargets) {
|
|
14479
|
+
roots.push(...this._teleportTargets);
|
|
14200
14480
|
}
|
|
14481
|
+
const slots = /* @__PURE__ */ new Set();
|
|
14482
|
+
for (const root of roots) {
|
|
14483
|
+
const found = root.querySelectorAll("slot");
|
|
14484
|
+
for (let i = 0; i < found.length; i++) {
|
|
14485
|
+
slots.add(found[i]);
|
|
14486
|
+
}
|
|
14487
|
+
}
|
|
14488
|
+
return Array.from(slots);
|
|
14489
|
+
}
|
|
14490
|
+
/**
|
|
14491
|
+
* @internal
|
|
14492
|
+
*/
|
|
14493
|
+
_injectChildStyle(comp) {
|
|
14494
|
+
this._applyStyles(comp.styles, comp);
|
|
14201
14495
|
}
|
|
14202
14496
|
/**
|
|
14203
14497
|
* @internal
|
|
14204
14498
|
*/
|
|
14205
|
-
|
|
14206
|
-
this.
|
|
14499
|
+
_beginPatch() {
|
|
14500
|
+
this._patching = true;
|
|
14501
|
+
this._dirty = false;
|
|
14502
|
+
}
|
|
14503
|
+
/**
|
|
14504
|
+
* @internal
|
|
14505
|
+
*/
|
|
14506
|
+
_endPatch() {
|
|
14507
|
+
this._patching = false;
|
|
14508
|
+
if (this._dirty && this._instance) {
|
|
14509
|
+
this._update();
|
|
14510
|
+
}
|
|
14207
14511
|
}
|
|
14208
14512
|
/**
|
|
14209
14513
|
* @internal
|
|
@@ -14221,13 +14525,76 @@ class VueElement extends BaseClass {
|
|
|
14221
14525
|
}
|
|
14222
14526
|
}
|
|
14223
14527
|
}
|
|
14528
|
+
class VueElement extends VueElementBase {
|
|
14529
|
+
constructor(def, props = {}, createAppFn = createApp) {
|
|
14530
|
+
super(def, props, createAppFn);
|
|
14531
|
+
}
|
|
14532
|
+
_needsHydration() {
|
|
14533
|
+
if (this.shadowRoot && this._createApp !== createApp) {
|
|
14534
|
+
return true;
|
|
14535
|
+
} else {
|
|
14536
|
+
if (!!(process.env.NODE_ENV !== "production") && this.shadowRoot) {
|
|
14537
|
+
warn(
|
|
14538
|
+
`Custom element has pre-rendered declarative shadow root but is not defined as hydratable. Use \`defineSSRCustomElement\`.`
|
|
14539
|
+
);
|
|
14540
|
+
}
|
|
14541
|
+
}
|
|
14542
|
+
return false;
|
|
14543
|
+
}
|
|
14544
|
+
_mount(def) {
|
|
14545
|
+
if ((!!(process.env.NODE_ENV !== "production") || __VUE_PROD_DEVTOOLS__) && !def.name) {
|
|
14546
|
+
def.name = "VueElement";
|
|
14547
|
+
}
|
|
14548
|
+
this._app = this._createApp(def);
|
|
14549
|
+
this._inheritParentContext();
|
|
14550
|
+
if (def.configureApp) {
|
|
14551
|
+
def.configureApp(this._app);
|
|
14552
|
+
}
|
|
14553
|
+
this._app._ceVNode = this._createVNode();
|
|
14554
|
+
this._app.mount(this._root);
|
|
14555
|
+
}
|
|
14556
|
+
_update() {
|
|
14557
|
+
if (!this._app) return;
|
|
14558
|
+
const vnode = this._createVNode();
|
|
14559
|
+
vnode.appContext = this._app._context;
|
|
14560
|
+
render(vnode, this._root);
|
|
14561
|
+
}
|
|
14562
|
+
_unmount() {
|
|
14563
|
+
if (this._app) {
|
|
14564
|
+
this._app.unmount();
|
|
14565
|
+
}
|
|
14566
|
+
if (this._instance && this._instance.ce) {
|
|
14567
|
+
this._instance.ce = void 0;
|
|
14568
|
+
}
|
|
14569
|
+
this._app = this._instance = null;
|
|
14570
|
+
}
|
|
14571
|
+
/**
|
|
14572
|
+
* Only called when shadowRoot is false
|
|
14573
|
+
*/
|
|
14574
|
+
_updateSlotNodes(replacements) {
|
|
14575
|
+
}
|
|
14576
|
+
_createVNode() {
|
|
14577
|
+
const baseProps = {};
|
|
14578
|
+
if (!this.shadowRoot) {
|
|
14579
|
+
baseProps.onVnodeMounted = baseProps.onVnodeUpdated = this._renderSlots.bind(this);
|
|
14580
|
+
}
|
|
14581
|
+
const vnode = createVNode(this._def, extend(baseProps, this._props));
|
|
14582
|
+
if (!this._instance) {
|
|
14583
|
+
vnode.ce = (instance) => {
|
|
14584
|
+
this._instance = instance;
|
|
14585
|
+
this._processInstance();
|
|
14586
|
+
};
|
|
14587
|
+
}
|
|
14588
|
+
return vnode;
|
|
14589
|
+
}
|
|
14590
|
+
}
|
|
14224
14591
|
function useHost(caller) {
|
|
14225
|
-
const
|
|
14226
|
-
const el =
|
|
14592
|
+
const { hasInstance, value } = useInstanceOption("ce", true);
|
|
14593
|
+
const el = value;
|
|
14227
14594
|
if (el) {
|
|
14228
14595
|
return el;
|
|
14229
14596
|
} else if (!!(process.env.NODE_ENV !== "production")) {
|
|
14230
|
-
if (!
|
|
14597
|
+
if (!hasInstance) {
|
|
14231
14598
|
warn(
|
|
14232
14599
|
`${caller || "useHost"} called without an active component instance.`
|
|
14233
14600
|
);
|
|
@@ -14246,12 +14613,12 @@ function useShadowRoot() {
|
|
|
14246
14613
|
|
|
14247
14614
|
function useCssModule(name = "$style") {
|
|
14248
14615
|
{
|
|
14249
|
-
const
|
|
14250
|
-
if (!
|
|
14616
|
+
const { hasInstance, value: type } = useInstanceOption("type", true);
|
|
14617
|
+
if (!hasInstance) {
|
|
14251
14618
|
!!(process.env.NODE_ENV !== "production") && warn(`useCssModule must be called inside setup()`);
|
|
14252
14619
|
return EMPTY_OBJ;
|
|
14253
14620
|
}
|
|
14254
|
-
const modules =
|
|
14621
|
+
const modules = type.__cssModules;
|
|
14255
14622
|
if (!modules) {
|
|
14256
14623
|
!!(process.env.NODE_ENV !== "production") && warn(`Current instance does not have CSS modules injected.`);
|
|
14257
14624
|
return EMPTY_OBJ;
|
|
@@ -14300,26 +14667,13 @@ const TransitionGroupImpl = /* @__PURE__ */ decorate({
|
|
|
14300
14667
|
prevChildren = [];
|
|
14301
14668
|
return;
|
|
14302
14669
|
}
|
|
14303
|
-
prevChildren.forEach(callPendingCbs);
|
|
14670
|
+
prevChildren.forEach((vnode) => callPendingCbs(vnode.el));
|
|
14304
14671
|
prevChildren.forEach(recordPosition);
|
|
14305
14672
|
const movedChildren = prevChildren.filter(applyTranslation);
|
|
14306
|
-
forceReflow();
|
|
14673
|
+
forceReflow(instance.vnode.el);
|
|
14307
14674
|
movedChildren.forEach((c) => {
|
|
14308
14675
|
const el = c.el;
|
|
14309
|
-
|
|
14310
|
-
addTransitionClass(el, moveClass);
|
|
14311
|
-
style.transform = style.webkitTransform = style.transitionDuration = "";
|
|
14312
|
-
const cb = el[moveCbKey] = (e) => {
|
|
14313
|
-
if (e && e.target !== el) {
|
|
14314
|
-
return;
|
|
14315
|
-
}
|
|
14316
|
-
if (!e || /transform$/.test(e.propertyName)) {
|
|
14317
|
-
el.removeEventListener("transitionend", cb);
|
|
14318
|
-
el[moveCbKey] = null;
|
|
14319
|
-
removeTransitionClass(el, moveClass);
|
|
14320
|
-
}
|
|
14321
|
-
};
|
|
14322
|
-
el.addEventListener("transitionend", cb);
|
|
14676
|
+
handleMovedChildren(el, moveClass);
|
|
14323
14677
|
});
|
|
14324
14678
|
prevChildren = [];
|
|
14325
14679
|
});
|
|
@@ -14348,10 +14702,10 @@ const TransitionGroupImpl = /* @__PURE__ */ decorate({
|
|
|
14348
14702
|
instance
|
|
14349
14703
|
)
|
|
14350
14704
|
);
|
|
14351
|
-
positionMap.set(
|
|
14352
|
-
child,
|
|
14353
|
-
child.el.
|
|
14354
|
-
);
|
|
14705
|
+
positionMap.set(child, {
|
|
14706
|
+
left: child.el.offsetLeft,
|
|
14707
|
+
top: child.el.offsetTop
|
|
14708
|
+
});
|
|
14355
14709
|
}
|
|
14356
14710
|
}
|
|
14357
14711
|
}
|
|
@@ -14372,8 +14726,7 @@ const TransitionGroupImpl = /* @__PURE__ */ decorate({
|
|
|
14372
14726
|
}
|
|
14373
14727
|
});
|
|
14374
14728
|
const TransitionGroup = TransitionGroupImpl;
|
|
14375
|
-
function callPendingCbs(
|
|
14376
|
-
const el = c.el;
|
|
14729
|
+
function callPendingCbs(el) {
|
|
14377
14730
|
if (el[moveCbKey]) {
|
|
14378
14731
|
el[moveCbKey]();
|
|
14379
14732
|
}
|
|
@@ -14382,19 +14735,30 @@ function callPendingCbs(c) {
|
|
|
14382
14735
|
}
|
|
14383
14736
|
}
|
|
14384
14737
|
function recordPosition(c) {
|
|
14385
|
-
newPositionMap.set(c,
|
|
14738
|
+
newPositionMap.set(c, {
|
|
14739
|
+
left: c.el.offsetLeft,
|
|
14740
|
+
top: c.el.offsetTop
|
|
14741
|
+
});
|
|
14386
14742
|
}
|
|
14387
14743
|
function applyTranslation(c) {
|
|
14388
|
-
|
|
14389
|
-
|
|
14744
|
+
if (baseApplyTranslation(
|
|
14745
|
+
positionMap.get(c),
|
|
14746
|
+
newPositionMap.get(c),
|
|
14747
|
+
c.el
|
|
14748
|
+
)) {
|
|
14749
|
+
return c;
|
|
14750
|
+
}
|
|
14751
|
+
}
|
|
14752
|
+
function baseApplyTranslation(oldPos, newPos, el) {
|
|
14390
14753
|
const dx = oldPos.left - newPos.left;
|
|
14391
14754
|
const dy = oldPos.top - newPos.top;
|
|
14392
14755
|
if (dx || dy) {
|
|
14393
|
-
const s =
|
|
14756
|
+
const s = el.style;
|
|
14394
14757
|
s.transform = s.webkitTransform = `translate(${dx}px,${dy}px)`;
|
|
14395
14758
|
s.transitionDuration = "0s";
|
|
14396
|
-
return
|
|
14759
|
+
return true;
|
|
14397
14760
|
}
|
|
14761
|
+
return false;
|
|
14398
14762
|
}
|
|
14399
14763
|
function hasCSSTransform(el, root, moveClass) {
|
|
14400
14764
|
const clone = el.cloneNode();
|
|
@@ -14412,6 +14776,22 @@ function hasCSSTransform(el, root, moveClass) {
|
|
|
14412
14776
|
container.removeChild(clone);
|
|
14413
14777
|
return hasTransform;
|
|
14414
14778
|
}
|
|
14779
|
+
const handleMovedChildren = (el, moveClass) => {
|
|
14780
|
+
const style = el.style;
|
|
14781
|
+
addTransitionClass(el, moveClass);
|
|
14782
|
+
style.transform = style.webkitTransform = style.transitionDuration = "";
|
|
14783
|
+
const cb = el[moveCbKey] = (e) => {
|
|
14784
|
+
if (e && e.target !== el) {
|
|
14785
|
+
return;
|
|
14786
|
+
}
|
|
14787
|
+
if (!e || e.propertyName.endsWith("transform")) {
|
|
14788
|
+
el.removeEventListener("transitionend", cb);
|
|
14789
|
+
el[moveCbKey] = null;
|
|
14790
|
+
removeTransitionClass(el, moveClass);
|
|
14791
|
+
}
|
|
14792
|
+
};
|
|
14793
|
+
el.addEventListener("transitionend", cb);
|
|
14794
|
+
};
|
|
14415
14795
|
|
|
14416
14796
|
const getModelAssigner = (vnode) => {
|
|
14417
14797
|
const fn = vnode.props["onUpdate:modelValue"] || vnode.props["onModelCompat:input"];
|
|
@@ -14447,21 +14827,21 @@ const vModelText = {
|
|
|
14447
14827
|
vModelTextUpdate(el, oldValue, value, trim, number, lazy);
|
|
14448
14828
|
}
|
|
14449
14829
|
};
|
|
14830
|
+
function castValue(value, trim, number) {
|
|
14831
|
+
if (trim) value = value.trim();
|
|
14832
|
+
if (number) value = looseToNumber(value);
|
|
14833
|
+
return value;
|
|
14834
|
+
}
|
|
14450
14835
|
const vModelTextInit = (el, trim, number, lazy, set) => {
|
|
14451
14836
|
addEventListener(el, lazy ? "change" : "input", (e) => {
|
|
14452
14837
|
if (e.target.composing) return;
|
|
14453
|
-
|
|
14454
|
-
|
|
14455
|
-
|
|
14456
|
-
}
|
|
14457
|
-
if (number || el.type === "number") {
|
|
14458
|
-
domValue = looseToNumber(domValue);
|
|
14459
|
-
}
|
|
14460
|
-
(set || el[assignKey])(domValue);
|
|
14838
|
+
(set || el[assignKey])(
|
|
14839
|
+
castValue(el.value, trim, number || el.type === "number")
|
|
14840
|
+
);
|
|
14461
14841
|
});
|
|
14462
|
-
if (trim) {
|
|
14842
|
+
if (trim || number) {
|
|
14463
14843
|
addEventListener(el, "change", () => {
|
|
14464
|
-
el.value = el.value.
|
|
14844
|
+
el.value = castValue(el.value, trim, number || el.type === "number");
|
|
14465
14845
|
});
|
|
14466
14846
|
}
|
|
14467
14847
|
if (!lazy) {
|
|
@@ -14744,13 +15124,13 @@ const modifierGuards = {
|
|
|
14744
15124
|
const withModifiers = (fn, modifiers) => {
|
|
14745
15125
|
const cache = fn._withMods || (fn._withMods = {});
|
|
14746
15126
|
const cacheKey = modifiers.join(".");
|
|
14747
|
-
return cache[cacheKey] || (cache[cacheKey] = (event, ...args) => {
|
|
15127
|
+
return cache[cacheKey] || (cache[cacheKey] = ((event, ...args) => {
|
|
14748
15128
|
for (let i = 0; i < modifiers.length; i++) {
|
|
14749
15129
|
const guard = modifierGuards[modifiers[i]];
|
|
14750
15130
|
if (guard && guard(event, modifiers)) return;
|
|
14751
15131
|
}
|
|
14752
15132
|
return fn(event, ...args);
|
|
14753
|
-
});
|
|
15133
|
+
}));
|
|
14754
15134
|
};
|
|
14755
15135
|
const keyNames = {
|
|
14756
15136
|
esc: "escape",
|
|
@@ -14780,7 +15160,7 @@ const withKeys = (fn, modifiers) => {
|
|
|
14780
15160
|
}
|
|
14781
15161
|
const cache = fn._withKeys || (fn._withKeys = {});
|
|
14782
15162
|
const cacheKey = modifiers.join(".");
|
|
14783
|
-
return cache[cacheKey] || (cache[cacheKey] = (event) => {
|
|
15163
|
+
return cache[cacheKey] || (cache[cacheKey] = ((event) => {
|
|
14784
15164
|
if (!("key" in event)) {
|
|
14785
15165
|
return;
|
|
14786
15166
|
}
|
|
@@ -14810,7 +15190,7 @@ const withKeys = (fn, modifiers) => {
|
|
|
14810
15190
|
}
|
|
14811
15191
|
}
|
|
14812
15192
|
}
|
|
14813
|
-
});
|
|
15193
|
+
}));
|
|
14814
15194
|
};
|
|
14815
15195
|
|
|
14816
15196
|
const rendererOptions = /* @__PURE__ */ extend({ patchProp }, nodeOps);
|
|
@@ -14824,13 +15204,13 @@ function ensureHydrationRenderer() {
|
|
|
14824
15204
|
enabledHydration = true;
|
|
14825
15205
|
return renderer;
|
|
14826
15206
|
}
|
|
14827
|
-
const render = (...args) => {
|
|
15207
|
+
const render = ((...args) => {
|
|
14828
15208
|
ensureRenderer().render(...args);
|
|
14829
|
-
};
|
|
14830
|
-
const hydrate = (...args) => {
|
|
15209
|
+
});
|
|
15210
|
+
const hydrate = ((...args) => {
|
|
14831
15211
|
ensureHydrationRenderer().hydrate(...args);
|
|
14832
|
-
};
|
|
14833
|
-
const createApp = (...args) => {
|
|
15212
|
+
});
|
|
15213
|
+
const createApp = ((...args) => {
|
|
14834
15214
|
const app = ensureRenderer().createApp(...args);
|
|
14835
15215
|
if (!!(process.env.NODE_ENV !== "production")) {
|
|
14836
15216
|
injectNativeTagCheck(app);
|
|
@@ -14846,7 +15226,7 @@ const createApp = (...args) => {
|
|
|
14846
15226
|
if (!!(process.env.NODE_ENV !== "production") && container.nodeType === 1) {
|
|
14847
15227
|
for (let i = 0; i < container.attributes.length; i++) {
|
|
14848
15228
|
const attr = container.attributes[i];
|
|
14849
|
-
if (attr.name !== "v-cloak" && /^(v-|:|@)/.test(attr.name)) {
|
|
15229
|
+
if (attr.name !== "v-cloak" && /^(?:v-|:|@)/.test(attr.name)) {
|
|
14850
15230
|
compatUtils.warnDeprecation(
|
|
14851
15231
|
"GLOBAL_MOUNT_CONTAINER",
|
|
14852
15232
|
null
|
|
@@ -14867,8 +15247,8 @@ const createApp = (...args) => {
|
|
|
14867
15247
|
return proxy;
|
|
14868
15248
|
};
|
|
14869
15249
|
return app;
|
|
14870
|
-
};
|
|
14871
|
-
const createSSRApp = (...args) => {
|
|
15250
|
+
});
|
|
15251
|
+
const createSSRApp = ((...args) => {
|
|
14872
15252
|
const app = ensureHydrationRenderer().createApp(...args);
|
|
14873
15253
|
if (!!(process.env.NODE_ENV !== "production")) {
|
|
14874
15254
|
injectNativeTagCheck(app);
|
|
@@ -14882,7 +15262,7 @@ const createSSRApp = (...args) => {
|
|
|
14882
15262
|
}
|
|
14883
15263
|
};
|
|
14884
15264
|
return app;
|
|
14885
|
-
};
|
|
15265
|
+
});
|
|
14886
15266
|
function resolveRootNamespace(container) {
|
|
14887
15267
|
if (container instanceof SVGElement) {
|
|
14888
15268
|
return "svg";
|
|
@@ -14963,6 +15343,7 @@ var runtimeDom = /*#__PURE__*/Object.freeze({
|
|
|
14963
15343
|
ErrorTypeStrings: ErrorTypeStrings,
|
|
14964
15344
|
Fragment: Fragment,
|
|
14965
15345
|
KeepAlive: KeepAlive,
|
|
15346
|
+
MismatchTypes: MismatchTypes,
|
|
14966
15347
|
MoveType: MoveType,
|
|
14967
15348
|
ReactiveEffect: ReactiveEffect,
|
|
14968
15349
|
Static: Static,
|
|
@@ -14972,21 +15353,30 @@ var runtimeDom = /*#__PURE__*/Object.freeze({
|
|
|
14972
15353
|
TrackOpTypes: TrackOpTypes,
|
|
14973
15354
|
Transition: Transition,
|
|
14974
15355
|
TransitionGroup: TransitionGroup,
|
|
15356
|
+
TransitionPropsValidators: TransitionPropsValidators,
|
|
14975
15357
|
TriggerOpTypes: TriggerOpTypes,
|
|
14976
15358
|
VueElement: VueElement,
|
|
15359
|
+
VueElementBase: VueElementBase,
|
|
15360
|
+
activate: activate,
|
|
14977
15361
|
assertNumber: assertNumber,
|
|
15362
|
+
baseApplyTranslation: baseApplyTranslation,
|
|
14978
15363
|
baseEmit: baseEmit,
|
|
14979
15364
|
baseNormalizePropsOptions: baseNormalizePropsOptions,
|
|
15365
|
+
baseResolveTransitionHooks: baseResolveTransitionHooks,
|
|
15366
|
+
callPendingCbs: callPendingCbs,
|
|
14980
15367
|
callWithAsyncErrorHandling: callWithAsyncErrorHandling,
|
|
14981
15368
|
callWithErrorHandling: callWithErrorHandling,
|
|
14982
15369
|
camelize: camelize,
|
|
14983
15370
|
capitalize: capitalize,
|
|
15371
|
+
checkTransitionMode: checkTransitionMode,
|
|
14984
15372
|
cloneVNode: cloneVNode,
|
|
14985
15373
|
compatUtils: compatUtils,
|
|
14986
15374
|
computed: computed,
|
|
14987
15375
|
createApp: createApp,
|
|
14988
15376
|
createAppAPI: createAppAPI,
|
|
15377
|
+
createAsyncComponentContext: createAsyncComponentContext,
|
|
14989
15378
|
createBlock: createBlock,
|
|
15379
|
+
createCanSetSetupRefChecker: createCanSetSetupRefChecker,
|
|
14990
15380
|
createCommentVNode: createCommentVNode,
|
|
14991
15381
|
createElementBlock: createElementBlock,
|
|
14992
15382
|
createElementVNode: createBaseVNode,
|
|
@@ -15001,6 +15391,7 @@ var runtimeDom = /*#__PURE__*/Object.freeze({
|
|
|
15001
15391
|
createVNode: createVNode,
|
|
15002
15392
|
get currentInstance () { return currentInstance; },
|
|
15003
15393
|
customRef: customRef,
|
|
15394
|
+
deactivate: deactivate,
|
|
15004
15395
|
defineAsyncComponent: defineAsyncComponent,
|
|
15005
15396
|
defineComponent: defineComponent,
|
|
15006
15397
|
defineCustomElement: defineCustomElement,
|
|
@@ -15012,19 +15403,28 @@ var runtimeDom = /*#__PURE__*/Object.freeze({
|
|
|
15012
15403
|
defineSSRCustomElement: defineSSRCustomElement,
|
|
15013
15404
|
defineSlots: defineSlots,
|
|
15014
15405
|
devtools: devtools,
|
|
15406
|
+
devtoolsComponentAdded: devtoolsComponentAdded,
|
|
15015
15407
|
effect: effect,
|
|
15016
15408
|
effectScope: effectScope,
|
|
15017
15409
|
endMeasure: endMeasure,
|
|
15410
|
+
ensureHydrationRenderer: ensureHydrationRenderer,
|
|
15018
15411
|
ensureRenderer: ensureRenderer,
|
|
15412
|
+
ensureVaporSlotFallback: ensureVaporSlotFallback,
|
|
15019
15413
|
expose: expose,
|
|
15020
15414
|
flushOnAppMount: flushOnAppMount,
|
|
15415
|
+
forceReflow: forceReflow,
|
|
15416
|
+
getAttributeMismatch: getAttributeMismatch,
|
|
15417
|
+
getComponentName: getComponentName,
|
|
15021
15418
|
getCurrentInstance: getCurrentInstance,
|
|
15022
15419
|
getCurrentScope: getCurrentScope,
|
|
15023
15420
|
getCurrentWatcher: getCurrentWatcher,
|
|
15421
|
+
getInheritedScopeIds: getInheritedScopeIds,
|
|
15024
15422
|
getTransitionRawChildren: getTransitionRawChildren,
|
|
15025
15423
|
guardReactiveProps: guardReactiveProps,
|
|
15026
15424
|
h: h,
|
|
15027
15425
|
handleError: handleError,
|
|
15426
|
+
handleMovedChildren: handleMovedChildren,
|
|
15427
|
+
hasCSSTransform: hasCSSTransform,
|
|
15028
15428
|
hasInjectionContext: hasInjectionContext,
|
|
15029
15429
|
hydrate: hydrate,
|
|
15030
15430
|
hydrateOnIdle: hydrateOnIdle,
|
|
@@ -15035,24 +15435,38 @@ var runtimeDom = /*#__PURE__*/Object.freeze({
|
|
|
15035
15435
|
initDirectivesForSSR: initDirectivesForSSR,
|
|
15036
15436
|
initFeatureFlags: initFeatureFlags,
|
|
15037
15437
|
inject: inject,
|
|
15438
|
+
isAsyncWrapper: isAsyncWrapper,
|
|
15038
15439
|
isEmitListener: isEmitListener,
|
|
15440
|
+
isKeepAlive: isKeepAlive,
|
|
15441
|
+
isMapEqual: isMapEqual,
|
|
15039
15442
|
isMemoSame: isMemoSame,
|
|
15443
|
+
isMismatchAllowed: isMismatchAllowed,
|
|
15040
15444
|
isProxy: isProxy,
|
|
15041
15445
|
isReactive: isReactive,
|
|
15042
15446
|
isReadonly: isReadonly,
|
|
15043
15447
|
isRef: isRef,
|
|
15044
15448
|
isRuntimeOnly: isRuntimeOnly,
|
|
15449
|
+
isSetEqual: isSetEqual,
|
|
15045
15450
|
isShallow: isShallow,
|
|
15451
|
+
isTeleportDeferred: isTeleportDeferred,
|
|
15452
|
+
isTeleportDisabled: isTeleportDisabled,
|
|
15453
|
+
isTemplateNode: isTemplateNode$1,
|
|
15046
15454
|
isVNode: isVNode,
|
|
15455
|
+
isValidHtmlOrSvgAttribute: isValidHtmlOrSvgAttribute,
|
|
15456
|
+
leaveCbKey: leaveCbKey,
|
|
15457
|
+
markAsyncBoundary: markAsyncBoundary,
|
|
15047
15458
|
markRaw: markRaw,
|
|
15459
|
+
matches: matches,
|
|
15048
15460
|
mergeDefaults: mergeDefaults,
|
|
15049
15461
|
mergeModels: mergeModels,
|
|
15050
15462
|
mergeProps: mergeProps,
|
|
15051
15463
|
nextTick: nextTick,
|
|
15052
15464
|
nextUid: nextUid,
|
|
15465
|
+
nodeOps: nodeOps,
|
|
15053
15466
|
normalizeClass: normalizeClass,
|
|
15054
15467
|
normalizeContainer: normalizeContainer,
|
|
15055
15468
|
normalizeProps: normalizeProps,
|
|
15469
|
+
normalizeRef: normalizeRef,
|
|
15056
15470
|
normalizeStyle: normalizeStyle,
|
|
15057
15471
|
onActivated: onActivated,
|
|
15058
15472
|
onBeforeMount: onBeforeMount,
|
|
@@ -15069,7 +15483,11 @@ var runtimeDom = /*#__PURE__*/Object.freeze({
|
|
|
15069
15483
|
onUpdated: onUpdated,
|
|
15070
15484
|
onWatcherCleanup: onWatcherCleanup,
|
|
15071
15485
|
openBlock: openBlock,
|
|
15486
|
+
patchProp: patchProp,
|
|
15072
15487
|
patchStyle: patchStyle,
|
|
15488
|
+
performAsyncHydrate: performAsyncHydrate,
|
|
15489
|
+
performTransitionEnter: performTransitionEnter,
|
|
15490
|
+
performTransitionLeave: performTransitionLeave,
|
|
15073
15491
|
popScopeId: popScopeId,
|
|
15074
15492
|
popWarningContext: popWarningContext,
|
|
15075
15493
|
provide: provide,
|
|
@@ -15086,15 +15504,19 @@ var runtimeDom = /*#__PURE__*/Object.freeze({
|
|
|
15086
15504
|
render: render,
|
|
15087
15505
|
renderList: renderList,
|
|
15088
15506
|
renderSlot: renderSlot,
|
|
15507
|
+
resetShapeFlag: resetShapeFlag,
|
|
15089
15508
|
resolveComponent: resolveComponent,
|
|
15090
15509
|
resolveDirective: resolveDirective,
|
|
15091
15510
|
resolveDynamicComponent: resolveDynamicComponent,
|
|
15092
15511
|
resolveFilter: resolveFilter,
|
|
15093
15512
|
resolvePropValue: resolvePropValue,
|
|
15513
|
+
resolveTeleportTarget: resolveTarget,
|
|
15094
15514
|
resolveTransitionHooks: resolveTransitionHooks,
|
|
15515
|
+
resolveTransitionProps: resolveTransitionProps,
|
|
15095
15516
|
setBlockTracking: setBlockTracking,
|
|
15096
15517
|
setCurrentInstance: setCurrentInstance,
|
|
15097
15518
|
setDevtoolsHook: setDevtoolsHook,
|
|
15519
|
+
setRef: setRef,
|
|
15098
15520
|
setTransitionHooks: setTransitionHooks,
|
|
15099
15521
|
shallowReactive: shallowReactive,
|
|
15100
15522
|
shallowReadonly: shallowReadonly,
|
|
@@ -15105,22 +15527,28 @@ var runtimeDom = /*#__PURE__*/Object.freeze({
|
|
|
15105
15527
|
ssrUtils: ssrUtils,
|
|
15106
15528
|
startMeasure: startMeasure,
|
|
15107
15529
|
stop: stop,
|
|
15530
|
+
svgNS: svgNS,
|
|
15531
|
+
toClassSet: toClassSet,
|
|
15108
15532
|
toDisplayString: toDisplayString,
|
|
15109
15533
|
toHandlerKey: toHandlerKey,
|
|
15110
15534
|
toHandlers: toHandlers,
|
|
15111
15535
|
toRaw: toRaw,
|
|
15112
15536
|
toRef: toRef,
|
|
15113
15537
|
toRefs: toRefs,
|
|
15538
|
+
toStyleMap: toStyleMap,
|
|
15114
15539
|
toValue: toValue,
|
|
15115
15540
|
transformVNodeArgs: transformVNodeArgs,
|
|
15116
15541
|
triggerRef: triggerRef,
|
|
15117
15542
|
unref: unref,
|
|
15118
15543
|
unregisterHMR: unregisterHMR,
|
|
15544
|
+
unsafeToTrustedHTML: unsafeToTrustedHTML,
|
|
15545
|
+
useAsyncComponentState: useAsyncComponentState,
|
|
15119
15546
|
useAttrs: useAttrs,
|
|
15120
15547
|
useCssModule: useCssModule,
|
|
15121
15548
|
useCssVars: useCssVars,
|
|
15122
15549
|
useHost: useHost,
|
|
15123
15550
|
useId: useId,
|
|
15551
|
+
useInstanceOption: useInstanceOption,
|
|
15124
15552
|
useModel: useModel,
|
|
15125
15553
|
useSSRContext: useSSRContext,
|
|
15126
15554
|
useShadowRoot: useShadowRoot,
|
|
@@ -15146,6 +15574,7 @@ var runtimeDom = /*#__PURE__*/Object.freeze({
|
|
|
15146
15574
|
validateProps: validateProps,
|
|
15147
15575
|
version: version,
|
|
15148
15576
|
warn: warn,
|
|
15577
|
+
warnPropMismatch: warnPropMismatch,
|
|
15149
15578
|
watch: watch,
|
|
15150
15579
|
watchEffect: watchEffect,
|
|
15151
15580
|
watchPostEffect: watchPostEffect,
|
|
@@ -15157,7 +15586,8 @@ var runtimeDom = /*#__PURE__*/Object.freeze({
|
|
|
15157
15586
|
withKeys: withKeys,
|
|
15158
15587
|
withMemo: withMemo,
|
|
15159
15588
|
withModifiers: withModifiers,
|
|
15160
|
-
withScopeId: withScopeId
|
|
15589
|
+
withScopeId: withScopeId,
|
|
15590
|
+
xlinkNS: xlinkNS
|
|
15161
15591
|
});
|
|
15162
15592
|
|
|
15163
15593
|
function initDev() {
|
|
@@ -16418,7 +16848,7 @@ function isCoreComponent(tag) {
|
|
|
16418
16848
|
return BASE_TRANSITION;
|
|
16419
16849
|
}
|
|
16420
16850
|
}
|
|
16421
|
-
const nonIdentifierRE =
|
|
16851
|
+
const nonIdentifierRE = /^$|^\d|[^\$\w\xA0-\uFFFF]/;
|
|
16422
16852
|
const isSimpleIdentifier = (name) => !nonIdentifierRE.test(name);
|
|
16423
16853
|
const validFirstIdentCharRE = /[A-Za-z_$\xA0-\uFFFF]/;
|
|
16424
16854
|
const validIdentCharRE = /[\.\?\w$\xA0-\uFFFF]/;
|
|
@@ -16487,7 +16917,7 @@ const isMemberExpressionBrowser = (exp) => {
|
|
|
16487
16917
|
return !currentOpenBracketCount && !currentOpenParensCount;
|
|
16488
16918
|
};
|
|
16489
16919
|
const isMemberExpression = isMemberExpressionBrowser ;
|
|
16490
|
-
const fnExpRE = /^\s*(async\s*)?(
|
|
16920
|
+
const fnExpRE = /^\s*(?:async\s*)?(?:\([^)]*?\)|[\w$_]+)\s*(?::[^=]+)?=>|^\s*(?:async\s+)?function(?:\s+[\w$]+)?\s*\(/;
|
|
16491
16921
|
const isFnExpressionBrowser = (exp) => fnExpRE.test(getExpSource(exp));
|
|
16492
16922
|
const isFnExpression = isFnExpressionBrowser ;
|
|
16493
16923
|
function assert(condition, msg) {
|
|
@@ -16530,6 +16960,9 @@ function hasDynamicKeyVBind(node) {
|
|
|
16530
16960
|
function isText$1(node) {
|
|
16531
16961
|
return node.type === 5 || node.type === 2;
|
|
16532
16962
|
}
|
|
16963
|
+
function isVPre(p) {
|
|
16964
|
+
return p.type === 7 && p.name === "pre";
|
|
16965
|
+
}
|
|
16533
16966
|
function isVSlot(p) {
|
|
16534
16967
|
return p.type === 7 && p.name === "slot";
|
|
16535
16968
|
}
|
|
@@ -16788,7 +17221,7 @@ const tokenizer = new Tokenizer(stack, {
|
|
|
16788
17221
|
ondirarg(start, end) {
|
|
16789
17222
|
if (start === end) return;
|
|
16790
17223
|
const arg = getSlice(start, end);
|
|
16791
|
-
if (inVPre) {
|
|
17224
|
+
if (inVPre && !isVPre(currentProp)) {
|
|
16792
17225
|
currentProp.name += arg;
|
|
16793
17226
|
setLocEnd(currentProp.nameLoc, end);
|
|
16794
17227
|
} else {
|
|
@@ -16803,7 +17236,7 @@ const tokenizer = new Tokenizer(stack, {
|
|
|
16803
17236
|
},
|
|
16804
17237
|
ondirmodifier(start, end) {
|
|
16805
17238
|
const mod = getSlice(start, end);
|
|
16806
|
-
if (inVPre) {
|
|
17239
|
+
if (inVPre && !isVPre(currentProp)) {
|
|
16807
17240
|
currentProp.name += "." + mod;
|
|
16808
17241
|
setLocEnd(currentProp.nameLoc, end);
|
|
16809
17242
|
} else if (currentProp.name === "slot") {
|
|
@@ -17431,6 +17864,11 @@ function walk(node, parent, context, doNotHoistNode = false, inFor = false) {
|
|
|
17431
17864
|
} else if (child.type === 12) {
|
|
17432
17865
|
const constantType = doNotHoistNode ? 0 : getConstantType(child, context);
|
|
17433
17866
|
if (constantType >= 2) {
|
|
17867
|
+
if (child.codegenNode.type === 14 && child.codegenNode.arguments.length > 0) {
|
|
17868
|
+
child.codegenNode.arguments.push(
|
|
17869
|
+
-1 + (!!(process.env.NODE_ENV !== "production") ? ` /* ${PatchFlagNames[-1]} */` : ``)
|
|
17870
|
+
);
|
|
17871
|
+
}
|
|
17434
17872
|
toCache.push(child);
|
|
17435
17873
|
continue;
|
|
17436
17874
|
}
|
|
@@ -17459,7 +17897,6 @@ function walk(node, parent, context, doNotHoistNode = false, inFor = false) {
|
|
|
17459
17897
|
}
|
|
17460
17898
|
}
|
|
17461
17899
|
let cachedAsArray = false;
|
|
17462
|
-
const slotCacheKeys = [];
|
|
17463
17900
|
if (toCache.length === children.length && node.type === 1) {
|
|
17464
17901
|
if (node.tagType === 0 && node.codegenNode && node.codegenNode.type === 13 && isArray(node.codegenNode.children)) {
|
|
17465
17902
|
node.codegenNode.children = getCacheExpression(
|
|
@@ -17469,7 +17906,6 @@ function walk(node, parent, context, doNotHoistNode = false, inFor = false) {
|
|
|
17469
17906
|
} else if (node.tagType === 1 && node.codegenNode && node.codegenNode.type === 13 && node.codegenNode.children && !isArray(node.codegenNode.children) && node.codegenNode.children.type === 15) {
|
|
17470
17907
|
const slot = getSlotNode(node.codegenNode, "default");
|
|
17471
17908
|
if (slot) {
|
|
17472
|
-
slotCacheKeys.push(context.cached.length);
|
|
17473
17909
|
slot.returns = getCacheExpression(
|
|
17474
17910
|
createArrayExpression(slot.returns)
|
|
17475
17911
|
);
|
|
@@ -17479,7 +17915,6 @@ function walk(node, parent, context, doNotHoistNode = false, inFor = false) {
|
|
|
17479
17915
|
const slotName = findDir(node, "slot", true);
|
|
17480
17916
|
const slot = slotName && slotName.arg && getSlotNode(parent.codegenNode, slotName.arg);
|
|
17481
17917
|
if (slot) {
|
|
17482
|
-
slotCacheKeys.push(context.cached.length);
|
|
17483
17918
|
slot.returns = getCacheExpression(
|
|
17484
17919
|
createArrayExpression(slot.returns)
|
|
17485
17920
|
);
|
|
@@ -17489,23 +17924,12 @@ function walk(node, parent, context, doNotHoistNode = false, inFor = false) {
|
|
|
17489
17924
|
}
|
|
17490
17925
|
if (!cachedAsArray) {
|
|
17491
17926
|
for (const child of toCache) {
|
|
17492
|
-
slotCacheKeys.push(context.cached.length);
|
|
17493
17927
|
child.codegenNode = context.cache(child.codegenNode);
|
|
17494
17928
|
}
|
|
17495
17929
|
}
|
|
17496
|
-
if (slotCacheKeys.length && node.type === 1 && node.tagType === 1 && node.codegenNode && node.codegenNode.type === 13 && node.codegenNode.children && !isArray(node.codegenNode.children) && node.codegenNode.children.type === 15) {
|
|
17497
|
-
node.codegenNode.children.properties.push(
|
|
17498
|
-
createObjectProperty(
|
|
17499
|
-
`__`,
|
|
17500
|
-
createSimpleExpression(JSON.stringify(slotCacheKeys), false)
|
|
17501
|
-
)
|
|
17502
|
-
);
|
|
17503
|
-
}
|
|
17504
17930
|
function getCacheExpression(value) {
|
|
17505
17931
|
const exp = context.cache(value);
|
|
17506
|
-
|
|
17507
|
-
exp.needArraySpread = true;
|
|
17508
|
-
}
|
|
17932
|
+
exp.needArraySpread = true;
|
|
17509
17933
|
return exp;
|
|
17510
17934
|
}
|
|
17511
17935
|
function getSlotNode(node2, name) {
|
|
@@ -18639,7 +19063,7 @@ function processExpression(node, context, asParams = false, asRawStatements = fa
|
|
|
18639
19063
|
}
|
|
18640
19064
|
|
|
18641
19065
|
const transformIf = createStructuralDirectiveTransform(
|
|
18642
|
-
/^(if|else|else-if)$/,
|
|
19066
|
+
/^(?:if|else|else-if)$/,
|
|
18643
19067
|
(node, dir, context) => {
|
|
18644
19068
|
return processIf(node, dir, context, (ifNode, branch, isRoot) => {
|
|
18645
19069
|
const siblings = context.parent.children;
|
|
@@ -18708,7 +19132,7 @@ function processIf(node, dir, context, processCodegen) {
|
|
|
18708
19132
|
continue;
|
|
18709
19133
|
}
|
|
18710
19134
|
if (sibling && sibling.type === 9) {
|
|
18711
|
-
if (dir.name === "else-if" && sibling.branches[sibling.branches.length - 1].condition === void 0) {
|
|
19135
|
+
if ((dir.name === "else-if" || dir.name === "else") && sibling.branches[sibling.branches.length - 1].condition === void 0) {
|
|
18712
19136
|
context.onError(
|
|
18713
19137
|
createCompilerError(30, node.loc)
|
|
18714
19138
|
);
|
|
@@ -18857,80 +19281,6 @@ function getParentCondition(node) {
|
|
|
18857
19281
|
}
|
|
18858
19282
|
}
|
|
18859
19283
|
|
|
18860
|
-
const transformBind = (dir, _node, context) => {
|
|
18861
|
-
const { modifiers, loc } = dir;
|
|
18862
|
-
const arg = dir.arg;
|
|
18863
|
-
let { exp } = dir;
|
|
18864
|
-
if (exp && exp.type === 4 && !exp.content.trim()) {
|
|
18865
|
-
{
|
|
18866
|
-
exp = void 0;
|
|
18867
|
-
}
|
|
18868
|
-
}
|
|
18869
|
-
if (!exp) {
|
|
18870
|
-
if (arg.type !== 4 || !arg.isStatic) {
|
|
18871
|
-
context.onError(
|
|
18872
|
-
createCompilerError(
|
|
18873
|
-
52,
|
|
18874
|
-
arg.loc
|
|
18875
|
-
)
|
|
18876
|
-
);
|
|
18877
|
-
return {
|
|
18878
|
-
props: [
|
|
18879
|
-
createObjectProperty(arg, createSimpleExpression("", true, loc))
|
|
18880
|
-
]
|
|
18881
|
-
};
|
|
18882
|
-
}
|
|
18883
|
-
transformBindShorthand(dir);
|
|
18884
|
-
exp = dir.exp;
|
|
18885
|
-
}
|
|
18886
|
-
if (arg.type !== 4) {
|
|
18887
|
-
arg.children.unshift(`(`);
|
|
18888
|
-
arg.children.push(`) || ""`);
|
|
18889
|
-
} else if (!arg.isStatic) {
|
|
18890
|
-
arg.content = `${arg.content} || ""`;
|
|
18891
|
-
}
|
|
18892
|
-
if (modifiers.some((mod) => mod.content === "camel")) {
|
|
18893
|
-
if (arg.type === 4) {
|
|
18894
|
-
if (arg.isStatic) {
|
|
18895
|
-
arg.content = camelize(arg.content);
|
|
18896
|
-
} else {
|
|
18897
|
-
arg.content = `${context.helperString(CAMELIZE)}(${arg.content})`;
|
|
18898
|
-
}
|
|
18899
|
-
} else {
|
|
18900
|
-
arg.children.unshift(`${context.helperString(CAMELIZE)}(`);
|
|
18901
|
-
arg.children.push(`)`);
|
|
18902
|
-
}
|
|
18903
|
-
}
|
|
18904
|
-
if (!context.inSSR) {
|
|
18905
|
-
if (modifiers.some((mod) => mod.content === "prop")) {
|
|
18906
|
-
injectPrefix(arg, ".");
|
|
18907
|
-
}
|
|
18908
|
-
if (modifiers.some((mod) => mod.content === "attr")) {
|
|
18909
|
-
injectPrefix(arg, "^");
|
|
18910
|
-
}
|
|
18911
|
-
}
|
|
18912
|
-
return {
|
|
18913
|
-
props: [createObjectProperty(arg, exp)]
|
|
18914
|
-
};
|
|
18915
|
-
};
|
|
18916
|
-
const transformBindShorthand = (dir, context) => {
|
|
18917
|
-
const arg = dir.arg;
|
|
18918
|
-
const propName = camelize(arg.content);
|
|
18919
|
-
dir.exp = createSimpleExpression(propName, false, arg.loc);
|
|
18920
|
-
};
|
|
18921
|
-
const injectPrefix = (arg, prefix) => {
|
|
18922
|
-
if (arg.type === 4) {
|
|
18923
|
-
if (arg.isStatic) {
|
|
18924
|
-
arg.content = prefix + arg.content;
|
|
18925
|
-
} else {
|
|
18926
|
-
arg.content = `\`${prefix}\${${arg.content}}\``;
|
|
18927
|
-
}
|
|
18928
|
-
} else {
|
|
18929
|
-
arg.children.unshift(`'${prefix}' + (`);
|
|
18930
|
-
arg.children.push(`)`);
|
|
18931
|
-
}
|
|
18932
|
-
};
|
|
18933
|
-
|
|
18934
19284
|
const transformFor = createStructuralDirectiveTransform(
|
|
18935
19285
|
"for",
|
|
18936
19286
|
(node, dir, context) => {
|
|
@@ -18942,10 +19292,7 @@ const transformFor = createStructuralDirectiveTransform(
|
|
|
18942
19292
|
const isTemplate = isTemplateNode(node);
|
|
18943
19293
|
const memo = findDir(node, "memo");
|
|
18944
19294
|
const keyProp = findProp(node, `key`, false, true);
|
|
18945
|
-
|
|
18946
|
-
if (isDirKey && !keyProp.exp) {
|
|
18947
|
-
transformBindShorthand(keyProp);
|
|
18948
|
-
}
|
|
19295
|
+
keyProp && keyProp.type === 7;
|
|
18949
19296
|
let keyExp = keyProp && (keyProp.type === 6 ? keyProp.value ? createSimpleExpression(keyProp.value.content, true) : void 0 : keyProp.exp);
|
|
18950
19297
|
const keyProperty = keyProp && keyExp ? createObjectProperty(`key`, keyExp) : null;
|
|
18951
19298
|
const isStableFragment = forNode.source.type === 4 && forNode.source.constType > 0;
|
|
@@ -19226,7 +19573,7 @@ function buildSlots(node, context, buildSlotFn = buildClientSlotFn) {
|
|
|
19226
19573
|
);
|
|
19227
19574
|
} else if (vElse = findDir(
|
|
19228
19575
|
slotElement,
|
|
19229
|
-
/^else(
|
|
19576
|
+
/^else(?:-if)?$/,
|
|
19230
19577
|
true
|
|
19231
19578
|
/* allowEmpty */
|
|
19232
19579
|
)) {
|
|
@@ -19238,7 +19585,7 @@ function buildSlots(node, context, buildSlotFn = buildClientSlotFn) {
|
|
|
19238
19585
|
break;
|
|
19239
19586
|
}
|
|
19240
19587
|
}
|
|
19241
|
-
if (prev && isTemplateNode(prev) && findDir(prev, /^(else-)?if$/)) {
|
|
19588
|
+
if (prev && isTemplateNode(prev) && findDir(prev, /^(?:else-)?if$/)) {
|
|
19242
19589
|
let conditional = dynamicSlots[dynamicSlots.length - 1];
|
|
19243
19590
|
while (conditional.alternate.type === 19) {
|
|
19244
19591
|
conditional = conditional.alternate;
|
|
@@ -20098,6 +20445,58 @@ const transformOn$1 = (dir, node, context, augmentor) => {
|
|
|
20098
20445
|
return ret;
|
|
20099
20446
|
};
|
|
20100
20447
|
|
|
20448
|
+
const transformBind = (dir, _node, context) => {
|
|
20449
|
+
const { modifiers, loc } = dir;
|
|
20450
|
+
const arg = dir.arg;
|
|
20451
|
+
let { exp } = dir;
|
|
20452
|
+
if (exp && exp.type === 4 && !exp.content.trim()) {
|
|
20453
|
+
{
|
|
20454
|
+
exp = void 0;
|
|
20455
|
+
}
|
|
20456
|
+
}
|
|
20457
|
+
if (arg.type !== 4) {
|
|
20458
|
+
arg.children.unshift(`(`);
|
|
20459
|
+
arg.children.push(`) || ""`);
|
|
20460
|
+
} else if (!arg.isStatic) {
|
|
20461
|
+
arg.content = arg.content ? `${arg.content} || ""` : `""`;
|
|
20462
|
+
}
|
|
20463
|
+
if (modifiers.some((mod) => mod.content === "camel")) {
|
|
20464
|
+
if (arg.type === 4) {
|
|
20465
|
+
if (arg.isStatic) {
|
|
20466
|
+
arg.content = camelize(arg.content);
|
|
20467
|
+
} else {
|
|
20468
|
+
arg.content = `${context.helperString(CAMELIZE)}(${arg.content})`;
|
|
20469
|
+
}
|
|
20470
|
+
} else {
|
|
20471
|
+
arg.children.unshift(`${context.helperString(CAMELIZE)}(`);
|
|
20472
|
+
arg.children.push(`)`);
|
|
20473
|
+
}
|
|
20474
|
+
}
|
|
20475
|
+
if (!context.inSSR) {
|
|
20476
|
+
if (modifiers.some((mod) => mod.content === "prop")) {
|
|
20477
|
+
injectPrefix(arg, ".");
|
|
20478
|
+
}
|
|
20479
|
+
if (modifiers.some((mod) => mod.content === "attr")) {
|
|
20480
|
+
injectPrefix(arg, "^");
|
|
20481
|
+
}
|
|
20482
|
+
}
|
|
20483
|
+
return {
|
|
20484
|
+
props: [createObjectProperty(arg, exp)]
|
|
20485
|
+
};
|
|
20486
|
+
};
|
|
20487
|
+
const injectPrefix = (arg, prefix) => {
|
|
20488
|
+
if (arg.type === 4) {
|
|
20489
|
+
if (arg.isStatic) {
|
|
20490
|
+
arg.content = prefix + arg.content;
|
|
20491
|
+
} else {
|
|
20492
|
+
arg.content = `\`${prefix}\${${arg.content}}\``;
|
|
20493
|
+
}
|
|
20494
|
+
} else {
|
|
20495
|
+
arg.children.unshift(`'${prefix}' + (`);
|
|
20496
|
+
arg.children.push(`)`);
|
|
20497
|
+
}
|
|
20498
|
+
};
|
|
20499
|
+
|
|
20101
20500
|
const transformText = (node, context) => {
|
|
20102
20501
|
if (node.type === 0 || node.type === 1 || node.type === 11 || node.type === 10) {
|
|
20103
20502
|
return () => {
|
|
@@ -20234,7 +20633,7 @@ const transformModel$1 = (dir, node, context) => {
|
|
|
20234
20633
|
];
|
|
20235
20634
|
if (dir.modifiers.length && node.tagType === 1) {
|
|
20236
20635
|
const modifiers = dir.modifiers.map((m) => m.content).map((m) => (isSimpleIdentifier(m) ? m : JSON.stringify(m)) + `: true`).join(`, `);
|
|
20237
|
-
const modifiersKey = arg ? isStaticExp(arg) ?
|
|
20636
|
+
const modifiersKey = arg ? isStaticExp(arg) ? getModifierPropName(arg.content) : createCompoundExpression([arg, ' + "Modifiers"']) : `modelModifiers`;
|
|
20238
20637
|
props.push(
|
|
20239
20638
|
createObjectProperty(
|
|
20240
20639
|
modifiersKey,
|
|
@@ -20406,7 +20805,7 @@ const seen = /* @__PURE__ */ new WeakSet();
|
|
|
20406
20805
|
const transformMemo = (node, context) => {
|
|
20407
20806
|
if (node.type === 1) {
|
|
20408
20807
|
const dir = findDir(node, "memo");
|
|
20409
|
-
if (!dir || seen.has(node)) {
|
|
20808
|
+
if (!dir || seen.has(node) || context.inSSR) {
|
|
20410
20809
|
return;
|
|
20411
20810
|
}
|
|
20412
20811
|
seen.add(node);
|
|
@@ -20428,9 +20827,36 @@ const transformMemo = (node, context) => {
|
|
|
20428
20827
|
}
|
|
20429
20828
|
};
|
|
20430
20829
|
|
|
20830
|
+
const transformVBindShorthand = (node, context) => {
|
|
20831
|
+
if (node.type === 1) {
|
|
20832
|
+
for (const prop of node.props) {
|
|
20833
|
+
if (prop.type === 7 && prop.name === "bind" && (!prop.exp || // #13930 :foo in in-DOM templates will be parsed into :foo="" by browser
|
|
20834
|
+
prop.exp.type === 4 && !prop.exp.content.trim()) && prop.arg) {
|
|
20835
|
+
const arg = prop.arg;
|
|
20836
|
+
if (arg.type !== 4 || !arg.isStatic) {
|
|
20837
|
+
context.onError(
|
|
20838
|
+
createCompilerError(
|
|
20839
|
+
52,
|
|
20840
|
+
arg.loc
|
|
20841
|
+
)
|
|
20842
|
+
);
|
|
20843
|
+
prop.exp = createSimpleExpression("", true, arg.loc);
|
|
20844
|
+
} else {
|
|
20845
|
+
const propName = camelize(arg.content);
|
|
20846
|
+
if (validFirstIdentCharRE.test(propName[0]) || // allow hyphen first char for https://github.com/vuejs/language-tools/pull/3424
|
|
20847
|
+
propName[0] === "-") {
|
|
20848
|
+
prop.exp = createSimpleExpression(propName, false, arg.loc);
|
|
20849
|
+
}
|
|
20850
|
+
}
|
|
20851
|
+
}
|
|
20852
|
+
}
|
|
20853
|
+
}
|
|
20854
|
+
};
|
|
20855
|
+
|
|
20431
20856
|
function getBaseTransformPreset(prefixIdentifiers) {
|
|
20432
20857
|
return [
|
|
20433
20858
|
[
|
|
20859
|
+
transformVBindShorthand,
|
|
20434
20860
|
transformOnce,
|
|
20435
20861
|
transformIf,
|
|
20436
20862
|
transformMemo,
|
|
@@ -20560,7 +20986,7 @@ const parserOptions = {
|
|
|
20560
20986
|
let ns = parent ? parent.ns : rootNamespace;
|
|
20561
20987
|
if (parent && ns === 2) {
|
|
20562
20988
|
if (parent.tag === "annotation-xml") {
|
|
20563
|
-
if (tag
|
|
20989
|
+
if (isSVGTag(tag)) {
|
|
20564
20990
|
return 1;
|
|
20565
20991
|
}
|
|
20566
20992
|
if (parent.props.some(
|
|
@@ -20577,10 +21003,10 @@ const parserOptions = {
|
|
|
20577
21003
|
}
|
|
20578
21004
|
}
|
|
20579
21005
|
if (ns === 0) {
|
|
20580
|
-
if (tag
|
|
21006
|
+
if (isSVGTag(tag)) {
|
|
20581
21007
|
return 1;
|
|
20582
21008
|
}
|
|
20583
|
-
if (tag
|
|
21009
|
+
if (isMathMLTag(tag)) {
|
|
20584
21010
|
return 2;
|
|
20585
21011
|
}
|
|
20586
21012
|
}
|
|
@@ -20881,46 +21307,46 @@ const transformTransition = (node, context) => {
|
|
|
20881
21307
|
if (node.type === 1 && node.tagType === 1) {
|
|
20882
21308
|
const component = context.isBuiltInComponent(node.tag);
|
|
20883
21309
|
if (component === TRANSITION) {
|
|
20884
|
-
return ()
|
|
20885
|
-
if (!node.children.length) {
|
|
20886
|
-
return;
|
|
20887
|
-
}
|
|
20888
|
-
if (hasMultipleChildren(node)) {
|
|
20889
|
-
context.onError(
|
|
20890
|
-
createDOMCompilerError(
|
|
20891
|
-
62,
|
|
20892
|
-
{
|
|
20893
|
-
start: node.children[0].loc.start,
|
|
20894
|
-
end: node.children[node.children.length - 1].loc.end,
|
|
20895
|
-
source: ""
|
|
20896
|
-
}
|
|
20897
|
-
)
|
|
20898
|
-
);
|
|
20899
|
-
}
|
|
20900
|
-
const child = node.children[0];
|
|
20901
|
-
if (child.type === 1) {
|
|
20902
|
-
for (const p of child.props) {
|
|
20903
|
-
if (p.type === 7 && p.name === "show") {
|
|
20904
|
-
node.props.push({
|
|
20905
|
-
type: 6,
|
|
20906
|
-
name: "persisted",
|
|
20907
|
-
nameLoc: node.loc,
|
|
20908
|
-
value: void 0,
|
|
20909
|
-
loc: node.loc
|
|
20910
|
-
});
|
|
20911
|
-
}
|
|
20912
|
-
}
|
|
20913
|
-
}
|
|
20914
|
-
};
|
|
21310
|
+
return postTransformTransition(node, context.onError);
|
|
20915
21311
|
}
|
|
20916
21312
|
}
|
|
20917
21313
|
};
|
|
20918
|
-
function
|
|
21314
|
+
function postTransformTransition(node, onError, hasMultipleChildren = defaultHasMultipleChildren) {
|
|
21315
|
+
return () => {
|
|
21316
|
+
if (!node.children.length) {
|
|
21317
|
+
return;
|
|
21318
|
+
}
|
|
21319
|
+
if (hasMultipleChildren(node)) {
|
|
21320
|
+
onError(
|
|
21321
|
+
createDOMCompilerError(62, {
|
|
21322
|
+
start: node.children[0].loc.start,
|
|
21323
|
+
end: node.children[node.children.length - 1].loc.end,
|
|
21324
|
+
source: ""
|
|
21325
|
+
})
|
|
21326
|
+
);
|
|
21327
|
+
}
|
|
21328
|
+
const child = node.children[0];
|
|
21329
|
+
if (child.type === 1) {
|
|
21330
|
+
for (const p of child.props) {
|
|
21331
|
+
if (p.type === 7 && p.name === "show") {
|
|
21332
|
+
node.props.push({
|
|
21333
|
+
type: 6,
|
|
21334
|
+
name: "persisted",
|
|
21335
|
+
nameLoc: node.loc,
|
|
21336
|
+
value: void 0,
|
|
21337
|
+
loc: node.loc
|
|
21338
|
+
});
|
|
21339
|
+
}
|
|
21340
|
+
}
|
|
21341
|
+
}
|
|
21342
|
+
};
|
|
21343
|
+
}
|
|
21344
|
+
function defaultHasMultipleChildren(node) {
|
|
20919
21345
|
const children = node.children = node.children.filter(
|
|
20920
21346
|
(c) => c.type !== 3 && !(c.type === 2 && !c.content.trim())
|
|
20921
21347
|
);
|
|
20922
21348
|
const child = children[0];
|
|
20923
|
-
return children.length !== 1 || child.type === 11 || child.type === 9 && child.branches.some(
|
|
21349
|
+
return children.length !== 1 || child.type === 11 || child.type === 9 && child.branches.some(defaultHasMultipleChildren);
|
|
20924
21350
|
}
|
|
20925
21351
|
|
|
20926
21352
|
const ignoreSideEffectTags = (node, context) => {
|
|
@@ -21203,4 +21629,4 @@ Vue.compile = compileToFunction;
|
|
|
21203
21629
|
|
|
21204
21630
|
const configureCompat = Vue.configureCompat;
|
|
21205
21631
|
|
|
21206
|
-
export { BaseTransition, BaseTransitionPropsValidators, Comment, DeprecationTypes, EffectScope, ErrorCodes, ErrorTypeStrings, Fragment, KeepAlive, MoveType, ReactiveEffect, Static, Suspense, Teleport, Text, TrackOpTypes, Transition, TransitionGroup, TriggerOpTypes, VueElement, assertNumber, baseEmit, baseNormalizePropsOptions, callWithAsyncErrorHandling, callWithErrorHandling, camelize, capitalize, cloneVNode, compatUtils, computed, configureCompat, createApp, createAppAPI, createBlock, createCommentVNode, createElementBlock, createBaseVNode as createElementVNode, createHydrationRenderer, createInternalObject, createPropsRestProxy, createRenderer, createSSRApp, createSlots, createStaticVNode, createTextVNode, createVNode, currentInstance, customRef, Vue as default, defineAsyncComponent, defineComponent, defineCustomElement, defineEmits, defineExpose, defineModel, defineOptions, defineProps, defineSSRCustomElement, defineSlots, devtools, effect, effectScope, endMeasure, ensureRenderer, expose, flushOnAppMount, getCurrentInstance, getCurrentScope, getCurrentWatcher, getTransitionRawChildren, guardReactiveProps, h, handleError, hasInjectionContext, hydrate, hydrateOnIdle, hydrateOnInteraction, hydrateOnMediaQuery, hydrateOnVisible, initCustomFormatter, initDirectivesForSSR, initFeatureFlags, inject, isEmitListener, isMemoSame, isProxy, isReactive, isReadonly, isRef, isRuntimeOnly, isShallow, isVNode, markRaw, mergeDefaults, mergeModels, mergeProps, nextTick, nextUid, normalizeClass, normalizeContainer, normalizeProps, normalizeStyle, onActivated, onBeforeMount, onBeforeUnmount, onBeforeUpdate, onDeactivated, onErrorCaptured, onMounted, onRenderTracked, onRenderTriggered, onScopeDispose, onServerPrefetch, onUnmounted, onUpdated, onWatcherCleanup, openBlock, patchStyle, popScopeId, popWarningContext, provide, proxyRefs, pushScopeId, pushWarningContext, queueJob, queuePostFlushCb, reactive, readonly, ref, registerHMR, registerRuntimeCompiler, render, renderList, renderSlot, resolveComponent, resolveDirective, resolveDynamicComponent, resolveFilter, resolvePropValue, resolveTransitionHooks, setBlockTracking, setCurrentInstance, setDevtoolsHook, setTransitionHooks, shallowReactive, shallowReadonly, shallowRef, shouldSetAsProp, simpleSetCurrentInstance, ssrContextKey, ssrUtils, startMeasure, stop, toDisplayString, toHandlerKey, toHandlers, toRaw, toRef, toRefs, toValue, transformVNodeArgs, triggerRef, unref, unregisterHMR, useAttrs, useCssModule, useCssVars, useHost, useId, useModel, useSSRContext, useShadowRoot, useSlots, useTemplateRef, useTransitionState, vModelCheckbox, vModelCheckboxInit, vModelCheckboxUpdate, vModelDynamic, getValue as vModelGetValue, vModelRadio, vModelSelect, vModelSelectInit, vModelSetSelected, vModelText, vModelTextInit, vModelTextUpdate, vShow, vShowHidden, vShowOriginalDisplay, validateComponentName, validateProps, version, warn, watch, watchEffect, watchPostEffect, watchSyncEffect, withAsyncContext, withCtx, withDefaults, withDirectives, withKeys, withMemo, withModifiers, withScopeId };
|
|
21632
|
+
export { BaseTransition, BaseTransitionPropsValidators, Comment, DeprecationTypes, EffectScope, ErrorCodes, ErrorTypeStrings, Fragment, KeepAlive, MismatchTypes, MoveType, ReactiveEffect, Static, Suspense, Teleport, Text, TrackOpTypes, Transition, TransitionGroup, TransitionPropsValidators, TriggerOpTypes, VueElement, VueElementBase, activate, assertNumber, baseApplyTranslation, baseEmit, baseNormalizePropsOptions, baseResolveTransitionHooks, callPendingCbs, callWithAsyncErrorHandling, callWithErrorHandling, camelize, capitalize, checkTransitionMode, cloneVNode, compatUtils, computed, configureCompat, createApp, createAppAPI, createAsyncComponentContext, createBlock, createCanSetSetupRefChecker, createCommentVNode, createElementBlock, createBaseVNode as createElementVNode, createHydrationRenderer, createInternalObject, createPropsRestProxy, createRenderer, createSSRApp, createSlots, createStaticVNode, createTextVNode, createVNode, currentInstance, customRef, deactivate, Vue as default, defineAsyncComponent, defineComponent, defineCustomElement, defineEmits, defineExpose, defineModel, defineOptions, defineProps, defineSSRCustomElement, defineSlots, devtools, devtoolsComponentAdded, effect, effectScope, endMeasure, ensureHydrationRenderer, ensureRenderer, ensureVaporSlotFallback, expose, flushOnAppMount, forceReflow, getAttributeMismatch, getComponentName, getCurrentInstance, getCurrentScope, getCurrentWatcher, getInheritedScopeIds, getTransitionRawChildren, guardReactiveProps, h, handleError, handleMovedChildren, hasCSSTransform, hasInjectionContext, hydrate, hydrateOnIdle, hydrateOnInteraction, hydrateOnMediaQuery, hydrateOnVisible, initCustomFormatter, initDirectivesForSSR, initFeatureFlags, inject, isAsyncWrapper, isEmitListener, isKeepAlive, isMapEqual, isMemoSame, isMismatchAllowed, isProxy, isReactive, isReadonly, isRef, isRuntimeOnly, isSetEqual, isShallow, isTeleportDeferred, isTeleportDisabled, isTemplateNode$1 as isTemplateNode, isVNode, isValidHtmlOrSvgAttribute, leaveCbKey, markAsyncBoundary, markRaw, matches, mergeDefaults, mergeModels, mergeProps, nextTick, nextUid, nodeOps, normalizeClass, normalizeContainer, normalizeProps, normalizeRef, normalizeStyle, onActivated, onBeforeMount, onBeforeUnmount, onBeforeUpdate, onDeactivated, onErrorCaptured, onMounted, onRenderTracked, onRenderTriggered, onScopeDispose, onServerPrefetch, onUnmounted, onUpdated, onWatcherCleanup, openBlock, patchProp, patchStyle, performAsyncHydrate, performTransitionEnter, performTransitionLeave, popScopeId, popWarningContext, provide, proxyRefs, pushScopeId, pushWarningContext, queueJob, queuePostFlushCb, reactive, readonly, ref, registerHMR, registerRuntimeCompiler, render, renderList, renderSlot, resetShapeFlag, resolveComponent, resolveDirective, resolveDynamicComponent, resolveFilter, resolvePropValue, resolveTarget as resolveTeleportTarget, resolveTransitionHooks, resolveTransitionProps, setBlockTracking, setCurrentInstance, setDevtoolsHook, setRef, setTransitionHooks, shallowReactive, shallowReadonly, shallowRef, shouldSetAsProp, simpleSetCurrentInstance, ssrContextKey, ssrUtils, startMeasure, stop, svgNS, toClassSet, toDisplayString, toHandlerKey, toHandlers, toRaw, toRef, toRefs, toStyleMap, toValue, transformVNodeArgs, triggerRef, unref, unregisterHMR, unsafeToTrustedHTML, useAsyncComponentState, useAttrs, useCssModule, useCssVars, useHost, useId, useInstanceOption, useModel, useSSRContext, useShadowRoot, useSlots, useTemplateRef, useTransitionState, vModelCheckbox, vModelCheckboxInit, vModelCheckboxUpdate, vModelDynamic, getValue as vModelGetValue, vModelRadio, vModelSelect, vModelSelectInit, vModelSetSelected, vModelText, vModelTextInit, vModelTextUpdate, vShow, vShowHidden, vShowOriginalDisplay, validateComponentName, validateProps, version, warn, warnPropMismatch, watch, watchEffect, watchPostEffect, watchSyncEffect, withAsyncContext, withCtx, withDefaults, withDirectives, withKeys, withMemo, withModifiers, withScopeId, xlinkNS };
|