@vue/compat 3.6.0-rc.13 → 3.6.0-rc.15
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-compat.d.ts +16 -5
- package/dist/vue.cjs.js +562 -235
- package/dist/vue.cjs.prod.js +463 -188
- package/dist/vue.esm-browser.js +530 -229
- package/dist/vue.esm-browser.prod.js +7 -7
- package/dist/vue.esm-bundler.js +561 -235
- package/dist/vue.global.js +530 -229
- package/dist/vue.global.prod.js +7 -7
- package/dist/vue.runtime.esm-browser.js +530 -229
- package/dist/vue.runtime.esm-browser.prod.js +7 -7
- package/dist/vue.runtime.esm-bundler.js +561 -235
- package/dist/vue.runtime.global.js +530 -229
- package/dist/vue.runtime.global.prod.js +7 -7
- package/package.json +3 -3
package/dist/vue.global.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/compat v3.6.0-rc.
|
|
2
|
+
* @vue/compat v3.6.0-rc.15
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -71,10 +71,18 @@ var Vue = (function() {
|
|
|
71
71
|
const isReservedProp = /*@__PURE__*/ makeMap(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted");
|
|
72
72
|
const isBuiltInTag = /*#__PURE__*/ makeMap("slot,component");
|
|
73
73
|
const isBuiltInDirective = /*@__PURE__*/ makeMap("bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo");
|
|
74
|
+
const STRING_CACHE_MAX_SIZE = 1e4;
|
|
74
75
|
const cacheStringFunction = (fn) => {
|
|
75
|
-
|
|
76
|
+
let cache = Object.create(null);
|
|
77
|
+
let size = 0;
|
|
76
78
|
return ((str) => {
|
|
77
|
-
|
|
79
|
+
const hit = cache[str];
|
|
80
|
+
if (hit !== void 0) return hit;
|
|
81
|
+
if (++size > STRING_CACHE_MAX_SIZE) {
|
|
82
|
+
cache = Object.create(null);
|
|
83
|
+
size = 1;
|
|
84
|
+
}
|
|
85
|
+
return cache[str] = fn(str);
|
|
78
86
|
});
|
|
79
87
|
};
|
|
80
88
|
const camelizeRE = /-(\w)/g;
|
|
@@ -82,22 +90,22 @@ var Vue = (function() {
|
|
|
82
90
|
/**
|
|
83
91
|
* @private
|
|
84
92
|
*/
|
|
85
|
-
const camelize = cacheStringFunction((str) => str.replace(camelizeRE, camelizeReplacer));
|
|
93
|
+
const camelize = /*@__PURE__*/ cacheStringFunction((str) => str.replace(camelizeRE, camelizeReplacer));
|
|
86
94
|
const hyphenateRE = /\B([A-Z])/g;
|
|
87
95
|
/**
|
|
88
96
|
* @private
|
|
89
97
|
*/
|
|
90
|
-
const hyphenate = cacheStringFunction((str) => str.replace(hyphenateRE, "-$1").toLowerCase());
|
|
98
|
+
const hyphenate = /*@__PURE__*/ cacheStringFunction((str) => str.replace(hyphenateRE, "-$1").toLowerCase());
|
|
91
99
|
/**
|
|
92
100
|
* @private
|
|
93
101
|
*/
|
|
94
|
-
const capitalize = cacheStringFunction((str) => {
|
|
102
|
+
const capitalize = /*@__PURE__*/ cacheStringFunction((str) => {
|
|
95
103
|
return str.charAt(0).toUpperCase() + str.slice(1);
|
|
96
104
|
});
|
|
97
105
|
/**
|
|
98
106
|
* @private
|
|
99
107
|
*/
|
|
100
|
-
const toHandlerKey = cacheStringFunction((str) => {
|
|
108
|
+
const toHandlerKey = /*@__PURE__*/ cacheStringFunction((str) => {
|
|
101
109
|
return str ? `on${capitalize(str)}` : ``;
|
|
102
110
|
});
|
|
103
111
|
/**
|
|
@@ -301,26 +309,11 @@ var Vue = (function() {
|
|
|
301
309
|
* Do NOT use in runtime code paths unless behind `__DEV__` flag.
|
|
302
310
|
*/
|
|
303
311
|
const isVoidTag = /*@__PURE__*/ makeMap(VOID_TAGS);
|
|
304
|
-
|
|
305
|
-
//#region packages/shared/src/domAttrConfig.ts
|
|
306
|
-
/**
|
|
307
|
-
* On the client we only need to offer special cases for boolean attributes that
|
|
308
|
-
* have different names from their corresponding dom properties:
|
|
309
|
-
* - itemscope -> N/A
|
|
310
|
-
* - allowfullscreen -> allowFullscreen
|
|
311
|
-
* - formnovalidate -> formNoValidate
|
|
312
|
-
* - ismap -> isMap
|
|
313
|
-
* - nomodule -> noModule
|
|
314
|
-
* - novalidate -> noValidate
|
|
315
|
-
* - playsinline -> playsInline
|
|
316
|
-
* - readonly -> readOnly
|
|
317
|
-
*/
|
|
318
|
-
const specialBooleanAttrs = `itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,playsinline,readonly`;
|
|
319
|
-
const isSpecialBooleanAttr = /*@__PURE__*/ makeMap(specialBooleanAttrs);
|
|
312
|
+
const isSpecialBooleanAttr = /*@__PURE__*/ makeMap("itemscope,allowfullscreen,disablepictureinpicture,disableremoteplayback,formnovalidate,ismap,nomodule,novalidate,playsinline,readonly");
|
|
320
313
|
/**
|
|
321
314
|
* The full list is needed during SSR to produce the correct initial markup.
|
|
322
315
|
*/
|
|
323
|
-
const isBooleanAttr = /*@__PURE__*/ makeMap(
|
|
316
|
+
const isBooleanAttr = /*@__PURE__*/ makeMap("itemscope,allowfullscreen,disablepictureinpicture,disableremoteplayback,formnovalidate,ismap,nomodule,novalidate,playsinline,readonly,async,autofocus,autoplay,controls,default,defer,disabled,inert,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected");
|
|
324
317
|
/**
|
|
325
318
|
* Boolean attributes should be included if the value is truthy or ''.
|
|
326
319
|
* e.g. `<select multiple>` compiles to `{ multiple: '' }`
|
|
@@ -517,39 +510,30 @@ var Vue = (function() {
|
|
|
517
510
|
return String(value);
|
|
518
511
|
}
|
|
519
512
|
//#endregion
|
|
520
|
-
//#region packages/
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
513
|
+
//#region packages/shared/src/vaporFlags.ts
|
|
514
|
+
/**
|
|
515
|
+
* The data of the comment a vapor server render opens the branch of a `v-if`
|
|
516
|
+
* chain with, `<!--[1-->`: the digits are the branch's position in the chain,
|
|
517
|
+
* and `<!--]-->` closes it like a fragment.
|
|
518
|
+
*/
|
|
519
|
+
function isVaporBranchStart(data) {
|
|
520
|
+
if (data.length < 2 || data.charCodeAt(0) !== 91) return false;
|
|
521
|
+
for (let i = 1; i < data.length; i++) {
|
|
522
|
+
const c = data.charCodeAt(i);
|
|
523
|
+
if (c < 48 || c > 57) return false;
|
|
529
524
|
}
|
|
525
|
+
return true;
|
|
530
526
|
}
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
if (val && !this._onTrigger) setupFlagsHandler(this);
|
|
538
|
-
this._onTrigger = val;
|
|
539
|
-
}
|
|
540
|
-
});
|
|
527
|
+
/**
|
|
528
|
+
* The data of a comment opening a range only a vapor server render emits:
|
|
529
|
+
* `<!--{-->` around the render of a component, or a v-if branch's.
|
|
530
|
+
*/
|
|
531
|
+
function isVaporRangeStart(data) {
|
|
532
|
+
return data === "{" || isVaporBranchStart(data);
|
|
541
533
|
}
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
get() {
|
|
546
|
-
return target._flags;
|
|
547
|
-
},
|
|
548
|
-
set(value) {
|
|
549
|
-
if (!(target._flags & 48) && !!(value & 48)) onTrigger(this);
|
|
550
|
-
target._flags = value;
|
|
551
|
-
}
|
|
552
|
-
});
|
|
534
|
+
/** The data of the comment closing the range `open` opens. */
|
|
535
|
+
function rangeCloseOf(open) {
|
|
536
|
+
return open === "(" ? ")" : open === "{" ? "}" : "]";
|
|
553
537
|
}
|
|
554
538
|
//#endregion
|
|
555
539
|
//#region packages/reactivity/src/warning.ts
|
|
@@ -561,13 +545,7 @@ var Vue = (function() {
|
|
|
561
545
|
const notifyBuffer = [];
|
|
562
546
|
let batchDepth = 0;
|
|
563
547
|
let activeSub = void 0;
|
|
564
|
-
|
|
565
|
-
function incRunDepth() {
|
|
566
|
-
++runDepth;
|
|
567
|
-
}
|
|
568
|
-
function decRunDepth() {
|
|
569
|
-
--runDepth;
|
|
570
|
-
}
|
|
548
|
+
const CHECKING = 512;
|
|
571
549
|
let globalVersion = 0;
|
|
572
550
|
let notifyIndex = 0;
|
|
573
551
|
let notifyBufferLength = 0;
|
|
@@ -616,6 +594,7 @@ var Vue = (function() {
|
|
|
616
594
|
const nextDep = link.nextDep;
|
|
617
595
|
const nextSub = link.nextSub;
|
|
618
596
|
const prevSub = link.prevSub;
|
|
597
|
+
link.prevDep = link.nextDep = link.prevSub = link.nextSub = void 0;
|
|
619
598
|
if (nextDep !== void 0) nextDep.prevDep = prevDep;
|
|
620
599
|
else sub.depsTail = prevDep;
|
|
621
600
|
if (prevDep !== void 0) prevDep.nextDep = nextDep;
|
|
@@ -623,7 +602,7 @@ var Vue = (function() {
|
|
|
623
602
|
if (nextSub !== void 0) nextSub.prevSub = prevSub;
|
|
624
603
|
else dep.subsTail = prevSub;
|
|
625
604
|
if (prevSub !== void 0) prevSub.nextSub = nextSub;
|
|
626
|
-
else if ((dep.subs = nextSub) === void 0) {
|
|
605
|
+
else if ((dep.subs = nextSub) === void 0 && dep.flags & 1) {
|
|
627
606
|
let toRemove = dep.deps;
|
|
628
607
|
if (toRemove !== void 0) {
|
|
629
608
|
do
|
|
@@ -641,14 +620,12 @@ var Vue = (function() {
|
|
|
641
620
|
const sub = link.sub;
|
|
642
621
|
let flags = sub.flags;
|
|
643
622
|
if (flags & 3) {
|
|
644
|
-
if (!(flags &
|
|
645
|
-
|
|
646
|
-
if (runDepth) sub.flags |= 8;
|
|
647
|
-
} else if (!(flags & 12)) flags = 0;
|
|
623
|
+
if (!(flags & 44)) sub.flags = flags | 32;
|
|
624
|
+
else if (!(flags & 12)) flags = 0;
|
|
648
625
|
else if (!(flags & 4)) sub.flags = flags & -9 | 32;
|
|
649
626
|
else if (!(flags & 48) && isValidLink(link, sub)) {
|
|
650
627
|
sub.flags = flags | 40;
|
|
651
|
-
flags
|
|
628
|
+
flags = sub === activeSub || activeSub === void 0 ? 0 : flags & 1;
|
|
652
629
|
} else flags = 0;
|
|
653
630
|
if (flags & 2) notifyBuffer[notifyBufferLength++] = sub;
|
|
654
631
|
if (flags & 1) {
|
|
@@ -684,7 +661,7 @@ var Vue = (function() {
|
|
|
684
661
|
function startTracking(sub) {
|
|
685
662
|
++globalVersion;
|
|
686
663
|
sub.depsTail = void 0;
|
|
687
|
-
sub.flags = sub.flags & -
|
|
664
|
+
sub.flags = sub.flags & -569 | 4;
|
|
688
665
|
return setActiveSub(sub);
|
|
689
666
|
}
|
|
690
667
|
function endTracking(sub, prevSub) {
|
|
@@ -692,8 +669,11 @@ var Vue = (function() {
|
|
|
692
669
|
activeSub = prevSub;
|
|
693
670
|
const depsTail = sub.depsTail;
|
|
694
671
|
let toRemove = depsTail !== void 0 ? depsTail.nextDep : sub.deps;
|
|
695
|
-
while (toRemove !== void 0)
|
|
696
|
-
|
|
672
|
+
while (toRemove !== void 0) {
|
|
673
|
+
unlink(toRemove, sub);
|
|
674
|
+
toRemove = depsTail !== void 0 ? depsTail.nextDep : sub.deps;
|
|
675
|
+
}
|
|
676
|
+
if ((sub.flags &= -5) & 8) markRecursed(sub);
|
|
697
677
|
}
|
|
698
678
|
function flush() {
|
|
699
679
|
let hasError = false;
|
|
@@ -715,45 +695,67 @@ var Vue = (function() {
|
|
|
715
695
|
if (hasError) throw error;
|
|
716
696
|
}
|
|
717
697
|
function checkDirty(link, sub) {
|
|
698
|
+
try {
|
|
699
|
+
return walkDirty(link, sub);
|
|
700
|
+
} catch (err) {
|
|
701
|
+
markStale(sub);
|
|
702
|
+
throw err;
|
|
703
|
+
}
|
|
704
|
+
}
|
|
705
|
+
function walkDirty(link, sub) {
|
|
706
|
+
const root = sub;
|
|
718
707
|
let stack;
|
|
719
708
|
let checkDepth = 0;
|
|
709
|
+
let staleDepth = 0;
|
|
710
|
+
let staleFloor = 0;
|
|
720
711
|
top: do {
|
|
721
712
|
const dep = link.dep;
|
|
722
713
|
const depFlags = dep.flags;
|
|
723
714
|
let dirty = false;
|
|
724
715
|
if (sub.flags & 16) dirty = true;
|
|
725
716
|
else if ((depFlags & 17) === 17) {
|
|
726
|
-
const subs = dep.subs;
|
|
727
717
|
if (dep.update()) {
|
|
728
|
-
|
|
718
|
+
const subs = dep.subs;
|
|
719
|
+
if (subs !== void 0 && (subs !== link || subs.nextSub !== void 0)) shallowPropagate(subs);
|
|
729
720
|
dirty = true;
|
|
730
721
|
}
|
|
731
722
|
} else if ((depFlags & 33) === 33) {
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
723
|
+
const depth = dep === root ? 0 : depFlags & CHECKING ? checkingDepth(dep, stack, checkDepth) : -1;
|
|
724
|
+
if (depth < 0) {
|
|
725
|
+
if (link.nextSub !== void 0 || link.prevSub !== void 0) dep.flags = depFlags | CHECKING;
|
|
726
|
+
stack = {
|
|
727
|
+
value: link,
|
|
728
|
+
prev: stack
|
|
729
|
+
};
|
|
730
|
+
link = dep.deps;
|
|
731
|
+
sub = dep;
|
|
732
|
+
++checkDepth;
|
|
733
|
+
continue;
|
|
734
|
+
}
|
|
735
|
+
if (depth < checkDepth) {
|
|
736
|
+
staleFloor = staleDepth && staleFloor < depth ? staleFloor : depth;
|
|
737
|
+
staleDepth = checkDepth;
|
|
738
|
+
}
|
|
740
739
|
}
|
|
741
740
|
if (!dirty && link.nextDep !== void 0) {
|
|
742
741
|
link = link.nextDep;
|
|
743
742
|
continue;
|
|
744
743
|
}
|
|
745
744
|
while (checkDepth) {
|
|
745
|
+
const stale = checkDepth === staleDepth;
|
|
746
|
+
if (stale && --staleDepth === staleFloor) staleDepth = 0;
|
|
746
747
|
--checkDepth;
|
|
747
748
|
link = stack.value;
|
|
748
749
|
stack = stack.prev;
|
|
749
750
|
if (dirty) {
|
|
750
|
-
const subs = sub.subs;
|
|
751
751
|
if (sub.update()) {
|
|
752
|
-
|
|
752
|
+
const subs = sub.subs;
|
|
753
|
+
if (subs !== void 0 && (subs !== link || subs.nextSub !== void 0)) shallowPropagate(subs);
|
|
753
754
|
sub = link.sub;
|
|
754
755
|
continue;
|
|
755
756
|
}
|
|
756
|
-
} else sub.flags
|
|
757
|
+
} else if (stale) sub.flags = sub.flags & -545 | 16;
|
|
758
|
+
else sub.flags &= -545;
|
|
757
759
|
sub = link.sub;
|
|
758
760
|
if (link.nextDep !== void 0) {
|
|
759
761
|
link = link.nextDep;
|
|
@@ -761,9 +763,21 @@ var Vue = (function() {
|
|
|
761
763
|
}
|
|
762
764
|
dirty = false;
|
|
763
765
|
}
|
|
764
|
-
return dirty && !!sub.flags;
|
|
766
|
+
return (dirty || !!(sub.flags & 16)) && !!sub.flags;
|
|
765
767
|
} while (true);
|
|
766
768
|
}
|
|
769
|
+
function checkingDepth(dep, stack, depth) {
|
|
770
|
+
for (; stack !== void 0; stack = stack.prev, --depth) if (stack.value.dep === dep) return depth;
|
|
771
|
+
return -1;
|
|
772
|
+
}
|
|
773
|
+
function markStale(sub) {
|
|
774
|
+
const nodes = [sub];
|
|
775
|
+
do {
|
|
776
|
+
sub = nodes.pop();
|
|
777
|
+
sub.flags = sub.flags & -33 | 16;
|
|
778
|
+
for (let link = sub.deps; link !== void 0; link = link.nextDep) if (link.dep.flags & 32) nodes.push(link.dep);
|
|
779
|
+
} while (nodes.length);
|
|
780
|
+
}
|
|
767
781
|
function shallowPropagate(link) {
|
|
768
782
|
do {
|
|
769
783
|
const sub = link.sub;
|
|
@@ -781,6 +795,71 @@ var Vue = (function() {
|
|
|
781
795
|
}
|
|
782
796
|
return false;
|
|
783
797
|
}
|
|
798
|
+
function markRecursed(sub) {
|
|
799
|
+
const nodes = [sub];
|
|
800
|
+
do {
|
|
801
|
+
sub = nodes.pop();
|
|
802
|
+
for (let link = sub.deps; link !== void 0; link = link.nextDep) {
|
|
803
|
+
const dep = link.dep;
|
|
804
|
+
if ((dep.flags & 40) === 32) {
|
|
805
|
+
dep.flags |= 8;
|
|
806
|
+
nodes.push(dep);
|
|
807
|
+
}
|
|
808
|
+
}
|
|
809
|
+
} while (nodes.length);
|
|
810
|
+
}
|
|
811
|
+
//#endregion
|
|
812
|
+
//#region packages/reactivity/src/debug.ts
|
|
813
|
+
const triggered = [];
|
|
814
|
+
function onTrack(sub, debugInfo) {
|
|
815
|
+
if (sub.onTrack) sub.onTrack(extend({ effect: sub }, debugInfo));
|
|
816
|
+
}
|
|
817
|
+
function onTrigger(sub, debugInfo) {
|
|
818
|
+
if (sub.onTrigger) sub.onTrigger(extend({ effect: sub }, debugInfo));
|
|
819
|
+
}
|
|
820
|
+
function startTrigger() {
|
|
821
|
+
triggered.push([]);
|
|
822
|
+
}
|
|
823
|
+
function endTrigger(debugInfo) {
|
|
824
|
+
const subs = triggered.pop();
|
|
825
|
+
if (subs.length) {
|
|
826
|
+
startBatch();
|
|
827
|
+
try {
|
|
828
|
+
for (let i = 0; i < subs.length; i++) {
|
|
829
|
+
const sub = subs[i];
|
|
830
|
+
if (sub.flags & 3) onTrigger(sub, debugInfo);
|
|
831
|
+
}
|
|
832
|
+
} finally {
|
|
833
|
+
endBatch();
|
|
834
|
+
}
|
|
835
|
+
}
|
|
836
|
+
}
|
|
837
|
+
function setupOnTrigger(target) {
|
|
838
|
+
Object.defineProperty(target.prototype, "onTrigger", {
|
|
839
|
+
get() {
|
|
840
|
+
return this._onTrigger;
|
|
841
|
+
},
|
|
842
|
+
set(val) {
|
|
843
|
+
if (val && !this._onTrigger) setupFlagsHandler(this);
|
|
844
|
+
this._onTrigger = val;
|
|
845
|
+
}
|
|
846
|
+
});
|
|
847
|
+
}
|
|
848
|
+
function setupFlagsHandler(target) {
|
|
849
|
+
target._flags = target.flags;
|
|
850
|
+
Object.defineProperty(target, "flags", {
|
|
851
|
+
get() {
|
|
852
|
+
return target._flags;
|
|
853
|
+
},
|
|
854
|
+
set(value) {
|
|
855
|
+
if (!(target._flags & 48) && !!(value & 48)) {
|
|
856
|
+
if (triggered.length) triggered[triggered.length - 1].push(this);
|
|
857
|
+
else onTrigger(this);
|
|
858
|
+
}
|
|
859
|
+
target._flags = value;
|
|
860
|
+
}
|
|
861
|
+
});
|
|
862
|
+
}
|
|
784
863
|
//#endregion
|
|
785
864
|
//#region packages/reactivity/src/dep.ts
|
|
786
865
|
var Dep = class {
|
|
@@ -840,20 +919,12 @@ var Vue = (function() {
|
|
|
840
919
|
if (!depsMap) return;
|
|
841
920
|
const run = (dep) => {
|
|
842
921
|
if (dep !== void 0 && dep.subs !== void 0) {
|
|
843
|
-
triggerEventInfos.push({
|
|
844
|
-
target,
|
|
845
|
-
type,
|
|
846
|
-
key,
|
|
847
|
-
newValue,
|
|
848
|
-
oldValue,
|
|
849
|
-
oldTarget
|
|
850
|
-
});
|
|
851
922
|
propagate(dep.subs);
|
|
852
923
|
shallowPropagate(dep.subs);
|
|
853
|
-
triggerEventInfos.pop();
|
|
854
924
|
}
|
|
855
925
|
};
|
|
856
926
|
startBatch();
|
|
927
|
+
startTrigger();
|
|
857
928
|
if (type === "clear") depsMap.forEach(run);
|
|
858
929
|
else {
|
|
859
930
|
const targetIsArray = isArray(target);
|
|
@@ -883,6 +954,14 @@ var Vue = (function() {
|
|
|
883
954
|
}
|
|
884
955
|
}
|
|
885
956
|
}
|
|
957
|
+
endTrigger({
|
|
958
|
+
target,
|
|
959
|
+
type,
|
|
960
|
+
key,
|
|
961
|
+
newValue,
|
|
962
|
+
oldValue,
|
|
963
|
+
oldTarget
|
|
964
|
+
});
|
|
886
965
|
endBatch();
|
|
887
966
|
}
|
|
888
967
|
function getDepFromReactive(object, key) {
|
|
@@ -1097,7 +1176,7 @@ var Vue = (function() {
|
|
|
1097
1176
|
//#endregion
|
|
1098
1177
|
//#region packages/reactivity/src/baseHandlers.ts
|
|
1099
1178
|
const isNonTrackableKeys = /*@__PURE__*/ makeMap(`__proto__,__v_isRef,__isVue`);
|
|
1100
|
-
const builtInSymbols = new Set(/*@__PURE__*/ Object.getOwnPropertyNames(Symbol).filter((key) => key !== "arguments" && key !== "caller").map((key) => Symbol[key]).filter(isSymbol));
|
|
1179
|
+
const builtInSymbols = /*@__PURE__*/ new Set(/*@__PURE__*/ Object.getOwnPropertyNames(Symbol).filter((key) => key !== "arguments" && key !== "caller").map((key) => Symbol[key]).filter(isSymbol));
|
|
1101
1180
|
function hasOwnProperty(key) {
|
|
1102
1181
|
if (!isSymbol(key)) key = String(key);
|
|
1103
1182
|
const obj = /* @__PURE__ */ toRaw(this);
|
|
@@ -1681,16 +1760,16 @@ var Vue = (function() {
|
|
|
1681
1760
|
this._value = !useDirectValue && this._wrap ? this._wrap(newValue) : newValue;
|
|
1682
1761
|
const subs = this.subs;
|
|
1683
1762
|
if (subs !== void 0) {
|
|
1684
|
-
|
|
1763
|
+
startTrigger();
|
|
1764
|
+
propagate(subs);
|
|
1765
|
+
endTrigger({
|
|
1685
1766
|
target: this,
|
|
1686
1767
|
type: "set",
|
|
1687
1768
|
key: "value",
|
|
1688
1769
|
newValue,
|
|
1689
1770
|
oldValue
|
|
1690
1771
|
});
|
|
1691
|
-
propagate(subs);
|
|
1692
1772
|
if (!batchDepth) flush();
|
|
1693
|
-
triggerEventInfos.pop();
|
|
1694
1773
|
}
|
|
1695
1774
|
}
|
|
1696
1775
|
}
|
|
@@ -1727,8 +1806,10 @@ var Vue = (function() {
|
|
|
1727
1806
|
function triggerRef(ref) {
|
|
1728
1807
|
const dep = ref.dep;
|
|
1729
1808
|
if (dep !== void 0 && dep.subs !== void 0) {
|
|
1809
|
+
startTrigger();
|
|
1730
1810
|
propagate(dep.subs);
|
|
1731
1811
|
shallowPropagate(dep.subs);
|
|
1812
|
+
endTrigger();
|
|
1732
1813
|
if (!batchDepth) flush();
|
|
1733
1814
|
}
|
|
1734
1815
|
}
|
|
@@ -1919,6 +2000,10 @@ var Vue = (function() {
|
|
|
1919
2000
|
get active() {
|
|
1920
2001
|
return !(this.flags & 1024);
|
|
1921
2002
|
}
|
|
2003
|
+
/** @internal */
|
|
2004
|
+
get running() {
|
|
2005
|
+
return !!(this.flags & 4);
|
|
2006
|
+
}
|
|
1922
2007
|
pause() {
|
|
1923
2008
|
this.flags |= 256;
|
|
1924
2009
|
}
|
|
@@ -1932,11 +2017,9 @@ var Vue = (function() {
|
|
|
1932
2017
|
if (!this.active) return this.fn();
|
|
1933
2018
|
cleanup(this);
|
|
1934
2019
|
const prevSub = startTracking(this);
|
|
1935
|
-
incRunDepth();
|
|
1936
2020
|
try {
|
|
1937
2021
|
return this.fn();
|
|
1938
2022
|
} finally {
|
|
1939
|
-
decRunDepth();
|
|
1940
2023
|
endTracking(this, prevSub);
|
|
1941
2024
|
const flags = this.flags;
|
|
1942
2025
|
if ((flags & 136) === 136) {
|
|
@@ -1959,9 +2042,9 @@ var Vue = (function() {
|
|
|
1959
2042
|
if (flags & 16) return true;
|
|
1960
2043
|
if (flags & 32) {
|
|
1961
2044
|
if (checkDirty(this.deps, this)) {
|
|
1962
|
-
this.
|
|
2045
|
+
if (this.active) this.flags |= 16;
|
|
1963
2046
|
return true;
|
|
1964
|
-
} else this.flags
|
|
2047
|
+
} else this.flags &= -33;
|
|
1965
2048
|
}
|
|
1966
2049
|
return false;
|
|
1967
2050
|
}
|
|
@@ -1973,20 +2056,17 @@ var Vue = (function() {
|
|
|
1973
2056
|
if (options) {
|
|
1974
2057
|
const { onStop, scheduler } = options;
|
|
1975
2058
|
if (onStop) {
|
|
1976
|
-
options.onStop = void 0;
|
|
1977
2059
|
const stop = e.stop.bind(e);
|
|
1978
2060
|
e.stop = () => {
|
|
1979
2061
|
stop();
|
|
1980
2062
|
onStop();
|
|
1981
2063
|
};
|
|
1982
2064
|
}
|
|
1983
|
-
if (scheduler) {
|
|
1984
|
-
|
|
1985
|
-
|
|
1986
|
-
|
|
1987
|
-
|
|
1988
|
-
}
|
|
1989
|
-
extend(e, options);
|
|
2065
|
+
if (scheduler) e.notify = () => {
|
|
2066
|
+
if (!(e.flags & 1280)) scheduler();
|
|
2067
|
+
};
|
|
2068
|
+
e.onTrack = options.onTrack;
|
|
2069
|
+
e.onTrigger = options.onTrigger;
|
|
1990
2070
|
}
|
|
1991
2071
|
try {
|
|
1992
2072
|
e.run();
|
|
@@ -2046,8 +2126,10 @@ var Vue = (function() {
|
|
|
2046
2126
|
const flags = this.flags;
|
|
2047
2127
|
if (flags & 256) {
|
|
2048
2128
|
this.flags = flags & -257;
|
|
2049
|
-
|
|
2050
|
-
|
|
2129
|
+
const deps = [];
|
|
2130
|
+
for (let link = this.deps; link !== void 0; link = link.nextDep) deps.push(link.dep);
|
|
2131
|
+
for (let i = 0; i < deps.length; i++) {
|
|
2132
|
+
const dep = deps[i];
|
|
2051
2133
|
if ("resume" in dep) dep.resume();
|
|
2052
2134
|
}
|
|
2053
2135
|
}
|
|
@@ -2076,8 +2158,10 @@ var Vue = (function() {
|
|
|
2076
2158
|
while (dep !== void 0) {
|
|
2077
2159
|
const node = dep.dep;
|
|
2078
2160
|
if ("stop" in node) {
|
|
2079
|
-
|
|
2161
|
+
const prev = dep.prevDep;
|
|
2080
2162
|
node.stop();
|
|
2163
|
+
const next = prev !== void 0 ? prev.nextDep : this.deps;
|
|
2164
|
+
dep = next === dep ? dep.nextDep : next;
|
|
2081
2165
|
} else dep = unlink(dep, this);
|
|
2082
2166
|
}
|
|
2083
2167
|
cleanup(this);
|
|
@@ -2118,11 +2202,14 @@ var Vue = (function() {
|
|
|
2118
2202
|
* @see {@link https://vuejs.org/api/reactivity-advanced.html#onscopedispose}
|
|
2119
2203
|
*/
|
|
2120
2204
|
function onScopeDispose(fn, failSilently = false) {
|
|
2121
|
-
if (activeEffectScope !== void 0)
|
|
2122
|
-
|
|
2205
|
+
if (activeEffectScope !== void 0) {
|
|
2206
|
+
if (activeEffectScope.active) activeEffectScope.cleanups[activeEffectScope.cleanupsLength++] = fn;
|
|
2207
|
+
else fn();
|
|
2208
|
+
} else if (!failSilently) warn$2("onScopeDispose() is called when there is no active effect scope to be associated with.");
|
|
2123
2209
|
}
|
|
2124
2210
|
//#endregion
|
|
2125
2211
|
//#region packages/reactivity/src/computed.ts
|
|
2212
|
+
const FAILED = 64;
|
|
2126
2213
|
/**
|
|
2127
2214
|
* @private exported by @vue/reactivity for Vue core use, but not exported from
|
|
2128
2215
|
* the main vue package
|
|
@@ -2171,12 +2258,24 @@ var Vue = (function() {
|
|
|
2171
2258
|
}
|
|
2172
2259
|
get value() {
|
|
2173
2260
|
const flags = this.flags;
|
|
2174
|
-
|
|
2175
|
-
if (this.
|
|
2176
|
-
|
|
2177
|
-
|
|
2178
|
-
|
|
2179
|
-
|
|
2261
|
+
try {
|
|
2262
|
+
if (flags & 16 || flags & 32 && checkDirty(this.deps, this)) {
|
|
2263
|
+
if (this.update()) {
|
|
2264
|
+
const subs = this.subs;
|
|
2265
|
+
if (subs !== void 0) shallowPropagate(subs);
|
|
2266
|
+
}
|
|
2267
|
+
} else if (flags & 32) this.flags = flags & -33;
|
|
2268
|
+
} catch (err) {
|
|
2269
|
+
if (activeSub !== void 0) {
|
|
2270
|
+
onTrack(activeSub, {
|
|
2271
|
+
target: this,
|
|
2272
|
+
type: "get",
|
|
2273
|
+
key: "value"
|
|
2274
|
+
});
|
|
2275
|
+
link(this, activeSub);
|
|
2276
|
+
} else if (activeEffectScope !== void 0) link(this, activeEffectScope);
|
|
2277
|
+
throw err;
|
|
2278
|
+
}
|
|
2180
2279
|
if (activeSub !== void 0) {
|
|
2181
2280
|
onTrack(activeSub, {
|
|
2182
2281
|
target: this,
|
|
@@ -2184,7 +2283,18 @@ var Vue = (function() {
|
|
|
2184
2283
|
key: "value"
|
|
2185
2284
|
});
|
|
2186
2285
|
link(this, activeSub);
|
|
2187
|
-
} else if (activeEffectScope !== void 0)
|
|
2286
|
+
} else if (activeEffectScope !== void 0) {
|
|
2287
|
+
if (activeEffectScope.active) link(this, activeEffectScope);
|
|
2288
|
+
else if (this.subs === void 0) {
|
|
2289
|
+
let dep = this.deps;
|
|
2290
|
+
if (dep !== void 0) {
|
|
2291
|
+
do
|
|
2292
|
+
dep = unlink(dep, this);
|
|
2293
|
+
while (dep !== void 0);
|
|
2294
|
+
this.flags |= 16;
|
|
2295
|
+
}
|
|
2296
|
+
}
|
|
2297
|
+
}
|
|
2188
2298
|
return this._value;
|
|
2189
2299
|
}
|
|
2190
2300
|
set value(newValue) {
|
|
@@ -2196,11 +2306,15 @@ var Vue = (function() {
|
|
|
2196
2306
|
try {
|
|
2197
2307
|
const oldValue = this._value;
|
|
2198
2308
|
const newValue = this.fn(oldValue);
|
|
2199
|
-
if (hasChanged(oldValue, newValue)) {
|
|
2309
|
+
if (hasChanged(oldValue, newValue) || this.flags & FAILED) {
|
|
2200
2310
|
this._value = newValue;
|
|
2311
|
+
this.flags &= -65;
|
|
2201
2312
|
return true;
|
|
2202
2313
|
}
|
|
2203
2314
|
return false;
|
|
2315
|
+
} catch (err) {
|
|
2316
|
+
this.flags |= FAILED;
|
|
2317
|
+
throw err;
|
|
2204
2318
|
} finally {
|
|
2205
2319
|
endTracking(this, prevSub);
|
|
2206
2320
|
}
|
|
@@ -2221,6 +2335,7 @@ var Vue = (function() {
|
|
|
2221
2335
|
cRef.onTrack = debugOptions.onTrack;
|
|
2222
2336
|
cRef.onTrigger = debugOptions.onTrigger;
|
|
2223
2337
|
}
|
|
2338
|
+
if (isSSR && activeEffectScope !== void 0) link(cRef, activeEffectScope);
|
|
2224
2339
|
return cRef;
|
|
2225
2340
|
}
|
|
2226
2341
|
//#endregion
|
|
@@ -2591,7 +2706,7 @@ var Vue = (function() {
|
|
|
2591
2706
|
if (isFunction(fn)) {
|
|
2592
2707
|
const res = callWithErrorHandling(fn, instance, type, args);
|
|
2593
2708
|
if (res && isPromise(res)) res.catch((err) => {
|
|
2594
|
-
handleError(err, instance, type);
|
|
2709
|
+
handleError(err, instance, type, void 0, true);
|
|
2595
2710
|
});
|
|
2596
2711
|
return res;
|
|
2597
2712
|
}
|
|
@@ -2601,7 +2716,7 @@ var Vue = (function() {
|
|
|
2601
2716
|
return values;
|
|
2602
2717
|
} else warn$1(`Invalid value type passed to callWithAsyncErrorHandling(): ${typeof fn}`);
|
|
2603
2718
|
}
|
|
2604
|
-
function handleError(err, instance, type, throwInDev = true) {
|
|
2719
|
+
function handleError(err, instance, type, throwInDev = true, isAsyncError = false) {
|
|
2605
2720
|
const { errorHandler, throwUnhandledErrorInProduction } = instance && instance.appContext.config || EMPTY_OBJ;
|
|
2606
2721
|
if (instance) {
|
|
2607
2722
|
let cur = instance.parent;
|
|
@@ -2609,7 +2724,7 @@ var Vue = (function() {
|
|
|
2609
2724
|
const errorInfo = ErrorTypeStrings$1[type];
|
|
2610
2725
|
while (cur) {
|
|
2611
2726
|
const errorCapturedHooks = cur.ec;
|
|
2612
|
-
if (errorCapturedHooks) {
|
|
2727
|
+
if (errorCapturedHooks && !cur.isUnmounted && (!isAsyncError || cur.scope.active)) {
|
|
2613
2728
|
for (let i = 0; i < errorCapturedHooks.length; i++) if (errorCapturedHooks[i](err, exposedInstance, errorInfo) === false) return;
|
|
2614
2729
|
}
|
|
2615
2730
|
cur = cur.parent;
|
|
@@ -2914,7 +3029,11 @@ var Vue = (function() {
|
|
|
2914
3029
|
updateComponentDef(record.initialDef, newComp);
|
|
2915
3030
|
const instances = [...record.instances];
|
|
2916
3031
|
if (isVapor && newComp.__vapor && !instances.some((instance) => instance.parent && !instance.parent.vapor) && !instances.some((i) => i.ceReload)) {
|
|
2917
|
-
for (const instance of instances)
|
|
3032
|
+
for (const instance of instances) {
|
|
3033
|
+
if (instance.root && instance.root.ce && instance !== instance.root) instance.root.ce._removeChildStyle(instance.type);
|
|
3034
|
+
const oldComp = normalizeClassComponent(instance.type);
|
|
3035
|
+
if (oldComp !== record.initialDef) updateComponentDef(oldComp, newComp);
|
|
3036
|
+
}
|
|
2918
3037
|
const dirtyInstances = new Set(instances);
|
|
2919
3038
|
const rerenderedParents = /* @__PURE__ */ new Set();
|
|
2920
3039
|
runWithHmrUpdating(() => {
|
|
@@ -2955,7 +3074,25 @@ var Vue = (function() {
|
|
|
2955
3074
|
if (instance.root.ce && instance !== instance.root) instance.root.ce._removeChildStyle(oldComp);
|
|
2956
3075
|
}
|
|
2957
3076
|
parents.forEach((parent) => {
|
|
2958
|
-
|
|
3077
|
+
const children = instances.filter((instance) => instance.parent === parent);
|
|
3078
|
+
const update = () => {
|
|
3079
|
+
if (!parent.scope.active) return;
|
|
3080
|
+
const activeChildren = children.filter((instance) => instance.scope.active);
|
|
3081
|
+
if (!activeChildren.length) return;
|
|
3082
|
+
const pending = activeChildren.find((instance) => instance.asyncDep && !instance.asyncResolved) || locateUnresolvedAsyncRoot(parent);
|
|
3083
|
+
if (pending) {
|
|
3084
|
+
pending.asyncDep.catch(NOOP).then(() => {
|
|
3085
|
+
if (parent.scope.active && (pending.asyncResolved || !pending.scope.active)) queueJob(update);
|
|
3086
|
+
});
|
|
3087
|
+
return;
|
|
3088
|
+
}
|
|
3089
|
+
for (const instance of activeChildren) {
|
|
3090
|
+
const oldComp = normalizeClassComponent(instance.type);
|
|
3091
|
+
let dirtyInstances = hmrDirtyComponents.get(oldComp);
|
|
3092
|
+
if (!dirtyInstances) hmrDirtyComponents.set(oldComp, dirtyInstances = /* @__PURE__ */ new Set());
|
|
3093
|
+
dirtyInstances.add(instance);
|
|
3094
|
+
hmrDirtyComponentsMode.set(oldComp, !!isVapor);
|
|
3095
|
+
}
|
|
2959
3096
|
runWithHmrUpdating(() => {
|
|
2960
3097
|
if (parent.vapor) parent.hmrRerender();
|
|
2961
3098
|
else {
|
|
@@ -2966,7 +3103,12 @@ var Vue = (function() {
|
|
|
2966
3103
|
}
|
|
2967
3104
|
}
|
|
2968
3105
|
});
|
|
2969
|
-
|
|
3106
|
+
queuePostFlushCb(() => {
|
|
3107
|
+
hmrDirtyComponents.clear();
|
|
3108
|
+
hmrDirtyComponentsMode.clear();
|
|
3109
|
+
});
|
|
3110
|
+
};
|
|
3111
|
+
queueJob(update);
|
|
2970
3112
|
});
|
|
2971
3113
|
}
|
|
2972
3114
|
queuePostFlushCb(() => {
|
|
@@ -3515,11 +3657,28 @@ var Vue = (function() {
|
|
|
3515
3657
|
return vnode;
|
|
3516
3658
|
}
|
|
3517
3659
|
function invokeDirectiveHook(vnode, prevVNode, instance, name) {
|
|
3518
|
-
|
|
3660
|
+
let hookVNode = vnode;
|
|
3661
|
+
if (name === "beforeMount") vnode._mount = vnode;
|
|
3662
|
+
else if (name === "beforeUpdate") {
|
|
3663
|
+
const mount = prevVNode && prevVNode._mount;
|
|
3664
|
+
if (mount) {
|
|
3665
|
+
mount._latest = vnode;
|
|
3666
|
+
vnode._mount = mount;
|
|
3667
|
+
}
|
|
3668
|
+
} else if (name === "mounted") {
|
|
3669
|
+
const latest = vnode._latest;
|
|
3670
|
+
vnode._mount = vnode._latest = void 0;
|
|
3671
|
+
if (latest) {
|
|
3672
|
+
hookVNode = latest;
|
|
3673
|
+
latest._mount = void 0;
|
|
3674
|
+
}
|
|
3675
|
+
}
|
|
3676
|
+
const bindings = hookVNode.dirs;
|
|
3519
3677
|
const oldBindings = prevVNode && prevVNode.dirs;
|
|
3520
3678
|
for (let i = 0; i < bindings.length; i++) {
|
|
3521
|
-
|
|
3679
|
+
let binding = bindings[i];
|
|
3522
3680
|
if (oldBindings) binding.oldValue = oldBindings[i].value;
|
|
3681
|
+
else if (name === "mounted" && binding.oldValue !== void 0) binding = extend({}, binding, { oldValue: void 0 });
|
|
3523
3682
|
let hook = binding.dir[name];
|
|
3524
3683
|
if (!hook) hook = mapCompatDirectiveHook(name, binding.dir, instance);
|
|
3525
3684
|
if (hook) {
|
|
@@ -3527,7 +3686,7 @@ var Vue = (function() {
|
|
|
3527
3686
|
callWithAsyncErrorHandling(hook, instance, 8, [
|
|
3528
3687
|
vnode.el,
|
|
3529
3688
|
binding,
|
|
3530
|
-
|
|
3689
|
+
hookVNode,
|
|
3531
3690
|
prevVNode
|
|
3532
3691
|
]);
|
|
3533
3692
|
setActiveSub(prevSub);
|
|
@@ -3948,7 +4107,15 @@ var Vue = (function() {
|
|
|
3948
4107
|
const { mode } = rawProps;
|
|
3949
4108
|
checkTransitionMode(mode);
|
|
3950
4109
|
return prepareTransitionSwitch(instance.subTree, child, rawProps, state, instance, mode === "out-in" ? resumeAfterLeave || (resumeAfterLeave = () => {
|
|
3951
|
-
if (!(instance.effect.flags & 1024))
|
|
4110
|
+
if (!(instance.effect.flags & 1024)) {
|
|
4111
|
+
if (instance.effect.running) {
|
|
4112
|
+
const job = () => {
|
|
4113
|
+
if (!(instance.effect.flags & 1024)) instance.update();
|
|
4114
|
+
};
|
|
4115
|
+
job.i = instance;
|
|
4116
|
+
queueJob(job);
|
|
4117
|
+
} else instance.update();
|
|
4118
|
+
}
|
|
3952
4119
|
}) : NOOP);
|
|
3953
4120
|
};
|
|
3954
4121
|
}
|
|
@@ -3979,7 +4146,7 @@ var Vue = (function() {
|
|
|
3979
4146
|
}
|
|
3980
4147
|
return leavingVNodesCache;
|
|
3981
4148
|
}
|
|
3982
|
-
function resolveTransitionHooks(vnode, props, state, instance
|
|
4149
|
+
function resolveTransitionHooks(vnode, props, state, instance) {
|
|
3983
4150
|
const key = String(vnode.key);
|
|
3984
4151
|
const leavingVNodesCache = getLeavingNodesForType(state, vnode);
|
|
3985
4152
|
const hooks = baseResolveTransitionHooks({
|
|
@@ -4002,9 +4169,7 @@ var Vue = (function() {
|
|
|
4002
4169
|
}
|
|
4003
4170
|
},
|
|
4004
4171
|
cloneHooks: (vnode) => {
|
|
4005
|
-
|
|
4006
|
-
if (postClone) postClone(hooks);
|
|
4007
|
-
return hooks;
|
|
4172
|
+
return resolveTransitionHooks(vnode, props, state, instance);
|
|
4008
4173
|
}
|
|
4009
4174
|
}, props, state, instance);
|
|
4010
4175
|
if (isVaporInteropEnabled && vnode.type === VaporSlot) extend(hooks, {
|
|
@@ -4042,7 +4207,7 @@ var Vue = (function() {
|
|
|
4042
4207
|
callHook(hook, [el]);
|
|
4043
4208
|
},
|
|
4044
4209
|
enter(el) {
|
|
4045
|
-
if (!isHmrUpdating && isLeaving()) return;
|
|
4210
|
+
if (!isHmrUpdating && isLeaving(el)) return;
|
|
4046
4211
|
let hook = onEnter;
|
|
4047
4212
|
let afterHook = onAfterEnter;
|
|
4048
4213
|
let cancelHook = onEnterCancelled;
|
|
@@ -4086,7 +4251,19 @@ var Vue = (function() {
|
|
|
4086
4251
|
else done();
|
|
4087
4252
|
},
|
|
4088
4253
|
clone(node) {
|
|
4089
|
-
|
|
4254
|
+
if (!cloneHooks) return hooks;
|
|
4255
|
+
const cloned = cloneHooks(node);
|
|
4256
|
+
cloned.afterLeave = () => {
|
|
4257
|
+
if (hooks.afterLeave) hooks.afterLeave();
|
|
4258
|
+
};
|
|
4259
|
+
cloned.delayLeave = (el, earlyRemove, delayedLeave) => {
|
|
4260
|
+
if (hooks.delayLeave) hooks.delayLeave(el, earlyRemove, delayedLeave);
|
|
4261
|
+
else delayedLeave();
|
|
4262
|
+
};
|
|
4263
|
+
cloned.delayedLeave = () => {
|
|
4264
|
+
if (hooks.delayedLeave) hooks.delayedLeave();
|
|
4265
|
+
};
|
|
4266
|
+
return cloned;
|
|
4090
4267
|
}
|
|
4091
4268
|
};
|
|
4092
4269
|
return hooks;
|
|
@@ -4121,10 +4298,7 @@ var Vue = (function() {
|
|
|
4121
4298
|
if (state.isLeaving) return emptyPlaceholder(next);
|
|
4122
4299
|
const nextInner = getInnerChild$1(next);
|
|
4123
4300
|
if (!nextInner) return emptyPlaceholder(next);
|
|
4124
|
-
|
|
4125
|
-
if (delayedLeaveSource) forwardDelayedLeave(hooks, delayedLeaveSource);
|
|
4126
|
-
enterHooks = hooks;
|
|
4127
|
-
});
|
|
4301
|
+
const enterHooks = resolveTransitionHooks(nextInner, props, state, instance);
|
|
4128
4302
|
if (delayedLeaveSource) forwardDelayedLeave(enterHooks, delayedLeaveSource);
|
|
4129
4303
|
if (nextInner.type !== Comment) setTransitionHooks(nextInner, enterHooks);
|
|
4130
4304
|
const mode = props.mode;
|
|
@@ -4190,9 +4364,14 @@ var Vue = (function() {
|
|
|
4190
4364
|
return setTransitionHooks(isTeleport(subTree.type) ? getInnerChild$1(subTree) || subTree : subTree, hooks);
|
|
4191
4365
|
}
|
|
4192
4366
|
} else if (vnode.shapeFlag & 128) {
|
|
4193
|
-
const
|
|
4194
|
-
|
|
4195
|
-
|
|
4367
|
+
const suspense = vnode.suspense;
|
|
4368
|
+
if (suspense) {
|
|
4369
|
+
const branch = suspense.isHydrating ? suspense.pendingBranch : suspense.activeBranch;
|
|
4370
|
+
if (branch) return setTransitionHooks(branch, hooks.clone(branch));
|
|
4371
|
+
} else {
|
|
4372
|
+
vnode.ssContent.transition = hooks.clone(vnode.ssContent);
|
|
4373
|
+
vnode.ssFallback.transition = hooks.clone(vnode.ssFallback);
|
|
4374
|
+
}
|
|
4196
4375
|
} else {
|
|
4197
4376
|
vnode.transition = hooks;
|
|
4198
4377
|
if (vnode.type === Fragment && isArray(vnode.children)) {
|
|
@@ -4410,6 +4589,8 @@ var Vue = (function() {
|
|
|
4410
4589
|
if (isMathMLContainer(container)) return "mathml";
|
|
4411
4590
|
};
|
|
4412
4591
|
const isComment = (node) => node.nodeType === 8;
|
|
4592
|
+
/** The data of a comment opening a range a hydration steps over as one. */
|
|
4593
|
+
const isRangeStart = (data) => data === "[" || data === "(" || isVaporRangeStart(data);
|
|
4413
4594
|
function createHydrationFunctions(rendererInternals) {
|
|
4414
4595
|
const { mt: mountComponent, p: patch, o: { patchProp, createText, nextSibling, parentNode, remove, insert, createComment } } = rendererInternals;
|
|
4415
4596
|
const hydrate = (vnode, container) => {
|
|
@@ -4427,7 +4608,7 @@ var Vue = (function() {
|
|
|
4427
4608
|
};
|
|
4428
4609
|
const hydrateNode = (node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized = false) => {
|
|
4429
4610
|
optimized = optimized || !!vnode.dynamicChildren;
|
|
4430
|
-
const isFragmentStart = isComment(node) && (node.data === "[" || node.data === "(");
|
|
4611
|
+
const isFragmentStart = isComment(node) && (node.data === "[" || node.data === "(" || isVaporInteropEnabled && isVaporRangeStart(node.data));
|
|
4431
4612
|
const onMismatch = () => handleMismatch(node, vnode, parentComponent, parentSuspense, slotScopeIds, isFragmentStart);
|
|
4432
4613
|
const { type, ref, shapeFlag, patchFlag } = vnode;
|
|
4433
4614
|
let domType = node.nodeType;
|
|
@@ -4616,16 +4797,17 @@ var Vue = (function() {
|
|
|
4616
4797
|
const container = parentNode(node);
|
|
4617
4798
|
const first = nextSibling(node);
|
|
4618
4799
|
const next = isVaporInteropEnabled && vnode.vo && node.data === "(" ? getVaporInterface(parentComponent, vnode).hydrateSlotOutlet(vnode, node, parentComponent, parentSuspense, slotScopeIds) : hydrateChildren(first, vnode, container, parentComponent, parentSuspense, slotScopeIds, optimized);
|
|
4619
|
-
|
|
4800
|
+
const close = isVaporInteropEnabled ? rangeCloseOf(node.data) : node.data === "(" ? ")" : "]";
|
|
4801
|
+
if (next && isComment(next) && next.data === close) return nextSibling(vnode.anchor = next);
|
|
4620
4802
|
else {
|
|
4621
4803
|
logMismatchError();
|
|
4622
|
-
insert(vnode.anchor = createComment(
|
|
4804
|
+
insert(vnode.anchor = createComment(close), container, next);
|
|
4623
4805
|
return next;
|
|
4624
4806
|
}
|
|
4625
4807
|
};
|
|
4626
4808
|
const handleMismatch = (node, vnode, parentComponent, parentSuspense, slotScopeIds, isFragment) => {
|
|
4627
4809
|
if (!isNodeMismatchAllowed(node, vnode)) {
|
|
4628
|
-
warn$1(`Hydration node mismatch:\n- rendered on server:`, node, node.nodeType === 3 ? `(text)` : isComment(node) && (node.data
|
|
4810
|
+
warn$1(`Hydration node mismatch:\n- rendered on server:`, node, node.nodeType === 3 ? `(text)` : isComment(node) && isRangeStart(node.data) ? `(start of fragment)` : ``, `\n- expected on client:`, vnode.type);
|
|
4629
4811
|
logMismatchError();
|
|
4630
4812
|
}
|
|
4631
4813
|
vnode.el = null;
|
|
@@ -4641,18 +4823,18 @@ var Vue = (function() {
|
|
|
4641
4823
|
const container = parentNode(node);
|
|
4642
4824
|
remove(node);
|
|
4643
4825
|
patch(null, vnode, container, next, parentComponent, parentSuspense, getContainerType(container), slotScopeIds);
|
|
4644
|
-
if (parentComponent && parentComponent.vnode) {
|
|
4826
|
+
if (parentComponent && parentComponent.vnode && parentComponent.vnode.el === node) {
|
|
4645
4827
|
parentComponent.vnode.el = vnode.el;
|
|
4646
4828
|
updateHOCHostEl(parentComponent, vnode.el);
|
|
4647
4829
|
}
|
|
4648
4830
|
return next;
|
|
4649
4831
|
};
|
|
4650
|
-
const locateClosingAnchor = (node, open = node && isComment(node) && node.data === "("
|
|
4832
|
+
const locateClosingAnchor = (node, open = node && isComment(node) && (node.data === "(" || isVaporInteropEnabled && node.data === "{") ? node.data : "[", close = isVaporInteropEnabled ? rangeCloseOf(open) : open === "(" ? ")" : "]") => {
|
|
4651
4833
|
let match = 0;
|
|
4652
4834
|
while (node) {
|
|
4653
4835
|
node = nextSibling(node);
|
|
4654
4836
|
if (node && isComment(node)) {
|
|
4655
|
-
if (node.data === open) match++;
|
|
4837
|
+
if (node.data === open || isVaporInteropEnabled && open === "[" && isVaporBranchStart(node.data)) match++;
|
|
4656
4838
|
if (node.data === close) {
|
|
4657
4839
|
if (match === 0) return nextSibling(node);
|
|
4658
4840
|
else match--;
|
|
@@ -4908,9 +5090,9 @@ var Vue = (function() {
|
|
|
4908
5090
|
return teardown;
|
|
4909
5091
|
};
|
|
4910
5092
|
function forEachElement(node, cb) {
|
|
4911
|
-
if (isComment(node) && (node.data
|
|
5093
|
+
if (isComment(node) && isRangeStart(node.data)) {
|
|
4912
5094
|
const open = node.data;
|
|
4913
|
-
const close = open
|
|
5095
|
+
const close = rangeCloseOf(open);
|
|
4914
5096
|
let depth = 1;
|
|
4915
5097
|
let next = node.nextSibling;
|
|
4916
5098
|
while (next) {
|
|
@@ -4919,7 +5101,7 @@ var Vue = (function() {
|
|
|
4919
5101
|
} else if (isComment(next)) {
|
|
4920
5102
|
if (next.data === close) {
|
|
4921
5103
|
if (--depth === 0) break;
|
|
4922
|
-
} else if (next.data === open) depth++;
|
|
5104
|
+
} else if (close === "]" ? next.data === "[" || isVaporBranchStart(next.data) : next.data === open) depth++;
|
|
4923
5105
|
}
|
|
4924
5106
|
next = next.nextSibling;
|
|
4925
5107
|
}
|
|
@@ -4947,7 +5129,7 @@ var Vue = (function() {
|
|
|
4947
5129
|
if (resolvedComp) return () => createInnerComp(resolvedComp, instance);
|
|
4948
5130
|
const onError = (err) => {
|
|
4949
5131
|
setPendingRequest(null);
|
|
4950
|
-
handleError(err, instance, 13, !errorComponent);
|
|
5132
|
+
handleError(err, instance, 13, !errorComponent, true);
|
|
4951
5133
|
};
|
|
4952
5134
|
if (suspensible && instance.suspense || false) return load().then((comp) => {
|
|
4953
5135
|
return () => createInnerComp(comp, instance);
|
|
@@ -5028,10 +5210,12 @@ var Vue = (function() {
|
|
|
5028
5210
|
const delayed = /* @__PURE__ */ ref(!!delay);
|
|
5029
5211
|
let timeoutTimer;
|
|
5030
5212
|
let delayTimer;
|
|
5031
|
-
if (instance)
|
|
5032
|
-
|
|
5033
|
-
|
|
5034
|
-
|
|
5213
|
+
if (instance) instance.scope.run(() => {
|
|
5214
|
+
onScopeDispose(() => {
|
|
5215
|
+
if (timeoutTimer != null) clearTimeout(timeoutTimer);
|
|
5216
|
+
if (delayTimer != null) clearTimeout(delayTimer);
|
|
5217
|
+
});
|
|
5218
|
+
});
|
|
5035
5219
|
if (delay) delayTimer = setTimeout(() => {
|
|
5036
5220
|
if (instance && instance.isUnmounted) return;
|
|
5037
5221
|
delayed.value = false;
|
|
@@ -5066,7 +5250,12 @@ var Vue = (function() {
|
|
|
5066
5250
|
}
|
|
5067
5251
|
return;
|
|
5068
5252
|
}
|
|
5069
|
-
if (!el.parentNode
|
|
5253
|
+
if (!el.parentNode) return;
|
|
5254
|
+
if (wasConnected && !el.isConnected) {
|
|
5255
|
+
let current = instance;
|
|
5256
|
+
while (current && !current.isDeactivated) current = current.parent;
|
|
5257
|
+
if (!current) return;
|
|
5258
|
+
}
|
|
5070
5259
|
hydrate();
|
|
5071
5260
|
};
|
|
5072
5261
|
const doHydrate = hydrateStrategy ? () => {
|
|
@@ -5120,7 +5309,11 @@ var Vue = (function() {
|
|
|
5120
5309
|
activate(vnode, container, anchor, renderer, keepAliveInstance, parentSuspense, namespace, optimized);
|
|
5121
5310
|
};
|
|
5122
5311
|
sharedContext.deactivate = (vnode) => {
|
|
5123
|
-
|
|
5312
|
+
const cached = sharedContext.getCachedComponent(vnode);
|
|
5313
|
+
if (!cached || cached.component !== vnode.component) return false;
|
|
5314
|
+
if (isVaporInteropEnabled && isVaporComponent(vnode.type)) getVaporInterface(keepAliveInstance, vnode).deactivate(vnode, storageContainer, parentSuspense);
|
|
5315
|
+
else deactivate(vnode, storageContainer, renderer, keepAliveInstance, parentSuspense);
|
|
5316
|
+
return true;
|
|
5124
5317
|
};
|
|
5125
5318
|
function unmount(vnode) {
|
|
5126
5319
|
resetShapeFlag(vnode);
|
|
@@ -5152,11 +5345,15 @@ var Vue = (function() {
|
|
|
5152
5345
|
let pendingCacheKey = null;
|
|
5153
5346
|
const cacheSubtree = () => {
|
|
5154
5347
|
if (pendingCacheKey != null) {
|
|
5155
|
-
if (isSuspense(keepAliveInstance.subTree.type))
|
|
5156
|
-
const
|
|
5157
|
-
|
|
5158
|
-
|
|
5159
|
-
|
|
5348
|
+
if (isSuspense(keepAliveInstance.subTree.type)) {
|
|
5349
|
+
const cacheInnerChild = () => {
|
|
5350
|
+
const vnode = getInnerChild(keepAliveInstance.subTree);
|
|
5351
|
+
if (vnode.component) cache.set(pendingCacheKey, vnode);
|
|
5352
|
+
};
|
|
5353
|
+
const suspense = keepAliveInstance.subTree.suspense;
|
|
5354
|
+
if (suspense.pendingBranch) queuePostRenderEffect(cacheInnerChild, void 0, suspense);
|
|
5355
|
+
else cacheInnerChild();
|
|
5356
|
+
} else cache.set(pendingCacheKey, getInnerChild(keepAliveInstance.subTree));
|
|
5160
5357
|
}
|
|
5161
5358
|
};
|
|
5162
5359
|
onMounted(cacheSubtree);
|
|
@@ -5266,9 +5463,8 @@ var Vue = (function() {
|
|
|
5266
5463
|
}
|
|
5267
5464
|
function injectToKeepAliveRoot(hook, type, target, keepAliveRoot) {
|
|
5268
5465
|
const injected = injectHook(type, hook, keepAliveRoot, true);
|
|
5269
|
-
|
|
5270
|
-
|
|
5271
|
-
}, target);
|
|
5466
|
+
const removal = injectHook("um", () => remove(keepAliveRoot[type], injected), target);
|
|
5467
|
+
removal.flags = 8;
|
|
5272
5468
|
}
|
|
5273
5469
|
function resetShapeFlag(vnode) {
|
|
5274
5470
|
vnode.shapeFlag &= -257;
|
|
@@ -5690,6 +5886,11 @@ var Vue = (function() {
|
|
|
5690
5886
|
ret.props = extend({}, ret.props, { key: branchKey });
|
|
5691
5887
|
ret.key = branchKey;
|
|
5692
5888
|
}
|
|
5889
|
+
if (isBlockTreeEnabled <= 0) {
|
|
5890
|
+
if (!ret.vs.props) ret.vs.props = ret.props;
|
|
5891
|
+
ret.props = ret.key != null ? { key: ret.key } : null;
|
|
5892
|
+
ret.vs.attrs = EMPTY_OBJ;
|
|
5893
|
+
}
|
|
5693
5894
|
if (!noSlotted && ret.scopeId) ret.slotScopeIds = [ret.scopeId + "-s"];
|
|
5694
5895
|
return ret;
|
|
5695
5896
|
}
|
|
@@ -6669,7 +6870,7 @@ var Vue = (function() {
|
|
|
6669
6870
|
if (options.el) return vm.$mount(options.el);
|
|
6670
6871
|
else return vm;
|
|
6671
6872
|
}
|
|
6672
|
-
Vue.version = `2.6.14-compat:3.6.0-rc.
|
|
6873
|
+
Vue.version = `2.6.14-compat:3.6.0-rc.15`;
|
|
6673
6874
|
Vue.config = singletonApp.config;
|
|
6674
6875
|
Vue.use = (plugin, ...options) => {
|
|
6675
6876
|
if (plugin && isFunction(plugin.install)) plugin.install(Vue, ...options);
|
|
@@ -8129,8 +8330,10 @@ var Vue = (function() {
|
|
|
8129
8330
|
def(el, "__vnode", vnode, true);
|
|
8130
8331
|
def(el, "__vueParentComponent", parentComponent, true);
|
|
8131
8332
|
if (dirs) invokeDirectiveHook(vnode, null, parentComponent, "beforeMount");
|
|
8132
|
-
if (transition)
|
|
8133
|
-
|
|
8333
|
+
if (transition) {
|
|
8334
|
+
if (!needTransition(parentSuspense, transition) && !transition.persisted) el[deferredEnterKey] = true;
|
|
8335
|
+
performTransitionEnter(el, transition, () => hostInsert(el, container, anchor), parentSuspense);
|
|
8336
|
+
} else hostInsert(el, container, anchor);
|
|
8134
8337
|
if ((vnodeHook = props && props.onVnodeMounted) || dirs) {
|
|
8135
8338
|
const isHmr = isHmrUpdating;
|
|
8136
8339
|
queuePostRenderEffect(() => {
|
|
@@ -8395,16 +8598,20 @@ var Vue = (function() {
|
|
|
8395
8598
|
} else {
|
|
8396
8599
|
let { next, bu, u, parent, vnode } = instance;
|
|
8397
8600
|
{
|
|
8398
|
-
const
|
|
8399
|
-
if (
|
|
8601
|
+
const unresolvedAsyncRoot = locateUnresolvedAsyncRoot(instance);
|
|
8602
|
+
if (unresolvedAsyncRoot) {
|
|
8400
8603
|
if (next) {
|
|
8401
8604
|
next.el = vnode.el;
|
|
8402
8605
|
updateComponentPreRender(instance, next, optimized);
|
|
8403
8606
|
}
|
|
8404
|
-
|
|
8405
|
-
|
|
8406
|
-
if (
|
|
8407
|
-
|
|
8607
|
+
unresolvedAsyncRoot.asyncDep.then(() => {
|
|
8608
|
+
const retry = () => {
|
|
8609
|
+
if (instance.effect.flags & 1024) return;
|
|
8610
|
+
if (parentSuspense && parentSuspense.pendingBranch) queuePostRenderEffect(retry, void 0, parentSuspense);
|
|
8611
|
+
else instance.update();
|
|
8612
|
+
};
|
|
8613
|
+
retry.flags = 24;
|
|
8614
|
+
queuePostRenderEffect(retry, void 0, parentSuspense);
|
|
8408
8615
|
});
|
|
8409
8616
|
return;
|
|
8410
8617
|
}
|
|
@@ -8428,7 +8635,7 @@ var Vue = (function() {
|
|
|
8428
8635
|
const prevTree = instance.subTree;
|
|
8429
8636
|
instance.subTree = nextTree;
|
|
8430
8637
|
startMeasure(instance, `patch`);
|
|
8431
|
-
patch(prevTree, nextTree, hostParentNode(prevTree.el), getNextHostNode(prevTree), instance, parentSuspense, namespace);
|
|
8638
|
+
patch(prevTree, nextTree, hostParentNode(prevTree.el || resolveAsyncComponentPlaceholder(prevTree)), getNextHostNode(prevTree), instance, parentSuspense, namespace);
|
|
8432
8639
|
endMeasure(instance, `patch`);
|
|
8433
8640
|
next.el = nextTree.el;
|
|
8434
8641
|
if (originNext === null) updateHOCHostEl(instance, nextTree.el);
|
|
@@ -8632,9 +8839,7 @@ var Vue = (function() {
|
|
|
8632
8839
|
}
|
|
8633
8840
|
if (cacheIndex != null && (!vnode.ctx || vnode.ctx === parentComponent)) parentComponent.renderCache[cacheIndex] = void 0;
|
|
8634
8841
|
if (shapeFlag & 256) {
|
|
8635
|
-
if (
|
|
8636
|
-
else parentComponent.ctx.deactivate(vnode);
|
|
8637
|
-
return;
|
|
8842
|
+
if (parentComponent.ctx.deactivate(vnode)) return;
|
|
8638
8843
|
}
|
|
8639
8844
|
if (isVaporInteropEnabled && shapeFlag & 6 && isVaporComponent(type)) {
|
|
8640
8845
|
getVaporInterface(parentComponent, vnode).unmount(vnode, doRemove, parentSuspense);
|
|
@@ -8715,13 +8920,15 @@ var Vue = (function() {
|
|
|
8715
8920
|
if (effect) {
|
|
8716
8921
|
effect.stop();
|
|
8717
8922
|
unmount(subTree, instance, parentSuspense, doRemove);
|
|
8718
|
-
} else if (
|
|
8923
|
+
} else if (subTree) {
|
|
8719
8924
|
subTree.transition = instance.vnode.transition;
|
|
8720
8925
|
unmount(subTree, instance, parentSuspense, doRemove);
|
|
8721
8926
|
}
|
|
8722
8927
|
if (um) queuePostRenderEffect(um, void 0, parentSuspense);
|
|
8723
8928
|
if (isCompatEnabled$1("INSTANCE_EVENT_HOOKS", instance)) queuePostRenderEffect(() => instance.emit("hook:destroyed"), void 0, parentSuspense);
|
|
8724
|
-
|
|
8929
|
+
const markUnmounted = () => instance.isUnmounted = true;
|
|
8930
|
+
markUnmounted.flags = 8;
|
|
8931
|
+
queuePostRenderEffect(markUnmounted, void 0, parentSuspense);
|
|
8725
8932
|
devtoolsComponentRemoved(instance);
|
|
8726
8933
|
};
|
|
8727
8934
|
const unmountChildren = (children, parentComponent, parentSuspense, doRemove = false, optimized = false, start = 0) => {
|
|
@@ -8835,11 +9042,11 @@ var Vue = (function() {
|
|
|
8835
9042
|
c2.el && (c2.el.__vnode = c2);
|
|
8836
9043
|
}
|
|
8837
9044
|
}
|
|
8838
|
-
function
|
|
9045
|
+
function locateUnresolvedAsyncRoot(instance) {
|
|
8839
9046
|
const subComponent = instance.subTree && instance.subTree.component;
|
|
8840
9047
|
if (subComponent) {
|
|
8841
9048
|
if (subComponent.asyncDep && !subComponent.asyncResolved) return subComponent;
|
|
8842
|
-
else return
|
|
9049
|
+
else return locateUnresolvedAsyncRoot(subComponent);
|
|
8843
9050
|
}
|
|
8844
9051
|
}
|
|
8845
9052
|
function invalidateMount(hooks) {
|
|
@@ -8909,7 +9116,9 @@ var Vue = (function() {
|
|
|
8909
9116
|
function resolveAsyncComponentPlaceholder(anchorVnode) {
|
|
8910
9117
|
if (anchorVnode.placeholder) return anchorVnode.placeholder;
|
|
8911
9118
|
const instance = anchorVnode.component;
|
|
8912
|
-
if (instance) return resolveAsyncComponentPlaceholder(instance.subTree);
|
|
9119
|
+
if (instance && instance.subTree) return resolveAsyncComponentPlaceholder(instance.subTree);
|
|
9120
|
+
const suspense = anchorVnode.suspense;
|
|
9121
|
+
if (suspense && suspense.activeBranch) return resolveAsyncComponentPlaceholder(suspense.activeBranch);
|
|
8913
9122
|
return null;
|
|
8914
9123
|
}
|
|
8915
9124
|
//#endregion
|
|
@@ -8921,17 +9130,22 @@ var Vue = (function() {
|
|
|
8921
9130
|
return value;
|
|
8922
9131
|
}
|
|
8923
9132
|
let suspenseId = 0;
|
|
9133
|
+
const deferredEnterKey = Symbol("_deferredEnter");
|
|
8924
9134
|
const Suspense = /*@__PURE__*/ withSuspenseEnabled({
|
|
8925
9135
|
name: "Suspense",
|
|
8926
9136
|
__isSuspense: true,
|
|
8927
9137
|
process(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, rendererInternals) {
|
|
8928
9138
|
if (n1 == null) mountSuspense(n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, rendererInternals);
|
|
8929
9139
|
else {
|
|
8930
|
-
|
|
8931
|
-
|
|
8932
|
-
|
|
8933
|
-
n2.
|
|
8934
|
-
|
|
9140
|
+
const suspense = n1.suspense;
|
|
9141
|
+
if (parentSuspense && parentSuspense.deps > 0 && !parentSuspense.isHydrating) {
|
|
9142
|
+
const owner = suspense.parentComponent;
|
|
9143
|
+
if (!!owner && owner.suspense === parentSuspense && owner.suspenseId !== parentSuspense.pendingId ? parentSuspense.pendingBranch && !isSameVNodeType(n2.ssContent, suspense.pendingBranch || suspense.activeBranch) : !suspense.isInFallback) {
|
|
9144
|
+
n2.suspense = suspense;
|
|
9145
|
+
suspense.vnode = n2;
|
|
9146
|
+
n2.el = n1.el;
|
|
9147
|
+
return;
|
|
9148
|
+
}
|
|
8935
9149
|
}
|
|
8936
9150
|
patchSuspense(n1, n2, container, anchor, parentComponent, namespace, slotScopeIds, optimized, rendererInternals);
|
|
8937
9151
|
}
|
|
@@ -8943,6 +9157,36 @@ var Vue = (function() {
|
|
|
8943
9157
|
const eventListener = vnode.props && vnode.props[name];
|
|
8944
9158
|
if (isFunction(eventListener)) eventListener();
|
|
8945
9159
|
}
|
|
9160
|
+
function enterDeferred(suspense, branch) {
|
|
9161
|
+
const enters = [];
|
|
9162
|
+
collectDeferredEnters(branch, enters, true);
|
|
9163
|
+
if (isVaporInteropEnabled) {
|
|
9164
|
+
const { parentComponent } = suspense;
|
|
9165
|
+
const vapor = parentComponent && parentComponent.appContext.vapor;
|
|
9166
|
+
if (vapor) vapor.enterDeferred(suspense, enters);
|
|
9167
|
+
}
|
|
9168
|
+
if (enters.length) queuePostFlushCb(enters);
|
|
9169
|
+
}
|
|
9170
|
+
function collectDeferredEnters(vnode, enters, isRoot) {
|
|
9171
|
+
const { el, transition, children, shapeFlag } = vnode;
|
|
9172
|
+
if (shapeFlag & 6) {
|
|
9173
|
+
const subTree = vnode.component.subTree;
|
|
9174
|
+
if (subTree) collectDeferredEnters(subTree, enters, isRoot);
|
|
9175
|
+
return;
|
|
9176
|
+
}
|
|
9177
|
+
if (shapeFlag & 192) return;
|
|
9178
|
+
if (shapeFlag & 1) {
|
|
9179
|
+
if (!isRoot && el && el[deferredEnterKey]) {
|
|
9180
|
+
el[deferredEnterKey] = void 0;
|
|
9181
|
+
if (transition && !transition.persisted) {
|
|
9182
|
+
transition.beforeEnter(el);
|
|
9183
|
+
enters.push(() => transition.enter(el));
|
|
9184
|
+
}
|
|
9185
|
+
}
|
|
9186
|
+
isRoot = false;
|
|
9187
|
+
}
|
|
9188
|
+
if (shapeFlag & 16) for (let i = 0; i < children.length; i++) collectDeferredEnters(children[i], enters, isRoot);
|
|
9189
|
+
}
|
|
8946
9190
|
function mountSuspense(vnode, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, rendererInternals) {
|
|
8947
9191
|
const { p: patch, o: { createElement } } = rendererInternals;
|
|
8948
9192
|
const hiddenContainer = createElement("div");
|
|
@@ -8982,11 +9226,7 @@ var Vue = (function() {
|
|
|
8982
9226
|
suspense.activeBranch = pendingBranch;
|
|
8983
9227
|
} else unmount(pendingBranch, parentComponent, suspense);
|
|
8984
9228
|
suspense.deps = 0;
|
|
8985
|
-
|
|
8986
|
-
const effect = suspense.effects[i];
|
|
8987
|
-
if (effect.flags & 8) queuePostFlushCb(effect);
|
|
8988
|
-
}
|
|
8989
|
-
suspense.effects.length = 0;
|
|
9229
|
+
discardEffects(suspense);
|
|
8990
9230
|
suspense.hiddenContainer = createElement("div");
|
|
8991
9231
|
if (isInFallback) {
|
|
8992
9232
|
patch(null, newBranch, suspense.hiddenContainer, null, parentComponent, suspense, namespace, slotScopeIds, optimized);
|
|
@@ -9009,14 +9249,14 @@ var Vue = (function() {
|
|
|
9009
9249
|
} else {
|
|
9010
9250
|
triggerEvent(n2, "onPending");
|
|
9011
9251
|
suspense.pendingBranch = newBranch;
|
|
9012
|
-
|
|
9013
|
-
else suspense.pendingId = suspenseId++;
|
|
9252
|
+
suspense.pendingId = suspenseId++;
|
|
9014
9253
|
patch(null, newBranch, suspense.hiddenContainer, null, parentComponent, suspense, namespace, slotScopeIds, optimized);
|
|
9015
9254
|
if (suspense.deps <= 0) suspense.resolve();
|
|
9016
9255
|
else {
|
|
9017
|
-
const { timeout
|
|
9018
|
-
if (timeout > 0) setTimeout(() => {
|
|
9019
|
-
|
|
9256
|
+
const { timeout } = suspense;
|
|
9257
|
+
if (timeout > 0) suspense.timeoutTimer = setTimeout(() => {
|
|
9258
|
+
suspense.timeoutTimer = void 0;
|
|
9259
|
+
suspense.fallback(suspense.vnode.ssFallback);
|
|
9020
9260
|
}, timeout);
|
|
9021
9261
|
else if (timeout === 0) suspense.fallback(newFallback);
|
|
9022
9262
|
}
|
|
@@ -9052,6 +9292,7 @@ var Vue = (function() {
|
|
|
9052
9292
|
deps: 0,
|
|
9053
9293
|
pendingId: suspenseId++,
|
|
9054
9294
|
timeout: typeof timeout === "number" ? timeout : -1,
|
|
9295
|
+
timeoutTimer: void 0,
|
|
9055
9296
|
activeBranch: null,
|
|
9056
9297
|
isFallbackMountPending: false,
|
|
9057
9298
|
pendingBranch: null,
|
|
@@ -9069,26 +9310,39 @@ var Vue = (function() {
|
|
|
9069
9310
|
delayEnter = activeBranch && pendingBranch.transition && pendingBranch.transition.mode === "out-in";
|
|
9070
9311
|
let hasUpdatedAnchor = false;
|
|
9071
9312
|
if (delayEnter) activeBranch.transition.afterLeave = () => {
|
|
9072
|
-
if (pendingId === suspense.pendingId) {
|
|
9313
|
+
if (pendingId === suspense.pendingId && !suspense.isUnmounted) {
|
|
9314
|
+
enterDeferred(suspense, pendingBranch);
|
|
9073
9315
|
move(pendingBranch, container, anchor === initialAnchor && !hasUpdatedAnchor ? next(activeBranch) : anchor, 0, parentComponent);
|
|
9074
9316
|
queuePostFlushCb(effects);
|
|
9075
9317
|
if (isInFallback && vnode.ssFallback) vnode.ssFallback.el = null;
|
|
9076
9318
|
}
|
|
9077
9319
|
};
|
|
9078
9320
|
if (activeBranch && !suspense.isFallbackMountPending) {
|
|
9079
|
-
if (parentNode(activeBranch.el) === container) {
|
|
9321
|
+
if (parentNode(activeBranch.el || resolveAsyncComponentPlaceholder(activeBranch)) === container) {
|
|
9080
9322
|
anchor = next(activeBranch);
|
|
9081
9323
|
hasUpdatedAnchor = true;
|
|
9082
9324
|
}
|
|
9083
9325
|
unmount(activeBranch, parentComponent, suspense, true);
|
|
9084
9326
|
if (!delayEnter && isInFallback && vnode.ssFallback) queuePostRenderEffect(() => vnode.ssFallback.el = null, void 0, suspense);
|
|
9085
9327
|
}
|
|
9086
|
-
if (!delayEnter)
|
|
9328
|
+
if (!delayEnter) {
|
|
9329
|
+
enterDeferred(suspense, pendingBranch);
|
|
9330
|
+
move(pendingBranch, container, anchor, 0, parentComponent);
|
|
9331
|
+
}
|
|
9087
9332
|
}
|
|
9333
|
+
clearTimeout(suspense.timeoutTimer);
|
|
9334
|
+
suspense.timeoutTimer = void 0;
|
|
9088
9335
|
suspense.isFallbackMountPending = false;
|
|
9089
9336
|
setActiveBranch(suspense, pendingBranch);
|
|
9090
9337
|
suspense.pendingBranch = null;
|
|
9091
9338
|
suspense.isInFallback = false;
|
|
9339
|
+
let kept = 0;
|
|
9340
|
+
for (let i = 0; i < effects.length; i++) {
|
|
9341
|
+
const effect = effects[i];
|
|
9342
|
+
if (effect.flags & 16) queuePostFlushCb(effect);
|
|
9343
|
+
else effects[kept++] = effect;
|
|
9344
|
+
}
|
|
9345
|
+
effects.length = kept;
|
|
9092
9346
|
let parent = suspense.parent;
|
|
9093
9347
|
let hasUnresolvedAncestor = false;
|
|
9094
9348
|
while (parent) {
|
|
@@ -9111,13 +9365,13 @@ var Vue = (function() {
|
|
|
9111
9365
|
triggerEvent(vnode, "onResolve");
|
|
9112
9366
|
},
|
|
9113
9367
|
fallback(fallbackVNode) {
|
|
9114
|
-
if (!suspense.pendingBranch) return;
|
|
9368
|
+
if (suspense.isUnmounted || !suspense.pendingBranch) return;
|
|
9115
9369
|
const { vnode, activeBranch, parentComponent, container, namespace } = suspense;
|
|
9116
9370
|
triggerEvent(vnode, "onFallback");
|
|
9117
9371
|
const anchor = next(activeBranch);
|
|
9118
9372
|
const mountFallback = () => {
|
|
9119
9373
|
suspense.isFallbackMountPending = false;
|
|
9120
|
-
if (!suspense.isInFallback) return;
|
|
9374
|
+
if (suspense.isUnmounted || !suspense.isInFallback) return;
|
|
9121
9375
|
const latestFallback = suspense.vnode.ssFallback;
|
|
9122
9376
|
patch(null, latestFallback, container, anchor, parentComponent, null, namespace, slotScopeIds, optimized);
|
|
9123
9377
|
setActiveBranch(suspense, latestFallback);
|
|
@@ -9141,24 +9395,52 @@ var Vue = (function() {
|
|
|
9141
9395
|
registerDep(instance, onResolve) {
|
|
9142
9396
|
const isInPendingSuspense = !!suspense.pendingBranch;
|
|
9143
9397
|
if (isInPendingSuspense) suspense.deps++;
|
|
9398
|
+
const render = (setupResult) => {
|
|
9399
|
+
instance.asyncResolved = true;
|
|
9400
|
+
onResolve(setupResult);
|
|
9401
|
+
};
|
|
9144
9402
|
instance.asyncDep.catch((err) => {
|
|
9145
|
-
handleError(err, instance, 0);
|
|
9403
|
+
handleError(err, instance, 0, false, true);
|
|
9404
|
+
return () => null;
|
|
9146
9405
|
}).then((asyncSetupResult) => {
|
|
9147
|
-
if (instance.isUnmounted || suspense.isUnmounted
|
|
9406
|
+
if (instance.isUnmounted || suspense.isUnmounted) return;
|
|
9407
|
+
const isPendingDep = isInPendingSuspense && suspense.pendingId === instance.suspenseId;
|
|
9148
9408
|
setCurrentInstance(null, void 0);
|
|
9149
9409
|
if (!instance.scope.active) {
|
|
9150
|
-
if (
|
|
9410
|
+
if (isPendingDep && --suspense.deps === 0) suspense.resolve();
|
|
9151
9411
|
return;
|
|
9152
9412
|
}
|
|
9153
|
-
|
|
9154
|
-
|
|
9155
|
-
|
|
9413
|
+
if (!isPendingDep && suspense.pendingBranch) {
|
|
9414
|
+
const job = () => {
|
|
9415
|
+
if (instance.isUnmounted || suspense.isUnmounted || !instance.scope.active) return;
|
|
9416
|
+
if (suspense.pendingBranch) queueEffectWithSuspense(job, void 0, suspense);
|
|
9417
|
+
else render(asyncSetupResult);
|
|
9418
|
+
};
|
|
9419
|
+
job.flags = 24;
|
|
9420
|
+
queueEffectWithSuspense(job, void 0, suspense);
|
|
9421
|
+
return;
|
|
9422
|
+
}
|
|
9423
|
+
render(asyncSetupResult);
|
|
9424
|
+
if (isPendingDep && --suspense.deps === 0) suspense.resolve();
|
|
9156
9425
|
});
|
|
9157
9426
|
},
|
|
9158
9427
|
unmount(parentSuspense, doRemove) {
|
|
9159
9428
|
suspense.isUnmounted = true;
|
|
9429
|
+
clearTimeout(suspense.timeoutTimer);
|
|
9430
|
+
suspense.timeoutTimer = void 0;
|
|
9431
|
+
if (parentSuspenseId !== void 0) {
|
|
9432
|
+
const parent = suspense.parent;
|
|
9433
|
+
const pendingId = parentSuspenseId;
|
|
9434
|
+
parentSuspenseId = void 0;
|
|
9435
|
+
queuePostFlushCb(() => {
|
|
9436
|
+
if (parent.pendingId === pendingId && !parent.isUnmounted && --parent.deps === 0) parent.resolve();
|
|
9437
|
+
});
|
|
9438
|
+
}
|
|
9160
9439
|
if (suspense.activeBranch) unmount(suspense.activeBranch, parentComponent, parentSuspense, doRemove);
|
|
9161
|
-
if (suspense.pendingBranch)
|
|
9440
|
+
if (suspense.pendingBranch) {
|
|
9441
|
+
unmount(suspense.pendingBranch, parentComponent, suspense, doRemove);
|
|
9442
|
+
discardEffects(suspense);
|
|
9443
|
+
}
|
|
9162
9444
|
}
|
|
9163
9445
|
};
|
|
9164
9446
|
return suspense;
|
|
@@ -9199,6 +9481,14 @@ var Vue = (function() {
|
|
|
9199
9481
|
if (block && !s.dynamicChildren) s.dynamicChildren = block.filter((c) => c !== s);
|
|
9200
9482
|
return s;
|
|
9201
9483
|
}
|
|
9484
|
+
function discardEffects(suspense) {
|
|
9485
|
+
const { effects } = suspense;
|
|
9486
|
+
for (let i = 0; i < effects.length; i++) {
|
|
9487
|
+
const effect = effects[i];
|
|
9488
|
+
if (effect.flags & 8) queuePostFlushCb(effect);
|
|
9489
|
+
}
|
|
9490
|
+
effects.length = 0;
|
|
9491
|
+
}
|
|
9202
9492
|
function queueEffectWithSuspense(fn, id, suspense) {
|
|
9203
9493
|
if (suspense && suspense.pendingBranch) {
|
|
9204
9494
|
if (isArray(fn)) suspense.effects.push(...fn);
|
|
@@ -9466,7 +9756,8 @@ var Vue = (function() {
|
|
|
9466
9756
|
}
|
|
9467
9757
|
function guardReactiveProps(props) {
|
|
9468
9758
|
if (!props) return null;
|
|
9469
|
-
|
|
9759
|
+
if (/* @__PURE__ */ isProxy(props)) return extend({}, props);
|
|
9760
|
+
return isInternalObject(props) ? extend({}, props[rawAttrsKey] || props) : props;
|
|
9470
9761
|
}
|
|
9471
9762
|
function cloneVNode(vnode, extraProps, mergeRef = false, cloneTransition = false) {
|
|
9472
9763
|
const { props, ref, patchFlag, children, transition } = vnode;
|
|
@@ -9853,7 +10144,8 @@ var Vue = (function() {
|
|
|
9853
10144
|
setInSSRSetupState(false);
|
|
9854
10145
|
}
|
|
9855
10146
|
}).catch((e) => {
|
|
9856
|
-
handleError(e, instance, 0);
|
|
10147
|
+
handleError(e, instance, 0, void 0, true);
|
|
10148
|
+
instance.ssrRender = (_, push) => push("<!---->");
|
|
9857
10149
|
});
|
|
9858
10150
|
else {
|
|
9859
10151
|
instance.asyncDep = setupResult;
|
|
@@ -9926,11 +10218,16 @@ var Vue = (function() {
|
|
|
9926
10218
|
else warn$1(`Component is missing template or render function: `, Component);
|
|
9927
10219
|
}
|
|
9928
10220
|
}
|
|
10221
|
+
/**
|
|
10222
|
+
* Read through the setup context `attrs` proxy to get the raw attrs object.
|
|
10223
|
+
* @internal
|
|
10224
|
+
*/
|
|
10225
|
+
const rawAttrsKey = Symbol();
|
|
9929
10226
|
const attrsProxyHandlers = {
|
|
9930
10227
|
get(target, key) {
|
|
9931
10228
|
markAttrsAccessed();
|
|
9932
10229
|
track(target, "get", "");
|
|
9933
|
-
return target[key];
|
|
10230
|
+
return key === rawAttrsKey ? target : target[key];
|
|
9934
10231
|
},
|
|
9935
10232
|
set() {
|
|
9936
10233
|
warn$1(`setupContext.attrs is readonly.`);
|
|
@@ -10228,7 +10525,7 @@ var Vue = (function() {
|
|
|
10228
10525
|
}
|
|
10229
10526
|
//#endregion
|
|
10230
10527
|
//#region packages/runtime-core/src/index.ts
|
|
10231
|
-
const version = "3.6.0-rc.
|
|
10528
|
+
const version = "3.6.0-rc.15";
|
|
10232
10529
|
const warn = warn$1;
|
|
10233
10530
|
/**
|
|
10234
10531
|
* Runtime error messages. Only exposed in dev or esm builds.
|
|
@@ -11094,7 +11391,7 @@ var Vue = (function() {
|
|
|
11094
11391
|
}
|
|
11095
11392
|
this._styleAnchors.delete(this._def);
|
|
11096
11393
|
this._applyStyles(newStyles);
|
|
11097
|
-
|
|
11394
|
+
this._instance = null;
|
|
11098
11395
|
this._update();
|
|
11099
11396
|
};
|
|
11100
11397
|
const dispatch = (event, args) => {
|
|
@@ -11693,15 +11990,15 @@ var Vue = (function() {
|
|
|
11693
11990
|
vModelSelectInit(el, value, number);
|
|
11694
11991
|
el[assignKey] = getModelAssigner(vnode);
|
|
11695
11992
|
},
|
|
11696
|
-
mounted(el, { value }) {
|
|
11697
|
-
vModelSetSelected(el, value);
|
|
11993
|
+
mounted(el, { value, modifiers: { number } }) {
|
|
11994
|
+
vModelSetSelected(el, value, number);
|
|
11698
11995
|
},
|
|
11699
11996
|
beforeUpdate(el, { value }, vnode) {
|
|
11700
11997
|
el._modelValue = value;
|
|
11701
11998
|
el[assignKey] = getModelAssigner(vnode);
|
|
11702
11999
|
},
|
|
11703
|
-
updated(el, { value }) {
|
|
11704
|
-
vModelSetSelected(el, value);
|
|
12000
|
+
updated(el, { value, modifiers: { number } }) {
|
|
12001
|
+
vModelSetSelected(el, value, number);
|
|
11705
12002
|
}
|
|
11706
12003
|
};
|
|
11707
12004
|
/**
|
|
@@ -11736,14 +12033,14 @@ var Vue = (function() {
|
|
|
11736
12033
|
/**
|
|
11737
12034
|
* @internal
|
|
11738
12035
|
*/
|
|
11739
|
-
const vModelSetSelected = (el, value) => {
|
|
12036
|
+
const vModelSetSelected = (el, value, number = false) => {
|
|
11740
12037
|
el._modelValue = value;
|
|
11741
12038
|
const pending = el._pendingValue;
|
|
11742
12039
|
el._pendingValue = void 0;
|
|
11743
12040
|
if (pending && pending[0] === el.multiple && isSameSelectValue(value, pending[1], pending[0])) return;
|
|
11744
|
-
setSelected(el, value);
|
|
12041
|
+
setSelected(el, value, number);
|
|
11745
12042
|
};
|
|
11746
|
-
function setSelected(el, value) {
|
|
12043
|
+
function setSelected(el, value, number) {
|
|
11747
12044
|
const isMultiple = el.multiple;
|
|
11748
12045
|
const isArrayValue = isArray(value);
|
|
11749
12046
|
if (isMultiple && !isArrayValue && !isSet(value)) {
|
|
@@ -11758,7 +12055,7 @@ var Vue = (function() {
|
|
|
11758
12055
|
const optionType = typeof optionValue;
|
|
11759
12056
|
if (optionType === "string" || optionType === "number") option.selected = value.some((v) => String(v) === String(optionValue));
|
|
11760
12057
|
else option.selected = looseIndexOf(value, optionValue) > -1;
|
|
11761
|
-
} else option.selected = value.has(optionValue);
|
|
12058
|
+
} else option.selected = value.has(optionValue) || number && typeof optionValue === "string" && value.has(looseToNumber(optionValue));
|
|
11762
12059
|
} else if (looseEqual(getValue(option), value)) {
|
|
11763
12060
|
if (el.selectedIndex !== i) el.selectedIndex = i;
|
|
11764
12061
|
return;
|
|
@@ -13962,7 +14259,11 @@ var Vue = (function() {
|
|
|
13962
14259
|
};
|
|
13963
14260
|
}
|
|
13964
14261
|
function cloneLoc(loc) {
|
|
13965
|
-
return
|
|
14262
|
+
return {
|
|
14263
|
+
start: extend({}, loc.start),
|
|
14264
|
+
end: extend({}, loc.end),
|
|
14265
|
+
source: loc.source
|
|
14266
|
+
};
|
|
13966
14267
|
}
|
|
13967
14268
|
function setLocEnd(loc, end) {
|
|
13968
14269
|
loc.end = tokenizer.getPos(end);
|