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