@vueuse/components 10.3.0 → 10.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.iife.js CHANGED
@@ -134,9 +134,8 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
134
134
  });
135
135
 
136
136
  function unrefElement(elRef) {
137
- var _a;
138
137
  const plain = shared.toValue(elRef);
139
- return (_a = plain == null ? void 0 : plain.$el) != null ? _a : plain;
138
+ return plain?.$el ?? plain;
140
139
  }
141
140
 
142
141
  const defaultWindow = shared.isClient ? window : void 0;
@@ -231,9 +230,8 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
231
230
  }, { passive: true }),
232
231
  detectIframe && useEventListener(window, "blur", (event) => {
233
232
  setTimeout(() => {
234
- var _a;
235
233
  const el = unrefElement(target);
236
- if (((_a = window.document.activeElement) == null ? void 0 : _a.tagName) === "IFRAME" && !(el == null ? void 0 : el.contains(window.document.activeElement)))
234
+ if (window.document.activeElement?.tagName === "IFRAME" && !el?.contains(window.document.activeElement))
237
235
  handler(event);
238
236
  }, 0);
239
237
  })
@@ -303,42 +301,25 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
303
301
  return useEventListener(target, eventName, listener, passive);
304
302
  }
305
303
 
306
- var __defProp$e = Object.defineProperty;
307
- var __getOwnPropSymbols$g = Object.getOwnPropertySymbols;
308
- var __hasOwnProp$g = Object.prototype.hasOwnProperty;
309
- var __propIsEnum$g = Object.prototype.propertyIsEnumerable;
310
- var __defNormalProp$e = (obj, key, value) => key in obj ? __defProp$e(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
311
- var __spreadValues$e = (a, b) => {
312
- for (var prop in b || (b = {}))
313
- if (__hasOwnProp$g.call(b, prop))
314
- __defNormalProp$e(a, prop, b[prop]);
315
- if (__getOwnPropSymbols$g)
316
- for (var prop of __getOwnPropSymbols$g(b)) {
317
- if (__propIsEnum$g.call(b, prop))
318
- __defNormalProp$e(a, prop, b[prop]);
319
- }
320
- return a;
321
- };
322
304
  const vOnKeyStroke = {
323
305
  [shared.directiveHooks.mounted](el, binding) {
324
- var _a, _b;
325
- const keys = (_b = (_a = binding.arg) == null ? void 0 : _a.split(",")) != null ? _b : true;
306
+ const keys = binding.arg?.split(",") ?? true;
326
307
  if (typeof binding.value === "function") {
327
308
  onKeyStroke(keys, binding.value, {
328
309
  target: el
329
310
  });
330
311
  } else {
331
312
  const [handler, options] = binding.value;
332
- onKeyStroke(keys, handler, __spreadValues$e({
333
- target: el
334
- }, options));
313
+ onKeyStroke(keys, handler, {
314
+ target: el,
315
+ ...options
316
+ });
335
317
  }
336
318
  }
337
319
  };
338
320
 
339
321
  const DEFAULT_DELAY = 500;
340
322
  function onLongPress(target, handler, options) {
341
- var _a, _b;
342
323
  const elementRef = vueDemi.computed(() => unrefElement(target));
343
324
  let timeout;
344
325
  function clear() {
@@ -348,22 +329,21 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
348
329
  }
349
330
  }
350
331
  function onDown(ev) {
351
- var _a2, _b2, _c, _d;
352
- if (((_a2 = options == null ? void 0 : options.modifiers) == null ? void 0 : _a2.self) && ev.target !== elementRef.value)
332
+ if (options?.modifiers?.self && ev.target !== elementRef.value)
353
333
  return;
354
334
  clear();
355
- if ((_b2 = options == null ? void 0 : options.modifiers) == null ? void 0 : _b2.prevent)
335
+ if (options?.modifiers?.prevent)
356
336
  ev.preventDefault();
357
- if ((_c = options == null ? void 0 : options.modifiers) == null ? void 0 : _c.stop)
337
+ if (options?.modifiers?.stop)
358
338
  ev.stopPropagation();
359
339
  timeout = setTimeout(
360
340
  () => handler(ev),
361
- (_d = options == null ? void 0 : options.delay) != null ? _d : DEFAULT_DELAY
341
+ options?.delay ?? DEFAULT_DELAY
362
342
  );
363
343
  }
364
344
  const listenerOptions = {
365
- capture: (_a = options == null ? void 0 : options.modifiers) == null ? void 0 : _a.capture,
366
- once: (_b = options == null ? void 0 : options.modifiers) == null ? void 0 : _b.once
345
+ capture: options?.modifiers?.capture,
346
+ once: options?.modifiers?.once
367
347
  };
368
348
  useEventListener(elementRef, "pointerdown", onDown, listenerOptions);
369
349
  useEventListener(elementRef, ["pointerup", "pointerleave"], clear, listenerOptions);
@@ -449,22 +429,6 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
449
429
  return rawInit == null ? "any" : rawInit instanceof Set ? "set" : rawInit instanceof Map ? "map" : rawInit instanceof Date ? "date" : typeof rawInit === "boolean" ? "boolean" : typeof rawInit === "string" ? "string" : typeof rawInit === "object" ? "object" : !Number.isNaN(rawInit) ? "number" : "any";
450
430
  }
451
431
 
452
- var __defProp$d = Object.defineProperty;
453
- var __getOwnPropSymbols$f = Object.getOwnPropertySymbols;
454
- var __hasOwnProp$f = Object.prototype.hasOwnProperty;
455
- var __propIsEnum$f = Object.prototype.propertyIsEnumerable;
456
- var __defNormalProp$d = (obj, key, value) => key in obj ? __defProp$d(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
457
- var __spreadValues$d = (a, b) => {
458
- for (var prop in b || (b = {}))
459
- if (__hasOwnProp$f.call(b, prop))
460
- __defNormalProp$d(a, prop, b[prop]);
461
- if (__getOwnPropSymbols$f)
462
- for (var prop of __getOwnPropSymbols$f(b)) {
463
- if (__propIsEnum$f.call(b, prop))
464
- __defNormalProp$d(a, prop, b[prop]);
465
- }
466
- return a;
467
- };
468
432
  const StorageSerializers = {
469
433
  boolean: {
470
434
  read: (v) => v === "true",
@@ -501,7 +465,6 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
501
465
  };
502
466
  const customStorageEventName = "vueuse-storage";
503
467
  function useStorage(key, defaults, storage, options = {}) {
504
- var _a;
505
468
  const {
506
469
  flush = "pre",
507
470
  deep = true,
@@ -518,10 +481,7 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
518
481
  const data = (shallow ? vueDemi.shallowRef : vueDemi.ref)(defaults);
519
482
  if (!storage) {
520
483
  try {
521
- storage = getSSRHandler("getDefaultStorage", () => {
522
- var _a2;
523
- return (_a2 = defaultWindow) == null ? void 0 : _a2.localStorage;
524
- })();
484
+ storage = getSSRHandler("getDefaultStorage", () => defaultWindow?.localStorage)();
525
485
  } catch (e) {
526
486
  onError(e);
527
487
  }
@@ -530,7 +490,7 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
530
490
  return data;
531
491
  const rawInit = shared.toValue(defaults);
532
492
  const type = guessSerializerType(rawInit);
533
- const serializer = (_a = options.serializer) != null ? _a : StorageSerializers[type];
493
+ const serializer = options.serializer ?? StorageSerializers[type];
534
494
  const { pause: pauseWatch, resume: resumeWatch } = shared.pausableWatch(
535
495
  data,
536
496
  () => write(data.value),
@@ -578,7 +538,7 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
578
538
  if (typeof mergeDefaults === "function")
579
539
  return mergeDefaults(value, rawInit);
580
540
  else if (type === "object" && !Array.isArray(value))
581
- return __spreadValues$d(__spreadValues$d({}, rawInit), value);
541
+ return { ...rawInit, ...value };
582
542
  return value;
583
543
  } else if (typeof rawValue !== "string") {
584
544
  return rawValue;
@@ -600,7 +560,8 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
600
560
  return;
601
561
  pauseWatch();
602
562
  try {
603
- data.value = read(event);
563
+ if (event?.newValue !== serializer.write(data.value))
564
+ data.value = read(event);
604
565
  } catch (e) {
605
566
  onError(e);
606
567
  } finally {
@@ -669,22 +630,6 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
669
630
  return useMediaQuery("(prefers-color-scheme: dark)", options);
670
631
  }
671
632
 
672
- var __defProp$c = Object.defineProperty;
673
- var __getOwnPropSymbols$e = Object.getOwnPropertySymbols;
674
- var __hasOwnProp$e = Object.prototype.hasOwnProperty;
675
- var __propIsEnum$e = Object.prototype.propertyIsEnumerable;
676
- var __defNormalProp$c = (obj, key, value) => key in obj ? __defProp$c(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
677
- var __spreadValues$c = (a, b) => {
678
- for (var prop in b || (b = {}))
679
- if (__hasOwnProp$e.call(b, prop))
680
- __defNormalProp$c(a, prop, b[prop]);
681
- if (__getOwnPropSymbols$e)
682
- for (var prop of __getOwnPropSymbols$e(b)) {
683
- if (__propIsEnum$e.call(b, prop))
684
- __defNormalProp$c(a, prop, b[prop]);
685
- }
686
- return a;
687
- };
688
633
  function useColorMode(options = {}) {
689
634
  const {
690
635
  selector = "html",
@@ -698,11 +643,12 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
698
643
  emitAuto,
699
644
  disableTransition = true
700
645
  } = options;
701
- const modes = __spreadValues$c({
646
+ const modes = {
702
647
  auto: "",
703
648
  light: "light",
704
- dark: "dark"
705
- }, options.modes || {});
649
+ dark: "dark",
650
+ ...options.modes || {}
651
+ };
706
652
  const preferredDark = usePreferredDark({ window });
707
653
  const system = vueDemi.computed(() => preferredDark.value ? "dark" : "light");
708
654
  const store = storageRef || (storageKey == null ? shared.toRef(initialValue) : useStorage(storageKey, initialValue, storage, { window, listenToStorageChanges }));
@@ -712,7 +658,7 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
712
658
  const updateHTMLAttrs = getSSRHandler(
713
659
  "updateHTMLAttrs",
714
660
  (selector2, attribute2, value) => {
715
- const el = typeof selector2 === "string" ? window == null ? void 0 : window.document.querySelector(selector2) : unrefElement(selector2);
661
+ const el = typeof selector2 === "string" ? window?.document.querySelector(selector2) : unrefElement(selector2);
716
662
  if (!el)
717
663
  return;
718
664
  let style;
@@ -740,8 +686,7 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
740
686
  }
741
687
  );
742
688
  function defaultOnChanged(mode) {
743
- var _a;
744
- updateHTMLAttrs(selector, attribute, (_a = modes[mode]) != null ? _a : mode);
689
+ updateHTMLAttrs(selector, attribute, modes[mode] ?? mode);
745
690
  }
746
691
  function onChanged(mode) {
747
692
  if (options.onChanged)
@@ -859,25 +804,6 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
859
804
  }
860
805
  });
861
806
 
862
- var __defProp$b = Object.defineProperty;
863
- var __defProps$9 = Object.defineProperties;
864
- var __getOwnPropDescs$9 = Object.getOwnPropertyDescriptors;
865
- var __getOwnPropSymbols$d = Object.getOwnPropertySymbols;
866
- var __hasOwnProp$d = Object.prototype.hasOwnProperty;
867
- var __propIsEnum$d = Object.prototype.propertyIsEnumerable;
868
- var __defNormalProp$b = (obj, key, value) => key in obj ? __defProp$b(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
869
- var __spreadValues$b = (a, b) => {
870
- for (var prop in b || (b = {}))
871
- if (__hasOwnProp$d.call(b, prop))
872
- __defNormalProp$b(a, prop, b[prop]);
873
- if (__getOwnPropSymbols$d)
874
- for (var prop of __getOwnPropSymbols$d(b)) {
875
- if (__propIsEnum$d.call(b, prop))
876
- __defNormalProp$b(a, prop, b[prop]);
877
- }
878
- return a;
879
- };
880
- var __spreadProps$9 = (a, b) => __defProps$9(a, __getOwnPropDescs$9(b));
881
807
  const UseDraggable = /* @__PURE__ */ /* #__PURE__ */ vueDemi.defineComponent({
882
808
  name: "UseDraggable",
883
809
  props: [
@@ -897,10 +823,7 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
897
823
  ],
898
824
  setup(props, { slots }) {
899
825
  const target = vueDemi.ref();
900
- const handle = vueDemi.computed(() => {
901
- var _a;
902
- return (_a = props.handle) != null ? _a : target.value;
903
- });
826
+ const handle = vueDemi.computed(() => props.handle ?? target.value);
904
827
  const storageValue = props.storageKey && core.useStorage(
905
828
  props.storageKey,
906
829
  shared.toValue(props.initialValue) || { x: 0, y: 0 },
@@ -908,18 +831,18 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
908
831
  );
909
832
  const initialValue = storageValue || props.initialValue || { x: 0, y: 0 };
910
833
  const onEnd = (position, event) => {
911
- var _a;
912
- (_a = props.onEnd) == null ? void 0 : _a.call(props, position, event);
834
+ props.onEnd?.(position, event);
913
835
  if (!storageValue)
914
836
  return;
915
837
  storageValue.value.x = position.x;
916
838
  storageValue.value.y = position.y;
917
839
  };
918
- const data = vueDemi.reactive(core.useDraggable(target, __spreadProps$9(__spreadValues$b({}, props), {
840
+ const data = vueDemi.reactive(core.useDraggable(target, {
841
+ ...props,
919
842
  handle,
920
843
  initialValue,
921
844
  onEnd
922
- })));
845
+ }));
923
846
  return () => {
924
847
  if (slots.default)
925
848
  return vueDemi.h(props.as || "div", { ref: target, style: `touch-action:none;${data.style}` }, slots.default(data));
@@ -977,7 +900,7 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
977
900
 
978
901
  const UseElementSize = /* @__PURE__ */ /* #__PURE__ */ vueDemi.defineComponent({
979
902
  name: "UseElementSize",
980
- props: ["width", "height", "box"],
903
+ props: ["width", "height", "box", "as"],
981
904
  setup(props, { slots }) {
982
905
  const target = vueDemi.ref();
983
906
  const data = vueDemi.reactive(core.useElementSize(target, { width: props.width, height: props.height }, { box: props.box }));
@@ -988,23 +911,8 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
988
911
  }
989
912
  });
990
913
 
991
- var __getOwnPropSymbols$c = Object.getOwnPropertySymbols;
992
- var __hasOwnProp$c = Object.prototype.hasOwnProperty;
993
- var __propIsEnum$c = Object.prototype.propertyIsEnumerable;
994
- var __objRest$1 = (source, exclude) => {
995
- var target = {};
996
- for (var prop in source)
997
- if (__hasOwnProp$c.call(source, prop) && exclude.indexOf(prop) < 0)
998
- target[prop] = source[prop];
999
- if (source != null && __getOwnPropSymbols$c)
1000
- for (var prop of __getOwnPropSymbols$c(source)) {
1001
- if (exclude.indexOf(prop) < 0 && __propIsEnum$c.call(source, prop))
1002
- target[prop] = source[prop];
1003
- }
1004
- return target;
1005
- };
1006
914
  function useResizeObserver(target, callback, options = {}) {
1007
- const _a = options, { window = defaultWindow } = _a, observerOptions = __objRest$1(_a, ["window"]);
915
+ const { window = defaultWindow, ...observerOptions } = options;
1008
916
  let observer;
1009
917
  const isSupported = useSupported(() => window && "ResizeObserver" in window);
1010
918
  const cleanup = () => {
@@ -1041,10 +949,7 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
1041
949
 
1042
950
  function useElementSize(target, initialSize = { width: 0, height: 0 }, options = {}) {
1043
951
  const { window = defaultWindow, box = "content-box" } = options;
1044
- const isSVG = vueDemi.computed(() => {
1045
- var _a, _b;
1046
- return (_b = (_a = unrefElement(target)) == null ? void 0 : _a.namespaceURI) == null ? void 0 : _b.includes("svg");
1047
- });
952
+ const isSVG = vueDemi.computed(() => unrefElement(target)?.namespaceURI?.includes("svg"));
1048
953
  const width = vueDemi.ref(initialSize.width);
1049
954
  const height = vueDemi.ref(initialSize.height);
1050
955
  useResizeObserver(
@@ -1086,8 +991,7 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
1086
991
 
1087
992
  const vElementSize = {
1088
993
  [shared.directiveHooks.mounted](el, binding) {
1089
- var _a;
1090
- const handler = typeof binding.value === "function" ? binding.value : (_a = binding.value) == null ? void 0 : _a[0];
994
+ const handler = typeof binding.value === "function" ? binding.value : binding.value?.[0];
1091
995
  const options = typeof binding.value === "function" ? [] : binding.value.slice(1);
1092
996
  const { width, height } = useElementSize(el, ...options);
1093
997
  vueDemi.watch([width, height], ([width2, height2]) => handler({ width: width2, height: height2 }));
@@ -1177,7 +1081,8 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
1177
1081
  },
1178
1082
  {
1179
1083
  root: scrollTarget,
1180
- window
1084
+ window,
1085
+ threshold: 0
1181
1086
  }
1182
1087
  );
1183
1088
  return elementIsVisible;
@@ -1248,25 +1153,6 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
1248
1153
  }
1249
1154
  });
1250
1155
 
1251
- var __defProp$a = Object.defineProperty;
1252
- var __defProps$8 = Object.defineProperties;
1253
- var __getOwnPropDescs$8 = Object.getOwnPropertyDescriptors;
1254
- var __getOwnPropSymbols$b = Object.getOwnPropertySymbols;
1255
- var __hasOwnProp$b = Object.prototype.hasOwnProperty;
1256
- var __propIsEnum$b = Object.prototype.propertyIsEnumerable;
1257
- var __defNormalProp$a = (obj, key, value) => key in obj ? __defProp$a(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1258
- var __spreadValues$a = (a, b) => {
1259
- for (var prop in b || (b = {}))
1260
- if (__hasOwnProp$b.call(b, prop))
1261
- __defNormalProp$a(a, prop, b[prop]);
1262
- if (__getOwnPropSymbols$b)
1263
- for (var prop of __getOwnPropSymbols$b(b)) {
1264
- if (__propIsEnum$b.call(b, prop))
1265
- __defNormalProp$a(a, prop, b[prop]);
1266
- }
1267
- return a;
1268
- };
1269
- var __spreadProps$8 = (a, b) => __defProps$8(a, __getOwnPropDescs$8(b));
1270
1156
  function useAsyncState(promise, initialState, options) {
1271
1157
  const {
1272
1158
  immediate = true,
@@ -1276,7 +1162,7 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
1276
1162
  resetOnExecute = true,
1277
1163
  shallow = true,
1278
1164
  throwError
1279
- } = options != null ? options : {};
1165
+ } = options ?? {};
1280
1166
  const state = shallow ? vueDemi.shallowRef(initialState) : vueDemi.ref(initialState);
1281
1167
  const isReady = vueDemi.ref(false);
1282
1168
  const isLoading = vueDemi.ref(false);
@@ -1319,29 +1205,14 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
1319
1205
  shared.until(isLoading).toBe(false).then(() => resolve(shell)).catch(reject);
1320
1206
  });
1321
1207
  }
1322
- return __spreadProps$8(__spreadValues$a({}, shell), {
1208
+ return {
1209
+ ...shell,
1323
1210
  then(onFulfilled, onRejected) {
1324
1211
  return waitUntilIsLoaded().then(onFulfilled, onRejected);
1325
1212
  }
1326
- });
1213
+ };
1327
1214
  }
1328
1215
 
1329
- var __defProp$9 = Object.defineProperty;
1330
- var __getOwnPropSymbols$a = Object.getOwnPropertySymbols;
1331
- var __hasOwnProp$a = Object.prototype.hasOwnProperty;
1332
- var __propIsEnum$a = Object.prototype.propertyIsEnumerable;
1333
- var __defNormalProp$9 = (obj, key, value) => key in obj ? __defProp$9(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1334
- var __spreadValues$9 = (a, b) => {
1335
- for (var prop in b || (b = {}))
1336
- if (__hasOwnProp$a.call(b, prop))
1337
- __defNormalProp$9(a, prop, b[prop]);
1338
- if (__getOwnPropSymbols$a)
1339
- for (var prop of __getOwnPropSymbols$a(b)) {
1340
- if (__propIsEnum$a.call(b, prop))
1341
- __defNormalProp$9(a, prop, b[prop]);
1342
- }
1343
- return a;
1344
- };
1345
1216
  async function loadImage(options) {
1346
1217
  return new Promise((resolve, reject) => {
1347
1218
  const img = new Image();
@@ -1367,9 +1238,10 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
1367
1238
  const state = useAsyncState(
1368
1239
  () => loadImage(shared.toValue(options)),
1369
1240
  void 0,
1370
- __spreadValues$9({
1371
- resetOnExecute: true
1372
- }, asyncStateOptions)
1241
+ {
1242
+ resetOnExecute: true,
1243
+ ...asyncStateOptions
1244
+ }
1373
1245
  );
1374
1246
  vueDemi.watch(
1375
1247
  () => shared.toValue(options),
@@ -1445,15 +1317,14 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
1445
1317
  }
1446
1318
  });
1447
1319
  function scrollTo(_x, _y) {
1448
- var _a, _b, _c;
1449
1320
  if (!window)
1450
1321
  return;
1451
1322
  const _element = shared.toValue(element);
1452
1323
  if (!_element)
1453
1324
  return;
1454
- (_c = _element instanceof Document ? window.document.body : _element) == null ? void 0 : _c.scrollTo({
1455
- top: (_a = shared.toValue(_y)) != null ? _a : y.value,
1456
- left: (_b = shared.toValue(_x)) != null ? _b : x.value,
1325
+ (_element instanceof Document ? window.document.body : _element)?.scrollTo({
1326
+ top: shared.toValue(_y) ?? y.value,
1327
+ left: shared.toValue(_x) ?? x.value,
1457
1328
  behavior: shared.toValue(behavior)
1458
1329
  });
1459
1330
  }
@@ -1484,7 +1355,7 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
1484
1355
  const setArrivedState = (target) => {
1485
1356
  if (!window)
1486
1357
  return;
1487
- const el = target === window ? target.document.documentElement : target === window.document ? target.documentElement : target;
1358
+ const el = target.document ? target.document.documentElement : target.documentElement ?? target;
1488
1359
  const { display, flexDirection } = getComputedStyle(el);
1489
1360
  const scrollLeft = el.scrollLeft;
1490
1361
  directions.left = scrollLeft < internalX.value;
@@ -1518,7 +1389,7 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
1518
1389
  const onScrollHandler = (e) => {
1519
1390
  if (!window)
1520
1391
  return;
1521
- const eventTarget = e.target === window.document ? e.target.documentElement : e.target;
1392
+ const eventTarget = e.target.documentElement ?? e.target;
1522
1393
  setArrivedState(eventTarget);
1523
1394
  isScrolling.value = true;
1524
1395
  onScrollEndDebounced(e);
@@ -1550,48 +1421,33 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
1550
1421
  };
1551
1422
  }
1552
1423
 
1553
- var __defProp$8 = Object.defineProperty;
1554
- var __defProps$7 = Object.defineProperties;
1555
- var __getOwnPropDescs$7 = Object.getOwnPropertyDescriptors;
1556
- var __getOwnPropSymbols$9 = Object.getOwnPropertySymbols;
1557
- var __hasOwnProp$9 = Object.prototype.hasOwnProperty;
1558
- var __propIsEnum$9 = Object.prototype.propertyIsEnumerable;
1559
- var __defNormalProp$8 = (obj, key, value) => key in obj ? __defProp$8(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1560
- var __spreadValues$8 = (a, b) => {
1561
- for (var prop in b || (b = {}))
1562
- if (__hasOwnProp$9.call(b, prop))
1563
- __defNormalProp$8(a, prop, b[prop]);
1564
- if (__getOwnPropSymbols$9)
1565
- for (var prop of __getOwnPropSymbols$9(b)) {
1566
- if (__propIsEnum$9.call(b, prop))
1567
- __defNormalProp$8(a, prop, b[prop]);
1568
- }
1569
- return a;
1570
- };
1571
- var __spreadProps$7 = (a, b) => __defProps$7(a, __getOwnPropDescs$7(b));
1424
+ function resolveElement(el) {
1425
+ if (typeof Window !== "undefined" && el instanceof Window)
1426
+ return el.document.documentElement;
1427
+ if (typeof Document !== "undefined" && el instanceof Document)
1428
+ return el.documentElement;
1429
+ return el;
1430
+ }
1431
+
1572
1432
  function useInfiniteScroll(element, onLoadMore, options = {}) {
1573
- var _a;
1574
1433
  const {
1575
1434
  direction = "bottom",
1576
1435
  interval = 100
1577
1436
  } = options;
1578
1437
  const state = vueDemi.reactive(useScroll(
1579
1438
  element,
1580
- __spreadProps$7(__spreadValues$8({}, options), {
1581
- offset: __spreadValues$8({
1582
- [direction]: (_a = options.distance) != null ? _a : 0
1583
- }, options.offset)
1584
- })
1439
+ {
1440
+ ...options,
1441
+ offset: {
1442
+ [direction]: options.distance ?? 0,
1443
+ ...options.offset
1444
+ }
1445
+ }
1585
1446
  ));
1586
1447
  const promise = vueDemi.ref();
1587
1448
  const isLoading = vueDemi.computed(() => !!promise.value);
1588
1449
  const observedElement = vueDemi.computed(() => {
1589
- const el = shared.toValue(element);
1590
- if (el instanceof Window)
1591
- return window.document.documentElement;
1592
- if (el instanceof Document)
1593
- return document.documentElement;
1594
- return el;
1450
+ return resolveElement(shared.toValue(element));
1595
1451
  });
1596
1452
  const isElementVisible = useElementVisibility(observedElement);
1597
1453
  function checkAndLoad() {
@@ -1665,31 +1521,12 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
1665
1521
  }
1666
1522
  });
1667
1523
 
1668
- var __defProp$7 = Object.defineProperty;
1669
- var __defProps$6 = Object.defineProperties;
1670
- var __getOwnPropDescs$6 = Object.getOwnPropertyDescriptors;
1671
- var __getOwnPropSymbols$8 = Object.getOwnPropertySymbols;
1672
- var __hasOwnProp$8 = Object.prototype.hasOwnProperty;
1673
- var __propIsEnum$8 = Object.prototype.propertyIsEnumerable;
1674
- var __defNormalProp$7 = (obj, key, value) => key in obj ? __defProp$7(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1675
- var __spreadValues$7 = (a, b) => {
1676
- for (var prop in b || (b = {}))
1677
- if (__hasOwnProp$8.call(b, prop))
1678
- __defNormalProp$7(a, prop, b[prop]);
1679
- if (__getOwnPropSymbols$8)
1680
- for (var prop of __getOwnPropSymbols$8(b)) {
1681
- if (__propIsEnum$8.call(b, prop))
1682
- __defNormalProp$7(a, prop, b[prop]);
1683
- }
1684
- return a;
1685
- };
1686
- var __spreadProps$6 = (a, b) => __defProps$6(a, __getOwnPropDescs$6(b));
1687
1524
  const UseMousePressed = /* @__PURE__ */ /* #__PURE__ */ vueDemi.defineComponent({
1688
1525
  name: "UseMousePressed",
1689
1526
  props: ["touch", "initialValue", "as"],
1690
1527
  setup(props, { slots }) {
1691
1528
  const target = vueDemi.ref();
1692
- const data = vueDemi.reactive(core.useMousePressed(__spreadProps$6(__spreadValues$7({}, props), { target })));
1529
+ const data = vueDemi.reactive(core.useMousePressed({ ...props, target }));
1693
1530
  return () => {
1694
1531
  if (slots.default)
1695
1532
  return vueDemi.h(props.as || "div", { ref: target }, slots.default(data));
@@ -1708,30 +1545,11 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
1708
1545
  }
1709
1546
  });
1710
1547
 
1711
- var __defProp$6 = Object.defineProperty;
1712
- var __defProps$5 = Object.defineProperties;
1713
- var __getOwnPropDescs$5 = Object.getOwnPropertyDescriptors;
1714
- var __getOwnPropSymbols$7 = Object.getOwnPropertySymbols;
1715
- var __hasOwnProp$7 = Object.prototype.hasOwnProperty;
1716
- var __propIsEnum$7 = Object.prototype.propertyIsEnumerable;
1717
- var __defNormalProp$6 = (obj, key, value) => key in obj ? __defProp$6(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1718
- var __spreadValues$6 = (a, b) => {
1719
- for (var prop in b || (b = {}))
1720
- if (__hasOwnProp$7.call(b, prop))
1721
- __defNormalProp$6(a, prop, b[prop]);
1722
- if (__getOwnPropSymbols$7)
1723
- for (var prop of __getOwnPropSymbols$7(b)) {
1724
- if (__propIsEnum$7.call(b, prop))
1725
- __defNormalProp$6(a, prop, b[prop]);
1726
- }
1727
- return a;
1728
- };
1729
- var __spreadProps$5 = (a, b) => __defProps$5(a, __getOwnPropDescs$5(b));
1730
1548
  const UseNow = /* @__PURE__ */ /* #__PURE__ */ vueDemi.defineComponent({
1731
1549
  name: "UseNow",
1732
1550
  props: ["interval"],
1733
1551
  setup(props, { slots }) {
1734
- const data = vueDemi.reactive(core.useNow(__spreadProps$5(__spreadValues$6({}, props), { controls: true })));
1552
+ const data = vueDemi.reactive(core.useNow({ ...props, controls: true }));
1735
1553
  return () => {
1736
1554
  if (slots.default)
1737
1555
  return slots.default(data);
@@ -1754,25 +1572,6 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
1754
1572
  }
1755
1573
  });
1756
1574
 
1757
- var __defProp$5 = Object.defineProperty;
1758
- var __defProps$4 = Object.defineProperties;
1759
- var __getOwnPropDescs$4 = Object.getOwnPropertyDescriptors;
1760
- var __getOwnPropSymbols$6 = Object.getOwnPropertySymbols;
1761
- var __hasOwnProp$6 = Object.prototype.hasOwnProperty;
1762
- var __propIsEnum$6 = Object.prototype.propertyIsEnumerable;
1763
- var __defNormalProp$5 = (obj, key, value) => key in obj ? __defProp$5(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1764
- var __spreadValues$5 = (a, b) => {
1765
- for (var prop in b || (b = {}))
1766
- if (__hasOwnProp$6.call(b, prop))
1767
- __defNormalProp$5(a, prop, b[prop]);
1768
- if (__getOwnPropSymbols$6)
1769
- for (var prop of __getOwnPropSymbols$6(b)) {
1770
- if (__propIsEnum$6.call(b, prop))
1771
- __defNormalProp$5(a, prop, b[prop]);
1772
- }
1773
- return a;
1774
- };
1775
- var __spreadProps$4 = (a, b) => __defProps$4(a, __getOwnPropDescs$4(b));
1776
1575
  const UseOffsetPagination = /* @__PURE__ */ /* #__PURE__ */ vueDemi.defineComponent({
1777
1576
  name: "UseOffsetPagination",
1778
1577
  props: [
@@ -1789,23 +1588,21 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
1789
1588
  "page-count-change"
1790
1589
  ],
1791
1590
  setup(props, { slots, emit }) {
1792
- const data = vueDemi.reactive(core.useOffsetPagination(__spreadProps$4(__spreadValues$5({}, props), {
1591
+ const data = vueDemi.reactive(core.useOffsetPagination({
1592
+ ...props,
1793
1593
  onPageChange(...args) {
1794
- var _a;
1795
- (_a = props.onPageChange) == null ? void 0 : _a.call(props, ...args);
1594
+ props.onPageChange?.(...args);
1796
1595
  emit("page-change", ...args);
1797
1596
  },
1798
1597
  onPageSizeChange(...args) {
1799
- var _a;
1800
- (_a = props.onPageSizeChange) == null ? void 0 : _a.call(props, ...args);
1598
+ props.onPageSizeChange?.(...args);
1801
1599
  emit("page-size-change", ...args);
1802
1600
  },
1803
1601
  onPageCountChange(...args) {
1804
- var _a;
1805
- (_a = props.onPageCountChange) == null ? void 0 : _a.call(props, ...args);
1602
+ props.onPageCountChange?.(...args);
1806
1603
  emit("page-count-change", ...args);
1807
1604
  }
1808
- })));
1605
+ }));
1809
1606
  return () => {
1810
1607
  if (slots.default)
1811
1608
  return slots.default(data);
@@ -1839,25 +1636,6 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
1839
1636
  }
1840
1637
  });
1841
1638
 
1842
- var __defProp$4 = Object.defineProperty;
1843
- var __defProps$3 = Object.defineProperties;
1844
- var __getOwnPropDescs$3 = Object.getOwnPropertyDescriptors;
1845
- var __getOwnPropSymbols$5 = Object.getOwnPropertySymbols;
1846
- var __hasOwnProp$5 = Object.prototype.hasOwnProperty;
1847
- var __propIsEnum$5 = Object.prototype.propertyIsEnumerable;
1848
- var __defNormalProp$4 = (obj, key, value) => key in obj ? __defProp$4(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1849
- var __spreadValues$4 = (a, b) => {
1850
- for (var prop in b || (b = {}))
1851
- if (__hasOwnProp$5.call(b, prop))
1852
- __defNormalProp$4(a, prop, b[prop]);
1853
- if (__getOwnPropSymbols$5)
1854
- for (var prop of __getOwnPropSymbols$5(b)) {
1855
- if (__propIsEnum$5.call(b, prop))
1856
- __defNormalProp$4(a, prop, b[prop]);
1857
- }
1858
- return a;
1859
- };
1860
- var __spreadProps$3 = (a, b) => __defProps$3(a, __getOwnPropDescs$3(b));
1861
1639
  const UsePointer = /* @__PURE__ */ /* #__PURE__ */ vueDemi.defineComponent({
1862
1640
  name: "UsePointer",
1863
1641
  props: [
@@ -1867,9 +1645,10 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
1867
1645
  ],
1868
1646
  setup(props, { slots }) {
1869
1647
  const el = vueDemi.ref(null);
1870
- const data = vueDemi.reactive(core.usePointer(__spreadProps$3(__spreadValues$4({}, props), {
1648
+ const data = vueDemi.reactive(core.usePointer({
1649
+ ...props,
1871
1650
  target: props.target === "self" ? el : defaultWindow
1872
- })));
1651
+ }));
1873
1652
  return () => {
1874
1653
  if (slots.default)
1875
1654
  return slots.default(data, { ref: el });
@@ -1955,23 +1734,8 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
1955
1734
  }
1956
1735
  });
1957
1736
 
1958
- var __getOwnPropSymbols$4 = Object.getOwnPropertySymbols;
1959
- var __hasOwnProp$4 = Object.prototype.hasOwnProperty;
1960
- var __propIsEnum$4 = Object.prototype.propertyIsEnumerable;
1961
- var __objRest = (source, exclude) => {
1962
- var target = {};
1963
- for (var prop in source)
1964
- if (__hasOwnProp$4.call(source, prop) && exclude.indexOf(prop) < 0)
1965
- target[prop] = source[prop];
1966
- if (source != null && __getOwnPropSymbols$4)
1967
- for (var prop of __getOwnPropSymbols$4(source)) {
1968
- if (exclude.indexOf(prop) < 0 && __propIsEnum$4.call(source, prop))
1969
- target[prop] = source[prop];
1970
- }
1971
- return target;
1972
- };
1973
1737
  function useMutationObserver(target, callback, options = {}) {
1974
- const _a = options, { window = defaultWindow } = _a, mutationOptions = __objRest(_a, ["window"]);
1738
+ const { window = defaultWindow, ...mutationOptions } = options;
1975
1739
  let observer;
1976
1740
  const isSupported = useSupported(() => window && "MutationObserver" in window);
1977
1741
  const cleanup = () => {
@@ -2005,16 +1769,12 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
2005
1769
  function useCssVar(prop, target, options = {}) {
2006
1770
  const { window = defaultWindow, initialValue = "", observe = false } = options;
2007
1771
  const variable = vueDemi.ref(initialValue);
2008
- const elRef = vueDemi.computed(() => {
2009
- var _a;
2010
- return unrefElement(target) || ((_a = window == null ? void 0 : window.document) == null ? void 0 : _a.documentElement);
2011
- });
1772
+ const elRef = vueDemi.computed(() => unrefElement(target) || window?.document?.documentElement);
2012
1773
  function updateCssVar() {
2013
- var _a;
2014
1774
  const key = shared.toValue(prop);
2015
1775
  const el = shared.toValue(elRef);
2016
1776
  if (el && window) {
2017
- const value = (_a = window.getComputedStyle(el).getPropertyValue(key)) == null ? void 0 : _a.trim();
1777
+ const value = window.getComputedStyle(el).getPropertyValue(key)?.trim();
2018
1778
  variable.value = value || initialValue;
2019
1779
  }
2020
1780
  }
@@ -2032,8 +1792,7 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
2032
1792
  vueDemi.watch(
2033
1793
  variable,
2034
1794
  (val) => {
2035
- var _a;
2036
- if ((_a = elRef.value) == null ? void 0 : _a.style)
1795
+ if (elRef.value?.style)
2037
1796
  elRef.value.style.setProperty(shared.toValue(prop), val);
2038
1797
  }
2039
1798
  );
@@ -2113,25 +1872,6 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
2113
1872
  }
2114
1873
  });
2115
1874
 
2116
- var __defProp$3 = Object.defineProperty;
2117
- var __defProps$2 = Object.defineProperties;
2118
- var __getOwnPropDescs$2 = Object.getOwnPropertyDescriptors;
2119
- var __getOwnPropSymbols$3 = Object.getOwnPropertySymbols;
2120
- var __hasOwnProp$3 = Object.prototype.hasOwnProperty;
2121
- var __propIsEnum$3 = Object.prototype.propertyIsEnumerable;
2122
- var __defNormalProp$3 = (obj, key, value) => key in obj ? __defProp$3(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
2123
- var __spreadValues$3 = (a, b) => {
2124
- for (var prop in b || (b = {}))
2125
- if (__hasOwnProp$3.call(b, prop))
2126
- __defNormalProp$3(a, prop, b[prop]);
2127
- if (__getOwnPropSymbols$3)
2128
- for (var prop of __getOwnPropSymbols$3(b)) {
2129
- if (__propIsEnum$3.call(b, prop))
2130
- __defNormalProp$3(a, prop, b[prop]);
2131
- }
2132
- return a;
2133
- };
2134
- var __spreadProps$2 = (a, b) => __defProps$2(a, __getOwnPropDescs$2(b));
2135
1875
  const vScroll = {
2136
1876
  [shared.directiveHooks.mounted](el, binding) {
2137
1877
  if (typeof binding.value === "function") {
@@ -2146,18 +1886,17 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
2146
1886
  });
2147
1887
  } else {
2148
1888
  const [handler, options] = binding.value;
2149
- const state = useScroll(el, __spreadProps$2(__spreadValues$3({}, options), {
1889
+ const state = useScroll(el, {
1890
+ ...options,
2150
1891
  onScroll(e) {
2151
- var _a;
2152
- (_a = options.onScroll) == null ? void 0 : _a.call(options, e);
1892
+ options.onScroll?.(e);
2153
1893
  handler(state);
2154
1894
  },
2155
1895
  onStop(e) {
2156
- var _a;
2157
- (_a = options.onStop) == null ? void 0 : _a.call(options, e);
1896
+ options.onStop?.(e);
2158
1897
  handler(state);
2159
1898
  }
2160
- }));
1899
+ });
2161
1900
  }
2162
1901
  }
2163
1902
  };
@@ -2189,8 +1928,9 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
2189
1928
  let stopTouchMoveListener = null;
2190
1929
  let initialOverflow;
2191
1930
  vueDemi.watch(shared.toRef(element), (el) => {
2192
- if (el) {
2193
- const ele = el;
1931
+ const target = resolveElement(shared.toValue(el));
1932
+ if (target) {
1933
+ const ele = target;
2194
1934
  initialOverflow = ele.style.overflow;
2195
1935
  if (isLocked.value)
2196
1936
  ele.style.overflow = "hidden";
@@ -2199,12 +1939,12 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
2199
1939
  immediate: true
2200
1940
  });
2201
1941
  const lock = () => {
2202
- const ele = shared.toValue(element);
2203
- if (!ele || isLocked.value)
1942
+ const el = resolveElement(shared.toValue(element));
1943
+ if (!el || isLocked.value)
2204
1944
  return;
2205
1945
  if (shared.isIOS) {
2206
1946
  stopTouchMoveListener = useEventListener(
2207
- ele,
1947
+ el,
2208
1948
  "touchmove",
2209
1949
  (e) => {
2210
1950
  preventDefault(e);
@@ -2212,15 +1952,15 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
2212
1952
  { passive: false }
2213
1953
  );
2214
1954
  }
2215
- ele.style.overflow = "hidden";
1955
+ el.style.overflow = "hidden";
2216
1956
  isLocked.value = true;
2217
1957
  };
2218
1958
  const unlock = () => {
2219
- const ele = shared.toValue(element);
2220
- if (!ele || !isLocked.value)
1959
+ const el = resolveElement(shared.toValue(element));
1960
+ if (!el || !isLocked.value)
2221
1961
  return;
2222
- shared.isIOS && (stopTouchMoveListener == null ? void 0 : stopTouchMoveListener());
2223
- ele.style.overflow = initialOverflow;
1962
+ shared.isIOS && stopTouchMoveListener?.();
1963
+ el.style.overflow = initialOverflow;
2224
1964
  isLocked.value = false;
2225
1965
  };
2226
1966
  shared.tryOnScopeDispose(unlock);
@@ -2251,30 +1991,11 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
2251
1991
  }
2252
1992
  const vScrollLock = onScrollLock();
2253
1993
 
2254
- var __defProp$2 = Object.defineProperty;
2255
- var __defProps$1 = Object.defineProperties;
2256
- var __getOwnPropDescs$1 = Object.getOwnPropertyDescriptors;
2257
- var __getOwnPropSymbols$2 = Object.getOwnPropertySymbols;
2258
- var __hasOwnProp$2 = Object.prototype.hasOwnProperty;
2259
- var __propIsEnum$2 = Object.prototype.propertyIsEnumerable;
2260
- var __defNormalProp$2 = (obj, key, value) => key in obj ? __defProp$2(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
2261
- var __spreadValues$2 = (a, b) => {
2262
- for (var prop in b || (b = {}))
2263
- if (__hasOwnProp$2.call(b, prop))
2264
- __defNormalProp$2(a, prop, b[prop]);
2265
- if (__getOwnPropSymbols$2)
2266
- for (var prop of __getOwnPropSymbols$2(b)) {
2267
- if (__propIsEnum$2.call(b, prop))
2268
- __defNormalProp$2(a, prop, b[prop]);
2269
- }
2270
- return a;
2271
- };
2272
- var __spreadProps$1 = (a, b) => __defProps$1(a, __getOwnPropDescs$1(b));
2273
1994
  const UseTimeAgo = /* @__PURE__ */ /* #__PURE__ */ vueDemi.defineComponent({
2274
1995
  name: "UseTimeAgo",
2275
1996
  props: ["time", "updateInterval", "max", "fullDateFormatter", "messages", "showSecond"],
2276
1997
  setup(props, { slots }) {
2277
- const data = vueDemi.reactive(core.useTimeAgo(() => props.time, __spreadProps$1(__spreadValues$2({}, props), { controls: true })));
1998
+ const data = vueDemi.reactive(core.useTimeAgo(() => props.time, { ...props, controls: true }));
2278
1999
  return () => {
2279
2000
  if (slots.default)
2280
2001
  return slots.default(data);
@@ -2282,30 +2003,11 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
2282
2003
  }
2283
2004
  });
2284
2005
 
2285
- var __defProp$1 = Object.defineProperty;
2286
- var __defProps = Object.defineProperties;
2287
- var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
2288
- var __getOwnPropSymbols$1 = Object.getOwnPropertySymbols;
2289
- var __hasOwnProp$1 = Object.prototype.hasOwnProperty;
2290
- var __propIsEnum$1 = Object.prototype.propertyIsEnumerable;
2291
- var __defNormalProp$1 = (obj, key, value) => key in obj ? __defProp$1(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
2292
- var __spreadValues$1 = (a, b) => {
2293
- for (var prop in b || (b = {}))
2294
- if (__hasOwnProp$1.call(b, prop))
2295
- __defNormalProp$1(a, prop, b[prop]);
2296
- if (__getOwnPropSymbols$1)
2297
- for (var prop of __getOwnPropSymbols$1(b)) {
2298
- if (__propIsEnum$1.call(b, prop))
2299
- __defNormalProp$1(a, prop, b[prop]);
2300
- }
2301
- return a;
2302
- };
2303
- var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
2304
2006
  const UseTimestamp = /* @__PURE__ */ /* #__PURE__ */ vueDemi.defineComponent({
2305
2007
  name: "UseTimestamp",
2306
2008
  props: ["immediate", "interval", "offset"],
2307
2009
  setup(props, { slots }) {
2308
- const data = vueDemi.reactive(core.useTimestamp(__spreadProps(__spreadValues$1({}, props), { controls: true })));
2010
+ const data = vueDemi.reactive(core.useTimestamp({ ...props, controls: true }));
2309
2011
  return () => {
2310
2012
  if (slots.default)
2311
2013
  return slots.default(data);
@@ -2313,22 +2015,6 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
2313
2015
  }
2314
2016
  });
2315
2017
 
2316
- var __defProp = Object.defineProperty;
2317
- var __getOwnPropSymbols = Object.getOwnPropertySymbols;
2318
- var __hasOwnProp = Object.prototype.hasOwnProperty;
2319
- var __propIsEnum = Object.prototype.propertyIsEnumerable;
2320
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
2321
- var __spreadValues = (a, b) => {
2322
- for (var prop in b || (b = {}))
2323
- if (__hasOwnProp.call(b, prop))
2324
- __defNormalProp(a, prop, b[prop]);
2325
- if (__getOwnPropSymbols)
2326
- for (var prop of __getOwnPropSymbols(b)) {
2327
- if (__propIsEnum.call(b, prop))
2328
- __defNormalProp(a, prop, b[prop]);
2329
- }
2330
- return a;
2331
- };
2332
2018
  const UseVirtualList = /* @__PURE__ */ /* #__PURE__ */ vueDemi.defineComponent({
2333
2019
  name: "UseVirtualList",
2334
2020
  props: [
@@ -2343,11 +2029,11 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
2343
2029
  typeof containerProps.style === "object" && !Array.isArray(containerProps.style) && (containerProps.style.height = props.height || "300px");
2344
2030
  return () => vueDemi.h(
2345
2031
  "div",
2346
- __spreadValues({}, containerProps),
2032
+ { ...containerProps },
2347
2033
  [
2348
2034
  vueDemi.h(
2349
2035
  "div",
2350
- __spreadValues({}, wrapperProps.value),
2036
+ { ...wrapperProps.value },
2351
2037
  list.value.map((item) => vueDemi.h(
2352
2038
  "div",
2353
2039
  { style: { overFlow: "hidden", height: item.height } },