vue 3.2.8 → 3.2.12

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.
@@ -1534,41 +1534,33 @@ var Vue = (function (exports) {
1534
1534
  const id = instance.type.__hmrId;
1535
1535
  let record = map.get(id);
1536
1536
  if (!record) {
1537
- createRecord(id, instance.type);
1537
+ createRecord(id);
1538
1538
  record = map.get(id);
1539
1539
  }
1540
- record.instances.add(instance);
1540
+ record.add(instance);
1541
1541
  }
1542
1542
  function unregisterHMR(instance) {
1543
- map.get(instance.type.__hmrId).instances.delete(instance);
1543
+ map.get(instance.type.__hmrId).delete(instance);
1544
1544
  }
1545
- function createRecord(id, component) {
1546
- if (!component) {
1547
- warn$1(`HMR API usage is out of date.\n` +
1548
- `Please upgrade vue-loader/vite/rollup-plugin-vue or other relevant ` +
1549
- `dependency that handles Vue SFC compilation.`);
1550
- component = {};
1551
- }
1545
+ function createRecord(id) {
1552
1546
  if (map.has(id)) {
1553
1547
  return false;
1554
1548
  }
1555
- map.set(id, {
1556
- component: isClassComponent(component) ? component.__vccOpts : component,
1557
- instances: new Set()
1558
- });
1549
+ map.set(id, new Set());
1559
1550
  return true;
1560
1551
  }
1552
+ function normalizeClassComponent(component) {
1553
+ return isClassComponent(component) ? component.__vccOpts : component;
1554
+ }
1561
1555
  function rerender(id, newRender) {
1562
1556
  const record = map.get(id);
1563
- if (!record)
1557
+ if (!record) {
1564
1558
  return;
1565
- if (newRender)
1566
- record.component.render = newRender;
1567
- // Array.from creates a snapshot which avoids the set being mutated during
1568
- // updates
1569
- Array.from(record.instances).forEach(instance => {
1559
+ }
1560
+ [...record].forEach(instance => {
1570
1561
  if (newRender) {
1571
1562
  instance.render = newRender;
1563
+ normalizeClassComponent(instance.type).render = newRender;
1572
1564
  }
1573
1565
  instance.renderCache = [];
1574
1566
  // this flag forces child components with slot content to update
@@ -1581,34 +1573,31 @@ var Vue = (function (exports) {
1581
1573
  const record = map.get(id);
1582
1574
  if (!record)
1583
1575
  return;
1584
- // Array.from creates a snapshot which avoids the set being mutated during
1585
- // updates
1586
- const { component, instances } = record;
1587
- if (!hmrDirtyComponents.has(component)) {
1588
- // 1. Update existing comp definition to match new one
1589
- newComp = isClassComponent(newComp) ? newComp.__vccOpts : newComp;
1590
- extend(component, newComp);
1591
- for (const key in component) {
1592
- if (key !== '__file' && !(key in newComp)) {
1593
- delete component[key];
1594
- }
1595
- }
1596
- // 2. Mark component dirty. This forces the renderer to replace the component
1597
- // on patch.
1598
- hmrDirtyComponents.add(component);
1599
- // 3. Make sure to unmark the component after the reload.
1600
- queuePostFlushCb(() => {
1601
- hmrDirtyComponents.delete(component);
1602
- });
1603
- }
1604
- Array.from(instances).forEach(instance => {
1605
- // invalidate options resolution cache
1576
+ newComp = normalizeClassComponent(newComp);
1577
+ // create a snapshot which avoids the set being mutated during updates
1578
+ const instances = [...record];
1579
+ for (const instance of instances) {
1580
+ const oldComp = normalizeClassComponent(instance.type);
1581
+ if (!hmrDirtyComponents.has(oldComp)) {
1582
+ // 1. Update existing comp definition to match new one
1583
+ extend(oldComp, newComp);
1584
+ for (const key in oldComp) {
1585
+ if (key !== '__file' && !(key in newComp)) {
1586
+ delete oldComp[key];
1587
+ }
1588
+ }
1589
+ // 2. mark definition dirty. This forces the renderer to replace the
1590
+ // component on patch.
1591
+ hmrDirtyComponents.add(oldComp);
1592
+ }
1593
+ // 3. invalidate options resolution cache
1606
1594
  instance.appContext.optionsCache.delete(instance.type);
1595
+ // 4. actually update
1607
1596
  if (instance.ceReload) {
1608
1597
  // custom element
1609
- hmrDirtyComponents.add(component);
1598
+ hmrDirtyComponents.add(oldComp);
1610
1599
  instance.ceReload(newComp.styles);
1611
- hmrDirtyComponents.delete(component);
1600
+ hmrDirtyComponents.delete(oldComp);
1612
1601
  }
1613
1602
  else if (instance.parent) {
1614
1603
  // 4. Force the parent instance to re-render. This will cause all updated
@@ -1633,6 +1622,12 @@ var Vue = (function (exports) {
1633
1622
  else {
1634
1623
  console.warn('[HMR] Root or manually mounted instance modified. Full reload required.');
1635
1624
  }
1625
+ }
1626
+ // 5. make sure to cleanup dirty hmr components after update
1627
+ queuePostFlushCb(() => {
1628
+ for (const instance of instances) {
1629
+ hmrDirtyComponents.delete(normalizeClassComponent(instance.type));
1630
+ }
1636
1631
  });
1637
1632
  }
1638
1633
  function tryWrap(fn) {
@@ -1694,335 +1689,6 @@ var Vue = (function (exports) {
1694
1689
  exports.devtools.emit("component:emit" /* COMPONENT_EMIT */, component.appContext.app, component, event, params);
1695
1690
  }
1696
1691
 
1697
- const deprecationData = {
1698
- ["GLOBAL_MOUNT" /* GLOBAL_MOUNT */]: {
1699
- message: `The global app bootstrapping API has changed: vm.$mount() and the "el" ` +
1700
- `option have been removed. Use createApp(RootComponent).mount() instead.`,
1701
- link: `https://v3.vuejs.org/guide/migration/global-api.html#mounting-app-instance`
1702
- },
1703
- ["GLOBAL_MOUNT_CONTAINER" /* GLOBAL_MOUNT_CONTAINER */]: {
1704
- message: `Vue detected directives on the mount container. ` +
1705
- `In Vue 3, the container is no longer considered part of the template ` +
1706
- `and will not be processed/replaced.`,
1707
- link: `https://v3.vuejs.org/guide/migration/mount-changes.html`
1708
- },
1709
- ["GLOBAL_EXTEND" /* GLOBAL_EXTEND */]: {
1710
- message: `Vue.extend() has been removed in Vue 3. ` +
1711
- `Use defineComponent() instead.`,
1712
- link: `https://v3.vuejs.org/api/global-api.html#definecomponent`
1713
- },
1714
- ["GLOBAL_PROTOTYPE" /* GLOBAL_PROTOTYPE */]: {
1715
- message: `Vue.prototype is no longer available in Vue 3. ` +
1716
- `Use app.config.globalProperties instead.`,
1717
- link: `https://v3.vuejs.org/guide/migration/global-api.html#vue-prototype-replaced-by-config-globalproperties`
1718
- },
1719
- ["GLOBAL_SET" /* GLOBAL_SET */]: {
1720
- message: `Vue.set() has been removed as it is no longer needed in Vue 3. ` +
1721
- `Simply use native JavaScript mutations.`
1722
- },
1723
- ["GLOBAL_DELETE" /* GLOBAL_DELETE */]: {
1724
- message: `Vue.delete() has been removed as it is no longer needed in Vue 3. ` +
1725
- `Simply use native JavaScript mutations.`
1726
- },
1727
- ["GLOBAL_OBSERVABLE" /* GLOBAL_OBSERVABLE */]: {
1728
- message: `Vue.observable() has been removed. ` +
1729
- `Use \`import { reactive } from "vue"\` from Composition API instead.`,
1730
- link: `https://v3.vuejs.org/api/basic-reactivity.html`
1731
- },
1732
- ["GLOBAL_PRIVATE_UTIL" /* GLOBAL_PRIVATE_UTIL */]: {
1733
- message: `Vue.util has been removed. Please refactor to avoid its usage ` +
1734
- `since it was an internal API even in Vue 2.`
1735
- },
1736
- ["CONFIG_SILENT" /* CONFIG_SILENT */]: {
1737
- message: `config.silent has been removed because it is not good practice to ` +
1738
- `intentionally suppress warnings. You can use your browser console's ` +
1739
- `filter features to focus on relevant messages.`
1740
- },
1741
- ["CONFIG_DEVTOOLS" /* CONFIG_DEVTOOLS */]: {
1742
- message: `config.devtools has been removed. To enable devtools for ` +
1743
- `production, configure the __VUE_PROD_DEVTOOLS__ compile-time flag.`,
1744
- link: `https://github.com/vuejs/vue-next/tree/master/packages/vue#bundler-build-feature-flags`
1745
- },
1746
- ["CONFIG_KEY_CODES" /* CONFIG_KEY_CODES */]: {
1747
- message: `config.keyCodes has been removed. ` +
1748
- `In Vue 3, you can directly use the kebab-case key names as v-on modifiers.`,
1749
- link: `https://v3.vuejs.org/guide/migration/keycode-modifiers.html`
1750
- },
1751
- ["CONFIG_PRODUCTION_TIP" /* CONFIG_PRODUCTION_TIP */]: {
1752
- message: `config.productionTip has been removed.`,
1753
- link: `https://v3.vuejs.org/guide/migration/global-api.html#config-productiontip-removed`
1754
- },
1755
- ["CONFIG_IGNORED_ELEMENTS" /* CONFIG_IGNORED_ELEMENTS */]: {
1756
- message: () => {
1757
- let msg = `config.ignoredElements has been removed.`;
1758
- if (isRuntimeOnly()) {
1759
- msg += ` Pass the "isCustomElement" option to @vue/compiler-dom instead.`;
1760
- }
1761
- else {
1762
- msg += ` Use config.isCustomElement instead.`;
1763
- }
1764
- return msg;
1765
- },
1766
- link: `https://v3.vuejs.org/guide/migration/global-api.html#config-ignoredelements-is-now-config-iscustomelement`
1767
- },
1768
- ["CONFIG_WHITESPACE" /* CONFIG_WHITESPACE */]: {
1769
- // this warning is only relevant in the full build when using runtime
1770
- // compilation, so it's put in the runtime compatConfig list.
1771
- message: `Vue 3 compiler's whitespace option will default to "condense" instead of ` +
1772
- `"preserve". To suppress this warning, provide an explicit value for ` +
1773
- `\`config.compilerOptions.whitespace\`.`
1774
- },
1775
- ["CONFIG_OPTION_MERGE_STRATS" /* CONFIG_OPTION_MERGE_STRATS */]: {
1776
- message: `config.optionMergeStrategies no longer exposes internal strategies. ` +
1777
- `Use custom merge functions instead.`
1778
- },
1779
- ["INSTANCE_SET" /* INSTANCE_SET */]: {
1780
- message: `vm.$set() has been removed as it is no longer needed in Vue 3. ` +
1781
- `Simply use native JavaScript mutations.`
1782
- },
1783
- ["INSTANCE_DELETE" /* INSTANCE_DELETE */]: {
1784
- message: `vm.$delete() has been removed as it is no longer needed in Vue 3. ` +
1785
- `Simply use native JavaScript mutations.`
1786
- },
1787
- ["INSTANCE_DESTROY" /* INSTANCE_DESTROY */]: {
1788
- message: `vm.$destroy() has been removed. Use app.unmount() instead.`,
1789
- link: `https://v3.vuejs.org/api/application-api.html#unmount`
1790
- },
1791
- ["INSTANCE_EVENT_EMITTER" /* INSTANCE_EVENT_EMITTER */]: {
1792
- message: `vm.$on/$once/$off() have been removed. ` +
1793
- `Use an external event emitter library instead.`,
1794
- link: `https://v3.vuejs.org/guide/migration/events-api.html`
1795
- },
1796
- ["INSTANCE_EVENT_HOOKS" /* INSTANCE_EVENT_HOOKS */]: {
1797
- message: event => `"${event}" lifecycle events are no longer supported. From templates, ` +
1798
- `use the "vnode" prefix instead of "hook:". For example, @${event} ` +
1799
- `should be changed to @vnode-${event.slice(5)}. ` +
1800
- `From JavaScript, use Composition API to dynamically register lifecycle ` +
1801
- `hooks.`,
1802
- link: `https://v3.vuejs.org/guide/migration/vnode-lifecycle-events.html`
1803
- },
1804
- ["INSTANCE_CHILDREN" /* INSTANCE_CHILDREN */]: {
1805
- message: `vm.$children has been removed. Consider refactoring your logic ` +
1806
- `to avoid relying on direct access to child components.`,
1807
- link: `https://v3.vuejs.org/guide/migration/children.html`
1808
- },
1809
- ["INSTANCE_LISTENERS" /* INSTANCE_LISTENERS */]: {
1810
- message: `vm.$listeners has been removed. In Vue 3, parent v-on listeners are ` +
1811
- `included in vm.$attrs and it is no longer necessary to separately use ` +
1812
- `v-on="$listeners" if you are already using v-bind="$attrs". ` +
1813
- `(Note: the Vue 3 behavior only applies if this compat config is disabled)`,
1814
- link: `https://v3.vuejs.org/guide/migration/listeners-removed.html`
1815
- },
1816
- ["INSTANCE_SCOPED_SLOTS" /* INSTANCE_SCOPED_SLOTS */]: {
1817
- message: `vm.$scopedSlots has been removed. Use vm.$slots instead.`,
1818
- link: `https://v3.vuejs.org/guide/migration/slots-unification.html`
1819
- },
1820
- ["INSTANCE_ATTRS_CLASS_STYLE" /* INSTANCE_ATTRS_CLASS_STYLE */]: {
1821
- message: componentName => `Component <${componentName || 'Anonymous'}> has \`inheritAttrs: false\` but is ` +
1822
- `relying on class/style fallthrough from parent. In Vue 3, class/style ` +
1823
- `are now included in $attrs and will no longer fallthrough when ` +
1824
- `inheritAttrs is false. If you are already using v-bind="$attrs" on ` +
1825
- `component root it should render the same end result. ` +
1826
- `If you are binding $attrs to a non-root element and expecting ` +
1827
- `class/style to fallthrough on root, you will need to now manually bind ` +
1828
- `them on root via :class="$attrs.class".`,
1829
- link: `https://v3.vuejs.org/guide/migration/attrs-includes-class-style.html`
1830
- },
1831
- ["OPTIONS_DATA_FN" /* OPTIONS_DATA_FN */]: {
1832
- message: `The "data" option can no longer be a plain object. ` +
1833
- `Always use a function.`,
1834
- link: `https://v3.vuejs.org/guide/migration/data-option.html`
1835
- },
1836
- ["OPTIONS_DATA_MERGE" /* OPTIONS_DATA_MERGE */]: {
1837
- message: (key) => `Detected conflicting key "${key}" when merging data option values. ` +
1838
- `In Vue 3, data keys are merged shallowly and will override one another.`,
1839
- link: `https://v3.vuejs.org/guide/migration/data-option.html#mixin-merge-behavior-change`
1840
- },
1841
- ["OPTIONS_BEFORE_DESTROY" /* OPTIONS_BEFORE_DESTROY */]: {
1842
- message: `\`beforeDestroy\` has been renamed to \`beforeUnmount\`.`
1843
- },
1844
- ["OPTIONS_DESTROYED" /* OPTIONS_DESTROYED */]: {
1845
- message: `\`destroyed\` has been renamed to \`unmounted\`.`
1846
- },
1847
- ["WATCH_ARRAY" /* WATCH_ARRAY */]: {
1848
- message: `"watch" option or vm.$watch on an array value will no longer ` +
1849
- `trigger on array mutation unless the "deep" option is specified. ` +
1850
- `If current usage is intended, you can disable the compat behavior and ` +
1851
- `suppress this warning with:` +
1852
- `\n\n configureCompat({ ${"WATCH_ARRAY" /* WATCH_ARRAY */}: false })\n`,
1853
- link: `https://v3.vuejs.org/guide/migration/watch.html`
1854
- },
1855
- ["PROPS_DEFAULT_THIS" /* PROPS_DEFAULT_THIS */]: {
1856
- message: (key) => `props default value function no longer has access to "this". The compat ` +
1857
- `build only offers access to this.$options.` +
1858
- `(found in prop "${key}")`,
1859
- link: `https://v3.vuejs.org/guide/migration/props-default-this.html`
1860
- },
1861
- ["CUSTOM_DIR" /* CUSTOM_DIR */]: {
1862
- message: (legacyHook, newHook) => `Custom directive hook "${legacyHook}" has been removed. ` +
1863
- `Use "${newHook}" instead.`,
1864
- link: `https://v3.vuejs.org/guide/migration/custom-directives.html`
1865
- },
1866
- ["V_FOR_REF" /* V_FOR_REF */]: {
1867
- message: `Ref usage on v-for no longer creates array ref values in Vue 3. ` +
1868
- `Consider using function refs or refactor to avoid ref usage altogether.`,
1869
- link: `https://v3.vuejs.org/guide/migration/array-refs.html`
1870
- },
1871
- ["V_ON_KEYCODE_MODIFIER" /* V_ON_KEYCODE_MODIFIER */]: {
1872
- message: `Using keyCode as v-on modifier is no longer supported. ` +
1873
- `Use kebab-case key name modifiers instead.`,
1874
- link: `https://v3.vuejs.org/guide/migration/keycode-modifiers.html`
1875
- },
1876
- ["ATTR_FALSE_VALUE" /* ATTR_FALSE_VALUE */]: {
1877
- message: (name) => `Attribute "${name}" with v-bind value \`false\` will render ` +
1878
- `${name}="false" instead of removing it in Vue 3. To remove the attribute, ` +
1879
- `use \`null\` or \`undefined\` instead. If the usage is intended, ` +
1880
- `you can disable the compat behavior and suppress this warning with:` +
1881
- `\n\n configureCompat({ ${"ATTR_FALSE_VALUE" /* ATTR_FALSE_VALUE */}: false })\n`,
1882
- link: `https://v3.vuejs.org/guide/migration/attribute-coercion.html`
1883
- },
1884
- ["ATTR_ENUMERATED_COERCION" /* ATTR_ENUMERATED_COERCION */]: {
1885
- message: (name, value, coerced) => `Enumerated attribute "${name}" with v-bind value \`${value}\` will ` +
1886
- `${value === null ? `be removed` : `render the value as-is`} instead of coercing the value to "${coerced}" in Vue 3. ` +
1887
- `Always use explicit "true" or "false" values for enumerated attributes. ` +
1888
- `If the usage is intended, ` +
1889
- `you can disable the compat behavior and suppress this warning with:` +
1890
- `\n\n configureCompat({ ${"ATTR_ENUMERATED_COERCION" /* ATTR_ENUMERATED_COERCION */}: false })\n`,
1891
- link: `https://v3.vuejs.org/guide/migration/attribute-coercion.html`
1892
- },
1893
- ["TRANSITION_CLASSES" /* TRANSITION_CLASSES */]: {
1894
- message: `` // this feature cannot be runtime-detected
1895
- },
1896
- ["TRANSITION_GROUP_ROOT" /* TRANSITION_GROUP_ROOT */]: {
1897
- message: `<TransitionGroup> no longer renders a root <span> element by ` +
1898
- `default if no "tag" prop is specified. If you do not rely on the span ` +
1899
- `for styling, you can disable the compat behavior and suppress this ` +
1900
- `warning with:` +
1901
- `\n\n configureCompat({ ${"TRANSITION_GROUP_ROOT" /* TRANSITION_GROUP_ROOT */}: false })\n`,
1902
- link: `https://v3.vuejs.org/guide/migration/transition-group.html`
1903
- },
1904
- ["COMPONENT_ASYNC" /* COMPONENT_ASYNC */]: {
1905
- message: (comp) => {
1906
- const name = getComponentName(comp);
1907
- return (`Async component${name ? ` <${name}>` : `s`} should be explicitly created via \`defineAsyncComponent()\` ` +
1908
- `in Vue 3. Plain functions will be treated as functional components in ` +
1909
- `non-compat build. If you have already migrated all async component ` +
1910
- `usage and intend to use plain functions for functional components, ` +
1911
- `you can disable the compat behavior and suppress this ` +
1912
- `warning with:` +
1913
- `\n\n configureCompat({ ${"COMPONENT_ASYNC" /* COMPONENT_ASYNC */}: false })\n`);
1914
- },
1915
- link: `https://v3.vuejs.org/guide/migration/async-components.html`
1916
- },
1917
- ["COMPONENT_FUNCTIONAL" /* COMPONENT_FUNCTIONAL */]: {
1918
- message: (comp) => {
1919
- const name = getComponentName(comp);
1920
- return (`Functional component${name ? ` <${name}>` : `s`} should be defined as a plain function in Vue 3. The "functional" ` +
1921
- `option has been removed. NOTE: Before migrating to use plain ` +
1922
- `functions for functional components, first make sure that all async ` +
1923
- `components usage have been migrated and its compat behavior has ` +
1924
- `been disabled.`);
1925
- },
1926
- link: `https://v3.vuejs.org/guide/migration/functional-components.html`
1927
- },
1928
- ["COMPONENT_V_MODEL" /* COMPONENT_V_MODEL */]: {
1929
- message: (comp) => {
1930
- const configMsg = `opt-in to ` +
1931
- `Vue 3 behavior on a per-component basis with \`compatConfig: { ${"COMPONENT_V_MODEL" /* COMPONENT_V_MODEL */}: false }\`.`;
1932
- if (comp.props &&
1933
- (isArray(comp.props)
1934
- ? comp.props.includes('modelValue')
1935
- : hasOwn(comp.props, 'modelValue'))) {
1936
- return (`Component delcares "modelValue" prop, which is Vue 3 usage, but ` +
1937
- `is running under Vue 2 compat v-model behavior. You can ${configMsg}`);
1938
- }
1939
- return (`v-model usage on component has changed in Vue 3. Component that expects ` +
1940
- `to work with v-model should now use the "modelValue" prop and emit the ` +
1941
- `"update:modelValue" event. You can update the usage and then ${configMsg}`);
1942
- },
1943
- link: `https://v3.vuejs.org/guide/migration/v-model.html`
1944
- },
1945
- ["RENDER_FUNCTION" /* RENDER_FUNCTION */]: {
1946
- message: `Vue 3's render function API has changed. ` +
1947
- `You can opt-in to the new API with:` +
1948
- `\n\n configureCompat({ ${"RENDER_FUNCTION" /* RENDER_FUNCTION */}: false })\n` +
1949
- `\n (This can also be done per-component via the "compatConfig" option.)`,
1950
- link: `https://v3.vuejs.org/guide/migration/render-function-api.html`
1951
- },
1952
- ["FILTERS" /* FILTERS */]: {
1953
- message: `filters have been removed in Vue 3. ` +
1954
- `The "|" symbol will be treated as native JavaScript bitwise OR operator. ` +
1955
- `Use method calls or computed properties instead.`,
1956
- link: `https://v3.vuejs.org/guide/migration/filters.html`
1957
- },
1958
- ["PRIVATE_APIS" /* PRIVATE_APIS */]: {
1959
- message: name => `"${name}" is a Vue 2 private API that no longer exists in Vue 3. ` +
1960
- `If you are seeing this warning only due to a dependency, you can ` +
1961
- `suppress this warning via { PRIVATE_APIS: 'supress-warning' }.`
1962
- }
1963
- };
1964
- const instanceWarned = Object.create(null);
1965
- const warnCount = Object.create(null);
1966
- function warnDeprecation(key, instance, ...args) {
1967
- instance = instance || getCurrentInstance();
1968
- // check user config
1969
- const config = getCompatConfigForKey(key, instance);
1970
- if (config === 'suppress-warning') {
1971
- return;
1972
- }
1973
- const dupKey = key + args.join('');
1974
- let compId = instance && formatComponentName(instance, instance.type);
1975
- if (compId === 'Anonymous' && instance) {
1976
- compId = instance.uid;
1977
- }
1978
- // skip if the same warning is emitted for the same component type
1979
- const componentDupKey = dupKey + compId;
1980
- if (componentDupKey in instanceWarned) {
1981
- return;
1982
- }
1983
- instanceWarned[componentDupKey] = true;
1984
- // same warning, but different component. skip the long message and just
1985
- // log the key and count.
1986
- if (dupKey in warnCount) {
1987
- warn$1(`(deprecation ${key}) (${++warnCount[dupKey] + 1})`);
1988
- return;
1989
- }
1990
- warnCount[dupKey] = 0;
1991
- const { message, link } = deprecationData[key];
1992
- warn$1(`(deprecation ${key}) ${typeof message === 'function' ? message(...args) : message}${link ? `\n Details: ${link}` : ``}`);
1993
- if (!isCompatEnabled(key, instance, true)) {
1994
- console.error(`^ The above deprecation's compat behavior is disabled and will likely ` +
1995
- `lead to runtime errors.`);
1996
- }
1997
- }
1998
- const globalCompatConfig = {
1999
- MODE: 2
2000
- };
2001
- function getCompatConfigForKey(key, instance) {
2002
- const instanceConfig = instance && instance.type.compatConfig;
2003
- if (instanceConfig && key in instanceConfig) {
2004
- return instanceConfig[key];
2005
- }
2006
- return globalCompatConfig[key];
2007
- }
2008
- function isCompatEnabled(key, instance, enableForBuiltIn = false) {
2009
- // skip compat for built-in components
2010
- if (!enableForBuiltIn && instance && instance.type.__isBuiltIn) {
2011
- return false;
2012
- }
2013
- const rawMode = getCompatConfigForKey('MODE', instance) || 2;
2014
- const val = getCompatConfigForKey(key, instance);
2015
- const mode = isFunction(rawMode)
2016
- ? rawMode(instance && instance.type)
2017
- : rawMode;
2018
- if (mode === 2) {
2019
- return val !== false;
2020
- }
2021
- else {
2022
- return val === true || val === 'suppress-warning';
2023
- }
2024
- }
2025
-
2026
1692
  function emit(instance, event, ...rawArgs) {
2027
1693
  const props = instance.vnode.props || EMPTY_OBJ;
2028
1694
  {
@@ -2248,12 +1914,12 @@ var Vue = (function (exports) {
2248
1914
  function renderComponentRoot(instance) {
2249
1915
  const { type: Component, vnode, proxy, withProxy, props, propsOptions: [propsOptions], slots, attrs, emit, render, renderCache, data, setupState, ctx, inheritAttrs } = instance;
2250
1916
  let result;
1917
+ let fallthroughAttrs;
2251
1918
  const prev = setCurrentRenderingInstance(instance);
2252
1919
  {
2253
1920
  accessedAttrs = false;
2254
1921
  }
2255
1922
  try {
2256
- let fallthroughAttrs;
2257
1923
  if (vnode.shapeFlag & 4 /* STATEFUL_COMPONENT */) {
2258
1924
  // withProxy is a proxy with a different `has` trap only for
2259
1925
  // runtime-compiled render functions using `with` block.
@@ -2284,97 +1950,91 @@ var Vue = (function (exports) {
2284
1950
  ? attrs
2285
1951
  : getFunctionalFallthrough(attrs);
2286
1952
  }
2287
- // attr merging
2288
- // in dev mode, comments are preserved, and it's possible for a template
2289
- // to have comments along side the root element which makes it a fragment
2290
- let root = result;
2291
- let setRoot = undefined;
2292
- if (true &&
2293
- result.patchFlag > 0 &&
2294
- result.patchFlag & 2048 /* DEV_ROOT_FRAGMENT */) {
2295
- ;
2296
- [root, setRoot] = getChildRoot(result);
2297
- }
2298
- if (fallthroughAttrs && inheritAttrs !== false) {
2299
- const keys = Object.keys(fallthroughAttrs);
2300
- const { shapeFlag } = root;
2301
- if (keys.length) {
2302
- if (shapeFlag & (1 /* ELEMENT */ | 6 /* COMPONENT */)) {
2303
- if (propsOptions && keys.some(isModelListener)) {
2304
- // If a v-model listener (onUpdate:xxx) has a corresponding declared
2305
- // prop, it indicates this component expects to handle v-model and
2306
- // it should not fallthrough.
2307
- // related: #1543, #1643, #1989
2308
- fallthroughAttrs = filterModelListeners(fallthroughAttrs, propsOptions);
2309
- }
2310
- root = cloneVNode(root, fallthroughAttrs);
2311
- }
2312
- else if (true && !accessedAttrs && root.type !== Comment) {
2313
- const allAttrs = Object.keys(attrs);
2314
- const eventAttrs = [];
2315
- const extraAttrs = [];
2316
- for (let i = 0, l = allAttrs.length; i < l; i++) {
2317
- const key = allAttrs[i];
2318
- if (isOn(key)) {
2319
- // ignore v-model handlers when they fail to fallthrough
2320
- if (!isModelListener(key)) {
2321
- // remove `on`, lowercase first letter to reflect event casing
2322
- // accurately
2323
- eventAttrs.push(key[2].toLowerCase() + key.slice(3));
2324
- }
2325
- }
2326
- else {
2327
- extraAttrs.push(key);
1953
+ }
1954
+ catch (err) {
1955
+ blockStack.length = 0;
1956
+ handleError(err, instance, 1 /* RENDER_FUNCTION */);
1957
+ result = createVNode(Comment);
1958
+ }
1959
+ // attr merging
1960
+ // in dev mode, comments are preserved, and it's possible for a template
1961
+ // to have comments along side the root element which makes it a fragment
1962
+ let root = result;
1963
+ let setRoot = undefined;
1964
+ if (result.patchFlag > 0 &&
1965
+ result.patchFlag & 2048 /* DEV_ROOT_FRAGMENT */) {
1966
+ [root, setRoot] = getChildRoot(result);
1967
+ }
1968
+ if (fallthroughAttrs && inheritAttrs !== false) {
1969
+ const keys = Object.keys(fallthroughAttrs);
1970
+ const { shapeFlag } = root;
1971
+ if (keys.length) {
1972
+ if (shapeFlag & (1 /* ELEMENT */ | 6 /* COMPONENT */)) {
1973
+ if (propsOptions && keys.some(isModelListener)) {
1974
+ // If a v-model listener (onUpdate:xxx) has a corresponding declared
1975
+ // prop, it indicates this component expects to handle v-model and
1976
+ // it should not fallthrough.
1977
+ // related: #1543, #1643, #1989
1978
+ fallthroughAttrs = filterModelListeners(fallthroughAttrs, propsOptions);
1979
+ }
1980
+ root = cloneVNode(root, fallthroughAttrs);
1981
+ }
1982
+ else if (!accessedAttrs && root.type !== Comment) {
1983
+ const allAttrs = Object.keys(attrs);
1984
+ const eventAttrs = [];
1985
+ const extraAttrs = [];
1986
+ for (let i = 0, l = allAttrs.length; i < l; i++) {
1987
+ const key = allAttrs[i];
1988
+ if (isOn(key)) {
1989
+ // ignore v-model handlers when they fail to fallthrough
1990
+ if (!isModelListener(key)) {
1991
+ // remove `on`, lowercase first letter to reflect event casing
1992
+ // accurately
1993
+ eventAttrs.push(key[2].toLowerCase() + key.slice(3));
2328
1994
  }
2329
1995
  }
2330
- if (extraAttrs.length) {
2331
- warn$1(`Extraneous non-props attributes (` +
2332
- `${extraAttrs.join(', ')}) ` +
2333
- `were passed to component but could not be automatically inherited ` +
2334
- `because component renders fragment or text root nodes.`);
2335
- }
2336
- if (eventAttrs.length) {
2337
- warn$1(`Extraneous non-emits event listeners (` +
2338
- `${eventAttrs.join(', ')}) ` +
2339
- `were passed to component but could not be automatically inherited ` +
2340
- `because component renders fragment or text root nodes. ` +
2341
- `If the listener is intended to be a component custom event listener only, ` +
2342
- `declare it using the "emits" option.`);
1996
+ else {
1997
+ extraAttrs.push(key);
2343
1998
  }
2344
1999
  }
2000
+ if (extraAttrs.length) {
2001
+ warn$1(`Extraneous non-props attributes (` +
2002
+ `${extraAttrs.join(', ')}) ` +
2003
+ `were passed to component but could not be automatically inherited ` +
2004
+ `because component renders fragment or text root nodes.`);
2005
+ }
2006
+ if (eventAttrs.length) {
2007
+ warn$1(`Extraneous non-emits event listeners (` +
2008
+ `${eventAttrs.join(', ')}) ` +
2009
+ `were passed to component but could not be automatically inherited ` +
2010
+ `because component renders fragment or text root nodes. ` +
2011
+ `If the listener is intended to be a component custom event listener only, ` +
2012
+ `declare it using the "emits" option.`);
2013
+ }
2345
2014
  }
2346
2015
  }
2347
- if (false &&
2348
- isCompatEnabled("INSTANCE_ATTRS_CLASS_STYLE" /* INSTANCE_ATTRS_CLASS_STYLE */, instance) &&
2349
- vnode.shapeFlag & 4 /* STATEFUL_COMPONENT */ &&
2350
- root.shapeFlag & (1 /* ELEMENT */ | 6 /* COMPONENT */)) ;
2351
- // inherit directives
2352
- if (vnode.dirs) {
2353
- if (true && !isElementRoot(root)) {
2354
- warn$1(`Runtime directive used on component with non-element root node. ` +
2355
- `The directives will not function as intended.`);
2356
- }
2357
- root.dirs = root.dirs ? root.dirs.concat(vnode.dirs) : vnode.dirs;
2358
- }
2359
- // inherit transition data
2360
- if (vnode.transition) {
2361
- if (true && !isElementRoot(root)) {
2362
- warn$1(`Component inside <Transition> renders non-element root node ` +
2363
- `that cannot be animated.`);
2364
- }
2365
- root.transition = vnode.transition;
2366
- }
2367
- if (true && setRoot) {
2368
- setRoot(root);
2016
+ }
2017
+ // inherit directives
2018
+ if (vnode.dirs) {
2019
+ if (!isElementRoot(root)) {
2020
+ warn$1(`Runtime directive used on component with non-element root node. ` +
2021
+ `The directives will not function as intended.`);
2369
2022
  }
2370
- else {
2371
- result = root;
2023
+ root.dirs = root.dirs ? root.dirs.concat(vnode.dirs) : vnode.dirs;
2024
+ }
2025
+ // inherit transition data
2026
+ if (vnode.transition) {
2027
+ if (!isElementRoot(root)) {
2028
+ warn$1(`Component inside <Transition> renders non-element root node ` +
2029
+ `that cannot be animated.`);
2372
2030
  }
2031
+ root.transition = vnode.transition;
2373
2032
  }
2374
- catch (err) {
2375
- blockStack.length = 0;
2376
- handleError(err, instance, 1 /* RENDER_FUNCTION */);
2377
- result = createVNode(Comment);
2033
+ if (setRoot) {
2034
+ setRoot(root);
2035
+ }
2036
+ else {
2037
+ result = root;
2378
2038
  }
2379
2039
  setCurrentRenderingInstance(prev);
2380
2040
  return result;
@@ -2909,8 +2569,8 @@ var Vue = (function (exports) {
2909
2569
  function normalizeSuspenseSlot(s) {
2910
2570
  let block;
2911
2571
  if (isFunction(s)) {
2912
- const isCompiledSlot = s._c;
2913
- if (isCompiledSlot) {
2572
+ const trackBlock = isBlockTreeEnabled && s._c;
2573
+ if (trackBlock) {
2914
2574
  // disableTracking: false
2915
2575
  // allow block tracking for compiled slots
2916
2576
  // (see ./componentRenderContext.ts)
@@ -2918,7 +2578,7 @@ var Vue = (function (exports) {
2918
2578
  openBlock();
2919
2579
  }
2920
2580
  s = s();
2921
- if (isCompiledSlot) {
2581
+ if (trackBlock) {
2922
2582
  s._d = true;
2923
2583
  block = currentBlock;
2924
2584
  closeBlock();
@@ -7014,7 +6674,11 @@ var Vue = (function (exports) {
7014
6674
  return Component;
7015
6675
  }
7016
6676
  if (warnMissing && !res) {
7017
- warn$1(`Failed to resolve ${type.slice(0, -1)}: ${name}`);
6677
+ const extra = type === COMPONENTS
6678
+ ? `\nIf this is a native custom element, make sure to exclude it from ` +
6679
+ `component resolution via compilerOptions.isCustomElement.`
6680
+ : ``;
6681
+ warn$1(`Failed to resolve ${type.slice(0, -1)}: ${name}${extra}`);
7018
6682
  }
7019
6683
  return res;
7020
6684
  }
@@ -7869,17 +7533,19 @@ var Vue = (function (exports) {
7869
7533
  function exposeSetupStateOnRenderContext(instance) {
7870
7534
  const { ctx, setupState } = instance;
7871
7535
  Object.keys(toRaw(setupState)).forEach(key => {
7872
- if (!setupState.__isScriptSetup && (key[0] === '$' || key[0] === '_')) {
7873
- warn$1(`setup() return property ${JSON.stringify(key)} should not start with "$" or "_" ` +
7874
- `which are reserved prefixes for Vue internals.`);
7875
- return;
7536
+ if (!setupState.__isScriptSetup) {
7537
+ if (key[0] === '$' || key[0] === '_') {
7538
+ warn$1(`setup() return property ${JSON.stringify(key)} should not start with "$" or "_" ` +
7539
+ `which are reserved prefixes for Vue internals.`);
7540
+ return;
7541
+ }
7542
+ Object.defineProperty(ctx, key, {
7543
+ enumerable: true,
7544
+ configurable: true,
7545
+ get: () => setupState[key],
7546
+ set: NOOP
7547
+ });
7876
7548
  }
7877
- Object.defineProperty(ctx, key, {
7878
- enumerable: true,
7879
- configurable: true,
7880
- get: () => setupState[key],
7881
- set: NOOP
7882
- });
7883
7549
  });
7884
7550
  }
7885
7551
 
@@ -8623,11 +8289,18 @@ var Vue = (function (exports) {
8623
8289
  // 2. If a component is unmounted during a parent component's update,
8624
8290
  // its update can be skipped.
8625
8291
  queue.sort((a, b) => getId(a) - getId(b));
8292
+ // conditional usage of checkRecursiveUpdate must be determined out of
8293
+ // try ... catch block since Rollup by default de-optimizes treeshaking
8294
+ // inside try-catch. This can leave all warning code unshaked. Although
8295
+ // they would get eventually shaken by a minifier like terser, some minifiers
8296
+ // would fail to do that (e.g. https://github.com/evanw/esbuild/issues/1610)
8297
+ const check = (job) => checkRecursiveUpdates(seen, job)
8298
+ ;
8626
8299
  try {
8627
8300
  for (flushIndex = 0; flushIndex < queue.length; flushIndex++) {
8628
8301
  const job = queue[flushIndex];
8629
8302
  if (job && job.active !== false) {
8630
- if (true && checkRecursiveUpdates(seen, job)) {
8303
+ if (true && check(job)) {
8631
8304
  continue;
8632
8305
  }
8633
8306
  // console.log(`running:`, job.id)
@@ -8958,7 +8631,7 @@ var Vue = (function (exports) {
8958
8631
  }
8959
8632
  /**
8960
8633
  * Vue `<script setup>` compiler macro for providing props default values when
8961
- * using type-based `defineProps` decalration.
8634
+ * using type-based `defineProps` declaration.
8962
8635
  *
8963
8636
  * Example usage:
8964
8637
  * ```ts
@@ -9302,7 +8975,7 @@ var Vue = (function (exports) {
9302
8975
  }
9303
8976
 
9304
8977
  // Core API ------------------------------------------------------------------
9305
- const version = "3.2.8";
8978
+ const version = "3.2.12";
9306
8979
  /**
9307
8980
  * SSR utils for \@vue/server-renderer. Only exposed in cjs builds.
9308
8981
  * @internal
@@ -9424,19 +9097,13 @@ var Vue = (function (exports) {
9424
9097
 
9425
9098
  function patchStyle(el, prev, next) {
9426
9099
  const style = el.style;
9100
+ const currentDisplay = style.display;
9427
9101
  if (!next) {
9428
9102
  el.removeAttribute('style');
9429
9103
  }
9430
9104
  else if (isString(next)) {
9431
9105
  if (prev !== next) {
9432
- const current = style.display;
9433
9106
  style.cssText = next;
9434
- // indicates that the `display` of the element is controlled by `v-show`,
9435
- // so we always keep the current `display` value regardless of the `style` value,
9436
- // thus handing over control to `v-show`.
9437
- if ('_vod' in el) {
9438
- style.display = current;
9439
- }
9440
9107
  }
9441
9108
  }
9442
9109
  else {
@@ -9451,6 +9118,12 @@ var Vue = (function (exports) {
9451
9118
  }
9452
9119
  }
9453
9120
  }
9121
+ // indicates that the `display` of the element is controlled by `v-show`,
9122
+ // so we always keep the current `display` value regardless of the `style` value,
9123
+ // thus handing over control to `v-show`.
9124
+ if ('_vod' in el) {
9125
+ style.display = currentDisplay;
9126
+ }
9454
9127
  }
9455
9128
  const importantRE = /\s*!important$/;
9456
9129
  function setStyle(style, name, val) {
@@ -9784,6 +9457,7 @@ var Vue = (function (exports) {
9784
9457
  this._instance = null;
9785
9458
  this._connected = false;
9786
9459
  this._resolved = false;
9460
+ this._numberProps = null;
9787
9461
  if (this.shadowRoot && hydrate) {
9788
9462
  hydrate(this._createVNode(), this.shadowRoot);
9789
9463
  }
@@ -9799,18 +9473,17 @@ var Vue = (function (exports) {
9799
9473
  this._setAttr(this.attributes[i].name);
9800
9474
  }
9801
9475
  // watch future attr changes
9802
- const observer = new MutationObserver(mutations => {
9476
+ new MutationObserver(mutations => {
9803
9477
  for (const m of mutations) {
9804
9478
  this._setAttr(m.attributeName);
9805
9479
  }
9806
- });
9807
- observer.observe(this, { attributes: true });
9480
+ }).observe(this, { attributes: true });
9808
9481
  }
9809
9482
  connectedCallback() {
9810
9483
  this._connected = true;
9811
9484
  if (!this._instance) {
9812
9485
  this._resolveDef();
9813
- render(this._createVNode(), this.shadowRoot);
9486
+ this._update();
9814
9487
  }
9815
9488
  }
9816
9489
  disconnectedCallback() {
@@ -9831,15 +9504,31 @@ var Vue = (function (exports) {
9831
9504
  }
9832
9505
  const resolve = (def) => {
9833
9506
  this._resolved = true;
9507
+ const { props, styles } = def;
9508
+ const hasOptions = !isArray(props);
9509
+ const rawKeys = props ? (hasOptions ? Object.keys(props) : props) : [];
9510
+ // cast Number-type props set before resolve
9511
+ let numberProps;
9512
+ if (hasOptions) {
9513
+ for (const key in this._props) {
9514
+ const opt = props[key];
9515
+ if (opt === Number || (opt && opt.type === Number)) {
9516
+ this._props[key] = toNumber(this._props[key]);
9517
+ (numberProps || (numberProps = Object.create(null)))[key] = true;
9518
+ }
9519
+ }
9520
+ }
9521
+ if (numberProps) {
9522
+ this._numberProps = numberProps;
9523
+ this._update();
9524
+ }
9834
9525
  // check if there are props set pre-upgrade or connect
9835
9526
  for (const key of Object.keys(this)) {
9836
9527
  if (key[0] !== '_') {
9837
9528
  this._setProp(key, this[key]);
9838
9529
  }
9839
9530
  }
9840
- const { props, styles } = def;
9841
9531
  // defining getter/setters on prototype
9842
- const rawKeys = props ? (isArray(props) ? props : Object.keys(props)) : [];
9843
9532
  for (const key of rawKeys.map(camelize)) {
9844
9533
  Object.defineProperty(this, key, {
9845
9534
  get() {
@@ -9861,7 +9550,11 @@ var Vue = (function (exports) {
9861
9550
  }
9862
9551
  }
9863
9552
  _setAttr(key) {
9864
- this._setProp(camelize(key), toNumber(this.getAttribute(key)), false);
9553
+ let value = this.getAttribute(key);
9554
+ if (this._numberProps && this._numberProps[key]) {
9555
+ value = toNumber(value);
9556
+ }
9557
+ this._setProp(camelize(key), value, false);
9865
9558
  }
9866
9559
  /**
9867
9560
  * @internal
@@ -9876,7 +9569,7 @@ var Vue = (function (exports) {
9876
9569
  if (val !== this._props[key]) {
9877
9570
  this._props[key] = val;
9878
9571
  if (this._instance) {
9879
- render(this._createVNode(), this.shadowRoot);
9572
+ this._update();
9880
9573
  }
9881
9574
  // reflect
9882
9575
  if (shouldReflect) {
@@ -9892,6 +9585,9 @@ var Vue = (function (exports) {
9892
9585
  }
9893
9586
  }
9894
9587
  }
9588
+ _update() {
9589
+ render(this._createVNode(), this.shadowRoot);
9590
+ }
9895
9591
  _createVNode() {
9896
9592
  const vnode = createVNode(this._def, extend({}, this._props));
9897
9593
  if (!this._instance) {
@@ -9912,7 +9608,7 @@ var Vue = (function (exports) {
9912
9608
  if (!this._def.__asyncLoader) {
9913
9609
  // reload
9914
9610
  this._instance = null;
9915
- render(this._createVNode(), this.shadowRoot);
9611
+ this._update();
9916
9612
  }
9917
9613
  };
9918
9614
  }
@@ -11519,7 +11215,7 @@ var Vue = (function (exports) {
11519
11215
  }
11520
11216
  }
11521
11217
 
11522
- const deprecationData$1 = {
11218
+ const deprecationData = {
11523
11219
  ["COMPILER_IS_ON_ELEMENT" /* COMPILER_IS_ON_ELEMENT */]: {
11524
11220
  message: `Platform-native elements with "is" prop will no longer be ` +
11525
11221
  `treated as components in Vue 3 unless the "is" value is explicitly ` +
@@ -11588,7 +11284,7 @@ var Vue = (function (exports) {
11588
11284
  return value;
11589
11285
  }
11590
11286
  }
11591
- function isCompatEnabled$1(key, context) {
11287
+ function isCompatEnabled(key, context) {
11592
11288
  const mode = getCompatValue('MODE', context);
11593
11289
  const value = getCompatValue(key, context);
11594
11290
  // in v3 mode, only enable if explicitly set to true
@@ -11596,18 +11292,18 @@ var Vue = (function (exports) {
11596
11292
  return mode === 3 ? value === true : value !== false;
11597
11293
  }
11598
11294
  function checkCompatEnabled(key, context, loc, ...args) {
11599
- const enabled = isCompatEnabled$1(key, context);
11295
+ const enabled = isCompatEnabled(key, context);
11600
11296
  if (enabled) {
11601
- warnDeprecation$1(key, context, loc, ...args);
11297
+ warnDeprecation(key, context, loc, ...args);
11602
11298
  }
11603
11299
  return enabled;
11604
11300
  }
11605
- function warnDeprecation$1(key, context, loc, ...args) {
11301
+ function warnDeprecation(key, context, loc, ...args) {
11606
11302
  const val = getCompatValue(key, context);
11607
11303
  if (val === 'suppress-warning') {
11608
11304
  return;
11609
11305
  }
11610
- const { message, link } = deprecationData$1[key];
11306
+ const { message, link } = deprecationData[key];
11611
11307
  const msg = `(deprecation ${key}) ${typeof message === 'function' ? message(...args) : message}${link ? `\n Details: ${link}` : ``}`;
11612
11308
  const err = new SyntaxError(msg);
11613
11309
  err.code = key;
@@ -12057,6 +11753,13 @@ var Vue = (function (exports) {
12057
11753
  emitError(context, 3 /* END_TAG_WITH_ATTRIBUTES */);
12058
11754
  }
12059
11755
  const attr = parseAttribute(context, attributeNames);
11756
+ // Trim whitespace between class
11757
+ // https://github.com/vuejs/vue-next/issues/4251
11758
+ if (attr.type === 6 /* ATTRIBUTE */ &&
11759
+ attr.value &&
11760
+ attr.name === 'class') {
11761
+ attr.value.content = attr.value.content.replace(/\s+/g, ' ').trim();
11762
+ }
12060
11763
  if (type === 0 /* Start */) {
12061
11764
  props.push(attr);
12062
11765
  }
@@ -12119,8 +11822,11 @@ var Vue = (function (exports) {
12119
11822
  isStatic = false;
12120
11823
  if (!content.endsWith(']')) {
12121
11824
  emitError(context, 27 /* X_MISSING_DYNAMIC_DIRECTIVE_ARGUMENT_END */);
11825
+ content = content.substr(1);
11826
+ }
11827
+ else {
11828
+ content = content.substr(1, content.length - 2);
12122
11829
  }
12123
- content = content.substr(1, content.length - 2);
12124
11830
  }
12125
11831
  else if (isSlot) {
12126
11832
  // #1241 special case for v-slot: vuetify relies extensively on slot
@@ -13555,7 +13261,7 @@ var Vue = (function (exports) {
13555
13261
  // function params
13556
13262
  asParams = false,
13557
13263
  // v-on handler values may contain multiple statements
13558
- asRawStatements = false) {
13264
+ asRawStatements = false, localVars = Object.create(context.identifiers)) {
13559
13265
  {
13560
13266
  {
13561
13267
  // simple in-browser validation (same logic in 2.x)
@@ -14829,7 +14535,7 @@ var Vue = (function (exports) {
14829
14535
  };
14830
14536
  }
14831
14537
 
14832
- const fnExpRE = /^\s*([\w$_]+|\([^)]*?\))\s*=>|^\s*function(?:\s+[\w$]+)?\s*\(/;
14538
+ const fnExpRE = /^\s*([\w$_]+|(async\s*)?\([^)]*?\))\s*=>|^\s*(async\s+)?function(?:\s+[\w$]+)?\s*\(/;
14833
14539
  const transformOn = (dir, node, context, augmentor) => {
14834
14540
  const { loc, modifiers, arg } = dir;
14835
14541
  if (!dir.exp && !modifiers.length) {