@vue/compat 3.2.13 → 3.2.17

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.
@@ -463,6 +463,20 @@ const def = (obj, key, value) => {
463
463
  const toNumber = (val) => {
464
464
  const n = parseFloat(val);
465
465
  return isNaN(n) ? val : n;
466
+ };
467
+ let _globalThis;
468
+ const getGlobalThis = () => {
469
+ return (_globalThis ||
470
+ (_globalThis =
471
+ typeof globalThis !== 'undefined'
472
+ ? globalThis
473
+ : typeof self !== 'undefined'
474
+ ? self
475
+ : typeof window !== 'undefined'
476
+ ? window
477
+ : typeof global !== 'undefined'
478
+ ? global
479
+ : {}));
466
480
  };
467
481
 
468
482
  let activeEffectScope;
@@ -959,8 +973,6 @@ const shallowReadonlyHandlers = /*#__PURE__*/ extend({}, readonlyHandlers, {
959
973
  get: shallowReadonlyGet
960
974
  });
961
975
 
962
- const toReactive = (value) => isObject(value) ? reactive(value) : value;
963
- const toReadonly = (value) => isObject(value) ? readonly(value) : value;
964
976
  const toShallow = (value) => value;
965
977
  const getProto = (v) => Reflect.getPrototypeOf(v);
966
978
  function get$1(target, key, isReadonly = false, isShallow = false) {
@@ -1320,7 +1332,9 @@ function toRaw(observed) {
1320
1332
  function markRaw(value) {
1321
1333
  def(value, "__v_skip" /* SKIP */, true);
1322
1334
  return value;
1323
- }
1335
+ }
1336
+ const toReactive = (value) => isObject(value) ? reactive(value) : value;
1337
+ const toReadonly = (value) => isObject(value) ? readonly(value) : value;
1324
1338
 
1325
1339
  function trackRefValue(ref) {
1326
1340
  if (isTracking()) {
@@ -1341,7 +1355,6 @@ function triggerRefValue(ref, newVal) {
1341
1355
  }
1342
1356
  }
1343
1357
  }
1344
- const convert = (val) => isObject(val) ? reactive(val) : val;
1345
1358
  function isRef(r) {
1346
1359
  return Boolean(r && r.__v_isRef === true);
1347
1360
  }
@@ -1351,13 +1364,19 @@ function ref(value) {
1351
1364
  function shallowRef(value) {
1352
1365
  return createRef(value, true);
1353
1366
  }
1367
+ function createRef(rawValue, shallow) {
1368
+ if (isRef(rawValue)) {
1369
+ return rawValue;
1370
+ }
1371
+ return new RefImpl(rawValue, shallow);
1372
+ }
1354
1373
  class RefImpl {
1355
1374
  constructor(value, _shallow) {
1356
1375
  this._shallow = _shallow;
1357
1376
  this.dep = undefined;
1358
1377
  this.__v_isRef = true;
1359
1378
  this._rawValue = _shallow ? value : toRaw(value);
1360
- this._value = _shallow ? value : convert(value);
1379
+ this._value = _shallow ? value : toReactive(value);
1361
1380
  }
1362
1381
  get value() {
1363
1382
  trackRefValue(this);
@@ -1367,17 +1386,11 @@ class RefImpl {
1367
1386
  newVal = this._shallow ? newVal : toRaw(newVal);
1368
1387
  if (hasChanged(newVal, this._rawValue)) {
1369
1388
  this._rawValue = newVal;
1370
- this._value = this._shallow ? newVal : convert(newVal);
1389
+ this._value = this._shallow ? newVal : toReactive(newVal);
1371
1390
  triggerRefValue(this);
1372
1391
  }
1373
1392
  }
1374
1393
  }
1375
- function createRef(rawValue, shallow) {
1376
- if (isRef(rawValue)) {
1377
- return rawValue;
1378
- }
1379
- return new RefImpl(rawValue, shallow);
1380
- }
1381
1394
  function triggerRef(ref) {
1382
1395
  triggerRefValue(ref);
1383
1396
  }
@@ -1490,8 +1503,21 @@ function computed(getterOrOptions, debugOptions) {
1490
1503
  }
1491
1504
 
1492
1505
  let devtools;
1493
- function setDevtoolsHook(hook) {
1506
+ let buffer = [];
1507
+ function setDevtoolsHook(hook, target) {
1494
1508
  devtools = hook;
1509
+ if (devtools) {
1510
+ devtools.enabled = true;
1511
+ buffer.forEach(({ event, args }) => devtools.emit(event, ...args));
1512
+ buffer = [];
1513
+ }
1514
+ else {
1515
+ const replay = (target.__VUE_DEVTOOLS_HOOK_REPLAY__ =
1516
+ target.__VUE_DEVTOOLS_HOOK_REPLAY__ || []);
1517
+ replay.push((newHook) => {
1518
+ setDevtoolsHook(newHook, target);
1519
+ });
1520
+ }
1495
1521
  }
1496
1522
 
1497
1523
  function warnDeprecation(key, instance, ...args) {
@@ -4233,7 +4259,7 @@ function createCompatVue(createApp, createSingletonApp) {
4233
4259
  return vm;
4234
4260
  }
4235
4261
  }
4236
- Vue.version = "3.2.13";
4262
+ Vue.version = "3.2.17";
4237
4263
  Vue.config = singletonApp.config;
4238
4264
  Vue.use = (p, ...options) => {
4239
4265
  if (p && isFunction(p.install)) {
@@ -5072,6 +5098,8 @@ function createHydrationRenderer(options) {
5072
5098
  }
5073
5099
  // implementation
5074
5100
  function baseCreateRenderer(options, createHydrationFns) {
5101
+ const target = getGlobalThis();
5102
+ target.__VUE__ = true;
5075
5103
  const { insert: hostInsert, remove: hostRemove, patchProp: hostPatchProp, createElement: hostCreateElement, createText: hostCreateText, createComment: hostCreateComment, setText: hostSetText, setElementText: hostSetElementText, parentNode: hostParentNode, nextSibling: hostNextSibling, setScopeId: hostSetScopeId = NOOP, cloneNode: hostCloneNode, insertStaticContent: hostInsertStaticContent } = options;
5076
5104
  // Note: functions inside this closure should use `const xxx = () => {}`
5077
5105
  // style in order to prevent being inlined by minifiers.
@@ -8025,19 +8053,11 @@ function finishComponentSetup(instance, isSSR, skipOptions) {
8025
8053
  convertLegacyRenderFn(instance);
8026
8054
  }
8027
8055
  // template / render function normalization
8028
- if (isSSR) {
8029
- // 1. the render function may already exist, returned by `setup`
8030
- // 2. otherwise try to use the `Component.render`
8031
- // 3. if the component doesn't have a render function,
8032
- // set `instance.render` to NOOP so that it can inherit the render
8033
- // function from mixins/extend
8034
- instance.render = (instance.render ||
8035
- Component.render ||
8036
- NOOP);
8037
- }
8038
- else if (!instance.render) {
8039
- // could be set from setup()
8040
- if (compile && !Component.render) {
8056
+ // could be already set when returned from setup()
8057
+ if (!instance.render) {
8058
+ // only do on-the-fly compile if not in SSR - SSR on-the-fly compliation
8059
+ // is done by server-renderer
8060
+ if (!isSSR && compile && !Component.render) {
8041
8061
  const template = (instance.vnode.props &&
8042
8062
  instance.vnode.props['inline-template']) ||
8043
8063
  Component.template;
@@ -8910,7 +8930,7 @@ function isMemoSame(cached, memo) {
8910
8930
  }
8911
8931
 
8912
8932
  // Core API ------------------------------------------------------------------
8913
- const version = "3.2.13";
8933
+ const version = "3.2.17";
8914
8934
  const _ssrUtils = {
8915
8935
  createComponentInstance,
8916
8936
  setupComponent,
@@ -10308,8 +10328,9 @@ function callModelHook(el, binding, vnode, prevVNode, hook) {
10308
10328
  const fn = modelToUse[hook];
10309
10329
  fn && fn(el, binding, vnode, prevVNode);
10310
10330
  }
10311
- // SSR vnode transforms
10312
- {
10331
+ // SSR vnode transforms, only used when user includes client-oriented render
10332
+ // function in SSR
10333
+ function initVModelForSSR() {
10313
10334
  vModelText.getSSRProps = ({ value }) => ({ value });
10314
10335
  vModelRadio.getSSRProps = ({ value }, vnode) => {
10315
10336
  if (vnode.props && looseEqual(vnode.props.value, value)) {
@@ -10454,15 +10475,17 @@ const vShow = {
10454
10475
  setDisplay(el, value);
10455
10476
  }
10456
10477
  };
10457
- {
10478
+ function setDisplay(el, value) {
10479
+ el.style.display = value ? el._vod : 'none';
10480
+ }
10481
+ // SSR vnode transforms, only used when user includes client-oriented render
10482
+ // function in SSR
10483
+ function initVShowForSSR() {
10458
10484
  vShow.getSSRProps = ({ value }) => {
10459
10485
  if (!value) {
10460
10486
  return { style: { display: 'none' } };
10461
10487
  }
10462
10488
  };
10463
- }
10464
- function setDisplay(el, value) {
10465
- el.style.display = value ? el._vod : 'none';
10466
10489
  }
10467
10490
 
10468
10491
  const rendererOptions = extend({ patchProp }, nodeOps);
@@ -10531,7 +10554,19 @@ function normalizeContainer(container) {
10531
10554
  return res;
10532
10555
  }
10533
10556
  return container;
10534
- }
10557
+ }
10558
+ let ssrDirectiveInitialized = false;
10559
+ /**
10560
+ * @internal
10561
+ */
10562
+ const initDirectivesForSSR = () => {
10563
+ if (!ssrDirectiveInitialized) {
10564
+ ssrDirectiveInitialized = true;
10565
+ initVModelForSSR();
10566
+ initVShowForSSR();
10567
+ }
10568
+ }
10569
+ ;
10535
10570
 
10536
10571
  var runtimeDom = /*#__PURE__*/Object.freeze({
10537
10572
  __proto__: null,
@@ -10539,6 +10574,7 @@ var runtimeDom = /*#__PURE__*/Object.freeze({
10539
10574
  hydrate: hydrate,
10540
10575
  createApp: createApp,
10541
10576
  createSSRApp: createSSRApp,
10577
+ initDirectivesForSSR: initDirectivesForSSR,
10542
10578
  defineCustomElement: defineCustomElement,
10543
10579
  defineSSRCustomElement: defineSSRCustomElement,
10544
10580
  VueElement: VueElement,
@@ -10774,7 +10810,7 @@ const errorMessages = {
10774
10810
  [47 /* X_MODULE_MODE_NOT_SUPPORTED */]: `ES module mode is not supported in this build of compiler.`,
10775
10811
  [48 /* X_CACHE_HANDLER_NOT_SUPPORTED */]: `"cacheHandlers" option is only supported when the "prefixIdentifiers" option is enabled.`,
10776
10812
  [49 /* X_SCOPE_ID_NOT_SUPPORTED */]: `"scopeId" option is only supported in module mode.`,
10777
- // just to fullfill types
10813
+ // just to fulfill types
10778
10814
  [50 /* __EXTEND_POINT__ */]: ``
10779
10815
  };
10780
10816
 
@@ -11019,27 +11055,22 @@ function isCoreComponent(tag) {
11019
11055
  }
11020
11056
  const nonIdentifierRE = /^\d|[^\$\w]/;
11021
11057
  const isSimpleIdentifier = (name) => !nonIdentifierRE.test(name);
11022
- const validFirstIdentCharRE = /[A-Za-z_$\xA0-\uFFFF]/;
11023
11058
  const isMemberExpressionNode = (path, context) => {
11024
- path = path.trim();
11025
- if (!validFirstIdentCharRE.test(path[0])) {
11026
- return false;
11027
- }
11028
- try {
11029
- let ret = parser.parseExpression(path, {
11030
- plugins: [...context.expressionPlugins, ...babelParserDefaultPlugins]
11031
- });
11032
- if (ret.type === 'TSAsExpression' || ret.type === 'TSTypeAssertion') {
11033
- ret = ret.expression;
11059
+ try {
11060
+ let ret = parser.parseExpression(path, {
11061
+ plugins: [...context.expressionPlugins, ...babelParserDefaultPlugins]
11062
+ });
11063
+ if (ret.type === 'TSAsExpression' || ret.type === 'TSTypeAssertion') {
11064
+ ret = ret.expression;
11065
+ }
11066
+ return (ret.type === 'MemberExpression' ||
11067
+ ret.type === 'OptionalMemberExpression' ||
11068
+ ret.type === 'Identifier');
11034
11069
  }
11035
- return (ret.type === 'MemberExpression' ||
11036
- ret.type === 'OptionalMemberExpression' ||
11037
- ret.type === 'Identifier');
11038
- }
11039
- catch (e) {
11040
- return false;
11041
- }
11042
- };
11070
+ catch (e) {
11071
+ return false;
11072
+ }
11073
+ };
11043
11074
  const isMemberExpression = isMemberExpressionNode;
11044
11075
  function getInnerRange(loc, offset, length) {
11045
11076
  const source = loc.source.substr(offset, length);
@@ -12702,7 +12733,7 @@ function createStructuralDirectiveTransform(name, fn) {
12702
12733
  }
12703
12734
 
12704
12735
  const PURE_ANNOTATION = `/*#__PURE__*/`;
12705
- function createCodegenContext(ast, { mode = 'function', prefixIdentifiers = mode === 'module', sourceMap: sourceMap$1 = false, filename = `template.vue.html`, scopeId = null, optimizeImports = false, runtimeGlobalName = `Vue`, runtimeModuleName = `vue`, ssr = false, isTS = false, inSSR = false }) {
12736
+ function createCodegenContext(ast, { mode = 'function', prefixIdentifiers = mode === 'module', sourceMap: sourceMap$1 = false, filename = `template.vue.html`, scopeId = null, optimizeImports = false, runtimeGlobalName = `Vue`, runtimeModuleName = `vue`, ssrRuntimeModuleName = 'vue/server-renderer', ssr = false, isTS = false, inSSR = false }) {
12706
12737
  const context = {
12707
12738
  mode,
12708
12739
  prefixIdentifiers,
@@ -12712,6 +12743,7 @@ function createCodegenContext(ast, { mode = 'function', prefixIdentifiers = mode
12712
12743
  optimizeImports,
12713
12744
  runtimeGlobalName,
12714
12745
  runtimeModuleName,
12746
+ ssrRuntimeModuleName,
12715
12747
  ssr,
12716
12748
  isTS,
12717
12749
  inSSR,
@@ -12888,7 +12920,7 @@ function generate(ast, options = {}) {
12888
12920
  };
12889
12921
  }
12890
12922
  function genFunctionPreamble(ast, context) {
12891
- const { ssr, prefixIdentifiers, push, newline, runtimeModuleName, runtimeGlobalName } = context;
12923
+ const { ssr, prefixIdentifiers, push, newline, runtimeModuleName, runtimeGlobalName, ssrRuntimeModuleName } = context;
12892
12924
  const VueBinding = ssr
12893
12925
  ? `require(${JSON.stringify(runtimeModuleName)})`
12894
12926
  : runtimeGlobalName;
@@ -12928,14 +12960,14 @@ function genFunctionPreamble(ast, context) {
12928
12960
  // ssr guarantees prefixIdentifier: true
12929
12961
  push(`const { ${ast.ssrHelpers
12930
12962
  .map(aliasHelper)
12931
- .join(', ')} } = require("@vue/server-renderer")\n`);
12963
+ .join(', ')} } = require("${ssrRuntimeModuleName}")\n`);
12932
12964
  }
12933
12965
  genHoists(ast.hoists, context);
12934
12966
  newline();
12935
12967
  push(`return `);
12936
12968
  }
12937
12969
  function genModulePreamble(ast, context, genScopeId, inline) {
12938
- const { push, newline, optimizeImports, runtimeModuleName } = context;
12970
+ const { push, newline, optimizeImports, runtimeModuleName, ssrRuntimeModuleName } = context;
12939
12971
  if (genScopeId && ast.hoists.length) {
12940
12972
  ast.helpers.push(PUSH_SCOPE_ID, POP_SCOPE_ID);
12941
12973
  }
@@ -12963,7 +12995,7 @@ function genModulePreamble(ast, context, genScopeId, inline) {
12963
12995
  if (ast.ssrHelpers && ast.ssrHelpers.length) {
12964
12996
  push(`import { ${ast.ssrHelpers
12965
12997
  .map(s => `${helperNameMap[s]} as _${helperNameMap[s]}`)
12966
- .join(', ')} } from "@vue/server-renderer"\n`);
12998
+ .join(', ')} } from "${ssrRuntimeModuleName}"\n`);
12967
12999
  }
12968
13000
  if (ast.imports.length) {
12969
13001
  genImports(ast.imports, context);
@@ -15018,7 +15050,7 @@ function buildProps(node, context, props = node.props, ssr = false) {
15018
15050
  hasRef = true;
15019
15051
  // in inline mode there is no setupState object, so we can't use string
15020
15052
  // keys to set the ref. Instead, we need to transform it to pass the
15021
- // acrtual ref instead.
15053
+ // actual ref instead.
15022
15054
  if (context.inline && (value === null || value === void 0 ? void 0 : value.content)) {
15023
15055
  valueNode = createFunctionExpression(['_value', '_refs']);
15024
15056
  valueNode.body = createBlockStatement(processInlineRef(context, value.content));
@@ -15719,9 +15751,9 @@ const transformModel = (dir, node, context) => {
15719
15751
  if (bindingType === "setup-ref" /* SETUP_REF */) {
15720
15752
  // v-model used on known ref.
15721
15753
  assignmentExp = createCompoundExpression([
15722
- `${eventArg} => (`,
15754
+ `${eventArg} => ((`,
15723
15755
  createSimpleExpression(rawExp, false, exp.loc),
15724
- `.value = $event)`
15756
+ `).value = $event)`
15725
15757
  ]);
15726
15758
  }
15727
15759
  else {
@@ -15729,17 +15761,17 @@ const transformModel = (dir, node, context) => {
15729
15761
  // the assignment needs to check whether the binding is actually a ref.
15730
15762
  const altAssignment = bindingType === "setup-let" /* SETUP_LET */ ? `${rawExp} = $event` : `null`;
15731
15763
  assignmentExp = createCompoundExpression([
15732
- `${eventArg} => (${context.helperString(IS_REF)}(${rawExp}) ? `,
15764
+ `${eventArg} => (${context.helperString(IS_REF)}(${rawExp}) ? (`,
15733
15765
  createSimpleExpression(rawExp, false, exp.loc),
15734
- `.value = $event : ${altAssignment})`
15766
+ `).value = $event : ${altAssignment})`
15735
15767
  ]);
15736
15768
  }
15737
15769
  }
15738
15770
  else {
15739
15771
  assignmentExp = createCompoundExpression([
15740
- `${eventArg} => (`,
15772
+ `${eventArg} => ((`,
15741
15773
  exp,
15742
- ` = $event)`
15774
+ `) = $event)`
15743
15775
  ]);
15744
15776
  }
15745
15777
  const props = [
@@ -928,8 +928,6 @@ const shallowReadonlyHandlers = /*#__PURE__*/ extend({}, readonlyHandlers, {
928
928
  get: shallowReadonlyGet
929
929
  });
930
930
 
931
- const toReactive = (value) => isObject(value) ? reactive(value) : value;
932
- const toReadonly = (value) => isObject(value) ? readonly(value) : value;
933
931
  const toShallow = (value) => value;
934
932
  const getProto = (v) => Reflect.getPrototypeOf(v);
935
933
  function get$1(target, key, isReadonly = false, isShallow = false) {
@@ -1317,7 +1315,9 @@ function toRaw(observed) {
1317
1315
  function markRaw(value) {
1318
1316
  def(value, "__v_skip" /* SKIP */, true);
1319
1317
  return value;
1320
- }
1318
+ }
1319
+ const toReactive = (value) => isObject(value) ? reactive(value) : value;
1320
+ const toReadonly = (value) => isObject(value) ? readonly(value) : value;
1321
1321
 
1322
1322
  function trackRefValue(ref) {
1323
1323
  if (isTracking()) {
@@ -1347,7 +1347,6 @@ function triggerRefValue(ref, newVal) {
1347
1347
  }
1348
1348
  }
1349
1349
  }
1350
- const convert = (val) => isObject(val) ? reactive(val) : val;
1351
1350
  function isRef(r) {
1352
1351
  return Boolean(r && r.__v_isRef === true);
1353
1352
  }
@@ -1357,13 +1356,19 @@ function ref(value) {
1357
1356
  function shallowRef(value) {
1358
1357
  return createRef(value, true);
1359
1358
  }
1359
+ function createRef(rawValue, shallow) {
1360
+ if (isRef(rawValue)) {
1361
+ return rawValue;
1362
+ }
1363
+ return new RefImpl(rawValue, shallow);
1364
+ }
1360
1365
  class RefImpl {
1361
1366
  constructor(value, _shallow) {
1362
1367
  this._shallow = _shallow;
1363
1368
  this.dep = undefined;
1364
1369
  this.__v_isRef = true;
1365
1370
  this._rawValue = _shallow ? value : toRaw(value);
1366
- this._value = _shallow ? value : convert(value);
1371
+ this._value = _shallow ? value : toReactive(value);
1367
1372
  }
1368
1373
  get value() {
1369
1374
  trackRefValue(this);
@@ -1373,17 +1378,11 @@ class RefImpl {
1373
1378
  newVal = this._shallow ? newVal : toRaw(newVal);
1374
1379
  if (hasChanged(newVal, this._rawValue)) {
1375
1380
  this._rawValue = newVal;
1376
- this._value = this._shallow ? newVal : convert(newVal);
1381
+ this._value = this._shallow ? newVal : toReactive(newVal);
1377
1382
  triggerRefValue(this, newVal);
1378
1383
  }
1379
1384
  }
1380
1385
  }
1381
- function createRef(rawValue, shallow) {
1382
- if (isRef(rawValue)) {
1383
- return rawValue;
1384
- }
1385
- return new RefImpl(rawValue, shallow);
1386
- }
1387
1386
  function triggerRef(ref) {
1388
1387
  triggerRefValue(ref, ref.value );
1389
1388
  }
@@ -1514,14 +1513,7 @@ const hmrDirtyComponents = new Set();
1514
1513
  // Note: for a component to be eligible for HMR it also needs the __hmrId option
1515
1514
  // to be set so that its instances can be registered / removed.
1516
1515
  {
1517
- const globalObject = typeof global !== 'undefined'
1518
- ? global
1519
- : typeof self !== 'undefined'
1520
- ? self
1521
- : typeof window !== 'undefined'
1522
- ? window
1523
- : {};
1524
- globalObject.__VUE_HMR_RUNTIME__ = {
1516
+ getGlobalThis().__VUE_HMR_RUNTIME__ = {
1525
1517
  createRecord: tryWrap(createRecord),
1526
1518
  rerender: tryWrap(rerender),
1527
1519
  reload: tryWrap(reload)
@@ -1642,14 +1634,32 @@ function tryWrap(fn) {
1642
1634
  }
1643
1635
 
1644
1636
  let devtools;
1645
- function setDevtoolsHook(hook) {
1637
+ let buffer = [];
1638
+ function emit(event, ...args) {
1639
+ if (devtools) {
1640
+ devtools.emit(event, ...args);
1641
+ }
1642
+ else {
1643
+ buffer.push({ event, args });
1644
+ }
1645
+ }
1646
+ function setDevtoolsHook(hook, target) {
1646
1647
  devtools = hook;
1648
+ if (devtools) {
1649
+ devtools.enabled = true;
1650
+ buffer.forEach(({ event, args }) => devtools.emit(event, ...args));
1651
+ buffer = [];
1652
+ }
1653
+ else {
1654
+ const replay = (target.__VUE_DEVTOOLS_HOOK_REPLAY__ =
1655
+ target.__VUE_DEVTOOLS_HOOK_REPLAY__ || []);
1656
+ replay.push((newHook) => {
1657
+ setDevtoolsHook(newHook, target);
1658
+ });
1659
+ }
1647
1660
  }
1648
1661
  function devtoolsInitApp(app, version) {
1649
- // TODO queue if devtools is undefined
1650
- if (!devtools)
1651
- return;
1652
- devtools.emit("app:init" /* APP_INIT */, app, version, {
1662
+ emit("app:init" /* APP_INIT */, app, version, {
1653
1663
  Fragment,
1654
1664
  Text,
1655
1665
  Comment,
@@ -1657,9 +1667,7 @@ function devtoolsInitApp(app, version) {
1657
1667
  });
1658
1668
  }
1659
1669
  function devtoolsUnmountApp(app) {
1660
- if (!devtools)
1661
- return;
1662
- devtools.emit("app:unmount" /* APP_UNMOUNT */, app);
1670
+ emit("app:unmount" /* APP_UNMOUNT */, app);
1663
1671
  }
1664
1672
  const devtoolsComponentAdded = /*#__PURE__*/ createDevtoolsComponentHook("component:added" /* COMPONENT_ADDED */);
1665
1673
  const devtoolsComponentUpdated =
@@ -1668,24 +1676,18 @@ const devtoolsComponentRemoved =
1668
1676
  /*#__PURE__*/ createDevtoolsComponentHook("component:removed" /* COMPONENT_REMOVED */);
1669
1677
  function createDevtoolsComponentHook(hook) {
1670
1678
  return (component) => {
1671
- if (!devtools)
1672
- return;
1673
- devtools.emit(hook, component.appContext.app, component.uid, component.parent ? component.parent.uid : undefined, component);
1679
+ emit(hook, component.appContext.app, component.uid, component.parent ? component.parent.uid : undefined, component);
1674
1680
  };
1675
1681
  }
1676
1682
  const devtoolsPerfStart = /*#__PURE__*/ createDevtoolsPerformanceHook("perf:start" /* PERFORMANCE_START */);
1677
1683
  const devtoolsPerfEnd = /*#__PURE__*/ createDevtoolsPerformanceHook("perf:end" /* PERFORMANCE_END */);
1678
1684
  function createDevtoolsPerformanceHook(hook) {
1679
1685
  return (component, type, time) => {
1680
- if (!devtools)
1681
- return;
1682
- devtools.emit(hook, component.appContext.app, component.uid, component, type, time);
1686
+ emit(hook, component.appContext.app, component.uid, component, type, time);
1683
1687
  };
1684
1688
  }
1685
1689
  function devtoolsComponentEmit(component, event, params) {
1686
- if (!devtools)
1687
- return;
1688
- devtools.emit("component:emit" /* COMPONENT_EMIT */, component.appContext.app, component, event, params);
1690
+ emit("component:emit" /* COMPONENT_EMIT */, component.appContext.app, component, event, params);
1689
1691
  }
1690
1692
 
1691
1693
  const deprecationData = {
@@ -2145,7 +2147,7 @@ function off(instance, event, fn) {
2145
2147
  events[event] = cbs.filter(cb => !(cb === fn || cb.fn === fn));
2146
2148
  return vm;
2147
2149
  }
2148
- function emit(instance, event, args) {
2150
+ function emit$1(instance, event, args) {
2149
2151
  const cbs = getRegistry(instance)[event];
2150
2152
  if (cbs) {
2151
2153
  callWithAsyncErrorHandling(cbs.map(cb => cb.bind(instance.proxy)), instance, 6 /* COMPONENT_EVENT_HANDLER */, args);
@@ -2198,7 +2200,7 @@ function compatModelEmit(instance, event, args) {
2198
2200
  }
2199
2201
  }
2200
2202
 
2201
- function emit$1(instance, event, ...rawArgs) {
2203
+ function emit$2(instance, event, ...rawArgs) {
2202
2204
  const props = instance.vnode.props || EMPTY_OBJ;
2203
2205
  {
2204
2206
  const { emitsOptions, propsOptions: [propsOptions] } = instance;
@@ -2274,7 +2276,7 @@ function emit$1(instance, event, ...rawArgs) {
2274
2276
  }
2275
2277
  {
2276
2278
  compatModelEmit(instance, event, args);
2277
- return emit(instance, event, args);
2279
+ return emit$1(instance, event, args);
2278
2280
  }
2279
2281
  }
2280
2282
  function normalizeEmitsOptions(comp, appContext, asMixin = false) {
@@ -5273,7 +5275,7 @@ function createCompatVue(createApp, createSingletonApp) {
5273
5275
  return vm;
5274
5276
  }
5275
5277
  }
5276
- Vue.version = "3.2.13";
5278
+ Vue.version = "3.2.17";
5277
5279
  Vue.config = singletonApp.config;
5278
5280
  Vue.use = (p, ...options) => {
5279
5281
  if (p && isFunction(p.install)) {
@@ -6271,10 +6273,10 @@ function createHydrationRenderer(options) {
6271
6273
  }
6272
6274
  // implementation
6273
6275
  function baseCreateRenderer(options, createHydrationFns) {
6276
+ const target = getGlobalThis();
6277
+ target.__VUE__ = true;
6274
6278
  {
6275
- const target = getGlobalThis();
6276
- target.__VUE__ = true;
6277
- setDevtoolsHook(target.__VUE_DEVTOOLS_GLOBAL_HOOK__);
6279
+ setDevtoolsHook(target.__VUE_DEVTOOLS_GLOBAL_HOOK__, target);
6278
6280
  }
6279
6281
  const { insert: hostInsert, remove: hostRemove, patchProp: hostPatchProp, createElement: hostCreateElement, createText: hostCreateText, createComment: hostCreateComment, setText: hostSetText, setElementText: hostSetElementText, parentNode: hostParentNode, nextSibling: hostNextSibling, setScopeId: hostSetScopeId = NOOP, cloneNode: hostCloneNode, insertStaticContent: hostInsertStaticContent } = options;
6280
6282
  // Note: functions inside this closure should use `const xxx = () => {}`
@@ -9459,7 +9461,7 @@ function createComponentInstance(vnode, parent, suspense) {
9459
9461
  instance.ctx = createDevRenderContext(instance);
9460
9462
  }
9461
9463
  instance.root = parent ? parent.root : instance;
9462
- instance.emit = emit$1.bind(null, instance);
9464
+ instance.emit = emit$2.bind(null, instance);
9463
9465
  // apply custom element special handling
9464
9466
  if (vnode.ce) {
9465
9467
  vnode.ce(instance);
@@ -9619,9 +9621,11 @@ function finishComponentSetup(instance, isSSR, skipOptions) {
9619
9621
  }
9620
9622
  }
9621
9623
  // template / render function normalization
9624
+ // could be already set when returned from setup()
9622
9625
  if (!instance.render) {
9623
- // could be set from setup()
9624
- if (compile && !Component.render) {
9626
+ // only do on-the-fly compile if not in SSR - SSR on-the-fly compliation
9627
+ // is done by server-renderer
9628
+ if (!isSSR && compile && !Component.render) {
9625
9629
  const template = (instance.vnode.props &&
9626
9630
  instance.vnode.props['inline-template']) ||
9627
9631
  Component.template;
@@ -10842,7 +10846,7 @@ function isMemoSame(cached, memo) {
10842
10846
  }
10843
10847
 
10844
10848
  // Core API ------------------------------------------------------------------
10845
- const version = "3.2.13";
10849
+ const version = "3.2.17";
10846
10850
  /**
10847
10851
  * SSR utils for \@vue/server-renderer. Only exposed in cjs builds.
10848
10852
  * @internal
@@ -12593,7 +12597,11 @@ function normalizeContainer(container) {
12593
12597
  warn$1(`mounting on a ShadowRoot with \`{mode: "closed"}\` may lead to unpredictable bugs`);
12594
12598
  }
12595
12599
  return container;
12596
- }
12600
+ }
12601
+ /**
12602
+ * @internal
12603
+ */
12604
+ const initDirectivesForSSR = NOOP;
12597
12605
 
12598
12606
  var runtimeDom = /*#__PURE__*/Object.freeze({
12599
12607
  __proto__: null,
@@ -12601,6 +12609,7 @@ var runtimeDom = /*#__PURE__*/Object.freeze({
12601
12609
  hydrate: hydrate,
12602
12610
  createApp: createApp,
12603
12611
  createSSRApp: createSSRApp,
12612
+ initDirectivesForSSR: initDirectivesForSSR,
12604
12613
  defineCustomElement: defineCustomElement,
12605
12614
  defineSSRCustomElement: defineSSRCustomElement,
12606
12615
  VueElement: VueElement,
@@ -12850,7 +12859,7 @@ const errorMessages = {
12850
12859
  [47 /* X_MODULE_MODE_NOT_SUPPORTED */]: `ES module mode is not supported in this build of compiler.`,
12851
12860
  [48 /* X_CACHE_HANDLER_NOT_SUPPORTED */]: `"cacheHandlers" option is only supported when the "prefixIdentifiers" option is enabled.`,
12852
12861
  [49 /* X_SCOPE_ID_NOT_SUPPORTED */]: `"scopeId" option is only supported in module mode.`,
12853
- // just to fullfill types
12862
+ // just to fulfill types
12854
12863
  [50 /* __EXTEND_POINT__ */]: ``
12855
12864
  };
12856
12865
 
@@ -14886,7 +14895,7 @@ function createStructuralDirectiveTransform(name, fn) {
14886
14895
  }
14887
14896
 
14888
14897
  const PURE_ANNOTATION = `/*#__PURE__*/`;
14889
- function createCodegenContext(ast, { mode = 'function', prefixIdentifiers = mode === 'module', sourceMap = false, filename = `template.vue.html`, scopeId = null, optimizeImports = false, runtimeGlobalName = `Vue`, runtimeModuleName = `vue`, ssr = false, isTS = false, inSSR = false }) {
14898
+ function createCodegenContext(ast, { mode = 'function', prefixIdentifiers = mode === 'module', sourceMap = false, filename = `template.vue.html`, scopeId = null, optimizeImports = false, runtimeGlobalName = `Vue`, runtimeModuleName = `vue`, ssrRuntimeModuleName = 'vue/server-renderer', ssr = false, isTS = false, inSSR = false }) {
14890
14899
  const context = {
14891
14900
  mode,
14892
14901
  prefixIdentifiers,
@@ -14896,6 +14905,7 @@ function createCodegenContext(ast, { mode = 'function', prefixIdentifiers = mode
14896
14905
  optimizeImports,
14897
14906
  runtimeGlobalName,
14898
14907
  runtimeModuleName,
14908
+ ssrRuntimeModuleName,
14899
14909
  ssr,
14900
14910
  isTS,
14901
14911
  inSSR,
@@ -15021,7 +15031,7 @@ function generate(ast, options = {}) {
15021
15031
  };
15022
15032
  }
15023
15033
  function genFunctionPreamble(ast, context) {
15024
- const { ssr, prefixIdentifiers, push, newline, runtimeModuleName, runtimeGlobalName } = context;
15034
+ const { ssr, prefixIdentifiers, push, newline, runtimeModuleName, runtimeGlobalName, ssrRuntimeModuleName } = context;
15025
15035
  const VueBinding = runtimeGlobalName;
15026
15036
  const aliasHelper = (s) => `${helperNameMap[s]}: _${helperNameMap[s]}`;
15027
15037
  // Generate const declaration for helpers
@@ -17100,9 +17110,9 @@ const transformModel = (dir, node, context) => {
17100
17110
  const eventArg = context.isTS ? `($event: any)` : `$event`;
17101
17111
  {
17102
17112
  assignmentExp = createCompoundExpression([
17103
- `${eventArg} => (`,
17113
+ `${eventArg} => ((`,
17104
17114
  exp,
17105
- ` = $event)`
17115
+ `) = $event)`
17106
17116
  ]);
17107
17117
  }
17108
17118
  const props = [
@@ -17896,4 +17906,4 @@ Vue.compile = compileToFunction;
17896
17906
  const { configureCompat: configureCompat$1 } = Vue;
17897
17907
 
17898
17908
  export default Vue;
17899
- export { BaseTransition, Comment, EffectScope, Fragment, KeepAlive, ReactiveEffect, Static, Suspense, Teleport, Text, Transition, TransitionGroup, VueElement, callWithAsyncErrorHandling, callWithErrorHandling, camelize, capitalize, cloneVNode, compatUtils, computed, configureCompat$1 as configureCompat, createApp, createBlock, createCommentVNode, createElementBlock, createBaseVNode as createElementVNode, createHydrationRenderer, createRenderer, createSSRApp, createSlots, createStaticVNode, createTextVNode, createVNode, customRef, defineAsyncComponent, defineComponent, defineCustomElement, defineEmits, defineExpose, defineProps, defineSSRCustomElement, devtools, effect, effectScope, getCurrentInstance, getCurrentScope, getTransitionRawChildren, guardReactiveProps, h, handleError, hydrate, initCustomFormatter, inject, isMemoSame, isProxy, isReactive, isReadonly, isRef, isRuntimeOnly, isVNode, markRaw, mergeDefaults, mergeProps, nextTick, normalizeClass, normalizeProps, normalizeStyle, onActivated, onBeforeMount, onBeforeUnmount, onBeforeUpdate, onDeactivated, onErrorCaptured, onMounted, onRenderTracked, onRenderTriggered, onScopeDispose, onServerPrefetch, onUnmounted, onUpdated, openBlock, popScopeId, provide, proxyRefs, pushScopeId, queuePostFlushCb, reactive, readonly, ref, registerRuntimeCompiler, render, renderList, renderSlot, resolveComponent, resolveDirective, resolveDynamicComponent, resolveFilter$1 as resolveFilter, resolveTransitionHooks, setBlockTracking, setDevtoolsHook, setTransitionHooks, shallowReactive, shallowReadonly, shallowRef, ssrContextKey, ssrUtils, stop, toDisplayString, toHandlerKey, toHandlers, toRaw, toRef, toRefs, transformVNodeArgs, triggerRef, unref, useAttrs, useCssModule, useCssVars, useSSRContext, useSlots, useTransitionState, vModelCheckbox, vModelDynamic, vModelRadio, vModelSelect, vModelText, vShow, version, warn$1 as warn, watch, watchEffect, watchPostEffect, watchSyncEffect, withAsyncContext, withCtx, withDefaults, withDirectives, withKeys, withMemo, withModifiers, withScopeId };
17909
+ export { BaseTransition, Comment, EffectScope, Fragment, KeepAlive, ReactiveEffect, Static, Suspense, Teleport, Text, Transition, TransitionGroup, VueElement, callWithAsyncErrorHandling, callWithErrorHandling, camelize, capitalize, cloneVNode, compatUtils, computed, configureCompat$1 as configureCompat, createApp, createBlock, createCommentVNode, createElementBlock, createBaseVNode as createElementVNode, createHydrationRenderer, createRenderer, createSSRApp, createSlots, createStaticVNode, createTextVNode, createVNode, customRef, defineAsyncComponent, defineComponent, defineCustomElement, defineEmits, defineExpose, defineProps, defineSSRCustomElement, devtools, effect, effectScope, getCurrentInstance, getCurrentScope, getTransitionRawChildren, guardReactiveProps, h, handleError, hydrate, initCustomFormatter, initDirectivesForSSR, inject, isMemoSame, isProxy, isReactive, isReadonly, isRef, isRuntimeOnly, isVNode, markRaw, mergeDefaults, mergeProps, nextTick, normalizeClass, normalizeProps, normalizeStyle, onActivated, onBeforeMount, onBeforeUnmount, onBeforeUpdate, onDeactivated, onErrorCaptured, onMounted, onRenderTracked, onRenderTriggered, onScopeDispose, onServerPrefetch, onUnmounted, onUpdated, openBlock, popScopeId, provide, proxyRefs, pushScopeId, queuePostFlushCb, reactive, readonly, ref, registerRuntimeCompiler, render, renderList, renderSlot, resolveComponent, resolveDirective, resolveDynamicComponent, resolveFilter$1 as resolveFilter, resolveTransitionHooks, setBlockTracking, setDevtoolsHook, setTransitionHooks, shallowReactive, shallowReadonly, shallowRef, ssrContextKey, ssrUtils, stop, toDisplayString, toHandlerKey, toHandlers, toRaw, toRef, toRefs, transformVNodeArgs, triggerRef, unref, useAttrs, useCssModule, useCssVars, useSSRContext, useSlots, useTransitionState, vModelCheckbox, vModelDynamic, vModelRadio, vModelSelect, vModelText, vShow, version, warn$1 as warn, watch, watchEffect, watchPostEffect, watchSyncEffect, withAsyncContext, withCtx, withDefaults, withDirectives, withKeys, withMemo, withModifiers, withScopeId };