@vitejs/devtools 0.0.0-alpha.2 → 0.0.0-alpha.20

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,6 +1,8 @@
1
- //#region ../../node_modules/.pnpm/@vue+shared@3.5.22/node_modules/@vue/shared/dist/shared.esm-bundler.js
1
+ import { createEventEmitter } from "@vitejs/devtools-kit/utils/events";
2
+
3
+ //#region ../../node_modules/.pnpm/@vue+shared@3.5.25/node_modules/@vue/shared/dist/shared.esm-bundler.js
2
4
  /**
3
- * @vue/shared v3.5.22
5
+ * @vue/shared v3.5.25
4
6
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
5
7
  * @license MIT
6
8
  **/
@@ -155,7 +157,12 @@ const stringifySymbol = (v, i = "") => {
155
157
  };
156
158
 
157
159
  //#endregion
158
- //#region ../../node_modules/.pnpm/@vue+reactivity@3.5.22/node_modules/@vue/reactivity/dist/reactivity.esm-bundler.js
160
+ //#region ../../node_modules/.pnpm/@vue+reactivity@3.5.25/node_modules/@vue/reactivity/dist/reactivity.esm-bundler.js
161
+ /**
162
+ * @vue/reactivity v3.5.25
163
+ * (c) 2018-present Yuxi (Evan) You and Vue contributors
164
+ * @license MIT
165
+ **/
159
166
  function warn$2(msg, ...args) {
160
167
  console.warn(`[Vue warn] ${msg}`, ...args);
161
168
  }
@@ -703,17 +710,21 @@ function shallowReadArray(arr) {
703
710
  track(arr = toRaw(arr), "iterate", ARRAY_ITERATE_KEY);
704
711
  return arr;
705
712
  }
713
+ function toWrapped(target, item) {
714
+ if (isReadonly(target)) return isReactive(target) ? toReadonly(toReactive(item)) : toReadonly(item);
715
+ return toReactive(item);
716
+ }
706
717
  const arrayInstrumentations = {
707
718
  __proto__: null,
708
719
  [Symbol.iterator]() {
709
- return iterator(this, Symbol.iterator, toReactive);
720
+ return iterator(this, Symbol.iterator, (item) => toWrapped(this, item));
710
721
  },
711
722
  concat(...args) {
712
723
  return reactiveReadArray(this).concat(...args.map((x) => isArray(x) ? reactiveReadArray(x) : x));
713
724
  },
714
725
  entries() {
715
726
  return iterator(this, "entries", (value) => {
716
- value[1] = toReactive(value[1]);
727
+ value[1] = toWrapped(this, value[1]);
717
728
  return value;
718
729
  });
719
730
  },
@@ -721,16 +732,16 @@ const arrayInstrumentations = {
721
732
  return apply(this, "every", fn, thisArg, void 0, arguments);
722
733
  },
723
734
  filter(fn, thisArg) {
724
- return apply(this, "filter", fn, thisArg, (v) => v.map(toReactive), arguments);
735
+ return apply(this, "filter", fn, thisArg, (v) => v.map((item) => toWrapped(this, item)), arguments);
725
736
  },
726
737
  find(fn, thisArg) {
727
- return apply(this, "find", fn, thisArg, toReactive, arguments);
738
+ return apply(this, "find", fn, thisArg, (item) => toWrapped(this, item), arguments);
728
739
  },
729
740
  findIndex(fn, thisArg) {
730
741
  return apply(this, "findIndex", fn, thisArg, void 0, arguments);
731
742
  },
732
743
  findLast(fn, thisArg) {
733
- return apply(this, "findLast", fn, thisArg, toReactive, arguments);
744
+ return apply(this, "findLast", fn, thisArg, (item) => toWrapped(this, item), arguments);
734
745
  },
735
746
  findLastIndex(fn, thisArg) {
736
747
  return apply(this, "findLastIndex", fn, thisArg, void 0, arguments);
@@ -787,7 +798,7 @@ const arrayInstrumentations = {
787
798
  return noTracking(this, "unshift", args);
788
799
  },
789
800
  values() {
790
- return iterator(this, "values", toReactive);
801
+ return iterator(this, "values", (item) => toWrapped(this, item));
791
802
  }
792
803
  };
793
804
  function iterator(self$1, method, wrapValue) {
@@ -815,7 +826,7 @@ function apply(self$1, method, fn, thisArg, wrappedRetFn, args) {
815
826
  let wrappedFn = fn;
816
827
  if (arr !== self$1) {
817
828
  if (needsWrap) wrappedFn = function(item, index) {
818
- return fn.call(this, toReactive(item), index, self$1);
829
+ return fn.call(this, toWrapped(self$1, item), index, self$1);
819
830
  };
820
831
  else if (fn.length > 2) wrappedFn = function(item, index) {
821
832
  return fn.call(this, item, index, self$1);
@@ -829,7 +840,7 @@ function reduce(self$1, method, fn, args) {
829
840
  let wrappedFn = fn;
830
841
  if (arr !== self$1) {
831
842
  if (!isShallow(self$1)) wrappedFn = function(acc, item, index) {
832
- return fn.call(this, acc, toReactive(item), index, self$1);
843
+ return fn.call(this, acc, toWrapped(self$1, item), index, self$1);
833
844
  };
834
845
  else if (fn.length > 3) wrappedFn = function(acc, item, index) {
835
846
  return fn.call(this, acc, item, index, self$1);
@@ -902,13 +913,14 @@ var MutableReactiveHandler = class extends BaseReactiveHandler {
902
913
  }
903
914
  set(target, key, value, receiver) {
904
915
  let oldValue = target[key];
916
+ const isArrayWithIntegerKey = isArray(target) && isIntegerKey(key);
905
917
  if (!this._isShallow) {
906
918
  const isOldValueReadonly = isReadonly(oldValue);
907
919
  if (!isShallow(value) && !isReadonly(value)) {
908
920
  oldValue = toRaw(oldValue);
909
921
  value = toRaw(value);
910
922
  }
911
- if (!isArray(target) && isRef(oldValue) && !isRef(value)) if (isOldValueReadonly) {
923
+ if (!isArrayWithIntegerKey && isRef(oldValue) && !isRef(value)) if (isOldValueReadonly) {
912
924
  if (!!(process.env.NODE_ENV !== "production")) warn$2(`Set operation on key "${String(key)}" failed: target is readonly.`, target[key]);
913
925
  return true;
914
926
  } else {
@@ -916,7 +928,7 @@ var MutableReactiveHandler = class extends BaseReactiveHandler {
916
928
  return true;
917
929
  }
918
930
  }
919
- const hadKey = isArray(target) && isIntegerKey(key) ? Number(key) < target.length : hasOwn$1(target, key);
931
+ const hadKey = isArrayWithIntegerKey ? Number(key) < target.length : hasOwn$1(target, key);
920
932
  const result = Reflect.set(target, key, value, isRef(target) ? target : receiver);
921
933
  if (target === toRaw(receiver)) {
922
934
  if (!hadKey) trigger(target, "add", key, value);
@@ -1288,16 +1300,31 @@ var ObjectRefImpl = class {
1288
1300
  this._defaultValue = _defaultValue;
1289
1301
  this["__v_isRef"] = true;
1290
1302
  this._value = void 0;
1303
+ this._raw = toRaw(_object);
1304
+ let shallow = true;
1305
+ let obj = _object;
1306
+ if (!isArray(_object) || !isIntegerKey(String(_key))) do
1307
+ shallow = !isProxy(obj) || isShallow(obj);
1308
+ while (shallow && (obj = obj["__v_raw"]));
1309
+ this._shallow = shallow;
1291
1310
  }
1292
1311
  get value() {
1293
- const val = this._object[this._key];
1312
+ let val = this._object[this._key];
1313
+ if (this._shallow) val = unref(val);
1294
1314
  return this._value = val === void 0 ? this._defaultValue : val;
1295
1315
  }
1296
1316
  set value(newVal) {
1317
+ if (this._shallow && isRef(this._raw[this._key])) {
1318
+ const nestedRef = this._object[this._key];
1319
+ if (isRef(nestedRef)) {
1320
+ nestedRef.value = newVal;
1321
+ return;
1322
+ }
1323
+ }
1297
1324
  this._object[this._key] = newVal;
1298
1325
  }
1299
1326
  get dep() {
1300
- return getDepFromReactive(toRaw(this._object), this._key);
1327
+ return getDepFromReactive(this._raw, this._key);
1301
1328
  }
1302
1329
  };
1303
1330
  var GetterRefImpl = class {
@@ -1318,8 +1345,7 @@ function toRef$1(source, key, defaultValue) {
1318
1345
  else return ref(source);
1319
1346
  }
1320
1347
  function propertyToRef(source, key, defaultValue) {
1321
- const val = source[key];
1322
- return isRef(val) ? val : new ObjectRefImpl(source, key, defaultValue);
1348
+ return new ObjectRefImpl(source, key, defaultValue);
1323
1349
  }
1324
1350
  var ComputedRefImpl = class {
1325
1351
  constructor(fn, setter, isSSR) {
@@ -1548,7 +1574,12 @@ function traverse(value, depth = Infinity, seen) {
1548
1574
  }
1549
1575
 
1550
1576
  //#endregion
1551
- //#region ../../node_modules/.pnpm/@vue+runtime-core@3.5.22/node_modules/@vue/runtime-core/dist/runtime-core.esm-bundler.js
1577
+ //#region ../../node_modules/.pnpm/@vue+runtime-core@3.5.25/node_modules/@vue/runtime-core/dist/runtime-core.esm-bundler.js
1578
+ /**
1579
+ * @vue/runtime-core v3.5.25
1580
+ * (c) 2018-present Yuxi (Evan) You and Vue contributors
1581
+ * @license MIT
1582
+ **/
1552
1583
  const stack = [];
1553
1584
  function pushWarningContext(vnode) {
1554
1585
  stack.push(vnode);
@@ -2102,7 +2133,6 @@ function invokeDirectiveHook(vnode, prevVNode, instance, name) {
2102
2133
  const TeleportEndKey = Symbol("_vte");
2103
2134
  const isTeleport = (type) => type.__isTeleport;
2104
2135
  const leaveCbKey = Symbol("_leaveCb");
2105
- const enterCbKey$1 = Symbol("_enterCb");
2106
2136
  function setTransitionHooks(vnode, hooks) {
2107
2137
  if (vnode.shapeFlag & 6 && vnode.component) {
2108
2138
  vnode.transition = hooks;
@@ -2279,10 +2309,7 @@ function injectHook(type, hook, target = currentInstance, prepend = false) {
2279
2309
  if (prepend) hooks.unshift(wrappedHook);
2280
2310
  else hooks.push(wrappedHook);
2281
2311
  return wrappedHook;
2282
- } else if (!!(process.env.NODE_ENV !== "production")) {
2283
- const apiName = toHandlerKey(ErrorTypeStrings$1[type].replace(/ hook$/, ""));
2284
- warn$1(`${apiName} is called when there is no active component instance to be associated with. Lifecycle injection APIs can only be used during execution of setup(). If you are using async setup(), make sure to register lifecycle hooks before the first await statement.`);
2285
- }
2312
+ } else if (!!(process.env.NODE_ENV !== "production")) warn$1(`${toHandlerKey(ErrorTypeStrings$1[type].replace(/ hook$/, ""))} is called when there is no active component instance to be associated with. Lifecycle injection APIs can only be used during execution of setup(). If you are using async setup(), make sure to register lifecycle hooks before the first await statement.`);
2286
2313
  }
2287
2314
  const createHook = (lifecycle) => (hook, target = currentInstance) => {
2288
2315
  if (!isInSSRComponentSetup || lifecycle === "sp") injectHook(lifecycle, (...args) => hook(...args), target);
@@ -2391,7 +2418,6 @@ const PublicInstanceProxyHandlers = {
2391
2418
  if (key === "__v_skip") return true;
2392
2419
  const { ctx, setupState, data, props, accessCache, type, appContext } = instance;
2393
2420
  if (!!(process.env.NODE_ENV !== "production") && key === "__isVue") return true;
2394
- let normalizedProps;
2395
2421
  if (key[0] !== "$") {
2396
2422
  const n = accessCache[key];
2397
2423
  if (n !== void 0) switch (n) {
@@ -2403,10 +2429,10 @@ const PublicInstanceProxyHandlers = {
2403
2429
  else if (hasSetupBinding(setupState, key)) {
2404
2430
  accessCache[key] = 1;
2405
2431
  return setupState[key];
2406
- } else if (data !== EMPTY_OBJ && hasOwn$1(data, key)) {
2432
+ } else if (__VUE_OPTIONS_API__ && data !== EMPTY_OBJ && hasOwn$1(data, key)) {
2407
2433
  accessCache[key] = 2;
2408
2434
  return data[key];
2409
- } else if ((normalizedProps = instance.propsOptions[0]) && hasOwn$1(normalizedProps, key)) {
2435
+ } else if (hasOwn$1(props, key)) {
2410
2436
  accessCache[key] = 3;
2411
2437
  return props[key];
2412
2438
  } else if (ctx !== EMPTY_OBJ && hasOwn$1(ctx, key)) {
@@ -2440,7 +2466,7 @@ const PublicInstanceProxyHandlers = {
2440
2466
  } else if (!!(process.env.NODE_ENV !== "production") && setupState.__isScriptSetup && hasOwn$1(setupState, key)) {
2441
2467
  warn$1(`Cannot mutate <script setup> binding "${key}" from Options API.`);
2442
2468
  return false;
2443
- } else if (data !== EMPTY_OBJ && hasOwn$1(data, key)) {
2469
+ } else if (__VUE_OPTIONS_API__ && data !== EMPTY_OBJ && hasOwn$1(data, key)) {
2444
2470
  data[key] = value;
2445
2471
  return true;
2446
2472
  } else if (hasOwn$1(instance.props, key)) {
@@ -2458,9 +2484,9 @@ const PublicInstanceProxyHandlers = {
2458
2484
  else ctx[key] = value;
2459
2485
  return true;
2460
2486
  },
2461
- has({ _: { data, setupState, accessCache, ctx, appContext, propsOptions, type } }, key) {
2462
- let normalizedProps, cssModules;
2463
- return !!(accessCache[key] || data !== EMPTY_OBJ && key[0] !== "$" && hasOwn$1(data, key) || hasSetupBinding(setupState, key) || (normalizedProps = propsOptions[0]) && hasOwn$1(normalizedProps, key) || hasOwn$1(ctx, key) || hasOwn$1(publicPropertiesMap, key) || hasOwn$1(appContext.config.globalProperties, key) || (cssModules = type.__cssModules) && cssModules[key]);
2487
+ has({ _: { data, setupState, accessCache, ctx, appContext, props, type } }, key) {
2488
+ let cssModules;
2489
+ return !!(accessCache[key] || __VUE_OPTIONS_API__ && data !== EMPTY_OBJ && key[0] !== "$" && hasOwn$1(data, key) || hasSetupBinding(setupState, key) || hasOwn$1(props, key) || hasOwn$1(ctx, key) || hasOwn$1(publicPropertiesMap, key) || hasOwn$1(appContext.config.globalProperties, key) || (cssModules = type.__cssModules) && cssModules[key]);
2464
2490
  },
2465
2491
  defineProperty(target, key, descriptor) {
2466
2492
  if (descriptor.get != null) target._.accessCache[key] = 0;
@@ -2520,11 +2546,6 @@ function exposeSetupStateOnRenderContext(instance) {
2520
2546
  function normalizePropsOrEmits(props) {
2521
2547
  return isArray(props) ? props.reduce((normalized, p$1) => (normalized[p$1] = null, normalized), {}) : props;
2522
2548
  }
2523
- function mergeModels(a, b) {
2524
- if (!a || !b) return a || b;
2525
- if (isArray(a) && isArray(b)) return a.concat(b);
2526
- return extend({}, normalizePropsOrEmits(a), normalizePropsOrEmits(b));
2527
- }
2528
2549
  function createDuplicateChecker() {
2529
2550
  const cache = /* @__PURE__ */ Object.create(null);
2530
2551
  return (type, key) => {
@@ -2582,12 +2603,11 @@ function applyOptions(instance) {
2582
2603
  const opt = computedOptions[key];
2583
2604
  const get = isFunction(opt) ? opt.bind(publicThis, publicThis) : isFunction(opt.get) ? opt.get.bind(publicThis, publicThis) : NOOP;
2584
2605
  if (!!(process.env.NODE_ENV !== "production") && get === NOOP) warn$1(`Computed property "${key}" has no getter.`);
2585
- const set = !isFunction(opt) && isFunction(opt.set) ? opt.set.bind(publicThis) : !!(process.env.NODE_ENV !== "production") ? () => {
2586
- warn$1(`Write operation failed: computed property "${key}" is readonly.`);
2587
- } : NOOP;
2588
2606
  const c = computed({
2589
2607
  get,
2590
- set
2608
+ set: !isFunction(opt) && isFunction(opt.set) ? opt.set.bind(publicThis) : !!(process.env.NODE_ENV !== "production") ? () => {
2609
+ warn$1(`Write operation failed: computed property "${key}" is readonly.`);
2610
+ } : NOOP
2591
2611
  });
2592
2612
  Object.defineProperty(ctx, key, {
2593
2613
  enumerable: true,
@@ -2906,9 +2926,10 @@ If you want to remount the same app, move your app creation logic into a factory
2906
2926
  }
2907
2927
  let currentApp = null;
2908
2928
  function provide(key, value) {
2909
- if (!currentInstance) {
2910
- if (!!(process.env.NODE_ENV !== "production")) warn$1(`provide() can only be used inside setup().`);
2911
- } else {
2929
+ if (!!(process.env.NODE_ENV !== "production")) {
2930
+ if (!currentInstance || currentInstance.isMounted) warn$1(`provide() can only be used inside setup().`);
2931
+ }
2932
+ if (currentInstance) {
2912
2933
  let provides = currentInstance.provides;
2913
2934
  const parentProvides = currentInstance.parent && currentInstance.parent.provides;
2914
2935
  if (parentProvides === provides) provides = currentInstance.provides = Object.create(parentProvides);
@@ -2927,372 +2948,709 @@ function inject(key, defaultValue, treatDefaultAsFactory = false) {
2927
2948
  function hasInjectionContext() {
2928
2949
  return !!(getCurrentInstance() || currentApp);
2929
2950
  }
2930
- const internalObjectProto = {};
2931
- const createInternalObject = () => Object.create(internalObjectProto);
2932
- const isInternalObject = (obj) => Object.getPrototypeOf(obj) === internalObjectProto;
2933
- function initProps(instance, rawProps, isStateful, isSSR = false) {
2934
- const props = {};
2935
- const attrs = createInternalObject();
2936
- instance.propsDefaults = /* @__PURE__ */ Object.create(null);
2937
- setFullProps(instance, rawProps, props, attrs);
2938
- for (const key in instance.propsOptions[0]) if (!(key in props)) props[key] = void 0;
2939
- if (!!(process.env.NODE_ENV !== "production")) validateProps(rawProps || {}, props, instance);
2940
- if (isStateful) instance.props = isSSR ? props : shallowReactive(props);
2941
- else if (!instance.type.props) instance.props = attrs;
2942
- else instance.props = props;
2943
- instance.attrs = attrs;
2944
- }
2945
- function isInHmrContext(instance) {
2946
- while (instance) {
2947
- if (instance.type.__hmrId) return true;
2948
- instance = instance.parent;
2951
+ const ssrContextKey = Symbol.for("v-scx");
2952
+ const useSSRContext = () => {
2953
+ {
2954
+ const ctx = inject(ssrContextKey);
2955
+ if (!ctx) process.env.NODE_ENV !== "production" && warn$1(`Server rendering context not provided. Make sure to only call useSSRContext() conditionally in the server build.`);
2956
+ return ctx;
2949
2957
  }
2958
+ };
2959
+ function watchEffect(effect$1, options) {
2960
+ return doWatch(effect$1, null, options);
2950
2961
  }
2951
- function updateProps(instance, rawProps, rawPrevProps, optimized) {
2952
- const { props, attrs, vnode: { patchFlag } } = instance;
2953
- const rawCurrentProps = toRaw(props);
2954
- const [options] = instance.propsOptions;
2955
- let hasAttrsChanged = false;
2956
- if (!(!!(process.env.NODE_ENV !== "production") && isInHmrContext(instance)) && (optimized || patchFlag > 0) && !(patchFlag & 16)) {
2957
- if (patchFlag & 8) {
2958
- const propsToUpdate = instance.vnode.dynamicProps;
2959
- for (let i = 0; i < propsToUpdate.length; i++) {
2960
- let key = propsToUpdate[i];
2961
- if (isEmitListener(instance.emitsOptions, key)) continue;
2962
- const value = rawProps[key];
2963
- if (options) if (hasOwn$1(attrs, key)) {
2964
- if (value !== attrs[key]) {
2965
- attrs[key] = value;
2966
- hasAttrsChanged = true;
2967
- }
2968
- } else {
2969
- const camelizedKey = camelize$1(key);
2970
- props[camelizedKey] = resolvePropValue(options, rawCurrentProps, camelizedKey, value, instance, false);
2971
- }
2972
- else if (value !== attrs[key]) {
2973
- attrs[key] = value;
2974
- hasAttrsChanged = true;
2975
- }
2976
- }
2962
+ function watch(source, cb, options) {
2963
+ if (!!(process.env.NODE_ENV !== "production") && !isFunction(cb)) warn$1(`\`watch(fn, options?)\` signature has been moved to a separate API. Use \`watchEffect(fn, options?)\` instead. \`watch\` now only supports \`watch(source, cb, options?) signature.`);
2964
+ return doWatch(source, cb, options);
2965
+ }
2966
+ function doWatch(source, cb, options = EMPTY_OBJ) {
2967
+ const { immediate, deep, flush, once } = options;
2968
+ if (!!(process.env.NODE_ENV !== "production") && !cb) {
2969
+ if (immediate !== void 0) warn$1(`watch() "immediate" option is only respected when using the watch(source, callback, options?) signature.`);
2970
+ if (deep !== void 0) warn$1(`watch() "deep" option is only respected when using the watch(source, callback, options?) signature.`);
2971
+ if (once !== void 0) warn$1(`watch() "once" option is only respected when using the watch(source, callback, options?) signature.`);
2972
+ }
2973
+ const baseWatchOptions = extend({}, options);
2974
+ if (!!(process.env.NODE_ENV !== "production")) baseWatchOptions.onWarn = warn$1;
2975
+ const runsImmediately = cb && immediate || !cb && flush !== "post";
2976
+ let ssrCleanup;
2977
+ if (isInSSRComponentSetup) {
2978
+ if (flush === "sync") {
2979
+ const ctx = useSSRContext();
2980
+ ssrCleanup = ctx.__watcherHandles || (ctx.__watcherHandles = []);
2981
+ } else if (!runsImmediately) {
2982
+ const watchStopHandle = () => {};
2983
+ watchStopHandle.stop = NOOP;
2984
+ watchStopHandle.resume = NOOP;
2985
+ watchStopHandle.pause = NOOP;
2986
+ return watchStopHandle;
2977
2987
  }
2978
- } else {
2979
- if (setFullProps(instance, rawProps, props, attrs)) hasAttrsChanged = true;
2980
- let kebabKey;
2981
- for (const key in rawCurrentProps) if (!rawProps || !hasOwn$1(rawProps, key) && ((kebabKey = hyphenate$1(key)) === key || !hasOwn$1(rawProps, kebabKey))) if (options) {
2982
- if (rawPrevProps && (rawPrevProps[key] !== void 0 || rawPrevProps[kebabKey] !== void 0)) props[key] = resolvePropValue(options, rawCurrentProps, key, void 0, instance, true);
2983
- } else delete props[key];
2984
- if (attrs !== rawCurrentProps) {
2985
- for (const key in attrs) if (!rawProps || !hasOwn$1(rawProps, key) && true) {
2986
- delete attrs[key];
2987
- hasAttrsChanged = true;
2988
+ }
2989
+ const instance = currentInstance;
2990
+ baseWatchOptions.call = (fn, type, args) => callWithAsyncErrorHandling(fn, instance, type, args);
2991
+ let isPre = false;
2992
+ if (flush === "post") baseWatchOptions.scheduler = (job) => {
2993
+ queuePostRenderEffect(job, instance && instance.suspense);
2994
+ };
2995
+ else if (flush !== "sync") {
2996
+ isPre = true;
2997
+ baseWatchOptions.scheduler = (job, isFirstRun) => {
2998
+ if (isFirstRun) job();
2999
+ else queueJob(job);
3000
+ };
3001
+ }
3002
+ baseWatchOptions.augmentJob = (job) => {
3003
+ if (cb) job.flags |= 4;
3004
+ if (isPre) {
3005
+ job.flags |= 2;
3006
+ if (instance) {
3007
+ job.id = instance.uid;
3008
+ job.i = instance;
2988
3009
  }
2989
3010
  }
3011
+ };
3012
+ const watchHandle = watch$1(source, cb, baseWatchOptions);
3013
+ if (isInSSRComponentSetup) {
3014
+ if (ssrCleanup) ssrCleanup.push(watchHandle);
3015
+ else if (runsImmediately) watchHandle();
2990
3016
  }
2991
- if (hasAttrsChanged) trigger(instance.attrs, "set", "");
2992
- if (!!(process.env.NODE_ENV !== "production")) validateProps(rawProps || {}, props, instance);
3017
+ return watchHandle;
2993
3018
  }
2994
- function setFullProps(instance, rawProps, props, attrs) {
2995
- const [options, needCastKeys] = instance.propsOptions;
2996
- let hasAttrsChanged = false;
2997
- let rawCastValues;
2998
- if (rawProps) for (let key in rawProps) {
2999
- if (isReservedProp(key)) continue;
3000
- const value = rawProps[key];
3001
- let camelKey;
3002
- if (options && hasOwn$1(options, camelKey = camelize$1(key))) if (!needCastKeys || !needCastKeys.includes(camelKey)) props[camelKey] = value;
3003
- else (rawCastValues || (rawCastValues = {}))[camelKey] = value;
3004
- else if (!isEmitListener(instance.emitsOptions, key)) {
3005
- if (!(key in attrs) || value !== attrs[key]) {
3006
- attrs[key] = value;
3007
- hasAttrsChanged = true;
3019
+ function instanceWatch(source, value, options) {
3020
+ const publicThis = this.proxy;
3021
+ const getter = isString(source) ? source.includes(".") ? createPathGetter(publicThis, source) : () => publicThis[source] : source.bind(publicThis, publicThis);
3022
+ let cb;
3023
+ if (isFunction(value)) cb = value;
3024
+ else {
3025
+ cb = value.handler;
3026
+ options = value;
3027
+ }
3028
+ const reset = setCurrentInstance(this);
3029
+ const res = doWatch(getter, cb.bind(publicThis), options);
3030
+ reset();
3031
+ return res;
3032
+ }
3033
+ function createPathGetter(ctx, path) {
3034
+ const segments = path.split(".");
3035
+ return () => {
3036
+ let cur = ctx;
3037
+ for (let i = 0; i < segments.length && cur; i++) cur = cur[segments[i]];
3038
+ return cur;
3039
+ };
3040
+ }
3041
+ const getModelModifiers = (props, modelName) => {
3042
+ return modelName === "modelValue" || modelName === "model-value" ? props.modelModifiers : props[`${modelName}Modifiers`] || props[`${camelize$1(modelName)}Modifiers`] || props[`${hyphenate$1(modelName)}Modifiers`];
3043
+ };
3044
+ function emit(instance, event, ...rawArgs) {
3045
+ if (instance.isUnmounted) return;
3046
+ const props = instance.vnode.props || EMPTY_OBJ;
3047
+ if (!!(process.env.NODE_ENV !== "production")) {
3048
+ const { emitsOptions, propsOptions: [propsOptions] } = instance;
3049
+ if (emitsOptions) if (!(event in emitsOptions) && true) {
3050
+ if (!propsOptions || !(toHandlerKey(camelize$1(event)) in propsOptions)) warn$1(`Component emitted event "${event}" but it is neither declared in the emits option nor as an "${toHandlerKey(camelize$1(event))}" prop.`);
3051
+ } else {
3052
+ const validator = emitsOptions[event];
3053
+ if (isFunction(validator)) {
3054
+ if (!validator(...rawArgs)) warn$1(`Invalid event arguments: event validation failed for event "${event}".`);
3008
3055
  }
3009
3056
  }
3010
3057
  }
3011
- if (needCastKeys) {
3012
- const rawCurrentProps = toRaw(props);
3013
- const castValues = rawCastValues || EMPTY_OBJ;
3014
- for (let i = 0; i < needCastKeys.length; i++) {
3015
- const key = needCastKeys[i];
3016
- props[key] = resolvePropValue(options, rawCurrentProps, key, castValues[key], instance, !hasOwn$1(castValues, key));
3017
- }
3058
+ let args = rawArgs;
3059
+ const isModelListener$1 = event.startsWith("update:");
3060
+ const modifiers = isModelListener$1 && getModelModifiers(props, event.slice(7));
3061
+ if (modifiers) {
3062
+ if (modifiers.trim) args = rawArgs.map((a) => isString(a) ? a.trim() : a);
3063
+ if (modifiers.number) args = rawArgs.map(looseToNumber);
3018
3064
  }
3019
- return hasAttrsChanged;
3020
- }
3021
- function resolvePropValue(options, props, key, value, instance, isAbsent) {
3022
- const opt = options[key];
3023
- if (opt != null) {
3024
- const hasDefault = hasOwn$1(opt, "default");
3025
- if (hasDefault && value === void 0) {
3026
- const defaultValue = opt.default;
3027
- if (opt.type !== Function && !opt.skipFactory && isFunction(defaultValue)) {
3028
- const { propsDefaults } = instance;
3029
- if (key in propsDefaults) value = propsDefaults[key];
3030
- else {
3031
- const reset = setCurrentInstance(instance);
3032
- value = propsDefaults[key] = defaultValue.call(null, props);
3033
- reset();
3034
- }
3035
- } else value = defaultValue;
3036
- if (instance.ce) instance.ce._setProp(key, value);
3037
- }
3038
- if (opt[0]) {
3039
- if (isAbsent && !hasDefault) value = false;
3040
- else if (opt[1] && (value === "" || value === hyphenate$1(key))) value = true;
3041
- }
3065
+ if (!!(process.env.NODE_ENV !== "production") || __VUE_PROD_DEVTOOLS__) devtoolsComponentEmit(instance, event, args);
3066
+ if (!!(process.env.NODE_ENV !== "production")) {
3067
+ const lowerCaseEvent = event.toLowerCase();
3068
+ if (lowerCaseEvent !== event && props[toHandlerKey(lowerCaseEvent)]) warn$1(`Event "${lowerCaseEvent}" is emitted in component ${formatComponentName(instance, instance.type)} but the handler is registered for "${event}". Note that HTML attributes are case-insensitive and you cannot use v-on to listen to camelCase events when using in-DOM templates. You should probably use "${hyphenate$1(event)}" instead of "${event}".`);
3069
+ }
3070
+ let handlerName;
3071
+ let handler = props[handlerName = toHandlerKey(event)] || props[handlerName = toHandlerKey(camelize$1(event))];
3072
+ if (!handler && isModelListener$1) handler = props[handlerName = toHandlerKey(hyphenate$1(event))];
3073
+ if (handler) callWithAsyncErrorHandling(handler, instance, 6, args);
3074
+ const onceHandler = props[handlerName + `Once`];
3075
+ if (onceHandler) {
3076
+ if (!instance.emitted) instance.emitted = {};
3077
+ else if (instance.emitted[handlerName]) return;
3078
+ instance.emitted[handlerName] = true;
3079
+ callWithAsyncErrorHandling(onceHandler, instance, 6, args);
3042
3080
  }
3043
- return value;
3044
3081
  }
3045
- const mixinPropsCache = /* @__PURE__ */ new WeakMap();
3046
- function normalizePropsOptions(comp, appContext, asMixin = false) {
3047
- const cache = __VUE_OPTIONS_API__ && asMixin ? mixinPropsCache : appContext.propsCache;
3082
+ const mixinEmitsCache = /* @__PURE__ */ new WeakMap();
3083
+ function normalizeEmitsOptions(comp, appContext, asMixin = false) {
3084
+ const cache = __VUE_OPTIONS_API__ && asMixin ? mixinEmitsCache : appContext.emitsCache;
3048
3085
  const cached = cache.get(comp);
3049
- if (cached) return cached;
3050
- const raw = comp.props;
3051
- const normalized = {};
3052
- const needCastKeys = [];
3086
+ if (cached !== void 0) return cached;
3087
+ const raw = comp.emits;
3088
+ let normalized = {};
3053
3089
  let hasExtends = false;
3054
3090
  if (__VUE_OPTIONS_API__ && !isFunction(comp)) {
3055
- const extendProps = (raw2) => {
3056
- hasExtends = true;
3057
- const [props, keys] = normalizePropsOptions(raw2, appContext, true);
3058
- extend(normalized, props);
3059
- if (keys) needCastKeys.push(...keys);
3091
+ const extendEmits = (raw2) => {
3092
+ const normalizedFromExtend = normalizeEmitsOptions(raw2, appContext, true);
3093
+ if (normalizedFromExtend) {
3094
+ hasExtends = true;
3095
+ extend(normalized, normalizedFromExtend);
3096
+ }
3060
3097
  };
3061
- if (!asMixin && appContext.mixins.length) appContext.mixins.forEach(extendProps);
3062
- if (comp.extends) extendProps(comp.extends);
3063
- if (comp.mixins) comp.mixins.forEach(extendProps);
3098
+ if (!asMixin && appContext.mixins.length) appContext.mixins.forEach(extendEmits);
3099
+ if (comp.extends) extendEmits(comp.extends);
3100
+ if (comp.mixins) comp.mixins.forEach(extendEmits);
3064
3101
  }
3065
3102
  if (!raw && !hasExtends) {
3066
- if (isObject$1(comp)) cache.set(comp, EMPTY_ARR);
3067
- return EMPTY_ARR;
3103
+ if (isObject$1(comp)) cache.set(comp, null);
3104
+ return null;
3068
3105
  }
3069
- if (isArray(raw)) for (let i = 0; i < raw.length; i++) {
3070
- if (!!(process.env.NODE_ENV !== "production") && !isString(raw[i])) warn$1(`props must be strings when using array syntax.`, raw[i]);
3071
- const normalizedKey = camelize$1(raw[i]);
3072
- if (validatePropName(normalizedKey)) normalized[normalizedKey] = EMPTY_OBJ;
3106
+ if (isArray(raw)) raw.forEach((key) => normalized[key] = null);
3107
+ else extend(normalized, raw);
3108
+ if (isObject$1(comp)) cache.set(comp, normalized);
3109
+ return normalized;
3110
+ }
3111
+ function isEmitListener(options, key) {
3112
+ if (!options || !isOn(key)) return false;
3113
+ key = key.slice(2).replace(/Once$/, "");
3114
+ return hasOwn$1(options, key[0].toLowerCase() + key.slice(1)) || hasOwn$1(options, hyphenate$1(key)) || hasOwn$1(options, key);
3115
+ }
3116
+ let accessedAttrs = false;
3117
+ function markAttrsAccessed() {
3118
+ accessedAttrs = true;
3119
+ }
3120
+ function renderComponentRoot(instance) {
3121
+ const { type: Component, vnode, proxy, withProxy, propsOptions: [propsOptions], slots, attrs, emit: emit$2, render: render$1, renderCache, props, data, setupState, ctx, inheritAttrs } = instance;
3122
+ const prev = setCurrentRenderingInstance(instance);
3123
+ let result;
3124
+ let fallthroughAttrs;
3125
+ if (!!(process.env.NODE_ENV !== "production")) accessedAttrs = false;
3126
+ try {
3127
+ if (vnode.shapeFlag & 4) {
3128
+ const proxyToUse = withProxy || proxy;
3129
+ const thisProxy = !!(process.env.NODE_ENV !== "production") && setupState.__isScriptSetup ? new Proxy(proxyToUse, { get(target, key, receiver) {
3130
+ warn$1(`Property '${String(key)}' was accessed via 'this'. Avoid using 'this' in templates.`);
3131
+ return Reflect.get(target, key, receiver);
3132
+ } }) : proxyToUse;
3133
+ result = normalizeVNode(render$1.call(thisProxy, proxyToUse, renderCache, !!(process.env.NODE_ENV !== "production") ? shallowReadonly(props) : props, setupState, data, ctx));
3134
+ fallthroughAttrs = attrs;
3135
+ } else {
3136
+ const render2 = Component;
3137
+ if (!!(process.env.NODE_ENV !== "production") && attrs === props) markAttrsAccessed();
3138
+ result = normalizeVNode(render2.length > 1 ? render2(!!(process.env.NODE_ENV !== "production") ? shallowReadonly(props) : props, !!(process.env.NODE_ENV !== "production") ? {
3139
+ get attrs() {
3140
+ markAttrsAccessed();
3141
+ return shallowReadonly(attrs);
3142
+ },
3143
+ slots,
3144
+ emit: emit$2
3145
+ } : {
3146
+ attrs,
3147
+ slots,
3148
+ emit: emit$2
3149
+ }) : render2(!!(process.env.NODE_ENV !== "production") ? shallowReadonly(props) : props, null));
3150
+ fallthroughAttrs = Component.props ? attrs : getFunctionalFallthrough(attrs);
3151
+ }
3152
+ } catch (err) {
3153
+ blockStack.length = 0;
3154
+ handleError(err, instance, 1);
3155
+ result = createVNode(Comment);
3073
3156
  }
3074
- else if (raw) {
3075
- if (!!(process.env.NODE_ENV !== "production") && !isObject$1(raw)) warn$1(`invalid props options`, raw);
3076
- for (const key in raw) {
3077
- const normalizedKey = camelize$1(key);
3078
- if (validatePropName(normalizedKey)) {
3079
- const opt = raw[key];
3080
- const prop = normalized[normalizedKey] = isArray(opt) || isFunction(opt) ? { type: opt } : extend({}, opt);
3081
- const propType = prop.type;
3082
- let shouldCast = false;
3083
- let shouldCastTrue = true;
3084
- if (isArray(propType)) for (let index = 0; index < propType.length; ++index) {
3085
- const type = propType[index];
3086
- const typeName = isFunction(type) && type.name;
3087
- if (typeName === "Boolean") {
3088
- shouldCast = true;
3089
- break;
3090
- } else if (typeName === "String") shouldCastTrue = false;
3157
+ let root = result;
3158
+ let setRoot = void 0;
3159
+ if (!!(process.env.NODE_ENV !== "production") && result.patchFlag > 0 && result.patchFlag & 2048) [root, setRoot] = getChildRoot(result);
3160
+ if (fallthroughAttrs && inheritAttrs !== false) {
3161
+ const keys = Object.keys(fallthroughAttrs);
3162
+ const { shapeFlag } = root;
3163
+ if (keys.length) {
3164
+ if (shapeFlag & 7) {
3165
+ if (propsOptions && keys.some(isModelListener)) fallthroughAttrs = filterModelListeners(fallthroughAttrs, propsOptions);
3166
+ root = cloneVNode(root, fallthroughAttrs, false, true);
3167
+ } else if (!!(process.env.NODE_ENV !== "production") && !accessedAttrs && root.type !== Comment) {
3168
+ const allAttrs = Object.keys(attrs);
3169
+ const eventAttrs = [];
3170
+ const extraAttrs = [];
3171
+ for (let i = 0, l = allAttrs.length; i < l; i++) {
3172
+ const key = allAttrs[i];
3173
+ if (isOn(key)) {
3174
+ if (!isModelListener(key)) eventAttrs.push(key[2].toLowerCase() + key.slice(3));
3175
+ } else extraAttrs.push(key);
3091
3176
  }
3092
- else shouldCast = isFunction(propType) && propType.name === "Boolean";
3093
- prop[0] = shouldCast;
3094
- prop[1] = shouldCastTrue;
3095
- if (shouldCast || hasOwn$1(prop, "default")) needCastKeys.push(normalizedKey);
3177
+ if (extraAttrs.length) warn$1(`Extraneous non-props attributes (${extraAttrs.join(", ")}) were passed to component but could not be automatically inherited because component renders fragment or text or teleport root nodes.`);
3178
+ if (eventAttrs.length) warn$1(`Extraneous non-emits event listeners (${eventAttrs.join(", ")}) were passed to component but could not be automatically inherited because component renders fragment or text root nodes. If the listener is intended to be a component custom event listener only, declare it using the "emits" option.`);
3096
3179
  }
3097
3180
  }
3098
3181
  }
3099
- const res = [normalized, needCastKeys];
3100
- if (isObject$1(comp)) cache.set(comp, res);
3101
- return res;
3102
- }
3103
- function validatePropName(key) {
3104
- if (key[0] !== "$" && !isReservedProp(key)) return true;
3105
- else if (!!(process.env.NODE_ENV !== "production")) warn$1(`Invalid prop name: "${key}" is a reserved property.`);
3106
- return false;
3107
- }
3108
- function getType(ctor) {
3109
- if (ctor === null) return "null";
3110
- if (typeof ctor === "function") return ctor.name || "";
3111
- else if (typeof ctor === "object") return ctor.constructor && ctor.constructor.name || "";
3112
- return "";
3113
- }
3114
- function validateProps(rawProps, props, instance) {
3115
- const resolvedValues = toRaw(props);
3116
- const options = instance.propsOptions[0];
3117
- const camelizePropsKey = Object.keys(rawProps).map((key) => camelize$1(key));
3118
- for (const key in options) {
3119
- let opt = options[key];
3120
- if (opt == null) continue;
3121
- validateProp(key, resolvedValues[key], opt, !!(process.env.NODE_ENV !== "production") ? shallowReadonly(resolvedValues) : resolvedValues, !camelizePropsKey.includes(key));
3182
+ if (vnode.dirs) {
3183
+ if (!!(process.env.NODE_ENV !== "production") && !isElementRoot(root)) warn$1(`Runtime directive used on component with non-element root node. The directives will not function as intended.`);
3184
+ root = cloneVNode(root, null, false, true);
3185
+ root.dirs = root.dirs ? root.dirs.concat(vnode.dirs) : vnode.dirs;
3186
+ }
3187
+ if (vnode.transition) {
3188
+ if (!!(process.env.NODE_ENV !== "production") && !isElementRoot(root)) warn$1(`Component inside <Transition> renders non-element root node that cannot be animated.`);
3189
+ setTransitionHooks(root, vnode.transition);
3122
3190
  }
3191
+ if (!!(process.env.NODE_ENV !== "production") && setRoot) setRoot(root);
3192
+ else result = root;
3193
+ setCurrentRenderingInstance(prev);
3194
+ return result;
3123
3195
  }
3124
- function validateProp(name, value, prop, props, isAbsent) {
3125
- const { type, required, validator, skipCheck } = prop;
3126
- if (required && isAbsent) {
3127
- warn$1("Missing required prop: \"" + name + "\"");
3128
- return;
3196
+ const getChildRoot = (vnode) => {
3197
+ const rawChildren = vnode.children;
3198
+ const dynamicChildren = vnode.dynamicChildren;
3199
+ const childRoot = filterSingleRoot(rawChildren, false);
3200
+ if (!childRoot) return [vnode, void 0];
3201
+ else if (!!(process.env.NODE_ENV !== "production") && childRoot.patchFlag > 0 && childRoot.patchFlag & 2048) return getChildRoot(childRoot);
3202
+ const index = rawChildren.indexOf(childRoot);
3203
+ const dynamicIndex = dynamicChildren ? dynamicChildren.indexOf(childRoot) : -1;
3204
+ const setRoot = (updatedRoot) => {
3205
+ rawChildren[index] = updatedRoot;
3206
+ if (dynamicChildren) {
3207
+ if (dynamicIndex > -1) dynamicChildren[dynamicIndex] = updatedRoot;
3208
+ else if (updatedRoot.patchFlag > 0) vnode.dynamicChildren = [...dynamicChildren, updatedRoot];
3209
+ }
3210
+ };
3211
+ return [normalizeVNode(childRoot), setRoot];
3212
+ };
3213
+ function filterSingleRoot(children, recurse = true) {
3214
+ let singleRoot;
3215
+ for (let i = 0; i < children.length; i++) {
3216
+ const child = children[i];
3217
+ if (isVNode(child)) {
3218
+ if (child.type !== Comment || child.children === "v-if") if (singleRoot) return;
3219
+ else {
3220
+ singleRoot = child;
3221
+ if (!!(process.env.NODE_ENV !== "production") && recurse && singleRoot.patchFlag > 0 && singleRoot.patchFlag & 2048) return filterSingleRoot(singleRoot.children);
3222
+ }
3223
+ } else return;
3129
3224
  }
3130
- if (value == null && !required) return;
3131
- if (type != null && type !== true && !skipCheck) {
3132
- let isValid = false;
3133
- const types = isArray(type) ? type : [type];
3134
- const expectedTypes = [];
3135
- for (let i = 0; i < types.length && !isValid; i++) {
3136
- const { valid, expectedType } = assertType(value, types[i]);
3137
- expectedTypes.push(expectedType || "");
3138
- isValid = valid;
3225
+ return singleRoot;
3226
+ }
3227
+ const getFunctionalFallthrough = (attrs) => {
3228
+ let res;
3229
+ for (const key in attrs) if (key === "class" || key === "style" || isOn(key)) (res || (res = {}))[key] = attrs[key];
3230
+ return res;
3231
+ };
3232
+ const filterModelListeners = (attrs, props) => {
3233
+ const res = {};
3234
+ for (const key in attrs) if (!isModelListener(key) || !(key.slice(9) in props)) res[key] = attrs[key];
3235
+ return res;
3236
+ };
3237
+ const isElementRoot = (vnode) => {
3238
+ return vnode.shapeFlag & 7 || vnode.type === Comment;
3239
+ };
3240
+ function shouldUpdateComponent(prevVNode, nextVNode, optimized) {
3241
+ const { props: prevProps, children: prevChildren, component } = prevVNode;
3242
+ const { props: nextProps, children: nextChildren, patchFlag } = nextVNode;
3243
+ const emits = component.emitsOptions;
3244
+ if (!!(process.env.NODE_ENV !== "production") && (prevChildren || nextChildren) && isHmrUpdating) return true;
3245
+ if (nextVNode.dirs || nextVNode.transition) return true;
3246
+ if (optimized && patchFlag >= 0) {
3247
+ if (patchFlag & 1024) return true;
3248
+ if (patchFlag & 16) {
3249
+ if (!prevProps) return !!nextProps;
3250
+ return hasPropsChanged(prevProps, nextProps, emits);
3251
+ } else if (patchFlag & 8) {
3252
+ const dynamicProps = nextVNode.dynamicProps;
3253
+ for (let i = 0; i < dynamicProps.length; i++) {
3254
+ const key = dynamicProps[i];
3255
+ if (nextProps[key] !== prevProps[key] && !isEmitListener(emits, key)) return true;
3256
+ }
3139
3257
  }
3140
- if (!isValid) {
3141
- warn$1(getInvalidTypeMessage(name, value, expectedTypes));
3142
- return;
3258
+ } else {
3259
+ if (prevChildren || nextChildren) {
3260
+ if (!nextChildren || !nextChildren.$stable) return true;
3143
3261
  }
3262
+ if (prevProps === nextProps) return false;
3263
+ if (!prevProps) return !!nextProps;
3264
+ if (!nextProps) return true;
3265
+ return hasPropsChanged(prevProps, nextProps, emits);
3144
3266
  }
3145
- if (validator && !validator(value, props)) warn$1("Invalid prop: custom validator check failed for prop \"" + name + "\".");
3146
- }
3147
- const isSimpleType = /* @__PURE__ */ makeMap("String,Number,Boolean,Function,Symbol,BigInt");
3148
- function assertType(value, type) {
3149
- let valid;
3150
- const expectedType = getType(type);
3151
- if (expectedType === "null") valid = value === null;
3152
- else if (isSimpleType(expectedType)) {
3153
- const t = typeof value;
3154
- valid = t === expectedType.toLowerCase();
3155
- if (!valid && t === "object") valid = value instanceof type;
3156
- } else if (expectedType === "Object") valid = isObject$1(value);
3157
- else if (expectedType === "Array") valid = isArray(value);
3158
- else valid = value instanceof type;
3159
- return {
3160
- valid,
3161
- expectedType
3162
- };
3267
+ return false;
3163
3268
  }
3164
- function getInvalidTypeMessage(name, value, expectedTypes) {
3165
- if (expectedTypes.length === 0) return `Prop type [] for prop "${name}" won't match anything. Did you mean to use type Array instead?`;
3166
- let message = `Invalid prop: type check failed for prop "${name}". Expected ${expectedTypes.map(capitalize).join(" | ")}`;
3167
- const expectedType = expectedTypes[0];
3168
- const receivedType = toRawType(value);
3169
- const expectedValue = styleValue(value, expectedType);
3170
- const receivedValue = styleValue(value, receivedType);
3171
- if (expectedTypes.length === 1 && isExplicable(expectedType) && !isBoolean(expectedType, receivedType)) message += ` with value ${expectedValue}`;
3172
- message += `, got ${receivedType} `;
3173
- if (isExplicable(receivedType)) message += `with value ${receivedValue}.`;
3174
- return message;
3269
+ function hasPropsChanged(prevProps, nextProps, emitsOptions) {
3270
+ const nextKeys = Object.keys(nextProps);
3271
+ if (nextKeys.length !== Object.keys(prevProps).length) return true;
3272
+ for (let i = 0; i < nextKeys.length; i++) {
3273
+ const key = nextKeys[i];
3274
+ if (nextProps[key] !== prevProps[key] && !isEmitListener(emitsOptions, key)) return true;
3275
+ }
3276
+ return false;
3175
3277
  }
3176
- function styleValue(value, type) {
3177
- if (type === "String") return `"${value}"`;
3178
- else if (type === "Number") return `${Number(value)}`;
3179
- else return `${value}`;
3278
+ function updateHOCHostEl({ vnode, parent }, el) {
3279
+ while (parent) {
3280
+ const root = parent.subTree;
3281
+ if (root.suspense && root.suspense.activeBranch === vnode) root.el = vnode.el;
3282
+ if (root === vnode) {
3283
+ (vnode = parent.vnode).el = el;
3284
+ parent = parent.parent;
3285
+ } else break;
3286
+ }
3180
3287
  }
3181
- function isExplicable(type) {
3182
- return [
3183
- "string",
3184
- "number",
3185
- "boolean"
3186
- ].some((elem) => type.toLowerCase() === elem);
3288
+ const internalObjectProto = {};
3289
+ const createInternalObject = () => Object.create(internalObjectProto);
3290
+ const isInternalObject = (obj) => Object.getPrototypeOf(obj) === internalObjectProto;
3291
+ function initProps(instance, rawProps, isStateful, isSSR = false) {
3292
+ const props = {};
3293
+ const attrs = createInternalObject();
3294
+ instance.propsDefaults = /* @__PURE__ */ Object.create(null);
3295
+ setFullProps(instance, rawProps, props, attrs);
3296
+ for (const key in instance.propsOptions[0]) if (!(key in props)) props[key] = void 0;
3297
+ if (!!(process.env.NODE_ENV !== "production")) validateProps(rawProps || {}, props, instance);
3298
+ if (isStateful) instance.props = isSSR ? props : shallowReactive(props);
3299
+ else if (!instance.type.props) instance.props = attrs;
3300
+ else instance.props = props;
3301
+ instance.attrs = attrs;
3187
3302
  }
3188
- function isBoolean(...args) {
3189
- return args.some((elem) => elem.toLowerCase() === "boolean");
3303
+ function isInHmrContext(instance) {
3304
+ while (instance) {
3305
+ if (instance.type.__hmrId) return true;
3306
+ instance = instance.parent;
3307
+ }
3190
3308
  }
3191
- const isInternalKey = (key) => key === "_" || key === "_ctx" || key === "$stable";
3192
- const normalizeSlotValue = (value) => isArray(value) ? value.map(normalizeVNode) : [normalizeVNode(value)];
3193
- const normalizeSlot = (key, rawSlot, ctx) => {
3194
- if (rawSlot._n) return rawSlot;
3195
- const normalized = withCtx((...args) => {
3196
- if (!!(process.env.NODE_ENV !== "production") && currentInstance && !(ctx === null && currentRenderingInstance) && !(ctx && ctx.root !== currentInstance.root)) warn$1(`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.`);
3197
- return normalizeSlotValue(rawSlot(...args));
3198
- }, ctx);
3199
- normalized._c = false;
3200
- return normalized;
3201
- };
3202
- const normalizeObjectSlots = (rawSlots, slots, instance) => {
3203
- const ctx = rawSlots._ctx;
3204
- for (const key in rawSlots) {
3205
- if (isInternalKey(key)) continue;
3206
- const value = rawSlots[key];
3207
- if (isFunction(value)) slots[key] = normalizeSlot(key, value, ctx);
3208
- else if (value != null) {
3209
- if (!!(process.env.NODE_ENV !== "production") && true) warn$1(`Non-function value encountered for slot "${key}". Prefer function slots for better performance.`);
3210
- const normalized = normalizeSlotValue(value);
3211
- slots[key] = () => normalized;
3309
+ function updateProps(instance, rawProps, rawPrevProps, optimized) {
3310
+ const { props, attrs, vnode: { patchFlag } } = instance;
3311
+ const rawCurrentProps = toRaw(props);
3312
+ const [options] = instance.propsOptions;
3313
+ let hasAttrsChanged = false;
3314
+ if (!(!!(process.env.NODE_ENV !== "production") && isInHmrContext(instance)) && (optimized || patchFlag > 0) && !(patchFlag & 16)) {
3315
+ if (patchFlag & 8) {
3316
+ const propsToUpdate = instance.vnode.dynamicProps;
3317
+ for (let i = 0; i < propsToUpdate.length; i++) {
3318
+ let key = propsToUpdate[i];
3319
+ if (isEmitListener(instance.emitsOptions, key)) continue;
3320
+ const value = rawProps[key];
3321
+ if (options) if (hasOwn$1(attrs, key)) {
3322
+ if (value !== attrs[key]) {
3323
+ attrs[key] = value;
3324
+ hasAttrsChanged = true;
3325
+ }
3326
+ } else {
3327
+ const camelizedKey = camelize$1(key);
3328
+ props[camelizedKey] = resolvePropValue(options, rawCurrentProps, camelizedKey, value, instance, false);
3329
+ }
3330
+ else if (value !== attrs[key]) {
3331
+ attrs[key] = value;
3332
+ hasAttrsChanged = true;
3333
+ }
3334
+ }
3335
+ }
3336
+ } else {
3337
+ if (setFullProps(instance, rawProps, props, attrs)) hasAttrsChanged = true;
3338
+ let kebabKey;
3339
+ for (const key in rawCurrentProps) if (!rawProps || !hasOwn$1(rawProps, key) && ((kebabKey = hyphenate$1(key)) === key || !hasOwn$1(rawProps, kebabKey))) if (options) {
3340
+ if (rawPrevProps && (rawPrevProps[key] !== void 0 || rawPrevProps[kebabKey] !== void 0)) props[key] = resolvePropValue(options, rawCurrentProps, key, void 0, instance, true);
3341
+ } else delete props[key];
3342
+ if (attrs !== rawCurrentProps) {
3343
+ for (const key in attrs) if (!rawProps || !hasOwn$1(rawProps, key) && true) {
3344
+ delete attrs[key];
3345
+ hasAttrsChanged = true;
3346
+ }
3212
3347
  }
3213
3348
  }
3214
- };
3215
- const normalizeVNodeSlots = (instance, children) => {
3216
- if (!!(process.env.NODE_ENV !== "production") && !isKeepAlive(instance.vnode) && true) warn$1(`Non-function value encountered for default slot. Prefer function slots for better performance.`);
3217
- const normalized = normalizeSlotValue(children);
3218
- instance.slots.default = () => normalized;
3219
- };
3220
- const assignSlots = (slots, children, optimized) => {
3221
- for (const key in children) if (optimized || !isInternalKey(key)) slots[key] = children[key];
3222
- };
3223
- const initSlots = (instance, children, optimized) => {
3224
- const slots = instance.slots = createInternalObject();
3225
- if (instance.vnode.shapeFlag & 32) {
3226
- const type = children._;
3227
- if (type) {
3228
- assignSlots(slots, children, optimized);
3229
- if (optimized) def(slots, "_", type, true);
3230
- } else normalizeObjectSlots(children, slots);
3231
- } else if (children) normalizeVNodeSlots(instance, children);
3232
- };
3233
- const updateSlots = (instance, children, optimized) => {
3234
- const { vnode, slots } = instance;
3235
- let needDeletionCheck = true;
3236
- let deletionComparisonTarget = EMPTY_OBJ;
3237
- if (vnode.shapeFlag & 32) {
3238
- const type = children._;
3239
- if (type) if (!!(process.env.NODE_ENV !== "production") && isHmrUpdating) {
3240
- assignSlots(slots, children, optimized);
3241
- trigger(instance, "set", "$slots");
3242
- } else if (optimized && type === 1) needDeletionCheck = false;
3243
- else assignSlots(slots, children, optimized);
3244
- else {
3245
- needDeletionCheck = !children.$stable;
3246
- normalizeObjectSlots(children, slots);
3349
+ if (hasAttrsChanged) trigger(instance.attrs, "set", "");
3350
+ if (!!(process.env.NODE_ENV !== "production")) validateProps(rawProps || {}, props, instance);
3351
+ }
3352
+ function setFullProps(instance, rawProps, props, attrs) {
3353
+ const [options, needCastKeys] = instance.propsOptions;
3354
+ let hasAttrsChanged = false;
3355
+ let rawCastValues;
3356
+ if (rawProps) for (let key in rawProps) {
3357
+ if (isReservedProp(key)) continue;
3358
+ const value = rawProps[key];
3359
+ let camelKey;
3360
+ if (options && hasOwn$1(options, camelKey = camelize$1(key))) if (!needCastKeys || !needCastKeys.includes(camelKey)) props[camelKey] = value;
3361
+ else (rawCastValues || (rawCastValues = {}))[camelKey] = value;
3362
+ else if (!isEmitListener(instance.emitsOptions, key)) {
3363
+ if (!(key in attrs) || value !== attrs[key]) {
3364
+ attrs[key] = value;
3365
+ hasAttrsChanged = true;
3366
+ }
3247
3367
  }
3248
- deletionComparisonTarget = children;
3249
- } else if (children) {
3250
- normalizeVNodeSlots(instance, children);
3251
- deletionComparisonTarget = { default: 1 };
3252
3368
  }
3253
- if (needDeletionCheck) {
3254
- for (const key in slots) if (!isInternalKey(key) && deletionComparisonTarget[key] == null) delete slots[key];
3369
+ if (needCastKeys) {
3370
+ const rawCurrentProps = toRaw(props);
3371
+ const castValues = rawCastValues || EMPTY_OBJ;
3372
+ for (let i = 0; i < needCastKeys.length; i++) {
3373
+ const key = needCastKeys[i];
3374
+ props[key] = resolvePropValue(options, rawCurrentProps, key, castValues[key], instance, !hasOwn$1(castValues, key));
3375
+ }
3255
3376
  }
3256
- };
3257
- let supported;
3258
- let perf;
3259
- function startMeasure(instance, type) {
3260
- if (instance.appContext.config.performance && isSupported()) perf.mark(`vue-${type}-${instance.uid}`);
3261
- if (!!(process.env.NODE_ENV !== "production") || __VUE_PROD_DEVTOOLS__) devtoolsPerfStart(instance, type, isSupported() ? perf.now() : Date.now());
3377
+ return hasAttrsChanged;
3262
3378
  }
3263
- function endMeasure(instance, type) {
3264
- if (instance.appContext.config.performance && isSupported()) {
3265
- const startTag = `vue-${type}-${instance.uid}`;
3266
- const endTag = startTag + `:end`;
3267
- const measureName = `<${formatComponentName(instance, instance.type)}> ${type}`;
3268
- perf.mark(endTag);
3269
- perf.measure(measureName, startTag, endTag);
3270
- perf.clearMeasures(measureName);
3271
- perf.clearMarks(startTag);
3272
- perf.clearMarks(endTag);
3379
+ function resolvePropValue(options, props, key, value, instance, isAbsent) {
3380
+ const opt = options[key];
3381
+ if (opt != null) {
3382
+ const hasDefault = hasOwn$1(opt, "default");
3383
+ if (hasDefault && value === void 0) {
3384
+ const defaultValue = opt.default;
3385
+ if (opt.type !== Function && !opt.skipFactory && isFunction(defaultValue)) {
3386
+ const { propsDefaults } = instance;
3387
+ if (key in propsDefaults) value = propsDefaults[key];
3388
+ else {
3389
+ const reset = setCurrentInstance(instance);
3390
+ value = propsDefaults[key] = defaultValue.call(null, props);
3391
+ reset();
3392
+ }
3393
+ } else value = defaultValue;
3394
+ if (instance.ce) instance.ce._setProp(key, value);
3395
+ }
3396
+ if (opt[0]) {
3397
+ if (isAbsent && !hasDefault) value = false;
3398
+ else if (opt[1] && (value === "" || value === hyphenate$1(key))) value = true;
3399
+ }
3273
3400
  }
3274
- if (!!(process.env.NODE_ENV !== "production") || __VUE_PROD_DEVTOOLS__) devtoolsPerfEnd(instance, type, isSupported() ? perf.now() : Date.now());
3275
- }
3276
- function isSupported() {
3277
- if (supported !== void 0) return supported;
3278
- if (typeof window !== "undefined" && window.performance) {
3279
- supported = true;
3280
- perf = window.performance;
3281
- } else supported = false;
3282
- return supported;
3401
+ return value;
3283
3402
  }
3284
- function initFeatureFlags() {
3285
- const needWarn = [];
3286
- if (typeof __VUE_OPTIONS_API__ !== "boolean") {
3287
- process.env.NODE_ENV !== "production" && needWarn.push(`__VUE_OPTIONS_API__`);
3288
- getGlobalThis().__VUE_OPTIONS_API__ = true;
3403
+ const mixinPropsCache = /* @__PURE__ */ new WeakMap();
3404
+ function normalizePropsOptions(comp, appContext, asMixin = false) {
3405
+ const cache = __VUE_OPTIONS_API__ && asMixin ? mixinPropsCache : appContext.propsCache;
3406
+ const cached = cache.get(comp);
3407
+ if (cached) return cached;
3408
+ const raw = comp.props;
3409
+ const normalized = {};
3410
+ const needCastKeys = [];
3411
+ let hasExtends = false;
3412
+ if (__VUE_OPTIONS_API__ && !isFunction(comp)) {
3413
+ const extendProps = (raw2) => {
3414
+ hasExtends = true;
3415
+ const [props, keys] = normalizePropsOptions(raw2, appContext, true);
3416
+ extend(normalized, props);
3417
+ if (keys) needCastKeys.push(...keys);
3418
+ };
3419
+ if (!asMixin && appContext.mixins.length) appContext.mixins.forEach(extendProps);
3420
+ if (comp.extends) extendProps(comp.extends);
3421
+ if (comp.mixins) comp.mixins.forEach(extendProps);
3289
3422
  }
3290
- if (typeof __VUE_PROD_DEVTOOLS__ !== "boolean") {
3291
- process.env.NODE_ENV !== "production" && needWarn.push(`__VUE_PROD_DEVTOOLS__`);
3292
- getGlobalThis().__VUE_PROD_DEVTOOLS__ = false;
3423
+ if (!raw && !hasExtends) {
3424
+ if (isObject$1(comp)) cache.set(comp, EMPTY_ARR);
3425
+ return EMPTY_ARR;
3293
3426
  }
3294
- if (typeof __VUE_PROD_HYDRATION_MISMATCH_DETAILS__ !== "boolean") {
3295
- process.env.NODE_ENV !== "production" && needWarn.push(`__VUE_PROD_HYDRATION_MISMATCH_DETAILS__`);
3427
+ if (isArray(raw)) for (let i = 0; i < raw.length; i++) {
3428
+ if (!!(process.env.NODE_ENV !== "production") && !isString(raw[i])) warn$1(`props must be strings when using array syntax.`, raw[i]);
3429
+ const normalizedKey = camelize$1(raw[i]);
3430
+ if (validatePropName(normalizedKey)) normalized[normalizedKey] = EMPTY_OBJ;
3431
+ }
3432
+ else if (raw) {
3433
+ if (!!(process.env.NODE_ENV !== "production") && !isObject$1(raw)) warn$1(`invalid props options`, raw);
3434
+ for (const key in raw) {
3435
+ const normalizedKey = camelize$1(key);
3436
+ if (validatePropName(normalizedKey)) {
3437
+ const opt = raw[key];
3438
+ const prop = normalized[normalizedKey] = isArray(opt) || isFunction(opt) ? { type: opt } : extend({}, opt);
3439
+ const propType = prop.type;
3440
+ let shouldCast = false;
3441
+ let shouldCastTrue = true;
3442
+ if (isArray(propType)) for (let index = 0; index < propType.length; ++index) {
3443
+ const type = propType[index];
3444
+ const typeName = isFunction(type) && type.name;
3445
+ if (typeName === "Boolean") {
3446
+ shouldCast = true;
3447
+ break;
3448
+ } else if (typeName === "String") shouldCastTrue = false;
3449
+ }
3450
+ else shouldCast = isFunction(propType) && propType.name === "Boolean";
3451
+ prop[0] = shouldCast;
3452
+ prop[1] = shouldCastTrue;
3453
+ if (shouldCast || hasOwn$1(prop, "default")) needCastKeys.push(normalizedKey);
3454
+ }
3455
+ }
3456
+ }
3457
+ const res = [normalized, needCastKeys];
3458
+ if (isObject$1(comp)) cache.set(comp, res);
3459
+ return res;
3460
+ }
3461
+ function validatePropName(key) {
3462
+ if (key[0] !== "$" && !isReservedProp(key)) return true;
3463
+ else if (!!(process.env.NODE_ENV !== "production")) warn$1(`Invalid prop name: "${key}" is a reserved property.`);
3464
+ return false;
3465
+ }
3466
+ function getType(ctor) {
3467
+ if (ctor === null) return "null";
3468
+ if (typeof ctor === "function") return ctor.name || "";
3469
+ else if (typeof ctor === "object") return ctor.constructor && ctor.constructor.name || "";
3470
+ return "";
3471
+ }
3472
+ function validateProps(rawProps, props, instance) {
3473
+ const resolvedValues = toRaw(props);
3474
+ const options = instance.propsOptions[0];
3475
+ const camelizePropsKey = Object.keys(rawProps).map((key) => camelize$1(key));
3476
+ for (const key in options) {
3477
+ let opt = options[key];
3478
+ if (opt == null) continue;
3479
+ validateProp(key, resolvedValues[key], opt, !!(process.env.NODE_ENV !== "production") ? shallowReadonly(resolvedValues) : resolvedValues, !camelizePropsKey.includes(key));
3480
+ }
3481
+ }
3482
+ function validateProp(name, value, prop, props, isAbsent) {
3483
+ const { type, required, validator, skipCheck } = prop;
3484
+ if (required && isAbsent) {
3485
+ warn$1("Missing required prop: \"" + name + "\"");
3486
+ return;
3487
+ }
3488
+ if (value == null && !required) return;
3489
+ if (type != null && type !== true && !skipCheck) {
3490
+ let isValid = false;
3491
+ const types = isArray(type) ? type : [type];
3492
+ const expectedTypes = [];
3493
+ for (let i = 0; i < types.length && !isValid; i++) {
3494
+ const { valid, expectedType } = assertType(value, types[i]);
3495
+ expectedTypes.push(expectedType || "");
3496
+ isValid = valid;
3497
+ }
3498
+ if (!isValid) {
3499
+ warn$1(getInvalidTypeMessage(name, value, expectedTypes));
3500
+ return;
3501
+ }
3502
+ }
3503
+ if (validator && !validator(value, props)) warn$1("Invalid prop: custom validator check failed for prop \"" + name + "\".");
3504
+ }
3505
+ const isSimpleType = /* @__PURE__ */ makeMap("String,Number,Boolean,Function,Symbol,BigInt");
3506
+ function assertType(value, type) {
3507
+ let valid;
3508
+ const expectedType = getType(type);
3509
+ if (expectedType === "null") valid = value === null;
3510
+ else if (isSimpleType(expectedType)) {
3511
+ const t = typeof value;
3512
+ valid = t === expectedType.toLowerCase();
3513
+ if (!valid && t === "object") valid = value instanceof type;
3514
+ } else if (expectedType === "Object") valid = isObject$1(value);
3515
+ else if (expectedType === "Array") valid = isArray(value);
3516
+ else valid = value instanceof type;
3517
+ return {
3518
+ valid,
3519
+ expectedType
3520
+ };
3521
+ }
3522
+ function getInvalidTypeMessage(name, value, expectedTypes) {
3523
+ if (expectedTypes.length === 0) return `Prop type [] for prop "${name}" won't match anything. Did you mean to use type Array instead?`;
3524
+ let message = `Invalid prop: type check failed for prop "${name}". Expected ${expectedTypes.map(capitalize).join(" | ")}`;
3525
+ const expectedType = expectedTypes[0];
3526
+ const receivedType = toRawType(value);
3527
+ const expectedValue = styleValue(value, expectedType);
3528
+ const receivedValue = styleValue(value, receivedType);
3529
+ if (expectedTypes.length === 1 && isExplicable(expectedType) && !isBoolean(expectedType, receivedType)) message += ` with value ${expectedValue}`;
3530
+ message += `, got ${receivedType} `;
3531
+ if (isExplicable(receivedType)) message += `with value ${receivedValue}.`;
3532
+ return message;
3533
+ }
3534
+ function styleValue(value, type) {
3535
+ if (type === "String") return `"${value}"`;
3536
+ else if (type === "Number") return `${Number(value)}`;
3537
+ else return `${value}`;
3538
+ }
3539
+ function isExplicable(type) {
3540
+ return [
3541
+ "string",
3542
+ "number",
3543
+ "boolean"
3544
+ ].some((elem) => type.toLowerCase() === elem);
3545
+ }
3546
+ function isBoolean(...args) {
3547
+ return args.some((elem) => elem.toLowerCase() === "boolean");
3548
+ }
3549
+ const isInternalKey = (key) => key === "_" || key === "_ctx" || key === "$stable";
3550
+ const normalizeSlotValue = (value) => isArray(value) ? value.map(normalizeVNode) : [normalizeVNode(value)];
3551
+ const normalizeSlot = (key, rawSlot, ctx) => {
3552
+ if (rawSlot._n) return rawSlot;
3553
+ const normalized = withCtx((...args) => {
3554
+ if (!!(process.env.NODE_ENV !== "production") && currentInstance && !(ctx === null && currentRenderingInstance) && !(ctx && ctx.root !== currentInstance.root)) warn$1(`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.`);
3555
+ return normalizeSlotValue(rawSlot(...args));
3556
+ }, ctx);
3557
+ normalized._c = false;
3558
+ return normalized;
3559
+ };
3560
+ const normalizeObjectSlots = (rawSlots, slots, instance) => {
3561
+ const ctx = rawSlots._ctx;
3562
+ for (const key in rawSlots) {
3563
+ if (isInternalKey(key)) continue;
3564
+ const value = rawSlots[key];
3565
+ if (isFunction(value)) slots[key] = normalizeSlot(key, value, ctx);
3566
+ else if (value != null) {
3567
+ if (!!(process.env.NODE_ENV !== "production") && true) warn$1(`Non-function value encountered for slot "${key}". Prefer function slots for better performance.`);
3568
+ const normalized = normalizeSlotValue(value);
3569
+ slots[key] = () => normalized;
3570
+ }
3571
+ }
3572
+ };
3573
+ const normalizeVNodeSlots = (instance, children) => {
3574
+ if (!!(process.env.NODE_ENV !== "production") && !isKeepAlive(instance.vnode) && true) warn$1(`Non-function value encountered for default slot. Prefer function slots for better performance.`);
3575
+ const normalized = normalizeSlotValue(children);
3576
+ instance.slots.default = () => normalized;
3577
+ };
3578
+ const assignSlots = (slots, children, optimized) => {
3579
+ for (const key in children) if (optimized || !isInternalKey(key)) slots[key] = children[key];
3580
+ };
3581
+ const initSlots = (instance, children, optimized) => {
3582
+ const slots = instance.slots = createInternalObject();
3583
+ if (instance.vnode.shapeFlag & 32) {
3584
+ const type = children._;
3585
+ if (type) {
3586
+ assignSlots(slots, children, optimized);
3587
+ if (optimized) def(slots, "_", type, true);
3588
+ } else normalizeObjectSlots(children, slots);
3589
+ } else if (children) normalizeVNodeSlots(instance, children);
3590
+ };
3591
+ const updateSlots = (instance, children, optimized) => {
3592
+ const { vnode, slots } = instance;
3593
+ let needDeletionCheck = true;
3594
+ let deletionComparisonTarget = EMPTY_OBJ;
3595
+ if (vnode.shapeFlag & 32) {
3596
+ const type = children._;
3597
+ if (type) if (!!(process.env.NODE_ENV !== "production") && isHmrUpdating) {
3598
+ assignSlots(slots, children, optimized);
3599
+ trigger(instance, "set", "$slots");
3600
+ } else if (optimized && type === 1) needDeletionCheck = false;
3601
+ else assignSlots(slots, children, optimized);
3602
+ else {
3603
+ needDeletionCheck = !children.$stable;
3604
+ normalizeObjectSlots(children, slots);
3605
+ }
3606
+ deletionComparisonTarget = children;
3607
+ } else if (children) {
3608
+ normalizeVNodeSlots(instance, children);
3609
+ deletionComparisonTarget = { default: 1 };
3610
+ }
3611
+ if (needDeletionCheck) {
3612
+ for (const key in slots) if (!isInternalKey(key) && deletionComparisonTarget[key] == null) delete slots[key];
3613
+ }
3614
+ };
3615
+ let supported;
3616
+ let perf;
3617
+ function startMeasure(instance, type) {
3618
+ if (instance.appContext.config.performance && isSupported()) perf.mark(`vue-${type}-${instance.uid}`);
3619
+ if (!!(process.env.NODE_ENV !== "production") || __VUE_PROD_DEVTOOLS__) devtoolsPerfStart(instance, type, isSupported() ? perf.now() : Date.now());
3620
+ }
3621
+ function endMeasure(instance, type) {
3622
+ if (instance.appContext.config.performance && isSupported()) {
3623
+ const startTag = `vue-${type}-${instance.uid}`;
3624
+ const endTag = startTag + `:end`;
3625
+ const measureName = `<${formatComponentName(instance, instance.type)}> ${type}`;
3626
+ perf.mark(endTag);
3627
+ perf.measure(measureName, startTag, endTag);
3628
+ perf.clearMeasures(measureName);
3629
+ perf.clearMarks(startTag);
3630
+ perf.clearMarks(endTag);
3631
+ }
3632
+ if (!!(process.env.NODE_ENV !== "production") || __VUE_PROD_DEVTOOLS__) devtoolsPerfEnd(instance, type, isSupported() ? perf.now() : Date.now());
3633
+ }
3634
+ function isSupported() {
3635
+ if (supported !== void 0) return supported;
3636
+ if (typeof window !== "undefined" && window.performance) {
3637
+ supported = true;
3638
+ perf = window.performance;
3639
+ } else supported = false;
3640
+ return supported;
3641
+ }
3642
+ function initFeatureFlags() {
3643
+ const needWarn = [];
3644
+ if (typeof __VUE_OPTIONS_API__ !== "boolean") {
3645
+ process.env.NODE_ENV !== "production" && needWarn.push(`__VUE_OPTIONS_API__`);
3646
+ getGlobalThis().__VUE_OPTIONS_API__ = true;
3647
+ }
3648
+ if (typeof __VUE_PROD_DEVTOOLS__ !== "boolean") {
3649
+ process.env.NODE_ENV !== "production" && needWarn.push(`__VUE_PROD_DEVTOOLS__`);
3650
+ getGlobalThis().__VUE_PROD_DEVTOOLS__ = false;
3651
+ }
3652
+ if (typeof __VUE_PROD_HYDRATION_MISMATCH_DETAILS__ !== "boolean") {
3653
+ process.env.NODE_ENV !== "production" && needWarn.push(`__VUE_PROD_HYDRATION_MISMATCH_DETAILS__`);
3296
3654
  getGlobalThis().__VUE_PROD_HYDRATION_MISMATCH_DETAILS__ = false;
3297
3655
  }
3298
3656
  if (!!(process.env.NODE_ENV !== "production") && needWarn.length) {
@@ -3393,7 +3751,15 @@ function baseCreateRenderer(options, createHydrationFns) {
3393
3751
  if (n2.type === "svg") namespace = "svg";
3394
3752
  else if (n2.type === "math") namespace = "mathml";
3395
3753
  if (n1 == null) mountElement(n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);
3396
- else patchElement(n1, n2, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);
3754
+ else {
3755
+ const customElement = !!(n1.el && n1.el._isVueCE) ? n1.el : null;
3756
+ try {
3757
+ if (customElement) customElement._beginPatch();
3758
+ patchElement(n1, n2, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);
3759
+ } finally {
3760
+ if (customElement) customElement._endPatch();
3761
+ }
3762
+ }
3397
3763
  };
3398
3764
  const mountElement = (vnode, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => {
3399
3765
  let el;
@@ -3436,10 +3802,7 @@ function baseCreateRenderer(options, createHydrationFns) {
3436
3802
  }
3437
3803
  };
3438
3804
  const mountChildren = (children, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, start = 0) => {
3439
- for (let i = start; i < children.length; i++) {
3440
- const child = children[i] = optimized ? cloneIfMounted(children[i]) : normalizeVNode(children[i]);
3441
- patch(null, child, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);
3442
- }
3805
+ for (let i = start; i < children.length; i++) patch(null, children[i] = optimized ? cloneIfMounted(children[i]) : normalizeVNode(children[i]), container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);
3443
3806
  };
3444
3807
  const patchElement = (n1, n2, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => {
3445
3808
  const el = n2.el = n1.el;
@@ -3493,8 +3856,7 @@ function baseCreateRenderer(options, createHydrationFns) {
3493
3856
  for (let i = 0; i < newChildren.length; i++) {
3494
3857
  const oldVNode = oldChildren[i];
3495
3858
  const newVNode = newChildren[i];
3496
- const container = oldVNode.el && (oldVNode.type === Fragment || !isSameVNodeType(oldVNode, newVNode) || oldVNode.shapeFlag & 198) ? hostParentNode(oldVNode.el) : fallbackContainer;
3497
- patch(oldVNode, newVNode, container, null, parentComponent, parentSuspense, namespace, slotScopeIds, true);
3859
+ patch(oldVNode, newVNode, oldVNode.el && (oldVNode.type === Fragment || !isSameVNodeType(oldVNode, newVNode) || oldVNode.shapeFlag & 198) ? hostParentNode(oldVNode.el) : fallbackContainer, null, parentComponent, parentSuspense, namespace, slotScopeIds, true);
3498
3860
  }
3499
3861
  };
3500
3862
  const patchProps = (el, oldProps, newProps, parentComponent, namespace) => {
@@ -3948,514 +4310,118 @@ function baseCreateRenderer(options, createHydrationFns) {
3948
4310
  if (vnode.shapeFlag & 6) return getNextHostNode(vnode.component.subTree);
3949
4311
  if (vnode.shapeFlag & 128) return vnode.suspense.next();
3950
4312
  const el = hostNextSibling(vnode.anchor || vnode.el);
3951
- const teleportEnd = el && el[TeleportEndKey];
3952
- return teleportEnd ? hostNextSibling(teleportEnd) : el;
3953
- };
3954
- let isFlushing = false;
3955
- const render$1 = (vnode, container, namespace) => {
3956
- if (vnode == null) {
3957
- if (container._vnode) unmount(container._vnode, null, null, true);
3958
- } else patch(container._vnode || null, vnode, container, null, null, null, namespace);
3959
- container._vnode = vnode;
3960
- if (!isFlushing) {
3961
- isFlushing = true;
3962
- flushPreFlushCbs();
3963
- flushPostFlushCbs();
3964
- isFlushing = false;
3965
- }
3966
- };
3967
- const internals = {
3968
- p: patch,
3969
- um: unmount,
3970
- m: move,
3971
- r: remove$1,
3972
- mt: mountComponent,
3973
- mc: mountChildren,
3974
- pc: patchChildren,
3975
- pbc: patchBlockChildren,
3976
- n: getNextHostNode,
3977
- o: options
3978
- };
3979
- let hydrate;
3980
- let hydrateNode;
3981
- if (createHydrationFns) [hydrate, hydrateNode] = createHydrationFns(internals);
3982
- return {
3983
- render: render$1,
3984
- hydrate,
3985
- createApp: createAppAPI(render$1, hydrate)
3986
- };
3987
- }
3988
- function resolveChildrenNamespace({ type, props }, currentNamespace) {
3989
- return currentNamespace === "svg" && type === "foreignObject" || currentNamespace === "mathml" && type === "annotation-xml" && props && props.encoding && props.encoding.includes("html") ? void 0 : currentNamespace;
3990
- }
3991
- function toggleRecurse({ effect: effect$1, job }, allowed) {
3992
- if (allowed) {
3993
- effect$1.flags |= 32;
3994
- job.flags |= 4;
3995
- } else {
3996
- effect$1.flags &= -33;
3997
- job.flags &= -5;
3998
- }
3999
- }
4000
- function needTransition(parentSuspense, transition) {
4001
- return (!parentSuspense || parentSuspense && !parentSuspense.pendingBranch) && transition && !transition.persisted;
4002
- }
4003
- function traverseStaticChildren(n1, n2, shallow = false) {
4004
- const ch1 = n1.children;
4005
- const ch2 = n2.children;
4006
- if (isArray(ch1) && isArray(ch2)) for (let i = 0; i < ch1.length; i++) {
4007
- const c1 = ch1[i];
4008
- let c2 = ch2[i];
4009
- if (c2.shapeFlag & 1 && !c2.dynamicChildren) {
4010
- if (c2.patchFlag <= 0 || c2.patchFlag === 32) {
4011
- c2 = ch2[i] = cloneIfMounted(ch2[i]);
4012
- c2.el = c1.el;
4013
- }
4014
- if (!shallow && c2.patchFlag !== -2) traverseStaticChildren(c1, c2);
4015
- }
4016
- if (c2.type === Text && c2.patchFlag !== -1) c2.el = c1.el;
4017
- if (c2.type === Comment && !c2.el) c2.el = c1.el;
4018
- if (!!(process.env.NODE_ENV !== "production")) c2.el && (c2.el.__vnode = c2);
4019
- }
4020
- }
4021
- function getSequence(arr) {
4022
- const p$1 = arr.slice();
4023
- const result = [0];
4024
- let i, j, u, v, c;
4025
- const len = arr.length;
4026
- for (i = 0; i < len; i++) {
4027
- const arrI = arr[i];
4028
- if (arrI !== 0) {
4029
- j = result[result.length - 1];
4030
- if (arr[j] < arrI) {
4031
- p$1[i] = j;
4032
- result.push(i);
4033
- continue;
4034
- }
4035
- u = 0;
4036
- v = result.length - 1;
4037
- while (u < v) {
4038
- c = u + v >> 1;
4039
- if (arr[result[c]] < arrI) u = c + 1;
4040
- else v = c;
4041
- }
4042
- if (arrI < arr[result[u]]) {
4043
- if (u > 0) p$1[i] = result[u - 1];
4044
- result[u] = i;
4045
- }
4046
- }
4047
- }
4048
- u = result.length;
4049
- v = result[u - 1];
4050
- while (u-- > 0) {
4051
- result[u] = v;
4052
- v = p$1[v];
4053
- }
4054
- return result;
4055
- }
4056
- function locateNonHydratedAsyncRoot(instance) {
4057
- const subComponent = instance.subTree.component;
4058
- if (subComponent) if (subComponent.asyncDep && !subComponent.asyncResolved) return subComponent;
4059
- else return locateNonHydratedAsyncRoot(subComponent);
4060
- }
4061
- function invalidateMount(hooks) {
4062
- if (hooks) for (let i = 0; i < hooks.length; i++) hooks[i].flags |= 8;
4063
- }
4064
- const ssrContextKey = Symbol.for("v-scx");
4065
- const useSSRContext = () => {
4066
- {
4067
- const ctx = inject(ssrContextKey);
4068
- if (!ctx) process.env.NODE_ENV !== "production" && warn$1(`Server rendering context not provided. Make sure to only call useSSRContext() conditionally in the server build.`);
4069
- return ctx;
4070
- }
4071
- };
4072
- function watchEffect(effect$1, options) {
4073
- return doWatch(effect$1, null, options);
4074
- }
4075
- function watchSyncEffect(effect$1, options) {
4076
- return doWatch(effect$1, null, !!(process.env.NODE_ENV !== "production") ? extend({}, options, { flush: "sync" }) : { flush: "sync" });
4077
- }
4078
- function watch(source, cb, options) {
4079
- if (!!(process.env.NODE_ENV !== "production") && !isFunction(cb)) warn$1(`\`watch(fn, options?)\` signature has been moved to a separate API. Use \`watchEffect(fn, options?)\` instead. \`watch\` now only supports \`watch(source, cb, options?) signature.`);
4080
- return doWatch(source, cb, options);
4081
- }
4082
- function doWatch(source, cb, options = EMPTY_OBJ) {
4083
- const { immediate, deep, flush, once } = options;
4084
- if (!!(process.env.NODE_ENV !== "production") && !cb) {
4085
- if (immediate !== void 0) warn$1(`watch() "immediate" option is only respected when using the watch(source, callback, options?) signature.`);
4086
- if (deep !== void 0) warn$1(`watch() "deep" option is only respected when using the watch(source, callback, options?) signature.`);
4087
- if (once !== void 0) warn$1(`watch() "once" option is only respected when using the watch(source, callback, options?) signature.`);
4088
- }
4089
- const baseWatchOptions = extend({}, options);
4090
- if (!!(process.env.NODE_ENV !== "production")) baseWatchOptions.onWarn = warn$1;
4091
- const runsImmediately = cb && immediate || !cb && flush !== "post";
4092
- let ssrCleanup;
4093
- if (isInSSRComponentSetup) {
4094
- if (flush === "sync") {
4095
- const ctx = useSSRContext();
4096
- ssrCleanup = ctx.__watcherHandles || (ctx.__watcherHandles = []);
4097
- } else if (!runsImmediately) {
4098
- const watchStopHandle = () => {};
4099
- watchStopHandle.stop = NOOP;
4100
- watchStopHandle.resume = NOOP;
4101
- watchStopHandle.pause = NOOP;
4102
- return watchStopHandle;
4103
- }
4104
- }
4105
- const instance = currentInstance;
4106
- baseWatchOptions.call = (fn, type, args) => callWithAsyncErrorHandling(fn, instance, type, args);
4107
- let isPre = false;
4108
- if (flush === "post") baseWatchOptions.scheduler = (job) => {
4109
- queuePostRenderEffect(job, instance && instance.suspense);
4110
- };
4111
- else if (flush !== "sync") {
4112
- isPre = true;
4113
- baseWatchOptions.scheduler = (job, isFirstRun) => {
4114
- if (isFirstRun) job();
4115
- else queueJob(job);
4116
- };
4117
- }
4118
- baseWatchOptions.augmentJob = (job) => {
4119
- if (cb) job.flags |= 4;
4120
- if (isPre) {
4121
- job.flags |= 2;
4122
- if (instance) {
4123
- job.id = instance.uid;
4124
- job.i = instance;
4125
- }
4126
- }
4127
- };
4128
- const watchHandle = watch$1(source, cb, baseWatchOptions);
4129
- if (isInSSRComponentSetup) {
4130
- if (ssrCleanup) ssrCleanup.push(watchHandle);
4131
- else if (runsImmediately) watchHandle();
4132
- }
4133
- return watchHandle;
4134
- }
4135
- function instanceWatch(source, value, options) {
4136
- const publicThis = this.proxy;
4137
- const getter = isString(source) ? source.includes(".") ? createPathGetter(publicThis, source) : () => publicThis[source] : source.bind(publicThis, publicThis);
4138
- let cb;
4139
- if (isFunction(value)) cb = value;
4140
- else {
4141
- cb = value.handler;
4142
- options = value;
4143
- }
4144
- const reset = setCurrentInstance(this);
4145
- const res = doWatch(getter, cb.bind(publicThis), options);
4146
- reset();
4147
- return res;
4148
- }
4149
- function createPathGetter(ctx, path) {
4150
- const segments = path.split(".");
4151
- return () => {
4152
- let cur = ctx;
4153
- for (let i = 0; i < segments.length && cur; i++) cur = cur[segments[i]];
4154
- return cur;
4155
- };
4156
- }
4157
- function useModel(props, name, options = EMPTY_OBJ) {
4158
- const i = getCurrentInstance();
4159
- if (!!(process.env.NODE_ENV !== "production") && !i) {
4160
- warn$1(`useModel() called without active instance.`);
4161
- return ref();
4162
- }
4163
- const camelizedName = camelize$1(name);
4164
- if (!!(process.env.NODE_ENV !== "production") && !i.propsOptions[0][camelizedName]) {
4165
- warn$1(`useModel() called with prop "${name}" which is not declared.`);
4166
- return ref();
4167
- }
4168
- const hyphenatedName = hyphenate$1(name);
4169
- const modifiers = getModelModifiers(props, camelizedName);
4170
- const res = customRef((track$1, trigger$1) => {
4171
- let localValue;
4172
- let prevSetValue = EMPTY_OBJ;
4173
- let prevEmittedValue;
4174
- watchSyncEffect(() => {
4175
- const propValue = props[camelizedName];
4176
- if (hasChanged(localValue, propValue)) {
4177
- localValue = propValue;
4178
- trigger$1();
4179
- }
4180
- });
4181
- return {
4182
- get() {
4183
- track$1();
4184
- return options.get ? options.get(localValue) : localValue;
4185
- },
4186
- set(value) {
4187
- const emittedValue = options.set ? options.set(value) : value;
4188
- if (!hasChanged(emittedValue, localValue) && !(prevSetValue !== EMPTY_OBJ && hasChanged(value, prevSetValue))) return;
4189
- const rawProps = i.vnode.props;
4190
- if (!(rawProps && (name in rawProps || camelizedName in rawProps || hyphenatedName in rawProps) && (`onUpdate:${name}` in rawProps || `onUpdate:${camelizedName}` in rawProps || `onUpdate:${hyphenatedName}` in rawProps))) {
4191
- localValue = value;
4192
- trigger$1();
4193
- }
4194
- i.emit(`update:${name}`, emittedValue);
4195
- if (hasChanged(value, emittedValue) && hasChanged(value, prevSetValue) && !hasChanged(emittedValue, prevEmittedValue)) trigger$1();
4196
- prevSetValue = value;
4197
- prevEmittedValue = emittedValue;
4198
- }
4199
- };
4200
- });
4201
- res[Symbol.iterator] = () => {
4202
- let i2 = 0;
4203
- return { next() {
4204
- if (i2 < 2) return {
4205
- value: i2++ ? modifiers || EMPTY_OBJ : res,
4206
- done: false
4207
- };
4208
- else return { done: true };
4209
- } };
4210
- };
4211
- return res;
4212
- }
4213
- const getModelModifiers = (props, modelName) => {
4214
- return modelName === "modelValue" || modelName === "model-value" ? props.modelModifiers : props[`${modelName}Modifiers`] || props[`${camelize$1(modelName)}Modifiers`] || props[`${hyphenate$1(modelName)}Modifiers`];
4215
- };
4216
- function emit(instance, event, ...rawArgs) {
4217
- if (instance.isUnmounted) return;
4218
- const props = instance.vnode.props || EMPTY_OBJ;
4219
- if (!!(process.env.NODE_ENV !== "production")) {
4220
- const { emitsOptions, propsOptions: [propsOptions] } = instance;
4221
- if (emitsOptions) if (!(event in emitsOptions) && true) {
4222
- if (!propsOptions || !(toHandlerKey(camelize$1(event)) in propsOptions)) warn$1(`Component emitted event "${event}" but it is neither declared in the emits option nor as an "${toHandlerKey(camelize$1(event))}" prop.`);
4223
- } else {
4224
- const validator = emitsOptions[event];
4225
- if (isFunction(validator)) {
4226
- if (!validator(...rawArgs)) warn$1(`Invalid event arguments: event validation failed for event "${event}".`);
4227
- }
4228
- }
4229
- }
4230
- let args = rawArgs;
4231
- const isModelListener$1 = event.startsWith("update:");
4232
- const modifiers = isModelListener$1 && getModelModifiers(props, event.slice(7));
4233
- if (modifiers) {
4234
- if (modifiers.trim) args = rawArgs.map((a) => isString(a) ? a.trim() : a);
4235
- if (modifiers.number) args = rawArgs.map(looseToNumber);
4236
- }
4237
- if (!!(process.env.NODE_ENV !== "production") || __VUE_PROD_DEVTOOLS__) devtoolsComponentEmit(instance, event, args);
4238
- if (!!(process.env.NODE_ENV !== "production")) {
4239
- const lowerCaseEvent = event.toLowerCase();
4240
- if (lowerCaseEvent !== event && props[toHandlerKey(lowerCaseEvent)]) warn$1(`Event "${lowerCaseEvent}" is emitted in component ${formatComponentName(instance, instance.type)} but the handler is registered for "${event}". Note that HTML attributes are case-insensitive and you cannot use v-on to listen to camelCase events when using in-DOM templates. You should probably use "${hyphenate$1(event)}" instead of "${event}".`);
4241
- }
4242
- let handlerName;
4243
- let handler = props[handlerName = toHandlerKey(event)] || props[handlerName = toHandlerKey(camelize$1(event))];
4244
- if (!handler && isModelListener$1) handler = props[handlerName = toHandlerKey(hyphenate$1(event))];
4245
- if (handler) callWithAsyncErrorHandling(handler, instance, 6, args);
4246
- const onceHandler = props[handlerName + `Once`];
4247
- if (onceHandler) {
4248
- if (!instance.emitted) instance.emitted = {};
4249
- else if (instance.emitted[handlerName]) return;
4250
- instance.emitted[handlerName] = true;
4251
- callWithAsyncErrorHandling(onceHandler, instance, 6, args);
4252
- }
4253
- }
4254
- const mixinEmitsCache = /* @__PURE__ */ new WeakMap();
4255
- function normalizeEmitsOptions(comp, appContext, asMixin = false) {
4256
- const cache = __VUE_OPTIONS_API__ && asMixin ? mixinEmitsCache : appContext.emitsCache;
4257
- const cached = cache.get(comp);
4258
- if (cached !== void 0) return cached;
4259
- const raw = comp.emits;
4260
- let normalized = {};
4261
- let hasExtends = false;
4262
- if (__VUE_OPTIONS_API__ && !isFunction(comp)) {
4263
- const extendEmits = (raw2) => {
4264
- const normalizedFromExtend = normalizeEmitsOptions(raw2, appContext, true);
4265
- if (normalizedFromExtend) {
4266
- hasExtends = true;
4267
- extend(normalized, normalizedFromExtend);
4268
- }
4269
- };
4270
- if (!asMixin && appContext.mixins.length) appContext.mixins.forEach(extendEmits);
4271
- if (comp.extends) extendEmits(comp.extends);
4272
- if (comp.mixins) comp.mixins.forEach(extendEmits);
4273
- }
4274
- if (!raw && !hasExtends) {
4275
- if (isObject$1(comp)) cache.set(comp, null);
4276
- return null;
4277
- }
4278
- if (isArray(raw)) raw.forEach((key) => normalized[key] = null);
4279
- else extend(normalized, raw);
4280
- if (isObject$1(comp)) cache.set(comp, normalized);
4281
- return normalized;
4282
- }
4283
- function isEmitListener(options, key) {
4284
- if (!options || !isOn(key)) return false;
4285
- key = key.slice(2).replace(/Once$/, "");
4286
- return hasOwn$1(options, key[0].toLowerCase() + key.slice(1)) || hasOwn$1(options, hyphenate$1(key)) || hasOwn$1(options, key);
4287
- }
4288
- let accessedAttrs = false;
4289
- function markAttrsAccessed() {
4290
- accessedAttrs = true;
4291
- }
4292
- function renderComponentRoot(instance) {
4293
- const { type: Component, vnode, proxy, withProxy, propsOptions: [propsOptions], slots, attrs, emit: emit$2, render: render$1, renderCache, props, data, setupState, ctx, inheritAttrs } = instance;
4294
- const prev = setCurrentRenderingInstance(instance);
4295
- let result;
4296
- let fallthroughAttrs;
4297
- if (!!(process.env.NODE_ENV !== "production")) accessedAttrs = false;
4298
- try {
4299
- if (vnode.shapeFlag & 4) {
4300
- const proxyToUse = withProxy || proxy;
4301
- const thisProxy = !!(process.env.NODE_ENV !== "production") && setupState.__isScriptSetup ? new Proxy(proxyToUse, { get(target, key, receiver) {
4302
- warn$1(`Property '${String(key)}' was accessed via 'this'. Avoid using 'this' in templates.`);
4303
- return Reflect.get(target, key, receiver);
4304
- } }) : proxyToUse;
4305
- result = normalizeVNode(render$1.call(thisProxy, proxyToUse, renderCache, !!(process.env.NODE_ENV !== "production") ? shallowReadonly(props) : props, setupState, data, ctx));
4306
- fallthroughAttrs = attrs;
4307
- } else {
4308
- const render2 = Component;
4309
- if (!!(process.env.NODE_ENV !== "production") && attrs === props) markAttrsAccessed();
4310
- result = normalizeVNode(render2.length > 1 ? render2(!!(process.env.NODE_ENV !== "production") ? shallowReadonly(props) : props, !!(process.env.NODE_ENV !== "production") ? {
4311
- get attrs() {
4312
- markAttrsAccessed();
4313
- return shallowReadonly(attrs);
4314
- },
4315
- slots,
4316
- emit: emit$2
4317
- } : {
4318
- attrs,
4319
- slots,
4320
- emit: emit$2
4321
- }) : render2(!!(process.env.NODE_ENV !== "production") ? shallowReadonly(props) : props, null));
4322
- fallthroughAttrs = Component.props ? attrs : getFunctionalFallthrough(attrs);
4323
- }
4324
- } catch (err) {
4325
- blockStack.length = 0;
4326
- handleError(err, instance, 1);
4327
- result = createVNode(Comment);
4328
- }
4329
- let root = result;
4330
- let setRoot = void 0;
4331
- if (!!(process.env.NODE_ENV !== "production") && result.patchFlag > 0 && result.patchFlag & 2048) [root, setRoot] = getChildRoot(result);
4332
- if (fallthroughAttrs && inheritAttrs !== false) {
4333
- const keys = Object.keys(fallthroughAttrs);
4334
- const { shapeFlag } = root;
4335
- if (keys.length) {
4336
- if (shapeFlag & 7) {
4337
- if (propsOptions && keys.some(isModelListener)) fallthroughAttrs = filterModelListeners(fallthroughAttrs, propsOptions);
4338
- root = cloneVNode(root, fallthroughAttrs, false, true);
4339
- } else if (!!(process.env.NODE_ENV !== "production") && !accessedAttrs && root.type !== Comment) {
4340
- const allAttrs = Object.keys(attrs);
4341
- const eventAttrs = [];
4342
- const extraAttrs = [];
4343
- for (let i = 0, l = allAttrs.length; i < l; i++) {
4344
- const key = allAttrs[i];
4345
- if (isOn(key)) {
4346
- if (!isModelListener(key)) eventAttrs.push(key[2].toLowerCase() + key.slice(3));
4347
- } else extraAttrs.push(key);
4348
- }
4349
- if (extraAttrs.length) warn$1(`Extraneous non-props attributes (${extraAttrs.join(", ")}) were passed to component but could not be automatically inherited because component renders fragment or text or teleport root nodes.`);
4350
- if (eventAttrs.length) warn$1(`Extraneous non-emits event listeners (${eventAttrs.join(", ")}) were passed to component but could not be automatically inherited because component renders fragment or text root nodes. If the listener is intended to be a component custom event listener only, declare it using the "emits" option.`);
4351
- }
4352
- }
4353
- }
4354
- if (vnode.dirs) {
4355
- if (!!(process.env.NODE_ENV !== "production") && !isElementRoot(root)) warn$1(`Runtime directive used on component with non-element root node. The directives will not function as intended.`);
4356
- root = cloneVNode(root, null, false, true);
4357
- root.dirs = root.dirs ? root.dirs.concat(vnode.dirs) : vnode.dirs;
4358
- }
4359
- if (vnode.transition) {
4360
- if (!!(process.env.NODE_ENV !== "production") && !isElementRoot(root)) warn$1(`Component inside <Transition> renders non-element root node that cannot be animated.`);
4361
- setTransitionHooks(root, vnode.transition);
4362
- }
4363
- if (!!(process.env.NODE_ENV !== "production") && setRoot) setRoot(root);
4364
- else result = root;
4365
- setCurrentRenderingInstance(prev);
4366
- return result;
4367
- }
4368
- const getChildRoot = (vnode) => {
4369
- const rawChildren = vnode.children;
4370
- const dynamicChildren = vnode.dynamicChildren;
4371
- const childRoot = filterSingleRoot(rawChildren, false);
4372
- if (!childRoot) return [vnode, void 0];
4373
- else if (!!(process.env.NODE_ENV !== "production") && childRoot.patchFlag > 0 && childRoot.patchFlag & 2048) return getChildRoot(childRoot);
4374
- const index = rawChildren.indexOf(childRoot);
4375
- const dynamicIndex = dynamicChildren ? dynamicChildren.indexOf(childRoot) : -1;
4376
- const setRoot = (updatedRoot) => {
4377
- rawChildren[index] = updatedRoot;
4378
- if (dynamicChildren) {
4379
- if (dynamicIndex > -1) dynamicChildren[dynamicIndex] = updatedRoot;
4380
- else if (updatedRoot.patchFlag > 0) vnode.dynamicChildren = [...dynamicChildren, updatedRoot];
4313
+ const teleportEnd = el && el[TeleportEndKey];
4314
+ return teleportEnd ? hostNextSibling(teleportEnd) : el;
4315
+ };
4316
+ let isFlushing = false;
4317
+ const render$1 = (vnode, container, namespace) => {
4318
+ if (vnode == null) {
4319
+ if (container._vnode) unmount(container._vnode, null, null, true);
4320
+ } else patch(container._vnode || null, vnode, container, null, null, null, namespace);
4321
+ container._vnode = vnode;
4322
+ if (!isFlushing) {
4323
+ isFlushing = true;
4324
+ flushPreFlushCbs();
4325
+ flushPostFlushCbs();
4326
+ isFlushing = false;
4381
4327
  }
4382
4328
  };
4383
- return [normalizeVNode(childRoot), setRoot];
4384
- };
4385
- function filterSingleRoot(children, recurse = true) {
4386
- let singleRoot;
4387
- for (let i = 0; i < children.length; i++) {
4388
- const child = children[i];
4389
- if (isVNode(child)) {
4390
- if (child.type !== Comment || child.children === "v-if") if (singleRoot) return;
4391
- else {
4392
- singleRoot = child;
4393
- if (!!(process.env.NODE_ENV !== "production") && recurse && singleRoot.patchFlag > 0 && singleRoot.patchFlag & 2048) return filterSingleRoot(singleRoot.children);
4394
- }
4395
- } else return;
4329
+ const internals = {
4330
+ p: patch,
4331
+ um: unmount,
4332
+ m: move,
4333
+ r: remove$1,
4334
+ mt: mountComponent,
4335
+ mc: mountChildren,
4336
+ pc: patchChildren,
4337
+ pbc: patchBlockChildren,
4338
+ n: getNextHostNode,
4339
+ o: options
4340
+ };
4341
+ let hydrate;
4342
+ let hydrateNode;
4343
+ if (createHydrationFns) [hydrate, hydrateNode] = createHydrationFns(internals);
4344
+ return {
4345
+ render: render$1,
4346
+ hydrate,
4347
+ createApp: createAppAPI(render$1, hydrate)
4348
+ };
4349
+ }
4350
+ function resolveChildrenNamespace({ type, props }, currentNamespace) {
4351
+ return currentNamespace === "svg" && type === "foreignObject" || currentNamespace === "mathml" && type === "annotation-xml" && props && props.encoding && props.encoding.includes("html") ? void 0 : currentNamespace;
4352
+ }
4353
+ function toggleRecurse({ effect: effect$1, job }, allowed) {
4354
+ if (allowed) {
4355
+ effect$1.flags |= 32;
4356
+ job.flags |= 4;
4357
+ } else {
4358
+ effect$1.flags &= -33;
4359
+ job.flags &= -5;
4396
4360
  }
4397
- return singleRoot;
4398
4361
  }
4399
- const getFunctionalFallthrough = (attrs) => {
4400
- let res;
4401
- for (const key in attrs) if (key === "class" || key === "style" || isOn(key)) (res || (res = {}))[key] = attrs[key];
4402
- return res;
4403
- };
4404
- const filterModelListeners = (attrs, props) => {
4405
- const res = {};
4406
- for (const key in attrs) if (!isModelListener(key) || !(key.slice(9) in props)) res[key] = attrs[key];
4407
- return res;
4408
- };
4409
- const isElementRoot = (vnode) => {
4410
- return vnode.shapeFlag & 7 || vnode.type === Comment;
4411
- };
4412
- function shouldUpdateComponent(prevVNode, nextVNode, optimized) {
4413
- const { props: prevProps, children: prevChildren, component } = prevVNode;
4414
- const { props: nextProps, children: nextChildren, patchFlag } = nextVNode;
4415
- const emits = component.emitsOptions;
4416
- if (!!(process.env.NODE_ENV !== "production") && (prevChildren || nextChildren) && isHmrUpdating) return true;
4417
- if (nextVNode.dirs || nextVNode.transition) return true;
4418
- if (optimized && patchFlag >= 0) {
4419
- if (patchFlag & 1024) return true;
4420
- if (patchFlag & 16) {
4421
- if (!prevProps) return !!nextProps;
4422
- return hasPropsChanged(prevProps, nextProps, emits);
4423
- } else if (patchFlag & 8) {
4424
- const dynamicProps = nextVNode.dynamicProps;
4425
- for (let i = 0; i < dynamicProps.length; i++) {
4426
- const key = dynamicProps[i];
4427
- if (nextProps[key] !== prevProps[key] && !isEmitListener(emits, key)) return true;
4362
+ function needTransition(parentSuspense, transition) {
4363
+ return (!parentSuspense || parentSuspense && !parentSuspense.pendingBranch) && transition && !transition.persisted;
4364
+ }
4365
+ function traverseStaticChildren(n1, n2, shallow = false) {
4366
+ const ch1 = n1.children;
4367
+ const ch2 = n2.children;
4368
+ if (isArray(ch1) && isArray(ch2)) for (let i = 0; i < ch1.length; i++) {
4369
+ const c1 = ch1[i];
4370
+ let c2 = ch2[i];
4371
+ if (c2.shapeFlag & 1 && !c2.dynamicChildren) {
4372
+ if (c2.patchFlag <= 0 || c2.patchFlag === 32) {
4373
+ c2 = ch2[i] = cloneIfMounted(ch2[i]);
4374
+ c2.el = c1.el;
4428
4375
  }
4376
+ if (!shallow && c2.patchFlag !== -2) traverseStaticChildren(c1, c2);
4429
4377
  }
4430
- } else {
4431
- if (prevChildren || nextChildren) {
4432
- if (!nextChildren || !nextChildren.$stable) return true;
4433
- }
4434
- if (prevProps === nextProps) return false;
4435
- if (!prevProps) return !!nextProps;
4436
- if (!nextProps) return true;
4437
- return hasPropsChanged(prevProps, nextProps, emits);
4378
+ if (c2.type === Text && c2.patchFlag !== -1) c2.el = c1.el;
4379
+ if (c2.type === Comment && !c2.el) c2.el = c1.el;
4380
+ if (!!(process.env.NODE_ENV !== "production")) c2.el && (c2.el.__vnode = c2);
4438
4381
  }
4439
- return false;
4440
4382
  }
4441
- function hasPropsChanged(prevProps, nextProps, emitsOptions) {
4442
- const nextKeys = Object.keys(nextProps);
4443
- if (nextKeys.length !== Object.keys(prevProps).length) return true;
4444
- for (let i = 0; i < nextKeys.length; i++) {
4445
- const key = nextKeys[i];
4446
- if (nextProps[key] !== prevProps[key] && !isEmitListener(emitsOptions, key)) return true;
4383
+ function getSequence(arr) {
4384
+ const p$1 = arr.slice();
4385
+ const result = [0];
4386
+ let i, j, u, v, c;
4387
+ const len = arr.length;
4388
+ for (i = 0; i < len; i++) {
4389
+ const arrI = arr[i];
4390
+ if (arrI !== 0) {
4391
+ j = result[result.length - 1];
4392
+ if (arr[j] < arrI) {
4393
+ p$1[i] = j;
4394
+ result.push(i);
4395
+ continue;
4396
+ }
4397
+ u = 0;
4398
+ v = result.length - 1;
4399
+ while (u < v) {
4400
+ c = u + v >> 1;
4401
+ if (arr[result[c]] < arrI) u = c + 1;
4402
+ else v = c;
4403
+ }
4404
+ if (arrI < arr[result[u]]) {
4405
+ if (u > 0) p$1[i] = result[u - 1];
4406
+ result[u] = i;
4407
+ }
4408
+ }
4447
4409
  }
4448
- return false;
4449
- }
4450
- function updateHOCHostEl({ vnode, parent }, el) {
4451
- while (parent) {
4452
- const root = parent.subTree;
4453
- if (root.suspense && root.suspense.activeBranch === vnode) root.el = vnode.el;
4454
- if (root === vnode) {
4455
- (vnode = parent.vnode).el = el;
4456
- parent = parent.parent;
4457
- } else break;
4410
+ u = result.length;
4411
+ v = result[u - 1];
4412
+ while (u-- > 0) {
4413
+ result[u] = v;
4414
+ v = p$1[v];
4458
4415
  }
4416
+ return result;
4417
+ }
4418
+ function locateNonHydratedAsyncRoot(instance) {
4419
+ const subComponent = instance.subTree.component;
4420
+ if (subComponent) if (subComponent.asyncDep && !subComponent.asyncResolved) return subComponent;
4421
+ else return locateNonHydratedAsyncRoot(subComponent);
4422
+ }
4423
+ function invalidateMount(hooks) {
4424
+ if (hooks) for (let i = 0; i < hooks.length; i++) hooks[i].flags |= 8;
4459
4425
  }
4460
4426
  const isSuspense = (type) => type.__isSuspense;
4461
4427
  function queueEffectWithSuspense(fn, suspense) {
@@ -4640,6 +4606,11 @@ function deepCloneVNode(vnode) {
4640
4606
  function createTextVNode(text = " ", flag = 0) {
4641
4607
  return createVNode(Text, null, text, flag);
4642
4608
  }
4609
+ function createStaticVNode(content, numberOfNodes) {
4610
+ const vnode = createVNode(Static, null, content);
4611
+ vnode.staticCount = numberOfNodes;
4612
+ return vnode;
4613
+ }
4643
4614
  function createCommentVNode(text = "", asBlock = false) {
4644
4615
  return asBlock ? (openBlock(), createBlock(Comment, null, text)) : createVNode(Comment, null, text);
4645
4616
  }
@@ -4835,7 +4806,6 @@ function setupComponent(instance, isSSR = false, optimized = false) {
4835
4806
  return setupResult;
4836
4807
  }
4837
4808
  function setupStatefulComponent(instance, isSSR) {
4838
- var _a;
4839
4809
  const Component = instance.type;
4840
4810
  if (!!(process.env.NODE_ENV !== "production")) {
4841
4811
  if (Component.name) validateComponentName(Component.name, instance.appContext.config);
@@ -4871,10 +4841,7 @@ function setupStatefulComponent(instance, isSSR) {
4871
4841
  });
4872
4842
  else {
4873
4843
  instance.asyncDep = setupResult;
4874
- if (!!(process.env.NODE_ENV !== "production") && !instance.suspense) {
4875
- const name = (_a = Component.name) != null ? _a : "Anonymous";
4876
- warn$1(`Component <${name}>: setup function returned a promise, but no <Suspense> boundary was found in the parent component tree. A component with async setup() must be nested in a <Suspense> in order to be rendered.`);
4877
- }
4844
+ if (!!(process.env.NODE_ENV !== "production") && !instance.suspense) warn$1(`Component <${formatComponentName(instance, Component)}>: setup function returned a promise, but no <Suspense> boundary was found in the parent component tree. A component with async setup() must be nested in a <Suspense> in order to be rendered.`);
4878
4845
  }
4879
4846
  } else handleSetupResult(instance, setupResult, isSSR);
4880
4847
  } else finishComponentSetup(instance, isSSR);
@@ -5010,11 +4977,11 @@ function formatComponentName(instance, Component, isRoot = false) {
5010
4977
  const match = Component.__file.match(/([^/\\]+)\.\w+$/);
5011
4978
  if (match) name = match[1];
5012
4979
  }
5013
- if (!name && instance && instance.parent) {
4980
+ if (!name && instance) {
5014
4981
  const inferFromRegistry = (registry) => {
5015
4982
  for (const key in registry) if (registry[key] === Component) return key;
5016
4983
  };
5017
- name = inferFromRegistry(instance.components || instance.parent.type.components) || inferFromRegistry(instance.appContext.components);
4984
+ name = inferFromRegistry(instance.components) || instance.parent && inferFromRegistry(instance.parent.type.components) || inferFromRegistry(instance.appContext.components);
5018
4985
  }
5019
4986
  return name ? classify(name) : isRoot ? `App` : `Anonymous`;
5020
4987
  }
@@ -5191,13 +5158,18 @@ function initCustomFormatter() {
5191
5158
  if (window.devtoolsFormatters) window.devtoolsFormatters.push(formatter);
5192
5159
  else window.devtoolsFormatters = [formatter];
5193
5160
  }
5194
- const version = "3.5.22";
5161
+ const version = "3.5.25";
5195
5162
  const warn = !!(process.env.NODE_ENV !== "production") ? warn$1 : NOOP;
5196
5163
  const devtools = (process.env.NODE_ENV, devtools$1);
5197
5164
  const setDevtoolsHook = (process.env.NODE_ENV, setDevtoolsHook$1);
5198
5165
 
5199
5166
  //#endregion
5200
- //#region ../../node_modules/.pnpm/@vue+runtime-dom@3.5.22/node_modules/@vue/runtime-dom/dist/runtime-dom.esm-bundler.js
5167
+ //#region ../../node_modules/.pnpm/@vue+runtime-dom@3.5.25/node_modules/@vue/runtime-dom/dist/runtime-dom.esm-bundler.js
5168
+ /**
5169
+ * @vue/runtime-dom v3.5.25
5170
+ * (c) 2018-present Yuxi (Evan) You and Vue contributors
5171
+ * @license MIT
5172
+ **/
5201
5173
  let policy = void 0;
5202
5174
  const tt = typeof window !== "undefined" && window.trustedTypes;
5203
5175
  if (tt) try {
@@ -5413,10 +5385,8 @@ function patchEvent(el, rawName, prevValue, nextValue, instance = null) {
5413
5385
  if (nextValue && existingInvoker) existingInvoker.value = !!(process.env.NODE_ENV !== "production") ? sanitizeEventValue(nextValue, rawName) : nextValue;
5414
5386
  else {
5415
5387
  const [name, options] = parseName(rawName);
5416
- if (nextValue) {
5417
- const invoker = invokers[rawName] = createInvoker(!!(process.env.NODE_ENV !== "production") ? sanitizeEventValue(nextValue, rawName) : nextValue, instance);
5418
- addEventListener(el, name, invoker, options);
5419
- } else if (existingInvoker) {
5388
+ if (nextValue) addEventListener(el, name, invokers[rawName] = createInvoker(!!(process.env.NODE_ENV !== "production") ? sanitizeEventValue(nextValue, rawName) : nextValue, instance), options);
5389
+ else if (existingInvoker) {
5420
5390
  removeEventListener(el, name, existingInvoker, options);
5421
5391
  invokers[rawName] = void 0;
5422
5392
  }
@@ -5488,6 +5458,7 @@ function shouldSetAsProp(el, key, value, isSVG) {
5488
5458
  return false;
5489
5459
  }
5490
5460
  if (key === "spellcheck" || key === "draggable" || key === "translate" || key === "autocorrect") return false;
5461
+ if (key === "sandbox" && el.tagName === "IFRAME") return false;
5491
5462
  if (key === "form") return false;
5492
5463
  if (key === "list" && el.tagName === "INPUT") return false;
5493
5464
  if (key === "type" && el.tagName === "TEXTAREA") return false;
@@ -5533,6 +5504,8 @@ var VueElement = class VueElement extends BaseClass {
5533
5504
  this._nonce = this._def.nonce;
5534
5505
  this._connected = false;
5535
5506
  this._resolved = false;
5507
+ this._patching = false;
5508
+ this._dirty = false;
5536
5509
  this._numberProps = null;
5537
5510
  this._styleChildren = /* @__PURE__ */ new WeakSet();
5538
5511
  this._ob = null;
@@ -5645,7 +5618,7 @@ var VueElement = class VueElement extends BaseClass {
5645
5618
  return this._getProp(key);
5646
5619
  },
5647
5620
  set(val) {
5648
- this._setProp(key, val, true, true);
5621
+ this._setProp(key, val, true, !this._patching);
5649
5622
  }
5650
5623
  });
5651
5624
  }
@@ -5668,6 +5641,7 @@ var VueElement = class VueElement extends BaseClass {
5668
5641
  */
5669
5642
  _setProp(key, val, shouldReflect = true, shouldUpdate = false) {
5670
5643
  if (val !== this._props[key]) {
5644
+ this._dirty = true;
5671
5645
  if (val === REMOVAL) delete this._props[key];
5672
5646
  else {
5673
5647
  this._props[key] = val;
@@ -5785,10 +5759,12 @@ var VueElement = class VueElement extends BaseClass {
5785
5759
  _getSlots() {
5786
5760
  const roots = [this];
5787
5761
  if (this._teleportTargets) roots.push(...this._teleportTargets);
5788
- return roots.reduce((res, i) => {
5789
- res.push(...Array.from(i.querySelectorAll("slot")));
5790
- return res;
5791
- }, []);
5762
+ const slots = /* @__PURE__ */ new Set();
5763
+ for (const root of roots) {
5764
+ const found = root.querySelectorAll("slot");
5765
+ for (let i = 0; i < found.length; i++) slots.add(found[i]);
5766
+ }
5767
+ return Array.from(slots);
5792
5768
  }
5793
5769
  /**
5794
5770
  * @internal
@@ -5799,6 +5775,20 @@ var VueElement = class VueElement extends BaseClass {
5799
5775
  /**
5800
5776
  * @internal
5801
5777
  */
5778
+ _beginPatch() {
5779
+ this._patching = true;
5780
+ this._dirty = false;
5781
+ }
5782
+ /**
5783
+ * @internal
5784
+ */
5785
+ _endPatch() {
5786
+ this._patching = false;
5787
+ if (this._dirty && this._instance) this._update();
5788
+ }
5789
+ /**
5790
+ * @internal
5791
+ */
5802
5792
  _removeChildStyle(comp) {
5803
5793
  if (!!(process.env.NODE_ENV !== "production")) {
5804
5794
  this._styleChildren.delete(comp);
@@ -5812,9 +5802,6 @@ var VueElement = class VueElement extends BaseClass {
5812
5802
  }
5813
5803
  }
5814
5804
  };
5815
- const moveCbKey = Symbol("_moveCb");
5816
- const enterCbKey = Symbol("_enterCb");
5817
- const assignKey = Symbol("_assign");
5818
5805
  const systemModifiers = [
5819
5806
  "ctrl",
5820
5807
  "shift",
@@ -5923,28 +5910,50 @@ function normalizeContainer(container) {
5923
5910
  }
5924
5911
 
5925
5912
  //#endregion
5926
- //#region ../../node_modules/.pnpm/vue@3.5.22_typescript@5.9.3/node_modules/vue/dist/vue.runtime.esm-bundler.js
5913
+ //#region ../../node_modules/.pnpm/vue@3.5.25_typescript@5.9.3/node_modules/vue/dist/vue.runtime.esm-bundler.js
5914
+ /**
5915
+ * vue v3.5.25
5916
+ * (c) 2018-present Yuxi (Evan) You and Vue contributors
5917
+ * @license MIT
5918
+ **/
5927
5919
  function initDev() {
5928
5920
  initCustomFormatter();
5929
5921
  }
5930
5922
  if (!!(process.env.NODE_ENV !== "production")) initDev();
5931
5923
 
5932
5924
  //#endregion
5933
- //#region ../../node_modules/.pnpm/@vueuse+shared@13.9.0_vue@3.5.22_typescript@5.9.3_/node_modules/@vueuse/shared/index.mjs
5934
- function tryOnScopeDispose(fn) {
5925
+ //#region ../../node_modules/.pnpm/@vueuse+shared@14.1.0_vue@3.5.25_typescript@5.9.3_/node_modules/@vueuse/shared/dist/index.js
5926
+ /**
5927
+ * Call onScopeDispose() if it's inside an effect scope lifecycle, if not, do nothing
5928
+ *
5929
+ * @param fn
5930
+ */
5931
+ function tryOnScopeDispose(fn, failSilently) {
5935
5932
  if (getCurrentScope()) {
5936
- onScopeDispose(fn);
5933
+ onScopeDispose(fn, failSilently);
5937
5934
  return true;
5938
5935
  }
5939
5936
  return false;
5940
5937
  }
5941
5938
  const localProvidedStateMap = /* @__PURE__ */ new WeakMap();
5942
- const injectLocal = /* @__NO_SIDE_EFFECTS__ */ (...args) => {
5943
- var _a;
5939
+ /**
5940
+ * On the basis of `inject`, it is allowed to directly call inject to obtain the value after call provide in the same component.
5941
+ *
5942
+ * @example
5943
+ * ```ts
5944
+ * injectLocal('MyInjectionKey', 1)
5945
+ * const injectedValue = injectLocal('MyInjectionKey') // injectedValue === 1
5946
+ * ```
5947
+ *
5948
+ * @__NO_SIDE_EFFECTS__
5949
+ */
5950
+ const injectLocal = (...args) => {
5951
+ var _getCurrentInstance;
5944
5952
  const key = args[0];
5945
- const instance = (_a = getCurrentInstance()) == null ? void 0 : _a.proxy;
5946
- if (instance == null && !hasInjectionContext()) throw new Error("injectLocal must be called in setup");
5947
- if (instance && localProvidedStateMap.has(instance) && key in localProvidedStateMap.get(instance)) return localProvidedStateMap.get(instance)[key];
5953
+ const instance = (_getCurrentInstance = getCurrentInstance()) === null || _getCurrentInstance === void 0 ? void 0 : _getCurrentInstance.proxy;
5954
+ const owner = instance !== null && instance !== void 0 ? instance : getCurrentScope();
5955
+ if (owner == null && !hasInjectionContext()) throw new Error("injectLocal must be called in setup");
5956
+ if (owner && localProvidedStateMap.has(owner) && key in localProvidedStateMap.get(owner)) return localProvidedStateMap.get(owner)[key];
5948
5957
  return inject(...args);
5949
5958
  };
5950
5959
  const isClient = typeof window !== "undefined" && typeof document !== "undefined";
@@ -5961,6 +5970,9 @@ function toRef(...args) {
5961
5970
  set: noop
5962
5971
  }))) : ref(r);
5963
5972
  }
5973
+ /**
5974
+ * @internal
5975
+ */
5964
5976
  function createFilterWrapper(filter, fn) {
5965
5977
  function wrapper(...args) {
5966
5978
  return new Promise((resolve, reject) => {
@@ -5973,20 +5985,23 @@ function createFilterWrapper(filter, fn) {
5973
5985
  }
5974
5986
  return wrapper;
5975
5987
  }
5976
- const bypassFilter = (invoke) => {
5977
- return invoke();
5988
+ const bypassFilter = (invoke$1) => {
5989
+ return invoke$1();
5978
5990
  };
5991
+ /**
5992
+ * Create an EventFilter that debounce the events
5993
+ */
5979
5994
  function debounceFilter(ms, options = {}) {
5980
5995
  let timer;
5981
5996
  let maxTimer;
5982
5997
  let lastRejector = noop;
5983
- const _clearTimeout = (timer2) => {
5984
- clearTimeout(timer2);
5998
+ const _clearTimeout = (timer$1) => {
5999
+ clearTimeout(timer$1);
5985
6000
  lastRejector();
5986
6001
  lastRejector = noop;
5987
6002
  };
5988
6003
  let lastInvoker;
5989
- const filter = (invoke) => {
6004
+ const filter = (invoke$1) => {
5990
6005
  const duration = toValue(ms);
5991
6006
  const maxDuration = toValue(options.maxWait);
5992
6007
  if (timer) _clearTimeout(timer);
@@ -5995,11 +6010,11 @@ function debounceFilter(ms, options = {}) {
5995
6010
  _clearTimeout(maxTimer);
5996
6011
  maxTimer = void 0;
5997
6012
  }
5998
- return Promise.resolve(invoke());
6013
+ return Promise.resolve(invoke$1());
5999
6014
  }
6000
6015
  return new Promise((resolve, reject) => {
6001
6016
  lastRejector = options.rejectOnCancel ? reject : resolve;
6002
- lastInvoker = invoke;
6017
+ lastInvoker = invoke$1;
6003
6018
  if (maxDuration && !maxTimer) maxTimer = setTimeout(() => {
6004
6019
  if (timer) _clearTimeout(timer);
6005
6020
  maxTimer = void 0;
@@ -6008,12 +6023,18 @@ function debounceFilter(ms, options = {}) {
6008
6023
  timer = setTimeout(() => {
6009
6024
  if (maxTimer) _clearTimeout(maxTimer);
6010
6025
  maxTimer = void 0;
6011
- resolve(invoke());
6026
+ resolve(invoke$1());
6012
6027
  }, duration);
6013
6028
  });
6014
6029
  };
6015
6030
  return filter;
6016
6031
  }
6032
+ /**
6033
+ * EventFilter that gives extra controls to pause and resume the filter
6034
+ *
6035
+ * @param extendFilter Extra filter to apply when the PausableFilter is active, default to none
6036
+ * @param options Options to configure the filter
6037
+ */
6017
6038
  function pausableFilter(extendFilter = bypassFilter, options = {}) {
6018
6039
  const { initialState = "active" } = options;
6019
6040
  const isActive = toRef(initialState === "active");
@@ -6033,6 +6054,9 @@ function pausableFilter(extendFilter = bypassFilter, options = {}) {
6033
6054
  eventFilter
6034
6055
  };
6035
6056
  }
6057
+ /**
6058
+ * Get a px value for SSR use, do not rely on this method outside of SSR as REM unit is assumed at 16px, which might not be the case on the client
6059
+ */
6036
6060
  function pxValue(px) {
6037
6061
  return px.endsWith("rem") ? Number.parseFloat(px) * 16 : Number.parseFloat(px);
6038
6062
  }
@@ -6040,10 +6064,10 @@ function toArray(value) {
6040
6064
  return Array.isArray(value) ? value : [value];
6041
6065
  }
6042
6066
  function cacheStringFunction(fn) {
6043
- const cache = /* @__PURE__ */ Object.create(null);
6044
- return (str) => {
6067
+ const cache = Object.create(null);
6068
+ return ((str) => {
6045
6069
  return cache[str] || (cache[str] = fn(str));
6046
- };
6070
+ });
6047
6071
  }
6048
6072
  const hyphenateRE = /\B([A-Z])/g;
6049
6073
  const hyphenate = cacheStringFunction((str) => str.replace(hyphenateRE, "-$1").toLowerCase());
@@ -6054,16 +6078,27 @@ const camelize = cacheStringFunction((str) => {
6054
6078
  function getLifeCycleTarget(target) {
6055
6079
  return target || getCurrentInstance();
6056
6080
  }
6057
- /* @__NO_SIDE_EFFECTS__ */
6081
+ /**
6082
+ * Debounce execution of a function.
6083
+ *
6084
+ * @see https://vueuse.org/useDebounceFn
6085
+ * @param fn A function to be executed after delay milliseconds debounced.
6086
+ * @param ms A zero-or-greater delay in milliseconds. For event callbacks, values around 100 or 250 (or even higher) are most useful.
6087
+ * @param options Options
6088
+ *
6089
+ * @return A new, debounce, function.
6090
+ *
6091
+ * @__NO_SIDE_EFFECTS__
6092
+ */
6058
6093
  function useDebounceFn(fn, ms = 200, options = {}) {
6059
6094
  return createFilterWrapper(debounceFilter(ms, options), fn);
6060
6095
  }
6061
6096
  function watchWithFilter(source, cb, options = {}) {
6062
- const { eventFilter = bypassFilter,...watchOptions } = options;
6097
+ const { eventFilter = bypassFilter, ...watchOptions } = options;
6063
6098
  return watch(source, createFilterWrapper(eventFilter, cb), watchOptions);
6064
6099
  }
6065
6100
  function watchPausable(source, cb, options = {}) {
6066
- const { eventFilter: filter, initialState = "active",...watchOptions } = options;
6101
+ const { eventFilter: filter, initialState = "active", ...watchOptions } = options;
6067
6102
  const { eventFilter, pause, resume, isActive } = pausableFilter(filter, { initialState });
6068
6103
  return {
6069
6104
  stop: watchWithFilter(source, cb, {
@@ -6075,37 +6110,25 @@ function watchPausable(source, cb, options = {}) {
6075
6110
  isActive
6076
6111
  };
6077
6112
  }
6078
- function toRefs(objectRef, options = {}) {
6079
- if (!isRef(objectRef)) return toRefs$1(objectRef);
6080
- const result = Array.isArray(objectRef.value) ? Array.from({ length: objectRef.value.length }) : {};
6081
- for (const key in objectRef.value) result[key] = customRef(() => ({
6082
- get() {
6083
- return objectRef.value[key];
6084
- },
6085
- set(v) {
6086
- var _a;
6087
- if ((_a = toValue(options.replaceRef)) != null ? _a : true) if (Array.isArray(objectRef.value)) {
6088
- const copy = [...objectRef.value];
6089
- copy[key] = v;
6090
- objectRef.value = copy;
6091
- } else {
6092
- const newObject = {
6093
- ...objectRef.value,
6094
- [key]: v
6095
- };
6096
- Object.setPrototypeOf(newObject, Object.getPrototypeOf(objectRef.value));
6097
- objectRef.value = newObject;
6098
- }
6099
- else objectRef.value[key] = v;
6100
- }
6101
- }));
6102
- return result;
6103
- }
6113
+ /** @deprecated use `watchPausable` instead */
6114
+ const pausableWatch = watchPausable;
6115
+ /**
6116
+ * Call onMounted() if it's inside a component lifecycle, if not, just call the function
6117
+ *
6118
+ * @param fn
6119
+ * @param sync if set to false, it will run in the nextTick() of Vue
6120
+ * @param target
6121
+ */
6104
6122
  function tryOnMounted(fn, sync = true, target) {
6105
6123
  if (getLifeCycleTarget(target)) onMounted(fn, target);
6106
6124
  else if (sync) fn();
6107
6125
  else nextTick(fn);
6108
6126
  }
6127
+ /**
6128
+ * Shorthand for watching value with {immediate: true}
6129
+ *
6130
+ * @see https://vueuse.org/watchImmediate
6131
+ */
6109
6132
  function watchImmediate(source, cb, options) {
6110
6133
  return watch(source, cb, {
6111
6134
  ...options,
@@ -6114,22 +6137,22 @@ function watchImmediate(source, cb, options) {
6114
6137
  }
6115
6138
 
6116
6139
  //#endregion
6117
- //#region ../../node_modules/.pnpm/@vueuse+core@13.9.0_vue@3.5.22_typescript@5.9.3_/node_modules/@vueuse/core/index.mjs
6140
+ //#region ../../node_modules/.pnpm/@vueuse+core@14.1.0_vue@3.5.25_typescript@5.9.3_/node_modules/@vueuse/core/dist/index.js
6118
6141
  const defaultWindow = isClient ? window : void 0;
6119
6142
  const defaultDocument = isClient ? window.document : void 0;
6120
6143
  const defaultNavigator = isClient ? window.navigator : void 0;
6121
6144
  const defaultLocation = isClient ? window.location : void 0;
6145
+ /**
6146
+ * Get the dom element of a ref of element or Vue component instance
6147
+ *
6148
+ * @param elRef
6149
+ */
6122
6150
  function unrefElement(elRef) {
6123
- var _a;
6151
+ var _$el;
6124
6152
  const plain = toValue(elRef);
6125
- return (_a = plain == null ? void 0 : plain.$el) != null ? _a : plain;
6153
+ return (_$el = plain === null || plain === void 0 ? void 0 : plain.$el) !== null && _$el !== void 0 ? _$el : plain;
6126
6154
  }
6127
6155
  function useEventListener(...args) {
6128
- const cleanups = [];
6129
- const cleanup = () => {
6130
- cleanups.forEach((fn) => fn());
6131
- cleanups.length = 0;
6132
- };
6133
6156
  const register = (el, event, listener, options) => {
6134
6157
  el.addEventListener(event, listener, options);
6135
6158
  return () => el.removeEventListener(event, listener, options);
@@ -6138,28 +6161,30 @@ function useEventListener(...args) {
6138
6161
  const test = toArray(toValue(args[0])).filter((e) => e != null);
6139
6162
  return test.every((e) => typeof e !== "string") ? test : void 0;
6140
6163
  });
6141
- const stopWatch = watchImmediate(() => {
6142
- var _a, _b;
6164
+ return watchImmediate(() => {
6165
+ var _firstParamTargets$va, _firstParamTargets$va2;
6143
6166
  return [
6144
- (_b = (_a = firstParamTargets.value) == null ? void 0 : _a.map((e) => unrefElement(e))) != null ? _b : [defaultWindow].filter((e) => e != null),
6167
+ (_firstParamTargets$va = (_firstParamTargets$va2 = firstParamTargets.value) === null || _firstParamTargets$va2 === void 0 ? void 0 : _firstParamTargets$va2.map((e) => unrefElement(e))) !== null && _firstParamTargets$va !== void 0 ? _firstParamTargets$va : [defaultWindow].filter((e) => e != null),
6145
6168
  toArray(toValue(firstParamTargets.value ? args[1] : args[0])),
6146
6169
  toArray(unref(firstParamTargets.value ? args[2] : args[1])),
6147
6170
  toValue(firstParamTargets.value ? args[3] : args[2])
6148
6171
  ];
6149
- }, ([raw_targets, raw_events, raw_listeners, raw_options]) => {
6150
- cleanup();
6151
- if (!(raw_targets == null ? void 0 : raw_targets.length) || !(raw_events == null ? void 0 : raw_events.length) || !(raw_listeners == null ? void 0 : raw_listeners.length)) return;
6172
+ }, ([raw_targets, raw_events, raw_listeners, raw_options], _, onCleanup) => {
6173
+ if (!(raw_targets === null || raw_targets === void 0 ? void 0 : raw_targets.length) || !(raw_events === null || raw_events === void 0 ? void 0 : raw_events.length) || !(raw_listeners === null || raw_listeners === void 0 ? void 0 : raw_listeners.length)) return;
6152
6174
  const optionsClone = isObject(raw_options) ? { ...raw_options } : raw_options;
6153
- cleanups.push(...raw_targets.flatMap((el) => raw_events.flatMap((event) => raw_listeners.map((listener) => register(el, event, listener, optionsClone)))));
6175
+ const cleanups = raw_targets.flatMap((el) => raw_events.flatMap((event) => raw_listeners.map((listener) => register(el, event, listener, optionsClone))));
6176
+ onCleanup(() => {
6177
+ cleanups.forEach((fn) => fn());
6178
+ });
6154
6179
  }, { flush: "post" });
6155
- const stop$1 = () => {
6156
- stopWatch();
6157
- cleanup();
6158
- };
6159
- tryOnScopeDispose(cleanup);
6160
- return stop$1;
6161
6180
  }
6162
- /* @__NO_SIDE_EFFECTS__ */
6181
+ /**
6182
+ * Mounted state in ref.
6183
+ *
6184
+ * @see https://vueuse.org/useMounted
6185
+ *
6186
+ * @__NO_SIDE_EFFECTS__
6187
+ */
6163
6188
  function useMounted() {
6164
6189
  const isMounted = shallowRef(false);
6165
6190
  const instance = getCurrentInstance();
@@ -6170,14 +6195,23 @@ function useMounted() {
6170
6195
  }
6171
6196
  /* @__NO_SIDE_EFFECTS__ */
6172
6197
  function useSupported(callback) {
6173
- const isMounted = /* @__PURE__ */ useMounted();
6198
+ const isMounted = useMounted();
6174
6199
  return computed(() => {
6175
6200
  isMounted.value;
6176
6201
  return Boolean(callback());
6177
6202
  });
6178
6203
  }
6204
+ /**
6205
+ * Watch for changes being made to the DOM tree.
6206
+ *
6207
+ * @see https://vueuse.org/useMutationObserver
6208
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/MutationObserver MutationObserver MDN
6209
+ * @param target
6210
+ * @param callback
6211
+ * @param options
6212
+ */
6179
6213
  function useMutationObserver(target, callback, options = {}) {
6180
- const { window: window$1 = defaultWindow,...mutationOptions } = options;
6214
+ const { window: window$1 = defaultWindow, ...mutationOptions } = options;
6181
6215
  let observer;
6182
6216
  const isSupported$1 = /* @__PURE__ */ useSupported(() => window$1 && "MutationObserver" in window$1);
6183
6217
  const cleanup = () => {
@@ -6186,12 +6220,10 @@ function useMutationObserver(target, callback, options = {}) {
6186
6220
  observer = void 0;
6187
6221
  }
6188
6222
  };
6189
- const targets = computed(() => {
6190
- const value = toValue(target);
6191
- const items = toArray(value).map(unrefElement).filter(notNullish);
6223
+ const stopWatch = watch(computed(() => {
6224
+ const items = toArray(toValue(target)).map(unrefElement).filter(notNullish);
6192
6225
  return new Set(items);
6193
- });
6194
- const stopWatch = watch(targets, (newTargets) => {
6226
+ }), (newTargets) => {
6195
6227
  cleanup();
6196
6228
  if (isSupported$1.value && newTargets.size) {
6197
6229
  observer = new MutationObserver(callback);
@@ -6202,7 +6234,7 @@ function useMutationObserver(target, callback, options = {}) {
6202
6234
  flush: "post"
6203
6235
  });
6204
6236
  const takeRecords = () => {
6205
- return observer == null ? void 0 : observer.takeRecords();
6237
+ return observer === null || observer === void 0 ? void 0 : observer.takeRecords();
6206
6238
  };
6207
6239
  const stop$1 = () => {
6208
6240
  stopWatch();
@@ -6221,6 +6253,13 @@ function useSSRWidth() {
6221
6253
  const ssrWidth = hasInjectionContext() ? injectLocal(ssrWidthSymbol, null) : null;
6222
6254
  return typeof ssrWidth === "number" ? ssrWidth : void 0;
6223
6255
  }
6256
+ /**
6257
+ * Reactive Media Query.
6258
+ *
6259
+ * @see https://vueuse.org/useMediaQuery
6260
+ * @param query
6261
+ * @param options
6262
+ */
6224
6263
  function useMediaQuery(query, options = {}) {
6225
6264
  const { window: window$1 = defaultWindow, ssrWidth = /* @__PURE__ */ useSSRWidth() } = options;
6226
6265
  const isSupported$1 = /* @__PURE__ */ useSupported(() => window$1 && "matchMedia" in window$1 && typeof window$1.matchMedia === "function");
@@ -6299,26 +6338,28 @@ const StorageSerializers = {
6299
6338
  }
6300
6339
  };
6301
6340
  const customStorageEventName = "vueuse-storage";
6302
- function useStorage(key, defaults, storage, options = {}) {
6303
- var _a;
6341
+ /**
6342
+ * Reactive LocalStorage/SessionStorage.
6343
+ *
6344
+ * @see https://vueuse.org/useStorage
6345
+ */
6346
+ function useStorage(key, defaults$1, storage, options = {}) {
6347
+ var _options$serializer;
6304
6348
  const { flush = "pre", deep = true, listenToStorageChanges = true, writeDefaults = true, mergeDefaults = false, shallow, window: window$1 = defaultWindow, eventFilter, onError = (e) => {
6305
6349
  console.error(e);
6306
6350
  }, initOnMounted } = options;
6307
- const data = (shallow ? shallowRef : ref)(typeof defaults === "function" ? defaults() : defaults);
6351
+ const data = (shallow ? shallowRef : ref)(typeof defaults$1 === "function" ? defaults$1() : defaults$1);
6308
6352
  const keyComputed = computed(() => toValue(key));
6309
6353
  if (!storage) try {
6310
- storage = getSSRHandler("getDefaultStorage", () => {
6311
- var _a2;
6312
- return (_a2 = defaultWindow) == null ? void 0 : _a2.localStorage;
6313
- })();
6354
+ storage = getSSRHandler("getDefaultStorage", () => defaultWindow === null || defaultWindow === void 0 ? void 0 : defaultWindow.localStorage)();
6314
6355
  } catch (e) {
6315
6356
  onError(e);
6316
6357
  }
6317
6358
  if (!storage) return data;
6318
- const rawInit = toValue(defaults);
6359
+ const rawInit = toValue(defaults$1);
6319
6360
  const type = guessSerializerType(rawInit);
6320
- const serializer = (_a = options.serializer) != null ? _a : StorageSerializers[type];
6321
- const { pause: pauseWatch, resume: resumeWatch } = watchPausable(data, (newValue) => write(newValue), {
6361
+ const serializer = (_options$serializer = options.serializer) !== null && _options$serializer !== void 0 ? _options$serializer : StorageSerializers[type];
6362
+ const { pause: pauseWatch, resume: resumeWatch } = pausableWatch(data, (newValue) => write(newValue), {
6322
6363
  flush,
6323
6364
  deep,
6324
6365
  eventFilter
@@ -6333,6 +6374,12 @@ function useStorage(key, defaults, storage, options = {}) {
6333
6374
  if (initOnMounted && !firstMounted) return;
6334
6375
  updateFromCustomEvent(ev);
6335
6376
  };
6377
+ /**
6378
+ * The custom event is needed for same-document syncing when using custom
6379
+ * storage backends, but it doesn't work across different documents.
6380
+ *
6381
+ * TODO: Consider implementing a BroadcastChannel-based solution that fixes this.
6382
+ */
6336
6383
  if (window$1 && listenToStorageChanges) if (storage instanceof Storage) useEventListener(window$1, "storage", onStorageEvent, { passive: true });
6337
6384
  else useEventListener(window$1, customStorageEventName, onStorageCustomEvent);
6338
6385
  if (initOnMounted) tryOnMounted(() => {
@@ -6394,7 +6441,7 @@ function useStorage(key, defaults, storage, options = {}) {
6394
6441
  pauseWatch();
6395
6442
  try {
6396
6443
  const serializedData = serializer.write(data.value);
6397
- if (event === void 0 || (event == null ? void 0 : event.newValue) !== serializedData) data.value = read(event);
6444
+ if (event === void 0 || (event === null || event === void 0 ? void 0 : event.newValue) !== serializedData) data.value = read(event);
6398
6445
  } catch (e) {
6399
6446
  onError(e);
6400
6447
  } finally {
@@ -6407,18 +6454,28 @@ function useStorage(key, defaults, storage, options = {}) {
6407
6454
  }
6408
6455
  return data;
6409
6456
  }
6457
+ /**
6458
+ * Manipulate CSS variables.
6459
+ *
6460
+ * @see https://vueuse.org/useCssVar
6461
+ * @param prop
6462
+ * @param target
6463
+ * @param options
6464
+ */
6410
6465
  function useCssVar(prop, target, options = {}) {
6411
6466
  const { window: window$1 = defaultWindow, initialValue, observe = false } = options;
6412
6467
  const variable = shallowRef(initialValue);
6413
6468
  const elRef = computed(() => {
6414
- var _a;
6415
- return unrefElement(target) || ((_a = window$1 == null ? void 0 : window$1.document) == null ? void 0 : _a.documentElement);
6469
+ var _window$document;
6470
+ return unrefElement(target) || (window$1 === null || window$1 === void 0 || (_window$document = window$1.document) === null || _window$document === void 0 ? void 0 : _window$document.documentElement);
6416
6471
  });
6417
6472
  function updateCssVar() {
6418
- var _a;
6419
6473
  const key = toValue(prop);
6420
6474
  const el = toValue(elRef);
6421
- if (el && window$1 && key) variable.value = ((_a = window$1.getComputedStyle(el).getPropertyValue(key)) == null ? void 0 : _a.trim()) || variable.value || initialValue;
6475
+ if (el && window$1 && key) {
6476
+ var _window$getComputedSt;
6477
+ variable.value = ((_window$getComputedSt = window$1.getComputedStyle(el).getPropertyValue(key)) === null || _window$getComputedSt === void 0 ? void 0 : _window$getComputedSt.trim()) || variable.value || initialValue;
6478
+ }
6422
6479
  }
6423
6480
  if (observe) useMutationObserver(elRef, updateCssVar, {
6424
6481
  attributeFilter: ["style", "class"],
@@ -6430,13 +6487,21 @@ function useCssVar(prop, target, options = {}) {
6430
6487
  }, { immediate: true });
6431
6488
  watch([variable, elRef], ([val, el]) => {
6432
6489
  const raw_prop = toValue(prop);
6433
- if ((el == null ? void 0 : el.style) && raw_prop) if (val == null) el.style.removeProperty(raw_prop);
6490
+ if ((el === null || el === void 0 ? void 0 : el.style) && raw_prop) if (val == null) el.style.removeProperty(raw_prop);
6434
6491
  else el.style.setProperty(raw_prop, val);
6435
6492
  }, { immediate: true });
6436
6493
  return variable;
6437
6494
  }
6495
+ /**
6496
+ * Reports changes to the dimensions of an Element's content or the border-box
6497
+ *
6498
+ * @see https://vueuse.org/useResizeObserver
6499
+ * @param target
6500
+ * @param callback
6501
+ * @param options
6502
+ */
6438
6503
  function useResizeObserver(target, callback, options = {}) {
6439
- const { window: window$1 = defaultWindow,...observerOptions } = options;
6504
+ const { window: window$1 = defaultWindow, ...observerOptions } = options;
6440
6505
  let observer;
6441
6506
  const isSupported$1 = /* @__PURE__ */ useSupported(() => window$1 && "ResizeObserver" in window$1);
6442
6507
  const cleanup = () => {
@@ -6445,11 +6510,10 @@ function useResizeObserver(target, callback, options = {}) {
6445
6510
  observer = void 0;
6446
6511
  }
6447
6512
  };
6448
- const targets = computed(() => {
6513
+ const stopWatch = watch(computed(() => {
6449
6514
  const _targets = toValue(target);
6450
6515
  return Array.isArray(_targets) ? _targets.map((el) => unrefElement(el)) : [unrefElement(_targets)];
6451
- });
6452
- const stopWatch = watch(targets, (els) => {
6516
+ }), (els) => {
6453
6517
  cleanup();
6454
6518
  if (isSupported$1.value && window$1) {
6455
6519
  observer = new ResizeObserver(callback);
@@ -6469,6 +6533,12 @@ function useResizeObserver(target, callback, options = {}) {
6469
6533
  stop: stop$1
6470
6534
  };
6471
6535
  }
6536
+ /**
6537
+ * Reactive bounding box of an HTML element.
6538
+ *
6539
+ * @see https://vueuse.org/useElementBounding
6540
+ * @param target
6541
+ */
6472
6542
  function useElementBounding(target, options = {}) {
6473
6543
  const { reset = true, windowResize = true, windowScroll = true, immediate = true, updateTiming = "sync" } = options;
6474
6544
  const height = shallowRef(0);
@@ -6531,14 +6601,27 @@ function useElementBounding(target, options = {}) {
6531
6601
  update
6532
6602
  };
6533
6603
  }
6604
+ /**
6605
+ * Reactive LocalStorage.
6606
+ *
6607
+ * @see https://vueuse.org/useLocalStorage
6608
+ * @param key
6609
+ * @param initialValue
6610
+ * @param options
6611
+ */
6534
6612
  function useLocalStorage(key, initialValue, options = {}) {
6535
6613
  const { window: window$1 = defaultWindow } = options;
6536
- return useStorage(key, initialValue, window$1 == null ? void 0 : window$1.localStorage, options);
6614
+ return useStorage(key, initialValue, window$1 === null || window$1 === void 0 ? void 0 : window$1.localStorage, options);
6537
6615
  }
6538
6616
  const topVarName = "--vueuse-safe-area-top";
6539
6617
  const rightVarName = "--vueuse-safe-area-right";
6540
6618
  const bottomVarName = "--vueuse-safe-area-bottom";
6541
6619
  const leftVarName = "--vueuse-safe-area-left";
6620
+ /**
6621
+ * Reactive `env(safe-area-inset-*)`
6622
+ *
6623
+ * @see https://vueuse.org/useScreenSafeArea
6624
+ */
6542
6625
  function useScreenSafeArea() {
6543
6626
  const top = shallowRef("");
6544
6627
  const right = shallowRef("");
@@ -6610,7 +6693,14 @@ const DEFAULT_UNITS = [
6610
6693
  name: "year"
6611
6694
  }
6612
6695
  ];
6613
- /* @__NO_SIDE_EFFECTS__ */
6696
+ /**
6697
+ * Reactive window size.
6698
+ *
6699
+ * @see https://vueuse.org/useWindowSize
6700
+ * @param options
6701
+ *
6702
+ * @__NO_SIDE_EFFECTS__
6703
+ */
6614
6704
  function useWindowSize(options = {}) {
6615
6705
  const { window: window$1 = defaultWindow, initialWidth = Number.POSITIVE_INFINITY, initialHeight = Number.POSITIVE_INFINITY, listenOrientation = true, includeScrollbar = true, type = "inner" } = options;
6616
6706
  const width = shallowRef(initialWidth);
@@ -6636,10 +6726,7 @@ function useWindowSize(options = {}) {
6636
6726
  const listenerOptions = { passive: true };
6637
6727
  useEventListener("resize", update, listenerOptions);
6638
6728
  if (window$1 && type === "visual" && window$1.visualViewport) useEventListener(window$1.visualViewport, "resize", update, listenerOptions);
6639
- if (listenOrientation) {
6640
- const matches = useMediaQuery("(orientation: portrait)");
6641
- watch(matches, () => update());
6642
- }
6729
+ if (listenOrientation) watch(useMediaQuery("(orientation: portrait)"), () => update());
6643
6730
  return {
6644
6731
  width,
6645
6732
  height
@@ -6647,4 +6734,56 @@ function useWindowSize(options = {}) {
6647
6734
  }
6648
6735
 
6649
6736
  //#endregion
6650
- export { Fragment, computed, createBaseVNode, createBlock, createCommentVNode, createElementBlock, createVNode, defineComponent, defineCustomElement, markRaw, mergeModels, nextTick, normalizeClass, normalizeStyle, onMounted, onUnmounted, openBlock, reactive, ref, renderList, renderSlot, toDisplayString, toRefs, toRefs$1, unref, useElementBounding, useEventListener, useLocalStorage, useModel, useScreenSafeArea, useTemplateRef, useWindowSize, vShow, watch, watchEffect, withCtx, withDirectives, withModifiers };
6737
+ //#region src/client/webcomponents/state/docks.ts
6738
+ function DEFAULT_DOCK_PANEL_STORE() {
6739
+ return {
6740
+ width: 80,
6741
+ height: 80,
6742
+ top: 0,
6743
+ left: 10,
6744
+ position: "bottom",
6745
+ open: false,
6746
+ inactiveTimeout: 3e3
6747
+ };
6748
+ }
6749
+ function createDockEntryState(entry, selected) {
6750
+ const events = createEventEmitter();
6751
+ const state = reactive({
6752
+ entryMeta: entry,
6753
+ get isActive() {
6754
+ return selected.value?.id === entry.id;
6755
+ },
6756
+ domElements: {},
6757
+ events: markRaw(events)
6758
+ });
6759
+ watch(() => selected.value?.id, (newSelectedId) => {
6760
+ if (newSelectedId === entry.id) events.emitOnce("entry:activated");
6761
+ else events.emitOnce("entry:deactivated");
6762
+ }, { immediate: true });
6763
+ watch(() => state.domElements.iframe, (newIframe) => {
6764
+ if (newIframe) events.emitOnce("dom:iframe:mounted", newIframe);
6765
+ }, { immediate: true });
6766
+ watch(() => state.domElements.panel, (newPanel) => {
6767
+ if (newPanel) events.emitOnce("dom:panel:mounted", newPanel);
6768
+ }, { immediate: true });
6769
+ return state;
6770
+ }
6771
+ let _docksEntriesRef;
6772
+ async function useDocksEntries(rpc) {
6773
+ if (_docksEntriesRef) return _docksEntriesRef;
6774
+ const dockEntries = _docksEntriesRef = shallowRef([]);
6775
+ async function updateDocksEntries() {
6776
+ dockEntries.value = (await rpc.call("vite:internal:docks:list")).map((entry) => Object.freeze(entry));
6777
+ console.log("[VITE DEVTOOLS] Docks Entries Updated", [...dockEntries.value]);
6778
+ }
6779
+ rpc.client.register({
6780
+ name: "vite:internal:docks:updated",
6781
+ type: "action",
6782
+ handler: () => updateDocksEntries()
6783
+ });
6784
+ await updateDocksEntries();
6785
+ return dockEntries;
6786
+ }
6787
+
6788
+ //#endregion
6789
+ export { watchEffect as A, normalizeStyle as B, onMounted as C, renderSlot as D, renderList as E, ref as F, shallowRef as I, toRefs$1 as L, withDirectives as M, markRaw as N, useTemplateRef as O, reactive as P, unref as R, nextTick as S, openBlock as T, toDisplayString as V, createCommentVNode as _, useEventListener as a, createVNode as b, useWindowSize as c, vShow as d, withModifiers as f, createBlock as g, createBaseVNode as h, useElementBounding as i, withCtx as j, watch as k, watchImmediate as l, computed as m, createDockEntryState as n, useLocalStorage as o, Fragment as p, useDocksEntries as r, useScreenSafeArea as s, DEFAULT_DOCK_PANEL_STORE as t, defineCustomElement as u, createElementBlock as v, onUnmounted as w, defineComponent as x, createStaticVNode as y, normalizeClass as z };