@vue/compat 3.6.0-rc.14 → 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 +536 -235
- package/dist/vue.cjs.prod.js +435 -186
- package/dist/vue.esm-browser.js +513 -229
- package/dist/vue.esm-browser.prod.js +7 -7
- package/dist/vue.esm-bundler.js +543 -235
- package/dist/vue.global.js +513 -229
- package/dist/vue.global.prod.js +7 -7
- package/dist/vue.runtime.esm-browser.js +513 -229
- package/dist/vue.runtime.esm-browser.prod.js +7 -7
- package/dist/vue.runtime.esm-bundler.js +543 -235
- package/dist/vue.runtime.global.js +513 -229
- package/dist/vue.runtime.global.prod.js +7 -7
- package/package.json +3 -3
package/dist/vue.esm-bundler.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
|
**/
|
|
@@ -70,10 +70,18 @@ const isIntegerKey = (key) => isString(key) && key !== "NaN" && key[0] !== "-" &
|
|
|
70
70
|
const isReservedProp = /*@__PURE__*/ makeMap(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted");
|
|
71
71
|
const isBuiltInTag = /*#__PURE__*/ makeMap("slot,component");
|
|
72
72
|
const isBuiltInDirective = /*@__PURE__*/ makeMap("bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo");
|
|
73
|
+
const STRING_CACHE_MAX_SIZE = 1e4;
|
|
73
74
|
const cacheStringFunction = (fn) => {
|
|
74
|
-
|
|
75
|
+
let cache = Object.create(null);
|
|
76
|
+
let size = 0;
|
|
75
77
|
return ((str) => {
|
|
76
|
-
|
|
78
|
+
const hit = cache[str];
|
|
79
|
+
if (hit !== void 0) return hit;
|
|
80
|
+
if (++size > STRING_CACHE_MAX_SIZE) {
|
|
81
|
+
cache = Object.create(null);
|
|
82
|
+
size = 1;
|
|
83
|
+
}
|
|
84
|
+
return cache[str] = fn(str);
|
|
77
85
|
});
|
|
78
86
|
};
|
|
79
87
|
const camelizeRE = /-(\w)/g;
|
|
@@ -81,22 +89,22 @@ const camelizeReplacer = (_, c) => c ? c.toUpperCase() : "";
|
|
|
81
89
|
/**
|
|
82
90
|
* @private
|
|
83
91
|
*/
|
|
84
|
-
const camelize = cacheStringFunction((str) => str.replace(camelizeRE, camelizeReplacer));
|
|
92
|
+
const camelize = /*@__PURE__*/ cacheStringFunction((str) => str.replace(camelizeRE, camelizeReplacer));
|
|
85
93
|
const hyphenateRE = /\B([A-Z])/g;
|
|
86
94
|
/**
|
|
87
95
|
* @private
|
|
88
96
|
*/
|
|
89
|
-
const hyphenate = cacheStringFunction((str) => str.replace(hyphenateRE, "-$1").toLowerCase());
|
|
97
|
+
const hyphenate = /*@__PURE__*/ cacheStringFunction((str) => str.replace(hyphenateRE, "-$1").toLowerCase());
|
|
90
98
|
/**
|
|
91
99
|
* @private
|
|
92
100
|
*/
|
|
93
|
-
const capitalize = cacheStringFunction((str) => {
|
|
101
|
+
const capitalize = /*@__PURE__*/ cacheStringFunction((str) => {
|
|
94
102
|
return str.charAt(0).toUpperCase() + str.slice(1);
|
|
95
103
|
});
|
|
96
104
|
/**
|
|
97
105
|
* @private
|
|
98
106
|
*/
|
|
99
|
-
const toHandlerKey = cacheStringFunction((str) => {
|
|
107
|
+
const toHandlerKey = /*@__PURE__*/ cacheStringFunction((str) => {
|
|
100
108
|
return str ? `on${capitalize(str)}` : ``;
|
|
101
109
|
});
|
|
102
110
|
/**
|
|
@@ -300,26 +308,11 @@ const isMathMLTag = /*@__PURE__*/ makeMap(MATH_TAGS);
|
|
|
300
308
|
* Do NOT use in runtime code paths unless behind `!!(process.env.NODE_ENV !== 'production')` flag.
|
|
301
309
|
*/
|
|
302
310
|
const isVoidTag = /*@__PURE__*/ makeMap(VOID_TAGS);
|
|
303
|
-
|
|
304
|
-
//#region packages/shared/src/domAttrConfig.ts
|
|
305
|
-
/**
|
|
306
|
-
* On the client we only need to offer special cases for boolean attributes that
|
|
307
|
-
* have different names from their corresponding dom properties:
|
|
308
|
-
* - itemscope -> N/A
|
|
309
|
-
* - allowfullscreen -> allowFullscreen
|
|
310
|
-
* - formnovalidate -> formNoValidate
|
|
311
|
-
* - ismap -> isMap
|
|
312
|
-
* - nomodule -> noModule
|
|
313
|
-
* - novalidate -> noValidate
|
|
314
|
-
* - playsinline -> playsInline
|
|
315
|
-
* - readonly -> readOnly
|
|
316
|
-
*/
|
|
317
|
-
const specialBooleanAttrs = `itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,playsinline,readonly`;
|
|
318
|
-
const isSpecialBooleanAttr = /*@__PURE__*/ makeMap(specialBooleanAttrs);
|
|
311
|
+
const isSpecialBooleanAttr = /*@__PURE__*/ makeMap("itemscope,allowfullscreen,disablepictureinpicture,disableremoteplayback,formnovalidate,ismap,nomodule,novalidate,playsinline,readonly");
|
|
319
312
|
/**
|
|
320
313
|
* The full list is needed during SSR to produce the correct initial markup.
|
|
321
314
|
*/
|
|
322
|
-
const isBooleanAttr = /*@__PURE__*/ makeMap(
|
|
315
|
+
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");
|
|
323
316
|
/**
|
|
324
317
|
* Boolean attributes should be included if the value is truthy or ''.
|
|
325
318
|
* e.g. `<select multiple>` compiles to `{ multiple: '' }`
|
|
@@ -532,43 +525,16 @@ function isVaporBranchStart(data) {
|
|
|
532
525
|
}
|
|
533
526
|
return true;
|
|
534
527
|
}
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
}
|
|
542
|
-
function onTrigger(sub) {
|
|
543
|
-
if (!!!(process.env.NODE_ENV !== "production")) throw new Error(`Internal error: onTrigger should be called only in development.`);
|
|
544
|
-
if (sub.onTrigger) {
|
|
545
|
-
const debugInfo = triggerEventInfos[triggerEventInfos.length - 1];
|
|
546
|
-
sub.onTrigger(extend({ effect: sub }, debugInfo));
|
|
547
|
-
}
|
|
548
|
-
}
|
|
549
|
-
function setupOnTrigger(target) {
|
|
550
|
-
if (!!!(process.env.NODE_ENV !== "production")) throw new Error(`Internal error: setupOnTrigger should be called only in development.`);
|
|
551
|
-
Object.defineProperty(target.prototype, "onTrigger", {
|
|
552
|
-
get() {
|
|
553
|
-
return this._onTrigger;
|
|
554
|
-
},
|
|
555
|
-
set(val) {
|
|
556
|
-
if (val && !this._onTrigger) setupFlagsHandler(this);
|
|
557
|
-
this._onTrigger = val;
|
|
558
|
-
}
|
|
559
|
-
});
|
|
528
|
+
/**
|
|
529
|
+
* The data of a comment opening a range only a vapor server render emits:
|
|
530
|
+
* `<!--{-->` around the render of a component, or a v-if branch's.
|
|
531
|
+
*/
|
|
532
|
+
function isVaporRangeStart(data) {
|
|
533
|
+
return data === "{" || isVaporBranchStart(data);
|
|
560
534
|
}
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
get() {
|
|
565
|
-
return target._flags;
|
|
566
|
-
},
|
|
567
|
-
set(value) {
|
|
568
|
-
if (!(target._flags & 48) && !!(value & 48)) onTrigger(this);
|
|
569
|
-
target._flags = value;
|
|
570
|
-
}
|
|
571
|
-
});
|
|
535
|
+
/** The data of the comment closing the range `open` opens. */
|
|
536
|
+
function rangeCloseOf(open) {
|
|
537
|
+
return open === "(" ? ")" : open === "{" ? "}" : "]";
|
|
572
538
|
}
|
|
573
539
|
//#endregion
|
|
574
540
|
//#region packages/reactivity/src/warning.ts
|
|
@@ -580,13 +546,7 @@ function warn$2(msg, ...args) {
|
|
|
580
546
|
const notifyBuffer = [];
|
|
581
547
|
let batchDepth = 0;
|
|
582
548
|
let activeSub = void 0;
|
|
583
|
-
|
|
584
|
-
function incRunDepth() {
|
|
585
|
-
++runDepth;
|
|
586
|
-
}
|
|
587
|
-
function decRunDepth() {
|
|
588
|
-
--runDepth;
|
|
589
|
-
}
|
|
549
|
+
const CHECKING = 512;
|
|
590
550
|
let globalVersion = 0;
|
|
591
551
|
let notifyIndex = 0;
|
|
592
552
|
let notifyBufferLength = 0;
|
|
@@ -635,6 +595,7 @@ function unlink(link, sub = link.sub) {
|
|
|
635
595
|
const nextDep = link.nextDep;
|
|
636
596
|
const nextSub = link.nextSub;
|
|
637
597
|
const prevSub = link.prevSub;
|
|
598
|
+
link.prevDep = link.nextDep = link.prevSub = link.nextSub = void 0;
|
|
638
599
|
if (nextDep !== void 0) nextDep.prevDep = prevDep;
|
|
639
600
|
else sub.depsTail = prevDep;
|
|
640
601
|
if (prevDep !== void 0) prevDep.nextDep = nextDep;
|
|
@@ -642,7 +603,7 @@ function unlink(link, sub = link.sub) {
|
|
|
642
603
|
if (nextSub !== void 0) nextSub.prevSub = prevSub;
|
|
643
604
|
else dep.subsTail = prevSub;
|
|
644
605
|
if (prevSub !== void 0) prevSub.nextSub = nextSub;
|
|
645
|
-
else if ((dep.subs = nextSub) === void 0) {
|
|
606
|
+
else if ((dep.subs = nextSub) === void 0 && dep.flags & 1) {
|
|
646
607
|
let toRemove = dep.deps;
|
|
647
608
|
if (toRemove !== void 0) {
|
|
648
609
|
do
|
|
@@ -660,14 +621,12 @@ function propagate(link) {
|
|
|
660
621
|
const sub = link.sub;
|
|
661
622
|
let flags = sub.flags;
|
|
662
623
|
if (flags & 3) {
|
|
663
|
-
if (!(flags &
|
|
664
|
-
|
|
665
|
-
if (runDepth) sub.flags |= 8;
|
|
666
|
-
} else if (!(flags & 12)) flags = 0;
|
|
624
|
+
if (!(flags & 44)) sub.flags = flags | 32;
|
|
625
|
+
else if (!(flags & 12)) flags = 0;
|
|
667
626
|
else if (!(flags & 4)) sub.flags = flags & -9 | 32;
|
|
668
627
|
else if (!(flags & 48) && isValidLink(link, sub)) {
|
|
669
628
|
sub.flags = flags | 40;
|
|
670
|
-
flags
|
|
629
|
+
flags = sub === activeSub || activeSub === void 0 ? 0 : flags & 1;
|
|
671
630
|
} else flags = 0;
|
|
672
631
|
if (flags & 2) notifyBuffer[notifyBufferLength++] = sub;
|
|
673
632
|
if (flags & 1) {
|
|
@@ -703,7 +662,7 @@ function propagate(link) {
|
|
|
703
662
|
function startTracking(sub) {
|
|
704
663
|
++globalVersion;
|
|
705
664
|
sub.depsTail = void 0;
|
|
706
|
-
sub.flags = sub.flags & -
|
|
665
|
+
sub.flags = sub.flags & -569 | 4;
|
|
707
666
|
return setActiveSub(sub);
|
|
708
667
|
}
|
|
709
668
|
function endTracking(sub, prevSub) {
|
|
@@ -711,8 +670,11 @@ function endTracking(sub, prevSub) {
|
|
|
711
670
|
activeSub = prevSub;
|
|
712
671
|
const depsTail = sub.depsTail;
|
|
713
672
|
let toRemove = depsTail !== void 0 ? depsTail.nextDep : sub.deps;
|
|
714
|
-
while (toRemove !== void 0)
|
|
715
|
-
|
|
673
|
+
while (toRemove !== void 0) {
|
|
674
|
+
unlink(toRemove, sub);
|
|
675
|
+
toRemove = depsTail !== void 0 ? depsTail.nextDep : sub.deps;
|
|
676
|
+
}
|
|
677
|
+
if ((sub.flags &= -5) & 8) markRecursed(sub);
|
|
716
678
|
}
|
|
717
679
|
function flush() {
|
|
718
680
|
let hasError = false;
|
|
@@ -734,45 +696,67 @@ function flush() {
|
|
|
734
696
|
if (hasError) throw error;
|
|
735
697
|
}
|
|
736
698
|
function checkDirty(link, sub) {
|
|
699
|
+
try {
|
|
700
|
+
return walkDirty(link, sub);
|
|
701
|
+
} catch (err) {
|
|
702
|
+
markStale(sub);
|
|
703
|
+
throw err;
|
|
704
|
+
}
|
|
705
|
+
}
|
|
706
|
+
function walkDirty(link, sub) {
|
|
707
|
+
const root = sub;
|
|
737
708
|
let stack;
|
|
738
709
|
let checkDepth = 0;
|
|
710
|
+
let staleDepth = 0;
|
|
711
|
+
let staleFloor = 0;
|
|
739
712
|
top: do {
|
|
740
713
|
const dep = link.dep;
|
|
741
714
|
const depFlags = dep.flags;
|
|
742
715
|
let dirty = false;
|
|
743
716
|
if (sub.flags & 16) dirty = true;
|
|
744
717
|
else if ((depFlags & 17) === 17) {
|
|
745
|
-
const subs = dep.subs;
|
|
746
718
|
if (dep.update()) {
|
|
747
|
-
|
|
719
|
+
const subs = dep.subs;
|
|
720
|
+
if (subs !== void 0 && (subs !== link || subs.nextSub !== void 0)) shallowPropagate(subs);
|
|
748
721
|
dirty = true;
|
|
749
722
|
}
|
|
750
723
|
} else if ((depFlags & 33) === 33) {
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
724
|
+
const depth = dep === root ? 0 : depFlags & CHECKING ? checkingDepth(dep, stack, checkDepth) : -1;
|
|
725
|
+
if (depth < 0) {
|
|
726
|
+
if (link.nextSub !== void 0 || link.prevSub !== void 0) dep.flags = depFlags | CHECKING;
|
|
727
|
+
stack = {
|
|
728
|
+
value: link,
|
|
729
|
+
prev: stack
|
|
730
|
+
};
|
|
731
|
+
link = dep.deps;
|
|
732
|
+
sub = dep;
|
|
733
|
+
++checkDepth;
|
|
734
|
+
continue;
|
|
735
|
+
}
|
|
736
|
+
if (depth < checkDepth) {
|
|
737
|
+
staleFloor = staleDepth && staleFloor < depth ? staleFloor : depth;
|
|
738
|
+
staleDepth = checkDepth;
|
|
739
|
+
}
|
|
759
740
|
}
|
|
760
741
|
if (!dirty && link.nextDep !== void 0) {
|
|
761
742
|
link = link.nextDep;
|
|
762
743
|
continue;
|
|
763
744
|
}
|
|
764
745
|
while (checkDepth) {
|
|
746
|
+
const stale = checkDepth === staleDepth;
|
|
747
|
+
if (stale && --staleDepth === staleFloor) staleDepth = 0;
|
|
765
748
|
--checkDepth;
|
|
766
749
|
link = stack.value;
|
|
767
750
|
stack = stack.prev;
|
|
768
751
|
if (dirty) {
|
|
769
|
-
const subs = sub.subs;
|
|
770
752
|
if (sub.update()) {
|
|
771
|
-
|
|
753
|
+
const subs = sub.subs;
|
|
754
|
+
if (subs !== void 0 && (subs !== link || subs.nextSub !== void 0)) shallowPropagate(subs);
|
|
772
755
|
sub = link.sub;
|
|
773
756
|
continue;
|
|
774
757
|
}
|
|
775
|
-
} else sub.flags
|
|
758
|
+
} else if (stale) sub.flags = sub.flags & -545 | 16;
|
|
759
|
+
else sub.flags &= -545;
|
|
776
760
|
sub = link.sub;
|
|
777
761
|
if (link.nextDep !== void 0) {
|
|
778
762
|
link = link.nextDep;
|
|
@@ -780,9 +764,21 @@ function checkDirty(link, sub) {
|
|
|
780
764
|
}
|
|
781
765
|
dirty = false;
|
|
782
766
|
}
|
|
783
|
-
return dirty && !!sub.flags;
|
|
767
|
+
return (dirty || !!(sub.flags & 16)) && !!sub.flags;
|
|
784
768
|
} while (true);
|
|
785
769
|
}
|
|
770
|
+
function checkingDepth(dep, stack, depth) {
|
|
771
|
+
for (; stack !== void 0; stack = stack.prev, --depth) if (stack.value.dep === dep) return depth;
|
|
772
|
+
return -1;
|
|
773
|
+
}
|
|
774
|
+
function markStale(sub) {
|
|
775
|
+
const nodes = [sub];
|
|
776
|
+
do {
|
|
777
|
+
sub = nodes.pop();
|
|
778
|
+
sub.flags = sub.flags & -33 | 16;
|
|
779
|
+
for (let link = sub.deps; link !== void 0; link = link.nextDep) if (link.dep.flags & 32) nodes.push(link.dep);
|
|
780
|
+
} while (nodes.length);
|
|
781
|
+
}
|
|
786
782
|
function shallowPropagate(link) {
|
|
787
783
|
do {
|
|
788
784
|
const sub = link.sub;
|
|
@@ -800,6 +796,76 @@ function isValidLink(checkLink, sub) {
|
|
|
800
796
|
}
|
|
801
797
|
return false;
|
|
802
798
|
}
|
|
799
|
+
function markRecursed(sub) {
|
|
800
|
+
const nodes = [sub];
|
|
801
|
+
do {
|
|
802
|
+
sub = nodes.pop();
|
|
803
|
+
for (let link = sub.deps; link !== void 0; link = link.nextDep) {
|
|
804
|
+
const dep = link.dep;
|
|
805
|
+
if ((dep.flags & 40) === 32) {
|
|
806
|
+
dep.flags |= 8;
|
|
807
|
+
nodes.push(dep);
|
|
808
|
+
}
|
|
809
|
+
}
|
|
810
|
+
} while (nodes.length);
|
|
811
|
+
}
|
|
812
|
+
//#endregion
|
|
813
|
+
//#region packages/reactivity/src/debug.ts
|
|
814
|
+
const triggered = [];
|
|
815
|
+
function onTrack(sub, debugInfo) {
|
|
816
|
+
if (!!!(process.env.NODE_ENV !== "production")) throw new Error(`Internal error: onTrack should be called only in development.`);
|
|
817
|
+
if (sub.onTrack) sub.onTrack(extend({ effect: sub }, debugInfo));
|
|
818
|
+
}
|
|
819
|
+
function onTrigger(sub, debugInfo) {
|
|
820
|
+
if (!!!(process.env.NODE_ENV !== "production")) throw new Error(`Internal error: onTrigger should be called only in development.`);
|
|
821
|
+
if (sub.onTrigger) sub.onTrigger(extend({ effect: sub }, debugInfo));
|
|
822
|
+
}
|
|
823
|
+
function startTrigger() {
|
|
824
|
+
if (!!!(process.env.NODE_ENV !== "production")) throw new Error(`Internal error: startTrigger should be called only in development.`);
|
|
825
|
+
triggered.push([]);
|
|
826
|
+
}
|
|
827
|
+
function endTrigger(debugInfo) {
|
|
828
|
+
if (!!!(process.env.NODE_ENV !== "production")) throw new Error(`Internal error: endTrigger should be called only in development.`);
|
|
829
|
+
const subs = triggered.pop();
|
|
830
|
+
if (subs.length) {
|
|
831
|
+
startBatch();
|
|
832
|
+
try {
|
|
833
|
+
for (let i = 0; i < subs.length; i++) {
|
|
834
|
+
const sub = subs[i];
|
|
835
|
+
if (sub.flags & 3) onTrigger(sub, debugInfo);
|
|
836
|
+
}
|
|
837
|
+
} finally {
|
|
838
|
+
endBatch();
|
|
839
|
+
}
|
|
840
|
+
}
|
|
841
|
+
}
|
|
842
|
+
function setupOnTrigger(target) {
|
|
843
|
+
if (!!!(process.env.NODE_ENV !== "production")) throw new Error(`Internal error: setupOnTrigger should be called only in development.`);
|
|
844
|
+
Object.defineProperty(target.prototype, "onTrigger", {
|
|
845
|
+
get() {
|
|
846
|
+
return this._onTrigger;
|
|
847
|
+
},
|
|
848
|
+
set(val) {
|
|
849
|
+
if (val && !this._onTrigger) setupFlagsHandler(this);
|
|
850
|
+
this._onTrigger = val;
|
|
851
|
+
}
|
|
852
|
+
});
|
|
853
|
+
}
|
|
854
|
+
function setupFlagsHandler(target) {
|
|
855
|
+
target._flags = target.flags;
|
|
856
|
+
Object.defineProperty(target, "flags", {
|
|
857
|
+
get() {
|
|
858
|
+
return target._flags;
|
|
859
|
+
},
|
|
860
|
+
set(value) {
|
|
861
|
+
if (!(target._flags & 48) && !!(value & 48)) {
|
|
862
|
+
if (triggered.length) triggered[triggered.length - 1].push(this);
|
|
863
|
+
else onTrigger(this);
|
|
864
|
+
}
|
|
865
|
+
target._flags = value;
|
|
866
|
+
}
|
|
867
|
+
});
|
|
868
|
+
}
|
|
803
869
|
//#endregion
|
|
804
870
|
//#region packages/reactivity/src/dep.ts
|
|
805
871
|
var Dep = class {
|
|
@@ -859,20 +925,12 @@ function trigger(target, type, key, newValue, oldValue, oldTarget) {
|
|
|
859
925
|
if (!depsMap) return;
|
|
860
926
|
const run = (dep) => {
|
|
861
927
|
if (dep !== void 0 && dep.subs !== void 0) {
|
|
862
|
-
if (!!(process.env.NODE_ENV !== "production")) triggerEventInfos.push({
|
|
863
|
-
target,
|
|
864
|
-
type,
|
|
865
|
-
key,
|
|
866
|
-
newValue,
|
|
867
|
-
oldValue,
|
|
868
|
-
oldTarget
|
|
869
|
-
});
|
|
870
928
|
propagate(dep.subs);
|
|
871
929
|
shallowPropagate(dep.subs);
|
|
872
|
-
if (!!(process.env.NODE_ENV !== "production")) triggerEventInfos.pop();
|
|
873
930
|
}
|
|
874
931
|
};
|
|
875
932
|
startBatch();
|
|
933
|
+
if (!!(process.env.NODE_ENV !== "production")) startTrigger();
|
|
876
934
|
if (type === "clear") depsMap.forEach(run);
|
|
877
935
|
else {
|
|
878
936
|
const targetIsArray = isArray(target);
|
|
@@ -902,6 +960,14 @@ function trigger(target, type, key, newValue, oldValue, oldTarget) {
|
|
|
902
960
|
}
|
|
903
961
|
}
|
|
904
962
|
}
|
|
963
|
+
if (!!(process.env.NODE_ENV !== "production")) endTrigger({
|
|
964
|
+
target,
|
|
965
|
+
type,
|
|
966
|
+
key,
|
|
967
|
+
newValue,
|
|
968
|
+
oldValue,
|
|
969
|
+
oldTarget
|
|
970
|
+
});
|
|
905
971
|
endBatch();
|
|
906
972
|
}
|
|
907
973
|
function getDepFromReactive(object, key) {
|
|
@@ -1116,7 +1182,7 @@ function noTracking(self, method, args = []) {
|
|
|
1116
1182
|
//#endregion
|
|
1117
1183
|
//#region packages/reactivity/src/baseHandlers.ts
|
|
1118
1184
|
const isNonTrackableKeys = /*@__PURE__*/ makeMap(`__proto__,__v_isRef,__isVue`);
|
|
1119
|
-
const builtInSymbols = new Set(/*@__PURE__*/ Object.getOwnPropertyNames(Symbol).filter((key) => key !== "arguments" && key !== "caller").map((key) => Symbol[key]).filter(isSymbol));
|
|
1185
|
+
const builtInSymbols = /*@__PURE__*/ new Set(/*@__PURE__*/ Object.getOwnPropertyNames(Symbol).filter((key) => key !== "arguments" && key !== "caller").map((key) => Symbol[key]).filter(isSymbol));
|
|
1120
1186
|
function hasOwnProperty(key) {
|
|
1121
1187
|
if (!isSymbol(key)) key = String(key);
|
|
1122
1188
|
const obj = /* @__PURE__ */ toRaw(this);
|
|
@@ -1700,16 +1766,16 @@ var RefImpl = class {
|
|
|
1700
1766
|
this._value = !useDirectValue && this._wrap ? this._wrap(newValue) : newValue;
|
|
1701
1767
|
const subs = this.subs;
|
|
1702
1768
|
if (subs !== void 0) {
|
|
1703
|
-
if (!!(process.env.NODE_ENV !== "production"))
|
|
1769
|
+
if (!!(process.env.NODE_ENV !== "production")) startTrigger();
|
|
1770
|
+
propagate(subs);
|
|
1771
|
+
if (!!(process.env.NODE_ENV !== "production")) endTrigger({
|
|
1704
1772
|
target: this,
|
|
1705
1773
|
type: "set",
|
|
1706
1774
|
key: "value",
|
|
1707
1775
|
newValue,
|
|
1708
1776
|
oldValue
|
|
1709
1777
|
});
|
|
1710
|
-
propagate(subs);
|
|
1711
1778
|
if (!batchDepth) flush();
|
|
1712
|
-
if (!!(process.env.NODE_ENV !== "production")) triggerEventInfos.pop();
|
|
1713
1779
|
}
|
|
1714
1780
|
}
|
|
1715
1781
|
}
|
|
@@ -1746,8 +1812,10 @@ var RefImpl = class {
|
|
|
1746
1812
|
function triggerRef(ref) {
|
|
1747
1813
|
const dep = ref.dep;
|
|
1748
1814
|
if (dep !== void 0 && dep.subs !== void 0) {
|
|
1815
|
+
if (!!(process.env.NODE_ENV !== "production")) startTrigger();
|
|
1749
1816
|
propagate(dep.subs);
|
|
1750
1817
|
shallowPropagate(dep.subs);
|
|
1818
|
+
if (!!(process.env.NODE_ENV !== "production")) endTrigger();
|
|
1751
1819
|
if (!batchDepth) flush();
|
|
1752
1820
|
}
|
|
1753
1821
|
}
|
|
@@ -1938,6 +2006,10 @@ var ReactiveEffect = class {
|
|
|
1938
2006
|
get active() {
|
|
1939
2007
|
return !(this.flags & 1024);
|
|
1940
2008
|
}
|
|
2009
|
+
/** @internal */
|
|
2010
|
+
get running() {
|
|
2011
|
+
return !!(this.flags & 4);
|
|
2012
|
+
}
|
|
1941
2013
|
pause() {
|
|
1942
2014
|
this.flags |= 256;
|
|
1943
2015
|
}
|
|
@@ -1951,11 +2023,9 @@ var ReactiveEffect = class {
|
|
|
1951
2023
|
if (!this.active) return this.fn();
|
|
1952
2024
|
cleanup(this);
|
|
1953
2025
|
const prevSub = startTracking(this);
|
|
1954
|
-
incRunDepth();
|
|
1955
2026
|
try {
|
|
1956
2027
|
return this.fn();
|
|
1957
2028
|
} finally {
|
|
1958
|
-
decRunDepth();
|
|
1959
2029
|
endTracking(this, prevSub);
|
|
1960
2030
|
const flags = this.flags;
|
|
1961
2031
|
if ((flags & 136) === 136) {
|
|
@@ -1978,9 +2048,9 @@ var ReactiveEffect = class {
|
|
|
1978
2048
|
if (flags & 16) return true;
|
|
1979
2049
|
if (flags & 32) {
|
|
1980
2050
|
if (checkDirty(this.deps, this)) {
|
|
1981
|
-
this.
|
|
2051
|
+
if (this.active) this.flags |= 16;
|
|
1982
2052
|
return true;
|
|
1983
|
-
} else this.flags
|
|
2053
|
+
} else this.flags &= -33;
|
|
1984
2054
|
}
|
|
1985
2055
|
return false;
|
|
1986
2056
|
}
|
|
@@ -1992,20 +2062,19 @@ function effect(fn, options) {
|
|
|
1992
2062
|
if (options) {
|
|
1993
2063
|
const { onStop, scheduler } = options;
|
|
1994
2064
|
if (onStop) {
|
|
1995
|
-
options.onStop = void 0;
|
|
1996
2065
|
const stop = e.stop.bind(e);
|
|
1997
2066
|
e.stop = () => {
|
|
1998
2067
|
stop();
|
|
1999
2068
|
onStop();
|
|
2000
2069
|
};
|
|
2001
2070
|
}
|
|
2002
|
-
if (scheduler) {
|
|
2003
|
-
|
|
2004
|
-
|
|
2005
|
-
|
|
2006
|
-
|
|
2071
|
+
if (scheduler) e.notify = () => {
|
|
2072
|
+
if (!(e.flags & 1280)) scheduler();
|
|
2073
|
+
};
|
|
2074
|
+
if (!!(process.env.NODE_ENV !== "production")) {
|
|
2075
|
+
e.onTrack = options.onTrack;
|
|
2076
|
+
e.onTrigger = options.onTrigger;
|
|
2007
2077
|
}
|
|
2008
|
-
extend(e, options);
|
|
2009
2078
|
}
|
|
2010
2079
|
try {
|
|
2011
2080
|
e.run();
|
|
@@ -2065,8 +2134,10 @@ var EffectScope = class {
|
|
|
2065
2134
|
const flags = this.flags;
|
|
2066
2135
|
if (flags & 256) {
|
|
2067
2136
|
this.flags = flags & -257;
|
|
2068
|
-
|
|
2069
|
-
|
|
2137
|
+
const deps = [];
|
|
2138
|
+
for (let link = this.deps; link !== void 0; link = link.nextDep) deps.push(link.dep);
|
|
2139
|
+
for (let i = 0; i < deps.length; i++) {
|
|
2140
|
+
const dep = deps[i];
|
|
2070
2141
|
if ("resume" in dep) dep.resume();
|
|
2071
2142
|
}
|
|
2072
2143
|
}
|
|
@@ -2095,8 +2166,10 @@ var EffectScope = class {
|
|
|
2095
2166
|
while (dep !== void 0) {
|
|
2096
2167
|
const node = dep.dep;
|
|
2097
2168
|
if ("stop" in node) {
|
|
2098
|
-
|
|
2169
|
+
const prev = dep.prevDep;
|
|
2099
2170
|
node.stop();
|
|
2171
|
+
const next = prev !== void 0 ? prev.nextDep : this.deps;
|
|
2172
|
+
dep = next === dep ? dep.nextDep : next;
|
|
2100
2173
|
} else dep = unlink(dep, this);
|
|
2101
2174
|
}
|
|
2102
2175
|
cleanup(this);
|
|
@@ -2137,11 +2210,14 @@ function setCurrentScope(scope) {
|
|
|
2137
2210
|
* @see {@link https://vuejs.org/api/reactivity-advanced.html#onscopedispose}
|
|
2138
2211
|
*/
|
|
2139
2212
|
function onScopeDispose(fn, failSilently = false) {
|
|
2140
|
-
if (activeEffectScope !== void 0)
|
|
2141
|
-
|
|
2213
|
+
if (activeEffectScope !== void 0) {
|
|
2214
|
+
if (activeEffectScope.active) activeEffectScope.cleanups[activeEffectScope.cleanupsLength++] = fn;
|
|
2215
|
+
else fn();
|
|
2216
|
+
} else if (!!(process.env.NODE_ENV !== "production") && !failSilently) warn$2("onScopeDispose() is called when there is no active effect scope to be associated with.");
|
|
2142
2217
|
}
|
|
2143
2218
|
//#endregion
|
|
2144
2219
|
//#region packages/reactivity/src/computed.ts
|
|
2220
|
+
const FAILED = 64;
|
|
2145
2221
|
/**
|
|
2146
2222
|
* @private exported by @vue/reactivity for Vue core use, but not exported from
|
|
2147
2223
|
* the main vue package
|
|
@@ -2190,12 +2266,24 @@ var ComputedRefImpl = class {
|
|
|
2190
2266
|
}
|
|
2191
2267
|
get value() {
|
|
2192
2268
|
const flags = this.flags;
|
|
2193
|
-
|
|
2194
|
-
if (this.
|
|
2195
|
-
|
|
2196
|
-
|
|
2197
|
-
|
|
2198
|
-
|
|
2269
|
+
try {
|
|
2270
|
+
if (flags & 16 || flags & 32 && checkDirty(this.deps, this)) {
|
|
2271
|
+
if (this.update()) {
|
|
2272
|
+
const subs = this.subs;
|
|
2273
|
+
if (subs !== void 0) shallowPropagate(subs);
|
|
2274
|
+
}
|
|
2275
|
+
} else if (flags & 32) this.flags = flags & -33;
|
|
2276
|
+
} catch (err) {
|
|
2277
|
+
if (activeSub !== void 0) {
|
|
2278
|
+
if (!!(process.env.NODE_ENV !== "production")) onTrack(activeSub, {
|
|
2279
|
+
target: this,
|
|
2280
|
+
type: "get",
|
|
2281
|
+
key: "value"
|
|
2282
|
+
});
|
|
2283
|
+
link(this, activeSub);
|
|
2284
|
+
} else if (activeEffectScope !== void 0) link(this, activeEffectScope);
|
|
2285
|
+
throw err;
|
|
2286
|
+
}
|
|
2199
2287
|
if (activeSub !== void 0) {
|
|
2200
2288
|
if (!!(process.env.NODE_ENV !== "production")) onTrack(activeSub, {
|
|
2201
2289
|
target: this,
|
|
@@ -2203,7 +2291,18 @@ var ComputedRefImpl = class {
|
|
|
2203
2291
|
key: "value"
|
|
2204
2292
|
});
|
|
2205
2293
|
link(this, activeSub);
|
|
2206
|
-
} else if (activeEffectScope !== void 0)
|
|
2294
|
+
} else if (activeEffectScope !== void 0) {
|
|
2295
|
+
if (activeEffectScope.active) link(this, activeEffectScope);
|
|
2296
|
+
else if (this.subs === void 0) {
|
|
2297
|
+
let dep = this.deps;
|
|
2298
|
+
if (dep !== void 0) {
|
|
2299
|
+
do
|
|
2300
|
+
dep = unlink(dep, this);
|
|
2301
|
+
while (dep !== void 0);
|
|
2302
|
+
this.flags |= 16;
|
|
2303
|
+
}
|
|
2304
|
+
}
|
|
2305
|
+
}
|
|
2207
2306
|
return this._value;
|
|
2208
2307
|
}
|
|
2209
2308
|
set value(newValue) {
|
|
@@ -2215,11 +2314,15 @@ var ComputedRefImpl = class {
|
|
|
2215
2314
|
try {
|
|
2216
2315
|
const oldValue = this._value;
|
|
2217
2316
|
const newValue = this.fn(oldValue);
|
|
2218
|
-
if (hasChanged(oldValue, newValue)) {
|
|
2317
|
+
if (hasChanged(oldValue, newValue) || this.flags & FAILED) {
|
|
2219
2318
|
this._value = newValue;
|
|
2319
|
+
this.flags &= -65;
|
|
2220
2320
|
return true;
|
|
2221
2321
|
}
|
|
2222
2322
|
return false;
|
|
2323
|
+
} catch (err) {
|
|
2324
|
+
this.flags |= FAILED;
|
|
2325
|
+
throw err;
|
|
2223
2326
|
} finally {
|
|
2224
2327
|
endTracking(this, prevSub);
|
|
2225
2328
|
}
|
|
@@ -2240,6 +2343,7 @@ function computed$1(getterOrOptions, debugOptions, isSSR = false) {
|
|
|
2240
2343
|
cRef.onTrack = debugOptions.onTrack;
|
|
2241
2344
|
cRef.onTrigger = debugOptions.onTrigger;
|
|
2242
2345
|
}
|
|
2346
|
+
if (isSSR && activeEffectScope !== void 0) link(cRef, activeEffectScope);
|
|
2243
2347
|
return cRef;
|
|
2244
2348
|
}
|
|
2245
2349
|
//#endregion
|
|
@@ -2613,7 +2717,7 @@ function callWithAsyncErrorHandling(fn, instance, type, args) {
|
|
|
2613
2717
|
if (isFunction(fn)) {
|
|
2614
2718
|
const res = callWithErrorHandling(fn, instance, type, args);
|
|
2615
2719
|
if (res && isPromise(res)) res.catch((err) => {
|
|
2616
|
-
handleError(err, instance, type);
|
|
2720
|
+
handleError(err, instance, type, void 0, true);
|
|
2617
2721
|
});
|
|
2618
2722
|
return res;
|
|
2619
2723
|
}
|
|
@@ -2623,7 +2727,7 @@ function callWithAsyncErrorHandling(fn, instance, type, args) {
|
|
|
2623
2727
|
return values;
|
|
2624
2728
|
} else if (!!(process.env.NODE_ENV !== "production")) warn$1(`Invalid value type passed to callWithAsyncErrorHandling(): ${typeof fn}`);
|
|
2625
2729
|
}
|
|
2626
|
-
function handleError(err, instance, type, throwInDev = true) {
|
|
2730
|
+
function handleError(err, instance, type, throwInDev = true, isAsyncError = false) {
|
|
2627
2731
|
const { errorHandler, throwUnhandledErrorInProduction } = instance && instance.appContext.config || EMPTY_OBJ;
|
|
2628
2732
|
if (instance) {
|
|
2629
2733
|
let cur = instance.parent;
|
|
@@ -2631,7 +2735,7 @@ function handleError(err, instance, type, throwInDev = true) {
|
|
|
2631
2735
|
const errorInfo = !!(process.env.NODE_ENV !== "production") ? ErrorTypeStrings$1[type] : `https://vuejs.org/error-reference/#runtime-${type}`;
|
|
2632
2736
|
while (cur) {
|
|
2633
2737
|
const errorCapturedHooks = cur.ec;
|
|
2634
|
-
if (errorCapturedHooks) {
|
|
2738
|
+
if (errorCapturedHooks && !cur.isUnmounted && (!isAsyncError || cur.scope.active)) {
|
|
2635
2739
|
for (let i = 0; i < errorCapturedHooks.length; i++) if (errorCapturedHooks[i](err, exposedInstance, errorInfo) === false) return;
|
|
2636
2740
|
}
|
|
2637
2741
|
cur = cur.parent;
|
|
@@ -2670,7 +2774,9 @@ const SchedulerJobFlags = {
|
|
|
2670
2774
|
"DISPOSED": 4,
|
|
2671
2775
|
"4": "DISPOSED",
|
|
2672
2776
|
"REQUEUE_ON_SUSPENSE_DISCARD": 8,
|
|
2673
|
-
"8": "REQUEUE_ON_SUSPENSE_DISCARD"
|
|
2777
|
+
"8": "REQUEUE_ON_SUSPENSE_DISCARD",
|
|
2778
|
+
"FLUSH_ON_SUSPENSE_RESOLVE": 16,
|
|
2779
|
+
"16": "FLUSH_ON_SUSPENSE_RESOLVE"
|
|
2674
2780
|
};
|
|
2675
2781
|
const jobs = [];
|
|
2676
2782
|
let postJobs = [];
|
|
@@ -2947,7 +3053,11 @@ function reload(id, newComp) {
|
|
|
2947
3053
|
updateComponentDef(record.initialDef, newComp);
|
|
2948
3054
|
const instances = [...record.instances];
|
|
2949
3055
|
if (isVapor && newComp.__vapor && !instances.some((instance) => instance.parent && !instance.parent.vapor) && !instances.some((i) => i.ceReload)) {
|
|
2950
|
-
for (const instance of instances)
|
|
3056
|
+
for (const instance of instances) {
|
|
3057
|
+
if (instance.root && instance.root.ce && instance !== instance.root) instance.root.ce._removeChildStyle(instance.type);
|
|
3058
|
+
const oldComp = normalizeClassComponent(instance.type);
|
|
3059
|
+
if (oldComp !== record.initialDef) updateComponentDef(oldComp, newComp);
|
|
3060
|
+
}
|
|
2951
3061
|
const dirtyInstances = new Set(instances);
|
|
2952
3062
|
const rerenderedParents = /* @__PURE__ */ new Set();
|
|
2953
3063
|
runWithHmrUpdating(() => {
|
|
@@ -2988,7 +3098,25 @@ function reload(id, newComp) {
|
|
|
2988
3098
|
if (instance.root.ce && instance !== instance.root) instance.root.ce._removeChildStyle(oldComp);
|
|
2989
3099
|
}
|
|
2990
3100
|
parents.forEach((parent) => {
|
|
2991
|
-
|
|
3101
|
+
const children = instances.filter((instance) => instance.parent === parent);
|
|
3102
|
+
const update = () => {
|
|
3103
|
+
if (!parent.scope.active) return;
|
|
3104
|
+
const activeChildren = children.filter((instance) => instance.scope.active);
|
|
3105
|
+
if (!activeChildren.length) return;
|
|
3106
|
+
const pending = activeChildren.find((instance) => instance.asyncDep && !instance.asyncResolved) || locateUnresolvedAsyncRoot(parent);
|
|
3107
|
+
if (pending) {
|
|
3108
|
+
pending.asyncDep.catch(NOOP).then(() => {
|
|
3109
|
+
if (parent.scope.active && (pending.asyncResolved || !pending.scope.active)) queueJob(update);
|
|
3110
|
+
});
|
|
3111
|
+
return;
|
|
3112
|
+
}
|
|
3113
|
+
for (const instance of activeChildren) {
|
|
3114
|
+
const oldComp = normalizeClassComponent(instance.type);
|
|
3115
|
+
let dirtyInstances = hmrDirtyComponents.get(oldComp);
|
|
3116
|
+
if (!dirtyInstances) hmrDirtyComponents.set(oldComp, dirtyInstances = /* @__PURE__ */ new Set());
|
|
3117
|
+
dirtyInstances.add(instance);
|
|
3118
|
+
hmrDirtyComponentsMode.set(oldComp, !!isVapor);
|
|
3119
|
+
}
|
|
2992
3120
|
runWithHmrUpdating(() => {
|
|
2993
3121
|
if (parent.vapor) parent.hmrRerender();
|
|
2994
3122
|
else {
|
|
@@ -2999,7 +3127,12 @@ function reload(id, newComp) {
|
|
|
2999
3127
|
}
|
|
3000
3128
|
}
|
|
3001
3129
|
});
|
|
3002
|
-
|
|
3130
|
+
queuePostFlushCb(() => {
|
|
3131
|
+
hmrDirtyComponents.clear();
|
|
3132
|
+
hmrDirtyComponentsMode.clear();
|
|
3133
|
+
});
|
|
3134
|
+
};
|
|
3135
|
+
queueJob(update);
|
|
3003
3136
|
});
|
|
3004
3137
|
}
|
|
3005
3138
|
queuePostFlushCb(() => {
|
|
@@ -3549,11 +3682,28 @@ function withDirectives(vnode, directives) {
|
|
|
3549
3682
|
return vnode;
|
|
3550
3683
|
}
|
|
3551
3684
|
function invokeDirectiveHook(vnode, prevVNode, instance, name) {
|
|
3552
|
-
|
|
3685
|
+
let hookVNode = vnode;
|
|
3686
|
+
if (name === "beforeMount") vnode._mount = vnode;
|
|
3687
|
+
else if (name === "beforeUpdate") {
|
|
3688
|
+
const mount = prevVNode && prevVNode._mount;
|
|
3689
|
+
if (mount) {
|
|
3690
|
+
mount._latest = vnode;
|
|
3691
|
+
vnode._mount = mount;
|
|
3692
|
+
}
|
|
3693
|
+
} else if (name === "mounted") {
|
|
3694
|
+
const latest = vnode._latest;
|
|
3695
|
+
vnode._mount = vnode._latest = void 0;
|
|
3696
|
+
if (latest) {
|
|
3697
|
+
hookVNode = latest;
|
|
3698
|
+
latest._mount = void 0;
|
|
3699
|
+
}
|
|
3700
|
+
}
|
|
3701
|
+
const bindings = hookVNode.dirs;
|
|
3553
3702
|
const oldBindings = prevVNode && prevVNode.dirs;
|
|
3554
3703
|
for (let i = 0; i < bindings.length; i++) {
|
|
3555
|
-
|
|
3704
|
+
let binding = bindings[i];
|
|
3556
3705
|
if (oldBindings) binding.oldValue = oldBindings[i].value;
|
|
3706
|
+
else if (name === "mounted" && binding.oldValue !== void 0) binding = extend({}, binding, { oldValue: void 0 });
|
|
3557
3707
|
let hook = binding.dir[name];
|
|
3558
3708
|
if (!hook) hook = mapCompatDirectiveHook(name, binding.dir, instance);
|
|
3559
3709
|
if (hook) {
|
|
@@ -3561,7 +3711,7 @@ function invokeDirectiveHook(vnode, prevVNode, instance, name) {
|
|
|
3561
3711
|
callWithAsyncErrorHandling(hook, instance, 8, [
|
|
3562
3712
|
vnode.el,
|
|
3563
3713
|
binding,
|
|
3564
|
-
|
|
3714
|
+
hookVNode,
|
|
3565
3715
|
prevVNode
|
|
3566
3716
|
]);
|
|
3567
3717
|
setActiveSub(prevSub);
|
|
@@ -4006,7 +4156,15 @@ const BaseTransitionImpl = {
|
|
|
4006
4156
|
const { mode } = rawProps;
|
|
4007
4157
|
checkTransitionMode(mode);
|
|
4008
4158
|
return prepareTransitionSwitch(instance.subTree, child, rawProps, state, instance, mode === "out-in" ? resumeAfterLeave || (resumeAfterLeave = () => {
|
|
4009
|
-
if (!(instance.effect.flags & 1024))
|
|
4159
|
+
if (!(instance.effect.flags & 1024)) {
|
|
4160
|
+
if (instance.effect.running) {
|
|
4161
|
+
const job = () => {
|
|
4162
|
+
if (!(instance.effect.flags & 1024)) instance.update();
|
|
4163
|
+
};
|
|
4164
|
+
job.i = instance;
|
|
4165
|
+
queueJob(job);
|
|
4166
|
+
} else instance.update();
|
|
4167
|
+
}
|
|
4010
4168
|
}) : NOOP);
|
|
4011
4169
|
};
|
|
4012
4170
|
}
|
|
@@ -4038,7 +4196,7 @@ function getLeavingNodesForType(state, vnode) {
|
|
|
4038
4196
|
}
|
|
4039
4197
|
return leavingVNodesCache;
|
|
4040
4198
|
}
|
|
4041
|
-
function resolveTransitionHooks(vnode, props, state, instance
|
|
4199
|
+
function resolveTransitionHooks(vnode, props, state, instance) {
|
|
4042
4200
|
const key = String(vnode.key);
|
|
4043
4201
|
const leavingVNodesCache = getLeavingNodesForType(state, vnode);
|
|
4044
4202
|
const hooks = baseResolveTransitionHooks({
|
|
@@ -4061,9 +4219,7 @@ function resolveTransitionHooks(vnode, props, state, instance, postClone) {
|
|
|
4061
4219
|
}
|
|
4062
4220
|
},
|
|
4063
4221
|
cloneHooks: (vnode) => {
|
|
4064
|
-
|
|
4065
|
-
if (postClone) postClone(hooks);
|
|
4066
|
-
return hooks;
|
|
4222
|
+
return resolveTransitionHooks(vnode, props, state, instance);
|
|
4067
4223
|
}
|
|
4068
4224
|
}, props, state, instance);
|
|
4069
4225
|
if (isVaporInteropEnabled && vnode.type === VaporSlot) extend(hooks, {
|
|
@@ -4101,7 +4257,7 @@ function baseResolveTransitionHooks(context, props, state, instance) {
|
|
|
4101
4257
|
callHook(hook, [el]);
|
|
4102
4258
|
},
|
|
4103
4259
|
enter(el) {
|
|
4104
|
-
if (!isHmrUpdating && isLeaving()) return;
|
|
4260
|
+
if (!isHmrUpdating && isLeaving(el)) return;
|
|
4105
4261
|
let hook = onEnter;
|
|
4106
4262
|
let afterHook = onAfterEnter;
|
|
4107
4263
|
let cancelHook = onEnterCancelled;
|
|
@@ -4145,7 +4301,19 @@ function baseResolveTransitionHooks(context, props, state, instance) {
|
|
|
4145
4301
|
else done();
|
|
4146
4302
|
},
|
|
4147
4303
|
clone(node) {
|
|
4148
|
-
|
|
4304
|
+
if (!cloneHooks) return hooks;
|
|
4305
|
+
const cloned = cloneHooks(node);
|
|
4306
|
+
cloned.afterLeave = () => {
|
|
4307
|
+
if (hooks.afterLeave) hooks.afterLeave();
|
|
4308
|
+
};
|
|
4309
|
+
cloned.delayLeave = (el, earlyRemove, delayedLeave) => {
|
|
4310
|
+
if (hooks.delayLeave) hooks.delayLeave(el, earlyRemove, delayedLeave);
|
|
4311
|
+
else delayedLeave();
|
|
4312
|
+
};
|
|
4313
|
+
cloned.delayedLeave = () => {
|
|
4314
|
+
if (hooks.delayedLeave) hooks.delayedLeave();
|
|
4315
|
+
};
|
|
4316
|
+
return cloned;
|
|
4149
4317
|
}
|
|
4150
4318
|
};
|
|
4151
4319
|
return hooks;
|
|
@@ -4180,10 +4348,7 @@ function prepareTransitionSwitch(previous, next, props, state, instance, resumeA
|
|
|
4180
4348
|
if (state.isLeaving) return emptyPlaceholder(next);
|
|
4181
4349
|
const nextInner = getInnerChild$1(next);
|
|
4182
4350
|
if (!nextInner) return emptyPlaceholder(next);
|
|
4183
|
-
|
|
4184
|
-
if (delayedLeaveSource) forwardDelayedLeave(hooks, delayedLeaveSource);
|
|
4185
|
-
enterHooks = hooks;
|
|
4186
|
-
});
|
|
4351
|
+
const enterHooks = resolveTransitionHooks(nextInner, props, state, instance);
|
|
4187
4352
|
if (delayedLeaveSource) forwardDelayedLeave(enterHooks, delayedLeaveSource);
|
|
4188
4353
|
if (nextInner.type !== Comment) setTransitionHooks(nextInner, enterHooks);
|
|
4189
4354
|
const mode = props.mode;
|
|
@@ -4267,9 +4432,14 @@ function setTransitionHooks(vnode, hooks) {
|
|
|
4267
4432
|
return setTransitionHooks(isTeleport(subTree.type) ? getInnerChild$1(subTree) || subTree : subTree, hooks);
|
|
4268
4433
|
}
|
|
4269
4434
|
} else if (vnode.shapeFlag & 128) {
|
|
4270
|
-
const
|
|
4271
|
-
|
|
4272
|
-
|
|
4435
|
+
const suspense = vnode.suspense;
|
|
4436
|
+
if (suspense) {
|
|
4437
|
+
const branch = suspense.isHydrating ? suspense.pendingBranch : suspense.activeBranch;
|
|
4438
|
+
if (branch) return setTransitionHooks(branch, hooks.clone(branch));
|
|
4439
|
+
} else {
|
|
4440
|
+
vnode.ssContent.transition = hooks.clone(vnode.ssContent);
|
|
4441
|
+
vnode.ssFallback.transition = hooks.clone(vnode.ssFallback);
|
|
4442
|
+
}
|
|
4273
4443
|
} else {
|
|
4274
4444
|
vnode.transition = hooks;
|
|
4275
4445
|
if (vnode.type === Fragment && isArray(vnode.children)) {
|
|
@@ -4497,7 +4667,7 @@ const getContainerType = (container) => {
|
|
|
4497
4667
|
};
|
|
4498
4668
|
const isComment = (node) => node.nodeType === 8;
|
|
4499
4669
|
/** The data of a comment opening a range a hydration steps over as one. */
|
|
4500
|
-
const isRangeStart = (data) => data === "[" || data === "(" ||
|
|
4670
|
+
const isRangeStart = (data) => data === "[" || data === "(" || isVaporRangeStart(data);
|
|
4501
4671
|
function createHydrationFunctions(rendererInternals) {
|
|
4502
4672
|
const { mt: mountComponent, p: patch, o: { patchProp, createText, nextSibling, parentNode, remove, insert, createComment } } = rendererInternals;
|
|
4503
4673
|
const hydrate = (vnode, container) => {
|
|
@@ -4517,7 +4687,7 @@ function createHydrationFunctions(rendererInternals) {
|
|
|
4517
4687
|
};
|
|
4518
4688
|
const hydrateNode = (node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized = false) => {
|
|
4519
4689
|
optimized = optimized || !!vnode.dynamicChildren;
|
|
4520
|
-
const isFragmentStart = isComment(node) && (node.data === "[" || node.data === "(" || isVaporInteropEnabled &&
|
|
4690
|
+
const isFragmentStart = isComment(node) && (node.data === "[" || node.data === "(" || isVaporInteropEnabled && isVaporRangeStart(node.data));
|
|
4521
4691
|
const onMismatch = () => handleMismatch(node, vnode, parentComponent, parentSuspense, slotScopeIds, isFragmentStart);
|
|
4522
4692
|
const { type, ref, shapeFlag, patchFlag } = vnode;
|
|
4523
4693
|
let domType = node.nodeType;
|
|
@@ -4712,10 +4882,11 @@ function createHydrationFunctions(rendererInternals) {
|
|
|
4712
4882
|
const container = parentNode(node);
|
|
4713
4883
|
const first = nextSibling(node);
|
|
4714
4884
|
const next = isVaporInteropEnabled && vnode.vo && node.data === "(" ? getVaporInterface(parentComponent, vnode).hydrateSlotOutlet(vnode, node, parentComponent, parentSuspense, slotScopeIds) : hydrateChildren(first, vnode, container, parentComponent, parentSuspense, slotScopeIds, optimized);
|
|
4715
|
-
|
|
4885
|
+
const close = isVaporInteropEnabled ? rangeCloseOf(node.data) : node.data === "(" ? ")" : "]";
|
|
4886
|
+
if (next && isComment(next) && next.data === close) return nextSibling(vnode.anchor = next);
|
|
4716
4887
|
else {
|
|
4717
4888
|
logMismatchError();
|
|
4718
|
-
insert(vnode.anchor = createComment(
|
|
4889
|
+
insert(vnode.anchor = createComment(close), container, next);
|
|
4719
4890
|
return next;
|
|
4720
4891
|
}
|
|
4721
4892
|
};
|
|
@@ -4737,13 +4908,13 @@ function createHydrationFunctions(rendererInternals) {
|
|
|
4737
4908
|
const container = parentNode(node);
|
|
4738
4909
|
remove(node);
|
|
4739
4910
|
patch(null, vnode, container, next, parentComponent, parentSuspense, getContainerType(container), slotScopeIds);
|
|
4740
|
-
if (parentComponent && parentComponent.vnode) {
|
|
4911
|
+
if (parentComponent && parentComponent.vnode && parentComponent.vnode.el === node) {
|
|
4741
4912
|
parentComponent.vnode.el = vnode.el;
|
|
4742
4913
|
updateHOCHostEl(parentComponent, vnode.el);
|
|
4743
4914
|
}
|
|
4744
4915
|
return next;
|
|
4745
4916
|
};
|
|
4746
|
-
const locateClosingAnchor = (node, open = node && isComment(node) && node.data === "("
|
|
4917
|
+
const locateClosingAnchor = (node, open = node && isComment(node) && (node.data === "(" || isVaporInteropEnabled && node.data === "{") ? node.data : "[", close = isVaporInteropEnabled ? rangeCloseOf(open) : open === "(" ? ")" : "]") => {
|
|
4747
4918
|
let match = 0;
|
|
4748
4919
|
while (node) {
|
|
4749
4920
|
node = nextSibling(node);
|
|
@@ -5018,7 +5189,7 @@ const hydrateOnInteraction = (interactions = []) => (hydrate, forEach) => {
|
|
|
5018
5189
|
function forEachElement(node, cb) {
|
|
5019
5190
|
if (isComment(node) && isRangeStart(node.data)) {
|
|
5020
5191
|
const open = node.data;
|
|
5021
|
-
const close = open
|
|
5192
|
+
const close = rangeCloseOf(open);
|
|
5022
5193
|
let depth = 1;
|
|
5023
5194
|
let next = node.nextSibling;
|
|
5024
5195
|
while (next) {
|
|
@@ -5055,7 +5226,7 @@ function defineAsyncComponent(source) {
|
|
|
5055
5226
|
if (resolvedComp) return () => createInnerComp(resolvedComp, instance);
|
|
5056
5227
|
const onError = (err) => {
|
|
5057
5228
|
setPendingRequest(null);
|
|
5058
|
-
handleError(err, instance, 13, !errorComponent);
|
|
5229
|
+
handleError(err, instance, 13, !errorComponent, true);
|
|
5059
5230
|
};
|
|
5060
5231
|
if (suspensible && instance.suspense || isInSSRComponentSetup) return load().then((comp) => {
|
|
5061
5232
|
return () => createInnerComp(comp, instance);
|
|
@@ -5136,10 +5307,12 @@ const useAsyncComponentState = (delay = 200, timeout, onError, instance = curren
|
|
|
5136
5307
|
const delayed = /* @__PURE__ */ ref(!!delay);
|
|
5137
5308
|
let timeoutTimer;
|
|
5138
5309
|
let delayTimer;
|
|
5139
|
-
if (instance)
|
|
5140
|
-
|
|
5141
|
-
|
|
5142
|
-
|
|
5310
|
+
if (instance) instance.scope.run(() => {
|
|
5311
|
+
onScopeDispose(() => {
|
|
5312
|
+
if (timeoutTimer != null) clearTimeout(timeoutTimer);
|
|
5313
|
+
if (delayTimer != null) clearTimeout(delayTimer);
|
|
5314
|
+
});
|
|
5315
|
+
});
|
|
5143
5316
|
if (delay) delayTimer = setTimeout(() => {
|
|
5144
5317
|
if (instance && instance.isUnmounted) return;
|
|
5145
5318
|
delayed.value = false;
|
|
@@ -5174,7 +5347,12 @@ function performAsyncHydrate(el, instance, hydrate, getResolvedComp, load, hydra
|
|
|
5174
5347
|
}
|
|
5175
5348
|
return;
|
|
5176
5349
|
}
|
|
5177
|
-
if (!el.parentNode
|
|
5350
|
+
if (!el.parentNode) return;
|
|
5351
|
+
if (wasConnected && !el.isConnected) {
|
|
5352
|
+
let current = instance;
|
|
5353
|
+
while (current && !current.isDeactivated) current = current.parent;
|
|
5354
|
+
if (!current) return;
|
|
5355
|
+
}
|
|
5178
5356
|
hydrate();
|
|
5179
5357
|
};
|
|
5180
5358
|
const doHydrate = hydrateStrategy ? () => {
|
|
@@ -5232,7 +5410,11 @@ const KeepAliveImpl = {
|
|
|
5232
5410
|
activate(vnode, container, anchor, renderer, keepAliveInstance, parentSuspense, namespace, optimized);
|
|
5233
5411
|
};
|
|
5234
5412
|
sharedContext.deactivate = (vnode) => {
|
|
5235
|
-
|
|
5413
|
+
const cached = sharedContext.getCachedComponent(vnode);
|
|
5414
|
+
if (!cached || cached.component !== vnode.component) return false;
|
|
5415
|
+
if (isVaporInteropEnabled && isVaporComponent(vnode.type)) getVaporInterface(keepAliveInstance, vnode).deactivate(vnode, storageContainer, parentSuspense);
|
|
5416
|
+
else deactivate(vnode, storageContainer, renderer, keepAliveInstance, parentSuspense);
|
|
5417
|
+
return true;
|
|
5236
5418
|
};
|
|
5237
5419
|
function unmount(vnode) {
|
|
5238
5420
|
resetShapeFlag(vnode);
|
|
@@ -5264,11 +5446,15 @@ const KeepAliveImpl = {
|
|
|
5264
5446
|
let pendingCacheKey = null;
|
|
5265
5447
|
const cacheSubtree = () => {
|
|
5266
5448
|
if (pendingCacheKey != null) {
|
|
5267
|
-
if (isSuspense(keepAliveInstance.subTree.type))
|
|
5268
|
-
const
|
|
5269
|
-
|
|
5270
|
-
|
|
5271
|
-
|
|
5449
|
+
if (isSuspense(keepAliveInstance.subTree.type)) {
|
|
5450
|
+
const cacheInnerChild = () => {
|
|
5451
|
+
const vnode = getInnerChild(keepAliveInstance.subTree);
|
|
5452
|
+
if (vnode.component) cache.set(pendingCacheKey, vnode);
|
|
5453
|
+
};
|
|
5454
|
+
const suspense = keepAliveInstance.subTree.suspense;
|
|
5455
|
+
if (suspense.pendingBranch) queuePostRenderEffect(cacheInnerChild, void 0, suspense);
|
|
5456
|
+
else cacheInnerChild();
|
|
5457
|
+
} else cache.set(pendingCacheKey, getInnerChild(keepAliveInstance.subTree));
|
|
5272
5458
|
}
|
|
5273
5459
|
};
|
|
5274
5460
|
onMounted(cacheSubtree);
|
|
@@ -5378,9 +5564,8 @@ function registerKeepAliveHook(hook, type, target = getCurrentGenericInstance())
|
|
|
5378
5564
|
}
|
|
5379
5565
|
function injectToKeepAliveRoot(hook, type, target, keepAliveRoot) {
|
|
5380
5566
|
const injected = injectHook(type, hook, keepAliveRoot, true);
|
|
5381
|
-
|
|
5382
|
-
|
|
5383
|
-
}, target);
|
|
5567
|
+
const removal = injectHook("um", () => remove(keepAliveRoot[type], injected), target);
|
|
5568
|
+
removal.flags = 8;
|
|
5384
5569
|
}
|
|
5385
5570
|
function resetShapeFlag(vnode) {
|
|
5386
5571
|
vnode.shapeFlag &= -257;
|
|
@@ -5819,6 +6004,11 @@ function renderSlot(slots, name, props, fallback, noSlotted, branchKey) {
|
|
|
5819
6004
|
ret.props = extend({}, ret.props, { key: branchKey });
|
|
5820
6005
|
ret.key = branchKey;
|
|
5821
6006
|
}
|
|
6007
|
+
if (isBlockTreeEnabled <= 0) {
|
|
6008
|
+
if (!ret.vs.props) ret.vs.props = ret.props;
|
|
6009
|
+
ret.props = ret.key != null ? { key: ret.key } : null;
|
|
6010
|
+
ret.vs.attrs = EMPTY_OBJ;
|
|
6011
|
+
}
|
|
5822
6012
|
if (!noSlotted && ret.scopeId) ret.slotScopeIds = [ret.scopeId + "-s"];
|
|
5823
6013
|
return ret;
|
|
5824
6014
|
}
|
|
@@ -6800,7 +6990,7 @@ function createCompatVue$1(createApp, createSingletonApp) {
|
|
|
6800
6990
|
if (options.el) return vm.$mount(options.el);
|
|
6801
6991
|
else return vm;
|
|
6802
6992
|
}
|
|
6803
|
-
Vue.version = `2.6.14-compat:3.6.0-rc.
|
|
6993
|
+
Vue.version = `2.6.14-compat:3.6.0-rc.15`;
|
|
6804
6994
|
Vue.config = singletonApp.config;
|
|
6805
6995
|
Vue.use = (plugin, ...options) => {
|
|
6806
6996
|
if (plugin && isFunction(plugin.install)) plugin.install(Vue, ...options);
|
|
@@ -8302,8 +8492,10 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
8302
8492
|
def(el, "__vueParentComponent", parentComponent, true);
|
|
8303
8493
|
}
|
|
8304
8494
|
if (dirs) invokeDirectiveHook(vnode, null, parentComponent, "beforeMount");
|
|
8305
|
-
if (transition)
|
|
8306
|
-
|
|
8495
|
+
if (transition) {
|
|
8496
|
+
if (!needTransition(parentSuspense, transition) && !transition.persisted) el[deferredEnterKey] = true;
|
|
8497
|
+
performTransitionEnter(el, transition, () => hostInsert(el, container, anchor), parentSuspense);
|
|
8498
|
+
} else hostInsert(el, container, anchor);
|
|
8307
8499
|
if ((vnodeHook = props && props.onVnodeMounted) || dirs) {
|
|
8308
8500
|
const isHmr = !!(process.env.NODE_ENV !== "production") && isHmrUpdating;
|
|
8309
8501
|
queuePostRenderEffect(() => {
|
|
@@ -8575,16 +8767,20 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
8575
8767
|
} else {
|
|
8576
8768
|
let { next, bu, u, parent, vnode } = instance;
|
|
8577
8769
|
{
|
|
8578
|
-
const
|
|
8579
|
-
if (
|
|
8770
|
+
const unresolvedAsyncRoot = locateUnresolvedAsyncRoot(instance);
|
|
8771
|
+
if (unresolvedAsyncRoot) {
|
|
8580
8772
|
if (next) {
|
|
8581
8773
|
next.el = vnode.el;
|
|
8582
8774
|
updateComponentPreRender(instance, next, optimized);
|
|
8583
8775
|
}
|
|
8584
|
-
|
|
8585
|
-
|
|
8586
|
-
if (
|
|
8587
|
-
|
|
8776
|
+
unresolvedAsyncRoot.asyncDep.then(() => {
|
|
8777
|
+
const retry = () => {
|
|
8778
|
+
if (instance.effect.flags & 1024) return;
|
|
8779
|
+
if (parentSuspense && parentSuspense.pendingBranch) queuePostRenderEffect(retry, void 0, parentSuspense);
|
|
8780
|
+
else instance.update();
|
|
8781
|
+
};
|
|
8782
|
+
retry.flags = 24;
|
|
8783
|
+
queuePostRenderEffect(retry, void 0, parentSuspense);
|
|
8588
8784
|
});
|
|
8589
8785
|
return;
|
|
8590
8786
|
}
|
|
@@ -8608,7 +8804,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
8608
8804
|
const prevTree = instance.subTree;
|
|
8609
8805
|
instance.subTree = nextTree;
|
|
8610
8806
|
if (!!(process.env.NODE_ENV !== "production")) startMeasure(instance, `patch`);
|
|
8611
|
-
patch(prevTree, nextTree, hostParentNode(prevTree.el), getNextHostNode(prevTree), instance, parentSuspense, namespace);
|
|
8807
|
+
patch(prevTree, nextTree, hostParentNode(prevTree.el || resolveAsyncComponentPlaceholder(prevTree)), getNextHostNode(prevTree), instance, parentSuspense, namespace);
|
|
8612
8808
|
if (!!(process.env.NODE_ENV !== "production")) endMeasure(instance, `patch`);
|
|
8613
8809
|
next.el = nextTree.el;
|
|
8614
8810
|
if (originNext === null) updateHOCHostEl(instance, nextTree.el);
|
|
@@ -8812,9 +9008,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
8812
9008
|
}
|
|
8813
9009
|
if (cacheIndex != null && (!vnode.ctx || vnode.ctx === parentComponent)) parentComponent.renderCache[cacheIndex] = void 0;
|
|
8814
9010
|
if (shapeFlag & 256) {
|
|
8815
|
-
if (
|
|
8816
|
-
else parentComponent.ctx.deactivate(vnode);
|
|
8817
|
-
return;
|
|
9011
|
+
if (parentComponent.ctx.deactivate(vnode)) return;
|
|
8818
9012
|
}
|
|
8819
9013
|
if (isVaporInteropEnabled && shapeFlag & 6 && isVaporComponent(type)) {
|
|
8820
9014
|
getVaporInterface(parentComponent, vnode).unmount(vnode, doRemove, parentSuspense);
|
|
@@ -8895,13 +9089,15 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
8895
9089
|
if (effect) {
|
|
8896
9090
|
effect.stop();
|
|
8897
9091
|
unmount(subTree, instance, parentSuspense, doRemove);
|
|
8898
|
-
} else if (
|
|
9092
|
+
} else if (subTree) {
|
|
8899
9093
|
subTree.transition = instance.vnode.transition;
|
|
8900
9094
|
unmount(subTree, instance, parentSuspense, doRemove);
|
|
8901
9095
|
}
|
|
8902
9096
|
if (um) queuePostRenderEffect(um, void 0, parentSuspense);
|
|
8903
9097
|
if (isCompatEnabled$1("INSTANCE_EVENT_HOOKS", instance)) queuePostRenderEffect(() => instance.emit("hook:destroyed"), void 0, parentSuspense);
|
|
8904
|
-
|
|
9098
|
+
const markUnmounted = () => instance.isUnmounted = true;
|
|
9099
|
+
markUnmounted.flags = 8;
|
|
9100
|
+
queuePostRenderEffect(markUnmounted, void 0, parentSuspense);
|
|
8905
9101
|
if (!!(process.env.NODE_ENV !== "production") || __VUE_PROD_DEVTOOLS__) devtoolsComponentRemoved(instance);
|
|
8906
9102
|
};
|
|
8907
9103
|
const unmountChildren = (children, parentComponent, parentSuspense, doRemove = false, optimized = false, start = 0) => {
|
|
@@ -9015,11 +9211,11 @@ function traverseStaticChildren(n1, n2, shallow = false) {
|
|
|
9015
9211
|
if (!!(process.env.NODE_ENV !== "production")) c2.el && (c2.el.__vnode = c2);
|
|
9016
9212
|
}
|
|
9017
9213
|
}
|
|
9018
|
-
function
|
|
9214
|
+
function locateUnresolvedAsyncRoot(instance) {
|
|
9019
9215
|
const subComponent = instance.subTree && instance.subTree.component;
|
|
9020
9216
|
if (subComponent) {
|
|
9021
9217
|
if (subComponent.asyncDep && !subComponent.asyncResolved) return subComponent;
|
|
9022
|
-
else return
|
|
9218
|
+
else return locateUnresolvedAsyncRoot(subComponent);
|
|
9023
9219
|
}
|
|
9024
9220
|
}
|
|
9025
9221
|
function invalidateMount(hooks) {
|
|
@@ -9089,7 +9285,9 @@ function getInheritedScopeIds(vnode, parentComponent, includeVaporRootIds = true
|
|
|
9089
9285
|
function resolveAsyncComponentPlaceholder(anchorVnode) {
|
|
9090
9286
|
if (anchorVnode.placeholder) return anchorVnode.placeholder;
|
|
9091
9287
|
const instance = anchorVnode.component;
|
|
9092
|
-
if (instance) return resolveAsyncComponentPlaceholder(instance.subTree);
|
|
9288
|
+
if (instance && instance.subTree) return resolveAsyncComponentPlaceholder(instance.subTree);
|
|
9289
|
+
const suspense = anchorVnode.suspense;
|
|
9290
|
+
if (suspense && suspense.activeBranch) return resolveAsyncComponentPlaceholder(suspense.activeBranch);
|
|
9093
9291
|
return null;
|
|
9094
9292
|
}
|
|
9095
9293
|
//#endregion
|
|
@@ -9101,17 +9299,22 @@ function withSuspenseEnabled(value) {
|
|
|
9101
9299
|
return value;
|
|
9102
9300
|
}
|
|
9103
9301
|
let suspenseId = 0;
|
|
9302
|
+
const deferredEnterKey = Symbol("_deferredEnter");
|
|
9104
9303
|
const Suspense = /*@__PURE__*/ withSuspenseEnabled({
|
|
9105
9304
|
name: "Suspense",
|
|
9106
9305
|
__isSuspense: true,
|
|
9107
9306
|
process(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, rendererInternals) {
|
|
9108
9307
|
if (n1 == null) mountSuspense(n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, rendererInternals);
|
|
9109
9308
|
else {
|
|
9110
|
-
|
|
9111
|
-
|
|
9112
|
-
|
|
9113
|
-
n2.
|
|
9114
|
-
|
|
9309
|
+
const suspense = n1.suspense;
|
|
9310
|
+
if (parentSuspense && parentSuspense.deps > 0 && !parentSuspense.isHydrating) {
|
|
9311
|
+
const owner = suspense.parentComponent;
|
|
9312
|
+
if (!!owner && owner.suspense === parentSuspense && owner.suspenseId !== parentSuspense.pendingId ? parentSuspense.pendingBranch && !isSameVNodeType(n2.ssContent, suspense.pendingBranch || suspense.activeBranch) : !suspense.isInFallback) {
|
|
9313
|
+
n2.suspense = suspense;
|
|
9314
|
+
suspense.vnode = n2;
|
|
9315
|
+
n2.el = n1.el;
|
|
9316
|
+
return;
|
|
9317
|
+
}
|
|
9115
9318
|
}
|
|
9116
9319
|
patchSuspense(n1, n2, container, anchor, parentComponent, namespace, slotScopeIds, optimized, rendererInternals);
|
|
9117
9320
|
}
|
|
@@ -9123,6 +9326,36 @@ function triggerEvent(vnode, name) {
|
|
|
9123
9326
|
const eventListener = vnode.props && vnode.props[name];
|
|
9124
9327
|
if (isFunction(eventListener)) eventListener();
|
|
9125
9328
|
}
|
|
9329
|
+
function enterDeferred(suspense, branch) {
|
|
9330
|
+
const enters = [];
|
|
9331
|
+
collectDeferredEnters(branch, enters, true);
|
|
9332
|
+
if (isVaporInteropEnabled) {
|
|
9333
|
+
const { parentComponent } = suspense;
|
|
9334
|
+
const vapor = parentComponent && parentComponent.appContext.vapor;
|
|
9335
|
+
if (vapor) vapor.enterDeferred(suspense, enters);
|
|
9336
|
+
}
|
|
9337
|
+
if (enters.length) queuePostFlushCb(enters);
|
|
9338
|
+
}
|
|
9339
|
+
function collectDeferredEnters(vnode, enters, isRoot) {
|
|
9340
|
+
const { el, transition, children, shapeFlag } = vnode;
|
|
9341
|
+
if (shapeFlag & 6) {
|
|
9342
|
+
const subTree = vnode.component.subTree;
|
|
9343
|
+
if (subTree) collectDeferredEnters(subTree, enters, isRoot);
|
|
9344
|
+
return;
|
|
9345
|
+
}
|
|
9346
|
+
if (shapeFlag & 192) return;
|
|
9347
|
+
if (shapeFlag & 1) {
|
|
9348
|
+
if (!isRoot && el && el[deferredEnterKey]) {
|
|
9349
|
+
el[deferredEnterKey] = void 0;
|
|
9350
|
+
if (transition && !transition.persisted) {
|
|
9351
|
+
transition.beforeEnter(el);
|
|
9352
|
+
enters.push(() => transition.enter(el));
|
|
9353
|
+
}
|
|
9354
|
+
}
|
|
9355
|
+
isRoot = false;
|
|
9356
|
+
}
|
|
9357
|
+
if (shapeFlag & 16) for (let i = 0; i < children.length; i++) collectDeferredEnters(children[i], enters, isRoot);
|
|
9358
|
+
}
|
|
9126
9359
|
function mountSuspense(vnode, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, rendererInternals) {
|
|
9127
9360
|
const { p: patch, o: { createElement } } = rendererInternals;
|
|
9128
9361
|
const hiddenContainer = createElement("div");
|
|
@@ -9162,11 +9395,7 @@ function patchSuspense(n1, n2, container, anchor, parentComponent, namespace, sl
|
|
|
9162
9395
|
suspense.activeBranch = pendingBranch;
|
|
9163
9396
|
} else unmount(pendingBranch, parentComponent, suspense);
|
|
9164
9397
|
suspense.deps = 0;
|
|
9165
|
-
|
|
9166
|
-
const effect = suspense.effects[i];
|
|
9167
|
-
if (effect.flags & 8) queuePostFlushCb(effect);
|
|
9168
|
-
}
|
|
9169
|
-
suspense.effects.length = 0;
|
|
9398
|
+
discardEffects(suspense);
|
|
9170
9399
|
suspense.hiddenContainer = createElement("div");
|
|
9171
9400
|
if (isInFallback) {
|
|
9172
9401
|
patch(null, newBranch, suspense.hiddenContainer, null, parentComponent, suspense, namespace, slotScopeIds, optimized);
|
|
@@ -9189,14 +9418,14 @@ function patchSuspense(n1, n2, container, anchor, parentComponent, namespace, sl
|
|
|
9189
9418
|
} else {
|
|
9190
9419
|
triggerEvent(n2, "onPending");
|
|
9191
9420
|
suspense.pendingBranch = newBranch;
|
|
9192
|
-
|
|
9193
|
-
else suspense.pendingId = suspenseId++;
|
|
9421
|
+
suspense.pendingId = suspenseId++;
|
|
9194
9422
|
patch(null, newBranch, suspense.hiddenContainer, null, parentComponent, suspense, namespace, slotScopeIds, optimized);
|
|
9195
9423
|
if (suspense.deps <= 0) suspense.resolve();
|
|
9196
9424
|
else {
|
|
9197
|
-
const { timeout
|
|
9198
|
-
if (timeout > 0) setTimeout(() => {
|
|
9199
|
-
|
|
9425
|
+
const { timeout } = suspense;
|
|
9426
|
+
if (timeout > 0) suspense.timeoutTimer = setTimeout(() => {
|
|
9427
|
+
suspense.timeoutTimer = void 0;
|
|
9428
|
+
suspense.fallback(suspense.vnode.ssFallback);
|
|
9200
9429
|
}, timeout);
|
|
9201
9430
|
else if (timeout === 0) suspense.fallback(newFallback);
|
|
9202
9431
|
}
|
|
@@ -9232,6 +9461,7 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|
|
9232
9461
|
deps: 0,
|
|
9233
9462
|
pendingId: suspenseId++,
|
|
9234
9463
|
timeout: typeof timeout === "number" ? timeout : -1,
|
|
9464
|
+
timeoutTimer: void 0,
|
|
9235
9465
|
activeBranch: null,
|
|
9236
9466
|
isFallbackMountPending: false,
|
|
9237
9467
|
pendingBranch: null,
|
|
@@ -9251,26 +9481,39 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|
|
9251
9481
|
delayEnter = activeBranch && pendingBranch.transition && pendingBranch.transition.mode === "out-in";
|
|
9252
9482
|
let hasUpdatedAnchor = false;
|
|
9253
9483
|
if (delayEnter) activeBranch.transition.afterLeave = () => {
|
|
9254
|
-
if (pendingId === suspense.pendingId) {
|
|
9484
|
+
if (pendingId === suspense.pendingId && !suspense.isUnmounted) {
|
|
9485
|
+
enterDeferred(suspense, pendingBranch);
|
|
9255
9486
|
move(pendingBranch, container, anchor === initialAnchor && !hasUpdatedAnchor ? next(activeBranch) : anchor, 0, parentComponent);
|
|
9256
9487
|
queuePostFlushCb(effects);
|
|
9257
9488
|
if (isInFallback && vnode.ssFallback) vnode.ssFallback.el = null;
|
|
9258
9489
|
}
|
|
9259
9490
|
};
|
|
9260
9491
|
if (activeBranch && !suspense.isFallbackMountPending) {
|
|
9261
|
-
if (parentNode(activeBranch.el) === container) {
|
|
9492
|
+
if (parentNode(activeBranch.el || resolveAsyncComponentPlaceholder(activeBranch)) === container) {
|
|
9262
9493
|
anchor = next(activeBranch);
|
|
9263
9494
|
hasUpdatedAnchor = true;
|
|
9264
9495
|
}
|
|
9265
9496
|
unmount(activeBranch, parentComponent, suspense, true);
|
|
9266
9497
|
if (!delayEnter && isInFallback && vnode.ssFallback) queuePostRenderEffect(() => vnode.ssFallback.el = null, void 0, suspense);
|
|
9267
9498
|
}
|
|
9268
|
-
if (!delayEnter)
|
|
9499
|
+
if (!delayEnter) {
|
|
9500
|
+
enterDeferred(suspense, pendingBranch);
|
|
9501
|
+
move(pendingBranch, container, anchor, 0, parentComponent);
|
|
9502
|
+
}
|
|
9269
9503
|
}
|
|
9504
|
+
clearTimeout(suspense.timeoutTimer);
|
|
9505
|
+
suspense.timeoutTimer = void 0;
|
|
9270
9506
|
suspense.isFallbackMountPending = false;
|
|
9271
9507
|
setActiveBranch(suspense, pendingBranch);
|
|
9272
9508
|
suspense.pendingBranch = null;
|
|
9273
9509
|
suspense.isInFallback = false;
|
|
9510
|
+
let kept = 0;
|
|
9511
|
+
for (let i = 0; i < effects.length; i++) {
|
|
9512
|
+
const effect = effects[i];
|
|
9513
|
+
if (effect.flags & 16) queuePostFlushCb(effect);
|
|
9514
|
+
else effects[kept++] = effect;
|
|
9515
|
+
}
|
|
9516
|
+
effects.length = kept;
|
|
9274
9517
|
let parent = suspense.parent;
|
|
9275
9518
|
let hasUnresolvedAncestor = false;
|
|
9276
9519
|
while (parent) {
|
|
@@ -9293,13 +9536,13 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|
|
9293
9536
|
triggerEvent(vnode, "onResolve");
|
|
9294
9537
|
},
|
|
9295
9538
|
fallback(fallbackVNode) {
|
|
9296
|
-
if (!suspense.pendingBranch) return;
|
|
9539
|
+
if (suspense.isUnmounted || !suspense.pendingBranch) return;
|
|
9297
9540
|
const { vnode, activeBranch, parentComponent, container, namespace } = suspense;
|
|
9298
9541
|
triggerEvent(vnode, "onFallback");
|
|
9299
9542
|
const anchor = next(activeBranch);
|
|
9300
9543
|
const mountFallback = () => {
|
|
9301
9544
|
suspense.isFallbackMountPending = false;
|
|
9302
|
-
if (!suspense.isInFallback) return;
|
|
9545
|
+
if (suspense.isUnmounted || !suspense.isInFallback) return;
|
|
9303
9546
|
const latestFallback = suspense.vnode.ssFallback;
|
|
9304
9547
|
patch(null, latestFallback, container, anchor, parentComponent, null, namespace, slotScopeIds, optimized);
|
|
9305
9548
|
setActiveBranch(suspense, latestFallback);
|
|
@@ -9323,24 +9566,52 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|
|
9323
9566
|
registerDep(instance, onResolve) {
|
|
9324
9567
|
const isInPendingSuspense = !!suspense.pendingBranch;
|
|
9325
9568
|
if (isInPendingSuspense) suspense.deps++;
|
|
9569
|
+
const render = (setupResult) => {
|
|
9570
|
+
instance.asyncResolved = true;
|
|
9571
|
+
onResolve(setupResult);
|
|
9572
|
+
};
|
|
9326
9573
|
instance.asyncDep.catch((err) => {
|
|
9327
|
-
handleError(err, instance, 0);
|
|
9574
|
+
handleError(err, instance, 0, false, true);
|
|
9575
|
+
return () => null;
|
|
9328
9576
|
}).then((asyncSetupResult) => {
|
|
9329
|
-
if (instance.isUnmounted || suspense.isUnmounted
|
|
9577
|
+
if (instance.isUnmounted || suspense.isUnmounted) return;
|
|
9578
|
+
const isPendingDep = isInPendingSuspense && suspense.pendingId === instance.suspenseId;
|
|
9330
9579
|
setCurrentInstance(null, void 0);
|
|
9331
9580
|
if (!instance.scope.active) {
|
|
9332
|
-
if (
|
|
9581
|
+
if (isPendingDep && --suspense.deps === 0) suspense.resolve();
|
|
9333
9582
|
return;
|
|
9334
9583
|
}
|
|
9335
|
-
|
|
9336
|
-
|
|
9337
|
-
|
|
9584
|
+
if (!isPendingDep && suspense.pendingBranch) {
|
|
9585
|
+
const job = () => {
|
|
9586
|
+
if (instance.isUnmounted || suspense.isUnmounted || !instance.scope.active) return;
|
|
9587
|
+
if (suspense.pendingBranch) queueEffectWithSuspense(job, void 0, suspense);
|
|
9588
|
+
else render(asyncSetupResult);
|
|
9589
|
+
};
|
|
9590
|
+
job.flags = 24;
|
|
9591
|
+
queueEffectWithSuspense(job, void 0, suspense);
|
|
9592
|
+
return;
|
|
9593
|
+
}
|
|
9594
|
+
render(asyncSetupResult);
|
|
9595
|
+
if (isPendingDep && --suspense.deps === 0) suspense.resolve();
|
|
9338
9596
|
});
|
|
9339
9597
|
},
|
|
9340
9598
|
unmount(parentSuspense, doRemove) {
|
|
9341
9599
|
suspense.isUnmounted = true;
|
|
9600
|
+
clearTimeout(suspense.timeoutTimer);
|
|
9601
|
+
suspense.timeoutTimer = void 0;
|
|
9602
|
+
if (parentSuspenseId !== void 0) {
|
|
9603
|
+
const parent = suspense.parent;
|
|
9604
|
+
const pendingId = parentSuspenseId;
|
|
9605
|
+
parentSuspenseId = void 0;
|
|
9606
|
+
queuePostFlushCb(() => {
|
|
9607
|
+
if (parent.pendingId === pendingId && !parent.isUnmounted && --parent.deps === 0) parent.resolve();
|
|
9608
|
+
});
|
|
9609
|
+
}
|
|
9342
9610
|
if (suspense.activeBranch) unmount(suspense.activeBranch, parentComponent, parentSuspense, doRemove);
|
|
9343
|
-
if (suspense.pendingBranch)
|
|
9611
|
+
if (suspense.pendingBranch) {
|
|
9612
|
+
unmount(suspense.pendingBranch, parentComponent, suspense, doRemove);
|
|
9613
|
+
discardEffects(suspense);
|
|
9614
|
+
}
|
|
9344
9615
|
}
|
|
9345
9616
|
};
|
|
9346
9617
|
return suspense;
|
|
@@ -9381,6 +9652,14 @@ function normalizeSuspenseSlot(s) {
|
|
|
9381
9652
|
if (block && !s.dynamicChildren) s.dynamicChildren = block.filter((c) => c !== s);
|
|
9382
9653
|
return s;
|
|
9383
9654
|
}
|
|
9655
|
+
function discardEffects(suspense) {
|
|
9656
|
+
const { effects } = suspense;
|
|
9657
|
+
for (let i = 0; i < effects.length; i++) {
|
|
9658
|
+
const effect = effects[i];
|
|
9659
|
+
if (effect.flags & 8) queuePostFlushCb(effect);
|
|
9660
|
+
}
|
|
9661
|
+
effects.length = 0;
|
|
9662
|
+
}
|
|
9384
9663
|
function queueEffectWithSuspense(fn, id, suspense) {
|
|
9385
9664
|
if (suspense && suspense.pendingBranch) {
|
|
9386
9665
|
if (isArray(fn)) suspense.effects.push(...fn);
|
|
@@ -9648,7 +9927,8 @@ function _createVNode(type, props = null, children = null, patchFlag = 0, dynami
|
|
|
9648
9927
|
}
|
|
9649
9928
|
function guardReactiveProps(props) {
|
|
9650
9929
|
if (!props) return null;
|
|
9651
|
-
|
|
9930
|
+
if (/* @__PURE__ */ isProxy(props)) return extend({}, props);
|
|
9931
|
+
return isInternalObject(props) ? extend({}, props[rawAttrsKey] || props) : props;
|
|
9652
9932
|
}
|
|
9653
9933
|
function cloneVNode(vnode, extraProps, mergeRef = false, cloneTransition = false) {
|
|
9654
9934
|
const { props, ref, patchFlag, children, transition } = vnode;
|
|
@@ -9762,6 +10042,17 @@ function normalizeVNode(child) {
|
|
|
9762
10042
|
function cloneIfMounted(child) {
|
|
9763
10043
|
return child.el === null && child.patchFlag !== -1 || child.memo ? child : cloneVNode(child);
|
|
9764
10044
|
}
|
|
10045
|
+
let deferElementSlots = false;
|
|
10046
|
+
/**
|
|
10047
|
+
* While enabled, compiled default slots passed as children of plain elements
|
|
10048
|
+
* are kept on the vnode so the server renderer can render them in push mode.
|
|
10049
|
+
* @internal
|
|
10050
|
+
*/
|
|
10051
|
+
function setDeferElementSlots(value) {
|
|
10052
|
+
const prev = deferElementSlots;
|
|
10053
|
+
deferElementSlots = value;
|
|
10054
|
+
return prev;
|
|
10055
|
+
}
|
|
9765
10056
|
function normalizeChildren(vnode, children) {
|
|
9766
10057
|
let type = 0;
|
|
9767
10058
|
const { shapeFlag } = vnode;
|
|
@@ -9770,6 +10061,11 @@ function normalizeChildren(vnode, children) {
|
|
|
9770
10061
|
else if (typeof children === "object") {
|
|
9771
10062
|
if (shapeFlag & 65) {
|
|
9772
10063
|
const slot = children.default;
|
|
10064
|
+
if (deferElementSlots && slot && slot._c && shapeFlag & 1) {
|
|
10065
|
+
vnode.children = children;
|
|
10066
|
+
vnode.shapeFlag |= 32;
|
|
10067
|
+
return;
|
|
10068
|
+
}
|
|
9773
10069
|
if (slot) {
|
|
9774
10070
|
slot._c && (slot._d = false);
|
|
9775
10071
|
normalizeChildren(vnode, slot());
|
|
@@ -10053,7 +10349,8 @@ function setupStatefulComponent(instance, isSSR) {
|
|
|
10053
10349
|
setInSSRSetupState(false);
|
|
10054
10350
|
}
|
|
10055
10351
|
}).catch((e) => {
|
|
10056
|
-
handleError(e, instance, 0);
|
|
10352
|
+
handleError(e, instance, 0, void 0, true);
|
|
10353
|
+
instance.ssrRender = (_, push) => push("<!---->");
|
|
10057
10354
|
});
|
|
10058
10355
|
else {
|
|
10059
10356
|
instance.asyncDep = setupResult;
|
|
@@ -10128,11 +10425,16 @@ function finishComponentSetup(instance, isSSR, skipOptions) {
|
|
|
10128
10425
|
else warn$1(`Component is missing template or render function: `, Component);
|
|
10129
10426
|
}
|
|
10130
10427
|
}
|
|
10428
|
+
/**
|
|
10429
|
+
* Read through the setup context `attrs` proxy to get the raw attrs object.
|
|
10430
|
+
* @internal
|
|
10431
|
+
*/
|
|
10432
|
+
const rawAttrsKey = Symbol();
|
|
10131
10433
|
const attrsProxyHandlers = !!(process.env.NODE_ENV !== "production") ? {
|
|
10132
10434
|
get(target, key) {
|
|
10133
10435
|
markAttrsAccessed();
|
|
10134
10436
|
track(target, "get", "");
|
|
10135
|
-
return target[key];
|
|
10437
|
+
return key === rawAttrsKey ? target : target[key];
|
|
10136
10438
|
},
|
|
10137
10439
|
set() {
|
|
10138
10440
|
warn$1(`setupContext.attrs is readonly.`);
|
|
@@ -10144,7 +10446,7 @@ const attrsProxyHandlers = !!(process.env.NODE_ENV !== "production") ? {
|
|
|
10144
10446
|
}
|
|
10145
10447
|
} : { get(target, key) {
|
|
10146
10448
|
track(target, "get", "");
|
|
10147
|
-
return target[key];
|
|
10449
|
+
return key === rawAttrsKey ? target : target[key];
|
|
10148
10450
|
} };
|
|
10149
10451
|
/**
|
|
10150
10452
|
* Dev-only
|
|
@@ -10440,7 +10742,7 @@ function isMemoSame(cached, memo) {
|
|
|
10440
10742
|
}
|
|
10441
10743
|
//#endregion
|
|
10442
10744
|
//#region packages/runtime-core/src/index.ts
|
|
10443
|
-
const version = "3.6.0-rc.
|
|
10745
|
+
const version = "3.6.0-rc.15";
|
|
10444
10746
|
const warn = !!(process.env.NODE_ENV !== "production") ? warn$1 : NOOP;
|
|
10445
10747
|
/**
|
|
10446
10748
|
* Runtime error messages. Only exposed in dev or esm builds.
|
|
@@ -10466,7 +10768,8 @@ const ssrUtils = {
|
|
|
10466
10768
|
popWarningContext,
|
|
10467
10769
|
VaporSlot,
|
|
10468
10770
|
rawVaporSlotKey,
|
|
10469
|
-
invokeSlotFallback
|
|
10771
|
+
invokeSlotFallback,
|
|
10772
|
+
setDeferElementSlots
|
|
10470
10773
|
};
|
|
10471
10774
|
/**
|
|
10472
10775
|
* @internal only exposed in compat builds
|
|
@@ -11332,7 +11635,7 @@ var VueElementBase = class VueElementBase extends BaseClass {
|
|
|
11332
11635
|
}
|
|
11333
11636
|
this._styleAnchors.delete(this._def);
|
|
11334
11637
|
this._applyStyles(newStyles);
|
|
11335
|
-
|
|
11638
|
+
this._instance = null;
|
|
11336
11639
|
this._update();
|
|
11337
11640
|
};
|
|
11338
11641
|
const dispatch = (event, args) => {
|
|
@@ -11953,15 +12256,15 @@ const vModelSelect = {
|
|
|
11953
12256
|
vModelSelectInit(el, value, number);
|
|
11954
12257
|
el[assignKey] = getModelAssigner(vnode);
|
|
11955
12258
|
},
|
|
11956
|
-
mounted(el, { value }) {
|
|
11957
|
-
vModelSetSelected(el, value);
|
|
12259
|
+
mounted(el, { value, modifiers: { number } }) {
|
|
12260
|
+
vModelSetSelected(el, value, number);
|
|
11958
12261
|
},
|
|
11959
12262
|
beforeUpdate(el, { value }, vnode) {
|
|
11960
12263
|
el._modelValue = value;
|
|
11961
12264
|
el[assignKey] = getModelAssigner(vnode);
|
|
11962
12265
|
},
|
|
11963
|
-
updated(el, { value }) {
|
|
11964
|
-
vModelSetSelected(el, value);
|
|
12266
|
+
updated(el, { value, modifiers: { number } }) {
|
|
12267
|
+
vModelSetSelected(el, value, number);
|
|
11965
12268
|
}
|
|
11966
12269
|
};
|
|
11967
12270
|
/**
|
|
@@ -11996,14 +12299,14 @@ function isSameSelectValue(value, assignedValue, multiple) {
|
|
|
11996
12299
|
/**
|
|
11997
12300
|
* @internal
|
|
11998
12301
|
*/
|
|
11999
|
-
const vModelSetSelected = (el, value) => {
|
|
12302
|
+
const vModelSetSelected = (el, value, number = false) => {
|
|
12000
12303
|
el._modelValue = value;
|
|
12001
12304
|
const pending = el._pendingValue;
|
|
12002
12305
|
el._pendingValue = void 0;
|
|
12003
12306
|
if (pending && pending[0] === el.multiple && isSameSelectValue(value, pending[1], pending[0])) return;
|
|
12004
|
-
setSelected(el, value);
|
|
12307
|
+
setSelected(el, value, number);
|
|
12005
12308
|
};
|
|
12006
|
-
function setSelected(el, value) {
|
|
12309
|
+
function setSelected(el, value, number) {
|
|
12007
12310
|
const isMultiple = el.multiple;
|
|
12008
12311
|
const isArrayValue = isArray(value);
|
|
12009
12312
|
if (isMultiple && !isArrayValue && !isSet(value)) {
|
|
@@ -12018,7 +12321,7 @@ function setSelected(el, value) {
|
|
|
12018
12321
|
const optionType = typeof optionValue;
|
|
12019
12322
|
if (optionType === "string" || optionType === "number") option.selected = value.some((v) => String(v) === String(optionValue));
|
|
12020
12323
|
else option.selected = looseIndexOf(value, optionValue) > -1;
|
|
12021
|
-
} else option.selected = value.has(optionValue);
|
|
12324
|
+
} else option.selected = value.has(optionValue) || number && typeof optionValue === "string" && value.has(looseToNumber(optionValue));
|
|
12022
12325
|
} else if (looseEqual(getValue(option), value)) {
|
|
12023
12326
|
if (el.selectedIndex !== i) el.selectedIndex = i;
|
|
12024
12327
|
return;
|
|
@@ -12202,6 +12505,7 @@ var src_exports = /* @__PURE__ */ __exportAll({
|
|
|
12202
12505
|
capitalize: () => capitalize,
|
|
12203
12506
|
checkTransitionMode: () => checkTransitionMode,
|
|
12204
12507
|
cloneVNode: () => cloneVNode,
|
|
12508
|
+
collectDeferredEnters: () => collectDeferredEnters,
|
|
12205
12509
|
compatUtils: () => compatUtils,
|
|
12206
12510
|
computed: () => computed,
|
|
12207
12511
|
createApp: () => createApp,
|
|
@@ -14371,7 +14675,11 @@ function getLoc(start, end) {
|
|
|
14371
14675
|
};
|
|
14372
14676
|
}
|
|
14373
14677
|
function cloneLoc(loc) {
|
|
14374
|
-
return
|
|
14678
|
+
return {
|
|
14679
|
+
start: extend({}, loc.start),
|
|
14680
|
+
end: extend({}, loc.end),
|
|
14681
|
+
source: loc.source
|
|
14682
|
+
};
|
|
14375
14683
|
}
|
|
14376
14684
|
function setLocEnd(loc, end) {
|
|
14377
14685
|
loc.end = tokenizer.getPos(end);
|
|
@@ -17015,4 +17323,4 @@ Vue.compile = compileToFunction;
|
|
|
17015
17323
|
var esm_index_default = Vue;
|
|
17016
17324
|
const configureCompat = Vue.configureCompat;
|
|
17017
17325
|
//#endregion
|
|
17018
|
-
export { BaseTransition, BaseTransitionPropsValidators, Comment, DeprecationTypes, EffectScope, ErrorCodes, ErrorTypeStrings, Fragment, KeepAlive, MismatchTypes, MoveType, NULL_DYNAMIC_COMPONENT, ReactiveEffect, SchedulerJobFlags, Static, Suspense, Teleport, Text, TrackOpTypes, Transition, TransitionGroup, TransitionPropsValidators, TriggerOpTypes, VaporSlot, VueElement, VueElementBase, activate, assertNumber, baseApplyTranslation, baseEmit, baseNormalizePropsOptions, baseResolveTransitionHooks, callPendingCbs, callWithAsyncErrorHandling, callWithErrorHandling, camelize, capitalize, checkTransitionMode, cloneVNode, compatUtils, computed, configureCompat, createApp, createAppAPI, createAsyncComponentContext, createBlock, createCanSetSetupRefChecker, createCommentVNode, createElementBlock, createBaseVNode as createElementVNode, createHydrationRenderer, createInternalObject, createPropsRestProxy, createRenderer, createSSRApp, createSlots, createStaticVNode, createTextVNode, createVNode, currentInstance, customRef, deactivate, esm_index_default as default, defaultPropGetter, defineAsyncComponent, defineComponent, defineCustomElement, defineEmits, defineExpose, defineModel, defineOptions, defineProps, defineSSRCustomElement, defineSlots, devtools, devtoolsComponentAdded, devtoolsComponentRemoved, effect, effectScope, endMeasure, ensureHydrationRenderer, ensureRenderer, ensureValidVNode, enterCbKey, expose, filterModelListeners, filterSingleRoot, flushOnAppMount, forceReflow, getAttributeMismatch, getComponentName, getContainerType, getCurrentInstance, getCurrentScope, getCurrentWatcher, getFunctionalFallthrough, getInheritedScopeIds, getNextUid, getOrigins as getTransitionGroupOrigins, getPosition as getTransitionGroupPosition, getOriginShift as getTransitionGroupShift, getTransitionRawChildren, guardReactiveProps, h, handleError, handleMovedChildren, hasCSSTransform, hasInjectionContext, hydrate, hydrateOnIdle, hydrateOnInteraction, hydrateOnMediaQuery, hydrateOnVisible, initCustomFormatter, initDirectivesForSSR, initFeatureFlags, inject, invalidateMount, invokeDirectiveHook, invokeSlotFallback, invokeVNodeHook, isAsyncWrapper, isEmitListener, isFunctionalFallthroughKey, isHydrating, isHydratingEnabled, isKeepAlive, isKeepAliveEnabled, isMapEqual, isMemoSame, isMismatchAllowed, isProxy, isReactive, isReadonly, isRef, isRuntimeOnly, isSetEqual, isShallow, isSuspenseEnabled, isTeleportDeferred, isTeleportDisabled, isTemplateNode, isTemplateRefKey, isTransitionEnabled, isUnchangedResourceProp, isVNode, isValidHtmlOrSvgAttribute, isVaporInteropEnabled, knownTemplateRefs, leaveCbKey, logMismatchError, markAsyncBoundary, markRaw, matches, mergeDefaults, mergeModels, mergeProps, nextTick, nextUid, nodeOps, normalizeClass, normalizeContainer, normalizeProps, normalizeRef, normalizeStyle, normalizeVNode, onActivated, onBeforeMount, onBeforeUnmount, onBeforeUpdate, onDeactivated, onErrorCaptured, onMounted, onRenderTracked, onRenderTriggered, onScopeDispose, onServerPrefetch, onUnmounted, onUpdated, onWatcherCleanup, openBlock, parseEventName, patchClass, patchProp, patchStyle, pendingGroups as pendingTransitionGroups, performAsyncHydrate, performTransitionEnter, performTransitionLeave, popScopeId, popWarningContext, prepareTransitionLeave, prepareTransitionSwitch, provide, proxyRefs, pushScopeId, pushWarningContext, queueJob, queuePostFlushCb, queuePostRenderEffect, rawVaporSlotKey, reactive, readonly, ref, registerHMR, registerRuntimeCompiler, render, renderList, renderSlot, resetShapeFlag, resolveComponent, resolveCssVars, resolveDirective, resolveDynamicComponent, resolveFilter, resolvePropValue, resolveTarget as resolveTeleportTarget, resolveTransitionChild, resolveTransitionHooks, resolveTransitionProps, restoreCurrentInstance, setBlockTracking, setCurrentInstance, setCurrentRenderingInstance, setDevtoolsHook, setIsHydratingEnabled, setRef, setTransitionHooks, setVaporInteropEnabled, setVarsOnNode, shallowReactive, shallowReadonly, shallowRef, shouldSetAsProp, shouldSetAsPropForVueCE, shouldUpdateComponent, simpleSetCurrentInstance, ssrContextKey, ssrUtils, startMeasure, stop, svgNS, toClassSet, toDisplayString, toHandlerKey, toHandlers, toRaw, toRef, toRefs, toStyleMap, toValue, transformVNodeArgs, triggerRef, unref, unregisterHMR, unsafeToTrustedHTML, useAsyncComponentState, useAttrs, useCssModule, useCssVars, useHost, useId, useInstanceOption, useModel, useSSRContext, useShadowRoot, useSlots, useTemplateRef, useTransitionState, vModelCheckbox, vModelCheckboxInit, vModelCheckboxUpdate, vModelDynamic, getValue as vModelGetValue, vModelRadio, vModelSelect, vModelSelectInit, vModelSetSelected, vModelText, vModelTextInit, vModelTextUpdate, vShow, vShowHidden, vShowOriginalDisplay, validateComponentName, validateProps, version, warn, warnExtraneousAttributes, warnPropMismatch, watch, watchEffect, watchPostEffect, watchSyncEffect, withAsyncContext, withCtx, withDefaults, withDirectives, withKeepAliveEnabled, withKeys, withMemo, withModifiers, withScopeId, withSuspenseEnabled, withTransitionEnabled, xlinkNS };
|
|
17326
|
+
export { BaseTransition, BaseTransitionPropsValidators, Comment, DeprecationTypes, EffectScope, ErrorCodes, ErrorTypeStrings, Fragment, KeepAlive, MismatchTypes, MoveType, NULL_DYNAMIC_COMPONENT, ReactiveEffect, SchedulerJobFlags, Static, Suspense, Teleport, Text, TrackOpTypes, Transition, TransitionGroup, TransitionPropsValidators, TriggerOpTypes, VaporSlot, VueElement, VueElementBase, activate, assertNumber, baseApplyTranslation, baseEmit, baseNormalizePropsOptions, baseResolveTransitionHooks, callPendingCbs, callWithAsyncErrorHandling, callWithErrorHandling, camelize, capitalize, checkTransitionMode, cloneVNode, collectDeferredEnters, compatUtils, computed, configureCompat, createApp, createAppAPI, createAsyncComponentContext, createBlock, createCanSetSetupRefChecker, createCommentVNode, createElementBlock, createBaseVNode as createElementVNode, createHydrationRenderer, createInternalObject, createPropsRestProxy, createRenderer, createSSRApp, createSlots, createStaticVNode, createTextVNode, createVNode, currentInstance, customRef, deactivate, esm_index_default as default, defaultPropGetter, defineAsyncComponent, defineComponent, defineCustomElement, defineEmits, defineExpose, defineModel, defineOptions, defineProps, defineSSRCustomElement, defineSlots, devtools, devtoolsComponentAdded, devtoolsComponentRemoved, effect, effectScope, endMeasure, ensureHydrationRenderer, ensureRenderer, ensureValidVNode, enterCbKey, expose, filterModelListeners, filterSingleRoot, flushOnAppMount, forceReflow, getAttributeMismatch, getComponentName, getContainerType, getCurrentInstance, getCurrentScope, getCurrentWatcher, getFunctionalFallthrough, getInheritedScopeIds, getNextUid, getOrigins as getTransitionGroupOrigins, getPosition as getTransitionGroupPosition, getOriginShift as getTransitionGroupShift, getTransitionRawChildren, guardReactiveProps, h, handleError, handleMovedChildren, hasCSSTransform, hasInjectionContext, hydrate, hydrateOnIdle, hydrateOnInteraction, hydrateOnMediaQuery, hydrateOnVisible, initCustomFormatter, initDirectivesForSSR, initFeatureFlags, inject, invalidateMount, invokeDirectiveHook, invokeSlotFallback, invokeVNodeHook, isAsyncWrapper, isEmitListener, isFunctionalFallthroughKey, isHydrating, isHydratingEnabled, isKeepAlive, isKeepAliveEnabled, isMapEqual, isMemoSame, isMismatchAllowed, isProxy, isReactive, isReadonly, isRef, isRuntimeOnly, isSetEqual, isShallow, isSuspenseEnabled, isTeleportDeferred, isTeleportDisabled, isTemplateNode, isTemplateRefKey, isTransitionEnabled, isUnchangedResourceProp, isVNode, isValidHtmlOrSvgAttribute, isVaporInteropEnabled, knownTemplateRefs, leaveCbKey, logMismatchError, markAsyncBoundary, markRaw, matches, mergeDefaults, mergeModels, mergeProps, nextTick, nextUid, nodeOps, normalizeClass, normalizeContainer, normalizeProps, normalizeRef, normalizeStyle, normalizeVNode, onActivated, onBeforeMount, onBeforeUnmount, onBeforeUpdate, onDeactivated, onErrorCaptured, onMounted, onRenderTracked, onRenderTriggered, onScopeDispose, onServerPrefetch, onUnmounted, onUpdated, onWatcherCleanup, openBlock, parseEventName, patchClass, patchProp, patchStyle, pendingGroups as pendingTransitionGroups, performAsyncHydrate, performTransitionEnter, performTransitionLeave, popScopeId, popWarningContext, prepareTransitionLeave, prepareTransitionSwitch, provide, proxyRefs, pushScopeId, pushWarningContext, queueJob, queuePostFlushCb, queuePostRenderEffect, rawVaporSlotKey, reactive, readonly, ref, registerHMR, registerRuntimeCompiler, render, renderList, renderSlot, resetShapeFlag, resolveComponent, resolveCssVars, resolveDirective, resolveDynamicComponent, resolveFilter, resolvePropValue, resolveTarget as resolveTeleportTarget, resolveTransitionChild, resolveTransitionHooks, resolveTransitionProps, restoreCurrentInstance, setBlockTracking, setCurrentInstance, setCurrentRenderingInstance, setDevtoolsHook, setIsHydratingEnabled, setRef, setTransitionHooks, setVaporInteropEnabled, setVarsOnNode, shallowReactive, shallowReadonly, shallowRef, shouldSetAsProp, shouldSetAsPropForVueCE, shouldUpdateComponent, simpleSetCurrentInstance, ssrContextKey, ssrUtils, startMeasure, stop, svgNS, toClassSet, toDisplayString, toHandlerKey, toHandlers, toRaw, toRef, toRefs, toStyleMap, toValue, transformVNodeArgs, triggerRef, unref, unregisterHMR, unsafeToTrustedHTML, useAsyncComponentState, useAttrs, useCssModule, useCssVars, useHost, useId, useInstanceOption, useModel, useSSRContext, useShadowRoot, useSlots, useTemplateRef, useTransitionState, vModelCheckbox, vModelCheckboxInit, vModelCheckboxUpdate, vModelDynamic, getValue as vModelGetValue, vModelRadio, vModelSelect, vModelSelectInit, vModelSetSelected, vModelText, vModelTextInit, vModelTextUpdate, vShow, vShowHidden, vShowOriginalDisplay, validateComponentName, validateProps, version, warn, warnExtraneousAttributes, warnPropMismatch, watch, watchEffect, watchPostEffect, watchSyncEffect, withAsyncContext, withCtx, withDefaults, withDirectives, withKeepAliveEnabled, withKeys, withMemo, withModifiers, withScopeId, withSuspenseEnabled, withTransitionEnabled, xlinkNS };
|