@vueuse/components 10.0.1 → 10.0.2
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.cjs +128 -82
- package/index.iife.js +130 -83
- package/index.iife.min.js +1 -1
- package/index.mjs +128 -82
- package/package.json +3 -3
package/index.cjs
CHANGED
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
var vueDemi = require('vue-demi');
|
|
4
4
|
var core = require('@vueuse/core');
|
|
5
5
|
var shared = require('@vueuse/shared');
|
|
6
|
-
var reactivity = require('@vue/reactivity');
|
|
7
6
|
|
|
8
7
|
const OnClickOutside = /* @__PURE__ */ /* #__PURE__ */ vueDemi.defineComponent({
|
|
9
8
|
name: "OnClickOutside",
|
|
@@ -189,17 +188,17 @@ function onKeyStroke(...args) {
|
|
|
189
188
|
}
|
|
190
189
|
|
|
191
190
|
var __defProp$d = Object.defineProperty;
|
|
192
|
-
var __getOwnPropSymbols$
|
|
193
|
-
var __hasOwnProp$
|
|
194
|
-
var __propIsEnum$
|
|
191
|
+
var __getOwnPropSymbols$f = Object.getOwnPropertySymbols;
|
|
192
|
+
var __hasOwnProp$f = Object.prototype.hasOwnProperty;
|
|
193
|
+
var __propIsEnum$f = Object.prototype.propertyIsEnumerable;
|
|
195
194
|
var __defNormalProp$d = (obj, key, value) => key in obj ? __defProp$d(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
196
195
|
var __spreadValues$d = (a, b) => {
|
|
197
196
|
for (var prop in b || (b = {}))
|
|
198
|
-
if (__hasOwnProp$
|
|
197
|
+
if (__hasOwnProp$f.call(b, prop))
|
|
199
198
|
__defNormalProp$d(a, prop, b[prop]);
|
|
200
|
-
if (__getOwnPropSymbols$
|
|
201
|
-
for (var prop of __getOwnPropSymbols$
|
|
202
|
-
if (__propIsEnum$
|
|
199
|
+
if (__getOwnPropSymbols$f)
|
|
200
|
+
for (var prop of __getOwnPropSymbols$f(b)) {
|
|
201
|
+
if (__propIsEnum$f.call(b, prop))
|
|
203
202
|
__defNormalProp$d(a, prop, b[prop]);
|
|
204
203
|
}
|
|
205
204
|
return a;
|
|
@@ -336,17 +335,17 @@ function guessSerializerType(rawInit) {
|
|
|
336
335
|
}
|
|
337
336
|
|
|
338
337
|
var __defProp$c = Object.defineProperty;
|
|
339
|
-
var __getOwnPropSymbols$
|
|
340
|
-
var __hasOwnProp$
|
|
341
|
-
var __propIsEnum$
|
|
338
|
+
var __getOwnPropSymbols$e = Object.getOwnPropertySymbols;
|
|
339
|
+
var __hasOwnProp$e = Object.prototype.hasOwnProperty;
|
|
340
|
+
var __propIsEnum$e = Object.prototype.propertyIsEnumerable;
|
|
342
341
|
var __defNormalProp$c = (obj, key, value) => key in obj ? __defProp$c(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
343
342
|
var __spreadValues$c = (a, b) => {
|
|
344
343
|
for (var prop in b || (b = {}))
|
|
345
|
-
if (__hasOwnProp$
|
|
344
|
+
if (__hasOwnProp$e.call(b, prop))
|
|
346
345
|
__defNormalProp$c(a, prop, b[prop]);
|
|
347
|
-
if (__getOwnPropSymbols$
|
|
348
|
-
for (var prop of __getOwnPropSymbols$
|
|
349
|
-
if (__propIsEnum$
|
|
346
|
+
if (__getOwnPropSymbols$e)
|
|
347
|
+
for (var prop of __getOwnPropSymbols$e(b)) {
|
|
348
|
+
if (__propIsEnum$e.call(b, prop))
|
|
350
349
|
__defNormalProp$c(a, prop, b[prop]);
|
|
351
350
|
}
|
|
352
351
|
return a;
|
|
@@ -552,17 +551,17 @@ function usePreferredDark(options) {
|
|
|
552
551
|
}
|
|
553
552
|
|
|
554
553
|
var __defProp$b = Object.defineProperty;
|
|
555
|
-
var __getOwnPropSymbols$
|
|
556
|
-
var __hasOwnProp$
|
|
557
|
-
var __propIsEnum$
|
|
554
|
+
var __getOwnPropSymbols$d = Object.getOwnPropertySymbols;
|
|
555
|
+
var __hasOwnProp$d = Object.prototype.hasOwnProperty;
|
|
556
|
+
var __propIsEnum$d = Object.prototype.propertyIsEnumerable;
|
|
558
557
|
var __defNormalProp$b = (obj, key, value) => key in obj ? __defProp$b(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
559
558
|
var __spreadValues$b = (a, b) => {
|
|
560
559
|
for (var prop in b || (b = {}))
|
|
561
|
-
if (__hasOwnProp$
|
|
560
|
+
if (__hasOwnProp$d.call(b, prop))
|
|
562
561
|
__defNormalProp$b(a, prop, b[prop]);
|
|
563
|
-
if (__getOwnPropSymbols$
|
|
564
|
-
for (var prop of __getOwnPropSymbols$
|
|
565
|
-
if (__propIsEnum$
|
|
562
|
+
if (__getOwnPropSymbols$d)
|
|
563
|
+
for (var prop of __getOwnPropSymbols$d(b)) {
|
|
564
|
+
if (__propIsEnum$d.call(b, prop))
|
|
566
565
|
__defNormalProp$b(a, prop, b[prop]);
|
|
567
566
|
}
|
|
568
567
|
return a;
|
|
@@ -743,17 +742,17 @@ const UseDocumentVisibility = /* @__PURE__ */ /* #__PURE__ */ vueDemi.defineComp
|
|
|
743
742
|
var __defProp$a = Object.defineProperty;
|
|
744
743
|
var __defProps$8 = Object.defineProperties;
|
|
745
744
|
var __getOwnPropDescs$8 = Object.getOwnPropertyDescriptors;
|
|
746
|
-
var __getOwnPropSymbols$
|
|
747
|
-
var __hasOwnProp$
|
|
748
|
-
var __propIsEnum$
|
|
745
|
+
var __getOwnPropSymbols$c = Object.getOwnPropertySymbols;
|
|
746
|
+
var __hasOwnProp$c = Object.prototype.hasOwnProperty;
|
|
747
|
+
var __propIsEnum$c = Object.prototype.propertyIsEnumerable;
|
|
749
748
|
var __defNormalProp$a = (obj, key, value) => key in obj ? __defProp$a(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
750
749
|
var __spreadValues$a = (a, b) => {
|
|
751
750
|
for (var prop in b || (b = {}))
|
|
752
|
-
if (__hasOwnProp$
|
|
751
|
+
if (__hasOwnProp$c.call(b, prop))
|
|
753
752
|
__defNormalProp$a(a, prop, b[prop]);
|
|
754
|
-
if (__getOwnPropSymbols$
|
|
755
|
-
for (var prop of __getOwnPropSymbols$
|
|
756
|
-
if (__propIsEnum$
|
|
753
|
+
if (__getOwnPropSymbols$c)
|
|
754
|
+
for (var prop of __getOwnPropSymbols$c(b)) {
|
|
755
|
+
if (__propIsEnum$c.call(b, prop))
|
|
757
756
|
__defNormalProp$a(a, prop, b[prop]);
|
|
758
757
|
}
|
|
759
758
|
return a;
|
|
@@ -864,23 +863,23 @@ const UseElementSize = /* @__PURE__ */ /* #__PURE__ */ vueDemi.defineComponent({
|
|
|
864
863
|
}
|
|
865
864
|
});
|
|
866
865
|
|
|
867
|
-
var __getOwnPropSymbols$
|
|
868
|
-
var __hasOwnProp$
|
|
869
|
-
var __propIsEnum$
|
|
870
|
-
var __objRest = (source, exclude) => {
|
|
866
|
+
var __getOwnPropSymbols$b = Object.getOwnPropertySymbols;
|
|
867
|
+
var __hasOwnProp$b = Object.prototype.hasOwnProperty;
|
|
868
|
+
var __propIsEnum$b = Object.prototype.propertyIsEnumerable;
|
|
869
|
+
var __objRest$1 = (source, exclude) => {
|
|
871
870
|
var target = {};
|
|
872
871
|
for (var prop in source)
|
|
873
|
-
if (__hasOwnProp$
|
|
872
|
+
if (__hasOwnProp$b.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
874
873
|
target[prop] = source[prop];
|
|
875
|
-
if (source != null && __getOwnPropSymbols$
|
|
876
|
-
for (var prop of __getOwnPropSymbols$
|
|
877
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
874
|
+
if (source != null && __getOwnPropSymbols$b)
|
|
875
|
+
for (var prop of __getOwnPropSymbols$b(source)) {
|
|
876
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$b.call(source, prop))
|
|
878
877
|
target[prop] = source[prop];
|
|
879
878
|
}
|
|
880
879
|
return target;
|
|
881
880
|
};
|
|
882
881
|
function useResizeObserver(target, callback, options = {}) {
|
|
883
|
-
const _a = options, { window = defaultWindow } = _a, observerOptions = __objRest(_a, ["window"]);
|
|
882
|
+
const _a = options, { window = defaultWindow } = _a, observerOptions = __objRest$1(_a, ["window"]);
|
|
884
883
|
let observer;
|
|
885
884
|
const isSupported = useSupported(() => window && "ResizeObserver" in window);
|
|
886
885
|
const cleanup = () => {
|
|
@@ -994,7 +993,7 @@ function useIntersectionObserver(target, callback, options = {}) {
|
|
|
994
993
|
immediate = true
|
|
995
994
|
} = options;
|
|
996
995
|
const isSupported = useSupported(() => window && "IntersectionObserver" in window);
|
|
997
|
-
const targets =
|
|
996
|
+
const targets = vueDemi.computed(() => {
|
|
998
997
|
const _target = shared.toValue(target);
|
|
999
998
|
return (Array.isArray(_target) ? _target : [_target]).map(unrefElement).filter(shared.notNullish);
|
|
1000
999
|
});
|
|
@@ -1174,17 +1173,17 @@ function useAsyncState(promise, initialState, options) {
|
|
|
1174
1173
|
}
|
|
1175
1174
|
|
|
1176
1175
|
var __defProp$9 = Object.defineProperty;
|
|
1177
|
-
var __getOwnPropSymbols$
|
|
1178
|
-
var __hasOwnProp$
|
|
1179
|
-
var __propIsEnum$
|
|
1176
|
+
var __getOwnPropSymbols$a = Object.getOwnPropertySymbols;
|
|
1177
|
+
var __hasOwnProp$a = Object.prototype.hasOwnProperty;
|
|
1178
|
+
var __propIsEnum$a = Object.prototype.propertyIsEnumerable;
|
|
1180
1179
|
var __defNormalProp$9 = (obj, key, value) => key in obj ? __defProp$9(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
1181
1180
|
var __spreadValues$9 = (a, b) => {
|
|
1182
1181
|
for (var prop in b || (b = {}))
|
|
1183
|
-
if (__hasOwnProp$
|
|
1182
|
+
if (__hasOwnProp$a.call(b, prop))
|
|
1184
1183
|
__defNormalProp$9(a, prop, b[prop]);
|
|
1185
|
-
if (__getOwnPropSymbols$
|
|
1186
|
-
for (var prop of __getOwnPropSymbols$
|
|
1187
|
-
if (__propIsEnum$
|
|
1184
|
+
if (__getOwnPropSymbols$a)
|
|
1185
|
+
for (var prop of __getOwnPropSymbols$a(b)) {
|
|
1186
|
+
if (__propIsEnum$a.call(b, prop))
|
|
1188
1187
|
__defNormalProp$9(a, prop, b[prop]);
|
|
1189
1188
|
}
|
|
1190
1189
|
return a;
|
|
@@ -1371,17 +1370,17 @@ function useScroll(element, options = {}) {
|
|
|
1371
1370
|
var __defProp$8 = Object.defineProperty;
|
|
1372
1371
|
var __defProps$7 = Object.defineProperties;
|
|
1373
1372
|
var __getOwnPropDescs$7 = Object.getOwnPropertyDescriptors;
|
|
1374
|
-
var __getOwnPropSymbols$
|
|
1375
|
-
var __hasOwnProp$
|
|
1376
|
-
var __propIsEnum$
|
|
1373
|
+
var __getOwnPropSymbols$9 = Object.getOwnPropertySymbols;
|
|
1374
|
+
var __hasOwnProp$9 = Object.prototype.hasOwnProperty;
|
|
1375
|
+
var __propIsEnum$9 = Object.prototype.propertyIsEnumerable;
|
|
1377
1376
|
var __defNormalProp$8 = (obj, key, value) => key in obj ? __defProp$8(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
1378
1377
|
var __spreadValues$8 = (a, b) => {
|
|
1379
1378
|
for (var prop in b || (b = {}))
|
|
1380
|
-
if (__hasOwnProp$
|
|
1379
|
+
if (__hasOwnProp$9.call(b, prop))
|
|
1381
1380
|
__defNormalProp$8(a, prop, b[prop]);
|
|
1382
|
-
if (__getOwnPropSymbols$
|
|
1383
|
-
for (var prop of __getOwnPropSymbols$
|
|
1384
|
-
if (__propIsEnum$
|
|
1381
|
+
if (__getOwnPropSymbols$9)
|
|
1382
|
+
for (var prop of __getOwnPropSymbols$9(b)) {
|
|
1383
|
+
if (__propIsEnum$9.call(b, prop))
|
|
1385
1384
|
__defNormalProp$8(a, prop, b[prop]);
|
|
1386
1385
|
}
|
|
1387
1386
|
return a;
|
|
@@ -1476,17 +1475,17 @@ const UseMouseInElement = /* @__PURE__ */ /* #__PURE__ */ vueDemi.defineComponen
|
|
|
1476
1475
|
var __defProp$7 = Object.defineProperty;
|
|
1477
1476
|
var __defProps$6 = Object.defineProperties;
|
|
1478
1477
|
var __getOwnPropDescs$6 = Object.getOwnPropertyDescriptors;
|
|
1479
|
-
var __getOwnPropSymbols$
|
|
1480
|
-
var __hasOwnProp$
|
|
1481
|
-
var __propIsEnum$
|
|
1478
|
+
var __getOwnPropSymbols$8 = Object.getOwnPropertySymbols;
|
|
1479
|
+
var __hasOwnProp$8 = Object.prototype.hasOwnProperty;
|
|
1480
|
+
var __propIsEnum$8 = Object.prototype.propertyIsEnumerable;
|
|
1482
1481
|
var __defNormalProp$7 = (obj, key, value) => key in obj ? __defProp$7(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
1483
1482
|
var __spreadValues$7 = (a, b) => {
|
|
1484
1483
|
for (var prop in b || (b = {}))
|
|
1485
|
-
if (__hasOwnProp$
|
|
1484
|
+
if (__hasOwnProp$8.call(b, prop))
|
|
1486
1485
|
__defNormalProp$7(a, prop, b[prop]);
|
|
1487
|
-
if (__getOwnPropSymbols$
|
|
1488
|
-
for (var prop of __getOwnPropSymbols$
|
|
1489
|
-
if (__propIsEnum$
|
|
1486
|
+
if (__getOwnPropSymbols$8)
|
|
1487
|
+
for (var prop of __getOwnPropSymbols$8(b)) {
|
|
1488
|
+
if (__propIsEnum$8.call(b, prop))
|
|
1490
1489
|
__defNormalProp$7(a, prop, b[prop]);
|
|
1491
1490
|
}
|
|
1492
1491
|
return a;
|
|
@@ -1519,17 +1518,17 @@ const UseNetwork = /* @__PURE__ */ /* #__PURE__ */ vueDemi.defineComponent({
|
|
|
1519
1518
|
var __defProp$6 = Object.defineProperty;
|
|
1520
1519
|
var __defProps$5 = Object.defineProperties;
|
|
1521
1520
|
var __getOwnPropDescs$5 = Object.getOwnPropertyDescriptors;
|
|
1522
|
-
var __getOwnPropSymbols$
|
|
1523
|
-
var __hasOwnProp$
|
|
1524
|
-
var __propIsEnum$
|
|
1521
|
+
var __getOwnPropSymbols$7 = Object.getOwnPropertySymbols;
|
|
1522
|
+
var __hasOwnProp$7 = Object.prototype.hasOwnProperty;
|
|
1523
|
+
var __propIsEnum$7 = Object.prototype.propertyIsEnumerable;
|
|
1525
1524
|
var __defNormalProp$6 = (obj, key, value) => key in obj ? __defProp$6(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
1526
1525
|
var __spreadValues$6 = (a, b) => {
|
|
1527
1526
|
for (var prop in b || (b = {}))
|
|
1528
|
-
if (__hasOwnProp$
|
|
1527
|
+
if (__hasOwnProp$7.call(b, prop))
|
|
1529
1528
|
__defNormalProp$6(a, prop, b[prop]);
|
|
1530
|
-
if (__getOwnPropSymbols$
|
|
1531
|
-
for (var prop of __getOwnPropSymbols$
|
|
1532
|
-
if (__propIsEnum$
|
|
1529
|
+
if (__getOwnPropSymbols$7)
|
|
1530
|
+
for (var prop of __getOwnPropSymbols$7(b)) {
|
|
1531
|
+
if (__propIsEnum$7.call(b, prop))
|
|
1533
1532
|
__defNormalProp$6(a, prop, b[prop]);
|
|
1534
1533
|
}
|
|
1535
1534
|
return a;
|
|
@@ -1565,17 +1564,17 @@ const UseObjectUrl = /* @__PURE__ */ /* #__PURE__ */ vueDemi.defineComponent({
|
|
|
1565
1564
|
var __defProp$5 = Object.defineProperty;
|
|
1566
1565
|
var __defProps$4 = Object.defineProperties;
|
|
1567
1566
|
var __getOwnPropDescs$4 = Object.getOwnPropertyDescriptors;
|
|
1568
|
-
var __getOwnPropSymbols$
|
|
1569
|
-
var __hasOwnProp$
|
|
1570
|
-
var __propIsEnum$
|
|
1567
|
+
var __getOwnPropSymbols$6 = Object.getOwnPropertySymbols;
|
|
1568
|
+
var __hasOwnProp$6 = Object.prototype.hasOwnProperty;
|
|
1569
|
+
var __propIsEnum$6 = Object.prototype.propertyIsEnumerable;
|
|
1571
1570
|
var __defNormalProp$5 = (obj, key, value) => key in obj ? __defProp$5(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
1572
1571
|
var __spreadValues$5 = (a, b) => {
|
|
1573
1572
|
for (var prop in b || (b = {}))
|
|
1574
|
-
if (__hasOwnProp$
|
|
1573
|
+
if (__hasOwnProp$6.call(b, prop))
|
|
1575
1574
|
__defNormalProp$5(a, prop, b[prop]);
|
|
1576
|
-
if (__getOwnPropSymbols$
|
|
1577
|
-
for (var prop of __getOwnPropSymbols$
|
|
1578
|
-
if (__propIsEnum$
|
|
1575
|
+
if (__getOwnPropSymbols$6)
|
|
1576
|
+
for (var prop of __getOwnPropSymbols$6(b)) {
|
|
1577
|
+
if (__propIsEnum$6.call(b, prop))
|
|
1579
1578
|
__defNormalProp$5(a, prop, b[prop]);
|
|
1580
1579
|
}
|
|
1581
1580
|
return a;
|
|
@@ -1650,17 +1649,17 @@ const UsePageLeave = /* @__PURE__ */ /* #__PURE__ */ vueDemi.defineComponent({
|
|
|
1650
1649
|
var __defProp$4 = Object.defineProperty;
|
|
1651
1650
|
var __defProps$3 = Object.defineProperties;
|
|
1652
1651
|
var __getOwnPropDescs$3 = Object.getOwnPropertyDescriptors;
|
|
1653
|
-
var __getOwnPropSymbols$
|
|
1654
|
-
var __hasOwnProp$
|
|
1655
|
-
var __propIsEnum$
|
|
1652
|
+
var __getOwnPropSymbols$5 = Object.getOwnPropertySymbols;
|
|
1653
|
+
var __hasOwnProp$5 = Object.prototype.hasOwnProperty;
|
|
1654
|
+
var __propIsEnum$5 = Object.prototype.propertyIsEnumerable;
|
|
1656
1655
|
var __defNormalProp$4 = (obj, key, value) => key in obj ? __defProp$4(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
1657
1656
|
var __spreadValues$4 = (a, b) => {
|
|
1658
1657
|
for (var prop in b || (b = {}))
|
|
1659
|
-
if (__hasOwnProp$
|
|
1658
|
+
if (__hasOwnProp$5.call(b, prop))
|
|
1660
1659
|
__defNormalProp$4(a, prop, b[prop]);
|
|
1661
|
-
if (__getOwnPropSymbols$
|
|
1662
|
-
for (var prop of __getOwnPropSymbols$
|
|
1663
|
-
if (__propIsEnum$
|
|
1660
|
+
if (__getOwnPropSymbols$5)
|
|
1661
|
+
for (var prop of __getOwnPropSymbols$5(b)) {
|
|
1662
|
+
if (__propIsEnum$5.call(b, prop))
|
|
1664
1663
|
__defNormalProp$4(a, prop, b[prop]);
|
|
1665
1664
|
}
|
|
1666
1665
|
return a;
|
|
@@ -1763,6 +1762,53 @@ const UsePreferredReducedMotion = /* @__PURE__ */ /* #__PURE__ */ vueDemi.define
|
|
|
1763
1762
|
}
|
|
1764
1763
|
});
|
|
1765
1764
|
|
|
1765
|
+
var __getOwnPropSymbols$4 = Object.getOwnPropertySymbols;
|
|
1766
|
+
var __hasOwnProp$4 = Object.prototype.hasOwnProperty;
|
|
1767
|
+
var __propIsEnum$4 = Object.prototype.propertyIsEnumerable;
|
|
1768
|
+
var __objRest = (source, exclude) => {
|
|
1769
|
+
var target = {};
|
|
1770
|
+
for (var prop in source)
|
|
1771
|
+
if (__hasOwnProp$4.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
1772
|
+
target[prop] = source[prop];
|
|
1773
|
+
if (source != null && __getOwnPropSymbols$4)
|
|
1774
|
+
for (var prop of __getOwnPropSymbols$4(source)) {
|
|
1775
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$4.call(source, prop))
|
|
1776
|
+
target[prop] = source[prop];
|
|
1777
|
+
}
|
|
1778
|
+
return target;
|
|
1779
|
+
};
|
|
1780
|
+
function useMutationObserver(target, callback, options = {}) {
|
|
1781
|
+
const _a = options, { window = defaultWindow } = _a, mutationOptions = __objRest(_a, ["window"]);
|
|
1782
|
+
let observer;
|
|
1783
|
+
const isSupported = useSupported(() => window && "MutationObserver" in window);
|
|
1784
|
+
const cleanup = () => {
|
|
1785
|
+
if (observer) {
|
|
1786
|
+
observer.disconnect();
|
|
1787
|
+
observer = void 0;
|
|
1788
|
+
}
|
|
1789
|
+
};
|
|
1790
|
+
const stopWatch = vueDemi.watch(
|
|
1791
|
+
() => unrefElement(target),
|
|
1792
|
+
(el) => {
|
|
1793
|
+
cleanup();
|
|
1794
|
+
if (isSupported.value && window && el) {
|
|
1795
|
+
observer = new MutationObserver(callback);
|
|
1796
|
+
observer.observe(el, mutationOptions);
|
|
1797
|
+
}
|
|
1798
|
+
},
|
|
1799
|
+
{ immediate: true }
|
|
1800
|
+
);
|
|
1801
|
+
const stop = () => {
|
|
1802
|
+
cleanup();
|
|
1803
|
+
stopWatch();
|
|
1804
|
+
};
|
|
1805
|
+
shared.tryOnScopeDispose(stop);
|
|
1806
|
+
return {
|
|
1807
|
+
isSupported,
|
|
1808
|
+
stop
|
|
1809
|
+
};
|
|
1810
|
+
}
|
|
1811
|
+
|
|
1766
1812
|
function useCssVar(prop, target, options = {}) {
|
|
1767
1813
|
const { window = defaultWindow, initialValue = "", observe = false } = options;
|
|
1768
1814
|
const variable = vueDemi.ref(initialValue);
|
|
@@ -1780,7 +1826,7 @@ function useCssVar(prop, target, options = {}) {
|
|
|
1780
1826
|
}
|
|
1781
1827
|
}
|
|
1782
1828
|
if (observe) {
|
|
1783
|
-
|
|
1829
|
+
useMutationObserver(elRef, updateCssVar, {
|
|
1784
1830
|
attributes: true,
|
|
1785
1831
|
window
|
|
1786
1832
|
});
|
package/index.iife.js
CHANGED
|
@@ -112,7 +112,7 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
|
|
|
112
112
|
this.VueCompositionAPI || (typeof VueCompositionAPI !== 'undefined' ? VueCompositionAPI : undefined)
|
|
113
113
|
);
|
|
114
114
|
;
|
|
115
|
-
;(function (exports, vueDemi, core, shared
|
|
115
|
+
;(function (exports, vueDemi, core, shared) {
|
|
116
116
|
'use strict';
|
|
117
117
|
|
|
118
118
|
const OnClickOutside = /* @__PURE__ */ /* #__PURE__ */ vueDemi.defineComponent({
|
|
@@ -299,17 +299,17 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
|
|
|
299
299
|
}
|
|
300
300
|
|
|
301
301
|
var __defProp$d = Object.defineProperty;
|
|
302
|
-
var __getOwnPropSymbols$
|
|
303
|
-
var __hasOwnProp$
|
|
304
|
-
var __propIsEnum$
|
|
302
|
+
var __getOwnPropSymbols$f = Object.getOwnPropertySymbols;
|
|
303
|
+
var __hasOwnProp$f = Object.prototype.hasOwnProperty;
|
|
304
|
+
var __propIsEnum$f = Object.prototype.propertyIsEnumerable;
|
|
305
305
|
var __defNormalProp$d = (obj, key, value) => key in obj ? __defProp$d(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
306
306
|
var __spreadValues$d = (a, b) => {
|
|
307
307
|
for (var prop in b || (b = {}))
|
|
308
|
-
if (__hasOwnProp$
|
|
308
|
+
if (__hasOwnProp$f.call(b, prop))
|
|
309
309
|
__defNormalProp$d(a, prop, b[prop]);
|
|
310
|
-
if (__getOwnPropSymbols$
|
|
311
|
-
for (var prop of __getOwnPropSymbols$
|
|
312
|
-
if (__propIsEnum$
|
|
310
|
+
if (__getOwnPropSymbols$f)
|
|
311
|
+
for (var prop of __getOwnPropSymbols$f(b)) {
|
|
312
|
+
if (__propIsEnum$f.call(b, prop))
|
|
313
313
|
__defNormalProp$d(a, prop, b[prop]);
|
|
314
314
|
}
|
|
315
315
|
return a;
|
|
@@ -446,17 +446,17 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
|
|
|
446
446
|
}
|
|
447
447
|
|
|
448
448
|
var __defProp$c = Object.defineProperty;
|
|
449
|
-
var __getOwnPropSymbols$
|
|
450
|
-
var __hasOwnProp$
|
|
451
|
-
var __propIsEnum$
|
|
449
|
+
var __getOwnPropSymbols$e = Object.getOwnPropertySymbols;
|
|
450
|
+
var __hasOwnProp$e = Object.prototype.hasOwnProperty;
|
|
451
|
+
var __propIsEnum$e = Object.prototype.propertyIsEnumerable;
|
|
452
452
|
var __defNormalProp$c = (obj, key, value) => key in obj ? __defProp$c(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
453
453
|
var __spreadValues$c = (a, b) => {
|
|
454
454
|
for (var prop in b || (b = {}))
|
|
455
|
-
if (__hasOwnProp$
|
|
455
|
+
if (__hasOwnProp$e.call(b, prop))
|
|
456
456
|
__defNormalProp$c(a, prop, b[prop]);
|
|
457
|
-
if (__getOwnPropSymbols$
|
|
458
|
-
for (var prop of __getOwnPropSymbols$
|
|
459
|
-
if (__propIsEnum$
|
|
457
|
+
if (__getOwnPropSymbols$e)
|
|
458
|
+
for (var prop of __getOwnPropSymbols$e(b)) {
|
|
459
|
+
if (__propIsEnum$e.call(b, prop))
|
|
460
460
|
__defNormalProp$c(a, prop, b[prop]);
|
|
461
461
|
}
|
|
462
462
|
return a;
|
|
@@ -662,17 +662,17 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
|
|
|
662
662
|
}
|
|
663
663
|
|
|
664
664
|
var __defProp$b = Object.defineProperty;
|
|
665
|
-
var __getOwnPropSymbols$
|
|
666
|
-
var __hasOwnProp$
|
|
667
|
-
var __propIsEnum$
|
|
665
|
+
var __getOwnPropSymbols$d = Object.getOwnPropertySymbols;
|
|
666
|
+
var __hasOwnProp$d = Object.prototype.hasOwnProperty;
|
|
667
|
+
var __propIsEnum$d = Object.prototype.propertyIsEnumerable;
|
|
668
668
|
var __defNormalProp$b = (obj, key, value) => key in obj ? __defProp$b(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
669
669
|
var __spreadValues$b = (a, b) => {
|
|
670
670
|
for (var prop in b || (b = {}))
|
|
671
|
-
if (__hasOwnProp$
|
|
671
|
+
if (__hasOwnProp$d.call(b, prop))
|
|
672
672
|
__defNormalProp$b(a, prop, b[prop]);
|
|
673
|
-
if (__getOwnPropSymbols$
|
|
674
|
-
for (var prop of __getOwnPropSymbols$
|
|
675
|
-
if (__propIsEnum$
|
|
673
|
+
if (__getOwnPropSymbols$d)
|
|
674
|
+
for (var prop of __getOwnPropSymbols$d(b)) {
|
|
675
|
+
if (__propIsEnum$d.call(b, prop))
|
|
676
676
|
__defNormalProp$b(a, prop, b[prop]);
|
|
677
677
|
}
|
|
678
678
|
return a;
|
|
@@ -853,17 +853,17 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
|
|
|
853
853
|
var __defProp$a = Object.defineProperty;
|
|
854
854
|
var __defProps$8 = Object.defineProperties;
|
|
855
855
|
var __getOwnPropDescs$8 = Object.getOwnPropertyDescriptors;
|
|
856
|
-
var __getOwnPropSymbols$
|
|
857
|
-
var __hasOwnProp$
|
|
858
|
-
var __propIsEnum$
|
|
856
|
+
var __getOwnPropSymbols$c = Object.getOwnPropertySymbols;
|
|
857
|
+
var __hasOwnProp$c = Object.prototype.hasOwnProperty;
|
|
858
|
+
var __propIsEnum$c = Object.prototype.propertyIsEnumerable;
|
|
859
859
|
var __defNormalProp$a = (obj, key, value) => key in obj ? __defProp$a(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
860
860
|
var __spreadValues$a = (a, b) => {
|
|
861
861
|
for (var prop in b || (b = {}))
|
|
862
|
-
if (__hasOwnProp$
|
|
862
|
+
if (__hasOwnProp$c.call(b, prop))
|
|
863
863
|
__defNormalProp$a(a, prop, b[prop]);
|
|
864
|
-
if (__getOwnPropSymbols$
|
|
865
|
-
for (var prop of __getOwnPropSymbols$
|
|
866
|
-
if (__propIsEnum$
|
|
864
|
+
if (__getOwnPropSymbols$c)
|
|
865
|
+
for (var prop of __getOwnPropSymbols$c(b)) {
|
|
866
|
+
if (__propIsEnum$c.call(b, prop))
|
|
867
867
|
__defNormalProp$a(a, prop, b[prop]);
|
|
868
868
|
}
|
|
869
869
|
return a;
|
|
@@ -974,23 +974,23 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
|
|
|
974
974
|
}
|
|
975
975
|
});
|
|
976
976
|
|
|
977
|
-
var __getOwnPropSymbols$
|
|
978
|
-
var __hasOwnProp$
|
|
979
|
-
var __propIsEnum$
|
|
980
|
-
var __objRest = (source, exclude) => {
|
|
977
|
+
var __getOwnPropSymbols$b = Object.getOwnPropertySymbols;
|
|
978
|
+
var __hasOwnProp$b = Object.prototype.hasOwnProperty;
|
|
979
|
+
var __propIsEnum$b = Object.prototype.propertyIsEnumerable;
|
|
980
|
+
var __objRest$1 = (source, exclude) => {
|
|
981
981
|
var target = {};
|
|
982
982
|
for (var prop in source)
|
|
983
|
-
if (__hasOwnProp$
|
|
983
|
+
if (__hasOwnProp$b.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
984
984
|
target[prop] = source[prop];
|
|
985
|
-
if (source != null && __getOwnPropSymbols$
|
|
986
|
-
for (var prop of __getOwnPropSymbols$
|
|
987
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
985
|
+
if (source != null && __getOwnPropSymbols$b)
|
|
986
|
+
for (var prop of __getOwnPropSymbols$b(source)) {
|
|
987
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$b.call(source, prop))
|
|
988
988
|
target[prop] = source[prop];
|
|
989
989
|
}
|
|
990
990
|
return target;
|
|
991
991
|
};
|
|
992
992
|
function useResizeObserver(target, callback, options = {}) {
|
|
993
|
-
const _a = options, { window = defaultWindow } = _a, observerOptions = __objRest(_a, ["window"]);
|
|
993
|
+
const _a = options, { window = defaultWindow } = _a, observerOptions = __objRest$1(_a, ["window"]);
|
|
994
994
|
let observer;
|
|
995
995
|
const isSupported = useSupported(() => window && "ResizeObserver" in window);
|
|
996
996
|
const cleanup = () => {
|
|
@@ -1104,7 +1104,7 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
|
|
|
1104
1104
|
immediate = true
|
|
1105
1105
|
} = options;
|
|
1106
1106
|
const isSupported = useSupported(() => window && "IntersectionObserver" in window);
|
|
1107
|
-
const targets =
|
|
1107
|
+
const targets = vueDemi.computed(() => {
|
|
1108
1108
|
const _target = shared.toValue(target);
|
|
1109
1109
|
return (Array.isArray(_target) ? _target : [_target]).map(unrefElement).filter(shared.notNullish);
|
|
1110
1110
|
});
|
|
@@ -1284,17 +1284,17 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
|
|
|
1284
1284
|
}
|
|
1285
1285
|
|
|
1286
1286
|
var __defProp$9 = Object.defineProperty;
|
|
1287
|
-
var __getOwnPropSymbols$
|
|
1288
|
-
var __hasOwnProp$
|
|
1289
|
-
var __propIsEnum$
|
|
1287
|
+
var __getOwnPropSymbols$a = Object.getOwnPropertySymbols;
|
|
1288
|
+
var __hasOwnProp$a = Object.prototype.hasOwnProperty;
|
|
1289
|
+
var __propIsEnum$a = Object.prototype.propertyIsEnumerable;
|
|
1290
1290
|
var __defNormalProp$9 = (obj, key, value) => key in obj ? __defProp$9(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
1291
1291
|
var __spreadValues$9 = (a, b) => {
|
|
1292
1292
|
for (var prop in b || (b = {}))
|
|
1293
|
-
if (__hasOwnProp$
|
|
1293
|
+
if (__hasOwnProp$a.call(b, prop))
|
|
1294
1294
|
__defNormalProp$9(a, prop, b[prop]);
|
|
1295
|
-
if (__getOwnPropSymbols$
|
|
1296
|
-
for (var prop of __getOwnPropSymbols$
|
|
1297
|
-
if (__propIsEnum$
|
|
1295
|
+
if (__getOwnPropSymbols$a)
|
|
1296
|
+
for (var prop of __getOwnPropSymbols$a(b)) {
|
|
1297
|
+
if (__propIsEnum$a.call(b, prop))
|
|
1298
1298
|
__defNormalProp$9(a, prop, b[prop]);
|
|
1299
1299
|
}
|
|
1300
1300
|
return a;
|
|
@@ -1481,17 +1481,17 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
|
|
|
1481
1481
|
var __defProp$8 = Object.defineProperty;
|
|
1482
1482
|
var __defProps$7 = Object.defineProperties;
|
|
1483
1483
|
var __getOwnPropDescs$7 = Object.getOwnPropertyDescriptors;
|
|
1484
|
-
var __getOwnPropSymbols$
|
|
1485
|
-
var __hasOwnProp$
|
|
1486
|
-
var __propIsEnum$
|
|
1484
|
+
var __getOwnPropSymbols$9 = Object.getOwnPropertySymbols;
|
|
1485
|
+
var __hasOwnProp$9 = Object.prototype.hasOwnProperty;
|
|
1486
|
+
var __propIsEnum$9 = Object.prototype.propertyIsEnumerable;
|
|
1487
1487
|
var __defNormalProp$8 = (obj, key, value) => key in obj ? __defProp$8(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
1488
1488
|
var __spreadValues$8 = (a, b) => {
|
|
1489
1489
|
for (var prop in b || (b = {}))
|
|
1490
|
-
if (__hasOwnProp$
|
|
1490
|
+
if (__hasOwnProp$9.call(b, prop))
|
|
1491
1491
|
__defNormalProp$8(a, prop, b[prop]);
|
|
1492
|
-
if (__getOwnPropSymbols$
|
|
1493
|
-
for (var prop of __getOwnPropSymbols$
|
|
1494
|
-
if (__propIsEnum$
|
|
1492
|
+
if (__getOwnPropSymbols$9)
|
|
1493
|
+
for (var prop of __getOwnPropSymbols$9(b)) {
|
|
1494
|
+
if (__propIsEnum$9.call(b, prop))
|
|
1495
1495
|
__defNormalProp$8(a, prop, b[prop]);
|
|
1496
1496
|
}
|
|
1497
1497
|
return a;
|
|
@@ -1586,17 +1586,17 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
|
|
|
1586
1586
|
var __defProp$7 = Object.defineProperty;
|
|
1587
1587
|
var __defProps$6 = Object.defineProperties;
|
|
1588
1588
|
var __getOwnPropDescs$6 = Object.getOwnPropertyDescriptors;
|
|
1589
|
-
var __getOwnPropSymbols$
|
|
1590
|
-
var __hasOwnProp$
|
|
1591
|
-
var __propIsEnum$
|
|
1589
|
+
var __getOwnPropSymbols$8 = Object.getOwnPropertySymbols;
|
|
1590
|
+
var __hasOwnProp$8 = Object.prototype.hasOwnProperty;
|
|
1591
|
+
var __propIsEnum$8 = Object.prototype.propertyIsEnumerable;
|
|
1592
1592
|
var __defNormalProp$7 = (obj, key, value) => key in obj ? __defProp$7(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
1593
1593
|
var __spreadValues$7 = (a, b) => {
|
|
1594
1594
|
for (var prop in b || (b = {}))
|
|
1595
|
-
if (__hasOwnProp$
|
|
1595
|
+
if (__hasOwnProp$8.call(b, prop))
|
|
1596
1596
|
__defNormalProp$7(a, prop, b[prop]);
|
|
1597
|
-
if (__getOwnPropSymbols$
|
|
1598
|
-
for (var prop of __getOwnPropSymbols$
|
|
1599
|
-
if (__propIsEnum$
|
|
1597
|
+
if (__getOwnPropSymbols$8)
|
|
1598
|
+
for (var prop of __getOwnPropSymbols$8(b)) {
|
|
1599
|
+
if (__propIsEnum$8.call(b, prop))
|
|
1600
1600
|
__defNormalProp$7(a, prop, b[prop]);
|
|
1601
1601
|
}
|
|
1602
1602
|
return a;
|
|
@@ -1629,17 +1629,17 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
|
|
|
1629
1629
|
var __defProp$6 = Object.defineProperty;
|
|
1630
1630
|
var __defProps$5 = Object.defineProperties;
|
|
1631
1631
|
var __getOwnPropDescs$5 = Object.getOwnPropertyDescriptors;
|
|
1632
|
-
var __getOwnPropSymbols$
|
|
1633
|
-
var __hasOwnProp$
|
|
1634
|
-
var __propIsEnum$
|
|
1632
|
+
var __getOwnPropSymbols$7 = Object.getOwnPropertySymbols;
|
|
1633
|
+
var __hasOwnProp$7 = Object.prototype.hasOwnProperty;
|
|
1634
|
+
var __propIsEnum$7 = Object.prototype.propertyIsEnumerable;
|
|
1635
1635
|
var __defNormalProp$6 = (obj, key, value) => key in obj ? __defProp$6(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
1636
1636
|
var __spreadValues$6 = (a, b) => {
|
|
1637
1637
|
for (var prop in b || (b = {}))
|
|
1638
|
-
if (__hasOwnProp$
|
|
1638
|
+
if (__hasOwnProp$7.call(b, prop))
|
|
1639
1639
|
__defNormalProp$6(a, prop, b[prop]);
|
|
1640
|
-
if (__getOwnPropSymbols$
|
|
1641
|
-
for (var prop of __getOwnPropSymbols$
|
|
1642
|
-
if (__propIsEnum$
|
|
1640
|
+
if (__getOwnPropSymbols$7)
|
|
1641
|
+
for (var prop of __getOwnPropSymbols$7(b)) {
|
|
1642
|
+
if (__propIsEnum$7.call(b, prop))
|
|
1643
1643
|
__defNormalProp$6(a, prop, b[prop]);
|
|
1644
1644
|
}
|
|
1645
1645
|
return a;
|
|
@@ -1675,17 +1675,17 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
|
|
|
1675
1675
|
var __defProp$5 = Object.defineProperty;
|
|
1676
1676
|
var __defProps$4 = Object.defineProperties;
|
|
1677
1677
|
var __getOwnPropDescs$4 = Object.getOwnPropertyDescriptors;
|
|
1678
|
-
var __getOwnPropSymbols$
|
|
1679
|
-
var __hasOwnProp$
|
|
1680
|
-
var __propIsEnum$
|
|
1678
|
+
var __getOwnPropSymbols$6 = Object.getOwnPropertySymbols;
|
|
1679
|
+
var __hasOwnProp$6 = Object.prototype.hasOwnProperty;
|
|
1680
|
+
var __propIsEnum$6 = Object.prototype.propertyIsEnumerable;
|
|
1681
1681
|
var __defNormalProp$5 = (obj, key, value) => key in obj ? __defProp$5(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
1682
1682
|
var __spreadValues$5 = (a, b) => {
|
|
1683
1683
|
for (var prop in b || (b = {}))
|
|
1684
|
-
if (__hasOwnProp$
|
|
1684
|
+
if (__hasOwnProp$6.call(b, prop))
|
|
1685
1685
|
__defNormalProp$5(a, prop, b[prop]);
|
|
1686
|
-
if (__getOwnPropSymbols$
|
|
1687
|
-
for (var prop of __getOwnPropSymbols$
|
|
1688
|
-
if (__propIsEnum$
|
|
1686
|
+
if (__getOwnPropSymbols$6)
|
|
1687
|
+
for (var prop of __getOwnPropSymbols$6(b)) {
|
|
1688
|
+
if (__propIsEnum$6.call(b, prop))
|
|
1689
1689
|
__defNormalProp$5(a, prop, b[prop]);
|
|
1690
1690
|
}
|
|
1691
1691
|
return a;
|
|
@@ -1760,17 +1760,17 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
|
|
|
1760
1760
|
var __defProp$4 = Object.defineProperty;
|
|
1761
1761
|
var __defProps$3 = Object.defineProperties;
|
|
1762
1762
|
var __getOwnPropDescs$3 = Object.getOwnPropertyDescriptors;
|
|
1763
|
-
var __getOwnPropSymbols$
|
|
1764
|
-
var __hasOwnProp$
|
|
1765
|
-
var __propIsEnum$
|
|
1763
|
+
var __getOwnPropSymbols$5 = Object.getOwnPropertySymbols;
|
|
1764
|
+
var __hasOwnProp$5 = Object.prototype.hasOwnProperty;
|
|
1765
|
+
var __propIsEnum$5 = Object.prototype.propertyIsEnumerable;
|
|
1766
1766
|
var __defNormalProp$4 = (obj, key, value) => key in obj ? __defProp$4(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
1767
1767
|
var __spreadValues$4 = (a, b) => {
|
|
1768
1768
|
for (var prop in b || (b = {}))
|
|
1769
|
-
if (__hasOwnProp$
|
|
1769
|
+
if (__hasOwnProp$5.call(b, prop))
|
|
1770
1770
|
__defNormalProp$4(a, prop, b[prop]);
|
|
1771
|
-
if (__getOwnPropSymbols$
|
|
1772
|
-
for (var prop of __getOwnPropSymbols$
|
|
1773
|
-
if (__propIsEnum$
|
|
1771
|
+
if (__getOwnPropSymbols$5)
|
|
1772
|
+
for (var prop of __getOwnPropSymbols$5(b)) {
|
|
1773
|
+
if (__propIsEnum$5.call(b, prop))
|
|
1774
1774
|
__defNormalProp$4(a, prop, b[prop]);
|
|
1775
1775
|
}
|
|
1776
1776
|
return a;
|
|
@@ -1873,6 +1873,53 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
|
|
|
1873
1873
|
}
|
|
1874
1874
|
});
|
|
1875
1875
|
|
|
1876
|
+
var __getOwnPropSymbols$4 = Object.getOwnPropertySymbols;
|
|
1877
|
+
var __hasOwnProp$4 = Object.prototype.hasOwnProperty;
|
|
1878
|
+
var __propIsEnum$4 = Object.prototype.propertyIsEnumerable;
|
|
1879
|
+
var __objRest = (source, exclude) => {
|
|
1880
|
+
var target = {};
|
|
1881
|
+
for (var prop in source)
|
|
1882
|
+
if (__hasOwnProp$4.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
1883
|
+
target[prop] = source[prop];
|
|
1884
|
+
if (source != null && __getOwnPropSymbols$4)
|
|
1885
|
+
for (var prop of __getOwnPropSymbols$4(source)) {
|
|
1886
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$4.call(source, prop))
|
|
1887
|
+
target[prop] = source[prop];
|
|
1888
|
+
}
|
|
1889
|
+
return target;
|
|
1890
|
+
};
|
|
1891
|
+
function useMutationObserver(target, callback, options = {}) {
|
|
1892
|
+
const _a = options, { window = defaultWindow } = _a, mutationOptions = __objRest(_a, ["window"]);
|
|
1893
|
+
let observer;
|
|
1894
|
+
const isSupported = useSupported(() => window && "MutationObserver" in window);
|
|
1895
|
+
const cleanup = () => {
|
|
1896
|
+
if (observer) {
|
|
1897
|
+
observer.disconnect();
|
|
1898
|
+
observer = void 0;
|
|
1899
|
+
}
|
|
1900
|
+
};
|
|
1901
|
+
const stopWatch = vueDemi.watch(
|
|
1902
|
+
() => unrefElement(target),
|
|
1903
|
+
(el) => {
|
|
1904
|
+
cleanup();
|
|
1905
|
+
if (isSupported.value && window && el) {
|
|
1906
|
+
observer = new MutationObserver(callback);
|
|
1907
|
+
observer.observe(el, mutationOptions);
|
|
1908
|
+
}
|
|
1909
|
+
},
|
|
1910
|
+
{ immediate: true }
|
|
1911
|
+
);
|
|
1912
|
+
const stop = () => {
|
|
1913
|
+
cleanup();
|
|
1914
|
+
stopWatch();
|
|
1915
|
+
};
|
|
1916
|
+
shared.tryOnScopeDispose(stop);
|
|
1917
|
+
return {
|
|
1918
|
+
isSupported,
|
|
1919
|
+
stop
|
|
1920
|
+
};
|
|
1921
|
+
}
|
|
1922
|
+
|
|
1876
1923
|
function useCssVar(prop, target, options = {}) {
|
|
1877
1924
|
const { window = defaultWindow, initialValue = "", observe = false } = options;
|
|
1878
1925
|
const variable = vueDemi.ref(initialValue);
|
|
@@ -1890,7 +1937,7 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
|
|
|
1890
1937
|
}
|
|
1891
1938
|
}
|
|
1892
1939
|
if (observe) {
|
|
1893
|
-
|
|
1940
|
+
useMutationObserver(elRef, updateCssVar, {
|
|
1894
1941
|
attributes: true,
|
|
1895
1942
|
window
|
|
1896
1943
|
});
|
|
@@ -2311,4 +2358,4 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
|
|
|
2311
2358
|
exports.vScroll = vScroll;
|
|
2312
2359
|
exports.vScrollLock = vScrollLock;
|
|
2313
2360
|
|
|
2314
|
-
})(this.VueUse = this.VueUse || {}, VueDemi, VueUse, VueUse
|
|
2361
|
+
})(this.VueUse = this.VueUse || {}, VueDemi, VueUse, VueUse);
|
package/index.iife.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var VueDemi=function(s,n,g){if(s.install)return s;if(!n)return console.error("[vue-demi] no Vue instance found, please be sure to import `vue` before `vue-demi`."),s;if(n.version.slice(0,4)==="2.7."){let I=function(h,U){var b,k={},z={config:n.config,use:n.use.bind(n),mixin:n.mixin.bind(n),component:n.component.bind(n),provide:function(T,N){return k[T]=N,this},directive:function(T,N){return N?(n.directive(T,N),z):n.directive(T)},mount:function(T,N){return b||(b=new n(Object.assign({propsData:U},h,{provide:Object.assign(k,h.provide)})),b.$mount(T,N),b)},unmount:function(){b&&(b.$destroy(),b=void 0)}};return z};var He=I;for(var c in n)s[c]=n[c];s.isVue2=!0,s.isVue3=!1,s.install=function(){},s.Vue=n,s.Vue2=n,s.version=n.version,s.warn=n.util.warn,s.createApp=I}else if(n.version.slice(0,2)==="2.")if(g){for(var c in g)s[c]=g[c];s.isVue2=!0,s.isVue3=!1,s.install=function(){},s.Vue=n,s.Vue2=n,s.version=n.version}else console.error("[vue-demi] no VueCompositionAPI instance found, please be sure to import `@vue/composition-api` before `vue-demi`.");else if(n.version.slice(0,2)==="3."){for(var c in n)s[c]=n[c];s.isVue2=!1,s.isVue3=!0,s.install=function(){},s.Vue=n,s.Vue2=void 0,s.version=n.version,s.set=function(I,h,U){return Array.isArray(I)?(I.length=Math.max(I.length,h),I.splice(h,1,U),U):(I[h]=U,U)},s.del=function(I,h){if(Array.isArray(I)){I.splice(h,1);return}delete I[h]}}else console.error("[vue-demi] Vue version "+n.version+" is unsupported.");return s}(this.VueDemi=this.VueDemi||(typeof VueDemi<"u"?VueDemi:{}),this.Vue||(typeof Vue<"u"?Vue:void 0),this.VueCompositionAPI||(typeof VueCompositionAPI<"u"?VueCompositionAPI:void 0));(function(s,n,g,c,He){"use strict";const I=n.defineComponent({name:"OnClickOutside",props:["as","options"],emits:["trigger"],setup(t,{slots:e,emit:r}){const o=n.ref();return g.onClickOutside(o,a=>{r("trigger",a)},t.options),()=>{if(e.default)return n.h(t.as||"div",{ref:o},e.default())}}});function h(t){var e;const r=c.toValue(t);return(e=r?.$el)!=null?e:r}const U=c.isClient?window:void 0;function b(...t){let e,r,o,a;if(typeof t[0]=="string"||Array.isArray(t[0])?([r,o,a]=t,e=U):[e,r,o,a]=t,!e)return c.noop;Array.isArray(r)||(r=[r]),Array.isArray(o)||(o=[o]);const i=[],l=()=>{i.forEach(d=>d()),i.length=0},u=(d,_,p,m)=>(d.addEventListener(_,p,m),()=>d.removeEventListener(_,p,m)),f=n.watch(()=>[h(e),c.toValue(a)],([d,_])=>{l(),d&&i.push(...r.flatMap(p=>o.map(m=>u(d,p,m,_))))},{immediate:!0,flush:"post"}),v=()=>{f(),l()};return c.tryOnScopeDispose(v),v}let k=!1;function z(t,e,r={}){const{window:o=U,ignore:a=[],capture:i=!0,detectIframe:l=!1}=r;if(!o)return;c.isIOS&&!k&&(k=!0,Array.from(o.document.body.children).forEach(p=>p.addEventListener("click",c.noop)));let u=!0;const f=p=>a.some(m=>{if(typeof m=="string")return Array.from(o.document.querySelectorAll(m)).some(y=>y===p.target||p.composedPath().includes(y));{const y=h(m);return y&&(p.target===y||p.composedPath().includes(y))}}),d=[b(o,"click",p=>{const m=h(t);if(!(!m||m===p.target||p.composedPath().includes(m))){if(p.detail===0&&(u=!f(p)),!u){u=!0;return}e(p)}},{passive:!0,capture:i}),b(o,"pointerdown",p=>{const m=h(t);m&&(u=!p.composedPath().includes(m)&&!f(p))},{passive:!0}),l&&b(o,"blur",p=>{var m;const y=h(t);((m=o.document.activeElement)==null?void 0:m.tagName)==="IFRAME"&&!y?.contains(o.document.activeElement)&&e(p)})].filter(Boolean);return()=>d.forEach(p=>p())}const T={[c.directiveHooks.mounted](t,e){const r=!e.modifiers.bubble;if(typeof e.value=="function")t.__onClickOutside_stop=z(t,e.value,{capture:r});else{const[o,a]=e.value;t.__onClickOutside_stop=z(t,o,Object.assign({capture:r},a))}},[c.directiveHooks.unmounted](t){t.__onClickOutside_stop()}};function N(t){return typeof t=="function"?t:typeof t=="string"?e=>e.key===t:Array.isArray(t)?e=>t.includes(e.key):()=>!0}function X(...t){let e,r,o={};t.length===3?(e=t[0],r=t[1],o=t[2]):t.length===2?typeof t[1]=="object"?(e=!0,r=t[0],o=t[1]):(e=t[0],r=t[1]):(e=!0,r=t[0]);const{target:a=U,eventName:i="keydown",passive:l=!1,dedupe:u=!1}=o,f=N(e);return b(a,i,d=>{d.repeat&&c.toValue(u)||f(d)&&r(d)},l)}var Be=Object.defineProperty,q=Object.getOwnPropertySymbols,We=Object.prototype.hasOwnProperty,Fe=Object.prototype.propertyIsEnumerable,Q=(t,e,r)=>e in t?Be(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,Ke=(t,e)=>{for(var r in e||(e={}))We.call(e,r)&&Q(t,r,e[r]);if(q)for(var r of q(e))Fe.call(e,r)&&Q(t,r,e[r]);return t};const Ge={[c.directiveHooks.mounted](t,e){var r,o;const a=(o=(r=e.arg)==null?void 0:r.split(","))!=null?o:!0;if(typeof e.value=="function")X(a,e.value,{target:t});else{const[i,l]=e.value;X(a,i,Ke({target:t},l))}}},Je=500;function K(t,e,r){var o,a;const i=n.computed(()=>h(t));let l;function u(){l&&(clearTimeout(l),l=void 0)}function f(d){var _,p,m,y;(_=r?.modifiers)!=null&&_.self&&d.target!==i.value||(u(),(p=r?.modifiers)!=null&&p.prevent&&d.preventDefault(),(m=r?.modifiers)!=null&&m.stop&&d.stopPropagation(),l=setTimeout(()=>e(d),(y=r?.delay)!=null?y:Je))}const v={capture:(o=r?.modifiers)==null?void 0:o.capture,once:(a=r?.modifiers)==null?void 0:a.once};b(i,"pointerdown",f,v),b(i,"pointerup",u,v),b(i,"pointerleave",u,v)}const Ye=n.defineComponent({name:"OnLongPress",props:["as","options"],emits:["trigger"],setup(t,{slots:e,emit:r}){const o=n.ref();return K(o,a=>{r("trigger",a)},t.options),()=>{if(e.default)return n.h(t.as||"div",{ref:o},e.default())}}}),Z={[c.directiveHooks.mounted](t,e){typeof e.value=="function"?K(t,e.value,{modifiers:e.modifiers}):K(t,...e.value)}},Xe=n.defineComponent({name:"UseActiveElement",setup(t,{slots:e}){const r=n.reactive({element:g.useActiveElement()});return()=>{if(e.default)return e.default(r)}}}),qe=n.defineComponent({name:"UseBattery",setup(t,{slots:e}){const r=n.reactive(g.useBattery(t));return()=>{if(e.default)return e.default(r)}}}),Qe=n.defineComponent({name:"UseBrowserLocation",setup(t,{slots:e}){const r=n.reactive(g.useBrowserLocation());return()=>{if(e.default)return e.default(r)}}}),H=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},B="__vueuse_ssr_handlers__",Ze=xe();function xe(){return B in H||(H[B]=H[B]||{}),H[B]}function x(t,e){return Ze[t]||e}function De(t){return t==null?"any":t instanceof Set?"set":t instanceof Map?"map":t instanceof Date?"date":typeof t=="boolean"?"boolean":typeof t=="string"?"string":typeof t=="object"?"object":Number.isNaN(t)?"any":"number"}var et=Object.defineProperty,D=Object.getOwnPropertySymbols,tt=Object.prototype.hasOwnProperty,rt=Object.prototype.propertyIsEnumerable,ee=(t,e,r)=>e in t?et(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,te=(t,e)=>{for(var r in e||(e={}))tt.call(e,r)&&ee(t,r,e[r]);if(D)for(var r of D(e))rt.call(e,r)&&ee(t,r,e[r]);return t};const nt={boolean:{read:t=>t==="true",write:t=>String(t)},object:{read:t=>JSON.parse(t),write:t=>JSON.stringify(t)},number:{read:t=>Number.parseFloat(t),write:t=>String(t)},any:{read:t=>t,write:t=>String(t)},string:{read:t=>t,write:t=>String(t)},map:{read:t=>new Map(JSON.parse(t)),write:t=>JSON.stringify(Array.from(t.entries()))},set:{read:t=>new Set(JSON.parse(t)),write:t=>JSON.stringify(Array.from(t))},date:{read:t=>new Date(t),write:t=>t.toISOString()}},re="vueuse-storage";function ot(t,e,r,o={}){var a;const{flush:i="pre",deep:l=!0,listenToStorageChanges:u=!0,writeDefaults:f=!0,mergeDefaults:v=!1,shallow:d,window:_=U,eventFilter:p,onError:m=O=>{console.error(O)}}=o,y=(d?n.shallowRef:n.ref)(e);if(!r)try{r=x("getDefaultStorage",()=>{var O;return(O=U)==null?void 0:O.localStorage})()}catch(O){m(O)}if(!r)return y;const P=c.toValue(e),C=De(P),j=(a=o.serializer)!=null?a:nt[C],{pause:A,resume:$}=c.pausableWatch(y,()=>S(y.value),{flush:i,deep:l,eventFilter:p});return _&&u&&(b(_,"storage",L),b(_,re,V)),L(),y;function S(O){try{if(O==null)r.removeItem(t);else{const w=j.write(O),M=r.getItem(t);M!==w&&(r.setItem(t,w),_&&_.dispatchEvent(new CustomEvent(re,{detail:{key:t,oldValue:M,newValue:w,storageArea:r}})))}}catch(w){m(w)}}function E(O){const w=O?O.newValue:r.getItem(t);if(w==null)return f&&P!==null&&r.setItem(t,j.write(P)),P;if(!O&&v){const M=j.read(w);return typeof v=="function"?v(M,P):C==="object"&&!Array.isArray(M)?te(te({},P),M):M}else return typeof w!="string"?w:j.read(w)}function V(O){L(O.detail)}function L(O){if(!(O&&O.storageArea!==r)){if(O&&O.key==null){y.value=P;return}if(!(O&&O.key!==t)){A();try{y.value=E(O)}catch(w){m(w)}finally{O?n.nextTick($):$()}}}}}function at(){const t=n.ref(!1);return n.getCurrentInstance()&&n.onMounted(()=>{t.value=!0}),t}function G(t){const e=at();return n.computed(()=>(e.value,!!t()))}function st(t,e={}){const{window:r=U}=e,o=G(()=>r&&"matchMedia"in r&&typeof r.matchMedia=="function");let a;const i=n.ref(!1),l=()=>{a&&("removeEventListener"in a?a.removeEventListener("change",u):a.removeListener(u))},u=()=>{o.value&&(l(),a=r.matchMedia(c.toRef(t).value),i.value=!!a?.matches,a&&("addEventListener"in a?a.addEventListener("change",u):a.addListener(u)))};return n.watchEffect(u),c.tryOnScopeDispose(()=>l()),i}function lt(t){return st("(prefers-color-scheme: dark)",t)}var it=Object.defineProperty,ne=Object.getOwnPropertySymbols,ut=Object.prototype.hasOwnProperty,ct=Object.prototype.propertyIsEnumerable,oe=(t,e,r)=>e in t?it(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,ft=(t,e)=>{for(var r in e||(e={}))ut.call(e,r)&&oe(t,r,e[r]);if(ne)for(var r of ne(e))ct.call(e,r)&&oe(t,r,e[r]);return t};function dt(t={}){const{selector:e="html",attribute:r="class",initialValue:o="auto",window:a=U,storage:i,storageKey:l="vueuse-color-scheme",listenToStorageChanges:u=!0,storageRef:f,emitAuto:v,disableTransition:d=!0}=t,_=ft({auto:"",light:"light",dark:"dark"},t.modes||{}),p=lt({window:a}),m=n.computed(()=>p.value?"dark":"light"),y=f||(l==null?n.ref(o):ot(l,o,i,{window:a,listenToStorageChanges:u})),P=n.computed({get(){return y.value==="auto"&&!v?m.value:y.value},set($){y.value=$}}),C=x("updateHTMLAttrs",($,S,E)=>{const V=typeof $=="string"?a?.document.querySelector($):c.toValue($);if(!V)return;let L;if(d&&(L=a.document.createElement("style"),L.appendChild(document.createTextNode("*{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}")),a.document.head.appendChild(L)),S==="class"){const O=E.split(/\s/g);Object.values(_).flatMap(w=>(w||"").split(/\s/g)).filter(Boolean).forEach(w=>{O.includes(w)?V.classList.add(w):V.classList.remove(w)})}else V.setAttribute(S,E);d&&(a.getComputedStyle(L).opacity,document.head.removeChild(L))});function j($){var S;const E=$==="auto"?m.value:$;C(e,r,(S=_[E])!=null?S:E)}function A($){t.onChanged?t.onChanged($,j):j($)}n.watch(P,A,{flush:"post",immediate:!0}),v&&n.watch(m,()=>A(P.value),{flush:"post"}),c.tryOnMounted(()=>A(P.value));try{return Object.assign(P,{store:y,system:m})}catch{return P}}const pt=n.defineComponent({name:"UseColorMode",props:["selector","attribute","modes","onChanged","storageKey","storage","emitAuto"],setup(t,{slots:e}){const r=dt(t),o=n.reactive({mode:r,system:r.system,store:r.store});return()=>{if(e.default)return e.default(o)}}}),vt=n.defineComponent({name:"UseDark",props:["selector","attribute","valueDark","valueLight","onChanged","storageKey","storage"],setup(t,{slots:e}){const r=g.useDark(t),o=n.reactive({isDark:r,toggleDark:c.useToggle(r)});return()=>{if(e.default)return e.default(o)}}}),gt=n.defineComponent({name:"UseDeviceMotion",setup(t,{slots:e}){const r=n.reactive(g.useDeviceMotion());return()=>{if(e.default)return e.default(r)}}}),_t=n.defineComponent({name:"UseDeviceOrientation",setup(t,{slots:e}){const r=n.reactive(g.useDeviceOrientation());return()=>{if(e.default)return e.default(r)}}}),mt=n.defineComponent({name:"UseDevicePixelRatio",setup(t,{slots:e}){const r=n.reactive({pixelRatio:g.useDevicePixelRatio()});return()=>{if(e.default)return e.default(r)}}}),yt=n.defineComponent({name:"UseDevicesList",props:["onUpdated","requestPermissions","constraints"],setup(t,{slots:e}){const r=n.reactive(g.useDevicesList(t));return()=>{if(e.default)return e.default(r)}}}),Ot=n.defineComponent({name:"UseDocumentVisibility",setup(t,{slots:e}){const r=n.reactive({visibility:g.useDocumentVisibility()});return()=>{if(e.default)return e.default(r)}}});var Pt=Object.defineProperty,wt=Object.defineProperties,ht=Object.getOwnPropertyDescriptors,ae=Object.getOwnPropertySymbols,bt=Object.prototype.hasOwnProperty,St=Object.prototype.propertyIsEnumerable,se=(t,e,r)=>e in t?Pt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,Ut=(t,e)=>{for(var r in e||(e={}))bt.call(e,r)&&se(t,r,e[r]);if(ae)for(var r of ae(e))St.call(e,r)&&se(t,r,e[r]);return t},Ct=(t,e)=>wt(t,ht(e));const $t=n.defineComponent({name:"UseDraggable",props:["storageKey","storageType","initialValue","exact","preventDefault","stopPropagation","pointerTypes","as","handle","axis"],setup(t,{slots:e}){const r=n.ref(),o=n.computed(()=>{var f;return(f=t.handle)!=null?f:r.value}),a=t.storageKey&&g.useStorage(t.storageKey,c.toValue(t.initialValue)||{x:0,y:0},g.isClient?t.storageType==="session"?sessionStorage:localStorage:void 0),i=a||t.initialValue||{x:0,y:0},l=f=>{a&&(a.value.x=f.x,a.value.y=f.y)},u=n.reactive(g.useDraggable(r,Ct(Ut({},t),{handle:o,initialValue:i,onEnd:l})));return()=>{if(e.default)return n.h(t.as||"div",{ref:r,style:`touch-action:none;${u.style}`},e.default(u))}}}),Et=n.defineComponent({name:"UseElementBounding",props:["box","as"],setup(t,{slots:e}){const r=n.ref(),o=n.reactive(g.useElementBounding(r));return()=>{if(e.default)return n.h(t.as||"div",{ref:r},e.default(o))}}});function jt(t,e={}){const{delayEnter:r=0,delayLeave:o=0,window:a=U}=e,i=n.ref(!1);let l;const u=f=>{const v=f?r:o;l&&(clearTimeout(l),l=void 0),v?l=setTimeout(()=>i.value=f,v):i.value=f};return a&&(b(t,"mouseenter",()=>u(!0),{passive:!0}),b(t,"mouseleave",()=>u(!1),{passive:!0})),i}const Lt={[c.directiveHooks.mounted](t,e){if(typeof e.value=="function"){const r=jt(t);n.watch(r,o=>e.value(o))}}},It=n.defineComponent({name:"UseElementSize",props:["width","height","box"],setup(t,{slots:e}){const r=n.ref(),o=n.reactive(g.useElementSize(r,{width:t.width,height:t.height},{box:t.box}));return()=>{if(e.default)return n.h(t.as||"div",{ref:r},e.default(o))}}});var le=Object.getOwnPropertySymbols,At=Object.prototype.hasOwnProperty,Vt=Object.prototype.propertyIsEnumerable,Mt=(t,e)=>{var r={};for(var o in t)At.call(t,o)&&e.indexOf(o)<0&&(r[o]=t[o]);if(t!=null&&le)for(var o of le(t))e.indexOf(o)<0&&Vt.call(t,o)&&(r[o]=t[o]);return r};function Tt(t,e,r={}){const o=r,{window:a=U}=o,i=Mt(o,["window"]);let l;const u=G(()=>a&&"ResizeObserver"in a),f=()=>{l&&(l.disconnect(),l=void 0)},v=n.computed(()=>Array.isArray(t)?t.map(p=>h(p)):[h(t)]),d=n.watch(v,p=>{if(f(),u.value&&a){l=new ResizeObserver(e);for(const m of p)m&&l.observe(m,i)}},{immediate:!0,flush:"post",deep:!0}),_=()=>{f(),d()};return c.tryOnScopeDispose(_),{isSupported:u,stop:_}}function Nt(t,e={width:0,height:0},r={}){const{window:o=U,box:a="content-box"}=r,i=n.computed(()=>{var f,v;return(v=(f=h(t))==null?void 0:f.namespaceURI)==null?void 0:v.includes("svg")}),l=n.ref(e.width),u=n.ref(e.height);return Tt(t,([f])=>{const v=a==="border-box"?f.borderBoxSize:a==="content-box"?f.contentBoxSize:f.devicePixelContentBoxSize;if(o&&i.value){const d=h(t);if(d){const _=o.getComputedStyle(d);l.value=parseFloat(_.width),u.value=parseFloat(_.height)}}else if(v){const d=Array.isArray(v)?v:[v];l.value=d.reduce((_,{inlineSize:p})=>_+p,0),u.value=d.reduce((_,{blockSize:p})=>_+p,0)}else l.value=f.contentRect.width,u.value=f.contentRect.height},r),n.watch(()=>h(t),f=>{l.value=f?e.width:0,u.value=f?e.height:0}),{width:l,height:u}}const Rt={[c.directiveHooks.mounted](t,e){var r;const o=typeof e.value=="function"?e.value:(r=e.value)==null?void 0:r[0],a=typeof e.value=="function"?[]:e.value.slice(1),{width:i,height:l}=Nt(t,...a);n.watch([i,l],([u,f])=>o({width:u,height:f}))}},kt=n.defineComponent({name:"UseElementVisibility",props:["as"],setup(t,{slots:e}){const r=n.ref(),o=n.reactive({isVisible:g.useElementVisibility(r)});return()=>{if(e.default)return n.h(t.as||"div",{ref:r},e.default(o))}}});function J(t,e,r={}){const{root:o,rootMargin:a="0px",threshold:i=.1,window:l=U,immediate:u=!0}=r,f=G(()=>l&&"IntersectionObserver"in l),v=He.computed(()=>{const y=c.toValue(t);return(Array.isArray(y)?y:[y]).map(h).filter(c.notNullish)});let d=c.noop;const _=n.ref(u),p=f.value?n.watch(()=>[v.value,h(o),_.value],([y,P])=>{if(d(),!_.value||!y.length)return;const C=new IntersectionObserver(e,{root:h(P),rootMargin:a,threshold:i});y.forEach(j=>j&&C.observe(j)),d=()=>{C.disconnect(),d=c.noop}},{immediate:u,flush:"post"}):c.noop,m=()=>{d(),p(),_.value=!1};return c.tryOnScopeDispose(m),{isSupported:f,isActive:_,pause(){d(),_.value=!1},resume(){_.value=!0},stop:m}}function ie(t,{window:e=U,scrollTarget:r}={}){const o=n.ref(!1);return J(t,([{isIntersecting:a}])=>{o.value=a},{root:r,window:e}),o}const zt={[c.directiveHooks.mounted](t,e){if(typeof e.value=="function"){const r=e.value,o=ie(t);n.watch(o,a=>r(a),{immediate:!0})}else{const[r,o]=e.value,a=ie(t,o);n.watch(a,i=>r(i),{immediate:!0})}}},Ht=n.defineComponent({name:"UseEyeDropper",props:{sRGBHex:String},setup(t,{slots:e}){const r=n.reactive(g.useEyeDropper());return()=>{if(e.default)return e.default(r)}}}),Bt=n.defineComponent({name:"UseFullscreen",props:["as"],setup(t,{slots:e}){const r=n.ref(),o=n.reactive(g.useFullscreen(r));return()=>{if(e.default)return n.h(t.as||"div",{ref:r},e.default(o))}}}),Wt=n.defineComponent({name:"UseGeolocation",props:["enableHighAccuracy","maximumAge","timeout","navigator"],setup(t,{slots:e}){const r=n.reactive(g.useGeolocation(t));return()=>{if(e.default)return e.default(r)}}}),Ft=n.defineComponent({name:"UseIdle",props:["timeout","events","listenForVisibilityChange","initialState"],setup(t,{slots:e}){const r=n.reactive(g.useIdle(t.timeout,t));return()=>{if(e.default)return e.default(r)}}});function Kt(t,e,r){const{immediate:o=!0,delay:a=0,onError:i=c.noop,onSuccess:l=c.noop,resetOnExecute:u=!0,shallow:f=!0,throwError:v}=r??{},d=f?n.shallowRef(e):n.ref(e),_=n.ref(!1),p=n.ref(!1),m=n.shallowRef(void 0);async function y(P=0,...C){u&&(d.value=e),m.value=void 0,_.value=!1,p.value=!0,P>0&&await c.promiseTimeout(P);const j=typeof t=="function"?t(...C):t;try{const A=await j;d.value=A,_.value=!0,l(A)}catch(A){if(m.value=A,i(A),v)throw A}finally{p.value=!1}return d.value}return o&&y(a),{state:d,isReady:_,isLoading:p,error:m,execute:y}}var Gt=Object.defineProperty,ue=Object.getOwnPropertySymbols,Jt=Object.prototype.hasOwnProperty,Yt=Object.prototype.propertyIsEnumerable,ce=(t,e,r)=>e in t?Gt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,Xt=(t,e)=>{for(var r in e||(e={}))Jt.call(e,r)&&ce(t,r,e[r]);if(ue)for(var r of ue(e))Yt.call(e,r)&&ce(t,r,e[r]);return t};async function qt(t){return new Promise((e,r)=>{const o=new Image,{src:a,srcset:i,sizes:l}=t;o.src=a,i&&(o.srcset=i),l&&(o.sizes=l),o.onload=()=>e(o),o.onerror=r})}function Qt(t,e={}){const r=Kt(()=>qt(c.toValue(t)),void 0,Xt({resetOnExecute:!0},e));return n.watch(()=>c.toValue(t),()=>r.execute(e.delay),{deep:!0}),r}const Zt=n.defineComponent({name:"UseImage",props:["src","srcset","sizes","as"],setup(t,{slots:e}){const r=n.reactive(Qt(t));return()=>r.isLoading&&e.loading?e.loading(r):r.error&&e.error?e.error(r.error):e.default?e.default(r):n.h(t.as||"img",t)}}),fe=1;function Y(t,e={}){const{throttle:r=0,idle:o=200,onStop:a=c.noop,onScroll:i=c.noop,offset:l={left:0,right:0,top:0,bottom:0},eventListenerOptions:u={capture:!1,passive:!0},behavior:f="auto"}=e,v=n.ref(0),d=n.ref(0),_=n.computed({get(){return v.value},set(S){m(S,void 0)}}),p=n.computed({get(){return d.value},set(S){m(void 0,S)}});function m(S,E){var V,L,O;const w=c.toValue(t);w&&((O=w instanceof Document?document.body:w)==null||O.scrollTo({top:(V=c.toValue(E))!=null?V:p.value,left:(L=c.toValue(S))!=null?L:_.value,behavior:c.toValue(f)}))}const y=n.ref(!1),P=n.reactive({left:!0,right:!1,top:!0,bottom:!1}),C=n.reactive({left:!1,right:!1,top:!1,bottom:!1}),j=S=>{y.value&&(y.value=!1,C.left=!1,C.right=!1,C.top=!1,C.bottom=!1,a(S))},A=c.useDebounceFn(j,r+o),$=S=>{const E=S.target===document?S.target.documentElement:S.target,{display:V,flexDirection:L}=getComputedStyle(E),O=E.scrollLeft;C.left=O<v.value,C.right=O>v.value;const w=Math.abs(O)<=0+(l.left||0),M=Math.abs(O)+E.clientWidth>=E.scrollWidth-(l.right||0)-fe;V==="flex"&&L==="row-reverse"?(P.left=M,P.right=w):(P.left=w,P.right=M),v.value=O;let R=E.scrollTop;S.target===document&&!R&&(R=document.body.scrollTop),C.top=R<d.value,C.bottom=R>d.value;const ke=Math.abs(R)<=0+(l.top||0),ze=Math.abs(R)+E.clientHeight>=E.scrollHeight-(l.bottom||0)-fe;V==="flex"&&L==="column-reverse"?(P.top=ze,P.bottom=ke):(P.top=ke,P.bottom=ze),d.value=R,y.value=!0,A(S),i(S)};return b(t,"scroll",r?c.useThrottleFn($,r,!0,!1):$,u),b(t,"scrollend",j,u),{x:_,y:p,isScrolling:y,arrivedState:P,directions:C}}var xt=Object.defineProperty,Dt=Object.defineProperties,er=Object.getOwnPropertyDescriptors,de=Object.getOwnPropertySymbols,tr=Object.prototype.hasOwnProperty,rr=Object.prototype.propertyIsEnumerable,pe=(t,e,r)=>e in t?xt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,ve=(t,e)=>{for(var r in e||(e={}))tr.call(e,r)&&pe(t,r,e[r]);if(de)for(var r of de(e))rr.call(e,r)&&pe(t,r,e[r]);return t},nr=(t,e)=>Dt(t,er(e));function ge(t,e,r={}){var o;const{direction:a="bottom",interval:i=100}=r,l=n.reactive(Y(t,nr(ve({},r),{offset:ve({[a]:(o=r.distance)!=null?o:0},r.offset)}))),u=n.ref(),f=n.computed(()=>!!u.value);function v(){const d=c.toValue(t);if(!d)return;const _=a==="bottom"||a==="top"?d.scrollHeight<=d.clientHeight:d.scrollWidth<=d.clientWidth;(l.arrivedState[a]||_)&&(u.value||(u.value=Promise.all([e(l),new Promise(p=>setTimeout(p,i))]).finally(()=>{u.value=null,n.nextTick(()=>v())})))}return n.watch(()=>[l.arrivedState[a],c.toValue(t)],v,{immediate:!0}),{isLoading:f}}const or={[c.directiveHooks.mounted](t,e){typeof e.value=="function"?ge(t,e.value):ge(t,...e.value)}},ar={[c.directiveHooks.mounted](t,e){typeof e.value=="function"?J(t,e.value):J(t,...e.value)}},sr=n.defineComponent({name:"UseMouse",props:["touch","resetOnTouchEnds","initialValue"],setup(t,{slots:e}){const r=n.reactive(g.useMouse(t));return()=>{if(e.default)return e.default(r)}}}),lr=n.defineComponent({name:"UseMouseElement",props:["handleOutside","as"],setup(t,{slots:e}){const r=n.ref(),o=n.reactive(g.useMouseInElement(r,t));return()=>{if(e.default)return n.h(t.as||"div",{ref:r},e.default(o))}}});var ir=Object.defineProperty,ur=Object.defineProperties,cr=Object.getOwnPropertyDescriptors,_e=Object.getOwnPropertySymbols,fr=Object.prototype.hasOwnProperty,dr=Object.prototype.propertyIsEnumerable,me=(t,e,r)=>e in t?ir(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,pr=(t,e)=>{for(var r in e||(e={}))fr.call(e,r)&&me(t,r,e[r]);if(_e)for(var r of _e(e))dr.call(e,r)&&me(t,r,e[r]);return t},vr=(t,e)=>ur(t,cr(e));const gr=n.defineComponent({name:"UseMousePressed",props:["touch","initialValue","as"],setup(t,{slots:e}){const r=n.ref(),o=n.reactive(g.useMousePressed(vr(pr({},t),{target:r})));return()=>{if(e.default)return n.h(t.as||"div",{ref:r},e.default(o))}}}),_r=n.defineComponent({name:"UseNetwork",setup(t,{slots:e}){const r=n.reactive(g.useNetwork());return()=>{if(e.default)return e.default(r)}}});var mr=Object.defineProperty,yr=Object.defineProperties,Or=Object.getOwnPropertyDescriptors,ye=Object.getOwnPropertySymbols,Pr=Object.prototype.hasOwnProperty,wr=Object.prototype.propertyIsEnumerable,Oe=(t,e,r)=>e in t?mr(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,hr=(t,e)=>{for(var r in e||(e={}))Pr.call(e,r)&&Oe(t,r,e[r]);if(ye)for(var r of ye(e))wr.call(e,r)&&Oe(t,r,e[r]);return t},br=(t,e)=>yr(t,Or(e));const Sr=n.defineComponent({name:"UseNow",props:["interval"],setup(t,{slots:e}){const r=n.reactive(g.useNow(br(hr({},t),{controls:!0})));return()=>{if(e.default)return e.default(r)}}}),Ur=n.defineComponent({name:"UseObjectUrl",props:["object"],setup(t,{slots:e}){const r=c.toRef(t,"object"),o=g.useObjectUrl(r);return()=>{if(e.default&&o.value)return e.default(o)}}});var Cr=Object.defineProperty,$r=Object.defineProperties,Er=Object.getOwnPropertyDescriptors,Pe=Object.getOwnPropertySymbols,jr=Object.prototype.hasOwnProperty,Lr=Object.prototype.propertyIsEnumerable,we=(t,e,r)=>e in t?Cr(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,Ir=(t,e)=>{for(var r in e||(e={}))jr.call(e,r)&&we(t,r,e[r]);if(Pe)for(var r of Pe(e))Lr.call(e,r)&&we(t,r,e[r]);return t},Ar=(t,e)=>$r(t,Er(e));const Vr=n.defineComponent({name:"UseOffsetPagination",props:["total","page","pageSize","onPageChange","onPageSizeChange","onPageCountChange"],emits:["page-change","page-size-change","page-count-change"],setup(t,{slots:e,emit:r}){const o=n.reactive(g.useOffsetPagination(Ar(Ir({},t),{onPageChange(...a){var i;(i=t.onPageChange)==null||i.call(t,...a),r("page-change",...a)},onPageSizeChange(...a){var i;(i=t.onPageSizeChange)==null||i.call(t,...a),r("page-size-change",...a)},onPageCountChange(...a){var i;(i=t.onPageCountChange)==null||i.call(t,...a),r("page-count-change",...a)}})));return()=>{if(e.default)return e.default(o)}}}),Mr=n.defineComponent({name:"UseOnline",setup(t,{slots:e}){const r=n.reactive({isOnline:g.useOnline()});return()=>{if(e.default)return e.default(r)}}}),Tr=n.defineComponent({name:"UsePageLeave",setup(t,{slots:e}){const r=n.reactive({isLeft:g.usePageLeave()});return()=>{if(e.default)return e.default(r)}}});var Nr=Object.defineProperty,Rr=Object.defineProperties,kr=Object.getOwnPropertyDescriptors,he=Object.getOwnPropertySymbols,zr=Object.prototype.hasOwnProperty,Hr=Object.prototype.propertyIsEnumerable,be=(t,e,r)=>e in t?Nr(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,Br=(t,e)=>{for(var r in e||(e={}))zr.call(e,r)&&be(t,r,e[r]);if(he)for(var r of he(e))Hr.call(e,r)&&be(t,r,e[r]);return t},Wr=(t,e)=>Rr(t,kr(e));const Fr=n.defineComponent({name:"UsePointer",props:["pointerTypes","initialValue","target"],setup(t,{slots:e}){const r=n.ref(null),o=n.reactive(g.usePointer(Wr(Br({},t),{target:t.target==="self"?r:U})));return()=>{if(e.default)return e.default(o,{ref:r})}}}),Kr=n.defineComponent({name:"UsePointerLock",props:["as"],setup(t,{slots:e}){const r=n.ref(),o=n.reactive(g.usePointerLock(r));return()=>{if(e.default)return n.h(t.as||"div",{ref:r},e.default(o))}}}),Gr=n.defineComponent({name:"UsePreferredColorScheme",setup(t,{slots:e}){const r=n.reactive({colorScheme:g.usePreferredColorScheme()});return()=>{if(e.default)return e.default(r)}}}),Jr=n.defineComponent({name:"UsePreferredContrast",setup(t,{slots:e}){const r=n.reactive({contrast:g.usePreferredContrast()});return()=>{if(e.default)return e.default(r)}}}),Yr=n.defineComponent({name:"UsePreferredDark",setup(t,{slots:e}){const r=n.reactive({prefersDark:g.usePreferredDark()});return()=>{if(e.default)return e.default(r)}}}),Xr=n.defineComponent({name:"UsePreferredLanguages",setup(t,{slots:e}){const r=n.reactive({languages:g.usePreferredLanguages()});return()=>{if(e.default)return e.default(r)}}}),qr=n.defineComponent({name:"UsePreferredReducedMotion",setup(t,{slots:e}){const r=n.reactive({motion:g.usePreferredReducedMotion()});return()=>{if(e.default)return e.default(r)}}});function W(t,e,r={}){const{window:o=U,initialValue:a="",observe:i=!1}=r,l=n.ref(a),u=n.computed(()=>{var v;return h(e)||((v=o?.document)==null?void 0:v.documentElement)});function f(){var v;const d=c.toValue(t),_=c.toValue(u);if(_&&o){const p=(v=o.getComputedStyle(_).getPropertyValue(d))==null?void 0:v.trim();l.value=p||a}}return i&&g.useMutationObserver(u,f,{attributes:!0,window:o}),n.watch([u,()=>c.toValue(t)],f,{immediate:!0}),n.watch(l,v=>{var d;(d=u.value)!=null&&d.style&&u.value.style.setProperty(c.toValue(t),v)}),l}const Se="--vueuse-safe-area-top",Ue="--vueuse-safe-area-right",Ce="--vueuse-safe-area-bottom",$e="--vueuse-safe-area-left";function Qr(){const t=n.ref(""),e=n.ref(""),r=n.ref(""),o=n.ref("");if(c.isClient){const i=W(Se),l=W(Ue),u=W(Ce),f=W($e);i.value="env(safe-area-inset-top, 0px)",l.value="env(safe-area-inset-right, 0px)",u.value="env(safe-area-inset-bottom, 0px)",f.value="env(safe-area-inset-left, 0px)",a(),b("resize",c.useDebounceFn(a))}function a(){t.value=F(Se),e.value=F(Ue),r.value=F(Ce),o.value=F($e)}return{top:t,right:e,bottom:r,left:o,update:a}}function F(t){return getComputedStyle(document.documentElement).getPropertyValue(t)}const Zr=n.defineComponent({name:"UseScreenSafeArea",props:{top:Boolean,right:Boolean,bottom:Boolean,left:Boolean},setup(t,{slots:e}){const{top:r,right:o,bottom:a,left:i}=Qr();return()=>{if(e.default)return n.h("div",{style:{paddingTop:t.top?r.value:"",paddingRight:t.right?o.value:"",paddingBottom:t.bottom?a.value:"",paddingLeft:t.left?i.value:"",boxSizing:"border-box",maxHeight:"100vh",maxWidth:"100vw",overflow:"auto"}},e.default())}}});var xr=Object.defineProperty,Dr=Object.defineProperties,en=Object.getOwnPropertyDescriptors,Ee=Object.getOwnPropertySymbols,tn=Object.prototype.hasOwnProperty,rn=Object.prototype.propertyIsEnumerable,je=(t,e,r)=>e in t?xr(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,nn=(t,e)=>{for(var r in e||(e={}))tn.call(e,r)&&je(t,r,e[r]);if(Ee)for(var r of Ee(e))rn.call(e,r)&&je(t,r,e[r]);return t},on=(t,e)=>Dr(t,en(e));const an={[c.directiveHooks.mounted](t,e){if(typeof e.value=="function"){const r=e.value,o=Y(t,{onScroll(){r(o)},onStop(){r(o)}})}else{const[r,o]=e.value,a=Y(t,on(nn({},o),{onScroll(i){var l;(l=o.onScroll)==null||l.call(o,i),r(a)},onStop(i){var l;(l=o.onStop)==null||l.call(o,i),r(a)}}))}}};function Le(t){const e=window.getComputedStyle(t);if(e.overflowX==="scroll"||e.overflowY==="scroll"||e.overflowX==="auto"&&t.clientHeight<t.scrollHeight||e.overflowY==="auto"&&t.clientWidth<t.scrollWidth)return!0;{const r=t.parentNode;return!r||r.tagName==="BODY"?!1:Le(r)}}function sn(t){const e=t||window.event,r=e.target;return Le(r)?!1:e.touches.length>1?!0:(e.preventDefault&&e.preventDefault(),!1)}function ln(t,e=!1){const r=n.ref(e);let o=null,a;n.watch(c.toRef(t),u=>{if(u){const f=u;a=f.style.overflow,r.value&&(f.style.overflow="hidden")}},{immediate:!0});const i=()=>{const u=c.toValue(t);!u||r.value||(c.isIOS&&(o=b(u,"touchmove",f=>{sn(f)},{passive:!1})),u.style.overflow="hidden",r.value=!0)},l=()=>{const u=c.toValue(t);!u||!r.value||(c.isIOS&&o?.(),u.style.overflow=a,r.value=!1)};return c.tryOnScopeDispose(l),n.computed({get(){return r.value},set(u){u?i():l()}})}function un(){let t=!1;const e=n.ref(!1);return(r,o)=>{if(e.value=o.value,t)return;t=!0;const a=ln(r,o.value);n.watch(e,i=>a.value=i)}}const cn=un();var fn=Object.defineProperty,dn=Object.defineProperties,pn=Object.getOwnPropertyDescriptors,Ie=Object.getOwnPropertySymbols,vn=Object.prototype.hasOwnProperty,gn=Object.prototype.propertyIsEnumerable,Ae=(t,e,r)=>e in t?fn(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,_n=(t,e)=>{for(var r in e||(e={}))vn.call(e,r)&&Ae(t,r,e[r]);if(Ie)for(var r of Ie(e))gn.call(e,r)&&Ae(t,r,e[r]);return t},mn=(t,e)=>dn(t,pn(e));const yn=n.defineComponent({name:"UseTimeAgo",props:["time","updateInterval","max","fullDateFormatter","messages","showSecond"],setup(t,{slots:e}){const r=n.reactive(g.useTimeAgo(()=>t.time,mn(_n({},t),{controls:!0})));return()=>{if(e.default)return e.default(r)}}});var On=Object.defineProperty,Pn=Object.defineProperties,wn=Object.getOwnPropertyDescriptors,Ve=Object.getOwnPropertySymbols,hn=Object.prototype.hasOwnProperty,bn=Object.prototype.propertyIsEnumerable,Me=(t,e,r)=>e in t?On(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,Sn=(t,e)=>{for(var r in e||(e={}))hn.call(e,r)&&Me(t,r,e[r]);if(Ve)for(var r of Ve(e))bn.call(e,r)&&Me(t,r,e[r]);return t},Un=(t,e)=>Pn(t,wn(e));const Cn=n.defineComponent({name:"UseTimestamp",props:["immediate","interval","offset"],setup(t,{slots:e}){const r=n.reactive(g.useTimestamp(Un(Sn({},t),{controls:!0})));return()=>{if(e.default)return e.default(r)}}});var $n=Object.defineProperty,Te=Object.getOwnPropertySymbols,En=Object.prototype.hasOwnProperty,jn=Object.prototype.propertyIsEnumerable,Ne=(t,e,r)=>e in t?$n(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,Re=(t,e)=>{for(var r in e||(e={}))En.call(e,r)&&Ne(t,r,e[r]);if(Te)for(var r of Te(e))jn.call(e,r)&&Ne(t,r,e[r]);return t};const Ln=n.defineComponent({name:"UseVirtualList",props:["list","options","height"],setup(t,{slots:e,expose:r}){const{list:o}=n.toRefs(t),{list:a,containerProps:i,wrapperProps:l,scrollTo:u}=g.useVirtualList(o,t.options);return r({scrollTo:u}),typeof i.style=="object"&&!Array.isArray(i.style)&&(i.style.height=t.height||"300px"),()=>n.h("div",Re({},i),[n.h("div",Re({},l.value),a.value.map(f=>n.h("div",{style:{overFlow:"hidden",height:f.height}},e.default?e.default(f):"Please set content!")))])}}),In=n.defineComponent({name:"UseWindowFocus",setup(t,{slots:e}){const r=n.reactive({focused:g.useWindowFocus()});return()=>{if(e.default)return e.default(r)}}}),An=n.defineComponent({name:"UseWindowSize",props:["initialWidth","initialHeight"],setup(t,{slots:e}){const r=n.reactive(g.useWindowSize(t));return()=>{if(e.default)return e.default(r)}}});s.OnClickOutside=I,s.OnLongPress=Ye,s.UseActiveElement=Xe,s.UseBattery=qe,s.UseBrowserLocation=Qe,s.UseColorMode=pt,s.UseDark=vt,s.UseDeviceMotion=gt,s.UseDeviceOrientation=_t,s.UseDevicePixelRatio=mt,s.UseDevicesList=yt,s.UseDocumentVisibility=Ot,s.UseDraggable=$t,s.UseElementBounding=Et,s.UseElementSize=It,s.UseElementVisibility=kt,s.UseEyeDropper=Ht,s.UseFullscreen=Bt,s.UseGeolocation=Wt,s.UseIdle=Ft,s.UseImage=Zt,s.UseMouse=sr,s.UseMouseInElement=lr,s.UseMousePressed=gr,s.UseNetwork=_r,s.UseNow=Sr,s.UseObjectUrl=Ur,s.UseOffsetPagination=Vr,s.UseOnline=Mr,s.UsePageLeave=Tr,s.UsePointer=Fr,s.UsePointerLock=Kr,s.UsePreferredColorScheme=Gr,s.UsePreferredContrast=Jr,s.UsePreferredDark=Yr,s.UsePreferredLanguages=Xr,s.UsePreferredReducedMotion=qr,s.UseScreenSafeArea=Zr,s.UseTimeAgo=yn,s.UseTimestamp=Cn,s.UseVirtualList=Ln,s.UseWindowFocus=In,s.UseWindowSize=An,s.VOnClickOutside=T,s.VOnLongPress=Z,s.vElementHover=Lt,s.vElementSize=Rt,s.vElementVisibility=zt,s.vInfiniteScroll=or,s.vIntersectionObserver=ar,s.vOnClickOutside=T,s.vOnKeyStroke=Ge,s.vOnLongPress=Z,s.vScroll=an,s.vScrollLock=cn})(this.VueUse=this.VueUse||{},VueDemi,VueUse,VueUse,reactivity);
|
|
1
|
+
var VueDemi=function(s,n,g){if(s.install)return s;if(!n)return console.error("[vue-demi] no Vue instance found, please be sure to import `vue` before `vue-demi`."),s;if(n.version.slice(0,4)==="2.7."){let w=function(b,S){var V,k={},z={config:n.config,use:n.use.bind(n),mixin:n.mixin.bind(n),component:n.component.bind(n),provide:function(N,T){return k[N]=T,this},directive:function(N,T){return T?(n.directive(N,T),z):n.directive(N)},mount:function(N,T){return V||(V=new n(Object.assign({propsData:S},b,{provide:Object.assign(k,b.provide)})),V.$mount(N,T),V)},unmount:function(){V&&(V.$destroy(),V=void 0)}};return z};var He=w;for(var c in n)s[c]=n[c];s.isVue2=!0,s.isVue3=!1,s.install=function(){},s.Vue=n,s.Vue2=n,s.version=n.version,s.warn=n.util.warn,s.createApp=w}else if(n.version.slice(0,2)==="2.")if(g){for(var c in g)s[c]=g[c];s.isVue2=!0,s.isVue3=!1,s.install=function(){},s.Vue=n,s.Vue2=n,s.version=n.version}else console.error("[vue-demi] no VueCompositionAPI instance found, please be sure to import `@vue/composition-api` before `vue-demi`.");else if(n.version.slice(0,2)==="3."){for(var c in n)s[c]=n[c];s.isVue2=!1,s.isVue3=!0,s.install=function(){},s.Vue=n,s.Vue2=void 0,s.version=n.version,s.set=function(w,b,S){return Array.isArray(w)?(w.length=Math.max(w.length,b),w.splice(b,1,S),S):(w[b]=S,S)},s.del=function(w,b){if(Array.isArray(w)){w.splice(b,1);return}delete w[b]}}else console.error("[vue-demi] Vue version "+n.version+" is unsupported.");return s}(this.VueDemi=this.VueDemi||(typeof VueDemi<"u"?VueDemi:{}),this.Vue||(typeof Vue<"u"?Vue:void 0),this.VueCompositionAPI||(typeof VueCompositionAPI<"u"?VueCompositionAPI:void 0));(function(s,n,g,c){"use strict";const He=n.defineComponent({name:"OnClickOutside",props:["as","options"],emits:["trigger"],setup(t,{slots:e,emit:r}){const o=n.ref();return g.onClickOutside(o,a=>{r("trigger",a)},t.options),()=>{if(e.default)return n.h(t.as||"div",{ref:o},e.default())}}});function w(t){var e;const r=c.toValue(t);return(e=r?.$el)!=null?e:r}const b=c.isClient?window:void 0;function S(...t){let e,r,o,a;if(typeof t[0]=="string"||Array.isArray(t[0])?([r,o,a]=t,e=b):[e,r,o,a]=t,!e)return c.noop;Array.isArray(r)||(r=[r]),Array.isArray(o)||(o=[o]);const l=[],i=()=>{l.forEach(d=>d()),l.length=0},u=(d,_,p,m)=>(d.addEventListener(_,p,m),()=>d.removeEventListener(_,p,m)),f=n.watch(()=>[w(e),c.toValue(a)],([d,_])=>{i(),d&&l.push(...r.flatMap(p=>o.map(m=>u(d,p,m,_))))},{immediate:!0,flush:"post"}),v=()=>{f(),i()};return c.tryOnScopeDispose(v),v}let V=!1;function k(t,e,r={}){const{window:o=b,ignore:a=[],capture:l=!0,detectIframe:i=!1}=r;if(!o)return;c.isIOS&&!V&&(V=!0,Array.from(o.document.body.children).forEach(p=>p.addEventListener("click",c.noop)));let u=!0;const f=p=>a.some(m=>{if(typeof m=="string")return Array.from(o.document.querySelectorAll(m)).some(y=>y===p.target||p.composedPath().includes(y));{const y=w(m);return y&&(p.target===y||p.composedPath().includes(y))}}),d=[S(o,"click",p=>{const m=w(t);if(!(!m||m===p.target||p.composedPath().includes(m))){if(p.detail===0&&(u=!f(p)),!u){u=!0;return}e(p)}},{passive:!0,capture:l}),S(o,"pointerdown",p=>{const m=w(t);m&&(u=!p.composedPath().includes(m)&&!f(p))},{passive:!0}),i&&S(o,"blur",p=>{var m;const y=w(t);((m=o.document.activeElement)==null?void 0:m.tagName)==="IFRAME"&&!y?.contains(o.document.activeElement)&&e(p)})].filter(Boolean);return()=>d.forEach(p=>p())}const z={[c.directiveHooks.mounted](t,e){const r=!e.modifiers.bubble;if(typeof e.value=="function")t.__onClickOutside_stop=k(t,e.value,{capture:r});else{const[o,a]=e.value;t.__onClickOutside_stop=k(t,o,Object.assign({capture:r},a))}},[c.directiveHooks.unmounted](t){t.__onClickOutside_stop()}};function N(t){return typeof t=="function"?t:typeof t=="string"?e=>e.key===t:Array.isArray(t)?e=>t.includes(e.key):()=>!0}function T(...t){let e,r,o={};t.length===3?(e=t[0],r=t[1],o=t[2]):t.length===2?typeof t[1]=="object"?(e=!0,r=t[0],o=t[1]):(e=t[0],r=t[1]):(e=!0,r=t[0]);const{target:a=b,eventName:l="keydown",passive:i=!1,dedupe:u=!1}=o,f=N(e);return S(a,l,d=>{d.repeat&&c.toValue(u)||f(d)&&r(d)},i)}var Be=Object.defineProperty,X=Object.getOwnPropertySymbols,We=Object.prototype.hasOwnProperty,Fe=Object.prototype.propertyIsEnumerable,q=(t,e,r)=>e in t?Be(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,Ke=(t,e)=>{for(var r in e||(e={}))We.call(e,r)&&q(t,r,e[r]);if(X)for(var r of X(e))Fe.call(e,r)&&q(t,r,e[r]);return t};const Ge={[c.directiveHooks.mounted](t,e){var r,o;const a=(o=(r=e.arg)==null?void 0:r.split(","))!=null?o:!0;if(typeof e.value=="function")T(a,e.value,{target:t});else{const[l,i]=e.value;T(a,l,Ke({target:t},i))}}},Je=500;function G(t,e,r){var o,a;const l=n.computed(()=>w(t));let i;function u(){i&&(clearTimeout(i),i=void 0)}function f(d){var _,p,m,y;(_=r?.modifiers)!=null&&_.self&&d.target!==l.value||(u(),(p=r?.modifiers)!=null&&p.prevent&&d.preventDefault(),(m=r?.modifiers)!=null&&m.stop&&d.stopPropagation(),i=setTimeout(()=>e(d),(y=r?.delay)!=null?y:Je))}const v={capture:(o=r?.modifiers)==null?void 0:o.capture,once:(a=r?.modifiers)==null?void 0:a.once};S(l,"pointerdown",f,v),S(l,"pointerup",u,v),S(l,"pointerleave",u,v)}const Ye=n.defineComponent({name:"OnLongPress",props:["as","options"],emits:["trigger"],setup(t,{slots:e,emit:r}){const o=n.ref();return G(o,a=>{r("trigger",a)},t.options),()=>{if(e.default)return n.h(t.as||"div",{ref:o},e.default())}}}),Q={[c.directiveHooks.mounted](t,e){typeof e.value=="function"?G(t,e.value,{modifiers:e.modifiers}):G(t,...e.value)}},Xe=n.defineComponent({name:"UseActiveElement",setup(t,{slots:e}){const r=n.reactive({element:g.useActiveElement()});return()=>{if(e.default)return e.default(r)}}}),qe=n.defineComponent({name:"UseBattery",setup(t,{slots:e}){const r=n.reactive(g.useBattery(t));return()=>{if(e.default)return e.default(r)}}}),Qe=n.defineComponent({name:"UseBrowserLocation",setup(t,{slots:e}){const r=n.reactive(g.useBrowserLocation());return()=>{if(e.default)return e.default(r)}}}),H=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},B="__vueuse_ssr_handlers__",xe=Ze();function Ze(){return B in H||(H[B]=H[B]||{}),H[B]}function x(t,e){return xe[t]||e}function De(t){return t==null?"any":t instanceof Set?"set":t instanceof Map?"map":t instanceof Date?"date":typeof t=="boolean"?"boolean":typeof t=="string"?"string":typeof t=="object"?"object":Number.isNaN(t)?"any":"number"}var et=Object.defineProperty,Z=Object.getOwnPropertySymbols,tt=Object.prototype.hasOwnProperty,rt=Object.prototype.propertyIsEnumerable,D=(t,e,r)=>e in t?et(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,ee=(t,e)=>{for(var r in e||(e={}))tt.call(e,r)&&D(t,r,e[r]);if(Z)for(var r of Z(e))rt.call(e,r)&&D(t,r,e[r]);return t};const nt={boolean:{read:t=>t==="true",write:t=>String(t)},object:{read:t=>JSON.parse(t),write:t=>JSON.stringify(t)},number:{read:t=>Number.parseFloat(t),write:t=>String(t)},any:{read:t=>t,write:t=>String(t)},string:{read:t=>t,write:t=>String(t)},map:{read:t=>new Map(JSON.parse(t)),write:t=>JSON.stringify(Array.from(t.entries()))},set:{read:t=>new Set(JSON.parse(t)),write:t=>JSON.stringify(Array.from(t))},date:{read:t=>new Date(t),write:t=>t.toISOString()}},te="vueuse-storage";function ot(t,e,r,o={}){var a;const{flush:l="pre",deep:i=!0,listenToStorageChanges:u=!0,writeDefaults:f=!0,mergeDefaults:v=!1,shallow:d,window:_=b,eventFilter:p,onError:m=O=>{console.error(O)}}=o,y=(d?n.shallowRef:n.ref)(e);if(!r)try{r=x("getDefaultStorage",()=>{var O;return(O=b)==null?void 0:O.localStorage})()}catch(O){m(O)}if(!r)return y;const P=c.toValue(e),$=De(P),j=(a=o.serializer)!=null?a:nt[$],{pause:I,resume:C}=c.pausableWatch(y,()=>U(y.value),{flush:l,deep:i,eventFilter:p});return _&&u&&(S(_,"storage",L),S(_,te,A)),L(),y;function U(O){try{if(O==null)r.removeItem(t);else{const h=j.write(O),M=r.getItem(t);M!==h&&(r.setItem(t,h),_&&_.dispatchEvent(new CustomEvent(te,{detail:{key:t,oldValue:M,newValue:h,storageArea:r}})))}}catch(h){m(h)}}function E(O){const h=O?O.newValue:r.getItem(t);if(h==null)return f&&P!==null&&r.setItem(t,j.write(P)),P;if(!O&&v){const M=j.read(h);return typeof v=="function"?v(M,P):$==="object"&&!Array.isArray(M)?ee(ee({},P),M):M}else return typeof h!="string"?h:j.read(h)}function A(O){L(O.detail)}function L(O){if(!(O&&O.storageArea!==r)){if(O&&O.key==null){y.value=P;return}if(!(O&&O.key!==t)){I();try{y.value=E(O)}catch(h){m(h)}finally{O?n.nextTick(C):C()}}}}}function at(){const t=n.ref(!1);return n.getCurrentInstance()&&n.onMounted(()=>{t.value=!0}),t}function W(t){const e=at();return n.computed(()=>(e.value,!!t()))}function st(t,e={}){const{window:r=b}=e,o=W(()=>r&&"matchMedia"in r&&typeof r.matchMedia=="function");let a;const l=n.ref(!1),i=()=>{a&&("removeEventListener"in a?a.removeEventListener("change",u):a.removeListener(u))},u=()=>{o.value&&(i(),a=r.matchMedia(c.toRef(t).value),l.value=!!a?.matches,a&&("addEventListener"in a?a.addEventListener("change",u):a.addListener(u)))};return n.watchEffect(u),c.tryOnScopeDispose(()=>i()),l}function it(t){return st("(prefers-color-scheme: dark)",t)}var lt=Object.defineProperty,re=Object.getOwnPropertySymbols,ut=Object.prototype.hasOwnProperty,ct=Object.prototype.propertyIsEnumerable,ne=(t,e,r)=>e in t?lt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,ft=(t,e)=>{for(var r in e||(e={}))ut.call(e,r)&&ne(t,r,e[r]);if(re)for(var r of re(e))ct.call(e,r)&&ne(t,r,e[r]);return t};function dt(t={}){const{selector:e="html",attribute:r="class",initialValue:o="auto",window:a=b,storage:l,storageKey:i="vueuse-color-scheme",listenToStorageChanges:u=!0,storageRef:f,emitAuto:v,disableTransition:d=!0}=t,_=ft({auto:"",light:"light",dark:"dark"},t.modes||{}),p=it({window:a}),m=n.computed(()=>p.value?"dark":"light"),y=f||(i==null?n.ref(o):ot(i,o,l,{window:a,listenToStorageChanges:u})),P=n.computed({get(){return y.value==="auto"&&!v?m.value:y.value},set(C){y.value=C}}),$=x("updateHTMLAttrs",(C,U,E)=>{const A=typeof C=="string"?a?.document.querySelector(C):c.toValue(C);if(!A)return;let L;if(d&&(L=a.document.createElement("style"),L.appendChild(document.createTextNode("*{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}")),a.document.head.appendChild(L)),U==="class"){const O=E.split(/\s/g);Object.values(_).flatMap(h=>(h||"").split(/\s/g)).filter(Boolean).forEach(h=>{O.includes(h)?A.classList.add(h):A.classList.remove(h)})}else A.setAttribute(U,E);d&&(a.getComputedStyle(L).opacity,document.head.removeChild(L))});function j(C){var U;const E=C==="auto"?m.value:C;$(e,r,(U=_[E])!=null?U:E)}function I(C){t.onChanged?t.onChanged(C,j):j(C)}n.watch(P,I,{flush:"post",immediate:!0}),v&&n.watch(m,()=>I(P.value),{flush:"post"}),c.tryOnMounted(()=>I(P.value));try{return Object.assign(P,{store:y,system:m})}catch{return P}}const pt=n.defineComponent({name:"UseColorMode",props:["selector","attribute","modes","onChanged","storageKey","storage","emitAuto"],setup(t,{slots:e}){const r=dt(t),o=n.reactive({mode:r,system:r.system,store:r.store});return()=>{if(e.default)return e.default(o)}}}),vt=n.defineComponent({name:"UseDark",props:["selector","attribute","valueDark","valueLight","onChanged","storageKey","storage"],setup(t,{slots:e}){const r=g.useDark(t),o=n.reactive({isDark:r,toggleDark:c.useToggle(r)});return()=>{if(e.default)return e.default(o)}}}),_t=n.defineComponent({name:"UseDeviceMotion",setup(t,{slots:e}){const r=n.reactive(g.useDeviceMotion());return()=>{if(e.default)return e.default(r)}}}),gt=n.defineComponent({name:"UseDeviceOrientation",setup(t,{slots:e}){const r=n.reactive(g.useDeviceOrientation());return()=>{if(e.default)return e.default(r)}}}),mt=n.defineComponent({name:"UseDevicePixelRatio",setup(t,{slots:e}){const r=n.reactive({pixelRatio:g.useDevicePixelRatio()});return()=>{if(e.default)return e.default(r)}}}),yt=n.defineComponent({name:"UseDevicesList",props:["onUpdated","requestPermissions","constraints"],setup(t,{slots:e}){const r=n.reactive(g.useDevicesList(t));return()=>{if(e.default)return e.default(r)}}}),Ot=n.defineComponent({name:"UseDocumentVisibility",setup(t,{slots:e}){const r=n.reactive({visibility:g.useDocumentVisibility()});return()=>{if(e.default)return e.default(r)}}});var wt=Object.defineProperty,Pt=Object.defineProperties,ht=Object.getOwnPropertyDescriptors,oe=Object.getOwnPropertySymbols,bt=Object.prototype.hasOwnProperty,St=Object.prototype.propertyIsEnumerable,ae=(t,e,r)=>e in t?wt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,Ut=(t,e)=>{for(var r in e||(e={}))bt.call(e,r)&&ae(t,r,e[r]);if(oe)for(var r of oe(e))St.call(e,r)&&ae(t,r,e[r]);return t},$t=(t,e)=>Pt(t,ht(e));const Ct=n.defineComponent({name:"UseDraggable",props:["storageKey","storageType","initialValue","exact","preventDefault","stopPropagation","pointerTypes","as","handle","axis"],setup(t,{slots:e}){const r=n.ref(),o=n.computed(()=>{var f;return(f=t.handle)!=null?f:r.value}),a=t.storageKey&&g.useStorage(t.storageKey,c.toValue(t.initialValue)||{x:0,y:0},g.isClient?t.storageType==="session"?sessionStorage:localStorage:void 0),l=a||t.initialValue||{x:0,y:0},i=f=>{a&&(a.value.x=f.x,a.value.y=f.y)},u=n.reactive(g.useDraggable(r,$t(Ut({},t),{handle:o,initialValue:l,onEnd:i})));return()=>{if(e.default)return n.h(t.as||"div",{ref:r,style:`touch-action:none;${u.style}`},e.default(u))}}}),Et=n.defineComponent({name:"UseElementBounding",props:["box","as"],setup(t,{slots:e}){const r=n.ref(),o=n.reactive(g.useElementBounding(r));return()=>{if(e.default)return n.h(t.as||"div",{ref:r},e.default(o))}}});function jt(t,e={}){const{delayEnter:r=0,delayLeave:o=0,window:a=b}=e,l=n.ref(!1);let i;const u=f=>{const v=f?r:o;i&&(clearTimeout(i),i=void 0),v?i=setTimeout(()=>l.value=f,v):l.value=f};return a&&(S(t,"mouseenter",()=>u(!0),{passive:!0}),S(t,"mouseleave",()=>u(!1),{passive:!0})),l}const Lt={[c.directiveHooks.mounted](t,e){if(typeof e.value=="function"){const r=jt(t);n.watch(r,o=>e.value(o))}}},It=n.defineComponent({name:"UseElementSize",props:["width","height","box"],setup(t,{slots:e}){const r=n.ref(),o=n.reactive(g.useElementSize(r,{width:t.width,height:t.height},{box:t.box}));return()=>{if(e.default)return n.h(t.as||"div",{ref:r},e.default(o))}}});var se=Object.getOwnPropertySymbols,At=Object.prototype.hasOwnProperty,Vt=Object.prototype.propertyIsEnumerable,Mt=(t,e)=>{var r={};for(var o in t)At.call(t,o)&&e.indexOf(o)<0&&(r[o]=t[o]);if(t!=null&&se)for(var o of se(t))e.indexOf(o)<0&&Vt.call(t,o)&&(r[o]=t[o]);return r};function Tt(t,e,r={}){const o=r,{window:a=b}=o,l=Mt(o,["window"]);let i;const u=W(()=>a&&"ResizeObserver"in a),f=()=>{i&&(i.disconnect(),i=void 0)},v=n.computed(()=>Array.isArray(t)?t.map(p=>w(p)):[w(t)]),d=n.watch(v,p=>{if(f(),u.value&&a){i=new ResizeObserver(e);for(const m of p)m&&i.observe(m,l)}},{immediate:!0,flush:"post",deep:!0}),_=()=>{f(),d()};return c.tryOnScopeDispose(_),{isSupported:u,stop:_}}function Nt(t,e={width:0,height:0},r={}){const{window:o=b,box:a="content-box"}=r,l=n.computed(()=>{var f,v;return(v=(f=w(t))==null?void 0:f.namespaceURI)==null?void 0:v.includes("svg")}),i=n.ref(e.width),u=n.ref(e.height);return Tt(t,([f])=>{const v=a==="border-box"?f.borderBoxSize:a==="content-box"?f.contentBoxSize:f.devicePixelContentBoxSize;if(o&&l.value){const d=w(t);if(d){const _=o.getComputedStyle(d);i.value=parseFloat(_.width),u.value=parseFloat(_.height)}}else if(v){const d=Array.isArray(v)?v:[v];i.value=d.reduce((_,{inlineSize:p})=>_+p,0),u.value=d.reduce((_,{blockSize:p})=>_+p,0)}else i.value=f.contentRect.width,u.value=f.contentRect.height},r),n.watch(()=>w(t),f=>{i.value=f?e.width:0,u.value=f?e.height:0}),{width:i,height:u}}const Rt={[c.directiveHooks.mounted](t,e){var r;const o=typeof e.value=="function"?e.value:(r=e.value)==null?void 0:r[0],a=typeof e.value=="function"?[]:e.value.slice(1),{width:l,height:i}=Nt(t,...a);n.watch([l,i],([u,f])=>o({width:u,height:f}))}},kt=n.defineComponent({name:"UseElementVisibility",props:["as"],setup(t,{slots:e}){const r=n.ref(),o=n.reactive({isVisible:g.useElementVisibility(r)});return()=>{if(e.default)return n.h(t.as||"div",{ref:r},e.default(o))}}});function J(t,e,r={}){const{root:o,rootMargin:a="0px",threshold:l=.1,window:i=b,immediate:u=!0}=r,f=W(()=>i&&"IntersectionObserver"in i),v=n.computed(()=>{const y=c.toValue(t);return(Array.isArray(y)?y:[y]).map(w).filter(c.notNullish)});let d=c.noop;const _=n.ref(u),p=f.value?n.watch(()=>[v.value,w(o),_.value],([y,P])=>{if(d(),!_.value||!y.length)return;const $=new IntersectionObserver(e,{root:w(P),rootMargin:a,threshold:l});y.forEach(j=>j&&$.observe(j)),d=()=>{$.disconnect(),d=c.noop}},{immediate:u,flush:"post"}):c.noop,m=()=>{d(),p(),_.value=!1};return c.tryOnScopeDispose(m),{isSupported:f,isActive:_,pause(){d(),_.value=!1},resume(){_.value=!0},stop:m}}function ie(t,{window:e=b,scrollTarget:r}={}){const o=n.ref(!1);return J(t,([{isIntersecting:a}])=>{o.value=a},{root:r,window:e}),o}const zt={[c.directiveHooks.mounted](t,e){if(typeof e.value=="function"){const r=e.value,o=ie(t);n.watch(o,a=>r(a),{immediate:!0})}else{const[r,o]=e.value,a=ie(t,o);n.watch(a,l=>r(l),{immediate:!0})}}},Ht=n.defineComponent({name:"UseEyeDropper",props:{sRGBHex:String},setup(t,{slots:e}){const r=n.reactive(g.useEyeDropper());return()=>{if(e.default)return e.default(r)}}}),Bt=n.defineComponent({name:"UseFullscreen",props:["as"],setup(t,{slots:e}){const r=n.ref(),o=n.reactive(g.useFullscreen(r));return()=>{if(e.default)return n.h(t.as||"div",{ref:r},e.default(o))}}}),Wt=n.defineComponent({name:"UseGeolocation",props:["enableHighAccuracy","maximumAge","timeout","navigator"],setup(t,{slots:e}){const r=n.reactive(g.useGeolocation(t));return()=>{if(e.default)return e.default(r)}}}),Ft=n.defineComponent({name:"UseIdle",props:["timeout","events","listenForVisibilityChange","initialState"],setup(t,{slots:e}){const r=n.reactive(g.useIdle(t.timeout,t));return()=>{if(e.default)return e.default(r)}}});function Kt(t,e,r){const{immediate:o=!0,delay:a=0,onError:l=c.noop,onSuccess:i=c.noop,resetOnExecute:u=!0,shallow:f=!0,throwError:v}=r??{},d=f?n.shallowRef(e):n.ref(e),_=n.ref(!1),p=n.ref(!1),m=n.shallowRef(void 0);async function y(P=0,...$){u&&(d.value=e),m.value=void 0,_.value=!1,p.value=!0,P>0&&await c.promiseTimeout(P);const j=typeof t=="function"?t(...$):t;try{const I=await j;d.value=I,_.value=!0,i(I)}catch(I){if(m.value=I,l(I),v)throw I}finally{p.value=!1}return d.value}return o&&y(a),{state:d,isReady:_,isLoading:p,error:m,execute:y}}var Gt=Object.defineProperty,le=Object.getOwnPropertySymbols,Jt=Object.prototype.hasOwnProperty,Yt=Object.prototype.propertyIsEnumerable,ue=(t,e,r)=>e in t?Gt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,Xt=(t,e)=>{for(var r in e||(e={}))Jt.call(e,r)&&ue(t,r,e[r]);if(le)for(var r of le(e))Yt.call(e,r)&&ue(t,r,e[r]);return t};async function qt(t){return new Promise((e,r)=>{const o=new Image,{src:a,srcset:l,sizes:i}=t;o.src=a,l&&(o.srcset=l),i&&(o.sizes=i),o.onload=()=>e(o),o.onerror=r})}function Qt(t,e={}){const r=Kt(()=>qt(c.toValue(t)),void 0,Xt({resetOnExecute:!0},e));return n.watch(()=>c.toValue(t),()=>r.execute(e.delay),{deep:!0}),r}const xt=n.defineComponent({name:"UseImage",props:["src","srcset","sizes","as"],setup(t,{slots:e}){const r=n.reactive(Qt(t));return()=>r.isLoading&&e.loading?e.loading(r):r.error&&e.error?e.error(r.error):e.default?e.default(r):n.h(t.as||"img",t)}}),ce=1;function Y(t,e={}){const{throttle:r=0,idle:o=200,onStop:a=c.noop,onScroll:l=c.noop,offset:i={left:0,right:0,top:0,bottom:0},eventListenerOptions:u={capture:!1,passive:!0},behavior:f="auto"}=e,v=n.ref(0),d=n.ref(0),_=n.computed({get(){return v.value},set(U){m(U,void 0)}}),p=n.computed({get(){return d.value},set(U){m(void 0,U)}});function m(U,E){var A,L,O;const h=c.toValue(t);h&&((O=h instanceof Document?document.body:h)==null||O.scrollTo({top:(A=c.toValue(E))!=null?A:p.value,left:(L=c.toValue(U))!=null?L:_.value,behavior:c.toValue(f)}))}const y=n.ref(!1),P=n.reactive({left:!0,right:!1,top:!0,bottom:!1}),$=n.reactive({left:!1,right:!1,top:!1,bottom:!1}),j=U=>{y.value&&(y.value=!1,$.left=!1,$.right=!1,$.top=!1,$.bottom=!1,a(U))},I=c.useDebounceFn(j,r+o),C=U=>{const E=U.target===document?U.target.documentElement:U.target,{display:A,flexDirection:L}=getComputedStyle(E),O=E.scrollLeft;$.left=O<v.value,$.right=O>v.value;const h=Math.abs(O)<=0+(i.left||0),M=Math.abs(O)+E.clientWidth>=E.scrollWidth-(i.right||0)-ce;A==="flex"&&L==="row-reverse"?(P.left=M,P.right=h):(P.left=h,P.right=M),v.value=O;let R=E.scrollTop;U.target===document&&!R&&(R=document.body.scrollTop),$.top=R<d.value,$.bottom=R>d.value;const ke=Math.abs(R)<=0+(i.top||0),ze=Math.abs(R)+E.clientHeight>=E.scrollHeight-(i.bottom||0)-ce;A==="flex"&&L==="column-reverse"?(P.top=ze,P.bottom=ke):(P.top=ke,P.bottom=ze),d.value=R,y.value=!0,I(U),l(U)};return S(t,"scroll",r?c.useThrottleFn(C,r,!0,!1):C,u),S(t,"scrollend",j,u),{x:_,y:p,isScrolling:y,arrivedState:P,directions:$}}var Zt=Object.defineProperty,Dt=Object.defineProperties,er=Object.getOwnPropertyDescriptors,fe=Object.getOwnPropertySymbols,tr=Object.prototype.hasOwnProperty,rr=Object.prototype.propertyIsEnumerable,de=(t,e,r)=>e in t?Zt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,pe=(t,e)=>{for(var r in e||(e={}))tr.call(e,r)&&de(t,r,e[r]);if(fe)for(var r of fe(e))rr.call(e,r)&&de(t,r,e[r]);return t},nr=(t,e)=>Dt(t,er(e));function ve(t,e,r={}){var o;const{direction:a="bottom",interval:l=100}=r,i=n.reactive(Y(t,nr(pe({},r),{offset:pe({[a]:(o=r.distance)!=null?o:0},r.offset)}))),u=n.ref(),f=n.computed(()=>!!u.value);function v(){const d=c.toValue(t);if(!d)return;const _=a==="bottom"||a==="top"?d.scrollHeight<=d.clientHeight:d.scrollWidth<=d.clientWidth;(i.arrivedState[a]||_)&&(u.value||(u.value=Promise.all([e(i),new Promise(p=>setTimeout(p,l))]).finally(()=>{u.value=null,n.nextTick(()=>v())})))}return n.watch(()=>[i.arrivedState[a],c.toValue(t)],v,{immediate:!0}),{isLoading:f}}const or={[c.directiveHooks.mounted](t,e){typeof e.value=="function"?ve(t,e.value):ve(t,...e.value)}},ar={[c.directiveHooks.mounted](t,e){typeof e.value=="function"?J(t,e.value):J(t,...e.value)}},sr=n.defineComponent({name:"UseMouse",props:["touch","resetOnTouchEnds","initialValue"],setup(t,{slots:e}){const r=n.reactive(g.useMouse(t));return()=>{if(e.default)return e.default(r)}}}),ir=n.defineComponent({name:"UseMouseElement",props:["handleOutside","as"],setup(t,{slots:e}){const r=n.ref(),o=n.reactive(g.useMouseInElement(r,t));return()=>{if(e.default)return n.h(t.as||"div",{ref:r},e.default(o))}}});var lr=Object.defineProperty,ur=Object.defineProperties,cr=Object.getOwnPropertyDescriptors,_e=Object.getOwnPropertySymbols,fr=Object.prototype.hasOwnProperty,dr=Object.prototype.propertyIsEnumerable,ge=(t,e,r)=>e in t?lr(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,pr=(t,e)=>{for(var r in e||(e={}))fr.call(e,r)&&ge(t,r,e[r]);if(_e)for(var r of _e(e))dr.call(e,r)&&ge(t,r,e[r]);return t},vr=(t,e)=>ur(t,cr(e));const _r=n.defineComponent({name:"UseMousePressed",props:["touch","initialValue","as"],setup(t,{slots:e}){const r=n.ref(),o=n.reactive(g.useMousePressed(vr(pr({},t),{target:r})));return()=>{if(e.default)return n.h(t.as||"div",{ref:r},e.default(o))}}}),gr=n.defineComponent({name:"UseNetwork",setup(t,{slots:e}){const r=n.reactive(g.useNetwork());return()=>{if(e.default)return e.default(r)}}});var mr=Object.defineProperty,yr=Object.defineProperties,Or=Object.getOwnPropertyDescriptors,me=Object.getOwnPropertySymbols,wr=Object.prototype.hasOwnProperty,Pr=Object.prototype.propertyIsEnumerable,ye=(t,e,r)=>e in t?mr(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,hr=(t,e)=>{for(var r in e||(e={}))wr.call(e,r)&&ye(t,r,e[r]);if(me)for(var r of me(e))Pr.call(e,r)&&ye(t,r,e[r]);return t},br=(t,e)=>yr(t,Or(e));const Sr=n.defineComponent({name:"UseNow",props:["interval"],setup(t,{slots:e}){const r=n.reactive(g.useNow(br(hr({},t),{controls:!0})));return()=>{if(e.default)return e.default(r)}}}),Ur=n.defineComponent({name:"UseObjectUrl",props:["object"],setup(t,{slots:e}){const r=c.toRef(t,"object"),o=g.useObjectUrl(r);return()=>{if(e.default&&o.value)return e.default(o)}}});var $r=Object.defineProperty,Cr=Object.defineProperties,Er=Object.getOwnPropertyDescriptors,Oe=Object.getOwnPropertySymbols,jr=Object.prototype.hasOwnProperty,Lr=Object.prototype.propertyIsEnumerable,we=(t,e,r)=>e in t?$r(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,Ir=(t,e)=>{for(var r in e||(e={}))jr.call(e,r)&&we(t,r,e[r]);if(Oe)for(var r of Oe(e))Lr.call(e,r)&&we(t,r,e[r]);return t},Ar=(t,e)=>Cr(t,Er(e));const Vr=n.defineComponent({name:"UseOffsetPagination",props:["total","page","pageSize","onPageChange","onPageSizeChange","onPageCountChange"],emits:["page-change","page-size-change","page-count-change"],setup(t,{slots:e,emit:r}){const o=n.reactive(g.useOffsetPagination(Ar(Ir({},t),{onPageChange(...a){var l;(l=t.onPageChange)==null||l.call(t,...a),r("page-change",...a)},onPageSizeChange(...a){var l;(l=t.onPageSizeChange)==null||l.call(t,...a),r("page-size-change",...a)},onPageCountChange(...a){var l;(l=t.onPageCountChange)==null||l.call(t,...a),r("page-count-change",...a)}})));return()=>{if(e.default)return e.default(o)}}}),Mr=n.defineComponent({name:"UseOnline",setup(t,{slots:e}){const r=n.reactive({isOnline:g.useOnline()});return()=>{if(e.default)return e.default(r)}}}),Tr=n.defineComponent({name:"UsePageLeave",setup(t,{slots:e}){const r=n.reactive({isLeft:g.usePageLeave()});return()=>{if(e.default)return e.default(r)}}});var Nr=Object.defineProperty,Rr=Object.defineProperties,kr=Object.getOwnPropertyDescriptors,Pe=Object.getOwnPropertySymbols,zr=Object.prototype.hasOwnProperty,Hr=Object.prototype.propertyIsEnumerable,he=(t,e,r)=>e in t?Nr(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,Br=(t,e)=>{for(var r in e||(e={}))zr.call(e,r)&&he(t,r,e[r]);if(Pe)for(var r of Pe(e))Hr.call(e,r)&&he(t,r,e[r]);return t},Wr=(t,e)=>Rr(t,kr(e));const Fr=n.defineComponent({name:"UsePointer",props:["pointerTypes","initialValue","target"],setup(t,{slots:e}){const r=n.ref(null),o=n.reactive(g.usePointer(Wr(Br({},t),{target:t.target==="self"?r:b})));return()=>{if(e.default)return e.default(o,{ref:r})}}}),Kr=n.defineComponent({name:"UsePointerLock",props:["as"],setup(t,{slots:e}){const r=n.ref(),o=n.reactive(g.usePointerLock(r));return()=>{if(e.default)return n.h(t.as||"div",{ref:r},e.default(o))}}}),Gr=n.defineComponent({name:"UsePreferredColorScheme",setup(t,{slots:e}){const r=n.reactive({colorScheme:g.usePreferredColorScheme()});return()=>{if(e.default)return e.default(r)}}}),Jr=n.defineComponent({name:"UsePreferredContrast",setup(t,{slots:e}){const r=n.reactive({contrast:g.usePreferredContrast()});return()=>{if(e.default)return e.default(r)}}}),Yr=n.defineComponent({name:"UsePreferredDark",setup(t,{slots:e}){const r=n.reactive({prefersDark:g.usePreferredDark()});return()=>{if(e.default)return e.default(r)}}}),Xr=n.defineComponent({name:"UsePreferredLanguages",setup(t,{slots:e}){const r=n.reactive({languages:g.usePreferredLanguages()});return()=>{if(e.default)return e.default(r)}}}),qr=n.defineComponent({name:"UsePreferredReducedMotion",setup(t,{slots:e}){const r=n.reactive({motion:g.usePreferredReducedMotion()});return()=>{if(e.default)return e.default(r)}}});var be=Object.getOwnPropertySymbols,Qr=Object.prototype.hasOwnProperty,xr=Object.prototype.propertyIsEnumerable,Zr=(t,e)=>{var r={};for(var o in t)Qr.call(t,o)&&e.indexOf(o)<0&&(r[o]=t[o]);if(t!=null&&be)for(var o of be(t))e.indexOf(o)<0&&xr.call(t,o)&&(r[o]=t[o]);return r};function Dr(t,e,r={}){const o=r,{window:a=b}=o,l=Zr(o,["window"]);let i;const u=W(()=>a&&"MutationObserver"in a),f=()=>{i&&(i.disconnect(),i=void 0)},v=n.watch(()=>w(t),_=>{f(),u.value&&a&&_&&(i=new MutationObserver(e),i.observe(_,l))},{immediate:!0}),d=()=>{f(),v()};return c.tryOnScopeDispose(d),{isSupported:u,stop:d}}function F(t,e,r={}){const{window:o=b,initialValue:a="",observe:l=!1}=r,i=n.ref(a),u=n.computed(()=>{var v;return w(e)||((v=o?.document)==null?void 0:v.documentElement)});function f(){var v;const d=c.toValue(t),_=c.toValue(u);if(_&&o){const p=(v=o.getComputedStyle(_).getPropertyValue(d))==null?void 0:v.trim();i.value=p||a}}return l&&Dr(u,f,{attributes:!0,window:o}),n.watch([u,()=>c.toValue(t)],f,{immediate:!0}),n.watch(i,v=>{var d;(d=u.value)!=null&&d.style&&u.value.style.setProperty(c.toValue(t),v)}),i}const Se="--vueuse-safe-area-top",Ue="--vueuse-safe-area-right",$e="--vueuse-safe-area-bottom",Ce="--vueuse-safe-area-left";function en(){const t=n.ref(""),e=n.ref(""),r=n.ref(""),o=n.ref("");if(c.isClient){const l=F(Se),i=F(Ue),u=F($e),f=F(Ce);l.value="env(safe-area-inset-top, 0px)",i.value="env(safe-area-inset-right, 0px)",u.value="env(safe-area-inset-bottom, 0px)",f.value="env(safe-area-inset-left, 0px)",a(),S("resize",c.useDebounceFn(a))}function a(){t.value=K(Se),e.value=K(Ue),r.value=K($e),o.value=K(Ce)}return{top:t,right:e,bottom:r,left:o,update:a}}function K(t){return getComputedStyle(document.documentElement).getPropertyValue(t)}const tn=n.defineComponent({name:"UseScreenSafeArea",props:{top:Boolean,right:Boolean,bottom:Boolean,left:Boolean},setup(t,{slots:e}){const{top:r,right:o,bottom:a,left:l}=en();return()=>{if(e.default)return n.h("div",{style:{paddingTop:t.top?r.value:"",paddingRight:t.right?o.value:"",paddingBottom:t.bottom?a.value:"",paddingLeft:t.left?l.value:"",boxSizing:"border-box",maxHeight:"100vh",maxWidth:"100vw",overflow:"auto"}},e.default())}}});var rn=Object.defineProperty,nn=Object.defineProperties,on=Object.getOwnPropertyDescriptors,Ee=Object.getOwnPropertySymbols,an=Object.prototype.hasOwnProperty,sn=Object.prototype.propertyIsEnumerable,je=(t,e,r)=>e in t?rn(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,ln=(t,e)=>{for(var r in e||(e={}))an.call(e,r)&&je(t,r,e[r]);if(Ee)for(var r of Ee(e))sn.call(e,r)&&je(t,r,e[r]);return t},un=(t,e)=>nn(t,on(e));const cn={[c.directiveHooks.mounted](t,e){if(typeof e.value=="function"){const r=e.value,o=Y(t,{onScroll(){r(o)},onStop(){r(o)}})}else{const[r,o]=e.value,a=Y(t,un(ln({},o),{onScroll(l){var i;(i=o.onScroll)==null||i.call(o,l),r(a)},onStop(l){var i;(i=o.onStop)==null||i.call(o,l),r(a)}}))}}};function Le(t){const e=window.getComputedStyle(t);if(e.overflowX==="scroll"||e.overflowY==="scroll"||e.overflowX==="auto"&&t.clientHeight<t.scrollHeight||e.overflowY==="auto"&&t.clientWidth<t.scrollWidth)return!0;{const r=t.parentNode;return!r||r.tagName==="BODY"?!1:Le(r)}}function fn(t){const e=t||window.event,r=e.target;return Le(r)?!1:e.touches.length>1?!0:(e.preventDefault&&e.preventDefault(),!1)}function dn(t,e=!1){const r=n.ref(e);let o=null,a;n.watch(c.toRef(t),u=>{if(u){const f=u;a=f.style.overflow,r.value&&(f.style.overflow="hidden")}},{immediate:!0});const l=()=>{const u=c.toValue(t);!u||r.value||(c.isIOS&&(o=S(u,"touchmove",f=>{fn(f)},{passive:!1})),u.style.overflow="hidden",r.value=!0)},i=()=>{const u=c.toValue(t);!u||!r.value||(c.isIOS&&o?.(),u.style.overflow=a,r.value=!1)};return c.tryOnScopeDispose(i),n.computed({get(){return r.value},set(u){u?l():i()}})}function pn(){let t=!1;const e=n.ref(!1);return(r,o)=>{if(e.value=o.value,t)return;t=!0;const a=dn(r,o.value);n.watch(e,l=>a.value=l)}}const vn=pn();var _n=Object.defineProperty,gn=Object.defineProperties,mn=Object.getOwnPropertyDescriptors,Ie=Object.getOwnPropertySymbols,yn=Object.prototype.hasOwnProperty,On=Object.prototype.propertyIsEnumerable,Ae=(t,e,r)=>e in t?_n(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,wn=(t,e)=>{for(var r in e||(e={}))yn.call(e,r)&&Ae(t,r,e[r]);if(Ie)for(var r of Ie(e))On.call(e,r)&&Ae(t,r,e[r]);return t},Pn=(t,e)=>gn(t,mn(e));const hn=n.defineComponent({name:"UseTimeAgo",props:["time","updateInterval","max","fullDateFormatter","messages","showSecond"],setup(t,{slots:e}){const r=n.reactive(g.useTimeAgo(()=>t.time,Pn(wn({},t),{controls:!0})));return()=>{if(e.default)return e.default(r)}}});var bn=Object.defineProperty,Sn=Object.defineProperties,Un=Object.getOwnPropertyDescriptors,Ve=Object.getOwnPropertySymbols,$n=Object.prototype.hasOwnProperty,Cn=Object.prototype.propertyIsEnumerable,Me=(t,e,r)=>e in t?bn(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,En=(t,e)=>{for(var r in e||(e={}))$n.call(e,r)&&Me(t,r,e[r]);if(Ve)for(var r of Ve(e))Cn.call(e,r)&&Me(t,r,e[r]);return t},jn=(t,e)=>Sn(t,Un(e));const Ln=n.defineComponent({name:"UseTimestamp",props:["immediate","interval","offset"],setup(t,{slots:e}){const r=n.reactive(g.useTimestamp(jn(En({},t),{controls:!0})));return()=>{if(e.default)return e.default(r)}}});var In=Object.defineProperty,Te=Object.getOwnPropertySymbols,An=Object.prototype.hasOwnProperty,Vn=Object.prototype.propertyIsEnumerable,Ne=(t,e,r)=>e in t?In(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,Re=(t,e)=>{for(var r in e||(e={}))An.call(e,r)&&Ne(t,r,e[r]);if(Te)for(var r of Te(e))Vn.call(e,r)&&Ne(t,r,e[r]);return t};const Mn=n.defineComponent({name:"UseVirtualList",props:["list","options","height"],setup(t,{slots:e,expose:r}){const{list:o}=n.toRefs(t),{list:a,containerProps:l,wrapperProps:i,scrollTo:u}=g.useVirtualList(o,t.options);return r({scrollTo:u}),typeof l.style=="object"&&!Array.isArray(l.style)&&(l.style.height=t.height||"300px"),()=>n.h("div",Re({},l),[n.h("div",Re({},i.value),a.value.map(f=>n.h("div",{style:{overFlow:"hidden",height:f.height}},e.default?e.default(f):"Please set content!")))])}}),Tn=n.defineComponent({name:"UseWindowFocus",setup(t,{slots:e}){const r=n.reactive({focused:g.useWindowFocus()});return()=>{if(e.default)return e.default(r)}}}),Nn=n.defineComponent({name:"UseWindowSize",props:["initialWidth","initialHeight"],setup(t,{slots:e}){const r=n.reactive(g.useWindowSize(t));return()=>{if(e.default)return e.default(r)}}});s.OnClickOutside=He,s.OnLongPress=Ye,s.UseActiveElement=Xe,s.UseBattery=qe,s.UseBrowserLocation=Qe,s.UseColorMode=pt,s.UseDark=vt,s.UseDeviceMotion=_t,s.UseDeviceOrientation=gt,s.UseDevicePixelRatio=mt,s.UseDevicesList=yt,s.UseDocumentVisibility=Ot,s.UseDraggable=Ct,s.UseElementBounding=Et,s.UseElementSize=It,s.UseElementVisibility=kt,s.UseEyeDropper=Ht,s.UseFullscreen=Bt,s.UseGeolocation=Wt,s.UseIdle=Ft,s.UseImage=xt,s.UseMouse=sr,s.UseMouseInElement=ir,s.UseMousePressed=_r,s.UseNetwork=gr,s.UseNow=Sr,s.UseObjectUrl=Ur,s.UseOffsetPagination=Vr,s.UseOnline=Mr,s.UsePageLeave=Tr,s.UsePointer=Fr,s.UsePointerLock=Kr,s.UsePreferredColorScheme=Gr,s.UsePreferredContrast=Jr,s.UsePreferredDark=Yr,s.UsePreferredLanguages=Xr,s.UsePreferredReducedMotion=qr,s.UseScreenSafeArea=tn,s.UseTimeAgo=hn,s.UseTimestamp=Ln,s.UseVirtualList=Mn,s.UseWindowFocus=Tn,s.UseWindowSize=Nn,s.VOnClickOutside=z,s.VOnLongPress=Q,s.vElementHover=Lt,s.vElementSize=Rt,s.vElementVisibility=zt,s.vInfiniteScroll=or,s.vIntersectionObserver=ar,s.vOnClickOutside=z,s.vOnKeyStroke=Ge,s.vOnLongPress=Q,s.vScroll=cn,s.vScrollLock=vn})(this.VueUse=this.VueUse||{},VueDemi,VueUse,VueUse);
|
package/index.mjs
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { defineComponent, ref, h, watch, computed, reactive, shallowRef, nextTick, getCurrentInstance, onMounted, watchEffect, toRefs } from 'vue-demi';
|
|
2
|
-
import { onClickOutside as onClickOutside$1, useActiveElement, useBattery, useBrowserLocation, useDark, useDeviceMotion, useDeviceOrientation, useDevicePixelRatio, useDevicesList, useDocumentVisibility, useStorage as useStorage$1, isClient as isClient$1, useDraggable, useElementBounding, useElementSize as useElementSize$1, useElementVisibility as useElementVisibility$1, useEyeDropper, useFullscreen, useGeolocation, useIdle, useMouse, useMouseInElement, useMousePressed, useNetwork, useNow, useObjectUrl, useOffsetPagination, useOnline, usePageLeave, usePointer, usePointerLock, usePreferredColorScheme, usePreferredContrast, usePreferredDark as usePreferredDark$1, usePreferredLanguages, usePreferredReducedMotion,
|
|
2
|
+
import { onClickOutside as onClickOutside$1, useActiveElement, useBattery, useBrowserLocation, useDark, useDeviceMotion, useDeviceOrientation, useDevicePixelRatio, useDevicesList, useDocumentVisibility, useStorage as useStorage$1, isClient as isClient$1, useDraggable, useElementBounding, useElementSize as useElementSize$1, useElementVisibility as useElementVisibility$1, useEyeDropper, useFullscreen, useGeolocation, useIdle, useMouse, useMouseInElement, useMousePressed, useNetwork, useNow, useObjectUrl, useOffsetPagination, useOnline, usePageLeave, usePointer, usePointerLock, usePreferredColorScheme, usePreferredContrast, usePreferredDark as usePreferredDark$1, usePreferredLanguages, usePreferredReducedMotion, useTimeAgo, useTimestamp, useVirtualList, useWindowFocus, useWindowSize } from '@vueuse/core';
|
|
3
3
|
import { toValue, isClient, noop, tryOnScopeDispose, isIOS, directiveHooks, pausableWatch, toRef, tryOnMounted, useToggle, notNullish, promiseTimeout, useDebounceFn, useThrottleFn } from '@vueuse/shared';
|
|
4
|
-
import { computed as computed$1 } from '@vue/reactivity';
|
|
5
4
|
|
|
6
5
|
const OnClickOutside = /* @__PURE__ */ /* #__PURE__ */ defineComponent({
|
|
7
6
|
name: "OnClickOutside",
|
|
@@ -187,17 +186,17 @@ function onKeyStroke(...args) {
|
|
|
187
186
|
}
|
|
188
187
|
|
|
189
188
|
var __defProp$d = Object.defineProperty;
|
|
190
|
-
var __getOwnPropSymbols$
|
|
191
|
-
var __hasOwnProp$
|
|
192
|
-
var __propIsEnum$
|
|
189
|
+
var __getOwnPropSymbols$f = Object.getOwnPropertySymbols;
|
|
190
|
+
var __hasOwnProp$f = Object.prototype.hasOwnProperty;
|
|
191
|
+
var __propIsEnum$f = Object.prototype.propertyIsEnumerable;
|
|
193
192
|
var __defNormalProp$d = (obj, key, value) => key in obj ? __defProp$d(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
194
193
|
var __spreadValues$d = (a, b) => {
|
|
195
194
|
for (var prop in b || (b = {}))
|
|
196
|
-
if (__hasOwnProp$
|
|
195
|
+
if (__hasOwnProp$f.call(b, prop))
|
|
197
196
|
__defNormalProp$d(a, prop, b[prop]);
|
|
198
|
-
if (__getOwnPropSymbols$
|
|
199
|
-
for (var prop of __getOwnPropSymbols$
|
|
200
|
-
if (__propIsEnum$
|
|
197
|
+
if (__getOwnPropSymbols$f)
|
|
198
|
+
for (var prop of __getOwnPropSymbols$f(b)) {
|
|
199
|
+
if (__propIsEnum$f.call(b, prop))
|
|
201
200
|
__defNormalProp$d(a, prop, b[prop]);
|
|
202
201
|
}
|
|
203
202
|
return a;
|
|
@@ -334,17 +333,17 @@ function guessSerializerType(rawInit) {
|
|
|
334
333
|
}
|
|
335
334
|
|
|
336
335
|
var __defProp$c = Object.defineProperty;
|
|
337
|
-
var __getOwnPropSymbols$
|
|
338
|
-
var __hasOwnProp$
|
|
339
|
-
var __propIsEnum$
|
|
336
|
+
var __getOwnPropSymbols$e = Object.getOwnPropertySymbols;
|
|
337
|
+
var __hasOwnProp$e = Object.prototype.hasOwnProperty;
|
|
338
|
+
var __propIsEnum$e = Object.prototype.propertyIsEnumerable;
|
|
340
339
|
var __defNormalProp$c = (obj, key, value) => key in obj ? __defProp$c(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
341
340
|
var __spreadValues$c = (a, b) => {
|
|
342
341
|
for (var prop in b || (b = {}))
|
|
343
|
-
if (__hasOwnProp$
|
|
342
|
+
if (__hasOwnProp$e.call(b, prop))
|
|
344
343
|
__defNormalProp$c(a, prop, b[prop]);
|
|
345
|
-
if (__getOwnPropSymbols$
|
|
346
|
-
for (var prop of __getOwnPropSymbols$
|
|
347
|
-
if (__propIsEnum$
|
|
344
|
+
if (__getOwnPropSymbols$e)
|
|
345
|
+
for (var prop of __getOwnPropSymbols$e(b)) {
|
|
346
|
+
if (__propIsEnum$e.call(b, prop))
|
|
348
347
|
__defNormalProp$c(a, prop, b[prop]);
|
|
349
348
|
}
|
|
350
349
|
return a;
|
|
@@ -550,17 +549,17 @@ function usePreferredDark(options) {
|
|
|
550
549
|
}
|
|
551
550
|
|
|
552
551
|
var __defProp$b = Object.defineProperty;
|
|
553
|
-
var __getOwnPropSymbols$
|
|
554
|
-
var __hasOwnProp$
|
|
555
|
-
var __propIsEnum$
|
|
552
|
+
var __getOwnPropSymbols$d = Object.getOwnPropertySymbols;
|
|
553
|
+
var __hasOwnProp$d = Object.prototype.hasOwnProperty;
|
|
554
|
+
var __propIsEnum$d = Object.prototype.propertyIsEnumerable;
|
|
556
555
|
var __defNormalProp$b = (obj, key, value) => key in obj ? __defProp$b(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
557
556
|
var __spreadValues$b = (a, b) => {
|
|
558
557
|
for (var prop in b || (b = {}))
|
|
559
|
-
if (__hasOwnProp$
|
|
558
|
+
if (__hasOwnProp$d.call(b, prop))
|
|
560
559
|
__defNormalProp$b(a, prop, b[prop]);
|
|
561
|
-
if (__getOwnPropSymbols$
|
|
562
|
-
for (var prop of __getOwnPropSymbols$
|
|
563
|
-
if (__propIsEnum$
|
|
560
|
+
if (__getOwnPropSymbols$d)
|
|
561
|
+
for (var prop of __getOwnPropSymbols$d(b)) {
|
|
562
|
+
if (__propIsEnum$d.call(b, prop))
|
|
564
563
|
__defNormalProp$b(a, prop, b[prop]);
|
|
565
564
|
}
|
|
566
565
|
return a;
|
|
@@ -741,17 +740,17 @@ const UseDocumentVisibility = /* @__PURE__ */ /* #__PURE__ */ defineComponent({
|
|
|
741
740
|
var __defProp$a = Object.defineProperty;
|
|
742
741
|
var __defProps$8 = Object.defineProperties;
|
|
743
742
|
var __getOwnPropDescs$8 = Object.getOwnPropertyDescriptors;
|
|
744
|
-
var __getOwnPropSymbols$
|
|
745
|
-
var __hasOwnProp$
|
|
746
|
-
var __propIsEnum$
|
|
743
|
+
var __getOwnPropSymbols$c = Object.getOwnPropertySymbols;
|
|
744
|
+
var __hasOwnProp$c = Object.prototype.hasOwnProperty;
|
|
745
|
+
var __propIsEnum$c = Object.prototype.propertyIsEnumerable;
|
|
747
746
|
var __defNormalProp$a = (obj, key, value) => key in obj ? __defProp$a(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
748
747
|
var __spreadValues$a = (a, b) => {
|
|
749
748
|
for (var prop in b || (b = {}))
|
|
750
|
-
if (__hasOwnProp$
|
|
749
|
+
if (__hasOwnProp$c.call(b, prop))
|
|
751
750
|
__defNormalProp$a(a, prop, b[prop]);
|
|
752
|
-
if (__getOwnPropSymbols$
|
|
753
|
-
for (var prop of __getOwnPropSymbols$
|
|
754
|
-
if (__propIsEnum$
|
|
751
|
+
if (__getOwnPropSymbols$c)
|
|
752
|
+
for (var prop of __getOwnPropSymbols$c(b)) {
|
|
753
|
+
if (__propIsEnum$c.call(b, prop))
|
|
755
754
|
__defNormalProp$a(a, prop, b[prop]);
|
|
756
755
|
}
|
|
757
756
|
return a;
|
|
@@ -862,23 +861,23 @@ const UseElementSize = /* @__PURE__ */ /* #__PURE__ */ defineComponent({
|
|
|
862
861
|
}
|
|
863
862
|
});
|
|
864
863
|
|
|
865
|
-
var __getOwnPropSymbols$
|
|
866
|
-
var __hasOwnProp$
|
|
867
|
-
var __propIsEnum$
|
|
868
|
-
var __objRest = (source, exclude) => {
|
|
864
|
+
var __getOwnPropSymbols$b = Object.getOwnPropertySymbols;
|
|
865
|
+
var __hasOwnProp$b = Object.prototype.hasOwnProperty;
|
|
866
|
+
var __propIsEnum$b = Object.prototype.propertyIsEnumerable;
|
|
867
|
+
var __objRest$1 = (source, exclude) => {
|
|
869
868
|
var target = {};
|
|
870
869
|
for (var prop in source)
|
|
871
|
-
if (__hasOwnProp$
|
|
870
|
+
if (__hasOwnProp$b.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
872
871
|
target[prop] = source[prop];
|
|
873
|
-
if (source != null && __getOwnPropSymbols$
|
|
874
|
-
for (var prop of __getOwnPropSymbols$
|
|
875
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
872
|
+
if (source != null && __getOwnPropSymbols$b)
|
|
873
|
+
for (var prop of __getOwnPropSymbols$b(source)) {
|
|
874
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$b.call(source, prop))
|
|
876
875
|
target[prop] = source[prop];
|
|
877
876
|
}
|
|
878
877
|
return target;
|
|
879
878
|
};
|
|
880
879
|
function useResizeObserver(target, callback, options = {}) {
|
|
881
|
-
const _a = options, { window = defaultWindow } = _a, observerOptions = __objRest(_a, ["window"]);
|
|
880
|
+
const _a = options, { window = defaultWindow } = _a, observerOptions = __objRest$1(_a, ["window"]);
|
|
882
881
|
let observer;
|
|
883
882
|
const isSupported = useSupported(() => window && "ResizeObserver" in window);
|
|
884
883
|
const cleanup = () => {
|
|
@@ -992,7 +991,7 @@ function useIntersectionObserver(target, callback, options = {}) {
|
|
|
992
991
|
immediate = true
|
|
993
992
|
} = options;
|
|
994
993
|
const isSupported = useSupported(() => window && "IntersectionObserver" in window);
|
|
995
|
-
const targets = computed
|
|
994
|
+
const targets = computed(() => {
|
|
996
995
|
const _target = toValue(target);
|
|
997
996
|
return (Array.isArray(_target) ? _target : [_target]).map(unrefElement).filter(notNullish);
|
|
998
997
|
});
|
|
@@ -1172,17 +1171,17 @@ function useAsyncState(promise, initialState, options) {
|
|
|
1172
1171
|
}
|
|
1173
1172
|
|
|
1174
1173
|
var __defProp$9 = Object.defineProperty;
|
|
1175
|
-
var __getOwnPropSymbols$
|
|
1176
|
-
var __hasOwnProp$
|
|
1177
|
-
var __propIsEnum$
|
|
1174
|
+
var __getOwnPropSymbols$a = Object.getOwnPropertySymbols;
|
|
1175
|
+
var __hasOwnProp$a = Object.prototype.hasOwnProperty;
|
|
1176
|
+
var __propIsEnum$a = Object.prototype.propertyIsEnumerable;
|
|
1178
1177
|
var __defNormalProp$9 = (obj, key, value) => key in obj ? __defProp$9(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
1179
1178
|
var __spreadValues$9 = (a, b) => {
|
|
1180
1179
|
for (var prop in b || (b = {}))
|
|
1181
|
-
if (__hasOwnProp$
|
|
1180
|
+
if (__hasOwnProp$a.call(b, prop))
|
|
1182
1181
|
__defNormalProp$9(a, prop, b[prop]);
|
|
1183
|
-
if (__getOwnPropSymbols$
|
|
1184
|
-
for (var prop of __getOwnPropSymbols$
|
|
1185
|
-
if (__propIsEnum$
|
|
1182
|
+
if (__getOwnPropSymbols$a)
|
|
1183
|
+
for (var prop of __getOwnPropSymbols$a(b)) {
|
|
1184
|
+
if (__propIsEnum$a.call(b, prop))
|
|
1186
1185
|
__defNormalProp$9(a, prop, b[prop]);
|
|
1187
1186
|
}
|
|
1188
1187
|
return a;
|
|
@@ -1369,17 +1368,17 @@ function useScroll(element, options = {}) {
|
|
|
1369
1368
|
var __defProp$8 = Object.defineProperty;
|
|
1370
1369
|
var __defProps$7 = Object.defineProperties;
|
|
1371
1370
|
var __getOwnPropDescs$7 = Object.getOwnPropertyDescriptors;
|
|
1372
|
-
var __getOwnPropSymbols$
|
|
1373
|
-
var __hasOwnProp$
|
|
1374
|
-
var __propIsEnum$
|
|
1371
|
+
var __getOwnPropSymbols$9 = Object.getOwnPropertySymbols;
|
|
1372
|
+
var __hasOwnProp$9 = Object.prototype.hasOwnProperty;
|
|
1373
|
+
var __propIsEnum$9 = Object.prototype.propertyIsEnumerable;
|
|
1375
1374
|
var __defNormalProp$8 = (obj, key, value) => key in obj ? __defProp$8(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
1376
1375
|
var __spreadValues$8 = (a, b) => {
|
|
1377
1376
|
for (var prop in b || (b = {}))
|
|
1378
|
-
if (__hasOwnProp$
|
|
1377
|
+
if (__hasOwnProp$9.call(b, prop))
|
|
1379
1378
|
__defNormalProp$8(a, prop, b[prop]);
|
|
1380
|
-
if (__getOwnPropSymbols$
|
|
1381
|
-
for (var prop of __getOwnPropSymbols$
|
|
1382
|
-
if (__propIsEnum$
|
|
1379
|
+
if (__getOwnPropSymbols$9)
|
|
1380
|
+
for (var prop of __getOwnPropSymbols$9(b)) {
|
|
1381
|
+
if (__propIsEnum$9.call(b, prop))
|
|
1383
1382
|
__defNormalProp$8(a, prop, b[prop]);
|
|
1384
1383
|
}
|
|
1385
1384
|
return a;
|
|
@@ -1474,17 +1473,17 @@ const UseMouseInElement = /* @__PURE__ */ /* #__PURE__ */ defineComponent({
|
|
|
1474
1473
|
var __defProp$7 = Object.defineProperty;
|
|
1475
1474
|
var __defProps$6 = Object.defineProperties;
|
|
1476
1475
|
var __getOwnPropDescs$6 = Object.getOwnPropertyDescriptors;
|
|
1477
|
-
var __getOwnPropSymbols$
|
|
1478
|
-
var __hasOwnProp$
|
|
1479
|
-
var __propIsEnum$
|
|
1476
|
+
var __getOwnPropSymbols$8 = Object.getOwnPropertySymbols;
|
|
1477
|
+
var __hasOwnProp$8 = Object.prototype.hasOwnProperty;
|
|
1478
|
+
var __propIsEnum$8 = Object.prototype.propertyIsEnumerable;
|
|
1480
1479
|
var __defNormalProp$7 = (obj, key, value) => key in obj ? __defProp$7(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
1481
1480
|
var __spreadValues$7 = (a, b) => {
|
|
1482
1481
|
for (var prop in b || (b = {}))
|
|
1483
|
-
if (__hasOwnProp$
|
|
1482
|
+
if (__hasOwnProp$8.call(b, prop))
|
|
1484
1483
|
__defNormalProp$7(a, prop, b[prop]);
|
|
1485
|
-
if (__getOwnPropSymbols$
|
|
1486
|
-
for (var prop of __getOwnPropSymbols$
|
|
1487
|
-
if (__propIsEnum$
|
|
1484
|
+
if (__getOwnPropSymbols$8)
|
|
1485
|
+
for (var prop of __getOwnPropSymbols$8(b)) {
|
|
1486
|
+
if (__propIsEnum$8.call(b, prop))
|
|
1488
1487
|
__defNormalProp$7(a, prop, b[prop]);
|
|
1489
1488
|
}
|
|
1490
1489
|
return a;
|
|
@@ -1517,17 +1516,17 @@ const UseNetwork = /* @__PURE__ */ /* #__PURE__ */ defineComponent({
|
|
|
1517
1516
|
var __defProp$6 = Object.defineProperty;
|
|
1518
1517
|
var __defProps$5 = Object.defineProperties;
|
|
1519
1518
|
var __getOwnPropDescs$5 = Object.getOwnPropertyDescriptors;
|
|
1520
|
-
var __getOwnPropSymbols$
|
|
1521
|
-
var __hasOwnProp$
|
|
1522
|
-
var __propIsEnum$
|
|
1519
|
+
var __getOwnPropSymbols$7 = Object.getOwnPropertySymbols;
|
|
1520
|
+
var __hasOwnProp$7 = Object.prototype.hasOwnProperty;
|
|
1521
|
+
var __propIsEnum$7 = Object.prototype.propertyIsEnumerable;
|
|
1523
1522
|
var __defNormalProp$6 = (obj, key, value) => key in obj ? __defProp$6(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
1524
1523
|
var __spreadValues$6 = (a, b) => {
|
|
1525
1524
|
for (var prop in b || (b = {}))
|
|
1526
|
-
if (__hasOwnProp$
|
|
1525
|
+
if (__hasOwnProp$7.call(b, prop))
|
|
1527
1526
|
__defNormalProp$6(a, prop, b[prop]);
|
|
1528
|
-
if (__getOwnPropSymbols$
|
|
1529
|
-
for (var prop of __getOwnPropSymbols$
|
|
1530
|
-
if (__propIsEnum$
|
|
1527
|
+
if (__getOwnPropSymbols$7)
|
|
1528
|
+
for (var prop of __getOwnPropSymbols$7(b)) {
|
|
1529
|
+
if (__propIsEnum$7.call(b, prop))
|
|
1531
1530
|
__defNormalProp$6(a, prop, b[prop]);
|
|
1532
1531
|
}
|
|
1533
1532
|
return a;
|
|
@@ -1563,17 +1562,17 @@ const UseObjectUrl = /* @__PURE__ */ /* #__PURE__ */ defineComponent({
|
|
|
1563
1562
|
var __defProp$5 = Object.defineProperty;
|
|
1564
1563
|
var __defProps$4 = Object.defineProperties;
|
|
1565
1564
|
var __getOwnPropDescs$4 = Object.getOwnPropertyDescriptors;
|
|
1566
|
-
var __getOwnPropSymbols$
|
|
1567
|
-
var __hasOwnProp$
|
|
1568
|
-
var __propIsEnum$
|
|
1565
|
+
var __getOwnPropSymbols$6 = Object.getOwnPropertySymbols;
|
|
1566
|
+
var __hasOwnProp$6 = Object.prototype.hasOwnProperty;
|
|
1567
|
+
var __propIsEnum$6 = Object.prototype.propertyIsEnumerable;
|
|
1569
1568
|
var __defNormalProp$5 = (obj, key, value) => key in obj ? __defProp$5(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
1570
1569
|
var __spreadValues$5 = (a, b) => {
|
|
1571
1570
|
for (var prop in b || (b = {}))
|
|
1572
|
-
if (__hasOwnProp$
|
|
1571
|
+
if (__hasOwnProp$6.call(b, prop))
|
|
1573
1572
|
__defNormalProp$5(a, prop, b[prop]);
|
|
1574
|
-
if (__getOwnPropSymbols$
|
|
1575
|
-
for (var prop of __getOwnPropSymbols$
|
|
1576
|
-
if (__propIsEnum$
|
|
1573
|
+
if (__getOwnPropSymbols$6)
|
|
1574
|
+
for (var prop of __getOwnPropSymbols$6(b)) {
|
|
1575
|
+
if (__propIsEnum$6.call(b, prop))
|
|
1577
1576
|
__defNormalProp$5(a, prop, b[prop]);
|
|
1578
1577
|
}
|
|
1579
1578
|
return a;
|
|
@@ -1648,17 +1647,17 @@ const UsePageLeave = /* @__PURE__ */ /* #__PURE__ */ defineComponent({
|
|
|
1648
1647
|
var __defProp$4 = Object.defineProperty;
|
|
1649
1648
|
var __defProps$3 = Object.defineProperties;
|
|
1650
1649
|
var __getOwnPropDescs$3 = Object.getOwnPropertyDescriptors;
|
|
1651
|
-
var __getOwnPropSymbols$
|
|
1652
|
-
var __hasOwnProp$
|
|
1653
|
-
var __propIsEnum$
|
|
1650
|
+
var __getOwnPropSymbols$5 = Object.getOwnPropertySymbols;
|
|
1651
|
+
var __hasOwnProp$5 = Object.prototype.hasOwnProperty;
|
|
1652
|
+
var __propIsEnum$5 = Object.prototype.propertyIsEnumerable;
|
|
1654
1653
|
var __defNormalProp$4 = (obj, key, value) => key in obj ? __defProp$4(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
1655
1654
|
var __spreadValues$4 = (a, b) => {
|
|
1656
1655
|
for (var prop in b || (b = {}))
|
|
1657
|
-
if (__hasOwnProp$
|
|
1656
|
+
if (__hasOwnProp$5.call(b, prop))
|
|
1658
1657
|
__defNormalProp$4(a, prop, b[prop]);
|
|
1659
|
-
if (__getOwnPropSymbols$
|
|
1660
|
-
for (var prop of __getOwnPropSymbols$
|
|
1661
|
-
if (__propIsEnum$
|
|
1658
|
+
if (__getOwnPropSymbols$5)
|
|
1659
|
+
for (var prop of __getOwnPropSymbols$5(b)) {
|
|
1660
|
+
if (__propIsEnum$5.call(b, prop))
|
|
1662
1661
|
__defNormalProp$4(a, prop, b[prop]);
|
|
1663
1662
|
}
|
|
1664
1663
|
return a;
|
|
@@ -1761,6 +1760,53 @@ const UsePreferredReducedMotion = /* @__PURE__ */ /* #__PURE__ */ defineComponen
|
|
|
1761
1760
|
}
|
|
1762
1761
|
});
|
|
1763
1762
|
|
|
1763
|
+
var __getOwnPropSymbols$4 = Object.getOwnPropertySymbols;
|
|
1764
|
+
var __hasOwnProp$4 = Object.prototype.hasOwnProperty;
|
|
1765
|
+
var __propIsEnum$4 = Object.prototype.propertyIsEnumerable;
|
|
1766
|
+
var __objRest = (source, exclude) => {
|
|
1767
|
+
var target = {};
|
|
1768
|
+
for (var prop in source)
|
|
1769
|
+
if (__hasOwnProp$4.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
1770
|
+
target[prop] = source[prop];
|
|
1771
|
+
if (source != null && __getOwnPropSymbols$4)
|
|
1772
|
+
for (var prop of __getOwnPropSymbols$4(source)) {
|
|
1773
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$4.call(source, prop))
|
|
1774
|
+
target[prop] = source[prop];
|
|
1775
|
+
}
|
|
1776
|
+
return target;
|
|
1777
|
+
};
|
|
1778
|
+
function useMutationObserver(target, callback, options = {}) {
|
|
1779
|
+
const _a = options, { window = defaultWindow } = _a, mutationOptions = __objRest(_a, ["window"]);
|
|
1780
|
+
let observer;
|
|
1781
|
+
const isSupported = useSupported(() => window && "MutationObserver" in window);
|
|
1782
|
+
const cleanup = () => {
|
|
1783
|
+
if (observer) {
|
|
1784
|
+
observer.disconnect();
|
|
1785
|
+
observer = void 0;
|
|
1786
|
+
}
|
|
1787
|
+
};
|
|
1788
|
+
const stopWatch = watch(
|
|
1789
|
+
() => unrefElement(target),
|
|
1790
|
+
(el) => {
|
|
1791
|
+
cleanup();
|
|
1792
|
+
if (isSupported.value && window && el) {
|
|
1793
|
+
observer = new MutationObserver(callback);
|
|
1794
|
+
observer.observe(el, mutationOptions);
|
|
1795
|
+
}
|
|
1796
|
+
},
|
|
1797
|
+
{ immediate: true }
|
|
1798
|
+
);
|
|
1799
|
+
const stop = () => {
|
|
1800
|
+
cleanup();
|
|
1801
|
+
stopWatch();
|
|
1802
|
+
};
|
|
1803
|
+
tryOnScopeDispose(stop);
|
|
1804
|
+
return {
|
|
1805
|
+
isSupported,
|
|
1806
|
+
stop
|
|
1807
|
+
};
|
|
1808
|
+
}
|
|
1809
|
+
|
|
1764
1810
|
function useCssVar(prop, target, options = {}) {
|
|
1765
1811
|
const { window = defaultWindow, initialValue = "", observe = false } = options;
|
|
1766
1812
|
const variable = ref(initialValue);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vueuse/components",
|
|
3
|
-
"version": "10.0.
|
|
3
|
+
"version": "10.0.2",
|
|
4
4
|
"description": "Renderless components for VueUse",
|
|
5
5
|
"author": "Jacob Clevenger<https://github.com/wheatjs>",
|
|
6
6
|
"license": "MIT",
|
|
@@ -33,8 +33,8 @@
|
|
|
33
33
|
"jsdelivr": "./index.iife.min.js",
|
|
34
34
|
"types": "./index.d.ts",
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@vueuse/core": "10.0.
|
|
37
|
-
"@vueuse/shared": "10.0.
|
|
36
|
+
"@vueuse/core": "10.0.2",
|
|
37
|
+
"@vueuse/shared": "10.0.2",
|
|
38
38
|
"vue-demi": ">=0.14.0"
|
|
39
39
|
}
|
|
40
40
|
}
|