@granularjs/ui 0.1.3 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/granular-ui.min.js +229 -73
- package/dist/granular-ui.min.js.map +4 -4
- package/package.json +1 -1
- package/src/components/Autocomplete.js +179 -0
- package/src/components/DateInput.js +1 -3
- package/src/components/Pagination.js +2 -1
- package/src/components/ProgressRing.js +41 -7
- package/src/components/Radio.js +32 -3
- package/src/components/RadioGroup.js +24 -4
- package/src/components/RangePicker.js +66 -26
- package/src/components/Select.js +3 -1
- package/src/components/SelectSearch.js +2 -34
- package/src/components/Slider.js +15 -4
- package/src/components/Stepper.js +4 -3
- package/src/components/Switch.js +32 -4
- package/src/components/SwitchGroup.js +20 -4
- package/src/components/Table.js +39 -13
- package/src/components/Timeline.js +247 -10
- package/src/components/Toast.js +18 -6
- package/src/components/ToastStack.js +9 -15
- package/src/index.js +1 -0
- package/src/theme/icons.js +2 -1
- package/src/theme/styles.js +215 -59
- package/types/components/Autocomplete.d.ts +1 -0
- package/types/components/RadioGroup.d.ts +1 -0
- package/types/components/SwitchGroup.d.ts +1 -0
- package/types/index.d.ts +1 -0
- package/types/theme/icons.d.ts +1 -0
package/dist/granular-ui.min.js
CHANGED
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
var
|
|
1
|
+
var jt="granular-ui-styles",na=new URL("./fonts/Poppins-400.ttf",import.meta.url).href,sa=new URL("./fonts/Poppins-500.ttf",import.meta.url).href,ua=new URL("./fonts/Poppins-600.ttf",import.meta.url).href,ga=new URL("./fonts/Poppins-700.ttf",import.meta.url).href,la=new URL("./fonts/Arimo-400.ttf",import.meta.url).href,ca=new URL("./fonts/Arimo-500.ttf",import.meta.url).href,pa=new URL("./fonts/Arimo-600.ttf",import.meta.url).href,da=new URL("./fonts/Arimo-700.ttf",import.meta.url).href,ma=new URL("./fonts/Inter-400.woff2",import.meta.url).href,fa=new URL("./fonts/Inter-500.woff2",import.meta.url).href,va=new URL("./fonts/Inter-600.woff2",import.meta.url).href,ha=new URL("./fonts/Inter-700.woff2",import.meta.url).href,ba=`
|
|
2
2
|
@font-face {
|
|
3
3
|
font-family: 'Poppins';
|
|
4
4
|
font-style: normal;
|
|
5
5
|
font-weight: 400;
|
|
6
6
|
font-display: swap;
|
|
7
|
-
src: url('${
|
|
7
|
+
src: url('${na}') format('truetype');
|
|
8
8
|
}
|
|
9
9
|
@font-face {
|
|
10
10
|
font-family: 'Poppins';
|
|
11
11
|
font-style: normal;
|
|
12
12
|
font-weight: 500;
|
|
13
13
|
font-display: swap;
|
|
14
|
-
src: url('${
|
|
14
|
+
src: url('${sa}') format('truetype');
|
|
15
15
|
}
|
|
16
16
|
@font-face {
|
|
17
17
|
font-family: 'Poppins';
|
|
18
18
|
font-style: normal;
|
|
19
19
|
font-weight: 600;
|
|
20
20
|
font-display: swap;
|
|
21
|
-
src: url('${
|
|
21
|
+
src: url('${ua}') format('truetype');
|
|
22
22
|
}
|
|
23
23
|
@font-face {
|
|
24
24
|
font-family: 'Poppins';
|
|
25
25
|
font-style: normal;
|
|
26
26
|
font-weight: 700;
|
|
27
27
|
font-display: swap;
|
|
28
|
-
src: url('${
|
|
28
|
+
src: url('${ga}') format('truetype');
|
|
29
29
|
}
|
|
30
30
|
|
|
31
31
|
@font-face {
|
|
@@ -33,28 +33,28 @@ var zr="granular-ui-styles",It=new URL("./fonts/Poppins-400.ttf",import.meta.url
|
|
|
33
33
|
font-style: normal;
|
|
34
34
|
font-weight: 400;
|
|
35
35
|
font-display: swap;
|
|
36
|
-
src: url('${
|
|
36
|
+
src: url('${la}') format('truetype');
|
|
37
37
|
}
|
|
38
38
|
@font-face {
|
|
39
39
|
font-family: 'Arimo';
|
|
40
40
|
font-style: normal;
|
|
41
41
|
font-weight: 500;
|
|
42
42
|
font-display: swap;
|
|
43
|
-
src: url('${
|
|
43
|
+
src: url('${ca}') format('truetype');
|
|
44
44
|
}
|
|
45
45
|
@font-face {
|
|
46
46
|
font-family: 'Arimo';
|
|
47
47
|
font-style: normal;
|
|
48
48
|
font-weight: 600;
|
|
49
49
|
font-display: swap;
|
|
50
|
-
src: url('${
|
|
50
|
+
src: url('${pa}') format('truetype');
|
|
51
51
|
}
|
|
52
52
|
@font-face {
|
|
53
53
|
font-family: 'Arimo';
|
|
54
54
|
font-style: normal;
|
|
55
55
|
font-weight: 700;
|
|
56
56
|
font-display: swap;
|
|
57
|
-
src: url('${
|
|
57
|
+
src: url('${da}') format('truetype');
|
|
58
58
|
}
|
|
59
59
|
|
|
60
60
|
@font-face {
|
|
@@ -62,28 +62,28 @@ var zr="granular-ui-styles",It=new URL("./fonts/Poppins-400.ttf",import.meta.url
|
|
|
62
62
|
font-style: normal;
|
|
63
63
|
font-weight: 400;
|
|
64
64
|
font-display: swap;
|
|
65
|
-
src: url('${
|
|
65
|
+
src: url('${ma}') format('woff2');
|
|
66
66
|
}
|
|
67
67
|
@font-face {
|
|
68
68
|
font-family: 'Inter';
|
|
69
69
|
font-style: normal;
|
|
70
70
|
font-weight: 500;
|
|
71
71
|
font-display: swap;
|
|
72
|
-
src: url('${
|
|
72
|
+
src: url('${fa}') format('woff2');
|
|
73
73
|
}
|
|
74
74
|
@font-face {
|
|
75
75
|
font-family: 'Inter';
|
|
76
76
|
font-style: normal;
|
|
77
77
|
font-weight: 600;
|
|
78
78
|
font-display: swap;
|
|
79
|
-
src: url('${
|
|
79
|
+
src: url('${va}') format('woff2');
|
|
80
80
|
}
|
|
81
81
|
@font-face {
|
|
82
82
|
font-family: 'Inter';
|
|
83
83
|
font-style: normal;
|
|
84
84
|
font-weight: 700;
|
|
85
85
|
font-display: swap;
|
|
86
|
-
src: url('${
|
|
86
|
+
src: url('${ha}') format('woff2');
|
|
87
87
|
}
|
|
88
88
|
|
|
89
89
|
:root {
|
|
@@ -95,6 +95,7 @@ var zr="granular-ui-styles",It=new URL("./fonts/Poppins-400.ttf",import.meta.url
|
|
|
95
95
|
--g-ui-gray-100: #f2f4f7;
|
|
96
96
|
--g-ui-gray-200: #e4e7ec;
|
|
97
97
|
--g-ui-gray-300: #cdd1d9;
|
|
98
|
+
--g-ui-gray-350: #b2b7c3;
|
|
98
99
|
--g-ui-gray-400: #98a2b3;
|
|
99
100
|
--g-ui-gray-500: #667085;
|
|
100
101
|
--g-ui-gray-600: #475467;
|
|
@@ -392,6 +393,11 @@ var zr="granular-ui-styles",It=new URL("./fonts/Poppins-400.ttf",import.meta.url
|
|
|
392
393
|
--g-ui-primary-strong: var(--g-ui-primary-active);
|
|
393
394
|
--g-ui-shadow: var(--g-ui-shadow-md);
|
|
394
395
|
|
|
396
|
+
/* Overlays (themeable) */
|
|
397
|
+
--g-ui-overlay-light: rgba(0,0,0,0.4);
|
|
398
|
+
--g-ui-overlay-normal: rgba(0,0,0,0.6);
|
|
399
|
+
--g-ui-overlay-dark: rgba(0,0,0,0.8);
|
|
400
|
+
|
|
395
401
|
/* Misc */
|
|
396
402
|
--g-ui-radius: 4px;
|
|
397
403
|
--g-ui-font: 'Inter', 'Arimo', 'Poppins', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
|
|
@@ -487,7 +493,7 @@ var zr="granular-ui-styles",It=new URL("./fonts/Poppins-400.ttf",import.meta.url
|
|
|
487
493
|
--g-ui-text: var(--g-ui-fg);
|
|
488
494
|
--g-ui-muted: var(--g-ui-fg-muted);
|
|
489
495
|
|
|
490
|
-
--g-ui-border: var(--g-ui-gray-
|
|
496
|
+
--g-ui-border: var(--g-ui-gray-350);
|
|
491
497
|
--g-ui-border-subtle: var(--g-ui-gray-100);
|
|
492
498
|
--g-ui-border-muted: var(--g-ui-gray-200);
|
|
493
499
|
--g-ui-border-emphasized: var(--g-ui-gray-300);
|
|
@@ -612,6 +618,13 @@ var zr="granular-ui-styles",It=new URL("./fonts/Poppins-400.ttf",import.meta.url
|
|
|
612
618
|
--g-ui-shadow-xl: 0px 20px 24px -4px rgba(16, 24, 40, 0.08), 0px 8px 8px -4px rgba(16, 24, 40, 0.03);
|
|
613
619
|
--g-ui-shadow-2xl: 0px 24px 48px -12px rgba(16, 24, 40, 0.18);
|
|
614
620
|
}
|
|
621
|
+
|
|
622
|
+
* {
|
|
623
|
+
box-sizing: border-box;
|
|
624
|
+
margin: 0;
|
|
625
|
+
padding: 0;
|
|
626
|
+
}
|
|
627
|
+
|
|
615
628
|
body {
|
|
616
629
|
margin: 0;
|
|
617
630
|
padding: 0;
|
|
@@ -711,34 +724,34 @@ body {
|
|
|
711
724
|
box-shadow: none;
|
|
712
725
|
border: 1px solid var(--g-ui-border);
|
|
713
726
|
}
|
|
714
|
-
.g-ui-card-border-default { border: 1px solid var(--g-ui-border); }
|
|
715
|
-
.g-ui-card-border-none { border: none; }
|
|
716
|
-
.g-ui-card-border-light { border: 1px solid var(--g-ui-border-light); }
|
|
717
|
-
.g-ui-card-border-dark { border: 1px solid var(--g-ui-border-dark); }
|
|
718
|
-
.g-ui-card-border-primary { border: 1px solid var(--g-ui-primary); }
|
|
719
|
-
.g-ui-card-border-success { border: 1px solid var(--g-ui-success); }
|
|
720
|
-
.g-ui-card-border-danger { border: 1px solid var(--g-ui-danger); }
|
|
721
|
-
.g-ui-card-border-warning { border: 1px solid var(--g-ui-warning); }
|
|
722
|
-
.g-ui-card-border-info { border: 1px solid var(--g-ui-info); }
|
|
723
|
-
.g-ui-card-border-subtle { border: 1px solid var(--g-ui-border-subtle); }
|
|
724
|
-
.g-ui-card-border-emphasized { border: 1px solid var(--g-ui-border-emphasized); }
|
|
725
|
-
.g-ui-card-border-inverted { border: 1px solid var(--g-ui-border-inverted); }
|
|
726
|
-
.g-ui-card-border-error { border: 1px solid var(--g-ui-border-error); }
|
|
727
|
-
.g-ui-card-border-warning { border: 1px solid var(--g-ui-border-warning); }
|
|
728
|
-
.g-ui-card-border-success { border: 1px solid var(--g-ui-border-success); }
|
|
729
|
-
.g-ui-card-border-info { border: 1px solid var(--g-ui-border-info); }
|
|
730
|
-
|
|
731
|
-
.g-ui-card-padding-xs { padding: var(--g-ui-space-10); }
|
|
732
|
-
.g-ui-card-padding-sm { padding: var(--g-ui-space-14); }
|
|
733
|
-
.g-ui-card-padding-md { padding: var(--g-ui-space-18); }
|
|
734
|
-
.g-ui-card-padding-lg { padding: var(--g-ui-space-24); }
|
|
735
|
-
.g-ui-card-radius-sm { border-radius: 8px; }
|
|
736
|
-
.g-ui-card-radius-md { border-radius: 10px; }
|
|
737
|
-
.g-ui-card-radius-lg { border-radius: 14px; }
|
|
738
|
-
.g-ui-card-shadow-none { box-shadow: none; }
|
|
739
|
-
.g-ui-card-shadow-sm { box-shadow: var(--g-ui-shadow-sm); }
|
|
740
|
-
.g-ui-card-shadow-md { box-shadow: var(--g-ui-shadow-md); }
|
|
741
|
-
.g-ui-card-shadow-lg { box-shadow: var(--g-ui-shadow-lg); }
|
|
727
|
+
body .g-ui-card-border-default { border: 1px solid var(--g-ui-border); }
|
|
728
|
+
body .g-ui-card-border-none { border: none; }
|
|
729
|
+
body .g-ui-card-border-light { border: 1px solid var(--g-ui-border-light); }
|
|
730
|
+
body .g-ui-card-border-dark { border: 1px solid var(--g-ui-border-dark); }
|
|
731
|
+
body .g-ui-card-border-primary { border: 1px solid var(--g-ui-primary); }
|
|
732
|
+
body .g-ui-card-border-success { border: 1px solid var(--g-ui-success); }
|
|
733
|
+
body .g-ui-card-border-danger { border: 1px solid var(--g-ui-danger); }
|
|
734
|
+
body .g-ui-card-border-warning { border: 1px solid var(--g-ui-warning); }
|
|
735
|
+
body .g-ui-card-border-info { border: 1px solid var(--g-ui-info); }
|
|
736
|
+
body .g-ui-card-border-subtle { border: 1px solid var(--g-ui-border-subtle); }
|
|
737
|
+
body .g-ui-card-border-emphasized { border: 1px solid var(--g-ui-border-emphasized); }
|
|
738
|
+
body .g-ui-card-border-inverted { border: 1px solid var(--g-ui-border-inverted); }
|
|
739
|
+
body .g-ui-card-border-error { border: 1px solid var(--g-ui-border-error); }
|
|
740
|
+
body .g-ui-card-border-warning { border: 1px solid var(--g-ui-border-warning); }
|
|
741
|
+
body .g-ui-card-border-success { border: 1px solid var(--g-ui-border-success); }
|
|
742
|
+
body .g-ui-card-border-info { border: 1px solid var(--g-ui-border-info); }
|
|
743
|
+
|
|
744
|
+
body .g-ui-card-padding-xs { padding: var(--g-ui-space-10); }
|
|
745
|
+
body .g-ui-card-padding-sm { padding: var(--g-ui-space-14); }
|
|
746
|
+
body .g-ui-card-padding-md { padding: var(--g-ui-space-18); }
|
|
747
|
+
body .g-ui-card-padding-lg { padding: var(--g-ui-space-24); }
|
|
748
|
+
body .g-ui-card-radius-sm { border-radius: 8px; }
|
|
749
|
+
body .g-ui-card-radius-md { border-radius: 10px; }
|
|
750
|
+
body .g-ui-card-radius-lg { border-radius: 14px; }
|
|
751
|
+
body .g-ui-card-shadow-none { box-shadow: none; }
|
|
752
|
+
body .g-ui-card-shadow-sm { box-shadow: var(--g-ui-shadow-sm); }
|
|
753
|
+
body .g-ui-card-shadow-md { box-shadow: var(--g-ui-shadow-md); }
|
|
754
|
+
body .g-ui-card-shadow-lg { box-shadow: var(--g-ui-shadow-lg); }
|
|
742
755
|
.g-ui-card-title {
|
|
743
756
|
margin-bottom: var(--g-ui-space-8);
|
|
744
757
|
font-weight: 600;
|
|
@@ -985,15 +998,15 @@ body {
|
|
|
985
998
|
.g-ui-modal-overlay {
|
|
986
999
|
position: fixed;
|
|
987
1000
|
inset: 0;
|
|
988
|
-
background:
|
|
1001
|
+
background: var(--g-ui-overlay-normal);
|
|
989
1002
|
display: flex;
|
|
990
1003
|
align-items: center;
|
|
991
1004
|
justify-content: center;
|
|
992
1005
|
z-index: 999;
|
|
993
1006
|
}
|
|
994
|
-
.g-ui-modal-overlay-light { background:
|
|
995
|
-
.g-ui-modal-overlay-normal { background:
|
|
996
|
-
.g-ui-modal-overlay-dark { background:
|
|
1007
|
+
.g-ui-modal-overlay-light { background: var(--g-ui-overlay-light); }
|
|
1008
|
+
.g-ui-modal-overlay-normal { background: var(--g-ui-overlay-normal); }
|
|
1009
|
+
.g-ui-modal-overlay-dark { background: var(--g-ui-overlay-dark); }
|
|
997
1010
|
.g-ui-modal-centered { align-items: center; justify-content: center; }
|
|
998
1011
|
.g-ui-modal-top { align-items: flex-start; justify-content: center; padding-top: var(--g-ui-space-40); }
|
|
999
1012
|
.g-ui-modal-position-top-left { align-items: flex-start; justify-content: flex-start; padding: var(--g-ui-space-40) var(--g-ui-space-20); }
|
|
@@ -1142,7 +1155,7 @@ body {
|
|
|
1142
1155
|
width: var(--g-ui-switch-thumb, 14px);
|
|
1143
1156
|
height: var(--g-ui-switch-thumb, 14px);
|
|
1144
1157
|
border-radius: 50%;
|
|
1145
|
-
background:
|
|
1158
|
+
background: var(--g-ui-white);
|
|
1146
1159
|
top: var(--g-ui-switch-offset, 2px);
|
|
1147
1160
|
left: var(--g-ui-switch-offset, 2px);
|
|
1148
1161
|
transition: transform .15s ease;
|
|
@@ -1183,6 +1196,12 @@ body {
|
|
|
1183
1196
|
.g-ui-select-caret {
|
|
1184
1197
|
color: var(--g-ui-muted);
|
|
1185
1198
|
font-size: 12px;
|
|
1199
|
+
display: inline-flex;
|
|
1200
|
+
align-items: center;
|
|
1201
|
+
justify-content: center;
|
|
1202
|
+
}
|
|
1203
|
+
.g-ui-select-caret svg{
|
|
1204
|
+
fill: var(--g-ui-muted);
|
|
1186
1205
|
}
|
|
1187
1206
|
.g-ui-select-dropdown {
|
|
1188
1207
|
position: absolute;
|
|
@@ -1294,18 +1313,18 @@ body {
|
|
|
1294
1313
|
font-size: 13px;
|
|
1295
1314
|
}
|
|
1296
1315
|
.g-ui-table-with-border {
|
|
1297
|
-
border: 1px solid var(--g-ui-border
|
|
1316
|
+
border: 1px solid var(--g-ui-border);
|
|
1317
|
+
outline: 1px solid var(--g-ui-border);
|
|
1298
1318
|
border-radius: var(--g-ui-radius);
|
|
1299
1319
|
overflow: hidden;
|
|
1300
1320
|
}
|
|
1301
1321
|
.g-ui-table th,
|
|
1302
1322
|
.g-ui-table td {
|
|
1303
|
-
border-bottom: 1px solid var(--g-ui-border-muted);
|
|
1304
1323
|
padding: var(--g-ui-space-10) var(--g-ui-space-12);
|
|
1305
1324
|
text-align: left;
|
|
1306
1325
|
}
|
|
1307
1326
|
.g-ui-table th {
|
|
1308
|
-
font-weight:
|
|
1327
|
+
font-weight: 800;
|
|
1309
1328
|
color: var(--g-ui-muted);
|
|
1310
1329
|
}
|
|
1311
1330
|
.g-ui-table-column-borders th,
|
|
@@ -1316,6 +1335,13 @@ body {
|
|
|
1316
1335
|
.g-ui-table-column-borders td:last-child {
|
|
1317
1336
|
border-right: 0;
|
|
1318
1337
|
}
|
|
1338
|
+
.g-ui-table-row-borders th,
|
|
1339
|
+
.g-ui-table-row-borders td {
|
|
1340
|
+
border-bottom: 1px solid var(--g-ui-border);
|
|
1341
|
+
}
|
|
1342
|
+
.g-ui-table-row-borders tbody tr:last-child td {
|
|
1343
|
+
border-bottom: 0;
|
|
1344
|
+
}
|
|
1319
1345
|
.g-ui-table-striped tbody tr:nth-child(odd) { background: var(--g-ui-bg-subtle); }
|
|
1320
1346
|
.g-ui-table-hover tbody tr:hover { background: var(--g-ui-bg-muted); }
|
|
1321
1347
|
|
|
@@ -1410,9 +1436,9 @@ body {
|
|
|
1410
1436
|
inset: 0;
|
|
1411
1437
|
z-index: 998;
|
|
1412
1438
|
}
|
|
1413
|
-
.g-ui-drawer-overlay-normal { background:
|
|
1414
|
-
.g-ui-drawer-overlay-light { background:
|
|
1415
|
-
.g-ui-drawer-overlay-dark { background:
|
|
1439
|
+
.g-ui-drawer-overlay-normal { background: var(--g-ui-overlay-normal); }
|
|
1440
|
+
.g-ui-drawer-overlay-light { background: var(--g-ui-overlay-light); }
|
|
1441
|
+
.g-ui-drawer-overlay-dark { background: var(--g-ui-overlay-dark); }
|
|
1416
1442
|
.g-ui-drawer {
|
|
1417
1443
|
position: fixed;
|
|
1418
1444
|
top: 0;
|
|
@@ -1477,7 +1503,7 @@ body {
|
|
|
1477
1503
|
margin-left: auto;
|
|
1478
1504
|
border: 0;
|
|
1479
1505
|
background: transparent;
|
|
1480
|
-
color: var(--g-ui-muted);
|
|
1506
|
+
color: var(--g-ui-fg-muted);
|
|
1481
1507
|
cursor: pointer;
|
|
1482
1508
|
display: flex;
|
|
1483
1509
|
align-items: center;
|
|
@@ -1495,6 +1521,7 @@ body {
|
|
|
1495
1521
|
.g-ui-notification-close svg{
|
|
1496
1522
|
width: 24px;
|
|
1497
1523
|
height: 24px;
|
|
1524
|
+
fill: var(--g-ui-fg-muted);
|
|
1498
1525
|
}
|
|
1499
1526
|
|
|
1500
1527
|
.g-ui-notification-title { font-weight: 500; font-size: 13px; line-height: 1.35; }
|
|
@@ -1557,6 +1584,7 @@ body {
|
|
|
1557
1584
|
border-radius: 10px;
|
|
1558
1585
|
}
|
|
1559
1586
|
|
|
1587
|
+
|
|
1560
1588
|
.g-ui-textarea {
|
|
1561
1589
|
min-height: 120px;
|
|
1562
1590
|
resize: vertical;
|
|
@@ -1578,24 +1606,25 @@ body {
|
|
|
1578
1606
|
.g-ui-number-field-controls {
|
|
1579
1607
|
display: flex;
|
|
1580
1608
|
flex-direction: column;
|
|
1581
|
-
gap: var(--g-ui-space-2);
|
|
1582
1609
|
margin-left: auto;
|
|
1610
|
+
width: 30px;
|
|
1583
1611
|
}
|
|
1584
1612
|
.g-ui-number-field-control {
|
|
1585
|
-
width:
|
|
1586
|
-
height:
|
|
1587
|
-
border-radius: 6px;
|
|
1613
|
+
width: 100%;
|
|
1614
|
+
height: 20px;
|
|
1588
1615
|
display: inline-flex;
|
|
1589
1616
|
align-items: center;
|
|
1590
1617
|
justify-content: center;
|
|
1591
|
-
|
|
1592
|
-
background: var(--g-ui-bg);
|
|
1618
|
+
background: transparent;
|
|
1593
1619
|
color: var(--g-ui-text);
|
|
1594
1620
|
cursor: pointer;
|
|
1595
1621
|
user-select: none;
|
|
1596
1622
|
font-size: 12px;
|
|
1597
1623
|
line-height: 1;
|
|
1598
1624
|
}
|
|
1625
|
+
.g-ui-number-field-control:first-child {
|
|
1626
|
+
border-bottom: 1px solid var(--g-ui-border);
|
|
1627
|
+
}
|
|
1599
1628
|
.g-ui-number-field-control:hover {
|
|
1600
1629
|
background: var(--g-ui-bg-subtle);
|
|
1601
1630
|
}
|
|
@@ -1863,10 +1892,10 @@ body {
|
|
|
1863
1892
|
.g-ui-slider {
|
|
1864
1893
|
width: 100%;
|
|
1865
1894
|
--g-ui-slider-size: 8px;
|
|
1866
|
-
height: calc(var(--g-ui-slider-size) * 2);
|
|
1867
|
-
padding: 0 var(--g-ui-
|
|
1868
|
-
display: flex;
|
|
1869
|
-
align-items: center;
|
|
1895
|
+
/* height: calc(var(--g-ui-slider-size) * 2); */
|
|
1896
|
+
padding: 0 var(--g-ui-space-10);
|
|
1897
|
+
/* display: flex; */
|
|
1898
|
+
/* align-items: center; */
|
|
1870
1899
|
position: relative;
|
|
1871
1900
|
}
|
|
1872
1901
|
.g-ui-range-slider {
|
|
@@ -1906,13 +1935,16 @@ body {
|
|
|
1906
1935
|
}
|
|
1907
1936
|
.g-ui-slider-marks {
|
|
1908
1937
|
position: absolute;
|
|
1909
|
-
top: calc(100%
|
|
1938
|
+
top: calc(100% - var(--g-ui-space-8));
|
|
1910
1939
|
left:10px;
|
|
1911
1940
|
right:15px;
|
|
1912
|
-
height:
|
|
1941
|
+
height: 12px;
|
|
1913
1942
|
box-sizing: border-box;
|
|
1914
1943
|
padding: 0 var(--g-ui-slider-size);
|
|
1915
1944
|
}
|
|
1945
|
+
.g-ui-slider-marks-placeholder {
|
|
1946
|
+
height: 18px;
|
|
1947
|
+
}
|
|
1916
1948
|
.g-ui-slider-mark {
|
|
1917
1949
|
position: absolute;
|
|
1918
1950
|
top: 0;
|
|
@@ -2083,6 +2115,32 @@ body {
|
|
|
2083
2115
|
display: flex;
|
|
2084
2116
|
flex-direction: column;
|
|
2085
2117
|
gap: 0;
|
|
2118
|
+
position: relative;
|
|
2119
|
+
}
|
|
2120
|
+
.g-ui-timeline-track-segment {
|
|
2121
|
+
position: absolute;
|
|
2122
|
+
left: 8px;
|
|
2123
|
+
width: 4px;
|
|
2124
|
+
background: var(--g-ui-border-muted);
|
|
2125
|
+
border-radius: 2px;
|
|
2126
|
+
z-index: 0;
|
|
2127
|
+
pointer-events: none;
|
|
2128
|
+
overflow: hidden;
|
|
2129
|
+
}
|
|
2130
|
+
.g-ui-timeline-track-segment .g-ui-timeline-track-fill {
|
|
2131
|
+
position: absolute;
|
|
2132
|
+
left: 0;
|
|
2133
|
+
top: 0;
|
|
2134
|
+
width: 100%;
|
|
2135
|
+
height: 0%;
|
|
2136
|
+
min-height: 0;
|
|
2137
|
+
background: var(--g-ui-primary);
|
|
2138
|
+
border-radius: 2px;
|
|
2139
|
+
transition: height 0.25s ease;
|
|
2140
|
+
z-index: 1;
|
|
2141
|
+
}
|
|
2142
|
+
.g-ui-timeline-has-track .g-ui-timeline-item::before {
|
|
2143
|
+
display: none;
|
|
2086
2144
|
}
|
|
2087
2145
|
.g-ui-timeline-item {
|
|
2088
2146
|
display: grid;
|
|
@@ -2091,6 +2149,7 @@ body {
|
|
|
2091
2149
|
align-items: start;
|
|
2092
2150
|
position: relative;
|
|
2093
2151
|
padding-bottom: var(--g-ui-space-24);
|
|
2152
|
+
z-index: 1;
|
|
2094
2153
|
}
|
|
2095
2154
|
.g-ui-timeline-item:last-child {
|
|
2096
2155
|
padding-bottom: 0;
|
|
@@ -2112,10 +2171,30 @@ body {
|
|
|
2112
2171
|
height: 20px;
|
|
2113
2172
|
border-radius: 50%;
|
|
2114
2173
|
background: var(--g-ui-bg);
|
|
2115
|
-
border: 4px solid var(--g-ui-
|
|
2174
|
+
border: 4px solid var(--g-ui-border-muted);
|
|
2116
2175
|
margin-top: 0;
|
|
2117
2176
|
position: relative;
|
|
2118
2177
|
z-index: 1;
|
|
2178
|
+
transition: border-color 0.2s ease, background 0.2s ease;
|
|
2179
|
+
}
|
|
2180
|
+
.g-ui-timeline-item-completed .g-ui-timeline-dot {
|
|
2181
|
+
border-color: var(--g-ui-primary);
|
|
2182
|
+
background: var(--g-ui-primary);
|
|
2183
|
+
}
|
|
2184
|
+
.g-ui-timeline-item-active .g-ui-timeline-dot {
|
|
2185
|
+
border-color: var(--g-ui-primary);
|
|
2186
|
+
background: var(--g-ui-bg);
|
|
2187
|
+
box-shadow: 0 0 0 2px var(--g-ui-bg), 0 0 0 4px var(--g-ui-primary);
|
|
2188
|
+
}
|
|
2189
|
+
.g-ui-timeline-item-future .g-ui-timeline-dot {
|
|
2190
|
+
border-color: var(--g-ui-border-muted);
|
|
2191
|
+
background: var(--g-ui-bg);
|
|
2192
|
+
}
|
|
2193
|
+
.g-ui-timeline-clickable .g-ui-timeline-item {
|
|
2194
|
+
cursor: pointer;
|
|
2195
|
+
}
|
|
2196
|
+
.g-ui-timeline-clickable .g-ui-timeline-item:hover .g-ui-timeline-dot {
|
|
2197
|
+
border-color: var(--g-ui-primary-muted, var(--g-ui-primary));
|
|
2119
2198
|
}
|
|
2120
2199
|
.g-ui-timeline-content {
|
|
2121
2200
|
display: flex;
|
|
@@ -2921,16 +3000,43 @@ body {
|
|
|
2921
3000
|
}
|
|
2922
3001
|
|
|
2923
3002
|
.g-ui-progress-ring {
|
|
3003
|
+
position: relative;
|
|
2924
3004
|
width: 48px;
|
|
2925
3005
|
height: 48px;
|
|
2926
3006
|
border-radius: 50%;
|
|
3007
|
+
flex-shrink: 0;
|
|
3008
|
+
}
|
|
3009
|
+
.g-ui-progress-ring-hole {
|
|
3010
|
+
position: absolute;
|
|
3011
|
+
inset: 8px;
|
|
3012
|
+
border-radius: 50%;
|
|
3013
|
+
background: var(--g-ui-bg);
|
|
3014
|
+
}
|
|
3015
|
+
.g-ui-progress-ring-primary { --g-ui-progress-ring-fill: var(--g-ui-primary); }
|
|
3016
|
+
.g-ui-progress-ring-success { --g-ui-progress-ring-fill: var(--g-ui-success); }
|
|
3017
|
+
.g-ui-progress-ring-danger { --g-ui-progress-ring-fill: var(--g-ui-danger); }
|
|
3018
|
+
.g-ui-progress-ring-warning { --g-ui-progress-ring-fill: var(--g-ui-warning); }
|
|
3019
|
+
.g-ui-progress-ring:not(.g-ui-progress-ring-indeterminate) {
|
|
3020
|
+
background: conic-gradient(
|
|
3021
|
+
var(--g-ui-progress-ring-fill, var(--g-ui-primary)) 0deg calc(var(--g-ui-progress-ring-value, 0) * 3.6deg),
|
|
3022
|
+
var(--g-ui-border-muted) calc(var(--g-ui-progress-ring-value, 0) * 3.6deg) 360deg
|
|
3023
|
+
);
|
|
3024
|
+
}
|
|
3025
|
+
.g-ui-progress-ring-indeterminate {
|
|
2927
3026
|
border: 4px solid var(--g-ui-border-muted);
|
|
2928
|
-
border-top-color: var(--g-ui-primary);
|
|
3027
|
+
border-top-color: var(--g-ui-progress-ring-fill, var(--g-ui-primary));
|
|
2929
3028
|
animation: g-ui-spin 1s linear infinite;
|
|
2930
3029
|
}
|
|
3030
|
+
.g-ui-progress-ring-indeterminate .g-ui-progress-ring-hole {
|
|
3031
|
+
inset: 4px;
|
|
3032
|
+
}
|
|
2931
3033
|
.g-ui-progress-ring-size-sm { width: 32px; height: 32px; }
|
|
3034
|
+
.g-ui-progress-ring-size-sm .g-ui-progress-ring-hole { inset: 6px; }
|
|
3035
|
+
.g-ui-progress-ring-size-sm.g-ui-progress-ring-indeterminate .g-ui-progress-ring-hole { inset: 3px; }
|
|
2932
3036
|
.g-ui-progress-ring-size-md { width: 48px; height: 48px; }
|
|
2933
3037
|
.g-ui-progress-ring-size-lg { width: 64px; height: 64px; }
|
|
3038
|
+
.g-ui-progress-ring-size-lg .g-ui-progress-ring-hole { inset: 10px; }
|
|
3039
|
+
.g-ui-progress-ring-size-lg.g-ui-progress-ring-indeterminate .g-ui-progress-ring-hole { inset: 5px; }
|
|
2934
3040
|
|
|
2935
3041
|
.g-ui-toast-close {
|
|
2936
3042
|
margin-left: auto;
|
|
@@ -2939,6 +3045,11 @@ body {
|
|
|
2939
3045
|
color: var(--g-ui-muted);
|
|
2940
3046
|
cursor: pointer;
|
|
2941
3047
|
}
|
|
3048
|
+
.g-ui-toast-close svg {
|
|
3049
|
+
width: 16px;
|
|
3050
|
+
height: 16px;
|
|
3051
|
+
fill: var(--g-ui-muted);
|
|
3052
|
+
}
|
|
2942
3053
|
|
|
2943
3054
|
.g-ui-toast-row {
|
|
2944
3055
|
display: flex;
|
|
@@ -2946,6 +3057,43 @@ body {
|
|
|
2946
3057
|
gap: var(--g-ui-space-8);
|
|
2947
3058
|
}
|
|
2948
3059
|
|
|
3060
|
+
.g-ui-autocomplete {
|
|
3061
|
+
position: relative;
|
|
3062
|
+
width: 100%;
|
|
3063
|
+
}
|
|
3064
|
+
.g-ui-autocomplete-dropdown {
|
|
3065
|
+
position: absolute;
|
|
3066
|
+
top: calc(100% + var(--g-ui-space-4));
|
|
3067
|
+
left: 0;
|
|
3068
|
+
right: 0;
|
|
3069
|
+
z-index: 100;
|
|
3070
|
+
border: 1px solid var(--g-ui-border-muted);
|
|
3071
|
+
border-radius: var(--g-ui-radius);
|
|
3072
|
+
background: var(--g-ui-bg-panel);
|
|
3073
|
+
box-shadow: var(--g-ui-shadow-md);
|
|
3074
|
+
}
|
|
3075
|
+
.g-ui-autocomplete-list {
|
|
3076
|
+
overflow: auto;
|
|
3077
|
+
padding: var(--g-ui-space-4);
|
|
3078
|
+
}
|
|
3079
|
+
.g-ui-autocomplete-item {
|
|
3080
|
+
padding: var(--g-ui-space-6) var(--g-ui-space-8);
|
|
3081
|
+
border-radius: var(--g-ui-radius);
|
|
3082
|
+
cursor: pointer;
|
|
3083
|
+
font-size: var(--g-ui-font-size-sm);
|
|
3084
|
+
}
|
|
3085
|
+
.g-ui-autocomplete-item:hover {
|
|
3086
|
+
background: var(--g-ui-bg-subtle);
|
|
3087
|
+
}
|
|
3088
|
+
.g-ui-autocomplete-item-active {
|
|
3089
|
+
background: var(--g-ui-primary-subtle);
|
|
3090
|
+
color: var(--g-ui-primary);
|
|
3091
|
+
}
|
|
3092
|
+
.g-ui-autocomplete-disabled {
|
|
3093
|
+
pointer-events: none;
|
|
3094
|
+
opacity: 0.7;
|
|
3095
|
+
}
|
|
3096
|
+
|
|
2949
3097
|
.g-ui-select-search {
|
|
2950
3098
|
display: flex;
|
|
2951
3099
|
flex-direction: column;
|
|
@@ -2963,6 +3111,7 @@ body {
|
|
|
2963
3111
|
justify-content: center;
|
|
2964
3112
|
color: var(--g-ui-muted);
|
|
2965
3113
|
font-size: 16px;
|
|
3114
|
+
fill: var(--g-ui-muted);
|
|
2966
3115
|
}
|
|
2967
3116
|
.g-ui-search-input-left-section svg {
|
|
2968
3117
|
width: 100%;
|
|
@@ -3007,8 +3156,15 @@ body {
|
|
|
3007
3156
|
|
|
3008
3157
|
.g-ui-range-picker {
|
|
3009
3158
|
display: grid;
|
|
3010
|
-
grid-template-columns: 1fr 1fr;
|
|
3011
|
-
gap: var(--g-ui-space-
|
|
3159
|
+
grid-template-columns: 1fr auto 1fr;
|
|
3160
|
+
gap: var(--g-ui-space-8);
|
|
3161
|
+
align-items: center;
|
|
3162
|
+
}
|
|
3163
|
+
.g-ui-range-picker-separator {
|
|
3164
|
+
color: var(--g-ui-fg-muted);
|
|
3165
|
+
font-size: var(--g-ui-font-size-sm);
|
|
3166
|
+
line-height: 1;
|
|
3167
|
+
flex-shrink: 0;
|
|
3012
3168
|
}
|
|
3013
3169
|
|
|
3014
3170
|
.g-ui-toast-auto {
|
|
@@ -3140,7 +3296,7 @@ body {
|
|
|
3140
3296
|
.g-ui-loading-overlay {
|
|
3141
3297
|
position: absolute;
|
|
3142
3298
|
inset: 0;
|
|
3143
|
-
background:
|
|
3299
|
+
background: var(--g-ui-overlay-normal);
|
|
3144
3300
|
display: flex;
|
|
3145
3301
|
align-items: center;
|
|
3146
3302
|
justify-content: center;
|
|
@@ -3660,7 +3816,7 @@ body {
|
|
|
3660
3816
|
position: fixed;
|
|
3661
3817
|
inset: 0;
|
|
3662
3818
|
z-index: 998;
|
|
3663
|
-
background:
|
|
3819
|
+
background: var(--g-ui-overlay-normal);
|
|
3664
3820
|
opacity: 0;
|
|
3665
3821
|
pointer-events: none;
|
|
3666
3822
|
transition: opacity .22s ease, backdrop-filter .22s ease;
|
|
@@ -3866,5 +4022,5 @@ body {
|
|
|
3866
4022
|
@keyframes g-ui-spin { to { transform: rotate(360deg); } }
|
|
3867
4023
|
@keyframes g-ui-bounce { 0%, 100% { transform: translateY(0); opacity: .6; } 50% { transform: translateY(-5px); opacity: 1; } }
|
|
3868
4024
|
@keyframes g-ui-bars { 0%, 100% { transform: scaleY(.6); } 50% { transform: scaleY(1.2); } }
|
|
3869
|
-
`;function Nr(){if(typeof document>"u"||document.getElementById(zr))return;let e=document.createElement("style");e.id=zr,e.textContent=Gt,document.head.appendChild(e)}var Zt=new Set(["--g-ui-bg","--g-ui-bg-subtle","--g-ui-bg-muted","--g-ui-bg-emphasized","--g-ui-bg-inverted","--g-ui-bg-panel","--g-ui-fg","--g-ui-fg-muted","--g-ui-fg-subtle","--g-ui-fg-inverted","--g-ui-border","--g-ui-border-subtle","--g-ui-border-emphasized","--g-ui-border-inverted","--g-ui-primary","--g-ui-primary-hover","--g-ui-primary-active","--g-ui-primary-subtle","--g-ui-primary-muted","--g-ui-primary-emphasized","--g-ui-success","--g-ui-success-hover","--g-ui-success-active","--g-ui-success-subtle","--g-ui-success-muted","--g-ui-danger","--g-ui-danger-hover","--g-ui-danger-active","--g-ui-danger-subtle","--g-ui-danger-muted","--g-ui-warning","--g-ui-warning-hover","--g-ui-warning-active","--g-ui-warning-subtle","--g-ui-warning-muted","--g-ui-info","--g-ui-info-hover","--g-ui-info-active","--g-ui-info-subtle","--g-ui-info-muted","--g-ui-shadow-xs","--g-ui-shadow-sm","--g-ui-shadow-md","--g-ui-shadow-lg","--g-ui-shadow-xl","--g-ui-shadow-2xl","--g-ui-radius","--g-ui-font","--g-ui-surface","--g-ui-text","--g-ui-muted","--g-ui-primary-strong","--g-ui-shadow"]);function Ut(e={},i=document?.documentElement){if(i)for(let[r,t]of Object.entries(e)){let a=r.startsWith("--")?r:`--g-ui-${r}`;Zt.has(a)&&i.style.setProperty(a,String(t))}}function Xt(e="dark",i=document?.documentElement){i&&(i.classList.remove("g-ui-theme-dark","g-ui-theme-light"),i.classList.add(e==="light"?"g-ui-theme-light":"g-ui-theme-dark"))}function _t(e=document?.documentElement){return e.classList.contains("g-ui-theme-light")?"light":"dark"}import{Renderer as Cr,isSignal as Sr,isState as Dr,isStatePath as Pr,isComputed as Mr,resolve as Le,computed as Kt,after as Ai,concat as Qt}from"@granularjs/core";function Fi(e){return Sr(e)||Dr(e)||Pr(e)||Mr(e)}function o(...e){return Qt(...e,{separator:" ",filterFalsy:!0})}function Tr(e){if(!(e==null||e===""))return typeof e=="number"?`${e}px`:e}function s(e,i){let r={},t=[],a=n=>!!n&&typeof n=="object"&&!Array.isArray(n)&&!Cr.isRenderable(n)&&!Cr.isDomNode(n)&&!Sr(n)&&!Dr(n)&&!Pr(n)&&!Mr(n);for(let n of e)a(n)?Object.assign(r,n):t.push(n);if(i&&typeof i=="object")for(let n of Object.keys(i))r[n]===void 0&&(r[n]=i[n]);return{props:Kt(r),rawProps:r,children:t}}function c(e){return Le(e)}function be(e){return!!Le(e)}function k(e,i,r){let t=a=>{let n=Le(a),u=n==null||n===""?r:n;return u==null||u===""?"":`${e}${u}`};return Fi(i)?Ai(i).compute(a=>t(a)):t(i)}function W(e,i){return Fi(i)?Ai(i).compute(r=>Le(r)?e:""):Le(i)?e:""}function de(e,i,r){let t=a=>i[a]||null;return Fi(e)?Ai(e).compute(a=>t(Le(a??r))):t(Le(e??r))}import{Button as Jt,Span as ji,when as Ei,after as ea}from"@granularjs/core";function Ri(...e){let{props:i,children:r}=s(e,{variant:"filled",size:"md",justify:"center"}),{variant:t,color:a,size:n,fullWidth:u,loading:g,leftSection:d,rightSection:v,className:m,disabled:h,justify:x,...l}=i,y=ea(h,g).compute(([z,B])=>z||B);return Jt({...l,disabled:y,className:o("g-ui-button",k("g-ui-button-variant-",t,"filled"),k("g-ui-button-color-",a,"primary"),k("g-ui-justify-",x,"center"),k("g-ui-button-size-",n,"md"),W("g-ui-button-full",u),W("g-ui-button-loading",g),m)},Ei(d,()=>ji({className:"g-ui-button-section-left"},d)),Ei(g,()=>ji("Loading..."),()=>r),Ei(v,()=>ji({className:"g-ui-button-section-right"},v)))}import{Span as ia}from"@granularjs/core";function Hi(...e){let{props:i,children:r}=s(e,{size:"md"}),{size:t,weight:a,color:n,dimmed:u,align:g,ellipsis:d,decoration:v,className:m,style:h,...x}=i,l=de(a,{bold:"g-ui-text-weight-700",semibold:"g-ui-text-weight-600",medium:"g-ui-text-weight-500",700:"g-ui-text-weight-700",600:"g-ui-text-weight-600",500:"g-ui-text-weight-500",400:"g-ui-text-weight-400"}),y=de(n,{primary:"g-ui-text-primary",success:"g-ui-text-success",danger:"g-ui-text-danger",muted:"g-ui-text-dimmed"}),z=de(g,{center:"g-ui-text-align-center",right:"g-ui-text-align-right",left:"g-ui-text-align-left"}),B=de(v,{underline:"g-ui-text-decoration-underline","line-through":"g-ui-text-decoration-line-through",overline:"g-ui-text-decoration-overline",none:"g-ui-text-decoration-none"});return ia({...x,style:h,className:o("g-ui-text",k("g-ui-text-size-",t,"md"),W("g-ui-text-dimmed",u),W("g-ui-text-ellipsis",d),l,y,z,B,m)},r)}import{H1 as ra,H2 as Vr,H3 as ta,H4 as aa,H5 as oa,H6 as na}from"@granularjs/core";var sa={1:ra,2:Vr,3:ta,4:aa,5:oa,6:na};function ua(...e){let{props:i,children:r}=s(e,{order:2}),{order:t,className:a,style:n,...u}=i,g=c(t)||2;return(sa[g]||Vr)({...u,className:o("g-ui-title",k("g-ui-title-order-",t,2),a)},r)}import{Div as ga}from"@granularjs/core";function la(...e){let{props:i,children:r}=s(e,{size:"md"}),{size:t,fluid:a,className:n,style:u,...g}=i;return ga({...g,style:u,className:o("g-ui-container",W("g-ui-container-fluid",a),k("g-ui-container-size-",t,"md"),n)},r)}import{Div as ca}from"@granularjs/core";function pa(...e){let{props:i,children:r}=s(e,{gap:"md"}),{gap:t,align:a,justify:n,className:u,style:g,...d}=i,v=de(n,{between:"g-ui-justify-between",center:"g-ui-justify-center",end:"g-ui-justify-end",start:"g-ui-justify-start"});return ca({...d,style:g,className:o("g-ui-stack",k("g-ui-gap-",t,"md"),k("g-ui-align-",a),v,u)},r)}import{Div as da}from"@granularjs/core";function ma(...e){let{props:i,children:r}=s(e,{gap:"md",align:"center"}),{gap:t,align:a,justify:n,position:u,noWrap:g,className:d,style:v,...m}=i,h=de(u,{apart:"g-ui-justify-between",center:"g-ui-justify-center",right:"g-ui-justify-end",left:"g-ui-justify-start"});return da({...m,style:v,className:o("g-ui-group",k("g-ui-gap-",t,"md"),k("g-ui-align-",a,"center"),k("g-ui-justify-",n,"none"),h,W("g-ui-no-wrap",g),d)},r)}import{Div as pi,list as fa,when as Oi,after as Lr}from"@granularjs/core";function va(...e){let{props:i,children:r}=s(e,{padding:"md",radius:"md",shadow:"none",border:"default"}),{title:t,content:a,actions:n,border:u,padding:g,radius:d,shadow:v,className:m,style:h,...x}=i;return pi({style:h},Oi(t,()=>pi({className:"g-ui-card-title"},t)),Oi(a,()=>pi({className:"g-ui-card-content"},a)),{className:o("g-ui-card",k("g-ui-card-border-",u,"md"),k("g-ui-card-padding-",g,"md"),k("g-ui-card-radius-",d,"md"),k("g-ui-card-shadow-",v,"md"),m),...x},r,Oi(n,()=>pi({className:"g-ui-card-actions"},fa(n,l=>Ri({className:"g-ui-card-action",onClick:y=>l.get().onClick?.(y),leftSection:l.leftSection,rightSection:l.rightSection,size:Lr(l.size).compute(y=>y||"sm"),variant:Lr(l.variant).compute(y=>y||"outline"),...l.get().props||{}},l.label)))))}import{Span as ha}from"@granularjs/core";function ba(...e){let{props:i,children:r}=s(e,{variant:"filled",size:"md"}),{variant:t,size:a,className:n,dot:u,style:g,...d}=i,v=de(t,{dot:"g-ui-badge-dot"});return ha({...d,className:o("g-ui-badge",k("g-ui-badge-variant-",t,"filled"),k("g-ui-badge-size-",a,"md"),W("g-ui-badge-dot",u),v,n)},r)}import{Div as Ue,Input as xa,Textarea as wa,Label as ya,Span as ka,when as Xe,state as za,after as Na,isState as Ca}from"@granularjs/core";function ge(...e){let{props:i,rawProps:r}=s(e,{size:"md"}),{label:t,description:a,error:n,size:u,leftSection:g,rightSection:d,className:v,inputClassName:m,multiline:h,value:x,...l}=i,{value:y,node:z,onChange:B,onInput:L,onFocus:D,onBlur:F,onKeyDown:N,onKeyUp:w,onClick:b}=r,f=Ca(y)&&!B&&!L,S=f?y:za(c(x)??"");Na(x).change(ae=>{f||S.set(c(ae)??"")});let V=ae=>{let K=ae?.target?.value??"";K!==x.get()&&(S.set(K),B?.(ae),L?.(ae))},I=be(h),X=I?wa:xa,te=o(m,I&&"g-ui-textarea"),re=X({...l,node:z,value:S,onInput:V,onChange:V,onFocus:D,onBlur:F,onKeyDown:N,onKeyUp:w,onClick:b,className:o("g-ui-input",te)});return Ue({className:o("g-ui-text-input",v)},Xe(t,()=>ya({className:"g-ui-text-input-label"},t)),Xe(a,()=>ka({className:"g-ui-text-input-description"},a)),Ue({className:o("g-ui-input-wrapper",W("g-ui-input-multiline",h),k("g-ui-input-size-",u,"md"),W("g-ui-input-error",n))},Xe(g,()=>Ue({className:"g-ui-input-section"},g)),re,Xe(d,()=>Ue({className:"g-ui-input-section"},d))),Xe(n,()=>Ue({className:"g-ui-text-input-error-text"},n)))}function qi(...e){let{props:i}=s(e,{size:"md"}),{size:r,leftSection:t,rightSection:a,className:n,...u}=i;return ge({...u,size:r,className:n,leftSection:t,rightSection:a,multiline:!0})}import{Div as $r,Span as Ir,after as $e,state as Sa}from"@granularjs/core";function Yi(...e){let{props:i,rawProps:r}=s(e,{size:"md",step:1,allowDecimal:!0,allowNegative:!0,clampBehavior:"blur",hideControls:!1,decimalSeparator:".",thousandSeparator:"",format:null,prefix:"",suffix:""}),{value:t,min:a,max:n,step:u,size:g,allowDecimal:d,allowNegative:v,decimalSeparator:m,thousandSeparator:h,decimalScale:x,clampBehavior:l,hideControls:y,format:z,locale:B,currency:L,formatOptions:D,prefix:F,suffix:N,leftSection:w,rightSection:b,className:f,onChange:S,onInput:V,...I}=i,{onChange:X,onInput:te,onBlur:re,onFocus:ae,onKeyDown:K}=r,ne=M=>{X?.(M.target?.value??""),te?.(M.target?.value??"")},me=ne,ie=Sa(""),T=M=>String(M??"").replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),R=()=>{if(!!!c(d))return 0;let P=c(x);if(P!=null&&P!==""&&Number.isFinite(Number(P)))return Math.max(0,Number(P));let E=c(z);return E==="currency"||E==="percent"?2:0},C=M=>{let P=c(m)??".",E=c(h)??"",O=String(M??"");if(E&&(O=O.split(E).join("")),!O||O==="-"||O===P||O.endsWith(P))return null;let _=O.replace(P,"."),Z=Number(_);return Number.isFinite(Z)?Z:null},G=M=>{let P=c(h)??"";return P?M.replace(/\B(?=(\d{3})+(?!\d))/g,P):M},H=M=>{let P=c(m)??".",E=R(),O=Number(M);if(!Number.isFinite(O))return"";let _=O<0?"-":"",Z=Math.abs(O),[Y,U=""]=String(Z).split("."),ee=G(Y);if(E>0){let fe=U.slice(0,E).padEnd(E,"0");return`${_}${ee}${P}${fe}`}return`${_}${ee}`},se=(M,P)=>{try{let E=c(B),O=c(L)??"USD",_=c(D)??{},Z=R(),Y=P==="currency"?"currency":"decimal";return new Intl.NumberFormat(E,{style:Y,currency:O,...Z>0?{minimumFractionDigits:Z,maximumFractionDigits:Z}:{maximumFractionDigits:0},..._}).format(M)}catch{return H(M)}},ue=M=>{let P=M,E=c(a),O=c(n);return E!=null&&Number.isFinite(Number(E))&&(P=Math.max(P,Number(E))),O!=null&&Number.isFinite(Number(O))&&(P=Math.min(P,Number(O))),!c(v)&&P<0&&(P=0),P},he=()=>{let M=c(N)??"",P=c(z);return!M&&P==="percent"?"%":M},ze=(M,P,E)=>{let O=c(F)??"",_=he(),Z=String(M??"").replace(/\u00A0/g," "),Y=String(O??"").replace(/\u00A0/g," "),U=String(_??"").replace(/\u00A0/g," "),ee=Y&&Z.startsWith(Y),fe=U&&Z.endsWith(U);return`${P??""}${ee?"":O}${M}${fe?"":_}`},Se=(M,P)=>{let E=R(),O=c(m)??".",Z=String(M??"").replace(/\D/g,"")||"0",Y=E>0?Z.padStart(E+1,"0"):Z,ee=(E>0?Y.slice(0,-E):Y).replace(/^0+(?=\d)/,"")||"0",fe=E>0?Y.slice(-E):"",Te=E>0?`${ee}${O}${fe}`:ee;return`${P??""}${Te}`},Ve=M=>{let P=c(F)??"",E=he(),O=String(M??""),_=String(P??"").replace(/\u00A0/g," "),Z=String(E??"").replace(/\u00A0/g," ");return _&&O.replace(/\u00A0/g," ").startsWith(_)&&(O=O.slice(P.length)),Z&&O.replace(/\u00A0/g," ").endsWith(Z)&&(O=O.slice(0,-E.length)),O},li=M=>{let P=!!c(v),E=Ve(M),O=P&&E.includes("-")?"-":"",_=E.replace(/\D/g,""),Z=Se(_,O);if(c(l)==="strict"){let Y=C(Z);if(Y!=null){let U=ue(Y);Z=`${U<0?"-":""}${H(Math.abs(U))}`}}return Z},Vi=M=>{if(M==null||M==="")return Se("","");if(typeof M=="number"&&Number.isFinite(M)){let U=c(l)==="strict"?ue(M):M;return`${U<0?"-":""}${H(Math.abs(U))}`}let P=Ve(M),E=c(m)??".",_=!!c(v)&&String(P).includes("-")?"-":"",Z=String(P??"").replace(new RegExp(`[^0-9${T(E)}]`,"g"),""),Y=C(`${_}${Z}`);if(Y!=null){let U=c(l)==="strict"?ue(Y):Y;return`${U<0?"-":""}${H(Math.abs(U))}`}return li(M)},Ne,Ze=M=>{let P=c(M);if(P===void 0)return;let E=Vi(P);E!==ie.get()&&(Ne=E,ie.set(E))};Ze(t),$e(t).change(M=>{Ze(M)}),$e(ie).change(M=>{if(M===Ne){Ne=void 0;return}Ne=void 0;let P=C(M);if(P==null){ne?.(M??"");return}ne?.(P)});let Li=$e(b).compute(M=>M!=null&&M!==!1),$i=$e(y,Li).compute(([M,P])=>!c(M)&&!P),ci=$e(d).compute(M=>c(M)?"decimal":"numeric"),Ii=$e(z,F,N,d,v,m,h,x,l,a,n,B,L,D).compute(()=>({mode:"both",format:M=>{let P=li(M),E=c(z),_=!!c(v)&&P.startsWith("-")?"-":"",Z=C(P),Y=P.replace(_,"");if(Z!=null){let U=Math.abs(Z);if(typeof E=="function")try{Y=E(U)}catch{Y=H(U)}else if(E==="currency")Y=se(U,"currency");else if(E==="decimal"){let ee=c(B),fe=c(D);Y=ee||fe?se(U,"decimal"):H(U)}else Y=H(U)}return{value:P,raw:P,visual:ze(Y,_,E)}}})),p=M=>{let P=C(ie.get()),E=Number(c(u)??1),_=ue((P??0)+E*M);ie.set(H(_))},A=M=>{if(!M||typeof M.setSelectionRange!="function")return;let P=()=>{try{let E=String(M.value??"").length;M.setSelectionRange(E,E)}catch{}};typeof requestAnimationFrame=="function"?requestAnimationFrame(P):P()},oe=M=>{me?.(M);let P=M?.target;P&&A(P)},q=M=>{if(re?.(M),c(l)!=="blur")return;let P=C(ie.get());if(P==null)return;let E=ue(P);ie.set(H(E))},J=M=>{ae?.(M),A(M?.target)},pe=M=>{K?.(M);let P=M?.target;if(!P)return;let E=c(F)??"",O=he();O&&typeof P.selectionEnd=="number"&&(P.selectionEnd=Math.min(P.selectionEnd,String(P.value??"").length-O.length)),E&&typeof P.selectionStart=="number"&&(P.selectionStart=Math.max(P.selectionStart,E.length))},Q=$r({className:"g-ui-number-field-controls"},Ir({className:"g-ui-number-field-control",onClick:()=>p(1)},"+"),Ir({className:"g-ui-number-field-control",onClick:()=>p(-1)},"\u2212")),Ce=$r({className:"g-ui-number-field-controls-wrapper"},Q),De=$e($i,b).compute(([M,P])=>M?Ce:P);return ge({...I,size:g,className:o("g-ui-number-field",f),leftSection:w,rightSection:De,type:"text",inputMode:ci,inputClassName:o("g-ui-input-number"),value:ie,format:Ii,onInput:oe,onBlur:q,onFocus:J,onKeyDown:pe})}function Da(...e){return Yi(...e)}import{Div as vi,Button as Pa,portal as Ma,when as Wi,after as Ta}from"@granularjs/core";var di='<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960 960 960" width="24px" fill="#1f1f1f"><path d="M504-480 320-664l56-56 240 240-240 240-56-56 184-184Z"/></svg>',mi='<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960 960 960" width="24px" fill="#1f1f1f"><path d="M560-240 320-480l240-240 56 56-184 184 184 184-56 56Z"/></svg>',fi='<svg xmlns="http://www.w3.org/2000/svg" height="40px" viewBox="0 -960 960 960" width="40px" fill="#1f1f1f"><path d="M379.33-244 154-469.33 201.67-517l177.66 177.67 378.34-378.34L805.33-670l-426 426Z"/></svg>',Br='<svg xmlns="http://www.w3.org/2000/svg" height="40px" viewBox="0 -960 960 960" width="40px" fill="#1f1f1f"><path d="M240-446.67v-66.66h480v66.66H240Z"/></svg>',Re='<svg xmlns="http://www.w3.org/2000/svg" height="40px" viewBox="0 -960 960 960" width="40px" fill="#1f1f1f"><path d="M312-265.33 265.33-312l168-168-168-167L312-693.67l168 168 167-168L693.67-647l-168 167 168 168L647-265.33l-167-168-168 168Z"/></svg>',Ar='<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960 960 960" width="24px" fill="#1f1f1f"><path d="M784-120 532-372q-30 24-69 38t-83 14q-109 0-184.5-75.5T120-580q0-109 75.5-184.5T380-840q109 0 184.5 75.5T640-580q0 44-14 83t-38 69l252 252-56 56ZM380-400q75 0 127.5-52.5T560-580q0-75-52.5-127.5T380-760q-75 0-127.5 52.5T200-580q0 75 52.5 127.5T380-400Z"/></svg>',Fr='<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960 960 960" width="24px" fill="currentColor"><path d="M440-440H200v-80h240v-240h80v240h240v80H520v240h-80v-240Z"/></svg>',jr='<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960 960 960" width="24px" fill="currentColor"><path d="M200-120q-33 0-56.5-23.5T120-200v-560q0-33 23.5-56.5T200-840h357l-80 80H200v560h560v-278l80-80v358q0 33-23.5 56.5T760-120H200Zm280-360v-80h240v80H480Zm0 160v-80h320v80H480Zm0 160v-80h320v80H480ZM360-360v-80h80v80h-80Zm0 160v-80h80v80h-80Zm0 160v-80h80v80h-80Zm160-320h280l-36-37 37-37v74H520Zm-160 0h80v-80h-80v80ZM120-600v-160l160-160h160l-80 80H200v240h-80Zm80-240v-80 80Z"/></svg>',Er='<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960 960 960" width="24px" fill="currentColor"><path d="M280-120q-33 0-56.5-23.5T200-200v-520h-40v-80h200v-40h240v40h200v80h-40v520q0 33-23.5 56.5T680-120H280Zm400-600H280v520h400v-520ZM360-280h80v-360h-80v360Zm160 0h80v-360h-80v360ZM280-720v520-520Z"/></svg>',Rr='<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960 960 960" width="24px" fill="currentColor"><path d="M200-80q-33 0-56.5-23.5T120-160v-560q0-33 23.5-56.5T200-800h40v-80h80v80h320v-80h80v80h40q33 0 56.5 23.5T840-720v560q0 33-23.5 56.5T760-80H200Zm0-80h560v-400H200v400Z"/></svg>';function _e(...e){let{props:i,rawProps:r,children:t}=s(e,{size:"md",centered:!0,overlay:"normal"}),{opened:a,title:n,size:u,centered:g,overlay:d,position:v,className:m,style:h}=i,{onClose:x}=r,l=Ta(v,g).compute(([y,z])=>`g-ui-modal-position-${y??(z===!1?"top-center":"center")}`);return Wi(a,()=>Ma(vi({className:o("g-ui-modal-overlay",k("g-ui-modal-overlay-",d,"normal"),l),onClick:y=>{y.target===y.currentTarget&&x?.()}},vi({className:o("g-ui-modal",k("g-ui-modal-size-",u,"md"),m)},vi({className:"g-ui-modal-header"},Wi(n,()=>vi({className:"g-ui-modal-title"},n)),Wi(x,()=>Pa({type:"button",className:"g-ui-button g-ui-button-variant-subtle g-ui-button-size-xs g-ui-modal-close",onClick:x,innerHTML:Re}))),t))))}import{Div as hi,Span as Gi,after as Hr,when as Or}from"@granularjs/core";function Ke(...e){let{props:i}=s(e,{variant:"spinner",size:"md"}),{variant:r,size:t,className:a}=i,n=Hr(r).compute(g=>g==="dots"),u=Hr(r).compute(g=>g==="bars");return Or(n,()=>hi({className:o("g-ui-loading g-ui-dots",k("g-ui-loading-size-",t,"md"),a)}),()=>Or(u,()=>hi({className:o("g-ui-loading g-ui-bars",k("g-ui-loading-size-",t,"md"),a)},Gi(""),Gi(""),Gi("")),()=>hi({className:o("g-ui-loading",k("g-ui-loading-size-",t,"md"),a)},hi({className:"g-ui-spinner"}))))}import{Div as Zi,Input as Va,Label as La,Span as qr,when as Ui,state as $a,after as Ia}from"@granularjs/core";function Xi(...e){let{props:i,rawProps:r}=s(e,{size:"md"}),{checked:t,label:a,description:n,size:u,indeterminate:g,className:d,style:v,inputProps:m,...h}=i,{onChange:x}=r,l=$a(be(t));Ia(t).change(z=>{z!=null&&(l.set(!!z),x?.(z))});let y=La({className:"g-ui-checkbox-control"},Va({type:"checkbox",indeterminate:g,checked:l,className:o("g-ui-checkbox-input",k("g-ui-checkbox-size-",u,"md"),m?.className),...h}),Ui(l,()=>Zi({className:"g-ui-checkbox-checked",innerHTML:fi}),()=>{if(!l.get()&&g.get())return Zi({className:"g-ui-checkbox-indeterminate",innerHTML:Br})}),Ui(a,()=>qr({className:"g-ui-checkbox-label"},a)));return Zi({className:o("g-ui-checkbox",k("g-ui-checkbox-size-",u,"md"),d)},y,Ui(n,()=>qr({className:"g-ui-checkbox-description"},n)))}import{Input as Ba,Label as Aa,Span as Fa,when as ja}from"@granularjs/core";function Ea(...e){let{props:i}=s(e,{size:"md"}),{label:r,size:t,className:a,style:n,inputProps:u,...g}=i;return Aa({className:o("g-ui-switch",k("g-ui-switch-size-",t,"md"),a)},Ba({type:"checkbox",className:o("g-ui-switch-input",k("g-ui-switch-size-",t,"md"),u?.className),...g}),ja(r,()=>Fa({className:"g-ui-switch-label"},r)))}import{Div as Ie,Span as Yr,when as _i,state as Wr,after as bi}from"@granularjs/core";function Ra(...e){let{props:i,rawProps:r}=s(e,{data:[],size:"md"}),{data:t,value:a,size:n,leftSection:u,rightSection:g,placeholder:d,className:v,...m}=i,{onChange:h}=r,x=Wr(!1),l=Wr(c(a)??"");bi(a).change(L=>{let D=c(L);D!==void 0&&l.set(D??"")});let y=L=>{l.set(L),h?.(L),x.set(!1)},z=bi(l).compute(L=>L?"":"g-ui-select-placeholder"),B=bi(l).compute(L=>{let F=(c(t)??[]).find(N=>N.value===L);return L?F?.label??"":d??""});return Ie({...m,className:o("g-ui-select-root",v)},Ie({className:o("g-ui-input-wrapper",k("g-ui-input-size-",n,"md"))},_i(u,()=>Ie({className:"g-ui-input-section"},u)),Ie({className:o("g-ui-select",z),onClick:()=>x.set(!x.get())},Yr({className:"g-ui-select-value"},B)),_i(g,()=>Ie({className:"g-ui-input-section"},g),()=>Yr({className:"g-ui-select-caret"},"\u25BE"))),_i(x,()=>Ie({className:"g-ui-select-dropdown"},(c(t)??[]).map(L=>Ie({className:o("g-ui-select-item",bi(l).compute(D=>D===L.value?"g-ui-select-item-active":"")),onClick:()=>y(L.value)},L.label)))))}import{Button as Ha,Div as He,state as Pe,after as Qe,list as Oa,when as qa}from"@granularjs/core";function Ya(...e){let{props:i,rawProps:r}=s(e,{tabs:[],orientation:"horizontal",variant:"default",sticky:!0}),{value:t,tabs:a,orientation:n,variant:u,sticky:g,className:d,style:v}=i,{onChange:m}=r,h=Pe(c(t)??c(a)?.[0]?.value??""),x=Pe(),l=Pe(),y=Pe(0),z=Pe(0),B=Pe(0),L=Pe(0),D=Pe(!1),F=Pe(0),N=!1,w=null,b=!1,f=new Set;Qe(t).change(C=>{let G=c(C);G!=null&&h.set(G)});let S=C=>{h.set(C),m?.(C)},V=C=>{let G=[],H=C?.parentElement;for(;H;){let se=getComputedStyle(H),ue=`${se.overflow}${se.overflowY}${se.overflowX}`;/(auto|scroll)/.test(ue)&&G.push(H),H=H.parentElement}return G},I=C=>V(C)[0]??null,X=C=>C?C.getBoundingClientRect().top:0,te=C=>C?C.scrollTop:window.scrollY||window.pageYOffset||0,re=(C,G)=>C>G?"down":C<G?"up":"none",ae=(C,G,H,se)=>C==="down"&&G<H?!0:C==="up"&&G>=H?!1:se,K=()=>{let C=x.get(),G=l.get();if(!C||!G)return;if(!be(g)){D.set(!1),y.set(0);return}if(typeof window>"u")return;let H=C.getBoundingClientRect(),se=G.getBoundingClientRect(),ue=I(C),he=X(ue),ze=te(ue),Se=re(ze,F.get());F.set(ze);let Ve=ae(Se,H.top,he,D.get());y.set(se.height),z.set(H.left),B.set(H.width),L.set(he),Ve!==D.get()&&D.set(Ve)},ne=()=>{w==null&&(w=requestAnimationFrame(()=>{w=null,K()}))},me=C=>{!C||f.has(C)||(f.add(C),C.addEventListener("scroll",ne,{passive:!0}))},ie=()=>{if(N)return;let C=x.get(),G=l.get();!C||!G||typeof window>"u"||(N=!0,K(),me(window),window.addEventListener("resize",ne),V(C).forEach(me))};Qe(l,x,g).change(ie),!b&&typeof window<"u"&&(b=!0,setTimeout(()=>ie(),0));let T=Qe(D,z,B,L).compute(C=>{let[G,H,se,ue]=C;return G?{position:"fixed",top:`${ue}px`,left:`${H}px`,width:`${se}px`,background:"var(--g-ui-surface)",zIndex:100}:{position:"static",top:"auto",left:"auto",width:"auto",zIndex:"auto",background:"transparent"}}),R=Qe(D,y).compute(C=>{let[G,H]=C;return{height:G?`${H}px`:"0px"}});return He(He({className:o("g-ui-tabs",de(n,{vertical:"g-ui-tabs-vertical"}),k("g-ui-tabs-variant-",u,"default"),i.className??d)},He({node:x}),He({style:R}),He({node:l,className:"g-ui-tabs-list",style:T},Oa(a,C=>Ha({className:Qe(h,C.value).compute(([G,H])=>o("g-ui-tabs-tab",H===G&&"g-ui-tabs-tab-active")),onClick:()=>S(C.get().value)},C.label))),He({className:"g-ui-tabs-panel"},qa(h,()=>a.get()?.find(C=>C.value===h.get())?.content??null))))}import{Table as Wa,Thead as Ga,Tbody as Za,Tr as Gr,Th as Ua,Td as Zr}from"@granularjs/core";function Xa(...e){let{props:i}=s(e,{headers:[],rows:[]}),{headers:r,rows:t,striped:a,highlightOnHover:n,withBorder:u,withColumnBorders:g,className:d,style:v,...m}=i;return Wa({...m,className:o("g-ui-table",W("g-ui-table-striped",a),W("g-ui-table-hover",n),W("g-ui-table-with-border",u),W("g-ui-table-column-borders",g),d)},r.length?Ga(Gr(r.map(h=>Ua(h)))):null,Za(t.map(h=>Gr(Array.isArray(h)?h.map(x=>Zr(x)):Object.values(h).map(x=>Zr(x))))))}import{Div as Ki}from"@granularjs/core";import{state as _a,when as Ka,after as Qa}from"@granularjs/core";function Ja(...e){let{props:i,children:r}=s(e,{opened:!1}),{opened:t,className:a,...n}=i,u=_a(be(t));Qa(t).change(m=>{u.set(be(m))});let g=()=>{u.set(!u.get())},d=r[0],v=r[1];return Ki({...n,className:o("g-ui-accordion",a)},Ki({className:"g-ui-accordion-header",onClick:g},d),Ka(u,()=>Ki({className:"g-ui-accordion-content"},v)))}import{Span as Ur}from"@granularjs/core";function eo(...e){let{props:i,children:r}=s(e),{label:t,className:a,style:n}=i;return Ur({className:o("g-ui-tooltip",a)},r,Ur({className:"g-ui-tooltip-content"},t))}import{Div as Je,when as io,after as ro,state as ei,portal as to}from"@granularjs/core";var Qi=ei({currentOpenState:null});function ao(...e){let i=ei(),r=ei(),t=ei({}),{props:a,rawProps:n,children:u}=s(e,{position:"right"}),{opened:g,content:d,position:v,className:m,...h}=a,{onChange:x}=n,l=ei(c(g)??!1);ro(g).change(N=>{let w=c(N);w!=null&&(l.set(!!w),w&&y())});let y=()=>{Qi.get().currentOpenState!==l&&(Qi.get().currentOpenState?.set(!1),Qi.set().currentOpenState=l)};g.get()&&y();let z=N=>{let b=String(N??"right").toLowerCase().split("-").filter(Boolean);if(b.length===1){let V=b[0];return V==="top"||V==="bottom"?{placement:V,align:"center"}:V==="left"||V==="right"?{placement:"bottom",align:V}:V==="center"?{placement:"bottom",align:"center"}:{placement:"bottom",align:"right"}}let[f,S]=b;return f==="top"||f==="bottom"?{placement:f,align:S||"center"}:f==="left"||f==="right"?{placement:f,align:S||"center"}:{placement:"bottom",align:"right"}},B=()=>{let N=i.get(),w=r.get();if(!N||!w||typeof window>"u")return;let b=N.getBoundingClientRect(),f=w.getBoundingClientRect(),S=c(v)??"right",V=getComputedStyle(document.documentElement).getPropertyValue("--g-ui-space-20"),I=Number.parseFloat(V)||20,X=window.innerWidth||0,te=window.innerHeight||0,re=Math.max(I,X-f.width-I),ae=Math.max(I,te-f.height-I),{placement:K,align:ne}=z(S),me=8,ie=b.bottom+me,T=b.left;K==="top"||K==="bottom"?(ie=K==="top"?b.top-f.height-me:b.bottom+me,ne==="center"?T=b.left+b.width/2-f.width/2:ne==="right"?T=b.right-f.width:T=b.left):(K==="left"||K==="right")&&(T=K==="left"?b.left-f.width-me:b.right+me,ne==="center"?ie=b.top+b.height/2-f.height/2:ne==="bottom"?ie=b.bottom-f.height:ie=b.top),T=Math.max(I,Math.min(T,re)),ie=Math.max(I,Math.min(ie,ae)),t.set({top:`${ie}px`,left:`${T}px`})},L=N=>{l.set(N),x?.(N),N&&(y(),typeof requestAnimationFrame=="function"?requestAnimationFrame(()=>B()):setTimeout(()=>B(),0))},D=()=>L(!l.get()),F=()=>L(!1);return Je({...h,node:i,className:o("g-ui-menu",m)},Je({onClick:D},u),io(l,()=>to(Je(Je({className:"g-ui-menu-overlay",onClick:F}),Je({className:"g-ui-menu-dropdown",node:r,style:t},d)))))}import{Div as Xr,portal as oo,when as no}from"@granularjs/core";function so(...e){let{props:i,children:r}=s(e,{position:"right",size:"md",overlay:"normal",shadowed:!0}),{opened:t,onClose:a,position:n,size:u,overlay:g,shadowed:d,className:v,style:m}=i;return no(t,()=>oo(Xr({className:o("g-ui-drawer-overlay",k("g-ui-drawer-overlay-",g,"normal")),onClick:a},Xr({className:o("g-ui-drawer",de(d,{true:"g-ui-drawer-shadowed"},!0),k("g-ui-drawer-",n,"right"),k("g-ui-drawer-size-",u,"md"),v),onClick:h=>h.stopPropagation()},r))))}import{Button as uo,Div as Ji,Span as _r,when as xi,after as Kr}from"@granularjs/core";function er(...e){let{props:i,rawProps:r,children:t}=s(e,{color:"blue",withCloseButton:!0}),{title:a,color:n,icon:u,loading:g,withCloseButton:d,withBorder:v,className:m,style:h}=i,{onClose:x}=r,l=Kr(u,g).compute(([z,B])=>!z&&!!B),y=Kr(u,g).compute(([z,B])=>!!z||!!B);return Ji({className:o("g-ui-notification",[v,"g-ui-notification-bordered"],[n,z=>`g-ui-notification-${z}`],[y,"g-ui-notification-with-icon"],m)},xi(u,()=>_r({className:"g-ui-notification-icon"},u)),xi(l,()=>Ke({size:"sm",className:"g-ui-notification-loader"})),Ji({className:"g-ui-notification-body"},xi(a,()=>Ji({className:"g-ui-notification-title"},a)),t),xi(d,()=>uo({type:"button",className:"g-ui-notification-close",onClick:()=>x?.()},_r({innerHTML:Re}))))}import{Div as go,when as lo}from"@granularjs/core";function co(...e){let{props:i}=s(e,{labelPosition:"center"}),{label:r,labelPosition:t,vertical:a,className:n,...u}=i;return go({...u,className:o("g-ui-divider",W("label",r),k("g-ui-divider-label-",t,"center"),W("g-ui-divider-vertical",a),n)},lo(r,()=>Hi({className:"g-ui-divider-label-text",size:"sm"},r)))}import{Div as po}from"@granularjs/core";function mo(...e){let{props:i,children:r}=s(e,{padding:"md",radius:"md",shadow:"none"}),{padding:t,radius:a,shadow:n,className:u,...g}=i;return po({...g,className:o("g-ui-paper",[t,d=>`g-ui-card-padding-${d}`],[a,d=>`g-ui-card-radius-${d}`],[n,d=>`g-ui-card-shadow-${d}`],u)},r)}import{Button as fo,Div as ir,Span as vo,after as Qr,when as rr}from"@granularjs/core";function ho(...e){let{props:i,rawProps:r,children:t}=s(e,{color:"blue"}),{title:a,color:n,icon:u,withCloseButton:g,className:d,...v}=i,{onClose:m}=r,h=Qr(a,g).compute(([l,y])=>l||y),x=Qr(u).compute(l=>l!==void 0);return ir({...v,className:o("g-ui-alert",[n,l=>`g-ui-alert-${l}`],d)},ir({className:"g-ui-alert-header"},rr(u,()=>vo({className:"g-ui-alert-icon"},u)),rr(a,()=>ir({className:"g-ui-alert-title"},a)),rr(g,()=>fo({type:"button",className:"g-ui-alert-close",onClick:()=>m?.()},"\xD7"))),t)}import{Div as bo,Img as xo,when as wo}from"@granularjs/core";function yo(...e){let{props:i,children:r}=s(e,{size:"md",alt:""}),{src:t,size:a,alt:n,className:u,...g}=i;return bo({...g,className:o("g-ui-avatar",[a,d=>`g-ui-avatar-size-${d}`],u)},wo(t,()=>xo({className:"g-ui-avatar-img",src:t,alt:n}),()=>r))}import{Span as ko}from"@granularjs/core";function zo(...e){let{props:i,children:r}=s(e),{className:t,...a}=i;return ko({...a,className:o("g-ui-kbd",t)},r)}import{Code as No}from"@granularjs/core";function Co(...e){let{props:i,children:r}=s(e),{className:t,...a}=i;return No({...a,className:o("g-ui-code",t)},r)}import{Blockquote as So}from"@granularjs/core";function Do(...e){let{props:i,children:r}=s(e),{className:t,...a}=i;return So({...a,className:o("g-ui-blockquote",t)},r)}import{Div as Po}from"@granularjs/core";function Mo(...e){let{props:i,children:r}=s(e,{cols:3,gap:"md"}),{cols:t,gap:a,className:n,...u}=i;return Po({...u,className:o("g-ui-grid",[a,g=>`g-ui-gap-${g}`],[t,g=>`g-ui-grid-cols-${g}`],n)},r)}import{Ul as To,Ol as Vo,Li as tr,Div as wi,Span as ar,after as or,when as Be,isSignal as Lo,isState as $o,isStatePath as Io,isComputed as Bo}from"@granularjs/core";function Jr(...e){let{props:i,children:r}=s(e,{type:"none",size:"md"}),{type:t,size:a,withPadding:n,className:u,...g}=i,d=de(t,{ordered:"g-ui-list-ordered",unordered:"g-ui-list-unordered",none:"g-ui-list-none"}),v=or(t).compute(z=>z==="ordered"),m=z=>z&&typeof z=="object"&&typeof z.tagName=="string"&&(z.tagName.toLowerCase()==="ul"||z.tagName.toLowerCase()==="ol"),h=z=>z&&typeof z=="object"&&typeof z.tagName=="string"&&z.tagName.toLowerCase()==="li",x=z=>{console.log("INFO ABOUT ITEM",z,typeof z,typeof z?.tagName,z?.tagName?.toLowerCase());let B=L=>L?.nodeType==="granular-list-node"?L:L==null||L===!1?null:Array.isArray(L)?L.map(D=>B(D)):h(L)?L:m(L)?tr({className:"g-ui-list-nested-item"},L):tr(ar({className:"g-ui-list-item-shell"},L));return Lo(z)||$o(z)||Io(z)||Bo(z)?or(z).compute(L=>B(L)):B(z)},l=Be(r,()=>r.map(z=>x(z))),y={...g,className:o("g-ui-list",k("g-ui-list-size-",a,"md"),W("g-ui-list-with-padding",n),d,u)};return Be(v,()=>Vo(y,l),()=>To(y,l))}function Ao(...e){let{props:i,children:r}=s(e,{withBorder:!1}),{leftSection:t,rightSection:a,title:n,body:u,withBorder:g,className:d,...v}=i,m=or(n,u).compute(([h,x])=>!!h||!!x);return tr({...v,className:o("g-ui-list-item",W("g-ui-list-item-border",g),d)},wi({className:"g-ui-list-item-shell"},Be(t,()=>ar({className:"g-ui-list-item-section g-ui-list-item-section-left"},t)),Be(m,()=>wi({className:"g-ui-list-item-content"},Be(n,()=>wi({className:"g-ui-list-item-title"},n)),Be(u,()=>wi({className:"g-ui-list-item-body"},u))),()=>r),Be(a,()=>ar({className:"g-ui-list-item-section g-ui-list-item-section-right"},a))))}Jr.Item=Ao;import{A as Fo}from"@granularjs/core";function jo(...e){let{props:i,children:r}=s(e),{className:t,...a}=i;return Fo({...a,className:o("g-ui-anchor",t)},r)}import{Img as Eo}from"@granularjs/core";function Ro(...e){let{props:i}=s(e),{className:r,...t}=i;return Eo({...t,className:o("g-ui-image",r)})}import{Span as Ho}from"@granularjs/core";function ye(...e){let{props:i,children:r}=s(e,{size:"md"});return Ho({...i,className:o("g-ui-icon",k("g-ui-icon-size-",i.size,"md"),k("g-ui-icon-color-",i.color),i.className)},...r)}import{Div as et}from"@granularjs/core";function Oo(...e){let{props:i}=s(e,{value:0,color:"primary",size:"md"}),{value:r,color:t,size:a,className:n,...u}=i;return et({...u,className:o("g-ui-progress",k("g-ui-progress-size-",a,"md"),[r,g=>{let d=Math.max(0,Math.min(100,Number(g)||0));return`g-ui-progress-${Math.round(d/5)*5}`}],[t,g=>g?`g-ui-progress-${g}`:""],n)},et({className:"g-ui-progress-bar"}))}import{Div as Ae,after as yi,state as qo,when as Yo}from"@granularjs/core";function Wo(...e){let{props:i,rawProps:r}=s(e,{size:"md",min:0,max:100,step:1}),{onChange:t}=r,{value:a,marks:n,size:u,min:g,max:d,step:v,disabled:m,className:h,...x}=i,l=qo(c(a??g));yi(a).change(N=>{N!=null&&l.set(c(N))});let y=()=>{let N=Number(c(g)),w=Number(c(d));return!Number.isFinite(N)||!Number.isFinite(w)?{minValue:0,maxValue:100}:{minValue:Math.min(N,w),maxValue:Math.max(N,w)}},z=()=>{let N=Number(c(v));return Number.isFinite(N)&&N>0?N:1},B=N=>{let{minValue:w,maxValue:b}=y(),f=z(),S=Math.max(w,Math.min(b,Number(N))),V=Math.round((S-w)/f)*f+w;V!==l.get()&&(l.set(V),t?.(V))},L=yi(l).compute(N=>{let{minValue:w,maxValue:b}=y(),f=b-w;if(f<=0)return 0;let S=(Number(N??w)-w)/f*100;return Math.max(0,Math.min(100,S))}),D=(N,w)=>{let b=w?.();if(!b||b.width===0)return;let S=Math.min(Math.max(N.clientX-b.left,0),b.width)/b.width,{minValue:V,maxValue:I}=y();B(V+S*(I-V))},F=N=>{if(be(m))return;N.preventDefault?.();let w=N.currentTarget,b=()=>w.getBoundingClientRect();w.setPointerCapture?.(N.pointerId),D(N,b);let f=V=>D(V,b),S=()=>{w.releasePointerCapture?.(N.pointerId),window.removeEventListener("pointermove",f),window.removeEventListener("pointerup",S)};window.addEventListener("pointermove",f),window.addEventListener("pointerup",S)};return Ae({...x,className:o("g-ui-slider",k("g-ui-slider-size-",u,"md"),W("g-ui-slider-disabled",m),h)},Ae({className:"g-ui-slider-track",onPointerDown:F},Ae({className:"g-ui-slider-bar",style:yi(L).compute(N=>({width:`${N}%`}))}),Ae({className:"g-ui-slider-thumb",style:yi(L).compute(N=>({left:`${N}%`}))})),Yo(n,()=>Ae({className:"g-ui-slider-marks"},n.map(N=>nr({mark:N,getBounds:y})))))}var nr=({mark:e,getBounds:i})=>{let{minValue:r,maxValue:t}=i(),a=t-r,n=e.value??e,u=e.label??String(e.value)??n,g=Number(n),d=0;return a>0&&(d=(g-r)/a*100),Ae({className:"g-ui-slider-mark",style:{left:`${Math.max(0,Math.min(100,d))}%`}},Ae({className:"g-ui-slider-mark-label"},u))};import{Div as Go,after as Zo}from"@granularjs/core";function Uo(...e){let{props:i}=s(e,{height:"md",width:"full"}),{height:r,width:t,className:a,...n}=i,u=Zo(r,t).compute(([g,d])=>{let v={};return isNaN(g)||(v.height=`${g}px`),isNaN(d)||(v.width=`${d}px`),v});return Go({...n,style:{width:u.width,height:u.height,...n.style||{}},className:o("g-ui-skeleton",[r,g=>`g-ui-skeleton-h-${g}`],[t,g=>`g-ui-skeleton-w-${g}`],a)})}import{Button as Xo,after as it,state as _o}from"@granularjs/core";function Ko(...e){let{props:i,rawProps:r,children:t}=s(e,{size:"md",variant:"filled",color:"primary"}),{checked:a,size:n,variant:u,color:g,className:d,...v}=i,{onChange:m}=r,h=_o(!!a);it(a).change(l=>{l!=null&&h.set(!!l)});let x=l=>{h.set(l),m?.(l)};return Xo({...v,type:"button",className:o("g-ui-chip",k("g-ui-chip-size-",n,"md"),k("g-ui-chip-variant-",u,"filled"),k("g-ui-chip-color-",g,"primary"),it(h).compute(l=>l?"g-ui-chip-active":""),d),onClick:()=>x(!h.get())},t)}import{Div as sr,after as rt,state as Qo,list as Jo}from"@granularjs/core";function en(...e){let{props:i,rawProps:r}=s(e,{data:[],size:"sm"}),{value:t,data:a,size:n,scroll:u,className:g,...d}=i,{onChange:v}=r,m=Qo(c(t));rt(t).change(x=>{let l=c(x);l!=null&&m.set(l)});let h=x=>{m.set(x),v?.(x)};return sr({...d,className:o(u&&"g-ui-segmented-scroll")},sr({className:o("g-ui-segmented",k("g-ui-segmented-size-",n,"sm"),g)},Jo(a,(x=>sr({className:o("g-ui-segmented-item",rt(m).compute(l=>x.get().value===l?"g-ui-segmented-active":"")),onClick:()=>h(x.get().value)},x.label)))))}import{Button as ur,Div as rn,state as tn,after as ki}from"@granularjs/core";function an(...e){let{props:i,rawProps:r}=s(e,{total:1,size:"md"}),{page:t,total:a,size:n,className:u,...g}=i,{onChange:d}=r,v=tn(c(t??1));ki(t).change(l=>{let y=c(l);y!=null&&v.set(y)});let m=l=>{let y=Number(c(a))||1,z=Math.max(1,Math.min(y,l));v.set(z),d?.(z)},h=[],x=Number(c(a))||1;for(let l=1;l<=x;l+=1)h.push(l);return rn({...g,className:o("g-ui-pagination",k("g-ui-pagination-size-",n,"md"),i.className??u)},ur({className:"g-ui-pagination-item",onClick:()=>m((v.get?.()??v)-1),disabled:ki(v).compute(l=>l<=1)},"<"),h.map(l=>ur({className:ki(v).compute(y=>o("g-ui-pagination-item",l===y&&"g-ui-pagination-item-active")),onClick:()=>m(l)},String(l))),ur({className:"g-ui-pagination-item",onClick:()=>m((v.get?.()??v)+1),disabled:ki(v).compute(l=>l>=a)},">"))}import{Div as on,Input as nn,Label as sn,Span as tt,when as at}from"@granularjs/core";function un(...e){let{props:i}=s(e,{size:"md"}),{label:r,description:t,size:a,className:n,inputProps:u,...g}=i,d=sn({className:"g-ui-radio-control"},nn({type:"radio",className:o("g-ui-radio-input",k("g-ui-radio-size-",a,"md"),u?.className),...g}),at(r,()=>tt({className:"g-ui-radio-label"},r)));return on({className:o("g-ui-radio",k("g-ui-radio-size-",a,"md"),n)},d,at(t,()=>tt({className:"g-ui-radio-description"},t)))}import{Div as gn}from"@granularjs/core";function ln(...e){let{props:i,children:r}=s(e),{className:t,...a}=i;return gn({...a,className:o("g-ui-stack g-ui-gap-sm",t)},r)}import{Nav as cn,Span as pn}from"@granularjs/core";function dn(...e){let{props:i,children:r}=s(e,{separator:"/"}),{separator:t,className:a,...n}=i,u=[];Array.isArray(r)?u.push(...r):u.push(r);let g=u.filter(Boolean),d=[];return g.forEach((v,m)=>{d.push(v),m<g.length-1&&d.push(pn({className:"g-ui-breadcrumbs-separator"},t))}),cn({...n,className:o("g-ui-breadcrumbs",a)},d)}import{Div as mn}from"@granularjs/core";function fn(...e){let{props:i,children:r}=s(e),{className:t,...a}=i;return mn({...a,className:o("g-ui-center",t)},r)}import{Div as vn}from"@granularjs/core";function hn(...e){let{props:i}=s(e,{size:"md"}),{size:r,className:t,...a}=i;return vn({...a,className:o("g-ui-space",[r,n=>`g-ui-space-${n}`],t)})}import{Div as bn,when as xn}from"@granularjs/core";function wn(...e){let{props:i,children:r}=s(e),{opened:t,className:a,...n}=i;return xn(t,()=>bn({...n,className:o("g-ui-collapse",a)},r))}import{Button as yn}from"@granularjs/core";function Fe(...e){let{props:i,children:r}=s(e,{size:"md",variant:"filled"}),{size:t,variant:a,color:n,className:u,...g}=i;return yn({...g,type:"button",className:o("g-ui-action-icon",k("g-ui-action-icon-size-",t,"md"),k("g-ui-action-icon-color-",n,"primary"),k("g-ui-action-icon-",a,"filled"),u)},r)}import{Div as gr,when as kn,after as zn,state as Nn}from"@granularjs/core";function lr(...e){let{props:i,rawProps:r,children:t}=s(e,{position:"left"}),{opened:a,position:n,content:u,className:g,...d}=i,{onChange:v}=r,m=Nn(c(a)??!1);zn(a).change(x=>{let l=c(x);l!=null&&m.set(!!l)});let h=x=>{m.set(x),v?.(x)};return gr({...d,className:o("g-ui-popover",i.className??g)},gr({onClick:()=>h(!m.get())},t),kn(m,()=>gr({className:o("g-ui-popover-dropdown",n==="right"&&"g-ui-popover-right",n==="center"&&"g-ui-popover-center")},u)))}import{Div as ot}from"@granularjs/core";function Cn(...e){let{props:i,children:r}=s(e,{position:"left"}),{position:t,content:a,className:n,...u}=i;return ot({...u,className:o("g-ui-hover-card",n)},r,ot({className:o("g-ui-hover-card-dropdown",[t,g=>g==="right"?"g-ui-hover-card-right":""],[t,g=>g==="center"?"g-ui-hover-card-center":""])},a))}import{Div as Sn}from"@granularjs/core";function Dn(...e){let{props:i,children:r}=s(e,{position:"bottom-right"}),{position:t,className:a,...n}=i;return Sn({...n,className:o("g-ui-affix",[t,u=>`g-ui-affix-${u}`],a)},r)}import{Fieldset as Pn,Legend as Mn,when as Tn}from"@granularjs/core";function Vn(...e){let{props:i,children:r}=s(e),{legend:t,className:a,...n}=i;return Pn({...n,className:o("g-ui-fieldset",a)},Tn(t,()=>Mn({className:"g-ui-legend"},t)),r)}import{Div as Ln}from"@granularjs/core";function $n(...e){let{props:i,children:r}=s(e,{position:"sticky"}),{position:t,className:a,...n}=i;return Ln({...n,className:o("g-ui-appbar",k("g-ui-appbar-",t,"sticky"),a)},r)}import{Div as cr,portal as In,after as zi,state as nt,when as st}from"@granularjs/core";function Bn(...e){let{props:i,children:r}=s(e,{position:"left",size:"md",blur:!0,fixed:!1,minWidth:"button"});return st(i.fixed,()=>Fn(i,r),()=>An(i,r))}var An=(e,i)=>{let{open:r,onClose:t,position:a,size:n,blur:u,fixed:g,minWidth:d,className:v,...m}=e,h=nt(!1),x=nt(!1),l=220,y=L=>{if(L){h.set(!0),typeof requestAnimationFrame=="function"?requestAnimationFrame(()=>x.set(!0)):setTimeout(()=>x.set(!0),0);return}x.set(!1),setTimeout(()=>h.set(!1),l)};y(!!r.get()),zi(r).change(L=>y(!!L));let z=zi(x,u).compute(L=>{let[D,F]=L;return o("g-ui-sidebar-overlay",D&&"g-ui-sidebar-overlay-open",!F&&"g-ui-sidebar-overlay-noblur")}),B=zi(n,a,x,v).compute(L=>{let[D,F,N,w]=L,b=F==="right"?"g-ui-sidebar-drawer-right g-ui-sidebar-position-right":"g-ui-sidebar-drawer-left";return o("g-ui-sidebar","g-ui-sidebar-drawer",`g-ui-sidebar-size-${D}`,b,N&&"g-ui-sidebar-drawer-open",c(w))});return st(h,()=>In(cr({className:z,onClick:t},cr({className:B,onClick:L=>L.stopPropagation()},i))))},Fn=(e,i)=>{let{open:r,position:t,size:a,minWidth:n,className:u,...g}=e,d=zi(a,t,r,n,u).compute(v=>{let[m,h,x,l,y]=v,z=l||"button",B=null;return z==="button"?B="g-ui-sidebar-min-button":z==="xs"?B="g-ui-sidebar-min-xs":z==="sm"?B="g-ui-sidebar-min-sm":z==="md"&&(B="g-ui-sidebar-min-md"),o("g-ui-sidebar g-ui-sidebar-fixed",`g-ui-sidebar-size-${m||"md"}`,B,x&&"g-ui-sidebar-fixed-open",y)});return cr({...g,className:d},i)};import{Div as Oe,when as ut}from"@granularjs/core";function jn(...e){let{props:i}=s(e,{items:[]}),{items:r,className:t,...a}=i;return Oe({...a,className:o("g-ui-timeline",t)},r.map(n=>Oe({className:"g-ui-timeline-item"},Oe({className:"g-ui-timeline-dot"}),Oe({className:"g-ui-timeline-content"},ut(n.title,()=>Oe({className:"g-ui-timeline-title"},n.title)),ut(n.description,()=>Oe({className:"g-ui-timeline-desc"},n.description)),n.content))))}import{Div as Ni}from"@granularjs/core";function En(...e){let{props:i}=s(e,{active:0,items:[]}),{active:r,items:t,className:a,...n}=i;return Ni({...n,className:o("g-ui-stepper",a)},t.map((u,g)=>Ni({className:o("g-ui-stepper-item",[r,d=>g===d?"g-ui-stepper-active":""])},Ni({className:"g-ui-stepper-index"},String(g+1)),Ni({className:"g-ui-stepper-label"},u.label))))}import{Span as gt,after as lt,state as Rn}from"@granularjs/core";function Hn(...e){let{props:i,rawProps:r}=s(e,{value:0,max:5,size:"md"}),{value:t,max:a,size:n,className:u,...g}=i,{onChange:d}=r,v=Rn(c(t));lt(t).change(l=>{let y=c(l);y!=null&&v.set(y)});let m=l=>{v.set(l),d?.(l)},h=[],x=Number(c(a))||0;for(let l=1;l<=x;l+=1)h.push(l);return gt({...g,className:o("g-ui-rating",k("g-ui-rating-size-",n,"md"),i.className??u)},h.map(l=>gt({className:o("g-ui-rating-item",lt(v).compute(y=>l<=y?"g-ui-rating-item-active":"")),onClick:()=>m(l)},"\u2605")))}import{Span as On}from"@granularjs/core";function qn(...e){let{props:i,children:r}=s(e),{className:t,...a}=i;return On({...a,className:o("g-ui-tag",t)},r)}import{Button as ct,Div as qe,state as pt,after as Ci}from"@granularjs/core";var Yn=["S","M","T","W","T","F","S"];function ii(...e){let{props:i,rawProps:r}=s(e,{size:"md"}),{value:t,className:a,size:n,...u}=i,{onChange:g}=r,d=D=>{let F=c(D);if(F instanceof Date)return F;if(F==null)return null;let N=new Date(F);return Number.isNaN(N.getTime())?null:N},v=pt(d(t)??new Date),m=pt(new Date(v.get()));Ci(t).change(D=>{let F=d(D);F!=null&&(v.set(F),m.set(new Date(F)))});let h=(D,F,N)=>{let w=new Date(D,F+1,0).getDate();return new Date(D,F,Math.min(N,w))},x=D=>{let F=m.get(),N=h(F.getFullYear(),F.getMonth(),D);v.set(N),m.set(N),g?.(N)},l=D=>{let F=m.get(),N=h(F.getFullYear(),F.getMonth()+D,F.getDate());m.set(N)},y=D=>{let F=m.get(),N=h(F.getFullYear()+D,F.getMonth(),F.getDate());m.set(N)},z=Ci(m).compute(D=>D.toLocaleString("default",{month:"long"})),B=Ci(m).compute(D=>String(D.getFullYear())),L=Ci(m,v).compute(([D,F])=>{let N=D.getFullYear(),w=D.getMonth(),f=new Date(N,w,1).getDay(),S=new Date(N,w+1,0).getDate(),V=[];for(let I=0;I<f;I+=1)V.push({muted:!0,label:""});for(let I=1;I<=S;I+=1)V.push({label:I});return[...Yn.map(I=>qe({className:"g-ui-calendar-cell g-ui-calendar-cell-muted"},I)),...V.map(I=>qe({className:o("g-ui-calendar-cell",I.muted&&"g-ui-calendar-cell-muted",I.label&&F.getFullYear()===N&&F.getMonth()===w&&I.label===F.getDate()&&"g-ui-calendar-cell-active"),onClick:()=>I.label&&x(I.label)},I.label))]});return qe({...u,className:o("g-ui-calendar",a,k("g-ui-calendar-size-",n,"md"))},qe({className:"g-ui-calendar-header"},Fe({size:"xs",variant:"subtle",className:"g-ui-calendar-nav",onClick:()=>l(-1)},ye({size:"sm",className:"g-ui-calendar-nav-icon",innerHTML:mi})),qe({className:"g-ui-calendar-title-group"},ct({type:"button",className:"g-ui-calendar-title-button",onClick:()=>l(1)},z),ct({type:"button",className:"g-ui-calendar-title-button",onClick:()=>y(1)},B)),Fe({size:"xs",variant:"subtle",className:"g-ui-calendar-nav",onClick:()=>l(1)},ye({size:"sm",className:"g-ui-calendar-nav-icon",innerHTML:di}))),qe({className:"g-ui-calendar-grid"},L))}import{Div as ri,Span as Ye,Input as Wn,when as pr,after as ke,state as Si}from"@granularjs/core";function Gn(...e){let{props:i,rawProps:r}=s(e,{data:[],size:"md",searchable:!0}),{value:t,data:a,size:n,className:u,placeholder:g,searchable:d,...v}=i,{onChange:m,onSearchChange:h}=r,x=Si(c(t)??[]),l=Si(""),y=Si(!1),z=Si(null),B=f=>(c(f)??[]).map(V=>typeof V=="string"?{value:V,label:V}:V&&typeof V=="object"?V:{value:String(V),label:String(V)});ke(t).change(f=>{let S=c(f);S!=null&&x.set(S)});let L=null;ke(y).change(f=>{if(L&&(L(),L=null),!f)return;let S=V=>{let I=z.get();I&&(I.contains(V.target)||y.set(!1))};document.addEventListener("mousedown",S),L=()=>document.removeEventListener("mousedown",S)}),ke(l).change(f=>{h?.(f)});let D=f=>{let S=x.get()??[],V=S.includes(f)?S.filter(I=>I!==f):S.concat(f);x.set(V),m?.(V)},F=ke(a).compute(f=>B(f)),N=ke(F,l).compute(([f,S])=>{let V=String(c(S)??"").toLowerCase().trim();return V?f.filter(I=>String(I.label??"").toLowerCase().includes(V)):f}),w=ke(x,l).compute(([f,S])=>{let V=c(f)??[],I=String(c(S)??"");return!V.length&&!I}),b=ke(d).compute(f=>!!f);return ri({...v,node:z,className:o("g-ui-select-multi-root",u)},ri({className:o("g-ui-select-multi",k("g-ui-select-multi-size-",n,"md")),onClick:()=>y.set(!0)},ke(F,x).compute(([f,S])=>(c(S)??[]).map(I=>{let te=(f??[]).find(re=>re.value===I)?.label??I;return Ye({className:"g-ui-select-tag"},Ye({className:"g-ui-select-tag-label",onClick:re=>{re?.stopPropagation?.()}},te),Ye({className:"g-ui-select-tag-remove",innerHTML:Re,onClick:re=>{re?.stopPropagation?.(),D(I)}}))})),pr(w,()=>Ye({className:"g-ui-select-multi-placeholder"},g??"Select...")),pr(b,()=>Wn({className:"g-ui-select-multi-input",value:l,onInput:f=>l.set(f.target?.value??""),onFocus:()=>y.set(!0)}))),pr(y,()=>ri({className:"g-ui-select-dropdown"},ke(N).compute(f=>f.length?f.map(S=>ri({className:o("g-ui-select-item",S.disabled&&"g-ui-select-item-disabled",ke(x).compute(V=>(c(V)??[]).includes(S.value)?"g-ui-select-item-active":"")),onClick:()=>{S.disabled||D(S.value)}},Ye({className:"g-ui-select-item-check",innerHTML:ke(x).compute(V=>(c(V)??[]).includes(S.value)?fi:"")}),Ye({className:"g-ui-select-item-label"},S.label))):ri({className:"g-ui-select-item"},"Nothing found")))))}import{Div as ti,when as dt}from"@granularjs/core";function Zn(...e){let{props:i}=s(e,{items:[]}),{items:r,className:t,onClose:a,timeout:n,...u}=i;return ti({...u,className:o("g-ui-toast-stack",t)},r.map(g=>ti({className:o("g-ui-toast",[n,"g-ui-toast-auto"])},ti({className:"g-ui-toast-row"},dt(g.title,()=>ti({className:"g-ui-toast-title"},g.title)),dt(a,()=>ti({className:"g-ui-toast-close",onClick:()=>a(g)},"\xD7"))),g.message)))}function Un(...e){let{props:i}=s(e);return ii(i)}import{Div as Xn,after as _n}from"@granularjs/core";function Kn(...e){let{props:i,rawProps:r}=s(e,{items:[],position:"top-right"}),{items:t,position:a,className:n,...u}=i,{onRemove:g}=r,d=new Map,v=(h,x)=>h?.id??h?.key??x,m=_n(t).compute(h=>{let x=c(h)??[],l=new Set;x.forEach((y,z)=>{let B=v(y,z);if(l.add(B),y?.autoClose&&!d.has(B)){let L=setTimeout(()=>{d.delete(B),g?.(y)},y.autoClose);d.set(B,L)}});for(let[y,z]of d.entries())l.has(y)||(clearTimeout(z),d.delete(y));return x.map((y,z)=>er({key:v(y,z),title:y.title,color:y.color,icon:y.icon,loading:y.loading,withCloseButton:y.withCloseButton,withBorder:y.withBorder,onClose:()=>{y.onClose?.(),g?.(y)}},y.message??y.body??y.content??y.text))});return Xn({...u,className:o("g-ui-notifications",k("g-ui-notifications-position-",a,"top-right"),n)},m)}import{Div as We,after as ai,state as Qn,when as Jn}from"@granularjs/core";function es(...e){let{props:i,rawProps:r}=s(e,{min:0,max:100,step:1,size:"md"}),{value:t,marks:a,min:n,max:u,step:g,size:d,disabled:v,className:m,...h}=i,{onChange:x}=r,l=Qn(c(t??[n,u])),y=()=>{let w=Number(c(n)),b=Number(c(u));return!Number.isFinite(w)||!Number.isFinite(b)?{minValue:0,maxValue:100}:{minValue:Math.min(w,b),maxValue:Math.max(w,b)}},z=()=>{let w=Number(c(g));return Number.isFinite(w)&&w>0?w:1},B=w=>{let{minValue:b,maxValue:f}=y(),S=z(),V=[b,f];Array.isArray(w)&&(V=w);let I=Math.max(b,Math.min(f,Number(V[0]))),X=Math.max(b,Math.min(f,Number(V[1]))),te=Math.round(Math.min(I,X)/S)*S,re=Math.round(Math.max(I,X)/S)*S;return[te,re]};ai(t).change(w=>{w!=null&&l.set(B(w))});let L=w=>{let b=B(w);b?.[0]===l.get()?.[0]&&b?.[1]===l.get()?.[1]||(l.set(b),x?.(b))},D=ai(l).compute(w=>{let{minValue:b,maxValue:f}=y(),S=f-b,[V,I]=B(w);if(S<=0)return{lowPct:0,highPct:0};let X=(V-b)/S*100,te=(I-b)/S*100;return{lowPct:Math.max(0,Math.min(100,X)),highPct:Math.max(0,Math.min(100,te))}}),F=(w,b,f)=>{let S=b?.();if(!S||S.width===0)return;let I=Math.min(Math.max(w.clientX-S.left,0),S.width)/S.width,{minValue:X,maxValue:te}=y(),re=X+I*(te-X),ae=l;typeof l.get=="function"&&(ae=l.get());let[K,ne]=B(ae);L(f==="low"?[re,ne]:[K,re])},N=(w,b,f)=>{if(be(v))return;w.preventDefault?.();let S=f||w.currentTarget,V=()=>S.getBoundingClientRect(),I=V(),X=D;typeof D.get=="function"&&(X=D.get());let{lowPct:te,highPct:re}=X,ae=(w.clientX-I.left)/I.width*100,K=b;if(!K){let ie=Math.abs(ae-te)<=Math.abs(ae-re);K="high",ie&&(K="low")}S.setPointerCapture?.(w.pointerId),F(w,V,K);let ne=ie=>F(ie,V,K),me=()=>{S.releasePointerCapture?.(w.pointerId),window.removeEventListener("pointermove",ne),window.removeEventListener("pointerup",me)};window.addEventListener("pointermove",ne),window.addEventListener("pointerup",me)};return We({...h,className:o("g-ui-range-slider",k("g-ui-slider-size-",d,"md"),W("g-ui-slider-disabled",v),i.className??m)},We({className:"g-ui-slider-track",onPointerDown:w=>N(w)},We({className:"g-ui-slider-bar",style:ai(D).compute(({lowPct:w,highPct:b})=>({left:`${w}%`,width:`${Math.max(0,b-w)}%`}))}),We({className:"g-ui-slider-thumb",style:ai(D).compute(({lowPct:w})=>({left:`${w}%`})),onPointerDown:w=>{w.stopPropagation?.(),N(w,"low",w.currentTarget.parentElement)}}),We({className:"g-ui-slider-thumb",style:ai(D).compute(({highPct:w})=>({left:`${w}%`})),onPointerDown:w=>{w.stopPropagation?.(),N(w,"high",w.currentTarget.parentElement)}})),Jn(a,()=>We({className:"g-ui-slider-marks"},a.map(w=>nr({mark:w,getBounds:y})))))}import{state as dr,after as mt}from"@granularjs/core";function is(...e){let{props:i,rawProps:r}=s(e,{size:"md",format:{pattern:"dddd-dd-dd"}}),{value:t,size:a,calendarSize:n,leftSection:u,rightSection:g,className:d,format:v,minDate:m,maxDate:h,...x}=i,{onChange:l}=r,y=b=>{let f=c(b);if(f instanceof Date)return f;if(f==null||f==="")return null;let S=new Date(f);return Number.isNaN(S.getTime())?null:S},z=(b,f)=>b&&f&&b.getFullYear()===f.getFullYear()&&b.getMonth()===f.getMonth()&&b.getDate()===f.getDate(),B=b=>{if(!b)return"";let f=String(b.getFullYear()).padStart(4,"0"),S=String(b.getMonth()+1).padStart(2,"0"),V=String(b.getDate()).padStart(2,"0");return`${f}-${S}-${V}`},L=b=>{let f=String(b??"").replace(/\D/g,"");if(f.length<8)return null;let S=Number(f.slice(0,4)),V=Number(f.slice(4,6)),I=Number(f.slice(6,8));if(!S||!V||!I)return null;let X=new Date(S,V-1,I);if(X.getFullYear()!==S||X.getMonth()!==V-1||X.getDate()!==I)return null;let te=y(m);if(te&&X<te)return null;let re=y(h);return re&&X>re?null:X},D=dr(y(t)),F=dr(B(D.get())),N=dr(!1);mt(t).change(b=>{if(t.get()==b)return;let f=y(b);if(f==null){D.set(null),F.set("");return}D.set(f),F.set(B(f))}),mt(F).change(b=>{let f=L(b);console.log("parsed",f),console.log("currentDate",D.get()),f&&(z(f,D.get())||(D.set(f),l?.(f)))});let w=b=>{b&&(z(b,D.get())||(D.set(b),F.set(B(b)),l?.(b),N.set(!1)))};return lr({opened:N,onChange:b=>N.set(!!b),content:ii({size:k("",n,"xs"),value:D,onChange:w}),className:"g-ui-date-input-popover"},ge({...x,size:a,className:o("g-ui-dateinput",d),leftSection:u,rightSection:g,type:"text",inputMode:"numeric",format:v,value:F,onChange:b=>F.set(b)}))}import{Div as mr,when as rs,after as ts,state as as}from"@granularjs/core";function os(...e){let{props:i,rawProps:r,children:t}=s(e),{opened:a,content:n,className:u,...g}=i,{onChange:d}=r,v=as(c(a)??!1);ts(a).change(h=>{let x=c(h);x!=null&&v.set(!!x)});let m=h=>{v.set(h),d?.(h)};return mr({...g,className:o("g-ui-popper",u)},mr({onClick:()=>m(!v.get())},t),rs(v,()=>mr({className:"g-ui-popper-dropdown"},n)))}import{Button as ns,after as ft,when as ss,state as us}from"@granularjs/core";function gs(...e){let{props:i,rawProps:r}=s(e,{size:"md"}),{size:t,className:a,rightSection:n,...u}=i,{onChange:g}=r,d=us(!1),v=ft(d).compute(h=>h?"text":"password"),m=ft(n).compute(h=>h??ns({className:"g-ui-password-toggle",onClick:()=>d.set(!d.get())},ss(d,()=>"Hide",()=>"Show")));return ge({...u,size:t,className:a,onChange:g,rightSection:m,type:v})}import{Div as ls}from"@granularjs/core";function cs(...e){let{props:i}=s(e,{size:"md"}),{size:r,className:t,...a}=i;return ge({...a,size:r,className:t,leftSection:ls({className:"g-ui-search-input-left-section",innerHTML:Ar}),type:"text",inputMode:"search"})}import{Button as ps,after as ds,when as vt}from"@granularjs/core";import{state as ms}from"@granularjs/core";function fs(...e){let{props:i,children:r}=s(e,{value:"",timeout:1500}),{value:t,timeout:a,className:n,...u}=i,g=ms(!1),d=ds(g).compute(m=>o("g-ui-copy-button",m&&"g-ui-copy-button-done",n));return ps({...u,className:d,onClick:async()=>{try{await navigator.clipboard.writeText(String(t)),g.set(!0),setTimeout(()=>g.set(!1),a)}catch{}},type:"button"},vt(r?.length,()=>r,()=>vt(g,()=>"Copied",()=>"Copy")))}import{Div as vs}from"@granularjs/core";function hs(...e){let{props:i}=s(e,{size:"md"}),{size:r,className:t,...a}=i;return vs({...a,className:o("g-ui-progress-ring",[r,n=>`g-ui-progress-ring-size-${n}`],t)})}import{Div as fr,Button as bs,when as ht}from"@granularjs/core";function xs(...e){let{props:i,children:r}=s(e),{title:t,onClose:a,className:n,...u}=i;return fr({...u,className:o("g-ui-toast",n)},fr({className:"g-ui-toast-row"},ht(t,()=>fr({className:"g-ui-toast-title"},t)),ht(a,()=>bs({className:"g-ui-toast-close",onClick:a},"\xD7"))),r)}import{Div as vr}from"@granularjs/core";import{state as ws}from"@granularjs/core";function ys(...e){let{props:i,rawProps:r}=s(e,{data:[]}),{data:t,className:a,...n}=i,{onChange:u}=r,g=ws(""),d=t.filter(v=>String(v.label||"").toLowerCase().includes(String(g.get()).toLowerCase()));return vr({...n,className:o("g-ui-select-search",a)},ge({inputClassName:"g-ui-select-search-input",placeholder:"Search...",value:g,onInput:v=>g.set(v?.target?.value??"")}),vr({className:"g-ui-select-search-list"},d.map(v=>vr({className:"g-ui-select-search-item",onClick:()=>u?.(v.value)},v.label))))}import{Div as ks}from"@granularjs/core";function zs(...e){let{props:i,children:r}=s(e),{className:t,...a}=i;return ks({...a,className:o("g-ui-switch-group",t)},r)}import{Div as Ns,state as Cs,after as hr}from"@granularjs/core";function Ss(...e){let{props:i,rawProps:r}=s(e,{size:"md"}),{value:t,size:a,className:n,...u}=i,{onChange:g}=r,d=Cs(c(t)??["",""]);hr(t).change(m=>{let h=c(m);h!=null&&d.set(h)});let v=m=>{d.set(m),g?.(m)};return Ns({...u,className:o("g-ui-range-picker",i.className??n)},ge({size:a,type:"text",inputMode:"numeric",value:hr(d).compute(m=>m?.[0]??""),onInput:m=>{let h=d.get()??["",""];v([m.target.value,h[1]])}}),ge({size:a,type:"text",inputMode:"numeric",value:hr(d).compute(m=>m?.[1]??""),onInput:m=>{let h=d.get()??["",""];v([h[0],m.target.value])}}))}import{Div as Ds}from"@granularjs/core";function Ps(...e){let{props:i,children:r}=s(e,{align:"center",direction:"row"}),{direction:t,wrap:a,align:n,justify:u,gap:g,className:d,...v}=i;return Ds({...v,className:o("g-ui-flex",[t,m=>m==="column"?"g-ui-flex-column":"g-ui-flex-row"],[a,"g-ui-flex-wrap"],[n,m=>m&&`g-ui-align-${m}`],[u,m=>m&&`g-ui-justify-${m}`],[g,m=>m&&`g-ui-gap-${m}`],d)},r)}import{A as Ms,Div as oi,Span as bt,when as ni,after as xt,state as Ts}from"@granularjs/core";function Vs(...e){let{props:i,rawProps:r,children:t}=s(e,{variant:"subtle",childrenOffset:24}),{label:a,description:n,leftSection:u,rightSection:g,active:d,disabled:v,variant:m,childrenOffset:h,opened:x,defaultOpened:l,className:y,padding:z,...B}=i,{onClick:L,onChange:D}=r,F=t.length>0,N=Ts(c(x)??c(l)??!1);xt(x).change(f=>{let S=c(f);S!=null&&N.set(!!S)});let w=xt(h).compute(f=>({paddingLeft:Tr(c(f??24))??"24px"})),b=f=>{if(c(v)){f?.preventDefault?.();return}if(F){let S=!N.get();N.set(S),D?.(S)}L?.(f)};return oi({className:o("g-ui-navlink-root",y)},Ms({...B,className:o("g-ui-navlink",k("g-ui-navlink-variant-",m,"subtle"),W("g-ui-navlink-active",d),W("g-ui-navlink-disabled",v),k("g-ui-navlink-padding-",z,"md")),onClick:b},ni(u,()=>bt({className:"g-ui-navlink-section g-ui-navlink-left"},u)),oi({className:"g-ui-navlink-body"},ni(a,()=>oi({className:"g-ui-navlink-label"},a)),ni(n,()=>oi({className:"g-ui-navlink-description"},n))),ni(g,()=>bt({className:"g-ui-navlink-section g-ui-navlink-right"},g))),F?ni(N,()=>oi({className:"g-ui-navlink-children",style:w},t)):null)}import{Div as wt,when as Ls}from"@granularjs/core";function $s(...e){let{props:i,children:r}=s(e,{show:!0,position:"top-right",color:"danger",size:"md"}),{show:t,position:a,color:n,size:u,className:g,...d}=i;return wt({...d,className:o("g-ui-indicator",k("g-ui-indicator-position-",a,"top-right"),k("g-ui-indicator-color-",n,"danger"),k("g-ui-indicator-size-",u,"md"),g)},r,Ls(t,()=>wt({className:"g-ui-indicator-badge"})))}import{Span as Di}from"@granularjs/core";function Is(...e){let{props:i}=s(e),{opened:r,className:t,...a}=i;return Di({...a,className:o("g-ui-burger",[r,"g-ui-burger-open"],t)},Di(""),Di(""),Di(""))}import{Div as Bs,when as As}from"@granularjs/core";function Fs(...e){let{props:i}=s(e),{visible:r,...t}=i;return As(r,()=>Bs({...t,className:"g-ui-loading-overlay"},Ke({})))}import{Div as js}from"@granularjs/core";function Es(...e){let{props:i,children:r}=s(e,{gap:"md"}),{className:t,gap:a,...n}=i;return js({...n,className:o("g-ui-grid-system",[a,u=>`g-ui-gap-${u}`],t)},r)}import{Div as Rs}from"@granularjs/core";function Hs(...e){let{props:i,children:r}=s(e,{span:12}),{span:t,className:a,...n}=i;return Rs({...n,className:o([t,u=>`g-ui-col-span-${u}`],a)},r)}import{Div as Os}from"@granularjs/core";function qs(...e){let{props:i,children:r}=s(e,{size:"md"}),{size:t,className:a,...n}=i;return Os({...n,className:o("g-ui-scroll-area",[t,u=>`g-ui-scroll-area-${u}`],a)},r)}import{Div as yt,Input as Ys,after as Me,state as br,when as kt,list as Ws}from"@granularjs/core";function Gs(...e){let{props:i,rawProps:r}=s(e,{length:4,size:"md",type:"alphanumeric",mask:!1,placeholder:"\u25CB",disabled:!1,error:!1,oneTimeCode:!1}),{length:t,value:a,size:n,type:u,mask:g,placeholder:d,disabled:v,error:m,oneTimeCode:h,className:x}=i,{onChange:l,onComplete:y}=r,z=br(c(t)??4),B=()=>z.get();Me(t).change(T=>{let R=c(T)??4,C=z.get();if(R===C)return;z.set(R);let G=D.get(),H=L.get();D.set(Array.from({length:R},(se,ue)=>G[ue]??"")),L.set(Array.from({length:R},(se,ue)=>H[ue]??null))});let L=br(Array.from({length:B()},()=>null)),D=br(Array.from({length:B()},(T,R)=>{let C=c(a);return typeof C=="string"||Array.isArray(C)?C[R]??"":""}));Me(a).change(T=>{if(T==null)return;let R=B();typeof T=="string"?D.set(Array.from({length:R},(C,G)=>T[G]??"")):Array.isArray(T)&&D.set(Array.from({length:R},(C,G)=>T[G]??""))});let F=()=>D.get().join(""),N=T=>{D.set(T);let R=T.join("");l?.(R),T.every(C=>C!=="")&&T.length===B()&&y?.(R)},w=T=>{let R=B(),C=L.get();T>=0&&T<R&&C[T]&&(C[T].focus(),C[T].select())},b=()=>{let T=c(u);return T==="number"?/^[0-9]$/:T instanceof RegExp?T:/^[a-zA-Z0-9]$/},f=(T,R)=>{let C=R.target.value,G=b();if(C.length>1){S(T,C);return}if(C&&!G.test(C)){R.target.value=D.get()[T]??"";return}let H=D.get().slice();H[T]=C,N(H),C&&T<B()-1&&w(T+1)},S=(T,R)=>{let C=b(),G=R.split("").filter(he=>C.test(he)),H=D.get().slice(),se=B();G.forEach((he,ze)=>{let Se=T+ze;Se<se&&(H[Se]=he)}),N(H);let ue=H.findIndex((he,ze)=>ze>=T&&he==="");ue>=0?w(ue):w(Math.min(T+G.length,se-1))},V=(T,R)=>{if(R.key==="Backspace"){let C=D.get().slice();C[T]===""&&T>0?(R.preventDefault(),C[T-1]="",N(C),w(T-1)):C[T]!==""&&(C[T]="",N(C))}else R.key==="ArrowLeft"&&T>0?(R.preventDefault(),w(T-1)):R.key==="ArrowRight"&&T<B()-1&&(R.preventDefault(),w(T+1))},I=(T,R)=>{R.target.select()},X=()=>{let T=D.get(),R=T.findIndex(C=>C==="");R>=0?w(R):w(T.length-1)},te=Me(g).compute(T=>c(T)?"password":"text"),re=Me(u).compute(T=>c(T)==="number"?"numeric":"text"),ae=Me(h).compute(T=>c(T)?"one-time-code":"off"),K=Me(v).compute(T=>!!c(T)),ne=Me(m).compute(T=>!!c(T)),me=Me(z).compute(T=>Array.from({length:T},(R,C)=>C)),ie=T=>Ys({className:o("g-ui-pin-input-field",kt(ne,()=>"g-ui-pin-input-error")),type:te,inputMode:re,autocomplete:ae,maxLength:2,placeholder:kt(K,()=>"",()=>d),disabled:K,value:Me(D,T).compute(([R,C])=>R[C]??""),node:L[T.get()],onInput:R=>f(T.get(),R),onChange:R=>f(T.get(),R),onKeyDown:R=>V(T.get(),R),onFocus:R=>I(T.get(),R)});return yt({className:o("g-ui-pin-input",k("g-ui-input-size-",n,"md"),x),onClick:X},yt({className:"g-ui-pin-input-wrapper"},Ws(me,ie)))}import{Div as Zs}from"@granularjs/core";function Us(...e){let{props:i,children:r}=s(e),{className:t,...a}=i;return Zs({...a,className:o("g-ui-checkbox-group",t)},r)}import{Div as Xs}from"@granularjs/core";function _s(...e){let{props:i,children:r}=s(e),{className:t,...a}=i;return Xs({...a,className:o("g-ui-avatar-group",t)},r)}import{Div as Ks}from"@granularjs/core";function Qs(...e){let{props:i,children:r}=s(e),{className:t,...a}=i;return Ks({...a,className:o("g-ui-badge-group",t)},r)}import{Div as Pi,Span as Js,after as si,context as zt}from"@granularjs/core";var eu=zt([]),Nt=zt({sort:null,onSort:null});function xr(...e){let{props:i,rawProps:r,children:t}=s(e,{sizes:[],sort:null,stickyHeader:!1}),{className:a,sizes:n,sort:u,stickyHeader:g,...d}=i,{onSort:v}=r,m=eu.scope(n.get());si(n).change(x=>m.set(x));let h=Nt.scope({sort:u.get(),onSort:v||null});return si(u).change(x=>h.set().sort=x),m.serve(h.serve(Pi({className:o("g-ui-grid-table",W("g-ui-grid-table-sticky",g),a),style:{gridTemplateColumns:si(m).compute(x=>Array.isArray(x)?x.join(" "):"")},...d},t)))}xr.GridRow=(...e)=>{let{props:i,children:r}=s(e,{}),{className:t,header:a,...n}=i;return Pi({className:o("g-ui-grid-table-row",W("g-ui-grid-table-row-header",a),t),...n},...r)};xr.GridCell=function(...e){let{props:i,rawProps:r,children:t}=s(e,{}),{className:a,sort:n,...u}=i,g=r.sort;if(g){let d=Nt.state(),v=si(d.sort).compute(h=>h?.key===g?h.direction:null),m=()=>{let h=d.get().sort,x;h?.key===g?x=h.direction==="asc"?{key:g,direction:"desc"}:null:x={key:g,direction:"asc"},d.set().sort=x;let{onSort:l}=d.get();l&&l(x)};return Pi({className:o("g-ui-grid-table-cell","g-ui-grid-table-cell-sortable",a),onClick:m,...u},t,Js({className:"g-ui-grid-table-sort-icon"},si(v).compute(h=>h==="asc"?" \u2191":h==="desc"?" \u2193":"")))}return Pi({className:o("g-ui-grid-table-cell",a),...u},t)};import{Button as iu,Div as ru,Span as Ct,when as St}from"@granularjs/core";function Dt(...e){let{props:i,children:r}=s(e,{grow:!0}),{grow:t,className:a,...n}=i;return ru({...n,className:o("g-ui-bottombar",W("g-ui-bottombar-grow",t),a)},r)}Dt.Action=function(...i){let{props:r,rawProps:t,children:a}=s(i,{variant:"subtle"}),{icon:n,label:u,active:g,disabled:d,variant:v,className:m,...h}=r,{onClick:x}=t;return iu({...h,className:o("g-ui-bottombar-action",k("g-ui-bottombar-action-variant-",v,"subtle"),W("g-ui-bottombar-action-active",g),W("g-ui-bottombar-action-disabled",d),m),onClick:x,disabled:d},St(n,()=>Ct({className:"g-ui-bottombar-action-icon"},n)),St(u,()=>Ct({className:"g-ui-bottombar-action-label"},u)),a)};import{Div as j,Button as je,state as le,after as xe,when as ce,Input as Mi,Label as ui,Span as Ee}from"@granularjs/core";var tu=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],au=[{value:"day",label:"Day"},{value:"week",label:"Week"},{value:"month",label:"Month"}];function Ti(e){if(e instanceof Date)return e;if(e==null)return null;let i=new Date(e);return Number.isNaN(i.getTime())?null:i}function Tt(e){let i=Ti(e.start),r=Ti(e.end);return!i||!r?null:{...e,id:e.id??`${i.getTime()}-${e.title??"event"}`,title:e.title??"",start:i,end:r,allDay:!!e.allDay,description:e.description??"",location:e.location??"",attendees:Array.isArray(e.attendees)?e.attendees:[],color:e.color??null}}function Vt(e,i,r){let t=Ti(i).getTime(),a=Ti(r).getTime();return e.map(Tt).filter(Boolean).filter(n=>n.end.getTime()>t&&n.start.getTime()<a)}function Pt(e,i){let r=new Date(i);r.setHours(0,0,0,0);let t=r.getTime();r.setHours(23,59,59,999);let a=r.getTime();return Vt(e,t,a)}function wr(e,i){let r=new Date(e),a=(r.getDay()-i+7)%7;return r.setDate(r.getDate()-a),r.setHours(0,0,0,0),r}function Ge(e,i="default"){return e.toLocaleTimeString(i,{hour:"numeric",minute:"2-digit",hour12:!0})}function gi(e,i="default"){return e.toLocaleDateString(i,{weekday:"short",month:"short",day:"numeric"})}function ou(e,i="default"){return e.toLocaleDateString(i,{month:"long",year:"numeric"})}function nu(e,i="default"){let r=new Date(e);return r.setDate(r.getDate()+6),`${e.toLocaleDateString(i,{month:"short",day:"numeric"})} \u2013 ${r.toLocaleDateString(i,{month:"short",day:"numeric",year:"numeric"})}`}function Mt(e,i,r,t){let a=new Date(e).setHours(r,0,0,0),n=new Date(e).setHours(t,0,0,0),u=(t-r)*60,g=Math.max(e.getTime(),a),v=(Math.min(i.getTime(),n)-g)/6e4,m=(g-a)/6e4/u*100,h=v/u*100;return{top:m,height:h}}function su(...e){let{props:i,rawProps:r}=s(e,{defaultView:"month",firstDayOfWeek:0,locale:"default",hourSlotDuration:30,minTime:6,maxTime:22,eventCreationColorOptions:[]}),{events:t=[],defaultView:a,firstDayOfWeek:n,locale:u,hourSlotDuration:g,minTime:d,maxTime:v,eventCreationColorOptions:m,className:h,...x}=i,{onCreateEventRequest:l,onViewEventRequest:y,onUpdateEventRequest:z,onRemoveEventRequest:B,eventCreationEmailLookup:L,eventCreationLocationsCallback:D,eventCreationCalendarsCallback:F,onSlotClick:N,onDateRangeChange:w}=r,b=le(c(a)??"month"),f=le(new Date),S=le(null),V=le(null),I=le({title:"",start:null,end:null,allDay:!1,description:"",location:"",attendees:[],color:null}),X=xe(t).compute(p=>Array.isArray(p)?p:[]),te=f.get(),re=wr(te,c(n)??0),ae=c(d)??6,K=c(v)??22,ne=c(g)??30,me=()=>{let p=new Date(f.get());b.get()==="month"?p.setMonth(p.getMonth()-1):b.get()==="week"?p.setDate(p.getDate()-7):p.setDate(p.getDate()-1),f.set(p),w?.({start:p,end:p,view:b.get()})},ie=()=>{let p=new Date(f.get());b.get()==="month"?p.setMonth(p.getMonth()+1):b.get()==="week"?p.setDate(p.getDate()+7):p.setDate(p.getDate()+1),f.set(p),w?.({start:p,end:p,view:b.get()})},T=()=>{let p=new Date;f.set(p),w?.({start:p,end:p,view:b.get()})},R=(p,A,oe=!1)=>{let q=p?new Date(p):new Date(f.get()),J=A?new Date(A):new Date(q.getTime()+3600*1e3);oe&&(q.setHours(0,0,0,0),J.setHours(23,59,59,999)),I.set({title:"",start:q,end:J,allDay:oe,description:"",location:"",attendees:[],color:null}),S.set("create")},C=p=>{V.set(Tt(p)),S.set("view"),y?.(p)},G=()=>{let p=V.get();p&&(I.set({title:p.title,start:new Date(p.start),end:new Date(p.end),allDay:p.allDay,description:p.description??"",location:p.location??"",attendees:[...p.attendees||[]],color:p.color??null}),S.set("edit"))},H=()=>{S.set(null),V.set(null)},se=(p,A,oe)=>{if(N){N({date:p,hour:A,allDay:oe});return}let q=new Date(p);if(oe){q.setHours(0,0,0,0);let J=new Date(q);J.setHours(23,59,59,999),R(q,J,!0)}else{q.setHours(A,0,0,0);let J=new Date(q.getTime()+ne*60*1e3);R(q,J,!1)}},ue=()=>{let p=I.get();!p.start||!p.end||l?.({title:p.title,start:p.start,end:p.end,allDay:p.allDay,description:p.description,location:p.location,attendees:p.attendees,color:p.color},()=>{H()})},he=()=>{let p=V.get(),A=I.get();!p||!A.start||!A.end||z?.(p,{title:A.title,start:A.start,end:A.end,allDay:A.allDay,description:A.description,location:A.location,attendees:A.attendees,color:A.color},()=>H())},ze=()=>{let p=V.get();p&&B?.(p,()=>H())},Se=xe(b,f).compute(([p,A])=>p==="month"?ou(A,c(u)):p==="week"?nu(wr(A,c(n)??0),c(u)):gi(A,c(u))),Ve=j({className:"g-ui-event-calendar-header"},j({className:"g-ui-event-calendar-nav-group"},Fe({size:"sm",variant:"subtle",onClick:me,className:"g-ui-event-calendar-nav"},ye({size:"sm",innerHTML:mi})),Fe({size:"sm",variant:"subtle",onClick:ie,className:"g-ui-event-calendar-nav"},ye({size:"sm",innerHTML:di})),je({type:"button",variant:"subtle",size:"sm",className:"g-ui-event-calendar-today",onClick:T},ye({size:"sm",className:"g-ui-event-calendar-today-icon",innerHTML:Rr}),"Today")),j({className:"g-ui-event-calendar-title"},Se),j({className:"g-ui-event-calendar-actions"},au.map(p=>j({className:o("g-ui-event-calendar-view-option",xe(b).compute(A=>A===p.value?"g-ui-event-calendar-view-option-active":"")),onClick:()=>{b.set(p.value),w?.({start:f.get(),end:f.get(),view:p.value})}},p.label)),je({type:"button",variant:"filled",size:"sm",className:"g-ui-event-calendar-create-btn",onClick:()=>R(f.get(),null,!1)},ye({size:"sm",innerHTML:Fr}),"Create"))),li=xe(f,X,n).compute(([p,A,oe])=>{let q=p.getFullYear(),J=p.getMonth(),Q=(new Date(q,J,1).getDay()-(oe??0)+7)%7,Ce=new Date(q,J+1,0).getDate(),De=new Date(q,J,0).getDate(),M=[],P=1,E=1,O=Math.ceil((Q+Ce)/7)*7,_=[];for(let Z=0;Z<O;Z+=1){let Y,U,ee;Z<Q?(Y=De-Q+Z+1,ee=new Date(q,J-1,Y),U=!1):P<=Ce?(Y=P,ee=new Date(q,J,Y),U=!0,P+=1):(Y=E,ee=new Date(q,J+1,Y),U=!1,E+=1);let fe=Pt(A,ee),Te=ee.getDate()===new Date().getDate()&&ee.getMonth()===new Date().getMonth()&&ee.getFullYear()===new Date().getFullYear();_.push(j({key:ee.getTime(),className:o("g-ui-event-calendar-month-cell",!U&&"g-ui-event-calendar-month-cell-outside",Te&&"g-ui-event-calendar-month-cell-today")},j({className:"g-ui-event-calendar-month-cell-header",onClick:()=>se(ee,0,!0)},Ee({className:"g-ui-event-calendar-month-cell-day"},ee.getDate())),j({className:"g-ui-event-calendar-month-cell-events"},fe.slice(0,3).map(we=>j({key:we.id,className:"g-ui-event-calendar-month-event",style:we.color?{borderLeftColor:we.color,backgroundColor:`${we.color}20`}:{},onClick:Bi=>{Bi.stopPropagation(),C(we)}},we.title||"(No title)")),ce(fe.length>3,()=>j({className:"g-ui-event-calendar-month-more",onClick:we=>{we.stopPropagation(),C(fe[3])}},`+${fe.length-3} more`)))))}return _}),Vi=j({className:"g-ui-event-calendar-month"},j({className:"g-ui-event-calendar-weekdays"},tu.map(p=>j({key:p,className:"g-ui-event-calendar-weekday"},p))),j({className:"g-ui-event-calendar-month-grid"},li)),Ne=[];for(let p=ae;p<K;p+=1)for(let A=0;A<60;A+=ne)Ne.push(p+A/60);let Ze=xe(f,n).compute(([p,A])=>{let oe=wr(p,A??0),q=[];for(let J=0;J<7;J+=1){let pe=new Date(oe);pe.setDate(pe.getDate()+J),q.push(pe)}return q}),Li=j({className:"g-ui-event-calendar-week"},xe(Ze).compute(p=>j({className:"g-ui-event-calendar-week-days"},j({className:"g-ui-event-calendar-week-time-col"},""),(p||[]).map(A=>j({key:A.getTime(),className:"g-ui-event-calendar-week-day-col"},j({className:"g-ui-event-calendar-week-day-header"},gi(A,c(u))))))),j({className:"g-ui-event-calendar-week-body"},j({className:"g-ui-event-calendar-week-time-col"},Ne.map(p=>{let A=Math.floor(p),oe=(p-A)*60,q=`${A<=12?A:A-12}:${oe===0?"00":oe} ${A<12?"AM":"PM"}`;return j({key:p,className:"g-ui-event-calendar-week-slot-label"},q)})),xe(Ze,X).compute(([p,A])=>{if(!p||!p.length)return null;let oe=p[0],q=new Date(p[6]);q.setHours(23,59,59,999);let J=Vt(A,oe,q);return j({className:"g-ui-event-calendar-week-grid-cols"},p.map(pe=>j({key:pe.getTime(),className:"g-ui-event-calendar-week-day-col g-ui-event-calendar-week-day-col-body"},Ne.map(Q=>j({key:Q,className:"g-ui-event-calendar-week-slot",onClick:()=>se(pe,Q,!1)})),J.filter(Q=>!Q.allDay&&Q.start.getDate()===pe.getDate()&&Q.start.getMonth()===pe.getMonth()&&Q.start.getFullYear()===pe.getFullYear()).map(Q=>{let{top:Ce,height:De}=Mt(Q.start,Q.end,ae,K);return j({key:Q.id,className:"g-ui-event-calendar-week-event",style:{top:`${Ce}%`,height:`${De}%`,borderLeftColor:Q.color||"var(--g-ui-primary)"},onClick:M=>{M.stopPropagation(),C(Q)}},j({className:"g-ui-event-calendar-week-event-title"},Q.title||"(No title)"),ce(!Q.allDay,()=>Ee({className:"g-ui-event-calendar-week-event-time"},`${Ge(Q.start,c(u))} \u2013 ${Ge(Q.end,c(u))}`)))}))))}))),$i=j({className:"g-ui-event-calendar-day"},j({className:"g-ui-event-calendar-day-body"},j({className:"g-ui-event-calendar-day-time-col"},Ne.map(p=>{let A=Math.floor(p),oe=(p-A)*60,q=`${A<=12?A:A-12}:${oe===0?"00":oe} ${A<12?"AM":"PM"}`;return j({key:p,className:"g-ui-event-calendar-day-slot-label"},q)})),j({className:"g-ui-event-calendar-day-slots"},Ne.map(p=>j({key:p,className:"g-ui-event-calendar-day-slot",onClick:()=>se(f.get(),p,!1)})),xe(X,f).compute(([p,A])=>A?Pt(p,A).filter(q=>!q.allDay).map(q=>{let{top:J,height:pe}=Mt(q.start,q.end,ae,K);return j({key:q.id,className:"g-ui-event-calendar-day-event",style:{top:`${J}%`,height:`${pe}%`,borderLeftColor:q.color||"var(--g-ui-primary)"},onClick:Q=>{Q.stopPropagation(),C(q)}},j({className:"g-ui-event-calendar-day-event-title"},q.title||"(No title)"),Ee({className:"g-ui-event-calendar-day-event-time"},`${Ge(q.start,c(u))} \u2013 ${Ge(q.end,c(u))}`))}):[])))),ci=p=>{let A=I.get(),oe=new Date,q=A.start||oe,J=A.end||new Date(oe.getTime()+3600*1e3),pe=le(A.title),Q=le(q.toISOString().slice(0,10)),Ce=le(!A.allDay&&q?q.toTimeString().slice(0,5):"09:00"),De=le(J.toISOString().slice(0,10)),M=le(!A.allDay&&J?J.toTimeString().slice(0,5):"10:00"),P=le(A.allDay),E=le(A.description),O=le(A.location),_=le(A.attendees||[]),Z=le(""),Y=le([]),U=le([]),ee=le(""),fe=Array.isArray(m)?m:[],Te=le(A.color),we=()=>{let $=new Date(Q.get()+"T"+(P.get()?"00:00:00":Ce.get()+":00")),ve=new Date(De.get()+"T"+(P.get()?"23:59:59":M.get()+":00"));I.set({title:pe.get(),start:$,end:ve,allDay:P.get(),description:E.get(),location:O.get(),attendees:_.get(),color:Te.get()})},Bi=$=>{if(Z.set($),!L||!$.trim()){Y.set([]);return}Promise.resolve(L($.trim())).then(ve=>Y.set(Array.isArray(ve)?ve:[])).catch(()=>Y.set([]))},Lt=$=>{let ve=_.get();ve.some(kr=>(kr.email||kr.id)===($.email||$.id))||(_.set([...ve,{id:$.id,email:$.email??$.label,label:$.label}]),Z.set(""),Y.set([]))},$t=$=>{let ve=[..._.get()];ve.splice($,1),_.set(ve)},yr=()=>{D&&Promise.resolve(D(ee.get())).then($=>U.set(Array.isArray($)?$:[])).catch(()=>U.set([]))};return j({className:"g-ui-event-calendar-form"},j({className:"g-ui-event-calendar-form-row"},ge({label:"Title",placeholder:"Event title",value:pe,onInput:$=>pe.set($?.target?.value??"")})),j({className:"g-ui-event-calendar-form-row g-ui-event-calendar-form-row-inline"},Xi({label:"All day",checked:P,onChange:$=>P.set($)})),j({className:"g-ui-event-calendar-form-row g-ui-event-calendar-form-row-inline"},j({className:"g-ui-event-calendar-form-field"},ui({className:"g-ui-event-calendar-form-label"},"Start"),Mi({type:"date",className:"g-ui-input g-ui-input-size-md",value:Q,onInput:$=>Q.set($?.target?.value??"")}),ce(!P,()=>Mi({type:"time",className:"g-ui-input g-ui-input-size-md",value:Ce,onInput:$=>Ce.set($?.target?.value??"")}))),j({className:"g-ui-event-calendar-form-field"},ui({className:"g-ui-event-calendar-form-label"},"End"),Mi({type:"date",className:"g-ui-input g-ui-input-size-md",value:De,onInput:$=>De.set($?.target?.value??"")}),ce(!P,()=>Mi({type:"time",className:"g-ui-input g-ui-input-size-md",value:M,onInput:$=>M.set($?.target?.value??"")})))),ce(D,()=>j({className:"g-ui-event-calendar-form-row"},ui({className:"g-ui-event-calendar-form-label"},"Location"),ge({placeholder:"Search or type location",value:ee,onInput:$=>{ee.set($?.target?.value??""),yr()},onFocus:yr}),ce(xe(U).compute($=>$&&$.length>0),()=>j({className:"g-ui-event-calendar-form-suggestions"},U.get().map($=>j({key:$.id??$.label,className:"g-ui-event-calendar-form-suggestion-item",onClick:()=>{O.set($.label??$.id),ee.set(""),U.set([])}},$.label??$.id)))),ce(xe(O).compute($=>!!$),()=>Ee({className:"g-ui-event-calendar-form-chip"},O)))),ce(L,()=>j({className:"g-ui-event-calendar-form-row"},ui({className:"g-ui-event-calendar-form-label"},"Add guests"),ge({placeholder:"Type email to search",value:Z,onInput:$=>Bi($?.target?.value??"")}),j({className:"g-ui-event-calendar-form-chips"},_.get().map(($,ve)=>Ee({key:($.email||$.id)+ve,className:"g-ui-event-calendar-form-chip g-ui-event-calendar-form-chip-removable",onClick:()=>$t(ve)},$.label||$.email||$.id," \xD7"))),ce(xe(Y).compute($=>$&&$.length>0),()=>j({className:"g-ui-event-calendar-form-suggestions"},Y.get().map($=>j({key:$.id??$.email,className:"g-ui-event-calendar-form-suggestion-item",onClick:()=>Lt($)},$.label??$.email??$.id)))))),j({className:"g-ui-event-calendar-form-row"},qi({label:"Description",placeholder:"Add description",value:E,onInput:$=>E.set($?.target?.value??"")})),ce(fe.length>0,()=>j({className:"g-ui-event-calendar-form-row"},ui({className:"g-ui-event-calendar-form-label"},"Color"),j({className:"g-ui-event-calendar-form-colors"},fe.map($=>j({key:$.value??$.id??$,className:o("g-ui-event-calendar-form-color-swatch",xe(Te).compute(ve=>ve===($.value??$.id??$)?"g-ui-event-calendar-form-color-swatch-active":"")),style:{backgroundColor:$.color??$.value??$},onClick:()=>Te.set($.value??$.id??$)}))))),j({className:"g-ui-event-calendar-form-actions"},je({variant:"subtle",onClick:H},"Cancel"),je({variant:"filled",onClick:()=>{we(),p?he():ue()}},p?"Save":"Create")))},Ii=()=>{let p=V.get();return p?j({className:"g-ui-event-calendar-view-modal"},j({className:"g-ui-event-calendar-view-modal-title"},p.title||"(No title)"),j({className:"g-ui-event-calendar-view-modal-meta"},p.allDay?Ee({className:"g-ui-event-calendar-view-modal-date"},gi(p.start,c(u))+(p.start.getTime()!==p.end.getTime()?` \u2013 ${gi(p.end,c(u))}`:"")):Ee({className:"g-ui-event-calendar-view-modal-date"},`${gi(p.start,c(u))} \xB7 ${Ge(p.start,c(u))} \u2013 ${Ge(p.end,c(u))}`)),ce(p.location,()=>j({className:"g-ui-event-calendar-view-modal-field"},"Location: ",p.location)),ce(p.description,()=>j({className:"g-ui-event-calendar-view-modal-field"},p.description)),ce(p.attendees?.length,()=>j({className:"g-ui-event-calendar-view-modal-field"},"Guests: ",p.attendees.map(A=>A.label||A.email||A.id).join(", "))),j({className:"g-ui-event-calendar-view-modal-actions"},je({variant:"subtle",size:"sm",onClick:G},ye({size:"sm",innerHTML:jr})," Edit"),je({variant:"subtle",size:"sm",onClick:ze,className:"g-ui-event-calendar-view-modal-delete"},ye({size:"sm",innerHTML:Er})," Delete"),je({variant:"filled",size:"sm",onClick:H},"Close"))):null};return j({...x,className:o("g-ui-event-calendar",h)},Ve,ce(b,p=>p==="month",()=>Vi),ce(b,p=>p==="week",()=>Li),ce(b,p=>p==="day",()=>$i),ce(S,p=>p==="create",()=>_e({opened:!0,title:"New event",size:"lg",onClose:H},ci(!1))),ce(S,p=>p==="view",()=>_e({opened:!0,title:"Event",size:"md",onClose:H},Ii())),ce(S,p=>p==="edit",()=>_e({opened:!0,title:"Edit event",size:"lg",onClose:H},ci(!0))))}import{state as uu}from"@granularjs/core";function gu(e=!1){let i=uu(!!e);return[i,{open:()=>i.set(!0),close:()=>i.set(!1),toggle:()=>i.set(!i.get())}]}Nr();export{Ja as Accordion,Fe as ActionIcon,Dn as Affix,ho as Alert,jo as Anchor,$n as AppBar,yo as Avatar,_s as AvatarGroup,ba as Badge,Qs as BadgeGroup,Do as Blockquote,Dt as BottomBar,dn as Breadcrumbs,Is as Burger,Ri as Button,ii as Calendar,va as Card,fn as Center,Xi as Checkbox,Us as CheckboxGroup,Ko as Chip,Co as Code,Hs as Col,wn as Collapse,la as Container,fs as CopyButton,is as DateInput,Un as DatePicker,co as Divider,so as Drawer,su as EventCalendar,Vn as Fieldset,Ps as Flex,Es as Grid,xr as GridTable,ma as Group,Cn as HoverCard,ye as Icon,Ro as Image,$s as Indicator,zo as Kbd,Jr as List,Ke as Loading,Fs as LoadingOverlay,ao as Menu,_e as Modal,Gn as MultiSelect,Vs as NavLink,er as Notification,Kn as Notifications,Yi as NumberField,Da as NumberInput,an as Pagination,mo as Paper,gs as PasswordInput,Gs as PinInput,lr as Popover,os as Popper,Oo as Progress,hs as ProgressRing,un as Radio,ln as RadioGroup,Ss as RangePicker,es as RangeSlider,Hn as Rating,qs as ScrollArea,cs as SearchInput,en as SegmentedControl,Ra as Select,ys as SelectSearch,Bn as Sidebar,Mo as SimpleGrid,Uo as Skeleton,Wo as Slider,hn as Space,pa as Stack,En as Stepper,Ea as Switch,zs as SwitchGroup,Xa as Table,Ya as Tabs,qn as Tag,Hi as Text,ge as TextInput,qi as Textarea,jn as Timeline,ua as Title,xs as Toast,Zn as ToastStack,eo as Tooltip,W as classFlag,de as classMap,k as classVar,o as cx,_t as getThemeMode,Xt as setThemeMode,Ut as setThemeVars,s as splitPropsChildren,gu as useDisclosure};
|
|
4025
|
+
`;function Rt(){if(typeof document>"u"||document.getElementById(jt))return;let e=document.createElement("style");e.id=jt,e.textContent=ba,document.head.appendChild(e)}var xa=new Set(["--g-ui-bg","--g-ui-bg-subtle","--g-ui-bg-muted","--g-ui-bg-emphasized","--g-ui-bg-inverted","--g-ui-bg-panel","--g-ui-fg","--g-ui-fg-muted","--g-ui-fg-subtle","--g-ui-fg-inverted","--g-ui-border","--g-ui-border-subtle","--g-ui-border-emphasized","--g-ui-border-inverted","--g-ui-primary","--g-ui-primary-hover","--g-ui-primary-active","--g-ui-primary-subtle","--g-ui-primary-muted","--g-ui-primary-emphasized","--g-ui-success","--g-ui-success-hover","--g-ui-success-active","--g-ui-success-subtle","--g-ui-success-muted","--g-ui-danger","--g-ui-danger-hover","--g-ui-danger-active","--g-ui-danger-subtle","--g-ui-danger-muted","--g-ui-warning","--g-ui-warning-hover","--g-ui-warning-active","--g-ui-warning-subtle","--g-ui-warning-muted","--g-ui-info","--g-ui-info-hover","--g-ui-info-active","--g-ui-info-subtle","--g-ui-info-muted","--g-ui-shadow-xs","--g-ui-shadow-sm","--g-ui-shadow-md","--g-ui-shadow-lg","--g-ui-shadow-xl","--g-ui-shadow-2xl","--g-ui-radius","--g-ui-font","--g-ui-surface","--g-ui-text","--g-ui-muted","--g-ui-primary-strong","--g-ui-shadow"]);function wa(e={},i=document?.documentElement){if(i)for(let[t,r]of Object.entries(e)){let a=t.startsWith("--")?t:`--g-ui-${t}`;xa.has(a)&&i.style.setProperty(a,String(r))}}function ya(e="dark",i=document?.documentElement){i&&(i.classList.remove("g-ui-theme-dark","g-ui-theme-light"),i.classList.add(e==="light"?"g-ui-theme-light":"g-ui-theme-dark"))}function ka(e=document?.documentElement){return e.classList.contains("g-ui-theme-light")?"light":"dark"}import{Renderer as Ht,isSignal as Ot,isState as Wt,isStatePath as qt,isComputed as Yt,resolve as Ee,computed as za,after as Wi,concat as Na}from"@granularjs/core";function qi(e){return Ot(e)||Wt(e)||qt(e)||Yt(e)}function s(...e){return Na(...e,{separator:" ",filterFalsy:!0})}function Gt(e){if(!(e==null||e===""))return typeof e=="number"?`${e}px`:e}function g(e,i){let t={},r=[],a=o=>!!o&&typeof o=="object"&&!Array.isArray(o)&&!Ht.isRenderable(o)&&!Ht.isDomNode(o)&&!Ot(o)&&!Wt(o)&&!qt(o)&&!Yt(o);for(let o of e)a(o)?Object.assign(t,o):r.push(o);if(i&&typeof i=="object")for(let o of Object.keys(i))t[o]===void 0&&(t[o]=i[o]);return{props:za(t),rawProps:t,children:r}}function m(e){return Ee(e)}function ye(e){return!!Ee(e)}function D(e,i,t){let r=a=>{let o=Ee(a),n=o==null||o===""?t:o;return n==null||n===""?"":`${e}${n}`};return qi(i)?Wi(i).compute(a=>r(a)):r(i)}function Y(e,i){return qi(i)?Wi(i).compute(t=>Ee(t)?e:""):Ee(i)?e:""}function me(e,i,t){let r=a=>i[a]||null;return qi(e)?Wi(e).compute(a=>r(Ee(a??t))):r(Ee(e??t))}import{Button as Ca,Span as Yi,when as Gi,after as Sa}from"@granularjs/core";function Zi(...e){let{props:i,children:t}=g(e,{variant:"filled",size:"md",justify:"center"}),{variant:r,color:a,size:o,fullWidth:n,loading:u,leftSection:c,rightSection:d,className:p,disabled:x,justify:f,...l}=i,w=Sa(x,u).compute(([z,I])=>z||I);return Ca({...l,disabled:w,className:s("g-ui-button",D("g-ui-button-variant-",r,"filled"),D("g-ui-button-color-",a,"primary"),D("g-ui-justify-",f,"center"),D("g-ui-button-size-",o,"md"),Y("g-ui-button-full",n),Y("g-ui-button-loading",u),p)},Gi(c,()=>Yi({className:"g-ui-button-section-left"},c)),Gi(u,()=>Yi("Loading..."),()=>t),Gi(d,()=>Yi({className:"g-ui-button-section-right"},d)))}import{Span as Da}from"@granularjs/core";function Ui(...e){let{props:i,children:t}=g(e,{size:"md"}),{size:r,weight:a,color:o,dimmed:n,align:u,ellipsis:c,decoration:d,className:p,style:x,...f}=i,l=me(a,{bold:"g-ui-text-weight-700",semibold:"g-ui-text-weight-600",medium:"g-ui-text-weight-500",700:"g-ui-text-weight-700",600:"g-ui-text-weight-600",500:"g-ui-text-weight-500",400:"g-ui-text-weight-400"}),w=me(o,{primary:"g-ui-text-primary",success:"g-ui-text-success",danger:"g-ui-text-danger",muted:"g-ui-text-dimmed"}),z=me(u,{center:"g-ui-text-align-center",right:"g-ui-text-align-right",left:"g-ui-text-align-left"}),I=me(d,{underline:"g-ui-text-decoration-underline","line-through":"g-ui-text-decoration-line-through",overline:"g-ui-text-decoration-overline",none:"g-ui-text-decoration-none"});return Da({...f,style:x,className:s("g-ui-text",D("g-ui-text-size-",r,"md"),Y("g-ui-text-dimmed",n),Y("g-ui-text-ellipsis",c),l,w,z,I,p)},t)}import{H1 as Pa,H2 as Zt,H3 as Ma,H4 as Ta,H5 as Va,H6 as La}from"@granularjs/core";var $a={1:Pa,2:Zt,3:Ma,4:Ta,5:Va,6:La};function Ia(...e){let{props:i,children:t}=g(e,{order:2}),{order:r,className:a,style:o,...n}=i,u=m(r)||2;return($a[u]||Zt)({...n,className:s("g-ui-title",D("g-ui-title-order-",r,2),a)},t)}import{Div as Aa}from"@granularjs/core";function Ba(...e){let{props:i,children:t}=g(e,{size:"md"}),{size:r,fluid:a,className:o,style:n,...u}=i;return Aa({...u,style:n,className:s("g-ui-container",Y("g-ui-container-fluid",a),D("g-ui-container-size-",r,"md"),o)},t)}import{Div as Fa}from"@granularjs/core";function Ea(...e){let{props:i,children:t}=g(e,{gap:"md"}),{gap:r,align:a,justify:o,className:n,style:u,...c}=i,d=me(o,{between:"g-ui-justify-between",center:"g-ui-justify-center",end:"g-ui-justify-end",start:"g-ui-justify-start"});return Fa({...c,style:u,className:s("g-ui-stack",D("g-ui-gap-",r,"md"),D("g-ui-align-",a),d,n)},t)}import{Div as ja}from"@granularjs/core";function Ra(...e){let{props:i,children:t}=g(e,{gap:"md",align:"center"}),{gap:r,align:a,justify:o,position:n,noWrap:u,className:c,style:d,...p}=i,x=me(n,{apart:"g-ui-justify-between",center:"g-ui-justify-center",right:"g-ui-justify-end",left:"g-ui-justify-start"});return ja({...p,style:d,className:s("g-ui-group",D("g-ui-gap-",r,"md"),D("g-ui-align-",a,"center"),D("g-ui-justify-",o,"none"),x,Y("g-ui-no-wrap",u),c)},t)}import{Div as hi,list as Ha,when as _i,after as Ut}from"@granularjs/core";function Oa(...e){let{props:i,children:t}=g(e,{padding:"md",radius:"md",shadow:"none",border:"default"}),{title:r,content:a,actions:o,border:n,padding:u,radius:c,shadow:d,className:p,style:x,...f}=i;return hi({style:x},_i(r,()=>hi({className:"g-ui-card-title"},r)),_i(a,()=>hi({className:"g-ui-card-content"},a)),{className:s("g-ui-card",D("g-ui-card-border-",n,"md"),D("g-ui-card-padding-",u,"md"),D("g-ui-card-radius-",c,"md"),D("g-ui-card-shadow-",d,"md"),p),...f},t,_i(o,()=>hi({className:"g-ui-card-actions"},Ha(o,l=>Zi({className:"g-ui-card-action",onClick:w=>l.get().onClick?.(w),leftSection:l.leftSection,rightSection:l.rightSection,size:Ut(l.size).compute(w=>w||"sm"),variant:Ut(l.variant).compute(w=>w||"outline"),...l.get().props||{}},l.label)))))}import{Span as Wa}from"@granularjs/core";function qa(...e){let{props:i,children:t}=g(e,{variant:"filled",size:"md"}),{variant:r,size:a,className:o,dot:n,style:u,...c}=i,d=me(r,{dot:"g-ui-badge-dot"});return Wa({...c,className:s("g-ui-badge",D("g-ui-badge-variant-",r,"filled"),D("g-ui-badge-size-",a,"md"),Y("g-ui-badge-dot",n),d,o)},t)}import{Div as Je,Input as Ya,Textarea as Ga,Label as Za,Span as Ua,when as ei,state as _a,after as Xa,isState as Ka}from"@granularjs/core";function fe(...e){let{props:i,rawProps:t}=g(e,{size:"md"}),{label:r,description:a,error:o,size:n,leftSection:u,rightSection:c,className:d,inputClassName:p,multiline:x,value:f,...l}=i,{value:w,node:z,onChange:I,onInput:M,onFocus:C,onBlur:T,onKeyDown:S,onKeyUp:h,onClick:y}=t,v=Ka(w)&&!I&&!M,P=v?w:_a(m(f)??"");Xa(f).change(ne=>{v||P.set(m(ne)??"")});let N=ne=>{let ee=ne?.target?.value??"";ee!==f.get()&&(P.set(ee),I?.(ne),M?.(ne))},L=ye(x),G=L?Ga:Ya,Q=s(p,L&&"g-ui-textarea"),J=G({...l,node:z,value:P,onInput:N,onChange:N,onFocus:C,onBlur:T,onKeyDown:S,onKeyUp:h,onClick:y,className:s("g-ui-input",Q)});return Je({className:s("g-ui-text-input",d)},ei(r,()=>Za({className:"g-ui-text-input-label"},r)),ei(a,()=>Ua({className:"g-ui-text-input-description"},a)),Je({className:s("g-ui-input-wrapper",Y("g-ui-input-multiline",x),D("g-ui-input-size-",n,"md"),Y("g-ui-input-error",o))},ei(u,()=>Je({className:"g-ui-input-section"},u)),J,ei(c,()=>Je({className:"g-ui-input-section"},c))),ei(o,()=>Je({className:"g-ui-text-input-error-text"},o)))}function Xi(...e){let{props:i}=g(e,{size:"md"}),{size:t,leftSection:r,rightSection:a,className:o,...n}=i;return fe({...n,size:t,className:o,leftSection:r,rightSection:a,multiline:!0})}import{Div as _t,Span as Xt,after as je,state as Qa}from"@granularjs/core";function Ki(...e){let{props:i,rawProps:t}=g(e,{size:"md",step:1,allowDecimal:!0,allowNegative:!0,clampBehavior:"blur",hideControls:!1,decimalSeparator:".",thousandSeparator:"",format:null,prefix:"",suffix:""}),{value:r,min:a,max:o,step:n,size:u,allowDecimal:c,allowNegative:d,decimalSeparator:p,thousandSeparator:x,decimalScale:f,clampBehavior:l,hideControls:w,format:z,locale:I,currency:M,formatOptions:C,prefix:T,suffix:S,leftSection:h,rightSection:y,className:v,onChange:P,onInput:N,...L}=i,{onChange:G,onInput:Q,onBlur:J,onFocus:ne,onKeyDown:ee}=t,se=A=>{G?.(A.target?.value??""),Q?.(A.target?.value??"")},ge=se,re=Qa(""),$=A=>String(A??"").replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),O=()=>{if(!!!m(c))return 0;let V=m(f);if(V!=null&&V!==""&&Number.isFinite(Number(V)))return Math.max(0,Number(V));let H=m(z);return H==="currency"||H==="percent"?2:0},k=A=>{let V=m(p)??".",H=m(x)??"",W=String(A??"");if(H&&(W=W.split(H).join("")),!W||W==="-"||W===V||W.endsWith(V))return null;let ie=W.replace(V,"."),_=Number(ie);return Number.isFinite(_)?_:null},F=A=>{let V=m(x)??"";return V?A.replace(/\B(?=(\d{3})+(?!\d))/g,V):A},j=A=>{let V=m(p)??".",H=O(),W=Number(A);if(!Number.isFinite(W))return"";let ie=W<0?"-":"",_=Math.abs(W),[Z,X=""]=String(_).split("."),oe=F(Z);if(H>0){let he=X.slice(0,H).padEnd(H,"0");return`${ie}${oe}${V}${he}`}return`${ie}${oe}`},U=(A,V)=>{try{let H=m(I),W=m(M)??"USD",ie=m(C)??{},_=O(),Z=V==="currency"?"currency":"decimal";return new Intl.NumberFormat(H,{style:Z,currency:W,..._>0?{minimumFractionDigits:_,maximumFractionDigits:_}:{maximumFractionDigits:0},...ie}).format(A)}catch{return j(A)}},K=A=>{let V=A,H=m(a),W=m(o);return H!=null&&Number.isFinite(Number(H))&&(V=Math.max(V,Number(H))),W!=null&&Number.isFinite(Number(W))&&(V=Math.min(V,Number(W))),!m(d)&&V<0&&(V=0),V},le=()=>{let A=m(S)??"",V=m(z);return!A&&V==="percent"?"%":A},ve=(A,V,H)=>{let W=m(T)??"",ie=le(),_=String(A??"").replace(/\u00A0/g," "),Z=String(W??"").replace(/\u00A0/g," "),X=String(ie??"").replace(/\u00A0/g," "),oe=Z&&_.startsWith(Z),he=X&&_.endsWith(X);return`${V??""}${oe?"":W}${A}${he?"":ie}`},De=(A,V)=>{let H=O(),W=m(p)??".",_=String(A??"").replace(/\D/g,"")||"0",Z=H>0?_.padStart(H+1,"0"):_,oe=(H>0?Z.slice(0,-H):Z).replace(/^0+(?=\d)/,"")||"0",he=H>0?Z.slice(-H):"",Le=H>0?`${oe}${W}${he}`:oe;return`${V??""}${Le}`},Fe=A=>{let V=m(T)??"",H=le(),W=String(A??""),ie=String(V??"").replace(/\u00A0/g," "),_=String(H??"").replace(/\u00A0/g," ");return ie&&W.replace(/\u00A0/g," ").startsWith(ie)&&(W=W.slice(V.length)),_&&W.replace(/\u00A0/g," ").endsWith(_)&&(W=W.slice(0,-H.length)),W},fi=A=>{let V=!!m(d),H=Fe(A),W=V&&H.includes("-")?"-":"",ie=H.replace(/\D/g,""),_=De(ie,W);if(m(l)==="strict"){let Z=k(_);if(Z!=null){let X=K(Z);_=`${X<0?"-":""}${j(Math.abs(X))}`}}return _},Ei=A=>{if(A==null||A==="")return De("","");if(typeof A=="number"&&Number.isFinite(A)){let X=m(l)==="strict"?K(A):A;return`${X<0?"-":""}${j(Math.abs(X))}`}let V=Fe(A),H=m(p)??".",ie=!!m(d)&&String(V).includes("-")?"-":"",_=String(V??"").replace(new RegExp(`[^0-9${$(H)}]`,"g"),""),Z=k(`${ie}${_}`);if(Z!=null){let X=m(l)==="strict"?K(Z):Z;return`${X<0?"-":""}${j(Math.abs(X))}`}return fi(A)},Ce,Qe=A=>{let V=m(A);if(V===void 0)return;let H=Ei(V);H!==re.get()&&(Ce=H,re.set(H))};Qe(r),je(r).change(A=>{Qe(A)}),je(re).change(A=>{if(A===Ce){Ce=void 0;return}Ce=void 0;let V=k(A);if(V==null){se?.(A??"");return}se?.(V)});let ji=je(y).compute(A=>A!=null&&A!==!1),Ri=je(w,ji).compute(([A,V])=>!m(A)&&!V),vi=je(c).compute(A=>m(A)?"decimal":"numeric"),Hi=je(z,T,S,c,d,p,x,f,l,a,o,I,M,C).compute(()=>({mode:"both",format:A=>{let V=fi(A),H=m(z),ie=!!m(d)&&V.startsWith("-")?"-":"",_=k(V),Z=V.replace(ie,"");if(_!=null){let X=Math.abs(_);if(typeof H=="function")try{Z=H(X)}catch{Z=j(X)}else if(H==="currency")Z=U(X,"currency");else if(H==="decimal"){let oe=m(I),he=m(C);Z=oe||he?U(X,"decimal"):j(X)}else Z=j(X)}return{value:V,raw:V,visual:ve(Z,ie,H)}}})),b=A=>{let V=k(re.get()),H=Number(m(n)??1),ie=K((V??0)+H*A);re.set(j(ie))},E=A=>{if(!A||typeof A.setSelectionRange!="function")return;let V=()=>{try{let H=String(A.value??"").length;A.setSelectionRange(H,H)}catch{}};typeof requestAnimationFrame=="function"?requestAnimationFrame(V):V()},ue=A=>{ge?.(A);let V=A?.target;V&&E(V)},q=A=>{if(J?.(A),m(l)!=="blur")return;let V=k(re.get());if(V==null)return;let H=K(V);re.set(j(H))},ae=A=>{ne?.(A),E(A?.target)},de=A=>{ee?.(A);let V=A?.target;if(!V)return;let H=m(T)??"",W=le();W&&typeof V.selectionEnd=="number"&&(V.selectionEnd=Math.min(V.selectionEnd,String(V.value??"").length-W.length)),H&&typeof V.selectionStart=="number"&&(V.selectionStart=Math.max(V.selectionStart,H.length))},te=_t({className:"g-ui-number-field-controls"},Xt({className:"g-ui-number-field-control",onClick:()=>b(1)},"+"),Xt({className:"g-ui-number-field-control",onClick:()=>b(-1)},"\u2212")),Se=_t({className:"g-ui-number-field-controls-wrapper"},te),Pe=je(Ri,y).compute(([A,V])=>A?Se:V);return fe({...L,size:u,className:s("g-ui-number-field",v),leftSection:h,rightSection:Pe,type:"text",inputMode:vi,inputClassName:s("g-ui-input-number"),value:re,format:Hi,onInput:ue,onBlur:q,onFocus:ae,onKeyDown:de})}function Ja(...e){return Ki(...e)}import{Div as yi,Button as eo,portal as io,when as Qi,after as to}from"@granularjs/core";var bi='<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960 960 960" width="24px" fill="#1f1f1f"><path d="M504-480 320-664l56-56 240 240-240 240-56-56 184-184Z"/></svg>',xi='<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960 960 960" width="24px" fill="#1f1f1f"><path d="M560-240 320-480l240-240 56 56-184 184 184 184-56 56Z"/></svg>',wi='<svg xmlns="http://www.w3.org/2000/svg" height="40px" viewBox="0 -960 960 960" width="40px" fill="#1f1f1f"><path d="M379.33-244 154-469.33 201.67-517l177.66 177.67 378.34-378.34L805.33-670l-426 426Z"/></svg>',Kt='<svg xmlns="http://www.w3.org/2000/svg" height="40px" viewBox="0 -960 960 960" width="40px" fill="#1f1f1f"><path d="M240-446.67v-66.66h480v66.66H240Z"/></svg>',$e='<svg xmlns="http://www.w3.org/2000/svg" height="40px" viewBox="0 -960 960 960" width="40px" fill="#1f1f1f"><path d="M312-265.33 265.33-312l168-168-168-167L312-693.67l168 168 167-168L693.67-647l-168 167 168 168L647-265.33l-167-168-168 168Z"/></svg>',Qt='<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960 960 960" width="24px" fill="#1f1f1f"><path d="M784-120 532-372q-30 24-69 38t-83 14q-109 0-184.5-75.5T120-580q0-109 75.5-184.5T380-840q109 0 184.5 75.5T640-580q0 44-14 83t-38 69l252 252-56 56ZM380-400q75 0 127.5-52.5T560-580q0-75-52.5-127.5T380-760q-75 0-127.5 52.5T200-580q0 75 52.5 127.5T380-400Z"/></svg>',Jt='<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960 960 960" width="24px" fill="currentColor"><path d="M440-440H200v-80h240v-240h80v240h240v80H520v240h-80v-240Z"/></svg>',er='<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960 960 960" width="24px" fill="currentColor"><path d="M200-120q-33 0-56.5-23.5T120-200v-560q0-33 23.5-56.5T200-840h357l-80 80H200v560h560v-278l80-80v358q0 33-23.5 56.5T760-120H200Zm280-360v-80h240v80H480Zm0 160v-80h320v80H480Zm0 160v-80h320v80H480ZM360-360v-80h80v80h-80Zm0 160v-80h80v80h-80Zm0 160v-80h80v80h-80Zm160-320h280l-36-37 37-37v74H520Zm-160 0h80v-80h-80v80ZM120-600v-160l160-160h160l-80 80H200v240h-80Zm80-240v-80 80Z"/></svg>',ir='<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960 960 960" width="24px" fill="currentColor"><path d="M280-120q-33 0-56.5-23.5T200-200v-520h-40v-80h200v-40h240v40h200v80h-40v520q0 33-23.5 56.5T680-120H280Zm400-600H280v520h400v-520ZM360-280h80v-360h-80v360Zm160 0h80v-360h-80v360ZM280-720v520-520Z"/></svg>',tr='<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960 960 960" width="24px" fill="currentColor"><path d="M200-80q-33 0-56.5-23.5T120-160v-560q0-33 23.5-56.5T200-800h40v-80h80v80h320v-80h80v80h40q33 0 56.5 23.5T840-720v560q0 33-23.5 56.5T760-80H200Zm0-80h560v-400H200v400Z"/></svg>',rr='<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960 960 960" width="24px" fill="#1f1f1f"><path d="M480-344 240-584l56-56 184 184 184-184 56 56-240 240Z"/></svg>';function ii(...e){let{props:i,rawProps:t,children:r}=g(e,{size:"md",centered:!0,overlay:"normal"}),{opened:a,title:o,size:n,centered:u,overlay:c,position:d,className:p,style:x}=i,{onClose:f}=t,l=to(d,u).compute(([w,z])=>`g-ui-modal-position-${w??(z===!1?"top-center":"center")}`);return Qi(a,()=>io(yi({className:s("g-ui-modal-overlay",D("g-ui-modal-overlay-",c,"normal"),l),onClick:w=>{w.target===w.currentTarget&&f?.()}},yi({className:s("g-ui-modal",D("g-ui-modal-size-",n,"md"),p)},yi({className:"g-ui-modal-header"},Qi(o,()=>yi({className:"g-ui-modal-title"},o)),Qi(f,()=>eo({type:"button",className:"g-ui-button g-ui-button-variant-subtle g-ui-button-size-xs g-ui-modal-close",onClick:f,innerHTML:$e}))),r))))}import{Div as ki,Span as Ji,after as ar,when as or}from"@granularjs/core";function ti(...e){let{props:i}=g(e,{variant:"spinner",size:"md"}),{variant:t,size:r,className:a}=i,o=ar(t).compute(u=>u==="dots"),n=ar(t).compute(u=>u==="bars");return or(o,()=>ki({className:s("g-ui-loading g-ui-dots",D("g-ui-loading-size-",r,"md"),a)}),()=>or(n,()=>ki({className:s("g-ui-loading g-ui-bars",D("g-ui-loading-size-",r,"md"),a)},Ji(""),Ji(""),Ji("")),()=>ki({className:s("g-ui-loading",D("g-ui-loading-size-",r,"md"),a)},ki({className:"g-ui-spinner"}))))}import{Div as et,Input as ro,Label as ao,Span as nr,when as it,state as oo,after as no}from"@granularjs/core";function tt(...e){let{props:i,rawProps:t}=g(e,{size:"md"}),{checked:r,label:a,description:o,size:n,indeterminate:u,className:c,style:d,inputProps:p,...x}=i,{onChange:f}=t,l=oo(ye(r));no(r).change(z=>{z!=null&&(l.set(!!z),f?.(z))});let w=ao({className:"g-ui-checkbox-control"},ro({type:"checkbox",indeterminate:u,checked:l,className:s("g-ui-checkbox-input",D("g-ui-checkbox-size-",n,"md"),p?.className),...x}),it(l,()=>et({className:"g-ui-checkbox-checked",innerHTML:wi}),()=>{if(!l.get()&&u.get())return et({className:"g-ui-checkbox-indeterminate",innerHTML:Kt})}),it(a,()=>nr({className:"g-ui-checkbox-label"},a)));return et({className:s("g-ui-checkbox",D("g-ui-checkbox-size-",n,"md"),c)},w,it(o,()=>nr({className:"g-ui-checkbox-description"},o)))}import{Input as lo,Label as co,Span as po,when as mo,after as at,state as fo}from"@granularjs/core";import{Div as so,context as uo,after as sr}from"@granularjs/core";var rt=uo({name:null,selected:null});function go(...e){let{props:i,rawProps:t,children:r}=g(e),{className:a,name:o,selected:n,onChange:u,...c}=i,{onChange:d}=t,p=rt.scope({name:o?.get(),selected:n?.get()});return sr(p.selected).change(x=>{d?.(x)}),sr(n).change(x=>{x!==p.selected.get()&&(p.set().selected=x)}),p.serve(so({...c,className:s("g-ui-switch-group",a)},r))}function vo(...e){let{props:i,rawProps:t}=g(e,{size:"md"}),{label:r,size:a,className:o,style:n,inputProps:u,checked:c,value:d,...p}=i,{onChange:x}=t,f=fo(c),l=rt.state(),w=at(l).compute(z=>({name:z.name,type:z.name?"radio":"checkbox"}));return at(l.selected).change(z=>{f.set(z===d.get())}),at(f).change(z=>{if(x?.(z),!z)return;let I=l.get().selected;l.set().selected=d.get()}),co({className:s("g-ui-switch",D("g-ui-switch-size-",a,"md"),o)},lo({type:w.type,name:w.name,value:d,checked:f,className:s("g-ui-switch-input",D("g-ui-switch-size-",a,"md"),u?.className),...p}),mo(r,()=>po({className:"g-ui-switch-label"},r)))}import{Div as Re,Span as ur,when as ot,state as gr,after as zi}from"@granularjs/core";import{Span as ho}from"@granularjs/core";function xe(...e){let{props:i,children:t}=g(e,{size:"md"});return ho({...i,className:s("g-ui-icon",D("g-ui-icon-size-",i.size,"md"),D("g-ui-icon-color-",i.color),i.className)},...t)}function bo(...e){let{props:i,rawProps:t}=g(e,{data:[],size:"md"}),{data:r,value:a,size:o,leftSection:n,rightSection:u,placeholder:c,className:d,...p}=i,{onChange:x}=t,f=gr(!1),l=gr(m(a)??"");zi(a).change(M=>{let C=m(M);C!==void 0&&l.set(C??"")});let w=M=>{l.set(M),x?.(M),f.set(!1)},z=zi(l).compute(M=>M?"":"g-ui-select-placeholder"),I=zi(l).compute(M=>{let T=(m(r)??[]).find(S=>S.value===M);return M?T?.label??"":c??""});return Re({...p,className:s("g-ui-select-root",d)},Re({className:s("g-ui-input-wrapper",D("g-ui-input-size-",o,"md"))},ot(n,()=>Re({className:"g-ui-input-section"},n)),Re({className:s("g-ui-select",z),onClick:()=>f.set(!f.get())},ur({className:"g-ui-select-value"},I)),ot(u,()=>Re({className:"g-ui-input-section"},u),()=>ur({className:"g-ui-select-caret"},xe({innerHTML:rr})))),ot(f,()=>Re({className:"g-ui-select-dropdown"},(m(r)??[]).map(M=>Re({className:s("g-ui-select-item",zi(l).compute(C=>C===M.value?"g-ui-select-item-active":"")),onClick:()=>w(M.value)},M.label)))))}import{Button as xo,Div as Ze,state as Me,after as ri,list as wo,when as yo}from"@granularjs/core";function ko(...e){let{props:i,rawProps:t}=g(e,{tabs:[],orientation:"horizontal",variant:"default",sticky:!0}),{value:r,tabs:a,orientation:o,variant:n,sticky:u,className:c,style:d}=i,{onChange:p}=t,x=Me(m(r)??m(a)?.[0]?.value??""),f=Me(),l=Me(),w=Me(0),z=Me(0),I=Me(0),M=Me(0),C=Me(!1),T=Me(0),S=!1,h=null,y=!1,v=new Set;ri(r).change(k=>{let F=m(k);F!=null&&x.set(F)});let P=k=>{x.set(k),p?.(k)},N=k=>{let F=[],j=k?.parentElement;for(;j;){let U=getComputedStyle(j),K=`${U.overflow}${U.overflowY}${U.overflowX}`;/(auto|scroll)/.test(K)&&F.push(j),j=j.parentElement}return F},L=k=>N(k)[0]??null,G=k=>k?k.getBoundingClientRect().top:0,Q=k=>k?k.scrollTop:window.scrollY||window.pageYOffset||0,J=(k,F)=>k>F?"down":k<F?"up":"none",ne=(k,F,j,U)=>k==="down"&&F<j?!0:k==="up"&&F>=j?!1:U,ee=()=>{let k=f.get(),F=l.get();if(!k||!F)return;if(!ye(u)){C.set(!1),w.set(0);return}if(typeof window>"u")return;let j=k.getBoundingClientRect(),U=F.getBoundingClientRect(),K=L(k),le=G(K),ve=Q(K),De=J(ve,T.get());T.set(ve);let Fe=ne(De,j.top,le,C.get());w.set(U.height),z.set(j.left),I.set(j.width),M.set(le),Fe!==C.get()&&C.set(Fe)},se=()=>{h==null&&(h=requestAnimationFrame(()=>{h=null,ee()}))},ge=k=>{!k||v.has(k)||(v.add(k),k.addEventListener("scroll",se,{passive:!0}))},re=()=>{if(S)return;let k=f.get(),F=l.get();!k||!F||typeof window>"u"||(S=!0,ee(),ge(window),window.addEventListener("resize",se),N(k).forEach(ge))};ri(l,f,u).change(re),!y&&typeof window<"u"&&(y=!0,setTimeout(()=>re(),0));let $=ri(C,z,I,M).compute(k=>{let[F,j,U,K]=k;return F?{position:"fixed",top:`${K}px`,left:`${j}px`,width:`${U}px`,background:"var(--g-ui-surface)",zIndex:100}:{position:"static",top:"auto",left:"auto",width:"auto",zIndex:"auto",background:"transparent"}}),O=ri(C,w).compute(k=>{let[F,j]=k;return{height:F?`${j}px`:"0px"}});return Ze(Ze({className:s("g-ui-tabs",me(o,{vertical:"g-ui-tabs-vertical"}),D("g-ui-tabs-variant-",n,"default"),i.className??c)},Ze({node:f}),Ze({style:O}),Ze({node:l,className:"g-ui-tabs-list",style:$},wo(a,k=>xo({className:ri(x,k.value).compute(([F,j])=>s("g-ui-tabs-tab",j===F&&"g-ui-tabs-tab-active")),onClick:()=>P(k.get().value)},k.label))),Ze({className:"g-ui-tabs-panel"},yo(x,()=>a.get()?.find(k=>k.value===x.get())?.content??null))))}import{Table as zo,Thead as No,Tbody as Co,Tr as So,Th as Do,Td as Po,list as cr,when as pr,after as nt}from"@granularjs/core";function Mo(...e){let{props:i}=g(e,{headers:[],rows:[]}),{headers:t,rows:r,striped:a,highlightOnHover:o,withBorder:n,withColumnBorders:u,withRowBorders:c,className:d,style:p,...x}=i,f=nt(t).compute(l=>l.length>0);return zo({...x,className:s("g-ui-table",Y("g-ui-table-striped",a),Y("g-ui-table-hover",o),Y("g-ui-table-with-border",n),Y("g-ui-table-column-borders",u),Y("g-ui-table-row-borders",c),d)},pr(f,()=>No(lr(t,!0))),Co(cr(r,l=>lr(l,!1))))}var lr=(e,i)=>{let t=nt(e).compute(o=>Array.isArray(o)),r=o=>{let n=nt(o).compute(u=>Object.values(u));return a(n)},a=o=>cr(o,n=>(console.log("INFO ABOUT NEXT",i),i?Vo(n):To(n)));return So(pr(t,()=>a(e),()=>r(e)))},To=e=>Po(e),Vo=e=>Do(e);import{Div as st}from"@granularjs/core";import{state as Lo,when as $o,after as Io}from"@granularjs/core";function Ao(...e){let{props:i,children:t}=g(e,{opened:!1}),{opened:r,className:a,...o}=i,n=Lo(ye(r));Io(r).change(p=>{n.set(ye(p))});let u=()=>{n.set(!n.get())},c=t[0],d=t[1];return st({...o,className:s("g-ui-accordion",a)},st({className:"g-ui-accordion-header",onClick:u},c),$o(n,()=>st({className:"g-ui-accordion-content"},d)))}import{Span as dr}from"@granularjs/core";function Bo(...e){let{props:i,children:t}=g(e),{label:r,className:a,style:o}=i;return dr({className:s("g-ui-tooltip",a)},t,dr({className:"g-ui-tooltip-content"},r))}import{Div as ai,when as Fo,after as Eo,state as oi,portal as jo}from"@granularjs/core";var ut=oi({currentOpenState:null});function Ro(...e){let i=oi(),t=oi(),r=oi({}),{props:a,rawProps:o,children:n}=g(e,{position:"right"}),{opened:u,content:c,position:d,className:p,...x}=a,{onChange:f}=o,l=oi(m(u)??!1);Eo(u).change(S=>{let h=m(S);h!=null&&(l.set(!!h),h&&w())});let w=()=>{ut.get().currentOpenState!==l&&(ut.get().currentOpenState?.set(!1),ut.set().currentOpenState=l)};u.get()&&w();let z=S=>{let y=String(S??"right").toLowerCase().split("-").filter(Boolean);if(y.length===1){let N=y[0];return N==="top"||N==="bottom"?{placement:N,align:"center"}:N==="left"||N==="right"?{placement:"bottom",align:N}:N==="center"?{placement:"bottom",align:"center"}:{placement:"bottom",align:"right"}}let[v,P]=y;return v==="top"||v==="bottom"?{placement:v,align:P||"center"}:v==="left"||v==="right"?{placement:v,align:P||"center"}:{placement:"bottom",align:"right"}},I=()=>{let S=i.get(),h=t.get();if(!S||!h||typeof window>"u")return;let y=S.getBoundingClientRect(),v=h.getBoundingClientRect(),P=m(d)??"right",N=getComputedStyle(document.documentElement).getPropertyValue("--g-ui-space-20"),L=Number.parseFloat(N)||20,G=window.innerWidth||0,Q=window.innerHeight||0,J=Math.max(L,G-v.width-L),ne=Math.max(L,Q-v.height-L),{placement:ee,align:se}=z(P),ge=8,re=y.bottom+ge,$=y.left;ee==="top"||ee==="bottom"?(re=ee==="top"?y.top-v.height-ge:y.bottom+ge,se==="center"?$=y.left+y.width/2-v.width/2:se==="right"?$=y.right-v.width:$=y.left):(ee==="left"||ee==="right")&&($=ee==="left"?y.left-v.width-ge:y.right+ge,se==="center"?re=y.top+y.height/2-v.height/2:se==="bottom"?re=y.bottom-v.height:re=y.top),$=Math.max(L,Math.min($,J)),re=Math.max(L,Math.min(re,ne)),r.set({top:`${re}px`,left:`${$}px`})},M=S=>{l.set(S),f?.(S),S&&(w(),typeof requestAnimationFrame=="function"?requestAnimationFrame(()=>I()):setTimeout(()=>I(),0))},C=()=>M(!l.get()),T=()=>M(!1);return ai({...x,node:i,className:s("g-ui-menu",p)},ai({onClick:C},n),Fo(l,()=>jo(ai(ai({className:"g-ui-menu-overlay",onClick:T}),ai({className:"g-ui-menu-dropdown",node:t,style:r},c)))))}import{Div as mr,portal as Ho,when as Oo}from"@granularjs/core";function Wo(...e){let{props:i,children:t}=g(e,{position:"right",size:"md",overlay:"normal",shadowed:!0}),{opened:r,onClose:a,position:o,size:n,overlay:u,shadowed:c,className:d,style:p}=i;return Oo(r,()=>Ho(mr({className:s("g-ui-drawer-overlay",D("g-ui-drawer-overlay-",u,"normal")),onClick:a},mr({className:s("g-ui-drawer",me(c,{true:"g-ui-drawer-shadowed"},!0),D("g-ui-drawer-",o,"right"),D("g-ui-drawer-size-",n,"md"),d),onClick:x=>x.stopPropagation()},t))))}import{Button as qo,Div as gt,Span as fr,when as Ni,after as vr}from"@granularjs/core";function lt(...e){let{props:i,rawProps:t,children:r}=g(e,{color:"blue",withCloseButton:!0}),{title:a,color:o,icon:n,loading:u,withCloseButton:c,withBorder:d,className:p,style:x}=i,{onClose:f}=t,l=vr(n,u).compute(([z,I])=>!z&&!!I),w=vr(n,u).compute(([z,I])=>!!z||!!I);return gt({className:s("g-ui-notification",[d,"g-ui-notification-bordered"],[o,z=>`g-ui-notification-${z}`],[w,"g-ui-notification-with-icon"],p)},Ni(n,()=>fr({className:"g-ui-notification-icon"},n)),Ni(l,()=>ti({size:"sm",className:"g-ui-notification-loader"})),gt({className:"g-ui-notification-body"},Ni(a,()=>gt({className:"g-ui-notification-title"},a)),r),Ni(c,()=>qo({type:"button",className:"g-ui-notification-close",onClick:()=>f?.()},fr({innerHTML:$e}))))}import{Div as Yo,when as Go}from"@granularjs/core";function Zo(...e){let{props:i}=g(e,{labelPosition:"center"}),{label:t,labelPosition:r,vertical:a,className:o,...n}=i;return Yo({...n,className:s("g-ui-divider",Y("label",t),D("g-ui-divider-label-",r,"center"),Y("g-ui-divider-vertical",a),o)},Go(t,()=>Ui({className:"g-ui-divider-label-text",size:"sm"},t)))}import{Div as Uo}from"@granularjs/core";function _o(...e){let{props:i,children:t}=g(e,{padding:"md",radius:"md",shadow:"none"}),{padding:r,radius:a,shadow:o,className:n,...u}=i;return Uo({...u,className:s("g-ui-paper",[r,c=>`g-ui-card-padding-${c}`],[a,c=>`g-ui-card-radius-${c}`],[o,c=>`g-ui-card-shadow-${c}`],n)},t)}import{Button as Xo,Div as ct,Span as Ko,after as hr,when as pt}from"@granularjs/core";function Qo(...e){let{props:i,rawProps:t,children:r}=g(e,{color:"blue"}),{title:a,color:o,icon:n,withCloseButton:u,className:c,...d}=i,{onClose:p}=t,x=hr(a,u).compute(([l,w])=>l||w),f=hr(n).compute(l=>l!==void 0);return ct({...d,className:s("g-ui-alert",[o,l=>`g-ui-alert-${l}`],c)},ct({className:"g-ui-alert-header"},pt(n,()=>Ko({className:"g-ui-alert-icon"},n)),pt(a,()=>ct({className:"g-ui-alert-title"},a)),pt(u,()=>Xo({type:"button",className:"g-ui-alert-close",onClick:()=>p?.()},"\xD7"))),r)}import{Div as Jo,Img as en,when as tn}from"@granularjs/core";function rn(...e){let{props:i,children:t}=g(e,{size:"md",alt:""}),{src:r,size:a,alt:o,className:n,...u}=i;return Jo({...u,className:s("g-ui-avatar",[a,c=>`g-ui-avatar-size-${c}`],n)},tn(r,()=>en({className:"g-ui-avatar-img",src:r,alt:o}),()=>t))}import{Span as an}from"@granularjs/core";function on(...e){let{props:i,children:t}=g(e),{className:r,...a}=i;return an({...a,className:s("g-ui-kbd",r)},t)}import{Code as nn}from"@granularjs/core";function sn(...e){let{props:i,children:t}=g(e),{className:r,...a}=i;return nn({...a,className:s("g-ui-code",r)},t)}import{Blockquote as un}from"@granularjs/core";function gn(...e){let{props:i,children:t}=g(e),{className:r,...a}=i;return un({...a,className:s("g-ui-blockquote",r)},t)}import{Div as ln}from"@granularjs/core";function cn(...e){let{props:i,children:t}=g(e,{cols:3,gap:"md"}),{cols:r,gap:a,className:o,...n}=i;return ln({...n,className:s("g-ui-grid",[a,u=>`g-ui-gap-${u}`],[r,u=>`g-ui-grid-cols-${u}`],o)},t)}import{Ul as pn,Ol as dn,Li as dt,Div as Ci,Span as mt,after as ft,when as He,isSignal as mn,isState as fn,isStatePath as vn,isComputed as hn}from"@granularjs/core";function br(...e){let{props:i,children:t}=g(e,{type:"none",size:"md"}),{type:r,size:a,withPadding:o,className:n,...u}=i,c=me(r,{ordered:"g-ui-list-ordered",unordered:"g-ui-list-unordered",none:"g-ui-list-none"}),d=ft(r).compute(z=>z==="ordered"),p=z=>z&&typeof z=="object"&&typeof z.tagName=="string"&&(z.tagName.toLowerCase()==="ul"||z.tagName.toLowerCase()==="ol"),x=z=>z&&typeof z=="object"&&typeof z.tagName=="string"&&z.tagName.toLowerCase()==="li",f=z=>{console.log("INFO ABOUT ITEM",z,typeof z,typeof z?.tagName,z?.tagName?.toLowerCase());let I=M=>M?.nodeType==="granular-list-node"?M:M==null||M===!1?null:Array.isArray(M)?M.map(C=>I(C)):x(M)?M:p(M)?dt({className:"g-ui-list-nested-item"},M):dt(mt({className:"g-ui-list-item-shell"},M));return mn(z)||fn(z)||vn(z)||hn(z)?ft(z).compute(M=>I(M)):I(z)},l=He(t,()=>t.map(z=>f(z))),w={...u,className:s("g-ui-list",D("g-ui-list-size-",a,"md"),Y("g-ui-list-with-padding",o),c,n)};return He(d,()=>dn(w,l),()=>pn(w,l))}function bn(...e){let{props:i,children:t}=g(e,{withBorder:!1}),{leftSection:r,rightSection:a,title:o,body:n,withBorder:u,className:c,...d}=i,p=ft(o,n).compute(([x,f])=>!!x||!!f);return dt({...d,className:s("g-ui-list-item",Y("g-ui-list-item-border",u),c)},Ci({className:"g-ui-list-item-shell"},He(r,()=>mt({className:"g-ui-list-item-section g-ui-list-item-section-left"},r)),He(p,()=>Ci({className:"g-ui-list-item-content"},He(o,()=>Ci({className:"g-ui-list-item-title"},o)),He(n,()=>Ci({className:"g-ui-list-item-body"},n))),()=>t),He(a,()=>mt({className:"g-ui-list-item-section g-ui-list-item-section-right"},a))))}br.Item=bn;import{A as xn}from"@granularjs/core";function wn(...e){let{props:i,children:t}=g(e),{className:r,...a}=i;return xn({...a,className:s("g-ui-anchor",r)},t)}import{Img as yn}from"@granularjs/core";function kn(...e){let{props:i}=g(e),{className:t,...r}=i;return yn({...r,className:s("g-ui-image",t)})}import{Div as xr}from"@granularjs/core";function zn(...e){let{props:i}=g(e,{value:0,color:"primary",size:"md"}),{value:t,color:r,size:a,className:o,...n}=i;return xr({...n,className:s("g-ui-progress",D("g-ui-progress-size-",a,"md"),[t,u=>{let c=Math.max(0,Math.min(100,Number(u)||0));return`g-ui-progress-${Math.round(c/5)*5}`}],[r,u=>u?`g-ui-progress-${u}`:""],o)},xr({className:"g-ui-progress-bar"}))}import{Div as Ie,after as Oe,state as Nn,when as wr,list as Cn}from"@granularjs/core";function Sn(...e){let{props:i,rawProps:t}=g(e,{size:"md",min:0,max:100,step:1}),{onChange:r}=t,{value:a,marks:o,size:n,min:u,max:c,step:d,disabled:p,className:x,...f}=i,l=Nn(m(a??u)),w=Oe(o).compute(h=>h&&h.length>0);Oe(a).change(h=>{h!=null&&l.set(m(h))});let z=()=>{let h=Number(m(u)),y=Number(m(c));return!Number.isFinite(h)||!Number.isFinite(y)?{minValue:0,maxValue:100}:{minValue:Math.min(h,y),maxValue:Math.max(h,y)}},I=()=>{let h=Number(m(d));return Number.isFinite(h)&&h>0?h:1},M=h=>{let{minValue:y,maxValue:v}=z(),P=I(),N=Math.max(y,Math.min(v,Number(h))),L=Math.round((N-y)/P)*P+y;L!==l.get()&&(l.set(L),r?.(L))},C=Oe(l).compute(h=>{let{minValue:y,maxValue:v}=z(),P=v-y;if(P<=0)return 0;let N=(Number(h??y)-y)/P*100;return Math.max(0,Math.min(100,N))}),T=(h,y)=>{let v=y?.();if(!v||v.width===0)return;let N=Math.min(Math.max(h.clientX-v.left,0),v.width)/v.width,{minValue:L,maxValue:G}=z();M(L+N*(G-L))},S=h=>{if(ye(p))return;h.preventDefault?.();let y=h.currentTarget,v=()=>y.getBoundingClientRect();y.setPointerCapture?.(h.pointerId),T(h,v);let P=L=>T(L,v),N=()=>{y.releasePointerCapture?.(h.pointerId),window.removeEventListener("pointermove",P),window.removeEventListener("pointerup",N)};window.addEventListener("pointermove",P),window.addEventListener("pointerup",N)};return Ie({...f,className:s("g-ui-slider",D("g-ui-slider-size-",n,"md"),Y("g-ui-slider-disabled",p),x)},Ie({className:"g-ui-slider-track",onPointerDown:S},Ie({className:"g-ui-slider-bar",style:Oe(C).compute(h=>({width:`${h}%`}))}),Ie({className:"g-ui-slider-thumb",style:Oe(C).compute(h=>({left:`${h}%`}))})),wr(w,()=>Ie({className:"g-ui-slider-marks-placeholder"})),wr(o,()=>Ie({className:"g-ui-slider-marks"},Cn(o,h=>vt({mark:h,getBounds:z})))))}var vt=({mark:e,getBounds:i})=>{let{minValue:t,maxValue:r}=i(),a=r-t,o=Oe(e).compute(d=>d.value??d),n=Oe(e).compute(d=>d.label??String(d.value)??o),u=Number(o),c=0;return a>0&&(c=(u-t)/a*100),Ie({className:"g-ui-slider-mark",style:{left:`${Math.max(0,Math.min(100,c))}%`}},Ie({className:"g-ui-slider-mark-label"},n))};import{Div as Dn,after as Pn}from"@granularjs/core";function Mn(...e){let{props:i}=g(e,{height:"md",width:"full"}),{height:t,width:r,className:a,...o}=i,n=Pn(t,r).compute(([u,c])=>{let d={};return isNaN(u)||(d.height=`${u}px`),isNaN(c)||(d.width=`${c}px`),d});return Dn({...o,style:{width:n.width,height:n.height,...o.style||{}},className:s("g-ui-skeleton",[t,u=>`g-ui-skeleton-h-${u}`],[r,u=>`g-ui-skeleton-w-${u}`],a)})}import{Button as Tn,after as yr,state as Vn}from"@granularjs/core";function Ln(...e){let{props:i,rawProps:t,children:r}=g(e,{size:"md",variant:"filled",color:"primary"}),{checked:a,size:o,variant:n,color:u,className:c,...d}=i,{onChange:p}=t,x=Vn(!!a);yr(a).change(l=>{l!=null&&x.set(!!l)});let f=l=>{x.set(l),p?.(l)};return Tn({...d,type:"button",className:s("g-ui-chip",D("g-ui-chip-size-",o,"md"),D("g-ui-chip-variant-",n,"filled"),D("g-ui-chip-color-",u,"primary"),yr(x).compute(l=>l?"g-ui-chip-active":""),c),onClick:()=>f(!x.get())},r)}import{Div as ht,after as kr,state as $n,list as In}from"@granularjs/core";function An(...e){let{props:i,rawProps:t}=g(e,{data:[],size:"sm"}),{value:r,data:a,size:o,scroll:n,className:u,...c}=i,{onChange:d}=t,p=$n(m(r));kr(r).change(f=>{let l=m(f);l!=null&&p.set(l)});let x=f=>{p.set(f),d?.(f)};return ht({...c,className:s(n&&"g-ui-segmented-scroll")},ht({className:s("g-ui-segmented",D("g-ui-segmented-size-",o,"sm"),u)},In(a,(f=>ht({className:s("g-ui-segmented-item",kr(p).compute(l=>f.get().value===l?"g-ui-segmented-active":"")),onClick:()=>x(f.get().value)},f.label)))))}import{Button as bt,Div as Bn,state as Fn,after as Si}from"@granularjs/core";function En(...e){let{props:i,rawProps:t}=g(e,{total:1,size:"md"}),{page:r,total:a,size:o,className:n,...u}=i,{onChange:c}=t,d=Fn(m(r)??1);Si(r).change(l=>{let w=m(l);w!=null&&d.set(w)});let p=l=>{let w=Number(m(a))||1,z=Math.max(1,Math.min(w,l));d.set(z),c?.(z)},x=[],f=Number(m(a))||1;for(let l=1;l<=f;l+=1)x.push(l);return Bn({...u,className:s("g-ui-pagination",D("g-ui-pagination-size-",o,"md"),i.className??n)},bt({className:"g-ui-pagination-item",onClick:()=>p((d.get?.()??d)-1),disabled:Si(d).compute(l=>l<=1)},"<"),x.map(l=>bt({className:Si(d).compute(w=>s("g-ui-pagination-item",l===w&&"g-ui-pagination-item-active")),onClick:()=>p(l)},String(l))),bt({className:"g-ui-pagination-item",onClick:()=>p((d.get?.()??d)+1),disabled:Si(d).compute(l=>l>=a)},">"))}import{Div as On,Input as Wn,Label as qn,Span as zr,when as Nr,after as yt,state as Yn}from"@granularjs/core";import{Div as jn,context as Rn,after as xt}from"@granularjs/core";var wt=Rn({name:"",selected:null});function Hn(...e){let{props:i,children:t,rawProps:r}=g(e),{className:a,name:o,selected:n,onChange:u,...c}=i,{onChange:d}=r,p=wt.scope({name:o?.get(),selected:n?.get()});return console.log("selected?.get()",n?.get()),xt(o).change(x=>{p.set().name=x}),xt(n).change(x=>{x!==p.selected.get()&&(p.set().selected=x)}),xt(p.selected).change(x=>{d?.(x)}),p.serve(jn({...c,className:s("g-ui-stack g-ui-gap-sm",a)},t))}function Gn(...e){let{props:i,rawProps:t}=g(e,{size:"md"}),{label:r,name:a,value:o,checked:n,description:u,size:c,className:d,inputProps:p,...x}=i,{onChange:f}=t,l=Yn(n?.get()??!1),w=wt.state(),z=yt(w.name,a).compute(([M,C])=>M||C);yt(n,w.selected).change(M=>{let[C,T]=M;w.get().name?l.set(T===o.get()):l.set(C)}),yt(l).change(M=>{f?.(M),M&&w.get().name&&(w.set().selected=o.get())});let I=qn({className:"g-ui-radio-control"},Wn({type:"radio",name:z,value:o,checked:l,className:s("g-ui-radio-input",D("g-ui-radio-size-",c,"md"),p?.className),...x}),Nr(r,()=>zr({className:"g-ui-radio-label"},r)));return On({className:s("g-ui-radio",D("g-ui-radio-size-",c,"md"),d)},I,Nr(u,()=>zr({className:"g-ui-radio-description"},u)))}import{Nav as Zn,Span as Un}from"@granularjs/core";function _n(...e){let{props:i,children:t}=g(e,{separator:"/"}),{separator:r,className:a,...o}=i,n=[];Array.isArray(t)?n.push(...t):n.push(t);let u=n.filter(Boolean),c=[];return u.forEach((d,p)=>{c.push(d),p<u.length-1&&c.push(Un({className:"g-ui-breadcrumbs-separator"},r))}),Zn({...o,className:s("g-ui-breadcrumbs",a)},c)}import{Div as Xn}from"@granularjs/core";function Kn(...e){let{props:i,children:t}=g(e),{className:r,...a}=i;return Xn({...a,className:s("g-ui-center",r)},t)}import{Div as Qn}from"@granularjs/core";function Jn(...e){let{props:i}=g(e,{size:"md"}),{size:t,className:r,...a}=i;return Qn({...a,className:s("g-ui-space",[t,o=>`g-ui-space-${o}`],r)})}import{Div as es,when as is}from"@granularjs/core";function ts(...e){let{props:i,children:t}=g(e),{opened:r,className:a,...o}=i;return is(r,()=>es({...o,className:s("g-ui-collapse",a)},t))}import{Button as rs}from"@granularjs/core";function We(...e){let{props:i,children:t}=g(e,{size:"md",variant:"filled"}),{size:r,variant:a,color:o,className:n,...u}=i;return rs({...u,type:"button",className:s("g-ui-action-icon",D("g-ui-action-icon-size-",r,"md"),D("g-ui-action-icon-color-",o,"primary"),D("g-ui-action-icon-",a,"filled"),n)},t)}import{Div as kt,when as as,after as os,state as ns}from"@granularjs/core";function zt(...e){let{props:i,rawProps:t,children:r}=g(e,{position:"left"}),{opened:a,position:o,content:n,className:u,...c}=i,{onChange:d}=t,p=ns(m(a)??!1);os(a).change(f=>{let l=m(f);l!=null&&p.set(!!l)});let x=f=>{p.set(f),d?.(f)};return kt({...c,className:s("g-ui-popover",i.className??u)},kt({onClick:()=>x(!p.get())},r),as(p,()=>kt({className:s("g-ui-popover-dropdown",o==="right"&&"g-ui-popover-right",o==="center"&&"g-ui-popover-center")},n)))}import{Div as Cr}from"@granularjs/core";function ss(...e){let{props:i,children:t}=g(e,{position:"left"}),{position:r,content:a,className:o,...n}=i;return Cr({...n,className:s("g-ui-hover-card",o)},t,Cr({className:s("g-ui-hover-card-dropdown",[r,u=>u==="right"?"g-ui-hover-card-right":""],[r,u=>u==="center"?"g-ui-hover-card-center":""])},a))}import{Div as us}from"@granularjs/core";function gs(...e){let{props:i,children:t}=g(e,{position:"bottom-right"}),{position:r,className:a,...o}=i;return us({...o,className:s("g-ui-affix",[r,n=>`g-ui-affix-${n}`],a)},t)}import{Fieldset as ls,Legend as cs,when as ps}from"@granularjs/core";function ds(...e){let{props:i,children:t}=g(e),{legend:r,className:a,...o}=i;return ls({...o,className:s("g-ui-fieldset",a)},ps(r,()=>cs({className:"g-ui-legend"},r)),t)}import{Div as ms}from"@granularjs/core";function fs(...e){let{props:i,children:t}=g(e,{position:"sticky"}),{position:r,className:a,...o}=i;return ms({...o,className:s("g-ui-appbar",D("g-ui-appbar-",r,"sticky"),a)},t)}import{Div as Nt,portal as vs,after as Di,state as Sr,when as Dr}from"@granularjs/core";function hs(...e){let{props:i,children:t}=g(e,{position:"left",size:"md",blur:!0,fixed:!1,minWidth:"button"});return Dr(i.fixed,()=>xs(i,t),()=>bs(i,t))}var bs=(e,i)=>{let{open:t,onClose:r,position:a,size:o,blur:n,fixed:u,minWidth:c,className:d,...p}=e,x=Sr(!1),f=Sr(!1),l=220,w=M=>{if(M){x.set(!0),typeof requestAnimationFrame=="function"?requestAnimationFrame(()=>f.set(!0)):setTimeout(()=>f.set(!0),0);return}f.set(!1),setTimeout(()=>x.set(!1),l)};w(!!t.get()),Di(t).change(M=>w(!!M));let z=Di(f,n).compute(M=>{let[C,T]=M;return s("g-ui-sidebar-overlay",C&&"g-ui-sidebar-overlay-open",!T&&"g-ui-sidebar-overlay-noblur")}),I=Di(o,a,f,d).compute(M=>{let[C,T,S,h]=M,y=T==="right"?"g-ui-sidebar-drawer-right g-ui-sidebar-position-right":"g-ui-sidebar-drawer-left";return s("g-ui-sidebar","g-ui-sidebar-drawer",`g-ui-sidebar-size-${C}`,y,S&&"g-ui-sidebar-drawer-open",m(h))});return Dr(x,()=>vs(Nt({className:z,onClick:r},Nt({className:I,onClick:M=>M.stopPropagation()},i))))},xs=(e,i)=>{let{open:t,position:r,size:a,minWidth:o,className:n,...u}=e,c=Di(a,r,t,o,n).compute(d=>{let[p,x,f,l,w]=d,z=l||"button",I=null;return z==="button"?I="g-ui-sidebar-min-button":z==="xs"?I="g-ui-sidebar-min-xs":z==="sm"?I="g-ui-sidebar-min-sm":z==="md"&&(I="g-ui-sidebar-min-md"),s("g-ui-sidebar g-ui-sidebar-fixed",`g-ui-sidebar-size-${p||"md"}`,I,f&&"g-ui-sidebar-fixed-open",w)});return Nt({...u,className:c},i)};import{Div as Ae,when as Ct,list as Pr,after as we,resolve as Be,state as ws}from"@granularjs/core";var ys=10;function ks(e){return(e??[]).map(t=>{if(t==null)return 1;let r=Number(t.weight);return Number.isFinite(r)&&r>=0?r:1})}function Pi(e){let i=(e??[]).length;if(i<2)return{totalWeight:0,cumulativeWeights:[0]};let r=ks(e).slice(0,i-1),a=r.reduce((n,u)=>n+u,0),o=[0];for(let n=0;n<r.length;n++)o.push(o[n]+r[n]);return{totalWeight:a,cumulativeWeights:o}}function Mr(e,i,t,r){if(r<1||t<=0)return 0;let a=Math.max(0,Math.min(100,e));for(let o=r-1;o>=0;o--){let n=i[o]/t*100;if(a>=n)return o}return 0}function zs(e,i,t,r,a,o,n){let u=e,c=(n??[]).length;if(c===0)return{activeStep:0,progressPct:0};if(u==="step")return{activeStep:Math.max(0,Math.min(c-1,Math.floor(i??0))),progressPct:0};if(u==="percent"){let d=Math.max(0,Math.min(100,Number(t)||0)),p=Pi(n);return{activeStep:Mr(d,p.cumulativeWeights,p.totalWeight,c),progressPct:d}}if(u==="time"){let d=Number(r)||0,p=a,x=o,f=0;if(Array.isArray(p)&&p.length>=c?f=p.slice(0,c).reduce((C,T)=>C+(Number(T)||0),0):typeof x=="number"&&x>0&&(f=x),f<=0)return{activeStep:0,progressPct:0};let l=f/c,w=0;if(Array.isArray(p)&&p.length>=c){let C=0;for(let T=0;T<c;T++){if(C+=Number(p[T])||0,d<C){w=T;break}w=T}}else w=Math.min(c-1,Math.floor(d/l));let z=Math.min(100,d/f*100),I=Pi(n);return{activeStep:Mr(z,I.cumulativeWeights,I.totalWeight,c),progressPct:z}}return{activeStep:0,progressPct:0}}function Ns(e,i,t,r,a,o){if(a<2||r<0||r>=a-1)return 0;if(e==="step")return i>r?100:0;let{totalWeight:n,cumulativeWeights:u}=o??Pi([]);if(n<=0)return 0;let c=u[r]/n*100,d=u[r+1]/n*100;if(t<=c)return 0;if(t>=d)return 100;let p=d-c;return p<=0?0:(t-c)/p*100}var Cs=0;function Ss(e){let i=document.getElementById(e);if(!i)return;let t=i.querySelectorAll(".g-ui-timeline-item");if(t.length<2)return[];let r=[];for(let a=0;a<t.length-1;a++){let o=t[a].offsetTop+ys,n=t[a+1].offsetTop-t[a].offsetTop;r.push({top:o,height:n})}return r}function Ds(...e){let{props:i,rawProps:t}=g(e,{items:[],mode:"step",active:0,progress:0,elapsedMs:0,stepDurationsMs:null,totalDurationMs:null,clickable:!1}),{items:r,mode:a,active:o,progress:n,elapsedMs:u,stepDurationsMs:c,totalDurationMs:d,clickable:p,className:x,...f}=i,{onChange:l}=t,w=`g-ui-timeline-${++Cs}`,z=ws([]),I=we(a,o,n,u,c,d,r).compute(S=>{let[h,y,v,P,N,L,G]=S;return zs(h,y,v,P,N,L,G)}),M=we(a).compute(S=>{let h=Be(S);return h==="time"||h==="percent"||h==="step"}),C=we(a).compute(S=>Be(S));function T(){setTimeout(()=>{let S=Ss(w);S.length&&z.set(S)},0)}return we(r).change(()=>T()),T(),Ae({...f,id:w,className:s("g-ui-timeline",we(a).compute(S=>S?`g-ui-timeline-mode-${Be(S)}`:""),we(M).compute(S=>S?"g-ui-timeline-has-track":""),we(p).compute(S=>Be(S)?"g-ui-timeline-clickable":""),x)},Ct(M,()=>Pr(z,(S,h)=>{let y=we(S).compute(N=>N?{top:`${N.top}px`,height:`${N.height}px`}:{}),v=we(I,h,r,C).compute(([N,L,G,Q])=>{let J=G??[],ne=J.length,ee=Pi(J);return Ns(Q,N?.activeStep??0,N?.progressPct??0,Be(L)??0,ne,ee)}),P=we(v).compute(N=>`${Math.max(0,Math.min(100,N))}%`);return Ae({className:"g-ui-timeline-track-segment",style:we(y).compute(N=>N)},Ae({className:"g-ui-timeline-track-fill",style:we(P).compute(N=>N?{height:N}:{height:"0%"})}))})),Pr(r,(S,h)=>{let y=we(I,h).compute(([N,L])=>{let G=N?.activeStep??0,Q=Be(L)??0;return Q<G?"completed":Q===G?"active":"future"}),v=we(y).compute(N=>N?`g-ui-timeline-item-${N}`:""),P=Be(p)&&typeof l=="function"?()=>{let N=Be(h);typeof N=="number"&&l(N)}:void 0;return Ae({className:s("g-ui-timeline-item",v),onClick:P,role:P?"button":void 0,tabIndex:P?0:void 0},Ae({className:"g-ui-timeline-dot"}),Ae({className:"g-ui-timeline-content"},Ct(S.title,()=>Ae({className:"g-ui-timeline-title"},S.title)),Ct(S.description,()=>Ae({className:"g-ui-timeline-desc"},S.description)),S.content))}))}import{Div as Mi,list as Ps}from"@granularjs/core";function Ms(...e){let{props:i}=g(e,{active:0,items:[]}),{active:t,items:r,className:a,...o}=i;return Mi({...o,className:s("g-ui-stepper",a)},Ps(r,(n,u)=>Mi({className:s("g-ui-stepper-item",[t,c=>(console.log("value",c,"idx",u),u.get()===c?"g-ui-stepper-active":"")])},Mi({className:"g-ui-stepper-index"},String(u+1)),Mi({className:"g-ui-stepper-label"},n.label))))}import{Span as Tr,after as Vr,state as Ts}from"@granularjs/core";function Vs(...e){let{props:i,rawProps:t}=g(e,{value:0,max:5,size:"md"}),{value:r,max:a,size:o,className:n,...u}=i,{onChange:c}=t,d=Ts(m(r));Vr(r).change(l=>{let w=m(l);w!=null&&d.set(w)});let p=l=>{d.set(l),c?.(l)},x=[],f=Number(m(a))||0;for(let l=1;l<=f;l+=1)x.push(l);return Tr({...u,className:s("g-ui-rating",D("g-ui-rating-size-",o,"md"),i.className??n)},x.map(l=>Tr({className:s("g-ui-rating-item",Vr(d).compute(w=>l<=w?"g-ui-rating-item-active":"")),onClick:()=>p(l)},"\u2605")))}import{Span as Ls}from"@granularjs/core";function $s(...e){let{props:i,children:t}=g(e),{className:r,...a}=i;return Ls({...a,className:s("g-ui-tag",r)},t)}import{Button as Lr,Div as Ue,state as $r,after as Ti}from"@granularjs/core";var Is=["S","M","T","W","T","F","S"];function ni(...e){let{props:i,rawProps:t}=g(e,{size:"md"}),{value:r,className:a,size:o,...n}=i,{onChange:u}=t,c=C=>{let T=m(C);if(T instanceof Date)return T;if(T==null)return null;let S=new Date(T);return Number.isNaN(S.getTime())?null:S},d=$r(c(r)??new Date),p=$r(new Date(d.get()));Ti(r).change(C=>{let T=c(C);T!=null&&(d.set(T),p.set(new Date(T)))});let x=(C,T,S)=>{let h=new Date(C,T+1,0).getDate();return new Date(C,T,Math.min(S,h))},f=C=>{let T=p.get(),S=x(T.getFullYear(),T.getMonth(),C);d.set(S),p.set(S),u?.(S)},l=C=>{let T=p.get(),S=x(T.getFullYear(),T.getMonth()+C,T.getDate());p.set(S)},w=C=>{let T=p.get(),S=x(T.getFullYear()+C,T.getMonth(),T.getDate());p.set(S)},z=Ti(p).compute(C=>C.toLocaleString("default",{month:"long"})),I=Ti(p).compute(C=>String(C.getFullYear())),M=Ti(p,d).compute(([C,T])=>{let S=C.getFullYear(),h=C.getMonth(),v=new Date(S,h,1).getDay(),P=new Date(S,h+1,0).getDate(),N=[];for(let L=0;L<v;L+=1)N.push({muted:!0,label:""});for(let L=1;L<=P;L+=1)N.push({label:L});return[...Is.map(L=>Ue({className:"g-ui-calendar-cell g-ui-calendar-cell-muted"},L)),...N.map(L=>Ue({className:s("g-ui-calendar-cell",L.muted&&"g-ui-calendar-cell-muted",L.label&&T.getFullYear()===S&&T.getMonth()===h&&L.label===T.getDate()&&"g-ui-calendar-cell-active"),onClick:()=>L.label&&f(L.label)},L.label))]});return Ue({...n,className:s("g-ui-calendar",a,D("g-ui-calendar-size-",o,"md"))},Ue({className:"g-ui-calendar-header"},We({size:"xs",variant:"subtle",className:"g-ui-calendar-nav",onClick:()=>l(-1)},xe({size:"sm",className:"g-ui-calendar-nav-icon",innerHTML:xi})),Ue({className:"g-ui-calendar-title-group"},Lr({type:"button",className:"g-ui-calendar-title-button",onClick:()=>l(1)},z),Lr({type:"button",className:"g-ui-calendar-title-button",onClick:()=>w(1)},I)),We({size:"xs",variant:"subtle",className:"g-ui-calendar-nav",onClick:()=>l(1)},xe({size:"sm",className:"g-ui-calendar-nav-icon",innerHTML:bi}))),Ue({className:"g-ui-calendar-grid"},M))}import{Div as si,Span as _e,Input as As,when as St,after as Ne,state as Vi}from"@granularjs/core";function Bs(...e){let{props:i,rawProps:t}=g(e,{data:[],size:"md",searchable:!0}),{value:r,data:a,size:o,className:n,placeholder:u,searchable:c,...d}=i,{onChange:p,onSearchChange:x}=t,f=Vi(m(r)??[]),l=Vi(""),w=Vi(!1),z=Vi(null),I=v=>(m(v)??[]).map(N=>typeof N=="string"?{value:N,label:N}:N&&typeof N=="object"?N:{value:String(N),label:String(N)});Ne(r).change(v=>{let P=m(v);P!=null&&f.set(P)});let M=null;Ne(w).change(v=>{if(M&&(M(),M=null),!v)return;let P=N=>{let L=z.get();L&&(L.contains(N.target)||w.set(!1))};document.addEventListener("mousedown",P),M=()=>document.removeEventListener("mousedown",P)}),Ne(l).change(v=>{x?.(v)});let C=v=>{let P=f.get()??[],N=P.includes(v)?P.filter(L=>L!==v):P.concat(v);f.set(N),p?.(N)},T=Ne(a).compute(v=>I(v)),S=Ne(T,l).compute(([v,P])=>{let N=String(m(P)??"").toLowerCase().trim();return N?v.filter(L=>String(L.label??"").toLowerCase().includes(N)):v}),h=Ne(f,l).compute(([v,P])=>{let N=m(v)??[],L=String(m(P)??"");return!N.length&&!L}),y=Ne(c).compute(v=>!!v);return si({...d,node:z,className:s("g-ui-select-multi-root",n)},si({className:s("g-ui-select-multi",D("g-ui-select-multi-size-",o,"md")),onClick:()=>w.set(!0)},Ne(T,f).compute(([v,P])=>(m(P)??[]).map(L=>{let Q=(v??[]).find(J=>J.value===L)?.label??L;return _e({className:"g-ui-select-tag"},_e({className:"g-ui-select-tag-label",onClick:J=>{J?.stopPropagation?.()}},Q),_e({className:"g-ui-select-tag-remove",innerHTML:$e,onClick:J=>{J?.stopPropagation?.(),C(L)}}))})),St(h,()=>_e({className:"g-ui-select-multi-placeholder"},u??"Select...")),St(y,()=>As({className:"g-ui-select-multi-input",value:l,onInput:v=>l.set(v.target?.value??""),onFocus:()=>w.set(!0)}))),St(w,()=>si({className:"g-ui-select-dropdown"},Ne(S).compute(v=>v.length?v.map(P=>si({className:s("g-ui-select-item",P.disabled&&"g-ui-select-item-disabled",Ne(f).compute(N=>(m(N)??[]).includes(P.value)?"g-ui-select-item-active":"")),onClick:()=>{P.disabled||C(P.value)}},_e({className:"g-ui-select-item-check",innerHTML:Ne(f).compute(N=>(m(N)??[]).includes(P.value)?wi:"")}),_e({className:"g-ui-select-item-label"},P.label))):si({className:"g-ui-select-item"},"Nothing found")))))}import{Div as js,list as Rs,portal as Hs}from"@granularjs/core";import{Div as Dt,Button as Fs,when as Ir,state as Es}from"@granularjs/core";function Pt(...e){let{props:i,rawProps:t,children:r}=g(e),{title:a,className:o,...n}=i,{onClose:u}=t,c=Es(!0),d=()=>{c.set(!1),u?.(),console.log("close")};return Ir(c,()=>Dt({...n,className:s("g-ui-toast",o)},Dt({className:"g-ui-toast-row"},Ir(a,()=>Dt({className:"g-ui-toast-title"},a)),Fs({className:"g-ui-toast-close",onClick:d},xe({innerHTML:$e}))),r))}function Os(...e){let{props:i,rawProps:t}=g(e,{items:[]}),{items:r,className:a,timeout:o,...n}=i,{onClose:u}=t;return Hs(js({...n,className:s("g-ui-toast-stack",a)},Rs(r,c=>Pt({title:c.title,onClose:()=>u?.(c)},c.message))))}function Ws(...e){let{props:i}=g(e);return ni(i)}import{Div as qs,after as Ys}from"@granularjs/core";function Gs(...e){let{props:i,rawProps:t}=g(e,{items:[],position:"top-right"}),{items:r,position:a,className:o,...n}=i,{onRemove:u}=t,c=new Map,d=(x,f)=>x?.id??x?.key??f,p=Ys(r).compute(x=>{let f=m(x)??[],l=new Set;f.forEach((w,z)=>{let I=d(w,z);if(l.add(I),w?.autoClose&&!c.has(I)){let M=setTimeout(()=>{c.delete(I),u?.(w)},w.autoClose);c.set(I,M)}});for(let[w,z]of c.entries())l.has(w)||(clearTimeout(z),c.delete(w));return f.map((w,z)=>lt({key:d(w,z),title:w.title,color:w.color,icon:w.icon,loading:w.loading,withCloseButton:w.withCloseButton,withBorder:w.withBorder,onClose:()=>{w.onClose?.(),u?.(w)}},w.message??w.body??w.content??w.text))});return qs({...n,className:s("g-ui-notifications",D("g-ui-notifications-position-",a,"top-right"),o)},p)}import{Div as Xe,after as ui,state as Zs,when as Us}from"@granularjs/core";function _s(...e){let{props:i,rawProps:t}=g(e,{min:0,max:100,step:1,size:"md"}),{value:r,marks:a,min:o,max:n,step:u,size:c,disabled:d,className:p,...x}=i,{onChange:f}=t,l=Zs(m(r??[o,n])),w=()=>{let h=Number(m(o)),y=Number(m(n));return!Number.isFinite(h)||!Number.isFinite(y)?{minValue:0,maxValue:100}:{minValue:Math.min(h,y),maxValue:Math.max(h,y)}},z=()=>{let h=Number(m(u));return Number.isFinite(h)&&h>0?h:1},I=h=>{let{minValue:y,maxValue:v}=w(),P=z(),N=[y,v];Array.isArray(h)&&(N=h);let L=Math.max(y,Math.min(v,Number(N[0]))),G=Math.max(y,Math.min(v,Number(N[1]))),Q=Math.round(Math.min(L,G)/P)*P,J=Math.round(Math.max(L,G)/P)*P;return[Q,J]};ui(r).change(h=>{h!=null&&l.set(I(h))});let M=h=>{let y=I(h);y?.[0]===l.get()?.[0]&&y?.[1]===l.get()?.[1]||(l.set(y),f?.(y))},C=ui(l).compute(h=>{let{minValue:y,maxValue:v}=w(),P=v-y,[N,L]=I(h);if(P<=0)return{lowPct:0,highPct:0};let G=(N-y)/P*100,Q=(L-y)/P*100;return{lowPct:Math.max(0,Math.min(100,G)),highPct:Math.max(0,Math.min(100,Q))}}),T=(h,y,v)=>{let P=y?.();if(!P||P.width===0)return;let L=Math.min(Math.max(h.clientX-P.left,0),P.width)/P.width,{minValue:G,maxValue:Q}=w(),J=G+L*(Q-G),ne=l;typeof l.get=="function"&&(ne=l.get());let[ee,se]=I(ne);M(v==="low"?[J,se]:[ee,J])},S=(h,y,v)=>{if(ye(d))return;h.preventDefault?.();let P=v||h.currentTarget,N=()=>P.getBoundingClientRect(),L=N(),G=C;typeof C.get=="function"&&(G=C.get());let{lowPct:Q,highPct:J}=G,ne=(h.clientX-L.left)/L.width*100,ee=y;if(!ee){let re=Math.abs(ne-Q)<=Math.abs(ne-J);ee="high",re&&(ee="low")}P.setPointerCapture?.(h.pointerId),T(h,N,ee);let se=re=>T(re,N,ee),ge=()=>{P.releasePointerCapture?.(h.pointerId),window.removeEventListener("pointermove",se),window.removeEventListener("pointerup",ge)};window.addEventListener("pointermove",se),window.addEventListener("pointerup",ge)};return Xe({...x,className:s("g-ui-range-slider",D("g-ui-slider-size-",c,"md"),Y("g-ui-slider-disabled",d),i.className??p)},Xe({className:"g-ui-slider-track",onPointerDown:h=>S(h)},Xe({className:"g-ui-slider-bar",style:ui(C).compute(({lowPct:h,highPct:y})=>({left:`${h}%`,width:`${Math.max(0,y-h)}%`}))}),Xe({className:"g-ui-slider-thumb",style:ui(C).compute(({lowPct:h})=>({left:`${h}%`})),onPointerDown:h=>{h.stopPropagation?.(),S(h,"low",h.currentTarget.parentElement)}}),Xe({className:"g-ui-slider-thumb",style:ui(C).compute(({highPct:h})=>({left:`${h}%`})),onPointerDown:h=>{h.stopPropagation?.(),S(h,"high",h.currentTarget.parentElement)}})),Us(a,()=>Xe({className:"g-ui-slider-marks"},a.map(h=>vt({mark:h,getBounds:w})))))}import{state as Mt,after as Ar}from"@granularjs/core";function Li(...e){let{props:i,rawProps:t}=g(e,{size:"md",format:{pattern:"dddd-dd-dd"}}),{value:r,size:a,calendarSize:o,leftSection:n,rightSection:u,className:c,format:d,minDate:p,maxDate:x,...f}=i,{onChange:l}=t,w=y=>{let v=m(y);if(v instanceof Date)return v;if(v==null||v==="")return null;let P=new Date(v);return Number.isNaN(P.getTime())?null:P},z=(y,v)=>y&&v&&y.getFullYear()===v.getFullYear()&&y.getMonth()===v.getMonth()&&y.getDate()===v.getDate(),I=y=>{if(!y)return"";let v=String(y.getFullYear()).padStart(4,"0"),P=String(y.getMonth()+1).padStart(2,"0"),N=String(y.getDate()).padStart(2,"0");return`${v}-${P}-${N}`},M=y=>{let v=String(y??"").replace(/\D/g,"");if(v.length<8)return null;let P=Number(v.slice(0,4)),N=Number(v.slice(4,6)),L=Number(v.slice(6,8));if(!P||!N||!L)return null;let G=new Date(P,N-1,L);if(G.getFullYear()!==P||G.getMonth()!==N-1||G.getDate()!==L)return null;let Q=w(p);if(Q&&G<Q)return null;let J=w(x);return J&&G>J?null:G},C=Mt(w(r)),T=Mt(I(C.get())),S=Mt(!1);Ar(r).change(y=>{let v=w(y);if(!z(v,C.get())){if(v==null){C.set(null),T.set("");return}C.set(v),T.set(I(v))}}),Ar(T).change(y=>{let v=M(y);v&&(z(v,C.get())||(C.set(v),l?.(v)))});let h=y=>{y&&(z(y,C.get())||(C.set(y),T.set(I(y)),l?.(y),S.set(!1)))};return zt({opened:S,onChange:y=>S.set(!!y),content:ni({size:D("",o,"xs"),value:C,onChange:h}),className:"g-ui-date-input-popover"},fe({...f,size:a,className:s("g-ui-dateinput",c),leftSection:n,rightSection:u,type:"text",inputMode:"numeric",format:d,value:T,onChange:y=>T.set(y)}))}import{Div as Tt,when as Xs,after as Ks,state as Qs}from"@granularjs/core";function Js(...e){let{props:i,rawProps:t,children:r}=g(e),{opened:a,content:o,className:n,...u}=i,{onChange:c}=t,d=Qs(m(a)??!1);Ks(a).change(x=>{let f=m(x);f!=null&&d.set(!!f)});let p=x=>{d.set(x),c?.(x)};return Tt({...u,className:s("g-ui-popper",n)},Tt({onClick:()=>p(!d.get())},r),Xs(d,()=>Tt({className:"g-ui-popper-dropdown"},o)))}import{Button as eu,after as Br,when as iu,state as tu}from"@granularjs/core";function ru(...e){let{props:i,rawProps:t}=g(e,{size:"md"}),{size:r,className:a,rightSection:o,...n}=i,{onChange:u}=t,c=tu(!1),d=Br(c).compute(x=>x?"text":"password"),p=Br(o).compute(x=>x??eu({className:"g-ui-password-toggle",onClick:()=>c.set(!c.get())},iu(c,()=>"Hide",()=>"Show")));return fe({...n,size:r,className:a,onChange:u,rightSection:p,type:d})}import{Div as au}from"@granularjs/core";function ou(...e){let{props:i}=g(e,{size:"md"}),{size:t,className:r,...a}=i;return fe({...a,size:t,className:r,leftSection:au({className:"g-ui-search-input-left-section",innerHTML:Qt}),type:"text",inputMode:"search"})}import{Button as nu,after as su,when as Fr}from"@granularjs/core";import{state as uu}from"@granularjs/core";function gu(...e){let{props:i,children:t}=g(e,{value:"",timeout:1500}),{value:r,timeout:a,className:o,...n}=i,u=uu(!1),c=su(u).compute(p=>s("g-ui-copy-button",p&&"g-ui-copy-button-done",o));return nu({...n,className:c,onClick:async()=>{try{await navigator.clipboard.writeText(String(r)),u.set(!0),setTimeout(()=>u.set(!1),a)}catch{}},type:"button"},Fr(t?.length,()=>t,()=>Fr(u,()=>"Copied",()=>"Copy")))}import{Div as Er,after as gi,resolve as lu}from"@granularjs/core";function jr(e){let i=Number(e);return Number.isNaN(i)?0:Math.max(0,Math.min(100,i))}function cu(...e){let{props:i}=g(e,{size:"md",value:null,color:"primary"}),{size:t,value:r,color:a,className:o,...n}=i,u=gi(r).compute(f=>f!=null&&f!==""),c=gi(r).compute(f=>jr(f)),d=gi(c,u).compute(([f,l])=>{if(!l)return{};let w=Number(f),z=Number.isNaN(w)?0:Math.max(0,Math.min(360,w*3.6));return{background:`conic-gradient(var(--g-ui-progress-ring-fill, var(--g-ui-primary)) 0deg ${z}deg, var(--g-ui-border-muted) ${z}deg 360deg)`}}),p=gi(u).compute(f=>f?"":"g-ui-progress-ring-indeterminate"),x=gi(u,r).compute(([f,l])=>f?jr(l):void 0);return Er({...n,className:s("g-ui-progress-ring",D("g-ui-progress-ring-",a,"primary"),[t,f=>`g-ui-progress-ring-size-${lu(f)??"md"}`],p,o),style:d,role:"progressbar","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":x},Er({className:"g-ui-progress-ring-hole"}))}import{Div as $i,state as Lt,after as qe,list as du,when as mu}from"@granularjs/core";import{Div as pu}from"@granularjs/core";function Vt(...e){let{props:i,children:t}=g(e,{size:"md"}),{size:r,className:a,...o}=i;return pu({...o,className:s("g-ui-scroll-area",[r,n=>`g-ui-scroll-area-${n}`],a)},t)}function Te(e,i){if(i==null||i==="")return e;let t=String(i).trim().split("."),r=e;for(let a of t)r=r?.[a];return r}function fu(e,i,t){let r=t(i);return String(r??"").toLowerCase().includes(String(e??"").toLowerCase())}function $t(...e){let{props:i,rawProps:t}=g(e,{data:[],size:"md",valuePath:"value",labelPath:"label"}),{data:r,value:a,size:o,valuePath:n,labelPath:u,filter:c,placeholder:d,label:p,description:x,error:f,leftSection:l,rightSection:w,className:z,inputClassName:I,disabled:M,...C}=i,{onChange:T,renderItem:S}=t,h=Lt(!1),y=Lt(""),v=Lt(m(a));qe(a).change(k=>{let F=m(k);F!==v.get()&&v.set(F)});let P=qe(r).compute(k=>Array.isArray(k)?k:[]),N=qe(P,v,n).compute(([k,F,j])=>{if(F==null)return null;let U=K=>j==null||j===""?K:Te(K,j);return k.find(K=>U(K)===F)??null}),L=qe(N,h,y,u).compute(([k,F,j,U])=>{let K=le=>U==null||U===""?String(le??""):String(Te(le,U)??"");return F?j??"":k?K(k):""}),G=qe(P,y,c,u).compute(([k,F,j,U])=>{let K=ve=>U==null||U===""?String(ve??""):String(Te(ve,U)??""),le=m(j)??fu;return k.filter(ve=>le(F,ve,K))}),Q=k=>{let F=m(n),j=F==null||F===""?k:Te(k,F);v.set(j),y.set(""),h.set(!1),T?.(j)},J=()=>{if(m(M))return;h.set(!0);let k=N.get(),F=m(u),j=U=>F==null||F===""?String(U??""):String(Te(U,F)??"");y.set(k?j(k):"")},ne=()=>{h.set(!1);let k=N.get(),F=m(u),j=U=>F==null||F===""?String(U??""):String(Te(U,F)??"");y.set(k?j(k):"")},{onChange:ee,...se}=C,ge={...se,size:o,label:p,description:x,error:f,leftSection:l,rightSection:w,placeholder:m(d)??void 0,disabled:M,value:L,onInput:k=>y.set(k?.target?.value??""),onFocus:J,onClick:J,onBlur:()=>setTimeout(()=>ne(),150)},re=k=>{let F=m(n);return F==null||F===""?k:Te(k,F)},$=k=>qe(v,n).compute(([F,j])=>(K=>j==null||j===""?K:Te(K,j))(k)===F?"g-ui-autocomplete-item-active":""),O=k=>{if(S&&typeof S=="function"){let F=S(k);if(F!=null)return $i({className:s("g-ui-autocomplete-item",$(k)),onClick:()=>Q(k),role:"option"},F)}return $i({className:s("g-ui-autocomplete-item",$(k)),onClick:()=>Q(k),role:"option"},qe(u).compute(F=>F==null||F===""?String(k??""):String(Te(k,F)??"")))};return $i({className:s("g-ui-autocomplete",z,Y("g-ui-autocomplete-disabled",M))},fe({...ge,className:s("g-ui-autocomplete-input-wrapper",ge.className),inputClassName:s("g-ui-autocomplete-input",I)}),mu(h,()=>$i({className:"g-ui-autocomplete-dropdown",role:"listbox"},Vt({className:"g-ui-autocomplete-list",style:{maxHeight:"240px"}},du(G,k=>O(k))))))}function vu(...e){return $t(...e)}import{Div as hu,Span as bu,state as Rr,after as xu}from"@granularjs/core";function Hr(e){let i=m(e);if(i instanceof Date)return i;if(i==null||i==="")return null;let t=new Date(i);return Number.isNaN(t.getTime())?null:t}function Or(e){let i=m(e);if(i==null)return[null,null];let t=Array.isArray(i)?i:[i];return[Hr(t[0]),Hr(t[1])]}function Wr(e,i){return!e||!i?e===i:e.getFullYear()===i.getFullYear()&&e.getMonth()===i.getMonth()&&e.getDate()===i.getDate()}function wu(...e){let{props:i,rawProps:t}=g(e,{size:"md"}),{value:r,size:a,minDate:o,maxDate:n,className:u,placeholderMin:c,placeholderMax:d,...p}=i,{onChange:x}=t,[f,l]=Or(r),w=Rr(f),z=Rr(l);xu(r).change(T=>{let[S,h]=Or(T);Wr(S,w.get())&&Wr(h,z.get())||(w.set(S),z.set(h))});let I=()=>{let T=w.get(),S=z.get();x?.([T??null,S??null])},M=T=>{let S=z.get();T&&S&&T>S&&z.set(T),w.set(T),I()},C=T=>{let S=w.get();T&&S&&T<S&&w.set(T),z.set(T),I()};return hu({...p,className:s("g-ui-range-picker",i.className??u)},Li({...p,size:a,value:w,onChange:M,maxDate:z,placeholder:m(c)??void 0}),bu({className:"g-ui-range-picker-separator"},"\u2013"),Li({...p,size:a,value:z,onChange:C,minDate:w,placeholder:m(d)??void 0}))}import{Div as yu}from"@granularjs/core";function ku(...e){let{props:i,children:t}=g(e,{align:"center",direction:"row"}),{direction:r,wrap:a,align:o,justify:n,gap:u,className:c,...d}=i;return yu({...d,className:s("g-ui-flex",[r,p=>p==="column"?"g-ui-flex-column":"g-ui-flex-row"],[a,"g-ui-flex-wrap"],[o,p=>p&&`g-ui-align-${p}`],[n,p=>p&&`g-ui-justify-${p}`],[u,p=>p&&`g-ui-gap-${p}`],c)},t)}import{A as zu,Div as li,Span as qr,when as ci,after as Yr,state as Nu}from"@granularjs/core";function Cu(...e){let{props:i,rawProps:t,children:r}=g(e,{variant:"subtle",childrenOffset:24}),{label:a,description:o,leftSection:n,rightSection:u,active:c,disabled:d,variant:p,childrenOffset:x,opened:f,defaultOpened:l,className:w,padding:z,...I}=i,{onClick:M,onChange:C}=t,T=r.length>0,S=Nu(m(f)??m(l)??!1);Yr(f).change(v=>{let P=m(v);P!=null&&S.set(!!P)});let h=Yr(x).compute(v=>({paddingLeft:Gt(m(v??24))??"24px"})),y=v=>{if(m(d)){v?.preventDefault?.();return}if(T){let P=!S.get();S.set(P),C?.(P)}M?.(v)};return li({className:s("g-ui-navlink-root",w)},zu({...I,className:s("g-ui-navlink",D("g-ui-navlink-variant-",p,"subtle"),Y("g-ui-navlink-active",c),Y("g-ui-navlink-disabled",d),D("g-ui-navlink-padding-",z,"md")),onClick:y},ci(n,()=>qr({className:"g-ui-navlink-section g-ui-navlink-left"},n)),li({className:"g-ui-navlink-body"},ci(a,()=>li({className:"g-ui-navlink-label"},a)),ci(o,()=>li({className:"g-ui-navlink-description"},o))),ci(u,()=>qr({className:"g-ui-navlink-section g-ui-navlink-right"},u))),T?ci(S,()=>li({className:"g-ui-navlink-children",style:h},r)):null)}import{Div as Gr,when as Su}from"@granularjs/core";function Du(...e){let{props:i,children:t}=g(e,{show:!0,position:"top-right",color:"danger",size:"md"}),{show:r,position:a,color:o,size:n,className:u,...c}=i;return Gr({...c,className:s("g-ui-indicator",D("g-ui-indicator-position-",a,"top-right"),D("g-ui-indicator-color-",o,"danger"),D("g-ui-indicator-size-",n,"md"),u)},t,Su(r,()=>Gr({className:"g-ui-indicator-badge"})))}import{Span as Ii}from"@granularjs/core";function Pu(...e){let{props:i}=g(e),{opened:t,className:r,...a}=i;return Ii({...a,className:s("g-ui-burger",[t,"g-ui-burger-open"],r)},Ii(""),Ii(""),Ii(""))}import{Div as Mu,when as Tu}from"@granularjs/core";function Vu(...e){let{props:i}=g(e),{visible:t,...r}=i;return Tu(t,()=>Mu({...r,className:"g-ui-loading-overlay"},ti({})))}import{Div as Lu}from"@granularjs/core";function $u(...e){let{props:i,children:t}=g(e,{gap:"md"}),{className:r,gap:a,...o}=i;return Lu({...o,className:s("g-ui-grid-system",[a,n=>`g-ui-gap-${n}`],r)},t)}import{Div as Iu}from"@granularjs/core";function Au(...e){let{props:i,children:t}=g(e,{span:12}),{span:r,className:a,...o}=i;return Iu({...o,className:s([r,n=>`g-ui-col-span-${n}`],a)},t)}import{Div as Zr,Input as Bu,after as Ve,state as It,when as Ur,list as Fu}from"@granularjs/core";function Eu(...e){let{props:i,rawProps:t}=g(e,{length:4,size:"md",type:"alphanumeric",mask:!1,placeholder:"\u25CB",disabled:!1,error:!1,oneTimeCode:!1}),{length:r,value:a,size:o,type:n,mask:u,placeholder:c,disabled:d,error:p,oneTimeCode:x,className:f}=i,{onChange:l,onComplete:w}=t,z=It(m(r)??4),I=()=>z.get();Ve(r).change($=>{let O=m($)??4,k=z.get();if(O===k)return;z.set(O);let F=C.get(),j=M.get();C.set(Array.from({length:O},(U,K)=>F[K]??"")),M.set(Array.from({length:O},(U,K)=>j[K]??null))});let M=It(Array.from({length:I()},()=>null)),C=It(Array.from({length:I()},($,O)=>{let k=m(a);return typeof k=="string"||Array.isArray(k)?k[O]??"":""}));Ve(a).change($=>{if($==null)return;let O=I();typeof $=="string"?C.set(Array.from({length:O},(k,F)=>$[F]??"")):Array.isArray($)&&C.set(Array.from({length:O},(k,F)=>$[F]??""))});let T=()=>C.get().join(""),S=$=>{C.set($);let O=$.join("");l?.(O),$.every(k=>k!=="")&&$.length===I()&&w?.(O)},h=$=>{let O=I(),k=M.get();$>=0&&$<O&&k[$]&&(k[$].focus(),k[$].select())},y=()=>{let $=m(n);return $==="number"?/^[0-9]$/:$ instanceof RegExp?$:/^[a-zA-Z0-9]$/},v=($,O)=>{let k=O.target.value,F=y();if(k.length>1){P($,k);return}if(k&&!F.test(k)){O.target.value=C.get()[$]??"";return}let j=C.get().slice();j[$]=k,S(j),k&&$<I()-1&&h($+1)},P=($,O)=>{let k=y(),F=O.split("").filter(le=>k.test(le)),j=C.get().slice(),U=I();F.forEach((le,ve)=>{let De=$+ve;De<U&&(j[De]=le)}),S(j);let K=j.findIndex((le,ve)=>ve>=$&&le==="");K>=0?h(K):h(Math.min($+F.length,U-1))},N=($,O)=>{if(O.key==="Backspace"){let k=C.get().slice();k[$]===""&&$>0?(O.preventDefault(),k[$-1]="",S(k),h($-1)):k[$]!==""&&(k[$]="",S(k))}else O.key==="ArrowLeft"&&$>0?(O.preventDefault(),h($-1)):O.key==="ArrowRight"&&$<I()-1&&(O.preventDefault(),h($+1))},L=($,O)=>{O.target.select()},G=()=>{let $=C.get(),O=$.findIndex(k=>k==="");O>=0?h(O):h($.length-1)},Q=Ve(u).compute($=>m($)?"password":"text"),J=Ve(n).compute($=>m($)==="number"?"numeric":"text"),ne=Ve(x).compute($=>m($)?"one-time-code":"off"),ee=Ve(d).compute($=>!!m($)),se=Ve(p).compute($=>!!m($)),ge=Ve(z).compute($=>Array.from({length:$},(O,k)=>k)),re=$=>Bu({className:s("g-ui-pin-input-field",Ur(se,()=>"g-ui-pin-input-error")),type:Q,inputMode:J,autocomplete:ne,maxLength:2,placeholder:Ur(ee,()=>"",()=>c),disabled:ee,value:Ve(C,$).compute(([O,k])=>O[k]??""),node:M[$.get()],onInput:O=>v($.get(),O),onChange:O=>v($.get(),O),onKeyDown:O=>N($.get(),O),onFocus:O=>L($.get(),O)});return Zr({className:s("g-ui-pin-input",D("g-ui-input-size-",o,"md"),f),onClick:G},Zr({className:"g-ui-pin-input-wrapper"},Fu(ge,re)))}import{Div as ju}from"@granularjs/core";function Ru(...e){let{props:i,children:t}=g(e),{className:r,...a}=i;return ju({...a,className:s("g-ui-checkbox-group",r)},t)}import{Div as Hu}from"@granularjs/core";function Ou(...e){let{props:i,children:t}=g(e),{className:r,...a}=i;return Hu({...a,className:s("g-ui-avatar-group",r)},t)}import{Div as Wu}from"@granularjs/core";function qu(...e){let{props:i,children:t}=g(e),{className:r,...a}=i;return Wu({...a,className:s("g-ui-badge-group",r)},t)}import{Div as Ai,Span as Yu,after as pi,context as _r}from"@granularjs/core";var Gu=_r([]),Xr=_r({sort:null,onSort:null});function At(...e){let{props:i,rawProps:t,children:r}=g(e,{sizes:[],sort:null,stickyHeader:!1}),{className:a,sizes:o,sort:n,stickyHeader:u,...c}=i,{onSort:d}=t,p=Gu.scope(o.get());pi(o).change(f=>p.set(f));let x=Xr.scope({sort:n.get(),onSort:d||null});return pi(n).change(f=>x.set().sort=f),p.serve(x.serve(Ai({className:s("g-ui-grid-table",Y("g-ui-grid-table-sticky",u),a),style:{gridTemplateColumns:pi(p).compute(f=>Array.isArray(f)?f.join(" "):"")},...c},r)))}At.GridRow=(...e)=>{let{props:i,children:t}=g(e,{}),{className:r,header:a,...o}=i;return Ai({className:s("g-ui-grid-table-row",Y("g-ui-grid-table-row-header",a),r),...o},...t)};At.GridCell=function(...e){let{props:i,rawProps:t,children:r}=g(e,{}),{className:a,sort:o,...n}=i,u=t.sort;if(u){let c=Xr.state(),d=pi(c.sort).compute(x=>x?.key===u?x.direction:null),p=()=>{let x=c.get().sort,f;x?.key===u?f=x.direction==="asc"?{key:u,direction:"desc"}:null:f={key:u,direction:"asc"},c.set().sort=f;let{onSort:l}=c.get();l&&l(f)};return Ai({className:s("g-ui-grid-table-cell","g-ui-grid-table-cell-sortable",a),onClick:p,...n},r,Yu({className:"g-ui-grid-table-sort-icon"},pi(d).compute(x=>x==="asc"?" \u2191":x==="desc"?" \u2193":"")))}return Ai({className:s("g-ui-grid-table-cell",a),...n},r)};import{Button as Zu,Div as Uu,Span as Kr,when as Qr}from"@granularjs/core";function Jr(...e){let{props:i,children:t}=g(e,{grow:!0}),{grow:r,className:a,...o}=i;return Uu({...o,className:s("g-ui-bottombar",Y("g-ui-bottombar-grow",r),a)},t)}Jr.Action=function(...i){let{props:t,rawProps:r,children:a}=g(i,{variant:"subtle"}),{icon:o,label:n,active:u,disabled:c,variant:d,className:p,...x}=t,{onClick:f}=r;return Zu({...x,className:s("g-ui-bottombar-action",D("g-ui-bottombar-action-variant-",d,"subtle"),Y("g-ui-bottombar-action-active",u),Y("g-ui-bottombar-action-disabled",c),p),onClick:f,disabled:c},Qr(o,()=>Kr({className:"g-ui-bottombar-action-icon"},o)),Qr(n,()=>Kr({className:"g-ui-bottombar-action-label"},n)),a)};import{Div as R,Button as Ye,state as ce,after as ke,when as pe,Input as Bi,Label as di,Span as Ge}from"@granularjs/core";var _u=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],Xu=[{value:"day",label:"Day"},{value:"week",label:"Week"},{value:"month",label:"Month"}];function Fi(e){if(e instanceof Date)return e;if(e==null)return null;let i=new Date(e);return Number.isNaN(i.getTime())?null:i}function ta(e){let i=Fi(e.start),t=Fi(e.end);return!i||!t?null:{...e,id:e.id??`${i.getTime()}-${e.title??"event"}`,title:e.title??"",start:i,end:t,allDay:!!e.allDay,description:e.description??"",location:e.location??"",attendees:Array.isArray(e.attendees)?e.attendees:[],color:e.color??null}}function ra(e,i,t){let r=Fi(i).getTime(),a=Fi(t).getTime();return e.map(ta).filter(Boolean).filter(o=>o.end.getTime()>r&&o.start.getTime()<a)}function ea(e,i){let t=new Date(i);t.setHours(0,0,0,0);let r=t.getTime();t.setHours(23,59,59,999);let a=t.getTime();return ra(e,r,a)}function Bt(e,i){let t=new Date(e),a=(t.getDay()-i+7)%7;return t.setDate(t.getDate()-a),t.setHours(0,0,0,0),t}function Ke(e,i="default"){return e.toLocaleTimeString(i,{hour:"numeric",minute:"2-digit",hour12:!0})}function mi(e,i="default"){return e.toLocaleDateString(i,{weekday:"short",month:"short",day:"numeric"})}function Ku(e,i="default"){return e.toLocaleDateString(i,{month:"long",year:"numeric"})}function Qu(e,i="default"){let t=new Date(e);return t.setDate(t.getDate()+6),`${e.toLocaleDateString(i,{month:"short",day:"numeric"})} \u2013 ${t.toLocaleDateString(i,{month:"short",day:"numeric",year:"numeric"})}`}function ia(e,i,t,r){let a=new Date(e).setHours(t,0,0,0),o=new Date(e).setHours(r,0,0,0),n=(r-t)*60,u=Math.max(e.getTime(),a),d=(Math.min(i.getTime(),o)-u)/6e4,p=(u-a)/6e4/n*100,x=d/n*100;return{top:p,height:x}}function Ju(...e){let{props:i,rawProps:t}=g(e,{defaultView:"month",firstDayOfWeek:0,locale:"default",hourSlotDuration:30,minTime:6,maxTime:22,eventCreationColorOptions:[]}),{events:r=[],defaultView:a,firstDayOfWeek:o,locale:n,hourSlotDuration:u,minTime:c,maxTime:d,eventCreationColorOptions:p,className:x,...f}=i,{onCreateEventRequest:l,onViewEventRequest:w,onUpdateEventRequest:z,onRemoveEventRequest:I,eventCreationEmailLookup:M,eventCreationLocationsCallback:C,eventCreationCalendarsCallback:T,onSlotClick:S,onDateRangeChange:h}=t,y=ce(m(a)??"month"),v=ce(new Date),P=ce(null),N=ce(null),L=ce({title:"",start:null,end:null,allDay:!1,description:"",location:"",attendees:[],color:null}),G=ke(r).compute(b=>Array.isArray(b)?b:[]),Q=v.get(),J=Bt(Q,m(o)??0),ne=m(c)??6,ee=m(d)??22,se=m(u)??30,ge=()=>{let b=new Date(v.get());y.get()==="month"?b.setMonth(b.getMonth()-1):y.get()==="week"?b.setDate(b.getDate()-7):b.setDate(b.getDate()-1),v.set(b),h?.({start:b,end:b,view:y.get()})},re=()=>{let b=new Date(v.get());y.get()==="month"?b.setMonth(b.getMonth()+1):y.get()==="week"?b.setDate(b.getDate()+7):b.setDate(b.getDate()+1),v.set(b),h?.({start:b,end:b,view:y.get()})},$=()=>{let b=new Date;v.set(b),h?.({start:b,end:b,view:y.get()})},O=(b,E,ue=!1)=>{let q=b?new Date(b):new Date(v.get()),ae=E?new Date(E):new Date(q.getTime()+3600*1e3);ue&&(q.setHours(0,0,0,0),ae.setHours(23,59,59,999)),L.set({title:"",start:q,end:ae,allDay:ue,description:"",location:"",attendees:[],color:null}),P.set("create")},k=b=>{N.set(ta(b)),P.set("view"),w?.(b)},F=()=>{let b=N.get();b&&(L.set({title:b.title,start:new Date(b.start),end:new Date(b.end),allDay:b.allDay,description:b.description??"",location:b.location??"",attendees:[...b.attendees||[]],color:b.color??null}),P.set("edit"))},j=()=>{P.set(null),N.set(null)},U=(b,E,ue)=>{if(S){S({date:b,hour:E,allDay:ue});return}let q=new Date(b);if(ue){q.setHours(0,0,0,0);let ae=new Date(q);ae.setHours(23,59,59,999),O(q,ae,!0)}else{q.setHours(E,0,0,0);let ae=new Date(q.getTime()+se*60*1e3);O(q,ae,!1)}},K=()=>{let b=L.get();!b.start||!b.end||l?.({title:b.title,start:b.start,end:b.end,allDay:b.allDay,description:b.description,location:b.location,attendees:b.attendees,color:b.color},()=>{j()})},le=()=>{let b=N.get(),E=L.get();!b||!E.start||!E.end||z?.(b,{title:E.title,start:E.start,end:E.end,allDay:E.allDay,description:E.description,location:E.location,attendees:E.attendees,color:E.color},()=>j())},ve=()=>{let b=N.get();b&&I?.(b,()=>j())},De=ke(y,v).compute(([b,E])=>b==="month"?Ku(E,m(n)):b==="week"?Qu(Bt(E,m(o)??0),m(n)):mi(E,m(n))),Fe=R({className:"g-ui-event-calendar-header"},R({className:"g-ui-event-calendar-nav-group"},We({size:"sm",variant:"subtle",onClick:ge,className:"g-ui-event-calendar-nav"},xe({size:"sm",innerHTML:xi})),We({size:"sm",variant:"subtle",onClick:re,className:"g-ui-event-calendar-nav"},xe({size:"sm",innerHTML:bi})),Ye({type:"button",variant:"subtle",size:"sm",className:"g-ui-event-calendar-today",onClick:$},xe({size:"sm",className:"g-ui-event-calendar-today-icon",innerHTML:tr}),"Today")),R({className:"g-ui-event-calendar-title"},De),R({className:"g-ui-event-calendar-actions"},Xu.map(b=>R({className:s("g-ui-event-calendar-view-option",ke(y).compute(E=>E===b.value?"g-ui-event-calendar-view-option-active":"")),onClick:()=>{y.set(b.value),h?.({start:v.get(),end:v.get(),view:b.value})}},b.label)),Ye({type:"button",variant:"filled",size:"sm",className:"g-ui-event-calendar-create-btn",onClick:()=>O(v.get(),null,!1)},xe({size:"sm",innerHTML:Jt}),"Create"))),fi=ke(v,G,o).compute(([b,E,ue])=>{let q=b.getFullYear(),ae=b.getMonth(),te=(new Date(q,ae,1).getDay()-(ue??0)+7)%7,Se=new Date(q,ae+1,0).getDate(),Pe=new Date(q,ae,0).getDate(),A=[],V=1,H=1,W=Math.ceil((te+Se)/7)*7,ie=[];for(let _=0;_<W;_+=1){let Z,X,oe;_<te?(Z=Pe-te+_+1,oe=new Date(q,ae-1,Z),X=!1):V<=Se?(Z=V,oe=new Date(q,ae,Z),X=!0,V+=1):(Z=H,oe=new Date(q,ae+1,Z),X=!1,H+=1);let he=ea(E,oe),Le=oe.getDate()===new Date().getDate()&&oe.getMonth()===new Date().getMonth()&&oe.getFullYear()===new Date().getFullYear();ie.push(R({key:oe.getTime(),className:s("g-ui-event-calendar-month-cell",!X&&"g-ui-event-calendar-month-cell-outside",Le&&"g-ui-event-calendar-month-cell-today")},R({className:"g-ui-event-calendar-month-cell-header",onClick:()=>U(oe,0,!0)},Ge({className:"g-ui-event-calendar-month-cell-day"},oe.getDate())),R({className:"g-ui-event-calendar-month-cell-events"},he.slice(0,3).map(ze=>R({key:ze.id,className:"g-ui-event-calendar-month-event",style:ze.color?{borderLeftColor:ze.color,backgroundColor:`${ze.color}20`}:{},onClick:Oi=>{Oi.stopPropagation(),k(ze)}},ze.title||"(No title)")),pe(he.length>3,()=>R({className:"g-ui-event-calendar-month-more",onClick:ze=>{ze.stopPropagation(),k(he[3])}},`+${he.length-3} more`)))))}return ie}),Ei=R({className:"g-ui-event-calendar-month"},R({className:"g-ui-event-calendar-weekdays"},_u.map(b=>R({key:b,className:"g-ui-event-calendar-weekday"},b))),R({className:"g-ui-event-calendar-month-grid"},fi)),Ce=[];for(let b=ne;b<ee;b+=1)for(let E=0;E<60;E+=se)Ce.push(b+E/60);let Qe=ke(v,o).compute(([b,E])=>{let ue=Bt(b,E??0),q=[];for(let ae=0;ae<7;ae+=1){let de=new Date(ue);de.setDate(de.getDate()+ae),q.push(de)}return q}),ji=R({className:"g-ui-event-calendar-week"},ke(Qe).compute(b=>R({className:"g-ui-event-calendar-week-days"},R({className:"g-ui-event-calendar-week-time-col"},""),(b||[]).map(E=>R({key:E.getTime(),className:"g-ui-event-calendar-week-day-col"},R({className:"g-ui-event-calendar-week-day-header"},mi(E,m(n))))))),R({className:"g-ui-event-calendar-week-body"},R({className:"g-ui-event-calendar-week-time-col"},Ce.map(b=>{let E=Math.floor(b),ue=(b-E)*60,q=`${E<=12?E:E-12}:${ue===0?"00":ue} ${E<12?"AM":"PM"}`;return R({key:b,className:"g-ui-event-calendar-week-slot-label"},q)})),ke(Qe,G).compute(([b,E])=>{if(!b||!b.length)return null;let ue=b[0],q=new Date(b[6]);q.setHours(23,59,59,999);let ae=ra(E,ue,q);return R({className:"g-ui-event-calendar-week-grid-cols"},b.map(de=>R({key:de.getTime(),className:"g-ui-event-calendar-week-day-col g-ui-event-calendar-week-day-col-body"},Ce.map(te=>R({key:te,className:"g-ui-event-calendar-week-slot",onClick:()=>U(de,te,!1)})),ae.filter(te=>!te.allDay&&te.start.getDate()===de.getDate()&&te.start.getMonth()===de.getMonth()&&te.start.getFullYear()===de.getFullYear()).map(te=>{let{top:Se,height:Pe}=ia(te.start,te.end,ne,ee);return R({key:te.id,className:"g-ui-event-calendar-week-event",style:{top:`${Se}%`,height:`${Pe}%`,borderLeftColor:te.color||"var(--g-ui-primary)"},onClick:A=>{A.stopPropagation(),k(te)}},R({className:"g-ui-event-calendar-week-event-title"},te.title||"(No title)"),pe(!te.allDay,()=>Ge({className:"g-ui-event-calendar-week-event-time"},`${Ke(te.start,m(n))} \u2013 ${Ke(te.end,m(n))}`)))}))))}))),Ri=R({className:"g-ui-event-calendar-day"},R({className:"g-ui-event-calendar-day-body"},R({className:"g-ui-event-calendar-day-time-col"},Ce.map(b=>{let E=Math.floor(b),ue=(b-E)*60,q=`${E<=12?E:E-12}:${ue===0?"00":ue} ${E<12?"AM":"PM"}`;return R({key:b,className:"g-ui-event-calendar-day-slot-label"},q)})),R({className:"g-ui-event-calendar-day-slots"},Ce.map(b=>R({key:b,className:"g-ui-event-calendar-day-slot",onClick:()=>U(v.get(),b,!1)})),ke(G,v).compute(([b,E])=>E?ea(b,E).filter(q=>!q.allDay).map(q=>{let{top:ae,height:de}=ia(q.start,q.end,ne,ee);return R({key:q.id,className:"g-ui-event-calendar-day-event",style:{top:`${ae}%`,height:`${de}%`,borderLeftColor:q.color||"var(--g-ui-primary)"},onClick:te=>{te.stopPropagation(),k(q)}},R({className:"g-ui-event-calendar-day-event-title"},q.title||"(No title)"),Ge({className:"g-ui-event-calendar-day-event-time"},`${Ke(q.start,m(n))} \u2013 ${Ke(q.end,m(n))}`))}):[])))),vi=b=>{let E=L.get(),ue=new Date,q=E.start||ue,ae=E.end||new Date(ue.getTime()+3600*1e3),de=ce(E.title),te=ce(q.toISOString().slice(0,10)),Se=ce(!E.allDay&&q?q.toTimeString().slice(0,5):"09:00"),Pe=ce(ae.toISOString().slice(0,10)),A=ce(!E.allDay&&ae?ae.toTimeString().slice(0,5):"10:00"),V=ce(E.allDay),H=ce(E.description),W=ce(E.location),ie=ce(E.attendees||[]),_=ce(""),Z=ce([]),X=ce([]),oe=ce(""),he=Array.isArray(p)?p:[],Le=ce(E.color),ze=()=>{let B=new Date(te.get()+"T"+(V.get()?"00:00:00":Se.get()+":00")),be=new Date(Pe.get()+"T"+(V.get()?"23:59:59":A.get()+":00"));L.set({title:de.get(),start:B,end:be,allDay:V.get(),description:H.get(),location:W.get(),attendees:ie.get(),color:Le.get()})},Oi=B=>{if(_.set(B),!M||!B.trim()){Z.set([]);return}Promise.resolve(M(B.trim())).then(be=>Z.set(Array.isArray(be)?be:[])).catch(()=>Z.set([]))},aa=B=>{let be=ie.get();be.some(Et=>(Et.email||Et.id)===(B.email||B.id))||(ie.set([...be,{id:B.id,email:B.email??B.label,label:B.label}]),_.set(""),Z.set([]))},oa=B=>{let be=[...ie.get()];be.splice(B,1),ie.set(be)},Ft=()=>{C&&Promise.resolve(C(oe.get())).then(B=>X.set(Array.isArray(B)?B:[])).catch(()=>X.set([]))};return R({className:"g-ui-event-calendar-form"},R({className:"g-ui-event-calendar-form-row"},fe({label:"Title",placeholder:"Event title",value:de,onInput:B=>de.set(B?.target?.value??"")})),R({className:"g-ui-event-calendar-form-row g-ui-event-calendar-form-row-inline"},tt({label:"All day",checked:V,onChange:B=>V.set(B)})),R({className:"g-ui-event-calendar-form-row g-ui-event-calendar-form-row-inline"},R({className:"g-ui-event-calendar-form-field"},di({className:"g-ui-event-calendar-form-label"},"Start"),Bi({type:"date",className:"g-ui-input g-ui-input-size-md",value:te,onInput:B=>te.set(B?.target?.value??"")}),pe(!V,()=>Bi({type:"time",className:"g-ui-input g-ui-input-size-md",value:Se,onInput:B=>Se.set(B?.target?.value??"")}))),R({className:"g-ui-event-calendar-form-field"},di({className:"g-ui-event-calendar-form-label"},"End"),Bi({type:"date",className:"g-ui-input g-ui-input-size-md",value:Pe,onInput:B=>Pe.set(B?.target?.value??"")}),pe(!V,()=>Bi({type:"time",className:"g-ui-input g-ui-input-size-md",value:A,onInput:B=>A.set(B?.target?.value??"")})))),pe(C,()=>R({className:"g-ui-event-calendar-form-row"},di({className:"g-ui-event-calendar-form-label"},"Location"),fe({placeholder:"Search or type location",value:oe,onInput:B=>{oe.set(B?.target?.value??""),Ft()},onFocus:Ft}),pe(ke(X).compute(B=>B&&B.length>0),()=>R({className:"g-ui-event-calendar-form-suggestions"},X.get().map(B=>R({key:B.id??B.label,className:"g-ui-event-calendar-form-suggestion-item",onClick:()=>{W.set(B.label??B.id),oe.set(""),X.set([])}},B.label??B.id)))),pe(ke(W).compute(B=>!!B),()=>Ge({className:"g-ui-event-calendar-form-chip"},W)))),pe(M,()=>R({className:"g-ui-event-calendar-form-row"},di({className:"g-ui-event-calendar-form-label"},"Add guests"),fe({placeholder:"Type email to search",value:_,onInput:B=>Oi(B?.target?.value??"")}),R({className:"g-ui-event-calendar-form-chips"},ie.get().map((B,be)=>Ge({key:(B.email||B.id)+be,className:"g-ui-event-calendar-form-chip g-ui-event-calendar-form-chip-removable",onClick:()=>oa(be)},B.label||B.email||B.id," \xD7"))),pe(ke(Z).compute(B=>B&&B.length>0),()=>R({className:"g-ui-event-calendar-form-suggestions"},Z.get().map(B=>R({key:B.id??B.email,className:"g-ui-event-calendar-form-suggestion-item",onClick:()=>aa(B)},B.label??B.email??B.id)))))),R({className:"g-ui-event-calendar-form-row"},Xi({label:"Description",placeholder:"Add description",value:H,onInput:B=>H.set(B?.target?.value??"")})),pe(he.length>0,()=>R({className:"g-ui-event-calendar-form-row"},di({className:"g-ui-event-calendar-form-label"},"Color"),R({className:"g-ui-event-calendar-form-colors"},he.map(B=>R({key:B.value??B.id??B,className:s("g-ui-event-calendar-form-color-swatch",ke(Le).compute(be=>be===(B.value??B.id??B)?"g-ui-event-calendar-form-color-swatch-active":"")),style:{backgroundColor:B.color??B.value??B},onClick:()=>Le.set(B.value??B.id??B)}))))),R({className:"g-ui-event-calendar-form-actions"},Ye({variant:"subtle",onClick:j},"Cancel"),Ye({variant:"filled",onClick:()=>{ze(),b?le():K()}},b?"Save":"Create")))},Hi=()=>{let b=N.get();return b?R({className:"g-ui-event-calendar-view-modal"},R({className:"g-ui-event-calendar-view-modal-title"},b.title||"(No title)"),R({className:"g-ui-event-calendar-view-modal-meta"},b.allDay?Ge({className:"g-ui-event-calendar-view-modal-date"},mi(b.start,m(n))+(b.start.getTime()!==b.end.getTime()?` \u2013 ${mi(b.end,m(n))}`:"")):Ge({className:"g-ui-event-calendar-view-modal-date"},`${mi(b.start,m(n))} \xB7 ${Ke(b.start,m(n))} \u2013 ${Ke(b.end,m(n))}`)),pe(b.location,()=>R({className:"g-ui-event-calendar-view-modal-field"},"Location: ",b.location)),pe(b.description,()=>R({className:"g-ui-event-calendar-view-modal-field"},b.description)),pe(b.attendees?.length,()=>R({className:"g-ui-event-calendar-view-modal-field"},"Guests: ",b.attendees.map(E=>E.label||E.email||E.id).join(", "))),R({className:"g-ui-event-calendar-view-modal-actions"},Ye({variant:"subtle",size:"sm",onClick:F},xe({size:"sm",innerHTML:er})," Edit"),Ye({variant:"subtle",size:"sm",onClick:ve,className:"g-ui-event-calendar-view-modal-delete"},xe({size:"sm",innerHTML:ir})," Delete"),Ye({variant:"filled",size:"sm",onClick:j},"Close"))):null};return R({...f,className:s("g-ui-event-calendar",x)},Fe,pe(y,b=>b==="month",()=>Ei),pe(y,b=>b==="week",()=>ji),pe(y,b=>b==="day",()=>Ri),pe(P,b=>b==="create",()=>ii({opened:!0,title:"New event",size:"lg",onClose:j},vi(!1))),pe(P,b=>b==="view",()=>ii({opened:!0,title:"Event",size:"md",onClose:j},Hi())),pe(P,b=>b==="edit",()=>ii({opened:!0,title:"Edit event",size:"lg",onClose:j},vi(!0))))}import{state as eg}from"@granularjs/core";function ig(e=!1){let i=eg(!!e);return[i,{open:()=>i.set(!0),close:()=>i.set(!1),toggle:()=>i.set(!i.get())}]}Rt();export{Ao as Accordion,We as ActionIcon,gs as Affix,Qo as Alert,wn as Anchor,fs as AppBar,$t as Autocomplete,rn as Avatar,Ou as AvatarGroup,qa as Badge,qu as BadgeGroup,gn as Blockquote,Jr as BottomBar,_n as Breadcrumbs,Pu as Burger,Zi as Button,ni as Calendar,Oa as Card,Kn as Center,tt as Checkbox,Ru as CheckboxGroup,Ln as Chip,sn as Code,Au as Col,ts as Collapse,Ba as Container,gu as CopyButton,Li as DateInput,Ws as DatePicker,Zo as Divider,Wo as Drawer,Ju as EventCalendar,ds as Fieldset,ku as Flex,$u as Grid,At as GridTable,Ra as Group,ss as HoverCard,xe as Icon,kn as Image,Du as Indicator,on as Kbd,br as List,ti as Loading,Vu as LoadingOverlay,Ro as Menu,ii as Modal,Bs as MultiSelect,Cu as NavLink,lt as Notification,Gs as Notifications,Ki as NumberField,Ja as NumberInput,En as Pagination,_o as Paper,ru as PasswordInput,Eu as PinInput,zt as Popover,Js as Popper,zn as Progress,cu as ProgressRing,Gn as Radio,Hn as RadioGroup,wu as RangePicker,_s as RangeSlider,Vs as Rating,Vt as ScrollArea,ou as SearchInput,An as SegmentedControl,bo as Select,vu as SelectSearch,hs as Sidebar,cn as SimpleGrid,Mn as Skeleton,Sn as Slider,Jn as Space,Ea as Stack,Ms as Stepper,vo as Switch,go as SwitchGroup,Mo as Table,ko as Tabs,$s as Tag,Ui as Text,fe as TextInput,Xi as Textarea,Ds as Timeline,Ia as Title,Pt as Toast,Os as ToastStack,Bo as Tooltip,Y as classFlag,me as classMap,D as classVar,s as cx,ka as getThemeMode,ya as setThemeMode,wa as setThemeVars,g as splitPropsChildren,ig as useDisclosure};
|
|
3870
4026
|
//# sourceMappingURL=granular-ui.min.js.map
|