siteguide.js 0.8.2 → 0.8.3
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/css/siteguide.css +1 -1
- package/dist/index.d.ts +20 -9
- package/dist/index.js +1 -1
- package/dist/index.mjs +366 -353
- package/package.json +71 -71
package/dist/index.mjs
CHANGED
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
var St = Object.prototype.hasOwnProperty,
|
|
5
|
-
var
|
|
1
|
+
var Ut = Object.defineProperty, Kt = Object.defineProperties;
|
|
2
|
+
var Xt = Object.getOwnPropertyDescriptors;
|
|
3
|
+
var it = Object.getOwnPropertySymbols;
|
|
4
|
+
var St = Object.prototype.hasOwnProperty, Tt = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var Pt = Math.pow, dt = (e, t, n) => t in e ? Ut(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, A = (e, t) => {
|
|
6
6
|
for (var n in t || (t = {}))
|
|
7
7
|
St.call(t, n) && dt(e, n, t[n]);
|
|
8
|
-
if (
|
|
9
|
-
for (var n of
|
|
10
|
-
|
|
8
|
+
if (it)
|
|
9
|
+
for (var n of it(t))
|
|
10
|
+
Tt.call(t, n) && dt(e, n, t[n]);
|
|
11
11
|
return e;
|
|
12
|
-
},
|
|
13
|
-
var
|
|
12
|
+
}, Q = (e, t) => Kt(e, Xt(t));
|
|
13
|
+
var Et = (e, t) => {
|
|
14
14
|
var n = {};
|
|
15
15
|
for (var i in e)
|
|
16
16
|
St.call(e, i) && t.indexOf(i) < 0 && (n[i] = e[i]);
|
|
17
|
-
if (e != null &&
|
|
18
|
-
for (var i of
|
|
19
|
-
t.indexOf(i) < 0 &&
|
|
17
|
+
if (e != null && it)
|
|
18
|
+
for (var i of it(e))
|
|
19
|
+
t.indexOf(i) < 0 && Tt.call(e, i) && (n[i] = e[i]);
|
|
20
20
|
return n;
|
|
21
21
|
};
|
|
22
|
-
var
|
|
23
|
-
var
|
|
22
|
+
var b = (e, t, n) => dt(e, typeof t != "symbol" ? t + "" : t, n);
|
|
23
|
+
var D = (e, t, n) => new Promise((i, o) => {
|
|
24
24
|
var s = (a) => {
|
|
25
25
|
try {
|
|
26
26
|
c(n.next(a));
|
|
@@ -36,7 +36,7 @@ var A = (e, t, n) => new Promise((i, o) => {
|
|
|
36
36
|
}, c = (a) => a.done ? i(a.value) : Promise.resolve(a.value).then(s, r);
|
|
37
37
|
c((n = n.apply(e, t)).next());
|
|
38
38
|
});
|
|
39
|
-
const Gt = ["top", "right", "bottom", "left"],
|
|
39
|
+
const Gt = ["top", "right", "bottom", "left"], Lt = ["start", "end"], Ot = /* @__PURE__ */ Gt.reduce((e, t) => e.concat(t, t + "-" + Lt[0], t + "-" + Lt[1]), []), Z = Math.min, U = Math.max, st = Math.round, B = (e) => ({
|
|
40
40
|
x: e,
|
|
41
41
|
y: e
|
|
42
42
|
}), Jt = {
|
|
@@ -48,44 +48,44 @@ const Gt = ["top", "right", "bottom", "left"], Tt = ["start", "end"], Et = /* @_
|
|
|
48
48
|
start: "end",
|
|
49
49
|
end: "start"
|
|
50
50
|
};
|
|
51
|
-
function
|
|
52
|
-
return
|
|
51
|
+
function Zt(e, t, n) {
|
|
52
|
+
return U(e, Z(t, n));
|
|
53
53
|
}
|
|
54
|
-
function
|
|
54
|
+
function ct(e, t) {
|
|
55
55
|
return typeof e == "function" ? e(t) : e;
|
|
56
56
|
}
|
|
57
|
-
function
|
|
57
|
+
function et(e) {
|
|
58
58
|
return e.split("-")[0];
|
|
59
59
|
}
|
|
60
60
|
function M(e) {
|
|
61
61
|
return e.split("-")[1];
|
|
62
62
|
}
|
|
63
|
-
function
|
|
63
|
+
function te(e) {
|
|
64
64
|
return e === "x" ? "y" : "x";
|
|
65
65
|
}
|
|
66
66
|
function xt(e) {
|
|
67
67
|
return e === "y" ? "height" : "width";
|
|
68
68
|
}
|
|
69
69
|
function yt(e) {
|
|
70
|
-
return ["top", "bottom"].includes(
|
|
70
|
+
return ["top", "bottom"].includes(et(e)) ? "y" : "x";
|
|
71
71
|
}
|
|
72
72
|
function wt(e) {
|
|
73
|
-
return
|
|
73
|
+
return te(yt(e));
|
|
74
74
|
}
|
|
75
|
-
function
|
|
75
|
+
function ee(e, t, n) {
|
|
76
76
|
n === void 0 && (n = !1);
|
|
77
77
|
const i = M(e), o = wt(e), s = xt(o);
|
|
78
78
|
let r = o === "x" ? i === (n ? "end" : "start") ? "right" : "left" : i === "start" ? "bottom" : "top";
|
|
79
79
|
return t.reference[s] > t.floating[s] && (r = Rt(r)), [r, Rt(r)];
|
|
80
80
|
}
|
|
81
|
-
function
|
|
81
|
+
function ne(e) {
|
|
82
82
|
return e.replace(/start|end/g, (t) => Qt[t]);
|
|
83
83
|
}
|
|
84
84
|
function Rt(e) {
|
|
85
85
|
return e.replace(/left|right|bottom|top/g, (t) => Jt[t]);
|
|
86
86
|
}
|
|
87
|
-
function
|
|
88
|
-
return
|
|
87
|
+
function ie(e) {
|
|
88
|
+
return A({
|
|
89
89
|
top: 0,
|
|
90
90
|
right: 0,
|
|
91
91
|
bottom: 0,
|
|
@@ -93,14 +93,14 @@ function oe(e) {
|
|
|
93
93
|
}, e);
|
|
94
94
|
}
|
|
95
95
|
function Bt(e) {
|
|
96
|
-
return typeof e != "number" ?
|
|
96
|
+
return typeof e != "number" ? ie(e) : {
|
|
97
97
|
top: e,
|
|
98
98
|
right: e,
|
|
99
99
|
bottom: e,
|
|
100
100
|
left: e
|
|
101
101
|
};
|
|
102
102
|
}
|
|
103
|
-
function
|
|
103
|
+
function rt(e) {
|
|
104
104
|
const {
|
|
105
105
|
x: t,
|
|
106
106
|
y: n,
|
|
@@ -118,12 +118,12 @@ function ot(e) {
|
|
|
118
118
|
y: n
|
|
119
119
|
};
|
|
120
120
|
}
|
|
121
|
-
function
|
|
121
|
+
function $t(e, t, n) {
|
|
122
122
|
let {
|
|
123
123
|
reference: i,
|
|
124
124
|
floating: o
|
|
125
125
|
} = e;
|
|
126
|
-
const s = yt(t), r = wt(t), c = xt(r), a =
|
|
126
|
+
const s = yt(t), r = wt(t), c = xt(r), a = et(t), l = s === "y", h = i.x + i.width / 2 - o.width / 2, f = i.y + i.height / 2 - o.height / 2, g = i[c] / 2 - o[c] / 2;
|
|
127
127
|
let d;
|
|
128
128
|
switch (a) {
|
|
129
129
|
case "top":
|
|
@@ -166,7 +166,7 @@ function Ot(e, t, n) {
|
|
|
166
166
|
}
|
|
167
167
|
return d;
|
|
168
168
|
}
|
|
169
|
-
const
|
|
169
|
+
const oe = (e, t, n) => D(void 0, null, function* () {
|
|
170
170
|
const {
|
|
171
171
|
placement: i = "bottom",
|
|
172
172
|
strategy: o = "absolute",
|
|
@@ -180,16 +180,16 @@ const se = (e, t, n) => A(void 0, null, function* () {
|
|
|
180
180
|
}), {
|
|
181
181
|
x: h,
|
|
182
182
|
y: f
|
|
183
|
-
} =
|
|
183
|
+
} = $t(l, i, a), g = i, d = {}, u = 0;
|
|
184
184
|
for (let p = 0; p < c.length; p++) {
|
|
185
185
|
const {
|
|
186
186
|
name: m,
|
|
187
187
|
fn: x
|
|
188
188
|
} = c[p], {
|
|
189
|
-
x:
|
|
190
|
-
y:
|
|
191
|
-
data:
|
|
192
|
-
reset:
|
|
189
|
+
x: _,
|
|
190
|
+
y: w,
|
|
191
|
+
data: C,
|
|
192
|
+
reset: v
|
|
193
193
|
} = yield x({
|
|
194
194
|
x: h,
|
|
195
195
|
y: f,
|
|
@@ -204,16 +204,16 @@ const se = (e, t, n) => A(void 0, null, function* () {
|
|
|
204
204
|
floating: t
|
|
205
205
|
}
|
|
206
206
|
});
|
|
207
|
-
h =
|
|
208
|
-
[m]:
|
|
209
|
-
}),
|
|
207
|
+
h = _ != null ? _ : h, f = w != null ? w : f, d = Q(A({}, d), {
|
|
208
|
+
[m]: A(A({}, d[m]), C)
|
|
209
|
+
}), v && u <= 50 && (u++, typeof v == "object" && (v.placement && (g = v.placement), v.rects && (l = v.rects === !0 ? yield r.getElementRects({
|
|
210
210
|
reference: e,
|
|
211
211
|
floating: t,
|
|
212
212
|
strategy: o
|
|
213
|
-
}) :
|
|
213
|
+
}) : v.rects), {
|
|
214
214
|
x: h,
|
|
215
215
|
y: f
|
|
216
|
-
} =
|
|
216
|
+
} = $t(l, g, a)), p = -1);
|
|
217
217
|
}
|
|
218
218
|
return {
|
|
219
219
|
x: h,
|
|
@@ -223,8 +223,8 @@ const se = (e, t, n) => A(void 0, null, function* () {
|
|
|
223
223
|
middlewareData: d
|
|
224
224
|
};
|
|
225
225
|
});
|
|
226
|
-
function
|
|
227
|
-
return
|
|
226
|
+
function se(e, t) {
|
|
227
|
+
return D(this, null, function* () {
|
|
228
228
|
var n;
|
|
229
229
|
t === void 0 && (t = {});
|
|
230
230
|
const {
|
|
@@ -240,41 +240,41 @@ function re(e, t) {
|
|
|
240
240
|
elementContext: f = "floating",
|
|
241
241
|
altBoundary: g = !1,
|
|
242
242
|
padding: d = 0
|
|
243
|
-
} =
|
|
243
|
+
} = ct(t, e), u = Bt(d), m = c[g ? f === "floating" ? "reference" : "floating" : f], x = rt(yield s.getClippingRect({
|
|
244
244
|
element: (n = yield s.isElement == null ? void 0 : s.isElement(m)) == null || n ? m : m.contextElement || (yield s.getDocumentElement == null ? void 0 : s.getDocumentElement(c.floating)),
|
|
245
245
|
boundary: l,
|
|
246
246
|
rootBoundary: h,
|
|
247
247
|
strategy: a
|
|
248
|
-
})),
|
|
248
|
+
})), _ = f === "floating" ? {
|
|
249
249
|
x: i,
|
|
250
250
|
y: o,
|
|
251
251
|
width: r.floating.width,
|
|
252
252
|
height: r.floating.height
|
|
253
|
-
} : r.reference,
|
|
253
|
+
} : r.reference, w = yield s.getOffsetParent == null ? void 0 : s.getOffsetParent(c.floating), C = (yield s.isElement == null ? void 0 : s.isElement(w)) ? (yield s.getScale == null ? void 0 : s.getScale(w)) || {
|
|
254
254
|
x: 1,
|
|
255
255
|
y: 1
|
|
256
256
|
} : {
|
|
257
257
|
x: 1,
|
|
258
258
|
y: 1
|
|
259
|
-
},
|
|
259
|
+
}, v = rt(s.convertOffsetParentRelativeRectToViewportRelativeRect ? yield s.convertOffsetParentRelativeRectToViewportRelativeRect({
|
|
260
260
|
elements: c,
|
|
261
|
-
rect:
|
|
262
|
-
offsetParent:
|
|
261
|
+
rect: _,
|
|
262
|
+
offsetParent: w,
|
|
263
263
|
strategy: a
|
|
264
|
-
}) :
|
|
264
|
+
}) : _);
|
|
265
265
|
return {
|
|
266
|
-
top: (x.top -
|
|
267
|
-
bottom: (
|
|
268
|
-
left: (x.left -
|
|
269
|
-
right: (
|
|
266
|
+
top: (x.top - v.top + u.top) / C.y,
|
|
267
|
+
bottom: (v.bottom - x.bottom + u.bottom) / C.y,
|
|
268
|
+
left: (x.left - v.left + u.left) / C.x,
|
|
269
|
+
right: (v.right - x.right + u.right) / C.x
|
|
270
270
|
};
|
|
271
271
|
});
|
|
272
272
|
}
|
|
273
|
-
const
|
|
273
|
+
const re = (e) => ({
|
|
274
274
|
name: "arrow",
|
|
275
275
|
options: e,
|
|
276
276
|
fn(n) {
|
|
277
|
-
return
|
|
277
|
+
return D(this, null, function* () {
|
|
278
278
|
const {
|
|
279
279
|
x: i,
|
|
280
280
|
y: o,
|
|
@@ -286,38 +286,38 @@ const ce = (e) => ({
|
|
|
286
286
|
} = n, {
|
|
287
287
|
element: h,
|
|
288
288
|
padding: f = 0
|
|
289
|
-
} =
|
|
289
|
+
} = ct(e, n) || {};
|
|
290
290
|
if (h == null)
|
|
291
291
|
return {};
|
|
292
292
|
const g = Bt(f), d = {
|
|
293
293
|
x: i,
|
|
294
294
|
y: o
|
|
295
|
-
}, u = wt(s), p = xt(u), m = yield c.getDimensions(h), x = u === "y",
|
|
296
|
-
let P =
|
|
297
|
-
(!P || !(yield c.isElement == null ? void 0 : c.isElement(
|
|
298
|
-
const
|
|
295
|
+
}, u = wt(s), p = xt(u), m = yield c.getDimensions(h), x = u === "y", _ = x ? "top" : "left", w = x ? "bottom" : "right", C = x ? "clientHeight" : "clientWidth", v = r.reference[p] + r.reference[u] - d[u] - r.floating[p], y = d[u] - r.reference[u], T = yield c.getOffsetParent == null ? void 0 : c.getOffsetParent(h);
|
|
296
|
+
let P = T ? T[C] : 0;
|
|
297
|
+
(!P || !(yield c.isElement == null ? void 0 : c.isElement(T))) && (P = a.floating[C] || r.floating[p]);
|
|
298
|
+
const z = v / 2 - y / 2, H = P / 2 - m[p] / 2 - 1, I = Z(g[_], H), S = Z(g[w], H), L = I, Y = P - m[p] - S, $ = P / 2 - m[p] / 2 + z, q = Zt(L, $, Y), J = !l.arrow && M(s) != null && $ !== q && r.reference[p] / 2 - ($ < L ? I : S) - m[p] / 2 < 0, ht = J ? $ < L ? $ - L : $ - Y : 0;
|
|
299
299
|
return {
|
|
300
300
|
[u]: d[u] + ht,
|
|
301
|
-
data:
|
|
302
|
-
[u]:
|
|
303
|
-
centerOffset:
|
|
304
|
-
},
|
|
301
|
+
data: A({
|
|
302
|
+
[u]: q,
|
|
303
|
+
centerOffset: $ - q - ht
|
|
304
|
+
}, J && {
|
|
305
305
|
alignmentOffset: ht
|
|
306
306
|
}),
|
|
307
|
-
reset:
|
|
307
|
+
reset: J
|
|
308
308
|
};
|
|
309
309
|
});
|
|
310
310
|
}
|
|
311
311
|
});
|
|
312
|
-
function
|
|
313
|
-
return (e ? [...n.filter((o) => M(o) === e), ...n.filter((o) => M(o) !== e)] : n.filter((o) =>
|
|
312
|
+
function ce(e, t, n) {
|
|
313
|
+
return (e ? [...n.filter((o) => M(o) === e), ...n.filter((o) => M(o) !== e)] : n.filter((o) => et(o) === o)).filter((o) => e ? M(o) === e || (t ? ne(o) !== o : !1) : !0);
|
|
314
314
|
}
|
|
315
|
-
const
|
|
315
|
+
const le = function(e) {
|
|
316
316
|
return e === void 0 && (e = {}), {
|
|
317
317
|
name: "autoPlacement",
|
|
318
318
|
options: e,
|
|
319
319
|
fn(n) {
|
|
320
|
-
return
|
|
320
|
+
return D(this, null, function* () {
|
|
321
321
|
var i, o, s;
|
|
322
322
|
const {
|
|
323
323
|
rects: r,
|
|
@@ -325,75 +325,75 @@ const ae = function(e) {
|
|
|
325
325
|
placement: a,
|
|
326
326
|
platform: l,
|
|
327
327
|
elements: h
|
|
328
|
-
} = n,
|
|
328
|
+
} = n, I = ct(e, n), {
|
|
329
329
|
crossAxis: f = !1,
|
|
330
330
|
alignment: g,
|
|
331
|
-
allowedPlacements: d =
|
|
331
|
+
allowedPlacements: d = Ot,
|
|
332
332
|
autoAlignment: u = !0
|
|
333
|
-
} =
|
|
333
|
+
} = I, p = Et(I, [
|
|
334
334
|
"crossAxis",
|
|
335
335
|
"alignment",
|
|
336
336
|
"allowedPlacements",
|
|
337
337
|
"autoAlignment"
|
|
338
|
-
]), m = g !== void 0 || d ===
|
|
339
|
-
if (
|
|
338
|
+
]), m = g !== void 0 || d === Ot ? ce(g || null, u, d) : d, x = yield se(n, p), _ = ((i = c.autoPlacement) == null ? void 0 : i.index) || 0, w = m[_];
|
|
339
|
+
if (w == null)
|
|
340
340
|
return {};
|
|
341
|
-
const
|
|
342
|
-
if (a !==
|
|
341
|
+
const C = ee(w, r, yield l.isRTL == null ? void 0 : l.isRTL(h.floating));
|
|
342
|
+
if (a !== w)
|
|
343
343
|
return {
|
|
344
344
|
reset: {
|
|
345
345
|
placement: m[0]
|
|
346
346
|
}
|
|
347
347
|
};
|
|
348
|
-
const
|
|
349
|
-
placement:
|
|
350
|
-
overflows:
|
|
351
|
-
}],
|
|
352
|
-
if (
|
|
348
|
+
const v = [x[et(w)], x[C[0]], x[C[1]]], y = [...((o = c.autoPlacement) == null ? void 0 : o.overflows) || [], {
|
|
349
|
+
placement: w,
|
|
350
|
+
overflows: v
|
|
351
|
+
}], T = m[_ + 1];
|
|
352
|
+
if (T)
|
|
353
353
|
return {
|
|
354
354
|
data: {
|
|
355
|
-
index:
|
|
356
|
-
overflows:
|
|
355
|
+
index: _ + 1,
|
|
356
|
+
overflows: y
|
|
357
357
|
},
|
|
358
358
|
reset: {
|
|
359
|
-
placement:
|
|
359
|
+
placement: T
|
|
360
360
|
}
|
|
361
361
|
};
|
|
362
|
-
const P =
|
|
363
|
-
const
|
|
364
|
-
return [
|
|
362
|
+
const P = y.map((S) => {
|
|
363
|
+
const L = M(S.placement);
|
|
364
|
+
return [S.placement, L && f ? (
|
|
365
365
|
// Check along the mainAxis and main crossAxis side.
|
|
366
|
-
|
|
366
|
+
S.overflows.slice(0, 2).reduce((Y, $) => Y + $, 0)
|
|
367
367
|
) : (
|
|
368
368
|
// Check only the mainAxis.
|
|
369
|
-
|
|
370
|
-
),
|
|
371
|
-
}).sort((
|
|
369
|
+
S.overflows[0]
|
|
370
|
+
), S.overflows];
|
|
371
|
+
}).sort((S, L) => S[1] - L[1]), H = ((s = P.filter((S) => S[2].slice(
|
|
372
372
|
0,
|
|
373
373
|
// Aligned placements should not check their opposite crossAxis
|
|
374
374
|
// side.
|
|
375
|
-
M(
|
|
376
|
-
).every((
|
|
377
|
-
return
|
|
375
|
+
M(S[0]) ? 2 : 3
|
|
376
|
+
).every((L) => L <= 0))[0]) == null ? void 0 : s[0]) || P[0][0];
|
|
377
|
+
return H !== a ? {
|
|
378
378
|
data: {
|
|
379
|
-
index:
|
|
380
|
-
overflows:
|
|
379
|
+
index: _ + 1,
|
|
380
|
+
overflows: y
|
|
381
381
|
},
|
|
382
382
|
reset: {
|
|
383
|
-
placement:
|
|
383
|
+
placement: H
|
|
384
384
|
}
|
|
385
385
|
} : {};
|
|
386
386
|
});
|
|
387
387
|
}
|
|
388
388
|
};
|
|
389
389
|
};
|
|
390
|
-
function
|
|
391
|
-
return
|
|
390
|
+
function ae(e, t) {
|
|
391
|
+
return D(this, null, function* () {
|
|
392
392
|
const {
|
|
393
393
|
placement: n,
|
|
394
394
|
platform: i,
|
|
395
395
|
elements: o
|
|
396
|
-
} = e, s = yield i.isRTL == null ? void 0 : i.isRTL(o.floating), r =
|
|
396
|
+
} = e, s = yield i.isRTL == null ? void 0 : i.isRTL(o.floating), r = et(n), c = M(n), a = yt(n) === "y", l = ["left", "top"].includes(r) ? -1 : 1, h = s && a ? -1 : 1, f = ct(t, e);
|
|
397
397
|
let {
|
|
398
398
|
mainAxis: g,
|
|
399
399
|
crossAxis: d,
|
|
@@ -416,23 +416,23 @@ function fe(e, t) {
|
|
|
416
416
|
};
|
|
417
417
|
});
|
|
418
418
|
}
|
|
419
|
-
const
|
|
419
|
+
const fe = function(e) {
|
|
420
420
|
return e === void 0 && (e = 0), {
|
|
421
421
|
name: "offset",
|
|
422
422
|
options: e,
|
|
423
423
|
fn(n) {
|
|
424
|
-
return
|
|
424
|
+
return D(this, null, function* () {
|
|
425
425
|
var i, o;
|
|
426
426
|
const {
|
|
427
427
|
x: s,
|
|
428
428
|
y: r,
|
|
429
429
|
placement: c,
|
|
430
430
|
middlewareData: a
|
|
431
|
-
} = n, l = yield
|
|
431
|
+
} = n, l = yield ae(n, e);
|
|
432
432
|
return c === ((i = a.offset) == null ? void 0 : i.placement) && (o = a.arrow) != null && o.alignmentOffset ? {} : {
|
|
433
433
|
x: s + l.x,
|
|
434
434
|
y: r + l.y,
|
|
435
|
-
data:
|
|
435
|
+
data: Q(A({}, l), {
|
|
436
436
|
placement: c
|
|
437
437
|
})
|
|
438
438
|
};
|
|
@@ -440,10 +440,10 @@ const he = function(e) {
|
|
|
440
440
|
}
|
|
441
441
|
};
|
|
442
442
|
};
|
|
443
|
-
function
|
|
443
|
+
function lt() {
|
|
444
444
|
return typeof window != "undefined";
|
|
445
445
|
}
|
|
446
|
-
function
|
|
446
|
+
function G(e) {
|
|
447
447
|
return Ft(e) ? (e.nodeName || "").toLowerCase() : "#document";
|
|
448
448
|
}
|
|
449
449
|
function R(e) {
|
|
@@ -455,30 +455,30 @@ function W(e) {
|
|
|
455
455
|
return (t = (Ft(e) ? e.ownerDocument : e.document) || window.document) == null ? void 0 : t.documentElement;
|
|
456
456
|
}
|
|
457
457
|
function Ft(e) {
|
|
458
|
-
return
|
|
458
|
+
return lt() ? e instanceof Node || e instanceof R(e).Node : !1;
|
|
459
459
|
}
|
|
460
|
-
function
|
|
461
|
-
return
|
|
460
|
+
function k(e) {
|
|
461
|
+
return lt() ? e instanceof Element || e instanceof R(e).Element : !1;
|
|
462
462
|
}
|
|
463
|
-
function
|
|
464
|
-
return
|
|
463
|
+
function F(e) {
|
|
464
|
+
return lt() ? e instanceof HTMLElement || e instanceof R(e).HTMLElement : !1;
|
|
465
465
|
}
|
|
466
|
-
function
|
|
467
|
-
return !
|
|
466
|
+
function At(e) {
|
|
467
|
+
return !lt() || typeof ShadowRoot == "undefined" ? !1 : e instanceof ShadowRoot || e instanceof R(e).ShadowRoot;
|
|
468
468
|
}
|
|
469
|
-
function
|
|
469
|
+
function nt(e) {
|
|
470
470
|
const {
|
|
471
471
|
overflow: t,
|
|
472
472
|
overflowX: n,
|
|
473
473
|
overflowY: i,
|
|
474
474
|
display: o
|
|
475
|
-
} =
|
|
475
|
+
} = N(e);
|
|
476
476
|
return /auto|scroll|overlay|hidden|clip/.test(t + i + n) && !["inline", "contents"].includes(o);
|
|
477
477
|
}
|
|
478
|
-
function
|
|
479
|
-
return ["table", "td", "th"].includes(
|
|
478
|
+
function he(e) {
|
|
479
|
+
return ["table", "td", "th"].includes(G(e));
|
|
480
480
|
}
|
|
481
|
-
function
|
|
481
|
+
function at(e) {
|
|
482
482
|
return [":popover-open", ":modal"].some((t) => {
|
|
483
483
|
try {
|
|
484
484
|
return e.matches(t);
|
|
@@ -488,31 +488,31 @@ function ct(e) {
|
|
|
488
488
|
});
|
|
489
489
|
}
|
|
490
490
|
function vt(e) {
|
|
491
|
-
const t =
|
|
491
|
+
const t = bt(), n = k(e) ? N(e) : e;
|
|
492
492
|
return n.transform !== "none" || n.perspective !== "none" || (n.containerType ? n.containerType !== "normal" : !1) || !t && (n.backdropFilter ? n.backdropFilter !== "none" : !1) || !t && (n.filter ? n.filter !== "none" : !1) || ["transform", "perspective", "filter"].some((i) => (n.willChange || "").includes(i)) || ["paint", "layout", "strict", "content"].some((i) => (n.contain || "").includes(i));
|
|
493
493
|
}
|
|
494
|
-
function
|
|
494
|
+
function de(e) {
|
|
495
495
|
let t = j(e);
|
|
496
|
-
for (;
|
|
496
|
+
for (; F(t) && !X(t); ) {
|
|
497
497
|
if (vt(t))
|
|
498
498
|
return t;
|
|
499
|
-
if (
|
|
499
|
+
if (at(t))
|
|
500
500
|
return null;
|
|
501
501
|
t = j(t);
|
|
502
502
|
}
|
|
503
503
|
return null;
|
|
504
504
|
}
|
|
505
|
-
function
|
|
505
|
+
function bt() {
|
|
506
506
|
return typeof CSS == "undefined" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none");
|
|
507
507
|
}
|
|
508
|
-
function
|
|
509
|
-
return ["html", "body", "#document"].includes(
|
|
508
|
+
function X(e) {
|
|
509
|
+
return ["html", "body", "#document"].includes(G(e));
|
|
510
510
|
}
|
|
511
|
-
function
|
|
511
|
+
function N(e) {
|
|
512
512
|
return R(e).getComputedStyle(e);
|
|
513
513
|
}
|
|
514
|
-
function
|
|
515
|
-
return
|
|
514
|
+
function ft(e) {
|
|
515
|
+
return k(e) ? {
|
|
516
516
|
scrollLeft: e.scrollLeft,
|
|
517
517
|
scrollTop: e.scrollTop
|
|
518
518
|
} : {
|
|
@@ -521,20 +521,20 @@ function lt(e) {
|
|
|
521
521
|
};
|
|
522
522
|
}
|
|
523
523
|
function j(e) {
|
|
524
|
-
if (
|
|
524
|
+
if (G(e) === "html")
|
|
525
525
|
return e;
|
|
526
526
|
const t = (
|
|
527
527
|
// Step into the shadow DOM of the parent of a slotted node.
|
|
528
528
|
e.assignedSlot || // DOM Element detected.
|
|
529
529
|
e.parentNode || // ShadowRoot detected.
|
|
530
|
-
|
|
530
|
+
At(e) && e.host || // Fallback.
|
|
531
531
|
W(e)
|
|
532
532
|
);
|
|
533
|
-
return
|
|
533
|
+
return At(t) ? t.host : t;
|
|
534
534
|
}
|
|
535
535
|
function Ht(e) {
|
|
536
536
|
const t = j(e);
|
|
537
|
-
return
|
|
537
|
+
return X(t) ? e.ownerDocument ? e.ownerDocument.body : e.body : F(t) && nt(t) ? t : Ht(t);
|
|
538
538
|
}
|
|
539
539
|
function pt(e, t, n) {
|
|
540
540
|
var i;
|
|
@@ -542,7 +542,7 @@ function pt(e, t, n) {
|
|
|
542
542
|
const o = Ht(e), s = o === ((i = e.ownerDocument) == null ? void 0 : i.body), r = R(o);
|
|
543
543
|
if (s) {
|
|
544
544
|
const c = mt(r);
|
|
545
|
-
return t.concat(r, r.visualViewport || [],
|
|
545
|
+
return t.concat(r, r.visualViewport || [], nt(o) ? o : [], c && n ? pt(c) : []);
|
|
546
546
|
}
|
|
547
547
|
return t.concat(o, pt(o, [], n));
|
|
548
548
|
}
|
|
@@ -550,9 +550,9 @@ function mt(e) {
|
|
|
550
550
|
return e.parent && Object.getPrototypeOf(e.parent) ? e.frameElement : null;
|
|
551
551
|
}
|
|
552
552
|
function Mt(e) {
|
|
553
|
-
const t =
|
|
553
|
+
const t = N(e);
|
|
554
554
|
let n = parseFloat(t.width) || 0, i = parseFloat(t.height) || 0;
|
|
555
|
-
const o =
|
|
555
|
+
const o = F(e), s = o ? e.offsetWidth : n, r = o ? e.offsetHeight : i, c = st(n) !== s || st(i) !== r;
|
|
556
556
|
return c && (n = s, i = r), {
|
|
557
557
|
width: n,
|
|
558
558
|
height: i,
|
|
@@ -560,91 +560,91 @@ function Mt(e) {
|
|
|
560
560
|
};
|
|
561
561
|
}
|
|
562
562
|
function Vt(e) {
|
|
563
|
-
return
|
|
563
|
+
return k(e) ? e : e.contextElement;
|
|
564
564
|
}
|
|
565
|
-
function
|
|
565
|
+
function K(e) {
|
|
566
566
|
const t = Vt(e);
|
|
567
|
-
if (!
|
|
568
|
-
return
|
|
567
|
+
if (!F(t))
|
|
568
|
+
return B(1);
|
|
569
569
|
const n = t.getBoundingClientRect(), {
|
|
570
570
|
width: i,
|
|
571
571
|
height: o,
|
|
572
572
|
$: s
|
|
573
573
|
} = Mt(t);
|
|
574
|
-
let r = (s ?
|
|
574
|
+
let r = (s ? st(n.width) : n.width) / i, c = (s ? st(n.height) : n.height) / o;
|
|
575
575
|
return (!r || !Number.isFinite(r)) && (r = 1), (!c || !Number.isFinite(c)) && (c = 1), {
|
|
576
576
|
x: r,
|
|
577
577
|
y: c
|
|
578
578
|
};
|
|
579
579
|
}
|
|
580
|
-
const
|
|
580
|
+
const ue = /* @__PURE__ */ B(0);
|
|
581
581
|
function Wt(e) {
|
|
582
582
|
const t = R(e);
|
|
583
|
-
return !
|
|
583
|
+
return !bt() || !t.visualViewport ? ue : {
|
|
584
584
|
x: t.visualViewport.offsetLeft,
|
|
585
585
|
y: t.visualViewport.offsetTop
|
|
586
586
|
};
|
|
587
587
|
}
|
|
588
|
-
function
|
|
588
|
+
function ge(e, t, n) {
|
|
589
589
|
return t === void 0 && (t = !1), !n || t && n !== R(e) ? !1 : t;
|
|
590
590
|
}
|
|
591
|
-
function
|
|
591
|
+
function tt(e, t, n, i) {
|
|
592
592
|
t === void 0 && (t = !1), n === void 0 && (n = !1);
|
|
593
593
|
const o = e.getBoundingClientRect(), s = Vt(e);
|
|
594
|
-
let r =
|
|
595
|
-
t && (i ?
|
|
596
|
-
const c =
|
|
594
|
+
let r = B(1);
|
|
595
|
+
t && (i ? k(i) && (r = K(i)) : r = K(e));
|
|
596
|
+
const c = ge(s, n, i) ? Wt(s) : B(0);
|
|
597
597
|
let a = (o.left + c.x) / r.x, l = (o.top + c.y) / r.y, h = o.width / r.x, f = o.height / r.y;
|
|
598
598
|
if (s) {
|
|
599
|
-
const g = R(s), d = i &&
|
|
599
|
+
const g = R(s), d = i && k(i) ? R(i) : i;
|
|
600
600
|
let u = g, p = mt(u);
|
|
601
601
|
for (; p && i && d !== u; ) {
|
|
602
|
-
const m =
|
|
603
|
-
a *= m.x, l *= m.y, h *= m.x, f *= m.y, a +=
|
|
602
|
+
const m = K(p), x = p.getBoundingClientRect(), _ = N(p), w = x.left + (p.clientLeft + parseFloat(_.paddingLeft)) * m.x, C = x.top + (p.clientTop + parseFloat(_.paddingTop)) * m.y;
|
|
603
|
+
a *= m.x, l *= m.y, h *= m.x, f *= m.y, a += w, l += C, u = R(p), p = mt(u);
|
|
604
604
|
}
|
|
605
605
|
}
|
|
606
|
-
return
|
|
606
|
+
return rt({
|
|
607
607
|
width: h,
|
|
608
608
|
height: f,
|
|
609
609
|
x: a,
|
|
610
610
|
y: l
|
|
611
611
|
});
|
|
612
612
|
}
|
|
613
|
-
function
|
|
614
|
-
const n =
|
|
615
|
-
return t ? t.left + n :
|
|
613
|
+
function _t(e, t) {
|
|
614
|
+
const n = ft(e).scrollLeft;
|
|
615
|
+
return t ? t.left + n : tt(W(e)).left + n;
|
|
616
616
|
}
|
|
617
|
-
function
|
|
617
|
+
function zt(e, t, n) {
|
|
618
618
|
n === void 0 && (n = !1);
|
|
619
619
|
const i = e.getBoundingClientRect(), o = i.left + t.scrollLeft - (n ? 0 : (
|
|
620
620
|
// RTL <body> scrollbar.
|
|
621
|
-
|
|
621
|
+
_t(e, i)
|
|
622
622
|
)), s = i.top + t.scrollTop;
|
|
623
623
|
return {
|
|
624
624
|
x: o,
|
|
625
625
|
y: s
|
|
626
626
|
};
|
|
627
627
|
}
|
|
628
|
-
function
|
|
628
|
+
function pe(e) {
|
|
629
629
|
let {
|
|
630
630
|
elements: t,
|
|
631
631
|
rect: n,
|
|
632
632
|
offsetParent: i,
|
|
633
633
|
strategy: o
|
|
634
634
|
} = e;
|
|
635
|
-
const s = o === "fixed", r = W(i), c = t ?
|
|
635
|
+
const s = o === "fixed", r = W(i), c = t ? at(t.floating) : !1;
|
|
636
636
|
if (i === r || c && s)
|
|
637
637
|
return n;
|
|
638
638
|
let a = {
|
|
639
639
|
scrollLeft: 0,
|
|
640
640
|
scrollTop: 0
|
|
641
|
-
}, l =
|
|
642
|
-
const h =
|
|
643
|
-
if ((f || !f && !s) && ((
|
|
644
|
-
const d =
|
|
645
|
-
l =
|
|
641
|
+
}, l = B(1);
|
|
642
|
+
const h = B(0), f = F(i);
|
|
643
|
+
if ((f || !f && !s) && ((G(i) !== "body" || nt(r)) && (a = ft(i)), F(i))) {
|
|
644
|
+
const d = tt(i);
|
|
645
|
+
l = K(i), h.x = d.x + i.clientLeft, h.y = d.y + i.clientTop;
|
|
646
646
|
}
|
|
647
|
-
const g = r && !f && !s ?
|
|
647
|
+
const g = r && !f && !s ? zt(r, a, !0) : B(0);
|
|
648
648
|
return {
|
|
649
649
|
width: n.width * l.x,
|
|
650
650
|
height: n.height * l.y,
|
|
@@ -652,26 +652,26 @@ function me(e) {
|
|
|
652
652
|
y: n.y * l.y - a.scrollTop * l.y + h.y + g.y
|
|
653
653
|
};
|
|
654
654
|
}
|
|
655
|
-
function
|
|
655
|
+
function me(e) {
|
|
656
656
|
return Array.from(e.getClientRects());
|
|
657
657
|
}
|
|
658
|
-
function
|
|
659
|
-
const t = W(e), n =
|
|
660
|
-
let r = -n.scrollLeft +
|
|
658
|
+
function xe(e) {
|
|
659
|
+
const t = W(e), n = ft(e), i = e.ownerDocument.body, o = U(t.scrollWidth, t.clientWidth, i.scrollWidth, i.clientWidth), s = U(t.scrollHeight, t.clientHeight, i.scrollHeight, i.clientHeight);
|
|
660
|
+
let r = -n.scrollLeft + _t(e);
|
|
661
661
|
const c = -n.scrollTop;
|
|
662
|
-
return
|
|
662
|
+
return N(i).direction === "rtl" && (r += U(t.clientWidth, i.clientWidth) - o), {
|
|
663
663
|
width: o,
|
|
664
664
|
height: s,
|
|
665
665
|
x: r,
|
|
666
666
|
y: c
|
|
667
667
|
};
|
|
668
668
|
}
|
|
669
|
-
function
|
|
669
|
+
function ye(e, t) {
|
|
670
670
|
const n = R(e), i = W(e), o = n.visualViewport;
|
|
671
671
|
let s = i.clientWidth, r = i.clientHeight, c = 0, a = 0;
|
|
672
672
|
if (o) {
|
|
673
673
|
s = o.width, r = o.height;
|
|
674
|
-
const l =
|
|
674
|
+
const l = bt();
|
|
675
675
|
(!l || l && t === "fixed") && (c = o.offsetLeft, a = o.offsetTop);
|
|
676
676
|
}
|
|
677
677
|
return {
|
|
@@ -681,8 +681,8 @@ function we(e, t) {
|
|
|
681
681
|
y: a
|
|
682
682
|
};
|
|
683
683
|
}
|
|
684
|
-
function
|
|
685
|
-
const n =
|
|
684
|
+
function we(e, t) {
|
|
685
|
+
const n = tt(e, !0, t === "fixed"), i = n.top + e.clientTop, o = n.left + e.clientLeft, s = F(e) ? K(e) : B(1), r = e.clientWidth * s.x, c = e.clientHeight * s.y, a = o * s.x, l = i * s.y;
|
|
686
686
|
return {
|
|
687
687
|
width: r,
|
|
688
688
|
height: c,
|
|
@@ -690,14 +690,14 @@ function ve(e, t) {
|
|
|
690
690
|
y: l
|
|
691
691
|
};
|
|
692
692
|
}
|
|
693
|
-
function
|
|
693
|
+
function Dt(e, t, n) {
|
|
694
694
|
let i;
|
|
695
695
|
if (t === "viewport")
|
|
696
|
-
i =
|
|
696
|
+
i = ye(e, n);
|
|
697
697
|
else if (t === "document")
|
|
698
|
-
i =
|
|
699
|
-
else if (
|
|
700
|
-
i =
|
|
698
|
+
i = xe(W(e));
|
|
699
|
+
else if (k(t))
|
|
700
|
+
i = we(t, n);
|
|
701
701
|
else {
|
|
702
702
|
const o = Wt(e);
|
|
703
703
|
i = {
|
|
@@ -707,22 +707,22 @@ function At(e, t, n) {
|
|
|
707
707
|
height: t.height
|
|
708
708
|
};
|
|
709
709
|
}
|
|
710
|
-
return
|
|
710
|
+
return rt(i);
|
|
711
711
|
}
|
|
712
|
-
function
|
|
712
|
+
function It(e, t) {
|
|
713
713
|
const n = j(e);
|
|
714
|
-
return n === t || !
|
|
714
|
+
return n === t || !k(n) || X(n) ? !1 : N(n).position === "fixed" || It(n, t);
|
|
715
715
|
}
|
|
716
|
-
function
|
|
716
|
+
function ve(e, t) {
|
|
717
717
|
const n = t.get(e);
|
|
718
718
|
if (n)
|
|
719
719
|
return n;
|
|
720
|
-
let i = pt(e, [], !1).filter((c) =>
|
|
721
|
-
const s =
|
|
720
|
+
let i = pt(e, [], !1).filter((c) => k(c) && G(c) !== "body"), o = null;
|
|
721
|
+
const s = N(e).position === "fixed";
|
|
722
722
|
let r = s ? j(e) : e;
|
|
723
|
-
for (;
|
|
724
|
-
const c =
|
|
725
|
-
!a && c.position === "fixed" && (o = null), (s ? !a && !o : !a && c.position === "static" && !!o && ["absolute", "fixed"].includes(o.position) ||
|
|
723
|
+
for (; k(r) && !X(r); ) {
|
|
724
|
+
const c = N(r), a = vt(r);
|
|
725
|
+
!a && c.position === "fixed" && (o = null), (s ? !a && !o : !a && c.position === "static" && !!o && ["absolute", "fixed"].includes(o.position) || nt(r) && !a && It(e, r)) ? i = i.filter((h) => h !== r) : o = c, r = j(r);
|
|
726
726
|
}
|
|
727
727
|
return t.set(e, i), i;
|
|
728
728
|
}
|
|
@@ -733,10 +733,10 @@ function be(e) {
|
|
|
733
733
|
rootBoundary: i,
|
|
734
734
|
strategy: o
|
|
735
735
|
} = e;
|
|
736
|
-
const r = [...n === "clippingAncestors" ?
|
|
737
|
-
const f =
|
|
738
|
-
return l.top =
|
|
739
|
-
},
|
|
736
|
+
const r = [...n === "clippingAncestors" ? at(t) ? [] : ve(t, this._c) : [].concat(n), i], c = r[0], a = r.reduce((l, h) => {
|
|
737
|
+
const f = Dt(t, h, o);
|
|
738
|
+
return l.top = U(f.top, l.top), l.right = Z(f.right, l.right), l.bottom = Z(f.bottom, l.bottom), l.left = U(f.left, l.left), l;
|
|
739
|
+
}, Dt(t, c, o));
|
|
740
740
|
return {
|
|
741
741
|
width: a.right - a.left,
|
|
742
742
|
height: a.bottom - a.top,
|
|
@@ -744,7 +744,7 @@ function be(e) {
|
|
|
744
744
|
y: a.top
|
|
745
745
|
};
|
|
746
746
|
}
|
|
747
|
-
function
|
|
747
|
+
function _e(e) {
|
|
748
748
|
const {
|
|
749
749
|
width: t,
|
|
750
750
|
height: n
|
|
@@ -755,18 +755,18 @@ function Se(e) {
|
|
|
755
755
|
};
|
|
756
756
|
}
|
|
757
757
|
function Ce(e, t, n) {
|
|
758
|
-
const i =
|
|
758
|
+
const i = F(t), o = W(t), s = n === "fixed", r = tt(e, !0, s, t);
|
|
759
759
|
let c = {
|
|
760
760
|
scrollLeft: 0,
|
|
761
761
|
scrollTop: 0
|
|
762
762
|
};
|
|
763
|
-
const a =
|
|
763
|
+
const a = B(0);
|
|
764
764
|
if (i || !i && !s)
|
|
765
|
-
if ((
|
|
766
|
-
const g =
|
|
765
|
+
if ((G(t) !== "body" || nt(o)) && (c = ft(t)), i) {
|
|
766
|
+
const g = tt(t, !0, s, t);
|
|
767
767
|
a.x = g.x + t.clientLeft, a.y = g.y + t.clientTop;
|
|
768
|
-
} else o && (a.x =
|
|
769
|
-
const l = o && !i && !s ?
|
|
768
|
+
} else o && (a.x = _t(o));
|
|
769
|
+
const l = o && !i && !s ? zt(o, c) : B(0), h = r.left + c.scrollLeft - a.x - l.x, f = r.top + c.scrollTop - a.y - l.y;
|
|
770
770
|
return {
|
|
771
771
|
x: h,
|
|
772
772
|
y: f,
|
|
@@ -775,10 +775,10 @@ function Ce(e, t, n) {
|
|
|
775
775
|
};
|
|
776
776
|
}
|
|
777
777
|
function ut(e) {
|
|
778
|
-
return
|
|
778
|
+
return N(e).position === "static";
|
|
779
779
|
}
|
|
780
|
-
function
|
|
781
|
-
if (!
|
|
780
|
+
function kt(e, t) {
|
|
781
|
+
if (!F(e) || N(e).position === "fixed")
|
|
782
782
|
return null;
|
|
783
783
|
if (t)
|
|
784
784
|
return t(e);
|
|
@@ -787,24 +787,24 @@ function Dt(e, t) {
|
|
|
787
787
|
}
|
|
788
788
|
function jt(e, t) {
|
|
789
789
|
const n = R(e);
|
|
790
|
-
if (
|
|
790
|
+
if (at(e))
|
|
791
791
|
return n;
|
|
792
|
-
if (!
|
|
792
|
+
if (!F(e)) {
|
|
793
793
|
let o = j(e);
|
|
794
|
-
for (; o && !
|
|
795
|
-
if (
|
|
794
|
+
for (; o && !X(o); ) {
|
|
795
|
+
if (k(o) && !ut(o))
|
|
796
796
|
return o;
|
|
797
797
|
o = j(o);
|
|
798
798
|
}
|
|
799
799
|
return n;
|
|
800
800
|
}
|
|
801
|
-
let i =
|
|
802
|
-
for (; i &&
|
|
803
|
-
i =
|
|
804
|
-
return i &&
|
|
801
|
+
let i = kt(e, t);
|
|
802
|
+
for (; i && he(i) && ut(i); )
|
|
803
|
+
i = kt(i, t);
|
|
804
|
+
return i && X(i) && ut(i) && !vt(i) ? n : i || de(e) || n;
|
|
805
805
|
}
|
|
806
|
-
const
|
|
807
|
-
return
|
|
806
|
+
const Se = function(e) {
|
|
807
|
+
return D(this, null, function* () {
|
|
808
808
|
const t = this.getOffsetParent || jt, n = this.getDimensions, i = yield n(e.floating);
|
|
809
809
|
return {
|
|
810
810
|
reference: Ce(e.reference, yield t(e.floating), e.strategy),
|
|
@@ -817,37 +817,37 @@ const Le = function(e) {
|
|
|
817
817
|
};
|
|
818
818
|
});
|
|
819
819
|
};
|
|
820
|
-
function
|
|
821
|
-
return
|
|
820
|
+
function Te(e) {
|
|
821
|
+
return N(e).direction === "rtl";
|
|
822
822
|
}
|
|
823
|
-
const
|
|
824
|
-
convertOffsetParentRelativeRectToViewportRelativeRect:
|
|
823
|
+
const Pe = {
|
|
824
|
+
convertOffsetParentRelativeRectToViewportRelativeRect: pe,
|
|
825
825
|
getDocumentElement: W,
|
|
826
826
|
getClippingRect: be,
|
|
827
827
|
getOffsetParent: jt,
|
|
828
|
-
getElementRects:
|
|
829
|
-
getClientRects:
|
|
830
|
-
getDimensions:
|
|
831
|
-
getScale:
|
|
832
|
-
isElement:
|
|
833
|
-
isRTL:
|
|
834
|
-
}, Ee =
|
|
835
|
-
const i = /* @__PURE__ */ new Map(), o =
|
|
836
|
-
platform:
|
|
837
|
-
}, n), s =
|
|
828
|
+
getElementRects: Se,
|
|
829
|
+
getClientRects: me,
|
|
830
|
+
getDimensions: _e,
|
|
831
|
+
getScale: K,
|
|
832
|
+
isElement: k,
|
|
833
|
+
isRTL: Te
|
|
834
|
+
}, Ee = fe, Le = le, Oe = re, Re = (e, t, n) => {
|
|
835
|
+
const i = /* @__PURE__ */ new Map(), o = A({
|
|
836
|
+
platform: Pe
|
|
837
|
+
}, n), s = Q(A({}, o.platform), {
|
|
838
838
|
_c: i
|
|
839
839
|
});
|
|
840
|
-
return
|
|
840
|
+
return oe(e, t, Q(A({}, o), {
|
|
841
841
|
platform: s
|
|
842
842
|
}));
|
|
843
843
|
};
|
|
844
844
|
function V(e) {
|
|
845
845
|
return e === null || typeof e == "undefined";
|
|
846
846
|
}
|
|
847
|
-
function
|
|
847
|
+
function E(e) {
|
|
848
848
|
return !V(e);
|
|
849
849
|
}
|
|
850
|
-
function
|
|
850
|
+
function Nt(e) {
|
|
851
851
|
return new Promise((t) => setTimeout(t, e));
|
|
852
852
|
}
|
|
853
853
|
function Yt(e) {
|
|
@@ -855,33 +855,33 @@ function Yt(e) {
|
|
|
855
855
|
const t = e.parentElement;
|
|
856
856
|
return !t || t.nodeName === "HTML" ? !1 : ((i = document.defaultView) == null ? void 0 : i.getComputedStyle(e, null).getPropertyValue("position")) === "fixed" ? !0 : Yt(t);
|
|
857
857
|
}
|
|
858
|
-
function
|
|
858
|
+
function Ct(e) {
|
|
859
859
|
return Yt(e) ? "fixed" : "absolute";
|
|
860
860
|
}
|
|
861
|
-
class
|
|
861
|
+
class $e {
|
|
862
862
|
/** @inheritdoc */
|
|
863
863
|
renderContent(t, n, i) {
|
|
864
864
|
t.querySelector(`.${i.classPrefix}-content`).appendChild(n.node);
|
|
865
865
|
}
|
|
866
866
|
}
|
|
867
|
-
function
|
|
867
|
+
function O(e, t) {
|
|
868
868
|
const n = document.createElement(e);
|
|
869
869
|
return t && t.length > 0 && (t = t.filter((i) => i), n.classList.add(...t)), n;
|
|
870
870
|
}
|
|
871
|
-
class
|
|
871
|
+
class Ae {
|
|
872
872
|
/** @inheritdoc */
|
|
873
873
|
renderContent(t, n, i) {
|
|
874
874
|
var s, r, c, a;
|
|
875
875
|
const o = t.querySelector(`.${i.classPrefix}-content`);
|
|
876
876
|
if (n.imgSrc) {
|
|
877
|
-
const l =
|
|
877
|
+
const l = O("img", [
|
|
878
878
|
`${i.classPrefix}-image`,
|
|
879
879
|
`${(r = (s = n.customization) == null ? void 0 : s.imageClass) != null ? r : ""}`
|
|
880
880
|
]);
|
|
881
881
|
l.src = n.imgSrc, o.appendChild(l);
|
|
882
882
|
}
|
|
883
883
|
if (n.text) {
|
|
884
|
-
const l =
|
|
884
|
+
const l = O("p", [
|
|
885
885
|
`${i.classPrefix}-description`,
|
|
886
886
|
`${(a = (c = n.customization) == null ? void 0 : c.descriptionClass) != null ? a : ""}`
|
|
887
887
|
]);
|
|
@@ -889,74 +889,74 @@ class De {
|
|
|
889
889
|
}
|
|
890
890
|
}
|
|
891
891
|
}
|
|
892
|
-
function
|
|
893
|
-
var c, a, l, h, f, g, d, u, p, m, x,
|
|
892
|
+
function De(e, t, n) {
|
|
893
|
+
var c, a, l, h, f, g, d, u, p, m, x, _, w, C, v;
|
|
894
894
|
if (e.innerHTML = "", e.className = `${(c = n.config.class) != null ? c : ""} ${n.config.classPrefix} ${n.config.animationClass}`, !n.config.arrow.disable && ((a = n.activeStep) != null && a.hasHost)) {
|
|
895
|
-
const
|
|
895
|
+
const y = O("div", [
|
|
896
896
|
(l = n.config.arrow.class) != null ? l : "",
|
|
897
897
|
`${n.config.classPrefix}-arrow`
|
|
898
898
|
]);
|
|
899
|
-
e.appendChild(
|
|
899
|
+
e.appendChild(y);
|
|
900
900
|
}
|
|
901
901
|
(h = t.customization) != null && h.class && e.classList.add(t.customization.class);
|
|
902
|
-
const i =
|
|
902
|
+
const i = O("div", [
|
|
903
903
|
`${n.config.classPrefix}-header`,
|
|
904
904
|
`${(g = (f = t.customization) == null ? void 0 : f.headerClass) != null ? g : ""}`
|
|
905
905
|
]);
|
|
906
906
|
e.appendChild(i);
|
|
907
|
-
const o =
|
|
907
|
+
const o = O("h1", [
|
|
908
908
|
`${n.config.classPrefix}-title`,
|
|
909
909
|
`${(u = (d = t.customization) == null ? void 0 : d.titleClass) != null ? u : ""}`
|
|
910
910
|
]);
|
|
911
911
|
o.innerHTML = n.config.translateFn((p = t.title) != null ? p : ""), i.appendChild(o), n.config.close.button && (n.config.closeIcon.onclick = n.complete.bind(n), i.appendChild(n.config.closeIcon));
|
|
912
|
-
const s =
|
|
912
|
+
const s = O("div", [
|
|
913
913
|
`${n.config.classPrefix}-content`,
|
|
914
914
|
`${(x = (m = t.customization) == null ? void 0 : m.contentClass) != null ? x : ""}`
|
|
915
915
|
]);
|
|
916
916
|
e.appendChild(s);
|
|
917
|
-
const r =
|
|
917
|
+
const r = O("div", [
|
|
918
918
|
`${n.config.classPrefix}-footer`,
|
|
919
|
-
`${(
|
|
919
|
+
`${(w = (_ = t.customization) == null ? void 0 : _.footerClass) != null ? w : ""}`
|
|
920
920
|
]);
|
|
921
|
-
if (V(t.buttonList) && (t.buttonList =
|
|
922
|
-
var
|
|
923
|
-
const
|
|
924
|
-
V(
|
|
925
|
-
const P =
|
|
926
|
-
P.innerHTML = n.config.translateFn(
|
|
927
|
-
|
|
921
|
+
if (V(t.buttonList) && (t.buttonList = ke(n)), t.buttonList.forEach((y) => {
|
|
922
|
+
var z;
|
|
923
|
+
const T = [`${n.config.classPrefix}-button`, (z = y.class) != null ? z : ""];
|
|
924
|
+
V(y.type) || y.type === "secondary" ? T.push(`${n.config.classPrefix}-button-secondary`) : y.type === "primary" ? T.push(`${n.config.classPrefix}-button-primary`) : y.type === "link" && T.push(`${n.config.classPrefix}-button-link`), !V(y.class) && y.class !== "" && T.push(y.class);
|
|
925
|
+
const P = O("button", T);
|
|
926
|
+
P.innerHTML = n.config.translateFn(y.text), P.onclick = (H) => {
|
|
927
|
+
y.action.call(n);
|
|
928
928
|
}, r.appendChild(P);
|
|
929
|
-
}), !n.config.progress.disable && n.config.progress.text &&
|
|
930
|
-
const
|
|
929
|
+
}), !n.config.progress.disable && n.config.progress.text && E(n.activeStepIndex)) {
|
|
930
|
+
const y = O("p", [
|
|
931
931
|
`${n.config.classPrefix}-progress`,
|
|
932
|
-
`${(
|
|
932
|
+
`${(v = (C = t.customization) == null ? void 0 : C.progressClass) != null ? v : ""}`
|
|
933
933
|
]);
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
), r.appendChild(
|
|
934
|
+
y.innerHTML = n.config.translateFn(
|
|
935
|
+
Ne(n.config.progress.text, n.activeStepIndex + 1, n.stepList.length)
|
|
936
|
+
), r.appendChild(y);
|
|
937
937
|
}
|
|
938
938
|
e.appendChild(r);
|
|
939
939
|
}
|
|
940
|
-
function
|
|
940
|
+
function ke(e) {
|
|
941
941
|
return [
|
|
942
942
|
{
|
|
943
|
-
text:
|
|
943
|
+
text: e.config.buttons.prevText,
|
|
944
944
|
action: e.prev
|
|
945
945
|
},
|
|
946
946
|
{
|
|
947
|
-
text:
|
|
947
|
+
text: e.config.buttons.nextText,
|
|
948
948
|
type: "primary",
|
|
949
949
|
action: e.next
|
|
950
950
|
}
|
|
951
951
|
];
|
|
952
952
|
}
|
|
953
|
-
function
|
|
953
|
+
function Ne(e, t, n) {
|
|
954
954
|
return e.replace("{{currentStep}}", t.toString()).replace("{{totalSteps}}", n.toString());
|
|
955
955
|
}
|
|
956
|
-
class
|
|
956
|
+
class Be {
|
|
957
957
|
constructor() {
|
|
958
|
-
|
|
959
|
-
|
|
958
|
+
b(this, "_renderContentStrategy", /* @__PURE__ */ new Map());
|
|
959
|
+
b(this, "_staticSides", {
|
|
960
960
|
top: "bottom",
|
|
961
961
|
right: "left",
|
|
962
962
|
bottom: "top",
|
|
@@ -970,19 +970,19 @@ class Fe {
|
|
|
970
970
|
var o, s;
|
|
971
971
|
if (!this._renderContentStrategy.has(n.popupData.type))
|
|
972
972
|
throw new Error("Missing popup creator strategy");
|
|
973
|
-
t.style.display = "none", t.classList.remove(n.tour.config.animationClass), n.hostElement ? t.style.position =
|
|
974
|
-
}).then(() => n.isFirst && n.direction === "toNext" ?
|
|
973
|
+
t.style.display = "none", t.classList.remove(n.tour.config.animationClass), n.hostElement ? t.style.position = Ct(n.hostElement) : t.style.position = "fixed", De(t, n.popupData, n.tour), (o = this._renderContentStrategy.get(n.popupData.type)) == null || o.renderContent(t, n.popupData, n.tour.config), (s = n.hostElement) == null || s.scrollIntoView(n.tour.config.scrollTo), i();
|
|
974
|
+
}).then(() => n.isFirst && n.direction === "toNext" ? Nt(0) : Nt(400)).then(() => {
|
|
975
975
|
t.style.display = "flex", this.updatePosition(t, n), t.classList.add(n.tour.config.animationClass);
|
|
976
976
|
});
|
|
977
977
|
}
|
|
978
978
|
/** @inheritdoc */
|
|
979
979
|
updatePosition(t, n) {
|
|
980
|
-
|
|
980
|
+
E(n.hostElement) ? this.renderFloatingPopup(t, n) : this.renderCenterPopup(t);
|
|
981
981
|
}
|
|
982
982
|
renderFloatingPopup(t, n) {
|
|
983
983
|
var l;
|
|
984
|
-
const i = t.style.position === "fixed" ? window.scrollY || document.documentElement.scrollTop : 0, o = t.querySelector(`.${n.tour.config.classPrefix}-arrow`), s = [], r =
|
|
985
|
-
s.push(Ee(a)), (n.popupData.position === "auto" || V(r)) && s.push(
|
|
984
|
+
const i = t.style.position === "fixed" ? window.scrollY || document.documentElement.scrollTop : 0, o = t.querySelector(`.${n.tour.config.classPrefix}-arrow`), s = [], r = E(n.popupData.position) && n.popupData.position !== "auto" ? n.popupData.position : void 0, c = (l = o == null ? void 0 : o.offsetWidth) != null ? l : 10, a = Math.sqrt(2 * Pt(c, 2)) / 2 + n.tour.config.highlight.padding;
|
|
985
|
+
s.push(Ee(a)), (n.popupData.position === "auto" || V(r)) && s.push(Le()), !n.tour.config.arrow.disable && E(o) && s.push(Oe({ element: o })), Re(n.hostElement, t, {
|
|
986
986
|
placement: r,
|
|
987
987
|
middleware: [...s]
|
|
988
988
|
}).then(({ x: h, y: f, middlewareData: g, placement: d }) => {
|
|
@@ -993,7 +993,7 @@ class Fe {
|
|
|
993
993
|
marginLeft: "0"
|
|
994
994
|
});
|
|
995
995
|
const u = d.split("-")[0], p = this._staticSides[u];
|
|
996
|
-
if (g.arrow &&
|
|
996
|
+
if (g.arrow && E(o)) {
|
|
997
997
|
const { x: m, y: x } = g.arrow;
|
|
998
998
|
Object.assign(o.style, {
|
|
999
999
|
left: m != null ? `${m}px` : "",
|
|
@@ -1015,14 +1015,14 @@ class Fe {
|
|
|
1015
1015
|
});
|
|
1016
1016
|
}
|
|
1017
1017
|
setUpStrategies() {
|
|
1018
|
-
this._renderContentStrategy.set("text", new
|
|
1018
|
+
this._renderContentStrategy.set("text", new Ae()), this._renderContentStrategy.set("custom", new $e());
|
|
1019
1019
|
}
|
|
1020
1020
|
}
|
|
1021
|
-
class
|
|
1021
|
+
class Fe {
|
|
1022
1022
|
/** @inheritdoc */
|
|
1023
1023
|
render(t, n) {
|
|
1024
1024
|
return new Promise((i) => {
|
|
1025
|
-
n.hostElement && (t.style.position =
|
|
1025
|
+
n.hostElement && (t.style.position = Ct(n.hostElement)), i();
|
|
1026
1026
|
}).then(() => {
|
|
1027
1027
|
this.updatePosition(t, n);
|
|
1028
1028
|
});
|
|
@@ -1039,35 +1039,44 @@ class Nt {
|
|
|
1039
1039
|
}
|
|
1040
1040
|
}
|
|
1041
1041
|
class He {
|
|
1042
|
+
/** @inheritdoc */
|
|
1043
|
+
render(t, n) {
|
|
1044
|
+
return new Promise((i) => {
|
|
1045
|
+
n.hostElement && (t.style.position = Ct(n.hostElement)), i();
|
|
1046
|
+
}).then(() => {
|
|
1047
|
+
this.updatePosition(t, n);
|
|
1048
|
+
});
|
|
1049
|
+
}
|
|
1050
|
+
/** @inheritdoc */
|
|
1051
|
+
updatePosition(t, n) {
|
|
1052
|
+
var r, c;
|
|
1053
|
+
if (!n.hostElement) {
|
|
1054
|
+
t.style.width = "0", t.style.height = "0", t.style.top = "50%", t.style.left = "50%", t.style.transform = "translate(-50%, -50%)";
|
|
1055
|
+
return;
|
|
1056
|
+
}
|
|
1057
|
+
const i = n.hostElement.getBoundingClientRect(), o = (c = (r = n.tour.config.highlight) == null ? void 0 : r.padding) != null ? c : 8, s = t.style.position === "fixed" ? 0 : window.scrollY || document.documentElement.scrollTop;
|
|
1058
|
+
t.style.transform = "", t.style.left = `${i.left - o}px`, t.style.top = `${i.top + s - o}px`, t.style.width = `${i.width + 2 * o}px`, t.style.height = `${i.height + 2 * o}px`;
|
|
1059
|
+
}
|
|
1060
|
+
}
|
|
1061
|
+
class Me {
|
|
1042
1062
|
constructor(t, n) {
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
y(this, "_popupRenderer");
|
|
1050
|
-
y(this, "_highlightRenderer");
|
|
1051
|
-
y(this, "_intersectionRenderer");
|
|
1063
|
+
b(this, "popupData");
|
|
1064
|
+
b(this, "tour");
|
|
1065
|
+
b(this, "_index");
|
|
1066
|
+
b(this, "_hostElement", null);
|
|
1067
|
+
b(this, "_direction", "toNext");
|
|
1068
|
+
b(this, "_hostData");
|
|
1052
1069
|
var i;
|
|
1053
|
-
this.popupData = n.popup, this.tour = t, this._index = (i = n.index) != null ? i : null, this._hostData = n.host
|
|
1070
|
+
this.popupData = n.popup, this.tour = t, this._index = (i = n.index) != null ? i : null, this._hostData = n.host;
|
|
1054
1071
|
}
|
|
1055
1072
|
get isFirst() {
|
|
1056
|
-
return this.
|
|
1057
|
-
}
|
|
1058
|
-
get nextStep() {
|
|
1059
|
-
var t;
|
|
1060
|
-
return (t = this.tour.stepList[this.tour.stepList.indexOf(this) + 1]) != null ? t : null;
|
|
1061
|
-
}
|
|
1062
|
-
get prevStep() {
|
|
1063
|
-
var t;
|
|
1064
|
-
return (t = this.tour.stepList[this.tour.stepList.indexOf(this) - 1]) != null ? t : null;
|
|
1073
|
+
return this.tour.stepList.indexOf(this) === 0;
|
|
1065
1074
|
}
|
|
1066
1075
|
get direction() {
|
|
1067
1076
|
return this._direction;
|
|
1068
1077
|
}
|
|
1069
1078
|
get hasHost() {
|
|
1070
|
-
return
|
|
1079
|
+
return E(this._hostElement);
|
|
1071
1080
|
}
|
|
1072
1081
|
get hostElement() {
|
|
1073
1082
|
return this._hostElement;
|
|
@@ -1079,23 +1088,23 @@ class He {
|
|
|
1079
1088
|
this._index = t;
|
|
1080
1089
|
}
|
|
1081
1090
|
show(t) {
|
|
1082
|
-
return
|
|
1091
|
+
return D(this, null, function* () {
|
|
1083
1092
|
var i;
|
|
1084
1093
|
if (V(this.tour.popup))
|
|
1085
1094
|
return;
|
|
1086
1095
|
this._direction = t, this._hostData && (this._hostElement = this.resolveHostElement(
|
|
1087
1096
|
typeof this._hostData == "function" ? this._hostData() : (i = this._hostData) != null ? i : null
|
|
1088
1097
|
));
|
|
1089
|
-
const n = [this.
|
|
1090
|
-
!this.tour.config.interaction.disable &&
|
|
1098
|
+
const n = [this.tour.popupRenderer.render(this.tour.popup, this)];
|
|
1099
|
+
!this.tour.config.interaction.disable && E(this.tour.interaction) && n.push(this.tour.interactionRenderer.render(this.tour.interaction, this)), !this.tour.config.highlight.disable && !V(this.tour.highlight) && n.push(this.tour.highlightRenderer.render(this.tour.highlight, this)), this.tour.config.highlight.disable && E(this.tour.highlight) && this.tour.highlightRenderer.render(this.tour.highlight, {}), yield Promise.all(n), this.toggleHostClass(!0);
|
|
1091
1100
|
});
|
|
1092
1101
|
}
|
|
1093
1102
|
hide() {
|
|
1094
|
-
return
|
|
1095
|
-
this.
|
|
1103
|
+
return D(this, null, function* () {
|
|
1104
|
+
this.toggleHostClass(!1);
|
|
1096
1105
|
});
|
|
1097
1106
|
}
|
|
1098
|
-
|
|
1107
|
+
toggleHostClass(t) {
|
|
1099
1108
|
V(this._hostElement) || (t ? this._hostElement.classList.add("siteguide-host") : this._hostElement.classList.remove("siteguide-host"));
|
|
1100
1109
|
}
|
|
1101
1110
|
resolveHostElement(t) {
|
|
@@ -1105,23 +1114,23 @@ class He {
|
|
|
1105
1114
|
function gt(e) {
|
|
1106
1115
|
return e && typeof e == "object" && !Array.isArray(e);
|
|
1107
1116
|
}
|
|
1108
|
-
function
|
|
1109
|
-
const n =
|
|
1117
|
+
function qt(e, t) {
|
|
1118
|
+
const n = A({}, e);
|
|
1110
1119
|
return gt(e) && gt(t) && Object.keys(t).forEach((i) => {
|
|
1111
1120
|
const o = i, s = i;
|
|
1112
|
-
gt(t[o]) ? (s in e || Object.assign(n, { [s]: {} }), n[s] =
|
|
1121
|
+
gt(t[o]) ? (s in e || Object.assign(n, { [s]: {} }), n[s] = qt(e[s], t[o])) : Object.assign(n, { [s]: t[o] });
|
|
1113
1122
|
}), n;
|
|
1114
1123
|
}
|
|
1115
|
-
function
|
|
1116
|
-
const t =
|
|
1124
|
+
function Ve(e) {
|
|
1125
|
+
const t = O("button", [`${e}-close`]);
|
|
1117
1126
|
return t.innerHTML = "✖", t;
|
|
1118
1127
|
}
|
|
1119
|
-
class
|
|
1128
|
+
class We {
|
|
1120
1129
|
constructor() {
|
|
1121
|
-
|
|
1130
|
+
b(this, "_activeTour", null);
|
|
1122
1131
|
}
|
|
1123
1132
|
get isActive() {
|
|
1124
|
-
return
|
|
1133
|
+
return E(this.activeTour);
|
|
1125
1134
|
}
|
|
1126
1135
|
get activeTour() {
|
|
1127
1136
|
return this._activeTour;
|
|
@@ -1130,61 +1139,65 @@ class Ve {
|
|
|
1130
1139
|
this._activeTour = t;
|
|
1131
1140
|
}
|
|
1132
1141
|
}
|
|
1133
|
-
const
|
|
1142
|
+
const ot = new We();
|
|
1134
1143
|
class Ie {
|
|
1135
1144
|
constructor(t) {
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1145
|
+
b(this, "popupRenderer", new Be());
|
|
1146
|
+
b(this, "highlightRenderer", new Fe());
|
|
1147
|
+
b(this, "interactionRenderer", new He());
|
|
1148
|
+
b(this, "_popup", null);
|
|
1149
|
+
b(this, "_highlight", null);
|
|
1150
|
+
b(this, "_interaction", null);
|
|
1151
|
+
b(this, "_stepList", []);
|
|
1152
|
+
b(this, "_activeStep", null);
|
|
1153
|
+
b(this, "_bodyResizeObserver");
|
|
1154
|
+
b(this, "_config");
|
|
1155
|
+
b(this, "closeOnEsc", (t) => {
|
|
1147
1156
|
t.key === "Escape" && this.complete();
|
|
1148
1157
|
});
|
|
1149
|
-
|
|
1158
|
+
b(this, "keyboardControl", (t) => {
|
|
1150
1159
|
t.key === "ArrowRight" ? this.next() : t.key === "ArrowLeft" && this.prev();
|
|
1151
1160
|
});
|
|
1152
|
-
var n, i, o, s, r, c, a, l, h, f, g, d, u, p, m, x,
|
|
1161
|
+
var n, i, o, s, r, c, a, l, h, f, g, d, u, p, m, x, _, w, C, v, y, T, P, z, H, I, S, L, Y, $, q;
|
|
1153
1162
|
this._bodyResizeObserver = this.getBodyResizeObserver(), this._config = {
|
|
1154
1163
|
classPrefix: (n = t.classPrefix) != null ? n : "siteguide",
|
|
1155
1164
|
class: "",
|
|
1156
|
-
|
|
1165
|
+
buttons: {
|
|
1166
|
+
nextText: (o = (i = t.buttons) == null ? void 0 : i.nextText) != null ? o : "Next",
|
|
1167
|
+
prevText: (r = (s = t.buttons) == null ? void 0 : s.prevText) != null ? r : "Back"
|
|
1168
|
+
},
|
|
1169
|
+
animationClass: (c = t.animationClass) != null ? c : "siteguide-animation",
|
|
1157
1170
|
close: {
|
|
1158
|
-
button: (
|
|
1159
|
-
clickout: (
|
|
1160
|
-
esc: (
|
|
1171
|
+
button: (l = (a = t.close) == null ? void 0 : a.button) != null ? l : !0,
|
|
1172
|
+
clickout: (f = (h = t.close) == null ? void 0 : h.clickout) != null ? f : !1,
|
|
1173
|
+
esc: (d = (g = t.close) == null ? void 0 : g.esc) != null ? d : !0
|
|
1161
1174
|
},
|
|
1162
1175
|
// @ts-expect-error
|
|
1163
|
-
scrollTo: (
|
|
1176
|
+
scrollTo: (u = t.scrollTo) != null ? u : {
|
|
1164
1177
|
behavior: "smooth",
|
|
1165
1178
|
block: "center",
|
|
1166
1179
|
inline: "center"
|
|
1167
1180
|
},
|
|
1168
1181
|
// @ts-expect-error
|
|
1169
|
-
closeIcon: (
|
|
1182
|
+
closeIcon: (m = t.closeIcon) != null ? m : Ve((p = t.classPrefix) != null ? p : "siteguide"),
|
|
1170
1183
|
arrow: {
|
|
1171
|
-
disable: (
|
|
1172
|
-
class: (
|
|
1184
|
+
disable: (_ = (x = t.arrow) == null ? void 0 : x.disable) != null ? _ : !1,
|
|
1185
|
+
class: (C = (w = t.arrow) == null ? void 0 : w.class) != null ? C : ""
|
|
1173
1186
|
},
|
|
1174
1187
|
highlight: {
|
|
1175
|
-
disable: (
|
|
1176
|
-
padding: (
|
|
1177
|
-
class: (
|
|
1188
|
+
disable: (y = (v = t.highlight) == null ? void 0 : v.disable) != null ? y : !1,
|
|
1189
|
+
padding: (P = (T = t.highlight) == null ? void 0 : T.padding) != null ? P : 8,
|
|
1190
|
+
class: (H = (z = t.highlight) == null ? void 0 : z.class) != null ? H : ""
|
|
1178
1191
|
},
|
|
1179
1192
|
progress: {
|
|
1180
|
-
disable: (
|
|
1193
|
+
disable: (S = (I = t.progress) == null ? void 0 : I.disable) != null ? S : !0,
|
|
1181
1194
|
text: "Step {{currentStep}} of {{totalSteps}}"
|
|
1182
1195
|
},
|
|
1183
1196
|
interaction: {
|
|
1184
|
-
disable: (
|
|
1197
|
+
disable: (Y = (L = t.interaction) == null ? void 0 : L.disable) != null ? Y : !1
|
|
1185
1198
|
},
|
|
1186
|
-
keyboardControl: (
|
|
1187
|
-
translateFn: (
|
|
1199
|
+
keyboardControl: ($ = t.keyboardControl) != null ? $ : !1,
|
|
1200
|
+
translateFn: (q = t.translateFn) != null ? q : (J) => J
|
|
1188
1201
|
};
|
|
1189
1202
|
}
|
|
1190
1203
|
get stepList() {
|
|
@@ -1199,8 +1212,8 @@ class Ie {
|
|
|
1199
1212
|
get highlight() {
|
|
1200
1213
|
return this._highlight;
|
|
1201
1214
|
}
|
|
1202
|
-
get
|
|
1203
|
-
return this.
|
|
1215
|
+
get interaction() {
|
|
1216
|
+
return this._interaction;
|
|
1204
1217
|
}
|
|
1205
1218
|
get activeStep() {
|
|
1206
1219
|
return this._activeStep;
|
|
@@ -1213,7 +1226,7 @@ class Ie {
|
|
|
1213
1226
|
const i = this._stepList.reduce((o, s) => s.index !== null && s.index !== void 0 && s.index > o ? s.index : o, -1);
|
|
1214
1227
|
t.index = i + 1;
|
|
1215
1228
|
}
|
|
1216
|
-
const n = new
|
|
1229
|
+
const n = new Me(this, t);
|
|
1217
1230
|
this._stepList.push(n), this._stepList.sort((i, o) => i.index - o.index);
|
|
1218
1231
|
}
|
|
1219
1232
|
addSteps(t) {
|
|
@@ -1223,17 +1236,17 @@ class Ie {
|
|
|
1223
1236
|
this._stepList = this._stepList.filter((n) => t !== n.index);
|
|
1224
1237
|
}
|
|
1225
1238
|
start() {
|
|
1226
|
-
|
|
1239
|
+
ot.isActive || (this.config.close.esc && document.addEventListener("keydown", this.closeOnEsc), this.config.keyboardControl && document.addEventListener("keydown", this.keyboardControl), ot.setActiveTour(this), this._popup = O("div", [this._config.classPrefix]), document.body.appendChild(this._popup), this._config.highlight.disable || (this._highlight = O("div", [
|
|
1227
1240
|
this._config.highlight.class,
|
|
1228
1241
|
`${this._config.classPrefix}-highlight`
|
|
1229
|
-
]), document.body.appendChild(this._highlight)), this._config.interaction.disable || (this.
|
|
1242
|
+
]), document.body.appendChild(this._highlight)), this._config.interaction.disable || (this._interaction = O("div", ["siteguide-intersection"]), document.body.appendChild(this._interaction)), this.next());
|
|
1230
1243
|
}
|
|
1231
1244
|
complete() {
|
|
1232
1245
|
var t;
|
|
1233
|
-
this._popup && document.body.removeChild(this._popup), this._highlight && document.body.removeChild(this._highlight), (t = this._activeStep) == null || t.hide(), this._activeStep = null,
|
|
1246
|
+
this._popup && document.body.removeChild(this._popup), this._highlight && document.body.removeChild(this._highlight), (t = this._activeStep) == null || t.hide(), this._activeStep = null, ot.setActiveTour(null), this.config.close.esc && document.removeEventListener("keydown", this.closeOnEsc), this.config.keyboardControl && document.removeEventListener("keydown", this.keyboardControl);
|
|
1234
1247
|
}
|
|
1235
1248
|
prev() {
|
|
1236
|
-
const t =
|
|
1249
|
+
const t = E(this._activeStep) ? this._stepList.indexOf(this._activeStep) - 1 : this._stepList.indexOf(this._stepList[this._stepList.length - 1]);
|
|
1237
1250
|
if (t < 0) {
|
|
1238
1251
|
this.complete();
|
|
1239
1252
|
return;
|
|
@@ -1241,14 +1254,14 @@ class Ie {
|
|
|
1241
1254
|
this.changeStepTo(t, "fromBack");
|
|
1242
1255
|
}
|
|
1243
1256
|
next() {
|
|
1244
|
-
return
|
|
1257
|
+
return D(this, null, function* () {
|
|
1245
1258
|
var n, i, o;
|
|
1246
|
-
const t =
|
|
1259
|
+
const t = E(this._activeStep) ? this._stepList.indexOf(this._activeStep) + 1 : this._stepList.indexOf(this._stepList[0]);
|
|
1247
1260
|
if (t >= this._stepList.length) {
|
|
1248
1261
|
this.complete();
|
|
1249
1262
|
return;
|
|
1250
1263
|
}
|
|
1251
|
-
|
|
1264
|
+
E((n = this._activeStep) == null ? void 0 : n.popupData.allowNext) && !((o = yield (i = this._activeStep) == null ? void 0 : i.popupData.allowNext.call(this)) == null || o) || this.changeStepTo(t, "toNext");
|
|
1252
1265
|
});
|
|
1253
1266
|
}
|
|
1254
1267
|
goTo(t) {
|
|
@@ -1260,7 +1273,7 @@ class Ie {
|
|
|
1260
1273
|
this.changeStepTo(t, t > ((n = this.activeStepIndex) != null ? n : -1) ? "toNext" : "fromBack");
|
|
1261
1274
|
}
|
|
1262
1275
|
setConfig(t) {
|
|
1263
|
-
this._config =
|
|
1276
|
+
this._config = qt(this._config, t);
|
|
1264
1277
|
}
|
|
1265
1278
|
changeStepTo(t, n) {
|
|
1266
1279
|
var i;
|
|
@@ -1268,15 +1281,15 @@ class Ie {
|
|
|
1268
1281
|
}
|
|
1269
1282
|
getBodyResizeObserver() {
|
|
1270
1283
|
const t = new ResizeObserver(() => {
|
|
1271
|
-
this._activeStep && (
|
|
1284
|
+
this._activeStep && (E(this._popup) && this.popupRenderer.updatePosition(this._popup, this._activeStep), E(this._highlight) && !this.config.highlight.disable && this.highlightRenderer.updatePosition(this._highlight, this._activeStep));
|
|
1272
1285
|
});
|
|
1273
1286
|
return t.observe(document.body), t;
|
|
1274
1287
|
}
|
|
1275
1288
|
}
|
|
1276
|
-
const
|
|
1289
|
+
const je = ot;
|
|
1277
1290
|
export {
|
|
1278
|
-
|
|
1291
|
+
je as Siteguide,
|
|
1279
1292
|
Ie as Tour,
|
|
1280
|
-
|
|
1281
|
-
|
|
1293
|
+
Me as TourStep,
|
|
1294
|
+
O as createElement
|
|
1282
1295
|
};
|