@vue/compat 3.2.21 → 3.2.25

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.
@@ -37,7 +37,7 @@ var Vue = (function () {
37
37
  const isSpecialBooleanAttr = /*#__PURE__*/ makeMap(specialBooleanAttrs);
38
38
  /**
39
39
  * Boolean attributes should be included if the value is truthy or ''.
40
- * e.g. <select multiple> compiles to { multiple: '' }
40
+ * e.g. `<select multiple>` compiles to `{ multiple: '' }`
41
41
  */
42
42
  function includeBooleanAttr(value) {
43
43
  return !!value || value === '';
@@ -269,7 +269,7 @@ var Vue = (function () {
269
269
  '' + parseInt(key, 10) === key;
270
270
  const isReservedProp = /*#__PURE__*/ makeMap(
271
271
  // the leading comma is intentional so empty string "" is also included
272
- ',key,ref,' +
272
+ ',key,ref,ref_for,ref_key,' +
273
273
  'onVnodeBeforeMount,onVnodeMounted,' +
274
274
  'onVnodeBeforeUpdate,onVnodeUpdated,' +
275
275
  'onVnodeBeforeUnmount,onVnodeUnmounted');
@@ -458,7 +458,7 @@ var Vue = (function () {
458
458
  let effectTrackDepth = 0;
459
459
  let trackOpBit = 1;
460
460
  /**
461
- * The bitwise track markers support at most 30 levels op recursion.
461
+ * The bitwise track markers support at most 30 levels of recursion.
462
462
  * This value is chosen to enable modern JS engines to use a SMI on all platforms.
463
463
  * When recursion depth is greater, fall back to using a full cleanup.
464
464
  */
@@ -779,7 +779,7 @@ var Vue = (function () {
779
779
  function createSetter(shallow = false) {
780
780
  return function set(target, key, value, receiver) {
781
781
  let oldValue = target[key];
782
- if (!shallow) {
782
+ if (!shallow && !isReadonly(value)) {
783
783
  value = toRaw(value);
784
784
  oldValue = toRaw(oldValue);
785
785
  if (!isArray(target) && isRef(oldValue) && !isRef(value)) {
@@ -1364,21 +1364,25 @@ var Vue = (function () {
1364
1364
  return ret;
1365
1365
  }
1366
1366
  class ObjectRefImpl {
1367
- constructor(_object, _key) {
1367
+ constructor(_object, _key, _defaultValue) {
1368
1368
  this._object = _object;
1369
1369
  this._key = _key;
1370
+ this._defaultValue = _defaultValue;
1370
1371
  this.__v_isRef = true;
1371
1372
  }
1372
1373
  get value() {
1373
- return this._object[this._key];
1374
+ const val = this._object[this._key];
1375
+ return val === undefined ? this._defaultValue : val;
1374
1376
  }
1375
1377
  set value(newVal) {
1376
1378
  this._object[this._key] = newVal;
1377
1379
  }
1378
1380
  }
1379
- function toRef(object, key) {
1381
+ function toRef(object, key, defaultValue) {
1380
1382
  const val = object[key];
1381
- return isRef(val) ? val : new ObjectRefImpl(object, key);
1383
+ return isRef(val)
1384
+ ? val
1385
+ : new ObjectRefImpl(object, key, defaultValue);
1382
1386
  }
1383
1387
 
1384
1388
  class ComputedRefImpl {
@@ -1585,6 +1589,7 @@ var Vue = (function () {
1585
1589
  }
1586
1590
  }
1587
1591
  function setDevtoolsHook(hook, target) {
1592
+ var _a, _b;
1588
1593
  devtools = hook;
1589
1594
  if (devtools) {
1590
1595
  devtools.enabled = true;
@@ -1597,7 +1602,10 @@ var Vue = (function () {
1597
1602
  // (#4815)
1598
1603
  // eslint-disable-next-line no-restricted-globals
1599
1604
  typeof window !== 'undefined' &&
1600
- !navigator.userAgent.includes('jsdom')) {
1605
+ // some envs mock window but not fully
1606
+ window.HTMLElement &&
1607
+ // also exclude jsdom
1608
+ !((_b = (_a = window.navigator) === null || _a === void 0 ? void 0 : _a.userAgent) === null || _b === void 0 ? void 0 : _b.includes('jsdom'))) {
1601
1609
  const replay = (target.__VUE_DEVTOOLS_HOOK_REPLAY__ =
1602
1610
  target.__VUE_DEVTOOLS_HOOK_REPLAY__ || []);
1603
1611
  replay.push((newHook) => {
@@ -1820,11 +1828,6 @@ var Vue = (function () {
1820
1828
  `Use "${newHook}" instead.`,
1821
1829
  link: `https://v3.vuejs.org/guide/migration/custom-directives.html`
1822
1830
  },
1823
- ["V_FOR_REF" /* V_FOR_REF */]: {
1824
- message: `Ref usage on v-for no longer creates array ref values in Vue 3. ` +
1825
- `Consider using function refs or refactor to avoid ref usage altogether.`,
1826
- link: `https://v3.vuejs.org/guide/migration/array-refs.html`
1827
- },
1828
1831
  ["V_ON_KEYCODE_MODIFIER" /* V_ON_KEYCODE_MODIFIER */]: {
1829
1832
  message: `Using keyCode as v-on modifier is no longer supported. ` +
1830
1833
  `Use kebab-case key name modifiers instead.`,
@@ -3231,7 +3234,8 @@ var Vue = (function () {
3231
3234
  const rawProps = toRaw(props);
3232
3235
  const { mode } = rawProps;
3233
3236
  // check mode
3234
- if (mode && !['in-out', 'out-in', 'default'].includes(mode)) {
3237
+ if (mode &&
3238
+ mode !== 'in-out' && mode !== 'out-in' && mode !== 'default') {
3235
3239
  warn$1(`invalid <transition> mode: ${mode}`);
3236
3240
  }
3237
3241
  // at this point children has a guaranteed length of 1.
@@ -3877,7 +3881,7 @@ var Vue = (function () {
3877
3881
  }
3878
3882
  current = current.parent;
3879
3883
  }
3880
- hook();
3884
+ return hook();
3881
3885
  });
3882
3886
  injectHook(type, wrappedHook, target);
3883
3887
  // In addition to registering it on the target instance, we walk up the parent
@@ -4655,7 +4659,7 @@ var Vue = (function () {
4655
4659
  continue;
4656
4660
  }
4657
4661
  }
4658
- if (value !== attrs[key]) {
4662
+ if (!(key in attrs) || value !== attrs[key]) {
4659
4663
  attrs[key] = value;
4660
4664
  hasAttrsChanged = true;
4661
4665
  }
@@ -5236,7 +5240,7 @@ var Vue = (function () {
5236
5240
  return vm;
5237
5241
  }
5238
5242
  }
5239
- Vue.version = "3.2.21";
5243
+ Vue.version = "3.2.25";
5240
5244
  Vue.config = singletonApp.config;
5241
5245
  Vue.use = (p, ...options) => {
5242
5246
  if (p && isFunction(p.install)) {
@@ -5587,7 +5591,7 @@ var Vue = (function () {
5587
5591
  ];
5588
5592
  const patched = new WeakSet();
5589
5593
  function defineReactive(obj, key, val) {
5590
- // it's possible for the orignial object to be mutated after being defined
5594
+ // it's possible for the original object to be mutated after being defined
5591
5595
  // and expecting reactivity... we are covering it here because this seems to
5592
5596
  // be a bit more common.
5593
5597
  if (isObject(val) && !isReactive(val) && !patched.has(val)) {
@@ -5807,6 +5811,102 @@ var Vue = (function () {
5807
5811
  };
5808
5812
  }
5809
5813
 
5814
+ /**
5815
+ * Function for handling a template ref
5816
+ */
5817
+ function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
5818
+ if (isArray(rawRef)) {
5819
+ rawRef.forEach((r, i) => setRef(r, oldRawRef && (isArray(oldRawRef) ? oldRawRef[i] : oldRawRef), parentSuspense, vnode, isUnmount));
5820
+ return;
5821
+ }
5822
+ if (isAsyncWrapper(vnode) && !isUnmount) {
5823
+ // when mounting async components, nothing needs to be done,
5824
+ // because the template ref is forwarded to inner component
5825
+ return;
5826
+ }
5827
+ const refValue = vnode.shapeFlag & 4 /* STATEFUL_COMPONENT */
5828
+ ? getExposeProxy(vnode.component) || vnode.component.proxy
5829
+ : vnode.el;
5830
+ const value = isUnmount ? null : refValue;
5831
+ const { i: owner, r: ref } = rawRef;
5832
+ if (!owner) {
5833
+ warn$1(`Missing ref owner context. ref cannot be used on hoisted vnodes. ` +
5834
+ `A vnode with ref must be created inside the render function.`);
5835
+ return;
5836
+ }
5837
+ const oldRef = oldRawRef && oldRawRef.r;
5838
+ const refs = owner.refs === EMPTY_OBJ ? (owner.refs = {}) : owner.refs;
5839
+ const setupState = owner.setupState;
5840
+ // dynamic ref changed. unset old ref
5841
+ if (oldRef != null && oldRef !== ref) {
5842
+ if (isString(oldRef)) {
5843
+ refs[oldRef] = null;
5844
+ if (hasOwn(setupState, oldRef)) {
5845
+ setupState[oldRef] = null;
5846
+ }
5847
+ }
5848
+ else if (isRef(oldRef)) {
5849
+ oldRef.value = null;
5850
+ }
5851
+ }
5852
+ if (isFunction(ref)) {
5853
+ callWithErrorHandling(ref, owner, 12 /* FUNCTION_REF */, [value, refs]);
5854
+ }
5855
+ else {
5856
+ const _isString = isString(ref);
5857
+ const _isRef = isRef(ref);
5858
+ if (_isString || _isRef) {
5859
+ const doSet = () => {
5860
+ if (rawRef.f) {
5861
+ const existing = _isString ? refs[ref] : ref.value;
5862
+ if (isUnmount) {
5863
+ isArray(existing) && remove(existing, refValue);
5864
+ }
5865
+ else {
5866
+ if (!isArray(existing)) {
5867
+ if (_isString) {
5868
+ refs[ref] = [refValue];
5869
+ }
5870
+ else {
5871
+ ref.value = [refValue];
5872
+ if (rawRef.k)
5873
+ refs[rawRef.k] = ref.value;
5874
+ }
5875
+ }
5876
+ else if (!existing.includes(refValue)) {
5877
+ existing.push(refValue);
5878
+ }
5879
+ }
5880
+ }
5881
+ else if (_isString) {
5882
+ refs[ref] = value;
5883
+ if (hasOwn(setupState, ref)) {
5884
+ setupState[ref] = value;
5885
+ }
5886
+ }
5887
+ else if (isRef(ref)) {
5888
+ ref.value = value;
5889
+ if (rawRef.k)
5890
+ refs[rawRef.k] = value;
5891
+ }
5892
+ else {
5893
+ warn$1('Invalid template ref type:', ref, `(${typeof ref})`);
5894
+ }
5895
+ };
5896
+ if (value) {
5897
+ doSet.id = -1;
5898
+ queuePostRenderEffect(doSet, parentSuspense);
5899
+ }
5900
+ else {
5901
+ doSet();
5902
+ }
5903
+ }
5904
+ else {
5905
+ warn$1('Invalid template ref type:', ref, `(${typeof ref})`);
5906
+ }
5907
+ }
5908
+ }
5909
+
5810
5910
  let hasMismatch = false;
5811
5911
  const isSVGContainer = (container) => /svg/.test(container.namespaceURI) && container.tagName !== 'foreignObject';
5812
5912
  const isComment = (node) => node.nodeType === 8 /* COMMENT */;
@@ -6168,44 +6268,6 @@ var Vue = (function () {
6168
6268
  return supported;
6169
6269
  }
6170
6270
 
6171
- function convertLegacyRefInFor(vnode) {
6172
- // refInFor
6173
- if (vnode.props && vnode.props.refInFor) {
6174
- delete vnode.props.refInFor;
6175
- if (vnode.ref) {
6176
- if (isArray(vnode.ref)) {
6177
- vnode.ref.forEach(r => (r.f = true));
6178
- }
6179
- else {
6180
- vnode.ref.f = true;
6181
- }
6182
- }
6183
- }
6184
- }
6185
- function registerLegacyRef(refs, key, value, owner, isInFor, isUnmount) {
6186
- const existing = refs[key];
6187
- if (isUnmount) {
6188
- if (isArray(existing)) {
6189
- remove(existing, value);
6190
- }
6191
- else {
6192
- refs[key] = null;
6193
- }
6194
- }
6195
- else if (isInFor) {
6196
- warnDeprecation("V_FOR_REF" /* V_FOR_REF */, owner);
6197
- if (!isArray(existing)) {
6198
- refs[key] = [value];
6199
- }
6200
- else if (!existing.includes(value)) {
6201
- existing.push(value);
6202
- }
6203
- }
6204
- else {
6205
- refs[key] = value;
6206
- }
6207
- }
6208
-
6209
6271
  const queuePostRenderEffect = queueEffectWithSuspense
6210
6272
  ;
6211
6273
  /**
@@ -6477,12 +6539,15 @@ var Vue = (function () {
6477
6539
  const oldProps = n1.props || EMPTY_OBJ;
6478
6540
  const newProps = n2.props || EMPTY_OBJ;
6479
6541
  let vnodeHook;
6542
+ // disable recurse in beforeUpdate hooks
6543
+ parentComponent && toggleRecurse(parentComponent, false);
6480
6544
  if ((vnodeHook = newProps.onVnodeBeforeUpdate)) {
6481
6545
  invokeVNodeHook(vnodeHook, parentComponent, n2, n1);
6482
6546
  }
6483
6547
  if (dirs) {
6484
6548
  invokeDirectiveHook(n2, n1, parentComponent, 'beforeUpdate');
6485
6549
  }
6550
+ parentComponent && toggleRecurse(parentComponent, true);
6486
6551
  if (isHmrUpdating) {
6487
6552
  // HMR updated, force full diff
6488
6553
  patchFlag = 0;
@@ -6766,7 +6831,7 @@ var Vue = (function () {
6766
6831
  const { el, props } = initialVNode;
6767
6832
  const { bm, m, parent } = instance;
6768
6833
  const isAsyncWrapperVNode = isAsyncWrapper(initialVNode);
6769
- effect.allowRecurse = false;
6834
+ toggleRecurse(instance, false);
6770
6835
  // beforeMount hook
6771
6836
  if (bm) {
6772
6837
  invokeArrayFns(bm);
@@ -6779,7 +6844,7 @@ var Vue = (function () {
6779
6844
  if (isCompatEnabled("INSTANCE_EVENT_HOOKS" /* INSTANCE_EVENT_HOOKS */, instance)) {
6780
6845
  instance.emit('hook:beforeMount');
6781
6846
  }
6782
- effect.allowRecurse = true;
6847
+ toggleRecurse(instance, true);
6783
6848
  if (el && hydrateNode) {
6784
6849
  // vnode has adopted host node - perform hydration instead of mount.
6785
6850
  const hydrateSubTree = () => {
@@ -6867,7 +6932,7 @@ var Vue = (function () {
6867
6932
  pushWarningContext(next || instance.vnode);
6868
6933
  }
6869
6934
  // Disallow component effect recursion during pre-lifecycle hooks.
6870
- effect.allowRecurse = false;
6935
+ toggleRecurse(instance, false);
6871
6936
  if (next) {
6872
6937
  next.el = vnode.el;
6873
6938
  updateComponentPreRender(instance, next, optimized);
@@ -6886,7 +6951,7 @@ var Vue = (function () {
6886
6951
  if (isCompatEnabled("INSTANCE_EVENT_HOOKS" /* INSTANCE_EVENT_HOOKS */, instance)) {
6887
6952
  instance.emit('hook:beforeUpdate');
6888
6953
  }
6889
- effect.allowRecurse = true;
6954
+ toggleRecurse(instance, true);
6890
6955
  // render
6891
6956
  {
6892
6957
  startMeasure(instance, `render`);
@@ -6935,13 +7000,13 @@ var Vue = (function () {
6935
7000
  }
6936
7001
  };
6937
7002
  // create reactive effect for rendering
6938
- const effect = new ReactiveEffect(componentUpdateFn, () => queueJob(instance.update), instance.scope // track it in component's effect scope
6939
- );
7003
+ const effect = (instance.effect = new ReactiveEffect(componentUpdateFn, () => queueJob(instance.update), instance.scope // track it in component's effect scope
7004
+ ));
6940
7005
  const update = (instance.update = effect.run.bind(effect));
6941
7006
  update.id = instance.uid;
6942
7007
  // allowRecurse
6943
7008
  // #1801, #2043 component render effects should allow recursive updates
6944
- effect.allowRecurse = update.allowRecurse = true;
7009
+ toggleRecurse(instance, true);
6945
7010
  {
6946
7011
  effect.onTrack = instance.rtc
6947
7012
  ? e => invokeArrayFns(instance.rtc, e)
@@ -7471,88 +7536,8 @@ var Vue = (function () {
7471
7536
  createApp: createAppAPI(render, hydrate)
7472
7537
  };
7473
7538
  }
7474
- function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
7475
- if (isArray(rawRef)) {
7476
- rawRef.forEach((r, i) => setRef(r, oldRawRef && (isArray(oldRawRef) ? oldRawRef[i] : oldRawRef), parentSuspense, vnode, isUnmount));
7477
- return;
7478
- }
7479
- if (isAsyncWrapper(vnode) && !isUnmount) {
7480
- // when mounting async components, nothing needs to be done,
7481
- // because the template ref is forwarded to inner component
7482
- return;
7483
- }
7484
- const refValue = vnode.shapeFlag & 4 /* STATEFUL_COMPONENT */
7485
- ? getExposeProxy(vnode.component) || vnode.component.proxy
7486
- : vnode.el;
7487
- const value = isUnmount ? null : refValue;
7488
- const { i: owner, r: ref } = rawRef;
7489
- if (!owner) {
7490
- warn$1(`Missing ref owner context. ref cannot be used on hoisted vnodes. ` +
7491
- `A vnode with ref must be created inside the render function.`);
7492
- return;
7493
- }
7494
- const oldRef = oldRawRef && oldRawRef.r;
7495
- const refs = owner.refs === EMPTY_OBJ ? (owner.refs = {}) : owner.refs;
7496
- const setupState = owner.setupState;
7497
- // dynamic ref changed. unset old ref
7498
- if (oldRef != null && oldRef !== ref) {
7499
- if (isString(oldRef)) {
7500
- refs[oldRef] = null;
7501
- if (hasOwn(setupState, oldRef)) {
7502
- setupState[oldRef] = null;
7503
- }
7504
- }
7505
- else if (isRef(oldRef)) {
7506
- oldRef.value = null;
7507
- }
7508
- }
7509
- if (isString(ref)) {
7510
- const doSet = () => {
7511
- if (isCompatEnabled("V_FOR_REF" /* V_FOR_REF */, owner)) {
7512
- registerLegacyRef(refs, ref, refValue, owner, rawRef.f, isUnmount);
7513
- }
7514
- else {
7515
- refs[ref] = value;
7516
- }
7517
- if (hasOwn(setupState, ref)) {
7518
- setupState[ref] = value;
7519
- }
7520
- };
7521
- // #1789: for non-null values, set them after render
7522
- // null values means this is unmount and it should not overwrite another
7523
- // ref with the same key
7524
- if (value) {
7525
- doSet.id = -1;
7526
- queuePostRenderEffect(doSet, parentSuspense);
7527
- }
7528
- else {
7529
- doSet();
7530
- }
7531
- }
7532
- else if (isRef(ref)) {
7533
- const doSet = () => {
7534
- ref.value = value;
7535
- };
7536
- if (value) {
7537
- doSet.id = -1;
7538
- queuePostRenderEffect(doSet, parentSuspense);
7539
- }
7540
- else {
7541
- doSet();
7542
- }
7543
- }
7544
- else if (isFunction(ref)) {
7545
- callWithErrorHandling(ref, owner, 12 /* FUNCTION_REF */, [value, refs]);
7546
- }
7547
- else {
7548
- warn$1('Invalid template ref type:', value, `(${typeof value})`);
7549
- }
7550
- }
7551
- function invokeVNodeHook(hook, instance, vnode, prevVNode = null) {
7552
- callWithAsyncErrorHandling(hook, instance, 7 /* VNODE_HOOK */, [
7553
- vnode,
7554
- prevVNode
7555
- ]);
7539
+ function toggleRecurse({ effect, update }, allowed) {
7540
+ effect.allowRecurse = update.allowRecurse = allowed;
7556
7541
  }
7557
7542
  /**
7558
7543
  * #1156
@@ -7562,8 +7547,8 @@ var Vue = (function () {
7562
7547
  *
7563
7548
  * #2080
7564
7549
  * Inside keyed `template` fragment static children, if a fragment is moved,
7565
- * the children will always moved so that need inherit el form previous nodes
7566
- * to ensure correct moved position.
7550
+ * the children will always be moved. Therefore, in order to ensure correct move
7551
+ * position, el should be inherited from previous nodes.
7567
7552
  */
7568
7553
  function traverseStaticChildren(n1, n2, shallow = false) {
7569
7554
  const ch1 = n1.children;
@@ -8201,6 +8186,7 @@ var Vue = (function () {
8201
8186
  };
8202
8187
  Func.props = comp.props;
8203
8188
  Func.displayName = comp.name;
8189
+ Func.compatConfig = comp.compatConfig;
8204
8190
  // v2 functional components do not inherit attrs
8205
8191
  Func.inheritAttrs = false;
8206
8192
  normalizedFunctionalComponentMap.set(comp, Func);
@@ -8346,10 +8332,10 @@ var Vue = (function () {
8346
8332
  };
8347
8333
  const InternalObjectKey = `__vInternal`;
8348
8334
  const normalizeKey = ({ key }) => key != null ? key : null;
8349
- const normalizeRef = ({ ref }) => {
8335
+ const normalizeRef = ({ ref, ref_key, ref_for }) => {
8350
8336
  return (ref != null
8351
8337
  ? isString(ref) || isRef(ref) || isFunction(ref)
8352
- ? { i: currentRenderingInstance, r: ref }
8338
+ ? { i: currentRenderingInstance, r: ref, k: ref_key, f: !!ref_for }
8353
8339
  : ref
8354
8340
  : null);
8355
8341
  };
@@ -8417,7 +8403,6 @@ var Vue = (function () {
8417
8403
  }
8418
8404
  {
8419
8405
  convertLegacyVModelProps(vnode);
8420
- convertLegacyRefInFor(vnode);
8421
8406
  defineLegacyVNodeProperties(vnode);
8422
8407
  }
8423
8408
  return vnode;
@@ -8690,7 +8675,8 @@ var Vue = (function () {
8690
8675
  else if (isOn(key)) {
8691
8676
  const existing = ret[key];
8692
8677
  const incoming = toMerge[key];
8693
- if (existing !== incoming) {
8678
+ if (existing !== incoming &&
8679
+ !(isArray(existing) && existing.includes(incoming))) {
8694
8680
  ret[key] = existing
8695
8681
  ? [].concat(existing, incoming)
8696
8682
  : incoming;
@@ -8702,6 +8688,12 @@ var Vue = (function () {
8702
8688
  }
8703
8689
  }
8704
8690
  return ret;
8691
+ }
8692
+ function invokeVNodeHook(hook, instance, vnode, prevVNode = null) {
8693
+ callWithAsyncErrorHandling(hook, instance, 7 /* VNODE_HOOK */, [
8694
+ vnode,
8695
+ prevVNode
8696
+ ]);
8705
8697
  }
8706
8698
 
8707
8699
  function getCompatChildren(instance) {
@@ -9134,23 +9126,23 @@ var Vue = (function () {
9134
9126
  const n = accessCache[key];
9135
9127
  if (n !== undefined) {
9136
9128
  switch (n) {
9137
- case 0 /* SETUP */:
9129
+ case 1 /* SETUP */:
9138
9130
  return setupState[key];
9139
- case 1 /* DATA */:
9131
+ case 2 /* DATA */:
9140
9132
  return data[key];
9141
- case 3 /* CONTEXT */:
9133
+ case 4 /* CONTEXT */:
9142
9134
  return ctx[key];
9143
- case 2 /* PROPS */:
9135
+ case 3 /* PROPS */:
9144
9136
  return props[key];
9145
9137
  // default: just fallthrough
9146
9138
  }
9147
9139
  }
9148
9140
  else if (setupState !== EMPTY_OBJ && hasOwn(setupState, key)) {
9149
- accessCache[key] = 0 /* SETUP */;
9141
+ accessCache[key] = 1 /* SETUP */;
9150
9142
  return setupState[key];
9151
9143
  }
9152
9144
  else if (data !== EMPTY_OBJ && hasOwn(data, key)) {
9153
- accessCache[key] = 1 /* DATA */;
9145
+ accessCache[key] = 2 /* DATA */;
9154
9146
  return data[key];
9155
9147
  }
9156
9148
  else if (
@@ -9158,15 +9150,15 @@ var Vue = (function () {
9158
9150
  // props
9159
9151
  (normalizedProps = instance.propsOptions[0]) &&
9160
9152
  hasOwn(normalizedProps, key)) {
9161
- accessCache[key] = 2 /* PROPS */;
9153
+ accessCache[key] = 3 /* PROPS */;
9162
9154
  return props[key];
9163
9155
  }
9164
9156
  else if (ctx !== EMPTY_OBJ && hasOwn(ctx, key)) {
9165
- accessCache[key] = 3 /* CONTEXT */;
9157
+ accessCache[key] = 4 /* CONTEXT */;
9166
9158
  return ctx[key];
9167
9159
  }
9168
9160
  else if (shouldCacheAccess) {
9169
- accessCache[key] = 4 /* OTHER */;
9161
+ accessCache[key] = 0 /* OTHER */;
9170
9162
  }
9171
9163
  }
9172
9164
  const publicGetter = publicPropertiesMap[key];
@@ -9187,7 +9179,7 @@ var Vue = (function () {
9187
9179
  }
9188
9180
  else if (ctx !== EMPTY_OBJ && hasOwn(ctx, key)) {
9189
9181
  // user may set custom properties to `this` that start with `$`
9190
- accessCache[key] = 3 /* CONTEXT */;
9182
+ accessCache[key] = 4 /* CONTEXT */;
9191
9183
  return ctx[key];
9192
9184
  }
9193
9185
  else if (
@@ -9255,7 +9247,7 @@ var Vue = (function () {
9255
9247
  },
9256
9248
  has({ _: { data, setupState, accessCache, ctx, appContext, propsOptions } }, key) {
9257
9249
  let normalizedProps;
9258
- return (accessCache[key] !== undefined ||
9250
+ return (!!accessCache[key] ||
9259
9251
  (data !== EMPTY_OBJ && hasOwn(data, key)) ||
9260
9252
  (setupState !== EMPTY_OBJ && hasOwn(setupState, key)) ||
9261
9253
  ((normalizedProps = propsOptions[0]) && hasOwn(normalizedProps, key)) ||
@@ -9361,6 +9353,7 @@ var Vue = (function () {
9361
9353
  root: null,
9362
9354
  next: null,
9363
9355
  subTree: null,
9356
+ effect: null,
9364
9357
  update: null,
9365
9358
  scope: new EffectScope(true /* detached */),
9366
9359
  render: null,
@@ -10825,7 +10818,7 @@ var Vue = (function () {
10825
10818
  }
10826
10819
 
10827
10820
  // Core API ------------------------------------------------------------------
10828
- const version = "3.2.21";
10821
+ const version = "3.2.25";
10829
10822
  /**
10830
10823
  * SSR utils for \@vue/server-renderer. Only exposed in cjs builds.
10831
10824
  * @internal
@@ -11092,12 +11085,19 @@ var Vue = (function () {
11092
11085
  el[key] = value == null ? '' : value;
11093
11086
  return;
11094
11087
  }
11095
- if (key === 'value' && el.tagName !== 'PROGRESS') {
11088
+ if (key === 'value' &&
11089
+ el.tagName !== 'PROGRESS' &&
11090
+ // custom elements may use _value internally
11091
+ !el.tagName.includes('-')) {
11096
11092
  // store value as _value as well since
11097
11093
  // non-string values will be stringified.
11098
11094
  el._value = value;
11099
11095
  const newValue = value == null ? '' : value;
11100
- if (el.value !== newValue) {
11096
+ if (el.value !== newValue ||
11097
+ // #4956: always set for OPTION elements because its value falls back to
11098
+ // textContent if no value attribute is present. And setting .value for
11099
+ // OPTION has no side effect
11100
+ el.tagName === 'OPTION') {
11101
11101
  el.value = newValue;
11102
11102
  }
11103
11103
  if (value == null) {
@@ -11493,7 +11493,7 @@ var Vue = (function () {
11493
11493
  // HMR
11494
11494
  {
11495
11495
  instance.ceReload = newStyles => {
11496
- // alawys reset styles
11496
+ // always reset styles
11497
11497
  if (this._styles) {
11498
11498
  this._styles.forEach(s => this.shadowRoot.removeChild(s));
11499
11499
  this._styles.length = 0;