@vue/compat 3.5.19 → 3.5.21

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,9 +1,8 @@
1
1
  /**
2
- * @vue/compat v3.5.19
2
+ * @vue/compat v3.5.21
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
6
- /*! #__NO_SIDE_EFFECTS__ */
7
6
  // @__NO_SIDE_EFFECTS__
8
7
  function makeMap(str) {
9
8
  const map = /* @__PURE__ */ Object.create(null);
@@ -61,10 +60,10 @@ const cacheStringFunction = (fn) => {
61
60
  return hit || (cache[str] = fn(str));
62
61
  });
63
62
  };
64
- const camelizeRE = /-(\w)/g;
63
+ const camelizeRE = /-\w/g;
65
64
  const camelize = cacheStringFunction(
66
65
  (str) => {
67
- return str.replace(camelizeRE, (_, c) => c ? c.toUpperCase() : "");
66
+ return str.replace(camelizeRE, (c) => c.slice(1).toUpperCase());
68
67
  }
69
68
  );
70
69
  const hyphenateRE = /\B([A-Z])/g;
@@ -1168,7 +1167,7 @@ const arrayInstrumentations = {
1168
1167
  join(separator) {
1169
1168
  return reactiveReadArray(this).join(separator);
1170
1169
  },
1171
- // keys() iterator only reads `length`, no optimisation required
1170
+ // keys() iterator only reads `length`, no optimization required
1172
1171
  lastIndexOf(...args) {
1173
1172
  return searchProxy(this, "lastIndexOf", args);
1174
1173
  },
@@ -1520,7 +1519,7 @@ function createInstrumentations(readonly, shallow) {
1520
1519
  get size() {
1521
1520
  const target = this["__v_raw"];
1522
1521
  !readonly && track(toRaw(target), "iterate", ITERATE_KEY);
1523
- return Reflect.get(target, "size", target);
1522
+ return target.size;
1524
1523
  },
1525
1524
  has(key) {
1526
1525
  const target = this["__v_raw"];
@@ -2237,11 +2236,11 @@ function traverse(value, depth = Infinity, seen) {
2237
2236
  if (depth <= 0 || !isObject(value) || value["__v_skip"]) {
2238
2237
  return value;
2239
2238
  }
2240
- seen = seen || /* @__PURE__ */ new Set();
2241
- if (seen.has(value)) {
2239
+ seen = seen || /* @__PURE__ */ new Map();
2240
+ if ((seen.get(value) || 0) >= depth) {
2242
2241
  return value;
2243
2242
  }
2244
- seen.add(value);
2243
+ seen.set(value, depth);
2245
2244
  depth--;
2246
2245
  if (isRef(value)) {
2247
2246
  traverse(value.value, depth, seen);
@@ -2708,11 +2707,14 @@ function checkRecursiveUpdates(seen, fn) {
2708
2707
  let isHmrUpdating = false;
2709
2708
  const hmrDirtyComponents = /* @__PURE__ */ new Map();
2710
2709
  if (!!(process.env.NODE_ENV !== "production")) {
2711
- getGlobalThis().__VUE_HMR_RUNTIME__ = {
2712
- createRecord: tryWrap(createRecord),
2713
- rerender: tryWrap(rerender),
2714
- reload: tryWrap(reload)
2715
- };
2710
+ const g = getGlobalThis();
2711
+ if (!g.__VUE_HMR_RUNTIME__) {
2712
+ g.__VUE_HMR_RUNTIME__ = {
2713
+ createRecord: tryWrap(createRecord),
2714
+ rerender: tryWrap(rerender),
2715
+ reload: tryWrap(reload)
2716
+ };
2717
+ }
2716
2718
  }
2717
2719
  const map = /* @__PURE__ */ new Map();
2718
2720
  function registerHMR(instance) {
@@ -2785,10 +2787,12 @@ function reload(id, newComp) {
2785
2787
  dirtyInstances.delete(instance);
2786
2788
  } else if (instance.parent) {
2787
2789
  queueJob(() => {
2788
- isHmrUpdating = true;
2789
- instance.parent.update();
2790
- isHmrUpdating = false;
2791
- dirtyInstances.delete(instance);
2790
+ if (!(instance.job.flags & 8)) {
2791
+ isHmrUpdating = true;
2792
+ instance.parent.update();
2793
+ isHmrUpdating = false;
2794
+ dirtyInstances.delete(instance);
2795
+ }
2792
2796
  });
2793
2797
  } else if (instance.appContext.reload) {
2794
2798
  instance.appContext.reload();
@@ -2892,7 +2896,6 @@ const devtoolsComponentRemoved = (component) => {
2892
2896
  _devtoolsComponentRemoved(component);
2893
2897
  }
2894
2898
  };
2895
- /*! #__NO_SIDE_EFFECTS__ */
2896
2899
  // @__NO_SIDE_EFFECTS__
2897
2900
  function createDevtoolsComponentHook(hook) {
2898
2901
  return (component) => {
@@ -3821,26 +3824,34 @@ function moveTeleport(vnode, container, parentAnchor, { o: { insert }, m: move }
3821
3824
  function hydrateTeleport(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized, {
3822
3825
  o: { nextSibling, parentNode, querySelector, insert, createText }
3823
3826
  }, hydrateChildren) {
3827
+ function hydrateDisabledTeleport(node2, vnode2, targetStart, targetAnchor) {
3828
+ vnode2.anchor = hydrateChildren(
3829
+ nextSibling(node2),
3830
+ vnode2,
3831
+ parentNode(node2),
3832
+ parentComponent,
3833
+ parentSuspense,
3834
+ slotScopeIds,
3835
+ optimized
3836
+ );
3837
+ vnode2.targetStart = targetStart;
3838
+ vnode2.targetAnchor = targetAnchor;
3839
+ }
3824
3840
  const target = vnode.target = resolveTarget(
3825
3841
  vnode.props,
3826
3842
  querySelector
3827
3843
  );
3844
+ const disabled = isTeleportDisabled(vnode.props);
3828
3845
  if (target) {
3829
- const disabled = isTeleportDisabled(vnode.props);
3830
3846
  const targetNode = target._lpa || target.firstChild;
3831
3847
  if (vnode.shapeFlag & 16) {
3832
3848
  if (disabled) {
3833
- vnode.anchor = hydrateChildren(
3834
- nextSibling(node),
3849
+ hydrateDisabledTeleport(
3850
+ node,
3835
3851
  vnode,
3836
- parentNode(node),
3837
- parentComponent,
3838
- parentSuspense,
3839
- slotScopeIds,
3840
- optimized
3852
+ targetNode,
3853
+ targetNode && nextSibling(targetNode)
3841
3854
  );
3842
- vnode.targetStart = targetNode;
3843
- vnode.targetAnchor = targetNode && nextSibling(targetNode);
3844
3855
  } else {
3845
3856
  vnode.anchor = nextSibling(node);
3846
3857
  let targetAnchor = targetNode;
@@ -3871,6 +3882,10 @@ function hydrateTeleport(node, vnode, parentComponent, parentSuspense, slotScope
3871
3882
  }
3872
3883
  }
3873
3884
  updateCssVars(vnode, disabled);
3885
+ } else if (disabled) {
3886
+ if (vnode.shapeFlag & 16) {
3887
+ hydrateDisabledTeleport(node, vnode, node, nextSibling(node));
3888
+ }
3874
3889
  }
3875
3890
  return vnode.anchor && nextSibling(vnode.anchor);
3876
3891
  }
@@ -3982,7 +3997,7 @@ const BaseTransitionImpl = {
3982
3997
  setTransitionHooks(innerChild, enterHooks);
3983
3998
  }
3984
3999
  let oldInnerChild = instance.subTree && getInnerChild$1(instance.subTree);
3985
- if (oldInnerChild && oldInnerChild.type !== Comment && !isSameVNodeType(innerChild, oldInnerChild) && recursiveGetSubtree(instance).type !== Comment) {
4000
+ if (oldInnerChild && oldInnerChild.type !== Comment && !isSameVNodeType(oldInnerChild, innerChild) && recursiveGetSubtree(instance).type !== Comment) {
3986
4001
  let leavingHooks = resolveTransitionHooks(
3987
4002
  oldInnerChild,
3988
4003
  rawProps,
@@ -4266,7 +4281,6 @@ function getTransitionRawChildren(children, keepComment = false, parentKey) {
4266
4281
  return ret;
4267
4282
  }
4268
4283
 
4269
- /*! #__NO_SIDE_EFFECTS__ */
4270
4284
  // @__NO_SIDE_EFFECTS__
4271
4285
  function defineComponent(options, extraOptions) {
4272
4286
  return isFunction(options) ? (
@@ -4319,6 +4333,7 @@ function useTemplateRef(key) {
4319
4333
  return ret;
4320
4334
  }
4321
4335
 
4336
+ const pendingSetRefMap = /* @__PURE__ */ new WeakMap();
4322
4337
  function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
4323
4338
  if (isArray(rawRef)) {
4324
4339
  rawRef.forEach(
@@ -4368,6 +4383,7 @@ function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
4368
4383
  return !!!(process.env.NODE_ENV !== "production") || !knownTemplateRefs.has(ref2);
4369
4384
  };
4370
4385
  if (oldRef != null && oldRef !== ref) {
4386
+ invalidatePendingSetRef(oldRawRef);
4371
4387
  if (isString(oldRef)) {
4372
4388
  refs[oldRef] = null;
4373
4389
  if (canSetSetupRef(oldRef)) {
@@ -4425,9 +4441,15 @@ function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
4425
4441
  }
4426
4442
  };
4427
4443
  if (value) {
4428
- doSet.id = -1;
4429
- queuePostRenderEffect(doSet, parentSuspense);
4444
+ const job = () => {
4445
+ doSet();
4446
+ pendingSetRefMap.delete(rawRef);
4447
+ };
4448
+ job.id = -1;
4449
+ pendingSetRefMap.set(rawRef, job);
4450
+ queuePostRenderEffect(job, parentSuspense);
4430
4451
  } else {
4452
+ invalidatePendingSetRef(rawRef);
4431
4453
  doSet();
4432
4454
  }
4433
4455
  } else if (!!(process.env.NODE_ENV !== "production")) {
@@ -4435,6 +4457,13 @@ function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
4435
4457
  }
4436
4458
  }
4437
4459
  }
4460
+ function invalidatePendingSetRef(rawRef) {
4461
+ const pendingSetRef = pendingSetRefMap.get(rawRef);
4462
+ if (pendingSetRef) {
4463
+ pendingSetRef.flags |= 8;
4464
+ pendingSetRefMap.delete(rawRef);
4465
+ }
4466
+ }
4438
4467
 
4439
4468
  let hasLoggedMismatchError = false;
4440
4469
  const logMismatchError = () => {
@@ -5178,7 +5207,6 @@ function forEachElement(node, cb) {
5178
5207
  }
5179
5208
 
5180
5209
  const isAsyncWrapper = (i) => !!i.type.__asyncLoader;
5181
- /*! #__NO_SIDE_EFFECTS__ */
5182
5210
  // @__NO_SIDE_EFFECTS__
5183
5211
  function defineAsyncComponent(source) {
5184
5212
  if (isFunction(source)) {
@@ -6189,7 +6217,7 @@ function legacyRenderSlot(instance, name, fallback, props, bindObject) {
6189
6217
  }
6190
6218
  return renderSlot(instance.slots, name, props, fallback && (() => fallback));
6191
6219
  }
6192
- function legacyresolveScopedSlots(fns, raw, hasDynamicKeys) {
6220
+ function legacyResolveScopedSlots(fns, raw, hasDynamicKeys) {
6193
6221
  return createSlots(
6194
6222
  raw || { $stable: !hasDynamicKeys },
6195
6223
  mapKeyToName(fns)
@@ -6356,7 +6384,7 @@ function installCompatInstanceProperties(map) {
6356
6384
  _b: () => legacyBindObjectProps,
6357
6385
  _v: () => createTextVNode,
6358
6386
  _e: () => createCommentVNode,
6359
- _u: () => legacyresolveScopedSlots,
6387
+ _u: () => legacyResolveScopedSlots,
6360
6388
  _g: () => legacyBindObjectListeners,
6361
6389
  _d: () => legacyBindDynamicKeys,
6362
6390
  _p: () => legacyPrependModifier
@@ -7277,7 +7305,7 @@ function createCompatVue$1(createApp, createSingletonApp) {
7277
7305
  return vm;
7278
7306
  }
7279
7307
  }
7280
- Vue.version = `2.6.14-compat:${"3.5.19"}`;
7308
+ Vue.version = `2.6.14-compat:${"3.5.21"}`;
7281
7309
  Vue.config = singletonApp.config;
7282
7310
  Vue.use = (plugin, ...options) => {
7283
7311
  if (plugin && isFunction(plugin.install)) {
@@ -7535,7 +7563,7 @@ function installCompatMount(app, context, render) {
7535
7563
  if (!!(process.env.NODE_ENV !== "production")) {
7536
7564
  for (let i = 0; i < container.attributes.length; i++) {
7537
7565
  const attr = container.attributes[i];
7538
- if (attr.name !== "v-cloak" && /^(v-|:|@)/.test(attr.name)) {
7566
+ if (attr.name !== "v-cloak" && /^(?:v-|:|@)/.test(attr.name)) {
7539
7567
  warnDeprecation$1("GLOBAL_MOUNT_CONTAINER", null);
7540
7568
  break;
7541
7569
  }
@@ -10387,8 +10415,9 @@ function emit(instance, event, ...rawArgs) {
10387
10415
  return emit$1(instance, event, args);
10388
10416
  }
10389
10417
  }
10418
+ const mixinEmitsCache = /* @__PURE__ */ new WeakMap();
10390
10419
  function normalizeEmitsOptions(comp, appContext, asMixin = false) {
10391
- const cache = appContext.emitsCache;
10420
+ const cache = __VUE_OPTIONS_API__ && asMixin ? mixinEmitsCache : appContext.emitsCache;
10392
10421
  const cached = cache.get(comp);
10393
10422
  if (cached !== void 0) {
10394
10423
  return cached;
@@ -10860,7 +10889,7 @@ function patchSuspense(n1, n2, container, anchor, parentComponent, namespace, sl
10860
10889
  const { activeBranch, pendingBranch, isInFallback, isHydrating } = suspense;
10861
10890
  if (pendingBranch) {
10862
10891
  suspense.pendingBranch = newBranch;
10863
- if (isSameVNodeType(newBranch, pendingBranch)) {
10892
+ if (isSameVNodeType(pendingBranch, newBranch)) {
10864
10893
  patch(
10865
10894
  pendingBranch,
10866
10895
  newBranch,
@@ -10931,7 +10960,7 @@ function patchSuspense(n1, n2, container, anchor, parentComponent, namespace, sl
10931
10960
  );
10932
10961
  setActiveBranch(suspense, newFallback);
10933
10962
  }
10934
- } else if (activeBranch && isSameVNodeType(newBranch, activeBranch)) {
10963
+ } else if (activeBranch && isSameVNodeType(activeBranch, newBranch)) {
10935
10964
  patch(
10936
10965
  activeBranch,
10937
10966
  newBranch,
@@ -10962,7 +10991,7 @@ function patchSuspense(n1, n2, container, anchor, parentComponent, namespace, sl
10962
10991
  }
10963
10992
  }
10964
10993
  } else {
10965
- if (activeBranch && isSameVNodeType(newBranch, activeBranch)) {
10994
+ if (activeBranch && isSameVNodeType(activeBranch, newBranch)) {
10966
10995
  patch(
10967
10996
  activeBranch,
10968
10997
  newBranch,
@@ -12212,7 +12241,7 @@ function getComponentPublicInstance(instance) {
12212
12241
  return instance.proxy;
12213
12242
  }
12214
12243
  }
12215
- const classifyRE = /(?:^|[-_])(\w)/g;
12244
+ const classifyRE = /(?:^|[-_])\w/g;
12216
12245
  const classify = (str) => str.replace(classifyRE, (c) => c.toUpperCase()).replace(/[-_]/g, "");
12217
12246
  function getComponentName(Component, includeInferred = true) {
12218
12247
  return isFunction(Component) ? Component.displayName || Component.name : Component.name || includeInferred && Component.__name;
@@ -12255,15 +12284,23 @@ const computed = (getterOrOptions, debugOptions) => {
12255
12284
  };
12256
12285
 
12257
12286
  function h(type, propsOrChildren, children) {
12287
+ const doCreateVNode = (type2, props, children2) => {
12288
+ setBlockTracking(-1);
12289
+ try {
12290
+ return createVNode(type2, props, children2);
12291
+ } finally {
12292
+ setBlockTracking(1);
12293
+ }
12294
+ };
12258
12295
  const l = arguments.length;
12259
12296
  if (l === 2) {
12260
12297
  if (isObject(propsOrChildren) && !isArray(propsOrChildren)) {
12261
12298
  if (isVNode(propsOrChildren)) {
12262
- return createVNode(type, null, [propsOrChildren]);
12299
+ return doCreateVNode(type, null, [propsOrChildren]);
12263
12300
  }
12264
- return createVNode(type, propsOrChildren);
12301
+ return doCreateVNode(type, propsOrChildren);
12265
12302
  } else {
12266
- return createVNode(type, null, propsOrChildren);
12303
+ return doCreateVNode(type, null, propsOrChildren);
12267
12304
  }
12268
12305
  } else {
12269
12306
  if (l > 3) {
@@ -12271,7 +12308,7 @@ function h(type, propsOrChildren, children) {
12271
12308
  } else if (l === 3 && isVNode(children)) {
12272
12309
  children = [children];
12273
12310
  }
12274
- return createVNode(type, propsOrChildren, children);
12311
+ return doCreateVNode(type, propsOrChildren, children);
12275
12312
  }
12276
12313
  }
12277
12314
 
@@ -12481,7 +12518,7 @@ function isMemoSame(cached, memo) {
12481
12518
  return true;
12482
12519
  }
12483
12520
 
12484
- const version = "3.5.19";
12521
+ const version = "3.5.21";
12485
12522
  const warn = !!(process.env.NODE_ENV !== "production") ? warn$1 : NOOP;
12486
12523
  const ErrorTypeStrings = ErrorTypeStrings$1 ;
12487
12524
  const devtools = !!(process.env.NODE_ENV !== "production") || true ? devtools$1 : void 0;
@@ -12884,7 +12921,7 @@ function getTransitionInfo(el, expectedType) {
12884
12921
  type = timeout > 0 ? transitionTimeout > animationTimeout ? TRANSITION$1 : ANIMATION : null;
12885
12922
  propCount = type ? type === TRANSITION$1 ? transitionDurations.length : animationDurations.length : 0;
12886
12923
  }
12887
- const hasTransform = type === TRANSITION$1 && /\b(transform|all)(,|$)/.test(
12924
+ const hasTransform = type === TRANSITION$1 && /\b(?:transform|all)(?:,|$)/.test(
12888
12925
  getStyleProperties(`${TRANSITION$1}Property`).toString()
12889
12926
  );
12890
12927
  return {
@@ -12925,6 +12962,8 @@ function patchClass(el, value, isSVG) {
12925
12962
  const vShowOriginalDisplay = Symbol("_vod");
12926
12963
  const vShowHidden = Symbol("_vsh");
12927
12964
  const vShow = {
12965
+ // used for prop mismatch check during hydration
12966
+ name: "show",
12928
12967
  beforeMount(el, { value }, { transition }) {
12929
12968
  el[vShowOriginalDisplay] = el.style.display === "none" ? "" : el.style.display;
12930
12969
  if (transition && value) {
@@ -12958,9 +12997,6 @@ const vShow = {
12958
12997
  setDisplay(el, value);
12959
12998
  }
12960
12999
  };
12961
- if (!!(process.env.NODE_ENV !== "production") || __VUE_PROD_HYDRATION_MISMATCH_DETAILS__) {
12962
- vShow.name = "show";
12963
- }
12964
13000
  function setDisplay(el, value) {
12965
13001
  el.style.display = value ? el[vShowOriginalDisplay] : "none";
12966
13002
  el[vShowHidden] = !value;
@@ -13046,7 +13082,7 @@ function setVarsOnNode(el, vars) {
13046
13082
  }
13047
13083
  }
13048
13084
 
13049
- const displayRE = /(^|;)\s*display\s*:/;
13085
+ const displayRE = /(?:^|;)\s*display\s*:/;
13050
13086
  function patchStyle(el, prev, next) {
13051
13087
  const style = el.style;
13052
13088
  const isCssString = isString(next);
@@ -13413,11 +13449,10 @@ function shouldSetAsProp(el, key, value, isSVG) {
13413
13449
  }
13414
13450
 
13415
13451
  const REMOVAL = {};
13416
- /*! #__NO_SIDE_EFFECTS__ */
13417
13452
  // @__NO_SIDE_EFFECTS__
13418
13453
  function defineCustomElement(options, extraOptions, _createApp) {
13419
- const Comp = defineComponent(options, extraOptions);
13420
- if (isPlainObject(Comp)) extend(Comp, extraOptions);
13454
+ let Comp = defineComponent(options, extraOptions);
13455
+ if (isPlainObject(Comp)) Comp = extend({}, Comp, extraOptions);
13421
13456
  class VueCustomElement extends VueElement {
13422
13457
  constructor(initialProps) {
13423
13458
  super(Comp, initialProps, _createApp);
@@ -13426,7 +13461,6 @@ function defineCustomElement(options, extraOptions, _createApp) {
13426
13461
  VueCustomElement.def = Comp;
13427
13462
  return VueCustomElement;
13428
13463
  }
13429
-
13430
13464
  const defineSSRCustomElement = (/* @__NO_SIDE_EFFECTS__ */ (options, extraOptions) => {
13431
13465
  return /* @__PURE__ */ defineCustomElement(options, extraOptions, createSSRApp);
13432
13466
  });
@@ -13902,7 +13936,7 @@ const TransitionGroupImpl = /* @__PURE__ */ decorate({
13902
13936
  if (e && e.target !== el) {
13903
13937
  return;
13904
13938
  }
13905
- if (!e || /transform$/.test(e.propertyName)) {
13939
+ if (!e || e.propertyName.endsWith("transform")) {
13906
13940
  el.removeEventListener("transitionend", cb);
13907
13941
  el[moveCbKey] = null;
13908
13942
  removeTransitionClass(el, moveClass);
@@ -14401,7 +14435,7 @@ const createApp = ((...args) => {
14401
14435
  if (!!(process.env.NODE_ENV !== "production") && container.nodeType === 1) {
14402
14436
  for (let i = 0; i < container.attributes.length; i++) {
14403
14437
  const attr = container.attributes[i];
14404
- if (attr.name !== "v-cloak" && /^(v-|:|@)/.test(attr.name)) {
14438
+ if (attr.name !== "v-cloak" && /^(?:v-|:|@)/.test(attr.name)) {
14405
14439
  compatUtils.warnDeprecation(
14406
14440
  "GLOBAL_MOUNT_CONTAINER",
14407
14441
  null
@@ -16006,7 +16040,7 @@ const isMemberExpressionBrowser = (exp) => {
16006
16040
  return !currentOpenBracketCount && !currentOpenParensCount;
16007
16041
  };
16008
16042
  const isMemberExpression = isMemberExpressionBrowser ;
16009
- const fnExpRE = /^\s*(async\s*)?(\([^)]*?\)|[\w$_]+)\s*(:[^=]+)?=>|^\s*(async\s+)?function(?:\s+[\w$]+)?\s*\(/;
16043
+ const fnExpRE = /^\s*(?:async\s*)?(?:\([^)]*?\)|[\w$_]+)\s*(?::[^=]+)?=>|^\s*(?:async\s+)?function(?:\s+[\w$]+)?\s*\(/;
16010
16044
  const isFnExpressionBrowser = (exp) => fnExpRE.test(getExpSource(exp));
16011
16045
  const isFnExpression = isFnExpressionBrowser ;
16012
16046
  function assert(condition, msg) {
@@ -18148,7 +18182,7 @@ function processExpression(node, context, asParams = false, asRawStatements = fa
18148
18182
  }
18149
18183
 
18150
18184
  const transformIf = createStructuralDirectiveTransform(
18151
- /^(if|else|else-if)$/,
18185
+ /^(?:if|else|else-if)$/,
18152
18186
  (node, dir, context) => {
18153
18187
  return processIf(node, dir, context, (ifNode, branch, isRoot) => {
18154
18188
  const siblings = context.parent.children;
@@ -18735,7 +18769,7 @@ function buildSlots(node, context, buildSlotFn = buildClientSlotFn) {
18735
18769
  );
18736
18770
  } else if (vElse = findDir(
18737
18771
  slotElement,
18738
- /^else(-if)?$/,
18772
+ /^else(?:-if)?$/,
18739
18773
  true
18740
18774
  /* allowEmpty */
18741
18775
  )) {
@@ -18747,7 +18781,7 @@ function buildSlots(node, context, buildSlotFn = buildClientSlotFn) {
18747
18781
  break;
18748
18782
  }
18749
18783
  }
18750
- if (prev && isTemplateNode(prev) && findDir(prev, /^(else-)?if$/)) {
18784
+ if (prev && isTemplateNode(prev) && findDir(prev, /^(?:else-)?if$/)) {
18751
18785
  let conditional = dynamicSlots[dynamicSlots.length - 1];
18752
18786
  while (conditional.alternate.type === 19) {
18753
18787
  conditional = conditional.alternate;