@silexlabs/silex-dashboard 1.3.0 → 1.4.1-0

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,12 +1,11 @@
1
1
  /**
2
- * vue v3.5.13
2
+ * vue v3.5.22
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
6
6
  var Vue = (function (exports) {
7
7
  'use strict';
8
8
 
9
- /*! #__NO_SIDE_EFFECTS__ */
10
9
  // @__NO_SIDE_EFFECTS__
11
10
  function makeMap(str) {
12
11
  const map = /* @__PURE__ */ Object.create(null);
@@ -59,15 +58,15 @@ var Vue = (function (exports) {
59
58
  );
60
59
  const cacheStringFunction = (fn) => {
61
60
  const cache = /* @__PURE__ */ Object.create(null);
62
- return (str) => {
61
+ return ((str) => {
63
62
  const hit = cache[str];
64
63
  return hit || (cache[str] = fn(str));
65
- };
64
+ });
66
65
  };
67
- const camelizeRE = /-(\w)/g;
66
+ const camelizeRE = /-\w/g;
68
67
  const camelize = cacheStringFunction(
69
68
  (str) => {
70
- return str.replace(camelizeRE, (_, c) => c ? c.toUpperCase() : "");
69
+ return str.replace(camelizeRE, (c) => c.slice(1).toUpperCase());
71
70
  }
72
71
  );
73
72
  const hyphenateRE = /\B([A-Z])/g;
@@ -129,7 +128,7 @@ var Vue = (function (exports) {
129
128
  [512]: `NEED_PATCH`,
130
129
  [1024]: `DYNAMIC_SLOTS`,
131
130
  [2048]: `DEV_ROOT_FRAGMENT`,
132
- [-1]: `HOISTED`,
131
+ [-1]: `CACHED`,
133
132
  [-2]: `BAIL`
134
133
  };
135
134
 
@@ -387,6 +386,24 @@ var Vue = (function (exports) {
387
386
  );
388
387
  };
389
388
 
389
+ function normalizeCssVarValue(value) {
390
+ if (value == null) {
391
+ return "initial";
392
+ }
393
+ if (typeof value === "string") {
394
+ return value === "" ? " " : value;
395
+ }
396
+ if (typeof value !== "number" || !Number.isFinite(value)) {
397
+ {
398
+ console.warn(
399
+ "[Vue warn] Invalid value used for CSS binding. Expected a string or a finite number but received:",
400
+ value
401
+ );
402
+ }
403
+ }
404
+ return String(value);
405
+ }
406
+
390
407
  function warn$2(msg, ...args) {
391
408
  console.warn(`[Vue warn] ${msg}`, ...args);
392
409
  }
@@ -399,6 +416,10 @@ var Vue = (function (exports) {
399
416
  * @internal
400
417
  */
401
418
  this._active = true;
419
+ /**
420
+ * @internal track `on` calls, allow `on` call multiple times
421
+ */
422
+ this._on = 0;
402
423
  /**
403
424
  * @internal
404
425
  */
@@ -469,14 +490,20 @@ var Vue = (function (exports) {
469
490
  * @internal
470
491
  */
471
492
  on() {
472
- activeEffectScope = this;
493
+ if (++this._on === 1) {
494
+ this.prevScope = activeEffectScope;
495
+ activeEffectScope = this;
496
+ }
473
497
  }
474
498
  /**
475
499
  * This should only be called on non-detached scopes
476
500
  * @internal
477
501
  */
478
502
  off() {
479
- activeEffectScope = this.parent;
503
+ if (this._on > 0 && --this._on === 0) {
504
+ activeEffectScope = this.prevScope;
505
+ this.prevScope = void 0;
506
+ }
480
507
  }
481
508
  stop(fromParent) {
482
509
  if (this._active) {
@@ -558,7 +585,7 @@ var Vue = (function (exports) {
558
585
  }
559
586
  resume() {
560
587
  if (this.flags & 64) {
561
- this.flags &= ~64;
588
+ this.flags &= -65;
562
589
  if (pausedQueueEffects.has(this)) {
563
590
  pausedQueueEffects.delete(this);
564
591
  this.trigger();
@@ -598,7 +625,7 @@ var Vue = (function (exports) {
598
625
  cleanupDeps(this);
599
626
  activeSub = prevEffect;
600
627
  shouldTrack = prevShouldTrack;
601
- this.flags &= ~2;
628
+ this.flags &= -3;
602
629
  }
603
630
  }
604
631
  stop() {
@@ -609,7 +636,7 @@ var Vue = (function (exports) {
609
636
  this.deps = this.depsTail = void 0;
610
637
  cleanupEffect(this);
611
638
  this.onStop && this.onStop();
612
- this.flags &= ~1;
639
+ this.flags &= -2;
613
640
  }
614
641
  }
615
642
  trigger() {
@@ -659,7 +686,7 @@ var Vue = (function (exports) {
659
686
  while (e) {
660
687
  const next = e.next;
661
688
  e.next = void 0;
662
- e.flags &= ~8;
689
+ e.flags &= -9;
663
690
  e = next;
664
691
  }
665
692
  }
@@ -670,7 +697,7 @@ var Vue = (function (exports) {
670
697
  while (e) {
671
698
  const next = e.next;
672
699
  e.next = void 0;
673
- e.flags &= ~8;
700
+ e.flags &= -9;
674
701
  if (e.flags & 1) {
675
702
  try {
676
703
  ;
@@ -726,17 +753,16 @@ var Vue = (function (exports) {
726
753
  if (computed.flags & 4 && !(computed.flags & 16)) {
727
754
  return;
728
755
  }
729
- computed.flags &= ~16;
756
+ computed.flags &= -17;
730
757
  if (computed.globalVersion === globalVersion) {
731
758
  return;
732
759
  }
733
760
  computed.globalVersion = globalVersion;
734
- const dep = computed.dep;
735
- computed.flags |= 2;
736
- if (dep.version > 0 && !computed.isSSR && computed.deps && !isDirty(computed)) {
737
- computed.flags &= ~2;
761
+ if (!computed.isSSR && computed.flags & 128 && (!computed.deps && !computed._dirty || !isDirty(computed))) {
738
762
  return;
739
763
  }
764
+ computed.flags |= 2;
765
+ const dep = computed.dep;
740
766
  const prevSub = activeSub;
741
767
  const prevShouldTrack = shouldTrack;
742
768
  activeSub = computed;
@@ -745,6 +771,7 @@ var Vue = (function (exports) {
745
771
  prepareDeps(computed);
746
772
  const value = computed.fn(computed._value);
747
773
  if (dep.version === 0 || hasChanged(value, computed._value)) {
774
+ computed.flags |= 128;
748
775
  computed._value = value;
749
776
  dep.version++;
750
777
  }
@@ -755,7 +782,7 @@ var Vue = (function (exports) {
755
782
  activeSub = prevSub;
756
783
  shouldTrack = prevShouldTrack;
757
784
  cleanupDeps(computed);
758
- computed.flags &= ~2;
785
+ computed.flags &= -3;
759
786
  }
760
787
  }
761
788
  function removeSub(link, soft = false) {
@@ -774,7 +801,7 @@ var Vue = (function (exports) {
774
801
  if (dep.subs === link) {
775
802
  dep.subs = prevSub;
776
803
  if (!prevSub && dep.computed) {
777
- dep.computed.flags &= ~4;
804
+ dep.computed.flags &= -5;
778
805
  for (let l = dep.computed.deps; l; l = l.nextDep) {
779
806
  removeSub(l, true);
780
807
  }
@@ -850,6 +877,7 @@ var Vue = (function (exports) {
850
877
  }
851
878
  }
852
879
  class Dep {
880
+ // TODO isolatedDeclarations "__v_skip"
853
881
  constructor(computed) {
854
882
  this.computed = computed;
855
883
  this.version = 0;
@@ -870,6 +898,10 @@ var Vue = (function (exports) {
870
898
  * Subscriber counter
871
899
  */
872
900
  this.sc = 0;
901
+ /**
902
+ * @internal
903
+ */
904
+ this.__v_skip = true;
873
905
  {
874
906
  this.subsHead = void 0;
875
907
  }
@@ -1134,7 +1166,7 @@ var Vue = (function (exports) {
1134
1166
  join(separator) {
1135
1167
  return reactiveReadArray(this).join(separator);
1136
1168
  },
1137
- // keys() iterator only reads `length`, no optimisation required
1169
+ // keys() iterator only reads `length`, no optimization required
1138
1170
  lastIndexOf(...args) {
1139
1171
  return searchProxy(this, "lastIndexOf", args);
1140
1172
  },
@@ -1186,7 +1218,7 @@ var Vue = (function (exports) {
1186
1218
  iter._next = iter.next;
1187
1219
  iter.next = () => {
1188
1220
  const result = iter._next();
1189
- if (result.value) {
1221
+ if (!result.done) {
1190
1222
  result.value = wrapValue(result.value);
1191
1223
  }
1192
1224
  return result;
@@ -1313,7 +1345,8 @@ var Vue = (function (exports) {
1313
1345
  return res;
1314
1346
  }
1315
1347
  if (isRef(res)) {
1316
- return targetIsArray && isIntegerKey(key) ? res : res.value;
1348
+ const value = targetIsArray && isIntegerKey(key) ? res : res.value;
1349
+ return isReadonly2 && isObject(value) ? readonly(value) : value;
1317
1350
  }
1318
1351
  if (isObject(res)) {
1319
1352
  return isReadonly2 ? readonly(res) : reactive(res);
@@ -1335,7 +1368,13 @@ var Vue = (function (exports) {
1335
1368
  }
1336
1369
  if (!isArray(target) && isRef(oldValue) && !isRef(value)) {
1337
1370
  if (isOldValueReadonly) {
1338
- return false;
1371
+ {
1372
+ warn$2(
1373
+ `Set operation on key "${String(key)}" failed: target is readonly.`,
1374
+ target[key]
1375
+ );
1376
+ }
1377
+ return true;
1339
1378
  } else {
1340
1379
  oldValue.value = value;
1341
1380
  return true;
@@ -1480,7 +1519,7 @@ var Vue = (function (exports) {
1480
1519
  get size() {
1481
1520
  const target = this["__v_raw"];
1482
1521
  !readonly && track(toRaw(target), "iterate", ITERATE_KEY);
1483
- return Reflect.get(target, "size", target);
1522
+ return target.size;
1484
1523
  },
1485
1524
  has(key) {
1486
1525
  const target = this["__v_raw"];
@@ -1707,14 +1746,14 @@ var Vue = (function (exports) {
1707
1746
  if (target["__v_raw"] && !(isReadonly2 && target["__v_isReactive"])) {
1708
1747
  return target;
1709
1748
  }
1710
- const existingProxy = proxyMap.get(target);
1711
- if (existingProxy) {
1712
- return existingProxy;
1713
- }
1714
1749
  const targetType = getTargetType(target);
1715
1750
  if (targetType === 0 /* INVALID */) {
1716
1751
  return target;
1717
1752
  }
1753
+ const existingProxy = proxyMap.get(target);
1754
+ if (existingProxy) {
1755
+ return existingProxy;
1756
+ }
1718
1757
  const proxy = new Proxy(
1719
1758
  target,
1720
1759
  targetType === 2 /* COLLECTION */ ? collectionHandlers : baseHandlers
@@ -2137,11 +2176,11 @@ var Vue = (function (exports) {
2137
2176
  oldValue === INITIAL_WATCHER_VALUE ? void 0 : isMultiSource && oldValue[0] === INITIAL_WATCHER_VALUE ? [] : oldValue,
2138
2177
  boundCleanup
2139
2178
  ];
2179
+ oldValue = newValue;
2140
2180
  call ? call(cb, 3, args) : (
2141
2181
  // @ts-expect-error
2142
2182
  cb(...args)
2143
2183
  );
2144
- oldValue = newValue;
2145
2184
  } finally {
2146
2185
  activeWatcher = currentWatcher;
2147
2186
  }
@@ -2191,11 +2230,11 @@ var Vue = (function (exports) {
2191
2230
  if (depth <= 0 || !isObject(value) || value["__v_skip"]) {
2192
2231
  return value;
2193
2232
  }
2194
- seen = seen || /* @__PURE__ */ new Set();
2195
- if (seen.has(value)) {
2233
+ seen = seen || /* @__PURE__ */ new Map();
2234
+ if ((seen.get(value) || 0) >= depth) {
2196
2235
  return value;
2197
2236
  }
2198
- seen.add(value);
2237
+ seen.set(value, depth);
2199
2238
  depth--;
2200
2239
  if (isRef(value)) {
2201
2240
  traverse(value.value, depth, seen);
@@ -2558,11 +2597,11 @@ var Vue = (function (exports) {
2558
2597
  queue.splice(i, 1);
2559
2598
  i--;
2560
2599
  if (cb.flags & 4) {
2561
- cb.flags &= ~1;
2600
+ cb.flags &= -2;
2562
2601
  }
2563
2602
  cb();
2564
2603
  if (!(cb.flags & 4)) {
2565
- cb.flags &= ~1;
2604
+ cb.flags &= -2;
2566
2605
  }
2567
2606
  }
2568
2607
  }
@@ -2587,10 +2626,10 @@ var Vue = (function (exports) {
2587
2626
  continue;
2588
2627
  }
2589
2628
  if (cb.flags & 4) {
2590
- cb.flags &= ~1;
2629
+ cb.flags &= -2;
2591
2630
  }
2592
2631
  if (!(cb.flags & 8)) cb();
2593
- cb.flags &= ~1;
2632
+ cb.flags &= -2;
2594
2633
  }
2595
2634
  activePostFlushCbs = null;
2596
2635
  postFlushIndex = 0;
@@ -2626,7 +2665,7 @@ var Vue = (function (exports) {
2626
2665
  for (; flushIndex < queue.length; flushIndex++) {
2627
2666
  const job = queue[flushIndex];
2628
2667
  if (job) {
2629
- job.flags &= ~1;
2668
+ job.flags &= -2;
2630
2669
  }
2631
2670
  }
2632
2671
  flushIndex = -1;
@@ -2702,7 +2741,9 @@ var Vue = (function (exports) {
2702
2741
  }
2703
2742
  instance.renderCache = [];
2704
2743
  isHmrUpdating = true;
2705
- instance.update();
2744
+ if (!(instance.job.flags & 8)) {
2745
+ instance.update();
2746
+ }
2706
2747
  isHmrUpdating = false;
2707
2748
  });
2708
2749
  }
@@ -2732,10 +2773,12 @@ var Vue = (function (exports) {
2732
2773
  dirtyInstances.delete(instance);
2733
2774
  } else if (instance.parent) {
2734
2775
  queueJob(() => {
2735
- isHmrUpdating = true;
2736
- instance.parent.update();
2737
- isHmrUpdating = false;
2738
- dirtyInstances.delete(instance);
2776
+ if (!(instance.job.flags & 8)) {
2777
+ isHmrUpdating = true;
2778
+ instance.parent.update();
2779
+ isHmrUpdating = false;
2780
+ dirtyInstances.delete(instance);
2781
+ }
2739
2782
  });
2740
2783
  } else if (instance.appContext.reload) {
2741
2784
  instance.appContext.reload();
@@ -2839,7 +2882,6 @@ var Vue = (function (exports) {
2839
2882
  _devtoolsComponentRemoved(component);
2840
2883
  }
2841
2884
  };
2842
- /*! #__NO_SIDE_EFFECTS__ */
2843
2885
  // @__NO_SIDE_EFFECTS__
2844
2886
  function createDevtoolsComponentHook(hook) {
2845
2887
  return (component) => {
@@ -3025,9 +3067,6 @@ var Vue = (function (exports) {
3025
3067
  insert(mainAnchor, container, anchor);
3026
3068
  const mount = (container2, anchor2) => {
3027
3069
  if (shapeFlag & 16) {
3028
- if (parentComponent && parentComponent.isCE) {
3029
- parentComponent.ce._teleportTarget = container2;
3030
- }
3031
3070
  mountChildren(
3032
3071
  children,
3033
3072
  container2,
@@ -3049,6 +3088,9 @@ var Vue = (function (exports) {
3049
3088
  } else if (namespace !== "mathml" && isTargetMathML(target)) {
3050
3089
  namespace = "mathml";
3051
3090
  }
3091
+ if (parentComponent && parentComponent.isCE) {
3092
+ (parentComponent.ce._teleportTargets || (parentComponent.ce._teleportTargets = /* @__PURE__ */ new Set())).add(target);
3093
+ }
3052
3094
  if (!disabled) {
3053
3095
  mount(target, targetAnchor);
3054
3096
  updateCssVars(n2, false);
@@ -3066,15 +3108,16 @@ var Vue = (function (exports) {
3066
3108
  updateCssVars(n2, true);
3067
3109
  }
3068
3110
  if (isTeleportDeferred(n2.props)) {
3111
+ n2.el.__isMounted = false;
3069
3112
  queuePostRenderEffect(() => {
3070
3113
  mountToTarget();
3071
- n2.el.__isMounted = true;
3114
+ delete n2.el.__isMounted;
3072
3115
  }, parentSuspense);
3073
3116
  } else {
3074
3117
  mountToTarget();
3075
3118
  }
3076
3119
  } else {
3077
- if (isTeleportDeferred(n2.props) && !n1.el.__isMounted) {
3120
+ if (isTeleportDeferred(n2.props) && n1.el.__isMounted === false) {
3078
3121
  queuePostRenderEffect(() => {
3079
3122
  TeleportImpl.process(
3080
3123
  n1,
@@ -3088,7 +3131,6 @@ var Vue = (function (exports) {
3088
3131
  optimized,
3089
3132
  internals
3090
3133
  );
3091
- delete n1.el.__isMounted;
3092
3134
  }, parentSuspense);
3093
3135
  return;
3094
3136
  }
@@ -3115,7 +3157,7 @@ var Vue = (function (exports) {
3115
3157
  namespace,
3116
3158
  slotScopeIds
3117
3159
  );
3118
- traverseStaticChildren(n1, n2, true);
3160
+ traverseStaticChildren(n1, n2, false);
3119
3161
  } else if (!optimized) {
3120
3162
  patchChildren(
3121
3163
  n1,
@@ -3237,26 +3279,34 @@ var Vue = (function (exports) {
3237
3279
  function hydrateTeleport(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized, {
3238
3280
  o: { nextSibling, parentNode, querySelector, insert, createText }
3239
3281
  }, hydrateChildren) {
3282
+ function hydrateDisabledTeleport(node2, vnode2, targetStart, targetAnchor) {
3283
+ vnode2.anchor = hydrateChildren(
3284
+ nextSibling(node2),
3285
+ vnode2,
3286
+ parentNode(node2),
3287
+ parentComponent,
3288
+ parentSuspense,
3289
+ slotScopeIds,
3290
+ optimized
3291
+ );
3292
+ vnode2.targetStart = targetStart;
3293
+ vnode2.targetAnchor = targetAnchor;
3294
+ }
3240
3295
  const target = vnode.target = resolveTarget(
3241
3296
  vnode.props,
3242
3297
  querySelector
3243
3298
  );
3299
+ const disabled = isTeleportDisabled(vnode.props);
3244
3300
  if (target) {
3245
- const disabled = isTeleportDisabled(vnode.props);
3246
3301
  const targetNode = target._lpa || target.firstChild;
3247
3302
  if (vnode.shapeFlag & 16) {
3248
3303
  if (disabled) {
3249
- vnode.anchor = hydrateChildren(
3250
- nextSibling(node),
3304
+ hydrateDisabledTeleport(
3305
+ node,
3251
3306
  vnode,
3252
- parentNode(node),
3253
- parentComponent,
3254
- parentSuspense,
3255
- slotScopeIds,
3256
- optimized
3307
+ targetNode,
3308
+ targetNode && nextSibling(targetNode)
3257
3309
  );
3258
- vnode.targetStart = targetNode;
3259
- vnode.targetAnchor = targetNode && nextSibling(targetNode);
3260
3310
  } else {
3261
3311
  vnode.anchor = nextSibling(node);
3262
3312
  let targetAnchor = targetNode;
@@ -3287,6 +3337,10 @@ var Vue = (function (exports) {
3287
3337
  }
3288
3338
  }
3289
3339
  updateCssVars(vnode, disabled);
3340
+ } else if (disabled) {
3341
+ if (vnode.shapeFlag & 16) {
3342
+ hydrateDisabledTeleport(node, vnode, node, nextSibling(node));
3343
+ }
3290
3344
  }
3291
3345
  return vnode.anchor && nextSibling(vnode.anchor);
3292
3346
  }
@@ -3398,7 +3452,7 @@ var Vue = (function (exports) {
3398
3452
  setTransitionHooks(innerChild, enterHooks);
3399
3453
  }
3400
3454
  let oldInnerChild = instance.subTree && getInnerChild$1(instance.subTree);
3401
- if (oldInnerChild && oldInnerChild.type !== Comment && !isSameVNodeType(innerChild, oldInnerChild) && recursiveGetSubtree(instance).type !== Comment) {
3455
+ if (oldInnerChild && oldInnerChild.type !== Comment && !isSameVNodeType(oldInnerChild, innerChild) && recursiveGetSubtree(instance).type !== Comment) {
3402
3456
  let leavingHooks = resolveTransitionHooks(
3403
3457
  oldInnerChild,
3404
3458
  rawProps,
@@ -3678,7 +3732,6 @@ var Vue = (function (exports) {
3678
3732
  return ret;
3679
3733
  }
3680
3734
 
3681
- /*! #__NO_SIDE_EFFECTS__ */
3682
3735
  // @__NO_SIDE_EFFECTS__
3683
3736
  function defineComponent(options, extraOptions) {
3684
3737
  return isFunction(options) ? (
@@ -3731,6 +3784,7 @@ var Vue = (function (exports) {
3731
3784
  return ret;
3732
3785
  }
3733
3786
 
3787
+ const pendingSetRefMap = /* @__PURE__ */ new WeakMap();
3734
3788
  function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
3735
3789
  if (isArray(rawRef)) {
3736
3790
  rawRef.forEach(
@@ -3763,7 +3817,7 @@ var Vue = (function (exports) {
3763
3817
  const refs = owner.refs === EMPTY_OBJ ? owner.refs = {} : owner.refs;
3764
3818
  const setupState = owner.setupState;
3765
3819
  const rawSetupState = toRaw(setupState);
3766
- const canSetSetupRef = setupState === EMPTY_OBJ ? () => false : (key) => {
3820
+ const canSetSetupRef = setupState === EMPTY_OBJ ? NO : (key) => {
3767
3821
  {
3768
3822
  if (hasOwn(rawSetupState, key) && !isRef(rawSetupState[key])) {
3769
3823
  warn$1(
@@ -3776,14 +3830,22 @@ var Vue = (function (exports) {
3776
3830
  }
3777
3831
  return hasOwn(rawSetupState, key);
3778
3832
  };
3833
+ const canSetRef = (ref2) => {
3834
+ return !knownTemplateRefs.has(ref2);
3835
+ };
3779
3836
  if (oldRef != null && oldRef !== ref) {
3837
+ invalidatePendingSetRef(oldRawRef);
3780
3838
  if (isString(oldRef)) {
3781
3839
  refs[oldRef] = null;
3782
3840
  if (canSetSetupRef(oldRef)) {
3783
3841
  setupState[oldRef] = null;
3784
3842
  }
3785
3843
  } else if (isRef(oldRef)) {
3786
- oldRef.value = null;
3844
+ if (canSetRef(oldRef)) {
3845
+ oldRef.value = null;
3846
+ }
3847
+ const oldRawRefAtom = oldRawRef;
3848
+ if (oldRawRefAtom.k) refs[oldRawRefAtom.k] = null;
3787
3849
  }
3788
3850
  }
3789
3851
  if (isFunction(ref)) {
@@ -3794,7 +3856,7 @@ var Vue = (function (exports) {
3794
3856
  if (_isString || _isRef) {
3795
3857
  const doSet = () => {
3796
3858
  if (rawRef.f) {
3797
- const existing = _isString ? canSetSetupRef(ref) ? setupState[ref] : refs[ref] : ref.value;
3859
+ const existing = _isString ? canSetSetupRef(ref) ? setupState[ref] : refs[ref] : canSetRef(ref) || !rawRef.k ? ref.value : refs[rawRef.k];
3798
3860
  if (isUnmount) {
3799
3861
  isArray(existing) && remove(existing, refValue);
3800
3862
  } else {
@@ -3805,8 +3867,11 @@ var Vue = (function (exports) {
3805
3867
  setupState[ref] = refs[ref];
3806
3868
  }
3807
3869
  } else {
3808
- ref.value = [refValue];
3809
- if (rawRef.k) refs[rawRef.k] = ref.value;
3870
+ const newVal = [refValue];
3871
+ if (canSetRef(ref)) {
3872
+ ref.value = newVal;
3873
+ }
3874
+ if (rawRef.k) refs[rawRef.k] = newVal;
3810
3875
  }
3811
3876
  } else if (!existing.includes(refValue)) {
3812
3877
  existing.push(refValue);
@@ -3818,16 +3883,24 @@ var Vue = (function (exports) {
3818
3883
  setupState[ref] = value;
3819
3884
  }
3820
3885
  } else if (_isRef) {
3821
- ref.value = value;
3886
+ if (canSetRef(ref)) {
3887
+ ref.value = value;
3888
+ }
3822
3889
  if (rawRef.k) refs[rawRef.k] = value;
3823
3890
  } else {
3824
3891
  warn$1("Invalid template ref type:", ref, `(${typeof ref})`);
3825
3892
  }
3826
3893
  };
3827
3894
  if (value) {
3828
- doSet.id = -1;
3829
- queuePostRenderEffect(doSet, parentSuspense);
3895
+ const job = () => {
3896
+ doSet();
3897
+ pendingSetRefMap.delete(rawRef);
3898
+ };
3899
+ job.id = -1;
3900
+ pendingSetRefMap.set(rawRef, job);
3901
+ queuePostRenderEffect(job, parentSuspense);
3830
3902
  } else {
3903
+ invalidatePendingSetRef(rawRef);
3831
3904
  doSet();
3832
3905
  }
3833
3906
  } else {
@@ -3835,6 +3908,13 @@ var Vue = (function (exports) {
3835
3908
  }
3836
3909
  }
3837
3910
  }
3911
+ function invalidatePendingSetRef(rawRef) {
3912
+ const pendingSetRef = pendingSetRefMap.get(rawRef);
3913
+ if (pendingSetRef) {
3914
+ pendingSetRef.flags |= 8;
3915
+ pendingSetRefMap.delete(rawRef);
3916
+ }
3917
+ }
3838
3918
 
3839
3919
  let hasLoggedMismatchError = false;
3840
3920
  const logMismatchError = () => {
@@ -4076,6 +4156,8 @@ var Vue = (function (exports) {
4076
4156
  ) && parentComponent && parentComponent.vnode.props && parentComponent.vnode.props.appear;
4077
4157
  const content = el.content.firstChild;
4078
4158
  if (needCallTransitionHooks) {
4159
+ const cls = content.getAttribute("class");
4160
+ if (cls) content.$cls = cls;
4079
4161
  transition.beforeEnter(content);
4080
4162
  }
4081
4163
  replaceNode(content, el, parentComponent);
@@ -4328,7 +4410,12 @@ Server rendered element contains fewer child nodes than client vdom.`
4328
4410
  let actual;
4329
4411
  let expected;
4330
4412
  if (key === "class") {
4331
- actual = el.getAttribute("class");
4413
+ if (el.$cls) {
4414
+ actual = el.$cls;
4415
+ delete el.$cls;
4416
+ } else {
4417
+ actual = el.getAttribute("class");
4418
+ }
4332
4419
  expected = normalizeClass(clientValue);
4333
4420
  if (!isSetEqual(toClassSet(actual || ""), toClassSet(expected))) {
4334
4421
  mismatchType = 2 /* CLASS */;
@@ -4432,10 +4519,8 @@ Server rendered element contains fewer child nodes than client vdom.`
4432
4519
  if (instance.getCssVars && (vnode === root || root && root.type === Fragment && root.children.includes(vnode))) {
4433
4520
  const cssVars = instance.getCssVars();
4434
4521
  for (const key in cssVars) {
4435
- expectedMap.set(
4436
- `--${getEscapedCssVarName(key)}`,
4437
- String(cssVars[key])
4438
- );
4522
+ const value = normalizeCssVarValue(cssVars[key]);
4523
+ expectedMap.set(`--${getEscapedCssVarName(key)}`, value);
4439
4524
  }
4440
4525
  }
4441
4526
  if (vnode === root && instance.parent) {
@@ -4466,7 +4551,7 @@ Server rendered element contains fewer child nodes than client vdom.`
4466
4551
  if (allowedType === 0 /* TEXT */ && list.includes("children")) {
4467
4552
  return true;
4468
4553
  }
4469
- return allowedAttr.split(",").includes(MismatchTypeString[allowedType]);
4554
+ return list.includes(MismatchTypeString[allowedType]);
4470
4555
  }
4471
4556
  }
4472
4557
 
@@ -4562,7 +4647,6 @@ Server rendered element contains fewer child nodes than client vdom.`
4562
4647
  }
4563
4648
 
4564
4649
  const isAsyncWrapper = (i) => !!i.type.__asyncLoader;
4565
- /*! #__NO_SIDE_EFFECTS__ */
4566
4650
  // @__NO_SIDE_EFFECTS__
4567
4651
  function defineAsyncComponent(source) {
4568
4652
  if (isFunction(source)) {
@@ -4623,15 +4707,28 @@ Server rendered element contains fewer child nodes than client vdom.`
4623
4707
  name: "AsyncComponentWrapper",
4624
4708
  __asyncLoader: load,
4625
4709
  __asyncHydrate(el, instance, hydrate) {
4710
+ let patched = false;
4711
+ (instance.bu || (instance.bu = [])).push(() => patched = true);
4712
+ const performHydrate = () => {
4713
+ if (patched) {
4714
+ {
4715
+ warn$1(
4716
+ `Skipping lazy hydration for component '${getComponentName(resolvedComp) || resolvedComp.__file}': it was updated before lazy hydration performed.`
4717
+ );
4718
+ }
4719
+ return;
4720
+ }
4721
+ hydrate();
4722
+ };
4626
4723
  const doHydrate = hydrateStrategy ? () => {
4627
4724
  const teardown = hydrateStrategy(
4628
- hydrate,
4725
+ performHydrate,
4629
4726
  (cb) => forEachElement(el, cb)
4630
4727
  );
4631
4728
  if (teardown) {
4632
4729
  (instance.bum || (instance.bum = [])).push(teardown);
4633
4730
  }
4634
- } : hydrate;
4731
+ } : performHydrate;
4635
4732
  if (resolvedComp) {
4636
4733
  doHydrate();
4637
4734
  } else {
@@ -4794,6 +4891,9 @@ Server rendered element contains fewer child nodes than client vdom.`
4794
4891
  {
4795
4892
  devtoolsComponentAdded(instance2);
4796
4893
  }
4894
+ {
4895
+ instance2.__keepAliveStorageContainer = storageContainer;
4896
+ }
4797
4897
  };
4798
4898
  function unmount(vnode) {
4799
4899
  resetShapeFlag(vnode);
@@ -4881,7 +4981,7 @@ Server rendered element contains fewer child nodes than client vdom.`
4881
4981
  );
4882
4982
  const { include, exclude, max } = props;
4883
4983
  if (include && (!name || !matches(include, name)) || exclude && name && matches(exclude, name)) {
4884
- vnode.shapeFlag &= ~256;
4984
+ vnode.shapeFlag &= -257;
4885
4985
  current = vnode;
4886
4986
  return rawVNode;
4887
4987
  }
@@ -4968,8 +5068,8 @@ Server rendered element contains fewer child nodes than client vdom.`
4968
5068
  }, target);
4969
5069
  }
4970
5070
  function resetShapeFlag(vnode) {
4971
- vnode.shapeFlag &= ~256;
4972
- vnode.shapeFlag &= ~512;
5071
+ vnode.shapeFlag &= -257;
5072
+ vnode.shapeFlag &= -513;
4973
5073
  }
4974
5074
  function getInnerChild(vnode) {
4975
5075
  return vnode.shapeFlag & 128 ? vnode.ssContent : vnode;
@@ -5084,14 +5184,16 @@ If this is a native custom element, make sure to exclude it from component resol
5084
5184
  if (sourceIsArray || isString(source)) {
5085
5185
  const sourceIsReactiveArray = sourceIsArray && isReactive(source);
5086
5186
  let needsWrap = false;
5187
+ let isReadonlySource = false;
5087
5188
  if (sourceIsReactiveArray) {
5088
5189
  needsWrap = !isShallow(source);
5190
+ isReadonlySource = isReadonly(source);
5089
5191
  source = shallowReadArray(source);
5090
5192
  }
5091
5193
  ret = new Array(source.length);
5092
5194
  for (let i = 0, l = source.length; i < l; i++) {
5093
5195
  ret[i] = renderItem(
5094
- needsWrap ? toReactive(source[i]) : source[i],
5196
+ needsWrap ? isReadonlySource ? toReadonly(toReactive(source[i])) : toReactive(source[i]) : source[i],
5095
5197
  i,
5096
5198
  void 0,
5097
5199
  cached && cached[i]
@@ -5148,12 +5250,13 @@ If this is a native custom element, make sure to exclude it from component resol
5148
5250
 
5149
5251
  function renderSlot(slots, name, props = {}, fallback, noSlotted) {
5150
5252
  if (currentRenderingInstance.ce || currentRenderingInstance.parent && isAsyncWrapper(currentRenderingInstance.parent) && currentRenderingInstance.parent.ce) {
5253
+ const hasProps = Object.keys(props).length > 0;
5151
5254
  if (name !== "default") props.name = name;
5152
5255
  return openBlock(), createBlock(
5153
5256
  Fragment,
5154
5257
  null,
5155
5258
  [createVNode("slot", props, fallback && fallback())],
5156
- 64
5259
+ hasProps ? -2 : 64
5157
5260
  );
5158
5261
  }
5159
5262
  let slot = slots[name];
@@ -5358,10 +5461,10 @@ If this is a native custom element, make sure to exclude it from component resol
5358
5461
  return true;
5359
5462
  },
5360
5463
  has({
5361
- _: { data, setupState, accessCache, ctx, appContext, propsOptions }
5464
+ _: { data, setupState, accessCache, ctx, appContext, propsOptions, type }
5362
5465
  }, key) {
5363
- let normalizedProps;
5364
- return !!accessCache[key] || data !== EMPTY_OBJ && hasOwn(data, key) || hasSetupBinding(setupState, key) || (normalizedProps = propsOptions[0]) && hasOwn(normalizedProps, key) || hasOwn(ctx, key) || hasOwn(publicPropertiesMap, key) || hasOwn(appContext.config.globalProperties, key);
5466
+ let normalizedProps, cssModules;
5467
+ return !!(accessCache[key] || data !== EMPTY_OBJ && key[0] !== "$" && hasOwn(data, key) || hasSetupBinding(setupState, key) || (normalizedProps = propsOptions[0]) && hasOwn(normalizedProps, key) || hasOwn(ctx, key) || hasOwn(publicPropertiesMap, key) || hasOwn(appContext.config.globalProperties, key) || (cssModules = type.__cssModules) && cssModules[key]);
5365
5468
  },
5366
5469
  defineProperty(target, key, descriptor) {
5367
5470
  if (descriptor.get != null) {
@@ -5499,15 +5602,15 @@ If this is a native custom element, make sure to exclude it from component resol
5499
5602
  return null;
5500
5603
  }
5501
5604
  function useSlots() {
5502
- return getContext().slots;
5605
+ return getContext("useSlots").slots;
5503
5606
  }
5504
5607
  function useAttrs() {
5505
- return getContext().attrs;
5608
+ return getContext("useAttrs").attrs;
5506
5609
  }
5507
- function getContext() {
5610
+ function getContext(calledFunctionName) {
5508
5611
  const i = getCurrentInstance();
5509
5612
  if (!i) {
5510
- warn$1(`useContext() called without active instance.`);
5613
+ warn$1(`${calledFunctionName}() called without active instance.`);
5511
5614
  }
5512
5615
  return i.setupContext || (i.setupContext = createSetupContext(i));
5513
5616
  }
@@ -5758,7 +5861,8 @@ If this is a native custom element, make sure to exclude it from component resol
5758
5861
  expose.forEach((key) => {
5759
5862
  Object.defineProperty(exposed, key, {
5760
5863
  get: () => publicThis[key],
5761
- set: (val) => publicThis[key] = val
5864
+ set: (val) => publicThis[key] = val,
5865
+ enumerable: true
5762
5866
  });
5763
5867
  });
5764
5868
  } else if (!instance.exposed) {
@@ -6110,11 +6214,9 @@ If this is a native custom element, make sure to exclude it from component resol
6110
6214
  }
6111
6215
  {
6112
6216
  context.reload = () => {
6113
- render(
6114
- cloneVNode(vnode),
6115
- rootContainer,
6116
- namespace
6117
- );
6217
+ const cloned = cloneVNode(vnode);
6218
+ cloned.el = null;
6219
+ render(cloned, rootContainer, namespace);
6118
6220
  };
6119
6221
  }
6120
6222
  if (isHydrate && hydrate) {
@@ -6164,9 +6266,15 @@ If you want to remount the same app, move your app creation logic into a factory
6164
6266
  },
6165
6267
  provide(key, value) {
6166
6268
  if (key in context.provides) {
6167
- warn$1(
6168
- `App already provides property with key "${String(key)}". It will be overwritten with the new value.`
6169
- );
6269
+ if (hasOwn(context.provides, key)) {
6270
+ warn$1(
6271
+ `App already provides property with key "${String(key)}". It will be overwritten with the new value.`
6272
+ );
6273
+ } else {
6274
+ warn$1(
6275
+ `App already provides property with key "${String(key)}" inherited from its parent element. It will be overwritten with the new value.`
6276
+ );
6277
+ }
6170
6278
  }
6171
6279
  context.provides[key] = value;
6172
6280
  return app;
@@ -6201,9 +6309,9 @@ If you want to remount the same app, move your app creation logic into a factory
6201
6309
  }
6202
6310
  }
6203
6311
  function inject(key, defaultValue, treatDefaultAsFactory = false) {
6204
- const instance = currentInstance || currentRenderingInstance;
6312
+ const instance = getCurrentInstance();
6205
6313
  if (instance || currentApp) {
6206
- const provides = currentApp ? currentApp._context.provides : instance ? instance.parent == null ? instance.vnode.appContext && instance.vnode.appContext.provides : instance.parent.provides : void 0;
6314
+ let provides = currentApp ? currentApp._context.provides : instance ? instance.parent == null || instance.ce ? instance.vnode.appContext && instance.vnode.appContext.provides : instance.parent.provides : void 0;
6207
6315
  if (provides && key in provides) {
6208
6316
  return provides[key];
6209
6317
  } else if (arguments.length > 1) {
@@ -6216,7 +6324,7 @@ If you want to remount the same app, move your app creation logic into a factory
6216
6324
  }
6217
6325
  }
6218
6326
  function hasInjectionContext() {
6219
- return !!(currentInstance || currentRenderingInstance || currentApp);
6327
+ return !!(getCurrentInstance() || currentApp);
6220
6328
  }
6221
6329
 
6222
6330
  const internalObjectProto = {};
@@ -6630,14 +6738,14 @@ If you want to remount the same app, move your app creation logic into a factory
6630
6738
  return args.some((elem) => elem.toLowerCase() === "boolean");
6631
6739
  }
6632
6740
 
6633
- const isInternalKey = (key) => key[0] === "_" || key === "$stable";
6741
+ const isInternalKey = (key) => key === "_" || key === "_ctx" || key === "$stable";
6634
6742
  const normalizeSlotValue = (value) => isArray(value) ? value.map(normalizeVNode) : [normalizeVNode(value)];
6635
6743
  const normalizeSlot = (key, rawSlot, ctx) => {
6636
6744
  if (rawSlot._n) {
6637
6745
  return rawSlot;
6638
6746
  }
6639
6747
  const normalized = withCtx((...args) => {
6640
- if (currentInstance && (!ctx || ctx.root === currentInstance.root)) {
6748
+ if (currentInstance && !(ctx === null && currentRenderingInstance) && !(ctx && ctx.root !== currentInstance.root)) {
6641
6749
  warn$1(
6642
6750
  `Slot "${key}" invoked outside of the render function: this will not track dependencies used in the slot. Invoke the slot function inside the render function instead.`
6643
6751
  );
@@ -6676,7 +6784,7 @@ If you want to remount the same app, move your app creation logic into a factory
6676
6784
  };
6677
6785
  const assignSlots = (slots, children, optimized) => {
6678
6786
  for (const key in children) {
6679
- if (optimized || key !== "_") {
6787
+ if (optimized || !isInternalKey(key)) {
6680
6788
  slots[key] = children[key];
6681
6789
  }
6682
6790
  }
@@ -6744,12 +6852,10 @@ If you want to remount the same app, move your app creation logic into a factory
6744
6852
  if (instance.appContext.config.performance && isSupported()) {
6745
6853
  const startTag = `vue-${type}-${instance.uid}`;
6746
6854
  const endTag = startTag + `:end`;
6855
+ const measureName = `<${formatComponentName(instance, instance.type)}> ${type}`;
6747
6856
  perf.mark(endTag);
6748
- perf.measure(
6749
- `<${formatComponentName(instance, instance.type)}> ${type}`,
6750
- startTag,
6751
- endTag
6752
- );
6857
+ perf.measure(measureName, startTag, endTag);
6858
+ perf.clearMeasures(measureName);
6753
6859
  perf.clearMarks(startTag);
6754
6860
  perf.clearMarks(endTag);
6755
6861
  }
@@ -6895,6 +7001,8 @@ If you want to remount the same app, move your app creation logic into a factory
6895
7001
  }
6896
7002
  if (ref != null && parentComponent) {
6897
7003
  setRef(ref, n1 && n1.ref, parentSuspense, n2 || n1, !n2);
7004
+ } else if (ref == null && n1 && n1.ref != null) {
7005
+ setRef(n1.ref, null, parentSuspense, n1, true);
6898
7006
  }
6899
7007
  };
6900
7008
  const processText = (n1, n2, container, anchor) => {
@@ -7200,7 +7308,7 @@ If you want to remount the same app, move your app creation logic into a factory
7200
7308
  (oldVNode.type === Fragment || // - In the case of different nodes, there is going to be a replacement
7201
7309
  // which also requires the correct parent container
7202
7310
  !isSameVNodeType(oldVNode, newVNode) || // - In the case of a component, it could contain anything.
7203
- oldVNode.shapeFlag & (6 | 64)) ? hostParentNode(oldVNode.el) : (
7311
+ oldVNode.shapeFlag & (6 | 64 | 128)) ? hostParentNode(oldVNode.el) : (
7204
7312
  // In other cases, the parent container is not actually used so we
7205
7313
  // just pass the block element here to avoid a DOM parentNode call.
7206
7314
  fallbackContainer
@@ -7362,12 +7470,13 @@ If you want to remount the same app, move your app creation logic into a factory
7362
7470
  endMeasure(instance, `init`);
7363
7471
  }
7364
7472
  }
7473
+ if (isHmrUpdating) initialVNode.el = null;
7365
7474
  if (instance.asyncDep) {
7366
- if (isHmrUpdating) initialVNode.el = null;
7367
7475
  parentSuspense && parentSuspense.registerDep(instance, setupRenderEffect, optimized);
7368
7476
  if (!initialVNode.el) {
7369
7477
  const placeholder = instance.subTree = createVNode(Comment);
7370
7478
  processCommentNode(null, placeholder, container, anchor);
7479
+ initialVNode.placeholder = placeholder.el;
7371
7480
  }
7372
7481
  } else {
7373
7482
  setupRenderEffect(
@@ -7454,7 +7563,8 @@ If you want to remount the same app, move your app creation logic into a factory
7454
7563
  hydrateSubTree();
7455
7564
  }
7456
7565
  } else {
7457
- if (root.ce) {
7566
+ if (root.ce && // @ts-expect-error _def is private
7567
+ root.ce._def.shadowRoot !== false) {
7458
7568
  root.ce._injectChildStyle(type);
7459
7569
  }
7460
7570
  {
@@ -7868,7 +7978,11 @@ If you want to remount the same app, move your app creation logic into a factory
7868
7978
  for (i = toBePatched - 1; i >= 0; i--) {
7869
7979
  const nextIndex = s2 + i;
7870
7980
  const nextChild = c2[nextIndex];
7871
- const anchor = nextIndex + 1 < l2 ? c2[nextIndex + 1].el : parentAnchor;
7981
+ const anchorVNode = c2[nextIndex + 1];
7982
+ const anchor = nextIndex + 1 < l2 ? (
7983
+ // #13559, fallback to el placeholder for unresolved async component
7984
+ anchorVNode.el || anchorVNode.placeholder
7985
+ ) : parentAnchor;
7872
7986
  if (newIndexToOldIndexMap[i] === 0) {
7873
7987
  patch(
7874
7988
  null,
@@ -7925,8 +8039,20 @@ If you want to remount the same app, move your app creation logic into a factory
7925
8039
  queuePostRenderEffect(() => transition.enter(el), parentSuspense);
7926
8040
  } else {
7927
8041
  const { leave, delayLeave, afterLeave } = transition;
7928
- const remove2 = () => hostInsert(el, container, anchor);
8042
+ const remove2 = () => {
8043
+ if (vnode.ctx.isUnmounted) {
8044
+ hostRemove(el);
8045
+ } else {
8046
+ hostInsert(el, container, anchor);
8047
+ }
8048
+ };
7929
8049
  const performLeave = () => {
8050
+ if (el._isLeaving) {
8051
+ el[leaveCbKey](
8052
+ true
8053
+ /* cancelled */
8054
+ );
8055
+ }
7930
8056
  leave(el, () => {
7931
8057
  remove2();
7932
8058
  afterLeave && afterLeave();
@@ -7958,7 +8084,9 @@ If you want to remount the same app, move your app creation logic into a factory
7958
8084
  optimized = false;
7959
8085
  }
7960
8086
  if (ref != null) {
8087
+ pauseTracking();
7961
8088
  setRef(ref, null, parentSuspense, vnode, true);
8089
+ resetTracking();
7962
8090
  }
7963
8091
  if (cacheIndex != null) {
7964
8092
  parentComponent.renderCache[cacheIndex] = void 0;
@@ -8087,12 +8215,6 @@ If you want to remount the same app, move your app creation logic into a factory
8087
8215
  queuePostRenderEffect(() => {
8088
8216
  instance.isUnmounted = true;
8089
8217
  }, parentSuspense);
8090
- if (parentSuspense && parentSuspense.pendingBranch && !parentSuspense.isUnmounted && instance.asyncDep && !instance.asyncResolved && instance.suspenseId === parentSuspense.pendingId) {
8091
- parentSuspense.deps--;
8092
- if (parentSuspense.deps === 0) {
8093
- parentSuspense.resolve();
8094
- }
8095
- }
8096
8218
  {
8097
8219
  devtoolsComponentRemoved(instance);
8098
8220
  }
@@ -8171,8 +8293,8 @@ If you want to remount the same app, move your app creation logic into a factory
8171
8293
  effect.flags |= 32;
8172
8294
  job.flags |= 4;
8173
8295
  } else {
8174
- effect.flags &= ~32;
8175
- job.flags &= ~4;
8296
+ effect.flags &= -33;
8297
+ job.flags &= -5;
8176
8298
  }
8177
8299
  }
8178
8300
  function needTransition(parentSuspense, transition) {
@@ -8193,12 +8315,16 @@ If you want to remount the same app, move your app creation logic into a factory
8193
8315
  if (!shallow && c2.patchFlag !== -2)
8194
8316
  traverseStaticChildren(c1, c2);
8195
8317
  }
8196
- if (c2.type === Text) {
8318
+ if (c2.type === Text && // avoid cached text nodes retaining detached dom nodes
8319
+ c2.patchFlag !== -1) {
8197
8320
  c2.el = c1.el;
8198
8321
  }
8199
8322
  if (c2.type === Comment && !c2.el) {
8200
8323
  c2.el = c1.el;
8201
8324
  }
8325
+ {
8326
+ c2.el && (c2.el.__vnode = c2);
8327
+ }
8202
8328
  }
8203
8329
  }
8204
8330
  }
@@ -8522,8 +8648,9 @@ If you want to remount the same app, move your app creation logic into a factory
8522
8648
  );
8523
8649
  }
8524
8650
  }
8651
+ const mixinEmitsCache = /* @__PURE__ */ new WeakMap();
8525
8652
  function normalizeEmitsOptions(comp, appContext, asMixin = false) {
8526
- const cache = appContext.emitsCache;
8653
+ const cache = asMixin ? mixinEmitsCache : appContext.emitsCache;
8527
8654
  const cached = cache.get(comp);
8528
8655
  if (cached !== void 0) {
8529
8656
  return cached;
@@ -8971,7 +9098,7 @@ If you want to remount the same app, move your app creation logic into a factory
8971
9098
  const { activeBranch, pendingBranch, isInFallback, isHydrating } = suspense;
8972
9099
  if (pendingBranch) {
8973
9100
  suspense.pendingBranch = newBranch;
8974
- if (isSameVNodeType(newBranch, pendingBranch)) {
9101
+ if (isSameVNodeType(pendingBranch, newBranch)) {
8975
9102
  patch(
8976
9103
  pendingBranch,
8977
9104
  newBranch,
@@ -9042,7 +9169,7 @@ If you want to remount the same app, move your app creation logic into a factory
9042
9169
  );
9043
9170
  setActiveBranch(suspense, newFallback);
9044
9171
  }
9045
- } else if (activeBranch && isSameVNodeType(newBranch, activeBranch)) {
9172
+ } else if (activeBranch && isSameVNodeType(activeBranch, newBranch)) {
9046
9173
  patch(
9047
9174
  activeBranch,
9048
9175
  newBranch,
@@ -9073,7 +9200,7 @@ If you want to remount the same app, move your app creation logic into a factory
9073
9200
  }
9074
9201
  }
9075
9202
  } else {
9076
- if (activeBranch && isSameVNodeType(newBranch, activeBranch)) {
9203
+ if (activeBranch && isSameVNodeType(activeBranch, newBranch)) {
9077
9204
  patch(
9078
9205
  activeBranch,
9079
9206
  newBranch,
@@ -9516,8 +9643,8 @@ If you want to remount the same app, move your app creation logic into a factory
9516
9643
  if (n2.shapeFlag & 6 && n1.component) {
9517
9644
  const dirtyInstances = hmrDirtyComponents.get(n2.type);
9518
9645
  if (dirtyInstances && dirtyInstances.has(n1.component)) {
9519
- n1.shapeFlag &= ~256;
9520
- n2.shapeFlag &= ~512;
9646
+ n1.shapeFlag &= -257;
9647
+ n2.shapeFlag &= -513;
9521
9648
  return false;
9522
9649
  }
9523
9650
  }
@@ -9707,6 +9834,7 @@ Component that was made reactive: `,
9707
9834
  suspense: vnode.suspense,
9708
9835
  ssContent: vnode.ssContent && cloneVNode(vnode.ssContent),
9709
9836
  ssFallback: vnode.ssFallback && cloneVNode(vnode.ssFallback),
9837
+ placeholder: vnode.placeholder,
9710
9838
  el: vnode.el,
9711
9839
  anchor: vnode.anchor,
9712
9840
  ctx: vnode.ctx,
@@ -9966,7 +10094,7 @@ Component that was made reactive: `,
9966
10094
  const { props, children } = instance.vnode;
9967
10095
  const isStateful = isStatefulComponent(instance);
9968
10096
  initProps(instance, props, isStateful, isSSR);
9969
- initSlots(instance, children, optimized);
10097
+ initSlots(instance, children, optimized || isSSR);
9970
10098
  const setupResult = isStateful ? setupStatefulComponent(instance, isSSR) : void 0;
9971
10099
  isSSR && setInSSRSetupState(false);
9972
10100
  return setupResult;
@@ -10215,7 +10343,7 @@ Component that was made reactive: `,
10215
10343
  return instance.proxy;
10216
10344
  }
10217
10345
  }
10218
- const classifyRE = /(?:^|[-_])(\w)/g;
10346
+ const classifyRE = /(?:^|[-_])\w/g;
10219
10347
  const classify = (str) => str.replace(classifyRE, (c) => c.toUpperCase()).replace(/[-_]/g, "");
10220
10348
  function getComponentName(Component, includeInferred = true) {
10221
10349
  return isFunction(Component) ? Component.displayName || Component.name : Component.name || includeInferred && Component.__name;
@@ -10258,23 +10386,28 @@ Component that was made reactive: `,
10258
10386
  };
10259
10387
 
10260
10388
  function h(type, propsOrChildren, children) {
10261
- const l = arguments.length;
10262
- if (l === 2) {
10263
- if (isObject(propsOrChildren) && !isArray(propsOrChildren)) {
10264
- if (isVNode(propsOrChildren)) {
10265
- return createVNode(type, null, [propsOrChildren]);
10389
+ try {
10390
+ setBlockTracking(-1);
10391
+ const l = arguments.length;
10392
+ if (l === 2) {
10393
+ if (isObject(propsOrChildren) && !isArray(propsOrChildren)) {
10394
+ if (isVNode(propsOrChildren)) {
10395
+ return createVNode(type, null, [propsOrChildren]);
10396
+ }
10397
+ return createVNode(type, propsOrChildren);
10398
+ } else {
10399
+ return createVNode(type, null, propsOrChildren);
10266
10400
  }
10267
- return createVNode(type, propsOrChildren);
10268
10401
  } else {
10269
- return createVNode(type, null, propsOrChildren);
10270
- }
10271
- } else {
10272
- if (l > 3) {
10273
- children = Array.prototype.slice.call(arguments, 2);
10274
- } else if (l === 3 && isVNode(children)) {
10275
- children = [children];
10402
+ if (l > 3) {
10403
+ children = Array.prototype.slice.call(arguments, 2);
10404
+ } else if (l === 3 && isVNode(children)) {
10405
+ children = [children];
10406
+ }
10407
+ return createVNode(type, propsOrChildren, children);
10276
10408
  }
10277
- return createVNode(type, propsOrChildren, children);
10409
+ } finally {
10410
+ setBlockTracking(1);
10278
10411
  }
10279
10412
  }
10280
10413
 
@@ -10295,13 +10428,15 @@ Component that was made reactive: `,
10295
10428
  if (obj.__isVue) {
10296
10429
  return ["div", vueStyle, `VueInstance`];
10297
10430
  } else if (isRef(obj)) {
10431
+ pauseTracking();
10432
+ const value = obj.value;
10433
+ resetTracking();
10298
10434
  return [
10299
10435
  "div",
10300
10436
  {},
10301
10437
  ["span", vueStyle, genRefFlag(obj)],
10302
10438
  "<",
10303
- // avoid debugger accessing value affecting behavior
10304
- formatValue("_value" in obj ? obj._value : obj),
10439
+ formatValue(value),
10305
10440
  `>`
10306
10441
  ];
10307
10442
  } else if (isReactive(obj)) {
@@ -10482,7 +10617,7 @@ Component that was made reactive: `,
10482
10617
  return true;
10483
10618
  }
10484
10619
 
10485
- const version = "3.5.13";
10620
+ const version = "3.5.22";
10486
10621
  const warn = warn$1 ;
10487
10622
  const ErrorTypeStrings = ErrorTypeStrings$1 ;
10488
10623
  const devtools = devtools$1 ;
@@ -10699,11 +10834,11 @@ Component that was made reactive: `,
10699
10834
  const resolve = () => finishLeave(el, done);
10700
10835
  addTransitionClass(el, leaveFromClass);
10701
10836
  if (!el._enterCancelled) {
10702
- forceReflow();
10837
+ forceReflow(el);
10703
10838
  addTransitionClass(el, leaveActiveClass);
10704
10839
  } else {
10705
10840
  addTransitionClass(el, leaveActiveClass);
10706
- forceReflow();
10841
+ forceReflow(el);
10707
10842
  }
10708
10843
  nextFrame(() => {
10709
10844
  if (!el._isLeaving) {
@@ -10829,7 +10964,7 @@ Component that was made reactive: `,
10829
10964
  type = timeout > 0 ? transitionTimeout > animationTimeout ? TRANSITION$1 : ANIMATION : null;
10830
10965
  propCount = type ? type === TRANSITION$1 ? transitionDurations.length : animationDurations.length : 0;
10831
10966
  }
10832
- const hasTransform = type === TRANSITION$1 && /\b(transform|all)(,|$)/.test(
10967
+ const hasTransform = type === TRANSITION$1 && /\b(?:transform|all)(?:,|$)/.test(
10833
10968
  getStyleProperties(`${TRANSITION$1}Property`).toString()
10834
10969
  );
10835
10970
  return {
@@ -10849,8 +10984,9 @@ Component that was made reactive: `,
10849
10984
  if (s === "auto") return 0;
10850
10985
  return Number(s.slice(0, -1).replace(",", ".")) * 1e3;
10851
10986
  }
10852
- function forceReflow() {
10853
- return document.body.offsetHeight;
10987
+ function forceReflow(el) {
10988
+ const targetDocument = el ? el.ownerDocument : document;
10989
+ return targetDocument.body.offsetHeight;
10854
10990
  }
10855
10991
 
10856
10992
  function patchClass(el, value, isSVG) {
@@ -10870,6 +11006,8 @@ Component that was made reactive: `,
10870
11006
  const vShowOriginalDisplay = Symbol("_vod");
10871
11007
  const vShowHidden = Symbol("_vsh");
10872
11008
  const vShow = {
11009
+ // used for prop mismatch check during hydration
11010
+ name: "show",
10873
11011
  beforeMount(el, { value }, { transition }) {
10874
11012
  el[vShowOriginalDisplay] = el.style.display === "none" ? "" : el.style.display;
10875
11013
  if (transition && value) {
@@ -10903,9 +11041,6 @@ Component that was made reactive: `,
10903
11041
  setDisplay(el, value);
10904
11042
  }
10905
11043
  };
10906
- {
10907
- vShow.name = "show";
10908
- }
10909
11044
  function setDisplay(el, value) {
10910
11045
  el.style.display = value ? el[vShowOriginalDisplay] : "none";
10911
11046
  el[vShowHidden] = !value;
@@ -10976,14 +11111,15 @@ Component that was made reactive: `,
10976
11111
  const style = el.style;
10977
11112
  let cssText = "";
10978
11113
  for (const key in vars) {
10979
- style.setProperty(`--${key}`, vars[key]);
10980
- cssText += `--${key}: ${vars[key]};`;
11114
+ const value = normalizeCssVarValue(vars[key]);
11115
+ style.setProperty(`--${key}`, value);
11116
+ cssText += `--${key}: ${value};`;
10981
11117
  }
10982
11118
  style[CSS_VAR_TEXT] = cssText;
10983
11119
  }
10984
11120
  }
10985
11121
 
10986
- const displayRE = /(^|;)\s*display\s*:/;
11122
+ const displayRE = /(?:^|;)\s*display\s*:/;
10987
11123
  function patchStyle(el, prev, next) {
10988
11124
  const style = el.style;
10989
11125
  const isCssString = isString(next);
@@ -11281,7 +11417,7 @@ Expected function or array of functions, received type ${typeof value}.`
11281
11417
  }
11282
11418
  return false;
11283
11419
  }
11284
- if (key === "spellcheck" || key === "draggable" || key === "translate") {
11420
+ if (key === "spellcheck" || key === "draggable" || key === "translate" || key === "autocorrect") {
11285
11421
  return false;
11286
11422
  }
11287
11423
  if (key === "form") {
@@ -11306,11 +11442,10 @@ Expected function or array of functions, received type ${typeof value}.`
11306
11442
  }
11307
11443
 
11308
11444
  const REMOVAL = {};
11309
- /*! #__NO_SIDE_EFFECTS__ */
11310
11445
  // @__NO_SIDE_EFFECTS__
11311
11446
  function defineCustomElement(options, extraOptions, _createApp) {
11312
- const Comp = defineComponent(options, extraOptions);
11313
- if (isPlainObject(Comp)) extend(Comp, extraOptions);
11447
+ let Comp = defineComponent(options, extraOptions);
11448
+ if (isPlainObject(Comp)) Comp = extend({}, Comp, extraOptions);
11314
11449
  class VueCustomElement extends VueElement {
11315
11450
  constructor(initialProps) {
11316
11451
  super(Comp, initialProps, _createApp);
@@ -11319,10 +11454,9 @@ Expected function or array of functions, received type ${typeof value}.`
11319
11454
  VueCustomElement.def = Comp;
11320
11455
  return VueCustomElement;
11321
11456
  }
11322
- /*! #__NO_SIDE_EFFECTS__ */
11323
- const defineSSRCustomElement = /* @__NO_SIDE_EFFECTS__ */ (options, extraOptions) => {
11457
+ const defineSSRCustomElement = (/* @__NO_SIDE_EFFECTS__ */ (options, extraOptions) => {
11324
11458
  return /* @__PURE__ */ defineCustomElement(options, extraOptions, createSSRApp);
11325
- };
11459
+ });
11326
11460
  const BaseClass = typeof HTMLElement !== "undefined" ? HTMLElement : class {
11327
11461
  };
11328
11462
  class VueElement extends BaseClass {
@@ -11358,19 +11492,20 @@ Expected function or array of functions, received type ${typeof value}.`
11358
11492
  );
11359
11493
  }
11360
11494
  if (_def.shadowRoot !== false) {
11361
- this.attachShadow({ mode: "open" });
11495
+ this.attachShadow(
11496
+ extend({}, _def.shadowRootOptions, {
11497
+ mode: "open"
11498
+ })
11499
+ );
11362
11500
  this._root = this.shadowRoot;
11363
11501
  } else {
11364
11502
  this._root = this;
11365
11503
  }
11366
11504
  }
11367
- if (!this._def.__asyncLoader) {
11368
- this._resolveProps(this._def);
11369
- }
11370
11505
  }
11371
11506
  connectedCallback() {
11372
11507
  if (!this.isConnected) return;
11373
- if (!this.shadowRoot) {
11508
+ if (!this.shadowRoot && !this._resolved) {
11374
11509
  this._parseSlots();
11375
11510
  }
11376
11511
  this._connected = true;
@@ -11383,8 +11518,7 @@ Expected function or array of functions, received type ${typeof value}.`
11383
11518
  }
11384
11519
  if (!this._instance) {
11385
11520
  if (this._resolved) {
11386
- this._setParent();
11387
- this._update();
11521
+ this._mount(this._def);
11388
11522
  } else {
11389
11523
  if (parent && parent._pendingResolve) {
11390
11524
  this._pendingResolve = parent._pendingResolve.then(() => {
@@ -11400,7 +11534,15 @@ Expected function or array of functions, received type ${typeof value}.`
11400
11534
  _setParent(parent = this._parent) {
11401
11535
  if (parent) {
11402
11536
  this._instance.parent = parent._instance;
11403
- this._instance.provides = parent._instance.provides;
11537
+ this._inheritParentContext(parent);
11538
+ }
11539
+ }
11540
+ _inheritParentContext(parent = this._parent) {
11541
+ if (parent && this._app) {
11542
+ Object.setPrototypeOf(
11543
+ this._app._context.provides,
11544
+ parent._instance.provides
11545
+ );
11404
11546
  }
11405
11547
  }
11406
11548
  disconnectedCallback() {
@@ -11414,9 +11556,18 @@ Expected function or array of functions, received type ${typeof value}.`
11414
11556
  this._app && this._app.unmount();
11415
11557
  if (this._instance) this._instance.ce = void 0;
11416
11558
  this._app = this._instance = null;
11559
+ if (this._teleportTargets) {
11560
+ this._teleportTargets.clear();
11561
+ this._teleportTargets = void 0;
11562
+ }
11417
11563
  }
11418
11564
  });
11419
11565
  }
11566
+ _processMutations(mutations) {
11567
+ for (const m of mutations) {
11568
+ this._setAttr(m.attributeName);
11569
+ }
11570
+ }
11420
11571
  /**
11421
11572
  * resolve inner component definition (handle possible async component)
11422
11573
  */
@@ -11427,11 +11578,7 @@ Expected function or array of functions, received type ${typeof value}.`
11427
11578
  for (let i = 0; i < this.attributes.length; i++) {
11428
11579
  this._setAttr(this.attributes[i].name);
11429
11580
  }
11430
- this._ob = new MutationObserver((mutations) => {
11431
- for (const m of mutations) {
11432
- this._setAttr(m.attributeName);
11433
- }
11434
- });
11581
+ this._ob = new MutationObserver(this._processMutations.bind(this));
11435
11582
  this._ob.observe(this, { attributes: true });
11436
11583
  const resolve = (def, isAsync = false) => {
11437
11584
  this._resolved = true;
@@ -11450,9 +11597,7 @@ Expected function or array of functions, received type ${typeof value}.`
11450
11597
  }
11451
11598
  }
11452
11599
  this._numberProps = numberProps;
11453
- if (isAsync) {
11454
- this._resolveProps(def);
11455
- }
11600
+ this._resolveProps(def);
11456
11601
  if (this.shadowRoot) {
11457
11602
  this._applyStyles(styles);
11458
11603
  } else if (styles) {
@@ -11464,9 +11609,10 @@ Expected function or array of functions, received type ${typeof value}.`
11464
11609
  };
11465
11610
  const asyncDef = this._def.__asyncLoader;
11466
11611
  if (asyncDef) {
11467
- this._pendingResolve = asyncDef().then(
11468
- (def) => resolve(this._def = def, true)
11469
- );
11612
+ this._pendingResolve = asyncDef().then((def) => {
11613
+ def.configureApp = this._def.configureApp;
11614
+ resolve(this._def = def, true);
11615
+ });
11470
11616
  } else {
11471
11617
  resolve(this._def);
11472
11618
  }
@@ -11476,6 +11622,7 @@ Expected function or array of functions, received type ${typeof value}.`
11476
11622
  def.name = "VueElement";
11477
11623
  }
11478
11624
  this._app = this._createApp(def);
11625
+ this._inheritParentContext();
11479
11626
  if (def.configureApp) {
11480
11627
  def.configureApp(this._app);
11481
11628
  }
@@ -11547,7 +11694,10 @@ Expected function or array of functions, received type ${typeof value}.`
11547
11694
  }
11548
11695
  if (shouldReflect) {
11549
11696
  const ob = this._ob;
11550
- ob && ob.disconnect();
11697
+ if (ob) {
11698
+ this._processMutations(ob.takeRecords());
11699
+ ob.disconnect();
11700
+ }
11551
11701
  if (val === true) {
11552
11702
  this.setAttribute(hyphenate(key), "");
11553
11703
  } else if (typeof val === "string" || typeof val === "number") {
@@ -11560,7 +11710,9 @@ Expected function or array of functions, received type ${typeof value}.`
11560
11710
  }
11561
11711
  }
11562
11712
  _update() {
11563
- render(this._createVNode(), this._root);
11713
+ const vnode = this._createVNode();
11714
+ if (this._app) vnode.appContext = this._app._context;
11715
+ render(vnode, this._root);
11564
11716
  }
11565
11717
  _createVNode() {
11566
11718
  const baseProps = {};
@@ -11649,7 +11801,7 @@ Expected function or array of functions, received type ${typeof value}.`
11649
11801
  * Only called when shadowRoot is false
11650
11802
  */
11651
11803
  _renderSlots() {
11652
- const outlets = (this._teleportTarget || this).querySelectorAll("slot");
11804
+ const outlets = this._getSlots();
11653
11805
  const scopeId = this._instance.type.__scopeId;
11654
11806
  for (let i = 0; i < outlets.length; i++) {
11655
11807
  const o = outlets[i];
@@ -11675,6 +11827,19 @@ Expected function or array of functions, received type ${typeof value}.`
11675
11827
  parent.removeChild(o);
11676
11828
  }
11677
11829
  }
11830
+ /**
11831
+ * @internal
11832
+ */
11833
+ _getSlots() {
11834
+ const roots = [this];
11835
+ if (this._teleportTargets) {
11836
+ roots.push(...this._teleportTargets);
11837
+ }
11838
+ return roots.reduce((res, i) => {
11839
+ res.push(...Array.from(i.querySelectorAll("slot")));
11840
+ return res;
11841
+ }, []);
11842
+ }
11678
11843
  /**
11679
11844
  * @internal
11680
11845
  */
@@ -11758,12 +11923,13 @@ Expected function or array of functions, received type ${typeof value}.`
11758
11923
  instance.vnode.el,
11759
11924
  moveClass
11760
11925
  )) {
11926
+ prevChildren = [];
11761
11927
  return;
11762
11928
  }
11763
11929
  prevChildren.forEach(callPendingCbs);
11764
11930
  prevChildren.forEach(recordPosition);
11765
11931
  const movedChildren = prevChildren.filter(applyTranslation);
11766
- forceReflow();
11932
+ forceReflow(instance.vnode.el);
11767
11933
  movedChildren.forEach((c) => {
11768
11934
  const el = c.el;
11769
11935
  const style = el.style;
@@ -11773,7 +11939,7 @@ Expected function or array of functions, received type ${typeof value}.`
11773
11939
  if (e && e.target !== el) {
11774
11940
  return;
11775
11941
  }
11776
- if (!e || /transform$/.test(e.propertyName)) {
11942
+ if (!e || e.propertyName.endsWith("transform")) {
11777
11943
  el.removeEventListener("transitionend", cb);
11778
11944
  el[moveCbKey] = null;
11779
11945
  removeTransitionClass(el, moveClass);
@@ -11781,6 +11947,7 @@ Expected function or array of functions, received type ${typeof value}.`
11781
11947
  };
11782
11948
  el.addEventListener("transitionend", cb);
11783
11949
  });
11950
+ prevChildren = [];
11784
11951
  });
11785
11952
  return () => {
11786
11953
  const rawProps = toRaw(props);
@@ -12129,13 +12296,13 @@ Expected function or array of functions, received type ${typeof value}.`
12129
12296
  const withModifiers = (fn, modifiers) => {
12130
12297
  const cache = fn._withMods || (fn._withMods = {});
12131
12298
  const cacheKey = modifiers.join(".");
12132
- return cache[cacheKey] || (cache[cacheKey] = (event, ...args) => {
12299
+ return cache[cacheKey] || (cache[cacheKey] = ((event, ...args) => {
12133
12300
  for (let i = 0; i < modifiers.length; i++) {
12134
12301
  const guard = modifierGuards[modifiers[i]];
12135
12302
  if (guard && guard(event, modifiers)) return;
12136
12303
  }
12137
12304
  return fn(event, ...args);
12138
- });
12305
+ }));
12139
12306
  };
12140
12307
  const keyNames = {
12141
12308
  esc: "escape",
@@ -12149,7 +12316,7 @@ Expected function or array of functions, received type ${typeof value}.`
12149
12316
  const withKeys = (fn, modifiers) => {
12150
12317
  const cache = fn._withKeys || (fn._withKeys = {});
12151
12318
  const cacheKey = modifiers.join(".");
12152
- return cache[cacheKey] || (cache[cacheKey] = (event) => {
12319
+ return cache[cacheKey] || (cache[cacheKey] = ((event) => {
12153
12320
  if (!("key" in event)) {
12154
12321
  return;
12155
12322
  }
@@ -12159,7 +12326,7 @@ Expected function or array of functions, received type ${typeof value}.`
12159
12326
  )) {
12160
12327
  return fn(event);
12161
12328
  }
12162
- });
12329
+ }));
12163
12330
  };
12164
12331
 
12165
12332
  const rendererOptions = /* @__PURE__ */ extend({ patchProp }, nodeOps);
@@ -12173,13 +12340,13 @@ Expected function or array of functions, received type ${typeof value}.`
12173
12340
  enabledHydration = true;
12174
12341
  return renderer;
12175
12342
  }
12176
- const render = (...args) => {
12343
+ const render = ((...args) => {
12177
12344
  ensureRenderer().render(...args);
12178
- };
12179
- const hydrate = (...args) => {
12345
+ });
12346
+ const hydrate = ((...args) => {
12180
12347
  ensureHydrationRenderer().hydrate(...args);
12181
- };
12182
- const createApp = (...args) => {
12348
+ });
12349
+ const createApp = ((...args) => {
12183
12350
  const app = ensureRenderer().createApp(...args);
12184
12351
  {
12185
12352
  injectNativeTagCheck(app);
@@ -12204,8 +12371,8 @@ Expected function or array of functions, received type ${typeof value}.`
12204
12371
  return proxy;
12205
12372
  };
12206
12373
  return app;
12207
- };
12208
- const createSSRApp = (...args) => {
12374
+ });
12375
+ const createSSRApp = ((...args) => {
12209
12376
  const app = ensureHydrationRenderer().createApp(...args);
12210
12377
  {
12211
12378
  injectNativeTagCheck(app);
@@ -12219,7 +12386,7 @@ Expected function or array of functions, received type ${typeof value}.`
12219
12386
  }
12220
12387
  };
12221
12388
  return app;
12222
- };
12389
+ });
12223
12390
  function resolveRootNamespace(container) {
12224
12391
  if (container instanceof SVGElement) {
12225
12392
  return "svg";
@@ -13182,7 +13349,7 @@ Make sure to use the production build (*.prod.js) when deploying for production.
13182
13349
  this.buffer = input;
13183
13350
  while (this.index < this.buffer.length) {
13184
13351
  const c = this.buffer.charCodeAt(this.index);
13185
- if (c === 10) {
13352
+ if (c === 10 && this.state !== 33) {
13186
13353
  this.newlines.push(this.index);
13187
13354
  }
13188
13355
  switch (this.state) {
@@ -13459,7 +13626,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
13459
13626
  return BASE_TRANSITION;
13460
13627
  }
13461
13628
  }
13462
- const nonIdentifierRE = /^\d|[^\$\w\xA0-\uFFFF]/;
13629
+ const nonIdentifierRE = /^$|^\d|[^\$\w\xA0-\uFFFF]/;
13463
13630
  const isSimpleIdentifier = (name) => !nonIdentifierRE.test(name);
13464
13631
  const validFirstIdentCharRE = /[A-Za-z_$\xA0-\uFFFF]/;
13465
13632
  const validIdentCharRE = /[\.\?\w$\xA0-\uFFFF]/;
@@ -13528,7 +13695,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
13528
13695
  return !currentOpenBracketCount && !currentOpenParensCount;
13529
13696
  };
13530
13697
  const isMemberExpression = isMemberExpressionBrowser ;
13531
- const fnExpRE = /^\s*(async\s*)?(\([^)]*?\)|[\w$_]+)\s*(:[^=]+)?=>|^\s*(async\s+)?function(?:\s+[\w$]+)?\s*\(/;
13698
+ const fnExpRE = /^\s*(?:async\s*)?(?:\([^)]*?\)|[\w$_]+)\s*(?::[^=]+)?=>|^\s*(?:async\s+)?function(?:\s+[\w$]+)?\s*\(/;
13532
13699
  const isFnExpressionBrowser = (exp) => fnExpRE.test(getExpSource(exp));
13533
13700
  const isFnExpression = isFnExpressionBrowser ;
13534
13701
  function assert(condition, msg) {
@@ -13571,6 +13738,9 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
13571
13738
  function isText$1(node) {
13572
13739
  return node.type === 5 || node.type === 2;
13573
13740
  }
13741
+ function isVPre(p) {
13742
+ return p.type === 7 && p.name === "pre";
13743
+ }
13574
13744
  function isVSlot(p) {
13575
13745
  return p.type === 7 && p.name === "slot";
13576
13746
  }
@@ -13829,7 +13999,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
13829
13999
  ondirarg(start, end) {
13830
14000
  if (start === end) return;
13831
14001
  const arg = getSlice(start, end);
13832
- if (inVPre) {
14002
+ if (inVPre && !isVPre(currentProp)) {
13833
14003
  currentProp.name += arg;
13834
14004
  setLocEnd(currentProp.nameLoc, end);
13835
14005
  } else {
@@ -13844,7 +14014,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
13844
14014
  },
13845
14015
  ondirmodifier(start, end) {
13846
14016
  const mod = getSlice(start, end);
13847
- if (inVPre) {
14017
+ if (inVPre && !isVPre(currentProp)) {
13848
14018
  currentProp.name += "." + mod;
13849
14019
  setLocEnd(currentProp.nameLoc, end);
13850
14020
  } else if (currentProp.name === "slot") {
@@ -14187,7 +14357,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
14187
14357
  return c > 64 && c < 91;
14188
14358
  }
14189
14359
  const windowsNewlineRE = /\r\n/g;
14190
- function condenseWhitespace(nodes, tag) {
14360
+ function condenseWhitespace(nodes) {
14191
14361
  const shouldCondense = currentOptions.whitespace !== "preserve";
14192
14362
  let removedWhitespace = false;
14193
14363
  for (let i = 0; i < nodes.length; i++) {
@@ -14351,12 +14521,12 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
14351
14521
  context,
14352
14522
  // Root node is unfortunately non-hoistable due to potential parent
14353
14523
  // fallthrough attributes.
14354
- isSingleElementRoot(root, root.children[0])
14524
+ !!getSingleElementRoot(root)
14355
14525
  );
14356
14526
  }
14357
- function isSingleElementRoot(root, child) {
14358
- const { children } = root;
14359
- return children.length === 1 && child.type === 1 && !isSlotOutlet(child);
14527
+ function getSingleElementRoot(root) {
14528
+ const children = root.children.filter((x) => x.type !== 3);
14529
+ return children.length === 1 && children[0].type === 1 && !isSlotOutlet(children[0]) ? children[0] : null;
14360
14530
  }
14361
14531
  function walk(node, parent, context, doNotHoistNode = false, inFor = false) {
14362
14532
  const { children } = node;
@@ -14389,6 +14559,11 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
14389
14559
  } else if (child.type === 12) {
14390
14560
  const constantType = doNotHoistNode ? 0 : getConstantType(child, context);
14391
14561
  if (constantType >= 2) {
14562
+ if (child.codegenNode.type === 14 && child.codegenNode.arguments.length > 0) {
14563
+ child.codegenNode.arguments.push(
14564
+ -1 + (` /* ${PatchFlagNames[-1]} */` )
14565
+ );
14566
+ }
14392
14567
  toCache.push(child);
14393
14568
  continue;
14394
14569
  }
@@ -14449,9 +14624,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
14449
14624
  }
14450
14625
  function getCacheExpression(value) {
14451
14626
  const exp = context.cache(value);
14452
- if (inFor && context.hmr) {
14453
- exp.needArraySpread = true;
14454
- }
14627
+ exp.needArraySpread = true;
14455
14628
  return exp;
14456
14629
  }
14457
14630
  function getSlotNode(node2, name) {
@@ -14804,15 +14977,15 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
14804
14977
  const { helper } = context;
14805
14978
  const { children } = root;
14806
14979
  if (children.length === 1) {
14807
- const child = children[0];
14808
- if (isSingleElementRoot(root, child) && child.codegenNode) {
14809
- const codegenNode = child.codegenNode;
14980
+ const singleElementRootChild = getSingleElementRoot(root);
14981
+ if (singleElementRootChild && singleElementRootChild.codegenNode) {
14982
+ const codegenNode = singleElementRootChild.codegenNode;
14810
14983
  if (codegenNode.type === 13) {
14811
14984
  convertToBlock(codegenNode, context);
14812
14985
  }
14813
14986
  root.codegenNode = codegenNode;
14814
14987
  } else {
14815
- root.codegenNode = child;
14988
+ root.codegenNode = children[0];
14816
14989
  }
14817
14990
  } else if (children.length > 1) {
14818
14991
  let patchFlag = 64;
@@ -15564,7 +15737,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
15564
15737
  }
15565
15738
 
15566
15739
  const transformIf = createStructuralDirectiveTransform(
15567
- /^(if|else|else-if)$/,
15740
+ /^(?:if|else|else-if)$/,
15568
15741
  (node, dir, context) => {
15569
15742
  return processIf(node, dir, context, (ifNode, branch, isRoot) => {
15570
15743
  const siblings = context.parent.children;
@@ -15633,7 +15806,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
15633
15806
  continue;
15634
15807
  }
15635
15808
  if (sibling && sibling.type === 9) {
15636
- if (dir.name === "else-if" && sibling.branches[sibling.branches.length - 1].condition === void 0) {
15809
+ if ((dir.name === "else-if" || dir.name === "else") && sibling.branches[sibling.branches.length - 1].condition === void 0) {
15637
15810
  context.onError(
15638
15811
  createCompilerError(30, node.loc)
15639
15812
  );
@@ -15782,80 +15955,6 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
15782
15955
  }
15783
15956
  }
15784
15957
 
15785
- const transformBind = (dir, _node, context) => {
15786
- const { modifiers, loc } = dir;
15787
- const arg = dir.arg;
15788
- let { exp } = dir;
15789
- if (exp && exp.type === 4 && !exp.content.trim()) {
15790
- {
15791
- exp = void 0;
15792
- }
15793
- }
15794
- if (!exp) {
15795
- if (arg.type !== 4 || !arg.isStatic) {
15796
- context.onError(
15797
- createCompilerError(
15798
- 52,
15799
- arg.loc
15800
- )
15801
- );
15802
- return {
15803
- props: [
15804
- createObjectProperty(arg, createSimpleExpression("", true, loc))
15805
- ]
15806
- };
15807
- }
15808
- transformBindShorthand(dir);
15809
- exp = dir.exp;
15810
- }
15811
- if (arg.type !== 4) {
15812
- arg.children.unshift(`(`);
15813
- arg.children.push(`) || ""`);
15814
- } else if (!arg.isStatic) {
15815
- arg.content = `${arg.content} || ""`;
15816
- }
15817
- if (modifiers.some((mod) => mod.content === "camel")) {
15818
- if (arg.type === 4) {
15819
- if (arg.isStatic) {
15820
- arg.content = camelize(arg.content);
15821
- } else {
15822
- arg.content = `${context.helperString(CAMELIZE)}(${arg.content})`;
15823
- }
15824
- } else {
15825
- arg.children.unshift(`${context.helperString(CAMELIZE)}(`);
15826
- arg.children.push(`)`);
15827
- }
15828
- }
15829
- if (!context.inSSR) {
15830
- if (modifiers.some((mod) => mod.content === "prop")) {
15831
- injectPrefix(arg, ".");
15832
- }
15833
- if (modifiers.some((mod) => mod.content === "attr")) {
15834
- injectPrefix(arg, "^");
15835
- }
15836
- }
15837
- return {
15838
- props: [createObjectProperty(arg, exp)]
15839
- };
15840
- };
15841
- const transformBindShorthand = (dir, context) => {
15842
- const arg = dir.arg;
15843
- const propName = camelize(arg.content);
15844
- dir.exp = createSimpleExpression(propName, false, arg.loc);
15845
- };
15846
- const injectPrefix = (arg, prefix) => {
15847
- if (arg.type === 4) {
15848
- if (arg.isStatic) {
15849
- arg.content = prefix + arg.content;
15850
- } else {
15851
- arg.content = `\`${prefix}\${${arg.content}}\``;
15852
- }
15853
- } else {
15854
- arg.children.unshift(`'${prefix}' + (`);
15855
- arg.children.push(`)`);
15856
- }
15857
- };
15858
-
15859
15958
  const transformFor = createStructuralDirectiveTransform(
15860
15959
  "for",
15861
15960
  (node, dir, context) => {
@@ -15867,10 +15966,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
15867
15966
  const isTemplate = isTemplateNode(node);
15868
15967
  const memo = findDir(node, "memo");
15869
15968
  const keyProp = findProp(node, `key`, false, true);
15870
- const isDirKey = keyProp && keyProp.type === 7;
15871
- if (isDirKey && !keyProp.exp) {
15872
- transformBindShorthand(keyProp);
15873
- }
15969
+ keyProp && keyProp.type === 7;
15874
15970
  let keyExp = keyProp && (keyProp.type === 6 ? keyProp.value ? createSimpleExpression(keyProp.value.content, true) : void 0 : keyProp.exp);
15875
15971
  const keyProperty = keyProp && keyExp ? createObjectProperty(`key`, keyExp) : null;
15876
15972
  const isStableFragment = forNode.source.type === 4 && forNode.source.constType > 0;
@@ -16151,7 +16247,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
16151
16247
  );
16152
16248
  } else if (vElse = findDir(
16153
16249
  slotElement,
16154
- /^else(-if)?$/,
16250
+ /^else(?:-if)?$/,
16155
16251
  true
16156
16252
  /* allowEmpty */
16157
16253
  )) {
@@ -16159,11 +16255,11 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
16159
16255
  let prev;
16160
16256
  while (j--) {
16161
16257
  prev = children[j];
16162
- if (prev.type !== 3) {
16258
+ if (prev.type !== 3 && isNonWhitespaceContent(prev)) {
16163
16259
  break;
16164
16260
  }
16165
16261
  }
16166
- if (prev && isTemplateNode(prev) && findDir(prev, /^(else-)?if$/)) {
16262
+ if (prev && isTemplateNode(prev) && findDir(prev, /^(?:else-)?if$/)) {
16167
16263
  let conditional = dynamicSlots[dynamicSlots.length - 1];
16168
16264
  while (conditional.alternate.type === 19) {
16169
16265
  conditional = conditional.alternate;
@@ -16980,6 +17076,58 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
16980
17076
  return ret;
16981
17077
  };
16982
17078
 
17079
+ const transformBind = (dir, _node, context) => {
17080
+ const { modifiers, loc } = dir;
17081
+ const arg = dir.arg;
17082
+ let { exp } = dir;
17083
+ if (exp && exp.type === 4 && !exp.content.trim()) {
17084
+ {
17085
+ exp = void 0;
17086
+ }
17087
+ }
17088
+ if (arg.type !== 4) {
17089
+ arg.children.unshift(`(`);
17090
+ arg.children.push(`) || ""`);
17091
+ } else if (!arg.isStatic) {
17092
+ arg.content = arg.content ? `${arg.content} || ""` : `""`;
17093
+ }
17094
+ if (modifiers.some((mod) => mod.content === "camel")) {
17095
+ if (arg.type === 4) {
17096
+ if (arg.isStatic) {
17097
+ arg.content = camelize(arg.content);
17098
+ } else {
17099
+ arg.content = `${context.helperString(CAMELIZE)}(${arg.content})`;
17100
+ }
17101
+ } else {
17102
+ arg.children.unshift(`${context.helperString(CAMELIZE)}(`);
17103
+ arg.children.push(`)`);
17104
+ }
17105
+ }
17106
+ if (!context.inSSR) {
17107
+ if (modifiers.some((mod) => mod.content === "prop")) {
17108
+ injectPrefix(arg, ".");
17109
+ }
17110
+ if (modifiers.some((mod) => mod.content === "attr")) {
17111
+ injectPrefix(arg, "^");
17112
+ }
17113
+ }
17114
+ return {
17115
+ props: [createObjectProperty(arg, exp)]
17116
+ };
17117
+ };
17118
+ const injectPrefix = (arg, prefix) => {
17119
+ if (arg.type === 4) {
17120
+ if (arg.isStatic) {
17121
+ arg.content = prefix + arg.content;
17122
+ } else {
17123
+ arg.content = `\`${prefix}\${${arg.content}}\``;
17124
+ }
17125
+ } else {
17126
+ arg.children.unshift(`'${prefix}' + (`);
17127
+ arg.children.push(`)`);
17128
+ }
17129
+ };
17130
+
16983
17131
  const transformText = (node, context) => {
16984
17132
  if (node.type === 0 || node.type === 1 || node.type === 11 || node.type === 10) {
16985
17133
  return () => {
@@ -17091,8 +17239,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
17091
17239
  context.onError(createCompilerError(44, exp.loc));
17092
17240
  return createTransformProps();
17093
17241
  }
17094
- const maybeRef = false;
17095
- if (!expString.trim() || !isMemberExpression(exp) && !maybeRef) {
17242
+ if (!expString.trim() || !isMemberExpression(exp) && true) {
17096
17243
  context.onError(
17097
17244
  createCompilerError(42, exp.loc)
17098
17245
  );
@@ -17140,7 +17287,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
17140
17287
  const transformMemo = (node, context) => {
17141
17288
  if (node.type === 1) {
17142
17289
  const dir = findDir(node, "memo");
17143
- if (!dir || seen.has(node)) {
17290
+ if (!dir || seen.has(node) || context.inSSR) {
17144
17291
  return;
17145
17292
  }
17146
17293
  seen.add(node);
@@ -17162,9 +17309,35 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
17162
17309
  }
17163
17310
  };
17164
17311
 
17312
+ const transformVBindShorthand = (node, context) => {
17313
+ if (node.type === 1) {
17314
+ for (const prop of node.props) {
17315
+ if (prop.type === 7 && prop.name === "bind" && !prop.exp) {
17316
+ const arg = prop.arg;
17317
+ if (arg.type !== 4 || !arg.isStatic) {
17318
+ context.onError(
17319
+ createCompilerError(
17320
+ 52,
17321
+ arg.loc
17322
+ )
17323
+ );
17324
+ prop.exp = createSimpleExpression("", true, arg.loc);
17325
+ } else {
17326
+ const propName = camelize(arg.content);
17327
+ if (validFirstIdentCharRE.test(propName[0]) || // allow hyphen first char for https://github.com/vuejs/language-tools/pull/3424
17328
+ propName[0] === "-") {
17329
+ prop.exp = createSimpleExpression(propName, false, arg.loc);
17330
+ }
17331
+ }
17332
+ }
17333
+ }
17334
+ }
17335
+ };
17336
+
17165
17337
  function getBaseTransformPreset(prefixIdentifiers) {
17166
17338
  return [
17167
17339
  [
17340
+ transformVBindShorthand,
17168
17341
  transformOnce,
17169
17342
  transformIf,
17170
17343
  transformMemo,
@@ -17661,6 +17834,9 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
17661
17834
  };
17662
17835
 
17663
17836
  function isValidHTMLNesting(parent, child) {
17837
+ if (parent === "template") {
17838
+ return true;
17839
+ }
17664
17840
  if (parent in onlyValidChildren) {
17665
17841
  return onlyValidChildren[parent].has(child);
17666
17842
  }