@vue/compat 3.5.25 → 3.5.27

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.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @vue/compat v3.5.25
2
+ * @vue/compat v3.5.27
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
@@ -932,13 +932,13 @@ var Vue = (function () {
932
932
  }
933
933
  }
934
934
  const targetMap = /* @__PURE__ */ new WeakMap();
935
- const ITERATE_KEY = Symbol(
935
+ const ITERATE_KEY = /* @__PURE__ */ Symbol(
936
936
  "Object iterate"
937
937
  );
938
- const MAP_KEY_ITERATE_KEY = Symbol(
938
+ const MAP_KEY_ITERATE_KEY = /* @__PURE__ */ Symbol(
939
939
  "Map keys iterate"
940
940
  );
941
- const ARRAY_ITERATE_KEY = Symbol(
941
+ const ARRAY_ITERATE_KEY = /* @__PURE__ */ Symbol(
942
942
  "Array iterate"
943
943
  );
944
944
  function track(target, type, key) {
@@ -1421,20 +1421,20 @@ var Vue = (function () {
1421
1421
  "iterate",
1422
1422
  isKeyOnly ? MAP_KEY_ITERATE_KEY : ITERATE_KEY
1423
1423
  );
1424
- return {
1425
- // iterator protocol
1426
- next() {
1427
- const { value, done } = innerIterator.next();
1428
- return done ? { value, done } : {
1429
- value: isPair ? [wrap(value[0]), wrap(value[1])] : wrap(value),
1430
- done
1431
- };
1432
- },
1433
- // iterable protocol
1434
- [Symbol.iterator]() {
1435
- return this;
1424
+ return extend(
1425
+ // inheriting all iterator properties
1426
+ Object.create(innerIterator),
1427
+ {
1428
+ // iterator protocol
1429
+ next() {
1430
+ const { value, done } = innerIterator.next();
1431
+ return done ? { value, done } : {
1432
+ value: isPair ? [wrap(value[0]), wrap(value[1])] : wrap(value),
1433
+ done
1434
+ };
1435
+ }
1436
1436
  }
1437
- };
1437
+ );
1438
1438
  };
1439
1439
  }
1440
1440
  function createReadonlyMethod(type) {
@@ -1648,8 +1648,9 @@ var Vue = (function () {
1648
1648
  function getTargetType(value) {
1649
1649
  return value["__v_skip"] || !Object.isExtensible(value) ? 0 /* INVALID */ : targetTypeMap(toRawType(value));
1650
1650
  }
1651
+ // @__NO_SIDE_EFFECTS__
1651
1652
  function reactive(target) {
1652
- if (isReadonly(target)) {
1653
+ if (/* @__PURE__ */ isReadonly(target)) {
1653
1654
  return target;
1654
1655
  }
1655
1656
  return createReactiveObject(
@@ -1660,6 +1661,7 @@ var Vue = (function () {
1660
1661
  reactiveMap
1661
1662
  );
1662
1663
  }
1664
+ // @__NO_SIDE_EFFECTS__
1663
1665
  function shallowReactive(target) {
1664
1666
  return createReactiveObject(
1665
1667
  target,
@@ -1669,6 +1671,7 @@ var Vue = (function () {
1669
1671
  shallowReactiveMap
1670
1672
  );
1671
1673
  }
1674
+ // @__NO_SIDE_EFFECTS__
1672
1675
  function readonly(target) {
1673
1676
  return createReactiveObject(
1674
1677
  target,
@@ -1678,6 +1681,7 @@ var Vue = (function () {
1678
1681
  readonlyMap
1679
1682
  );
1680
1683
  }
1684
+ // @__NO_SIDE_EFFECTS__
1681
1685
  function shallowReadonly(target) {
1682
1686
  return createReactiveObject(
1683
1687
  target,
@@ -1716,24 +1720,29 @@ var Vue = (function () {
1716
1720
  proxyMap.set(target, proxy);
1717
1721
  return proxy;
1718
1722
  }
1723
+ // @__NO_SIDE_EFFECTS__
1719
1724
  function isReactive(value) {
1720
- if (isReadonly(value)) {
1721
- return isReactive(value["__v_raw"]);
1725
+ if (/* @__PURE__ */ isReadonly(value)) {
1726
+ return /* @__PURE__ */ isReactive(value["__v_raw"]);
1722
1727
  }
1723
1728
  return !!(value && value["__v_isReactive"]);
1724
1729
  }
1730
+ // @__NO_SIDE_EFFECTS__
1725
1731
  function isReadonly(value) {
1726
1732
  return !!(value && value["__v_isReadonly"]);
1727
1733
  }
1734
+ // @__NO_SIDE_EFFECTS__
1728
1735
  function isShallow(value) {
1729
1736
  return !!(value && value["__v_isShallow"]);
1730
1737
  }
1738
+ // @__NO_SIDE_EFFECTS__
1731
1739
  function isProxy(value) {
1732
1740
  return value ? !!value["__v_raw"] : false;
1733
1741
  }
1742
+ // @__NO_SIDE_EFFECTS__
1734
1743
  function toRaw(observed) {
1735
1744
  const raw = observed && observed["__v_raw"];
1736
- return raw ? toRaw(raw) : observed;
1745
+ return raw ? /* @__PURE__ */ toRaw(raw) : observed;
1737
1746
  }
1738
1747
  function markRaw(value) {
1739
1748
  if (!hasOwn(value, "__v_skip") && Object.isExtensible(value)) {
@@ -1741,20 +1750,23 @@ var Vue = (function () {
1741
1750
  }
1742
1751
  return value;
1743
1752
  }
1744
- const toReactive = (value) => isObject(value) ? reactive(value) : value;
1745
- const toReadonly = (value) => isObject(value) ? readonly(value) : value;
1753
+ const toReactive = (value) => isObject(value) ? /* @__PURE__ */ reactive(value) : value;
1754
+ const toReadonly = (value) => isObject(value) ? /* @__PURE__ */ readonly(value) : value;
1746
1755
 
1756
+ // @__NO_SIDE_EFFECTS__
1747
1757
  function isRef(r) {
1748
1758
  return r ? r["__v_isRef"] === true : false;
1749
1759
  }
1760
+ // @__NO_SIDE_EFFECTS__
1750
1761
  function ref(value) {
1751
1762
  return createRef(value, false);
1752
1763
  }
1764
+ // @__NO_SIDE_EFFECTS__
1753
1765
  function shallowRef(value) {
1754
1766
  return createRef(value, true);
1755
1767
  }
1756
1768
  function createRef(rawValue, shallow) {
1757
- if (isRef(rawValue)) {
1769
+ if (/* @__PURE__ */ isRef(rawValue)) {
1758
1770
  return rawValue;
1759
1771
  }
1760
1772
  return new RefImpl(rawValue, shallow);
@@ -1810,7 +1822,7 @@ var Vue = (function () {
1810
1822
  }
1811
1823
  }
1812
1824
  function unref(ref2) {
1813
- return isRef(ref2) ? ref2.value : ref2;
1825
+ return /* @__PURE__ */ isRef(ref2) ? ref2.value : ref2;
1814
1826
  }
1815
1827
  function toValue(source) {
1816
1828
  return isFunction(source) ? source() : unref(source);
@@ -1819,7 +1831,7 @@ var Vue = (function () {
1819
1831
  get: (target, key, receiver) => key === "__v_raw" ? target : unref(Reflect.get(target, key, receiver)),
1820
1832
  set: (target, key, value, receiver) => {
1821
1833
  const oldValue = target[key];
1822
- if (isRef(oldValue) && !isRef(value)) {
1834
+ if (/* @__PURE__ */ isRef(oldValue) && !/* @__PURE__ */ isRef(value)) {
1823
1835
  oldValue.value = value;
1824
1836
  return true;
1825
1837
  } else {
@@ -1849,6 +1861,7 @@ var Vue = (function () {
1849
1861
  function customRef(factory) {
1850
1862
  return new CustomRefImpl(factory);
1851
1863
  }
1864
+ // @__NO_SIDE_EFFECTS__
1852
1865
  function toRefs(object) {
1853
1866
  if (!isProxy(object)) {
1854
1867
  warn$2(`toRefs() expects a reactive object but received a plain one.`);
@@ -1884,9 +1897,9 @@ var Vue = (function () {
1884
1897
  return this._value = val === void 0 ? this._defaultValue : val;
1885
1898
  }
1886
1899
  set value(newVal) {
1887
- if (this._shallow && isRef(this._raw[this._key])) {
1900
+ if (this._shallow && /* @__PURE__ */ isRef(this._raw[this._key])) {
1888
1901
  const nestedRef = this._object[this._key];
1889
- if (isRef(nestedRef)) {
1902
+ if (/* @__PURE__ */ isRef(nestedRef)) {
1890
1903
  nestedRef.value = newVal;
1891
1904
  return;
1892
1905
  }
@@ -1908,15 +1921,16 @@ var Vue = (function () {
1908
1921
  return this._value = this._getter();
1909
1922
  }
1910
1923
  }
1924
+ // @__NO_SIDE_EFFECTS__
1911
1925
  function toRef(source, key, defaultValue) {
1912
- if (isRef(source)) {
1926
+ if (/* @__PURE__ */ isRef(source)) {
1913
1927
  return source;
1914
1928
  } else if (isFunction(source)) {
1915
1929
  return new GetterRefImpl(source);
1916
1930
  } else if (isObject(source) && arguments.length > 1) {
1917
1931
  return propertyToRef(source, key, defaultValue);
1918
1932
  } else {
1919
- return ref(source);
1933
+ return /* @__PURE__ */ ref(source);
1920
1934
  }
1921
1935
  }
1922
1936
  function propertyToRef(source, key, defaultValue) {
@@ -1997,6 +2011,7 @@ var Vue = (function () {
1997
2011
  }
1998
2012
  }
1999
2013
  }
2014
+ // @__NO_SIDE_EFFECTS__
2000
2015
  function computed$1(getterOrOptions, debugOptions, isSSR = false) {
2001
2016
  let getter;
2002
2017
  let setter;
@@ -3306,65 +3321,6 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
3306
3321
  return instance.proxy;
3307
3322
  }
3308
3323
 
3309
- const compatModelEventPrefix = `onModelCompat:`;
3310
- const warnedTypes = /* @__PURE__ */ new WeakSet();
3311
- function convertLegacyVModelProps(vnode) {
3312
- const { type, shapeFlag, props, dynamicProps } = vnode;
3313
- const comp = type;
3314
- if (shapeFlag & 6 && props && "modelValue" in props) {
3315
- if (!isCompatEnabled(
3316
- "COMPONENT_V_MODEL",
3317
- // this is a special case where we want to use the vnode component's
3318
- // compat config instead of the current rendering instance (which is the
3319
- // parent of the component that exposes v-model)
3320
- { type }
3321
- )) {
3322
- return;
3323
- }
3324
- if (!warnedTypes.has(comp)) {
3325
- pushWarningContext(vnode);
3326
- warnDeprecation("COMPONENT_V_MODEL", { type }, comp);
3327
- popWarningContext();
3328
- warnedTypes.add(comp);
3329
- }
3330
- const model = comp.model || {};
3331
- applyModelFromMixins(model, comp.mixins);
3332
- const { prop = "value", event = "input" } = model;
3333
- if (prop !== "modelValue") {
3334
- props[prop] = props.modelValue;
3335
- delete props.modelValue;
3336
- }
3337
- if (dynamicProps) {
3338
- dynamicProps[dynamicProps.indexOf("modelValue")] = prop;
3339
- }
3340
- props[compatModelEventPrefix + event] = props["onUpdate:modelValue"];
3341
- delete props["onUpdate:modelValue"];
3342
- }
3343
- }
3344
- function applyModelFromMixins(model, mixins) {
3345
- if (mixins) {
3346
- mixins.forEach((m) => {
3347
- if (m.model) extend(model, m.model);
3348
- if (m.mixins) applyModelFromMixins(model, m.mixins);
3349
- });
3350
- }
3351
- }
3352
- function compatModelEmit(instance, event, args) {
3353
- if (!isCompatEnabled("COMPONENT_V_MODEL", instance)) {
3354
- return;
3355
- }
3356
- const props = instance.vnode.props;
3357
- const modelHandler = props && props[compatModelEventPrefix + event];
3358
- if (modelHandler) {
3359
- callWithErrorHandling(
3360
- modelHandler,
3361
- instance,
3362
- 6,
3363
- args
3364
- );
3365
- }
3366
- }
3367
-
3368
3324
  let currentRenderingInstance = null;
3369
3325
  let currentScopeId = null;
3370
3326
  function setCurrentRenderingInstance(instance) {
@@ -3515,7 +3471,152 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
3515
3471
  }
3516
3472
  }
3517
3473
 
3518
- const TeleportEndKey = Symbol("_vte");
3474
+ function provide(key, value) {
3475
+ {
3476
+ if (!currentInstance || currentInstance.isMounted) {
3477
+ warn$1(`provide() can only be used inside setup().`);
3478
+ }
3479
+ }
3480
+ if (currentInstance) {
3481
+ let provides = currentInstance.provides;
3482
+ const parentProvides = currentInstance.parent && currentInstance.parent.provides;
3483
+ if (parentProvides === provides) {
3484
+ provides = currentInstance.provides = Object.create(parentProvides);
3485
+ }
3486
+ provides[key] = value;
3487
+ }
3488
+ }
3489
+ function inject(key, defaultValue, treatDefaultAsFactory = false) {
3490
+ const instance = getCurrentInstance();
3491
+ if (instance || currentApp) {
3492
+ let provides = currentApp ? currentApp._context.provides : instance ? instance.parent == null || instance.ce ? instance.vnode.appContext && instance.vnode.appContext.provides : instance.parent.provides : void 0;
3493
+ if (provides && key in provides) {
3494
+ return provides[key];
3495
+ } else if (arguments.length > 1) {
3496
+ return treatDefaultAsFactory && isFunction(defaultValue) ? defaultValue.call(instance && instance.proxy) : defaultValue;
3497
+ } else {
3498
+ warn$1(`injection "${String(key)}" not found.`);
3499
+ }
3500
+ } else {
3501
+ warn$1(`inject() can only be used inside setup() or functional components.`);
3502
+ }
3503
+ }
3504
+ function hasInjectionContext() {
3505
+ return !!(getCurrentInstance() || currentApp);
3506
+ }
3507
+
3508
+ const ssrContextKey = /* @__PURE__ */ Symbol.for("v-scx");
3509
+ const useSSRContext = () => {
3510
+ {
3511
+ warn$1(`useSSRContext() is not supported in the global build.`);
3512
+ }
3513
+ };
3514
+
3515
+ function watchEffect(effect, options) {
3516
+ return doWatch(effect, null, options);
3517
+ }
3518
+ function watchPostEffect(effect, options) {
3519
+ return doWatch(
3520
+ effect,
3521
+ null,
3522
+ extend({}, options, { flush: "post" })
3523
+ );
3524
+ }
3525
+ function watchSyncEffect(effect, options) {
3526
+ return doWatch(
3527
+ effect,
3528
+ null,
3529
+ extend({}, options, { flush: "sync" })
3530
+ );
3531
+ }
3532
+ function watch(source, cb, options) {
3533
+ if (!isFunction(cb)) {
3534
+ warn$1(
3535
+ `\`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.`
3536
+ );
3537
+ }
3538
+ return doWatch(source, cb, options);
3539
+ }
3540
+ function doWatch(source, cb, options = EMPTY_OBJ) {
3541
+ const { immediate, deep, flush, once } = options;
3542
+ if (!cb) {
3543
+ if (immediate !== void 0) {
3544
+ warn$1(
3545
+ `watch() "immediate" option is only respected when using the watch(source, callback, options?) signature.`
3546
+ );
3547
+ }
3548
+ if (deep !== void 0) {
3549
+ warn$1(
3550
+ `watch() "deep" option is only respected when using the watch(source, callback, options?) signature.`
3551
+ );
3552
+ }
3553
+ if (once !== void 0) {
3554
+ warn$1(
3555
+ `watch() "once" option is only respected when using the watch(source, callback, options?) signature.`
3556
+ );
3557
+ }
3558
+ }
3559
+ const baseWatchOptions = extend({}, options);
3560
+ baseWatchOptions.onWarn = warn$1;
3561
+ const instance = currentInstance;
3562
+ baseWatchOptions.call = (fn, type, args) => callWithAsyncErrorHandling(fn, instance, type, args);
3563
+ let isPre = false;
3564
+ if (flush === "post") {
3565
+ baseWatchOptions.scheduler = (job) => {
3566
+ queuePostRenderEffect(job, instance && instance.suspense);
3567
+ };
3568
+ } else if (flush !== "sync") {
3569
+ isPre = true;
3570
+ baseWatchOptions.scheduler = (job, isFirstRun) => {
3571
+ if (isFirstRun) {
3572
+ job();
3573
+ } else {
3574
+ queueJob(job);
3575
+ }
3576
+ };
3577
+ }
3578
+ baseWatchOptions.augmentJob = (job) => {
3579
+ if (cb) {
3580
+ job.flags |= 4;
3581
+ }
3582
+ if (isPre) {
3583
+ job.flags |= 2;
3584
+ if (instance) {
3585
+ job.id = instance.uid;
3586
+ job.i = instance;
3587
+ }
3588
+ }
3589
+ };
3590
+ const watchHandle = watch$1(source, cb, baseWatchOptions);
3591
+ return watchHandle;
3592
+ }
3593
+ function instanceWatch(source, value, options) {
3594
+ const publicThis = this.proxy;
3595
+ const getter = isString(source) ? source.includes(".") ? createPathGetter(publicThis, source) : () => publicThis[source] : source.bind(publicThis, publicThis);
3596
+ let cb;
3597
+ if (isFunction(value)) {
3598
+ cb = value;
3599
+ } else {
3600
+ cb = value.handler;
3601
+ options = value;
3602
+ }
3603
+ const reset = setCurrentInstance(this);
3604
+ const res = doWatch(getter, cb.bind(publicThis), options);
3605
+ reset();
3606
+ return res;
3607
+ }
3608
+ function createPathGetter(ctx, path) {
3609
+ const segments = path.split(".");
3610
+ return () => {
3611
+ let cur = ctx;
3612
+ for (let i = 0; i < segments.length && cur; i++) {
3613
+ cur = cur[segments[i]];
3614
+ }
3615
+ return cur;
3616
+ };
3617
+ }
3618
+
3619
+ const TeleportEndKey = /* @__PURE__ */ Symbol("_vte");
3519
3620
  const isTeleport = (type) => type.__isTeleport;
3520
3621
  const isTeleportDisabled = (props) => props && (props.disabled || props.disabled === "");
3521
3622
  const isTeleportDeferred = (props) => props && (props.defer || props.defer === "");
@@ -3875,8 +3976,8 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
3875
3976
  return targetAnchor;
3876
3977
  }
3877
3978
 
3878
- const leaveCbKey = Symbol("_leaveCb");
3879
- const enterCbKey$1 = Symbol("_enterCb");
3979
+ const leaveCbKey = /* @__PURE__ */ Symbol("_leaveCb");
3980
+ const enterCbKey$1 = /* @__PURE__ */ Symbol("_enterCb");
3880
3981
  function useTransitionState() {
3881
3982
  const state = {
3882
3983
  isMounted: false,
@@ -4727,7 +4828,7 @@ Server rendered element contains more child nodes than client vdom.`
4727
4828
  logMismatchError();
4728
4829
  }
4729
4830
  if (forcePatch && (key.endsWith("value") || key === "indeterminate") || isOn(key) && !isReservedProp(key) || // force hydrate v-bind with .prop modifiers
4730
- key[0] === "." || isCustomElement) {
4831
+ key[0] === "." || isCustomElement && !isReservedProp(key)) {
4731
4832
  patchProp(el, key, null, props[key], void 0, parentComponent);
4732
4833
  }
4733
4834
  }
@@ -5410,7 +5511,9 @@ Server rendered element contains fewer child nodes than client vdom.`
5410
5511
  }
5411
5512
  function pruneCache(filter) {
5412
5513
  cache.forEach((vnode, key) => {
5413
- const name = getComponentName(vnode.type);
5514
+ const name = getComponentName(
5515
+ isAsyncWrapper(vnode) ? vnode.type.__asyncResolved || {} : vnode.type
5516
+ );
5414
5517
  if (name && !filter(name)) {
5415
5518
  pruneCacheEntry(key);
5416
5519
  }
@@ -5677,7 +5780,7 @@ Server rendered element contains fewer child nodes than client vdom.`
5677
5780
  function resolveComponent(name, maybeSelfReference) {
5678
5781
  return resolveAsset(COMPONENTS, name, true, maybeSelfReference) || name;
5679
5782
  }
5680
- const NULL_DYNAMIC_COMPONENT = Symbol.for("v-ndc");
5783
+ const NULL_DYNAMIC_COMPONENT = /* @__PURE__ */ Symbol.for("v-ndc");
5681
5784
  function resolveDynamicComponent(component) {
5682
5785
  if (isString(component)) {
5683
5786
  return resolveAsset(COMPONENTS, component, false) || component;
@@ -7239,7 +7342,7 @@ If this is a native custom element, make sure to exclude it from component resol
7239
7342
  return vm;
7240
7343
  }
7241
7344
  }
7242
- Vue.version = `2.6.14-compat:${"3.5.25"}`;
7345
+ Vue.version = `2.6.14-compat:${"3.5.27"}`;
7243
7346
  Vue.config = singletonApp.config;
7244
7347
  Vue.use = (plugin, ...options) => {
7245
7348
  if (plugin && isFunction(plugin.install)) {
@@ -7816,149 +7919,70 @@ If you want to remount the same app, move your app creation logic into a factory
7816
7919
  }
7817
7920
  let currentApp = null;
7818
7921
 
7819
- function provide(key, value) {
7820
- {
7821
- if (!currentInstance || currentInstance.isMounted) {
7822
- warn$1(`provide() can only be used inside setup().`);
7823
- }
7824
- }
7825
- if (currentInstance) {
7826
- let provides = currentInstance.provides;
7827
- const parentProvides = currentInstance.parent && currentInstance.parent.provides;
7828
- if (parentProvides === provides) {
7829
- provides = currentInstance.provides = Object.create(parentProvides);
7830
- }
7831
- provides[key] = value;
7832
- }
7833
- }
7834
- function inject(key, defaultValue, treatDefaultAsFactory = false) {
7835
- const instance = getCurrentInstance();
7836
- if (instance || currentApp) {
7837
- let provides = currentApp ? currentApp._context.provides : instance ? instance.parent == null || instance.ce ? instance.vnode.appContext && instance.vnode.appContext.provides : instance.parent.provides : void 0;
7838
- if (provides && key in provides) {
7839
- return provides[key];
7840
- } else if (arguments.length > 1) {
7841
- return treatDefaultAsFactory && isFunction(defaultValue) ? defaultValue.call(instance && instance.proxy) : defaultValue;
7842
- } else {
7843
- warn$1(`injection "${String(key)}" not found.`);
7922
+ const compatModelEventPrefix = `onModelCompat:`;
7923
+ const warnedTypes = /* @__PURE__ */ new WeakSet();
7924
+ function convertLegacyVModelProps(vnode) {
7925
+ const { type, shapeFlag, props, dynamicProps } = vnode;
7926
+ const comp = type;
7927
+ if (shapeFlag & 6 && props && "modelValue" in props) {
7928
+ if (!isCompatEnabled(
7929
+ "COMPONENT_V_MODEL",
7930
+ // this is a special case where we want to use the vnode component's
7931
+ // compat config instead of the current rendering instance (which is the
7932
+ // parent of the component that exposes v-model)
7933
+ { type }
7934
+ )) {
7935
+ return;
7844
7936
  }
7845
- } else {
7846
- warn$1(`inject() can only be used inside setup() or functional components.`);
7847
- }
7848
- }
7849
- function hasInjectionContext() {
7850
- return !!(getCurrentInstance() || currentApp);
7851
- }
7852
-
7853
- const ssrContextKey = Symbol.for("v-scx");
7854
- const useSSRContext = () => {
7855
- {
7856
- warn$1(`useSSRContext() is not supported in the global build.`);
7857
- }
7858
- };
7859
-
7860
- function watchEffect(effect, options) {
7861
- return doWatch(effect, null, options);
7862
- }
7863
- function watchPostEffect(effect, options) {
7864
- return doWatch(
7865
- effect,
7866
- null,
7867
- extend({}, options, { flush: "post" })
7868
- );
7869
- }
7870
- function watchSyncEffect(effect, options) {
7871
- return doWatch(
7872
- effect,
7873
- null,
7874
- extend({}, options, { flush: "sync" })
7875
- );
7876
- }
7877
- function watch(source, cb, options) {
7878
- if (!isFunction(cb)) {
7879
- warn$1(
7880
- `\`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.`
7881
- );
7882
- }
7883
- return doWatch(source, cb, options);
7884
- }
7885
- function doWatch(source, cb, options = EMPTY_OBJ) {
7886
- const { immediate, deep, flush, once } = options;
7887
- if (!cb) {
7888
- if (immediate !== void 0) {
7889
- warn$1(
7890
- `watch() "immediate" option is only respected when using the watch(source, callback, options?) signature.`
7937
+ if (!warnedTypes.has(comp)) {
7938
+ pushWarningContext(vnode);
7939
+ warnDeprecation(
7940
+ "COMPONENT_V_MODEL",
7941
+ {
7942
+ type,
7943
+ appContext: vnode.ctx && vnode.ctx.appContext || createAppContext()
7944
+ },
7945
+ comp
7891
7946
  );
7947
+ popWarningContext();
7948
+ warnedTypes.add(comp);
7892
7949
  }
7893
- if (deep !== void 0) {
7894
- warn$1(
7895
- `watch() "deep" option is only respected when using the watch(source, callback, options?) signature.`
7896
- );
7950
+ const model = comp.model || {};
7951
+ applyModelFromMixins(model, comp.mixins);
7952
+ const { prop = "value", event = "input" } = model;
7953
+ if (prop !== "modelValue") {
7954
+ props[prop] = props.modelValue;
7955
+ delete props.modelValue;
7897
7956
  }
7898
- if (once !== void 0) {
7899
- warn$1(
7900
- `watch() "once" option is only respected when using the watch(source, callback, options?) signature.`
7901
- );
7957
+ if (dynamicProps) {
7958
+ dynamicProps[dynamicProps.indexOf("modelValue")] = prop;
7902
7959
  }
7960
+ props[compatModelEventPrefix + event] = props["onUpdate:modelValue"];
7961
+ delete props["onUpdate:modelValue"];
7903
7962
  }
7904
- const baseWatchOptions = extend({}, options);
7905
- baseWatchOptions.onWarn = warn$1;
7906
- const instance = currentInstance;
7907
- baseWatchOptions.call = (fn, type, args) => callWithAsyncErrorHandling(fn, instance, type, args);
7908
- let isPre = false;
7909
- if (flush === "post") {
7910
- baseWatchOptions.scheduler = (job) => {
7911
- queuePostRenderEffect(job, instance && instance.suspense);
7912
- };
7913
- } else if (flush !== "sync") {
7914
- isPre = true;
7915
- baseWatchOptions.scheduler = (job, isFirstRun) => {
7916
- if (isFirstRun) {
7917
- job();
7918
- } else {
7919
- queueJob(job);
7920
- }
7921
- };
7922
- }
7923
- baseWatchOptions.augmentJob = (job) => {
7924
- if (cb) {
7925
- job.flags |= 4;
7926
- }
7927
- if (isPre) {
7928
- job.flags |= 2;
7929
- if (instance) {
7930
- job.id = instance.uid;
7931
- job.i = instance;
7932
- }
7933
- }
7934
- };
7935
- const watchHandle = watch$1(source, cb, baseWatchOptions);
7936
- return watchHandle;
7937
7963
  }
7938
- function instanceWatch(source, value, options) {
7939
- const publicThis = this.proxy;
7940
- const getter = isString(source) ? source.includes(".") ? createPathGetter(publicThis, source) : () => publicThis[source] : source.bind(publicThis, publicThis);
7941
- let cb;
7942
- if (isFunction(value)) {
7943
- cb = value;
7944
- } else {
7945
- cb = value.handler;
7946
- options = value;
7964
+ function applyModelFromMixins(model, mixins) {
7965
+ if (mixins) {
7966
+ mixins.forEach((m) => {
7967
+ if (m.model) extend(model, m.model);
7968
+ if (m.mixins) applyModelFromMixins(model, m.mixins);
7969
+ });
7947
7970
  }
7948
- const reset = setCurrentInstance(this);
7949
- const res = doWatch(getter, cb.bind(publicThis), options);
7950
- reset();
7951
- return res;
7952
7971
  }
7953
- function createPathGetter(ctx, path) {
7954
- const segments = path.split(".");
7955
- return () => {
7956
- let cur = ctx;
7957
- for (let i = 0; i < segments.length && cur; i++) {
7958
- cur = cur[segments[i]];
7959
- }
7960
- return cur;
7961
- };
7972
+ function compatModelEmit(instance, event, args) {
7973
+ if (!isCompatEnabled("COMPONENT_V_MODEL", instance)) {
7974
+ return;
7975
+ }
7976
+ const props = instance.vnode.props;
7977
+ const modelHandler = props && props[compatModelEventPrefix + event];
7978
+ if (modelHandler) {
7979
+ callWithErrorHandling(
7980
+ modelHandler,
7981
+ instance,
7982
+ 6,
7983
+ args
7984
+ );
7985
+ }
7962
7986
  }
7963
7987
 
7964
7988
  function useModel(props, name, options = EMPTY_OBJ) {
@@ -9244,7 +9268,15 @@ If you want to remount the same app, move your app creation logic into a factory
9244
9268
  } else {
9245
9269
  const el = n2.el = n1.el;
9246
9270
  if (n2.children !== n1.children) {
9247
- hostSetText(el, n2.children);
9271
+ if (isHmrUpdating && n2.patchFlag === -1 && "__elIndex" in n1) {
9272
+ const childNodes = container.childNodes;
9273
+ const newChild = hostCreateText(n2.children);
9274
+ const oldChild = childNodes[n2.__elIndex = n1.__elIndex];
9275
+ hostInsert(newChild, container, oldChild);
9276
+ hostRemove(oldChild);
9277
+ } else {
9278
+ hostSetText(el, n2.children);
9279
+ }
9248
9280
  }
9249
9281
  }
9250
9282
  };
@@ -9630,7 +9662,7 @@ If you want to remount the same app, move your app creation logic into a factory
9630
9662
  } else {
9631
9663
  if (patchFlag > 0 && patchFlag & 64 && dynamicChildren && // #2715 the previous fragment could've been a BAILed one as a result
9632
9664
  // of renderSlot() with no valid children
9633
- n1.dynamicChildren) {
9665
+ n1.dynamicChildren && n1.dynamicChildren.length === dynamicChildren.length) {
9634
9666
  patchBlockChildren(
9635
9667
  n1.dynamicChildren,
9636
9668
  dynamicChildren,
@@ -10244,8 +10276,8 @@ If you want to remount the same app, move your app creation logic into a factory
10244
10276
  const nextChild = c2[nextIndex];
10245
10277
  const anchorVNode = c2[nextIndex + 1];
10246
10278
  const anchor = nextIndex + 1 < l2 ? (
10247
- // #13559, fallback to el placeholder for unresolved async component
10248
- anchorVNode.el || anchorVNode.placeholder
10279
+ // #13559, #14173 fallback to el placeholder for unresolved async component
10280
+ anchorVNode.el || resolveAsyncComponentPlaceholder(anchorVNode)
10249
10281
  ) : parentAnchor;
10250
10282
  if (newIndexToOldIndexMap[i] === 0) {
10251
10283
  patch(
@@ -10510,9 +10542,11 @@ If you want to remount the same app, move your app creation logic into a factory
10510
10542
  };
10511
10543
  let isFlushing = false;
10512
10544
  const render = (vnode, container, namespace) => {
10545
+ let instance;
10513
10546
  if (vnode == null) {
10514
10547
  if (container._vnode) {
10515
10548
  unmount(container._vnode, null, null, true);
10549
+ instance = container._vnode.component;
10516
10550
  }
10517
10551
  } else {
10518
10552
  patch(
@@ -10528,7 +10562,7 @@ If you want to remount the same app, move your app creation logic into a factory
10528
10562
  container._vnode = vnode;
10529
10563
  if (!isFlushing) {
10530
10564
  isFlushing = true;
10531
- flushPreFlushCbs();
10565
+ flushPreFlushCbs(instance);
10532
10566
  flushPostFlushCbs();
10533
10567
  isFlushing = false;
10534
10568
  }
@@ -10588,9 +10622,13 @@ If you want to remount the same app, move your app creation logic into a factory
10588
10622
  if (!shallow && c2.patchFlag !== -2)
10589
10623
  traverseStaticChildren(c1, c2);
10590
10624
  }
10591
- if (c2.type === Text && // avoid cached text nodes retaining detached dom nodes
10592
- c2.patchFlag !== -1) {
10593
- c2.el = c1.el;
10625
+ if (c2.type === Text) {
10626
+ if (c2.patchFlag !== -1) {
10627
+ c2.el = c1.el;
10628
+ } else {
10629
+ c2.__elIndex = i + // take fragment start anchor into account
10630
+ (n1.type === Fragment ? 1 : 0);
10631
+ }
10594
10632
  }
10595
10633
  if (c2.type === Comment && !c2.el) {
10596
10634
  c2.el = c1.el;
@@ -10657,6 +10695,16 @@ If you want to remount the same app, move your app creation logic into a factory
10657
10695
  hooks[i].flags |= 8;
10658
10696
  }
10659
10697
  }
10698
+ function resolveAsyncComponentPlaceholder(anchorVnode) {
10699
+ if (anchorVnode.placeholder) {
10700
+ return anchorVnode.placeholder;
10701
+ }
10702
+ const instance = anchorVnode.component;
10703
+ if (instance) {
10704
+ return resolveAsyncComponentPlaceholder(instance.subTree);
10705
+ }
10706
+ return null;
10707
+ }
10660
10708
 
10661
10709
  const isSuspense = (type) => type.__isSuspense;
10662
10710
  let suspenseId = 0;
@@ -11316,10 +11364,10 @@ If you want to remount the same app, move your app creation logic into a factory
11316
11364
  return comp;
11317
11365
  }
11318
11366
 
11319
- const Fragment = Symbol.for("v-fgt");
11320
- const Text = Symbol.for("v-txt");
11321
- const Comment = Symbol.for("v-cmt");
11322
- const Static = Symbol.for("v-stc");
11367
+ const Fragment = /* @__PURE__ */ Symbol.for("v-fgt");
11368
+ const Text = /* @__PURE__ */ Symbol.for("v-txt");
11369
+ const Comment = /* @__PURE__ */ Symbol.for("v-cmt");
11370
+ const Static = /* @__PURE__ */ Symbol.for("v-stc");
11323
11371
  const blockStack = [];
11324
11372
  let currentBlock = null;
11325
11373
  function openBlock(disableTracking = false) {
@@ -12371,7 +12419,7 @@ Component that was made reactive: `,
12371
12419
  return true;
12372
12420
  }
12373
12421
 
12374
- const version = "3.5.25";
12422
+ const version = "3.5.27";
12375
12423
  const warn = warn$1 ;
12376
12424
  const ErrorTypeStrings = ErrorTypeStrings$1 ;
12377
12425
  const devtools = devtools$1 ;
@@ -12471,7 +12519,7 @@ Component that was made reactive: `,
12471
12519
 
12472
12520
  const TRANSITION = "transition";
12473
12521
  const ANIMATION = "animation";
12474
- const vtcKey = Symbol("_vtc");
12522
+ const vtcKey = /* @__PURE__ */ Symbol("_vtc");
12475
12523
  const DOMTransitionPropsValidators = {
12476
12524
  name: String,
12477
12525
  type: String,
@@ -12801,8 +12849,8 @@ Component that was made reactive: `,
12801
12849
  }
12802
12850
  }
12803
12851
 
12804
- const vShowOriginalDisplay = Symbol("_vod");
12805
- const vShowHidden = Symbol("_vsh");
12852
+ const vShowOriginalDisplay = /* @__PURE__ */ Symbol("_vod");
12853
+ const vShowHidden = /* @__PURE__ */ Symbol("_vsh");
12806
12854
  const vShow = {
12807
12855
  // used for prop mismatch check during hydration
12808
12856
  name: "show",
@@ -12844,7 +12892,7 @@ Component that was made reactive: `,
12844
12892
  el[vShowHidden] = !value;
12845
12893
  }
12846
12894
 
12847
- const CSS_VAR_TEXT = Symbol("CSS_VAR_TEXT" );
12895
+ const CSS_VAR_TEXT = /* @__PURE__ */ Symbol("CSS_VAR_TEXT" );
12848
12896
  function useCssVars(getter) {
12849
12897
  const instance = getCurrentInstance();
12850
12898
  if (!instance) {
@@ -13042,7 +13090,7 @@ Component that was made reactive: `,
13042
13090
  const isEnumeratedAttr = /* @__PURE__ */ makeMap("contenteditable,draggable,spellcheck") ;
13043
13091
  function compatCoerceAttr(el, key, value, instance = null) {
13044
13092
  if (isEnumeratedAttr(key)) {
13045
- const v2CoercedValue = value === null ? "false" : typeof value !== "boolean" && value !== void 0 ? "true" : null;
13093
+ const v2CoercedValue = value === void 0 ? null : value === null || value === false || value === "false" ? "false" : "true";
13046
13094
  if (v2CoercedValue && compatUtils.softAssertCompatEnabled(
13047
13095
  "ATTR_ENUMERATED_COERCION",
13048
13096
  instance,
@@ -13138,7 +13186,7 @@ Component that was made reactive: `,
13138
13186
  function removeEventListener(el, event, handler, options) {
13139
13187
  el.removeEventListener(event, handler, options);
13140
13188
  }
13141
- const veiKey = Symbol("_vei");
13189
+ const veiKey = /* @__PURE__ */ Symbol("_vei");
13142
13190
  function patchEvent(el, rawName, prevValue, nextValue, instance = null) {
13143
13191
  const invokers = el[veiKey] || (el[veiKey] = {});
13144
13192
  const existingInvoker = invokers[rawName];
@@ -13764,8 +13812,8 @@ Expected function or array of functions, received type ${typeof value}.`
13764
13812
 
13765
13813
  const positionMap = /* @__PURE__ */ new WeakMap();
13766
13814
  const newPositionMap = /* @__PURE__ */ new WeakMap();
13767
- const moveCbKey = Symbol("_moveCb");
13768
- const enterCbKey = Symbol("_enterCb");
13815
+ const moveCbKey = /* @__PURE__ */ Symbol("_moveCb");
13816
+ const enterCbKey = /* @__PURE__ */ Symbol("_enterCb");
13769
13817
  const decorate = (t) => {
13770
13818
  delete t.props.mode;
13771
13819
  {
@@ -13927,7 +13975,7 @@ Expected function or array of functions, received type ${typeof value}.`
13927
13975
  target.dispatchEvent(new Event("input"));
13928
13976
  }
13929
13977
  }
13930
- const assignKey = Symbol("_assign");
13978
+ const assignKey = /* @__PURE__ */ Symbol("_assign");
13931
13979
  function castValue(value, trim, number) {
13932
13980
  if (trim) value = value.trim();
13933
13981
  if (number) value = looseToNumber(value);