@vue/runtime-dom 3.2.45 → 3.2.47

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.
@@ -96,7 +96,7 @@ function normalizeProps(props) {
96
96
  // These tag configs are shared between compiler-dom and runtime-dom, so they
97
97
  // https://developer.mozilla.org/en-US/docs/Web/HTML/Element
98
98
  const HTML_TAGS = 'html,body,base,head,link,meta,style,title,address,article,aside,footer,' +
99
- 'header,h1,h2,h3,h4,h5,h6,nav,section,div,dd,dl,dt,figcaption,' +
99
+ 'header,hgroup,h1,h2,h3,h4,h5,h6,nav,section,div,dd,dl,dt,figcaption,' +
100
100
  'figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,' +
101
101
  'data,dfn,em,i,kbd,mark,q,rp,rt,ruby,s,samp,small,span,strong,sub,sup,' +
102
102
  'time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,' +
@@ -108,7 +108,7 @@ const HTML_TAGS = 'html,body,base,head,link,meta,style,title,address,article,asi
108
108
  const SVG_TAGS = 'svg,animate,animateMotion,animateTransform,circle,clipPath,color-profile,' +
109
109
  'defs,desc,discard,ellipse,feBlend,feColorMatrix,feComponentTransfer,' +
110
110
  'feComposite,feConvolveMatrix,feDiffuseLighting,feDisplacementMap,' +
111
- 'feDistanceLight,feDropShadow,feFlood,feFuncA,feFuncB,feFuncG,feFuncR,' +
111
+ 'feDistantLight,feDropShadow,feFlood,feFuncA,feFuncB,feFuncG,feFuncR,' +
112
112
  'feGaussianBlur,feImage,feMerge,feMergeNode,feMorphology,feOffset,' +
113
113
  'fePointLight,feSpecularLighting,feSpotLight,feTile,feTurbulence,filter,' +
114
114
  'foreignObject,g,hatch,hatchpath,image,line,linearGradient,marker,mask,' +
@@ -259,12 +259,13 @@ const remove = (arr, el) => {
259
259
  arr.splice(i, 1);
260
260
  }
261
261
  };
262
- const hasOwnProperty = Object.prototype.hasOwnProperty;
263
- const hasOwn = (val, key) => hasOwnProperty.call(val, key);
262
+ const hasOwnProperty$1 = Object.prototype.hasOwnProperty;
263
+ const hasOwn = (val, key) => hasOwnProperty$1.call(val, key);
264
264
  const isArray = Array.isArray;
265
265
  const isMap = (val) => toTypeString(val) === '[object Map]';
266
266
  const isSet = (val) => toTypeString(val) === '[object Set]';
267
267
  const isDate = (val) => toTypeString(val) === '[object Date]';
268
+ const isRegExp = (val) => toTypeString(val) === '[object RegExp]';
268
269
  const isFunction = (val) => typeof val === 'function';
269
270
  const isString = (val) => typeof val === 'string';
270
271
  const isSymbol = (val) => typeof val === 'symbol';
@@ -331,10 +332,22 @@ const def = (obj, key, value) => {
331
332
  value
332
333
  });
333
334
  };
334
- const toNumber = (val) => {
335
+ /**
336
+ * "123-foo" will be parsed to 123
337
+ * This is used for the .number modifier in v-model
338
+ */
339
+ const looseToNumber = (val) => {
335
340
  const n = parseFloat(val);
336
341
  return isNaN(n) ? val : n;
337
342
  };
343
+ /**
344
+ * Only conerces number-like strings
345
+ * "123-foo" will be returned as-is
346
+ */
347
+ const toNumber = (val) => {
348
+ const n = isString(val) ? Number(val) : NaN;
349
+ return isNaN(n) ? val : n;
350
+ };
338
351
  let _globalThis;
339
352
  const getGlobalThis = () => {
340
353
  return (_globalThis ||
@@ -350,7 +363,7 @@ const getGlobalThis = () => {
350
363
  : {}));
351
364
  };
352
365
 
353
- function warn(msg, ...args) {
366
+ function warn$1(msg, ...args) {
354
367
  console.warn(`[Vue warn] ${msg}`, ...args);
355
368
  }
356
369
 
@@ -361,7 +374,7 @@ class EffectScope {
361
374
  /**
362
375
  * @internal
363
376
  */
364
- this.active = true;
377
+ this._active = true;
365
378
  /**
366
379
  * @internal
367
380
  */
@@ -376,8 +389,11 @@ class EffectScope {
376
389
  (activeEffectScope.scopes || (activeEffectScope.scopes = [])).push(this) - 1;
377
390
  }
378
391
  }
392
+ get active() {
393
+ return this._active;
394
+ }
379
395
  run(fn) {
380
- if (this.active) {
396
+ if (this._active) {
381
397
  const currentEffectScope = activeEffectScope;
382
398
  try {
383
399
  activeEffectScope = this;
@@ -388,7 +404,7 @@ class EffectScope {
388
404
  }
389
405
  }
390
406
  else {
391
- warn(`cannot run an inactive effect scope.`);
407
+ warn$1(`cannot run an inactive effect scope.`);
392
408
  }
393
409
  }
394
410
  /**
@@ -406,7 +422,7 @@ class EffectScope {
406
422
  activeEffectScope = this.parent;
407
423
  }
408
424
  stop(fromParent) {
409
- if (this.active) {
425
+ if (this._active) {
410
426
  let i, l;
411
427
  for (i = 0, l = this.effects.length; i < l; i++) {
412
428
  this.effects[i].stop();
@@ -429,7 +445,7 @@ class EffectScope {
429
445
  }
430
446
  }
431
447
  this.parent = undefined;
432
- this.active = false;
448
+ this._active = false;
433
449
  }
434
450
  }
435
451
  }
@@ -449,7 +465,7 @@ function onScopeDispose(fn) {
449
465
  activeEffectScope.cleanups.push(fn);
450
466
  }
451
467
  else {
452
- warn(`onScopeDispose() is called when there is no active effect scope` +
468
+ warn$1(`onScopeDispose() is called when there is no active effect scope` +
453
469
  ` to be associated with.`);
454
470
  }
455
471
  }
@@ -650,7 +666,7 @@ function trigger(target, type, key, newValue, oldValue, oldTarget) {
650
666
  deps = [...depsMap.values()];
651
667
  }
652
668
  else if (key === 'length' && isArray(target)) {
653
- const newLength = toNumber(newValue);
669
+ const newLength = Number(newValue);
654
670
  depsMap.forEach((dep, key) => {
655
671
  if (key === 'length' || key >= newLength) {
656
672
  deps.push(dep);
@@ -739,6 +755,10 @@ function triggerEffect(effect, debuggerEventExtraInfo) {
739
755
  }
740
756
  }
741
757
  }
758
+ function getDepFromReactive(object, key) {
759
+ var _a;
760
+ return (_a = targetMap.get(object)) === null || _a === void 0 ? void 0 : _a.get(key);
761
+ }
742
762
 
743
763
  const isNonTrackableKeys = /*#__PURE__*/ makeMap(`__proto__,__v_isRef,__isVue`);
744
764
  const builtInSymbols = new Set(
@@ -750,7 +770,7 @@ Object.getOwnPropertyNames(Symbol)
750
770
  .filter(key => key !== 'arguments' && key !== 'caller')
751
771
  .map(key => Symbol[key])
752
772
  .filter(isSymbol));
753
- const get = /*#__PURE__*/ createGetter();
773
+ const get$1 = /*#__PURE__*/ createGetter();
754
774
  const shallowGet = /*#__PURE__*/ createGetter(false, true);
755
775
  const readonlyGet = /*#__PURE__*/ createGetter(true);
756
776
  const shallowReadonlyGet = /*#__PURE__*/ createGetter(true, true);
@@ -784,6 +804,11 @@ function createArrayInstrumentations() {
784
804
  });
785
805
  return instrumentations;
786
806
  }
807
+ function hasOwnProperty(key) {
808
+ const obj = toRaw(this);
809
+ track(obj, "has" /* TrackOpTypes.HAS */, key);
810
+ return obj.hasOwnProperty(key);
811
+ }
787
812
  function createGetter(isReadonly = false, shallow = false) {
788
813
  return function get(target, key, receiver) {
789
814
  if (key === "__v_isReactive" /* ReactiveFlags.IS_REACTIVE */) {
@@ -807,8 +832,13 @@ function createGetter(isReadonly = false, shallow = false) {
807
832
  return target;
808
833
  }
809
834
  const targetIsArray = isArray(target);
810
- if (!isReadonly && targetIsArray && hasOwn(arrayInstrumentations, key)) {
811
- return Reflect.get(arrayInstrumentations, key, receiver);
835
+ if (!isReadonly) {
836
+ if (targetIsArray && hasOwn(arrayInstrumentations, key)) {
837
+ return Reflect.get(arrayInstrumentations, key, receiver);
838
+ }
839
+ if (key === 'hasOwnProperty') {
840
+ return hasOwnProperty;
841
+ }
812
842
  }
813
843
  const res = Reflect.get(target, key, receiver);
814
844
  if (isSymbol(key) ? builtInSymbols.has(key) : isNonTrackableKeys(key)) {
@@ -833,7 +863,7 @@ function createGetter(isReadonly = false, shallow = false) {
833
863
  return res;
834
864
  };
835
865
  }
836
- const set = /*#__PURE__*/ createSetter();
866
+ const set$1 = /*#__PURE__*/ createSetter();
837
867
  const shallowSet = /*#__PURE__*/ createSetter(true);
838
868
  function createSetter(shallow = false) {
839
869
  return function set(target, key, value, receiver) {
@@ -876,7 +906,7 @@ function deleteProperty(target, key) {
876
906
  }
877
907
  return result;
878
908
  }
879
- function has(target, key) {
909
+ function has$1(target, key) {
880
910
  const result = Reflect.has(target, key);
881
911
  if (!isSymbol(key) || !builtInSymbols.has(key)) {
882
912
  track(target, "has" /* TrackOpTypes.HAS */, key);
@@ -888,23 +918,23 @@ function ownKeys(target) {
888
918
  return Reflect.ownKeys(target);
889
919
  }
890
920
  const mutableHandlers = {
891
- get,
892
- set,
921
+ get: get$1,
922
+ set: set$1,
893
923
  deleteProperty,
894
- has,
924
+ has: has$1,
895
925
  ownKeys
896
926
  };
897
927
  const readonlyHandlers = {
898
928
  get: readonlyGet,
899
929
  set(target, key) {
900
930
  {
901
- warn(`Set operation on key "${String(key)}" failed: target is readonly.`, target);
931
+ warn$1(`Set operation on key "${String(key)}" failed: target is readonly.`, target);
902
932
  }
903
933
  return true;
904
934
  },
905
935
  deleteProperty(target, key) {
906
936
  {
907
- warn(`Delete operation on key "${String(key)}" failed: target is readonly.`, target);
937
+ warn$1(`Delete operation on key "${String(key)}" failed: target is readonly.`, target);
908
938
  }
909
939
  return true;
910
940
  }
@@ -922,7 +952,7 @@ const shallowReadonlyHandlers = /*#__PURE__*/ extend({}, readonlyHandlers, {
922
952
 
923
953
  const toShallow = (value) => value;
924
954
  const getProto = (v) => Reflect.getPrototypeOf(v);
925
- function get$1(target, key, isReadonly = false, isShallow = false) {
955
+ function get(target, key, isReadonly = false, isShallow = false) {
926
956
  // #1772: readonly(reactive(Map)) should return readonly + reactive version
927
957
  // of the value
928
958
  target = target["__v_raw" /* ReactiveFlags.RAW */];
@@ -948,7 +978,7 @@ function get$1(target, key, isReadonly = false, isShallow = false) {
948
978
  target.get(key);
949
979
  }
950
980
  }
951
- function has$1(key, isReadonly = false) {
981
+ function has(key, isReadonly = false) {
952
982
  const target = this["__v_raw" /* ReactiveFlags.RAW */];
953
983
  const rawTarget = toRaw(target);
954
984
  const rawKey = toRaw(key);
@@ -978,7 +1008,7 @@ function add(value) {
978
1008
  }
979
1009
  return this;
980
1010
  }
981
- function set$1(key, value) {
1011
+ function set(key, value) {
982
1012
  value = toRaw(value);
983
1013
  const target = toRaw(this);
984
1014
  const { has, get } = getProto(target);
@@ -1091,41 +1121,41 @@ function createReadonlyMethod(type) {
1091
1121
  function createInstrumentations() {
1092
1122
  const mutableInstrumentations = {
1093
1123
  get(key) {
1094
- return get$1(this, key);
1124
+ return get(this, key);
1095
1125
  },
1096
1126
  get size() {
1097
1127
  return size(this);
1098
1128
  },
1099
- has: has$1,
1129
+ has,
1100
1130
  add,
1101
- set: set$1,
1131
+ set,
1102
1132
  delete: deleteEntry,
1103
1133
  clear,
1104
1134
  forEach: createForEach(false, false)
1105
1135
  };
1106
1136
  const shallowInstrumentations = {
1107
1137
  get(key) {
1108
- return get$1(this, key, false, true);
1138
+ return get(this, key, false, true);
1109
1139
  },
1110
1140
  get size() {
1111
1141
  return size(this);
1112
1142
  },
1113
- has: has$1,
1143
+ has,
1114
1144
  add,
1115
- set: set$1,
1145
+ set,
1116
1146
  delete: deleteEntry,
1117
1147
  clear,
1118
1148
  forEach: createForEach(false, true)
1119
1149
  };
1120
1150
  const readonlyInstrumentations = {
1121
1151
  get(key) {
1122
- return get$1(this, key, true);
1152
+ return get(this, key, true);
1123
1153
  },
1124
1154
  get size() {
1125
1155
  return size(this, true);
1126
1156
  },
1127
1157
  has(key) {
1128
- return has$1.call(this, key, true);
1158
+ return has.call(this, key, true);
1129
1159
  },
1130
1160
  add: createReadonlyMethod("add" /* TriggerOpTypes.ADD */),
1131
1161
  set: createReadonlyMethod("set" /* TriggerOpTypes.SET */),
@@ -1135,13 +1165,13 @@ function createInstrumentations() {
1135
1165
  };
1136
1166
  const shallowReadonlyInstrumentations = {
1137
1167
  get(key) {
1138
- return get$1(this, key, true, true);
1168
+ return get(this, key, true, true);
1139
1169
  },
1140
1170
  get size() {
1141
1171
  return size(this, true);
1142
1172
  },
1143
1173
  has(key) {
1144
- return has$1.call(this, key, true);
1174
+ return has.call(this, key, true);
1145
1175
  },
1146
1176
  add: createReadonlyMethod("add" /* TriggerOpTypes.ADD */),
1147
1177
  set: createReadonlyMethod("set" /* TriggerOpTypes.SET */),
@@ -1332,9 +1362,10 @@ function trackRefValue(ref) {
1332
1362
  }
1333
1363
  function triggerRefValue(ref, newVal) {
1334
1364
  ref = toRaw(ref);
1335
- if (ref.dep) {
1365
+ const dep = ref.dep;
1366
+ if (dep) {
1336
1367
  {
1337
- triggerEffects(ref.dep, {
1368
+ triggerEffects(dep, {
1338
1369
  target: ref,
1339
1370
  type: "set" /* TriggerOpTypes.SET */,
1340
1371
  key: 'value',
@@ -1446,6 +1477,9 @@ class ObjectRefImpl {
1446
1477
  set value(newVal) {
1447
1478
  this._object[this._key] = newVal;
1448
1479
  }
1480
+ get dep() {
1481
+ return getDepFromReactive(toRaw(this._object), this._key);
1482
+ }
1449
1483
  }
1450
1484
  function toRef(object, key, defaultValue) {
1451
1485
  const val = object[key];
@@ -1487,7 +1521,7 @@ class ComputedRefImpl {
1487
1521
  }
1488
1522
  }
1489
1523
  _a = "__v_isReadonly" /* ReactiveFlags.IS_READONLY */;
1490
- function computed(getterOrOptions, debugOptions, isSSR = false) {
1524
+ function computed$1(getterOrOptions, debugOptions, isSSR = false) {
1491
1525
  let getter;
1492
1526
  let setter;
1493
1527
  const onlyGetter = isFunction(getterOrOptions);
@@ -1517,7 +1551,7 @@ function pushWarningContext(vnode) {
1517
1551
  function popWarningContext() {
1518
1552
  stack.pop();
1519
1553
  }
1520
- function warn$1(msg, ...args) {
1554
+ function warn(msg, ...args) {
1521
1555
  // avoid props formatting or warn handler tracking deps that might be mutated
1522
1556
  // during patch, leading to infinite recursion.
1523
1557
  pauseTracking();
@@ -1623,6 +1657,20 @@ function formatProp(key, value, raw) {
1623
1657
  return raw ? value : [`${key}=`, value];
1624
1658
  }
1625
1659
  }
1660
+ /**
1661
+ * @internal
1662
+ */
1663
+ function assertNumber(val, type) {
1664
+ if (val === undefined) {
1665
+ return;
1666
+ }
1667
+ else if (typeof val !== 'number') {
1668
+ warn(`${type} is not a valid number - ` + `got ${JSON.stringify(val)}.`);
1669
+ }
1670
+ else if (isNaN(val)) {
1671
+ warn(`${type} is NaN - ` + 'the duration expression might be incorrect.');
1672
+ }
1673
+ }
1626
1674
 
1627
1675
  const ErrorTypeStrings = {
1628
1676
  ["sp" /* LifecycleHooks.SERVER_PREFETCH */]: 'serverPrefetch hook',
@@ -1716,7 +1764,7 @@ function logError(err, type, contextVNode, throwInDev = true) {
1716
1764
  if (contextVNode) {
1717
1765
  pushWarningContext(contextVNode);
1718
1766
  }
1719
- warn$1(`Unhandled error${info ? ` during execution of ${info}` : ``}`);
1767
+ warn(`Unhandled error${info ? ` during execution of ${info}` : ``}`);
1720
1768
  if (contextVNode) {
1721
1769
  popWarningContext();
1722
1770
  }
@@ -1912,7 +1960,7 @@ function checkRecursiveUpdates(seen, fn) {
1912
1960
  if (count > RECURSION_LIMIT) {
1913
1961
  const instance = fn.ownerInstance;
1914
1962
  const componentName = instance && getComponentName(instance.type);
1915
- warn$1(`Maximum recursive updates exceeded${componentName ? ` in component <${componentName}>` : ``}. ` +
1963
+ warn(`Maximum recursive updates exceeded${componentName ? ` in component <${componentName}>` : ``}. ` +
1916
1964
  `This means you have a reactive effect that is mutating its own ` +
1917
1965
  `dependencies and thus recursively triggering itself. Possible sources ` +
1918
1966
  `include component template, render function, updated hook or ` +
@@ -2063,7 +2111,7 @@ function tryWrap(fn) {
2063
2111
  let devtools;
2064
2112
  let buffer = [];
2065
2113
  let devtoolsNotInstalled = false;
2066
- function emit(event, ...args) {
2114
+ function emit$1(event, ...args) {
2067
2115
  if (devtools) {
2068
2116
  devtools.emit(event, ...args);
2069
2117
  }
@@ -2110,7 +2158,7 @@ function setDevtoolsHook(hook, target) {
2110
2158
  }
2111
2159
  }
2112
2160
  function devtoolsInitApp(app, version) {
2113
- emit("app:init" /* DevtoolsHooks.APP_INIT */, app, version, {
2161
+ emit$1("app:init" /* DevtoolsHooks.APP_INIT */, app, version, {
2114
2162
  Fragment,
2115
2163
  Text,
2116
2164
  Comment,
@@ -2118,7 +2166,7 @@ function devtoolsInitApp(app, version) {
2118
2166
  });
2119
2167
  }
2120
2168
  function devtoolsUnmountApp(app) {
2121
- emit("app:unmount" /* DevtoolsHooks.APP_UNMOUNT */, app);
2169
+ emit$1("app:unmount" /* DevtoolsHooks.APP_UNMOUNT */, app);
2122
2170
  }
2123
2171
  const devtoolsComponentAdded = /*#__PURE__*/ createDevtoolsComponentHook("component:added" /* DevtoolsHooks.COMPONENT_ADDED */);
2124
2172
  const devtoolsComponentUpdated =
@@ -2134,21 +2182,21 @@ const devtoolsComponentRemoved = (component) => {
2134
2182
  };
2135
2183
  function createDevtoolsComponentHook(hook) {
2136
2184
  return (component) => {
2137
- emit(hook, component.appContext.app, component.uid, component.parent ? component.parent.uid : undefined, component);
2185
+ emit$1(hook, component.appContext.app, component.uid, component.parent ? component.parent.uid : undefined, component);
2138
2186
  };
2139
2187
  }
2140
2188
  const devtoolsPerfStart = /*#__PURE__*/ createDevtoolsPerformanceHook("perf:start" /* DevtoolsHooks.PERFORMANCE_START */);
2141
2189
  const devtoolsPerfEnd = /*#__PURE__*/ createDevtoolsPerformanceHook("perf:end" /* DevtoolsHooks.PERFORMANCE_END */);
2142
2190
  function createDevtoolsPerformanceHook(hook) {
2143
2191
  return (component, type, time) => {
2144
- emit(hook, component.appContext.app, component.uid, component, type, time);
2192
+ emit$1(hook, component.appContext.app, component.uid, component, type, time);
2145
2193
  };
2146
2194
  }
2147
2195
  function devtoolsComponentEmit(component, event, params) {
2148
- emit("component:emit" /* DevtoolsHooks.COMPONENT_EMIT */, component.appContext.app, component, event, params);
2196
+ emit$1("component:emit" /* DevtoolsHooks.COMPONENT_EMIT */, component.appContext.app, component, event, params);
2149
2197
  }
2150
2198
 
2151
- function emit$1(instance, event, ...rawArgs) {
2199
+ function emit(instance, event, ...rawArgs) {
2152
2200
  if (instance.isUnmounted)
2153
2201
  return;
2154
2202
  const props = instance.vnode.props || EMPTY_OBJ;
@@ -2158,7 +2206,7 @@ function emit$1(instance, event, ...rawArgs) {
2158
2206
  if (!(event in emitsOptions) &&
2159
2207
  !(false )) {
2160
2208
  if (!propsOptions || !(toHandlerKey(event) in propsOptions)) {
2161
- warn$1(`Component emitted event "${event}" but it is neither declared in ` +
2209
+ warn(`Component emitted event "${event}" but it is neither declared in ` +
2162
2210
  `the emits option nor as an "${toHandlerKey(event)}" prop.`);
2163
2211
  }
2164
2212
  }
@@ -2167,7 +2215,7 @@ function emit$1(instance, event, ...rawArgs) {
2167
2215
  if (isFunction(validator)) {
2168
2216
  const isValid = validator(...rawArgs);
2169
2217
  if (!isValid) {
2170
- warn$1(`Invalid event arguments: event validation failed for event "${event}".`);
2218
+ warn(`Invalid event arguments: event validation failed for event "${event}".`);
2171
2219
  }
2172
2220
  }
2173
2221
  }
@@ -2184,7 +2232,7 @@ function emit$1(instance, event, ...rawArgs) {
2184
2232
  args = rawArgs.map(a => (isString(a) ? a.trim() : a));
2185
2233
  }
2186
2234
  if (number) {
2187
- args = rawArgs.map(toNumber);
2235
+ args = rawArgs.map(looseToNumber);
2188
2236
  }
2189
2237
  }
2190
2238
  {
@@ -2193,7 +2241,7 @@ function emit$1(instance, event, ...rawArgs) {
2193
2241
  {
2194
2242
  const lowerCaseEvent = event.toLowerCase();
2195
2243
  if (lowerCaseEvent !== event && props[toHandlerKey(lowerCaseEvent)]) {
2196
- warn$1(`Event "${lowerCaseEvent}" is emitted in component ` +
2244
+ warn(`Event "${lowerCaseEvent}" is emitted in component ` +
2197
2245
  `${formatComponentName(instance, instance.type)} but the handler is registered for "${event}". ` +
2198
2246
  `Note that HTML attributes are case-insensitive and you cannot use ` +
2199
2247
  `v-on to listen to camelCase events when using in-DOM templates. ` +
@@ -2468,13 +2516,13 @@ function renderComponentRoot(instance) {
2468
2516
  }
2469
2517
  }
2470
2518
  if (extraAttrs.length) {
2471
- warn$1(`Extraneous non-props attributes (` +
2519
+ warn(`Extraneous non-props attributes (` +
2472
2520
  `${extraAttrs.join(', ')}) ` +
2473
2521
  `were passed to component but could not be automatically inherited ` +
2474
2522
  `because component renders fragment or text root nodes.`);
2475
2523
  }
2476
2524
  if (eventAttrs.length) {
2477
- warn$1(`Extraneous non-emits event listeners (` +
2525
+ warn(`Extraneous non-emits event listeners (` +
2478
2526
  `${eventAttrs.join(', ')}) ` +
2479
2527
  `were passed to component but could not be automatically inherited ` +
2480
2528
  `because component renders fragment or text root nodes. ` +
@@ -2487,7 +2535,7 @@ function renderComponentRoot(instance) {
2487
2535
  // inherit directives
2488
2536
  if (vnode.dirs) {
2489
2537
  if (!isElementRoot(root)) {
2490
- warn$1(`Runtime directive used on component with non-element root node. ` +
2538
+ warn(`Runtime directive used on component with non-element root node. ` +
2491
2539
  `The directives will not function as intended.`);
2492
2540
  }
2493
2541
  // clone before mutating since the root may be a hoisted vnode
@@ -2497,7 +2545,7 @@ function renderComponentRoot(instance) {
2497
2545
  // inherit transition data
2498
2546
  if (vnode.transition) {
2499
2547
  if (!isElementRoot(root)) {
2500
- warn$1(`Component inside <Transition> renders non-element root node ` +
2548
+ warn(`Component inside <Transition> renders non-element root node ` +
2501
2549
  `that cannot be animated.`);
2502
2550
  }
2503
2551
  root.transition = vnode.transition;
@@ -2832,7 +2880,10 @@ function createSuspenseBoundary(vnode, parent, parentComponent, container, hidde
2832
2880
  console[console.info ? 'info' : 'log'](`<Suspense> is an experimental feature and its API will likely change.`);
2833
2881
  }
2834
2882
  const { p: patch, m: move, um: unmount, n: next, o: { parentNode, remove } } = rendererInternals;
2835
- const timeout = toNumber(vnode.props && vnode.props.timeout);
2883
+ const timeout = vnode.props ? toNumber(vnode.props.timeout) : undefined;
2884
+ {
2885
+ assertNumber(timeout, `Suspense timeout`);
2886
+ }
2836
2887
  const suspense = {
2837
2888
  vnode,
2838
2889
  parent,
@@ -3060,7 +3111,7 @@ function normalizeSuspenseSlot(s) {
3060
3111
  if (isArray(s)) {
3061
3112
  const singleChild = filterSingleRoot(s);
3062
3113
  if (!singleChild) {
3063
- warn$1(`<Suspense> slots expect a single root node.`);
3114
+ warn(`<Suspense> slots expect a single root node.`);
3064
3115
  }
3065
3116
  s = singleChild;
3066
3117
  }
@@ -3098,7 +3149,7 @@ function setActiveBranch(suspense, branch) {
3098
3149
  function provide(key, value) {
3099
3150
  if (!currentInstance) {
3100
3151
  {
3101
- warn$1(`provide() can only be used inside setup().`);
3152
+ warn(`provide() can only be used inside setup().`);
3102
3153
  }
3103
3154
  }
3104
3155
  else {
@@ -3137,11 +3188,11 @@ function inject(key, defaultValue, treatDefaultAsFactory = false) {
3137
3188
  : defaultValue;
3138
3189
  }
3139
3190
  else {
3140
- warn$1(`injection "${String(key)}" not found.`);
3191
+ warn(`injection "${String(key)}" not found.`);
3141
3192
  }
3142
3193
  }
3143
3194
  else {
3144
- warn$1(`inject() can only be used inside setup() or functional components.`);
3195
+ warn(`inject() can only be used inside setup() or functional components.`);
3145
3196
  }
3146
3197
  }
3147
3198
 
@@ -3150,17 +3201,17 @@ function watchEffect(effect, options) {
3150
3201
  return doWatch(effect, null, options);
3151
3202
  }
3152
3203
  function watchPostEffect(effect, options) {
3153
- return doWatch(effect, null, (Object.assign(Object.assign({}, options), { flush: 'post' }) ));
3204
+ return doWatch(effect, null, Object.assign(Object.assign({}, options), { flush: 'post' }) );
3154
3205
  }
3155
3206
  function watchSyncEffect(effect, options) {
3156
- return doWatch(effect, null, (Object.assign(Object.assign({}, options), { flush: 'sync' }) ));
3207
+ return doWatch(effect, null, Object.assign(Object.assign({}, options), { flush: 'sync' }) );
3157
3208
  }
3158
3209
  // initial value for watchers to trigger on undefined initial values
3159
3210
  const INITIAL_WATCHER_VALUE = {};
3160
3211
  // implementation
3161
3212
  function watch(source, cb, options) {
3162
3213
  if (!isFunction(cb)) {
3163
- warn$1(`\`watch(fn, options?)\` signature has been moved to a separate API. ` +
3214
+ warn(`\`watch(fn, options?)\` signature has been moved to a separate API. ` +
3164
3215
  `Use \`watchEffect(fn, options?)\` instead. \`watch\` now only ` +
3165
3216
  `supports \`watch(source, cb, options?) signature.`);
3166
3217
  }
@@ -3169,19 +3220,20 @@ function watch(source, cb, options) {
3169
3220
  function doWatch(source, cb, { immediate, deep, flush, onTrack, onTrigger } = EMPTY_OBJ) {
3170
3221
  if (!cb) {
3171
3222
  if (immediate !== undefined) {
3172
- warn$1(`watch() "immediate" option is only respected when using the ` +
3223
+ warn(`watch() "immediate" option is only respected when using the ` +
3173
3224
  `watch(source, callback, options?) signature.`);
3174
3225
  }
3175
3226
  if (deep !== undefined) {
3176
- warn$1(`watch() "deep" option is only respected when using the ` +
3227
+ warn(`watch() "deep" option is only respected when using the ` +
3177
3228
  `watch(source, callback, options?) signature.`);
3178
3229
  }
3179
3230
  }
3180
3231
  const warnInvalidSource = (s) => {
3181
- warn$1(`Invalid watch source: `, s, `A watch source can only be a getter/effect function, a ref, ` +
3232
+ warn(`Invalid watch source: `, s, `A watch source can only be a getter/effect function, a ref, ` +
3182
3233
  `a reactive object, or an array of these types.`);
3183
3234
  };
3184
- const instance = currentInstance;
3235
+ const instance = getCurrentScope() === (currentInstance === null || currentInstance === void 0 ? void 0 : currentInstance.scope) ? currentInstance : null;
3236
+ // const instance = currentInstance
3185
3237
  let getter;
3186
3238
  let forceTrigger = false;
3187
3239
  let isMultiSource = false;
@@ -3268,7 +3320,7 @@ function doWatch(source, cb, { immediate, deep, flush, onTrack, onTrigger } = EM
3268
3320
  // pass undefined as the old value when it's changed for the first time
3269
3321
  oldValue === INITIAL_WATCHER_VALUE
3270
3322
  ? undefined
3271
- : (isMultiSource && oldValue[0] === INITIAL_WATCHER_VALUE)
3323
+ : isMultiSource && oldValue[0] === INITIAL_WATCHER_VALUE
3272
3324
  ? []
3273
3325
  : oldValue,
3274
3326
  onCleanup
@@ -3448,7 +3500,7 @@ const BaseTransitionImpl = {
3448
3500
  if (c.type !== Comment) {
3449
3501
  if (hasFound) {
3450
3502
  // warn more than one non-comment child
3451
- warn$1('<transition> can only be used on a single element or component. ' +
3503
+ warn('<transition> can only be used on a single element or component. ' +
3452
3504
  'Use <transition-group> for lists.');
3453
3505
  break;
3454
3506
  }
@@ -3466,7 +3518,7 @@ const BaseTransitionImpl = {
3466
3518
  mode !== 'in-out' &&
3467
3519
  mode !== 'out-in' &&
3468
3520
  mode !== 'default') {
3469
- warn$1(`invalid <transition> mode: ${mode}`);
3521
+ warn(`invalid <transition> mode: ${mode}`);
3470
3522
  }
3471
3523
  if (state.isLeaving) {
3472
3524
  return emptyPlaceholder(child);
@@ -3774,7 +3826,7 @@ function defineAsyncComponent(source) {
3774
3826
  return pendingRequest;
3775
3827
  }
3776
3828
  if (!comp) {
3777
- warn$1(`Async component loader resolved to undefined. ` +
3829
+ warn(`Async component loader resolved to undefined. ` +
3778
3830
  `If you are using retry(), make sure to return its return value.`);
3779
3831
  }
3780
3832
  // interop module default
@@ -3961,7 +4013,7 @@ const KeepAliveImpl = {
3961
4013
  }
3962
4014
  function pruneCacheEntry(key) {
3963
4015
  const cached = cache.get(key);
3964
- if (!current || cached.type !== current.type) {
4016
+ if (!current || !isSameVNodeType(cached, current)) {
3965
4017
  unmount(cached);
3966
4018
  }
3967
4019
  else if (current) {
@@ -3993,7 +4045,7 @@ const KeepAliveImpl = {
3993
4045
  cache.forEach(cached => {
3994
4046
  const { subTree, suspense } = instance;
3995
4047
  const vnode = getInnerChild(subTree);
3996
- if (cached.type === vnode.type) {
4048
+ if (cached.type === vnode.type && cached.key === vnode.key) {
3997
4049
  // current instance will be unmounted as part of keep-alive's unmount
3998
4050
  resetShapeFlag(vnode);
3999
4051
  // but invoke its deactivated hook here
@@ -4013,7 +4065,7 @@ const KeepAliveImpl = {
4013
4065
  const rawVNode = children[0];
4014
4066
  if (children.length > 1) {
4015
4067
  {
4016
- warn$1(`KeepAlive should contain exactly one component child.`);
4068
+ warn(`KeepAlive should contain exactly one component child.`);
4017
4069
  }
4018
4070
  current = null;
4019
4071
  return children;
@@ -4090,7 +4142,7 @@ function matches(pattern, name) {
4090
4142
  else if (isString(pattern)) {
4091
4143
  return pattern.split(',').includes(name);
4092
4144
  }
4093
- else if (pattern.test) {
4145
+ else if (isRegExp(pattern)) {
4094
4146
  return pattern.test(name);
4095
4147
  }
4096
4148
  /* istanbul ignore next */
@@ -4184,7 +4236,7 @@ function injectHook(type, hook, target = currentInstance, prepend = false) {
4184
4236
  }
4185
4237
  else {
4186
4238
  const apiName = toHandlerKey(ErrorTypeStrings[type].replace(/ hook$/, ''));
4187
- warn$1(`${apiName} is called when there is no active component instance to be ` +
4239
+ warn(`${apiName} is called when there is no active component instance to be ` +
4188
4240
  `associated with. ` +
4189
4241
  `Lifecycle injection APIs can only be used during execution of setup().` +
4190
4242
  (` If you are using async setup(), make sure to register lifecycle ` +
@@ -4223,7 +4275,7 @@ return withDirectives(h(comp), [
4223
4275
  */
4224
4276
  function validateDirectiveName(name) {
4225
4277
  if (isBuiltInDirective(name)) {
4226
- warn$1('Do not use built-in directive ids as custom directive id: ' + name);
4278
+ warn('Do not use built-in directive ids as custom directive id: ' + name);
4227
4279
  }
4228
4280
  }
4229
4281
  /**
@@ -4232,7 +4284,7 @@ function validateDirectiveName(name) {
4232
4284
  function withDirectives(vnode, directives) {
4233
4285
  const internalInstance = currentRenderingInstance;
4234
4286
  if (internalInstance === null) {
4235
- warn$1(`withDirectives can only be used inside render functions.`);
4287
+ warn(`withDirectives can only be used inside render functions.`);
4236
4288
  return vnode;
4237
4289
  }
4238
4290
  const instance = getExposeProxy(internalInstance) ||
@@ -4343,12 +4395,12 @@ function resolveAsset(type, name, warnMissing = true, maybeSelfReference = false
4343
4395
  ? `\nIf this is a native custom element, make sure to exclude it from ` +
4344
4396
  `component resolution via compilerOptions.isCustomElement.`
4345
4397
  : ``;
4346
- warn$1(`Failed to resolve ${type.slice(0, -1)}: ${name}${extra}`);
4398
+ warn(`Failed to resolve ${type.slice(0, -1)}: ${name}${extra}`);
4347
4399
  }
4348
4400
  return res;
4349
4401
  }
4350
4402
  else {
4351
- warn$1(`resolve${capitalize(type.slice(0, -1))} ` +
4403
+ warn(`resolve${capitalize(type.slice(0, -1))} ` +
4352
4404
  `can only be used in render() or setup().`);
4353
4405
  }
4354
4406
  }
@@ -4373,7 +4425,7 @@ function renderList(source, renderItem, cache, index) {
4373
4425
  }
4374
4426
  else if (typeof source === 'number') {
4375
4427
  if (!Number.isInteger(source)) {
4376
- warn$1(`The v-for range expect an integer value but got ${source}.`);
4428
+ warn(`The v-for range expect an integer value but got ${source}.`);
4377
4429
  }
4378
4430
  ret = new Array(source);
4379
4431
  for (let i = 0; i < source; i++) {
@@ -4450,7 +4502,7 @@ fallback, noSlotted) {
4450
4502
  }
4451
4503
  let slot = slots[name];
4452
4504
  if (slot && slot.length > 1) {
4453
- warn$1(`SSR-optimized slot function detected in a non-SSR-optimized render ` +
4505
+ warn(`SSR-optimized slot function detected in a non-SSR-optimized render ` +
4454
4506
  `function. You need to mark this component with $dynamic-slots in the ` +
4455
4507
  `parent template.`);
4456
4508
  slot = () => [];
@@ -4503,7 +4555,7 @@ function ensureValidVNode(vnodes) {
4503
4555
  function toHandlers(obj, preserveCaseIfNecessary) {
4504
4556
  const ret = {};
4505
4557
  if (!isObject(obj)) {
4506
- warn$1(`v-on with no argument expects an object value.`);
4558
+ warn(`v-on with no argument expects an object value.`);
4507
4559
  return ret;
4508
4560
  }
4509
4561
  for (const key in obj) {
@@ -4635,11 +4687,11 @@ const PublicInstanceProxyHandlers = {
4635
4687
  // to infinite warning loop
4636
4688
  key.indexOf('__v') !== 0)) {
4637
4689
  if (data !== EMPTY_OBJ && isReservedPrefix(key[0]) && hasOwn(data, key)) {
4638
- warn$1(`Property ${JSON.stringify(key)} must be accessed via $data because it starts with a reserved ` +
4690
+ warn(`Property ${JSON.stringify(key)} must be accessed via $data because it starts with a reserved ` +
4639
4691
  `character ("$" or "_") and is not proxied on the render context.`);
4640
4692
  }
4641
4693
  else if (instance === currentRenderingInstance) {
4642
- warn$1(`Property ${JSON.stringify(key)} was accessed during render ` +
4694
+ warn(`Property ${JSON.stringify(key)} was accessed during render ` +
4643
4695
  `but is not defined on instance.`);
4644
4696
  }
4645
4697
  }
@@ -4652,7 +4704,7 @@ const PublicInstanceProxyHandlers = {
4652
4704
  }
4653
4705
  else if (setupState.__isScriptSetup &&
4654
4706
  hasOwn(setupState, key)) {
4655
- warn$1(`Cannot mutate <script setup> binding "${key}" from Options API.`);
4707
+ warn(`Cannot mutate <script setup> binding "${key}" from Options API.`);
4656
4708
  return false;
4657
4709
  }
4658
4710
  else if (data !== EMPTY_OBJ && hasOwn(data, key)) {
@@ -4660,11 +4712,11 @@ const PublicInstanceProxyHandlers = {
4660
4712
  return true;
4661
4713
  }
4662
4714
  else if (hasOwn(instance.props, key)) {
4663
- warn$1(`Attempting to mutate prop "${key}". Props are readonly.`);
4715
+ warn(`Attempting to mutate prop "${key}". Props are readonly.`);
4664
4716
  return false;
4665
4717
  }
4666
4718
  if (key[0] === '$' && key.slice(1) in instance) {
4667
- warn$1(`Attempting to mutate public property "${key}". ` +
4719
+ warn(`Attempting to mutate public property "${key}". ` +
4668
4720
  `Properties starting with $ are reserved and readonly.`);
4669
4721
  return false;
4670
4722
  }
@@ -4705,7 +4757,7 @@ const PublicInstanceProxyHandlers = {
4705
4757
  };
4706
4758
  {
4707
4759
  PublicInstanceProxyHandlers.ownKeys = (target) => {
4708
- warn$1(`Avoid app logic that relies on enumerating keys on a component instance. ` +
4760
+ warn(`Avoid app logic that relies on enumerating keys on a component instance. ` +
4709
4761
  `The keys will be empty in production mode to avoid performance overhead.`);
4710
4762
  return Reflect.ownKeys(target);
4711
4763
  };
@@ -4721,7 +4773,7 @@ const RuntimeCompiledPublicInstanceProxyHandlers = /*#__PURE__*/ extend({}, Publ
4721
4773
  has(_, key) {
4722
4774
  const has = key[0] !== '_' && !isGloballyWhitelisted(key);
4723
4775
  if (!has && PublicInstanceProxyHandlers.has(_, key)) {
4724
- warn$1(`Property ${JSON.stringify(key)} should not start with _ which is a reserved prefix for Vue internals.`);
4776
+ warn(`Property ${JSON.stringify(key)} should not start with _ which is a reserved prefix for Vue internals.`);
4725
4777
  }
4726
4778
  return has;
4727
4779
  }
@@ -4771,7 +4823,7 @@ function exposeSetupStateOnRenderContext(instance) {
4771
4823
  Object.keys(toRaw(setupState)).forEach(key => {
4772
4824
  if (!setupState.__isScriptSetup) {
4773
4825
  if (isReservedPrefix(key[0])) {
4774
- warn$1(`setup() return property ${JSON.stringify(key)} should not start with "$" or "_" ` +
4826
+ warn(`setup() return property ${JSON.stringify(key)} should not start with "$" or "_" ` +
4775
4827
  `which are reserved prefixes for Vue internals.`);
4776
4828
  return;
4777
4829
  }
@@ -4789,7 +4841,7 @@ function createDuplicateChecker() {
4789
4841
  const cache = Object.create(null);
4790
4842
  return (type, key) => {
4791
4843
  if (cache[key]) {
4792
- warn$1(`${type} property "${key}" is already defined in ${cache[key]}.`);
4844
+ warn(`${type} property "${key}" is already defined in ${cache[key]}.`);
4793
4845
  }
4794
4846
  else {
4795
4847
  cache[key] = type;
@@ -4806,7 +4858,7 @@ function applyOptions(instance) {
4806
4858
  // call beforeCreate first before accessing other options since
4807
4859
  // the hook may mutate resolved options (#2791)
4808
4860
  if (options.beforeCreate) {
4809
- callHook(options.beforeCreate, instance, "bc" /* LifecycleHooks.BEFORE_CREATE */);
4861
+ callHook$1(options.beforeCreate, instance, "bc" /* LifecycleHooks.BEFORE_CREATE */);
4810
4862
  }
4811
4863
  const {
4812
4864
  // state
@@ -4856,24 +4908,24 @@ function applyOptions(instance) {
4856
4908
  }
4857
4909
  }
4858
4910
  else {
4859
- warn$1(`Method "${key}" has type "${typeof methodHandler}" in the component definition. ` +
4911
+ warn(`Method "${key}" has type "${typeof methodHandler}" in the component definition. ` +
4860
4912
  `Did you reference the function correctly?`);
4861
4913
  }
4862
4914
  }
4863
4915
  }
4864
4916
  if (dataOptions) {
4865
4917
  if (!isFunction(dataOptions)) {
4866
- warn$1(`The data option must be a function. ` +
4918
+ warn(`The data option must be a function. ` +
4867
4919
  `Plain object usage is no longer supported.`);
4868
4920
  }
4869
4921
  const data = dataOptions.call(publicThis, publicThis);
4870
4922
  if (isPromise(data)) {
4871
- warn$1(`data() returned a Promise - note data() cannot be async; If you ` +
4923
+ warn(`data() returned a Promise - note data() cannot be async; If you ` +
4872
4924
  `intend to perform data fetching before component renders, use ` +
4873
4925
  `async setup() + <Suspense>.`);
4874
4926
  }
4875
4927
  if (!isObject(data)) {
4876
- warn$1(`data() should return an object.`);
4928
+ warn(`data() should return an object.`);
4877
4929
  }
4878
4930
  else {
4879
4931
  instance.data = reactive(data);
@@ -4904,15 +4956,15 @@ function applyOptions(instance) {
4904
4956
  ? opt.get.bind(publicThis, publicThis)
4905
4957
  : NOOP;
4906
4958
  if (get === NOOP) {
4907
- warn$1(`Computed property "${key}" has no getter.`);
4959
+ warn(`Computed property "${key}" has no getter.`);
4908
4960
  }
4909
4961
  const set = !isFunction(opt) && isFunction(opt.set)
4910
4962
  ? opt.set.bind(publicThis)
4911
4963
  : () => {
4912
- warn$1(`Write operation failed: computed property "${key}" is readonly.`);
4964
+ warn(`Write operation failed: computed property "${key}" is readonly.`);
4913
4965
  }
4914
4966
  ;
4915
- const c = computed$1({
4967
+ const c = computed({
4916
4968
  get,
4917
4969
  set
4918
4970
  });
@@ -4941,7 +4993,7 @@ function applyOptions(instance) {
4941
4993
  });
4942
4994
  }
4943
4995
  if (created) {
4944
- callHook(created, instance, "c" /* LifecycleHooks.CREATED */);
4996
+ callHook$1(created, instance, "c" /* LifecycleHooks.CREATED */);
4945
4997
  }
4946
4998
  function registerLifecycleHook(register, hook) {
4947
4999
  if (isArray(hook)) {
@@ -5021,7 +5073,7 @@ function resolveInjections(injectOptions, ctx, checkDuplicateProperties = NOOP,
5021
5073
  }
5022
5074
  else {
5023
5075
  {
5024
- warn$1(`injected property "${key}" is a ref and will be auto-unwrapped ` +
5076
+ warn(`injected property "${key}" is a ref and will be auto-unwrapped ` +
5025
5077
  `and no longer needs \`.value\` in the next minor release. ` +
5026
5078
  `To opt-in to the new behavior now, ` +
5027
5079
  `set \`app.config.unwrapInjectedRef = true\` (this config is ` +
@@ -5038,7 +5090,7 @@ function resolveInjections(injectOptions, ctx, checkDuplicateProperties = NOOP,
5038
5090
  }
5039
5091
  }
5040
5092
  }
5041
- function callHook(hook, instance, type) {
5093
+ function callHook$1(hook, instance, type) {
5042
5094
  callWithAsyncErrorHandling(isArray(hook)
5043
5095
  ? hook.map(h => h.bind(instance.proxy))
5044
5096
  : hook.bind(instance.proxy), instance, type);
@@ -5053,7 +5105,7 @@ function createWatcher(raw, ctx, publicThis, key) {
5053
5105
  watch(getter, handler);
5054
5106
  }
5055
5107
  else {
5056
- warn$1(`Invalid watch handler specified by key "${raw}"`, handler);
5108
+ warn(`Invalid watch handler specified by key "${raw}"`, handler);
5057
5109
  }
5058
5110
  }
5059
5111
  else if (isFunction(raw)) {
@@ -5071,12 +5123,12 @@ function createWatcher(raw, ctx, publicThis, key) {
5071
5123
  watch(getter, handler, raw);
5072
5124
  }
5073
5125
  else {
5074
- warn$1(`Invalid watch handler specified by key "${raw.handler}"`, handler);
5126
+ warn(`Invalid watch handler specified by key "${raw.handler}"`, handler);
5075
5127
  }
5076
5128
  }
5077
5129
  }
5078
5130
  else {
5079
- warn$1(`Invalid watch option: "${key}"`, raw);
5131
+ warn(`Invalid watch option: "${key}"`, raw);
5080
5132
  }
5081
5133
  }
5082
5134
  /**
@@ -5120,7 +5172,7 @@ function mergeOptions(to, from, strats, asMixin = false) {
5120
5172
  }
5121
5173
  for (const key in from) {
5122
5174
  if (asMixin && key === 'expose') {
5123
- warn$1(`"expose" option is ignored when declared in mixins or extends. ` +
5175
+ warn(`"expose" option is ignored when declared in mixins or extends. ` +
5124
5176
  `It should only be declared in the base component itself.`);
5125
5177
  }
5126
5178
  else {
@@ -5453,7 +5505,7 @@ function normalizePropsOptions(comp, appContext, asMixin = false) {
5453
5505
  if (isArray(raw)) {
5454
5506
  for (let i = 0; i < raw.length; i++) {
5455
5507
  if (!isString(raw[i])) {
5456
- warn$1(`props must be strings when using array syntax.`, raw[i]);
5508
+ warn(`props must be strings when using array syntax.`, raw[i]);
5457
5509
  }
5458
5510
  const normalizedKey = camelize(raw[i]);
5459
5511
  if (validatePropName(normalizedKey)) {
@@ -5463,7 +5515,7 @@ function normalizePropsOptions(comp, appContext, asMixin = false) {
5463
5515
  }
5464
5516
  else if (raw) {
5465
5517
  if (!isObject(raw)) {
5466
- warn$1(`invalid props options`, raw);
5518
+ warn(`invalid props options`, raw);
5467
5519
  }
5468
5520
  for (const key in raw) {
5469
5521
  const normalizedKey = camelize(key);
@@ -5496,15 +5548,15 @@ function validatePropName(key) {
5496
5548
  return true;
5497
5549
  }
5498
5550
  else {
5499
- warn$1(`Invalid prop name: "${key}" is a reserved property.`);
5551
+ warn(`Invalid prop name: "${key}" is a reserved property.`);
5500
5552
  }
5501
5553
  return false;
5502
5554
  }
5503
5555
  // use function string name to check type constructors
5504
5556
  // so that it works across vms / iframes.
5505
5557
  function getType(ctor) {
5506
- const match = ctor && ctor.toString().match(/^\s*function (\w+)/);
5507
- return match ? match[1] : ctor === null ? 'null' : '';
5558
+ const match = ctor && ctor.toString().match(/^\s*(function|class) (\w+)/);
5559
+ return match ? match[2] : ctor === null ? 'null' : '';
5508
5560
  }
5509
5561
  function isSameType(a, b) {
5510
5562
  return getType(a) === getType(b);
@@ -5538,7 +5590,7 @@ function validateProp(name, value, prop, isAbsent) {
5538
5590
  const { type, required, validator } = prop;
5539
5591
  // required!
5540
5592
  if (required && isAbsent) {
5541
- warn$1('Missing required prop: "' + name + '"');
5593
+ warn('Missing required prop: "' + name + '"');
5542
5594
  return;
5543
5595
  }
5544
5596
  // missing but optional
@@ -5557,13 +5609,13 @@ function validateProp(name, value, prop, isAbsent) {
5557
5609
  isValid = valid;
5558
5610
  }
5559
5611
  if (!isValid) {
5560
- warn$1(getInvalidTypeMessage(name, value, expectedTypes));
5612
+ warn(getInvalidTypeMessage(name, value, expectedTypes));
5561
5613
  return;
5562
5614
  }
5563
5615
  }
5564
5616
  // custom validator
5565
5617
  if (validator && !validator(value)) {
5566
- warn$1('Invalid prop: custom validator check failed for prop "' + name + '".');
5618
+ warn('Invalid prop: custom validator check failed for prop "' + name + '".');
5567
5619
  }
5568
5620
  }
5569
5621
  const isSimpleType = /*#__PURE__*/ makeMap('String,Number,Boolean,Function,Symbol,BigInt');
@@ -5660,7 +5712,7 @@ const normalizeSlot = (key, rawSlot, ctx) => {
5660
5712
  }
5661
5713
  const normalized = withCtx((...args) => {
5662
5714
  if (true && currentInstance) {
5663
- warn$1(`Slot "${key}" invoked outside of the render function: ` +
5715
+ warn(`Slot "${key}" invoked outside of the render function: ` +
5664
5716
  `this will not track dependencies used in the slot. ` +
5665
5717
  `Invoke the slot function inside the render function instead.`);
5666
5718
  }
@@ -5680,7 +5732,7 @@ const normalizeObjectSlots = (rawSlots, slots, instance) => {
5680
5732
  }
5681
5733
  else if (value != null) {
5682
5734
  {
5683
- warn$1(`Non-function value encountered for slot "${key}". ` +
5735
+ warn(`Non-function value encountered for slot "${key}". ` +
5684
5736
  `Prefer function slots for better performance.`);
5685
5737
  }
5686
5738
  const normalized = normalizeSlotValue(value);
@@ -5691,7 +5743,7 @@ const normalizeObjectSlots = (rawSlots, slots, instance) => {
5691
5743
  const normalizeVNodeSlots = (instance, children) => {
5692
5744
  if (!isKeepAlive(instance.vnode) &&
5693
5745
  !(false )) {
5694
- warn$1(`Non-function value encountered for default slot. ` +
5746
+ warn(`Non-function value encountered for default slot. ` +
5695
5747
  `Prefer function slots for better performance.`);
5696
5748
  }
5697
5749
  const normalized = normalizeSlotValue(children);
@@ -5792,21 +5844,21 @@ function createAppContext() {
5792
5844
  emitsCache: new WeakMap()
5793
5845
  };
5794
5846
  }
5795
- let uid = 0;
5847
+ let uid$1 = 0;
5796
5848
  function createAppAPI(render, hydrate) {
5797
5849
  return function createApp(rootComponent, rootProps = null) {
5798
5850
  if (!isFunction(rootComponent)) {
5799
5851
  rootComponent = Object.assign({}, rootComponent);
5800
5852
  }
5801
5853
  if (rootProps != null && !isObject(rootProps)) {
5802
- warn$1(`root props passed to app.mount() must be an object.`);
5854
+ warn(`root props passed to app.mount() must be an object.`);
5803
5855
  rootProps = null;
5804
5856
  }
5805
5857
  const context = createAppContext();
5806
5858
  const installedPlugins = new Set();
5807
5859
  let isMounted = false;
5808
5860
  const app = (context.app = {
5809
- _uid: uid++,
5861
+ _uid: uid$1++,
5810
5862
  _component: rootComponent,
5811
5863
  _props: rootProps,
5812
5864
  _container: null,
@@ -5818,12 +5870,12 @@ function createAppAPI(render, hydrate) {
5818
5870
  },
5819
5871
  set config(v) {
5820
5872
  {
5821
- warn$1(`app.config cannot be replaced. Modify individual options instead.`);
5873
+ warn(`app.config cannot be replaced. Modify individual options instead.`);
5822
5874
  }
5823
5875
  },
5824
5876
  use(plugin, ...options) {
5825
5877
  if (installedPlugins.has(plugin)) {
5826
- warn$1(`Plugin has already been applied to target app.`);
5878
+ warn(`Plugin has already been applied to target app.`);
5827
5879
  }
5828
5880
  else if (plugin && isFunction(plugin.install)) {
5829
5881
  installedPlugins.add(plugin);
@@ -5834,7 +5886,7 @@ function createAppAPI(render, hydrate) {
5834
5886
  plugin(app, ...options);
5835
5887
  }
5836
5888
  else {
5837
- warn$1(`A plugin must either be a function or an object with an "install" ` +
5889
+ warn(`A plugin must either be a function or an object with an "install" ` +
5838
5890
  `function.`);
5839
5891
  }
5840
5892
  return app;
@@ -5845,7 +5897,7 @@ function createAppAPI(render, hydrate) {
5845
5897
  context.mixins.push(mixin);
5846
5898
  }
5847
5899
  else {
5848
- warn$1('Mixin has already been applied to target app' +
5900
+ warn('Mixin has already been applied to target app' +
5849
5901
  (mixin.name ? `: ${mixin.name}` : ''));
5850
5902
  }
5851
5903
  }
@@ -5859,7 +5911,7 @@ function createAppAPI(render, hydrate) {
5859
5911
  return context.components[name];
5860
5912
  }
5861
5913
  if (context.components[name]) {
5862
- warn$1(`Component "${name}" has already been registered in target app.`);
5914
+ warn(`Component "${name}" has already been registered in target app.`);
5863
5915
  }
5864
5916
  context.components[name] = component;
5865
5917
  return app;
@@ -5872,7 +5924,7 @@ function createAppAPI(render, hydrate) {
5872
5924
  return context.directives[name];
5873
5925
  }
5874
5926
  if (context.directives[name]) {
5875
- warn$1(`Directive "${name}" has already been registered in target app.`);
5927
+ warn(`Directive "${name}" has already been registered in target app.`);
5876
5928
  }
5877
5929
  context.directives[name] = directive;
5878
5930
  return app;
@@ -5881,7 +5933,7 @@ function createAppAPI(render, hydrate) {
5881
5933
  if (!isMounted) {
5882
5934
  // #5571
5883
5935
  if (rootContainer.__vue_app__) {
5884
- warn$1(`There is already an app instance mounted on the host container.\n` +
5936
+ warn(`There is already an app instance mounted on the host container.\n` +
5885
5937
  ` If you want to mount another app on the same host container,` +
5886
5938
  ` you need to unmount the previous app by calling \`app.unmount()\` first.`);
5887
5939
  }
@@ -5911,7 +5963,7 @@ function createAppAPI(render, hydrate) {
5911
5963
  return getExposeProxy(vnode.component) || vnode.component.proxy;
5912
5964
  }
5913
5965
  else {
5914
- warn$1(`App has already been mounted.\n` +
5966
+ warn(`App has already been mounted.\n` +
5915
5967
  `If you want to remount the same app, move your app creation logic ` +
5916
5968
  `into a factory function and create fresh app instances for each ` +
5917
5969
  `mount - e.g. \`const createMyApp = () => createApp(App)\``);
@@ -5927,12 +5979,12 @@ function createAppAPI(render, hydrate) {
5927
5979
  delete app._container.__vue_app__;
5928
5980
  }
5929
5981
  else {
5930
- warn$1(`Cannot unmount an app that is not mounted.`);
5982
+ warn(`Cannot unmount an app that is not mounted.`);
5931
5983
  }
5932
5984
  },
5933
5985
  provide(key, value) {
5934
5986
  if (key in context.provides) {
5935
- warn$1(`App already provides property with key "${String(key)}". ` +
5987
+ warn(`App already provides property with key "${String(key)}". ` +
5936
5988
  `It will be overwritten with the new value.`);
5937
5989
  }
5938
5990
  context.provides[key] = value;
@@ -5962,7 +6014,7 @@ function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
5962
6014
  const value = isUnmount ? null : refValue;
5963
6015
  const { i: owner, r: ref } = rawRef;
5964
6016
  if (!owner) {
5965
- warn$1(`Missing ref owner context. ref cannot be used on hoisted vnodes. ` +
6017
+ warn(`Missing ref owner context. ref cannot be used on hoisted vnodes. ` +
5966
6018
  `A vnode with ref must be created inside the render function.`);
5967
6019
  return;
5968
6020
  }
@@ -6029,7 +6081,7 @@ function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
6029
6081
  refs[rawRef.k] = value;
6030
6082
  }
6031
6083
  else {
6032
- warn$1('Invalid template ref type:', ref, `(${typeof ref})`);
6084
+ warn('Invalid template ref type:', ref, `(${typeof ref})`);
6033
6085
  }
6034
6086
  };
6035
6087
  if (value) {
@@ -6041,7 +6093,7 @@ function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
6041
6093
  }
6042
6094
  }
6043
6095
  else {
6044
- warn$1('Invalid template ref type:', ref, `(${typeof ref})`);
6096
+ warn('Invalid template ref type:', ref, `(${typeof ref})`);
6045
6097
  }
6046
6098
  }
6047
6099
  }
@@ -6058,7 +6110,7 @@ function createHydrationFunctions(rendererInternals) {
6058
6110
  const { mt: mountComponent, p: patch, o: { patchProp, createText, nextSibling, parentNode, remove, insert, createComment } } = rendererInternals;
6059
6111
  const hydrate = (vnode, container) => {
6060
6112
  if (!container.hasChildNodes()) {
6061
- warn$1(`Attempting to hydrate existing markup but container is empty. ` +
6113
+ warn(`Attempting to hydrate existing markup but container is empty. ` +
6062
6114
  `Performing full mount instead.`);
6063
6115
  patch(null, vnode, container);
6064
6116
  flushPostFlushCbs();
@@ -6101,7 +6153,7 @@ function createHydrationFunctions(rendererInternals) {
6101
6153
  else {
6102
6154
  if (node.data !== vnode.children) {
6103
6155
  hasMismatch = true;
6104
- warn$1(`Hydration text mismatch:` +
6156
+ warn(`Hydration text mismatch:` +
6105
6157
  `\n- Client: ${JSON.stringify(node.data)}` +
6106
6158
  `\n- Server: ${JSON.stringify(vnode.children)}`);
6107
6159
  node.data = vnode.children;
@@ -6216,7 +6268,7 @@ function createHydrationFunctions(rendererInternals) {
6216
6268
  nextNode = vnode.type.hydrate(node, vnode, parentComponent, parentSuspense, isSVGContainer(parentNode(node)), slotScopeIds, optimized, rendererInternals, hydrateNode);
6217
6269
  }
6218
6270
  else {
6219
- warn$1('Invalid HostVNode type:', type, `(${typeof type})`);
6271
+ warn('Invalid HostVNode type:', type, `(${typeof type})`);
6220
6272
  }
6221
6273
  }
6222
6274
  if (ref != null) {
@@ -6277,7 +6329,7 @@ function createHydrationFunctions(rendererInternals) {
6277
6329
  while (next) {
6278
6330
  hasMismatch = true;
6279
6331
  if (!hasWarned) {
6280
- warn$1(`Hydration children mismatch in <${vnode.type}>: ` +
6332
+ warn(`Hydration children mismatch in <${vnode.type}>: ` +
6281
6333
  `server rendered element contains more child nodes than client vdom.`);
6282
6334
  hasWarned = true;
6283
6335
  }
@@ -6290,7 +6342,7 @@ function createHydrationFunctions(rendererInternals) {
6290
6342
  else if (shapeFlag & 8 /* ShapeFlags.TEXT_CHILDREN */) {
6291
6343
  if (el.textContent !== vnode.children) {
6292
6344
  hasMismatch = true;
6293
- warn$1(`Hydration text content mismatch in <${vnode.type}>:\n` +
6345
+ warn(`Hydration text content mismatch in <${vnode.type}>:\n` +
6294
6346
  `- Client: ${el.textContent}\n` +
6295
6347
  `- Server: ${vnode.children}`);
6296
6348
  el.textContent = vnode.children;
@@ -6317,7 +6369,7 @@ function createHydrationFunctions(rendererInternals) {
6317
6369
  else {
6318
6370
  hasMismatch = true;
6319
6371
  if (!hasWarned) {
6320
- warn$1(`Hydration children mismatch in <${container.tagName.toLowerCase()}>: ` +
6372
+ warn(`Hydration children mismatch in <${container.tagName.toLowerCase()}>: ` +
6321
6373
  `server rendered element contains fewer child nodes than client vdom.`);
6322
6374
  hasWarned = true;
6323
6375
  }
@@ -6350,7 +6402,7 @@ function createHydrationFunctions(rendererInternals) {
6350
6402
  };
6351
6403
  const handleMismatch = (node, vnode, parentComponent, parentSuspense, slotScopeIds, isFragment) => {
6352
6404
  hasMismatch = true;
6353
- warn$1(`Hydration node mismatch:\n- Client vnode:`, vnode.type, `\n- Server rendered DOM:`, node, node.nodeType === 3 /* DOMNodeTypes.TEXT */
6405
+ warn(`Hydration node mismatch:\n- Client vnode:`, vnode.type, `\n- Server rendered DOM:`, node, node.nodeType === 3 /* DOMNodeTypes.TEXT */
6354
6406
  ? `(text)`
6355
6407
  : isComment(node) && node.data === '['
6356
6408
  ? `(start of fragment)`
@@ -6518,7 +6570,7 @@ function baseCreateRenderer(options, createHydrationFns) {
6518
6570
  type.process(n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized, internals);
6519
6571
  }
6520
6572
  else {
6521
- warn$1('Invalid VNode type:', type, `(${typeof type})`);
6573
+ warn('Invalid VNode type:', type, `(${typeof type})`);
6522
6574
  }
6523
6575
  }
6524
6576
  // set ref
@@ -6608,6 +6660,8 @@ function baseCreateRenderer(options, createHydrationFns) {
6608
6660
  if (dirs) {
6609
6661
  invokeDirectiveHook(vnode, null, parentComponent, 'created');
6610
6662
  }
6663
+ // scopeId
6664
+ setScopeId(el, vnode, vnode.scopeId, slotScopeIds, parentComponent);
6611
6665
  // props
6612
6666
  if (props) {
6613
6667
  for (const key in props) {
@@ -6631,8 +6685,6 @@ function baseCreateRenderer(options, createHydrationFns) {
6631
6685
  invokeVNodeHook(vnodeHook, parentComponent, vnode);
6632
6686
  }
6633
6687
  }
6634
- // scopeId
6635
- setScopeId(el, vnode, vnode.scopeId, slotScopeIds, parentComponent);
6636
6688
  {
6637
6689
  Object.defineProperty(el, '__vnode', {
6638
6690
  value: vnode,
@@ -7342,7 +7394,7 @@ function baseCreateRenderer(options, createHydrationFns) {
7342
7394
  : normalizeVNode(c2[i]));
7343
7395
  if (nextChild.key != null) {
7344
7396
  if (keyToNewIndexMap.has(nextChild.key)) {
7345
- warn$1(`Duplicate keys found during update:`, JSON.stringify(nextChild.key), `Make sure keys are unique.`);
7397
+ warn(`Duplicate keys found during update:`, JSON.stringify(nextChild.key), `Make sure keys are unique.`);
7346
7398
  }
7347
7399
  keyToNewIndexMap.set(nextChild.key, i);
7348
7400
  }
@@ -7787,14 +7839,14 @@ const resolveTarget = (props, select) => {
7787
7839
  const targetSelector = props && props.to;
7788
7840
  if (isString(targetSelector)) {
7789
7841
  if (!select) {
7790
- warn$1(`Current renderer does not support string target for Teleports. ` +
7842
+ warn(`Current renderer does not support string target for Teleports. ` +
7791
7843
  `(missing querySelector renderer option)`);
7792
7844
  return null;
7793
7845
  }
7794
7846
  else {
7795
7847
  const target = select(targetSelector);
7796
7848
  if (!target) {
7797
- warn$1(`Failed to locate Teleport target with selector "${targetSelector}". ` +
7849
+ warn(`Failed to locate Teleport target with selector "${targetSelector}". ` +
7798
7850
  `Note the target element must exist before the component is mounted - ` +
7799
7851
  `i.e. the target cannot be rendered by the component itself, and ` +
7800
7852
  `ideally should be outside of the entire Vue component tree.`);
@@ -7804,7 +7856,7 @@ const resolveTarget = (props, select) => {
7804
7856
  }
7805
7857
  else {
7806
7858
  if (!targetSelector && !isTeleportDisabled(props)) {
7807
- warn$1(`Invalid Teleport target: ${targetSelector}`);
7859
+ warn(`Invalid Teleport target: ${targetSelector}`);
7808
7860
  }
7809
7861
  return targetSelector;
7810
7862
  }
@@ -7837,7 +7889,7 @@ const TeleportImpl = {
7837
7889
  isSVG = isSVG || isTargetSVG(target);
7838
7890
  }
7839
7891
  else if (!disabled) {
7840
- warn$1('Invalid Teleport target on mount:', target, `(${typeof target})`);
7892
+ warn('Invalid Teleport target on mount:', target, `(${typeof target})`);
7841
7893
  }
7842
7894
  const mount = (container, anchor) => {
7843
7895
  // Teleport *always* has Array children. This is enforced in both the
@@ -7889,7 +7941,7 @@ const TeleportImpl = {
7889
7941
  moveTeleport(n2, nextTarget, null, internals, 0 /* TeleportMoveTypes.TARGET_CHANGE */);
7890
7942
  }
7891
7943
  else {
7892
- warn$1('Invalid Teleport target on update:', target, `(${typeof target})`);
7944
+ warn('Invalid Teleport target on update:', target, `(${typeof target})`);
7893
7945
  }
7894
7946
  }
7895
7947
  else if (wasDisabled) {
@@ -8170,7 +8222,7 @@ function createBaseVNode(type, props = null, children = null, patchFlag = 0, dyn
8170
8222
  }
8171
8223
  // validate key
8172
8224
  if (vnode.key !== vnode.key) {
8173
- warn$1(`VNode created with invalid key (NaN). VNode type:`, vnode.type);
8225
+ warn(`VNode created with invalid key (NaN). VNode type:`, vnode.type);
8174
8226
  }
8175
8227
  // track vnode for block tree
8176
8228
  if (isBlockTreeEnabled > 0 &&
@@ -8194,7 +8246,7 @@ const createVNode = (createVNodeWithArgsTransform );
8194
8246
  function _createVNode(type, props = null, children = null, patchFlag = 0, dynamicProps = null, isBlockNode = false) {
8195
8247
  if (!type || type === NULL_DYNAMIC_COMPONENT) {
8196
8248
  if (!type) {
8197
- warn$1(`Invalid vnode type when creating vnode: ${type}.`);
8249
+ warn(`Invalid vnode type when creating vnode: ${type}.`);
8198
8250
  }
8199
8251
  type = Comment;
8200
8252
  }
@@ -8252,7 +8304,7 @@ function _createVNode(type, props = null, children = null, patchFlag = 0, dynami
8252
8304
  : 0;
8253
8305
  if (shapeFlag & 4 /* ShapeFlags.STATEFUL_COMPONENT */ && isProxy(type)) {
8254
8306
  type = toRaw(type);
8255
- warn$1(`Vue received a Component which was made a reactive object. This can ` +
8307
+ warn(`Vue received a Component which was made a reactive object. This can ` +
8256
8308
  `lead to unnecessary performance overhead, and should be avoided by ` +
8257
8309
  `marking the component with \`markRaw\` or using \`shallowRef\` ` +
8258
8310
  `instead of \`ref\`.`, `\nComponent that was made reactive: `, type);
@@ -8320,7 +8372,8 @@ function cloneVNode(vnode, extraProps, mergeRef = false) {
8320
8372
  ssFallback: vnode.ssFallback && cloneVNode(vnode.ssFallback),
8321
8373
  el: vnode.el,
8322
8374
  anchor: vnode.anchor,
8323
- ctx: vnode.ctx
8375
+ ctx: vnode.ctx,
8376
+ ce: vnode.ce
8324
8377
  };
8325
8378
  return cloned;
8326
8379
  }
@@ -8487,13 +8540,13 @@ function invokeVNodeHook(hook, instance, vnode, prevVNode = null) {
8487
8540
  }
8488
8541
 
8489
8542
  const emptyAppContext = createAppContext();
8490
- let uid$1 = 0;
8543
+ let uid = 0;
8491
8544
  function createComponentInstance(vnode, parent, suspense) {
8492
8545
  const type = vnode.type;
8493
8546
  // inherit parent app context - or - if root, adopt from root vnode
8494
8547
  const appContext = (parent ? parent.appContext : vnode.appContext) || emptyAppContext;
8495
8548
  const instance = {
8496
- uid: uid$1++,
8549
+ uid: uid++,
8497
8550
  vnode,
8498
8551
  type,
8499
8552
  parent,
@@ -8563,7 +8616,7 @@ function createComponentInstance(vnode, parent, suspense) {
8563
8616
  instance.ctx = createDevRenderContext(instance);
8564
8617
  }
8565
8618
  instance.root = parent ? parent.root : instance;
8566
- instance.emit = emit$1.bind(null, instance);
8619
+ instance.emit = emit.bind(null, instance);
8567
8620
  // apply custom element special handling
8568
8621
  if (vnode.ce) {
8569
8622
  vnode.ce(instance);
@@ -8584,7 +8637,7 @@ const isBuiltInTag = /*#__PURE__*/ makeMap('slot,component');
8584
8637
  function validateComponentName(name, config) {
8585
8638
  const appIsNativeTag = config.isNativeTag || NO;
8586
8639
  if (isBuiltInTag(name) || appIsNativeTag(name)) {
8587
- warn$1('Do not use built-in or reserved HTML elements as component id: ' + name);
8640
+ warn('Do not use built-in or reserved HTML elements as component id: ' + name);
8588
8641
  }
8589
8642
  }
8590
8643
  function isStatefulComponent(instance) {
@@ -8623,7 +8676,7 @@ function setupStatefulComponent(instance, isSSR) {
8623
8676
  }
8624
8677
  }
8625
8678
  if (Component.compilerOptions && isRuntimeOnly()) {
8626
- warn$1(`"compilerOptions" is only supported when using a build of Vue that ` +
8679
+ warn(`"compilerOptions" is only supported when using a build of Vue that ` +
8627
8680
  `includes the runtime compiler. Since you are using a runtime-only ` +
8628
8681
  `build, the options should be passed via your build tool config instead.`);
8629
8682
  }
@@ -8664,7 +8717,7 @@ function setupStatefulComponent(instance, isSSR) {
8664
8717
  instance.asyncDep = setupResult;
8665
8718
  if (!instance.suspense) {
8666
8719
  const name = (_a = Component.name) !== null && _a !== void 0 ? _a : 'Anonymous';
8667
- warn$1(`Component <${name}>: setup function returned a promise, but no ` +
8720
+ warn(`Component <${name}>: setup function returned a promise, but no ` +
8668
8721
  `<Suspense> boundary was found in the parent component tree. ` +
8669
8722
  `A component with async setup() must be nested in a <Suspense> ` +
8670
8723
  `in order to be rendered.`);
@@ -8688,7 +8741,7 @@ function handleSetupResult(instance, setupResult, isSSR) {
8688
8741
  }
8689
8742
  else if (isObject(setupResult)) {
8690
8743
  if (isVNode(setupResult)) {
8691
- warn$1(`setup() should not return VNodes directly - ` +
8744
+ warn(`setup() should not return VNodes directly - ` +
8692
8745
  `return a render function instead.`);
8693
8746
  }
8694
8747
  // setup returned bindings.
@@ -8702,7 +8755,7 @@ function handleSetupResult(instance, setupResult, isSSR) {
8702
8755
  }
8703
8756
  }
8704
8757
  else if (setupResult !== undefined) {
8705
- warn$1(`setup() should return an object. Received: ${setupResult === null ? 'null' : typeof setupResult}`);
8758
+ warn(`setup() should return an object. Received: ${setupResult === null ? 'null' : typeof setupResult}`);
8706
8759
  }
8707
8760
  finishComponentSetup(instance, isSSR);
8708
8761
  }
@@ -8769,13 +8822,13 @@ function finishComponentSetup(instance, isSSR, skipOptions) {
8769
8822
  if (!Component.render && instance.render === NOOP && !isSSR) {
8770
8823
  /* istanbul ignore if */
8771
8824
  if (!compile && Component.template) {
8772
- warn$1(`Component provided template option but ` +
8825
+ warn(`Component provided template option but ` +
8773
8826
  `runtime compilation is not supported in this build of Vue.` +
8774
8827
  (` Use "vue.esm-browser.js" instead.`
8775
8828
  ) /* should not happen */);
8776
8829
  }
8777
8830
  else {
8778
- warn$1(`Component is missing template or render function.`);
8831
+ warn(`Component is missing template or render function.`);
8779
8832
  }
8780
8833
  }
8781
8834
  }
@@ -8787,11 +8840,11 @@ function createAttrsProxy(instance) {
8787
8840
  return target[key];
8788
8841
  },
8789
8842
  set() {
8790
- warn$1(`setupContext.attrs is readonly.`);
8843
+ warn(`setupContext.attrs is readonly.`);
8791
8844
  return false;
8792
8845
  },
8793
8846
  deleteProperty() {
8794
- warn$1(`setupContext.attrs is readonly.`);
8847
+ warn(`setupContext.attrs is readonly.`);
8795
8848
  return false;
8796
8849
  }
8797
8850
  }
@@ -8799,8 +8852,24 @@ function createAttrsProxy(instance) {
8799
8852
  }
8800
8853
  function createSetupContext(instance) {
8801
8854
  const expose = exposed => {
8802
- if (instance.exposed) {
8803
- warn$1(`expose() should be called only once per setup().`);
8855
+ {
8856
+ if (instance.exposed) {
8857
+ warn(`expose() should be called only once per setup().`);
8858
+ }
8859
+ if (exposed != null) {
8860
+ let exposedType = typeof exposed;
8861
+ if (exposedType === 'object') {
8862
+ if (isArray(exposed)) {
8863
+ exposedType = 'array';
8864
+ }
8865
+ else if (isRef(exposed)) {
8866
+ exposedType = 'ref';
8867
+ }
8868
+ }
8869
+ if (exposedType !== 'object') {
8870
+ warn(`expose() should be passed a plain object, received ${exposedType}.`);
8871
+ }
8872
+ }
8804
8873
  }
8805
8874
  instance.exposed = exposed || {};
8806
8875
  };
@@ -8875,13 +8944,13 @@ function isClassComponent(value) {
8875
8944
  return isFunction(value) && '__vccOpts' in value;
8876
8945
  }
8877
8946
 
8878
- const computed$1 = ((getterOrOptions, debugOptions) => {
8947
+ const computed = ((getterOrOptions, debugOptions) => {
8879
8948
  // @ts-ignore
8880
- return computed(getterOrOptions, debugOptions, isInSSRComponentSetup);
8949
+ return computed$1(getterOrOptions, debugOptions, isInSSRComponentSetup);
8881
8950
  });
8882
8951
 
8883
8952
  // dev only
8884
- const warnRuntimeUsage = (method) => warn$1(`${method}() is a compiler-hint helper that is only usable inside ` +
8953
+ const warnRuntimeUsage = (method) => warn(`${method}() is a compiler-hint helper that is only usable inside ` +
8885
8954
  `<script setup> of a single file component. Its arguments should be ` +
8886
8955
  `compiled away and passing it at runtime has no effect.`);
8887
8956
  // implementation
@@ -8948,7 +9017,7 @@ function useAttrs() {
8948
9017
  function getContext() {
8949
9018
  const i = getCurrentInstance();
8950
9019
  if (!i) {
8951
- warn$1(`useContext() called without active instance.`);
9020
+ warn(`useContext() called without active instance.`);
8952
9021
  }
8953
9022
  return i.setupContext || (i.setupContext = createSetupContext(i));
8954
9023
  }
@@ -8975,7 +9044,7 @@ function mergeDefaults(raw, defaults) {
8975
9044
  props[key] = { default: defaults[key] };
8976
9045
  }
8977
9046
  else {
8978
- warn$1(`props default key "${key}" has no corresponding declaration.`);
9047
+ warn(`props default key "${key}" has no corresponding declaration.`);
8979
9048
  }
8980
9049
  }
8981
9050
  return props;
@@ -9018,7 +9087,7 @@ function createPropsRestProxy(props, excludedKeys) {
9018
9087
  function withAsyncContext(getAwaitable) {
9019
9088
  const ctx = getCurrentInstance();
9020
9089
  if (!ctx) {
9021
- warn$1(`withAsyncContext called without active current instance. ` +
9090
+ warn(`withAsyncContext called without active current instance. ` +
9022
9091
  `This is likely a bug.`);
9023
9092
  }
9024
9093
  let awaitable = getAwaitable();
@@ -9065,7 +9134,7 @@ const useSSRContext = () => {
9065
9134
  {
9066
9135
  const ctx = inject(ssrContextKey);
9067
9136
  if (!ctx) {
9068
- warn$1(`Server rendering context not provided. Make sure to only call ` +
9137
+ warn(`Server rendering context not provided. Make sure to only call ` +
9069
9138
  `useSSRContext() conditionally in the server build.`);
9070
9139
  }
9071
9140
  return ctx;
@@ -9289,7 +9358,7 @@ function isMemoSame(cached, memo) {
9289
9358
  }
9290
9359
 
9291
9360
  // Core API ------------------------------------------------------------------
9292
- const version = "3.2.45";
9361
+ const version = "3.2.47";
9293
9362
  /**
9294
9363
  * SSR utils for \@vue/server-renderer. Only exposed in ssr-possible builds.
9295
9364
  * @internal
@@ -9406,9 +9475,6 @@ function patchStyle(el, prev, next) {
9406
9475
  const style = el.style;
9407
9476
  const isCssString = isString(next);
9408
9477
  if (next && !isCssString) {
9409
- for (const key in next) {
9410
- setStyle(style, key, next[key]);
9411
- }
9412
9478
  if (prev && !isString(prev)) {
9413
9479
  for (const key in prev) {
9414
9480
  if (next[key] == null) {
@@ -9416,6 +9482,9 @@ function patchStyle(el, prev, next) {
9416
9482
  }
9417
9483
  }
9418
9484
  }
9485
+ for (const key in next) {
9486
+ setStyle(style, key, next[key]);
9487
+ }
9419
9488
  }
9420
9489
  else {
9421
9490
  const currentDisplay = style.display;
@@ -9446,7 +9515,7 @@ function setStyle(style, name, val) {
9446
9515
  val = '';
9447
9516
  {
9448
9517
  if (semicolonRE.test(val)) {
9449
- warn$1(`Unexpected semicolon at the end of '${name}' style value: '${val}'`);
9518
+ warn(`Unexpected semicolon at the end of '${name}' style value: '${val}'`);
9450
9519
  }
9451
9520
  }
9452
9521
  if (name.startsWith('--')) {
@@ -9570,7 +9639,7 @@ prevChildren, parentComponent, parentSuspense, unmountChildren) {
9570
9639
  catch (e) {
9571
9640
  // do not warn if value is auto-coerced from nullish values
9572
9641
  if (!needRemove) {
9573
- warn$1(`Failed setting prop "${key}" on <${el.tagName.toLowerCase()}>: ` +
9642
+ warn(`Failed setting prop "${key}" on <${el.tagName.toLowerCase()}>: ` +
9574
9643
  `value ${value} is invalid.`, e);
9575
9644
  }
9576
9645
  }
@@ -9774,7 +9843,7 @@ class VueElement extends BaseClass {
9774
9843
  }
9775
9844
  else {
9776
9845
  if (this.shadowRoot) {
9777
- warn$1(`Custom element has pre-rendered declarative shadow root but is not ` +
9846
+ warn(`Custom element has pre-rendered declarative shadow root but is not ` +
9778
9847
  `defined as hydratable. Use \`defineSSRCustomElement\`.`);
9779
9848
  }
9780
9849
  this.attachShadow({ mode: 'open' });
@@ -9981,17 +10050,17 @@ function useCssModule(name = '$style') {
9981
10050
  {
9982
10051
  const instance = getCurrentInstance();
9983
10052
  if (!instance) {
9984
- warn$1(`useCssModule must be called inside setup()`);
10053
+ warn(`useCssModule must be called inside setup()`);
9985
10054
  return EMPTY_OBJ;
9986
10055
  }
9987
10056
  const modules = instance.type.__cssModules;
9988
10057
  if (!modules) {
9989
- warn$1(`Current instance does not have CSS modules injected.`);
10058
+ warn(`Current instance does not have CSS modules injected.`);
9990
10059
  return EMPTY_OBJ;
9991
10060
  }
9992
10061
  const mod = modules[name];
9993
10062
  if (!mod) {
9994
- warn$1(`Current instance does not have CSS module named "${name}".`);
10063
+ warn(`Current instance does not have CSS module named "${name}".`);
9995
10064
  return EMPTY_OBJ;
9996
10065
  }
9997
10066
  return mod;
@@ -10006,7 +10075,7 @@ function useCssVars(getter) {
10006
10075
  const instance = getCurrentInstance();
10007
10076
  /* istanbul ignore next */
10008
10077
  if (!instance) {
10009
- warn$1(`useCssVars is called without current active component instance.`);
10078
+ warn(`useCssVars is called without current active component instance.`);
10010
10079
  return;
10011
10080
  }
10012
10081
  const updateTeleports = (instance.ut = (vars = getter(instance.proxy)) => {
@@ -10093,7 +10162,7 @@ const TransitionPropsValidators = (Transition.props =
10093
10162
  * #3227 Incoming hooks may be merged into arrays when wrapping Transition
10094
10163
  * with custom HOCs.
10095
10164
  */
10096
- const callHook$1 = (hook, args = []) => {
10165
+ const callHook = (hook, args = []) => {
10097
10166
  if (isArray(hook)) {
10098
10167
  hook.forEach(h => h(...args));
10099
10168
  }
@@ -10143,7 +10212,7 @@ function resolveTransitionProps(rawProps) {
10143
10212
  return (el, done) => {
10144
10213
  const hook = isAppear ? onAppear : onEnter;
10145
10214
  const resolve = () => finishEnter(el, isAppear, done);
10146
- callHook$1(hook, [el, resolve]);
10215
+ callHook(hook, [el, resolve]);
10147
10216
  nextFrame(() => {
10148
10217
  removeTransitionClass(el, isAppear ? appearFromClass : enterFromClass);
10149
10218
  addTransitionClass(el, isAppear ? appearToClass : enterToClass);
@@ -10155,12 +10224,12 @@ function resolveTransitionProps(rawProps) {
10155
10224
  };
10156
10225
  return extend(baseProps, {
10157
10226
  onBeforeEnter(el) {
10158
- callHook$1(onBeforeEnter, [el]);
10227
+ callHook(onBeforeEnter, [el]);
10159
10228
  addTransitionClass(el, enterFromClass);
10160
10229
  addTransitionClass(el, enterActiveClass);
10161
10230
  },
10162
10231
  onBeforeAppear(el) {
10163
- callHook$1(onBeforeAppear, [el]);
10232
+ callHook(onBeforeAppear, [el]);
10164
10233
  addTransitionClass(el, appearFromClass);
10165
10234
  addTransitionClass(el, appearActiveClass);
10166
10235
  },
@@ -10184,19 +10253,19 @@ function resolveTransitionProps(rawProps) {
10184
10253
  whenTransitionEnds(el, type, leaveDuration, resolve);
10185
10254
  }
10186
10255
  });
10187
- callHook$1(onLeave, [el, resolve]);
10256
+ callHook(onLeave, [el, resolve]);
10188
10257
  },
10189
10258
  onEnterCancelled(el) {
10190
10259
  finishEnter(el, false);
10191
- callHook$1(onEnterCancelled, [el]);
10260
+ callHook(onEnterCancelled, [el]);
10192
10261
  },
10193
10262
  onAppearCancelled(el) {
10194
10263
  finishEnter(el, true);
10195
- callHook$1(onAppearCancelled, [el]);
10264
+ callHook(onAppearCancelled, [el]);
10196
10265
  },
10197
10266
  onLeaveCancelled(el) {
10198
10267
  finishLeave(el);
10199
- callHook$1(onLeaveCancelled, [el]);
10268
+ callHook(onLeaveCancelled, [el]);
10200
10269
  }
10201
10270
  });
10202
10271
  }
@@ -10214,18 +10283,10 @@ function normalizeDuration(duration) {
10214
10283
  }
10215
10284
  function NumberOf(val) {
10216
10285
  const res = toNumber(val);
10217
- validateDuration(res);
10218
- return res;
10219
- }
10220
- function validateDuration(val) {
10221
- if (typeof val !== 'number') {
10222
- warn$1(`<transition> explicit duration is not a valid number - ` +
10223
- `got ${JSON.stringify(val)}.`);
10224
- }
10225
- else if (isNaN(val)) {
10226
- warn$1(`<transition> explicit duration is NaN - ` +
10227
- 'the duration expression might be incorrect.');
10286
+ {
10287
+ assertNumber(res, '<transition> explicit duration');
10228
10288
  }
10289
+ return res;
10229
10290
  }
10230
10291
  function addTransitionClass(el, cls) {
10231
10292
  cls.split(/\s+/).forEach(c => c && el.classList.add(c));
@@ -10408,7 +10469,7 @@ const TransitionGroupImpl = {
10408
10469
  setTransitionHooks(child, resolveTransitionHooks(child, cssTransitionProps, state, instance));
10409
10470
  }
10410
10471
  else {
10411
- warn$1(`<TransitionGroup> children must be keyed.`);
10472
+ warn(`<TransitionGroup> children must be keyed.`);
10412
10473
  }
10413
10474
  }
10414
10475
  if (prevChildren) {
@@ -10422,6 +10483,14 @@ const TransitionGroupImpl = {
10422
10483
  };
10423
10484
  }
10424
10485
  };
10486
+ /**
10487
+ * TransitionGroup does not support "mode" so we need to remove it from the
10488
+ * props declarations, but direct delete operation is considered a side effect
10489
+ * and will make the entire transition feature non-tree-shakeable, so we do it
10490
+ * in a function and mark the function's invocation as pure.
10491
+ */
10492
+ const removeMode = (props) => delete props.mode;
10493
+ /*#__PURE__*/ removeMode(TransitionGroupImpl.props);
10425
10494
  const TransitionGroup = TransitionGroupImpl;
10426
10495
  function callPendingCbs(c) {
10427
10496
  const el = c.el;
@@ -10497,7 +10566,7 @@ const vModelText = {
10497
10566
  domValue = domValue.trim();
10498
10567
  }
10499
10568
  if (castToNumber) {
10500
- domValue = toNumber(domValue);
10569
+ domValue = looseToNumber(domValue);
10501
10570
  }
10502
10571
  el._assign(domValue);
10503
10572
  });
@@ -10532,7 +10601,8 @@ const vModelText = {
10532
10601
  if (trim && el.value.trim() === value) {
10533
10602
  return;
10534
10603
  }
10535
- if ((number || el.type === 'number') && toNumber(el.value) === value) {
10604
+ if ((number || el.type === 'number') &&
10605
+ looseToNumber(el.value) === value) {
10536
10606
  return;
10537
10607
  }
10538
10608
  }
@@ -10621,7 +10691,7 @@ const vModelSelect = {
10621
10691
  addEventListener(el, 'change', () => {
10622
10692
  const selectedVal = Array.prototype.filter
10623
10693
  .call(el.options, (o) => o.selected)
10624
- .map((o) => number ? toNumber(getValue(o)) : getValue(o));
10694
+ .map((o) => number ? looseToNumber(getValue(o)) : getValue(o));
10625
10695
  el._assign(el.multiple
10626
10696
  ? isSetModel
10627
10697
  ? new Set(selectedVal)
@@ -10645,7 +10715,7 @@ const vModelSelect = {
10645
10715
  function setSelected(el, value) {
10646
10716
  const isMultiple = el.multiple;
10647
10717
  if (isMultiple && !isArray(value) && !isSet(value)) {
10648
- warn$1(`<select multiple v-model> expects an Array or Set value for its binding, ` +
10718
+ warn(`<select multiple v-model> expects an Array or Set value for its binding, ` +
10649
10719
  `but got ${Object.prototype.toString.call(value).slice(8, -1)}.`);
10650
10720
  return;
10651
10721
  }
@@ -10898,7 +10968,7 @@ function injectCompilerOptionsCheck(app) {
10898
10968
  return isCustomElement;
10899
10969
  },
10900
10970
  set() {
10901
- warn$1(`The \`isCustomElement\` config option is deprecated. Use ` +
10971
+ warn(`The \`isCustomElement\` config option is deprecated. Use ` +
10902
10972
  `\`compilerOptions.isCustomElement\` instead.`);
10903
10973
  }
10904
10974
  });
@@ -10912,11 +10982,11 @@ function injectCompilerOptionsCheck(app) {
10912
10982
  `- For vite: pass it via @vitejs/plugin-vue options. See https://github.com/vitejs/vite/tree/main/packages/plugin-vue#example-for-passing-options-to-vuecompiler-dom`;
10913
10983
  Object.defineProperty(app.config, 'compilerOptions', {
10914
10984
  get() {
10915
- warn$1(msg);
10985
+ warn(msg);
10916
10986
  return compilerOptions;
10917
10987
  },
10918
10988
  set() {
10919
- warn$1(msg);
10989
+ warn(msg);
10920
10990
  }
10921
10991
  });
10922
10992
  }
@@ -10925,14 +10995,14 @@ function normalizeContainer(container) {
10925
10995
  if (isString(container)) {
10926
10996
  const res = document.querySelector(container);
10927
10997
  if (!res) {
10928
- warn$1(`Failed to mount app: mount target selector "${container}" returned null.`);
10998
+ warn(`Failed to mount app: mount target selector "${container}" returned null.`);
10929
10999
  }
10930
11000
  return res;
10931
11001
  }
10932
11002
  if (window.ShadowRoot &&
10933
11003
  container instanceof window.ShadowRoot &&
10934
11004
  container.mode === 'closed') {
10935
- warn$1(`mounting on a ShadowRoot with \`{mode: "closed"}\` may lead to unpredictable bugs`);
11005
+ warn(`mounting on a ShadowRoot with \`{mode: "closed"}\` may lead to unpredictable bugs`);
10936
11006
  }
10937
11007
  return container;
10938
11008
  }
@@ -10941,4 +11011,4 @@ function normalizeContainer(container) {
10941
11011
  */
10942
11012
  const initDirectivesForSSR = NOOP;
10943
11013
 
10944
- export { BaseTransition, Comment, EffectScope, Fragment, KeepAlive, ReactiveEffect, Static, Suspense, Teleport, Text, Transition, TransitionGroup, VueElement, callWithAsyncErrorHandling, callWithErrorHandling, camelize, capitalize, cloneVNode, compatUtils, computed$1 as computed, createApp, createBlock, createCommentVNode, createElementBlock, createBaseVNode as createElementVNode, createHydrationRenderer, createPropsRestProxy, createRenderer, createSSRApp, createSlots, createStaticVNode, createTextVNode, createVNode, customRef, defineAsyncComponent, defineComponent, defineCustomElement, defineEmits, defineExpose, defineProps, defineSSRCustomElement, devtools, effect, effectScope, getCurrentInstance, getCurrentScope, getTransitionRawChildren, guardReactiveProps, h, handleError, hydrate, initCustomFormatter, initDirectivesForSSR, inject, isMemoSame, isProxy, isReactive, isReadonly, isRef, isRuntimeOnly, isShallow, isVNode, markRaw, mergeDefaults, mergeProps, nextTick, normalizeClass, normalizeProps, normalizeStyle, onActivated, onBeforeMount, onBeforeUnmount, onBeforeUpdate, onDeactivated, onErrorCaptured, onMounted, onRenderTracked, onRenderTriggered, onScopeDispose, onServerPrefetch, onUnmounted, onUpdated, openBlock, popScopeId, provide, proxyRefs, pushScopeId, queuePostFlushCb, reactive, readonly, ref, registerRuntimeCompiler, render, renderList, renderSlot, resolveComponent, resolveDirective, resolveDynamicComponent, resolveFilter, resolveTransitionHooks, setBlockTracking, setDevtoolsHook, setTransitionHooks, shallowReactive, shallowReadonly, shallowRef, ssrContextKey, ssrUtils, stop, toDisplayString, toHandlerKey, toHandlers, toRaw, toRef, toRefs, transformVNodeArgs, triggerRef, unref, useAttrs, useCssModule, useCssVars, useSSRContext, useSlots, useTransitionState, vModelCheckbox, vModelDynamic, vModelRadio, vModelSelect, vModelText, vShow, version, warn$1 as warn, watch, watchEffect, watchPostEffect, watchSyncEffect, withAsyncContext, withCtx, withDefaults, withDirectives, withKeys, withMemo, withModifiers, withScopeId };
11014
+ export { BaseTransition, Comment, EffectScope, Fragment, KeepAlive, ReactiveEffect, Static, Suspense, Teleport, Text, Transition, TransitionGroup, VueElement, assertNumber, callWithAsyncErrorHandling, callWithErrorHandling, camelize, capitalize, cloneVNode, compatUtils, computed, createApp, createBlock, createCommentVNode, createElementBlock, createBaseVNode as createElementVNode, createHydrationRenderer, createPropsRestProxy, createRenderer, createSSRApp, createSlots, createStaticVNode, createTextVNode, createVNode, customRef, defineAsyncComponent, defineComponent, defineCustomElement, defineEmits, defineExpose, defineProps, defineSSRCustomElement, devtools, effect, effectScope, getCurrentInstance, getCurrentScope, getTransitionRawChildren, guardReactiveProps, h, handleError, hydrate, initCustomFormatter, initDirectivesForSSR, inject, isMemoSame, isProxy, isReactive, isReadonly, isRef, isRuntimeOnly, isShallow, isVNode, markRaw, mergeDefaults, mergeProps, nextTick, normalizeClass, normalizeProps, normalizeStyle, onActivated, onBeforeMount, onBeforeUnmount, onBeforeUpdate, onDeactivated, onErrorCaptured, onMounted, onRenderTracked, onRenderTriggered, onScopeDispose, onServerPrefetch, onUnmounted, onUpdated, openBlock, popScopeId, provide, proxyRefs, pushScopeId, queuePostFlushCb, reactive, readonly, ref, registerRuntimeCompiler, render, renderList, renderSlot, resolveComponent, resolveDirective, resolveDynamicComponent, resolveFilter, resolveTransitionHooks, setBlockTracking, setDevtoolsHook, setTransitionHooks, shallowReactive, shallowReadonly, shallowRef, ssrContextKey, ssrUtils, stop, toDisplayString, toHandlerKey, toHandlers, toRaw, toRef, toRefs, transformVNodeArgs, triggerRef, unref, useAttrs, useCssModule, useCssVars, useSSRContext, useSlots, useTransitionState, vModelCheckbox, vModelDynamic, vModelRadio, vModelSelect, vModelText, vShow, version, warn, watch, watchEffect, watchPostEffect, watchSyncEffect, withAsyncContext, withCtx, withDefaults, withDirectives, withKeys, withMemo, withModifiers, withScopeId };