@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,9 +1,8 @@
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
- /*! #__NO_SIDE_EFFECTS__ */
7
6
  // @__NO_SIDE_EFFECTS__
8
7
  function makeMap(str) {
9
8
  const map = /* @__PURE__ */ Object.create(null);
@@ -56,15 +55,15 @@ const isBuiltInDirective = /* @__PURE__ */ makeMap(
56
55
  );
57
56
  const cacheStringFunction = (fn) => {
58
57
  const cache = /* @__PURE__ */ Object.create(null);
59
- return (str) => {
58
+ return ((str) => {
60
59
  const hit = cache[str];
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;
@@ -311,6 +310,24 @@ const stringifySymbol = (v, i = "") => {
311
310
  );
312
311
  };
313
312
 
313
+ function normalizeCssVarValue(value) {
314
+ if (value == null) {
315
+ return "initial";
316
+ }
317
+ if (typeof value === "string") {
318
+ return value === "" ? " " : value;
319
+ }
320
+ if (typeof value !== "number" || !Number.isFinite(value)) {
321
+ {
322
+ console.warn(
323
+ "[Vue warn] Invalid value used for CSS binding. Expected a string or a finite number but received:",
324
+ value
325
+ );
326
+ }
327
+ }
328
+ return String(value);
329
+ }
330
+
314
331
  function warn$2(msg, ...args) {
315
332
  console.warn(`[Vue warn] ${msg}`, ...args);
316
333
  }
@@ -323,6 +340,10 @@ class EffectScope {
323
340
  * @internal
324
341
  */
325
342
  this._active = true;
343
+ /**
344
+ * @internal track `on` calls, allow `on` call multiple times
345
+ */
346
+ this._on = 0;
326
347
  /**
327
348
  * @internal
328
349
  */
@@ -393,14 +414,20 @@ class EffectScope {
393
414
  * @internal
394
415
  */
395
416
  on() {
396
- activeEffectScope = this;
417
+ if (++this._on === 1) {
418
+ this.prevScope = activeEffectScope;
419
+ activeEffectScope = this;
420
+ }
397
421
  }
398
422
  /**
399
423
  * This should only be called on non-detached scopes
400
424
  * @internal
401
425
  */
402
426
  off() {
403
- activeEffectScope = this.parent;
427
+ if (this._on > 0 && --this._on === 0) {
428
+ activeEffectScope = this.prevScope;
429
+ this.prevScope = void 0;
430
+ }
404
431
  }
405
432
  stop(fromParent) {
406
433
  if (this._active) {
@@ -482,7 +509,7 @@ class ReactiveEffect {
482
509
  }
483
510
  resume() {
484
511
  if (this.flags & 64) {
485
- this.flags &= ~64;
512
+ this.flags &= -65;
486
513
  if (pausedQueueEffects.has(this)) {
487
514
  pausedQueueEffects.delete(this);
488
515
  this.trigger();
@@ -522,7 +549,7 @@ class ReactiveEffect {
522
549
  cleanupDeps(this);
523
550
  activeSub = prevEffect;
524
551
  shouldTrack = prevShouldTrack;
525
- this.flags &= ~2;
552
+ this.flags &= -3;
526
553
  }
527
554
  }
528
555
  stop() {
@@ -533,7 +560,7 @@ class ReactiveEffect {
533
560
  this.deps = this.depsTail = void 0;
534
561
  cleanupEffect(this);
535
562
  this.onStop && this.onStop();
536
- this.flags &= ~1;
563
+ this.flags &= -2;
537
564
  }
538
565
  }
539
566
  trigger() {
@@ -583,7 +610,7 @@ function endBatch() {
583
610
  while (e) {
584
611
  const next = e.next;
585
612
  e.next = void 0;
586
- e.flags &= ~8;
613
+ e.flags &= -9;
587
614
  e = next;
588
615
  }
589
616
  }
@@ -594,7 +621,7 @@ function endBatch() {
594
621
  while (e) {
595
622
  const next = e.next;
596
623
  e.next = void 0;
597
- e.flags &= ~8;
624
+ e.flags &= -9;
598
625
  if (e.flags & 1) {
599
626
  try {
600
627
  ;
@@ -650,17 +677,16 @@ function refreshComputed(computed) {
650
677
  if (computed.flags & 4 && !(computed.flags & 16)) {
651
678
  return;
652
679
  }
653
- computed.flags &= ~16;
680
+ computed.flags &= -17;
654
681
  if (computed.globalVersion === globalVersion) {
655
682
  return;
656
683
  }
657
684
  computed.globalVersion = globalVersion;
658
- const dep = computed.dep;
659
- computed.flags |= 2;
660
- if (dep.version > 0 && !computed.isSSR && computed.deps && !isDirty(computed)) {
661
- computed.flags &= ~2;
685
+ if (!computed.isSSR && computed.flags & 128 && (!computed.deps && !computed._dirty || !isDirty(computed))) {
662
686
  return;
663
687
  }
688
+ computed.flags |= 2;
689
+ const dep = computed.dep;
664
690
  const prevSub = activeSub;
665
691
  const prevShouldTrack = shouldTrack;
666
692
  activeSub = computed;
@@ -669,6 +695,7 @@ function refreshComputed(computed) {
669
695
  prepareDeps(computed);
670
696
  const value = computed.fn(computed._value);
671
697
  if (dep.version === 0 || hasChanged(value, computed._value)) {
698
+ computed.flags |= 128;
672
699
  computed._value = value;
673
700
  dep.version++;
674
701
  }
@@ -679,7 +706,7 @@ function refreshComputed(computed) {
679
706
  activeSub = prevSub;
680
707
  shouldTrack = prevShouldTrack;
681
708
  cleanupDeps(computed);
682
- computed.flags &= ~2;
709
+ computed.flags &= -3;
683
710
  }
684
711
  }
685
712
  function removeSub(link, soft = false) {
@@ -698,7 +725,7 @@ function removeSub(link, soft = false) {
698
725
  if (dep.subs === link) {
699
726
  dep.subs = prevSub;
700
727
  if (!prevSub && dep.computed) {
701
- dep.computed.flags &= ~4;
728
+ dep.computed.flags &= -5;
702
729
  for (let l = dep.computed.deps; l; l = l.nextDep) {
703
730
  removeSub(l, true);
704
731
  }
@@ -774,6 +801,7 @@ class Link {
774
801
  }
775
802
  }
776
803
  class Dep {
804
+ // TODO isolatedDeclarations "__v_skip"
777
805
  constructor(computed) {
778
806
  this.computed = computed;
779
807
  this.version = 0;
@@ -794,6 +822,10 @@ class Dep {
794
822
  * Subscriber counter
795
823
  */
796
824
  this.sc = 0;
825
+ /**
826
+ * @internal
827
+ */
828
+ this.__v_skip = true;
797
829
  {
798
830
  this.subsHead = void 0;
799
831
  }
@@ -1058,7 +1090,7 @@ const arrayInstrumentations = {
1058
1090
  join(separator) {
1059
1091
  return reactiveReadArray(this).join(separator);
1060
1092
  },
1061
- // keys() iterator only reads `length`, no optimisation required
1093
+ // keys() iterator only reads `length`, no optimization required
1062
1094
  lastIndexOf(...args) {
1063
1095
  return searchProxy(this, "lastIndexOf", args);
1064
1096
  },
@@ -1110,7 +1142,7 @@ function iterator(self, method, wrapValue) {
1110
1142
  iter._next = iter.next;
1111
1143
  iter.next = () => {
1112
1144
  const result = iter._next();
1113
- if (result.value) {
1145
+ if (!result.done) {
1114
1146
  result.value = wrapValue(result.value);
1115
1147
  }
1116
1148
  return result;
@@ -1237,7 +1269,8 @@ class BaseReactiveHandler {
1237
1269
  return res;
1238
1270
  }
1239
1271
  if (isRef(res)) {
1240
- return targetIsArray && isIntegerKey(key) ? res : res.value;
1272
+ const value = targetIsArray && isIntegerKey(key) ? res : res.value;
1273
+ return isReadonly2 && isObject(value) ? readonly(value) : value;
1241
1274
  }
1242
1275
  if (isObject(res)) {
1243
1276
  return isReadonly2 ? readonly(res) : reactive(res);
@@ -1259,7 +1292,13 @@ class MutableReactiveHandler extends BaseReactiveHandler {
1259
1292
  }
1260
1293
  if (!isArray(target) && isRef(oldValue) && !isRef(value)) {
1261
1294
  if (isOldValueReadonly) {
1262
- return false;
1295
+ {
1296
+ warn$2(
1297
+ `Set operation on key "${String(key)}" failed: target is readonly.`,
1298
+ target[key]
1299
+ );
1300
+ }
1301
+ return true;
1263
1302
  } else {
1264
1303
  oldValue.value = value;
1265
1304
  return true;
@@ -1404,7 +1443,7 @@ function createInstrumentations(readonly, shallow) {
1404
1443
  get size() {
1405
1444
  const target = this["__v_raw"];
1406
1445
  !readonly && track(toRaw(target), "iterate", ITERATE_KEY);
1407
- return Reflect.get(target, "size", target);
1446
+ return target.size;
1408
1447
  },
1409
1448
  has(key) {
1410
1449
  const target = this["__v_raw"];
@@ -1631,14 +1670,14 @@ function createReactiveObject(target, isReadonly2, baseHandlers, collectionHandl
1631
1670
  if (target["__v_raw"] && !(isReadonly2 && target["__v_isReactive"])) {
1632
1671
  return target;
1633
1672
  }
1634
- const existingProxy = proxyMap.get(target);
1635
- if (existingProxy) {
1636
- return existingProxy;
1637
- }
1638
1673
  const targetType = getTargetType(target);
1639
1674
  if (targetType === 0 /* INVALID */) {
1640
1675
  return target;
1641
1676
  }
1677
+ const existingProxy = proxyMap.get(target);
1678
+ if (existingProxy) {
1679
+ return existingProxy;
1680
+ }
1642
1681
  const proxy = new Proxy(
1643
1682
  target,
1644
1683
  targetType === 2 /* COLLECTION */ ? collectionHandlers : baseHandlers
@@ -2061,11 +2100,11 @@ function watch$1(source, cb, options = EMPTY_OBJ) {
2061
2100
  oldValue === INITIAL_WATCHER_VALUE ? void 0 : isMultiSource && oldValue[0] === INITIAL_WATCHER_VALUE ? [] : oldValue,
2062
2101
  boundCleanup
2063
2102
  ];
2103
+ oldValue = newValue;
2064
2104
  call ? call(cb, 3, args) : (
2065
2105
  // @ts-expect-error
2066
2106
  cb(...args)
2067
2107
  );
2068
- oldValue = newValue;
2069
2108
  } finally {
2070
2109
  activeWatcher = currentWatcher;
2071
2110
  }
@@ -2115,11 +2154,11 @@ function traverse(value, depth = Infinity, seen) {
2115
2154
  if (depth <= 0 || !isObject(value) || value["__v_skip"]) {
2116
2155
  return value;
2117
2156
  }
2118
- seen = seen || /* @__PURE__ */ new Set();
2119
- if (seen.has(value)) {
2157
+ seen = seen || /* @__PURE__ */ new Map();
2158
+ if ((seen.get(value) || 0) >= depth) {
2120
2159
  return value;
2121
2160
  }
2122
- seen.add(value);
2161
+ seen.set(value, depth);
2123
2162
  depth--;
2124
2163
  if (isRef(value)) {
2125
2164
  traverse(value.value, depth, seen);
@@ -2482,11 +2521,11 @@ function flushPreFlushCbs(instance, seen, i = flushIndex + 1) {
2482
2521
  queue.splice(i, 1);
2483
2522
  i--;
2484
2523
  if (cb.flags & 4) {
2485
- cb.flags &= ~1;
2524
+ cb.flags &= -2;
2486
2525
  }
2487
2526
  cb();
2488
2527
  if (!(cb.flags & 4)) {
2489
- cb.flags &= ~1;
2528
+ cb.flags &= -2;
2490
2529
  }
2491
2530
  }
2492
2531
  }
@@ -2511,10 +2550,10 @@ function flushPostFlushCbs(seen) {
2511
2550
  continue;
2512
2551
  }
2513
2552
  if (cb.flags & 4) {
2514
- cb.flags &= ~1;
2553
+ cb.flags &= -2;
2515
2554
  }
2516
2555
  if (!(cb.flags & 8)) cb();
2517
- cb.flags &= ~1;
2556
+ cb.flags &= -2;
2518
2557
  }
2519
2558
  activePostFlushCbs = null;
2520
2559
  postFlushIndex = 0;
@@ -2550,7 +2589,7 @@ function flushJobs(seen) {
2550
2589
  for (; flushIndex < queue.length; flushIndex++) {
2551
2590
  const job = queue[flushIndex];
2552
2591
  if (job) {
2553
- job.flags &= ~1;
2592
+ job.flags &= -2;
2554
2593
  }
2555
2594
  }
2556
2595
  flushIndex = -1;
@@ -2626,7 +2665,9 @@ function rerender(id, newRender) {
2626
2665
  }
2627
2666
  instance.renderCache = [];
2628
2667
  isHmrUpdating = true;
2629
- instance.update();
2668
+ if (!(instance.job.flags & 8)) {
2669
+ instance.update();
2670
+ }
2630
2671
  isHmrUpdating = false;
2631
2672
  });
2632
2673
  }
@@ -2656,10 +2697,12 @@ function reload(id, newComp) {
2656
2697
  dirtyInstances.delete(instance);
2657
2698
  } else if (instance.parent) {
2658
2699
  queueJob(() => {
2659
- isHmrUpdating = true;
2660
- instance.parent.update();
2661
- isHmrUpdating = false;
2662
- dirtyInstances.delete(instance);
2700
+ if (!(instance.job.flags & 8)) {
2701
+ isHmrUpdating = true;
2702
+ instance.parent.update();
2703
+ isHmrUpdating = false;
2704
+ dirtyInstances.delete(instance);
2705
+ }
2663
2706
  });
2664
2707
  } else if (instance.appContext.reload) {
2665
2708
  instance.appContext.reload();
@@ -2763,7 +2806,6 @@ const devtoolsComponentRemoved = (component) => {
2763
2806
  _devtoolsComponentRemoved(component);
2764
2807
  }
2765
2808
  };
2766
- /*! #__NO_SIDE_EFFECTS__ */
2767
2809
  // @__NO_SIDE_EFFECTS__
2768
2810
  function createDevtoolsComponentHook(hook) {
2769
2811
  return (component) => {
@@ -2949,9 +2991,6 @@ const TeleportImpl = {
2949
2991
  insert(mainAnchor, container, anchor);
2950
2992
  const mount = (container2, anchor2) => {
2951
2993
  if (shapeFlag & 16) {
2952
- if (parentComponent && parentComponent.isCE) {
2953
- parentComponent.ce._teleportTarget = container2;
2954
- }
2955
2994
  mountChildren(
2956
2995
  children,
2957
2996
  container2,
@@ -2973,6 +3012,9 @@ const TeleportImpl = {
2973
3012
  } else if (namespace !== "mathml" && isTargetMathML(target)) {
2974
3013
  namespace = "mathml";
2975
3014
  }
3015
+ if (parentComponent && parentComponent.isCE) {
3016
+ (parentComponent.ce._teleportTargets || (parentComponent.ce._teleportTargets = /* @__PURE__ */ new Set())).add(target);
3017
+ }
2976
3018
  if (!disabled) {
2977
3019
  mount(target, targetAnchor);
2978
3020
  updateCssVars(n2, false);
@@ -2990,15 +3032,16 @@ const TeleportImpl = {
2990
3032
  updateCssVars(n2, true);
2991
3033
  }
2992
3034
  if (isTeleportDeferred(n2.props)) {
3035
+ n2.el.__isMounted = false;
2993
3036
  queuePostRenderEffect(() => {
2994
3037
  mountToTarget();
2995
- n2.el.__isMounted = true;
3038
+ delete n2.el.__isMounted;
2996
3039
  }, parentSuspense);
2997
3040
  } else {
2998
3041
  mountToTarget();
2999
3042
  }
3000
3043
  } else {
3001
- if (isTeleportDeferred(n2.props) && !n1.el.__isMounted) {
3044
+ if (isTeleportDeferred(n2.props) && n1.el.__isMounted === false) {
3002
3045
  queuePostRenderEffect(() => {
3003
3046
  TeleportImpl.process(
3004
3047
  n1,
@@ -3012,7 +3055,6 @@ const TeleportImpl = {
3012
3055
  optimized,
3013
3056
  internals
3014
3057
  );
3015
- delete n1.el.__isMounted;
3016
3058
  }, parentSuspense);
3017
3059
  return;
3018
3060
  }
@@ -3039,7 +3081,7 @@ const TeleportImpl = {
3039
3081
  namespace,
3040
3082
  slotScopeIds
3041
3083
  );
3042
- traverseStaticChildren(n1, n2, true);
3084
+ traverseStaticChildren(n1, n2, false);
3043
3085
  } else if (!optimized) {
3044
3086
  patchChildren(
3045
3087
  n1,
@@ -3161,26 +3203,34 @@ function moveTeleport(vnode, container, parentAnchor, { o: { insert }, m: move }
3161
3203
  function hydrateTeleport(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized, {
3162
3204
  o: { nextSibling, parentNode, querySelector, insert, createText }
3163
3205
  }, hydrateChildren) {
3206
+ function hydrateDisabledTeleport(node2, vnode2, targetStart, targetAnchor) {
3207
+ vnode2.anchor = hydrateChildren(
3208
+ nextSibling(node2),
3209
+ vnode2,
3210
+ parentNode(node2),
3211
+ parentComponent,
3212
+ parentSuspense,
3213
+ slotScopeIds,
3214
+ optimized
3215
+ );
3216
+ vnode2.targetStart = targetStart;
3217
+ vnode2.targetAnchor = targetAnchor;
3218
+ }
3164
3219
  const target = vnode.target = resolveTarget(
3165
3220
  vnode.props,
3166
3221
  querySelector
3167
3222
  );
3223
+ const disabled = isTeleportDisabled(vnode.props);
3168
3224
  if (target) {
3169
- const disabled = isTeleportDisabled(vnode.props);
3170
3225
  const targetNode = target._lpa || target.firstChild;
3171
3226
  if (vnode.shapeFlag & 16) {
3172
3227
  if (disabled) {
3173
- vnode.anchor = hydrateChildren(
3174
- nextSibling(node),
3228
+ hydrateDisabledTeleport(
3229
+ node,
3175
3230
  vnode,
3176
- parentNode(node),
3177
- parentComponent,
3178
- parentSuspense,
3179
- slotScopeIds,
3180
- optimized
3231
+ targetNode,
3232
+ targetNode && nextSibling(targetNode)
3181
3233
  );
3182
- vnode.targetStart = targetNode;
3183
- vnode.targetAnchor = targetNode && nextSibling(targetNode);
3184
3234
  } else {
3185
3235
  vnode.anchor = nextSibling(node);
3186
3236
  let targetAnchor = targetNode;
@@ -3211,6 +3261,10 @@ function hydrateTeleport(node, vnode, parentComponent, parentSuspense, slotScope
3211
3261
  }
3212
3262
  }
3213
3263
  updateCssVars(vnode, disabled);
3264
+ } else if (disabled) {
3265
+ if (vnode.shapeFlag & 16) {
3266
+ hydrateDisabledTeleport(node, vnode, node, nextSibling(node));
3267
+ }
3214
3268
  }
3215
3269
  return vnode.anchor && nextSibling(vnode.anchor);
3216
3270
  }
@@ -3322,7 +3376,7 @@ const BaseTransitionImpl = {
3322
3376
  setTransitionHooks(innerChild, enterHooks);
3323
3377
  }
3324
3378
  let oldInnerChild = instance.subTree && getInnerChild$1(instance.subTree);
3325
- if (oldInnerChild && oldInnerChild.type !== Comment && !isSameVNodeType(innerChild, oldInnerChild) && recursiveGetSubtree(instance).type !== Comment) {
3379
+ if (oldInnerChild && oldInnerChild.type !== Comment && !isSameVNodeType(oldInnerChild, innerChild) && recursiveGetSubtree(instance).type !== Comment) {
3326
3380
  let leavingHooks = resolveTransitionHooks(
3327
3381
  oldInnerChild,
3328
3382
  rawProps,
@@ -3602,7 +3656,6 @@ function getTransitionRawChildren(children, keepComment = false, parentKey) {
3602
3656
  return ret;
3603
3657
  }
3604
3658
 
3605
- /*! #__NO_SIDE_EFFECTS__ */
3606
3659
  // @__NO_SIDE_EFFECTS__
3607
3660
  function defineComponent(options, extraOptions) {
3608
3661
  return isFunction(options) ? (
@@ -3655,6 +3708,7 @@ function useTemplateRef(key) {
3655
3708
  return ret;
3656
3709
  }
3657
3710
 
3711
+ const pendingSetRefMap = /* @__PURE__ */ new WeakMap();
3658
3712
  function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
3659
3713
  if (isArray(rawRef)) {
3660
3714
  rawRef.forEach(
@@ -3687,7 +3741,7 @@ function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
3687
3741
  const refs = owner.refs === EMPTY_OBJ ? owner.refs = {} : owner.refs;
3688
3742
  const setupState = owner.setupState;
3689
3743
  const rawSetupState = toRaw(setupState);
3690
- const canSetSetupRef = setupState === EMPTY_OBJ ? () => false : (key) => {
3744
+ const canSetSetupRef = setupState === EMPTY_OBJ ? NO : (key) => {
3691
3745
  {
3692
3746
  if (hasOwn(rawSetupState, key) && !isRef(rawSetupState[key])) {
3693
3747
  warn$1(
@@ -3700,14 +3754,22 @@ function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
3700
3754
  }
3701
3755
  return hasOwn(rawSetupState, key);
3702
3756
  };
3757
+ const canSetRef = (ref2) => {
3758
+ return !knownTemplateRefs.has(ref2);
3759
+ };
3703
3760
  if (oldRef != null && oldRef !== ref) {
3761
+ invalidatePendingSetRef(oldRawRef);
3704
3762
  if (isString(oldRef)) {
3705
3763
  refs[oldRef] = null;
3706
3764
  if (canSetSetupRef(oldRef)) {
3707
3765
  setupState[oldRef] = null;
3708
3766
  }
3709
3767
  } else if (isRef(oldRef)) {
3710
- oldRef.value = null;
3768
+ if (canSetRef(oldRef)) {
3769
+ oldRef.value = null;
3770
+ }
3771
+ const oldRawRefAtom = oldRawRef;
3772
+ if (oldRawRefAtom.k) refs[oldRawRefAtom.k] = null;
3711
3773
  }
3712
3774
  }
3713
3775
  if (isFunction(ref)) {
@@ -3718,7 +3780,7 @@ function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
3718
3780
  if (_isString || _isRef) {
3719
3781
  const doSet = () => {
3720
3782
  if (rawRef.f) {
3721
- const existing = _isString ? canSetSetupRef(ref) ? setupState[ref] : refs[ref] : ref.value;
3783
+ const existing = _isString ? canSetSetupRef(ref) ? setupState[ref] : refs[ref] : canSetRef(ref) || !rawRef.k ? ref.value : refs[rawRef.k];
3722
3784
  if (isUnmount) {
3723
3785
  isArray(existing) && remove(existing, refValue);
3724
3786
  } else {
@@ -3729,8 +3791,11 @@ function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
3729
3791
  setupState[ref] = refs[ref];
3730
3792
  }
3731
3793
  } else {
3732
- ref.value = [refValue];
3733
- if (rawRef.k) refs[rawRef.k] = ref.value;
3794
+ const newVal = [refValue];
3795
+ if (canSetRef(ref)) {
3796
+ ref.value = newVal;
3797
+ }
3798
+ if (rawRef.k) refs[rawRef.k] = newVal;
3734
3799
  }
3735
3800
  } else if (!existing.includes(refValue)) {
3736
3801
  existing.push(refValue);
@@ -3742,16 +3807,24 @@ function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
3742
3807
  setupState[ref] = value;
3743
3808
  }
3744
3809
  } else if (_isRef) {
3745
- ref.value = value;
3810
+ if (canSetRef(ref)) {
3811
+ ref.value = value;
3812
+ }
3746
3813
  if (rawRef.k) refs[rawRef.k] = value;
3747
3814
  } else {
3748
3815
  warn$1("Invalid template ref type:", ref, `(${typeof ref})`);
3749
3816
  }
3750
3817
  };
3751
3818
  if (value) {
3752
- doSet.id = -1;
3753
- queuePostRenderEffect(doSet, parentSuspense);
3819
+ const job = () => {
3820
+ doSet();
3821
+ pendingSetRefMap.delete(rawRef);
3822
+ };
3823
+ job.id = -1;
3824
+ pendingSetRefMap.set(rawRef, job);
3825
+ queuePostRenderEffect(job, parentSuspense);
3754
3826
  } else {
3827
+ invalidatePendingSetRef(rawRef);
3755
3828
  doSet();
3756
3829
  }
3757
3830
  } else {
@@ -3759,6 +3832,13 @@ function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
3759
3832
  }
3760
3833
  }
3761
3834
  }
3835
+ function invalidatePendingSetRef(rawRef) {
3836
+ const pendingSetRef = pendingSetRefMap.get(rawRef);
3837
+ if (pendingSetRef) {
3838
+ pendingSetRef.flags |= 8;
3839
+ pendingSetRefMap.delete(rawRef);
3840
+ }
3841
+ }
3762
3842
 
3763
3843
  let hasLoggedMismatchError = false;
3764
3844
  const logMismatchError = () => {
@@ -4000,6 +4080,8 @@ function createHydrationFunctions(rendererInternals) {
4000
4080
  ) && parentComponent && parentComponent.vnode.props && parentComponent.vnode.props.appear;
4001
4081
  const content = el.content.firstChild;
4002
4082
  if (needCallTransitionHooks) {
4083
+ const cls = content.getAttribute("class");
4084
+ if (cls) content.$cls = cls;
4003
4085
  transition.beforeEnter(content);
4004
4086
  }
4005
4087
  replaceNode(content, el, parentComponent);
@@ -4252,7 +4334,12 @@ function propHasMismatch(el, key, clientValue, vnode, instance) {
4252
4334
  let actual;
4253
4335
  let expected;
4254
4336
  if (key === "class") {
4255
- actual = el.getAttribute("class");
4337
+ if (el.$cls) {
4338
+ actual = el.$cls;
4339
+ delete el.$cls;
4340
+ } else {
4341
+ actual = el.getAttribute("class");
4342
+ }
4256
4343
  expected = normalizeClass(clientValue);
4257
4344
  if (!isSetEqual(toClassSet(actual || ""), toClassSet(expected))) {
4258
4345
  mismatchType = 2 /* CLASS */;
@@ -4356,10 +4443,8 @@ function resolveCssVars(instance, vnode, expectedMap) {
4356
4443
  if (instance.getCssVars && (vnode === root || root && root.type === Fragment && root.children.includes(vnode))) {
4357
4444
  const cssVars = instance.getCssVars();
4358
4445
  for (const key in cssVars) {
4359
- expectedMap.set(
4360
- `--${getEscapedCssVarName(key)}`,
4361
- String(cssVars[key])
4362
- );
4446
+ const value = normalizeCssVarValue(cssVars[key]);
4447
+ expectedMap.set(`--${getEscapedCssVarName(key)}`, value);
4363
4448
  }
4364
4449
  }
4365
4450
  if (vnode === root && instance.parent) {
@@ -4390,7 +4475,7 @@ function isMismatchAllowed(el, allowedType) {
4390
4475
  if (allowedType === 0 /* TEXT */ && list.includes("children")) {
4391
4476
  return true;
4392
4477
  }
4393
- return allowedAttr.split(",").includes(MismatchTypeString[allowedType]);
4478
+ return list.includes(MismatchTypeString[allowedType]);
4394
4479
  }
4395
4480
  }
4396
4481
 
@@ -4486,7 +4571,6 @@ function forEachElement(node, cb) {
4486
4571
  }
4487
4572
 
4488
4573
  const isAsyncWrapper = (i) => !!i.type.__asyncLoader;
4489
- /*! #__NO_SIDE_EFFECTS__ */
4490
4574
  // @__NO_SIDE_EFFECTS__
4491
4575
  function defineAsyncComponent(source) {
4492
4576
  if (isFunction(source)) {
@@ -4547,15 +4631,28 @@ function defineAsyncComponent(source) {
4547
4631
  name: "AsyncComponentWrapper",
4548
4632
  __asyncLoader: load,
4549
4633
  __asyncHydrate(el, instance, hydrate) {
4634
+ let patched = false;
4635
+ (instance.bu || (instance.bu = [])).push(() => patched = true);
4636
+ const performHydrate = () => {
4637
+ if (patched) {
4638
+ {
4639
+ warn$1(
4640
+ `Skipping lazy hydration for component '${getComponentName(resolvedComp) || resolvedComp.__file}': it was updated before lazy hydration performed.`
4641
+ );
4642
+ }
4643
+ return;
4644
+ }
4645
+ hydrate();
4646
+ };
4550
4647
  const doHydrate = hydrateStrategy ? () => {
4551
4648
  const teardown = hydrateStrategy(
4552
- hydrate,
4649
+ performHydrate,
4553
4650
  (cb) => forEachElement(el, cb)
4554
4651
  );
4555
4652
  if (teardown) {
4556
4653
  (instance.bum || (instance.bum = [])).push(teardown);
4557
4654
  }
4558
- } : hydrate;
4655
+ } : performHydrate;
4559
4656
  if (resolvedComp) {
4560
4657
  doHydrate();
4561
4658
  } else {
@@ -4724,6 +4821,9 @@ const KeepAliveImpl = {
4724
4821
  {
4725
4822
  devtoolsComponentAdded(instance2);
4726
4823
  }
4824
+ {
4825
+ instance2.__keepAliveStorageContainer = storageContainer;
4826
+ }
4727
4827
  };
4728
4828
  function unmount(vnode) {
4729
4829
  resetShapeFlag(vnode);
@@ -4811,7 +4911,7 @@ const KeepAliveImpl = {
4811
4911
  );
4812
4912
  const { include, exclude, max } = props;
4813
4913
  if (include && (!name || !matches(include, name)) || exclude && name && matches(exclude, name)) {
4814
- vnode.shapeFlag &= ~256;
4914
+ vnode.shapeFlag &= -257;
4815
4915
  current = vnode;
4816
4916
  return rawVNode;
4817
4917
  }
@@ -4898,8 +4998,8 @@ function injectToKeepAliveRoot(hook, type, target, keepAliveRoot) {
4898
4998
  }, target);
4899
4999
  }
4900
5000
  function resetShapeFlag(vnode) {
4901
- vnode.shapeFlag &= ~256;
4902
- vnode.shapeFlag &= ~512;
5001
+ vnode.shapeFlag &= -257;
5002
+ vnode.shapeFlag &= -513;
4903
5003
  }
4904
5004
  function getInnerChild(vnode) {
4905
5005
  return vnode.shapeFlag & 128 ? vnode.ssContent : vnode;
@@ -5014,14 +5114,16 @@ function renderList(source, renderItem, cache, index) {
5014
5114
  if (sourceIsArray || isString(source)) {
5015
5115
  const sourceIsReactiveArray = sourceIsArray && isReactive(source);
5016
5116
  let needsWrap = false;
5117
+ let isReadonlySource = false;
5017
5118
  if (sourceIsReactiveArray) {
5018
5119
  needsWrap = !isShallow(source);
5120
+ isReadonlySource = isReadonly(source);
5019
5121
  source = shallowReadArray(source);
5020
5122
  }
5021
5123
  ret = new Array(source.length);
5022
5124
  for (let i = 0, l = source.length; i < l; i++) {
5023
5125
  ret[i] = renderItem(
5024
- needsWrap ? toReactive(source[i]) : source[i],
5126
+ needsWrap ? isReadonlySource ? toReadonly(toReactive(source[i])) : toReactive(source[i]) : source[i],
5025
5127
  i,
5026
5128
  void 0,
5027
5129
  cached && cached[i]
@@ -5078,12 +5180,13 @@ function createSlots(slots, dynamicSlots) {
5078
5180
 
5079
5181
  function renderSlot(slots, name, props = {}, fallback, noSlotted) {
5080
5182
  if (currentRenderingInstance.ce || currentRenderingInstance.parent && isAsyncWrapper(currentRenderingInstance.parent) && currentRenderingInstance.parent.ce) {
5183
+ const hasProps = Object.keys(props).length > 0;
5081
5184
  if (name !== "default") props.name = name;
5082
5185
  return openBlock(), createBlock(
5083
5186
  Fragment,
5084
5187
  null,
5085
5188
  [createVNode("slot", props, fallback && fallback())],
5086
- 64
5189
+ hasProps ? -2 : 64
5087
5190
  );
5088
5191
  }
5089
5192
  let slot = slots[name];
@@ -5288,10 +5391,10 @@ const PublicInstanceProxyHandlers = {
5288
5391
  return true;
5289
5392
  },
5290
5393
  has({
5291
- _: { data, setupState, accessCache, ctx, appContext, propsOptions }
5394
+ _: { data, setupState, accessCache, ctx, appContext, propsOptions, type }
5292
5395
  }, key) {
5293
- let normalizedProps;
5294
- 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);
5396
+ let normalizedProps, cssModules;
5397
+ 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]);
5295
5398
  },
5296
5399
  defineProperty(target, key, descriptor) {
5297
5400
  if (descriptor.get != null) {
@@ -5429,15 +5532,15 @@ function withDefaults(props, defaults) {
5429
5532
  return null;
5430
5533
  }
5431
5534
  function useSlots() {
5432
- return getContext().slots;
5535
+ return getContext("useSlots").slots;
5433
5536
  }
5434
5537
  function useAttrs() {
5435
- return getContext().attrs;
5538
+ return getContext("useAttrs").attrs;
5436
5539
  }
5437
- function getContext() {
5540
+ function getContext(calledFunctionName) {
5438
5541
  const i = getCurrentInstance();
5439
5542
  if (!i) {
5440
- warn$1(`useContext() called without active instance.`);
5543
+ warn$1(`${calledFunctionName}() called without active instance.`);
5441
5544
  }
5442
5545
  return i.setupContext || (i.setupContext = createSetupContext(i));
5443
5546
  }
@@ -5688,7 +5791,8 @@ function applyOptions(instance) {
5688
5791
  expose.forEach((key) => {
5689
5792
  Object.defineProperty(exposed, key, {
5690
5793
  get: () => publicThis[key],
5691
- set: (val) => publicThis[key] = val
5794
+ set: (val) => publicThis[key] = val,
5795
+ enumerable: true
5692
5796
  });
5693
5797
  });
5694
5798
  } else if (!instance.exposed) {
@@ -6043,11 +6147,9 @@ function createAppAPI(render, hydrate) {
6043
6147
  }
6044
6148
  {
6045
6149
  context.reload = () => {
6046
- render(
6047
- cloneVNode(vnode),
6048
- rootContainer,
6049
- namespace
6050
- );
6150
+ const cloned = cloneVNode(vnode);
6151
+ cloned.el = null;
6152
+ render(cloned, rootContainer, namespace);
6051
6153
  };
6052
6154
  }
6053
6155
  if (isHydrate && hydrate) {
@@ -6097,9 +6199,15 @@ If you want to remount the same app, move your app creation logic into a factory
6097
6199
  },
6098
6200
  provide(key, value) {
6099
6201
  if (key in context.provides) {
6100
- warn$1(
6101
- `App already provides property with key "${String(key)}". It will be overwritten with the new value.`
6102
- );
6202
+ if (hasOwn(context.provides, key)) {
6203
+ warn$1(
6204
+ `App already provides property with key "${String(key)}". It will be overwritten with the new value.`
6205
+ );
6206
+ } else {
6207
+ warn$1(
6208
+ `App already provides property with key "${String(key)}" inherited from its parent element. It will be overwritten with the new value.`
6209
+ );
6210
+ }
6103
6211
  }
6104
6212
  context.provides[key] = value;
6105
6213
  return app;
@@ -6134,9 +6242,9 @@ function provide(key, value) {
6134
6242
  }
6135
6243
  }
6136
6244
  function inject(key, defaultValue, treatDefaultAsFactory = false) {
6137
- const instance = currentInstance || currentRenderingInstance;
6245
+ const instance = getCurrentInstance();
6138
6246
  if (instance || currentApp) {
6139
- const provides = currentApp ? currentApp._context.provides : instance ? instance.parent == null ? instance.vnode.appContext && instance.vnode.appContext.provides : instance.parent.provides : void 0;
6247
+ let provides = currentApp ? currentApp._context.provides : instance ? instance.parent == null || instance.ce ? instance.vnode.appContext && instance.vnode.appContext.provides : instance.parent.provides : void 0;
6140
6248
  if (provides && key in provides) {
6141
6249
  return provides[key];
6142
6250
  } else if (arguments.length > 1) {
@@ -6149,7 +6257,7 @@ function inject(key, defaultValue, treatDefaultAsFactory = false) {
6149
6257
  }
6150
6258
  }
6151
6259
  function hasInjectionContext() {
6152
- return !!(currentInstance || currentRenderingInstance || currentApp);
6260
+ return !!(getCurrentInstance() || currentApp);
6153
6261
  }
6154
6262
 
6155
6263
  const internalObjectProto = {};
@@ -6563,14 +6671,14 @@ function isBoolean(...args) {
6563
6671
  return args.some((elem) => elem.toLowerCase() === "boolean");
6564
6672
  }
6565
6673
 
6566
- const isInternalKey = (key) => key[0] === "_" || key === "$stable";
6674
+ const isInternalKey = (key) => key === "_" || key === "_ctx" || key === "$stable";
6567
6675
  const normalizeSlotValue = (value) => isArray(value) ? value.map(normalizeVNode) : [normalizeVNode(value)];
6568
6676
  const normalizeSlot = (key, rawSlot, ctx) => {
6569
6677
  if (rawSlot._n) {
6570
6678
  return rawSlot;
6571
6679
  }
6572
6680
  const normalized = withCtx((...args) => {
6573
- if (currentInstance && (!ctx || ctx.root === currentInstance.root)) {
6681
+ if (currentInstance && !(ctx === null && currentRenderingInstance) && !(ctx && ctx.root !== currentInstance.root)) {
6574
6682
  warn$1(
6575
6683
  `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.`
6576
6684
  );
@@ -6609,7 +6717,7 @@ const normalizeVNodeSlots = (instance, children) => {
6609
6717
  };
6610
6718
  const assignSlots = (slots, children, optimized) => {
6611
6719
  for (const key in children) {
6612
- if (optimized || key !== "_") {
6720
+ if (optimized || !isInternalKey(key)) {
6613
6721
  slots[key] = children[key];
6614
6722
  }
6615
6723
  }
@@ -6677,12 +6785,10 @@ function endMeasure(instance, type) {
6677
6785
  if (instance.appContext.config.performance && isSupported()) {
6678
6786
  const startTag = `vue-${type}-${instance.uid}`;
6679
6787
  const endTag = startTag + `:end`;
6788
+ const measureName = `<${formatComponentName(instance, instance.type)}> ${type}`;
6680
6789
  perf.mark(endTag);
6681
- perf.measure(
6682
- `<${formatComponentName(instance, instance.type)}> ${type}`,
6683
- startTag,
6684
- endTag
6685
- );
6790
+ perf.measure(measureName, startTag, endTag);
6791
+ perf.clearMeasures(measureName);
6686
6792
  perf.clearMarks(startTag);
6687
6793
  perf.clearMarks(endTag);
6688
6794
  }
@@ -6828,6 +6934,8 @@ function baseCreateRenderer(options, createHydrationFns) {
6828
6934
  }
6829
6935
  if (ref != null && parentComponent) {
6830
6936
  setRef(ref, n1 && n1.ref, parentSuspense, n2 || n1, !n2);
6937
+ } else if (ref == null && n1 && n1.ref != null) {
6938
+ setRef(n1.ref, null, parentSuspense, n1, true);
6831
6939
  }
6832
6940
  };
6833
6941
  const processText = (n1, n2, container, anchor) => {
@@ -7133,7 +7241,7 @@ function baseCreateRenderer(options, createHydrationFns) {
7133
7241
  (oldVNode.type === Fragment || // - In the case of different nodes, there is going to be a replacement
7134
7242
  // which also requires the correct parent container
7135
7243
  !isSameVNodeType(oldVNode, newVNode) || // - In the case of a component, it could contain anything.
7136
- oldVNode.shapeFlag & (6 | 64)) ? hostParentNode(oldVNode.el) : (
7244
+ oldVNode.shapeFlag & (6 | 64 | 128)) ? hostParentNode(oldVNode.el) : (
7137
7245
  // In other cases, the parent container is not actually used so we
7138
7246
  // just pass the block element here to avoid a DOM parentNode call.
7139
7247
  fallbackContainer
@@ -7295,12 +7403,13 @@ function baseCreateRenderer(options, createHydrationFns) {
7295
7403
  endMeasure(instance, `init`);
7296
7404
  }
7297
7405
  }
7406
+ if (isHmrUpdating) initialVNode.el = null;
7298
7407
  if (instance.asyncDep) {
7299
- if (isHmrUpdating) initialVNode.el = null;
7300
7408
  parentSuspense && parentSuspense.registerDep(instance, setupRenderEffect, optimized);
7301
7409
  if (!initialVNode.el) {
7302
7410
  const placeholder = instance.subTree = createVNode(Comment);
7303
7411
  processCommentNode(null, placeholder, container, anchor);
7412
+ initialVNode.placeholder = placeholder.el;
7304
7413
  }
7305
7414
  } else {
7306
7415
  setupRenderEffect(
@@ -7387,7 +7496,8 @@ function baseCreateRenderer(options, createHydrationFns) {
7387
7496
  hydrateSubTree();
7388
7497
  }
7389
7498
  } else {
7390
- if (root.ce) {
7499
+ if (root.ce && // @ts-expect-error _def is private
7500
+ root.ce._def.shadowRoot !== false) {
7391
7501
  root.ce._injectChildStyle(type);
7392
7502
  }
7393
7503
  {
@@ -7801,7 +7911,11 @@ function baseCreateRenderer(options, createHydrationFns) {
7801
7911
  for (i = toBePatched - 1; i >= 0; i--) {
7802
7912
  const nextIndex = s2 + i;
7803
7913
  const nextChild = c2[nextIndex];
7804
- const anchor = nextIndex + 1 < l2 ? c2[nextIndex + 1].el : parentAnchor;
7914
+ const anchorVNode = c2[nextIndex + 1];
7915
+ const anchor = nextIndex + 1 < l2 ? (
7916
+ // #13559, fallback to el placeholder for unresolved async component
7917
+ anchorVNode.el || anchorVNode.placeholder
7918
+ ) : parentAnchor;
7805
7919
  if (newIndexToOldIndexMap[i] === 0) {
7806
7920
  patch(
7807
7921
  null,
@@ -7858,8 +7972,20 @@ function baseCreateRenderer(options, createHydrationFns) {
7858
7972
  queuePostRenderEffect(() => transition.enter(el), parentSuspense);
7859
7973
  } else {
7860
7974
  const { leave, delayLeave, afterLeave } = transition;
7861
- const remove2 = () => hostInsert(el, container, anchor);
7975
+ const remove2 = () => {
7976
+ if (vnode.ctx.isUnmounted) {
7977
+ hostRemove(el);
7978
+ } else {
7979
+ hostInsert(el, container, anchor);
7980
+ }
7981
+ };
7862
7982
  const performLeave = () => {
7983
+ if (el._isLeaving) {
7984
+ el[leaveCbKey](
7985
+ true
7986
+ /* cancelled */
7987
+ );
7988
+ }
7863
7989
  leave(el, () => {
7864
7990
  remove2();
7865
7991
  afterLeave && afterLeave();
@@ -7891,7 +8017,9 @@ function baseCreateRenderer(options, createHydrationFns) {
7891
8017
  optimized = false;
7892
8018
  }
7893
8019
  if (ref != null) {
8020
+ pauseTracking();
7894
8021
  setRef(ref, null, parentSuspense, vnode, true);
8022
+ resetTracking();
7895
8023
  }
7896
8024
  if (cacheIndex != null) {
7897
8025
  parentComponent.renderCache[cacheIndex] = void 0;
@@ -8020,12 +8148,6 @@ function baseCreateRenderer(options, createHydrationFns) {
8020
8148
  queuePostRenderEffect(() => {
8021
8149
  instance.isUnmounted = true;
8022
8150
  }, parentSuspense);
8023
- if (parentSuspense && parentSuspense.pendingBranch && !parentSuspense.isUnmounted && instance.asyncDep && !instance.asyncResolved && instance.suspenseId === parentSuspense.pendingId) {
8024
- parentSuspense.deps--;
8025
- if (parentSuspense.deps === 0) {
8026
- parentSuspense.resolve();
8027
- }
8028
- }
8029
8151
  {
8030
8152
  devtoolsComponentRemoved(instance);
8031
8153
  }
@@ -8104,8 +8226,8 @@ function toggleRecurse({ effect, job }, allowed) {
8104
8226
  effect.flags |= 32;
8105
8227
  job.flags |= 4;
8106
8228
  } else {
8107
- effect.flags &= ~32;
8108
- job.flags &= ~4;
8229
+ effect.flags &= -33;
8230
+ job.flags &= -5;
8109
8231
  }
8110
8232
  }
8111
8233
  function needTransition(parentSuspense, transition) {
@@ -8126,12 +8248,16 @@ function traverseStaticChildren(n1, n2, shallow = false) {
8126
8248
  if (!shallow && c2.patchFlag !== -2)
8127
8249
  traverseStaticChildren(c1, c2);
8128
8250
  }
8129
- if (c2.type === Text) {
8251
+ if (c2.type === Text && // avoid cached text nodes retaining detached dom nodes
8252
+ c2.patchFlag !== -1) {
8130
8253
  c2.el = c1.el;
8131
8254
  }
8132
8255
  if (c2.type === Comment && !c2.el) {
8133
8256
  c2.el = c1.el;
8134
8257
  }
8258
+ {
8259
+ c2.el && (c2.el.__vnode = c2);
8260
+ }
8135
8261
  }
8136
8262
  }
8137
8263
  }
@@ -8483,8 +8609,9 @@ function emit(instance, event, ...rawArgs) {
8483
8609
  );
8484
8610
  }
8485
8611
  }
8612
+ const mixinEmitsCache = /* @__PURE__ */ new WeakMap();
8486
8613
  function normalizeEmitsOptions(comp, appContext, asMixin = false) {
8487
- const cache = appContext.emitsCache;
8614
+ const cache = asMixin ? mixinEmitsCache : appContext.emitsCache;
8488
8615
  const cached = cache.get(comp);
8489
8616
  if (cached !== void 0) {
8490
8617
  return cached;
@@ -8932,7 +9059,7 @@ function patchSuspense(n1, n2, container, anchor, parentComponent, namespace, sl
8932
9059
  const { activeBranch, pendingBranch, isInFallback, isHydrating } = suspense;
8933
9060
  if (pendingBranch) {
8934
9061
  suspense.pendingBranch = newBranch;
8935
- if (isSameVNodeType(newBranch, pendingBranch)) {
9062
+ if (isSameVNodeType(pendingBranch, newBranch)) {
8936
9063
  patch(
8937
9064
  pendingBranch,
8938
9065
  newBranch,
@@ -9003,7 +9130,7 @@ function patchSuspense(n1, n2, container, anchor, parentComponent, namespace, sl
9003
9130
  );
9004
9131
  setActiveBranch(suspense, newFallback);
9005
9132
  }
9006
- } else if (activeBranch && isSameVNodeType(newBranch, activeBranch)) {
9133
+ } else if (activeBranch && isSameVNodeType(activeBranch, newBranch)) {
9007
9134
  patch(
9008
9135
  activeBranch,
9009
9136
  newBranch,
@@ -9034,7 +9161,7 @@ function patchSuspense(n1, n2, container, anchor, parentComponent, namespace, sl
9034
9161
  }
9035
9162
  }
9036
9163
  } else {
9037
- if (activeBranch && isSameVNodeType(newBranch, activeBranch)) {
9164
+ if (activeBranch && isSameVNodeType(activeBranch, newBranch)) {
9038
9165
  patch(
9039
9166
  activeBranch,
9040
9167
  newBranch,
@@ -9477,8 +9604,8 @@ function isSameVNodeType(n1, n2) {
9477
9604
  if (n2.shapeFlag & 6 && n1.component) {
9478
9605
  const dirtyInstances = hmrDirtyComponents.get(n2.type);
9479
9606
  if (dirtyInstances && dirtyInstances.has(n1.component)) {
9480
- n1.shapeFlag &= ~256;
9481
- n2.shapeFlag &= ~512;
9607
+ n1.shapeFlag &= -257;
9608
+ n2.shapeFlag &= -513;
9482
9609
  return false;
9483
9610
  }
9484
9611
  }
@@ -9668,6 +9795,7 @@ function cloneVNode(vnode, extraProps, mergeRef = false, cloneTransition = false
9668
9795
  suspense: vnode.suspense,
9669
9796
  ssContent: vnode.ssContent && cloneVNode(vnode.ssContent),
9670
9797
  ssFallback: vnode.ssFallback && cloneVNode(vnode.ssFallback),
9798
+ placeholder: vnode.placeholder,
9671
9799
  el: vnode.el,
9672
9800
  anchor: vnode.anchor,
9673
9801
  ctx: vnode.ctx,
@@ -9939,7 +10067,7 @@ function setupComponent(instance, isSSR = false, optimized = false) {
9939
10067
  const { props, children } = instance.vnode;
9940
10068
  const isStateful = isStatefulComponent(instance);
9941
10069
  initProps(instance, props, isStateful, isSSR);
9942
- initSlots(instance, children, optimized);
10070
+ initSlots(instance, children, optimized || isSSR);
9943
10071
  const setupResult = isStateful ? setupStatefulComponent(instance, isSSR) : void 0;
9944
10072
  isSSR && setInSSRSetupState(false);
9945
10073
  return setupResult;
@@ -10190,7 +10318,7 @@ function getComponentPublicInstance(instance) {
10190
10318
  return instance.proxy;
10191
10319
  }
10192
10320
  }
10193
- const classifyRE = /(?:^|[-_])(\w)/g;
10321
+ const classifyRE = /(?:^|[-_])\w/g;
10194
10322
  const classify = (str) => str.replace(classifyRE, (c) => c.toUpperCase()).replace(/[-_]/g, "");
10195
10323
  function getComponentName(Component, includeInferred = true) {
10196
10324
  return isFunction(Component) ? Component.displayName || Component.name : Component.name || includeInferred && Component.__name;
@@ -10233,23 +10361,28 @@ const computed = (getterOrOptions, debugOptions) => {
10233
10361
  };
10234
10362
 
10235
10363
  function h(type, propsOrChildren, children) {
10236
- const l = arguments.length;
10237
- if (l === 2) {
10238
- if (isObject(propsOrChildren) && !isArray(propsOrChildren)) {
10239
- if (isVNode(propsOrChildren)) {
10240
- return createVNode(type, null, [propsOrChildren]);
10364
+ try {
10365
+ setBlockTracking(-1);
10366
+ const l = arguments.length;
10367
+ if (l === 2) {
10368
+ if (isObject(propsOrChildren) && !isArray(propsOrChildren)) {
10369
+ if (isVNode(propsOrChildren)) {
10370
+ return createVNode(type, null, [propsOrChildren]);
10371
+ }
10372
+ return createVNode(type, propsOrChildren);
10373
+ } else {
10374
+ return createVNode(type, null, propsOrChildren);
10241
10375
  }
10242
- return createVNode(type, propsOrChildren);
10243
10376
  } else {
10244
- return createVNode(type, null, propsOrChildren);
10245
- }
10246
- } else {
10247
- if (l > 3) {
10248
- children = Array.prototype.slice.call(arguments, 2);
10249
- } else if (l === 3 && isVNode(children)) {
10250
- children = [children];
10377
+ if (l > 3) {
10378
+ children = Array.prototype.slice.call(arguments, 2);
10379
+ } else if (l === 3 && isVNode(children)) {
10380
+ children = [children];
10381
+ }
10382
+ return createVNode(type, propsOrChildren, children);
10251
10383
  }
10252
- return createVNode(type, propsOrChildren, children);
10384
+ } finally {
10385
+ setBlockTracking(1);
10253
10386
  }
10254
10387
  }
10255
10388
 
@@ -10270,13 +10403,15 @@ function initCustomFormatter() {
10270
10403
  if (obj.__isVue) {
10271
10404
  return ["div", vueStyle, `VueInstance`];
10272
10405
  } else if (isRef(obj)) {
10406
+ pauseTracking();
10407
+ const value = obj.value;
10408
+ resetTracking();
10273
10409
  return [
10274
10410
  "div",
10275
10411
  {},
10276
10412
  ["span", vueStyle, genRefFlag(obj)],
10277
10413
  "<",
10278
- // avoid debugger accessing value affecting behavior
10279
- formatValue("_value" in obj ? obj._value : obj),
10414
+ formatValue(value),
10280
10415
  `>`
10281
10416
  ];
10282
10417
  } else if (isReactive(obj)) {
@@ -10457,7 +10592,7 @@ function isMemoSame(cached, memo) {
10457
10592
  return true;
10458
10593
  }
10459
10594
 
10460
- const version = "3.5.13";
10595
+ const version = "3.5.22";
10461
10596
  const warn = warn$1 ;
10462
10597
  const ErrorTypeStrings = ErrorTypeStrings$1 ;
10463
10598
  const devtools = devtools$1 ;
@@ -10686,11 +10821,11 @@ function resolveTransitionProps(rawProps) {
10686
10821
  const resolve = () => finishLeave(el, done);
10687
10822
  addTransitionClass(el, leaveFromClass);
10688
10823
  if (!el._enterCancelled) {
10689
- forceReflow();
10824
+ forceReflow(el);
10690
10825
  addTransitionClass(el, leaveActiveClass);
10691
10826
  } else {
10692
10827
  addTransitionClass(el, leaveActiveClass);
10693
- forceReflow();
10828
+ forceReflow(el);
10694
10829
  }
10695
10830
  nextFrame(() => {
10696
10831
  if (!el._isLeaving) {
@@ -10816,7 +10951,7 @@ function getTransitionInfo(el, expectedType) {
10816
10951
  type = timeout > 0 ? transitionTimeout > animationTimeout ? TRANSITION : ANIMATION : null;
10817
10952
  propCount = type ? type === TRANSITION ? transitionDurations.length : animationDurations.length : 0;
10818
10953
  }
10819
- const hasTransform = type === TRANSITION && /\b(transform|all)(,|$)/.test(
10954
+ const hasTransform = type === TRANSITION && /\b(?:transform|all)(?:,|$)/.test(
10820
10955
  getStyleProperties(`${TRANSITION}Property`).toString()
10821
10956
  );
10822
10957
  return {
@@ -10836,8 +10971,9 @@ function toMs(s) {
10836
10971
  if (s === "auto") return 0;
10837
10972
  return Number(s.slice(0, -1).replace(",", ".")) * 1e3;
10838
10973
  }
10839
- function forceReflow() {
10840
- return document.body.offsetHeight;
10974
+ function forceReflow(el) {
10975
+ const targetDocument = el ? el.ownerDocument : document;
10976
+ return targetDocument.body.offsetHeight;
10841
10977
  }
10842
10978
 
10843
10979
  function patchClass(el, value, isSVG) {
@@ -10857,6 +10993,8 @@ function patchClass(el, value, isSVG) {
10857
10993
  const vShowOriginalDisplay = Symbol("_vod");
10858
10994
  const vShowHidden = Symbol("_vsh");
10859
10995
  const vShow = {
10996
+ // used for prop mismatch check during hydration
10997
+ name: "show",
10860
10998
  beforeMount(el, { value }, { transition }) {
10861
10999
  el[vShowOriginalDisplay] = el.style.display === "none" ? "" : el.style.display;
10862
11000
  if (transition && value) {
@@ -10890,9 +11028,6 @@ const vShow = {
10890
11028
  setDisplay(el, value);
10891
11029
  }
10892
11030
  };
10893
- {
10894
- vShow.name = "show";
10895
- }
10896
11031
  function setDisplay(el, value) {
10897
11032
  el.style.display = value ? el[vShowOriginalDisplay] : "none";
10898
11033
  el[vShowHidden] = !value;
@@ -10970,14 +11105,15 @@ function setVarsOnNode(el, vars) {
10970
11105
  const style = el.style;
10971
11106
  let cssText = "";
10972
11107
  for (const key in vars) {
10973
- style.setProperty(`--${key}`, vars[key]);
10974
- cssText += `--${key}: ${vars[key]};`;
11108
+ const value = normalizeCssVarValue(vars[key]);
11109
+ style.setProperty(`--${key}`, value);
11110
+ cssText += `--${key}: ${value};`;
10975
11111
  }
10976
11112
  style[CSS_VAR_TEXT] = cssText;
10977
11113
  }
10978
11114
  }
10979
11115
 
10980
- const displayRE = /(^|;)\s*display\s*:/;
11116
+ const displayRE = /(?:^|;)\s*display\s*:/;
10981
11117
  function patchStyle(el, prev, next) {
10982
11118
  const style = el.style;
10983
11119
  const isCssString = isString(next);
@@ -11275,7 +11411,7 @@ function shouldSetAsProp(el, key, value, isSVG) {
11275
11411
  }
11276
11412
  return false;
11277
11413
  }
11278
- if (key === "spellcheck" || key === "draggable" || key === "translate") {
11414
+ if (key === "spellcheck" || key === "draggable" || key === "translate" || key === "autocorrect") {
11279
11415
  return false;
11280
11416
  }
11281
11417
  if (key === "form") {
@@ -11300,11 +11436,10 @@ function shouldSetAsProp(el, key, value, isSVG) {
11300
11436
  }
11301
11437
 
11302
11438
  const REMOVAL = {};
11303
- /*! #__NO_SIDE_EFFECTS__ */
11304
11439
  // @__NO_SIDE_EFFECTS__
11305
11440
  function defineCustomElement(options, extraOptions, _createApp) {
11306
- const Comp = defineComponent(options, extraOptions);
11307
- if (isPlainObject(Comp)) extend(Comp, extraOptions);
11441
+ let Comp = defineComponent(options, extraOptions);
11442
+ if (isPlainObject(Comp)) Comp = extend({}, Comp, extraOptions);
11308
11443
  class VueCustomElement extends VueElement {
11309
11444
  constructor(initialProps) {
11310
11445
  super(Comp, initialProps, _createApp);
@@ -11313,10 +11448,9 @@ function defineCustomElement(options, extraOptions, _createApp) {
11313
11448
  VueCustomElement.def = Comp;
11314
11449
  return VueCustomElement;
11315
11450
  }
11316
- /*! #__NO_SIDE_EFFECTS__ */
11317
- const defineSSRCustomElement = /* @__NO_SIDE_EFFECTS__ */ (options, extraOptions) => {
11451
+ const defineSSRCustomElement = (/* @__NO_SIDE_EFFECTS__ */ (options, extraOptions) => {
11318
11452
  return /* @__PURE__ */ defineCustomElement(options, extraOptions, createSSRApp);
11319
- };
11453
+ });
11320
11454
  const BaseClass = typeof HTMLElement !== "undefined" ? HTMLElement : class {
11321
11455
  };
11322
11456
  class VueElement extends BaseClass {
@@ -11352,19 +11486,20 @@ class VueElement extends BaseClass {
11352
11486
  );
11353
11487
  }
11354
11488
  if (_def.shadowRoot !== false) {
11355
- this.attachShadow({ mode: "open" });
11489
+ this.attachShadow(
11490
+ extend({}, _def.shadowRootOptions, {
11491
+ mode: "open"
11492
+ })
11493
+ );
11356
11494
  this._root = this.shadowRoot;
11357
11495
  } else {
11358
11496
  this._root = this;
11359
11497
  }
11360
11498
  }
11361
- if (!this._def.__asyncLoader) {
11362
- this._resolveProps(this._def);
11363
- }
11364
11499
  }
11365
11500
  connectedCallback() {
11366
11501
  if (!this.isConnected) return;
11367
- if (!this.shadowRoot) {
11502
+ if (!this.shadowRoot && !this._resolved) {
11368
11503
  this._parseSlots();
11369
11504
  }
11370
11505
  this._connected = true;
@@ -11377,8 +11512,7 @@ class VueElement extends BaseClass {
11377
11512
  }
11378
11513
  if (!this._instance) {
11379
11514
  if (this._resolved) {
11380
- this._setParent();
11381
- this._update();
11515
+ this._mount(this._def);
11382
11516
  } else {
11383
11517
  if (parent && parent._pendingResolve) {
11384
11518
  this._pendingResolve = parent._pendingResolve.then(() => {
@@ -11394,7 +11528,15 @@ class VueElement extends BaseClass {
11394
11528
  _setParent(parent = this._parent) {
11395
11529
  if (parent) {
11396
11530
  this._instance.parent = parent._instance;
11397
- this._instance.provides = parent._instance.provides;
11531
+ this._inheritParentContext(parent);
11532
+ }
11533
+ }
11534
+ _inheritParentContext(parent = this._parent) {
11535
+ if (parent && this._app) {
11536
+ Object.setPrototypeOf(
11537
+ this._app._context.provides,
11538
+ parent._instance.provides
11539
+ );
11398
11540
  }
11399
11541
  }
11400
11542
  disconnectedCallback() {
@@ -11408,9 +11550,18 @@ class VueElement extends BaseClass {
11408
11550
  this._app && this._app.unmount();
11409
11551
  if (this._instance) this._instance.ce = void 0;
11410
11552
  this._app = this._instance = null;
11553
+ if (this._teleportTargets) {
11554
+ this._teleportTargets.clear();
11555
+ this._teleportTargets = void 0;
11556
+ }
11411
11557
  }
11412
11558
  });
11413
11559
  }
11560
+ _processMutations(mutations) {
11561
+ for (const m of mutations) {
11562
+ this._setAttr(m.attributeName);
11563
+ }
11564
+ }
11414
11565
  /**
11415
11566
  * resolve inner component definition (handle possible async component)
11416
11567
  */
@@ -11421,11 +11572,7 @@ class VueElement extends BaseClass {
11421
11572
  for (let i = 0; i < this.attributes.length; i++) {
11422
11573
  this._setAttr(this.attributes[i].name);
11423
11574
  }
11424
- this._ob = new MutationObserver((mutations) => {
11425
- for (const m of mutations) {
11426
- this._setAttr(m.attributeName);
11427
- }
11428
- });
11575
+ this._ob = new MutationObserver(this._processMutations.bind(this));
11429
11576
  this._ob.observe(this, { attributes: true });
11430
11577
  const resolve = (def, isAsync = false) => {
11431
11578
  this._resolved = true;
@@ -11444,9 +11591,7 @@ class VueElement extends BaseClass {
11444
11591
  }
11445
11592
  }
11446
11593
  this._numberProps = numberProps;
11447
- if (isAsync) {
11448
- this._resolveProps(def);
11449
- }
11594
+ this._resolveProps(def);
11450
11595
  if (this.shadowRoot) {
11451
11596
  this._applyStyles(styles);
11452
11597
  } else if (styles) {
@@ -11458,9 +11603,10 @@ class VueElement extends BaseClass {
11458
11603
  };
11459
11604
  const asyncDef = this._def.__asyncLoader;
11460
11605
  if (asyncDef) {
11461
- this._pendingResolve = asyncDef().then(
11462
- (def) => resolve(this._def = def, true)
11463
- );
11606
+ this._pendingResolve = asyncDef().then((def) => {
11607
+ def.configureApp = this._def.configureApp;
11608
+ resolve(this._def = def, true);
11609
+ });
11464
11610
  } else {
11465
11611
  resolve(this._def);
11466
11612
  }
@@ -11470,6 +11616,7 @@ class VueElement extends BaseClass {
11470
11616
  def.name = "VueElement";
11471
11617
  }
11472
11618
  this._app = this._createApp(def);
11619
+ this._inheritParentContext();
11473
11620
  if (def.configureApp) {
11474
11621
  def.configureApp(this._app);
11475
11622
  }
@@ -11541,7 +11688,10 @@ class VueElement extends BaseClass {
11541
11688
  }
11542
11689
  if (shouldReflect) {
11543
11690
  const ob = this._ob;
11544
- ob && ob.disconnect();
11691
+ if (ob) {
11692
+ this._processMutations(ob.takeRecords());
11693
+ ob.disconnect();
11694
+ }
11545
11695
  if (val === true) {
11546
11696
  this.setAttribute(hyphenate(key), "");
11547
11697
  } else if (typeof val === "string" || typeof val === "number") {
@@ -11554,7 +11704,9 @@ class VueElement extends BaseClass {
11554
11704
  }
11555
11705
  }
11556
11706
  _update() {
11557
- render(this._createVNode(), this._root);
11707
+ const vnode = this._createVNode();
11708
+ if (this._app) vnode.appContext = this._app._context;
11709
+ render(vnode, this._root);
11558
11710
  }
11559
11711
  _createVNode() {
11560
11712
  const baseProps = {};
@@ -11643,7 +11795,7 @@ class VueElement extends BaseClass {
11643
11795
  * Only called when shadowRoot is false
11644
11796
  */
11645
11797
  _renderSlots() {
11646
- const outlets = (this._teleportTarget || this).querySelectorAll("slot");
11798
+ const outlets = this._getSlots();
11647
11799
  const scopeId = this._instance.type.__scopeId;
11648
11800
  for (let i = 0; i < outlets.length; i++) {
11649
11801
  const o = outlets[i];
@@ -11669,6 +11821,19 @@ class VueElement extends BaseClass {
11669
11821
  parent.removeChild(o);
11670
11822
  }
11671
11823
  }
11824
+ /**
11825
+ * @internal
11826
+ */
11827
+ _getSlots() {
11828
+ const roots = [this];
11829
+ if (this._teleportTargets) {
11830
+ roots.push(...this._teleportTargets);
11831
+ }
11832
+ return roots.reduce((res, i) => {
11833
+ res.push(...Array.from(i.querySelectorAll("slot")));
11834
+ return res;
11835
+ }, []);
11836
+ }
11672
11837
  /**
11673
11838
  * @internal
11674
11839
  */
@@ -11764,12 +11929,13 @@ const TransitionGroupImpl = /* @__PURE__ */ decorate({
11764
11929
  instance.vnode.el,
11765
11930
  moveClass
11766
11931
  )) {
11932
+ prevChildren = [];
11767
11933
  return;
11768
11934
  }
11769
11935
  prevChildren.forEach(callPendingCbs);
11770
11936
  prevChildren.forEach(recordPosition);
11771
11937
  const movedChildren = prevChildren.filter(applyTranslation);
11772
- forceReflow();
11938
+ forceReflow(instance.vnode.el);
11773
11939
  movedChildren.forEach((c) => {
11774
11940
  const el = c.el;
11775
11941
  const style = el.style;
@@ -11779,7 +11945,7 @@ const TransitionGroupImpl = /* @__PURE__ */ decorate({
11779
11945
  if (e && e.target !== el) {
11780
11946
  return;
11781
11947
  }
11782
- if (!e || /transform$/.test(e.propertyName)) {
11948
+ if (!e || e.propertyName.endsWith("transform")) {
11783
11949
  el.removeEventListener("transitionend", cb);
11784
11950
  el[moveCbKey] = null;
11785
11951
  removeTransitionClass(el, moveClass);
@@ -11787,6 +11953,7 @@ const TransitionGroupImpl = /* @__PURE__ */ decorate({
11787
11953
  };
11788
11954
  el.addEventListener("transitionend", cb);
11789
11955
  });
11956
+ prevChildren = [];
11790
11957
  });
11791
11958
  return () => {
11792
11959
  const rawProps = toRaw(props);
@@ -12169,13 +12336,13 @@ const modifierGuards = {
12169
12336
  const withModifiers = (fn, modifiers) => {
12170
12337
  const cache = fn._withMods || (fn._withMods = {});
12171
12338
  const cacheKey = modifiers.join(".");
12172
- return cache[cacheKey] || (cache[cacheKey] = (event, ...args) => {
12339
+ return cache[cacheKey] || (cache[cacheKey] = ((event, ...args) => {
12173
12340
  for (let i = 0; i < modifiers.length; i++) {
12174
12341
  const guard = modifierGuards[modifiers[i]];
12175
12342
  if (guard && guard(event, modifiers)) return;
12176
12343
  }
12177
12344
  return fn(event, ...args);
12178
- });
12345
+ }));
12179
12346
  };
12180
12347
  const keyNames = {
12181
12348
  esc: "escape",
@@ -12189,7 +12356,7 @@ const keyNames = {
12189
12356
  const withKeys = (fn, modifiers) => {
12190
12357
  const cache = fn._withKeys || (fn._withKeys = {});
12191
12358
  const cacheKey = modifiers.join(".");
12192
- return cache[cacheKey] || (cache[cacheKey] = (event) => {
12359
+ return cache[cacheKey] || (cache[cacheKey] = ((event) => {
12193
12360
  if (!("key" in event)) {
12194
12361
  return;
12195
12362
  }
@@ -12199,7 +12366,7 @@ const withKeys = (fn, modifiers) => {
12199
12366
  )) {
12200
12367
  return fn(event);
12201
12368
  }
12202
- });
12369
+ }));
12203
12370
  };
12204
12371
 
12205
12372
  const rendererOptions = /* @__PURE__ */ extend({ patchProp }, nodeOps);
@@ -12213,13 +12380,13 @@ function ensureHydrationRenderer() {
12213
12380
  enabledHydration = true;
12214
12381
  return renderer;
12215
12382
  }
12216
- const render = (...args) => {
12383
+ const render = ((...args) => {
12217
12384
  ensureRenderer().render(...args);
12218
- };
12219
- const hydrate = (...args) => {
12385
+ });
12386
+ const hydrate = ((...args) => {
12220
12387
  ensureHydrationRenderer().hydrate(...args);
12221
- };
12222
- const createApp = (...args) => {
12388
+ });
12389
+ const createApp = ((...args) => {
12223
12390
  const app = ensureRenderer().createApp(...args);
12224
12391
  {
12225
12392
  injectNativeTagCheck(app);
@@ -12244,8 +12411,8 @@ const createApp = (...args) => {
12244
12411
  return proxy;
12245
12412
  };
12246
12413
  return app;
12247
- };
12248
- const createSSRApp = (...args) => {
12414
+ });
12415
+ const createSSRApp = ((...args) => {
12249
12416
  const app = ensureHydrationRenderer().createApp(...args);
12250
12417
  {
12251
12418
  injectNativeTagCheck(app);
@@ -12259,7 +12426,7 @@ const createSSRApp = (...args) => {
12259
12426
  }
12260
12427
  };
12261
12428
  return app;
12262
- };
12429
+ });
12263
12430
  function resolveRootNamespace(container) {
12264
12431
  if (container instanceof SVGElement) {
12265
12432
  return "svg";