@memobit/libs 1.0.54 → 1.0.56
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/index.css +1 -1
- package/dist/index.esm.js +647 -639
- package/dist/version.json +4 -4
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -10128,24 +10128,32 @@ var J = ({ title: t, position: r = "top", delay: c = 200, children: a, disabled:
|
|
|
10128
10128
|
left: 0
|
|
10129
10129
|
}), v = X(null), g = X(null), u = X(null), w = X(null), f = X(!1), y = m !== void 0, b = y ? 150 : 0, C = () => {
|
|
10130
10130
|
if (!u.current || !w.current) return;
|
|
10131
|
-
const V = u.current.firstElementChild
|
|
10131
|
+
const V = u.current.firstElementChild?.getBoundingClientRect();
|
|
10132
|
+
let x = V && V.width > 0 ? V : u.current.getBoundingClientRect();
|
|
10133
|
+
if (x.width === 0 && x.height === 0) {
|
|
10134
|
+
const t1 = document.createRange();
|
|
10135
|
+
t1.selectNodeContents(u.current);
|
|
10136
|
+
const S = t1.getBoundingClientRect();
|
|
10137
|
+
(S.width > 0 || S.height > 0) && (x = S);
|
|
10138
|
+
}
|
|
10139
|
+
const L = w.current.getBoundingClientRect(), H = 8;
|
|
10132
10140
|
let A = 0, $ = 0;
|
|
10133
10141
|
switch (r) {
|
|
10134
10142
|
case "top":
|
|
10135
|
-
A =
|
|
10143
|
+
A = x.top - L.height - H, $ = x.left + x.width / 2 - L.width / 2;
|
|
10136
10144
|
break;
|
|
10137
10145
|
case "bottom":
|
|
10138
|
-
A =
|
|
10146
|
+
A = x.bottom + H, $ = x.left + x.width / 2 - L.width / 2;
|
|
10139
10147
|
break;
|
|
10140
10148
|
case "left":
|
|
10141
|
-
A =
|
|
10149
|
+
A = x.top + x.height / 2 - L.height / 2, $ = x.left - L.width - H;
|
|
10142
10150
|
break;
|
|
10143
10151
|
case "right":
|
|
10144
|
-
A =
|
|
10152
|
+
A = x.top + x.height / 2 - L.height / 2, $ = x.right + H;
|
|
10145
10153
|
break;
|
|
10146
10154
|
}
|
|
10147
10155
|
const F = 8;
|
|
10148
|
-
$ < F && ($ = F), $ +
|
|
10156
|
+
$ < F && ($ = F), $ + L.width > window.innerWidth - F && ($ = window.innerWidth - L.width - F), A < F && (A = F), A + L.height > window.innerHeight - F && (A = window.innerHeight - L.height - F), p({
|
|
10149
10157
|
top: A,
|
|
10150
10158
|
left: $
|
|
10151
10159
|
});
|
|
@@ -10153,17 +10161,17 @@ var J = ({ title: t, position: r = "top", delay: c = 200, children: a, disabled:
|
|
|
10153
10161
|
s || f.current || (g.current && (clearTimeout(g.current), g.current = null), v.current = setTimeout(() => {
|
|
10154
10162
|
i(!0);
|
|
10155
10163
|
}, c));
|
|
10156
|
-
},
|
|
10164
|
+
}, k = () => {
|
|
10157
10165
|
f.current || (v.current && clearTimeout(v.current), b > 0 ? g.current = setTimeout(() => i(!1), b) : i(!1));
|
|
10158
|
-
},
|
|
10159
|
-
V.pointerType !== "touch" && V.pointerType !== "pen" || s || (f.current = !0, v.current && (clearTimeout(v.current), v.current = null), V.stopPropagation(), i((
|
|
10166
|
+
}, R = (V) => {
|
|
10167
|
+
V.pointerType !== "touch" && V.pointerType !== "pen" || s || (f.current = !0, v.current && (clearTimeout(v.current), v.current = null), V.stopPropagation(), i((x) => !x));
|
|
10160
10168
|
};
|
|
10161
10169
|
Y(() => (n && (C(), window.addEventListener("scroll", C, !0), window.addEventListener("resize", C)), () => {
|
|
10162
10170
|
window.removeEventListener("scroll", C, !0), window.removeEventListener("resize", C);
|
|
10163
10171
|
}), [n]), Y(() => {
|
|
10164
10172
|
if (!n) return;
|
|
10165
|
-
const V = (
|
|
10166
|
-
u.current?.contains(
|
|
10173
|
+
const V = (x) => {
|
|
10174
|
+
u.current?.contains(x.target) || w.current?.contains(x.target) || i(!1);
|
|
10167
10175
|
};
|
|
10168
10176
|
return document.addEventListener("pointerdown", V), () => {
|
|
10169
10177
|
document.removeEventListener("pointerdown", V), f.current = !1;
|
|
@@ -10180,10 +10188,10 @@ var J = ({ title: t, position: r = "top", delay: c = 200, children: a, disabled:
|
|
|
10180
10188
|
ref: u,
|
|
10181
10189
|
className: "tooltip-trigger",
|
|
10182
10190
|
onMouseEnter: _,
|
|
10183
|
-
onMouseLeave:
|
|
10191
|
+
onMouseLeave: k,
|
|
10184
10192
|
onFocus: _,
|
|
10185
|
-
onBlur:
|
|
10186
|
-
onPointerDown:
|
|
10193
|
+
onBlur: k,
|
|
10194
|
+
onPointerDown: R,
|
|
10187
10195
|
children: a
|
|
10188
10196
|
}), n && t && K1(/* @__PURE__ */ l("div", {
|
|
10189
10197
|
ref: w,
|
|
@@ -10306,7 +10314,7 @@ var J = ({ title: t, position: r = "top", delay: c = 200, children: a, disabled:
|
|
|
10306
10314
|
};
|
|
10307
10315
|
}, [o]), _ = (B) => {
|
|
10308
10316
|
h === void 0 && u(B), p?.(B);
|
|
10309
|
-
},
|
|
10317
|
+
}, k = () => {
|
|
10310
10318
|
if (i) {
|
|
10311
10319
|
if (y === "hours") {
|
|
10312
10320
|
_("minutes");
|
|
@@ -10314,35 +10322,35 @@ var J = ({ title: t, position: r = "top", delay: c = 200, children: a, disabled:
|
|
|
10314
10322
|
}
|
|
10315
10323
|
y === "minutes" && a && _("seconds");
|
|
10316
10324
|
}
|
|
10317
|
-
},
|
|
10325
|
+
}, R = o1(() => {
|
|
10318
10326
|
if (y === "hours") {
|
|
10319
10327
|
if (c === "12h") return Array.from({ length: 12 }, (K, e1) => {
|
|
10320
|
-
const
|
|
10328
|
+
const c1 = e1 + 1;
|
|
10321
10329
|
return {
|
|
10322
|
-
degrees:
|
|
10330
|
+
degrees: c1 * 30,
|
|
10323
10331
|
inner: !1,
|
|
10324
|
-
label: `${
|
|
10325
|
-
selected: (t.hours % 12 || 12) ===
|
|
10326
|
-
value:
|
|
10332
|
+
label: `${c1}`,
|
|
10333
|
+
selected: (t.hours % 12 || 12) === c1,
|
|
10334
|
+
value: c1
|
|
10327
10335
|
};
|
|
10328
10336
|
});
|
|
10329
10337
|
const U = Array.from({ length: 12 }, (K, e1) => {
|
|
10330
|
-
const
|
|
10338
|
+
const c1 = e1 + 1;
|
|
10331
10339
|
return {
|
|
10332
|
-
degrees:
|
|
10340
|
+
degrees: c1 * 30,
|
|
10333
10341
|
inner: !1,
|
|
10334
|
-
label: `${
|
|
10335
|
-
selected: t.hours ===
|
|
10336
|
-
value:
|
|
10342
|
+
label: `${c1}`,
|
|
10343
|
+
selected: t.hours === c1,
|
|
10344
|
+
value: c1
|
|
10337
10345
|
};
|
|
10338
10346
|
}), O = Array.from({ length: 12 }, (K, e1) => {
|
|
10339
|
-
const
|
|
10347
|
+
const c1 = e1 === 0 ? 0 : e1 + 12;
|
|
10340
10348
|
return {
|
|
10341
10349
|
degrees: e1 * 30,
|
|
10342
10350
|
inner: !0,
|
|
10343
|
-
label: M0(
|
|
10344
|
-
selected: t.hours ===
|
|
10345
|
-
value:
|
|
10351
|
+
label: M0(c1),
|
|
10352
|
+
selected: t.hours === c1,
|
|
10353
|
+
value: c1
|
|
10346
10354
|
};
|
|
10347
10355
|
});
|
|
10348
10356
|
return [...U, ...O];
|
|
@@ -10381,8 +10389,8 @@ var J = ({ title: t, position: r = "top", delay: c = 200, children: a, disabled:
|
|
|
10381
10389
|
]), M = B0(C.center, z.radius, z.degrees), V = (B, U) => {
|
|
10382
10390
|
const O = w.current?.getBoundingClientRect();
|
|
10383
10391
|
if (!O || O.width === 0) return;
|
|
10384
|
-
const K = o / O.width, e1 = (B - O.left) * K - C.center,
|
|
10385
|
-
let u1 = Math.atan2(e1, -
|
|
10392
|
+
const K = o / O.width, e1 = (B - O.left) * K - C.center, c1 = (U - O.top) * K - C.center, q = Math.sqrt(e1 * e1 + c1 * c1);
|
|
10393
|
+
let u1 = Math.atan2(e1, -c1) * 180 / Math.PI;
|
|
10386
10394
|
if (u1 < 0 && (u1 += 360), y === "hours") {
|
|
10387
10395
|
const f1 = Math.round(u1 / 30) % 12;
|
|
10388
10396
|
if (c === "12h") {
|
|
@@ -10406,15 +10414,15 @@ var J = ({ title: t, position: r = "top", delay: c = 200, children: a, disabled:
|
|
|
10406
10414
|
...t,
|
|
10407
10415
|
seconds: b1
|
|
10408
10416
|
};
|
|
10409
|
-
},
|
|
10417
|
+
}, x = (B) => {
|
|
10410
10418
|
const U = V(B.clientX, B.clientY);
|
|
10411
10419
|
U && r(U);
|
|
10412
|
-
},
|
|
10413
|
-
m || (f.current = !0, B.currentTarget.setPointerCapture(B.pointerId),
|
|
10420
|
+
}, L = (B) => {
|
|
10421
|
+
m || (f.current = !0, B.currentTarget.setPointerCapture(B.pointerId), x(B));
|
|
10414
10422
|
}, H = (B) => {
|
|
10415
|
-
m || !f.current ||
|
|
10423
|
+
m || !f.current || x(B);
|
|
10416
10424
|
}, A = (B) => {
|
|
10417
|
-
m || !f.current || (f.current = !1, B.currentTarget.releasePointerCapture(B.pointerId),
|
|
10425
|
+
m || !f.current || (f.current = !1, B.currentTarget.releasePointerCapture(B.pointerId), x(B), k());
|
|
10418
10426
|
}, $ = (B) => {
|
|
10419
10427
|
if (y === "hours") {
|
|
10420
10428
|
if (c === "12h") {
|
|
@@ -10452,14 +10460,14 @@ var J = ({ title: t, position: r = "top", delay: c = 200, children: a, disabled:
|
|
|
10452
10460
|
B.preventDefault(), $(-1);
|
|
10453
10461
|
return;
|
|
10454
10462
|
}
|
|
10455
|
-
(B.key === "Enter" || B.key === " ") && (B.preventDefault(),
|
|
10463
|
+
(B.key === "Enter" || B.key === " ") && (B.preventDefault(), k());
|
|
10456
10464
|
}
|
|
10457
|
-
},
|
|
10465
|
+
}, t1 = (B) => {
|
|
10458
10466
|
m || B === b || r({
|
|
10459
10467
|
...t,
|
|
10460
10468
|
hours: B ? t.hours % 12 + 12 : t.hours % 12
|
|
10461
10469
|
});
|
|
10462
|
-
},
|
|
10470
|
+
}, S = (B) => `analog-clock__segment${y === B ? " analog-clock__segment--active" : ""}`, D = c === "12h" ? t.hours % 12 || 12 : t.hours;
|
|
10463
10471
|
return /* @__PURE__ */ l("div", {
|
|
10464
10472
|
className: `analog-clock${m ? " analog-clock--disabled" : ""} ${v}`.trim(),
|
|
10465
10473
|
children: [n && /* @__PURE__ */ l("div", {
|
|
@@ -10469,7 +10477,7 @@ var J = ({ title: t, position: r = "top", delay: c = 200, children: a, disabled:
|
|
|
10469
10477
|
children: [
|
|
10470
10478
|
/* @__PURE__ */ e("button", {
|
|
10471
10479
|
type: "button",
|
|
10472
|
-
className:
|
|
10480
|
+
className: S("hours"),
|
|
10473
10481
|
disabled: m,
|
|
10474
10482
|
onClick: () => _("hours"),
|
|
10475
10483
|
children: M0(D)
|
|
@@ -10480,7 +10488,7 @@ var J = ({ title: t, position: r = "top", delay: c = 200, children: a, disabled:
|
|
|
10480
10488
|
}),
|
|
10481
10489
|
/* @__PURE__ */ e("button", {
|
|
10482
10490
|
type: "button",
|
|
10483
|
-
className:
|
|
10491
|
+
className: S("minutes"),
|
|
10484
10492
|
disabled: m,
|
|
10485
10493
|
onClick: () => _("minutes"),
|
|
10486
10494
|
children: M0(t.minutes)
|
|
@@ -10490,7 +10498,7 @@ var J = ({ title: t, position: r = "top", delay: c = 200, children: a, disabled:
|
|
|
10490
10498
|
children: ":"
|
|
10491
10499
|
}), /* @__PURE__ */ e("button", {
|
|
10492
10500
|
type: "button",
|
|
10493
|
-
className:
|
|
10501
|
+
className: S("seconds"),
|
|
10494
10502
|
disabled: m,
|
|
10495
10503
|
onClick: () => _("seconds"),
|
|
10496
10504
|
children: M0(t.seconds)
|
|
@@ -10502,13 +10510,13 @@ var J = ({ title: t, position: r = "top", delay: c = 200, children: a, disabled:
|
|
|
10502
10510
|
type: "button",
|
|
10503
10511
|
className: `analog-clock__period-button${b ? "" : " analog-clock__period-button--active"}`,
|
|
10504
10512
|
disabled: m,
|
|
10505
|
-
onClick: () =>
|
|
10513
|
+
onClick: () => t1(!1),
|
|
10506
10514
|
children: "AM"
|
|
10507
10515
|
}), /* @__PURE__ */ e("button", {
|
|
10508
10516
|
type: "button",
|
|
10509
10517
|
className: `analog-clock__period-button${b ? " analog-clock__period-button--active" : ""}`,
|
|
10510
10518
|
disabled: m,
|
|
10511
|
-
onClick: () =>
|
|
10519
|
+
onClick: () => t1(!0),
|
|
10512
10520
|
children: "PM"
|
|
10513
10521
|
})]
|
|
10514
10522
|
})]
|
|
@@ -10519,7 +10527,7 @@ var J = ({ title: t, position: r = "top", delay: c = 200, children: a, disabled:
|
|
|
10519
10527
|
height: o,
|
|
10520
10528
|
viewBox: `0 0 ${o} ${o}`,
|
|
10521
10529
|
tabIndex: m ? -1 : 0,
|
|
10522
|
-
onPointerDown:
|
|
10530
|
+
onPointerDown: L,
|
|
10523
10531
|
onPointerMove: H,
|
|
10524
10532
|
onPointerUp: A,
|
|
10525
10533
|
onKeyDown: F,
|
|
@@ -10559,7 +10567,7 @@ var J = ({ title: t, position: r = "top", delay: c = 200, children: a, disabled:
|
|
|
10559
10567
|
cy: C.center,
|
|
10560
10568
|
r: o * 0.017
|
|
10561
10569
|
}),
|
|
10562
|
-
|
|
10570
|
+
R.map((B) => {
|
|
10563
10571
|
const U = B0(C.center, B.inner ? C.innerRadius : C.outerRadius, B.degrees);
|
|
10564
10572
|
return /* @__PURE__ */ e("text", {
|
|
10565
10573
|
className: `analog-clock__number${B.inner ? " analog-clock__number--inner" : ""}${B.selected ? " analog-clock__number--selected" : ""}`,
|
|
@@ -11252,7 +11260,7 @@ var tn = ({ name: t, size: r = "medium", shape: c = "rounded", className: a = ""
|
|
|
11252
11260
|
}), [y, b] = N("days"), [C, _] = N(() => {
|
|
11253
11261
|
const E = (h ?? w).getFullYear();
|
|
11254
11262
|
return Math.floor(E / Y1) * Y1;
|
|
11255
|
-
}), [
|
|
11263
|
+
}), [k, R] = N(null), z = h ?? w, M = g ?? k, V = o1(() => e3(z.getFullYear(), z.getMonth(), o), [z, o]), x = o === 1 ? Jr : Qr, L = (E) => a && O0(E, a) || s && Kr(E, s) ? !0 : d ? typeof d == "function" ? d(E) : d.some((j) => W1(j, E)) : !1, H = (E) => {
|
|
11256
11264
|
if (!t) return !1;
|
|
11257
11265
|
if (c === "single" && t instanceof Date) return W1(E, t);
|
|
11258
11266
|
if (c === "range") {
|
|
@@ -11266,16 +11274,16 @@ var tn = ({ name: t, size: r = "medium", shape: c = "rounded", className: a = ""
|
|
|
11266
11274
|
return p1 > j.getTime() && p1 < s1.getTime();
|
|
11267
11275
|
}
|
|
11268
11276
|
return !1;
|
|
11269
|
-
}, $ = (E) => c === "range" && M ? E.getTime() > M.getTime() : !1, F = (E) => E.getMonth() === z.getMonth(),
|
|
11270
|
-
if (!
|
|
11277
|
+
}, $ = (E) => c === "range" && M ? E.getTime() > M.getTime() : !1, F = (E) => E.getMonth() === z.getMonth(), t1 = (E) => {
|
|
11278
|
+
if (!L(E)) {
|
|
11271
11279
|
if (c === "single") r?.(E);
|
|
11272
|
-
else if (c === "range") if (!M) u ? u(E) : (
|
|
11280
|
+
else if (c === "range") if (!M) u ? u(E) : (R(E), r?.(void 0));
|
|
11273
11281
|
else {
|
|
11274
11282
|
const j = O0(E, M) ? E : M, s1 = O0(E, M) ? M : E;
|
|
11275
11283
|
r?.({
|
|
11276
11284
|
start: j,
|
|
11277
11285
|
end: s1
|
|
11278
|
-
}), u ? u(null) :
|
|
11286
|
+
}), u ? u(null) : R(null);
|
|
11279
11287
|
}
|
|
11280
11288
|
else if (c === "multiple") {
|
|
11281
11289
|
const j = Array.isArray(t) ? t : [], s1 = j.findIndex((p1) => W1(p1, E));
|
|
@@ -11285,7 +11293,7 @@ var tn = ({ name: t, size: r = "medium", shape: c = "rounded", className: a = ""
|
|
|
11285
11293
|
} else r?.([...j, E]);
|
|
11286
11294
|
}
|
|
11287
11295
|
}
|
|
11288
|
-
},
|
|
11296
|
+
}, S = () => {
|
|
11289
11297
|
const E = g0(z, -1);
|
|
11290
11298
|
p ? p(E) : f(E);
|
|
11291
11299
|
}, D = () => {
|
|
@@ -11304,7 +11312,7 @@ var tn = ({ name: t, size: r = "medium", shape: c = "rounded", className: a = ""
|
|
|
11304
11312
|
}, e1 = (E) => {
|
|
11305
11313
|
const j = new Date(E, z.getMonth(), 1);
|
|
11306
11314
|
p ? p(j) : f(j), b("months");
|
|
11307
|
-
},
|
|
11315
|
+
}, c1 = () => {
|
|
11308
11316
|
_(C - Y1);
|
|
11309
11317
|
}, q = () => {
|
|
11310
11318
|
_(C + Y1);
|
|
@@ -11320,7 +11328,7 @@ var tn = ({ name: t, size: r = "medium", shape: c = "rounded", className: a = ""
|
|
|
11320
11328
|
return E;
|
|
11321
11329
|
}, f1 = (E) => {
|
|
11322
11330
|
const j = ["calendar__day"];
|
|
11323
|
-
return F(E) ? (H(E) && j.push("calendar__day--selected"), A(E) && j.push("calendar__day--in-range"), $(E) && j.push("calendar__day--hover-range")) : j.push("calendar__day--other-month"), D0(E) && j.push("calendar__day--today"), d2(E) && j.push("calendar__day--weekend"),
|
|
11331
|
+
return F(E) ? (H(E) && j.push("calendar__day--selected"), A(E) && j.push("calendar__day--in-range"), $(E) && j.push("calendar__day--hover-range")) : j.push("calendar__day--other-month"), D0(E) && j.push("calendar__day--today"), d2(E) && j.push("calendar__day--weekend"), L(E) && j.push("calendar__day--disabled"), j.join(" ");
|
|
11324
11332
|
}, B1 = () => y === "years" ? /* @__PURE__ */ l("div", {
|
|
11325
11333
|
className: "calendar__header",
|
|
11326
11334
|
children: [
|
|
@@ -11329,7 +11337,7 @@ var tn = ({ name: t, size: r = "medium", shape: c = "rounded", className: a = ""
|
|
|
11329
11337
|
children: /* @__PURE__ */ e("button", {
|
|
11330
11338
|
type: "button",
|
|
11331
11339
|
className: "calendar__nav-button",
|
|
11332
|
-
onClick:
|
|
11340
|
+
onClick: c1,
|
|
11333
11341
|
children: "‹"
|
|
11334
11342
|
})
|
|
11335
11343
|
}),
|
|
@@ -11387,7 +11395,7 @@ var tn = ({ name: t, size: r = "medium", shape: c = "rounded", className: a = ""
|
|
|
11387
11395
|
children: /* @__PURE__ */ e("button", {
|
|
11388
11396
|
type: "button",
|
|
11389
11397
|
className: "calendar__nav-button",
|
|
11390
|
-
onClick:
|
|
11398
|
+
onClick: S,
|
|
11391
11399
|
children: "‹"
|
|
11392
11400
|
})
|
|
11393
11401
|
}),
|
|
@@ -11459,7 +11467,7 @@ var tn = ({ name: t, size: r = "medium", shape: c = "rounded", className: a = ""
|
|
|
11459
11467
|
}),
|
|
11460
11468
|
/* @__PURE__ */ e("div", {
|
|
11461
11469
|
className: "calendar__weekdays",
|
|
11462
|
-
children:
|
|
11470
|
+
children: x.map((E) => /* @__PURE__ */ e("div", {
|
|
11463
11471
|
className: "calendar__weekday",
|
|
11464
11472
|
children: E
|
|
11465
11473
|
}, E))
|
|
@@ -11471,8 +11479,8 @@ var tn = ({ name: t, size: r = "medium", shape: c = "rounded", className: a = ""
|
|
|
11471
11479
|
children: E.map((s1, p1) => /* @__PURE__ */ e("button", {
|
|
11472
11480
|
type: "button",
|
|
11473
11481
|
className: f1(s1),
|
|
11474
|
-
onClick: () =>
|
|
11475
|
-
disabled:
|
|
11482
|
+
onClick: () => t1(s1),
|
|
11483
|
+
disabled: L(s1),
|
|
11476
11484
|
title: s1.toDateString(),
|
|
11477
11485
|
children: s1.getDate()
|
|
11478
11486
|
}, p1))
|
|
@@ -11650,16 +11658,16 @@ var tn = ({ name: t, size: r = "medium", shape: c = "rounded", className: a = ""
|
|
|
11650
11658
|
})
|
|
11651
11659
|
]
|
|
11652
11660
|
}), Cn = ({ children: t, className: r = "", defaultCollapsed: c = !1, icon: a, isCollapsed: s, onToggle: d, rightDetails: o, title: m, toggleAccent: n, toggleHighlight: i, toggleMiddleIcon: h, toggleSize: p, toggleSpaceBetween: v, toggleSwap: g, toggleTint: u = "plain", toggleVariant: w, withCard: f = !1 }) => {
|
|
11653
|
-
const [y, b] = N(c), C = s !== void 0, _ = C ? s : y,
|
|
11661
|
+
const [y, b] = N(c), C = s !== void 0, _ = C ? s : y, k = () => {
|
|
11654
11662
|
const z = !_;
|
|
11655
11663
|
C || b(z), d?.(z);
|
|
11656
|
-
},
|
|
11664
|
+
}, R = !!o;
|
|
11657
11665
|
return /* @__PURE__ */ l("div", {
|
|
11658
11666
|
className: `collapsible-section ${f ? "collapsible-section--with-card" : ""} ${r} ${_ ? "collapsible-section__collapsed" : ""}`,
|
|
11659
11667
|
children: [m && /* @__PURE__ */ e("div", {
|
|
11660
|
-
className: `collapsible-section__header ${
|
|
11661
|
-
onClick:
|
|
11662
|
-
children:
|
|
11668
|
+
className: `collapsible-section__header ${R ? "" : "collapsible-section__header--inline"} ${v ? "collapsible-section__header--space-between" : ""} ${g ? "collapsible-section__header--swap" : ""} ${i ? "collapsible-section__header--highlight" : ""} ${n ? "collapsible-section__header--accent" : ""} ${p ? `collapsible-section__header--size-${p}` : ""} ${w ? `collapsible-section__header--variant-${w}` : ""} ${u !== "plain" ? `collapsible-section__header--tint-${u}` : ""}`,
|
|
11669
|
+
onClick: R ? k : void 0,
|
|
11670
|
+
children: R ? /* @__PURE__ */ l(h1, { children: [
|
|
11663
11671
|
/* @__PURE__ */ l("div", {
|
|
11664
11672
|
className: "collapsible-section__label",
|
|
11665
11673
|
children: [
|
|
@@ -11683,7 +11691,7 @@ var tn = ({ name: t, size: r = "medium", shape: c = "rounded", className: a = ""
|
|
|
11683
11691
|
] }) : /* @__PURE__ */ l("button", {
|
|
11684
11692
|
type: "button",
|
|
11685
11693
|
className: "collapsible-section__inline-toggle",
|
|
11686
|
-
onClick:
|
|
11694
|
+
onClick: k,
|
|
11687
11695
|
children: [
|
|
11688
11696
|
/* @__PURE__ */ l("span", {
|
|
11689
11697
|
className: "collapsible-section__label",
|
|
@@ -11709,10 +11717,10 @@ var tn = ({ name: t, size: r = "medium", shape: c = "rounded", className: a = ""
|
|
|
11709
11717
|
})]
|
|
11710
11718
|
});
|
|
11711
11719
|
}, $1 = z1(({ autoComplete: t = "on", autoFocus: r, disabled: c, error: a, hideNativeControls: s, highlighted: d, id: o, label: m, onChange: n, onClick: i, onKeyDown: h, required: p, success: v, value: g, min: u, max: w, placeholder: f, step: y }, b) => {
|
|
11712
|
-
const C = (
|
|
11713
|
-
if (
|
|
11714
|
-
let
|
|
11715
|
-
return u !== void 0 &&
|
|
11720
|
+
const C = (k) => {
|
|
11721
|
+
if (k === void 0) return;
|
|
11722
|
+
let R = k;
|
|
11723
|
+
return u !== void 0 && R < u && (R = u), w !== void 0 && R > w && (R = w), R;
|
|
11716
11724
|
};
|
|
11717
11725
|
return /* @__PURE__ */ l("div", {
|
|
11718
11726
|
className: `input-number-wrapper${d ? " input-number-highlighted" : ""}`,
|
|
@@ -11735,14 +11743,14 @@ var tn = ({ name: t, size: r = "medium", shape: c = "rounded", className: a = ""
|
|
|
11735
11743
|
min: u,
|
|
11736
11744
|
onBlur: () => {
|
|
11737
11745
|
if (g !== void 0) {
|
|
11738
|
-
const
|
|
11739
|
-
|
|
11746
|
+
const k = C(g);
|
|
11747
|
+
k !== g && n?.(k);
|
|
11740
11748
|
}
|
|
11741
11749
|
},
|
|
11742
|
-
onChange: (
|
|
11750
|
+
onChange: (k) => n?.(k.target.value ? Number(k.target.value) : void 0),
|
|
11743
11751
|
onClick: i,
|
|
11744
|
-
onKeyDown: (
|
|
11745
|
-
(
|
|
11752
|
+
onKeyDown: (k) => {
|
|
11753
|
+
(k.key === "e" || k.key === "E") && k.preventDefault(), h?.(k);
|
|
11746
11754
|
},
|
|
11747
11755
|
placeholder: f,
|
|
11748
11756
|
ref: b,
|
|
@@ -12248,12 +12256,12 @@ var tn = ({ name: t, size: r = "medium", shape: c = "rounded", className: a = ""
|
|
|
12248
12256
|
let C = [];
|
|
12249
12257
|
if (a === "confetti") C = Array.from({ length: b }, () => L2(w, f, y));
|
|
12250
12258
|
else if (a === "burst") {
|
|
12251
|
-
const
|
|
12252
|
-
C = Array.from({ length: b }, () => nc(
|
|
12259
|
+
const k = w / 2, R = f / 2;
|
|
12260
|
+
C = Array.from({ length: b }, () => nc(k, R, y));
|
|
12253
12261
|
} else a === "fireworks" && (C = Array.from({ length: b }, () => z2(w, f, y)));
|
|
12254
|
-
const _ = (
|
|
12262
|
+
const _ = (k) => {
|
|
12255
12263
|
if (!i.current) return;
|
|
12256
|
-
const
|
|
12264
|
+
const R = k - n.current, z = Math.min(R / r, 1);
|
|
12257
12265
|
if (u.clearRect(0, 0, w, f), a === "confetti" ? (z < 0.6 && Math.random() < 0.3 && C.push(L2(w, f, y)), C = C.filter((M) => M.opacity > 0 && M.y < f + 20), C.forEach((M) => {
|
|
12258
12266
|
M.x += M.vx, M.y += M.vy, M.vy += 0.08, M.vx += (Math.random() - 0.5) * 0.1, M.angle += M.spin, z > 0.6 && (M.opacity -= 0.015), K0(u, M);
|
|
12259
12267
|
})) : a === "burst" ? (C = C.filter((M) => M.opacity > 0), C.forEach((M) => {
|
|
@@ -12266,9 +12274,9 @@ var tn = ({ name: t, size: r = "medium", shape: c = "rounded", className: a = ""
|
|
|
12266
12274
|
else if (M.trail?.push({
|
|
12267
12275
|
x: M.x,
|
|
12268
12276
|
y: M.y
|
|
12269
|
-
}), (M.trail?.length ?? 0) > 12 && M.trail?.shift(), M.trail?.forEach((V,
|
|
12270
|
-
const
|
|
12271
|
-
u.save(), u.globalAlpha =
|
|
12277
|
+
}), (M.trail?.length ?? 0) > 12 && M.trail?.shift(), M.trail?.forEach((V, x) => {
|
|
12278
|
+
const L = (x + 1) / (M.trail?.length ?? 1) * 0.6;
|
|
12279
|
+
u.save(), u.globalAlpha = L, u.fillStyle = M.color, u.beginPath(), u.arc(V.x, V.y, 2, 0, Math.PI * 2), u.fill(), u.restore();
|
|
12272
12280
|
}), u.save(), u.globalAlpha = 1, u.fillStyle = M.color, u.beginPath(), u.arc(M.x, M.y, 3, 0, Math.PI * 2), u.fill(), u.restore(), M.x += M.vx, M.y += M.vy, M.vy += 0.18, M.vy >= 0) {
|
|
12273
12281
|
M.exploded = !0;
|
|
12274
12282
|
const V = 60 + Math.floor(Math.random() * 40);
|
|
@@ -12397,8 +12405,8 @@ var tn = ({ name: t, size: r = "medium", shape: c = "rounded", className: a = ""
|
|
|
12397
12405
|
"right",
|
|
12398
12406
|
"left"
|
|
12399
12407
|
].filter((_) => _ !== d).find((_) => {
|
|
12400
|
-
const
|
|
12401
|
-
return u(
|
|
12408
|
+
const k = w[_];
|
|
12409
|
+
return u(k.top, k.left);
|
|
12402
12410
|
}) || d, { top: y, left: b } = w[f]);
|
|
12403
12411
|
}
|
|
12404
12412
|
(f === "top" || f === "bottom") && (b < R1 && (b = R1), b + v.width > g.width - R1 && (b = g.width - v.width - R1)), (f === "left" || f === "right") && (y < R1 && (y = R1), y + v.height > g.height - R1 && (y = g.height - v.height - R1)), i({
|
|
@@ -12750,18 +12758,18 @@ var tn = ({ name: t, size: r = "medium", shape: c = "rounded", className: a = ""
|
|
|
12750
12758
|
})]
|
|
12751
12759
|
});
|
|
12752
12760
|
}, l3 = ({ className: t = "", clockSize: r = 208, collapsibleClock: c = !0, disabled: a = !1, format: s = "24h", label: d = "Time", minuteStep: o = 1, onChange: m, value: n, withClock: i = !1, withSeconds: h = !1 }) => {
|
|
12753
|
-
const [p, v] = N("hours"), [g, u] = N(!0), w = n.hours >= 12, f = i && (!c || g), y = i && c, b = !!d || y, C = (
|
|
12761
|
+
const [p, v] = N("hours"), [g, u] = N(!0), w = n.hours >= 12, f = i && (!c || g), y = i && c, b = !!d || y, C = (k) => {
|
|
12754
12762
|
if (s === "12h") {
|
|
12755
|
-
const
|
|
12763
|
+
const R = k % 12;
|
|
12756
12764
|
m({
|
|
12757
12765
|
...n,
|
|
12758
|
-
hours: w ?
|
|
12766
|
+
hours: w ? R + 12 : R
|
|
12759
12767
|
});
|
|
12760
12768
|
return;
|
|
12761
12769
|
}
|
|
12762
12770
|
m({
|
|
12763
12771
|
...n,
|
|
12764
|
-
hours:
|
|
12772
|
+
hours: k
|
|
12765
12773
|
});
|
|
12766
12774
|
}, _ = () => {
|
|
12767
12775
|
m({
|
|
@@ -12808,9 +12816,9 @@ var tn = ({ name: t, size: r = "medium", shape: c = "rounded", className: a = ""
|
|
|
12808
12816
|
disabled: a,
|
|
12809
12817
|
max: 59,
|
|
12810
12818
|
min: 0,
|
|
12811
|
-
onChange: (
|
|
12819
|
+
onChange: (k) => m({
|
|
12812
12820
|
...n,
|
|
12813
|
-
minutes:
|
|
12821
|
+
minutes: k
|
|
12814
12822
|
}),
|
|
12815
12823
|
onFocus: () => v("minutes"),
|
|
12816
12824
|
step: o,
|
|
@@ -12825,9 +12833,9 @@ var tn = ({ name: t, size: r = "medium", shape: c = "rounded", className: a = ""
|
|
|
12825
12833
|
disabled: a,
|
|
12826
12834
|
max: 59,
|
|
12827
12835
|
min: 0,
|
|
12828
|
-
onChange: (
|
|
12836
|
+
onChange: (k) => m({
|
|
12829
12837
|
...n,
|
|
12830
|
-
seconds:
|
|
12838
|
+
seconds: k
|
|
12831
12839
|
}),
|
|
12832
12840
|
onFocus: () => v("seconds"),
|
|
12833
12841
|
title: "Seconds",
|
|
@@ -12861,7 +12869,7 @@ var tn = ({ name: t, size: r = "medium", shape: c = "rounded", className: a = ""
|
|
|
12861
12869
|
hours: 0,
|
|
12862
12870
|
minutes: 0,
|
|
12863
12871
|
seconds: 0
|
|
12864
|
-
}), [_,
|
|
12872
|
+
}), [_, k] = N(null), [R, z] = N({
|
|
12865
12873
|
position: "fixed",
|
|
12866
12874
|
visibility: "hidden"
|
|
12867
12875
|
}), M = X(null), V = X(null);
|
|
@@ -12872,42 +12880,42 @@ var tn = ({ name: t, size: r = "medium", shape: c = "rounded", className: a = ""
|
|
|
12872
12880
|
seconds: t.getSeconds()
|
|
12873
12881
|
});
|
|
12874
12882
|
}, [t, a]);
|
|
12875
|
-
const
|
|
12883
|
+
const x = u ? !p : f;
|
|
12876
12884
|
Y(() => {
|
|
12877
12885
|
if (u) return;
|
|
12878
12886
|
const D = (B) => {
|
|
12879
|
-
|
|
12887
|
+
x && M.current && V.current && !M.current.contains(B.target) && !V.current.contains(B.target) && (k(null), y(!1));
|
|
12880
12888
|
};
|
|
12881
12889
|
return document.addEventListener("mousedown", D), () => document.removeEventListener("mousedown", D);
|
|
12882
|
-
}, [u,
|
|
12883
|
-
const
|
|
12884
|
-
if (u || !
|
|
12885
|
-
const D = M.current.getBoundingClientRect(), B = V.current.getBoundingClientRect(), U = 16, O = 8, K = window.innerHeight - D.bottom - U, e1 = D.top - U,
|
|
12890
|
+
}, [u, x]);
|
|
12891
|
+
const L = P(() => {
|
|
12892
|
+
if (u || !x || !M.current || !V.current) return;
|
|
12893
|
+
const D = M.current.getBoundingClientRect(), B = V.current.getBoundingClientRect(), U = 16, O = 8, K = window.innerHeight - D.bottom - U, e1 = D.top - U, c1 = K < B.height && e1 > B.height ? D.top - B.height - O : D.bottom + O, q = Math.max(U, Math.min(c1, window.innerHeight - B.height - U)), u1 = Math.max(U, Math.min(D.left, window.innerWidth - B.width - U));
|
|
12886
12894
|
z({
|
|
12887
12895
|
position: "fixed",
|
|
12888
12896
|
top: `${q}px`,
|
|
12889
12897
|
left: `${u1}px`,
|
|
12890
12898
|
zIndex: 1100
|
|
12891
12899
|
});
|
|
12892
|
-
}, [u,
|
|
12900
|
+
}, [u, x]);
|
|
12893
12901
|
Y(() => {
|
|
12894
|
-
if (u || !
|
|
12902
|
+
if (u || !x) {
|
|
12895
12903
|
z({
|
|
12896
12904
|
position: "fixed",
|
|
12897
12905
|
visibility: "hidden"
|
|
12898
12906
|
});
|
|
12899
12907
|
return;
|
|
12900
12908
|
}
|
|
12901
|
-
const D = requestAnimationFrame(() => requestAnimationFrame(
|
|
12902
|
-
window.addEventListener("resize",
|
|
12903
|
-
const B = new ResizeObserver(() =>
|
|
12909
|
+
const D = requestAnimationFrame(() => requestAnimationFrame(L));
|
|
12910
|
+
window.addEventListener("resize", L), window.addEventListener("scroll", L, !0);
|
|
12911
|
+
const B = new ResizeObserver(() => L());
|
|
12904
12912
|
return V.current && B.observe(V.current), () => {
|
|
12905
|
-
cancelAnimationFrame(D), B.disconnect(), window.removeEventListener("resize",
|
|
12913
|
+
cancelAnimationFrame(D), B.disconnect(), window.removeEventListener("resize", L), window.removeEventListener("scroll", L, !0);
|
|
12906
12914
|
};
|
|
12907
12915
|
}, [
|
|
12908
12916
|
u,
|
|
12909
|
-
|
|
12910
|
-
|
|
12917
|
+
x,
|
|
12918
|
+
L
|
|
12911
12919
|
]);
|
|
12912
12920
|
const H = () => {
|
|
12913
12921
|
if (!t) return "";
|
|
@@ -12928,14 +12936,14 @@ var tn = ({ name: t, size: r = "medium", shape: c = "rounded", className: a = ""
|
|
|
12928
12936
|
const B = new Date(t);
|
|
12929
12937
|
B.setHours(D.hours, D.minutes, D.seconds), r?.(B);
|
|
12930
12938
|
}, F = (D) => {
|
|
12931
|
-
D.stopPropagation(),
|
|
12932
|
-
},
|
|
12939
|
+
D.stopPropagation(), k(null), r?.(void 0);
|
|
12940
|
+
}, t1 = H(), S = () => /* @__PURE__ */ l(h1, { children: [/* @__PURE__ */ e(i2, {
|
|
12933
12941
|
...w,
|
|
12934
12942
|
mode: c,
|
|
12935
12943
|
value: t,
|
|
12936
12944
|
onChange: A,
|
|
12937
12945
|
rangeStart: c === "range" ? _ : w.rangeStart,
|
|
12938
|
-
onRangeStartChange: c === "range" ?
|
|
12946
|
+
onRangeStartChange: c === "range" ? k : w.onRangeStartChange
|
|
12939
12947
|
}), a && c === "single" && t instanceof Date && /* @__PURE__ */ e("div", {
|
|
12940
12948
|
className: "datepicker__time",
|
|
12941
12949
|
children: /* @__PURE__ */ e(l3, {
|
|
@@ -12952,16 +12960,16 @@ var tn = ({ name: t, size: r = "medium", shape: c = "rounded", className: a = ""
|
|
|
12952
12960
|
className: "datepicker",
|
|
12953
12961
|
children: [/* @__PURE__ */ l("div", {
|
|
12954
12962
|
ref: M,
|
|
12955
|
-
className: `datepicker__input ${p ? "datepicker__input--disabled" : ""} ${
|
|
12963
|
+
className: `datepicker__input ${p ? "datepicker__input--disabled" : ""} ${x ? "datepicker__input--open" : ""}`,
|
|
12956
12964
|
onClick: () => {
|
|
12957
|
-
p || u || (
|
|
12965
|
+
p || u || (x && k(null), y(!x));
|
|
12958
12966
|
},
|
|
12959
12967
|
children: [/* @__PURE__ */ e("span", {
|
|
12960
|
-
className: `datepicker__value ${
|
|
12961
|
-
children:
|
|
12968
|
+
className: `datepicker__value ${t1 ? "" : "datepicker__value--placeholder"}`,
|
|
12969
|
+
children: t1 || h
|
|
12962
12970
|
}), /* @__PURE__ */ l("div", {
|
|
12963
12971
|
className: "datepicker__actions",
|
|
12964
|
-
children: [v &&
|
|
12972
|
+
children: [v && t1 && /* @__PURE__ */ e(J, {
|
|
12965
12973
|
title: "Clear",
|
|
12966
12974
|
children: /* @__PURE__ */ e("button", {
|
|
12967
12975
|
type: "button",
|
|
@@ -12974,15 +12982,15 @@ var tn = ({ name: t, size: r = "medium", shape: c = "rounded", className: a = ""
|
|
|
12974
12982
|
children: /* @__PURE__ */ e(G, { name: "calendar" })
|
|
12975
12983
|
})]
|
|
12976
12984
|
})]
|
|
12977
|
-
}),
|
|
12985
|
+
}), x && (u ? /* @__PURE__ */ e("div", {
|
|
12978
12986
|
ref: V,
|
|
12979
12987
|
className: "datepicker__dropdown datepicker__dropdown--inline",
|
|
12980
|
-
children:
|
|
12988
|
+
children: S()
|
|
12981
12989
|
}) : K1(/* @__PURE__ */ e("div", {
|
|
12982
12990
|
ref: V,
|
|
12983
12991
|
className: "datepicker__dropdown",
|
|
12984
|
-
style:
|
|
12985
|
-
children:
|
|
12992
|
+
style: R,
|
|
12993
|
+
children: S()
|
|
12986
12994
|
}), document.body))]
|
|
12987
12995
|
});
|
|
12988
12996
|
}, wc = /[̀-ͯ]/g, V2 = (t) => t.normalize("NFD").replace(wc, "").toLowerCase(), Nn = (t, r) => {
|
|
@@ -12995,17 +13003,17 @@ var tn = ({ name: t, size: r = "medium", shape: c = "rounded", className: a = ""
|
|
|
12995
13003
|
o < c.length && (d++, o++);
|
|
12996
13004
|
}
|
|
12997
13005
|
return d / a.length >= s;
|
|
12998
|
-
}, S0 = ({ allowCustomValue: t = !1, autofocus: r = !1, className: c = "", disabled: a = !1, error: s, highlighted: d = !1, id: o, label: m, maxVisibleSelectedLabels: n = 1, multilineChips: i = !1, multiple: h = !1, name: p, onChange: v, onSearchChange: g, options: u, placeholder: w = "Select an option", searchable: f = !0, searchValue: y, selectedCountDisplay: b = "inline", showChips: C = !1, sortSelectedFirst: _ = !1, success:
|
|
12999
|
-
const [V,
|
|
13006
|
+
}, S0 = ({ allowCustomValue: t = !1, autofocus: r = !1, className: c = "", disabled: a = !1, error: s, highlighted: d = !1, id: o, label: m, maxVisibleSelectedLabels: n = 1, multilineChips: i = !1, multiple: h = !1, name: p, onChange: v, onSearchChange: g, options: u, placeholder: w = "Select an option", searchable: f = !0, searchValue: y, selectedCountDisplay: b = "inline", showChips: C = !1, sortSelectedFirst: _ = !1, success: k, usePortal: R = !0, value: z, valueAsChip: M = !0 }) => {
|
|
13007
|
+
const [V, x] = N(!1), [L, H] = N(y || ""), [A, $] = N(u), [F, t1] = N(-1), [S, D] = N([]), [B, U] = N({
|
|
13000
13008
|
top: 0,
|
|
13001
13009
|
bottom: 0,
|
|
13002
13010
|
left: 0,
|
|
13003
13011
|
width: 0,
|
|
13004
13012
|
maxHeight: 300
|
|
13005
|
-
}), [O, K] = N(!1), e1 = X(null),
|
|
13013
|
+
}), [O, K] = N(!1), e1 = X(null), c1 = X([]), q = X(null), u1 = X(null), g1 = H0(), b1 = o ?? `dropdown-${g1}`, f1 = X(null);
|
|
13006
13014
|
Y(() => {
|
|
13007
13015
|
if (V && _ && h) {
|
|
13008
|
-
const W = new Set(
|
|
13016
|
+
const W = new Set(S.map((n1) => n1.value)), Z = [], Q = [];
|
|
13009
13017
|
u.forEach((n1) => (W.has(n1.value) ? Z : Q).push(n1)), f1.current = [...Z, ...Q];
|
|
13010
13018
|
} else V || (f1.current = null);
|
|
13011
13019
|
}, [
|
|
@@ -13015,14 +13023,14 @@ var tn = ({ name: t, size: r = "medium", shape: c = "rounded", className: a = ""
|
|
|
13015
13023
|
u
|
|
13016
13024
|
]), Y(() => {
|
|
13017
13025
|
const W = f1.current ?? u;
|
|
13018
|
-
if (!f || !
|
|
13026
|
+
if (!f || !L) $(W);
|
|
13019
13027
|
else {
|
|
13020
|
-
const Z = V2(
|
|
13028
|
+
const Z = V2(L), Q = W.filter((n1) => V2(n1.label).includes(Z));
|
|
13021
13029
|
$(Q);
|
|
13022
13030
|
}
|
|
13023
|
-
|
|
13031
|
+
t1(-1);
|
|
13024
13032
|
}, [
|
|
13025
|
-
|
|
13033
|
+
L,
|
|
13026
13034
|
u,
|
|
13027
13035
|
f,
|
|
13028
13036
|
V
|
|
@@ -13082,7 +13090,7 @@ var tn = ({ name: t, size: r = "medium", shape: c = "rounded", className: a = ""
|
|
|
13082
13090
|
const W = () => {
|
|
13083
13091
|
if (!e1.current) return;
|
|
13084
13092
|
const Q = e1.current.getBoundingClientRect(), n1 = window.visualViewport, O1 = n1?.offsetTop ?? 0, R0 = O1 + (n1?.height ?? window.innerHeight), Z1 = 300, G0 = 8, C0 = R0 - Q.bottom, y0 = Q.top - O1, o0 = C0 < Z1 && y0 > C0;
|
|
13085
|
-
if (K(o0),
|
|
13093
|
+
if (K(o0), R) {
|
|
13086
13094
|
const Z0 = Math.max(0, (o0 ? y0 : C0) - G0);
|
|
13087
13095
|
U({
|
|
13088
13096
|
top: Q.bottom,
|
|
@@ -13098,23 +13106,23 @@ var tn = ({ name: t, size: r = "medium", shape: c = "rounded", className: a = ""
|
|
|
13098
13106
|
return window.addEventListener("scroll", W, !0), window.addEventListener("resize", W), Z?.addEventListener("resize", W), Z?.addEventListener("scroll", W), () => {
|
|
13099
13107
|
window.removeEventListener("scroll", W, !0), window.removeEventListener("resize", W), Z?.removeEventListener("resize", W), Z?.removeEventListener("scroll", W);
|
|
13100
13108
|
};
|
|
13101
|
-
}, [V,
|
|
13109
|
+
}, [V, R]), Y(() => {
|
|
13102
13110
|
const W = (Z) => {
|
|
13103
13111
|
if (e1.current && !e1.current.contains(Z.target)) {
|
|
13104
|
-
if (
|
|
13112
|
+
if (R && V) {
|
|
13105
13113
|
const Q = document.querySelector(".dropdown-menu--portal");
|
|
13106
13114
|
if (Q && Q.contains(Z.target)) return;
|
|
13107
13115
|
}
|
|
13108
|
-
if (t && !h &&
|
|
13109
|
-
const Q = u.find((n1) => n1.label.toLowerCase() ===
|
|
13110
|
-
label:
|
|
13111
|
-
value:
|
|
13116
|
+
if (t && !h && L.trim() && !(S.length > 0 && S[0].label.toLowerCase() === L.trim().toLowerCase())) {
|
|
13117
|
+
const Q = u.find((n1) => n1.label.toLowerCase() === L.toLowerCase() || n1.value.toString() === L) || {
|
|
13118
|
+
label: L.trim(),
|
|
13119
|
+
value: L.trim(),
|
|
13112
13120
|
className: "custom-option"
|
|
13113
13121
|
};
|
|
13114
|
-
D([Q]), H(Q.label),
|
|
13122
|
+
D([Q]), H(Q.label), x(!1), v && v(Q, p);
|
|
13115
13123
|
return;
|
|
13116
13124
|
}
|
|
13117
|
-
|
|
13125
|
+
x(!1), !h && S.length > 0 ? H(S[0].label) : h && f && H("");
|
|
13118
13126
|
}
|
|
13119
13127
|
};
|
|
13120
13128
|
return document.addEventListener("mousedown", W), () => {
|
|
@@ -13122,101 +13130,101 @@ var tn = ({ name: t, size: r = "medium", shape: c = "rounded", className: a = ""
|
|
|
13122
13130
|
};
|
|
13123
13131
|
}, [
|
|
13124
13132
|
t,
|
|
13125
|
-
|
|
13133
|
+
L,
|
|
13126
13134
|
V,
|
|
13127
13135
|
h,
|
|
13128
13136
|
p,
|
|
13129
13137
|
v,
|
|
13130
13138
|
u,
|
|
13131
13139
|
f,
|
|
13132
|
-
|
|
13133
|
-
|
|
13140
|
+
S,
|
|
13141
|
+
R
|
|
13134
13142
|
]);
|
|
13135
13143
|
const l1 = (W) => {
|
|
13136
13144
|
if (!W.disabled)
|
|
13137
13145
|
if (h) {
|
|
13138
|
-
const Z =
|
|
13146
|
+
const Z = S.some((n1) => n1.value === W.value);
|
|
13139
13147
|
let Q;
|
|
13140
|
-
Z ? Q =
|
|
13148
|
+
Z ? Q = S.filter((n1) => n1.value !== W.value) : Q = [...S, W], D(Q), f && H(""), v && v(Q, p);
|
|
13141
13149
|
} else
|
|
13142
|
-
H(W.label), D([W]),
|
|
13150
|
+
H(W.label), D([W]), x(!1), v && v(W, p);
|
|
13143
13151
|
}, m1 = () => {
|
|
13144
|
-
if (!t || !
|
|
13145
|
-
const W = u.find((Q) => Q.label.toLowerCase() ===
|
|
13152
|
+
if (!t || !L.trim()) return;
|
|
13153
|
+
const W = u.find((Q) => Q.label.toLowerCase() === L.toLowerCase() || Q.value.toString() === L);
|
|
13146
13154
|
if (W) {
|
|
13147
13155
|
l1(W);
|
|
13148
13156
|
return;
|
|
13149
13157
|
}
|
|
13150
13158
|
const Z = {
|
|
13151
|
-
label:
|
|
13152
|
-
value:
|
|
13159
|
+
label: L.trim(),
|
|
13160
|
+
value: L.trim(),
|
|
13153
13161
|
className: "custom-option"
|
|
13154
13162
|
};
|
|
13155
13163
|
if (h) {
|
|
13156
|
-
const Q = [...
|
|
13164
|
+
const Q = [...S, Z];
|
|
13157
13165
|
D(Q), H(""), v && v(Q, p);
|
|
13158
13166
|
} else
|
|
13159
|
-
D([Z]), H(Z.label),
|
|
13167
|
+
D([Z]), H(Z.label), x(!1), v && v(Z, p);
|
|
13160
13168
|
}, E = (W) => {
|
|
13161
|
-
const Z =
|
|
13169
|
+
const Z = S.filter((Q) => Q.value !== W.value);
|
|
13162
13170
|
D(Z), v && (h ? v(Z, p) : (v(null, p), f || H("")));
|
|
13163
13171
|
}, j = () => {
|
|
13164
|
-
D([]), (!f || !h) && H(""),
|
|
13172
|
+
D([]), (!f || !h) && H(""), x(!1), v && v(h ? [] : null, p);
|
|
13165
13173
|
}, s1 = (W) => {
|
|
13166
|
-
H(W), V ||
|
|
13174
|
+
H(W), V || x(!0), g?.(W);
|
|
13167
13175
|
}, p1 = () => {
|
|
13168
|
-
a || (
|
|
13176
|
+
a || (x(!0), !h && f && S.length > 0 && H(""), (h || f) && q.current?.focus());
|
|
13169
13177
|
}, x1 = () => {
|
|
13170
|
-
a || (
|
|
13178
|
+
a || (x(!V), V || (t1(-1), !h && f && S.length > 0 && H(""), (h || f) && q.current?.focus()));
|
|
13171
13179
|
}, _1 = (W) => {
|
|
13172
13180
|
if (!a) {
|
|
13173
13181
|
if (!V) {
|
|
13174
|
-
(W.key === "ArrowDown" || W.key === "Enter") && (
|
|
13182
|
+
(W.key === "ArrowDown" || W.key === "Enter") && (x(!0), W.preventDefault());
|
|
13175
13183
|
return;
|
|
13176
13184
|
}
|
|
13177
13185
|
switch (W.key) {
|
|
13178
13186
|
case "ArrowDown":
|
|
13179
|
-
if (W.preventDefault(), t &&
|
|
13180
|
-
|
|
13181
|
-
const Q = Z < (t &&
|
|
13182
|
-
return Q < A.length &&
|
|
13187
|
+
if (W.preventDefault(), t && L && A.length === 0) return;
|
|
13188
|
+
t1((Z) => {
|
|
13189
|
+
const Q = Z < (t && L && !A.some((n1) => n1.label.toLowerCase() === L.toLowerCase()) ? A.length : A.length - 1) ? Z + 1 : 0;
|
|
13190
|
+
return Q < A.length && c1.current[Q] && c1.current[Q]?.scrollIntoView({ block: "nearest" }), Q;
|
|
13183
13191
|
});
|
|
13184
13192
|
break;
|
|
13185
13193
|
case "ArrowUp":
|
|
13186
|
-
if (W.preventDefault(), t &&
|
|
13187
|
-
|
|
13188
|
-
const Q = t &&
|
|
13189
|
-
return n1 < A.length &&
|
|
13194
|
+
if (W.preventDefault(), t && L && A.length === 0) return;
|
|
13195
|
+
t1((Z) => {
|
|
13196
|
+
const Q = t && L && !A.some((O1) => O1.label.toLowerCase() === L.toLowerCase()) ? A.length : A.length - 1, n1 = Z > 0 ? Z - 1 : Q;
|
|
13197
|
+
return n1 < A.length && c1.current[n1] && c1.current[n1]?.scrollIntoView({ block: "nearest" }), n1;
|
|
13190
13198
|
});
|
|
13191
13199
|
break;
|
|
13192
13200
|
case "Enter":
|
|
13193
|
-
W.preventDefault(), F >= 0 && F < A.length ? l1(A[F]) : (t &&
|
|
13201
|
+
W.preventDefault(), F >= 0 && F < A.length ? l1(A[F]) : (t && L && F === A.length || t && L && A.length === 0) && m1();
|
|
13194
13202
|
break;
|
|
13195
13203
|
case "Escape":
|
|
13196
|
-
W.preventDefault(),
|
|
13204
|
+
W.preventDefault(), x(!1), !h && S.length > 0 ? H(S[0].label) : h && f && H("");
|
|
13197
13205
|
break;
|
|
13198
13206
|
case "Backspace":
|
|
13199
|
-
h &&
|
|
13207
|
+
h && L === "" && S.length > 0 && (W.preventDefault(), E(S[S.length - 1]));
|
|
13200
13208
|
break;
|
|
13201
13209
|
default:
|
|
13202
13210
|
break;
|
|
13203
13211
|
}
|
|
13204
13212
|
}
|
|
13205
|
-
}, E1 = (W) =>
|
|
13206
|
-
if (
|
|
13213
|
+
}, E1 = (W) => S.some((Z) => Z.value === W.value), P1 = () => {
|
|
13214
|
+
if (S.length === 0) return "";
|
|
13207
13215
|
const W = Math.max(1, n);
|
|
13208
|
-
if (
|
|
13209
|
-
const Z =
|
|
13216
|
+
if (S.length <= W) return S.map((n1) => n1.label).join(", ");
|
|
13217
|
+
const Z = S.slice(0, W).map((n1) => n1.label).join(", "), Q = S.length - W;
|
|
13210
13218
|
return `${Z} (+${Q} ${Q === 1 ? "other" : "others"})`;
|
|
13211
|
-
}, Q1 = () => h && C || f && V ?
|
|
13219
|
+
}, Q1 = () => h && C || f && V ? L : S.length > 0 ? h ? P1() : S[0].label : "", N1 = () => h && C ? S.length > 0 ? "" : w : V && f ? w : S.length > 0 ? "" : w, H1 = () => !h || S.length === 0 || b === "none" ? null : b === "floating" ? /* @__PURE__ */ l("div", {
|
|
13212
13220
|
className: "dropdown-selected-count",
|
|
13213
|
-
children: [
|
|
13214
|
-
}) : null, G1 = () => !!(t &&
|
|
13221
|
+
children: [S.length, " selected"]
|
|
13222
|
+
}) : null, G1 = () => !!(t && L && L.trim() && !A.some((W) => W.label.toLowerCase() === L.toLowerCase() || W.value.toString() === L)), i0 = () => {
|
|
13215
13223
|
if (!V || a) return null;
|
|
13216
13224
|
const W = /* @__PURE__ */ e("div", {
|
|
13217
13225
|
ref: u1,
|
|
13218
|
-
className: `dropdown-menu ${
|
|
13219
|
-
style:
|
|
13226
|
+
className: `dropdown-menu ${R ? "dropdown-menu--portal" : ""} ${O ? "dropdown-menu--upward" : ""}`,
|
|
13227
|
+
style: R ? {
|
|
13220
13228
|
position: "fixed",
|
|
13221
13229
|
top: O ? "auto" : `${B.top}px`,
|
|
13222
13230
|
bottom: O ? `${B.bottom}px` : "auto",
|
|
@@ -13229,11 +13237,11 @@ var tn = ({ name: t, size: r = "medium", shape: c = "rounded", className: a = ""
|
|
|
13229
13237
|
className: "dropdown-options-list",
|
|
13230
13238
|
children: [A.map((Z, Q) => /* @__PURE__ */ l("li", {
|
|
13231
13239
|
ref: (n1) => {
|
|
13232
|
-
|
|
13240
|
+
c1.current[Q] = n1;
|
|
13233
13241
|
},
|
|
13234
13242
|
className: `dropdown-option ${Z.className || ""} ${F === Q ? "focused" : ""} ${E1(Z) ? "selected" : ""} ${Z.disabled ? "dropdown-option--disabled" : ""}`,
|
|
13235
13243
|
onClick: () => l1(Z),
|
|
13236
|
-
onMouseEnter: () =>
|
|
13244
|
+
onMouseEnter: () => t1(Q),
|
|
13237
13245
|
title: Z.tooltip,
|
|
13238
13246
|
children: [h && /* @__PURE__ */ e("div", {
|
|
13239
13247
|
className: "dropdown-option-checkbox",
|
|
@@ -13273,18 +13281,18 @@ var tn = ({ name: t, size: r = "medium", shape: c = "rounded", className: a = ""
|
|
|
13273
13281
|
})]
|
|
13274
13282
|
}, `dd-option-${g1}-${Q}`)), G1() && /* @__PURE__ */ e("li", {
|
|
13275
13283
|
ref: (Z) => {
|
|
13276
|
-
|
|
13284
|
+
c1.current[A.length] = Z;
|
|
13277
13285
|
},
|
|
13278
13286
|
className: `dropdown-option dropdown-option--create ${F === A.length ? "focused" : ""}`,
|
|
13279
13287
|
onClick: m1,
|
|
13280
|
-
onMouseEnter: () =>
|
|
13288
|
+
onMouseEnter: () => t1(A.length),
|
|
13281
13289
|
children: /* @__PURE__ */ e("div", {
|
|
13282
13290
|
className: "dropdown-option-content",
|
|
13283
13291
|
children: /* @__PURE__ */ l("span", {
|
|
13284
13292
|
className: "dropdown-option-label",
|
|
13285
13293
|
children: [/* @__PURE__ */ e(G, { name: "plus" }), /* @__PURE__ */ l("span", { children: [
|
|
13286
13294
|
"Create “",
|
|
13287
|
-
|
|
13295
|
+
L,
|
|
13288
13296
|
"”"
|
|
13289
13297
|
] })]
|
|
13290
13298
|
})
|
|
@@ -13295,10 +13303,10 @@ var tn = ({ name: t, size: r = "medium", shape: c = "rounded", className: a = ""
|
|
|
13295
13303
|
children: "No options found"
|
|
13296
13304
|
})
|
|
13297
13305
|
});
|
|
13298
|
-
return
|
|
13299
|
-
}, L1 = !h &&
|
|
13306
|
+
return R ? K1(W, document.body) : W;
|
|
13307
|
+
}, L1 = !h && S.length === 1 ? S[0] : null, T1 = M && !V && !h && S.length > 0, U1 = !!(L1?.icon && !L && !T1), J1 = !!(L1?.suffixIcon && !T1), e0 = h && C;
|
|
13300
13308
|
return /* @__PURE__ */ l("div", {
|
|
13301
|
-
className: `dropdown-container ${s ? "dropdown-error" : ""} ${
|
|
13309
|
+
className: `dropdown-container ${s ? "dropdown-error" : ""} ${k ? "dropdown-success" : ""} ${d ? "dropdown-highlighted" : ""} ${h ? "multiple" : ""} ${a ? "disabled" : ""} ${h ? `count-display-${b}` : ""} ${c}`,
|
|
13302
13310
|
ref: e1,
|
|
13303
13311
|
children: [
|
|
13304
13312
|
m && /* @__PURE__ */ e("label", {
|
|
@@ -13321,7 +13329,7 @@ var tn = ({ name: t, size: r = "medium", shape: c = "rounded", className: a = ""
|
|
|
13321
13329
|
children: L1.label
|
|
13322
13330
|
})]
|
|
13323
13331
|
}),
|
|
13324
|
-
e0 &&
|
|
13332
|
+
e0 && S.map((W) => /* @__PURE__ */ l("span", {
|
|
13325
13333
|
className: "dropdown-chip",
|
|
13326
13334
|
children: [/* @__PURE__ */ e("span", {
|
|
13327
13335
|
className: "dropdown-chip__label",
|
|
@@ -13359,7 +13367,7 @@ var tn = ({ name: t, size: r = "medium", shape: c = "rounded", className: a = ""
|
|
|
13359
13367
|
className: "dropdown-selected-icon dropdown-selected-icon--suffix",
|
|
13360
13368
|
children: /* @__PURE__ */ e(G, { name: L1.suffixIcon })
|
|
13361
13369
|
}),
|
|
13362
|
-
(!h &&
|
|
13370
|
+
(!h && S.length > 0 || h && S.length > 0) && /* @__PURE__ */ e("span", {
|
|
13363
13371
|
className: "dropdown-action-button dropdown-clear-button",
|
|
13364
13372
|
children: /* @__PURE__ */ e(I, {
|
|
13365
13373
|
variant: "plain",
|
|
@@ -13387,14 +13395,14 @@ var tn = ({ name: t, size: r = "medium", shape: c = "rounded", className: a = ""
|
|
|
13387
13395
|
className: "dropdown-error-message",
|
|
13388
13396
|
children: s
|
|
13389
13397
|
}),
|
|
13390
|
-
|
|
13398
|
+
k && /* @__PURE__ */ e("span", {
|
|
13391
13399
|
className: "dropdown-success-message",
|
|
13392
|
-
children:
|
|
13400
|
+
children: k
|
|
13393
13401
|
})
|
|
13394
13402
|
]
|
|
13395
13403
|
});
|
|
13396
13404
|
}, fc = z1(({ autoComplete: t = "on", autoFocus: r, clearable: c, disabled: a, error: s, highlighted: d, id: o, label: m, max: n, min: i, onBlur: h, onChange: p, onClick: v, onKeyDown: g, onKeyUp: u, readOnly: w = !1, required: f = !1, success: y, type: b = "date", value: C }, _) => {
|
|
13397
|
-
const
|
|
13405
|
+
const k = c && C && !a && !w, R = X(null);
|
|
13398
13406
|
return /* @__PURE__ */ l("div", {
|
|
13399
13407
|
className: `input-date-wrapper${d ? " input-date-highlighted" : ""}`,
|
|
13400
13408
|
children: [
|
|
@@ -13413,12 +13421,12 @@ var tn = ({ name: t, size: r = "medium", shape: c = "rounded", className: a = ""
|
|
|
13413
13421
|
autoFocus: r,
|
|
13414
13422
|
disabled: a,
|
|
13415
13423
|
type: b === "date" ? "date" : "datetime-local",
|
|
13416
|
-
className: `input-date${s ? " input-date-error" : ""}${y ? " input-date-success" : ""}${
|
|
13424
|
+
className: `input-date${s ? " input-date-error" : ""}${y ? " input-date-success" : ""}${k ? " input-date--clearable" : ""}`,
|
|
13417
13425
|
id: o,
|
|
13418
13426
|
max: n,
|
|
13419
13427
|
min: i,
|
|
13420
13428
|
ref: (V) => {
|
|
13421
|
-
|
|
13429
|
+
R.current = V, typeof _ == "function" ? _(V) : _ && (_.current = V);
|
|
13422
13430
|
},
|
|
13423
13431
|
value: C ?? "",
|
|
13424
13432
|
onBlur: h,
|
|
@@ -13430,7 +13438,7 @@ var tn = ({ name: t, size: r = "medium", shape: c = "rounded", className: a = ""
|
|
|
13430
13438
|
required: f
|
|
13431
13439
|
}), /* @__PURE__ */ l("div", {
|
|
13432
13440
|
className: "input-date-actions",
|
|
13433
|
-
children: [
|
|
13441
|
+
children: [k && /* @__PURE__ */ e(J, {
|
|
13434
13442
|
title: "Clear date",
|
|
13435
13443
|
children: /* @__PURE__ */ e("button", {
|
|
13436
13444
|
type: "button",
|
|
@@ -13447,7 +13455,7 @@ var tn = ({ name: t, size: r = "medium", shape: c = "rounded", className: a = ""
|
|
|
13447
13455
|
type: "button",
|
|
13448
13456
|
className: "input-date-picker",
|
|
13449
13457
|
onClick: () => {
|
|
13450
|
-
const V =
|
|
13458
|
+
const V = R.current;
|
|
13451
13459
|
V && !a && !w && V.showPicker();
|
|
13452
13460
|
},
|
|
13453
13461
|
disabled: a || w,
|
|
@@ -14347,24 +14355,24 @@ var Nc = (t) => !Number.isFinite(t) || t >= 1 ? 0 : String(t).split(".")[1]?.len
|
|
|
14347
14355
|
})]
|
|
14348
14356
|
}, o.id ?? o.label ?? m))
|
|
14349
14357
|
]
|
|
14350
|
-
}), Hn = ({ width: t = "280px", className: r = "", isOpen: c, onClose: a, isMobile: s, showOverlay: d = !0, contained: o = !1, flush: m = !1, shadow: n = "none", header: i, navigation: h = [], actions: p = [], filters: v = [], filtersCount: g, collapsibleFilters: u = !1, onFilterChange: w, onClearFilters: f, options: y = [], onOptionChange: b, viewToggle: C, groupBy: _, visibleColumns:
|
|
14351
|
-
const
|
|
14352
|
-
}),
|
|
14358
|
+
}), Hn = ({ width: t = "280px", className: r = "", isOpen: c, onClose: a, isMobile: s, showOverlay: d = !0, contained: o = !1, flush: m = !1, shadow: n = "none", header: i, navigation: h = [], actions: p = [], filters: v = [], filtersCount: g, collapsibleFilters: u = !1, onFilterChange: w, onClearFilters: f, options: y = [], onOptionChange: b, viewToggle: C, groupBy: _, visibleColumns: k }) => {
|
|
14359
|
+
const R = u2(), z = s ?? R?.isMobile ?? !1, M = c ?? (z ? R?.isOpen ?? !1 : !0), V = a ?? R?.close ?? (() => {
|
|
14360
|
+
}), x = [
|
|
14353
14361
|
"control-panel",
|
|
14354
14362
|
M ? "control-panel--open" : "control-panel--closed",
|
|
14355
14363
|
z ? "control-panel--mobile" : "",
|
|
14356
14364
|
o ? "control-panel--contained" : "",
|
|
14357
14365
|
m ? "control-panel--flush" : "",
|
|
14358
14366
|
r
|
|
14359
|
-
].filter(Boolean).join(" "),
|
|
14367
|
+
].filter(Boolean).join(" "), L = ["control-panel__overlay", o ? "control-panel__overlay--contained" : ""].filter(Boolean).join(" "), H = {
|
|
14360
14368
|
"--control-panel-width": t,
|
|
14361
14369
|
"--control-panel-shadow": n
|
|
14362
|
-
}, A = y.length === 0 ? [] : "type" in y[0] ? [{ options: y }] : y, $ = !!(C || _ ||
|
|
14370
|
+
}, A = y.length === 0 ? [] : "type" in y[0] ? [{ options: y }] : y, $ = !!(C || _ || k || A.length > 0), F = v.length > 0 || g !== void 0 && g > 0, t1 = typeof u == "number" ? u : u ? 1 : 1 / 0, S = v.length >= t1, D = ["control-panel__filters", S ? "control-panel__filters--collapsible" : ""].filter(Boolean).join(" ");
|
|
14363
14371
|
return /* @__PURE__ */ l(h1, { children: [d && z && M && /* @__PURE__ */ e("div", {
|
|
14364
|
-
className:
|
|
14372
|
+
className: L,
|
|
14365
14373
|
onClick: V
|
|
14366
14374
|
}), /* @__PURE__ */ l("aside", {
|
|
14367
|
-
className:
|
|
14375
|
+
className: x,
|
|
14368
14376
|
style: H,
|
|
14369
14377
|
children: [
|
|
14370
14378
|
i && /* @__PURE__ */ e(Q2, {
|
|
@@ -14406,7 +14414,7 @@ var Nc = (t) => !Number.isFinite(t) || t >= 1 ? 0 : String(t).split(".")[1]?.len
|
|
|
14406
14414
|
})]
|
|
14407
14415
|
}), v.map((B) => /* @__PURE__ */ e(kc, {
|
|
14408
14416
|
filter: B,
|
|
14409
|
-
collapsible: B.collapsible ??
|
|
14417
|
+
collapsible: B.collapsible ?? S,
|
|
14410
14418
|
onChange: (U) => w?.(U)
|
|
14411
14419
|
}, B.id))]
|
|
14412
14420
|
}),
|
|
@@ -14417,7 +14425,7 @@ var Nc = (t) => !Number.isFinite(t) || t >= 1 ? 0 : String(t).split(".")[1]?.len
|
|
|
14417
14425
|
viewToggle: C,
|
|
14418
14426
|
onViewToggleComplete: z ? V : void 0,
|
|
14419
14427
|
groupBy: _,
|
|
14420
|
-
visibleColumns:
|
|
14428
|
+
visibleColumns: k
|
|
14421
14429
|
})
|
|
14422
14430
|
]
|
|
14423
14431
|
})] });
|
|
@@ -14488,8 +14496,8 @@ var Nc = (t) => !Number.isFinite(t) || t >= 1 ? 0 : String(t).split(".")[1]?.len
|
|
|
14488
14496
|
}, b = async () => {
|
|
14489
14497
|
try {
|
|
14490
14498
|
await $c(v), w("copied"), y(), m?.(v);
|
|
14491
|
-
} catch (
|
|
14492
|
-
w("error"), y(), n?.(
|
|
14499
|
+
} catch (k) {
|
|
14500
|
+
w("error"), y(), n?.(k);
|
|
14493
14501
|
}
|
|
14494
14502
|
}, C = u === "copied" ? c : u === "error" ? s : o, _ = u === "copied" && g === "ghost" ? "success" : u === "error" && g === "ghost" ? "danger" : g;
|
|
14495
14503
|
return /* @__PURE__ */ e(I, {
|
|
@@ -14587,25 +14595,25 @@ var Nc = (t) => !Number.isFinite(t) || t >= 1 ? 0 : String(t).split(".")[1]?.len
|
|
|
14587
14595
|
const { isAtLeast: h, isMobile: p } = f0(), v = X(null), [g, u] = N(p ? 0 : 2), w = P(() => {
|
|
14588
14596
|
const C = v.current, _ = C?.parentElement;
|
|
14589
14597
|
if (!C || !_) return;
|
|
14590
|
-
let
|
|
14591
|
-
for (const V of _.children) V !== C && (
|
|
14592
|
-
const
|
|
14598
|
+
let k = 0;
|
|
14599
|
+
for (const V of _.children) V !== C && (k += V.offsetWidth + H2);
|
|
14600
|
+
const R = _.clientWidth - k - ((h("desktop") ? Ic : Pc) * 2 + Tc * 2 + Gc * 2 + H2 * 6), z = Math.floor(R / 53), M = Math.min(Zc, Math.max(0, Math.floor(z / 2)));
|
|
14593
14601
|
u(M);
|
|
14594
14602
|
}, [h]);
|
|
14595
14603
|
Y(() => {
|
|
14596
14604
|
const C = v.current, _ = C?.parentElement;
|
|
14597
14605
|
if (!C || !_) return;
|
|
14598
|
-
const
|
|
14606
|
+
const k = new ResizeObserver(() => {
|
|
14599
14607
|
w();
|
|
14600
14608
|
});
|
|
14601
|
-
return
|
|
14609
|
+
return k.observe(C), k.observe(_), w(), () => k.disconnect();
|
|
14602
14610
|
}, [w]);
|
|
14603
14611
|
const f = d && o !== void 0 && m, y = d?.map((C) => ({
|
|
14604
14612
|
label: `${C}`,
|
|
14605
14613
|
value: C
|
|
14606
14614
|
})), b = () => {
|
|
14607
14615
|
const C = [], _ = [];
|
|
14608
|
-
for (let
|
|
14616
|
+
for (let k = Math.max(2, t - g); k <= Math.min(r - 1, t + g); k++) C.push(k);
|
|
14609
14617
|
return t - g > 2 ? _.push(1, "...") : _.push(1), _.push(...C), t + g < r - 1 ? _.push("...", r) : r > 1 && _.push(r), _;
|
|
14610
14618
|
};
|
|
14611
14619
|
return c !== void 0 && d?.length && c <= Math.min(...d) || r <= 1 && !f ? null : /* @__PURE__ */ l("div", {
|
|
@@ -14752,9 +14760,9 @@ var Nc = (t) => !Number.isFinite(t) || t >= 1 ? 0 : String(t).split(".")[1]?.len
|
|
|
14752
14760
|
}) : a;
|
|
14753
14761
|
};
|
|
14754
14762
|
function Xc({ data: t, columns: r, rowKey: c, card: a, actions: s, timeline: d, onRowClick: o, rowHref: m, rowClassName: n, empty: i, selectable: h, selectedIds: p = [], pinnedIds: v, onToggleSelect: g, cardMaxWidth: u, isMobile: w = !1, groups: f, showGroupCount: y = !0, collapsible: b = !1, collapsedGroups: C, onToggleGroup: _ }) {
|
|
14755
|
-
const
|
|
14756
|
-
id: d.idAccessor(
|
|
14757
|
-
date: d.dateAccessor(
|
|
14763
|
+
const k = r.filter((L) => !L.hideInCard && !(w && L.hideInMobile)), R = o1(() => new Set(v ?? []), [v]), z = `data-view__cards${u !== void 0 ? " data-view__cards--grid" : ""}`, M = u !== void 0 ? { "--data-view-card-max-width": qc(u) } : void 0, V = o1(() => d ? g2(t.map((L) => ({
|
|
14764
|
+
id: d.idAccessor(L),
|
|
14765
|
+
date: d.dateAccessor(L)
|
|
14758
14766
|
})), d.granularity) : /* @__PURE__ */ new Map(), [t, d]);
|
|
14759
14767
|
if (t.length === 0)
|
|
14760
14768
|
return i ? /* @__PURE__ */ e(r0, {
|
|
@@ -14764,11 +14772,11 @@ function Xc({ data: t, columns: r, rowKey: c, card: a, actions: s, timeline: d,
|
|
|
14764
14772
|
primary: i.primary,
|
|
14765
14773
|
secondary: i.secondary
|
|
14766
14774
|
}) : /* @__PURE__ */ e(r0, { title: "No data available" });
|
|
14767
|
-
const
|
|
14768
|
-
const A = V.get(H), $ = c(
|
|
14769
|
-
O.metaKey || O.ctrlKey || O.shiftKey || O.altKey || O.button !== 0 || o && (O.preventDefault(), o(
|
|
14775
|
+
const x = (L, H) => {
|
|
14776
|
+
const A = V.get(H), $ = c(L, H), F = h && p.includes($), t1 = R.has($), S = m?.(L), D = `data-view__card ${o || S ? "data-view__card--clickable" : ""} ${F ? "data-view__card--selected" : ""} ${t1 ? "data-view__card--pinned" : ""} ${n?.(L) || ""}`, B = (O) => {
|
|
14777
|
+
O.metaKey || O.ctrlKey || O.shiftKey || O.altKey || O.button !== 0 || o && (O.preventDefault(), o(L, O));
|
|
14770
14778
|
}, U = /* @__PURE__ */ l(h1, { children: [
|
|
14771
|
-
|
|
14779
|
+
t1 && /* @__PURE__ */ e(J, {
|
|
14772
14780
|
title: "Pinned",
|
|
14773
14781
|
children: /* @__PURE__ */ e("span", {
|
|
14774
14782
|
className: "data-view__card-pin",
|
|
@@ -14788,10 +14796,10 @@ function Xc({ data: t, columns: r, rowKey: c, card: a, actions: s, timeline: d,
|
|
|
14788
14796
|
}),
|
|
14789
14797
|
a?.media && /* @__PURE__ */ e("div", {
|
|
14790
14798
|
className: "data-view__card-media",
|
|
14791
|
-
children: a.media(
|
|
14799
|
+
children: a.media(L)
|
|
14792
14800
|
}),
|
|
14793
14801
|
a && (() => {
|
|
14794
|
-
const O = a.icon?.(
|
|
14802
|
+
const O = a.icon?.(L);
|
|
14795
14803
|
return /* @__PURE__ */ l("div", {
|
|
14796
14804
|
className: "data-view__card-header",
|
|
14797
14805
|
children: [/* @__PURE__ */ l("div", {
|
|
@@ -14803,55 +14811,55 @@ function Xc({ data: t, columns: r, rowKey: c, card: a, actions: s, timeline: d,
|
|
|
14803
14811
|
name: O
|
|
14804
14812
|
}), /* @__PURE__ */ e("span", {
|
|
14805
14813
|
className: "data-view__card-title",
|
|
14806
|
-
children: a.title(
|
|
14814
|
+
children: a.title(L)
|
|
14807
14815
|
})]
|
|
14808
14816
|
}), a.subtitle && /* @__PURE__ */ e("span", {
|
|
14809
14817
|
className: "data-view__card-subtitle",
|
|
14810
|
-
children: a.subtitle(
|
|
14818
|
+
children: a.subtitle(L)
|
|
14811
14819
|
})]
|
|
14812
14820
|
}), a.badges && /* @__PURE__ */ e("div", {
|
|
14813
14821
|
className: "data-view__card-badges",
|
|
14814
|
-
children: a.badges(
|
|
14822
|
+
children: a.badges(L)
|
|
14815
14823
|
})]
|
|
14816
14824
|
});
|
|
14817
14825
|
})(),
|
|
14818
|
-
|
|
14826
|
+
k.length > 0 && /* @__PURE__ */ e("div", {
|
|
14819
14827
|
className: "data-view__card-body",
|
|
14820
|
-
children:
|
|
14828
|
+
children: k.map((O) => /* @__PURE__ */ l("div", {
|
|
14821
14829
|
className: "data-view__card-field",
|
|
14822
14830
|
children: [/* @__PURE__ */ e("span", {
|
|
14823
14831
|
className: "data-view__card-label",
|
|
14824
14832
|
children: o3(O)
|
|
14825
14833
|
}), /* @__PURE__ */ e("span", {
|
|
14826
14834
|
className: "data-view__card-value",
|
|
14827
|
-
children: s3(O,
|
|
14835
|
+
children: s3(O, L)
|
|
14828
14836
|
})]
|
|
14829
14837
|
}, O.key))
|
|
14830
14838
|
}),
|
|
14831
14839
|
s && /* @__PURE__ */ e("div", {
|
|
14832
14840
|
className: "data-view__card-actions",
|
|
14833
14841
|
onClick: (O) => O.stopPropagation(),
|
|
14834
|
-
children: s(
|
|
14842
|
+
children: s(L)
|
|
14835
14843
|
})
|
|
14836
14844
|
] });
|
|
14837
|
-
return /* @__PURE__ */ l(w1.Fragment, { children: [A && /* @__PURE__ */ e(Yc, { marker: A }),
|
|
14845
|
+
return /* @__PURE__ */ l(w1.Fragment, { children: [A && /* @__PURE__ */ e(Yc, { marker: A }), S ? /* @__PURE__ */ e("a", {
|
|
14838
14846
|
className: D,
|
|
14839
|
-
href:
|
|
14847
|
+
href: S,
|
|
14840
14848
|
onClick: B,
|
|
14841
14849
|
children: U
|
|
14842
14850
|
}) : /* @__PURE__ */ e("div", {
|
|
14843
14851
|
className: D,
|
|
14844
|
-
onClick: o ? (O) => o(
|
|
14852
|
+
onClick: o ? (O) => o(L, O) : void 0,
|
|
14845
14853
|
children: U
|
|
14846
14854
|
})] }, $);
|
|
14847
14855
|
};
|
|
14848
14856
|
if (f) {
|
|
14849
|
-
let
|
|
14857
|
+
let L = 0;
|
|
14850
14858
|
return /* @__PURE__ */ e("div", {
|
|
14851
14859
|
className: "data-view__groups",
|
|
14852
14860
|
children: f.map((H) => {
|
|
14853
|
-
const A =
|
|
14854
|
-
|
|
14861
|
+
const A = L;
|
|
14862
|
+
L += H.items.length;
|
|
14855
14863
|
const $ = b && C?.has(H.key);
|
|
14856
14864
|
return /* @__PURE__ */ l("section", {
|
|
14857
14865
|
className: "data-view__group",
|
|
@@ -14876,7 +14884,7 @@ function Xc({ data: t, columns: r, rowKey: c, card: a, actions: s, timeline: d,
|
|
|
14876
14884
|
}), !$ && /* @__PURE__ */ e("div", {
|
|
14877
14885
|
className: z,
|
|
14878
14886
|
style: M,
|
|
14879
|
-
children: H.items.map((F,
|
|
14887
|
+
children: H.items.map((F, t1) => x(F, A + t1))
|
|
14880
14888
|
})]
|
|
14881
14889
|
}, H.key ?? "__null__");
|
|
14882
14890
|
})
|
|
@@ -14885,7 +14893,7 @@ function Xc({ data: t, columns: r, rowKey: c, card: a, actions: s, timeline: d,
|
|
|
14885
14893
|
return /* @__PURE__ */ e("div", {
|
|
14886
14894
|
className: z,
|
|
14887
14895
|
style: M,
|
|
14888
|
-
children: t.map((
|
|
14896
|
+
children: t.map((L, H) => x(L, H))
|
|
14889
14897
|
});
|
|
14890
14898
|
}
|
|
14891
14899
|
function Kc({ config: t }) {
|
|
@@ -14997,26 +15005,26 @@ function el({ state: t }) {
|
|
|
14997
15005
|
children: /* @__PURE__ */ e(G, { name: t === "asc" ? "arrow-up" : t === "desc" ? "arrow-down" : "arrow-bidirectional-vertical" })
|
|
14998
15006
|
});
|
|
14999
15007
|
}
|
|
15000
|
-
function An({ columns: t, data: r, rowKey: c, pinnedIds: a, selectable: s = !1, onSelectionChange: d, selectedIds: o, pageSizeOptions: m = R2, initialPageSize: n = R2[1], showPageSize: i = !0, card: h, actions: p, actionsWidth: v, timeline: g, onRowClick: u, rowHref: w, rowClassName: f, rowDetail: y, empty: b, initialSortKey: C = null, initialSortDirection: _ = "asc", sortKey:
|
|
15001
|
-
const { isMobile: K } = f0(), [e1,
|
|
15008
|
+
function An({ columns: t, data: r, rowKey: c, pinnedIds: a, selectable: s = !1, onSelectionChange: d, selectedIds: o, pageSizeOptions: m = R2, initialPageSize: n = R2[1], showPageSize: i = !0, card: h, actions: p, actionsWidth: v, timeline: g, onRowClick: u, rowHref: w, rowClassName: f, rowDetail: y, empty: b, initialSortKey: C = null, initialSortDirection: _ = "asc", sortKey: k, sortDirection: R, onSortChange: z, miniSort: M, showCardSortControls: V = !0, desktopView: x = "table", cardMaxWidth: L, className: H, onPageChange: A, onPageSizeChange: $, currentPage: F, totalItems: t1, group: S, showResultsCount: D = !0, totalCount: B, itemNoun: U, columnSelector: O }) {
|
|
15009
|
+
const { isMobile: K } = f0(), [e1, c1] = N(C), [q, u1] = N(_), [g1, b1] = N([]), f1 = o ?? g1, [B1, l1] = N(1), m1 = F ?? B1, [E, j] = N(n), [s1, p1] = N(() => t.reduce((T, i1) => (i1.width && (T[i1.key] = i1.width), T), {})), [x1, _1] = N(/* @__PURE__ */ new Set()), E1 = (T) => {
|
|
15002
15010
|
_1((i1) => {
|
|
15003
15011
|
const v1 = new Set(i1);
|
|
15004
15012
|
return v1.has(T) ? v1.delete(T) : v1.add(T), v1;
|
|
15005
15013
|
});
|
|
15006
15014
|
}, P1 = (T, i1) => c?.(T, i1) ?? i1, Q1 = (T) => {
|
|
15007
15015
|
F === void 0 && l1(T), A?.(T);
|
|
15008
|
-
}, N1 =
|
|
15009
|
-
|
|
15016
|
+
}, N1 = k !== void 0 ? k : e1, H1 = R ?? q, G1 = (T, i1) => {
|
|
15017
|
+
k === void 0 && c1(T), R === void 0 && u1(i1), z?.({
|
|
15010
15018
|
key: T,
|
|
15011
15019
|
direction: i1
|
|
15012
15020
|
}), Q1(1);
|
|
15013
15021
|
}, i0 = o1(() => new Set(a ?? []), [a]), L1 = o1(() => {
|
|
15014
15022
|
let T = r;
|
|
15015
15023
|
if (N1) {
|
|
15016
|
-
const
|
|
15017
|
-
if (
|
|
15018
|
-
const a1 =
|
|
15019
|
-
const S1 = A1[
|
|
15024
|
+
const r1 = t.find((a1) => a1.key === N1);
|
|
15025
|
+
if (r1) {
|
|
15026
|
+
const a1 = r1.sortAccessor || r1.accessor || ((A1) => {
|
|
15027
|
+
const S1 = A1[r1.key];
|
|
15020
15028
|
return typeof S1 == "string" || typeof S1 == "number" ? S1 : "";
|
|
15021
15029
|
}), C1 = [...r].sort((A1, S1) => {
|
|
15022
15030
|
const I1 = a1(A1), k1 = a1(S1);
|
|
@@ -15027,11 +15035,11 @@ function An({ columns: t, data: r, rowKey: c, pinnedIds: a, selectable: s = !1,
|
|
|
15027
15035
|
}
|
|
15028
15036
|
if (i0.size === 0) return T;
|
|
15029
15037
|
const i1 = [], v1 = [];
|
|
15030
|
-
if (T.forEach((
|
|
15031
|
-
i0.has(P1(
|
|
15038
|
+
if (T.forEach((r1, a1) => {
|
|
15039
|
+
i0.has(P1(r1, a1)) ? i1.push(r1) : v1.push(r1);
|
|
15032
15040
|
}), a && a.length > 1 && i1.length > 1) {
|
|
15033
|
-
const
|
|
15034
|
-
i1.sort((a1, C1) => (
|
|
15041
|
+
const r1 = new Map(a.map((a1, C1) => [a1, C1]));
|
|
15042
|
+
i1.sort((a1, C1) => (r1.get(P1(a1, 0)) ?? 0) - (r1.get(P1(C1, 0)) ?? 0));
|
|
15035
15043
|
}
|
|
15036
15044
|
return [...i1, ...v1];
|
|
15037
15045
|
}, [
|
|
@@ -15041,50 +15049,50 @@ function An({ columns: t, data: r, rowKey: c, pinnedIds: a, selectable: s = !1,
|
|
|
15041
15049
|
N1,
|
|
15042
15050
|
i0,
|
|
15043
15051
|
a
|
|
15044
|
-
]), T1 =
|
|
15045
|
-
if (!
|
|
15052
|
+
]), T1 = t1 !== void 0, U1 = o1(() => {
|
|
15053
|
+
if (!S || T1) return L1;
|
|
15046
15054
|
const T = /* @__PURE__ */ new Map(), i1 = [];
|
|
15047
|
-
L1.forEach((
|
|
15048
|
-
const a1 =
|
|
15049
|
-
C1 ? C1.push(
|
|
15055
|
+
L1.forEach((r1) => {
|
|
15056
|
+
const a1 = S.groupBy(r1), C1 = T.get(a1);
|
|
15057
|
+
C1 ? C1.push(r1) : (T.set(a1, [r1]), i1.push(a1));
|
|
15050
15058
|
});
|
|
15051
|
-
const v1 = i1.map((
|
|
15052
|
-
const a1 = T.get(
|
|
15059
|
+
const v1 = i1.map((r1) => {
|
|
15060
|
+
const a1 = T.get(r1);
|
|
15053
15061
|
return {
|
|
15054
|
-
key:
|
|
15055
|
-
label:
|
|
15062
|
+
key: r1,
|
|
15063
|
+
label: S.groupLabel(r1),
|
|
15056
15064
|
items: a1,
|
|
15057
15065
|
totalCount: a1.length
|
|
15058
15066
|
};
|
|
15059
15067
|
});
|
|
15060
|
-
return
|
|
15068
|
+
return S.sortGroups ? v1.sort(S.sortGroups) : v1.sort((r1, a1) => r1.key === null ? 1 : a1.key === null ? -1 : 0), v1.flatMap((r1) => r1.items);
|
|
15061
15069
|
}, [
|
|
15062
|
-
|
|
15070
|
+
S,
|
|
15063
15071
|
T1,
|
|
15064
15072
|
L1
|
|
15065
|
-
]), J1 = T1 ?
|
|
15066
|
-
if (!
|
|
15073
|
+
]), J1 = T1 ? t1 : U1.length, e0 = Math.max(1, Math.ceil(J1 / E)), W = Math.min(m1, e0), Z = T1 ? U1 : U1.slice((W - 1) * E, W * E), Q = D ? Ec(E, J1, B ?? J1, W, U) : null, n1 = o1(() => {
|
|
15074
|
+
if (!S) return null;
|
|
15067
15075
|
const T = /* @__PURE__ */ new Map();
|
|
15068
15076
|
return U1.forEach((i1) => {
|
|
15069
|
-
const v1 =
|
|
15077
|
+
const v1 = S.groupBy(i1);
|
|
15070
15078
|
T.set(v1, (T.get(v1) ?? 0) + 1);
|
|
15071
15079
|
}), T;
|
|
15072
|
-
}, [
|
|
15073
|
-
if (!
|
|
15080
|
+
}, [S, U1]), O1 = o1(() => {
|
|
15081
|
+
if (!S || !n1) return null;
|
|
15074
15082
|
const T = /* @__PURE__ */ new Map(), i1 = [];
|
|
15075
|
-
Z.forEach((
|
|
15076
|
-
const a1 =
|
|
15077
|
-
C1 ? C1.push(
|
|
15083
|
+
Z.forEach((r1) => {
|
|
15084
|
+
const a1 = S.groupBy(r1), C1 = T.get(a1);
|
|
15085
|
+
C1 ? C1.push(r1) : (T.set(a1, [r1]), i1.push(a1));
|
|
15078
15086
|
});
|
|
15079
|
-
const v1 = i1.map((
|
|
15080
|
-
key:
|
|
15081
|
-
label:
|
|
15082
|
-
items: T.get(
|
|
15083
|
-
totalCount: n1.get(
|
|
15087
|
+
const v1 = i1.map((r1) => ({
|
|
15088
|
+
key: r1,
|
|
15089
|
+
label: S.groupLabel(r1),
|
|
15090
|
+
items: T.get(r1),
|
|
15091
|
+
totalCount: n1.get(r1) ?? 0
|
|
15084
15092
|
}));
|
|
15085
|
-
return
|
|
15093
|
+
return S.sortGroups ? v1.sort(S.sortGroups) : v1.sort((r1, a1) => r1.key === null ? 1 : a1.key === null ? -1 : 0), v1;
|
|
15086
15094
|
}, [
|
|
15087
|
-
|
|
15095
|
+
S,
|
|
15088
15096
|
n1,
|
|
15089
15097
|
Z
|
|
15090
15098
|
]), R0 = o1(() => g ? g2(Z.map((T) => ({
|
|
@@ -15096,11 +15104,11 @@ function An({ columns: t, data: r, rowKey: c, pinnedIds: a, selectable: s = !1,
|
|
|
15096
15104
|
T.sortable && (N1 === T.key ? G1(T.key, H1 === "asc" ? "desc" : "asc") : G1(T.key, "asc"));
|
|
15097
15105
|
}, C0 = (T, i1) => {
|
|
15098
15106
|
T.preventDefault();
|
|
15099
|
-
const v1 = T.clientX,
|
|
15107
|
+
const v1 = T.clientX, r1 = s1[i1] ?? 150, a1 = (A1) => {
|
|
15100
15108
|
const S1 = A1.clientX - v1, I1 = t.find((k1) => k1.key === i1)?.minWidth ?? 120;
|
|
15101
15109
|
p1((k1) => ({
|
|
15102
15110
|
...k1,
|
|
15103
|
-
[i1]: Math.max(I1,
|
|
15111
|
+
[i1]: Math.max(I1, r1 + S1)
|
|
15104
15112
|
}));
|
|
15105
15113
|
}, C1 = () => {
|
|
15106
15114
|
window.removeEventListener("mousemove", a1), window.removeEventListener("mouseup", C1);
|
|
@@ -15126,7 +15134,7 @@ function An({ columns: t, data: r, rowKey: c, pinnedIds: a, selectable: s = !1,
|
|
|
15126
15134
|
y2
|
|
15127
15135
|
]
|
|
15128
15136
|
}) : null;
|
|
15129
|
-
if (
|
|
15137
|
+
if (x !== "cards" && t.length === 0) return /* @__PURE__ */ l("div", {
|
|
15130
15138
|
className: `data-view${H ? ` ${H}` : ""}`,
|
|
15131
15139
|
children: [W0, /* @__PURE__ */ e("div", {
|
|
15132
15140
|
className: "data-view__wrapper data-view__wrapper--empty",
|
|
@@ -15136,7 +15144,7 @@ function An({ columns: t, data: r, rowKey: c, pinnedIds: a, selectable: s = !1,
|
|
|
15136
15144
|
})
|
|
15137
15145
|
})]
|
|
15138
15146
|
});
|
|
15139
|
-
if (
|
|
15147
|
+
if (x === "cards") return /* @__PURE__ */ l("div", {
|
|
15140
15148
|
className: `data-view data-view--cards${H ? ` ${H}` : ""}`,
|
|
15141
15149
|
children: [
|
|
15142
15150
|
W0,
|
|
@@ -15195,11 +15203,11 @@ function An({ columns: t, data: r, rowKey: c, pinnedIds: a, selectable: s = !1,
|
|
|
15195
15203
|
selectable: s,
|
|
15196
15204
|
selectedIds: f1,
|
|
15197
15205
|
pinnedIds: a,
|
|
15198
|
-
cardMaxWidth:
|
|
15206
|
+
cardMaxWidth: L,
|
|
15199
15207
|
isMobile: K,
|
|
15200
15208
|
groups: O1 ?? void 0,
|
|
15201
|
-
showGroupCount:
|
|
15202
|
-
collapsible:
|
|
15209
|
+
showGroupCount: S?.showCount !== !1,
|
|
15210
|
+
collapsible: S?.collapsible,
|
|
15203
15211
|
collapsedGroups: x1,
|
|
15204
15212
|
onToggleGroup: E1,
|
|
15205
15213
|
onToggleSelect: (T, i1) => {
|
|
@@ -15280,22 +15288,22 @@ function An({ columns: t, data: r, rowKey: c, pinnedIds: a, selectable: s = !1,
|
|
|
15280
15288
|
secondary: b.secondary
|
|
15281
15289
|
}) : /* @__PURE__ */ e(r0, { title: "No data available" })
|
|
15282
15290
|
}) });
|
|
15283
|
-
const T = b0.length + (s0 ? 1 : 0) + (s ? 1 : 0) + (p ? 1 : 0), i1 =
|
|
15284
|
-
const C1 = P1(
|
|
15291
|
+
const T = b0.length + (s0 ? 1 : 0) + (s ? 1 : 0) + (p ? 1 : 0), i1 = S?.showCount !== !1, v1 = (r1, a1) => {
|
|
15292
|
+
const C1 = P1(r1, a1), A1 = f1.includes(C1), S1 = i0.has(C1), I1 = R0.get(a1), k1 = w?.(r1), M2 = !!u || !!k1, T3 = (M1) => {
|
|
15285
15293
|
if (k1 && (M1.metaKey || M1.ctrlKey || M1.shiftKey)) {
|
|
15286
15294
|
window.open(k1, "_blank", "noopener,noreferrer");
|
|
15287
15295
|
return;
|
|
15288
15296
|
}
|
|
15289
15297
|
if (u) {
|
|
15290
|
-
u(
|
|
15298
|
+
u(r1, M1);
|
|
15291
15299
|
return;
|
|
15292
15300
|
}
|
|
15293
15301
|
k1 && window.location.assign(k1);
|
|
15294
15302
|
}, I3 = (M1) => {
|
|
15295
15303
|
M1.button !== 1 || !k1 || (M1.preventDefault(), window.open(k1, "_blank", "noopener,noreferrer"));
|
|
15296
|
-
}, F0 = y?.(
|
|
15304
|
+
}, F0 = y?.(r1);
|
|
15297
15305
|
return /* @__PURE__ */ l(w1.Fragment, { children: [/* @__PURE__ */ l("tr", {
|
|
15298
|
-
className: `${A1 ? "is-selected" : ""} ${M2 ? "data-view__row--clickable" : ""} ${S1 ? "data-view__row--pinned" : ""} ${f?.(
|
|
15306
|
+
className: `${A1 ? "is-selected" : ""} ${M2 ? "data-view__row--clickable" : ""} ${S1 ? "data-view__row--pinned" : ""} ${f?.(r1) || ""}`,
|
|
15299
15307
|
onClick: M2 ? T3 : void 0,
|
|
15300
15308
|
onAuxClick: k1 ? I3 : void 0,
|
|
15301
15309
|
children: [
|
|
@@ -15321,7 +15329,7 @@ function An({ columns: t, data: r, rowKey: c, pinnedIds: a, selectable: s = !1,
|
|
|
15321
15329
|
name: "pin",
|
|
15322
15330
|
size: "sm"
|
|
15323
15331
|
})
|
|
15324
|
-
}), s3(M1,
|
|
15332
|
+
}), s3(M1, r1)]
|
|
15325
15333
|
}, M1.key)),
|
|
15326
15334
|
p && /* @__PURE__ */ e("td", {
|
|
15327
15335
|
className: "data-view__actions-cell",
|
|
@@ -15329,7 +15337,7 @@ function An({ columns: t, data: r, rowKey: c, pinnedIds: a, selectable: s = !1,
|
|
|
15329
15337
|
children: /* @__PURE__ */ e("div", {
|
|
15330
15338
|
className: "data-view__table-actions",
|
|
15331
15339
|
onClick: (M1) => M1.stopPropagation(),
|
|
15332
|
-
children: p(
|
|
15340
|
+
children: p(r1)
|
|
15333
15341
|
})
|
|
15334
15342
|
})
|
|
15335
15343
|
]
|
|
@@ -15343,14 +15351,14 @@ function An({ columns: t, data: r, rowKey: c, pinnedIds: a, selectable: s = !1,
|
|
|
15343
15351
|
})] }, C1);
|
|
15344
15352
|
};
|
|
15345
15353
|
if (O1) {
|
|
15346
|
-
let
|
|
15354
|
+
let r1 = 0;
|
|
15347
15355
|
return O1.map((a1) => {
|
|
15348
|
-
const C1 =
|
|
15349
|
-
|
|
15350
|
-
const A1 =
|
|
15356
|
+
const C1 = r1;
|
|
15357
|
+
r1 += a1.items.length;
|
|
15358
|
+
const A1 = S?.collapsible && x1.has(a1.key);
|
|
15351
15359
|
return /* @__PURE__ */ l(w1.Fragment, { children: [/* @__PURE__ */ e("tr", {
|
|
15352
|
-
className: `data-view__group-row${
|
|
15353
|
-
onClick:
|
|
15360
|
+
className: `data-view__group-row${S?.collapsible ? " data-view__group-row--collapsible" : ""}`,
|
|
15361
|
+
onClick: S?.collapsible ? () => E1(a1.key) : void 0,
|
|
15354
15362
|
children: /* @__PURE__ */ l("td", {
|
|
15355
15363
|
colSpan: T,
|
|
15356
15364
|
className: "data-view__group-cell",
|
|
@@ -15363,7 +15371,7 @@ function An({ columns: t, data: r, rowKey: c, pinnedIds: a, selectable: s = !1,
|
|
|
15363
15371
|
className: "data-view__group-count",
|
|
15364
15372
|
children: a1.items.length === a1.totalCount ? a1.totalCount : `${a1.items.length} of ${a1.totalCount}`
|
|
15365
15373
|
}),
|
|
15366
|
-
|
|
15374
|
+
S?.collapsible && /* @__PURE__ */ e(G, {
|
|
15367
15375
|
className: "data-view__group-chevron",
|
|
15368
15376
|
name: A1 ? "caret-down" : "caret-up",
|
|
15369
15377
|
size: "sm"
|
|
@@ -15373,7 +15381,7 @@ function An({ columns: t, data: r, rowKey: c, pinnedIds: a, selectable: s = !1,
|
|
|
15373
15381
|
}), !A1 && a1.items.map((S1, I1) => v1(S1, C1 + I1))] }, a1.key ?? "__null__");
|
|
15374
15382
|
});
|
|
15375
15383
|
}
|
|
15376
|
-
return Z.map((
|
|
15384
|
+
return Z.map((r1, a1) => v1(r1, a1));
|
|
15377
15385
|
})() })] })
|
|
15378
15386
|
}),
|
|
15379
15387
|
/* @__PURE__ */ e(S2, {
|
|
@@ -15405,9 +15413,9 @@ var t0 = (t) => {
|
|
|
15405
15413
|
const [i, h] = N({}), [p, v] = N(() => /* @__PURE__ */ new Date()), [g, u] = N(null), [w, f] = N(d), [y, b] = N({
|
|
15406
15414
|
position: "fixed",
|
|
15407
15415
|
visibility: "hidden"
|
|
15408
|
-
}), [C, _] = N(r?.start ?? ""), [
|
|
15409
|
-
start:
|
|
15410
|
-
end:
|
|
15416
|
+
}), [C, _] = N(r?.start ?? ""), [k, R] = N(r?.end ?? ""), z = X(null), M = X(null), V = r ?? i, x = t0(V.start), L = t0(V.end), H = x && L ? {
|
|
15417
|
+
start: x,
|
|
15418
|
+
end: L
|
|
15411
15419
|
} : void 0, A = (q) => {
|
|
15412
15420
|
r || h(q), c?.(q);
|
|
15413
15421
|
}, $ = (q) => {
|
|
@@ -15417,16 +15425,16 @@ var t0 = (t) => {
|
|
|
15417
15425
|
}), u(null), !d && o && f(!1));
|
|
15418
15426
|
}, F = (q) => {
|
|
15419
15427
|
u(q);
|
|
15420
|
-
},
|
|
15421
|
-
|
|
15428
|
+
}, t1 = (q) => /^\d{4}-\d{2}-\d{2}$/.test(q) && t0(q) !== void 0, S = () => {
|
|
15429
|
+
t1(C) ? A({
|
|
15422
15430
|
...V,
|
|
15423
15431
|
start: C
|
|
15424
15432
|
}) : _(V.start ?? "");
|
|
15425
15433
|
}, D = () => {
|
|
15426
|
-
|
|
15434
|
+
t1(k) ? A({
|
|
15427
15435
|
...V,
|
|
15428
|
-
end:
|
|
15429
|
-
}) :
|
|
15436
|
+
end: k
|
|
15437
|
+
}) : R(V.end ?? "");
|
|
15430
15438
|
}, B = (q) => {
|
|
15431
15439
|
const u1 = /* @__PURE__ */ new Date(), g1 = /* @__PURE__ */ new Date();
|
|
15432
15440
|
g1.setDate(g1.getDate() - q), A({
|
|
@@ -15437,7 +15445,7 @@ var t0 = (t) => {
|
|
|
15437
15445
|
Y(() => {
|
|
15438
15446
|
_(V.start ?? "");
|
|
15439
15447
|
}, [V.start]), Y(() => {
|
|
15440
|
-
|
|
15448
|
+
R(V.end ?? "");
|
|
15441
15449
|
}, [V.end]);
|
|
15442
15450
|
const U = o1(() => g0(p, 1), [p]), O = d || w, K = !d && w, e1 = P(() => {
|
|
15443
15451
|
if (!K || !z.current || !M.current) return;
|
|
@@ -15475,7 +15483,7 @@ var t0 = (t) => {
|
|
|
15475
15483
|
document.removeEventListener("mousedown", q), document.removeEventListener("keydown", u1);
|
|
15476
15484
|
};
|
|
15477
15485
|
}, [K]);
|
|
15478
|
-
const
|
|
15486
|
+
const c1 = /* @__PURE__ */ l("div", {
|
|
15479
15487
|
className: "date-range-picker__calendar",
|
|
15480
15488
|
children: [/* @__PURE__ */ l("div", {
|
|
15481
15489
|
className: "date-range-picker__nav",
|
|
@@ -15575,17 +15583,17 @@ var t0 = (t) => {
|
|
|
15575
15583
|
placeholder: "YYYY-MM-DD",
|
|
15576
15584
|
maxLength: 10,
|
|
15577
15585
|
onChange: _,
|
|
15578
|
-
onBlur:
|
|
15586
|
+
onBlur: S
|
|
15579
15587
|
}),
|
|
15580
15588
|
/* @__PURE__ */ e("span", {
|
|
15581
15589
|
className: "date-range-picker__separator",
|
|
15582
15590
|
children: "to"
|
|
15583
15591
|
}),
|
|
15584
15592
|
/* @__PURE__ */ e(V1, {
|
|
15585
|
-
value:
|
|
15593
|
+
value: k,
|
|
15586
15594
|
placeholder: "YYYY-MM-DD",
|
|
15587
15595
|
maxLength: 10,
|
|
15588
|
-
onChange:
|
|
15596
|
+
onChange: R,
|
|
15589
15597
|
onBlur: D
|
|
15590
15598
|
}),
|
|
15591
15599
|
!d && /* @__PURE__ */ e(I, {
|
|
@@ -15596,12 +15604,12 @@ var t0 = (t) => {
|
|
|
15596
15604
|
})
|
|
15597
15605
|
]
|
|
15598
15606
|
}),
|
|
15599
|
-
d && O &&
|
|
15607
|
+
d && O && c1,
|
|
15600
15608
|
K && K1(/* @__PURE__ */ e("div", {
|
|
15601
15609
|
ref: M,
|
|
15602
15610
|
className: "date-range-picker__overlay",
|
|
15603
15611
|
style: y,
|
|
15604
|
-
children:
|
|
15612
|
+
children: c1
|
|
15605
15613
|
}), document.body)
|
|
15606
15614
|
]
|
|
15607
15615
|
});
|
|
@@ -15870,23 +15878,23 @@ var nl = ({ text: t }) => /* @__PURE__ */ e(h1, { children: o1(() => al(t), [t])
|
|
|
15870
15878
|
});
|
|
15871
15879
|
}, il = 1e3, B2 = 0, d3 = ({ isOpen: t, onClose: r, position: c = "left", width: a = "320px", maxWidth: s = "none", margin: d = 0, borderRadius: o = 0, shadow: m = "none", children: n, title: i, icon: h, className: p = "", showOverlay: v = !0, lockScroll: g = !0, hideClose: u = !1, actions: w = [], onBack: f, backLabel: y = "Back", primary: b, secondary: C, footer: _ }) => {
|
|
15872
15880
|
Y2(t && g);
|
|
15873
|
-
const [
|
|
15881
|
+
const [k, R] = N(0);
|
|
15874
15882
|
if (Y(() => {
|
|
15875
|
-
t && (B2 += 1,
|
|
15883
|
+
t && (B2 += 1, R(B2));
|
|
15876
15884
|
}, [t]), Y(() => {
|
|
15877
|
-
const
|
|
15885
|
+
const L = (H) => {
|
|
15878
15886
|
H.key === "Escape" && t && r();
|
|
15879
15887
|
};
|
|
15880
|
-
return document.addEventListener("keydown",
|
|
15888
|
+
return document.addEventListener("keydown", L), () => document.removeEventListener("keydown", L);
|
|
15881
15889
|
}, [t, r]), !t) return null;
|
|
15882
|
-
const z = (
|
|
15890
|
+
const z = (L) => typeof L == "number" ? `${L}px` : L, M = il + k * 2, V = {
|
|
15883
15891
|
"--drawer-width": a,
|
|
15884
15892
|
"--drawer-max-width": z(s),
|
|
15885
15893
|
"--drawer-margin": z(d),
|
|
15886
15894
|
"--drawer-border-radius": z(o),
|
|
15887
15895
|
"--drawer-shadow": m,
|
|
15888
15896
|
zIndex: M + 1
|
|
15889
|
-
},
|
|
15897
|
+
}, x = _ || b || C;
|
|
15890
15898
|
return /* @__PURE__ */ l(h1, { children: [v && /* @__PURE__ */ e("div", {
|
|
15891
15899
|
className: "drawer-overlay",
|
|
15892
15900
|
onClick: r,
|
|
@@ -15918,21 +15926,21 @@ var nl = ({ text: t }) => /* @__PURE__ */ e(h1, { children: o1(() => al(t), [t])
|
|
|
15918
15926
|
}),
|
|
15919
15927
|
w.length > 0 && /* @__PURE__ */ e("div", {
|
|
15920
15928
|
className: "drawer__header-actions",
|
|
15921
|
-
children: w.map((
|
|
15929
|
+
children: w.map((L) => {
|
|
15922
15930
|
const H = /* @__PURE__ */ e(I, {
|
|
15923
|
-
disabled:
|
|
15924
|
-
onClick:
|
|
15925
|
-
icon:
|
|
15926
|
-
emojiIcon:
|
|
15927
|
-
size:
|
|
15928
|
-
variant:
|
|
15929
|
-
children:
|
|
15930
|
-
}), A =
|
|
15931
|
+
disabled: L.disabled,
|
|
15932
|
+
onClick: L.onClick,
|
|
15933
|
+
icon: L.icon,
|
|
15934
|
+
emojiIcon: L.emojiIcon,
|
|
15935
|
+
size: L.size ?? "small",
|
|
15936
|
+
variant: L.variant ?? "ghost",
|
|
15937
|
+
children: L.label
|
|
15938
|
+
}), A = L.title ?? L.label;
|
|
15931
15939
|
return A ? /* @__PURE__ */ e(J, {
|
|
15932
15940
|
title: A,
|
|
15933
15941
|
position: "bottom",
|
|
15934
15942
|
children: H
|
|
15935
|
-
},
|
|
15943
|
+
}, L.id) : /* @__PURE__ */ e(w1.Fragment, { children: H }, L.id);
|
|
15936
15944
|
})
|
|
15937
15945
|
}),
|
|
15938
15946
|
!u && /* @__PURE__ */ e(J, {
|
|
@@ -15951,7 +15959,7 @@ var nl = ({ text: t }) => /* @__PURE__ */ e(h1, { children: o1(() => al(t), [t])
|
|
|
15951
15959
|
className: "drawer__content",
|
|
15952
15960
|
children: n
|
|
15953
15961
|
}),
|
|
15954
|
-
|
|
15962
|
+
x && /* @__PURE__ */ l("div", {
|
|
15955
15963
|
className: "drawer__footer",
|
|
15956
15964
|
children: [_ && /* @__PURE__ */ e("div", {
|
|
15957
15965
|
className: "drawer__footer-content",
|
|
@@ -21226,31 +21234,31 @@ var r2 = [
|
|
|
21226
21234
|
"Sat"
|
|
21227
21235
|
];
|
|
21228
21236
|
function xl({ date: t, dragEnabled: r, draggingId: c, emptyLabel: a, events: s, firstDayOfWeek: d, maxEventsPerDay: o, onDayClick: m, onDragEnd: n, onDragStart: i, onDrop: h, onEventClick: p, renderEvent: v }) {
|
|
21229
|
-
const [g, u] = N(null), [w, f] = N(null), y = o1(() => e3(t.getFullYear(), t.getMonth(), d), [t, d]), b = o1(() => y.flat(), [y]), C = o1(() => p3(s, b), [s, b]), _ = o1(() => new Map(C.map((
|
|
21230
|
-
|
|
21231
|
-
}, V = (
|
|
21232
|
-
!r || c === null || (
|
|
21237
|
+
const [g, u] = N(null), [w, f] = N(null), y = o1(() => e3(t.getFullYear(), t.getMonth(), d), [t, d]), b = o1(() => y.flat(), [y]), C = o1(() => p3(s, b), [s, b]), _ = o1(() => new Map(C.map((x) => [x.date.toDateString(), x])), [C]), k = o1(() => d === 1 ? [...r2.slice(1), r2[0]] : r2, [d]), R = t.getMonth(), z = s.length > 0, M = (x, L) => {
|
|
21238
|
+
x.preventDefault(), f(null), h(L, !0);
|
|
21239
|
+
}, V = (x, L) => {
|
|
21240
|
+
!r || c === null || (x.preventDefault(), x.dataTransfer.dropEffect = "move", f(L));
|
|
21233
21241
|
};
|
|
21234
21242
|
return /* @__PURE__ */ l("div", {
|
|
21235
21243
|
className: "event-calendar__month",
|
|
21236
21244
|
children: [
|
|
21237
21245
|
/* @__PURE__ */ e("div", {
|
|
21238
21246
|
className: "event-calendar__weekdays",
|
|
21239
|
-
children:
|
|
21247
|
+
children: k.map((x) => /* @__PURE__ */ e("div", {
|
|
21240
21248
|
className: "event-calendar__weekday",
|
|
21241
|
-
children:
|
|
21242
|
-
},
|
|
21249
|
+
children: x
|
|
21250
|
+
}, x))
|
|
21243
21251
|
}),
|
|
21244
21252
|
/* @__PURE__ */ e("div", {
|
|
21245
21253
|
className: "event-calendar__weeks",
|
|
21246
|
-
children: y.map((
|
|
21254
|
+
children: y.map((x, L) => /* @__PURE__ */ e("div", {
|
|
21247
21255
|
className: "event-calendar__week",
|
|
21248
|
-
children:
|
|
21249
|
-
const A = H.toDateString(), $ = _.get(A), F = $ ? [...$.allDay, ...$.timed] : [],
|
|
21256
|
+
children: x.map((H) => {
|
|
21257
|
+
const A = H.toDateString(), $ = _.get(A), F = $ ? [...$.allDay, ...$.timed] : [], t1 = g === A, S = t1 ? F : F.slice(0, o), D = F.length - S.length;
|
|
21250
21258
|
return /* @__PURE__ */ l("div", {
|
|
21251
21259
|
className: [
|
|
21252
21260
|
"event-calendar__day",
|
|
21253
|
-
H.getMonth() ===
|
|
21261
|
+
H.getMonth() === R ? "" : "event-calendar__day--outside",
|
|
21254
21262
|
D0(H) ? "event-calendar__day--today" : "",
|
|
21255
21263
|
d2(H) ? "event-calendar__day--weekend" : "",
|
|
21256
21264
|
w === A ? "event-calendar__day--drop-target" : "",
|
|
@@ -21266,7 +21274,7 @@ function xl({ date: t, dragEnabled: r, draggingId: c, emptyLabel: a, events: s,
|
|
|
21266
21274
|
}), /* @__PURE__ */ l("div", {
|
|
21267
21275
|
className: "event-calendar__day-events",
|
|
21268
21276
|
children: [
|
|
21269
|
-
|
|
21277
|
+
S.map((B) => /* @__PURE__ */ e(o2, {
|
|
21270
21278
|
dragEnabled: r,
|
|
21271
21279
|
event: B,
|
|
21272
21280
|
isDragging: c === B.id,
|
|
@@ -21288,7 +21296,7 @@ function xl({ date: t, dragEnabled: r, draggingId: c, emptyLabel: a, events: s,
|
|
|
21288
21296
|
" more"
|
|
21289
21297
|
]
|
|
21290
21298
|
}),
|
|
21291
|
-
|
|
21299
|
+
t1 && F.length > o && /* @__PURE__ */ e("button", {
|
|
21292
21300
|
className: "event-calendar__more",
|
|
21293
21301
|
onClick: (B) => {
|
|
21294
21302
|
B.stopPropagation(), u(null);
|
|
@@ -21300,7 +21308,7 @@ function xl({ date: t, dragEnabled: r, draggingId: c, emptyLabel: a, events: s,
|
|
|
21300
21308
|
})]
|
|
21301
21309
|
}, A);
|
|
21302
21310
|
})
|
|
21303
|
-
},
|
|
21311
|
+
}, L))
|
|
21304
21312
|
}),
|
|
21305
21313
|
!z && a && /* @__PURE__ */ e("div", {
|
|
21306
21314
|
className: "event-calendar__empty",
|
|
@@ -21311,60 +21319,60 @@ function xl({ date: t, dragEnabled: r, draggingId: c, emptyLabel: a, events: s,
|
|
|
21311
21319
|
}
|
|
21312
21320
|
var kl = 8;
|
|
21313
21321
|
function Ll({ date: t, dayEndHour: r, dayStartHour: c, defaultDurationMinutes: a, dragEnabled: s, draggingId: d, events: o, firstDayOfWeek: m, hourHeight: n, onDayClick: i, onDragEnd: h, onDragStart: p, onDrop: v, onEventClick: g, renderEvent: u }) {
|
|
21314
|
-
const [w, f] = N(null), y = X(null), b = o1(() => m3(t, m), [t, m]), C = o1(() => p3(o, b), [o, b]), _ = o1(() => Array.from({ length: Math.max(r - c, 1) }, (
|
|
21315
|
-
const
|
|
21316
|
-
return
|
|
21322
|
+
const [w, f] = N(null), y = X(null), b = o1(() => m3(t, m), [t, m]), C = o1(() => p3(o, b), [o, b]), _ = o1(() => Array.from({ length: Math.max(r - c, 1) }, (x, L) => c + L), [c, r]), k = C.some((x) => x.allDay.length > 0), R = _.length * n, z = o1(() => {
|
|
21323
|
+
const x = C.flatMap((L) => L.timed.map((H) => H.start.getHours()));
|
|
21324
|
+
return x.length > 0 ? Math.min(...x) : kl;
|
|
21317
21325
|
}, [C]);
|
|
21318
21326
|
Y(() => {
|
|
21319
21327
|
if (!y.current) return;
|
|
21320
|
-
const
|
|
21321
|
-
y.current.scrollTop =
|
|
21328
|
+
const x = Math.max(z - c - 1, 0);
|
|
21329
|
+
y.current.scrollTop = x * n;
|
|
21322
21330
|
}, [
|
|
21323
21331
|
c,
|
|
21324
21332
|
z,
|
|
21325
21333
|
n
|
|
21326
21334
|
]);
|
|
21327
|
-
const M = (
|
|
21328
|
-
const H = l0(
|
|
21329
|
-
return H.setHours(
|
|
21330
|
-
}, V = (
|
|
21331
|
-
!s || d === null || (
|
|
21335
|
+
const M = (x, L) => {
|
|
21336
|
+
const H = l0(x);
|
|
21337
|
+
return H.setHours(L, 0, 0, 0), H;
|
|
21338
|
+
}, V = (x, L) => {
|
|
21339
|
+
!s || d === null || (x.preventDefault(), x.dataTransfer.dropEffect = "move", f(L));
|
|
21332
21340
|
};
|
|
21333
21341
|
return /* @__PURE__ */ l("div", {
|
|
21334
21342
|
className: "event-calendar__week-view",
|
|
21335
21343
|
children: [
|
|
21336
21344
|
/* @__PURE__ */ l("div", {
|
|
21337
21345
|
className: "event-calendar__week-head",
|
|
21338
|
-
children: [/* @__PURE__ */ e("div", { className: "event-calendar__gutter-spacer" }), b.map((
|
|
21346
|
+
children: [/* @__PURE__ */ e("div", { className: "event-calendar__gutter-spacer" }), b.map((x) => /* @__PURE__ */ l("div", {
|
|
21339
21347
|
className: [
|
|
21340
21348
|
"event-calendar__week-day-head",
|
|
21341
|
-
D0(
|
|
21342
|
-
d2(
|
|
21349
|
+
D0(x) ? "event-calendar__week-day-head--today" : "",
|
|
21350
|
+
d2(x) ? "event-calendar__week-day-head--weekend" : ""
|
|
21343
21351
|
].filter(Boolean).join(" "),
|
|
21344
21352
|
children: [/* @__PURE__ */ e("span", {
|
|
21345
21353
|
className: "event-calendar__week-day-name",
|
|
21346
|
-
children:
|
|
21354
|
+
children: x.toLocaleDateString(void 0, { weekday: "short" })
|
|
21347
21355
|
}), /* @__PURE__ */ e("span", {
|
|
21348
21356
|
className: "event-calendar__week-day-number",
|
|
21349
|
-
children:
|
|
21357
|
+
children: x.getDate()
|
|
21350
21358
|
})]
|
|
21351
|
-
},
|
|
21359
|
+
}, x.toDateString()))]
|
|
21352
21360
|
}),
|
|
21353
|
-
|
|
21361
|
+
k && /* @__PURE__ */ l("div", {
|
|
21354
21362
|
className: "event-calendar__all-day",
|
|
21355
21363
|
children: [/* @__PURE__ */ e("div", {
|
|
21356
21364
|
className: "event-calendar__gutter-label",
|
|
21357
21365
|
children: "All day"
|
|
21358
|
-
}), C.map((
|
|
21359
|
-
const
|
|
21366
|
+
}), C.map((x) => {
|
|
21367
|
+
const L = `allday-${x.date.toDateString()}`;
|
|
21360
21368
|
return /* @__PURE__ */ e("div", {
|
|
21361
|
-
className: ["event-calendar__all-day-cell", w ===
|
|
21362
|
-
onDragLeave: () => f((H) => H ===
|
|
21363
|
-
onDragOver: (H) => V(H,
|
|
21369
|
+
className: ["event-calendar__all-day-cell", w === L ? "event-calendar__all-day-cell--drop-target" : ""].filter(Boolean).join(" "),
|
|
21370
|
+
onDragLeave: () => f((H) => H === L ? null : H),
|
|
21371
|
+
onDragOver: (H) => V(H, L),
|
|
21364
21372
|
onDrop: (H) => {
|
|
21365
|
-
H.preventDefault(), f(null), v(
|
|
21373
|
+
H.preventDefault(), f(null), v(x.date, !0);
|
|
21366
21374
|
},
|
|
21367
|
-
children:
|
|
21375
|
+
children: x.allDay.map((H) => /* @__PURE__ */ e(o2, {
|
|
21368
21376
|
dragEnabled: s,
|
|
21369
21377
|
event: H,
|
|
21370
21378
|
isDragging: d === H.id,
|
|
@@ -21372,8 +21380,8 @@ function Ll({ date: t, dayEndHour: r, dayStartHour: c, defaultDurationMinutes: a
|
|
|
21372
21380
|
onDragEnd: h,
|
|
21373
21381
|
onDragStart: p,
|
|
21374
21382
|
renderEvent: u
|
|
21375
|
-
}, `${H.id}-${
|
|
21376
|
-
},
|
|
21383
|
+
}, `${H.id}-${L}`))
|
|
21384
|
+
}, L);
|
|
21377
21385
|
})]
|
|
21378
21386
|
}),
|
|
21379
21387
|
/* @__PURE__ */ l("div", {
|
|
@@ -21381,34 +21389,34 @@ function Ll({ date: t, dayEndHour: r, dayStartHour: c, defaultDurationMinutes: a
|
|
|
21381
21389
|
ref: y,
|
|
21382
21390
|
children: [/* @__PURE__ */ e("div", {
|
|
21383
21391
|
className: "event-calendar__gutter",
|
|
21384
|
-
style: { height:
|
|
21385
|
-
children: _.map((
|
|
21392
|
+
style: { height: R },
|
|
21393
|
+
children: _.map((x) => /* @__PURE__ */ e("div", {
|
|
21386
21394
|
className: "event-calendar__gutter-hour",
|
|
21387
21395
|
style: { height: n },
|
|
21388
|
-
children: /* @__PURE__ */ e("span", { children: Ml(
|
|
21389
|
-
},
|
|
21390
|
-
}), C.map((
|
|
21391
|
-
const
|
|
21396
|
+
children: /* @__PURE__ */ e("span", { children: Ml(x) })
|
|
21397
|
+
}, x))
|
|
21398
|
+
}), C.map((x) => {
|
|
21399
|
+
const L = yl(x.timed, c, r, a);
|
|
21392
21400
|
return /* @__PURE__ */ l("div", {
|
|
21393
|
-
className: ["event-calendar__week-column", D0(
|
|
21394
|
-
style: { height:
|
|
21401
|
+
className: ["event-calendar__week-column", D0(x.date) ? "event-calendar__week-column--today" : ""].filter(Boolean).join(" "),
|
|
21402
|
+
style: { height: R },
|
|
21395
21403
|
children: [_.map((H) => {
|
|
21396
|
-
const A = `${
|
|
21404
|
+
const A = `${x.date.toDateString()}-${H}`;
|
|
21397
21405
|
return /* @__PURE__ */ e("div", {
|
|
21398
21406
|
className: [
|
|
21399
21407
|
"event-calendar__slot",
|
|
21400
21408
|
w === A ? "event-calendar__slot--drop-target" : "",
|
|
21401
21409
|
i ? "event-calendar__slot--clickable" : ""
|
|
21402
21410
|
].filter(Boolean).join(" "),
|
|
21403
|
-
onClick: () => i?.(M(
|
|
21411
|
+
onClick: () => i?.(M(x.date, H)),
|
|
21404
21412
|
onDragLeave: () => f(($) => $ === A ? null : $),
|
|
21405
21413
|
onDragOver: ($) => V($, A),
|
|
21406
21414
|
onDrop: ($) => {
|
|
21407
|
-
$.preventDefault(), f(null), v(M(
|
|
21415
|
+
$.preventDefault(), f(null), v(M(x.date, H), !1);
|
|
21408
21416
|
},
|
|
21409
21417
|
style: { height: n }
|
|
21410
21418
|
}, A);
|
|
21411
|
-
}),
|
|
21419
|
+
}), L.map((H) => /* @__PURE__ */ e(o2, {
|
|
21412
21420
|
className: "event-calendar__chip--positioned",
|
|
21413
21421
|
dragEnabled: s,
|
|
21414
21422
|
event: H.event,
|
|
@@ -21425,7 +21433,7 @@ function Ll({ date: t, dayEndHour: r, dayStartHour: c, defaultDurationMinutes: a
|
|
|
21425
21433
|
width: `calc(${H.width}% - var(--spacing-4))`
|
|
21426
21434
|
}
|
|
21427
21435
|
}, H.event.id))]
|
|
21428
|
-
},
|
|
21436
|
+
}, x.date.toDateString());
|
|
21429
21437
|
})]
|
|
21430
21438
|
})
|
|
21431
21439
|
]
|
|
@@ -21447,25 +21455,25 @@ var zl = [{
|
|
|
21447
21455
|
return a.getFullYear() !== s.getFullYear() ? `${a.getDate()} ${k0(a)} ${a.getFullYear()} – ${s.getDate()} ${k0(s)} ${s.getFullYear()}` : a.getMonth() !== s.getMonth() ? `${a.getDate()} ${k0(a)} – ${s.getDate()} ${k0(s)} ${s.getFullYear()}` : `${a.getDate()} – ${s.getDate()} ${k0(s)} ${s.getFullYear()}`;
|
|
21448
21456
|
};
|
|
21449
21457
|
function In({ className: t, date: r, dayEndHour: c = 24, dayStartHour: a = 0, defaultDurationMinutes: s = 30, emptyLabel: d, events: o, firstDayOfWeek: m = 0, headerExtra: n, hourHeight: i = 44, maxEventsPerDay: h = 3, onDateChange: p, onDayClick: v, onEventClick: g, onEventDrop: u, onViewChange: w, renderEvent: f, showHeader: y = !0, view: b }) {
|
|
21450
|
-
const [C, _] = N(() => l0(r ?? /* @__PURE__ */ new Date())), [
|
|
21458
|
+
const [C, _] = N(() => l0(r ?? /* @__PURE__ */ new Date())), [k, R] = N(b ?? "month"), [z, M] = N(null), V = r ?? C, x = b ?? k, L = !!u, H = P((D) => {
|
|
21451
21459
|
p && p(D), r || _(D);
|
|
21452
21460
|
}, [r, p]), A = P((D) => {
|
|
21453
|
-
w && w(D), b ||
|
|
21461
|
+
w && w(D), b || R(D);
|
|
21454
21462
|
}, [w, b]), $ = P((D) => {
|
|
21455
|
-
H(
|
|
21463
|
+
H(x === "month" ? g0(V, D) : m2(V, D * 7));
|
|
21456
21464
|
}, [
|
|
21457
21465
|
V,
|
|
21458
|
-
|
|
21466
|
+
x,
|
|
21459
21467
|
H
|
|
21460
21468
|
]), F = P((D, B) => {
|
|
21461
21469
|
!z || !u || (u(z, bl(z, D, B)), M(null));
|
|
21462
|
-
}, [z, u]),
|
|
21470
|
+
}, [z, u]), t1 = o1(() => x === "month" ? Vl(V) : Nl(V, m), [
|
|
21463
21471
|
V,
|
|
21464
|
-
|
|
21472
|
+
x,
|
|
21465
21473
|
m
|
|
21466
|
-
]),
|
|
21474
|
+
]), S = {
|
|
21467
21475
|
date: V,
|
|
21468
|
-
dragEnabled:
|
|
21476
|
+
dragEnabled: L,
|
|
21469
21477
|
draggingId: z?.id ?? null,
|
|
21470
21478
|
events: o,
|
|
21471
21479
|
firstDayOfWeek: m,
|
|
@@ -21507,7 +21515,7 @@ function In({ className: t, date: r, dayEndHour: c = 24, dayStartHour: a = 0, de
|
|
|
21507
21515
|
}),
|
|
21508
21516
|
/* @__PURE__ */ e("h2", {
|
|
21509
21517
|
className: "event-calendar__title",
|
|
21510
|
-
children:
|
|
21518
|
+
children: t1
|
|
21511
21519
|
}),
|
|
21512
21520
|
n && /* @__PURE__ */ e("div", {
|
|
21513
21521
|
className: "event-calendar__header-extra",
|
|
@@ -21516,16 +21524,16 @@ function In({ className: t, date: r, dayEndHour: c = 24, dayStartHour: a = 0, de
|
|
|
21516
21524
|
/* @__PURE__ */ e(wl, {
|
|
21517
21525
|
onToggleChange: (D) => A(D),
|
|
21518
21526
|
size: "small",
|
|
21519
|
-
state:
|
|
21527
|
+
state: x,
|
|
21520
21528
|
states: zl
|
|
21521
21529
|
})
|
|
21522
21530
|
]
|
|
21523
|
-
}),
|
|
21524
|
-
...
|
|
21531
|
+
}), x === "month" ? /* @__PURE__ */ e(xl, {
|
|
21532
|
+
...S,
|
|
21525
21533
|
emptyLabel: d,
|
|
21526
21534
|
maxEventsPerDay: h
|
|
21527
21535
|
}) : /* @__PURE__ */ e(Ll, {
|
|
21528
|
-
...
|
|
21536
|
+
...S,
|
|
21529
21537
|
dayEndHour: c,
|
|
21530
21538
|
dayStartHour: a,
|
|
21531
21539
|
defaultDurationMinutes: s,
|
|
@@ -21844,11 +21852,11 @@ var Pn = ({ label: t, accept: r, multiple: c = !1, showPreview: a = !0, onFiles:
|
|
|
21844
21852
|
})
|
|
21845
21853
|
]
|
|
21846
21854
|
});
|
|
21847
|
-
}, Hl = /^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/, Sl = (t) => !t || t.trim() === "" ? !0 : Hl.test(t.trim()), Wn = z1(({ autoComplete: t = "on", autoFocus: r, disabled: c, error: a = "Please enter a valid email address", highlighted: s, id: d, label: o, maxLength: m, onBlur: n, onChange: i, onClick: h, onKeyDown: p, onKeyUp: v, onValidate: g, placeholder: u, readOnly: w = !1, required: f = !1, showValidation: y = !1, success: b, validateOn: C = "blur", value: _ },
|
|
21848
|
-
const [
|
|
21855
|
+
}, Hl = /^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/, Sl = (t) => !t || t.trim() === "" ? !0 : Hl.test(t.trim()), Wn = z1(({ autoComplete: t = "on", autoFocus: r, disabled: c, error: a = "Please enter a valid email address", highlighted: s, id: d, label: o, maxLength: m, onBlur: n, onChange: i, onClick: h, onKeyDown: p, onKeyUp: v, onValidate: g, placeholder: u, readOnly: w = !1, required: f = !1, showValidation: y = !1, success: b, validateOn: C = "blur", value: _ }, k) => {
|
|
21856
|
+
const [R, z] = N(!0), [M, V] = N(!1), x = ($) => f && (!$ || $.trim() === "") ? !1 : !$ || $.trim() === "" ? !0 : Sl($);
|
|
21849
21857
|
Y(() => {
|
|
21850
21858
|
if (_ !== void 0) {
|
|
21851
|
-
const $ =
|
|
21859
|
+
const $ = x(_);
|
|
21852
21860
|
z($), g?.($);
|
|
21853
21861
|
}
|
|
21854
21862
|
}, [
|
|
@@ -21856,18 +21864,18 @@ var Pn = ({ label: t, accept: r, multiple: c = !1, showPreview: a = !0, onFiles:
|
|
|
21856
21864
|
g,
|
|
21857
21865
|
f
|
|
21858
21866
|
]);
|
|
21859
|
-
const
|
|
21867
|
+
const L = ($) => {
|
|
21860
21868
|
if (i?.($), C === "change" || C === "both") {
|
|
21861
|
-
const F =
|
|
21869
|
+
const F = x($);
|
|
21862
21870
|
z(F), V(!0), g?.(F);
|
|
21863
21871
|
}
|
|
21864
21872
|
}, H = ($) => {
|
|
21865
21873
|
if (V(!0), C === "blur" || C === "both") {
|
|
21866
|
-
const F =
|
|
21874
|
+
const F = x($.target.value);
|
|
21867
21875
|
z(F), g?.(F);
|
|
21868
21876
|
}
|
|
21869
21877
|
n?.($);
|
|
21870
|
-
}, A = y && M && !
|
|
21878
|
+
}, A = y && M && !R;
|
|
21871
21879
|
return /* @__PURE__ */ l("div", {
|
|
21872
21880
|
className: `input-email-wrapper${s ? " input-email-highlighted" : ""}`,
|
|
21873
21881
|
children: [
|
|
@@ -21884,14 +21892,14 @@ var Pn = ({ label: t, accept: r, multiple: c = !1, showPreview: a = !0, onFiles:
|
|
|
21884
21892
|
autoFocus: r,
|
|
21885
21893
|
disabled: c,
|
|
21886
21894
|
type: "email",
|
|
21887
|
-
className: `input-email${A ? " input-email--error" : ""}${b ? " input-email-success" :
|
|
21895
|
+
className: `input-email${A ? " input-email--error" : ""}${b ? " input-email-success" : R && M && y ? " input-email--valid" : ""}`,
|
|
21888
21896
|
id: d,
|
|
21889
21897
|
maxLength: m,
|
|
21890
21898
|
placeholder: u,
|
|
21891
|
-
ref:
|
|
21899
|
+
ref: k,
|
|
21892
21900
|
value: _,
|
|
21893
21901
|
onBlur: H,
|
|
21894
|
-
onChange: ($) =>
|
|
21902
|
+
onChange: ($) => L($.target.value),
|
|
21895
21903
|
onClick: h,
|
|
21896
21904
|
onKeyDown: p,
|
|
21897
21905
|
onKeyUp: v,
|
|
@@ -21979,16 +21987,16 @@ function c2(t, r, c) {
|
|
|
21979
21987
|
function Al(t) {
|
|
21980
21988
|
return t.filter((r) => r.type === "token").length;
|
|
21981
21989
|
}
|
|
21982
|
-
var $l = z1(({ mask: t, value: r, onChange: c, onComplete: a, placeholder: s, label: d, hint: o, error: m, highlighted: n, size: i = "md", variant: h = "default", disabled: p = !1, readOnly: v = !1, maskChar: g = "_", mono: u = !0, icon: w, suffix: f, className: y = "", id: b, name: C, autoComplete: _ },
|
|
21983
|
-
const
|
|
21984
|
-
U2(
|
|
21990
|
+
var $l = z1(({ mask: t, value: r, onChange: c, onComplete: a, placeholder: s, label: d, hint: o, error: m, highlighted: n, size: i = "md", variant: h = "default", disabled: p = !1, readOnly: v = !1, maskChar: g = "_", mono: u = !0, icon: w, suffix: f, className: y = "", id: b, name: C, autoComplete: _ }, k) => {
|
|
21991
|
+
const R = w1.useMemo(() => Bl(t), [t]), z = w1.useMemo(() => Al(R), [R]), M = H0(), V = b ?? M, [x, L] = N(() => r !== void 0 ? r : ""), H = X(null);
|
|
21992
|
+
U2(k, () => ({
|
|
21985
21993
|
focus: () => H.current?.focus(),
|
|
21986
21994
|
clear: () => {
|
|
21987
|
-
|
|
21995
|
+
L(""), c?.("", "");
|
|
21988
21996
|
},
|
|
21989
|
-
getRawValue: () =>
|
|
21997
|
+
getRawValue: () => x
|
|
21990
21998
|
}));
|
|
21991
|
-
const { masked: A } = c2(
|
|
21999
|
+
const { masked: A } = c2(x, R, g), $ = A.includes(g) ? A.replace(new RegExp(g.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), "g"), g) : A, F = m ? "danger" : h, t1 = [
|
|
21992
22000
|
"input-mask",
|
|
21993
22001
|
`input-mask--${i}`,
|
|
21994
22002
|
`input-mask--${F}`,
|
|
@@ -21999,38 +22007,38 @@ var $l = z1(({ mask: t, value: r, onChange: c, onComplete: a, placeholder: s, la
|
|
|
21999
22007
|
w ? "input-mask--has-icon" : "",
|
|
22000
22008
|
f ? "input-mask--has-suffix" : "",
|
|
22001
22009
|
y
|
|
22002
|
-
].filter(Boolean).join(" "),
|
|
22010
|
+
].filter(Boolean).join(" "), S = P((U) => {
|
|
22003
22011
|
if (p || v) return;
|
|
22004
22012
|
if (U.key === "Backspace") {
|
|
22005
22013
|
U.preventDefault();
|
|
22006
|
-
const q =
|
|
22007
|
-
|
|
22014
|
+
const q = x.slice(0, -1), { masked: u1 } = c2(q, R, g);
|
|
22015
|
+
L(q), c?.(q, u1);
|
|
22008
22016
|
return;
|
|
22009
22017
|
}
|
|
22010
|
-
if (U.key.length !== 1 || U.ctrlKey || U.metaKey || (U.preventDefault(),
|
|
22018
|
+
if (U.key.length !== 1 || U.ctrlKey || U.metaKey || (U.preventDefault(), x.length >= z)) return;
|
|
22011
22019
|
const O = U.key;
|
|
22012
22020
|
let K = 0;
|
|
22013
|
-
for (const q of
|
|
22014
|
-
if (K ===
|
|
22021
|
+
for (const q of R) if (q.type === "token") {
|
|
22022
|
+
if (K === x.length) {
|
|
22015
22023
|
if (!u3[q.key].test(O)) return;
|
|
22016
22024
|
break;
|
|
22017
22025
|
}
|
|
22018
22026
|
K++;
|
|
22019
22027
|
}
|
|
22020
|
-
const { masked: e1, rawAccepted:
|
|
22021
|
-
|
|
22028
|
+
const { masked: e1, rawAccepted: c1 } = c2(x + O, R, g);
|
|
22029
|
+
L(c1), c?.(c1, e1), c1.length === z && a?.(c1, e1);
|
|
22022
22030
|
}, [
|
|
22023
22031
|
p,
|
|
22024
22032
|
v,
|
|
22025
|
-
|
|
22026
|
-
|
|
22033
|
+
x,
|
|
22034
|
+
R,
|
|
22027
22035
|
g,
|
|
22028
22036
|
z,
|
|
22029
22037
|
c,
|
|
22030
22038
|
a
|
|
22031
|
-
]), D = s ??
|
|
22039
|
+
]), D = s ?? R.map((U) => U.type === "literal" ? U.char : g).join(""), B = x.length === z;
|
|
22032
22040
|
return /* @__PURE__ */ l("div", {
|
|
22033
|
-
className:
|
|
22041
|
+
className: t1,
|
|
22034
22042
|
children: [
|
|
22035
22043
|
d && /* @__PURE__ */ e("label", {
|
|
22036
22044
|
className: "input-mask__label",
|
|
@@ -22059,12 +22067,12 @@ var $l = z1(({ mask: t, value: r, onChange: c, onComplete: a, placeholder: s, la
|
|
|
22059
22067
|
maxLength: t.length,
|
|
22060
22068
|
onChange: () => {
|
|
22061
22069
|
},
|
|
22062
|
-
onKeyDown:
|
|
22070
|
+
onKeyDown: S
|
|
22063
22071
|
}),
|
|
22064
22072
|
/* @__PURE__ */ l("span", {
|
|
22065
22073
|
className: "input-mask__counter",
|
|
22066
22074
|
children: [
|
|
22067
|
-
|
|
22075
|
+
x.length,
|
|
22068
22076
|
"/",
|
|
22069
22077
|
z
|
|
22070
22078
|
]
|
|
@@ -22148,9 +22156,9 @@ function El(t) {
|
|
|
22148
22156
|
return t.split("").filter((r) => r === "#").length;
|
|
22149
22157
|
}
|
|
22150
22158
|
var Tl = z1(({ autoFocus: t, disabled: r, error: c, format: a = Dl, highlighted: s, id: d, label: o, onBlur: m, onChange: n, onClick: i, onKeyDown: h, placeholder: p, readOnly: v = !1, required: g = !1, success: u, value: w }, f) => {
|
|
22151
|
-
const y = w !== void 0, [b, C] = N(() => w ? l2(a2(w), a) : ""), _ = y ? l2(a2(w ?? ""), a) : b,
|
|
22152
|
-
const V = a2(M),
|
|
22153
|
-
y || C(H), n?.(H,
|
|
22159
|
+
const y = w !== void 0, [b, C] = N(() => w ? l2(a2(w), a) : ""), _ = y ? l2(a2(w ?? ""), a) : b, k = p ?? a.replace(/#/g, "0"), R = a.length, z = (M) => {
|
|
22160
|
+
const V = a2(M), x = El(a), L = V.slice(0, x), H = l2(L, a);
|
|
22161
|
+
y || C(H), n?.(H, L);
|
|
22154
22162
|
};
|
|
22155
22163
|
return /* @__PURE__ */ l("div", {
|
|
22156
22164
|
className: "input-phone-wrapper",
|
|
@@ -22184,8 +22192,8 @@ var Tl = z1(({ autoFocus: t, disabled: r, error: c, format: a = Dl, highlighted:
|
|
|
22184
22192
|
disabled: r,
|
|
22185
22193
|
id: d,
|
|
22186
22194
|
inputMode: "tel",
|
|
22187
|
-
maxLength:
|
|
22188
|
-
placeholder:
|
|
22195
|
+
maxLength: R,
|
|
22196
|
+
placeholder: k,
|
|
22189
22197
|
readOnly: v,
|
|
22190
22198
|
ref: f,
|
|
22191
22199
|
required: g,
|
|
@@ -22255,7 +22263,7 @@ var On = z1(({ autoComplete: t = "on", autoFocus: r, cols: c, disabled: a, error
|
|
|
22255
22263
|
seconds: 0
|
|
22256
22264
|
};
|
|
22257
22265
|
}, Yn = z1(({ autoFocus: t, disabled: r, error: c, highlighted: a, id: s, label: d, max: o, min: m, minuteStep: n = 1, onBlur: i, onChange: h, onClick: p, onKeyDown: v, onKeyUp: g, readOnly: u = !1, required: w = !1, success: f, value: y, withClock: b = !1 }, C) => {
|
|
22258
|
-
const [_,
|
|
22266
|
+
const [_, k] = N(!1), R = X(null), z = (M) => {
|
|
22259
22267
|
h?.(`${$2(M.hours)}:${$2(M.minutes)}`);
|
|
22260
22268
|
};
|
|
22261
22269
|
return /* @__PURE__ */ l("div", {
|
|
@@ -22270,7 +22278,7 @@ var On = z1(({ autoComplete: t = "on", autoFocus: r, cols: c, disabled: a, error
|
|
|
22270
22278
|
})]
|
|
22271
22279
|
}),
|
|
22272
22280
|
/* @__PURE__ */ l("div", {
|
|
22273
|
-
ref:
|
|
22281
|
+
ref: R,
|
|
22274
22282
|
className: `input-time-field${b ? " input-time-field--with-clock" : ""}`,
|
|
22275
22283
|
children: [/* @__PURE__ */ e("input", {
|
|
22276
22284
|
autoFocus: t,
|
|
@@ -22292,7 +22300,7 @@ var On = z1(({ autoComplete: t = "on", autoFocus: r, cols: c, disabled: a, error
|
|
|
22292
22300
|
}), b && /* @__PURE__ */ e("button", {
|
|
22293
22301
|
className: `input-time-clock-button${_ ? " input-time-clock-button--active" : ""}`,
|
|
22294
22302
|
disabled: r || u,
|
|
22295
|
-
onClick: () =>
|
|
22303
|
+
onClick: () => k(!_),
|
|
22296
22304
|
title: "Pick on a clock",
|
|
22297
22305
|
type: "button",
|
|
22298
22306
|
children: /* @__PURE__ */ e(G, { name: "time" })
|
|
@@ -22308,8 +22316,8 @@ var On = z1(({ autoComplete: t = "on", autoFocus: r, cols: c, disabled: a, error
|
|
|
22308
22316
|
}),
|
|
22309
22317
|
b && /* @__PURE__ */ e(v2, {
|
|
22310
22318
|
visible: _,
|
|
22311
|
-
onClose: () =>
|
|
22312
|
-
anchorEl:
|
|
22319
|
+
onClose: () => k(!1),
|
|
22320
|
+
anchorEl: R.current,
|
|
22313
22321
|
children: /* @__PURE__ */ e(l3, {
|
|
22314
22322
|
collapsibleClock: !1,
|
|
22315
22323
|
label: "",
|
|
@@ -22329,15 +22337,15 @@ var On = z1(({ autoComplete: t = "on", autoFocus: r, cols: c, disabled: a, error
|
|
|
22329
22337
|
return !1;
|
|
22330
22338
|
}
|
|
22331
22339
|
}, qn = z1(({ autoFocus: t, disabled: r, error: c, highlighted: a, id: s, label: d, maxLength: o, onBlur: m, onChange: n, onClick: i, onKeyDown: h, onKeyUp: p, onValidationChange: v, placeholder: g = "https://...", readOnly: u = !1, required: w = !1, success: f, validationErrorMessage: y, value: b }, C) => {
|
|
22332
|
-
const [_,
|
|
22333
|
-
if (!
|
|
22334
|
-
return
|
|
22335
|
-
const
|
|
22336
|
-
return
|
|
22337
|
-
}, z = (
|
|
22338
|
-
n?.(
|
|
22339
|
-
}, M = (
|
|
22340
|
-
|
|
22340
|
+
const [_, k] = N(void 0), R = (x) => {
|
|
22341
|
+
if (!x)
|
|
22342
|
+
return k(void 0), v?.(!0), !0;
|
|
22343
|
+
const L = Gl(x);
|
|
22344
|
+
return k(L ? void 0 : y ?? Pl), v?.(L), L;
|
|
22345
|
+
}, z = (x) => {
|
|
22346
|
+
n?.(x), _ && R(x);
|
|
22347
|
+
}, M = (x) => {
|
|
22348
|
+
R(x.target.value), m?.(x);
|
|
22341
22349
|
}, V = c ?? _;
|
|
22342
22350
|
return /* @__PURE__ */ l("div", {
|
|
22343
22351
|
className: `input-url-wrapper${a ? " input-url-highlighted" : ""}`,
|
|
@@ -22361,7 +22369,7 @@ var On = z1(({ autoComplete: t = "on", autoFocus: r, cols: c, disabled: a, error
|
|
|
22361
22369
|
ref: C,
|
|
22362
22370
|
value: b,
|
|
22363
22371
|
onBlur: M,
|
|
22364
|
-
onChange: (
|
|
22372
|
+
onChange: (x) => z(x.target.value),
|
|
22365
22373
|
onClick: i,
|
|
22366
22374
|
onKeyDown: h,
|
|
22367
22375
|
onKeyUp: p,
|
|
@@ -22393,7 +22401,7 @@ var On = z1(({ autoComplete: t = "on", autoFocus: r, cols: c, disabled: a, error
|
|
|
22393
22401
|
n(0), c();
|
|
22394
22402
|
}, b = /* @__PURE__ */ e("div", {
|
|
22395
22403
|
className: "journey-wizard__progress",
|
|
22396
|
-
children: a.map((_,
|
|
22404
|
+
children: a.map((_, k) => /* @__PURE__ */ e("span", { className: `journey-wizard__dot${k === m ? " journey-wizard__dot--active" : k < m ? " journey-wizard__dot--done" : ""}` }, _.id))
|
|
22397
22405
|
}), C = /* @__PURE__ */ l("div", {
|
|
22398
22406
|
className: "journey-wizard__nav",
|
|
22399
22407
|
children: [
|
|
@@ -22849,19 +22857,19 @@ var On = z1(({ autoComplete: t = "on", autoFocus: r, cols: c, disabled: a, error
|
|
|
22849
22857
|
return c === "custom" ? t.customColor || D2.default : c === "random" ? Ul(r) : D2[c];
|
|
22850
22858
|
}, ti = ({ className: t = "", data: r = [], emptyLabel: c, gap: a = 1, size: s = "medium", valueFormatter: d, valuePosition: o = "inside" }) => {
|
|
22851
22859
|
const m = Wl[s], n = o === "outside" ? Math.round(m * 0.18) : 0, i = m / 2, h = Math.max(i - Math.max(a, 1), 1), p = `${-n} ${-n} ${m + n * 2} ${m + n * 2}`, v = o1(() => {
|
|
22852
|
-
const _ = r.filter((z) => Number.isFinite(z.value) && z.value > 0),
|
|
22853
|
-
if (
|
|
22854
|
-
let
|
|
22860
|
+
const _ = r.filter((z) => Number.isFinite(z.value) && z.value > 0), k = _.reduce((z, M) => z + M.value, 0);
|
|
22861
|
+
if (k <= 0) return [];
|
|
22862
|
+
let R = 0;
|
|
22855
22863
|
return _.map((z, M) => {
|
|
22856
|
-
const V = z.value /
|
|
22857
|
-
return
|
|
22864
|
+
const V = z.value / k * 360, x = R, L = M === _.length - 1 ? 360 : R + V, H = x + (L - x) / 2;
|
|
22865
|
+
return R = L, {
|
|
22858
22866
|
color: Ol(z, M),
|
|
22859
|
-
endAngle:
|
|
22867
|
+
endAngle: L,
|
|
22860
22868
|
index: M,
|
|
22861
22869
|
label: d ? d(z.value, z, M) : z.value,
|
|
22862
22870
|
midAngle: H,
|
|
22863
|
-
path: Fl(i, h,
|
|
22864
|
-
startAngle:
|
|
22871
|
+
path: Fl(i, h, x, L),
|
|
22872
|
+
startAngle: x,
|
|
22865
22873
|
value: z.value
|
|
22866
22874
|
};
|
|
22867
22875
|
});
|
|
@@ -22905,15 +22913,15 @@ var On = z1(({ autoComplete: t = "on", autoFocus: r, cols: c, disabled: a, error
|
|
|
22905
22913
|
strokeWidth: b
|
|
22906
22914
|
}, `${_.index}-${_.value}-${_.startAngle}`))),
|
|
22907
22915
|
g && C && o === "outside" && v.map((_) => {
|
|
22908
|
-
const
|
|
22916
|
+
const k = p0(i, i, f, _.midAngle), R = p0(i, i, y, _.midAngle), z = p0(i, i, w, _.midAngle), M = z.x >= i;
|
|
22909
22917
|
return /* @__PURE__ */ l("g", {
|
|
22910
22918
|
className: "pie-chart__outside-label-group",
|
|
22911
22919
|
children: [/* @__PURE__ */ e("line", {
|
|
22912
22920
|
className: "pie-chart__leader-line",
|
|
22913
|
-
x1:
|
|
22914
|
-
y1:
|
|
22915
|
-
x2:
|
|
22916
|
-
y2:
|
|
22921
|
+
x1: k.x,
|
|
22922
|
+
y1: k.y,
|
|
22923
|
+
x2: R.x,
|
|
22924
|
+
y2: R.y,
|
|
22917
22925
|
stroke: _.color
|
|
22918
22926
|
}), /* @__PURE__ */ e("text", {
|
|
22919
22927
|
className: "pie-chart__value-label pie-chart__value-label--outside",
|
|
@@ -22927,14 +22935,14 @@ var On = z1(({ autoComplete: t = "on", autoFocus: r, cols: c, disabled: a, error
|
|
|
22927
22935
|
}, `outside-${_.index}-${_.value}`);
|
|
22928
22936
|
}),
|
|
22929
22937
|
g && C && o === "inside" && v.map((_) => {
|
|
22930
|
-
const
|
|
22938
|
+
const k = v.length === 1 ? {
|
|
22931
22939
|
x: i,
|
|
22932
22940
|
y: i
|
|
22933
22941
|
} : p0(i, i, u, _.midAngle);
|
|
22934
22942
|
return /* @__PURE__ */ e("text", {
|
|
22935
22943
|
className: "pie-chart__value-label pie-chart__value-label--inside",
|
|
22936
|
-
x:
|
|
22937
|
-
y:
|
|
22944
|
+
x: k.x,
|
|
22945
|
+
y: k.y,
|
|
22938
22946
|
textAnchor: "middle",
|
|
22939
22947
|
dominantBaseline: "central",
|
|
22940
22948
|
children: _.label
|
|
@@ -23624,8 +23632,8 @@ ${s.textContent ?? ""}
|
|
|
23624
23632
|
a.querySelectorAll("tr").forEach((f, y) => {
|
|
23625
23633
|
const b = y === 0 && f.closest("thead") !== null, C = document.createElement(b ? "th" : "td");
|
|
23626
23634
|
C.setAttribute("contenteditable", "true"), C.textContent = b ? "Header" : "Cell";
|
|
23627
|
-
const _ = f.querySelectorAll("td,th"),
|
|
23628
|
-
f.insertBefore(C,
|
|
23635
|
+
const _ = f.querySelectorAll("td,th"), k = _[w >= 0 ? w : _.length - 1];
|
|
23636
|
+
f.insertBefore(C, k ? k.nextSibling : null);
|
|
23629
23637
|
}), c(), n(a);
|
|
23630
23638
|
}, [
|
|
23631
23639
|
a,
|
|
@@ -23923,11 +23931,11 @@ ${s.textContent ?? ""}
|
|
|
23923
23931
|
o(c === "markdown" ? Ql(m1) : m1), setTimeout(() => {
|
|
23924
23932
|
p.current = !1;
|
|
23925
23933
|
}, 0);
|
|
23926
|
-
}, [c, o]), { snapshotForUndo: f, undo: y, redo: b } = aa(h, p, w), { showLinkPrompt: C, linkUrl: _, setLinkUrl:
|
|
23934
|
+
}, [c, o]), { snapshotForUndo: f, undo: y, redo: b } = aa(h, p, w), { showLinkPrompt: C, linkUrl: _, setLinkUrl: k, linkText: R, setLinkText: z, editingAnchorRef: M, openLinkPrompt: V, confirmLink: x, cancelLink: L } = na({
|
|
23927
23935
|
editorRef: h,
|
|
23928
23936
|
snapshotForUndo: f,
|
|
23929
23937
|
emitChange: w
|
|
23930
|
-
}), { activeTable: H, tableToolbarPos: A, showTableToolbar: $, hideTableToolbar: F, addRowAbove:
|
|
23938
|
+
}), { activeTable: H, tableToolbarPos: A, showTableToolbar: $, hideTableToolbar: F, addRowAbove: t1, addRowBelow: S, removeRow: D, addColumnLeft: B, addColumnRight: U, removeColumn: O, deleteTable: K } = ia({
|
|
23931
23939
|
editorRef: h,
|
|
23932
23940
|
snapshotForUndo: f,
|
|
23933
23941
|
emitChange: w
|
|
@@ -23961,12 +23969,12 @@ ${s.textContent ?? ""}
|
|
|
23961
23969
|
}
|
|
23962
23970
|
}
|
|
23963
23971
|
u(m1);
|
|
23964
|
-
}, []),
|
|
23972
|
+
}, []), c1 = P((l1, m1) => {
|
|
23965
23973
|
h.current?.focus(), document.execCommand(l1, !1, m1), e1(), w();
|
|
23966
23974
|
}, [w, e1]), q = P((l1) => {
|
|
23967
23975
|
const m1 = `h${l1}`, E = g.has(m1);
|
|
23968
|
-
|
|
23969
|
-
}, [g,
|
|
23976
|
+
c1("formatBlock", E ? "p" : m1);
|
|
23977
|
+
}, [g, c1]), u1 = P(() => {
|
|
23970
23978
|
f();
|
|
23971
23979
|
const l1 = h.current;
|
|
23972
23980
|
if (!l1) return;
|
|
@@ -23984,8 +23992,8 @@ ${s.textContent ?? ""}
|
|
|
23984
23992
|
const _1 = document.createRange();
|
|
23985
23993
|
_1.setStart(p1, 1), _1.collapse(!0), m1.removeAllRanges(), m1.addRange(_1), w();
|
|
23986
23994
|
}, [f, w]), g1 = P(() => {
|
|
23987
|
-
|
|
23988
|
-
}, [
|
|
23995
|
+
c1("insertHTML", ca);
|
|
23996
|
+
}, [c1]), b1 = P((l1) => {
|
|
23989
23997
|
const m1 = l1.target, E = m1.closest("a");
|
|
23990
23998
|
if (E) {
|
|
23991
23999
|
l1.preventDefault(), V(E), e1();
|
|
@@ -24053,7 +24061,7 @@ ${s.textContent ?? ""}
|
|
|
24053
24061
|
/* @__PURE__ */ e(ha, {
|
|
24054
24062
|
advanced: t,
|
|
24055
24063
|
isActive: (l1) => g.has(l1),
|
|
24056
|
-
exec:
|
|
24064
|
+
exec: c1,
|
|
24057
24065
|
applyHeading: q,
|
|
24058
24066
|
insertTaskList: u1,
|
|
24059
24067
|
openLinkPrompt: () => V(),
|
|
@@ -24063,18 +24071,18 @@ ${s.textContent ?? ""}
|
|
|
24063
24071
|
}),
|
|
24064
24072
|
C && /* @__PURE__ */ e(oa, {
|
|
24065
24073
|
isEditing: !!M.current,
|
|
24066
|
-
linkText:
|
|
24074
|
+
linkText: R,
|
|
24067
24075
|
linkUrl: _,
|
|
24068
24076
|
setLinkText: z,
|
|
24069
|
-
setLinkUrl:
|
|
24070
|
-
confirmLink:
|
|
24071
|
-
cancelLink:
|
|
24077
|
+
setLinkUrl: k,
|
|
24078
|
+
confirmLink: x,
|
|
24079
|
+
cancelLink: L
|
|
24072
24080
|
}),
|
|
24073
24081
|
H && A && /* @__PURE__ */ e(sa, {
|
|
24074
24082
|
pos: A,
|
|
24075
24083
|
toolbarRef: v,
|
|
24076
|
-
addRowAbove:
|
|
24077
|
-
addRowBelow:
|
|
24084
|
+
addRowAbove: t1,
|
|
24085
|
+
addRowBelow: S,
|
|
24078
24086
|
removeRow: D,
|
|
24079
24087
|
addColumnLeft: B,
|
|
24080
24088
|
addColumnRight: U,
|
|
@@ -24167,10 +24175,10 @@ ${s.textContent ?? ""}
|
|
|
24167
24175
|
w ? "sidebar--mobile" : "",
|
|
24168
24176
|
i ? "sidebar--contained" : "",
|
|
24169
24177
|
c
|
|
24170
|
-
].filter(Boolean).join(" "), _ = ["sidebar__overlay", i ? "sidebar__overlay--contained" : ""].filter(Boolean).join(" "),
|
|
24178
|
+
].filter(Boolean).join(" "), _ = ["sidebar__overlay", i ? "sidebar__overlay--contained" : ""].filter(Boolean).join(" "), k = {
|
|
24171
24179
|
"--sidebar-width": r,
|
|
24172
24180
|
"--sidebar-shadow": h
|
|
24173
|
-
},
|
|
24181
|
+
}, R = (M) => {
|
|
24174
24182
|
M.onClick?.(), w && y();
|
|
24175
24183
|
}, z = (M) => /* @__PURE__ */ l("button", {
|
|
24176
24184
|
className: [
|
|
@@ -24178,7 +24186,7 @@ ${s.textContent ?? ""}
|
|
|
24178
24186
|
M.isActive ? "sidebar__link--active" : "",
|
|
24179
24187
|
M.className
|
|
24180
24188
|
].filter(Boolean).join(" "),
|
|
24181
|
-
onClick: () =>
|
|
24189
|
+
onClick: () => R(M),
|
|
24182
24190
|
children: [
|
|
24183
24191
|
M.icon && /* @__PURE__ */ e("span", {
|
|
24184
24192
|
className: "sidebar__link-icon",
|
|
@@ -24210,7 +24218,7 @@ ${s.textContent ?? ""}
|
|
|
24210
24218
|
onClick: y
|
|
24211
24219
|
}), /* @__PURE__ */ l("aside", {
|
|
24212
24220
|
className: C,
|
|
24213
|
-
style:
|
|
24221
|
+
style: k,
|
|
24214
24222
|
children: [
|
|
24215
24223
|
a && /* @__PURE__ */ e(Q2, {
|
|
24216
24224
|
...a,
|
|
@@ -24251,7 +24259,7 @@ ${s.textContent ?? ""}
|
|
|
24251
24259
|
children: M.description
|
|
24252
24260
|
})]
|
|
24253
24261
|
}),
|
|
24254
|
-
M.items.map((
|
|
24262
|
+
M.items.map((x) => s ? s(x) : z(x)),
|
|
24255
24263
|
M.showDivider && V < b.length - 1 && /* @__PURE__ */ e("div", { className: "sidebar__divider" })
|
|
24256
24264
|
]
|
|
24257
24265
|
}, M.id ?? M.title ?? V))
|
|
@@ -24498,9 +24506,9 @@ function T2({ state: t }) {
|
|
|
24498
24506
|
var I2 = 10, Mi = ({ data: t, label: r, title: c, tooltip: a, enableSearch: s = !1, onRowClick: d }) => {
|
|
24499
24507
|
const [o, m] = N(!1), [n, i] = N(!1), [h, p] = N(""), [v, g] = N(null), [u, w] = N("asc"), f = o1(() => h.trim() ? t.filter((M) => M.name.toLowerCase().includes(h.toLowerCase())) : t, [t, h]), y = o1(() => {
|
|
24500
24508
|
if (!v) return f;
|
|
24501
|
-
const M = [...f].sort((V,
|
|
24502
|
-
const
|
|
24503
|
-
return typeof
|
|
24509
|
+
const M = [...f].sort((V, x) => {
|
|
24510
|
+
const L = v === "name" ? V.name : V.value, H = v === "name" ? x.name : x.value;
|
|
24511
|
+
return typeof L == "number" && typeof H == "number" ? L - H : String(L).localeCompare(String(H));
|
|
24504
24512
|
});
|
|
24505
24513
|
return u === "asc" ? M : M.reverse();
|
|
24506
24514
|
}, [
|
|
@@ -24509,9 +24517,9 @@ var I2 = 10, Mi = ({ data: t, label: r, title: c, tooltip: a, enableSearch: s =
|
|
|
24509
24517
|
u
|
|
24510
24518
|
]), b = o1(() => n ? [...y] : y.slice(0, I2), [y, n]), C = y.length > I2, _ = () => {
|
|
24511
24519
|
m(!o);
|
|
24512
|
-
},
|
|
24520
|
+
}, k = P(() => {
|
|
24513
24521
|
i(!n);
|
|
24514
|
-
}, [n]),
|
|
24522
|
+
}, [n]), R = (M) => {
|
|
24515
24523
|
v === M ? w((V) => V === "asc" ? "desc" : "asc") : (g(M), w("asc"));
|
|
24516
24524
|
}, z = o1(() => /* @__PURE__ */ l("div", {
|
|
24517
24525
|
className: "list-suggestions-list",
|
|
@@ -24536,12 +24544,12 @@ var I2 = 10, Mi = ({ data: t, label: r, title: c, tooltip: a, enableSearch: s =
|
|
|
24536
24544
|
children: [/* @__PURE__ */ l("button", {
|
|
24537
24545
|
type: "button",
|
|
24538
24546
|
className: "list-suggestions-list-header-cell list-suggestions-list-header-cell--name",
|
|
24539
|
-
onClick: () =>
|
|
24547
|
+
onClick: () => R("name"),
|
|
24540
24548
|
children: ["Name", /* @__PURE__ */ e(T2, { state: v === "name" ? u : "unsorted" })]
|
|
24541
24549
|
}), /* @__PURE__ */ l("button", {
|
|
24542
24550
|
type: "button",
|
|
24543
24551
|
className: "list-suggestions-list-header-cell list-suggestions-list-header-cell--value",
|
|
24544
|
-
onClick: () =>
|
|
24552
|
+
onClick: () => R("value"),
|
|
24545
24553
|
children: ["Value", /* @__PURE__ */ e(T2, { state: v === "value" ? u : "unsorted" })]
|
|
24546
24554
|
})]
|
|
24547
24555
|
}),
|
|
@@ -24549,8 +24557,8 @@ var I2 = 10, Mi = ({ data: t, label: r, title: c, tooltip: a, enableSearch: s =
|
|
|
24549
24557
|
className: `list-suggestions-list-row ${d ? "list-suggestions-list-row--clickable" : ""}`,
|
|
24550
24558
|
onClick: () => d?.(M),
|
|
24551
24559
|
tabIndex: d ? 0 : void 0,
|
|
24552
|
-
onKeyDown: (
|
|
24553
|
-
d && (
|
|
24560
|
+
onKeyDown: (x) => {
|
|
24561
|
+
d && (x.key === "Enter" || x.key === " ") && (x.preventDefault(), d(M));
|
|
24554
24562
|
},
|
|
24555
24563
|
children: [/* @__PURE__ */ e("div", { children: M.name }), /* @__PURE__ */ l("div", { children: [
|
|
24556
24564
|
typeof M.value == "number" && P0(M.value),
|
|
@@ -24566,7 +24574,7 @@ var I2 = 10, Mi = ({ data: t, label: r, title: c, tooltip: a, enableSearch: s =
|
|
|
24566
24574
|
}),
|
|
24567
24575
|
C && /* @__PURE__ */ l("span", {
|
|
24568
24576
|
className: "link",
|
|
24569
|
-
onClick:
|
|
24577
|
+
onClick: k,
|
|
24570
24578
|
children: ["Show ", n ? "less" : "more"]
|
|
24571
24579
|
})
|
|
24572
24580
|
]
|
|
@@ -24580,8 +24588,8 @@ var I2 = 10, Mi = ({ data: t, label: r, title: c, tooltip: a, enableSearch: s =
|
|
|
24580
24588
|
v,
|
|
24581
24589
|
u,
|
|
24582
24590
|
c,
|
|
24583
|
-
|
|
24584
|
-
|
|
24591
|
+
k,
|
|
24592
|
+
R,
|
|
24585
24593
|
a
|
|
24586
24594
|
]);
|
|
24587
24595
|
return /* @__PURE__ */ l("div", {
|
|
@@ -25138,10 +25146,10 @@ var I2 = 10, Mi = ({ data: t, label: r, title: c, tooltip: a, enableSearch: s =
|
|
|
25138
25146
|
if (C) {
|
|
25139
25147
|
let _ = document.getElementById(G2);
|
|
25140
25148
|
_ || (_ = document.createElement("link"), _.id = G2, _.rel = "stylesheet", document.head.appendChild(_)), _.href = C.fontUrl;
|
|
25141
|
-
let
|
|
25142
|
-
C.fontUrlDisplay ? (
|
|
25143
|
-
let
|
|
25144
|
-
C.fontUrlMono ? (
|
|
25149
|
+
let k = document.getElementById(Z2);
|
|
25150
|
+
C.fontUrlDisplay ? (k || (k = document.createElement("link"), k.id = Z2, k.rel = "stylesheet", document.head.appendChild(k)), k.href = C.fontUrlDisplay) : k?.remove();
|
|
25151
|
+
let R = document.getElementById(j2);
|
|
25152
|
+
C.fontUrlMono ? (R || (R = document.createElement("link"), R.id = j2, R.rel = "stylesheet", document.head.appendChild(R)), R.href = C.fontUrlMono) : R?.remove();
|
|
25145
25153
|
}
|
|
25146
25154
|
}, [p]);
|
|
25147
25155
|
const g = P((C) => {
|
|
@@ -25152,19 +25160,19 @@ var I2 = 10, Mi = ({ data: t, label: r, title: c, tooltip: a, enableSearch: s =
|
|
|
25152
25160
|
o(null), n(null);
|
|
25153
25161
|
}, []);
|
|
25154
25162
|
Y(() => {
|
|
25155
|
-
const C = (
|
|
25156
|
-
if (!(
|
|
25157
|
-
const
|
|
25158
|
-
return
|
|
25159
|
-
}, _ = (
|
|
25160
|
-
if (!(
|
|
25161
|
-
if (
|
|
25162
|
-
|
|
25163
|
-
const
|
|
25163
|
+
const C = (k) => {
|
|
25164
|
+
if (!(k instanceof HTMLElement)) return !1;
|
|
25165
|
+
const R = k.tagName;
|
|
25166
|
+
return R === "INPUT" || R === "TEXTAREA" || R === "SELECT" || k.isContentEditable;
|
|
25167
|
+
}, _ = (k) => {
|
|
25168
|
+
if (!(k.ctrlKey || k.metaKey || k.altKey) && !C(k.target))
|
|
25169
|
+
if (k.key === "[" || k.key === "]") {
|
|
25170
|
+
k.preventDefault();
|
|
25171
|
+
const R = v0.map((x) => x.value), z = s && s.length > 0 ? R.filter((x) => s.includes(x)) : R;
|
|
25164
25172
|
if (z.length === 0) return;
|
|
25165
|
-
const M = z.indexOf(p), V = ((M === -1 ? 0 : M) + (
|
|
25173
|
+
const M = z.indexOf(p), V = ((M === -1 ? 0 : M) + (k.key === "]" ? 1 : -1) + z.length) % z.length;
|
|
25166
25174
|
o(z[V]);
|
|
25167
|
-
} else
|
|
25175
|
+
} else k.key === "Escape" && d && (k.preventDefault(), o(null), n(null));
|
|
25168
25176
|
};
|
|
25169
25177
|
return window.addEventListener("keydown", _), () => window.removeEventListener("keydown", _);
|
|
25170
25178
|
}, [
|
|
@@ -25308,54 +25316,54 @@ var I2 = 10, Mi = ({ data: t, label: r, title: c, tooltip: a, enableSearch: s =
|
|
|
25308
25316
|
label: "Glow",
|
|
25309
25317
|
value: "glow-effect"
|
|
25310
25318
|
}
|
|
25311
|
-
], [f, y] = N(""), [b, C] = N(!1), [_,
|
|
25312
|
-
let
|
|
25319
|
+
], [f, y] = N(""), [b, C] = N(!1), [_, k] = N(!1), [R, z] = N("all"), M = X(null), V = X(!1), x = a?.trim().toLowerCase() ?? "", L = o1(() => {
|
|
25320
|
+
let S = v0;
|
|
25313
25321
|
if (c && c.length > 0) {
|
|
25314
25322
|
const D = new Set(c);
|
|
25315
|
-
|
|
25323
|
+
S = S.filter((B) => D.has(B.value));
|
|
25316
25324
|
}
|
|
25317
|
-
if (b && (
|
|
25325
|
+
if (b && (S = S.filter((D) => P2.has(D.value))), _ && x && (S = S.filter((D) => (D.recommendedApps ?? []).some((B) => B.toLowerCase() === x))), R !== "all" && (S = S.filter((D) => ua(D.value) === R)), f.trim()) {
|
|
25318
25326
|
const D = f.toLowerCase().trim();
|
|
25319
|
-
|
|
25327
|
+
S = S.filter((B) => B.label.toLowerCase().includes(D) || (B.recommendedApps ?? []).some((U) => U.toLowerCase().includes(D)));
|
|
25320
25328
|
}
|
|
25321
|
-
return
|
|
25329
|
+
return S;
|
|
25322
25330
|
}, [
|
|
25323
25331
|
f,
|
|
25324
25332
|
b,
|
|
25325
25333
|
_,
|
|
25326
|
-
|
|
25327
|
-
|
|
25334
|
+
x,
|
|
25335
|
+
R,
|
|
25328
25336
|
c
|
|
25329
25337
|
]);
|
|
25330
25338
|
Y(() => {
|
|
25331
|
-
t ? (y(""), C(!1),
|
|
25339
|
+
t ? (y(""), C(!1), k(!1), z("all")) : V.current = !1;
|
|
25332
25340
|
}, [t]), Y(() => {
|
|
25333
|
-
if (!t || f || b || _ ||
|
|
25334
|
-
const
|
|
25341
|
+
if (!t || f || b || _ || R !== "all" || V.current) return;
|
|
25342
|
+
const S = window.requestAnimationFrame(() => {
|
|
25335
25343
|
M.current?.scrollIntoView({
|
|
25336
25344
|
block: "center",
|
|
25337
25345
|
inline: "nearest"
|
|
25338
25346
|
}), V.current = !0;
|
|
25339
25347
|
});
|
|
25340
|
-
return () => window.cancelAnimationFrame(
|
|
25348
|
+
return () => window.cancelAnimationFrame(S);
|
|
25341
25349
|
}, [
|
|
25342
25350
|
t,
|
|
25343
25351
|
f,
|
|
25344
25352
|
b,
|
|
25345
25353
|
_,
|
|
25346
|
-
|
|
25354
|
+
R,
|
|
25347
25355
|
n
|
|
25348
25356
|
]);
|
|
25349
|
-
const H = (
|
|
25350
|
-
h(
|
|
25351
|
-
}, A = (
|
|
25352
|
-
const D = !
|
|
25357
|
+
const H = (S) => {
|
|
25358
|
+
h(S);
|
|
25359
|
+
}, A = (S) => {
|
|
25360
|
+
const D = !S || Array.isArray(S) ? "" : S.value;
|
|
25353
25361
|
p({
|
|
25354
25362
|
effect: D,
|
|
25355
25363
|
components: i.components
|
|
25356
25364
|
});
|
|
25357
|
-
}, $ = (
|
|
25358
|
-
const B = D ? [...i.components,
|
|
25365
|
+
}, $ = (S, D) => {
|
|
25366
|
+
const B = D ? [...i.components, S] : i.components.filter((U) => U !== S);
|
|
25359
25367
|
p({
|
|
25360
25368
|
effect: i.effect,
|
|
25361
25369
|
components: B
|
|
@@ -25403,7 +25411,7 @@ var I2 = 10, Mi = ({ data: t, label: r, title: c, tooltip: a, enableSearch: s =
|
|
|
25403
25411
|
}),
|
|
25404
25412
|
a && /* @__PURE__ */ e(W2, {
|
|
25405
25413
|
checked: _,
|
|
25406
|
-
onChange:
|
|
25414
|
+
onChange: k,
|
|
25407
25415
|
onLabel: `For ${a}`,
|
|
25408
25416
|
offLabel: `For ${a}`,
|
|
25409
25417
|
size: "small"
|
|
@@ -25419,28 +25427,28 @@ var I2 = 10, Mi = ({ data: t, label: r, title: c, tooltip: a, enableSearch: s =
|
|
|
25419
25427
|
}),
|
|
25420
25428
|
m && /* @__PURE__ */ e("div", {
|
|
25421
25429
|
className: "theme-settings__appearance",
|
|
25422
|
-
children: wa.map((
|
|
25430
|
+
children: wa.map((S) => /* @__PURE__ */ e("button", {
|
|
25423
25431
|
type: "button",
|
|
25424
|
-
className: `theme-settings__appearance-option ${
|
|
25425
|
-
onClick: () => z(
|
|
25426
|
-
children:
|
|
25427
|
-
},
|
|
25432
|
+
className: `theme-settings__appearance-option ${R === S.value ? "theme-settings__appearance-option--active" : ""}`,
|
|
25433
|
+
onClick: () => z(S.value),
|
|
25434
|
+
children: S.label
|
|
25435
|
+
}, S.value))
|
|
25428
25436
|
}),
|
|
25429
25437
|
/* @__PURE__ */ e("div", {
|
|
25430
25438
|
className: "theme-settings__grid",
|
|
25431
|
-
children:
|
|
25439
|
+
children: L.length === 0 ? /* @__PURE__ */ e("div", {
|
|
25432
25440
|
className: "theme-settings__empty",
|
|
25433
25441
|
children: "No themes found"
|
|
25434
|
-
}) :
|
|
25435
|
-
ref: n ===
|
|
25442
|
+
}) : L.map((S) => /* @__PURE__ */ l("button", {
|
|
25443
|
+
ref: n === S.value ? M : null,
|
|
25436
25444
|
type: "button",
|
|
25437
|
-
className: `theme-settings__swatch ${n ===
|
|
25438
|
-
onClick: () => H(
|
|
25445
|
+
className: `theme-settings__swatch ${n === S.value ? "theme-settings__swatch--active" : ""}`,
|
|
25446
|
+
onClick: () => H(S.value),
|
|
25439
25447
|
children: [/* @__PURE__ */ l("div", {
|
|
25440
25448
|
className: "theme-settings__preview",
|
|
25441
|
-
"data-theme":
|
|
25449
|
+
"data-theme": S.value,
|
|
25442
25450
|
children: [
|
|
25443
|
-
P2.has(
|
|
25451
|
+
P2.has(S.value) && /* @__PURE__ */ e("span", {
|
|
25444
25452
|
className: "theme-settings__favorite-badge",
|
|
25445
25453
|
children: "⭐"
|
|
25446
25454
|
}),
|
|
@@ -25468,10 +25476,10 @@ var I2 = 10, Mi = ({ data: t, label: r, title: c, tooltip: a, enableSearch: s =
|
|
|
25468
25476
|
className: "theme-settings__swatch-meta",
|
|
25469
25477
|
children: /* @__PURE__ */ e("span", {
|
|
25470
25478
|
className: "theme-settings__swatch-label",
|
|
25471
|
-
children:
|
|
25479
|
+
children: S.label
|
|
25472
25480
|
})
|
|
25473
25481
|
})]
|
|
25474
|
-
},
|
|
25482
|
+
}, S.value))
|
|
25475
25483
|
})
|
|
25476
25484
|
]
|
|
25477
25485
|
}), s && /* @__PURE__ */ l(h1, { children: [/* @__PURE__ */ l("div", {
|
|
@@ -25491,12 +25499,12 @@ var I2 = 10, Mi = ({ data: t, label: r, title: c, tooltip: a, enableSearch: s =
|
|
|
25491
25499
|
className: "theme-settings__section",
|
|
25492
25500
|
children: [/* @__PURE__ */ e("label", { children: "Apply Effect To:" }), /* @__PURE__ */ e("div", {
|
|
25493
25501
|
className: "theme-settings__components",
|
|
25494
|
-
children: u.map((
|
|
25495
|
-
label:
|
|
25496
|
-
checked: i.components.includes(
|
|
25497
|
-
onChange: (D) => $(
|
|
25502
|
+
children: u.map((S) => /* @__PURE__ */ e(c0, {
|
|
25503
|
+
label: S,
|
|
25504
|
+
checked: i.components.includes(S),
|
|
25505
|
+
onChange: (D) => $(S, D),
|
|
25498
25506
|
disabled: !i.effect
|
|
25499
|
-
},
|
|
25507
|
+
}, S))
|
|
25500
25508
|
})]
|
|
25501
25509
|
})] })]
|
|
25502
25510
|
})
|
|
@@ -25857,29 +25865,29 @@ var I2 = 10, Mi = ({ data: t, label: r, title: c, tooltip: a, enableSearch: s =
|
|
|
25857
25865
|
});
|
|
25858
25866
|
}, xa = 96, ka = 6;
|
|
25859
25867
|
function Hi({ items: t, renderItem: r, getKey: c, rowHeight: a, overscan: s = ka, maxHeight: d, empty: o, className: m = "", rowClassName: n = "" }) {
|
|
25860
|
-
const i = X(null), [h, p] = N(0), [v, g] = N(0), [u, w] = N(() => window.innerHeight), [f, y] = N(xa), b = a && a > 0 ? a : f, C = P((
|
|
25861
|
-
p(
|
|
25868
|
+
const i = X(null), [h, p] = N(0), [v, g] = N(0), [u, w] = N(() => window.innerHeight), [f, y] = N(xa), b = a && a > 0 ? a : f, C = P((L) => {
|
|
25869
|
+
p(L.currentTarget.scrollTop);
|
|
25862
25870
|
}, []);
|
|
25863
25871
|
Y(() => {
|
|
25864
|
-
const
|
|
25865
|
-
return window.addEventListener("resize",
|
|
25872
|
+
const L = () => w(window.innerHeight);
|
|
25873
|
+
return window.addEventListener("resize", L), () => window.removeEventListener("resize", L);
|
|
25866
25874
|
}, []), Y(() => {
|
|
25867
|
-
const
|
|
25868
|
-
if (!
|
|
25875
|
+
const L = i.current;
|
|
25876
|
+
if (!L) return;
|
|
25869
25877
|
const H = new ResizeObserver((A) => {
|
|
25870
25878
|
const $ = A[0]?.contentRect.height ?? 0;
|
|
25871
25879
|
g((F) => Math.abs(F - $) > 0.5 ? $ : F);
|
|
25872
25880
|
});
|
|
25873
|
-
return H.observe(
|
|
25881
|
+
return H.observe(L), g(L.clientHeight), () => H.disconnect();
|
|
25874
25882
|
}, []), _2(() => {
|
|
25875
25883
|
i.current && (i.current.scrollTop = 0), p(0);
|
|
25876
25884
|
}, [t]);
|
|
25877
|
-
const _ = t.length,
|
|
25885
|
+
const _ = t.length, k = Math.ceil(Math.min(v || u, u) / b), R = Math.max(1, k + s * 2), z = Math.max(0, _ - R), M = Math.min(z, Math.max(0, Math.floor(h / b) - s)), V = Math.min(_, M + R), x = Math.max(0, _ - V);
|
|
25878
25886
|
return _2(() => {
|
|
25879
25887
|
if (a) return;
|
|
25880
|
-
const
|
|
25881
|
-
if (!
|
|
25882
|
-
const H =
|
|
25888
|
+
const L = i.current;
|
|
25889
|
+
if (!L) return;
|
|
25890
|
+
const H = L.querySelectorAll("[data-virtual-row]"), A = H[0];
|
|
25883
25891
|
if (!A) return;
|
|
25884
25892
|
const $ = H[1] ? H[1].offsetTop - A.offsetTop : A.offsetHeight;
|
|
25885
25893
|
$ > 0 && y((F) => Math.abs(F - $) > 0.5 ? $ : F);
|
|
@@ -25897,17 +25905,17 @@ function Hi({ items: t, renderItem: r, getKey: c, rowHeight: a, overscan: s = ka
|
|
|
25897
25905
|
className: "virtual-list__spacer",
|
|
25898
25906
|
style: { height: M * b }
|
|
25899
25907
|
}),
|
|
25900
|
-
t.slice(M, V).map((
|
|
25908
|
+
t.slice(M, V).map((L, H) => {
|
|
25901
25909
|
const A = M + H;
|
|
25902
25910
|
return /* @__PURE__ */ e("div", {
|
|
25903
25911
|
className: `virtual-list__row ${n}`.trim(),
|
|
25904
25912
|
"data-virtual-row": "",
|
|
25905
|
-
children: r(
|
|
25906
|
-
}, c(
|
|
25913
|
+
children: r(L, A)
|
|
25914
|
+
}, c(L, A));
|
|
25907
25915
|
}),
|
|
25908
|
-
|
|
25916
|
+
x > 0 && /* @__PURE__ */ e("div", {
|
|
25909
25917
|
className: "virtual-list__spacer",
|
|
25910
|
-
style: { height:
|
|
25918
|
+
style: { height: x * b }
|
|
25911
25919
|
})
|
|
25912
25920
|
]
|
|
25913
25921
|
});
|
|
@@ -26163,8 +26171,8 @@ function Bi({ isOpen: t, onClose: r }) {
|
|
|
26163
26171
|
})
|
|
26164
26172
|
});
|
|
26165
26173
|
if (!_.ok) {
|
|
26166
|
-
const
|
|
26167
|
-
throw new Error(
|
|
26174
|
+
const k = await _.json();
|
|
26175
|
+
throw new Error(k.error || "Failed to change password");
|
|
26168
26176
|
}
|
|
26169
26177
|
u({
|
|
26170
26178
|
message: "Password changed successfully!",
|
|
@@ -26259,7 +26267,7 @@ function Bi({ isOpen: t, onClose: r }) {
|
|
|
26259
26267
|
});
|
|
26260
26268
|
}
|
|
26261
26269
|
function Ai({ redirectPath: t = "/" }) {
|
|
26262
|
-
const { login: r, verifyMfa: c, config: a, isAuthenticated: s } = f2(), [d, o] = N("credentials"), [m, n] = N(""), [i, h] = N(""), [p, v] = N(!1), [g, u] = N("totp"), [w, f] = N(""), [y, b] = N(!1), [C, _] = N(""), [
|
|
26270
|
+
const { login: r, verifyMfa: c, config: a, isAuthenticated: s } = f2(), [d, o] = N("credentials"), [m, n] = N(""), [i, h] = N(""), [p, v] = N(!1), [g, u] = N("totp"), [w, f] = N(""), [y, b] = N(!1), [C, _] = N(""), [k, R] = N(!1), [z, M] = N(!1);
|
|
26263
26271
|
Y(() => {
|
|
26264
26272
|
s && (window.location.href = t);
|
|
26265
26273
|
}, [s, t]), Y(() => {
|
|
@@ -26274,7 +26282,7 @@ function Ai({ redirectPath: t = "/" }) {
|
|
|
26274
26282
|
_("Username and password are required");
|
|
26275
26283
|
return;
|
|
26276
26284
|
}
|
|
26277
|
-
|
|
26285
|
+
R(!0);
|
|
26278
26286
|
try {
|
|
26279
26287
|
const $ = await r({
|
|
26280
26288
|
username: m,
|
|
@@ -26285,22 +26293,22 @@ function Ai({ redirectPath: t = "/" }) {
|
|
|
26285
26293
|
} catch ($) {
|
|
26286
26294
|
_($ instanceof Error ? $.message : "Login failed. Please try again.");
|
|
26287
26295
|
} finally {
|
|
26288
|
-
|
|
26296
|
+
R(!1);
|
|
26289
26297
|
}
|
|
26290
|
-
},
|
|
26298
|
+
}, x = async (A) => {
|
|
26291
26299
|
if (A.preventDefault(), _(""), !w.trim()) {
|
|
26292
26300
|
_("Enter the verification code");
|
|
26293
26301
|
return;
|
|
26294
26302
|
}
|
|
26295
|
-
|
|
26303
|
+
R(!0);
|
|
26296
26304
|
try {
|
|
26297
26305
|
await c(w.trim(), y);
|
|
26298
26306
|
} catch ($) {
|
|
26299
26307
|
_($ instanceof Error ? $.message : "Verification failed. Please try again.");
|
|
26300
26308
|
} finally {
|
|
26301
|
-
|
|
26309
|
+
R(!1);
|
|
26302
26310
|
}
|
|
26303
|
-
},
|
|
26311
|
+
}, L = () => {
|
|
26304
26312
|
o("credentials"), f(""), _("");
|
|
26305
26313
|
}, H = g === "email" ? "Enter the code we emailed you. You can also use a recovery code." : "Enter the code from your authenticator app. You can also use a recovery code.";
|
|
26306
26314
|
return /* @__PURE__ */ l(h1, { children: [/* @__PURE__ */ e("div", {
|
|
@@ -26320,20 +26328,20 @@ function Ai({ redirectPath: t = "/" }) {
|
|
|
26320
26328
|
onChange: (A) => n(A),
|
|
26321
26329
|
required: !0,
|
|
26322
26330
|
autoFocus: !0,
|
|
26323
|
-
disabled:
|
|
26331
|
+
disabled: k
|
|
26324
26332
|
}),
|
|
26325
26333
|
/* @__PURE__ */ e(w0, {
|
|
26326
26334
|
placeholder: "Password",
|
|
26327
26335
|
value: i,
|
|
26328
26336
|
onChange: (A) => h(A),
|
|
26329
26337
|
required: !0,
|
|
26330
|
-
disabled:
|
|
26338
|
+
disabled: k
|
|
26331
26339
|
}),
|
|
26332
26340
|
/* @__PURE__ */ e(c0, {
|
|
26333
26341
|
checked: p,
|
|
26334
26342
|
onChange: (A) => v(A),
|
|
26335
26343
|
label: "Keep me logged in",
|
|
26336
|
-
disabled:
|
|
26344
|
+
disabled: k
|
|
26337
26345
|
}),
|
|
26338
26346
|
C && /* @__PURE__ */ e("div", {
|
|
26339
26347
|
className: "LoginPage__error",
|
|
@@ -26343,13 +26351,13 @@ function Ai({ redirectPath: t = "/" }) {
|
|
|
26343
26351
|
type: "submit",
|
|
26344
26352
|
variant: "info",
|
|
26345
26353
|
icon: "key",
|
|
26346
|
-
loading:
|
|
26354
|
+
loading: k,
|
|
26347
26355
|
fullWidth: !0,
|
|
26348
26356
|
children: "Sign In"
|
|
26349
26357
|
})
|
|
26350
26358
|
]
|
|
26351
26359
|
}) : /* @__PURE__ */ l("form", {
|
|
26352
|
-
onSubmit:
|
|
26360
|
+
onSubmit: x,
|
|
26353
26361
|
className: "LoginPage__form",
|
|
26354
26362
|
children: [
|
|
26355
26363
|
/* @__PURE__ */ e("p", {
|
|
@@ -26362,13 +26370,13 @@ function Ai({ redirectPath: t = "/" }) {
|
|
|
26362
26370
|
onChange: (A) => f(A),
|
|
26363
26371
|
required: !0,
|
|
26364
26372
|
autoFocus: !0,
|
|
26365
|
-
disabled:
|
|
26373
|
+
disabled: k
|
|
26366
26374
|
}),
|
|
26367
26375
|
/* @__PURE__ */ e(c0, {
|
|
26368
26376
|
checked: y,
|
|
26369
26377
|
onChange: (A) => b(A),
|
|
26370
26378
|
label: "Trust this device for 90 days",
|
|
26371
|
-
disabled:
|
|
26379
|
+
disabled: k
|
|
26372
26380
|
}),
|
|
26373
26381
|
C && /* @__PURE__ */ e("div", {
|
|
26374
26382
|
className: "LoginPage__error",
|
|
@@ -26378,7 +26386,7 @@ function Ai({ redirectPath: t = "/" }) {
|
|
|
26378
26386
|
type: "submit",
|
|
26379
26387
|
variant: "info",
|
|
26380
26388
|
icon: "key",
|
|
26381
|
-
loading:
|
|
26389
|
+
loading: k,
|
|
26382
26390
|
fullWidth: !0,
|
|
26383
26391
|
children: "Verify"
|
|
26384
26392
|
}),
|
|
@@ -26386,9 +26394,9 @@ function Ai({ redirectPath: t = "/" }) {
|
|
|
26386
26394
|
type: "button",
|
|
26387
26395
|
variant: "default",
|
|
26388
26396
|
icon: "clear",
|
|
26389
|
-
disabled:
|
|
26397
|
+
disabled: k,
|
|
26390
26398
|
fullWidth: !0,
|
|
26391
|
-
onClick:
|
|
26399
|
+
onClick: L,
|
|
26392
26400
|
children: "Back"
|
|
26393
26401
|
})
|
|
26394
26402
|
]
|
|
@@ -26533,14 +26541,14 @@ var Va = Object.defineProperty, T0 = Object.getOwnPropertySymbols, b3 = Object.p
|
|
|
26533
26541
|
let f = [];
|
|
26534
26542
|
const y = d1.reedSolomonComputeDivisor(v);
|
|
26535
26543
|
for (let C = 0, _ = 0; C < p; C++) {
|
|
26536
|
-
let
|
|
26537
|
-
_ +=
|
|
26538
|
-
const
|
|
26539
|
-
C < u &&
|
|
26544
|
+
let k = n.slice(_, _ + w - v + (C < u ? 0 : 1));
|
|
26545
|
+
_ += k.length;
|
|
26546
|
+
const R = d1.reedSolomonComputeRemainder(k, y);
|
|
26547
|
+
C < u && k.push(0), f.push(k.concat(R));
|
|
26540
26548
|
}
|
|
26541
26549
|
let b = [];
|
|
26542
|
-
for (let C = 0; C < f[0].length; C++) f.forEach((_,
|
|
26543
|
-
(C != w - v ||
|
|
26550
|
+
for (let C = 0; C < f[0].length; C++) f.forEach((_, k) => {
|
|
26551
|
+
(C != w - v || k >= u) && b.push(_[C]);
|
|
26544
26552
|
});
|
|
26545
26553
|
return s(b.length == g), b;
|
|
26546
26554
|
}
|
|
@@ -27270,7 +27278,7 @@ var $a = (function() {
|
|
|
27270
27278
|
"imageSettings"
|
|
27271
27279
|
]), { style: w } = u, f = h2(u, ["style"]), y = g?.src, b = w1.useRef(null), C = w1.useRef(null), _ = w1.useCallback((A) => {
|
|
27272
27280
|
b.current = A, typeof c == "function" ? c(A) : c && (c.current = A);
|
|
27273
|
-
}, [c]), [
|
|
27281
|
+
}, [c]), [k, R] = w1.useState(!1), { margin: z, cells: M, numCells: V, calculatedImageSettings: x } = S3({
|
|
27274
27282
|
value: s,
|
|
27275
27283
|
level: o,
|
|
27276
27284
|
minVersion: h,
|
|
@@ -27285,8 +27293,8 @@ var $a = (function() {
|
|
|
27285
27293
|
const A = b.current, $ = A.getContext("2d");
|
|
27286
27294
|
if (!$) return;
|
|
27287
27295
|
let F = M;
|
|
27288
|
-
const
|
|
27289
|
-
|
|
27296
|
+
const t1 = C.current, S = x != null && t1 !== null && t1.complete && t1.naturalHeight !== 0 && t1.naturalWidth !== 0;
|
|
27297
|
+
S && x.excavation != null && (F = H3(M, x.excavation));
|
|
27290
27298
|
const D = window.devicePixelRatio || 1;
|
|
27291
27299
|
A.height = A.width = d * D;
|
|
27292
27300
|
const B = d / V * D;
|
|
@@ -27294,12 +27302,12 @@ var $a = (function() {
|
|
|
27294
27302
|
U.forEach(function(K, e1) {
|
|
27295
27303
|
K && $.fillRect(e1 + z, O + z, 1, 1);
|
|
27296
27304
|
});
|
|
27297
|
-
}),
|
|
27305
|
+
}), x && ($.globalAlpha = x.opacity), S && $.drawImage(t1, x.x + z, x.y + z, x.w, x.h);
|
|
27298
27306
|
}
|
|
27299
27307
|
}), w1.useEffect(() => {
|
|
27300
|
-
|
|
27308
|
+
R(!1);
|
|
27301
27309
|
}, [y]);
|
|
27302
|
-
const
|
|
27310
|
+
const L = s2({
|
|
27303
27311
|
height: d,
|
|
27304
27312
|
width: d
|
|
27305
27313
|
}, w);
|
|
@@ -27309,12 +27317,12 @@ var $a = (function() {
|
|
|
27309
27317
|
key: y,
|
|
27310
27318
|
style: { display: "none" },
|
|
27311
27319
|
onLoad: () => {
|
|
27312
|
-
|
|
27320
|
+
R(!0);
|
|
27313
27321
|
},
|
|
27314
27322
|
ref: C,
|
|
27315
|
-
crossOrigin:
|
|
27323
|
+
crossOrigin: x?.crossOrigin
|
|
27316
27324
|
})), /* @__PURE__ */ w1.createElement(w1.Fragment, null, /* @__PURE__ */ w1.createElement("canvas", s2({
|
|
27317
|
-
style:
|
|
27325
|
+
style: L,
|
|
27318
27326
|
height: d,
|
|
27319
27327
|
width: d,
|
|
27320
27328
|
ref: _,
|
|
@@ -27345,8 +27353,8 @@ var R3 = w1.forwardRef(function(r, c) {
|
|
|
27345
27353
|
imageSettings: u,
|
|
27346
27354
|
size: d
|
|
27347
27355
|
});
|
|
27348
|
-
let _ = y,
|
|
27349
|
-
u != null && C != null && (C.excavation != null && (_ = H3(y, C.excavation)),
|
|
27356
|
+
let _ = y, k = null;
|
|
27357
|
+
u != null && C != null && (C.excavation != null && (_ = H3(y, C.excavation)), k = /* @__PURE__ */ w1.createElement("image", {
|
|
27350
27358
|
href: u.src,
|
|
27351
27359
|
height: C.h,
|
|
27352
27360
|
width: C.w,
|
|
@@ -27356,7 +27364,7 @@ var R3 = w1.forwardRef(function(r, c) {
|
|
|
27356
27364
|
opacity: C.opacity,
|
|
27357
27365
|
crossOrigin: C.crossOrigin
|
|
27358
27366
|
}));
|
|
27359
|
-
const
|
|
27367
|
+
const R = N3(_, f);
|
|
27360
27368
|
return /* @__PURE__ */ w1.createElement("svg", s2({
|
|
27361
27369
|
height: d,
|
|
27362
27370
|
width: d,
|
|
@@ -27369,14 +27377,14 @@ var R3 = w1.forwardRef(function(r, c) {
|
|
|
27369
27377
|
shapeRendering: "crispEdges"
|
|
27370
27378
|
}), /* @__PURE__ */ w1.createElement("path", {
|
|
27371
27379
|
fill: n,
|
|
27372
|
-
d:
|
|
27380
|
+
d: R,
|
|
27373
27381
|
shapeRendering: "crispEdges"
|
|
27374
|
-
}),
|
|
27382
|
+
}), k);
|
|
27375
27383
|
});
|
|
27376
27384
|
R3.displayName = "QRCodeSVG";
|
|
27377
27385
|
function Ei({ isOpen: t, onClose: r }) {
|
|
27378
|
-
const { config: c } = f2(), [a, s] = N("loading"), [d, o] = N(!1), [m, n] = N(null), [i, h] = N(""), [p, v] = N(""), [g, u] = N(""), [w, f] = N(""), [y, b] = N([]), [C, _] = N(""), [
|
|
27379
|
-
const
|
|
27386
|
+
const { config: c } = f2(), [a, s] = N("loading"), [d, o] = N(!1), [m, n] = N(null), [i, h] = N(""), [p, v] = N(""), [g, u] = N(""), [w, f] = N(""), [y, b] = N([]), [C, _] = N(""), [k, R] = N(!1), [z, M] = N(null), V = P(async (K, e1) => {
|
|
27387
|
+
const c1 = document.cookie.match(/(?:^|;\s*)csrf_token=([^;]+)/), q = c1 ? decodeURIComponent(c1[1]) : null, u1 = { "Content-Type": "application/json" };
|
|
27380
27388
|
q && (u1["X-CSRF-Token"] = q);
|
|
27381
27389
|
const g1 = await fetch(`${c.apiBaseUrl}${K}`, {
|
|
27382
27390
|
method: "POST",
|
|
@@ -27386,7 +27394,7 @@ function Ei({ isOpen: t, onClose: r }) {
|
|
|
27386
27394
|
}), b1 = await g1.json().catch(() => ({}));
|
|
27387
27395
|
if (!g1.ok) throw new Error(b1.error || "Request failed");
|
|
27388
27396
|
return b1;
|
|
27389
|
-
}, [c.apiBaseUrl]),
|
|
27397
|
+
}, [c.apiBaseUrl]), x = P(async () => {
|
|
27390
27398
|
s("loading"), _("");
|
|
27391
27399
|
try {
|
|
27392
27400
|
const K = await (await fetch(`${c.apiBaseUrl}/auth/mfaStatus`, { credentials: "include" })).json();
|
|
@@ -27396,37 +27404,37 @@ function Ei({ isOpen: t, onClose: r }) {
|
|
|
27396
27404
|
}
|
|
27397
27405
|
}, [c.apiBaseUrl]);
|
|
27398
27406
|
Y(() => {
|
|
27399
|
-
t && (u(""), f(""), _(""), b([]),
|
|
27400
|
-
}, [t,
|
|
27401
|
-
const
|
|
27402
|
-
|
|
27407
|
+
t && (u(""), f(""), _(""), b([]), x());
|
|
27408
|
+
}, [t, x]);
|
|
27409
|
+
const L = async (K) => {
|
|
27410
|
+
R(!0), _("");
|
|
27403
27411
|
try {
|
|
27404
27412
|
await K();
|
|
27405
27413
|
} catch (e1) {
|
|
27406
27414
|
_(e1 instanceof Error ? e1.message : "Something went wrong.");
|
|
27407
27415
|
} finally {
|
|
27408
|
-
|
|
27416
|
+
R(!1);
|
|
27409
27417
|
}
|
|
27410
|
-
}, H = () =>
|
|
27418
|
+
}, H = () => L(async () => {
|
|
27411
27419
|
const K = await V("/auth/mfaSetupTotp");
|
|
27412
27420
|
h(K.secret || ""), v(K.otpauthUri || ""), u(""), s("totp-setup");
|
|
27413
|
-
}), A = () =>
|
|
27421
|
+
}), A = () => L(async () => {
|
|
27414
27422
|
const K = await V("/auth/mfaConfirmTotp", { code: g.trim() });
|
|
27415
27423
|
b(K.recoveryCodes || []), s("recovery");
|
|
27416
|
-
}), $ = () =>
|
|
27424
|
+
}), $ = () => L(async () => {
|
|
27417
27425
|
await V("/auth/mfaEnableEmail"), u(""), s("email-setup");
|
|
27418
|
-
}), F = () =>
|
|
27426
|
+
}), F = () => L(async () => {
|
|
27419
27427
|
const K = await V("/auth/mfaConfirmEmail", { code: g.trim() });
|
|
27420
27428
|
b(K.recoveryCodes || []), s("recovery");
|
|
27421
|
-
}),
|
|
27429
|
+
}), t1 = () => L(async () => {
|
|
27422
27430
|
await V("/auth/mfaDisable", { password: w }), M({
|
|
27423
27431
|
message: "Two-factor authentication disabled.",
|
|
27424
27432
|
type: "success"
|
|
27425
|
-
}), f(""), await
|
|
27426
|
-
}),
|
|
27433
|
+
}), f(""), await x();
|
|
27434
|
+
}), S = () => L(async () => {
|
|
27427
27435
|
const K = await V("/auth/mfaRegenRecovery", { password: w });
|
|
27428
27436
|
b(K.recoveryCodes || []), f(""), s("recovery");
|
|
27429
|
-
}), D = () =>
|
|
27437
|
+
}), D = () => L(async () => {
|
|
27430
27438
|
await V("/auth/mfaForgetDevices"), M({
|
|
27431
27439
|
message: "All trusted devices have been signed out.",
|
|
27432
27440
|
type: "success"
|
|
@@ -27463,22 +27471,22 @@ function Ei({ isOpen: t, onClose: r }) {
|
|
|
27463
27471
|
/* @__PURE__ */ e(I, {
|
|
27464
27472
|
variant: "default",
|
|
27465
27473
|
fullWidth: !0,
|
|
27466
|
-
disabled:
|
|
27474
|
+
disabled: k,
|
|
27467
27475
|
onClick: () => s("regen"),
|
|
27468
27476
|
children: "Regenerate recovery codes"
|
|
27469
27477
|
}),
|
|
27470
27478
|
/* @__PURE__ */ e(I, {
|
|
27471
27479
|
variant: "default",
|
|
27472
27480
|
fullWidth: !0,
|
|
27473
|
-
disabled:
|
|
27474
|
-
onClick: () =>
|
|
27481
|
+
disabled: k,
|
|
27482
|
+
onClick: () => L(D),
|
|
27475
27483
|
children: "Sign out trusted devices"
|
|
27476
27484
|
}),
|
|
27477
27485
|
/* @__PURE__ */ e(I, {
|
|
27478
27486
|
variant: "danger",
|
|
27479
27487
|
icon: "lock",
|
|
27480
27488
|
fullWidth: !0,
|
|
27481
|
-
disabled:
|
|
27489
|
+
disabled: k,
|
|
27482
27490
|
onClick: () => s("disable"),
|
|
27483
27491
|
children: "Disable two-factor"
|
|
27484
27492
|
})
|
|
@@ -27490,14 +27498,14 @@ function Ei({ isOpen: t, onClose: r }) {
|
|
|
27490
27498
|
/* @__PURE__ */ e(I, {
|
|
27491
27499
|
variant: "info",
|
|
27492
27500
|
fullWidth: !0,
|
|
27493
|
-
disabled:
|
|
27501
|
+
disabled: k,
|
|
27494
27502
|
onClick: H,
|
|
27495
27503
|
children: "Set up authenticator app"
|
|
27496
27504
|
}),
|
|
27497
27505
|
/* @__PURE__ */ e(I, {
|
|
27498
27506
|
variant: "default",
|
|
27499
27507
|
fullWidth: !0,
|
|
27500
|
-
disabled:
|
|
27508
|
+
disabled: k,
|
|
27501
27509
|
onClick: $,
|
|
27502
27510
|
children: "Set up email codes"
|
|
27503
27511
|
})
|
|
@@ -27532,13 +27540,13 @@ function Ei({ isOpen: t, onClose: r }) {
|
|
|
27532
27540
|
value: g,
|
|
27533
27541
|
onChange: u,
|
|
27534
27542
|
autoFocus: !0,
|
|
27535
|
-
disabled:
|
|
27543
|
+
disabled: k
|
|
27536
27544
|
}),
|
|
27537
27545
|
/* @__PURE__ */ e(I, {
|
|
27538
27546
|
variant: "info",
|
|
27539
27547
|
icon: "key",
|
|
27540
27548
|
fullWidth: !0,
|
|
27541
|
-
loading:
|
|
27549
|
+
loading: k,
|
|
27542
27550
|
onClick: A,
|
|
27543
27551
|
children: "Verify & enable"
|
|
27544
27552
|
})
|
|
@@ -27557,20 +27565,20 @@ function Ei({ isOpen: t, onClose: r }) {
|
|
|
27557
27565
|
value: g,
|
|
27558
27566
|
onChange: u,
|
|
27559
27567
|
autoFocus: !0,
|
|
27560
|
-
disabled:
|
|
27568
|
+
disabled: k
|
|
27561
27569
|
}),
|
|
27562
27570
|
/* @__PURE__ */ e(I, {
|
|
27563
27571
|
variant: "info",
|
|
27564
27572
|
icon: "key",
|
|
27565
27573
|
fullWidth: !0,
|
|
27566
|
-
loading:
|
|
27574
|
+
loading: k,
|
|
27567
27575
|
onClick: F,
|
|
27568
27576
|
children: "Verify & enable"
|
|
27569
27577
|
}),
|
|
27570
27578
|
/* @__PURE__ */ e(I, {
|
|
27571
27579
|
variant: "default",
|
|
27572
27580
|
fullWidth: !0,
|
|
27573
|
-
disabled:
|
|
27581
|
+
disabled: k,
|
|
27574
27582
|
onClick: $,
|
|
27575
27583
|
children: "Resend code"
|
|
27576
27584
|
})
|
|
@@ -27596,15 +27604,15 @@ function Ei({ isOpen: t, onClose: r }) {
|
|
|
27596
27604
|
/* @__PURE__ */ e(I, {
|
|
27597
27605
|
variant: "default",
|
|
27598
27606
|
fullWidth: !0,
|
|
27599
|
-
disabled:
|
|
27607
|
+
disabled: k,
|
|
27600
27608
|
onClick: B,
|
|
27601
27609
|
children: "Copy codes"
|
|
27602
27610
|
}),
|
|
27603
27611
|
/* @__PURE__ */ e(I, {
|
|
27604
27612
|
variant: "success",
|
|
27605
27613
|
fullWidth: !0,
|
|
27606
|
-
disabled:
|
|
27607
|
-
onClick:
|
|
27614
|
+
disabled: k,
|
|
27615
|
+
onClick: x,
|
|
27608
27616
|
children: "I've saved them"
|
|
27609
27617
|
})
|
|
27610
27618
|
]
|
|
@@ -27622,21 +27630,21 @@ function Ei({ isOpen: t, onClose: r }) {
|
|
|
27622
27630
|
value: w,
|
|
27623
27631
|
onChange: f,
|
|
27624
27632
|
autoFocus: !0,
|
|
27625
|
-
disabled:
|
|
27633
|
+
disabled: k
|
|
27626
27634
|
}),
|
|
27627
27635
|
/* @__PURE__ */ e(I, {
|
|
27628
27636
|
variant: "danger",
|
|
27629
27637
|
icon: "lock",
|
|
27630
27638
|
fullWidth: !0,
|
|
27631
|
-
loading:
|
|
27632
|
-
onClick:
|
|
27639
|
+
loading: k,
|
|
27640
|
+
onClick: t1,
|
|
27633
27641
|
children: "Disable two-factor"
|
|
27634
27642
|
}),
|
|
27635
27643
|
/* @__PURE__ */ e(I, {
|
|
27636
27644
|
variant: "default",
|
|
27637
27645
|
icon: "clear",
|
|
27638
27646
|
fullWidth: !0,
|
|
27639
|
-
disabled:
|
|
27647
|
+
disabled: k,
|
|
27640
27648
|
onClick: () => s("overview"),
|
|
27641
27649
|
children: "Cancel"
|
|
27642
27650
|
})
|
|
@@ -27655,21 +27663,21 @@ function Ei({ isOpen: t, onClose: r }) {
|
|
|
27655
27663
|
value: w,
|
|
27656
27664
|
onChange: f,
|
|
27657
27665
|
autoFocus: !0,
|
|
27658
|
-
disabled:
|
|
27666
|
+
disabled: k
|
|
27659
27667
|
}),
|
|
27660
27668
|
/* @__PURE__ */ e(I, {
|
|
27661
27669
|
variant: "info",
|
|
27662
27670
|
icon: "key",
|
|
27663
27671
|
fullWidth: !0,
|
|
27664
|
-
loading:
|
|
27665
|
-
onClick:
|
|
27672
|
+
loading: k,
|
|
27673
|
+
onClick: S,
|
|
27666
27674
|
children: "Generate new codes"
|
|
27667
27675
|
}),
|
|
27668
27676
|
/* @__PURE__ */ e(I, {
|
|
27669
27677
|
variant: "default",
|
|
27670
27678
|
icon: "clear",
|
|
27671
27679
|
fullWidth: !0,
|
|
27672
|
-
disabled:
|
|
27680
|
+
disabled: k,
|
|
27673
27681
|
onClick: () => s("overview"),
|
|
27674
27682
|
children: "Cancel"
|
|
27675
27683
|
})
|
|
@@ -27904,7 +27912,7 @@ var ji = (t, r, c) => {
|
|
|
27904
27912
|
} catch {
|
|
27905
27913
|
return t.trim();
|
|
27906
27914
|
}
|
|
27907
|
-
}, Pa = "1.0.
|
|
27915
|
+
}, Pa = "1.0.56", Xi = 342, Ga = "d4fab38", Za = "2026-09-21T09:05:32.221Z", Ki = "342", ja = (t) => {
|
|
27908
27916
|
const r = document.getElementById("mb-version-toast");
|
|
27909
27917
|
if (r) {
|
|
27910
27918
|
r.remove();
|
|
@@ -27928,7 +27936,7 @@ var ji = (t, r, c) => {
|
|
|
27928
27936
|
const r = {
|
|
27929
27937
|
...t,
|
|
27930
27938
|
lib: Pa,
|
|
27931
|
-
libBuildNumber:
|
|
27939
|
+
libBuildNumber: 342,
|
|
27932
27940
|
libCommit: Ga,
|
|
27933
27941
|
libBuildDate: Za
|
|
27934
27942
|
};
|