@vue/compat 3.5.43 → 3.5.45

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,5 +1,5 @@
1
1
  /**
2
- * @vue/compat v3.5.43
2
+ * @vue/compat v3.5.45
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
@@ -64,24 +64,20 @@ var Vue = (function () {
64
64
  });
65
65
  };
66
66
  const camelizeRE = /-\w/g;
67
- const camelize = cacheStringFunction(
68
- (str) => {
69
- return str.replace(camelizeRE, (c) => c.slice(1).toUpperCase());
70
- }
71
- );
67
+ const camelize = /* @__PURE__ */ cacheStringFunction((str) => {
68
+ return str.replace(camelizeRE, (c) => c.slice(1).toUpperCase());
69
+ });
72
70
  const hyphenateRE = /\B([A-Z])/g;
73
- const hyphenate = cacheStringFunction(
71
+ const hyphenate = /* @__PURE__ */ cacheStringFunction(
74
72
  (str) => str.replace(hyphenateRE, "-$1").toLowerCase()
75
73
  );
76
- const capitalize = cacheStringFunction((str) => {
74
+ const capitalize = /* @__PURE__ */ cacheStringFunction((str) => {
77
75
  return str.charAt(0).toUpperCase() + str.slice(1);
78
76
  });
79
- const toHandlerKey = cacheStringFunction(
80
- (str) => {
81
- const s = str ? `on${capitalize(str)}` : ``;
82
- return s;
83
- }
84
- );
77
+ const toHandlerKey = /* @__PURE__ */ cacheStringFunction((str) => {
78
+ const s = str ? `on${capitalize(str)}` : ``;
79
+ return s;
80
+ });
85
81
  const hasChanged = (value, oldValue) => !Object.is(value, oldValue);
86
82
  const invokeArrayFns = (fns, ...arg) => {
87
83
  for (let i = 0; i < fns.length; i++) {
@@ -267,7 +263,7 @@ var Vue = (function () {
267
263
  const isMathMLTag = /* @__PURE__ */ makeMap(MATH_TAGS);
268
264
  const isVoidTag = /* @__PURE__ */ makeMap(VOID_TAGS);
269
265
 
270
- const specialBooleanAttrs = `itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly`;
266
+ const specialBooleanAttrs = `itemscope,allowfullscreen,disablepictureinpicture,disableremoteplayback,formnovalidate,ismap,nomodule,novalidate,playsinline,readonly`;
271
267
  const isSpecialBooleanAttr = /* @__PURE__ */ makeMap(specialBooleanAttrs);
272
268
  const isBooleanAttr = /* @__PURE__ */ makeMap(
273
269
  specialBooleanAttrs + `,async,autofocus,autoplay,controls,default,defer,disabled,inert,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected`
@@ -611,7 +607,11 @@ var Vue = (function () {
611
607
  }
612
608
  function onScopeDispose(fn, failSilently = false) {
613
609
  if (activeEffectScope) {
614
- activeEffectScope.cleanups.push(fn);
610
+ if (activeEffectScope.active) {
611
+ activeEffectScope.cleanups.push(fn);
612
+ } else {
613
+ fn();
614
+ }
615
615
  } else if (!failSilently) {
616
616
  warn$2(
617
617
  `onScopeDispose() is called when there is no active effect scope to be associated with.`
@@ -1315,19 +1315,41 @@ var Vue = (function () {
1315
1315
  };
1316
1316
  function iterator(self, method, wrapValue) {
1317
1317
  const arr = shallowReadArray(self);
1318
- const iter = arr[method]();
1318
+ const methodFn = arr[method];
1319
+ const iter = methodFn.call(arr);
1319
1320
  if (arr !== self && !isShallow(self)) {
1320
- iter._next = iter.next;
1321
- iter.next = () => {
1322
- const result = iter._next();
1323
- if (!result.done) {
1324
- result.value = wrapValue(result.value);
1321
+ if (iter[Symbol.toStringTag] === "Array Iterator") {
1322
+ const wrapped = Object.create(Object.getPrototypeOf(iter));
1323
+ wrapped.next = () => wrapResult(iter.next(), wrapValue);
1324
+ if (methodFn !== arrayProto[method]) {
1325
+ Object.defineProperties(wrapped, {
1326
+ return: {
1327
+ get() {
1328
+ const fn = iter.return;
1329
+ return typeof fn === "function" ? fn.bind(iter) : fn;
1330
+ }
1331
+ },
1332
+ throw: {
1333
+ get() {
1334
+ const fn = iter.throw;
1335
+ return typeof fn === "function" ? fn.bind(iter) : fn;
1336
+ }
1337
+ }
1338
+ });
1325
1339
  }
1326
- return result;
1327
- };
1340
+ return wrapped;
1341
+ }
1342
+ iter._next = iter.next;
1343
+ iter.next = () => wrapResult(iter._next(), wrapValue);
1328
1344
  }
1329
1345
  return iter;
1330
1346
  }
1347
+ function wrapResult(result, wrapValue) {
1348
+ if (!result.done) {
1349
+ result.value = wrapValue(result.value);
1350
+ }
1351
+ return result;
1352
+ }
1331
1353
  const arrayProto = Array.prototype;
1332
1354
  function apply(self, method, fn, thisArg, wrappedRetFn, args) {
1333
1355
  const arr = shallowReadArray(self);
@@ -1396,7 +1418,7 @@ var Vue = (function () {
1396
1418
  }
1397
1419
 
1398
1420
  const isNonTrackableKeys = /* @__PURE__ */ makeMap(`__proto__,__v_isRef,__isVue`);
1399
- const builtInSymbols = new Set(
1421
+ const builtInSymbols = /* @__PURE__ */ new Set(
1400
1422
  /* @__PURE__ */ Object.getOwnPropertyNames(Symbol).filter((key) => key !== "arguments" && key !== "caller").map((key) => Symbol[key]).filter(isSymbol)
1401
1423
  );
1402
1424
  function hasOwnProperty(key) {
@@ -1750,6 +1772,8 @@ var Vue = (function () {
1750
1772
  return !isReadonly2;
1751
1773
  } else if (key === "__v_isReadonly") {
1752
1774
  return isReadonly2;
1775
+ } else if (key === "__v_isShallow") {
1776
+ return shallow;
1753
1777
  } else if (key === "__v_raw") {
1754
1778
  return target;
1755
1779
  }
@@ -2295,9 +2319,11 @@ var Vue = (function () {
2295
2319
  if (once && cb) {
2296
2320
  const _cb = cb;
2297
2321
  cb = (...args) => {
2298
- const res = _cb(...args);
2299
- watchHandle();
2300
- return res;
2322
+ try {
2323
+ return _cb(...args);
2324
+ } finally {
2325
+ watchHandle();
2326
+ }
2301
2327
  };
2302
2328
  }
2303
2329
  let oldValue = isMultiSource ? new Array(source.length).fill(INITIAL_WATCHER_VALUE) : INITIAL_WATCHER_VALUE;
@@ -2308,12 +2334,13 @@ var Vue = (function () {
2308
2334
  if (cb) {
2309
2335
  const newValue = effect.run();
2310
2336
  if (immediateFirstRun || deep || forceTrigger || (isMultiSource ? newValue.some((v, i) => hasChanged(v, oldValue[i])) : hasChanged(newValue, oldValue))) {
2311
- if (cleanup) {
2312
- cleanup();
2313
- }
2314
2337
  const currentWatcher = activeWatcher;
2315
- activeWatcher = effect;
2338
+ pauseTracking();
2316
2339
  try {
2340
+ if (cleanup) {
2341
+ cleanup();
2342
+ }
2343
+ activeWatcher = effect;
2317
2344
  const args = [
2318
2345
  newValue,
2319
2346
  // pass undefined as the old value when it's changed for the first time
@@ -2327,6 +2354,7 @@ var Vue = (function () {
2327
2354
  );
2328
2355
  } finally {
2329
2356
  activeWatcher = currentWatcher;
2357
+ resetTracking();
2330
2358
  }
2331
2359
  }
2332
2360
  } else {
@@ -2600,7 +2628,7 @@ var Vue = (function () {
2600
2628
  const res = callWithErrorHandling(fn, instance, type, args);
2601
2629
  if (res && isPromise(res)) {
2602
2630
  res.catch((err) => {
2603
- handleError(err, instance, type);
2631
+ handleError(err, instance, type, void 0, true);
2604
2632
  });
2605
2633
  }
2606
2634
  return res;
@@ -2617,7 +2645,7 @@ var Vue = (function () {
2617
2645
  );
2618
2646
  }
2619
2647
  }
2620
- function handleError(err, instance, type, throwInDev = true) {
2648
+ function handleError(err, instance, type, throwInDev = true, isAsyncError = false) {
2621
2649
  const contextVNode = instance ? instance.vnode : null;
2622
2650
  const { errorHandler, throwUnhandledErrorInProduction } = instance && instance.appContext.config || EMPTY_OBJ;
2623
2651
  if (instance) {
@@ -2626,7 +2654,9 @@ var Vue = (function () {
2626
2654
  const errorInfo = ErrorTypeStrings$1[type] ;
2627
2655
  while (cur) {
2628
2656
  const errorCapturedHooks = cur.ec;
2629
- if (errorCapturedHooks) {
2657
+ if (errorCapturedHooks && !cur.isUnmounted && // Async failures may outlive stopped scopes whose unmount effects
2658
+ // are deferred or discarded by Suspense.
2659
+ (!isAsyncError || cur.scope.active)) {
2630
2660
  for (let i = 0; i < errorCapturedHooks.length; i++) {
2631
2661
  if (errorCapturedHooks[i](err, exposedInstance, errorInfo) === false) {
2632
2662
  return;
@@ -2727,21 +2757,21 @@ var Vue = (function () {
2727
2757
  }
2728
2758
  queueFlush();
2729
2759
  }
2730
- function flushPreFlushCbs(instance, seen, i = flushIndex + 1) {
2760
+ function flushPreFlushCbs(instance, minUid, seen, i = flushIndex + 1) {
2731
2761
  {
2732
2762
  seen = seen || /* @__PURE__ */ new Map();
2733
2763
  }
2734
2764
  for (; i < queue.length; i++) {
2735
2765
  const cb = queue[i];
2736
2766
  if (cb && cb.flags & 2) {
2737
- if (instance && cb.id !== instance.uid) {
2767
+ if (instance && cb.id !== instance.uid || minUid !== void 0 && !(cb.id >= minUid)) {
2738
2768
  continue;
2739
2769
  }
2740
2770
  if (checkRecursiveUpdates(seen, cb)) {
2741
2771
  continue;
2742
2772
  }
2743
2773
  queue.splice(i, 1);
2744
- i--;
2774
+ i = instance ? i - 1 : flushIndex;
2745
2775
  if (cb.flags & 4) {
2746
2776
  cb.flags &= -2;
2747
2777
  }
@@ -2752,12 +2782,23 @@ var Vue = (function () {
2752
2782
  }
2753
2783
  }
2754
2784
  }
2755
- function flushPostFlushCbs(seen) {
2785
+ function flushPostFlushCbs(seen, skip, minUid = 0) {
2756
2786
  if (pendingPostFlushCbs.length) {
2757
- const deduped = [...new Set(pendingPostFlushCbs)].sort(
2758
- (a, b) => getId(a) - getId(b)
2759
- );
2760
- pendingPostFlushCbs.length = 0;
2787
+ let cbs = pendingPostFlushCbs;
2788
+ let kept = 0;
2789
+ if (skip) {
2790
+ cbs = [];
2791
+ for (let i = 0; i < pendingPostFlushCbs.length; i++) {
2792
+ const cb = pendingPostFlushCbs[i];
2793
+ if (cb.i !== void 0 ? !cb.i || cb.i.uid < minUid : skip.has(cb)) {
2794
+ pendingPostFlushCbs[kept++] = cb;
2795
+ } else {
2796
+ cbs.push(cb);
2797
+ }
2798
+ }
2799
+ }
2800
+ const deduped = [...new Set(cbs)].sort((a, b) => getId(a) - getId(b));
2801
+ pendingPostFlushCbs.length = kept;
2761
2802
  if (activePostFlushCbs) {
2762
2803
  for (let i = 0; i < deduped.length; i++) {
2763
2804
  activePostFlushCbs.push(deduped[i]);
@@ -2783,6 +2824,22 @@ var Vue = (function () {
2783
2824
  postFlushIndex = 0;
2784
2825
  }
2785
2826
  }
2827
+ let isFlushing = false;
2828
+ function flushOnAppMount(fn, minUid) {
2829
+ if (isFlushing) {
2830
+ fn();
2831
+ return;
2832
+ }
2833
+ const queued = minUid === void 0 ? void 0 : new Set(pendingPostFlushCbs);
2834
+ fn();
2835
+ isFlushing = true;
2836
+ try {
2837
+ flushPreFlushCbs(void 0, minUid);
2838
+ flushPostFlushCbs(void 0, queued, minUid);
2839
+ } finally {
2840
+ isFlushing = false;
2841
+ }
2842
+ }
2786
2843
  const getId = (job) => job.id == null ? job.flags & 2 ? -1 : Infinity : job.id;
2787
2844
  function flushJobs(seen) {
2788
2845
  {
@@ -2927,14 +2984,32 @@ var Vue = (function () {
2927
2984
  instance.ceReload(newComp.styles);
2928
2985
  dirtyInstances.delete(instance);
2929
2986
  } else if (instance.parent) {
2930
- queueJob(() => {
2931
- if (!(instance.job.flags & 8)) {
2932
- isHmrUpdating = true;
2987
+ const update = () => {
2988
+ if (!instance.scope.active) return;
2989
+ const pending = instance.asyncDep && !instance.asyncResolved ? instance : locateUnresolvedAsyncRoot(instance.parent);
2990
+ if (pending) {
2991
+ pending.asyncDep.catch(NOOP).then(() => {
2992
+ if (instance.scope.active && (pending.asyncResolved || !pending.scope.active)) {
2993
+ queueJob(update);
2994
+ }
2995
+ });
2996
+ return;
2997
+ }
2998
+ dirtyInstances = hmrDirtyComponents.get(oldComp);
2999
+ if (!dirtyInstances) {
3000
+ hmrDirtyComponents.set(oldComp, dirtyInstances = /* @__PURE__ */ new Set());
3001
+ }
3002
+ dirtyInstances.add(instance);
3003
+ isHmrUpdating = true;
3004
+ try {
2933
3005
  instance.parent.update();
3006
+ } finally {
2934
3007
  isHmrUpdating = false;
2935
3008
  dirtyInstances.delete(instance);
3009
+ queuePostFlushCb(() => hmrDirtyComponents.clear());
2936
3010
  }
2937
- });
3011
+ };
3012
+ queueJob(update);
2938
3013
  } else if (instance.appContext.reload) {
2939
3014
  instance.appContext.reload();
2940
3015
  } else if (typeof window !== "undefined") {
@@ -3616,12 +3691,31 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
3616
3691
  return vnode;
3617
3692
  }
3618
3693
  function invokeDirectiveHook(vnode, prevVNode, instance, name) {
3619
- const bindings = vnode.dirs;
3694
+ let hookVNode = vnode;
3695
+ if (name === "beforeMount") {
3696
+ vnode._mount = vnode;
3697
+ } else if (name === "beforeUpdate") {
3698
+ const mount = prevVNode && prevVNode._mount;
3699
+ if (mount) {
3700
+ mount._latest = vnode;
3701
+ vnode._mount = mount;
3702
+ }
3703
+ } else if (name === "mounted") {
3704
+ const latest = vnode._latest;
3705
+ vnode._mount = vnode._latest = void 0;
3706
+ if (latest) {
3707
+ hookVNode = latest;
3708
+ latest._mount = void 0;
3709
+ }
3710
+ }
3711
+ const bindings = hookVNode.dirs;
3620
3712
  const oldBindings = prevVNode && prevVNode.dirs;
3621
3713
  for (let i = 0; i < bindings.length; i++) {
3622
- const binding = bindings[i];
3714
+ let binding = bindings[i];
3623
3715
  if (oldBindings) {
3624
3716
  binding.oldValue = oldBindings[i].value;
3717
+ } else if (name === "mounted" && binding.oldValue !== void 0) {
3718
+ binding = extend({}, binding, { oldValue: void 0 });
3625
3719
  }
3626
3720
  let hook = binding.dir[name];
3627
3721
  if (!hook) {
@@ -3632,7 +3726,7 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
3632
3726
  callWithAsyncErrorHandling(hook, instance, 8, [
3633
3727
  vnode.el,
3634
3728
  binding,
3635
- vnode,
3729
+ hookVNode,
3636
3730
  prevVNode
3637
3731
  ]);
3638
3732
  resetTracking();
@@ -3732,6 +3826,7 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
3732
3826
  let isPre = false;
3733
3827
  if (flush === "post") {
3734
3828
  baseWatchOptions.scheduler = (job) => {
3829
+ job.i = instance;
3735
3830
  queuePostRenderEffect(job, instance && instance.suspense);
3736
3831
  };
3737
3832
  } else if (flush !== "sync") {
@@ -4026,7 +4121,11 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
4026
4121
  };
4027
4122
  function moveTeleport(vnode, container, parentAnchor, { o: { insert }, m: move }, moveType = 2) {
4028
4123
  if (moveType === 0) {
4124
+ if (vnode.targetStart) {
4125
+ insert(vnode.targetStart, container, parentAnchor);
4126
+ }
4029
4127
  insert(vnode.targetAnchor, container, parentAnchor);
4128
+ parentAnchor = vnode.targetAnchor;
4030
4129
  }
4031
4130
  const { el, anchor, shapeFlag, children, props } = vnode;
4032
4131
  const isReorder = moveType === 2;
@@ -4195,10 +4294,6 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
4195
4294
  onAfterAppear: TransitionHookValidator,
4196
4295
  onAppearCancelled: TransitionHookValidator
4197
4296
  };
4198
- const recursiveGetSubtree = (instance) => {
4199
- const subTree = instance.subTree;
4200
- return subTree.component ? recursiveGetSubtree(subTree.component) : subTree;
4201
- };
4202
4297
  const BaseTransitionImpl = {
4203
4298
  name: `BaseTransition`,
4204
4299
  props: BaseTransitionPropsValidators,
@@ -4227,19 +4322,17 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
4227
4322
  if (!innerChild) {
4228
4323
  return emptyPlaceholder(child);
4229
4324
  }
4230
- let enterHooks = resolveTransitionHooks(
4325
+ const enterHooks = resolveTransitionHooks(
4231
4326
  innerChild,
4232
4327
  rawProps,
4233
4328
  state,
4234
- instance,
4235
- // #11061, ensure enterHooks is fresh after clone
4236
- (hooks) => enterHooks = hooks
4329
+ instance
4237
4330
  );
4238
4331
  if (innerChild.type !== Comment) {
4239
4332
  setTransitionHooks(innerChild, enterHooks);
4240
4333
  }
4241
4334
  let oldInnerChild = instance.subTree && getInnerChild$1(instance.subTree);
4242
- if (oldInnerChild && oldInnerChild.type !== Comment && !isSameVNodeType(oldInnerChild, innerChild) && recursiveGetSubtree(instance).type !== Comment) {
4335
+ if (oldInnerChild && oldInnerChild.type !== Comment && !isSameVNodeType(oldInnerChild, innerChild) && getTransitionRoot(instance.subTree)) {
4243
4336
  let leavingHooks = resolveTransitionHooks(
4244
4337
  oldInnerChild,
4245
4338
  rawProps,
@@ -4252,7 +4345,17 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
4252
4345
  leavingHooks.afterLeave = () => {
4253
4346
  state.isLeaving = false;
4254
4347
  if (!(instance.job.flags & 8)) {
4255
- instance.update();
4348
+ if (instance.effect.flags & 2) {
4349
+ const job = () => {
4350
+ if (!(instance.job.flags & 8)) {
4351
+ instance.update();
4352
+ }
4353
+ };
4354
+ job.i = instance;
4355
+ queueJob(job);
4356
+ } else {
4357
+ instance.update();
4358
+ }
4256
4359
  }
4257
4360
  delete leavingHooks.afterLeave;
4258
4361
  oldInnerChild = void 0;
@@ -4319,7 +4422,7 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
4319
4422
  }
4320
4423
  return leavingVNodesCache;
4321
4424
  }
4322
- function resolveTransitionHooks(vnode, props, state, instance, postClone) {
4425
+ function resolveTransitionHooks(vnode, props, state, instance) {
4323
4426
  const {
4324
4427
  appear,
4325
4428
  mode,
@@ -4375,8 +4478,15 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
4375
4478
  );
4376
4479
  }
4377
4480
  const leavingVNode = leavingVNodesCache[key];
4378
- if (leavingVNode && isSameVNodeType(vnode, leavingVNode) && leavingVNode.el[leaveCbKey]) {
4379
- leavingVNode.el[leaveCbKey]();
4481
+ if (leavingVNode && isSameVNodeType(vnode, leavingVNode)) {
4482
+ let leavingCb = leavingVNode.el[leaveCbKey];
4483
+ if (!leavingCb) {
4484
+ const leavingRoot = getTransitionRoot(leavingVNode);
4485
+ leavingCb = leavingRoot && leavingRoot.el[leaveCbKey];
4486
+ }
4487
+ if (leavingCb) {
4488
+ leavingCb();
4489
+ }
4380
4490
  }
4381
4491
  callHook(hook, [el]);
4382
4492
  },
@@ -4451,15 +4561,21 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
4451
4561
  }
4452
4562
  },
4453
4563
  clone(vnode2) {
4454
- const hooks2 = resolveTransitionHooks(
4455
- vnode2,
4456
- props,
4457
- state,
4458
- instance,
4459
- postClone
4460
- );
4461
- if (postClone) postClone(hooks2);
4462
- return hooks2;
4564
+ const cloned = resolveTransitionHooks(vnode2, props, state, instance);
4565
+ cloned.afterLeave = () => {
4566
+ if (hooks.afterLeave) hooks.afterLeave();
4567
+ };
4568
+ cloned.delayLeave = (el, earlyRemove, delayedLeave) => {
4569
+ if (hooks.delayLeave) {
4570
+ hooks.delayLeave(el, earlyRemove, delayedLeave);
4571
+ } else {
4572
+ delayedLeave();
4573
+ }
4574
+ };
4575
+ cloned.delayedLeave = () => {
4576
+ if (hooks.delayedLeave) hooks.delayedLeave();
4577
+ };
4578
+ return cloned;
4463
4579
  }
4464
4580
  };
4465
4581
  return hooks;
@@ -4500,10 +4616,24 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
4500
4616
  hooks
4501
4617
  );
4502
4618
  } else if (vnode.shapeFlag & 128) {
4503
- vnode.ssContent.transition = hooks.clone(vnode.ssContent);
4504
- vnode.ssFallback.transition = hooks.clone(vnode.ssFallback);
4619
+ const suspense = vnode.suspense;
4620
+ if (suspense) {
4621
+ const branch = suspense.isHydrating ? suspense.pendingBranch : suspense.activeBranch;
4622
+ if (branch) {
4623
+ setTransitionHooks(branch, hooks.clone(branch));
4624
+ }
4625
+ } else {
4626
+ vnode.ssContent.transition = hooks.clone(vnode.ssContent);
4627
+ vnode.ssFallback.transition = hooks.clone(vnode.ssFallback);
4628
+ }
4505
4629
  } else {
4506
4630
  vnode.transition = hooks;
4631
+ if (vnode.type === Fragment && isArray(vnode.children)) {
4632
+ const child = filterSingleRoot(vnode.children, false);
4633
+ if (child) {
4634
+ setTransitionHooks(child, hooks);
4635
+ }
4636
+ }
4507
4637
  }
4508
4638
  }
4509
4639
  function getTransitionRawChildren(children, keepComment = false, parentKey) {
@@ -4528,6 +4658,18 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
4528
4658
  }
4529
4659
  return ret;
4530
4660
  }
4661
+ function getTransitionRoot(vnode) {
4662
+ if (vnode.component) {
4663
+ return getTransitionRoot(vnode.component.subTree);
4664
+ }
4665
+ if (vnode.type === Fragment) {
4666
+ const child = isArray(vnode.children) && filterSingleRoot(vnode.children, false);
4667
+ return child ? getTransitionRoot(child) : void 0;
4668
+ }
4669
+ if (vnode.type !== Comment) {
4670
+ return vnode;
4671
+ }
4672
+ }
4531
4673
 
4532
4674
  // @__NO_SIDE_EFFECTS__
4533
4675
  function defineComponent(options, extraOptions) {
@@ -5184,7 +5326,7 @@ Server rendered element contains fewer child nodes than client vdom.`
5184
5326
  getContainerType(container),
5185
5327
  slotScopeIds
5186
5328
  );
5187
- if (parentComponent) {
5329
+ if (parentComponent && parentComponent.vnode.el === node) {
5188
5330
  parentComponent.vnode.el = vnode.el;
5189
5331
  updateHOCHostEl(parentComponent, vnode.el);
5190
5332
  }
@@ -5433,14 +5575,22 @@ Server rendered element contains fewer child nodes than client vdom.`
5433
5575
  break;
5434
5576
  }
5435
5577
  }, opts);
5436
- forEach((el) => {
5437
- if (!(el instanceof Element)) return;
5578
+ const observe = (el) => {
5438
5579
  if (elementIsVisibleInViewport(el)) {
5439
5580
  hydrate();
5440
5581
  ob.disconnect();
5441
5582
  return false;
5442
5583
  }
5584
+ if (getComputedStyle(el).display === "contents") {
5585
+ for (let i = 0; i < el.children.length; i++) {
5586
+ if (observe(el.children[i]) === false) return false;
5587
+ }
5588
+ }
5443
5589
  ob.observe(el);
5590
+ };
5591
+ forEach((el) => {
5592
+ if (!(el instanceof Element)) return;
5593
+ return observe(el);
5444
5594
  });
5445
5595
  return () => ob.disconnect();
5446
5596
  };
@@ -5610,7 +5760,8 @@ Server rendered element contains fewer child nodes than client vdom.`
5610
5760
  err,
5611
5761
  instance,
5612
5762
  13,
5613
- !errorComponent
5763
+ !errorComponent,
5764
+ true
5614
5765
  );
5615
5766
  };
5616
5767
  if (suspensible && instance.suspense || false) {
@@ -5628,7 +5779,7 @@ Server rendered element contains fewer child nodes than client vdom.`
5628
5779
  const delayed = ref(!!delay);
5629
5780
  let timeoutTimer;
5630
5781
  let delayTimer;
5631
- onUnmounted(() => {
5782
+ onScopeDispose(() => {
5632
5783
  if (timeoutTimer != null) clearTimeout(timeoutTimer);
5633
5784
  if (delayTimer != null) clearTimeout(delayTimer);
5634
5785
  });
@@ -5750,6 +5901,12 @@ Server rendered element contains fewer child nodes than client vdom.`
5750
5901
  }
5751
5902
  };
5752
5903
  sharedContext.deactivate = (vnode) => {
5904
+ const cached = cache.get(
5905
+ vnode.key == null ? vnode.type : vnode.key
5906
+ );
5907
+ if (!cached || cached.component !== vnode.component) {
5908
+ return false;
5909
+ }
5753
5910
  const instance2 = vnode.component;
5754
5911
  invalidateMount(instance2.m);
5755
5912
  invalidateMount(instance2.a);
@@ -5770,6 +5927,7 @@ Server rendered element contains fewer child nodes than client vdom.`
5770
5927
  {
5771
5928
  instance2.__keepAliveStorageContainer = storageContainer;
5772
5929
  }
5930
+ return true;
5773
5931
  };
5774
5932
  function unmount(vnode) {
5775
5933
  resetShapeFlag(vnode);
@@ -5791,6 +5949,7 @@ Server rendered element contains fewer child nodes than client vdom.`
5791
5949
  unmount(cached);
5792
5950
  } else if (current) {
5793
5951
  resetShapeFlag(current);
5952
+ if (cached) resetShapeFlag(cached);
5794
5953
  }
5795
5954
  cache.delete(key);
5796
5955
  keys.delete(key);
@@ -5808,12 +5967,17 @@ Server rendered element contains fewer child nodes than client vdom.`
5808
5967
  const cacheSubtree = () => {
5809
5968
  if (pendingCacheKey != null) {
5810
5969
  if (isSuspense(instance.subTree.type)) {
5811
- queuePostRenderEffect(() => {
5970
+ const cacheInnerChild = () => {
5812
5971
  const vnode = getInnerChild(instance.subTree);
5813
5972
  if (vnode.component) {
5814
5973
  cache.set(pendingCacheKey, vnode);
5815
5974
  }
5816
- }, instance.subTree.suspense);
5975
+ };
5976
+ if (instance.subTree.suspense.pendingBranch) {
5977
+ queuePostRenderEffect(cacheInnerChild, instance.subTree.suspense);
5978
+ } else {
5979
+ cacheInnerChild();
5980
+ }
5817
5981
  } else {
5818
5982
  cache.set(pendingCacheKey, getInnerChild(instance.subTree));
5819
5983
  }
@@ -5948,9 +6112,12 @@ Server rendered element contains fewer child nodes than client vdom.`
5948
6112
  true
5949
6113
  /* prepend */
5950
6114
  );
5951
- onUnmounted(() => {
5952
- remove(keepAliveRoot[type], injected);
5953
- }, target);
6115
+ const removal = injectHook(
6116
+ "um",
6117
+ () => remove(keepAliveRoot[type], injected),
6118
+ target
6119
+ );
6120
+ removal.flags = 16;
5954
6121
  }
5955
6122
  function resetShapeFlag(vnode) {
5956
6123
  vnode.shapeFlag &= -257;
@@ -6373,9 +6540,11 @@ If this is a native custom element, make sure to exclude it from component resol
6373
6540
  }
6374
6541
  } else if (typeof source === "number") {
6375
6542
  if (!Number.isInteger(source) || source < 0) {
6376
- warn$1(
6377
- `The v-for range expects a positive integer value but got ${source}.`
6378
- );
6543
+ {
6544
+ warn$1(
6545
+ `The v-for range expects a positive integer value but got ${source}.`
6546
+ );
6547
+ }
6379
6548
  ret = [];
6380
6549
  } else {
6381
6550
  ret = new Array(source);
@@ -6694,6 +6863,7 @@ If this is a native custom element, make sure to exclude it from component resol
6694
6863
  $vnode: (i) => i.vnode,
6695
6864
  // some private properties that are likely accessed...
6696
6865
  _self: (i) => i.proxy,
6866
+ _setupProxy: (i) => i.setupState,
6697
6867
  _uid: (i) => i.uid,
6698
6868
  _data: (i) => i.data,
6699
6869
  _isMounted: (i) => i.isMounted,
@@ -7678,7 +7848,7 @@ If this is a native custom element, make sure to exclude it from component resol
7678
7848
  return vm;
7679
7849
  }
7680
7850
  }
7681
- Vue.version = `2.6.14-compat:${"3.5.43"}`;
7851
+ Vue.version = `2.6.14-compat:${"3.5.45"}`;
7682
7852
  Vue.config = singletonApp.config;
7683
7853
  Vue.use = (plugin, ...options) => {
7684
7854
  if (plugin && isFunction(plugin.install)) {
@@ -8835,7 +9005,7 @@ If you want to remount the same app, move your app creation logic into a factory
8835
9005
  }
8836
9006
  for (let i = 0; i < nextKeys.length; i++) {
8837
9007
  const key = nextKeys[i];
8838
- if (hasPropValueChanged(nextProps, prevProps, key) && !isEmitListener(emitsOptions, key)) {
9008
+ if (!hasOwn(prevProps, key) || hasPropValueChanged(nextProps, prevProps, key) && !isEmitListener(emitsOptions, key)) {
8839
9009
  return true;
8840
9010
  }
8841
9011
  }
@@ -9787,6 +9957,8 @@ If you want to remount the same app, move your app creation logic into a factory
9787
9957
  const needCallTransitionHooks = needTransition(parentSuspense, transition);
9788
9958
  if (needCallTransitionHooks) {
9789
9959
  transition.beforeEnter(el);
9960
+ } else if (transition && !transition.persisted) {
9961
+ el[deferredEnterKey] = true;
9790
9962
  }
9791
9963
  hostInsert(el, container, anchor);
9792
9964
  if ((vnodeHook = props && props.onVnodeMounted) || needCallTransitionHooks || dirs) {
@@ -9946,15 +10118,16 @@ If you want to remount the same app, move your app creation logic into a factory
9946
10118
  for (let i = 0; i < newChildren.length; i++) {
9947
10119
  const oldVNode = oldChildren[i];
9948
10120
  const newVNode = newChildren[i];
10121
+ const oldEl = oldVNode.el || resolveAsyncComponentPlaceholder(oldVNode);
9949
10122
  const container = (
9950
10123
  // oldVNode may be an errored async setup() component inside Suspense
9951
10124
  // which will not have a mounted element
9952
- oldVNode.el && // - In the case of a Fragment, we need to provide the actual parent
10125
+ oldEl && // - In the case of a Fragment, we need to provide the actual parent
9953
10126
  // of the Fragment itself so it can move its children.
9954
10127
  (oldVNode.type === Fragment || // - In the case of different nodes, there is going to be a replacement
9955
10128
  // which also requires the correct parent container
9956
10129
  !isSameVNodeType(oldVNode, newVNode) || // - In the case of a component, it could contain anything.
9957
- oldVNode.shapeFlag & (6 | 64 | 128)) ? hostParentNode(oldVNode.el) : (
10130
+ oldVNode.shapeFlag & (6 | 64 | 128)) ? hostParentNode(oldEl) : (
9958
10131
  // In other cases, the parent container is not actually used so we
9959
10132
  // just pass the block element here to avoid a DOM parentNode call.
9960
10133
  fallbackContainer
@@ -10119,7 +10292,12 @@ If you want to remount the same app, move your app creation logic into a factory
10119
10292
  }
10120
10293
  if (isHmrUpdating) initialVNode.el = null;
10121
10294
  if (instance.asyncDep) {
10122
- parentSuspense && parentSuspense.registerDep(instance, setupRenderEffect, optimized);
10295
+ parentSuspense && parentSuspense.registerDep(
10296
+ instance,
10297
+ setupRenderEffect,
10298
+ optimized,
10299
+ namespace
10300
+ );
10123
10301
  if (!initialVNode.el) {
10124
10302
  const placeholder = instance.subTree = createVNode(Comment);
10125
10303
  processCommentNode(null, placeholder, container, anchor);
@@ -10149,6 +10327,7 @@ If you want to remount the same app, move your app creation logic into a factory
10149
10327
  pushWarningContext(n2);
10150
10328
  }
10151
10329
  n2.el = n1.el;
10330
+ n2.placeholder = n1.placeholder;
10152
10331
  updateComponentPreRender(instance, n2, optimized);
10153
10332
  {
10154
10333
  popWarningContext();
@@ -10160,6 +10339,7 @@ If you want to remount the same app, move your app creation logic into a factory
10160
10339
  }
10161
10340
  } else {
10162
10341
  n2.el = n1.el;
10342
+ n2.placeholder = n1.placeholder;
10163
10343
  instance.vnode = n2;
10164
10344
  }
10165
10345
  };
@@ -10277,16 +10457,23 @@ If you want to remount the same app, move your app creation logic into a factory
10277
10457
  } else {
10278
10458
  let { next, bu, u, parent, vnode } = instance;
10279
10459
  {
10280
- const nonHydratedAsyncRoot = locateNonHydratedAsyncRoot(instance);
10281
- if (nonHydratedAsyncRoot) {
10460
+ const unresolvedAsyncRoot = locateUnresolvedAsyncRoot(instance);
10461
+ if (unresolvedAsyncRoot) {
10282
10462
  if (next) {
10283
10463
  next.el = vnode.el;
10284
10464
  updateComponentPreRender(instance, next, optimized);
10285
10465
  }
10286
- nonHydratedAsyncRoot.asyncDep.then(() => {
10287
- queuePostRenderEffect(() => {
10288
- if (!instance.isUnmounted) update();
10289
- }, parentSuspense);
10466
+ unresolvedAsyncRoot.asyncDep.then(() => {
10467
+ const retry = () => {
10468
+ if (instance.job.flags & 8) return;
10469
+ if (parentSuspense && parentSuspense.pendingBranch) {
10470
+ queuePostRenderEffect(retry, parentSuspense);
10471
+ } else {
10472
+ update();
10473
+ }
10474
+ };
10475
+ retry.flags = 16 | 32;
10476
+ queuePostRenderEffect(retry, parentSuspense);
10290
10477
  });
10291
10478
  return;
10292
10479
  }
@@ -10328,8 +10515,11 @@ If you want to remount the same app, move your app creation logic into a factory
10328
10515
  patch(
10329
10516
  prevTree,
10330
10517
  nextTree,
10331
- // parent may have changed if it's in a teleport
10332
- hostParentNode(prevTree.el),
10518
+ // parent may have changed if it's in a teleport. a root that is a
10519
+ // pending async component only has its placeholder comment
10520
+ hostParentNode(
10521
+ prevTree.el || resolveAsyncComponentPlaceholder(prevTree)
10522
+ ),
10333
10523
  // anchor may have changed if it's in a fragment
10334
10524
  getNextHostNode(prevTree),
10335
10525
  instance,
@@ -10775,8 +10965,7 @@ If you want to remount the same app, move your app creation logic into a factory
10775
10965
  if (cacheIndex != null && (!vnode.ctx || vnode.ctx === parentComponent)) {
10776
10966
  parentComponent.renderCache[cacheIndex] = void 0;
10777
10967
  }
10778
- if (shapeFlag & 256) {
10779
- parentComponent.ctx.deactivate(vnode);
10968
+ if (shapeFlag & 256 && parentComponent.ctx.deactivate(vnode)) {
10780
10969
  return;
10781
10970
  }
10782
10971
  const shouldInvokeDirs = shapeFlag & 1 && dirs;
@@ -10837,18 +11026,9 @@ If you want to remount the same app, move your app creation logic into a factory
10837
11026
  };
10838
11027
  const remove = (vnode) => {
10839
11028
  const { type, el, anchor, transition } = vnode;
10840
- if (type === Fragment) {
10841
- if (vnode.patchFlag > 0 && vnode.patchFlag & 2048 && transition && !transition.persisted) {
10842
- vnode.children.forEach((child) => {
10843
- if (child.type === Comment) {
10844
- hostRemove(child.el);
10845
- } else {
10846
- remove(child);
10847
- }
10848
- });
10849
- } else {
10850
- removeFragment(el, anchor);
10851
- }
11029
+ const isFragment = type === Fragment;
11030
+ if (isFragment && !transition) {
11031
+ removeFragment(el, anchor);
10852
11032
  return;
10853
11033
  }
10854
11034
  if (type === Static) {
@@ -10858,17 +11038,25 @@ If you want to remount the same app, move your app creation logic into a factory
10858
11038
  }
10859
11039
  return;
10860
11040
  }
11041
+ const leavingNode = isFragment ? getTransitionRoot(vnode) : vnode;
10861
11042
  const performRemove = () => {
10862
- hostRemove(el);
11043
+ if (isFragment) {
11044
+ if (hostParentNode(el)) {
11045
+ removeFragment(el, anchor);
11046
+ }
11047
+ } else {
11048
+ hostRemove(el);
11049
+ }
10863
11050
  if (transition && !transition.persisted && transition.afterLeave) {
10864
11051
  transition.afterLeave();
10865
11052
  }
10866
11053
  };
10867
- if (vnode.shapeFlag & 1 && transition && !transition.persisted) {
11054
+ if (leavingNode && leavingNode.shapeFlag & 1 && transition && !transition.persisted) {
10868
11055
  const { leave, delayLeave } = transition;
10869
- const performLeave = () => leave(el, performRemove);
11056
+ const leavingEl = leavingNode.el;
11057
+ const performLeave = () => leave(leavingEl, performRemove);
10870
11058
  if (delayLeave) {
10871
- delayLeave(vnode.el, performRemove, performLeave);
11059
+ delayLeave(leavingEl, performRemove, performLeave);
10872
11060
  } else {
10873
11061
  performLeave();
10874
11062
  }
@@ -10902,7 +11090,7 @@ If you want to remount the same app, move your app creation logic into a factory
10902
11090
  if (job) {
10903
11091
  job.flags |= 8;
10904
11092
  unmount(subTree, instance, parentSuspense, doRemove);
10905
- } else if (instance.vnode.el && subTree) {
11093
+ } else if (subTree) {
10906
11094
  subTree.transition = instance.vnode.transition;
10907
11095
  unmount(subTree, instance, parentSuspense, doRemove);
10908
11096
  }
@@ -10915,9 +11103,11 @@ If you want to remount the same app, move your app creation logic into a factory
10915
11103
  parentSuspense
10916
11104
  );
10917
11105
  }
10918
- queuePostRenderEffect(() => {
11106
+ const markUnmounted = () => {
10919
11107
  instance.isUnmounted = true;
10920
- }, parentSuspense);
11108
+ };
11109
+ markUnmounted.flags = 16;
11110
+ queuePostRenderEffect(markUnmounted, parentSuspense);
10921
11111
  {
10922
11112
  devtoolsComponentRemoved(instance);
10923
11113
  }
@@ -10938,32 +11128,26 @@ If you want to remount the same app, move your app creation logic into a factory
10938
11128
  const teleportEnd = el && el[TeleportEndKey];
10939
11129
  return teleportEnd ? hostNextSibling(teleportEnd) : el;
10940
11130
  };
10941
- let isFlushing = false;
10942
11131
  const render = (vnode, container, namespace) => {
10943
- let instance;
10944
- if (vnode == null) {
10945
- if (container._vnode) {
10946
- unmount(container._vnode, null, null, true);
10947
- instance = container._vnode.component;
11132
+ const minUid = vnode && container._vnode ? void 0 : vnode && vnode.component ? vnode.component.uid : getNextUid();
11133
+ flushOnAppMount(() => {
11134
+ if (vnode == null) {
11135
+ if (container._vnode) {
11136
+ unmount(container._vnode, null, null, true);
11137
+ }
11138
+ } else {
11139
+ patch(
11140
+ container._vnode || null,
11141
+ vnode,
11142
+ container,
11143
+ null,
11144
+ null,
11145
+ null,
11146
+ namespace
11147
+ );
10948
11148
  }
10949
- } else {
10950
- patch(
10951
- container._vnode || null,
10952
- vnode,
10953
- container,
10954
- null,
10955
- null,
10956
- null,
10957
- namespace
10958
- );
10959
- }
10960
- container._vnode = vnode;
10961
- if (!isFlushing) {
10962
- isFlushing = true;
10963
- flushPreFlushCbs(instance);
10964
- flushPostFlushCbs();
10965
- isFlushing = false;
10966
- }
11149
+ container._vnode = vnode;
11150
+ }, minUid);
10967
11151
  };
10968
11152
  const internals = {
10969
11153
  p: patch,
@@ -11075,13 +11259,13 @@ If you want to remount the same app, move your app creation logic into a factory
11075
11259
  }
11076
11260
  return result;
11077
11261
  }
11078
- function locateNonHydratedAsyncRoot(instance) {
11262
+ function locateUnresolvedAsyncRoot(instance) {
11079
11263
  const subComponent = instance.subTree.component;
11080
11264
  if (subComponent) {
11081
11265
  if (subComponent.asyncDep && !subComponent.asyncResolved) {
11082
11266
  return subComponent;
11083
11267
  } else {
11084
- return locateNonHydratedAsyncRoot(subComponent);
11268
+ return locateUnresolvedAsyncRoot(subComponent);
11085
11269
  }
11086
11270
  }
11087
11271
  }
@@ -11099,11 +11283,16 @@ If you want to remount the same app, move your app creation logic into a factory
11099
11283
  if (instance) {
11100
11284
  return resolveAsyncComponentPlaceholder(instance.subTree);
11101
11285
  }
11286
+ const suspense = anchorVnode.suspense;
11287
+ if (suspense && suspense.activeBranch) {
11288
+ return resolveAsyncComponentPlaceholder(suspense.activeBranch);
11289
+ }
11102
11290
  return null;
11103
11291
  }
11104
11292
 
11105
11293
  const isSuspense = (type) => type.__isSuspense;
11106
11294
  let suspenseId = 0;
11295
+ const deferredEnterKey = /* @__PURE__ */ Symbol("_deferredEnter");
11107
11296
  const SuspenseImpl = {
11108
11297
  name: "Suspense",
11109
11298
  // In order to make Suspense tree-shakable, we need to avoid importing it
@@ -11125,11 +11314,22 @@ If you want to remount the same app, move your app creation logic into a factory
11125
11314
  rendererInternals
11126
11315
  );
11127
11316
  } else {
11128
- if (parentSuspense && parentSuspense.deps > 0 && !n1.suspense.isInFallback && !parentSuspense.isHydrating) {
11129
- n2.suspense = n1.suspense;
11130
- n2.suspense.vnode = n2;
11131
- n2.el = n1.el;
11132
- return;
11317
+ const suspense = n1.suspense;
11318
+ if (parentSuspense && parentSuspense.deps > 0 && !parentSuspense.isHydrating) {
11319
+ const owner = suspense.parentComponent;
11320
+ const retained = !!owner && owner.suspense === parentSuspense && owner.suspenseId !== parentSuspense.pendingId;
11321
+ if (retained ? (
11322
+ // deps can outlive the pending branch: skip only while it exists
11323
+ parentSuspense.pendingBranch && !isSameVNodeType(
11324
+ n2.ssContent,
11325
+ suspense.pendingBranch || suspense.activeBranch
11326
+ )
11327
+ ) : !suspense.isInFallback) {
11328
+ n2.suspense = suspense;
11329
+ suspense.vnode = n2;
11330
+ n2.el = n1.el;
11331
+ return;
11332
+ }
11133
11333
  }
11134
11334
  patchSuspense(
11135
11335
  n1,
@@ -11154,6 +11354,38 @@ If you want to remount the same app, move your app creation logic into a factory
11154
11354
  eventListener();
11155
11355
  }
11156
11356
  }
11357
+ function enterDeferred(branch) {
11358
+ const enters = [];
11359
+ collectDeferredEnters(branch, enters, true);
11360
+ if (enters.length) {
11361
+ queuePostFlushCb(enters);
11362
+ }
11363
+ }
11364
+ function collectDeferredEnters(vnode, enters, isRoot) {
11365
+ const { el, transition, children, shapeFlag } = vnode;
11366
+ if (shapeFlag & 6) {
11367
+ collectDeferredEnters(vnode.component.subTree, enters, isRoot);
11368
+ return;
11369
+ }
11370
+ if (shapeFlag & (128 | 64)) {
11371
+ return;
11372
+ }
11373
+ if (shapeFlag & 1) {
11374
+ if (!isRoot && el && el[deferredEnterKey]) {
11375
+ el[deferredEnterKey] = void 0;
11376
+ if (transition && !transition.persisted) {
11377
+ transition.beforeEnter(el);
11378
+ enters.push(() => transition.enter(el));
11379
+ }
11380
+ }
11381
+ isRoot = false;
11382
+ }
11383
+ if (shapeFlag & 16) {
11384
+ for (let i = 0; i < children.length; i++) {
11385
+ collectDeferredEnters(children[i], enters, isRoot);
11386
+ }
11387
+ }
11388
+ }
11157
11389
  function mountSuspense(vnode, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, rendererInternals) {
11158
11390
  const {
11159
11391
  p: patch,
@@ -11253,7 +11485,7 @@ If you want to remount the same app, move your app creation logic into a factory
11253
11485
  unmount(pendingBranch, parentComponent, suspense);
11254
11486
  }
11255
11487
  suspense.deps = 0;
11256
- suspense.effects.length = 0;
11488
+ discardEffects(suspense);
11257
11489
  suspense.hiddenContainer = createElement("div");
11258
11490
  if (isInFallback) {
11259
11491
  patch(
@@ -11331,11 +11563,7 @@ If you want to remount the same app, move your app creation logic into a factory
11331
11563
  } else {
11332
11564
  triggerEvent(n2, "onPending");
11333
11565
  suspense.pendingBranch = newBranch;
11334
- if (newBranch.shapeFlag & 512) {
11335
- suspense.pendingId = newBranch.component.suspenseId;
11336
- } else {
11337
- suspense.pendingId = suspenseId++;
11338
- }
11566
+ suspense.pendingId = suspenseId++;
11339
11567
  patch(
11340
11568
  null,
11341
11569
  newBranch,
@@ -11350,12 +11578,11 @@ If you want to remount the same app, move your app creation logic into a factory
11350
11578
  if (suspense.deps <= 0) {
11351
11579
  suspense.resolve();
11352
11580
  } else {
11353
- const { timeout, pendingId } = suspense;
11581
+ const { timeout } = suspense;
11354
11582
  if (timeout > 0) {
11355
- setTimeout(() => {
11356
- if (suspense.pendingId === pendingId) {
11357
- suspense.fallback(newFallback);
11358
- }
11583
+ suspense.timeoutTimer = setTimeout(() => {
11584
+ suspense.timeoutTimer = void 0;
11585
+ suspense.fallback(suspense.vnode.ssFallback);
11359
11586
  }, timeout);
11360
11587
  } else if (timeout === 0) {
11361
11588
  suspense.fallback(newFallback);
@@ -11402,6 +11629,7 @@ If you want to remount the same app, move your app creation logic into a factory
11402
11629
  deps: 0,
11403
11630
  pendingId: suspenseId++,
11404
11631
  timeout: typeof timeout === "number" ? timeout : -1,
11632
+ timeoutTimer: void 0,
11405
11633
  activeBranch: null,
11406
11634
  isFallbackMountPending: false,
11407
11635
  pendingBranch: null,
@@ -11440,7 +11668,8 @@ If you want to remount the same app, move your app creation logic into a factory
11440
11668
  let hasUpdatedAnchor = false;
11441
11669
  if (delayEnter) {
11442
11670
  activeBranch.transition.afterLeave = () => {
11443
- if (pendingId === suspense.pendingId) {
11671
+ if (pendingId === suspense.pendingId && !suspense.isUnmounted) {
11672
+ enterDeferred(pendingBranch);
11444
11673
  move(
11445
11674
  pendingBranch,
11446
11675
  container2,
@@ -11455,7 +11684,9 @@ If you want to remount the same app, move your app creation logic into a factory
11455
11684
  };
11456
11685
  }
11457
11686
  if (activeBranch && !suspense.isFallbackMountPending) {
11458
- if (parentNode(activeBranch.el) === container2) {
11687
+ if (parentNode(
11688
+ activeBranch.el || resolveAsyncComponentPlaceholder(activeBranch)
11689
+ ) === container2) {
11459
11690
  anchor = next(activeBranch);
11460
11691
  hasUpdatedAnchor = true;
11461
11692
  }
@@ -11465,13 +11696,26 @@ If you want to remount the same app, move your app creation logic into a factory
11465
11696
  }
11466
11697
  }
11467
11698
  if (!delayEnter) {
11699
+ enterDeferred(pendingBranch);
11468
11700
  move(pendingBranch, container2, anchor, 0);
11469
11701
  }
11470
11702
  }
11703
+ clearTimeout(suspense.timeoutTimer);
11704
+ suspense.timeoutTimer = void 0;
11471
11705
  suspense.isFallbackMountPending = false;
11472
11706
  setActiveBranch(suspense, pendingBranch);
11473
11707
  suspense.pendingBranch = null;
11474
11708
  suspense.isInFallback = false;
11709
+ let kept = 0;
11710
+ for (let i = 0; i < effects.length; i++) {
11711
+ const effect = effects[i];
11712
+ if (effect.flags & 32) {
11713
+ queuePostFlushCb(effect);
11714
+ } else {
11715
+ effects[kept++] = effect;
11716
+ }
11717
+ }
11718
+ effects.length = kept;
11475
11719
  let parent = suspense.parent;
11476
11720
  let hasUnresolvedAncestor = false;
11477
11721
  while (parent) {
@@ -11500,7 +11744,7 @@ If you want to remount the same app, move your app creation logic into a factory
11500
11744
  triggerEvent(vnode2, "onResolve");
11501
11745
  },
11502
11746
  fallback(fallbackVNode) {
11503
- if (!suspense.pendingBranch) {
11747
+ if (suspense.isUnmounted || !suspense.pendingBranch) {
11504
11748
  return;
11505
11749
  }
11506
11750
  const { vnode: vnode2, activeBranch, parentComponent: parentComponent2, container: container2, namespace: namespace2 } = suspense;
@@ -11508,7 +11752,7 @@ If you want to remount the same app, move your app creation logic into a factory
11508
11752
  const anchor2 = next(activeBranch);
11509
11753
  const mountFallback = () => {
11510
11754
  suspense.isFallbackMountPending = false;
11511
- if (!suspense.isInFallback) {
11755
+ if (suspense.isUnmounted || !suspense.isInFallback) {
11512
11756
  return;
11513
11757
  }
11514
11758
  const latestFallback = suspense.vnode.ssFallback;
@@ -11551,25 +11795,16 @@ If you want to remount the same app, move your app creation logic into a factory
11551
11795
  next() {
11552
11796
  return suspense.activeBranch && next(suspense.activeBranch);
11553
11797
  },
11554
- registerDep(instance, setupRenderEffect, optimized2) {
11798
+ // `namespace` intentionally shadows the boundary's own: the dep must be
11799
+ // mounted with the namespace of the position it was rendered at, which can
11800
+ // differ from the boundary's (e.g. a component nested inside an <svg>).
11801
+ registerDep(instance, setupRenderEffect, optimized2, namespace2) {
11555
11802
  const isInPendingSuspense = !!suspense.pendingBranch;
11556
11803
  if (isInPendingSuspense) {
11557
11804
  suspense.deps++;
11558
11805
  }
11559
11806
  const hydratedEl = instance.vnode.el;
11560
- instance.asyncDep.catch((err) => {
11561
- handleError(err, instance, 0);
11562
- }).then((asyncSetupResult) => {
11563
- if (instance.isUnmounted || suspense.isUnmounted || suspense.pendingId !== instance.suspenseId) {
11564
- return;
11565
- }
11566
- unsetCurrentInstance();
11567
- if (hydratedEl && !instance.scope.active) {
11568
- if (isInPendingSuspense && --suspense.deps === 0) {
11569
- suspense.resolve();
11570
- }
11571
- return;
11572
- }
11807
+ const render = (asyncSetupResult) => {
11573
11808
  instance.asyncResolved = true;
11574
11809
  const { vnode: vnode2 } = instance;
11575
11810
  {
@@ -11591,7 +11826,7 @@ If you want to remount the same app, move your app creation logic into a factory
11591
11826
  // consider the comment placeholder case.
11592
11827
  hydratedEl ? null : next(instance.subTree),
11593
11828
  suspense,
11594
- namespace,
11829
+ namespace2,
11595
11830
  optimized2
11596
11831
  );
11597
11832
  if (placeholder) {
@@ -11602,13 +11837,57 @@ If you want to remount the same app, move your app creation logic into a factory
11602
11837
  {
11603
11838
  popWarningContext();
11604
11839
  }
11605
- if (isInPendingSuspense && --suspense.deps === 0) {
11840
+ };
11841
+ instance.asyncDep.catch((err) => {
11842
+ handleError(err, instance, 0, false, true);
11843
+ return () => null;
11844
+ }).then((asyncSetupResult) => {
11845
+ if (instance.isUnmounted || suspense.isUnmounted) {
11846
+ return;
11847
+ }
11848
+ const isPendingDep = isInPendingSuspense && suspense.pendingId === instance.suspenseId;
11849
+ unsetCurrentInstance();
11850
+ if (!instance.scope.active) {
11851
+ if (isPendingDep && --suspense.deps === 0) {
11852
+ suspense.resolve();
11853
+ }
11854
+ return;
11855
+ }
11856
+ if (!isPendingDep && suspense.pendingBranch) {
11857
+ const job = () => {
11858
+ if (instance.isUnmounted || suspense.isUnmounted || !instance.scope.active) {
11859
+ return;
11860
+ }
11861
+ if (suspense.pendingBranch) {
11862
+ queueEffectWithSuspense(job, suspense);
11863
+ } else {
11864
+ render(asyncSetupResult);
11865
+ }
11866
+ };
11867
+ job.flags = 16 | 32;
11868
+ queueEffectWithSuspense(job, suspense);
11869
+ return;
11870
+ }
11871
+ render(asyncSetupResult);
11872
+ if (isPendingDep && --suspense.deps === 0) {
11606
11873
  suspense.resolve();
11607
11874
  }
11608
11875
  });
11609
11876
  },
11610
11877
  unmount(parentSuspense2, doRemove) {
11611
11878
  suspense.isUnmounted = true;
11879
+ clearTimeout(suspense.timeoutTimer);
11880
+ suspense.timeoutTimer = void 0;
11881
+ if (parentSuspenseId !== void 0) {
11882
+ const parent = suspense.parent;
11883
+ const pendingId = parentSuspenseId;
11884
+ parentSuspenseId = void 0;
11885
+ queuePostFlushCb(() => {
11886
+ if (parent.pendingId === pendingId && !parent.isUnmounted && --parent.deps === 0) {
11887
+ parent.resolve();
11888
+ }
11889
+ });
11890
+ }
11612
11891
  if (suspense.activeBranch) {
11613
11892
  unmount(
11614
11893
  suspense.activeBranch,
@@ -11618,12 +11897,8 @@ If you want to remount the same app, move your app creation logic into a factory
11618
11897
  );
11619
11898
  }
11620
11899
  if (suspense.pendingBranch) {
11621
- unmount(
11622
- suspense.pendingBranch,
11623
- parentComponent,
11624
- parentSuspense2,
11625
- doRemove
11626
- );
11900
+ unmount(suspense.pendingBranch, parentComponent, suspense, doRemove);
11901
+ discardEffects(suspense);
11627
11902
  }
11628
11903
  }
11629
11904
  };
@@ -11693,6 +11968,16 @@ If you want to remount the same app, move your app creation logic into a factory
11693
11968
  }
11694
11969
  return s;
11695
11970
  }
11971
+ function discardEffects(suspense) {
11972
+ const { effects } = suspense;
11973
+ for (let i = 0; i < effects.length; i++) {
11974
+ const effect = effects[i];
11975
+ if (effect.flags & 16) {
11976
+ queuePostFlushCb(effect);
11977
+ }
11978
+ }
11979
+ effects.length = 0;
11980
+ }
11696
11981
  function queueEffectWithSuspense(fn, suspense) {
11697
11982
  if (suspense && suspense.pendingBranch) {
11698
11983
  if (isArray(fn)) {
@@ -12008,7 +12293,8 @@ Component that was made reactive: `,
12008
12293
  }
12009
12294
  function guardReactiveProps(props) {
12010
12295
  if (!props) return null;
12011
- return isProxy(props) || isInternalObject(props) ? extend({}, props) : props;
12296
+ if (isProxy(props)) return extend({}, props);
12297
+ return isInternalObject(props) ? extend({}, props[rawAttrsKey] || props) : props;
12012
12298
  }
12013
12299
  function cloneVNode(vnode, extraProps, mergeRef = false, cloneTransition = false) {
12014
12300
  const { props, ref, patchFlag, children, transition } = vnode;
@@ -12190,8 +12476,11 @@ Component that was made reactive: `,
12190
12476
  ]);
12191
12477
  }
12192
12478
 
12193
- const emptyAppContext = createAppContext();
12479
+ const emptyAppContext = /* @__PURE__ */ createAppContext();
12194
12480
  let uid = 0;
12481
+ function getNextUid() {
12482
+ return uid;
12483
+ }
12195
12484
  function createComponentInstance(vnode, parent, suspense) {
12196
12485
  const type = vnode.type;
12197
12486
  const appContext = (parent ? parent.appContext : vnode.appContext) || emptyAppContext;
@@ -12388,7 +12677,8 @@ Component that was made reactive: `,
12388
12677
  setInSSRSetupState(false);
12389
12678
  }
12390
12679
  }).catch((e) => {
12391
- handleError(e, instance, 0);
12680
+ handleError(e, instance, 0, void 0, true);
12681
+ instance.ssrRender = (_, push) => push("<!---->");
12392
12682
  });
12393
12683
  } else {
12394
12684
  instance.asyncDep = setupResult;
@@ -12506,11 +12796,12 @@ Component that was made reactive: `,
12506
12796
  }
12507
12797
  }
12508
12798
  }
12799
+ const rawAttrsKey = /* @__PURE__ */ Symbol();
12509
12800
  const attrsProxyHandlers = {
12510
12801
  get(target, key) {
12511
12802
  markAttrsAccessed();
12512
12803
  track(target, "get", "");
12513
- return target[key];
12804
+ return key === rawAttrsKey ? target : target[key];
12514
12805
  },
12515
12806
  set() {
12516
12807
  warn$1(`setupContext.attrs is readonly.`);
@@ -12862,7 +13153,7 @@ Component that was made reactive: `,
12862
13153
  return true;
12863
13154
  }
12864
13155
 
12865
- const version = "3.5.43";
13156
+ const version = "3.5.45";
12866
13157
  const warn = warn$1 ;
12867
13158
  const ErrorTypeStrings = ErrorTypeStrings$1 ;
12868
13159
  const devtools = devtools$1 ;
@@ -13463,7 +13754,9 @@ Component that was made reactive: `,
13463
13754
  }
13464
13755
  }
13465
13756
  if (vShowOriginalDisplay in el) {
13466
- el[vShowOriginalDisplay] = hasControlledDisplay ? style.display : "";
13757
+ if (!isCssString || prev !== next) {
13758
+ el[vShowOriginalDisplay] = hasControlledDisplay ? style.display : "";
13759
+ }
13467
13760
  if (el[vShowHidden]) {
13468
13761
  style.display = "none";
13469
13762
  }
@@ -13989,7 +14282,9 @@ Expected function or array of functions, received type ${typeof value}.`
13989
14282
  "Custom element style injection is not supported when using shadowRoot: false"
13990
14283
  );
13991
14284
  }
13992
- this._mount(def);
14285
+ if (this._connected) {
14286
+ this._mount(def);
14287
+ }
13993
14288
  };
13994
14289
  const asyncDef = this._def.__asyncLoader;
13995
14290
  if (asyncDef) {
@@ -14347,6 +14642,7 @@ Expected function or array of functions, received type ${typeof value}.`
14347
14642
  const newPositionMap = /* @__PURE__ */ new WeakMap();
14348
14643
  const moveCbKey = /* @__PURE__ */ Symbol("_moveCb");
14349
14644
  const enterCbKey = /* @__PURE__ */ Symbol("_enterCb");
14645
+ const pendingGroups = /* @__PURE__ */ new WeakMap();
14350
14646
  const decorate = (t) => {
14351
14647
  delete t.props.mode;
14352
14648
  {
@@ -14365,21 +14661,30 @@ Expected function or array of functions, received type ${typeof value}.`
14365
14661
  const state = useTransitionState();
14366
14662
  let prevChildren;
14367
14663
  let children;
14368
- onUpdated(() => {
14369
- if (!prevChildren.length) {
14370
- return;
14664
+ let origins;
14665
+ let moves;
14666
+ const willMove = () => {
14667
+ if (moves === void 0) {
14668
+ moves = prevChildren.length > 0 && hasCSSTransform(
14669
+ prevChildren[0].el,
14670
+ instance.vnode.el,
14671
+ resolveMoveClass(props)
14672
+ );
14371
14673
  }
14372
- const moveClass = props.moveClass || `${props.name || "v"}-move`;
14373
- if (!hasCSSTransform(
14374
- prevChildren[0].el,
14375
- instance.vnode.el,
14376
- moveClass
14377
- )) {
14674
+ return moves;
14675
+ };
14676
+ onUpdated(() => {
14677
+ pendingGroups.delete(instance);
14678
+ if (!willMove()) {
14378
14679
  prevChildren = [];
14680
+ origins = void 0;
14379
14681
  return;
14380
14682
  }
14683
+ const moveClass = resolveMoveClass(props);
14381
14684
  prevChildren.forEach(callPendingCbs);
14382
- prevChildren.forEach(recordPosition);
14685
+ const shift = origins && getOriginShift(origins, instance.vnode.el);
14686
+ origins = void 0;
14687
+ prevChildren.forEach((c) => recordPosition(c, shift));
14383
14688
  const movedChildren = prevChildren.filter(applyTranslation);
14384
14689
  forceReflow(instance.vnode.el);
14385
14690
  movedChildren.forEach((c) => {
@@ -14412,6 +14717,7 @@ Expected function or array of functions, received type ${typeof value}.`
14412
14717
  tag = "span";
14413
14718
  }
14414
14719
  prevChildren = [];
14720
+ moves = void 0;
14415
14721
  if (children) {
14416
14722
  for (let i = 0; i < children.length; i++) {
14417
14723
  const child = children[i];
@@ -14443,6 +14749,10 @@ Expected function or array of functions, received type ${typeof value}.`
14443
14749
  warn(`<TransitionGroup> children must be keyed.`);
14444
14750
  }
14445
14751
  }
14752
+ if (prevChildren.length) {
14753
+ origins = getOrigins(instance);
14754
+ pendingGroups.set(instance, willMove);
14755
+ }
14446
14756
  return createVNode(tag, null, children);
14447
14757
  };
14448
14758
  }
@@ -14457,8 +14767,11 @@ Expected function or array of functions, received type ${typeof value}.`
14457
14767
  el[enterCbKey]();
14458
14768
  }
14459
14769
  }
14460
- function recordPosition(c) {
14461
- newPositionMap.set(c, getPosition(c.el));
14770
+ function resolveMoveClass(props) {
14771
+ return props.moveClass || `${props.name || "v"}-move`;
14772
+ }
14773
+ function recordPosition(c, shift) {
14774
+ newPositionMap.set(c, getPosition(c.el, shift));
14462
14775
  }
14463
14776
  function applyTranslation(c) {
14464
14777
  const oldPos = positionMap.get(c);
@@ -14482,13 +14795,41 @@ Expected function or array of functions, received type ${typeof value}.`
14482
14795
  return c;
14483
14796
  }
14484
14797
  }
14485
- function getPosition(el) {
14798
+ function getPosition(el, shift) {
14486
14799
  const rect = el.getBoundingClientRect();
14487
14800
  return {
14488
- left: rect.left,
14489
- top: rect.top
14801
+ left: rect.left - (shift ? shift.left : 0),
14802
+ top: rect.top - (shift ? shift.top : 0)
14490
14803
  };
14491
14804
  }
14805
+ function getOrigins(instance) {
14806
+ let origins;
14807
+ for (let group = instance.parent; group; group = group.parent) {
14808
+ const willMove = pendingGroups.get(group);
14809
+ if (willMove) {
14810
+ const item = findItem(group.vnode.el, instance.vnode.el);
14811
+ if (item) {
14812
+ (origins || (origins = [])).push(
14813
+ extend(getPosition(item), { item, willMove })
14814
+ );
14815
+ }
14816
+ }
14817
+ }
14818
+ return origins;
14819
+ }
14820
+ function findItem(root, node) {
14821
+ const container = root.nodeType === 1 ? root : root.parentNode;
14822
+ while (node && node.parentNode !== container) {
14823
+ node = node.parentNode;
14824
+ }
14825
+ if (node && node.nodeType === 1) {
14826
+ return node;
14827
+ }
14828
+ }
14829
+ function getOriginShift(origins, root) {
14830
+ const origin = origins.find((o) => o.willMove() && o.item.contains(root));
14831
+ return origin && getPosition(origin.item, origin);
14832
+ }
14492
14833
  function hasCSSTransform(el, root, moveClass) {
14493
14834
  const clone = el.cloneNode();
14494
14835
  const _vtc = el[vtcKey];
@@ -14683,18 +15024,18 @@ Expected function or array of functions, received type ${typeof value}.`
14683
15024
  },
14684
15025
  // set value in mounted & updated because <select> relies on its children
14685
15026
  // <option>s.
14686
- mounted(el, { value }) {
14687
- setSelected(el, value);
15027
+ mounted(el, { value, modifiers: { number } }) {
15028
+ setSelected(el, value, number);
14688
15029
  },
14689
15030
  beforeUpdate(el, { value }, vnode) {
14690
15031
  el._modelValue = value;
14691
15032
  el[assignKey] = getModelAssigner(vnode);
14692
15033
  },
14693
- updated(el, { value }) {
15034
+ updated(el, { value, modifiers: { number } }) {
14694
15035
  const pending = el._pendingValue;
14695
15036
  el._pendingValue = void 0;
14696
15037
  if (!pending || pending[0] !== el.multiple || !isSameSelectValue(value, pending[1], pending[0])) {
14697
- setSelected(el, value);
15038
+ setSelected(el, value, number);
14698
15039
  }
14699
15040
  }
14700
15041
  };
@@ -14710,7 +15051,7 @@ Expected function or array of functions, received type ${typeof value}.`
14710
15051
  }
14711
15052
  return false;
14712
15053
  }
14713
- function setSelected(el, value) {
15054
+ function setSelected(el, value, number = false) {
14714
15055
  const isMultiple = el.multiple;
14715
15056
  const isArrayValue = isArray(value);
14716
15057
  if (isMultiple && !isArrayValue && !isSet(value)) {
@@ -14731,7 +15072,7 @@ Expected function or array of functions, received type ${typeof value}.`
14731
15072
  option.selected = looseIndexOf(value, optionValue) > -1;
14732
15073
  }
14733
15074
  } else {
14734
- option.selected = value.has(optionValue);
15075
+ option.selected = value.has(optionValue) || number && typeof optionValue === "string" && value.has(looseToNumber(optionValue));
14735
15076
  }
14736
15077
  } else if (looseEqual(getValue(option), value)) {
14737
15078
  if (el.selectedIndex !== i) el.selectedIndex = i;
@@ -16430,7 +16771,8 @@ Make sure to use the production build (*.prod.js) when deploying for production.
16430
16771
  [42]: `v-model value must be a valid JavaScript member expression.`,
16431
16772
  [43]: `v-model cannot be used on v-for or v-slot scope variables because they are not writable.`,
16432
16773
  [44]: `v-model cannot be used on a prop, because local prop bindings are not writable.
16433
- Use a v-bind binding combined with a v-on listener that emits update:x event instead.`,
16774
+ Use a v-bind binding combined with a v-on listener that emits update:x event instead.
16775
+ For props declared with defineModel(), assign the returned ref to a variable and use v-model on that variable.`,
16434
16776
  [45]: `v-model cannot be used on a const binding because it is not writable.`,
16435
16777
  [46]: `Error parsing JavaScript expression: `,
16436
16778
  [47]: `<KeepAlive> expects exactly one child component.`,
@@ -17374,7 +17716,11 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
17374
17716
  };
17375
17717
  }
17376
17718
  function cloneLoc(loc) {
17377
- return getLoc(loc.start.offset, loc.end.offset);
17719
+ return {
17720
+ start: extend({}, loc.start),
17721
+ end: extend({}, loc.end),
17722
+ source: loc.source
17723
+ };
17378
17724
  }
17379
17725
  function setLocEnd(loc, end) {
17380
17726
  loc.end = tokenizer.getPos(end);
@@ -19021,7 +19367,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
19021
19367
  createCompoundExpression([`const _memo = (`, memo.exp, `)`]),
19022
19368
  createCompoundExpression([
19023
19369
  `if (_cached && _cached.el`,
19024
- ...keyExp ? [` && _cached.key === `, keyExp] : [],
19370
+ ...keyExp ? [` && _cached.key === (`, keyExp, `)`] : [],
19025
19371
  ` && ${context.helperString(
19026
19372
  IS_MEMO_SAME
19027
19373
  )}(_cached, _memo)) return _cached`
@@ -20960,7 +21306,8 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
20960
21306
  if (!node.children.length) {
20961
21307
  return;
20962
21308
  }
20963
- if (hasMultipleChildren(node)) {
21309
+ const multipleChildren = hasMultipleChildren(node);
21310
+ if (multipleChildren) {
20964
21311
  context.onError(
20965
21312
  createDOMCompilerError(
20966
21313
  63,
@@ -21187,7 +21534,8 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
21187
21534
 
21188
21535
  const DOMNodeTransforms = [
21189
21536
  transformStyle,
21190
- ...[transformTransition, validateHtmlNesting]
21537
+ transformTransition,
21538
+ ...[validateHtmlNesting]
21191
21539
  ];
21192
21540
  const DOMDirectiveTransforms = {
21193
21541
  cloak: noopDirectiveTransform,