@vue/compat 3.6.0-alpha.7 → 3.6.0-beta.2

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.
package/dist/vue.cjs.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @vue/compat v3.6.0-alpha.7
2
+ * @vue/compat v3.6.0-beta.2
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
@@ -7,7 +7,7 @@
7
7
 
8
8
  var parser = require('@babel/parser');
9
9
  var estreeWalker = require('estree-walker');
10
- var decode_js = require('entities/lib/decode.js');
10
+ var decode = require('entities/decode');
11
11
  var sourceMapJs = require('source-map-js');
12
12
 
13
13
  // @__NO_SIDE_EFFECTS__
@@ -877,13 +877,13 @@ class Dep {
877
877
  }
878
878
  }
879
879
  const targetMap = /* @__PURE__ */ new WeakMap();
880
- const ITERATE_KEY = Symbol(
880
+ const ITERATE_KEY = /* @__PURE__ */ Symbol(
881
881
  "Object iterate"
882
882
  );
883
- const MAP_KEY_ITERATE_KEY = Symbol(
883
+ const MAP_KEY_ITERATE_KEY = /* @__PURE__ */ Symbol(
884
884
  "Map keys iterate"
885
885
  );
886
- const ARRAY_ITERATE_KEY = Symbol(
886
+ const ARRAY_ITERATE_KEY = /* @__PURE__ */ Symbol(
887
887
  "Array iterate"
888
888
  );
889
889
  function track(target, type, key) {
@@ -2504,7 +2504,6 @@ function warn$1(msg, ...args) {
2504
2504
  instance,
2505
2505
  11,
2506
2506
  [
2507
- // eslint-disable-next-line no-restricted-syntax
2508
2507
  msg + args.map((a) => {
2509
2508
  var _a, _b;
2510
2509
  return (_b = (_a = a.toString) == null ? void 0 : _a.call(a)) != null ? _b : JSON.stringify(a);
@@ -2884,10 +2883,10 @@ function flushPostFlushCbs(seen) {
2884
2883
  }
2885
2884
  }
2886
2885
  let isFlushing = false;
2887
- function flushOnAppMount() {
2886
+ function flushOnAppMount(instance) {
2888
2887
  if (!isFlushing) {
2889
2888
  isFlushing = true;
2890
- flushPreFlushCbs();
2889
+ flushPreFlushCbs(instance);
2891
2890
  flushPostFlushCbs();
2892
2891
  isFlushing = false;
2893
2892
  }
@@ -3129,7 +3128,6 @@ function setDevtoolsHook$1(hook, target) {
3129
3128
  // (#4815)
3130
3129
  typeof window !== "undefined" && // some envs mock window but not fully
3131
3130
  window.HTMLElement && // also exclude jsdom
3132
- // eslint-disable-next-line no-restricted-syntax
3133
3131
  !((_b = (_a = window.navigator) == null ? void 0 : _a.userAgent) == null ? void 0 : _b.includes("jsdom"))
3134
3132
  ) {
3135
3133
  const replay = target.__VUE_DEVTOOLS_HOOK_REPLAY__ = target.__VUE_DEVTOOLS_HOOK_REPLAY__ || [];
@@ -3621,65 +3619,6 @@ function emit$1(instance, event, args) {
3621
3619
  return instance.proxy;
3622
3620
  }
3623
3621
 
3624
- const compatModelEventPrefix = `onModelCompat:`;
3625
- const warnedTypes = /* @__PURE__ */ new WeakSet();
3626
- function convertLegacyVModelProps(vnode) {
3627
- const { type, shapeFlag, props, dynamicProps } = vnode;
3628
- const comp = type;
3629
- if (shapeFlag & 6 && props && "modelValue" in props) {
3630
- if (!isCompatEnabled$1(
3631
- "COMPONENT_V_MODEL",
3632
- // this is a special case where we want to use the vnode component's
3633
- // compat config instead of the current rendering instance (which is the
3634
- // parent of the component that exposes v-model)
3635
- { type }
3636
- )) {
3637
- return;
3638
- }
3639
- if (!warnedTypes.has(comp)) {
3640
- pushWarningContext(vnode);
3641
- warnDeprecation$1("COMPONENT_V_MODEL", { type }, comp);
3642
- popWarningContext();
3643
- warnedTypes.add(comp);
3644
- }
3645
- const model = comp.model || {};
3646
- applyModelFromMixins(model, comp.mixins);
3647
- const { prop = "value", event = "input" } = model;
3648
- if (prop !== "modelValue") {
3649
- props[prop] = props.modelValue;
3650
- delete props.modelValue;
3651
- }
3652
- if (dynamicProps) {
3653
- dynamicProps[dynamicProps.indexOf("modelValue")] = prop;
3654
- }
3655
- props[compatModelEventPrefix + event] = props["onUpdate:modelValue"];
3656
- delete props["onUpdate:modelValue"];
3657
- }
3658
- }
3659
- function applyModelFromMixins(model, mixins) {
3660
- if (mixins) {
3661
- mixins.forEach((m) => {
3662
- if (m.model) extend(model, m.model);
3663
- if (m.mixins) applyModelFromMixins(model, m.mixins);
3664
- });
3665
- }
3666
- }
3667
- function compatModelEmit(instance, event, args) {
3668
- if (!isCompatEnabled$1("COMPONENT_V_MODEL", instance)) {
3669
- return;
3670
- }
3671
- const props = instance.vnode.props;
3672
- const modelHandler = props && props[compatModelEventPrefix + event];
3673
- if (modelHandler) {
3674
- callWithErrorHandling(
3675
- modelHandler,
3676
- instance,
3677
- 6,
3678
- args
3679
- );
3680
- }
3681
- }
3682
-
3683
3622
  let currentRenderingInstance = null;
3684
3623
  let currentScopeId = null;
3685
3624
  function setCurrentRenderingInstance(instance) {
@@ -3830,7 +3769,203 @@ function invokeDirectiveHook(vnode, prevVNode, instance, name) {
3830
3769
  }
3831
3770
  }
3832
3771
 
3833
- const TeleportEndKey = Symbol("_vte");
3772
+ function provide(key, value) {
3773
+ {
3774
+ if (!currentInstance || currentInstance.isMounted && !isHmrUpdating) {
3775
+ warn$1(`provide() can only be used inside setup().`);
3776
+ }
3777
+ }
3778
+ if (currentInstance) {
3779
+ let provides = currentInstance.provides;
3780
+ const parentProvides = currentInstance.parent && currentInstance.parent.provides;
3781
+ if (parentProvides === provides) {
3782
+ provides = currentInstance.provides = Object.create(parentProvides);
3783
+ }
3784
+ provides[key] = value;
3785
+ }
3786
+ }
3787
+ function inject(key, defaultValue, treatDefaultAsFactory = false) {
3788
+ const instance = getCurrentGenericInstance();
3789
+ if (instance || currentApp) {
3790
+ let provides = currentApp ? currentApp._context.provides : instance ? instance.parent == null || instance.ce ? instance.appContext && instance.appContext.provides : instance.parent.provides : void 0;
3791
+ if (provides && key in provides) {
3792
+ return provides[key];
3793
+ } else if (arguments.length > 1) {
3794
+ return treatDefaultAsFactory && isFunction(defaultValue) ? defaultValue.call(instance && instance.proxy) : defaultValue;
3795
+ } else {
3796
+ warn$1(`injection "${String(key)}" not found.`);
3797
+ }
3798
+ } else {
3799
+ warn$1(`inject() can only be used inside setup() or functional components.`);
3800
+ }
3801
+ }
3802
+ function hasInjectionContext() {
3803
+ return !!(getCurrentGenericInstance() || currentApp);
3804
+ }
3805
+
3806
+ const ssrContextKey = /* @__PURE__ */ Symbol.for("v-scx");
3807
+ const useSSRContext = () => {
3808
+ {
3809
+ const ctx = inject(ssrContextKey);
3810
+ if (!ctx) {
3811
+ warn$1(
3812
+ `Server rendering context not provided. Make sure to only call useSSRContext() conditionally in the server build.`
3813
+ );
3814
+ }
3815
+ return ctx;
3816
+ }
3817
+ };
3818
+
3819
+ function watchEffect(effect, options) {
3820
+ return doWatch(effect, null, options);
3821
+ }
3822
+ function watchPostEffect(effect, options) {
3823
+ return doWatch(
3824
+ effect,
3825
+ null,
3826
+ extend({}, options, { flush: "post" })
3827
+ );
3828
+ }
3829
+ function watchSyncEffect(effect, options) {
3830
+ return doWatch(
3831
+ effect,
3832
+ null,
3833
+ extend({}, options, { flush: "sync" })
3834
+ );
3835
+ }
3836
+ function watch(source, cb, options) {
3837
+ if (!isFunction(cb)) {
3838
+ warn$1(
3839
+ `\`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.`
3840
+ );
3841
+ }
3842
+ return doWatch(source, cb, options);
3843
+ }
3844
+ class RenderWatcherEffect extends WatcherEffect {
3845
+ constructor(instance, source, cb, options, flush) {
3846
+ super(source, cb, options);
3847
+ this.flush = flush;
3848
+ const job = () => {
3849
+ if (this.dirty) {
3850
+ this.run();
3851
+ }
3852
+ };
3853
+ if (cb) {
3854
+ this.flags |= 128;
3855
+ job.flags |= 2;
3856
+ }
3857
+ if (instance) {
3858
+ job.i = instance;
3859
+ }
3860
+ this.job = job;
3861
+ }
3862
+ notify() {
3863
+ const flags = this.flags;
3864
+ if (!(flags & 256)) {
3865
+ const flush = this.flush;
3866
+ const job = this.job;
3867
+ if (flush === "post") {
3868
+ queuePostRenderEffect(job, void 0, job.i ? job.i.suspense : null);
3869
+ } else if (flush === "pre") {
3870
+ queueJob(job, job.i ? job.i.uid : void 0, true);
3871
+ } else {
3872
+ job();
3873
+ }
3874
+ }
3875
+ }
3876
+ }
3877
+ function doWatch(source, cb, options = EMPTY_OBJ) {
3878
+ const { immediate, deep, flush = "pre", once } = options;
3879
+ if (!cb) {
3880
+ if (immediate !== void 0) {
3881
+ warn$1(
3882
+ `watch() "immediate" option is only respected when using the watch(source, callback, options?) signature.`
3883
+ );
3884
+ }
3885
+ if (deep !== void 0) {
3886
+ warn$1(
3887
+ `watch() "deep" option is only respected when using the watch(source, callback, options?) signature.`
3888
+ );
3889
+ }
3890
+ if (once !== void 0) {
3891
+ warn$1(
3892
+ `watch() "once" option is only respected when using the watch(source, callback, options?) signature.`
3893
+ );
3894
+ }
3895
+ }
3896
+ const baseWatchOptions = extend({}, options);
3897
+ baseWatchOptions.onWarn = warn$1;
3898
+ const runsImmediately = cb && immediate || !cb && flush !== "post";
3899
+ let ssrCleanup;
3900
+ if (isInSSRComponentSetup) {
3901
+ if (flush === "sync") {
3902
+ const ctx = useSSRContext();
3903
+ ssrCleanup = ctx.__watcherHandles || (ctx.__watcherHandles = []);
3904
+ } else if (!runsImmediately) {
3905
+ const watchStopHandle = () => {
3906
+ };
3907
+ watchStopHandle.stop = NOOP;
3908
+ watchStopHandle.resume = NOOP;
3909
+ watchStopHandle.pause = NOOP;
3910
+ return watchStopHandle;
3911
+ }
3912
+ }
3913
+ const instance = currentInstance;
3914
+ baseWatchOptions.call = (fn, type, args) => callWithAsyncErrorHandling(fn, instance, type, args);
3915
+ const effect = new RenderWatcherEffect(
3916
+ instance,
3917
+ source,
3918
+ cb,
3919
+ baseWatchOptions,
3920
+ flush
3921
+ );
3922
+ if (cb) {
3923
+ effect.run(true);
3924
+ } else if (flush === "post") {
3925
+ queuePostRenderEffect(effect.job, void 0, instance && instance.suspense);
3926
+ } else {
3927
+ effect.run(true);
3928
+ }
3929
+ const stop = effect.stop.bind(effect);
3930
+ stop.pause = effect.pause.bind(effect);
3931
+ stop.resume = effect.resume.bind(effect);
3932
+ stop.stop = stop;
3933
+ if (isInSSRComponentSetup) {
3934
+ if (ssrCleanup) {
3935
+ ssrCleanup.push(stop);
3936
+ } else if (runsImmediately) {
3937
+ stop();
3938
+ }
3939
+ }
3940
+ return stop;
3941
+ }
3942
+ function instanceWatch(source, value, options) {
3943
+ const publicThis = this.proxy;
3944
+ const getter = isString(source) ? source.includes(".") ? createPathGetter(publicThis, source) : () => publicThis[source] : source.bind(publicThis, publicThis);
3945
+ let cb;
3946
+ if (isFunction(value)) {
3947
+ cb = value;
3948
+ } else {
3949
+ cb = value.handler;
3950
+ options = value;
3951
+ }
3952
+ const prev = setCurrentInstance(this);
3953
+ const res = doWatch(getter, cb.bind(publicThis), options);
3954
+ setCurrentInstance(...prev);
3955
+ return res;
3956
+ }
3957
+ function createPathGetter(ctx, path) {
3958
+ const segments = path.split(".");
3959
+ return () => {
3960
+ let cur = ctx;
3961
+ for (let i = 0; i < segments.length && cur; i++) {
3962
+ cur = cur[segments[i]];
3963
+ }
3964
+ return cur;
3965
+ };
3966
+ }
3967
+
3968
+ const TeleportEndKey = /* @__PURE__ */ Symbol("_vte");
3834
3969
  const isTeleport = (type) => type.__isTeleport;
3835
3970
  const isTeleportDisabled = (props) => props && (props.disabled || props.disabled === "");
3836
3971
  const isTeleportDeferred = (props) => props && (props.defer || props.defer === "");
@@ -4202,8 +4337,8 @@ function prepareAnchor(target, vnode, createText, insert) {
4202
4337
  return targetAnchor;
4203
4338
  }
4204
4339
 
4205
- const leaveCbKey = Symbol("_leaveCb");
4206
- const enterCbKey$1 = Symbol("_enterCb");
4340
+ const leaveCbKey = /* @__PURE__ */ Symbol("_leaveCb");
4341
+ const enterCbKey$1 = /* @__PURE__ */ Symbol("_enterCb");
4207
4342
  function useTransitionState() {
4208
4343
  const state = {
4209
4344
  isMounted: false,
@@ -5459,9 +5594,17 @@ function isMismatchAllowed(el, allowedType) {
5459
5594
  }
5460
5595
  }
5461
5596
 
5462
- const requestIdleCallback = getGlobalThis().requestIdleCallback || ((cb) => setTimeout(cb, 1));
5463
- const cancelIdleCallback = getGlobalThis().cancelIdleCallback || ((id) => clearTimeout(id));
5597
+ let requestIdleCallback;
5598
+ let cancelIdleCallback;
5599
+ function ensureIdleCallbacks() {
5600
+ if (!requestIdleCallback) {
5601
+ const g = getGlobalThis();
5602
+ requestIdleCallback = g.requestIdleCallback || ((cb) => setTimeout(cb, 1));
5603
+ cancelIdleCallback = g.cancelIdleCallback || ((id) => clearTimeout(id));
5604
+ }
5605
+ }
5464
5606
  const hydrateOnIdle = (timeout = 1e4) => (hydrate) => {
5607
+ ensureIdleCallbacks();
5465
5608
  const id = requestIdleCallback(hydrate, { timeout });
5466
5609
  return () => cancelIdleCallback(id);
5467
5610
  };
@@ -5819,7 +5962,9 @@ const KeepAliveImpl = {
5819
5962
  }
5820
5963
  function pruneCache(filter) {
5821
5964
  cache.forEach((vnode, key) => {
5822
- const name = getComponentName(vnode.type);
5965
+ const name = getComponentName(
5966
+ isAsyncWrapper(vnode) ? vnode.type.__asyncResolved || {} : vnode.type
5967
+ );
5823
5968
  if (name && !filter(name)) {
5824
5969
  pruneCacheEntry(key);
5825
5970
  }
@@ -6158,7 +6303,7 @@ const FILTERS = "filters";
6158
6303
  function resolveComponent(name, maybeSelfReference) {
6159
6304
  return resolveAsset(COMPONENTS, name, true, maybeSelfReference) || name;
6160
6305
  }
6161
- const NULL_DYNAMIC_COMPONENT = Symbol.for("v-ndc");
6306
+ const NULL_DYNAMIC_COMPONENT = /* @__PURE__ */ Symbol.for("v-ndc");
6162
6307
  function resolveDynamicComponent(component) {
6163
6308
  if (isString(component)) {
6164
6309
  return resolveAsset(COMPONENTS, component, false) || component;
@@ -6600,14 +6745,14 @@ function ensureVaporSlotFallback(vnodes, fallback) {
6600
6745
  }
6601
6746
  }
6602
6747
 
6603
- function toHandlers(obj, preserveCaseIfNecessary) {
6748
+ function toHandlers(obj, preserveCaseIfNecessary, needWrap) {
6604
6749
  const ret = {};
6605
6750
  if (!isObject(obj)) {
6606
6751
  warn$1(`v-on with no argument expects an object value.`);
6607
6752
  return ret;
6608
6753
  }
6609
6754
  for (const key in obj) {
6610
- ret[preserveCaseIfNecessary && /[A-Z]/.test(key) ? `on:${key}` : toHandlerKey(key)] = obj[key];
6755
+ ret[preserveCaseIfNecessary && /[A-Z]/.test(key) ? `on:${key}` : toHandlerKey(key)] = needWrap ? () => obj[key] : obj[key];
6611
6756
  }
6612
6757
  return ret;
6613
6758
  }
@@ -7748,7 +7893,7 @@ function createCompatVue$1(createApp, createSingletonApp) {
7748
7893
  return vm;
7749
7894
  }
7750
7895
  }
7751
- Vue.version = `2.6.14-compat:${"3.6.0-alpha.7"}`;
7896
+ Vue.version = `2.6.14-compat:${"3.6.0-beta.2"}`;
7752
7897
  Vue.config = singletonApp.config;
7753
7898
  Vue.use = (plugin, ...options) => {
7754
7899
  if (plugin && isFunction(plugin.install)) {
@@ -8240,272 +8385,142 @@ function createAppAPI(mount, unmount, getPublicInstance, render) {
8240
8385
  }
8241
8386
  isMounted = true;
8242
8387
  app._container = rootContainer;
8243
- rootContainer.__vue_app__ = app;
8244
- return getPublicInstance(instance);
8245
- } else {
8246
- warn$1(
8247
- `App has already been mounted.
8248
- 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)\``
8249
- );
8250
- }
8251
- },
8252
- onUnmount(cleanupFn) {
8253
- if (typeof cleanupFn !== "function") {
8254
- warn$1(
8255
- `Expected function as first argument to app.onUnmount(), but got ${typeof cleanupFn}`
8256
- );
8257
- }
8258
- pluginCleanupFns.push(cleanupFn);
8259
- },
8260
- unmount() {
8261
- if (isMounted) {
8262
- callWithAsyncErrorHandling(
8263
- pluginCleanupFns,
8264
- app._instance,
8265
- 16
8266
- );
8267
- unmount(app);
8268
- {
8269
- app._instance = null;
8270
- devtoolsUnmountApp(app);
8271
- }
8272
- delete app._container.__vue_app__;
8273
- } else {
8274
- warn$1(`Cannot unmount an app that is not mounted.`);
8275
- }
8276
- },
8277
- provide(key, value) {
8278
- if (key in context.provides) {
8279
- if (hasOwn(context.provides, key)) {
8280
- warn$1(
8281
- `App already provides property with key "${String(key)}". It will be overwritten with the new value.`
8282
- );
8283
- } else {
8284
- warn$1(
8285
- `App already provides property with key "${String(key)}" inherited from its parent element. It will be overwritten with the new value.`
8286
- );
8287
- }
8288
- }
8289
- context.provides[key] = value;
8290
- return app;
8291
- },
8292
- runWithContext(fn) {
8293
- const lastApp = currentApp;
8294
- currentApp = app;
8295
- try {
8296
- return fn();
8297
- } finally {
8298
- currentApp = lastApp;
8299
- }
8300
- }
8301
- };
8302
- {
8303
- installAppCompatProperties(
8304
- app,
8305
- context,
8306
- // vapor doesn't have compat mode so this is always passed
8307
- render
8308
- );
8309
- }
8310
- return app;
8311
- };
8312
- }
8313
- let currentApp = null;
8314
-
8315
- function provide(key, value) {
8316
- {
8317
- if (!currentInstance || currentInstance.isMounted) {
8318
- warn$1(`provide() can only be used inside setup().`);
8319
- }
8320
- }
8321
- if (currentInstance) {
8322
- let provides = currentInstance.provides;
8323
- const parentProvides = currentInstance.parent && currentInstance.parent.provides;
8324
- if (parentProvides === provides) {
8325
- provides = currentInstance.provides = Object.create(parentProvides);
8326
- }
8327
- provides[key] = value;
8328
- }
8329
- }
8330
- function inject(key, defaultValue, treatDefaultAsFactory = false) {
8331
- const instance = getCurrentGenericInstance();
8332
- if (instance || currentApp) {
8333
- let provides = currentApp ? currentApp._context.provides : instance ? instance.parent == null || instance.ce ? instance.appContext && instance.appContext.provides : instance.parent.provides : void 0;
8334
- if (provides && key in provides) {
8335
- return provides[key];
8336
- } else if (arguments.length > 1) {
8337
- return treatDefaultAsFactory && isFunction(defaultValue) ? defaultValue.call(instance && instance.proxy) : defaultValue;
8338
- } else {
8339
- warn$1(`injection "${String(key)}" not found.`);
8340
- }
8341
- } else {
8342
- warn$1(`inject() can only be used inside setup() or functional components.`);
8343
- }
8344
- }
8345
- function hasInjectionContext() {
8346
- return !!(getCurrentGenericInstance() || currentApp);
8347
- }
8348
-
8349
- const ssrContextKey = Symbol.for("v-scx");
8350
- const useSSRContext = () => {
8351
- {
8352
- const ctx = inject(ssrContextKey);
8353
- if (!ctx) {
8354
- warn$1(
8355
- `Server rendering context not provided. Make sure to only call useSSRContext() conditionally in the server build.`
8356
- );
8357
- }
8358
- return ctx;
8359
- }
8360
- };
8361
-
8362
- function watchEffect(effect, options) {
8363
- return doWatch(effect, null, options);
8364
- }
8365
- function watchPostEffect(effect, options) {
8366
- return doWatch(
8367
- effect,
8368
- null,
8369
- extend({}, options, { flush: "post" })
8370
- );
8371
- }
8372
- function watchSyncEffect(effect, options) {
8373
- return doWatch(
8374
- effect,
8375
- null,
8376
- extend({}, options, { flush: "sync" })
8377
- );
8378
- }
8379
- function watch(source, cb, options) {
8380
- if (!isFunction(cb)) {
8381
- warn$1(
8382
- `\`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.`
8383
- );
8384
- }
8385
- return doWatch(source, cb, options);
8386
- }
8387
- class RenderWatcherEffect extends WatcherEffect {
8388
- constructor(instance, source, cb, options, flush) {
8389
- super(source, cb, options);
8390
- this.flush = flush;
8391
- const job = () => {
8392
- if (this.dirty) {
8393
- this.run();
8388
+ rootContainer.__vue_app__ = app;
8389
+ return getPublicInstance(instance);
8390
+ } else {
8391
+ warn$1(
8392
+ `App has already been mounted.
8393
+ 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)\``
8394
+ );
8395
+ }
8396
+ },
8397
+ onUnmount(cleanupFn) {
8398
+ if (typeof cleanupFn !== "function") {
8399
+ warn$1(
8400
+ `Expected function as first argument to app.onUnmount(), but got ${typeof cleanupFn}`
8401
+ );
8402
+ }
8403
+ pluginCleanupFns.push(cleanupFn);
8404
+ },
8405
+ unmount() {
8406
+ if (isMounted) {
8407
+ callWithAsyncErrorHandling(
8408
+ pluginCleanupFns,
8409
+ app._instance,
8410
+ 16
8411
+ );
8412
+ unmount(app);
8413
+ {
8414
+ app._instance = null;
8415
+ devtoolsUnmountApp(app);
8416
+ }
8417
+ delete app._container.__vue_app__;
8418
+ } else {
8419
+ warn$1(`Cannot unmount an app that is not mounted.`);
8420
+ }
8421
+ },
8422
+ provide(key, value) {
8423
+ if (key in context.provides) {
8424
+ if (hasOwn(context.provides, key)) {
8425
+ warn$1(
8426
+ `App already provides property with key "${String(key)}". It will be overwritten with the new value.`
8427
+ );
8428
+ } else {
8429
+ warn$1(
8430
+ `App already provides property with key "${String(key)}" inherited from its parent element. It will be overwritten with the new value.`
8431
+ );
8432
+ }
8433
+ }
8434
+ context.provides[key] = value;
8435
+ return app;
8436
+ },
8437
+ runWithContext(fn) {
8438
+ const lastApp = currentApp;
8439
+ currentApp = app;
8440
+ try {
8441
+ return fn();
8442
+ } finally {
8443
+ currentApp = lastApp;
8444
+ }
8394
8445
  }
8395
8446
  };
8396
- if (cb) {
8397
- this.flags |= 128;
8398
- job.flags |= 2;
8399
- }
8400
- if (instance) {
8401
- job.i = instance;
8402
- }
8403
- this.job = job;
8404
- }
8405
- notify() {
8406
- const flags = this.flags;
8407
- if (!(flags & 256)) {
8408
- const flush = this.flush;
8409
- const job = this.job;
8410
- if (flush === "post") {
8411
- queuePostRenderEffect(job, void 0, job.i ? job.i.suspense : null);
8412
- } else if (flush === "pre") {
8413
- queueJob(job, job.i ? job.i.uid : void 0, true);
8414
- } else {
8415
- job();
8416
- }
8417
- }
8418
- }
8419
- }
8420
- function doWatch(source, cb, options = EMPTY_OBJ) {
8421
- const { immediate, deep, flush = "pre", once } = options;
8422
- if (!cb) {
8423
- if (immediate !== void 0) {
8424
- warn$1(
8425
- `watch() "immediate" option is only respected when using the watch(source, callback, options?) signature.`
8447
+ {
8448
+ installAppCompatProperties(
8449
+ app,
8450
+ context,
8451
+ // vapor doesn't have compat mode so this is always passed
8452
+ render
8426
8453
  );
8427
8454
  }
8428
- if (deep !== void 0) {
8429
- warn$1(
8430
- `watch() "deep" option is only respected when using the watch(source, callback, options?) signature.`
8431
- );
8455
+ return app;
8456
+ };
8457
+ }
8458
+ let currentApp = null;
8459
+
8460
+ const compatModelEventPrefix = `onModelCompat:`;
8461
+ const warnedTypes = /* @__PURE__ */ new WeakSet();
8462
+ function convertLegacyVModelProps(vnode) {
8463
+ const { type, shapeFlag, props, dynamicProps } = vnode;
8464
+ const comp = type;
8465
+ if (shapeFlag & 6 && props && "modelValue" in props) {
8466
+ if (!isCompatEnabled$1(
8467
+ "COMPONENT_V_MODEL",
8468
+ // this is a special case where we want to use the vnode component's
8469
+ // compat config instead of the current rendering instance (which is the
8470
+ // parent of the component that exposes v-model)
8471
+ { type }
8472
+ )) {
8473
+ return;
8432
8474
  }
8433
- if (once !== void 0) {
8434
- warn$1(
8435
- `watch() "once" option is only respected when using the watch(source, callback, options?) signature.`
8475
+ if (!warnedTypes.has(comp)) {
8476
+ pushWarningContext(vnode);
8477
+ warnDeprecation$1(
8478
+ "COMPONENT_V_MODEL",
8479
+ {
8480
+ type,
8481
+ appContext: vnode.ctx && vnode.ctx.appContext || createAppContext()
8482
+ },
8483
+ comp
8436
8484
  );
8485
+ popWarningContext();
8486
+ warnedTypes.add(comp);
8437
8487
  }
8438
- }
8439
- const baseWatchOptions = extend({}, options);
8440
- baseWatchOptions.onWarn = warn$1;
8441
- const runsImmediately = cb && immediate || !cb && flush !== "post";
8442
- let ssrCleanup;
8443
- if (isInSSRComponentSetup) {
8444
- if (flush === "sync") {
8445
- const ctx = useSSRContext();
8446
- ssrCleanup = ctx.__watcherHandles || (ctx.__watcherHandles = []);
8447
- } else if (!runsImmediately) {
8448
- const watchStopHandle = () => {
8449
- };
8450
- watchStopHandle.stop = NOOP;
8451
- watchStopHandle.resume = NOOP;
8452
- watchStopHandle.pause = NOOP;
8453
- return watchStopHandle;
8488
+ const model = comp.model || {};
8489
+ applyModelFromMixins(model, comp.mixins);
8490
+ const { prop = "value", event = "input" } = model;
8491
+ if (prop !== "modelValue") {
8492
+ props[prop] = props.modelValue;
8493
+ delete props.modelValue;
8454
8494
  }
8455
- }
8456
- const instance = currentInstance;
8457
- baseWatchOptions.call = (fn, type, args) => callWithAsyncErrorHandling(fn, instance, type, args);
8458
- const effect = new RenderWatcherEffect(
8459
- instance,
8460
- source,
8461
- cb,
8462
- baseWatchOptions,
8463
- flush
8464
- );
8465
- if (cb) {
8466
- effect.run(true);
8467
- } else if (flush === "post") {
8468
- queuePostRenderEffect(effect.job, void 0, instance && instance.suspense);
8469
- } else {
8470
- effect.run(true);
8471
- }
8472
- const stop = effect.stop.bind(effect);
8473
- stop.pause = effect.pause.bind(effect);
8474
- stop.resume = effect.resume.bind(effect);
8475
- stop.stop = stop;
8476
- if (isInSSRComponentSetup) {
8477
- if (ssrCleanup) {
8478
- ssrCleanup.push(stop);
8479
- } else if (runsImmediately) {
8480
- stop();
8495
+ if (dynamicProps) {
8496
+ dynamicProps[dynamicProps.indexOf("modelValue")] = prop;
8481
8497
  }
8498
+ props[compatModelEventPrefix + event] = props["onUpdate:modelValue"];
8499
+ delete props["onUpdate:modelValue"];
8482
8500
  }
8483
- return stop;
8484
8501
  }
8485
- function instanceWatch(source, value, options) {
8486
- const publicThis = this.proxy;
8487
- const getter = isString(source) ? source.includes(".") ? createPathGetter(publicThis, source) : () => publicThis[source] : source.bind(publicThis, publicThis);
8488
- let cb;
8489
- if (isFunction(value)) {
8490
- cb = value;
8491
- } else {
8492
- cb = value.handler;
8493
- options = value;
8502
+ function applyModelFromMixins(model, mixins) {
8503
+ if (mixins) {
8504
+ mixins.forEach((m) => {
8505
+ if (m.model) extend(model, m.model);
8506
+ if (m.mixins) applyModelFromMixins(model, m.mixins);
8507
+ });
8494
8508
  }
8495
- const prev = setCurrentInstance(this);
8496
- const res = doWatch(getter, cb.bind(publicThis), options);
8497
- setCurrentInstance(...prev);
8498
- return res;
8499
8509
  }
8500
- function createPathGetter(ctx, path) {
8501
- const segments = path.split(".");
8502
- return () => {
8503
- let cur = ctx;
8504
- for (let i = 0; i < segments.length && cur; i++) {
8505
- cur = cur[segments[i]];
8506
- }
8507
- return cur;
8508
- };
8510
+ function compatModelEmit(instance, event, args) {
8511
+ if (!isCompatEnabled$1("COMPONENT_V_MODEL", instance)) {
8512
+ return;
8513
+ }
8514
+ const props = instance.vnode.props;
8515
+ const modelHandler = props && props[compatModelEventPrefix + event];
8516
+ if (modelHandler) {
8517
+ callWithErrorHandling(
8518
+ modelHandler,
8519
+ instance,
8520
+ 6,
8521
+ args
8522
+ );
8523
+ }
8509
8524
  }
8510
8525
 
8511
8526
  function useModel(props, name, options = EMPTY_OBJ) {
@@ -9697,6 +9712,14 @@ function isSupported() {
9697
9712
  return supported;
9698
9713
  }
9699
9714
 
9715
+ const MoveType = {
9716
+ "ENTER": 0,
9717
+ "0": "ENTER",
9718
+ "LEAVE": 1,
9719
+ "1": "LEAVE",
9720
+ "REORDER": 2,
9721
+ "2": "REORDER"
9722
+ };
9700
9723
  const queuePostRenderEffect = queueEffectWithSuspense ;
9701
9724
  function createRenderer(options) {
9702
9725
  return baseCreateRenderer(options);
@@ -9845,7 +9868,15 @@ function baseCreateRenderer(options, createHydrationFns) {
9845
9868
  } else {
9846
9869
  const el = n2.el = n1.el;
9847
9870
  if (n2.children !== n1.children) {
9848
- hostSetText(el, n2.children);
9871
+ if (isHmrUpdating && n2.patchFlag === -1 && "__elIndex" in n1) {
9872
+ const childNodes = container.childNodes;
9873
+ const newChild = hostCreateText(n2.children);
9874
+ const oldChild = childNodes[n2.__elIndex = n1.__elIndex];
9875
+ hostInsert(newChild, container, oldChild);
9876
+ hostRemove(oldChild);
9877
+ } else {
9878
+ hostSetText(el, n2.children);
9879
+ }
9849
9880
  }
9850
9881
  }
9851
9882
  };
@@ -10231,7 +10262,7 @@ function baseCreateRenderer(options, createHydrationFns) {
10231
10262
  } else {
10232
10263
  if (patchFlag > 0 && patchFlag & 64 && dynamicChildren && // #2715 the previous fragment could've been a BAILed one as a result
10233
10264
  // of renderSlot() with no valid children
10234
- n1.dynamicChildren) {
10265
+ n1.dynamicChildren && n1.dynamicChildren.length === dynamicChildren.length) {
10235
10266
  patchBlockChildren(
10236
10267
  n1.dynamicChildren,
10237
10268
  dynamicChildren,
@@ -10947,8 +10978,8 @@ function baseCreateRenderer(options, createHydrationFns) {
10947
10978
  const nextChild = c2[nextIndex];
10948
10979
  const anchorVNode = c2[nextIndex + 1];
10949
10980
  const anchor = nextIndex + 1 < l2 ? (
10950
- // #13559, fallback to el placeholder for unresolved async component
10951
- anchorVNode.el || anchorVNode.placeholder
10981
+ // #13559, #14173 fallback to el placeholder for unresolved async component
10982
+ anchorVNode.el || resolveAsyncComponentPlaceholder(anchorVNode)
10952
10983
  ) : parentAnchor;
10953
10984
  if (newIndexToOldIndexMap[i] === 0) {
10954
10985
  patch(
@@ -11263,9 +11294,11 @@ function baseCreateRenderer(options, createHydrationFns) {
11263
11294
  return teleportEnd ? hostNextSibling(teleportEnd) : el;
11264
11295
  };
11265
11296
  const render = (vnode, container, namespace) => {
11297
+ let instance;
11266
11298
  if (vnode == null) {
11267
11299
  if (container._vnode) {
11268
11300
  unmount(container._vnode, null, null, true);
11301
+ instance = container._vnode.component;
11269
11302
  }
11270
11303
  } else {
11271
11304
  patch(
@@ -11279,7 +11312,7 @@ function baseCreateRenderer(options, createHydrationFns) {
11279
11312
  );
11280
11313
  }
11281
11314
  container._vnode = vnode;
11282
- flushOnAppMount();
11315
+ flushOnAppMount(instance);
11283
11316
  };
11284
11317
  const internals = {
11285
11318
  p: patch,
@@ -11371,9 +11404,13 @@ function traverseStaticChildren(n1, n2, shallow = false) {
11371
11404
  if (!shallow && c2.patchFlag !== -2)
11372
11405
  traverseStaticChildren(c1, c2);
11373
11406
  }
11374
- if (c2.type === Text && // avoid cached text nodes retaining detached dom nodes
11375
- c2.patchFlag !== -1) {
11376
- c2.el = c1.el;
11407
+ if (c2.type === Text) {
11408
+ if (c2.patchFlag !== -1) {
11409
+ c2.el = c1.el;
11410
+ } else {
11411
+ c2.__elIndex = i + // take fragment start anchor into account
11412
+ (n1.type === Fragment ? 1 : 0);
11413
+ }
11377
11414
  }
11378
11415
  if (c2.type === Comment && !c2.el) {
11379
11416
  c2.el = c1.el;
@@ -11409,16 +11446,24 @@ function performTransitionEnter(el, transition, insert, parentSuspense, force =
11409
11446
  insert();
11410
11447
  }
11411
11448
  }
11412
- function performTransitionLeave(el, transition, remove, isElement = true) {
11449
+ function performTransitionLeave(el, transition, remove, isElement = true, force = false) {
11413
11450
  const performRemove = () => {
11414
11451
  remove();
11415
11452
  if (transition && !transition.persisted && transition.afterLeave) {
11416
11453
  transition.afterLeave();
11417
11454
  }
11418
11455
  };
11419
- if (isElement && transition && !transition.persisted) {
11456
+ if (force || isElement && transition && !transition.persisted) {
11420
11457
  const { leave, delayLeave } = transition;
11421
- const performLeave = () => leave(el, performRemove);
11458
+ const performLeave = () => {
11459
+ if (el._isLeaving && force) {
11460
+ el[leaveCbKey](
11461
+ true
11462
+ /* cancelled */
11463
+ );
11464
+ }
11465
+ leave(el, performRemove);
11466
+ };
11422
11467
  if (delayLeave) {
11423
11468
  delayLeave(el, performRemove, performLeave);
11424
11469
  } else {
@@ -11474,6 +11519,16 @@ function getInheritedScopeIds(vnode, parentComponent) {
11474
11519
  }
11475
11520
  return inheritedScopeIds;
11476
11521
  }
11522
+ function resolveAsyncComponentPlaceholder(anchorVnode) {
11523
+ if (anchorVnode.placeholder) {
11524
+ return anchorVnode.placeholder;
11525
+ }
11526
+ const instance = anchorVnode.component;
11527
+ if (instance) {
11528
+ return resolveAsyncComponentPlaceholder(instance.subTree);
11529
+ }
11530
+ return null;
11531
+ }
11477
11532
 
11478
11533
  const isSuspense = (type) => type.__isSuspense;
11479
11534
  let suspenseId = 0;
@@ -11968,7 +12023,7 @@ function hydrateSuspense(node, vnode, parentComponent, parentSuspense, namespace
11968
12023
  parentSuspense,
11969
12024
  parentComponent,
11970
12025
  node.parentNode,
11971
- // eslint-disable-next-line no-restricted-globals
12026
+ // oxlint-disable-next-line no-restricted-globals
11972
12027
  document.createElement("div"),
11973
12028
  null,
11974
12029
  namespace,
@@ -12113,11 +12168,11 @@ function convertLegacyComponent(comp, instance) {
12113
12168
  return comp;
12114
12169
  }
12115
12170
 
12116
- const Fragment = Symbol.for("v-fgt");
12117
- const Text = Symbol.for("v-txt");
12118
- const Comment = Symbol.for("v-cmt");
12119
- const Static = Symbol.for("v-stc");
12120
- const VaporSlot = Symbol.for("v-vps");
12171
+ const Fragment = /* @__PURE__ */ Symbol.for("v-fgt");
12172
+ const Text = /* @__PURE__ */ Symbol.for("v-txt");
12173
+ const Comment = /* @__PURE__ */ Symbol.for("v-cmt");
12174
+ const Static = /* @__PURE__ */ Symbol.for("v-stc");
12175
+ const VaporSlot = /* @__PURE__ */ Symbol.for("v-vps");
12121
12176
  const blockStack = [];
12122
12177
  let currentBlock = null;
12123
12178
  function openBlock(disableTracking = false) {
@@ -12531,7 +12586,7 @@ const setCurrentInstance = (instance, scope = instance !== null ? instance.scope
12531
12586
  simpleSetCurrentInstance(instance);
12532
12587
  }
12533
12588
  };
12534
- const internalOptions = ["ce", "type"];
12589
+ const internalOptions = ["ce", "type", "uid"];
12535
12590
  const useInstanceOption = (key, silent = false) => {
12536
12591
  const instance = getCurrentGenericInstance();
12537
12592
  if (!instance) {
@@ -12551,7 +12606,7 @@ const useInstanceOption = (key, silent = false) => {
12551
12606
  return { hasInstance: true, value: instance[key] };
12552
12607
  };
12553
12608
 
12554
- const emptyAppContext = createAppContext();
12609
+ const emptyAppContext = /* @__PURE__ */ createAppContext();
12555
12610
  let uid = 0;
12556
12611
  function createComponentInstance(vnode, parent, suspense) {
12557
12612
  const type = vnode.type;
@@ -13195,7 +13250,7 @@ function isMemoSame(cached, memo) {
13195
13250
  return true;
13196
13251
  }
13197
13252
 
13198
- const version = "3.6.0-alpha.7";
13253
+ const version = "3.6.0-beta.2";
13199
13254
  const warn = warn$1 ;
13200
13255
  const ErrorTypeStrings = ErrorTypeStrings$1 ;
13201
13256
  const devtools = devtools$1 ;
@@ -13307,7 +13362,7 @@ const nodeOps = {
13307
13362
 
13308
13363
  const TRANSITION$1 = "transition";
13309
13364
  const ANIMATION = "animation";
13310
- const vtcKey = Symbol("_vtc");
13365
+ const vtcKey = /* @__PURE__ */ Symbol("_vtc");
13311
13366
  const DOMTransitionPropsValidators = {
13312
13367
  name: String,
13313
13368
  type: String,
@@ -13637,8 +13692,8 @@ function patchClass(el, value, isSVG) {
13637
13692
  }
13638
13693
  }
13639
13694
 
13640
- const vShowOriginalDisplay = Symbol("_vod");
13641
- const vShowHidden = Symbol("_vsh");
13695
+ const vShowOriginalDisplay = /* @__PURE__ */ Symbol("_vod");
13696
+ const vShowHidden = /* @__PURE__ */ Symbol("_vsh");
13642
13697
  const vShow = {
13643
13698
  // used for prop mismatch check during hydration
13644
13699
  name: "show",
@@ -13687,7 +13742,7 @@ function initVShowForSSR() {
13687
13742
  };
13688
13743
  }
13689
13744
 
13690
- const CSS_VAR_TEXT = Symbol("CSS_VAR_TEXT" );
13745
+ const CSS_VAR_TEXT = /* @__PURE__ */ Symbol("CSS_VAR_TEXT" );
13691
13746
  function useCssVars(getter) {
13692
13747
  return;
13693
13748
  }
@@ -13817,7 +13872,7 @@ function patchAttr(el, key, value, isSVG, instance, isBoolean = isSpecialBoolean
13817
13872
  const isEnumeratedAttr = /* @__PURE__ */ makeMap("contenteditable,draggable,spellcheck") ;
13818
13873
  function compatCoerceAttr(el, key, value, instance = null) {
13819
13874
  if (isEnumeratedAttr(key)) {
13820
- const v2CoercedValue = value === null ? "false" : typeof value !== "boolean" && value !== void 0 ? "true" : null;
13875
+ const v2CoercedValue = value === void 0 ? null : value === null || value === false || value === "false" ? "false" : "true";
13821
13876
  if (v2CoercedValue && compatUtils.softAssertCompatEnabled(
13822
13877
  "ATTR_ENUMERATED_COERCION",
13823
13878
  instance,
@@ -13912,7 +13967,7 @@ function addEventListener(el, event, handler, options) {
13912
13967
  function removeEventListener(el, event, handler, options) {
13913
13968
  el.removeEventListener(event, handler, options);
13914
13969
  }
13915
- const veiKey = Symbol("_vei");
13970
+ const veiKey = /* @__PURE__ */ Symbol("_vei");
13916
13971
  function patchEvent(el, rawName, prevValue, nextValue, instance = null) {
13917
13972
  const invokers = el[veiKey] || (el[veiKey] = {});
13918
13973
  const existingInvoker = invokers[rawName];
@@ -14574,8 +14629,8 @@ function useCssModule(name = "$style") {
14574
14629
 
14575
14630
  const positionMap = /* @__PURE__ */ new WeakMap();
14576
14631
  const newPositionMap = /* @__PURE__ */ new WeakMap();
14577
- const moveCbKey = Symbol("_moveCb");
14578
- const enterCbKey = Symbol("_enterCb");
14632
+ const moveCbKey = /* @__PURE__ */ Symbol("_moveCb");
14633
+ const enterCbKey = /* @__PURE__ */ Symbol("_enterCb");
14579
14634
  const decorate = (t) => {
14580
14635
  delete t.props.mode;
14581
14636
  {
@@ -14747,7 +14802,7 @@ function onCompositionEnd(e) {
14747
14802
  target.dispatchEvent(new Event("input"));
14748
14803
  }
14749
14804
  }
14750
- const assignKey = Symbol("_assign");
14805
+ const assignKey = /* @__PURE__ */ Symbol("_assign");
14751
14806
  const vModelText = {
14752
14807
  created(el, { modifiers: { lazy, trim, number } }, vnode) {
14753
14808
  el[assignKey] = getModelAssigner(vnode);
@@ -15283,6 +15338,7 @@ var runtimeDom = /*#__PURE__*/Object.freeze({
15283
15338
  ErrorTypeStrings: ErrorTypeStrings,
15284
15339
  Fragment: Fragment,
15285
15340
  KeepAlive: KeepAlive,
15341
+ MoveType: MoveType,
15286
15342
  ReactiveEffect: ReactiveEffect,
15287
15343
  Static: Static,
15288
15344
  Suspense: Suspense,
@@ -15465,81 +15521,81 @@ function createCompatVue() {
15465
15521
  return Vue;
15466
15522
  }
15467
15523
 
15468
- const FRAGMENT = Symbol(`Fragment` );
15469
- const TELEPORT = Symbol(`Teleport` );
15470
- const SUSPENSE = Symbol(`Suspense` );
15471
- const KEEP_ALIVE = Symbol(`KeepAlive` );
15472
- const BASE_TRANSITION = Symbol(
15524
+ const FRAGMENT = /* @__PURE__ */ Symbol(`Fragment` );
15525
+ const TELEPORT = /* @__PURE__ */ Symbol(`Teleport` );
15526
+ const SUSPENSE = /* @__PURE__ */ Symbol(`Suspense` );
15527
+ const KEEP_ALIVE = /* @__PURE__ */ Symbol(`KeepAlive` );
15528
+ const BASE_TRANSITION = /* @__PURE__ */ Symbol(
15473
15529
  `BaseTransition`
15474
15530
  );
15475
- const OPEN_BLOCK = Symbol(`openBlock` );
15476
- const CREATE_BLOCK = Symbol(`createBlock` );
15477
- const CREATE_ELEMENT_BLOCK = Symbol(
15531
+ const OPEN_BLOCK = /* @__PURE__ */ Symbol(`openBlock` );
15532
+ const CREATE_BLOCK = /* @__PURE__ */ Symbol(`createBlock` );
15533
+ const CREATE_ELEMENT_BLOCK = /* @__PURE__ */ Symbol(
15478
15534
  `createElementBlock`
15479
15535
  );
15480
- const CREATE_VNODE = Symbol(`createVNode` );
15481
- const CREATE_ELEMENT_VNODE = Symbol(
15536
+ const CREATE_VNODE = /* @__PURE__ */ Symbol(`createVNode` );
15537
+ const CREATE_ELEMENT_VNODE = /* @__PURE__ */ Symbol(
15482
15538
  `createElementVNode`
15483
15539
  );
15484
- const CREATE_COMMENT = Symbol(
15540
+ const CREATE_COMMENT = /* @__PURE__ */ Symbol(
15485
15541
  `createCommentVNode`
15486
15542
  );
15487
- const CREATE_TEXT = Symbol(
15543
+ const CREATE_TEXT = /* @__PURE__ */ Symbol(
15488
15544
  `createTextVNode`
15489
15545
  );
15490
- const CREATE_STATIC = Symbol(
15546
+ const CREATE_STATIC = /* @__PURE__ */ Symbol(
15491
15547
  `createStaticVNode`
15492
15548
  );
15493
- const RESOLVE_COMPONENT = Symbol(
15549
+ const RESOLVE_COMPONENT = /* @__PURE__ */ Symbol(
15494
15550
  `resolveComponent`
15495
15551
  );
15496
- const RESOLVE_DYNAMIC_COMPONENT = Symbol(
15552
+ const RESOLVE_DYNAMIC_COMPONENT = /* @__PURE__ */ Symbol(
15497
15553
  `resolveDynamicComponent`
15498
15554
  );
15499
- const RESOLVE_DIRECTIVE = Symbol(
15555
+ const RESOLVE_DIRECTIVE = /* @__PURE__ */ Symbol(
15500
15556
  `resolveDirective`
15501
15557
  );
15502
- const RESOLVE_FILTER = Symbol(
15558
+ const RESOLVE_FILTER = /* @__PURE__ */ Symbol(
15503
15559
  `resolveFilter`
15504
15560
  );
15505
- const WITH_DIRECTIVES = Symbol(
15561
+ const WITH_DIRECTIVES = /* @__PURE__ */ Symbol(
15506
15562
  `withDirectives`
15507
15563
  );
15508
- const RENDER_LIST = Symbol(`renderList` );
15509
- const RENDER_SLOT = Symbol(`renderSlot` );
15510
- const CREATE_SLOTS = Symbol(`createSlots` );
15511
- const TO_DISPLAY_STRING = Symbol(
15564
+ const RENDER_LIST = /* @__PURE__ */ Symbol(`renderList` );
15565
+ const RENDER_SLOT = /* @__PURE__ */ Symbol(`renderSlot` );
15566
+ const CREATE_SLOTS = /* @__PURE__ */ Symbol(`createSlots` );
15567
+ const TO_DISPLAY_STRING = /* @__PURE__ */ Symbol(
15512
15568
  `toDisplayString`
15513
15569
  );
15514
- const MERGE_PROPS = Symbol(`mergeProps` );
15515
- const NORMALIZE_CLASS = Symbol(
15570
+ const MERGE_PROPS = /* @__PURE__ */ Symbol(`mergeProps` );
15571
+ const NORMALIZE_CLASS = /* @__PURE__ */ Symbol(
15516
15572
  `normalizeClass`
15517
15573
  );
15518
- const NORMALIZE_STYLE = Symbol(
15574
+ const NORMALIZE_STYLE = /* @__PURE__ */ Symbol(
15519
15575
  `normalizeStyle`
15520
15576
  );
15521
- const NORMALIZE_PROPS = Symbol(
15577
+ const NORMALIZE_PROPS = /* @__PURE__ */ Symbol(
15522
15578
  `normalizeProps`
15523
15579
  );
15524
- const GUARD_REACTIVE_PROPS = Symbol(
15580
+ const GUARD_REACTIVE_PROPS = /* @__PURE__ */ Symbol(
15525
15581
  `guardReactiveProps`
15526
15582
  );
15527
- const TO_HANDLERS = Symbol(`toHandlers` );
15528
- const CAMELIZE = Symbol(`camelize` );
15529
- const CAPITALIZE = Symbol(`capitalize` );
15530
- const TO_HANDLER_KEY = Symbol(
15583
+ const TO_HANDLERS = /* @__PURE__ */ Symbol(`toHandlers` );
15584
+ const CAMELIZE = /* @__PURE__ */ Symbol(`camelize` );
15585
+ const CAPITALIZE = /* @__PURE__ */ Symbol(`capitalize` );
15586
+ const TO_HANDLER_KEY = /* @__PURE__ */ Symbol(
15531
15587
  `toHandlerKey`
15532
15588
  );
15533
- const SET_BLOCK_TRACKING = Symbol(
15589
+ const SET_BLOCK_TRACKING = /* @__PURE__ */ Symbol(
15534
15590
  `setBlockTracking`
15535
15591
  );
15536
- const PUSH_SCOPE_ID = Symbol(`pushScopeId` );
15537
- const POP_SCOPE_ID = Symbol(`popScopeId` );
15538
- const WITH_CTX = Symbol(`withCtx` );
15539
- const UNREF = Symbol(`unref` );
15540
- const IS_REF = Symbol(`isRef` );
15541
- const WITH_MEMO = Symbol(`withMemo` );
15542
- const IS_MEMO_SAME = Symbol(`isMemoSame` );
15592
+ const PUSH_SCOPE_ID = /* @__PURE__ */ Symbol(`pushScopeId` );
15593
+ const POP_SCOPE_ID = /* @__PURE__ */ Symbol(`popScopeId` );
15594
+ const WITH_CTX = /* @__PURE__ */ Symbol(`withCtx` );
15595
+ const UNREF = /* @__PURE__ */ Symbol(`unref` );
15596
+ const IS_REF = /* @__PURE__ */ Symbol(`isRef` );
15597
+ const WITH_MEMO = /* @__PURE__ */ Symbol(`withMemo` );
15598
+ const IS_MEMO_SAME = /* @__PURE__ */ Symbol(`isMemoSame` );
15543
15599
  const helperNameMap = {
15544
15600
  [FRAGMENT]: `Fragment`,
15545
15601
  [TELEPORT]: `Teleport`,
@@ -15809,8 +15865,8 @@ class Tokenizer {
15809
15865
  this.currentSequence = void 0;
15810
15866
  this.sequenceIndex = 0;
15811
15867
  {
15812
- this.entityDecoder = new decode_js.EntityDecoder(
15813
- decode_js.htmlDecodeTree,
15868
+ this.entityDecoder = new decode.EntityDecoder(
15869
+ decode.htmlDecodeTree,
15814
15870
  (cp, consumed) => this.emitCodePoint(cp, consumed)
15815
15871
  );
15816
15872
  }
@@ -15840,14 +15896,28 @@ class Tokenizer {
15840
15896
  getPos(index) {
15841
15897
  let line = 1;
15842
15898
  let column = index + 1;
15843
- for (let i = this.newlines.length - 1; i >= 0; i--) {
15844
- const newlineIndex = this.newlines[i];
15845
- if (index > newlineIndex) {
15846
- line = i + 2;
15847
- column = index - newlineIndex;
15848
- break;
15899
+ const length = this.newlines.length;
15900
+ let j = -1;
15901
+ if (length > 100) {
15902
+ let l = -1;
15903
+ let r = length;
15904
+ while (l + 1 < r) {
15905
+ const m = l + r >>> 1;
15906
+ this.newlines[m] < index ? l = m : r = m;
15907
+ }
15908
+ j = l;
15909
+ } else {
15910
+ for (let i = length - 1; i >= 0; i--) {
15911
+ if (index > this.newlines[i]) {
15912
+ j = i;
15913
+ break;
15914
+ }
15849
15915
  }
15850
15916
  }
15917
+ if (j >= 0) {
15918
+ line = j + 2;
15919
+ column = index - this.newlines[j];
15920
+ }
15851
15921
  return {
15852
15922
  column,
15853
15923
  line,
@@ -16360,7 +16430,7 @@ class Tokenizer {
16360
16430
  this.state = 33;
16361
16431
  this.entityStart = this.index;
16362
16432
  this.entityDecoder.startEntity(
16363
- this.baseState === 1 || this.baseState === 32 ? decode_js.DecodingMode.Legacy : decode_js.DecodingMode.Attribute
16433
+ this.baseState === 1 || this.baseState === 32 ? decode.DecodingMode.Legacy : decode.DecodingMode.Attribute
16364
16434
  );
16365
16435
  }
16366
16436
  }
@@ -16579,7 +16649,7 @@ class Tokenizer {
16579
16649
  this.sectionStart = this.entityStart + consumed;
16580
16650
  this.index = this.sectionStart - 1;
16581
16651
  this.cbs.onattribentity(
16582
- decode_js.fromCodePoint(cp),
16652
+ decode.fromCodePoint(cp),
16583
16653
  this.entityStart,
16584
16654
  this.sectionStart
16585
16655
  );
@@ -16590,7 +16660,7 @@ class Tokenizer {
16590
16660
  this.sectionStart = this.entityStart + consumed;
16591
16661
  this.index = this.sectionStart - 1;
16592
16662
  this.cbs.ontextentity(
16593
- decode_js.fromCodePoint(cp),
16663
+ decode.fromCodePoint(cp),
16594
16664
  this.entityStart,
16595
16665
  this.sectionStart
16596
16666
  );
@@ -16718,7 +16788,7 @@ const errorMessages = {
16718
16788
  [32]: `v-for has invalid expression.`,
16719
16789
  [33]: `<template v-for> key should be placed on the <template> tag.`,
16720
16790
  [34]: `v-bind is missing expression.`,
16721
- [52]: `v-bind with same-name shorthand only allows static argument.`,
16791
+ [53]: `v-bind with same-name shorthand only allows static argument.`,
16722
16792
  [35]: `v-on is missing expression.`,
16723
16793
  [36]: `Unexpected custom directive on <slot> outlet.`,
16724
16794
  [37]: `Mixed v-slot usage on both the component and nested <template>. When there are multiple named slots, all slots should use <template> syntax to avoid scope ambiguity.`,
@@ -16730,16 +16800,17 @@ const errorMessages = {
16730
16800
  [43]: `v-model cannot be used on v-for or v-slot scope variables because they are not writable.`,
16731
16801
  [44]: `v-model cannot be used on a prop, because local prop bindings are not writable.
16732
16802
  Use a v-bind binding combined with a v-on listener that emits update:x event instead.`,
16733
- [45]: `Error parsing JavaScript expression: `,
16734
- [46]: `<KeepAlive> expects exactly one child component.`,
16735
- [51]: `@vnode-* hooks in templates are no longer supported. Use the vue: prefix instead. For example, @vnode-mounted should be changed to @vue:mounted. @vnode-* hooks support has been removed in 3.4.`,
16803
+ [45]: `v-model cannot be used on a const binding because it is not writable.`,
16804
+ [46]: `Error parsing JavaScript expression: `,
16805
+ [47]: `<KeepAlive> expects exactly one child component.`,
16806
+ [52]: `@vnode-* hooks in templates are no longer supported. Use the vue: prefix instead. For example, @vnode-mounted should be changed to @vue:mounted. @vnode-* hooks support has been removed in 3.4.`,
16736
16807
  // generic errors
16737
- [47]: `"prefixIdentifiers" option is not supported in this build of compiler.`,
16738
- [48]: `ES module mode is not supported in this build of compiler.`,
16739
- [49]: `"cacheHandlers" option is only supported when the "prefixIdentifiers" option is enabled.`,
16740
- [50]: `"scopeId" option is only supported in module mode.`,
16808
+ [48]: `"prefixIdentifiers" option is not supported in this build of compiler.`,
16809
+ [49]: `ES module mode is not supported in this build of compiler.`,
16810
+ [50]: `"cacheHandlers" option is only supported when the "prefixIdentifiers" option is enabled.`,
16811
+ [51]: `"scopeId" option is only supported in module mode.`,
16741
16812
  // just to fulfill types
16742
- [53]: ``
16813
+ [54]: ``
16743
16814
  };
16744
16815
 
16745
16816
  function walkIdentifiers(root, onIdentifier, includeAll = false, parentStack = [], knownIds = /* @__PURE__ */ Object.create(null)) {
@@ -16756,8 +16827,7 @@ function walkIdentifiers(root, onIdentifier, includeAll = false, parentStack = [
16756
16827
  if (includeAll || isRefed && !isLocal) {
16757
16828
  onIdentifier(node, parent, parentStack, isRefed, isLocal);
16758
16829
  }
16759
- } else if (node.type === "ObjectProperty" && // eslint-disable-next-line no-restricted-syntax
16760
- (parent == null ? void 0 : parent.type) === "ObjectPattern") {
16830
+ } else if (node.type === "ObjectProperty" && (parent == null ? void 0 : parent.type) === "ObjectPattern") {
16761
16831
  node.inPattern = true;
16762
16832
  } else if (isFunctionType(node)) {
16763
16833
  if (node.scopeIds) {
@@ -17463,7 +17533,7 @@ const tokenizer = new Tokenizer(stack, {
17463
17533
  let exp = getSlice(innerStart, innerEnd);
17464
17534
  if (exp.includes("&")) {
17465
17535
  {
17466
- exp = decode_js.decodeHTML(exp);
17536
+ exp = decode.decodeHTML(exp);
17467
17537
  }
17468
17538
  }
17469
17539
  addNode({
@@ -18124,7 +18194,7 @@ function createExp(content, isStatic = false, loc, constType = 0, parseMode = 0
18124
18194
  }
18125
18195
  } catch (e) {
18126
18196
  exp.ast = false;
18127
- emitError(45, loc.start.offset, e.message);
18197
+ emitError(46, loc.start.offset, e.message);
18128
18198
  }
18129
18199
  }
18130
18200
  return exp;
@@ -19701,7 +19771,7 @@ function processExpression(node, context, asParams = false, asRawStatements = fa
19701
19771
  } catch (e) {
19702
19772
  context.onError(
19703
19773
  createCompilerError(
19704
- 45,
19774
+ 46,
19705
19775
  node.loc,
19706
19776
  void 0,
19707
19777
  e.message
@@ -20585,7 +20655,7 @@ const transformElement = (node, context) => {
20585
20655
  patchFlag |= 1024;
20586
20656
  if (node.children.length > 1) {
20587
20657
  context.onError(
20588
- createCompilerError(46, {
20658
+ createCompilerError(47, {
20589
20659
  start: node.children[0].loc.start,
20590
20660
  end: node.children[node.children.length - 1].loc.end,
20591
20661
  source: ""
@@ -21248,7 +21318,7 @@ const transformOn$1 = (dir, node, context, augmentor) => {
21248
21318
  if (arg.isStatic) {
21249
21319
  let rawName = arg.content;
21250
21320
  if (rawName.startsWith("vnode")) {
21251
- context.onError(createCompilerError(51, arg.loc));
21321
+ context.onError(createCompilerError(52, arg.loc));
21252
21322
  }
21253
21323
  if (rawName.startsWith("vue:")) {
21254
21324
  rawName = `vnode-${rawName.slice(4)}`;
@@ -21510,6 +21580,10 @@ const transformModel$1 = (dir, node, context) => {
21510
21580
  context.onError(createCompilerError(44, exp.loc));
21511
21581
  return createTransformProps();
21512
21582
  }
21583
+ if (bindingType === "literal-const" || bindingType === "setup-const") {
21584
+ context.onError(createCompilerError(45, exp.loc));
21585
+ return createTransformProps();
21586
+ }
21513
21587
  const maybeRef = context.inline && (bindingType === "setup-let" || bindingType === "setup-ref" || bindingType === "setup-maybe-ref");
21514
21588
  if (!expString.trim() || !isMemberExpression(exp, context) && !maybeRef) {
21515
21589
  context.onError(
@@ -21763,7 +21837,7 @@ const transformVBindShorthand = (node, context) => {
21763
21837
  if (arg.type !== 4 || !arg.isStatic) {
21764
21838
  context.onError(
21765
21839
  createCompilerError(
21766
- 52,
21840
+ 53,
21767
21841
  arg.loc
21768
21842
  )
21769
21843
  );
@@ -21811,10 +21885,10 @@ function baseCompile(source, options = {}) {
21811
21885
  const isModuleMode = options.mode === "module";
21812
21886
  const prefixIdentifiers = options.prefixIdentifiers === true || isModuleMode;
21813
21887
  if (!prefixIdentifiers && options.cacheHandlers) {
21814
- onError(createCompilerError(49));
21888
+ onError(createCompilerError(50));
21815
21889
  }
21816
21890
  if (options.scopeId && !isModuleMode) {
21817
- onError(createCompilerError(50));
21891
+ onError(createCompilerError(51));
21818
21892
  }
21819
21893
  const resolvedOptions = extend({}, options, {
21820
21894
  prefixIdentifiers
@@ -21848,26 +21922,26 @@ function baseCompile(source, options = {}) {
21848
21922
 
21849
21923
  const noopDirectiveTransform = () => ({ props: [] });
21850
21924
 
21851
- const V_MODEL_RADIO = Symbol(`vModelRadio` );
21852
- const V_MODEL_CHECKBOX = Symbol(
21925
+ const V_MODEL_RADIO = /* @__PURE__ */ Symbol(`vModelRadio` );
21926
+ const V_MODEL_CHECKBOX = /* @__PURE__ */ Symbol(
21853
21927
  `vModelCheckbox`
21854
21928
  );
21855
- const V_MODEL_TEXT = Symbol(`vModelText` );
21856
- const V_MODEL_SELECT = Symbol(
21929
+ const V_MODEL_TEXT = /* @__PURE__ */ Symbol(`vModelText` );
21930
+ const V_MODEL_SELECT = /* @__PURE__ */ Symbol(
21857
21931
  `vModelSelect`
21858
21932
  );
21859
- const V_MODEL_DYNAMIC = Symbol(
21933
+ const V_MODEL_DYNAMIC = /* @__PURE__ */ Symbol(
21860
21934
  `vModelDynamic`
21861
21935
  );
21862
- const V_ON_WITH_MODIFIERS = Symbol(
21936
+ const V_ON_WITH_MODIFIERS = /* @__PURE__ */ Symbol(
21863
21937
  `vOnModifiersGuard`
21864
21938
  );
21865
- const V_ON_WITH_KEYS = Symbol(
21939
+ const V_ON_WITH_KEYS = /* @__PURE__ */ Symbol(
21866
21940
  `vOnKeysGuard`
21867
21941
  );
21868
- const V_SHOW = Symbol(`vShow` );
21869
- const TRANSITION = Symbol(`Transition` );
21870
- const TRANSITION_GROUP = Symbol(
21942
+ const V_SHOW = /* @__PURE__ */ Symbol(`vShow` );
21943
+ const TRANSITION = /* @__PURE__ */ Symbol(`Transition` );
21944
+ const TRANSITION_GROUP = /* @__PURE__ */ Symbol(
21871
21945
  `TransitionGroup`
21872
21946
  );
21873
21947
  registerRuntimeHelpers({
@@ -21964,31 +22038,31 @@ function createDOMCompilerError(code, loc) {
21964
22038
  );
21965
22039
  }
21966
22040
  const DOMErrorMessages = {
21967
- [53]: `v-html is missing expression.`,
21968
- [54]: `v-html will override element children.`,
21969
- [55]: `v-text is missing expression.`,
21970
- [56]: `v-text will override element children.`,
21971
- [57]: `v-model can only be used on <input>, <textarea> and <select> elements.`,
21972
- [58]: `v-model argument is not supported on plain elements.`,
21973
- [59]: `v-model cannot be used on file inputs since they are read-only. Use a v-on:change listener instead.`,
21974
- [60]: `Unnecessary value binding used alongside v-model. It will interfere with v-model's behavior.`,
21975
- [61]: `v-show is missing expression.`,
21976
- [62]: `<Transition> expects exactly one child element or component.`,
21977
- [63]: `Tags with side effect (<script> and <style>) are ignored in client component templates.`,
22041
+ [54]: `v-html is missing expression.`,
22042
+ [55]: `v-html will override element children.`,
22043
+ [56]: `v-text is missing expression.`,
22044
+ [57]: `v-text will override element children.`,
22045
+ [58]: `v-model can only be used on <input>, <textarea> and <select> elements.`,
22046
+ [59]: `v-model argument is not supported on plain elements.`,
22047
+ [60]: `v-model cannot be used on file inputs since they are read-only. Use a v-on:change listener instead.`,
22048
+ [61]: `Unnecessary value binding used alongside v-model. It will interfere with v-model's behavior.`,
22049
+ [62]: `v-show is missing expression.`,
22050
+ [63]: `<Transition> expects exactly one child element or component.`,
22051
+ [64]: `Tags with side effect (<script> and <style>) are ignored in client component templates.`,
21978
22052
  // just to fulfill types
21979
- [64]: ``
22053
+ [65]: ``
21980
22054
  };
21981
22055
 
21982
22056
  const transformVHtml = (dir, node, context) => {
21983
22057
  const { exp, loc } = dir;
21984
22058
  if (!exp) {
21985
22059
  context.onError(
21986
- createDOMCompilerError(53, loc)
22060
+ createDOMCompilerError(54, loc)
21987
22061
  );
21988
22062
  }
21989
22063
  if (node.children.length) {
21990
22064
  context.onError(
21991
- createDOMCompilerError(54, loc)
22065
+ createDOMCompilerError(55, loc)
21992
22066
  );
21993
22067
  node.children.length = 0;
21994
22068
  }
@@ -22006,12 +22080,12 @@ const transformVText = (dir, node, context) => {
22006
22080
  const { exp, loc } = dir;
22007
22081
  if (!exp) {
22008
22082
  context.onError(
22009
- createDOMCompilerError(55, loc)
22083
+ createDOMCompilerError(56, loc)
22010
22084
  );
22011
22085
  }
22012
22086
  if (node.children.length) {
22013
22087
  context.onError(
22014
- createDOMCompilerError(56, loc)
22088
+ createDOMCompilerError(57, loc)
22015
22089
  );
22016
22090
  node.children.length = 0;
22017
22091
  }
@@ -22037,7 +22111,7 @@ const transformModel = (dir, node, context) => {
22037
22111
  if (dir.arg) {
22038
22112
  context.onError(
22039
22113
  createDOMCompilerError(
22040
- 58,
22114
+ 59,
22041
22115
  dir.arg.loc
22042
22116
  )
22043
22117
  );
@@ -22047,7 +22121,7 @@ const transformModel = (dir, node, context) => {
22047
22121
  if (value && isStaticArgOf(value.arg, "value")) {
22048
22122
  context.onError(
22049
22123
  createDOMCompilerError(
22050
- 60,
22124
+ 61,
22051
22125
  value.loc
22052
22126
  )
22053
22127
  );
@@ -22075,7 +22149,7 @@ const transformModel = (dir, node, context) => {
22075
22149
  isInvalidType = true;
22076
22150
  context.onError(
22077
22151
  createDOMCompilerError(
22078
- 59,
22152
+ 60,
22079
22153
  dir.loc
22080
22154
  )
22081
22155
  );
@@ -22101,7 +22175,7 @@ const transformModel = (dir, node, context) => {
22101
22175
  } else {
22102
22176
  context.onError(
22103
22177
  createDOMCompilerError(
22104
- 57,
22178
+ 58,
22105
22179
  dir.loc
22106
22180
  )
22107
22181
  );
@@ -22212,7 +22286,7 @@ const transformShow = (dir, node, context) => {
22212
22286
  const { exp, loc } = dir;
22213
22287
  if (!exp) {
22214
22288
  context.onError(
22215
- createDOMCompilerError(61, loc)
22289
+ createDOMCompilerError(62, loc)
22216
22290
  );
22217
22291
  }
22218
22292
  return {
@@ -22236,7 +22310,7 @@ function postTransformTransition(node, onError, hasMultipleChildren = defaultHas
22236
22310
  }
22237
22311
  if (hasMultipleChildren(node)) {
22238
22312
  onError(
22239
- createDOMCompilerError(62, {
22313
+ createDOMCompilerError(63, {
22240
22314
  start: node.children[0].loc.start,
22241
22315
  end: node.children[node.children.length - 1].loc.end,
22242
22316
  source: ""
@@ -22505,7 +22579,7 @@ const ignoreSideEffectTags = (node, context) => {
22505
22579
  if (node.type === 1 && node.tagType === 0 && (node.tag === "script" || node.tag === "style")) {
22506
22580
  context.onError(
22507
22581
  createDOMCompilerError(
22508
- 63,
22582
+ 64,
22509
22583
  node.loc
22510
22584
  )
22511
22585
  );