@opentiny/tiny-robot 0.3.0-alpha.11 → 0.3.0-alpha.13
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/dist/action-group/index.js +15 -15
- package/dist/attachments/index.js +62 -62
- package/dist/container/index.js +10 -10
- package/dist/dropdown-menu/index.js +116 -49
- package/dist/feedback/index.js +50 -50
- package/dist/flow-layout-buttons/index.js +10 -10
- package/dist/history/index.js +26 -26
- package/dist/index.d.ts +189 -35
- package/dist/index.js +47 -43
- package/dist/index2.js +7 -6
- package/dist/index3.js +426 -418
- package/dist/index4.js +98 -88
- package/dist/index5.js +22 -21
- package/dist/index6.js +795 -599
- package/dist/index7.js +3622 -1717
- package/dist/mcp-server-picker/index.js +29972 -0
- package/dist/question/index.js +12 -12
- package/dist/sender/index.js +212 -212
- package/dist/style.css +1 -1
- package/dist/suggestion/index.js +67 -67
- package/dist/suggestion-pills/index.js +11 -11
- package/dist/suggestion-popover/index.js +64 -64
- package/dist/tiny-robot-svgs.js +162 -108
- package/dist/useSlotRefs.js +13 -13
- package/dist/utils.js +8 -2
- package/package.json +10 -3
package/dist/index3.js
CHANGED
|
@@ -1,136 +1,164 @@
|
|
|
1
|
-
import { onMounted as
|
|
2
|
-
function
|
|
3
|
-
return me() ? (
|
|
1
|
+
import { onMounted as re, nextTick as he, watch as k, getCurrentScope as me, onScopeDispose as we, isRef as ie, getCurrentInstance as j, toValue as b, hasInjectionContext as le, inject as ge, toRefs as be, customRef as ye, shallowRef as y, computed as F, reactive as Z, unref as Se, watchEffect as Te, ref as se, readonly as Oe } from "vue";
|
|
2
|
+
function z(e) {
|
|
3
|
+
return me() ? (we(e), !0) : !1;
|
|
4
4
|
}
|
|
5
|
-
function
|
|
6
|
-
const e = /* @__PURE__ */ new Set(), t = (
|
|
7
|
-
e.delete(
|
|
5
|
+
function ee() {
|
|
6
|
+
const e = /* @__PURE__ */ new Set(), t = (i) => {
|
|
7
|
+
e.delete(i);
|
|
8
8
|
};
|
|
9
9
|
return {
|
|
10
|
-
on: (
|
|
11
|
-
e.add(
|
|
12
|
-
const
|
|
13
|
-
return
|
|
14
|
-
off:
|
|
10
|
+
on: (i) => {
|
|
11
|
+
e.add(i);
|
|
12
|
+
const c = () => t(i);
|
|
13
|
+
return z(c), {
|
|
14
|
+
off: c
|
|
15
15
|
};
|
|
16
16
|
},
|
|
17
17
|
off: t,
|
|
18
|
-
trigger: (...
|
|
18
|
+
trigger: (...i) => Promise.all(Array.from(e).map((c) => c(...i))),
|
|
19
19
|
clear: () => {
|
|
20
20
|
e.clear();
|
|
21
21
|
}
|
|
22
22
|
};
|
|
23
23
|
}
|
|
24
|
-
const
|
|
24
|
+
const B = /* @__PURE__ */ new WeakMap(), Ee = (...e) => {
|
|
25
25
|
var t;
|
|
26
|
-
const o = e[0],
|
|
27
|
-
if (
|
|
26
|
+
const o = e[0], n = (t = j()) == null ? void 0 : t.proxy;
|
|
27
|
+
if (n == null && !le())
|
|
28
28
|
throw new Error("injectLocal must be called in setup");
|
|
29
|
-
return
|
|
29
|
+
return n && B.has(n) && o in B.get(n) ? B.get(n)[o] : ge(...e);
|
|
30
30
|
}, $ = typeof window < "u" && typeof document < "u";
|
|
31
31
|
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
|
32
|
-
const
|
|
33
|
-
},
|
|
34
|
-
function
|
|
32
|
+
const xe = (e) => e != null, We = Object.prototype.toString, Me = (e) => We.call(e) === "[object Object]", W = () => {
|
|
33
|
+
}, Ie = (e, t) => Object.prototype.hasOwnProperty.call(e, t), Pe = /* @__PURE__ */ Ae();
|
|
34
|
+
function Ae() {
|
|
35
35
|
var e, t;
|
|
36
36
|
return $ && ((e = window == null ? void 0 : window.navigator) == null ? void 0 : e.userAgent) && (/iP(?:ad|hone|od)/.test(window.navigator.userAgent) || ((t = window == null ? void 0 : window.navigator) == null ? void 0 : t.maxTouchPoints) > 2 && /iPad|Macintosh/.test(window == null ? void 0 : window.navigator.userAgent));
|
|
37
37
|
}
|
|
38
|
-
function
|
|
39
|
-
function o(...
|
|
40
|
-
return new Promise((
|
|
41
|
-
Promise.resolve(e(() => t.apply(this,
|
|
38
|
+
function Y(e, t) {
|
|
39
|
+
function o(...n) {
|
|
40
|
+
return new Promise((u, i) => {
|
|
41
|
+
Promise.resolve(e(() => t.apply(this, n), { fn: t, thisArg: this, args: n })).then(u).catch(i);
|
|
42
42
|
});
|
|
43
43
|
}
|
|
44
44
|
return o;
|
|
45
45
|
}
|
|
46
|
-
const
|
|
46
|
+
const Fe = (e) => e();
|
|
47
47
|
function ue(e, t = {}) {
|
|
48
|
-
let o,
|
|
49
|
-
const
|
|
50
|
-
clearTimeout(
|
|
48
|
+
let o, n, u = W;
|
|
49
|
+
const i = (l) => {
|
|
50
|
+
clearTimeout(l), u(), u = W;
|
|
51
51
|
};
|
|
52
|
-
let
|
|
53
|
-
return (
|
|
54
|
-
const
|
|
55
|
-
return o &&
|
|
56
|
-
|
|
57
|
-
o &&
|
|
58
|
-
},
|
|
59
|
-
|
|
60
|
-
},
|
|
52
|
+
let c;
|
|
53
|
+
return (l) => {
|
|
54
|
+
const d = b(e), a = b(t.maxWait);
|
|
55
|
+
return o && i(o), d <= 0 || a !== void 0 && a <= 0 ? (n && (i(n), n = void 0), Promise.resolve(l())) : new Promise((s, v) => {
|
|
56
|
+
u = t.rejectOnCancel ? v : s, c = l, a && !n && (n = setTimeout(() => {
|
|
57
|
+
o && i(o), n = void 0, s(c());
|
|
58
|
+
}, a)), o = setTimeout(() => {
|
|
59
|
+
n && i(n), n = void 0, s(l());
|
|
60
|
+
}, d);
|
|
61
61
|
});
|
|
62
62
|
};
|
|
63
63
|
}
|
|
64
64
|
function ce(...e) {
|
|
65
|
-
let t = 0, o,
|
|
66
|
-
!
|
|
67
|
-
const
|
|
68
|
-
o && (clearTimeout(o), o = void 0,
|
|
65
|
+
let t = 0, o, n = !0, u = W, i, c, r, l, d;
|
|
66
|
+
!ie(e[0]) && typeof e[0] == "object" ? { delay: c, trailing: r = !0, leading: l = !0, rejectOnCancel: d = !1 } = e[0] : [c, r = !0, l = !0, d = !1] = e;
|
|
67
|
+
const a = () => {
|
|
68
|
+
o && (clearTimeout(o), o = void 0, u(), u = W);
|
|
69
69
|
};
|
|
70
70
|
return (v) => {
|
|
71
|
-
const
|
|
72
|
-
return
|
|
73
|
-
|
|
74
|
-
t = Date.now(),
|
|
75
|
-
}, Math.max(0,
|
|
76
|
-
})), !
|
|
71
|
+
const p = b(c), w = Date.now() - t, S = () => i = v();
|
|
72
|
+
return a(), p <= 0 ? (t = Date.now(), S()) : (w > p && (l || !n) ? (t = Date.now(), S()) : r && (i = new Promise((f, h) => {
|
|
73
|
+
u = d ? h : f, o = setTimeout(() => {
|
|
74
|
+
t = Date.now(), n = !0, f(S()), a();
|
|
75
|
+
}, Math.max(0, p - w));
|
|
76
|
+
})), !l && !o && (o = setTimeout(() => n = !0, p)), n = !1, i);
|
|
77
77
|
};
|
|
78
78
|
}
|
|
79
|
-
function
|
|
79
|
+
function te(e) {
|
|
80
80
|
return e.endsWith("rem") ? Number.parseFloat(e) * 16 : Number.parseFloat(e);
|
|
81
81
|
}
|
|
82
|
-
function
|
|
82
|
+
function _e(e, t, o = !1) {
|
|
83
|
+
return t.reduce((n, u) => (u in e && (!o || e[u] !== void 0) && (n[u] = e[u]), n), {});
|
|
84
|
+
}
|
|
85
|
+
function R(e) {
|
|
83
86
|
return Array.isArray(e) ? e : [e];
|
|
84
87
|
}
|
|
85
|
-
function
|
|
86
|
-
return
|
|
88
|
+
function Le(e) {
|
|
89
|
+
return j();
|
|
87
90
|
}
|
|
88
|
-
function
|
|
89
|
-
return
|
|
91
|
+
function ke(e, t = 200, o = {}) {
|
|
92
|
+
return Y(
|
|
90
93
|
ue(t, o),
|
|
91
94
|
e
|
|
92
95
|
);
|
|
93
96
|
}
|
|
94
|
-
function
|
|
95
|
-
return
|
|
96
|
-
ce(t, o,
|
|
97
|
+
function De(e, t = 200, o = !1, n = !0, u = !1) {
|
|
98
|
+
return Y(
|
|
99
|
+
ce(t, o, n, u),
|
|
97
100
|
e
|
|
98
101
|
);
|
|
99
102
|
}
|
|
100
103
|
function ae(e, t, o = {}) {
|
|
101
104
|
const {
|
|
102
|
-
eventFilter:
|
|
103
|
-
...
|
|
105
|
+
eventFilter: n = Fe,
|
|
106
|
+
...u
|
|
104
107
|
} = o;
|
|
105
|
-
return
|
|
108
|
+
return k(
|
|
106
109
|
e,
|
|
107
|
-
|
|
108
|
-
|
|
110
|
+
Y(
|
|
111
|
+
n,
|
|
109
112
|
t
|
|
110
113
|
),
|
|
111
|
-
|
|
114
|
+
u
|
|
112
115
|
);
|
|
113
116
|
}
|
|
114
|
-
function
|
|
115
|
-
|
|
117
|
+
function Ce(e, t = {}) {
|
|
118
|
+
if (!ie(e))
|
|
119
|
+
return be(e);
|
|
120
|
+
const o = Array.isArray(e.value) ? Array.from({ length: e.value.length }) : {};
|
|
121
|
+
for (const n in e.value)
|
|
122
|
+
o[n] = ye(() => ({
|
|
123
|
+
get() {
|
|
124
|
+
return e.value[n];
|
|
125
|
+
},
|
|
126
|
+
set(u) {
|
|
127
|
+
var i;
|
|
128
|
+
if ((i = b(t.replaceRef)) != null ? i : !0)
|
|
129
|
+
if (Array.isArray(e.value)) {
|
|
130
|
+
const r = [...e.value];
|
|
131
|
+
r[n] = u, e.value = r;
|
|
132
|
+
} else {
|
|
133
|
+
const r = { ...e.value, [n]: u };
|
|
134
|
+
Object.setPrototypeOf(r, Object.getPrototypeOf(e.value)), e.value = r;
|
|
135
|
+
}
|
|
136
|
+
else
|
|
137
|
+
e.value[n] = u;
|
|
138
|
+
}
|
|
139
|
+
}));
|
|
140
|
+
return o;
|
|
141
|
+
}
|
|
142
|
+
function N(e, t = !0, o) {
|
|
143
|
+
Le() ? re(e, o) : t ? e() : he(e);
|
|
116
144
|
}
|
|
117
|
-
function
|
|
145
|
+
function Xe(e, t, o = {}) {
|
|
118
146
|
const {
|
|
119
|
-
debounce:
|
|
120
|
-
maxWait:
|
|
121
|
-
...
|
|
147
|
+
debounce: n = 0,
|
|
148
|
+
maxWait: u = void 0,
|
|
149
|
+
...i
|
|
122
150
|
} = o;
|
|
123
151
|
return ae(
|
|
124
152
|
e,
|
|
125
153
|
t,
|
|
126
154
|
{
|
|
127
|
-
...
|
|
128
|
-
eventFilter: ue(
|
|
155
|
+
...i,
|
|
156
|
+
eventFilter: ue(n, { maxWait: u })
|
|
129
157
|
}
|
|
130
158
|
);
|
|
131
159
|
}
|
|
132
|
-
function
|
|
133
|
-
return
|
|
160
|
+
function Re(e, t, o) {
|
|
161
|
+
return k(
|
|
134
162
|
e,
|
|
135
163
|
t,
|
|
136
164
|
{
|
|
@@ -139,335 +167,286 @@ function _e(e, t, o) {
|
|
|
139
167
|
}
|
|
140
168
|
);
|
|
141
169
|
}
|
|
142
|
-
function
|
|
170
|
+
function Qe(e, t, o = {}) {
|
|
143
171
|
const {
|
|
144
|
-
throttle:
|
|
145
|
-
trailing:
|
|
146
|
-
leading:
|
|
147
|
-
...
|
|
172
|
+
throttle: n = 0,
|
|
173
|
+
trailing: u = !0,
|
|
174
|
+
leading: i = !0,
|
|
175
|
+
...c
|
|
148
176
|
} = o;
|
|
149
177
|
return ae(
|
|
150
178
|
e,
|
|
151
179
|
t,
|
|
152
180
|
{
|
|
153
|
-
...
|
|
154
|
-
eventFilter: ce(
|
|
181
|
+
...c,
|
|
182
|
+
eventFilter: ce(n, u, i)
|
|
155
183
|
}
|
|
156
184
|
);
|
|
157
185
|
}
|
|
158
|
-
const
|
|
159
|
-
function
|
|
186
|
+
const P = $ ? window : void 0, Ve = $ ? window.document : void 0;
|
|
187
|
+
function T(e) {
|
|
160
188
|
var t;
|
|
161
189
|
const o = b(e);
|
|
162
190
|
return (t = o == null ? void 0 : o.$el) != null ? t : o;
|
|
163
191
|
}
|
|
164
192
|
function M(...e) {
|
|
165
193
|
const t = [], o = () => {
|
|
166
|
-
t.forEach((
|
|
167
|
-
},
|
|
168
|
-
const
|
|
169
|
-
return
|
|
170
|
-
}),
|
|
194
|
+
t.forEach((r) => r()), t.length = 0;
|
|
195
|
+
}, n = (r, l, d, a) => (r.addEventListener(l, d, a), () => r.removeEventListener(l, d, a)), u = F(() => {
|
|
196
|
+
const r = R(b(e[0])).filter((l) => l != null);
|
|
197
|
+
return r.every((l) => typeof l != "string") ? r : void 0;
|
|
198
|
+
}), i = Re(
|
|
171
199
|
() => {
|
|
172
|
-
var
|
|
200
|
+
var r, l;
|
|
173
201
|
return [
|
|
174
|
-
(
|
|
175
|
-
|
|
176
|
-
|
|
202
|
+
(l = (r = u.value) == null ? void 0 : r.map((d) => T(d))) != null ? l : [P].filter((d) => d != null),
|
|
203
|
+
R(b(u.value ? e[1] : e[0])),
|
|
204
|
+
R(Se(u.value ? e[2] : e[1])),
|
|
177
205
|
// @ts-expect-error - TypeScript gets the correct types, but somehow still complains
|
|
178
|
-
b(
|
|
206
|
+
b(u.value ? e[3] : e[2])
|
|
179
207
|
];
|
|
180
208
|
},
|
|
181
|
-
([
|
|
182
|
-
if (o(), !(
|
|
209
|
+
([r, l, d, a]) => {
|
|
210
|
+
if (o(), !(r != null && r.length) || !(l != null && l.length) || !(d != null && d.length))
|
|
183
211
|
return;
|
|
184
|
-
const s =
|
|
212
|
+
const s = Me(a) ? { ...a } : a;
|
|
185
213
|
t.push(
|
|
186
|
-
...
|
|
187
|
-
(v) =>
|
|
188
|
-
(
|
|
214
|
+
...r.flatMap(
|
|
215
|
+
(v) => l.flatMap(
|
|
216
|
+
(p) => d.map((w) => n(v, p, w, s))
|
|
189
217
|
)
|
|
190
218
|
)
|
|
191
219
|
);
|
|
192
220
|
},
|
|
193
221
|
{ flush: "post" }
|
|
194
|
-
),
|
|
195
|
-
|
|
222
|
+
), c = () => {
|
|
223
|
+
i(), o();
|
|
196
224
|
};
|
|
197
|
-
return
|
|
198
|
-
}
|
|
199
|
-
let
|
|
200
|
-
function
|
|
201
|
-
const { window:
|
|
202
|
-
if (!
|
|
203
|
-
return
|
|
204
|
-
if (
|
|
205
|
-
|
|
206
|
-
const
|
|
207
|
-
Array.from(
|
|
225
|
+
return z(o), c;
|
|
226
|
+
}
|
|
227
|
+
let ne = !1;
|
|
228
|
+
function Ue(e, t, o = {}) {
|
|
229
|
+
const { window: n = P, ignore: u = [], capture: i = !0, detectIframe: c = !1, controls: r = !1 } = o;
|
|
230
|
+
if (!n)
|
|
231
|
+
return r ? { stop: W, cancel: W, trigger: W } : W;
|
|
232
|
+
if (Pe && !ne) {
|
|
233
|
+
ne = !0;
|
|
234
|
+
const f = { passive: !0 };
|
|
235
|
+
Array.from(n.document.body.children).forEach((h) => h.addEventListener("click", W, f)), n.document.documentElement.addEventListener("click", W, f);
|
|
208
236
|
}
|
|
209
|
-
let
|
|
210
|
-
const
|
|
237
|
+
let l = !0;
|
|
238
|
+
const d = (f) => b(u).some((h) => {
|
|
211
239
|
if (typeof h == "string")
|
|
212
|
-
return Array.from(
|
|
240
|
+
return Array.from(n.document.querySelectorAll(h)).some((g) => g === f.target || f.composedPath().includes(g));
|
|
213
241
|
{
|
|
214
|
-
const g =
|
|
215
|
-
return g && (
|
|
242
|
+
const g = T(h);
|
|
243
|
+
return g && (f.target === g || f.composedPath().includes(g));
|
|
216
244
|
}
|
|
217
245
|
});
|
|
218
|
-
function
|
|
219
|
-
const h = b(
|
|
246
|
+
function a(f) {
|
|
247
|
+
const h = b(f);
|
|
220
248
|
return h && h.$.subTree.shapeFlag === 16;
|
|
221
249
|
}
|
|
222
|
-
function s(
|
|
223
|
-
const g = b(
|
|
224
|
-
return
|
|
250
|
+
function s(f, h) {
|
|
251
|
+
const g = b(f), O = g.$.subTree && g.$.subTree.children;
|
|
252
|
+
return O == null || !Array.isArray(O) ? !1 : O.some((E) => E.el === h.target || h.composedPath().includes(E.el));
|
|
225
253
|
}
|
|
226
|
-
const v = (
|
|
227
|
-
const h =
|
|
228
|
-
if (
|
|
229
|
-
if ("detail" in
|
|
230
|
-
|
|
254
|
+
const v = (f) => {
|
|
255
|
+
const h = T(e);
|
|
256
|
+
if (f.target != null && !(!(h instanceof Element) && a(e) && s(e, f)) && !(!h || h === f.target || f.composedPath().includes(h))) {
|
|
257
|
+
if ("detail" in f && f.detail === 0 && (l = !d(f)), !l) {
|
|
258
|
+
l = !0;
|
|
231
259
|
return;
|
|
232
260
|
}
|
|
233
|
-
t(
|
|
261
|
+
t(f);
|
|
234
262
|
}
|
|
235
263
|
};
|
|
236
|
-
let
|
|
237
|
-
const
|
|
238
|
-
M(
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
}, 0), v(
|
|
242
|
-
}, { passive: !0, capture:
|
|
243
|
-
M(
|
|
244
|
-
const h =
|
|
245
|
-
|
|
264
|
+
let p = !1;
|
|
265
|
+
const w = [
|
|
266
|
+
M(n, "click", (f) => {
|
|
267
|
+
p || (p = !0, setTimeout(() => {
|
|
268
|
+
p = !1;
|
|
269
|
+
}, 0), v(f));
|
|
270
|
+
}, { passive: !0, capture: i }),
|
|
271
|
+
M(n, "pointerdown", (f) => {
|
|
272
|
+
const h = T(e);
|
|
273
|
+
l = !d(f) && !!(h && !f.composedPath().includes(h));
|
|
246
274
|
}, { passive: !0 }),
|
|
247
|
-
|
|
275
|
+
c && M(n, "blur", (f) => {
|
|
248
276
|
setTimeout(() => {
|
|
249
277
|
var h;
|
|
250
|
-
const g =
|
|
251
|
-
((h =
|
|
278
|
+
const g = T(e);
|
|
279
|
+
((h = n.document.activeElement) == null ? void 0 : h.tagName) === "IFRAME" && !(g != null && g.contains(n.document.activeElement)) && t(f);
|
|
252
280
|
}, 0);
|
|
253
281
|
}, { passive: !0 })
|
|
254
|
-
].filter(Boolean),
|
|
255
|
-
return
|
|
256
|
-
stop:
|
|
282
|
+
].filter(Boolean), S = () => w.forEach((f) => f());
|
|
283
|
+
return r ? {
|
|
284
|
+
stop: S,
|
|
257
285
|
cancel: () => {
|
|
258
|
-
|
|
286
|
+
l = !1;
|
|
259
287
|
},
|
|
260
|
-
trigger: (
|
|
261
|
-
|
|
288
|
+
trigger: (f) => {
|
|
289
|
+
l = !0, v(f), l = !1;
|
|
262
290
|
}
|
|
263
|
-
} :
|
|
291
|
+
} : S;
|
|
264
292
|
}
|
|
265
|
-
function
|
|
266
|
-
const e = y(!1), t =
|
|
267
|
-
return t &&
|
|
293
|
+
function He() {
|
|
294
|
+
const e = y(!1), t = j();
|
|
295
|
+
return t && re(() => {
|
|
268
296
|
e.value = !0;
|
|
269
297
|
}, t), e;
|
|
270
298
|
}
|
|
271
|
-
function
|
|
272
|
-
const t =
|
|
273
|
-
return
|
|
274
|
-
}
|
|
275
|
-
function
|
|
276
|
-
const { window:
|
|
277
|
-
let
|
|
278
|
-
const
|
|
279
|
-
|
|
280
|
-
},
|
|
281
|
-
const v = b(e),
|
|
282
|
-
return new Set(
|
|
283
|
-
}),
|
|
284
|
-
() =>
|
|
299
|
+
function G(e) {
|
|
300
|
+
const t = He();
|
|
301
|
+
return F(() => (t.value, !!e()));
|
|
302
|
+
}
|
|
303
|
+
function fe(e, t, o = {}) {
|
|
304
|
+
const { window: n = P, ...u } = o;
|
|
305
|
+
let i;
|
|
306
|
+
const c = G(() => n && "MutationObserver" in n), r = () => {
|
|
307
|
+
i && (i.disconnect(), i = void 0);
|
|
308
|
+
}, l = F(() => {
|
|
309
|
+
const v = b(e), p = R(v).map(T).filter(xe);
|
|
310
|
+
return new Set(p);
|
|
311
|
+
}), d = k(
|
|
312
|
+
() => l.value,
|
|
285
313
|
(v) => {
|
|
286
|
-
|
|
314
|
+
r(), c.value && v.size && (i = new MutationObserver(t), v.forEach((p) => i.observe(p, u)));
|
|
287
315
|
},
|
|
288
316
|
{ immediate: !0, flush: "post" }
|
|
289
|
-
),
|
|
290
|
-
|
|
317
|
+
), a = () => i == null ? void 0 : i.takeRecords(), s = () => {
|
|
318
|
+
d(), r();
|
|
291
319
|
};
|
|
292
|
-
return
|
|
293
|
-
isSupported:
|
|
320
|
+
return z(s), {
|
|
321
|
+
isSupported: c,
|
|
294
322
|
stop: s,
|
|
295
|
-
takeRecords:
|
|
296
|
-
};
|
|
297
|
-
}
|
|
298
|
-
function De(e, t, o = {}) {
|
|
299
|
-
const {
|
|
300
|
-
window: r = F,
|
|
301
|
-
document: f = r == null ? void 0 : r.document,
|
|
302
|
-
flush: u = "sync"
|
|
303
|
-
} = o;
|
|
304
|
-
if (!r || !f)
|
|
305
|
-
return O;
|
|
306
|
-
let l;
|
|
307
|
-
const n = (c) => {
|
|
308
|
-
l == null || l(), l = c;
|
|
309
|
-
}, i = le(() => {
|
|
310
|
-
const c = S(e);
|
|
311
|
-
if (c) {
|
|
312
|
-
const { stop: s } = Y(
|
|
313
|
-
f,
|
|
314
|
-
(v) => {
|
|
315
|
-
v.map((p) => [...p.removedNodes]).flat().some((p) => p === c || p.contains(c)) && t(v);
|
|
316
|
-
},
|
|
317
|
-
{
|
|
318
|
-
window: r,
|
|
319
|
-
childList: !0,
|
|
320
|
-
subtree: !0
|
|
321
|
-
}
|
|
322
|
-
);
|
|
323
|
-
n(s);
|
|
324
|
-
}
|
|
325
|
-
}, { flush: u }), a = () => {
|
|
326
|
-
i(), n();
|
|
323
|
+
takeRecords: a
|
|
327
324
|
};
|
|
328
|
-
return H(a), a;
|
|
329
325
|
}
|
|
330
|
-
const
|
|
331
|
-
function
|
|
332
|
-
const e =
|
|
326
|
+
const ze = Symbol("vueuse-ssr-width");
|
|
327
|
+
function Ne() {
|
|
328
|
+
const e = le() ? Ee(ze, null) : null;
|
|
333
329
|
return typeof e == "number" ? e : void 0;
|
|
334
330
|
}
|
|
335
|
-
function
|
|
336
|
-
const { window: o =
|
|
337
|
-
|
|
331
|
+
function Be(e, t = {}) {
|
|
332
|
+
const { window: o = P, ssrWidth: n = Ne() } = t, u = G(() => o && "matchMedia" in o && typeof o.matchMedia == "function"), i = y(typeof n == "number"), c = y(), r = y(!1), l = (d) => {
|
|
333
|
+
r.value = d.matches;
|
|
338
334
|
};
|
|
339
|
-
return
|
|
340
|
-
if (
|
|
341
|
-
|
|
342
|
-
const
|
|
343
|
-
|
|
344
|
-
const s =
|
|
345
|
-
let
|
|
346
|
-
return v &&
|
|
335
|
+
return Te(() => {
|
|
336
|
+
if (i.value) {
|
|
337
|
+
i.value = !u.value;
|
|
338
|
+
const d = b(e).split(",");
|
|
339
|
+
r.value = d.some((a) => {
|
|
340
|
+
const s = a.includes("not all"), v = a.match(/\(\s*min-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/), p = a.match(/\(\s*max-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/);
|
|
341
|
+
let w = !!(v || p);
|
|
342
|
+
return v && w && (w = n >= te(v[1])), p && w && (w = n <= te(p[1])), s ? !w : w;
|
|
347
343
|
});
|
|
348
344
|
return;
|
|
349
345
|
}
|
|
350
|
-
|
|
351
|
-
}), M(
|
|
352
|
-
}
|
|
353
|
-
function
|
|
354
|
-
const { window:
|
|
355
|
-
let
|
|
356
|
-
const
|
|
357
|
-
|
|
358
|
-
},
|
|
346
|
+
u.value && (c.value = o.matchMedia(b(e)), r.value = c.value.matches);
|
|
347
|
+
}), M(c, "change", l, { passive: !0 }), F(() => r.value);
|
|
348
|
+
}
|
|
349
|
+
function de(e, t, o = {}) {
|
|
350
|
+
const { window: n = P, ...u } = o;
|
|
351
|
+
let i;
|
|
352
|
+
const c = G(() => n && "ResizeObserver" in n), r = () => {
|
|
353
|
+
i && (i.disconnect(), i = void 0);
|
|
354
|
+
}, l = F(() => {
|
|
359
355
|
const s = b(e);
|
|
360
|
-
return Array.isArray(s) ? s.map((v) =>
|
|
361
|
-
}),
|
|
362
|
-
|
|
356
|
+
return Array.isArray(s) ? s.map((v) => T(v)) : [T(s)];
|
|
357
|
+
}), d = k(
|
|
358
|
+
l,
|
|
363
359
|
(s) => {
|
|
364
|
-
if (
|
|
365
|
-
|
|
360
|
+
if (r(), c.value && n) {
|
|
361
|
+
i = new ResizeObserver(t);
|
|
366
362
|
for (const v of s)
|
|
367
|
-
v &&
|
|
363
|
+
v && i.observe(v, u);
|
|
368
364
|
}
|
|
369
365
|
},
|
|
370
366
|
{ immediate: !0, flush: "post" }
|
|
371
|
-
),
|
|
372
|
-
|
|
367
|
+
), a = () => {
|
|
368
|
+
r(), d();
|
|
373
369
|
};
|
|
374
|
-
return
|
|
375
|
-
isSupported:
|
|
376
|
-
stop:
|
|
370
|
+
return z(a), {
|
|
371
|
+
isSupported: c,
|
|
372
|
+
stop: a
|
|
377
373
|
};
|
|
378
374
|
}
|
|
379
|
-
function
|
|
375
|
+
function qe(e, t = {}) {
|
|
380
376
|
const {
|
|
381
377
|
reset: o = !0,
|
|
382
|
-
windowResize:
|
|
383
|
-
windowScroll:
|
|
384
|
-
immediate:
|
|
385
|
-
updateTiming:
|
|
386
|
-
} = t,
|
|
387
|
-
function
|
|
388
|
-
const h =
|
|
378
|
+
windowResize: n = !0,
|
|
379
|
+
windowScroll: u = !0,
|
|
380
|
+
immediate: i = !0,
|
|
381
|
+
updateTiming: c = "sync"
|
|
382
|
+
} = t, r = y(0), l = y(0), d = y(0), a = y(0), s = y(0), v = y(0), p = y(0), w = y(0);
|
|
383
|
+
function S() {
|
|
384
|
+
const h = T(e);
|
|
389
385
|
if (!h) {
|
|
390
|
-
o && (
|
|
386
|
+
o && (r.value = 0, l.value = 0, d.value = 0, a.value = 0, s.value = 0, v.value = 0, p.value = 0, w.value = 0);
|
|
391
387
|
return;
|
|
392
388
|
}
|
|
393
389
|
const g = h.getBoundingClientRect();
|
|
394
|
-
|
|
390
|
+
r.value = g.height, l.value = g.bottom, d.value = g.left, a.value = g.right, s.value = g.top, v.value = g.width, p.value = g.x, w.value = g.y;
|
|
395
391
|
}
|
|
396
|
-
function
|
|
397
|
-
|
|
392
|
+
function f() {
|
|
393
|
+
c === "sync" ? S() : c === "next-frame" && requestAnimationFrame(() => S());
|
|
398
394
|
}
|
|
399
|
-
return
|
|
395
|
+
return de(e, f), k(() => T(e), (h) => !h && f()), fe(e, f, {
|
|
400
396
|
attributeFilter: ["style", "class"]
|
|
401
|
-
}),
|
|
402
|
-
|
|
397
|
+
}), u && M("scroll", f, { capture: !0, passive: !0 }), n && M("resize", f, { passive: !0 }), N(() => {
|
|
398
|
+
i && f();
|
|
403
399
|
}), {
|
|
404
|
-
height:
|
|
405
|
-
bottom:
|
|
406
|
-
left:
|
|
407
|
-
right:
|
|
400
|
+
height: r,
|
|
401
|
+
bottom: l,
|
|
402
|
+
left: d,
|
|
403
|
+
right: a,
|
|
408
404
|
top: s,
|
|
409
405
|
width: v,
|
|
410
|
-
x:
|
|
411
|
-
y:
|
|
412
|
-
update:
|
|
406
|
+
x: p,
|
|
407
|
+
y: w,
|
|
408
|
+
update: f
|
|
413
409
|
};
|
|
414
410
|
}
|
|
415
|
-
function
|
|
416
|
-
const {
|
|
417
|
-
delayEnter: o = 0,
|
|
418
|
-
delayLeave: r = 0,
|
|
419
|
-
triggerOnRemoval: f = !1,
|
|
420
|
-
window: u = F
|
|
421
|
-
} = t, l = y(!1);
|
|
422
|
-
let n;
|
|
423
|
-
const i = (a) => {
|
|
424
|
-
const c = a ? o : r;
|
|
425
|
-
n && (clearTimeout(n), n = void 0), c ? n = setTimeout(() => l.value = a, c) : l.value = a;
|
|
426
|
-
};
|
|
427
|
-
return u && (M(e, "mouseenter", () => i(!0), { passive: !0 }), M(e, "mouseleave", () => i(!1), { passive: !0 }), f && De(
|
|
428
|
-
I(() => S(e)),
|
|
429
|
-
() => i(!1)
|
|
430
|
-
)), l;
|
|
431
|
-
}
|
|
432
|
-
function Ye(e, t = { width: 0, height: 0 }, o = {}) {
|
|
433
|
-
const { window: r = F, box: f = "content-box" } = o, u = I(() => {
|
|
411
|
+
function Je(e, t = { width: 0, height: 0 }, o = {}) {
|
|
412
|
+
const { window: n = P, box: u = "content-box" } = o, i = F(() => {
|
|
434
413
|
var s, v;
|
|
435
|
-
return (v = (s =
|
|
436
|
-
}),
|
|
414
|
+
return (v = (s = T(e)) == null ? void 0 : s.namespaceURI) == null ? void 0 : v.includes("svg");
|
|
415
|
+
}), c = y(t.width), r = y(t.height), { stop: l } = de(
|
|
437
416
|
e,
|
|
438
417
|
([s]) => {
|
|
439
|
-
const v =
|
|
440
|
-
if (
|
|
441
|
-
const
|
|
442
|
-
if (
|
|
443
|
-
const
|
|
444
|
-
|
|
418
|
+
const v = u === "border-box" ? s.borderBoxSize : u === "content-box" ? s.contentBoxSize : s.devicePixelContentBoxSize;
|
|
419
|
+
if (n && i.value) {
|
|
420
|
+
const p = T(e);
|
|
421
|
+
if (p) {
|
|
422
|
+
const w = p.getBoundingClientRect();
|
|
423
|
+
c.value = w.width, r.value = w.height;
|
|
445
424
|
}
|
|
446
425
|
} else if (v) {
|
|
447
|
-
const
|
|
448
|
-
|
|
426
|
+
const p = R(v);
|
|
427
|
+
c.value = p.reduce((w, { inlineSize: S }) => w + S, 0), r.value = p.reduce((w, { blockSize: S }) => w + S, 0);
|
|
449
428
|
} else
|
|
450
|
-
|
|
429
|
+
c.value = s.contentRect.width, r.value = s.contentRect.height;
|
|
451
430
|
},
|
|
452
431
|
o
|
|
453
432
|
);
|
|
454
|
-
|
|
455
|
-
const s =
|
|
456
|
-
s && (
|
|
433
|
+
N(() => {
|
|
434
|
+
const s = T(e);
|
|
435
|
+
s && (c.value = "offsetWidth" in s ? s.offsetWidth : t.width, r.value = "offsetHeight" in s ? s.offsetHeight : t.height);
|
|
457
436
|
});
|
|
458
|
-
const
|
|
459
|
-
() =>
|
|
437
|
+
const d = k(
|
|
438
|
+
() => T(e),
|
|
460
439
|
(s) => {
|
|
461
|
-
|
|
440
|
+
c.value = s ? t.width : 0, r.value = s ? t.height : 0;
|
|
462
441
|
}
|
|
463
442
|
);
|
|
464
|
-
function
|
|
465
|
-
|
|
443
|
+
function a() {
|
|
444
|
+
l(), d();
|
|
466
445
|
}
|
|
467
446
|
return {
|
|
468
|
-
width:
|
|
469
|
-
height:
|
|
470
|
-
stop:
|
|
447
|
+
width: c,
|
|
448
|
+
height: r,
|
|
449
|
+
stop: a
|
|
471
450
|
};
|
|
472
451
|
}
|
|
473
452
|
const je = {
|
|
@@ -476,7 +455,7 @@ const je = {
|
|
|
476
455
|
reset: !1,
|
|
477
456
|
directory: !1
|
|
478
457
|
};
|
|
479
|
-
function
|
|
458
|
+
function $e(e) {
|
|
480
459
|
if (!e)
|
|
481
460
|
return null;
|
|
482
461
|
if (e instanceof FileList)
|
|
@@ -486,144 +465,144 @@ function Ve(e) {
|
|
|
486
465
|
t.items.add(o);
|
|
487
466
|
return t.files;
|
|
488
467
|
}
|
|
489
|
-
function
|
|
468
|
+
function Ke(e = {}) {
|
|
490
469
|
const {
|
|
491
|
-
document: t =
|
|
492
|
-
} = e, o =
|
|
493
|
-
let
|
|
494
|
-
t && (
|
|
495
|
-
const s =
|
|
496
|
-
o.value = s.files,
|
|
497
|
-
},
|
|
498
|
-
|
|
470
|
+
document: t = Ve
|
|
471
|
+
} = e, o = se($e(e.initialFiles)), { on: n, trigger: u } = ee(), { on: i, trigger: c } = ee();
|
|
472
|
+
let r;
|
|
473
|
+
t && (r = T(e.input) || t.createElement("input"), r.type = "file", r.onchange = (a) => {
|
|
474
|
+
const s = a.target;
|
|
475
|
+
o.value = s.files, u(o.value);
|
|
476
|
+
}, r.oncancel = () => {
|
|
477
|
+
c();
|
|
499
478
|
});
|
|
500
|
-
const
|
|
501
|
-
o.value = null,
|
|
502
|
-
},
|
|
503
|
-
if (!
|
|
479
|
+
const l = () => {
|
|
480
|
+
o.value = null, r && r.value && (r.value = "", u(null));
|
|
481
|
+
}, d = (a) => {
|
|
482
|
+
if (!r)
|
|
504
483
|
return;
|
|
505
484
|
const s = {
|
|
506
485
|
...je,
|
|
507
486
|
...e,
|
|
508
|
-
...
|
|
487
|
+
...a
|
|
509
488
|
};
|
|
510
|
-
|
|
489
|
+
r.multiple = s.multiple, r.accept = s.accept, r.webkitdirectory = s.directory, Ie(s, "capture") && (r.capture = s.capture), s.reset && l(), r.click();
|
|
511
490
|
};
|
|
512
491
|
return {
|
|
513
|
-
files:
|
|
514
|
-
open:
|
|
515
|
-
reset:
|
|
516
|
-
onCancel:
|
|
517
|
-
onChange:
|
|
492
|
+
files: Oe(o),
|
|
493
|
+
open: d,
|
|
494
|
+
reset: l,
|
|
495
|
+
onCancel: i,
|
|
496
|
+
onChange: n
|
|
518
497
|
};
|
|
519
498
|
}
|
|
520
|
-
const
|
|
521
|
-
function
|
|
499
|
+
const oe = 1;
|
|
500
|
+
function Ze(e, t = {}) {
|
|
522
501
|
const {
|
|
523
502
|
throttle: o = 0,
|
|
524
|
-
idle:
|
|
525
|
-
onStop:
|
|
526
|
-
onScroll:
|
|
527
|
-
offset:
|
|
503
|
+
idle: n = 200,
|
|
504
|
+
onStop: u = W,
|
|
505
|
+
onScroll: i = W,
|
|
506
|
+
offset: c = {
|
|
528
507
|
left: 0,
|
|
529
508
|
right: 0,
|
|
530
509
|
top: 0,
|
|
531
510
|
bottom: 0
|
|
532
511
|
},
|
|
533
|
-
observe:
|
|
512
|
+
observe: r = {
|
|
534
513
|
mutation: !1
|
|
535
514
|
},
|
|
536
|
-
eventListenerOptions:
|
|
515
|
+
eventListenerOptions: l = {
|
|
537
516
|
capture: !1,
|
|
538
517
|
passive: !0
|
|
539
518
|
},
|
|
540
|
-
behavior:
|
|
541
|
-
window:
|
|
542
|
-
onError: s = (
|
|
543
|
-
console.error(
|
|
519
|
+
behavior: d = "auto",
|
|
520
|
+
window: a = P,
|
|
521
|
+
onError: s = (m) => {
|
|
522
|
+
console.error(m);
|
|
544
523
|
}
|
|
545
|
-
} = t, v = typeof
|
|
546
|
-
mutation:
|
|
547
|
-
} :
|
|
524
|
+
} = t, v = typeof r == "boolean" ? {
|
|
525
|
+
mutation: r
|
|
526
|
+
} : r, p = y(0), w = y(0), S = F({
|
|
548
527
|
get() {
|
|
549
|
-
return
|
|
528
|
+
return p.value;
|
|
550
529
|
},
|
|
551
|
-
set(
|
|
552
|
-
h(
|
|
530
|
+
set(m) {
|
|
531
|
+
h(m, void 0);
|
|
553
532
|
}
|
|
554
|
-
}),
|
|
533
|
+
}), f = F({
|
|
555
534
|
get() {
|
|
556
|
-
return
|
|
535
|
+
return w.value;
|
|
557
536
|
},
|
|
558
|
-
set(
|
|
559
|
-
h(void 0,
|
|
537
|
+
set(m) {
|
|
538
|
+
h(void 0, m);
|
|
560
539
|
}
|
|
561
540
|
});
|
|
562
|
-
function h(
|
|
563
|
-
var x, D,
|
|
564
|
-
if (!
|
|
541
|
+
function h(m, _) {
|
|
542
|
+
var x, D, C, H;
|
|
543
|
+
if (!a)
|
|
565
544
|
return;
|
|
566
|
-
const
|
|
567
|
-
if (!
|
|
545
|
+
const I = b(e);
|
|
546
|
+
if (!I)
|
|
568
547
|
return;
|
|
569
|
-
(
|
|
570
|
-
top: (x = b(_)) != null ? x :
|
|
571
|
-
left: (D = b(
|
|
572
|
-
behavior: b(
|
|
548
|
+
(C = I instanceof Document ? a.document.body : I) == null || C.scrollTo({
|
|
549
|
+
top: (x = b(_)) != null ? x : f.value,
|
|
550
|
+
left: (D = b(m)) != null ? D : S.value,
|
|
551
|
+
behavior: b(d)
|
|
573
552
|
});
|
|
574
|
-
const
|
|
575
|
-
|
|
553
|
+
const A = ((H = I == null ? void 0 : I.document) == null ? void 0 : H.documentElement) || (I == null ? void 0 : I.documentElement) || I;
|
|
554
|
+
S != null && (p.value = A.scrollLeft), f != null && (w.value = A.scrollTop);
|
|
576
555
|
}
|
|
577
|
-
const g = y(!1),
|
|
556
|
+
const g = y(!1), O = Z({
|
|
578
557
|
left: !0,
|
|
579
558
|
right: !1,
|
|
580
559
|
top: !0,
|
|
581
560
|
bottom: !1
|
|
582
|
-
}),
|
|
561
|
+
}), E = Z({
|
|
583
562
|
left: !1,
|
|
584
563
|
right: !1,
|
|
585
564
|
top: !1,
|
|
586
565
|
bottom: !1
|
|
587
|
-
}),
|
|
588
|
-
g.value && (g.value = !1,
|
|
589
|
-
},
|
|
566
|
+
}), X = (m) => {
|
|
567
|
+
g.value && (g.value = !1, E.left = !1, E.right = !1, E.top = !1, E.bottom = !1, u(m));
|
|
568
|
+
}, pe = ke(X, o + n), V = (m) => {
|
|
590
569
|
var _;
|
|
591
|
-
if (!
|
|
570
|
+
if (!a)
|
|
592
571
|
return;
|
|
593
|
-
const x = ((_ =
|
|
594
|
-
|
|
595
|
-
const
|
|
596
|
-
D === "flex" &&
|
|
597
|
-
let
|
|
598
|
-
|
|
599
|
-
const
|
|
600
|
-
D === "flex" &&
|
|
601
|
-
},
|
|
572
|
+
const x = ((_ = m == null ? void 0 : m.document) == null ? void 0 : _.documentElement) || (m == null ? void 0 : m.documentElement) || T(m), { display: D, flexDirection: C, direction: H } = getComputedStyle(x), I = H === "rtl" ? -1 : 1, A = x.scrollLeft;
|
|
573
|
+
E.left = A < p.value, E.right = A > p.value;
|
|
574
|
+
const U = Math.abs(A * I) <= (c.left || 0), q = Math.abs(A * I) + x.clientWidth >= x.scrollWidth - (c.right || 0) - oe;
|
|
575
|
+
D === "flex" && C === "row-reverse" ? (O.left = q, O.right = U) : (O.left = U, O.right = q), p.value = A;
|
|
576
|
+
let L = x.scrollTop;
|
|
577
|
+
m === a.document && !L && (L = a.document.body.scrollTop), E.top = L < w.value, E.bottom = L > w.value;
|
|
578
|
+
const J = Math.abs(L) <= (c.top || 0), K = Math.abs(L) + x.clientHeight >= x.scrollHeight - (c.bottom || 0) - oe;
|
|
579
|
+
D === "flex" && C === "column-reverse" ? (O.top = K, O.bottom = J) : (O.top = J, O.bottom = K), w.value = L;
|
|
580
|
+
}, Q = (m) => {
|
|
602
581
|
var _;
|
|
603
|
-
if (!
|
|
582
|
+
if (!a)
|
|
604
583
|
return;
|
|
605
|
-
const x = (_ =
|
|
606
|
-
|
|
584
|
+
const x = (_ = m.target.documentElement) != null ? _ : m.target;
|
|
585
|
+
V(x), g.value = !0, pe(m), i(m);
|
|
607
586
|
};
|
|
608
587
|
return M(
|
|
609
588
|
e,
|
|
610
589
|
"scroll",
|
|
611
|
-
o ?
|
|
612
|
-
|
|
613
|
-
),
|
|
590
|
+
o ? De(Q, o, !0, !1) : Q,
|
|
591
|
+
l
|
|
592
|
+
), N(() => {
|
|
614
593
|
try {
|
|
615
|
-
const
|
|
616
|
-
if (!
|
|
594
|
+
const m = b(e);
|
|
595
|
+
if (!m)
|
|
617
596
|
return;
|
|
618
|
-
|
|
619
|
-
} catch (
|
|
620
|
-
s(
|
|
597
|
+
V(m);
|
|
598
|
+
} catch (m) {
|
|
599
|
+
s(m);
|
|
621
600
|
}
|
|
622
|
-
}), v != null && v.mutation && e != null && e !==
|
|
601
|
+
}), v != null && v.mutation && e != null && e !== a && e !== document && fe(
|
|
623
602
|
e,
|
|
624
603
|
() => {
|
|
625
|
-
const
|
|
626
|
-
|
|
604
|
+
const m = b(e);
|
|
605
|
+
m && V(m);
|
|
627
606
|
},
|
|
628
607
|
{
|
|
629
608
|
attributes: !0,
|
|
@@ -633,56 +612,85 @@ function Xe(e, t = {}) {
|
|
|
633
612
|
), M(
|
|
634
613
|
e,
|
|
635
614
|
"scrollend",
|
|
636
|
-
|
|
637
|
-
|
|
615
|
+
X,
|
|
616
|
+
l
|
|
638
617
|
), {
|
|
639
|
-
x:
|
|
640
|
-
y:
|
|
618
|
+
x: S,
|
|
619
|
+
y: f,
|
|
641
620
|
isScrolling: g,
|
|
642
|
-
arrivedState:
|
|
643
|
-
directions:
|
|
621
|
+
arrivedState: O,
|
|
622
|
+
directions: E,
|
|
644
623
|
measure() {
|
|
645
|
-
const
|
|
646
|
-
|
|
624
|
+
const m = b(e);
|
|
625
|
+
a && m && V(m);
|
|
647
626
|
}
|
|
648
627
|
};
|
|
649
628
|
}
|
|
650
|
-
|
|
629
|
+
const ve = {
|
|
630
|
+
x: 0,
|
|
631
|
+
y: 0,
|
|
632
|
+
pointerId: 0,
|
|
633
|
+
pressure: 0,
|
|
634
|
+
tiltX: 0,
|
|
635
|
+
tiltY: 0,
|
|
636
|
+
width: 0,
|
|
637
|
+
height: 0,
|
|
638
|
+
twist: 0,
|
|
639
|
+
pointerType: null
|
|
640
|
+
}, Ye = /* @__PURE__ */ Object.keys(ve);
|
|
641
|
+
function et(e = {}) {
|
|
642
|
+
const {
|
|
643
|
+
target: t = P
|
|
644
|
+
} = e, o = y(!1), n = se(e.initialValue || {});
|
|
645
|
+
Object.assign(n.value, ve, n.value);
|
|
646
|
+
const u = (i) => {
|
|
647
|
+
o.value = !0, !(e.pointerTypes && !e.pointerTypes.includes(i.pointerType)) && (n.value = _e(i, Ye, !1));
|
|
648
|
+
};
|
|
649
|
+
if (t) {
|
|
650
|
+
const i = { passive: !0 };
|
|
651
|
+
M(t, ["pointerdown", "pointermove", "pointerup"], u, i), M(t, "pointerleave", () => o.value = !1, i);
|
|
652
|
+
}
|
|
653
|
+
return {
|
|
654
|
+
...Ce(n),
|
|
655
|
+
isInside: o
|
|
656
|
+
};
|
|
657
|
+
}
|
|
658
|
+
function tt(e = {}) {
|
|
651
659
|
const {
|
|
652
|
-
window: t =
|
|
660
|
+
window: t = P,
|
|
653
661
|
initialWidth: o = Number.POSITIVE_INFINITY,
|
|
654
|
-
initialHeight:
|
|
655
|
-
listenOrientation:
|
|
656
|
-
includeScrollbar:
|
|
657
|
-
type:
|
|
658
|
-
} = e,
|
|
662
|
+
initialHeight: n = Number.POSITIVE_INFINITY,
|
|
663
|
+
listenOrientation: u = !0,
|
|
664
|
+
includeScrollbar: i = !0,
|
|
665
|
+
type: c = "inner"
|
|
666
|
+
} = e, r = y(o), l = y(n), d = () => {
|
|
659
667
|
if (t)
|
|
660
|
-
if (
|
|
661
|
-
|
|
662
|
-
else if (
|
|
663
|
-
const { width: s, height: v, scale:
|
|
664
|
-
|
|
665
|
-
} else
|
|
668
|
+
if (c === "outer")
|
|
669
|
+
r.value = t.outerWidth, l.value = t.outerHeight;
|
|
670
|
+
else if (c === "visual" && t.visualViewport) {
|
|
671
|
+
const { width: s, height: v, scale: p } = t.visualViewport;
|
|
672
|
+
r.value = Math.round(s * p), l.value = Math.round(v * p);
|
|
673
|
+
} else i ? (r.value = t.innerWidth, l.value = t.innerHeight) : (r.value = t.document.documentElement.clientWidth, l.value = t.document.documentElement.clientHeight);
|
|
666
674
|
};
|
|
667
|
-
|
|
668
|
-
const
|
|
669
|
-
if (M("resize",
|
|
670
|
-
const s =
|
|
671
|
-
|
|
675
|
+
d(), N(d);
|
|
676
|
+
const a = { passive: !0 };
|
|
677
|
+
if (M("resize", d, a), t && c === "visual" && t.visualViewport && M(t.visualViewport, "resize", d, a), u) {
|
|
678
|
+
const s = Be("(orientation: portrait)");
|
|
679
|
+
k(s, () => d());
|
|
672
680
|
}
|
|
673
|
-
return { width:
|
|
681
|
+
return { width: r, height: l };
|
|
674
682
|
}
|
|
675
683
|
export {
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
684
|
+
qe as a,
|
|
685
|
+
T as b,
|
|
686
|
+
tt as c,
|
|
687
|
+
Ke as d,
|
|
688
|
+
Je as e,
|
|
689
|
+
Xe as f,
|
|
682
690
|
M as g,
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
691
|
+
Be as h,
|
|
692
|
+
et as i,
|
|
693
|
+
Ue as o,
|
|
694
|
+
Ze as u,
|
|
695
|
+
Qe as w
|
|
688
696
|
};
|