@vue/runtime-dom 3.2.45 → 3.2.46

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.
@@ -99,7 +99,7 @@ var VueRuntimeDOM = (function (exports) {
99
99
  // These tag configs are shared between compiler-dom and runtime-dom, so they
100
100
  // https://developer.mozilla.org/en-US/docs/Web/HTML/Element
101
101
  const HTML_TAGS = 'html,body,base,head,link,meta,style,title,address,article,aside,footer,' +
102
- 'header,h1,h2,h3,h4,h5,h6,nav,section,div,dd,dl,dt,figcaption,' +
102
+ 'header,hgroup,h1,h2,h3,h4,h5,h6,nav,section,div,dd,dl,dt,figcaption,' +
103
103
  'figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,' +
104
104
  'data,dfn,em,i,kbd,mark,q,rp,rt,ruby,s,samp,small,span,strong,sub,sup,' +
105
105
  'time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,' +
@@ -111,7 +111,7 @@ var VueRuntimeDOM = (function (exports) {
111
111
  const SVG_TAGS = 'svg,animate,animateMotion,animateTransform,circle,clipPath,color-profile,' +
112
112
  'defs,desc,discard,ellipse,feBlend,feColorMatrix,feComponentTransfer,' +
113
113
  'feComposite,feConvolveMatrix,feDiffuseLighting,feDisplacementMap,' +
114
- 'feDistanceLight,feDropShadow,feFlood,feFuncA,feFuncB,feFuncG,feFuncR,' +
114
+ 'feDistantLight,feDropShadow,feFlood,feFuncA,feFuncB,feFuncG,feFuncR,' +
115
115
  'feGaussianBlur,feImage,feMerge,feMergeNode,feMorphology,feOffset,' +
116
116
  'fePointLight,feSpecularLighting,feSpotLight,feTile,feTurbulence,filter,' +
117
117
  'foreignObject,g,hatch,hatchpath,image,line,linearGradient,marker,mask,' +
@@ -262,12 +262,13 @@ var VueRuntimeDOM = (function (exports) {
262
262
  arr.splice(i, 1);
263
263
  }
264
264
  };
265
- const hasOwnProperty = Object.prototype.hasOwnProperty;
266
- const hasOwn = (val, key) => hasOwnProperty.call(val, key);
265
+ const hasOwnProperty$1 = Object.prototype.hasOwnProperty;
266
+ const hasOwn = (val, key) => hasOwnProperty$1.call(val, key);
267
267
  const isArray = Array.isArray;
268
268
  const isMap = (val) => toTypeString(val) === '[object Map]';
269
269
  const isSet = (val) => toTypeString(val) === '[object Set]';
270
270
  const isDate = (val) => toTypeString(val) === '[object Date]';
271
+ const isRegExp = (val) => toTypeString(val) === '[object RegExp]';
271
272
  const isFunction = (val) => typeof val === 'function';
272
273
  const isString = (val) => typeof val === 'string';
273
274
  const isSymbol = (val) => typeof val === 'symbol';
@@ -334,10 +335,22 @@ var VueRuntimeDOM = (function (exports) {
334
335
  value
335
336
  });
336
337
  };
337
- const toNumber = (val) => {
338
+ /**
339
+ * "123-foo" will be parsed to 123
340
+ * This is used for the .number modifier in v-model
341
+ */
342
+ const looseToNumber = (val) => {
338
343
  const n = parseFloat(val);
339
344
  return isNaN(n) ? val : n;
340
345
  };
346
+ /**
347
+ * Only conerces number-like strings
348
+ * "123-foo" will be returned as-is
349
+ */
350
+ const toNumber = (val) => {
351
+ const n = isString(val) ? Number(val) : NaN;
352
+ return isNaN(n) ? val : n;
353
+ };
341
354
  let _globalThis;
342
355
  const getGlobalThis = () => {
343
356
  return (_globalThis ||
@@ -353,7 +366,7 @@ var VueRuntimeDOM = (function (exports) {
353
366
  : {}));
354
367
  };
355
368
 
356
- function warn(msg, ...args) {
369
+ function warn$1(msg, ...args) {
357
370
  console.warn(`[Vue warn] ${msg}`, ...args);
358
371
  }
359
372
 
@@ -364,7 +377,7 @@ var VueRuntimeDOM = (function (exports) {
364
377
  /**
365
378
  * @internal
366
379
  */
367
- this.active = true;
380
+ this._active = true;
368
381
  /**
369
382
  * @internal
370
383
  */
@@ -379,8 +392,11 @@ var VueRuntimeDOM = (function (exports) {
379
392
  (activeEffectScope.scopes || (activeEffectScope.scopes = [])).push(this) - 1;
380
393
  }
381
394
  }
395
+ get active() {
396
+ return this._active;
397
+ }
382
398
  run(fn) {
383
- if (this.active) {
399
+ if (this._active) {
384
400
  const currentEffectScope = activeEffectScope;
385
401
  try {
386
402
  activeEffectScope = this;
@@ -391,7 +407,7 @@ var VueRuntimeDOM = (function (exports) {
391
407
  }
392
408
  }
393
409
  else {
394
- warn(`cannot run an inactive effect scope.`);
410
+ warn$1(`cannot run an inactive effect scope.`);
395
411
  }
396
412
  }
397
413
  /**
@@ -409,7 +425,7 @@ var VueRuntimeDOM = (function (exports) {
409
425
  activeEffectScope = this.parent;
410
426
  }
411
427
  stop(fromParent) {
412
- if (this.active) {
428
+ if (this._active) {
413
429
  let i, l;
414
430
  for (i = 0, l = this.effects.length; i < l; i++) {
415
431
  this.effects[i].stop();
@@ -432,7 +448,7 @@ var VueRuntimeDOM = (function (exports) {
432
448
  }
433
449
  }
434
450
  this.parent = undefined;
435
- this.active = false;
451
+ this._active = false;
436
452
  }
437
453
  }
438
454
  }
@@ -452,7 +468,7 @@ var VueRuntimeDOM = (function (exports) {
452
468
  activeEffectScope.cleanups.push(fn);
453
469
  }
454
470
  else {
455
- warn(`onScopeDispose() is called when there is no active effect scope` +
471
+ warn$1(`onScopeDispose() is called when there is no active effect scope` +
456
472
  ` to be associated with.`);
457
473
  }
458
474
  }
@@ -653,7 +669,7 @@ var VueRuntimeDOM = (function (exports) {
653
669
  deps = [...depsMap.values()];
654
670
  }
655
671
  else if (key === 'length' && isArray(target)) {
656
- const newLength = toNumber(newValue);
672
+ const newLength = Number(newValue);
657
673
  depsMap.forEach((dep, key) => {
658
674
  if (key === 'length' || key >= newLength) {
659
675
  deps.push(dep);
@@ -742,6 +758,10 @@ var VueRuntimeDOM = (function (exports) {
742
758
  }
743
759
  }
744
760
  }
761
+ function getDepFromReactive(object, key) {
762
+ var _a;
763
+ return (_a = targetMap.get(object)) === null || _a === void 0 ? void 0 : _a.get(key);
764
+ }
745
765
 
746
766
  const isNonTrackableKeys = /*#__PURE__*/ makeMap(`__proto__,__v_isRef,__isVue`);
747
767
  const builtInSymbols = new Set(
@@ -753,7 +773,7 @@ var VueRuntimeDOM = (function (exports) {
753
773
  .filter(key => key !== 'arguments' && key !== 'caller')
754
774
  .map(key => Symbol[key])
755
775
  .filter(isSymbol));
756
- const get = /*#__PURE__*/ createGetter();
776
+ const get$1 = /*#__PURE__*/ createGetter();
757
777
  const shallowGet = /*#__PURE__*/ createGetter(false, true);
758
778
  const readonlyGet = /*#__PURE__*/ createGetter(true);
759
779
  const shallowReadonlyGet = /*#__PURE__*/ createGetter(true, true);
@@ -787,6 +807,11 @@ var VueRuntimeDOM = (function (exports) {
787
807
  });
788
808
  return instrumentations;
789
809
  }
810
+ function hasOwnProperty(key) {
811
+ const obj = toRaw(this);
812
+ track(obj, "has" /* TrackOpTypes.HAS */, key);
813
+ return obj.hasOwnProperty(key);
814
+ }
790
815
  function createGetter(isReadonly = false, shallow = false) {
791
816
  return function get(target, key, receiver) {
792
817
  if (key === "__v_isReactive" /* ReactiveFlags.IS_REACTIVE */) {
@@ -810,8 +835,13 @@ var VueRuntimeDOM = (function (exports) {
810
835
  return target;
811
836
  }
812
837
  const targetIsArray = isArray(target);
813
- if (!isReadonly && targetIsArray && hasOwn(arrayInstrumentations, key)) {
814
- return Reflect.get(arrayInstrumentations, key, receiver);
838
+ if (!isReadonly) {
839
+ if (targetIsArray && hasOwn(arrayInstrumentations, key)) {
840
+ return Reflect.get(arrayInstrumentations, key, receiver);
841
+ }
842
+ if (key === 'hasOwnProperty') {
843
+ return hasOwnProperty;
844
+ }
815
845
  }
816
846
  const res = Reflect.get(target, key, receiver);
817
847
  if (isSymbol(key) ? builtInSymbols.has(key) : isNonTrackableKeys(key)) {
@@ -836,7 +866,7 @@ var VueRuntimeDOM = (function (exports) {
836
866
  return res;
837
867
  };
838
868
  }
839
- const set = /*#__PURE__*/ createSetter();
869
+ const set$1 = /*#__PURE__*/ createSetter();
840
870
  const shallowSet = /*#__PURE__*/ createSetter(true);
841
871
  function createSetter(shallow = false) {
842
872
  return function set(target, key, value, receiver) {
@@ -879,7 +909,7 @@ var VueRuntimeDOM = (function (exports) {
879
909
  }
880
910
  return result;
881
911
  }
882
- function has(target, key) {
912
+ function has$1(target, key) {
883
913
  const result = Reflect.has(target, key);
884
914
  if (!isSymbol(key) || !builtInSymbols.has(key)) {
885
915
  track(target, "has" /* TrackOpTypes.HAS */, key);
@@ -891,23 +921,23 @@ var VueRuntimeDOM = (function (exports) {
891
921
  return Reflect.ownKeys(target);
892
922
  }
893
923
  const mutableHandlers = {
894
- get,
895
- set,
924
+ get: get$1,
925
+ set: set$1,
896
926
  deleteProperty,
897
- has,
927
+ has: has$1,
898
928
  ownKeys
899
929
  };
900
930
  const readonlyHandlers = {
901
931
  get: readonlyGet,
902
932
  set(target, key) {
903
933
  {
904
- warn(`Set operation on key "${String(key)}" failed: target is readonly.`, target);
934
+ warn$1(`Set operation on key "${String(key)}" failed: target is readonly.`, target);
905
935
  }
906
936
  return true;
907
937
  },
908
938
  deleteProperty(target, key) {
909
939
  {
910
- warn(`Delete operation on key "${String(key)}" failed: target is readonly.`, target);
940
+ warn$1(`Delete operation on key "${String(key)}" failed: target is readonly.`, target);
911
941
  }
912
942
  return true;
913
943
  }
@@ -925,7 +955,7 @@ var VueRuntimeDOM = (function (exports) {
925
955
 
926
956
  const toShallow = (value) => value;
927
957
  const getProto = (v) => Reflect.getPrototypeOf(v);
928
- function get$1(target, key, isReadonly = false, isShallow = false) {
958
+ function get(target, key, isReadonly = false, isShallow = false) {
929
959
  // #1772: readonly(reactive(Map)) should return readonly + reactive version
930
960
  // of the value
931
961
  target = target["__v_raw" /* ReactiveFlags.RAW */];
@@ -951,7 +981,7 @@ var VueRuntimeDOM = (function (exports) {
951
981
  target.get(key);
952
982
  }
953
983
  }
954
- function has$1(key, isReadonly = false) {
984
+ function has(key, isReadonly = false) {
955
985
  const target = this["__v_raw" /* ReactiveFlags.RAW */];
956
986
  const rawTarget = toRaw(target);
957
987
  const rawKey = toRaw(key);
@@ -981,7 +1011,7 @@ var VueRuntimeDOM = (function (exports) {
981
1011
  }
982
1012
  return this;
983
1013
  }
984
- function set$1(key, value) {
1014
+ function set(key, value) {
985
1015
  value = toRaw(value);
986
1016
  const target = toRaw(this);
987
1017
  const { has, get } = getProto(target);
@@ -1094,41 +1124,41 @@ var VueRuntimeDOM = (function (exports) {
1094
1124
  function createInstrumentations() {
1095
1125
  const mutableInstrumentations = {
1096
1126
  get(key) {
1097
- return get$1(this, key);
1127
+ return get(this, key);
1098
1128
  },
1099
1129
  get size() {
1100
1130
  return size(this);
1101
1131
  },
1102
- has: has$1,
1132
+ has,
1103
1133
  add,
1104
- set: set$1,
1134
+ set,
1105
1135
  delete: deleteEntry,
1106
1136
  clear,
1107
1137
  forEach: createForEach(false, false)
1108
1138
  };
1109
1139
  const shallowInstrumentations = {
1110
1140
  get(key) {
1111
- return get$1(this, key, false, true);
1141
+ return get(this, key, false, true);
1112
1142
  },
1113
1143
  get size() {
1114
1144
  return size(this);
1115
1145
  },
1116
- has: has$1,
1146
+ has,
1117
1147
  add,
1118
- set: set$1,
1148
+ set,
1119
1149
  delete: deleteEntry,
1120
1150
  clear,
1121
1151
  forEach: createForEach(false, true)
1122
1152
  };
1123
1153
  const readonlyInstrumentations = {
1124
1154
  get(key) {
1125
- return get$1(this, key, true);
1155
+ return get(this, key, true);
1126
1156
  },
1127
1157
  get size() {
1128
1158
  return size(this, true);
1129
1159
  },
1130
1160
  has(key) {
1131
- return has$1.call(this, key, true);
1161
+ return has.call(this, key, true);
1132
1162
  },
1133
1163
  add: createReadonlyMethod("add" /* TriggerOpTypes.ADD */),
1134
1164
  set: createReadonlyMethod("set" /* TriggerOpTypes.SET */),
@@ -1138,13 +1168,13 @@ var VueRuntimeDOM = (function (exports) {
1138
1168
  };
1139
1169
  const shallowReadonlyInstrumentations = {
1140
1170
  get(key) {
1141
- return get$1(this, key, true, true);
1171
+ return get(this, key, true, true);
1142
1172
  },
1143
1173
  get size() {
1144
1174
  return size(this, true);
1145
1175
  },
1146
1176
  has(key) {
1147
- return has$1.call(this, key, true);
1177
+ return has.call(this, key, true);
1148
1178
  },
1149
1179
  add: createReadonlyMethod("add" /* TriggerOpTypes.ADD */),
1150
1180
  set: createReadonlyMethod("set" /* TriggerOpTypes.SET */),
@@ -1335,9 +1365,10 @@ var VueRuntimeDOM = (function (exports) {
1335
1365
  }
1336
1366
  function triggerRefValue(ref, newVal) {
1337
1367
  ref = toRaw(ref);
1338
- if (ref.dep) {
1368
+ const dep = ref.dep;
1369
+ if (dep) {
1339
1370
  {
1340
- triggerEffects(ref.dep, {
1371
+ triggerEffects(dep, {
1341
1372
  target: ref,
1342
1373
  type: "set" /* TriggerOpTypes.SET */,
1343
1374
  key: 'value',
@@ -1449,6 +1480,9 @@ var VueRuntimeDOM = (function (exports) {
1449
1480
  set value(newVal) {
1450
1481
  this._object[this._key] = newVal;
1451
1482
  }
1483
+ get dep() {
1484
+ return getDepFromReactive(toRaw(this._object), this._key);
1485
+ }
1452
1486
  }
1453
1487
  function toRef(object, key, defaultValue) {
1454
1488
  const val = object[key];
@@ -1490,7 +1524,7 @@ var VueRuntimeDOM = (function (exports) {
1490
1524
  }
1491
1525
  }
1492
1526
  _a = "__v_isReadonly" /* ReactiveFlags.IS_READONLY */;
1493
- function computed(getterOrOptions, debugOptions, isSSR = false) {
1527
+ function computed$1(getterOrOptions, debugOptions, isSSR = false) {
1494
1528
  let getter;
1495
1529
  let setter;
1496
1530
  const onlyGetter = isFunction(getterOrOptions);
@@ -1520,7 +1554,7 @@ var VueRuntimeDOM = (function (exports) {
1520
1554
  function popWarningContext() {
1521
1555
  stack.pop();
1522
1556
  }
1523
- function warn$1(msg, ...args) {
1557
+ function warn(msg, ...args) {
1524
1558
  // avoid props formatting or warn handler tracking deps that might be mutated
1525
1559
  // during patch, leading to infinite recursion.
1526
1560
  pauseTracking();
@@ -1626,6 +1660,20 @@ var VueRuntimeDOM = (function (exports) {
1626
1660
  return raw ? value : [`${key}=`, value];
1627
1661
  }
1628
1662
  }
1663
+ /**
1664
+ * @internal
1665
+ */
1666
+ function assertNumber(val, type) {
1667
+ if (val === undefined) {
1668
+ return;
1669
+ }
1670
+ else if (typeof val !== 'number') {
1671
+ warn(`${type} is not a valid number - ` + `got ${JSON.stringify(val)}.`);
1672
+ }
1673
+ else if (isNaN(val)) {
1674
+ warn(`${type} is NaN - ` + 'the duration expression might be incorrect.');
1675
+ }
1676
+ }
1629
1677
 
1630
1678
  const ErrorTypeStrings = {
1631
1679
  ["sp" /* LifecycleHooks.SERVER_PREFETCH */]: 'serverPrefetch hook',
@@ -1719,7 +1767,7 @@ var VueRuntimeDOM = (function (exports) {
1719
1767
  if (contextVNode) {
1720
1768
  pushWarningContext(contextVNode);
1721
1769
  }
1722
- warn$1(`Unhandled error${info ? ` during execution of ${info}` : ``}`);
1770
+ warn(`Unhandled error${info ? ` during execution of ${info}` : ``}`);
1723
1771
  if (contextVNode) {
1724
1772
  popWarningContext();
1725
1773
  }
@@ -1915,7 +1963,7 @@ var VueRuntimeDOM = (function (exports) {
1915
1963
  if (count > RECURSION_LIMIT) {
1916
1964
  const instance = fn.ownerInstance;
1917
1965
  const componentName = instance && getComponentName(instance.type);
1918
- warn$1(`Maximum recursive updates exceeded${componentName ? ` in component <${componentName}>` : ``}. ` +
1966
+ warn(`Maximum recursive updates exceeded${componentName ? ` in component <${componentName}>` : ``}. ` +
1919
1967
  `This means you have a reactive effect that is mutating its own ` +
1920
1968
  `dependencies and thus recursively triggering itself. Possible sources ` +
1921
1969
  `include component template, render function, updated hook or ` +
@@ -2063,9 +2111,10 @@ var VueRuntimeDOM = (function (exports) {
2063
2111
  };
2064
2112
  }
2065
2113
 
2114
+ exports.devtools = void 0;
2066
2115
  let buffer = [];
2067
2116
  let devtoolsNotInstalled = false;
2068
- function emit(event, ...args) {
2117
+ function emit$1(event, ...args) {
2069
2118
  if (exports.devtools) {
2070
2119
  exports.devtools.emit(event, ...args);
2071
2120
  }
@@ -2112,7 +2161,7 @@ var VueRuntimeDOM = (function (exports) {
2112
2161
  }
2113
2162
  }
2114
2163
  function devtoolsInitApp(app, version) {
2115
- emit("app:init" /* DevtoolsHooks.APP_INIT */, app, version, {
2164
+ emit$1("app:init" /* DevtoolsHooks.APP_INIT */, app, version, {
2116
2165
  Fragment,
2117
2166
  Text,
2118
2167
  Comment,
@@ -2120,7 +2169,7 @@ var VueRuntimeDOM = (function (exports) {
2120
2169
  });
2121
2170
  }
2122
2171
  function devtoolsUnmountApp(app) {
2123
- emit("app:unmount" /* DevtoolsHooks.APP_UNMOUNT */, app);
2172
+ emit$1("app:unmount" /* DevtoolsHooks.APP_UNMOUNT */, app);
2124
2173
  }
2125
2174
  const devtoolsComponentAdded = /*#__PURE__*/ createDevtoolsComponentHook("component:added" /* DevtoolsHooks.COMPONENT_ADDED */);
2126
2175
  const devtoolsComponentUpdated =
@@ -2136,21 +2185,21 @@ var VueRuntimeDOM = (function (exports) {
2136
2185
  };
2137
2186
  function createDevtoolsComponentHook(hook) {
2138
2187
  return (component) => {
2139
- emit(hook, component.appContext.app, component.uid, component.parent ? component.parent.uid : undefined, component);
2188
+ emit$1(hook, component.appContext.app, component.uid, component.parent ? component.parent.uid : undefined, component);
2140
2189
  };
2141
2190
  }
2142
2191
  const devtoolsPerfStart = /*#__PURE__*/ createDevtoolsPerformanceHook("perf:start" /* DevtoolsHooks.PERFORMANCE_START */);
2143
2192
  const devtoolsPerfEnd = /*#__PURE__*/ createDevtoolsPerformanceHook("perf:end" /* DevtoolsHooks.PERFORMANCE_END */);
2144
2193
  function createDevtoolsPerformanceHook(hook) {
2145
2194
  return (component, type, time) => {
2146
- emit(hook, component.appContext.app, component.uid, component, type, time);
2195
+ emit$1(hook, component.appContext.app, component.uid, component, type, time);
2147
2196
  };
2148
2197
  }
2149
2198
  function devtoolsComponentEmit(component, event, params) {
2150
- emit("component:emit" /* DevtoolsHooks.COMPONENT_EMIT */, component.appContext.app, component, event, params);
2199
+ emit$1("component:emit" /* DevtoolsHooks.COMPONENT_EMIT */, component.appContext.app, component, event, params);
2151
2200
  }
2152
2201
 
2153
- function emit$1(instance, event, ...rawArgs) {
2202
+ function emit(instance, event, ...rawArgs) {
2154
2203
  if (instance.isUnmounted)
2155
2204
  return;
2156
2205
  const props = instance.vnode.props || EMPTY_OBJ;
@@ -2160,7 +2209,7 @@ var VueRuntimeDOM = (function (exports) {
2160
2209
  if (!(event in emitsOptions) &&
2161
2210
  !(false )) {
2162
2211
  if (!propsOptions || !(toHandlerKey(event) in propsOptions)) {
2163
- warn$1(`Component emitted event "${event}" but it is neither declared in ` +
2212
+ warn(`Component emitted event "${event}" but it is neither declared in ` +
2164
2213
  `the emits option nor as an "${toHandlerKey(event)}" prop.`);
2165
2214
  }
2166
2215
  }
@@ -2169,7 +2218,7 @@ var VueRuntimeDOM = (function (exports) {
2169
2218
  if (isFunction(validator)) {
2170
2219
  const isValid = validator(...rawArgs);
2171
2220
  if (!isValid) {
2172
- warn$1(`Invalid event arguments: event validation failed for event "${event}".`);
2221
+ warn(`Invalid event arguments: event validation failed for event "${event}".`);
2173
2222
  }
2174
2223
  }
2175
2224
  }
@@ -2186,7 +2235,7 @@ var VueRuntimeDOM = (function (exports) {
2186
2235
  args = rawArgs.map(a => (isString(a) ? a.trim() : a));
2187
2236
  }
2188
2237
  if (number) {
2189
- args = rawArgs.map(toNumber);
2238
+ args = rawArgs.map(looseToNumber);
2190
2239
  }
2191
2240
  }
2192
2241
  {
@@ -2195,7 +2244,7 @@ var VueRuntimeDOM = (function (exports) {
2195
2244
  {
2196
2245
  const lowerCaseEvent = event.toLowerCase();
2197
2246
  if (lowerCaseEvent !== event && props[toHandlerKey(lowerCaseEvent)]) {
2198
- warn$1(`Event "${lowerCaseEvent}" is emitted in component ` +
2247
+ warn(`Event "${lowerCaseEvent}" is emitted in component ` +
2199
2248
  `${formatComponentName(instance, instance.type)} but the handler is registered for "${event}". ` +
2200
2249
  `Note that HTML attributes are case-insensitive and you cannot use ` +
2201
2250
  `v-on to listen to camelCase events when using in-DOM templates. ` +
@@ -2470,13 +2519,13 @@ var VueRuntimeDOM = (function (exports) {
2470
2519
  }
2471
2520
  }
2472
2521
  if (extraAttrs.length) {
2473
- warn$1(`Extraneous non-props attributes (` +
2522
+ warn(`Extraneous non-props attributes (` +
2474
2523
  `${extraAttrs.join(', ')}) ` +
2475
2524
  `were passed to component but could not be automatically inherited ` +
2476
2525
  `because component renders fragment or text root nodes.`);
2477
2526
  }
2478
2527
  if (eventAttrs.length) {
2479
- warn$1(`Extraneous non-emits event listeners (` +
2528
+ warn(`Extraneous non-emits event listeners (` +
2480
2529
  `${eventAttrs.join(', ')}) ` +
2481
2530
  `were passed to component but could not be automatically inherited ` +
2482
2531
  `because component renders fragment or text root nodes. ` +
@@ -2489,7 +2538,7 @@ var VueRuntimeDOM = (function (exports) {
2489
2538
  // inherit directives
2490
2539
  if (vnode.dirs) {
2491
2540
  if (!isElementRoot(root)) {
2492
- warn$1(`Runtime directive used on component with non-element root node. ` +
2541
+ warn(`Runtime directive used on component with non-element root node. ` +
2493
2542
  `The directives will not function as intended.`);
2494
2543
  }
2495
2544
  // clone before mutating since the root may be a hoisted vnode
@@ -2499,7 +2548,7 @@ var VueRuntimeDOM = (function (exports) {
2499
2548
  // inherit transition data
2500
2549
  if (vnode.transition) {
2501
2550
  if (!isElementRoot(root)) {
2502
- warn$1(`Component inside <Transition> renders non-element root node ` +
2551
+ warn(`Component inside <Transition> renders non-element root node ` +
2503
2552
  `that cannot be animated.`);
2504
2553
  }
2505
2554
  root.transition = vnode.transition;
@@ -2834,7 +2883,10 @@ var VueRuntimeDOM = (function (exports) {
2834
2883
  console[console.info ? 'info' : 'log'](`<Suspense> is an experimental feature and its API will likely change.`);
2835
2884
  }
2836
2885
  const { p: patch, m: move, um: unmount, n: next, o: { parentNode, remove } } = rendererInternals;
2837
- const timeout = toNumber(vnode.props && vnode.props.timeout);
2886
+ const timeout = vnode.props ? toNumber(vnode.props.timeout) : undefined;
2887
+ {
2888
+ assertNumber(timeout, `Suspense timeout`);
2889
+ }
2838
2890
  const suspense = {
2839
2891
  vnode,
2840
2892
  parent,
@@ -3062,7 +3114,7 @@ var VueRuntimeDOM = (function (exports) {
3062
3114
  if (isArray(s)) {
3063
3115
  const singleChild = filterSingleRoot(s);
3064
3116
  if (!singleChild) {
3065
- warn$1(`<Suspense> slots expect a single root node.`);
3117
+ warn(`<Suspense> slots expect a single root node.`);
3066
3118
  }
3067
3119
  s = singleChild;
3068
3120
  }
@@ -3100,7 +3152,7 @@ var VueRuntimeDOM = (function (exports) {
3100
3152
  function provide(key, value) {
3101
3153
  if (!currentInstance) {
3102
3154
  {
3103
- warn$1(`provide() can only be used inside setup().`);
3155
+ warn(`provide() can only be used inside setup().`);
3104
3156
  }
3105
3157
  }
3106
3158
  else {
@@ -3139,11 +3191,11 @@ var VueRuntimeDOM = (function (exports) {
3139
3191
  : defaultValue;
3140
3192
  }
3141
3193
  else {
3142
- warn$1(`injection "${String(key)}" not found.`);
3194
+ warn(`injection "${String(key)}" not found.`);
3143
3195
  }
3144
3196
  }
3145
3197
  else {
3146
- warn$1(`inject() can only be used inside setup() or functional components.`);
3198
+ warn(`inject() can only be used inside setup() or functional components.`);
3147
3199
  }
3148
3200
  }
3149
3201
 
@@ -3152,17 +3204,17 @@ var VueRuntimeDOM = (function (exports) {
3152
3204
  return doWatch(effect, null, options);
3153
3205
  }
3154
3206
  function watchPostEffect(effect, options) {
3155
- return doWatch(effect, null, (Object.assign(Object.assign({}, options), { flush: 'post' }) ));
3207
+ return doWatch(effect, null, Object.assign(Object.assign({}, options), { flush: 'post' }) );
3156
3208
  }
3157
3209
  function watchSyncEffect(effect, options) {
3158
- return doWatch(effect, null, (Object.assign(Object.assign({}, options), { flush: 'sync' }) ));
3210
+ return doWatch(effect, null, Object.assign(Object.assign({}, options), { flush: 'sync' }) );
3159
3211
  }
3160
3212
  // initial value for watchers to trigger on undefined initial values
3161
3213
  const INITIAL_WATCHER_VALUE = {};
3162
3214
  // implementation
3163
3215
  function watch(source, cb, options) {
3164
3216
  if (!isFunction(cb)) {
3165
- warn$1(`\`watch(fn, options?)\` signature has been moved to a separate API. ` +
3217
+ warn(`\`watch(fn, options?)\` signature has been moved to a separate API. ` +
3166
3218
  `Use \`watchEffect(fn, options?)\` instead. \`watch\` now only ` +
3167
3219
  `supports \`watch(source, cb, options?) signature.`);
3168
3220
  }
@@ -3171,19 +3223,20 @@ var VueRuntimeDOM = (function (exports) {
3171
3223
  function doWatch(source, cb, { immediate, deep, flush, onTrack, onTrigger } = EMPTY_OBJ) {
3172
3224
  if (!cb) {
3173
3225
  if (immediate !== undefined) {
3174
- warn$1(`watch() "immediate" option is only respected when using the ` +
3226
+ warn(`watch() "immediate" option is only respected when using the ` +
3175
3227
  `watch(source, callback, options?) signature.`);
3176
3228
  }
3177
3229
  if (deep !== undefined) {
3178
- warn$1(`watch() "deep" option is only respected when using the ` +
3230
+ warn(`watch() "deep" option is only respected when using the ` +
3179
3231
  `watch(source, callback, options?) signature.`);
3180
3232
  }
3181
3233
  }
3182
3234
  const warnInvalidSource = (s) => {
3183
- warn$1(`Invalid watch source: `, s, `A watch source can only be a getter/effect function, a ref, ` +
3235
+ warn(`Invalid watch source: `, s, `A watch source can only be a getter/effect function, a ref, ` +
3184
3236
  `a reactive object, or an array of these types.`);
3185
3237
  };
3186
- const instance = currentInstance;
3238
+ const instance = getCurrentScope() === (currentInstance === null || currentInstance === void 0 ? void 0 : currentInstance.scope) ? currentInstance : null;
3239
+ // const instance = currentInstance
3187
3240
  let getter;
3188
3241
  let forceTrigger = false;
3189
3242
  let isMultiSource = false;
@@ -3270,7 +3323,7 @@ var VueRuntimeDOM = (function (exports) {
3270
3323
  // pass undefined as the old value when it's changed for the first time
3271
3324
  oldValue === INITIAL_WATCHER_VALUE
3272
3325
  ? undefined
3273
- : (isMultiSource && oldValue[0] === INITIAL_WATCHER_VALUE)
3326
+ : isMultiSource && oldValue[0] === INITIAL_WATCHER_VALUE
3274
3327
  ? []
3275
3328
  : oldValue,
3276
3329
  onCleanup
@@ -3450,7 +3503,7 @@ var VueRuntimeDOM = (function (exports) {
3450
3503
  if (c.type !== Comment) {
3451
3504
  if (hasFound) {
3452
3505
  // warn more than one non-comment child
3453
- warn$1('<transition> can only be used on a single element or component. ' +
3506
+ warn('<transition> can only be used on a single element or component. ' +
3454
3507
  'Use <transition-group> for lists.');
3455
3508
  break;
3456
3509
  }
@@ -3468,7 +3521,7 @@ var VueRuntimeDOM = (function (exports) {
3468
3521
  mode !== 'in-out' &&
3469
3522
  mode !== 'out-in' &&
3470
3523
  mode !== 'default') {
3471
- warn$1(`invalid <transition> mode: ${mode}`);
3524
+ warn(`invalid <transition> mode: ${mode}`);
3472
3525
  }
3473
3526
  if (state.isLeaving) {
3474
3527
  return emptyPlaceholder(child);
@@ -3776,7 +3829,7 @@ var VueRuntimeDOM = (function (exports) {
3776
3829
  return pendingRequest;
3777
3830
  }
3778
3831
  if (!comp) {
3779
- warn$1(`Async component loader resolved to undefined. ` +
3832
+ warn(`Async component loader resolved to undefined. ` +
3780
3833
  `If you are using retry(), make sure to return its return value.`);
3781
3834
  }
3782
3835
  // interop module default
@@ -3963,7 +4016,7 @@ var VueRuntimeDOM = (function (exports) {
3963
4016
  }
3964
4017
  function pruneCacheEntry(key) {
3965
4018
  const cached = cache.get(key);
3966
- if (!current || cached.type !== current.type) {
4019
+ if (!current || !isSameVNodeType(cached, current)) {
3967
4020
  unmount(cached);
3968
4021
  }
3969
4022
  else if (current) {
@@ -3995,7 +4048,7 @@ var VueRuntimeDOM = (function (exports) {
3995
4048
  cache.forEach(cached => {
3996
4049
  const { subTree, suspense } = instance;
3997
4050
  const vnode = getInnerChild(subTree);
3998
- if (cached.type === vnode.type) {
4051
+ if (cached.type === vnode.type && cached.key === vnode.key) {
3999
4052
  // current instance will be unmounted as part of keep-alive's unmount
4000
4053
  resetShapeFlag(vnode);
4001
4054
  // but invoke its deactivated hook here
@@ -4015,7 +4068,7 @@ var VueRuntimeDOM = (function (exports) {
4015
4068
  const rawVNode = children[0];
4016
4069
  if (children.length > 1) {
4017
4070
  {
4018
- warn$1(`KeepAlive should contain exactly one component child.`);
4071
+ warn(`KeepAlive should contain exactly one component child.`);
4019
4072
  }
4020
4073
  current = null;
4021
4074
  return children;
@@ -4092,7 +4145,7 @@ var VueRuntimeDOM = (function (exports) {
4092
4145
  else if (isString(pattern)) {
4093
4146
  return pattern.split(',').includes(name);
4094
4147
  }
4095
- else if (pattern.test) {
4148
+ else if (isRegExp(pattern)) {
4096
4149
  return pattern.test(name);
4097
4150
  }
4098
4151
  /* istanbul ignore next */
@@ -4186,7 +4239,7 @@ var VueRuntimeDOM = (function (exports) {
4186
4239
  }
4187
4240
  else {
4188
4241
  const apiName = toHandlerKey(ErrorTypeStrings[type].replace(/ hook$/, ''));
4189
- warn$1(`${apiName} is called when there is no active component instance to be ` +
4242
+ warn(`${apiName} is called when there is no active component instance to be ` +
4190
4243
  `associated with. ` +
4191
4244
  `Lifecycle injection APIs can only be used during execution of setup().` +
4192
4245
  (` If you are using async setup(), make sure to register lifecycle ` +
@@ -4225,7 +4278,7 @@ var VueRuntimeDOM = (function (exports) {
4225
4278
  */
4226
4279
  function validateDirectiveName(name) {
4227
4280
  if (isBuiltInDirective(name)) {
4228
- warn$1('Do not use built-in directive ids as custom directive id: ' + name);
4281
+ warn('Do not use built-in directive ids as custom directive id: ' + name);
4229
4282
  }
4230
4283
  }
4231
4284
  /**
@@ -4234,7 +4287,7 @@ var VueRuntimeDOM = (function (exports) {
4234
4287
  function withDirectives(vnode, directives) {
4235
4288
  const internalInstance = currentRenderingInstance;
4236
4289
  if (internalInstance === null) {
4237
- warn$1(`withDirectives can only be used inside render functions.`);
4290
+ warn(`withDirectives can only be used inside render functions.`);
4238
4291
  return vnode;
4239
4292
  }
4240
4293
  const instance = getExposeProxy(internalInstance) ||
@@ -4345,12 +4398,12 @@ var VueRuntimeDOM = (function (exports) {
4345
4398
  ? `\nIf this is a native custom element, make sure to exclude it from ` +
4346
4399
  `component resolution via compilerOptions.isCustomElement.`
4347
4400
  : ``;
4348
- warn$1(`Failed to resolve ${type.slice(0, -1)}: ${name}${extra}`);
4401
+ warn(`Failed to resolve ${type.slice(0, -1)}: ${name}${extra}`);
4349
4402
  }
4350
4403
  return res;
4351
4404
  }
4352
4405
  else {
4353
- warn$1(`resolve${capitalize(type.slice(0, -1))} ` +
4406
+ warn(`resolve${capitalize(type.slice(0, -1))} ` +
4354
4407
  `can only be used in render() or setup().`);
4355
4408
  }
4356
4409
  }
@@ -4375,7 +4428,7 @@ var VueRuntimeDOM = (function (exports) {
4375
4428
  }
4376
4429
  else if (typeof source === 'number') {
4377
4430
  if (!Number.isInteger(source)) {
4378
- warn$1(`The v-for range expect an integer value but got ${source}.`);
4431
+ warn(`The v-for range expect an integer value but got ${source}.`);
4379
4432
  }
4380
4433
  ret = new Array(source);
4381
4434
  for (let i = 0; i < source; i++) {
@@ -4452,7 +4505,7 @@ var VueRuntimeDOM = (function (exports) {
4452
4505
  }
4453
4506
  let slot = slots[name];
4454
4507
  if (slot && slot.length > 1) {
4455
- warn$1(`SSR-optimized slot function detected in a non-SSR-optimized render ` +
4508
+ warn(`SSR-optimized slot function detected in a non-SSR-optimized render ` +
4456
4509
  `function. You need to mark this component with $dynamic-slots in the ` +
4457
4510
  `parent template.`);
4458
4511
  slot = () => [];
@@ -4505,7 +4558,7 @@ var VueRuntimeDOM = (function (exports) {
4505
4558
  function toHandlers(obj, preserveCaseIfNecessary) {
4506
4559
  const ret = {};
4507
4560
  if (!isObject(obj)) {
4508
- warn$1(`v-on with no argument expects an object value.`);
4561
+ warn(`v-on with no argument expects an object value.`);
4509
4562
  return ret;
4510
4563
  }
4511
4564
  for (const key in obj) {
@@ -4637,11 +4690,11 @@ var VueRuntimeDOM = (function (exports) {
4637
4690
  // to infinite warning loop
4638
4691
  key.indexOf('__v') !== 0)) {
4639
4692
  if (data !== EMPTY_OBJ && isReservedPrefix(key[0]) && hasOwn(data, key)) {
4640
- warn$1(`Property ${JSON.stringify(key)} must be accessed via $data because it starts with a reserved ` +
4693
+ warn(`Property ${JSON.stringify(key)} must be accessed via $data because it starts with a reserved ` +
4641
4694
  `character ("$" or "_") and is not proxied on the render context.`);
4642
4695
  }
4643
4696
  else if (instance === currentRenderingInstance) {
4644
- warn$1(`Property ${JSON.stringify(key)} was accessed during render ` +
4697
+ warn(`Property ${JSON.stringify(key)} was accessed during render ` +
4645
4698
  `but is not defined on instance.`);
4646
4699
  }
4647
4700
  }
@@ -4654,7 +4707,7 @@ var VueRuntimeDOM = (function (exports) {
4654
4707
  }
4655
4708
  else if (setupState.__isScriptSetup &&
4656
4709
  hasOwn(setupState, key)) {
4657
- warn$1(`Cannot mutate <script setup> binding "${key}" from Options API.`);
4710
+ warn(`Cannot mutate <script setup> binding "${key}" from Options API.`);
4658
4711
  return false;
4659
4712
  }
4660
4713
  else if (data !== EMPTY_OBJ && hasOwn(data, key)) {
@@ -4662,11 +4715,11 @@ var VueRuntimeDOM = (function (exports) {
4662
4715
  return true;
4663
4716
  }
4664
4717
  else if (hasOwn(instance.props, key)) {
4665
- warn$1(`Attempting to mutate prop "${key}". Props are readonly.`);
4718
+ warn(`Attempting to mutate prop "${key}". Props are readonly.`);
4666
4719
  return false;
4667
4720
  }
4668
4721
  if (key[0] === '$' && key.slice(1) in instance) {
4669
- warn$1(`Attempting to mutate public property "${key}". ` +
4722
+ warn(`Attempting to mutate public property "${key}". ` +
4670
4723
  `Properties starting with $ are reserved and readonly.`);
4671
4724
  return false;
4672
4725
  }
@@ -4707,7 +4760,7 @@ var VueRuntimeDOM = (function (exports) {
4707
4760
  };
4708
4761
  {
4709
4762
  PublicInstanceProxyHandlers.ownKeys = (target) => {
4710
- warn$1(`Avoid app logic that relies on enumerating keys on a component instance. ` +
4763
+ warn(`Avoid app logic that relies on enumerating keys on a component instance. ` +
4711
4764
  `The keys will be empty in production mode to avoid performance overhead.`);
4712
4765
  return Reflect.ownKeys(target);
4713
4766
  };
@@ -4723,7 +4776,7 @@ var VueRuntimeDOM = (function (exports) {
4723
4776
  has(_, key) {
4724
4777
  const has = key[0] !== '_' && !isGloballyWhitelisted(key);
4725
4778
  if (!has && PublicInstanceProxyHandlers.has(_, key)) {
4726
- warn$1(`Property ${JSON.stringify(key)} should not start with _ which is a reserved prefix for Vue internals.`);
4779
+ warn(`Property ${JSON.stringify(key)} should not start with _ which is a reserved prefix for Vue internals.`);
4727
4780
  }
4728
4781
  return has;
4729
4782
  }
@@ -4773,7 +4826,7 @@ var VueRuntimeDOM = (function (exports) {
4773
4826
  Object.keys(toRaw(setupState)).forEach(key => {
4774
4827
  if (!setupState.__isScriptSetup) {
4775
4828
  if (isReservedPrefix(key[0])) {
4776
- warn$1(`setup() return property ${JSON.stringify(key)} should not start with "$" or "_" ` +
4829
+ warn(`setup() return property ${JSON.stringify(key)} should not start with "$" or "_" ` +
4777
4830
  `which are reserved prefixes for Vue internals.`);
4778
4831
  return;
4779
4832
  }
@@ -4791,7 +4844,7 @@ var VueRuntimeDOM = (function (exports) {
4791
4844
  const cache = Object.create(null);
4792
4845
  return (type, key) => {
4793
4846
  if (cache[key]) {
4794
- warn$1(`${type} property "${key}" is already defined in ${cache[key]}.`);
4847
+ warn(`${type} property "${key}" is already defined in ${cache[key]}.`);
4795
4848
  }
4796
4849
  else {
4797
4850
  cache[key] = type;
@@ -4808,7 +4861,7 @@ var VueRuntimeDOM = (function (exports) {
4808
4861
  // call beforeCreate first before accessing other options since
4809
4862
  // the hook may mutate resolved options (#2791)
4810
4863
  if (options.beforeCreate) {
4811
- callHook(options.beforeCreate, instance, "bc" /* LifecycleHooks.BEFORE_CREATE */);
4864
+ callHook$1(options.beforeCreate, instance, "bc" /* LifecycleHooks.BEFORE_CREATE */);
4812
4865
  }
4813
4866
  const {
4814
4867
  // state
@@ -4858,24 +4911,24 @@ var VueRuntimeDOM = (function (exports) {
4858
4911
  }
4859
4912
  }
4860
4913
  else {
4861
- warn$1(`Method "${key}" has type "${typeof methodHandler}" in the component definition. ` +
4914
+ warn(`Method "${key}" has type "${typeof methodHandler}" in the component definition. ` +
4862
4915
  `Did you reference the function correctly?`);
4863
4916
  }
4864
4917
  }
4865
4918
  }
4866
4919
  if (dataOptions) {
4867
4920
  if (!isFunction(dataOptions)) {
4868
- warn$1(`The data option must be a function. ` +
4921
+ warn(`The data option must be a function. ` +
4869
4922
  `Plain object usage is no longer supported.`);
4870
4923
  }
4871
4924
  const data = dataOptions.call(publicThis, publicThis);
4872
4925
  if (isPromise(data)) {
4873
- warn$1(`data() returned a Promise - note data() cannot be async; If you ` +
4926
+ warn(`data() returned a Promise - note data() cannot be async; If you ` +
4874
4927
  `intend to perform data fetching before component renders, use ` +
4875
4928
  `async setup() + <Suspense>.`);
4876
4929
  }
4877
4930
  if (!isObject(data)) {
4878
- warn$1(`data() should return an object.`);
4931
+ warn(`data() should return an object.`);
4879
4932
  }
4880
4933
  else {
4881
4934
  instance.data = reactive(data);
@@ -4906,15 +4959,15 @@ var VueRuntimeDOM = (function (exports) {
4906
4959
  ? opt.get.bind(publicThis, publicThis)
4907
4960
  : NOOP;
4908
4961
  if (get === NOOP) {
4909
- warn$1(`Computed property "${key}" has no getter.`);
4962
+ warn(`Computed property "${key}" has no getter.`);
4910
4963
  }
4911
4964
  const set = !isFunction(opt) && isFunction(opt.set)
4912
4965
  ? opt.set.bind(publicThis)
4913
4966
  : () => {
4914
- warn$1(`Write operation failed: computed property "${key}" is readonly.`);
4967
+ warn(`Write operation failed: computed property "${key}" is readonly.`);
4915
4968
  }
4916
4969
  ;
4917
- const c = computed$1({
4970
+ const c = computed({
4918
4971
  get,
4919
4972
  set
4920
4973
  });
@@ -4943,7 +4996,7 @@ var VueRuntimeDOM = (function (exports) {
4943
4996
  });
4944
4997
  }
4945
4998
  if (created) {
4946
- callHook(created, instance, "c" /* LifecycleHooks.CREATED */);
4999
+ callHook$1(created, instance, "c" /* LifecycleHooks.CREATED */);
4947
5000
  }
4948
5001
  function registerLifecycleHook(register, hook) {
4949
5002
  if (isArray(hook)) {
@@ -5023,7 +5076,7 @@ var VueRuntimeDOM = (function (exports) {
5023
5076
  }
5024
5077
  else {
5025
5078
  {
5026
- warn$1(`injected property "${key}" is a ref and will be auto-unwrapped ` +
5079
+ warn(`injected property "${key}" is a ref and will be auto-unwrapped ` +
5027
5080
  `and no longer needs \`.value\` in the next minor release. ` +
5028
5081
  `To opt-in to the new behavior now, ` +
5029
5082
  `set \`app.config.unwrapInjectedRef = true\` (this config is ` +
@@ -5040,7 +5093,7 @@ var VueRuntimeDOM = (function (exports) {
5040
5093
  }
5041
5094
  }
5042
5095
  }
5043
- function callHook(hook, instance, type) {
5096
+ function callHook$1(hook, instance, type) {
5044
5097
  callWithAsyncErrorHandling(isArray(hook)
5045
5098
  ? hook.map(h => h.bind(instance.proxy))
5046
5099
  : hook.bind(instance.proxy), instance, type);
@@ -5055,7 +5108,7 @@ var VueRuntimeDOM = (function (exports) {
5055
5108
  watch(getter, handler);
5056
5109
  }
5057
5110
  else {
5058
- warn$1(`Invalid watch handler specified by key "${raw}"`, handler);
5111
+ warn(`Invalid watch handler specified by key "${raw}"`, handler);
5059
5112
  }
5060
5113
  }
5061
5114
  else if (isFunction(raw)) {
@@ -5073,12 +5126,12 @@ var VueRuntimeDOM = (function (exports) {
5073
5126
  watch(getter, handler, raw);
5074
5127
  }
5075
5128
  else {
5076
- warn$1(`Invalid watch handler specified by key "${raw.handler}"`, handler);
5129
+ warn(`Invalid watch handler specified by key "${raw.handler}"`, handler);
5077
5130
  }
5078
5131
  }
5079
5132
  }
5080
5133
  else {
5081
- warn$1(`Invalid watch option: "${key}"`, raw);
5134
+ warn(`Invalid watch option: "${key}"`, raw);
5082
5135
  }
5083
5136
  }
5084
5137
  /**
@@ -5122,7 +5175,7 @@ var VueRuntimeDOM = (function (exports) {
5122
5175
  }
5123
5176
  for (const key in from) {
5124
5177
  if (asMixin && key === 'expose') {
5125
- warn$1(`"expose" option is ignored when declared in mixins or extends. ` +
5178
+ warn(`"expose" option is ignored when declared in mixins or extends. ` +
5126
5179
  `It should only be declared in the base component itself.`);
5127
5180
  }
5128
5181
  else {
@@ -5455,7 +5508,7 @@ var VueRuntimeDOM = (function (exports) {
5455
5508
  if (isArray(raw)) {
5456
5509
  for (let i = 0; i < raw.length; i++) {
5457
5510
  if (!isString(raw[i])) {
5458
- warn$1(`props must be strings when using array syntax.`, raw[i]);
5511
+ warn(`props must be strings when using array syntax.`, raw[i]);
5459
5512
  }
5460
5513
  const normalizedKey = camelize(raw[i]);
5461
5514
  if (validatePropName(normalizedKey)) {
@@ -5465,7 +5518,7 @@ var VueRuntimeDOM = (function (exports) {
5465
5518
  }
5466
5519
  else if (raw) {
5467
5520
  if (!isObject(raw)) {
5468
- warn$1(`invalid props options`, raw);
5521
+ warn(`invalid props options`, raw);
5469
5522
  }
5470
5523
  for (const key in raw) {
5471
5524
  const normalizedKey = camelize(key);
@@ -5498,15 +5551,15 @@ var VueRuntimeDOM = (function (exports) {
5498
5551
  return true;
5499
5552
  }
5500
5553
  else {
5501
- warn$1(`Invalid prop name: "${key}" is a reserved property.`);
5554
+ warn(`Invalid prop name: "${key}" is a reserved property.`);
5502
5555
  }
5503
5556
  return false;
5504
5557
  }
5505
5558
  // use function string name to check type constructors
5506
5559
  // so that it works across vms / iframes.
5507
5560
  function getType(ctor) {
5508
- const match = ctor && ctor.toString().match(/^\s*function (\w+)/);
5509
- return match ? match[1] : ctor === null ? 'null' : '';
5561
+ const match = ctor && ctor.toString().match(/^\s*(function|class) (\w+)/);
5562
+ return match ? match[2] : ctor === null ? 'null' : '';
5510
5563
  }
5511
5564
  function isSameType(a, b) {
5512
5565
  return getType(a) === getType(b);
@@ -5540,7 +5593,7 @@ var VueRuntimeDOM = (function (exports) {
5540
5593
  const { type, required, validator } = prop;
5541
5594
  // required!
5542
5595
  if (required && isAbsent) {
5543
- warn$1('Missing required prop: "' + name + '"');
5596
+ warn('Missing required prop: "' + name + '"');
5544
5597
  return;
5545
5598
  }
5546
5599
  // missing but optional
@@ -5559,13 +5612,13 @@ var VueRuntimeDOM = (function (exports) {
5559
5612
  isValid = valid;
5560
5613
  }
5561
5614
  if (!isValid) {
5562
- warn$1(getInvalidTypeMessage(name, value, expectedTypes));
5615
+ warn(getInvalidTypeMessage(name, value, expectedTypes));
5563
5616
  return;
5564
5617
  }
5565
5618
  }
5566
5619
  // custom validator
5567
5620
  if (validator && !validator(value)) {
5568
- warn$1('Invalid prop: custom validator check failed for prop "' + name + '".');
5621
+ warn('Invalid prop: custom validator check failed for prop "' + name + '".');
5569
5622
  }
5570
5623
  }
5571
5624
  const isSimpleType = /*#__PURE__*/ makeMap('String,Number,Boolean,Function,Symbol,BigInt');
@@ -5662,7 +5715,7 @@ var VueRuntimeDOM = (function (exports) {
5662
5715
  }
5663
5716
  const normalized = withCtx((...args) => {
5664
5717
  if (true && currentInstance) {
5665
- warn$1(`Slot "${key}" invoked outside of the render function: ` +
5718
+ warn(`Slot "${key}" invoked outside of the render function: ` +
5666
5719
  `this will not track dependencies used in the slot. ` +
5667
5720
  `Invoke the slot function inside the render function instead.`);
5668
5721
  }
@@ -5682,7 +5735,7 @@ var VueRuntimeDOM = (function (exports) {
5682
5735
  }
5683
5736
  else if (value != null) {
5684
5737
  {
5685
- warn$1(`Non-function value encountered for slot "${key}". ` +
5738
+ warn(`Non-function value encountered for slot "${key}". ` +
5686
5739
  `Prefer function slots for better performance.`);
5687
5740
  }
5688
5741
  const normalized = normalizeSlotValue(value);
@@ -5693,7 +5746,7 @@ var VueRuntimeDOM = (function (exports) {
5693
5746
  const normalizeVNodeSlots = (instance, children) => {
5694
5747
  if (!isKeepAlive(instance.vnode) &&
5695
5748
  !(false )) {
5696
- warn$1(`Non-function value encountered for default slot. ` +
5749
+ warn(`Non-function value encountered for default slot. ` +
5697
5750
  `Prefer function slots for better performance.`);
5698
5751
  }
5699
5752
  const normalized = normalizeSlotValue(children);
@@ -5794,21 +5847,21 @@ var VueRuntimeDOM = (function (exports) {
5794
5847
  emitsCache: new WeakMap()
5795
5848
  };
5796
5849
  }
5797
- let uid = 0;
5850
+ let uid$1 = 0;
5798
5851
  function createAppAPI(render, hydrate) {
5799
5852
  return function createApp(rootComponent, rootProps = null) {
5800
5853
  if (!isFunction(rootComponent)) {
5801
5854
  rootComponent = Object.assign({}, rootComponent);
5802
5855
  }
5803
5856
  if (rootProps != null && !isObject(rootProps)) {
5804
- warn$1(`root props passed to app.mount() must be an object.`);
5857
+ warn(`root props passed to app.mount() must be an object.`);
5805
5858
  rootProps = null;
5806
5859
  }
5807
5860
  const context = createAppContext();
5808
5861
  const installedPlugins = new Set();
5809
5862
  let isMounted = false;
5810
5863
  const app = (context.app = {
5811
- _uid: uid++,
5864
+ _uid: uid$1++,
5812
5865
  _component: rootComponent,
5813
5866
  _props: rootProps,
5814
5867
  _container: null,
@@ -5820,12 +5873,12 @@ var VueRuntimeDOM = (function (exports) {
5820
5873
  },
5821
5874
  set config(v) {
5822
5875
  {
5823
- warn$1(`app.config cannot be replaced. Modify individual options instead.`);
5876
+ warn(`app.config cannot be replaced. Modify individual options instead.`);
5824
5877
  }
5825
5878
  },
5826
5879
  use(plugin, ...options) {
5827
5880
  if (installedPlugins.has(plugin)) {
5828
- warn$1(`Plugin has already been applied to target app.`);
5881
+ warn(`Plugin has already been applied to target app.`);
5829
5882
  }
5830
5883
  else if (plugin && isFunction(plugin.install)) {
5831
5884
  installedPlugins.add(plugin);
@@ -5836,7 +5889,7 @@ var VueRuntimeDOM = (function (exports) {
5836
5889
  plugin(app, ...options);
5837
5890
  }
5838
5891
  else {
5839
- warn$1(`A plugin must either be a function or an object with an "install" ` +
5892
+ warn(`A plugin must either be a function or an object with an "install" ` +
5840
5893
  `function.`);
5841
5894
  }
5842
5895
  return app;
@@ -5847,7 +5900,7 @@ var VueRuntimeDOM = (function (exports) {
5847
5900
  context.mixins.push(mixin);
5848
5901
  }
5849
5902
  else {
5850
- warn$1('Mixin has already been applied to target app' +
5903
+ warn('Mixin has already been applied to target app' +
5851
5904
  (mixin.name ? `: ${mixin.name}` : ''));
5852
5905
  }
5853
5906
  }
@@ -5861,7 +5914,7 @@ var VueRuntimeDOM = (function (exports) {
5861
5914
  return context.components[name];
5862
5915
  }
5863
5916
  if (context.components[name]) {
5864
- warn$1(`Component "${name}" has already been registered in target app.`);
5917
+ warn(`Component "${name}" has already been registered in target app.`);
5865
5918
  }
5866
5919
  context.components[name] = component;
5867
5920
  return app;
@@ -5874,7 +5927,7 @@ var VueRuntimeDOM = (function (exports) {
5874
5927
  return context.directives[name];
5875
5928
  }
5876
5929
  if (context.directives[name]) {
5877
- warn$1(`Directive "${name}" has already been registered in target app.`);
5930
+ warn(`Directive "${name}" has already been registered in target app.`);
5878
5931
  }
5879
5932
  context.directives[name] = directive;
5880
5933
  return app;
@@ -5883,7 +5936,7 @@ var VueRuntimeDOM = (function (exports) {
5883
5936
  if (!isMounted) {
5884
5937
  // #5571
5885
5938
  if (rootContainer.__vue_app__) {
5886
- warn$1(`There is already an app instance mounted on the host container.\n` +
5939
+ warn(`There is already an app instance mounted on the host container.\n` +
5887
5940
  ` If you want to mount another app on the same host container,` +
5888
5941
  ` you need to unmount the previous app by calling \`app.unmount()\` first.`);
5889
5942
  }
@@ -5913,7 +5966,7 @@ var VueRuntimeDOM = (function (exports) {
5913
5966
  return getExposeProxy(vnode.component) || vnode.component.proxy;
5914
5967
  }
5915
5968
  else {
5916
- warn$1(`App has already been mounted.\n` +
5969
+ warn(`App has already been mounted.\n` +
5917
5970
  `If you want to remount the same app, move your app creation logic ` +
5918
5971
  `into a factory function and create fresh app instances for each ` +
5919
5972
  `mount - e.g. \`const createMyApp = () => createApp(App)\``);
@@ -5929,12 +5982,12 @@ var VueRuntimeDOM = (function (exports) {
5929
5982
  delete app._container.__vue_app__;
5930
5983
  }
5931
5984
  else {
5932
- warn$1(`Cannot unmount an app that is not mounted.`);
5985
+ warn(`Cannot unmount an app that is not mounted.`);
5933
5986
  }
5934
5987
  },
5935
5988
  provide(key, value) {
5936
5989
  if (key in context.provides) {
5937
- warn$1(`App already provides property with key "${String(key)}". ` +
5990
+ warn(`App already provides property with key "${String(key)}". ` +
5938
5991
  `It will be overwritten with the new value.`);
5939
5992
  }
5940
5993
  context.provides[key] = value;
@@ -5964,7 +6017,7 @@ var VueRuntimeDOM = (function (exports) {
5964
6017
  const value = isUnmount ? null : refValue;
5965
6018
  const { i: owner, r: ref } = rawRef;
5966
6019
  if (!owner) {
5967
- warn$1(`Missing ref owner context. ref cannot be used on hoisted vnodes. ` +
6020
+ warn(`Missing ref owner context. ref cannot be used on hoisted vnodes. ` +
5968
6021
  `A vnode with ref must be created inside the render function.`);
5969
6022
  return;
5970
6023
  }
@@ -6031,7 +6084,7 @@ var VueRuntimeDOM = (function (exports) {
6031
6084
  refs[rawRef.k] = value;
6032
6085
  }
6033
6086
  else {
6034
- warn$1('Invalid template ref type:', ref, `(${typeof ref})`);
6087
+ warn('Invalid template ref type:', ref, `(${typeof ref})`);
6035
6088
  }
6036
6089
  };
6037
6090
  if (value) {
@@ -6043,7 +6096,7 @@ var VueRuntimeDOM = (function (exports) {
6043
6096
  }
6044
6097
  }
6045
6098
  else {
6046
- warn$1('Invalid template ref type:', ref, `(${typeof ref})`);
6099
+ warn('Invalid template ref type:', ref, `(${typeof ref})`);
6047
6100
  }
6048
6101
  }
6049
6102
  }
@@ -6060,7 +6113,7 @@ var VueRuntimeDOM = (function (exports) {
6060
6113
  const { mt: mountComponent, p: patch, o: { patchProp, createText, nextSibling, parentNode, remove, insert, createComment } } = rendererInternals;
6061
6114
  const hydrate = (vnode, container) => {
6062
6115
  if (!container.hasChildNodes()) {
6063
- warn$1(`Attempting to hydrate existing markup but container is empty. ` +
6116
+ warn(`Attempting to hydrate existing markup but container is empty. ` +
6064
6117
  `Performing full mount instead.`);
6065
6118
  patch(null, vnode, container);
6066
6119
  flushPostFlushCbs();
@@ -6103,7 +6156,7 @@ var VueRuntimeDOM = (function (exports) {
6103
6156
  else {
6104
6157
  if (node.data !== vnode.children) {
6105
6158
  hasMismatch = true;
6106
- warn$1(`Hydration text mismatch:` +
6159
+ warn(`Hydration text mismatch:` +
6107
6160
  `\n- Client: ${JSON.stringify(node.data)}` +
6108
6161
  `\n- Server: ${JSON.stringify(vnode.children)}`);
6109
6162
  node.data = vnode.children;
@@ -6218,7 +6271,7 @@ var VueRuntimeDOM = (function (exports) {
6218
6271
  nextNode = vnode.type.hydrate(node, vnode, parentComponent, parentSuspense, isSVGContainer(parentNode(node)), slotScopeIds, optimized, rendererInternals, hydrateNode);
6219
6272
  }
6220
6273
  else {
6221
- warn$1('Invalid HostVNode type:', type, `(${typeof type})`);
6274
+ warn('Invalid HostVNode type:', type, `(${typeof type})`);
6222
6275
  }
6223
6276
  }
6224
6277
  if (ref != null) {
@@ -6279,7 +6332,7 @@ var VueRuntimeDOM = (function (exports) {
6279
6332
  while (next) {
6280
6333
  hasMismatch = true;
6281
6334
  if (!hasWarned) {
6282
- warn$1(`Hydration children mismatch in <${vnode.type}>: ` +
6335
+ warn(`Hydration children mismatch in <${vnode.type}>: ` +
6283
6336
  `server rendered element contains more child nodes than client vdom.`);
6284
6337
  hasWarned = true;
6285
6338
  }
@@ -6292,7 +6345,7 @@ var VueRuntimeDOM = (function (exports) {
6292
6345
  else if (shapeFlag & 8 /* ShapeFlags.TEXT_CHILDREN */) {
6293
6346
  if (el.textContent !== vnode.children) {
6294
6347
  hasMismatch = true;
6295
- warn$1(`Hydration text content mismatch in <${vnode.type}>:\n` +
6348
+ warn(`Hydration text content mismatch in <${vnode.type}>:\n` +
6296
6349
  `- Client: ${el.textContent}\n` +
6297
6350
  `- Server: ${vnode.children}`);
6298
6351
  el.textContent = vnode.children;
@@ -6319,7 +6372,7 @@ var VueRuntimeDOM = (function (exports) {
6319
6372
  else {
6320
6373
  hasMismatch = true;
6321
6374
  if (!hasWarned) {
6322
- warn$1(`Hydration children mismatch in <${container.tagName.toLowerCase()}>: ` +
6375
+ warn(`Hydration children mismatch in <${container.tagName.toLowerCase()}>: ` +
6323
6376
  `server rendered element contains fewer child nodes than client vdom.`);
6324
6377
  hasWarned = true;
6325
6378
  }
@@ -6352,7 +6405,7 @@ var VueRuntimeDOM = (function (exports) {
6352
6405
  };
6353
6406
  const handleMismatch = (node, vnode, parentComponent, parentSuspense, slotScopeIds, isFragment) => {
6354
6407
  hasMismatch = true;
6355
- warn$1(`Hydration node mismatch:\n- Client vnode:`, vnode.type, `\n- Server rendered DOM:`, node, node.nodeType === 3 /* DOMNodeTypes.TEXT */
6408
+ warn(`Hydration node mismatch:\n- Client vnode:`, vnode.type, `\n- Server rendered DOM:`, node, node.nodeType === 3 /* DOMNodeTypes.TEXT */
6356
6409
  ? `(text)`
6357
6410
  : isComment(node) && node.data === '['
6358
6411
  ? `(start of fragment)`
@@ -6520,7 +6573,7 @@ var VueRuntimeDOM = (function (exports) {
6520
6573
  type.process(n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized, internals);
6521
6574
  }
6522
6575
  else {
6523
- warn$1('Invalid VNode type:', type, `(${typeof type})`);
6576
+ warn('Invalid VNode type:', type, `(${typeof type})`);
6524
6577
  }
6525
6578
  }
6526
6579
  // set ref
@@ -6610,6 +6663,8 @@ var VueRuntimeDOM = (function (exports) {
6610
6663
  if (dirs) {
6611
6664
  invokeDirectiveHook(vnode, null, parentComponent, 'created');
6612
6665
  }
6666
+ // scopeId
6667
+ setScopeId(el, vnode, vnode.scopeId, slotScopeIds, parentComponent);
6613
6668
  // props
6614
6669
  if (props) {
6615
6670
  for (const key in props) {
@@ -6633,8 +6688,6 @@ var VueRuntimeDOM = (function (exports) {
6633
6688
  invokeVNodeHook(vnodeHook, parentComponent, vnode);
6634
6689
  }
6635
6690
  }
6636
- // scopeId
6637
- setScopeId(el, vnode, vnode.scopeId, slotScopeIds, parentComponent);
6638
6691
  {
6639
6692
  Object.defineProperty(el, '__vnode', {
6640
6693
  value: vnode,
@@ -7344,7 +7397,7 @@ var VueRuntimeDOM = (function (exports) {
7344
7397
  : normalizeVNode(c2[i]));
7345
7398
  if (nextChild.key != null) {
7346
7399
  if (keyToNewIndexMap.has(nextChild.key)) {
7347
- warn$1(`Duplicate keys found during update:`, JSON.stringify(nextChild.key), `Make sure keys are unique.`);
7400
+ warn(`Duplicate keys found during update:`, JSON.stringify(nextChild.key), `Make sure keys are unique.`);
7348
7401
  }
7349
7402
  keyToNewIndexMap.set(nextChild.key, i);
7350
7403
  }
@@ -7789,14 +7842,14 @@ var VueRuntimeDOM = (function (exports) {
7789
7842
  const targetSelector = props && props.to;
7790
7843
  if (isString(targetSelector)) {
7791
7844
  if (!select) {
7792
- warn$1(`Current renderer does not support string target for Teleports. ` +
7845
+ warn(`Current renderer does not support string target for Teleports. ` +
7793
7846
  `(missing querySelector renderer option)`);
7794
7847
  return null;
7795
7848
  }
7796
7849
  else {
7797
7850
  const target = select(targetSelector);
7798
7851
  if (!target) {
7799
- warn$1(`Failed to locate Teleport target with selector "${targetSelector}". ` +
7852
+ warn(`Failed to locate Teleport target with selector "${targetSelector}". ` +
7800
7853
  `Note the target element must exist before the component is mounted - ` +
7801
7854
  `i.e. the target cannot be rendered by the component itself, and ` +
7802
7855
  `ideally should be outside of the entire Vue component tree.`);
@@ -7806,7 +7859,7 @@ var VueRuntimeDOM = (function (exports) {
7806
7859
  }
7807
7860
  else {
7808
7861
  if (!targetSelector && !isTeleportDisabled(props)) {
7809
- warn$1(`Invalid Teleport target: ${targetSelector}`);
7862
+ warn(`Invalid Teleport target: ${targetSelector}`);
7810
7863
  }
7811
7864
  return targetSelector;
7812
7865
  }
@@ -7839,7 +7892,7 @@ var VueRuntimeDOM = (function (exports) {
7839
7892
  isSVG = isSVG || isTargetSVG(target);
7840
7893
  }
7841
7894
  else if (!disabled) {
7842
- warn$1('Invalid Teleport target on mount:', target, `(${typeof target})`);
7895
+ warn('Invalid Teleport target on mount:', target, `(${typeof target})`);
7843
7896
  }
7844
7897
  const mount = (container, anchor) => {
7845
7898
  // Teleport *always* has Array children. This is enforced in both the
@@ -7891,7 +7944,7 @@ var VueRuntimeDOM = (function (exports) {
7891
7944
  moveTeleport(n2, nextTarget, null, internals, 0 /* TeleportMoveTypes.TARGET_CHANGE */);
7892
7945
  }
7893
7946
  else {
7894
- warn$1('Invalid Teleport target on update:', target, `(${typeof target})`);
7947
+ warn('Invalid Teleport target on update:', target, `(${typeof target})`);
7895
7948
  }
7896
7949
  }
7897
7950
  else if (wasDisabled) {
@@ -8172,7 +8225,7 @@ var VueRuntimeDOM = (function (exports) {
8172
8225
  }
8173
8226
  // validate key
8174
8227
  if (vnode.key !== vnode.key) {
8175
- warn$1(`VNode created with invalid key (NaN). VNode type:`, vnode.type);
8228
+ warn(`VNode created with invalid key (NaN). VNode type:`, vnode.type);
8176
8229
  }
8177
8230
  // track vnode for block tree
8178
8231
  if (isBlockTreeEnabled > 0 &&
@@ -8196,7 +8249,7 @@ var VueRuntimeDOM = (function (exports) {
8196
8249
  function _createVNode(type, props = null, children = null, patchFlag = 0, dynamicProps = null, isBlockNode = false) {
8197
8250
  if (!type || type === NULL_DYNAMIC_COMPONENT) {
8198
8251
  if (!type) {
8199
- warn$1(`Invalid vnode type when creating vnode: ${type}.`);
8252
+ warn(`Invalid vnode type when creating vnode: ${type}.`);
8200
8253
  }
8201
8254
  type = Comment;
8202
8255
  }
@@ -8254,7 +8307,7 @@ var VueRuntimeDOM = (function (exports) {
8254
8307
  : 0;
8255
8308
  if (shapeFlag & 4 /* ShapeFlags.STATEFUL_COMPONENT */ && isProxy(type)) {
8256
8309
  type = toRaw(type);
8257
- warn$1(`Vue received a Component which was made a reactive object. This can ` +
8310
+ warn(`Vue received a Component which was made a reactive object. This can ` +
8258
8311
  `lead to unnecessary performance overhead, and should be avoided by ` +
8259
8312
  `marking the component with \`markRaw\` or using \`shallowRef\` ` +
8260
8313
  `instead of \`ref\`.`, `\nComponent that was made reactive: `, type);
@@ -8322,7 +8375,8 @@ var VueRuntimeDOM = (function (exports) {
8322
8375
  ssFallback: vnode.ssFallback && cloneVNode(vnode.ssFallback),
8323
8376
  el: vnode.el,
8324
8377
  anchor: vnode.anchor,
8325
- ctx: vnode.ctx
8378
+ ctx: vnode.ctx,
8379
+ ce: vnode.ce
8326
8380
  };
8327
8381
  return cloned;
8328
8382
  }
@@ -8489,13 +8543,13 @@ var VueRuntimeDOM = (function (exports) {
8489
8543
  }
8490
8544
 
8491
8545
  const emptyAppContext = createAppContext();
8492
- let uid$1 = 0;
8546
+ let uid = 0;
8493
8547
  function createComponentInstance(vnode, parent, suspense) {
8494
8548
  const type = vnode.type;
8495
8549
  // inherit parent app context - or - if root, adopt from root vnode
8496
8550
  const appContext = (parent ? parent.appContext : vnode.appContext) || emptyAppContext;
8497
8551
  const instance = {
8498
- uid: uid$1++,
8552
+ uid: uid++,
8499
8553
  vnode,
8500
8554
  type,
8501
8555
  parent,
@@ -8565,7 +8619,7 @@ var VueRuntimeDOM = (function (exports) {
8565
8619
  instance.ctx = createDevRenderContext(instance);
8566
8620
  }
8567
8621
  instance.root = parent ? parent.root : instance;
8568
- instance.emit = emit$1.bind(null, instance);
8622
+ instance.emit = emit.bind(null, instance);
8569
8623
  // apply custom element special handling
8570
8624
  if (vnode.ce) {
8571
8625
  vnode.ce(instance);
@@ -8586,7 +8640,7 @@ var VueRuntimeDOM = (function (exports) {
8586
8640
  function validateComponentName(name, config) {
8587
8641
  const appIsNativeTag = config.isNativeTag || NO;
8588
8642
  if (isBuiltInTag(name) || appIsNativeTag(name)) {
8589
- warn$1('Do not use built-in or reserved HTML elements as component id: ' + name);
8643
+ warn('Do not use built-in or reserved HTML elements as component id: ' + name);
8590
8644
  }
8591
8645
  }
8592
8646
  function isStatefulComponent(instance) {
@@ -8625,7 +8679,7 @@ var VueRuntimeDOM = (function (exports) {
8625
8679
  }
8626
8680
  }
8627
8681
  if (Component.compilerOptions && isRuntimeOnly()) {
8628
- warn$1(`"compilerOptions" is only supported when using a build of Vue that ` +
8682
+ warn(`"compilerOptions" is only supported when using a build of Vue that ` +
8629
8683
  `includes the runtime compiler. Since you are using a runtime-only ` +
8630
8684
  `build, the options should be passed via your build tool config instead.`);
8631
8685
  }
@@ -8666,7 +8720,7 @@ var VueRuntimeDOM = (function (exports) {
8666
8720
  instance.asyncDep = setupResult;
8667
8721
  if (!instance.suspense) {
8668
8722
  const name = (_a = Component.name) !== null && _a !== void 0 ? _a : 'Anonymous';
8669
- warn$1(`Component <${name}>: setup function returned a promise, but no ` +
8723
+ warn(`Component <${name}>: setup function returned a promise, but no ` +
8670
8724
  `<Suspense> boundary was found in the parent component tree. ` +
8671
8725
  `A component with async setup() must be nested in a <Suspense> ` +
8672
8726
  `in order to be rendered.`);
@@ -8690,7 +8744,7 @@ var VueRuntimeDOM = (function (exports) {
8690
8744
  }
8691
8745
  else if (isObject(setupResult)) {
8692
8746
  if (isVNode(setupResult)) {
8693
- warn$1(`setup() should not return VNodes directly - ` +
8747
+ warn(`setup() should not return VNodes directly - ` +
8694
8748
  `return a render function instead.`);
8695
8749
  }
8696
8750
  // setup returned bindings.
@@ -8704,7 +8758,7 @@ var VueRuntimeDOM = (function (exports) {
8704
8758
  }
8705
8759
  }
8706
8760
  else if (setupResult !== undefined) {
8707
- warn$1(`setup() should return an object. Received: ${setupResult === null ? 'null' : typeof setupResult}`);
8761
+ warn(`setup() should return an object. Received: ${setupResult === null ? 'null' : typeof setupResult}`);
8708
8762
  }
8709
8763
  finishComponentSetup(instance, isSSR);
8710
8764
  }
@@ -8771,13 +8825,13 @@ var VueRuntimeDOM = (function (exports) {
8771
8825
  if (!Component.render && instance.render === NOOP && !isSSR) {
8772
8826
  /* istanbul ignore if */
8773
8827
  if (!compile && Component.template) {
8774
- warn$1(`Component provided template option but ` +
8828
+ warn(`Component provided template option but ` +
8775
8829
  `runtime compilation is not supported in this build of Vue.` +
8776
8830
  (` Use "vue.global.js" instead.`
8777
8831
  ) /* should not happen */);
8778
8832
  }
8779
8833
  else {
8780
- warn$1(`Component is missing template or render function.`);
8834
+ warn(`Component is missing template or render function.`);
8781
8835
  }
8782
8836
  }
8783
8837
  }
@@ -8789,11 +8843,11 @@ var VueRuntimeDOM = (function (exports) {
8789
8843
  return target[key];
8790
8844
  },
8791
8845
  set() {
8792
- warn$1(`setupContext.attrs is readonly.`);
8846
+ warn(`setupContext.attrs is readonly.`);
8793
8847
  return false;
8794
8848
  },
8795
8849
  deleteProperty() {
8796
- warn$1(`setupContext.attrs is readonly.`);
8850
+ warn(`setupContext.attrs is readonly.`);
8797
8851
  return false;
8798
8852
  }
8799
8853
  }
@@ -8801,8 +8855,24 @@ var VueRuntimeDOM = (function (exports) {
8801
8855
  }
8802
8856
  function createSetupContext(instance) {
8803
8857
  const expose = exposed => {
8804
- if (instance.exposed) {
8805
- warn$1(`expose() should be called only once per setup().`);
8858
+ {
8859
+ if (instance.exposed) {
8860
+ warn(`expose() should be called only once per setup().`);
8861
+ }
8862
+ if (exposed != null) {
8863
+ let exposedType = typeof exposed;
8864
+ if (exposedType === 'object') {
8865
+ if (isArray(exposed)) {
8866
+ exposedType = 'array';
8867
+ }
8868
+ else if (isRef(exposed)) {
8869
+ exposedType = 'ref';
8870
+ }
8871
+ }
8872
+ if (exposedType !== 'object') {
8873
+ warn(`expose() should be passed a plain object, received ${exposedType}.`);
8874
+ }
8875
+ }
8806
8876
  }
8807
8877
  instance.exposed = exposed || {};
8808
8878
  };
@@ -8877,13 +8947,13 @@ var VueRuntimeDOM = (function (exports) {
8877
8947
  return isFunction(value) && '__vccOpts' in value;
8878
8948
  }
8879
8949
 
8880
- const computed$1 = ((getterOrOptions, debugOptions) => {
8950
+ const computed = ((getterOrOptions, debugOptions) => {
8881
8951
  // @ts-ignore
8882
- return computed(getterOrOptions, debugOptions, isInSSRComponentSetup);
8952
+ return computed$1(getterOrOptions, debugOptions, isInSSRComponentSetup);
8883
8953
  });
8884
8954
 
8885
8955
  // dev only
8886
- const warnRuntimeUsage = (method) => warn$1(`${method}() is a compiler-hint helper that is only usable inside ` +
8956
+ const warnRuntimeUsage = (method) => warn(`${method}() is a compiler-hint helper that is only usable inside ` +
8887
8957
  `<script setup> of a single file component. Its arguments should be ` +
8888
8958
  `compiled away and passing it at runtime has no effect.`);
8889
8959
  // implementation
@@ -8950,7 +9020,7 @@ var VueRuntimeDOM = (function (exports) {
8950
9020
  function getContext() {
8951
9021
  const i = getCurrentInstance();
8952
9022
  if (!i) {
8953
- warn$1(`useContext() called without active instance.`);
9023
+ warn(`useContext() called without active instance.`);
8954
9024
  }
8955
9025
  return i.setupContext || (i.setupContext = createSetupContext(i));
8956
9026
  }
@@ -8977,7 +9047,7 @@ var VueRuntimeDOM = (function (exports) {
8977
9047
  props[key] = { default: defaults[key] };
8978
9048
  }
8979
9049
  else {
8980
- warn$1(`props default key "${key}" has no corresponding declaration.`);
9050
+ warn(`props default key "${key}" has no corresponding declaration.`);
8981
9051
  }
8982
9052
  }
8983
9053
  return props;
@@ -9020,7 +9090,7 @@ var VueRuntimeDOM = (function (exports) {
9020
9090
  function withAsyncContext(getAwaitable) {
9021
9091
  const ctx = getCurrentInstance();
9022
9092
  if (!ctx) {
9023
- warn$1(`withAsyncContext called without active current instance. ` +
9093
+ warn(`withAsyncContext called without active current instance. ` +
9024
9094
  `This is likely a bug.`);
9025
9095
  }
9026
9096
  let awaitable = getAwaitable();
@@ -9065,7 +9135,7 @@ var VueRuntimeDOM = (function (exports) {
9065
9135
  const ssrContextKey = Symbol(`ssrContext` );
9066
9136
  const useSSRContext = () => {
9067
9137
  {
9068
- warn$1(`useSSRContext() is not supported in the global build.`);
9138
+ warn(`useSSRContext() is not supported in the global build.`);
9069
9139
  }
9070
9140
  };
9071
9141
 
@@ -9286,7 +9356,7 @@ var VueRuntimeDOM = (function (exports) {
9286
9356
  }
9287
9357
 
9288
9358
  // Core API ------------------------------------------------------------------
9289
- const version = "3.2.45";
9359
+ const version = "3.2.46";
9290
9360
  /**
9291
9361
  * SSR utils for \@vue/server-renderer. Only exposed in ssr-possible builds.
9292
9362
  * @internal
@@ -9403,9 +9473,6 @@ var VueRuntimeDOM = (function (exports) {
9403
9473
  const style = el.style;
9404
9474
  const isCssString = isString(next);
9405
9475
  if (next && !isCssString) {
9406
- for (const key in next) {
9407
- setStyle(style, key, next[key]);
9408
- }
9409
9476
  if (prev && !isString(prev)) {
9410
9477
  for (const key in prev) {
9411
9478
  if (next[key] == null) {
@@ -9413,6 +9480,9 @@ var VueRuntimeDOM = (function (exports) {
9413
9480
  }
9414
9481
  }
9415
9482
  }
9483
+ for (const key in next) {
9484
+ setStyle(style, key, next[key]);
9485
+ }
9416
9486
  }
9417
9487
  else {
9418
9488
  const currentDisplay = style.display;
@@ -9443,7 +9513,7 @@ var VueRuntimeDOM = (function (exports) {
9443
9513
  val = '';
9444
9514
  {
9445
9515
  if (semicolonRE.test(val)) {
9446
- warn$1(`Unexpected semicolon at the end of '${name}' style value: '${val}'`);
9516
+ warn(`Unexpected semicolon at the end of '${name}' style value: '${val}'`);
9447
9517
  }
9448
9518
  }
9449
9519
  if (name.startsWith('--')) {
@@ -9567,7 +9637,7 @@ var VueRuntimeDOM = (function (exports) {
9567
9637
  catch (e) {
9568
9638
  // do not warn if value is auto-coerced from nullish values
9569
9639
  if (!needRemove) {
9570
- warn$1(`Failed setting prop "${key}" on <${el.tagName.toLowerCase()}>: ` +
9640
+ warn(`Failed setting prop "${key}" on <${el.tagName.toLowerCase()}>: ` +
9571
9641
  `value ${value} is invalid.`, e);
9572
9642
  }
9573
9643
  }
@@ -9771,7 +9841,7 @@ var VueRuntimeDOM = (function (exports) {
9771
9841
  }
9772
9842
  else {
9773
9843
  if (this.shadowRoot) {
9774
- warn$1(`Custom element has pre-rendered declarative shadow root but is not ` +
9844
+ warn(`Custom element has pre-rendered declarative shadow root but is not ` +
9775
9845
  `defined as hydratable. Use \`defineSSRCustomElement\`.`);
9776
9846
  }
9777
9847
  this.attachShadow({ mode: 'open' });
@@ -9977,7 +10047,7 @@ var VueRuntimeDOM = (function (exports) {
9977
10047
  /* istanbul ignore else */
9978
10048
  {
9979
10049
  {
9980
- warn$1(`useCssModule() is not supported in the global build.`);
10050
+ warn(`useCssModule() is not supported in the global build.`);
9981
10051
  }
9982
10052
  return EMPTY_OBJ;
9983
10053
  }
@@ -9991,7 +10061,7 @@ var VueRuntimeDOM = (function (exports) {
9991
10061
  const instance = getCurrentInstance();
9992
10062
  /* istanbul ignore next */
9993
10063
  if (!instance) {
9994
- warn$1(`useCssVars is called without current active component instance.`);
10064
+ warn(`useCssVars is called without current active component instance.`);
9995
10065
  return;
9996
10066
  }
9997
10067
  const updateTeleports = (instance.ut = (vars = getter(instance.proxy)) => {
@@ -10078,7 +10148,7 @@ var VueRuntimeDOM = (function (exports) {
10078
10148
  * #3227 Incoming hooks may be merged into arrays when wrapping Transition
10079
10149
  * with custom HOCs.
10080
10150
  */
10081
- const callHook$1 = (hook, args = []) => {
10151
+ const callHook = (hook, args = []) => {
10082
10152
  if (isArray(hook)) {
10083
10153
  hook.forEach(h => h(...args));
10084
10154
  }
@@ -10128,7 +10198,7 @@ var VueRuntimeDOM = (function (exports) {
10128
10198
  return (el, done) => {
10129
10199
  const hook = isAppear ? onAppear : onEnter;
10130
10200
  const resolve = () => finishEnter(el, isAppear, done);
10131
- callHook$1(hook, [el, resolve]);
10201
+ callHook(hook, [el, resolve]);
10132
10202
  nextFrame(() => {
10133
10203
  removeTransitionClass(el, isAppear ? appearFromClass : enterFromClass);
10134
10204
  addTransitionClass(el, isAppear ? appearToClass : enterToClass);
@@ -10140,12 +10210,12 @@ var VueRuntimeDOM = (function (exports) {
10140
10210
  };
10141
10211
  return extend(baseProps, {
10142
10212
  onBeforeEnter(el) {
10143
- callHook$1(onBeforeEnter, [el]);
10213
+ callHook(onBeforeEnter, [el]);
10144
10214
  addTransitionClass(el, enterFromClass);
10145
10215
  addTransitionClass(el, enterActiveClass);
10146
10216
  },
10147
10217
  onBeforeAppear(el) {
10148
- callHook$1(onBeforeAppear, [el]);
10218
+ callHook(onBeforeAppear, [el]);
10149
10219
  addTransitionClass(el, appearFromClass);
10150
10220
  addTransitionClass(el, appearActiveClass);
10151
10221
  },
@@ -10169,19 +10239,19 @@ var VueRuntimeDOM = (function (exports) {
10169
10239
  whenTransitionEnds(el, type, leaveDuration, resolve);
10170
10240
  }
10171
10241
  });
10172
- callHook$1(onLeave, [el, resolve]);
10242
+ callHook(onLeave, [el, resolve]);
10173
10243
  },
10174
10244
  onEnterCancelled(el) {
10175
10245
  finishEnter(el, false);
10176
- callHook$1(onEnterCancelled, [el]);
10246
+ callHook(onEnterCancelled, [el]);
10177
10247
  },
10178
10248
  onAppearCancelled(el) {
10179
10249
  finishEnter(el, true);
10180
- callHook$1(onAppearCancelled, [el]);
10250
+ callHook(onAppearCancelled, [el]);
10181
10251
  },
10182
10252
  onLeaveCancelled(el) {
10183
10253
  finishLeave(el);
10184
- callHook$1(onLeaveCancelled, [el]);
10254
+ callHook(onLeaveCancelled, [el]);
10185
10255
  }
10186
10256
  });
10187
10257
  }
@@ -10199,18 +10269,10 @@ var VueRuntimeDOM = (function (exports) {
10199
10269
  }
10200
10270
  function NumberOf(val) {
10201
10271
  const res = toNumber(val);
10202
- validateDuration(res);
10203
- return res;
10204
- }
10205
- function validateDuration(val) {
10206
- if (typeof val !== 'number') {
10207
- warn$1(`<transition> explicit duration is not a valid number - ` +
10208
- `got ${JSON.stringify(val)}.`);
10209
- }
10210
- else if (isNaN(val)) {
10211
- warn$1(`<transition> explicit duration is NaN - ` +
10212
- 'the duration expression might be incorrect.');
10272
+ {
10273
+ assertNumber(res, '<transition> explicit duration');
10213
10274
  }
10275
+ return res;
10214
10276
  }
10215
10277
  function addTransitionClass(el, cls) {
10216
10278
  cls.split(/\s+/).forEach(c => c && el.classList.add(c));
@@ -10393,7 +10455,7 @@ var VueRuntimeDOM = (function (exports) {
10393
10455
  setTransitionHooks(child, resolveTransitionHooks(child, cssTransitionProps, state, instance));
10394
10456
  }
10395
10457
  else {
10396
- warn$1(`<TransitionGroup> children must be keyed.`);
10458
+ warn(`<TransitionGroup> children must be keyed.`);
10397
10459
  }
10398
10460
  }
10399
10461
  if (prevChildren) {
@@ -10407,6 +10469,14 @@ var VueRuntimeDOM = (function (exports) {
10407
10469
  };
10408
10470
  }
10409
10471
  };
10472
+ /**
10473
+ * TransitionGroup does not support "mode" so we need to remove it from the
10474
+ * props declarations, but direct delete operation is considered a side effect
10475
+ * and will make the entire transition feature non-tree-shakeable, so we do it
10476
+ * in a function and mark the function's invocation as pure.
10477
+ */
10478
+ const removeMode = (props) => delete props.mode;
10479
+ /*#__PURE__*/ removeMode(TransitionGroupImpl.props);
10410
10480
  const TransitionGroup = TransitionGroupImpl;
10411
10481
  function callPendingCbs(c) {
10412
10482
  const el = c.el;
@@ -10482,7 +10552,7 @@ var VueRuntimeDOM = (function (exports) {
10482
10552
  domValue = domValue.trim();
10483
10553
  }
10484
10554
  if (castToNumber) {
10485
- domValue = toNumber(domValue);
10555
+ domValue = looseToNumber(domValue);
10486
10556
  }
10487
10557
  el._assign(domValue);
10488
10558
  });
@@ -10517,7 +10587,8 @@ var VueRuntimeDOM = (function (exports) {
10517
10587
  if (trim && el.value.trim() === value) {
10518
10588
  return;
10519
10589
  }
10520
- if ((number || el.type === 'number') && toNumber(el.value) === value) {
10590
+ if ((number || el.type === 'number') &&
10591
+ looseToNumber(el.value) === value) {
10521
10592
  return;
10522
10593
  }
10523
10594
  }
@@ -10606,7 +10677,7 @@ var VueRuntimeDOM = (function (exports) {
10606
10677
  addEventListener(el, 'change', () => {
10607
10678
  const selectedVal = Array.prototype.filter
10608
10679
  .call(el.options, (o) => o.selected)
10609
- .map((o) => number ? toNumber(getValue(o)) : getValue(o));
10680
+ .map((o) => number ? looseToNumber(getValue(o)) : getValue(o));
10610
10681
  el._assign(el.multiple
10611
10682
  ? isSetModel
10612
10683
  ? new Set(selectedVal)
@@ -10630,7 +10701,7 @@ var VueRuntimeDOM = (function (exports) {
10630
10701
  function setSelected(el, value) {
10631
10702
  const isMultiple = el.multiple;
10632
10703
  if (isMultiple && !isArray(value) && !isSet(value)) {
10633
- warn$1(`<select multiple v-model> expects an Array or Set value for its binding, ` +
10704
+ warn(`<select multiple v-model> expects an Array or Set value for its binding, ` +
10634
10705
  `but got ${Object.prototype.toString.call(value).slice(8, -1)}.`);
10635
10706
  return;
10636
10707
  }
@@ -10883,7 +10954,7 @@ var VueRuntimeDOM = (function (exports) {
10883
10954
  return isCustomElement;
10884
10955
  },
10885
10956
  set() {
10886
- warn$1(`The \`isCustomElement\` config option is deprecated. Use ` +
10957
+ warn(`The \`isCustomElement\` config option is deprecated. Use ` +
10887
10958
  `\`compilerOptions.isCustomElement\` instead.`);
10888
10959
  }
10889
10960
  });
@@ -10897,11 +10968,11 @@ var VueRuntimeDOM = (function (exports) {
10897
10968
  `- 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`;
10898
10969
  Object.defineProperty(app.config, 'compilerOptions', {
10899
10970
  get() {
10900
- warn$1(msg);
10971
+ warn(msg);
10901
10972
  return compilerOptions;
10902
10973
  },
10903
10974
  set() {
10904
- warn$1(msg);
10975
+ warn(msg);
10905
10976
  }
10906
10977
  });
10907
10978
  }
@@ -10910,14 +10981,14 @@ var VueRuntimeDOM = (function (exports) {
10910
10981
  if (isString(container)) {
10911
10982
  const res = document.querySelector(container);
10912
10983
  if (!res) {
10913
- warn$1(`Failed to mount app: mount target selector "${container}" returned null.`);
10984
+ warn(`Failed to mount app: mount target selector "${container}" returned null.`);
10914
10985
  }
10915
10986
  return res;
10916
10987
  }
10917
10988
  if (window.ShadowRoot &&
10918
10989
  container instanceof window.ShadowRoot &&
10919
10990
  container.mode === 'closed') {
10920
- warn$1(`mounting on a ShadowRoot with \`{mode: "closed"}\` may lead to unpredictable bugs`);
10991
+ warn(`mounting on a ShadowRoot with \`{mode: "closed"}\` may lead to unpredictable bugs`);
10921
10992
  }
10922
10993
  return container;
10923
10994
  }
@@ -10939,13 +11010,14 @@ var VueRuntimeDOM = (function (exports) {
10939
11010
  exports.Transition = Transition;
10940
11011
  exports.TransitionGroup = TransitionGroup;
10941
11012
  exports.VueElement = VueElement;
11013
+ exports.assertNumber = assertNumber;
10942
11014
  exports.callWithAsyncErrorHandling = callWithAsyncErrorHandling;
10943
11015
  exports.callWithErrorHandling = callWithErrorHandling;
10944
11016
  exports.camelize = camelize;
10945
11017
  exports.capitalize = capitalize;
10946
11018
  exports.cloneVNode = cloneVNode;
10947
11019
  exports.compatUtils = compatUtils;
10948
- exports.computed = computed$1;
11020
+ exports.computed = computed;
10949
11021
  exports.createApp = createApp;
10950
11022
  exports.createBlock = createBlock;
10951
11023
  exports.createCommentVNode = createCommentVNode;
@@ -11056,7 +11128,7 @@ var VueRuntimeDOM = (function (exports) {
11056
11128
  exports.vModelText = vModelText;
11057
11129
  exports.vShow = vShow;
11058
11130
  exports.version = version;
11059
- exports.warn = warn$1;
11131
+ exports.warn = warn;
11060
11132
  exports.watch = watch;
11061
11133
  exports.watchEffect = watchEffect;
11062
11134
  exports.watchPostEffect = watchPostEffect;
@@ -11070,8 +11142,6 @@ var VueRuntimeDOM = (function (exports) {
11070
11142
  exports.withModifiers = withModifiers;
11071
11143
  exports.withScopeId = withScopeId;
11072
11144
 
11073
- Object.defineProperty(exports, '__esModule', { value: true });
11074
-
11075
11145
  return exports;
11076
11146
 
11077
- }({}));
11147
+ })({});