beesoft-components 0.7.1-3 → 0.7.1-4
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.es.js +103 -101
- package/dist/index.es.js.gz +0 -0
- package/dist/index.umd.js +1 -1
- package/dist/index.umd.js.gz +0 -0
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -2,7 +2,7 @@ var ka = Object.defineProperty;
|
|
|
2
2
|
var Oa = (e, r, t) => r in e ? ka(e, r, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[r] = t;
|
|
3
3
|
var p = (e, r, t) => (Oa(e, typeof r != "symbol" ? r + "" : r, t), t);
|
|
4
4
|
import * as Ot from "react";
|
|
5
|
-
import st, { createContext as ls, useContext as Gr, forwardRef as pr, useRef as Q, useImperativeHandle as mr, useState as xe, useId as Ra, useEffect as
|
|
5
|
+
import st, { createContext as ls, useContext as Gr, forwardRef as pr, useRef as Q, useImperativeHandle as mr, useState as xe, useId as Ra, useEffect as we, useCallback as je, useMemo as Yt, useReducer as Na } from "react";
|
|
6
6
|
import Lt from "react-dom";
|
|
7
7
|
function fs(e) {
|
|
8
8
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
@@ -215,8 +215,8 @@ function ja() {
|
|
|
215
215
|
}
|
|
216
216
|
var Z = !1, q;
|
|
217
217
|
{
|
|
218
|
-
var
|
|
219
|
-
q = new
|
|
218
|
+
var Ee = typeof WeakMap == "function" ? WeakMap : Map;
|
|
219
|
+
q = new Ee();
|
|
220
220
|
}
|
|
221
221
|
function k(u, y) {
|
|
222
222
|
if (!u || Z)
|
|
@@ -268,18 +268,18 @@ function ja() {
|
|
|
268
268
|
if (qe && z && typeof qe.stack == "string") {
|
|
269
269
|
for (var re = qe.stack.split(`
|
|
270
270
|
`), _e = z.stack.split(`
|
|
271
|
-
`),
|
|
271
|
+
`), Se = re.length - 1, ke = _e.length - 1; Se >= 1 && ke >= 0 && re[Se] !== _e[ke]; )
|
|
272
272
|
ke--;
|
|
273
|
-
for (;
|
|
274
|
-
if (re[
|
|
275
|
-
if (
|
|
273
|
+
for (; Se >= 1 && ke >= 0; Se--, ke--)
|
|
274
|
+
if (re[Se] !== _e[ke]) {
|
|
275
|
+
if (Se !== 1 || ke !== 1)
|
|
276
276
|
do
|
|
277
|
-
if (
|
|
277
|
+
if (Se--, ke--, ke < 0 || re[Se] !== _e[ke]) {
|
|
278
278
|
var Me = `
|
|
279
|
-
` + re[
|
|
279
|
+
` + re[Se].replace(" at new ", " at ");
|
|
280
280
|
return u.displayName && Me.includes("<anonymous>") && (Me = Me.replace("<anonymous>", u.displayName)), typeof u == "function" && q.set(u, Me), Me;
|
|
281
281
|
}
|
|
282
|
-
while (
|
|
282
|
+
while (Se >= 1 && ke >= 0);
|
|
283
283
|
break;
|
|
284
284
|
}
|
|
285
285
|
}
|
|
@@ -345,8 +345,8 @@ function ja() {
|
|
|
345
345
|
throw _e.name = "Invariant Violation", _e;
|
|
346
346
|
}
|
|
347
347
|
re = u[se](y, se, z, O, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
|
348
|
-
} catch (
|
|
349
|
-
re =
|
|
348
|
+
} catch (Se) {
|
|
349
|
+
re = Se;
|
|
350
350
|
}
|
|
351
351
|
re && !(re instanceof Error) && (Be(ae), $("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", z || "React class", O, se, typeof re), Be(null)), re instanceof Error && !(re.message in Ct) && (Ct[re.message] = !0, Be(ae), $("Failed %s type: %s", O, re.message), Be(null));
|
|
352
352
|
}
|
|
@@ -463,9 +463,9 @@ function ja() {
|
|
|
463
463
|
for (he in y)
|
|
464
464
|
et.call(y, he) && !G.hasOwnProperty(he) && (se[he] = y[he]);
|
|
465
465
|
if (u && u.defaultProps) {
|
|
466
|
-
var
|
|
467
|
-
for (he in
|
|
468
|
-
se[he] === void 0 && (se[he] =
|
|
466
|
+
var Se = u.defaultProps;
|
|
467
|
+
for (he in Se)
|
|
468
|
+
se[he] === void 0 && (se[he] = Se[he]);
|
|
469
469
|
}
|
|
470
470
|
if (re || _e) {
|
|
471
471
|
var ke = typeof u == "function" ? u.displayName || u.name || "Unknown" : u;
|
|
@@ -600,8 +600,8 @@ Check the top-level render call using <` + O + ">.");
|
|
|
600
600
|
(u === void 0 || typeof u == "object" && u !== null && Object.keys(u).length === 0) && (re += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
|
|
601
601
|
var _e = xa(ae);
|
|
602
602
|
_e ? re += _e : re += hn();
|
|
603
|
-
var
|
|
604
|
-
u === null ?
|
|
603
|
+
var Se;
|
|
604
|
+
u === null ? Se = "null" : Ue(u) ? Se = "array" : u !== void 0 && u.$$typeof === r ? (Se = "<" + (P(u.type) || "Unknown") + " />", re = " Did you accidentally export a JSX literal instead of a component?") : Se = typeof u, $("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", Se, re);
|
|
605
605
|
}
|
|
606
606
|
var ke = tr(u, y, O, ae, he);
|
|
607
607
|
if (ke == null)
|
|
@@ -690,7 +690,7 @@ var Fr = /* @__PURE__ */ ((e) => (e[e.Vertical = 0] = "Vertical", e[e.Horizontal
|
|
|
690
690
|
})();
|
|
691
691
|
})(ps);
|
|
692
692
|
var Ia = ps.exports;
|
|
693
|
-
const
|
|
693
|
+
const Te = /* @__PURE__ */ fs(Ia), Ma = (e, r) => {
|
|
694
694
|
const t = Q(null), {
|
|
695
695
|
buttonType: n,
|
|
696
696
|
type: s = "button",
|
|
@@ -709,7 +709,7 @@ const we = /* @__PURE__ */ fs(Ia), Ma = (e, r) => {
|
|
|
709
709
|
mr(r, () => ({
|
|
710
710
|
click: x
|
|
711
711
|
}));
|
|
712
|
-
const w =
|
|
712
|
+
const w = Te(
|
|
713
713
|
"max-sm:bsc-p-4 md:bsc-p-2 dark:bsc-bg-mono-light-1 dark:hover:bsc-bg-mono-light-2 dark:bsc-text-mono-dark-1",
|
|
714
714
|
{
|
|
715
715
|
"bsc-w-full": i,
|
|
@@ -859,7 +859,7 @@ const ys = /* @__PURE__ */ Ua(za), qa = (e, r) => {
|
|
|
859
859
|
});
|
|
860
860
|
return n.current !== r && (n.current = r), [r, t, n];
|
|
861
861
|
}, fr = ({ label: e, htmlFor: r, readOnly: t = !1, className: n }) => {
|
|
862
|
-
const s =
|
|
862
|
+
const s = Te(n, {
|
|
863
863
|
"bsc-text-black dark:bsc-text-mono-light-1": !t,
|
|
864
864
|
"bsc-text-gray-4 dark:bsc-text-mono-light-3": t
|
|
865
865
|
});
|
|
@@ -884,9 +884,11 @@ const Xa = (e, r) => {
|
|
|
884
884
|
});
|
|
885
885
|
console.log("name", t, "checked", o, "partial", i);
|
|
886
886
|
const E = wn(o), $ = wn(i), V = Ra(), j = hs();
|
|
887
|
-
|
|
887
|
+
we(() => (console.log("name", t, "component created"), () => {
|
|
888
|
+
console.log("name", t, "component destroyed");
|
|
889
|
+
}), []), we(() => {
|
|
888
890
|
d !== void 0 ? w(d) : j && j.useAnimations !== void 0 && w(j.useAnimations);
|
|
889
|
-
}, [j, d]),
|
|
891
|
+
}, [j, d]), we(() => {
|
|
890
892
|
if (console.log("name", t, "useEffect checked state", JSON.stringify(v)), v.initial)
|
|
891
893
|
S({
|
|
892
894
|
checked: i ? !0 : o,
|
|
@@ -930,29 +932,29 @@ const Xa = (e, r) => {
|
|
|
930
932
|
setPartiallyChecked: L,
|
|
931
933
|
setChecked: R
|
|
932
934
|
}));
|
|
933
|
-
const H =
|
|
935
|
+
const H = Te(
|
|
934
936
|
"bc-checkbox-wrapper bsc-flex bsc-items-center",
|
|
935
937
|
{
|
|
936
938
|
"bsc-pointer-events-none bsc-text-gray-2 dark:bsc-text-mono-light-3": a
|
|
937
939
|
},
|
|
938
940
|
l
|
|
939
|
-
), A =
|
|
941
|
+
), A = Te("bc-checkbox-label bsc-cursor-pointer", {
|
|
940
942
|
"bsc-ml-2": c === mt.Right,
|
|
941
943
|
"bsc-mr-2": c === mt.Left
|
|
942
|
-
}), te =
|
|
944
|
+
}), te = Te(
|
|
943
945
|
"bc-checkbox-outer bsc-relative bsc-rounded *:bsc-block *:bsc-size-[21px] focus-within:bsc-ring focus-within:bsc-ring-offset-2 dark:bsc-ring-mono-light-1 dark:bsc-ring-offset-mono-dark-1",
|
|
944
946
|
{
|
|
945
947
|
"bsc-checkbox-animate": !a && x,
|
|
946
948
|
"bsc-checkbox-no-animate": a || !a && !x
|
|
947
949
|
}
|
|
948
|
-
), J =
|
|
950
|
+
), J = Te(
|
|
949
951
|
"bc-checkbox bsc-relative bsc-m-0 bsc-cursor-pointer bsc-appearance-none bsc-rounded bsc-border-none bsc-bg-mono-light-1 bsc-p-0 bsc-outline-none dark:bsc-bg-mono-dark-1 dark:checked:bsc-bg-mono-light-1",
|
|
950
952
|
{
|
|
951
953
|
"[transition:box-shadow_0.3s]": x,
|
|
952
954
|
"bsc-checkbox-border dark:bsc-checkbox-border-dark bsc-checkbox-border-hover dark:bsc-checkbox-border-hover-dark bsc-checkbox-border-checked dark:bsc-checkbox-border-checked-dark": !a,
|
|
953
955
|
"bsc-checkbox-border-read-only dark:bsc-checkbox-border-dark-read-only bsc-checkbox-border-checked-read-only dark:bsc-checkbox-border-checked-dark-read-only": a
|
|
954
956
|
}
|
|
955
|
-
), X =
|
|
957
|
+
), X = Te(
|
|
956
958
|
"bc-checkbox-svg bsc-pointer-events-none bsc-absolute bsc-left-0 bsc-top-0 bsc-stroke-mono-light-1 bsc-stroke-2 [stroke-linecap:round] [stroke-linejoin:round] [transform:scale(0)_translateZ(0)] dark:bsc-stroke-mono-dark-3",
|
|
957
959
|
{
|
|
958
960
|
"bsc-fill-primary-1 dark:bsc-fill-mono-light-1": !a,
|
|
@@ -990,7 +992,7 @@ const Xa = (e, r) => {
|
|
|
990
992
|
onChange: l
|
|
991
993
|
}) => {
|
|
992
994
|
const [d, m] = xe([]), x = Za(() => n, [n]);
|
|
993
|
-
|
|
995
|
+
we(() => {
|
|
994
996
|
m(t ?? []);
|
|
995
997
|
}, [t]);
|
|
996
998
|
const w = ($) => {
|
|
@@ -1012,7 +1014,7 @@ const Xa = (e, r) => {
|
|
|
1012
1014
|
className: "bsc-mr-3"
|
|
1013
1015
|
},
|
|
1014
1016
|
`${e}_checkbox_${V}`
|
|
1015
|
-
), S =
|
|
1017
|
+
), S = Te("bsc-flex bsc-flex-col bsc-gap-1", c), N = Te("bsc-flex bsc-gap-1", {
|
|
1016
1018
|
"bsc-flex-col": i === Fr.Vertical
|
|
1017
1019
|
}), E = ($) => /* @__PURE__ */ f.jsx("div", { className: N, children: $.map(v) });
|
|
1018
1020
|
return /* @__PURE__ */ f.jsxs("div", { className: S, children: [
|
|
@@ -1790,7 +1792,7 @@ const bl = (e, r) => {
|
|
|
1790
1792
|
setInnerHTML: I,
|
|
1791
1793
|
focus: fe
|
|
1792
1794
|
}));
|
|
1793
|
-
const g =
|
|
1795
|
+
const g = Te(
|
|
1794
1796
|
{ "bsc-w-full ": a },
|
|
1795
1797
|
"bsc-flex bsc-flex-row bsc-items-center bsc-shadow-sm bsc-border bsc-border-solid bsc-border-gray-3 dark:bsc-border-white dark:bsc-bg-mono-dark-1 dark:bsc-text-mono-light-1 bsc-rounded-md bsc-p-2",
|
|
1796
1798
|
{
|
|
@@ -1798,7 +1800,7 @@ const bl = (e, r) => {
|
|
|
1798
1800
|
"bsc-overflow-hidden bsc-whitespace-pre": m && !x
|
|
1799
1801
|
},
|
|
1800
1802
|
c
|
|
1801
|
-
), C =
|
|
1803
|
+
), C = Te("bsc-flex-shrink", { "bsc-mr-2": o }, l), U = Te("bsc-flex-shrink", { "bsc-ml-2": i }, d);
|
|
1802
1804
|
return /* @__PURE__ */ f.jsxs("div", { className: g, ref: (h) => h && P(h), children: [
|
|
1803
1805
|
o && /* @__PURE__ */ f.jsx("div", { className: C, onClick: T, children: o }),
|
|
1804
1806
|
/* @__PURE__ */ f.jsx(
|
|
@@ -2629,7 +2631,7 @@ function We(e, r) {
|
|
|
2629
2631
|
function Qs(e) {
|
|
2630
2632
|
return ye(Ce.anyDigitsSigned, e);
|
|
2631
2633
|
}
|
|
2632
|
-
function
|
|
2634
|
+
function Pe(e, r) {
|
|
2633
2635
|
switch (e) {
|
|
2634
2636
|
case 1:
|
|
2635
2637
|
return ye(Ce.singleDigit, r);
|
|
@@ -2701,7 +2703,7 @@ class Ef extends ie {
|
|
|
2701
2703
|
});
|
|
2702
2704
|
switch (n) {
|
|
2703
2705
|
case "y":
|
|
2704
|
-
return De(
|
|
2706
|
+
return De(Pe(4, t), a);
|
|
2705
2707
|
case "yo":
|
|
2706
2708
|
return De(
|
|
2707
2709
|
s.ordinalNumber(t, {
|
|
@@ -2710,7 +2712,7 @@ class Ef extends ie {
|
|
|
2710
2712
|
a
|
|
2711
2713
|
);
|
|
2712
2714
|
default:
|
|
2713
|
-
return De(
|
|
2715
|
+
return De(Pe(n.length, t), a);
|
|
2714
2716
|
}
|
|
2715
2717
|
}
|
|
2716
2718
|
validate(t, n) {
|
|
@@ -2756,7 +2758,7 @@ class Sf extends ie {
|
|
|
2756
2758
|
});
|
|
2757
2759
|
switch (n) {
|
|
2758
2760
|
case "Y":
|
|
2759
|
-
return De(
|
|
2761
|
+
return De(Pe(4, t), a);
|
|
2760
2762
|
case "Yo":
|
|
2761
2763
|
return De(
|
|
2762
2764
|
s.ordinalNumber(t, {
|
|
@@ -2765,7 +2767,7 @@ class Sf extends ie {
|
|
|
2765
2767
|
a
|
|
2766
2768
|
);
|
|
2767
2769
|
default:
|
|
2768
|
-
return De(
|
|
2770
|
+
return De(Pe(n.length, t), a);
|
|
2769
2771
|
}
|
|
2770
2772
|
}
|
|
2771
2773
|
validate(t, n) {
|
|
@@ -2856,7 +2858,7 @@ class kf extends ie {
|
|
|
2856
2858
|
switch (n) {
|
|
2857
2859
|
case "Q":
|
|
2858
2860
|
case "QQ":
|
|
2859
|
-
return
|
|
2861
|
+
return Pe(n.length, t);
|
|
2860
2862
|
case "Qo":
|
|
2861
2863
|
return s.ordinalNumber(t, { unit: "quarter" });
|
|
2862
2864
|
case "QQQ":
|
|
@@ -2918,7 +2920,7 @@ class Of extends ie {
|
|
|
2918
2920
|
switch (n) {
|
|
2919
2921
|
case "q":
|
|
2920
2922
|
case "qq":
|
|
2921
|
-
return
|
|
2923
|
+
return Pe(n.length, t);
|
|
2922
2924
|
case "qo":
|
|
2923
2925
|
return s.ordinalNumber(t, { unit: "quarter" });
|
|
2924
2926
|
case "qqq":
|
|
@@ -2984,7 +2986,7 @@ class Rf extends ie {
|
|
|
2984
2986
|
a
|
|
2985
2987
|
);
|
|
2986
2988
|
case "MM":
|
|
2987
|
-
return De(
|
|
2989
|
+
return De(Pe(2, t), a);
|
|
2988
2990
|
case "Mo":
|
|
2989
2991
|
return De(
|
|
2990
2992
|
s.ordinalNumber(t, {
|
|
@@ -3046,7 +3048,7 @@ class Nf extends ie {
|
|
|
3046
3048
|
a
|
|
3047
3049
|
);
|
|
3048
3050
|
case "LL":
|
|
3049
|
-
return De(
|
|
3051
|
+
return De(Pe(2, t), a);
|
|
3050
3052
|
case "Lo":
|
|
3051
3053
|
return De(
|
|
3052
3054
|
s.ordinalNumber(t, {
|
|
@@ -3110,7 +3112,7 @@ class jf extends ie {
|
|
|
3110
3112
|
case "wo":
|
|
3111
3113
|
return s.ordinalNumber(t, { unit: "week" });
|
|
3112
3114
|
default:
|
|
3113
|
-
return
|
|
3115
|
+
return Pe(n.length, t);
|
|
3114
3116
|
}
|
|
3115
3117
|
}
|
|
3116
3118
|
validate(t, n) {
|
|
@@ -3152,7 +3154,7 @@ class Mf extends ie {
|
|
|
3152
3154
|
case "Io":
|
|
3153
3155
|
return s.ordinalNumber(t, { unit: "week" });
|
|
3154
3156
|
default:
|
|
3155
|
-
return
|
|
3157
|
+
return Pe(n.length, t);
|
|
3156
3158
|
}
|
|
3157
3159
|
}
|
|
3158
3160
|
validate(t, n) {
|
|
@@ -3203,7 +3205,7 @@ class $f extends ie {
|
|
|
3203
3205
|
case "do":
|
|
3204
3206
|
return s.ordinalNumber(t, { unit: "date" });
|
|
3205
3207
|
default:
|
|
3206
|
-
return
|
|
3208
|
+
return Pe(n.length, t);
|
|
3207
3209
|
}
|
|
3208
3210
|
}
|
|
3209
3211
|
validate(t, n) {
|
|
@@ -3245,7 +3247,7 @@ class Ff extends ie {
|
|
|
3245
3247
|
case "Do":
|
|
3246
3248
|
return s.ordinalNumber(t, { unit: "date" });
|
|
3247
3249
|
default:
|
|
3248
|
-
return
|
|
3250
|
+
return Pe(n.length, t);
|
|
3249
3251
|
}
|
|
3250
3252
|
}
|
|
3251
3253
|
validate(t, n) {
|
|
@@ -3328,7 +3330,7 @@ class Hf extends ie {
|
|
|
3328
3330
|
switch (n) {
|
|
3329
3331
|
case "e":
|
|
3330
3332
|
case "ee":
|
|
3331
|
-
return De(
|
|
3333
|
+
return De(Pe(n.length, t), o);
|
|
3332
3334
|
case "eo":
|
|
3333
3335
|
return De(
|
|
3334
3336
|
s.ordinalNumber(t, {
|
|
@@ -3393,7 +3395,7 @@ class Wf extends ie {
|
|
|
3393
3395
|
switch (n) {
|
|
3394
3396
|
case "c":
|
|
3395
3397
|
case "cc":
|
|
3396
|
-
return De(
|
|
3398
|
+
return De(Pe(n.length, t), o);
|
|
3397
3399
|
case "co":
|
|
3398
3400
|
return De(
|
|
3399
3401
|
s.ordinalNumber(t, {
|
|
@@ -3459,7 +3461,7 @@ class Bf extends ie {
|
|
|
3459
3461
|
switch (n) {
|
|
3460
3462
|
case "i":
|
|
3461
3463
|
case "ii":
|
|
3462
|
-
return
|
|
3464
|
+
return Pe(n.length, t);
|
|
3463
3465
|
case "io":
|
|
3464
3466
|
return s.ordinalNumber(t, { unit: "day" });
|
|
3465
3467
|
case "iii":
|
|
@@ -3658,7 +3660,7 @@ class Zf extends ie {
|
|
|
3658
3660
|
case "ho":
|
|
3659
3661
|
return s.ordinalNumber(t, { unit: "hour" });
|
|
3660
3662
|
default:
|
|
3661
|
-
return
|
|
3663
|
+
return Pe(n.length, t);
|
|
3662
3664
|
}
|
|
3663
3665
|
}
|
|
3664
3666
|
validate(t, n) {
|
|
@@ -3682,7 +3684,7 @@ class Gf extends ie {
|
|
|
3682
3684
|
case "Ho":
|
|
3683
3685
|
return s.ordinalNumber(t, { unit: "hour" });
|
|
3684
3686
|
default:
|
|
3685
|
-
return
|
|
3687
|
+
return Pe(n.length, t);
|
|
3686
3688
|
}
|
|
3687
3689
|
}
|
|
3688
3690
|
validate(t, n) {
|
|
@@ -3705,7 +3707,7 @@ class Qf extends ie {
|
|
|
3705
3707
|
case "Ko":
|
|
3706
3708
|
return s.ordinalNumber(t, { unit: "hour" });
|
|
3707
3709
|
default:
|
|
3708
|
-
return
|
|
3710
|
+
return Pe(n.length, t);
|
|
3709
3711
|
}
|
|
3710
3712
|
}
|
|
3711
3713
|
validate(t, n) {
|
|
@@ -3728,7 +3730,7 @@ class Kf extends ie {
|
|
|
3728
3730
|
case "ko":
|
|
3729
3731
|
return s.ordinalNumber(t, { unit: "hour" });
|
|
3730
3732
|
default:
|
|
3731
|
-
return
|
|
3733
|
+
return Pe(n.length, t);
|
|
3732
3734
|
}
|
|
3733
3735
|
}
|
|
3734
3736
|
validate(t, n) {
|
|
@@ -3752,7 +3754,7 @@ class Xf extends ie {
|
|
|
3752
3754
|
case "mo":
|
|
3753
3755
|
return s.ordinalNumber(t, { unit: "minute" });
|
|
3754
3756
|
default:
|
|
3755
|
-
return
|
|
3757
|
+
return Pe(n.length, t);
|
|
3756
3758
|
}
|
|
3757
3759
|
}
|
|
3758
3760
|
validate(t, n) {
|
|
@@ -3775,7 +3777,7 @@ class Jf extends ie {
|
|
|
3775
3777
|
case "so":
|
|
3776
3778
|
return s.ordinalNumber(t, { unit: "second" });
|
|
3777
3779
|
default:
|
|
3778
|
-
return
|
|
3780
|
+
return Pe(n.length, t);
|
|
3779
3781
|
}
|
|
3780
3782
|
}
|
|
3781
3783
|
validate(t, n) {
|
|
@@ -3793,7 +3795,7 @@ class ed extends ie {
|
|
|
3793
3795
|
}
|
|
3794
3796
|
parse(t, n) {
|
|
3795
3797
|
const s = (a) => Math.trunc(a * Math.pow(10, -n.length + 3));
|
|
3796
|
-
return De(
|
|
3798
|
+
return De(Pe(n.length, t), s);
|
|
3797
3799
|
}
|
|
3798
3800
|
set(t, n, s) {
|
|
3799
3801
|
return t.setMilliseconds(s), t;
|
|
@@ -4264,7 +4266,7 @@ const Qn = ({ className: e }) => /* @__PURE__ */ f.jsx(
|
|
|
4264
4266
|
)
|
|
4265
4267
|
}
|
|
4266
4268
|
), Fd = ({ className: e }) => {
|
|
4267
|
-
const r =
|
|
4269
|
+
const r = Te("bsc-h-6 bsc-w-6", e);
|
|
4268
4270
|
return /* @__PURE__ */ f.jsx(
|
|
4269
4271
|
"svg",
|
|
4270
4272
|
{
|
|
@@ -4278,7 +4280,7 @@ const Qn = ({ className: e }) => /* @__PURE__ */ f.jsx(
|
|
|
4278
4280
|
}
|
|
4279
4281
|
);
|
|
4280
4282
|
}, Yd = ({ className: e }) => {
|
|
4281
|
-
const r =
|
|
4283
|
+
const r = Te("bsc-h-6 bsc-w-6", e);
|
|
4282
4284
|
return /* @__PURE__ */ f.jsx(
|
|
4283
4285
|
"svg",
|
|
4284
4286
|
{
|
|
@@ -4292,7 +4294,7 @@ const Qn = ({ className: e }) => /* @__PURE__ */ f.jsx(
|
|
|
4292
4294
|
}
|
|
4293
4295
|
);
|
|
4294
4296
|
}, Hd = ({ className: e }) => {
|
|
4295
|
-
const r =
|
|
4297
|
+
const r = Te("bsc-h-6 bsc-w-6", e);
|
|
4296
4298
|
return /* @__PURE__ */ f.jsx(
|
|
4297
4299
|
"svg",
|
|
4298
4300
|
{
|
|
@@ -4306,7 +4308,7 @@ const Qn = ({ className: e }) => /* @__PURE__ */ f.jsx(
|
|
|
4306
4308
|
}
|
|
4307
4309
|
);
|
|
4308
4310
|
}, Wd = ({ className: e }) => {
|
|
4309
|
-
const r =
|
|
4311
|
+
const r = Te("bsc-h-6 bsc-w-6", e);
|
|
4310
4312
|
return /* @__PURE__ */ f.jsx(
|
|
4311
4313
|
"svg",
|
|
4312
4314
|
{
|
|
@@ -4338,7 +4340,7 @@ const Qn = ({ className: e }) => /* @__PURE__ */ f.jsx(
|
|
|
4338
4340
|
chevronRight: Hd,
|
|
4339
4341
|
chevronUp: Wd,
|
|
4340
4342
|
close: Vd
|
|
4341
|
-
}), a = Yt(() => s.current[e] || Qn, [e]), o =
|
|
4343
|
+
}), a = Yt(() => s.current[e] || Qn, [e]), o = Te(
|
|
4342
4344
|
{
|
|
4343
4345
|
"bsc-h-[24px] bsc-w-[24px]": r === Re.Regular,
|
|
4344
4346
|
"bsc-h-[20px] bsc-w-[20px]": r === Re.Small
|
|
@@ -4637,10 +4639,10 @@ function Xd() {
|
|
|
4637
4639
|
function q(k) {
|
|
4638
4640
|
return j(k) === s;
|
|
4639
4641
|
}
|
|
4640
|
-
function
|
|
4642
|
+
function Ee(k) {
|
|
4641
4643
|
return j(k) === m;
|
|
4642
4644
|
}
|
|
4643
|
-
le.AsyncMode = b, le.ConcurrentMode = L, le.ContextConsumer = R, le.ContextProvider = H, le.Element = A, le.ForwardRef = te, le.Fragment = J, le.Lazy = X, le.Memo = P, le.Portal = T, le.Profiler = Y, le.StrictMode = F, le.Suspense = ne, le.isAsyncMode = fe, le.isConcurrentMode = g, le.isContextConsumer = C, le.isContextProvider = U, le.isElement = h, le.isForwardRef = D, le.isFragment = B, le.isLazy = _, le.isMemo = M, le.isPortal = W, le.isProfiler = Z, le.isStrictMode = q, le.isSuspense =
|
|
4645
|
+
le.AsyncMode = b, le.ConcurrentMode = L, le.ContextConsumer = R, le.ContextProvider = H, le.Element = A, le.ForwardRef = te, le.Fragment = J, le.Lazy = X, le.Memo = P, le.Portal = T, le.Profiler = Y, le.StrictMode = F, le.Suspense = ne, le.isAsyncMode = fe, le.isConcurrentMode = g, le.isContextConsumer = C, le.isContextProvider = U, le.isElement = h, le.isForwardRef = D, le.isFragment = B, le.isLazy = _, le.isMemo = M, le.isPortal = W, le.isProfiler = Z, le.isStrictMode = q, le.isSuspense = Ee, le.isValidElementType = V, le.typeOf = j;
|
|
4644
4646
|
}()), le;
|
|
4645
4647
|
}
|
|
4646
4648
|
var Jn;
|
|
@@ -4817,8 +4819,8 @@ function th() {
|
|
|
4817
4819
|
function N(g) {
|
|
4818
4820
|
if (process.env.NODE_ENV !== "production")
|
|
4819
4821
|
var C = {}, U = 0;
|
|
4820
|
-
function h(B, _, M, W, Z, q,
|
|
4821
|
-
if (W = W || x, q = q || M,
|
|
4822
|
+
function h(B, _, M, W, Z, q, Ee) {
|
|
4823
|
+
if (W = W || x, q = q || M, Ee !== t) {
|
|
4822
4824
|
if (c) {
|
|
4823
4825
|
var k = new Error(
|
|
4824
4826
|
"Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types"
|
|
@@ -4913,7 +4915,7 @@ function th() {
|
|
|
4913
4915
|
for (var M = U[h], W = 0; W < g.length; W++)
|
|
4914
4916
|
if (v(M, g[W]))
|
|
4915
4917
|
return null;
|
|
4916
|
-
var Z = JSON.stringify(g, function(
|
|
4918
|
+
var Z = JSON.stringify(g, function(Ee, k) {
|
|
4917
4919
|
var Ne = ne(k);
|
|
4918
4920
|
return Ne === "symbol" ? String(k) : k;
|
|
4919
4921
|
});
|
|
@@ -4950,7 +4952,7 @@ function th() {
|
|
|
4950
4952
|
}
|
|
4951
4953
|
function h(D, B, _, M, W) {
|
|
4952
4954
|
for (var Z = [], q = 0; q < g.length; q++) {
|
|
4953
|
-
var
|
|
4955
|
+
var Ee = g[q], k = Ee(D, B, _, M, W, t);
|
|
4954
4956
|
if (k == null)
|
|
4955
4957
|
return null;
|
|
4956
4958
|
k.data && n(k.data, "expectedType") && Z.push(k.data.expectedType);
|
|
@@ -4980,9 +4982,9 @@ function th() {
|
|
|
4980
4982
|
var q = g[Z];
|
|
4981
4983
|
if (typeof q != "function")
|
|
4982
4984
|
return J(D, B, _, Z, ne(q));
|
|
4983
|
-
var
|
|
4984
|
-
if (
|
|
4985
|
-
return
|
|
4985
|
+
var Ee = q(M, Z, D, B, _ + "." + Z, t);
|
|
4986
|
+
if (Ee)
|
|
4987
|
+
return Ee;
|
|
4986
4988
|
}
|
|
4987
4989
|
return null;
|
|
4988
4990
|
}
|
|
@@ -4995,15 +4997,15 @@ function th() {
|
|
|
4995
4997
|
return new S("Invalid " + B + " `" + _ + "` of type `" + W + "` " + ("supplied to `" + D + "`, expected `object`."));
|
|
4996
4998
|
var Z = r({}, U[h], g);
|
|
4997
4999
|
for (var q in Z) {
|
|
4998
|
-
var
|
|
4999
|
-
if (n(g, q) && typeof
|
|
5000
|
-
return J(D, B, _, q, ne(
|
|
5001
|
-
if (!
|
|
5000
|
+
var Ee = g[q];
|
|
5001
|
+
if (n(g, q) && typeof Ee != "function")
|
|
5002
|
+
return J(D, B, _, q, ne(Ee));
|
|
5003
|
+
if (!Ee)
|
|
5002
5004
|
return new S(
|
|
5003
5005
|
"Invalid " + B + " `" + _ + "` key `" + q + "` supplied to `" + D + "`.\nBad object: " + JSON.stringify(U[h], null, " ") + `
|
|
5004
5006
|
Valid keys: ` + JSON.stringify(Object.keys(g), null, " ")
|
|
5005
5007
|
);
|
|
5006
|
-
var k =
|
|
5008
|
+
var k = Ee(M, q, D, B, _ + "." + q, t);
|
|
5007
5009
|
if (k)
|
|
5008
5010
|
return k;
|
|
5009
5011
|
}
|
|
@@ -5543,7 +5545,7 @@ const uh = ({
|
|
|
5543
5545
|
children: m
|
|
5544
5546
|
}) => {
|
|
5545
5547
|
const [x, w] = xe(-1), [v, S] = xe(-1), [N, E] = xe(e), $ = Q(100), V = Q(101), j = Q(), b = Q(), L = Q();
|
|
5546
|
-
|
|
5548
|
+
we(() => {
|
|
5547
5549
|
r && (j.current = ha(r));
|
|
5548
5550
|
const P = sa("zIndex", (T) => T === "auto" || T === "-1" ? !1 : parseInt(T) > 100).map((T) => parseInt(T, 10));
|
|
5549
5551
|
P.length > 0 && ($.current = Math.max(...P) + 1, V.current = Math.max(...P) + 2), E(e);
|
|
@@ -5805,10 +5807,10 @@ const lh = ({
|
|
|
5805
5807
|
top: 0,
|
|
5806
5808
|
width: 0
|
|
5807
5809
|
}), J = Q(), X = Q(), P = Q(), T = Q(), Y = Q(), F = Q(), ne = hs();
|
|
5808
|
-
|
|
5810
|
+
we(() => (c === !0 && (F.current = new ResizeObserver(I)), () => {
|
|
5809
5811
|
var _, M;
|
|
5810
5812
|
c === !0 && (X.current && ((_ = F.current) == null || _.unobserve(X.current)), (M = F.current) == null || M.disconnect());
|
|
5811
|
-
}), []),
|
|
5813
|
+
}), []), we(() => {
|
|
5812
5814
|
if (r && (J.current = ha(r), o)) {
|
|
5813
5815
|
const _ = ne == null ? void 0 : ne.isValidScrollableElement;
|
|
5814
5816
|
P.current = na(
|
|
@@ -5833,7 +5835,7 @@ const lh = ({
|
|
|
5833
5835
|
const M = be.getScreenDimensions(), W = _[_.length - 1].target, Z = W.getBoundingClientRect(), q = be.determineOffScreenLocation(Z);
|
|
5834
5836
|
if (q) {
|
|
5835
5837
|
if (J.current && be.canPositionElementOnScreenWithTarget(W, J.current)) {
|
|
5836
|
-
const
|
|
5838
|
+
const Ee = be.positionElementToTargetOnScreen(
|
|
5837
5839
|
X.current,
|
|
5838
5840
|
J.current,
|
|
5839
5841
|
n,
|
|
@@ -5841,7 +5843,7 @@ const lh = ({
|
|
|
5841
5843
|
);
|
|
5842
5844
|
te.current = {
|
|
5843
5845
|
...te.current,
|
|
5844
|
-
...
|
|
5846
|
+
...Ee
|
|
5845
5847
|
};
|
|
5846
5848
|
} else
|
|
5847
5849
|
q.right ? te.current.left = M.width - Z.width : q.left && (te.current.left = 0), q.bottom ? te.current.top = M.height - Z.height : q.top && (te.current.top = 0);
|
|
@@ -6578,13 +6580,13 @@ const Ph = (e, r) => {
|
|
|
6578
6580
|
onLeftElementClick: V,
|
|
6579
6581
|
onRightElementClick: j
|
|
6580
6582
|
} = e, [b, L] = xe(!0), R = Q(), H = Q(), A = Q();
|
|
6581
|
-
|
|
6583
|
+
we(() => () => {
|
|
6582
6584
|
var I;
|
|
6583
6585
|
(I = A.current) == null || I.dispose();
|
|
6584
|
-
}, []),
|
|
6586
|
+
}, []), we(() => {
|
|
6585
6587
|
var I;
|
|
6586
6588
|
(I = A.current) == null || I.inputValuePassed(t);
|
|
6587
|
-
}, [t]),
|
|
6589
|
+
}, [t]), we(() => {
|
|
6588
6590
|
var I, fe, g;
|
|
6589
6591
|
(I = A.current) == null || I.dispose(), n && (A.current = new Th(n, t), H.current && ((fe = A.current) == null || fe.inputElementCreated(H.current)), (g = A.current) == null || g.registerFormatChangeEvent(te));
|
|
6590
6592
|
}, [n]);
|
|
@@ -6621,7 +6623,7 @@ const Ph = (e, r) => {
|
|
|
6621
6623
|
mr(r, () => ({
|
|
6622
6624
|
focus: F
|
|
6623
6625
|
}));
|
|
6624
|
-
const ne =
|
|
6626
|
+
const ne = Te(l, {
|
|
6625
6627
|
"!bsc-border-error": !b
|
|
6626
6628
|
});
|
|
6627
6629
|
return /* @__PURE__ */ f.jsx(
|
|
@@ -7121,15 +7123,15 @@ const ur = ({
|
|
|
7121
7123
|
}) => {
|
|
7122
7124
|
var Y;
|
|
7123
7125
|
const [d, m] = xe(!1), [x, w] = xe(), [v, S] = xe(), [N, E] = xe(), [$, V] = xe(), j = Q(), b = Q(), L = Gr(dn), R = Yt(() => L.calendarTemplate, [L.calendarTemplate]), H = async () => a || await va(ra());
|
|
7124
|
-
|
|
7126
|
+
we(() => {
|
|
7125
7127
|
H().then((F) => {
|
|
7126
7128
|
j.current = F, b.current = Ch(j.current), m(!0);
|
|
7127
7129
|
}).catch((F) => console.error(F));
|
|
7128
|
-
}, []),
|
|
7130
|
+
}, []), we(() => {
|
|
7129
7131
|
e && j.current && E(cs(e, j.current, s === Xe.Normal));
|
|
7130
|
-
}, [e, d]),
|
|
7132
|
+
}, [e, d]), we(() => {
|
|
7131
7133
|
V(r ? new Date(r.getFullYear(), r.getMonth(), r.getDate()) : void 0);
|
|
7132
|
-
}, [r]),
|
|
7134
|
+
}, [r]), we(() => {
|
|
7133
7135
|
w(
|
|
7134
7136
|
t ? new Date(
|
|
7135
7137
|
t.getFullYear(),
|
|
@@ -7149,7 +7151,7 @@ const ur = ({
|
|
|
7149
7151
|
59
|
|
7150
7152
|
).getTime() : void 0
|
|
7151
7153
|
);
|
|
7152
|
-
}, [t, n]),
|
|
7154
|
+
}, [t, n]), we(() => {
|
|
7153
7155
|
j.current && a && (j.current = a, E(cs(e, j.current, s === Xe.Normal)));
|
|
7154
7156
|
}, [a]);
|
|
7155
7157
|
const A = (F) => {
|
|
@@ -7190,7 +7192,7 @@ const ur = ({
|
|
|
7190
7192
|
N == null ? void 0 : N.map(
|
|
7191
7193
|
(F, ne) => F.map((I, fe) => {
|
|
7192
7194
|
var U, h;
|
|
7193
|
-
const g = I.dayValue !== null && (i === void 0 || i(I.dayValue)), C =
|
|
7195
|
+
const g = I.dayValue !== null && (i === void 0 || i(I.dayValue)), C = Te(
|
|
7194
7196
|
"bsc-text-center bsc-py-1",
|
|
7195
7197
|
{
|
|
7196
7198
|
"bsc-text-gray-3": !I.isCurrent,
|
|
@@ -7478,7 +7480,7 @@ const ur = ({
|
|
|
7478
7480
|
"23"
|
|
7479
7481
|
]
|
|
7480
7482
|
), l = Q(Id(0, 59, (P) => P.toString().padStart(2, "0"))), d = Q(["AM", "PM"]), m = Q(ll(e)), x = (P) => P > 11 ? P - 12 : P, [w, v] = xe(x(e.getHours())), [S, N] = xe(e.getMinutes()), [E, $] = xe(e.getHours() <= 12 ? 0 : 1), V = Q(e.toLocaleDateString(t.code));
|
|
7481
|
-
|
|
7483
|
+
we(() => {
|
|
7482
7484
|
const P = e.getHours(), T = e.getMinutes();
|
|
7483
7485
|
if (P !== w && v(n === ve.TwelveHour ? x(P) : P), T !== S && N(T), n === ve.TwelveHour) {
|
|
7484
7486
|
const Y = P <= 11 ? 0 : 1;
|
|
@@ -7515,10 +7517,10 @@ const ur = ({
|
|
|
7515
7517
|
o({
|
|
7516
7518
|
type: K.DaySelector
|
|
7517
7519
|
});
|
|
7518
|
-
}, J =
|
|
7520
|
+
}, J = Te("bsc-w-full bsc-grid bsc-grid-rows-3 bsc-gap-4 bc-dt-time-grid", {
|
|
7519
7521
|
"bsc-grid-cols-4": n === ve.TwelveHour,
|
|
7520
7522
|
"bsc-grid-cols-3": n === ve.TwentyFourHour
|
|
7521
|
-
}), X =
|
|
7523
|
+
}), X = Te(
|
|
7522
7524
|
"bsc-text-center bsc-cursor-pointer hover:bsc-bg-gray-4 dark:bsc-text-mono-light-1 dark:hover:bsc-bg-mono-light-1 dark:hover:bsc-text-mono-dark-1 bc-dt-time-date-value",
|
|
7523
7525
|
{
|
|
7524
7526
|
"bsc-col-span-4": n === ve.TwelveHour,
|
|
@@ -7827,7 +7829,7 @@ class Fh {
|
|
|
7827
7829
|
const Yh = (e, r) => {
|
|
7828
7830
|
var a;
|
|
7829
7831
|
const [t, n] = xe(), s = Q();
|
|
7830
|
-
return
|
|
7832
|
+
return we(() => {
|
|
7831
7833
|
r && !t && (s.current = new Fh(e, r), n(s.current.createInputFormat()));
|
|
7832
7834
|
}, [r]), [t, (a = s.current) == null ? void 0 : a.is24HourTime];
|
|
7833
7835
|
}, Zh = ({
|
|
@@ -7857,11 +7859,11 @@ const Yh = (e, r) => {
|
|
|
7857
7859
|
calendarTemplate: $,
|
|
7858
7860
|
dateScrollerTemplate: V
|
|
7859
7861
|
});
|
|
7860
|
-
|
|
7862
|
+
we(() => {
|
|
7861
7863
|
P.current && g(P.current);
|
|
7862
|
-
}, [P]),
|
|
7864
|
+
}, [P]), we(() => {
|
|
7863
7865
|
i && g(i);
|
|
7864
|
-
}, [i]),
|
|
7866
|
+
}, [i]), we(() => {
|
|
7865
7867
|
if (e) {
|
|
7866
7868
|
const G = C();
|
|
7867
7869
|
D({
|
|
@@ -7872,12 +7874,12 @@ const Yh = (e, r) => {
|
|
|
7872
7874
|
D({
|
|
7873
7875
|
type: K.ClearDates
|
|
7874
7876
|
});
|
|
7875
|
-
}, [e, T.current]),
|
|
7877
|
+
}, [e, T.current]), we(() => {
|
|
7876
7878
|
I && D({
|
|
7877
7879
|
type: K.SetTimeFormat,
|
|
7878
7880
|
timeFormat: I ? ve.TwentyFourHour : ve.TwelveHour
|
|
7879
7881
|
});
|
|
7880
|
-
}, [I]),
|
|
7882
|
+
}, [I]), we(() => {
|
|
7881
7883
|
v && (Y.current = v);
|
|
7882
7884
|
}, [v]);
|
|
7883
7885
|
const g = (G) => {
|
|
@@ -7914,7 +7916,7 @@ const Yh = (e, r) => {
|
|
|
7914
7916
|
[_]
|
|
7915
7917
|
), W = (G) => {
|
|
7916
7918
|
const ce = G.target.innerText;
|
|
7917
|
-
|
|
7919
|
+
Ee(ce);
|
|
7918
7920
|
}, Z = (G) => {
|
|
7919
7921
|
if (G) {
|
|
7920
7922
|
const ce = Ft(G, T.current);
|
|
@@ -7922,8 +7924,8 @@ const Yh = (e, r) => {
|
|
|
7922
7924
|
} else
|
|
7923
7925
|
return !0;
|
|
7924
7926
|
}, q = (G) => {
|
|
7925
|
-
|
|
7926
|
-
},
|
|
7927
|
+
Ee(G || "");
|
|
7928
|
+
}, Ee = (G) => {
|
|
7927
7929
|
const ce = l !== de.DateRange ? Ft(G, T.current) : us(G, T.current);
|
|
7928
7930
|
ce ? (Array.isArray(ce) ? (Rh(
|
|
7929
7931
|
ce[0],
|
|
@@ -8111,7 +8113,7 @@ const Yh = (e, r) => {
|
|
|
8111
8113
|
onInput: W,
|
|
8112
8114
|
iconPosition: w,
|
|
8113
8115
|
iconElement: Ue.rightElement || Ue.leftElement
|
|
8114
|
-
}, Dt = j || ((G, ce) => /* @__PURE__ */ f.jsx(f.Fragment, { children: ce })), ze =
|
|
8116
|
+
}, Dt = j || ((G, ce) => /* @__PURE__ */ f.jsx(f.Fragment, { children: ce })), ze = Te(
|
|
8115
8117
|
"bsc-text-left",
|
|
8116
8118
|
{
|
|
8117
8119
|
"bsc-bg-gray-4 dark:bsc-bg-mono-dark-3": r,
|
package/dist/index.es.js.gz
CHANGED
|
Binary file
|
package/dist/index.umd.js
CHANGED
|
@@ -28,7 +28,7 @@ Check the top-level render call using <`+N+">.")}return v}}function da(u,v){{if(
|
|
|
28
28
|
Copyright (c) 2018 Jed Watson.
|
|
29
29
|
Licensed under the MIT License (MIT), see
|
|
30
30
|
http://jedwatson.github.io/classnames
|
|
31
|
-
*/(function(e){(function(){var r={}.hasOwnProperty;function t(){for(var a="",o=0;o<arguments.length;o++){var i=arguments[o];i&&(a=s(a,n(i)))}return a}function n(a){if(typeof a=="string"||typeof a=="number")return a;if(typeof a!="object")return"";if(Array.isArray(a))return t.apply(null,a);if(a.toString!==Object.prototype.toString&&!a.toString.toString().includes("[native code]"))return a.toString();var o="";for(var i in a)r.call(a,i)&&a[i]&&(o=s(o,i));return o}function s(a,o){return o?a?a+" "+o:a+o:a}e.exports?(t.default=t,e.exports=t):window.classNames=t})()})(dn);var xa=dn.exports;const xe=on(xa),wa=(e,r)=>{const t=d.useRef(null),{buttonType:n,type:s="button",disabled:a=!1,form:o,fullWidth:i=!1,onClick:c,className:l,children:h}=e,b=()=>{c==null||c()},w=()=>{var x;(x=t.current)==null||x.click()};d.useImperativeHandle(r,()=>({click:w}));const T=xe("max-sm:bsc-p-4 md:bsc-p-2 dark:bsc-bg-mono-light-1 dark:hover:bsc-bg-mono-light-2 dark:bsc-text-mono-dark-1",{"bsc-w-full":i,"bsc-bg-gray-3 bsc-text-gray-2":a,"bsc-bg-primary-1 bsc-text-white hover:bsc-bg-primary-2":n==="primary","bsc-bg-primary-2 bsc-text-white hover:bsc-bg-primary-3":n==="secondary","bsc-bg-info bsc-text-white":n==="info","bsc-bg-success bsc-text-white":n==="success","bsc-bg-warning bsc-text-white":n==="warning","bsc-bg-error bsc-text-white":n==="error"},l);return f.jsx("button",{ref:t,type:s,onClick:b,disabled:a,form:o,className:T,children:h})},$e=d.forwardRef(wa),Bt=e=>e==null?!1:typeof e=="object",Ta=e=>Array.isArray(e)&&e.every(r=>Bt(r)),Pa=e=>e instanceof Date,Ea=e=>Array.isArray(e)&&e.every(r=>r instanceof Date),hn=e=>typeof e=="function",Sa=e=>Array.isArray(e)&&e.every(r=>hn(r)),pn=e=>{const r=typeof e;return r==="string"||r==="number"||r==="boolean"||r==="bigint"},Ca=e=>Array.isArray(e)&&e.every(r=>pn(r)),vr=e=>{if(!Bt(e))return e;const r={},t=Object.keys(e);for(let n=t.length;n--!==0;){const s=t[n],a=e[s];pn(a)||hn(a)?r[s]=a:Pa(a)?r[s]=new Date(a.getTime()):Array.isArray(a)?r[s]=mn(a):Bt(a)&&(r[s]=vr(a))}return r},Da=e=>{let r=e.length;const t=new Array(r);for(;r--!==0;)t[r]=e[r];return t},ka=e=>{let r=e.length;const t=new Array(r);for(;r--!==0;)t[r]=new Date(e[r].getTime());return t},Oa=e=>{let r=e.length;const t=new Array(r);for(;r--!==0;)t[r]=vr(e[r]);return t},mn=e=>{if(Ca(e)||Sa(e))return Da(e);if(Ea(e))return ka(e);if(Ta(e))return Oa(e);let r=e.length;const t=new Array(r);for(;r--!==0;)t[r]=e[r];return t},Na=e=>Bt(e)?Array.isArray(e)?mn(e):vr(e):e;function _a(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ja=function e(r,t){if(r===t)return!0;if(r&&t&&typeof r=="object"&&typeof t=="object"){if(r.constructor!==t.constructor)return!1;var n,s,a;if(Array.isArray(r)){if(n=r.length,n!=t.length)return!1;for(s=n;s--!==0;)if(!e(r[s],t[s]))return!1;return!0}if(r.constructor===RegExp)return r.source===t.source&&r.flags===t.flags;if(r.valueOf!==Object.prototype.valueOf)return r.valueOf()===t.valueOf();if(r.toString!==Object.prototype.toString)return r.toString()===t.toString();if(a=Object.keys(r),n=a.length,n!==Object.keys(t).length)return!1;for(s=n;s--!==0;)if(!Object.prototype.hasOwnProperty.call(t,a[s]))return!1;for(s=n;s--!==0;){var o=a[s];if(!e(r[o],t[o]))return!1}return!0}return r!==r&&t!==t};const bn=_a(ja),Ia=(e,r)=>{for(let t=e.length;t--!==0;)if(e[t]!==r[t]&&!bn(e[t],r[t]))return!0;return!1},Ma=(e,r)=>{const t=d.useRef([]),n=t.current.length>0&&t.current[0]&&Ia(t.current[0],r);return(t.current.length===0||n)&&(t.current=[Na(r),e()]),t.current[1]},gn=e=>{const r=d.useRef();let t=!1;r.current!==void 0&&(t=!bn(r.current,e));const n={changed:t,previousValue:r.current};return r.current=e,n},Ra=e=>typeof e=="function",La=e=>{const[r,t]=d.useState({value:e,initial:!0}),n=d.useRef(e);return[r,s=>{if(!Ra(s))t({value:s,initial:!1});else{const a=s(n.current);n.current=a,t({value:a,initial:!1})}}]},Aa=e=>{const[r,t]=La(e),n=d.useRef({value:e,initial:!0});return n.current!==r&&(n.current=r),[r,t,n]},Ut=({label:e,htmlFor:r,readOnly:t=!1,className:n})=>{const s=xe(n,{"bsc-text-black dark:bsc-text-mono-light-1":!t,"bsc-text-gray-4 dark:bsc-text-mono-light-3":t});return f.jsx("label",{htmlFor:r,className:s,children:e})};var Je=(e=>(e[e.Right=0]="Right",e[e.Left=1]="Left",e))(Je||{});const $a=(e,r)=>{const{name:t,label:n,value:s,readOnly:a=!1,checked:o=!1,partial:i=!1,labelLocation:c=Je.Right,className:l,useAnimation:h,onChange:b}=e,[w,T]=d.useState(!0),[x,C,j]=Aa({checked:!1,partial:!1});console.log("name",t,"checked",o,"partial",i);const S=gn(o),F=gn(i),B=d.useId(),M=fn();d.useEffect(()=>{h!==void 0?T(h):M&&M.useAnimations!==void 0&&T(M.useAnimations)},[M,h]),d.useEffect(()=>{if(console.log("name",t,"useEffect checked state",JSON.stringify(x)),x.initial)C({checked:i?!0:o,partial:i});else{console.log("name",t,"checked property",S),console.log("name",t,"partial property",F);const E=S.changed?o:x.value.checked,P=F.changed?i:x.value.partial;console.log("name",t,"new checked",E),console.log("name",t,"new partial",P),C({checked:P?!0:E,partial:P})}},[o,i]);const y=E=>{var H;const P=((H=j.current)==null?void 0:H.value.partial)===!0?!0:E.target.checked;C({checked:P,partial:!1}),b==null||b({originalEvent:E,name:t||E.target.name,value:s,checked:P})},A=E=>{var H;const P={checked:E?!0:((H=j.current)==null?void 0:H.value.checked)||!1,partial:E};C(P)},_=E=>{C({checked:E,partial:!1})};d.useImperativeHandle(r,()=>({setPartiallyChecked:A,setChecked:_}));const W=xe("bc-checkbox-wrapper bsc-flex bsc-items-center",{"bsc-pointer-events-none bsc-text-gray-2 dark:bsc-text-mono-light-3":a},l),$=xe("bc-checkbox-label bsc-cursor-pointer",{"bsc-ml-2":c===Je.Right,"bsc-mr-2":c===Je.Left}),re=xe("bc-checkbox-outer bsc-relative bsc-rounded *:bsc-block *:bsc-size-[21px] focus-within:bsc-ring focus-within:bsc-ring-offset-2 dark:bsc-ring-mono-light-1 dark:bsc-ring-offset-mono-dark-1",{"bsc-checkbox-animate":!a&&w,"bsc-checkbox-no-animate":a||!a&&!w}),ee=xe("bc-checkbox bsc-relative bsc-m-0 bsc-cursor-pointer bsc-appearance-none bsc-rounded bsc-border-none bsc-bg-mono-light-1 bsc-p-0 bsc-outline-none dark:bsc-bg-mono-dark-1 dark:checked:bsc-bg-mono-light-1",{"[transition:box-shadow_0.3s]":w,"bsc-checkbox-border dark:bsc-checkbox-border-dark bsc-checkbox-border-hover dark:bsc-checkbox-border-hover-dark bsc-checkbox-border-checked dark:bsc-checkbox-border-checked-dark":!a,"bsc-checkbox-border-read-only dark:bsc-checkbox-border-dark-read-only bsc-checkbox-border-checked-read-only dark:bsc-checkbox-border-checked-dark-read-only":a}),J=xe("bc-checkbox-svg bsc-pointer-events-none bsc-absolute bsc-left-0 bsc-top-0 bsc-stroke-mono-light-1 bsc-stroke-2 [stroke-linecap:round] [stroke-linejoin:round] [transform:scale(0)_translateZ(0)] dark:bsc-stroke-mono-dark-3",{"bsc-fill-primary-1 dark:bsc-fill-mono-light-1":!a,"bsc-fill-primary-4 dark:bsc-fill-mono-light-3":a});return console.log("name",t,"checked state",JSON.stringify(x)),f.jsxs("div",{className:W,children:[n&&c===Je.Left&&f.jsx(Ut,{label:n,htmlFor:B,readOnly:a,className:$}),f.jsxs("label",{className:re,children:[f.jsx("input",{id:B,name:t,type:"checkbox",checked:x.value.checked,onChange:y,className:ee}),f.jsx("svg",{viewBox:"0 0 21 21",className:J,children:x.value.partial?f.jsx("polyline",{points:"6 10.5 16 10.5"}):f.jsx("polyline",{points:"5 10.75 8.5 14.25 16 6"})})]}),n&&c===Je.Right&&f.jsx(Ut,{label:n,htmlFor:B,readOnly:a,className:$})]})},yn=d.forwardRef($a),Fa=({name:e,label:r,value:t,data:n,textField:s,valueField:a,readOnly:o=!1,orientation:i=Vt.Vertical,className:c,onChange:l})=>{const[h,b]=d.useState([]),w=Ma(()=>n,[n]);d.useEffect(()=>{b(t??[])},[t]);const T=F=>{const{value:B,checked:M}=F;let y;M?y=[...h,B]:y=h.filter(A=>A!==B),b(y),l==null||l({name:e,value:y})},x=(F,B)=>f.jsx(yn,{name:e,label:F[s],value:F[a],checked:h.some(M=>M===F[a]),readOnly:o,onChange:M=>M&&T(M),className:"bsc-mr-3"},`${e}_checkbox_${B}`),C=xe("bsc-flex bsc-flex-col bsc-gap-1",c),j=xe("bsc-flex bsc-gap-1",{"bsc-flex-col":i===Vt.Vertical}),S=F=>f.jsx("div",{className:j,children:F.map(x)});return f.jsxs("div",{className:C,children:[r&&f.jsx(Ut,{label:r,readOnly:o}),w&&S(w)]})};var Ya=typeof global=="object"&&global&&global.Object===Object&&global;const vn=Ya;var Ha=typeof self=="object"&&self&&self.Object===Object&&self,Wa=vn||Ha||Function("return this")();const Le=Wa;var Va=Le.Symbol;const ct=Va;var xn=Object.prototype,Ba=xn.hasOwnProperty,Ua=xn.toString,Dt=ct?ct.toStringTag:void 0;function qa(e){var r=Ba.call(e,Dt),t=e[Dt];try{e[Dt]=void 0;var n=!0}catch{}var s=Ua.call(e);return n&&(r?e[Dt]=t:delete e[Dt]),s}var za=Object.prototype,Ga=za.toString;function Za(e){return Ga.call(e)}var Qa="[object Null]",Ka="[object Undefined]",wn=ct?ct.toStringTag:void 0;function ut(e){return e==null?e===void 0?Ka:Qa:wn&&wn in Object(e)?qa(e):Za(e)}function lt(e){return e!=null&&typeof e=="object"}var Xa="[object Symbol]";function Ja(e){return typeof e=="symbol"||lt(e)&&ut(e)==Xa}var eo=Array.isArray;const xr=eo;var to=/\s/;function ro(e){for(var r=e.length;r--&&to.test(e.charAt(r)););return r}var no=/^\s+/;function so(e){return e&&e.slice(0,ro(e)+1).replace(no,"")}function Ve(e){var r=typeof e;return e!=null&&(r=="object"||r=="function")}var Tn=0/0,ao=/^[-+]0x[0-9a-f]+$/i,oo=/^0b[01]+$/i,io=/^0o[0-7]+$/i,co=parseInt;function Pn(e){if(typeof e=="number")return e;if(Ja(e))return Tn;if(Ve(e)){var r=typeof e.valueOf=="function"?e.valueOf():e;e=Ve(r)?r+"":r}if(typeof e!="string")return e===0?e:+e;e=so(e);var t=oo.test(e);return t||io.test(e)?co(e.slice(2),t?2:8):ao.test(e)?Tn:+e}var uo="[object AsyncFunction]",lo="[object Function]",fo="[object GeneratorFunction]",ho="[object Proxy]";function En(e){if(!Ve(e))return!1;var r=ut(e);return r==lo||r==fo||r==uo||r==ho}var po=Le["__core-js_shared__"];const wr=po;var Sn=function(){var e=/[^.]+$/.exec(wr&&wr.keys&&wr.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function mo(e){return!!Sn&&Sn in e}var bo=Function.prototype,go=bo.toString;function et(e){if(e!=null){try{return go.call(e)}catch{}try{return e+""}catch{}}return""}var yo=/[\\^$.*+?()[\]{}|]/g,vo=/^\[object .+?Constructor\]$/,xo=Function.prototype,wo=Object.prototype,To=xo.toString,Po=wo.hasOwnProperty,Eo=RegExp("^"+To.call(Po).replace(yo,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function So(e){if(!Ve(e)||mo(e))return!1;var r=En(e)?Eo:vo;return r.test(et(e))}function Co(e,r){return e==null?void 0:e[r]}function tt(e,r){var t=Co(e,r);return So(t)?t:void 0}var Do=tt(Le,"WeakMap");const Tr=Do;var Cn=Object.create,ko=function(){function e(){}return function(r){if(!Ve(r))return{};if(Cn)return Cn(r);e.prototype=r;var t=new e;return e.prototype=void 0,t}}();const Oo=ko;function No(e,r){var t=-1,n=e.length;for(r||(r=Array(n));++t<n;)r[t]=e[t];return r}var _o=function(){try{var e=tt(Object,"defineProperty");return e({},"",{}),e}catch{}}();const Dn=_o;function jo(e,r){for(var t=-1,n=e==null?0:e.length;++t<n&&r(e[t],t,e)!==!1;);return e}var Io=9007199254740991,Mo=/^(?:0|[1-9]\d*)$/;function Ro(e,r){var t=typeof e;return r=r??Io,!!r&&(t=="number"||t!="symbol"&&Mo.test(e))&&e>-1&&e%1==0&&e<r}function kn(e,r,t){r=="__proto__"&&Dn?Dn(e,r,{configurable:!0,enumerable:!0,value:t,writable:!0}):e[r]=t}function On(e,r){return e===r||e!==e&&r!==r}var Lo=Object.prototype,Ao=Lo.hasOwnProperty;function Nn(e,r,t){var n=e[r];(!(Ao.call(e,r)&&On(n,t))||t===void 0&&!(r in e))&&kn(e,r,t)}function qt(e,r,t,n){var s=!t;t||(t={});for(var a=-1,o=r.length;++a<o;){var i=r[a],c=n?n(t[i],e[i],i,t,e):void 0;c===void 0&&(c=e[i]),s?kn(t,i,c):Nn(t,i,c)}return t}var $o=9007199254740991;function _n(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=$o}function jn(e){return e!=null&&_n(e.length)&&!En(e)}var Fo=Object.prototype;function Pr(e){var r=e&&e.constructor,t=typeof r=="function"&&r.prototype||Fo;return e===t}function Yo(e,r){for(var t=-1,n=Array(e);++t<e;)n[t]=r(t);return n}var Ho="[object Arguments]";function In(e){return lt(e)&&ut(e)==Ho}var Mn=Object.prototype,Wo=Mn.hasOwnProperty,Vo=Mn.propertyIsEnumerable,Bo=In(function(){return arguments}())?In:function(e){return lt(e)&&Wo.call(e,"callee")&&!Vo.call(e,"callee")};const Uo=Bo;function qo(){return!1}var Rn=typeof X=="object"&&X&&!X.nodeType&&X,Ln=Rn&&typeof module=="object"&&module&&!module.nodeType&&module,zo=Ln&&Ln.exports===Rn,An=zo?Le.Buffer:void 0,Go=An?An.isBuffer:void 0,Zo=Go||qo;const $n=Zo;var Qo="[object Arguments]",Ko="[object Array]",Xo="[object Boolean]",Jo="[object Date]",ei="[object Error]",ti="[object Function]",ri="[object Map]",ni="[object Number]",si="[object Object]",ai="[object RegExp]",oi="[object Set]",ii="[object String]",ci="[object WeakMap]",ui="[object ArrayBuffer]",li="[object DataView]",fi="[object Float32Array]",di="[object Float64Array]",hi="[object Int8Array]",pi="[object Int16Array]",mi="[object Int32Array]",bi="[object Uint8Array]",gi="[object Uint8ClampedArray]",yi="[object Uint16Array]",vi="[object Uint32Array]",ge={};ge[fi]=ge[di]=ge[hi]=ge[pi]=ge[mi]=ge[bi]=ge[gi]=ge[yi]=ge[vi]=!0,ge[Qo]=ge[Ko]=ge[ui]=ge[Xo]=ge[li]=ge[Jo]=ge[ei]=ge[ti]=ge[ri]=ge[ni]=ge[si]=ge[ai]=ge[oi]=ge[ii]=ge[ci]=!1;function xi(e){return lt(e)&&_n(e.length)&&!!ge[ut(e)]}function Er(e){return function(r){return e(r)}}var Fn=typeof X=="object"&&X&&!X.nodeType&&X,kt=Fn&&typeof module=="object"&&module&&!module.nodeType&&module,wi=kt&&kt.exports===Fn,Sr=wi&&vn.process,Ti=function(){try{var e=kt&&kt.require&&kt.require("util").types;return e||Sr&&Sr.binding&&Sr.binding("util")}catch{}}();const ft=Ti;var Yn=ft&&ft.isTypedArray,Pi=Yn?Er(Yn):xi;const Ei=Pi;var Si=Object.prototype,Ci=Si.hasOwnProperty;function Hn(e,r){var t=xr(e),n=!t&&Uo(e),s=!t&&!n&&$n(e),a=!t&&!n&&!s&&Ei(e),o=t||n||s||a,i=o?Yo(e.length,String):[],c=i.length;for(var l in e)(r||Ci.call(e,l))&&!(o&&(l=="length"||s&&(l=="offset"||l=="parent")||a&&(l=="buffer"||l=="byteLength"||l=="byteOffset")||Ro(l,c)))&&i.push(l);return i}function Wn(e,r){return function(t){return e(r(t))}}var Di=Wn(Object.keys,Object);const ki=Di;var Oi=Object.prototype,Ni=Oi.hasOwnProperty;function _i(e){if(!Pr(e))return ki(e);var r=[];for(var t in Object(e))Ni.call(e,t)&&t!="constructor"&&r.push(t);return r}function Cr(e){return jn(e)?Hn(e):_i(e)}function ji(e){var r=[];if(e!=null)for(var t in Object(e))r.push(t);return r}var Ii=Object.prototype,Mi=Ii.hasOwnProperty;function Ri(e){if(!Ve(e))return ji(e);var r=Pr(e),t=[];for(var n in e)n=="constructor"&&(r||!Mi.call(e,n))||t.push(n);return t}function Dr(e){return jn(e)?Hn(e,!0):Ri(e)}var Li=tt(Object,"create");const Ot=Li;function Ai(){this.__data__=Ot?Ot(null):{},this.size=0}function $i(e){var r=this.has(e)&&delete this.__data__[e];return this.size-=r?1:0,r}var Fi="__lodash_hash_undefined__",Yi=Object.prototype,Hi=Yi.hasOwnProperty;function Wi(e){var r=this.__data__;if(Ot){var t=r[e];return t===Fi?void 0:t}return Hi.call(r,e)?r[e]:void 0}var Vi=Object.prototype,Bi=Vi.hasOwnProperty;function Ui(e){var r=this.__data__;return Ot?r[e]!==void 0:Bi.call(r,e)}var qi="__lodash_hash_undefined__";function zi(e,r){var t=this.__data__;return this.size+=this.has(e)?0:1,t[e]=Ot&&r===void 0?qi:r,this}function rt(e){var r=-1,t=e==null?0:e.length;for(this.clear();++r<t;){var n=e[r];this.set(n[0],n[1])}}rt.prototype.clear=Ai,rt.prototype.delete=$i,rt.prototype.get=Wi,rt.prototype.has=Ui,rt.prototype.set=zi;function Gi(){this.__data__=[],this.size=0}function zt(e,r){for(var t=e.length;t--;)if(On(e[t][0],r))return t;return-1}var Zi=Array.prototype,Qi=Zi.splice;function Ki(e){var r=this.__data__,t=zt(r,e);if(t<0)return!1;var n=r.length-1;return t==n?r.pop():Qi.call(r,t,1),--this.size,!0}function Xi(e){var r=this.__data__,t=zt(r,e);return t<0?void 0:r[t][1]}function Ji(e){return zt(this.__data__,e)>-1}function ec(e,r){var t=this.__data__,n=zt(t,e);return n<0?(++this.size,t.push([e,r])):t[n][1]=r,this}function Be(e){var r=-1,t=e==null?0:e.length;for(this.clear();++r<t;){var n=e[r];this.set(n[0],n[1])}}Be.prototype.clear=Gi,Be.prototype.delete=Ki,Be.prototype.get=Xi,Be.prototype.has=Ji,Be.prototype.set=ec;var tc=tt(Le,"Map");const Nt=tc;function rc(){this.size=0,this.__data__={hash:new rt,map:new(Nt||Be),string:new rt}}function nc(e){var r=typeof e;return r=="string"||r=="number"||r=="symbol"||r=="boolean"?e!=="__proto__":e===null}function Gt(e,r){var t=e.__data__;return nc(r)?t[typeof r=="string"?"string":"hash"]:t.map}function sc(e){var r=Gt(this,e).delete(e);return this.size-=r?1:0,r}function ac(e){return Gt(this,e).get(e)}function oc(e){return Gt(this,e).has(e)}function ic(e,r){var t=Gt(this,e),n=t.size;return t.set(e,r),this.size+=t.size==n?0:1,this}function dt(e){var r=-1,t=e==null?0:e.length;for(this.clear();++r<t;){var n=e[r];this.set(n[0],n[1])}}dt.prototype.clear=rc,dt.prototype.delete=sc,dt.prototype.get=ac,dt.prototype.has=oc,dt.prototype.set=ic;function Vn(e,r){for(var t=-1,n=r.length,s=e.length;++t<n;)e[s+t]=r[t];return e}var cc=Wn(Object.getPrototypeOf,Object);const Bn=cc;function uc(){this.__data__=new Be,this.size=0}function lc(e){var r=this.__data__,t=r.delete(e);return this.size=r.size,t}function fc(e){return this.__data__.get(e)}function dc(e){return this.__data__.has(e)}var hc=200;function pc(e,r){var t=this.__data__;if(t instanceof Be){var n=t.__data__;if(!Nt||n.length<hc-1)return n.push([e,r]),this.size=++t.size,this;t=this.__data__=new dt(n)}return t.set(e,r),this.size=t.size,this}function ht(e){var r=this.__data__=new Be(e);this.size=r.size}ht.prototype.clear=uc,ht.prototype.delete=lc,ht.prototype.get=fc,ht.prototype.has=dc,ht.prototype.set=pc;function mc(e,r){return e&&qt(r,Cr(r),e)}function bc(e,r){return e&&qt(r,Dr(r),e)}var Un=typeof X=="object"&&X&&!X.nodeType&&X,qn=Un&&typeof module=="object"&&module&&!module.nodeType&&module,gc=qn&&qn.exports===Un,zn=gc?Le.Buffer:void 0,Gn=zn?zn.allocUnsafe:void 0;function yc(e,r){if(r)return e.slice();var t=e.length,n=Gn?Gn(t):new e.constructor(t);return e.copy(n),n}function vc(e,r){for(var t=-1,n=e==null?0:e.length,s=0,a=[];++t<n;){var o=e[t];r(o,t,e)&&(a[s++]=o)}return a}function Zn(){return[]}var xc=Object.prototype,wc=xc.propertyIsEnumerable,Qn=Object.getOwnPropertySymbols,Tc=Qn?function(e){return e==null?[]:(e=Object(e),vc(Qn(e),function(r){return wc.call(e,r)}))}:Zn;const kr=Tc;function Pc(e,r){return qt(e,kr(e),r)}var Ec=Object.getOwnPropertySymbols,Sc=Ec?function(e){for(var r=[];e;)Vn(r,kr(e)),e=Bn(e);return r}:Zn;const Kn=Sc;function Cc(e,r){return qt(e,Kn(e),r)}function Xn(e,r,t){var n=r(e);return xr(e)?n:Vn(n,t(e))}function Dc(e){return Xn(e,Cr,kr)}function kc(e){return Xn(e,Dr,Kn)}var Oc=tt(Le,"DataView");const Or=Oc;var Nc=tt(Le,"Promise");const Nr=Nc;var _c=tt(Le,"Set");const _r=_c;var Jn="[object Map]",jc="[object Object]",es="[object Promise]",ts="[object Set]",rs="[object WeakMap]",ns="[object DataView]",Ic=et(Or),Mc=et(Nt),Rc=et(Nr),Lc=et(_r),Ac=et(Tr),nt=ut;(Or&&nt(new Or(new ArrayBuffer(1)))!=ns||Nt&&nt(new Nt)!=Jn||Nr&&nt(Nr.resolve())!=es||_r&&nt(new _r)!=ts||Tr&&nt(new Tr)!=rs)&&(nt=function(e){var r=ut(e),t=r==jc?e.constructor:void 0,n=t?et(t):"";if(n)switch(n){case Ic:return ns;case Mc:return Jn;case Rc:return es;case Lc:return ts;case Ac:return rs}return r});const jr=nt;var $c=Object.prototype,Fc=$c.hasOwnProperty;function Yc(e){var r=e.length,t=new e.constructor(r);return r&&typeof e[0]=="string"&&Fc.call(e,"index")&&(t.index=e.index,t.input=e.input),t}var Hc=Le.Uint8Array;const ss=Hc;function Ir(e){var r=new e.constructor(e.byteLength);return new ss(r).set(new ss(e)),r}function Wc(e,r){var t=r?Ir(e.buffer):e.buffer;return new e.constructor(t,e.byteOffset,e.byteLength)}var Vc=/\w*$/;function Bc(e){var r=new e.constructor(e.source,Vc.exec(e));return r.lastIndex=e.lastIndex,r}var as=ct?ct.prototype:void 0,os=as?as.valueOf:void 0;function Uc(e){return os?Object(os.call(e)):{}}function qc(e,r){var t=r?Ir(e.buffer):e.buffer;return new e.constructor(t,e.byteOffset,e.length)}var zc="[object Boolean]",Gc="[object Date]",Zc="[object Map]",Qc="[object Number]",Kc="[object RegExp]",Xc="[object Set]",Jc="[object String]",eu="[object Symbol]",tu="[object ArrayBuffer]",ru="[object DataView]",nu="[object Float32Array]",su="[object Float64Array]",au="[object Int8Array]",ou="[object Int16Array]",iu="[object Int32Array]",cu="[object Uint8Array]",uu="[object Uint8ClampedArray]",lu="[object Uint16Array]",fu="[object Uint32Array]";function du(e,r,t){var n=e.constructor;switch(r){case tu:return Ir(e);case zc:case Gc:return new n(+e);case ru:return Wc(e,t);case nu:case su:case au:case ou:case iu:case cu:case uu:case lu:case fu:return qc(e,t);case Zc:return new n;case Qc:case Jc:return new n(e);case Kc:return Bc(e);case Xc:return new n;case eu:return Uc(e)}}function hu(e){return typeof e.constructor=="function"&&!Pr(e)?Oo(Bn(e)):{}}var pu="[object Map]";function mu(e){return lt(e)&&jr(e)==pu}var is=ft&&ft.isMap,bu=is?Er(is):mu;const gu=bu;var yu="[object Set]";function vu(e){return lt(e)&&jr(e)==yu}var cs=ft&&ft.isSet,xu=cs?Er(cs):vu;const wu=xu;var Tu=1,Pu=2,Eu=4,us="[object Arguments]",Su="[object Array]",Cu="[object Boolean]",Du="[object Date]",ku="[object Error]",ls="[object Function]",Ou="[object GeneratorFunction]",Nu="[object Map]",_u="[object Number]",fs="[object Object]",ju="[object RegExp]",Iu="[object Set]",Mu="[object String]",Ru="[object Symbol]",Lu="[object WeakMap]",Au="[object ArrayBuffer]",$u="[object DataView]",Fu="[object Float32Array]",Yu="[object Float64Array]",Hu="[object Int8Array]",Wu="[object Int16Array]",Vu="[object Int32Array]",Bu="[object Uint8Array]",Uu="[object Uint8ClampedArray]",qu="[object Uint16Array]",zu="[object Uint32Array]",me={};me[us]=me[Su]=me[Au]=me[$u]=me[Cu]=me[Du]=me[Fu]=me[Yu]=me[Hu]=me[Wu]=me[Vu]=me[Nu]=me[_u]=me[fs]=me[ju]=me[Iu]=me[Mu]=me[Ru]=me[Bu]=me[Uu]=me[qu]=me[zu]=!0,me[ku]=me[ls]=me[Lu]=!1;function Zt(e,r,t,n,s,a){var o,i=r&Tu,c=r&Pu,l=r&Eu;if(t&&(o=s?t(e,n,s,a):t(e)),o!==void 0)return o;if(!Ve(e))return e;var h=xr(e);if(h){if(o=Yc(e),!i)return No(e,o)}else{var b=jr(e),w=b==ls||b==Ou;if($n(e))return yc(e,i);if(b==fs||b==us||w&&!s){if(o=c||w?{}:hu(e),!i)return c?Cc(e,bc(o,e)):Pc(e,mc(o,e))}else{if(!me[b])return s?e:{};o=du(e,b,i)}}a||(a=new ht);var T=a.get(e);if(T)return T;a.set(e,o),wu(e)?e.forEach(function(j){o.add(Zt(j,r,t,j,e,a))}):gu(e)&&e.forEach(function(j,S){o.set(S,Zt(j,r,t,S,e,a))});var x=l?c?kc:Dc:c?Dr:Cr,C=h?void 0:x(e);return jo(C||e,function(j,S){C&&(S=j,j=e[S]),Nn(o,S,Zt(j,r,t,S,e,a))}),o}var Gu=1,Zu=4;function Qu(e){return Zt(e,Gu|Zu)}var Ku=function(){return Le.Date.now()};const Mr=Ku;var Xu="Expected a function",Ju=Math.max,el=Math.min;function _t(e,r,t){var n,s,a,o,i,c,l=0,h=!1,b=!1,w=!0;if(typeof e!="function")throw new TypeError(Xu);r=Pn(r)||0,Ve(t)&&(h=!!t.leading,b="maxWait"in t,a=b?Ju(Pn(t.maxWait)||0,r):a,w="trailing"in t?!!t.trailing:w);function T(A){var _=n,W=s;return n=s=void 0,l=A,o=e.apply(W,_),o}function x(A){return l=A,i=setTimeout(S,r),h?T(A):o}function C(A){var _=A-c,W=A-l,$=r-_;return b?el($,a-W):$}function j(A){var _=A-c,W=A-l;return c===void 0||_>=r||_<0||b&&W>=a}function S(){var A=Mr();if(j(A))return F(A);i=setTimeout(S,C(A))}function F(A){return i=void 0,w&&n?T(A):(n=s=void 0,o)}function B(){i!==void 0&&clearTimeout(i),l=0,n=c=s=i=void 0}function M(){return i===void 0?o:F(Mr())}function y(){var A=Mr(),_=j(A);if(n=arguments,s=this,c=A,_){if(i===void 0)return x(c);if(b)return clearTimeout(i),i=setTimeout(S,r),T(c)}return i===void 0&&(i=setTimeout(S,r)),o}return y.cancel=B,y.flush=M,y}var tl="Expected a function";function rl(e,r,t){var n=!0,s=!0;if(typeof e!="function")throw new TypeError(tl);return Ve(t)&&(n="leading"in t?!!t.leading:n,s="trailing"in t?!!t.trailing:s),_t(e,r,{leading:n,maxWait:r,trailing:s})}const nl=(e,r)=>{const{value:t,readOnly:n=!1,debounceTime:s=800,fillContainer:a=!0,leftElement:o,rightElement:i,className:c,leftElementClassName:l,rightElementClassName:h,isSingleLine:b=!0,allowSingleLineScroll:w=!1,inputMode:T,placeholder:x,onFocus:C,onBlur:j,onInput:S,onInnerTextChange:F,onInnerHTMLChange:B,onElementCreate:M,onLeftElementClick:y,onRightElementClick:A}=e,_=d.useRef("bsc-flex-grow focus:bsc-outline-none"),W=d.useRef("bsc-text-gray-4"),$=d.useRef(),re=d.useCallback(p=>{const k=p.target,U=k.innerHTML;k.className=`${_.current}`,x&&U===x&&(k.innerHTML=""),C==null||C(p)},[x,C]),ee=d.useCallback(p=>{const k=p.target.innerHTML;if(x&&k===""){const U=p.target;U.innerHTML=x,U.className=`${_.current} ${W.current}`}j==null||j(p)},[x,j]),J=d.useCallback(p=>{var k,U;(k=$.current)==null||k.removeEventListener("focus",re),(U=$.current)==null||U.removeEventListener("blur",ee),x&&p&&p!==document.activeElement&&p.innerHTML===""&&(p.innerHTML=x,p.className=`${_.current} ${W.current}`),p.addEventListener("focus",re),p.addEventListener("blur",ee),$.current=p},[x]),E=d.useCallback(p=>{M==null||M(p)},[M]),P=p=>{y==null||y(p)},H=p=>{A==null||A(p)},Y=_t(p=>{S==null||S(p),F==null||F(p.target.innerText),B==null||B(p.target.innerHTML)},s),se=d.useCallback(p=>{$.current&&($.current.innerText=p)},[]),R=d.useCallback(p=>{$.current&&($.current.innerHTML=p)},[]),he=d.useCallback(()=>{var p;(p=$.current)==null||p.focus()},[]);d.useImperativeHandle(r,()=>({inputElement:$.current,setInnerText:se,setInnerHTML:R,focus:he}));const g=xe({"bsc-w-full ":a},"bsc-flex bsc-flex-row bsc-items-center bsc-shadow-sm bsc-border bsc-border-solid bsc-border-gray-3 dark:bsc-border-white dark:bsc-bg-mono-dark-1 dark:bsc-text-mono-light-1 bsc-rounded-md bsc-p-2",{"bsc-overflow-x-auto bsc-overflow-y-hidden bsc-whitespace-pre":b&&w,"bsc-overflow-hidden bsc-whitespace-pre":b&&!w},c),D=xe("bsc-flex-shrink",{"bsc-mr-2":o},l),q=xe("bsc-flex-shrink",{"bsc-ml-2":i},h);return f.jsxs("div",{className:g,ref:p=>p&&E(p),children:[o&&f.jsx("div",{className:D,onClick:P,children:o}),f.jsx("div",{ref:p=>p&&J(p),className:_.current,contentEditable:!n,suppressContentEditableWarning:!0,inputMode:T,onInput:Y,children:t}),i&&f.jsx("div",{className:q,onClick:H,children:i})]})},Qt=d.forwardRef(nl);function oe(e){const r=Object.prototype.toString.call(e);return e instanceof Date||typeof e=="object"&&r==="[object Date]"?new e.constructor(+e):typeof e=="number"||r==="[object Number]"||typeof e=="string"||r==="[object String]"?new Date(e):new Date(NaN)}function be(e,r){return e instanceof Date?new e.constructor(r):new Date(r)}function pt(e,r){const t=oe(e);return isNaN(r)?be(e,NaN):(r&&t.setDate(t.getDate()+r),t)}function st(e,r){const t=oe(e);if(isNaN(r))return be(e,NaN);if(!r)return t;const n=t.getDate(),s=be(e,t.getTime());s.setMonth(t.getMonth()+r+1,0);const a=s.getDate();return n>=a?s:(t.setFullYear(s.getFullYear(),s.getMonth(),n),t)}const ds=6048e5,Rr=6e4,Lr=36e5,sl=1e3;let al={};function jt(){return al}function Ke(e,r){var i,c,l,h;const t=jt(),n=(r==null?void 0:r.weekStartsOn)??((c=(i=r==null?void 0:r.locale)==null?void 0:i.options)==null?void 0:c.weekStartsOn)??t.weekStartsOn??((h=(l=t.locale)==null?void 0:l.options)==null?void 0:h.weekStartsOn)??0,s=oe(e),a=s.getDay(),o=(a<n?7:0)+a-n;return s.setDate(s.getDate()-o),s.setHours(0,0,0,0),s}function mt(e){return Ke(e,{weekStartsOn:1})}function ol(e){const r=oe(e),t=r.getFullYear(),n=be(e,0);n.setFullYear(t+1,0,4),n.setHours(0,0,0,0);const s=mt(n),a=be(e,0);a.setFullYear(t,0,4),a.setHours(0,0,0,0);const o=mt(a);return r.getTime()>=s.getTime()?t+1:r.getTime()>=o.getTime()?t:t-1}function hs(e){const r=oe(e);return r.setHours(0,0,0,0),r}function ps(e){const r=oe(e),t=new Date(Date.UTC(r.getFullYear(),r.getMonth(),r.getDate(),r.getHours(),r.getMinutes(),r.getSeconds(),r.getMilliseconds()));return t.setUTCFullYear(r.getFullYear()),+e-+t}function il(e){const r=ol(e),t=be(e,0);return t.setFullYear(r,0,4),t.setHours(0,0,0,0),mt(t)}function Kt(e,r){return st(e,r*12)}function ms(e,r){const t=hs(e),n=hs(r);return+t==+n}function cl(e){const r=oe(e),t=r.getMonth();return r.setFullYear(r.getFullYear(),t+1,0),r.setHours(23,59,59,999),r}function ul(e,r){const t=oe(e.start),n=oe(e.end);let s=+t>+n;const a=s?+t:+n,o=s?n:t;o.setHours(0,0,0,0);let i=(r==null?void 0:r.step)??1;if(!i)return[];i<0&&(i=-i,s=!s);const c=[];for(;+o<=a;)c.push(oe(o)),o.setDate(o.getDate()+i),o.setHours(0,0,0,0);return s?c.reverse():c}function bs(e){const r=oe(e);return r.setDate(1),r.setHours(0,0,0,0),r}function ll(e,r){const t=oe(e.start),n=oe(e.end);let s=+t>+n;const a=s?+t:+n,o=s?n:t;o.setHours(0,0,0,0),o.setMonth(0,1);let i=(r==null?void 0:r.step)??1;if(!i)return[];i<0&&(i=-i,s=!s);const c=[];for(;+o<=a;)c.push(oe(o)),o.setFullYear(o.getFullYear()+i);return s?c.reverse():c}const fl={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},dl=(e,r,t)=>{let n;const s=fl[e];return typeof s=="string"?n=s:r===1?n=s.one:n=s.other.replace("{{count}}",r.toString()),t!=null&&t.addSuffix?t.comparison&&t.comparison>0?"in "+n:n+" ago":n};function Ar(e){return(r={})=>{const t=r.width?String(r.width):e.defaultWidth;return e.formats[t]||e.formats[e.defaultWidth]}}const hl={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},pl={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},ml={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},bl={date:Ar({formats:hl,defaultWidth:"full"}),time:Ar({formats:pl,defaultWidth:"full"}),dateTime:Ar({formats:ml,defaultWidth:"full"})},gl={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},yl=(e,r,t,n)=>gl[e];function It(e){return(r,t)=>{const n=t!=null&&t.context?String(t.context):"standalone";let s;if(n==="formatting"&&e.formattingValues){const o=e.defaultFormattingWidth||e.defaultWidth,i=t!=null&&t.width?String(t.width):o;s=e.formattingValues[i]||e.formattingValues[o]}else{const o=e.defaultWidth,i=t!=null&&t.width?String(t.width):e.defaultWidth;s=e.values[i]||e.values[o]}const a=e.argumentCallback?e.argumentCallback(r):r;return s[a]}}const vl={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},xl={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},wl={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},Tl={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},Pl={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},El={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},Sl={ordinalNumber:(e,r)=>{const t=Number(e),n=t%100;if(n>20||n<10)switch(n%10){case 1:return t+"st";case 2:return t+"nd";case 3:return t+"rd"}return t+"th"},era:It({values:vl,defaultWidth:"wide"}),quarter:It({values:xl,defaultWidth:"wide",argumentCallback:e=>e-1}),month:It({values:wl,defaultWidth:"wide"}),day:It({values:Tl,defaultWidth:"wide"}),dayPeriod:It({values:Pl,defaultWidth:"wide",formattingValues:El,defaultFormattingWidth:"wide"})};function Mt(e){return(r,t={})=>{const n=t.width,s=n&&e.matchPatterns[n]||e.matchPatterns[e.defaultMatchWidth],a=r.match(s);if(!a)return null;const o=a[0],i=n&&e.parsePatterns[n]||e.parsePatterns[e.defaultParseWidth],c=Array.isArray(i)?Dl(i,b=>b.test(o)):Cl(i,b=>b.test(o));let l;l=e.valueCallback?e.valueCallback(c):c,l=t.valueCallback?t.valueCallback(l):l;const h=r.slice(o.length);return{value:l,rest:h}}}function Cl(e,r){for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t)&&r(e[t]))return t}function Dl(e,r){for(let t=0;t<e.length;t++)if(r(e[t]))return t}function kl(e){return(r,t={})=>{const n=r.match(e.matchPattern);if(!n)return null;const s=n[0],a=r.match(e.parsePattern);if(!a)return null;let o=e.valueCallback?e.valueCallback(a[0]):a[0];o=t.valueCallback?t.valueCallback(o):o;const i=r.slice(s.length);return{value:o,rest:i}}}const Ol=/^(\d+)(th|st|nd|rd)?/i,Nl=/\d+/i,_l={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},jl={any:[/^b/i,/^(a|c)/i]},Il={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},Ml={any:[/1/i,/2/i,/3/i,/4/i]},Rl={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},Ll={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},Al={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},$l={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},Fl={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},Yl={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},Hl={ordinalNumber:kl({matchPattern:Ol,parsePattern:Nl,valueCallback:e=>parseInt(e,10)}),era:Mt({matchPatterns:_l,defaultMatchWidth:"wide",parsePatterns:jl,defaultParseWidth:"any"}),quarter:Mt({matchPatterns:Il,defaultMatchWidth:"wide",parsePatterns:Ml,defaultParseWidth:"any",valueCallback:e=>e+1}),month:Mt({matchPatterns:Rl,defaultMatchWidth:"wide",parsePatterns:Ll,defaultParseWidth:"any"}),day:Mt({matchPatterns:Al,defaultMatchWidth:"wide",parsePatterns:$l,defaultParseWidth:"any"}),dayPeriod:Mt({matchPatterns:Fl,defaultMatchWidth:"any",parsePatterns:Yl,defaultParseWidth:"any"})},Wl={code:"en-US",formatDistance:dl,formatLong:bl,formatRelative:yl,localize:Sl,match:Hl,options:{weekStartsOn:0,firstWeekContainsDate:1}};function Vl(e){const r=oe(e),t=+mt(r)-+il(r);return Math.round(t/ds)+1}function gs(e,r){var h,b,w,T;const t=oe(e),n=t.getFullYear(),s=jt(),a=(r==null?void 0:r.firstWeekContainsDate)??((b=(h=r==null?void 0:r.locale)==null?void 0:h.options)==null?void 0:b.firstWeekContainsDate)??s.firstWeekContainsDate??((T=(w=s.locale)==null?void 0:w.options)==null?void 0:T.firstWeekContainsDate)??1,o=be(e,0);o.setFullYear(n+1,0,a),o.setHours(0,0,0,0);const i=Ke(o,r),c=be(e,0);c.setFullYear(n,0,a),c.setHours(0,0,0,0);const l=Ke(c,r);return t.getTime()>=i.getTime()?n+1:t.getTime()>=l.getTime()?n:n-1}function Bl(e,r){var i,c,l,h;const t=jt(),n=(r==null?void 0:r.firstWeekContainsDate)??((c=(i=r==null?void 0:r.locale)==null?void 0:i.options)==null?void 0:c.firstWeekContainsDate)??t.firstWeekContainsDate??((h=(l=t.locale)==null?void 0:l.options)==null?void 0:h.firstWeekContainsDate)??1,s=gs(e,r),a=be(e,0);return a.setFullYear(s,0,n),a.setHours(0,0,0,0),Ke(a,r)}function Ul(e,r){const t=oe(e),n=+Ke(t,r)-+Bl(t,r);return Math.round(n/ds)+1}const ys=(e,r)=>{switch(e){case"P":return r.date({width:"short"});case"PP":return r.date({width:"medium"});case"PPP":return r.date({width:"long"});case"PPPP":default:return r.date({width:"full"})}},vs=(e,r)=>{switch(e){case"p":return r.time({width:"short"});case"pp":return r.time({width:"medium"});case"ppp":return r.time({width:"long"});case"pppp":default:return r.time({width:"full"})}},xs={p:vs,P:(e,r)=>{const t=e.match(/(P+)(p+)?/)||[],n=t[1],s=t[2];if(!s)return ys(e,r);let a;switch(n){case"P":a=r.dateTime({width:"short"});break;case"PP":a=r.dateTime({width:"medium"});break;case"PPP":a=r.dateTime({width:"long"});break;case"PPPP":default:a=r.dateTime({width:"full"});break}return a.replace("{{date}}",ys(n,r)).replace("{{time}}",vs(s,r))}},ql=/^D+$/,zl=/^Y+$/,Gl=["D","DD","YY","YYYY"];function Zl(e){return ql.test(e)}function Ql(e){return zl.test(e)}function ws(e,r,t){const n=Kl(e,r,t);if(console.warn(n),Gl.includes(e))throw new RangeError(n)}function Kl(e,r,t){const n=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${r}\`) for formatting ${n} to the input \`${t}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}function $r(e){return oe(e).getDay()}function Ts(e){const r=oe(e),t=r.getFullYear(),n=r.getMonth(),s=be(e,0);return s.setFullYear(t,n+1,0),s.setHours(0,0,0,0),s.getDate()}function Xl(){return Object.assign({},jt())}function Jl(e){let t=oe(e).getDay();return t===0&&(t=7),t}function ef(e){const r=oe(e),t=r.getMonth();return r.setFullYear(r.getFullYear(),t+1,0),r.setHours(0,0,0,0),r}function tf(e,r){const t=oe(e),n=oe(r);return+t<+n}function rf(e,r){const t=r instanceof Date?be(r,0):new r(0);return t.setFullYear(e.getFullYear(),e.getMonth(),e.getDate()),t.setHours(e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()),t}const nf=10;class Ps{constructor(){m(this,"subPriority",0)}validate(r,t){return!0}}class sf extends Ps{constructor(r,t,n,s,a){super(),this.value=r,this.validateValue=t,this.setValue=n,this.priority=s,a&&(this.subPriority=a)}validate(r,t){return this.validateValue(r,this.value,t)}set(r,t,n){return this.setValue(r,t,this.value,n)}}class af extends Ps{constructor(){super(...arguments);m(this,"priority",nf);m(this,"subPriority",-1)}set(t,n){return n.timestampIsSet?t:be(t,rf(t,Date))}}class ie{run(r,t,n,s){const a=this.parse(r,t,n,s);return a?{setter:new sf(a.value,this.validate,this.set,this.priority,this.subPriority),rest:a.rest}:null}validate(r,t,n){return!0}}class of extends ie{constructor(){super(...arguments);m(this,"priority",140);m(this,"incompatibleTokens",["R","u","t","T"])}parse(t,n,s){switch(n){case"G":case"GG":case"GGG":return s.era(t,{width:"abbreviated"})||s.era(t,{width:"narrow"});case"GGGGG":return s.era(t,{width:"narrow"});case"GGGG":default:return s.era(t,{width:"wide"})||s.era(t,{width:"abbreviated"})||s.era(t,{width:"narrow"})}}set(t,n,s){return n.era=s,t.setFullYear(s,0,1),t.setHours(0,0,0,0),t}}const Pe={month:/^(1[0-2]|0?\d)/,date:/^(3[0-1]|[0-2]?\d)/,dayOfYear:/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,week:/^(5[0-3]|[0-4]?\d)/,hour23h:/^(2[0-3]|[0-1]?\d)/,hour24h:/^(2[0-4]|[0-1]?\d)/,hour11h:/^(1[0-1]|0?\d)/,hour12h:/^(1[0-2]|0?\d)/,minute:/^[0-5]?\d/,second:/^[0-5]?\d/,singleDigit:/^\d/,twoDigits:/^\d{1,2}/,threeDigits:/^\d{1,3}/,fourDigits:/^\d{1,4}/,anyDigitsSigned:/^-?\d+/,singleDigitSigned:/^-?\d/,twoDigitsSigned:/^-?\d{1,2}/,threeDigitsSigned:/^-?\d{1,3}/,fourDigitsSigned:/^-?\d{1,4}/},Fe={basicOptionalMinutes:/^([+-])(\d{2})(\d{2})?|Z/,basic:/^([+-])(\d{2})(\d{2})|Z/,basicOptionalSeconds:/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,extended:/^([+-])(\d{2}):(\d{2})|Z/,extendedOptionalSeconds:/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/};function Ee(e,r){return e&&{value:r(e.value),rest:e.rest}}function ve(e,r){const t=r.match(e);return t?{value:parseInt(t[0],10),rest:r.slice(t[0].length)}:null}function Ye(e,r){const t=r.match(e);if(!t)return null;if(t[0]==="Z")return{value:0,rest:r.slice(1)};const n=t[1]==="+"?1:-1,s=t[2]?parseInt(t[2],10):0,a=t[3]?parseInt(t[3],10):0,o=t[5]?parseInt(t[5],10):0;return{value:n*(s*Lr+a*Rr+o*sl),rest:r.slice(t[0].length)}}function Es(e){return ve(Pe.anyDigitsSigned,e)}function we(e,r){switch(e){case 1:return ve(Pe.singleDigit,r);case 2:return ve(Pe.twoDigits,r);case 3:return ve(Pe.threeDigits,r);case 4:return ve(Pe.fourDigits,r);default:return ve(new RegExp("^\\d{1,"+e+"}"),r)}}function Xt(e,r){switch(e){case 1:return ve(Pe.singleDigitSigned,r);case 2:return ve(Pe.twoDigitsSigned,r);case 3:return ve(Pe.threeDigitsSigned,r);case 4:return ve(Pe.fourDigitsSigned,r);default:return ve(new RegExp("^-?\\d{1,"+e+"}"),r)}}function Fr(e){switch(e){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;case"am":case"midnight":case"night":default:return 0}}function Ss(e,r){const t=r>0,n=t?r:1-r;let s;if(n<=50)s=e||100;else{const a=n+50,o=Math.trunc(a/100)*100,i=e>=a%100;s=e+o-(i?100:0)}return t?s:1-s}function Cs(e){return e%400===0||e%4===0&&e%100!==0}class cf extends ie{constructor(){super(...arguments);m(this,"priority",130);m(this,"incompatibleTokens",["Y","R","u","w","I","i","e","c","t","T"])}parse(t,n,s){const a=o=>({year:o,isTwoDigitYear:n==="yy"});switch(n){case"y":return Ee(we(4,t),a);case"yo":return Ee(s.ordinalNumber(t,{unit:"year"}),a);default:return Ee(we(n.length,t),a)}}validate(t,n){return n.isTwoDigitYear||n.year>0}set(t,n,s){const a=t.getFullYear();if(s.isTwoDigitYear){const i=Ss(s.year,a);return t.setFullYear(i,0,1),t.setHours(0,0,0,0),t}const o=!("era"in n)||n.era===1?s.year:1-s.year;return t.setFullYear(o,0,1),t.setHours(0,0,0,0),t}}class uf extends ie{constructor(){super(...arguments);m(this,"priority",130);m(this,"incompatibleTokens",["y","R","u","Q","q","M","L","I","d","D","i","t","T"])}parse(t,n,s){const a=o=>({year:o,isTwoDigitYear:n==="YY"});switch(n){case"Y":return Ee(we(4,t),a);case"Yo":return Ee(s.ordinalNumber(t,{unit:"year"}),a);default:return Ee(we(n.length,t),a)}}validate(t,n){return n.isTwoDigitYear||n.year>0}set(t,n,s,a){const o=gs(t,a);if(s.isTwoDigitYear){const c=Ss(s.year,o);return t.setFullYear(c,0,a.firstWeekContainsDate),t.setHours(0,0,0,0),Ke(t,a)}const i=!("era"in n)||n.era===1?s.year:1-s.year;return t.setFullYear(i,0,a.firstWeekContainsDate),t.setHours(0,0,0,0),Ke(t,a)}}class lf extends ie{constructor(){super(...arguments);m(this,"priority",130);m(this,"incompatibleTokens",["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"])}parse(t,n){return Xt(n==="R"?4:n.length,t)}set(t,n,s){const a=be(t,0);return a.setFullYear(s,0,4),a.setHours(0,0,0,0),mt(a)}}class ff extends ie{constructor(){super(...arguments);m(this,"priority",130);m(this,"incompatibleTokens",["G","y","Y","R","w","I","i","e","c","t","T"])}parse(t,n){return Xt(n==="u"?4:n.length,t)}set(t,n,s){return t.setFullYear(s,0,1),t.setHours(0,0,0,0),t}}class df extends ie{constructor(){super(...arguments);m(this,"priority",120);m(this,"incompatibleTokens",["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"])}parse(t,n,s){switch(n){case"Q":case"QQ":return we(n.length,t);case"Qo":return s.ordinalNumber(t,{unit:"quarter"});case"QQQ":return s.quarter(t,{width:"abbreviated",context:"formatting"})||s.quarter(t,{width:"narrow",context:"formatting"});case"QQQQQ":return s.quarter(t,{width:"narrow",context:"formatting"});case"QQQQ":default:return s.quarter(t,{width:"wide",context:"formatting"})||s.quarter(t,{width:"abbreviated",context:"formatting"})||s.quarter(t,{width:"narrow",context:"formatting"})}}validate(t,n){return n>=1&&n<=4}set(t,n,s){return t.setMonth((s-1)*3,1),t.setHours(0,0,0,0),t}}class hf extends ie{constructor(){super(...arguments);m(this,"priority",120);m(this,"incompatibleTokens",["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"])}parse(t,n,s){switch(n){case"q":case"qq":return we(n.length,t);case"qo":return s.ordinalNumber(t,{unit:"quarter"});case"qqq":return s.quarter(t,{width:"abbreviated",context:"standalone"})||s.quarter(t,{width:"narrow",context:"standalone"});case"qqqqq":return s.quarter(t,{width:"narrow",context:"standalone"});case"qqqq":default:return s.quarter(t,{width:"wide",context:"standalone"})||s.quarter(t,{width:"abbreviated",context:"standalone"})||s.quarter(t,{width:"narrow",context:"standalone"})}}validate(t,n){return n>=1&&n<=4}set(t,n,s){return t.setMonth((s-1)*3,1),t.setHours(0,0,0,0),t}}class pf extends ie{constructor(){super(...arguments);m(this,"incompatibleTokens",["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]);m(this,"priority",110)}parse(t,n,s){const a=o=>o-1;switch(n){case"M":return Ee(ve(Pe.month,t),a);case"MM":return Ee(we(2,t),a);case"Mo":return Ee(s.ordinalNumber(t,{unit:"month"}),a);case"MMM":return s.month(t,{width:"abbreviated",context:"formatting"})||s.month(t,{width:"narrow",context:"formatting"});case"MMMMM":return s.month(t,{width:"narrow",context:"formatting"});case"MMMM":default:return s.month(t,{width:"wide",context:"formatting"})||s.month(t,{width:"abbreviated",context:"formatting"})||s.month(t,{width:"narrow",context:"formatting"})}}validate(t,n){return n>=0&&n<=11}set(t,n,s){return t.setMonth(s,1),t.setHours(0,0,0,0),t}}class mf extends ie{constructor(){super(...arguments);m(this,"priority",110);m(this,"incompatibleTokens",["Y","R","q","Q","M","w","I","D","i","e","c","t","T"])}parse(t,n,s){const a=o=>o-1;switch(n){case"L":return Ee(ve(Pe.month,t),a);case"LL":return Ee(we(2,t),a);case"Lo":return Ee(s.ordinalNumber(t,{unit:"month"}),a);case"LLL":return s.month(t,{width:"abbreviated",context:"standalone"})||s.month(t,{width:"narrow",context:"standalone"});case"LLLLL":return s.month(t,{width:"narrow",context:"standalone"});case"LLLL":default:return s.month(t,{width:"wide",context:"standalone"})||s.month(t,{width:"abbreviated",context:"standalone"})||s.month(t,{width:"narrow",context:"standalone"})}}validate(t,n){return n>=0&&n<=11}set(t,n,s){return t.setMonth(s,1),t.setHours(0,0,0,0),t}}function bf(e,r,t){const n=oe(e),s=Ul(n,t)-r;return n.setDate(n.getDate()-s*7),n}class gf extends ie{constructor(){super(...arguments);m(this,"priority",100);m(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","i","t","T"])}parse(t,n,s){switch(n){case"w":return ve(Pe.week,t);case"wo":return s.ordinalNumber(t,{unit:"week"});default:return we(n.length,t)}}validate(t,n){return n>=1&&n<=53}set(t,n,s,a){return Ke(bf(t,s,a),a)}}function yf(e,r){const t=oe(e),n=Vl(t)-r;return t.setDate(t.getDate()-n*7),t}class vf extends ie{constructor(){super(...arguments);m(this,"priority",100);m(this,"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"])}parse(t,n,s){switch(n){case"I":return ve(Pe.week,t);case"Io":return s.ordinalNumber(t,{unit:"week"});default:return we(n.length,t)}}validate(t,n){return n>=1&&n<=53}set(t,n,s){return mt(yf(t,s))}}const xf=[31,28,31,30,31,30,31,31,30,31,30,31],wf=[31,29,31,30,31,30,31,31,30,31,30,31];class Tf extends ie{constructor(){super(...arguments);m(this,"priority",90);m(this,"subPriority",1);m(this,"incompatibleTokens",["Y","R","q","Q","w","I","D","i","e","c","t","T"])}parse(t,n,s){switch(n){case"d":return ve(Pe.date,t);case"do":return s.ordinalNumber(t,{unit:"date"});default:return we(n.length,t)}}validate(t,n){const s=t.getFullYear(),a=Cs(s),o=t.getMonth();return a?n>=1&&n<=wf[o]:n>=1&&n<=xf[o]}set(t,n,s){return t.setDate(s),t.setHours(0,0,0,0),t}}class Pf extends ie{constructor(){super(...arguments);m(this,"priority",90);m(this,"subpriority",1);m(this,"incompatibleTokens",["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"])}parse(t,n,s){switch(n){case"D":case"DD":return ve(Pe.dayOfYear,t);case"Do":return s.ordinalNumber(t,{unit:"date"});default:return we(n.length,t)}}validate(t,n){const s=t.getFullYear();return Cs(s)?n>=1&&n<=366:n>=1&&n<=365}set(t,n,s){return t.setMonth(0,s),t.setHours(0,0,0,0),t}}function Yr(e,r,t){var b,w,T,x;const n=jt(),s=(t==null?void 0:t.weekStartsOn)??((w=(b=t==null?void 0:t.locale)==null?void 0:b.options)==null?void 0:w.weekStartsOn)??n.weekStartsOn??((x=(T=n.locale)==null?void 0:T.options)==null?void 0:x.weekStartsOn)??0,a=oe(e),o=a.getDay(),c=(r%7+7)%7,l=7-s,h=r<0||r>6?r-(o+l)%7:(c+l)%7-(o+l)%7;return pt(a,h)}class Ef extends ie{constructor(){super(...arguments);m(this,"priority",90);m(this,"incompatibleTokens",["D","i","e","c","t","T"])}parse(t,n,s){switch(n){case"E":case"EE":case"EEE":return s.day(t,{width:"abbreviated",context:"formatting"})||s.day(t,{width:"short",context:"formatting"})||s.day(t,{width:"narrow",context:"formatting"});case"EEEEE":return s.day(t,{width:"narrow",context:"formatting"});case"EEEEEE":return s.day(t,{width:"short",context:"formatting"})||s.day(t,{width:"narrow",context:"formatting"});case"EEEE":default:return s.day(t,{width:"wide",context:"formatting"})||s.day(t,{width:"abbreviated",context:"formatting"})||s.day(t,{width:"short",context:"formatting"})||s.day(t,{width:"narrow",context:"formatting"})}}validate(t,n){return n>=0&&n<=6}set(t,n,s,a){return t=Yr(t,s,a),t.setHours(0,0,0,0),t}}class Sf extends ie{constructor(){super(...arguments);m(this,"priority",90);m(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"])}parse(t,n,s,a){const o=i=>{const c=Math.floor((i-1)/7)*7;return(i+a.weekStartsOn+6)%7+c};switch(n){case"e":case"ee":return Ee(we(n.length,t),o);case"eo":return Ee(s.ordinalNumber(t,{unit:"day"}),o);case"eee":return s.day(t,{width:"abbreviated",context:"formatting"})||s.day(t,{width:"short",context:"formatting"})||s.day(t,{width:"narrow",context:"formatting"});case"eeeee":return s.day(t,{width:"narrow",context:"formatting"});case"eeeeee":return s.day(t,{width:"short",context:"formatting"})||s.day(t,{width:"narrow",context:"formatting"});case"eeee":default:return s.day(t,{width:"wide",context:"formatting"})||s.day(t,{width:"abbreviated",context:"formatting"})||s.day(t,{width:"short",context:"formatting"})||s.day(t,{width:"narrow",context:"formatting"})}}validate(t,n){return n>=0&&n<=6}set(t,n,s,a){return t=Yr(t,s,a),t.setHours(0,0,0,0),t}}class Cf extends ie{constructor(){super(...arguments);m(this,"priority",90);m(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"])}parse(t,n,s,a){const o=i=>{const c=Math.floor((i-1)/7)*7;return(i+a.weekStartsOn+6)%7+c};switch(n){case"c":case"cc":return Ee(we(n.length,t),o);case"co":return Ee(s.ordinalNumber(t,{unit:"day"}),o);case"ccc":return s.day(t,{width:"abbreviated",context:"standalone"})||s.day(t,{width:"short",context:"standalone"})||s.day(t,{width:"narrow",context:"standalone"});case"ccccc":return s.day(t,{width:"narrow",context:"standalone"});case"cccccc":return s.day(t,{width:"short",context:"standalone"})||s.day(t,{width:"narrow",context:"standalone"});case"cccc":default:return s.day(t,{width:"wide",context:"standalone"})||s.day(t,{width:"abbreviated",context:"standalone"})||s.day(t,{width:"short",context:"standalone"})||s.day(t,{width:"narrow",context:"standalone"})}}validate(t,n){return n>=0&&n<=6}set(t,n,s,a){return t=Yr(t,s,a),t.setHours(0,0,0,0),t}}function Df(e,r){const t=oe(e),n=Jl(t),s=r-n;return pt(t,s)}class kf extends ie{constructor(){super(...arguments);m(this,"priority",90);m(this,"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"])}parse(t,n,s){const a=o=>o===0?7:o;switch(n){case"i":case"ii":return we(n.length,t);case"io":return s.ordinalNumber(t,{unit:"day"});case"iii":return Ee(s.day(t,{width:"abbreviated",context:"formatting"})||s.day(t,{width:"short",context:"formatting"})||s.day(t,{width:"narrow",context:"formatting"}),a);case"iiiii":return Ee(s.day(t,{width:"narrow",context:"formatting"}),a);case"iiiiii":return Ee(s.day(t,{width:"short",context:"formatting"})||s.day(t,{width:"narrow",context:"formatting"}),a);case"iiii":default:return Ee(s.day(t,{width:"wide",context:"formatting"})||s.day(t,{width:"abbreviated",context:"formatting"})||s.day(t,{width:"short",context:"formatting"})||s.day(t,{width:"narrow",context:"formatting"}),a)}}validate(t,n){return n>=1&&n<=7}set(t,n,s){return t=Df(t,s),t.setHours(0,0,0,0),t}}class Of extends ie{constructor(){super(...arguments);m(this,"priority",80);m(this,"incompatibleTokens",["b","B","H","k","t","T"])}parse(t,n,s){switch(n){case"a":case"aa":case"aaa":return s.dayPeriod(t,{width:"abbreviated",context:"formatting"})||s.dayPeriod(t,{width:"narrow",context:"formatting"});case"aaaaa":return s.dayPeriod(t,{width:"narrow",context:"formatting"});case"aaaa":default:return s.dayPeriod(t,{width:"wide",context:"formatting"})||s.dayPeriod(t,{width:"abbreviated",context:"formatting"})||s.dayPeriod(t,{width:"narrow",context:"formatting"})}}set(t,n,s){return t.setHours(Fr(s),0,0,0),t}}class Nf extends ie{constructor(){super(...arguments);m(this,"priority",80);m(this,"incompatibleTokens",["a","B","H","k","t","T"])}parse(t,n,s){switch(n){case"b":case"bb":case"bbb":return s.dayPeriod(t,{width:"abbreviated",context:"formatting"})||s.dayPeriod(t,{width:"narrow",context:"formatting"});case"bbbbb":return s.dayPeriod(t,{width:"narrow",context:"formatting"});case"bbbb":default:return s.dayPeriod(t,{width:"wide",context:"formatting"})||s.dayPeriod(t,{width:"abbreviated",context:"formatting"})||s.dayPeriod(t,{width:"narrow",context:"formatting"})}}set(t,n,s){return t.setHours(Fr(s),0,0,0),t}}class _f extends ie{constructor(){super(...arguments);m(this,"priority",80);m(this,"incompatibleTokens",["a","b","t","T"])}parse(t,n,s){switch(n){case"B":case"BB":case"BBB":return s.dayPeriod(t,{width:"abbreviated",context:"formatting"})||s.dayPeriod(t,{width:"narrow",context:"formatting"});case"BBBBB":return s.dayPeriod(t,{width:"narrow",context:"formatting"});case"BBBB":default:return s.dayPeriod(t,{width:"wide",context:"formatting"})||s.dayPeriod(t,{width:"abbreviated",context:"formatting"})||s.dayPeriod(t,{width:"narrow",context:"formatting"})}}set(t,n,s){return t.setHours(Fr(s),0,0,0),t}}class jf extends ie{constructor(){super(...arguments);m(this,"priority",70);m(this,"incompatibleTokens",["H","K","k","t","T"])}parse(t,n,s){switch(n){case"h":return ve(Pe.hour12h,t);case"ho":return s.ordinalNumber(t,{unit:"hour"});default:return we(n.length,t)}}validate(t,n){return n>=1&&n<=12}set(t,n,s){const a=t.getHours()>=12;return a&&s<12?t.setHours(s+12,0,0,0):!a&&s===12?t.setHours(0,0,0,0):t.setHours(s,0,0,0),t}}class If extends ie{constructor(){super(...arguments);m(this,"priority",70);m(this,"incompatibleTokens",["a","b","h","K","k","t","T"])}parse(t,n,s){switch(n){case"H":return ve(Pe.hour23h,t);case"Ho":return s.ordinalNumber(t,{unit:"hour"});default:return we(n.length,t)}}validate(t,n){return n>=0&&n<=23}set(t,n,s){return t.setHours(s,0,0,0),t}}class Mf extends ie{constructor(){super(...arguments);m(this,"priority",70);m(this,"incompatibleTokens",["h","H","k","t","T"])}parse(t,n,s){switch(n){case"K":return ve(Pe.hour11h,t);case"Ko":return s.ordinalNumber(t,{unit:"hour"});default:return we(n.length,t)}}validate(t,n){return n>=0&&n<=11}set(t,n,s){return t.getHours()>=12&&s<12?t.setHours(s+12,0,0,0):t.setHours(s,0,0,0),t}}class Rf extends ie{constructor(){super(...arguments);m(this,"priority",70);m(this,"incompatibleTokens",["a","b","h","H","K","t","T"])}parse(t,n,s){switch(n){case"k":return ve(Pe.hour24h,t);case"ko":return s.ordinalNumber(t,{unit:"hour"});default:return we(n.length,t)}}validate(t,n){return n>=1&&n<=24}set(t,n,s){const a=s<=24?s%24:s;return t.setHours(a,0,0,0),t}}class Lf extends ie{constructor(){super(...arguments);m(this,"priority",60);m(this,"incompatibleTokens",["t","T"])}parse(t,n,s){switch(n){case"m":return ve(Pe.minute,t);case"mo":return s.ordinalNumber(t,{unit:"minute"});default:return we(n.length,t)}}validate(t,n){return n>=0&&n<=59}set(t,n,s){return t.setMinutes(s,0,0),t}}class Af extends ie{constructor(){super(...arguments);m(this,"priority",50);m(this,"incompatibleTokens",["t","T"])}parse(t,n,s){switch(n){case"s":return ve(Pe.second,t);case"so":return s.ordinalNumber(t,{unit:"second"});default:return we(n.length,t)}}validate(t,n){return n>=0&&n<=59}set(t,n,s){return t.setSeconds(s,0),t}}class $f extends ie{constructor(){super(...arguments);m(this,"priority",30);m(this,"incompatibleTokens",["t","T"])}parse(t,n){const s=a=>Math.trunc(a*Math.pow(10,-n.length+3));return Ee(we(n.length,t),s)}set(t,n,s){return t.setMilliseconds(s),t}}class Ff extends ie{constructor(){super(...arguments);m(this,"priority",10);m(this,"incompatibleTokens",["t","T","x"])}parse(t,n){switch(n){case"X":return Ye(Fe.basicOptionalMinutes,t);case"XX":return Ye(Fe.basic,t);case"XXXX":return Ye(Fe.basicOptionalSeconds,t);case"XXXXX":return Ye(Fe.extendedOptionalSeconds,t);case"XXX":default:return Ye(Fe.extended,t)}}set(t,n,s){return n.timestampIsSet?t:be(t,t.getTime()-ps(t)-s)}}class Yf extends ie{constructor(){super(...arguments);m(this,"priority",10);m(this,"incompatibleTokens",["t","T","X"])}parse(t,n){switch(n){case"x":return Ye(Fe.basicOptionalMinutes,t);case"xx":return Ye(Fe.basic,t);case"xxxx":return Ye(Fe.basicOptionalSeconds,t);case"xxxxx":return Ye(Fe.extendedOptionalSeconds,t);case"xxx":default:return Ye(Fe.extended,t)}}set(t,n,s){return n.timestampIsSet?t:be(t,t.getTime()-ps(t)-s)}}class Hf extends ie{constructor(){super(...arguments);m(this,"priority",40);m(this,"incompatibleTokens","*")}parse(t){return Es(t)}set(t,n,s){return[be(t,s*1e3),{timestampIsSet:!0}]}}class Wf extends ie{constructor(){super(...arguments);m(this,"priority",20);m(this,"incompatibleTokens","*")}parse(t){return Es(t)}set(t,n,s){return[be(t,s),{timestampIsSet:!0}]}}const Vf={G:new of,y:new cf,Y:new uf,R:new lf,u:new ff,Q:new df,q:new hf,M:new pf,L:new mf,w:new gf,I:new vf,d:new Tf,D:new Pf,E:new Ef,e:new Sf,c:new Cf,i:new kf,a:new Of,b:new Nf,B:new _f,h:new jf,H:new If,K:new Mf,k:new Rf,m:new Lf,s:new Af,S:new $f,X:new Ff,x:new Yf,t:new Hf,T:new Wf},Bf=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Uf=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,qf=/^'([^]*?)'?$/,zf=/''/g,Gf=/\S/,Zf=/[a-zA-Z]/;function He(e,r,t,n){var C,j,S,F,B,M,y,A;const s=Xl(),a=(n==null?void 0:n.locale)??s.locale??Wl,o=(n==null?void 0:n.firstWeekContainsDate)??((j=(C=n==null?void 0:n.locale)==null?void 0:C.options)==null?void 0:j.firstWeekContainsDate)??s.firstWeekContainsDate??((F=(S=s.locale)==null?void 0:S.options)==null?void 0:F.firstWeekContainsDate)??1,i=(n==null?void 0:n.weekStartsOn)??((M=(B=n==null?void 0:n.locale)==null?void 0:B.options)==null?void 0:M.weekStartsOn)??s.weekStartsOn??((A=(y=s.locale)==null?void 0:y.options)==null?void 0:A.weekStartsOn)??0;if(r==="")return e===""?oe(t):be(t,NaN);const c={firstWeekContainsDate:o,weekStartsOn:i,locale:a},l=[new af],h=r.match(Uf).map(_=>{const W=_[0];if(W in xs){const $=xs[W];return $(_,a.formatLong)}return _}).join("").match(Bf),b=[];for(let _ of h){!(n!=null&&n.useAdditionalWeekYearTokens)&&Ql(_)&&ws(_,r,e),!(n!=null&&n.useAdditionalDayOfYearTokens)&&Zl(_)&&ws(_,r,e);const W=_[0],$=Vf[W];if($){const{incompatibleTokens:re}=$;if(Array.isArray(re)){const J=b.find(E=>re.includes(E.token)||E.token===W);if(J)throw new RangeError(`The format string mustn't contain \`${J.fullToken}\` and \`${_}\` at the same time`)}else if($.incompatibleTokens==="*"&&b.length>0)throw new RangeError(`The format string mustn't contain \`${_}\` and any other token at the same time`);b.push({token:W,fullToken:_});const ee=$.run(e,_,a.match,c);if(!ee)return be(t,NaN);l.push(ee.setter),e=ee.rest}else{if(W.match(Zf))throw new RangeError("Format string contains an unescaped latin alphabet character `"+W+"`");if(_==="''"?_="'":W==="'"&&(_=Qf(_)),e.indexOf(_)===0)e=e.slice(_.length);else return be(t,NaN)}}if(e.length>0&&Gf.test(e))return be(t,NaN);const w=l.map(_=>_.priority).sort((_,W)=>W-_).filter((_,W,$)=>$.indexOf(_)===W).map(_=>l.filter(W=>W.priority===_).sort((W,$)=>$.subPriority-W.subPriority)).map(_=>_[0]);let T=oe(t);if(isNaN(T.getTime()))return be(t,NaN);const x={};for(const _ of w){if(!_.validate(T,c))return be(t,NaN);const W=_.set(T,x,c);Array.isArray(W)?(T=W[0],Object.assign(x,W[1])):T=W}return be(t,T)}function Qf(e){return e.match(qf)[1].replace(zf,"'")}function Kf(e){return ms(e,Date.now())}function Xf(e,r){return pt(e,-r)}function Jf(e,r){let t=r-$r(e);return t<=0&&(t+=7),pt(e,t)}function ed(e,r){const t=(r==null?void 0:r.additionalDigits)??2,n=sd(e);let s;if(n.date){const c=ad(n.date,t);s=od(c.restDateString,c.year)}if(!s||isNaN(s.getTime()))return new Date(NaN);const a=s.getTime();let o=0,i;if(n.time&&(o=id(n.time),isNaN(o)))return new Date(NaN);if(n.timezone){if(i=cd(n.timezone),isNaN(i))return new Date(NaN)}else{const c=new Date(a+o),l=new Date(0);return l.setFullYear(c.getUTCFullYear(),c.getUTCMonth(),c.getUTCDate()),l.setHours(c.getUTCHours(),c.getUTCMinutes(),c.getUTCSeconds(),c.getUTCMilliseconds()),l}return new Date(a+o+i)}const Jt={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},td=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,rd=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,nd=/^([+-])(\d{2})(?::?(\d{2}))?$/;function sd(e){const r={},t=e.split(Jt.dateTimeDelimiter);let n;if(t.length>2)return r;if(/:/.test(t[0])?n=t[0]:(r.date=t[0],n=t[1],Jt.timeZoneDelimiter.test(r.date)&&(r.date=e.split(Jt.timeZoneDelimiter)[0],n=e.substr(r.date.length,e.length))),n){const s=Jt.timezone.exec(n);s?(r.time=n.replace(s[1],""),r.timezone=s[1]):r.time=n}return r}function ad(e,r){const t=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+r)+"})|(\\d{2}|[+-]\\d{"+(2+r)+"})$)"),n=e.match(t);if(!n)return{year:NaN,restDateString:""};const s=n[1]?parseInt(n[1]):null,a=n[2]?parseInt(n[2]):null;return{year:a===null?s:a*100,restDateString:e.slice((n[1]||n[2]).length)}}function od(e,r){if(r===null)return new Date(NaN);const t=e.match(td);if(!t)return new Date(NaN);const n=!!t[4],s=Rt(t[1]),a=Rt(t[2])-1,o=Rt(t[3]),i=Rt(t[4]),c=Rt(t[5])-1;if(n)return hd(r,i,c)?ud(r,i,c):new Date(NaN);{const l=new Date(0);return!fd(r,a,o)||!dd(r,s)?new Date(NaN):(l.setUTCFullYear(r,a,Math.max(s,o)),l)}}function Rt(e){return e?parseInt(e):1}function id(e){const r=e.match(rd);if(!r)return NaN;const t=Hr(r[1]),n=Hr(r[2]),s=Hr(r[3]);return pd(t,n,s)?t*Lr+n*Rr+s*1e3:NaN}function Hr(e){return e&&parseFloat(e.replace(",","."))||0}function cd(e){if(e==="Z")return 0;const r=e.match(nd);if(!r)return 0;const t=r[1]==="+"?-1:1,n=parseInt(r[2]),s=r[3]&&parseInt(r[3])||0;return md(n,s)?t*(n*Lr+s*Rr):NaN}function ud(e,r,t){const n=new Date(0);n.setUTCFullYear(e,0,4);const s=n.getUTCDay()||7,a=(r-1)*7+t+1-s;return n.setUTCDate(n.getUTCDate()+a),n}const ld=[31,null,31,30,31,30,31,31,30,31,30,31];function Ds(e){return e%400===0||e%4===0&&e%100!==0}function fd(e,r,t){return r>=0&&r<=11&&t>=1&&t<=(ld[r]||(Ds(e)?29:28))}function dd(e,r){return r>=1&&r<=(Ds(e)?366:365)}function hd(e,r,t){return r>=1&&r<=53&&t>=0&&t<=6}function pd(e,r,t){return e===24?r===0&&t===0:t>=0&&t<60&&r>=0&&r<60&&e>=0&&e<25}function md(e,r){return r>=0&&r<=59}function bd(e,r){const t=oe(e),n=t.getFullYear(),s=t.getDate(),a=be(e,0);a.setFullYear(n,r,15),a.setHours(0,0,0,0);const o=Ts(a);return t.setMonth(r,Math.min(s,o)),t}function gd(e,r){const t=oe(e);return isNaN(+t)?be(e,NaN):(t.setFullYear(r),t)}function ks(e,r){return st(e,-r)}function Os(e,r){return Kt(e,-r)}function Ns(){return window.navigator.languages?window.navigator.languages[0]:window.navigator.language}function yd(e,r,t){const n=[];for(let s=e;s<=r;s++)n.push(t?t(s):s);return n}function vd(e,r){const t=e.target;return t?!r.isSameNode(t)&&!r.contains(t):!1}function xd(e,r){return e.isSameNode(r)||e.contains(r)}function wd(e,r){const t=Object.entries(r),n=getComputedStyle(e);for(let s=0,a=t.length;s<a;s++){const[o,i]=t[s];if(typeof i=="string"&&i.indexOf(",")>-1){if(!i.split(",").map(l=>l.trim()).includes(n[o]))return!1}else if(n[o]!==i)return!1}return!0}function Td(e,r){const t=Object.entries(r),n=getComputedStyle(e);for(let s=0,a=t.length;s<a;s++){const[o,i]=t[s];if(typeof i=="string"&&i.indexOf(",")>-1){if(i.split(",").map(l=>l.trim()).includes(n[o]))return!0}else if(n[o]===i)return!0}return!1}function _s(e,r,t=!1,n){if(t&&wd(e,r)){if(!n||(n==null?void 0:n(e))===!0)return e}else if(!t&&Td(e,r)&&(!n||(n==null?void 0:n(e))===!0))return e;return e.parentElement?_s(e.parentElement,r,t,n):e}function js(e,r){const t=Array.from(document.querySelectorAll("body *")),n=[];for(let s=0,a=t.length;s<a;s++){const o=getComputedStyle(t[s]);o[e]&&r(o[e])&&n.push(o[e])}return n}function Lh(e){return e}function Pd(e){const r=document.documentElement;Object.keys(e).forEach(t=>{r.style.setProperty(t,e[t])})}function Ed(e){return{"--theme-bsc-primary-1":e.primary1,"--theme-bsc-primary-2":e.primary2,"--theme-bsc-primary-3":e.primary3,"--theme-bsc-primary-4":e.primary4,"--theme-bsc-primary-5":e.primary5,"--theme-bsc-gray-1":e.gray1||"#303030","--theme-bsc-gray-2":e.gray2||"#5f5f5f","--theme-bsc-gray-3":e.gray3||"#8f8f8f","--theme-bsc-gray-4":e.gray4||"#bebebe","--theme-bsc-gray-5":e.gray5||"#eee","--theme-bsc-black":e.black||"#000","--theme-bsc-white":e.white||"#fff","--theme-bsc-mono-dark-1":e.monoDark1||"#222","--theme-bsc-mono-dark-2":e.monoDark2||"#3c3c3c","--theme-bsc-mono-dark-3":e.monoDark3||"#4e4e4e","--theme-bsc-mono-light-1":e.monoLight1||"#fefefe","--theme-bsc-mono-light-2":e.monoLight2||"#eee","--theme-bsc-mono-light-3":e.monoLight3||"#ccc","--theme-bsc-info":e.info||"#2e7ff8","--theme-bsc-success":e.success||"#53ae0c","--theme-bsc-warning":e.warning||"#ff6914","--theme-bsc-error":e.error||"#f01616"}}var Oe=(e=>(e[e.Regular=24]="Regular",e[e.Small=20]="Small",e))(Oe||{});const Is=({className:e})=>f.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",className:e,children:f.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6.75 3v2.25M17.25 3v2.25M3 18.75V7.5a2.25 2.25 0 0 1 2.25-2.25h13.5A2.25 2.25 0 0 1 21 7.5v11.25m-18 0A2.25 2.25 0 0 0 5.25 21h13.5A2.25 2.25 0 0 0 21 18.75m-18 0v-7.5A2.25 2.25 0 0 1 5.25 9h13.5A2.25 2.25 0 0 1 21 11.25v7.5m-9-6h.008v.008H12v-.008ZM12 15h.008v.008H12V15Zm0 2.25h.008v.008H12v-.008ZM9.75 15h.008v.008H9.75V15Zm0 2.25h.008v.008H9.75v-.008ZM7.5 15h.008v.008H7.5V15Zm0 2.25h.008v.008H7.5v-.008Zm6.75-4.5h.008v.008h-.008v-.008Zm0 2.25h.008v.008h-.008V15Zm0 2.25h.008v.008h-.008v-.008Zm2.25-4.5h.008v.008H16.5v-.008Zm0 2.25h.008v.008H16.5V15Z"})}),Sd=({className:e})=>{const r=xe("bsc-h-6 bsc-w-6",e);return f.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",className:r,children:f.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m19.5 8.25-7.5 7.5-7.5-7.5"})})},Cd=({className:e})=>{const r=xe("bsc-h-6 bsc-w-6",e);return f.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",className:r,children:f.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.75 19.5 8.25 12l7.5-7.5"})})},Dd=({className:e})=>{const r=xe("bsc-h-6 bsc-w-6",e);return f.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",className:r,children:f.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m8.25 4.5 7.5 7.5-7.5 7.5"})})},kd=({className:e})=>{const r=xe("bsc-h-6 bsc-w-6",e);return f.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",className:r,children:f.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m4.5 15.75 7.5-7.5 7.5 7.5"})})},Od=({className:e})=>f.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",className:e,children:f.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18 18 6M6 6l12 12"})}),je=({icon:e,size:r=Oe.Regular,onClick:t,className:n})=>{const s=d.useRef({calendar:Is,chevronDown:Sd,chevronLeft:Cd,chevronRight:Dd,chevronUp:kd,close:Od}),a=d.useMemo(()=>s.current[e]||Is,[e]),o=xe({"bsc-h-[24px] bsc-w-[24px]":r===Oe.Regular,"bsc-h-[20px] bsc-w-[20px]":r===Oe.Small},n);return f.jsx("div",{onClick:t,children:f.jsx(a,{className:o})})},er=({template:e,props:r,children:t})=>e(r,t);function Nd(e,r){if(r===e)return!1;const t=Object.values(r),n=Object.values(e);if(t.length!==n.length||t.some((a,o)=>a!==n[o]))return!0;const s=Object.keys(e);return Object.keys(r).some((a,o)=>a!==s[o])}function _d(e,r){return e.matches[r]=!1,e.mediaQueries[r]={},e}function Ms(e){const r=Object.keys(e);return typeof window>"u"?r.reduce(_d,{mediaQueries:{},matches:{}}):r.reduce((t,n)=>{const s=window.matchMedia(e[n]);return t.mediaQueries[n]=s,t.matches[n]=s.matches,t},{mediaQueries:{},matches:{}})}function jd(e,r){function t(n,s){return n[s]=e.mediaQueries[s].matches,n}switch(r.type){case"updateMatches":return{matches:Object.keys(e.mediaQueries).reduce(t,{}),mediaQueries:e.mediaQueries};case"setQueries":return Ms(r.queries)}}function Id(e){const r=Et.useRef(e),[t,n]=Et.useReducer(jd,e,Ms);Et.useEffect(()=>{Nd(e,r.current)&&(n({type:"setQueries",queries:e}),r.current=e)},[e]);function s(){return n({type:"updateMatches"})}function a(c){const l=s;return typeof c.addListener<"u"?c.addListener(l):c.addEventListener("change",l),l}Et.useEffect(()=>{const c=Object.values(t.mediaQueries),l=c.map(a);function h(b,w){typeof b.addListener<"u"?b.removeListener(l[w]):b.removeEventListener("change",l[w])}return()=>{c.forEach(h)}},[t.mediaQueries]);const{matches:o}=t,i=Et.useMemo(()=>Object.values(o),[o]);return{matches:o,matchesAny:i.some(Boolean),matchesAll:i.length>0&&i.every(Boolean)}}function tr(e){return Id(Md(e)).matchesAll}const Wr={};function Md(e){return Wr[e]===void 0&&(Wr[e]={default:e}),Wr[e]}const Vr=({mobileQuery:e="screen and (max-device-width: 40rem)",tabletQuery:r="screen and (min-device-width: 40.01rem) and (max-device-width: 63.9375rem)",desktopQuery:t="screen and (min-device-width: 64rem)",mobileMarkup:n,aboveMobileMarkup:s,tabletMarkup:a,desktopMarkup:o})=>{const i=tr(e),c=tr(r),l=tr(t);return(()=>i&&n?n:!i&&s?s:c&&a?a:l&&o?o:(console.error("Invalid media settings"),null))()};function Rs(e,r,t){const n=a=>{const o=a.target,i=e.style.display!=="hidden";e&&i&&!xd(e,o)&&!s(t,o)&&r(!1),r(!0)},s=(a,o)=>{if(!a)return!1;for(let i=0,c=a.length;i<c;i++)if(a[i].isSameNode(o)||a[i].contains(o))return!0;return!1};return document.addEventListener("mousedown",n),n}function Ls(e){document.removeEventListener("mousedown",e)}function Rd(e,r){if(e==null)return{};var t={},n=Object.keys(e),s,a;for(a=0;a<n.length;a++)s=n[a],!(r.indexOf(s)>=0)&&(t[s]=e[s]);return t}function Br(e,r){return Br=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,s){return n.__proto__=s,n},Br(e,r)}function Ld(e,r){e.prototype=Object.create(r.prototype),e.prototype.constructor=e,Br(e,r)}var Ur={exports:{}},rr={exports:{}},ue={};/** @license React v16.13.1
|
|
31
|
+
*/(function(e){(function(){var r={}.hasOwnProperty;function t(){for(var a="",o=0;o<arguments.length;o++){var i=arguments[o];i&&(a=s(a,n(i)))}return a}function n(a){if(typeof a=="string"||typeof a=="number")return a;if(typeof a!="object")return"";if(Array.isArray(a))return t.apply(null,a);if(a.toString!==Object.prototype.toString&&!a.toString.toString().includes("[native code]"))return a.toString();var o="";for(var i in a)r.call(a,i)&&a[i]&&(o=s(o,i));return o}function s(a,o){return o?a?a+" "+o:a+o:a}e.exports?(t.default=t,e.exports=t):window.classNames=t})()})(dn);var xa=dn.exports;const xe=on(xa),wa=(e,r)=>{const t=d.useRef(null),{buttonType:n,type:s="button",disabled:a=!1,form:o,fullWidth:i=!1,onClick:c,className:l,children:h}=e,b=()=>{c==null||c()},w=()=>{var x;(x=t.current)==null||x.click()};d.useImperativeHandle(r,()=>({click:w}));const T=xe("max-sm:bsc-p-4 md:bsc-p-2 dark:bsc-bg-mono-light-1 dark:hover:bsc-bg-mono-light-2 dark:bsc-text-mono-dark-1",{"bsc-w-full":i,"bsc-bg-gray-3 bsc-text-gray-2":a,"bsc-bg-primary-1 bsc-text-white hover:bsc-bg-primary-2":n==="primary","bsc-bg-primary-2 bsc-text-white hover:bsc-bg-primary-3":n==="secondary","bsc-bg-info bsc-text-white":n==="info","bsc-bg-success bsc-text-white":n==="success","bsc-bg-warning bsc-text-white":n==="warning","bsc-bg-error bsc-text-white":n==="error"},l);return f.jsx("button",{ref:t,type:s,onClick:b,disabled:a,form:o,className:T,children:h})},$e=d.forwardRef(wa),Bt=e=>e==null?!1:typeof e=="object",Ta=e=>Array.isArray(e)&&e.every(r=>Bt(r)),Pa=e=>e instanceof Date,Ea=e=>Array.isArray(e)&&e.every(r=>r instanceof Date),hn=e=>typeof e=="function",Sa=e=>Array.isArray(e)&&e.every(r=>hn(r)),pn=e=>{const r=typeof e;return r==="string"||r==="number"||r==="boolean"||r==="bigint"},Ca=e=>Array.isArray(e)&&e.every(r=>pn(r)),vr=e=>{if(!Bt(e))return e;const r={},t=Object.keys(e);for(let n=t.length;n--!==0;){const s=t[n],a=e[s];pn(a)||hn(a)?r[s]=a:Pa(a)?r[s]=new Date(a.getTime()):Array.isArray(a)?r[s]=mn(a):Bt(a)&&(r[s]=vr(a))}return r},Da=e=>{let r=e.length;const t=new Array(r);for(;r--!==0;)t[r]=e[r];return t},ka=e=>{let r=e.length;const t=new Array(r);for(;r--!==0;)t[r]=new Date(e[r].getTime());return t},Oa=e=>{let r=e.length;const t=new Array(r);for(;r--!==0;)t[r]=vr(e[r]);return t},mn=e=>{if(Ca(e)||Sa(e))return Da(e);if(Ea(e))return ka(e);if(Ta(e))return Oa(e);let r=e.length;const t=new Array(r);for(;r--!==0;)t[r]=e[r];return t},Na=e=>Bt(e)?Array.isArray(e)?mn(e):vr(e):e;function _a(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ja=function e(r,t){if(r===t)return!0;if(r&&t&&typeof r=="object"&&typeof t=="object"){if(r.constructor!==t.constructor)return!1;var n,s,a;if(Array.isArray(r)){if(n=r.length,n!=t.length)return!1;for(s=n;s--!==0;)if(!e(r[s],t[s]))return!1;return!0}if(r.constructor===RegExp)return r.source===t.source&&r.flags===t.flags;if(r.valueOf!==Object.prototype.valueOf)return r.valueOf()===t.valueOf();if(r.toString!==Object.prototype.toString)return r.toString()===t.toString();if(a=Object.keys(r),n=a.length,n!==Object.keys(t).length)return!1;for(s=n;s--!==0;)if(!Object.prototype.hasOwnProperty.call(t,a[s]))return!1;for(s=n;s--!==0;){var o=a[s];if(!e(r[o],t[o]))return!1}return!0}return r!==r&&t!==t};const bn=_a(ja),Ia=(e,r)=>{for(let t=e.length;t--!==0;)if(e[t]!==r[t]&&!bn(e[t],r[t]))return!0;return!1},Ma=(e,r)=>{const t=d.useRef([]),n=t.current.length>0&&t.current[0]&&Ia(t.current[0],r);return(t.current.length===0||n)&&(t.current=[Na(r),e()]),t.current[1]},gn=e=>{const r=d.useRef();let t=!1;r.current!==void 0&&(t=!bn(r.current,e));const n={changed:t,previousValue:r.current};return r.current=e,n},Ra=e=>typeof e=="function",La=e=>{const[r,t]=d.useState({value:e,initial:!0}),n=d.useRef(e);return[r,s=>{if(!Ra(s))t({value:s,initial:!1});else{const a=s(n.current);n.current=a,t({value:a,initial:!1})}}]},Aa=e=>{const[r,t]=La(e),n=d.useRef({value:e,initial:!0});return n.current!==r&&(n.current=r),[r,t,n]},Ut=({label:e,htmlFor:r,readOnly:t=!1,className:n})=>{const s=xe(n,{"bsc-text-black dark:bsc-text-mono-light-1":!t,"bsc-text-gray-4 dark:bsc-text-mono-light-3":t});return f.jsx("label",{htmlFor:r,className:s,children:e})};var Je=(e=>(e[e.Right=0]="Right",e[e.Left=1]="Left",e))(Je||{});const $a=(e,r)=>{const{name:t,label:n,value:s,readOnly:a=!1,checked:o=!1,partial:i=!1,labelLocation:c=Je.Right,className:l,useAnimation:h,onChange:b}=e,[w,T]=d.useState(!0),[x,C,j]=Aa({checked:!1,partial:!1});console.log("name",t,"checked",o,"partial",i);const S=gn(o),F=gn(i),B=d.useId(),M=fn();d.useEffect(()=>(console.log("name",t,"component created"),()=>{console.log("name",t,"component destroyed")}),[]),d.useEffect(()=>{h!==void 0?T(h):M&&M.useAnimations!==void 0&&T(M.useAnimations)},[M,h]),d.useEffect(()=>{if(console.log("name",t,"useEffect checked state",JSON.stringify(x)),x.initial)C({checked:i?!0:o,partial:i});else{console.log("name",t,"checked property",S),console.log("name",t,"partial property",F);const E=S.changed?o:x.value.checked,P=F.changed?i:x.value.partial;console.log("name",t,"new checked",E),console.log("name",t,"new partial",P),C({checked:P?!0:E,partial:P})}},[o,i]);const y=E=>{var H;const P=((H=j.current)==null?void 0:H.value.partial)===!0?!0:E.target.checked;C({checked:P,partial:!1}),b==null||b({originalEvent:E,name:t||E.target.name,value:s,checked:P})},A=E=>{var H;const P={checked:E?!0:((H=j.current)==null?void 0:H.value.checked)||!1,partial:E};C(P)},_=E=>{C({checked:E,partial:!1})};d.useImperativeHandle(r,()=>({setPartiallyChecked:A,setChecked:_}));const W=xe("bc-checkbox-wrapper bsc-flex bsc-items-center",{"bsc-pointer-events-none bsc-text-gray-2 dark:bsc-text-mono-light-3":a},l),$=xe("bc-checkbox-label bsc-cursor-pointer",{"bsc-ml-2":c===Je.Right,"bsc-mr-2":c===Je.Left}),re=xe("bc-checkbox-outer bsc-relative bsc-rounded *:bsc-block *:bsc-size-[21px] focus-within:bsc-ring focus-within:bsc-ring-offset-2 dark:bsc-ring-mono-light-1 dark:bsc-ring-offset-mono-dark-1",{"bsc-checkbox-animate":!a&&w,"bsc-checkbox-no-animate":a||!a&&!w}),ee=xe("bc-checkbox bsc-relative bsc-m-0 bsc-cursor-pointer bsc-appearance-none bsc-rounded bsc-border-none bsc-bg-mono-light-1 bsc-p-0 bsc-outline-none dark:bsc-bg-mono-dark-1 dark:checked:bsc-bg-mono-light-1",{"[transition:box-shadow_0.3s]":w,"bsc-checkbox-border dark:bsc-checkbox-border-dark bsc-checkbox-border-hover dark:bsc-checkbox-border-hover-dark bsc-checkbox-border-checked dark:bsc-checkbox-border-checked-dark":!a,"bsc-checkbox-border-read-only dark:bsc-checkbox-border-dark-read-only bsc-checkbox-border-checked-read-only dark:bsc-checkbox-border-checked-dark-read-only":a}),J=xe("bc-checkbox-svg bsc-pointer-events-none bsc-absolute bsc-left-0 bsc-top-0 bsc-stroke-mono-light-1 bsc-stroke-2 [stroke-linecap:round] [stroke-linejoin:round] [transform:scale(0)_translateZ(0)] dark:bsc-stroke-mono-dark-3",{"bsc-fill-primary-1 dark:bsc-fill-mono-light-1":!a,"bsc-fill-primary-4 dark:bsc-fill-mono-light-3":a});return console.log("name",t,"checked state",JSON.stringify(x)),f.jsxs("div",{className:W,children:[n&&c===Je.Left&&f.jsx(Ut,{label:n,htmlFor:B,readOnly:a,className:$}),f.jsxs("label",{className:re,children:[f.jsx("input",{id:B,name:t,type:"checkbox",checked:x.value.checked,onChange:y,className:ee}),f.jsx("svg",{viewBox:"0 0 21 21",className:J,children:x.value.partial?f.jsx("polyline",{points:"6 10.5 16 10.5"}):f.jsx("polyline",{points:"5 10.75 8.5 14.25 16 6"})})]}),n&&c===Je.Right&&f.jsx(Ut,{label:n,htmlFor:B,readOnly:a,className:$})]})},yn=d.forwardRef($a),Fa=({name:e,label:r,value:t,data:n,textField:s,valueField:a,readOnly:o=!1,orientation:i=Vt.Vertical,className:c,onChange:l})=>{const[h,b]=d.useState([]),w=Ma(()=>n,[n]);d.useEffect(()=>{b(t??[])},[t]);const T=F=>{const{value:B,checked:M}=F;let y;M?y=[...h,B]:y=h.filter(A=>A!==B),b(y),l==null||l({name:e,value:y})},x=(F,B)=>f.jsx(yn,{name:e,label:F[s],value:F[a],checked:h.some(M=>M===F[a]),readOnly:o,onChange:M=>M&&T(M),className:"bsc-mr-3"},`${e}_checkbox_${B}`),C=xe("bsc-flex bsc-flex-col bsc-gap-1",c),j=xe("bsc-flex bsc-gap-1",{"bsc-flex-col":i===Vt.Vertical}),S=F=>f.jsx("div",{className:j,children:F.map(x)});return f.jsxs("div",{className:C,children:[r&&f.jsx(Ut,{label:r,readOnly:o}),w&&S(w)]})};var Ya=typeof global=="object"&&global&&global.Object===Object&&global;const vn=Ya;var Ha=typeof self=="object"&&self&&self.Object===Object&&self,Wa=vn||Ha||Function("return this")();const Le=Wa;var Va=Le.Symbol;const ct=Va;var xn=Object.prototype,Ba=xn.hasOwnProperty,Ua=xn.toString,Dt=ct?ct.toStringTag:void 0;function qa(e){var r=Ba.call(e,Dt),t=e[Dt];try{e[Dt]=void 0;var n=!0}catch{}var s=Ua.call(e);return n&&(r?e[Dt]=t:delete e[Dt]),s}var za=Object.prototype,Ga=za.toString;function Za(e){return Ga.call(e)}var Qa="[object Null]",Ka="[object Undefined]",wn=ct?ct.toStringTag:void 0;function ut(e){return e==null?e===void 0?Ka:Qa:wn&&wn in Object(e)?qa(e):Za(e)}function lt(e){return e!=null&&typeof e=="object"}var Xa="[object Symbol]";function Ja(e){return typeof e=="symbol"||lt(e)&&ut(e)==Xa}var eo=Array.isArray;const xr=eo;var to=/\s/;function ro(e){for(var r=e.length;r--&&to.test(e.charAt(r)););return r}var no=/^\s+/;function so(e){return e&&e.slice(0,ro(e)+1).replace(no,"")}function Ve(e){var r=typeof e;return e!=null&&(r=="object"||r=="function")}var Tn=0/0,ao=/^[-+]0x[0-9a-f]+$/i,oo=/^0b[01]+$/i,io=/^0o[0-7]+$/i,co=parseInt;function Pn(e){if(typeof e=="number")return e;if(Ja(e))return Tn;if(Ve(e)){var r=typeof e.valueOf=="function"?e.valueOf():e;e=Ve(r)?r+"":r}if(typeof e!="string")return e===0?e:+e;e=so(e);var t=oo.test(e);return t||io.test(e)?co(e.slice(2),t?2:8):ao.test(e)?Tn:+e}var uo="[object AsyncFunction]",lo="[object Function]",fo="[object GeneratorFunction]",ho="[object Proxy]";function En(e){if(!Ve(e))return!1;var r=ut(e);return r==lo||r==fo||r==uo||r==ho}var po=Le["__core-js_shared__"];const wr=po;var Sn=function(){var e=/[^.]+$/.exec(wr&&wr.keys&&wr.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function mo(e){return!!Sn&&Sn in e}var bo=Function.prototype,go=bo.toString;function et(e){if(e!=null){try{return go.call(e)}catch{}try{return e+""}catch{}}return""}var yo=/[\\^$.*+?()[\]{}|]/g,vo=/^\[object .+?Constructor\]$/,xo=Function.prototype,wo=Object.prototype,To=xo.toString,Po=wo.hasOwnProperty,Eo=RegExp("^"+To.call(Po).replace(yo,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function So(e){if(!Ve(e)||mo(e))return!1;var r=En(e)?Eo:vo;return r.test(et(e))}function Co(e,r){return e==null?void 0:e[r]}function tt(e,r){var t=Co(e,r);return So(t)?t:void 0}var Do=tt(Le,"WeakMap");const Tr=Do;var Cn=Object.create,ko=function(){function e(){}return function(r){if(!Ve(r))return{};if(Cn)return Cn(r);e.prototype=r;var t=new e;return e.prototype=void 0,t}}();const Oo=ko;function No(e,r){var t=-1,n=e.length;for(r||(r=Array(n));++t<n;)r[t]=e[t];return r}var _o=function(){try{var e=tt(Object,"defineProperty");return e({},"",{}),e}catch{}}();const Dn=_o;function jo(e,r){for(var t=-1,n=e==null?0:e.length;++t<n&&r(e[t],t,e)!==!1;);return e}var Io=9007199254740991,Mo=/^(?:0|[1-9]\d*)$/;function Ro(e,r){var t=typeof e;return r=r??Io,!!r&&(t=="number"||t!="symbol"&&Mo.test(e))&&e>-1&&e%1==0&&e<r}function kn(e,r,t){r=="__proto__"&&Dn?Dn(e,r,{configurable:!0,enumerable:!0,value:t,writable:!0}):e[r]=t}function On(e,r){return e===r||e!==e&&r!==r}var Lo=Object.prototype,Ao=Lo.hasOwnProperty;function Nn(e,r,t){var n=e[r];(!(Ao.call(e,r)&&On(n,t))||t===void 0&&!(r in e))&&kn(e,r,t)}function qt(e,r,t,n){var s=!t;t||(t={});for(var a=-1,o=r.length;++a<o;){var i=r[a],c=n?n(t[i],e[i],i,t,e):void 0;c===void 0&&(c=e[i]),s?kn(t,i,c):Nn(t,i,c)}return t}var $o=9007199254740991;function _n(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=$o}function jn(e){return e!=null&&_n(e.length)&&!En(e)}var Fo=Object.prototype;function Pr(e){var r=e&&e.constructor,t=typeof r=="function"&&r.prototype||Fo;return e===t}function Yo(e,r){for(var t=-1,n=Array(e);++t<e;)n[t]=r(t);return n}var Ho="[object Arguments]";function In(e){return lt(e)&&ut(e)==Ho}var Mn=Object.prototype,Wo=Mn.hasOwnProperty,Vo=Mn.propertyIsEnumerable,Bo=In(function(){return arguments}())?In:function(e){return lt(e)&&Wo.call(e,"callee")&&!Vo.call(e,"callee")};const Uo=Bo;function qo(){return!1}var Rn=typeof X=="object"&&X&&!X.nodeType&&X,Ln=Rn&&typeof module=="object"&&module&&!module.nodeType&&module,zo=Ln&&Ln.exports===Rn,An=zo?Le.Buffer:void 0,Go=An?An.isBuffer:void 0,Zo=Go||qo;const $n=Zo;var Qo="[object Arguments]",Ko="[object Array]",Xo="[object Boolean]",Jo="[object Date]",ei="[object Error]",ti="[object Function]",ri="[object Map]",ni="[object Number]",si="[object Object]",ai="[object RegExp]",oi="[object Set]",ii="[object String]",ci="[object WeakMap]",ui="[object ArrayBuffer]",li="[object DataView]",fi="[object Float32Array]",di="[object Float64Array]",hi="[object Int8Array]",pi="[object Int16Array]",mi="[object Int32Array]",bi="[object Uint8Array]",gi="[object Uint8ClampedArray]",yi="[object Uint16Array]",vi="[object Uint32Array]",ge={};ge[fi]=ge[di]=ge[hi]=ge[pi]=ge[mi]=ge[bi]=ge[gi]=ge[yi]=ge[vi]=!0,ge[Qo]=ge[Ko]=ge[ui]=ge[Xo]=ge[li]=ge[Jo]=ge[ei]=ge[ti]=ge[ri]=ge[ni]=ge[si]=ge[ai]=ge[oi]=ge[ii]=ge[ci]=!1;function xi(e){return lt(e)&&_n(e.length)&&!!ge[ut(e)]}function Er(e){return function(r){return e(r)}}var Fn=typeof X=="object"&&X&&!X.nodeType&&X,kt=Fn&&typeof module=="object"&&module&&!module.nodeType&&module,wi=kt&&kt.exports===Fn,Sr=wi&&vn.process,Ti=function(){try{var e=kt&&kt.require&&kt.require("util").types;return e||Sr&&Sr.binding&&Sr.binding("util")}catch{}}();const ft=Ti;var Yn=ft&&ft.isTypedArray,Pi=Yn?Er(Yn):xi;const Ei=Pi;var Si=Object.prototype,Ci=Si.hasOwnProperty;function Hn(e,r){var t=xr(e),n=!t&&Uo(e),s=!t&&!n&&$n(e),a=!t&&!n&&!s&&Ei(e),o=t||n||s||a,i=o?Yo(e.length,String):[],c=i.length;for(var l in e)(r||Ci.call(e,l))&&!(o&&(l=="length"||s&&(l=="offset"||l=="parent")||a&&(l=="buffer"||l=="byteLength"||l=="byteOffset")||Ro(l,c)))&&i.push(l);return i}function Wn(e,r){return function(t){return e(r(t))}}var Di=Wn(Object.keys,Object);const ki=Di;var Oi=Object.prototype,Ni=Oi.hasOwnProperty;function _i(e){if(!Pr(e))return ki(e);var r=[];for(var t in Object(e))Ni.call(e,t)&&t!="constructor"&&r.push(t);return r}function Cr(e){return jn(e)?Hn(e):_i(e)}function ji(e){var r=[];if(e!=null)for(var t in Object(e))r.push(t);return r}var Ii=Object.prototype,Mi=Ii.hasOwnProperty;function Ri(e){if(!Ve(e))return ji(e);var r=Pr(e),t=[];for(var n in e)n=="constructor"&&(r||!Mi.call(e,n))||t.push(n);return t}function Dr(e){return jn(e)?Hn(e,!0):Ri(e)}var Li=tt(Object,"create");const Ot=Li;function Ai(){this.__data__=Ot?Ot(null):{},this.size=0}function $i(e){var r=this.has(e)&&delete this.__data__[e];return this.size-=r?1:0,r}var Fi="__lodash_hash_undefined__",Yi=Object.prototype,Hi=Yi.hasOwnProperty;function Wi(e){var r=this.__data__;if(Ot){var t=r[e];return t===Fi?void 0:t}return Hi.call(r,e)?r[e]:void 0}var Vi=Object.prototype,Bi=Vi.hasOwnProperty;function Ui(e){var r=this.__data__;return Ot?r[e]!==void 0:Bi.call(r,e)}var qi="__lodash_hash_undefined__";function zi(e,r){var t=this.__data__;return this.size+=this.has(e)?0:1,t[e]=Ot&&r===void 0?qi:r,this}function rt(e){var r=-1,t=e==null?0:e.length;for(this.clear();++r<t;){var n=e[r];this.set(n[0],n[1])}}rt.prototype.clear=Ai,rt.prototype.delete=$i,rt.prototype.get=Wi,rt.prototype.has=Ui,rt.prototype.set=zi;function Gi(){this.__data__=[],this.size=0}function zt(e,r){for(var t=e.length;t--;)if(On(e[t][0],r))return t;return-1}var Zi=Array.prototype,Qi=Zi.splice;function Ki(e){var r=this.__data__,t=zt(r,e);if(t<0)return!1;var n=r.length-1;return t==n?r.pop():Qi.call(r,t,1),--this.size,!0}function Xi(e){var r=this.__data__,t=zt(r,e);return t<0?void 0:r[t][1]}function Ji(e){return zt(this.__data__,e)>-1}function ec(e,r){var t=this.__data__,n=zt(t,e);return n<0?(++this.size,t.push([e,r])):t[n][1]=r,this}function Be(e){var r=-1,t=e==null?0:e.length;for(this.clear();++r<t;){var n=e[r];this.set(n[0],n[1])}}Be.prototype.clear=Gi,Be.prototype.delete=Ki,Be.prototype.get=Xi,Be.prototype.has=Ji,Be.prototype.set=ec;var tc=tt(Le,"Map");const Nt=tc;function rc(){this.size=0,this.__data__={hash:new rt,map:new(Nt||Be),string:new rt}}function nc(e){var r=typeof e;return r=="string"||r=="number"||r=="symbol"||r=="boolean"?e!=="__proto__":e===null}function Gt(e,r){var t=e.__data__;return nc(r)?t[typeof r=="string"?"string":"hash"]:t.map}function sc(e){var r=Gt(this,e).delete(e);return this.size-=r?1:0,r}function ac(e){return Gt(this,e).get(e)}function oc(e){return Gt(this,e).has(e)}function ic(e,r){var t=Gt(this,e),n=t.size;return t.set(e,r),this.size+=t.size==n?0:1,this}function dt(e){var r=-1,t=e==null?0:e.length;for(this.clear();++r<t;){var n=e[r];this.set(n[0],n[1])}}dt.prototype.clear=rc,dt.prototype.delete=sc,dt.prototype.get=ac,dt.prototype.has=oc,dt.prototype.set=ic;function Vn(e,r){for(var t=-1,n=r.length,s=e.length;++t<n;)e[s+t]=r[t];return e}var cc=Wn(Object.getPrototypeOf,Object);const Bn=cc;function uc(){this.__data__=new Be,this.size=0}function lc(e){var r=this.__data__,t=r.delete(e);return this.size=r.size,t}function fc(e){return this.__data__.get(e)}function dc(e){return this.__data__.has(e)}var hc=200;function pc(e,r){var t=this.__data__;if(t instanceof Be){var n=t.__data__;if(!Nt||n.length<hc-1)return n.push([e,r]),this.size=++t.size,this;t=this.__data__=new dt(n)}return t.set(e,r),this.size=t.size,this}function ht(e){var r=this.__data__=new Be(e);this.size=r.size}ht.prototype.clear=uc,ht.prototype.delete=lc,ht.prototype.get=fc,ht.prototype.has=dc,ht.prototype.set=pc;function mc(e,r){return e&&qt(r,Cr(r),e)}function bc(e,r){return e&&qt(r,Dr(r),e)}var Un=typeof X=="object"&&X&&!X.nodeType&&X,qn=Un&&typeof module=="object"&&module&&!module.nodeType&&module,gc=qn&&qn.exports===Un,zn=gc?Le.Buffer:void 0,Gn=zn?zn.allocUnsafe:void 0;function yc(e,r){if(r)return e.slice();var t=e.length,n=Gn?Gn(t):new e.constructor(t);return e.copy(n),n}function vc(e,r){for(var t=-1,n=e==null?0:e.length,s=0,a=[];++t<n;){var o=e[t];r(o,t,e)&&(a[s++]=o)}return a}function Zn(){return[]}var xc=Object.prototype,wc=xc.propertyIsEnumerable,Qn=Object.getOwnPropertySymbols,Tc=Qn?function(e){return e==null?[]:(e=Object(e),vc(Qn(e),function(r){return wc.call(e,r)}))}:Zn;const kr=Tc;function Pc(e,r){return qt(e,kr(e),r)}var Ec=Object.getOwnPropertySymbols,Sc=Ec?function(e){for(var r=[];e;)Vn(r,kr(e)),e=Bn(e);return r}:Zn;const Kn=Sc;function Cc(e,r){return qt(e,Kn(e),r)}function Xn(e,r,t){var n=r(e);return xr(e)?n:Vn(n,t(e))}function Dc(e){return Xn(e,Cr,kr)}function kc(e){return Xn(e,Dr,Kn)}var Oc=tt(Le,"DataView");const Or=Oc;var Nc=tt(Le,"Promise");const Nr=Nc;var _c=tt(Le,"Set");const _r=_c;var Jn="[object Map]",jc="[object Object]",es="[object Promise]",ts="[object Set]",rs="[object WeakMap]",ns="[object DataView]",Ic=et(Or),Mc=et(Nt),Rc=et(Nr),Lc=et(_r),Ac=et(Tr),nt=ut;(Or&&nt(new Or(new ArrayBuffer(1)))!=ns||Nt&&nt(new Nt)!=Jn||Nr&&nt(Nr.resolve())!=es||_r&&nt(new _r)!=ts||Tr&&nt(new Tr)!=rs)&&(nt=function(e){var r=ut(e),t=r==jc?e.constructor:void 0,n=t?et(t):"";if(n)switch(n){case Ic:return ns;case Mc:return Jn;case Rc:return es;case Lc:return ts;case Ac:return rs}return r});const jr=nt;var $c=Object.prototype,Fc=$c.hasOwnProperty;function Yc(e){var r=e.length,t=new e.constructor(r);return r&&typeof e[0]=="string"&&Fc.call(e,"index")&&(t.index=e.index,t.input=e.input),t}var Hc=Le.Uint8Array;const ss=Hc;function Ir(e){var r=new e.constructor(e.byteLength);return new ss(r).set(new ss(e)),r}function Wc(e,r){var t=r?Ir(e.buffer):e.buffer;return new e.constructor(t,e.byteOffset,e.byteLength)}var Vc=/\w*$/;function Bc(e){var r=new e.constructor(e.source,Vc.exec(e));return r.lastIndex=e.lastIndex,r}var as=ct?ct.prototype:void 0,os=as?as.valueOf:void 0;function Uc(e){return os?Object(os.call(e)):{}}function qc(e,r){var t=r?Ir(e.buffer):e.buffer;return new e.constructor(t,e.byteOffset,e.length)}var zc="[object Boolean]",Gc="[object Date]",Zc="[object Map]",Qc="[object Number]",Kc="[object RegExp]",Xc="[object Set]",Jc="[object String]",eu="[object Symbol]",tu="[object ArrayBuffer]",ru="[object DataView]",nu="[object Float32Array]",su="[object Float64Array]",au="[object Int8Array]",ou="[object Int16Array]",iu="[object Int32Array]",cu="[object Uint8Array]",uu="[object Uint8ClampedArray]",lu="[object Uint16Array]",fu="[object Uint32Array]";function du(e,r,t){var n=e.constructor;switch(r){case tu:return Ir(e);case zc:case Gc:return new n(+e);case ru:return Wc(e,t);case nu:case su:case au:case ou:case iu:case cu:case uu:case lu:case fu:return qc(e,t);case Zc:return new n;case Qc:case Jc:return new n(e);case Kc:return Bc(e);case Xc:return new n;case eu:return Uc(e)}}function hu(e){return typeof e.constructor=="function"&&!Pr(e)?Oo(Bn(e)):{}}var pu="[object Map]";function mu(e){return lt(e)&&jr(e)==pu}var is=ft&&ft.isMap,bu=is?Er(is):mu;const gu=bu;var yu="[object Set]";function vu(e){return lt(e)&&jr(e)==yu}var cs=ft&&ft.isSet,xu=cs?Er(cs):vu;const wu=xu;var Tu=1,Pu=2,Eu=4,us="[object Arguments]",Su="[object Array]",Cu="[object Boolean]",Du="[object Date]",ku="[object Error]",ls="[object Function]",Ou="[object GeneratorFunction]",Nu="[object Map]",_u="[object Number]",fs="[object Object]",ju="[object RegExp]",Iu="[object Set]",Mu="[object String]",Ru="[object Symbol]",Lu="[object WeakMap]",Au="[object ArrayBuffer]",$u="[object DataView]",Fu="[object Float32Array]",Yu="[object Float64Array]",Hu="[object Int8Array]",Wu="[object Int16Array]",Vu="[object Int32Array]",Bu="[object Uint8Array]",Uu="[object Uint8ClampedArray]",qu="[object Uint16Array]",zu="[object Uint32Array]",me={};me[us]=me[Su]=me[Au]=me[$u]=me[Cu]=me[Du]=me[Fu]=me[Yu]=me[Hu]=me[Wu]=me[Vu]=me[Nu]=me[_u]=me[fs]=me[ju]=me[Iu]=me[Mu]=me[Ru]=me[Bu]=me[Uu]=me[qu]=me[zu]=!0,me[ku]=me[ls]=me[Lu]=!1;function Zt(e,r,t,n,s,a){var o,i=r&Tu,c=r&Pu,l=r&Eu;if(t&&(o=s?t(e,n,s,a):t(e)),o!==void 0)return o;if(!Ve(e))return e;var h=xr(e);if(h){if(o=Yc(e),!i)return No(e,o)}else{var b=jr(e),w=b==ls||b==Ou;if($n(e))return yc(e,i);if(b==fs||b==us||w&&!s){if(o=c||w?{}:hu(e),!i)return c?Cc(e,bc(o,e)):Pc(e,mc(o,e))}else{if(!me[b])return s?e:{};o=du(e,b,i)}}a||(a=new ht);var T=a.get(e);if(T)return T;a.set(e,o),wu(e)?e.forEach(function(j){o.add(Zt(j,r,t,j,e,a))}):gu(e)&&e.forEach(function(j,S){o.set(S,Zt(j,r,t,S,e,a))});var x=l?c?kc:Dc:c?Dr:Cr,C=h?void 0:x(e);return jo(C||e,function(j,S){C&&(S=j,j=e[S]),Nn(o,S,Zt(j,r,t,S,e,a))}),o}var Gu=1,Zu=4;function Qu(e){return Zt(e,Gu|Zu)}var Ku=function(){return Le.Date.now()};const Mr=Ku;var Xu="Expected a function",Ju=Math.max,el=Math.min;function _t(e,r,t){var n,s,a,o,i,c,l=0,h=!1,b=!1,w=!0;if(typeof e!="function")throw new TypeError(Xu);r=Pn(r)||0,Ve(t)&&(h=!!t.leading,b="maxWait"in t,a=b?Ju(Pn(t.maxWait)||0,r):a,w="trailing"in t?!!t.trailing:w);function T(A){var _=n,W=s;return n=s=void 0,l=A,o=e.apply(W,_),o}function x(A){return l=A,i=setTimeout(S,r),h?T(A):o}function C(A){var _=A-c,W=A-l,$=r-_;return b?el($,a-W):$}function j(A){var _=A-c,W=A-l;return c===void 0||_>=r||_<0||b&&W>=a}function S(){var A=Mr();if(j(A))return F(A);i=setTimeout(S,C(A))}function F(A){return i=void 0,w&&n?T(A):(n=s=void 0,o)}function B(){i!==void 0&&clearTimeout(i),l=0,n=c=s=i=void 0}function M(){return i===void 0?o:F(Mr())}function y(){var A=Mr(),_=j(A);if(n=arguments,s=this,c=A,_){if(i===void 0)return x(c);if(b)return clearTimeout(i),i=setTimeout(S,r),T(c)}return i===void 0&&(i=setTimeout(S,r)),o}return y.cancel=B,y.flush=M,y}var tl="Expected a function";function rl(e,r,t){var n=!0,s=!0;if(typeof e!="function")throw new TypeError(tl);return Ve(t)&&(n="leading"in t?!!t.leading:n,s="trailing"in t?!!t.trailing:s),_t(e,r,{leading:n,maxWait:r,trailing:s})}const nl=(e,r)=>{const{value:t,readOnly:n=!1,debounceTime:s=800,fillContainer:a=!0,leftElement:o,rightElement:i,className:c,leftElementClassName:l,rightElementClassName:h,isSingleLine:b=!0,allowSingleLineScroll:w=!1,inputMode:T,placeholder:x,onFocus:C,onBlur:j,onInput:S,onInnerTextChange:F,onInnerHTMLChange:B,onElementCreate:M,onLeftElementClick:y,onRightElementClick:A}=e,_=d.useRef("bsc-flex-grow focus:bsc-outline-none"),W=d.useRef("bsc-text-gray-4"),$=d.useRef(),re=d.useCallback(p=>{const k=p.target,U=k.innerHTML;k.className=`${_.current}`,x&&U===x&&(k.innerHTML=""),C==null||C(p)},[x,C]),ee=d.useCallback(p=>{const k=p.target.innerHTML;if(x&&k===""){const U=p.target;U.innerHTML=x,U.className=`${_.current} ${W.current}`}j==null||j(p)},[x,j]),J=d.useCallback(p=>{var k,U;(k=$.current)==null||k.removeEventListener("focus",re),(U=$.current)==null||U.removeEventListener("blur",ee),x&&p&&p!==document.activeElement&&p.innerHTML===""&&(p.innerHTML=x,p.className=`${_.current} ${W.current}`),p.addEventListener("focus",re),p.addEventListener("blur",ee),$.current=p},[x]),E=d.useCallback(p=>{M==null||M(p)},[M]),P=p=>{y==null||y(p)},H=p=>{A==null||A(p)},Y=_t(p=>{S==null||S(p),F==null||F(p.target.innerText),B==null||B(p.target.innerHTML)},s),se=d.useCallback(p=>{$.current&&($.current.innerText=p)},[]),R=d.useCallback(p=>{$.current&&($.current.innerHTML=p)},[]),he=d.useCallback(()=>{var p;(p=$.current)==null||p.focus()},[]);d.useImperativeHandle(r,()=>({inputElement:$.current,setInnerText:se,setInnerHTML:R,focus:he}));const g=xe({"bsc-w-full ":a},"bsc-flex bsc-flex-row bsc-items-center bsc-shadow-sm bsc-border bsc-border-solid bsc-border-gray-3 dark:bsc-border-white dark:bsc-bg-mono-dark-1 dark:bsc-text-mono-light-1 bsc-rounded-md bsc-p-2",{"bsc-overflow-x-auto bsc-overflow-y-hidden bsc-whitespace-pre":b&&w,"bsc-overflow-hidden bsc-whitespace-pre":b&&!w},c),D=xe("bsc-flex-shrink",{"bsc-mr-2":o},l),q=xe("bsc-flex-shrink",{"bsc-ml-2":i},h);return f.jsxs("div",{className:g,ref:p=>p&&E(p),children:[o&&f.jsx("div",{className:D,onClick:P,children:o}),f.jsx("div",{ref:p=>p&&J(p),className:_.current,contentEditable:!n,suppressContentEditableWarning:!0,inputMode:T,onInput:Y,children:t}),i&&f.jsx("div",{className:q,onClick:H,children:i})]})},Qt=d.forwardRef(nl);function oe(e){const r=Object.prototype.toString.call(e);return e instanceof Date||typeof e=="object"&&r==="[object Date]"?new e.constructor(+e):typeof e=="number"||r==="[object Number]"||typeof e=="string"||r==="[object String]"?new Date(e):new Date(NaN)}function be(e,r){return e instanceof Date?new e.constructor(r):new Date(r)}function pt(e,r){const t=oe(e);return isNaN(r)?be(e,NaN):(r&&t.setDate(t.getDate()+r),t)}function st(e,r){const t=oe(e);if(isNaN(r))return be(e,NaN);if(!r)return t;const n=t.getDate(),s=be(e,t.getTime());s.setMonth(t.getMonth()+r+1,0);const a=s.getDate();return n>=a?s:(t.setFullYear(s.getFullYear(),s.getMonth(),n),t)}const ds=6048e5,Rr=6e4,Lr=36e5,sl=1e3;let al={};function jt(){return al}function Ke(e,r){var i,c,l,h;const t=jt(),n=(r==null?void 0:r.weekStartsOn)??((c=(i=r==null?void 0:r.locale)==null?void 0:i.options)==null?void 0:c.weekStartsOn)??t.weekStartsOn??((h=(l=t.locale)==null?void 0:l.options)==null?void 0:h.weekStartsOn)??0,s=oe(e),a=s.getDay(),o=(a<n?7:0)+a-n;return s.setDate(s.getDate()-o),s.setHours(0,0,0,0),s}function mt(e){return Ke(e,{weekStartsOn:1})}function ol(e){const r=oe(e),t=r.getFullYear(),n=be(e,0);n.setFullYear(t+1,0,4),n.setHours(0,0,0,0);const s=mt(n),a=be(e,0);a.setFullYear(t,0,4),a.setHours(0,0,0,0);const o=mt(a);return r.getTime()>=s.getTime()?t+1:r.getTime()>=o.getTime()?t:t-1}function hs(e){const r=oe(e);return r.setHours(0,0,0,0),r}function ps(e){const r=oe(e),t=new Date(Date.UTC(r.getFullYear(),r.getMonth(),r.getDate(),r.getHours(),r.getMinutes(),r.getSeconds(),r.getMilliseconds()));return t.setUTCFullYear(r.getFullYear()),+e-+t}function il(e){const r=ol(e),t=be(e,0);return t.setFullYear(r,0,4),t.setHours(0,0,0,0),mt(t)}function Kt(e,r){return st(e,r*12)}function ms(e,r){const t=hs(e),n=hs(r);return+t==+n}function cl(e){const r=oe(e),t=r.getMonth();return r.setFullYear(r.getFullYear(),t+1,0),r.setHours(23,59,59,999),r}function ul(e,r){const t=oe(e.start),n=oe(e.end);let s=+t>+n;const a=s?+t:+n,o=s?n:t;o.setHours(0,0,0,0);let i=(r==null?void 0:r.step)??1;if(!i)return[];i<0&&(i=-i,s=!s);const c=[];for(;+o<=a;)c.push(oe(o)),o.setDate(o.getDate()+i),o.setHours(0,0,0,0);return s?c.reverse():c}function bs(e){const r=oe(e);return r.setDate(1),r.setHours(0,0,0,0),r}function ll(e,r){const t=oe(e.start),n=oe(e.end);let s=+t>+n;const a=s?+t:+n,o=s?n:t;o.setHours(0,0,0,0),o.setMonth(0,1);let i=(r==null?void 0:r.step)??1;if(!i)return[];i<0&&(i=-i,s=!s);const c=[];for(;+o<=a;)c.push(oe(o)),o.setFullYear(o.getFullYear()+i);return s?c.reverse():c}const fl={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},dl=(e,r,t)=>{let n;const s=fl[e];return typeof s=="string"?n=s:r===1?n=s.one:n=s.other.replace("{{count}}",r.toString()),t!=null&&t.addSuffix?t.comparison&&t.comparison>0?"in "+n:n+" ago":n};function Ar(e){return(r={})=>{const t=r.width?String(r.width):e.defaultWidth;return e.formats[t]||e.formats[e.defaultWidth]}}const hl={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},pl={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},ml={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},bl={date:Ar({formats:hl,defaultWidth:"full"}),time:Ar({formats:pl,defaultWidth:"full"}),dateTime:Ar({formats:ml,defaultWidth:"full"})},gl={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},yl=(e,r,t,n)=>gl[e];function It(e){return(r,t)=>{const n=t!=null&&t.context?String(t.context):"standalone";let s;if(n==="formatting"&&e.formattingValues){const o=e.defaultFormattingWidth||e.defaultWidth,i=t!=null&&t.width?String(t.width):o;s=e.formattingValues[i]||e.formattingValues[o]}else{const o=e.defaultWidth,i=t!=null&&t.width?String(t.width):e.defaultWidth;s=e.values[i]||e.values[o]}const a=e.argumentCallback?e.argumentCallback(r):r;return s[a]}}const vl={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},xl={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},wl={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},Tl={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},Pl={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},El={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},Sl={ordinalNumber:(e,r)=>{const t=Number(e),n=t%100;if(n>20||n<10)switch(n%10){case 1:return t+"st";case 2:return t+"nd";case 3:return t+"rd"}return t+"th"},era:It({values:vl,defaultWidth:"wide"}),quarter:It({values:xl,defaultWidth:"wide",argumentCallback:e=>e-1}),month:It({values:wl,defaultWidth:"wide"}),day:It({values:Tl,defaultWidth:"wide"}),dayPeriod:It({values:Pl,defaultWidth:"wide",formattingValues:El,defaultFormattingWidth:"wide"})};function Mt(e){return(r,t={})=>{const n=t.width,s=n&&e.matchPatterns[n]||e.matchPatterns[e.defaultMatchWidth],a=r.match(s);if(!a)return null;const o=a[0],i=n&&e.parsePatterns[n]||e.parsePatterns[e.defaultParseWidth],c=Array.isArray(i)?Dl(i,b=>b.test(o)):Cl(i,b=>b.test(o));let l;l=e.valueCallback?e.valueCallback(c):c,l=t.valueCallback?t.valueCallback(l):l;const h=r.slice(o.length);return{value:l,rest:h}}}function Cl(e,r){for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t)&&r(e[t]))return t}function Dl(e,r){for(let t=0;t<e.length;t++)if(r(e[t]))return t}function kl(e){return(r,t={})=>{const n=r.match(e.matchPattern);if(!n)return null;const s=n[0],a=r.match(e.parsePattern);if(!a)return null;let o=e.valueCallback?e.valueCallback(a[0]):a[0];o=t.valueCallback?t.valueCallback(o):o;const i=r.slice(s.length);return{value:o,rest:i}}}const Ol=/^(\d+)(th|st|nd|rd)?/i,Nl=/\d+/i,_l={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},jl={any:[/^b/i,/^(a|c)/i]},Il={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},Ml={any:[/1/i,/2/i,/3/i,/4/i]},Rl={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},Ll={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},Al={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},$l={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},Fl={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},Yl={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},Hl={ordinalNumber:kl({matchPattern:Ol,parsePattern:Nl,valueCallback:e=>parseInt(e,10)}),era:Mt({matchPatterns:_l,defaultMatchWidth:"wide",parsePatterns:jl,defaultParseWidth:"any"}),quarter:Mt({matchPatterns:Il,defaultMatchWidth:"wide",parsePatterns:Ml,defaultParseWidth:"any",valueCallback:e=>e+1}),month:Mt({matchPatterns:Rl,defaultMatchWidth:"wide",parsePatterns:Ll,defaultParseWidth:"any"}),day:Mt({matchPatterns:Al,defaultMatchWidth:"wide",parsePatterns:$l,defaultParseWidth:"any"}),dayPeriod:Mt({matchPatterns:Fl,defaultMatchWidth:"any",parsePatterns:Yl,defaultParseWidth:"any"})},Wl={code:"en-US",formatDistance:dl,formatLong:bl,formatRelative:yl,localize:Sl,match:Hl,options:{weekStartsOn:0,firstWeekContainsDate:1}};function Vl(e){const r=oe(e),t=+mt(r)-+il(r);return Math.round(t/ds)+1}function gs(e,r){var h,b,w,T;const t=oe(e),n=t.getFullYear(),s=jt(),a=(r==null?void 0:r.firstWeekContainsDate)??((b=(h=r==null?void 0:r.locale)==null?void 0:h.options)==null?void 0:b.firstWeekContainsDate)??s.firstWeekContainsDate??((T=(w=s.locale)==null?void 0:w.options)==null?void 0:T.firstWeekContainsDate)??1,o=be(e,0);o.setFullYear(n+1,0,a),o.setHours(0,0,0,0);const i=Ke(o,r),c=be(e,0);c.setFullYear(n,0,a),c.setHours(0,0,0,0);const l=Ke(c,r);return t.getTime()>=i.getTime()?n+1:t.getTime()>=l.getTime()?n:n-1}function Bl(e,r){var i,c,l,h;const t=jt(),n=(r==null?void 0:r.firstWeekContainsDate)??((c=(i=r==null?void 0:r.locale)==null?void 0:i.options)==null?void 0:c.firstWeekContainsDate)??t.firstWeekContainsDate??((h=(l=t.locale)==null?void 0:l.options)==null?void 0:h.firstWeekContainsDate)??1,s=gs(e,r),a=be(e,0);return a.setFullYear(s,0,n),a.setHours(0,0,0,0),Ke(a,r)}function Ul(e,r){const t=oe(e),n=+Ke(t,r)-+Bl(t,r);return Math.round(n/ds)+1}const ys=(e,r)=>{switch(e){case"P":return r.date({width:"short"});case"PP":return r.date({width:"medium"});case"PPP":return r.date({width:"long"});case"PPPP":default:return r.date({width:"full"})}},vs=(e,r)=>{switch(e){case"p":return r.time({width:"short"});case"pp":return r.time({width:"medium"});case"ppp":return r.time({width:"long"});case"pppp":default:return r.time({width:"full"})}},xs={p:vs,P:(e,r)=>{const t=e.match(/(P+)(p+)?/)||[],n=t[1],s=t[2];if(!s)return ys(e,r);let a;switch(n){case"P":a=r.dateTime({width:"short"});break;case"PP":a=r.dateTime({width:"medium"});break;case"PPP":a=r.dateTime({width:"long"});break;case"PPPP":default:a=r.dateTime({width:"full"});break}return a.replace("{{date}}",ys(n,r)).replace("{{time}}",vs(s,r))}},ql=/^D+$/,zl=/^Y+$/,Gl=["D","DD","YY","YYYY"];function Zl(e){return ql.test(e)}function Ql(e){return zl.test(e)}function ws(e,r,t){const n=Kl(e,r,t);if(console.warn(n),Gl.includes(e))throw new RangeError(n)}function Kl(e,r,t){const n=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${r}\`) for formatting ${n} to the input \`${t}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}function $r(e){return oe(e).getDay()}function Ts(e){const r=oe(e),t=r.getFullYear(),n=r.getMonth(),s=be(e,0);return s.setFullYear(t,n+1,0),s.setHours(0,0,0,0),s.getDate()}function Xl(){return Object.assign({},jt())}function Jl(e){let t=oe(e).getDay();return t===0&&(t=7),t}function ef(e){const r=oe(e),t=r.getMonth();return r.setFullYear(r.getFullYear(),t+1,0),r.setHours(0,0,0,0),r}function tf(e,r){const t=oe(e),n=oe(r);return+t<+n}function rf(e,r){const t=r instanceof Date?be(r,0):new r(0);return t.setFullYear(e.getFullYear(),e.getMonth(),e.getDate()),t.setHours(e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()),t}const nf=10;class Ps{constructor(){m(this,"subPriority",0)}validate(r,t){return!0}}class sf extends Ps{constructor(r,t,n,s,a){super(),this.value=r,this.validateValue=t,this.setValue=n,this.priority=s,a&&(this.subPriority=a)}validate(r,t){return this.validateValue(r,this.value,t)}set(r,t,n){return this.setValue(r,t,this.value,n)}}class af extends Ps{constructor(){super(...arguments);m(this,"priority",nf);m(this,"subPriority",-1)}set(t,n){return n.timestampIsSet?t:be(t,rf(t,Date))}}class ie{run(r,t,n,s){const a=this.parse(r,t,n,s);return a?{setter:new sf(a.value,this.validate,this.set,this.priority,this.subPriority),rest:a.rest}:null}validate(r,t,n){return!0}}class of extends ie{constructor(){super(...arguments);m(this,"priority",140);m(this,"incompatibleTokens",["R","u","t","T"])}parse(t,n,s){switch(n){case"G":case"GG":case"GGG":return s.era(t,{width:"abbreviated"})||s.era(t,{width:"narrow"});case"GGGGG":return s.era(t,{width:"narrow"});case"GGGG":default:return s.era(t,{width:"wide"})||s.era(t,{width:"abbreviated"})||s.era(t,{width:"narrow"})}}set(t,n,s){return n.era=s,t.setFullYear(s,0,1),t.setHours(0,0,0,0),t}}const Pe={month:/^(1[0-2]|0?\d)/,date:/^(3[0-1]|[0-2]?\d)/,dayOfYear:/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,week:/^(5[0-3]|[0-4]?\d)/,hour23h:/^(2[0-3]|[0-1]?\d)/,hour24h:/^(2[0-4]|[0-1]?\d)/,hour11h:/^(1[0-1]|0?\d)/,hour12h:/^(1[0-2]|0?\d)/,minute:/^[0-5]?\d/,second:/^[0-5]?\d/,singleDigit:/^\d/,twoDigits:/^\d{1,2}/,threeDigits:/^\d{1,3}/,fourDigits:/^\d{1,4}/,anyDigitsSigned:/^-?\d+/,singleDigitSigned:/^-?\d/,twoDigitsSigned:/^-?\d{1,2}/,threeDigitsSigned:/^-?\d{1,3}/,fourDigitsSigned:/^-?\d{1,4}/},Fe={basicOptionalMinutes:/^([+-])(\d{2})(\d{2})?|Z/,basic:/^([+-])(\d{2})(\d{2})|Z/,basicOptionalSeconds:/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,extended:/^([+-])(\d{2}):(\d{2})|Z/,extendedOptionalSeconds:/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/};function Ee(e,r){return e&&{value:r(e.value),rest:e.rest}}function ve(e,r){const t=r.match(e);return t?{value:parseInt(t[0],10),rest:r.slice(t[0].length)}:null}function Ye(e,r){const t=r.match(e);if(!t)return null;if(t[0]==="Z")return{value:0,rest:r.slice(1)};const n=t[1]==="+"?1:-1,s=t[2]?parseInt(t[2],10):0,a=t[3]?parseInt(t[3],10):0,o=t[5]?parseInt(t[5],10):0;return{value:n*(s*Lr+a*Rr+o*sl),rest:r.slice(t[0].length)}}function Es(e){return ve(Pe.anyDigitsSigned,e)}function we(e,r){switch(e){case 1:return ve(Pe.singleDigit,r);case 2:return ve(Pe.twoDigits,r);case 3:return ve(Pe.threeDigits,r);case 4:return ve(Pe.fourDigits,r);default:return ve(new RegExp("^\\d{1,"+e+"}"),r)}}function Xt(e,r){switch(e){case 1:return ve(Pe.singleDigitSigned,r);case 2:return ve(Pe.twoDigitsSigned,r);case 3:return ve(Pe.threeDigitsSigned,r);case 4:return ve(Pe.fourDigitsSigned,r);default:return ve(new RegExp("^-?\\d{1,"+e+"}"),r)}}function Fr(e){switch(e){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;case"am":case"midnight":case"night":default:return 0}}function Ss(e,r){const t=r>0,n=t?r:1-r;let s;if(n<=50)s=e||100;else{const a=n+50,o=Math.trunc(a/100)*100,i=e>=a%100;s=e+o-(i?100:0)}return t?s:1-s}function Cs(e){return e%400===0||e%4===0&&e%100!==0}class cf extends ie{constructor(){super(...arguments);m(this,"priority",130);m(this,"incompatibleTokens",["Y","R","u","w","I","i","e","c","t","T"])}parse(t,n,s){const a=o=>({year:o,isTwoDigitYear:n==="yy"});switch(n){case"y":return Ee(we(4,t),a);case"yo":return Ee(s.ordinalNumber(t,{unit:"year"}),a);default:return Ee(we(n.length,t),a)}}validate(t,n){return n.isTwoDigitYear||n.year>0}set(t,n,s){const a=t.getFullYear();if(s.isTwoDigitYear){const i=Ss(s.year,a);return t.setFullYear(i,0,1),t.setHours(0,0,0,0),t}const o=!("era"in n)||n.era===1?s.year:1-s.year;return t.setFullYear(o,0,1),t.setHours(0,0,0,0),t}}class uf extends ie{constructor(){super(...arguments);m(this,"priority",130);m(this,"incompatibleTokens",["y","R","u","Q","q","M","L","I","d","D","i","t","T"])}parse(t,n,s){const a=o=>({year:o,isTwoDigitYear:n==="YY"});switch(n){case"Y":return Ee(we(4,t),a);case"Yo":return Ee(s.ordinalNumber(t,{unit:"year"}),a);default:return Ee(we(n.length,t),a)}}validate(t,n){return n.isTwoDigitYear||n.year>0}set(t,n,s,a){const o=gs(t,a);if(s.isTwoDigitYear){const c=Ss(s.year,o);return t.setFullYear(c,0,a.firstWeekContainsDate),t.setHours(0,0,0,0),Ke(t,a)}const i=!("era"in n)||n.era===1?s.year:1-s.year;return t.setFullYear(i,0,a.firstWeekContainsDate),t.setHours(0,0,0,0),Ke(t,a)}}class lf extends ie{constructor(){super(...arguments);m(this,"priority",130);m(this,"incompatibleTokens",["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"])}parse(t,n){return Xt(n==="R"?4:n.length,t)}set(t,n,s){const a=be(t,0);return a.setFullYear(s,0,4),a.setHours(0,0,0,0),mt(a)}}class ff extends ie{constructor(){super(...arguments);m(this,"priority",130);m(this,"incompatibleTokens",["G","y","Y","R","w","I","i","e","c","t","T"])}parse(t,n){return Xt(n==="u"?4:n.length,t)}set(t,n,s){return t.setFullYear(s,0,1),t.setHours(0,0,0,0),t}}class df extends ie{constructor(){super(...arguments);m(this,"priority",120);m(this,"incompatibleTokens",["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"])}parse(t,n,s){switch(n){case"Q":case"QQ":return we(n.length,t);case"Qo":return s.ordinalNumber(t,{unit:"quarter"});case"QQQ":return s.quarter(t,{width:"abbreviated",context:"formatting"})||s.quarter(t,{width:"narrow",context:"formatting"});case"QQQQQ":return s.quarter(t,{width:"narrow",context:"formatting"});case"QQQQ":default:return s.quarter(t,{width:"wide",context:"formatting"})||s.quarter(t,{width:"abbreviated",context:"formatting"})||s.quarter(t,{width:"narrow",context:"formatting"})}}validate(t,n){return n>=1&&n<=4}set(t,n,s){return t.setMonth((s-1)*3,1),t.setHours(0,0,0,0),t}}class hf extends ie{constructor(){super(...arguments);m(this,"priority",120);m(this,"incompatibleTokens",["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"])}parse(t,n,s){switch(n){case"q":case"qq":return we(n.length,t);case"qo":return s.ordinalNumber(t,{unit:"quarter"});case"qqq":return s.quarter(t,{width:"abbreviated",context:"standalone"})||s.quarter(t,{width:"narrow",context:"standalone"});case"qqqqq":return s.quarter(t,{width:"narrow",context:"standalone"});case"qqqq":default:return s.quarter(t,{width:"wide",context:"standalone"})||s.quarter(t,{width:"abbreviated",context:"standalone"})||s.quarter(t,{width:"narrow",context:"standalone"})}}validate(t,n){return n>=1&&n<=4}set(t,n,s){return t.setMonth((s-1)*3,1),t.setHours(0,0,0,0),t}}class pf extends ie{constructor(){super(...arguments);m(this,"incompatibleTokens",["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]);m(this,"priority",110)}parse(t,n,s){const a=o=>o-1;switch(n){case"M":return Ee(ve(Pe.month,t),a);case"MM":return Ee(we(2,t),a);case"Mo":return Ee(s.ordinalNumber(t,{unit:"month"}),a);case"MMM":return s.month(t,{width:"abbreviated",context:"formatting"})||s.month(t,{width:"narrow",context:"formatting"});case"MMMMM":return s.month(t,{width:"narrow",context:"formatting"});case"MMMM":default:return s.month(t,{width:"wide",context:"formatting"})||s.month(t,{width:"abbreviated",context:"formatting"})||s.month(t,{width:"narrow",context:"formatting"})}}validate(t,n){return n>=0&&n<=11}set(t,n,s){return t.setMonth(s,1),t.setHours(0,0,0,0),t}}class mf extends ie{constructor(){super(...arguments);m(this,"priority",110);m(this,"incompatibleTokens",["Y","R","q","Q","M","w","I","D","i","e","c","t","T"])}parse(t,n,s){const a=o=>o-1;switch(n){case"L":return Ee(ve(Pe.month,t),a);case"LL":return Ee(we(2,t),a);case"Lo":return Ee(s.ordinalNumber(t,{unit:"month"}),a);case"LLL":return s.month(t,{width:"abbreviated",context:"standalone"})||s.month(t,{width:"narrow",context:"standalone"});case"LLLLL":return s.month(t,{width:"narrow",context:"standalone"});case"LLLL":default:return s.month(t,{width:"wide",context:"standalone"})||s.month(t,{width:"abbreviated",context:"standalone"})||s.month(t,{width:"narrow",context:"standalone"})}}validate(t,n){return n>=0&&n<=11}set(t,n,s){return t.setMonth(s,1),t.setHours(0,0,0,0),t}}function bf(e,r,t){const n=oe(e),s=Ul(n,t)-r;return n.setDate(n.getDate()-s*7),n}class gf extends ie{constructor(){super(...arguments);m(this,"priority",100);m(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","i","t","T"])}parse(t,n,s){switch(n){case"w":return ve(Pe.week,t);case"wo":return s.ordinalNumber(t,{unit:"week"});default:return we(n.length,t)}}validate(t,n){return n>=1&&n<=53}set(t,n,s,a){return Ke(bf(t,s,a),a)}}function yf(e,r){const t=oe(e),n=Vl(t)-r;return t.setDate(t.getDate()-n*7),t}class vf extends ie{constructor(){super(...arguments);m(this,"priority",100);m(this,"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"])}parse(t,n,s){switch(n){case"I":return ve(Pe.week,t);case"Io":return s.ordinalNumber(t,{unit:"week"});default:return we(n.length,t)}}validate(t,n){return n>=1&&n<=53}set(t,n,s){return mt(yf(t,s))}}const xf=[31,28,31,30,31,30,31,31,30,31,30,31],wf=[31,29,31,30,31,30,31,31,30,31,30,31];class Tf extends ie{constructor(){super(...arguments);m(this,"priority",90);m(this,"subPriority",1);m(this,"incompatibleTokens",["Y","R","q","Q","w","I","D","i","e","c","t","T"])}parse(t,n,s){switch(n){case"d":return ve(Pe.date,t);case"do":return s.ordinalNumber(t,{unit:"date"});default:return we(n.length,t)}}validate(t,n){const s=t.getFullYear(),a=Cs(s),o=t.getMonth();return a?n>=1&&n<=wf[o]:n>=1&&n<=xf[o]}set(t,n,s){return t.setDate(s),t.setHours(0,0,0,0),t}}class Pf extends ie{constructor(){super(...arguments);m(this,"priority",90);m(this,"subpriority",1);m(this,"incompatibleTokens",["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"])}parse(t,n,s){switch(n){case"D":case"DD":return ve(Pe.dayOfYear,t);case"Do":return s.ordinalNumber(t,{unit:"date"});default:return we(n.length,t)}}validate(t,n){const s=t.getFullYear();return Cs(s)?n>=1&&n<=366:n>=1&&n<=365}set(t,n,s){return t.setMonth(0,s),t.setHours(0,0,0,0),t}}function Yr(e,r,t){var b,w,T,x;const n=jt(),s=(t==null?void 0:t.weekStartsOn)??((w=(b=t==null?void 0:t.locale)==null?void 0:b.options)==null?void 0:w.weekStartsOn)??n.weekStartsOn??((x=(T=n.locale)==null?void 0:T.options)==null?void 0:x.weekStartsOn)??0,a=oe(e),o=a.getDay(),c=(r%7+7)%7,l=7-s,h=r<0||r>6?r-(o+l)%7:(c+l)%7-(o+l)%7;return pt(a,h)}class Ef extends ie{constructor(){super(...arguments);m(this,"priority",90);m(this,"incompatibleTokens",["D","i","e","c","t","T"])}parse(t,n,s){switch(n){case"E":case"EE":case"EEE":return s.day(t,{width:"abbreviated",context:"formatting"})||s.day(t,{width:"short",context:"formatting"})||s.day(t,{width:"narrow",context:"formatting"});case"EEEEE":return s.day(t,{width:"narrow",context:"formatting"});case"EEEEEE":return s.day(t,{width:"short",context:"formatting"})||s.day(t,{width:"narrow",context:"formatting"});case"EEEE":default:return s.day(t,{width:"wide",context:"formatting"})||s.day(t,{width:"abbreviated",context:"formatting"})||s.day(t,{width:"short",context:"formatting"})||s.day(t,{width:"narrow",context:"formatting"})}}validate(t,n){return n>=0&&n<=6}set(t,n,s,a){return t=Yr(t,s,a),t.setHours(0,0,0,0),t}}class Sf extends ie{constructor(){super(...arguments);m(this,"priority",90);m(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"])}parse(t,n,s,a){const o=i=>{const c=Math.floor((i-1)/7)*7;return(i+a.weekStartsOn+6)%7+c};switch(n){case"e":case"ee":return Ee(we(n.length,t),o);case"eo":return Ee(s.ordinalNumber(t,{unit:"day"}),o);case"eee":return s.day(t,{width:"abbreviated",context:"formatting"})||s.day(t,{width:"short",context:"formatting"})||s.day(t,{width:"narrow",context:"formatting"});case"eeeee":return s.day(t,{width:"narrow",context:"formatting"});case"eeeeee":return s.day(t,{width:"short",context:"formatting"})||s.day(t,{width:"narrow",context:"formatting"});case"eeee":default:return s.day(t,{width:"wide",context:"formatting"})||s.day(t,{width:"abbreviated",context:"formatting"})||s.day(t,{width:"short",context:"formatting"})||s.day(t,{width:"narrow",context:"formatting"})}}validate(t,n){return n>=0&&n<=6}set(t,n,s,a){return t=Yr(t,s,a),t.setHours(0,0,0,0),t}}class Cf extends ie{constructor(){super(...arguments);m(this,"priority",90);m(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"])}parse(t,n,s,a){const o=i=>{const c=Math.floor((i-1)/7)*7;return(i+a.weekStartsOn+6)%7+c};switch(n){case"c":case"cc":return Ee(we(n.length,t),o);case"co":return Ee(s.ordinalNumber(t,{unit:"day"}),o);case"ccc":return s.day(t,{width:"abbreviated",context:"standalone"})||s.day(t,{width:"short",context:"standalone"})||s.day(t,{width:"narrow",context:"standalone"});case"ccccc":return s.day(t,{width:"narrow",context:"standalone"});case"cccccc":return s.day(t,{width:"short",context:"standalone"})||s.day(t,{width:"narrow",context:"standalone"});case"cccc":default:return s.day(t,{width:"wide",context:"standalone"})||s.day(t,{width:"abbreviated",context:"standalone"})||s.day(t,{width:"short",context:"standalone"})||s.day(t,{width:"narrow",context:"standalone"})}}validate(t,n){return n>=0&&n<=6}set(t,n,s,a){return t=Yr(t,s,a),t.setHours(0,0,0,0),t}}function Df(e,r){const t=oe(e),n=Jl(t),s=r-n;return pt(t,s)}class kf extends ie{constructor(){super(...arguments);m(this,"priority",90);m(this,"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"])}parse(t,n,s){const a=o=>o===0?7:o;switch(n){case"i":case"ii":return we(n.length,t);case"io":return s.ordinalNumber(t,{unit:"day"});case"iii":return Ee(s.day(t,{width:"abbreviated",context:"formatting"})||s.day(t,{width:"short",context:"formatting"})||s.day(t,{width:"narrow",context:"formatting"}),a);case"iiiii":return Ee(s.day(t,{width:"narrow",context:"formatting"}),a);case"iiiiii":return Ee(s.day(t,{width:"short",context:"formatting"})||s.day(t,{width:"narrow",context:"formatting"}),a);case"iiii":default:return Ee(s.day(t,{width:"wide",context:"formatting"})||s.day(t,{width:"abbreviated",context:"formatting"})||s.day(t,{width:"short",context:"formatting"})||s.day(t,{width:"narrow",context:"formatting"}),a)}}validate(t,n){return n>=1&&n<=7}set(t,n,s){return t=Df(t,s),t.setHours(0,0,0,0),t}}class Of extends ie{constructor(){super(...arguments);m(this,"priority",80);m(this,"incompatibleTokens",["b","B","H","k","t","T"])}parse(t,n,s){switch(n){case"a":case"aa":case"aaa":return s.dayPeriod(t,{width:"abbreviated",context:"formatting"})||s.dayPeriod(t,{width:"narrow",context:"formatting"});case"aaaaa":return s.dayPeriod(t,{width:"narrow",context:"formatting"});case"aaaa":default:return s.dayPeriod(t,{width:"wide",context:"formatting"})||s.dayPeriod(t,{width:"abbreviated",context:"formatting"})||s.dayPeriod(t,{width:"narrow",context:"formatting"})}}set(t,n,s){return t.setHours(Fr(s),0,0,0),t}}class Nf extends ie{constructor(){super(...arguments);m(this,"priority",80);m(this,"incompatibleTokens",["a","B","H","k","t","T"])}parse(t,n,s){switch(n){case"b":case"bb":case"bbb":return s.dayPeriod(t,{width:"abbreviated",context:"formatting"})||s.dayPeriod(t,{width:"narrow",context:"formatting"});case"bbbbb":return s.dayPeriod(t,{width:"narrow",context:"formatting"});case"bbbb":default:return s.dayPeriod(t,{width:"wide",context:"formatting"})||s.dayPeriod(t,{width:"abbreviated",context:"formatting"})||s.dayPeriod(t,{width:"narrow",context:"formatting"})}}set(t,n,s){return t.setHours(Fr(s),0,0,0),t}}class _f extends ie{constructor(){super(...arguments);m(this,"priority",80);m(this,"incompatibleTokens",["a","b","t","T"])}parse(t,n,s){switch(n){case"B":case"BB":case"BBB":return s.dayPeriod(t,{width:"abbreviated",context:"formatting"})||s.dayPeriod(t,{width:"narrow",context:"formatting"});case"BBBBB":return s.dayPeriod(t,{width:"narrow",context:"formatting"});case"BBBB":default:return s.dayPeriod(t,{width:"wide",context:"formatting"})||s.dayPeriod(t,{width:"abbreviated",context:"formatting"})||s.dayPeriod(t,{width:"narrow",context:"formatting"})}}set(t,n,s){return t.setHours(Fr(s),0,0,0),t}}class jf extends ie{constructor(){super(...arguments);m(this,"priority",70);m(this,"incompatibleTokens",["H","K","k","t","T"])}parse(t,n,s){switch(n){case"h":return ve(Pe.hour12h,t);case"ho":return s.ordinalNumber(t,{unit:"hour"});default:return we(n.length,t)}}validate(t,n){return n>=1&&n<=12}set(t,n,s){const a=t.getHours()>=12;return a&&s<12?t.setHours(s+12,0,0,0):!a&&s===12?t.setHours(0,0,0,0):t.setHours(s,0,0,0),t}}class If extends ie{constructor(){super(...arguments);m(this,"priority",70);m(this,"incompatibleTokens",["a","b","h","K","k","t","T"])}parse(t,n,s){switch(n){case"H":return ve(Pe.hour23h,t);case"Ho":return s.ordinalNumber(t,{unit:"hour"});default:return we(n.length,t)}}validate(t,n){return n>=0&&n<=23}set(t,n,s){return t.setHours(s,0,0,0),t}}class Mf extends ie{constructor(){super(...arguments);m(this,"priority",70);m(this,"incompatibleTokens",["h","H","k","t","T"])}parse(t,n,s){switch(n){case"K":return ve(Pe.hour11h,t);case"Ko":return s.ordinalNumber(t,{unit:"hour"});default:return we(n.length,t)}}validate(t,n){return n>=0&&n<=11}set(t,n,s){return t.getHours()>=12&&s<12?t.setHours(s+12,0,0,0):t.setHours(s,0,0,0),t}}class Rf extends ie{constructor(){super(...arguments);m(this,"priority",70);m(this,"incompatibleTokens",["a","b","h","H","K","t","T"])}parse(t,n,s){switch(n){case"k":return ve(Pe.hour24h,t);case"ko":return s.ordinalNumber(t,{unit:"hour"});default:return we(n.length,t)}}validate(t,n){return n>=1&&n<=24}set(t,n,s){const a=s<=24?s%24:s;return t.setHours(a,0,0,0),t}}class Lf extends ie{constructor(){super(...arguments);m(this,"priority",60);m(this,"incompatibleTokens",["t","T"])}parse(t,n,s){switch(n){case"m":return ve(Pe.minute,t);case"mo":return s.ordinalNumber(t,{unit:"minute"});default:return we(n.length,t)}}validate(t,n){return n>=0&&n<=59}set(t,n,s){return t.setMinutes(s,0,0),t}}class Af extends ie{constructor(){super(...arguments);m(this,"priority",50);m(this,"incompatibleTokens",["t","T"])}parse(t,n,s){switch(n){case"s":return ve(Pe.second,t);case"so":return s.ordinalNumber(t,{unit:"second"});default:return we(n.length,t)}}validate(t,n){return n>=0&&n<=59}set(t,n,s){return t.setSeconds(s,0),t}}class $f extends ie{constructor(){super(...arguments);m(this,"priority",30);m(this,"incompatibleTokens",["t","T"])}parse(t,n){const s=a=>Math.trunc(a*Math.pow(10,-n.length+3));return Ee(we(n.length,t),s)}set(t,n,s){return t.setMilliseconds(s),t}}class Ff extends ie{constructor(){super(...arguments);m(this,"priority",10);m(this,"incompatibleTokens",["t","T","x"])}parse(t,n){switch(n){case"X":return Ye(Fe.basicOptionalMinutes,t);case"XX":return Ye(Fe.basic,t);case"XXXX":return Ye(Fe.basicOptionalSeconds,t);case"XXXXX":return Ye(Fe.extendedOptionalSeconds,t);case"XXX":default:return Ye(Fe.extended,t)}}set(t,n,s){return n.timestampIsSet?t:be(t,t.getTime()-ps(t)-s)}}class Yf extends ie{constructor(){super(...arguments);m(this,"priority",10);m(this,"incompatibleTokens",["t","T","X"])}parse(t,n){switch(n){case"x":return Ye(Fe.basicOptionalMinutes,t);case"xx":return Ye(Fe.basic,t);case"xxxx":return Ye(Fe.basicOptionalSeconds,t);case"xxxxx":return Ye(Fe.extendedOptionalSeconds,t);case"xxx":default:return Ye(Fe.extended,t)}}set(t,n,s){return n.timestampIsSet?t:be(t,t.getTime()-ps(t)-s)}}class Hf extends ie{constructor(){super(...arguments);m(this,"priority",40);m(this,"incompatibleTokens","*")}parse(t){return Es(t)}set(t,n,s){return[be(t,s*1e3),{timestampIsSet:!0}]}}class Wf extends ie{constructor(){super(...arguments);m(this,"priority",20);m(this,"incompatibleTokens","*")}parse(t){return Es(t)}set(t,n,s){return[be(t,s),{timestampIsSet:!0}]}}const Vf={G:new of,y:new cf,Y:new uf,R:new lf,u:new ff,Q:new df,q:new hf,M:new pf,L:new mf,w:new gf,I:new vf,d:new Tf,D:new Pf,E:new Ef,e:new Sf,c:new Cf,i:new kf,a:new Of,b:new Nf,B:new _f,h:new jf,H:new If,K:new Mf,k:new Rf,m:new Lf,s:new Af,S:new $f,X:new Ff,x:new Yf,t:new Hf,T:new Wf},Bf=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Uf=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,qf=/^'([^]*?)'?$/,zf=/''/g,Gf=/\S/,Zf=/[a-zA-Z]/;function He(e,r,t,n){var C,j,S,F,B,M,y,A;const s=Xl(),a=(n==null?void 0:n.locale)??s.locale??Wl,o=(n==null?void 0:n.firstWeekContainsDate)??((j=(C=n==null?void 0:n.locale)==null?void 0:C.options)==null?void 0:j.firstWeekContainsDate)??s.firstWeekContainsDate??((F=(S=s.locale)==null?void 0:S.options)==null?void 0:F.firstWeekContainsDate)??1,i=(n==null?void 0:n.weekStartsOn)??((M=(B=n==null?void 0:n.locale)==null?void 0:B.options)==null?void 0:M.weekStartsOn)??s.weekStartsOn??((A=(y=s.locale)==null?void 0:y.options)==null?void 0:A.weekStartsOn)??0;if(r==="")return e===""?oe(t):be(t,NaN);const c={firstWeekContainsDate:o,weekStartsOn:i,locale:a},l=[new af],h=r.match(Uf).map(_=>{const W=_[0];if(W in xs){const $=xs[W];return $(_,a.formatLong)}return _}).join("").match(Bf),b=[];for(let _ of h){!(n!=null&&n.useAdditionalWeekYearTokens)&&Ql(_)&&ws(_,r,e),!(n!=null&&n.useAdditionalDayOfYearTokens)&&Zl(_)&&ws(_,r,e);const W=_[0],$=Vf[W];if($){const{incompatibleTokens:re}=$;if(Array.isArray(re)){const J=b.find(E=>re.includes(E.token)||E.token===W);if(J)throw new RangeError(`The format string mustn't contain \`${J.fullToken}\` and \`${_}\` at the same time`)}else if($.incompatibleTokens==="*"&&b.length>0)throw new RangeError(`The format string mustn't contain \`${_}\` and any other token at the same time`);b.push({token:W,fullToken:_});const ee=$.run(e,_,a.match,c);if(!ee)return be(t,NaN);l.push(ee.setter),e=ee.rest}else{if(W.match(Zf))throw new RangeError("Format string contains an unescaped latin alphabet character `"+W+"`");if(_==="''"?_="'":W==="'"&&(_=Qf(_)),e.indexOf(_)===0)e=e.slice(_.length);else return be(t,NaN)}}if(e.length>0&&Gf.test(e))return be(t,NaN);const w=l.map(_=>_.priority).sort((_,W)=>W-_).filter((_,W,$)=>$.indexOf(_)===W).map(_=>l.filter(W=>W.priority===_).sort((W,$)=>$.subPriority-W.subPriority)).map(_=>_[0]);let T=oe(t);if(isNaN(T.getTime()))return be(t,NaN);const x={};for(const _ of w){if(!_.validate(T,c))return be(t,NaN);const W=_.set(T,x,c);Array.isArray(W)?(T=W[0],Object.assign(x,W[1])):T=W}return be(t,T)}function Qf(e){return e.match(qf)[1].replace(zf,"'")}function Kf(e){return ms(e,Date.now())}function Xf(e,r){return pt(e,-r)}function Jf(e,r){let t=r-$r(e);return t<=0&&(t+=7),pt(e,t)}function ed(e,r){const t=(r==null?void 0:r.additionalDigits)??2,n=sd(e);let s;if(n.date){const c=ad(n.date,t);s=od(c.restDateString,c.year)}if(!s||isNaN(s.getTime()))return new Date(NaN);const a=s.getTime();let o=0,i;if(n.time&&(o=id(n.time),isNaN(o)))return new Date(NaN);if(n.timezone){if(i=cd(n.timezone),isNaN(i))return new Date(NaN)}else{const c=new Date(a+o),l=new Date(0);return l.setFullYear(c.getUTCFullYear(),c.getUTCMonth(),c.getUTCDate()),l.setHours(c.getUTCHours(),c.getUTCMinutes(),c.getUTCSeconds(),c.getUTCMilliseconds()),l}return new Date(a+o+i)}const Jt={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},td=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,rd=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,nd=/^([+-])(\d{2})(?::?(\d{2}))?$/;function sd(e){const r={},t=e.split(Jt.dateTimeDelimiter);let n;if(t.length>2)return r;if(/:/.test(t[0])?n=t[0]:(r.date=t[0],n=t[1],Jt.timeZoneDelimiter.test(r.date)&&(r.date=e.split(Jt.timeZoneDelimiter)[0],n=e.substr(r.date.length,e.length))),n){const s=Jt.timezone.exec(n);s?(r.time=n.replace(s[1],""),r.timezone=s[1]):r.time=n}return r}function ad(e,r){const t=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+r)+"})|(\\d{2}|[+-]\\d{"+(2+r)+"})$)"),n=e.match(t);if(!n)return{year:NaN,restDateString:""};const s=n[1]?parseInt(n[1]):null,a=n[2]?parseInt(n[2]):null;return{year:a===null?s:a*100,restDateString:e.slice((n[1]||n[2]).length)}}function od(e,r){if(r===null)return new Date(NaN);const t=e.match(td);if(!t)return new Date(NaN);const n=!!t[4],s=Rt(t[1]),a=Rt(t[2])-1,o=Rt(t[3]),i=Rt(t[4]),c=Rt(t[5])-1;if(n)return hd(r,i,c)?ud(r,i,c):new Date(NaN);{const l=new Date(0);return!fd(r,a,o)||!dd(r,s)?new Date(NaN):(l.setUTCFullYear(r,a,Math.max(s,o)),l)}}function Rt(e){return e?parseInt(e):1}function id(e){const r=e.match(rd);if(!r)return NaN;const t=Hr(r[1]),n=Hr(r[2]),s=Hr(r[3]);return pd(t,n,s)?t*Lr+n*Rr+s*1e3:NaN}function Hr(e){return e&&parseFloat(e.replace(",","."))||0}function cd(e){if(e==="Z")return 0;const r=e.match(nd);if(!r)return 0;const t=r[1]==="+"?-1:1,n=parseInt(r[2]),s=r[3]&&parseInt(r[3])||0;return md(n,s)?t*(n*Lr+s*Rr):NaN}function ud(e,r,t){const n=new Date(0);n.setUTCFullYear(e,0,4);const s=n.getUTCDay()||7,a=(r-1)*7+t+1-s;return n.setUTCDate(n.getUTCDate()+a),n}const ld=[31,null,31,30,31,30,31,31,30,31,30,31];function Ds(e){return e%400===0||e%4===0&&e%100!==0}function fd(e,r,t){return r>=0&&r<=11&&t>=1&&t<=(ld[r]||(Ds(e)?29:28))}function dd(e,r){return r>=1&&r<=(Ds(e)?366:365)}function hd(e,r,t){return r>=1&&r<=53&&t>=0&&t<=6}function pd(e,r,t){return e===24?r===0&&t===0:t>=0&&t<60&&r>=0&&r<60&&e>=0&&e<25}function md(e,r){return r>=0&&r<=59}function bd(e,r){const t=oe(e),n=t.getFullYear(),s=t.getDate(),a=be(e,0);a.setFullYear(n,r,15),a.setHours(0,0,0,0);const o=Ts(a);return t.setMonth(r,Math.min(s,o)),t}function gd(e,r){const t=oe(e);return isNaN(+t)?be(e,NaN):(t.setFullYear(r),t)}function ks(e,r){return st(e,-r)}function Os(e,r){return Kt(e,-r)}function Ns(){return window.navigator.languages?window.navigator.languages[0]:window.navigator.language}function yd(e,r,t){const n=[];for(let s=e;s<=r;s++)n.push(t?t(s):s);return n}function vd(e,r){const t=e.target;return t?!r.isSameNode(t)&&!r.contains(t):!1}function xd(e,r){return e.isSameNode(r)||e.contains(r)}function wd(e,r){const t=Object.entries(r),n=getComputedStyle(e);for(let s=0,a=t.length;s<a;s++){const[o,i]=t[s];if(typeof i=="string"&&i.indexOf(",")>-1){if(!i.split(",").map(l=>l.trim()).includes(n[o]))return!1}else if(n[o]!==i)return!1}return!0}function Td(e,r){const t=Object.entries(r),n=getComputedStyle(e);for(let s=0,a=t.length;s<a;s++){const[o,i]=t[s];if(typeof i=="string"&&i.indexOf(",")>-1){if(i.split(",").map(l=>l.trim()).includes(n[o]))return!0}else if(n[o]===i)return!0}return!1}function _s(e,r,t=!1,n){if(t&&wd(e,r)){if(!n||(n==null?void 0:n(e))===!0)return e}else if(!t&&Td(e,r)&&(!n||(n==null?void 0:n(e))===!0))return e;return e.parentElement?_s(e.parentElement,r,t,n):e}function js(e,r){const t=Array.from(document.querySelectorAll("body *")),n=[];for(let s=0,a=t.length;s<a;s++){const o=getComputedStyle(t[s]);o[e]&&r(o[e])&&n.push(o[e])}return n}function Lh(e){return e}function Pd(e){const r=document.documentElement;Object.keys(e).forEach(t=>{r.style.setProperty(t,e[t])})}function Ed(e){return{"--theme-bsc-primary-1":e.primary1,"--theme-bsc-primary-2":e.primary2,"--theme-bsc-primary-3":e.primary3,"--theme-bsc-primary-4":e.primary4,"--theme-bsc-primary-5":e.primary5,"--theme-bsc-gray-1":e.gray1||"#303030","--theme-bsc-gray-2":e.gray2||"#5f5f5f","--theme-bsc-gray-3":e.gray3||"#8f8f8f","--theme-bsc-gray-4":e.gray4||"#bebebe","--theme-bsc-gray-5":e.gray5||"#eee","--theme-bsc-black":e.black||"#000","--theme-bsc-white":e.white||"#fff","--theme-bsc-mono-dark-1":e.monoDark1||"#222","--theme-bsc-mono-dark-2":e.monoDark2||"#3c3c3c","--theme-bsc-mono-dark-3":e.monoDark3||"#4e4e4e","--theme-bsc-mono-light-1":e.monoLight1||"#fefefe","--theme-bsc-mono-light-2":e.monoLight2||"#eee","--theme-bsc-mono-light-3":e.monoLight3||"#ccc","--theme-bsc-info":e.info||"#2e7ff8","--theme-bsc-success":e.success||"#53ae0c","--theme-bsc-warning":e.warning||"#ff6914","--theme-bsc-error":e.error||"#f01616"}}var Oe=(e=>(e[e.Regular=24]="Regular",e[e.Small=20]="Small",e))(Oe||{});const Is=({className:e})=>f.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",className:e,children:f.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6.75 3v2.25M17.25 3v2.25M3 18.75V7.5a2.25 2.25 0 0 1 2.25-2.25h13.5A2.25 2.25 0 0 1 21 7.5v11.25m-18 0A2.25 2.25 0 0 0 5.25 21h13.5A2.25 2.25 0 0 0 21 18.75m-18 0v-7.5A2.25 2.25 0 0 1 5.25 9h13.5A2.25 2.25 0 0 1 21 11.25v7.5m-9-6h.008v.008H12v-.008ZM12 15h.008v.008H12V15Zm0 2.25h.008v.008H12v-.008ZM9.75 15h.008v.008H9.75V15Zm0 2.25h.008v.008H9.75v-.008ZM7.5 15h.008v.008H7.5V15Zm0 2.25h.008v.008H7.5v-.008Zm6.75-4.5h.008v.008h-.008v-.008Zm0 2.25h.008v.008h-.008V15Zm0 2.25h.008v.008h-.008v-.008Zm2.25-4.5h.008v.008H16.5v-.008Zm0 2.25h.008v.008H16.5V15Z"})}),Sd=({className:e})=>{const r=xe("bsc-h-6 bsc-w-6",e);return f.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",className:r,children:f.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m19.5 8.25-7.5 7.5-7.5-7.5"})})},Cd=({className:e})=>{const r=xe("bsc-h-6 bsc-w-6",e);return f.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",className:r,children:f.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.75 19.5 8.25 12l7.5-7.5"})})},Dd=({className:e})=>{const r=xe("bsc-h-6 bsc-w-6",e);return f.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",className:r,children:f.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m8.25 4.5 7.5 7.5-7.5 7.5"})})},kd=({className:e})=>{const r=xe("bsc-h-6 bsc-w-6",e);return f.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",className:r,children:f.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m4.5 15.75 7.5-7.5 7.5 7.5"})})},Od=({className:e})=>f.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",className:e,children:f.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18 18 6M6 6l12 12"})}),je=({icon:e,size:r=Oe.Regular,onClick:t,className:n})=>{const s=d.useRef({calendar:Is,chevronDown:Sd,chevronLeft:Cd,chevronRight:Dd,chevronUp:kd,close:Od}),a=d.useMemo(()=>s.current[e]||Is,[e]),o=xe({"bsc-h-[24px] bsc-w-[24px]":r===Oe.Regular,"bsc-h-[20px] bsc-w-[20px]":r===Oe.Small},n);return f.jsx("div",{onClick:t,children:f.jsx(a,{className:o})})},er=({template:e,props:r,children:t})=>e(r,t);function Nd(e,r){if(r===e)return!1;const t=Object.values(r),n=Object.values(e);if(t.length!==n.length||t.some((a,o)=>a!==n[o]))return!0;const s=Object.keys(e);return Object.keys(r).some((a,o)=>a!==s[o])}function _d(e,r){return e.matches[r]=!1,e.mediaQueries[r]={},e}function Ms(e){const r=Object.keys(e);return typeof window>"u"?r.reduce(_d,{mediaQueries:{},matches:{}}):r.reduce((t,n)=>{const s=window.matchMedia(e[n]);return t.mediaQueries[n]=s,t.matches[n]=s.matches,t},{mediaQueries:{},matches:{}})}function jd(e,r){function t(n,s){return n[s]=e.mediaQueries[s].matches,n}switch(r.type){case"updateMatches":return{matches:Object.keys(e.mediaQueries).reduce(t,{}),mediaQueries:e.mediaQueries};case"setQueries":return Ms(r.queries)}}function Id(e){const r=Et.useRef(e),[t,n]=Et.useReducer(jd,e,Ms);Et.useEffect(()=>{Nd(e,r.current)&&(n({type:"setQueries",queries:e}),r.current=e)},[e]);function s(){return n({type:"updateMatches"})}function a(c){const l=s;return typeof c.addListener<"u"?c.addListener(l):c.addEventListener("change",l),l}Et.useEffect(()=>{const c=Object.values(t.mediaQueries),l=c.map(a);function h(b,w){typeof b.addListener<"u"?b.removeListener(l[w]):b.removeEventListener("change",l[w])}return()=>{c.forEach(h)}},[t.mediaQueries]);const{matches:o}=t,i=Et.useMemo(()=>Object.values(o),[o]);return{matches:o,matchesAny:i.some(Boolean),matchesAll:i.length>0&&i.every(Boolean)}}function tr(e){return Id(Md(e)).matchesAll}const Wr={};function Md(e){return Wr[e]===void 0&&(Wr[e]={default:e}),Wr[e]}const Vr=({mobileQuery:e="screen and (max-device-width: 40rem)",tabletQuery:r="screen and (min-device-width: 40.01rem) and (max-device-width: 63.9375rem)",desktopQuery:t="screen and (min-device-width: 64rem)",mobileMarkup:n,aboveMobileMarkup:s,tabletMarkup:a,desktopMarkup:o})=>{const i=tr(e),c=tr(r),l=tr(t);return(()=>i&&n?n:!i&&s?s:c&&a?a:l&&o?o:(console.error("Invalid media settings"),null))()};function Rs(e,r,t){const n=a=>{const o=a.target,i=e.style.display!=="hidden";e&&i&&!xd(e,o)&&!s(t,o)&&r(!1),r(!0)},s=(a,o)=>{if(!a)return!1;for(let i=0,c=a.length;i<c;i++)if(a[i].isSameNode(o)||a[i].contains(o))return!0;return!1};return document.addEventListener("mousedown",n),n}function Ls(e){document.removeEventListener("mousedown",e)}function Rd(e,r){if(e==null)return{};var t={},n=Object.keys(e),s,a;for(a=0;a<n.length;a++)s=n[a],!(r.indexOf(s)>=0)&&(t[s]=e[s]);return t}function Br(e,r){return Br=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,s){return n.__proto__=s,n},Br(e,r)}function Ld(e,r){e.prototype=Object.create(r.prototype),e.prototype.constructor=e,Br(e,r)}var Ur={exports:{}},rr={exports:{}},ue={};/** @license React v16.13.1
|
|
32
32
|
* react-is.production.min.js
|
|
33
33
|
*
|
|
34
34
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
package/dist/index.umd.js.gz
CHANGED
|
Binary file
|