@squirrel-cloud/ui-vue 0.0.9 → 0.1.1
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/README.md +16 -1
- package/dist/components/index.d.ts +2 -1
- package/dist/components/popover/SqPopover.d.ts +39 -0
- package/dist/props/index.d.ts +2 -1
- package/dist/props/popover/SqPopover.d.ts +38 -0
- package/dist/squirrel-cloud-ui-vue.js +1174 -100
- package/dist/squirrel-cloud-ui-vue.umd.cjs +1 -1
- package/dist/style.css +1 -1
- package/package.json +2 -1
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import { createElementBlock as
|
|
2
|
-
const
|
|
3
|
-
const
|
|
4
|
-
for (const [
|
|
5
|
-
|
|
6
|
-
return
|
|
7
|
-
},
|
|
1
|
+
import { createElementBlock as N, openBlock as C, createElementVNode as nt, defineComponent as J, computed as b, normalizeClass as Q, createVNode as Xt, unref as it, withCtx as ut, createBlock as Y, createCommentVNode as yt, renderSlot as D, resolveDynamicComponent as xt, mergeModels as bt, useSlots as re, useModel as jt, useTemplateRef as St, withDirectives as Ut, vModelText as le, ref as tt, shallowRef as ce, watch as vt, getCurrentScope as ae, onScopeDispose as ue, shallowReadonly as X, onBeforeUnmount as fe, Fragment as de, withModifiers as $t, Teleport as pe, Transition as me, normalizeStyle as Yt, vShow as he } from "vue";
|
|
2
|
+
const ge = (t, e) => {
|
|
3
|
+
const n = t.__vccOpts || t;
|
|
4
|
+
for (const [o, i] of e)
|
|
5
|
+
n[o] = i;
|
|
6
|
+
return n;
|
|
7
|
+
}, ve = {}, we = {
|
|
8
8
|
class: "sq-icon is-loading",
|
|
9
9
|
"data-icon": "loading"
|
|
10
10
|
};
|
|
11
|
-
function
|
|
12
|
-
return
|
|
13
|
-
|
|
11
|
+
function ye(t, e) {
|
|
12
|
+
return C(), N("span", we, e[0] || (e[0] = [
|
|
13
|
+
nt("svg", {
|
|
14
14
|
viewBox: "0 0 48 48",
|
|
15
15
|
version: "1.1",
|
|
16
16
|
xmlns: "http://www.w3.org/2000/svg"
|
|
17
17
|
}, [
|
|
18
|
-
|
|
18
|
+
nt("circle", {
|
|
19
19
|
cx: "24",
|
|
20
20
|
cy: "24",
|
|
21
21
|
r: "20"
|
|
@@ -23,7 +23,7 @@ function P(i, e) {
|
|
|
23
23
|
], -1)
|
|
24
24
|
]));
|
|
25
25
|
}
|
|
26
|
-
const
|
|
26
|
+
const xe = /* @__PURE__ */ ge(ve, [["render", ye]]), be = ["disabled"], Sn = /* @__PURE__ */ J({
|
|
27
27
|
__name: "SqButton",
|
|
28
28
|
props: {
|
|
29
29
|
type: {},
|
|
@@ -34,35 +34,35 @@ const U = /* @__PURE__ */ E(F, [["render", P]]), j = ["disabled"], K = /* @__PUR
|
|
|
34
34
|
disabled: { type: Boolean },
|
|
35
35
|
size: { default: "md" }
|
|
36
36
|
},
|
|
37
|
-
setup(
|
|
38
|
-
const e =
|
|
37
|
+
setup(t) {
|
|
38
|
+
const e = t, n = b(() => {
|
|
39
39
|
const s = [];
|
|
40
40
|
return e.size !== "md" && s.push(`sq-button--${e.size}`), e.type && s.push(`is-${e.type}`), e.round && s.push("is-round"), e.text && s.push("is-text"), s;
|
|
41
|
-
}),
|
|
42
|
-
return (s,
|
|
43
|
-
class:
|
|
44
|
-
disabled:
|
|
41
|
+
}), o = b(() => e.loading ? xe : e.icon), i = b(() => e.loading || e.disabled);
|
|
42
|
+
return (s, r) => (C(), N("button", {
|
|
43
|
+
class: Q(["sq-button", n.value]),
|
|
44
|
+
disabled: i.value
|
|
45
45
|
}, [
|
|
46
|
-
|
|
46
|
+
Xt(it(Bt), {
|
|
47
47
|
size: e.size
|
|
48
48
|
}, {
|
|
49
|
-
default:
|
|
50
|
-
|
|
51
|
-
|
|
49
|
+
default: ut(() => [
|
|
50
|
+
o.value ? (C(), Y(xt(o.value), { key: 0 })) : yt("", !0),
|
|
51
|
+
D(s.$slots, "default")
|
|
52
52
|
]),
|
|
53
53
|
_: 3
|
|
54
54
|
}, 8, ["size"])
|
|
55
|
-
], 10,
|
|
55
|
+
], 10, be));
|
|
56
56
|
}
|
|
57
|
-
}),
|
|
57
|
+
}), Se = {
|
|
58
58
|
key: 0,
|
|
59
59
|
class: "sq-input-prefix"
|
|
60
|
-
},
|
|
60
|
+
}, Re = ["disabled", "readonly"], Ce = {
|
|
61
61
|
key: 1,
|
|
62
62
|
class: "sq-input-suffix"
|
|
63
|
-
},
|
|
63
|
+
}, Rn = /* @__PURE__ */ J({
|
|
64
64
|
__name: "SqInput",
|
|
65
|
-
props: /* @__PURE__ */
|
|
65
|
+
props: /* @__PURE__ */ bt({
|
|
66
66
|
status: {},
|
|
67
67
|
round: { type: Boolean },
|
|
68
68
|
showStatusIcon: { type: Boolean },
|
|
@@ -75,53 +75,1126 @@ const U = /* @__PURE__ */ E(F, [["render", P]]), j = ["disabled"], K = /* @__PUR
|
|
|
75
75
|
value: { type: String, default: "" },
|
|
76
76
|
valueModifiers: {}
|
|
77
77
|
}),
|
|
78
|
-
emits: /* @__PURE__ */
|
|
79
|
-
setup(
|
|
80
|
-
const
|
|
81
|
-
const
|
|
82
|
-
return s.size !== "md" &&
|
|
83
|
-
}),
|
|
84
|
-
const
|
|
85
|
-
return
|
|
86
|
-
}),
|
|
87
|
-
function
|
|
88
|
-
var
|
|
89
|
-
(
|
|
90
|
-
}
|
|
91
|
-
function
|
|
92
|
-
var
|
|
93
|
-
(
|
|
94
|
-
}
|
|
95
|
-
return e({ focus:
|
|
96
|
-
class:
|
|
78
|
+
emits: /* @__PURE__ */ bt(["focus", "blur", "input", "change"], ["update:value"]),
|
|
79
|
+
setup(t, { expose: e, emit: n }) {
|
|
80
|
+
const o = re(), i = n, s = t, r = jt(t, "value"), l = St("inputRef"), a = b(() => {
|
|
81
|
+
const p = [];
|
|
82
|
+
return s.size !== "md" && p.push(`sq-input--${s.size}`), s.status && p.push(`is-${s.status}`), s.round && p.push("is-round"), s.disabled && p.push("is-disabled"), p;
|
|
83
|
+
}), c = b(() => o.prefix || s.prefixIcon), u = b(() => {
|
|
84
|
+
const p = s.showStatusIcon && s.status;
|
|
85
|
+
return o.suffix || p || s.suffixIcon;
|
|
86
|
+
}), f = b(() => s.suffixIcon);
|
|
87
|
+
function m() {
|
|
88
|
+
var p;
|
|
89
|
+
(p = l.value) == null || p.focus();
|
|
90
|
+
}
|
|
91
|
+
function d() {
|
|
92
|
+
var p;
|
|
93
|
+
(p = l.value) == null || p.blur();
|
|
94
|
+
}
|
|
95
|
+
return e({ focus: m, blur: d }), (p, h) => (C(), N("section", {
|
|
96
|
+
class: Q(["sq-input", a.value])
|
|
97
97
|
}, [
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
(
|
|
98
|
+
c.value ? (C(), N("span", Se, [
|
|
99
|
+
D(p.$slots, "prefix", {}, () => [
|
|
100
|
+
(C(), Y(xt(s.prefixIcon)))
|
|
101
101
|
])
|
|
102
|
-
])) :
|
|
103
|
-
|
|
104
|
-
"onUpdate:modelValue":
|
|
102
|
+
])) : yt("", !0),
|
|
103
|
+
Ut(nt("input", {
|
|
104
|
+
"onUpdate:modelValue": h[0] || (h[0] = (g) => r.value = g),
|
|
105
105
|
class: "sq-input-inner",
|
|
106
106
|
disabled: s.disabled,
|
|
107
107
|
readonly: s.readonly,
|
|
108
108
|
ref_key: "inputRef",
|
|
109
|
-
ref:
|
|
110
|
-
onFocus:
|
|
111
|
-
onBlur:
|
|
112
|
-
onInput:
|
|
113
|
-
onChange:
|
|
114
|
-
}, null, 40,
|
|
115
|
-
[
|
|
109
|
+
ref: l,
|
|
110
|
+
onFocus: h[1] || (h[1] = (g) => i("focus", g)),
|
|
111
|
+
onBlur: h[2] || (h[2] = (g) => i("blur", g)),
|
|
112
|
+
onInput: h[3] || (h[3] = (g) => i("input", g)),
|
|
113
|
+
onChange: h[4] || (h[4] = (g) => i("change", g))
|
|
114
|
+
}, null, 40, Re), [
|
|
115
|
+
[le, r.value]
|
|
116
116
|
]),
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
(
|
|
117
|
+
u.value ? (C(), N("span", Ce, [
|
|
118
|
+
D(p.$slots, "suffix", {}, () => [
|
|
119
|
+
(C(), Y(xt(f.value)))
|
|
120
120
|
])
|
|
121
|
-
])) :
|
|
121
|
+
])) : yt("", !0)
|
|
122
122
|
], 2));
|
|
123
123
|
}
|
|
124
|
-
}),
|
|
124
|
+
}), Rt = Math.min, j = Math.max, lt = Math.round, rt = Math.floor, k = (t) => ({
|
|
125
|
+
x: t,
|
|
126
|
+
y: t
|
|
127
|
+
}), Ae = {
|
|
128
|
+
left: "right",
|
|
129
|
+
right: "left",
|
|
130
|
+
bottom: "top",
|
|
131
|
+
top: "bottom"
|
|
132
|
+
}, Le = {
|
|
133
|
+
start: "end",
|
|
134
|
+
end: "start"
|
|
135
|
+
};
|
|
136
|
+
function Lt(t, e) {
|
|
137
|
+
return typeof t == "function" ? t(e) : t;
|
|
138
|
+
}
|
|
139
|
+
function K(t) {
|
|
140
|
+
return t.split("-")[0];
|
|
141
|
+
}
|
|
142
|
+
function ft(t) {
|
|
143
|
+
return t.split("-")[1];
|
|
144
|
+
}
|
|
145
|
+
function Oe(t) {
|
|
146
|
+
return t === "x" ? "y" : "x";
|
|
147
|
+
}
|
|
148
|
+
function Kt(t) {
|
|
149
|
+
return t === "y" ? "height" : "width";
|
|
150
|
+
}
|
|
151
|
+
const Te = /* @__PURE__ */ new Set(["top", "bottom"]);
|
|
152
|
+
function q(t) {
|
|
153
|
+
return Te.has(K(t)) ? "y" : "x";
|
|
154
|
+
}
|
|
155
|
+
function Gt(t) {
|
|
156
|
+
return Oe(q(t));
|
|
157
|
+
}
|
|
158
|
+
function Ee(t, e, n) {
|
|
159
|
+
n === void 0 && (n = !1);
|
|
160
|
+
const o = ft(t), i = Gt(t), s = Kt(i);
|
|
161
|
+
let r = i === "x" ? o === (n ? "end" : "start") ? "right" : "left" : o === "start" ? "bottom" : "top";
|
|
162
|
+
return e.reference[s] > e.floating[s] && (r = ct(r)), [r, ct(r)];
|
|
163
|
+
}
|
|
164
|
+
function ke(t) {
|
|
165
|
+
const e = ct(t);
|
|
166
|
+
return [Ct(t), e, Ct(e)];
|
|
167
|
+
}
|
|
168
|
+
function Ct(t) {
|
|
169
|
+
return t.replace(/start|end/g, (e) => Le[e]);
|
|
170
|
+
}
|
|
171
|
+
const zt = ["left", "right"], Mt = ["right", "left"], Be = ["top", "bottom"], _e = ["bottom", "top"];
|
|
172
|
+
function Pe(t, e, n) {
|
|
173
|
+
switch (t) {
|
|
174
|
+
case "top":
|
|
175
|
+
case "bottom":
|
|
176
|
+
return n ? e ? Mt : zt : e ? zt : Mt;
|
|
177
|
+
case "left":
|
|
178
|
+
case "right":
|
|
179
|
+
return e ? Be : _e;
|
|
180
|
+
default:
|
|
181
|
+
return [];
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
function De(t, e, n, o) {
|
|
185
|
+
const i = ft(t);
|
|
186
|
+
let s = Pe(K(t), n === "start", o);
|
|
187
|
+
return i && (s = s.map((r) => r + "-" + i), e && (s = s.concat(s.map(Ct)))), s;
|
|
188
|
+
}
|
|
189
|
+
function ct(t) {
|
|
190
|
+
return t.replace(/left|right|bottom|top/g, (e) => Ae[e]);
|
|
191
|
+
}
|
|
192
|
+
function $e(t) {
|
|
193
|
+
return {
|
|
194
|
+
top: 0,
|
|
195
|
+
right: 0,
|
|
196
|
+
bottom: 0,
|
|
197
|
+
left: 0,
|
|
198
|
+
...t
|
|
199
|
+
};
|
|
200
|
+
}
|
|
201
|
+
function ze(t) {
|
|
202
|
+
return typeof t != "number" ? $e(t) : {
|
|
203
|
+
top: t,
|
|
204
|
+
right: t,
|
|
205
|
+
bottom: t,
|
|
206
|
+
left: t
|
|
207
|
+
};
|
|
208
|
+
}
|
|
209
|
+
function at(t) {
|
|
210
|
+
const {
|
|
211
|
+
x: e,
|
|
212
|
+
y: n,
|
|
213
|
+
width: o,
|
|
214
|
+
height: i
|
|
215
|
+
} = t;
|
|
216
|
+
return {
|
|
217
|
+
width: o,
|
|
218
|
+
height: i,
|
|
219
|
+
top: n,
|
|
220
|
+
left: e,
|
|
221
|
+
right: e + o,
|
|
222
|
+
bottom: n + i,
|
|
223
|
+
x: e,
|
|
224
|
+
y: n
|
|
225
|
+
};
|
|
226
|
+
}
|
|
227
|
+
function Vt(t, e, n) {
|
|
228
|
+
let {
|
|
229
|
+
reference: o,
|
|
230
|
+
floating: i
|
|
231
|
+
} = t;
|
|
232
|
+
const s = q(e), r = Gt(e), l = Kt(r), a = K(e), c = s === "y", u = o.x + o.width / 2 - i.width / 2, f = o.y + o.height / 2 - i.height / 2, m = o[l] / 2 - i[l] / 2;
|
|
233
|
+
let d;
|
|
234
|
+
switch (a) {
|
|
235
|
+
case "top":
|
|
236
|
+
d = {
|
|
237
|
+
x: u,
|
|
238
|
+
y: o.y - i.height
|
|
239
|
+
};
|
|
240
|
+
break;
|
|
241
|
+
case "bottom":
|
|
242
|
+
d = {
|
|
243
|
+
x: u,
|
|
244
|
+
y: o.y + o.height
|
|
245
|
+
};
|
|
246
|
+
break;
|
|
247
|
+
case "right":
|
|
248
|
+
d = {
|
|
249
|
+
x: o.x + o.width,
|
|
250
|
+
y: f
|
|
251
|
+
};
|
|
252
|
+
break;
|
|
253
|
+
case "left":
|
|
254
|
+
d = {
|
|
255
|
+
x: o.x - i.width,
|
|
256
|
+
y: f
|
|
257
|
+
};
|
|
258
|
+
break;
|
|
259
|
+
default:
|
|
260
|
+
d = {
|
|
261
|
+
x: o.x,
|
|
262
|
+
y: o.y
|
|
263
|
+
};
|
|
264
|
+
}
|
|
265
|
+
switch (ft(e)) {
|
|
266
|
+
case "start":
|
|
267
|
+
d[r] -= m * (n && c ? -1 : 1);
|
|
268
|
+
break;
|
|
269
|
+
case "end":
|
|
270
|
+
d[r] += m * (n && c ? -1 : 1);
|
|
271
|
+
break;
|
|
272
|
+
}
|
|
273
|
+
return d;
|
|
274
|
+
}
|
|
275
|
+
const Me = async (t, e, n) => {
|
|
276
|
+
const {
|
|
277
|
+
placement: o = "bottom",
|
|
278
|
+
strategy: i = "absolute",
|
|
279
|
+
middleware: s = [],
|
|
280
|
+
platform: r
|
|
281
|
+
} = n, l = s.filter(Boolean), a = await (r.isRTL == null ? void 0 : r.isRTL(e));
|
|
282
|
+
let c = await r.getElementRects({
|
|
283
|
+
reference: t,
|
|
284
|
+
floating: e,
|
|
285
|
+
strategy: i
|
|
286
|
+
}), {
|
|
287
|
+
x: u,
|
|
288
|
+
y: f
|
|
289
|
+
} = Vt(c, o, a), m = o, d = {}, p = 0;
|
|
290
|
+
for (let h = 0; h < l.length; h++) {
|
|
291
|
+
const {
|
|
292
|
+
name: g,
|
|
293
|
+
fn: v
|
|
294
|
+
} = l[h], {
|
|
295
|
+
x: w,
|
|
296
|
+
y: x,
|
|
297
|
+
data: R,
|
|
298
|
+
reset: S
|
|
299
|
+
} = await v({
|
|
300
|
+
x: u,
|
|
301
|
+
y: f,
|
|
302
|
+
initialPlacement: o,
|
|
303
|
+
placement: m,
|
|
304
|
+
strategy: i,
|
|
305
|
+
middlewareData: d,
|
|
306
|
+
rects: c,
|
|
307
|
+
platform: r,
|
|
308
|
+
elements: {
|
|
309
|
+
reference: t,
|
|
310
|
+
floating: e
|
|
311
|
+
}
|
|
312
|
+
});
|
|
313
|
+
u = w ?? u, f = x ?? f, d = {
|
|
314
|
+
...d,
|
|
315
|
+
[g]: {
|
|
316
|
+
...d[g],
|
|
317
|
+
...R
|
|
318
|
+
}
|
|
319
|
+
}, S && p <= 50 && (p++, typeof S == "object" && (S.placement && (m = S.placement), S.rects && (c = S.rects === !0 ? await r.getElementRects({
|
|
320
|
+
reference: t,
|
|
321
|
+
floating: e,
|
|
322
|
+
strategy: i
|
|
323
|
+
}) : S.rects), {
|
|
324
|
+
x: u,
|
|
325
|
+
y: f
|
|
326
|
+
} = Vt(c, m, a)), h = -1);
|
|
327
|
+
}
|
|
328
|
+
return {
|
|
329
|
+
x: u,
|
|
330
|
+
y: f,
|
|
331
|
+
placement: m,
|
|
332
|
+
strategy: i,
|
|
333
|
+
middlewareData: d
|
|
334
|
+
};
|
|
335
|
+
};
|
|
336
|
+
async function Ve(t, e) {
|
|
337
|
+
var n;
|
|
338
|
+
e === void 0 && (e = {});
|
|
339
|
+
const {
|
|
340
|
+
x: o,
|
|
341
|
+
y: i,
|
|
342
|
+
platform: s,
|
|
343
|
+
rects: r,
|
|
344
|
+
elements: l,
|
|
345
|
+
strategy: a
|
|
346
|
+
} = t, {
|
|
347
|
+
boundary: c = "clippingAncestors",
|
|
348
|
+
rootBoundary: u = "viewport",
|
|
349
|
+
elementContext: f = "floating",
|
|
350
|
+
altBoundary: m = !1,
|
|
351
|
+
padding: d = 0
|
|
352
|
+
} = Lt(e, t), p = ze(d), g = l[m ? f === "floating" ? "reference" : "floating" : f], v = at(await s.getClippingRect({
|
|
353
|
+
element: (n = await (s.isElement == null ? void 0 : s.isElement(g))) == null || n ? g : g.contextElement || await (s.getDocumentElement == null ? void 0 : s.getDocumentElement(l.floating)),
|
|
354
|
+
boundary: c,
|
|
355
|
+
rootBoundary: u,
|
|
356
|
+
strategy: a
|
|
357
|
+
})), w = f === "floating" ? {
|
|
358
|
+
x: o,
|
|
359
|
+
y: i,
|
|
360
|
+
width: r.floating.width,
|
|
361
|
+
height: r.floating.height
|
|
362
|
+
} : r.reference, x = await (s.getOffsetParent == null ? void 0 : s.getOffsetParent(l.floating)), R = await (s.isElement == null ? void 0 : s.isElement(x)) ? await (s.getScale == null ? void 0 : s.getScale(x)) || {
|
|
363
|
+
x: 1,
|
|
364
|
+
y: 1
|
|
365
|
+
} : {
|
|
366
|
+
x: 1,
|
|
367
|
+
y: 1
|
|
368
|
+
}, S = at(s.convertOffsetParentRelativeRectToViewportRelativeRect ? await s.convertOffsetParentRelativeRectToViewportRelativeRect({
|
|
369
|
+
elements: l,
|
|
370
|
+
rect: w,
|
|
371
|
+
offsetParent: x,
|
|
372
|
+
strategy: a
|
|
373
|
+
}) : w);
|
|
374
|
+
return {
|
|
375
|
+
top: (v.top - S.top + p.top) / R.y,
|
|
376
|
+
bottom: (S.bottom - v.bottom + p.bottom) / R.y,
|
|
377
|
+
left: (v.left - S.left + p.left) / R.x,
|
|
378
|
+
right: (S.right - v.right + p.right) / R.x
|
|
379
|
+
};
|
|
380
|
+
}
|
|
381
|
+
const Fe = function(t) {
|
|
382
|
+
return t === void 0 && (t = {}), {
|
|
383
|
+
name: "flip",
|
|
384
|
+
options: t,
|
|
385
|
+
async fn(e) {
|
|
386
|
+
var n, o;
|
|
387
|
+
const {
|
|
388
|
+
placement: i,
|
|
389
|
+
middlewareData: s,
|
|
390
|
+
rects: r,
|
|
391
|
+
initialPlacement: l,
|
|
392
|
+
platform: a,
|
|
393
|
+
elements: c
|
|
394
|
+
} = e, {
|
|
395
|
+
mainAxis: u = !0,
|
|
396
|
+
crossAxis: f = !0,
|
|
397
|
+
fallbackPlacements: m,
|
|
398
|
+
fallbackStrategy: d = "bestFit",
|
|
399
|
+
fallbackAxisSideDirection: p = "none",
|
|
400
|
+
flipAlignment: h = !0,
|
|
401
|
+
...g
|
|
402
|
+
} = Lt(t, e);
|
|
403
|
+
if ((n = s.arrow) != null && n.alignmentOffset)
|
|
404
|
+
return {};
|
|
405
|
+
const v = K(i), w = q(l), x = K(l) === l, R = await (a.isRTL == null ? void 0 : a.isRTL(c.floating)), S = m || (x || !h ? [ct(l)] : ke(l)), z = p !== "none";
|
|
406
|
+
!m && z && S.push(...De(l, h, p, R));
|
|
407
|
+
const y = [l, ...S], L = await Ve(e, g), M = [];
|
|
408
|
+
let H = ((o = s.flip) == null ? void 0 : o.overflows) || [];
|
|
409
|
+
if (u && M.push(L[v]), f) {
|
|
410
|
+
const V = Ee(i, r, R);
|
|
411
|
+
M.push(L[V[0]], L[V[1]]);
|
|
412
|
+
}
|
|
413
|
+
if (H = [...H, {
|
|
414
|
+
placement: i,
|
|
415
|
+
overflows: M
|
|
416
|
+
}], !M.every((V) => V <= 0)) {
|
|
417
|
+
var _t, Pt;
|
|
418
|
+
const V = (((_t = s.flip) == null ? void 0 : _t.index) || 0) + 1, gt = y[V];
|
|
419
|
+
if (gt && (!(f === "alignment" ? w !== q(gt) : !1) || // We leave the current main axis only if every placement on that axis
|
|
420
|
+
// overflows the main axis.
|
|
421
|
+
H.every((O) => q(O.placement) === w ? O.overflows[0] > 0 : !0)))
|
|
422
|
+
return {
|
|
423
|
+
data: {
|
|
424
|
+
index: V,
|
|
425
|
+
overflows: H
|
|
426
|
+
},
|
|
427
|
+
reset: {
|
|
428
|
+
placement: gt
|
|
429
|
+
}
|
|
430
|
+
};
|
|
431
|
+
let Z = (Pt = H.filter((F) => F.overflows[0] <= 0).sort((F, O) => F.overflows[1] - O.overflows[1])[0]) == null ? void 0 : Pt.placement;
|
|
432
|
+
if (!Z)
|
|
433
|
+
switch (d) {
|
|
434
|
+
case "bestFit": {
|
|
435
|
+
var Dt;
|
|
436
|
+
const F = (Dt = H.filter((O) => {
|
|
437
|
+
if (z) {
|
|
438
|
+
const P = q(O.placement);
|
|
439
|
+
return P === w || // Create a bias to the `y` side axis due to horizontal
|
|
440
|
+
// reading directions favoring greater width.
|
|
441
|
+
P === "y";
|
|
442
|
+
}
|
|
443
|
+
return !0;
|
|
444
|
+
}).map((O) => [O.placement, O.overflows.filter((P) => P > 0).reduce((P, se) => P + se, 0)]).sort((O, P) => O[1] - P[1])[0]) == null ? void 0 : Dt[0];
|
|
445
|
+
F && (Z = F);
|
|
446
|
+
break;
|
|
447
|
+
}
|
|
448
|
+
case "initialPlacement":
|
|
449
|
+
Z = l;
|
|
450
|
+
break;
|
|
451
|
+
}
|
|
452
|
+
if (i !== Z)
|
|
453
|
+
return {
|
|
454
|
+
reset: {
|
|
455
|
+
placement: Z
|
|
456
|
+
}
|
|
457
|
+
};
|
|
458
|
+
}
|
|
459
|
+
return {};
|
|
460
|
+
}
|
|
461
|
+
};
|
|
462
|
+
}, qe = /* @__PURE__ */ new Set(["left", "top"]);
|
|
463
|
+
async function Ne(t, e) {
|
|
464
|
+
const {
|
|
465
|
+
placement: n,
|
|
466
|
+
platform: o,
|
|
467
|
+
elements: i
|
|
468
|
+
} = t, s = await (o.isRTL == null ? void 0 : o.isRTL(i.floating)), r = K(n), l = ft(n), a = q(n) === "y", c = qe.has(r) ? -1 : 1, u = s && a ? -1 : 1, f = Lt(e, t);
|
|
469
|
+
let {
|
|
470
|
+
mainAxis: m,
|
|
471
|
+
crossAxis: d,
|
|
472
|
+
alignmentAxis: p
|
|
473
|
+
} = typeof f == "number" ? {
|
|
474
|
+
mainAxis: f,
|
|
475
|
+
crossAxis: 0,
|
|
476
|
+
alignmentAxis: null
|
|
477
|
+
} : {
|
|
478
|
+
mainAxis: f.mainAxis || 0,
|
|
479
|
+
crossAxis: f.crossAxis || 0,
|
|
480
|
+
alignmentAxis: f.alignmentAxis
|
|
481
|
+
};
|
|
482
|
+
return l && typeof p == "number" && (d = l === "end" ? p * -1 : p), a ? {
|
|
483
|
+
x: d * u,
|
|
484
|
+
y: m * c
|
|
485
|
+
} : {
|
|
486
|
+
x: m * c,
|
|
487
|
+
y: d * u
|
|
488
|
+
};
|
|
489
|
+
}
|
|
490
|
+
const Ie = function(t) {
|
|
491
|
+
return t === void 0 && (t = 0), {
|
|
492
|
+
name: "offset",
|
|
493
|
+
options: t,
|
|
494
|
+
async fn(e) {
|
|
495
|
+
var n, o;
|
|
496
|
+
const {
|
|
497
|
+
x: i,
|
|
498
|
+
y: s,
|
|
499
|
+
placement: r,
|
|
500
|
+
middlewareData: l
|
|
501
|
+
} = e, a = await Ne(e, t);
|
|
502
|
+
return r === ((n = l.offset) == null ? void 0 : n.placement) && (o = l.arrow) != null && o.alignmentOffset ? {} : {
|
|
503
|
+
x: i + a.x,
|
|
504
|
+
y: s + a.y,
|
|
505
|
+
data: {
|
|
506
|
+
...a,
|
|
507
|
+
placement: r
|
|
508
|
+
}
|
|
509
|
+
};
|
|
510
|
+
}
|
|
511
|
+
};
|
|
512
|
+
};
|
|
513
|
+
function dt() {
|
|
514
|
+
return typeof window < "u";
|
|
515
|
+
}
|
|
516
|
+
function W(t) {
|
|
517
|
+
return Ot(t) ? (t.nodeName || "").toLowerCase() : "#document";
|
|
518
|
+
}
|
|
519
|
+
function A(t) {
|
|
520
|
+
var e;
|
|
521
|
+
return (t == null || (e = t.ownerDocument) == null ? void 0 : e.defaultView) || window;
|
|
522
|
+
}
|
|
523
|
+
function _(t) {
|
|
524
|
+
var e;
|
|
525
|
+
return (e = (Ot(t) ? t.ownerDocument : t.document) || window.document) == null ? void 0 : e.documentElement;
|
|
526
|
+
}
|
|
527
|
+
function Ot(t) {
|
|
528
|
+
return dt() ? t instanceof Node || t instanceof A(t).Node : !1;
|
|
529
|
+
}
|
|
530
|
+
function T(t) {
|
|
531
|
+
return dt() ? t instanceof Element || t instanceof A(t).Element : !1;
|
|
532
|
+
}
|
|
533
|
+
function B(t) {
|
|
534
|
+
return dt() ? t instanceof HTMLElement || t instanceof A(t).HTMLElement : !1;
|
|
535
|
+
}
|
|
536
|
+
function Ft(t) {
|
|
537
|
+
return !dt() || typeof ShadowRoot > "u" ? !1 : t instanceof ShadowRoot || t instanceof A(t).ShadowRoot;
|
|
538
|
+
}
|
|
539
|
+
const We = /* @__PURE__ */ new Set(["inline", "contents"]);
|
|
540
|
+
function st(t) {
|
|
541
|
+
const {
|
|
542
|
+
overflow: e,
|
|
543
|
+
overflowX: n,
|
|
544
|
+
overflowY: o,
|
|
545
|
+
display: i
|
|
546
|
+
} = E(t);
|
|
547
|
+
return /auto|scroll|overlay|hidden|clip/.test(e + o + n) && !We.has(i);
|
|
548
|
+
}
|
|
549
|
+
const He = /* @__PURE__ */ new Set(["table", "td", "th"]);
|
|
550
|
+
function Xe(t) {
|
|
551
|
+
return He.has(W(t));
|
|
552
|
+
}
|
|
553
|
+
const je = [":popover-open", ":modal"];
|
|
554
|
+
function pt(t) {
|
|
555
|
+
return je.some((e) => {
|
|
556
|
+
try {
|
|
557
|
+
return t.matches(e);
|
|
558
|
+
} catch {
|
|
559
|
+
return !1;
|
|
560
|
+
}
|
|
561
|
+
});
|
|
562
|
+
}
|
|
563
|
+
const Ue = ["transform", "translate", "scale", "rotate", "perspective"], Ye = ["transform", "translate", "scale", "rotate", "perspective", "filter"], Ke = ["paint", "layout", "strict", "content"];
|
|
564
|
+
function Tt(t) {
|
|
565
|
+
const e = Et(), n = T(t) ? E(t) : t;
|
|
566
|
+
return Ue.some((o) => n[o] ? n[o] !== "none" : !1) || (n.containerType ? n.containerType !== "normal" : !1) || !e && (n.backdropFilter ? n.backdropFilter !== "none" : !1) || !e && (n.filter ? n.filter !== "none" : !1) || Ye.some((o) => (n.willChange || "").includes(o)) || Ke.some((o) => (n.contain || "").includes(o));
|
|
567
|
+
}
|
|
568
|
+
function Ge(t) {
|
|
569
|
+
let e = $(t);
|
|
570
|
+
for (; B(e) && !G(e); ) {
|
|
571
|
+
if (Tt(e))
|
|
572
|
+
return e;
|
|
573
|
+
if (pt(e))
|
|
574
|
+
return null;
|
|
575
|
+
e = $(e);
|
|
576
|
+
}
|
|
577
|
+
return null;
|
|
578
|
+
}
|
|
579
|
+
function Et() {
|
|
580
|
+
return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none");
|
|
581
|
+
}
|
|
582
|
+
const Je = /* @__PURE__ */ new Set(["html", "body", "#document"]);
|
|
583
|
+
function G(t) {
|
|
584
|
+
return Je.has(W(t));
|
|
585
|
+
}
|
|
586
|
+
function E(t) {
|
|
587
|
+
return A(t).getComputedStyle(t);
|
|
588
|
+
}
|
|
589
|
+
function mt(t) {
|
|
590
|
+
return T(t) ? {
|
|
591
|
+
scrollLeft: t.scrollLeft,
|
|
592
|
+
scrollTop: t.scrollTop
|
|
593
|
+
} : {
|
|
594
|
+
scrollLeft: t.scrollX,
|
|
595
|
+
scrollTop: t.scrollY
|
|
596
|
+
};
|
|
597
|
+
}
|
|
598
|
+
function $(t) {
|
|
599
|
+
if (W(t) === "html")
|
|
600
|
+
return t;
|
|
601
|
+
const e = (
|
|
602
|
+
// Step into the shadow DOM of the parent of a slotted node.
|
|
603
|
+
t.assignedSlot || // DOM Element detected.
|
|
604
|
+
t.parentNode || // ShadowRoot detected.
|
|
605
|
+
Ft(t) && t.host || // Fallback.
|
|
606
|
+
_(t)
|
|
607
|
+
);
|
|
608
|
+
return Ft(e) ? e.host : e;
|
|
609
|
+
}
|
|
610
|
+
function Jt(t) {
|
|
611
|
+
const e = $(t);
|
|
612
|
+
return G(e) ? t.ownerDocument ? t.ownerDocument.body : t.body : B(e) && st(e) ? e : Jt(e);
|
|
613
|
+
}
|
|
614
|
+
function ot(t, e, n) {
|
|
615
|
+
var o;
|
|
616
|
+
e === void 0 && (e = []), n === void 0 && (n = !0);
|
|
617
|
+
const i = Jt(t), s = i === ((o = t.ownerDocument) == null ? void 0 : o.body), r = A(i);
|
|
618
|
+
if (s) {
|
|
619
|
+
const l = At(r);
|
|
620
|
+
return e.concat(r, r.visualViewport || [], st(i) ? i : [], l && n ? ot(l) : []);
|
|
621
|
+
}
|
|
622
|
+
return e.concat(i, ot(i, [], n));
|
|
623
|
+
}
|
|
624
|
+
function At(t) {
|
|
625
|
+
return t.parent && Object.getPrototypeOf(t.parent) ? t.frameElement : null;
|
|
626
|
+
}
|
|
627
|
+
function Qt(t) {
|
|
628
|
+
const e = E(t);
|
|
629
|
+
let n = parseFloat(e.width) || 0, o = parseFloat(e.height) || 0;
|
|
630
|
+
const i = B(t), s = i ? t.offsetWidth : n, r = i ? t.offsetHeight : o, l = lt(n) !== s || lt(o) !== r;
|
|
631
|
+
return l && (n = s, o = r), {
|
|
632
|
+
width: n,
|
|
633
|
+
height: o,
|
|
634
|
+
$: l
|
|
635
|
+
};
|
|
636
|
+
}
|
|
637
|
+
function kt(t) {
|
|
638
|
+
return T(t) ? t : t.contextElement;
|
|
639
|
+
}
|
|
640
|
+
function U(t) {
|
|
641
|
+
const e = kt(t);
|
|
642
|
+
if (!B(e))
|
|
643
|
+
return k(1);
|
|
644
|
+
const n = e.getBoundingClientRect(), {
|
|
645
|
+
width: o,
|
|
646
|
+
height: i,
|
|
647
|
+
$: s
|
|
648
|
+
} = Qt(e);
|
|
649
|
+
let r = (s ? lt(n.width) : n.width) / o, l = (s ? lt(n.height) : n.height) / i;
|
|
650
|
+
return (!r || !Number.isFinite(r)) && (r = 1), (!l || !Number.isFinite(l)) && (l = 1), {
|
|
651
|
+
x: r,
|
|
652
|
+
y: l
|
|
653
|
+
};
|
|
654
|
+
}
|
|
655
|
+
const Qe = /* @__PURE__ */ k(0);
|
|
656
|
+
function Zt(t) {
|
|
657
|
+
const e = A(t);
|
|
658
|
+
return !Et() || !e.visualViewport ? Qe : {
|
|
659
|
+
x: e.visualViewport.offsetLeft,
|
|
660
|
+
y: e.visualViewport.offsetTop
|
|
661
|
+
};
|
|
662
|
+
}
|
|
663
|
+
function Ze(t, e, n) {
|
|
664
|
+
return e === void 0 && (e = !1), !n || e && n !== A(t) ? !1 : e;
|
|
665
|
+
}
|
|
666
|
+
function I(t, e, n, o) {
|
|
667
|
+
e === void 0 && (e = !1), n === void 0 && (n = !1);
|
|
668
|
+
const i = t.getBoundingClientRect(), s = kt(t);
|
|
669
|
+
let r = k(1);
|
|
670
|
+
e && (o ? T(o) && (r = U(o)) : r = U(t));
|
|
671
|
+
const l = Ze(s, n, o) ? Zt(s) : k(0);
|
|
672
|
+
let a = (i.left + l.x) / r.x, c = (i.top + l.y) / r.y, u = i.width / r.x, f = i.height / r.y;
|
|
673
|
+
if (s) {
|
|
674
|
+
const m = A(s), d = o && T(o) ? A(o) : o;
|
|
675
|
+
let p = m, h = At(p);
|
|
676
|
+
for (; h && o && d !== p; ) {
|
|
677
|
+
const g = U(h), v = h.getBoundingClientRect(), w = E(h), x = v.left + (h.clientLeft + parseFloat(w.paddingLeft)) * g.x, R = v.top + (h.clientTop + parseFloat(w.paddingTop)) * g.y;
|
|
678
|
+
a *= g.x, c *= g.y, u *= g.x, f *= g.y, a += x, c += R, p = A(h), h = At(p);
|
|
679
|
+
}
|
|
680
|
+
}
|
|
681
|
+
return at({
|
|
682
|
+
width: u,
|
|
683
|
+
height: f,
|
|
684
|
+
x: a,
|
|
685
|
+
y: c
|
|
686
|
+
});
|
|
687
|
+
}
|
|
688
|
+
function ht(t, e) {
|
|
689
|
+
const n = mt(t).scrollLeft;
|
|
690
|
+
return e ? e.left + n : I(_(t)).left + n;
|
|
691
|
+
}
|
|
692
|
+
function te(t, e) {
|
|
693
|
+
const n = t.getBoundingClientRect(), o = n.left + e.scrollLeft - ht(t, n), i = n.top + e.scrollTop;
|
|
694
|
+
return {
|
|
695
|
+
x: o,
|
|
696
|
+
y: i
|
|
697
|
+
};
|
|
698
|
+
}
|
|
699
|
+
function tn(t) {
|
|
700
|
+
let {
|
|
701
|
+
elements: e,
|
|
702
|
+
rect: n,
|
|
703
|
+
offsetParent: o,
|
|
704
|
+
strategy: i
|
|
705
|
+
} = t;
|
|
706
|
+
const s = i === "fixed", r = _(o), l = e ? pt(e.floating) : !1;
|
|
707
|
+
if (o === r || l && s)
|
|
708
|
+
return n;
|
|
709
|
+
let a = {
|
|
710
|
+
scrollLeft: 0,
|
|
711
|
+
scrollTop: 0
|
|
712
|
+
}, c = k(1);
|
|
713
|
+
const u = k(0), f = B(o);
|
|
714
|
+
if ((f || !f && !s) && ((W(o) !== "body" || st(r)) && (a = mt(o)), B(o))) {
|
|
715
|
+
const d = I(o);
|
|
716
|
+
c = U(o), u.x = d.x + o.clientLeft, u.y = d.y + o.clientTop;
|
|
717
|
+
}
|
|
718
|
+
const m = r && !f && !s ? te(r, a) : k(0);
|
|
719
|
+
return {
|
|
720
|
+
width: n.width * c.x,
|
|
721
|
+
height: n.height * c.y,
|
|
722
|
+
x: n.x * c.x - a.scrollLeft * c.x + u.x + m.x,
|
|
723
|
+
y: n.y * c.y - a.scrollTop * c.y + u.y + m.y
|
|
724
|
+
};
|
|
725
|
+
}
|
|
726
|
+
function en(t) {
|
|
727
|
+
return Array.from(t.getClientRects());
|
|
728
|
+
}
|
|
729
|
+
function nn(t) {
|
|
730
|
+
const e = _(t), n = mt(t), o = t.ownerDocument.body, i = j(e.scrollWidth, e.clientWidth, o.scrollWidth, o.clientWidth), s = j(e.scrollHeight, e.clientHeight, o.scrollHeight, o.clientHeight);
|
|
731
|
+
let r = -n.scrollLeft + ht(t);
|
|
732
|
+
const l = -n.scrollTop;
|
|
733
|
+
return E(o).direction === "rtl" && (r += j(e.clientWidth, o.clientWidth) - i), {
|
|
734
|
+
width: i,
|
|
735
|
+
height: s,
|
|
736
|
+
x: r,
|
|
737
|
+
y: l
|
|
738
|
+
};
|
|
739
|
+
}
|
|
740
|
+
const qt = 25;
|
|
741
|
+
function on(t, e) {
|
|
742
|
+
const n = A(t), o = _(t), i = n.visualViewport;
|
|
743
|
+
let s = o.clientWidth, r = o.clientHeight, l = 0, a = 0;
|
|
744
|
+
if (i) {
|
|
745
|
+
s = i.width, r = i.height;
|
|
746
|
+
const u = Et();
|
|
747
|
+
(!u || u && e === "fixed") && (l = i.offsetLeft, a = i.offsetTop);
|
|
748
|
+
}
|
|
749
|
+
const c = ht(o);
|
|
750
|
+
if (c <= 0) {
|
|
751
|
+
const u = o.ownerDocument, f = u.body, m = getComputedStyle(f), d = u.compatMode === "CSS1Compat" && parseFloat(m.marginLeft) + parseFloat(m.marginRight) || 0, p = Math.abs(o.clientWidth - f.clientWidth - d);
|
|
752
|
+
p <= qt && (s -= p);
|
|
753
|
+
} else c <= qt && (s += c);
|
|
754
|
+
return {
|
|
755
|
+
width: s,
|
|
756
|
+
height: r,
|
|
757
|
+
x: l,
|
|
758
|
+
y: a
|
|
759
|
+
};
|
|
760
|
+
}
|
|
761
|
+
const sn = /* @__PURE__ */ new Set(["absolute", "fixed"]);
|
|
762
|
+
function rn(t, e) {
|
|
763
|
+
const n = I(t, !0, e === "fixed"), o = n.top + t.clientTop, i = n.left + t.clientLeft, s = B(t) ? U(t) : k(1), r = t.clientWidth * s.x, l = t.clientHeight * s.y, a = i * s.x, c = o * s.y;
|
|
764
|
+
return {
|
|
765
|
+
width: r,
|
|
766
|
+
height: l,
|
|
767
|
+
x: a,
|
|
768
|
+
y: c
|
|
769
|
+
};
|
|
770
|
+
}
|
|
771
|
+
function Nt(t, e, n) {
|
|
772
|
+
let o;
|
|
773
|
+
if (e === "viewport")
|
|
774
|
+
o = on(t, n);
|
|
775
|
+
else if (e === "document")
|
|
776
|
+
o = nn(_(t));
|
|
777
|
+
else if (T(e))
|
|
778
|
+
o = rn(e, n);
|
|
779
|
+
else {
|
|
780
|
+
const i = Zt(t);
|
|
781
|
+
o = {
|
|
782
|
+
x: e.x - i.x,
|
|
783
|
+
y: e.y - i.y,
|
|
784
|
+
width: e.width,
|
|
785
|
+
height: e.height
|
|
786
|
+
};
|
|
787
|
+
}
|
|
788
|
+
return at(o);
|
|
789
|
+
}
|
|
790
|
+
function ee(t, e) {
|
|
791
|
+
const n = $(t);
|
|
792
|
+
return n === e || !T(n) || G(n) ? !1 : E(n).position === "fixed" || ee(n, e);
|
|
793
|
+
}
|
|
794
|
+
function ln(t, e) {
|
|
795
|
+
const n = e.get(t);
|
|
796
|
+
if (n)
|
|
797
|
+
return n;
|
|
798
|
+
let o = ot(t, [], !1).filter((l) => T(l) && W(l) !== "body"), i = null;
|
|
799
|
+
const s = E(t).position === "fixed";
|
|
800
|
+
let r = s ? $(t) : t;
|
|
801
|
+
for (; T(r) && !G(r); ) {
|
|
802
|
+
const l = E(r), a = Tt(r);
|
|
803
|
+
!a && l.position === "fixed" && (i = null), (s ? !a && !i : !a && l.position === "static" && !!i && sn.has(i.position) || st(r) && !a && ee(t, r)) ? o = o.filter((u) => u !== r) : i = l, r = $(r);
|
|
804
|
+
}
|
|
805
|
+
return e.set(t, o), o;
|
|
806
|
+
}
|
|
807
|
+
function cn(t) {
|
|
808
|
+
let {
|
|
809
|
+
element: e,
|
|
810
|
+
boundary: n,
|
|
811
|
+
rootBoundary: o,
|
|
812
|
+
strategy: i
|
|
813
|
+
} = t;
|
|
814
|
+
const r = [...n === "clippingAncestors" ? pt(e) ? [] : ln(e, this._c) : [].concat(n), o], l = r[0], a = r.reduce((c, u) => {
|
|
815
|
+
const f = Nt(e, u, i);
|
|
816
|
+
return c.top = j(f.top, c.top), c.right = Rt(f.right, c.right), c.bottom = Rt(f.bottom, c.bottom), c.left = j(f.left, c.left), c;
|
|
817
|
+
}, Nt(e, l, i));
|
|
818
|
+
return {
|
|
819
|
+
width: a.right - a.left,
|
|
820
|
+
height: a.bottom - a.top,
|
|
821
|
+
x: a.left,
|
|
822
|
+
y: a.top
|
|
823
|
+
};
|
|
824
|
+
}
|
|
825
|
+
function an(t) {
|
|
826
|
+
const {
|
|
827
|
+
width: e,
|
|
828
|
+
height: n
|
|
829
|
+
} = Qt(t);
|
|
830
|
+
return {
|
|
831
|
+
width: e,
|
|
832
|
+
height: n
|
|
833
|
+
};
|
|
834
|
+
}
|
|
835
|
+
function un(t, e, n) {
|
|
836
|
+
const o = B(e), i = _(e), s = n === "fixed", r = I(t, !0, s, e);
|
|
837
|
+
let l = {
|
|
838
|
+
scrollLeft: 0,
|
|
839
|
+
scrollTop: 0
|
|
840
|
+
};
|
|
841
|
+
const a = k(0);
|
|
842
|
+
function c() {
|
|
843
|
+
a.x = ht(i);
|
|
844
|
+
}
|
|
845
|
+
if (o || !o && !s)
|
|
846
|
+
if ((W(e) !== "body" || st(i)) && (l = mt(e)), o) {
|
|
847
|
+
const d = I(e, !0, s, e);
|
|
848
|
+
a.x = d.x + e.clientLeft, a.y = d.y + e.clientTop;
|
|
849
|
+
} else i && c();
|
|
850
|
+
s && !o && i && c();
|
|
851
|
+
const u = i && !o && !s ? te(i, l) : k(0), f = r.left + l.scrollLeft - a.x - u.x, m = r.top + l.scrollTop - a.y - u.y;
|
|
852
|
+
return {
|
|
853
|
+
x: f,
|
|
854
|
+
y: m,
|
|
855
|
+
width: r.width,
|
|
856
|
+
height: r.height
|
|
857
|
+
};
|
|
858
|
+
}
|
|
859
|
+
function wt(t) {
|
|
860
|
+
return E(t).position === "static";
|
|
861
|
+
}
|
|
862
|
+
function It(t, e) {
|
|
863
|
+
if (!B(t) || E(t).position === "fixed")
|
|
864
|
+
return null;
|
|
865
|
+
if (e)
|
|
866
|
+
return e(t);
|
|
867
|
+
let n = t.offsetParent;
|
|
868
|
+
return _(t) === n && (n = n.ownerDocument.body), n;
|
|
869
|
+
}
|
|
870
|
+
function ne(t, e) {
|
|
871
|
+
const n = A(t);
|
|
872
|
+
if (pt(t))
|
|
873
|
+
return n;
|
|
874
|
+
if (!B(t)) {
|
|
875
|
+
let i = $(t);
|
|
876
|
+
for (; i && !G(i); ) {
|
|
877
|
+
if (T(i) && !wt(i))
|
|
878
|
+
return i;
|
|
879
|
+
i = $(i);
|
|
880
|
+
}
|
|
881
|
+
return n;
|
|
882
|
+
}
|
|
883
|
+
let o = It(t, e);
|
|
884
|
+
for (; o && Xe(o) && wt(o); )
|
|
885
|
+
o = It(o, e);
|
|
886
|
+
return o && G(o) && wt(o) && !Tt(o) ? n : o || Ge(t) || n;
|
|
887
|
+
}
|
|
888
|
+
const fn = async function(t) {
|
|
889
|
+
const e = this.getOffsetParent || ne, n = this.getDimensions, o = await n(t.floating);
|
|
890
|
+
return {
|
|
891
|
+
reference: un(t.reference, await e(t.floating), t.strategy),
|
|
892
|
+
floating: {
|
|
893
|
+
x: 0,
|
|
894
|
+
y: 0,
|
|
895
|
+
width: o.width,
|
|
896
|
+
height: o.height
|
|
897
|
+
}
|
|
898
|
+
};
|
|
899
|
+
};
|
|
900
|
+
function dn(t) {
|
|
901
|
+
return E(t).direction === "rtl";
|
|
902
|
+
}
|
|
903
|
+
const pn = {
|
|
904
|
+
convertOffsetParentRelativeRectToViewportRelativeRect: tn,
|
|
905
|
+
getDocumentElement: _,
|
|
906
|
+
getClippingRect: cn,
|
|
907
|
+
getOffsetParent: ne,
|
|
908
|
+
getElementRects: fn,
|
|
909
|
+
getClientRects: en,
|
|
910
|
+
getDimensions: an,
|
|
911
|
+
getScale: U,
|
|
912
|
+
isElement: T,
|
|
913
|
+
isRTL: dn
|
|
914
|
+
};
|
|
915
|
+
function oe(t, e) {
|
|
916
|
+
return t.x === e.x && t.y === e.y && t.width === e.width && t.height === e.height;
|
|
917
|
+
}
|
|
918
|
+
function mn(t, e) {
|
|
919
|
+
let n = null, o;
|
|
920
|
+
const i = _(t);
|
|
921
|
+
function s() {
|
|
922
|
+
var l;
|
|
923
|
+
clearTimeout(o), (l = n) == null || l.disconnect(), n = null;
|
|
924
|
+
}
|
|
925
|
+
function r(l, a) {
|
|
926
|
+
l === void 0 && (l = !1), a === void 0 && (a = 1), s();
|
|
927
|
+
const c = t.getBoundingClientRect(), {
|
|
928
|
+
left: u,
|
|
929
|
+
top: f,
|
|
930
|
+
width: m,
|
|
931
|
+
height: d
|
|
932
|
+
} = c;
|
|
933
|
+
if (l || e(), !m || !d)
|
|
934
|
+
return;
|
|
935
|
+
const p = rt(f), h = rt(i.clientWidth - (u + m)), g = rt(i.clientHeight - (f + d)), v = rt(u), x = {
|
|
936
|
+
rootMargin: -p + "px " + -h + "px " + -g + "px " + -v + "px",
|
|
937
|
+
threshold: j(0, Rt(1, a)) || 1
|
|
938
|
+
};
|
|
939
|
+
let R = !0;
|
|
940
|
+
function S(z) {
|
|
941
|
+
const y = z[0].intersectionRatio;
|
|
942
|
+
if (y !== a) {
|
|
943
|
+
if (!R)
|
|
944
|
+
return r();
|
|
945
|
+
y ? r(!1, y) : o = setTimeout(() => {
|
|
946
|
+
r(!1, 1e-7);
|
|
947
|
+
}, 1e3);
|
|
948
|
+
}
|
|
949
|
+
y === 1 && !oe(c, t.getBoundingClientRect()) && r(), R = !1;
|
|
950
|
+
}
|
|
951
|
+
try {
|
|
952
|
+
n = new IntersectionObserver(S, {
|
|
953
|
+
...x,
|
|
954
|
+
// Handle <iframe>s
|
|
955
|
+
root: i.ownerDocument
|
|
956
|
+
});
|
|
957
|
+
} catch {
|
|
958
|
+
n = new IntersectionObserver(S, x);
|
|
959
|
+
}
|
|
960
|
+
n.observe(t);
|
|
961
|
+
}
|
|
962
|
+
return r(!0), s;
|
|
963
|
+
}
|
|
964
|
+
function hn(t, e, n, o) {
|
|
965
|
+
o === void 0 && (o = {});
|
|
966
|
+
const {
|
|
967
|
+
ancestorScroll: i = !0,
|
|
968
|
+
ancestorResize: s = !0,
|
|
969
|
+
elementResize: r = typeof ResizeObserver == "function",
|
|
970
|
+
layoutShift: l = typeof IntersectionObserver == "function",
|
|
971
|
+
animationFrame: a = !1
|
|
972
|
+
} = o, c = kt(t), u = i || s ? [...c ? ot(c) : [], ...ot(e)] : [];
|
|
973
|
+
u.forEach((v) => {
|
|
974
|
+
i && v.addEventListener("scroll", n, {
|
|
975
|
+
passive: !0
|
|
976
|
+
}), s && v.addEventListener("resize", n);
|
|
977
|
+
});
|
|
978
|
+
const f = c && l ? mn(c, n) : null;
|
|
979
|
+
let m = -1, d = null;
|
|
980
|
+
r && (d = new ResizeObserver((v) => {
|
|
981
|
+
let [w] = v;
|
|
982
|
+
w && w.target === c && d && (d.unobserve(e), cancelAnimationFrame(m), m = requestAnimationFrame(() => {
|
|
983
|
+
var x;
|
|
984
|
+
(x = d) == null || x.observe(e);
|
|
985
|
+
})), n();
|
|
986
|
+
}), c && !a && d.observe(c), d.observe(e));
|
|
987
|
+
let p, h = a ? I(t) : null;
|
|
988
|
+
a && g();
|
|
989
|
+
function g() {
|
|
990
|
+
const v = I(t);
|
|
991
|
+
h && !oe(h, v) && n(), h = v, p = requestAnimationFrame(g);
|
|
992
|
+
}
|
|
993
|
+
return n(), () => {
|
|
994
|
+
var v;
|
|
995
|
+
u.forEach((w) => {
|
|
996
|
+
i && w.removeEventListener("scroll", n), s && w.removeEventListener("resize", n);
|
|
997
|
+
}), f == null || f(), (v = d) == null || v.disconnect(), d = null, a && cancelAnimationFrame(p);
|
|
998
|
+
};
|
|
999
|
+
}
|
|
1000
|
+
const gn = Ie, vn = Fe, wn = (t, e, n) => {
|
|
1001
|
+
const o = /* @__PURE__ */ new Map(), i = {
|
|
1002
|
+
platform: pn,
|
|
1003
|
+
...n
|
|
1004
|
+
}, s = {
|
|
1005
|
+
...i.platform,
|
|
1006
|
+
_c: o
|
|
1007
|
+
};
|
|
1008
|
+
return Me(t, e, {
|
|
1009
|
+
...i,
|
|
1010
|
+
platform: s
|
|
1011
|
+
});
|
|
1012
|
+
};
|
|
1013
|
+
function yn(t) {
|
|
1014
|
+
return t != null && typeof t == "object" && "$el" in t;
|
|
1015
|
+
}
|
|
1016
|
+
function Wt(t) {
|
|
1017
|
+
if (yn(t)) {
|
|
1018
|
+
const e = t.$el;
|
|
1019
|
+
return Ot(e) && W(e) === "#comment" ? null : e;
|
|
1020
|
+
}
|
|
1021
|
+
return t;
|
|
1022
|
+
}
|
|
1023
|
+
function et(t) {
|
|
1024
|
+
return typeof t == "function" ? t() : it(t);
|
|
1025
|
+
}
|
|
1026
|
+
function ie(t) {
|
|
1027
|
+
return typeof window > "u" ? 1 : (t.ownerDocument.defaultView || window).devicePixelRatio || 1;
|
|
1028
|
+
}
|
|
1029
|
+
function Ht(t, e) {
|
|
1030
|
+
const n = ie(t);
|
|
1031
|
+
return Math.round(e * n) / n;
|
|
1032
|
+
}
|
|
1033
|
+
function xn(t, e, n) {
|
|
1034
|
+
n === void 0 && (n = {});
|
|
1035
|
+
const o = n.whileElementsMounted, i = b(() => {
|
|
1036
|
+
var y;
|
|
1037
|
+
return (y = et(n.open)) != null ? y : !0;
|
|
1038
|
+
}), s = b(() => et(n.middleware)), r = b(() => {
|
|
1039
|
+
var y;
|
|
1040
|
+
return (y = et(n.placement)) != null ? y : "bottom";
|
|
1041
|
+
}), l = b(() => {
|
|
1042
|
+
var y;
|
|
1043
|
+
return (y = et(n.strategy)) != null ? y : "absolute";
|
|
1044
|
+
}), a = b(() => {
|
|
1045
|
+
var y;
|
|
1046
|
+
return (y = et(n.transform)) != null ? y : !0;
|
|
1047
|
+
}), c = b(() => Wt(t.value)), u = b(() => Wt(e.value)), f = tt(0), m = tt(0), d = tt(l.value), p = tt(r.value), h = ce({}), g = tt(!1), v = b(() => {
|
|
1048
|
+
const y = {
|
|
1049
|
+
position: d.value,
|
|
1050
|
+
left: "0",
|
|
1051
|
+
top: "0"
|
|
1052
|
+
};
|
|
1053
|
+
if (!u.value)
|
|
1054
|
+
return y;
|
|
1055
|
+
const L = Ht(u.value, f.value), M = Ht(u.value, m.value);
|
|
1056
|
+
return a.value ? {
|
|
1057
|
+
...y,
|
|
1058
|
+
transform: "translate(" + L + "px, " + M + "px)",
|
|
1059
|
+
...ie(u.value) >= 1.5 && {
|
|
1060
|
+
willChange: "transform"
|
|
1061
|
+
}
|
|
1062
|
+
} : {
|
|
1063
|
+
position: d.value,
|
|
1064
|
+
left: L + "px",
|
|
1065
|
+
top: M + "px"
|
|
1066
|
+
};
|
|
1067
|
+
});
|
|
1068
|
+
let w;
|
|
1069
|
+
function x() {
|
|
1070
|
+
if (c.value == null || u.value == null)
|
|
1071
|
+
return;
|
|
1072
|
+
const y = i.value;
|
|
1073
|
+
wn(c.value, u.value, {
|
|
1074
|
+
middleware: s.value,
|
|
1075
|
+
placement: r.value,
|
|
1076
|
+
strategy: l.value
|
|
1077
|
+
}).then((L) => {
|
|
1078
|
+
f.value = L.x, m.value = L.y, d.value = L.strategy, p.value = L.placement, h.value = L.middlewareData, g.value = y !== !1;
|
|
1079
|
+
});
|
|
1080
|
+
}
|
|
1081
|
+
function R() {
|
|
1082
|
+
typeof w == "function" && (w(), w = void 0);
|
|
1083
|
+
}
|
|
1084
|
+
function S() {
|
|
1085
|
+
if (R(), o === void 0) {
|
|
1086
|
+
x();
|
|
1087
|
+
return;
|
|
1088
|
+
}
|
|
1089
|
+
if (c.value != null && u.value != null) {
|
|
1090
|
+
w = o(c.value, u.value, x);
|
|
1091
|
+
return;
|
|
1092
|
+
}
|
|
1093
|
+
}
|
|
1094
|
+
function z() {
|
|
1095
|
+
i.value || (g.value = !1);
|
|
1096
|
+
}
|
|
1097
|
+
return vt([s, r, l, i], x, {
|
|
1098
|
+
flush: "sync"
|
|
1099
|
+
}), vt([c, u], S, {
|
|
1100
|
+
flush: "sync"
|
|
1101
|
+
}), vt(i, z, {
|
|
1102
|
+
flush: "sync"
|
|
1103
|
+
}), ae() && ue(R), {
|
|
1104
|
+
x: X(f),
|
|
1105
|
+
y: X(m),
|
|
1106
|
+
strategy: X(d),
|
|
1107
|
+
placement: X(p),
|
|
1108
|
+
middlewareData: X(h),
|
|
1109
|
+
isPositioned: X(g),
|
|
1110
|
+
floatingStyles: v,
|
|
1111
|
+
update: x
|
|
1112
|
+
};
|
|
1113
|
+
}
|
|
1114
|
+
const Cn = /* @__PURE__ */ J({
|
|
1115
|
+
__name: "SqPopover",
|
|
1116
|
+
props: /* @__PURE__ */ bt({
|
|
1117
|
+
placement: { default: "top" },
|
|
1118
|
+
offset: { default: 10 },
|
|
1119
|
+
teleported: { type: Boolean },
|
|
1120
|
+
trigger: { default: "hover" },
|
|
1121
|
+
showAfter: { default: 0 },
|
|
1122
|
+
hideAfter: { default: 300 },
|
|
1123
|
+
disabled: { type: Boolean },
|
|
1124
|
+
popoverClass: {}
|
|
1125
|
+
}, {
|
|
1126
|
+
visible: { type: Boolean },
|
|
1127
|
+
visibleModifiers: {}
|
|
1128
|
+
}),
|
|
1129
|
+
emits: ["update:visible"],
|
|
1130
|
+
setup(t) {
|
|
1131
|
+
let e;
|
|
1132
|
+
const n = t, o = St("triggerRef"), i = St("popverRef"), s = jt(t, "visible"), { floatingStyles: r } = xn(o, i, {
|
|
1133
|
+
placement: n.placement,
|
|
1134
|
+
whileElementsMounted: hn,
|
|
1135
|
+
middleware: [gn(n.offset), vn()]
|
|
1136
|
+
});
|
|
1137
|
+
fe(() => {
|
|
1138
|
+
m(), document.removeEventListener("click", f);
|
|
1139
|
+
});
|
|
1140
|
+
function l() {
|
|
1141
|
+
n.trigger !== "hover" || n.disabled || (m(), e = setTimeout(() => {
|
|
1142
|
+
u();
|
|
1143
|
+
}, n.showAfter));
|
|
1144
|
+
}
|
|
1145
|
+
function a() {
|
|
1146
|
+
n.trigger === "hover" && (m(), e = setTimeout(() => {
|
|
1147
|
+
f();
|
|
1148
|
+
}, n.hideAfter));
|
|
1149
|
+
}
|
|
1150
|
+
function c() {
|
|
1151
|
+
n.trigger === "click" && (s.value ? f() : n.disabled || u());
|
|
1152
|
+
}
|
|
1153
|
+
function u() {
|
|
1154
|
+
s.value = !0, document.addEventListener("click", f);
|
|
1155
|
+
}
|
|
1156
|
+
function f() {
|
|
1157
|
+
s.value = !1, document.removeEventListener("click", f);
|
|
1158
|
+
}
|
|
1159
|
+
function m() {
|
|
1160
|
+
e && (clearTimeout(e), e = void 0);
|
|
1161
|
+
}
|
|
1162
|
+
return (d, p) => (C(), N(de, null, [
|
|
1163
|
+
nt("span", {
|
|
1164
|
+
class: "sq-popover-trigger",
|
|
1165
|
+
ref_key: "triggerRef",
|
|
1166
|
+
ref: o,
|
|
1167
|
+
onMouseenter: l,
|
|
1168
|
+
onMouseleave: a,
|
|
1169
|
+
onClick: $t(c, ["stop"])
|
|
1170
|
+
}, [
|
|
1171
|
+
D(d.$slots, "reference")
|
|
1172
|
+
], 544),
|
|
1173
|
+
(C(), Y(pe, {
|
|
1174
|
+
to: "body",
|
|
1175
|
+
disabled: !n.teleported
|
|
1176
|
+
}, [
|
|
1177
|
+
Xt(me, { name: "sq-fade" }, {
|
|
1178
|
+
default: ut(() => [
|
|
1179
|
+
Ut(nt("div", {
|
|
1180
|
+
class: Q(["sq-popover", d.popoverClass]),
|
|
1181
|
+
ref_key: "popverRef",
|
|
1182
|
+
ref: i,
|
|
1183
|
+
style: Yt(it(r)),
|
|
1184
|
+
onClick: p[0] || (p[0] = $t(() => {
|
|
1185
|
+
}, ["stop"]))
|
|
1186
|
+
}, [
|
|
1187
|
+
D(d.$slots, "default")
|
|
1188
|
+
], 6), [
|
|
1189
|
+
[he, s.value]
|
|
1190
|
+
])
|
|
1191
|
+
]),
|
|
1192
|
+
_: 3
|
|
1193
|
+
})
|
|
1194
|
+
], 8, ["disabled"]))
|
|
1195
|
+
], 64));
|
|
1196
|
+
}
|
|
1197
|
+
}), An = /* @__PURE__ */ J({
|
|
125
1198
|
__name: "SqTag",
|
|
126
1199
|
props: {
|
|
127
1200
|
type: {},
|
|
@@ -129,22 +1202,22 @@ const U = /* @__PURE__ */ E(F, [["render", P]]), j = ["disabled"], K = /* @__PUR
|
|
|
129
1202
|
round: { type: Boolean },
|
|
130
1203
|
size: { default: "md" }
|
|
131
1204
|
},
|
|
132
|
-
setup(
|
|
133
|
-
const e =
|
|
134
|
-
const
|
|
135
|
-
return e.size !== "md" &&
|
|
136
|
-
}),
|
|
137
|
-
return (
|
|
138
|
-
class:
|
|
139
|
-
size:
|
|
1205
|
+
setup(t) {
|
|
1206
|
+
const e = t, n = b(() => {
|
|
1207
|
+
const i = [];
|
|
1208
|
+
return e.size !== "md" && i.push(`sq-tag--${e.size}`), e.theme !== "materialize" && e.type && i.push(`is-${e.theme}`), e.type && i.push(`is-${e.type}`), e.round && i.push("is-round"), i;
|
|
1209
|
+
}), o = b(() => e.size === "lg" ? "md" : "sm");
|
|
1210
|
+
return (i, s) => (C(), Y(it(Bt), {
|
|
1211
|
+
class: Q(["sq-tag", n.value]),
|
|
1212
|
+
size: o.value
|
|
140
1213
|
}, {
|
|
141
|
-
default:
|
|
142
|
-
|
|
1214
|
+
default: ut(() => [
|
|
1215
|
+
D(i.$slots, "default")
|
|
143
1216
|
]),
|
|
144
1217
|
_: 3
|
|
145
1218
|
}, 8, ["class", "size"]));
|
|
146
1219
|
}
|
|
147
|
-
}),
|
|
1220
|
+
}), Ln = /* @__PURE__ */ J({
|
|
148
1221
|
__name: "SqCheckTag",
|
|
149
1222
|
props: {
|
|
150
1223
|
checked: { type: Boolean, default: !1 },
|
|
@@ -153,48 +1226,49 @@ const U = /* @__PURE__ */ E(F, [["render", P]]), j = ["disabled"], K = /* @__PUR
|
|
|
153
1226
|
size: { default: "md" }
|
|
154
1227
|
},
|
|
155
1228
|
emits: ["change"],
|
|
156
|
-
setup(
|
|
157
|
-
const
|
|
158
|
-
const
|
|
159
|
-
return
|
|
160
|
-
}), s =
|
|
161
|
-
return (
|
|
162
|
-
class:
|
|
1229
|
+
setup(t, { emit: e }) {
|
|
1230
|
+
const n = e, o = t, i = b(() => {
|
|
1231
|
+
const r = [];
|
|
1232
|
+
return o.size !== "md" && r.push(`sq-tag--${o.size}`), o.type && r.push(`is-${o.type}`), o.round && r.push("is-round"), o.checked && r.push("is-checked"), r;
|
|
1233
|
+
}), s = b(() => o.size === "lg" ? "md" : "sm");
|
|
1234
|
+
return (r, l) => (C(), Y(it(Bt), {
|
|
1235
|
+
class: Q(["sq-check-tag", i.value]),
|
|
163
1236
|
size: s.value,
|
|
164
|
-
onClick:
|
|
1237
|
+
onClick: l[0] || (l[0] = (a) => n("change", !o.checked))
|
|
165
1238
|
}, {
|
|
166
|
-
default:
|
|
167
|
-
|
|
1239
|
+
default: ut(() => [
|
|
1240
|
+
D(r.$slots, "default")
|
|
168
1241
|
]),
|
|
169
1242
|
_: 3
|
|
170
1243
|
}, 8, ["class", "size"]));
|
|
171
1244
|
}
|
|
172
|
-
}),
|
|
1245
|
+
}), Bt = /* @__PURE__ */ J({
|
|
173
1246
|
__name: "SqText",
|
|
174
1247
|
props: {
|
|
175
1248
|
rowNum: { default: 1 },
|
|
176
1249
|
ellipsis: { type: Boolean, default: !1 },
|
|
177
1250
|
size: { default: "md" }
|
|
178
1251
|
},
|
|
179
|
-
setup(
|
|
180
|
-
const e =
|
|
181
|
-
const
|
|
182
|
-
return e.size !== "md" &&
|
|
183
|
-
}),
|
|
1252
|
+
setup(t) {
|
|
1253
|
+
const e = t, n = b(() => {
|
|
1254
|
+
const i = [];
|
|
1255
|
+
return e.size !== "md" && i.push(`s-text--${e.size}`), e.ellipsis && i.push(e.rowNum > 1 ? "multi-line" : "single-line"), i;
|
|
1256
|
+
}), o = b(
|
|
184
1257
|
() => e.ellipsis ? `--row-num: ${e.rowNum}` : ""
|
|
185
1258
|
);
|
|
186
|
-
return (
|
|
187
|
-
class:
|
|
188
|
-
style:
|
|
1259
|
+
return (i, s) => (C(), N("span", {
|
|
1260
|
+
class: Q(["sq-text", n.value]),
|
|
1261
|
+
style: Yt(o.value)
|
|
189
1262
|
}, [
|
|
190
|
-
|
|
1263
|
+
D(i.$slots, "default")
|
|
191
1264
|
], 6));
|
|
192
1265
|
}
|
|
193
1266
|
});
|
|
194
1267
|
export {
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
1268
|
+
Sn as SqButton,
|
|
1269
|
+
Ln as SqCheckTag,
|
|
1270
|
+
Rn as SqInput,
|
|
1271
|
+
Cn as SqPopover,
|
|
1272
|
+
An as SqTag,
|
|
1273
|
+
Bt as SqText
|
|
200
1274
|
};
|