@tempots/beatui 0.34.0 → 0.35.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/beatui.css +34 -7
- package/dist/beatui.tailwind.css +34 -7
- package/dist/{index-BXjEbt8G.js → index-C2rz3G1d.js} +1886 -1874
- package/dist/{index-BBIdmCak.cjs → index-CCu0qfNP.cjs} +1 -1
- package/dist/{index-HIb25Ti2.cjs → index-CZQHL_pf.cjs} +21 -21
- package/dist/{index-xdCnysNz.js → index-C_nSdynJ.js} +1 -1
- package/dist/index.cjs.js +4 -4
- package/dist/index.es.js +440 -413
- package/dist/prosemirror/index.cjs.js +1 -1
- package/dist/prosemirror/index.es.js +1 -1
- package/dist/types/components/content/native-pdf-preview.d.ts +12 -2
- package/dist/types/components/overlay/ribbon.d.ts +5 -2
- package/dist/types/components/prosemirror/prosemirror-markdown-input.d.ts +2 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { prop as Z, html as p, attr as s, computedOf as S, Use as te, Empty as R, Value as
|
|
1
|
+
import { prop as Z, html as p, attr as s, computedOf as S, Use as te, Empty as R, Value as g, WithElement as ne, Fragment as N, aria as L, OnDispose as X, OneOfValue as Xt, on as I, style as y, coalesce as Ge, When as re, ForEach as Ie, Ensure as Re, OneOfType as Ct, dataAttr as Qe, NotEmpty as Jt, input as se, emitValue as j, emitValueAsDate as en, Portal as It, WithProvider as tn, Task as nn, Provide as $t, makeProviderMark as an, MapSignal as Tt, svg as lt, svgAttr as rt } from "@tempots/dom";
|
|
2
2
|
import { Use as Vs } from "@tempots/dom";
|
|
3
|
-
import { PopOver as sn, ElementRect as Ve, WindowSize as ln, Query as rn, Location as
|
|
3
|
+
import { PopOver as sn, ElementRect as Ve, WindowSize as ln, Query as rn, Location as Pe, NavigationService as on, Anchor as Xe } from "@tempots/ui";
|
|
4
4
|
import { a as oe, c as ge, h as Ee, I as Q, B as ot, b as J, C as ae, L as Je, t as it, g as ut, i as ct } from "./translations-iam7PITs.js";
|
|
5
5
|
import { v as Ms, T as Ls, j as Bs, d as Ns, f as Es, p as Os, o as Fs, l as Rs, u as Hs, w as Us, k as js, q as zs, m as Ws, n as Ys, r as qs, s as Zs } from "./translations-iam7PITs.js";
|
|
6
6
|
import { T as _t, a as un } from "./theme-B5pmbvQ_.js";
|
|
7
|
-
import { t as Ks, am as Qs, f as Xs, J as Js, c as el, N as tl, I as nl, K as al, d as sl, k as ll, b as rl, a as ol, ab as il, o as ul, a0 as cl, ae as dl, q as pl, H as fl, A as bl, al as ml, g as gl, E as hl, x as vl, aj as yl, $ as xl, a4 as wl, j as Sl, i as kl, h as Cl, Y as Il, X as $l, Q as Tl, P as _l, S as
|
|
8
|
-
import { C as et, s as pe, m as
|
|
9
|
-
import { A as xr, g as wr, b as Sr, D as kr, E as Cr, v as Ir, L as $r, M as Tr, x as _r, N as
|
|
7
|
+
import { t as Ks, am as Qs, f as Xs, J as Js, c as el, N as tl, I as nl, K as al, d as sl, k as ll, b as rl, a as ol, ab as il, o as ul, a0 as cl, ae as dl, q as pl, H as fl, A as bl, al as ml, g as gl, E as hl, x as vl, aj as yl, $ as xl, a4 as wl, j as Sl, i as kl, h as Cl, Y as Il, X as $l, Q as Tl, P as _l, S as Pl, R as Dl, W as Vl, V as Al, U as Ml, T as Ll, a8 as Bl, a7 as Nl, aa as El, a9 as Ol, n as Fl, m as Rl, l as Hl, _ as Ul, Z as jl, ad as zl, p as Wl, G as Yl, z as ql, ak as Zl, D as Gl, C as Kl, w as Ql, v as Xl, ai as Jl, ah as er, e as tr, a3 as nr, a2 as ar, M as sr, L as lr, a5 as rr, a6 as or, r as ir, O as ur, ac as cr, s as dr, F as pr, y as fr, ag as br, B as mr, u as gr, af as hr, a1 as vr } from "./index-DJJ67-RV.js";
|
|
8
|
+
import { C as et, s as pe, m as Pt, d as Dt, I as tt, B as Vt, c as At, S as nt, e as cn } from "./notice-Cd9ElXwb.js";
|
|
9
|
+
import { A as xr, g as wr, b as Sr, D as kr, E as Cr, v as Ir, L as $r, M as Tr, x as _r, N as Pr, i as Dr, P as Vr, R as Ar, n as Mr, q as Lr, o as Br, k as Nr, j as Er, f as Or, p as Fr, h as Rr, r as Hr, t as Ur, l as jr, u as zr, w as Wr } from "./notice-Cd9ElXwb.js";
|
|
10
10
|
import { S as dn, G as Mt, E as pn, F as fn, N as Lt, a as fe, M as $e, e as dt, n as bn, W as le, d as mn } from "./utils-g5YCiiS6.js";
|
|
11
|
-
import { g as qr, i as Zr, B as Gr, l as Kr, O as Qr, C as Xr, j as Jr, L as eo, k as to, m as no, o as ao, p as so, I as lo, q as ro, w as oo, r as io, A as uo, H as co, s as po, u as fo, z as bo, K as mo, v as go, R as ho, D as vo, x as yo, T as xo, y as wo, b as So, U as ko, J as Co, P as Io, Q as $o, V as To, h as _o, c as
|
|
11
|
+
import { g as qr, i as Zr, B as Gr, l as Kr, O as Qr, C as Xr, j as Jr, L as eo, k as to, m as no, o as ao, p as so, I as lo, q as ro, w as oo, r as io, A as uo, H as co, s as po, u as fo, z as bo, K as mo, v as go, R as ho, D as vo, x as yo, T as xo, y as wo, b as So, U as ko, J as Co, P as Io, Q as $o, V as To, h as _o, c as Po, t as Do, f as Vo } from "./utils-g5YCiiS6.js";
|
|
12
12
|
import { g as Oe, x as pt } from "./timer-DzWb416P.js";
|
|
13
|
-
import { u as
|
|
13
|
+
import { u as De, A as Ke, O as Bt, F as gn } from "./modal-Dm61yY5i.js";
|
|
14
14
|
import { B as Mo, C as Lo, M as Bo, a as No, S as Eo, b as Oo, c as Fo, o as Ro, s as Ho, e as Uo, d as jo, f as zo } from "./modal-Dm61yY5i.js";
|
|
15
15
|
import { L as Yo } from "./link-portal-Cr2l9f3k.js";
|
|
16
16
|
import { g as hn } from "./colors-WfmhQ5e1.js";
|
|
@@ -71,8 +71,8 @@ function ka(e, n) {
|
|
|
71
71
|
const t = ft(e), a = ft(n);
|
|
72
72
|
if (!t || !a) return null;
|
|
73
73
|
const l = (o, d, f) => {
|
|
74
|
-
const [x,
|
|
75
|
-
return 0.2126 * x + 0.7152 *
|
|
74
|
+
const [x, b, h] = [o, d, f].map((v) => (v = v / 255, v <= 0.03928 ? v / 12.92 : Math.pow((v + 0.055) / 1.055, 2.4)));
|
|
75
|
+
return 0.2126 * x + 0.7152 * b + 0.0722 * h;
|
|
76
76
|
}, r = l(t.r, t.g, t.b), u = l(a.r, a.g, a.b), c = Math.max(r, u), i = Math.min(r, u);
|
|
77
77
|
return (c + 0.05) / (i + 0.05);
|
|
78
78
|
}
|
|
@@ -142,7 +142,7 @@ const Nt = ({
|
|
|
142
142
|
label: u.$.removeItem,
|
|
143
143
|
color: "white",
|
|
144
144
|
disabled: r,
|
|
145
|
-
onClick: () => t?.(
|
|
145
|
+
onClick: () => t?.(g.get(e))
|
|
146
146
|
},
|
|
147
147
|
s.class("bc-tag__close")
|
|
148
148
|
)
|
|
@@ -203,23 +203,23 @@ function He(e) {
|
|
|
203
203
|
role: d,
|
|
204
204
|
hasPopup: f = "dialog"
|
|
205
205
|
} = e;
|
|
206
|
-
return sn((x,
|
|
207
|
-
const h =
|
|
206
|
+
return sn((x, b) => {
|
|
207
|
+
const h = De({
|
|
208
208
|
initialStatus: "closed"
|
|
209
209
|
}), v = pe("flyout"), k = Z(!1);
|
|
210
|
-
let C = null,
|
|
210
|
+
let C = null, m = null, w = null, D = !1;
|
|
211
211
|
function V() {
|
|
212
|
-
T != null && (clearTimeout(T), T = null), M != null && (clearTimeout(M), M = null), w && (w(), w = null),
|
|
212
|
+
T != null && (clearTimeout(T), T = null), M != null && (clearTimeout(M), M = null), w && (w(), w = null), m && (m(), m = null), C && (document.removeEventListener("keydown", C), C = null), k.set(!1), D = !1;
|
|
213
213
|
}
|
|
214
214
|
function E() {
|
|
215
|
-
|
|
215
|
+
g.get(i) && (C = (W) => {
|
|
216
216
|
W.key === "Escape" && U();
|
|
217
|
-
}, document.addEventListener("keydown", C)),
|
|
217
|
+
}, document.addEventListener("keydown", C)), D = !0, k.set(!0), x({
|
|
218
218
|
placement: t ?? "top",
|
|
219
219
|
mainAxisOffset: r,
|
|
220
220
|
crossAxisOffset: u,
|
|
221
221
|
onClickOutside: () => {
|
|
222
|
-
|
|
222
|
+
g.get(i) && U();
|
|
223
223
|
},
|
|
224
224
|
arrow: o,
|
|
225
225
|
content: ne((W) => {
|
|
@@ -227,7 +227,7 @@ function He(e) {
|
|
|
227
227
|
h.open(), w = null;
|
|
228
228
|
});
|
|
229
229
|
const z = (G) => {
|
|
230
|
-
|
|
230
|
+
g.get(i) && G.key === "Escape" && (G.preventDefault(), G.stopPropagation(), U(), k.set(!1));
|
|
231
231
|
};
|
|
232
232
|
return document.addEventListener("keydown", z, !0), N(
|
|
233
233
|
X(() => {
|
|
@@ -238,7 +238,7 @@ function He(e) {
|
|
|
238
238
|
s.tabindex(-1),
|
|
239
239
|
// Make focusable for screen readers
|
|
240
240
|
Ke(
|
|
241
|
-
|
|
241
|
+
g.map(t, In),
|
|
242
242
|
h.status
|
|
243
243
|
),
|
|
244
244
|
d ? s.role(d) : s.role("dialog"),
|
|
@@ -249,34 +249,34 @@ function He(e) {
|
|
|
249
249
|
});
|
|
250
250
|
}
|
|
251
251
|
let T = null;
|
|
252
|
-
function
|
|
253
|
-
if (T != null && (clearTimeout(T), T = null), M != null && (clearTimeout(M), M = null),
|
|
252
|
+
function P() {
|
|
253
|
+
if (T != null && (clearTimeout(T), T = null), M != null && (clearTimeout(M), M = null), m && (m(), m = null), h.isOpened.value || h.isOpening.value || h.isStartOpening.value)
|
|
254
254
|
return;
|
|
255
255
|
if (h.isClosing.value || h.isStartClosing.value) {
|
|
256
256
|
h.open();
|
|
257
257
|
return;
|
|
258
258
|
}
|
|
259
|
-
const W =
|
|
259
|
+
const W = g.get(a);
|
|
260
260
|
T = setTimeout(() => {
|
|
261
261
|
T = null, E();
|
|
262
262
|
}, W);
|
|
263
263
|
}
|
|
264
264
|
let M = null;
|
|
265
265
|
function U() {
|
|
266
|
-
if (T != null && (clearTimeout(T), T = null), M != null && (clearTimeout(M), M = null), k.set(!1), w && (w(), w = null,
|
|
267
|
-
|
|
266
|
+
if (T != null && (clearTimeout(T), T = null), M != null && (clearTimeout(M), M = null), k.set(!1), w && (w(), w = null, D)) {
|
|
267
|
+
b(), V();
|
|
268
268
|
return;
|
|
269
269
|
}
|
|
270
|
-
const W =
|
|
270
|
+
const W = g.get(l);
|
|
271
271
|
M = setTimeout(() => {
|
|
272
|
-
M = null,
|
|
273
|
-
|
|
272
|
+
M = null, m && (m(), m = null), h.close(), m = h.onClosed(() => {
|
|
273
|
+
b(), V();
|
|
274
274
|
});
|
|
275
275
|
}, W);
|
|
276
276
|
}
|
|
277
277
|
return ne((W) => {
|
|
278
278
|
const z = () => {
|
|
279
|
-
|
|
279
|
+
P(), k.set(!0);
|
|
280
280
|
}, G = () => {
|
|
281
281
|
U(), k.set(!1);
|
|
282
282
|
}, K = N(
|
|
@@ -387,13 +387,13 @@ function Et(e, { breakpoints: n, mode: t = "viewport" }) {
|
|
|
387
387
|
return t === "element" ? Ve(r) : ln(r);
|
|
388
388
|
}
|
|
389
389
|
let Ye = NaN;
|
|
390
|
-
function
|
|
390
|
+
function Pn(e, n) {
|
|
391
391
|
return e ? (isNaN(Ye) && (Ye = parseFloat(getComputedStyle(document.documentElement).fontSize)), parseFloat(e) * Ye) : n;
|
|
392
392
|
}
|
|
393
393
|
function ee(e, n, t) {
|
|
394
|
-
return
|
|
394
|
+
return Pn(e.getPropertyValue(n), t);
|
|
395
395
|
}
|
|
396
|
-
function
|
|
396
|
+
function Dn(e) {
|
|
397
397
|
return ne((n) => {
|
|
398
398
|
const t = getComputedStyle(n), a = {
|
|
399
399
|
zero: 0,
|
|
@@ -433,9 +433,9 @@ function ce(e, n) {
|
|
|
433
433
|
return `bc-panel ${(Array.isArray(e) ? e : [e]).map((a) => `bc-panel--side-${a}`).join(" ")} bc-panel--shadow-${n}`;
|
|
434
434
|
}
|
|
435
435
|
function be(e) {
|
|
436
|
-
const n =
|
|
436
|
+
const n = g.toSignal(e).map(
|
|
437
437
|
(a) => ge(a, "lighter", "light")
|
|
438
|
-
), t =
|
|
438
|
+
), t = g.toSignal(e).map(
|
|
439
439
|
(a) => ge(a, "lighter", "dark")
|
|
440
440
|
);
|
|
441
441
|
return N(
|
|
@@ -553,7 +553,7 @@ function Vn({
|
|
|
553
553
|
), o[1][1] = "header"), a.mainHeader && (f.push(a.mainHeader[i] + "px"), o[2][1] = "mainHeader"), f.push("1fr"), o[3][1] = "main", a.mainFooter && (f.push(a.mainFooter[i] + "px"), o[4][1] = "mainFooter"), a.footer && (f.push(a.footer[i] + "px"), o[5][1] = "footer"), o = qe(o), {
|
|
554
554
|
columns: d.join(" "),
|
|
555
555
|
rows: f.join(" "),
|
|
556
|
-
areas: o.map((
|
|
556
|
+
areas: o.map((b) => `"${b.join(" ")}"`).join(`
|
|
557
557
|
`),
|
|
558
558
|
displayMenu: !1,
|
|
559
559
|
displayAside: !1,
|
|
@@ -578,7 +578,7 @@ function Vn({
|
|
|
578
578
|
), o[1][0] = "?header", o[1][1] = "header"), a.mainHeader && (f.push(a.mainHeader[i] + "px"), o[2][1] = "mainHeader"), f.push("1fr"), o[3][1] = "main", a.mainFooter && (f.push(a.mainFooter[i] + "px"), o[4][1] = "mainFooter"), a.footer && (f.push(a.footer[i] + "px"), o[5][0] = "?footer", o[5][1] = "footer"), o = qe(o), {
|
|
579
579
|
columns: d.join(" "),
|
|
580
580
|
rows: f.join(" "),
|
|
581
|
-
areas: o.map((
|
|
581
|
+
areas: o.map((b) => `"${b.join(" ")}"`).join(`
|
|
582
582
|
`),
|
|
583
583
|
displayMenu: !0,
|
|
584
584
|
displayAside: !1,
|
|
@@ -601,7 +601,7 @@ function Vn({
|
|
|
601
601
|
return a.banner && (f.push(a.banner[i] + "px"), o[0][0] = "?banner", o[0][1] = "banner", o[0][2] = "?banner"), a.header && (f.push(a.header[i] + "px"), o[1][0] = "?header", o[1][1] = "header", o[1][2] = "?header"), a.mainHeader && (f.push(a.mainHeader[i] + "px"), o[2][1] = "mainHeader"), f.push("1fr"), o[3][1] = "main", a.mainFooter && (f.push(a.mainFooter[i] + "px"), o[4][1] = "mainFooter"), a.footer && (f.push(a.footer[i] + "px"), o[5][0] = "?footer", o[5][1] = "footer", o[5][2] = "?footer"), o = qe(o), {
|
|
602
602
|
columns: d.join(" "),
|
|
603
603
|
rows: f.join(" "),
|
|
604
|
-
areas: o.map((
|
|
604
|
+
areas: o.map((b) => `"${b.join(" ")}"`).join(`
|
|
605
605
|
`),
|
|
606
606
|
displayMenu: !0,
|
|
607
607
|
displayAside: !0,
|
|
@@ -627,7 +627,7 @@ function Ln(e, { displayMenu: n }, t) {
|
|
|
627
627
|
function Bn(e, { displayAside: n }, t) {
|
|
628
628
|
return e ? n ? "block" : t ? "float" : "none" : "none";
|
|
629
629
|
}
|
|
630
|
-
function
|
|
630
|
+
function Pa({
|
|
631
631
|
smallBreakpoint: e = "sm",
|
|
632
632
|
mediumBreakpoint: n = "md",
|
|
633
633
|
...t
|
|
@@ -649,7 +649,7 @@ function Da({
|
|
|
649
649
|
);
|
|
650
650
|
return te(
|
|
651
651
|
oe,
|
|
652
|
-
(r) =>
|
|
652
|
+
(r) => Dn(({ value: u, is: c }) => {
|
|
653
653
|
const i = Vn({
|
|
654
654
|
smallBreakpoint: e,
|
|
655
655
|
mediumBreakpoint: n,
|
|
@@ -659,13 +659,13 @@ function Da({
|
|
|
659
659
|
}), o = u.map(i), d = l.header != null || a.menu != null || a.aside != null, f = S(
|
|
660
660
|
a.aside != null,
|
|
661
661
|
o
|
|
662
|
-
)((
|
|
662
|
+
)((m, { displayAside: w }) => m && !w), x = S(
|
|
663
663
|
a.menu != null,
|
|
664
664
|
o
|
|
665
|
-
)((
|
|
665
|
+
)((m, { displayMenu: w }) => m && !w), b = De(), h = De(), v = Z(0), k = S(
|
|
666
666
|
a.menu != null,
|
|
667
667
|
o,
|
|
668
|
-
|
|
668
|
+
b.display
|
|
669
669
|
)(Ln), C = S(
|
|
670
670
|
a.aside != null,
|
|
671
671
|
o,
|
|
@@ -673,7 +673,7 @@ function Da({
|
|
|
673
673
|
)(Bn);
|
|
674
674
|
return p.div(
|
|
675
675
|
X(() => {
|
|
676
|
-
v.dispose(),
|
|
676
|
+
v.dispose(), b.dispose(), h.dispose();
|
|
677
677
|
}),
|
|
678
678
|
y.display("grid"),
|
|
679
679
|
y.height("100%"),
|
|
@@ -700,13 +700,13 @@ function Da({
|
|
|
700
700
|
y.zIndex("20"),
|
|
701
701
|
y.display(d ? "block" : "none"),
|
|
702
702
|
y.gridArea("header"),
|
|
703
|
-
Ve((
|
|
703
|
+
Ve((m) => (m.$.bottom.feedProp(v), null)),
|
|
704
704
|
p.div(
|
|
705
705
|
y.display("flex"),
|
|
706
706
|
y.height("100%"),
|
|
707
707
|
p.div(
|
|
708
708
|
y.display(
|
|
709
|
-
x.map((
|
|
709
|
+
x.map((m) => m ? "flex" : "none")
|
|
710
710
|
),
|
|
711
711
|
y.alignItems("center"),
|
|
712
712
|
y.justifyContent("center"),
|
|
@@ -714,14 +714,14 @@ function Da({
|
|
|
714
714
|
y.width("60px"),
|
|
715
715
|
ot(
|
|
716
716
|
{
|
|
717
|
-
onClick: () =>
|
|
717
|
+
onClick: () => b.toggle(),
|
|
718
718
|
variant: "light",
|
|
719
719
|
color: "base"
|
|
720
720
|
},
|
|
721
721
|
L.label(r.$.toggleMenu),
|
|
722
722
|
Q({
|
|
723
|
-
icon:
|
|
724
|
-
(
|
|
723
|
+
icon: b.display.map(
|
|
724
|
+
(m) => m ? "line-md/menu-to-close-alt-transition" : "line-md/close-to-menu-alt-transition"
|
|
725
725
|
)
|
|
726
726
|
})
|
|
727
727
|
)
|
|
@@ -737,7 +737,7 @@ function Da({
|
|
|
737
737
|
y.height("100%"),
|
|
738
738
|
y.width("60px"),
|
|
739
739
|
y.display(
|
|
740
|
-
f.map((
|
|
740
|
+
f.map((m) => m ? "flex" : "none")
|
|
741
741
|
),
|
|
742
742
|
ot(
|
|
743
743
|
{
|
|
@@ -752,7 +752,7 @@ function Da({
|
|
|
752
752
|
s.style("transition: transform 0.2s ease-in-out"),
|
|
753
753
|
s.style(
|
|
754
754
|
h.display.map(
|
|
755
|
-
(
|
|
755
|
+
(m) => `transform: rotate(${m ? 180 : 0}deg)`
|
|
756
756
|
)
|
|
757
757
|
)
|
|
758
758
|
)
|
|
@@ -761,7 +761,7 @@ function Da({
|
|
|
761
761
|
)
|
|
762
762
|
),
|
|
763
763
|
t.menu ? p.nav(
|
|
764
|
-
ne((
|
|
764
|
+
ne((m) => b.setElement(m)),
|
|
765
765
|
y.zIndex("10"),
|
|
766
766
|
// Add ARIA attributes for navigation landmark
|
|
767
767
|
L.label(r.$.mainNavigation),
|
|
@@ -769,7 +769,7 @@ function Da({
|
|
|
769
769
|
y.overflow("hidden"),
|
|
770
770
|
s.class(
|
|
771
771
|
k.map(
|
|
772
|
-
(
|
|
772
|
+
(m) => m === "float" ? ce(
|
|
773
773
|
"right",
|
|
774
774
|
t.menu?.shadow ?? "md"
|
|
775
775
|
) : ce(
|
|
@@ -781,7 +781,7 @@ function Da({
|
|
|
781
781
|
be(t.menu?.color ?? "white"),
|
|
782
782
|
y.height(
|
|
783
783
|
k.map(
|
|
784
|
-
(
|
|
784
|
+
(m) => m === "float" ? "auto" : "100%"
|
|
785
785
|
)
|
|
786
786
|
),
|
|
787
787
|
y.overflow("hidden"),
|
|
@@ -789,22 +789,22 @@ function Da({
|
|
|
789
789
|
y.display(
|
|
790
790
|
S(
|
|
791
791
|
k,
|
|
792
|
-
|
|
793
|
-
)((
|
|
792
|
+
b.status
|
|
793
|
+
)((m, w) => m === "none" && w === "closed" ? "none" : "block")
|
|
794
794
|
),
|
|
795
795
|
y.position(
|
|
796
796
|
S(
|
|
797
797
|
k,
|
|
798
|
-
|
|
799
|
-
)((
|
|
798
|
+
b.status
|
|
799
|
+
)((m, w) => m === "float" || m === "none" && w !== "closed" ? "fixed" : "initial")
|
|
800
800
|
),
|
|
801
|
-
y.top(v.map((
|
|
801
|
+
y.top(v.map((m) => `${m}px`)),
|
|
802
802
|
Ke(
|
|
803
803
|
"slide-right",
|
|
804
804
|
S(
|
|
805
805
|
k,
|
|
806
|
-
|
|
807
|
-
)((
|
|
806
|
+
b.status
|
|
807
|
+
)((m, w) => m === "block" ? "opened" : w)
|
|
808
808
|
),
|
|
809
809
|
y.width(Ge(t.menu?.width, o.$.menuWidth)),
|
|
810
810
|
y.bottom("0"),
|
|
@@ -845,8 +845,8 @@ function Da({
|
|
|
845
845
|
t.mainFooter.content
|
|
846
846
|
) : null,
|
|
847
847
|
t.aside ? p.aside(
|
|
848
|
-
ne((
|
|
849
|
-
h.setElement(
|
|
848
|
+
ne((m) => {
|
|
849
|
+
h.setElement(m);
|
|
850
850
|
}),
|
|
851
851
|
y.zIndex("10"),
|
|
852
852
|
// Add ARIA attributes for aside landmark
|
|
@@ -854,7 +854,7 @@ function Da({
|
|
|
854
854
|
s.role("complementary"),
|
|
855
855
|
s.class(
|
|
856
856
|
C.map(
|
|
857
|
-
(
|
|
857
|
+
(m) => m === "float" ? ce("left", "md") : ce("left", "none")
|
|
858
858
|
)
|
|
859
859
|
),
|
|
860
860
|
be("white"),
|
|
@@ -864,26 +864,26 @@ function Da({
|
|
|
864
864
|
S(
|
|
865
865
|
C,
|
|
866
866
|
h.status
|
|
867
|
-
)((
|
|
867
|
+
)((m, w) => m === "none" && w === "closed" ? "none" : "block")
|
|
868
868
|
),
|
|
869
869
|
y.position(
|
|
870
870
|
S(
|
|
871
871
|
C,
|
|
872
872
|
h.status
|
|
873
|
-
)((
|
|
873
|
+
)((m, w) => m === "float" || m === "none" && w !== "closed" ? "fixed" : "initial")
|
|
874
874
|
),
|
|
875
|
-
y.top(v.map((
|
|
875
|
+
y.top(v.map((m) => `${m}px`)),
|
|
876
876
|
Ke(
|
|
877
877
|
"slide-left",
|
|
878
878
|
S(
|
|
879
879
|
C,
|
|
880
880
|
h.status
|
|
881
|
-
)((
|
|
881
|
+
)((m, w) => m === "block" ? "opened" : w)
|
|
882
882
|
),
|
|
883
883
|
y.width(
|
|
884
884
|
Ge(t.aside?.width, o.$.asideWidth)
|
|
885
885
|
),
|
|
886
|
-
y.bottom(v.map((
|
|
886
|
+
y.bottom(v.map((m) => `${m}px`)),
|
|
887
887
|
t.aside.content
|
|
888
888
|
) : null,
|
|
889
889
|
t.footer ? p.footer(
|
|
@@ -897,7 +897,7 @@ function Da({
|
|
|
897
897
|
})
|
|
898
898
|
);
|
|
899
899
|
}
|
|
900
|
-
function
|
|
900
|
+
function Da(...e) {
|
|
901
901
|
return p.div(
|
|
902
902
|
s.class("bc-center-h"),
|
|
903
903
|
p.div(s.class("bc-center__content"), ...e)
|
|
@@ -915,11 +915,11 @@ function Va({ gap: e = "lg" } = {}, ...n) {
|
|
|
915
915
|
}
|
|
916
916
|
function En({ open: e }, ...n) {
|
|
917
917
|
return ne((t) => {
|
|
918
|
-
const { status: a, setOpen: l, dispose: r } =
|
|
919
|
-
initialStatus:
|
|
918
|
+
const { status: a, setOpen: l, dispose: r } = De({
|
|
919
|
+
initialStatus: g.get(e) ? "opened" : "closed",
|
|
920
920
|
element: t
|
|
921
921
|
});
|
|
922
|
-
return
|
|
922
|
+
return g.on(e, l), Ve((u) => {
|
|
923
923
|
const c = Z(null);
|
|
924
924
|
return S(
|
|
925
925
|
a,
|
|
@@ -949,7 +949,7 @@ function On(e) {
|
|
|
949
949
|
return `${e}px`;
|
|
950
950
|
}
|
|
951
951
|
function gt(e) {
|
|
952
|
-
return
|
|
952
|
+
return g.map(e, On);
|
|
953
953
|
}
|
|
954
954
|
function Aa({
|
|
955
955
|
body: e,
|
|
@@ -965,16 +965,16 @@ function Aa({
|
|
|
965
965
|
bottomEnd: d,
|
|
966
966
|
sidebarStart: f,
|
|
967
967
|
sidebarStartWidth: x = 0,
|
|
968
|
-
sidebarEnd:
|
|
968
|
+
sidebarEnd: b,
|
|
969
969
|
sidebarEndWidth: h = 0,
|
|
970
970
|
anchorMode: v = "container-edge"
|
|
971
971
|
}) {
|
|
972
|
-
const k = Z(0n), C = Z(0n),
|
|
972
|
+
const k = Z(0n), C = Z(0n), m = gt(l), w = gt(x), D = Z(16);
|
|
973
973
|
return p.div(
|
|
974
974
|
X(
|
|
975
975
|
k.dispose,
|
|
976
976
|
C.dispose,
|
|
977
|
-
|
|
977
|
+
D.dispose
|
|
978
978
|
),
|
|
979
979
|
s.class("bc-nine-slice-container"),
|
|
980
980
|
Ve((V) => {
|
|
@@ -986,7 +986,7 @@ function Aa({
|
|
|
986
986
|
V.$.height,
|
|
987
987
|
l,
|
|
988
988
|
i
|
|
989
|
-
)((_, B, q) => _ - B - q),
|
|
989
|
+
)((_, B, q) => _ - B - q), P = S(
|
|
990
990
|
n,
|
|
991
991
|
E
|
|
992
992
|
)((_, B) => _ > BigInt(B)), M = S(
|
|
@@ -995,18 +995,18 @@ function Aa({
|
|
|
995
995
|
)((_, B) => _ > BigInt(B)), U = S(
|
|
996
996
|
E,
|
|
997
997
|
M,
|
|
998
|
-
|
|
998
|
+
D
|
|
999
999
|
)((_, B, q) => B ? _ - q : _), W = S(
|
|
1000
1000
|
T,
|
|
1001
|
-
|
|
1002
|
-
|
|
1001
|
+
P,
|
|
1002
|
+
D
|
|
1003
1003
|
)((_, B, q) => B ? _ - q : _), z = S(
|
|
1004
1004
|
n,
|
|
1005
1005
|
U
|
|
1006
1006
|
)((_, B) => Number(_ / BigInt(Math.max(1, B)))), G = S(
|
|
1007
1007
|
t,
|
|
1008
1008
|
W
|
|
1009
|
-
)((_, B) => Number(_ / BigInt(Math.max(1, B)))), K =
|
|
1009
|
+
)((_, B) => Number(_ / BigInt(Math.max(1, B)))), K = g.map(
|
|
1010
1010
|
v,
|
|
1011
1011
|
(_) => _ === "body-end" || _ === "body-end-bottom"
|
|
1012
1012
|
), F = re(
|
|
@@ -1023,7 +1023,7 @@ function Aa({
|
|
|
1023
1023
|
})
|
|
1024
1024
|
),
|
|
1025
1025
|
() => y.right("0")
|
|
1026
|
-
), he =
|
|
1026
|
+
), he = g.map(
|
|
1027
1027
|
v,
|
|
1028
1028
|
(_) => _ === "body-bottom" || _ === "body-end-bottom"
|
|
1029
1029
|
), ie = re(
|
|
@@ -1042,15 +1042,15 @@ function Aa({
|
|
|
1042
1042
|
() => y.bottom("0")
|
|
1043
1043
|
), Ue = S(
|
|
1044
1044
|
M,
|
|
1045
|
-
|
|
1045
|
+
D
|
|
1046
1046
|
)((_, B) => _ ? `${B}px` : "0"), ue = S(
|
|
1047
|
-
|
|
1048
|
-
|
|
1047
|
+
P,
|
|
1048
|
+
D
|
|
1049
1049
|
)((_, B) => _ ? `${B}px` : "0"), Ae = y.transform(
|
|
1050
1050
|
S(
|
|
1051
1051
|
C,
|
|
1052
1052
|
k,
|
|
1053
|
-
|
|
1053
|
+
P,
|
|
1054
1054
|
M
|
|
1055
1055
|
)((_, B, q, $) => {
|
|
1056
1056
|
const A = q ? `translateX(-${_}px)` : "", O = $ ? `translateY(-${B}px)` : "";
|
|
@@ -1069,7 +1069,7 @@ function Aa({
|
|
|
1069
1069
|
)((_, B) => _ - BigInt(Math.max(1, B)));
|
|
1070
1070
|
let H = null, xe = 0, we = 0;
|
|
1071
1071
|
const je = () => {
|
|
1072
|
-
const _ = Te.value, B = ye.value, q = M.value, $ =
|
|
1072
|
+
const _ = Te.value, B = ye.value, q = M.value, $ = P.value;
|
|
1073
1073
|
if (q && we !== 0) {
|
|
1074
1074
|
const A = bt(
|
|
1075
1075
|
Le(0n, _),
|
|
@@ -1094,7 +1094,7 @@ function Aa({
|
|
|
1094
1094
|
};
|
|
1095
1095
|
return N(
|
|
1096
1096
|
X(
|
|
1097
|
-
|
|
1097
|
+
P.on((_) => {
|
|
1098
1098
|
_ || C.set(0n);
|
|
1099
1099
|
}),
|
|
1100
1100
|
M.on((_) => {
|
|
@@ -1150,7 +1150,7 @@ function Aa({
|
|
|
1150
1150
|
f != null ? p.div(
|
|
1151
1151
|
s.class("bc-nine-slice-pane bc-nine-slice-sidebar-start"),
|
|
1152
1152
|
y.left("0"),
|
|
1153
|
-
y.top(
|
|
1153
|
+
y.top(m),
|
|
1154
1154
|
// style.height(visibleAreaHeightPx),
|
|
1155
1155
|
// style.width(sidebarStartWidthPx),
|
|
1156
1156
|
p.div(
|
|
@@ -1163,7 +1163,7 @@ function Aa({
|
|
|
1163
1163
|
p.div(
|
|
1164
1164
|
s.class("bc-nine-slice-pane bc-nine-slice-body"),
|
|
1165
1165
|
y.left(w),
|
|
1166
|
-
y.top(
|
|
1166
|
+
y.top(m),
|
|
1167
1167
|
// style.width(visibleAreaWidth.map(toPx)),
|
|
1168
1168
|
// style.height(visibleAreaHeight.map(toPx)),
|
|
1169
1169
|
p.div(
|
|
@@ -1173,16 +1173,16 @@ function Aa({
|
|
|
1173
1173
|
)
|
|
1174
1174
|
),
|
|
1175
1175
|
// middle-end sidebar
|
|
1176
|
-
|
|
1176
|
+
b != null ? p.div(
|
|
1177
1177
|
s.class("bc-nine-slice-pane bc-nine-slice-sidebar-end"),
|
|
1178
1178
|
F,
|
|
1179
|
-
y.top(
|
|
1179
|
+
y.top(m),
|
|
1180
1180
|
// style.height(visibleAreaHeightPx),
|
|
1181
1181
|
// style.width(sidebarEndWidthPx),
|
|
1182
1182
|
p.div(
|
|
1183
1183
|
s.class("bc-nine-slice-pane-content"),
|
|
1184
1184
|
ve,
|
|
1185
|
-
|
|
1185
|
+
b
|
|
1186
1186
|
)
|
|
1187
1187
|
) : null,
|
|
1188
1188
|
// bottom-start corner
|
|
@@ -1225,12 +1225,12 @@ function Aa({
|
|
|
1225
1225
|
y.right(
|
|
1226
1226
|
S(
|
|
1227
1227
|
M,
|
|
1228
|
-
|
|
1228
|
+
D
|
|
1229
1229
|
)((_, B) => _ ? `${B}px` : "0")
|
|
1230
1230
|
),
|
|
1231
1231
|
y.bottom("0"),
|
|
1232
1232
|
y.height(
|
|
1233
|
-
|
|
1233
|
+
P.map(
|
|
1234
1234
|
(_) => _ ? "16px" : "0"
|
|
1235
1235
|
)
|
|
1236
1236
|
),
|
|
@@ -1261,8 +1261,8 @@ function Aa({
|
|
|
1261
1261
|
y.top("0"),
|
|
1262
1262
|
y.bottom(
|
|
1263
1263
|
S(
|
|
1264
|
-
|
|
1265
|
-
|
|
1264
|
+
P,
|
|
1265
|
+
D
|
|
1266
1266
|
)((_, B) => _ ? `${B}px` : "0")
|
|
1267
1267
|
),
|
|
1268
1268
|
y.right("0"),
|
|
@@ -1407,39 +1407,39 @@ const me = {
|
|
|
1407
1407
|
onBeforeOpen: c,
|
|
1408
1408
|
onAfterOpen: i,
|
|
1409
1409
|
buildListboxContent: o
|
|
1410
|
-
} = e, d = Z(!1), f = Z(-1), x = Z(null),
|
|
1410
|
+
} = e, d = Z(!1), f = Z(-1), x = Z(null), b = pe("dropdown"), h = pe("listbox");
|
|
1411
1411
|
let v, k;
|
|
1412
1412
|
const C = (w) => {
|
|
1413
1413
|
n?.(w), d.set(!1), f.set(-1), x.set(null), v?.focus();
|
|
1414
|
-
},
|
|
1415
|
-
const
|
|
1414
|
+
}, m = (w) => {
|
|
1415
|
+
const D = me.getValues(g.get(r));
|
|
1416
1416
|
switch (w.key) {
|
|
1417
1417
|
case "ArrowDown": {
|
|
1418
1418
|
if (w.preventDefault(), !d.value)
|
|
1419
|
-
d.set(!0),
|
|
1419
|
+
d.set(!0), D.length > 0 && (f.set(0), x.set(D[0]));
|
|
1420
1420
|
else {
|
|
1421
1421
|
const V = Math.min(
|
|
1422
1422
|
f.value + 1,
|
|
1423
|
-
|
|
1423
|
+
D.length - 1
|
|
1424
1424
|
);
|
|
1425
|
-
f.set(V), x.set(
|
|
1425
|
+
f.set(V), x.set(D[V] ?? null);
|
|
1426
1426
|
}
|
|
1427
1427
|
break;
|
|
1428
1428
|
}
|
|
1429
1429
|
case "ArrowUp": {
|
|
1430
1430
|
if (w.preventDefault(), d.value) {
|
|
1431
1431
|
const V = Math.max(f.value - 1, 0);
|
|
1432
|
-
f.set(V), x.set(
|
|
1432
|
+
f.set(V), x.set(D[V] ?? null);
|
|
1433
1433
|
}
|
|
1434
1434
|
break;
|
|
1435
1435
|
}
|
|
1436
1436
|
case "Enter": {
|
|
1437
1437
|
if (w.preventDefault(), d.value && f.value >= 0) {
|
|
1438
|
-
const V =
|
|
1438
|
+
const V = D[f.value];
|
|
1439
1439
|
V != null && C(V);
|
|
1440
1440
|
} else {
|
|
1441
1441
|
c?.();
|
|
1442
|
-
const V = me.getValues(
|
|
1442
|
+
const V = me.getValues(g.get(r));
|
|
1443
1443
|
d.set(!0), V.length > 0 && (f.set(0), x.set(V[0])), setTimeout(() => i?.(), 0);
|
|
1444
1444
|
}
|
|
1445
1445
|
break;
|
|
@@ -1449,9 +1449,9 @@ const me = {
|
|
|
1449
1449
|
break;
|
|
1450
1450
|
}
|
|
1451
1451
|
case " ": {
|
|
1452
|
-
if (
|
|
1452
|
+
if (g.get(u)) {
|
|
1453
1453
|
w.preventDefault();
|
|
1454
|
-
const V = me.getValues(
|
|
1454
|
+
const V = me.getValues(g.get(r));
|
|
1455
1455
|
d.set(!d.value), d.value && V.length > 0 && (f.set(0), x.set(V[0]));
|
|
1456
1456
|
}
|
|
1457
1457
|
break;
|
|
@@ -1471,11 +1471,11 @@ const me = {
|
|
|
1471
1471
|
)
|
|
1472
1472
|
},
|
|
1473
1473
|
Ve((w) => N(
|
|
1474
|
-
ne((
|
|
1475
|
-
() =>
|
|
1474
|
+
ne((D) => (v = D, D.addEventListener("keydown", m), X(
|
|
1475
|
+
() => D.removeEventListener("keydown", m)
|
|
1476
1476
|
))),
|
|
1477
1477
|
ae(e),
|
|
1478
|
-
s.id(
|
|
1478
|
+
s.id(b),
|
|
1479
1479
|
s.tabindex(0),
|
|
1480
1480
|
L.controls(h),
|
|
1481
1481
|
L.expanded(d),
|
|
@@ -1486,7 +1486,7 @@ const me = {
|
|
|
1486
1486
|
d,
|
|
1487
1487
|
x
|
|
1488
1488
|
)(
|
|
1489
|
-
(
|
|
1489
|
+
(D, V) => D && V != null ? `dropdown-option-${String(V)}` : ""
|
|
1490
1490
|
)
|
|
1491
1491
|
),
|
|
1492
1492
|
t != null ? I.blur(() => {
|
|
@@ -1496,26 +1496,26 @@ const me = {
|
|
|
1496
1496
|
}) : R,
|
|
1497
1497
|
He({
|
|
1498
1498
|
content: () => p.div(
|
|
1499
|
-
ne((
|
|
1500
|
-
k =
|
|
1499
|
+
ne((D) => {
|
|
1500
|
+
k = D;
|
|
1501
1501
|
}),
|
|
1502
|
-
y.minWidth(w.$.width.map((
|
|
1502
|
+
y.minWidth(w.$.width.map((D) => `${D - 10}px`)),
|
|
1503
1503
|
s.class("bc-dropdown__listbox"),
|
|
1504
1504
|
s.role("listbox"),
|
|
1505
1505
|
s.id(h),
|
|
1506
|
-
L.labelledby(
|
|
1506
|
+
L.labelledby(b),
|
|
1507
1507
|
o({
|
|
1508
|
-
dropdownId:
|
|
1508
|
+
dropdownId: b,
|
|
1509
1509
|
listboxId: h,
|
|
1510
1510
|
focusedValue: x,
|
|
1511
|
-
handleKeyDown:
|
|
1511
|
+
handleKeyDown: m,
|
|
1512
1512
|
onSelect: C
|
|
1513
1513
|
})
|
|
1514
1514
|
),
|
|
1515
1515
|
mainAxisOffset: 0,
|
|
1516
1516
|
placement: "bottom-start",
|
|
1517
1517
|
hasPopup: "listbox",
|
|
1518
|
-
showOn: (
|
|
1518
|
+
showOn: (D, V) => {
|
|
1519
1519
|
const E = V;
|
|
1520
1520
|
V = () => {
|
|
1521
1521
|
d.set(!1), f.set(-1), x.set(null), E();
|
|
@@ -1525,8 +1525,8 @@ const me = {
|
|
|
1525
1525
|
V();
|
|
1526
1526
|
else {
|
|
1527
1527
|
c?.();
|
|
1528
|
-
const
|
|
1529
|
-
d.set(!0),
|
|
1528
|
+
const P = me.getValues(g.get(r));
|
|
1529
|
+
d.set(!0), P.length > 0 && (f.set(0), x.set(P[0])), D(), setTimeout(() => i?.(), 0);
|
|
1530
1530
|
}
|
|
1531
1531
|
};
|
|
1532
1532
|
return I.click(T);
|
|
@@ -1617,11 +1617,11 @@ const me = {
|
|
|
1617
1617
|
)((o, d) => {
|
|
1618
1618
|
if (o == null) return "";
|
|
1619
1619
|
const f = (x) => {
|
|
1620
|
-
for (const
|
|
1621
|
-
if (
|
|
1622
|
-
return
|
|
1623
|
-
if (
|
|
1624
|
-
const h = f(
|
|
1620
|
+
for (const b of x) {
|
|
1621
|
+
if (b.type === "value" && l(b.value, o))
|
|
1622
|
+
return b.label;
|
|
1623
|
+
if (b.type === "group") {
|
|
1624
|
+
const h = f(b.options);
|
|
1625
1625
|
if (h) return h;
|
|
1626
1626
|
}
|
|
1627
1627
|
}
|
|
@@ -1651,8 +1651,8 @@ const me = {
|
|
|
1651
1651
|
return Rn({
|
|
1652
1652
|
...l,
|
|
1653
1653
|
value: n.signal,
|
|
1654
|
-
onChange:
|
|
1655
|
-
onBlur:
|
|
1654
|
+
onChange: Dt(n, t),
|
|
1655
|
+
onBlur: Pt(n, a)
|
|
1656
1656
|
});
|
|
1657
1657
|
}, La = (e) => tt({
|
|
1658
1658
|
...e,
|
|
@@ -1680,8 +1680,8 @@ const me = {
|
|
|
1680
1680
|
o,
|
|
1681
1681
|
c
|
|
1682
1682
|
)((d, f, x) => {
|
|
1683
|
-
const
|
|
1684
|
-
return d &&
|
|
1683
|
+
const b = [];
|
|
1684
|
+
return d && b.push("bc-dropdown__option--selected"), f && b.push("bc-dropdown__option--focused"), x.disabled && b.push("bc-dropdown__option--disabled"), b.join(" ");
|
|
1685
1685
|
})
|
|
1686
1686
|
),
|
|
1687
1687
|
s.role("option"),
|
|
@@ -1734,24 +1734,24 @@ const me = {
|
|
|
1734
1734
|
loadOptions: t,
|
|
1735
1735
|
renderOption: a,
|
|
1736
1736
|
renderValue: l,
|
|
1737
|
-
equality: r = (
|
|
1737
|
+
equality: r = (m, w) => m === w,
|
|
1738
1738
|
placeholder: u,
|
|
1739
1739
|
searchPlaceholder: c,
|
|
1740
1740
|
debounceMs: i = 150
|
|
1741
1741
|
} = e, o = Z(""), d = Z(!1), f = Z([]);
|
|
1742
1742
|
let x;
|
|
1743
|
-
const
|
|
1743
|
+
const b = g.toSignal(n), h = () => (l ?? a)(b);
|
|
1744
1744
|
let v = null;
|
|
1745
|
-
const k = (
|
|
1746
|
-
d.set(!0), Promise.resolve(t(
|
|
1745
|
+
const k = (m) => {
|
|
1746
|
+
d.set(!0), Promise.resolve(t(m)).then((w) => {
|
|
1747
1747
|
f.set(w ?? []);
|
|
1748
1748
|
}).catch(() => {
|
|
1749
1749
|
f.set([]);
|
|
1750
1750
|
}).finally(() => d.set(!1));
|
|
1751
|
-
}, C = (
|
|
1751
|
+
}, C = (m) => {
|
|
1752
1752
|
v != null && (clearTimeout(v), v = null), v = setTimeout(
|
|
1753
1753
|
() => {
|
|
1754
|
-
k(
|
|
1754
|
+
k(m);
|
|
1755
1755
|
},
|
|
1756
1756
|
Math.max(0, i)
|
|
1757
1757
|
);
|
|
@@ -1760,19 +1760,19 @@ const me = {
|
|
|
1760
1760
|
...e,
|
|
1761
1761
|
role: "combobox",
|
|
1762
1762
|
display: re(
|
|
1763
|
-
S(n)((
|
|
1763
|
+
S(n)((m) => m != null),
|
|
1764
1764
|
h,
|
|
1765
|
-
() => te(oe, (
|
|
1765
|
+
() => te(oe, (m) => m.$.selectOne)
|
|
1766
1766
|
),
|
|
1767
1767
|
optionsSource: f,
|
|
1768
1768
|
onBeforeOpen: () => {
|
|
1769
|
-
const
|
|
1770
|
-
C(
|
|
1769
|
+
const m = g.get(o);
|
|
1770
|
+
C(m);
|
|
1771
1771
|
},
|
|
1772
1772
|
onAfterOpen: () => {
|
|
1773
1773
|
x?.focus();
|
|
1774
1774
|
},
|
|
1775
|
-
buildListboxContent: ({ focusedValue:
|
|
1775
|
+
buildListboxContent: ({ focusedValue: m, handleKeyDown: w, onSelect: D }) => N(
|
|
1776
1776
|
// Search input at the top
|
|
1777
1777
|
p.div(
|
|
1778
1778
|
s.class("bc-dropdown__search"),
|
|
@@ -1805,9 +1805,9 @@ const me = {
|
|
|
1805
1805
|
(V) => Rt(
|
|
1806
1806
|
V,
|
|
1807
1807
|
r,
|
|
1808
|
-
g,
|
|
1809
|
-
P,
|
|
1810
1808
|
b,
|
|
1809
|
+
D,
|
|
1810
|
+
m,
|
|
1811
1811
|
a
|
|
1812
1812
|
)
|
|
1813
1813
|
)
|
|
@@ -1819,8 +1819,8 @@ const me = {
|
|
|
1819
1819
|
return Un({
|
|
1820
1820
|
...l,
|
|
1821
1821
|
value: n.signal,
|
|
1822
|
-
onChange:
|
|
1823
|
-
onBlur:
|
|
1822
|
+
onChange: Dt(n, t),
|
|
1823
|
+
onBlur: Pt(n, a)
|
|
1824
1824
|
});
|
|
1825
1825
|
}, Ba = (e) => tt({
|
|
1826
1826
|
...e,
|
|
@@ -1840,39 +1840,39 @@ function Ht(e) {
|
|
|
1840
1840
|
onAction: d,
|
|
1841
1841
|
ariaLabel: f,
|
|
1842
1842
|
ariaLabelledBy: x
|
|
1843
|
-
} = e,
|
|
1843
|
+
} = e, b = pe("menu"), h = Z(-1), v = Z([]);
|
|
1844
1844
|
let k = null;
|
|
1845
1845
|
return He({
|
|
1846
1846
|
content: () => ne((C) => {
|
|
1847
1847
|
k = document.activeElement;
|
|
1848
|
-
const
|
|
1849
|
-
if (
|
|
1848
|
+
const m = (T, P, M) => {
|
|
1849
|
+
if (P.length === 0) return -1;
|
|
1850
1850
|
let U = T + M, W = 0;
|
|
1851
|
-
for (; W <
|
|
1852
|
-
U >=
|
|
1853
|
-
const z =
|
|
1851
|
+
for (; W < P.length; ) {
|
|
1852
|
+
U >= P.length && (U = 0), U < 0 && (U = P.length - 1);
|
|
1853
|
+
const z = P[U];
|
|
1854
1854
|
if (z && z.getAttribute("aria-disabled") !== "true")
|
|
1855
1855
|
return U;
|
|
1856
1856
|
U += M, W++;
|
|
1857
1857
|
}
|
|
1858
1858
|
return T;
|
|
1859
1859
|
}, w = (T) => {
|
|
1860
|
-
const
|
|
1860
|
+
const P = v.value, M = h.value;
|
|
1861
1861
|
switch (T.key) {
|
|
1862
1862
|
case "ArrowDown":
|
|
1863
1863
|
T.preventDefault(), T.stopPropagation();
|
|
1864
|
-
const U =
|
|
1865
|
-
|
|
1864
|
+
const U = m(M, P, 1);
|
|
1865
|
+
D(U, P);
|
|
1866
1866
|
break;
|
|
1867
1867
|
case "ArrowUp":
|
|
1868
1868
|
T.preventDefault(), T.stopPropagation();
|
|
1869
|
-
const W =
|
|
1870
|
-
|
|
1869
|
+
const W = m(M, P, -1);
|
|
1870
|
+
D(W, P);
|
|
1871
1871
|
break;
|
|
1872
1872
|
case "Enter":
|
|
1873
1873
|
case " ":
|
|
1874
|
-
if (T.preventDefault(), T.stopPropagation(), M >= 0 &&
|
|
1875
|
-
const z =
|
|
1874
|
+
if (T.preventDefault(), T.stopPropagation(), M >= 0 && P[M]) {
|
|
1875
|
+
const z = P[M];
|
|
1876
1876
|
if (z.getAttribute("aria-disabled") === "true")
|
|
1877
1877
|
return;
|
|
1878
1878
|
const G = z.getAttribute("data-key");
|
|
@@ -1883,14 +1883,14 @@ function Ht(e) {
|
|
|
1883
1883
|
o?.();
|
|
1884
1884
|
break;
|
|
1885
1885
|
case "Home":
|
|
1886
|
-
T.preventDefault(), T.stopPropagation(),
|
|
1886
|
+
T.preventDefault(), T.stopPropagation(), P.length > 0 && D(0, P);
|
|
1887
1887
|
break;
|
|
1888
1888
|
case "End":
|
|
1889
|
-
T.preventDefault(), T.stopPropagation(),
|
|
1889
|
+
T.preventDefault(), T.stopPropagation(), P.length > 0 && D(P.length - 1, P);
|
|
1890
1890
|
break;
|
|
1891
1891
|
case "ArrowRight":
|
|
1892
|
-
if (T.preventDefault(), T.stopPropagation(), M >= 0 &&
|
|
1893
|
-
const z =
|
|
1892
|
+
if (T.preventDefault(), T.stopPropagation(), M >= 0 && P[M]) {
|
|
1893
|
+
const z = P[M];
|
|
1894
1894
|
z.classList.contains(
|
|
1895
1895
|
"bc-menu-item--has-submenu"
|
|
1896
1896
|
) && z.dispatchEvent(new Event("mouseenter"));
|
|
@@ -1900,19 +1900,19 @@ function Ht(e) {
|
|
|
1900
1900
|
T.preventDefault(), T.stopPropagation(), o?.();
|
|
1901
1901
|
break;
|
|
1902
1902
|
}
|
|
1903
|
-
},
|
|
1904
|
-
h.value >= 0 &&
|
|
1903
|
+
}, D = (T, P) => {
|
|
1904
|
+
h.value >= 0 && P[h.value] && (P[h.value].classList.remove(
|
|
1905
1905
|
"bc-menu-item--focused"
|
|
1906
|
-
),
|
|
1906
|
+
), P[h.value].removeAttribute("aria-selected")), T >= 0 && P[T] && (P[T].classList.add("bc-menu-item--focused"), P[T].setAttribute("aria-selected", "true"), h.set(T), typeof P[T].scrollIntoView == "function" && P[T].scrollIntoView({ block: "nearest" }));
|
|
1907
1907
|
}, V = () => {
|
|
1908
1908
|
const T = Array.from(
|
|
1909
1909
|
C.querySelectorAll('[role="menuitem"]')
|
|
1910
1910
|
);
|
|
1911
1911
|
if (v.set(T), T.length > 0) {
|
|
1912
|
-
const
|
|
1912
|
+
const P = T.findIndex(
|
|
1913
1913
|
(M) => M.getAttribute("aria-disabled") !== "true"
|
|
1914
1914
|
);
|
|
1915
|
-
|
|
1915
|
+
P >= 0 && D(P, T);
|
|
1916
1916
|
}
|
|
1917
1917
|
}, E = new MutationObserver(V);
|
|
1918
1918
|
return E.observe(C, { childList: !0, subtree: !0 }), setTimeout(() => {
|
|
@@ -1922,7 +1922,7 @@ function Ht(e) {
|
|
|
1922
1922
|
E.disconnect(), document.removeEventListener("keydown", w, !0), k && k.focus();
|
|
1923
1923
|
}),
|
|
1924
1924
|
s.class("bc-menu"),
|
|
1925
|
-
s.id(
|
|
1925
|
+
s.id(b),
|
|
1926
1926
|
s.role("menu"),
|
|
1927
1927
|
s.tabindex(-1),
|
|
1928
1928
|
L.orientation("vertical"),
|
|
@@ -1930,8 +1930,8 @@ function Ht(e) {
|
|
|
1930
1930
|
x ? L.labelledby(x) : N(),
|
|
1931
1931
|
L.activedescendant(
|
|
1932
1932
|
h.map((T) => {
|
|
1933
|
-
const
|
|
1934
|
-
return T >= 0 &&
|
|
1933
|
+
const P = v.value;
|
|
1934
|
+
return T >= 0 && P[T] ? P[T].id || `${b}-item-${T}` : "";
|
|
1935
1935
|
})
|
|
1936
1936
|
),
|
|
1937
1937
|
I.click((T) => {
|
|
@@ -1947,10 +1947,10 @@ function Ht(e) {
|
|
|
1947
1947
|
L.live("polite"),
|
|
1948
1948
|
L.atomic(!0),
|
|
1949
1949
|
h.map((T) => {
|
|
1950
|
-
const
|
|
1951
|
-
if (T >= 0 &&
|
|
1952
|
-
const M =
|
|
1953
|
-
return
|
|
1950
|
+
const P = v.value;
|
|
1951
|
+
if (T >= 0 && P[T]) {
|
|
1952
|
+
const M = P[T].textContent || "";
|
|
1953
|
+
return P[T].getAttribute("aria-disabled") === "true" ? `${M}, disabled` : `${M}, ${T + 1} of ${P.length}`;
|
|
1954
1954
|
}
|
|
1955
1955
|
return "";
|
|
1956
1956
|
})
|
|
@@ -1983,7 +1983,7 @@ function Na(e) {
|
|
|
1983
1983
|
return p.div(
|
|
1984
1984
|
s.class(
|
|
1985
1985
|
S(r)(
|
|
1986
|
-
(
|
|
1986
|
+
(b) => `bc-menu-item ${b ? "bc-menu-item--disabled" : ""} ${x ? "bc-menu-item--has-submenu" : ""}`
|
|
1987
1987
|
)
|
|
1988
1988
|
),
|
|
1989
1989
|
s.id(f),
|
|
@@ -1995,9 +1995,9 @@ function Na(e) {
|
|
|
1995
1995
|
// Will be updated by focus management
|
|
1996
1996
|
x ? L.expanded(!1) : N(),
|
|
1997
1997
|
c ? L.label(c) : N(),
|
|
1998
|
-
I.click((
|
|
1999
|
-
if (
|
|
2000
|
-
|
|
1998
|
+
I.click((b) => {
|
|
1999
|
+
if (g.get(r)) {
|
|
2000
|
+
b.preventDefault(), b.stopPropagation();
|
|
2001
2001
|
return;
|
|
2002
2002
|
}
|
|
2003
2003
|
u?.();
|
|
@@ -2102,14 +2102,14 @@ function Gt(e) {
|
|
|
2102
2102
|
equality: a = (o, d) => o === d,
|
|
2103
2103
|
placeholder: l
|
|
2104
2104
|
} = e, r = (o) => {
|
|
2105
|
-
const d =
|
|
2105
|
+
const d = g.get(n);
|
|
2106
2106
|
e.onChange?.(zt(d, o, a));
|
|
2107
2107
|
}, u = (o) => {
|
|
2108
|
-
const d =
|
|
2108
|
+
const d = g.get(n);
|
|
2109
2109
|
e.onChange?.(jt(d, o, a));
|
|
2110
2110
|
}, c = (o) => S(n)((d) => Wt(d, o, a)), i = Ht({
|
|
2111
2111
|
items: () => {
|
|
2112
|
-
const o =
|
|
2112
|
+
const o = g.get(t), d = [];
|
|
2113
2113
|
for (const f of o)
|
|
2114
2114
|
if (f.type === "value") {
|
|
2115
2115
|
const x = c(f.value);
|
|
@@ -2130,12 +2130,12 @@ function Gt(e) {
|
|
|
2130
2130
|
p.div(s.class("bc-menu-group__label"), f.group),
|
|
2131
2131
|
...f.options.map((x) => {
|
|
2132
2132
|
if (x.type === "value") {
|
|
2133
|
-
const
|
|
2133
|
+
const b = c(x.value);
|
|
2134
2134
|
return p.div(
|
|
2135
2135
|
s.role("menuitem"),
|
|
2136
2136
|
s.tabindex(-1),
|
|
2137
2137
|
L.disabled(x.disabled === !0),
|
|
2138
|
-
L.checked(
|
|
2138
|
+
L.checked(b),
|
|
2139
2139
|
s.class("bc-menu-item"),
|
|
2140
2140
|
p.span(s.class("bc-menu-item__content"), x.label),
|
|
2141
2141
|
I.click(() => u(x.value))
|
|
@@ -2188,33 +2188,33 @@ function Kt(e) {
|
|
|
2188
2188
|
const {
|
|
2189
2189
|
value: n,
|
|
2190
2190
|
options: t,
|
|
2191
|
-
equality: a = (
|
|
2191
|
+
equality: a = (b, h) => b === h,
|
|
2192
2192
|
placeholder: l,
|
|
2193
2193
|
searchPlaceholder: r,
|
|
2194
2194
|
filter: u
|
|
2195
|
-
} = e, c = Z(""), i = (
|
|
2196
|
-
const h =
|
|
2197
|
-
e.onChange?.(zt(h,
|
|
2198
|
-
}, o = (
|
|
2199
|
-
const h =
|
|
2200
|
-
e.onChange?.(jt(h,
|
|
2201
|
-
}, d = (
|
|
2195
|
+
} = e, c = Z(""), i = (b) => {
|
|
2196
|
+
const h = g.get(n);
|
|
2197
|
+
e.onChange?.(zt(h, b, a));
|
|
2198
|
+
}, o = (b) => {
|
|
2199
|
+
const h = g.get(n);
|
|
2200
|
+
e.onChange?.(jt(h, b, a));
|
|
2201
|
+
}, d = (b) => S(n)((h) => Wt(h, b, a)), f = S(
|
|
2202
2202
|
t,
|
|
2203
2203
|
c
|
|
2204
|
-
)((
|
|
2204
|
+
)((b, h) => qt(b, h, u)), x = Ht({
|
|
2205
2205
|
items: () => {
|
|
2206
|
-
const
|
|
2206
|
+
const b = [], h = g.get(f);
|
|
2207
2207
|
if (h.length === 0)
|
|
2208
|
-
return
|
|
2208
|
+
return b.push(
|
|
2209
2209
|
p.div(
|
|
2210
2210
|
s.class("bc-dropdown__empty"),
|
|
2211
2211
|
te(oe, (v) => v.$.noResults)
|
|
2212
2212
|
)
|
|
2213
|
-
),
|
|
2213
|
+
), b;
|
|
2214
2214
|
for (const v of h)
|
|
2215
2215
|
if (v.type === "value") {
|
|
2216
2216
|
const k = d(v.value);
|
|
2217
|
-
|
|
2217
|
+
b.push(
|
|
2218
2218
|
p.div(
|
|
2219
2219
|
s.role("menuitem"),
|
|
2220
2220
|
s.tabindex(-1),
|
|
@@ -2225,7 +2225,7 @@ function Kt(e) {
|
|
|
2225
2225
|
I.click(() => o(v.value))
|
|
2226
2226
|
)
|
|
2227
2227
|
);
|
|
2228
|
-
} else v.type === "group" ?
|
|
2228
|
+
} else v.type === "group" ? b.push(
|
|
2229
2229
|
p.div(
|
|
2230
2230
|
s.class("bc-menu-group"),
|
|
2231
2231
|
p.div(s.class("bc-menu-group__label"), v.group),
|
|
@@ -2245,8 +2245,8 @@ function Kt(e) {
|
|
|
2245
2245
|
return N();
|
|
2246
2246
|
})
|
|
2247
2247
|
)
|
|
2248
|
-
) :
|
|
2249
|
-
return
|
|
2248
|
+
) : b.push(Ut());
|
|
2249
|
+
return b;
|
|
2250
2250
|
},
|
|
2251
2251
|
placement: "bottom-start",
|
|
2252
2252
|
showDelay: 0,
|
|
@@ -2254,12 +2254,12 @@ function Kt(e) {
|
|
|
2254
2254
|
// Open the menu when the search input gains focus
|
|
2255
2255
|
// We intentionally do not auto-hide on blur here because the Menu
|
|
2256
2256
|
// manages its own close behavior (outside click, Escape, etc.)
|
|
2257
|
-
showOn: (
|
|
2257
|
+
showOn: (b, h) => ne((v) => {
|
|
2258
2258
|
const k = v.querySelector(
|
|
2259
2259
|
".bc-dropdown__search-input"
|
|
2260
2260
|
);
|
|
2261
2261
|
if (k) {
|
|
2262
|
-
const C = () =>
|
|
2262
|
+
const C = () => b();
|
|
2263
2263
|
return k.addEventListener("focus", C), X(() => {
|
|
2264
2264
|
k.removeEventListener("focus", C);
|
|
2265
2265
|
});
|
|
@@ -2291,15 +2291,15 @@ function Kt(e) {
|
|
|
2291
2291
|
S(
|
|
2292
2292
|
r,
|
|
2293
2293
|
l
|
|
2294
|
-
)((
|
|
2294
|
+
)((b, h) => b ?? h ?? "")
|
|
2295
2295
|
),
|
|
2296
2296
|
s.value(c),
|
|
2297
|
-
I.input((
|
|
2298
|
-
const h =
|
|
2297
|
+
I.input((b) => {
|
|
2298
|
+
const h = b.target;
|
|
2299
2299
|
c.set(h.value);
|
|
2300
2300
|
}),
|
|
2301
|
-
I.keydown((
|
|
2302
|
-
(
|
|
2301
|
+
I.keydown((b) => {
|
|
2302
|
+
(b.key === "ArrowUp" || b.key === "ArrowDown" || b.key === "Enter" || b.key === " ") && b.stopPropagation();
|
|
2303
2303
|
})
|
|
2304
2304
|
),
|
|
2305
2305
|
x
|
|
@@ -2334,7 +2334,7 @@ const Ha = (e) => {
|
|
|
2334
2334
|
...e,
|
|
2335
2335
|
input: se["datetime-local"](
|
|
2336
2336
|
ae(e),
|
|
2337
|
-
s.value(
|
|
2337
|
+
s.value(g.map(n, Wn)),
|
|
2338
2338
|
s.class("bc-input"),
|
|
2339
2339
|
t != null ? I.blur(j(t)) : R,
|
|
2340
2340
|
a != null ? I.change(j((l) => a(new Date(l)))) : R
|
|
@@ -2350,7 +2350,7 @@ const Ha = (e) => {
|
|
|
2350
2350
|
return fn({
|
|
2351
2351
|
...l,
|
|
2352
2352
|
maxFiles: 1,
|
|
2353
|
-
value:
|
|
2353
|
+
value: g.map(n, (r) => r == null ? [] : [r]),
|
|
2354
2354
|
onChange: (r) => {
|
|
2355
2355
|
a?.(r[0]);
|
|
2356
2356
|
},
|
|
@@ -2386,7 +2386,7 @@ const Ha = (e) => {
|
|
|
2386
2386
|
const { value: n, onBlur: t, onChange: a, onInput: l, after: r, disabled: u, ...c } = e, i = fe(n, u, a);
|
|
2387
2387
|
return $e({
|
|
2388
2388
|
...c,
|
|
2389
|
-
value:
|
|
2389
|
+
value: g.map(n, bn),
|
|
2390
2390
|
onChange: a != null ? (o) => a(dt(o)) : void 0,
|
|
2391
2391
|
onInput: l != null ? (o) => l(dt(o)) : void 0,
|
|
2392
2392
|
onBlur: t,
|
|
@@ -2399,19 +2399,19 @@ const Ha = (e) => {
|
|
|
2399
2399
|
return null;
|
|
2400
2400
|
}
|
|
2401
2401
|
}, Ya = (e) => {
|
|
2402
|
-
const { value: n, step: t, min: a, max: l, onChange: r, onInput: u, after: c } = e, i = (
|
|
2403
|
-
const h = a != null ?
|
|
2404
|
-
return h != null &&
|
|
2405
|
-
}, o = t != null ? te(oe, (
|
|
2402
|
+
const { value: n, step: t, min: a, max: l, onChange: r, onInput: u, after: c } = e, i = (b) => {
|
|
2403
|
+
const h = a != null ? g.get(a) : void 0, v = l != null ? g.get(l) : void 0;
|
|
2404
|
+
return h != null && b < h ? h : v != null && b > v ? v : b;
|
|
2405
|
+
}, o = t != null ? te(oe, (b) => {
|
|
2406
2406
|
const h = S(
|
|
2407
2407
|
n,
|
|
2408
2408
|
a
|
|
2409
|
-
)((C,
|
|
2409
|
+
)((C, m) => m == null ? !0 : (C ?? 0n) > m), v = S(
|
|
2410
2410
|
n,
|
|
2411
2411
|
l
|
|
2412
|
-
)((C,
|
|
2413
|
-
const w =
|
|
2414
|
-
if (C < 0n && T != null && E < T || C > 0n &&
|
|
2412
|
+
)((C, m) => m == null ? !0 : (C ?? 0n) < m), k = (C, m) => {
|
|
2413
|
+
const w = g.get(n) ?? 0n, D = g.get(t), V = m?.shiftKey ? 10n : 1n, E = w + D * V * C, T = a != null ? g.get(a) : void 0, P = l != null ? g.get(l) : void 0;
|
|
2414
|
+
if (C < 0n && T != null && E < T || C > 0n && P != null && E > P) return;
|
|
2415
2415
|
const M = i(E);
|
|
2416
2416
|
M !== w && r && r(M);
|
|
2417
2417
|
};
|
|
@@ -2426,10 +2426,10 @@ const Ha = (e) => {
|
|
|
2426
2426
|
S(
|
|
2427
2427
|
v,
|
|
2428
2428
|
e.disabled ?? !1
|
|
2429
|
-
)((C,
|
|
2429
|
+
)((C, m) => !C || m)
|
|
2430
2430
|
),
|
|
2431
2431
|
I.click((C) => k(1n, C)),
|
|
2432
|
-
L.label(
|
|
2432
|
+
L.label(b.$.incrementValue),
|
|
2433
2433
|
Q({ icon: "line-md:plus", size: "xs" })
|
|
2434
2434
|
),
|
|
2435
2435
|
p.button(
|
|
@@ -2441,23 +2441,23 @@ const Ha = (e) => {
|
|
|
2441
2441
|
S(
|
|
2442
2442
|
h,
|
|
2443
2443
|
e.disabled ?? !1
|
|
2444
|
-
)((C,
|
|
2444
|
+
)((C, m) => !C || m)
|
|
2445
2445
|
),
|
|
2446
2446
|
I.click((C) => k(-1n, C)),
|
|
2447
|
-
L.label(
|
|
2447
|
+
L.label(b.$.decrementValue),
|
|
2448
2448
|
Q({ icon: "line-md:minus", size: "xs" })
|
|
2449
2449
|
)
|
|
2450
2450
|
);
|
|
2451
|
-
}) : null, d = c != null && o != null ? N(o, c) : c ?? o, f = r ? (
|
|
2452
|
-
const h = vt(
|
|
2451
|
+
}) : null, d = c != null && o != null ? N(o, c) : c ?? o, f = r ? (b) => {
|
|
2452
|
+
const h = vt(b);
|
|
2453
2453
|
h != null && r(i(h));
|
|
2454
|
-
} : void 0, x = u ? (
|
|
2455
|
-
const h = vt(
|
|
2454
|
+
} : void 0, x = u ? (b) => {
|
|
2455
|
+
const h = vt(b);
|
|
2456
2456
|
h != null && u(i(h));
|
|
2457
2457
|
} : void 0;
|
|
2458
2458
|
return $e({
|
|
2459
2459
|
...e,
|
|
2460
|
-
value:
|
|
2460
|
+
value: g.map(n, (b) => b.toString()),
|
|
2461
2461
|
onChange: f,
|
|
2462
2462
|
onInput: x,
|
|
2463
2463
|
after: d,
|
|
@@ -2474,26 +2474,26 @@ const Ha = (e) => {
|
|
|
2474
2474
|
}
|
|
2475
2475
|
}, qa = (e) => {
|
|
2476
2476
|
const { value: n, step: t, min: a, max: l, onChange: r, onInput: u, after: c } = e, i = (h) => {
|
|
2477
|
-
const v = a != null ?
|
|
2477
|
+
const v = a != null ? g.get(a) : void 0, k = l != null ? g.get(l) : void 0;
|
|
2478
2478
|
return v != null && h < v ? v : k != null && h > k ? k : h;
|
|
2479
2479
|
}, o = t != null ? te(oe, (h) => {
|
|
2480
2480
|
const v = S(
|
|
2481
2481
|
n,
|
|
2482
2482
|
a
|
|
2483
|
-
)((
|
|
2484
|
-
const
|
|
2485
|
-
return w == null ? !0 :
|
|
2483
|
+
)((m, w) => {
|
|
2484
|
+
const D = m ?? 0n;
|
|
2485
|
+
return w == null ? !0 : D > w;
|
|
2486
2486
|
}), k = S(
|
|
2487
2487
|
n,
|
|
2488
2488
|
l
|
|
2489
|
-
)((
|
|
2490
|
-
const
|
|
2491
|
-
return w == null ? !0 :
|
|
2492
|
-
}), C = (
|
|
2493
|
-
const
|
|
2494
|
-
if (
|
|
2489
|
+
)((m, w) => {
|
|
2490
|
+
const D = m ?? 0n;
|
|
2491
|
+
return w == null ? !0 : D < w;
|
|
2492
|
+
}), C = (m, w) => {
|
|
2493
|
+
const D = g.get(n) ?? 0n, V = g.get(t), E = w?.shiftKey ? 10n : 1n, T = D + V * E * m, P = a != null ? g.get(a) : void 0, M = l != null ? g.get(l) : void 0;
|
|
2494
|
+
if (m < 0n && P != null && T < P || m > 0n && M != null && T > M) return;
|
|
2495
2495
|
const U = i(T);
|
|
2496
|
-
U !==
|
|
2496
|
+
U !== D && r && r(U);
|
|
2497
2497
|
};
|
|
2498
2498
|
return nt(
|
|
2499
2499
|
s.class("bc-number-input-steppers"),
|
|
@@ -2506,9 +2506,9 @@ const Ha = (e) => {
|
|
|
2506
2506
|
S(
|
|
2507
2507
|
k,
|
|
2508
2508
|
e.disabled ?? !1
|
|
2509
|
-
)((
|
|
2509
|
+
)((m, w) => !m || w)
|
|
2510
2510
|
),
|
|
2511
|
-
I.click((
|
|
2511
|
+
I.click((m) => C(1n, m)),
|
|
2512
2512
|
L.label(h.$.incrementValue),
|
|
2513
2513
|
Q({ icon: "line-md:plus", size: "xs" })
|
|
2514
2514
|
),
|
|
@@ -2521,9 +2521,9 @@ const Ha = (e) => {
|
|
|
2521
2521
|
S(
|
|
2522
2522
|
v,
|
|
2523
2523
|
e.disabled ?? !1
|
|
2524
|
-
)((
|
|
2524
|
+
)((m, w) => !m || w)
|
|
2525
2525
|
),
|
|
2526
|
-
I.click((
|
|
2526
|
+
I.click((m) => C(-1n, m)),
|
|
2527
2527
|
L.label(h.$.decrementValue),
|
|
2528
2528
|
Q({ icon: "line-md:minus", size: "xs" })
|
|
2529
2529
|
)
|
|
@@ -2531,15 +2531,15 @@ const Ha = (e) => {
|
|
|
2531
2531
|
}) : null, d = fe(n, e.disabled, r), f = c != null && o != null ? N(o, d, c) : c != null ? N(d, c) : o != null ? N(o, d) : d, x = r ? (h) => {
|
|
2532
2532
|
const v = yt(h);
|
|
2533
2533
|
r(v === null ? null : i(v));
|
|
2534
|
-
} : void 0,
|
|
2534
|
+
} : void 0, b = u ? (h) => {
|
|
2535
2535
|
const v = yt(h);
|
|
2536
2536
|
u(v === null ? null : i(v));
|
|
2537
2537
|
} : void 0;
|
|
2538
2538
|
return $e({
|
|
2539
2539
|
...e,
|
|
2540
|
-
value:
|
|
2540
|
+
value: g.map(n, (h) => h == null ? "" : h.toString()),
|
|
2541
2541
|
onChange: x,
|
|
2542
|
-
onInput:
|
|
2542
|
+
onInput: b,
|
|
2543
2543
|
after: f,
|
|
2544
2544
|
mask: null,
|
|
2545
2545
|
allowMode: "digits",
|
|
@@ -2547,9 +2547,9 @@ const Ha = (e) => {
|
|
|
2547
2547
|
});
|
|
2548
2548
|
}, Za = (e) => {
|
|
2549
2549
|
const { value: n, onChange: t, onBlur: a, before: l } = e, r = Z(""), u = (i) => {
|
|
2550
|
-
t?.(
|
|
2550
|
+
t?.(g.get(n).filter((o) => o !== i));
|
|
2551
2551
|
}, c = () => {
|
|
2552
|
-
const i = r.value.trim(), o =
|
|
2552
|
+
const i = r.value.trim(), o = g.get(n);
|
|
2553
2553
|
i === "" || o.includes(i) || (r.set(""), t?.([...o, i]));
|
|
2554
2554
|
};
|
|
2555
2555
|
return J({
|
|
@@ -2588,7 +2588,7 @@ const Ha = (e) => {
|
|
|
2588
2588
|
...e,
|
|
2589
2589
|
input: se.date(
|
|
2590
2590
|
ae(e),
|
|
2591
|
-
s.value(
|
|
2591
|
+
s.value(g.map(n, (r) => r.toString())),
|
|
2592
2592
|
s.class("bc-input"),
|
|
2593
2593
|
t != null ? I.blur(j(t)) : R,
|
|
2594
2594
|
a != null ? I.change(j((r) => a(l.PlainDate.from(r)))) : R
|
|
@@ -2602,7 +2602,7 @@ const Ha = (e) => {
|
|
|
2602
2602
|
...e,
|
|
2603
2603
|
input: se.date(
|
|
2604
2604
|
ae(e),
|
|
2605
|
-
s.value(
|
|
2605
|
+
s.value(g.map(n, (i) => i?.toString() ?? "")),
|
|
2606
2606
|
s.class("bc-input"),
|
|
2607
2607
|
t != null ? I.blur(j(t)) : R,
|
|
2608
2608
|
a != null ? I.change(
|
|
@@ -2621,7 +2621,7 @@ const Ha = (e) => {
|
|
|
2621
2621
|
...e,
|
|
2622
2622
|
input: se.time(
|
|
2623
2623
|
ae(e),
|
|
2624
|
-
s.value(
|
|
2624
|
+
s.value(g.map(n, (r) => r.toString())),
|
|
2625
2625
|
s.class("bc-input"),
|
|
2626
2626
|
t != null ? I.blur(j(t)) : R,
|
|
2627
2627
|
a != null ? I.change(j((r) => a(l.PlainTime.from(r)))) : R
|
|
@@ -2635,7 +2635,7 @@ const Ha = (e) => {
|
|
|
2635
2635
|
...e,
|
|
2636
2636
|
input: se.time(
|
|
2637
2637
|
ae(e),
|
|
2638
|
-
s.value(
|
|
2638
|
+
s.value(g.map(n, (i) => i?.toString())),
|
|
2639
2639
|
s.class("bc-input"),
|
|
2640
2640
|
t != null ? I.blur(j(t)) : R,
|
|
2641
2641
|
a != null ? I.change(
|
|
@@ -2654,7 +2654,7 @@ const Ha = (e) => {
|
|
|
2654
2654
|
...e,
|
|
2655
2655
|
input: se["datetime-local"](
|
|
2656
2656
|
ae(e),
|
|
2657
|
-
s.value(
|
|
2657
|
+
s.value(g.map(n, (r) => r.toJSON())),
|
|
2658
2658
|
s.class("bc-input"),
|
|
2659
2659
|
t != null ? I.blur(j(t)) : R,
|
|
2660
2660
|
a != null ? I.change(j((r) => a(l.PlainDateTime.from(r)))) : R
|
|
@@ -2668,7 +2668,7 @@ const Ha = (e) => {
|
|
|
2668
2668
|
...e,
|
|
2669
2669
|
input: se["datetime-local"](
|
|
2670
2670
|
ae(e),
|
|
2671
|
-
s.value(
|
|
2671
|
+
s.value(g.map(n, (i) => i?.toJSON())),
|
|
2672
2672
|
s.class("bc-input"),
|
|
2673
2673
|
t != null ? I.blur(j(t)) : R,
|
|
2674
2674
|
a != null ? I.change(
|
|
@@ -2691,7 +2691,7 @@ const Ha = (e) => {
|
|
|
2691
2691
|
input: se["datetime-local"](
|
|
2692
2692
|
ae(e),
|
|
2693
2693
|
s.value(
|
|
2694
|
-
|
|
2694
|
+
g.map(n, (r) => Yn(Number(r.epochMilliseconds)))
|
|
2695
2695
|
),
|
|
2696
2696
|
s.class("bc-input"),
|
|
2697
2697
|
t != null ? I.blur(j(t)) : R,
|
|
@@ -2714,7 +2714,7 @@ const Ha = (e) => {
|
|
|
2714
2714
|
input: se["datetime-local"](
|
|
2715
2715
|
ae(e),
|
|
2716
2716
|
s.value(
|
|
2717
|
-
|
|
2717
|
+
g.map(
|
|
2718
2718
|
n,
|
|
2719
2719
|
(i) => i == null ? null : qn(Number(i.epochMilliseconds))
|
|
2720
2720
|
)
|
|
@@ -2737,12 +2737,12 @@ const Ha = (e) => {
|
|
|
2737
2737
|
...e,
|
|
2738
2738
|
input: se["datetime-local"](
|
|
2739
2739
|
ae(e),
|
|
2740
|
-
s.value(
|
|
2740
|
+
s.value(g.map(n, (r) => r.toJSON())),
|
|
2741
2741
|
s.class("bc-input"),
|
|
2742
2742
|
t != null ? I.blur(j(t)) : R,
|
|
2743
2743
|
a != null ? I.change(
|
|
2744
2744
|
j((r) => {
|
|
2745
|
-
const u = l.PlainDateTime.from(r), c =
|
|
2745
|
+
const u = l.PlainDateTime.from(r), c = g.get(e.placeholder) ?? Intl.DateTimeFormat().resolvedOptions().timeZone;
|
|
2746
2746
|
return a(l.ZonedDateTime.from({ ...u, timeZone: c }));
|
|
2747
2747
|
})
|
|
2748
2748
|
) : R
|
|
@@ -2756,13 +2756,13 @@ const Ha = (e) => {
|
|
|
2756
2756
|
...e,
|
|
2757
2757
|
input: se["datetime-local"](
|
|
2758
2758
|
ae(e),
|
|
2759
|
-
s.value(
|
|
2759
|
+
s.value(g.map(n, (i) => i?.toJSON())),
|
|
2760
2760
|
s.class("bc-input"),
|
|
2761
2761
|
t != null ? I.blur(j(t)) : R,
|
|
2762
2762
|
a != null ? I.change(
|
|
2763
2763
|
j((i) => {
|
|
2764
2764
|
if (i === "") return a(null);
|
|
2765
|
-
const o = c.PlainDateTime.from(i), d =
|
|
2765
|
+
const o = c.PlainDateTime.from(i), d = g.get(e.placeholder) ?? Intl.DateTimeFormat().resolvedOptions().timeZone;
|
|
2766
2766
|
return a(c.ZonedDateTime.from({ ...o, timeZone: d }));
|
|
2767
2767
|
})
|
|
2768
2768
|
) : R
|
|
@@ -2777,7 +2777,7 @@ const Ha = (e) => {
|
|
|
2777
2777
|
...e,
|
|
2778
2778
|
input: se.month(
|
|
2779
2779
|
ae(e),
|
|
2780
|
-
s.value(
|
|
2780
|
+
s.value(g.map(n, (r) => r.toString())),
|
|
2781
2781
|
s.class("bc-input"),
|
|
2782
2782
|
t != null ? I.blur(j(t)) : R,
|
|
2783
2783
|
a != null ? I.change(j((r) => a(l.PlainYearMonth.from(r)))) : R
|
|
@@ -2791,7 +2791,7 @@ const Ha = (e) => {
|
|
|
2791
2791
|
...e,
|
|
2792
2792
|
input: se.month(
|
|
2793
2793
|
ae(e),
|
|
2794
|
-
s.value(
|
|
2794
|
+
s.value(g.map(n, (i) => i?.toString())),
|
|
2795
2795
|
s.class("bc-input"),
|
|
2796
2796
|
t != null ? I.blur(j(t)) : R,
|
|
2797
2797
|
a != null ? I.change(
|
|
@@ -2809,7 +2809,7 @@ const Ha = (e) => {
|
|
|
2809
2809
|
(a) => $e({
|
|
2810
2810
|
...e,
|
|
2811
2811
|
// Map Temporal value to MM-DD string
|
|
2812
|
-
value:
|
|
2812
|
+
value: g.map(n, (l) => l.toString()),
|
|
2813
2813
|
onChange: t != null ? (l) => t(a.PlainMonthDay.from(`--${l}`)) : void 0,
|
|
2814
2814
|
onInput: void 0,
|
|
2815
2815
|
mask: "99-99",
|
|
@@ -2821,7 +2821,7 @@ const Ha = (e) => {
|
|
|
2821
2821
|
return le(
|
|
2822
2822
|
(u) => $e({
|
|
2823
2823
|
...e,
|
|
2824
|
-
value:
|
|
2824
|
+
value: g.map(n, (c) => c?.toString() ?? ""),
|
|
2825
2825
|
onChange: t != null ? (c) => t(c === "" ? null : u.PlainMonthDay.from(`--${c}`)) : void 0,
|
|
2826
2826
|
onInput: void 0,
|
|
2827
2827
|
mask: "99-99",
|
|
@@ -2834,7 +2834,7 @@ const Ha = (e) => {
|
|
|
2834
2834
|
return le(
|
|
2835
2835
|
(a) => $e({
|
|
2836
2836
|
...e,
|
|
2837
|
-
value:
|
|
2837
|
+
value: g.map(n, (l) => l.toString()),
|
|
2838
2838
|
onChange: t ? (l) => t(a.Duration.from(l)) : void 0,
|
|
2839
2839
|
onInput: void 0,
|
|
2840
2840
|
...mn(a.Duration.from),
|
|
@@ -2990,7 +2990,7 @@ function bs({
|
|
|
2990
2990
|
title: a.$.locale
|
|
2991
2991
|
}),
|
|
2992
2992
|
Lt({
|
|
2993
|
-
options:
|
|
2993
|
+
options: g.map(
|
|
2994
2994
|
e,
|
|
2995
2995
|
(u) => u.map((c) => {
|
|
2996
2996
|
let i = c.name;
|
|
@@ -3017,10 +3017,10 @@ function ms({
|
|
|
3017
3017
|
appearancePreferenceKey: a = "bui-appearance"
|
|
3018
3018
|
}, ...l) {
|
|
3019
3019
|
return tn(({ set: r, use: u }) => {
|
|
3020
|
-
r(
|
|
3020
|
+
r(Pe, {}), r(Je, {}), r(oe, {}), r(_t, {
|
|
3021
3021
|
defaultAppearance: n ? t : "light",
|
|
3022
3022
|
appearancePreferenceKey: a
|
|
3023
|
-
}), on.attach(u(
|
|
3023
|
+
}), on.attach(u(Pe));
|
|
3024
3024
|
const c = N(
|
|
3025
3025
|
n ? un() : R,
|
|
3026
3026
|
Gn(),
|
|
@@ -3032,27 +3032,45 @@ function ms({
|
|
|
3032
3032
|
) : c;
|
|
3033
3033
|
});
|
|
3034
3034
|
}
|
|
3035
|
-
function gs({
|
|
3036
|
-
|
|
3037
|
-
|
|
3038
|
-
|
|
3039
|
-
|
|
3035
|
+
function gs({
|
|
3036
|
+
content: e,
|
|
3037
|
+
toolbar: n = !0,
|
|
3038
|
+
page: t,
|
|
3039
|
+
zoom: a,
|
|
3040
|
+
view: l
|
|
3041
|
+
}) {
|
|
3042
|
+
const r = g.toSignal(e), u = S(r)((i) => i.arrayBuffer()).mapAsync(
|
|
3043
|
+
async (i) => {
|
|
3044
|
+
const o = new Blob([await i], { type: "application/pdf" });
|
|
3045
|
+
return URL.createObjectURL(o);
|
|
3040
3046
|
},
|
|
3041
3047
|
null
|
|
3042
|
-
)
|
|
3048
|
+
), c = S(
|
|
3049
|
+
u,
|
|
3050
|
+
n,
|
|
3051
|
+
t,
|
|
3052
|
+
a,
|
|
3053
|
+
l
|
|
3054
|
+
)((i, o, d, f, x) => {
|
|
3055
|
+
if (i == null) return null;
|
|
3056
|
+
const b = [];
|
|
3057
|
+
o === !1 && b.push("toolbar=0"), d != null && d > 0 && b.push(`page=${d}`), f != null && f > 0 && b.push(`zoom=${f}`), x != null && b.push(`view=${x}`);
|
|
3058
|
+
const h = b.join("&");
|
|
3059
|
+
return h ? `${i}#${h}` : i;
|
|
3060
|
+
});
|
|
3043
3061
|
return p.div(
|
|
3044
3062
|
X(
|
|
3045
|
-
|
|
3046
|
-
|
|
3063
|
+
u.on((i, o) => {
|
|
3064
|
+
o != null && URL.revokeObjectURL(o);
|
|
3047
3065
|
}),
|
|
3048
3066
|
() => {
|
|
3049
|
-
const
|
|
3050
|
-
|
|
3067
|
+
const i = u.value;
|
|
3068
|
+
i != null && URL.revokeObjectURL(i);
|
|
3051
3069
|
}
|
|
3052
3070
|
),
|
|
3053
3071
|
s.class("h-full w-full"),
|
|
3054
3072
|
// could also use embed or object. IFrame seems to work on Safari.
|
|
3055
|
-
p.iframe(s.class("h-full w-full"), s.src(
|
|
3073
|
+
p.iframe(s.class("h-full w-full"), s.src(c))
|
|
3056
3074
|
);
|
|
3057
3075
|
}
|
|
3058
3076
|
const hs = ({ id: e, css: n }) => It("head", p.style(s.id(e), s.innerHTML(n))), at = ({
|
|
@@ -3112,7 +3130,7 @@ function Kn({
|
|
|
3112
3130
|
S(
|
|
3113
3131
|
n,
|
|
3114
3132
|
l
|
|
3115
|
-
)((x,
|
|
3133
|
+
)((x, b) => xt(x, b))
|
|
3116
3134
|
),
|
|
3117
3135
|
s.style(
|
|
3118
3136
|
S(a)(
|
|
@@ -3135,7 +3153,7 @@ function Kn({
|
|
|
3135
3153
|
S(
|
|
3136
3154
|
n,
|
|
3137
3155
|
l
|
|
3138
|
-
)((x,
|
|
3156
|
+
)((x, b) => xt(x, b))
|
|
3139
3157
|
),
|
|
3140
3158
|
s.style(
|
|
3141
3159
|
S(t)((x) => wt(x ?? "primary"))
|
|
@@ -3169,8 +3187,8 @@ function Jn(e, n, t) {
|
|
|
3169
3187
|
const o = Array.from(
|
|
3170
3188
|
new URLSearchParams(i.search).entries()
|
|
3171
3189
|
).sort(), d = Array.from(a.entries()).sort();
|
|
3172
|
-
return o.length !== d.length ? !1 : o.every(([f, x],
|
|
3173
|
-
const [h, v] = d[
|
|
3190
|
+
return o.length !== d.length ? !1 : o.every(([f, x], b) => {
|
|
3191
|
+
const [h, v] = d[b];
|
|
3174
3192
|
return f === h && x === v;
|
|
3175
3193
|
});
|
|
3176
3194
|
} catch {
|
|
@@ -3191,7 +3209,7 @@ function vs({
|
|
|
3191
3209
|
disableWhenActive: t = !0,
|
|
3192
3210
|
...a
|
|
3193
3211
|
}, ...l) {
|
|
3194
|
-
return te(
|
|
3212
|
+
return te(Pe, (r) => {
|
|
3195
3213
|
const u = r.matchSignal(
|
|
3196
3214
|
st(e, n)
|
|
3197
3215
|
), c = S(
|
|
@@ -3222,16 +3240,16 @@ function ys({
|
|
|
3222
3240
|
size: d = "md",
|
|
3223
3241
|
color: f = "base",
|
|
3224
3242
|
roundedness: x = "sm",
|
|
3225
|
-
disabled:
|
|
3243
|
+
disabled: b = !1
|
|
3226
3244
|
}, ...h) {
|
|
3227
|
-
return c !== void 0 || i !== void 0 ? te(
|
|
3245
|
+
return c !== void 0 || i !== void 0 ? te(Pe, (v) => {
|
|
3228
3246
|
const k = c !== void 0 ? v.matchSignal(st(e, c)) : S(v.location)(() => !1), C = S(
|
|
3229
3247
|
k,
|
|
3230
3248
|
i
|
|
3231
|
-
)((w,
|
|
3232
|
-
|
|
3249
|
+
)((w, D) => !(D ?? !0) || !c ? !1 : w), m = S(
|
|
3250
|
+
b,
|
|
3233
3251
|
C
|
|
3234
|
-
)((w,
|
|
3252
|
+
)((w, D) => w || D);
|
|
3235
3253
|
return St(
|
|
3236
3254
|
{
|
|
3237
3255
|
href: e,
|
|
@@ -3245,7 +3263,7 @@ function ys({
|
|
|
3245
3263
|
size: d,
|
|
3246
3264
|
color: f,
|
|
3247
3265
|
roundedness: x,
|
|
3248
|
-
disabled:
|
|
3266
|
+
disabled: m
|
|
3249
3267
|
},
|
|
3250
3268
|
...h
|
|
3251
3269
|
);
|
|
@@ -3262,7 +3280,7 @@ function ys({
|
|
|
3262
3280
|
size: d,
|
|
3263
3281
|
color: f,
|
|
3264
3282
|
roundedness: x,
|
|
3265
|
-
disabled:
|
|
3283
|
+
disabled: b
|
|
3266
3284
|
},
|
|
3267
3285
|
...h
|
|
3268
3286
|
);
|
|
@@ -3289,8 +3307,8 @@ function St({
|
|
|
3289
3307
|
i,
|
|
3290
3308
|
d
|
|
3291
3309
|
)(
|
|
3292
|
-
(
|
|
3293
|
-
|
|
3310
|
+
(b, h) => ut(
|
|
3311
|
+
b ?? "md",
|
|
3294
3312
|
h ?? "sm",
|
|
3295
3313
|
!1
|
|
3296
3314
|
// loading is always false for ButtonLink
|
|
@@ -3303,8 +3321,8 @@ function St({
|
|
|
3303
3321
|
o,
|
|
3304
3322
|
f
|
|
3305
3323
|
)(
|
|
3306
|
-
(
|
|
3307
|
-
|
|
3324
|
+
(b, h, v) => ct(
|
|
3325
|
+
b ?? "filled",
|
|
3308
3326
|
h ?? "base",
|
|
3309
3327
|
v
|
|
3310
3328
|
)
|
|
@@ -3327,8 +3345,8 @@ function St({
|
|
|
3327
3345
|
i,
|
|
3328
3346
|
d
|
|
3329
3347
|
)(
|
|
3330
|
-
(
|
|
3331
|
-
|
|
3348
|
+
(b, h) => ut(
|
|
3349
|
+
b ?? "md",
|
|
3332
3350
|
h ?? "sm",
|
|
3333
3351
|
!1
|
|
3334
3352
|
// loading is always false for ButtonLink
|
|
@@ -3341,8 +3359,8 @@ function St({
|
|
|
3341
3359
|
o,
|
|
3342
3360
|
f
|
|
3343
3361
|
)(
|
|
3344
|
-
(
|
|
3345
|
-
|
|
3362
|
+
(b, h, v) => ct(
|
|
3363
|
+
b ?? "filled",
|
|
3346
3364
|
h ?? "base",
|
|
3347
3365
|
v
|
|
3348
3366
|
)
|
|
@@ -3367,7 +3385,7 @@ const ea = {
|
|
|
3367
3385
|
function xs({ backgroundMode: e = "light" }, ...n) {
|
|
3368
3386
|
return $t(
|
|
3369
3387
|
ea,
|
|
3370
|
-
|
|
3388
|
+
g.map(
|
|
3371
3389
|
e,
|
|
3372
3390
|
(t) => ({
|
|
3373
3391
|
backgroundMode: t
|
|
@@ -3376,7 +3394,7 @@ function xs({ backgroundMode: e = "light" }, ...n) {
|
|
|
3376
3394
|
() => p.div(
|
|
3377
3395
|
s.class("bc-sidebar"),
|
|
3378
3396
|
s.class(
|
|
3379
|
-
|
|
3397
|
+
g.map(
|
|
3380
3398
|
e,
|
|
3381
3399
|
(t) => t === "dark" ? "bc-sidebar--dark-bg" : ""
|
|
3382
3400
|
)
|
|
@@ -3390,7 +3408,7 @@ function kt({ rail: e, header: n }, ...t) {
|
|
|
3390
3408
|
n != null ? p.div(s.class("bc-sidebar-group__header"), n) : null,
|
|
3391
3409
|
p.div(
|
|
3392
3410
|
s.class(
|
|
3393
|
-
|
|
3411
|
+
g.map(
|
|
3394
3412
|
e ?? !1,
|
|
3395
3413
|
(a) => a ? "bc-sidebar-group--rail" : ""
|
|
3396
3414
|
)
|
|
@@ -3417,7 +3435,7 @@ function aa(e, ...n) {
|
|
|
3417
3435
|
s.type("button"),
|
|
3418
3436
|
I.click(e.onClick),
|
|
3419
3437
|
e.ariaExpanded != null ? L.expanded(
|
|
3420
|
-
|
|
3438
|
+
g.map(
|
|
3421
3439
|
e.ariaExpanded,
|
|
3422
3440
|
(t) => t
|
|
3423
3441
|
)
|
|
@@ -3447,7 +3465,7 @@ function sa(e) {
|
|
|
3447
3465
|
}),
|
|
3448
3466
|
Q({ icon: e.action?.icon })
|
|
3449
3467
|
)
|
|
3450
|
-
), "onClick" in e ? aa(e, ...n) : te(
|
|
3468
|
+
), "onClick" in e ? aa(e, ...n) : te(Pe, (t) => {
|
|
3451
3469
|
const a = t.matchSignal(
|
|
3452
3470
|
st(e.href, "exact"),
|
|
3453
3471
|
{
|
|
@@ -3468,7 +3486,7 @@ function ws({
|
|
|
3468
3486
|
header: t,
|
|
3469
3487
|
startOpen: a = !0
|
|
3470
3488
|
}, ...l) {
|
|
3471
|
-
const r =
|
|
3489
|
+
const r = g.deriveProp(a), u = pe("sidebar-group"), c = `${u}-content`;
|
|
3472
3490
|
return kt(
|
|
3473
3491
|
{},
|
|
3474
3492
|
s.class("bc-sidebar-group-collapsible"),
|
|
@@ -3524,7 +3542,7 @@ function Be(e, n, t) {
|
|
|
3524
3542
|
let r = 0;
|
|
3525
3543
|
for (; r < a; ) {
|
|
3526
3544
|
const u = n[l];
|
|
3527
|
-
if (!
|
|
3545
|
+
if (!g.get(u.disabled ?? !1))
|
|
3528
3546
|
return l;
|
|
3529
3547
|
l += t, l >= a ? l = 0 : l < 0 && (l = a - 1), r++;
|
|
3530
3548
|
}
|
|
@@ -3542,15 +3560,15 @@ function ks(e) {
|
|
|
3542
3560
|
orientation: i = "horizontal",
|
|
3543
3561
|
showContent: o = !0,
|
|
3544
3562
|
ariaLabel: d
|
|
3545
|
-
} = e, f = pe("tablist"), x = Z(-1),
|
|
3546
|
-
if (
|
|
3547
|
-
const C = x.value,
|
|
3563
|
+
} = e, f = pe("tablist"), x = Z(-1), b = S(t)((v) => n.find((k) => k.key === v)), h = (v) => {
|
|
3564
|
+
if (g.get(c)) return;
|
|
3565
|
+
const C = x.value, m = g.get(i) === "horizontal";
|
|
3548
3566
|
let w = C;
|
|
3549
3567
|
switch (v.key) {
|
|
3550
|
-
case (
|
|
3568
|
+
case (m ? "ArrowRight" : "ArrowDown"):
|
|
3551
3569
|
v.preventDefault(), w = Be(C, n, 1);
|
|
3552
3570
|
break;
|
|
3553
|
-
case (
|
|
3571
|
+
case (m ? "ArrowLeft" : "ArrowUp"):
|
|
3554
3572
|
v.preventDefault(), w = Be(C, n, -1);
|
|
3555
3573
|
break;
|
|
3556
3574
|
case "Home":
|
|
@@ -3562,16 +3580,16 @@ function ks(e) {
|
|
|
3562
3580
|
case "Enter":
|
|
3563
3581
|
case " ":
|
|
3564
3582
|
if (v.preventDefault(), C >= 0 && C < n.length) {
|
|
3565
|
-
const
|
|
3566
|
-
|
|
3583
|
+
const D = n[C];
|
|
3584
|
+
g.get(D.disabled ?? !1) || a?.(D.key);
|
|
3567
3585
|
}
|
|
3568
3586
|
break;
|
|
3569
3587
|
}
|
|
3570
3588
|
w !== C && w >= 0 && w < n.length && (x.set(w), setTimeout(() => {
|
|
3571
|
-
const
|
|
3589
|
+
const D = document.querySelector(
|
|
3572
3590
|
`[data-tab-index="${w}"]`
|
|
3573
3591
|
);
|
|
3574
|
-
|
|
3592
|
+
D && D.focus();
|
|
3575
3593
|
}, 0));
|
|
3576
3594
|
};
|
|
3577
3595
|
return p.div(
|
|
@@ -3582,11 +3600,11 @@ function ks(e) {
|
|
|
3582
3600
|
c,
|
|
3583
3601
|
r
|
|
3584
3602
|
)(
|
|
3585
|
-
(v, k, C,
|
|
3603
|
+
(v, k, C, m) => la(
|
|
3586
3604
|
v ?? "md",
|
|
3587
3605
|
k ?? "horizontal",
|
|
3588
3606
|
C ?? !1,
|
|
3589
|
-
|
|
3607
|
+
m ?? "default"
|
|
3590
3608
|
)
|
|
3591
3609
|
)
|
|
3592
3610
|
),
|
|
@@ -3609,17 +3627,17 @@ function ks(e) {
|
|
|
3609
3627
|
d ? L.label(d) : N(),
|
|
3610
3628
|
I.keydown(h),
|
|
3611
3629
|
...n.map((v, k) => {
|
|
3612
|
-
const C = S(t)((V) => V === v.key),
|
|
3630
|
+
const C = S(t)((V) => V === v.key), m = S(
|
|
3613
3631
|
c,
|
|
3614
3632
|
v.disabled
|
|
3615
|
-
)((V, E) => V || E), w = `${f}-tab-${v.key}`,
|
|
3633
|
+
)((V, E) => V || E), w = `${f}-tab-${v.key}`, D = `${f}-panel-${v.key}`;
|
|
3616
3634
|
return p.button(
|
|
3617
3635
|
s.type("button"),
|
|
3618
3636
|
s.class(
|
|
3619
3637
|
S(
|
|
3620
3638
|
l,
|
|
3621
3639
|
C,
|
|
3622
|
-
|
|
3640
|
+
m
|
|
3623
3641
|
)(
|
|
3624
3642
|
(V, E, T) => oa(
|
|
3625
3643
|
V ?? "md",
|
|
@@ -3637,13 +3655,13 @@ function ks(e) {
|
|
|
3637
3655
|
)((V, E) => V || E === k ? 0 : -1)
|
|
3638
3656
|
),
|
|
3639
3657
|
L.selected(C),
|
|
3640
|
-
L.controls(
|
|
3641
|
-
L.disabled(
|
|
3642
|
-
s.disabled(
|
|
3658
|
+
L.controls(D),
|
|
3659
|
+
L.disabled(m),
|
|
3660
|
+
s.disabled(m),
|
|
3643
3661
|
Qe["tab-index"](String(k)),
|
|
3644
3662
|
v.ariaLabel ? L.label(v.ariaLabel) : N(),
|
|
3645
3663
|
I.click((V) => {
|
|
3646
|
-
V.preventDefault(),
|
|
3664
|
+
V.preventDefault(), g.get(v.disabled ?? !1) || g.get(c) || (a?.(v.key), x.set(k));
|
|
3647
3665
|
}),
|
|
3648
3666
|
I.focus(() => {
|
|
3649
3667
|
x.set(k);
|
|
@@ -3655,13 +3673,13 @@ function ks(e) {
|
|
|
3655
3673
|
// Panel
|
|
3656
3674
|
re(
|
|
3657
3675
|
o ?? !0,
|
|
3658
|
-
() => Re(
|
|
3659
|
-
const k = v.$.key, C = k.map((w) => `${f}-tab-${w}`),
|
|
3676
|
+
() => Re(b, (v) => {
|
|
3677
|
+
const k = v.$.key, C = k.map((w) => `${f}-tab-${w}`), m = k.map((w) => `${f}-panel-${w}`);
|
|
3660
3678
|
return p.div(
|
|
3661
3679
|
s.class("bc-tabs__panels"),
|
|
3662
3680
|
p.div(
|
|
3663
3681
|
s.class("bc-tabs__panel"),
|
|
3664
|
-
s.id(
|
|
3682
|
+
s.id(m),
|
|
3665
3683
|
s.role("tabpanel"),
|
|
3666
3684
|
s.tabindex(0),
|
|
3667
3685
|
L.labelledby(C),
|
|
@@ -3683,22 +3701,22 @@ function Cs(e) {
|
|
|
3683
3701
|
dismissable: d = !0,
|
|
3684
3702
|
showCloseButton: f = !0,
|
|
3685
3703
|
onClose: x,
|
|
3686
|
-
overlayEffect:
|
|
3704
|
+
overlayEffect: b = "opaque",
|
|
3687
3705
|
container: h = "body",
|
|
3688
3706
|
header: v,
|
|
3689
3707
|
body: k,
|
|
3690
3708
|
footer: C
|
|
3691
3709
|
} = c;
|
|
3692
3710
|
a = t;
|
|
3693
|
-
const
|
|
3694
|
-
|
|
3695
|
-
|
|
3711
|
+
const m = Z("capturing");
|
|
3712
|
+
g.on(d, (V) => {
|
|
3713
|
+
m.set(V ? "capturing" : "non-capturing");
|
|
3696
3714
|
});
|
|
3697
3715
|
const w = S(
|
|
3698
3716
|
v != null,
|
|
3699
3717
|
f
|
|
3700
|
-
)((V, E) => V || E),
|
|
3701
|
-
const E =
|
|
3718
|
+
)((V, E) => V || E), D = ne((V) => {
|
|
3719
|
+
const E = De({
|
|
3702
3720
|
initialStatus: "closed",
|
|
3703
3721
|
element: V
|
|
3704
3722
|
});
|
|
@@ -3707,7 +3725,7 @@ function Cs(e) {
|
|
|
3707
3725
|
t();
|
|
3708
3726
|
});
|
|
3709
3727
|
}, Oe(() => E.open());
|
|
3710
|
-
const
|
|
3728
|
+
const P = pe("drawer"), M = v != null ? `${P}-header` : void 0, U = `${P}-body`;
|
|
3711
3729
|
return p.div(
|
|
3712
3730
|
s.class(
|
|
3713
3731
|
S(
|
|
@@ -3725,7 +3743,7 @@ function Cs(e) {
|
|
|
3725
3743
|
L.describedby(U),
|
|
3726
3744
|
s.tabindex(-1),
|
|
3727
3745
|
// Make drawer focusable for initial focus
|
|
3728
|
-
s.id(
|
|
3746
|
+
s.id(P),
|
|
3729
3747
|
Qe.focusTrap("true"),
|
|
3730
3748
|
// Mark as focus trap container
|
|
3731
3749
|
// Focus trap for keyboard navigation
|
|
@@ -3734,7 +3752,7 @@ function Cs(e) {
|
|
|
3734
3752
|
escapeDeactivates: !1,
|
|
3735
3753
|
// Let Overlay handle escape key
|
|
3736
3754
|
initialFocus: () => document.querySelector(
|
|
3737
|
-
`#${
|
|
3755
|
+
`#${P} [aria-label="Close drawer"]`
|
|
3738
3756
|
) || null
|
|
3739
3757
|
}),
|
|
3740
3758
|
I.mousedown((W) => W.stopPropagation()),
|
|
@@ -3773,10 +3791,10 @@ function Cs(e) {
|
|
|
3773
3791
|
);
|
|
3774
3792
|
});
|
|
3775
3793
|
n({
|
|
3776
|
-
mode:
|
|
3777
|
-
effect:
|
|
3794
|
+
mode: m,
|
|
3795
|
+
effect: b ?? "opaque",
|
|
3778
3796
|
container: h,
|
|
3779
|
-
content:
|
|
3797
|
+
content: D,
|
|
3780
3798
|
onClickOutside: () => {
|
|
3781
3799
|
x?.(), l();
|
|
3782
3800
|
},
|
|
@@ -3848,17 +3866,18 @@ function Is(e) {
|
|
|
3848
3866
|
})
|
|
3849
3867
|
);
|
|
3850
3868
|
}
|
|
3851
|
-
function ua(e, n, t, a, l) {
|
|
3852
|
-
const
|
|
3869
|
+
function ua(e, n, t, a, l, r) {
|
|
3870
|
+
const u = ge(e, "solid", "light"), c = ge(e, "solid", "dark");
|
|
3853
3871
|
return [
|
|
3854
|
-
`--ribbon-bg: ${
|
|
3855
|
-
`--ribbon-text: ${
|
|
3856
|
-
`--ribbon-bg-dark: ${
|
|
3857
|
-
`--ribbon-text-dark: ${
|
|
3872
|
+
`--ribbon-bg: ${u.backgroundColor}`,
|
|
3873
|
+
`--ribbon-text: ${u.textColor}`,
|
|
3874
|
+
`--ribbon-bg-dark: ${c.backgroundColor}`,
|
|
3875
|
+
`--ribbon-text-dark: ${c.textColor}`,
|
|
3858
3876
|
`--ribbon-inset: ${Ze(n)}`,
|
|
3859
3877
|
`--ribbon-offset: ${Ze(t)}`,
|
|
3860
3878
|
`--ribbon-width: ${Ze(a)}`,
|
|
3861
|
-
`--ribbon-angle: ${l}deg
|
|
3879
|
+
`--ribbon-angle: ${l}deg`,
|
|
3880
|
+
`--ribbon-corner: ${r}`
|
|
3862
3881
|
].join("; ");
|
|
3863
3882
|
}
|
|
3864
3883
|
function Ze(e) {
|
|
@@ -3870,17 +3889,25 @@ function $s({
|
|
|
3870
3889
|
inset: t = 0,
|
|
3871
3890
|
offset: a = 40,
|
|
3872
3891
|
width: l = 100,
|
|
3873
|
-
angle: r = 45
|
|
3874
|
-
|
|
3892
|
+
angle: r = 45,
|
|
3893
|
+
corner: u = "top-right"
|
|
3894
|
+
}, ...c) {
|
|
3875
3895
|
return p.div(
|
|
3876
3896
|
s.class("bc-ribbon"),
|
|
3877
3897
|
// Theme styles via CSS variables
|
|
3878
3898
|
s.style(
|
|
3879
|
-
S(
|
|
3899
|
+
S(
|
|
3900
|
+
e,
|
|
3901
|
+
t,
|
|
3902
|
+
a,
|
|
3903
|
+
l,
|
|
3904
|
+
r,
|
|
3905
|
+
u
|
|
3906
|
+
)(ua)
|
|
3880
3907
|
),
|
|
3881
3908
|
// Allow external classes
|
|
3882
3909
|
s.class(n),
|
|
3883
|
-
...
|
|
3910
|
+
...c
|
|
3884
3911
|
);
|
|
3885
3912
|
}
|
|
3886
3913
|
function Ts(e, n) {
|
|
@@ -3896,12 +3923,12 @@ function Ts(e, n) {
|
|
|
3896
3923
|
};
|
|
3897
3924
|
return n((x) => {
|
|
3898
3925
|
o = i;
|
|
3899
|
-
const
|
|
3926
|
+
const b = Z(
|
|
3900
3927
|
typeof t != "boolean" || t ? "capturing" : "non-capturing"
|
|
3901
3928
|
);
|
|
3902
3929
|
let h = typeof t == "boolean" ? t : !0;
|
|
3903
|
-
|
|
3904
|
-
h = k,
|
|
3930
|
+
g.on(t, (k) => {
|
|
3931
|
+
h = k, b.set(k ? "capturing" : "non-capturing");
|
|
3905
3932
|
});
|
|
3906
3933
|
const v = p.div(
|
|
3907
3934
|
s.class("bc-lightbox"),
|
|
@@ -3937,7 +3964,7 @@ function Ts(e, n) {
|
|
|
3937
3964
|
)
|
|
3938
3965
|
);
|
|
3939
3966
|
c({
|
|
3940
|
-
mode:
|
|
3967
|
+
mode: b,
|
|
3941
3968
|
effect: l ?? "opaque",
|
|
3942
3969
|
container: r,
|
|
3943
3970
|
content: v,
|
|
@@ -3981,18 +4008,18 @@ function _s(e) {
|
|
|
3981
4008
|
width: d,
|
|
3982
4009
|
height: f,
|
|
3983
4010
|
progressInterval: x = 1e3,
|
|
3984
|
-
seekTo:
|
|
4011
|
+
seekTo: b,
|
|
3985
4012
|
config: h,
|
|
3986
4013
|
onReady: v,
|
|
3987
4014
|
onStart: k,
|
|
3988
4015
|
onPlay: C,
|
|
3989
|
-
onPause:
|
|
4016
|
+
onPause: m,
|
|
3990
4017
|
onBuffer: w,
|
|
3991
|
-
onBufferEnd:
|
|
4018
|
+
onBufferEnd: D,
|
|
3992
4019
|
onEnded: V,
|
|
3993
4020
|
onError: E,
|
|
3994
4021
|
onDuration: T,
|
|
3995
|
-
onSeek:
|
|
4022
|
+
onSeek: P,
|
|
3996
4023
|
onProgress: M,
|
|
3997
4024
|
onPlaybackRateChange: U,
|
|
3998
4025
|
onPlaybackQualityChange: W
|
|
@@ -4019,14 +4046,14 @@ function _s(e) {
|
|
|
4019
4046
|
}
|
|
4020
4047
|
const ue = [];
|
|
4021
4048
|
ue.push(
|
|
4022
|
-
|
|
4049
|
+
g.on(n, ($) => {
|
|
4023
4050
|
typeof $ == "string" && $.length > 0 && ca($) ? K.value = "youtube" : (K.value = "file", F && Ae());
|
|
4024
4051
|
})
|
|
4025
4052
|
);
|
|
4026
4053
|
async function Ae() {
|
|
4027
4054
|
const $ = F;
|
|
4028
4055
|
if (!$) return;
|
|
4029
|
-
const A =
|
|
4056
|
+
const A = g.get(n);
|
|
4030
4057
|
if (typeof A != "string" || A.length === 0) return;
|
|
4031
4058
|
Ue();
|
|
4032
4059
|
const O = h?.file?.forceHLS ?? !1;
|
|
@@ -4086,7 +4113,7 @@ function _s(e) {
|
|
|
4086
4113
|
}
|
|
4087
4114
|
function Me() {
|
|
4088
4115
|
he?.();
|
|
4089
|
-
const $ =
|
|
4116
|
+
const $ = g.get(x) ?? 1e3;
|
|
4090
4117
|
he = pt(() => {
|
|
4091
4118
|
const A = F;
|
|
4092
4119
|
if (!A) return;
|
|
@@ -4107,13 +4134,13 @@ function _s(e) {
|
|
|
4107
4134
|
ne(($) => {
|
|
4108
4135
|
F = $, v?.();
|
|
4109
4136
|
try {
|
|
4110
|
-
F.playbackRate =
|
|
4137
|
+
F.playbackRate = g.get(c) ?? 1;
|
|
4111
4138
|
} catch {
|
|
4112
4139
|
}
|
|
4113
|
-
F.muted = !!(
|
|
4140
|
+
F.muted = !!(g.get(u) ?? !1), F.loop = !!(g.get(a) ?? !1), F.controls = !!(g.get(l) ?? !1), F.playsInline != null && (!!(g.get(o) ?? !0) ? F.setAttribute("playsinline", "") : F.removeAttribute("playsinline")), g.get(t) && (F.play?.().catch(() => {
|
|
4114
4141
|
}), k?.());
|
|
4115
4142
|
try {
|
|
4116
|
-
const A = !!(
|
|
4143
|
+
const A = !!(g.get(i) ?? !1), O = document, Y = F;
|
|
4117
4144
|
A ? typeof Y.requestPictureInPicture == "function" && O.pictureInPictureElement !== F && Y.requestPictureInPicture().catch(() => {
|
|
4118
4145
|
}) : O.pictureInPictureElement === F && typeof O.exitPictureInPicture == "function" && O.exitPictureInPicture().catch(() => {
|
|
4119
4146
|
});
|
|
@@ -4123,17 +4150,17 @@ function _s(e) {
|
|
|
4123
4150
|
}),
|
|
4124
4151
|
// size
|
|
4125
4152
|
y.width(
|
|
4126
|
-
|
|
4153
|
+
g.map(d, ve)
|
|
4127
4154
|
),
|
|
4128
4155
|
y.height(
|
|
4129
|
-
|
|
4156
|
+
g.map(f, ve)
|
|
4130
4157
|
),
|
|
4131
4158
|
// Events
|
|
4132
4159
|
I.play(() => C?.()),
|
|
4133
4160
|
I.playing(() => {
|
|
4134
|
-
k?.(),
|
|
4161
|
+
k?.(), D?.();
|
|
4135
4162
|
}),
|
|
4136
|
-
I.pause(() =>
|
|
4163
|
+
I.pause(() => m?.()),
|
|
4137
4164
|
I.waiting(() => w?.()),
|
|
4138
4165
|
I.canplay(() => {
|
|
4139
4166
|
const $ = F?.duration;
|
|
@@ -4146,7 +4173,7 @@ function _s(e) {
|
|
|
4146
4173
|
);
|
|
4147
4174
|
let ye = null, H = null, xe = null;
|
|
4148
4175
|
function we() {
|
|
4149
|
-
const $ =
|
|
4176
|
+
const $ = g.get(n);
|
|
4150
4177
|
!ye || typeof $ != "string" || da().then((A) => {
|
|
4151
4178
|
const O = Qt($);
|
|
4152
4179
|
if (O) {
|
|
@@ -4159,15 +4186,15 @@ function _s(e) {
|
|
|
4159
4186
|
playerVars: pa(e),
|
|
4160
4187
|
events: {
|
|
4161
4188
|
onReady: () => {
|
|
4162
|
-
v?.(), _(),
|
|
4189
|
+
v?.(), _(), g.get(t) && k?.(), je();
|
|
4163
4190
|
},
|
|
4164
4191
|
onStateChange: (Y) => {
|
|
4165
4192
|
switch (Y.data) {
|
|
4166
4193
|
case A.PlayerState.PLAYING:
|
|
4167
|
-
C?.(),
|
|
4194
|
+
C?.(), D?.();
|
|
4168
4195
|
break;
|
|
4169
4196
|
case A.PlayerState.PAUSED:
|
|
4170
|
-
|
|
4197
|
+
m?.();
|
|
4171
4198
|
break;
|
|
4172
4199
|
case A.PlayerState.BUFFERING:
|
|
4173
4200
|
w?.();
|
|
@@ -4187,7 +4214,7 @@ function _s(e) {
|
|
|
4187
4214
|
}
|
|
4188
4215
|
function je() {
|
|
4189
4216
|
xe?.();
|
|
4190
|
-
const $ =
|
|
4217
|
+
const $ = g.get(x) ?? 1e3;
|
|
4191
4218
|
xe = pt(() => {
|
|
4192
4219
|
if (!H) return;
|
|
4193
4220
|
const A = H.getDuration?.() ?? 0, O = H.getCurrentTime?.() ?? 0, Y = H.getVideoLoadedFraction?.() ?? 0;
|
|
@@ -4202,24 +4229,24 @@ function _s(e) {
|
|
|
4202
4229
|
function _() {
|
|
4203
4230
|
if (!H) return;
|
|
4204
4231
|
try {
|
|
4205
|
-
const O =
|
|
4232
|
+
const O = g.get(c) ?? 1;
|
|
4206
4233
|
H.setPlaybackRate?.(O);
|
|
4207
4234
|
} catch {
|
|
4208
4235
|
}
|
|
4209
4236
|
try {
|
|
4210
4237
|
const O = Math.round(
|
|
4211
|
-
Math.min(Math.max(
|
|
4238
|
+
Math.min(Math.max(g.get(r) ?? 1, 0), 1) * 100
|
|
4212
4239
|
);
|
|
4213
4240
|
H.setVolume?.(O);
|
|
4214
4241
|
} catch {
|
|
4215
4242
|
}
|
|
4216
4243
|
try {
|
|
4217
|
-
|
|
4244
|
+
g.get(u) ?? !1 ? H.mute?.() : H.unMute?.();
|
|
4218
4245
|
} catch {
|
|
4219
4246
|
}
|
|
4220
|
-
|
|
4221
|
-
const A =
|
|
4222
|
-
typeof A == "number" && Number.isFinite(A) && (H.seekTo?.(A, !0),
|
|
4247
|
+
g.get(t) ?? !1 ? H.playVideo?.() : H.pauseVideo?.();
|
|
4248
|
+
const A = g.get(b);
|
|
4249
|
+
typeof A == "number" && Number.isFinite(A) && (H.seekTo?.(A, !0), P?.(A));
|
|
4223
4250
|
}
|
|
4224
4251
|
const B = p.div(
|
|
4225
4252
|
ne(($) => {
|
|
@@ -4227,43 +4254,43 @@ function _s(e) {
|
|
|
4227
4254
|
})
|
|
4228
4255
|
);
|
|
4229
4256
|
return ue.push(
|
|
4230
|
-
|
|
4257
|
+
g.on(n, () => {
|
|
4231
4258
|
K.value === "youtube" && we();
|
|
4232
4259
|
})
|
|
4233
4260
|
), ue.push(
|
|
4234
|
-
|
|
4235
|
-
K.value === "file" && F ?
|
|
4236
|
-
}) : F.pause?.() : K.value === "youtube" && H && (
|
|
4261
|
+
g.on(t, () => {
|
|
4262
|
+
K.value === "file" && F ? g.get(t) ? F.play?.().catch(() => {
|
|
4263
|
+
}) : F.pause?.() : K.value === "youtube" && H && (g.get(t) ? H.playVideo?.() : H.pauseVideo?.());
|
|
4237
4264
|
})
|
|
4238
4265
|
), ue.push(
|
|
4239
|
-
|
|
4266
|
+
g.on(r, () => {
|
|
4240
4267
|
if (K.value === "file" && F)
|
|
4241
|
-
F.volume = Math.min(Math.max(
|
|
4268
|
+
F.volume = Math.min(Math.max(g.get(r) ?? 1, 0), 1);
|
|
4242
4269
|
else if (K.value === "youtube" && H) {
|
|
4243
4270
|
const $ = Math.round(
|
|
4244
|
-
Math.min(Math.max(
|
|
4271
|
+
Math.min(Math.max(g.get(r) ?? 1, 0), 1) * 100
|
|
4245
4272
|
);
|
|
4246
4273
|
H.setVolume?.($);
|
|
4247
4274
|
}
|
|
4248
4275
|
})
|
|
4249
4276
|
), ue.push(
|
|
4250
|
-
|
|
4251
|
-
K.value === "file" && F ? F.muted = !!
|
|
4277
|
+
g.on(u, () => {
|
|
4278
|
+
K.value === "file" && F ? F.muted = !!g.get(u) : K.value === "youtube" && H && (g.get(u) ? H.mute?.() : H.unMute?.());
|
|
4252
4279
|
})
|
|
4253
4280
|
), ue.push(
|
|
4254
|
-
|
|
4281
|
+
g.on(c, () => {
|
|
4255
4282
|
if (K.value === "file" && F)
|
|
4256
4283
|
try {
|
|
4257
|
-
F.playbackRate =
|
|
4284
|
+
F.playbackRate = g.get(c) ?? 1;
|
|
4258
4285
|
} catch {
|
|
4259
4286
|
}
|
|
4260
|
-
else K.value === "youtube" && H && H.setPlaybackRate?.(
|
|
4287
|
+
else K.value === "youtube" && H && H.setPlaybackRate?.(g.get(c) ?? 1);
|
|
4261
4288
|
})
|
|
4262
4289
|
), ue.push(
|
|
4263
|
-
|
|
4290
|
+
g.on(i, async () => {
|
|
4264
4291
|
if (!(K.value !== "file" || !F))
|
|
4265
4292
|
try {
|
|
4266
|
-
const $ = !!(
|
|
4293
|
+
const $ = !!(g.get(i) ?? !1), A = document, O = F;
|
|
4267
4294
|
$ ? typeof O.requestPictureInPicture == "function" && A.pictureInPictureElement !== F && await O.requestPictureInPicture()?.catch(() => {
|
|
4268
4295
|
}) : A.pictureInPictureElement === F && typeof A.exitPictureInPicture == "function" && await A.exitPictureInPicture()?.catch(() => {
|
|
4269
4296
|
});
|
|
@@ -4271,27 +4298,27 @@ function _s(e) {
|
|
|
4271
4298
|
}
|
|
4272
4299
|
})
|
|
4273
4300
|
), ue.push(
|
|
4274
|
-
|
|
4275
|
-
const $ =
|
|
4301
|
+
g.on(b ?? null, () => {
|
|
4302
|
+
const $ = g.get(b);
|
|
4276
4303
|
if ($ != null)
|
|
4277
4304
|
if (K.value === "file" && F)
|
|
4278
4305
|
try {
|
|
4279
|
-
F.currentTime = $,
|
|
4306
|
+
F.currentTime = $, P?.($);
|
|
4280
4307
|
} catch {
|
|
4281
4308
|
}
|
|
4282
|
-
else K.value === "youtube" && H && (H.seekTo?.($, !0),
|
|
4309
|
+
else K.value === "youtube" && H && (H.seekTo?.($, !0), P?.($));
|
|
4283
4310
|
})
|
|
4284
4311
|
), p.div(
|
|
4285
4312
|
X(...ue),
|
|
4286
4313
|
s.class("bc-base-video"),
|
|
4287
4314
|
y.width(
|
|
4288
|
-
|
|
4315
|
+
g.map(d, ve)
|
|
4289
4316
|
),
|
|
4290
4317
|
y.height(
|
|
4291
|
-
|
|
4318
|
+
g.map(f, ve)
|
|
4292
4319
|
),
|
|
4293
4320
|
re(
|
|
4294
|
-
|
|
4321
|
+
g.map(K, ($) => $ === "youtube"),
|
|
4295
4322
|
() => B,
|
|
4296
4323
|
() => Te
|
|
4297
4324
|
)
|
|
@@ -4307,17 +4334,17 @@ function Qt(e) {
|
|
|
4307
4334
|
}
|
|
4308
4335
|
function pa(e) {
|
|
4309
4336
|
const n = {
|
|
4310
|
-
autoplay:
|
|
4311
|
-
controls:
|
|
4337
|
+
autoplay: g.get(e.playing) ?? !1 ? 1 : 0,
|
|
4338
|
+
controls: g.get(e.controls) ?? !1 ? 1 : 0,
|
|
4312
4339
|
rel: 0,
|
|
4313
|
-
playsinline:
|
|
4340
|
+
playsinline: g.get(e.playsinline) ?? !0 ? 1 : 0,
|
|
4314
4341
|
modestbranding: 1
|
|
4315
|
-
}, t =
|
|
4342
|
+
}, t = g.get(e.loop) ?? !1, a = g.get(e.url), l = typeof a == "string" ? Qt(a) : null;
|
|
4316
4343
|
return t && l && (n.loop = 1, n.playlist = l), n;
|
|
4317
4344
|
}
|
|
4318
4345
|
export {
|
|
4319
4346
|
Ke as AnimatedToggleClass,
|
|
4320
|
-
|
|
4347
|
+
Pa as AppShell,
|
|
4321
4348
|
Cn as AppearanceSelector,
|
|
4322
4349
|
xr as ArrayController,
|
|
4323
4350
|
qr as Base64Input,
|
|
@@ -4339,7 +4366,7 @@ export {
|
|
|
4339
4366
|
ys as ButtonLink,
|
|
4340
4367
|
Qr as Card,
|
|
4341
4368
|
Va as Center,
|
|
4342
|
-
|
|
4369
|
+
Da as CenterH,
|
|
4343
4370
|
Sr as CheckboxInput,
|
|
4344
4371
|
Zt as Chips,
|
|
4345
4372
|
et as CloseButton,
|
|
@@ -4400,7 +4427,7 @@ export {
|
|
|
4400
4427
|
no as NativeSelectControl,
|
|
4401
4428
|
vs as NavigationLink,
|
|
4402
4429
|
Aa as NineSliceScrollView,
|
|
4403
|
-
|
|
4430
|
+
Pr as Notice,
|
|
4404
4431
|
qa as NullableBigintInput,
|
|
4405
4432
|
ao as NullableDateInput,
|
|
4406
4433
|
so as NullableDateTimeInput,
|
|
@@ -4423,7 +4450,7 @@ export {
|
|
|
4423
4450
|
mo as NullableUrlInput,
|
|
4424
4451
|
ss as NullableZonedDateTimeInput,
|
|
4425
4452
|
go as NumberInput,
|
|
4426
|
-
|
|
4453
|
+
Dr as ObjectController,
|
|
4427
4454
|
No as ObjectValidator,
|
|
4428
4455
|
me as Option,
|
|
4429
4456
|
Bt as Overlay,
|
|
@@ -4473,7 +4500,7 @@ export {
|
|
|
4473
4500
|
ko as UnstyledDropZone,
|
|
4474
4501
|
Co as UrlInput,
|
|
4475
4502
|
Vs as Use,
|
|
4476
|
-
|
|
4503
|
+
Dn as WithBeatUIBreakpoint,
|
|
4477
4504
|
_a as WithBeatUIElementBreakpoint,
|
|
4478
4505
|
Et as WithBreakpoint,
|
|
4479
4506
|
le as WithTemporal,
|
|
@@ -4549,8 +4576,8 @@ export {
|
|
|
4549
4576
|
$l as getFontFamilyVarName,
|
|
4550
4577
|
Tl as getFontSizeVar,
|
|
4551
4578
|
_l as getFontSizeVarName,
|
|
4552
|
-
|
|
4553
|
-
|
|
4579
|
+
Pl as getFontWeightVar,
|
|
4580
|
+
Dl as getFontWeightVarName,
|
|
4554
4581
|
Rs as getIconLocally,
|
|
4555
4582
|
Vl as getLetterSpacingVar,
|
|
4556
4583
|
Al as getLetterSpacingVarName,
|
|
@@ -4597,8 +4624,8 @@ export {
|
|
|
4597
4624
|
Ws as makeI18nProvider,
|
|
4598
4625
|
Or as makeMapValidation,
|
|
4599
4626
|
Ys as makeMessages,
|
|
4600
|
-
|
|
4601
|
-
|
|
4627
|
+
Pt as makeOnBlurHandler,
|
|
4628
|
+
Dt as makeOnChangeHandler,
|
|
4602
4629
|
rr as motionDurations,
|
|
4603
4630
|
or as motionEasings,
|
|
4604
4631
|
si as normalizeColorName,
|
|
@@ -4629,10 +4656,10 @@ export {
|
|
|
4629
4656
|
ii as textColors,
|
|
4630
4657
|
hr as textShadows,
|
|
4631
4658
|
ui as themeColorNames,
|
|
4632
|
-
|
|
4633
|
-
|
|
4659
|
+
Po as transformEmptyStringToUndefined,
|
|
4660
|
+
Do as transformNullToUndefined,
|
|
4634
4661
|
Vo as transformUndefinedToNull,
|
|
4635
|
-
|
|
4662
|
+
De as useAnimatedElementToggle,
|
|
4636
4663
|
Uo as useAnimatedToggle,
|
|
4637
4664
|
jr as useController,
|
|
4638
4665
|
jo as useFocusTrap,
|