@vue/compat 3.5.43 → 3.5.45
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/dist/vue.cjs.js +581 -232
- package/dist/vue.cjs.prod.js +589 -216
- package/dist/vue.esm-browser.js +570 -222
- package/dist/vue.esm-browser.prod.js +10 -10
- package/dist/vue.esm-bundler.js +572 -224
- package/dist/vue.global.js +570 -222
- package/dist/vue.global.prod.js +10 -10
- package/dist/vue.runtime.esm-browser.js +558 -217
- package/dist/vue.runtime.esm-browser.prod.js +4 -4
- package/dist/vue.runtime.esm-bundler.js +560 -219
- package/dist/vue.runtime.global.js +558 -217
- package/dist/vue.runtime.global.prod.js +4 -4
- package/package.json +4 -4
package/dist/vue.esm-browser.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/compat v3.5.
|
|
2
|
+
* @vue/compat v3.5.45
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -61,24 +61,20 @@ const cacheStringFunction = (fn) => {
|
|
|
61
61
|
});
|
|
62
62
|
};
|
|
63
63
|
const camelizeRE = /-\w/g;
|
|
64
|
-
const camelize = cacheStringFunction(
|
|
65
|
-
(
|
|
66
|
-
|
|
67
|
-
}
|
|
68
|
-
);
|
|
64
|
+
const camelize = /* @__PURE__ */ cacheStringFunction((str) => {
|
|
65
|
+
return str.replace(camelizeRE, (c) => c.slice(1).toUpperCase());
|
|
66
|
+
});
|
|
69
67
|
const hyphenateRE = /\B([A-Z])/g;
|
|
70
|
-
const hyphenate = cacheStringFunction(
|
|
68
|
+
const hyphenate = /* @__PURE__ */ cacheStringFunction(
|
|
71
69
|
(str) => str.replace(hyphenateRE, "-$1").toLowerCase()
|
|
72
70
|
);
|
|
73
|
-
const capitalize = cacheStringFunction((str) => {
|
|
71
|
+
const capitalize = /* @__PURE__ */ cacheStringFunction((str) => {
|
|
74
72
|
return str.charAt(0).toUpperCase() + str.slice(1);
|
|
75
73
|
});
|
|
76
|
-
const toHandlerKey = cacheStringFunction(
|
|
77
|
-
(str)
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
}
|
|
81
|
-
);
|
|
74
|
+
const toHandlerKey = /* @__PURE__ */ cacheStringFunction((str) => {
|
|
75
|
+
const s = str ? `on${capitalize(str)}` : ``;
|
|
76
|
+
return s;
|
|
77
|
+
});
|
|
82
78
|
const hasChanged = (value, oldValue) => !Object.is(value, oldValue);
|
|
83
79
|
const invokeArrayFns = (fns, ...arg) => {
|
|
84
80
|
for (let i = 0; i < fns.length; i++) {
|
|
@@ -264,7 +260,7 @@ const isSVGTag = /* @__PURE__ */ makeMap(SVG_TAGS);
|
|
|
264
260
|
const isMathMLTag = /* @__PURE__ */ makeMap(MATH_TAGS);
|
|
265
261
|
const isVoidTag = /* @__PURE__ */ makeMap(VOID_TAGS);
|
|
266
262
|
|
|
267
|
-
const specialBooleanAttrs = `itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly`;
|
|
263
|
+
const specialBooleanAttrs = `itemscope,allowfullscreen,disablepictureinpicture,disableremoteplayback,formnovalidate,ismap,nomodule,novalidate,playsinline,readonly`;
|
|
268
264
|
const isSpecialBooleanAttr = /* @__PURE__ */ makeMap(specialBooleanAttrs);
|
|
269
265
|
const isBooleanAttr = /* @__PURE__ */ makeMap(
|
|
270
266
|
specialBooleanAttrs + `,async,autofocus,autoplay,controls,default,defer,disabled,inert,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected`
|
|
@@ -608,7 +604,11 @@ function getCurrentScope() {
|
|
|
608
604
|
}
|
|
609
605
|
function onScopeDispose(fn, failSilently = false) {
|
|
610
606
|
if (activeEffectScope) {
|
|
611
|
-
activeEffectScope.
|
|
607
|
+
if (activeEffectScope.active) {
|
|
608
|
+
activeEffectScope.cleanups.push(fn);
|
|
609
|
+
} else {
|
|
610
|
+
fn();
|
|
611
|
+
}
|
|
612
612
|
} else if (!failSilently) {
|
|
613
613
|
warn$2(
|
|
614
614
|
`onScopeDispose() is called when there is no active effect scope to be associated with.`
|
|
@@ -1312,19 +1312,41 @@ const arrayInstrumentations = {
|
|
|
1312
1312
|
};
|
|
1313
1313
|
function iterator(self, method, wrapValue) {
|
|
1314
1314
|
const arr = shallowReadArray(self);
|
|
1315
|
-
const
|
|
1315
|
+
const methodFn = arr[method];
|
|
1316
|
+
const iter = methodFn.call(arr);
|
|
1316
1317
|
if (arr !== self && !isShallow(self)) {
|
|
1317
|
-
iter.
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
if (
|
|
1321
|
-
|
|
1318
|
+
if (iter[Symbol.toStringTag] === "Array Iterator") {
|
|
1319
|
+
const wrapped = Object.create(Object.getPrototypeOf(iter));
|
|
1320
|
+
wrapped.next = () => wrapResult(iter.next(), wrapValue);
|
|
1321
|
+
if (methodFn !== arrayProto[method]) {
|
|
1322
|
+
Object.defineProperties(wrapped, {
|
|
1323
|
+
return: {
|
|
1324
|
+
get() {
|
|
1325
|
+
const fn = iter.return;
|
|
1326
|
+
return typeof fn === "function" ? fn.bind(iter) : fn;
|
|
1327
|
+
}
|
|
1328
|
+
},
|
|
1329
|
+
throw: {
|
|
1330
|
+
get() {
|
|
1331
|
+
const fn = iter.throw;
|
|
1332
|
+
return typeof fn === "function" ? fn.bind(iter) : fn;
|
|
1333
|
+
}
|
|
1334
|
+
}
|
|
1335
|
+
});
|
|
1322
1336
|
}
|
|
1323
|
-
return
|
|
1324
|
-
}
|
|
1337
|
+
return wrapped;
|
|
1338
|
+
}
|
|
1339
|
+
iter._next = iter.next;
|
|
1340
|
+
iter.next = () => wrapResult(iter._next(), wrapValue);
|
|
1325
1341
|
}
|
|
1326
1342
|
return iter;
|
|
1327
1343
|
}
|
|
1344
|
+
function wrapResult(result, wrapValue) {
|
|
1345
|
+
if (!result.done) {
|
|
1346
|
+
result.value = wrapValue(result.value);
|
|
1347
|
+
}
|
|
1348
|
+
return result;
|
|
1349
|
+
}
|
|
1328
1350
|
const arrayProto = Array.prototype;
|
|
1329
1351
|
function apply(self, method, fn, thisArg, wrappedRetFn, args) {
|
|
1330
1352
|
const arr = shallowReadArray(self);
|
|
@@ -1393,7 +1415,7 @@ function noTracking(self, method, args = []) {
|
|
|
1393
1415
|
}
|
|
1394
1416
|
|
|
1395
1417
|
const isNonTrackableKeys = /* @__PURE__ */ makeMap(`__proto__,__v_isRef,__isVue`);
|
|
1396
|
-
const builtInSymbols = new Set(
|
|
1418
|
+
const builtInSymbols = /* @__PURE__ */ new Set(
|
|
1397
1419
|
/* @__PURE__ */ Object.getOwnPropertyNames(Symbol).filter((key) => key !== "arguments" && key !== "caller").map((key) => Symbol[key]).filter(isSymbol)
|
|
1398
1420
|
);
|
|
1399
1421
|
function hasOwnProperty(key) {
|
|
@@ -1747,6 +1769,8 @@ function createInstrumentationGetter(isReadonly2, shallow) {
|
|
|
1747
1769
|
return !isReadonly2;
|
|
1748
1770
|
} else if (key === "__v_isReadonly") {
|
|
1749
1771
|
return isReadonly2;
|
|
1772
|
+
} else if (key === "__v_isShallow") {
|
|
1773
|
+
return shallow;
|
|
1750
1774
|
} else if (key === "__v_raw") {
|
|
1751
1775
|
return target;
|
|
1752
1776
|
}
|
|
@@ -2292,9 +2316,11 @@ function watch$1(source, cb, options = EMPTY_OBJ) {
|
|
|
2292
2316
|
if (once && cb) {
|
|
2293
2317
|
const _cb = cb;
|
|
2294
2318
|
cb = (...args) => {
|
|
2295
|
-
|
|
2296
|
-
|
|
2297
|
-
|
|
2319
|
+
try {
|
|
2320
|
+
return _cb(...args);
|
|
2321
|
+
} finally {
|
|
2322
|
+
watchHandle();
|
|
2323
|
+
}
|
|
2298
2324
|
};
|
|
2299
2325
|
}
|
|
2300
2326
|
let oldValue = isMultiSource ? new Array(source.length).fill(INITIAL_WATCHER_VALUE) : INITIAL_WATCHER_VALUE;
|
|
@@ -2305,12 +2331,13 @@ function watch$1(source, cb, options = EMPTY_OBJ) {
|
|
|
2305
2331
|
if (cb) {
|
|
2306
2332
|
const newValue = effect.run();
|
|
2307
2333
|
if (immediateFirstRun || deep || forceTrigger || (isMultiSource ? newValue.some((v, i) => hasChanged(v, oldValue[i])) : hasChanged(newValue, oldValue))) {
|
|
2308
|
-
if (cleanup) {
|
|
2309
|
-
cleanup();
|
|
2310
|
-
}
|
|
2311
2334
|
const currentWatcher = activeWatcher;
|
|
2312
|
-
|
|
2335
|
+
pauseTracking();
|
|
2313
2336
|
try {
|
|
2337
|
+
if (cleanup) {
|
|
2338
|
+
cleanup();
|
|
2339
|
+
}
|
|
2340
|
+
activeWatcher = effect;
|
|
2314
2341
|
const args = [
|
|
2315
2342
|
newValue,
|
|
2316
2343
|
// pass undefined as the old value when it's changed for the first time
|
|
@@ -2324,6 +2351,7 @@ function watch$1(source, cb, options = EMPTY_OBJ) {
|
|
|
2324
2351
|
);
|
|
2325
2352
|
} finally {
|
|
2326
2353
|
activeWatcher = currentWatcher;
|
|
2354
|
+
resetTracking();
|
|
2327
2355
|
}
|
|
2328
2356
|
}
|
|
2329
2357
|
} else {
|
|
@@ -2597,7 +2625,7 @@ function callWithAsyncErrorHandling(fn, instance, type, args) {
|
|
|
2597
2625
|
const res = callWithErrorHandling(fn, instance, type, args);
|
|
2598
2626
|
if (res && isPromise(res)) {
|
|
2599
2627
|
res.catch((err) => {
|
|
2600
|
-
handleError(err, instance, type);
|
|
2628
|
+
handleError(err, instance, type, void 0, true);
|
|
2601
2629
|
});
|
|
2602
2630
|
}
|
|
2603
2631
|
return res;
|
|
@@ -2614,7 +2642,7 @@ function callWithAsyncErrorHandling(fn, instance, type, args) {
|
|
|
2614
2642
|
);
|
|
2615
2643
|
}
|
|
2616
2644
|
}
|
|
2617
|
-
function handleError(err, instance, type, throwInDev = true) {
|
|
2645
|
+
function handleError(err, instance, type, throwInDev = true, isAsyncError = false) {
|
|
2618
2646
|
const contextVNode = instance ? instance.vnode : null;
|
|
2619
2647
|
const { errorHandler, throwUnhandledErrorInProduction } = instance && instance.appContext.config || EMPTY_OBJ;
|
|
2620
2648
|
if (instance) {
|
|
@@ -2623,7 +2651,9 @@ function handleError(err, instance, type, throwInDev = true) {
|
|
|
2623
2651
|
const errorInfo = ErrorTypeStrings$1[type] ;
|
|
2624
2652
|
while (cur) {
|
|
2625
2653
|
const errorCapturedHooks = cur.ec;
|
|
2626
|
-
if (errorCapturedHooks
|
|
2654
|
+
if (errorCapturedHooks && !cur.isUnmounted && // Async failures may outlive stopped scopes whose unmount effects
|
|
2655
|
+
// are deferred or discarded by Suspense.
|
|
2656
|
+
(!isAsyncError || cur.scope.active)) {
|
|
2627
2657
|
for (let i = 0; i < errorCapturedHooks.length; i++) {
|
|
2628
2658
|
if (errorCapturedHooks[i](err, exposedInstance, errorInfo) === false) {
|
|
2629
2659
|
return;
|
|
@@ -2724,21 +2754,21 @@ function queuePostFlushCb(cb) {
|
|
|
2724
2754
|
}
|
|
2725
2755
|
queueFlush();
|
|
2726
2756
|
}
|
|
2727
|
-
function flushPreFlushCbs(instance, seen, i = flushIndex + 1) {
|
|
2757
|
+
function flushPreFlushCbs(instance, minUid, seen, i = flushIndex + 1) {
|
|
2728
2758
|
{
|
|
2729
2759
|
seen = seen || /* @__PURE__ */ new Map();
|
|
2730
2760
|
}
|
|
2731
2761
|
for (; i < queue.length; i++) {
|
|
2732
2762
|
const cb = queue[i];
|
|
2733
2763
|
if (cb && cb.flags & 2) {
|
|
2734
|
-
if (instance && cb.id !== instance.uid) {
|
|
2764
|
+
if (instance && cb.id !== instance.uid || minUid !== void 0 && !(cb.id >= minUid)) {
|
|
2735
2765
|
continue;
|
|
2736
2766
|
}
|
|
2737
2767
|
if (checkRecursiveUpdates(seen, cb)) {
|
|
2738
2768
|
continue;
|
|
2739
2769
|
}
|
|
2740
2770
|
queue.splice(i, 1);
|
|
2741
|
-
i
|
|
2771
|
+
i = instance ? i - 1 : flushIndex;
|
|
2742
2772
|
if (cb.flags & 4) {
|
|
2743
2773
|
cb.flags &= -2;
|
|
2744
2774
|
}
|
|
@@ -2749,12 +2779,23 @@ function flushPreFlushCbs(instance, seen, i = flushIndex + 1) {
|
|
|
2749
2779
|
}
|
|
2750
2780
|
}
|
|
2751
2781
|
}
|
|
2752
|
-
function flushPostFlushCbs(seen) {
|
|
2782
|
+
function flushPostFlushCbs(seen, skip, minUid = 0) {
|
|
2753
2783
|
if (pendingPostFlushCbs.length) {
|
|
2754
|
-
|
|
2755
|
-
|
|
2756
|
-
)
|
|
2757
|
-
|
|
2784
|
+
let cbs = pendingPostFlushCbs;
|
|
2785
|
+
let kept = 0;
|
|
2786
|
+
if (skip) {
|
|
2787
|
+
cbs = [];
|
|
2788
|
+
for (let i = 0; i < pendingPostFlushCbs.length; i++) {
|
|
2789
|
+
const cb = pendingPostFlushCbs[i];
|
|
2790
|
+
if (cb.i !== void 0 ? !cb.i || cb.i.uid < minUid : skip.has(cb)) {
|
|
2791
|
+
pendingPostFlushCbs[kept++] = cb;
|
|
2792
|
+
} else {
|
|
2793
|
+
cbs.push(cb);
|
|
2794
|
+
}
|
|
2795
|
+
}
|
|
2796
|
+
}
|
|
2797
|
+
const deduped = [...new Set(cbs)].sort((a, b) => getId(a) - getId(b));
|
|
2798
|
+
pendingPostFlushCbs.length = kept;
|
|
2758
2799
|
if (activePostFlushCbs) {
|
|
2759
2800
|
for (let i = 0; i < deduped.length; i++) {
|
|
2760
2801
|
activePostFlushCbs.push(deduped[i]);
|
|
@@ -2780,6 +2821,22 @@ function flushPostFlushCbs(seen) {
|
|
|
2780
2821
|
postFlushIndex = 0;
|
|
2781
2822
|
}
|
|
2782
2823
|
}
|
|
2824
|
+
let isFlushing = false;
|
|
2825
|
+
function flushOnAppMount(fn, minUid) {
|
|
2826
|
+
if (isFlushing) {
|
|
2827
|
+
fn();
|
|
2828
|
+
return;
|
|
2829
|
+
}
|
|
2830
|
+
const queued = minUid === void 0 ? void 0 : new Set(pendingPostFlushCbs);
|
|
2831
|
+
fn();
|
|
2832
|
+
isFlushing = true;
|
|
2833
|
+
try {
|
|
2834
|
+
flushPreFlushCbs(void 0, minUid);
|
|
2835
|
+
flushPostFlushCbs(void 0, queued, minUid);
|
|
2836
|
+
} finally {
|
|
2837
|
+
isFlushing = false;
|
|
2838
|
+
}
|
|
2839
|
+
}
|
|
2783
2840
|
const getId = (job) => job.id == null ? job.flags & 2 ? -1 : Infinity : job.id;
|
|
2784
2841
|
function flushJobs(seen) {
|
|
2785
2842
|
{
|
|
@@ -2924,14 +2981,32 @@ function reload(id, newComp) {
|
|
|
2924
2981
|
instance.ceReload(newComp.styles);
|
|
2925
2982
|
dirtyInstances.delete(instance);
|
|
2926
2983
|
} else if (instance.parent) {
|
|
2927
|
-
|
|
2928
|
-
if (!
|
|
2929
|
-
|
|
2984
|
+
const update = () => {
|
|
2985
|
+
if (!instance.scope.active) return;
|
|
2986
|
+
const pending = instance.asyncDep && !instance.asyncResolved ? instance : locateUnresolvedAsyncRoot(instance.parent);
|
|
2987
|
+
if (pending) {
|
|
2988
|
+
pending.asyncDep.catch(NOOP).then(() => {
|
|
2989
|
+
if (instance.scope.active && (pending.asyncResolved || !pending.scope.active)) {
|
|
2990
|
+
queueJob(update);
|
|
2991
|
+
}
|
|
2992
|
+
});
|
|
2993
|
+
return;
|
|
2994
|
+
}
|
|
2995
|
+
dirtyInstances = hmrDirtyComponents.get(oldComp);
|
|
2996
|
+
if (!dirtyInstances) {
|
|
2997
|
+
hmrDirtyComponents.set(oldComp, dirtyInstances = /* @__PURE__ */ new Set());
|
|
2998
|
+
}
|
|
2999
|
+
dirtyInstances.add(instance);
|
|
3000
|
+
isHmrUpdating = true;
|
|
3001
|
+
try {
|
|
2930
3002
|
instance.parent.update();
|
|
3003
|
+
} finally {
|
|
2931
3004
|
isHmrUpdating = false;
|
|
2932
3005
|
dirtyInstances.delete(instance);
|
|
3006
|
+
queuePostFlushCb(() => hmrDirtyComponents.clear());
|
|
2933
3007
|
}
|
|
2934
|
-
}
|
|
3008
|
+
};
|
|
3009
|
+
queueJob(update);
|
|
2935
3010
|
} else if (instance.appContext.reload) {
|
|
2936
3011
|
instance.appContext.reload();
|
|
2937
3012
|
} else if (typeof window !== "undefined") {
|
|
@@ -3613,12 +3688,31 @@ function withDirectives(vnode, directives) {
|
|
|
3613
3688
|
return vnode;
|
|
3614
3689
|
}
|
|
3615
3690
|
function invokeDirectiveHook(vnode, prevVNode, instance, name) {
|
|
3616
|
-
|
|
3691
|
+
let hookVNode = vnode;
|
|
3692
|
+
if (name === "beforeMount") {
|
|
3693
|
+
vnode._mount = vnode;
|
|
3694
|
+
} else if (name === "beforeUpdate") {
|
|
3695
|
+
const mount = prevVNode && prevVNode._mount;
|
|
3696
|
+
if (mount) {
|
|
3697
|
+
mount._latest = vnode;
|
|
3698
|
+
vnode._mount = mount;
|
|
3699
|
+
}
|
|
3700
|
+
} else if (name === "mounted") {
|
|
3701
|
+
const latest = vnode._latest;
|
|
3702
|
+
vnode._mount = vnode._latest = void 0;
|
|
3703
|
+
if (latest) {
|
|
3704
|
+
hookVNode = latest;
|
|
3705
|
+
latest._mount = void 0;
|
|
3706
|
+
}
|
|
3707
|
+
}
|
|
3708
|
+
const bindings = hookVNode.dirs;
|
|
3617
3709
|
const oldBindings = prevVNode && prevVNode.dirs;
|
|
3618
3710
|
for (let i = 0; i < bindings.length; i++) {
|
|
3619
|
-
|
|
3711
|
+
let binding = bindings[i];
|
|
3620
3712
|
if (oldBindings) {
|
|
3621
3713
|
binding.oldValue = oldBindings[i].value;
|
|
3714
|
+
} else if (name === "mounted" && binding.oldValue !== void 0) {
|
|
3715
|
+
binding = extend({}, binding, { oldValue: void 0 });
|
|
3622
3716
|
}
|
|
3623
3717
|
let hook = binding.dir[name];
|
|
3624
3718
|
if (!hook) {
|
|
@@ -3629,7 +3723,7 @@ function invokeDirectiveHook(vnode, prevVNode, instance, name) {
|
|
|
3629
3723
|
callWithAsyncErrorHandling(hook, instance, 8, [
|
|
3630
3724
|
vnode.el,
|
|
3631
3725
|
binding,
|
|
3632
|
-
|
|
3726
|
+
hookVNode,
|
|
3633
3727
|
prevVNode
|
|
3634
3728
|
]);
|
|
3635
3729
|
resetTracking();
|
|
@@ -3750,6 +3844,7 @@ function doWatch(source, cb, options = EMPTY_OBJ) {
|
|
|
3750
3844
|
let isPre = false;
|
|
3751
3845
|
if (flush === "post") {
|
|
3752
3846
|
baseWatchOptions.scheduler = (job) => {
|
|
3847
|
+
job.i = instance;
|
|
3753
3848
|
queuePostRenderEffect(job, instance && instance.suspense);
|
|
3754
3849
|
};
|
|
3755
3850
|
} else if (flush !== "sync") {
|
|
@@ -4051,7 +4146,11 @@ const TeleportImpl = {
|
|
|
4051
4146
|
};
|
|
4052
4147
|
function moveTeleport(vnode, container, parentAnchor, { o: { insert }, m: move }, moveType = 2) {
|
|
4053
4148
|
if (moveType === 0) {
|
|
4149
|
+
if (vnode.targetStart) {
|
|
4150
|
+
insert(vnode.targetStart, container, parentAnchor);
|
|
4151
|
+
}
|
|
4054
4152
|
insert(vnode.targetAnchor, container, parentAnchor);
|
|
4153
|
+
parentAnchor = vnode.targetAnchor;
|
|
4055
4154
|
}
|
|
4056
4155
|
const { el, anchor, shapeFlag, children, props } = vnode;
|
|
4057
4156
|
const isReorder = moveType === 2;
|
|
@@ -4220,10 +4319,6 @@ const BaseTransitionPropsValidators = {
|
|
|
4220
4319
|
onAfterAppear: TransitionHookValidator,
|
|
4221
4320
|
onAppearCancelled: TransitionHookValidator
|
|
4222
4321
|
};
|
|
4223
|
-
const recursiveGetSubtree = (instance) => {
|
|
4224
|
-
const subTree = instance.subTree;
|
|
4225
|
-
return subTree.component ? recursiveGetSubtree(subTree.component) : subTree;
|
|
4226
|
-
};
|
|
4227
4322
|
const BaseTransitionImpl = {
|
|
4228
4323
|
name: `BaseTransition`,
|
|
4229
4324
|
props: BaseTransitionPropsValidators,
|
|
@@ -4252,19 +4347,17 @@ const BaseTransitionImpl = {
|
|
|
4252
4347
|
if (!innerChild) {
|
|
4253
4348
|
return emptyPlaceholder(child);
|
|
4254
4349
|
}
|
|
4255
|
-
|
|
4350
|
+
const enterHooks = resolveTransitionHooks(
|
|
4256
4351
|
innerChild,
|
|
4257
4352
|
rawProps,
|
|
4258
4353
|
state,
|
|
4259
|
-
instance
|
|
4260
|
-
// #11061, ensure enterHooks is fresh after clone
|
|
4261
|
-
(hooks) => enterHooks = hooks
|
|
4354
|
+
instance
|
|
4262
4355
|
);
|
|
4263
4356
|
if (innerChild.type !== Comment) {
|
|
4264
4357
|
setTransitionHooks(innerChild, enterHooks);
|
|
4265
4358
|
}
|
|
4266
4359
|
let oldInnerChild = instance.subTree && getInnerChild$1(instance.subTree);
|
|
4267
|
-
if (oldInnerChild && oldInnerChild.type !== Comment && !isSameVNodeType(oldInnerChild, innerChild) &&
|
|
4360
|
+
if (oldInnerChild && oldInnerChild.type !== Comment && !isSameVNodeType(oldInnerChild, innerChild) && getTransitionRoot(instance.subTree)) {
|
|
4268
4361
|
let leavingHooks = resolveTransitionHooks(
|
|
4269
4362
|
oldInnerChild,
|
|
4270
4363
|
rawProps,
|
|
@@ -4277,7 +4370,17 @@ const BaseTransitionImpl = {
|
|
|
4277
4370
|
leavingHooks.afterLeave = () => {
|
|
4278
4371
|
state.isLeaving = false;
|
|
4279
4372
|
if (!(instance.job.flags & 8)) {
|
|
4280
|
-
instance.
|
|
4373
|
+
if (instance.effect.flags & 2) {
|
|
4374
|
+
const job = () => {
|
|
4375
|
+
if (!(instance.job.flags & 8)) {
|
|
4376
|
+
instance.update();
|
|
4377
|
+
}
|
|
4378
|
+
};
|
|
4379
|
+
job.i = instance;
|
|
4380
|
+
queueJob(job);
|
|
4381
|
+
} else {
|
|
4382
|
+
instance.update();
|
|
4383
|
+
}
|
|
4281
4384
|
}
|
|
4282
4385
|
delete leavingHooks.afterLeave;
|
|
4283
4386
|
oldInnerChild = void 0;
|
|
@@ -4344,7 +4447,7 @@ function getLeavingNodesForType(state, vnode) {
|
|
|
4344
4447
|
}
|
|
4345
4448
|
return leavingVNodesCache;
|
|
4346
4449
|
}
|
|
4347
|
-
function resolveTransitionHooks(vnode, props, state, instance
|
|
4450
|
+
function resolveTransitionHooks(vnode, props, state, instance) {
|
|
4348
4451
|
const {
|
|
4349
4452
|
appear,
|
|
4350
4453
|
mode,
|
|
@@ -4400,8 +4503,15 @@ function resolveTransitionHooks(vnode, props, state, instance, postClone) {
|
|
|
4400
4503
|
);
|
|
4401
4504
|
}
|
|
4402
4505
|
const leavingVNode = leavingVNodesCache[key];
|
|
4403
|
-
if (leavingVNode && isSameVNodeType(vnode, leavingVNode)
|
|
4404
|
-
leavingVNode.el[leaveCbKey]
|
|
4506
|
+
if (leavingVNode && isSameVNodeType(vnode, leavingVNode)) {
|
|
4507
|
+
let leavingCb = leavingVNode.el[leaveCbKey];
|
|
4508
|
+
if (!leavingCb) {
|
|
4509
|
+
const leavingRoot = getTransitionRoot(leavingVNode);
|
|
4510
|
+
leavingCb = leavingRoot && leavingRoot.el[leaveCbKey];
|
|
4511
|
+
}
|
|
4512
|
+
if (leavingCb) {
|
|
4513
|
+
leavingCb();
|
|
4514
|
+
}
|
|
4405
4515
|
}
|
|
4406
4516
|
callHook(hook, [el]);
|
|
4407
4517
|
},
|
|
@@ -4476,15 +4586,21 @@ function resolveTransitionHooks(vnode, props, state, instance, postClone) {
|
|
|
4476
4586
|
}
|
|
4477
4587
|
},
|
|
4478
4588
|
clone(vnode2) {
|
|
4479
|
-
const
|
|
4480
|
-
|
|
4481
|
-
|
|
4482
|
-
|
|
4483
|
-
|
|
4484
|
-
|
|
4485
|
-
|
|
4486
|
-
|
|
4487
|
-
|
|
4589
|
+
const cloned = resolveTransitionHooks(vnode2, props, state, instance);
|
|
4590
|
+
cloned.afterLeave = () => {
|
|
4591
|
+
if (hooks.afterLeave) hooks.afterLeave();
|
|
4592
|
+
};
|
|
4593
|
+
cloned.delayLeave = (el, earlyRemove, delayedLeave) => {
|
|
4594
|
+
if (hooks.delayLeave) {
|
|
4595
|
+
hooks.delayLeave(el, earlyRemove, delayedLeave);
|
|
4596
|
+
} else {
|
|
4597
|
+
delayedLeave();
|
|
4598
|
+
}
|
|
4599
|
+
};
|
|
4600
|
+
cloned.delayedLeave = () => {
|
|
4601
|
+
if (hooks.delayedLeave) hooks.delayedLeave();
|
|
4602
|
+
};
|
|
4603
|
+
return cloned;
|
|
4488
4604
|
}
|
|
4489
4605
|
};
|
|
4490
4606
|
return hooks;
|
|
@@ -4525,10 +4641,24 @@ function setTransitionHooks(vnode, hooks) {
|
|
|
4525
4641
|
hooks
|
|
4526
4642
|
);
|
|
4527
4643
|
} else if (vnode.shapeFlag & 128) {
|
|
4528
|
-
|
|
4529
|
-
|
|
4644
|
+
const suspense = vnode.suspense;
|
|
4645
|
+
if (suspense) {
|
|
4646
|
+
const branch = suspense.isHydrating ? suspense.pendingBranch : suspense.activeBranch;
|
|
4647
|
+
if (branch) {
|
|
4648
|
+
setTransitionHooks(branch, hooks.clone(branch));
|
|
4649
|
+
}
|
|
4650
|
+
} else {
|
|
4651
|
+
vnode.ssContent.transition = hooks.clone(vnode.ssContent);
|
|
4652
|
+
vnode.ssFallback.transition = hooks.clone(vnode.ssFallback);
|
|
4653
|
+
}
|
|
4530
4654
|
} else {
|
|
4531
4655
|
vnode.transition = hooks;
|
|
4656
|
+
if (vnode.type === Fragment && isArray(vnode.children)) {
|
|
4657
|
+
const child = filterSingleRoot(vnode.children, false);
|
|
4658
|
+
if (child) {
|
|
4659
|
+
setTransitionHooks(child, hooks);
|
|
4660
|
+
}
|
|
4661
|
+
}
|
|
4532
4662
|
}
|
|
4533
4663
|
}
|
|
4534
4664
|
function getTransitionRawChildren(children, keepComment = false, parentKey) {
|
|
@@ -4553,6 +4683,18 @@ function getTransitionRawChildren(children, keepComment = false, parentKey) {
|
|
|
4553
4683
|
}
|
|
4554
4684
|
return ret;
|
|
4555
4685
|
}
|
|
4686
|
+
function getTransitionRoot(vnode) {
|
|
4687
|
+
if (vnode.component) {
|
|
4688
|
+
return getTransitionRoot(vnode.component.subTree);
|
|
4689
|
+
}
|
|
4690
|
+
if (vnode.type === Fragment) {
|
|
4691
|
+
const child = isArray(vnode.children) && filterSingleRoot(vnode.children, false);
|
|
4692
|
+
return child ? getTransitionRoot(child) : void 0;
|
|
4693
|
+
}
|
|
4694
|
+
if (vnode.type !== Comment) {
|
|
4695
|
+
return vnode;
|
|
4696
|
+
}
|
|
4697
|
+
}
|
|
4556
4698
|
|
|
4557
4699
|
// @__NO_SIDE_EFFECTS__
|
|
4558
4700
|
function defineComponent(options, extraOptions) {
|
|
@@ -5209,7 +5351,7 @@ Server rendered element contains fewer child nodes than client vdom.`
|
|
|
5209
5351
|
getContainerType(container),
|
|
5210
5352
|
slotScopeIds
|
|
5211
5353
|
);
|
|
5212
|
-
if (parentComponent) {
|
|
5354
|
+
if (parentComponent && parentComponent.vnode.el === node) {
|
|
5213
5355
|
parentComponent.vnode.el = vnode.el;
|
|
5214
5356
|
updateHOCHostEl(parentComponent, vnode.el);
|
|
5215
5357
|
}
|
|
@@ -5458,14 +5600,22 @@ const hydrateOnVisible = (opts) => (hydrate, forEach) => {
|
|
|
5458
5600
|
break;
|
|
5459
5601
|
}
|
|
5460
5602
|
}, opts);
|
|
5461
|
-
|
|
5462
|
-
if (!(el instanceof Element)) return;
|
|
5603
|
+
const observe = (el) => {
|
|
5463
5604
|
if (elementIsVisibleInViewport(el)) {
|
|
5464
5605
|
hydrate();
|
|
5465
5606
|
ob.disconnect();
|
|
5466
5607
|
return false;
|
|
5467
5608
|
}
|
|
5609
|
+
if (getComputedStyle(el).display === "contents") {
|
|
5610
|
+
for (let i = 0; i < el.children.length; i++) {
|
|
5611
|
+
if (observe(el.children[i]) === false) return false;
|
|
5612
|
+
}
|
|
5613
|
+
}
|
|
5468
5614
|
ob.observe(el);
|
|
5615
|
+
};
|
|
5616
|
+
forEach((el) => {
|
|
5617
|
+
if (!(el instanceof Element)) return;
|
|
5618
|
+
return observe(el);
|
|
5469
5619
|
});
|
|
5470
5620
|
return () => ob.disconnect();
|
|
5471
5621
|
};
|
|
@@ -5635,7 +5785,8 @@ function defineAsyncComponent(source) {
|
|
|
5635
5785
|
err,
|
|
5636
5786
|
instance,
|
|
5637
5787
|
13,
|
|
5638
|
-
!errorComponent
|
|
5788
|
+
!errorComponent,
|
|
5789
|
+
true
|
|
5639
5790
|
);
|
|
5640
5791
|
};
|
|
5641
5792
|
if (suspensible && instance.suspense || isInSSRComponentSetup) {
|
|
@@ -5653,7 +5804,7 @@ function defineAsyncComponent(source) {
|
|
|
5653
5804
|
const delayed = ref(!!delay);
|
|
5654
5805
|
let timeoutTimer;
|
|
5655
5806
|
let delayTimer;
|
|
5656
|
-
|
|
5807
|
+
onScopeDispose(() => {
|
|
5657
5808
|
if (timeoutTimer != null) clearTimeout(timeoutTimer);
|
|
5658
5809
|
if (delayTimer != null) clearTimeout(delayTimer);
|
|
5659
5810
|
});
|
|
@@ -5781,6 +5932,12 @@ const KeepAliveImpl = {
|
|
|
5781
5932
|
}
|
|
5782
5933
|
};
|
|
5783
5934
|
sharedContext.deactivate = (vnode) => {
|
|
5935
|
+
const cached = cache.get(
|
|
5936
|
+
vnode.key == null ? vnode.type : vnode.key
|
|
5937
|
+
);
|
|
5938
|
+
if (!cached || cached.component !== vnode.component) {
|
|
5939
|
+
return false;
|
|
5940
|
+
}
|
|
5784
5941
|
const instance2 = vnode.component;
|
|
5785
5942
|
invalidateMount(instance2.m);
|
|
5786
5943
|
invalidateMount(instance2.a);
|
|
@@ -5801,6 +5958,7 @@ const KeepAliveImpl = {
|
|
|
5801
5958
|
{
|
|
5802
5959
|
instance2.__keepAliveStorageContainer = storageContainer;
|
|
5803
5960
|
}
|
|
5961
|
+
return true;
|
|
5804
5962
|
};
|
|
5805
5963
|
function unmount(vnode) {
|
|
5806
5964
|
resetShapeFlag(vnode);
|
|
@@ -5822,6 +5980,7 @@ const KeepAliveImpl = {
|
|
|
5822
5980
|
unmount(cached);
|
|
5823
5981
|
} else if (current) {
|
|
5824
5982
|
resetShapeFlag(current);
|
|
5983
|
+
if (cached) resetShapeFlag(cached);
|
|
5825
5984
|
}
|
|
5826
5985
|
cache.delete(key);
|
|
5827
5986
|
keys.delete(key);
|
|
@@ -5839,12 +5998,17 @@ const KeepAliveImpl = {
|
|
|
5839
5998
|
const cacheSubtree = () => {
|
|
5840
5999
|
if (pendingCacheKey != null) {
|
|
5841
6000
|
if (isSuspense(instance.subTree.type)) {
|
|
5842
|
-
|
|
6001
|
+
const cacheInnerChild = () => {
|
|
5843
6002
|
const vnode = getInnerChild(instance.subTree);
|
|
5844
6003
|
if (vnode.component) {
|
|
5845
6004
|
cache.set(pendingCacheKey, vnode);
|
|
5846
6005
|
}
|
|
5847
|
-
}
|
|
6006
|
+
};
|
|
6007
|
+
if (instance.subTree.suspense.pendingBranch) {
|
|
6008
|
+
queuePostRenderEffect(cacheInnerChild, instance.subTree.suspense);
|
|
6009
|
+
} else {
|
|
6010
|
+
cacheInnerChild();
|
|
6011
|
+
}
|
|
5848
6012
|
} else {
|
|
5849
6013
|
cache.set(pendingCacheKey, getInnerChild(instance.subTree));
|
|
5850
6014
|
}
|
|
@@ -5979,9 +6143,12 @@ function injectToKeepAliveRoot(hook, type, target, keepAliveRoot) {
|
|
|
5979
6143
|
true
|
|
5980
6144
|
/* prepend */
|
|
5981
6145
|
);
|
|
5982
|
-
|
|
5983
|
-
|
|
5984
|
-
|
|
6146
|
+
const removal = injectHook(
|
|
6147
|
+
"um",
|
|
6148
|
+
() => remove(keepAliveRoot[type], injected),
|
|
6149
|
+
target
|
|
6150
|
+
);
|
|
6151
|
+
removal.flags = 16;
|
|
5985
6152
|
}
|
|
5986
6153
|
function resetShapeFlag(vnode) {
|
|
5987
6154
|
vnode.shapeFlag &= -257;
|
|
@@ -6404,9 +6571,11 @@ function renderList(source, renderItem, cache, index) {
|
|
|
6404
6571
|
}
|
|
6405
6572
|
} else if (typeof source === "number") {
|
|
6406
6573
|
if (!Number.isInteger(source) || source < 0) {
|
|
6407
|
-
|
|
6408
|
-
|
|
6409
|
-
|
|
6574
|
+
{
|
|
6575
|
+
warn$1(
|
|
6576
|
+
`The v-for range expects a positive integer value but got ${source}.`
|
|
6577
|
+
);
|
|
6578
|
+
}
|
|
6410
6579
|
ret = [];
|
|
6411
6580
|
} else {
|
|
6412
6581
|
ret = new Array(source);
|
|
@@ -6725,6 +6894,7 @@ function installCompatInstanceProperties(map) {
|
|
|
6725
6894
|
$vnode: (i) => i.vnode,
|
|
6726
6895
|
// some private properties that are likely accessed...
|
|
6727
6896
|
_self: (i) => i.proxy,
|
|
6897
|
+
_setupProxy: (i) => i.setupState,
|
|
6728
6898
|
_uid: (i) => i.uid,
|
|
6729
6899
|
_data: (i) => i.data,
|
|
6730
6900
|
_isMounted: (i) => i.isMounted,
|
|
@@ -7712,7 +7882,7 @@ function createCompatVue$1(createApp, createSingletonApp) {
|
|
|
7712
7882
|
return vm;
|
|
7713
7883
|
}
|
|
7714
7884
|
}
|
|
7715
|
-
Vue.version = `2.6.14-compat:${"3.5.
|
|
7885
|
+
Vue.version = `2.6.14-compat:${"3.5.45"}`;
|
|
7716
7886
|
Vue.config = singletonApp.config;
|
|
7717
7887
|
Vue.use = (plugin, ...options) => {
|
|
7718
7888
|
if (plugin && isFunction(plugin.install)) {
|
|
@@ -8869,7 +9039,7 @@ function hasPropsChanged(prevProps, nextProps, emitsOptions) {
|
|
|
8869
9039
|
}
|
|
8870
9040
|
for (let i = 0; i < nextKeys.length; i++) {
|
|
8871
9041
|
const key = nextKeys[i];
|
|
8872
|
-
if (hasPropValueChanged(nextProps, prevProps, key) && !isEmitListener(emitsOptions, key)) {
|
|
9042
|
+
if (!hasOwn(prevProps, key) || hasPropValueChanged(nextProps, prevProps, key) && !isEmitListener(emitsOptions, key)) {
|
|
8873
9043
|
return true;
|
|
8874
9044
|
}
|
|
8875
9045
|
}
|
|
@@ -9821,6 +9991,8 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
9821
9991
|
const needCallTransitionHooks = needTransition(parentSuspense, transition);
|
|
9822
9992
|
if (needCallTransitionHooks) {
|
|
9823
9993
|
transition.beforeEnter(el);
|
|
9994
|
+
} else if (transition && !transition.persisted) {
|
|
9995
|
+
el[deferredEnterKey] = true;
|
|
9824
9996
|
}
|
|
9825
9997
|
hostInsert(el, container, anchor);
|
|
9826
9998
|
if ((vnodeHook = props && props.onVnodeMounted) || needCallTransitionHooks || dirs) {
|
|
@@ -9980,15 +10152,16 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
9980
10152
|
for (let i = 0; i < newChildren.length; i++) {
|
|
9981
10153
|
const oldVNode = oldChildren[i];
|
|
9982
10154
|
const newVNode = newChildren[i];
|
|
10155
|
+
const oldEl = oldVNode.el || resolveAsyncComponentPlaceholder(oldVNode);
|
|
9983
10156
|
const container = (
|
|
9984
10157
|
// oldVNode may be an errored async setup() component inside Suspense
|
|
9985
10158
|
// which will not have a mounted element
|
|
9986
|
-
|
|
10159
|
+
oldEl && // - In the case of a Fragment, we need to provide the actual parent
|
|
9987
10160
|
// of the Fragment itself so it can move its children.
|
|
9988
10161
|
(oldVNode.type === Fragment || // - In the case of different nodes, there is going to be a replacement
|
|
9989
10162
|
// which also requires the correct parent container
|
|
9990
10163
|
!isSameVNodeType(oldVNode, newVNode) || // - In the case of a component, it could contain anything.
|
|
9991
|
-
oldVNode.shapeFlag & (6 | 64 | 128)) ? hostParentNode(
|
|
10164
|
+
oldVNode.shapeFlag & (6 | 64 | 128)) ? hostParentNode(oldEl) : (
|
|
9992
10165
|
// In other cases, the parent container is not actually used so we
|
|
9993
10166
|
// just pass the block element here to avoid a DOM parentNode call.
|
|
9994
10167
|
fallbackContainer
|
|
@@ -10153,7 +10326,12 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
10153
10326
|
}
|
|
10154
10327
|
if (isHmrUpdating) initialVNode.el = null;
|
|
10155
10328
|
if (instance.asyncDep) {
|
|
10156
|
-
parentSuspense && parentSuspense.registerDep(
|
|
10329
|
+
parentSuspense && parentSuspense.registerDep(
|
|
10330
|
+
instance,
|
|
10331
|
+
setupRenderEffect,
|
|
10332
|
+
optimized,
|
|
10333
|
+
namespace
|
|
10334
|
+
);
|
|
10157
10335
|
if (!initialVNode.el) {
|
|
10158
10336
|
const placeholder = instance.subTree = createVNode(Comment);
|
|
10159
10337
|
processCommentNode(null, placeholder, container, anchor);
|
|
@@ -10183,6 +10361,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
10183
10361
|
pushWarningContext(n2);
|
|
10184
10362
|
}
|
|
10185
10363
|
n2.el = n1.el;
|
|
10364
|
+
n2.placeholder = n1.placeholder;
|
|
10186
10365
|
updateComponentPreRender(instance, n2, optimized);
|
|
10187
10366
|
{
|
|
10188
10367
|
popWarningContext();
|
|
@@ -10194,6 +10373,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
10194
10373
|
}
|
|
10195
10374
|
} else {
|
|
10196
10375
|
n2.el = n1.el;
|
|
10376
|
+
n2.placeholder = n1.placeholder;
|
|
10197
10377
|
instance.vnode = n2;
|
|
10198
10378
|
}
|
|
10199
10379
|
};
|
|
@@ -10311,16 +10491,23 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
10311
10491
|
} else {
|
|
10312
10492
|
let { next, bu, u, parent, vnode } = instance;
|
|
10313
10493
|
{
|
|
10314
|
-
const
|
|
10315
|
-
if (
|
|
10494
|
+
const unresolvedAsyncRoot = locateUnresolvedAsyncRoot(instance);
|
|
10495
|
+
if (unresolvedAsyncRoot) {
|
|
10316
10496
|
if (next) {
|
|
10317
10497
|
next.el = vnode.el;
|
|
10318
10498
|
updateComponentPreRender(instance, next, optimized);
|
|
10319
10499
|
}
|
|
10320
|
-
|
|
10321
|
-
|
|
10322
|
-
if (
|
|
10323
|
-
|
|
10500
|
+
unresolvedAsyncRoot.asyncDep.then(() => {
|
|
10501
|
+
const retry = () => {
|
|
10502
|
+
if (instance.job.flags & 8) return;
|
|
10503
|
+
if (parentSuspense && parentSuspense.pendingBranch) {
|
|
10504
|
+
queuePostRenderEffect(retry, parentSuspense);
|
|
10505
|
+
} else {
|
|
10506
|
+
update();
|
|
10507
|
+
}
|
|
10508
|
+
};
|
|
10509
|
+
retry.flags = 16 | 32;
|
|
10510
|
+
queuePostRenderEffect(retry, parentSuspense);
|
|
10324
10511
|
});
|
|
10325
10512
|
return;
|
|
10326
10513
|
}
|
|
@@ -10362,8 +10549,11 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
10362
10549
|
patch(
|
|
10363
10550
|
prevTree,
|
|
10364
10551
|
nextTree,
|
|
10365
|
-
// parent may have changed if it's in a teleport
|
|
10366
|
-
|
|
10552
|
+
// parent may have changed if it's in a teleport. a root that is a
|
|
10553
|
+
// pending async component only has its placeholder comment
|
|
10554
|
+
hostParentNode(
|
|
10555
|
+
prevTree.el || resolveAsyncComponentPlaceholder(prevTree)
|
|
10556
|
+
),
|
|
10367
10557
|
// anchor may have changed if it's in a fragment
|
|
10368
10558
|
getNextHostNode(prevTree),
|
|
10369
10559
|
instance,
|
|
@@ -10809,8 +10999,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
10809
10999
|
if (cacheIndex != null && (!vnode.ctx || vnode.ctx === parentComponent)) {
|
|
10810
11000
|
parentComponent.renderCache[cacheIndex] = void 0;
|
|
10811
11001
|
}
|
|
10812
|
-
if (shapeFlag & 256) {
|
|
10813
|
-
parentComponent.ctx.deactivate(vnode);
|
|
11002
|
+
if (shapeFlag & 256 && parentComponent.ctx.deactivate(vnode)) {
|
|
10814
11003
|
return;
|
|
10815
11004
|
}
|
|
10816
11005
|
const shouldInvokeDirs = shapeFlag & 1 && dirs;
|
|
@@ -10871,18 +11060,9 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
10871
11060
|
};
|
|
10872
11061
|
const remove = (vnode) => {
|
|
10873
11062
|
const { type, el, anchor, transition } = vnode;
|
|
10874
|
-
|
|
10875
|
-
|
|
10876
|
-
|
|
10877
|
-
if (child.type === Comment) {
|
|
10878
|
-
hostRemove(child.el);
|
|
10879
|
-
} else {
|
|
10880
|
-
remove(child);
|
|
10881
|
-
}
|
|
10882
|
-
});
|
|
10883
|
-
} else {
|
|
10884
|
-
removeFragment(el, anchor);
|
|
10885
|
-
}
|
|
11063
|
+
const isFragment = type === Fragment;
|
|
11064
|
+
if (isFragment && !transition) {
|
|
11065
|
+
removeFragment(el, anchor);
|
|
10886
11066
|
return;
|
|
10887
11067
|
}
|
|
10888
11068
|
if (type === Static) {
|
|
@@ -10892,17 +11072,25 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
10892
11072
|
}
|
|
10893
11073
|
return;
|
|
10894
11074
|
}
|
|
11075
|
+
const leavingNode = isFragment ? getTransitionRoot(vnode) : vnode;
|
|
10895
11076
|
const performRemove = () => {
|
|
10896
|
-
|
|
11077
|
+
if (isFragment) {
|
|
11078
|
+
if (hostParentNode(el)) {
|
|
11079
|
+
removeFragment(el, anchor);
|
|
11080
|
+
}
|
|
11081
|
+
} else {
|
|
11082
|
+
hostRemove(el);
|
|
11083
|
+
}
|
|
10897
11084
|
if (transition && !transition.persisted && transition.afterLeave) {
|
|
10898
11085
|
transition.afterLeave();
|
|
10899
11086
|
}
|
|
10900
11087
|
};
|
|
10901
|
-
if (
|
|
11088
|
+
if (leavingNode && leavingNode.shapeFlag & 1 && transition && !transition.persisted) {
|
|
10902
11089
|
const { leave, delayLeave } = transition;
|
|
10903
|
-
const
|
|
11090
|
+
const leavingEl = leavingNode.el;
|
|
11091
|
+
const performLeave = () => leave(leavingEl, performRemove);
|
|
10904
11092
|
if (delayLeave) {
|
|
10905
|
-
delayLeave(
|
|
11093
|
+
delayLeave(leavingEl, performRemove, performLeave);
|
|
10906
11094
|
} else {
|
|
10907
11095
|
performLeave();
|
|
10908
11096
|
}
|
|
@@ -10936,7 +11124,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
10936
11124
|
if (job) {
|
|
10937
11125
|
job.flags |= 8;
|
|
10938
11126
|
unmount(subTree, instance, parentSuspense, doRemove);
|
|
10939
|
-
} else if (
|
|
11127
|
+
} else if (subTree) {
|
|
10940
11128
|
subTree.transition = instance.vnode.transition;
|
|
10941
11129
|
unmount(subTree, instance, parentSuspense, doRemove);
|
|
10942
11130
|
}
|
|
@@ -10949,9 +11137,11 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
10949
11137
|
parentSuspense
|
|
10950
11138
|
);
|
|
10951
11139
|
}
|
|
10952
|
-
|
|
11140
|
+
const markUnmounted = () => {
|
|
10953
11141
|
instance.isUnmounted = true;
|
|
10954
|
-
}
|
|
11142
|
+
};
|
|
11143
|
+
markUnmounted.flags = 16;
|
|
11144
|
+
queuePostRenderEffect(markUnmounted, parentSuspense);
|
|
10955
11145
|
{
|
|
10956
11146
|
devtoolsComponentRemoved(instance);
|
|
10957
11147
|
}
|
|
@@ -10972,32 +11162,26 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
10972
11162
|
const teleportEnd = el && el[TeleportEndKey];
|
|
10973
11163
|
return teleportEnd ? hostNextSibling(teleportEnd) : el;
|
|
10974
11164
|
};
|
|
10975
|
-
let isFlushing = false;
|
|
10976
11165
|
const render = (vnode, container, namespace) => {
|
|
10977
|
-
|
|
10978
|
-
|
|
10979
|
-
if (
|
|
10980
|
-
|
|
10981
|
-
|
|
11166
|
+
const minUid = vnode && container._vnode ? void 0 : vnode && vnode.component ? vnode.component.uid : getNextUid();
|
|
11167
|
+
flushOnAppMount(() => {
|
|
11168
|
+
if (vnode == null) {
|
|
11169
|
+
if (container._vnode) {
|
|
11170
|
+
unmount(container._vnode, null, null, true);
|
|
11171
|
+
}
|
|
11172
|
+
} else {
|
|
11173
|
+
patch(
|
|
11174
|
+
container._vnode || null,
|
|
11175
|
+
vnode,
|
|
11176
|
+
container,
|
|
11177
|
+
null,
|
|
11178
|
+
null,
|
|
11179
|
+
null,
|
|
11180
|
+
namespace
|
|
11181
|
+
);
|
|
10982
11182
|
}
|
|
10983
|
-
|
|
10984
|
-
|
|
10985
|
-
container._vnode || null,
|
|
10986
|
-
vnode,
|
|
10987
|
-
container,
|
|
10988
|
-
null,
|
|
10989
|
-
null,
|
|
10990
|
-
null,
|
|
10991
|
-
namespace
|
|
10992
|
-
);
|
|
10993
|
-
}
|
|
10994
|
-
container._vnode = vnode;
|
|
10995
|
-
if (!isFlushing) {
|
|
10996
|
-
isFlushing = true;
|
|
10997
|
-
flushPreFlushCbs(instance);
|
|
10998
|
-
flushPostFlushCbs();
|
|
10999
|
-
isFlushing = false;
|
|
11000
|
-
}
|
|
11183
|
+
container._vnode = vnode;
|
|
11184
|
+
}, minUid);
|
|
11001
11185
|
};
|
|
11002
11186
|
const internals = {
|
|
11003
11187
|
p: patch,
|
|
@@ -11109,13 +11293,13 @@ function getSequence(arr) {
|
|
|
11109
11293
|
}
|
|
11110
11294
|
return result;
|
|
11111
11295
|
}
|
|
11112
|
-
function
|
|
11296
|
+
function locateUnresolvedAsyncRoot(instance) {
|
|
11113
11297
|
const subComponent = instance.subTree.component;
|
|
11114
11298
|
if (subComponent) {
|
|
11115
11299
|
if (subComponent.asyncDep && !subComponent.asyncResolved) {
|
|
11116
11300
|
return subComponent;
|
|
11117
11301
|
} else {
|
|
11118
|
-
return
|
|
11302
|
+
return locateUnresolvedAsyncRoot(subComponent);
|
|
11119
11303
|
}
|
|
11120
11304
|
}
|
|
11121
11305
|
}
|
|
@@ -11133,11 +11317,16 @@ function resolveAsyncComponentPlaceholder(anchorVnode) {
|
|
|
11133
11317
|
if (instance) {
|
|
11134
11318
|
return resolveAsyncComponentPlaceholder(instance.subTree);
|
|
11135
11319
|
}
|
|
11320
|
+
const suspense = anchorVnode.suspense;
|
|
11321
|
+
if (suspense && suspense.activeBranch) {
|
|
11322
|
+
return resolveAsyncComponentPlaceholder(suspense.activeBranch);
|
|
11323
|
+
}
|
|
11136
11324
|
return null;
|
|
11137
11325
|
}
|
|
11138
11326
|
|
|
11139
11327
|
const isSuspense = (type) => type.__isSuspense;
|
|
11140
11328
|
let suspenseId = 0;
|
|
11329
|
+
const deferredEnterKey = /* @__PURE__ */ Symbol("_deferredEnter");
|
|
11141
11330
|
const SuspenseImpl = {
|
|
11142
11331
|
name: "Suspense",
|
|
11143
11332
|
// In order to make Suspense tree-shakable, we need to avoid importing it
|
|
@@ -11159,11 +11348,22 @@ const SuspenseImpl = {
|
|
|
11159
11348
|
rendererInternals
|
|
11160
11349
|
);
|
|
11161
11350
|
} else {
|
|
11162
|
-
|
|
11163
|
-
|
|
11164
|
-
|
|
11165
|
-
|
|
11166
|
-
|
|
11351
|
+
const suspense = n1.suspense;
|
|
11352
|
+
if (parentSuspense && parentSuspense.deps > 0 && !parentSuspense.isHydrating) {
|
|
11353
|
+
const owner = suspense.parentComponent;
|
|
11354
|
+
const retained = !!owner && owner.suspense === parentSuspense && owner.suspenseId !== parentSuspense.pendingId;
|
|
11355
|
+
if (retained ? (
|
|
11356
|
+
// deps can outlive the pending branch: skip only while it exists
|
|
11357
|
+
parentSuspense.pendingBranch && !isSameVNodeType(
|
|
11358
|
+
n2.ssContent,
|
|
11359
|
+
suspense.pendingBranch || suspense.activeBranch
|
|
11360
|
+
)
|
|
11361
|
+
) : !suspense.isInFallback) {
|
|
11362
|
+
n2.suspense = suspense;
|
|
11363
|
+
suspense.vnode = n2;
|
|
11364
|
+
n2.el = n1.el;
|
|
11365
|
+
return;
|
|
11366
|
+
}
|
|
11167
11367
|
}
|
|
11168
11368
|
patchSuspense(
|
|
11169
11369
|
n1,
|
|
@@ -11188,6 +11388,38 @@ function triggerEvent(vnode, name) {
|
|
|
11188
11388
|
eventListener();
|
|
11189
11389
|
}
|
|
11190
11390
|
}
|
|
11391
|
+
function enterDeferred(branch) {
|
|
11392
|
+
const enters = [];
|
|
11393
|
+
collectDeferredEnters(branch, enters, true);
|
|
11394
|
+
if (enters.length) {
|
|
11395
|
+
queuePostFlushCb(enters);
|
|
11396
|
+
}
|
|
11397
|
+
}
|
|
11398
|
+
function collectDeferredEnters(vnode, enters, isRoot) {
|
|
11399
|
+
const { el, transition, children, shapeFlag } = vnode;
|
|
11400
|
+
if (shapeFlag & 6) {
|
|
11401
|
+
collectDeferredEnters(vnode.component.subTree, enters, isRoot);
|
|
11402
|
+
return;
|
|
11403
|
+
}
|
|
11404
|
+
if (shapeFlag & (128 | 64)) {
|
|
11405
|
+
return;
|
|
11406
|
+
}
|
|
11407
|
+
if (shapeFlag & 1) {
|
|
11408
|
+
if (!isRoot && el && el[deferredEnterKey]) {
|
|
11409
|
+
el[deferredEnterKey] = void 0;
|
|
11410
|
+
if (transition && !transition.persisted) {
|
|
11411
|
+
transition.beforeEnter(el);
|
|
11412
|
+
enters.push(() => transition.enter(el));
|
|
11413
|
+
}
|
|
11414
|
+
}
|
|
11415
|
+
isRoot = false;
|
|
11416
|
+
}
|
|
11417
|
+
if (shapeFlag & 16) {
|
|
11418
|
+
for (let i = 0; i < children.length; i++) {
|
|
11419
|
+
collectDeferredEnters(children[i], enters, isRoot);
|
|
11420
|
+
}
|
|
11421
|
+
}
|
|
11422
|
+
}
|
|
11191
11423
|
function mountSuspense(vnode, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, rendererInternals) {
|
|
11192
11424
|
const {
|
|
11193
11425
|
p: patch,
|
|
@@ -11287,7 +11519,7 @@ function patchSuspense(n1, n2, container, anchor, parentComponent, namespace, sl
|
|
|
11287
11519
|
unmount(pendingBranch, parentComponent, suspense);
|
|
11288
11520
|
}
|
|
11289
11521
|
suspense.deps = 0;
|
|
11290
|
-
suspense
|
|
11522
|
+
discardEffects(suspense);
|
|
11291
11523
|
suspense.hiddenContainer = createElement("div");
|
|
11292
11524
|
if (isInFallback) {
|
|
11293
11525
|
patch(
|
|
@@ -11365,11 +11597,7 @@ function patchSuspense(n1, n2, container, anchor, parentComponent, namespace, sl
|
|
|
11365
11597
|
} else {
|
|
11366
11598
|
triggerEvent(n2, "onPending");
|
|
11367
11599
|
suspense.pendingBranch = newBranch;
|
|
11368
|
-
|
|
11369
|
-
suspense.pendingId = newBranch.component.suspenseId;
|
|
11370
|
-
} else {
|
|
11371
|
-
suspense.pendingId = suspenseId++;
|
|
11372
|
-
}
|
|
11600
|
+
suspense.pendingId = suspenseId++;
|
|
11373
11601
|
patch(
|
|
11374
11602
|
null,
|
|
11375
11603
|
newBranch,
|
|
@@ -11384,12 +11612,11 @@ function patchSuspense(n1, n2, container, anchor, parentComponent, namespace, sl
|
|
|
11384
11612
|
if (suspense.deps <= 0) {
|
|
11385
11613
|
suspense.resolve();
|
|
11386
11614
|
} else {
|
|
11387
|
-
const { timeout
|
|
11615
|
+
const { timeout } = suspense;
|
|
11388
11616
|
if (timeout > 0) {
|
|
11389
|
-
setTimeout(() => {
|
|
11390
|
-
|
|
11391
|
-
|
|
11392
|
-
}
|
|
11617
|
+
suspense.timeoutTimer = setTimeout(() => {
|
|
11618
|
+
suspense.timeoutTimer = void 0;
|
|
11619
|
+
suspense.fallback(suspense.vnode.ssFallback);
|
|
11393
11620
|
}, timeout);
|
|
11394
11621
|
} else if (timeout === 0) {
|
|
11395
11622
|
suspense.fallback(newFallback);
|
|
@@ -11436,6 +11663,7 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|
|
11436
11663
|
deps: 0,
|
|
11437
11664
|
pendingId: suspenseId++,
|
|
11438
11665
|
timeout: typeof timeout === "number" ? timeout : -1,
|
|
11666
|
+
timeoutTimer: void 0,
|
|
11439
11667
|
activeBranch: null,
|
|
11440
11668
|
isFallbackMountPending: false,
|
|
11441
11669
|
pendingBranch: null,
|
|
@@ -11474,7 +11702,8 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|
|
11474
11702
|
let hasUpdatedAnchor = false;
|
|
11475
11703
|
if (delayEnter) {
|
|
11476
11704
|
activeBranch.transition.afterLeave = () => {
|
|
11477
|
-
if (pendingId === suspense.pendingId) {
|
|
11705
|
+
if (pendingId === suspense.pendingId && !suspense.isUnmounted) {
|
|
11706
|
+
enterDeferred(pendingBranch);
|
|
11478
11707
|
move(
|
|
11479
11708
|
pendingBranch,
|
|
11480
11709
|
container2,
|
|
@@ -11489,7 +11718,9 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|
|
11489
11718
|
};
|
|
11490
11719
|
}
|
|
11491
11720
|
if (activeBranch && !suspense.isFallbackMountPending) {
|
|
11492
|
-
if (parentNode(
|
|
11721
|
+
if (parentNode(
|
|
11722
|
+
activeBranch.el || resolveAsyncComponentPlaceholder(activeBranch)
|
|
11723
|
+
) === container2) {
|
|
11493
11724
|
anchor = next(activeBranch);
|
|
11494
11725
|
hasUpdatedAnchor = true;
|
|
11495
11726
|
}
|
|
@@ -11499,13 +11730,26 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|
|
11499
11730
|
}
|
|
11500
11731
|
}
|
|
11501
11732
|
if (!delayEnter) {
|
|
11733
|
+
enterDeferred(pendingBranch);
|
|
11502
11734
|
move(pendingBranch, container2, anchor, 0);
|
|
11503
11735
|
}
|
|
11504
11736
|
}
|
|
11737
|
+
clearTimeout(suspense.timeoutTimer);
|
|
11738
|
+
suspense.timeoutTimer = void 0;
|
|
11505
11739
|
suspense.isFallbackMountPending = false;
|
|
11506
11740
|
setActiveBranch(suspense, pendingBranch);
|
|
11507
11741
|
suspense.pendingBranch = null;
|
|
11508
11742
|
suspense.isInFallback = false;
|
|
11743
|
+
let kept = 0;
|
|
11744
|
+
for (let i = 0; i < effects.length; i++) {
|
|
11745
|
+
const effect = effects[i];
|
|
11746
|
+
if (effect.flags & 32) {
|
|
11747
|
+
queuePostFlushCb(effect);
|
|
11748
|
+
} else {
|
|
11749
|
+
effects[kept++] = effect;
|
|
11750
|
+
}
|
|
11751
|
+
}
|
|
11752
|
+
effects.length = kept;
|
|
11509
11753
|
let parent = suspense.parent;
|
|
11510
11754
|
let hasUnresolvedAncestor = false;
|
|
11511
11755
|
while (parent) {
|
|
@@ -11534,7 +11778,7 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|
|
11534
11778
|
triggerEvent(vnode2, "onResolve");
|
|
11535
11779
|
},
|
|
11536
11780
|
fallback(fallbackVNode) {
|
|
11537
|
-
if (!suspense.pendingBranch) {
|
|
11781
|
+
if (suspense.isUnmounted || !suspense.pendingBranch) {
|
|
11538
11782
|
return;
|
|
11539
11783
|
}
|
|
11540
11784
|
const { vnode: vnode2, activeBranch, parentComponent: parentComponent2, container: container2, namespace: namespace2 } = suspense;
|
|
@@ -11542,7 +11786,7 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|
|
11542
11786
|
const anchor2 = next(activeBranch);
|
|
11543
11787
|
const mountFallback = () => {
|
|
11544
11788
|
suspense.isFallbackMountPending = false;
|
|
11545
|
-
if (!suspense.isInFallback) {
|
|
11789
|
+
if (suspense.isUnmounted || !suspense.isInFallback) {
|
|
11546
11790
|
return;
|
|
11547
11791
|
}
|
|
11548
11792
|
const latestFallback = suspense.vnode.ssFallback;
|
|
@@ -11585,25 +11829,16 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|
|
11585
11829
|
next() {
|
|
11586
11830
|
return suspense.activeBranch && next(suspense.activeBranch);
|
|
11587
11831
|
},
|
|
11588
|
-
|
|
11832
|
+
// `namespace` intentionally shadows the boundary's own: the dep must be
|
|
11833
|
+
// mounted with the namespace of the position it was rendered at, which can
|
|
11834
|
+
// differ from the boundary's (e.g. a component nested inside an <svg>).
|
|
11835
|
+
registerDep(instance, setupRenderEffect, optimized2, namespace2) {
|
|
11589
11836
|
const isInPendingSuspense = !!suspense.pendingBranch;
|
|
11590
11837
|
if (isInPendingSuspense) {
|
|
11591
11838
|
suspense.deps++;
|
|
11592
11839
|
}
|
|
11593
11840
|
const hydratedEl = instance.vnode.el;
|
|
11594
|
-
|
|
11595
|
-
handleError(err, instance, 0);
|
|
11596
|
-
}).then((asyncSetupResult) => {
|
|
11597
|
-
if (instance.isUnmounted || suspense.isUnmounted || suspense.pendingId !== instance.suspenseId) {
|
|
11598
|
-
return;
|
|
11599
|
-
}
|
|
11600
|
-
unsetCurrentInstance();
|
|
11601
|
-
if (hydratedEl && !instance.scope.active) {
|
|
11602
|
-
if (isInPendingSuspense && --suspense.deps === 0) {
|
|
11603
|
-
suspense.resolve();
|
|
11604
|
-
}
|
|
11605
|
-
return;
|
|
11606
|
-
}
|
|
11841
|
+
const render = (asyncSetupResult) => {
|
|
11607
11842
|
instance.asyncResolved = true;
|
|
11608
11843
|
const { vnode: vnode2 } = instance;
|
|
11609
11844
|
{
|
|
@@ -11625,7 +11860,7 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|
|
11625
11860
|
// consider the comment placeholder case.
|
|
11626
11861
|
hydratedEl ? null : next(instance.subTree),
|
|
11627
11862
|
suspense,
|
|
11628
|
-
|
|
11863
|
+
namespace2,
|
|
11629
11864
|
optimized2
|
|
11630
11865
|
);
|
|
11631
11866
|
if (placeholder) {
|
|
@@ -11636,13 +11871,57 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|
|
11636
11871
|
{
|
|
11637
11872
|
popWarningContext();
|
|
11638
11873
|
}
|
|
11639
|
-
|
|
11874
|
+
};
|
|
11875
|
+
instance.asyncDep.catch((err) => {
|
|
11876
|
+
handleError(err, instance, 0, false, true);
|
|
11877
|
+
return () => null;
|
|
11878
|
+
}).then((asyncSetupResult) => {
|
|
11879
|
+
if (instance.isUnmounted || suspense.isUnmounted) {
|
|
11880
|
+
return;
|
|
11881
|
+
}
|
|
11882
|
+
const isPendingDep = isInPendingSuspense && suspense.pendingId === instance.suspenseId;
|
|
11883
|
+
unsetCurrentInstance();
|
|
11884
|
+
if (!instance.scope.active) {
|
|
11885
|
+
if (isPendingDep && --suspense.deps === 0) {
|
|
11886
|
+
suspense.resolve();
|
|
11887
|
+
}
|
|
11888
|
+
return;
|
|
11889
|
+
}
|
|
11890
|
+
if (!isPendingDep && suspense.pendingBranch) {
|
|
11891
|
+
const job = () => {
|
|
11892
|
+
if (instance.isUnmounted || suspense.isUnmounted || !instance.scope.active) {
|
|
11893
|
+
return;
|
|
11894
|
+
}
|
|
11895
|
+
if (suspense.pendingBranch) {
|
|
11896
|
+
queueEffectWithSuspense(job, suspense);
|
|
11897
|
+
} else {
|
|
11898
|
+
render(asyncSetupResult);
|
|
11899
|
+
}
|
|
11900
|
+
};
|
|
11901
|
+
job.flags = 16 | 32;
|
|
11902
|
+
queueEffectWithSuspense(job, suspense);
|
|
11903
|
+
return;
|
|
11904
|
+
}
|
|
11905
|
+
render(asyncSetupResult);
|
|
11906
|
+
if (isPendingDep && --suspense.deps === 0) {
|
|
11640
11907
|
suspense.resolve();
|
|
11641
11908
|
}
|
|
11642
11909
|
});
|
|
11643
11910
|
},
|
|
11644
11911
|
unmount(parentSuspense2, doRemove) {
|
|
11645
11912
|
suspense.isUnmounted = true;
|
|
11913
|
+
clearTimeout(suspense.timeoutTimer);
|
|
11914
|
+
suspense.timeoutTimer = void 0;
|
|
11915
|
+
if (parentSuspenseId !== void 0) {
|
|
11916
|
+
const parent = suspense.parent;
|
|
11917
|
+
const pendingId = parentSuspenseId;
|
|
11918
|
+
parentSuspenseId = void 0;
|
|
11919
|
+
queuePostFlushCb(() => {
|
|
11920
|
+
if (parent.pendingId === pendingId && !parent.isUnmounted && --parent.deps === 0) {
|
|
11921
|
+
parent.resolve();
|
|
11922
|
+
}
|
|
11923
|
+
});
|
|
11924
|
+
}
|
|
11646
11925
|
if (suspense.activeBranch) {
|
|
11647
11926
|
unmount(
|
|
11648
11927
|
suspense.activeBranch,
|
|
@@ -11652,12 +11931,8 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|
|
11652
11931
|
);
|
|
11653
11932
|
}
|
|
11654
11933
|
if (suspense.pendingBranch) {
|
|
11655
|
-
unmount(
|
|
11656
|
-
|
|
11657
|
-
parentComponent,
|
|
11658
|
-
parentSuspense2,
|
|
11659
|
-
doRemove
|
|
11660
|
-
);
|
|
11934
|
+
unmount(suspense.pendingBranch, parentComponent, suspense, doRemove);
|
|
11935
|
+
discardEffects(suspense);
|
|
11661
11936
|
}
|
|
11662
11937
|
}
|
|
11663
11938
|
};
|
|
@@ -11727,6 +12002,16 @@ function normalizeSuspenseSlot(s) {
|
|
|
11727
12002
|
}
|
|
11728
12003
|
return s;
|
|
11729
12004
|
}
|
|
12005
|
+
function discardEffects(suspense) {
|
|
12006
|
+
const { effects } = suspense;
|
|
12007
|
+
for (let i = 0; i < effects.length; i++) {
|
|
12008
|
+
const effect = effects[i];
|
|
12009
|
+
if (effect.flags & 16) {
|
|
12010
|
+
queuePostFlushCb(effect);
|
|
12011
|
+
}
|
|
12012
|
+
}
|
|
12013
|
+
effects.length = 0;
|
|
12014
|
+
}
|
|
11730
12015
|
function queueEffectWithSuspense(fn, suspense) {
|
|
11731
12016
|
if (suspense && suspense.pendingBranch) {
|
|
11732
12017
|
if (isArray(fn)) {
|
|
@@ -12042,7 +12327,8 @@ Component that was made reactive: `,
|
|
|
12042
12327
|
}
|
|
12043
12328
|
function guardReactiveProps(props) {
|
|
12044
12329
|
if (!props) return null;
|
|
12045
|
-
|
|
12330
|
+
if (isProxy(props)) return extend({}, props);
|
|
12331
|
+
return isInternalObject(props) ? extend({}, props[rawAttrsKey] || props) : props;
|
|
12046
12332
|
}
|
|
12047
12333
|
function cloneVNode(vnode, extraProps, mergeRef = false, cloneTransition = false) {
|
|
12048
12334
|
const { props, ref, patchFlag, children, transition } = vnode;
|
|
@@ -12224,8 +12510,11 @@ function invokeVNodeHook(hook, instance, vnode, prevVNode = null) {
|
|
|
12224
12510
|
]);
|
|
12225
12511
|
}
|
|
12226
12512
|
|
|
12227
|
-
const emptyAppContext = createAppContext();
|
|
12513
|
+
const emptyAppContext = /* @__PURE__ */ createAppContext();
|
|
12228
12514
|
let uid = 0;
|
|
12515
|
+
function getNextUid() {
|
|
12516
|
+
return uid;
|
|
12517
|
+
}
|
|
12229
12518
|
function createComponentInstance(vnode, parent, suspense) {
|
|
12230
12519
|
const type = vnode.type;
|
|
12231
12520
|
const appContext = (parent ? parent.appContext : vnode.appContext) || emptyAppContext;
|
|
@@ -12434,7 +12723,8 @@ function setupStatefulComponent(instance, isSSR) {
|
|
|
12434
12723
|
setInSSRSetupState(false);
|
|
12435
12724
|
}
|
|
12436
12725
|
}).catch((e) => {
|
|
12437
|
-
handleError(e, instance, 0);
|
|
12726
|
+
handleError(e, instance, 0, void 0, true);
|
|
12727
|
+
instance.ssrRender = (_, push) => push("<!---->");
|
|
12438
12728
|
});
|
|
12439
12729
|
} else {
|
|
12440
12730
|
instance.asyncDep = setupResult;
|
|
@@ -12554,11 +12844,12 @@ function finishComponentSetup(instance, isSSR, skipOptions) {
|
|
|
12554
12844
|
}
|
|
12555
12845
|
}
|
|
12556
12846
|
}
|
|
12847
|
+
const rawAttrsKey = /* @__PURE__ */ Symbol();
|
|
12557
12848
|
const attrsProxyHandlers = {
|
|
12558
12849
|
get(target, key) {
|
|
12559
12850
|
markAttrsAccessed();
|
|
12560
12851
|
track(target, "get", "");
|
|
12561
|
-
return target[key];
|
|
12852
|
+
return key === rawAttrsKey ? target : target[key];
|
|
12562
12853
|
},
|
|
12563
12854
|
set() {
|
|
12564
12855
|
warn$1(`setupContext.attrs is readonly.`);
|
|
@@ -12910,7 +13201,7 @@ function isMemoSame(cached, memo) {
|
|
|
12910
13201
|
return true;
|
|
12911
13202
|
}
|
|
12912
13203
|
|
|
12913
|
-
const version = "3.5.
|
|
13204
|
+
const version = "3.5.45";
|
|
12914
13205
|
const warn = warn$1 ;
|
|
12915
13206
|
const ErrorTypeStrings = ErrorTypeStrings$1 ;
|
|
12916
13207
|
const devtools = devtools$1 ;
|
|
@@ -13530,7 +13821,9 @@ function patchStyle(el, prev, next) {
|
|
|
13530
13821
|
}
|
|
13531
13822
|
}
|
|
13532
13823
|
if (vShowOriginalDisplay in el) {
|
|
13533
|
-
|
|
13824
|
+
if (!isCssString || prev !== next) {
|
|
13825
|
+
el[vShowOriginalDisplay] = hasControlledDisplay ? style.display : "";
|
|
13826
|
+
}
|
|
13534
13827
|
if (el[vShowHidden]) {
|
|
13535
13828
|
style.display = "none";
|
|
13536
13829
|
}
|
|
@@ -14056,7 +14349,9 @@ class VueElement extends BaseClass {
|
|
|
14056
14349
|
"Custom element style injection is not supported when using shadowRoot: false"
|
|
14057
14350
|
);
|
|
14058
14351
|
}
|
|
14059
|
-
this.
|
|
14352
|
+
if (this._connected) {
|
|
14353
|
+
this._mount(def);
|
|
14354
|
+
}
|
|
14060
14355
|
};
|
|
14061
14356
|
const asyncDef = this._def.__asyncLoader;
|
|
14062
14357
|
if (asyncDef) {
|
|
@@ -14426,6 +14721,7 @@ const positionMap = /* @__PURE__ */ new WeakMap();
|
|
|
14426
14721
|
const newPositionMap = /* @__PURE__ */ new WeakMap();
|
|
14427
14722
|
const moveCbKey = /* @__PURE__ */ Symbol("_moveCb");
|
|
14428
14723
|
const enterCbKey = /* @__PURE__ */ Symbol("_enterCb");
|
|
14724
|
+
const pendingGroups = /* @__PURE__ */ new WeakMap();
|
|
14429
14725
|
const decorate = (t) => {
|
|
14430
14726
|
delete t.props.mode;
|
|
14431
14727
|
{
|
|
@@ -14444,21 +14740,30 @@ const TransitionGroupImpl = /* @__PURE__ */ decorate({
|
|
|
14444
14740
|
const state = useTransitionState();
|
|
14445
14741
|
let prevChildren;
|
|
14446
14742
|
let children;
|
|
14447
|
-
|
|
14448
|
-
|
|
14449
|
-
|
|
14743
|
+
let origins;
|
|
14744
|
+
let moves;
|
|
14745
|
+
const willMove = () => {
|
|
14746
|
+
if (moves === void 0) {
|
|
14747
|
+
moves = prevChildren.length > 0 && hasCSSTransform(
|
|
14748
|
+
prevChildren[0].el,
|
|
14749
|
+
instance.vnode.el,
|
|
14750
|
+
resolveMoveClass(props)
|
|
14751
|
+
);
|
|
14450
14752
|
}
|
|
14451
|
-
|
|
14452
|
-
|
|
14453
|
-
|
|
14454
|
-
|
|
14455
|
-
|
|
14456
|
-
)) {
|
|
14753
|
+
return moves;
|
|
14754
|
+
};
|
|
14755
|
+
onUpdated(() => {
|
|
14756
|
+
pendingGroups.delete(instance);
|
|
14757
|
+
if (!willMove()) {
|
|
14457
14758
|
prevChildren = [];
|
|
14759
|
+
origins = void 0;
|
|
14458
14760
|
return;
|
|
14459
14761
|
}
|
|
14762
|
+
const moveClass = resolveMoveClass(props);
|
|
14460
14763
|
prevChildren.forEach(callPendingCbs);
|
|
14461
|
-
|
|
14764
|
+
const shift = origins && getOriginShift(origins, instance.vnode.el);
|
|
14765
|
+
origins = void 0;
|
|
14766
|
+
prevChildren.forEach((c) => recordPosition(c, shift));
|
|
14462
14767
|
const movedChildren = prevChildren.filter(applyTranslation);
|
|
14463
14768
|
forceReflow(instance.vnode.el);
|
|
14464
14769
|
movedChildren.forEach((c) => {
|
|
@@ -14491,6 +14796,7 @@ const TransitionGroupImpl = /* @__PURE__ */ decorate({
|
|
|
14491
14796
|
tag = "span";
|
|
14492
14797
|
}
|
|
14493
14798
|
prevChildren = [];
|
|
14799
|
+
moves = void 0;
|
|
14494
14800
|
if (children) {
|
|
14495
14801
|
for (let i = 0; i < children.length; i++) {
|
|
14496
14802
|
const child = children[i];
|
|
@@ -14522,6 +14828,10 @@ const TransitionGroupImpl = /* @__PURE__ */ decorate({
|
|
|
14522
14828
|
warn(`<TransitionGroup> children must be keyed.`);
|
|
14523
14829
|
}
|
|
14524
14830
|
}
|
|
14831
|
+
if (prevChildren.length) {
|
|
14832
|
+
origins = getOrigins(instance);
|
|
14833
|
+
pendingGroups.set(instance, willMove);
|
|
14834
|
+
}
|
|
14525
14835
|
return createVNode(tag, null, children);
|
|
14526
14836
|
};
|
|
14527
14837
|
}
|
|
@@ -14536,8 +14846,11 @@ function callPendingCbs(c) {
|
|
|
14536
14846
|
el[enterCbKey]();
|
|
14537
14847
|
}
|
|
14538
14848
|
}
|
|
14539
|
-
function
|
|
14540
|
-
|
|
14849
|
+
function resolveMoveClass(props) {
|
|
14850
|
+
return props.moveClass || `${props.name || "v"}-move`;
|
|
14851
|
+
}
|
|
14852
|
+
function recordPosition(c, shift) {
|
|
14853
|
+
newPositionMap.set(c, getPosition(c.el, shift));
|
|
14541
14854
|
}
|
|
14542
14855
|
function applyTranslation(c) {
|
|
14543
14856
|
const oldPos = positionMap.get(c);
|
|
@@ -14561,13 +14874,41 @@ function applyTranslation(c) {
|
|
|
14561
14874
|
return c;
|
|
14562
14875
|
}
|
|
14563
14876
|
}
|
|
14564
|
-
function getPosition(el) {
|
|
14877
|
+
function getPosition(el, shift) {
|
|
14565
14878
|
const rect = el.getBoundingClientRect();
|
|
14566
14879
|
return {
|
|
14567
|
-
left: rect.left,
|
|
14568
|
-
top: rect.top
|
|
14880
|
+
left: rect.left - (shift ? shift.left : 0),
|
|
14881
|
+
top: rect.top - (shift ? shift.top : 0)
|
|
14569
14882
|
};
|
|
14570
14883
|
}
|
|
14884
|
+
function getOrigins(instance) {
|
|
14885
|
+
let origins;
|
|
14886
|
+
for (let group = instance.parent; group; group = group.parent) {
|
|
14887
|
+
const willMove = pendingGroups.get(group);
|
|
14888
|
+
if (willMove) {
|
|
14889
|
+
const item = findItem(group.vnode.el, instance.vnode.el);
|
|
14890
|
+
if (item) {
|
|
14891
|
+
(origins || (origins = [])).push(
|
|
14892
|
+
extend(getPosition(item), { item, willMove })
|
|
14893
|
+
);
|
|
14894
|
+
}
|
|
14895
|
+
}
|
|
14896
|
+
}
|
|
14897
|
+
return origins;
|
|
14898
|
+
}
|
|
14899
|
+
function findItem(root, node) {
|
|
14900
|
+
const container = root.nodeType === 1 ? root : root.parentNode;
|
|
14901
|
+
while (node && node.parentNode !== container) {
|
|
14902
|
+
node = node.parentNode;
|
|
14903
|
+
}
|
|
14904
|
+
if (node && node.nodeType === 1) {
|
|
14905
|
+
return node;
|
|
14906
|
+
}
|
|
14907
|
+
}
|
|
14908
|
+
function getOriginShift(origins, root) {
|
|
14909
|
+
const origin = origins.find((o) => o.willMove() && o.item.contains(root));
|
|
14910
|
+
return origin && getPosition(origin.item, origin);
|
|
14911
|
+
}
|
|
14571
14912
|
function hasCSSTransform(el, root, moveClass) {
|
|
14572
14913
|
const clone = el.cloneNode();
|
|
14573
14914
|
const _vtc = el[vtcKey];
|
|
@@ -14762,18 +15103,18 @@ const vModelSelect = {
|
|
|
14762
15103
|
},
|
|
14763
15104
|
// set value in mounted & updated because <select> relies on its children
|
|
14764
15105
|
// <option>s.
|
|
14765
|
-
mounted(el, { value }) {
|
|
14766
|
-
setSelected(el, value);
|
|
15106
|
+
mounted(el, { value, modifiers: { number } }) {
|
|
15107
|
+
setSelected(el, value, number);
|
|
14767
15108
|
},
|
|
14768
15109
|
beforeUpdate(el, { value }, vnode) {
|
|
14769
15110
|
el._modelValue = value;
|
|
14770
15111
|
el[assignKey] = getModelAssigner(vnode);
|
|
14771
15112
|
},
|
|
14772
|
-
updated(el, { value }) {
|
|
15113
|
+
updated(el, { value, modifiers: { number } }) {
|
|
14773
15114
|
const pending = el._pendingValue;
|
|
14774
15115
|
el._pendingValue = void 0;
|
|
14775
15116
|
if (!pending || pending[0] !== el.multiple || !isSameSelectValue(value, pending[1], pending[0])) {
|
|
14776
|
-
setSelected(el, value);
|
|
15117
|
+
setSelected(el, value, number);
|
|
14777
15118
|
}
|
|
14778
15119
|
}
|
|
14779
15120
|
};
|
|
@@ -14789,7 +15130,7 @@ function isSameSelectValue(value, assignedValue, multiple) {
|
|
|
14789
15130
|
}
|
|
14790
15131
|
return false;
|
|
14791
15132
|
}
|
|
14792
|
-
function setSelected(el, value) {
|
|
15133
|
+
function setSelected(el, value, number = false) {
|
|
14793
15134
|
const isMultiple = el.multiple;
|
|
14794
15135
|
const isArrayValue = isArray(value);
|
|
14795
15136
|
if (isMultiple && !isArrayValue && !isSet(value)) {
|
|
@@ -14810,7 +15151,7 @@ function setSelected(el, value) {
|
|
|
14810
15151
|
option.selected = looseIndexOf(value, optionValue) > -1;
|
|
14811
15152
|
}
|
|
14812
15153
|
} else {
|
|
14813
|
-
option.selected = value.has(optionValue);
|
|
15154
|
+
option.selected = value.has(optionValue) || number && typeof optionValue === "string" && value.has(looseToNumber(optionValue));
|
|
14814
15155
|
}
|
|
14815
15156
|
} else if (looseEqual(getValue(option), value)) {
|
|
14816
15157
|
if (el.selectedIndex !== i) el.selectedIndex = i;
|
|
@@ -16550,7 +16891,8 @@ const errorMessages = {
|
|
|
16550
16891
|
[42]: `v-model value must be a valid JavaScript member expression.`,
|
|
16551
16892
|
[43]: `v-model cannot be used on v-for or v-slot scope variables because they are not writable.`,
|
|
16552
16893
|
[44]: `v-model cannot be used on a prop, because local prop bindings are not writable.
|
|
16553
|
-
Use a v-bind binding combined with a v-on listener that emits update:x event instead
|
|
16894
|
+
Use a v-bind binding combined with a v-on listener that emits update:x event instead.
|
|
16895
|
+
For props declared with defineModel(), assign the returned ref to a variable and use v-model on that variable.`,
|
|
16554
16896
|
[45]: `v-model cannot be used on a const binding because it is not writable.`,
|
|
16555
16897
|
[46]: `Error parsing JavaScript expression: `,
|
|
16556
16898
|
[47]: `<KeepAlive> expects exactly one child component.`,
|
|
@@ -17494,7 +17836,11 @@ function getLoc(start, end) {
|
|
|
17494
17836
|
};
|
|
17495
17837
|
}
|
|
17496
17838
|
function cloneLoc(loc) {
|
|
17497
|
-
return
|
|
17839
|
+
return {
|
|
17840
|
+
start: extend({}, loc.start),
|
|
17841
|
+
end: extend({}, loc.end),
|
|
17842
|
+
source: loc.source
|
|
17843
|
+
};
|
|
17498
17844
|
}
|
|
17499
17845
|
function setLocEnd(loc, end) {
|
|
17500
17846
|
loc.end = tokenizer.getPos(end);
|
|
@@ -19141,7 +19487,7 @@ const transformFor = createStructuralDirectiveTransform(
|
|
|
19141
19487
|
createCompoundExpression([`const _memo = (`, memo.exp, `)`]),
|
|
19142
19488
|
createCompoundExpression([
|
|
19143
19489
|
`if (_cached && _cached.el`,
|
|
19144
|
-
...keyExp ? [` && _cached.key === `, keyExp] : [],
|
|
19490
|
+
...keyExp ? [` && _cached.key === (`, keyExp, `)`] : [],
|
|
19145
19491
|
` && ${context.helperString(
|
|
19146
19492
|
IS_MEMO_SAME
|
|
19147
19493
|
)}(_cached, _memo)) return _cached`
|
|
@@ -21080,7 +21426,8 @@ const transformTransition = (node, context) => {
|
|
|
21080
21426
|
if (!node.children.length) {
|
|
21081
21427
|
return;
|
|
21082
21428
|
}
|
|
21083
|
-
|
|
21429
|
+
const multipleChildren = hasMultipleChildren(node);
|
|
21430
|
+
if (multipleChildren) {
|
|
21084
21431
|
context.onError(
|
|
21085
21432
|
createDOMCompilerError(
|
|
21086
21433
|
63,
|
|
@@ -21307,7 +21654,8 @@ const validateHtmlNesting = (node, context) => {
|
|
|
21307
21654
|
|
|
21308
21655
|
const DOMNodeTransforms = [
|
|
21309
21656
|
transformStyle,
|
|
21310
|
-
|
|
21657
|
+
transformTransition,
|
|
21658
|
+
...[validateHtmlNesting]
|
|
21311
21659
|
];
|
|
21312
21660
|
const DOMDirectiveTransforms = {
|
|
21313
21661
|
cloak: noopDirectiveTransform,
|