@vue/runtime-dom 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/dist/runtime-dom.cjs.js +280 -174
- package/dist/runtime-dom.cjs.prod.js +258 -152
- package/dist/runtime-dom.d.ts +709 -670
- package/dist/runtime-dom.esm-browser.js +989 -621
- package/dist/runtime-dom.esm-browser.prod.js +4 -3
- package/dist/runtime-dom.esm-bundler.js +280 -177
- package/dist/runtime-dom.global.js +989 -617
- package/dist/runtime-dom.global.prod.js +4 -3
- package/package.json +4 -4
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/runtime-dom v3.6.0-alpha.
|
|
2
|
+
* @vue/runtime-dom 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++) {
|
|
@@ -235,6 +237,9 @@ function shouldSetAsAttr(tagName, key) {
|
|
|
235
237
|
if ((key === "width" || key === "height") && (tagName === "IMG" || tagName === "VIDEO" || tagName === "CANVAS" || tagName === "SOURCE")) {
|
|
236
238
|
return true;
|
|
237
239
|
}
|
|
240
|
+
if (key === "sandbox" && tagName === "IFRAME") {
|
|
241
|
+
return true;
|
|
242
|
+
}
|
|
238
243
|
return false;
|
|
239
244
|
}
|
|
240
245
|
|
|
@@ -424,6 +429,7 @@ var ReactiveFlags = /* @__PURE__ */ ((ReactiveFlags2) => {
|
|
|
424
429
|
const notifyBuffer = [];
|
|
425
430
|
let batchDepth = 0;
|
|
426
431
|
let activeSub = void 0;
|
|
432
|
+
let globalVersion = 0;
|
|
427
433
|
let notifyIndex = 0;
|
|
428
434
|
let notifyBufferLength = 0;
|
|
429
435
|
function setActiveSub(sub) {
|
|
@@ -446,17 +452,18 @@ function link(dep, sub) {
|
|
|
446
452
|
if (prevDep !== void 0 && prevDep.dep === dep) {
|
|
447
453
|
return;
|
|
448
454
|
}
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
sub.depsTail = nextDep;
|
|
455
|
-
return;
|
|
456
|
-
}
|
|
455
|
+
const nextDep = prevDep !== void 0 ? prevDep.nextDep : sub.deps;
|
|
456
|
+
if (nextDep !== void 0 && nextDep.dep === dep) {
|
|
457
|
+
nextDep.version = globalVersion;
|
|
458
|
+
sub.depsTail = nextDep;
|
|
459
|
+
return;
|
|
457
460
|
}
|
|
458
461
|
const prevSub = dep.subsTail;
|
|
462
|
+
if (prevSub !== void 0 && prevSub.version === globalVersion && prevSub.sub === sub) {
|
|
463
|
+
return;
|
|
464
|
+
}
|
|
459
465
|
const newLink = sub.depsTail = dep.subsTail = {
|
|
466
|
+
version: globalVersion,
|
|
460
467
|
dep,
|
|
461
468
|
sub,
|
|
462
469
|
prevDep,
|
|
@@ -562,6 +569,7 @@ function propagate(link2) {
|
|
|
562
569
|
} while (true);
|
|
563
570
|
}
|
|
564
571
|
function startTracking(sub) {
|
|
572
|
+
++globalVersion;
|
|
565
573
|
sub.depsTail = void 0;
|
|
566
574
|
sub.flags = sub.flags & -57 | 4 /* RecursedCheck */;
|
|
567
575
|
return setActiveSub(sub);
|
|
@@ -662,18 +670,12 @@ function shallowPropagate(link2) {
|
|
|
662
670
|
} while (link2 !== void 0);
|
|
663
671
|
}
|
|
664
672
|
function isValidLink(checkLink, sub) {
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
}
|
|
672
|
-
if (link2 === depsTail) {
|
|
673
|
-
break;
|
|
674
|
-
}
|
|
675
|
-
link2 = link2.nextDep;
|
|
676
|
-
} while (link2 !== void 0);
|
|
673
|
+
let link2 = sub.depsTail;
|
|
674
|
+
while (link2 !== void 0) {
|
|
675
|
+
if (link2 === checkLink) {
|
|
676
|
+
return true;
|
|
677
|
+
}
|
|
678
|
+
link2 = link2.prevDep;
|
|
677
679
|
}
|
|
678
680
|
return false;
|
|
679
681
|
}
|
|
@@ -913,7 +915,7 @@ const arrayInstrumentations = {
|
|
|
913
915
|
join(separator) {
|
|
914
916
|
return reactiveReadArray(this).join(separator);
|
|
915
917
|
},
|
|
916
|
-
// keys() iterator only reads `length`, no
|
|
918
|
+
// keys() iterator only reads `length`, no optimization required
|
|
917
919
|
lastIndexOf(...args) {
|
|
918
920
|
return searchProxy(this, "lastIndexOf", args);
|
|
919
921
|
},
|
|
@@ -965,7 +967,7 @@ function iterator(self, method, wrapValue) {
|
|
|
965
967
|
iter._next = iter.next;
|
|
966
968
|
iter.next = () => {
|
|
967
969
|
const result = iter._next();
|
|
968
|
-
if (result.
|
|
970
|
+
if (!result.done) {
|
|
969
971
|
result.value = wrapValue(result.value);
|
|
970
972
|
}
|
|
971
973
|
return result;
|
|
@@ -1096,7 +1098,8 @@ class BaseReactiveHandler {
|
|
|
1096
1098
|
return res;
|
|
1097
1099
|
}
|
|
1098
1100
|
if (isRef(res)) {
|
|
1099
|
-
|
|
1101
|
+
const value = targetIsArray && isIntegerKey(key) ? res : res.value;
|
|
1102
|
+
return isReadonly2 && isObject(value) ? readonly(value) : value;
|
|
1100
1103
|
}
|
|
1101
1104
|
if (isObject(res)) {
|
|
1102
1105
|
return isReadonly2 ? readonly(res) : reactive(res);
|
|
@@ -1118,7 +1121,13 @@ class MutableReactiveHandler extends BaseReactiveHandler {
|
|
|
1118
1121
|
}
|
|
1119
1122
|
if (!isArray(target) && isRef(oldValue) && !isRef(value)) {
|
|
1120
1123
|
if (isOldValueReadonly) {
|
|
1121
|
-
|
|
1124
|
+
{
|
|
1125
|
+
warn$2(
|
|
1126
|
+
`Set operation on key "${String(key)}" failed: target is readonly.`,
|
|
1127
|
+
target[key]
|
|
1128
|
+
);
|
|
1129
|
+
}
|
|
1130
|
+
return true;
|
|
1122
1131
|
} else {
|
|
1123
1132
|
oldValue.value = value;
|
|
1124
1133
|
return true;
|
|
@@ -1263,7 +1272,7 @@ function createInstrumentations(readonly, shallow) {
|
|
|
1263
1272
|
get size() {
|
|
1264
1273
|
const target = this["__v_raw"];
|
|
1265
1274
|
!readonly && track(toRaw(target), "iterate", ITERATE_KEY);
|
|
1266
|
-
return
|
|
1275
|
+
return target.size;
|
|
1267
1276
|
},
|
|
1268
1277
|
has(key) {
|
|
1269
1278
|
const target = this["__v_raw"];
|
|
@@ -2266,11 +2275,11 @@ function traverse(value, depth = Infinity, seen) {
|
|
|
2266
2275
|
if (depth <= 0 || !isObject(value) || value["__v_skip"]) {
|
|
2267
2276
|
return value;
|
|
2268
2277
|
}
|
|
2269
|
-
seen = seen || /* @__PURE__ */ new
|
|
2270
|
-
if (seen.
|
|
2278
|
+
seen = seen || /* @__PURE__ */ new Map();
|
|
2279
|
+
if ((seen.get(value) || 0) >= depth) {
|
|
2271
2280
|
return value;
|
|
2272
2281
|
}
|
|
2273
|
-
seen.
|
|
2282
|
+
seen.set(value, depth);
|
|
2274
2283
|
depth--;
|
|
2275
2284
|
if (isRef(value)) {
|
|
2276
2285
|
traverse(value.value, depth, seen);
|
|
@@ -2816,8 +2825,10 @@ function rerender(id, newRender) {
|
|
|
2816
2825
|
instance.hmrRerender();
|
|
2817
2826
|
} else {
|
|
2818
2827
|
const i = instance;
|
|
2819
|
-
i.
|
|
2820
|
-
|
|
2828
|
+
if (!(i.effect.flags & 1024)) {
|
|
2829
|
+
i.renderCache = [];
|
|
2830
|
+
i.effect.run();
|
|
2831
|
+
}
|
|
2821
2832
|
}
|
|
2822
2833
|
nextTick(() => {
|
|
2823
2834
|
isHmrUpdating = false;
|
|
@@ -2830,7 +2841,12 @@ function reload(id, newComp) {
|
|
|
2830
2841
|
newComp = normalizeClassComponent(newComp);
|
|
2831
2842
|
updateComponentDef(record.initialDef, newComp);
|
|
2832
2843
|
const instances = [...record.instances];
|
|
2833
|
-
if (newComp.__vapor) {
|
|
2844
|
+
if (newComp.__vapor && !instances.some((i) => i.ceReload)) {
|
|
2845
|
+
for (const instance of instances) {
|
|
2846
|
+
if (instance.root && instance.root.ce && instance !== instance.root) {
|
|
2847
|
+
instance.root.ce._removeChildStyle(instance.type);
|
|
2848
|
+
}
|
|
2849
|
+
}
|
|
2834
2850
|
for (const instance of instances) {
|
|
2835
2851
|
instance.hmrReload(newComp);
|
|
2836
2852
|
}
|
|
@@ -2859,7 +2875,10 @@ function reload(id, newComp) {
|
|
|
2859
2875
|
if (parent.vapor) {
|
|
2860
2876
|
parent.hmrRerender();
|
|
2861
2877
|
} else {
|
|
2862
|
-
parent.effect.
|
|
2878
|
+
if (!(parent.effect.flags & 1024)) {
|
|
2879
|
+
parent.renderCache = [];
|
|
2880
|
+
parent.effect.run();
|
|
2881
|
+
}
|
|
2863
2882
|
}
|
|
2864
2883
|
nextTick(() => {
|
|
2865
2884
|
isHmrUpdating = false;
|
|
@@ -2969,7 +2988,6 @@ const devtoolsComponentRemoved = (component) => {
|
|
|
2969
2988
|
_devtoolsComponentRemoved(component);
|
|
2970
2989
|
}
|
|
2971
2990
|
};
|
|
2972
|
-
/*! #__NO_SIDE_EFFECTS__ */
|
|
2973
2991
|
// @__NO_SIDE_EFFECTS__
|
|
2974
2992
|
function createDevtoolsComponentHook(hook) {
|
|
2975
2993
|
return (component) => {
|
|
@@ -3155,9 +3173,6 @@ const TeleportImpl = {
|
|
|
3155
3173
|
insert(mainAnchor, container, anchor);
|
|
3156
3174
|
const mount = (container2, anchor2) => {
|
|
3157
3175
|
if (shapeFlag & 16) {
|
|
3158
|
-
if (parentComponent && parentComponent.isCE) {
|
|
3159
|
-
parentComponent.ce._teleportTarget = container2;
|
|
3160
|
-
}
|
|
3161
3176
|
mountChildren(
|
|
3162
3177
|
children,
|
|
3163
3178
|
container2,
|
|
@@ -3179,6 +3194,9 @@ const TeleportImpl = {
|
|
|
3179
3194
|
} else if (namespace !== "mathml" && isTargetMathML(target)) {
|
|
3180
3195
|
namespace = "mathml";
|
|
3181
3196
|
}
|
|
3197
|
+
if (parentComponent && parentComponent.isCE) {
|
|
3198
|
+
(parentComponent.ce._teleportTargets || (parentComponent.ce._teleportTargets = /* @__PURE__ */ new Set())).add(target);
|
|
3199
|
+
}
|
|
3182
3200
|
if (!disabled) {
|
|
3183
3201
|
mount(target, targetAnchor);
|
|
3184
3202
|
updateCssVars(n2, false);
|
|
@@ -3379,26 +3397,34 @@ function moveTeleport(vnode, container, parentAnchor, { o: { insert }, m: move }
|
|
|
3379
3397
|
function hydrateTeleport(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized, {
|
|
3380
3398
|
o: { nextSibling, parentNode, querySelector, insert, createText }
|
|
3381
3399
|
}, hydrateChildren) {
|
|
3400
|
+
function hydrateDisabledTeleport(node2, vnode2, targetStart, targetAnchor) {
|
|
3401
|
+
vnode2.anchor = hydrateChildren(
|
|
3402
|
+
nextSibling(node2),
|
|
3403
|
+
vnode2,
|
|
3404
|
+
parentNode(node2),
|
|
3405
|
+
parentComponent,
|
|
3406
|
+
parentSuspense,
|
|
3407
|
+
slotScopeIds,
|
|
3408
|
+
optimized
|
|
3409
|
+
);
|
|
3410
|
+
vnode2.targetStart = targetStart;
|
|
3411
|
+
vnode2.targetAnchor = targetAnchor;
|
|
3412
|
+
}
|
|
3382
3413
|
const target = vnode.target = resolveTarget(
|
|
3383
3414
|
vnode.props,
|
|
3384
3415
|
querySelector
|
|
3385
3416
|
);
|
|
3417
|
+
const disabled = isTeleportDisabled(vnode.props);
|
|
3386
3418
|
if (target) {
|
|
3387
|
-
const disabled = isTeleportDisabled(vnode.props);
|
|
3388
3419
|
const targetNode = target._lpa || target.firstChild;
|
|
3389
3420
|
if (vnode.shapeFlag & 16) {
|
|
3390
3421
|
if (disabled) {
|
|
3391
|
-
|
|
3392
|
-
|
|
3422
|
+
hydrateDisabledTeleport(
|
|
3423
|
+
node,
|
|
3393
3424
|
vnode,
|
|
3394
|
-
|
|
3395
|
-
|
|
3396
|
-
parentSuspense,
|
|
3397
|
-
slotScopeIds,
|
|
3398
|
-
optimized
|
|
3425
|
+
targetNode,
|
|
3426
|
+
targetNode && nextSibling(targetNode)
|
|
3399
3427
|
);
|
|
3400
|
-
vnode.targetStart = targetNode;
|
|
3401
|
-
vnode.targetAnchor = targetNode && nextSibling(targetNode);
|
|
3402
3428
|
} else {
|
|
3403
3429
|
vnode.anchor = nextSibling(node);
|
|
3404
3430
|
let targetAnchor = targetNode;
|
|
@@ -3429,6 +3455,10 @@ function hydrateTeleport(node, vnode, parentComponent, parentSuspense, slotScope
|
|
|
3429
3455
|
}
|
|
3430
3456
|
}
|
|
3431
3457
|
updateCssVars(vnode, disabled);
|
|
3458
|
+
} else if (disabled) {
|
|
3459
|
+
if (vnode.shapeFlag & 16) {
|
|
3460
|
+
hydrateDisabledTeleport(node, vnode, node, nextSibling(node));
|
|
3461
|
+
}
|
|
3432
3462
|
}
|
|
3433
3463
|
return vnode.anchor && nextSibling(vnode.anchor);
|
|
3434
3464
|
}
|
|
@@ -3469,7 +3499,7 @@ function useTransitionState() {
|
|
|
3469
3499
|
isMounted: false,
|
|
3470
3500
|
isLeaving: false,
|
|
3471
3501
|
isUnmounting: false,
|
|
3472
|
-
|
|
3502
|
+
leavingNodes: /* @__PURE__ */ new Map()
|
|
3473
3503
|
};
|
|
3474
3504
|
onMounted(() => {
|
|
3475
3505
|
state.isMounted = true;
|
|
@@ -3501,7 +3531,7 @@ const BaseTransitionPropsValidators = {
|
|
|
3501
3531
|
onAppearCancelled: TransitionHookValidator
|
|
3502
3532
|
};
|
|
3503
3533
|
const recursiveGetSubtree = (instance) => {
|
|
3504
|
-
const subTree = instance.subTree;
|
|
3534
|
+
const subTree = instance.type.__vapor ? instance.block : instance.subTree;
|
|
3505
3535
|
return subTree.component ? recursiveGetSubtree(subTree.component) : subTree;
|
|
3506
3536
|
};
|
|
3507
3537
|
const BaseTransitionImpl = {
|
|
@@ -3518,9 +3548,7 @@ const BaseTransitionImpl = {
|
|
|
3518
3548
|
const child = findNonCommentChild(children);
|
|
3519
3549
|
const rawProps = toRaw(props);
|
|
3520
3550
|
const { mode } = rawProps;
|
|
3521
|
-
|
|
3522
|
-
warn$1(`invalid <transition> mode: ${mode}`);
|
|
3523
|
-
}
|
|
3551
|
+
checkTransitionMode(mode);
|
|
3524
3552
|
if (state.isLeaving) {
|
|
3525
3553
|
return emptyPlaceholder(child);
|
|
3526
3554
|
}
|
|
@@ -3540,7 +3568,7 @@ const BaseTransitionImpl = {
|
|
|
3540
3568
|
setTransitionHooks(innerChild, enterHooks);
|
|
3541
3569
|
}
|
|
3542
3570
|
let oldInnerChild = instance.subTree && getInnerChild$1(instance.subTree);
|
|
3543
|
-
if (oldInnerChild && oldInnerChild.type !== Comment && !isSameVNodeType(
|
|
3571
|
+
if (oldInnerChild && oldInnerChild.type !== Comment && !isSameVNodeType(oldInnerChild, innerChild) && recursiveGetSubtree(instance).type !== Comment) {
|
|
3544
3572
|
let leavingHooks = resolveTransitionHooks(
|
|
3545
3573
|
oldInnerChild,
|
|
3546
3574
|
rawProps,
|
|
@@ -3609,15 +3637,53 @@ function findNonCommentChild(children) {
|
|
|
3609
3637
|
}
|
|
3610
3638
|
const BaseTransition = BaseTransitionImpl;
|
|
3611
3639
|
function getLeavingNodesForType(state, vnode) {
|
|
3612
|
-
const {
|
|
3613
|
-
let leavingVNodesCache =
|
|
3640
|
+
const { leavingNodes } = state;
|
|
3641
|
+
let leavingVNodesCache = leavingNodes.get(vnode.type);
|
|
3614
3642
|
if (!leavingVNodesCache) {
|
|
3615
3643
|
leavingVNodesCache = /* @__PURE__ */ Object.create(null);
|
|
3616
|
-
|
|
3644
|
+
leavingNodes.set(vnode.type, leavingVNodesCache);
|
|
3617
3645
|
}
|
|
3618
3646
|
return leavingVNodesCache;
|
|
3619
3647
|
}
|
|
3620
3648
|
function resolveTransitionHooks(vnode, props, state, instance, postClone) {
|
|
3649
|
+
const key = String(vnode.key);
|
|
3650
|
+
const leavingVNodesCache = getLeavingNodesForType(state, vnode);
|
|
3651
|
+
const context = {
|
|
3652
|
+
setLeavingNodeCache: () => {
|
|
3653
|
+
leavingVNodesCache[key] = vnode;
|
|
3654
|
+
},
|
|
3655
|
+
unsetLeavingNodeCache: () => {
|
|
3656
|
+
if (leavingVNodesCache[key] === vnode) {
|
|
3657
|
+
delete leavingVNodesCache[key];
|
|
3658
|
+
}
|
|
3659
|
+
},
|
|
3660
|
+
earlyRemove: () => {
|
|
3661
|
+
const leavingVNode = leavingVNodesCache[key];
|
|
3662
|
+
if (leavingVNode && isSameVNodeType(vnode, leavingVNode) && leavingVNode.el[leaveCbKey]) {
|
|
3663
|
+
leavingVNode.el[leaveCbKey]();
|
|
3664
|
+
}
|
|
3665
|
+
},
|
|
3666
|
+
cloneHooks: (vnode2) => {
|
|
3667
|
+
const hooks = resolveTransitionHooks(
|
|
3668
|
+
vnode2,
|
|
3669
|
+
props,
|
|
3670
|
+
state,
|
|
3671
|
+
instance,
|
|
3672
|
+
postClone
|
|
3673
|
+
);
|
|
3674
|
+
if (postClone) postClone(hooks);
|
|
3675
|
+
return hooks;
|
|
3676
|
+
}
|
|
3677
|
+
};
|
|
3678
|
+
return baseResolveTransitionHooks(context, props, state, instance);
|
|
3679
|
+
}
|
|
3680
|
+
function baseResolveTransitionHooks(context, props, state, instance) {
|
|
3681
|
+
const {
|
|
3682
|
+
setLeavingNodeCache,
|
|
3683
|
+
unsetLeavingNodeCache,
|
|
3684
|
+
earlyRemove,
|
|
3685
|
+
cloneHooks
|
|
3686
|
+
} = context;
|
|
3621
3687
|
const {
|
|
3622
3688
|
appear,
|
|
3623
3689
|
mode,
|
|
@@ -3635,8 +3701,6 @@ function resolveTransitionHooks(vnode, props, state, instance, postClone) {
|
|
|
3635
3701
|
onAfterAppear,
|
|
3636
3702
|
onAppearCancelled
|
|
3637
3703
|
} = props;
|
|
3638
|
-
const key = String(vnode.key);
|
|
3639
|
-
const leavingVNodesCache = getLeavingNodesForType(state, vnode);
|
|
3640
3704
|
const callHook = (hook, args) => {
|
|
3641
3705
|
hook && callWithAsyncErrorHandling(
|
|
3642
3706
|
hook,
|
|
@@ -3672,10 +3736,7 @@ function resolveTransitionHooks(vnode, props, state, instance, postClone) {
|
|
|
3672
3736
|
/* cancelled */
|
|
3673
3737
|
);
|
|
3674
3738
|
}
|
|
3675
|
-
|
|
3676
|
-
if (leavingVNode && isSameVNodeType(vnode, leavingVNode) && leavingVNode.el[leaveCbKey]) {
|
|
3677
|
-
leavingVNode.el[leaveCbKey]();
|
|
3678
|
-
}
|
|
3739
|
+
earlyRemove();
|
|
3679
3740
|
callHook(hook, [el]);
|
|
3680
3741
|
},
|
|
3681
3742
|
enter(el) {
|
|
@@ -3712,7 +3773,6 @@ function resolveTransitionHooks(vnode, props, state, instance, postClone) {
|
|
|
3712
3773
|
}
|
|
3713
3774
|
},
|
|
3714
3775
|
leave(el, remove) {
|
|
3715
|
-
const key2 = String(vnode.key);
|
|
3716
3776
|
if (el[enterCbKey$1]) {
|
|
3717
3777
|
el[enterCbKey$1](
|
|
3718
3778
|
true
|
|
@@ -3734,27 +3794,17 @@ function resolveTransitionHooks(vnode, props, state, instance, postClone) {
|
|
|
3734
3794
|
callHook(onAfterLeave, [el]);
|
|
3735
3795
|
}
|
|
3736
3796
|
el[leaveCbKey] = void 0;
|
|
3737
|
-
|
|
3738
|
-
delete leavingVNodesCache[key2];
|
|
3739
|
-
}
|
|
3797
|
+
unsetLeavingNodeCache(el);
|
|
3740
3798
|
};
|
|
3741
|
-
|
|
3799
|
+
setLeavingNodeCache(el);
|
|
3742
3800
|
if (onLeave) {
|
|
3743
3801
|
callAsyncHook(onLeave, [el, done]);
|
|
3744
3802
|
} else {
|
|
3745
3803
|
done();
|
|
3746
3804
|
}
|
|
3747
3805
|
},
|
|
3748
|
-
clone(
|
|
3749
|
-
|
|
3750
|
-
vnode2,
|
|
3751
|
-
props,
|
|
3752
|
-
state,
|
|
3753
|
-
instance,
|
|
3754
|
-
postClone
|
|
3755
|
-
);
|
|
3756
|
-
if (postClone) postClone(hooks2);
|
|
3757
|
-
return hooks2;
|
|
3806
|
+
clone(node) {
|
|
3807
|
+
return cloneHooks(node);
|
|
3758
3808
|
}
|
|
3759
3809
|
};
|
|
3760
3810
|
return hooks;
|
|
@@ -3788,8 +3838,15 @@ function getInnerChild$1(vnode) {
|
|
|
3788
3838
|
}
|
|
3789
3839
|
function setTransitionHooks(vnode, hooks) {
|
|
3790
3840
|
if (vnode.shapeFlag & 6 && vnode.component) {
|
|
3791
|
-
vnode.
|
|
3792
|
-
|
|
3841
|
+
if (vnode.type.__vapor) {
|
|
3842
|
+
getVaporInterface(vnode.component, vnode).setTransitionHooks(
|
|
3843
|
+
vnode.component,
|
|
3844
|
+
hooks
|
|
3845
|
+
);
|
|
3846
|
+
} else {
|
|
3847
|
+
vnode.transition = hooks;
|
|
3848
|
+
setTransitionHooks(vnode.component.subTree, hooks);
|
|
3849
|
+
}
|
|
3793
3850
|
} else if (vnode.shapeFlag & 128) {
|
|
3794
3851
|
vnode.ssContent.transition = hooks.clone(vnode.ssContent);
|
|
3795
3852
|
vnode.ssFallback.transition = hooks.clone(vnode.ssFallback);
|
|
@@ -3819,8 +3876,12 @@ function getTransitionRawChildren(children, keepComment = false, parentKey) {
|
|
|
3819
3876
|
}
|
|
3820
3877
|
return ret;
|
|
3821
3878
|
}
|
|
3879
|
+
function checkTransitionMode(mode) {
|
|
3880
|
+
if (mode && mode !== "in-out" && mode !== "out-in" && mode !== "default") {
|
|
3881
|
+
warn$1(`invalid <transition> mode: ${mode}`);
|
|
3882
|
+
}
|
|
3883
|
+
}
|
|
3822
3884
|
|
|
3823
|
-
/*! #__NO_SIDE_EFFECTS__ */
|
|
3824
3885
|
// @__NO_SIDE_EFFECTS__
|
|
3825
3886
|
function defineComponent(options, extraOptions) {
|
|
3826
3887
|
return isFunction(options) ? (
|
|
@@ -3873,6 +3934,7 @@ function useTemplateRef(key) {
|
|
|
3873
3934
|
return ret;
|
|
3874
3935
|
}
|
|
3875
3936
|
|
|
3937
|
+
const pendingSetRefMap = /* @__PURE__ */ new WeakMap();
|
|
3876
3938
|
function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
|
|
3877
3939
|
if (isArray(rawRef)) {
|
|
3878
3940
|
rawRef.forEach(
|
|
@@ -3904,28 +3966,23 @@ function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
|
|
|
3904
3966
|
const oldRef = oldRawRef && oldRawRef.r;
|
|
3905
3967
|
const refs = owner.refs === EMPTY_OBJ ? owner.refs = {} : owner.refs;
|
|
3906
3968
|
const setupState = owner.setupState;
|
|
3907
|
-
const
|
|
3908
|
-
const
|
|
3909
|
-
|
|
3910
|
-
if (hasOwn(rawSetupState, key) && !isRef(rawSetupState[key])) {
|
|
3911
|
-
warn$1(
|
|
3912
|
-
`Template ref "${key}" used on a non-ref value. It will not work in the production build.`
|
|
3913
|
-
);
|
|
3914
|
-
}
|
|
3915
|
-
if (knownTemplateRefs.has(rawSetupState[key])) {
|
|
3916
|
-
return false;
|
|
3917
|
-
}
|
|
3918
|
-
}
|
|
3919
|
-
return hasOwn(rawSetupState, key);
|
|
3969
|
+
const canSetSetupRef = createCanSetSetupRefChecker(setupState);
|
|
3970
|
+
const canSetRef = (ref2) => {
|
|
3971
|
+
return !knownTemplateRefs.has(ref2);
|
|
3920
3972
|
};
|
|
3921
3973
|
if (oldRef != null && oldRef !== ref) {
|
|
3974
|
+
invalidatePendingSetRef(oldRawRef);
|
|
3922
3975
|
if (isString(oldRef)) {
|
|
3923
3976
|
refs[oldRef] = null;
|
|
3924
3977
|
if (canSetSetupRef(oldRef)) {
|
|
3925
3978
|
setupState[oldRef] = null;
|
|
3926
3979
|
}
|
|
3927
3980
|
} else if (isRef(oldRef)) {
|
|
3928
|
-
oldRef
|
|
3981
|
+
if (canSetRef(oldRef)) {
|
|
3982
|
+
oldRef.value = null;
|
|
3983
|
+
}
|
|
3984
|
+
const oldRawRefAtom = oldRawRef;
|
|
3985
|
+
if (oldRawRefAtom.k) refs[oldRawRefAtom.k] = null;
|
|
3929
3986
|
}
|
|
3930
3987
|
}
|
|
3931
3988
|
if (isFunction(ref)) {
|
|
@@ -3936,7 +3993,7 @@ function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
|
|
|
3936
3993
|
if (_isString || _isRef) {
|
|
3937
3994
|
const doSet = () => {
|
|
3938
3995
|
if (rawRef.f) {
|
|
3939
|
-
const existing = _isString ? canSetSetupRef(ref) ? setupState[ref] : refs[ref] : ref.value;
|
|
3996
|
+
const existing = _isString ? canSetSetupRef(ref) ? setupState[ref] : refs[ref] : canSetRef(ref) || !rawRef.k ? ref.value : refs[rawRef.k];
|
|
3940
3997
|
if (isUnmount) {
|
|
3941
3998
|
isArray(existing) && remove(existing, refValue);
|
|
3942
3999
|
} else {
|
|
@@ -3947,8 +4004,11 @@ function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
|
|
|
3947
4004
|
setupState[ref] = refs[ref];
|
|
3948
4005
|
}
|
|
3949
4006
|
} else {
|
|
3950
|
-
|
|
3951
|
-
if (
|
|
4007
|
+
const newVal = [refValue];
|
|
4008
|
+
if (canSetRef(ref)) {
|
|
4009
|
+
ref.value = newVal;
|
|
4010
|
+
}
|
|
4011
|
+
if (rawRef.k) refs[rawRef.k] = newVal;
|
|
3952
4012
|
}
|
|
3953
4013
|
} else if (!existing.includes(refValue)) {
|
|
3954
4014
|
existing.push(refValue);
|
|
@@ -3960,15 +4020,23 @@ function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
|
|
|
3960
4020
|
setupState[ref] = value;
|
|
3961
4021
|
}
|
|
3962
4022
|
} else if (_isRef) {
|
|
3963
|
-
ref
|
|
4023
|
+
if (canSetRef(ref)) {
|
|
4024
|
+
ref.value = value;
|
|
4025
|
+
}
|
|
3964
4026
|
if (rawRef.k) refs[rawRef.k] = value;
|
|
3965
4027
|
} else {
|
|
3966
4028
|
warn$1("Invalid template ref type:", ref, `(${typeof ref})`);
|
|
3967
4029
|
}
|
|
3968
4030
|
};
|
|
3969
4031
|
if (value) {
|
|
3970
|
-
|
|
4032
|
+
const job = () => {
|
|
4033
|
+
doSet();
|
|
4034
|
+
pendingSetRefMap.delete(rawRef);
|
|
4035
|
+
};
|
|
4036
|
+
pendingSetRefMap.set(rawRef, job);
|
|
4037
|
+
queuePostRenderEffect(job, -1, parentSuspense);
|
|
3971
4038
|
} else {
|
|
4039
|
+
invalidatePendingSetRef(rawRef);
|
|
3972
4040
|
doSet();
|
|
3973
4041
|
}
|
|
3974
4042
|
} else {
|
|
@@ -3976,6 +4044,29 @@ function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
|
|
|
3976
4044
|
}
|
|
3977
4045
|
}
|
|
3978
4046
|
}
|
|
4047
|
+
function createCanSetSetupRefChecker(setupState) {
|
|
4048
|
+
const rawSetupState = toRaw(setupState);
|
|
4049
|
+
return setupState === void 0 || setupState === EMPTY_OBJ ? NO : (key) => {
|
|
4050
|
+
{
|
|
4051
|
+
if (hasOwn(rawSetupState, key) && !isRef(rawSetupState[key])) {
|
|
4052
|
+
warn$1(
|
|
4053
|
+
`Template ref "${key}" used on a non-ref value. It will not work in the production build.`
|
|
4054
|
+
);
|
|
4055
|
+
}
|
|
4056
|
+
if (knownTemplateRefs.has(rawSetupState[key])) {
|
|
4057
|
+
return false;
|
|
4058
|
+
}
|
|
4059
|
+
}
|
|
4060
|
+
return hasOwn(rawSetupState, key);
|
|
4061
|
+
};
|
|
4062
|
+
}
|
|
4063
|
+
function invalidatePendingSetRef(rawRef) {
|
|
4064
|
+
const pendingSetRef = pendingSetRefMap.get(rawRef);
|
|
4065
|
+
if (pendingSetRef) {
|
|
4066
|
+
pendingSetRef.flags |= 4;
|
|
4067
|
+
pendingSetRefMap.delete(rawRef);
|
|
4068
|
+
}
|
|
4069
|
+
}
|
|
3979
4070
|
|
|
3980
4071
|
let hasLoggedMismatchError = false;
|
|
3981
4072
|
const logMismatchError = () => {
|
|
@@ -4120,6 +4211,12 @@ function createHydrationFunctions(rendererInternals) {
|
|
|
4120
4211
|
);
|
|
4121
4212
|
}
|
|
4122
4213
|
break;
|
|
4214
|
+
case VaporSlot:
|
|
4215
|
+
nextNode = getVaporInterface(parentComponent, vnode).hydrateSlot(
|
|
4216
|
+
vnode,
|
|
4217
|
+
node
|
|
4218
|
+
);
|
|
4219
|
+
break;
|
|
4123
4220
|
default:
|
|
4124
4221
|
if (shapeFlag & 1) {
|
|
4125
4222
|
if ((domType !== 1 || vnode.type.toLowerCase() !== node.tagName.toLowerCase()) && !isTemplateNode(node)) {
|
|
@@ -4135,9 +4232,6 @@ function createHydrationFunctions(rendererInternals) {
|
|
|
4135
4232
|
);
|
|
4136
4233
|
}
|
|
4137
4234
|
} else if (shapeFlag & 6) {
|
|
4138
|
-
if (vnode.type.__vapor) {
|
|
4139
|
-
throw new Error("Vapor component hydration is not supported yet.");
|
|
4140
|
-
}
|
|
4141
4235
|
vnode.slotScopeIds = slotScopeIds;
|
|
4142
4236
|
const container = parentNode(node);
|
|
4143
4237
|
if (isFragmentStart) {
|
|
@@ -4147,15 +4241,25 @@ function createHydrationFunctions(rendererInternals) {
|
|
|
4147
4241
|
} else {
|
|
4148
4242
|
nextNode = nextSibling(node);
|
|
4149
4243
|
}
|
|
4150
|
-
|
|
4151
|
-
vnode
|
|
4152
|
-
|
|
4153
|
-
|
|
4154
|
-
|
|
4155
|
-
|
|
4156
|
-
|
|
4157
|
-
|
|
4158
|
-
|
|
4244
|
+
if (vnode.type.__vapor) {
|
|
4245
|
+
getVaporInterface(parentComponent, vnode).hydrate(
|
|
4246
|
+
vnode,
|
|
4247
|
+
node,
|
|
4248
|
+
container,
|
|
4249
|
+
null,
|
|
4250
|
+
parentComponent
|
|
4251
|
+
);
|
|
4252
|
+
} else {
|
|
4253
|
+
mountComponent(
|
|
4254
|
+
vnode,
|
|
4255
|
+
container,
|
|
4256
|
+
null,
|
|
4257
|
+
parentComponent,
|
|
4258
|
+
parentSuspense,
|
|
4259
|
+
getContainerType(container),
|
|
4260
|
+
optimized
|
|
4261
|
+
);
|
|
4262
|
+
}
|
|
4159
4263
|
if (isAsyncWrapper(vnode) && !vnode.type.__asyncResolved) {
|
|
4160
4264
|
let subTree;
|
|
4161
4265
|
if (isFragmentStart) {
|
|
@@ -4240,7 +4344,7 @@ function createHydrationFunctions(rendererInternals) {
|
|
|
4240
4344
|
);
|
|
4241
4345
|
let hasWarned = false;
|
|
4242
4346
|
while (next) {
|
|
4243
|
-
if (!isMismatchAllowed(el, 1
|
|
4347
|
+
if (!isMismatchAllowed(el, 1)) {
|
|
4244
4348
|
if (!hasWarned) {
|
|
4245
4349
|
warn$1(
|
|
4246
4350
|
`Hydration children mismatch on`,
|
|
@@ -4261,14 +4365,16 @@ Server rendered element contains more child nodes than client vdom.`
|
|
|
4261
4365
|
if (clientText[0] === "\n" && (el.tagName === "PRE" || el.tagName === "TEXTAREA")) {
|
|
4262
4366
|
clientText = clientText.slice(1);
|
|
4263
4367
|
}
|
|
4264
|
-
|
|
4265
|
-
|
|
4368
|
+
const { textContent } = el;
|
|
4369
|
+
if (textContent !== clientText && // innerHTML normalize \r\n or \r into a single \n in the DOM
|
|
4370
|
+
textContent !== clientText.replace(/\r\n|\r/g, "\n")) {
|
|
4371
|
+
if (!isMismatchAllowed(el, 0)) {
|
|
4266
4372
|
warn$1(
|
|
4267
4373
|
`Hydration text content mismatch on`,
|
|
4268
4374
|
el,
|
|
4269
4375
|
`
|
|
4270
|
-
- rendered on server: ${
|
|
4271
|
-
- expected on client: ${
|
|
4376
|
+
- rendered on server: ${textContent}
|
|
4377
|
+
- expected on client: ${clientText}`
|
|
4272
4378
|
);
|
|
4273
4379
|
logMismatchError();
|
|
4274
4380
|
}
|
|
@@ -4344,7 +4450,7 @@ Server rendered element contains more child nodes than client vdom.`
|
|
|
4344
4450
|
} else if (isText && !vnode.children) {
|
|
4345
4451
|
insert(vnode.el = createText(""), container);
|
|
4346
4452
|
} else {
|
|
4347
|
-
if (!isMismatchAllowed(container, 1
|
|
4453
|
+
if (!isMismatchAllowed(container, 1)) {
|
|
4348
4454
|
if (!hasWarned) {
|
|
4349
4455
|
warn$1(
|
|
4350
4456
|
`Hydration children mismatch on`,
|
|
@@ -4394,7 +4500,7 @@ Server rendered element contains fewer child nodes than client vdom.`
|
|
|
4394
4500
|
}
|
|
4395
4501
|
};
|
|
4396
4502
|
const handleMismatch = (node, vnode, parentComponent, parentSuspense, slotScopeIds, isFragment) => {
|
|
4397
|
-
if (!isMismatchAllowed(node.parentElement, 1
|
|
4503
|
+
if (!isMismatchAllowed(node.parentElement, 1)) {
|
|
4398
4504
|
warn$1(
|
|
4399
4505
|
`Hydration node mismatch:
|
|
4400
4506
|
- rendered on server:`,
|
|
@@ -4467,11 +4573,11 @@ Server rendered element contains fewer child nodes than client vdom.`
|
|
|
4467
4573
|
parent = parent.parent;
|
|
4468
4574
|
}
|
|
4469
4575
|
};
|
|
4470
|
-
const isTemplateNode = (node) => {
|
|
4471
|
-
return node.nodeType === 1 && node.tagName === "TEMPLATE";
|
|
4472
|
-
};
|
|
4473
4576
|
return [hydrate, hydrateNode];
|
|
4474
4577
|
}
|
|
4578
|
+
const isTemplateNode = (node) => {
|
|
4579
|
+
return node.nodeType === 1 && node.tagName === "TEMPLATE";
|
|
4580
|
+
};
|
|
4475
4581
|
function propHasMismatch(el, key, clientValue, vnode, instance) {
|
|
4476
4582
|
let mismatchType;
|
|
4477
4583
|
let mismatchKey;
|
|
@@ -4486,7 +4592,7 @@ function propHasMismatch(el, key, clientValue, vnode, instance) {
|
|
|
4486
4592
|
}
|
|
4487
4593
|
expected = normalizeClass(clientValue);
|
|
4488
4594
|
if (!isSetEqual(toClassSet(actual || ""), toClassSet(expected))) {
|
|
4489
|
-
mismatchType = 2
|
|
4595
|
+
mismatchType = 2;
|
|
4490
4596
|
mismatchKey = `class`;
|
|
4491
4597
|
}
|
|
4492
4598
|
} else if (key === "style") {
|
|
@@ -4505,31 +4611,43 @@ function propHasMismatch(el, key, clientValue, vnode, instance) {
|
|
|
4505
4611
|
resolveCssVars(instance, vnode, expectedMap);
|
|
4506
4612
|
}
|
|
4507
4613
|
if (!isMapEqual(actualMap, expectedMap)) {
|
|
4508
|
-
mismatchType = 3
|
|
4614
|
+
mismatchType = 3;
|
|
4509
4615
|
mismatchKey = "style";
|
|
4510
4616
|
}
|
|
4511
|
-
} else if (
|
|
4512
|
-
|
|
4513
|
-
actual = el.hasAttribute(key);
|
|
4514
|
-
expected = includeBooleanAttr(clientValue);
|
|
4515
|
-
} else if (clientValue == null) {
|
|
4516
|
-
actual = el.hasAttribute(key);
|
|
4517
|
-
expected = false;
|
|
4518
|
-
} else {
|
|
4519
|
-
if (el.hasAttribute(key)) {
|
|
4520
|
-
actual = el.getAttribute(key);
|
|
4521
|
-
} else if (key === "value" && el.tagName === "TEXTAREA") {
|
|
4522
|
-
actual = el.value;
|
|
4523
|
-
} else {
|
|
4524
|
-
actual = false;
|
|
4525
|
-
}
|
|
4526
|
-
expected = isRenderableAttrValue(clientValue) ? String(clientValue) : false;
|
|
4527
|
-
}
|
|
4617
|
+
} else if (isValidHtmlOrSvgAttribute(el, key)) {
|
|
4618
|
+
({ actual, expected } = getAttributeMismatch(el, key, clientValue));
|
|
4528
4619
|
if (actual !== expected) {
|
|
4529
|
-
mismatchType = 4
|
|
4620
|
+
mismatchType = 4;
|
|
4530
4621
|
mismatchKey = key;
|
|
4531
4622
|
}
|
|
4532
4623
|
}
|
|
4624
|
+
return warnPropMismatch(el, mismatchKey, mismatchType, actual, expected);
|
|
4625
|
+
}
|
|
4626
|
+
function getAttributeMismatch(el, key, clientValue) {
|
|
4627
|
+
let actual;
|
|
4628
|
+
let expected;
|
|
4629
|
+
if (isBooleanAttr(key)) {
|
|
4630
|
+
actual = el.hasAttribute(key);
|
|
4631
|
+
expected = includeBooleanAttr(clientValue);
|
|
4632
|
+
} else if (clientValue == null) {
|
|
4633
|
+
actual = el.hasAttribute(key);
|
|
4634
|
+
expected = false;
|
|
4635
|
+
} else {
|
|
4636
|
+
if (el.hasAttribute(key)) {
|
|
4637
|
+
actual = el.getAttribute(key);
|
|
4638
|
+
} else if (key === "value" && el.tagName === "TEXTAREA") {
|
|
4639
|
+
actual = el.value;
|
|
4640
|
+
} else {
|
|
4641
|
+
actual = false;
|
|
4642
|
+
}
|
|
4643
|
+
expected = isRenderableAttrValue(clientValue) ? String(clientValue) : false;
|
|
4644
|
+
}
|
|
4645
|
+
return { actual, expected };
|
|
4646
|
+
}
|
|
4647
|
+
function isValidHtmlOrSvgAttribute(el, key) {
|
|
4648
|
+
return el instanceof SVGElement && isKnownSvgAttr(key) || el instanceof HTMLElement && (isBooleanAttr(key) || isKnownHtmlAttr(key));
|
|
4649
|
+
}
|
|
4650
|
+
function warnPropMismatch(el, mismatchKey, mismatchType, actual, expected) {
|
|
4533
4651
|
if (mismatchType != null && !isMismatchAllowed(el, mismatchType)) {
|
|
4534
4652
|
const format = (v) => v === false ? `(not rendered)` : `${mismatchKey}="${v}"`;
|
|
4535
4653
|
const preSegment = `Hydration ${MismatchTypeString[mismatchType]} mismatch on`;
|
|
@@ -4601,14 +4719,14 @@ function resolveCssVars(instance, vnode, expectedMap) {
|
|
|
4601
4719
|
}
|
|
4602
4720
|
const allowMismatchAttr = "data-allow-mismatch";
|
|
4603
4721
|
const MismatchTypeString = {
|
|
4604
|
-
[0
|
|
4605
|
-
[1
|
|
4606
|
-
[2
|
|
4607
|
-
[3
|
|
4608
|
-
[4
|
|
4722
|
+
[0]: "text",
|
|
4723
|
+
[1]: "children",
|
|
4724
|
+
[2]: "class",
|
|
4725
|
+
[3]: "style",
|
|
4726
|
+
[4]: "attribute"
|
|
4609
4727
|
};
|
|
4610
4728
|
function isMismatchAllowed(el, allowedType) {
|
|
4611
|
-
if (allowedType === 0
|
|
4729
|
+
if (allowedType === 0 || allowedType === 1) {
|
|
4612
4730
|
while (el && !el.hasAttribute(allowMismatchAttr)) {
|
|
4613
4731
|
el = el.parentElement;
|
|
4614
4732
|
}
|
|
@@ -4620,7 +4738,7 @@ function isMismatchAllowed(el, allowedType) {
|
|
|
4620
4738
|
return true;
|
|
4621
4739
|
} else {
|
|
4622
4740
|
const list = allowedAttr.split(",");
|
|
4623
|
-
if (allowedType === 0
|
|
4741
|
+
if (allowedType === 0 && list.includes("children")) {
|
|
4624
4742
|
return true;
|
|
4625
4743
|
}
|
|
4626
4744
|
return list.includes(MismatchTypeString[allowedType]);
|
|
@@ -4677,7 +4795,9 @@ const hydrateOnInteraction = (interactions = []) => (hydrate, forEach) => {
|
|
|
4677
4795
|
hasHydrated = true;
|
|
4678
4796
|
teardown();
|
|
4679
4797
|
hydrate();
|
|
4680
|
-
|
|
4798
|
+
if (!(`$evt${e.type}` in e.target)) {
|
|
4799
|
+
e.target.dispatchEvent(new e.constructor(e.type, e));
|
|
4800
|
+
}
|
|
4681
4801
|
}
|
|
4682
4802
|
};
|
|
4683
4803
|
const teardown = () => {
|
|
@@ -4719,104 +4839,46 @@ function forEachElement(node, cb) {
|
|
|
4719
4839
|
}
|
|
4720
4840
|
|
|
4721
4841
|
const isAsyncWrapper = (i) => !!i.type.__asyncLoader;
|
|
4722
|
-
/*! #__NO_SIDE_EFFECTS__ */
|
|
4723
4842
|
// @__NO_SIDE_EFFECTS__
|
|
4724
4843
|
function defineAsyncComponent(source) {
|
|
4725
|
-
if (isFunction(source)) {
|
|
4726
|
-
source = { loader: source };
|
|
4727
|
-
}
|
|
4728
4844
|
const {
|
|
4729
|
-
|
|
4730
|
-
|
|
4731
|
-
|
|
4732
|
-
|
|
4733
|
-
|
|
4734
|
-
|
|
4735
|
-
|
|
4736
|
-
|
|
4737
|
-
|
|
4738
|
-
|
|
4739
|
-
|
|
4740
|
-
|
|
4741
|
-
let retries = 0;
|
|
4742
|
-
const retry = () => {
|
|
4743
|
-
retries++;
|
|
4744
|
-
pendingRequest = null;
|
|
4745
|
-
return load();
|
|
4746
|
-
};
|
|
4747
|
-
const load = () => {
|
|
4748
|
-
let thisRequest;
|
|
4749
|
-
return pendingRequest || (thisRequest = pendingRequest = loader().catch((err) => {
|
|
4750
|
-
err = err instanceof Error ? err : new Error(String(err));
|
|
4751
|
-
if (userOnError) {
|
|
4752
|
-
return new Promise((resolve, reject) => {
|
|
4753
|
-
const userRetry = () => resolve(retry());
|
|
4754
|
-
const userFail = () => reject(err);
|
|
4755
|
-
userOnError(err, userRetry, userFail, retries + 1);
|
|
4756
|
-
});
|
|
4757
|
-
} else {
|
|
4758
|
-
throw err;
|
|
4759
|
-
}
|
|
4760
|
-
}).then((comp) => {
|
|
4761
|
-
if (thisRequest !== pendingRequest && pendingRequest) {
|
|
4762
|
-
return pendingRequest;
|
|
4763
|
-
}
|
|
4764
|
-
if (!comp) {
|
|
4765
|
-
warn$1(
|
|
4766
|
-
`Async component loader resolved to undefined. If you are using retry(), make sure to return its return value.`
|
|
4767
|
-
);
|
|
4768
|
-
}
|
|
4769
|
-
if (comp && (comp.__esModule || comp[Symbol.toStringTag] === "Module")) {
|
|
4770
|
-
comp = comp.default;
|
|
4771
|
-
}
|
|
4772
|
-
if (comp && !isObject(comp) && !isFunction(comp)) {
|
|
4773
|
-
throw new Error(`Invalid async component load result: ${comp}`);
|
|
4774
|
-
}
|
|
4775
|
-
resolvedComp = comp;
|
|
4776
|
-
return comp;
|
|
4777
|
-
}));
|
|
4778
|
-
};
|
|
4845
|
+
load,
|
|
4846
|
+
getResolvedComp,
|
|
4847
|
+
setPendingRequest,
|
|
4848
|
+
source: {
|
|
4849
|
+
loadingComponent,
|
|
4850
|
+
errorComponent,
|
|
4851
|
+
delay,
|
|
4852
|
+
hydrate: hydrateStrategy,
|
|
4853
|
+
timeout,
|
|
4854
|
+
suspensible = true
|
|
4855
|
+
}
|
|
4856
|
+
} = createAsyncComponentContext(source);
|
|
4779
4857
|
return defineComponent({
|
|
4780
4858
|
name: "AsyncComponentWrapper",
|
|
4781
4859
|
__asyncLoader: load,
|
|
4782
4860
|
__asyncHydrate(el, instance, hydrate) {
|
|
4783
|
-
|
|
4784
|
-
|
|
4785
|
-
|
|
4786
|
-
|
|
4787
|
-
|
|
4788
|
-
|
|
4789
|
-
|
|
4790
|
-
|
|
4791
|
-
}
|
|
4792
|
-
hydrate();
|
|
4793
|
-
};
|
|
4794
|
-
const teardown = hydrateStrategy(
|
|
4795
|
-
performHydrate,
|
|
4796
|
-
(cb) => forEachElement(el, cb)
|
|
4797
|
-
);
|
|
4798
|
-
if (teardown) {
|
|
4799
|
-
(instance.bum || (instance.bum = [])).push(teardown);
|
|
4800
|
-
}
|
|
4801
|
-
(instance.u || (instance.u = [])).push(() => patched = true);
|
|
4802
|
-
} : hydrate;
|
|
4803
|
-
if (resolvedComp) {
|
|
4804
|
-
doHydrate();
|
|
4805
|
-
} else {
|
|
4806
|
-
load().then(() => !instance.isUnmounted && doHydrate());
|
|
4807
|
-
}
|
|
4861
|
+
performAsyncHydrate(
|
|
4862
|
+
el,
|
|
4863
|
+
instance,
|
|
4864
|
+
hydrate,
|
|
4865
|
+
getResolvedComp,
|
|
4866
|
+
load,
|
|
4867
|
+
hydrateStrategy
|
|
4868
|
+
);
|
|
4808
4869
|
},
|
|
4809
4870
|
get __asyncResolved() {
|
|
4810
|
-
return
|
|
4871
|
+
return getResolvedComp();
|
|
4811
4872
|
},
|
|
4812
4873
|
setup() {
|
|
4813
4874
|
const instance = currentInstance;
|
|
4814
4875
|
markAsyncBoundary(instance);
|
|
4876
|
+
let resolvedComp = getResolvedComp();
|
|
4815
4877
|
if (resolvedComp) {
|
|
4816
4878
|
return () => createInnerComp(resolvedComp, instance);
|
|
4817
4879
|
}
|
|
4818
4880
|
const onError = (err) => {
|
|
4819
|
-
|
|
4881
|
+
setPendingRequest(null);
|
|
4820
4882
|
handleError(
|
|
4821
4883
|
err,
|
|
4822
4884
|
instance,
|
|
@@ -4834,25 +4896,11 @@ function defineAsyncComponent(source) {
|
|
|
4834
4896
|
}) : null;
|
|
4835
4897
|
});
|
|
4836
4898
|
}
|
|
4837
|
-
const loaded =
|
|
4838
|
-
|
|
4839
|
-
|
|
4840
|
-
|
|
4841
|
-
|
|
4842
|
-
delayed.value = false;
|
|
4843
|
-
}, delay);
|
|
4844
|
-
}
|
|
4845
|
-
if (timeout != null) {
|
|
4846
|
-
setTimeout(() => {
|
|
4847
|
-
if (!loaded.value && !error.value) {
|
|
4848
|
-
const err = new Error(
|
|
4849
|
-
`Async component timed out after ${timeout}ms.`
|
|
4850
|
-
);
|
|
4851
|
-
onError(err);
|
|
4852
|
-
error.value = err;
|
|
4853
|
-
}
|
|
4854
|
-
}, timeout);
|
|
4855
|
-
}
|
|
4899
|
+
const { loaded, error, delayed } = useAsyncComponentState(
|
|
4900
|
+
delay,
|
|
4901
|
+
timeout,
|
|
4902
|
+
onError
|
|
4903
|
+
);
|
|
4856
4904
|
load().then(() => {
|
|
4857
4905
|
loaded.value = true;
|
|
4858
4906
|
if (instance.parent && instance.parent.vnode && isKeepAlive(instance.parent.vnode)) {
|
|
@@ -4863,6 +4911,7 @@ function defineAsyncComponent(source) {
|
|
|
4863
4911
|
error.value = err;
|
|
4864
4912
|
});
|
|
4865
4913
|
return () => {
|
|
4914
|
+
resolvedComp = getResolvedComp();
|
|
4866
4915
|
if (loaded.value && resolvedComp) {
|
|
4867
4916
|
return createInnerComp(resolvedComp, instance);
|
|
4868
4917
|
} else if (error.value && errorComponent) {
|
|
@@ -4870,7 +4919,10 @@ function defineAsyncComponent(source) {
|
|
|
4870
4919
|
error: error.value
|
|
4871
4920
|
});
|
|
4872
4921
|
} else if (loadingComponent && !delayed.value) {
|
|
4873
|
-
return
|
|
4922
|
+
return createInnerComp(
|
|
4923
|
+
loadingComponent,
|
|
4924
|
+
instance
|
|
4925
|
+
);
|
|
4874
4926
|
}
|
|
4875
4927
|
};
|
|
4876
4928
|
}
|
|
@@ -4884,6 +4936,108 @@ function createInnerComp(comp, parent) {
|
|
|
4884
4936
|
delete parent.vnode.ce;
|
|
4885
4937
|
return vnode;
|
|
4886
4938
|
}
|
|
4939
|
+
function createAsyncComponentContext(source) {
|
|
4940
|
+
if (isFunction(source)) {
|
|
4941
|
+
source = { loader: source };
|
|
4942
|
+
}
|
|
4943
|
+
const { loader, onError: userOnError } = source;
|
|
4944
|
+
let pendingRequest = null;
|
|
4945
|
+
let resolvedComp;
|
|
4946
|
+
let retries = 0;
|
|
4947
|
+
const retry = () => {
|
|
4948
|
+
retries++;
|
|
4949
|
+
pendingRequest = null;
|
|
4950
|
+
return load();
|
|
4951
|
+
};
|
|
4952
|
+
const load = () => {
|
|
4953
|
+
let thisRequest;
|
|
4954
|
+
return pendingRequest || (thisRequest = pendingRequest = loader().catch((err) => {
|
|
4955
|
+
err = err instanceof Error ? err : new Error(String(err));
|
|
4956
|
+
if (userOnError) {
|
|
4957
|
+
return new Promise((resolve, reject) => {
|
|
4958
|
+
const userRetry = () => resolve(retry());
|
|
4959
|
+
const userFail = () => reject(err);
|
|
4960
|
+
userOnError(err, userRetry, userFail, retries + 1);
|
|
4961
|
+
});
|
|
4962
|
+
} else {
|
|
4963
|
+
throw err;
|
|
4964
|
+
}
|
|
4965
|
+
}).then((comp) => {
|
|
4966
|
+
if (thisRequest !== pendingRequest && pendingRequest) {
|
|
4967
|
+
return pendingRequest;
|
|
4968
|
+
}
|
|
4969
|
+
if (!comp) {
|
|
4970
|
+
warn$1(
|
|
4971
|
+
`Async component loader resolved to undefined. If you are using retry(), make sure to return its return value.`
|
|
4972
|
+
);
|
|
4973
|
+
}
|
|
4974
|
+
if (comp && (comp.__esModule || comp[Symbol.toStringTag] === "Module")) {
|
|
4975
|
+
comp = comp.default;
|
|
4976
|
+
}
|
|
4977
|
+
if (comp && !isObject(comp) && !isFunction(comp)) {
|
|
4978
|
+
throw new Error(`Invalid async component load result: ${comp}`);
|
|
4979
|
+
}
|
|
4980
|
+
resolvedComp = comp;
|
|
4981
|
+
return comp;
|
|
4982
|
+
}));
|
|
4983
|
+
};
|
|
4984
|
+
return {
|
|
4985
|
+
load,
|
|
4986
|
+
source,
|
|
4987
|
+
getResolvedComp: () => resolvedComp,
|
|
4988
|
+
setPendingRequest: (request) => pendingRequest = request
|
|
4989
|
+
};
|
|
4990
|
+
}
|
|
4991
|
+
const useAsyncComponentState = (delay, timeout, onError) => {
|
|
4992
|
+
const loaded = ref(false);
|
|
4993
|
+
const error = ref();
|
|
4994
|
+
const delayed = ref(!!delay);
|
|
4995
|
+
if (delay) {
|
|
4996
|
+
setTimeout(() => {
|
|
4997
|
+
delayed.value = false;
|
|
4998
|
+
}, delay);
|
|
4999
|
+
}
|
|
5000
|
+
if (timeout != null) {
|
|
5001
|
+
setTimeout(() => {
|
|
5002
|
+
if (!loaded.value && !error.value) {
|
|
5003
|
+
const err = new Error(`Async component timed out after ${timeout}ms.`);
|
|
5004
|
+
onError(err);
|
|
5005
|
+
error.value = err;
|
|
5006
|
+
}
|
|
5007
|
+
}, timeout);
|
|
5008
|
+
}
|
|
5009
|
+
return { loaded, error, delayed };
|
|
5010
|
+
};
|
|
5011
|
+
function performAsyncHydrate(el, instance, hydrate, getResolvedComp, load, hydrateStrategy) {
|
|
5012
|
+
let patched = false;
|
|
5013
|
+
(instance.bu || (instance.bu = [])).push(() => patched = true);
|
|
5014
|
+
const performHydrate = () => {
|
|
5015
|
+
if (patched) {
|
|
5016
|
+
{
|
|
5017
|
+
const resolvedComp = getResolvedComp();
|
|
5018
|
+
warn$1(
|
|
5019
|
+
`Skipping lazy hydration for component '${getComponentName(resolvedComp) || resolvedComp.__file}': it was updated before lazy hydration performed.`
|
|
5020
|
+
);
|
|
5021
|
+
}
|
|
5022
|
+
return;
|
|
5023
|
+
}
|
|
5024
|
+
hydrate();
|
|
5025
|
+
};
|
|
5026
|
+
const doHydrate = hydrateStrategy ? () => {
|
|
5027
|
+
const teardown = hydrateStrategy(
|
|
5028
|
+
performHydrate,
|
|
5029
|
+
(cb) => forEachElement(el, cb)
|
|
5030
|
+
);
|
|
5031
|
+
if (teardown) {
|
|
5032
|
+
(instance.bum || (instance.bum = [])).push(teardown);
|
|
5033
|
+
}
|
|
5034
|
+
} : performHydrate;
|
|
5035
|
+
if (getResolvedComp()) {
|
|
5036
|
+
doHydrate();
|
|
5037
|
+
} else {
|
|
5038
|
+
load().then(() => !instance.isUnmounted && doHydrate());
|
|
5039
|
+
}
|
|
5040
|
+
}
|
|
4887
5041
|
|
|
4888
5042
|
const isKeepAlive = (vnode) => vnode.type.__isKeepAlive;
|
|
4889
5043
|
const KeepAliveImpl = {
|
|
@@ -4913,86 +5067,37 @@ const KeepAliveImpl = {
|
|
|
4913
5067
|
keepAliveInstance.__v_cache = cache;
|
|
4914
5068
|
}
|
|
4915
5069
|
const parentSuspense = keepAliveInstance.suspense;
|
|
5070
|
+
const { renderer } = sharedContext;
|
|
4916
5071
|
const {
|
|
4917
|
-
|
|
4918
|
-
|
|
4919
|
-
|
|
4920
|
-
um: _unmount,
|
|
4921
|
-
o: { createElement }
|
|
4922
|
-
}
|
|
4923
|
-
} = sharedContext;
|
|
5072
|
+
um: _unmount,
|
|
5073
|
+
o: { createElement }
|
|
5074
|
+
} = renderer;
|
|
4924
5075
|
const storageContainer = createElement("div");
|
|
5076
|
+
sharedContext.getStorageContainer = () => storageContainer;
|
|
5077
|
+
sharedContext.getCachedComponent = (vnode) => {
|
|
5078
|
+
const key = vnode.key == null ? vnode.type : vnode.key;
|
|
5079
|
+
return cache.get(key);
|
|
5080
|
+
};
|
|
4925
5081
|
sharedContext.activate = (vnode, container, anchor, namespace, optimized) => {
|
|
4926
|
-
|
|
4927
|
-
move(
|
|
5082
|
+
activate(
|
|
4928
5083
|
vnode,
|
|
4929
5084
|
container,
|
|
4930
5085
|
anchor,
|
|
4931
|
-
|
|
5086
|
+
renderer,
|
|
4932
5087
|
keepAliveInstance,
|
|
4933
|
-
parentSuspense
|
|
4934
|
-
);
|
|
4935
|
-
patch(
|
|
4936
|
-
instance.vnode,
|
|
4937
|
-
vnode,
|
|
4938
|
-
container,
|
|
4939
|
-
anchor,
|
|
4940
|
-
instance,
|
|
4941
5088
|
parentSuspense,
|
|
4942
5089
|
namespace,
|
|
4943
|
-
vnode.slotScopeIds,
|
|
4944
5090
|
optimized
|
|
4945
5091
|
);
|
|
4946
|
-
queuePostRenderEffect(
|
|
4947
|
-
() => {
|
|
4948
|
-
instance.isDeactivated = false;
|
|
4949
|
-
if (instance.a) {
|
|
4950
|
-
invokeArrayFns(instance.a);
|
|
4951
|
-
}
|
|
4952
|
-
const vnodeHook = vnode.props && vnode.props.onVnodeMounted;
|
|
4953
|
-
if (vnodeHook) {
|
|
4954
|
-
invokeVNodeHook(vnodeHook, instance.parent, vnode);
|
|
4955
|
-
}
|
|
4956
|
-
},
|
|
4957
|
-
void 0,
|
|
4958
|
-
parentSuspense
|
|
4959
|
-
);
|
|
4960
|
-
{
|
|
4961
|
-
devtoolsComponentAdded(instance);
|
|
4962
|
-
}
|
|
4963
5092
|
};
|
|
4964
5093
|
sharedContext.deactivate = (vnode) => {
|
|
4965
|
-
|
|
4966
|
-
invalidateMount(instance.m);
|
|
4967
|
-
invalidateMount(instance.a);
|
|
4968
|
-
move(
|
|
5094
|
+
deactivate(
|
|
4969
5095
|
vnode,
|
|
4970
5096
|
storageContainer,
|
|
4971
|
-
|
|
4972
|
-
1,
|
|
5097
|
+
renderer,
|
|
4973
5098
|
keepAliveInstance,
|
|
4974
5099
|
parentSuspense
|
|
4975
5100
|
);
|
|
4976
|
-
queuePostRenderEffect(
|
|
4977
|
-
() => {
|
|
4978
|
-
if (instance.da) {
|
|
4979
|
-
invokeArrayFns(instance.da);
|
|
4980
|
-
}
|
|
4981
|
-
const vnodeHook = vnode.props && vnode.props.onVnodeUnmounted;
|
|
4982
|
-
if (vnodeHook) {
|
|
4983
|
-
invokeVNodeHook(vnodeHook, instance.parent, vnode);
|
|
4984
|
-
}
|
|
4985
|
-
instance.isDeactivated = true;
|
|
4986
|
-
},
|
|
4987
|
-
void 0,
|
|
4988
|
-
parentSuspense
|
|
4989
|
-
);
|
|
4990
|
-
{
|
|
4991
|
-
devtoolsComponentAdded(instance);
|
|
4992
|
-
}
|
|
4993
|
-
{
|
|
4994
|
-
instance.__keepAliveStorageContainer = storageContainer;
|
|
4995
|
-
}
|
|
4996
5101
|
};
|
|
4997
5102
|
function unmount(vnode) {
|
|
4998
5103
|
resetShapeFlag(vnode);
|
|
@@ -5139,7 +5244,7 @@ function onActivated(hook, target) {
|
|
|
5139
5244
|
function onDeactivated(hook, target) {
|
|
5140
5245
|
registerKeepAliveHook(hook, "da", target);
|
|
5141
5246
|
}
|
|
5142
|
-
function registerKeepAliveHook(hook, type, target =
|
|
5247
|
+
function registerKeepAliveHook(hook, type, target = getCurrentGenericInstance()) {
|
|
5143
5248
|
const wrappedHook = hook.__wdc || (hook.__wdc = () => {
|
|
5144
5249
|
let current = target;
|
|
5145
5250
|
while (current) {
|
|
@@ -5153,8 +5258,9 @@ function registerKeepAliveHook(hook, type, target = getCurrentInstance()) {
|
|
|
5153
5258
|
injectHook(type, wrappedHook, target);
|
|
5154
5259
|
if (target) {
|
|
5155
5260
|
let current = target.parent;
|
|
5156
|
-
while (current && current.parent
|
|
5157
|
-
|
|
5261
|
+
while (current && current.parent) {
|
|
5262
|
+
let parent = current.parent;
|
|
5263
|
+
if (isKeepAlive(parent.vapor ? parent : parent.vnode)) {
|
|
5158
5264
|
injectToKeepAliveRoot(wrappedHook, type, target, current);
|
|
5159
5265
|
}
|
|
5160
5266
|
current = current.parent;
|
|
@@ -5180,6 +5286,71 @@ function resetShapeFlag(vnode) {
|
|
|
5180
5286
|
function getInnerChild(vnode) {
|
|
5181
5287
|
return vnode.shapeFlag & 128 ? vnode.ssContent : vnode;
|
|
5182
5288
|
}
|
|
5289
|
+
function activate(vnode, container, anchor, { p: patch, m: move }, parentComponent, parentSuspense, namespace, optimized) {
|
|
5290
|
+
const instance = vnode.component;
|
|
5291
|
+
move(
|
|
5292
|
+
vnode,
|
|
5293
|
+
container,
|
|
5294
|
+
anchor,
|
|
5295
|
+
0,
|
|
5296
|
+
parentComponent,
|
|
5297
|
+
parentSuspense
|
|
5298
|
+
);
|
|
5299
|
+
patch(
|
|
5300
|
+
instance.vnode,
|
|
5301
|
+
vnode,
|
|
5302
|
+
container,
|
|
5303
|
+
anchor,
|
|
5304
|
+
instance,
|
|
5305
|
+
parentSuspense,
|
|
5306
|
+
namespace,
|
|
5307
|
+
vnode.slotScopeIds,
|
|
5308
|
+
optimized
|
|
5309
|
+
);
|
|
5310
|
+
queuePostRenderEffect(
|
|
5311
|
+
() => {
|
|
5312
|
+
instance.isDeactivated = false;
|
|
5313
|
+
if (instance.a) {
|
|
5314
|
+
invokeArrayFns(instance.a);
|
|
5315
|
+
}
|
|
5316
|
+
const vnodeHook = vnode.props && vnode.props.onVnodeMounted;
|
|
5317
|
+
if (vnodeHook) {
|
|
5318
|
+
invokeVNodeHook(vnodeHook, instance.parent, vnode);
|
|
5319
|
+
}
|
|
5320
|
+
},
|
|
5321
|
+
void 0,
|
|
5322
|
+
parentSuspense
|
|
5323
|
+
);
|
|
5324
|
+
{
|
|
5325
|
+
devtoolsComponentAdded(instance);
|
|
5326
|
+
}
|
|
5327
|
+
}
|
|
5328
|
+
function deactivate(vnode, container, { m: move }, parentComponent, parentSuspense) {
|
|
5329
|
+
const instance = vnode.component;
|
|
5330
|
+
invalidateMount(instance.m);
|
|
5331
|
+
invalidateMount(instance.a);
|
|
5332
|
+
move(vnode, container, null, 1, parentComponent, parentSuspense);
|
|
5333
|
+
queuePostRenderEffect(
|
|
5334
|
+
() => {
|
|
5335
|
+
if (instance.da) {
|
|
5336
|
+
invokeArrayFns(instance.da);
|
|
5337
|
+
}
|
|
5338
|
+
const vnodeHook = vnode.props && vnode.props.onVnodeUnmounted;
|
|
5339
|
+
if (vnodeHook) {
|
|
5340
|
+
invokeVNodeHook(vnodeHook, instance.parent, vnode);
|
|
5341
|
+
}
|
|
5342
|
+
instance.isDeactivated = true;
|
|
5343
|
+
},
|
|
5344
|
+
void 0,
|
|
5345
|
+
parentSuspense
|
|
5346
|
+
);
|
|
5347
|
+
{
|
|
5348
|
+
devtoolsComponentAdded(instance);
|
|
5349
|
+
}
|
|
5350
|
+
{
|
|
5351
|
+
instance.__keepAliveStorageContainer = container;
|
|
5352
|
+
}
|
|
5353
|
+
}
|
|
5183
5354
|
|
|
5184
5355
|
function injectHook(type, hook, target = currentInstance, prepend = false) {
|
|
5185
5356
|
if (target) {
|
|
@@ -5368,12 +5539,13 @@ function renderSlot(slots, name, props = {}, fallback, noSlotted) {
|
|
|
5368
5539
|
return ret;
|
|
5369
5540
|
}
|
|
5370
5541
|
if (currentRenderingInstance && (currentRenderingInstance.ce || currentRenderingInstance.parent && isAsyncWrapper(currentRenderingInstance.parent) && currentRenderingInstance.parent.ce)) {
|
|
5542
|
+
const hasProps = Object.keys(props).length > 0;
|
|
5371
5543
|
if (name !== "default") props.name = name;
|
|
5372
5544
|
return openBlock(), createBlock(
|
|
5373
5545
|
Fragment,
|
|
5374
5546
|
null,
|
|
5375
5547
|
[createVNode("slot", props, fallback && fallback())],
|
|
5376
|
-
64
|
|
5548
|
+
hasProps ? -2 : 64
|
|
5377
5549
|
);
|
|
5378
5550
|
}
|
|
5379
5551
|
if (slot && slot.length > 1) {
|
|
@@ -5387,6 +5559,7 @@ function renderSlot(slots, name, props = {}, fallback, noSlotted) {
|
|
|
5387
5559
|
}
|
|
5388
5560
|
openBlock();
|
|
5389
5561
|
const validSlotContent = slot && ensureValidVNode(slot(props));
|
|
5562
|
+
ensureVaporSlotFallback(validSlotContent, fallback);
|
|
5390
5563
|
const slotKey = props.key || // slot content array of a dynamic conditional slot may have a branch
|
|
5391
5564
|
// key attached in the `createSlots` helper, respect that
|
|
5392
5565
|
validSlotContent && validSlotContent.key;
|
|
@@ -5416,6 +5589,14 @@ function ensureValidVNode(vnodes) {
|
|
|
5416
5589
|
return true;
|
|
5417
5590
|
}) ? vnodes : null;
|
|
5418
5591
|
}
|
|
5592
|
+
function ensureVaporSlotFallback(vnodes, fallback) {
|
|
5593
|
+
let vaporSlot;
|
|
5594
|
+
if (vnodes && vnodes.length === 1 && isVNode(vnodes[0]) && (vaporSlot = vnodes[0].vs)) {
|
|
5595
|
+
if (!vaporSlot.fallback && fallback) {
|
|
5596
|
+
vaporSlot.fallback = fallback;
|
|
5597
|
+
}
|
|
5598
|
+
}
|
|
5599
|
+
}
|
|
5419
5600
|
|
|
5420
5601
|
function toHandlers(obj, preserveCaseIfNecessary) {
|
|
5421
5602
|
const ret = {};
|
|
@@ -5578,10 +5759,10 @@ const PublicInstanceProxyHandlers = {
|
|
|
5578
5759
|
return true;
|
|
5579
5760
|
},
|
|
5580
5761
|
has({
|
|
5581
|
-
_: { data, setupState, accessCache, ctx, appContext, propsOptions }
|
|
5762
|
+
_: { data, setupState, accessCache, ctx, appContext, propsOptions, type }
|
|
5582
5763
|
}, key) {
|
|
5583
|
-
let normalizedProps;
|
|
5584
|
-
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);
|
|
5764
|
+
let normalizedProps, cssModules;
|
|
5765
|
+
return !!(accessCache[key] || 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]);
|
|
5585
5766
|
},
|
|
5586
5767
|
defineProperty(target, key, descriptor) {
|
|
5587
5768
|
if (descriptor.get != null) {
|
|
@@ -5719,15 +5900,15 @@ function withDefaults(props, defaults) {
|
|
|
5719
5900
|
return null;
|
|
5720
5901
|
}
|
|
5721
5902
|
function useSlots() {
|
|
5722
|
-
return getContext().slots;
|
|
5903
|
+
return getContext("useSlots").slots;
|
|
5723
5904
|
}
|
|
5724
5905
|
function useAttrs() {
|
|
5725
|
-
return getContext().attrs;
|
|
5906
|
+
return getContext("useAttrs").attrs;
|
|
5726
5907
|
}
|
|
5727
|
-
function getContext() {
|
|
5908
|
+
function getContext(calledFunctionName) {
|
|
5728
5909
|
const i = getCurrentGenericInstance();
|
|
5729
5910
|
if (!i) {
|
|
5730
|
-
warn$1(
|
|
5911
|
+
warn$1(`${calledFunctionName}() called without active instance.`);
|
|
5731
5912
|
}
|
|
5732
5913
|
if (i.vapor) {
|
|
5733
5914
|
return i;
|
|
@@ -5983,7 +6164,8 @@ function applyOptions(instance) {
|
|
|
5983
6164
|
expose.forEach((key) => {
|
|
5984
6165
|
Object.defineProperty(exposed, key, {
|
|
5985
6166
|
get: () => publicThis[key],
|
|
5986
|
-
set: (val) => publicThis[key] = val
|
|
6167
|
+
set: (val) => publicThis[key] = val,
|
|
6168
|
+
enumerable: true
|
|
5987
6169
|
});
|
|
5988
6170
|
});
|
|
5989
6171
|
} else if (!instance.exposed) {
|
|
@@ -6856,7 +7038,7 @@ function isBoolean(...args) {
|
|
|
6856
7038
|
return args.some((elem) => elem.toLowerCase() === "boolean");
|
|
6857
7039
|
}
|
|
6858
7040
|
|
|
6859
|
-
const isInternalKey = (key) => key
|
|
7041
|
+
const isInternalKey = (key) => key === "_" || key === "_ctx" || key === "$stable";
|
|
6860
7042
|
const normalizeSlotValue = (value) => isArray(value) ? value.map(normalizeVNode) : [normalizeVNode(value)];
|
|
6861
7043
|
const normalizeSlot = (key, rawSlot, ctx) => {
|
|
6862
7044
|
if (rawSlot._n) {
|
|
@@ -6910,8 +7092,6 @@ const assignSlots = (slots, children, optimized) => {
|
|
|
6910
7092
|
const initSlots = (instance, children, optimized) => {
|
|
6911
7093
|
const slots = instance.slots = createInternalObject();
|
|
6912
7094
|
if (instance.vnode.shapeFlag & 32) {
|
|
6913
|
-
const cacheIndexes = children.__;
|
|
6914
|
-
if (cacheIndexes) def(slots, "__", cacheIndexes, true);
|
|
6915
7095
|
const type = children._;
|
|
6916
7096
|
if (type) {
|
|
6917
7097
|
assignSlots(slots, children, optimized);
|
|
@@ -6975,12 +7155,10 @@ function endMeasure(instance, type) {
|
|
|
6975
7155
|
if (instance.appContext.config.performance && isSupported()) {
|
|
6976
7156
|
const startTag = `vue-${type}-${instance.uid}`;
|
|
6977
7157
|
const endTag = startTag + `:end`;
|
|
7158
|
+
const measureName = `<${formatComponentName(instance, instance.type)}> ${type}`;
|
|
6978
7159
|
perf.mark(endTag);
|
|
6979
|
-
perf.measure(
|
|
6980
|
-
|
|
6981
|
-
startTag,
|
|
6982
|
-
endTag
|
|
6983
|
-
);
|
|
7160
|
+
perf.measure(measureName, startTag, endTag);
|
|
7161
|
+
perf.clearMeasures(measureName);
|
|
6984
7162
|
perf.clearMarks(startTag);
|
|
6985
7163
|
perf.clearMarks(endTag);
|
|
6986
7164
|
}
|
|
@@ -7219,15 +7397,25 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
7219
7397
|
optimized
|
|
7220
7398
|
);
|
|
7221
7399
|
} else {
|
|
7222
|
-
|
|
7223
|
-
|
|
7224
|
-
|
|
7225
|
-
|
|
7226
|
-
|
|
7227
|
-
|
|
7228
|
-
|
|
7229
|
-
|
|
7230
|
-
|
|
7400
|
+
const customElement = !!(n1.el && n1.el._isVueCE) ? n1.el : null;
|
|
7401
|
+
try {
|
|
7402
|
+
if (customElement) {
|
|
7403
|
+
customElement._beginPatch();
|
|
7404
|
+
}
|
|
7405
|
+
patchElement(
|
|
7406
|
+
n1,
|
|
7407
|
+
n2,
|
|
7408
|
+
parentComponent,
|
|
7409
|
+
parentSuspense,
|
|
7410
|
+
namespace,
|
|
7411
|
+
slotScopeIds,
|
|
7412
|
+
optimized
|
|
7413
|
+
);
|
|
7414
|
+
} finally {
|
|
7415
|
+
if (customElement) {
|
|
7416
|
+
customElement._endPatch();
|
|
7417
|
+
}
|
|
7418
|
+
}
|
|
7231
7419
|
}
|
|
7232
7420
|
};
|
|
7233
7421
|
const mountElement = (vnode, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => {
|
|
@@ -7278,16 +7466,20 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
7278
7466
|
if (dirs) {
|
|
7279
7467
|
invokeDirectiveHook(vnode, null, parentComponent, "beforeMount");
|
|
7280
7468
|
}
|
|
7281
|
-
|
|
7282
|
-
|
|
7283
|
-
|
|
7469
|
+
if (transition) {
|
|
7470
|
+
performTransitionEnter(
|
|
7471
|
+
el,
|
|
7472
|
+
transition,
|
|
7473
|
+
() => hostInsert(el, container, anchor),
|
|
7474
|
+
parentSuspense
|
|
7475
|
+
);
|
|
7476
|
+
} else {
|
|
7477
|
+
hostInsert(el, container, anchor);
|
|
7284
7478
|
}
|
|
7285
|
-
|
|
7286
|
-
if ((vnodeHook = props && props.onVnodeMounted) || needCallTransitionHooks || dirs) {
|
|
7479
|
+
if ((vnodeHook = props && props.onVnodeMounted) || dirs) {
|
|
7287
7480
|
queuePostRenderEffect(
|
|
7288
7481
|
() => {
|
|
7289
7482
|
vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, vnode);
|
|
7290
|
-
needCallTransitionHooks && transition.enter(el);
|
|
7291
7483
|
dirs && invokeDirectiveHook(vnode, null, parentComponent, "mounted");
|
|
7292
7484
|
},
|
|
7293
7485
|
void 0,
|
|
@@ -7304,21 +7496,9 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
7304
7496
|
hostSetScopeId(el, slotScopeIds[i]);
|
|
7305
7497
|
}
|
|
7306
7498
|
}
|
|
7307
|
-
|
|
7308
|
-
|
|
7309
|
-
|
|
7310
|
-
subTree = filterSingleRoot(subTree.children) || subTree;
|
|
7311
|
-
}
|
|
7312
|
-
if (vnode === subTree || isSuspense(subTree.type) && (subTree.ssContent === vnode || subTree.ssFallback === vnode)) {
|
|
7313
|
-
const parentVNode = parentComponent.vnode;
|
|
7314
|
-
setScopeId(
|
|
7315
|
-
el,
|
|
7316
|
-
parentVNode,
|
|
7317
|
-
parentVNode.scopeId,
|
|
7318
|
-
parentVNode.slotScopeIds,
|
|
7319
|
-
parentComponent.parent
|
|
7320
|
-
);
|
|
7321
|
-
}
|
|
7499
|
+
const inheritedScopeIds = getInheritedScopeIds(vnode, parentComponent);
|
|
7500
|
+
for (let i = 0; i < inheritedScopeIds.length; i++) {
|
|
7501
|
+
hostSetScopeId(el, inheritedScopeIds[i]);
|
|
7322
7502
|
}
|
|
7323
7503
|
};
|
|
7324
7504
|
const mountChildren = (children, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, start = 0) => {
|
|
@@ -7559,12 +7739,21 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
7559
7739
|
n2.slotScopeIds = slotScopeIds;
|
|
7560
7740
|
if (n2.type.__vapor) {
|
|
7561
7741
|
if (n1 == null) {
|
|
7562
|
-
|
|
7563
|
-
n2
|
|
7564
|
-
|
|
7565
|
-
|
|
7566
|
-
|
|
7567
|
-
|
|
7742
|
+
if (n2.shapeFlag & 512) {
|
|
7743
|
+
getVaporInterface(parentComponent, n2).activate(
|
|
7744
|
+
n2,
|
|
7745
|
+
container,
|
|
7746
|
+
anchor,
|
|
7747
|
+
parentComponent
|
|
7748
|
+
);
|
|
7749
|
+
} else {
|
|
7750
|
+
getVaporInterface(parentComponent, n2).mount(
|
|
7751
|
+
n2,
|
|
7752
|
+
container,
|
|
7753
|
+
anchor,
|
|
7754
|
+
parentComponent
|
|
7755
|
+
);
|
|
7756
|
+
}
|
|
7568
7757
|
} else {
|
|
7569
7758
|
getVaporInterface(parentComponent, n2).update(
|
|
7570
7759
|
n1,
|
|
@@ -7627,6 +7816,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
7627
7816
|
if (!initialVNode.el) {
|
|
7628
7817
|
const placeholder = instance.subTree = createVNode(Comment);
|
|
7629
7818
|
processCommentNode(null, placeholder, container, anchor);
|
|
7819
|
+
initialVNode.placeholder = placeholder.el;
|
|
7630
7820
|
}
|
|
7631
7821
|
} else {
|
|
7632
7822
|
setupRenderEffect(
|
|
@@ -8167,7 +8357,11 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
8167
8357
|
for (i = toBePatched - 1; i >= 0; i--) {
|
|
8168
8358
|
const nextIndex = s2 + i;
|
|
8169
8359
|
const nextChild = c2[nextIndex];
|
|
8170
|
-
const
|
|
8360
|
+
const anchorVNode = c2[nextIndex + 1];
|
|
8361
|
+
const anchor = nextIndex + 1 < l2 ? (
|
|
8362
|
+
// #13559, fallback to el placeholder for unresolved async component
|
|
8363
|
+
anchorVNode.el || anchorVNode.placeholder
|
|
8364
|
+
) : parentAnchor;
|
|
8171
8365
|
if (newIndexToOldIndexMap[i] === 0) {
|
|
8172
8366
|
patch(
|
|
8173
8367
|
null,
|
|
@@ -8247,12 +8441,12 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
8247
8441
|
const needTransition2 = moveType !== 2 && shapeFlag & 1 && transition;
|
|
8248
8442
|
if (needTransition2) {
|
|
8249
8443
|
if (moveType === 0) {
|
|
8250
|
-
|
|
8251
|
-
|
|
8252
|
-
|
|
8253
|
-
() =>
|
|
8254
|
-
|
|
8255
|
-
|
|
8444
|
+
performTransitionEnter(
|
|
8445
|
+
el,
|
|
8446
|
+
transition,
|
|
8447
|
+
() => hostInsert(el, container, anchor),
|
|
8448
|
+
parentSuspense,
|
|
8449
|
+
true
|
|
8256
8450
|
);
|
|
8257
8451
|
} else {
|
|
8258
8452
|
const { leave, delayLeave, afterLeave } = transition;
|
|
@@ -8264,6 +8458,12 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
8264
8458
|
}
|
|
8265
8459
|
};
|
|
8266
8460
|
const performLeave = () => {
|
|
8461
|
+
if (el._isLeaving) {
|
|
8462
|
+
el[leaveCbKey](
|
|
8463
|
+
true
|
|
8464
|
+
/* cancelled */
|
|
8465
|
+
);
|
|
8466
|
+
}
|
|
8267
8467
|
leave(el, () => {
|
|
8268
8468
|
remove2();
|
|
8269
8469
|
afterLeave && afterLeave();
|
|
@@ -8303,7 +8503,14 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
8303
8503
|
parentComponent.renderCache[cacheIndex] = void 0;
|
|
8304
8504
|
}
|
|
8305
8505
|
if (shapeFlag & 256) {
|
|
8306
|
-
|
|
8506
|
+
if (vnode.type.__vapor) {
|
|
8507
|
+
getVaporInterface(parentComponent, vnode).deactivate(
|
|
8508
|
+
vnode,
|
|
8509
|
+
parentComponent.ctx.getStorageContainer()
|
|
8510
|
+
);
|
|
8511
|
+
} else {
|
|
8512
|
+
parentComponent.ctx.deactivate(vnode);
|
|
8513
|
+
}
|
|
8307
8514
|
return;
|
|
8308
8515
|
}
|
|
8309
8516
|
const shouldInvokeDirs = shapeFlag & 1 && dirs;
|
|
@@ -8391,22 +8598,15 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
8391
8598
|
removeStaticNode(vnode);
|
|
8392
8599
|
return;
|
|
8393
8600
|
}
|
|
8394
|
-
|
|
8395
|
-
|
|
8396
|
-
|
|
8397
|
-
transition
|
|
8398
|
-
|
|
8399
|
-
|
|
8400
|
-
|
|
8401
|
-
const { leave, delayLeave } = transition;
|
|
8402
|
-
const performLeave = () => leave(el, performRemove);
|
|
8403
|
-
if (delayLeave) {
|
|
8404
|
-
delayLeave(vnode.el, performRemove, performLeave);
|
|
8405
|
-
} else {
|
|
8406
|
-
performLeave();
|
|
8407
|
-
}
|
|
8601
|
+
if (transition) {
|
|
8602
|
+
performTransitionLeave(
|
|
8603
|
+
el,
|
|
8604
|
+
transition,
|
|
8605
|
+
() => hostRemove(el),
|
|
8606
|
+
!!(vnode.shapeFlag & 1)
|
|
8607
|
+
);
|
|
8408
8608
|
} else {
|
|
8409
|
-
|
|
8609
|
+
hostRemove(el);
|
|
8410
8610
|
}
|
|
8411
8611
|
};
|
|
8412
8612
|
const removeFragment = (cur, end) => {
|
|
@@ -8422,27 +8622,12 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
8422
8622
|
if (instance.type.__hmrId) {
|
|
8423
8623
|
unregisterHMR(instance);
|
|
8424
8624
|
}
|
|
8425
|
-
const {
|
|
8426
|
-
bum,
|
|
8427
|
-
scope,
|
|
8428
|
-
effect,
|
|
8429
|
-
subTree,
|
|
8430
|
-
um,
|
|
8431
|
-
m,
|
|
8432
|
-
a,
|
|
8433
|
-
parent,
|
|
8434
|
-
slots: { __: slotCacheKeys }
|
|
8435
|
-
} = instance;
|
|
8625
|
+
const { bum, scope, effect, subTree, um, m, a } = instance;
|
|
8436
8626
|
invalidateMount(m);
|
|
8437
8627
|
invalidateMount(a);
|
|
8438
8628
|
if (bum) {
|
|
8439
8629
|
invokeArrayFns(bum);
|
|
8440
8630
|
}
|
|
8441
|
-
if (parent && isArray(slotCacheKeys)) {
|
|
8442
|
-
slotCacheKeys.forEach((v) => {
|
|
8443
|
-
parent.renderCache[v] = void 0;
|
|
8444
|
-
});
|
|
8445
|
-
}
|
|
8446
8631
|
scope.stop();
|
|
8447
8632
|
if (effect) {
|
|
8448
8633
|
effect.stop();
|
|
@@ -8456,12 +8641,6 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
8456
8641
|
void 0,
|
|
8457
8642
|
parentSuspense
|
|
8458
8643
|
);
|
|
8459
|
-
if (parentSuspense && parentSuspense.pendingBranch && !parentSuspense.isUnmounted && instance.asyncDep && !instance.asyncResolved && instance.suspenseId === parentSuspense.pendingId) {
|
|
8460
|
-
parentSuspense.deps--;
|
|
8461
|
-
if (parentSuspense.deps === 0) {
|
|
8462
|
-
parentSuspense.resolve();
|
|
8463
|
-
}
|
|
8464
|
-
}
|
|
8465
8644
|
{
|
|
8466
8645
|
devtoolsComponentRemoved(instance);
|
|
8467
8646
|
}
|
|
@@ -8474,7 +8653,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
8474
8653
|
const getNextHostNode = (vnode) => {
|
|
8475
8654
|
if (vnode.shapeFlag & 6) {
|
|
8476
8655
|
if (vnode.type.__vapor) {
|
|
8477
|
-
return hostNextSibling(vnode.
|
|
8656
|
+
return hostNextSibling(vnode.anchor);
|
|
8478
8657
|
}
|
|
8479
8658
|
return getNextHostNode(vnode.component.subTree);
|
|
8480
8659
|
}
|
|
@@ -8552,6 +8731,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
8552
8731
|
return {
|
|
8553
8732
|
render,
|
|
8554
8733
|
hydrate,
|
|
8734
|
+
hydrateNode,
|
|
8555
8735
|
internals,
|
|
8556
8736
|
createApp: createAppAPI(
|
|
8557
8737
|
mountApp,
|
|
@@ -8591,7 +8771,8 @@ function traverseStaticChildren(n1, n2, shallow = false) {
|
|
|
8591
8771
|
if (!shallow && c2.patchFlag !== -2)
|
|
8592
8772
|
traverseStaticChildren(c1, c2);
|
|
8593
8773
|
}
|
|
8594
|
-
if (c2.type === Text
|
|
8774
|
+
if (c2.type === Text && // avoid cached text nodes retaining detached dom nodes
|
|
8775
|
+
c2.patchFlag !== -1) {
|
|
8595
8776
|
c2.el = c1.el;
|
|
8596
8777
|
}
|
|
8597
8778
|
if (c2.type === Comment && !c2.el) {
|
|
@@ -8604,7 +8785,7 @@ function traverseStaticChildren(n1, n2, shallow = false) {
|
|
|
8604
8785
|
}
|
|
8605
8786
|
}
|
|
8606
8787
|
function locateNonHydratedAsyncRoot(instance) {
|
|
8607
|
-
const subComponent = instance.
|
|
8788
|
+
const subComponent = instance.subTree && instance.subTree.component;
|
|
8608
8789
|
if (subComponent) {
|
|
8609
8790
|
if (subComponent.asyncDep && !subComponent.asyncResolved) {
|
|
8610
8791
|
return subComponent;
|
|
@@ -8619,6 +8800,34 @@ function invalidateMount(hooks) {
|
|
|
8619
8800
|
hooks[i].flags |= 4;
|
|
8620
8801
|
}
|
|
8621
8802
|
}
|
|
8803
|
+
function performTransitionEnter(el, transition, insert, parentSuspense, force = false) {
|
|
8804
|
+
if (force || needTransition(parentSuspense, transition)) {
|
|
8805
|
+
transition.beforeEnter(el);
|
|
8806
|
+
insert();
|
|
8807
|
+
queuePostRenderEffect(() => transition.enter(el), void 0, parentSuspense);
|
|
8808
|
+
} else {
|
|
8809
|
+
insert();
|
|
8810
|
+
}
|
|
8811
|
+
}
|
|
8812
|
+
function performTransitionLeave(el, transition, remove, isElement = true) {
|
|
8813
|
+
const performRemove = () => {
|
|
8814
|
+
remove();
|
|
8815
|
+
if (transition && !transition.persisted && transition.afterLeave) {
|
|
8816
|
+
transition.afterLeave();
|
|
8817
|
+
}
|
|
8818
|
+
};
|
|
8819
|
+
if (isElement && transition && !transition.persisted) {
|
|
8820
|
+
const { leave, delayLeave } = transition;
|
|
8821
|
+
const performLeave = () => leave(el, performRemove);
|
|
8822
|
+
if (delayLeave) {
|
|
8823
|
+
delayLeave(el, performRemove, performLeave);
|
|
8824
|
+
} else {
|
|
8825
|
+
performLeave();
|
|
8826
|
+
}
|
|
8827
|
+
} else {
|
|
8828
|
+
performRemove();
|
|
8829
|
+
}
|
|
8830
|
+
}
|
|
8622
8831
|
function getVaporInterface(instance, vnode) {
|
|
8623
8832
|
const ctx = instance ? instance.appContext : vnode.appContext;
|
|
8624
8833
|
const res = ctx && ctx.vapor;
|
|
@@ -8633,6 +8842,32 @@ app.use(vaporInteropPlugin)
|
|
|
8633
8842
|
}
|
|
8634
8843
|
return res;
|
|
8635
8844
|
}
|
|
8845
|
+
function getInheritedScopeIds(vnode, parentComponent) {
|
|
8846
|
+
const inheritedScopeIds = [];
|
|
8847
|
+
let currentParent = parentComponent;
|
|
8848
|
+
let currentVNode = vnode;
|
|
8849
|
+
while (currentParent) {
|
|
8850
|
+
let subTree = currentParent.subTree;
|
|
8851
|
+
if (!subTree) break;
|
|
8852
|
+
if (subTree.patchFlag > 0 && subTree.patchFlag & 2048) {
|
|
8853
|
+
subTree = filterSingleRoot(subTree.children) || subTree;
|
|
8854
|
+
}
|
|
8855
|
+
if (currentVNode === subTree || isSuspense(subTree.type) && (subTree.ssContent === currentVNode || subTree.ssFallback === currentVNode)) {
|
|
8856
|
+
const parentVNode = currentParent.vnode;
|
|
8857
|
+
if (parentVNode.scopeId) {
|
|
8858
|
+
inheritedScopeIds.push(parentVNode.scopeId);
|
|
8859
|
+
}
|
|
8860
|
+
if (parentVNode.slotScopeIds) {
|
|
8861
|
+
inheritedScopeIds.push(...parentVNode.slotScopeIds);
|
|
8862
|
+
}
|
|
8863
|
+
currentVNode = parentVNode;
|
|
8864
|
+
currentParent = currentParent.parent;
|
|
8865
|
+
} else {
|
|
8866
|
+
break;
|
|
8867
|
+
}
|
|
8868
|
+
}
|
|
8869
|
+
return inheritedScopeIds;
|
|
8870
|
+
}
|
|
8636
8871
|
|
|
8637
8872
|
const ssrContextKey = Symbol.for("v-scx");
|
|
8638
8873
|
const useSSRContext = () => {
|
|
@@ -8876,7 +9111,7 @@ function useModel(props, name, options = EMPTY_OBJ) {
|
|
|
8876
9111
|
return res;
|
|
8877
9112
|
}
|
|
8878
9113
|
const getModelModifiers = (props, modelName, getter) => {
|
|
8879
|
-
return
|
|
9114
|
+
return getter(props, getModifierPropName(modelName)) || getter(props, `${camelize(modelName)}Modifiers`) || getter(props, `${hyphenate(modelName)}Modifiers`);
|
|
8880
9115
|
};
|
|
8881
9116
|
|
|
8882
9117
|
function emit(instance, event, ...rawArgs) {
|
|
@@ -8972,8 +9207,9 @@ function baseEmit(instance, props, getter, event, ...rawArgs) {
|
|
|
8972
9207
|
function defaultPropGetter(props, key) {
|
|
8973
9208
|
return props[key];
|
|
8974
9209
|
}
|
|
9210
|
+
const mixinEmitsCache = /* @__PURE__ */ new WeakMap();
|
|
8975
9211
|
function normalizeEmitsOptions(comp, appContext, asMixin = false) {
|
|
8976
|
-
const cache = appContext.emitsCache;
|
|
9212
|
+
const cache = asMixin ? mixinEmitsCache : appContext.emitsCache;
|
|
8977
9213
|
const cached = cache.get(comp);
|
|
8978
9214
|
if (cached !== void 0) {
|
|
8979
9215
|
return cached;
|
|
@@ -9421,7 +9657,7 @@ function patchSuspense(n1, n2, container, anchor, parentComponent, namespace, sl
|
|
|
9421
9657
|
const { activeBranch, pendingBranch, isInFallback, isHydrating } = suspense;
|
|
9422
9658
|
if (pendingBranch) {
|
|
9423
9659
|
suspense.pendingBranch = newBranch;
|
|
9424
|
-
if (isSameVNodeType(
|
|
9660
|
+
if (isSameVNodeType(pendingBranch, newBranch)) {
|
|
9425
9661
|
patch(
|
|
9426
9662
|
pendingBranch,
|
|
9427
9663
|
newBranch,
|
|
@@ -9492,7 +9728,7 @@ function patchSuspense(n1, n2, container, anchor, parentComponent, namespace, sl
|
|
|
9492
9728
|
);
|
|
9493
9729
|
setActiveBranch(suspense, newFallback);
|
|
9494
9730
|
}
|
|
9495
|
-
} else if (activeBranch && isSameVNodeType(
|
|
9731
|
+
} else if (activeBranch && isSameVNodeType(activeBranch, newBranch)) {
|
|
9496
9732
|
patch(
|
|
9497
9733
|
activeBranch,
|
|
9498
9734
|
newBranch,
|
|
@@ -9523,7 +9759,7 @@ function patchSuspense(n1, n2, container, anchor, parentComponent, namespace, sl
|
|
|
9523
9759
|
}
|
|
9524
9760
|
}
|
|
9525
9761
|
} else {
|
|
9526
|
-
if (activeBranch && isSameVNodeType(
|
|
9762
|
+
if (activeBranch && isSameVNodeType(activeBranch, newBranch)) {
|
|
9527
9763
|
patch(
|
|
9528
9764
|
activeBranch,
|
|
9529
9765
|
newBranch,
|
|
@@ -9636,7 +9872,8 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|
|
9636
9872
|
pendingId,
|
|
9637
9873
|
effects,
|
|
9638
9874
|
parentComponent: parentComponent2,
|
|
9639
|
-
container: container2
|
|
9875
|
+
container: container2,
|
|
9876
|
+
isInFallback
|
|
9640
9877
|
} = suspense;
|
|
9641
9878
|
let delayEnter = false;
|
|
9642
9879
|
if (suspense.isHydrating) {
|
|
@@ -9654,6 +9891,9 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|
|
9654
9891
|
parentComponent2
|
|
9655
9892
|
);
|
|
9656
9893
|
queuePostFlushCb(effects);
|
|
9894
|
+
if (isInFallback && vnode2.ssFallback) {
|
|
9895
|
+
vnode2.ssFallback.el = null;
|
|
9896
|
+
}
|
|
9657
9897
|
}
|
|
9658
9898
|
};
|
|
9659
9899
|
}
|
|
@@ -9662,6 +9902,9 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|
|
9662
9902
|
anchor = next(activeBranch);
|
|
9663
9903
|
}
|
|
9664
9904
|
unmount(activeBranch, parentComponent2, suspense, true);
|
|
9905
|
+
if (!delayEnter && isInFallback && vnode2.ssFallback) {
|
|
9906
|
+
vnode2.ssFallback.el = null;
|
|
9907
|
+
}
|
|
9665
9908
|
}
|
|
9666
9909
|
if (!delayEnter) {
|
|
9667
9910
|
move(
|
|
@@ -9786,6 +10029,7 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|
|
9786
10029
|
optimized2
|
|
9787
10030
|
);
|
|
9788
10031
|
if (placeholder) {
|
|
10032
|
+
vnode2.placeholder = null;
|
|
9789
10033
|
remove(placeholder);
|
|
9790
10034
|
}
|
|
9791
10035
|
updateHOCHostEl(instance, vnode2.el);
|
|
@@ -9991,15 +10235,11 @@ const createVNodeWithArgsTransform = (...args) => {
|
|
|
9991
10235
|
);
|
|
9992
10236
|
};
|
|
9993
10237
|
const normalizeKey = ({ key }) => key != null ? key : null;
|
|
9994
|
-
const normalizeRef = ({
|
|
9995
|
-
ref,
|
|
9996
|
-
ref_key,
|
|
9997
|
-
ref_for
|
|
9998
|
-
}) => {
|
|
10238
|
+
const normalizeRef = ({ ref, ref_key, ref_for }, i = currentRenderingInstance) => {
|
|
9999
10239
|
if (typeof ref === "number") {
|
|
10000
10240
|
ref = "" + ref;
|
|
10001
10241
|
}
|
|
10002
|
-
return ref != null ? isString(ref) || isRef(ref) || isFunction(ref) ? { i
|
|
10242
|
+
return ref != null ? isString(ref) || isRef(ref) || isFunction(ref) ? { i, r: ref, k: ref_key, f: !!ref_for } : ref : null;
|
|
10003
10243
|
};
|
|
10004
10244
|
function createBaseVNode(type, props = null, children = null, patchFlag = 0, dynamicProps = null, shapeFlag = type === Fragment ? 0 : 1, isBlockNode = false, needFullChildrenNormalization = false) {
|
|
10005
10245
|
const vnode = {
|
|
@@ -10165,6 +10405,7 @@ function cloneVNode(vnode, extraProps, mergeRef = false, cloneTransition = false
|
|
|
10165
10405
|
suspense: vnode.suspense,
|
|
10166
10406
|
ssContent: vnode.ssContent && cloneVNode(vnode.ssContent),
|
|
10167
10407
|
ssFallback: vnode.ssFallback && cloneVNode(vnode.ssFallback),
|
|
10408
|
+
placeholder: vnode.placeholder,
|
|
10168
10409
|
el: vnode.el,
|
|
10169
10410
|
anchor: vnode.anchor,
|
|
10170
10411
|
ctx: vnode.ctx,
|
|
@@ -10324,6 +10565,25 @@ const setCurrentInstance = (instance, scope = instance !== null ? instance.scope
|
|
|
10324
10565
|
simpleSetCurrentInstance(instance);
|
|
10325
10566
|
}
|
|
10326
10567
|
};
|
|
10568
|
+
const internalOptions = ["ce", "type"];
|
|
10569
|
+
const useInstanceOption = (key, silent = false) => {
|
|
10570
|
+
const instance = getCurrentGenericInstance();
|
|
10571
|
+
if (!instance) {
|
|
10572
|
+
if (!silent) {
|
|
10573
|
+
warn$1(`useInstanceOption called without an active component instance.`);
|
|
10574
|
+
}
|
|
10575
|
+
return { hasInstance: false, value: void 0 };
|
|
10576
|
+
}
|
|
10577
|
+
if (!internalOptions.includes(key)) {
|
|
10578
|
+
{
|
|
10579
|
+
warn$1(
|
|
10580
|
+
`useInstanceOption only accepts ${internalOptions.map((k) => `'${k}'`).join(", ")} as key, got '${key}'.`
|
|
10581
|
+
);
|
|
10582
|
+
}
|
|
10583
|
+
return { hasInstance: true, value: void 0 };
|
|
10584
|
+
}
|
|
10585
|
+
return { hasInstance: true, value: instance[key] };
|
|
10586
|
+
};
|
|
10327
10587
|
|
|
10328
10588
|
const emptyAppContext = createAppContext();
|
|
10329
10589
|
let uid = 0;
|
|
@@ -10691,7 +10951,7 @@ function getComponentPublicInstance(instance) {
|
|
|
10691
10951
|
return instance.proxy;
|
|
10692
10952
|
}
|
|
10693
10953
|
}
|
|
10694
|
-
const classifyRE = /(?:^|[-_])
|
|
10954
|
+
const classifyRE = /(?:^|[-_])\w/g;
|
|
10695
10955
|
const classify = (str) => str.replace(classifyRE, (c) => c.toUpperCase()).replace(/[-_]/g, "");
|
|
10696
10956
|
function getComponentName(Component, includeInferred = true) {
|
|
10697
10957
|
return isFunction(Component) ? Component.displayName || Component.name : Component.name || includeInferred && Component.__name;
|
|
@@ -10727,23 +10987,28 @@ const computed = (getterOrOptions, debugOptions) => {
|
|
|
10727
10987
|
};
|
|
10728
10988
|
|
|
10729
10989
|
function h(type, propsOrChildren, children) {
|
|
10730
|
-
|
|
10731
|
-
|
|
10732
|
-
|
|
10733
|
-
|
|
10734
|
-
|
|
10990
|
+
try {
|
|
10991
|
+
setBlockTracking(-1);
|
|
10992
|
+
const l = arguments.length;
|
|
10993
|
+
if (l === 2) {
|
|
10994
|
+
if (isObject(propsOrChildren) && !isArray(propsOrChildren)) {
|
|
10995
|
+
if (isVNode(propsOrChildren)) {
|
|
10996
|
+
return createVNode(type, null, [propsOrChildren]);
|
|
10997
|
+
}
|
|
10998
|
+
return createVNode(type, propsOrChildren);
|
|
10999
|
+
} else {
|
|
11000
|
+
return createVNode(type, null, propsOrChildren);
|
|
10735
11001
|
}
|
|
10736
|
-
return createVNode(type, propsOrChildren);
|
|
10737
11002
|
} else {
|
|
10738
|
-
|
|
10739
|
-
|
|
10740
|
-
|
|
10741
|
-
|
|
10742
|
-
|
|
10743
|
-
|
|
10744
|
-
children = [children];
|
|
11003
|
+
if (l > 3) {
|
|
11004
|
+
children = Array.prototype.slice.call(arguments, 2);
|
|
11005
|
+
} else if (l === 3 && isVNode(children)) {
|
|
11006
|
+
children = [children];
|
|
11007
|
+
}
|
|
11008
|
+
return createVNode(type, propsOrChildren, children);
|
|
10745
11009
|
}
|
|
10746
|
-
|
|
11010
|
+
} finally {
|
|
11011
|
+
setBlockTracking(1);
|
|
10747
11012
|
}
|
|
10748
11013
|
}
|
|
10749
11014
|
|
|
@@ -10953,7 +11218,7 @@ function isMemoSame(cached, memo) {
|
|
|
10953
11218
|
return true;
|
|
10954
11219
|
}
|
|
10955
11220
|
|
|
10956
|
-
const version = "3.6.0-alpha.
|
|
11221
|
+
const version = "3.6.0-alpha.4";
|
|
10957
11222
|
const warn = warn$1 ;
|
|
10958
11223
|
const ErrorTypeStrings = ErrorTypeStrings$1 ;
|
|
10959
11224
|
const devtools = devtools$1 ;
|
|
@@ -11182,11 +11447,11 @@ function resolveTransitionProps(rawProps) {
|
|
|
11182
11447
|
const resolve = () => finishLeave(el, done);
|
|
11183
11448
|
addTransitionClass(el, leaveFromClass);
|
|
11184
11449
|
if (!el._enterCancelled) {
|
|
11185
|
-
forceReflow();
|
|
11450
|
+
forceReflow(el);
|
|
11186
11451
|
addTransitionClass(el, leaveActiveClass);
|
|
11187
11452
|
} else {
|
|
11188
11453
|
addTransitionClass(el, leaveActiveClass);
|
|
11189
|
-
forceReflow();
|
|
11454
|
+
forceReflow(el);
|
|
11190
11455
|
}
|
|
11191
11456
|
nextFrame(() => {
|
|
11192
11457
|
if (!el._isLeaving) {
|
|
@@ -11312,7 +11577,7 @@ function getTransitionInfo(el, expectedType) {
|
|
|
11312
11577
|
type = timeout > 0 ? transitionTimeout > animationTimeout ? TRANSITION : ANIMATION : null;
|
|
11313
11578
|
propCount = type ? type === TRANSITION ? transitionDurations.length : animationDurations.length : 0;
|
|
11314
11579
|
}
|
|
11315
|
-
const hasTransform = type === TRANSITION && /\b(transform|all)(
|
|
11580
|
+
const hasTransform = type === TRANSITION && /\b(?:transform|all)(?:,|$)/.test(
|
|
11316
11581
|
getStyleProperties(`${TRANSITION}Property`).toString()
|
|
11317
11582
|
);
|
|
11318
11583
|
return {
|
|
@@ -11332,8 +11597,9 @@ function toMs(s) {
|
|
|
11332
11597
|
if (s === "auto") return 0;
|
|
11333
11598
|
return Number(s.slice(0, -1).replace(",", ".")) * 1e3;
|
|
11334
11599
|
}
|
|
11335
|
-
function forceReflow() {
|
|
11336
|
-
|
|
11600
|
+
function forceReflow(el) {
|
|
11601
|
+
const targetDocument = el ? el.ownerDocument : document;
|
|
11602
|
+
return targetDocument.body.offsetHeight;
|
|
11337
11603
|
}
|
|
11338
11604
|
|
|
11339
11605
|
function patchClass(el, value, isSVG) {
|
|
@@ -11353,6 +11619,8 @@ function patchClass(el, value, isSVG) {
|
|
|
11353
11619
|
const vShowOriginalDisplay = Symbol("_vod");
|
|
11354
11620
|
const vShowHidden = Symbol("_vsh");
|
|
11355
11621
|
const vShow = {
|
|
11622
|
+
// used for prop mismatch check during hydration
|
|
11623
|
+
name: "show",
|
|
11356
11624
|
beforeMount(el, { value }, { transition }) {
|
|
11357
11625
|
el[vShowOriginalDisplay] = el.style.display === "none" ? "" : el.style.display;
|
|
11358
11626
|
if (transition && value) {
|
|
@@ -11386,9 +11654,6 @@ const vShow = {
|
|
|
11386
11654
|
setDisplay(el, value);
|
|
11387
11655
|
}
|
|
11388
11656
|
};
|
|
11389
|
-
{
|
|
11390
|
-
vShow.name = "show";
|
|
11391
|
-
}
|
|
11392
11657
|
function setDisplay(el, value) {
|
|
11393
11658
|
el.style.display = value ? el[vShowOriginalDisplay] : "none";
|
|
11394
11659
|
el[vShowHidden] = !value;
|
|
@@ -11474,7 +11739,7 @@ function setVarsOnNode(el, vars) {
|
|
|
11474
11739
|
}
|
|
11475
11740
|
}
|
|
11476
11741
|
|
|
11477
|
-
const displayRE = /(
|
|
11742
|
+
const displayRE = /(?:^|;)\s*display\s*:/;
|
|
11478
11743
|
function patchStyle(el, prev, next) {
|
|
11479
11744
|
const style = el.style;
|
|
11480
11745
|
const isCssString = isString(next);
|
|
@@ -11779,11 +12044,10 @@ function shouldSetAsProp(el, key, value, isSVG) {
|
|
|
11779
12044
|
}
|
|
11780
12045
|
|
|
11781
12046
|
const REMOVAL = {};
|
|
11782
|
-
/*! #__NO_SIDE_EFFECTS__ */
|
|
11783
12047
|
// @__NO_SIDE_EFFECTS__
|
|
11784
12048
|
function defineCustomElement(options, extraOptions, _createApp) {
|
|
11785
|
-
|
|
11786
|
-
if (isPlainObject(Comp)) extend(Comp, extraOptions);
|
|
12049
|
+
let Comp = defineComponent(options, extraOptions);
|
|
12050
|
+
if (isPlainObject(Comp)) Comp = extend({}, Comp, extraOptions);
|
|
11787
12051
|
class VueCustomElement extends VueElement {
|
|
11788
12052
|
constructor(initialProps) {
|
|
11789
12053
|
super(Comp, initialProps, _createApp);
|
|
@@ -11792,18 +12056,14 @@ function defineCustomElement(options, extraOptions, _createApp) {
|
|
|
11792
12056
|
VueCustomElement.def = Comp;
|
|
11793
12057
|
return VueCustomElement;
|
|
11794
12058
|
}
|
|
11795
|
-
|
|
11796
|
-
const defineSSRCustomElement = /* @__NO_SIDE_EFFECTS__ */ (options, extraOptions) => {
|
|
12059
|
+
const defineSSRCustomElement = (/* @__NO_SIDE_EFFECTS__ */ (options, extraOptions) => {
|
|
11797
12060
|
return /* @__PURE__ */ defineCustomElement(options, extraOptions, createSSRApp);
|
|
11798
|
-
};
|
|
12061
|
+
});
|
|
11799
12062
|
const BaseClass = typeof HTMLElement !== "undefined" ? HTMLElement : class {
|
|
11800
12063
|
};
|
|
11801
|
-
class
|
|
11802
|
-
constructor(
|
|
12064
|
+
class VueElementBase extends BaseClass {
|
|
12065
|
+
constructor(def, props = {}, createAppFn) {
|
|
11803
12066
|
super();
|
|
11804
|
-
this._def = _def;
|
|
11805
|
-
this._props = _props;
|
|
11806
|
-
this._createApp = _createApp;
|
|
11807
12067
|
this._isVueCE = true;
|
|
11808
12068
|
/**
|
|
11809
12069
|
* @internal
|
|
@@ -11813,25 +12073,26 @@ class VueElement extends BaseClass {
|
|
|
11813
12073
|
* @internal
|
|
11814
12074
|
*/
|
|
11815
12075
|
this._app = null;
|
|
11816
|
-
/**
|
|
11817
|
-
* @internal
|
|
11818
|
-
*/
|
|
11819
|
-
this._nonce = this._def.nonce;
|
|
11820
12076
|
this._connected = false;
|
|
11821
12077
|
this._resolved = false;
|
|
11822
12078
|
this._numberProps = null;
|
|
11823
12079
|
this._styleChildren = /* @__PURE__ */ new WeakSet();
|
|
12080
|
+
this._patching = false;
|
|
12081
|
+
this._dirty = false;
|
|
11824
12082
|
this._ob = null;
|
|
11825
|
-
|
|
12083
|
+
this._def = def;
|
|
12084
|
+
this._props = props;
|
|
12085
|
+
this._createApp = createAppFn;
|
|
12086
|
+
this._nonce = def.nonce;
|
|
12087
|
+
if (this._needsHydration()) {
|
|
11826
12088
|
this._root = this.shadowRoot;
|
|
11827
12089
|
} else {
|
|
11828
|
-
if (
|
|
11829
|
-
|
|
11830
|
-
|
|
12090
|
+
if (def.shadowRoot !== false) {
|
|
12091
|
+
this.attachShadow(
|
|
12092
|
+
extend({}, def.shadowRootOptions, {
|
|
12093
|
+
mode: "open"
|
|
12094
|
+
})
|
|
11831
12095
|
);
|
|
11832
|
-
}
|
|
11833
|
-
if (_def.shadowRoot !== false) {
|
|
11834
|
-
this.attachShadow({ mode: "open" });
|
|
11835
12096
|
this._root = this.shadowRoot;
|
|
11836
12097
|
} else {
|
|
11837
12098
|
this._root = this;
|
|
@@ -11846,14 +12107,14 @@ class VueElement extends BaseClass {
|
|
|
11846
12107
|
this._connected = true;
|
|
11847
12108
|
let parent = this;
|
|
11848
12109
|
while (parent = parent && (parent.parentNode || parent.host)) {
|
|
11849
|
-
if (parent instanceof
|
|
12110
|
+
if (parent instanceof VueElementBase) {
|
|
11850
12111
|
this._parent = parent;
|
|
11851
12112
|
break;
|
|
11852
12113
|
}
|
|
11853
12114
|
}
|
|
11854
12115
|
if (!this._instance) {
|
|
11855
12116
|
if (this._resolved) {
|
|
11856
|
-
this.
|
|
12117
|
+
this._mountComponent(this._def);
|
|
11857
12118
|
} else {
|
|
11858
12119
|
if (parent && parent._pendingResolve) {
|
|
11859
12120
|
this._pendingResolve = parent._pendingResolve.then(() => {
|
|
@@ -11866,8 +12127,24 @@ class VueElement extends BaseClass {
|
|
|
11866
12127
|
}
|
|
11867
12128
|
}
|
|
11868
12129
|
}
|
|
12130
|
+
disconnectedCallback() {
|
|
12131
|
+
this._connected = false;
|
|
12132
|
+
nextTick(() => {
|
|
12133
|
+
if (!this._connected) {
|
|
12134
|
+
if (this._ob) {
|
|
12135
|
+
this._ob.disconnect();
|
|
12136
|
+
this._ob = null;
|
|
12137
|
+
}
|
|
12138
|
+
this._unmount();
|
|
12139
|
+
if (this._teleportTargets) {
|
|
12140
|
+
this._teleportTargets.clear();
|
|
12141
|
+
this._teleportTargets = void 0;
|
|
12142
|
+
}
|
|
12143
|
+
}
|
|
12144
|
+
});
|
|
12145
|
+
}
|
|
11869
12146
|
_setParent(parent = this._parent) {
|
|
11870
|
-
if (parent) {
|
|
12147
|
+
if (parent && this._instance) {
|
|
11871
12148
|
this._instance.parent = parent._instance;
|
|
11872
12149
|
this._inheritParentContext(parent);
|
|
11873
12150
|
}
|
|
@@ -11880,19 +12157,10 @@ class VueElement extends BaseClass {
|
|
|
11880
12157
|
);
|
|
11881
12158
|
}
|
|
11882
12159
|
}
|
|
11883
|
-
|
|
11884
|
-
|
|
11885
|
-
|
|
11886
|
-
|
|
11887
|
-
if (this._ob) {
|
|
11888
|
-
this._ob.disconnect();
|
|
11889
|
-
this._ob = null;
|
|
11890
|
-
}
|
|
11891
|
-
this._app && this._app.unmount();
|
|
11892
|
-
if (this._instance) this._instance.ce = void 0;
|
|
11893
|
-
this._app = this._instance = null;
|
|
11894
|
-
}
|
|
11895
|
-
});
|
|
12160
|
+
_processMutations(mutations) {
|
|
12161
|
+
for (const m of mutations) {
|
|
12162
|
+
this._setAttr(m.attributeName);
|
|
12163
|
+
}
|
|
11896
12164
|
}
|
|
11897
12165
|
/**
|
|
11898
12166
|
* resolve inner component definition (handle possible async component)
|
|
@@ -11904,13 +12172,9 @@ class VueElement extends BaseClass {
|
|
|
11904
12172
|
for (let i = 0; i < this.attributes.length; i++) {
|
|
11905
12173
|
this._setAttr(this.attributes[i].name);
|
|
11906
12174
|
}
|
|
11907
|
-
this._ob = new MutationObserver((
|
|
11908
|
-
for (const m of mutations) {
|
|
11909
|
-
this._setAttr(m.attributeName);
|
|
11910
|
-
}
|
|
11911
|
-
});
|
|
12175
|
+
this._ob = new MutationObserver(this._processMutations.bind(this));
|
|
11912
12176
|
this._ob.observe(this, { attributes: true });
|
|
11913
|
-
const resolve = (def
|
|
12177
|
+
const resolve = (def) => {
|
|
11914
12178
|
this._resolved = true;
|
|
11915
12179
|
this._pendingResolve = void 0;
|
|
11916
12180
|
const { props, styles } = def;
|
|
@@ -11935,29 +12199,25 @@ class VueElement extends BaseClass {
|
|
|
11935
12199
|
"Custom element style injection is not supported when using shadowRoot: false"
|
|
11936
12200
|
);
|
|
11937
12201
|
}
|
|
11938
|
-
this.
|
|
12202
|
+
this._mountComponent(def);
|
|
11939
12203
|
};
|
|
11940
12204
|
const asyncDef = this._def.__asyncLoader;
|
|
11941
12205
|
if (asyncDef) {
|
|
12206
|
+
const { configureApp } = this._def;
|
|
11942
12207
|
this._pendingResolve = asyncDef().then((def) => {
|
|
11943
|
-
def.configureApp =
|
|
11944
|
-
|
|
12208
|
+
def.configureApp = configureApp;
|
|
12209
|
+
this._def = def;
|
|
12210
|
+
resolve(def);
|
|
11945
12211
|
});
|
|
11946
12212
|
} else {
|
|
11947
12213
|
resolve(this._def);
|
|
11948
12214
|
}
|
|
11949
12215
|
}
|
|
11950
|
-
|
|
11951
|
-
|
|
11952
|
-
|
|
11953
|
-
|
|
11954
|
-
|
|
11955
|
-
this._inheritParentContext();
|
|
11956
|
-
if (def.configureApp) {
|
|
11957
|
-
def.configureApp(this._app);
|
|
11958
|
-
}
|
|
11959
|
-
this._app._ceVNode = this._createVNode();
|
|
11960
|
-
this._app.mount(this._root);
|
|
12216
|
+
_mountComponent(def) {
|
|
12217
|
+
this._mount(def);
|
|
12218
|
+
this._processExposed();
|
|
12219
|
+
}
|
|
12220
|
+
_processExposed() {
|
|
11961
12221
|
const exposed = this._instance && this._instance.exposed;
|
|
11962
12222
|
if (!exposed) return;
|
|
11963
12223
|
for (const key in exposed) {
|
|
@@ -11971,6 +12231,38 @@ class VueElement extends BaseClass {
|
|
|
11971
12231
|
}
|
|
11972
12232
|
}
|
|
11973
12233
|
}
|
|
12234
|
+
_processInstance() {
|
|
12235
|
+
this._instance.ce = this;
|
|
12236
|
+
this._instance.isCE = true;
|
|
12237
|
+
{
|
|
12238
|
+
this._instance.ceReload = (newStyles) => {
|
|
12239
|
+
if (this._styles) {
|
|
12240
|
+
this._styles.forEach((s) => this._root.removeChild(s));
|
|
12241
|
+
this._styles.length = 0;
|
|
12242
|
+
}
|
|
12243
|
+
this._applyStyles(newStyles);
|
|
12244
|
+
if (!this._instance.vapor) {
|
|
12245
|
+
this._instance = null;
|
|
12246
|
+
}
|
|
12247
|
+
this._update();
|
|
12248
|
+
};
|
|
12249
|
+
}
|
|
12250
|
+
const dispatch = (event, args) => {
|
|
12251
|
+
this.dispatchEvent(
|
|
12252
|
+
new CustomEvent(
|
|
12253
|
+
event,
|
|
12254
|
+
isPlainObject(args[0]) ? extend({ detail: args }, args[0]) : { detail: args }
|
|
12255
|
+
)
|
|
12256
|
+
);
|
|
12257
|
+
};
|
|
12258
|
+
this._instance.emit = (event, ...args) => {
|
|
12259
|
+
dispatch(event, args);
|
|
12260
|
+
if (hyphenate(event) !== event) {
|
|
12261
|
+
dispatch(hyphenate(event), args);
|
|
12262
|
+
}
|
|
12263
|
+
};
|
|
12264
|
+
this._setParent();
|
|
12265
|
+
}
|
|
11974
12266
|
_resolveProps(def) {
|
|
11975
12267
|
const { props } = def;
|
|
11976
12268
|
const declaredPropKeys = isArray(props) ? props : Object.keys(props || {});
|
|
@@ -11985,7 +12277,7 @@ class VueElement extends BaseClass {
|
|
|
11985
12277
|
return this._getProp(key);
|
|
11986
12278
|
},
|
|
11987
12279
|
set(val) {
|
|
11988
|
-
this._setProp(key, val, true,
|
|
12280
|
+
this._setProp(key, val, true, !this._patching);
|
|
11989
12281
|
}
|
|
11990
12282
|
});
|
|
11991
12283
|
}
|
|
@@ -12011,11 +12303,12 @@ class VueElement extends BaseClass {
|
|
|
12011
12303
|
*/
|
|
12012
12304
|
_setProp(key, val, shouldReflect = true, shouldUpdate = false) {
|
|
12013
12305
|
if (val !== this._props[key]) {
|
|
12306
|
+
this._dirty = true;
|
|
12014
12307
|
if (val === REMOVAL) {
|
|
12015
12308
|
delete this._props[key];
|
|
12016
12309
|
} else {
|
|
12017
12310
|
this._props[key] = val;
|
|
12018
|
-
if (key === "key" && this._app) {
|
|
12311
|
+
if (key === "key" && this._app && this._app._ceVNode) {
|
|
12019
12312
|
this._app._ceVNode.key = val;
|
|
12020
12313
|
}
|
|
12021
12314
|
}
|
|
@@ -12024,7 +12317,10 @@ class VueElement extends BaseClass {
|
|
|
12024
12317
|
}
|
|
12025
12318
|
if (shouldReflect) {
|
|
12026
12319
|
const ob = this._ob;
|
|
12027
|
-
|
|
12320
|
+
if (ob) {
|
|
12321
|
+
this._processMutations(ob.takeRecords());
|
|
12322
|
+
ob.disconnect();
|
|
12323
|
+
}
|
|
12028
12324
|
if (val === true) {
|
|
12029
12325
|
this.setAttribute(hyphenate(key), "");
|
|
12030
12326
|
} else if (typeof val === "string" || typeof val === "number") {
|
|
@@ -12036,52 +12332,6 @@ class VueElement extends BaseClass {
|
|
|
12036
12332
|
}
|
|
12037
12333
|
}
|
|
12038
12334
|
}
|
|
12039
|
-
_update() {
|
|
12040
|
-
const vnode = this._createVNode();
|
|
12041
|
-
if (this._app) vnode.appContext = this._app._context;
|
|
12042
|
-
render(vnode, this._root);
|
|
12043
|
-
}
|
|
12044
|
-
_createVNode() {
|
|
12045
|
-
const baseProps = {};
|
|
12046
|
-
if (!this.shadowRoot) {
|
|
12047
|
-
baseProps.onVnodeMounted = baseProps.onVnodeUpdated = this._renderSlots.bind(this);
|
|
12048
|
-
}
|
|
12049
|
-
const vnode = createVNode(this._def, extend(baseProps, this._props));
|
|
12050
|
-
if (!this._instance) {
|
|
12051
|
-
vnode.ce = (instance) => {
|
|
12052
|
-
this._instance = instance;
|
|
12053
|
-
instance.ce = this;
|
|
12054
|
-
instance.isCE = true;
|
|
12055
|
-
{
|
|
12056
|
-
instance.ceReload = (newStyles) => {
|
|
12057
|
-
if (this._styles) {
|
|
12058
|
-
this._styles.forEach((s) => this._root.removeChild(s));
|
|
12059
|
-
this._styles.length = 0;
|
|
12060
|
-
}
|
|
12061
|
-
this._applyStyles(newStyles);
|
|
12062
|
-
this._instance = null;
|
|
12063
|
-
this._update();
|
|
12064
|
-
};
|
|
12065
|
-
}
|
|
12066
|
-
const dispatch = (event, args) => {
|
|
12067
|
-
this.dispatchEvent(
|
|
12068
|
-
new CustomEvent(
|
|
12069
|
-
event,
|
|
12070
|
-
isPlainObject(args[0]) ? extend({ detail: args }, args[0]) : { detail: args }
|
|
12071
|
-
)
|
|
12072
|
-
);
|
|
12073
|
-
};
|
|
12074
|
-
instance.emit = (event, ...args) => {
|
|
12075
|
-
dispatch(event, args);
|
|
12076
|
-
if (hyphenate(event) !== event) {
|
|
12077
|
-
dispatch(hyphenate(event), args);
|
|
12078
|
-
}
|
|
12079
|
-
};
|
|
12080
|
-
this._setParent();
|
|
12081
|
-
};
|
|
12082
|
-
}
|
|
12083
|
-
return vnode;
|
|
12084
|
-
}
|
|
12085
12335
|
_applyStyles(styles, owner) {
|
|
12086
12336
|
if (!styles) return;
|
|
12087
12337
|
if (owner) {
|
|
@@ -12128,13 +12378,15 @@ class VueElement extends BaseClass {
|
|
|
12128
12378
|
* Only called when shadowRoot is false
|
|
12129
12379
|
*/
|
|
12130
12380
|
_renderSlots() {
|
|
12131
|
-
const outlets =
|
|
12381
|
+
const outlets = this._getSlots();
|
|
12132
12382
|
const scopeId = this._instance.type.__scopeId;
|
|
12383
|
+
const slotReplacements = /* @__PURE__ */ new Map();
|
|
12133
12384
|
for (let i = 0; i < outlets.length; i++) {
|
|
12134
12385
|
const o = outlets[i];
|
|
12135
12386
|
const slotName = o.getAttribute("name") || "default";
|
|
12136
12387
|
const content = this._slots[slotName];
|
|
12137
12388
|
const parent = o.parentNode;
|
|
12389
|
+
const replacementNodes = [];
|
|
12138
12390
|
if (content) {
|
|
12139
12391
|
for (const n of content) {
|
|
12140
12392
|
if (scopeId && n.nodeType === 1) {
|
|
@@ -12147,12 +12399,36 @@ class VueElement extends BaseClass {
|
|
|
12147
12399
|
}
|
|
12148
12400
|
}
|
|
12149
12401
|
parent.insertBefore(n, o);
|
|
12402
|
+
replacementNodes.push(n);
|
|
12150
12403
|
}
|
|
12151
12404
|
} else {
|
|
12152
|
-
while (o.firstChild)
|
|
12405
|
+
while (o.firstChild) {
|
|
12406
|
+
const child = o.firstChild;
|
|
12407
|
+
parent.insertBefore(child, o);
|
|
12408
|
+
replacementNodes.push(child);
|
|
12409
|
+
}
|
|
12153
12410
|
}
|
|
12154
12411
|
parent.removeChild(o);
|
|
12412
|
+
slotReplacements.set(o, replacementNodes);
|
|
12413
|
+
}
|
|
12414
|
+
this._updateSlotNodes(slotReplacements);
|
|
12415
|
+
}
|
|
12416
|
+
/**
|
|
12417
|
+
* @internal
|
|
12418
|
+
*/
|
|
12419
|
+
_getSlots() {
|
|
12420
|
+
const roots = [this];
|
|
12421
|
+
if (this._teleportTargets) {
|
|
12422
|
+
roots.push(...this._teleportTargets);
|
|
12423
|
+
}
|
|
12424
|
+
const slots = /* @__PURE__ */ new Set();
|
|
12425
|
+
for (const root of roots) {
|
|
12426
|
+
const found = root.querySelectorAll("slot");
|
|
12427
|
+
for (let i = 0; i < found.length; i++) {
|
|
12428
|
+
slots.add(found[i]);
|
|
12429
|
+
}
|
|
12155
12430
|
}
|
|
12431
|
+
return Array.from(slots);
|
|
12156
12432
|
}
|
|
12157
12433
|
/**
|
|
12158
12434
|
* @internal
|
|
@@ -12160,6 +12436,22 @@ class VueElement extends BaseClass {
|
|
|
12160
12436
|
_injectChildStyle(comp) {
|
|
12161
12437
|
this._applyStyles(comp.styles, comp);
|
|
12162
12438
|
}
|
|
12439
|
+
/**
|
|
12440
|
+
* @internal
|
|
12441
|
+
*/
|
|
12442
|
+
_beginPatch() {
|
|
12443
|
+
this._patching = true;
|
|
12444
|
+
this._dirty = false;
|
|
12445
|
+
}
|
|
12446
|
+
/**
|
|
12447
|
+
* @internal
|
|
12448
|
+
*/
|
|
12449
|
+
_endPatch() {
|
|
12450
|
+
this._patching = false;
|
|
12451
|
+
if (this._dirty && this._instance) {
|
|
12452
|
+
this._update();
|
|
12453
|
+
}
|
|
12454
|
+
}
|
|
12163
12455
|
/**
|
|
12164
12456
|
* @internal
|
|
12165
12457
|
*/
|
|
@@ -12176,13 +12468,76 @@ class VueElement extends BaseClass {
|
|
|
12176
12468
|
}
|
|
12177
12469
|
}
|
|
12178
12470
|
}
|
|
12471
|
+
class VueElement extends VueElementBase {
|
|
12472
|
+
constructor(def, props = {}, createAppFn = createApp) {
|
|
12473
|
+
super(def, props, createAppFn);
|
|
12474
|
+
}
|
|
12475
|
+
_needsHydration() {
|
|
12476
|
+
if (this.shadowRoot && this._createApp !== createApp) {
|
|
12477
|
+
return true;
|
|
12478
|
+
} else {
|
|
12479
|
+
if (this.shadowRoot) {
|
|
12480
|
+
warn(
|
|
12481
|
+
`Custom element has pre-rendered declarative shadow root but is not defined as hydratable. Use \`defineSSRCustomElement\`.`
|
|
12482
|
+
);
|
|
12483
|
+
}
|
|
12484
|
+
}
|
|
12485
|
+
return false;
|
|
12486
|
+
}
|
|
12487
|
+
_mount(def) {
|
|
12488
|
+
if (!def.name) {
|
|
12489
|
+
def.name = "VueElement";
|
|
12490
|
+
}
|
|
12491
|
+
this._app = this._createApp(def);
|
|
12492
|
+
this._inheritParentContext();
|
|
12493
|
+
if (def.configureApp) {
|
|
12494
|
+
def.configureApp(this._app);
|
|
12495
|
+
}
|
|
12496
|
+
this._app._ceVNode = this._createVNode();
|
|
12497
|
+
this._app.mount(this._root);
|
|
12498
|
+
}
|
|
12499
|
+
_update() {
|
|
12500
|
+
if (!this._app) return;
|
|
12501
|
+
const vnode = this._createVNode();
|
|
12502
|
+
vnode.appContext = this._app._context;
|
|
12503
|
+
render(vnode, this._root);
|
|
12504
|
+
}
|
|
12505
|
+
_unmount() {
|
|
12506
|
+
if (this._app) {
|
|
12507
|
+
this._app.unmount();
|
|
12508
|
+
}
|
|
12509
|
+
if (this._instance && this._instance.ce) {
|
|
12510
|
+
this._instance.ce = void 0;
|
|
12511
|
+
}
|
|
12512
|
+
this._app = this._instance = null;
|
|
12513
|
+
}
|
|
12514
|
+
/**
|
|
12515
|
+
* Only called when shadowRoot is false
|
|
12516
|
+
*/
|
|
12517
|
+
_updateSlotNodes(replacements) {
|
|
12518
|
+
}
|
|
12519
|
+
_createVNode() {
|
|
12520
|
+
const baseProps = {};
|
|
12521
|
+
if (!this.shadowRoot) {
|
|
12522
|
+
baseProps.onVnodeMounted = baseProps.onVnodeUpdated = this._renderSlots.bind(this);
|
|
12523
|
+
}
|
|
12524
|
+
const vnode = createVNode(this._def, extend(baseProps, this._props));
|
|
12525
|
+
if (!this._instance) {
|
|
12526
|
+
vnode.ce = (instance) => {
|
|
12527
|
+
this._instance = instance;
|
|
12528
|
+
this._processInstance();
|
|
12529
|
+
};
|
|
12530
|
+
}
|
|
12531
|
+
return vnode;
|
|
12532
|
+
}
|
|
12533
|
+
}
|
|
12179
12534
|
function useHost(caller) {
|
|
12180
|
-
const
|
|
12181
|
-
const el =
|
|
12535
|
+
const { hasInstance, value } = useInstanceOption("ce", true);
|
|
12536
|
+
const el = value;
|
|
12182
12537
|
if (el) {
|
|
12183
12538
|
return el;
|
|
12184
12539
|
} else {
|
|
12185
|
-
if (!
|
|
12540
|
+
if (!hasInstance) {
|
|
12186
12541
|
warn(
|
|
12187
12542
|
`${caller || "useHost"} called without an active component instance.`
|
|
12188
12543
|
);
|
|
@@ -12201,12 +12556,12 @@ function useShadowRoot() {
|
|
|
12201
12556
|
|
|
12202
12557
|
function useCssModule(name = "$style") {
|
|
12203
12558
|
{
|
|
12204
|
-
const
|
|
12205
|
-
if (!
|
|
12559
|
+
const { hasInstance, value: type } = useInstanceOption("type", true);
|
|
12560
|
+
if (!hasInstance) {
|
|
12206
12561
|
warn(`useCssModule must be called inside setup()`);
|
|
12207
12562
|
return EMPTY_OBJ;
|
|
12208
12563
|
}
|
|
12209
|
-
const modules =
|
|
12564
|
+
const modules = type.__cssModules;
|
|
12210
12565
|
if (!modules) {
|
|
12211
12566
|
warn(`Current instance does not have CSS modules injected.`);
|
|
12212
12567
|
return EMPTY_OBJ;
|
|
@@ -12252,26 +12607,13 @@ const TransitionGroupImpl = /* @__PURE__ */ decorate({
|
|
|
12252
12607
|
prevChildren = [];
|
|
12253
12608
|
return;
|
|
12254
12609
|
}
|
|
12255
|
-
prevChildren.forEach(callPendingCbs);
|
|
12610
|
+
prevChildren.forEach((vnode) => callPendingCbs(vnode.el));
|
|
12256
12611
|
prevChildren.forEach(recordPosition);
|
|
12257
12612
|
const movedChildren = prevChildren.filter(applyTranslation);
|
|
12258
|
-
forceReflow();
|
|
12613
|
+
forceReflow(instance.vnode.el);
|
|
12259
12614
|
movedChildren.forEach((c) => {
|
|
12260
12615
|
const el = c.el;
|
|
12261
|
-
|
|
12262
|
-
addTransitionClass(el, moveClass);
|
|
12263
|
-
style.transform = style.webkitTransform = style.transitionDuration = "";
|
|
12264
|
-
const cb = el[moveCbKey] = (e) => {
|
|
12265
|
-
if (e && e.target !== el) {
|
|
12266
|
-
return;
|
|
12267
|
-
}
|
|
12268
|
-
if (!e || /transform$/.test(e.propertyName)) {
|
|
12269
|
-
el.removeEventListener("transitionend", cb);
|
|
12270
|
-
el[moveCbKey] = null;
|
|
12271
|
-
removeTransitionClass(el, moveClass);
|
|
12272
|
-
}
|
|
12273
|
-
};
|
|
12274
|
-
el.addEventListener("transitionend", cb);
|
|
12616
|
+
handleMovedChildren(el, moveClass);
|
|
12275
12617
|
});
|
|
12276
12618
|
prevChildren = [];
|
|
12277
12619
|
});
|
|
@@ -12294,10 +12636,10 @@ const TransitionGroupImpl = /* @__PURE__ */ decorate({
|
|
|
12294
12636
|
instance
|
|
12295
12637
|
)
|
|
12296
12638
|
);
|
|
12297
|
-
positionMap.set(
|
|
12298
|
-
child,
|
|
12299
|
-
child.el.
|
|
12300
|
-
);
|
|
12639
|
+
positionMap.set(child, {
|
|
12640
|
+
left: child.el.offsetLeft,
|
|
12641
|
+
top: child.el.offsetTop
|
|
12642
|
+
});
|
|
12301
12643
|
}
|
|
12302
12644
|
}
|
|
12303
12645
|
}
|
|
@@ -12318,8 +12660,7 @@ const TransitionGroupImpl = /* @__PURE__ */ decorate({
|
|
|
12318
12660
|
}
|
|
12319
12661
|
});
|
|
12320
12662
|
const TransitionGroup = TransitionGroupImpl;
|
|
12321
|
-
function callPendingCbs(
|
|
12322
|
-
const el = c.el;
|
|
12663
|
+
function callPendingCbs(el) {
|
|
12323
12664
|
if (el[moveCbKey]) {
|
|
12324
12665
|
el[moveCbKey]();
|
|
12325
12666
|
}
|
|
@@ -12328,19 +12669,30 @@ function callPendingCbs(c) {
|
|
|
12328
12669
|
}
|
|
12329
12670
|
}
|
|
12330
12671
|
function recordPosition(c) {
|
|
12331
|
-
newPositionMap.set(c,
|
|
12672
|
+
newPositionMap.set(c, {
|
|
12673
|
+
left: c.el.offsetLeft,
|
|
12674
|
+
top: c.el.offsetTop
|
|
12675
|
+
});
|
|
12332
12676
|
}
|
|
12333
12677
|
function applyTranslation(c) {
|
|
12334
|
-
|
|
12335
|
-
|
|
12678
|
+
if (baseApplyTranslation(
|
|
12679
|
+
positionMap.get(c),
|
|
12680
|
+
newPositionMap.get(c),
|
|
12681
|
+
c.el
|
|
12682
|
+
)) {
|
|
12683
|
+
return c;
|
|
12684
|
+
}
|
|
12685
|
+
}
|
|
12686
|
+
function baseApplyTranslation(oldPos, newPos, el) {
|
|
12336
12687
|
const dx = oldPos.left - newPos.left;
|
|
12337
12688
|
const dy = oldPos.top - newPos.top;
|
|
12338
12689
|
if (dx || dy) {
|
|
12339
|
-
const s =
|
|
12690
|
+
const s = el.style;
|
|
12340
12691
|
s.transform = s.webkitTransform = `translate(${dx}px,${dy}px)`;
|
|
12341
12692
|
s.transitionDuration = "0s";
|
|
12342
|
-
return
|
|
12693
|
+
return true;
|
|
12343
12694
|
}
|
|
12695
|
+
return false;
|
|
12344
12696
|
}
|
|
12345
12697
|
function hasCSSTransform(el, root, moveClass) {
|
|
12346
12698
|
const clone = el.cloneNode();
|
|
@@ -12358,6 +12710,22 @@ function hasCSSTransform(el, root, moveClass) {
|
|
|
12358
12710
|
container.removeChild(clone);
|
|
12359
12711
|
return hasTransform;
|
|
12360
12712
|
}
|
|
12713
|
+
const handleMovedChildren = (el, moveClass) => {
|
|
12714
|
+
const style = el.style;
|
|
12715
|
+
addTransitionClass(el, moveClass);
|
|
12716
|
+
style.transform = style.webkitTransform = style.transitionDuration = "";
|
|
12717
|
+
const cb = el[moveCbKey] = (e) => {
|
|
12718
|
+
if (e && e.target !== el) {
|
|
12719
|
+
return;
|
|
12720
|
+
}
|
|
12721
|
+
if (!e || e.propertyName.endsWith("transform")) {
|
|
12722
|
+
el.removeEventListener("transitionend", cb);
|
|
12723
|
+
el[moveCbKey] = null;
|
|
12724
|
+
removeTransitionClass(el, moveClass);
|
|
12725
|
+
}
|
|
12726
|
+
};
|
|
12727
|
+
el.addEventListener("transitionend", cb);
|
|
12728
|
+
};
|
|
12361
12729
|
|
|
12362
12730
|
const getModelAssigner = (vnode) => {
|
|
12363
12731
|
const fn = vnode.props["onUpdate:modelValue"] || false;
|
|
@@ -12393,21 +12761,21 @@ const vModelText = {
|
|
|
12393
12761
|
vModelTextUpdate(el, oldValue, value, trim, number, lazy);
|
|
12394
12762
|
}
|
|
12395
12763
|
};
|
|
12764
|
+
function castValue(value, trim, number) {
|
|
12765
|
+
if (trim) value = value.trim();
|
|
12766
|
+
if (number) value = looseToNumber(value);
|
|
12767
|
+
return value;
|
|
12768
|
+
}
|
|
12396
12769
|
const vModelTextInit = (el, trim, number, lazy, set) => {
|
|
12397
12770
|
addEventListener(el, lazy ? "change" : "input", (e) => {
|
|
12398
12771
|
if (e.target.composing) return;
|
|
12399
|
-
|
|
12400
|
-
|
|
12401
|
-
|
|
12402
|
-
}
|
|
12403
|
-
if (number || el.type === "number") {
|
|
12404
|
-
domValue = looseToNumber(domValue);
|
|
12405
|
-
}
|
|
12406
|
-
(0, el[assignKey])(domValue);
|
|
12772
|
+
(0, el[assignKey])(
|
|
12773
|
+
castValue(el.value, trim, number || el.type === "number")
|
|
12774
|
+
);
|
|
12407
12775
|
});
|
|
12408
|
-
if (trim) {
|
|
12776
|
+
if (trim || number) {
|
|
12409
12777
|
addEventListener(el, "change", () => {
|
|
12410
|
-
el.value = el.value.
|
|
12778
|
+
el.value = castValue(el.value, trim, number || el.type === "number");
|
|
12411
12779
|
});
|
|
12412
12780
|
}
|
|
12413
12781
|
if (!lazy) {
|
|
@@ -12690,13 +13058,13 @@ const modifierGuards = {
|
|
|
12690
13058
|
const withModifiers = (fn, modifiers) => {
|
|
12691
13059
|
const cache = fn._withMods || (fn._withMods = {});
|
|
12692
13060
|
const cacheKey = modifiers.join(".");
|
|
12693
|
-
return cache[cacheKey] || (cache[cacheKey] = (event, ...args) => {
|
|
13061
|
+
return cache[cacheKey] || (cache[cacheKey] = ((event, ...args) => {
|
|
12694
13062
|
for (let i = 0; i < modifiers.length; i++) {
|
|
12695
13063
|
const guard = modifierGuards[modifiers[i]];
|
|
12696
13064
|
if (guard && guard(event, modifiers)) return;
|
|
12697
13065
|
}
|
|
12698
13066
|
return fn(event, ...args);
|
|
12699
|
-
});
|
|
13067
|
+
}));
|
|
12700
13068
|
};
|
|
12701
13069
|
const keyNames = {
|
|
12702
13070
|
esc: "escape",
|
|
@@ -12710,7 +13078,7 @@ const keyNames = {
|
|
|
12710
13078
|
const withKeys = (fn, modifiers) => {
|
|
12711
13079
|
const cache = fn._withKeys || (fn._withKeys = {});
|
|
12712
13080
|
const cacheKey = modifiers.join(".");
|
|
12713
|
-
return cache[cacheKey] || (cache[cacheKey] = (event) => {
|
|
13081
|
+
return cache[cacheKey] || (cache[cacheKey] = ((event) => {
|
|
12714
13082
|
if (!("key" in event)) {
|
|
12715
13083
|
return;
|
|
12716
13084
|
}
|
|
@@ -12720,7 +13088,7 @@ const withKeys = (fn, modifiers) => {
|
|
|
12720
13088
|
)) {
|
|
12721
13089
|
return fn(event);
|
|
12722
13090
|
}
|
|
12723
|
-
});
|
|
13091
|
+
}));
|
|
12724
13092
|
};
|
|
12725
13093
|
|
|
12726
13094
|
const rendererOptions = /* @__PURE__ */ extend({ patchProp }, nodeOps);
|
|
@@ -12734,13 +13102,13 @@ function ensureHydrationRenderer() {
|
|
|
12734
13102
|
enabledHydration = true;
|
|
12735
13103
|
return renderer;
|
|
12736
13104
|
}
|
|
12737
|
-
const render = (...args) => {
|
|
13105
|
+
const render = ((...args) => {
|
|
12738
13106
|
ensureRenderer().render(...args);
|
|
12739
|
-
};
|
|
12740
|
-
const hydrate = (...args) => {
|
|
13107
|
+
});
|
|
13108
|
+
const hydrate = ((...args) => {
|
|
12741
13109
|
ensureHydrationRenderer().hydrate(...args);
|
|
12742
|
-
};
|
|
12743
|
-
const createApp = (...args) => {
|
|
13110
|
+
});
|
|
13111
|
+
const createApp = ((...args) => {
|
|
12744
13112
|
const app = ensureRenderer().createApp(...args);
|
|
12745
13113
|
{
|
|
12746
13114
|
injectNativeTagCheck(app);
|
|
@@ -12765,8 +13133,8 @@ const createApp = (...args) => {
|
|
|
12765
13133
|
return proxy;
|
|
12766
13134
|
};
|
|
12767
13135
|
return app;
|
|
12768
|
-
};
|
|
12769
|
-
const createSSRApp = (...args) => {
|
|
13136
|
+
});
|
|
13137
|
+
const createSSRApp = ((...args) => {
|
|
12770
13138
|
const app = ensureHydrationRenderer().createApp(...args);
|
|
12771
13139
|
{
|
|
12772
13140
|
injectNativeTagCheck(app);
|
|
@@ -12780,7 +13148,7 @@ const createSSRApp = (...args) => {
|
|
|
12780
13148
|
}
|
|
12781
13149
|
};
|
|
12782
13150
|
return app;
|
|
12783
|
-
};
|
|
13151
|
+
});
|
|
12784
13152
|
function resolveRootNamespace(container) {
|
|
12785
13153
|
if (container instanceof SVGElement) {
|
|
12786
13154
|
return "svg";
|
|
@@ -12850,4 +13218,4 @@ const initDirectivesForSSR = () => {
|
|
|
12850
13218
|
}
|
|
12851
13219
|
} ;
|
|
12852
13220
|
|
|
12853
|
-
export { BaseTransition, BaseTransitionPropsValidators, Comment, DeprecationTypes, EffectScope, ErrorCodes, ErrorTypeStrings, Fragment, KeepAlive, ReactiveEffect, Static, Suspense, Teleport, Text, TrackOpTypes, Transition, TransitionGroup, TriggerOpTypes, VueElement, assertNumber, callWithAsyncErrorHandling, callWithErrorHandling, camelize, capitalize, cloneVNode, compatUtils, computed, createApp, createBlock, createCommentVNode, createElementBlock, createBaseVNode as createElementVNode, createHydrationRenderer, createPropsRestProxy, createRenderer, createSSRApp, createSlots, createStaticVNode, createTextVNode, createVNode, customRef, defineAsyncComponent, defineComponent, defineCustomElement, defineEmits, defineExpose, defineModel, defineOptions, defineProps, defineSSRCustomElement, defineSlots, devtools, effect, effectScope, getCurrentInstance, getCurrentScope, getCurrentWatcher, getTransitionRawChildren, guardReactiveProps, h, handleError, hasInjectionContext, hydrate, hydrateOnIdle, hydrateOnInteraction, hydrateOnMediaQuery, hydrateOnVisible, initCustomFormatter, initDirectivesForSSR, inject, isMemoSame, isProxy, isReactive, isReadonly, isRef, isRuntimeOnly, isShallow, isVNode, markRaw, mergeDefaults, mergeModels, mergeProps, nextTick, normalizeClass, normalizeProps, normalizeStyle, onActivated, onBeforeMount, onBeforeUnmount, onBeforeUpdate, onDeactivated, onErrorCaptured, onMounted, onRenderTracked, onRenderTriggered, onScopeDispose, onServerPrefetch, onUnmounted, onUpdated, onWatcherCleanup, openBlock, popScopeId, provide, proxyRefs, pushScopeId, queuePostFlushCb, reactive, readonly, ref, registerRuntimeCompiler, render, renderList, renderSlot, resolveComponent, resolveDirective, resolveDynamicComponent, resolveFilter, resolveTransitionHooks, setBlockTracking, setDevtoolsHook, setTransitionHooks, shallowReactive, shallowReadonly, shallowRef, ssrContextKey, ssrUtils, stop, toDisplayString, toHandlerKey, toHandlers, toRaw, toRef, toRefs, toValue, transformVNodeArgs, triggerRef, unref, useAttrs, useCssModule, useCssVars, useHost, useId, useModel, useSSRContext, useShadowRoot, useSlots, useTemplateRef, useTransitionState, vModelCheckbox, vModelDynamic, vModelRadio, vModelSelect, vModelText, vShow, version, warn, watch, watchEffect, watchPostEffect, watchSyncEffect, withAsyncContext, withCtx, withDefaults, withDirectives, withKeys, withMemo, withModifiers, withScopeId };
|
|
13221
|
+
export { BaseTransition, BaseTransitionPropsValidators, Comment, DeprecationTypes, EffectScope, ErrorCodes, ErrorTypeStrings, Fragment, KeepAlive, ReactiveEffect, Static, Suspense, Teleport, Text, TrackOpTypes, Transition, TransitionGroup, TriggerOpTypes, VueElement, VueElementBase, assertNumber, callWithAsyncErrorHandling, callWithErrorHandling, camelize, capitalize, cloneVNode, compatUtils, computed, createApp, createBlock, createCommentVNode, createElementBlock, createBaseVNode as createElementVNode, createHydrationRenderer, createPropsRestProxy, createRenderer, createSSRApp, createSlots, createStaticVNode, createTextVNode, createVNode, customRef, defineAsyncComponent, defineComponent, defineCustomElement, defineEmits, defineExpose, defineModel, defineOptions, defineProps, defineSSRCustomElement, defineSlots, devtools, effect, effectScope, getCurrentInstance, getCurrentScope, getCurrentWatcher, getTransitionRawChildren, guardReactiveProps, h, handleError, hasInjectionContext, hydrate, hydrateOnIdle, hydrateOnInteraction, hydrateOnMediaQuery, hydrateOnVisible, initCustomFormatter, initDirectivesForSSR, inject, isMemoSame, isProxy, isReactive, isReadonly, isRef, isRuntimeOnly, isShallow, isVNode, markRaw, mergeDefaults, mergeModels, mergeProps, nextTick, nodeOps, normalizeClass, normalizeProps, normalizeStyle, onActivated, onBeforeMount, onBeforeUnmount, onBeforeUpdate, onDeactivated, onErrorCaptured, onMounted, onRenderTracked, onRenderTriggered, onScopeDispose, onServerPrefetch, onUnmounted, onUpdated, onWatcherCleanup, openBlock, patchProp, popScopeId, provide, proxyRefs, pushScopeId, queuePostFlushCb, reactive, readonly, ref, registerRuntimeCompiler, render, renderList, renderSlot, resolveComponent, resolveDirective, resolveDynamicComponent, resolveFilter, resolveTransitionHooks, setBlockTracking, setDevtoolsHook, setTransitionHooks, shallowReactive, shallowReadonly, shallowRef, ssrContextKey, ssrUtils, stop, toDisplayString, toHandlerKey, toHandlers, toRaw, toRef, toRefs, toValue, transformVNodeArgs, triggerRef, unref, useAttrs, useCssModule, useCssVars, useHost, useId, useInstanceOption, useModel, useSSRContext, useShadowRoot, useSlots, useTemplateRef, useTransitionState, vModelCheckbox, vModelDynamic, vModelRadio, vModelSelect, vModelText, vShow, version, warn, watch, watchEffect, watchPostEffect, watchSyncEffect, withAsyncContext, withCtx, withDefaults, withDirectives, withKeys, withMemo, withModifiers, withScopeId };
|