@vue/runtime-dom 3.4.0-rc.1 → 3.4.0-rc.3

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.
@@ -283,7 +283,7 @@ var VueRuntimeDOM = (function (exports) {
283
283
  return isSymbol(v) ? `Symbol(${(_a = v.description) != null ? _a : i})` : v;
284
284
  };
285
285
 
286
- function warn$1(msg, ...args) {
286
+ function warn$2(msg, ...args) {
287
287
  console.warn(`[Vue warn] ${msg}`, ...args);
288
288
  }
289
289
 
@@ -323,7 +323,7 @@ var VueRuntimeDOM = (function (exports) {
323
323
  activeEffectScope = currentEffectScope;
324
324
  }
325
325
  } else {
326
- warn$1(`cannot run an inactive effect scope.`);
326
+ warn$2(`cannot run an inactive effect scope.`);
327
327
  }
328
328
  }
329
329
  /**
@@ -381,7 +381,7 @@ var VueRuntimeDOM = (function (exports) {
381
381
  if (activeEffectScope) {
382
382
  activeEffectScope.cleanups.push(fn);
383
383
  } else {
384
- warn$1(
384
+ warn$2(
385
385
  `onScopeDispose() is called when there is no active effect scope to be associated with.`
386
386
  );
387
387
  }
@@ -829,7 +829,7 @@ var VueRuntimeDOM = (function (exports) {
829
829
  }
830
830
  set(target, key) {
831
831
  {
832
- warn$1(
832
+ warn$2(
833
833
  `Set operation on key "${String(key)}" failed: target is readonly.`,
834
834
  target
835
835
  );
@@ -838,7 +838,7 @@ var VueRuntimeDOM = (function (exports) {
838
838
  }
839
839
  deleteProperty(target, key) {
840
840
  {
841
- warn$1(
841
+ warn$2(
842
842
  `Delete operation on key "${String(key)}" failed: target is readonly.`,
843
843
  target
844
844
  );
@@ -1496,7 +1496,7 @@ var VueRuntimeDOM = (function (exports) {
1496
1496
  function popWarningContext() {
1497
1497
  stack.pop();
1498
1498
  }
1499
- function warn(msg, ...args) {
1499
+ function warn$1(msg, ...args) {
1500
1500
  pauseTracking();
1501
1501
  const instance = stack.length ? stack[stack.length - 1].component : null;
1502
1502
  const appWarnHandler = instance && instance.appContext.config.warnHandler;
@@ -1597,9 +1597,9 @@ var VueRuntimeDOM = (function (exports) {
1597
1597
  if (val === void 0) {
1598
1598
  return;
1599
1599
  } else if (typeof val !== "number") {
1600
- warn(`${type} is not a valid number - got ${JSON.stringify(val)}.`);
1600
+ warn$1(`${type} is not a valid number - got ${JSON.stringify(val)}.`);
1601
1601
  } else if (isNaN(val)) {
1602
- warn(`${type} is NaN - the duration expression might be incorrect.`);
1602
+ warn$1(`${type} is NaN - the duration expression might be incorrect.`);
1603
1603
  }
1604
1604
  }
1605
1605
 
@@ -1664,7 +1664,7 @@ var VueRuntimeDOM = (function (exports) {
1664
1664
  [11]: "app warnHandler",
1665
1665
  [12]: "ref function",
1666
1666
  [13]: "async component loader",
1667
- [14]: "scheduler flush. This is likely a Vue internals bug. Please open an issue at https://new-issue.vuejs.org/?repo=vuejs/core"
1667
+ [14]: "scheduler flush. This is likely a Vue internals bug. Please open an issue at https://github.com/vuejs/core ."
1668
1668
  };
1669
1669
  function callWithErrorHandling(fn, instance, type, args) {
1670
1670
  let res;
@@ -1727,7 +1727,7 @@ var VueRuntimeDOM = (function (exports) {
1727
1727
  if (contextVNode) {
1728
1728
  pushWarningContext(contextVNode);
1729
1729
  }
1730
- warn(`Unhandled error${info ? ` during execution of ${info}` : ``}`);
1730
+ warn$1(`Unhandled error${info ? ` during execution of ${info}` : ``}`);
1731
1731
  if (contextVNode) {
1732
1732
  popWarningContext();
1733
1733
  }
@@ -2025,22 +2025,22 @@ var VueRuntimeDOM = (function (exports) {
2025
2025
  };
2026
2026
  }
2027
2027
 
2028
- exports.devtools = void 0;
2028
+ let devtools$1;
2029
2029
  let buffer = [];
2030
2030
  let devtoolsNotInstalled = false;
2031
2031
  function emit$1(event, ...args) {
2032
- if (exports.devtools) {
2033
- exports.devtools.emit(event, ...args);
2032
+ if (devtools$1) {
2033
+ devtools$1.emit(event, ...args);
2034
2034
  } else if (!devtoolsNotInstalled) {
2035
2035
  buffer.push({ event, args });
2036
2036
  }
2037
2037
  }
2038
- function setDevtoolsHook(hook, target) {
2038
+ function setDevtoolsHook$1(hook, target) {
2039
2039
  var _a, _b;
2040
- exports.devtools = hook;
2041
- if (exports.devtools) {
2042
- exports.devtools.enabled = true;
2043
- buffer.forEach(({ event, args }) => exports.devtools.emit(event, ...args));
2040
+ devtools$1 = hook;
2041
+ if (devtools$1) {
2042
+ devtools$1.enabled = true;
2043
+ buffer.forEach(({ event, args }) => devtools$1.emit(event, ...args));
2044
2044
  buffer = [];
2045
2045
  } else if (
2046
2046
  // handle late devtools injection - only do this if we are in an actual
@@ -2052,10 +2052,10 @@ var VueRuntimeDOM = (function (exports) {
2052
2052
  ) {
2053
2053
  const replay = target.__VUE_DEVTOOLS_HOOK_REPLAY__ = target.__VUE_DEVTOOLS_HOOK_REPLAY__ || [];
2054
2054
  replay.push((newHook) => {
2055
- setDevtoolsHook(newHook, target);
2055
+ setDevtoolsHook$1(newHook, target);
2056
2056
  });
2057
2057
  setTimeout(() => {
2058
- if (!exports.devtools) {
2058
+ if (!devtools$1) {
2059
2059
  target.__VUE_DEVTOOLS_HOOK_REPLAY__ = null;
2060
2060
  devtoolsNotInstalled = true;
2061
2061
  buffer = [];
@@ -2085,8 +2085,8 @@ var VueRuntimeDOM = (function (exports) {
2085
2085
  "component:removed" /* COMPONENT_REMOVED */
2086
2086
  );
2087
2087
  const devtoolsComponentRemoved = (component) => {
2088
- if (exports.devtools && typeof exports.devtools.cleanupBuffer === "function" && // remove the component if it wasn't buffered
2089
- !exports.devtools.cleanupBuffer(component)) {
2088
+ if (devtools$1 && typeof devtools$1.cleanupBuffer === "function" && // remove the component if it wasn't buffered
2089
+ !devtools$1.cleanupBuffer(component)) {
2090
2090
  _devtoolsComponentRemoved(component);
2091
2091
  }
2092
2092
  };
@@ -2134,7 +2134,7 @@ var VueRuntimeDOM = (function (exports) {
2134
2134
  if (emitsOptions) {
2135
2135
  if (!(event in emitsOptions) && true) {
2136
2136
  if (!propsOptions || !(toHandlerKey(event) in propsOptions)) {
2137
- warn(
2137
+ warn$1(
2138
2138
  `Component emitted event "${event}" but it is neither declared in the emits option nor as an "${toHandlerKey(event)}" prop.`
2139
2139
  );
2140
2140
  }
@@ -2143,7 +2143,7 @@ var VueRuntimeDOM = (function (exports) {
2143
2143
  if (isFunction(validator)) {
2144
2144
  const isValid = validator(...rawArgs);
2145
2145
  if (!isValid) {
2146
- warn(
2146
+ warn$1(
2147
2147
  `Invalid event arguments: event validation failed for event "${event}".`
2148
2148
  );
2149
2149
  }
@@ -2170,11 +2170,13 @@ var VueRuntimeDOM = (function (exports) {
2170
2170
  {
2171
2171
  const lowerCaseEvent = event.toLowerCase();
2172
2172
  if (lowerCaseEvent !== event && props[toHandlerKey(lowerCaseEvent)]) {
2173
- warn(
2173
+ warn$1(
2174
2174
  `Event "${lowerCaseEvent}" is emitted in component ${formatComponentName(
2175
2175
  instance,
2176
2176
  instance.type
2177
- )} but the handler is registered for "${event}". Note that HTML attributes are case-insensitive and you cannot use v-on to listen to camelCase events when using in-DOM templates. You should probably use "${hyphenate(event)}" instead of "${event}".`
2177
+ )} but the handler is registered for "${event}". Note that HTML attributes are case-insensitive and you cannot use v-on to listen to camelCase events when using in-DOM templates. You should probably use "${hyphenate(
2178
+ event
2179
+ )}" instead of "${event}".`
2178
2180
  );
2179
2181
  }
2180
2182
  }
@@ -2338,7 +2340,7 @@ var VueRuntimeDOM = (function (exports) {
2338
2340
  const proxyToUse = withProxy || proxy;
2339
2341
  const thisProxy = setupState.__isScriptSetup ? new Proxy(proxyToUse, {
2340
2342
  get(target, key, receiver) {
2341
- warn(
2343
+ warn$1(
2342
2344
  `Property '${String(
2343
2345
  key
2344
2346
  )}' was accessed via 'this'. Avoid using 'this' in templates.`
@@ -2419,12 +2421,12 @@ var VueRuntimeDOM = (function (exports) {
2419
2421
  }
2420
2422
  }
2421
2423
  if (extraAttrs.length) {
2422
- warn(
2424
+ warn$1(
2423
2425
  `Extraneous non-props attributes (${extraAttrs.join(", ")}) were passed to component but could not be automatically inherited because component renders fragment or text root nodes.`
2424
2426
  );
2425
2427
  }
2426
2428
  if (eventAttrs.length) {
2427
- warn(
2429
+ warn$1(
2428
2430
  `Extraneous non-emits event listeners (${eventAttrs.join(", ")}) were passed to component but could not be automatically inherited because component renders fragment or text root nodes. If the listener is intended to be a component custom event listener only, declare it using the "emits" option.`
2429
2431
  );
2430
2432
  }
@@ -2433,7 +2435,7 @@ var VueRuntimeDOM = (function (exports) {
2433
2435
  }
2434
2436
  if (vnode.dirs) {
2435
2437
  if (!isElementRoot(root)) {
2436
- warn(
2438
+ warn$1(
2437
2439
  `Runtime directive used on component with non-element root node. The directives will not function as intended.`
2438
2440
  );
2439
2441
  }
@@ -2442,7 +2444,7 @@ var VueRuntimeDOM = (function (exports) {
2442
2444
  }
2443
2445
  if (vnode.transition) {
2444
2446
  if (!isElementRoot(root)) {
2445
- warn(
2447
+ warn$1(
2446
2448
  `Component inside <Transition> renders non-element root node that cannot be animated.`
2447
2449
  );
2448
2450
  }
@@ -2617,7 +2619,6 @@ var VueRuntimeDOM = (function (exports) {
2617
2619
  const selfName = getComponentName(
2618
2620
  Component,
2619
2621
  false
2620
- /* do not include inferred name to avoid breaking existing code */
2621
2622
  );
2622
2623
  if (selfName && (selfName === name || selfName === camelize(name) || selfName === capitalize(camelize(name)))) {
2623
2624
  return Component;
@@ -2635,11 +2636,11 @@ var VueRuntimeDOM = (function (exports) {
2635
2636
  if (warnMissing && !res) {
2636
2637
  const extra = type === COMPONENTS ? `
2637
2638
  If this is a native custom element, make sure to exclude it from component resolution via compilerOptions.isCustomElement.` : ``;
2638
- warn(`Failed to resolve ${type.slice(0, -1)}: ${name}${extra}`);
2639
+ warn$1(`Failed to resolve ${type.slice(0, -1)}: ${name}${extra}`);
2639
2640
  }
2640
2641
  return res;
2641
2642
  } else {
2642
- warn(
2643
+ warn$1(
2643
2644
  `resolve${capitalize(type.slice(0, -1))} can only be used in render() or setup().`
2644
2645
  );
2645
2646
  }
@@ -3147,6 +3148,7 @@ If this is a native custom element, make sure to exclude it from component resol
3147
3148
  parentSuspense,
3148
3149
  parentComponent,
3149
3150
  node.parentNode,
3151
+ // eslint-disable-next-line no-restricted-globals
3150
3152
  document.createElement("div"),
3151
3153
  null,
3152
3154
  namespace,
@@ -3154,7 +3156,6 @@ If this is a native custom element, make sure to exclude it from component resol
3154
3156
  optimized,
3155
3157
  rendererInternals,
3156
3158
  true
3157
- /* hydrating */
3158
3159
  );
3159
3160
  const result = hydrateNode(
3160
3161
  node,
@@ -3195,7 +3196,7 @@ If this is a native custom element, make sure to exclude it from component resol
3195
3196
  if (isArray(s)) {
3196
3197
  const singleChild = filterSingleRoot(s);
3197
3198
  if (!singleChild && s.filter((child) => child !== NULL_DYNAMIC_COMPONENT).length > 0) {
3198
- warn(`<Suspense> slots expect a single root node.`);
3199
+ warn$1(`<Suspense> slots expect a single root node.`);
3199
3200
  }
3200
3201
  s = singleChild;
3201
3202
  }
@@ -3250,13 +3251,20 @@ If this is a native custom element, make sure to exclude it from component resol
3250
3251
  const INITIAL_WATCHER_VALUE = {};
3251
3252
  function watch(source, cb, options) {
3252
3253
  if (!isFunction(cb)) {
3253
- warn(
3254
+ warn$1(
3254
3255
  `\`watch(fn, options?)\` signature has been moved to a separate API. Use \`watchEffect(fn, options?)\` instead. \`watch\` now only supports \`watch(source, cb, options?) signature.`
3255
3256
  );
3256
3257
  }
3257
3258
  return doWatch(source, cb, options);
3258
3259
  }
3259
- function doWatch(source, cb, { immediate, deep, flush, once, onTrack, onTrigger } = EMPTY_OBJ) {
3260
+ function doWatch(source, cb, {
3261
+ immediate,
3262
+ deep,
3263
+ flush,
3264
+ once,
3265
+ onTrack,
3266
+ onTrigger
3267
+ } = EMPTY_OBJ) {
3260
3268
  var _a;
3261
3269
  if (cb && once) {
3262
3270
  const _cb = cb;
@@ -3267,23 +3275,23 @@ If this is a native custom element, make sure to exclude it from component resol
3267
3275
  }
3268
3276
  if (!cb) {
3269
3277
  if (immediate !== void 0) {
3270
- warn(
3278
+ warn$1(
3271
3279
  `watch() "immediate" option is only respected when using the watch(source, callback, options?) signature.`
3272
3280
  );
3273
3281
  }
3274
3282
  if (deep !== void 0) {
3275
- warn(
3283
+ warn$1(
3276
3284
  `watch() "deep" option is only respected when using the watch(source, callback, options?) signature.`
3277
3285
  );
3278
3286
  }
3279
3287
  if (once !== void 0) {
3280
- warn(
3288
+ warn$1(
3281
3289
  `watch() "once" option is only respected when using the watch(source, callback, options?) signature.`
3282
3290
  );
3283
3291
  }
3284
3292
  }
3285
3293
  const warnInvalidSource = (s) => {
3286
- warn(
3294
+ warn$1(
3287
3295
  `Invalid watch source: `,
3288
3296
  s,
3289
3297
  `A watch source can only be a getter/effect function, a ref, a reactive object, or an array of these types.`
@@ -3468,13 +3476,13 @@ If this is a native custom element, make sure to exclude it from component resol
3468
3476
 
3469
3477
  function validateDirectiveName(name) {
3470
3478
  if (isBuiltInDirective(name)) {
3471
- warn("Do not use built-in directive ids as custom directive id: " + name);
3479
+ warn$1("Do not use built-in directive ids as custom directive id: " + name);
3472
3480
  }
3473
3481
  }
3474
3482
  function withDirectives(vnode, directives) {
3475
3483
  const internalInstance = currentRenderingInstance;
3476
3484
  if (internalInstance === null) {
3477
- warn(`withDirectives can only be used inside render functions.`);
3485
+ warn$1(`withDirectives can only be used inside render functions.`);
3478
3486
  return vnode;
3479
3487
  }
3480
3488
  const instance = getExposeProxy(internalInstance) || internalInstance.proxy;
@@ -3581,7 +3589,7 @@ If this is a native custom element, make sure to exclude it from component resol
3581
3589
  for (const c of children) {
3582
3590
  if (c.type !== Comment) {
3583
3591
  if (hasFound) {
3584
- warn(
3592
+ warn$1(
3585
3593
  "<transition> can only be used on a single element or component. Use <transition-group> for lists."
3586
3594
  );
3587
3595
  break;
@@ -3594,7 +3602,7 @@ If this is a native custom element, make sure to exclude it from component resol
3594
3602
  const rawProps = toRaw(props);
3595
3603
  const { mode } = rawProps;
3596
3604
  if (mode && mode !== "in-out" && mode !== "out-in" && mode !== "default") {
3597
- warn(`invalid <transition> mode: ${mode}`);
3605
+ warn$1(`invalid <transition> mode: ${mode}`);
3598
3606
  }
3599
3607
  if (state.isLeaving) {
3600
3608
  return emptyPlaceholder(child);
@@ -3909,7 +3917,7 @@ If this is a native custom element, make sure to exclude it from component resol
3909
3917
  return pendingRequest;
3910
3918
  }
3911
3919
  if (!comp) {
3912
- warn(
3920
+ warn$1(
3913
3921
  `Async component loader resolved to undefined. If you are using retry(), make sure to return its return value.`
3914
3922
  );
3915
3923
  }
@@ -3941,7 +3949,6 @@ If this is a native custom element, make sure to exclude it from component resol
3941
3949
  instance,
3942
3950
  13,
3943
3951
  !errorComponent
3944
- /* do not throw in dev if user provided error component */
3945
3952
  );
3946
3953
  };
3947
3954
  if (suspensible && instance.suspense || false) {
@@ -4143,7 +4150,7 @@ If this is a native custom element, make sure to exclude it from component resol
4143
4150
  const rawVNode = children[0];
4144
4151
  if (children.length > 1) {
4145
4152
  {
4146
- warn(`KeepAlive should contain exactly one component child.`);
4153
+ warn$1(`KeepAlive should contain exactly one component child.`);
4147
4154
  }
4148
4155
  current = null;
4149
4156
  return children;
@@ -4272,7 +4279,7 @@ If this is a native custom element, make sure to exclude it from component resol
4272
4279
  return wrappedHook;
4273
4280
  } else {
4274
4281
  const apiName = toHandlerKey(ErrorTypeStrings$1[type].replace(/ hook$/, ""));
4275
- warn(
4282
+ warn$1(
4276
4283
  `${apiName} is called when there is no active component instance to be associated with. Lifecycle injection APIs can only be used during execution of setup().` + (` If you are using async setup(), make sure to register lifecycle hooks before the first await statement.` )
4277
4284
  );
4278
4285
  }
@@ -4308,7 +4315,7 @@ If this is a native custom element, make sure to exclude it from component resol
4308
4315
  }
4309
4316
  } else if (typeof source === "number") {
4310
4317
  if (!Number.isInteger(source)) {
4311
- warn(`The v-for range expect an integer value but got ${source}.`);
4318
+ warn$1(`The v-for range expect an integer value but got ${source}.`);
4312
4319
  }
4313
4320
  ret = new Array(source);
4314
4321
  for (let i = 0; i < source; i++) {
@@ -4364,7 +4371,7 @@ If this is a native custom element, make sure to exclude it from component resol
4364
4371
  }
4365
4372
  let slot = slots[name];
4366
4373
  if (slot && slot.length > 1) {
4367
- warn(
4374
+ warn$1(
4368
4375
  `SSR-optimized slot function detected in a non-SSR-optimized render function. You need to mark this component with $dynamic-slots in the parent template.`
4369
4376
  );
4370
4377
  slot = () => [];
@@ -4407,7 +4414,7 @@ If this is a native custom element, make sure to exclude it from component resol
4407
4414
  function toHandlers(obj, preserveCaseIfNecessary) {
4408
4415
  const ret = {};
4409
4416
  if (!isObject(obj)) {
4410
- warn(`v-on with no argument expects an object value.`);
4417
+ warn$1(`v-on with no argument expects an object value.`);
4411
4418
  return ret;
4412
4419
  }
4413
4420
  for (const key in obj) {
@@ -4517,13 +4524,13 @@ If this is a native custom element, make sure to exclude it from component resol
4517
4524
  // to infinite warning loop
4518
4525
  key.indexOf("__v") !== 0)) {
4519
4526
  if (data !== EMPTY_OBJ && isReservedPrefix(key[0]) && hasOwn(data, key)) {
4520
- warn(
4527
+ warn$1(
4521
4528
  `Property ${JSON.stringify(
4522
4529
  key
4523
4530
  )} must be accessed via $data because it starts with a reserved character ("$" or "_") and is not proxied on the render context.`
4524
4531
  );
4525
4532
  } else if (instance === currentRenderingInstance) {
4526
- warn(
4533
+ warn$1(
4527
4534
  `Property ${JSON.stringify(key)} was accessed during render but is not defined on instance.`
4528
4535
  );
4529
4536
  }
@@ -4535,17 +4542,17 @@ If this is a native custom element, make sure to exclude it from component resol
4535
4542
  setupState[key] = value;
4536
4543
  return true;
4537
4544
  } else if (setupState.__isScriptSetup && hasOwn(setupState, key)) {
4538
- warn(`Cannot mutate <script setup> binding "${key}" from Options API.`);
4545
+ warn$1(`Cannot mutate <script setup> binding "${key}" from Options API.`);
4539
4546
  return false;
4540
4547
  } else if (data !== EMPTY_OBJ && hasOwn(data, key)) {
4541
4548
  data[key] = value;
4542
4549
  return true;
4543
4550
  } else if (hasOwn(instance.props, key)) {
4544
- warn(`Attempting to mutate prop "${key}". Props are readonly.`);
4551
+ warn$1(`Attempting to mutate prop "${key}". Props are readonly.`);
4545
4552
  return false;
4546
4553
  }
4547
4554
  if (key[0] === "$" && key.slice(1) in instance) {
4548
- warn(
4555
+ warn$1(
4549
4556
  `Attempting to mutate public property "${key}". Properties starting with $ are reserved and readonly.`
4550
4557
  );
4551
4558
  return false;
@@ -4579,7 +4586,7 @@ If this is a native custom element, make sure to exclude it from component resol
4579
4586
  };
4580
4587
  {
4581
4588
  PublicInstanceProxyHandlers.ownKeys = (target) => {
4582
- warn(
4589
+ warn$1(
4583
4590
  `Avoid app logic that relies on enumerating keys on a component instance. The keys will be empty in production mode to avoid performance overhead.`
4584
4591
  );
4585
4592
  return Reflect.ownKeys(target);
@@ -4598,7 +4605,7 @@ If this is a native custom element, make sure to exclude it from component resol
4598
4605
  has(_, key) {
4599
4606
  const has = key[0] !== "_" && !isGloballyAllowed(key);
4600
4607
  if (!has && PublicInstanceProxyHandlers.has(_, key)) {
4601
- warn(
4608
+ warn$1(
4602
4609
  `Property ${JSON.stringify(
4603
4610
  key
4604
4611
  )} should not start with _ which is a reserved prefix for Vue internals.`
@@ -4648,7 +4655,7 @@ If this is a native custom element, make sure to exclude it from component resol
4648
4655
  Object.keys(toRaw(setupState)).forEach((key) => {
4649
4656
  if (!setupState.__isScriptSetup) {
4650
4657
  if (isReservedPrefix(key[0])) {
4651
- warn(
4658
+ warn$1(
4652
4659
  `setup() return property ${JSON.stringify(
4653
4660
  key
4654
4661
  )} should not start with "$" or "_" which are reserved prefixes for Vue internals.`
@@ -4665,7 +4672,7 @@ If this is a native custom element, make sure to exclude it from component resol
4665
4672
  });
4666
4673
  }
4667
4674
 
4668
- const warnRuntimeUsage = (method) => warn(
4675
+ const warnRuntimeUsage = (method) => warn$1(
4669
4676
  `${method}() is a compiler-hint helper that is only usable inside <script setup> of a single file component. Its arguments should be compiled away and passing it at runtime has no effect.`
4670
4677
  );
4671
4678
  function defineProps() {
@@ -4713,17 +4720,17 @@ If this is a native custom element, make sure to exclude it from component resol
4713
4720
  function useAttrs() {
4714
4721
  return getContext().attrs;
4715
4722
  }
4716
- function useModel(props, name) {
4723
+ function useModel(props, name, options = EMPTY_OBJ) {
4717
4724
  const i = getCurrentInstance();
4718
4725
  if (!i) {
4719
- warn(`useModel() called without active instance.`);
4726
+ warn$1(`useModel() called without active instance.`);
4720
4727
  return ref();
4721
4728
  }
4722
4729
  if (!i.propsOptions[0][name]) {
4723
- warn(`useModel() called with prop "${name}" which is not declared.`);
4730
+ warn$1(`useModel() called with prop "${name}" which is not declared.`);
4724
4731
  return ref();
4725
4732
  }
4726
- return customRef((track, trigger) => {
4733
+ const res = customRef((track, trigger) => {
4727
4734
  let localValue;
4728
4735
  watchSyncEffect(() => {
4729
4736
  const propValue = props[name];
@@ -4735,7 +4742,7 @@ If this is a native custom element, make sure to exclude it from component resol
4735
4742
  return {
4736
4743
  get() {
4737
4744
  track();
4738
- return localValue;
4745
+ return options.get ? options.get(localValue) : localValue;
4739
4746
  },
4740
4747
  set(value) {
4741
4748
  const rawProps = i.vnode.props;
@@ -4743,15 +4750,29 @@ If this is a native custom element, make sure to exclude it from component resol
4743
4750
  localValue = value;
4744
4751
  trigger();
4745
4752
  }
4746
- i.emit(`update:${name}`, value);
4753
+ i.emit(`update:${name}`, options.set ? options.set(value) : value);
4747
4754
  }
4748
4755
  };
4749
4756
  });
4757
+ const modifierKey = name === "modelValue" ? "modelModifiers" : `${name}Modifiers`;
4758
+ res[Symbol.iterator] = () => {
4759
+ let i2 = 0;
4760
+ return {
4761
+ next() {
4762
+ if (i2 < 2) {
4763
+ return { value: i2++ ? props[modifierKey] : res, done: false };
4764
+ } else {
4765
+ return { done: true };
4766
+ }
4767
+ }
4768
+ };
4769
+ };
4770
+ return res;
4750
4771
  }
4751
4772
  function getContext() {
4752
4773
  const i = getCurrentInstance();
4753
4774
  if (!i) {
4754
- warn(`useContext() called without active instance.`);
4775
+ warn$1(`useContext() called without active instance.`);
4755
4776
  }
4756
4777
  return i.setupContext || (i.setupContext = createSetupContext(i));
4757
4778
  }
@@ -4776,7 +4797,7 @@ If this is a native custom element, make sure to exclude it from component resol
4776
4797
  } else if (opt === null) {
4777
4798
  opt = props[key] = { default: defaults[key] };
4778
4799
  } else {
4779
- warn(`props default key "${key}" has no corresponding declaration.`);
4800
+ warn$1(`props default key "${key}" has no corresponding declaration.`);
4780
4801
  }
4781
4802
  if (opt && defaults[`__skip_${key}`]) {
4782
4803
  opt.skipFactory = true;
@@ -4806,7 +4827,7 @@ If this is a native custom element, make sure to exclude it from component resol
4806
4827
  function withAsyncContext(getAwaitable) {
4807
4828
  const ctx = getCurrentInstance();
4808
4829
  if (!ctx) {
4809
- warn(
4830
+ warn$1(
4810
4831
  `withAsyncContext called without active current instance. This is likely a bug.`
4811
4832
  );
4812
4833
  }
@@ -4825,7 +4846,7 @@ If this is a native custom element, make sure to exclude it from component resol
4825
4846
  const cache = /* @__PURE__ */ Object.create(null);
4826
4847
  return (type, key) => {
4827
4848
  if (cache[key]) {
4828
- warn(`${type} property "${key}" is already defined in ${cache[key]}.`);
4849
+ warn$1(`${type} property "${key}" is already defined in ${cache[key]}.`);
4829
4850
  } else {
4830
4851
  cache[key] = type;
4831
4852
  }
@@ -4901,7 +4922,7 @@ If this is a native custom element, make sure to exclude it from component resol
4901
4922
  checkDuplicateProperties("Methods" /* METHODS */, key);
4902
4923
  }
4903
4924
  } else {
4904
- warn(
4925
+ warn$1(
4905
4926
  `Method "${key}" has type "${typeof methodHandler}" in the component definition. Did you reference the function correctly?`
4906
4927
  );
4907
4928
  }
@@ -4909,18 +4930,18 @@ If this is a native custom element, make sure to exclude it from component resol
4909
4930
  }
4910
4931
  if (dataOptions) {
4911
4932
  if (!isFunction(dataOptions)) {
4912
- warn(
4933
+ warn$1(
4913
4934
  `The data option must be a function. Plain object usage is no longer supported.`
4914
4935
  );
4915
4936
  }
4916
4937
  const data = dataOptions.call(publicThis, publicThis);
4917
4938
  if (isPromise(data)) {
4918
- warn(
4939
+ warn$1(
4919
4940
  `data() returned a Promise - note data() cannot be async; If you intend to perform data fetching before component renders, use async setup() + <Suspense>.`
4920
4941
  );
4921
4942
  }
4922
4943
  if (!isObject(data)) {
4923
- warn(`data() should return an object.`);
4944
+ warn$1(`data() should return an object.`);
4924
4945
  } else {
4925
4946
  instance.data = reactive(data);
4926
4947
  {
@@ -4944,10 +4965,10 @@ If this is a native custom element, make sure to exclude it from component resol
4944
4965
  const opt = computedOptions[key];
4945
4966
  const get = isFunction(opt) ? opt.bind(publicThis, publicThis) : isFunction(opt.get) ? opt.get.bind(publicThis, publicThis) : NOOP;
4946
4967
  if (get === NOOP) {
4947
- warn(`Computed property "${key}" has no getter.`);
4968
+ warn$1(`Computed property "${key}" has no getter.`);
4948
4969
  }
4949
4970
  const set = !isFunction(opt) && isFunction(opt.set) ? opt.set.bind(publicThis) : () => {
4950
- warn(
4971
+ warn$1(
4951
4972
  `Write operation failed: computed property "${key}" is readonly.`
4952
4973
  );
4953
4974
  } ;
@@ -5036,7 +5057,6 @@ If this is a native custom element, make sure to exclude it from component resol
5036
5057
  opt.from || key,
5037
5058
  opt.default,
5038
5059
  true
5039
- /* treat default function as factory */
5040
5060
  );
5041
5061
  } else {
5042
5062
  injected = inject(opt.from || key);
@@ -5073,7 +5093,7 @@ If this is a native custom element, make sure to exclude it from component resol
5073
5093
  if (isFunction(handler)) {
5074
5094
  watch(getter, handler);
5075
5095
  } else {
5076
- warn(`Invalid watch handler specified by key "${raw}"`, handler);
5096
+ warn$1(`Invalid watch handler specified by key "${raw}"`, handler);
5077
5097
  }
5078
5098
  } else if (isFunction(raw)) {
5079
5099
  watch(getter, raw.bind(publicThis));
@@ -5085,11 +5105,11 @@ If this is a native custom element, make sure to exclude it from component resol
5085
5105
  if (isFunction(handler)) {
5086
5106
  watch(getter, handler, raw);
5087
5107
  } else {
5088
- warn(`Invalid watch handler specified by key "${raw.handler}"`, handler);
5108
+ warn$1(`Invalid watch handler specified by key "${raw.handler}"`, handler);
5089
5109
  }
5090
5110
  }
5091
5111
  } else {
5092
- warn(`Invalid watch option: "${key}"`, raw);
5112
+ warn$1(`Invalid watch option: "${key}"`, raw);
5093
5113
  }
5094
5114
  }
5095
5115
  function resolveMergedOptions(instance) {
@@ -5134,7 +5154,7 @@ If this is a native custom element, make sure to exclude it from component resol
5134
5154
  }
5135
5155
  for (const key in from) {
5136
5156
  if (asMixin && key === "expose") {
5137
- warn(
5157
+ warn$1(
5138
5158
  `"expose" option is ignored when declared in mixins or extends. It should only be declared in the base component itself.`
5139
5159
  );
5140
5160
  } else {
@@ -5262,7 +5282,7 @@ If this is a native custom element, make sure to exclude it from component resol
5262
5282
  rootComponent = extend({}, rootComponent);
5263
5283
  }
5264
5284
  if (rootProps != null && !isObject(rootProps)) {
5265
- warn(`root props passed to app.mount() must be an object.`);
5285
+ warn$1(`root props passed to app.mount() must be an object.`);
5266
5286
  rootProps = null;
5267
5287
  }
5268
5288
  const context = createAppContext();
@@ -5281,14 +5301,14 @@ If this is a native custom element, make sure to exclude it from component resol
5281
5301
  },
5282
5302
  set config(v) {
5283
5303
  {
5284
- warn(
5304
+ warn$1(
5285
5305
  `app.config cannot be replaced. Modify individual options instead.`
5286
5306
  );
5287
5307
  }
5288
5308
  },
5289
5309
  use(plugin, ...options) {
5290
5310
  if (installedPlugins.has(plugin)) {
5291
- warn(`Plugin has already been applied to target app.`);
5311
+ warn$1(`Plugin has already been applied to target app.`);
5292
5312
  } else if (plugin && isFunction(plugin.install)) {
5293
5313
  installedPlugins.add(plugin);
5294
5314
  plugin.install(app, ...options);
@@ -5296,7 +5316,7 @@ If this is a native custom element, make sure to exclude it from component resol
5296
5316
  installedPlugins.add(plugin);
5297
5317
  plugin(app, ...options);
5298
5318
  } else {
5299
- warn(
5319
+ warn$1(
5300
5320
  `A plugin must either be a function or an object with an "install" function.`
5301
5321
  );
5302
5322
  }
@@ -5307,7 +5327,7 @@ If this is a native custom element, make sure to exclude it from component resol
5307
5327
  if (!context.mixins.includes(mixin)) {
5308
5328
  context.mixins.push(mixin);
5309
5329
  } else {
5310
- warn(
5330
+ warn$1(
5311
5331
  "Mixin has already been applied to target app" + (mixin.name ? `: ${mixin.name}` : "")
5312
5332
  );
5313
5333
  }
@@ -5322,7 +5342,7 @@ If this is a native custom element, make sure to exclude it from component resol
5322
5342
  return context.components[name];
5323
5343
  }
5324
5344
  if (context.components[name]) {
5325
- warn(`Component "${name}" has already been registered in target app.`);
5345
+ warn$1(`Component "${name}" has already been registered in target app.`);
5326
5346
  }
5327
5347
  context.components[name] = component;
5328
5348
  return app;
@@ -5335,7 +5355,7 @@ If this is a native custom element, make sure to exclude it from component resol
5335
5355
  return context.directives[name];
5336
5356
  }
5337
5357
  if (context.directives[name]) {
5338
- warn(`Directive "${name}" has already been registered in target app.`);
5358
+ warn$1(`Directive "${name}" has already been registered in target app.`);
5339
5359
  }
5340
5360
  context.directives[name] = directive;
5341
5361
  return app;
@@ -5343,7 +5363,7 @@ If this is a native custom element, make sure to exclude it from component resol
5343
5363
  mount(rootContainer, isHydrate, namespace) {
5344
5364
  if (!isMounted) {
5345
5365
  if (rootContainer.__vue_app__) {
5346
- warn(
5366
+ warn$1(
5347
5367
  `There is already an app instance mounted on the host container.
5348
5368
  If you want to mount another app on the same host container, you need to unmount the previous app by calling \`app.unmount()\` first.`
5349
5369
  );
@@ -5378,7 +5398,7 @@ If this is a native custom element, make sure to exclude it from component resol
5378
5398
  }
5379
5399
  return getExposeProxy(vnode.component) || vnode.component.proxy;
5380
5400
  } else {
5381
- warn(
5401
+ warn$1(
5382
5402
  `App has already been mounted.
5383
5403
  If you want to remount the same app, move your app creation logic into a factory function and create fresh app instances for each mount - e.g. \`const createMyApp = () => createApp(App)\``
5384
5404
  );
@@ -5393,12 +5413,12 @@ If you want to remount the same app, move your app creation logic into a factory
5393
5413
  }
5394
5414
  delete app._container.__vue_app__;
5395
5415
  } else {
5396
- warn(`Cannot unmount an app that is not mounted.`);
5416
+ warn$1(`Cannot unmount an app that is not mounted.`);
5397
5417
  }
5398
5418
  },
5399
5419
  provide(key, value) {
5400
5420
  if (key in context.provides) {
5401
- warn(
5421
+ warn$1(
5402
5422
  `App already provides property with key "${String(key)}". It will be overwritten with the new value.`
5403
5423
  );
5404
5424
  }
@@ -5422,7 +5442,7 @@ If you want to remount the same app, move your app creation logic into a factory
5422
5442
  function provide(key, value) {
5423
5443
  if (!currentInstance) {
5424
5444
  {
5425
- warn(`provide() can only be used inside setup().`);
5445
+ warn$1(`provide() can only be used inside setup().`);
5426
5446
  }
5427
5447
  } else {
5428
5448
  let provides = currentInstance.provides;
@@ -5442,10 +5462,10 @@ If you want to remount the same app, move your app creation logic into a factory
5442
5462
  } else if (arguments.length > 1) {
5443
5463
  return treatDefaultAsFactory && isFunction(defaultValue) ? defaultValue.call(instance && instance.proxy) : defaultValue;
5444
5464
  } else {
5445
- warn(`injection "${String(key)}" not found.`);
5465
+ warn$1(`injection "${String(key)}" not found.`);
5446
5466
  }
5447
5467
  } else {
5448
- warn(`inject() can only be used inside setup() or functional components.`);
5468
+ warn$1(`inject() can only be used inside setup() or functional components.`);
5449
5469
  }
5450
5470
  }
5451
5471
  function hasInjectionContext() {
@@ -5522,7 +5542,6 @@ If you want to remount the same app, move your app creation logic into a factory
5522
5542
  value,
5523
5543
  instance,
5524
5544
  false
5525
- /* isAbsent */
5526
5545
  );
5527
5546
  }
5528
5547
  } else {
@@ -5554,7 +5573,6 @@ If you want to remount the same app, move your app creation logic into a factory
5554
5573
  void 0,
5555
5574
  instance,
5556
5575
  true
5557
- /* isAbsent */
5558
5576
  );
5559
5577
  }
5560
5578
  } else {
@@ -5689,7 +5707,7 @@ If you want to remount the same app, move your app creation logic into a factory
5689
5707
  if (isArray(raw)) {
5690
5708
  for (let i = 0; i < raw.length; i++) {
5691
5709
  if (!isString(raw[i])) {
5692
- warn(`props must be strings when using array syntax.`, raw[i]);
5710
+ warn$1(`props must be strings when using array syntax.`, raw[i]);
5693
5711
  }
5694
5712
  const normalizedKey = camelize(raw[i]);
5695
5713
  if (validatePropName(normalizedKey)) {
@@ -5698,7 +5716,7 @@ If you want to remount the same app, move your app creation logic into a factory
5698
5716
  }
5699
5717
  } else if (raw) {
5700
5718
  if (!isObject(raw)) {
5701
- warn(`invalid props options`, raw);
5719
+ warn$1(`invalid props options`, raw);
5702
5720
  }
5703
5721
  for (const key in raw) {
5704
5722
  const normalizedKey = camelize(key);
@@ -5727,7 +5745,7 @@ If you want to remount the same app, move your app creation logic into a factory
5727
5745
  if (key[0] !== "$") {
5728
5746
  return true;
5729
5747
  } else {
5730
- warn(`Invalid prop name: "${key}" is a reserved property.`);
5748
+ warn$1(`Invalid prop name: "${key}" is a reserved property.`);
5731
5749
  }
5732
5750
  return false;
5733
5751
  }
@@ -5765,7 +5783,7 @@ If you want to remount the same app, move your app creation logic into a factory
5765
5783
  function validateProp(name, value, prop, props, isAbsent) {
5766
5784
  const { type, required, validator, skipCheck } = prop;
5767
5785
  if (required && isAbsent) {
5768
- warn('Missing required prop: "' + name + '"');
5786
+ warn$1('Missing required prop: "' + name + '"');
5769
5787
  return;
5770
5788
  }
5771
5789
  if (value == null && !required) {
@@ -5781,12 +5799,12 @@ If you want to remount the same app, move your app creation logic into a factory
5781
5799
  isValid = valid;
5782
5800
  }
5783
5801
  if (!isValid) {
5784
- warn(getInvalidTypeMessage(name, value, expectedTypes));
5802
+ warn$1(getInvalidTypeMessage(name, value, expectedTypes));
5785
5803
  return;
5786
5804
  }
5787
5805
  }
5788
5806
  if (validator && !validator(value, props)) {
5789
- warn('Invalid prop: custom validator check failed for prop "' + name + '".');
5807
+ warn$1('Invalid prop: custom validator check failed for prop "' + name + '".');
5790
5808
  }
5791
5809
  }
5792
5810
  const isSimpleType = /* @__PURE__ */ makeMap(
@@ -5858,7 +5876,7 @@ If you want to remount the same app, move your app creation logic into a factory
5858
5876
  }
5859
5877
  const normalized = withCtx((...args) => {
5860
5878
  if (currentInstance) {
5861
- warn(
5879
+ warn$1(
5862
5880
  `Slot "${key}" invoked outside of the render function: this will not track dependencies used in the slot. Invoke the slot function inside the render function instead.`
5863
5881
  );
5864
5882
  }
@@ -5877,7 +5895,7 @@ If you want to remount the same app, move your app creation logic into a factory
5877
5895
  slots[key] = normalizeSlot(key, value, ctx);
5878
5896
  } else if (value != null) {
5879
5897
  {
5880
- warn(
5898
+ warn$1(
5881
5899
  `Non-function value encountered for slot "${key}". Prefer function slots for better performance.`
5882
5900
  );
5883
5901
  }
@@ -5888,7 +5906,7 @@ If you want to remount the same app, move your app creation logic into a factory
5888
5906
  };
5889
5907
  const normalizeVNodeSlots = (instance, children) => {
5890
5908
  if (!isKeepAlive(instance.vnode) && true) {
5891
- warn(
5909
+ warn$1(
5892
5910
  `Non-function value encountered for default slot. Prefer function slots for better performance.`
5893
5911
  );
5894
5912
  }
@@ -5970,7 +5988,7 @@ If you want to remount the same app, move your app creation logic into a factory
5970
5988
  const value = isUnmount ? null : refValue;
5971
5989
  const { i: owner, r: ref } = rawRef;
5972
5990
  if (!owner) {
5973
- warn(
5991
+ warn$1(
5974
5992
  `Missing ref owner context. ref cannot be used on hoisted vnodes. A vnode with ref must be created inside the render function.`
5975
5993
  );
5976
5994
  return;
@@ -6025,7 +6043,7 @@ If you want to remount the same app, move your app creation logic into a factory
6025
6043
  if (rawRef.k)
6026
6044
  refs[rawRef.k] = value;
6027
6045
  } else {
6028
- warn("Invalid template ref type:", ref, `(${typeof ref})`);
6046
+ warn$1("Invalid template ref type:", ref, `(${typeof ref})`);
6029
6047
  }
6030
6048
  };
6031
6049
  if (value) {
@@ -6035,7 +6053,7 @@ If you want to remount the same app, move your app creation logic into a factory
6035
6053
  doSet();
6036
6054
  }
6037
6055
  } else {
6038
- warn("Invalid template ref type:", ref, `(${typeof ref})`);
6056
+ warn$1("Invalid template ref type:", ref, `(${typeof ref})`);
6039
6057
  }
6040
6058
  }
6041
6059
  }
@@ -6067,7 +6085,7 @@ If you want to remount the same app, move your app creation logic into a factory
6067
6085
  } = rendererInternals;
6068
6086
  const hydrate = (vnode, container) => {
6069
6087
  if (!container.hasChildNodes()) {
6070
- warn(
6088
+ warn$1(
6071
6089
  `Attempting to hydrate existing markup but container is empty. Performing full mount instead.`
6072
6090
  );
6073
6091
  patch(null, vnode, container);
@@ -6127,7 +6145,7 @@ If you want to remount the same app, move your app creation logic into a factory
6127
6145
  } else {
6128
6146
  if (node.data !== vnode.children) {
6129
6147
  hasMismatch = true;
6130
- warn(
6148
+ warn$1(
6131
6149
  `Hydration text mismatch in`,
6132
6150
  node.parentNode,
6133
6151
  `
@@ -6262,7 +6280,7 @@ If you want to remount the same app, move your app creation logic into a factory
6262
6280
  hydrateNode
6263
6281
  );
6264
6282
  } else {
6265
- warn("Invalid HostVNode type:", type, `(${typeof type})`);
6283
+ warn$1("Invalid HostVNode type:", type, `(${typeof type})`);
6266
6284
  }
6267
6285
  }
6268
6286
  if (ref != null) {
@@ -6303,7 +6321,7 @@ If you want to remount the same app, move your app creation logic into a factory
6303
6321
  while (next) {
6304
6322
  hasMismatch = true;
6305
6323
  if (!hasWarned) {
6306
- warn(
6324
+ warn$1(
6307
6325
  `Hydration children mismatch on`,
6308
6326
  el,
6309
6327
  `
@@ -6318,7 +6336,7 @@ Server rendered element contains more child nodes than client vdom.`
6318
6336
  } else if (shapeFlag & 8) {
6319
6337
  if (el.textContent !== vnode.children) {
6320
6338
  hasMismatch = true;
6321
- warn(
6339
+ warn$1(
6322
6340
  `Hydration text content mismatch on`,
6323
6341
  el,
6324
6342
  `
@@ -6387,7 +6405,7 @@ Server rendered element contains more child nodes than client vdom.`
6387
6405
  } else {
6388
6406
  hasMismatch = true;
6389
6407
  if (!hasWarned) {
6390
- warn(
6408
+ warn$1(
6391
6409
  `Hydration children mismatch on`,
6392
6410
  container,
6393
6411
  `
@@ -6434,7 +6452,7 @@ Server rendered element contains fewer child nodes than client vdom.`
6434
6452
  };
6435
6453
  const handleMismatch = (node, vnode, parentComponent, parentSuspense, slotScopeIds, isFragment) => {
6436
6454
  hasMismatch = true;
6437
- warn(
6455
+ warn$1(
6438
6456
  `Hydration node mismatch:
6439
6457
  - rendered on server:`,
6440
6458
  node,
@@ -6533,7 +6551,7 @@ Server rendered element contains fewer child nodes than client vdom.`
6533
6551
  }
6534
6552
  if (mismatchType) {
6535
6553
  const format = (v) => v === false ? `(not rendered)` : `${mismatchKey}="${v}"`;
6536
- warn(
6554
+ warn$1(
6537
6555
  `Hydration ${mismatchType} mismatch on`,
6538
6556
  el,
6539
6557
  `
@@ -6612,7 +6630,7 @@ Server rendered element contains fewer child nodes than client vdom.`
6612
6630
  const target = getGlobalThis();
6613
6631
  target.__VUE__ = true;
6614
6632
  {
6615
- setDevtoolsHook(target.__VUE_DEVTOOLS_GLOBAL_HOOK__, target);
6633
+ setDevtoolsHook$1(target.__VUE_DEVTOOLS_GLOBAL_HOOK__, target);
6616
6634
  }
6617
6635
  const {
6618
6636
  insert: hostInsert,
@@ -6721,7 +6739,7 @@ Server rendered element contains fewer child nodes than client vdom.`
6721
6739
  internals
6722
6740
  );
6723
6741
  } else {
6724
- warn("Invalid VNode type:", type, `(${typeof type})`);
6742
+ warn$1("Invalid VNode type:", type, `(${typeof type})`);
6725
6743
  }
6726
6744
  }
6727
6745
  if (ref != null && parentComponent) {
@@ -7690,7 +7708,7 @@ Server rendered element contains fewer child nodes than client vdom.`
7690
7708
  const nextChild = c2[i] = optimized ? cloneIfMounted(c2[i]) : normalizeVNode(c2[i]);
7691
7709
  if (nextChild.key != null) {
7692
7710
  if (keyToNewIndexMap.has(nextChild.key)) {
7693
- warn(
7711
+ warn$1(
7694
7712
  `Duplicate keys found during update:`,
7695
7713
  JSON.stringify(nextChild.key),
7696
7714
  `Make sure keys are unique.`
@@ -8119,14 +8137,14 @@ Server rendered element contains fewer child nodes than client vdom.`
8119
8137
  const targetSelector = props && props.to;
8120
8138
  if (isString(targetSelector)) {
8121
8139
  if (!select) {
8122
- warn(
8140
+ warn$1(
8123
8141
  `Current renderer does not support string target for Teleports. (missing querySelector renderer option)`
8124
8142
  );
8125
8143
  return null;
8126
8144
  } else {
8127
8145
  const target = select(targetSelector);
8128
8146
  if (!target) {
8129
- warn(
8147
+ warn$1(
8130
8148
  `Failed to locate Teleport target with selector "${targetSelector}". Note the target element must exist before the component is mounted - i.e. the target cannot be rendered by the component itself, and ideally should be outside of the entire Vue component tree.`
8131
8149
  );
8132
8150
  }
@@ -8134,7 +8152,7 @@ Server rendered element contains fewer child nodes than client vdom.`
8134
8152
  }
8135
8153
  } else {
8136
8154
  if (!targetSelector && !isTeleportDisabled(props)) {
8137
- warn(`Invalid Teleport target: ${targetSelector}`);
8155
+ warn$1(`Invalid Teleport target: ${targetSelector}`);
8138
8156
  }
8139
8157
  return targetSelector;
8140
8158
  }
@@ -8170,7 +8188,7 @@ Server rendered element contains fewer child nodes than client vdom.`
8170
8188
  namespace = "mathml";
8171
8189
  }
8172
8190
  } else if (!disabled) {
8173
- warn("Invalid Teleport target on mount:", target, `(${typeof target})`);
8191
+ warn$1("Invalid Teleport target on mount:", target, `(${typeof target})`);
8174
8192
  }
8175
8193
  const mount = (container2, anchor2) => {
8176
8194
  if (shapeFlag & 16) {
@@ -8257,7 +8275,7 @@ Server rendered element contains fewer child nodes than client vdom.`
8257
8275
  0
8258
8276
  );
8259
8277
  } else {
8260
- warn(
8278
+ warn$1(
8261
8279
  "Invalid Teleport target on update:",
8262
8280
  target,
8263
8281
  `(${typeof target})`
@@ -8420,7 +8438,6 @@ Server rendered element contains fewer child nodes than client vdom.`
8420
8438
  dynamicProps,
8421
8439
  shapeFlag,
8422
8440
  true
8423
- /* isBlock */
8424
8441
  )
8425
8442
  );
8426
8443
  }
@@ -8433,7 +8450,6 @@ Server rendered element contains fewer child nodes than client vdom.`
8433
8450
  patchFlag,
8434
8451
  dynamicProps,
8435
8452
  true
8436
- /* isBlock: prevent a block from tracking itself */
8437
8453
  )
8438
8454
  );
8439
8455
  }
@@ -8507,7 +8523,7 @@ Server rendered element contains fewer child nodes than client vdom.`
8507
8523
  vnode.shapeFlag |= isString(children) ? 8 : 16;
8508
8524
  }
8509
8525
  if (vnode.key !== vnode.key) {
8510
- warn(`VNode created with invalid key (NaN). VNode type:`, vnode.type);
8526
+ warn$1(`VNode created with invalid key (NaN). VNode type:`, vnode.type);
8511
8527
  }
8512
8528
  if (isBlockTreeEnabled > 0 && // avoid a block node from tracking itself
8513
8529
  !isBlockNode && // has current parent block
@@ -8526,7 +8542,7 @@ Server rendered element contains fewer child nodes than client vdom.`
8526
8542
  function _createVNode(type, props = null, children = null, patchFlag = 0, dynamicProps = null, isBlockNode = false) {
8527
8543
  if (!type || type === NULL_DYNAMIC_COMPONENT) {
8528
8544
  if (!type) {
8529
- warn(`Invalid vnode type when creating vnode: ${type}.`);
8545
+ warn$1(`Invalid vnode type when creating vnode: ${type}.`);
8530
8546
  }
8531
8547
  type = Comment;
8532
8548
  }
@@ -8569,7 +8585,7 @@ Server rendered element contains fewer child nodes than client vdom.`
8569
8585
  const shapeFlag = isString(type) ? 1 : isSuspense(type) ? 128 : isTeleport(type) ? 64 : isObject(type) ? 4 : isFunction(type) ? 2 : 0;
8570
8586
  if (shapeFlag & 4 && isProxy(type)) {
8571
8587
  type = toRaw(type);
8572
- warn(
8588
+ warn$1(
8573
8589
  `Vue received a Component that was made a reactive object. This can lead to unnecessary performance overhead and should be avoided by marking the component with \`markRaw\` or using \`shallowRef\` instead of \`ref\`.`,
8574
8590
  `
8575
8591
  Component that was made reactive: `,
@@ -8867,7 +8883,7 @@ Component that was made reactive: `,
8867
8883
  function validateComponentName(name, config) {
8868
8884
  const appIsNativeTag = config.isNativeTag || NO;
8869
8885
  if (isBuiltInTag(name) || appIsNativeTag(name)) {
8870
- warn(
8886
+ warn$1(
8871
8887
  "Do not use built-in or reserved HTML elements as component id: " + name
8872
8888
  );
8873
8889
  }
@@ -8906,7 +8922,7 @@ Component that was made reactive: `,
8906
8922
  }
8907
8923
  }
8908
8924
  if (Component.compilerOptions && isRuntimeOnly()) {
8909
- warn(
8925
+ warn$1(
8910
8926
  `"compilerOptions" is only supported when using a build of Vue that includes the runtime compiler. Since you are using a runtime-only build, the options should be passed via your build tool config instead.`
8911
8927
  );
8912
8928
  }
@@ -8925,7 +8941,10 @@ Component that was made reactive: `,
8925
8941
  setup,
8926
8942
  instance,
8927
8943
  0,
8928
- [shallowReadonly(instance.props) , setupContext]
8944
+ [
8945
+ shallowReadonly(instance.props) ,
8946
+ setupContext
8947
+ ]
8929
8948
  );
8930
8949
  resetTracking();
8931
8950
  unsetCurrentInstance();
@@ -8941,7 +8960,7 @@ Component that was made reactive: `,
8941
8960
  instance.asyncDep = setupResult;
8942
8961
  if (!instance.suspense) {
8943
8962
  const name = (_a = Component.name) != null ? _a : "Anonymous";
8944
- warn(
8963
+ warn$1(
8945
8964
  `Component <${name}>: setup function returned a promise, but no <Suspense> boundary was found in the parent component tree. A component with async setup() must be nested in a <Suspense> in order to be rendered.`
8946
8965
  );
8947
8966
  }
@@ -8960,7 +8979,7 @@ Component that was made reactive: `,
8960
8979
  }
8961
8980
  } else if (isObject(setupResult)) {
8962
8981
  if (isVNode(setupResult)) {
8963
- warn(
8982
+ warn$1(
8964
8983
  `setup() should not return VNodes directly - return a render function instead.`
8965
8984
  );
8966
8985
  }
@@ -8972,7 +8991,7 @@ Component that was made reactive: `,
8972
8991
  exposeSetupStateOnRenderContext(instance);
8973
8992
  }
8974
8993
  } else if (setupResult !== void 0) {
8975
- warn(
8994
+ warn$1(
8976
8995
  `setup() should return an object. Received: ${setupResult === null ? "null" : typeof setupResult}`
8977
8996
  );
8978
8997
  }
@@ -9033,12 +9052,11 @@ Component that was made reactive: `,
9033
9052
  }
9034
9053
  if (!Component.render && instance.render === NOOP && !isSSR) {
9035
9054
  if (!compile && Component.template) {
9036
- warn(
9055
+ warn$1(
9037
9056
  `Component provided template option but runtime compilation is not supported in this build of Vue.` + (` Use "vue.global.js" instead.` )
9038
- /* should not happen */
9039
9057
  );
9040
9058
  } else {
9041
- warn(`Component is missing template or render function.`);
9059
+ warn$1(`Component is missing template or render function.`);
9042
9060
  }
9043
9061
  }
9044
9062
  }
@@ -9052,11 +9070,11 @@ Component that was made reactive: `,
9052
9070
  return target[key];
9053
9071
  },
9054
9072
  set() {
9055
- warn(`setupContext.attrs is readonly.`);
9073
+ warn$1(`setupContext.attrs is readonly.`);
9056
9074
  return false;
9057
9075
  },
9058
9076
  deleteProperty() {
9059
- warn(`setupContext.attrs is readonly.`);
9077
+ warn$1(`setupContext.attrs is readonly.`);
9060
9078
  return false;
9061
9079
  }
9062
9080
  }
@@ -9074,7 +9092,7 @@ Component that was made reactive: `,
9074
9092
  const expose = (exposed) => {
9075
9093
  {
9076
9094
  if (instance.exposed) {
9077
- warn(`expose() should be called only once per setup().`);
9095
+ warn$1(`expose() should be called only once per setup().`);
9078
9096
  }
9079
9097
  if (exposed != null) {
9080
9098
  let exposedType = typeof exposed;
@@ -9086,7 +9104,7 @@ Component that was made reactive: `,
9086
9104
  }
9087
9105
  }
9088
9106
  if (exposedType !== "object") {
9089
- warn(
9107
+ warn$1(
9090
9108
  `expose() should be passed a plain object, received ${exposedType}.`
9091
9109
  );
9092
9110
  }
@@ -9184,7 +9202,7 @@ Component that was made reactive: `,
9184
9202
  const ssrContextKey = Symbol.for("v-scx");
9185
9203
  const useSSRContext = () => {
9186
9204
  {
9187
- warn(`useSSRContext() is not supported in the global build.`);
9205
+ warn$1(`useSSRContext() is not supported in the global build.`);
9188
9206
  }
9189
9207
  };
9190
9208
 
@@ -9389,8 +9407,11 @@ Component that was made reactive: `,
9389
9407
  return true;
9390
9408
  }
9391
9409
 
9392
- const version = "3.4.0-rc.1";
9410
+ const version = "3.4.0-rc.3";
9411
+ const warn = warn$1 ;
9393
9412
  const ErrorTypeStrings = ErrorTypeStrings$1 ;
9413
+ const devtools = devtools$1 ;
9414
+ const setDevtoolsHook = setDevtoolsHook$1 ;
9394
9415
  const ssrUtils = null;
9395
9416
  const resolveFilter = null;
9396
9417
  const compatUtils = null;
@@ -10944,6 +10965,7 @@ Component that was made reactive: `,
10944
10965
  exports.defineProps = defineProps;
10945
10966
  exports.defineSSRCustomElement = defineSSRCustomElement;
10946
10967
  exports.defineSlots = defineSlots;
10968
+ exports.devtools = devtools;
10947
10969
  exports.effect = effect;
10948
10970
  exports.effectScope = effectScope;
10949
10971
  exports.getCurrentInstance = getCurrentInstance;