@vue/compat 3.2.27 → 3.2.31

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 CHANGED
@@ -303,8 +303,20 @@ const SVG_TAGS = 'svg,animate,animateMotion,animateTransform,circle,clipPath,col
303
303
  'polygon,polyline,radialGradient,rect,set,solidcolor,stop,switch,symbol,' +
304
304
  'text,textPath,title,tspan,unknown,use,view';
305
305
  const VOID_TAGS = 'area,base,br,col,embed,hr,img,input,link,meta,param,source,track,wbr';
306
+ /**
307
+ * Compiler only.
308
+ * Do NOT use in runtime code paths unless behind `true` flag.
309
+ */
306
310
  const isHTMLTag = /*#__PURE__*/ makeMap(HTML_TAGS);
311
+ /**
312
+ * Compiler only.
313
+ * Do NOT use in runtime code paths unless behind `true` flag.
314
+ */
307
315
  const isSVGTag = /*#__PURE__*/ makeMap(SVG_TAGS);
316
+ /**
317
+ * Compiler only.
318
+ * Do NOT use in runtime code paths unless behind `true` flag.
319
+ */
308
320
  const isVoidTag = /*#__PURE__*/ makeMap(VOID_TAGS);
309
321
 
310
322
  const escapeRE = /["'&<>]/;
@@ -402,13 +414,15 @@ function looseIndexOf(arr, val) {
402
414
  * @private
403
415
  */
404
416
  const toDisplayString = (val) => {
405
- return val == null
406
- ? ''
407
- : isArray(val) ||
408
- (isObject(val) &&
409
- (val.toString === objectToString || !isFunction(val.toString)))
410
- ? JSON.stringify(val, replacer, 2)
411
- : String(val);
417
+ return isString(val)
418
+ ? val
419
+ : val == null
420
+ ? ''
421
+ : isArray(val) ||
422
+ (isObject(val) &&
423
+ (val.toString === objectToString || !isFunction(val.toString)))
424
+ ? JSON.stringify(val, replacer, 2)
425
+ : String(val);
412
426
  };
413
427
  const replacer = (_key, val) => {
414
428
  // can't use isRef here since @vue/shared has no deps
@@ -482,6 +496,7 @@ const isReservedProp = /*#__PURE__*/ makeMap(
482
496
  'onVnodeBeforeMount,onVnodeMounted,' +
483
497
  'onVnodeBeforeUpdate,onVnodeUpdated,' +
484
498
  'onVnodeBeforeUnmount,onVnodeUnmounted');
499
+ const isBuiltInDirective = /*#__PURE__*/ makeMap('bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo');
485
500
  const cacheStringFunction = (fn) => {
486
501
  const cache = Object.create(null);
487
502
  return ((str) => {
@@ -547,7 +562,6 @@ function warn(msg, ...args) {
547
562
  }
548
563
 
549
564
  let activeEffectScope;
550
- const effectScopeStack = [];
551
565
  class EffectScope {
552
566
  constructor(detached = false) {
553
567
  this.active = true;
@@ -562,11 +576,11 @@ class EffectScope {
562
576
  run(fn) {
563
577
  if (this.active) {
564
578
  try {
565
- this.on();
579
+ activeEffectScope = this;
566
580
  return fn();
567
581
  }
568
582
  finally {
569
- this.off();
583
+ activeEffectScope = this.parent;
570
584
  }
571
585
  }
572
586
  else {
@@ -574,23 +588,24 @@ class EffectScope {
574
588
  }
575
589
  }
576
590
  on() {
577
- if (this.active) {
578
- effectScopeStack.push(this);
579
- activeEffectScope = this;
580
- }
591
+ activeEffectScope = this;
581
592
  }
582
593
  off() {
583
- if (this.active) {
584
- effectScopeStack.pop();
585
- activeEffectScope = effectScopeStack[effectScopeStack.length - 1];
586
- }
594
+ activeEffectScope = this.parent;
587
595
  }
588
596
  stop(fromParent) {
589
597
  if (this.active) {
590
- this.effects.forEach(e => e.stop());
591
- this.cleanups.forEach(cleanup => cleanup());
598
+ let i, l;
599
+ for (i = 0, l = this.effects.length; i < l; i++) {
600
+ this.effects[i].stop();
601
+ }
602
+ for (i = 0, l = this.cleanups.length; i < l; i++) {
603
+ this.cleanups[i]();
604
+ }
592
605
  if (this.scopes) {
593
- this.scopes.forEach(e => e.stop(true));
606
+ for (i = 0, l = this.scopes.length; i < l; i++) {
607
+ this.scopes[i].stop(true);
608
+ }
594
609
  }
595
610
  // nested scope, dereference from parent to avoid memory leaks
596
611
  if (this.parent && !fromParent) {
@@ -608,8 +623,7 @@ class EffectScope {
608
623
  function effectScope(detached) {
609
624
  return new EffectScope(detached);
610
625
  }
611
- function recordEffectScope(effect, scope) {
612
- scope = scope || activeEffectScope;
626
+ function recordEffectScope(effect, scope = activeEffectScope) {
613
627
  if (scope && scope.active) {
614
628
  scope.effects.push(effect);
615
629
  }
@@ -672,7 +686,6 @@ let trackOpBit = 1;
672
686
  * When recursion depth is greater, fall back to using a full cleanup.
673
687
  */
674
688
  const maxMarkerBits = 30;
675
- const effectStack = [];
676
689
  let activeEffect;
677
690
  const ITERATE_KEY = Symbol('iterate' );
678
691
  const MAP_KEY_ITERATE_KEY = Symbol('Map key iterate' );
@@ -682,35 +695,42 @@ class ReactiveEffect {
682
695
  this.scheduler = scheduler;
683
696
  this.active = true;
684
697
  this.deps = [];
698
+ this.parent = undefined;
685
699
  recordEffectScope(this, scope);
686
700
  }
687
701
  run() {
688
702
  if (!this.active) {
689
703
  return this.fn();
690
704
  }
691
- if (!effectStack.includes(this)) {
692
- try {
693
- effectStack.push((activeEffect = this));
694
- enableTracking();
695
- trackOpBit = 1 << ++effectTrackDepth;
696
- if (effectTrackDepth <= maxMarkerBits) {
697
- initDepMarkers(this);
698
- }
699
- else {
700
- cleanupEffect(this);
701
- }
702
- return this.fn();
705
+ let parent = activeEffect;
706
+ let lastShouldTrack = shouldTrack;
707
+ while (parent) {
708
+ if (parent === this) {
709
+ return;
703
710
  }
704
- finally {
705
- if (effectTrackDepth <= maxMarkerBits) {
706
- finalizeDepMarkers(this);
707
- }
708
- trackOpBit = 1 << --effectTrackDepth;
709
- resetTracking();
710
- effectStack.pop();
711
- const n = effectStack.length;
712
- activeEffect = n > 0 ? effectStack[n - 1] : undefined;
711
+ parent = parent.parent;
712
+ }
713
+ try {
714
+ this.parent = activeEffect;
715
+ activeEffect = this;
716
+ shouldTrack = true;
717
+ trackOpBit = 1 << ++effectTrackDepth;
718
+ if (effectTrackDepth <= maxMarkerBits) {
719
+ initDepMarkers(this);
713
720
  }
721
+ else {
722
+ cleanupEffect(this);
723
+ }
724
+ return this.fn();
725
+ }
726
+ finally {
727
+ if (effectTrackDepth <= maxMarkerBits) {
728
+ finalizeDepMarkers(this);
729
+ }
730
+ trackOpBit = 1 << --effectTrackDepth;
731
+ activeEffect = this.parent;
732
+ shouldTrack = lastShouldTrack;
733
+ this.parent = undefined;
714
734
  }
715
735
  }
716
736
  stop() {
@@ -758,32 +778,24 @@ function pauseTracking() {
758
778
  trackStack.push(shouldTrack);
759
779
  shouldTrack = false;
760
780
  }
761
- function enableTracking() {
762
- trackStack.push(shouldTrack);
763
- shouldTrack = true;
764
- }
765
781
  function resetTracking() {
766
782
  const last = trackStack.pop();
767
783
  shouldTrack = last === undefined ? true : last;
768
784
  }
769
785
  function track(target, type, key) {
770
- if (!isTracking()) {
771
- return;
772
- }
773
- let depsMap = targetMap.get(target);
774
- if (!depsMap) {
775
- targetMap.set(target, (depsMap = new Map()));
776
- }
777
- let dep = depsMap.get(key);
778
- if (!dep) {
779
- depsMap.set(key, (dep = createDep()));
786
+ if (shouldTrack && activeEffect) {
787
+ let depsMap = targetMap.get(target);
788
+ if (!depsMap) {
789
+ targetMap.set(target, (depsMap = new Map()));
790
+ }
791
+ let dep = depsMap.get(key);
792
+ if (!dep) {
793
+ depsMap.set(key, (dep = createDep()));
794
+ }
795
+ const eventInfo = { effect: activeEffect, target, type, key }
796
+ ;
797
+ trackEffects(dep, eventInfo);
780
798
  }
781
- const eventInfo = { effect: activeEffect, target, type, key }
782
- ;
783
- trackEffects(dep, eventInfo);
784
- }
785
- function isTracking() {
786
- return shouldTrack && activeEffect !== undefined;
787
799
  }
788
800
  function trackEffects(dep, debuggerEventExtraInfo) {
789
801
  let shouldTrack = false;
@@ -944,6 +956,9 @@ function createGetter(isReadonly = false, shallow = false) {
944
956
  else if (key === "__v_isReadonly" /* IS_READONLY */) {
945
957
  return isReadonly;
946
958
  }
959
+ else if (key === "__v_isShallow" /* IS_SHALLOW */) {
960
+ return shallow;
961
+ }
947
962
  else if (key === "__v_raw" /* RAW */ &&
948
963
  receiver ===
949
964
  (isReadonly
@@ -988,9 +1003,14 @@ const shallowSet = /*#__PURE__*/ createSetter(true);
988
1003
  function createSetter(shallow = false) {
989
1004
  return function set(target, key, value, receiver) {
990
1005
  let oldValue = target[key];
1006
+ if (isReadonly(oldValue) && isRef(oldValue) && !isRef(value)) {
1007
+ return false;
1008
+ }
991
1009
  if (!shallow && !isReadonly(value)) {
992
- value = toRaw(value);
993
- oldValue = toRaw(oldValue);
1010
+ if (!isShallow(value)) {
1011
+ value = toRaw(value);
1012
+ oldValue = toRaw(oldValue);
1013
+ }
994
1014
  if (!isArray(target) && isRef(oldValue) && !isRef(value)) {
995
1015
  oldValue.value = value;
996
1016
  return true;
@@ -1377,7 +1397,7 @@ function getTargetType(value) {
1377
1397
  }
1378
1398
  function reactive(target) {
1379
1399
  // if trying to observe a readonly proxy, return the readonly version.
1380
- if (target && target["__v_isReadonly" /* IS_READONLY */]) {
1400
+ if (isReadonly(target)) {
1381
1401
  return target;
1382
1402
  }
1383
1403
  return createReactiveObject(target, false, mutableHandlers, mutableCollectionHandlers, reactiveMap);
@@ -1442,6 +1462,9 @@ function isReactive(value) {
1442
1462
  function isReadonly(value) {
1443
1463
  return !!(value && value["__v_isReadonly" /* IS_READONLY */]);
1444
1464
  }
1465
+ function isShallow(value) {
1466
+ return !!(value && value["__v_isShallow" /* IS_SHALLOW */]);
1467
+ }
1445
1468
  function isProxy(value) {
1446
1469
  return isReactive(value) || isReadonly(value);
1447
1470
  }
@@ -1457,13 +1480,10 @@ const toReactive = (value) => isObject(value) ? reactive(value) : value;
1457
1480
  const toReadonly = (value) => isObject(value) ? readonly(value) : value;
1458
1481
 
1459
1482
  function trackRefValue(ref) {
1460
- if (isTracking()) {
1483
+ if (shouldTrack && activeEffect) {
1461
1484
  ref = toRaw(ref);
1462
- if (!ref.dep) {
1463
- ref.dep = createDep();
1464
- }
1465
1485
  {
1466
- trackEffects(ref.dep, {
1486
+ trackEffects(ref.dep || (ref.dep = createDep()), {
1467
1487
  target: ref,
1468
1488
  type: "get" /* GET */,
1469
1489
  key: 'value'
@@ -1485,7 +1505,7 @@ function triggerRefValue(ref, newVal) {
1485
1505
  }
1486
1506
  }
1487
1507
  function isRef(r) {
1488
- return Boolean(r && r.__v_isRef === true);
1508
+ return !!(r && r.__v_isRef === true);
1489
1509
  }
1490
1510
  function ref(value) {
1491
1511
  return createRef(value, false);
@@ -1500,22 +1520,22 @@ function createRef(rawValue, shallow) {
1500
1520
  return new RefImpl(rawValue, shallow);
1501
1521
  }
1502
1522
  class RefImpl {
1503
- constructor(value, _shallow) {
1504
- this._shallow = _shallow;
1523
+ constructor(value, __v_isShallow) {
1524
+ this.__v_isShallow = __v_isShallow;
1505
1525
  this.dep = undefined;
1506
1526
  this.__v_isRef = true;
1507
- this._rawValue = _shallow ? value : toRaw(value);
1508
- this._value = _shallow ? value : toReactive(value);
1527
+ this._rawValue = __v_isShallow ? value : toRaw(value);
1528
+ this._value = __v_isShallow ? value : toReactive(value);
1509
1529
  }
1510
1530
  get value() {
1511
1531
  trackRefValue(this);
1512
1532
  return this._value;
1513
1533
  }
1514
1534
  set value(newVal) {
1515
- newVal = this._shallow ? newVal : toRaw(newVal);
1535
+ newVal = this.__v_isShallow ? newVal : toRaw(newVal);
1516
1536
  if (hasChanged(newVal, this._rawValue)) {
1517
1537
  this._rawValue = newVal;
1518
- this._value = this._shallow ? newVal : toReactive(newVal);
1538
+ this._value = this.__v_isShallow ? newVal : toReactive(newVal);
1519
1539
  triggerRefValue(this, newVal);
1520
1540
  }
1521
1541
  }
@@ -1598,22 +1618,23 @@ class ComputedRefImpl {
1598
1618
  constructor(getter, _setter, isReadonly, isSSR) {
1599
1619
  this._setter = _setter;
1600
1620
  this.dep = undefined;
1601
- this._dirty = true;
1602
1621
  this.__v_isRef = true;
1622
+ this._dirty = true;
1603
1623
  this.effect = new ReactiveEffect(getter, () => {
1604
1624
  if (!this._dirty) {
1605
1625
  this._dirty = true;
1606
1626
  triggerRefValue(this);
1607
1627
  }
1608
1628
  });
1609
- this.effect.active = !isSSR;
1629
+ this.effect.computed = this;
1630
+ this.effect.active = this._cacheable = !isSSR;
1610
1631
  this["__v_isReadonly" /* IS_READONLY */] = isReadonly;
1611
1632
  }
1612
1633
  get value() {
1613
1634
  // the computed ref may get wrapped by other proxies e.g. readonly() #3376
1614
1635
  const self = toRaw(this);
1615
1636
  trackRefValue(self);
1616
- if (self._dirty) {
1637
+ if (self._dirty || !self._cacheable) {
1617
1638
  self._dirty = false;
1618
1639
  self._value = self.effect.run();
1619
1640
  }
@@ -1790,7 +1811,7 @@ const ErrorTypeStrings = {
1790
1811
  [12 /* FUNCTION_REF */]: 'ref function',
1791
1812
  [13 /* ASYNC_COMPONENT_LOADER */]: 'async component loader',
1792
1813
  [14 /* SCHEDULER */]: 'scheduler flush. This is likely a Vue internals bug. ' +
1793
- 'Please open an issue at https://new-issue.vuejs.org/?repo=vuejs/vue-next'
1814
+ 'Please open an issue at https://new-issue.vuejs.org/?repo=vuejs/core'
1794
1815
  };
1795
1816
  function callWithErrorHandling(fn, instance, type, args) {
1796
1817
  let res;
@@ -2295,23 +2316,23 @@ const deprecationData = {
2295
2316
  ["GLOBAL_MOUNT" /* GLOBAL_MOUNT */]: {
2296
2317
  message: `The global app bootstrapping API has changed: vm.$mount() and the "el" ` +
2297
2318
  `option have been removed. Use createApp(RootComponent).mount() instead.`,
2298
- link: `https://v3.vuejs.org/guide/migration/global-api.html#mounting-app-instance`
2319
+ link: `https://v3-migration.vuejs.org/breaking-changes/global-api.html#mounting-app-instance`
2299
2320
  },
2300
2321
  ["GLOBAL_MOUNT_CONTAINER" /* GLOBAL_MOUNT_CONTAINER */]: {
2301
2322
  message: `Vue detected directives on the mount container. ` +
2302
2323
  `In Vue 3, the container is no longer considered part of the template ` +
2303
2324
  `and will not be processed/replaced.`,
2304
- link: `https://v3.vuejs.org/guide/migration/mount-changes.html`
2325
+ link: `https://v3-migration.vuejs.org/breaking-changes/mount-changes.html`
2305
2326
  },
2306
2327
  ["GLOBAL_EXTEND" /* GLOBAL_EXTEND */]: {
2307
2328
  message: `Vue.extend() has been removed in Vue 3. ` +
2308
2329
  `Use defineComponent() instead.`,
2309
- link: `https://v3.vuejs.org/api/global-api.html#definecomponent`
2330
+ link: `https://vuejs.org/api/general.html#definecomponent`
2310
2331
  },
2311
2332
  ["GLOBAL_PROTOTYPE" /* GLOBAL_PROTOTYPE */]: {
2312
2333
  message: `Vue.prototype is no longer available in Vue 3. ` +
2313
2334
  `Use app.config.globalProperties instead.`,
2314
- link: `https://v3.vuejs.org/guide/migration/global-api.html#vue-prototype-replaced-by-config-globalproperties`
2335
+ link: `https://v3-migration.vuejs.org/breaking-changes/global-api.html#vue-prototype-replaced-by-config-globalproperties`
2315
2336
  },
2316
2337
  ["GLOBAL_SET" /* GLOBAL_SET */]: {
2317
2338
  message: `Vue.set() has been removed as it is no longer needed in Vue 3. ` +
@@ -2324,7 +2345,7 @@ const deprecationData = {
2324
2345
  ["GLOBAL_OBSERVABLE" /* GLOBAL_OBSERVABLE */]: {
2325
2346
  message: `Vue.observable() has been removed. ` +
2326
2347
  `Use \`import { reactive } from "vue"\` from Composition API instead.`,
2327
- link: `https://v3.vuejs.org/api/basic-reactivity.html`
2348
+ link: `https://vuejs.org/api/reactivity-core.html#reactive`
2328
2349
  },
2329
2350
  ["GLOBAL_PRIVATE_UTIL" /* GLOBAL_PRIVATE_UTIL */]: {
2330
2351
  message: `Vue.util has been removed. Please refactor to avoid its usage ` +
@@ -2338,16 +2359,16 @@ const deprecationData = {
2338
2359
  ["CONFIG_DEVTOOLS" /* CONFIG_DEVTOOLS */]: {
2339
2360
  message: `config.devtools has been removed. To enable devtools for ` +
2340
2361
  `production, configure the __VUE_PROD_DEVTOOLS__ compile-time flag.`,
2341
- link: `https://github.com/vuejs/vue-next/tree/master/packages/vue#bundler-build-feature-flags`
2362
+ link: `https://github.com/vuejs/core/tree/main/packages/vue#bundler-build-feature-flags`
2342
2363
  },
2343
2364
  ["CONFIG_KEY_CODES" /* CONFIG_KEY_CODES */]: {
2344
2365
  message: `config.keyCodes has been removed. ` +
2345
2366
  `In Vue 3, you can directly use the kebab-case key names as v-on modifiers.`,
2346
- link: `https://v3.vuejs.org/guide/migration/keycode-modifiers.html`
2367
+ link: `https://v3-migration.vuejs.org/breaking-changes/keycode-modifiers.html`
2347
2368
  },
2348
2369
  ["CONFIG_PRODUCTION_TIP" /* CONFIG_PRODUCTION_TIP */]: {
2349
2370
  message: `config.productionTip has been removed.`,
2350
- link: `https://v3.vuejs.org/guide/migration/global-api.html#config-productiontip-removed`
2371
+ link: `https://v3-migration.vuejs.org/breaking-changes/global-api.html#config-productiontip-removed`
2351
2372
  },
2352
2373
  ["CONFIG_IGNORED_ELEMENTS" /* CONFIG_IGNORED_ELEMENTS */]: {
2353
2374
  message: () => {
@@ -2360,7 +2381,7 @@ const deprecationData = {
2360
2381
  }
2361
2382
  return msg;
2362
2383
  },
2363
- link: `https://v3.vuejs.org/guide/migration/global-api.html#config-ignoredelements-is-now-config-iscustomelement`
2384
+ link: `https://v3-migration.vuejs.org/breaking-changes/global-api.html#config-ignoredelements-is-now-config-iscustomelement`
2364
2385
  },
2365
2386
  ["CONFIG_WHITESPACE" /* CONFIG_WHITESPACE */]: {
2366
2387
  // this warning is only relevant in the full build when using runtime
@@ -2383,12 +2404,12 @@ const deprecationData = {
2383
2404
  },
2384
2405
  ["INSTANCE_DESTROY" /* INSTANCE_DESTROY */]: {
2385
2406
  message: `vm.$destroy() has been removed. Use app.unmount() instead.`,
2386
- link: `https://v3.vuejs.org/api/application-api.html#unmount`
2407
+ link: `https://vuejs.org/api/application.html#app-unmount`
2387
2408
  },
2388
2409
  ["INSTANCE_EVENT_EMITTER" /* INSTANCE_EVENT_EMITTER */]: {
2389
2410
  message: `vm.$on/$once/$off() have been removed. ` +
2390
2411
  `Use an external event emitter library instead.`,
2391
- link: `https://v3.vuejs.org/guide/migration/events-api.html`
2412
+ link: `https://v3-migration.vuejs.org/breaking-changes/events-api.html`
2392
2413
  },
2393
2414
  ["INSTANCE_EVENT_HOOKS" /* INSTANCE_EVENT_HOOKS */]: {
2394
2415
  message: event => `"${event}" lifecycle events are no longer supported. From templates, ` +
@@ -2396,23 +2417,23 @@ const deprecationData = {
2396
2417
  `should be changed to @vnode-${event.slice(5)}. ` +
2397
2418
  `From JavaScript, use Composition API to dynamically register lifecycle ` +
2398
2419
  `hooks.`,
2399
- link: `https://v3.vuejs.org/guide/migration/vnode-lifecycle-events.html`
2420
+ link: `https://v3-migration.vuejs.org/breaking-changes/vnode-lifecycle-events.html`
2400
2421
  },
2401
2422
  ["INSTANCE_CHILDREN" /* INSTANCE_CHILDREN */]: {
2402
2423
  message: `vm.$children has been removed. Consider refactoring your logic ` +
2403
2424
  `to avoid relying on direct access to child components.`,
2404
- link: `https://v3.vuejs.org/guide/migration/children.html`
2425
+ link: `https://v3-migration.vuejs.org/breaking-changes/children.html`
2405
2426
  },
2406
2427
  ["INSTANCE_LISTENERS" /* INSTANCE_LISTENERS */]: {
2407
2428
  message: `vm.$listeners has been removed. In Vue 3, parent v-on listeners are ` +
2408
2429
  `included in vm.$attrs and it is no longer necessary to separately use ` +
2409
2430
  `v-on="$listeners" if you are already using v-bind="$attrs". ` +
2410
2431
  `(Note: the Vue 3 behavior only applies if this compat config is disabled)`,
2411
- link: `https://v3.vuejs.org/guide/migration/listeners-removed.html`
2432
+ link: `https://v3-migration.vuejs.org/breaking-changes/listeners-removed.html`
2412
2433
  },
2413
2434
  ["INSTANCE_SCOPED_SLOTS" /* INSTANCE_SCOPED_SLOTS */]: {
2414
2435
  message: `vm.$scopedSlots has been removed. Use vm.$slots instead.`,
2415
- link: `https://v3.vuejs.org/guide/migration/slots-unification.html`
2436
+ link: `https://v3-migration.vuejs.org/breaking-changes/slots-unification.html`
2416
2437
  },
2417
2438
  ["INSTANCE_ATTRS_CLASS_STYLE" /* INSTANCE_ATTRS_CLASS_STYLE */]: {
2418
2439
  message: componentName => `Component <${componentName || 'Anonymous'}> has \`inheritAttrs: false\` but is ` +
@@ -2423,17 +2444,17 @@ const deprecationData = {
2423
2444
  `If you are binding $attrs to a non-root element and expecting ` +
2424
2445
  `class/style to fallthrough on root, you will need to now manually bind ` +
2425
2446
  `them on root via :class="$attrs.class".`,
2426
- link: `https://v3.vuejs.org/guide/migration/attrs-includes-class-style.html`
2447
+ link: `https://v3-migration.vuejs.org/breaking-changes/attrs-includes-class-style.html`
2427
2448
  },
2428
2449
  ["OPTIONS_DATA_FN" /* OPTIONS_DATA_FN */]: {
2429
2450
  message: `The "data" option can no longer be a plain object. ` +
2430
2451
  `Always use a function.`,
2431
- link: `https://v3.vuejs.org/guide/migration/data-option.html`
2452
+ link: `https://v3-migration.vuejs.org/breaking-changes/data-option.html`
2432
2453
  },
2433
2454
  ["OPTIONS_DATA_MERGE" /* OPTIONS_DATA_MERGE */]: {
2434
2455
  message: (key) => `Detected conflicting key "${key}" when merging data option values. ` +
2435
2456
  `In Vue 3, data keys are merged shallowly and will override one another.`,
2436
- link: `https://v3.vuejs.org/guide/migration/data-option.html#mixin-merge-behavior-change`
2457
+ link: `https://v3-migration.vuejs.org/breaking-changes/data-option.html#mixin-merge-behavior-change`
2437
2458
  },
2438
2459
  ["OPTIONS_BEFORE_DESTROY" /* OPTIONS_BEFORE_DESTROY */]: {
2439
2460
  message: `\`beforeDestroy\` has been renamed to \`beforeUnmount\`.`
@@ -2447,23 +2468,23 @@ const deprecationData = {
2447
2468
  `If current usage is intended, you can disable the compat behavior and ` +
2448
2469
  `suppress this warning with:` +
2449
2470
  `\n\n configureCompat({ ${"WATCH_ARRAY" /* WATCH_ARRAY */}: false })\n`,
2450
- link: `https://v3.vuejs.org/guide/migration/watch.html`
2471
+ link: `https://v3-migration.vuejs.org/breaking-changes/watch.html`
2451
2472
  },
2452
2473
  ["PROPS_DEFAULT_THIS" /* PROPS_DEFAULT_THIS */]: {
2453
2474
  message: (key) => `props default value function no longer has access to "this". The compat ` +
2454
2475
  `build only offers access to this.$options.` +
2455
2476
  `(found in prop "${key}")`,
2456
- link: `https://v3.vuejs.org/guide/migration/props-default-this.html`
2477
+ link: `https://v3-migration.vuejs.org/breaking-changes/props-default-this.html`
2457
2478
  },
2458
2479
  ["CUSTOM_DIR" /* CUSTOM_DIR */]: {
2459
2480
  message: (legacyHook, newHook) => `Custom directive hook "${legacyHook}" has been removed. ` +
2460
2481
  `Use "${newHook}" instead.`,
2461
- link: `https://v3.vuejs.org/guide/migration/custom-directives.html`
2482
+ link: `https://v3-migration.vuejs.org/breaking-changes/custom-directives.html`
2462
2483
  },
2463
2484
  ["V_ON_KEYCODE_MODIFIER" /* V_ON_KEYCODE_MODIFIER */]: {
2464
2485
  message: `Using keyCode as v-on modifier is no longer supported. ` +
2465
2486
  `Use kebab-case key name modifiers instead.`,
2466
- link: `https://v3.vuejs.org/guide/migration/keycode-modifiers.html`
2487
+ link: `https://v3-migration.vuejs.org/breaking-changes/keycode-modifiers.html`
2467
2488
  },
2468
2489
  ["ATTR_FALSE_VALUE" /* ATTR_FALSE_VALUE */]: {
2469
2490
  message: (name) => `Attribute "${name}" with v-bind value \`false\` will render ` +
@@ -2471,7 +2492,7 @@ const deprecationData = {
2471
2492
  `use \`null\` or \`undefined\` instead. If the usage is intended, ` +
2472
2493
  `you can disable the compat behavior and suppress this warning with:` +
2473
2494
  `\n\n configureCompat({ ${"ATTR_FALSE_VALUE" /* ATTR_FALSE_VALUE */}: false })\n`,
2474
- link: `https://v3.vuejs.org/guide/migration/attribute-coercion.html`
2495
+ link: `https://v3-migration.vuejs.org/breaking-changes/attribute-coercion.html`
2475
2496
  },
2476
2497
  ["ATTR_ENUMERATED_COERCION" /* ATTR_ENUMERATED_COERCION */]: {
2477
2498
  message: (name, value, coerced) => `Enumerated attribute "${name}" with v-bind value \`${value}\` will ` +
@@ -2480,7 +2501,7 @@ const deprecationData = {
2480
2501
  `If the usage is intended, ` +
2481
2502
  `you can disable the compat behavior and suppress this warning with:` +
2482
2503
  `\n\n configureCompat({ ${"ATTR_ENUMERATED_COERCION" /* ATTR_ENUMERATED_COERCION */}: false })\n`,
2483
- link: `https://v3.vuejs.org/guide/migration/attribute-coercion.html`
2504
+ link: `https://v3-migration.vuejs.org/breaking-changes/attribute-coercion.html`
2484
2505
  },
2485
2506
  ["TRANSITION_CLASSES" /* TRANSITION_CLASSES */]: {
2486
2507
  message: `` // this feature cannot be runtime-detected
@@ -2491,7 +2512,7 @@ const deprecationData = {
2491
2512
  `for styling, you can disable the compat behavior and suppress this ` +
2492
2513
  `warning with:` +
2493
2514
  `\n\n configureCompat({ ${"TRANSITION_GROUP_ROOT" /* TRANSITION_GROUP_ROOT */}: false })\n`,
2494
- link: `https://v3.vuejs.org/guide/migration/transition-group.html`
2515
+ link: `https://v3-migration.vuejs.org/breaking-changes/transition-group.html`
2495
2516
  },
2496
2517
  ["COMPONENT_ASYNC" /* COMPONENT_ASYNC */]: {
2497
2518
  message: (comp) => {
@@ -2504,7 +2525,7 @@ const deprecationData = {
2504
2525
  `warning with:` +
2505
2526
  `\n\n configureCompat({ ${"COMPONENT_ASYNC" /* COMPONENT_ASYNC */}: false })\n`);
2506
2527
  },
2507
- link: `https://v3.vuejs.org/guide/migration/async-components.html`
2528
+ link: `https://v3-migration.vuejs.org/breaking-changes/async-components.html`
2508
2529
  },
2509
2530
  ["COMPONENT_FUNCTIONAL" /* COMPONENT_FUNCTIONAL */]: {
2510
2531
  message: (comp) => {
@@ -2515,7 +2536,7 @@ const deprecationData = {
2515
2536
  `components usage have been migrated and its compat behavior has ` +
2516
2537
  `been disabled.`);
2517
2538
  },
2518
- link: `https://v3.vuejs.org/guide/migration/functional-components.html`
2539
+ link: `https://v3-migration.vuejs.org/breaking-changes/functional-components.html`
2519
2540
  },
2520
2541
  ["COMPONENT_V_MODEL" /* COMPONENT_V_MODEL */]: {
2521
2542
  message: (comp) => {
@@ -2525,27 +2546,27 @@ const deprecationData = {
2525
2546
  (isArray(comp.props)
2526
2547
  ? comp.props.includes('modelValue')
2527
2548
  : hasOwn(comp.props, 'modelValue'))) {
2528
- return (`Component delcares "modelValue" prop, which is Vue 3 usage, but ` +
2549
+ return (`Component declares "modelValue" prop, which is Vue 3 usage, but ` +
2529
2550
  `is running under Vue 2 compat v-model behavior. You can ${configMsg}`);
2530
2551
  }
2531
2552
  return (`v-model usage on component has changed in Vue 3. Component that expects ` +
2532
2553
  `to work with v-model should now use the "modelValue" prop and emit the ` +
2533
2554
  `"update:modelValue" event. You can update the usage and then ${configMsg}`);
2534
2555
  },
2535
- link: `https://v3.vuejs.org/guide/migration/v-model.html`
2556
+ link: `https://v3-migration.vuejs.org/breaking-changes/v-model.html`
2536
2557
  },
2537
2558
  ["RENDER_FUNCTION" /* RENDER_FUNCTION */]: {
2538
2559
  message: `Vue 3's render function API has changed. ` +
2539
2560
  `You can opt-in to the new API with:` +
2540
2561
  `\n\n configureCompat({ ${"RENDER_FUNCTION" /* RENDER_FUNCTION */}: false })\n` +
2541
2562
  `\n (This can also be done per-component via the "compatConfig" option.)`,
2542
- link: `https://v3.vuejs.org/guide/migration/render-function-api.html`
2563
+ link: `https://v3-migration.vuejs.org/breaking-changes/render-function-api.html`
2543
2564
  },
2544
2565
  ["FILTERS" /* FILTERS */]: {
2545
2566
  message: `filters have been removed in Vue 3. ` +
2546
2567
  `The "|" symbol will be treated as native JavaScript bitwise OR operator. ` +
2547
2568
  `Use method calls or computed properties instead.`,
2548
- link: `https://v3.vuejs.org/guide/migration/filters.html`
2569
+ link: `https://v3-migration.vuejs.org/breaking-changes/filters.html`
2549
2570
  },
2550
2571
  ["PRIVATE_APIS" /* PRIVATE_APIS */]: {
2551
2572
  message: name => `"${name}" is a Vue 2 private API that no longer exists in Vue 3. ` +
@@ -2613,7 +2634,7 @@ function validateCompatConfig(config, instance) {
2613
2634
  warn$1(`Deprecation config "${key}" is compiler-specific and you are ` +
2614
2635
  `running a runtime-only build of Vue. This deprecation should be ` +
2615
2636
  `configured via compiler options in your build setup instead.\n` +
2616
- `Details: https://v3.vuejs.org/guide/migration/migration-build.html`);
2637
+ `Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`);
2617
2638
  }
2618
2639
  }
2619
2640
  else {
@@ -2755,6 +2776,7 @@ const compatModelEventPrefix = `onModelCompat:`;
2755
2776
  const warnedTypes = new WeakSet();
2756
2777
  function convertLegacyVModelProps(vnode) {
2757
2778
  const { type, shapeFlag, props, dynamicProps } = vnode;
2779
+ const comp = type;
2758
2780
  if (shapeFlag & 6 /* COMPONENT */ && props && 'modelValue' in props) {
2759
2781
  if (!isCompatEnabled("COMPONENT_V_MODEL" /* COMPONENT_V_MODEL */,
2760
2782
  // this is a special case where we want to use the vnode component's
@@ -2763,16 +2785,18 @@ function convertLegacyVModelProps(vnode) {
2763
2785
  { type })) {
2764
2786
  return;
2765
2787
  }
2766
- if (!warnedTypes.has(type)) {
2788
+ if (!warnedTypes.has(comp)) {
2767
2789
  pushWarningContext(vnode);
2768
- warnDeprecation("COMPONENT_V_MODEL" /* COMPONENT_V_MODEL */, { type }, type);
2790
+ warnDeprecation("COMPONENT_V_MODEL" /* COMPONENT_V_MODEL */, { type }, comp);
2769
2791
  popWarningContext();
2770
- warnedTypes.add(type);
2792
+ warnedTypes.add(comp);
2771
2793
  }
2772
2794
  // v3 compiled model code -> v2 compat props
2773
2795
  // modelValue -> value
2774
2796
  // onUpdate:modelValue -> onModelCompat:input
2775
- const { prop = 'value', event = 'input' } = type.model || {};
2797
+ const model = comp.model || {};
2798
+ applyModelFromMixins(model, comp.mixins);
2799
+ const { prop = 'value', event = 'input' } = model;
2776
2800
  if (prop !== 'modelValue') {
2777
2801
  props[prop] = props.modelValue;
2778
2802
  delete props.modelValue;
@@ -2785,6 +2809,16 @@ function convertLegacyVModelProps(vnode) {
2785
2809
  delete props['onUpdate:modelValue'];
2786
2810
  }
2787
2811
  }
2812
+ function applyModelFromMixins(model, mixins) {
2813
+ if (mixins) {
2814
+ mixins.forEach(m => {
2815
+ if (m.model)
2816
+ extend(model, m.model);
2817
+ if (m.mixins)
2818
+ applyModelFromMixins(model, m.mixins);
2819
+ });
2820
+ }
2821
+ }
2788
2822
  function compatModelEmit(instance, event, args) {
2789
2823
  if (!isCompatEnabled("COMPONENT_V_MODEL" /* COMPONENT_V_MODEL */, instance)) {
2790
2824
  return;
@@ -3787,7 +3821,7 @@ function inject(key, defaultValue, treatDefaultAsFactory = false) {
3787
3821
  if (instance) {
3788
3822
  // #2400
3789
3823
  // to support `app.use` plugins,
3790
- // fallback to appContext's `provides` if the intance is at root
3824
+ // fallback to appContext's `provides` if the instance is at root
3791
3825
  const provides = instance.parent == null
3792
3826
  ? instance.vnode.appContext && instance.vnode.appContext.provides
3793
3827
  : instance.parent.provides;
@@ -3853,7 +3887,7 @@ function doWatch(source, cb, { immediate, deep, flush, onTrack, onTrigger } = EM
3853
3887
  let isMultiSource = false;
3854
3888
  if (isRef(source)) {
3855
3889
  getter = () => source.value;
3856
- forceTrigger = !!source._shallow;
3890
+ forceTrigger = isShallow(source);
3857
3891
  }
3858
3892
  else if (isReactive(source)) {
3859
3893
  getter = () => source;
@@ -4764,7 +4798,7 @@ function matches(pattern, name) {
4764
4798
  return pattern.some((p) => matches(p, name));
4765
4799
  }
4766
4800
  else if (isString(pattern)) {
4767
- return pattern.split(',').indexOf(name) > -1;
4801
+ return pattern.split(',').includes(name);
4768
4802
  }
4769
4803
  else if (pattern.test) {
4770
4804
  return pattern.test(name);
@@ -5032,7 +5066,7 @@ function applyOptions(instance) {
5032
5066
  warn$1(`Write operation failed: computed property "${key}" is readonly.`);
5033
5067
  }
5034
5068
  ;
5035
- const c = computed({
5069
+ const c = computed$1({
5036
5070
  get,
5037
5071
  set
5038
5072
  });
@@ -5513,7 +5547,9 @@ function updateProps(instance, rawProps, rawPrevProps, optimized) {
5513
5547
  // attrs point to the same object so it should already have been updated.
5514
5548
  if (attrs !== rawCurrentProps) {
5515
5549
  for (const key in attrs) {
5516
- if (!rawProps || !hasOwn(rawProps, key)) {
5550
+ if (!rawProps ||
5551
+ (!hasOwn(rawProps, key) &&
5552
+ (!hasOwn(rawProps, key + 'Native')))) {
5517
5553
  delete attrs[key];
5518
5554
  hasAttrsChanged = true;
5519
5555
  }
@@ -6016,7 +6052,6 @@ return withDirectives(h(comp), [
6016
6052
  [bar, this.y]
6017
6053
  ])
6018
6054
  */
6019
- const isBuiltInDirective = /*#__PURE__*/ makeMap('bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo');
6020
6055
  function validateDirectiveName(name) {
6021
6056
  if (isBuiltInDirective(name)) {
6022
6057
  warn$1('Do not use built-in directive ids as custom directive id: ' + name);
@@ -6151,7 +6186,7 @@ function createCompatVue(createApp, createSingletonApp) {
6151
6186
  return vm;
6152
6187
  }
6153
6188
  }
6154
- Vue.version = "3.2.27";
6189
+ Vue.version = `2.6.14-compat:${"3.2.31"}`;
6155
6190
  Vue.config = singletonApp.config;
6156
6191
  Vue.use = (p, ...options) => {
6157
6192
  if (p && isFunction(p.install)) {
@@ -6975,7 +7010,8 @@ function createHydrationFunctions(rendererInternals) {
6975
7010
  // e.g. <option :value="obj">, <input type="checkbox" :true-value="1">
6976
7011
  const forcePatchValue = (type === 'input' && dirs) || type === 'option';
6977
7012
  // skip props & children if this is hoisted static nodes
6978
- if (forcePatchValue || patchFlag !== -1 /* HOISTED */) {
7013
+ // #5405 in dev, always hydrate children for HMR
7014
+ {
6979
7015
  if (dirs) {
6980
7016
  invokeDirectiveHook(vnode, null, parentComponent, 'created');
6981
7017
  }
@@ -7140,6 +7176,7 @@ function createHydrationFunctions(rendererInternals) {
7140
7176
  return [hydrate, hydrateNode];
7141
7177
  }
7142
7178
 
7179
+ /* eslint-disable no-restricted-globals */
7143
7180
  let supported;
7144
7181
  let perf;
7145
7182
  function startMeasure(instance, type) {
@@ -7167,7 +7204,6 @@ function isSupported() {
7167
7204
  if (supported !== undefined) {
7168
7205
  return supported;
7169
7206
  }
7170
- /* eslint-disable no-restricted-globals */
7171
7207
  if (typeof window !== 'undefined' && window.performance) {
7172
7208
  supported = true;
7173
7209
  perf = window.performance;
@@ -7175,7 +7211,6 @@ function isSupported() {
7175
7211
  else {
7176
7212
  supported = false;
7177
7213
  }
7178
- /* eslint-enable no-restricted-globals */
7179
7214
  return supported;
7180
7215
  }
7181
7216
 
@@ -9421,7 +9456,7 @@ function cloneVNode(vnode, extraProps, mergeRef = false) {
9421
9456
  shapeFlag: vnode.shapeFlag,
9422
9457
  // if the vnode is cloned with extra props, we can no longer assume its
9423
9458
  // existing patch flag to be reliable and need to add the FULL_PROPS flag.
9424
- // note: perserve flag for fragments since they use the flag for children
9459
+ // note: preserve flag for fragments since they use the flag for children
9425
9460
  // fast paths only.
9426
9461
  patchFlag: extraProps && vnode.type !== Fragment
9427
9462
  ? patchFlag === -1 // hoisted node
@@ -9586,7 +9621,8 @@ function mergeProps(...args) {
9586
9621
  else if (isOn(key)) {
9587
9622
  const existing = ret[key];
9588
9623
  const incoming = toMerge[key];
9589
- if (existing !== incoming &&
9624
+ if (incoming &&
9625
+ existing !== incoming &&
9590
9626
  !(isArray(existing) && existing.includes(incoming))) {
9591
9627
  ret[key] = existing
9592
9628
  ? [].concat(existing, incoming)
@@ -9862,7 +9898,7 @@ function legacyCheckKeyCodes(instance, eventKeyCode, key, builtInKeyCode, eventK
9862
9898
  }
9863
9899
  function isKeyNotMatch(expect, actual) {
9864
9900
  if (isArray(expect)) {
9865
- return expect.indexOf(actual) === -1;
9901
+ return !expect.includes(actual);
9866
9902
  }
9867
9903
  else {
9868
9904
  return expect !== actual;
@@ -9941,7 +9977,7 @@ function installCompatInstanceProperties(map) {
9941
9977
  extend(map, {
9942
9978
  // needed by many libs / render fns
9943
9979
  $vnode: i => i.vnode,
9944
- // inject addtional properties into $options for compat
9980
+ // inject additional properties into $options for compat
9945
9981
  // e.g. vuex needs this.$options.parent
9946
9982
  $options: i => {
9947
9983
  const res = extend({}, resolveMergedOptions(i));
@@ -10129,9 +10165,11 @@ const PublicInstanceProxyHandlers = {
10129
10165
  const { data, setupState, ctx } = instance;
10130
10166
  if (setupState !== EMPTY_OBJ && hasOwn(setupState, key)) {
10131
10167
  setupState[key] = value;
10168
+ return true;
10132
10169
  }
10133
10170
  else if (data !== EMPTY_OBJ && hasOwn(data, key)) {
10134
10171
  data[key] = value;
10172
+ return true;
10135
10173
  }
10136
10174
  else if (hasOwn(instance.props, key)) {
10137
10175
  warn$1(`Attempting to mutate prop "${key}". Props are readonly.`, instance);
@@ -10165,6 +10203,15 @@ const PublicInstanceProxyHandlers = {
10165
10203
  hasOwn(ctx, key) ||
10166
10204
  hasOwn(publicPropertiesMap, key) ||
10167
10205
  hasOwn(appContext.config.globalProperties, key));
10206
+ },
10207
+ defineProperty(target, key, descriptor) {
10208
+ if (descriptor.get != null) {
10209
+ this.set(target, key, descriptor.get(), null);
10210
+ }
10211
+ else if (descriptor.value != null) {
10212
+ this.set(target, key, descriptor.value, null);
10213
+ }
10214
+ return Reflect.defineProperty(target, key, descriptor);
10168
10215
  }
10169
10216
  };
10170
10217
  {
@@ -10673,7 +10720,7 @@ function defineEmits() {
10673
10720
  * instance properties when it is accessed by a parent component via template
10674
10721
  * refs.
10675
10722
  *
10676
- * `<script setup>` components are closed by default - i.e. varaibles inside
10723
+ * `<script setup>` components are closed by default - i.e. variables inside
10677
10724
  * the `<script setup>` scope is not exposed to parent unless explicitly exposed
10678
10725
  * via `defineExpose`.
10679
10726
  *
@@ -10876,7 +10923,7 @@ function initCustomFormatter() {
10876
10923
  return [
10877
10924
  'div',
10878
10925
  {},
10879
- ['span', vueStyle, 'Reactive'],
10926
+ ['span', vueStyle, isShallow(obj) ? 'ShallowReactive' : 'Reactive'],
10880
10927
  '<',
10881
10928
  formatValue(obj),
10882
10929
  `>${isReadonly(obj) ? ` (readonly)` : ``}`
@@ -10886,7 +10933,7 @@ function initCustomFormatter() {
10886
10933
  return [
10887
10934
  'div',
10888
10935
  {},
10889
- ['span', vueStyle, 'Readonly'],
10936
+ ['span', vueStyle, isShallow(obj) ? 'ShallowReadonly' : 'Readonly'],
10890
10937
  '<',
10891
10938
  formatValue(obj),
10892
10939
  '>'
@@ -11015,7 +11062,7 @@ function initCustomFormatter() {
11015
11062
  }
11016
11063
  }
11017
11064
  function genRefFlag(v) {
11018
- if (v._shallow) {
11065
+ if (isShallow(v)) {
11019
11066
  return `ShallowRef`;
11020
11067
  }
11021
11068
  if (v.effect) {
@@ -11059,7 +11106,7 @@ function isMemoSame(cached, memo) {
11059
11106
  }
11060
11107
 
11061
11108
  // Core API ------------------------------------------------------------------
11062
- const version = "3.2.27";
11109
+ const version = "3.2.31";
11063
11110
  const _ssrUtils = {
11064
11111
  createComponentInstance,
11065
11112
  setupComponent,
@@ -11148,7 +11195,10 @@ const nodeOps = {
11148
11195
  insertStaticContent(content, parent, anchor, isSVG, start, end) {
11149
11196
  // <parent> before | first ... last | anchor </parent>
11150
11197
  const before = anchor ? anchor.previousSibling : parent.lastChild;
11151
- if (start && end) {
11198
+ // #5308 can only take cached path if:
11199
+ // - has a single root node
11200
+ // - nextSibling info is still available
11201
+ if (start && (start === end || start.nextSibling)) {
11152
11202
  // cached
11153
11203
  while (true) {
11154
11204
  parent.insertBefore(start.cloneNode(true), anchor);
@@ -11498,7 +11548,7 @@ function patchStopImmediatePropagation(e, value) {
11498
11548
  originalStop.call(e);
11499
11549
  e._stopped = true;
11500
11550
  };
11501
- return value.map(fn => (e) => !e._stopped && fn(e));
11551
+ return value.map(fn => (e) => !e._stopped && fn && fn(e));
11502
11552
  }
11503
11553
  else {
11504
11554
  return value;
@@ -12864,6 +12914,7 @@ var runtimeDom = /*#__PURE__*/Object.freeze({
12864
12914
  isProxy: isProxy,
12865
12915
  isReactive: isReactive,
12866
12916
  isReadonly: isReadonly,
12917
+ isShallow: isShallow,
12867
12918
  customRef: customRef,
12868
12919
  triggerRef: triggerRef,
12869
12920
  shallowRef: shallowRef,
@@ -13605,13 +13656,13 @@ const deprecationData$1 = {
13605
13656
  message: `Platform-native elements with "is" prop will no longer be ` +
13606
13657
  `treated as components in Vue 3 unless the "is" value is explicitly ` +
13607
13658
  `prefixed with "vue:".`,
13608
- link: `https://v3.vuejs.org/guide/migration/custom-elements-interop.html`
13659
+ link: `https://v3-migration.vuejs.org/breaking-changes/custom-elements-interop.html`
13609
13660
  },
13610
13661
  ["COMPILER_V_BIND_SYNC" /* COMPILER_V_BIND_SYNC */]: {
13611
13662
  message: key => `.sync modifier for v-bind has been removed. Use v-model with ` +
13612
13663
  `argument instead. \`v-bind:${key}.sync\` should be changed to ` +
13613
13664
  `\`v-model:${key}\`.`,
13614
- link: `https://v3.vuejs.org/guide/migration/v-model.html`
13665
+ link: `https://v3-migration.vuejs.org/breaking-changes/v-model.html`
13615
13666
  },
13616
13667
  ["COMPILER_V_BIND_PROP" /* COMPILER_V_BIND_PROP */]: {
13617
13668
  message: `.prop modifier for v-bind has been removed and no longer necessary. ` +
@@ -13623,11 +13674,11 @@ const deprecationData$1 = {
13623
13674
  `that appears before v-bind in the case of conflict. ` +
13624
13675
  `To retain 2.x behavior, move v-bind to make it the first attribute. ` +
13625
13676
  `You can also suppress this warning if the usage is intended.`,
13626
- link: `https://v3.vuejs.org/guide/migration/v-bind.html`
13677
+ link: `https://v3-migration.vuejs.org/breaking-changes/v-bind.html`
13627
13678
  },
13628
13679
  ["COMPILER_V_ON_NATIVE" /* COMPILER_V_ON_NATIVE */]: {
13629
13680
  message: `.native modifier for v-on has been removed as is no longer necessary.`,
13630
- link: `https://v3.vuejs.org/guide/migration/v-on-native-modifier-removed.html`
13681
+ link: `https://v3-migration.vuejs.org/breaking-changes/v-on-native-modifier-removed.html`
13631
13682
  },
13632
13683
  ["COMPILER_V_IF_V_FOR_PRECEDENCE" /* COMPILER_V_IF_V_FOR_PRECEDENCE */]: {
13633
13684
  message: `v-if / v-for precedence when used on the same element has changed ` +
@@ -13635,7 +13686,7 @@ const deprecationData$1 = {
13635
13686
  `access to v-for scope variables. It is best to avoid the ambiguity ` +
13636
13687
  `with <template> tags or use a computed property that filters v-for ` +
13637
13688
  `data source.`,
13638
- link: `https://v3.vuejs.org/guide/migration/v-if-v-for.html`
13689
+ link: `https://v3-migration.vuejs.org/breaking-changes/v-if-v-for.html`
13639
13690
  },
13640
13691
  ["COMPILER_NATIVE_TEMPLATE" /* COMPILER_NATIVE_TEMPLATE */]: {
13641
13692
  message: `<template> with no special directives will render as a native template ` +
@@ -13643,13 +13694,13 @@ const deprecationData$1 = {
13643
13694
  },
13644
13695
  ["COMPILER_INLINE_TEMPLATE" /* COMPILER_INLINE_TEMPLATE */]: {
13645
13696
  message: `"inline-template" has been removed in Vue 3.`,
13646
- link: `https://v3.vuejs.org/guide/migration/inline-template-attribute.html`
13697
+ link: `https://v3-migration.vuejs.org/breaking-changes/inline-template-attribute.html`
13647
13698
  },
13648
13699
  ["COMPILER_FILTER" /* COMPILER_FILTERS */]: {
13649
13700
  message: `filters have been removed in Vue 3. ` +
13650
13701
  `The "|" symbol will be treated as native JavaScript bitwise OR operator. ` +
13651
13702
  `Use method calls or computed properties instead.`,
13652
- link: `https://v3.vuejs.org/guide/migration/filters.html`
13703
+ link: `https://v3-migration.vuejs.org/breaking-changes/filters.html`
13653
13704
  }
13654
13705
  };
13655
13706
  function getCompatValue(key, context) {
@@ -14179,7 +14230,7 @@ function parseAttributes(context, type) {
14179
14230
  }
14180
14231
  const attr = parseAttribute(context, attributeNames);
14181
14232
  // Trim whitespace between class
14182
- // https://github.com/vuejs/vue-next/issues/4251
14233
+ // https://github.com/vuejs/core/issues/4251
14183
14234
  if (attr.type === 6 /* ATTRIBUTE */ &&
14184
14235
  attr.value &&
14185
14236
  attr.name === 'class') {
@@ -14415,7 +14466,7 @@ function parseTextData(context, length, mode) {
14415
14466
  advanceBy(context, length);
14416
14467
  if (mode === 2 /* RAWTEXT */ ||
14417
14468
  mode === 3 /* CDATA */ ||
14418
- rawText.indexOf('&') === -1) {
14469
+ !rawText.includes('&')) {
14419
14470
  return rawText;
14420
14471
  }
14421
14472
  else {
@@ -16157,7 +16208,7 @@ function isReferenced(node, parent, grandparent) {
16157
16208
  // no: NODE.target
16158
16209
  case 'MetaProperty':
16159
16210
  return false;
16160
- // yes: type X = { somePropert: NODE }
16211
+ // yes: type X = { someProperty: NODE }
16161
16212
  // no: type X = { NODE: OtherType }
16162
16213
  case 'ObjectTypeProperty':
16163
16214
  return parent.key !== node;
@@ -16668,6 +16719,7 @@ const transformFor = createStructuralDirectiveTransform('for', (node, dir, conte
16668
16719
  const renderExp = createCallExpression(helper(RENDER_LIST), [
16669
16720
  forNode.source
16670
16721
  ]);
16722
+ const isTemplate = isTemplateNode(node);
16671
16723
  const memo = findDir(node, 'memo');
16672
16724
  const keyProp = findProp(node, `key`);
16673
16725
  const keyExp = keyProp &&
@@ -16675,15 +16727,17 @@ const transformFor = createStructuralDirectiveTransform('for', (node, dir, conte
16675
16727
  ? createSimpleExpression(keyProp.value.content, true)
16676
16728
  : keyProp.exp);
16677
16729
  const keyProperty = keyProp ? createObjectProperty(`key`, keyExp) : null;
16678
- if (context.prefixIdentifiers &&
16679
- keyProperty &&
16680
- keyProp.type !== 6 /* ATTRIBUTE */) {
16681
- // #2085 process :key expression needs to be processed in order for it
16682
- // to behave consistently for <template v-for> and <div v-for>.
16683
- // In the case of `<template v-for>`, the node is discarded and never
16684
- // traversed so its key expression won't be processed by the normal
16685
- // transforms.
16686
- keyProperty.value = processExpression(keyProperty.value, context);
16730
+ if (isTemplate) {
16731
+ // #2085 / #5288 process :key and v-memo expressions need to be
16732
+ // processed on `<template v-for>`. In this case the node is discarded
16733
+ // and never traversed so its binding expressions won't be processed
16734
+ // by the normal transforms.
16735
+ if (memo) {
16736
+ memo.exp = processExpression(memo.exp, context);
16737
+ }
16738
+ if (keyProperty && keyProp.type !== 6 /* ATTRIBUTE */) {
16739
+ keyProperty.value = processExpression(keyProperty.value, context);
16740
+ }
16687
16741
  }
16688
16742
  const isStableFragment = forNode.source.type === 4 /* SIMPLE_EXPRESSION */ &&
16689
16743
  forNode.source.constType > 0 /* NOT_CONSTANT */;
@@ -16697,7 +16751,6 @@ const transformFor = createStructuralDirectiveTransform('for', (node, dir, conte
16697
16751
  return () => {
16698
16752
  // finish the codegen now that all children have been traversed
16699
16753
  let childBlock;
16700
- const isTemplate = isTemplateNode(node);
16701
16754
  const { children } = forNode;
16702
16755
  // check <template v-for> key placement
16703
16756
  if (isTemplate) {
@@ -17614,7 +17667,7 @@ function buildProps(node, context, props = node.props, ssr = false) {
17614
17667
  }
17615
17668
  }
17616
17669
  }
17617
- else {
17670
+ else if (!isBuiltInDirective(name)) {
17618
17671
  // no built-in transform, this is a user custom directive.
17619
17672
  runtimeDirectives.push(prop);
17620
17673
  // custom dirs may use beforeUpdate so they need to force blocks