@vue/compat 3.4.25 → 3.5.0-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/vue.cjs.js +974 -417
- package/dist/vue.cjs.prod.js +765 -403
- package/dist/vue.esm-browser.js +974 -417
- package/dist/vue.esm-browser.prod.js +6 -6
- package/dist/vue.esm-bundler.js +986 -419
- package/dist/vue.global.js +974 -417
- package/dist/vue.global.prod.js +6 -6
- package/dist/vue.runtime.esm-browser.js +799 -416
- package/dist/vue.runtime.esm-browser.prod.js +6 -6
- package/dist/vue.runtime.esm-bundler.js +811 -418
- package/dist/vue.runtime.global.js +799 -416
- package/dist/vue.runtime.global.prod.js +6 -6
- package/package.json +2 -2
package/dist/vue.cjs.prod.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/compat v3.
|
|
2
|
+
* @vue/compat v3.5.0-alpha.1
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -25,7 +25,7 @@ const NO = () => false;
|
|
|
25
25
|
const isOn = (key) => key.charCodeAt(0) === 111 && key.charCodeAt(1) === 110 && // uppercase letter
|
|
26
26
|
(key.charCodeAt(2) > 122 || key.charCodeAt(2) < 97);
|
|
27
27
|
const isModelListener = (key) => key.startsWith("onUpdate:");
|
|
28
|
-
const extend = Object.assign;
|
|
28
|
+
const extend$1 = Object.assign;
|
|
29
29
|
const remove = (arr, el) => {
|
|
30
30
|
const i = arr.indexOf(el);
|
|
31
31
|
if (i > -1) {
|
|
@@ -424,153 +424,271 @@ class EffectScope {
|
|
|
424
424
|
function effectScope(detached) {
|
|
425
425
|
return new EffectScope(detached);
|
|
426
426
|
}
|
|
427
|
-
function recordEffectScope(effect, scope = activeEffectScope) {
|
|
428
|
-
if (scope && scope.active) {
|
|
429
|
-
scope.effects.push(effect);
|
|
430
|
-
}
|
|
431
|
-
}
|
|
432
427
|
function getCurrentScope() {
|
|
433
428
|
return activeEffectScope;
|
|
434
429
|
}
|
|
435
|
-
function onScopeDispose(fn) {
|
|
430
|
+
function onScopeDispose(fn, failSilently = false) {
|
|
436
431
|
if (activeEffectScope) {
|
|
437
432
|
activeEffectScope.cleanups.push(fn);
|
|
438
433
|
}
|
|
439
434
|
}
|
|
440
435
|
|
|
441
|
-
let
|
|
436
|
+
let activeSub;
|
|
442
437
|
class ReactiveEffect {
|
|
443
|
-
constructor(fn
|
|
438
|
+
constructor(fn) {
|
|
444
439
|
this.fn = fn;
|
|
445
|
-
this.trigger = trigger;
|
|
446
|
-
this.scheduler = scheduler;
|
|
447
|
-
this.active = true;
|
|
448
|
-
this.deps = [];
|
|
449
440
|
/**
|
|
450
441
|
* @internal
|
|
451
442
|
*/
|
|
452
|
-
this.
|
|
443
|
+
this.deps = void 0;
|
|
453
444
|
/**
|
|
454
445
|
* @internal
|
|
455
446
|
*/
|
|
456
|
-
this.
|
|
447
|
+
this.depsTail = void 0;
|
|
457
448
|
/**
|
|
458
449
|
* @internal
|
|
459
450
|
*/
|
|
460
|
-
this.
|
|
451
|
+
this.flags = 1 | 4;
|
|
461
452
|
/**
|
|
462
453
|
* @internal
|
|
463
454
|
*/
|
|
464
|
-
this.
|
|
455
|
+
this.nextEffect = void 0;
|
|
465
456
|
/**
|
|
466
457
|
* @internal
|
|
467
458
|
*/
|
|
468
|
-
this.
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
if (this._dirtyLevel === 2 || this._dirtyLevel === 3) {
|
|
473
|
-
this._dirtyLevel = 1;
|
|
474
|
-
pauseTracking();
|
|
475
|
-
for (let i = 0; i < this._depsLength; i++) {
|
|
476
|
-
const dep = this.deps[i];
|
|
477
|
-
if (dep.computed) {
|
|
478
|
-
triggerComputed(dep.computed);
|
|
479
|
-
if (this._dirtyLevel >= 4) {
|
|
480
|
-
break;
|
|
481
|
-
}
|
|
482
|
-
}
|
|
483
|
-
}
|
|
484
|
-
if (this._dirtyLevel === 1) {
|
|
485
|
-
this._dirtyLevel = 0;
|
|
486
|
-
}
|
|
487
|
-
resetTracking();
|
|
459
|
+
this.cleanup = void 0;
|
|
460
|
+
this.scheduler = void 0;
|
|
461
|
+
if (activeEffectScope && activeEffectScope.active) {
|
|
462
|
+
activeEffectScope.effects.push(this);
|
|
488
463
|
}
|
|
489
|
-
return this._dirtyLevel >= 4;
|
|
490
464
|
}
|
|
491
|
-
|
|
492
|
-
|
|
465
|
+
/**
|
|
466
|
+
* @internal
|
|
467
|
+
*/
|
|
468
|
+
notify() {
|
|
469
|
+
if (this.flags & 2 && !(this.flags & 32)) {
|
|
470
|
+
return;
|
|
471
|
+
}
|
|
472
|
+
if (this.flags & 64) {
|
|
473
|
+
return this.trigger();
|
|
474
|
+
}
|
|
475
|
+
if (!(this.flags & 8)) {
|
|
476
|
+
this.flags |= 8;
|
|
477
|
+
this.nextEffect = batchedEffect;
|
|
478
|
+
batchedEffect = this;
|
|
479
|
+
}
|
|
493
480
|
}
|
|
494
481
|
run() {
|
|
495
|
-
this.
|
|
496
|
-
if (!this.active) {
|
|
482
|
+
if (!(this.flags & 1)) {
|
|
497
483
|
return this.fn();
|
|
498
484
|
}
|
|
499
|
-
|
|
500
|
-
|
|
485
|
+
this.flags |= 2;
|
|
486
|
+
cleanupEffect(this);
|
|
487
|
+
prepareDeps(this);
|
|
488
|
+
const prevEffect = activeSub;
|
|
489
|
+
const prevShouldTrack = shouldTrack;
|
|
490
|
+
activeSub = this;
|
|
491
|
+
shouldTrack = true;
|
|
501
492
|
try {
|
|
502
|
-
shouldTrack = true;
|
|
503
|
-
activeEffect = this;
|
|
504
|
-
this._runnings++;
|
|
505
|
-
preCleanupEffect(this);
|
|
506
493
|
return this.fn();
|
|
507
494
|
} finally {
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
495
|
+
cleanupDeps(this);
|
|
496
|
+
activeSub = prevEffect;
|
|
497
|
+
shouldTrack = prevShouldTrack;
|
|
498
|
+
this.flags &= ~2;
|
|
512
499
|
}
|
|
513
500
|
}
|
|
514
501
|
stop() {
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
this
|
|
502
|
+
if (this.flags & 1) {
|
|
503
|
+
for (let link = this.deps; link; link = link.nextDep) {
|
|
504
|
+
removeSub(link);
|
|
505
|
+
}
|
|
506
|
+
this.deps = this.depsTail = void 0;
|
|
507
|
+
cleanupEffect(this);
|
|
508
|
+
this.onStop && this.onStop();
|
|
509
|
+
this.flags &= ~1;
|
|
521
510
|
}
|
|
522
511
|
}
|
|
512
|
+
trigger() {
|
|
513
|
+
if (this.scheduler) {
|
|
514
|
+
this.scheduler();
|
|
515
|
+
} else {
|
|
516
|
+
this.runIfDirty();
|
|
517
|
+
}
|
|
518
|
+
}
|
|
519
|
+
/**
|
|
520
|
+
* @internal
|
|
521
|
+
*/
|
|
522
|
+
runIfDirty() {
|
|
523
|
+
if (isDirty(this)) {
|
|
524
|
+
this.run();
|
|
525
|
+
}
|
|
526
|
+
}
|
|
527
|
+
get dirty() {
|
|
528
|
+
return isDirty(this);
|
|
529
|
+
}
|
|
523
530
|
}
|
|
524
|
-
|
|
525
|
-
|
|
531
|
+
let batchDepth = 0;
|
|
532
|
+
let batchedEffect;
|
|
533
|
+
function startBatch() {
|
|
534
|
+
batchDepth++;
|
|
526
535
|
}
|
|
527
|
-
function
|
|
528
|
-
|
|
529
|
-
|
|
536
|
+
function endBatch() {
|
|
537
|
+
if (batchDepth > 1) {
|
|
538
|
+
batchDepth--;
|
|
539
|
+
return;
|
|
540
|
+
}
|
|
541
|
+
let error;
|
|
542
|
+
while (batchedEffect) {
|
|
543
|
+
let e = batchedEffect;
|
|
544
|
+
batchedEffect = void 0;
|
|
545
|
+
while (e) {
|
|
546
|
+
const next = e.nextEffect;
|
|
547
|
+
e.nextEffect = void 0;
|
|
548
|
+
e.flags &= ~8;
|
|
549
|
+
if (e.flags & 1) {
|
|
550
|
+
try {
|
|
551
|
+
e.trigger();
|
|
552
|
+
} catch (err) {
|
|
553
|
+
if (!error)
|
|
554
|
+
error = err;
|
|
555
|
+
}
|
|
556
|
+
}
|
|
557
|
+
e = next;
|
|
558
|
+
}
|
|
559
|
+
}
|
|
560
|
+
batchDepth--;
|
|
561
|
+
if (error)
|
|
562
|
+
throw error;
|
|
530
563
|
}
|
|
531
|
-
function
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
564
|
+
function prepareDeps(sub) {
|
|
565
|
+
for (let link = sub.deps; link; link = link.nextDep) {
|
|
566
|
+
link.version = -1;
|
|
567
|
+
link.prevActiveLink = link.dep.activeLink;
|
|
568
|
+
link.dep.activeLink = link;
|
|
569
|
+
}
|
|
570
|
+
}
|
|
571
|
+
function cleanupDeps(sub) {
|
|
572
|
+
let head;
|
|
573
|
+
let tail = sub.depsTail;
|
|
574
|
+
for (let link = tail; link; link = link.prevDep) {
|
|
575
|
+
if (link.version === -1) {
|
|
576
|
+
if (link === tail)
|
|
577
|
+
tail = link.prevDep;
|
|
578
|
+
removeSub(link);
|
|
579
|
+
removeDep(link);
|
|
580
|
+
} else {
|
|
581
|
+
head = link;
|
|
535
582
|
}
|
|
536
|
-
|
|
583
|
+
link.dep.activeLink = link.prevActiveLink;
|
|
584
|
+
link.prevActiveLink = void 0;
|
|
537
585
|
}
|
|
586
|
+
sub.deps = head;
|
|
587
|
+
sub.depsTail = tail;
|
|
538
588
|
}
|
|
539
|
-
function
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
589
|
+
function isDirty(sub) {
|
|
590
|
+
for (let link = sub.deps; link; link = link.nextDep) {
|
|
591
|
+
if (link.dep.version !== link.version || link.dep.computed && refreshComputed(link.dep.computed) === false || link.dep.version !== link.version) {
|
|
592
|
+
return true;
|
|
593
|
+
}
|
|
594
|
+
}
|
|
595
|
+
if (sub._dirty) {
|
|
596
|
+
return true;
|
|
597
|
+
}
|
|
598
|
+
return false;
|
|
599
|
+
}
|
|
600
|
+
function refreshComputed(computed) {
|
|
601
|
+
if (computed.flags & 2) {
|
|
602
|
+
return false;
|
|
603
|
+
}
|
|
604
|
+
if (computed.flags & 4 && !(computed.flags & 16)) {
|
|
605
|
+
return;
|
|
606
|
+
}
|
|
607
|
+
computed.flags &= ~16;
|
|
608
|
+
if (computed.globalVersion === globalVersion) {
|
|
609
|
+
return;
|
|
610
|
+
}
|
|
611
|
+
computed.globalVersion = globalVersion;
|
|
612
|
+
const dep = computed.dep;
|
|
613
|
+
computed.flags |= 2;
|
|
614
|
+
if (dep.version > 0 && !computed.isSSR && !isDirty(computed)) {
|
|
615
|
+
computed.flags &= ~2;
|
|
616
|
+
return;
|
|
617
|
+
}
|
|
618
|
+
const prevSub = activeSub;
|
|
619
|
+
const prevShouldTrack = shouldTrack;
|
|
620
|
+
activeSub = computed;
|
|
621
|
+
shouldTrack = true;
|
|
622
|
+
try {
|
|
623
|
+
prepareDeps(computed);
|
|
624
|
+
const value = computed.fn();
|
|
625
|
+
if (dep.version === 0 || hasChanged(value, computed._value)) {
|
|
626
|
+
computed._value = value;
|
|
627
|
+
dep.version++;
|
|
545
628
|
}
|
|
629
|
+
} catch (err) {
|
|
630
|
+
dep.version++;
|
|
631
|
+
throw err;
|
|
632
|
+
} finally {
|
|
633
|
+
activeSub = prevSub;
|
|
634
|
+
shouldTrack = prevShouldTrack;
|
|
635
|
+
cleanupDeps(computed);
|
|
636
|
+
computed.flags &= ~2;
|
|
637
|
+
}
|
|
638
|
+
}
|
|
639
|
+
function removeSub(link) {
|
|
640
|
+
const { dep, prevSub, nextSub } = link;
|
|
641
|
+
if (prevSub) {
|
|
642
|
+
prevSub.nextSub = nextSub;
|
|
643
|
+
link.prevSub = void 0;
|
|
644
|
+
}
|
|
645
|
+
if (nextSub) {
|
|
646
|
+
nextSub.prevSub = prevSub;
|
|
647
|
+
link.nextSub = void 0;
|
|
648
|
+
}
|
|
649
|
+
if (dep.subs === link) {
|
|
650
|
+
dep.subs = prevSub;
|
|
651
|
+
}
|
|
652
|
+
if (!dep.subs && dep.computed) {
|
|
653
|
+
dep.computed.flags &= ~4;
|
|
654
|
+
for (let l = dep.computed.deps; l; l = l.nextDep) {
|
|
655
|
+
removeSub(l);
|
|
656
|
+
}
|
|
657
|
+
}
|
|
658
|
+
}
|
|
659
|
+
function removeDep(link) {
|
|
660
|
+
const { prevDep, nextDep } = link;
|
|
661
|
+
if (prevDep) {
|
|
662
|
+
prevDep.nextDep = nextDep;
|
|
663
|
+
link.prevDep = void 0;
|
|
664
|
+
}
|
|
665
|
+
if (nextDep) {
|
|
666
|
+
nextDep.prevDep = prevDep;
|
|
667
|
+
link.nextDep = void 0;
|
|
546
668
|
}
|
|
547
669
|
}
|
|
548
670
|
function effect(fn, options) {
|
|
549
671
|
if (fn.effect instanceof ReactiveEffect) {
|
|
550
672
|
fn = fn.effect.fn;
|
|
551
673
|
}
|
|
552
|
-
const
|
|
553
|
-
if (_effect.dirty) {
|
|
554
|
-
_effect.run();
|
|
555
|
-
}
|
|
556
|
-
});
|
|
674
|
+
const e = new ReactiveEffect(fn);
|
|
557
675
|
if (options) {
|
|
558
|
-
extend(
|
|
559
|
-
if (options.scope)
|
|
560
|
-
recordEffectScope(_effect, options.scope);
|
|
676
|
+
extend$1(e, options);
|
|
561
677
|
}
|
|
562
|
-
|
|
563
|
-
|
|
678
|
+
try {
|
|
679
|
+
e.run();
|
|
680
|
+
} catch (err) {
|
|
681
|
+
e.stop();
|
|
682
|
+
throw err;
|
|
564
683
|
}
|
|
565
|
-
const runner =
|
|
566
|
-
runner.effect =
|
|
684
|
+
const runner = e.run.bind(e);
|
|
685
|
+
runner.effect = e;
|
|
567
686
|
return runner;
|
|
568
687
|
}
|
|
569
688
|
function stop(runner) {
|
|
570
689
|
runner.effect.stop();
|
|
571
690
|
}
|
|
572
691
|
let shouldTrack = true;
|
|
573
|
-
let pauseScheduleStack = 0;
|
|
574
692
|
const trackStack = [];
|
|
575
693
|
function pauseTracking() {
|
|
576
694
|
trackStack.push(shouldTrack);
|
|
@@ -580,169 +698,374 @@ function resetTracking() {
|
|
|
580
698
|
const last = trackStack.pop();
|
|
581
699
|
shouldTrack = last === void 0 ? true : last;
|
|
582
700
|
}
|
|
583
|
-
function
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
}
|
|
592
|
-
|
|
593
|
-
if (dep.get(effect2) !== effect2._trackId) {
|
|
594
|
-
dep.set(effect2, effect2._trackId);
|
|
595
|
-
const oldDep = effect2.deps[effect2._depsLength];
|
|
596
|
-
if (oldDep !== dep) {
|
|
597
|
-
if (oldDep) {
|
|
598
|
-
cleanupDepEffect(oldDep, effect2);
|
|
599
|
-
}
|
|
600
|
-
effect2.deps[effect2._depsLength++] = dep;
|
|
601
|
-
} else {
|
|
602
|
-
effect2._depsLength++;
|
|
701
|
+
function cleanupEffect(e) {
|
|
702
|
+
const { cleanup } = e;
|
|
703
|
+
e.cleanup = void 0;
|
|
704
|
+
if (cleanup) {
|
|
705
|
+
const prevSub = activeSub;
|
|
706
|
+
activeSub = void 0;
|
|
707
|
+
try {
|
|
708
|
+
cleanup();
|
|
709
|
+
} finally {
|
|
710
|
+
activeSub = prevSub;
|
|
603
711
|
}
|
|
604
712
|
}
|
|
605
713
|
}
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
714
|
+
|
|
715
|
+
let globalVersion = 0;
|
|
716
|
+
class Dep {
|
|
717
|
+
constructor(computed) {
|
|
718
|
+
this.computed = computed;
|
|
719
|
+
this.version = 0;
|
|
720
|
+
/**
|
|
721
|
+
* Link between this dep and the current active effect
|
|
722
|
+
*/
|
|
723
|
+
this.activeLink = void 0;
|
|
724
|
+
/**
|
|
725
|
+
* Doubly linked list representing the subscribing effects (tail)
|
|
726
|
+
*/
|
|
727
|
+
this.subs = void 0;
|
|
728
|
+
}
|
|
729
|
+
track(debugInfo) {
|
|
730
|
+
if (!activeSub || !shouldTrack) {
|
|
731
|
+
return;
|
|
614
732
|
}
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
733
|
+
let link = this.activeLink;
|
|
734
|
+
if (link === void 0 || link.sub !== activeSub) {
|
|
735
|
+
link = this.activeLink = {
|
|
736
|
+
dep: this,
|
|
737
|
+
sub: activeSub,
|
|
738
|
+
version: this.version,
|
|
739
|
+
nextDep: void 0,
|
|
740
|
+
prevDep: void 0,
|
|
741
|
+
nextSub: void 0,
|
|
742
|
+
prevSub: void 0,
|
|
743
|
+
prevActiveLink: void 0
|
|
744
|
+
};
|
|
745
|
+
if (!activeSub.deps) {
|
|
746
|
+
activeSub.deps = activeSub.depsTail = link;
|
|
747
|
+
} else {
|
|
748
|
+
link.prevDep = activeSub.depsTail;
|
|
749
|
+
activeSub.depsTail.nextDep = link;
|
|
750
|
+
activeSub.depsTail = link;
|
|
751
|
+
}
|
|
752
|
+
if (activeSub.flags & 4) {
|
|
753
|
+
addSub(link);
|
|
754
|
+
}
|
|
755
|
+
} else if (link.version === -1) {
|
|
756
|
+
link.version = this.version;
|
|
757
|
+
if (link.nextDep) {
|
|
758
|
+
const next = link.nextDep;
|
|
759
|
+
next.prevDep = link.prevDep;
|
|
760
|
+
if (link.prevDep) {
|
|
761
|
+
link.prevDep.nextDep = next;
|
|
621
762
|
}
|
|
763
|
+
link.prevDep = activeSub.depsTail;
|
|
764
|
+
link.nextDep = void 0;
|
|
765
|
+
activeSub.depsTail.nextDep = link;
|
|
766
|
+
activeSub.depsTail = link;
|
|
767
|
+
if (activeSub.deps === link) {
|
|
768
|
+
activeSub.deps = next;
|
|
769
|
+
}
|
|
770
|
+
}
|
|
771
|
+
}
|
|
772
|
+
return link;
|
|
773
|
+
}
|
|
774
|
+
trigger(debugInfo) {
|
|
775
|
+
this.version++;
|
|
776
|
+
globalVersion++;
|
|
777
|
+
this.notify(debugInfo);
|
|
778
|
+
}
|
|
779
|
+
notify(debugInfo) {
|
|
780
|
+
startBatch();
|
|
781
|
+
try {
|
|
782
|
+
if (false) ;
|
|
783
|
+
for (let link = this.subs; link; link = link.prevSub) {
|
|
784
|
+
link.sub.notify();
|
|
622
785
|
}
|
|
786
|
+
} finally {
|
|
787
|
+
endBatch();
|
|
623
788
|
}
|
|
624
789
|
}
|
|
625
|
-
resetScheduling();
|
|
626
790
|
}
|
|
627
|
-
|
|
628
|
-
const
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
}
|
|
634
|
-
|
|
791
|
+
function addSub(link) {
|
|
792
|
+
const computed = link.dep.computed;
|
|
793
|
+
if (computed && !link.dep.subs) {
|
|
794
|
+
computed.flags |= 4 | 16;
|
|
795
|
+
for (let l = computed.deps; l; l = l.nextDep) {
|
|
796
|
+
addSub(l);
|
|
797
|
+
}
|
|
798
|
+
}
|
|
799
|
+
const currentTail = link.dep.subs;
|
|
800
|
+
if (currentTail !== link) {
|
|
801
|
+
link.prevSub = currentTail;
|
|
802
|
+
if (currentTail)
|
|
803
|
+
currentTail.nextSub = link;
|
|
804
|
+
}
|
|
805
|
+
link.dep.subs = link;
|
|
806
|
+
}
|
|
635
807
|
const targetMap = /* @__PURE__ */ new WeakMap();
|
|
636
808
|
const ITERATE_KEY = Symbol("");
|
|
637
809
|
const MAP_KEY_ITERATE_KEY = Symbol("");
|
|
810
|
+
const ARRAY_ITERATE_KEY = Symbol("");
|
|
638
811
|
function track(target, type, key) {
|
|
639
|
-
if (shouldTrack &&
|
|
812
|
+
if (shouldTrack && activeSub) {
|
|
640
813
|
let depsMap = targetMap.get(target);
|
|
641
814
|
if (!depsMap) {
|
|
642
815
|
targetMap.set(target, depsMap = /* @__PURE__ */ new Map());
|
|
643
816
|
}
|
|
644
817
|
let dep = depsMap.get(key);
|
|
645
818
|
if (!dep) {
|
|
646
|
-
depsMap.set(key, dep =
|
|
819
|
+
depsMap.set(key, dep = new Dep());
|
|
820
|
+
}
|
|
821
|
+
{
|
|
822
|
+
dep.track();
|
|
647
823
|
}
|
|
648
|
-
trackEffect(
|
|
649
|
-
activeEffect,
|
|
650
|
-
dep);
|
|
651
824
|
}
|
|
652
825
|
}
|
|
653
826
|
function trigger(target, type, key, newValue, oldValue, oldTarget) {
|
|
654
827
|
const depsMap = targetMap.get(target);
|
|
655
828
|
if (!depsMap) {
|
|
829
|
+
globalVersion++;
|
|
656
830
|
return;
|
|
657
831
|
}
|
|
658
832
|
let deps = [];
|
|
659
833
|
if (type === "clear") {
|
|
660
834
|
deps = [...depsMap.values()];
|
|
661
|
-
} else if (key === "length" && isArray(target)) {
|
|
662
|
-
const newLength = Number(newValue);
|
|
663
|
-
depsMap.forEach((dep, key2) => {
|
|
664
|
-
if (key2 === "length" || !isSymbol(key2) && key2 >= newLength) {
|
|
665
|
-
deps.push(dep);
|
|
666
|
-
}
|
|
667
|
-
});
|
|
668
835
|
} else {
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
if (!
|
|
675
|
-
deps.push(
|
|
676
|
-
if (isMap(target)) {
|
|
677
|
-
deps.push(depsMap.get(MAP_KEY_ITERATE_KEY));
|
|
678
|
-
}
|
|
679
|
-
} else if (isIntegerKey(key)) {
|
|
680
|
-
deps.push(depsMap.get("length"));
|
|
836
|
+
const targetIsArray = isArray(target);
|
|
837
|
+
const isArrayIndex = targetIsArray && isIntegerKey(key);
|
|
838
|
+
if (targetIsArray && key === "length") {
|
|
839
|
+
const newLength = Number(newValue);
|
|
840
|
+
depsMap.forEach((dep, key2) => {
|
|
841
|
+
if (key2 === "length" || key2 === ARRAY_ITERATE_KEY || !isSymbol(key2) && key2 >= newLength) {
|
|
842
|
+
deps.push(dep);
|
|
681
843
|
}
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
844
|
+
});
|
|
845
|
+
} else {
|
|
846
|
+
const push = (dep) => dep && deps.push(dep);
|
|
847
|
+
if (key !== void 0) {
|
|
848
|
+
push(depsMap.get(key));
|
|
849
|
+
}
|
|
850
|
+
if (isArrayIndex) {
|
|
851
|
+
push(depsMap.get(ARRAY_ITERATE_KEY));
|
|
852
|
+
}
|
|
853
|
+
switch (type) {
|
|
854
|
+
case "add":
|
|
855
|
+
if (!targetIsArray) {
|
|
856
|
+
push(depsMap.get(ITERATE_KEY));
|
|
857
|
+
if (isMap(target)) {
|
|
858
|
+
push(depsMap.get(MAP_KEY_ITERATE_KEY));
|
|
859
|
+
}
|
|
860
|
+
} else if (isArrayIndex) {
|
|
861
|
+
push(depsMap.get("length"));
|
|
862
|
+
}
|
|
863
|
+
break;
|
|
864
|
+
case "delete":
|
|
865
|
+
if (!targetIsArray) {
|
|
866
|
+
push(depsMap.get(ITERATE_KEY));
|
|
867
|
+
if (isMap(target)) {
|
|
868
|
+
push(depsMap.get(MAP_KEY_ITERATE_KEY));
|
|
869
|
+
}
|
|
870
|
+
}
|
|
871
|
+
break;
|
|
872
|
+
case "set":
|
|
686
873
|
if (isMap(target)) {
|
|
687
|
-
|
|
874
|
+
push(depsMap.get(ITERATE_KEY));
|
|
688
875
|
}
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
case "set":
|
|
692
|
-
if (isMap(target)) {
|
|
693
|
-
deps.push(depsMap.get(ITERATE_KEY));
|
|
694
|
-
}
|
|
695
|
-
break;
|
|
876
|
+
break;
|
|
877
|
+
}
|
|
696
878
|
}
|
|
697
879
|
}
|
|
698
|
-
|
|
880
|
+
startBatch();
|
|
699
881
|
for (const dep of deps) {
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
dep,
|
|
703
|
-
4);
|
|
882
|
+
{
|
|
883
|
+
dep.trigger();
|
|
704
884
|
}
|
|
705
885
|
}
|
|
706
|
-
|
|
886
|
+
endBatch();
|
|
707
887
|
}
|
|
708
888
|
function getDepFromReactive(object, key) {
|
|
709
889
|
var _a;
|
|
710
890
|
return (_a = targetMap.get(object)) == null ? void 0 : _a.get(key);
|
|
711
891
|
}
|
|
712
892
|
|
|
893
|
+
function reactiveReadArray(array) {
|
|
894
|
+
const raw = toRaw(array);
|
|
895
|
+
if (raw === array)
|
|
896
|
+
return raw;
|
|
897
|
+
track(raw, "iterate", ARRAY_ITERATE_KEY);
|
|
898
|
+
return isShallow(array) ? raw : raw.map(toReactive);
|
|
899
|
+
}
|
|
900
|
+
function shallowReadArray(arr) {
|
|
901
|
+
track(arr = toRaw(arr), "iterate", ARRAY_ITERATE_KEY);
|
|
902
|
+
return arr;
|
|
903
|
+
}
|
|
904
|
+
const arrayInstrumentations = {
|
|
905
|
+
__proto__: null,
|
|
906
|
+
[Symbol.iterator]() {
|
|
907
|
+
return iterator(this, Symbol.iterator, toReactive);
|
|
908
|
+
},
|
|
909
|
+
concat(...args) {
|
|
910
|
+
return reactiveReadArray(this).concat(
|
|
911
|
+
...args.map((x) => reactiveReadArray(x))
|
|
912
|
+
);
|
|
913
|
+
},
|
|
914
|
+
entries() {
|
|
915
|
+
return iterator(this, "entries", (value) => {
|
|
916
|
+
value[1] = toReactive(value[1]);
|
|
917
|
+
return value;
|
|
918
|
+
});
|
|
919
|
+
},
|
|
920
|
+
every(fn, thisArg) {
|
|
921
|
+
return apply(this, "every", fn, thisArg);
|
|
922
|
+
},
|
|
923
|
+
filter(fn, thisArg) {
|
|
924
|
+
const result = apply(this, "filter", fn, thisArg);
|
|
925
|
+
return isProxy(this) && !isShallow(this) ? result.map(toReactive) : result;
|
|
926
|
+
},
|
|
927
|
+
find(fn, thisArg) {
|
|
928
|
+
const result = apply(this, "find", fn, thisArg);
|
|
929
|
+
return isProxy(this) && !isShallow(this) ? toReactive(result) : result;
|
|
930
|
+
},
|
|
931
|
+
findIndex(fn, thisArg) {
|
|
932
|
+
return apply(this, "findIndex", fn, thisArg);
|
|
933
|
+
},
|
|
934
|
+
findLast(fn, thisArg) {
|
|
935
|
+
const result = apply(this, "findLast", fn, thisArg);
|
|
936
|
+
return isProxy(this) && !isShallow(this) ? toReactive(result) : result;
|
|
937
|
+
},
|
|
938
|
+
findLastIndex(fn, thisArg) {
|
|
939
|
+
return apply(this, "findLastIndex", fn, thisArg);
|
|
940
|
+
},
|
|
941
|
+
// flat, flatMap could benefit from ARRAY_ITERATE but are not straight-forward to implement
|
|
942
|
+
forEach(fn, thisArg) {
|
|
943
|
+
return apply(this, "forEach", fn, thisArg);
|
|
944
|
+
},
|
|
945
|
+
includes(...args) {
|
|
946
|
+
return searchProxy(this, "includes", args);
|
|
947
|
+
},
|
|
948
|
+
indexOf(...args) {
|
|
949
|
+
return searchProxy(this, "indexOf", args);
|
|
950
|
+
},
|
|
951
|
+
join(separator) {
|
|
952
|
+
return reactiveReadArray(this).join(separator);
|
|
953
|
+
},
|
|
954
|
+
// keys() iterator only reads `length`, no optimisation required
|
|
955
|
+
lastIndexOf(...args) {
|
|
956
|
+
return searchProxy(this, "lastIndexOf", args);
|
|
957
|
+
},
|
|
958
|
+
map(fn, thisArg) {
|
|
959
|
+
return apply(this, "map", fn, thisArg);
|
|
960
|
+
},
|
|
961
|
+
pop() {
|
|
962
|
+
return noTracking(this, "pop");
|
|
963
|
+
},
|
|
964
|
+
push(...args) {
|
|
965
|
+
return noTracking(this, "push", args);
|
|
966
|
+
},
|
|
967
|
+
reduce(fn, ...args) {
|
|
968
|
+
return reduce(this, "reduce", fn, args);
|
|
969
|
+
},
|
|
970
|
+
reduceRight(fn, ...args) {
|
|
971
|
+
return reduce(this, "reduceRight", fn, args);
|
|
972
|
+
},
|
|
973
|
+
shift() {
|
|
974
|
+
return noTracking(this, "shift");
|
|
975
|
+
},
|
|
976
|
+
// slice could use ARRAY_ITERATE but also seems to beg for range tracking
|
|
977
|
+
some(fn, thisArg) {
|
|
978
|
+
return apply(this, "some", fn, thisArg);
|
|
979
|
+
},
|
|
980
|
+
splice(...args) {
|
|
981
|
+
return noTracking(this, "splice", args);
|
|
982
|
+
},
|
|
983
|
+
toReversed() {
|
|
984
|
+
return reactiveReadArray(this).toReversed();
|
|
985
|
+
},
|
|
986
|
+
toSorted(comparer) {
|
|
987
|
+
return reactiveReadArray(this).toSorted(comparer);
|
|
988
|
+
},
|
|
989
|
+
toSpliced(...args) {
|
|
990
|
+
return reactiveReadArray(this).toSpliced(...args);
|
|
991
|
+
},
|
|
992
|
+
unshift(...args) {
|
|
993
|
+
return noTracking(this, "unshift", args);
|
|
994
|
+
},
|
|
995
|
+
values() {
|
|
996
|
+
return iterator(this, "values", toReactive);
|
|
997
|
+
}
|
|
998
|
+
};
|
|
999
|
+
function iterator(self, method, wrapValue) {
|
|
1000
|
+
const arr = shallowReadArray(self);
|
|
1001
|
+
const iter = arr[method]();
|
|
1002
|
+
if (arr !== self && !isShallow(self)) {
|
|
1003
|
+
iter._next = iter.next;
|
|
1004
|
+
iter.next = () => {
|
|
1005
|
+
const result = iter._next();
|
|
1006
|
+
if (result.value) {
|
|
1007
|
+
result.value = wrapValue(result.value);
|
|
1008
|
+
}
|
|
1009
|
+
return result;
|
|
1010
|
+
};
|
|
1011
|
+
}
|
|
1012
|
+
return iter;
|
|
1013
|
+
}
|
|
1014
|
+
function apply(self, method, fn, thisArg) {
|
|
1015
|
+
const arr = shallowReadArray(self);
|
|
1016
|
+
let wrappedFn = fn;
|
|
1017
|
+
if (arr !== self) {
|
|
1018
|
+
if (!isShallow(self)) {
|
|
1019
|
+
wrappedFn = function(item, index) {
|
|
1020
|
+
return fn.call(this, toReactive(item), index, self);
|
|
1021
|
+
};
|
|
1022
|
+
} else if (fn.length > 2) {
|
|
1023
|
+
wrappedFn = function(item, index) {
|
|
1024
|
+
return fn.call(this, item, index, self);
|
|
1025
|
+
};
|
|
1026
|
+
}
|
|
1027
|
+
}
|
|
1028
|
+
return arr[method](wrappedFn, thisArg);
|
|
1029
|
+
}
|
|
1030
|
+
function reduce(self, method, fn, args) {
|
|
1031
|
+
const arr = shallowReadArray(self);
|
|
1032
|
+
let wrappedFn = fn;
|
|
1033
|
+
if (arr !== self) {
|
|
1034
|
+
if (!isShallow(self)) {
|
|
1035
|
+
wrappedFn = function(acc, item, index) {
|
|
1036
|
+
return fn.call(this, acc, toReactive(item), index, self);
|
|
1037
|
+
};
|
|
1038
|
+
} else if (fn.length > 3) {
|
|
1039
|
+
wrappedFn = function(acc, item, index) {
|
|
1040
|
+
return fn.call(this, acc, item, index, self);
|
|
1041
|
+
};
|
|
1042
|
+
}
|
|
1043
|
+
}
|
|
1044
|
+
return arr[method](wrappedFn, ...args);
|
|
1045
|
+
}
|
|
1046
|
+
function searchProxy(self, method, args) {
|
|
1047
|
+
const arr = toRaw(self);
|
|
1048
|
+
track(arr, "iterate", ARRAY_ITERATE_KEY);
|
|
1049
|
+
const res = arr[method](...args);
|
|
1050
|
+
if ((res === -1 || res === false) && isProxy(args[0])) {
|
|
1051
|
+
args[0] = toRaw(args[0]);
|
|
1052
|
+
return arr[method](...args);
|
|
1053
|
+
}
|
|
1054
|
+
return res;
|
|
1055
|
+
}
|
|
1056
|
+
function noTracking(self, method, args = []) {
|
|
1057
|
+
pauseTracking();
|
|
1058
|
+
startBatch();
|
|
1059
|
+
const res = toRaw(self)[method].apply(self, args);
|
|
1060
|
+
endBatch();
|
|
1061
|
+
resetTracking();
|
|
1062
|
+
return res;
|
|
1063
|
+
}
|
|
1064
|
+
|
|
713
1065
|
const isNonTrackableKeys = /* @__PURE__ */ makeMap(`__proto__,__v_isRef,__isVue`);
|
|
714
1066
|
const builtInSymbols = new Set(
|
|
715
1067
|
/* @__PURE__ */ Object.getOwnPropertyNames(Symbol).filter((key) => key !== "arguments" && key !== "caller").map((key) => Symbol[key]).filter(isSymbol)
|
|
716
1068
|
);
|
|
717
|
-
const arrayInstrumentations = /* @__PURE__ */ createArrayInstrumentations();
|
|
718
|
-
function createArrayInstrumentations() {
|
|
719
|
-
const instrumentations = {};
|
|
720
|
-
["includes", "indexOf", "lastIndexOf"].forEach((key) => {
|
|
721
|
-
instrumentations[key] = function(...args) {
|
|
722
|
-
const arr = toRaw(this);
|
|
723
|
-
for (let i = 0, l = this.length; i < l; i++) {
|
|
724
|
-
track(arr, "get", i + "");
|
|
725
|
-
}
|
|
726
|
-
const res = arr[key](...args);
|
|
727
|
-
if (res === -1 || res === false) {
|
|
728
|
-
return arr[key](...args.map(toRaw));
|
|
729
|
-
} else {
|
|
730
|
-
return res;
|
|
731
|
-
}
|
|
732
|
-
};
|
|
733
|
-
});
|
|
734
|
-
["push", "pop", "shift", "unshift", "splice"].forEach((key) => {
|
|
735
|
-
instrumentations[key] = function(...args) {
|
|
736
|
-
pauseTracking();
|
|
737
|
-
pauseScheduling();
|
|
738
|
-
const res = toRaw(this)[key].apply(this, args);
|
|
739
|
-
resetScheduling();
|
|
740
|
-
resetTracking();
|
|
741
|
-
return res;
|
|
742
|
-
};
|
|
743
|
-
});
|
|
744
|
-
return instrumentations;
|
|
745
|
-
}
|
|
746
1069
|
function hasOwnProperty(key) {
|
|
747
1070
|
if (!isSymbol(key))
|
|
748
1071
|
key = String(key);
|
|
@@ -773,14 +1096,22 @@ class BaseReactiveHandler {
|
|
|
773
1096
|
}
|
|
774
1097
|
const targetIsArray = isArray(target);
|
|
775
1098
|
if (!isReadonly2) {
|
|
776
|
-
|
|
777
|
-
|
|
1099
|
+
let fn;
|
|
1100
|
+
if (targetIsArray && (fn = arrayInstrumentations[key])) {
|
|
1101
|
+
return fn;
|
|
778
1102
|
}
|
|
779
1103
|
if (key === "hasOwnProperty") {
|
|
780
1104
|
return hasOwnProperty;
|
|
781
1105
|
}
|
|
782
1106
|
}
|
|
783
|
-
const res = Reflect.get(
|
|
1107
|
+
const res = Reflect.get(
|
|
1108
|
+
target,
|
|
1109
|
+
key,
|
|
1110
|
+
// if this is a proxy wrapping a ref, return methods using the raw ref
|
|
1111
|
+
// as receiver so that we don't have to call `toRaw` on the ref in all
|
|
1112
|
+
// its class methods
|
|
1113
|
+
isRef(target) ? target : receiver
|
|
1114
|
+
);
|
|
784
1115
|
if (isSymbol(key) ? builtInSymbols.has(key) : isNonTrackableKeys(key)) {
|
|
785
1116
|
return res;
|
|
786
1117
|
}
|
|
@@ -1243,85 +1574,8 @@ function markRaw(value) {
|
|
|
1243
1574
|
const toReactive = (value) => isObject(value) ? reactive(value) : value;
|
|
1244
1575
|
const toReadonly = (value) => isObject(value) ? readonly(value) : value;
|
|
1245
1576
|
|
|
1246
|
-
class ComputedRefImpl {
|
|
1247
|
-
constructor(getter, _setter, isReadonly, isSSR) {
|
|
1248
|
-
this.getter = getter;
|
|
1249
|
-
this._setter = _setter;
|
|
1250
|
-
this.dep = void 0;
|
|
1251
|
-
this.__v_isRef = true;
|
|
1252
|
-
this["__v_isReadonly"] = false;
|
|
1253
|
-
this.effect = new ReactiveEffect(
|
|
1254
|
-
() => getter(this._value),
|
|
1255
|
-
() => triggerRefValue(
|
|
1256
|
-
this,
|
|
1257
|
-
this.effect._dirtyLevel === 2 ? 2 : 3
|
|
1258
|
-
)
|
|
1259
|
-
);
|
|
1260
|
-
this.effect.computed = this;
|
|
1261
|
-
this.effect.active = this._cacheable = !isSSR;
|
|
1262
|
-
this["__v_isReadonly"] = isReadonly;
|
|
1263
|
-
}
|
|
1264
|
-
get value() {
|
|
1265
|
-
const self = toRaw(this);
|
|
1266
|
-
if ((!self._cacheable || self.effect.dirty) && hasChanged(self._value, self._value = self.effect.run())) {
|
|
1267
|
-
triggerRefValue(self, 4);
|
|
1268
|
-
}
|
|
1269
|
-
trackRefValue(self);
|
|
1270
|
-
if (self.effect._dirtyLevel >= 2) {
|
|
1271
|
-
triggerRefValue(self, 2);
|
|
1272
|
-
}
|
|
1273
|
-
return self._value;
|
|
1274
|
-
}
|
|
1275
|
-
set value(newValue) {
|
|
1276
|
-
this._setter(newValue);
|
|
1277
|
-
}
|
|
1278
|
-
// #region polyfill _dirty for backward compatibility third party code for Vue <= 3.3.x
|
|
1279
|
-
get _dirty() {
|
|
1280
|
-
return this.effect.dirty;
|
|
1281
|
-
}
|
|
1282
|
-
set _dirty(v) {
|
|
1283
|
-
this.effect.dirty = v;
|
|
1284
|
-
}
|
|
1285
|
-
// #endregion
|
|
1286
|
-
}
|
|
1287
|
-
function computed$1(getterOrOptions, debugOptions, isSSR = false) {
|
|
1288
|
-
let getter;
|
|
1289
|
-
let setter;
|
|
1290
|
-
const onlyGetter = isFunction(getterOrOptions);
|
|
1291
|
-
if (onlyGetter) {
|
|
1292
|
-
getter = getterOrOptions;
|
|
1293
|
-
setter = NOOP;
|
|
1294
|
-
} else {
|
|
1295
|
-
getter = getterOrOptions.get;
|
|
1296
|
-
setter = getterOrOptions.set;
|
|
1297
|
-
}
|
|
1298
|
-
const cRef = new ComputedRefImpl(getter, setter, onlyGetter || !setter, isSSR);
|
|
1299
|
-
return cRef;
|
|
1300
|
-
}
|
|
1301
|
-
|
|
1302
|
-
function trackRefValue(ref2) {
|
|
1303
|
-
var _a;
|
|
1304
|
-
if (shouldTrack && activeEffect) {
|
|
1305
|
-
ref2 = toRaw(ref2);
|
|
1306
|
-
trackEffect(
|
|
1307
|
-
activeEffect,
|
|
1308
|
-
(_a = ref2.dep) != null ? _a : ref2.dep = createDep(
|
|
1309
|
-
() => ref2.dep = void 0,
|
|
1310
|
-
ref2 instanceof ComputedRefImpl ? ref2 : void 0
|
|
1311
|
-
));
|
|
1312
|
-
}
|
|
1313
|
-
}
|
|
1314
|
-
function triggerRefValue(ref2, dirtyLevel = 4, newVal) {
|
|
1315
|
-
ref2 = toRaw(ref2);
|
|
1316
|
-
const dep = ref2.dep;
|
|
1317
|
-
if (dep) {
|
|
1318
|
-
triggerEffects(
|
|
1319
|
-
dep,
|
|
1320
|
-
dirtyLevel);
|
|
1321
|
-
}
|
|
1322
|
-
}
|
|
1323
1577
|
function isRef(r) {
|
|
1324
|
-
return
|
|
1578
|
+
return r ? r.__v_isRef === true : false;
|
|
1325
1579
|
}
|
|
1326
1580
|
function ref(value) {
|
|
1327
1581
|
return createRef(value, false);
|
|
@@ -1338,27 +1592,34 @@ function createRef(rawValue, shallow) {
|
|
|
1338
1592
|
class RefImpl {
|
|
1339
1593
|
constructor(value, __v_isShallow) {
|
|
1340
1594
|
this.__v_isShallow = __v_isShallow;
|
|
1341
|
-
this.dep =
|
|
1595
|
+
this.dep = new Dep();
|
|
1342
1596
|
this.__v_isRef = true;
|
|
1343
1597
|
this._rawValue = __v_isShallow ? value : toRaw(value);
|
|
1344
1598
|
this._value = __v_isShallow ? value : toReactive(value);
|
|
1345
1599
|
}
|
|
1346
1600
|
get value() {
|
|
1347
|
-
|
|
1601
|
+
{
|
|
1602
|
+
this.dep.track();
|
|
1603
|
+
}
|
|
1348
1604
|
return this._value;
|
|
1349
1605
|
}
|
|
1350
|
-
set value(
|
|
1351
|
-
const
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
this.
|
|
1356
|
-
|
|
1606
|
+
set value(newValue) {
|
|
1607
|
+
const oldValue = this._rawValue;
|
|
1608
|
+
const useDirectValue = this.__v_isShallow || isShallow(newValue) || isReadonly(newValue);
|
|
1609
|
+
newValue = useDirectValue ? newValue : toRaw(newValue);
|
|
1610
|
+
if (hasChanged(newValue, oldValue)) {
|
|
1611
|
+
this._rawValue = newValue;
|
|
1612
|
+
this._value = useDirectValue ? newValue : toReactive(newValue);
|
|
1613
|
+
{
|
|
1614
|
+
this.dep.trigger();
|
|
1615
|
+
}
|
|
1357
1616
|
}
|
|
1358
1617
|
}
|
|
1359
1618
|
}
|
|
1360
1619
|
function triggerRef(ref2) {
|
|
1361
|
-
|
|
1620
|
+
{
|
|
1621
|
+
ref2.dep.trigger();
|
|
1622
|
+
}
|
|
1362
1623
|
}
|
|
1363
1624
|
function unref(ref2) {
|
|
1364
1625
|
return isRef(ref2) ? ref2.value : ref2;
|
|
@@ -1383,12 +1644,9 @@ function proxyRefs(objectWithRefs) {
|
|
|
1383
1644
|
}
|
|
1384
1645
|
class CustomRefImpl {
|
|
1385
1646
|
constructor(factory) {
|
|
1386
|
-
this.dep = void 0;
|
|
1387
1647
|
this.__v_isRef = true;
|
|
1388
|
-
const
|
|
1389
|
-
|
|
1390
|
-
() => triggerRefValue(this)
|
|
1391
|
-
);
|
|
1648
|
+
const dep = this.dep = new Dep();
|
|
1649
|
+
const { get, set } = factory(dep.track.bind(dep), dep.trigger.bind(dep));
|
|
1392
1650
|
this._get = get;
|
|
1393
1651
|
this._set = set;
|
|
1394
1652
|
}
|
|
@@ -1453,6 +1711,80 @@ function propertyToRef(source, key, defaultValue) {
|
|
|
1453
1711
|
return isRef(val) ? val : new ObjectRefImpl(source, key, defaultValue);
|
|
1454
1712
|
}
|
|
1455
1713
|
|
|
1714
|
+
class ComputedRefImpl {
|
|
1715
|
+
constructor(fn, setter, isSSR) {
|
|
1716
|
+
this.fn = fn;
|
|
1717
|
+
this.setter = setter;
|
|
1718
|
+
/**
|
|
1719
|
+
* @internal
|
|
1720
|
+
*/
|
|
1721
|
+
this._value = void 0;
|
|
1722
|
+
/**
|
|
1723
|
+
* @internal
|
|
1724
|
+
*/
|
|
1725
|
+
this.dep = new Dep(this);
|
|
1726
|
+
/**
|
|
1727
|
+
* @internal
|
|
1728
|
+
*/
|
|
1729
|
+
this.__v_isRef = true;
|
|
1730
|
+
// A computed is also a subscriber that tracks other deps
|
|
1731
|
+
/**
|
|
1732
|
+
* @internal
|
|
1733
|
+
*/
|
|
1734
|
+
this.deps = void 0;
|
|
1735
|
+
/**
|
|
1736
|
+
* @internal
|
|
1737
|
+
*/
|
|
1738
|
+
this.depsTail = void 0;
|
|
1739
|
+
/**
|
|
1740
|
+
* @internal
|
|
1741
|
+
*/
|
|
1742
|
+
this.flags = 16;
|
|
1743
|
+
/**
|
|
1744
|
+
* @internal
|
|
1745
|
+
*/
|
|
1746
|
+
this.globalVersion = globalVersion - 1;
|
|
1747
|
+
// for backwards compat
|
|
1748
|
+
this.effect = this;
|
|
1749
|
+
this.__v_isReadonly = !setter;
|
|
1750
|
+
this.isSSR = isSSR;
|
|
1751
|
+
}
|
|
1752
|
+
/**
|
|
1753
|
+
* @internal
|
|
1754
|
+
*/
|
|
1755
|
+
notify() {
|
|
1756
|
+
if (activeSub !== this) {
|
|
1757
|
+
this.flags |= 16;
|
|
1758
|
+
this.dep.notify();
|
|
1759
|
+
}
|
|
1760
|
+
}
|
|
1761
|
+
get value() {
|
|
1762
|
+
const link = this.dep.track();
|
|
1763
|
+
refreshComputed(this);
|
|
1764
|
+
if (link) {
|
|
1765
|
+
link.version = this.dep.version;
|
|
1766
|
+
}
|
|
1767
|
+
return this._value;
|
|
1768
|
+
}
|
|
1769
|
+
set value(newValue) {
|
|
1770
|
+
if (this.setter) {
|
|
1771
|
+
this.setter(newValue);
|
|
1772
|
+
}
|
|
1773
|
+
}
|
|
1774
|
+
}
|
|
1775
|
+
function computed$1(getterOrOptions, debugOptions, isSSR = false) {
|
|
1776
|
+
let getter;
|
|
1777
|
+
let setter;
|
|
1778
|
+
if (isFunction(getterOrOptions)) {
|
|
1779
|
+
getter = getterOrOptions;
|
|
1780
|
+
} else {
|
|
1781
|
+
getter = getterOrOptions.get;
|
|
1782
|
+
setter = getterOrOptions.set;
|
|
1783
|
+
}
|
|
1784
|
+
const cRef = new ComputedRefImpl(getter, setter, isSSR);
|
|
1785
|
+
return cRef;
|
|
1786
|
+
}
|
|
1787
|
+
|
|
1456
1788
|
const TrackOpTypes = {
|
|
1457
1789
|
"GET": "get",
|
|
1458
1790
|
"HAS": "has",
|
|
@@ -1615,7 +1947,7 @@ function findInsertionIndex(id) {
|
|
|
1615
1947
|
const middle = start + end >>> 1;
|
|
1616
1948
|
const middleJob = queue[middle];
|
|
1617
1949
|
const middleJobId = getId(middleJob);
|
|
1618
|
-
if (middleJobId < id || middleJobId === id && middleJob.
|
|
1950
|
+
if (middleJobId < id || middleJobId === id && middleJob.flags & 2) {
|
|
1619
1951
|
start = middle + 1;
|
|
1620
1952
|
} else {
|
|
1621
1953
|
end = middle;
|
|
@@ -1624,15 +1956,21 @@ function findInsertionIndex(id) {
|
|
|
1624
1956
|
return start;
|
|
1625
1957
|
}
|
|
1626
1958
|
function queueJob(job) {
|
|
1627
|
-
|
|
1628
|
-
|
|
1629
|
-
isFlushing && job.allowRecurse ? flushIndex + 1 : flushIndex
|
|
1630
|
-
)) {
|
|
1959
|
+
var _a;
|
|
1960
|
+
if (!(job.flags & 1)) {
|
|
1631
1961
|
if (job.id == null) {
|
|
1632
1962
|
queue.push(job);
|
|
1963
|
+
} else if (
|
|
1964
|
+
// fast path when the job id is larger than the tail
|
|
1965
|
+
!(job.flags & 2) && job.id >= (((_a = queue[queue.length - 1]) == null ? void 0 : _a.id) || 0)
|
|
1966
|
+
) {
|
|
1967
|
+
queue.push(job);
|
|
1633
1968
|
} else {
|
|
1634
1969
|
queue.splice(findInsertionIndex(job.id), 0, job);
|
|
1635
1970
|
}
|
|
1971
|
+
if (!(job.flags & 4)) {
|
|
1972
|
+
job.flags |= 1;
|
|
1973
|
+
}
|
|
1636
1974
|
queueFlush();
|
|
1637
1975
|
}
|
|
1638
1976
|
}
|
|
@@ -1650,11 +1988,11 @@ function invalidateJob(job) {
|
|
|
1650
1988
|
}
|
|
1651
1989
|
function queuePostFlushCb(cb) {
|
|
1652
1990
|
if (!isArray(cb)) {
|
|
1653
|
-
if (!
|
|
1654
|
-
cb,
|
|
1655
|
-
cb.allowRecurse ? postFlushIndex + 1 : postFlushIndex
|
|
1656
|
-
)) {
|
|
1991
|
+
if (!(cb.flags & 1)) {
|
|
1657
1992
|
pendingPostFlushCbs.push(cb);
|
|
1993
|
+
if (!(cb.flags & 4)) {
|
|
1994
|
+
cb.flags |= 1;
|
|
1995
|
+
}
|
|
1658
1996
|
}
|
|
1659
1997
|
} else {
|
|
1660
1998
|
pendingPostFlushCbs.push(...cb);
|
|
@@ -1664,13 +2002,14 @@ function queuePostFlushCb(cb) {
|
|
|
1664
2002
|
function flushPreFlushCbs(instance, seen, i = isFlushing ? flushIndex + 1 : 0) {
|
|
1665
2003
|
for (; i < queue.length; i++) {
|
|
1666
2004
|
const cb = queue[i];
|
|
1667
|
-
if (cb && cb.
|
|
2005
|
+
if (cb && cb.flags & 2) {
|
|
1668
2006
|
if (instance && cb.id !== instance.uid) {
|
|
1669
2007
|
continue;
|
|
1670
2008
|
}
|
|
1671
2009
|
queue.splice(i, 1);
|
|
1672
2010
|
i--;
|
|
1673
2011
|
cb();
|
|
2012
|
+
cb.flags &= ~1;
|
|
1674
2013
|
}
|
|
1675
2014
|
}
|
|
1676
2015
|
}
|
|
@@ -1687,6 +2026,7 @@ function flushPostFlushCbs(seen) {
|
|
|
1687
2026
|
activePostFlushCbs = deduped;
|
|
1688
2027
|
for (postFlushIndex = 0; postFlushIndex < activePostFlushCbs.length; postFlushIndex++) {
|
|
1689
2028
|
activePostFlushCbs[postFlushIndex]();
|
|
2029
|
+
activePostFlushCbs[postFlushIndex].flags &= ~1;
|
|
1690
2030
|
}
|
|
1691
2031
|
activePostFlushCbs = null;
|
|
1692
2032
|
postFlushIndex = 0;
|
|
@@ -1696,9 +2036,11 @@ const getId = (job) => job.id == null ? Infinity : job.id;
|
|
|
1696
2036
|
const comparator = (a, b) => {
|
|
1697
2037
|
const diff = getId(a) - getId(b);
|
|
1698
2038
|
if (diff === 0) {
|
|
1699
|
-
|
|
2039
|
+
const isAPre = a.flags & 2;
|
|
2040
|
+
const isBPre = b.flags & 2;
|
|
2041
|
+
if (isAPre && !isBPre)
|
|
1700
2042
|
return -1;
|
|
1701
|
-
if (
|
|
2043
|
+
if (isBPre && !isAPre)
|
|
1702
2044
|
return 1;
|
|
1703
2045
|
}
|
|
1704
2046
|
return diff;
|
|
@@ -1710,9 +2052,10 @@ function flushJobs(seen) {
|
|
|
1710
2052
|
try {
|
|
1711
2053
|
for (flushIndex = 0; flushIndex < queue.length; flushIndex++) {
|
|
1712
2054
|
const job = queue[flushIndex];
|
|
1713
|
-
if (job && job.
|
|
2055
|
+
if (job && !(job.flags & 8)) {
|
|
1714
2056
|
if (false) ;
|
|
1715
2057
|
callWithErrorHandling(job, null, 14);
|
|
2058
|
+
job.flags &= ~1;
|
|
1716
2059
|
}
|
|
1717
2060
|
}
|
|
1718
2061
|
} finally {
|
|
@@ -1780,7 +2123,7 @@ const globalCompatConfig = {
|
|
|
1780
2123
|
MODE: 2
|
|
1781
2124
|
};
|
|
1782
2125
|
function configureCompat(config) {
|
|
1783
|
-
extend(globalCompatConfig, config);
|
|
2126
|
+
extend$1(globalCompatConfig, config);
|
|
1784
2127
|
}
|
|
1785
2128
|
function getCompatConfigForKey(key, instance) {
|
|
1786
2129
|
const instanceConfig = instance && instance.type.compatConfig;
|
|
@@ -1918,7 +2261,7 @@ function applyModelFromMixins(model, mixins) {
|
|
|
1918
2261
|
if (mixins) {
|
|
1919
2262
|
mixins.forEach((m) => {
|
|
1920
2263
|
if (m.model)
|
|
1921
|
-
extend(model, m.model);
|
|
2264
|
+
extend$1(model, m.model);
|
|
1922
2265
|
if (m.mixins)
|
|
1923
2266
|
applyModelFromMixins(model, m.mixins);
|
|
1924
2267
|
});
|
|
@@ -2005,7 +2348,7 @@ function normalizeEmitsOptions(comp, appContext, asMixin = false) {
|
|
|
2005
2348
|
const normalizedFromExtend = normalizeEmitsOptions(raw2, appContext, true);
|
|
2006
2349
|
if (normalizedFromExtend) {
|
|
2007
2350
|
hasExtends = true;
|
|
2008
|
-
extend(normalized, normalizedFromExtend);
|
|
2351
|
+
extend$1(normalized, normalizedFromExtend);
|
|
2009
2352
|
}
|
|
2010
2353
|
};
|
|
2011
2354
|
if (!asMixin && appContext.mixins.length) {
|
|
@@ -2027,7 +2370,7 @@ function normalizeEmitsOptions(comp, appContext, asMixin = false) {
|
|
|
2027
2370
|
if (isArray(raw)) {
|
|
2028
2371
|
raw.forEach((key) => normalized[key] = null);
|
|
2029
2372
|
} else {
|
|
2030
|
-
extend(normalized, raw);
|
|
2373
|
+
extend$1(normalized, raw);
|
|
2031
2374
|
}
|
|
2032
2375
|
if (isObject(comp)) {
|
|
2033
2376
|
cache.set(comp, normalized);
|
|
@@ -3094,8 +3437,8 @@ function doWatch(source, cb, {
|
|
|
3094
3437
|
}
|
|
3095
3438
|
}
|
|
3096
3439
|
let oldValue = isMultiSource ? new Array(source.length).fill(INITIAL_WATCHER_VALUE) : INITIAL_WATCHER_VALUE;
|
|
3097
|
-
const job = () => {
|
|
3098
|
-
if (!effect.
|
|
3440
|
+
const job = (immediateFirstRun) => {
|
|
3441
|
+
if (!(effect.flags & 1) || !effect.dirty && !immediateFirstRun) {
|
|
3099
3442
|
return;
|
|
3100
3443
|
}
|
|
3101
3444
|
if (cb) {
|
|
@@ -3116,19 +3459,22 @@ function doWatch(source, cb, {
|
|
|
3116
3459
|
effect.run();
|
|
3117
3460
|
}
|
|
3118
3461
|
};
|
|
3119
|
-
|
|
3462
|
+
if (cb)
|
|
3463
|
+
job.flags |= 4;
|
|
3464
|
+
const effect = new ReactiveEffect(getter);
|
|
3120
3465
|
let scheduler;
|
|
3121
3466
|
if (flush === "sync") {
|
|
3467
|
+
effect.flags |= 64;
|
|
3122
3468
|
scheduler = job;
|
|
3123
3469
|
} else if (flush === "post") {
|
|
3124
3470
|
scheduler = () => queuePostRenderEffect(job, instance && instance.suspense);
|
|
3125
3471
|
} else {
|
|
3126
|
-
job.
|
|
3472
|
+
job.flags |= 2;
|
|
3127
3473
|
if (instance)
|
|
3128
3474
|
job.id = instance.uid;
|
|
3129
3475
|
scheduler = () => queueJob(job);
|
|
3130
3476
|
}
|
|
3131
|
-
|
|
3477
|
+
effect.scheduler = scheduler;
|
|
3132
3478
|
const scope = getCurrentScope();
|
|
3133
3479
|
const unwatch = () => {
|
|
3134
3480
|
effect.stop();
|
|
@@ -3138,7 +3484,7 @@ function doWatch(source, cb, {
|
|
|
3138
3484
|
};
|
|
3139
3485
|
if (cb) {
|
|
3140
3486
|
if (immediate) {
|
|
3141
|
-
job();
|
|
3487
|
+
job(true);
|
|
3142
3488
|
} else {
|
|
3143
3489
|
oldValue = effect.run();
|
|
3144
3490
|
}
|
|
@@ -3316,21 +3662,13 @@ const BaseTransitionImpl = {
|
|
|
3316
3662
|
if (!children || !children.length) {
|
|
3317
3663
|
return;
|
|
3318
3664
|
}
|
|
3319
|
-
|
|
3320
|
-
if (children.length > 1) {
|
|
3321
|
-
for (const c of children) {
|
|
3322
|
-
if (c.type !== Comment) {
|
|
3323
|
-
child = c;
|
|
3324
|
-
break;
|
|
3325
|
-
}
|
|
3326
|
-
}
|
|
3327
|
-
}
|
|
3665
|
+
const child = findNonCommentChild(children);
|
|
3328
3666
|
const rawProps = toRaw(props);
|
|
3329
3667
|
const { mode } = rawProps;
|
|
3330
3668
|
if (state.isLeaving) {
|
|
3331
3669
|
return emptyPlaceholder(child);
|
|
3332
3670
|
}
|
|
3333
|
-
const innerChild =
|
|
3671
|
+
const innerChild = getInnerChild$1(child);
|
|
3334
3672
|
if (!innerChild) {
|
|
3335
3673
|
return emptyPlaceholder(child);
|
|
3336
3674
|
}
|
|
@@ -3342,7 +3680,7 @@ const BaseTransitionImpl = {
|
|
|
3342
3680
|
);
|
|
3343
3681
|
setTransitionHooks(innerChild, enterHooks);
|
|
3344
3682
|
const oldChild = instance.subTree;
|
|
3345
|
-
const oldInnerChild = oldChild &&
|
|
3683
|
+
const oldInnerChild = oldChild && getInnerChild$1(oldChild);
|
|
3346
3684
|
if (oldInnerChild && oldInnerChild.type !== Comment && !isSameVNodeType(innerChild, oldInnerChild)) {
|
|
3347
3685
|
const leavingHooks = resolveTransitionHooks(
|
|
3348
3686
|
oldInnerChild,
|
|
@@ -3355,8 +3693,7 @@ const BaseTransitionImpl = {
|
|
|
3355
3693
|
state.isLeaving = true;
|
|
3356
3694
|
leavingHooks.afterLeave = () => {
|
|
3357
3695
|
state.isLeaving = false;
|
|
3358
|
-
if (instance.
|
|
3359
|
-
instance.effect.dirty = true;
|
|
3696
|
+
if (!(instance.job.flags & 8)) {
|
|
3360
3697
|
instance.update();
|
|
3361
3698
|
}
|
|
3362
3699
|
};
|
|
@@ -3384,6 +3721,18 @@ const BaseTransitionImpl = {
|
|
|
3384
3721
|
{
|
|
3385
3722
|
BaseTransitionImpl.__isBuiltIn = true;
|
|
3386
3723
|
}
|
|
3724
|
+
function findNonCommentChild(children) {
|
|
3725
|
+
let child = children[0];
|
|
3726
|
+
if (children.length > 1) {
|
|
3727
|
+
for (const c of children) {
|
|
3728
|
+
if (c.type !== Comment) {
|
|
3729
|
+
child = c;
|
|
3730
|
+
break;
|
|
3731
|
+
}
|
|
3732
|
+
}
|
|
3733
|
+
}
|
|
3734
|
+
return child;
|
|
3735
|
+
}
|
|
3387
3736
|
const BaseTransition = BaseTransitionImpl;
|
|
3388
3737
|
function getLeavingNodesForType(state, vnode) {
|
|
3389
3738
|
const { leavingVNodes } = state;
|
|
@@ -3538,8 +3887,11 @@ function emptyPlaceholder(vnode) {
|
|
|
3538
3887
|
return vnode;
|
|
3539
3888
|
}
|
|
3540
3889
|
}
|
|
3541
|
-
function
|
|
3890
|
+
function getInnerChild$1(vnode) {
|
|
3542
3891
|
if (!isKeepAlive(vnode)) {
|
|
3892
|
+
if (isTeleport(vnode.type) && vnode.children) {
|
|
3893
|
+
return findNonCommentChild(vnode.children);
|
|
3894
|
+
}
|
|
3543
3895
|
return vnode;
|
|
3544
3896
|
}
|
|
3545
3897
|
const { shapeFlag, children } = vnode;
|
|
@@ -3592,7 +3944,7 @@ function defineComponent(options, extraOptions) {
|
|
|
3592
3944
|
return isFunction(options) ? (
|
|
3593
3945
|
// #8326: extend call and options.name access are considered side-effects
|
|
3594
3946
|
// by Rollup, so we have to wrap it in a pure-annotated IIFE.
|
|
3595
|
-
/* @__PURE__ */ (() => extend({ name: options.name }, extraOptions, { setup: options }))()
|
|
3947
|
+
/* @__PURE__ */ (() => extend$1({ name: options.name }, extraOptions, { setup: options }))()
|
|
3596
3948
|
) : options;
|
|
3597
3949
|
}
|
|
3598
3950
|
|
|
@@ -3697,7 +4049,6 @@ function defineAsyncComponent(source) {
|
|
|
3697
4049
|
load().then(() => {
|
|
3698
4050
|
loaded.value = true;
|
|
3699
4051
|
if (instance.parent && isKeepAlive(instance.parent.vnode)) {
|
|
3700
|
-
instance.parent.effect.dirty = true;
|
|
3701
4052
|
queueJob(instance.parent.update);
|
|
3702
4053
|
}
|
|
3703
4054
|
}).catch((err) => {
|
|
@@ -4112,7 +4463,7 @@ function convertLegacyProps(legacyProps, type) {
|
|
|
4112
4463
|
const converted = {};
|
|
4113
4464
|
for (const key in legacyProps) {
|
|
4114
4465
|
if (key === "attrs" || key === "domProps" || key === "props") {
|
|
4115
|
-
extend(converted, legacyProps[key]);
|
|
4466
|
+
extend$1(converted, legacyProps[key]);
|
|
4116
4467
|
} else if (key === "on" || key === "nativeOn") {
|
|
4117
4468
|
const listeners = legacyProps[key];
|
|
4118
4469
|
for (const event in listeners) {
|
|
@@ -4201,7 +4552,7 @@ function convertLegacySlots(vnode) {
|
|
|
4201
4552
|
if (scopedSlots) {
|
|
4202
4553
|
delete props.scopedSlots;
|
|
4203
4554
|
if (slots) {
|
|
4204
|
-
extend(slots, scopedSlots);
|
|
4555
|
+
extend$1(slots, scopedSlots);
|
|
4205
4556
|
} else {
|
|
4206
4557
|
slots = scopedSlots;
|
|
4207
4558
|
}
|
|
@@ -4298,10 +4649,20 @@ function convertLegacyFunctionalComponent(comp) {
|
|
|
4298
4649
|
function renderList(source, renderItem, cache, index) {
|
|
4299
4650
|
let ret;
|
|
4300
4651
|
const cached = cache && cache[index];
|
|
4301
|
-
|
|
4652
|
+
const sourceIsArray = isArray(source);
|
|
4653
|
+
const sourceIsReactiveArray = sourceIsArray && isReactive(source);
|
|
4654
|
+
if (sourceIsArray || isString(source)) {
|
|
4655
|
+
if (sourceIsReactiveArray) {
|
|
4656
|
+
source = shallowReadArray(source);
|
|
4657
|
+
}
|
|
4302
4658
|
ret = new Array(source.length);
|
|
4303
4659
|
for (let i = 0, l = source.length; i < l; i++) {
|
|
4304
|
-
ret[i] = renderItem(
|
|
4660
|
+
ret[i] = renderItem(
|
|
4661
|
+
sourceIsReactiveArray ? toReactive(source[i]) : source[i],
|
|
4662
|
+
i,
|
|
4663
|
+
void 0,
|
|
4664
|
+
cached && cached[i]
|
|
4665
|
+
);
|
|
4305
4666
|
}
|
|
4306
4667
|
} else if (typeof source === "number") {
|
|
4307
4668
|
ret = new Array(source);
|
|
@@ -4404,7 +4765,7 @@ function toObject(arr) {
|
|
|
4404
4765
|
const res = {};
|
|
4405
4766
|
for (let i = 0; i < arr.length; i++) {
|
|
4406
4767
|
if (arr[i]) {
|
|
4407
|
-
extend(res, arr[i]);
|
|
4768
|
+
extend$1(res, arr[i]);
|
|
4408
4769
|
}
|
|
4409
4770
|
}
|
|
4410
4771
|
return res;
|
|
@@ -4523,7 +4884,7 @@ function installCompatInstanceProperties(map) {
|
|
|
4523
4884
|
const del = (target, key) => {
|
|
4524
4885
|
delete target[key];
|
|
4525
4886
|
};
|
|
4526
|
-
extend(map, {
|
|
4887
|
+
extend$1(map, {
|
|
4527
4888
|
$set: (i) => {
|
|
4528
4889
|
assertCompatEnabled("INSTANCE_SET", i);
|
|
4529
4890
|
return set;
|
|
@@ -4575,7 +4936,7 @@ function installCompatInstanceProperties(map) {
|
|
|
4575
4936
|
if (i.resolvedOptions) {
|
|
4576
4937
|
return i.resolvedOptions;
|
|
4577
4938
|
}
|
|
4578
|
-
const res = i.resolvedOptions = extend({}, resolveMergedOptions(i));
|
|
4939
|
+
const res = i.resolvedOptions = extend$1({}, resolveMergedOptions(i));
|
|
4579
4940
|
Object.defineProperties(res, {
|
|
4580
4941
|
parent: {
|
|
4581
4942
|
get() {
|
|
@@ -4640,7 +5001,7 @@ const getPublicInstance = (i) => {
|
|
|
4640
5001
|
const publicPropertiesMap = (
|
|
4641
5002
|
// Move PURE marker to new line to workaround compiler discarding it
|
|
4642
5003
|
// due to type annotation
|
|
4643
|
-
/* @__PURE__ */ extend(/* @__PURE__ */ Object.create(null), {
|
|
5004
|
+
/* @__PURE__ */ extend$1(/* @__PURE__ */ Object.create(null), {
|
|
4644
5005
|
$: (i) => i,
|
|
4645
5006
|
$el: (i) => i.vnode.el,
|
|
4646
5007
|
$data: (i) => i.data,
|
|
@@ -4653,7 +5014,6 @@ const publicPropertiesMap = (
|
|
|
4653
5014
|
$emit: (i) => i.emit,
|
|
4654
5015
|
$options: (i) => resolveMergedOptions(i) ,
|
|
4655
5016
|
$forceUpdate: (i) => i.f || (i.f = () => {
|
|
4656
|
-
i.effect.dirty = true;
|
|
4657
5017
|
queueJob(i.update);
|
|
4658
5018
|
}),
|
|
4659
5019
|
$nextTick: (i) => i.n || (i.n = nextTick.bind(i.proxy)),
|
|
@@ -4769,7 +5129,7 @@ const PublicInstanceProxyHandlers = {
|
|
|
4769
5129
|
return Reflect.defineProperty(target, key, descriptor);
|
|
4770
5130
|
}
|
|
4771
5131
|
};
|
|
4772
|
-
const RuntimeCompiledPublicInstanceProxyHandlers = /* @__PURE__ */ extend(
|
|
5132
|
+
const RuntimeCompiledPublicInstanceProxyHandlers = /* @__PURE__ */ extend$1(
|
|
4773
5133
|
{},
|
|
4774
5134
|
PublicInstanceProxyHandlers,
|
|
4775
5135
|
{
|
|
@@ -4859,7 +5219,7 @@ function mergeModels(a, b) {
|
|
|
4859
5219
|
return a || b;
|
|
4860
5220
|
if (isArray(a) && isArray(b))
|
|
4861
5221
|
return a.concat(b);
|
|
4862
|
-
return extend({}, normalizePropsOrEmits(a), normalizePropsOrEmits(b));
|
|
5222
|
+
return extend$1({}, normalizePropsOrEmits(a), normalizePropsOrEmits(b));
|
|
4863
5223
|
}
|
|
4864
5224
|
function createPropsRestProxy(props, excludedKeys) {
|
|
4865
5225
|
const ret = {};
|
|
@@ -5107,7 +5467,7 @@ function resolveMergedOptions(instance) {
|
|
|
5107
5467
|
resolved = cached;
|
|
5108
5468
|
} else if (!globalMixins.length && !mixins && !extendsOptions) {
|
|
5109
5469
|
if (isCompatEnabled$1("PRIVATE_APIS", instance)) {
|
|
5110
|
-
resolved = extend({}, base);
|
|
5470
|
+
resolved = extend$1({}, base);
|
|
5111
5471
|
resolved.parent = instance.parent && instance.parent.proxy;
|
|
5112
5472
|
resolved.propsData = instance.vnode.props;
|
|
5113
5473
|
} else {
|
|
@@ -5190,7 +5550,7 @@ function mergeDataFn(to, from) {
|
|
|
5190
5550
|
return from;
|
|
5191
5551
|
}
|
|
5192
5552
|
return function mergedDataFn() {
|
|
5193
|
-
return (isCompatEnabled$1("OPTIONS_DATA_MERGE", null) ? deepMergeData : extend)(
|
|
5553
|
+
return (isCompatEnabled$1("OPTIONS_DATA_MERGE", null) ? deepMergeData : extend$1)(
|
|
5194
5554
|
isFunction(to) ? to.call(this, this) : to,
|
|
5195
5555
|
isFunction(from) ? from.call(this, this) : from
|
|
5196
5556
|
);
|
|
@@ -5213,14 +5573,14 @@ function mergeAsArray$1(to, from) {
|
|
|
5213
5573
|
return to ? [...new Set([].concat(to, from))] : from;
|
|
5214
5574
|
}
|
|
5215
5575
|
function mergeObjectOptions(to, from) {
|
|
5216
|
-
return to ? extend(/* @__PURE__ */ Object.create(null), to, from) : from;
|
|
5576
|
+
return to ? extend$1(/* @__PURE__ */ Object.create(null), to, from) : from;
|
|
5217
5577
|
}
|
|
5218
5578
|
function mergeEmitsOrPropsOptions(to, from) {
|
|
5219
5579
|
if (to) {
|
|
5220
5580
|
if (isArray(to) && isArray(from)) {
|
|
5221
5581
|
return [.../* @__PURE__ */ new Set([...to, ...from])];
|
|
5222
5582
|
}
|
|
5223
|
-
return extend(
|
|
5583
|
+
return extend$1(
|
|
5224
5584
|
/* @__PURE__ */ Object.create(null),
|
|
5225
5585
|
normalizePropsOrEmits(to),
|
|
5226
5586
|
normalizePropsOrEmits(from != null ? from : {})
|
|
@@ -5234,7 +5594,7 @@ function mergeWatchOptions(to, from) {
|
|
|
5234
5594
|
return from;
|
|
5235
5595
|
if (!from)
|
|
5236
5596
|
return to;
|
|
5237
|
-
const merged = extend(/* @__PURE__ */ Object.create(null), to);
|
|
5597
|
+
const merged = extend$1(/* @__PURE__ */ Object.create(null), to);
|
|
5238
5598
|
for (const key in from) {
|
|
5239
5599
|
merged[key] = mergeAsArray$1(to[key], from[key]);
|
|
5240
5600
|
}
|
|
@@ -5281,7 +5641,7 @@ function createCompatVue$1(createApp, createSingletonApp) {
|
|
|
5281
5641
|
return vm;
|
|
5282
5642
|
}
|
|
5283
5643
|
}
|
|
5284
|
-
Vue.version = `2.6.14-compat:${"3.
|
|
5644
|
+
Vue.version = `2.6.14-compat:${"3.5.0-alpha.1"}`;
|
|
5285
5645
|
Vue.config = singletonApp.config;
|
|
5286
5646
|
Vue.use = (p, ...options) => {
|
|
5287
5647
|
if (p && isFunction(p.install)) {
|
|
@@ -5331,7 +5691,7 @@ function createCompatVue$1(createApp, createSingletonApp) {
|
|
|
5331
5691
|
} else {
|
|
5332
5692
|
return createCompatApp(
|
|
5333
5693
|
mergeOptions(
|
|
5334
|
-
extend({}, SubVue.options),
|
|
5694
|
+
extend$1({}, SubVue.options),
|
|
5335
5695
|
inlineOptions,
|
|
5336
5696
|
internalOptionMergeStrats
|
|
5337
5697
|
),
|
|
@@ -5345,7 +5705,7 @@ function createCompatVue$1(createApp, createSingletonApp) {
|
|
|
5345
5705
|
const mergeBase = {};
|
|
5346
5706
|
for (const key in Super.options) {
|
|
5347
5707
|
const superValue = Super.options[key];
|
|
5348
|
-
mergeBase[key] = isArray(superValue) ? superValue.slice() : isObject(superValue) ? extend(/* @__PURE__ */ Object.create(null), superValue) : superValue;
|
|
5708
|
+
mergeBase[key] = isArray(superValue) ? superValue.slice() : isObject(superValue) ? extend$1(/* @__PURE__ */ Object.create(null), superValue) : superValue;
|
|
5349
5709
|
}
|
|
5350
5710
|
SubVue.options = mergeOptions(
|
|
5351
5711
|
mergeBase,
|
|
@@ -5383,7 +5743,7 @@ function createCompatVue$1(createApp, createSingletonApp) {
|
|
|
5383
5743
|
};
|
|
5384
5744
|
const util = {
|
|
5385
5745
|
warn: NOOP,
|
|
5386
|
-
extend,
|
|
5746
|
+
extend: extend$1,
|
|
5387
5747
|
mergeOptions: (parent, child, vm) => mergeOptions(
|
|
5388
5748
|
parent,
|
|
5389
5749
|
child,
|
|
@@ -5640,7 +6000,7 @@ let uid$1 = 0;
|
|
|
5640
6000
|
function createAppAPI(render, hydrate) {
|
|
5641
6001
|
return function createApp(rootComponent, rootProps = null) {
|
|
5642
6002
|
if (!isFunction(rootComponent)) {
|
|
5643
|
-
rootComponent = extend({}, rootComponent);
|
|
6003
|
+
rootComponent = extend$1({}, rootComponent);
|
|
5644
6004
|
}
|
|
5645
6005
|
if (rootProps != null && !isObject(rootProps)) {
|
|
5646
6006
|
rootProps = null;
|
|
@@ -6039,7 +6399,7 @@ function normalizePropsOptions(comp, appContext, asMixin = false) {
|
|
|
6039
6399
|
}
|
|
6040
6400
|
hasExtends = true;
|
|
6041
6401
|
const [props, keys] = normalizePropsOptions(raw2, appContext, true);
|
|
6042
|
-
extend(normalized, props);
|
|
6402
|
+
extend$1(normalized, props);
|
|
6043
6403
|
if (keys)
|
|
6044
6404
|
needCastKeys.push(...keys);
|
|
6045
6405
|
};
|
|
@@ -6071,7 +6431,7 @@ function normalizePropsOptions(comp, appContext, asMixin = false) {
|
|
|
6071
6431
|
const normalizedKey = camelize(key);
|
|
6072
6432
|
if (validatePropName(normalizedKey)) {
|
|
6073
6433
|
const opt = raw[key];
|
|
6074
|
-
const prop = normalized[normalizedKey] = isArray(opt) || isFunction(opt) ? { type: opt } : extend({}, opt);
|
|
6434
|
+
const prop = normalized[normalizedKey] = isArray(opt) || isFunction(opt) ? { type: opt } : extend$1({}, opt);
|
|
6075
6435
|
if (prop) {
|
|
6076
6436
|
const booleanIndex = getTypeIndex(Boolean, prop.type);
|
|
6077
6437
|
const stringIndex = getTypeIndex(String, prop.type);
|
|
@@ -6156,7 +6516,7 @@ const initSlots = (instance, children) => {
|
|
|
6156
6516
|
if (instance.vnode.shapeFlag & 32) {
|
|
6157
6517
|
const type = children._;
|
|
6158
6518
|
if (type) {
|
|
6159
|
-
extend(slots, children);
|
|
6519
|
+
extend$1(slots, children);
|
|
6160
6520
|
def(slots, "_", type);
|
|
6161
6521
|
} else {
|
|
6162
6522
|
normalizeObjectSlots(children, slots);
|
|
@@ -6175,7 +6535,7 @@ const updateSlots = (instance, children, optimized) => {
|
|
|
6175
6535
|
if (optimized && type === 1) {
|
|
6176
6536
|
needDeletionCheck = false;
|
|
6177
6537
|
} else {
|
|
6178
|
-
extend(slots, children);
|
|
6538
|
+
extend$1(slots, children);
|
|
6179
6539
|
if (!optimized && type === 1) {
|
|
6180
6540
|
delete slots._;
|
|
6181
6541
|
}
|
|
@@ -7306,7 +7666,6 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
7306
7666
|
} else {
|
|
7307
7667
|
instance.next = n2;
|
|
7308
7668
|
invalidateJob(instance.update);
|
|
7309
|
-
instance.effect.dirty = true;
|
|
7310
7669
|
instance.update();
|
|
7311
7670
|
}
|
|
7312
7671
|
} else {
|
|
@@ -7465,19 +7824,13 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
7465
7824
|
}
|
|
7466
7825
|
}
|
|
7467
7826
|
};
|
|
7468
|
-
|
|
7469
|
-
|
|
7470
|
-
|
|
7471
|
-
|
|
7472
|
-
|
|
7473
|
-
|
|
7474
|
-
);
|
|
7475
|
-
const update = instance.update = () => {
|
|
7476
|
-
if (effect.dirty) {
|
|
7477
|
-
effect.run();
|
|
7478
|
-
}
|
|
7479
|
-
};
|
|
7480
|
-
update.id = instance.uid;
|
|
7827
|
+
instance.scope.on();
|
|
7828
|
+
const effect = instance.effect = new ReactiveEffect(componentUpdateFn);
|
|
7829
|
+
instance.scope.off();
|
|
7830
|
+
const update = instance.update = effect.run.bind(effect);
|
|
7831
|
+
const job = instance.job = effect.runIfDirty.bind(effect);
|
|
7832
|
+
job.id = instance.uid;
|
|
7833
|
+
effect.scheduler = () => queueJob(job);
|
|
7481
7834
|
toggleRecurse(instance, true);
|
|
7482
7835
|
update();
|
|
7483
7836
|
};
|
|
@@ -7926,7 +8279,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
7926
8279
|
hostRemove(end);
|
|
7927
8280
|
};
|
|
7928
8281
|
const unmountComponent = (instance, parentSuspense, doRemove) => {
|
|
7929
|
-
const { bum, scope,
|
|
8282
|
+
const { bum, scope, job, subTree, um } = instance;
|
|
7930
8283
|
if (bum) {
|
|
7931
8284
|
invokeArrayFns(bum);
|
|
7932
8285
|
}
|
|
@@ -7934,8 +8287,8 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
7934
8287
|
instance.emit("hook:beforeDestroy");
|
|
7935
8288
|
}
|
|
7936
8289
|
scope.stop();
|
|
7937
|
-
if (
|
|
7938
|
-
|
|
8290
|
+
if (job) {
|
|
8291
|
+
job.flags |= 8;
|
|
7939
8292
|
unmount(subTree, instance, parentSuspense, doRemove);
|
|
7940
8293
|
}
|
|
7941
8294
|
if (um) {
|
|
@@ -8024,8 +8377,14 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
8024
8377
|
function resolveChildrenNamespace({ type, props }, currentNamespace) {
|
|
8025
8378
|
return currentNamespace === "svg" && type === "foreignObject" || currentNamespace === "mathml" && type === "annotation-xml" && props && props.encoding && props.encoding.includes("html") ? void 0 : currentNamespace;
|
|
8026
8379
|
}
|
|
8027
|
-
function toggleRecurse({ effect,
|
|
8028
|
-
|
|
8380
|
+
function toggleRecurse({ effect, job }, allowed) {
|
|
8381
|
+
if (allowed) {
|
|
8382
|
+
effect.flags |= 32;
|
|
8383
|
+
job.flags |= 4;
|
|
8384
|
+
} else {
|
|
8385
|
+
effect.flags &= ~32;
|
|
8386
|
+
job.flags &= ~4;
|
|
8387
|
+
}
|
|
8029
8388
|
}
|
|
8030
8389
|
function needTransition(parentSuspense, transition) {
|
|
8031
8390
|
return (!parentSuspense || parentSuspense && !parentSuspense.pendingBranch) && transition && !transition.persisted;
|
|
@@ -8566,7 +8925,7 @@ function _createVNode(type, props = null, children = null, patchFlag = 0, dynami
|
|
|
8566
8925
|
}
|
|
8567
8926
|
if (isObject(style)) {
|
|
8568
8927
|
if (isProxy(style) && !isArray(style)) {
|
|
8569
|
-
style = extend({}, style);
|
|
8928
|
+
style = extend$1({}, style);
|
|
8570
8929
|
}
|
|
8571
8930
|
props.style = normalizeStyle(style);
|
|
8572
8931
|
}
|
|
@@ -8586,7 +8945,7 @@ function _createVNode(type, props = null, children = null, patchFlag = 0, dynami
|
|
|
8586
8945
|
function guardReactiveProps(props) {
|
|
8587
8946
|
if (!props)
|
|
8588
8947
|
return null;
|
|
8589
|
-
return isProxy(props) || isInternalObject(props) ? extend({}, props) : props;
|
|
8948
|
+
return isProxy(props) || isInternalObject(props) ? extend$1({}, props) : props;
|
|
8590
8949
|
}
|
|
8591
8950
|
function cloneVNode(vnode, extraProps, mergeRef = false) {
|
|
8592
8951
|
const { props, ref, patchFlag, children } = vnode;
|
|
@@ -8763,6 +9122,7 @@ function createComponentInstance(vnode, parent, suspense) {
|
|
|
8763
9122
|
effect: null,
|
|
8764
9123
|
update: null,
|
|
8765
9124
|
// will be set synchronously right after creation
|
|
9125
|
+
job: null,
|
|
8766
9126
|
scope: new EffectScope(
|
|
8767
9127
|
true
|
|
8768
9128
|
/* detached */
|
|
@@ -8961,8 +9321,8 @@ function finishComponentSetup(instance, isSSR, skipOptions) {
|
|
|
8961
9321
|
if (template) {
|
|
8962
9322
|
const { isCustomElement, compilerOptions } = instance.appContext.config;
|
|
8963
9323
|
const { delimiters, compilerOptions: componentCompilerOptions } = Component;
|
|
8964
|
-
const finalCompilerOptions = extend(
|
|
8965
|
-
extend(
|
|
9324
|
+
const finalCompilerOptions = extend$1(
|
|
9325
|
+
extend$1(
|
|
8966
9326
|
{
|
|
8967
9327
|
isCustomElement,
|
|
8968
9328
|
delimiters
|
|
@@ -8974,7 +9334,7 @@ function finishComponentSetup(instance, isSSR, skipOptions) {
|
|
|
8974
9334
|
{
|
|
8975
9335
|
finalCompilerOptions.compatConfig = Object.create(globalCompatConfig);
|
|
8976
9336
|
if (Component.compatConfig) {
|
|
8977
|
-
extend(finalCompilerOptions.compatConfig, Component.compatConfig);
|
|
9337
|
+
extend$1(finalCompilerOptions.compatConfig, Component.compatConfig);
|
|
8978
9338
|
}
|
|
8979
9339
|
}
|
|
8980
9340
|
Component.render = compile$1(template, finalCompilerOptions);
|
|
@@ -9140,7 +9500,7 @@ function isMemoSame(cached, memo) {
|
|
|
9140
9500
|
return true;
|
|
9141
9501
|
}
|
|
9142
9502
|
|
|
9143
|
-
const version = "3.
|
|
9503
|
+
const version = "3.5.0-alpha.1";
|
|
9144
9504
|
const warn$1 = NOOP;
|
|
9145
9505
|
const ErrorTypeStrings = ErrorTypeStrings$1 ;
|
|
9146
9506
|
const devtools = void 0;
|
|
@@ -9259,7 +9619,7 @@ const DOMTransitionPropsValidators = {
|
|
|
9259
9619
|
leaveActiveClass: String,
|
|
9260
9620
|
leaveToClass: String
|
|
9261
9621
|
};
|
|
9262
|
-
const TransitionPropsValidators = Transition.props = /* @__PURE__ */ extend(
|
|
9622
|
+
const TransitionPropsValidators = Transition.props = /* @__PURE__ */ extend$1(
|
|
9263
9623
|
{},
|
|
9264
9624
|
BaseTransitionPropsValidators,
|
|
9265
9625
|
DOMTransitionPropsValidators
|
|
@@ -9359,7 +9719,7 @@ function resolveTransitionProps(rawProps) {
|
|
|
9359
9719
|
});
|
|
9360
9720
|
};
|
|
9361
9721
|
};
|
|
9362
|
-
return extend(baseProps, {
|
|
9722
|
+
return extend$1(baseProps, {
|
|
9363
9723
|
onBeforeEnter(el) {
|
|
9364
9724
|
callHook(onBeforeEnter, [el]);
|
|
9365
9725
|
addTransitionClass(el, enterFromClass);
|
|
@@ -10098,7 +10458,7 @@ class VueElement extends BaseClass {
|
|
|
10098
10458
|
render(this._createVNode(), this.shadowRoot);
|
|
10099
10459
|
}
|
|
10100
10460
|
_createVNode() {
|
|
10101
|
-
const vnode = createVNode(this._def, extend({}, this._props));
|
|
10461
|
+
const vnode = createVNode(this._def, extend$1({}, this._props));
|
|
10102
10462
|
if (!this._instance) {
|
|
10103
10463
|
vnode.ce = (instance) => {
|
|
10104
10464
|
this._instance = instance;
|
|
@@ -10163,7 +10523,7 @@ const moveCbKey = Symbol("_moveCb");
|
|
|
10163
10523
|
const enterCbKey = Symbol("_enterCb");
|
|
10164
10524
|
const TransitionGroupImpl = {
|
|
10165
10525
|
name: "TransitionGroup",
|
|
10166
|
-
props: /* @__PURE__ */ extend({}, TransitionPropsValidators, {
|
|
10526
|
+
props: /* @__PURE__ */ extend$1({}, TransitionPropsValidators, {
|
|
10167
10527
|
tag: String,
|
|
10168
10528
|
moveClass: String
|
|
10169
10529
|
}),
|
|
@@ -10627,7 +10987,9 @@ const withKeys = (fn, modifiers) => {
|
|
|
10627
10987
|
return;
|
|
10628
10988
|
}
|
|
10629
10989
|
const eventKey = hyphenate(event.key);
|
|
10630
|
-
if (modifiers.some(
|
|
10990
|
+
if (modifiers.some(
|
|
10991
|
+
(k) => k === eventKey || keyNames[k] === eventKey
|
|
10992
|
+
)) {
|
|
10631
10993
|
return fn(event);
|
|
10632
10994
|
}
|
|
10633
10995
|
{
|
|
@@ -10653,7 +11015,7 @@ const withKeys = (fn, modifiers) => {
|
|
|
10653
11015
|
});
|
|
10654
11016
|
};
|
|
10655
11017
|
|
|
10656
|
-
const rendererOptions = /* @__PURE__ */ extend({ patchProp }, nodeOps);
|
|
11018
|
+
const rendererOptions = /* @__PURE__ */ extend$1({ patchProp }, nodeOps);
|
|
10657
11019
|
let renderer;
|
|
10658
11020
|
let enabledHydration = false;
|
|
10659
11021
|
function ensureRenderer() {
|
|
@@ -10901,7 +11263,7 @@ function wrappedCreateApp(...args) {
|
|
|
10901
11263
|
}
|
|
10902
11264
|
function createCompatVue() {
|
|
10903
11265
|
const Vue = compatUtils.createCompatVue(createApp, wrappedCreateApp);
|
|
10904
|
-
extend(Vue, runtimeDom);
|
|
11266
|
+
extend$1(Vue, runtimeDom);
|
|
10905
11267
|
return Vue;
|
|
10906
11268
|
}
|
|
10907
11269
|
|
|
@@ -13056,9 +13418,9 @@ function onCloseTag(el, end, isImplied = false) {
|
|
|
13056
13418
|
}
|
|
13057
13419
|
if (tokenizer.inSFCRoot) {
|
|
13058
13420
|
if (el.children.length) {
|
|
13059
|
-
el.innerLoc.end = extend({}, el.children[el.children.length - 1].loc.end);
|
|
13421
|
+
el.innerLoc.end = extend$1({}, el.children[el.children.length - 1].loc.end);
|
|
13060
13422
|
} else {
|
|
13061
|
-
el.innerLoc.end = extend({}, el.innerLoc.start);
|
|
13423
|
+
el.innerLoc.end = extend$1({}, el.innerLoc.start);
|
|
13062
13424
|
}
|
|
13063
13425
|
el.innerLoc.source = getSlice(
|
|
13064
13426
|
el.innerLoc.start.offset,
|
|
@@ -13329,7 +13691,7 @@ function reset() {
|
|
|
13329
13691
|
function baseParse(input, options) {
|
|
13330
13692
|
reset();
|
|
13331
13693
|
currentInput = input;
|
|
13332
|
-
currentOptions = extend({}, defaultParserOptions);
|
|
13694
|
+
currentOptions = extend$1({}, defaultParserOptions);
|
|
13333
13695
|
if (options) {
|
|
13334
13696
|
let key;
|
|
13335
13697
|
for (key in options) {
|
|
@@ -16866,7 +17228,7 @@ function baseCompile(source, options = {}) {
|
|
|
16866
17228
|
if (options.scopeId && !isModuleMode) {
|
|
16867
17229
|
onError(createCompilerError(50));
|
|
16868
17230
|
}
|
|
16869
|
-
const resolvedOptions = extend({}, options, {
|
|
17231
|
+
const resolvedOptions = extend$1({}, options, {
|
|
16870
17232
|
prefixIdentifiers
|
|
16871
17233
|
});
|
|
16872
17234
|
const ast = isString(source) ? baseParse(source, resolvedOptions) : source;
|
|
@@ -16879,13 +17241,13 @@ function baseCompile(source, options = {}) {
|
|
|
16879
17241
|
}
|
|
16880
17242
|
transform(
|
|
16881
17243
|
ast,
|
|
16882
|
-
extend({}, resolvedOptions, {
|
|
17244
|
+
extend$1({}, resolvedOptions, {
|
|
16883
17245
|
nodeTransforms: [
|
|
16884
17246
|
...nodeTransforms,
|
|
16885
17247
|
...options.nodeTransforms || []
|
|
16886
17248
|
// user transforms
|
|
16887
17249
|
],
|
|
16888
|
-
directiveTransforms: extend(
|
|
17250
|
+
directiveTransforms: extend$1(
|
|
16889
17251
|
{},
|
|
16890
17252
|
directiveTransforms,
|
|
16891
17253
|
options.directiveTransforms || {}
|
|
@@ -17471,7 +17833,7 @@ const DOMDirectiveTransforms = {
|
|
|
17471
17833
|
function compile(src, options = {}) {
|
|
17472
17834
|
return baseCompile(
|
|
17473
17835
|
src,
|
|
17474
|
-
extend({}, parserOptions, options, {
|
|
17836
|
+
extend$1({}, parserOptions, options, {
|
|
17475
17837
|
nodeTransforms: [
|
|
17476
17838
|
// ignore <script> and <tag>
|
|
17477
17839
|
// this is not put inside DOMNodeTransforms because that list is used
|
|
@@ -17480,7 +17842,7 @@ function compile(src, options = {}) {
|
|
|
17480
17842
|
...DOMNodeTransforms,
|
|
17481
17843
|
...options.nodeTransforms || []
|
|
17482
17844
|
],
|
|
17483
|
-
directiveTransforms: extend(
|
|
17845
|
+
directiveTransforms: extend$1(
|
|
17484
17846
|
{},
|
|
17485
17847
|
DOMDirectiveTransforms,
|
|
17486
17848
|
options.directiveTransforms || {}
|
|
@@ -17510,7 +17872,7 @@ function compileToFunction(template, options) {
|
|
|
17510
17872
|
}
|
|
17511
17873
|
const { code } = compile(
|
|
17512
17874
|
template,
|
|
17513
|
-
extend(
|
|
17875
|
+
extend$1(
|
|
17514
17876
|
{
|
|
17515
17877
|
hoistStatic: true,
|
|
17516
17878
|
whitespace: "preserve",
|