vue 3.2.44 → 3.2.45

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.
@@ -2101,12 +2101,6 @@ var Vue = (function (exports) {
2101
2101
  // components to be unmounted and re-mounted. Queue the update so that we
2102
2102
  // don't end up forcing the same parent to re-render multiple times.
2103
2103
  queueJob(instance.parent.update);
2104
- // instance is the inner component of an async custom element
2105
- // invoke to reset styles
2106
- if (instance.parent.type.__asyncLoader &&
2107
- instance.parent.ceReload) {
2108
- instance.parent.ceReload(newComp.styles);
2109
- }
2110
2104
  }
2111
2105
  else if (instance.appContext.reload) {
2112
2106
  // root instance mounted via createApp() has a reload method
@@ -3954,10 +3948,15 @@ var Vue = (function (exports) {
3954
3948
  }
3955
3949
  });
3956
3950
  }
3957
- function createInnerComp(comp, { vnode: { ref, props, children, shapeFlag }, parent }) {
3951
+ function createInnerComp(comp, parent) {
3952
+ const { ref, props, children, ce } = parent.vnode;
3958
3953
  const vnode = createVNode(comp, props, children);
3959
3954
  // ensure inner component inherits the async wrapper's ref owner
3960
3955
  vnode.ref = ref;
3956
+ // pass the custom element callback on to the inner comp
3957
+ // and remove it from the async wrapper
3958
+ vnode.ce = ce;
3959
+ delete parent.vnode.ce;
3961
3960
  return vnode;
3962
3961
  }
3963
3962
 
@@ -4115,8 +4114,7 @@ var Vue = (function (exports) {
4115
4114
  : comp);
4116
4115
  const { include, exclude, max } = props;
4117
4116
  if ((include && (!name || !matches(include, name))) ||
4118
- (exclude && name && matches(exclude, name)) ||
4119
- (hmrDirtyComponents.has(comp))) {
4117
+ (exclude && name && matches(exclude, name))) {
4120
4118
  current = vnode;
4121
4119
  return rawVNode;
4122
4120
  }
@@ -4226,14 +4224,9 @@ var Vue = (function (exports) {
4226
4224
  }, target);
4227
4225
  }
4228
4226
  function resetShapeFlag(vnode) {
4229
- let shapeFlag = vnode.shapeFlag;
4230
- if (shapeFlag & 256 /* ShapeFlags.COMPONENT_SHOULD_KEEP_ALIVE */) {
4231
- shapeFlag -= 256 /* ShapeFlags.COMPONENT_SHOULD_KEEP_ALIVE */;
4232
- }
4233
- if (shapeFlag & 512 /* ShapeFlags.COMPONENT_KEPT_ALIVE */) {
4234
- shapeFlag -= 512 /* ShapeFlags.COMPONENT_KEPT_ALIVE */;
4235
- }
4236
- vnode.shapeFlag = shapeFlag;
4227
+ // bitwise operations to remove keep alive flags
4228
+ vnode.shapeFlag &= ~256 /* ShapeFlags.COMPONENT_SHOULD_KEEP_ALIVE */;
4229
+ vnode.shapeFlag &= ~512 /* ShapeFlags.COMPONENT_KEPT_ALIVE */;
4237
4230
  }
4238
4231
  function getInnerChild(vnode) {
4239
4232
  return vnode.shapeFlag & 128 /* ShapeFlags.SUSPENSE */ ? vnode.ssContent : vnode;
@@ -4532,7 +4525,9 @@ var Vue = (function (exports) {
4532
4525
  (currentRenderingInstance.parent &&
4533
4526
  isAsyncWrapper(currentRenderingInstance.parent) &&
4534
4527
  currentRenderingInstance.parent.isCE)) {
4535
- return createVNode('slot', name === 'default' ? null : { name }, fallback && fallback());
4528
+ if (name !== 'default')
4529
+ props.name = name;
4530
+ return createVNode('slot', props, fallback && fallback());
4536
4531
  }
4537
4532
  let slot = slots[name];
4538
4533
  if (slot && slot.length > 1) {
@@ -4632,6 +4627,7 @@ var Vue = (function (exports) {
4632
4627
  $watch: i => (instanceWatch.bind(i) )
4633
4628
  });
4634
4629
  const isReservedPrefix = (key) => key === '_' || key === '$';
4630
+ const hasSetupBinding = (state, key) => state !== EMPTY_OBJ && !state.__isScriptSetup && hasOwn(state, key);
4635
4631
  const PublicInstanceProxyHandlers = {
4636
4632
  get({ _: instance }, key) {
4637
4633
  const { ctx, setupState, data, props, accessCache, type, appContext } = instance;
@@ -4639,15 +4635,6 @@ var Vue = (function (exports) {
4639
4635
  if (key === '__isVue') {
4640
4636
  return true;
4641
4637
  }
4642
- // prioritize <script setup> bindings during dev.
4643
- // this allows even properties that start with _ or $ to be used - so that
4644
- // it aligns with the production behavior where the render fn is inlined and
4645
- // indeed has access to all declared variables.
4646
- if (setupState !== EMPTY_OBJ &&
4647
- setupState.__isScriptSetup &&
4648
- hasOwn(setupState, key)) {
4649
- return setupState[key];
4650
- }
4651
4638
  // data / props / ctx
4652
4639
  // This getter gets called for every property access on the render context
4653
4640
  // during render and is a major hotspot. The most expensive part of this
@@ -4670,7 +4657,7 @@ var Vue = (function (exports) {
4670
4657
  // default: just fallthrough
4671
4658
  }
4672
4659
  }
4673
- else if (setupState !== EMPTY_OBJ && hasOwn(setupState, key)) {
4660
+ else if (hasSetupBinding(setupState, key)) {
4674
4661
  accessCache[key] = 1 /* AccessTypes.SETUP */;
4675
4662
  return setupState[key];
4676
4663
  }
@@ -4740,21 +4727,26 @@ var Vue = (function (exports) {
4740
4727
  },
4741
4728
  set({ _: instance }, key, value) {
4742
4729
  const { data, setupState, ctx } = instance;
4743
- if (setupState !== EMPTY_OBJ && hasOwn(setupState, key)) {
4730
+ if (hasSetupBinding(setupState, key)) {
4744
4731
  setupState[key] = value;
4745
4732
  return true;
4746
4733
  }
4734
+ else if (setupState.__isScriptSetup &&
4735
+ hasOwn(setupState, key)) {
4736
+ warn$1(`Cannot mutate <script setup> binding "${key}" from Options API.`);
4737
+ return false;
4738
+ }
4747
4739
  else if (data !== EMPTY_OBJ && hasOwn(data, key)) {
4748
4740
  data[key] = value;
4749
4741
  return true;
4750
4742
  }
4751
4743
  else if (hasOwn(instance.props, key)) {
4752
- warn$1(`Attempting to mutate prop "${key}". Props are readonly.`, instance);
4744
+ warn$1(`Attempting to mutate prop "${key}". Props are readonly.`);
4753
4745
  return false;
4754
4746
  }
4755
4747
  if (key[0] === '$' && key.slice(1) in instance) {
4756
4748
  warn$1(`Attempting to mutate public property "${key}". ` +
4757
- `Properties starting with $ are reserved and readonly.`, instance);
4749
+ `Properties starting with $ are reserved and readonly.`);
4758
4750
  return false;
4759
4751
  }
4760
4752
  else {
@@ -4775,7 +4767,7 @@ var Vue = (function (exports) {
4775
4767
  let normalizedProps;
4776
4768
  return (!!accessCache[key] ||
4777
4769
  (data !== EMPTY_OBJ && hasOwn(data, key)) ||
4778
- (setupState !== EMPTY_OBJ && hasOwn(setupState, key)) ||
4770
+ hasSetupBinding(setupState, key) ||
4779
4771
  ((normalizedProps = propsOptions[0]) && hasOwn(normalizedProps, key)) ||
4780
4772
  hasOwn(ctx, key) ||
4781
4773
  hasOwn(publicPropertiesMap, key) ||
@@ -7814,6 +7806,10 @@ var Vue = (function (exports) {
7814
7806
  if (!shallow)
7815
7807
  traverseStaticChildren(c1, c2);
7816
7808
  }
7809
+ // #6852 also inherit for text nodes
7810
+ if (c2.type === Text) {
7811
+ c2.el = c1.el;
7812
+ }
7817
7813
  // also inherit for comment nodes, but not placeholders (e.g. v-if which
7818
7814
  // would have received .el during block patch)
7819
7815
  if (c2.type === Comment && !c2.el) {
@@ -7984,6 +7980,7 @@ var Vue = (function (exports) {
7984
7980
  }
7985
7981
  }
7986
7982
  }
7983
+ updateCssVars(n2);
7987
7984
  },
7988
7985
  remove(vnode, parentComponent, parentSuspense, optimized, { um: unmount, o: { remove: hostRemove } }, doRemove) {
7989
7986
  const { shapeFlag, children, anchor, targetAnchor, target, props } = vnode;
@@ -8062,11 +8059,26 @@ var Vue = (function (exports) {
8062
8059
  hydrateChildren(targetNode, vnode, target, parentComponent, parentSuspense, slotScopeIds, optimized);
8063
8060
  }
8064
8061
  }
8062
+ updateCssVars(vnode);
8065
8063
  }
8066
8064
  return vnode.anchor && nextSibling(vnode.anchor);
8067
8065
  }
8068
8066
  // Force-casted public typing for h and TSX props inference
8069
8067
  const Teleport = TeleportImpl;
8068
+ function updateCssVars(vnode) {
8069
+ // presence of .ut method indicates owner component uses css vars.
8070
+ // code path here can assume browser environment.
8071
+ const ctx = vnode.ctx;
8072
+ if (ctx && ctx.ut) {
8073
+ let node = vnode.children[0].el;
8074
+ while (node !== vnode.targetAnchor) {
8075
+ if (node.nodeType === 1)
8076
+ node.setAttribute('data-v-owner', ctx.uid);
8077
+ node = node.nextSibling;
8078
+ }
8079
+ ctx.ut();
8080
+ }
8081
+ }
8070
8082
 
8071
8083
  const Fragment = Symbol('Fragment' );
8072
8084
  const Text = Symbol('Text' );
@@ -8161,6 +8173,10 @@ var Vue = (function (exports) {
8161
8173
  function isSameVNodeType(n1, n2) {
8162
8174
  if (n2.shapeFlag & 6 /* ShapeFlags.COMPONENT */ &&
8163
8175
  hmrDirtyComponents.has(n2.type)) {
8176
+ // #7042, ensure the vnode being unmounted during HMR
8177
+ // bitwise operations to remove keep alive flags
8178
+ n1.shapeFlag &= ~256 /* ShapeFlags.COMPONENT_SHOULD_KEEP_ALIVE */;
8179
+ n2.shapeFlag &= ~512 /* ShapeFlags.COMPONENT_KEPT_ALIVE */;
8164
8180
  // HMR only: if the component has been hot-updated, force a reload.
8165
8181
  return false;
8166
8182
  }
@@ -8216,7 +8232,8 @@ var Vue = (function (exports) {
8216
8232
  patchFlag,
8217
8233
  dynamicProps,
8218
8234
  dynamicChildren: null,
8219
- appContext: null
8235
+ appContext: null,
8236
+ ctx: currentRenderingInstance
8220
8237
  };
8221
8238
  if (needFullChildrenNormalization) {
8222
8239
  normalizeChildren(vnode, children);
@@ -8383,7 +8400,8 @@ var Vue = (function (exports) {
8383
8400
  ssContent: vnode.ssContent && cloneVNode(vnode.ssContent),
8384
8401
  ssFallback: vnode.ssFallback && cloneVNode(vnode.ssFallback),
8385
8402
  el: vnode.el,
8386
- anchor: vnode.anchor
8403
+ anchor: vnode.anchor,
8404
+ ctx: vnode.ctx
8387
8405
  };
8388
8406
  return cloned;
8389
8407
  }
@@ -9347,7 +9365,7 @@ var Vue = (function (exports) {
9347
9365
  }
9348
9366
 
9349
9367
  // Core API ------------------------------------------------------------------
9350
- const version = "3.2.44";
9368
+ const version = "3.2.45";
9351
9369
  /**
9352
9370
  * SSR utils for \@vue/server-renderer. Only exposed in ssr-possible builds.
9353
9371
  * @internal
@@ -9836,12 +9854,21 @@ var Vue = (function (exports) {
9836
9854
  `defined as hydratable. Use \`defineSSRCustomElement\`.`);
9837
9855
  }
9838
9856
  this.attachShadow({ mode: 'open' });
9857
+ if (!this._def.__asyncLoader) {
9858
+ // for sync component defs we can immediately resolve props
9859
+ this._resolveProps(this._def);
9860
+ }
9839
9861
  }
9840
9862
  }
9841
9863
  connectedCallback() {
9842
9864
  this._connected = true;
9843
9865
  if (!this._instance) {
9844
- this._resolveDef();
9866
+ if (this._resolved) {
9867
+ this._update();
9868
+ }
9869
+ else {
9870
+ this._resolveDef();
9871
+ }
9845
9872
  }
9846
9873
  }
9847
9874
  disconnectedCallback() {
@@ -9857,9 +9884,6 @@ var Vue = (function (exports) {
9857
9884
  * resolve inner component definition (handle possible async component)
9858
9885
  */
9859
9886
  _resolveDef() {
9860
- if (this._resolved) {
9861
- return;
9862
- }
9863
9887
  this._resolved = true;
9864
9888
  // set initial attrs
9865
9889
  for (let i = 0; i < this.attributes.length; i++) {
@@ -9871,38 +9895,26 @@ var Vue = (function (exports) {
9871
9895
  this._setAttr(m.attributeName);
9872
9896
  }
9873
9897
  }).observe(this, { attributes: true });
9874
- const resolve = (def) => {
9875
- const { props = {}, styles } = def;
9876
- const hasOptions = !isArray(props);
9877
- const rawKeys = props ? (hasOptions ? Object.keys(props) : props) : [];
9898
+ const resolve = (def, isAsync = false) => {
9899
+ const { props, styles } = def;
9878
9900
  // cast Number-type props set before resolve
9879
9901
  let numberProps;
9880
- if (hasOptions) {
9881
- for (const key in this._props) {
9902
+ if (props && !isArray(props)) {
9903
+ for (const key in props) {
9882
9904
  const opt = props[key];
9883
9905
  if (opt === Number || (opt && opt.type === Number)) {
9884
- this._props[key] = toNumber(this._props[key]);
9885
- (numberProps || (numberProps = Object.create(null)))[key] = true;
9906
+ if (key in this._props) {
9907
+ this._props[key] = toNumber(this._props[key]);
9908
+ }
9909
+ (numberProps || (numberProps = Object.create(null)))[camelize(key)] = true;
9886
9910
  }
9887
9911
  }
9888
9912
  }
9889
9913
  this._numberProps = numberProps;
9890
- // check if there are props set pre-upgrade or connect
9891
- for (const key of Object.keys(this)) {
9892
- if (key[0] !== '_') {
9893
- this._setProp(key, this[key], true, false);
9894
- }
9895
- }
9896
- // defining getter/setters on prototype
9897
- for (const key of rawKeys.map(camelize)) {
9898
- Object.defineProperty(this, key, {
9899
- get() {
9900
- return this._getProp(key);
9901
- },
9902
- set(val) {
9903
- this._setProp(key, val);
9904
- }
9905
- });
9914
+ if (isAsync) {
9915
+ // defining getter/setters on prototype
9916
+ // for sync defs, this already happened in the constructor
9917
+ this._resolveProps(def);
9906
9918
  }
9907
9919
  // apply CSS
9908
9920
  this._applyStyles(styles);
@@ -9911,12 +9923,33 @@ var Vue = (function (exports) {
9911
9923
  };
9912
9924
  const asyncDef = this._def.__asyncLoader;
9913
9925
  if (asyncDef) {
9914
- asyncDef().then(resolve);
9926
+ asyncDef().then(def => resolve(def, true));
9915
9927
  }
9916
9928
  else {
9917
9929
  resolve(this._def);
9918
9930
  }
9919
9931
  }
9932
+ _resolveProps(def) {
9933
+ const { props } = def;
9934
+ const declaredPropKeys = isArray(props) ? props : Object.keys(props || {});
9935
+ // check if there are props set pre-upgrade or connect
9936
+ for (const key of Object.keys(this)) {
9937
+ if (key[0] !== '_' && declaredPropKeys.includes(key)) {
9938
+ this._setProp(key, this[key], true, false);
9939
+ }
9940
+ }
9941
+ // defining getter/setters on prototype
9942
+ for (const key of declaredPropKeys.map(camelize)) {
9943
+ Object.defineProperty(this, key, {
9944
+ get() {
9945
+ return this._getProp(key);
9946
+ },
9947
+ set(val) {
9948
+ this._setProp(key, val);
9949
+ }
9950
+ });
9951
+ }
9952
+ }
9920
9953
  _setAttr(key) {
9921
9954
  let value = this.getAttribute(key);
9922
9955
  const camelKey = camelize(key);
@@ -9972,27 +10005,31 @@ var Vue = (function (exports) {
9972
10005
  this._styles.length = 0;
9973
10006
  }
9974
10007
  this._applyStyles(newStyles);
9975
- // if this is an async component, ceReload is called from the inner
9976
- // component so no need to reload the async wrapper
9977
- if (!this._def.__asyncLoader) {
9978
- // reload
9979
- this._instance = null;
9980
- this._update();
9981
- }
10008
+ this._instance = null;
10009
+ this._update();
9982
10010
  };
9983
10011
  }
9984
- // intercept emit
9985
- instance.emit = (event, ...args) => {
10012
+ const dispatch = (event, args) => {
9986
10013
  this.dispatchEvent(new CustomEvent(event, {
9987
10014
  detail: args
9988
10015
  }));
9989
10016
  };
10017
+ // intercept emit
10018
+ instance.emit = (event, ...args) => {
10019
+ // dispatch both the raw and hyphenated versions of an event
10020
+ // to match Vue behavior
10021
+ dispatch(event, args);
10022
+ if (hyphenate(event) !== event) {
10023
+ dispatch(hyphenate(event), args);
10024
+ }
10025
+ };
9990
10026
  // locate nearest Vue custom element parent for provide/inject
9991
10027
  let parent = this;
9992
10028
  while ((parent =
9993
10029
  parent && (parent.parentNode || parent.host))) {
9994
10030
  if (parent instanceof VueElement) {
9995
10031
  instance.parent = parent._instance;
10032
+ instance.provides = parent._instance.provides;
9996
10033
  break;
9997
10034
  }
9998
10035
  }
@@ -10036,7 +10073,14 @@ var Vue = (function (exports) {
10036
10073
  warn$1(`useCssVars is called without current active component instance.`);
10037
10074
  return;
10038
10075
  }
10039
- const setVars = () => setVarsOnVNode(instance.subTree, getter(instance.proxy));
10076
+ const updateTeleports = (instance.ut = (vars = getter(instance.proxy)) => {
10077
+ Array.from(document.querySelectorAll(`[data-v-owner="${instance.uid}"]`)).forEach(node => setVarsOnNode(node, vars));
10078
+ });
10079
+ const setVars = () => {
10080
+ const vars = getter(instance.proxy);
10081
+ setVarsOnVNode(instance.subTree, vars);
10082
+ updateTeleports(vars);
10083
+ };
10040
10084
  watchPostEffect(setVars);
10041
10085
  onMounted(() => {
10042
10086
  const ob = new MutationObserver(setVars);
@@ -11037,15 +11081,16 @@ var Vue = (function (exports) {
11037
11081
  [41 /* ErrorCodes.X_V_MODEL_NO_EXPRESSION */]: `v-model is missing expression.`,
11038
11082
  [42 /* ErrorCodes.X_V_MODEL_MALFORMED_EXPRESSION */]: `v-model value must be a valid JavaScript member expression.`,
11039
11083
  [43 /* ErrorCodes.X_V_MODEL_ON_SCOPE_VARIABLE */]: `v-model cannot be used on v-for or v-slot scope variables because they are not writable.`,
11040
- [44 /* ErrorCodes.X_INVALID_EXPRESSION */]: `Error parsing JavaScript expression: `,
11041
- [45 /* ErrorCodes.X_KEEP_ALIVE_INVALID_CHILDREN */]: `<KeepAlive> expects exactly one child component.`,
11084
+ [44 /* ErrorCodes.X_V_MODEL_ON_PROPS */]: `v-model cannot be used on a prop, because local prop bindings are not writable.\nUse a v-bind binding combined with a v-on listener that emits update:x event instead.`,
11085
+ [45 /* ErrorCodes.X_INVALID_EXPRESSION */]: `Error parsing JavaScript expression: `,
11086
+ [46 /* ErrorCodes.X_KEEP_ALIVE_INVALID_CHILDREN */]: `<KeepAlive> expects exactly one child component.`,
11042
11087
  // generic errors
11043
- [46 /* ErrorCodes.X_PREFIX_ID_NOT_SUPPORTED */]: `"prefixIdentifiers" option is not supported in this build of compiler.`,
11044
- [47 /* ErrorCodes.X_MODULE_MODE_NOT_SUPPORTED */]: `ES module mode is not supported in this build of compiler.`,
11045
- [48 /* ErrorCodes.X_CACHE_HANDLER_NOT_SUPPORTED */]: `"cacheHandlers" option is only supported when the "prefixIdentifiers" option is enabled.`,
11046
- [49 /* ErrorCodes.X_SCOPE_ID_NOT_SUPPORTED */]: `"scopeId" option is only supported in module mode.`,
11088
+ [47 /* ErrorCodes.X_PREFIX_ID_NOT_SUPPORTED */]: `"prefixIdentifiers" option is not supported in this build of compiler.`,
11089
+ [48 /* ErrorCodes.X_MODULE_MODE_NOT_SUPPORTED */]: `ES module mode is not supported in this build of compiler.`,
11090
+ [49 /* ErrorCodes.X_CACHE_HANDLER_NOT_SUPPORTED */]: `"cacheHandlers" option is only supported when the "prefixIdentifiers" option is enabled.`,
11091
+ [50 /* ErrorCodes.X_SCOPE_ID_NOT_SUPPORTED */]: `"scopeId" option is only supported in module mode.`,
11047
11092
  // just to fulfill types
11048
- [50 /* ErrorCodes.__EXTEND_POINT__ */]: ``
11093
+ [51 /* ErrorCodes.__EXTEND_POINT__ */]: ``
11049
11094
  };
11050
11095
 
11051
11096
  const FRAGMENT = Symbol(`Fragment` );
@@ -13598,7 +13643,7 @@ var Vue = (function (exports) {
13598
13643
  if (keywordMatch) {
13599
13644
  message = `avoid using JavaScript keyword as property name: "${keywordMatch[0]}"`;
13600
13645
  }
13601
- context.onError(createCompilerError(44 /* ErrorCodes.X_INVALID_EXPRESSION */, node.loc, undefined, message));
13646
+ context.onError(createCompilerError(45 /* ErrorCodes.X_INVALID_EXPRESSION */, node.loc, undefined, message));
13602
13647
  }
13603
13648
  }
13604
13649
 
@@ -14389,7 +14434,7 @@ var Vue = (function (exports) {
14389
14434
  // 2. Force keep-alive to always be updated, since it uses raw children.
14390
14435
  patchFlag |= 1024 /* PatchFlags.DYNAMIC_SLOTS */;
14391
14436
  if (node.children.length > 1) {
14392
- context.onError(createCompilerError(45 /* ErrorCodes.X_KEEP_ALIVE_INVALID_CHILDREN */, {
14437
+ context.onError(createCompilerError(46 /* ErrorCodes.X_KEEP_ALIVE_INVALID_CHILDREN */, {
14393
14438
  start: node.children[0].loc.start,
14394
14439
  end: node.children[node.children.length - 1].loc.end,
14395
14440
  source: ''
@@ -15215,8 +15260,14 @@ var Vue = (function (exports) {
15215
15260
  const expString = exp.type === 4 /* NodeTypes.SIMPLE_EXPRESSION */ ? exp.content : rawExp;
15216
15261
  // im SFC <script setup> inline mode, the exp may have been transformed into
15217
15262
  // _unref(exp)
15218
- context.bindingMetadata[rawExp];
15219
- const maybeRef = !true /* BindingTypes.SETUP_CONST */;
15263
+ const bindingType = context.bindingMetadata[rawExp];
15264
+ // check props
15265
+ if (bindingType === "props" /* BindingTypes.PROPS */ ||
15266
+ bindingType === "props-aliased" /* BindingTypes.PROPS_ALIASED */) {
15267
+ context.onError(createCompilerError(44 /* ErrorCodes.X_V_MODEL_ON_PROPS */, exp.loc));
15268
+ return createTransformProps();
15269
+ }
15270
+ const maybeRef = !true ;
15220
15271
  if (!expString.trim() ||
15221
15272
  (!isMemberExpression(expString) && !maybeRef)) {
15222
15273
  context.onError(createCompilerError(42 /* ErrorCodes.X_V_MODEL_MALFORMED_EXPRESSION */, exp.loc));
@@ -15318,18 +15369,18 @@ var Vue = (function (exports) {
15318
15369
  /* istanbul ignore if */
15319
15370
  {
15320
15371
  if (options.prefixIdentifiers === true) {
15321
- onError(createCompilerError(46 /* ErrorCodes.X_PREFIX_ID_NOT_SUPPORTED */));
15372
+ onError(createCompilerError(47 /* ErrorCodes.X_PREFIX_ID_NOT_SUPPORTED */));
15322
15373
  }
15323
15374
  else if (isModuleMode) {
15324
- onError(createCompilerError(47 /* ErrorCodes.X_MODULE_MODE_NOT_SUPPORTED */));
15375
+ onError(createCompilerError(48 /* ErrorCodes.X_MODULE_MODE_NOT_SUPPORTED */));
15325
15376
  }
15326
15377
  }
15327
15378
  const prefixIdentifiers = !true ;
15328
15379
  if (options.cacheHandlers) {
15329
- onError(createCompilerError(48 /* ErrorCodes.X_CACHE_HANDLER_NOT_SUPPORTED */));
15380
+ onError(createCompilerError(49 /* ErrorCodes.X_CACHE_HANDLER_NOT_SUPPORTED */));
15330
15381
  }
15331
15382
  if (options.scopeId && !isModuleMode) {
15332
- onError(createCompilerError(49 /* ErrorCodes.X_SCOPE_ID_NOT_SUPPORTED */));
15383
+ onError(createCompilerError(50 /* ErrorCodes.X_SCOPE_ID_NOT_SUPPORTED */));
15333
15384
  }
15334
15385
  const ast = isString(template) ? baseParse(template, options) : template;
15335
15386
  const [nodeTransforms, directiveTransforms] = getBaseTransformPreset();
@@ -15487,26 +15538,26 @@ var Vue = (function (exports) {
15487
15538
  return createCompilerError(code, loc, DOMErrorMessages );
15488
15539
  }
15489
15540
  const DOMErrorMessages = {
15490
- [50 /* DOMErrorCodes.X_V_HTML_NO_EXPRESSION */]: `v-html is missing expression.`,
15491
- [51 /* DOMErrorCodes.X_V_HTML_WITH_CHILDREN */]: `v-html will override element children.`,
15492
- [52 /* DOMErrorCodes.X_V_TEXT_NO_EXPRESSION */]: `v-text is missing expression.`,
15493
- [53 /* DOMErrorCodes.X_V_TEXT_WITH_CHILDREN */]: `v-text will override element children.`,
15494
- [54 /* DOMErrorCodes.X_V_MODEL_ON_INVALID_ELEMENT */]: `v-model can only be used on <input>, <textarea> and <select> elements.`,
15495
- [55 /* DOMErrorCodes.X_V_MODEL_ARG_ON_ELEMENT */]: `v-model argument is not supported on plain elements.`,
15496
- [56 /* DOMErrorCodes.X_V_MODEL_ON_FILE_INPUT_ELEMENT */]: `v-model cannot be used on file inputs since they are read-only. Use a v-on:change listener instead.`,
15497
- [57 /* DOMErrorCodes.X_V_MODEL_UNNECESSARY_VALUE */]: `Unnecessary value binding used alongside v-model. It will interfere with v-model's behavior.`,
15498
- [58 /* DOMErrorCodes.X_V_SHOW_NO_EXPRESSION */]: `v-show is missing expression.`,
15499
- [59 /* DOMErrorCodes.X_TRANSITION_INVALID_CHILDREN */]: `<Transition> expects exactly one child element or component.`,
15500
- [60 /* DOMErrorCodes.X_IGNORED_SIDE_EFFECT_TAG */]: `Tags with side effect (<script> and <style>) are ignored in client component templates.`
15541
+ [51 /* DOMErrorCodes.X_V_HTML_NO_EXPRESSION */]: `v-html is missing expression.`,
15542
+ [52 /* DOMErrorCodes.X_V_HTML_WITH_CHILDREN */]: `v-html will override element children.`,
15543
+ [53 /* DOMErrorCodes.X_V_TEXT_NO_EXPRESSION */]: `v-text is missing expression.`,
15544
+ [54 /* DOMErrorCodes.X_V_TEXT_WITH_CHILDREN */]: `v-text will override element children.`,
15545
+ [55 /* DOMErrorCodes.X_V_MODEL_ON_INVALID_ELEMENT */]: `v-model can only be used on <input>, <textarea> and <select> elements.`,
15546
+ [56 /* DOMErrorCodes.X_V_MODEL_ARG_ON_ELEMENT */]: `v-model argument is not supported on plain elements.`,
15547
+ [57 /* DOMErrorCodes.X_V_MODEL_ON_FILE_INPUT_ELEMENT */]: `v-model cannot be used on file inputs since they are read-only. Use a v-on:change listener instead.`,
15548
+ [58 /* DOMErrorCodes.X_V_MODEL_UNNECESSARY_VALUE */]: `Unnecessary value binding used alongside v-model. It will interfere with v-model's behavior.`,
15549
+ [59 /* DOMErrorCodes.X_V_SHOW_NO_EXPRESSION */]: `v-show is missing expression.`,
15550
+ [60 /* DOMErrorCodes.X_TRANSITION_INVALID_CHILDREN */]: `<Transition> expects exactly one child element or component.`,
15551
+ [61 /* DOMErrorCodes.X_IGNORED_SIDE_EFFECT_TAG */]: `Tags with side effect (<script> and <style>) are ignored in client component templates.`
15501
15552
  };
15502
15553
 
15503
15554
  const transformVHtml = (dir, node, context) => {
15504
15555
  const { exp, loc } = dir;
15505
15556
  if (!exp) {
15506
- context.onError(createDOMCompilerError(50 /* DOMErrorCodes.X_V_HTML_NO_EXPRESSION */, loc));
15557
+ context.onError(createDOMCompilerError(51 /* DOMErrorCodes.X_V_HTML_NO_EXPRESSION */, loc));
15507
15558
  }
15508
15559
  if (node.children.length) {
15509
- context.onError(createDOMCompilerError(51 /* DOMErrorCodes.X_V_HTML_WITH_CHILDREN */, loc));
15560
+ context.onError(createDOMCompilerError(52 /* DOMErrorCodes.X_V_HTML_WITH_CHILDREN */, loc));
15510
15561
  node.children.length = 0;
15511
15562
  }
15512
15563
  return {
@@ -15519,10 +15570,10 @@ var Vue = (function (exports) {
15519
15570
  const transformVText = (dir, node, context) => {
15520
15571
  const { exp, loc } = dir;
15521
15572
  if (!exp) {
15522
- context.onError(createDOMCompilerError(52 /* DOMErrorCodes.X_V_TEXT_NO_EXPRESSION */, loc));
15573
+ context.onError(createDOMCompilerError(53 /* DOMErrorCodes.X_V_TEXT_NO_EXPRESSION */, loc));
15523
15574
  }
15524
15575
  if (node.children.length) {
15525
- context.onError(createDOMCompilerError(53 /* DOMErrorCodes.X_V_TEXT_WITH_CHILDREN */, loc));
15576
+ context.onError(createDOMCompilerError(54 /* DOMErrorCodes.X_V_TEXT_WITH_CHILDREN */, loc));
15526
15577
  node.children.length = 0;
15527
15578
  }
15528
15579
  return {
@@ -15543,12 +15594,12 @@ var Vue = (function (exports) {
15543
15594
  return baseResult;
15544
15595
  }
15545
15596
  if (dir.arg) {
15546
- context.onError(createDOMCompilerError(55 /* DOMErrorCodes.X_V_MODEL_ARG_ON_ELEMENT */, dir.arg.loc));
15597
+ context.onError(createDOMCompilerError(56 /* DOMErrorCodes.X_V_MODEL_ARG_ON_ELEMENT */, dir.arg.loc));
15547
15598
  }
15548
15599
  function checkDuplicatedValue() {
15549
15600
  const value = findProp(node, 'value');
15550
15601
  if (value) {
15551
- context.onError(createDOMCompilerError(57 /* DOMErrorCodes.X_V_MODEL_UNNECESSARY_VALUE */, value.loc));
15602
+ context.onError(createDOMCompilerError(58 /* DOMErrorCodes.X_V_MODEL_UNNECESSARY_VALUE */, value.loc));
15552
15603
  }
15553
15604
  }
15554
15605
  const { tag } = node;
@@ -15576,7 +15627,7 @@ var Vue = (function (exports) {
15576
15627
  break;
15577
15628
  case 'file':
15578
15629
  isInvalidType = true;
15579
- context.onError(createDOMCompilerError(56 /* DOMErrorCodes.X_V_MODEL_ON_FILE_INPUT_ELEMENT */, dir.loc));
15630
+ context.onError(createDOMCompilerError(57 /* DOMErrorCodes.X_V_MODEL_ON_FILE_INPUT_ELEMENT */, dir.loc));
15580
15631
  break;
15581
15632
  default:
15582
15633
  // text type
@@ -15610,7 +15661,7 @@ var Vue = (function (exports) {
15610
15661
  }
15611
15662
  }
15612
15663
  else {
15613
- context.onError(createDOMCompilerError(54 /* DOMErrorCodes.X_V_MODEL_ON_INVALID_ELEMENT */, dir.loc));
15664
+ context.onError(createDOMCompilerError(55 /* DOMErrorCodes.X_V_MODEL_ON_INVALID_ELEMENT */, dir.loc));
15614
15665
  }
15615
15666
  // native vmodel doesn't need the `modelValue` props since they are also
15616
15667
  // passed to the runtime as `binding.value`. removing it reduces code size.
@@ -15730,7 +15781,7 @@ var Vue = (function (exports) {
15730
15781
  const transformShow = (dir, node, context) => {
15731
15782
  const { exp, loc } = dir;
15732
15783
  if (!exp) {
15733
- context.onError(createDOMCompilerError(58 /* DOMErrorCodes.X_V_SHOW_NO_EXPRESSION */, loc));
15784
+ context.onError(createDOMCompilerError(59 /* DOMErrorCodes.X_V_SHOW_NO_EXPRESSION */, loc));
15734
15785
  }
15735
15786
  return {
15736
15787
  props: [],
@@ -15749,7 +15800,7 @@ var Vue = (function (exports) {
15749
15800
  }
15750
15801
  // warn multiple transition children
15751
15802
  if (hasMultipleChildren(node)) {
15752
- context.onError(createDOMCompilerError(59 /* DOMErrorCodes.X_TRANSITION_INVALID_CHILDREN */, {
15803
+ context.onError(createDOMCompilerError(60 /* DOMErrorCodes.X_TRANSITION_INVALID_CHILDREN */, {
15753
15804
  start: node.children[0].loc.start,
15754
15805
  end: node.children[node.children.length - 1].loc.end,
15755
15806
  source: ''
@@ -15788,7 +15839,7 @@ var Vue = (function (exports) {
15788
15839
  if (node.type === 1 /* NodeTypes.ELEMENT */ &&
15789
15840
  node.tagType === 0 /* ElementTypes.ELEMENT */ &&
15790
15841
  (node.tag === 'script' || node.tag === 'style')) {
15791
- context.onError(createDOMCompilerError(60 /* DOMErrorCodes.X_IGNORED_SIDE_EFFECT_TAG */, node.loc));
15842
+ context.onError(createDOMCompilerError(61 /* DOMErrorCodes.X_IGNORED_SIDE_EFFECT_TAG */, node.loc));
15792
15843
  context.removeNode();
15793
15844
  }
15794
15845
  };