@uxuissk/design-system 0.2.0 → 0.4.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.
@@ -1,4 +1,4 @@
1
- (function(x,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("react/jsx-runtime"),require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","react","react-dom"],e):(x=typeof globalThis<"u"?globalThis:x||self,e(x.SellsukiDS={},x.jsxRuntime,x.React,x.ReactDOM))})(this,(function(x,e,c,Ae){"use strict";/**
1
+ (function(x,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("react/jsx-runtime"),require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","react","react-dom"],e):(x=typeof globalThis<"u"?globalThis:x||self,e(x.SellsukiDS={},x.jsxRuntime,x.React,x.ReactDOM))})(this,(function(x,e,f,De){"use strict";/**
2
2
  * @license lucide-react v0.487.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -13,335 +13,335 @@
13
13
  *
14
14
  * This source code is licensed under the ISC license.
15
15
  * See the LICENSE file in the root directory of this source tree.
16
- */const yr=c.forwardRef(({color:t="currentColor",size:r=24,strokeWidth:a=2,absoluteStrokeWidth:o,className:s="",children:l,iconNode:n,...i},d)=>c.createElement("svg",{ref:d,...vr,width:r,height:r,stroke:t,strokeWidth:o?Number(a)*24/Number(r):a,className:et("lucide",s),...i},[...n.map(([h,f])=>c.createElement(h,f)),...Array.isArray(l)?l:[l]]));/**
16
+ */const yr=f.forwardRef(({color:t="currentColor",size:r=24,strokeWidth:a=2,absoluteStrokeWidth:o,className:s="",children:l,iconNode:n,...i},d)=>f.createElement("svg",{ref:d,...vr,width:r,height:r,stroke:t,strokeWidth:o?Number(a)*24/Number(r):a,className:et("lucide",s),...i},[...n.map(([h,u])=>f.createElement(h,u)),...Array.isArray(l)?l:[l]]));/**
17
17
  * @license lucide-react v0.487.0 - ISC
18
18
  *
19
19
  * This source code is licensed under the ISC license.
20
20
  * See the LICENSE file in the root directory of this source tree.
21
- */const z=(t,r)=>{const a=c.forwardRef(({className:o,...s},l)=>c.createElement(yr,{ref:l,iconNode:r,className:et(`lucide-${gr(Re(t))}`,`lucide-${t}`,o),...s}));return a.displayName=Re(t),a};/**
21
+ */const _=(t,r)=>{const a=f.forwardRef(({className:o,...s},l)=>f.createElement(yr,{ref:l,iconNode:r,className:et(`lucide-${gr(Re(t))}`,`lucide-${t}`,o),...s}));return a.displayName=Re(t),a};/**
22
22
  * @license lucide-react v0.487.0 - ISC
23
23
  *
24
24
  * This source code is licensed under the ISC license.
25
25
  * See the LICENSE file in the root directory of this source tree.
26
- */const tt=z("arrow-down-right",[["path",{d:"m7 7 10 10",key:"1fmybs"}],["path",{d:"M17 7v10H7",key:"6fjiku"}]]);/**
26
+ */const tt=_("arrow-down-right",[["path",{d:"m7 7 10 10",key:"1fmybs"}],["path",{d:"M17 7v10H7",key:"6fjiku"}]]);/**
27
27
  * @license lucide-react v0.487.0 - ISC
28
28
  *
29
29
  * This source code is licensed under the ISC license.
30
30
  * See the LICENSE file in the root directory of this source tree.
31
- */const rt=z("arrow-up-right",[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]]);/**
31
+ */const rt=_("arrow-up-right",[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]]);/**
32
32
  * @license lucide-react v0.487.0 - ISC
33
33
  *
34
34
  * This source code is licensed under the ISC license.
35
35
  * See the LICENSE file in the root directory of this source tree.
36
- */const mr=z("bell-off",[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0",key:"vwvbt9"}],["path",{d:"M17 17H4a1 1 0 0 1-.74-1.673C4.59 13.956 6 12.499 6 8a6 6 0 0 1 .258-1.742",key:"178tsu"}],["path",{d:"m2 2 20 20",key:"1ooewy"}],["path",{d:"M8.668 3.01A6 6 0 0 1 18 8c0 2.687.77 4.653 1.707 6.05",key:"1hqiys"}]]);/**
36
+ */const mr=_("bell-off",[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0",key:"vwvbt9"}],["path",{d:"M17 17H4a1 1 0 0 1-.74-1.673C4.59 13.956 6 12.499 6 8a6 6 0 0 1 .258-1.742",key:"178tsu"}],["path",{d:"m2 2 20 20",key:"1ooewy"}],["path",{d:"M8.668 3.01A6 6 0 0 1 18 8c0 2.687.77 4.653 1.707 6.05",key:"1hqiys"}]]);/**
37
37
  * @license lucide-react v0.487.0 - ISC
38
38
  *
39
39
  * This source code is licensed under the ISC license.
40
40
  * See the LICENSE file in the root directory of this source tree.
41
- */const ot=z("bell",[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0",key:"vwvbt9"}],["path",{d:"M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326",key:"11g9vi"}]]);/**
41
+ */const ot=_("bell",[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0",key:"vwvbt9"}],["path",{d:"M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326",key:"11g9vi"}]]);/**
42
42
  * @license lucide-react v0.487.0 - ISC
43
43
  *
44
44
  * This source code is licensed under the ISC license.
45
45
  * See the LICENSE file in the root directory of this source tree.
46
- */const xr=z("calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]]);/**
46
+ */const xr=_("calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]]);/**
47
47
  * @license lucide-react v0.487.0 - ISC
48
48
  *
49
49
  * This source code is licensed under the ISC license.
50
50
  * See the LICENSE file in the root directory of this source tree.
51
- */const ne=z("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
51
+ */const ne=_("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
52
52
  * @license lucide-react v0.487.0 - ISC
53
53
  *
54
54
  * This source code is licensed under the ISC license.
55
55
  * See the LICENSE file in the root directory of this source tree.
56
- */const we=z("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
56
+ */const we=_("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
57
57
  * @license lucide-react v0.487.0 - ISC
58
58
  *
59
59
  * This source code is licensed under the ISC license.
60
60
  * See the LICENSE file in the root directory of this source tree.
61
- */const pe=z("chevron-left",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/**
61
+ */const pe=_("chevron-left",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/**
62
62
  * @license lucide-react v0.487.0 - ISC
63
63
  *
64
64
  * This source code is licensed under the ISC license.
65
65
  * See the LICENSE file in the root directory of this source tree.
66
- */const ee=z("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
66
+ */const ee=_("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
67
67
  * @license lucide-react v0.487.0 - ISC
68
68
  *
69
69
  * This source code is licensed under the ISC license.
70
70
  * See the LICENSE file in the root directory of this source tree.
71
- */const Nr=z("chevron-up",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/**
71
+ */const Nr=_("chevron-up",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/**
72
72
  * @license lucide-react v0.487.0 - ISC
73
73
  *
74
74
  * This source code is licensed under the ISC license.
75
75
  * See the LICENSE file in the root directory of this source tree.
76
- */const De=z("chevrons-left",[["path",{d:"m11 17-5-5 5-5",key:"13zhaf"}],["path",{d:"m18 17-5-5 5-5",key:"h8a8et"}]]);/**
76
+ */const Te=_("chevrons-left",[["path",{d:"m11 17-5-5 5-5",key:"13zhaf"}],["path",{d:"m18 17-5-5 5-5",key:"h8a8et"}]]);/**
77
77
  * @license lucide-react v0.487.0 - ISC
78
78
  *
79
79
  * This source code is licensed under the ISC license.
80
80
  * See the LICENSE file in the root directory of this source tree.
81
- */const Te=z("chevrons-right",[["path",{d:"m6 17 5-5-5-5",key:"xnjwq"}],["path",{d:"m13 17 5-5-5-5",key:"17xmmf"}]]);/**
81
+ */const Ie=_("chevrons-right",[["path",{d:"m6 17 5-5-5-5",key:"xnjwq"}],["path",{d:"m13 17 5-5-5-5",key:"17xmmf"}]]);/**
82
82
  * @license lucide-react v0.487.0 - ISC
83
83
  *
84
84
  * This source code is licensed under the ISC license.
85
85
  * See the LICENSE file in the root directory of this source tree.
86
- */const wr=z("chevrons-up-down",[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]]);/**
86
+ */const wr=_("chevrons-up-down",[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]]);/**
87
87
  * @license lucide-react v0.487.0 - ISC
88
88
  *
89
89
  * This source code is licensed under the ISC license.
90
90
  * See the LICENSE file in the root directory of this source tree.
91
- */const $e=z("circle-alert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);/**
91
+ */const Se=_("circle-alert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);/**
92
92
  * @license lucide-react v0.487.0 - ISC
93
93
  *
94
94
  * This source code is licensed under the ISC license.
95
95
  * See the LICENSE file in the root directory of this source tree.
96
- */const te=z("circle-check",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/**
96
+ */const te=_("circle-check",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/**
97
97
  * @license lucide-react v0.487.0 - ISC
98
98
  *
99
99
  * This source code is licensed under the ISC license.
100
100
  * See the LICENSE file in the root directory of this source tree.
101
- */const at=z("circle-x",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);/**
101
+ */const at=_("circle-x",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);/**
102
102
  * @license lucide-react v0.487.0 - ISC
103
103
  *
104
104
  * This source code is licensed under the ISC license.
105
105
  * See the LICENSE file in the root directory of this source tree.
106
- */const st=z("circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);/**
106
+ */const st=_("circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);/**
107
107
  * @license lucide-react v0.487.0 - ISC
108
108
  *
109
109
  * This source code is licensed under the ISC license.
110
110
  * See the LICENSE file in the root directory of this source tree.
111
- */const $r=z("clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);/**
111
+ */const Sr=_("clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);/**
112
112
  * @license lucide-react v0.487.0 - ISC
113
113
  *
114
114
  * This source code is licensed under the ISC license.
115
115
  * See the LICENSE file in the root directory of this source tree.
116
- */const nt=z("copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);/**
116
+ */const nt=_("copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);/**
117
117
  * @license lucide-react v0.487.0 - ISC
118
118
  *
119
119
  * This source code is licensed under the ISC license.
120
120
  * See the LICENSE file in the root directory of this source tree.
121
- */const Sr=z("dot",[["circle",{cx:"12.1",cy:"12.1",r:"1",key:"18d7e5"}]]);/**
121
+ */const $r=_("dot",[["circle",{cx:"12.1",cy:"12.1",r:"1",key:"18d7e5"}]]);/**
122
122
  * @license lucide-react v0.487.0 - ISC
123
123
  *
124
124
  * This source code is licensed under the ISC license.
125
125
  * See the LICENSE file in the root directory of this source tree.
126
- */const lt=z("ellipsis",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]]);/**
126
+ */const lt=_("ellipsis",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]]);/**
127
127
  * @license lucide-react v0.487.0 - ISC
128
128
  *
129
129
  * This source code is licensed under the ISC license.
130
130
  * See the LICENSE file in the root directory of this source tree.
131
- */const kr=z("external-link",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);/**
131
+ */const kr=_("external-link",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);/**
132
132
  * @license lucide-react v0.487.0 - ISC
133
133
  *
134
134
  * This source code is licensed under the ISC license.
135
135
  * See the LICENSE file in the root directory of this source tree.
136
- */const zr=z("eye-off",[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]);/**
136
+ */const zr=_("eye-off",[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]);/**
137
137
  * @license lucide-react v0.487.0 - ISC
138
138
  *
139
139
  * This source code is licensed under the ISC license.
140
140
  * See the LICENSE file in the root directory of this source tree.
141
- */const _r=z("eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
141
+ */const _r=_("eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
142
142
  * @license lucide-react v0.487.0 - ISC
143
143
  *
144
144
  * This source code is licensed under the ISC license.
145
145
  * See the LICENSE file in the root directory of this source tree.
146
- */const Fr=z("file-text",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);/**
146
+ */const Fr=_("file-text",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);/**
147
147
  * @license lucide-react v0.487.0 - ISC
148
148
  *
149
149
  * This source code is licensed under the ISC license.
150
150
  * See the LICENSE file in the root directory of this source tree.
151
- */const it=z("file",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}]]);/**
151
+ */const it=_("file",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}]]);/**
152
152
  * @license lucide-react v0.487.0 - ISC
153
153
  *
154
154
  * This source code is licensed under the ISC license.
155
155
  * See the LICENSE file in the root directory of this source tree.
156
- */const Mr=z("film",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M7 3v18",key:"bbkbws"}],["path",{d:"M3 7.5h4",key:"zfgn84"}],["path",{d:"M3 12h18",key:"1i2n21"}],["path",{d:"M3 16.5h4",key:"1230mu"}],["path",{d:"M17 3v18",key:"in4fa5"}],["path",{d:"M17 7.5h4",key:"myr1c1"}],["path",{d:"M17 16.5h4",key:"go4c1d"}]]);/**
156
+ */const Wr=_("film",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M7 3v18",key:"bbkbws"}],["path",{d:"M3 7.5h4",key:"zfgn84"}],["path",{d:"M3 12h18",key:"1i2n21"}],["path",{d:"M3 16.5h4",key:"1230mu"}],["path",{d:"M17 3v18",key:"in4fa5"}],["path",{d:"M17 7.5h4",key:"myr1c1"}],["path",{d:"M17 16.5h4",key:"go4c1d"}]]);/**
157
157
  * @license lucide-react v0.487.0 - ISC
158
158
  *
159
159
  * This source code is licensed under the ISC license.
160
160
  * See the LICENSE file in the root directory of this source tree.
161
- */const Wr=z("folder-open",[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]]);/**
161
+ */const Mr=_("folder-open",[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]]);/**
162
162
  * @license lucide-react v0.487.0 - ISC
163
163
  *
164
164
  * This source code is licensed under the ISC license.
165
165
  * See the LICENSE file in the root directory of this source tree.
166
- */const Cr=z("folder",[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]]);/**
166
+ */const Cr=_("folder",[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]]);/**
167
167
  * @license lucide-react v0.487.0 - ISC
168
168
  *
169
169
  * This source code is licensed under the ISC license.
170
170
  * See the LICENSE file in the root directory of this source tree.
171
- */const Lr=z("heart",[["path",{d:"M19 14c1.49-1.46 3-3.21 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.76 0-3 .5-4.5 2-1.5-1.5-2.74-2-4.5-2A5.5 5.5 0 0 0 2 8.5c0 2.3 1.5 4.05 3 5.5l7 7Z",key:"c3ymky"}]]);/**
171
+ */const Lr=_("heart",[["path",{d:"M19 14c1.49-1.46 3-3.21 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.76 0-3 .5-4.5 2-1.5-1.5-2.74-2-4.5-2A5.5 5.5 0 0 0 2 8.5c0 2.3 1.5 4.05 3 5.5l7 7Z",key:"c3ymky"}]]);/**
172
172
  * @license lucide-react v0.487.0 - ISC
173
173
  *
174
174
  * This source code is licensed under the ISC license.
175
175
  * See the LICENSE file in the root directory of this source tree.
176
- */const jr=z("image",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]]);/**
176
+ */const jr=_("image",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]]);/**
177
177
  * @license lucide-react v0.487.0 - ISC
178
178
  *
179
179
  * This source code is licensed under the ISC license.
180
180
  * See the LICENSE file in the root directory of this source tree.
181
- */const Ar=z("inbox",[["polyline",{points:"22 12 16 12 14 15 10 15 8 12 2 12",key:"o97t9d"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}]]);/**
181
+ */const Ar=_("inbox",[["polyline",{points:"22 12 16 12 14 15 10 15 8 12 2 12",key:"o97t9d"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}]]);/**
182
182
  * @license lucide-react v0.487.0 - ISC
183
183
  *
184
184
  * This source code is licensed under the ISC license.
185
185
  * See the LICENSE file in the root directory of this source tree.
186
- */const dt=z("info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);/**
186
+ */const dt=_("info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);/**
187
187
  * @license lucide-react v0.487.0 - ISC
188
188
  *
189
189
  * This source code is licensed under the ISC license.
190
190
  * See the LICENSE file in the root directory of this source tree.
191
- */const ve=z("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/**
191
+ */const ve=_("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/**
192
192
  * @license lucide-react v0.487.0 - ISC
193
193
  *
194
194
  * This source code is licensed under the ISC license.
195
195
  * See the LICENSE file in the root directory of this source tree.
196
- */const Dr=z("menu",[["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}],["line",{x1:"4",x2:"20",y1:"6",y2:"6",key:"1owob3"}],["line",{x1:"4",x2:"20",y1:"18",y2:"18",key:"yk5zj1"}]]);/**
196
+ */const Dr=_("menu",[["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}],["line",{x1:"4",x2:"20",y1:"6",y2:"6",key:"1owob3"}],["line",{x1:"4",x2:"20",y1:"18",y2:"18",key:"yk5zj1"}]]);/**
197
197
  * @license lucide-react v0.487.0 - ISC
198
198
  *
199
199
  * This source code is licensed under the ISC license.
200
200
  * See the LICENSE file in the root directory of this source tree.
201
- */const Ee=z("minus",[["path",{d:"M5 12h14",key:"1ays0h"}]]);/**
201
+ */const Ee=_("minus",[["path",{d:"M5 12h14",key:"1ays0h"}]]);/**
202
202
  * @license lucide-react v0.487.0 - ISC
203
203
  *
204
204
  * This source code is licensed under the ISC license.
205
205
  * See the LICENSE file in the root directory of this source tree.
206
- */const Tr=z("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
206
+ */const Tr=_("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
207
207
  * @license lucide-react v0.487.0 - ISC
208
208
  *
209
209
  * This source code is licensed under the ISC license.
210
210
  * See the LICENSE file in the root directory of this source tree.
211
- */const Er=z("rotate-cw",[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]]);/**
211
+ */const Ir=_("rotate-cw",[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]]);/**
212
212
  * @license lucide-react v0.487.0 - ISC
213
213
  *
214
214
  * This source code is licensed under the ISC license.
215
215
  * See the LICENSE file in the root directory of this source tree.
216
- */const Se=z("search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
216
+ */const $e=_("search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
217
217
  * @license lucide-react v0.487.0 - ISC
218
218
  *
219
219
  * This source code is licensed under the ISC license.
220
220
  * See the LICENSE file in the root directory of this source tree.
221
- */const Ir=z("slash",[["path",{d:"M22 2 2 22",key:"y4kqgn"}]]);/**
221
+ */const Er=_("slash",[["path",{d:"M22 2 2 22",key:"y4kqgn"}]]);/**
222
222
  * @license lucide-react v0.487.0 - ISC
223
223
  *
224
224
  * This source code is licensed under the ISC license.
225
225
  * See the LICENSE file in the root directory of this source tree.
226
- */const Br=z("star",[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]]);/**
226
+ */const Br=_("star",[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]]);/**
227
227
  * @license lucide-react v0.487.0 - ISC
228
228
  *
229
229
  * This source code is licensed under the ISC license.
230
230
  * See the LICENSE file in the root directory of this source tree.
231
- */const Hr=z("thumbs-up",[["path",{d:"M7 10v12",key:"1qc93n"}],["path",{d:"M15 5.88 14 10h5.83a2 2 0 0 1 1.92 2.56l-2.33 8A2 2 0 0 1 17.5 22H4a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h2.76a2 2 0 0 0 1.79-1.11L12 2a3.13 3.13 0 0 1 3 3.88Z",key:"emmmcr"}]]);/**
231
+ */const Hr=_("thumbs-up",[["path",{d:"M7 10v12",key:"1qc93n"}],["path",{d:"M15 5.88 14 10h5.83a2 2 0 0 1 1.92 2.56l-2.33 8A2 2 0 0 1 17.5 22H4a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h2.76a2 2 0 0 0 1.79-1.11L12 2a3.13 3.13 0 0 1 3 3.88Z",key:"emmmcr"}]]);/**
232
232
  * @license lucide-react v0.487.0 - ISC
233
233
  *
234
234
  * This source code is licensed under the ISC license.
235
235
  * See the LICENSE file in the root directory of this source tree.
236
- */const ct=z("triangle-alert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/**
236
+ */const ct=_("triangle-alert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/**
237
237
  * @license lucide-react v0.487.0 - ISC
238
238
  *
239
239
  * This source code is licensed under the ISC license.
240
240
  * See the LICENSE file in the root directory of this source tree.
241
- */const Ie=z("upload",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"17 8 12 3 7 8",key:"t8dd8p"}],["line",{x1:"12",x2:"12",y1:"3",y2:"15",key:"widbto"}]]);/**
241
+ */const Be=_("upload",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"17 8 12 3 7 8",key:"t8dd8p"}],["line",{x1:"12",x2:"12",y1:"3",y2:"15",key:"widbto"}]]);/**
242
242
  * @license lucide-react v0.487.0 - ISC
243
243
  *
244
244
  * This source code is licensed under the ISC license.
245
245
  * See the LICENSE file in the root directory of this source tree.
246
- */const J=z("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);/**
246
+ */const J=_("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);/**
247
247
  * @license lucide-react v0.487.0 - ISC
248
248
  *
249
249
  * This source code is licensed under the ISC license.
250
250
  * See the LICENSE file in the root directory of this source tree.
251
- */const Yr=z("zoom-in",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["line",{x1:"21",x2:"16.65",y1:"21",y2:"16.65",key:"13gj7c"}],["line",{x1:"11",x2:"11",y1:"8",y2:"14",key:"1vmskp"}],["line",{x1:"8",x2:"14",y1:"11",y2:"11",key:"durymu"}]]);/**
251
+ */const Yr=_("zoom-in",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["line",{x1:"21",x2:"16.65",y1:"21",y2:"16.65",key:"13gj7c"}],["line",{x1:"11",x2:"11",y1:"8",y2:"14",key:"1vmskp"}],["line",{x1:"8",x2:"14",y1:"11",y2:"11",key:"durymu"}]]);/**
252
252
  * @license lucide-react v0.487.0 - ISC
253
253
  *
254
254
  * This source code is licensed under the ISC license.
255
255
  * See the LICENSE file in the root directory of this source tree.
256
- */const qr=z("zoom-out",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["line",{x1:"21",x2:"16.65",y1:"21",y2:"16.65",key:"13gj7c"}],["line",{x1:"8",x2:"14",y1:"11",y2:"11",key:"durymu"}]]),Or={sm:"h-8 px-3 gap-1.5",md:"h-10 px-4 gap-2",lg:"h-12 px-6 gap-2.5",xl:"h-14 px-8 gap-3"},Ur={sm:{fontFamily:"var(--font-button)",fontSize:"var(--text-button)",fontWeight:"var(--weight-button)"},md:{fontFamily:"var(--font-button)",fontSize:"var(--text-button)",fontWeight:"var(--weight-button)"},lg:{fontFamily:"var(--font-button)",fontSize:"var(--text-label)",fontWeight:"var(--weight-button)"},xl:{fontFamily:"var(--font-button)",fontSize:"var(--text-caption)",fontWeight:"var(--weight-button)"}},ft={sm:14,md:16,lg:18,xl:20},ht={primary:"bg-primary text-primary-foreground border border-primary hover:bg-primary/90 active:bg-primary/80 shadow-elevation-sm",secondary:"bg-secondary text-secondary-foreground border border-secondary hover:bg-secondary/90 active:bg-secondary/80 shadow-elevation-sm",outline:"bg-transparent text-foreground border border-border hover:bg-muted active:bg-muted/80",ghost:"bg-transparent text-foreground border border-transparent hover:bg-muted active:bg-muted/80",destructive:"bg-destructive text-destructive-foreground border border-destructive hover:bg-destructive/90 active:bg-destructive/80 shadow-elevation-sm",link:"bg-transparent text-primary border border-transparent underline-offset-4 hover:underline px-0 h-auto"},ut=c.forwardRef(({variant:t="primary",size:r="md",loading:a=!1,loadingText:o,leftIcon:s,rightIcon:l,fullWidth:n=!1,active:i=!1,disabled:d,children:h,className:f="",...p},v)=>{const u=d||a;return e.jsx("button",{ref:v,disabled:u,className:`inline-flex items-center justify-center rounded-[var(--radius-md)] transition-all duration-150
256
+ */const qr=_("zoom-out",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["line",{x1:"21",x2:"16.65",y1:"21",y2:"16.65",key:"13gj7c"}],["line",{x1:"8",x2:"14",y1:"11",y2:"11",key:"durymu"}]]),Or={sm:"h-8 px-3 gap-1.5",md:"h-10 px-4 gap-2",lg:"h-12 px-6 gap-2.5",xl:"h-14 px-8 gap-3"},Ur={sm:{fontFamily:"var(--font-button)",fontSize:"var(--text-button)",fontWeight:"var(--weight-button)"},md:{fontFamily:"var(--font-button)",fontSize:"var(--text-button)",fontWeight:"var(--weight-button)"},lg:{fontFamily:"var(--font-button)",fontSize:"var(--text-label)",fontWeight:"var(--weight-button)"},xl:{fontFamily:"var(--font-button)",fontSize:"var(--text-caption)",fontWeight:"var(--weight-button)"}},ft={sm:14,md:16,lg:18,xl:20},ht={primary:"bg-primary text-primary-foreground border border-primary hover:bg-primary/90 active:bg-primary/80 shadow-elevation-sm",secondary:"bg-secondary text-secondary-foreground border border-secondary hover:bg-secondary/90 active:bg-secondary/80 shadow-elevation-sm",outline:"bg-transparent text-foreground border border-border hover:bg-muted active:bg-muted/80",ghost:"bg-transparent text-foreground border border-transparent hover:bg-muted active:bg-muted/80",destructive:"bg-destructive text-destructive-foreground border border-destructive hover:bg-destructive/90 active:bg-destructive/80 shadow-elevation-sm",link:"bg-transparent text-primary border border-transparent underline-offset-4 hover:underline px-0 h-auto"},ut=f.forwardRef(({variant:t="primary",size:r="md",loading:a=!1,loadingText:o,leftIcon:s,rightIcon:l,fullWidth:n=!1,active:i=!1,disabled:d,children:h,className:u="",...p},v)=>{const c=d||a;return e.jsx("button",{ref:v,disabled:c,className:`inline-flex items-center justify-center rounded-[var(--radius-md)] transition-all duration-150
257
257
  ${Or[r]}
258
258
  ${ht[t]}
259
259
  ${n?"w-full":""}
260
260
  ${i?"ring-2 ring-ring/30":""}
261
- ${u?"opacity-50 cursor-not-allowed pointer-events-none":"cursor-pointer active:scale-[0.98]"}
261
+ ${c?"opacity-50 cursor-not-allowed pointer-events-none":"cursor-pointer active:scale-[0.98]"}
262
262
  focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/40
263
- ${f}
264
- `,style:Ur[r],...p,children:a?e.jsxs(e.Fragment,{children:[e.jsx(ve,{size:ft[r],className:"animate-spin flex-shrink-0"}),o&&e.jsx("span",{children:o})]}):e.jsxs(e.Fragment,{children:[s&&e.jsx("span",{className:"flex-shrink-0",children:s}),h&&e.jsx("span",{children:h}),l&&e.jsx("span",{className:"flex-shrink-0",children:l})]})})});ut.displayName="DSButton";const bt=c.forwardRef(({variant:t="ghost",size:r="md",loading:a=!1,icon:o,disabled:s,className:l="",...n},i)=>{const d=s||a,h={sm:"w-8 h-8",md:"w-10 h-10",lg:"w-12 h-12",xl:"w-14 h-14"};return e.jsx("button",{ref:i,disabled:d,className:`inline-flex items-center justify-center rounded-[var(--radius-md)] transition-all duration-150
263
+ ${u}
264
+ `,style:Ur[r],...p,children:a?e.jsxs(e.Fragment,{children:[e.jsx(ve,{size:ft[r],className:"animate-spin flex-shrink-0"}),o&&e.jsx("span",{children:o})]}):e.jsxs(e.Fragment,{children:[s&&e.jsx("span",{className:"flex-shrink-0",children:s}),h&&e.jsx("span",{children:h}),l&&e.jsx("span",{className:"flex-shrink-0",children:l})]})})});ut.displayName="DSButton";const bt=f.forwardRef(({variant:t="ghost",size:r="md",loading:a=!1,icon:o,disabled:s,className:l="",...n},i)=>{const d=s||a,h={sm:"w-8 h-8",md:"w-10 h-10",lg:"w-12 h-12",xl:"w-14 h-14"};return e.jsx("button",{ref:i,disabled:d,className:`inline-flex items-center justify-center rounded-[var(--radius-md)] transition-all duration-150
265
265
  ${h[r]}
266
266
  ${ht[t]}
267
267
  ${d?"opacity-50 cursor-not-allowed pointer-events-none":"cursor-pointer active:scale-[0.98]"}
268
268
  focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/40
269
269
  ${l}
270
- `,...n,children:a?e.jsx(ve,{size:ft[r],className:"animate-spin"}):o})});bt.displayName="IconButton";function Gr({children:t,className:r=""}){return e.jsx("div",{className:`inline-flex [&>button]:rounded-none [&>button:first-child]:rounded-l-[var(--radius-md)] [&>button:last-child]:rounded-r-[var(--radius-md)] [&>button:not(:last-child)]:border-r-0 ${r}`,children:t})}const gt={sm:{wrapper:"h-9 px-2.5 gap-1.5",textStyle:{fontFamily:"var(--font-label)",fontSize:"var(--text-label)",fontWeight:"var(--weight-label)"},icon:14},md:{wrapper:"h-11 px-3 gap-2",textStyle:{fontFamily:"var(--font-caption)",fontSize:"var(--text-caption)",fontWeight:"var(--weight-caption)"},icon:16},lg:{wrapper:"h-13 px-4 gap-2.5",textStyle:{fontFamily:"var(--font-p)",fontSize:"var(--text-p)",fontWeight:"var(--weight-p)"},icon:18}},pt={default:{base:"border border-border bg-input-background",hover:"hover:border-foreground/30",focus:"ring-2 ring-ring/20 border-ring"},outlined:{base:"border-2 border-border bg-transparent",hover:"hover:border-foreground/40",focus:"ring-2 ring-ring/20 border-ring"},filled:{base:"border border-transparent bg-muted",hover:"hover:bg-muted/80",focus:"ring-2 ring-ring/20 border-ring bg-input-background"},ghost:{base:"border border-transparent bg-transparent",hover:"hover:bg-muted/50",focus:"ring-2 ring-ring/20 bg-input-background"}},vt={default:"",error:"!border-destructive ring-destructive/20",success:"!border-chart-2 ring-chart-2/20",warning:"!border-chart-5 ring-chart-5/20"},ke={fontFamily:"var(--font-label)",fontSize:"var(--text-label)",fontWeight:"var(--weight-label)"},yt=c.forwardRef(({label:t,helperText:r,errorMessage:a,successMessage:o,inputSize:s="md",variant:l="default",state:n="default",leftIcon:i,rightIcon:d,prefix:h,suffix:f,clearable:p=!1,showPasswordToggle:v=!1,loading:u=!1,fullWidth:y=!0,required:S=!1,onClear:b,disabled:N,type:j="text",value:M,defaultValue:w,onChange:L,className:T="",...I},k)=>{const[$,_]=c.useState(!1),[B,G]=c.useState(!1),[m,A]=c.useState(w??""),X=M!==void 0?M:m,O=gt[s],P=pt[l],U=a?"error":n,Q=j==="password",q=Q&&B?"text":j,re=c.useCallback(he=>{A(he.target.value),L==null||L(he)},[L]),oe=c.useCallback(()=>{A(""),b==null||b()},[b]),ae=String(X).length>0;return e.jsxs("div",{className:`${y?"w-full":"inline-flex flex-col"} ${T}`,children:[t&&e.jsxs("label",{className:"block mb-1.5 text-foreground",children:[t,S&&e.jsx("span",{className:"text-destructive ml-0.5",children:"*"})]}),e.jsxs("div",{className:`flex items-center rounded-[var(--radius-md)] transition-all duration-150
271
- ${O.wrapper}
270
+ `,...n,children:a?e.jsx(ve,{size:ft[r],className:"animate-spin"}):o})});bt.displayName="IconButton";function Gr({children:t,className:r=""}){return e.jsx("div",{className:`inline-flex [&>button]:rounded-none [&>button:first-child]:rounded-l-[var(--radius-md)] [&>button:last-child]:rounded-r-[var(--radius-md)] [&>button:not(:last-child)]:border-r-0 ${r}`,children:t})}const gt={sm:{wrapper:"h-9 px-2.5 gap-1.5",textStyle:{fontFamily:"var(--font-label)",fontSize:"var(--text-label)",fontWeight:"var(--weight-label)"},icon:14},md:{wrapper:"h-11 px-3 gap-2",textStyle:{fontFamily:"var(--font-caption)",fontSize:"var(--text-caption)",fontWeight:"var(--weight-caption)"},icon:16},lg:{wrapper:"h-13 px-4 gap-2.5",textStyle:{fontFamily:"var(--font-p)",fontSize:"var(--text-p)",fontWeight:"var(--weight-p)"},icon:18}},pt={default:{base:"border border-border bg-input-background",hover:"hover:border-foreground/30",focus:"ring-2 ring-ring/20 border-ring"},outlined:{base:"border-2 border-border bg-transparent",hover:"hover:border-foreground/40",focus:"ring-2 ring-ring/20 border-ring"},filled:{base:"border border-transparent bg-muted",hover:"hover:bg-muted/80",focus:"ring-2 ring-ring/20 border-ring bg-input-background"},ghost:{base:"border border-transparent bg-transparent",hover:"hover:bg-muted/50",focus:"ring-2 ring-ring/20 bg-input-background"}},vt={default:"",error:"!border-destructive ring-destructive/20",success:"!border-chart-2 ring-chart-2/20",warning:"!border-chart-5 ring-chart-5/20"},ke={fontFamily:"var(--font-label)",fontSize:"var(--text-label)",fontWeight:"var(--weight-label)"},yt=f.forwardRef(({label:t,helperText:r,errorMessage:a,successMessage:o,inputSize:s="md",variant:l="default",state:n="default",leftIcon:i,rightIcon:d,prefix:h,suffix:u,clearable:p=!1,showPasswordToggle:v=!1,loading:c=!1,fullWidth:S=!0,required:w=!1,onClear:b,disabled:m,type:A="text",value:N,defaultValue:$,onChange:C,className:L="",...D},B)=>{const[z,F]=f.useState(!1),[H,k]=f.useState(!1),[y,T]=f.useState($??""),O=N!==void 0?N:y,G=gt[s],P=pt[l],K=a?"error":n,Q=A==="password",U=Q&&H?"text":A,re=f.useCallback(he=>{T(he.target.value),C==null||C(he)},[C]),oe=f.useCallback(()=>{T(""),b==null||b()},[b]),ae=String(O).length>0;return e.jsxs("div",{className:`${S?"w-full":"inline-flex flex-col"} ${L}`,children:[t&&e.jsxs("label",{className:"block mb-1.5 text-foreground",children:[t,w&&e.jsx("span",{className:"text-destructive ml-0.5",children:"*"})]}),e.jsxs("div",{className:`flex items-center rounded-[var(--radius-md)] transition-all duration-150
271
+ ${G.wrapper}
272
272
  ${P.base}
273
- ${N?"":P.hover}
274
- ${$&&!N?P.focus:""}
275
- ${N?"opacity-50 cursor-not-allowed":""}
276
- ${vt[U]}
277
- `,children:[i&&e.jsx("span",{className:"flex-shrink-0 text-muted-foreground",children:i}),h&&e.jsx("span",{className:"flex-shrink-0 text-muted-foreground",style:ke,children:h}),e.jsx("input",{ref:k,type:q,disabled:N||u,value:X,onChange:re,onFocus:()=>_(!0),onBlur:()=>_(!1),className:"flex-1 min-w-0 bg-transparent border-none outline-none text-foreground placeholder:text-muted-foreground disabled:cursor-not-allowed",style:O.textStyle,...I}),f&&e.jsx("span",{className:"flex-shrink-0 text-muted-foreground",style:ke,children:f}),p&&ae&&!N&&e.jsx("button",{type:"button",onClick:oe,className:"flex-shrink-0 text-muted-foreground hover:text-foreground transition-colors cursor-pointer p-0.5",children:e.jsx(J,{size:O.icon-2})}),Q&&v&&e.jsx("button",{type:"button",onClick:()=>G(!B),className:"flex-shrink-0 text-muted-foreground hover:text-foreground transition-colors cursor-pointer p-0.5",children:B?e.jsx(zr,{size:O.icon}):e.jsx(_r,{size:O.icon})}),d&&!Q&&e.jsx("span",{className:"flex-shrink-0 text-muted-foreground",children:d}),u&&e.jsx("span",{className:"flex-shrink-0",children:e.jsx("span",{className:"block w-4 h-4 border-2 border-muted-foreground border-t-transparent rounded-full animate-spin"})})]}),(r||a||o)&&e.jsxs("div",{className:"mt-1.5 flex items-center gap-1",children:[U==="error"&&e.jsx($e,{size:12,className:"text-destructive flex-shrink-0"}),U==="success"&&e.jsx(te,{size:12,className:"text-chart-2 flex-shrink-0"}),e.jsx("span",{className:`${U==="error"?"text-destructive":U==="success"?"text-chart-2":"text-muted-foreground"}`,style:ke,children:a||o||r})]})]})});yt.displayName="DSInput";const mt=c.forwardRef(({label:t,helperText:r,errorMessage:a,successMessage:o,inputSize:s="md",variant:l="default",state:n="default",showCharCount:i=!1,maxLength:d,required:h=!1,disabled:f,value:p,defaultValue:v,onChange:u,className:y="",...S},b)=>{const[N,j]=c.useState(!1),[M,w]=c.useState(String(v??"").length),L=gt[s],T=pt[l],I=a?"error":n,k=c.useCallback($=>{w($.target.value.length),u==null||u($)},[u]);return e.jsxs("div",{className:`w-full ${y}`,children:[t&&e.jsxs("label",{className:"block mb-1.5 text-foreground",children:[t,h&&e.jsx("span",{className:"text-destructive ml-0.5",children:"*"})]}),e.jsxs("div",{className:`transition-all duration-150 overflow-hidden rounded-[var(--radius-md)]
278
- ${T.base}
279
- ${f?"":T.hover}
280
- ${N&&!f?T.focus:""}
281
- ${f?"opacity-50 cursor-not-allowed":""}
282
- ${vt[I]}
283
- `,children:[e.jsx("textarea",{ref:b,disabled:f,value:p,defaultValue:v,maxLength:d,onChange:k,onFocus:()=>j(!0),onBlur:()=>j(!1),className:"w-full min-h-[100px] px-3 py-2.5 bg-transparent border-none outline-none text-foreground placeholder:text-muted-foreground resize-y disabled:cursor-not-allowed",style:L.textStyle,...S}),i&&e.jsxs("div",{className:"flex justify-end px-3 py-1.5 border-t border-border text-muted-foreground bg-muted/20",style:{fontFamily:"var(--font-button)",fontSize:"var(--text-button)",fontWeight:"var(--weight-label)"},children:[M,d?` / ${d}`:""," chars"]})]}),(r||a||o)&&e.jsxs("div",{className:"mt-1.5 flex items-center gap-1",children:[I==="error"&&e.jsx($e,{size:12,className:"text-destructive flex-shrink-0"}),I==="success"&&e.jsx(te,{size:12,className:"text-chart-2 flex-shrink-0"}),e.jsx("span",{className:`${I==="error"?"text-destructive":I==="success"?"text-chart-2":"text-muted-foreground"}`,style:ke,children:a||o||r})]})]})});mt.displayName="DSTextarea";const Kr={info:{bg:"bg-primary/5",border:"border-primary/30",text:"text-primary",icon:e.jsx(dt,{size:18})},success:{bg:"bg-chart-2/5",border:"border-chart-2/30",text:"text-chart-2",icon:e.jsx(te,{size:18})},warning:{bg:"bg-chart-5/5",border:"border-chart-5/30",text:"text-chart-5",icon:e.jsx(ct,{size:18})},error:{bg:"bg-destructive/5",border:"border-destructive/30",text:"text-destructive",icon:e.jsx(at,{size:18})}};function xt({variant:t="info",title:r,children:a,dismissible:o=!1,onDismiss:s,action:l,icon:n,className:i=""}){const[d,h]=c.useState(!0),f=Kr[t];if(!d)return null;const p=()=>{h(!1),s==null||s()};return e.jsxs("div",{className:`flex gap-3 p-4 rounded-[var(--radius)] border ${f.bg} ${f.border} ${i}`,role:"alert",children:[e.jsx("span",{className:`flex-shrink-0 mt-0.5 ${f.text}`,children:n??f.icon}),e.jsxs("div",{className:"flex-1 min-w-0",children:[r&&e.jsx("span",{className:`block ${f.text}`,style:{fontFamily:"var(--font-label)",fontSize:"var(--text-label)",fontWeight:"var(--weight-button)"},children:r}),e.jsx("span",{className:"text-foreground block",style:{fontFamily:"var(--font-label)",fontSize:"var(--text-label)",fontWeight:"var(--weight-label)"},children:a}),l&&e.jsx("div",{className:"mt-2",children:l})]}),o&&e.jsx("button",{onClick:p,className:"flex-shrink-0 text-muted-foreground hover:text-foreground transition-colors cursor-pointer","aria-label":"Dismiss",children:e.jsx(J,{size:16})})]})}let Nt=[],ye=[];function wt(){Nt.forEach(t=>t([...ye]))}const le={show:t=>{const r={...t,id:`toast-${Date.now()}-${Math.random().toString(36).slice(2)}`};ye=[...ye,r],wt(),setTimeout(()=>{le.dismiss(r.id)},t.duration??4e3)},info:(t,r)=>le.show({variant:"info",message:t,title:r}),success:(t,r)=>le.show({variant:"success",message:t,title:r}),warning:(t,r)=>le.show({variant:"warning",message:t,title:r}),error:(t,r)=>le.show({variant:"error",message:t,title:r}),dismiss:t=>{ye=ye.filter(r=>r.id!==t),wt()}};function Xr(){const[t,r]=c.useState([]),a=c.useRef(!1);return a.current||(a.current=!0,Nt.push(r)),t.length===0?null:e.jsx("div",{className:"fixed bottom-4 right-4 z-[200] flex flex-col gap-2 max-w-sm w-full pointer-events-none",children:t.map(o=>e.jsx("div",{className:"pointer-events-auto animate-in slide-in-from-right fade-in duration-300",children:e.jsx(xt,{variant:o.variant,title:o.title,dismissible:!0,onDismiss:()=>le.dismiss(o.id),children:o.message})},o.id))})}const Zr={default:"bg-primary text-primary-foreground",secondary:"bg-secondary/15 text-secondary",outline:"bg-transparent border border-border text-foreground",destructive:"bg-destructive/15 text-destructive",success:"bg-chart-2/15 text-chart-2",warning:"bg-chart-5/15 text-chart-5"},Jr={sm:{className:"px-1.5 py-0.5 gap-1",style:{fontFamily:"var(--font-button)",fontSize:"var(--text-button)",fontWeight:"var(--weight-button)"},iconSize:10},md:{className:"px-2.5 py-0.5 gap-1.5",style:{fontFamily:"var(--font-button)",fontSize:"var(--text-button)",fontWeight:"var(--weight-button)"},iconSize:12},lg:{className:"px-3 py-1 gap-1.5",style:{fontFamily:"var(--font-button)",fontSize:"var(--text-button)",fontWeight:"var(--weight-button)"},iconSize:14}},Pr={default:"bg-primary-foreground",secondary:"bg-secondary",outline:"bg-foreground",destructive:"bg-destructive",success:"bg-chart-2",warning:"bg-chart-5"};function Qr({children:t,variant:r="default",size:a="md",icon:o,dot:s,removable:l,onRemove:n,className:i=""}){const d=Jr[a];return e.jsxs("span",{className:`inline-flex items-center rounded-full whitespace-nowrap ${Zr[r]} ${d.className} ${i}`,style:{...d.style,lineHeight:"1.2"},children:[s&&e.jsx("span",{className:`w-1.5 h-1.5 rounded-full flex-shrink-0 ${Pr[r]}`}),o&&e.jsx("span",{className:"flex-shrink-0",children:o}),e.jsx("span",{children:t}),l&&e.jsx("button",{onClick:n,className:"flex-shrink-0 hover:opacity-70 transition-opacity cursor-pointer rounded-full -mr-0.5","aria-label":"Remove",children:e.jsx(J,{size:d.iconSize})})]})}const Vr={sm:{box:"w-4 h-4",icon:10,labelStyle:{fontFamily:"var(--font-button)",fontSize:"var(--text-button)",fontWeight:"var(--weight-label)"},descStyle:{fontFamily:"var(--font-button)",fontSize:"var(--text-button)",fontWeight:"var(--weight-label)"}},md:{box:"w-5 h-5",icon:12,labelStyle:{fontFamily:"var(--font-label)",fontSize:"var(--text-label)",fontWeight:"var(--weight-label)"},descStyle:{fontFamily:"var(--font-button)",fontSize:"var(--text-button)",fontWeight:"var(--weight-label)"}},lg:{box:"w-6 h-6",icon:14,labelStyle:{fontFamily:"var(--font-caption)",fontSize:"var(--text-caption)",fontWeight:"var(--weight-label)"},descStyle:{fontFamily:"var(--font-label)",fontSize:"var(--text-label)",fontWeight:"var(--weight-label)"}}};function Rr({checked:t,indeterminate:r=!1,defaultChecked:a=!1,onChange:o,label:s,description:l,size:n="md",disabled:i=!1,error:d,className:h="",id:f}){const[p,v]=c.useState(a),u=t??p,y=Vr[n],S=f??`cb-${c.useId()}`,b=()=>{if(i)return;const j=!u;t===void 0&&v(j),o==null||o(j)},N=u||r;return e.jsxs("div",{className:`inline-flex items-start gap-2.5 ${i?"opacity-50":""} ${h}`,children:[e.jsx("button",{id:S,role:"checkbox","aria-checked":r?"mixed":u,disabled:i,onClick:b,className:`${y.box} flex-shrink-0 rounded-[var(--radius-sm)] border-2 transition-all flex items-center justify-center cursor-pointer mt-0.5
284
- ${N?"bg-primary border-primary text-primary-foreground":d?"border-destructive bg-card":"border-border bg-card hover:border-primary/50"}
273
+ ${m?"":P.hover}
274
+ ${z&&!m?P.focus:""}
275
+ ${m?"opacity-50 cursor-not-allowed":""}
276
+ ${vt[K]}
277
+ `,children:[i&&e.jsx("span",{className:"flex-shrink-0 text-muted-foreground",children:i}),h&&e.jsx("span",{className:"flex-shrink-0 text-muted-foreground",style:ke,children:h}),e.jsx("input",{ref:B,type:U,disabled:m||c,value:O,onChange:re,onFocus:()=>F(!0),onBlur:()=>F(!1),className:"flex-1 min-w-0 bg-transparent border-none outline-none text-foreground placeholder:text-muted-foreground disabled:cursor-not-allowed",style:G.textStyle,...D}),u&&e.jsx("span",{className:"flex-shrink-0 text-muted-foreground",style:ke,children:u}),p&&ae&&!m&&e.jsx("button",{type:"button",onClick:oe,className:"flex-shrink-0 text-muted-foreground hover:text-foreground transition-colors cursor-pointer p-0.5",children:e.jsx(J,{size:G.icon-2})}),Q&&v&&e.jsx("button",{type:"button",onClick:()=>k(!H),className:"flex-shrink-0 text-muted-foreground hover:text-foreground transition-colors cursor-pointer p-0.5",children:H?e.jsx(zr,{size:G.icon}):e.jsx(_r,{size:G.icon})}),d&&!Q&&e.jsx("span",{className:"flex-shrink-0 text-muted-foreground",children:d}),c&&e.jsx("span",{className:"flex-shrink-0",children:e.jsx("span",{className:"block w-4 h-4 border-2 border-muted-foreground border-t-transparent rounded-full animate-spin"})})]}),(r||a||o)&&e.jsxs("div",{className:"mt-1.5 flex items-center gap-1",children:[K==="error"&&e.jsx(Se,{size:12,className:"text-destructive flex-shrink-0"}),K==="success"&&e.jsx(te,{size:12,className:"text-chart-2 flex-shrink-0"}),e.jsx("span",{className:`${K==="error"?"text-destructive":K==="success"?"text-chart-2":"text-muted-foreground"}`,style:ke,children:a||o||r})]})]})});yt.displayName="DSInput";const mt=f.forwardRef(({label:t,helperText:r,errorMessage:a,successMessage:o,inputSize:s="md",variant:l="default",state:n="default",showCharCount:i=!1,maxLength:d,required:h=!1,disabled:u,value:p,defaultValue:v,onChange:c,className:S="",...w},b)=>{const[m,A]=f.useState(!1),[N,$]=f.useState(String(v??"").length),C=gt[s],L=pt[l],D=a?"error":n,B=f.useCallback(z=>{$(z.target.value.length),c==null||c(z)},[c]);return e.jsxs("div",{className:`w-full ${S}`,children:[t&&e.jsxs("label",{className:"block mb-1.5 text-foreground",children:[t,h&&e.jsx("span",{className:"text-destructive ml-0.5",children:"*"})]}),e.jsxs("div",{className:`transition-all duration-150 overflow-hidden rounded-[var(--radius-md)]
278
+ ${L.base}
279
+ ${u?"":L.hover}
280
+ ${m&&!u?L.focus:""}
281
+ ${u?"opacity-50 cursor-not-allowed":""}
282
+ ${vt[D]}
283
+ `,children:[e.jsx("textarea",{ref:b,disabled:u,value:p,defaultValue:v,maxLength:d,onChange:B,onFocus:()=>A(!0),onBlur:()=>A(!1),className:"w-full min-h-[100px] px-3 py-2.5 bg-transparent border-none outline-none text-foreground placeholder:text-muted-foreground resize-y disabled:cursor-not-allowed",style:C.textStyle,...w}),i&&e.jsxs("div",{className:"flex justify-end px-3 py-1.5 border-t border-border text-muted-foreground bg-muted/20",style:{fontFamily:"var(--font-button)",fontSize:"var(--text-button)",fontWeight:"var(--weight-label)"},children:[N,d?` / ${d}`:""," chars"]})]}),(r||a||o)&&e.jsxs("div",{className:"mt-1.5 flex items-center gap-1",children:[D==="error"&&e.jsx(Se,{size:12,className:"text-destructive flex-shrink-0"}),D==="success"&&e.jsx(te,{size:12,className:"text-chart-2 flex-shrink-0"}),e.jsx("span",{className:`${D==="error"?"text-destructive":D==="success"?"text-chart-2":"text-muted-foreground"}`,style:ke,children:a||o||r})]})]})});mt.displayName="DSTextarea";const Kr={info:{bg:"bg-primary/5",border:"border-primary/30",text:"text-primary",icon:e.jsx(dt,{size:18})},success:{bg:"bg-chart-2/5",border:"border-chart-2/30",text:"text-chart-2",icon:e.jsx(te,{size:18})},warning:{bg:"bg-chart-5/5",border:"border-chart-5/30",text:"text-chart-5",icon:e.jsx(ct,{size:18})},error:{bg:"bg-destructive/5",border:"border-destructive/30",text:"text-destructive",icon:e.jsx(at,{size:18})}};function xt({variant:t="info",title:r,children:a,dismissible:o=!1,onDismiss:s,action:l,icon:n,className:i=""}){const[d,h]=f.useState(!0),u=Kr[t];if(!d)return null;const p=()=>{h(!1),s==null||s()};return e.jsxs("div",{className:`flex gap-3 p-4 rounded-[var(--radius)] border ${u.bg} ${u.border} ${i}`,role:"alert",children:[e.jsx("span",{className:`flex-shrink-0 mt-0.5 ${u.text}`,children:n??u.icon}),e.jsxs("div",{className:"flex-1 min-w-0",children:[r&&e.jsx("span",{className:`block ${u.text}`,style:{fontFamily:"var(--font-label)",fontSize:"var(--text-label)",fontWeight:"var(--weight-button)"},children:r}),e.jsx("span",{className:"text-foreground block",style:{fontFamily:"var(--font-label)",fontSize:"var(--text-label)",fontWeight:"var(--weight-label)"},children:a}),l&&e.jsx("div",{className:"mt-2",children:l})]}),o&&e.jsx("button",{onClick:p,className:"flex-shrink-0 text-muted-foreground hover:text-foreground transition-colors cursor-pointer","aria-label":"Dismiss",children:e.jsx(J,{size:16})})]})}let Nt=[],ye=[];function wt(){Nt.forEach(t=>t([...ye]))}const le={show:t=>{const r={...t,id:`toast-${Date.now()}-${Math.random().toString(36).slice(2)}`};ye=[...ye,r],wt(),setTimeout(()=>{le.dismiss(r.id)},t.duration??4e3)},info:(t,r)=>le.show({variant:"info",message:t,title:r}),success:(t,r)=>le.show({variant:"success",message:t,title:r}),warning:(t,r)=>le.show({variant:"warning",message:t,title:r}),error:(t,r)=>le.show({variant:"error",message:t,title:r}),dismiss:t=>{ye=ye.filter(r=>r.id!==t),wt()}};function Xr(){const[t,r]=f.useState([]),a=f.useRef(!1);return a.current||(a.current=!0,Nt.push(r)),t.length===0?null:e.jsx("div",{className:"fixed bottom-4 right-4 z-[200] flex flex-col gap-2 max-w-sm w-full pointer-events-none",children:t.map(o=>e.jsx("div",{className:"pointer-events-auto animate-in slide-in-from-right fade-in duration-300",children:e.jsx(xt,{variant:o.variant,title:o.title,dismissible:!0,onDismiss:()=>le.dismiss(o.id),children:o.message})},o.id))})}const Zr={default:"bg-primary text-primary-foreground",secondary:"bg-secondary/15 text-secondary",outline:"bg-transparent border border-border text-foreground",destructive:"bg-destructive/15 text-destructive",success:"bg-chart-2/15 text-chart-2",warning:"bg-chart-5/15 text-chart-5"},Jr={sm:{className:"px-1.5 py-0.5 gap-1",style:{fontFamily:"var(--font-button)",fontSize:"var(--text-button)",fontWeight:"var(--weight-button)"},iconSize:10},md:{className:"px-2.5 py-0.5 gap-1.5",style:{fontFamily:"var(--font-button)",fontSize:"var(--text-button)",fontWeight:"var(--weight-button)"},iconSize:12},lg:{className:"px-3 py-1 gap-1.5",style:{fontFamily:"var(--font-button)",fontSize:"var(--text-button)",fontWeight:"var(--weight-button)"},iconSize:14}},Pr={default:"bg-primary-foreground",secondary:"bg-secondary",outline:"bg-foreground",destructive:"bg-destructive",success:"bg-chart-2",warning:"bg-chart-5"};function Qr({children:t,variant:r="default",size:a="md",icon:o,dot:s,removable:l,onRemove:n,className:i=""}){const d=Jr[a];return e.jsxs("span",{className:`inline-flex items-center rounded-full whitespace-nowrap ${Zr[r]} ${d.className} ${i}`,style:{...d.style,lineHeight:"1.2"},children:[s&&e.jsx("span",{className:`w-1.5 h-1.5 rounded-full flex-shrink-0 ${Pr[r]}`}),o&&e.jsx("span",{className:"flex-shrink-0",children:o}),e.jsx("span",{children:t}),l&&e.jsx("button",{onClick:n,className:"flex-shrink-0 hover:opacity-70 transition-opacity cursor-pointer rounded-full -mr-0.5","aria-label":"Remove",children:e.jsx(J,{size:d.iconSize})})]})}const Vr={sm:{box:"w-4 h-4",icon:10,labelStyle:{fontFamily:"var(--font-button)",fontSize:"var(--text-button)",fontWeight:"var(--weight-label)"},descStyle:{fontFamily:"var(--font-button)",fontSize:"var(--text-button)",fontWeight:"var(--weight-label)"}},md:{box:"w-5 h-5",icon:12,labelStyle:{fontFamily:"var(--font-label)",fontSize:"var(--text-label)",fontWeight:"var(--weight-label)"},descStyle:{fontFamily:"var(--font-button)",fontSize:"var(--text-button)",fontWeight:"var(--weight-label)"}},lg:{box:"w-6 h-6",icon:14,labelStyle:{fontFamily:"var(--font-caption)",fontSize:"var(--text-caption)",fontWeight:"var(--weight-label)"},descStyle:{fontFamily:"var(--font-label)",fontSize:"var(--text-label)",fontWeight:"var(--weight-label)"}}};function Rr({checked:t,indeterminate:r=!1,defaultChecked:a=!1,onChange:o,label:s,description:l,size:n="md",disabled:i=!1,error:d,className:h="",id:u}){const[p,v]=f.useState(a),c=t??p,S=Vr[n],w=u??`cb-${f.useId()}`,b=()=>{if(i)return;const A=!c;t===void 0&&v(A),o==null||o(A)},m=c||r;return e.jsxs("div",{className:`inline-flex items-start gap-2.5 ${i?"opacity-50":""} ${h}`,children:[e.jsx("button",{id:w,role:"checkbox","aria-checked":r?"mixed":c,disabled:i,onClick:b,className:`${S.box} flex-shrink-0 rounded-[var(--radius-sm)] border-2 transition-all flex items-center justify-center cursor-pointer mt-0.5
284
+ ${m?"bg-primary border-primary text-primary-foreground":d?"border-destructive bg-card":"border-border bg-card hover:border-primary/50"}
285
285
  ${i?"!cursor-not-allowed":""}
286
- focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 outline-none`,children:r?e.jsx(Ee,{size:y.icon,strokeWidth:3}):u?e.jsx(ne,{size:y.icon,strokeWidth:3}):null}),(s||l)&&e.jsxs("div",{className:"min-w-0",children:[s&&e.jsx("label",{htmlFor:S,className:`text-foreground block cursor-pointer ${i?"!cursor-not-allowed":""}`,style:y.labelStyle,onClick:b,children:s}),l&&e.jsx("span",{className:"text-muted-foreground block",style:y.descStyle,children:l}),d&&e.jsx("span",{className:"text-destructive block mt-0.5",style:y.descStyle,children:d})]})]})}function eo({label:t,children:r,direction:a="vertical",className:o=""}){return e.jsxs("fieldset",{className:`${o}`,children:[t&&e.jsx("legend",{className:"text-foreground mb-2 block",style:{fontFamily:"var(--font-label)",fontSize:"var(--text-label)",fontWeight:"var(--weight-button)"},children:t}),e.jsx("div",{className:`flex ${a==="vertical"?"flex-col gap-3":"flex-wrap gap-4"}`,children:r})]})}const $t=c.createContext(null),to={sm:{outer:"w-4 h-4",inner:"w-1.5 h-1.5",labelStyle:{fontFamily:"var(--font-button)",fontSize:"var(--text-button)",fontWeight:"var(--weight-label)"},descStyle:{fontFamily:"var(--font-button)",fontSize:"var(--text-button)",fontWeight:"var(--weight-label)"}},md:{outer:"w-5 h-5",inner:"w-2 h-2",labelStyle:{fontFamily:"var(--font-label)",fontSize:"var(--text-label)",fontWeight:"var(--weight-label)"},descStyle:{fontFamily:"var(--font-button)",fontSize:"var(--text-button)",fontWeight:"var(--weight-label)"}},lg:{outer:"w-6 h-6",inner:"w-2.5 h-2.5",labelStyle:{fontFamily:"var(--font-caption)",fontSize:"var(--text-caption)",fontWeight:"var(--weight-label)"},descStyle:{fontFamily:"var(--font-label)",fontSize:"var(--text-label)",fontWeight:"var(--weight-label)"}}};function ro({value:t,label:r,description:a,disabled:o,size:s,className:l=""}){const n=c.useContext($t),i=n?n.value===t:!1,d=o??(n==null?void 0:n.disabled)??!1,h=s??(n==null?void 0:n.size)??"md",f=to[h],p=()=>{d||n==null||n.onChange(t)};return e.jsxs("div",{className:`inline-flex items-start gap-2.5 ${d?"opacity-50":""} ${l}`,children:[e.jsx("button",{role:"radio","aria-checked":i,disabled:d,onClick:p,className:`${f.outer} flex-shrink-0 rounded-full border-2 transition-all flex items-center justify-center cursor-pointer mt-0.5
286
+ focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 outline-none`,children:r?e.jsx(Ee,{size:S.icon,strokeWidth:3}):c?e.jsx(ne,{size:S.icon,strokeWidth:3}):null}),(s||l)&&e.jsxs("div",{className:"min-w-0",children:[s&&e.jsx("label",{htmlFor:w,className:`text-foreground block cursor-pointer ${i?"!cursor-not-allowed":""}`,style:S.labelStyle,onClick:b,children:s}),l&&e.jsx("span",{className:"text-muted-foreground block",style:S.descStyle,children:l}),d&&e.jsx("span",{className:"text-destructive block mt-0.5",style:S.descStyle,children:d})]})]})}function eo({label:t,children:r,direction:a="vertical",className:o=""}){return e.jsxs("fieldset",{className:`${o}`,children:[t&&e.jsx("legend",{className:"text-foreground mb-2 block",style:{fontFamily:"var(--font-label)",fontSize:"var(--text-label)",fontWeight:"var(--weight-button)"},children:t}),e.jsx("div",{className:`flex ${a==="vertical"?"flex-col gap-3":"flex-wrap gap-4"}`,children:r})]})}const St=f.createContext(null),to={sm:{outer:"w-4 h-4",inner:"w-1.5 h-1.5",labelStyle:{fontFamily:"var(--font-button)",fontSize:"var(--text-button)",fontWeight:"var(--weight-label)"},descStyle:{fontFamily:"var(--font-button)",fontSize:"var(--text-button)",fontWeight:"var(--weight-label)"}},md:{outer:"w-5 h-5",inner:"w-2 h-2",labelStyle:{fontFamily:"var(--font-label)",fontSize:"var(--text-label)",fontWeight:"var(--weight-label)"},descStyle:{fontFamily:"var(--font-button)",fontSize:"var(--text-button)",fontWeight:"var(--weight-label)"}},lg:{outer:"w-6 h-6",inner:"w-2.5 h-2.5",labelStyle:{fontFamily:"var(--font-caption)",fontSize:"var(--text-caption)",fontWeight:"var(--weight-label)"},descStyle:{fontFamily:"var(--font-label)",fontSize:"var(--text-label)",fontWeight:"var(--weight-label)"}}};function ro({value:t,label:r,description:a,disabled:o,size:s,className:l=""}){const n=f.useContext(St),i=n?n.value===t:!1,d=o??(n==null?void 0:n.disabled)??!1,h=s??(n==null?void 0:n.size)??"md",u=to[h],p=()=>{d||n==null||n.onChange(t)};return e.jsxs("div",{className:`inline-flex items-start gap-2.5 ${d?"opacity-50":""} ${l}`,children:[e.jsx("button",{role:"radio","aria-checked":i,disabled:d,onClick:p,className:`${u.outer} flex-shrink-0 rounded-full border-2 transition-all flex items-center justify-center cursor-pointer mt-0.5
287
287
  ${i?"border-primary":"border-border hover:border-primary/50"}
288
288
  ${d?"!cursor-not-allowed":""}
289
- focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 outline-none`,children:i&&e.jsx("span",{className:`${f.inner} rounded-full bg-primary transition-transform scale-100`})}),(r||a)&&e.jsxs("div",{className:"min-w-0",children:[r&&e.jsx("span",{className:`text-foreground block cursor-pointer ${d?"!cursor-not-allowed":""}`,style:f.labelStyle,onClick:p,children:r}),a&&e.jsx("span",{className:"text-muted-foreground block",style:f.descStyle,children:a})]})]})}function oo({name:t,value:r,defaultValue:a="",onChange:o,label:s,size:l="md",disabled:n=!1,direction:i="vertical",children:d,error:h,className:f=""}){const[p,v]=c.useState(a),u=r??p,y=S=>{r===void 0&&v(S),o==null||o(S)};return e.jsx($t.Provider,{value:{value:u,onChange:y,size:l,disabled:n,name:t},children:e.jsxs("fieldset",{className:f,role:"radiogroup",children:[s&&e.jsx("legend",{className:"text-foreground mb-2 block",style:{fontFamily:"var(--font-label)",fontSize:"var(--text-label)",fontWeight:"var(--weight-button)"},children:s}),e.jsx("div",{className:`flex ${i==="vertical"?"flex-col gap-3":"flex-wrap gap-4"}`,children:d}),h&&e.jsx("span",{className:"text-destructive block mt-1.5",style:{fontFamily:"var(--font-button)",fontSize:"var(--text-button)",fontWeight:"var(--weight-label)"},children:h})]})})}const ao=["Su","Mo","Tu","We","Th","Fr","Sa"],Be=["January","February","March","April","May","June","July","August","September","October","November","December"];function me(t,r){return t.getFullYear()===r.getFullYear()&&t.getMonth()===r.getMonth()&&t.getDate()===r.getDate()}function St(t,r,a){if(!r||!a)return!1;const o=t.getTime();return o>r.getTime()&&o<a.getTime()}function kt(t,r,a,o){return!!(r&&t<new Date(r.getFullYear(),r.getMonth(),r.getDate())||a&&t>new Date(a.getFullYear(),a.getMonth(),a.getDate())||o!=null&&o.some(s=>me(s,t)))}function so(t,r){return new Date(t,r+1,0).getDate()}function zt(t,r){const a=new Date(t,r,1).getDay(),o=so(t,r),s=[];for(let l=0;l<a;l++)s.push(null);for(let l=1;l<=o;l++)s.push(new Date(t,r,l));return s}function ze(t,r){if(!t)return"";const a=String(t.getDate()).padStart(2,"0"),o=String(t.getMonth()+1).padStart(2,"0"),s=t.getFullYear();let l=`${a}/${o}/${s}`;if(r){const n=String(t.getHours()).padStart(2,"0"),i=String(t.getMinutes()).padStart(2,"0");l+=` ${n}:${i}`}return l}const no={sm:{trigger:"h-8 px-2.5",text:{fontFamily:"var(--font-label)",fontSize:"var(--text-label)",fontWeight:"var(--weight-label)"},icon:14,cell:"w-7 h-7"},md:{trigger:"h-10 px-3",text:{fontFamily:"var(--font-label)",fontSize:"var(--text-label)",fontWeight:"var(--weight-label)"},icon:16,cell:"w-9 h-9"},lg:{trigger:"h-12 px-4",text:{fontFamily:"var(--font-caption)",fontSize:"var(--text-caption)",fontWeight:"var(--weight-caption)"},icon:18,cell:"w-10 h-10"}},lo={default:"bg-input-background border border-border",outlined:"bg-transparent border-2 border-border",filled:"bg-muted/30 border border-transparent",ghost:"bg-transparent border border-transparent"},io={default:"focus-within:ring-2 focus-within:ring-ring/30 focus-within:border-primary",error:"ring-2 ring-destructive/30 border-destructive",success:"ring-2 ring-chart-2/30 border-chart-2"};function co({value:t=null,rangeValue:r,onChange:a,onRangeChange:o,mode:s="single",label:l,placeholder:n,helperText:i,errorMessage:d,successMessage:h,size:f="md",variant:p="default",state:v="default",disabled:u=!1,required:y=!1,clearable:S=!1,showTime:b=!1,minDate:N,maxDate:j,disabledDates:M,showToday:w=!0,footer:L,fullWidth:T=!1}){const[I,k]=c.useState(!1),[$,_]=c.useState(()=>t??new Date),[B,G]=c.useState("days"),[m,A]=c.useState(null),[X,O]=c.useState(()=>t?t.getHours():0),[P,U]=c.useState(()=>t?t.getMinutes():0),Q=c.useRef(null),q=no[f];c.useEffect(()=>{function W(E){Q.current&&!Q.current.contains(E.target)&&(k(!1),G("days"))}return I&&document.addEventListener("mousedown",W),()=>document.removeEventListener("mousedown",W)},[I]),c.useMemo(()=>zt($.getFullYear(),$.getMonth()),[$]);const re=c.useMemo(()=>new Date,[]),oe=()=>_(new Date($.getFullYear(),$.getMonth()-1,1)),ae=()=>_(new Date($.getFullYear(),$.getMonth()+1,1)),he=()=>_(new Date($.getFullYear()-1,$.getMonth(),1)),ie=()=>_(new Date($.getFullYear()+1,$.getMonth(),1)),D=c.useCallback(W=>{if(!kt(W,N,j,M))if(s==="single"){let E=new Date(W);b&&E.setHours(X,P),a==null||a(E),b||(k(!1),G("days"))}else{const E=r==null?void 0:r.start,V=r==null?void 0:r.end;!E||E&&V?o==null||o({start:W,end:null}):(W<E?o==null||o({start:W,end:E}):o==null||o({start:E,end:W}),k(!1),G("days"))}},[s,a,o,r,N,j,M,b,X,P]),se=W=>{W.stopPropagation(),s==="single"?a==null||a(null):o==null||o({start:null,end:null})},xe=()=>{const W=new Date;if(_(W),s==="single"){const E=new Date(W);b&&E.setHours(X,P),a==null||a(E),b||(k(!1),G("days"))}},Me=()=>{if(t){const W=new Date(t);W.setHours(X,P),a==null||a(W)}k(!1),G("days")},de=c.useMemo(()=>s==="single"?ze(t,b):r!=null&&r.start&&(r!=null&&r.end)?`${ze(r.start)} – ${ze(r.end)}`:r!=null&&r.start?`${ze(r.start)} – ...`:"",[s,t,r,b]),ce=s==="single"?!!t:!!(r!=null&&r.start||r!=null&&r.end),Xe=v==="error"?e.jsx($e,{size:q.icon,className:"text-destructive flex-shrink-0"}):v==="success"?e.jsx(te,{size:q.icon,className:"text-chart-2 flex-shrink-0"}):null,H=v==="error"?d:v==="success"?h:i,Ne=v==="error"?"text-destructive":v==="success"?"text-chart-2":"text-muted-foreground",Ze={fontFamily:"var(--font-label)",fontSize:"var(--text-label)",fontWeight:"var(--weight-label)"},R={fontFamily:"var(--font-button)",fontSize:"var(--text-button)",fontWeight:"var(--weight-button)"},Z={fontFamily:"var(--font-button)",fontSize:"var(--text-button)",fontWeight:"var(--weight-button)"},ue=Math.floor($.getFullYear()/12)*12;return e.jsxs("div",{className:`relative ${T?"w-full":""}`,ref:Q,children:[l&&e.jsxs("label",{className:"block text-foreground mb-1.5",style:Ze,children:[l,y&&e.jsx("span",{className:"text-destructive ml-0.5",children:"*"})]}),e.jsxs("button",{type:"button",onClick:()=>!u&&k(!I),disabled:u,className:`
289
+ focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 outline-none`,children:i&&e.jsx("span",{className:`${u.inner} rounded-full bg-primary transition-transform scale-100`})}),(r||a)&&e.jsxs("div",{className:"min-w-0",children:[r&&e.jsx("span",{className:`text-foreground block cursor-pointer ${d?"!cursor-not-allowed":""}`,style:u.labelStyle,onClick:p,children:r}),a&&e.jsx("span",{className:"text-muted-foreground block",style:u.descStyle,children:a})]})]})}function oo({name:t,value:r,defaultValue:a="",onChange:o,label:s,size:l="md",disabled:n=!1,direction:i="vertical",children:d,error:h,className:u=""}){const[p,v]=f.useState(a),c=r??p,S=w=>{r===void 0&&v(w),o==null||o(w)};return e.jsx(St.Provider,{value:{value:c,onChange:S,size:l,disabled:n,name:t},children:e.jsxs("fieldset",{className:u,role:"radiogroup",children:[s&&e.jsx("legend",{className:"text-foreground mb-2 block",style:{fontFamily:"var(--font-label)",fontSize:"var(--text-label)",fontWeight:"var(--weight-button)"},children:s}),e.jsx("div",{className:`flex ${i==="vertical"?"flex-col gap-3":"flex-wrap gap-4"}`,children:d}),h&&e.jsx("span",{className:"text-destructive block mt-1.5",style:{fontFamily:"var(--font-button)",fontSize:"var(--text-button)",fontWeight:"var(--weight-label)"},children:h})]})})}const ao=["Su","Mo","Tu","We","Th","Fr","Sa"],He=["January","February","March","April","May","June","July","August","September","October","November","December"];function me(t,r){return t.getFullYear()===r.getFullYear()&&t.getMonth()===r.getMonth()&&t.getDate()===r.getDate()}function $t(t,r,a){if(!r||!a)return!1;const o=t.getTime();return o>r.getTime()&&o<a.getTime()}function kt(t,r,a,o){return!!(r&&t<new Date(r.getFullYear(),r.getMonth(),r.getDate())||a&&t>new Date(a.getFullYear(),a.getMonth(),a.getDate())||o!=null&&o.some(s=>me(s,t)))}function so(t,r){return new Date(t,r+1,0).getDate()}function zt(t,r){const a=new Date(t,r,1).getDay(),o=so(t,r),s=[];for(let l=0;l<a;l++)s.push(null);for(let l=1;l<=o;l++)s.push(new Date(t,r,l));return s}function ze(t,r){if(!t)return"";const a=String(t.getDate()).padStart(2,"0"),o=String(t.getMonth()+1).padStart(2,"0"),s=t.getFullYear();let l=`${a}/${o}/${s}`;if(r){const n=String(t.getHours()).padStart(2,"0"),i=String(t.getMinutes()).padStart(2,"0");l+=` ${n}:${i}`}return l}const no={sm:{trigger:"h-8 px-2.5",text:{fontFamily:"var(--font-label)",fontSize:"var(--text-label)",fontWeight:"var(--weight-label)"},icon:14,cell:"w-7 h-7"},md:{trigger:"h-10 px-3",text:{fontFamily:"var(--font-label)",fontSize:"var(--text-label)",fontWeight:"var(--weight-label)"},icon:16,cell:"w-9 h-9"},lg:{trigger:"h-12 px-4",text:{fontFamily:"var(--font-caption)",fontSize:"var(--text-caption)",fontWeight:"var(--weight-caption)"},icon:18,cell:"w-10 h-10"}},lo={default:"bg-input-background border border-border",outlined:"bg-transparent border-2 border-border",filled:"bg-muted/30 border border-transparent",ghost:"bg-transparent border border-transparent"},io={default:"focus-within:ring-2 focus-within:ring-ring/30 focus-within:border-primary",error:"ring-2 ring-destructive/30 border-destructive",success:"ring-2 ring-chart-2/30 border-chart-2"};function co({value:t=null,rangeValue:r,onChange:a,onRangeChange:o,mode:s="single",label:l,placeholder:n,helperText:i,errorMessage:d,successMessage:h,size:u="md",variant:p="default",state:v="default",disabled:c=!1,required:S=!1,clearable:w=!1,showTime:b=!1,minDate:m,maxDate:A,disabledDates:N,showToday:$=!0,footer:C,fullWidth:L=!1}){const[D,B]=f.useState(!1),[z,F]=f.useState(()=>t??new Date),[H,k]=f.useState("days"),[y,T]=f.useState(null),[O,G]=f.useState(()=>t?t.getHours():0),[P,K]=f.useState(()=>t?t.getMinutes():0),Q=f.useRef(null),U=no[u];f.useEffect(()=>{function M(E){Q.current&&!Q.current.contains(E.target)&&(B(!1),k("days"))}return D&&document.addEventListener("mousedown",M),()=>document.removeEventListener("mousedown",M)},[D]),f.useMemo(()=>zt(z.getFullYear(),z.getMonth()),[z]);const re=f.useMemo(()=>new Date,[]),oe=()=>F(new Date(z.getFullYear(),z.getMonth()-1,1)),ae=()=>F(new Date(z.getFullYear(),z.getMonth()+1,1)),he=()=>F(new Date(z.getFullYear()-1,z.getMonth(),1)),ie=()=>F(new Date(z.getFullYear()+1,z.getMonth(),1)),I=f.useCallback(M=>{if(!kt(M,m,A,N))if(s==="single"){let E=new Date(M);b&&E.setHours(O,P),a==null||a(E),b||(B(!1),k("days"))}else{const E=r==null?void 0:r.start,V=r==null?void 0:r.end;!E||E&&V?o==null||o({start:M,end:null}):(M<E?o==null||o({start:M,end:E}):o==null||o({start:E,end:M}),B(!1),k("days"))}},[s,a,o,r,m,A,N,b,O,P]),se=M=>{M.stopPropagation(),s==="single"?a==null||a(null):o==null||o({start:null,end:null})},xe=()=>{const M=new Date;if(F(M),s==="single"){const E=new Date(M);b&&E.setHours(O,P),a==null||a(E),b||(B(!1),k("days"))}},Me=()=>{if(t){const M=new Date(t);M.setHours(O,P),a==null||a(M)}B(!1),k("days")},de=f.useMemo(()=>s==="single"?ze(t,b):r!=null&&r.start&&(r!=null&&r.end)?`${ze(r.start)} – ${ze(r.end)}`:r!=null&&r.start?`${ze(r.start)} – ...`:"",[s,t,r,b]),ce=s==="single"?!!t:!!(r!=null&&r.start||r!=null&&r.end),Xe=v==="error"?e.jsx(Se,{size:U.icon,className:"text-destructive flex-shrink-0"}):v==="success"?e.jsx(te,{size:U.icon,className:"text-chart-2 flex-shrink-0"}):null,Y=v==="error"?d:v==="success"?h:i,Ne=v==="error"?"text-destructive":v==="success"?"text-chart-2":"text-muted-foreground",Ze={fontFamily:"var(--font-label)",fontSize:"var(--text-label)",fontWeight:"var(--weight-label)"},R={fontFamily:"var(--font-button)",fontSize:"var(--text-button)",fontWeight:"var(--weight-button)"},Z={fontFamily:"var(--font-button)",fontSize:"var(--text-button)",fontWeight:"var(--weight-button)"},ue=Math.floor(z.getFullYear()/12)*12;return e.jsxs("div",{className:`relative ${L?"w-full":""}`,ref:Q,children:[l&&e.jsxs("label",{className:"block text-foreground mb-1.5",style:Ze,children:[l,S&&e.jsx("span",{className:"text-destructive ml-0.5",children:"*"})]}),e.jsxs("button",{type:"button",onClick:()=>!c&&B(!D),disabled:c,className:`
290
290
  w-full flex items-center gap-2 rounded-[var(--radius-md)] transition-all cursor-pointer
291
- ${q.trigger}
291
+ ${U.trigger}
292
292
  ${lo[p]}
293
293
  ${io[v]}
294
- ${u?"opacity-50 cursor-not-allowed":"hover:border-primary/50"}
295
- `,style:q.text,children:[e.jsx(xr,{size:q.icon,className:"text-muted-foreground flex-shrink-0"}),e.jsx("span",{className:`flex-1 text-left truncate ${ce?"text-foreground":"text-muted-foreground"}`,children:ce?de:n||(s==="range"?"Select date range…":"Select date…")}),Xe,S&&ce&&!u&&e.jsx("span",{onClick:se,className:"text-muted-foreground hover:text-foreground cursor-pointer",children:e.jsx(J,{size:q.icon-2})})]}),H&&e.jsx("p",{className:`mt-1.5 ${Ne}`,style:{fontFamily:"var(--font-button)",fontSize:"var(--text-button)",fontWeight:"var(--weight-label)"},children:H}),I&&e.jsxs("div",{className:"absolute z-50 mt-1.5 bg-popover border border-border rounded-[var(--radius-lg)] shadow-elevation-sm overflow-hidden",style:{minWidth:s==="range"?"560px":"300px"},children:[e.jsxs("div",{className:"flex items-center justify-between px-4 py-3 border-b border-border bg-card",children:[e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx("button",{onClick:he,className:"p-1 rounded-[var(--radius-sm)] hover:bg-muted text-muted-foreground hover:text-foreground transition-colors cursor-pointer",title:"Previous year",children:e.jsx(De,{size:16})}),e.jsx("button",{onClick:oe,className:"p-1 rounded-[var(--radius-sm)] hover:bg-muted text-muted-foreground hover:text-foreground transition-colors cursor-pointer",title:"Previous month",children:e.jsx(pe,{size:16})})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("button",{onClick:()=>G(B==="months"?"days":"months"),className:"px-2 py-1 rounded-[var(--radius-sm)] hover:bg-muted text-foreground transition-colors cursor-pointer",style:Z,children:Be[$.getMonth()]}),e.jsx("button",{onClick:()=>G(B==="years"?"days":"years"),className:"px-2 py-1 rounded-[var(--radius-sm)] hover:bg-muted text-foreground transition-colors cursor-pointer",style:Z,children:$.getFullYear()})]}),e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx("button",{onClick:ae,className:"p-1 rounded-[var(--radius-sm)] hover:bg-muted text-muted-foreground hover:text-foreground transition-colors cursor-pointer",title:"Next month",children:e.jsx(ee,{size:16})}),e.jsx("button",{onClick:ie,className:"p-1 rounded-[var(--radius-sm)] hover:bg-muted text-muted-foreground hover:text-foreground transition-colors cursor-pointer",title:"Next year",children:e.jsx(Te,{size:16})})]})]}),B==="days"&&e.jsx("div",{className:`p-3 ${s==="range"?"flex gap-3":""}`,children:(s==="range"?[0,1]:[0]).map(W=>{const E=new Date($.getFullYear(),$.getMonth()+W,1),V=zt(E.getFullYear(),E.getMonth());return e.jsxs("div",{className:"flex-1",children:[W>0&&e.jsxs("div",{className:"text-center mb-2 text-foreground",style:Z,children:[Be[E.getMonth()]," ",E.getFullYear()]}),e.jsx("div",{className:"grid grid-cols-7 mb-1",children:ao.map(Y=>e.jsx("div",{className:"text-center text-muted-foreground py-1",style:R,children:Y},`${W}-${Y}`))}),e.jsx("div",{className:"grid grid-cols-7",children:V.map((Y,We)=>{if(!Y)return e.jsx("div",{},`empty-${W}-${We}`);const Ce=kt(Y,N,j,M),Je=me(Y,re),be=s==="single"?t&&me(Y,t):(r==null?void 0:r.start)&&me(Y,r.start)||(r==null?void 0:r.end)&&me(Y,r.end),Pe=s==="range"&&(St(Y,(r==null?void 0:r.start)??null,(r==null?void 0:r.end)??null)||(r==null?void 0:r.start)&&!(r!=null&&r.end)&&m&&St(Y,r.start,m>r.start?m:null));return e.jsx("button",{onClick:()=>D(Y),onMouseEnter:()=>s==="range"&&A(Y),disabled:Ce,className:`
296
- ${q.cell} flex items-center justify-center rounded-[var(--radius-sm)] transition-all cursor-pointer
297
- ${Ce?"opacity-30 cursor-not-allowed":"hover:bg-muted"}
294
+ ${c?"opacity-50 cursor-not-allowed":"hover:border-primary/50"}
295
+ `,style:U.text,children:[e.jsx(xr,{size:U.icon,className:"text-muted-foreground flex-shrink-0"}),e.jsx("span",{className:`flex-1 text-left truncate ${ce?"text-foreground":"text-muted-foreground"}`,children:ce?de:n||(s==="range"?"Select date range…":"Select date…")}),Xe,w&&ce&&!c&&e.jsx("span",{onClick:se,className:"text-muted-foreground hover:text-foreground cursor-pointer",children:e.jsx(J,{size:U.icon-2})})]}),Y&&e.jsx("p",{className:`mt-1.5 ${Ne}`,style:{fontFamily:"var(--font-button)",fontSize:"var(--text-button)",fontWeight:"var(--weight-label)"},children:Y}),D&&e.jsxs("div",{className:"absolute z-50 mt-1.5 bg-popover border border-border rounded-[var(--radius-lg)] shadow-elevation-sm overflow-hidden",style:{minWidth:s==="range"?"560px":"300px"},children:[e.jsxs("div",{className:"flex items-center justify-between px-4 py-3 border-b border-border bg-card",children:[e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx("button",{onClick:he,className:"p-1 rounded-[var(--radius-sm)] hover:bg-muted text-muted-foreground hover:text-foreground transition-colors cursor-pointer",title:"Previous year",children:e.jsx(Te,{size:16})}),e.jsx("button",{onClick:oe,className:"p-1 rounded-[var(--radius-sm)] hover:bg-muted text-muted-foreground hover:text-foreground transition-colors cursor-pointer",title:"Previous month",children:e.jsx(pe,{size:16})})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("button",{onClick:()=>k(H==="months"?"days":"months"),className:"px-2 py-1 rounded-[var(--radius-sm)] hover:bg-muted text-foreground transition-colors cursor-pointer",style:Z,children:He[z.getMonth()]}),e.jsx("button",{onClick:()=>k(H==="years"?"days":"years"),className:"px-2 py-1 rounded-[var(--radius-sm)] hover:bg-muted text-foreground transition-colors cursor-pointer",style:Z,children:z.getFullYear()})]}),e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx("button",{onClick:ae,className:"p-1 rounded-[var(--radius-sm)] hover:bg-muted text-muted-foreground hover:text-foreground transition-colors cursor-pointer",title:"Next month",children:e.jsx(ee,{size:16})}),e.jsx("button",{onClick:ie,className:"p-1 rounded-[var(--radius-sm)] hover:bg-muted text-muted-foreground hover:text-foreground transition-colors cursor-pointer",title:"Next year",children:e.jsx(Ie,{size:16})})]})]}),H==="days"&&e.jsx("div",{className:`p-3 ${s==="range"?"flex gap-3":""}`,children:(s==="range"?[0,1]:[0]).map(M=>{const E=new Date(z.getFullYear(),z.getMonth()+M,1),V=zt(E.getFullYear(),E.getMonth());return e.jsxs("div",{className:"flex-1",children:[M>0&&e.jsxs("div",{className:"text-center mb-2 text-foreground",style:Z,children:[He[E.getMonth()]," ",E.getFullYear()]}),e.jsx("div",{className:"grid grid-cols-7 mb-1",children:ao.map(q=>e.jsx("div",{className:"text-center text-muted-foreground py-1",style:R,children:q},`${M}-${q}`))}),e.jsx("div",{className:"grid grid-cols-7",children:V.map((q,Ce)=>{if(!q)return e.jsx("div",{},`empty-${M}-${Ce}`);const Le=kt(q,m,A,N),Je=me(q,re),be=s==="single"?t&&me(q,t):(r==null?void 0:r.start)&&me(q,r.start)||(r==null?void 0:r.end)&&me(q,r.end),Pe=s==="range"&&($t(q,(r==null?void 0:r.start)??null,(r==null?void 0:r.end)??null)||(r==null?void 0:r.start)&&!(r!=null&&r.end)&&y&&$t(q,r.start,y>r.start?y:null));return e.jsx("button",{onClick:()=>I(q),onMouseEnter:()=>s==="range"&&T(q),disabled:Le,className:`
296
+ ${U.cell} flex items-center justify-center rounded-[var(--radius-sm)] transition-all cursor-pointer
297
+ ${Le?"opacity-30 cursor-not-allowed":"hover:bg-muted"}
298
298
  ${be?"bg-primary text-primary-foreground hover:bg-primary/90":""}
299
299
  ${Pe&&!be?"bg-accent text-accent-foreground":""}
300
300
  ${Je&&!be?"border border-primary text-primary":""}
301
- `,style:Z,children:Y.getDate()},`${W}-${Y.getTime()}`)})})]},W)})}),B==="months"&&e.jsx("div",{className:"p-3 grid grid-cols-3 gap-2",children:Be.map((W,E)=>e.jsx("button",{onClick:()=>{_(new Date($.getFullYear(),E,1)),G("days")},className:`
301
+ `,style:Z,children:q.getDate()},`${M}-${q.getTime()}`)})})]},M)})}),H==="months"&&e.jsx("div",{className:"p-3 grid grid-cols-3 gap-2",children:He.map((M,E)=>e.jsx("button",{onClick:()=>{F(new Date(z.getFullYear(),E,1)),k("days")},className:`
302
302
  py-2.5 rounded-[var(--radius-md)] transition-all cursor-pointer
303
- ${$.getMonth()===E?"bg-primary text-primary-foreground":"text-foreground hover:bg-muted"}
304
- `,style:Z,children:W.substring(0,3)},W))}),B==="years"&&e.jsxs("div",{className:"p-3",children:[e.jsxs("div",{className:"flex items-center justify-between mb-3",children:[e.jsx("button",{onClick:()=>_(new Date($.getFullYear()-12,$.getMonth(),1)),className:"p-1 rounded-[var(--radius-sm)] hover:bg-muted text-muted-foreground hover:text-foreground cursor-pointer",children:e.jsx(pe,{size:16})}),e.jsxs("span",{className:"text-foreground",style:Z,children:[ue," – ",ue+11]}),e.jsx("button",{onClick:()=>_(new Date($.getFullYear()+12,$.getMonth(),1)),className:"p-1 rounded-[var(--radius-sm)] hover:bg-muted text-muted-foreground hover:text-foreground cursor-pointer",children:e.jsx(ee,{size:16})})]}),e.jsx("div",{className:"grid grid-cols-4 gap-2",children:Array.from({length:12},(W,E)=>ue+E).map(W=>e.jsx("button",{onClick:()=>{_(new Date(W,$.getMonth(),1)),G("months")},className:`
303
+ ${z.getMonth()===E?"bg-primary text-primary-foreground":"text-foreground hover:bg-muted"}
304
+ `,style:Z,children:M.substring(0,3)},M))}),H==="years"&&e.jsxs("div",{className:"p-3",children:[e.jsxs("div",{className:"flex items-center justify-between mb-3",children:[e.jsx("button",{onClick:()=>F(new Date(z.getFullYear()-12,z.getMonth(),1)),className:"p-1 rounded-[var(--radius-sm)] hover:bg-muted text-muted-foreground hover:text-foreground cursor-pointer",children:e.jsx(pe,{size:16})}),e.jsxs("span",{className:"text-foreground",style:Z,children:[ue," – ",ue+11]}),e.jsx("button",{onClick:()=>F(new Date(z.getFullYear()+12,z.getMonth(),1)),className:"p-1 rounded-[var(--radius-sm)] hover:bg-muted text-muted-foreground hover:text-foreground cursor-pointer",children:e.jsx(ee,{size:16})})]}),e.jsx("div",{className:"grid grid-cols-4 gap-2",children:Array.from({length:12},(M,E)=>ue+E).map(M=>e.jsx("button",{onClick:()=>{F(new Date(M,z.getMonth(),1)),k("months")},className:`
305
305
  py-2.5 rounded-[var(--radius-md)] transition-all cursor-pointer
306
- ${$.getFullYear()===W?"bg-primary text-primary-foreground":"text-foreground hover:bg-muted"}
307
- ${W===re.getFullYear()&&$.getFullYear()!==W?"border border-primary text-primary":""}
308
- `,style:Z,children:W},W))})]}),b&&s==="single"&&B==="days"&&e.jsxs("div",{className:"px-4 py-3 border-t border-border flex items-center gap-3",children:[e.jsx($r,{size:14,className:"text-muted-foreground"}),e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx("input",{type:"number",min:0,max:23,value:String(X).padStart(2,"0"),onChange:W=>O(Math.max(0,Math.min(23,Number(W.target.value)))),className:"w-10 text-center bg-input-background border border-border rounded-[var(--radius-sm)] py-1 text-foreground focus:outline-none focus:ring-1 focus:ring-ring/30",style:Z}),e.jsx("span",{className:"text-muted-foreground",style:Z,children:":"}),e.jsx("input",{type:"number",min:0,max:59,value:String(P).padStart(2,"0"),onChange:W=>U(Math.max(0,Math.min(59,Number(W.target.value)))),className:"w-10 text-center bg-input-background border border-border rounded-[var(--radius-sm)] py-1 text-foreground focus:outline-none focus:ring-1 focus:ring-ring/30",style:Z})]}),e.jsx("button",{onClick:Me,className:"ml-auto px-3 py-1 rounded-[var(--radius-md)] bg-primary text-primary-foreground hover:bg-primary/90 transition-colors cursor-pointer",style:Z,children:"Apply"})]}),e.jsxs("div",{className:"px-4 py-2.5 border-t border-border bg-card flex items-center justify-between",children:[w?e.jsx("button",{onClick:xe,className:"text-primary hover:underline cursor-pointer",style:Z,children:"Today"}):e.jsx("span",{}),L??e.jsx("button",{onClick:()=>{k(!1),G("days")},className:"text-muted-foreground hover:text-foreground cursor-pointer",style:Z,children:"Close"})]})]})]})}const fo={sm:"max-w-sm",md:"max-w-lg",lg:"max-w-2xl",xl:"max-w-4xl",full:"max-w-[calc(100vw-2rem)] max-h-[calc(100vh-2rem)]"};function _t({open:t,onClose:r,title:a,description:o,size:s="md",children:l,footer:n,closeOnOverlay:i=!0,showCloseButton:d=!0,className:h=""}){const f=c.useRef(null);return c.useEffect(()=>{if(!t)return;const p=v=>{v.key==="Escape"&&r()};return document.addEventListener("keydown",p),document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",p),document.body.style.overflow=""}},[t,r]),c.useEffect(()=>{t&&f.current&&f.current.focus()},[t]),t?e.jsxs("div",{className:"fixed inset-0 z-[100] flex items-center justify-center p-4",children:[e.jsx("div",{className:"absolute inset-0 bg-foreground/40 backdrop-blur-sm animate-in fade-in duration-200",onClick:i?r:void 0}),e.jsxs("div",{ref:f,tabIndex:-1,role:"dialog","aria-modal":"true","aria-labelledby":a?"modal-title":void 0,className:`relative w-full ${fo[s]} bg-card rounded-[var(--radius-lg)] shadow-lg border border-border animate-in zoom-in-95 fade-in duration-200 flex flex-col ${s==="full"?"h-full":"max-h-[85vh]"} ${h}`,children:[(a||d)&&e.jsxs("div",{className:"flex items-start justify-between gap-4 px-6 pt-6 pb-2 flex-shrink-0",children:[e.jsxs("div",{className:"min-w-0 flex-1",children:[a&&e.jsx("h4",{id:"modal-title",className:"text-foreground",children:a}),o&&e.jsx("span",{className:"text-muted-foreground block mt-0.5",style:{fontFamily:"var(--font-label)",fontSize:"var(--text-label)",fontWeight:"var(--weight-label)"},children:o})]}),d&&e.jsx("button",{onClick:r,className:"flex-shrink-0 w-8 h-8 rounded-[var(--radius-sm)] flex items-center justify-center text-muted-foreground hover:text-foreground hover:bg-muted transition-colors cursor-pointer","aria-label":"Close",children:e.jsx(J,{size:16})})]}),e.jsx("div",{className:"flex-1 overflow-y-auto px-6 py-4",style:{fontFamily:"var(--font-label)",fontSize:"var(--text-label)",fontWeight:"var(--weight-label)"},children:l}),n&&e.jsx("div",{className:"flex items-center justify-end gap-2 px-6 py-4 border-t border-border flex-shrink-0",children:n})]})]}):null}function ho({open:t,onClose:r,onConfirm:a,title:o="Are you sure?",description:s="This action cannot be undone.",confirmLabel:l="Confirm",cancelLabel:n="Cancel",variant:i="default"}){const d={fontFamily:"var(--font-button)",fontSize:"var(--text-button)",fontWeight:"var(--weight-button)"};return e.jsx(_t,{open:t,onClose:r,title:o,description:s,size:"sm",children:e.jsxs("div",{className:"flex items-center justify-end gap-2 pt-4",children:[e.jsx("button",{onClick:r,className:"px-4 py-2 rounded-[var(--radius-md)] border border-border text-foreground hover:bg-muted transition-colors cursor-pointer",style:d,children:n}),e.jsx("button",{onClick:()=>{a(),r()},className:`px-4 py-2 rounded-[var(--radius-md)] text-primary-foreground transition-colors cursor-pointer ${i==="destructive"?"bg-destructive hover:bg-destructive/90":"bg-primary hover:bg-primary/90"}`,style:d,children:l})]})})}const uo={sm:{btn:"min-w-[28px] h-7 px-1.5",icon:14,text:{fontFamily:"var(--font-button)",fontSize:"var(--text-button)",fontWeight:"var(--weight-button)"},gap:"gap-1"},md:{btn:"min-w-[34px] h-9 px-2",icon:16,text:{fontFamily:"var(--font-button)",fontSize:"var(--text-button)",fontWeight:"var(--weight-button)"},gap:"gap-1.5"},lg:{btn:"min-w-[42px] h-11 px-3",icon:18,text:{fontFamily:"var(--font-button)",fontSize:"var(--text-label)",fontWeight:"var(--weight-button)"},gap:"gap-2"}},bo={default:{base:"bg-transparent text-foreground border border-transparent",active:"bg-primary text-primary-foreground border-primary shadow-elevation-sm",hover:"hover:bg-muted"},outlined:{base:"bg-transparent text-foreground border border-border",active:"bg-primary text-primary-foreground border-primary shadow-elevation-sm",hover:"hover:bg-muted hover:border-muted"},filled:{base:"bg-muted/50 text-foreground border border-transparent",active:"bg-primary text-primary-foreground border-primary shadow-elevation-sm",hover:"hover:bg-muted"},minimal:{base:"bg-transparent text-foreground border border-transparent",active:"bg-accent text-accent-foreground border-accent",hover:"hover:text-primary"}};function go(t,r,a){return c.useMemo(()=>{if(a*2+5>=r)return Array.from({length:r},(h,f)=>f+1);const s=Math.max(t-a,1),l=Math.min(t+a,r),n=s>2,i=l<r-1;if(!n&&i){const h=3+2*a;return[...Array.from({length:h},(p,v)=>v+1),"dots-right",r]}if(n&&!i){const h=3+2*a;return[1,"dots-left",...Array.from({length:h},(p,v)=>r-h+v+1)]}return[1,"dots-left",...Array.from({length:l-s+1},(h,f)=>s+f),"dots-right",r]},[t,r,a])}function po({currentPage:t,totalPages:r,onPageChange:a,siblingCount:o=1,showFirstLast:s=!1,showPrevNext:l=!0,showPageSize:n=!1,pageSizeOptions:i=[10,20,50,100],pageSize:d=10,onPageSizeChange:h,totalItems:f,size:p="md",variant:v="default",disabled:u=!1,showPageInfo:y=!1,showItemsInfo:S=!1,prevLabel:b,nextLabel:N}){const j=go(t,r,o),M=uo[p],w=bo[v],L=c.useCallback(_=>{!u&&_>=1&&_<=r&&a(_)},[u,r,a]),T=(_,B)=>`inline-flex items-center justify-center rounded-[var(--radius-md)] transition-all cursor-pointer select-none
309
- ${M.btn}
310
- ${B?"opacity-40 pointer-events-none cursor-default":""}
311
- ${_?w.active:`${w.base} ${B?"":w.hover}`}`,I=f?(t-1)*d+1:0,k=f?Math.min(t*d,f):0,$={fontFamily:"var(--font-label)",fontSize:"var(--text-label)",fontWeight:"var(--weight-label)"};return e.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-4",children:[e.jsxs("div",{className:"flex items-center gap-4",children:[S&&f!==void 0&&e.jsxs("span",{className:"text-muted-foreground",style:$,children:[I,"–",k," of ",f]}),n&&e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"text-muted-foreground",style:$,children:"Rows per page:"}),e.jsx("select",{value:d,onChange:_=>h==null?void 0:h(Number(_.target.value)),disabled:u,className:"bg-input-background text-foreground border border-border rounded-[var(--radius-md)] px-2 py-1 cursor-pointer focus:outline-none focus:ring-2 focus:ring-ring/30",style:{fontFamily:"var(--font-button)",fontSize:"var(--text-button)",fontWeight:"var(--weight-button)"},children:i.map(_=>e.jsx("option",{value:_,children:_},_))})]})]}),e.jsxs("nav",{className:`flex items-center ${M.gap}`,"aria-label":"Pagination",role:"navigation",children:[s&&e.jsx("button",{onClick:()=>L(1),disabled:u||t<=1,className:T(!1,u||t<=1),style:M.text,"aria-label":"First page",title:"First page",children:e.jsx(De,{size:M.icon})}),l&&e.jsx("button",{onClick:()=>L(t-1),disabled:u||t<=1,className:T(!1,u||t<=1),style:M.text,"aria-label":"Previous page",children:b??e.jsx(pe,{size:M.icon})}),j.map((_,B)=>_==="dots-left"||_==="dots-right"?e.jsx("span",{className:`inline-flex items-center justify-center text-muted-foreground ${M.btn}`,style:M.text,children:e.jsx(lt,{size:M.icon})},_):e.jsx("button",{onClick:()=>L(_),disabled:u,className:T(_===t,u),style:M.text,"aria-label":`Page ${_}`,"aria-current":_===t?"page":void 0,children:_},_)),l&&e.jsx("button",{onClick:()=>L(t+1),disabled:u||t>=r,className:T(!1,u||t>=r),style:M.text,"aria-label":"Next page",children:N??e.jsx(ee,{size:M.icon})}),s&&e.jsx("button",{onClick:()=>L(r),disabled:u||t>=r,className:T(!1,u||t>=r),style:M.text,"aria-label":"Last page",title:"Last page",children:e.jsx(Te,{size:M.icon})})]}),y&&e.jsxs("span",{className:"text-muted-foreground",style:$,children:["Page ",t," of ",r]})]})}const vo={sm:{input:"h-8 px-8",icon:14,style:{fontFamily:"var(--font-label)",fontSize:"var(--text-label)",fontWeight:"var(--weight-label)"}},md:{input:"h-10 px-9",icon:16,style:{fontFamily:"var(--font-label)",fontSize:"var(--text-label)",fontWeight:"var(--weight-label)"}},lg:{input:"h-12 px-10",icon:18,style:{fontFamily:"var(--font-caption)",fontSize:"var(--text-caption)",fontWeight:"var(--weight-caption)"}}},yo={default:"bg-card border border-border focus-within:border-ring focus-within:ring-2 focus-within:ring-ring/20",outlined:"bg-transparent border-2 border-border focus-within:border-primary",filled:"bg-muted/50 border border-transparent focus-within:border-ring focus-within:bg-card"};function mo({value:t,onChange:r,onSearch:a,placeholder:o="Search...",size:s="md",variant:l="default",loading:n=!1,suggestions:i=[],onSuggestionSelect:d,clearable:h=!0,disabled:f=!1,autoFocus:p=!1,debounce:v=0,className:u=""}){const[y,S]=c.useState(""),[b,N]=c.useState(!1),[j,M]=c.useState(-1),w=t??y,L=c.useRef(null),T=c.useRef(null),I=c.useRef(void 0),k=vo[s],$=c.useCallback(m=>{t===void 0&&S(m),r==null||r(m),v>0&&(clearTimeout(I.current),I.current=setTimeout(()=>a==null?void 0:a(m),v))},[t,r,a,v]),_=m=>{m.key==="Enter"?j>=0&&i[j]?(d==null||d(i[j]),N(!1)):a==null||a(w):m.key==="ArrowDown"?(m.preventDefault(),M(A=>Math.min(A+1,i.length-1))):m.key==="ArrowUp"?(m.preventDefault(),M(A=>Math.max(A-1,-1))):m.key==="Escape"&&N(!1)};c.useEffect(()=>{const m=A=>{T.current&&!T.current.contains(A.target)&&N(!1)};return document.addEventListener("mousedown",m),()=>document.removeEventListener("mousedown",m)},[]),c.useEffect(()=>{N(i.length>0&&w.length>0),M(-1)},[i,w]);const B={fontFamily:"var(--font-label)",fontSize:"var(--text-label)",fontWeight:"var(--weight-label)"},G={fontFamily:"var(--font-button)",fontSize:"var(--text-button)",fontWeight:"var(--weight-label)"};return e.jsxs("div",{ref:T,className:`relative ${u}`,children:[e.jsxs("div",{className:`relative rounded-[var(--radius-md)] transition-all ${yo[l]} ${f?"opacity-50 pointer-events-none":""}`,children:[e.jsx("span",{className:"absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground pointer-events-none",children:e.jsx(Se,{size:k.icon})}),e.jsx("input",{ref:L,type:"text",value:w,onChange:m=>$(m.target.value),onKeyDown:_,onFocus:()=>i.length>0&&w.length>0&&N(!0),placeholder:o,disabled:f,autoFocus:p,className:`w-full ${k.input} rounded-[var(--radius-md)] bg-transparent outline-none text-foreground placeholder:text-muted-foreground`,style:k.style}),e.jsxs("span",{className:"absolute right-3 top-1/2 -translate-y-1/2 flex items-center gap-1",children:[n&&e.jsx(ve,{size:k.icon,className:"animate-spin text-muted-foreground"}),h&&w&&!n&&e.jsx("button",{onClick:()=>{var m;$(""),(m=L.current)==null||m.focus()},className:"text-muted-foreground hover:text-foreground transition-colors cursor-pointer",children:e.jsx(J,{size:k.icon})})]})]}),b&&i.length>0&&e.jsx("div",{className:"absolute top-full left-0 right-0 mt-1 bg-popover border border-border rounded-[var(--radius-md)] shadow-lg z-50 overflow-hidden max-h-64 overflow-y-auto",style:{padding:"var(--Spacing--Spacing-sm)"},children:i.map((m,A)=>e.jsxs("button",{onClick:()=>{d==null||d(m),N(!1)},className:`w-full text-left flex items-center rounded-[var(--radius-sm)] transition-colors cursor-pointer ${A===j?"bg-[var(--Colors--Background--bg-brand-secondary)]":"hover:bg-[var(--Colors--Background--bg-primary_hover)]"}`,style:{padding:"var(--Spacing--Spacing-md) var(--Spacing--Spacing-2xl)",gap:"var(--Spacing--Spacing-lg)"},children:[m.icon&&e.jsx("span",{className:"text-muted-foreground flex-shrink-0",children:m.icon}),e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsx("span",{className:"text-foreground block truncate",style:B,children:m.label}),m.description&&e.jsx("span",{className:"text-muted-foreground block truncate",style:{marginTop:"var(--Spacing--Spacing-xxs)",...G},children:m.description})]})]},m.id))})]})}const fe={sm:"px-3 py-2",md:"px-4 py-3",lg:"px-5 py-4"};function xo({columns:t,data:r,size:a="md",striped:o=!1,hoverable:s=!0,bordered:l=!1,selectable:n=!1,selectedRows:i,onSelectionChange:d,loading:h=!1,emptyMessage:f="No data available",stickyHeader:p=!1,className:v=""}){const[u,y]=c.useState(null),[S,b]=c.useState("asc"),[N,j]=c.useState(new Set),M=i??N,w=m=>{i||j(m),d==null||d(m)},L=c.useMemo(()=>u?[...r].sort((m,A)=>{const X=m[u],O=A[u];if(X==null)return 1;if(O==null)return-1;const P=typeof X=="string"?X.localeCompare(O):X-O;return S==="asc"?P:-P}):r,[r,u,S]),T=m=>{u===m?b(A=>A==="asc"?"desc":"asc"):(y(m),b("asc"))},I=r.length>0&&M.size===r.length,k=M.size>0&&!I,$=()=>{w(I?new Set:new Set(r.map((m,A)=>A)))},_=m=>{const A=new Set(M);A.has(m)?A.delete(m):A.add(m),w(A)},B={fontFamily:"var(--font-label)",fontSize:"var(--text-label)",fontWeight:"var(--weight-label)"},G={fontFamily:"var(--font-button)",fontSize:"var(--text-button)",fontWeight:"var(--weight-button)"};return e.jsx("div",{className:`rounded-[var(--radius-lg)] border border-border overflow-hidden ${v}`,children:e.jsx("div",{className:"overflow-x-auto",children:e.jsxs("table",{className:"w-full border-collapse",children:[e.jsx("thead",{className:p?"sticky top-0 z-10":"",children:e.jsxs("tr",{className:"bg-muted/50 border-b border-border",children:[n&&e.jsx("th",{className:`${fe[a]} w-12`,children:e.jsx("input",{type:"checkbox",checked:I,ref:m=>{m&&(m.indeterminate=k)},onChange:$,className:"w-4 h-4 rounded-[var(--radius-sm)] border-border accent-primary cursor-pointer"})}),t.map(m=>e.jsx("th",{className:`${fe[a]} text-${m.align??"left"} text-muted-foreground ${m.sortable?"cursor-pointer select-none hover:text-foreground transition-colors":""} ${l?"border-x border-border first:border-l-0 last:border-r-0":""}`,style:{...G,width:m.width},onClick:()=>m.sortable&&T(m.key),children:e.jsxs("span",{className:"inline-flex items-center gap-1",children:[m.header,m.sortable&&e.jsx("span",{className:"text-muted-foreground/60",children:u===m.key?S==="asc"?e.jsx(Nr,{size:14}):e.jsx(we,{size:14}):e.jsx(wr,{size:12})})]})},m.key))]})}),e.jsx("tbody",{children:h?e.jsx("tr",{children:e.jsx("td",{colSpan:t.length+(n?1:0),className:`${fe[a]} text-center text-muted-foreground`,children:e.jsxs("div",{className:"flex items-center justify-center gap-2 py-8",children:[e.jsx("div",{className:"w-5 h-5 border-2 border-primary border-t-transparent rounded-full animate-spin"}),e.jsx("span",{style:B,children:"Loading..."})]})})}):L.length===0?e.jsx("tr",{children:e.jsx("td",{colSpan:t.length+(n?1:0),className:`${fe[a]} text-center text-muted-foreground py-12`,children:e.jsx("span",{style:B,children:f})})}):L.map((m,A)=>{const X=M.has(A);return e.jsxs("tr",{className:`border-b border-border last:border-b-0 transition-colors ${X?"bg-primary/5":o&&A%2===1?"bg-muted/20":"bg-card"} ${s?"hover:bg-[var(--Colors--Background--bg-primary_hover)]":""}`,children:[n&&e.jsx("td",{className:`${fe[a]} w-12`,children:e.jsx("input",{type:"checkbox",checked:X,onChange:()=>_(A),className:"w-4 h-4 rounded-[var(--radius-sm)] border-border accent-primary cursor-pointer"})}),t.map(O=>e.jsx("td",{className:`${fe[a]} text-${O.align??"left"} text-foreground ${l?"border-x border-border first:border-l-0 last:border-r-0":""}`,style:B,children:O.render?O.render(m[O.key],m,A):m[O.key]},O.key))]},A)})})]})})})}const No={sm:{fontFamily:"var(--font-button)",fontSize:"var(--text-button)",fontWeight:"var(--weight-button)",padding:"6px 12px"},md:{fontFamily:"var(--font-button)",fontSize:"var(--text-button)",fontWeight:"var(--weight-button)",padding:"8px 16px"},lg:{fontFamily:"var(--font-button)",fontSize:"var(--text-label)",fontWeight:"var(--weight-button)",padding:"10px 20px"}};function wo({tabs:t,variant:r="default",size:a="md",defaultTab:o,activeTab:s,onChange:l,fullWidth:n=!1,className:i=""}){var j,M;const[d,h]=c.useState(o??((j=t[0])==null?void 0:j.id)??""),f=s??d,p=c.useRef(null),[v,u]=c.useState({left:0,width:0}),y=w=>{s||h(w),l==null||l(w)};c.useEffect(()=>{if(r!=="underline"&&r!=="default")return;const w=p.current;if(!w)return;const L=w.querySelector(`[data-tab-id="${f}"]`);L&&u({left:L.offsetLeft,width:L.offsetWidth})},[f,r]);const S=(M=t.find(w=>w.id===f))==null?void 0:M.content,b=(()=>{switch(r){case"bordered":return"border border-border rounded-[var(--radius)] bg-muted/30 p-1 gap-1";case"pills":return"gap-1.5";case"underline":return"border-b border-border relative";default:return"border-b border-border relative"}})(),N=(w,L)=>{const T="relative flex items-center gap-1.5 transition-all cursor-pointer outline-none focus-visible:ring-2 focus-visible:ring-ring whitespace-nowrap";if(L)return`${T} opacity-40 !cursor-not-allowed`;switch(r){case"bordered":return`${T} rounded-[var(--radius-sm)] ${w?"bg-card text-foreground shadow-elevation-sm":"text-muted-foreground hover:text-foreground hover:bg-card/50"}`;case"pills":return`${T} rounded-[var(--radius)] ${w?"bg-primary text-primary-foreground":"text-muted-foreground hover:text-foreground hover:bg-muted"}`;case"underline":return`${T} ${w?"text-primary":"text-muted-foreground hover:text-foreground"}`;default:return`${T} ${w?"text-primary":"text-muted-foreground hover:text-foreground"}`}};return e.jsxs("div",{className:i,children:[e.jsxs("div",{ref:p,className:`flex ${n?"":"inline-flex"} ${b}`,role:"tablist",children:[(r==="default"||r==="underline")&&e.jsx("div",{className:"absolute bottom-0 h-0.5 bg-primary transition-all duration-200 rounded-full",style:{left:v.left,width:v.width}}),t.map(w=>{const L=f===w.id;return e.jsxs("button",{"data-tab-id":w.id,role:"tab","aria-selected":L,disabled:w.disabled,onClick:()=>!w.disabled&&y(w.id),className:`${N(L,!!w.disabled)} ${n?"flex-1 justify-center":""}`,style:No[a],children:[w.icon&&e.jsx("span",{className:"flex-shrink-0",children:w.icon}),e.jsx("span",{children:w.label}),w.badge!==void 0&&e.jsx("span",{className:`ml-1 px-1.5 py-0.5 rounded-full min-w-[18px] text-center ${L&&r==="pills"?"bg-primary-foreground/20 text-primary-foreground":"bg-muted text-muted-foreground"}`,style:{fontFamily:"var(--font-button)",fontSize:"var(--text-button)",fontWeight:"var(--weight-button)",lineHeight:"1"},children:w.badge})]},w.id)})]}),S&&e.jsx("div",{className:"pt-4",role:"tabpanel",children:S})]})}const $o={fontFamily:"var(--font-label)",fontSize:"var(--text-label)",fontWeight:"var(--weight-button)"},So={fontFamily:"var(--font-label)",fontSize:"var(--text-label)",fontWeight:"var(--weight-label)"};function He({title:t,children:r,open:a,onToggle:o,icon:s}){return e.jsxs("div",{className:"border-b border-border last:border-b-0",children:[e.jsxs("button",{onClick:o,className:"w-full flex items-center gap-3 px-4 py-3 text-left hover:bg-muted/20 transition-colors cursor-pointer",children:[s&&e.jsx("span",{className:"text-primary flex-shrink-0",children:s}),e.jsx("span",{className:"flex-1 text-foreground",style:$o,children:t}),e.jsx(we,{size:16,className:`text-muted-foreground transition-transform ${a?"rotate-180":""}`})]}),e.jsx("div",{className:`overflow-hidden transition-all ${a?"max-h-96 opacity-100":"max-h-0 opacity-0"}`,children:e.jsx("div",{className:"px-4 pb-4 text-muted-foreground",style:So,children:r})})]})}function Ft({type:t="single",items:r,defaultOpen:a,value:o,onChange:s,className:l=""}){const[n,i]=c.useState(typeof a=="string"?a:null),[d,h]=c.useState(Array.isArray(a)?new Set(a):new Set),f=o!==void 0,p=u=>f?t==="single"?o===u:Array.isArray(o)&&o.includes(u):t==="single"?n===u:d.has(u),v=u=>{if(t==="single"){const y=(f?o===u:n===u)?null:u;f||i(y),s==null||s(y)}else if(f){const y=Array.isArray(o)?o:[],S=y.includes(u)?y.filter(b=>b!==u):[...y,u];s==null||s(S)}else h(y=>{const S=new Set(y);return S.has(u)?S.delete(u):S.add(u),S})};return e.jsx("div",{className:`rounded-[var(--radius)] border border-border overflow-hidden ${l}`,children:r.map(u=>e.jsx(He,{title:u.title,open:p(u.id),onToggle:()=>v(u.id),icon:u.icon,children:u.content},u.id))})}Ft.displayName="Accordion",He.displayName="AccordionItem";const Mt=["bg-primary","bg-chart-2","bg-chart-5","bg-destructive","bg-secondary"],ko={xs:{box:"w-6 h-6",font:{fontFamily:"var(--font-button)",fontSize:"var(--text-button)",fontWeight:"var(--weight-button)"}},sm:{box:"w-8 h-8",font:{fontFamily:"var(--font-button)",fontSize:"var(--text-button)",fontWeight:"var(--weight-button)"}},md:{box:"w-10 h-10",font:{fontFamily:"var(--font-button)",fontSize:"var(--text-button)",fontWeight:"var(--weight-button)"}},lg:{box:"w-14 h-14",font:{fontFamily:"var(--font-button)",fontSize:"var(--text-button)",fontWeight:"var(--weight-button)"}},xl:{box:"w-20 h-20",font:{fontFamily:"var(--font-label)",fontSize:"var(--text-label)",fontWeight:"var(--weight-button)"}}},zo={xs:"w-2 h-2",sm:"w-2.5 h-2.5",md:"w-3 h-3",lg:"w-3.5 h-3.5",xl:"w-4 h-4"},_o={online:"bg-chart-2",offline:"bg-secondary",busy:"bg-destructive",away:"bg-chart-5"},Fo={fontFamily:"var(--font-button)",fontSize:"var(--text-button)",fontWeight:"var(--weight-button)"};function Wt({src:t,name:r,size:a="md",status:o,className:s=""}){const l=ko[a],n=r?r.split(" ").map(d=>d[0]).join("").slice(0,2).toUpperCase():"?",i=r?Mt[r.length%Mt.length]:"bg-muted";return e.jsxs("div",{className:`relative inline-flex ${s}`,children:[t?e.jsx("img",{src:t,alt:r||"avatar",className:`${l.box} rounded-full object-cover border-2 border-card`}):e.jsx("div",{className:`${l.box} rounded-full ${i} text-white flex items-center justify-center border-2 border-card`,style:l.font,children:n}),o&&e.jsx("span",{className:`absolute bottom-0 right-0 ${zo[a]} ${_o[o]} rounded-full border-2 border-card`})]})}function Ct({children:t,max:r,className:a=""}){const o=c.Children.toArray(t),s=r?o.slice(0,r):o,l=r&&o.length>r?o.length-r:0;return e.jsxs("div",{className:`flex -space-x-2 ${a}`,children:[s.map((n,i)=>e.jsx("div",{className:"relative",style:{zIndex:s.length-i},children:n},i)),l>0&&e.jsxs("div",{className:"relative w-10 h-10 rounded-full bg-muted text-foreground flex items-center justify-center border-2 border-card",style:{...Fo,zIndex:0},children:["+",l]})]})}Wt.displayName="Avatar",Ct.displayName="AvatarGroup";const Mo={sm:{fontFamily:"var(--font-button)",fontSize:"var(--text-button)",fontWeight:"var(--weight-label)"},md:{fontFamily:"var(--font-label)",fontSize:"var(--text-label)",fontWeight:"var(--weight-label)"},lg:{fontFamily:"var(--font-label)",fontSize:"var(--text-label)",fontWeight:"var(--weight-label)"}};function Wo({items:t,separator:r="chevron",size:a="md",maxItems:o}){const s=r==="slash"?e.jsx(Ir,{size:12,className:"text-muted-foreground"}):r==="dot"?e.jsx(Sr,{size:16,className:"text-muted-foreground"}):e.jsx(ee,{size:12,className:"text-muted-foreground"}),l=a==="sm"?"gap-1":a==="lg"?"gap-2.5":"gap-1.5",n=Mo[a];let i=t;if(o&&t.length>o){const d=t.slice(0,1),h=t.slice(-(o-1));i=[...d,{label:"…"},...h]}return e.jsx("nav",{"aria-label":"Breadcrumb",children:e.jsx("ol",{className:`flex items-center flex-wrap ${l}`,children:i.map((d,h)=>e.jsxs("li",{className:"flex items-center gap-1.5",children:[h>0&&e.jsx("span",{className:"mx-0.5",children:s}),d.label==="…"?e.jsx("span",{className:"w-6 h-6 flex items-center justify-center rounded-[var(--radius-sm)] text-muted-foreground hover:bg-accent cursor-pointer",children:e.jsx(lt,{size:14})}):h===i.length-1?e.jsxs("span",{className:"inline-flex items-center gap-1.5 text-foreground",style:{...n,fontWeight:"var(--weight-button)"},children:[d.icon,d.label]}):e.jsxs("a",{href:d.href||"#",onClick:f=>f.preventDefault(),className:"inline-flex items-center gap-1.5 text-muted-foreground hover:text-foreground transition-colors",style:n,children:[d.icon,d.label]})]},h))})})}const Co={none:"",sm:"shadow-sm",md:"shadow-md",lg:"shadow-lg"};function Lt({children:t,className:r,hover:a,elevation:o="none"}){return e.jsx("div",{className:`rounded-[var(--radius-lg)] border border-border bg-card overflow-hidden ${Co[o]??""} ${a?"hover:border-primary/40 hover:shadow-md transition-all cursor-pointer":""} ${r??""}`,children:t})}Lt.displayName="Card";function jt({children:t,action:r}){return e.jsxs("div",{className:"px-5 py-4 border-b border-border flex items-center justify-between",children:[e.jsx("div",{children:t}),r]})}jt.displayName="CardHeader";function At({children:t}){return e.jsx("div",{className:"px-5 py-4",children:t})}At.displayName="CardBody";function Dt({children:t}){return e.jsx("div",{className:"px-5 py-3 border-t border-border bg-muted/10 flex items-center gap-2",children:t})}Dt.displayName="CardFooter";const Lo=["#ef4444","#f97316","#eab308","#22c55e","#06b6d4","#3b82f6","#8b5cf6","#ec4899","#991b1b","#9a3412","#854d0e","#166534","#155e75","#1e40af","#5b21b6","#9d174d","#fca5a5","#fdba74","#fde047","#86efac","#67e8f9","#93c5fd","#c4b5fd","#f9a8d4"];function jo(t){const r=parseInt(t.slice(1,3),16),a=parseInt(t.slice(3,5),16),o=parseInt(t.slice(5,7),16);return`rgb(${r}, ${a}, ${o})`}function Ao(t){const r=parseInt(t.slice(1,3),16)/255,a=parseInt(t.slice(3,5),16)/255,o=parseInt(t.slice(5,7),16)/255,s=Math.max(r,a,o),l=Math.min(r,a,o),n=(s+l)/2;if(s===l)return`hsl(0, 0%, ${Math.round(n*100)}%)`;const i=s-l,d=n>.5?i/(2-s-l):i/(s+l);let h=0;return s===r?h=((a-o)/i+(a<o?6:0))/6:s===a?h=((o-r)/i+2)/6:h=((r-a)/i+4)/6,`hsl(${Math.round(h*360)}, ${Math.round(d*100)}%, ${Math.round(n*100)}%)`}const Do={fontFamily:"var(--font-label)",fontSize:"var(--text-label)",fontWeight:"var(--weight-button)"},To={fontFamily:"var(--font-button)",fontSize:"var(--text-button)",fontWeight:"var(--weight-label)"},Tt={fontFamily:"var(--font-button)",fontSize:"var(--text-button)",fontWeight:"var(--weight-label)"};function Eo({value:t,onChange:r,label:a,presets:o,showInput:s=!0,showFormats:l,size:n="md"}){const[i,d]=c.useState(!1),h=c.useRef(null),f=n==="sm"?"w-5 h-5":n==="lg"?"w-8 h-8":"w-6 h-6",p=o||Lo,v=u=>{navigator.clipboard.writeText(u).then(()=>{d(!0),setTimeout(()=>d(!1),1500)})};return e.jsxs("div",{className:"space-y-3",children:[a&&e.jsx("label",{className:"block text-foreground",style:Do,children:a}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsxs("div",{className:"relative",children:[e.jsx("div",{className:"w-10 h-10 rounded-[var(--radius-md)] border border-border cursor-pointer overflow-hidden",style:{backgroundColor:t},onClick:()=>{var u;return(u=h.current)==null?void 0:u.click()}}),e.jsx("input",{ref:h,type:"color",value:t,onChange:u=>r(u.target.value),className:"absolute inset-0 opacity-0 cursor-pointer w-full h-full"})]}),s&&e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsx("input",{value:t,onChange:u=>{(/^#[0-9a-fA-F]{0,6}$/.test(u.target.value)||u.target.value==="#")&&r(u.target.value)},className:"w-24 px-2.5 py-1.5 rounded-[var(--radius-md)] border border-border bg-background text-foreground outline-none focus:border-primary",style:Tt,maxLength:7}),e.jsx("button",{onClick:()=>v(t),className:"w-8 h-8 flex items-center justify-center rounded-[var(--radius-md)] text-muted-foreground hover:text-foreground hover:bg-accent transition-colors cursor-pointer",children:i?e.jsx(ne,{size:14,className:"text-chart-2"}):e.jsx(nt,{size:14})})]})]}),p.length>0&&e.jsx("div",{className:"flex flex-wrap gap-1.5",children:p.map(u=>e.jsx("button",{onClick:()=>r(u),className:`${f} rounded-[var(--radius-sm)] border-2 transition-transform hover:scale-110 cursor-pointer
312
- ${t===u?"border-foreground ring-1 ring-foreground/20":"border-transparent"}`,style:{backgroundColor:u},title:u},u))}),l&&e.jsx("div",{className:"space-y-1",children:[{label:"HEX",val:t.toUpperCase()},{label:"RGB",val:jo(t)},{label:"HSL",val:Ao(t)}].map(u=>e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"w-8 text-muted-foreground",style:To,children:u.label}),e.jsx("code",{className:"text-foreground",style:Tt,children:u.val}),e.jsx("button",{onClick:()=>v(u.val),className:"text-muted-foreground hover:text-foreground cursor-pointer",children:e.jsx(nt,{size:12})})]},u.label))})]})}const Io={fontFamily:"var(--font-button)",fontSize:"var(--text-button)",fontWeight:"var(--weight-label)"};function Et({label:t,orientation:r="horizontal",dashed:a,spacing:o="md",className:s=""}){const l={sm:"my-2",md:"my-4",lg:"my-8"},n=a?"border-dashed":"border-solid";return r==="vertical"?e.jsx("div",{className:`inline-block h-full min-h-[24px] border-l border-border ${n} mx-3 ${s}`}):t?e.jsxs("div",{className:`flex items-center gap-3 ${l[o]} ${s}`,children:[e.jsx("div",{className:`flex-1 border-t border-border ${n}`}),e.jsx("span",{className:"text-muted-foreground flex-shrink-0",style:Io,children:t}),e.jsx("div",{className:`flex-1 border-t border-border ${n}`})]}):e.jsx("hr",{className:`border-t border-border ${n} ${l[o]} ${s}`})}Et.displayName="Divider";const Bo={fontFamily:"var(--font-label)",fontSize:"var(--text-label)",fontWeight:"var(--weight-button)"};function It({open:t,onClose:r,title:a,children:o,side:s="right",size:l="md",footer:n,className:i=""}){if(!t)return null;const d={sm:"w-72",md:"w-96",lg:"w-[480px]"},h={sm:"h-48",md:"h-72",lg:"h-96"},f={right:`top-0 right-0 h-full ${d[l]} animate-[slideRight_0.2s_ease]`,left:`top-0 left-0 h-full ${d[l]} animate-[slideLeft_0.2s_ease]`,top:`top-0 left-0 w-full ${h[l]} animate-[slideTop_0.2s_ease]`,bottom:`bottom-0 left-0 w-full ${h[l]} animate-[slideBottom_0.2s_ease]`};return e.jsxs("div",{className:"fixed inset-0 z-50",children:[e.jsx("div",{className:"absolute inset-0 bg-foreground/20",onClick:r}),e.jsxs("div",{className:`absolute bg-card border border-border shadow-lg flex flex-col ${f[s]} ${i}`,children:[a&&e.jsxs("div",{className:"px-5 py-4 border-b border-border flex items-center justify-between flex-shrink-0",children:[e.jsx("span",{className:"text-foreground",style:Bo,children:a}),e.jsx("button",{onClick:r,className:"text-muted-foreground hover:text-foreground cursor-pointer",children:e.jsx(J,{size:18})})]}),e.jsx("div",{className:"flex-1 overflow-y-auto p-5",children:o}),n&&e.jsx("div",{className:"px-5 py-3 border-t border-border flex items-center gap-2 flex-shrink-0",children:n})]}),e.jsx("style",{children:`
306
+ ${z.getFullYear()===M?"bg-primary text-primary-foreground":"text-foreground hover:bg-muted"}
307
+ ${M===re.getFullYear()&&z.getFullYear()!==M?"border border-primary text-primary":""}
308
+ `,style:Z,children:M},M))})]}),b&&s==="single"&&H==="days"&&e.jsxs("div",{className:"px-4 py-3 border-t border-border flex items-center gap-3",children:[e.jsx(Sr,{size:14,className:"text-muted-foreground"}),e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx("input",{type:"number",min:0,max:23,value:String(O).padStart(2,"0"),onChange:M=>G(Math.max(0,Math.min(23,Number(M.target.value)))),className:"w-10 text-center bg-input-background border border-border rounded-[var(--radius-sm)] py-1 text-foreground focus:outline-none focus:ring-1 focus:ring-ring/30",style:Z}),e.jsx("span",{className:"text-muted-foreground",style:Z,children:":"}),e.jsx("input",{type:"number",min:0,max:59,value:String(P).padStart(2,"0"),onChange:M=>K(Math.max(0,Math.min(59,Number(M.target.value)))),className:"w-10 text-center bg-input-background border border-border rounded-[var(--radius-sm)] py-1 text-foreground focus:outline-none focus:ring-1 focus:ring-ring/30",style:Z})]}),e.jsx("button",{onClick:Me,className:"ml-auto px-3 py-1 rounded-[var(--radius-md)] bg-primary text-primary-foreground hover:bg-primary/90 transition-colors cursor-pointer",style:Z,children:"Apply"})]}),e.jsxs("div",{className:"px-4 py-2.5 border-t border-border bg-card flex items-center justify-between",children:[$?e.jsx("button",{onClick:xe,className:"text-primary hover:underline cursor-pointer",style:Z,children:"Today"}):e.jsx("span",{}),C??e.jsx("button",{onClick:()=>{B(!1),k("days")},className:"text-muted-foreground hover:text-foreground cursor-pointer",style:Z,children:"Close"})]})]})]})}const fo={sm:"max-w-sm",md:"max-w-lg",lg:"max-w-2xl",xl:"max-w-4xl",full:"max-w-[calc(100vw-2rem)] max-h-[calc(100vh-2rem)]"};function _t({open:t,onClose:r,title:a,description:o,size:s="md",children:l,footer:n,closeOnOverlay:i=!0,showCloseButton:d=!0,className:h=""}){const u=f.useRef(null);return f.useEffect(()=>{if(!t)return;const p=v=>{v.key==="Escape"&&r()};return document.addEventListener("keydown",p),document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",p),document.body.style.overflow=""}},[t,r]),f.useEffect(()=>{t&&u.current&&u.current.focus()},[t]),t?e.jsxs("div",{className:"fixed inset-0 z-[100] flex items-center justify-center p-4",children:[e.jsx("div",{className:"absolute inset-0 bg-foreground/40 backdrop-blur-sm animate-in fade-in duration-200",onClick:i?r:void 0}),e.jsxs("div",{ref:u,tabIndex:-1,role:"dialog","aria-modal":"true","aria-labelledby":a?"modal-title":void 0,className:`relative w-full ${fo[s]} bg-card rounded-[var(--radius-lg)] shadow-lg border border-border animate-in zoom-in-95 fade-in duration-200 flex flex-col ${s==="full"?"h-full":"max-h-[85vh]"} ${h}`,children:[(a||d)&&e.jsxs("div",{className:"flex items-start justify-between gap-4 px-6 pt-6 pb-2 flex-shrink-0",children:[e.jsxs("div",{className:"min-w-0 flex-1",children:[a&&e.jsx("h4",{id:"modal-title",className:"text-foreground",children:a}),o&&e.jsx("span",{className:"text-muted-foreground block mt-0.5",style:{fontFamily:"var(--font-label)",fontSize:"var(--text-label)",fontWeight:"var(--weight-label)"},children:o})]}),d&&e.jsx("button",{onClick:r,className:"flex-shrink-0 w-8 h-8 rounded-[var(--radius-sm)] flex items-center justify-center text-muted-foreground hover:text-foreground hover:bg-muted transition-colors cursor-pointer","aria-label":"Close",children:e.jsx(J,{size:16})})]}),e.jsx("div",{className:"flex-1 overflow-y-auto px-6 py-4",style:{fontFamily:"var(--font-label)",fontSize:"var(--text-label)",fontWeight:"var(--weight-label)"},children:l}),n&&e.jsx("div",{className:"flex items-center justify-end gap-2 px-6 py-4 border-t border-border flex-shrink-0",children:n})]})]}):null}function ho({open:t,onClose:r,onConfirm:a,title:o="Are you sure?",description:s="This action cannot be undone.",confirmLabel:l="Confirm",cancelLabel:n="Cancel",variant:i="default"}){const d={fontFamily:"var(--font-button)",fontSize:"var(--text-button)",fontWeight:"var(--weight-button)"};return e.jsx(_t,{open:t,onClose:r,title:o,description:s,size:"sm",children:e.jsxs("div",{className:"flex items-center justify-end gap-2 pt-4",children:[e.jsx("button",{onClick:r,className:"px-4 py-2 rounded-[var(--radius-md)] border border-border text-foreground hover:bg-muted transition-colors cursor-pointer",style:d,children:n}),e.jsx("button",{onClick:()=>{a(),r()},className:`px-4 py-2 rounded-[var(--radius-md)] text-primary-foreground transition-colors cursor-pointer ${i==="destructive"?"bg-destructive hover:bg-destructive/90":"bg-primary hover:bg-primary/90"}`,style:d,children:l})]})})}const uo={sm:{btn:"min-w-[28px] h-7 px-1.5",icon:14,text:{fontFamily:"var(--font-button)",fontSize:"var(--text-button)",fontWeight:"var(--weight-button)"},gap:"gap-1"},md:{btn:"min-w-[34px] h-9 px-2",icon:16,text:{fontFamily:"var(--font-button)",fontSize:"var(--text-button)",fontWeight:"var(--weight-button)"},gap:"gap-1.5"},lg:{btn:"min-w-[42px] h-11 px-3",icon:18,text:{fontFamily:"var(--font-button)",fontSize:"var(--text-label)",fontWeight:"var(--weight-button)"},gap:"gap-2"}},bo={default:{base:"bg-transparent text-foreground border border-transparent",active:"bg-primary text-primary-foreground border-primary shadow-elevation-sm",hover:"hover:bg-muted"},outlined:{base:"bg-transparent text-foreground border border-border",active:"bg-primary text-primary-foreground border-primary shadow-elevation-sm",hover:"hover:bg-muted hover:border-muted"},filled:{base:"bg-muted/50 text-foreground border border-transparent",active:"bg-primary text-primary-foreground border-primary shadow-elevation-sm",hover:"hover:bg-muted"},minimal:{base:"bg-transparent text-foreground border border-transparent",active:"bg-accent text-accent-foreground border-accent",hover:"hover:text-primary"}};function go(t,r,a){return f.useMemo(()=>{if(a*2+5>=r)return Array.from({length:r},(h,u)=>u+1);const s=Math.max(t-a,1),l=Math.min(t+a,r),n=s>2,i=l<r-1;if(!n&&i){const h=3+2*a;return[...Array.from({length:h},(p,v)=>v+1),"dots-right",r]}if(n&&!i){const h=3+2*a;return[1,"dots-left",...Array.from({length:h},(p,v)=>r-h+v+1)]}return[1,"dots-left",...Array.from({length:l-s+1},(h,u)=>s+u),"dots-right",r]},[t,r,a])}function po({currentPage:t,totalPages:r,onPageChange:a,siblingCount:o=1,showFirstLast:s=!1,showPrevNext:l=!0,showPageSize:n=!1,pageSizeOptions:i=[10,20,50,100],pageSize:d=10,onPageSizeChange:h,totalItems:u,size:p="md",variant:v="default",disabled:c=!1,showPageInfo:S=!1,showItemsInfo:w=!1,prevLabel:b,nextLabel:m}){const A=go(t,r,o),N=uo[p],$=bo[v],C=f.useCallback(F=>{!c&&F>=1&&F<=r&&a(F)},[c,r,a]),L=(F,H)=>`inline-flex items-center justify-center rounded-[var(--radius-md)] transition-all cursor-pointer select-none
309
+ ${N.btn}
310
+ ${H?"opacity-40 pointer-events-none cursor-default":""}
311
+ ${F?$.active:`${$.base} ${H?"":$.hover}`}`,D=u?(t-1)*d+1:0,B=u?Math.min(t*d,u):0,z={fontFamily:"var(--font-label)",fontSize:"var(--text-label)",fontWeight:"var(--weight-label)"};return e.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-4",children:[e.jsxs("div",{className:"flex items-center gap-4",children:[w&&u!==void 0&&e.jsxs("span",{className:"text-muted-foreground",style:z,children:[D,"–",B," of ",u]}),n&&e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"text-muted-foreground",style:z,children:"Rows per page:"}),e.jsx("select",{value:d,onChange:F=>h==null?void 0:h(Number(F.target.value)),disabled:c,className:"bg-input-background text-foreground border border-border rounded-[var(--radius-md)] px-2 py-1 cursor-pointer focus:outline-none focus:ring-2 focus:ring-ring/30",style:{fontFamily:"var(--font-button)",fontSize:"var(--text-button)",fontWeight:"var(--weight-button)"},children:i.map(F=>e.jsx("option",{value:F,children:F},F))})]})]}),e.jsxs("nav",{className:`flex items-center ${N.gap}`,"aria-label":"Pagination",role:"navigation",children:[s&&e.jsx("button",{onClick:()=>C(1),disabled:c||t<=1,className:L(!1,c||t<=1),style:N.text,"aria-label":"First page",title:"First page",children:e.jsx(Te,{size:N.icon})}),l&&e.jsx("button",{onClick:()=>C(t-1),disabled:c||t<=1,className:L(!1,c||t<=1),style:N.text,"aria-label":"Previous page",children:b??e.jsx(pe,{size:N.icon})}),A.map((F,H)=>F==="dots-left"||F==="dots-right"?e.jsx("span",{className:`inline-flex items-center justify-center text-muted-foreground ${N.btn}`,style:N.text,children:e.jsx(lt,{size:N.icon})},F):e.jsx("button",{onClick:()=>C(F),disabled:c,className:L(F===t,c),style:N.text,"aria-label":`Page ${F}`,"aria-current":F===t?"page":void 0,children:F},F)),l&&e.jsx("button",{onClick:()=>C(t+1),disabled:c||t>=r,className:L(!1,c||t>=r),style:N.text,"aria-label":"Next page",children:m??e.jsx(ee,{size:N.icon})}),s&&e.jsx("button",{onClick:()=>C(r),disabled:c||t>=r,className:L(!1,c||t>=r),style:N.text,"aria-label":"Last page",title:"Last page",children:e.jsx(Ie,{size:N.icon})})]}),S&&e.jsxs("span",{className:"text-muted-foreground",style:z,children:["Page ",t," of ",r]})]})}const vo={sm:{input:"h-8 px-8",icon:14,style:{fontFamily:"var(--font-label)",fontSize:"var(--text-label)",fontWeight:"var(--weight-label)"}},md:{input:"h-10 px-9",icon:16,style:{fontFamily:"var(--font-label)",fontSize:"var(--text-label)",fontWeight:"var(--weight-label)"}},lg:{input:"h-12 px-10",icon:18,style:{fontFamily:"var(--font-caption)",fontSize:"var(--text-caption)",fontWeight:"var(--weight-caption)"}}},yo={default:"bg-card border border-border focus-within:border-ring focus-within:ring-2 focus-within:ring-ring/20",outlined:"bg-transparent border-2 border-border focus-within:border-primary",filled:"bg-muted/50 border border-transparent focus-within:border-ring focus-within:bg-card"};function mo({value:t,onChange:r,onSearch:a,placeholder:o="Search...",size:s="md",variant:l="default",loading:n=!1,suggestions:i=[],onSuggestionSelect:d,clearable:h=!0,disabled:u=!1,autoFocus:p=!1,debounce:v=0,className:c=""}){const[S,w]=f.useState(""),[b,m]=f.useState(!1),[A,N]=f.useState(-1),$=t??S,C=f.useRef(null),L=f.useRef(null),D=f.useRef(void 0),B=vo[s],z=f.useCallback(y=>{t===void 0&&w(y),r==null||r(y),v>0&&(clearTimeout(D.current),D.current=setTimeout(()=>a==null?void 0:a(y),v))},[t,r,a,v]),F=y=>{y.key==="Enter"?A>=0&&i[A]?(d==null||d(i[A]),m(!1)):a==null||a($):y.key==="ArrowDown"?(y.preventDefault(),N(T=>Math.min(T+1,i.length-1))):y.key==="ArrowUp"?(y.preventDefault(),N(T=>Math.max(T-1,-1))):y.key==="Escape"&&m(!1)};f.useEffect(()=>{const y=T=>{L.current&&!L.current.contains(T.target)&&m(!1)};return document.addEventListener("mousedown",y),()=>document.removeEventListener("mousedown",y)},[]),f.useEffect(()=>{m(i.length>0&&$.length>0),N(-1)},[i,$]);const H={fontFamily:"var(--font-label)",fontSize:"var(--text-label)",fontWeight:"var(--weight-label)"},k={fontFamily:"var(--font-button)",fontSize:"var(--text-button)",fontWeight:"var(--weight-label)"};return e.jsxs("div",{ref:L,className:`relative ${c}`,children:[e.jsxs("div",{className:`relative rounded-[var(--radius-md)] transition-all ${yo[l]} ${u?"opacity-50 pointer-events-none":""}`,children:[e.jsx("span",{className:"absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground pointer-events-none",children:e.jsx($e,{size:B.icon})}),e.jsx("input",{ref:C,type:"text",value:$,onChange:y=>z(y.target.value),onKeyDown:F,onFocus:()=>i.length>0&&$.length>0&&m(!0),placeholder:o,disabled:u,autoFocus:p,className:`w-full ${B.input} rounded-[var(--radius-md)] bg-transparent outline-none text-foreground placeholder:text-muted-foreground`,style:B.style}),e.jsxs("span",{className:"absolute right-3 top-1/2 -translate-y-1/2 flex items-center gap-1",children:[n&&e.jsx(ve,{size:B.icon,className:"animate-spin text-muted-foreground"}),h&&$&&!n&&e.jsx("button",{onClick:()=>{var y;z(""),(y=C.current)==null||y.focus()},className:"text-muted-foreground hover:text-foreground transition-colors cursor-pointer",children:e.jsx(J,{size:B.icon})})]})]}),b&&i.length>0&&e.jsx("div",{className:"absolute top-full left-0 right-0 mt-1 bg-popover border border-border rounded-[var(--radius-md)] shadow-lg z-50 overflow-hidden max-h-64 overflow-y-auto",style:{padding:"var(--Spacing--Spacing-sm)"},children:i.map((y,T)=>e.jsxs("button",{onClick:()=>{d==null||d(y),m(!1)},className:`w-full text-left flex items-center rounded-[var(--radius-sm)] transition-colors cursor-pointer ${T===A?"bg-[var(--Colors--Background--bg-brand-secondary)]":"hover:bg-[var(--Colors--Background--bg-primary_hover)]"}`,style:{padding:"var(--Spacing--Spacing-md) var(--Spacing--Spacing-2xl)",gap:"var(--Spacing--Spacing-lg)"},children:[y.icon&&e.jsx("span",{className:"text-muted-foreground flex-shrink-0",children:y.icon}),e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsx("span",{className:"text-foreground block truncate",style:H,children:y.label}),y.description&&e.jsx("span",{className:"text-muted-foreground block truncate",style:{marginTop:"var(--Spacing--Spacing-xxs)",...k},children:y.description})]})]},y.id))})]})}const fe={sm:"px-3 py-2",md:"px-4 py-3",lg:"px-5 py-4"};function xo({columns:t,data:r,size:a="md",striped:o=!1,hoverable:s=!0,bordered:l=!1,selectable:n=!1,selectedRows:i,onSelectionChange:d,loading:h=!1,emptyMessage:u="No data available",stickyHeader:p=!1,className:v=""}){const[c,S]=f.useState(null),[w,b]=f.useState("asc"),[m,A]=f.useState(new Set),N=i??m,$=y=>{i||A(y),d==null||d(y)},C=f.useMemo(()=>c?[...r].sort((y,T)=>{const O=y[c],G=T[c];if(O==null)return 1;if(G==null)return-1;const P=typeof O=="string"?O.localeCompare(G):O-G;return w==="asc"?P:-P}):r,[r,c,w]),L=y=>{c===y?b(T=>T==="asc"?"desc":"asc"):(S(y),b("asc"))},D=r.length>0&&N.size===r.length,B=N.size>0&&!D,z=()=>{$(D?new Set:new Set(r.map((y,T)=>T)))},F=y=>{const T=new Set(N);T.has(y)?T.delete(y):T.add(y),$(T)},H={fontFamily:"var(--font-label)",fontSize:"var(--text-label)",fontWeight:"var(--weight-label)"},k={fontFamily:"var(--font-button)",fontSize:"var(--text-button)",fontWeight:"var(--weight-button)"};return e.jsx("div",{className:`rounded-[var(--radius-lg)] border border-border overflow-hidden ${v}`,children:e.jsx("div",{className:"overflow-x-auto",children:e.jsxs("table",{className:"w-full border-collapse",children:[e.jsx("thead",{className:p?"sticky top-0 z-10":"",children:e.jsxs("tr",{className:"bg-muted/50 border-b border-border",children:[n&&e.jsx("th",{className:`${fe[a]} w-12`,children:e.jsx("input",{type:"checkbox",checked:D,ref:y=>{y&&(y.indeterminate=B)},onChange:z,className:"w-4 h-4 rounded-[var(--radius-sm)] border-border accent-primary cursor-pointer"})}),t.map(y=>e.jsx("th",{className:`${fe[a]} text-${y.align??"left"} text-muted-foreground ${y.sortable?"cursor-pointer select-none hover:text-foreground transition-colors":""} ${l?"border-x border-border first:border-l-0 last:border-r-0":""}`,style:{...k,width:y.width},onClick:()=>y.sortable&&L(y.key),children:e.jsxs("span",{className:"inline-flex items-center gap-1",children:[y.header,y.sortable&&e.jsx("span",{className:"text-muted-foreground/60",children:c===y.key?w==="asc"?e.jsx(Nr,{size:14}):e.jsx(we,{size:14}):e.jsx(wr,{size:12})})]})},y.key))]})}),e.jsx("tbody",{children:h?e.jsx("tr",{children:e.jsx("td",{colSpan:t.length+(n?1:0),className:`${fe[a]} text-center text-muted-foreground`,children:e.jsxs("div",{className:"flex items-center justify-center gap-2 py-8",children:[e.jsx("div",{className:"w-5 h-5 border-2 border-primary border-t-transparent rounded-full animate-spin"}),e.jsx("span",{style:H,children:"Loading..."})]})})}):C.length===0?e.jsx("tr",{children:e.jsx("td",{colSpan:t.length+(n?1:0),className:`${fe[a]} text-center text-muted-foreground py-12`,children:e.jsx("span",{style:H,children:u})})}):C.map((y,T)=>{const O=N.has(T);return e.jsxs("tr",{className:`border-b border-border last:border-b-0 transition-colors ${O?"bg-primary/5":o&&T%2===1?"bg-muted/20":"bg-card"} ${s?"hover:bg-[var(--Colors--Background--bg-primary_hover)]":""}`,children:[n&&e.jsx("td",{className:`${fe[a]} w-12`,children:e.jsx("input",{type:"checkbox",checked:O,onChange:()=>F(T),className:"w-4 h-4 rounded-[var(--radius-sm)] border-border accent-primary cursor-pointer"})}),t.map(G=>e.jsx("td",{className:`${fe[a]} text-${G.align??"left"} text-foreground ${l?"border-x border-border first:border-l-0 last:border-r-0":""}`,style:H,children:G.render?G.render(y[G.key],y,T):y[G.key]},G.key))]},T)})})]})})})}const No={sm:{fontFamily:"var(--font-button)",fontSize:"var(--text-button)",fontWeight:"var(--weight-button)",padding:"6px 12px"},md:{fontFamily:"var(--font-button)",fontSize:"var(--text-button)",fontWeight:"var(--weight-button)",padding:"8px 16px"},lg:{fontFamily:"var(--font-button)",fontSize:"var(--text-label)",fontWeight:"var(--weight-button)",padding:"10px 20px"}};function wo({tabs:t,variant:r="default",size:a="md",defaultTab:o,activeTab:s,onChange:l,fullWidth:n=!1,className:i=""}){var A,N;const[d,h]=f.useState(o??((A=t[0])==null?void 0:A.id)??""),u=s??d,p=f.useRef(null),[v,c]=f.useState({left:0,width:0}),S=$=>{s||h($),l==null||l($)};f.useEffect(()=>{if(r!=="underline"&&r!=="default")return;const $=p.current;if(!$)return;const C=$.querySelector(`[data-tab-id="${u}"]`);C&&c({left:C.offsetLeft,width:C.offsetWidth})},[u,r]);const w=(N=t.find($=>$.id===u))==null?void 0:N.content,b=(()=>{switch(r){case"bordered":return"border border-border rounded-[var(--radius)] bg-muted/30 p-1 gap-1";case"pills":return"gap-1.5";case"underline":return"border-b border-border relative";default:return"border-b border-border relative"}})(),m=($,C)=>{const L="relative flex items-center gap-1.5 transition-all cursor-pointer outline-none focus-visible:ring-2 focus-visible:ring-ring whitespace-nowrap";if(C)return`${L} opacity-40 !cursor-not-allowed`;switch(r){case"bordered":return`${L} rounded-[var(--radius-sm)] ${$?"bg-card text-foreground shadow-elevation-sm":"text-muted-foreground hover:text-foreground hover:bg-card/50"}`;case"pills":return`${L} rounded-[var(--radius)] ${$?"bg-primary text-primary-foreground":"text-muted-foreground hover:text-foreground hover:bg-muted"}`;case"underline":return`${L} ${$?"text-primary":"text-muted-foreground hover:text-foreground"}`;default:return`${L} ${$?"text-primary":"text-muted-foreground hover:text-foreground"}`}};return e.jsxs("div",{className:i,children:[e.jsxs("div",{ref:p,className:`flex ${n?"":"inline-flex"} ${b}`,role:"tablist",children:[(r==="default"||r==="underline")&&e.jsx("div",{className:"absolute bottom-0 h-0.5 bg-primary transition-all duration-200 rounded-full",style:{left:v.left,width:v.width}}),t.map($=>{const C=u===$.id;return e.jsxs("button",{"data-tab-id":$.id,role:"tab","aria-selected":C,disabled:$.disabled,onClick:()=>!$.disabled&&S($.id),className:`${m(C,!!$.disabled)} ${n?"flex-1 justify-center":""}`,style:No[a],children:[$.icon&&e.jsx("span",{className:"flex-shrink-0",children:$.icon}),e.jsx("span",{children:$.label}),$.badge!==void 0&&e.jsx("span",{className:`ml-1 px-1.5 py-0.5 rounded-full min-w-[18px] text-center ${C&&r==="pills"?"bg-primary-foreground/20 text-primary-foreground":"bg-muted text-muted-foreground"}`,style:{fontFamily:"var(--font-button)",fontSize:"var(--text-button)",fontWeight:"var(--weight-button)",lineHeight:"1"},children:$.badge})]},$.id)})]}),w&&e.jsx("div",{className:"pt-4",role:"tabpanel",children:w})]})}const So={fontFamily:"var(--font-label)",fontSize:"var(--text-label)",fontWeight:"var(--weight-button)"},$o={fontFamily:"var(--font-label)",fontSize:"var(--text-label)",fontWeight:"var(--weight-label)"};function Ye({title:t,children:r,open:a,onToggle:o,icon:s}){return e.jsxs("div",{className:"border-b border-border last:border-b-0",children:[e.jsxs("button",{onClick:o,className:"w-full flex items-center gap-3 px-4 py-3 text-left hover:bg-muted/20 transition-colors cursor-pointer",children:[s&&e.jsx("span",{className:"text-primary flex-shrink-0",children:s}),e.jsx("span",{className:"flex-1 text-foreground",style:So,children:t}),e.jsx(we,{size:16,className:`text-muted-foreground transition-transform ${a?"rotate-180":""}`})]}),e.jsx("div",{className:`overflow-hidden transition-all ${a?"max-h-96 opacity-100":"max-h-0 opacity-0"}`,children:e.jsx("div",{className:"px-4 pb-4 text-muted-foreground",style:$o,children:r})})]})}function Ft({type:t="single",items:r,defaultOpen:a,value:o,onChange:s,className:l=""}){const[n,i]=f.useState(typeof a=="string"?a:null),[d,h]=f.useState(Array.isArray(a)?new Set(a):new Set),u=o!==void 0,p=c=>u?t==="single"?o===c:Array.isArray(o)&&o.includes(c):t==="single"?n===c:d.has(c),v=c=>{if(t==="single"){const S=(u?o===c:n===c)?null:c;u||i(S),s==null||s(S)}else if(u){const S=Array.isArray(o)?o:[],w=S.includes(c)?S.filter(b=>b!==c):[...S,c];s==null||s(w)}else h(S=>{const w=new Set(S);return w.has(c)?w.delete(c):w.add(c),w})};return e.jsx("div",{className:`rounded-[var(--radius)] border border-border overflow-hidden ${l}`,children:r.map(c=>e.jsx(Ye,{title:c.title,open:p(c.id),onToggle:()=>v(c.id),icon:c.icon,children:c.content},c.id))})}Ft.displayName="Accordion",Ye.displayName="AccordionItem";const Wt=["bg-primary","bg-chart-2","bg-chart-5","bg-destructive","bg-secondary"],ko={xs:{box:"w-6 h-6",font:{fontFamily:"var(--font-button)",fontSize:"var(--text-button)",fontWeight:"var(--weight-button)"}},sm:{box:"w-8 h-8",font:{fontFamily:"var(--font-button)",fontSize:"var(--text-button)",fontWeight:"var(--weight-button)"}},md:{box:"w-10 h-10",font:{fontFamily:"var(--font-button)",fontSize:"var(--text-button)",fontWeight:"var(--weight-button)"}},lg:{box:"w-14 h-14",font:{fontFamily:"var(--font-button)",fontSize:"var(--text-button)",fontWeight:"var(--weight-button)"}},xl:{box:"w-20 h-20",font:{fontFamily:"var(--font-label)",fontSize:"var(--text-label)",fontWeight:"var(--weight-button)"}}},zo={xs:"w-2 h-2",sm:"w-2.5 h-2.5",md:"w-3 h-3",lg:"w-3.5 h-3.5",xl:"w-4 h-4"},_o={online:"bg-chart-2",offline:"bg-secondary",busy:"bg-destructive",away:"bg-chart-5"},Fo={fontFamily:"var(--font-button)",fontSize:"var(--text-button)",fontWeight:"var(--weight-button)"};function Mt({src:t,name:r,size:a="md",status:o,className:s=""}){const l=ko[a],n=r?r.split(" ").map(d=>d[0]).join("").slice(0,2).toUpperCase():"?",i=r?Wt[r.length%Wt.length]:"bg-muted";return e.jsxs("div",{className:`relative inline-flex ${s}`,children:[t?e.jsx("img",{src:t,alt:r||"avatar",className:`${l.box} rounded-full object-cover border-2 border-card`}):e.jsx("div",{className:`${l.box} rounded-full ${i} text-white flex items-center justify-center border-2 border-card`,style:l.font,children:n}),o&&e.jsx("span",{className:`absolute bottom-0 right-0 ${zo[a]} ${_o[o]} rounded-full border-2 border-card`})]})}function Ct({children:t,max:r,className:a=""}){const o=f.Children.toArray(t),s=r?o.slice(0,r):o,l=r&&o.length>r?o.length-r:0;return e.jsxs("div",{className:`flex -space-x-2 ${a}`,children:[s.map((n,i)=>e.jsx("div",{className:"relative",style:{zIndex:s.length-i},children:n},i)),l>0&&e.jsxs("div",{className:"relative w-10 h-10 rounded-full bg-muted text-foreground flex items-center justify-center border-2 border-card",style:{...Fo,zIndex:0},children:["+",l]})]})}Mt.displayName="Avatar",Ct.displayName="AvatarGroup";const Wo={sm:{fontFamily:"var(--font-button)",fontSize:"var(--text-button)",fontWeight:"var(--weight-label)"},md:{fontFamily:"var(--font-label)",fontSize:"var(--text-label)",fontWeight:"var(--weight-label)"},lg:{fontFamily:"var(--font-label)",fontSize:"var(--text-label)",fontWeight:"var(--weight-label)"}};function Mo({items:t,separator:r="chevron",size:a="md",maxItems:o}){const s=r==="slash"?e.jsx(Er,{size:12,className:"text-muted-foreground"}):r==="dot"?e.jsx($r,{size:16,className:"text-muted-foreground"}):e.jsx(ee,{size:12,className:"text-muted-foreground"}),l=a==="sm"?"gap-1":a==="lg"?"gap-2.5":"gap-1.5",n=Wo[a];let i=t;if(o&&t.length>o){const d=t.slice(0,1),h=t.slice(-(o-1));i=[...d,{label:"…"},...h]}return e.jsx("nav",{"aria-label":"Breadcrumb",children:e.jsx("ol",{className:`flex items-center flex-wrap ${l}`,children:i.map((d,h)=>e.jsxs("li",{className:"flex items-center gap-1.5",children:[h>0&&e.jsx("span",{className:"mx-0.5",children:s}),d.label==="…"?e.jsx("span",{className:"w-6 h-6 flex items-center justify-center rounded-[var(--radius-sm)] text-muted-foreground hover:bg-accent cursor-pointer",children:e.jsx(lt,{size:14})}):h===i.length-1?e.jsxs("span",{className:"inline-flex items-center gap-1.5 text-foreground",style:{...n,fontWeight:"var(--weight-button)"},children:[d.icon,d.label]}):e.jsxs("a",{href:d.href||"#",onClick:u=>u.preventDefault(),className:"inline-flex items-center gap-1.5 text-muted-foreground hover:text-foreground transition-colors",style:n,children:[d.icon,d.label]})]},h))})})}const Co={none:"",sm:"shadow-sm",md:"shadow-md",lg:"shadow-lg"};function Lt({children:t,className:r,hover:a,elevation:o="none"}){return e.jsx("div",{className:`rounded-[var(--radius-lg)] border border-border bg-card overflow-hidden ${Co[o]??""} ${a?"hover:border-primary/40 hover:shadow-md transition-all cursor-pointer":""} ${r??""}`,children:t})}Lt.displayName="Card";function jt({children:t,action:r}){return e.jsxs("div",{className:"px-5 py-4 border-b border-border flex items-center justify-between",children:[e.jsx("div",{children:t}),r]})}jt.displayName="CardHeader";function At({children:t}){return e.jsx("div",{className:"px-5 py-4",children:t})}At.displayName="CardBody";function Dt({children:t}){return e.jsx("div",{className:"px-5 py-3 border-t border-border bg-muted/10 flex items-center gap-2",children:t})}Dt.displayName="CardFooter";const Lo=["#ef4444","#f97316","#eab308","#22c55e","#06b6d4","#3b82f6","#8b5cf6","#ec4899","#991b1b","#9a3412","#854d0e","#166534","#155e75","#1e40af","#5b21b6","#9d174d","#fca5a5","#fdba74","#fde047","#86efac","#67e8f9","#93c5fd","#c4b5fd","#f9a8d4"];function jo(t){const r=parseInt(t.slice(1,3),16),a=parseInt(t.slice(3,5),16),o=parseInt(t.slice(5,7),16);return`rgb(${r}, ${a}, ${o})`}function Ao(t){const r=parseInt(t.slice(1,3),16)/255,a=parseInt(t.slice(3,5),16)/255,o=parseInt(t.slice(5,7),16)/255,s=Math.max(r,a,o),l=Math.min(r,a,o),n=(s+l)/2;if(s===l)return`hsl(0, 0%, ${Math.round(n*100)}%)`;const i=s-l,d=n>.5?i/(2-s-l):i/(s+l);let h=0;return s===r?h=((a-o)/i+(a<o?6:0))/6:s===a?h=((o-r)/i+2)/6:h=((r-a)/i+4)/6,`hsl(${Math.round(h*360)}, ${Math.round(d*100)}%, ${Math.round(n*100)}%)`}const Do={fontFamily:"var(--font-label)",fontSize:"var(--text-label)",fontWeight:"var(--weight-button)"},To={fontFamily:"var(--font-button)",fontSize:"var(--text-button)",fontWeight:"var(--weight-label)"},Tt={fontFamily:"var(--font-button)",fontSize:"var(--text-button)",fontWeight:"var(--weight-label)"};function Io({value:t,onChange:r,label:a,presets:o,showInput:s=!0,showFormats:l,size:n="md"}){const[i,d]=f.useState(!1),h=f.useRef(null),u=n==="sm"?"w-5 h-5":n==="lg"?"w-8 h-8":"w-6 h-6",p=o||Lo,v=c=>{navigator.clipboard.writeText(c).then(()=>{d(!0),setTimeout(()=>d(!1),1500)})};return e.jsxs("div",{className:"space-y-3",children:[a&&e.jsx("label",{className:"block text-foreground",style:Do,children:a}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsxs("div",{className:"relative",children:[e.jsx("div",{className:"w-10 h-10 rounded-[var(--radius-md)] border border-border cursor-pointer overflow-hidden",style:{backgroundColor:t},onClick:()=>{var c;return(c=h.current)==null?void 0:c.click()}}),e.jsx("input",{ref:h,type:"color",value:t,onChange:c=>r(c.target.value),className:"absolute inset-0 opacity-0 cursor-pointer w-full h-full"})]}),s&&e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsx("input",{value:t,onChange:c=>{(/^#[0-9a-fA-F]{0,6}$/.test(c.target.value)||c.target.value==="#")&&r(c.target.value)},className:"w-24 px-2.5 py-1.5 rounded-[var(--radius-md)] border border-border bg-background text-foreground outline-none focus:border-primary",style:Tt,maxLength:7}),e.jsx("button",{onClick:()=>v(t),className:"w-8 h-8 flex items-center justify-center rounded-[var(--radius-md)] text-muted-foreground hover:text-foreground hover:bg-accent transition-colors cursor-pointer",children:i?e.jsx(ne,{size:14,className:"text-chart-2"}):e.jsx(nt,{size:14})})]})]}),p.length>0&&e.jsx("div",{className:"flex flex-wrap gap-1.5",children:p.map(c=>e.jsx("button",{onClick:()=>r(c),className:`${u} rounded-[var(--radius-sm)] border-2 transition-transform hover:scale-110 cursor-pointer
312
+ ${t===c?"border-foreground ring-1 ring-foreground/20":"border-transparent"}`,style:{backgroundColor:c},title:c},c))}),l&&e.jsx("div",{className:"space-y-1",children:[{label:"HEX",val:t.toUpperCase()},{label:"RGB",val:jo(t)},{label:"HSL",val:Ao(t)}].map(c=>e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"w-8 text-muted-foreground",style:To,children:c.label}),e.jsx("code",{className:"text-foreground",style:Tt,children:c.val}),e.jsx("button",{onClick:()=>v(c.val),className:"text-muted-foreground hover:text-foreground cursor-pointer",children:e.jsx(nt,{size:12})})]},c.label))})]})}const Eo={fontFamily:"var(--font-button)",fontSize:"var(--text-button)",fontWeight:"var(--weight-label)"};function It({label:t,orientation:r="horizontal",dashed:a,spacing:o="md",className:s=""}){const l={sm:"my-2",md:"my-4",lg:"my-8"},n=a?"border-dashed":"border-solid";return r==="vertical"?e.jsx("div",{className:`inline-block h-full min-h-[24px] border-l border-border ${n} mx-3 ${s}`}):t?e.jsxs("div",{className:`flex items-center gap-3 ${l[o]} ${s}`,children:[e.jsx("div",{className:`flex-1 border-t border-border ${n}`}),e.jsx("span",{className:"text-muted-foreground flex-shrink-0",style:Eo,children:t}),e.jsx("div",{className:`flex-1 border-t border-border ${n}`})]}):e.jsx("hr",{className:`border-t border-border ${n} ${l[o]} ${s}`})}It.displayName="Divider";const Bo={fontFamily:"var(--font-label)",fontSize:"var(--text-label)",fontWeight:"var(--weight-button)"};function Et({open:t,onClose:r,title:a,children:o,side:s="right",size:l="md",footer:n,className:i=""}){if(!t)return null;const d={sm:"w-72",md:"w-96",lg:"w-[480px]"},h={sm:"h-48",md:"h-72",lg:"h-96"},u={right:`top-0 right-0 h-full ${d[l]} animate-[slideRight_0.2s_ease]`,left:`top-0 left-0 h-full ${d[l]} animate-[slideLeft_0.2s_ease]`,top:`top-0 left-0 w-full ${h[l]} animate-[slideTop_0.2s_ease]`,bottom:`bottom-0 left-0 w-full ${h[l]} animate-[slideBottom_0.2s_ease]`};return e.jsxs("div",{className:"fixed inset-0 z-50",children:[e.jsx("div",{className:"absolute inset-0 bg-foreground/20",onClick:r}),e.jsxs("div",{className:`absolute bg-card border border-border shadow-lg flex flex-col ${u[s]} ${i}`,children:[a&&e.jsxs("div",{className:"px-5 py-4 border-b border-border flex items-center justify-between flex-shrink-0",children:[e.jsx("span",{className:"text-foreground",style:Bo,children:a}),e.jsx("button",{onClick:r,className:"text-muted-foreground hover:text-foreground cursor-pointer",children:e.jsx(J,{size:18})})]}),e.jsx("div",{className:"flex-1 overflow-y-auto p-5",children:o}),n&&e.jsx("div",{className:"px-5 py-3 border-t border-border flex items-center gap-2 flex-shrink-0",children:n})]}),e.jsx("style",{children:`
313
313
  @keyframes slideRight { from { transform: translateX(100%); } to { transform: translateX(0); } }
314
314
  @keyframes slideLeft { from { transform: translateX(-100%); } to { transform: translateX(0); } }
315
315
  @keyframes slideTop { from { transform: translateY(-100%); } to { transform: translateY(0); } }
316
316
  @keyframes slideBottom { from { transform: translateY(100%); } to { transform: translateY(0); } }
317
- `})]})}It.displayName="Drawer";const Ho={sm:{trigger:"h-9 px-[var(--Spacing--Spacing-xl)] gap-[var(--Spacing--Spacing-sm)]",option:"rounded-[var(--radius-sm)]",optionStyle:{padding:"var(--Spacing--Spacing-sm) var(--Spacing--Spacing-xl)"},textStyle:{fontFamily:"var(--font-label)",fontSize:"var(--text-label)",fontWeight:"var(--weight-label)"},descStyle:{fontFamily:"var(--font-button)",fontSize:"var(--text-button)",fontWeight:"var(--weight-label)"},icon:14,avatarSize:20},md:{trigger:"h-11 px-[var(--Spacing--Spacing-2xl)] gap-[var(--Spacing--Spacing-lg)]",option:"rounded-[var(--radius-sm)]",optionStyle:{padding:"var(--Spacing--Spacing-md) var(--Spacing--Spacing-2xl)"},textStyle:{fontFamily:"var(--font-caption)",fontSize:"var(--text-caption)",fontWeight:"var(--weight-caption)"},descStyle:{fontFamily:"var(--font-label)",fontSize:"var(--text-label)",fontWeight:"var(--weight-label)"},icon:16,avatarSize:24},lg:{trigger:"h-13 px-[var(--Spacing--Spacing-3xl)] gap-[var(--Spacing--Spacing-xl)]",option:"rounded-[var(--radius-sm)]",optionStyle:{padding:"var(--Spacing--Spacing-lg) var(--Spacing--Spacing-3xl)"},textStyle:{fontFamily:"var(--font-p)",fontSize:"var(--text-p)",fontWeight:"var(--weight-p)"},descStyle:{fontFamily:"var(--font-caption)",fontSize:"var(--text-caption)",fontWeight:"var(--weight-caption)"},icon:18,avatarSize:28}},Yo={default:{base:"border border-border bg-input-background",hover:"hover:border-foreground/30",focus:"ring-2 ring-ring/20 border-ring"},outlined:{base:"border-2 border-border bg-transparent",hover:"hover:border-foreground/40",focus:"ring-2 ring-ring/20 border-ring"},filled:{base:"border border-transparent bg-muted",hover:"hover:bg-muted/80",focus:"ring-2 ring-ring/20 border-ring bg-input-background"},ghost:{base:"border border-transparent bg-transparent",hover:"hover:bg-muted/50",focus:"ring-2 ring-ring/20 bg-input-background"}},qo={default:"",error:"!border-destructive ring-destructive/20",success:"!border-chart-2 ring-chart-2/20",warning:"!border-chart-5 ring-chart-5/20"},Bt=c.forwardRef(({options:t,value:r,defaultValue:a,onChange:o,placeholder:s="Select an option…",label:l,helperText:n,errorMessage:i,successMessage:d,size:h="md",variant:f="default",state:p="default",disabled:v=!1,loading:u=!1,searchable:y=!1,clearable:S=!1,multiple:b=!1,maxSelections:N,grouped:j=!1,required:M=!1,id:w,className:L="",showSelectAll:T=!1,tagLimit:I,creatable:k=!1,onCreateOption:$,createLabel:_='Create "{query}"',emptyState:B,footer:G,onSearch:m,searchDebounce:A=300,searchLoading:X=!1,renderOption:O},P)=>{const[U,Q]=c.useState(!1),[q,re]=c.useState(""),[oe,ae]=c.useState(-1),[he,ie]=c.useState(a??(b?[]:"")),D=r??he,se=c.useRef(null),xe=c.useRef(null),Me=c.useRef(null),de=c.useRef(null),[ce,Xe]=c.useState({top:0,left:0,width:0}),H=Ho[h],Ne=Yo[f];c.useEffect(()=>{if(!U||!se.current)return;const g=()=>{const F=se.current.getBoundingClientRect();Xe({top:F.bottom+4,left:F.left,width:F.width})};return g(),window.addEventListener("scroll",g,!0),window.addEventListener("resize",g),()=>{window.removeEventListener("scroll",g,!0),window.removeEventListener("resize",g)}},[U]);const Ze=c.useCallback(g=>{re(g),m&&(de.current&&clearTimeout(de.current),de.current=setTimeout(()=>{m(g)},A))},[m,A]);c.useEffect(()=>()=>{de.current&&clearTimeout(de.current)},[]);const R=c.useMemo(()=>!q||m?t:t.filter(g=>{var F;return g.label.toLowerCase().includes(q.toLowerCase())||((F=g.description)==null?void 0:F.toLowerCase().includes(q.toLowerCase()))}),[t,q,m]),Z=c.useMemo(()=>{if(!j)return null;const g={};return R.forEach(F=>{const C=F.group||"Other";g[C]||(g[C]=[]),g[C].push(F)}),g},[R,j]),ue=c.useMemo(()=>{var g;return b&&Array.isArray(D)?D.map(F=>{var C;return(C=t.find(ge=>ge.value===F))==null?void 0:C.label}).filter(Boolean):(g=t.find(F=>F.value===D))!=null&&g.label?[t.find(F=>F.value===D).label]:[]},[D,t,b]),W=c.useCallback(g=>b&&Array.isArray(D)?D.includes(g):D===g,[D,b]),E=c.useCallback(g=>{if(b){const F=Array.isArray(D)?[...D]:[],C=F.indexOf(g);if(C>-1)F.splice(C,1);else{if(N&&F.length>=N)return;F.push(g)}ie(F),o==null||o(F)}else ie(g),o==null||o(g),Q(!1);re("")},[D,b,N,o]),V=c.useMemo(()=>R.filter(g=>!g.disabled).map(g=>g.value),[R]),Y=c.useMemo(()=>!b||!Array.isArray(D)?!1:V.length>0&&V.every(g=>D.includes(g)),[b,D,V]),We=c.useMemo(()=>!b||!Array.isArray(D)?!1:V.some(g=>D.includes(g))&&!Y,[b,D,V,Y]),Ce=c.useCallback(()=>{if(b)if(Y){const g=Array.isArray(D)?D.filter(F=>!V.includes(F)):[];ie(g),o==null||o(g)}else{const g=Array.isArray(D)?[...D]:[];for(const F of V)if(!g.includes(F)){if(N&&g.length>=N)break;g.push(F)}ie(g),o==null||o(g)}},[b,Y,D,V,N,o]),Je=c.useCallback(()=>{q.trim()&&($==null||$(q.trim()),re(""))},[q,$]),be=c.useMemo(()=>!k||!q.trim()?!1:!t.some(g=>g.label.toLowerCase()===q.toLowerCase()),[k,q,t]),Pe=c.useCallback(g=>{g.stopPropagation();const F=b?[]:"";ie(F),o==null||o(F)},[b,o]),Le=j?Object.values(Z||{}).flat():R,fr=c.useCallback(g=>{var F;if(!(v||u))switch(g.key){case"ArrowDown":g.preventDefault(),U?ae(C=>C<Le.length-1?C+1:0):Q(!0);break;case"ArrowUp":g.preventDefault(),ae(C=>C>0?C-1:Le.length-1);break;case"Enter":case" ":if(g.preventDefault(),U&&oe>=0){const C=Le[oe];C&&!C.disabled&&E(C.value)}else Q(!0);break;case"Escape":Q(!1),(F=se.current)==null||F.focus();break}},[v,u,U,oe,Le,E]);c.useEffect(()=>{const g=F=>{const C=F.target;se.current&&!se.current.contains(C)&&xe.current&&!xe.current.contains(C)&&(Q(!1),re(""))};return document.addEventListener("mousedown",g),()=>document.removeEventListener("mousedown",g)},[]),c.useEffect(()=>{U&&y&&setTimeout(()=>{var g;return(g=Me.current)==null?void 0:g.focus()},50),U&&ae(-1)},[U,y]);const Qe=b?Array.isArray(D)&&D.length>0:!!D,je=i?"error":p,Oa=()=>{const g=ue,F=I&&I>0?I:g.length,C=g.slice(0,F),ge=g.length-C.length;return e.jsxs("span",{className:"flex flex-wrap gap-1",children:[C.map(Ve=>e.jsxs("span",{className:"inline-flex items-center gap-1 px-2 py-0.5 rounded-[var(--radius-sm)] bg-[var(--Colors--Background--bg-brand-secondary)] text-[var(--Colors--Text--text-brand-primary)]",style:{fontFamily:"var(--font-label)",fontSize:"var(--text-label)",fontWeight:"var(--weight-label)"},children:[Ve,e.jsx(J,{size:10,className:"cursor-pointer hover:text-destructive transition-colors",onClick:Ua=>{Ua.stopPropagation();const br=t.find(Ga=>Ga.label===Ve);br&&E(br.value)}})]},Ve)),ge>0&&e.jsxs("span",{className:"inline-flex items-center px-2 py-0.5 rounded-[var(--radius-sm)] bg-muted text-muted-foreground",style:{fontFamily:"var(--font-label)",fontSize:"var(--text-label)",fontWeight:"var(--weight-label)"},children:["+",ge," more"]})]})},hr=(g,F)=>{const C=W(g.value);return O?e.jsx("button",{type:"button",role:"option","aria-selected":C,disabled:g.disabled,className:`w-full ${H.option} transition-colors cursor-pointer
318
- ${C?"bg-[var(--Colors--Background--bg-brand-secondary)]":""}
319
- ${oe===F&&!C?"bg-[var(--Colors--Background--bg-primary_hover)]":""}
317
+ `})]})}Et.displayName="Drawer";const Ho={sm:{trigger:"h-9 px-[var(--Spacing--Spacing-xl)] gap-[var(--Spacing--Spacing-sm)]",option:"rounded-[var(--radius-sm)]",optionStyle:{padding:"var(--Spacing--Spacing-sm) var(--Spacing--Spacing-xl)"},textStyle:{fontFamily:"var(--font-label)",fontSize:"var(--text-label)",fontWeight:"var(--weight-label)"},descStyle:{fontFamily:"var(--font-button)",fontSize:"var(--text-button)",fontWeight:"var(--weight-label)"},icon:14,avatarSize:20},md:{trigger:"h-11 px-[var(--Spacing--Spacing-2xl)] gap-[var(--Spacing--Spacing-lg)]",option:"rounded-[var(--radius-sm)]",optionStyle:{padding:"var(--Spacing--Spacing-md) var(--Spacing--Spacing-2xl)"},textStyle:{fontFamily:"var(--font-caption)",fontSize:"var(--text-caption)",fontWeight:"var(--weight-caption)"},descStyle:{fontFamily:"var(--font-label)",fontSize:"var(--text-label)",fontWeight:"var(--weight-label)"},icon:16,avatarSize:24},lg:{trigger:"h-13 px-[var(--Spacing--Spacing-3xl)] gap-[var(--Spacing--Spacing-xl)]",option:"rounded-[var(--radius-sm)]",optionStyle:{padding:"var(--Spacing--Spacing-lg) var(--Spacing--Spacing-3xl)"},textStyle:{fontFamily:"var(--font-p)",fontSize:"var(--text-p)",fontWeight:"var(--weight-p)"},descStyle:{fontFamily:"var(--font-caption)",fontSize:"var(--text-caption)",fontWeight:"var(--weight-caption)"},icon:18,avatarSize:28}},Yo={default:{base:"border border-border bg-input-background",hover:"hover:border-foreground/30",focus:"ring-2 ring-ring/20 border-ring"},outlined:{base:"border-2 border-border bg-transparent",hover:"hover:border-foreground/40",focus:"ring-2 ring-ring/20 border-ring"},filled:{base:"border border-transparent bg-muted",hover:"hover:bg-muted/80",focus:"ring-2 ring-ring/20 border-ring bg-input-background"},ghost:{base:"border border-transparent bg-transparent",hover:"hover:bg-muted/50",focus:"ring-2 ring-ring/20 bg-input-background"}},qo={default:"",error:"!border-destructive ring-destructive/20",success:"!border-chart-2 ring-chart-2/20",warning:"!border-chart-5 ring-chart-5/20"},Bt=f.forwardRef(({options:t,value:r,defaultValue:a,onChange:o,placeholder:s="Select an option…",label:l,helperText:n,errorMessage:i,successMessage:d,size:h="md",variant:u="default",state:p="default",disabled:v=!1,loading:c=!1,searchable:S=!1,clearable:w=!1,multiple:b=!1,maxSelections:m,grouped:A=!1,required:N=!1,id:$,className:C="",showSelectAll:L=!1,tagLimit:D,creatable:B=!1,onCreateOption:z,createLabel:F='Create "{query}"',emptyState:H,footer:k,onSearch:y,searchDebounce:T=300,searchLoading:O=!1,renderOption:G},P)=>{const[K,Q]=f.useState(!1),[U,re]=f.useState(""),[oe,ae]=f.useState(-1),[he,ie]=f.useState(a??(b?[]:"")),I=r??he,se=f.useRef(null),xe=f.useRef(null),Me=f.useRef(null),de=f.useRef(null),[ce,Xe]=f.useState({top:0,left:0,width:0}),Y=Ho[h],Ne=Yo[u];f.useEffect(()=>{if(!K||!se.current)return;const g=()=>{const W=se.current.getBoundingClientRect();Xe({top:W.bottom+4,left:W.left,width:W.width})};return g(),window.addEventListener("scroll",g,!0),window.addEventListener("resize",g),()=>{window.removeEventListener("scroll",g,!0),window.removeEventListener("resize",g)}},[K]);const Ze=f.useCallback(g=>{re(g),y&&(de.current&&clearTimeout(de.current),de.current=setTimeout(()=>{y(g)},T))},[y,T]);f.useEffect(()=>()=>{de.current&&clearTimeout(de.current)},[]);const R=f.useMemo(()=>!U||y?t:t.filter(g=>{var W;return g.label.toLowerCase().includes(U.toLowerCase())||((W=g.description)==null?void 0:W.toLowerCase().includes(U.toLowerCase()))}),[t,U,y]),Z=f.useMemo(()=>{if(!A)return null;const g={};return R.forEach(W=>{const j=W.group||"Other";g[j]||(g[j]=[]),g[j].push(W)}),g},[R,A]),ue=f.useMemo(()=>{var g;return b&&Array.isArray(I)?I.map(W=>{var j;return(j=t.find(ge=>ge.value===W))==null?void 0:j.label}).filter(Boolean):(g=t.find(W=>W.value===I))!=null&&g.label?[t.find(W=>W.value===I).label]:[]},[I,t,b]),M=f.useCallback(g=>b&&Array.isArray(I)?I.includes(g):I===g,[I,b]),E=f.useCallback(g=>{if(b){const W=Array.isArray(I)?[...I]:[],j=W.indexOf(g);if(j>-1)W.splice(j,1);else{if(m&&W.length>=m)return;W.push(g)}ie(W),o==null||o(W)}else ie(g),o==null||o(g),Q(!1);re("")},[I,b,m,o]),V=f.useMemo(()=>R.filter(g=>!g.disabled).map(g=>g.value),[R]),q=f.useMemo(()=>!b||!Array.isArray(I)?!1:V.length>0&&V.every(g=>I.includes(g)),[b,I,V]),Ce=f.useMemo(()=>!b||!Array.isArray(I)?!1:V.some(g=>I.includes(g))&&!q,[b,I,V,q]),Le=f.useCallback(()=>{if(b)if(q){const g=Array.isArray(I)?I.filter(W=>!V.includes(W)):[];ie(g),o==null||o(g)}else{const g=Array.isArray(I)?[...I]:[];for(const W of V)if(!g.includes(W)){if(m&&g.length>=m)break;g.push(W)}ie(g),o==null||o(g)}},[b,q,I,V,m,o]),Je=f.useCallback(()=>{U.trim()&&(z==null||z(U.trim()),re(""))},[U,z]),be=f.useMemo(()=>!B||!U.trim()?!1:!t.some(g=>g.label.toLowerCase()===U.toLowerCase()),[B,U,t]),Pe=f.useCallback(g=>{g.stopPropagation();const W=b?[]:"";ie(W),o==null||o(W)},[b,o]),je=A?Object.values(Z||{}).flat():R,fr=f.useCallback(g=>{var W;if(!(v||c))switch(g.key){case"ArrowDown":g.preventDefault(),K?ae(j=>j<je.length-1?j+1:0):Q(!0);break;case"ArrowUp":g.preventDefault(),ae(j=>j>0?j-1:je.length-1);break;case"Enter":case" ":if(g.preventDefault(),K&&oe>=0){const j=je[oe];j&&!j.disabled&&E(j.value)}else Q(!0);break;case"Escape":Q(!1),(W=se.current)==null||W.focus();break}},[v,c,K,oe,je,E]);f.useEffect(()=>{const g=W=>{const j=W.target;se.current&&!se.current.contains(j)&&xe.current&&!xe.current.contains(j)&&(Q(!1),re(""))};return document.addEventListener("mousedown",g),()=>document.removeEventListener("mousedown",g)},[]),f.useEffect(()=>{K&&S&&setTimeout(()=>{var g;return(g=Me.current)==null?void 0:g.focus()},50),K&&ae(-1)},[K,S]);const Qe=b?Array.isArray(I)&&I.length>0:!!I,Ae=i?"error":p,Oa=()=>{const g=ue,W=D&&D>0?D:g.length,j=g.slice(0,W),ge=g.length-j.length;return e.jsxs("span",{className:"flex flex-wrap gap-1",children:[j.map(Ve=>e.jsxs("span",{className:"inline-flex items-center gap-1 px-2 py-0.5 rounded-[var(--radius-sm)] bg-[var(--Colors--Background--bg-brand-secondary)] text-[var(--Colors--Text--text-brand-primary)]",style:{fontFamily:"var(--font-label)",fontSize:"var(--text-label)",fontWeight:"var(--weight-label)"},children:[Ve,e.jsx(J,{size:10,className:"cursor-pointer hover:text-destructive transition-colors",onClick:Ua=>{Ua.stopPropagation();const br=t.find(Ga=>Ga.label===Ve);br&&E(br.value)}})]},Ve)),ge>0&&e.jsxs("span",{className:"inline-flex items-center px-2 py-0.5 rounded-[var(--radius-sm)] bg-muted text-muted-foreground",style:{fontFamily:"var(--font-label)",fontSize:"var(--text-label)",fontWeight:"var(--weight-label)"},children:["+",ge," more"]})]})},hr=(g,W)=>{const j=M(g.value);return G?e.jsx("button",{type:"button",role:"option","aria-selected":j,disabled:g.disabled,className:`w-full ${Y.option} transition-colors cursor-pointer
318
+ ${j?"bg-[var(--Colors--Background--bg-brand-secondary)]":""}
319
+ ${oe===W&&!j?"bg-[var(--Colors--Background--bg-primary_hover)]":""}
320
320
  ${g.disabled?"opacity-40 cursor-not-allowed":"hover:bg-[var(--Colors--Background--bg-primary_hover)]"}
321
- `,style:H.optionStyle,onClick:()=>!g.disabled&&E(g.value),onMouseEnter:()=>ae(F),children:O(g,C)},g.value):e.jsxs("button",{type:"button",role:"option","aria-selected":C,disabled:g.disabled,className:`w-full flex items-center gap-[var(--Spacing--Spacing-lg)] ${H.option} transition-colors cursor-pointer
322
- ${C?"bg-[var(--Colors--Background--bg-brand-secondary)] text-[var(--Colors--Text--text-brand-primary)]":""}
323
- ${oe===F&&!C?"bg-[var(--Colors--Background--bg-primary_hover)]":""}
321
+ `,style:Y.optionStyle,onClick:()=>!g.disabled&&E(g.value),onMouseEnter:()=>ae(W),children:G(g,j)},g.value):e.jsxs("button",{type:"button",role:"option","aria-selected":j,disabled:g.disabled,className:`w-full flex items-center gap-[var(--Spacing--Spacing-lg)] ${Y.option} transition-colors cursor-pointer
322
+ ${j?"bg-[var(--Colors--Background--bg-brand-secondary)] text-[var(--Colors--Text--text-brand-primary)]":""}
323
+ ${oe===W&&!j?"bg-[var(--Colors--Background--bg-primary_hover)]":""}
324
324
  ${g.disabled?"opacity-40 cursor-not-allowed":"hover:bg-[var(--Colors--Background--bg-primary_hover)]"}
325
- `,style:{...H.optionStyle,...H.textStyle},onClick:()=>!g.disabled&&E(g.value),onMouseEnter:()=>ae(F),children:[b&&e.jsx("span",{className:`flex-shrink-0 w-4 h-4 rounded-[var(--radius-sm)] border flex items-center justify-center transition-colors
326
- ${C?"bg-primary border-primary":"border-border"}
327
- `,children:C&&e.jsx(ne,{size:10,className:"text-primary-foreground"})}),g.avatar&&e.jsx("img",{src:g.avatar,alt:"",className:"flex-shrink-0 rounded-full object-cover",style:{width:H.avatarSize,height:H.avatarSize}}),g.icon&&e.jsx("span",{className:"flex-shrink-0",children:g.icon}),e.jsxs("span",{className:"flex-1 text-left",children:[e.jsx("span",{className:"block",children:g.label}),g.description&&e.jsx("span",{className:"block text-muted-foreground",style:{marginTop:"var(--Spacing--Spacing-xxs)",...H.descStyle},children:g.description})]}),!b&&C&&e.jsx(ne,{size:H.icon,className:"text-primary flex-shrink-0"})]},g.value)};let ur=0;return e.jsxs("div",{ref:P,className:`relative w-full ${L}`,id:w,children:[l&&e.jsxs("label",{className:"block mb-1.5 text-foreground",children:[l,M&&e.jsx("span",{className:"text-destructive ml-0.5",children:"*"})]}),e.jsxs("button",{ref:se,type:"button",role:"combobox","aria-expanded":U,"aria-haspopup":"listbox",disabled:v||u,onClick:()=>!v&&!u&&Q(!U),onKeyDown:fr,className:`w-full flex items-center rounded-[var(--radius-md)] transition-all duration-150 ${H.trigger}
325
+ `,style:{...Y.optionStyle,...Y.textStyle},onClick:()=>!g.disabled&&E(g.value),onMouseEnter:()=>ae(W),children:[b&&e.jsx("span",{className:`flex-shrink-0 w-4 h-4 rounded-[var(--radius-sm)] border flex items-center justify-center transition-colors
326
+ ${j?"bg-primary border-primary":"border-border"}
327
+ `,children:j&&e.jsx(ne,{size:10,className:"text-primary-foreground"})}),g.avatar&&e.jsx("img",{src:g.avatar,alt:"",className:"flex-shrink-0 rounded-full object-cover",style:{width:Y.avatarSize,height:Y.avatarSize}}),g.icon&&e.jsx("span",{className:"flex-shrink-0",children:g.icon}),e.jsxs("span",{className:"flex-1 text-left",children:[e.jsx("span",{className:"block",children:g.label}),g.description&&e.jsx("span",{className:"block text-muted-foreground",style:{marginTop:"var(--Spacing--Spacing-xxs)",...Y.descStyle},children:g.description})]}),!b&&j&&e.jsx(ne,{size:Y.icon,className:"text-primary flex-shrink-0"})]},g.value)};let ur=0;return e.jsxs("div",{ref:P,className:`relative w-full ${C}`,id:$,children:[l&&e.jsxs("label",{className:"block mb-1.5 text-foreground",children:[l,N&&e.jsx("span",{className:"text-destructive ml-0.5",children:"*"})]}),e.jsxs("button",{ref:se,type:"button",role:"combobox","aria-expanded":K,"aria-haspopup":"listbox",disabled:v||c,onClick:()=>!v&&!c&&Q(!K),onKeyDown:fr,className:`w-full flex items-center rounded-[var(--radius-md)] transition-all duration-150 ${Y.trigger}
328
328
  ${Ne.base}
329
- ${!v&&!u?Ne.hover:""}
330
- ${U?Ne.focus:""}
329
+ ${!v&&!c?Ne.hover:""}
330
+ ${K?Ne.focus:""}
331
331
  ${v?"opacity-50 cursor-not-allowed":"cursor-pointer"}
332
- ${u?"opacity-70 cursor-wait":""}
333
- ${qo[je]}
334
- `,style:H.textStyle,children:[u?e.jsx(ve,{size:H.icon,className:"animate-spin text-muted-foreground"}):null,e.jsx("span",{className:`flex-1 text-left truncate ${Qe?"text-foreground":"text-muted-foreground"}`,children:Qe?b?Oa():ue[0]:s}),S&&Qe&&!v&&e.jsx(J,{size:H.icon,className:"flex-shrink-0 text-muted-foreground hover:text-foreground cursor-pointer transition-colors",onClick:Pe}),e.jsx(we,{size:H.icon,className:`flex-shrink-0 text-muted-foreground transition-transform duration-200 ${U?"rotate-180":""}`})]}),U&&Ae.createPortal(e.jsxs("div",{ref:xe,role:"listbox",className:"fixed z-[9999] bg-popover border border-border rounded-[var(--radius)] shadow-elevation-sm overflow-hidden",style:{top:ce.top,left:ce.left,width:ce.width||"auto"},children:[y&&e.jsx("div",{className:"p-2 border-b border-border",children:e.jsxs("div",{className:"relative",children:[e.jsx(Se,{size:14,className:"absolute left-2.5 top-1/2 -translate-y-1/2 text-muted-foreground"}),e.jsx("input",{ref:Me,type:"text",value:q,onChange:g=>Ze(g.target.value),placeholder:"Search\\u2026",className:"w-full pl-8 pr-3 py-1.5 bg-background border border-border rounded-[var(--radius-sm)] outline-none placeholder:text-muted-foreground focus:border-ring focus:ring-1 focus:ring-ring/20 transition-colors",style:{fontFamily:"var(--font-label)",fontSize:"var(--text-label)",fontWeight:"var(--weight-label)"},onKeyDown:fr})]})}),b&&T&&R.length>0&&e.jsxs("button",{type:"button",className:`w-full flex items-center gap-[var(--Spacing--Spacing-lg)] ${H.option} border-b border-border transition-colors hover:bg-[var(--Colors--Background--bg-primary_hover)] cursor-pointer`,style:{...H.optionStyle,...H.textStyle},onClick:Ce,children:[e.jsxs("span",{className:`flex-shrink-0 w-4 h-4 rounded-[var(--radius-sm)] border flex items-center justify-center transition-colors
335
- ${Y?"bg-primary border-primary":We?"bg-primary/50 border-primary":"border-border"}
336
- `,children:[Y&&e.jsx(ne,{size:10,className:"text-primary-foreground"}),We&&!Y&&e.jsx("span",{className:"w-2 h-0.5 bg-primary-foreground rounded-full"})]}),e.jsx("span",{className:"text-foreground",children:Y?"Deselect All":"Select All"}),e.jsxs("span",{className:"ml-auto text-muted-foreground",style:{fontFamily:"var(--font-button)",fontSize:"var(--text-button)",fontWeight:"var(--weight-label)"},children:[Array.isArray(D)?D.length:0,"/",R.filter(g=>!g.disabled).length]})]}),e.jsxs("div",{className:"max-h-60 overflow-y-auto p-1",children:[X?e.jsxs("div",{className:"flex items-center justify-center py-6 gap-2 text-muted-foreground",children:[e.jsx(ve,{size:16,className:"animate-spin"}),e.jsx("span",{style:{fontFamily:"var(--font-label)",fontSize:"var(--text-label)"},children:"Searching\\u2026"})]}):R.length===0&&!be?B?e.jsx("div",{className:"py-4 px-3",children:B}):e.jsxs("div",{className:"text-center py-6 text-muted-foreground flex flex-col items-center gap-2",children:[e.jsx(Ar,{size:24,className:"opacity-40"}),e.jsx("span",{style:{fontFamily:"var(--font-label)",fontSize:"var(--text-label)"},children:"No options found"})]}):j&&Z?Object.entries(Z).map(([g,F])=>e.jsxs("div",{children:[e.jsx("div",{className:"px-3 py-1.5 uppercase tracking-wider text-muted-foreground",style:{fontFamily:"var(--font-button)",fontSize:"var(--text-button)",fontWeight:"var(--weight-button)"},children:g}),F.map(C=>{const ge=hr(C,ur);return ur++,ge})]},g)):R.map((g,F)=>hr(g,F)),be&&e.jsxs("button",{type:"button",className:`w-full flex items-center gap-[var(--Spacing--Spacing-lg)] ${H.option} text-primary transition-colors hover:bg-[var(--Colors--Background--bg-primary_hover)] cursor-pointer`,style:{...H.optionStyle,...H.textStyle},onClick:Je,children:[e.jsx(Tr,{size:H.icon,className:"flex-shrink-0"}),e.jsx("span",{children:_.replace("{query}",q.trim())})]})]}),(G||b&&N)&&e.jsxs("div",{className:"border-t border-border",children:[b&&N&&e.jsxs("div",{className:"px-3 py-2 text-muted-foreground",style:{fontFamily:"var(--font-label)",fontSize:"var(--text-label)",fontWeight:"var(--weight-label)"},children:[Array.isArray(D)?D.length:0," / ",N," selected"]}),G&&e.jsx("div",{className:"px-3 py-2",children:G})]})]}),document.body),(n||i||d)&&e.jsxs("div",{className:"mt-1.5 flex items-center gap-1",children:[je==="error"&&e.jsx($e,{size:12,className:"text-destructive flex-shrink-0"}),e.jsx("span",{className:`${je==="error"?"text-destructive":je==="success"?"text-chart-2":"text-muted-foreground"}`,style:{fontFamily:"var(--font-label)",fontSize:"var(--text-label)",fontWeight:"var(--weight-label)"},children:i||d||n})]})]})});Bt.displayName="Dropdown";const Oo={fontFamily:"var(--font-label)",fontSize:"var(--text-label)",fontWeight:"var(--weight-label)"},Ht={fontFamily:"var(--font-button)",fontSize:"var(--text-button)",fontWeight:"var(--weight-button)"};function Uo({icon:t,title:r,description:a,action:o,secondaryAction:s,size:l="md"}){const n=l==="sm"?"w-10 h-10":l==="lg"?"w-16 h-16":"w-12 h-12",i=l==="sm"?"py-6 px-4":l==="lg"?"py-14 px-8":"py-10 px-6";return e.jsxs("div",{className:`flex flex-col items-center text-center ${i}`,children:[t&&e.jsx("div",{className:`${n} rounded-full bg-muted flex items-center justify-center mb-4`,children:e.jsx("span",{className:"text-muted-foreground",children:t})}),e.jsx("h4",{className:"text-foreground",children:r}),a&&e.jsx("p",{className:"text-muted-foreground mt-1.5 max-w-sm",style:Oo,children:a}),(o||s)&&e.jsxs("div",{className:"flex items-center gap-3 mt-5",children:[o&&e.jsxs("button",{onClick:o.onClick,className:"inline-flex items-center gap-2 px-4 py-2 rounded-[var(--radius-md)] bg-primary text-primary-foreground hover:bg-primary/90 transition-colors cursor-pointer",style:Ht,children:[o.icon,o.label]}),s&&e.jsx("button",{onClick:s.onClick,className:"inline-flex items-center gap-2 px-4 py-2 rounded-[var(--radius-md)] border border-border text-foreground hover:bg-accent transition-colors cursor-pointer",style:Ht,children:s.label})]})]})}const Go={fontFamily:"var(--font-label)",fontSize:"var(--text-label)",fontWeight:"var(--weight-label)"},_e={fontFamily:"var(--font-label)",fontSize:"var(--text-label)",fontWeight:"var(--weight-button)"},Yt={fontFamily:"var(--font-button)",fontSize:"var(--text-button)",fontWeight:"var(--weight-label)"},Ko={fontFamily:"var(--font-button)",fontSize:"var(--text-button)",fontWeight:"var(--weight-button)"};function qt(t){return t<1024?t+" B":t<1024*1024?(t/1024).toFixed(1)+" KB":(t/(1024*1024)).toFixed(1)+" MB"}function Xo(t){return t.startsWith("image/")?e.jsx(jr,{size:16,className:"text-chart-2"}):t.startsWith("video/")?e.jsx(Mr,{size:16,className:"text-chart-5"}):t.includes("pdf")||t.includes("document")?e.jsx(Fr,{size:16,className:"text-destructive"}):e.jsx(it,{size:16,className:"text-muted-foreground"})}function Ot({files:t,onRemove:r}){return e.jsx("div",{className:"space-y-2",children:t.map(a=>e.jsxs("div",{className:"flex items-center gap-3 px-3 py-2 rounded-[var(--radius-md)] border border-border bg-card",children:[Xo(a.type),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("p",{className:"text-foreground truncate",style:Go,children:a.name}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"text-muted-foreground",style:Yt,children:qt(a.size)}),a.status==="uploading"&&e.jsx("div",{className:"flex-1 h-1 bg-muted rounded-full overflow-hidden",children:e.jsx("div",{className:"h-full bg-primary rounded-full transition-all",style:{width:`${a.progress}%`}})}),a.status==="done"&&e.jsx(te,{size:12,className:"text-chart-2"})]})]}),e.jsx("button",{onClick:()=>r(a.id),className:"text-muted-foreground hover:text-destructive cursor-pointer",children:e.jsx(J,{size:14})})]},a.id))})}function Zo({accept:t,maxSize:r,multiple:a,disabled:o,variant:s="dropzone",label:l,description:n}){const[i,d]=c.useState([]),[h,f]=c.useState(!1),p=c.useRef(null),v=y=>{if(!y)return;const S=Array.from(y).map(b=>({id:Math.random().toString(36).slice(2),name:b.name,size:b.size,type:b.type,progress:0,status:"uploading"}));d(b=>[...b,...S]),S.forEach(b=>{let N=0;const j=setInterval(()=>{N+=Math.random()*30+10,N>=100&&(N=100,clearInterval(j)),d(M=>M.map(w=>w.id===b.id?{...w,progress:Math.min(N,100),status:N>=100?"done":"uploading"}:w))},300)})},u=y=>d(S=>S.filter(b=>b.id!==y));return s==="button"?e.jsxs("div",{className:"space-y-3",children:[l&&e.jsx("label",{className:"block text-foreground",style:_e,children:l}),e.jsxs("button",{onClick:()=>{var y;return(y=p.current)==null?void 0:y.click()},disabled:o,className:`inline-flex items-center gap-2 px-4 py-2 rounded-[var(--radius-md)] border border-border bg-background text-foreground hover:bg-accent transition-colors cursor-pointer ${o?"opacity-50 pointer-events-none":""}`,style:Ko,children:[e.jsx(Ie,{size:14})," Choose File",a?"s":""]}),e.jsx("input",{ref:p,type:"file",className:"hidden",accept:t,multiple:a,onChange:y=>v(y.target.files)}),i.length>0&&e.jsx(Ot,{files:i,onRemove:u})]}):s==="avatar"?e.jsxs("div",{className:"space-y-2",children:[l&&e.jsx("label",{className:"block text-foreground",style:_e,children:l}),e.jsx("div",{onClick:()=>{var y;return!o&&((y=p.current)==null?void 0:y.click())},className:`w-24 h-24 rounded-full border-2 border-dashed flex items-center justify-center cursor-pointer transition-colors
337
- ${o?"opacity-50 pointer-events-none":""} ${h?"border-primary bg-primary/5":"border-border hover:border-primary/40"}`,children:i.length>0&&i[i.length-1].status==="done"?e.jsx(te,{size:24,className:"text-chart-2"}):e.jsx(Ie,{size:20,className:"text-muted-foreground"})}),e.jsx("input",{ref:p,type:"file",className:"hidden",accept:t||"image/*",onChange:y=>v(y.target.files)})]}):e.jsxs("div",{className:"space-y-3",children:[l&&e.jsx("label",{className:"block text-foreground",style:_e,children:l}),e.jsxs("div",{onDragOver:y=>{y.preventDefault(),f(!0)},onDragLeave:()=>f(!1),onDrop:y=>{y.preventDefault(),f(!1),v(y.dataTransfer.files)},onClick:()=>{var y;return!o&&((y=p.current)==null?void 0:y.click())},className:`relative flex flex-col items-center justify-center gap-2 px-6 py-10 rounded-[var(--radius-lg)] border-2 border-dashed transition-all cursor-pointer
332
+ ${c?"opacity-70 cursor-wait":""}
333
+ ${qo[Ae]}
334
+ `,style:Y.textStyle,children:[c?e.jsx(ve,{size:Y.icon,className:"animate-spin text-muted-foreground"}):null,e.jsx("span",{className:`flex-1 text-left truncate ${Qe?"text-foreground":"text-muted-foreground"}`,children:Qe?b?Oa():ue[0]:s}),w&&Qe&&!v&&e.jsx(J,{size:Y.icon,className:"flex-shrink-0 text-muted-foreground hover:text-foreground cursor-pointer transition-colors",onClick:Pe}),e.jsx(we,{size:Y.icon,className:`flex-shrink-0 text-muted-foreground transition-transform duration-200 ${K?"rotate-180":""}`})]}),K&&De.createPortal(e.jsxs("div",{ref:xe,role:"listbox",className:"fixed z-[9999] bg-popover border border-border rounded-[var(--radius)] shadow-elevation-sm overflow-hidden",style:{top:ce.top,left:ce.left,width:ce.width||"auto"},children:[S&&e.jsx("div",{className:"p-2 border-b border-border",children:e.jsxs("div",{className:"relative",children:[e.jsx($e,{size:14,className:"absolute left-2.5 top-1/2 -translate-y-1/2 text-muted-foreground"}),e.jsx("input",{ref:Me,type:"text",value:U,onChange:g=>Ze(g.target.value),placeholder:"Search\\u2026",className:"w-full pl-8 pr-3 py-1.5 bg-background border border-border rounded-[var(--radius-sm)] outline-none placeholder:text-muted-foreground focus:border-ring focus:ring-1 focus:ring-ring/20 transition-colors",style:{fontFamily:"var(--font-label)",fontSize:"var(--text-label)",fontWeight:"var(--weight-label)"},onKeyDown:fr})]})}),b&&L&&R.length>0&&e.jsxs("button",{type:"button",className:`w-full flex items-center gap-[var(--Spacing--Spacing-lg)] ${Y.option} border-b border-border transition-colors hover:bg-[var(--Colors--Background--bg-primary_hover)] cursor-pointer`,style:{...Y.optionStyle,...Y.textStyle},onClick:Le,children:[e.jsxs("span",{className:`flex-shrink-0 w-4 h-4 rounded-[var(--radius-sm)] border flex items-center justify-center transition-colors
335
+ ${q?"bg-primary border-primary":Ce?"bg-primary/50 border-primary":"border-border"}
336
+ `,children:[q&&e.jsx(ne,{size:10,className:"text-primary-foreground"}),Ce&&!q&&e.jsx("span",{className:"w-2 h-0.5 bg-primary-foreground rounded-full"})]}),e.jsx("span",{className:"text-foreground",children:q?"Deselect All":"Select All"}),e.jsxs("span",{className:"ml-auto text-muted-foreground",style:{fontFamily:"var(--font-button)",fontSize:"var(--text-button)",fontWeight:"var(--weight-label)"},children:[Array.isArray(I)?I.length:0,"/",R.filter(g=>!g.disabled).length]})]}),e.jsxs("div",{className:"max-h-60 overflow-y-auto p-1",children:[O?e.jsxs("div",{className:"flex items-center justify-center py-6 gap-2 text-muted-foreground",children:[e.jsx(ve,{size:16,className:"animate-spin"}),e.jsx("span",{style:{fontFamily:"var(--font-label)",fontSize:"var(--text-label)"},children:"Searching\\u2026"})]}):R.length===0&&!be?H?e.jsx("div",{className:"py-4 px-3",children:H}):e.jsxs("div",{className:"text-center py-6 text-muted-foreground flex flex-col items-center gap-2",children:[e.jsx(Ar,{size:24,className:"opacity-40"}),e.jsx("span",{style:{fontFamily:"var(--font-label)",fontSize:"var(--text-label)"},children:"No options found"})]}):A&&Z?Object.entries(Z).map(([g,W])=>e.jsxs("div",{children:[e.jsx("div",{className:"px-3 py-1.5 uppercase tracking-wider text-muted-foreground",style:{fontFamily:"var(--font-button)",fontSize:"var(--text-button)",fontWeight:"var(--weight-button)"},children:g}),W.map(j=>{const ge=hr(j,ur);return ur++,ge})]},g)):R.map((g,W)=>hr(g,W)),be&&e.jsxs("button",{type:"button",className:`w-full flex items-center gap-[var(--Spacing--Spacing-lg)] ${Y.option} text-primary transition-colors hover:bg-[var(--Colors--Background--bg-primary_hover)] cursor-pointer`,style:{...Y.optionStyle,...Y.textStyle},onClick:Je,children:[e.jsx(Tr,{size:Y.icon,className:"flex-shrink-0"}),e.jsx("span",{children:F.replace("{query}",U.trim())})]})]}),(k||b&&m)&&e.jsxs("div",{className:"border-t border-border",children:[b&&m&&e.jsxs("div",{className:"px-3 py-2 text-muted-foreground",style:{fontFamily:"var(--font-label)",fontSize:"var(--text-label)",fontWeight:"var(--weight-label)"},children:[Array.isArray(I)?I.length:0," / ",m," selected"]}),k&&e.jsx("div",{className:"px-3 py-2",children:k})]})]}),document.body),(n||i||d)&&e.jsxs("div",{className:"mt-1.5 flex items-center gap-1",children:[Ae==="error"&&e.jsx(Se,{size:12,className:"text-destructive flex-shrink-0"}),e.jsx("span",{className:`${Ae==="error"?"text-destructive":Ae==="success"?"text-chart-2":"text-muted-foreground"}`,style:{fontFamily:"var(--font-label)",fontSize:"var(--text-label)",fontWeight:"var(--weight-label)"},children:i||d||n})]})]})});Bt.displayName="Dropdown";const Oo={fontFamily:"var(--font-label)",fontSize:"var(--text-label)",fontWeight:"var(--weight-label)"},Ht={fontFamily:"var(--font-button)",fontSize:"var(--text-button)",fontWeight:"var(--weight-button)"};function Uo({icon:t,title:r,description:a,action:o,secondaryAction:s,size:l="md"}){const n=l==="sm"?"w-10 h-10":l==="lg"?"w-16 h-16":"w-12 h-12",i=l==="sm"?"py-6 px-4":l==="lg"?"py-14 px-8":"py-10 px-6";return e.jsxs("div",{className:`flex flex-col items-center text-center ${i}`,children:[t&&e.jsx("div",{className:`${n} rounded-full bg-muted flex items-center justify-center mb-4`,children:e.jsx("span",{className:"text-muted-foreground",children:t})}),e.jsx("h4",{className:"text-foreground",children:r}),a&&e.jsx("p",{className:"text-muted-foreground mt-1.5 max-w-sm",style:Oo,children:a}),(o||s)&&e.jsxs("div",{className:"flex items-center gap-3 mt-5",children:[o&&e.jsxs("button",{onClick:o.onClick,className:"inline-flex items-center gap-2 px-4 py-2 rounded-[var(--radius-md)] bg-primary text-primary-foreground hover:bg-primary/90 transition-colors cursor-pointer",style:Ht,children:[o.icon,o.label]}),s&&e.jsx("button",{onClick:s.onClick,className:"inline-flex items-center gap-2 px-4 py-2 rounded-[var(--radius-md)] border border-border text-foreground hover:bg-accent transition-colors cursor-pointer",style:Ht,children:s.label})]})]})}const Go={fontFamily:"var(--font-label)",fontSize:"var(--text-label)",fontWeight:"var(--weight-label)"},_e={fontFamily:"var(--font-label)",fontSize:"var(--text-label)",fontWeight:"var(--weight-button)"},Yt={fontFamily:"var(--font-button)",fontSize:"var(--text-button)",fontWeight:"var(--weight-label)"},Ko={fontFamily:"var(--font-button)",fontSize:"var(--text-button)",fontWeight:"var(--weight-button)"};function qt(t){return t<1024?t+" B":t<1024*1024?(t/1024).toFixed(1)+" KB":(t/(1024*1024)).toFixed(1)+" MB"}function Xo(t){return t.startsWith("image/")?e.jsx(jr,{size:16,className:"text-chart-2"}):t.startsWith("video/")?e.jsx(Wr,{size:16,className:"text-chart-5"}):t.includes("pdf")||t.includes("document")?e.jsx(Fr,{size:16,className:"text-destructive"}):e.jsx(it,{size:16,className:"text-muted-foreground"})}function Ot({files:t,onRemove:r}){return e.jsx("div",{className:"space-y-2",children:t.map(a=>e.jsxs("div",{className:"flex items-center gap-3 px-3 py-2 rounded-[var(--radius-md)] border border-border bg-card",children:[Xo(a.type),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("p",{className:"text-foreground truncate",style:Go,children:a.name}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"text-muted-foreground",style:Yt,children:qt(a.size)}),a.status==="uploading"&&e.jsx("div",{className:"flex-1 h-1 bg-muted rounded-full overflow-hidden",children:e.jsx("div",{className:"h-full bg-primary rounded-full transition-all",style:{width:`${a.progress}%`}})}),a.status==="done"&&e.jsx(te,{size:12,className:"text-chart-2"})]})]}),e.jsx("button",{onClick:()=>r(a.id),className:"text-muted-foreground hover:text-destructive cursor-pointer",children:e.jsx(J,{size:14})})]},a.id))})}function Zo({accept:t,maxSize:r,multiple:a,disabled:o,variant:s="dropzone",label:l,description:n,value:i,onChange:d,onUpload:h,onRemove:u}){const[p,v]=f.useState([]),[c,S]=f.useState(!1),w=f.useRef(null),b=i??p,m=N=>{if(!N)return;const $=Array.from(N);if(d&&d($),i===void 0){const C=$.map(L=>({id:Math.random().toString(36).slice(2),name:L.name,size:L.size,type:L.type,progress:0,status:"uploading"}));v(L=>[...L,...C]),C.forEach(L=>{let D=0;const B=setInterval(()=>{D+=Math.random()*30+10,D>=100&&(D=100,clearInterval(B)),v(z=>z.map(F=>F.id===L.id?{...F,progress:Math.min(D,100),status:D>=100?"done":"uploading"}:F)),D>=100&&h&&h({...L,progress:100,status:"done"})},300)})}},A=N=>{u&&u(N),i===void 0&&v($=>$.filter(C=>C.id!==N))};return s==="button"?e.jsxs("div",{className:"space-y-3",children:[l&&e.jsx("label",{className:"block text-foreground",style:_e,children:l}),e.jsxs("button",{onClick:()=>{var N;return(N=w.current)==null?void 0:N.click()},disabled:o,className:`inline-flex items-center gap-2 px-4 py-2 rounded-[var(--radius-md)] border border-border bg-background text-foreground hover:bg-accent transition-colors cursor-pointer ${o?"opacity-50 pointer-events-none":""}`,style:Ko,children:[e.jsx(Be,{size:14})," Choose File",a?"s":""]}),e.jsx("input",{ref:w,type:"file",className:"hidden",accept:t,multiple:a,onChange:N=>m(N.target.files)}),b.length>0&&e.jsx(Ot,{files:b,onRemove:A})]}):s==="avatar"?e.jsxs("div",{className:"space-y-2",children:[l&&e.jsx("label",{className:"block text-foreground",style:_e,children:l}),e.jsx("div",{onClick:()=>{var N;return!o&&((N=w.current)==null?void 0:N.click())},className:`w-24 h-24 rounded-full border-2 border-dashed flex items-center justify-center cursor-pointer transition-colors
337
+ ${o?"opacity-50 pointer-events-none":""} ${c?"border-primary bg-primary/5":"border-border hover:border-primary/40"}`,children:b.length>0&&b[b.length-1].status==="done"?e.jsx(te,{size:24,className:"text-chart-2"}):e.jsx(Be,{size:20,className:"text-muted-foreground"})}),e.jsx("input",{ref:w,type:"file",className:"hidden",accept:t||"image/*",onChange:N=>m(N.target.files)})]}):e.jsxs("div",{className:"space-y-3",children:[l&&e.jsx("label",{className:"block text-foreground",style:_e,children:l}),e.jsxs("div",{onDragOver:N=>{N.preventDefault(),S(!0)},onDragLeave:()=>S(!1),onDrop:N=>{N.preventDefault(),S(!1),m(N.dataTransfer.files)},onClick:()=>{var N;return!o&&((N=w.current)==null?void 0:N.click())},className:`relative flex flex-col items-center justify-center gap-2 px-6 py-10 rounded-[var(--radius-lg)] border-2 border-dashed transition-all cursor-pointer
338
338
  ${o?"opacity-50 pointer-events-none":""}
339
- ${h?"border-primary bg-primary/5":"border-border hover:border-primary/40 hover:bg-accent/30"}`,children:[e.jsx("div",{className:"w-12 h-12 rounded-full bg-primary/10 flex items-center justify-center",children:e.jsx(Ie,{size:20,className:"text-primary"})}),e.jsxs("div",{className:"text-center",children:[e.jsxs("p",{className:"text-foreground",style:_e,children:[e.jsx("span",{className:"text-primary",children:"Click to upload"})," or drag and drop"]}),e.jsxs("p",{className:"text-muted-foreground",style:Yt,children:[n||(t?`Accepted: ${t}`:"Any file type"),r&&` · Max ${qt(r)}`]})]})]}),e.jsx("input",{ref:p,type:"file",className:"hidden",accept:t,multiple:a,onChange:y=>v(y.target.files)}),i.length>0&&e.jsx(Ot,{files:i,onRemove:u})]})}const Jo={fontFamily:"var(--font-label)",fontSize:"var(--text-label)",fontWeight:"var(--weight-label)"},Po={fontFamily:"var(--font-button)",fontSize:"var(--text-button)",fontWeight:"var(--weight-button)"};function Qo({images:t,initialIndex:r=0}){const[a,o]=c.useState(!1),[s,l]=c.useState(r),[n,i]=c.useState(1),[d,h]=c.useState(0),f=t[s],p=()=>{l(b=>(b-1+t.length)%t.length),i(1),h(0)},v=()=>{l(b=>(b+1)%t.length),i(1),h(0)},u=()=>i(b=>Math.min(b+.25,3)),y=()=>i(b=>Math.max(b-.25,.5)),S=()=>h(b=>(b+90)%360);return e.jsxs("div",{children:[e.jsx("div",{className:"flex flex-wrap gap-2",children:t.map((b,N)=>e.jsx("button",{onClick:()=>{l(N),o(!0),i(1),h(0)},className:`rounded-[var(--radius-md)] overflow-hidden border-2 transition-all cursor-pointer hover:opacity-80
340
- ${s===N&&a?"border-primary":"border-border"}`,children:e.jsx("div",{className:"w-20 h-20 bg-muted flex items-center justify-center overflow-hidden",children:e.jsx("img",{src:b.thumbnail||b.src,alt:b.alt,className:"w-full h-full object-cover",loading:"lazy"})})},N))}),a&&e.jsxs("div",{className:"fixed inset-0 z-[60] bg-foreground/80 flex flex-col",children:[e.jsxs("div",{className:"flex items-center justify-between px-4 py-3 bg-foreground/20",children:[e.jsxs("span",{className:"text-white",style:Jo,children:[f.alt," (",s+1,"/",t.length,")"]}),e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx("button",{onClick:y,className:"w-8 h-8 flex items-center justify-center rounded-[var(--radius-md)] text-white/70 hover:text-white hover:bg-white/10 cursor-pointer",children:e.jsx(qr,{size:16})}),e.jsxs("span",{className:"text-white/70 px-2",style:Po,children:[Math.round(n*100),"%"]}),e.jsx("button",{onClick:u,className:"w-8 h-8 flex items-center justify-center rounded-[var(--radius-md)] text-white/70 hover:text-white hover:bg-white/10 cursor-pointer",children:e.jsx(Yr,{size:16})}),e.jsx("button",{onClick:S,className:"w-8 h-8 flex items-center justify-center rounded-[var(--radius-md)] text-white/70 hover:text-white hover:bg-white/10 cursor-pointer",children:e.jsx(Er,{size:16})}),e.jsx("div",{className:"w-px h-5 bg-white/20 mx-1"}),e.jsx("button",{onClick:()=>{o(!1),i(1),h(0)},className:"w-8 h-8 flex items-center justify-center rounded-[var(--radius-md)] text-white/70 hover:text-white hover:bg-white/10 cursor-pointer",children:e.jsx(J,{size:16})})]})]}),e.jsxs("div",{className:"flex-1 flex items-center justify-center relative overflow-hidden",onClick:b=>{b.target===b.currentTarget&&(o(!1),i(1),h(0))},children:[t.length>1&&e.jsx("button",{onClick:p,className:"absolute left-4 w-10 h-10 rounded-full bg-foreground/30 text-white flex items-center justify-center hover:bg-foreground/50 cursor-pointer z-10",children:e.jsx(pe,{size:20})}),e.jsx("img",{src:f.src,alt:f.alt,className:"max-w-[90%] max-h-[80vh] object-contain transition-transform",style:{transform:`scale(${n}) rotate(${d}deg)`}}),t.length>1&&e.jsx("button",{onClick:v,className:"absolute right-4 w-10 h-10 rounded-full bg-foreground/30 text-white flex items-center justify-center hover:bg-foreground/50 cursor-pointer z-10",children:e.jsx(ee,{size:20})})]}),t.length>1&&e.jsx("div",{className:"flex items-center justify-center gap-2 py-3 bg-foreground/20",children:t.map((b,N)=>e.jsx("button",{onClick:()=>{l(N),i(1),h(0)},className:`w-12 h-12 rounded-[var(--radius-sm)] overflow-hidden border-2 cursor-pointer transition-all
341
- ${N===s?"border-white":"border-transparent opacity-50 hover:opacity-80"}`,children:e.jsx("img",{src:b.thumbnail||b.src,alt:b.alt,className:"w-full h-full object-cover"})},N))})]})]})}const Vo={fontFamily:"var(--font-label)",fontSize:"var(--text-label)",fontWeight:"var(--weight-label)"},Ro={fontFamily:"var(--font-button)",fontSize:"var(--text-button)",fontWeight:"var(--weight-label)"},ea={fontFamily:"var(--font-button)",fontSize:"var(--text-button)",fontWeight:"var(--weight-button)"};function ta({items:t,parentRect:r}){const a=c.useRef(null),[o,s]=c.useState({top:r.top,left:r.right+4});return c.useEffect(()=>{if(!a.current)return;const n=a.current.getBoundingClientRect();let i=r.top,d=r.right+4;d+n.width>window.innerWidth-8&&(d=r.left-n.width-4),i+n.height>window.innerHeight-8&&(i=window.innerHeight-n.height-8),s({top:i,left:d})},[r]),Ae.createPortal(e.jsx("div",{ref:a,className:"fixed z-[9999] min-w-[200px] rounded-[var(--radius)] border border-border bg-popover shadow-md py-1",style:{top:o.top,left:o.left},children:t.map((l,n)=>e.jsx(Ut,{item:l},n))}),document.body)}function Ut({item:t}){const[r,a]=c.useState(!1),o=c.useRef(null),s=c.useRef(null);if(t.divider)return e.jsx("div",{className:"my-1 border-t border-border"});if(t.label)return e.jsx("div",{className:"px-3 py-1.5 text-muted-foreground uppercase tracking-wider",style:ea,children:t.label});const l=t.children&&t.children.length>0,n=()=>{s.current&&clearTimeout(s.current),l&&a(!0)},i=()=>{s.current=setTimeout(()=>a(!1),150)};return e.jsxs("div",{ref:o,className:"relative",onMouseEnter:n,onMouseLeave:i,children:[e.jsxs("button",{onClick:()=>{var d;l||(d=t.onClick)==null||d.call(t)},disabled:t.disabled,className:`w-full flex items-center text-left rounded-[var(--radius-sm)] transition-colors cursor-pointer ${t.destructive?"text-destructive hover:bg-destructive/10":t.disabled?"text-muted-foreground opacity-50 cursor-not-allowed":"text-popover-foreground hover:bg-[var(--Colors--Background--bg-primary_hover)]"}`,style:{padding:"var(--Spacing--Spacing-md) var(--Spacing--Spacing-2xl)",gap:"var(--Spacing--Spacing-lg)",...Vo},children:[t.icon&&e.jsx("span",{className:"flex-shrink-0",children:t.icon}),e.jsx("span",{className:"flex-1",children:t.text}),t.shortcut&&e.jsx("span",{className:"text-muted-foreground ml-4",style:Ro,children:t.shortcut}),l&&e.jsx(ee,{size:14,className:"text-muted-foreground"})]}),l&&r&&o.current&&e.jsx(ta,{items:t.children,parentRect:o.current.getBoundingClientRect()})]})}function Gt({items:t,open:r,onClose:a,triggerRef:o,className:s=""}){const l=c.useRef(null),[n,i]=c.useState({top:0,left:0});return c.useEffect(()=>{if(!r||!o.current)return;const d=o.current.getBoundingClientRect();let h=d.bottom+4,f=d.left;requestAnimationFrame(()=>{if(!l.current)return;const p=l.current.getBoundingClientRect();f+p.width>window.innerWidth-8&&(f=d.right-p.width),h+p.height>window.innerHeight-8&&(h=d.top-p.height-4),i({top:h,left:f})}),i({top:h,left:f})},[r,o]),c.useEffect(()=>{if(!r)return;const d=h=>{var f,p;(f=o.current)!=null&&f.contains(h.target)||(p=l.current)!=null&&p.contains(h.target)||a()};return document.addEventListener("mousedown",d),()=>document.removeEventListener("mousedown",d)},[r,a,o]),r?Ae.createPortal(e.jsxs("div",{ref:l,className:`fixed z-[9999] min-w-[200px] rounded-[var(--radius)] border border-border bg-popover shadow-md py-1 animate-[fadeIn_0.15s_ease] ${s}`,style:{top:n.top,left:n.left},children:[t.map((d,h)=>e.jsx(Ut,{item:d},h)),e.jsx("style",{children:"@keyframes fadeIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: translateY(0); } }"})]}),document.body):null}Gt.displayName="Menu";const Kt={fontFamily:"var(--font-label)",fontSize:"var(--text-label)",fontWeight:"var(--weight-label)"},Ye={fontFamily:"var(--font-label)",fontSize:"var(--text-label)",fontWeight:"var(--weight-button)"},ra={fontFamily:"var(--font-button)",fontSize:"var(--text-button)",fontWeight:"var(--weight-label)"},qe={fontFamily:"var(--font-button)",fontSize:"var(--text-button)",fontWeight:"var(--weight-button)"};function Xt({type:t="info",title:r,message:a,closable:o=!0,onClose:s,action:l,avatar:n,time:i,read:d}){const h={info:e.jsx(dt,{size:16,className:"text-primary"}),success:e.jsx(te,{size:16,className:"text-chart-2"}),warning:e.jsx(ct,{size:16,className:"text-chart-5"}),error:e.jsx(at,{size:16,className:"text-destructive"})},f={info:"border-l-primary",success:"border-l-chart-2",warning:"border-l-chart-5",error:"border-l-destructive"};return e.jsxs("div",{className:`flex gap-3 px-4 py-3 rounded-[var(--radius-md)] border border-border bg-card border-l-[3px] ${f[t]} ${d===!1?"bg-primary/5":""}`,children:[n?e.jsx("div",{className:"w-8 h-8 rounded-full bg-muted flex-shrink-0 flex items-center justify-center overflow-hidden",style:Ye,children:e.jsx("span",{className:"text-primary",children:n.slice(0,2).toUpperCase()})}):e.jsx("span",{className:"flex-shrink-0 mt-0.5",children:h[t]}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsxs("div",{className:"flex items-start justify-between gap-2",children:[e.jsx("span",{className:"text-foreground",style:Ye,children:r}),e.jsxs("div",{className:"flex items-center gap-1 flex-shrink-0",children:[i&&e.jsx("span",{className:"text-muted-foreground",style:ra,children:i}),d===!1&&e.jsx("span",{className:"w-2 h-2 rounded-full bg-primary"}),o&&s&&e.jsx("button",{onClick:s,className:"text-muted-foreground hover:text-foreground cursor-pointer",children:e.jsx(J,{size:14})})]})]}),a&&e.jsx("p",{className:"text-muted-foreground mt-0.5",style:Kt,children:a}),l&&e.jsxs("button",{onClick:l.onClick,className:"inline-flex items-center gap-1 text-primary mt-2 hover:underline cursor-pointer",style:qe,children:[l.label," ",e.jsx(kr,{size:12})]})]})]})}function oa({items:t}){const[r,a]=c.useState(t),o=r.filter(s=>!s.read).length;return e.jsxs("div",{className:"max-w-md rounded-[var(--radius-lg)] border border-border bg-card overflow-hidden",children:[e.jsxs("div",{className:"px-4 py-3 border-b border-border flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(ot,{size:16,className:"text-foreground"}),e.jsx("span",{className:"text-foreground",style:Ye,children:"Notifications"}),o>0&&e.jsx("span",{className:"px-1.5 py-0.5 rounded-full bg-primary text-primary-foreground",style:qe,children:o})]}),o>0&&e.jsx("button",{onClick:()=>a(s=>s.map(l=>({...l,read:!0}))),className:"text-primary cursor-pointer",style:qe,children:"Mark all read"})]}),e.jsx("div",{className:"divide-y divide-border max-h-[360px] overflow-y-auto",children:r.map(s=>e.jsx("div",{className:`px-3 py-2 ${s.read?"":"bg-primary/5"}`,children:e.jsx(Xt,{type:s.type,title:s.title,message:s.message,time:s.time,read:s.read,closable:!1})},s.id))}),r.length===0&&e.jsxs("div",{className:"py-10 text-center text-muted-foreground",children:[e.jsx(mr,{size:24,className:"mx-auto mb-2 opacity-40"}),e.jsx("span",{style:Kt,children:"No notifications"})]})]})}const aa={fontFamily:"var(--font-label)",fontSize:"var(--text-label)",fontWeight:"var(--weight-button)"};function sa({trigger:t,children:r,placement:a="bottom",title:o,open:s,onOpenChange:l}){const[n,i]=c.useState(!1),d=s!==void 0?s:n,h=v=>{l==null||l(v),s===void 0&&i(v)},f=c.useRef(null);c.useEffect(()=>{if(!d)return;const v=u=>{f.current&&!f.current.contains(u.target)&&h(!1)};return document.addEventListener("mousedown",v),()=>document.removeEventListener("mousedown",v)},[d]);const p={top:"bottom-full left-1/2 -translate-x-1/2 mb-2",bottom:"top-full left-1/2 -translate-x-1/2 mt-2",left:"right-full top-1/2 -translate-y-1/2 mr-2",right:"left-full top-1/2 -translate-y-1/2 ml-2"};return e.jsxs("div",{className:"relative inline-block",ref:f,children:[e.jsx("div",{onClick:()=>h(!d),className:"cursor-pointer",children:t}),d&&e.jsx("div",{className:`absolute z-50 ${p[a]} w-max max-w-xs`,children:e.jsxs("div",{className:"rounded-[var(--radius-lg)] border border-border bg-card shadow-lg overflow-hidden",children:[o&&e.jsxs("div",{className:"px-4 py-2.5 border-b border-border flex items-center justify-between",children:[e.jsx("span",{className:"text-foreground",style:aa,children:o}),e.jsx("button",{onClick:()=>h(!1),className:"text-muted-foreground hover:text-foreground cursor-pointer",children:e.jsx(J,{size:14})})]}),e.jsx("div",{className:"px-4 py-3",children:r})]})})]})}const na={fontFamily:"var(--font-label)",fontSize:"var(--text-label)"},la={fontFamily:"var(--font-button)",fontSize:"var(--text-button)",fontWeight:"var(--weight-label)"};function Zt({value:t,max:r=100,size:a="md",color:o,label:s,showValue:l,indeterminate:n,className:i=""}){const d={sm:"h-1.5",md:"h-2.5",lg:"h-4"},h=n?0:Math.min(100,Math.max(0,(t??0)/r*100));return e.jsxs("div",{className:`w-full ${i}`,children:[(s||l)&&e.jsxs("div",{className:"flex items-center justify-between mb-1.5",children:[s&&e.jsx("span",{className:"text-foreground",style:na,children:s}),l&&!n&&e.jsxs("span",{className:"text-muted-foreground",style:la,children:[Math.round(h),"%"]})]}),e.jsx("div",{className:`w-full ${d[a]} rounded-full bg-muted overflow-hidden`,children:n?e.jsx("div",{className:"h-full w-1/3 rounded-full animate-[indeterminate_1.5s_infinite_ease-in-out]",style:{backgroundColor:o??"var(--primary)"}}):e.jsx("div",{className:"h-full rounded-full transition-all duration-500",style:{width:`${h}%`,backgroundColor:o??"var(--primary)"}})}),e.jsx("style",{children:"@keyframes indeterminate { 0% { transform: translateX(-100%); } 100% { transform: translateX(400%); } }"})]})}Zt.displayName="ProgressBar";const ia={fontFamily:"var(--font-label)",fontSize:"var(--text-label)",fontWeight:"var(--weight-label)"},da={fontFamily:"var(--font-label)",fontSize:"var(--text-label)",fontWeight:"var(--weight-button)"};function ca({value:t=0,onChange:r,max:a=5,size:o="md",disabled:s,readOnly:l,icon:n="star",showValue:i,label:d}){const[h,f]=c.useState(0),p=o==="sm"?16:o==="lg"?28:20,v=o==="sm"?"gap-0.5":o==="lg"?"gap-1.5":"gap-1",u=n==="heart"?Lr:n==="thumb"?Hr:Br,y=n==="heart"?"text-destructive":"text-chart-5",S=Array.from({length:a},(b,N)=>N+1);return e.jsxs("div",{className:`inline-flex items-center ${v} ${s?"opacity-50 pointer-events-none":""}`,children:[d&&e.jsx("span",{className:"text-foreground mr-2",style:ia,children:d}),S.map(b=>{const N=b<=(h||t);return e.jsx("button",{type:"button",className:`transition-transform ${l||s?"":"cursor-pointer hover:scale-110"} ${N?y:"text-muted-foreground/40"}`,onMouseEnter:()=>!l&&!s&&f(b),onMouseLeave:()=>f(0),onClick:()=>!l&&!s&&(r==null?void 0:r(b===t?0:b)),disabled:s||l,children:e.jsx(u,{size:p,fill:N?"currentColor":"none"})},b)}),i&&e.jsxs("span",{className:"text-foreground ml-1",style:da,children:[t,"/",a]})]})}const fa={fontFamily:"var(--font-label)",fontSize:"var(--text-label)",fontWeight:"var(--weight-button)"},ha={fontFamily:"var(--font-label)",fontSize:"var(--text-label)"},Oe={fontFamily:"var(--font-button)",fontSize:"var(--text-button)",fontWeight:"var(--weight-button)"},ua={fontFamily:"var(--font-button)",fontSize:"var(--text-button)",fontWeight:"var(--weight-label)"};function Jt({brand:t,groups:r,activeItem:a,onNavigate:o,collapsed:s=!1,onCollapsedChange:l,className:n=""}){return e.jsxs("div",{className:`bg-sidebar border-r border-sidebar-border flex flex-col flex-shrink-0 transition-all ${s?"w-16":"w-64"} ${n}`,children:[t&&e.jsxs("div",{className:"px-4 py-4 border-b border-sidebar-border flex items-center gap-2",children:[t.logo?e.jsx("img",{src:t.logo,alt:t.name,className:"w-8 h-8 rounded-[var(--radius-sm)] flex-shrink-0 object-cover"}):e.jsx("div",{className:"w-8 h-8 rounded-[var(--radius-sm)] bg-primary flex items-center justify-center text-primary-foreground flex-shrink-0",style:Oe,children:t.name.charAt(0).toUpperCase()}),!s&&e.jsx("span",{className:"text-sidebar-foreground truncate",style:fa,children:t.name})]}),e.jsx("nav",{className:"flex-1 overflow-y-auto py-3 px-2",children:r.map(i=>e.jsxs("div",{className:"mb-4",children:[!s&&e.jsx("span",{className:"px-2 mb-1.5 block text-muted-foreground uppercase tracking-wider",style:Oe,children:i.label}),e.jsx("div",{className:"space-y-0.5",children:i.items.map(d=>{const h=a===d.id;return e.jsxs("button",{onClick:()=>o==null?void 0:o(d),className:`w-full flex items-center gap-2 px-2 py-2 rounded-[var(--radius-md)] transition-colors cursor-pointer ${h?"bg-sidebar-accent text-sidebar-accent-foreground":"text-sidebar-foreground hover:bg-sidebar-accent/50"}`,style:ha,children:[e.jsx("span",{className:h?"text-sidebar-primary":"text-muted-foreground",children:d.icon}),!s&&e.jsx("span",{className:"truncate flex-1 text-left",children:d.label}),!s&&d.badge&&e.jsx("span",{className:"px-1.5 py-0.5 rounded-full bg-primary text-primary-foreground",style:{...Oe,lineHeight:"1"},children:d.badge})]},d.id)})})]},i.label))}),l&&e.jsx("div",{className:"px-3 py-3 border-t border-sidebar-border",children:e.jsx("button",{onClick:()=>l(!s),className:"w-full px-2 py-1.5 rounded-[var(--radius-md)] text-muted-foreground hover:text-foreground hover:bg-sidebar-accent/50 cursor-pointer text-left",style:ua,children:s?">":"Collapse"})})]})}Jt.displayName="Sidebar";function K({width:t,height:r,variant:a="rectangular",animate:o=!0,className:s}){const l="bg-muted",n=o?"animate-pulse":"",i=a==="circular"?"rounded-full":a==="rounded"?"rounded-[var(--radius-md)]":"rounded-[var(--radius-sm)]";return e.jsx("div",{className:`${l} ${n} ${i} ${s??""}`,style:{width:t??"100%",height:r??(a==="text"?"1em":a==="circular"?40:20)}})}function ba(){return e.jsxs("div",{className:"rounded-[var(--radius-lg)] border border-border bg-card p-4 space-y-4 w-full max-w-sm",children:[e.jsx(K,{variant:"rounded",height:160}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(K,{variant:"text",width:"60%",height:20}),e.jsx(K,{variant:"text",width:"100%",height:14}),e.jsx(K,{variant:"text",width:"80%",height:14})]}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(K,{variant:"circular",width:36,height:36}),e.jsxs("div",{className:"flex-1 space-y-1.5",children:[e.jsx(K,{variant:"text",width:"40%",height:14}),e.jsx(K,{variant:"text",width:"25%",height:12})]})]})]})}function ga(){return e.jsxs("div",{className:"rounded-[var(--radius-lg)] border border-border bg-card overflow-hidden",children:[e.jsx("div",{className:"px-4 py-3 border-b border-border bg-muted/30 flex gap-4",children:[120,160,100,80].map((t,r)=>e.jsx(K,{variant:"text",width:t,height:14},r))}),[0,1,2,3].map(t=>e.jsxs("div",{className:"px-4 py-3 border-b border-border flex items-center gap-4",children:[e.jsx(K,{variant:"circular",width:28,height:28}),e.jsx(K,{variant:"text",width:100+t*15,height:14}),e.jsx(K,{variant:"text",width:140,height:14,className:"flex-1"}),e.jsx(K,{variant:"rounded",width:60,height:22}),e.jsx(K,{variant:"text",width:80,height:14})]},t))]})}function pa(){return e.jsx("div",{className:"space-y-3 w-full max-w-md",children:[0,1,2].map(t=>e.jsxs("div",{className:"flex items-center gap-3 px-3 py-2.5 rounded-[var(--radius-md)] border border-border bg-card",children:[e.jsx(K,{variant:"circular",width:40,height:40}),e.jsxs("div",{className:"flex-1 space-y-1.5",children:[e.jsx(K,{variant:"text",width:`${60+t*10}%`,height:14}),e.jsx(K,{variant:"text",width:`${40+t*5}%`,height:12})]}),e.jsx(K,{variant:"rounded",width:50,height:24})]},t))})}const va={sm:"w-4 h-4 border-2",md:"w-8 h-8 border-[3px]",lg:"w-12 h-12 border-4",xl:"w-16 h-16 border-4"};function Pt({size:t="md",color:r,className:a=""}){return e.jsx("div",{className:`${va[t]} rounded-full border-muted animate-spin ${a}`,style:{borderTopColor:r??"var(--primary)"},role:"status","aria-label":"Loading"})}Pt.displayName="Spinner";const Ue={fontFamily:"var(--font-label)",fontSize:"var(--text-label)",fontWeight:"var(--weight-label)"},Qt={fontFamily:"var(--font-label)",fontSize:"var(--text-label)",fontWeight:"var(--weight-button)"},Vt={fontFamily:"var(--font-button)",fontSize:"var(--text-button)",fontWeight:"var(--weight-label)"},Rt={fontFamily:"var(--font-button)",fontSize:"var(--text-button)",fontWeight:"var(--weight-button)"},ya={sm:{fontFamily:"var(--font-h4)",fontSize:"var(--text-h4)",fontWeight:"var(--weight-h4)"},md:{fontFamily:"var(--font-h2)",fontSize:"var(--text-h2)",fontWeight:"var(--weight-h2)"},lg:{fontFamily:"var(--font-h1)",fontSize:"var(--text-h1)",fontWeight:"var(--weight-h1)"}};function ma({title:t,value:r,prefix:a,suffix:o,trend:s,trendLabel:l,icon:n,size:i="md",loading:d}){const h=ya[i],f=(s==null?void 0:s.direction)==="up"?"text-chart-2":(s==null?void 0:s.direction)==="down"?"text-destructive":"text-muted-foreground",p=(s==null?void 0:s.direction)==="up"?rt:(s==null?void 0:s.direction)==="down"?tt:Ee;return d?e.jsxs("div",{className:"space-y-2 animate-pulse",children:[e.jsx("div",{className:"h-3 w-20 bg-muted rounded-[var(--radius-sm)]"}),e.jsx("div",{className:"h-8 w-32 bg-muted rounded-[var(--radius-sm)]"}),e.jsx("div",{className:"h-3 w-24 bg-muted rounded-[var(--radius-sm)]"})]}):e.jsxs("div",{className:"space-y-1",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[n&&e.jsx("span",{className:"text-muted-foreground",children:n}),e.jsx("span",{className:"text-muted-foreground",style:Ue,children:t})]}),e.jsxs("div",{className:"flex items-baseline gap-1",children:[a&&e.jsx("span",{className:"text-muted-foreground",style:Qt,children:a}),e.jsx("span",{className:"text-foreground",style:h,children:typeof r=="number"?r.toLocaleString():r}),o&&e.jsx("span",{className:"text-muted-foreground",style:Ue,children:o})]}),s&&e.jsxs("div",{className:`flex items-center gap-1 ${f}`,children:[e.jsx(p,{size:14}),e.jsxs("span",{style:Rt,children:[s.value,"%"]}),l&&e.jsx("span",{className:"text-muted-foreground",style:Vt,children:l})]})]})}function xa({title:t,value:r,prefix:a,trend:o,trendLabel:s,icon:l,iconBg:n}){const i=(o==null?void 0:o.direction)==="up"?"text-chart-2":(o==null?void 0:o.direction)==="down"?"text-destructive":"text-muted-foreground",d=(o==null?void 0:o.direction)==="up"?rt:(o==null?void 0:o.direction)==="down"?tt:Ee;return e.jsx("div",{className:"rounded-[var(--radius-lg)] border border-border bg-card p-5",children:e.jsxs("div",{className:"flex items-start justify-between",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsx("span",{className:"text-muted-foreground",style:Ue,children:t}),e.jsxs("div",{className:"flex items-baseline gap-1",children:[a&&e.jsx("span",{className:"text-muted-foreground",style:Qt,children:a}),e.jsx("span",{className:"text-foreground",style:{fontFamily:"var(--font-h3)",fontSize:"var(--text-h3)",fontWeight:"var(--weight-h3)"},children:typeof r=="number"?r.toLocaleString():r})]}),o&&e.jsxs("div",{className:`flex items-center gap-1 ${i}`,children:[e.jsx(d,{size:12}),e.jsxs("span",{style:Rt,children:[o.value,"%"]}),s&&e.jsx("span",{className:"text-muted-foreground",style:Vt,children:s})]})]}),l&&e.jsx("div",{className:`w-10 h-10 rounded-[var(--radius-md)] flex items-center justify-center flex-shrink-0 ${n||"bg-primary/10 text-primary"}`,children:l})]})})}const Na={fontFamily:"var(--font-label)",fontSize:"var(--text-label)",fontWeight:"var(--weight-label)"},er={fontFamily:"var(--font-label)",fontSize:"var(--text-label)",fontWeight:"var(--weight-button)"},tr={fontFamily:"var(--font-button)",fontSize:"var(--text-button)",fontWeight:"var(--weight-label)"},rr={fontFamily:"var(--font-button)",fontSize:"var(--text-button)",fontWeight:"var(--weight-button)"};function or({steps:t,current:r,orientation:a="horizontal",onStepClick:o,className:s=""}){return a==="vertical"?e.jsx("div",{className:`flex flex-col ${s}`,children:t.map((l,n)=>{const i=n<r,d=n===r;return e.jsxs("div",{className:"flex gap-3",onClick:()=>o==null?void 0:o(n),children:[e.jsxs("div",{className:"flex flex-col items-center",children:[e.jsx("div",{className:`w-8 h-8 rounded-full flex items-center justify-center flex-shrink-0 transition-colors ${o?"cursor-pointer":""} ${i||d?"bg-primary text-primary-foreground":"bg-muted text-muted-foreground"}`,style:rr,children:i?e.jsx(ne,{size:14}):n+1}),n<t.length-1&&e.jsx("div",{className:`w-px flex-1 min-h-[24px] my-1 ${i?"bg-primary":"bg-border"}`})]}),e.jsxs("div",{className:`pb-6 ${n===t.length-1?"pb-0":""}`,children:[e.jsx("span",{className:`block ${d?"text-foreground":"text-muted-foreground"}`,style:d?er:Na,children:l.title}),l.description&&e.jsx("span",{className:"text-muted-foreground block",style:tr,children:l.description})]})]},n)})}):e.jsx("div",{className:`flex items-center ${s}`,children:t.map((l,n)=>{const i=n<r,d=n===r;return e.jsxs("div",{className:`flex items-center ${n<t.length-1?"flex-1":""}`,children:[e.jsxs("div",{className:"flex flex-col items-center gap-1",onClick:()=>o==null?void 0:o(n),children:[e.jsx("div",{className:`w-8 h-8 rounded-full flex items-center justify-center flex-shrink-0 transition-colors ${o?"cursor-pointer":""} ${i||d?"bg-primary text-primary-foreground":"bg-muted text-muted-foreground"}`,style:rr,children:i?e.jsx(ne,{size:14}):n+1}),e.jsx("span",{className:`text-center ${d?"text-foreground":"text-muted-foreground"}`,style:d?er:tr,children:l.title})]}),n<t.length-1&&e.jsx("div",{className:`flex-1 h-px mx-2 mt-[-20px] ${i?"bg-primary":"bg-border"}`})]},n)})})}or.displayName="Stepper";const wa={fontFamily:"var(--font-label)",fontSize:"var(--text-label)",fontWeight:"var(--weight-label)"},$a={fontFamily:"var(--font-button)",fontSize:"var(--text-button)",fontWeight:"var(--weight-label)"},Sa={sm:{track:"w-7 h-4",thumb:"w-3 h-3",on:"translate-x-3"},md:{track:"w-10 h-6",thumb:"w-4.5 h-4.5",on:"translate-x-4.5"},lg:{track:"w-14 h-8",thumb:"w-6.5 h-6.5",on:"translate-x-6"}},ka={primary:"bg-primary",success:"bg-chart-2",warning:"bg-chart-5",destructive:"bg-destructive"},za={sm:{w:12,h:12,on:14},md:{w:18,h:18,on:18},lg:{w:26,h:26,on:24}};function _a({checked:t,onChange:r,label:a,description:o,size:s="md",disabled:l,color:n="primary"}){const i=Sa[s],d=za[s];return e.jsxs("label",{className:`inline-flex items-start gap-3 ${l?"opacity-50 pointer-events-none":"cursor-pointer"}`,children:[e.jsx("button",{role:"switch","aria-checked":t,onClick:()=>r(!t),disabled:l,className:`${i.track} rounded-full relative flex-shrink-0 transition-colors cursor-pointer ${t?ka[n]:"bg-muted"}`,children:e.jsx("span",{className:"rounded-full bg-white shadow-sm absolute transition-transform",style:{width:d.w,height:d.h,top:"50%",transform:`translateY(-50%) translateX(${t?d.on:2}px)`,left:0}})}),(a||o)&&e.jsxs("div",{children:[a&&e.jsx("span",{className:"text-foreground block",style:wa,children:a}),o&&e.jsx("span",{className:"text-muted-foreground block",style:$a,children:o})]})]})}const Fa={default:"bg-muted/50 text-foreground border-border",primary:"bg-primary/10 text-primary border-primary/20",success:"bg-chart-2/10 text-chart-2 border-chart-2/20",warning:"bg-chart-5/10 text-chart-5 border-chart-5/20",destructive:"bg-destructive/10 text-destructive border-destructive/20",info:"bg-accent text-accent-foreground border-primary/20"},Ma={sm:"px-1.5 py-0.5",md:"px-2 py-0.5",lg:"px-3 py-1.5"},Wa={sm:{fontFamily:"var(--font-button)",fontSize:"var(--text-button)",fontWeight:"var(--weight-button)"},md:{fontFamily:"var(--font-button)",fontSize:"var(--text-button)",fontWeight:"var(--weight-button)"},lg:{fontFamily:"var(--font-label)",fontSize:"var(--text-label)",fontWeight:"var(--weight-button)"}};function ar({children:t,color:r="default",size:a="md",icon:o,closable:s,onClose:l,className:n=""}){const i=Fa[r],d=Ma[a],h=Wa[a];return e.jsxs("span",{className:`inline-flex items-center gap-1 rounded-full border ${i} ${d} ${n}`,style:h,children:[o&&e.jsx("span",{className:"flex-shrink-0",children:o}),t,s&&e.jsx("button",{className:"hover:opacity-70 cursor-pointer",onClick:l,children:e.jsx(J,{size:a==="sm"?10:12})})]})}ar.displayName="Tag";const Ca={fontFamily:"var(--font-label)",fontSize:"var(--text-label)",fontWeight:"var(--weight-label)"},La={fontFamily:"var(--font-button)",fontSize:"var(--text-button)",fontWeight:"var(--weight-button)"},ja={default:"bg-card border-border",outline:"bg-transparent border-border",filled:"bg-muted/30 border-transparent"};function sr({tags:t,onChange:r,placeholder:a,disabled:o,maxTags:s,variant:l="default",className:n=""}){const[i,d]=c.useState(""),h=()=>{const p=i.trim();!p||t.includes(p)||s&&t.length>=s||(r([...t,p]),d(""))},f=p=>{r(t.filter(v=>v!==p))};return e.jsxs("div",{className:`flex flex-wrap items-center gap-1.5 px-3 py-2 rounded-[var(--radius)] border ${ja[l]} transition-colors focus-within:border-primary ${o?"opacity-50 pointer-events-none":""} ${n}`,children:[t.map(p=>e.jsxs("span",{className:"inline-flex items-center gap-1 px-2 py-0.5 rounded-[var(--radius-sm)] bg-primary/10 text-primary",style:La,children:[p,e.jsx("button",{className:"hover:text-destructive cursor-pointer",onClick:()=>f(p),children:e.jsx(J,{size:12})})]},p)),e.jsx("input",{value:i,onChange:p=>d(p.target.value),onKeyDown:p=>{p.key==="Enter"&&(p.preventDefault(),h()),p.key==="Backspace"&&!i&&t.length&&r(t.slice(0,-1))},placeholder:t.length?"":a,className:"flex-1 min-w-[80px] bg-transparent outline-none text-foreground placeholder:text-muted-foreground",style:Ca,disabled:o})]})}sr.displayName="TagInput";const Aa={fontFamily:"var(--font-label)",fontSize:"var(--text-label)",fontWeight:"var(--weight-label)"},nr={fontFamily:"var(--font-label)",fontSize:"var(--text-label)",fontWeight:"var(--weight-button)"},Ge={fontFamily:"var(--font-button)",fontSize:"var(--text-button)",fontWeight:"var(--weight-label)"};function Da({items:t,variant:r="default",size:a="md"}){const o=a==="sm"?"w-6 h-6":a==="lg"?"w-10 h-10":"w-8 h-8",s=a==="sm"?12:a==="lg"?18:14,l=n=>n==="completed"?"bg-chart-2 text-white":n==="current"?"bg-primary text-primary-foreground":n==="error"?"bg-destructive text-white":"bg-muted text-muted-foreground";return r==="compact"?e.jsx("div",{className:"space-y-0",children:t.map((n,i)=>e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsxs("div",{className:"flex flex-col items-center",children:[e.jsx("div",{className:`${o} rounded-full flex items-center justify-center flex-shrink-0 ${l(n.status)}`,children:n.icon||(n.status==="completed"?e.jsx(te,{size:s}):e.jsx(st,{size:s}))}),i<t.length-1&&e.jsx("div",{className:"w-0.5 flex-1 min-h-4 bg-border"})]}),e.jsxs("div",{className:"pb-4 min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"text-foreground",style:nr,children:n.title}),n.time&&e.jsx("span",{className:"text-muted-foreground",style:Ge,children:n.time})]}),n.description&&e.jsx("p",{className:"text-muted-foreground mt-0.5",style:Ge,children:n.description})]})]},i))}):e.jsx("div",{className:"relative",children:t.map((n,i)=>{const d=r==="alternate"&&i%2===1;return e.jsxs("div",{className:`flex gap-4 pb-8 last:pb-0 ${d?"flex-row-reverse":""}`,children:[e.jsxs("div",{className:"flex flex-col items-center flex-shrink-0",children:[e.jsx("div",{className:`${o} rounded-full flex items-center justify-center ${l(n.status)}`,children:n.icon||(n.status==="completed"?e.jsx(te,{size:s}):e.jsx(st,{size:s}))}),i<t.length-1&&e.jsx("div",{className:"w-0.5 flex-1 bg-border mt-1"})]}),e.jsxs("div",{className:`flex-1 min-w-0 ${d?"text-right":""}`,children:[e.jsxs("div",{className:`flex items-center gap-2 ${d?"justify-end":""}`,children:[e.jsx("span",{className:"text-foreground",style:nr,children:n.title}),n.time&&e.jsx("span",{className:"text-muted-foreground",style:Ge,children:n.time})]}),n.description&&e.jsx("p",{className:"text-muted-foreground mt-0.5",style:Aa,children:n.description}),n.children&&e.jsx("div",{className:"mt-2",children:n.children})]})]},i)})})}const Ta={top:"bottom-full left-1/2 -translate-x-1/2 mb-2",bottom:"top-full left-1/2 -translate-x-1/2 mt-2",left:"right-full top-1/2 -translate-y-1/2 mr-2",right:"left-full top-1/2 -translate-y-1/2 ml-2"},Ea={fontFamily:"var(--font-button)",fontSize:"var(--text-button)",fontWeight:"var(--weight-label)"};function lr({children:t,content:r,placement:a="top",className:o=""}){const[s,l]=c.useState(!1);return e.jsxs("div",{className:`relative inline-flex ${o}`,onMouseEnter:()=>l(!0),onMouseLeave:()=>l(!1),onFocus:()=>l(!0),onBlur:()=>l(!1),children:[t,s&&e.jsx("div",{className:`absolute ${Ta[a]} z-50 px-3 py-1.5 rounded-[var(--radius-sm)] bg-foreground text-background whitespace-nowrap shadow-md`,style:Ea,role:"tooltip",children:r})]})}lr.displayName="Tooltip";const Fe={fontFamily:"var(--font-button)",fontSize:"var(--text-button)",fontWeight:"var(--weight-button)"};function ir({brand:t,breadcrumbs:r,actions:a,user:o,height:s="72px",showSearch:l=!1,searchPlaceholder:n="Search... (Ctrl+K)",onSearchClick:i,notificationCount:d,onNotificationClick:h,onMobileMenuClick:f,onUserClick:p,onBreadcrumbClick:v,className:u=""}){const y=o!=null&&o.name?o.name.split(" ").map(S=>S[0]).join("").slice(0,2).toUpperCase():"";return e.jsxs("div",{className:`bg-card border-b border-border flex items-center px-5 gap-4 ${u}`,style:{height:s},children:[f&&e.jsx("button",{className:"lg:hidden w-8 h-8 flex items-center justify-center rounded-[var(--radius-md)] text-foreground hover:bg-muted/30 transition-colors cursor-pointer",onClick:f,children:e.jsx(Dr,{size:16})}),t&&e.jsx(e.Fragment,{children:typeof t.logo=="string"?e.jsx("img",{src:t.logo,alt:t.name,className:"w-8 h-8 rounded-[var(--radius-sm)] flex-shrink-0 object-cover"}):t.logo?e.jsx("div",{className:"w-8 h-8 rounded-[var(--radius-sm)] overflow-hidden flex-shrink-0",children:t.logo}):e.jsx("div",{className:"w-8 h-8 rounded-[var(--radius-sm)] bg-primary flex items-center justify-center text-primary-foreground flex-shrink-0",style:Fe,children:t.name.charAt(0).toUpperCase()})}),r&&r.length>0&&e.jsx("nav",{className:"hidden sm:flex items-center gap-1.5 text-muted-foreground",style:Fe,children:r.map((S,b)=>e.jsxs(c.Fragment,{children:[b>0&&e.jsx(ee,{size:12}),S.href||v?e.jsx("span",{className:`cursor-pointer ${b===r.length-1?"text-foreground":"hover:text-foreground"}`,onClick:()=>v==null?void 0:v(S,b),children:S.label}):e.jsx("span",{className:b===r.length-1?"text-foreground":"",children:S.label})]},b))}),e.jsx("div",{className:"flex-1"}),l&&e.jsxs("div",{className:"hidden md:flex items-center gap-2 px-3 h-8 rounded-[var(--radius)] border border-border bg-muted/20 text-muted-foreground w-56 cursor-pointer hover:border-primary/40 transition-colors",onClick:i,children:[e.jsx(Se,{size:14}),e.jsx("span",{style:Fe,children:n})]}),a,h&&e.jsxs("button",{className:"relative w-8 h-8 flex items-center justify-center rounded-[var(--radius-md)] text-muted-foreground hover:text-foreground hover:bg-muted/30 transition-colors cursor-pointer",onClick:h,children:[e.jsx(ot,{size:16}),d!==void 0&&d>0&&e.jsx("span",{className:"absolute top-1 right-1 w-2 h-2 rounded-full bg-destructive"})]}),o&&e.jsx("div",{className:"cursor-pointer",onClick:p,children:o.avatar?e.jsx("img",{src:o.avatar,alt:o.name,className:"w-8 h-8 rounded-full object-cover"}):e.jsx("div",{className:"w-8 h-8 rounded-full bg-primary text-primary-foreground flex items-center justify-center",style:Fe,children:y})})]})}ir.displayName="TopNavbar";const Ia={fontFamily:"var(--font-label)",fontSize:"var(--text-label)",fontWeight:"var(--weight-label)"},Ba={fontFamily:"var(--font-label)",fontSize:"var(--text-label)",fontWeight:"var(--weight-button)"},Ke={fontFamily:"var(--font-button)",fontSize:"var(--text-button)",fontWeight:"var(--weight-label)"};function dr({title:t,items:r,selected:a,onToggle:o,search:s,onSearch:l,searchable:n}){return e.jsxs("div",{className:"flex-1 min-w-[180px] rounded-[var(--radius-lg)] border border-border bg-card overflow-hidden",children:[e.jsxs("div",{className:"px-3 py-2.5 border-b border-border bg-muted/30 flex items-center justify-between",children:[e.jsx("span",{className:"text-foreground",style:Ba,children:t}),e.jsxs("span",{className:"text-muted-foreground",style:Ke,children:[r.length," items"]})]}),n&&e.jsxs("div",{className:"px-3 py-2 border-b border-border flex items-center gap-2",children:[e.jsx(Se,{size:12,className:"text-muted-foreground"}),e.jsx("input",{value:s,onChange:i=>l(i.target.value),placeholder:"Search\\u2026",className:"flex-1 bg-transparent outline-none text-foreground placeholder:text-muted-foreground",style:Ke})]}),e.jsxs("div",{className:"max-h-[240px] overflow-y-auto py-1",children:[r.length===0&&e.jsx("div",{className:"px-3 py-6 text-center text-muted-foreground",style:Ke,children:"No items"}),r.map(i=>e.jsxs("button",{onClick:()=>!i.disabled&&o(i.id),className:`w-full flex items-center gap-2 px-3 py-1.5 transition-colors cursor-pointer
339
+ ${c?"border-primary bg-primary/5":"border-border hover:border-primary/40 hover:bg-accent/30"}`,children:[e.jsx("div",{className:"w-12 h-12 rounded-full bg-primary/10 flex items-center justify-center",children:e.jsx(Be,{size:20,className:"text-primary"})}),e.jsxs("div",{className:"text-center",children:[e.jsxs("p",{className:"text-foreground",style:_e,children:[e.jsx("span",{className:"text-primary",children:"Click to upload"})," or drag and drop"]}),e.jsxs("p",{className:"text-muted-foreground",style:Yt,children:[n||(t?`Accepted: ${t}`:"Any file type"),r&&` · Max ${qt(r)}`]})]})]}),e.jsx("input",{ref:w,type:"file",className:"hidden",accept:t,multiple:a,onChange:N=>m(N.target.files)}),b.length>0&&e.jsx(Ot,{files:b,onRemove:A})]})}const Jo={fontFamily:"var(--font-label)",fontSize:"var(--text-label)",fontWeight:"var(--weight-label)"},Po={fontFamily:"var(--font-button)",fontSize:"var(--text-button)",fontWeight:"var(--weight-button)"};function Qo({images:t,initialIndex:r=0}){const[a,o]=f.useState(!1),[s,l]=f.useState(r),[n,i]=f.useState(1),[d,h]=f.useState(0),u=t[s],p=()=>{l(b=>(b-1+t.length)%t.length),i(1),h(0)},v=()=>{l(b=>(b+1)%t.length),i(1),h(0)},c=()=>i(b=>Math.min(b+.25,3)),S=()=>i(b=>Math.max(b-.25,.5)),w=()=>h(b=>(b+90)%360);return e.jsxs("div",{children:[e.jsx("div",{className:"flex flex-wrap gap-2",children:t.map((b,m)=>e.jsx("button",{onClick:()=>{l(m),o(!0),i(1),h(0)},className:`rounded-[var(--radius-md)] overflow-hidden border-2 transition-all cursor-pointer hover:opacity-80
340
+ ${s===m&&a?"border-primary":"border-border"}`,children:e.jsx("div",{className:"w-20 h-20 bg-muted flex items-center justify-center overflow-hidden",children:e.jsx("img",{src:b.thumbnail||b.src,alt:b.alt,className:"w-full h-full object-cover",loading:"lazy"})})},m))}),a&&e.jsxs("div",{className:"fixed inset-0 z-[60] bg-foreground/80 flex flex-col",children:[e.jsxs("div",{className:"flex items-center justify-between px-4 py-3 bg-foreground/20",children:[e.jsxs("span",{className:"text-white",style:Jo,children:[u.alt," (",s+1,"/",t.length,")"]}),e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx("button",{onClick:S,className:"w-8 h-8 flex items-center justify-center rounded-[var(--radius-md)] text-white/70 hover:text-white hover:bg-white/10 cursor-pointer",children:e.jsx(qr,{size:16})}),e.jsxs("span",{className:"text-white/70 px-2",style:Po,children:[Math.round(n*100),"%"]}),e.jsx("button",{onClick:c,className:"w-8 h-8 flex items-center justify-center rounded-[var(--radius-md)] text-white/70 hover:text-white hover:bg-white/10 cursor-pointer",children:e.jsx(Yr,{size:16})}),e.jsx("button",{onClick:w,className:"w-8 h-8 flex items-center justify-center rounded-[var(--radius-md)] text-white/70 hover:text-white hover:bg-white/10 cursor-pointer",children:e.jsx(Ir,{size:16})}),e.jsx("div",{className:"w-px h-5 bg-white/20 mx-1"}),e.jsx("button",{onClick:()=>{o(!1),i(1),h(0)},className:"w-8 h-8 flex items-center justify-center rounded-[var(--radius-md)] text-white/70 hover:text-white hover:bg-white/10 cursor-pointer",children:e.jsx(J,{size:16})})]})]}),e.jsxs("div",{className:"flex-1 flex items-center justify-center relative overflow-hidden",onClick:b=>{b.target===b.currentTarget&&(o(!1),i(1),h(0))},children:[t.length>1&&e.jsx("button",{onClick:p,className:"absolute left-4 w-10 h-10 rounded-full bg-foreground/30 text-white flex items-center justify-center hover:bg-foreground/50 cursor-pointer z-10",children:e.jsx(pe,{size:20})}),e.jsx("img",{src:u.src,alt:u.alt,className:"max-w-[90%] max-h-[80vh] object-contain transition-transform",style:{transform:`scale(${n}) rotate(${d}deg)`}}),t.length>1&&e.jsx("button",{onClick:v,className:"absolute right-4 w-10 h-10 rounded-full bg-foreground/30 text-white flex items-center justify-center hover:bg-foreground/50 cursor-pointer z-10",children:e.jsx(ee,{size:20})})]}),t.length>1&&e.jsx("div",{className:"flex items-center justify-center gap-2 py-3 bg-foreground/20",children:t.map((b,m)=>e.jsx("button",{onClick:()=>{l(m),i(1),h(0)},className:`w-12 h-12 rounded-[var(--radius-sm)] overflow-hidden border-2 cursor-pointer transition-all
341
+ ${m===s?"border-white":"border-transparent opacity-50 hover:opacity-80"}`,children:e.jsx("img",{src:b.thumbnail||b.src,alt:b.alt,className:"w-full h-full object-cover"})},m))})]})]})}const Vo={fontFamily:"var(--font-label)",fontSize:"var(--text-label)",fontWeight:"var(--weight-label)"},Ro={fontFamily:"var(--font-button)",fontSize:"var(--text-button)",fontWeight:"var(--weight-label)"},ea={fontFamily:"var(--font-button)",fontSize:"var(--text-button)",fontWeight:"var(--weight-button)"};function ta({items:t,parentRect:r}){const a=f.useRef(null),[o,s]=f.useState({top:r.top,left:r.right+4});return f.useEffect(()=>{if(!a.current)return;const n=a.current.getBoundingClientRect();let i=r.top,d=r.right+4;d+n.width>window.innerWidth-8&&(d=r.left-n.width-4),i+n.height>window.innerHeight-8&&(i=window.innerHeight-n.height-8),s({top:i,left:d})},[r]),De.createPortal(e.jsx("div",{ref:a,className:"fixed z-[9999] min-w-[200px] rounded-[var(--radius)] border border-border bg-popover shadow-md py-1",style:{top:o.top,left:o.left},children:t.map((l,n)=>e.jsx(Ut,{item:l},n))}),document.body)}function Ut({item:t}){const[r,a]=f.useState(!1),o=f.useRef(null),s=f.useRef(null);if(t.divider)return e.jsx("div",{className:"my-1 border-t border-border"});if(t.label)return e.jsx("div",{className:"px-3 py-1.5 text-muted-foreground uppercase tracking-wider",style:ea,children:t.label});const l=t.children&&t.children.length>0,n=()=>{s.current&&clearTimeout(s.current),l&&a(!0)},i=()=>{s.current=setTimeout(()=>a(!1),150)};return e.jsxs("div",{ref:o,className:"relative",onMouseEnter:n,onMouseLeave:i,children:[e.jsxs("button",{onClick:()=>{var d;l||(d=t.onClick)==null||d.call(t)},disabled:t.disabled,className:`w-full flex items-center text-left rounded-[var(--radius-sm)] transition-colors cursor-pointer ${t.destructive?"text-destructive hover:bg-destructive/10":t.disabled?"text-muted-foreground opacity-50 cursor-not-allowed":"text-popover-foreground hover:bg-[var(--Colors--Background--bg-primary_hover)]"}`,style:{padding:"var(--Spacing--Spacing-md) var(--Spacing--Spacing-2xl)",gap:"var(--Spacing--Spacing-lg)",...Vo},children:[t.icon&&e.jsx("span",{className:"flex-shrink-0",children:t.icon}),e.jsx("span",{className:"flex-1",children:t.text}),t.shortcut&&e.jsx("span",{className:"text-muted-foreground ml-4",style:Ro,children:t.shortcut}),l&&e.jsx(ee,{size:14,className:"text-muted-foreground"})]}),l&&r&&o.current&&e.jsx(ta,{items:t.children,parentRect:o.current.getBoundingClientRect()})]})}function Gt({items:t,open:r,onClose:a,triggerRef:o,className:s=""}){const l=f.useRef(null),[n,i]=f.useState({top:0,left:0});return f.useEffect(()=>{if(!r||!o.current)return;const d=o.current.getBoundingClientRect();let h=d.bottom+4,u=d.left;requestAnimationFrame(()=>{if(!l.current)return;const p=l.current.getBoundingClientRect();u+p.width>window.innerWidth-8&&(u=d.right-p.width),h+p.height>window.innerHeight-8&&(h=d.top-p.height-4),i({top:h,left:u})}),i({top:h,left:u})},[r,o]),f.useEffect(()=>{if(!r)return;const d=h=>{var u,p;(u=o.current)!=null&&u.contains(h.target)||(p=l.current)!=null&&p.contains(h.target)||a()};return document.addEventListener("mousedown",d),()=>document.removeEventListener("mousedown",d)},[r,a,o]),r?De.createPortal(e.jsxs("div",{ref:l,className:`fixed z-[9999] min-w-[200px] rounded-[var(--radius)] border border-border bg-popover shadow-md py-1 animate-[fadeIn_0.15s_ease] ${s}`,style:{top:n.top,left:n.left},children:[t.map((d,h)=>e.jsx(Ut,{item:d},h)),e.jsx("style",{children:"@keyframes fadeIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: translateY(0); } }"})]}),document.body):null}Gt.displayName="Menu";const Kt={fontFamily:"var(--font-label)",fontSize:"var(--text-label)",fontWeight:"var(--weight-label)"},qe={fontFamily:"var(--font-label)",fontSize:"var(--text-label)",fontWeight:"var(--weight-button)"},ra={fontFamily:"var(--font-button)",fontSize:"var(--text-button)",fontWeight:"var(--weight-label)"},Fe={fontFamily:"var(--font-button)",fontSize:"var(--text-button)",fontWeight:"var(--weight-button)"};function Xt({type:t="info",title:r,message:a,closable:o=!0,onClose:s,action:l,avatar:n,time:i,read:d}){const h={info:e.jsx(dt,{size:16,className:"text-primary"}),success:e.jsx(te,{size:16,className:"text-chart-2"}),warning:e.jsx(ct,{size:16,className:"text-chart-5"}),error:e.jsx(at,{size:16,className:"text-destructive"})},u={info:"border-l-primary",success:"border-l-chart-2",warning:"border-l-chart-5",error:"border-l-destructive"};return e.jsxs("div",{className:`flex gap-3 px-4 py-3 rounded-[var(--radius-md)] border border-border bg-card border-l-[3px] ${u[t]} ${d===!1?"bg-primary/5":""}`,children:[n?e.jsx("div",{className:"w-8 h-8 rounded-full bg-muted flex-shrink-0 flex items-center justify-center overflow-hidden",style:qe,children:e.jsx("span",{className:"text-primary",children:n.slice(0,2).toUpperCase()})}):e.jsx("span",{className:"flex-shrink-0 mt-0.5",children:h[t]}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsxs("div",{className:"flex items-start justify-between gap-2",children:[e.jsx("span",{className:"text-foreground",style:qe,children:r}),e.jsxs("div",{className:"flex items-center gap-1 flex-shrink-0",children:[i&&e.jsx("span",{className:"text-muted-foreground",style:ra,children:i}),d===!1&&e.jsx("span",{className:"w-2 h-2 rounded-full bg-primary"}),o&&s&&e.jsx("button",{onClick:s,className:"text-muted-foreground hover:text-foreground cursor-pointer",children:e.jsx(J,{size:14})})]})]}),a&&e.jsx("p",{className:"text-muted-foreground mt-0.5",style:Kt,children:a}),l&&e.jsxs("button",{onClick:l.onClick,className:"inline-flex items-center gap-1 text-primary mt-2 hover:underline cursor-pointer",style:Fe,children:[l.label," ",e.jsx(kr,{size:12})]})]})]})}function oa({items:t,onMarkRead:r,onMarkAllRead:a,onDismiss:o,onClearAll:s}){const[l,n]=f.useState(t),i=r!==void 0||a!==void 0,d=i?t:l,h=d.filter(c=>!c.read).length,u=()=>{a&&a(),i||n(c=>c.map(S=>({...S,read:!0})))},p=c=>{o&&o(c),i||n(S=>S.filter(w=>w.id!==c))},v=c=>{r&&r(c),i||n(S=>S.map(w=>w.id===c?{...w,read:!0}:w))};return e.jsxs("div",{className:"max-w-md rounded-[var(--radius-lg)] border border-border bg-card overflow-hidden",children:[e.jsxs("div",{className:"px-4 py-3 border-b border-border flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(ot,{size:16,className:"text-foreground"}),e.jsx("span",{className:"text-foreground",style:qe,children:"Notifications"}),h>0&&e.jsx("span",{className:"px-1.5 py-0.5 rounded-full bg-primary text-primary-foreground",style:Fe,children:h})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[h>0&&e.jsx("button",{onClick:u,className:"text-primary cursor-pointer",style:Fe,children:"Mark all read"}),d.length>0&&s&&e.jsx("button",{onClick:s,className:"text-muted-foreground hover:text-destructive cursor-pointer",style:Fe,children:"Clear all"})]})]}),e.jsx("div",{className:"divide-y divide-border max-h-[360px] overflow-y-auto",children:d.map(c=>e.jsx("div",{className:`px-3 py-2 ${c.read?"":"bg-primary/5"}`,onClick:()=>!c.read&&v(c.id),children:e.jsx(Xt,{type:c.type,title:c.title,message:c.message,time:c.time,read:c.read,closable:!!o,onClose:()=>p(c.id)})},c.id))}),d.length===0&&e.jsxs("div",{className:"py-10 text-center text-muted-foreground",children:[e.jsx(mr,{size:24,className:"mx-auto mb-2 opacity-40"}),e.jsx("span",{style:Kt,children:"No notifications"})]})]})}const aa={fontFamily:"var(--font-label)",fontSize:"var(--text-label)",fontWeight:"var(--weight-button)"};function sa({trigger:t,children:r,placement:a="bottom",title:o,open:s,onOpenChange:l}){const[n,i]=f.useState(!1),d=s!==void 0?s:n,h=v=>{l==null||l(v),s===void 0&&i(v)},u=f.useRef(null);f.useEffect(()=>{if(!d)return;const v=c=>{u.current&&!u.current.contains(c.target)&&h(!1)};return document.addEventListener("mousedown",v),()=>document.removeEventListener("mousedown",v)},[d]);const p={top:"bottom-full left-1/2 -translate-x-1/2 mb-2",bottom:"top-full left-1/2 -translate-x-1/2 mt-2",left:"right-full top-1/2 -translate-y-1/2 mr-2",right:"left-full top-1/2 -translate-y-1/2 ml-2"};return e.jsxs("div",{className:"relative inline-block",ref:u,children:[e.jsx("div",{onClick:()=>h(!d),className:"cursor-pointer",children:t}),d&&e.jsx("div",{className:`absolute z-50 ${p[a]} w-max max-w-xs`,children:e.jsxs("div",{className:"rounded-[var(--radius-lg)] border border-border bg-card shadow-lg overflow-hidden",children:[o&&e.jsxs("div",{className:"px-4 py-2.5 border-b border-border flex items-center justify-between",children:[e.jsx("span",{className:"text-foreground",style:aa,children:o}),e.jsx("button",{onClick:()=>h(!1),className:"text-muted-foreground hover:text-foreground cursor-pointer",children:e.jsx(J,{size:14})})]}),e.jsx("div",{className:"px-4 py-3",children:r})]})})]})}const na={fontFamily:"var(--font-label)",fontSize:"var(--text-label)"},la={fontFamily:"var(--font-button)",fontSize:"var(--text-button)",fontWeight:"var(--weight-label)"};function Zt({value:t,max:r=100,size:a="md",color:o,label:s,showValue:l,indeterminate:n,className:i=""}){const d={sm:"h-1.5",md:"h-2.5",lg:"h-4"},h=n?0:Math.min(100,Math.max(0,(t??0)/r*100));return e.jsxs("div",{className:`w-full ${i}`,children:[(s||l)&&e.jsxs("div",{className:"flex items-center justify-between mb-1.5",children:[s&&e.jsx("span",{className:"text-foreground",style:na,children:s}),l&&!n&&e.jsxs("span",{className:"text-muted-foreground",style:la,children:[Math.round(h),"%"]})]}),e.jsx("div",{className:`w-full ${d[a]} rounded-full bg-muted overflow-hidden`,children:n?e.jsx("div",{className:"h-full w-1/3 rounded-full animate-[indeterminate_1.5s_infinite_ease-in-out]",style:{backgroundColor:o??"var(--primary)"}}):e.jsx("div",{className:"h-full rounded-full transition-all duration-500",style:{width:`${h}%`,backgroundColor:o??"var(--primary)"}})}),e.jsx("style",{children:"@keyframes indeterminate { 0% { transform: translateX(-100%); } 100% { transform: translateX(400%); } }"})]})}Zt.displayName="ProgressBar";const ia={fontFamily:"var(--font-label)",fontSize:"var(--text-label)",fontWeight:"var(--weight-label)"},da={fontFamily:"var(--font-label)",fontSize:"var(--text-label)",fontWeight:"var(--weight-button)"};function ca({value:t=0,onChange:r,max:a=5,size:o="md",disabled:s,readOnly:l,icon:n="star",showValue:i,label:d}){const[h,u]=f.useState(0),p=o==="sm"?16:o==="lg"?28:20,v=o==="sm"?"gap-0.5":o==="lg"?"gap-1.5":"gap-1",c=n==="heart"?Lr:n==="thumb"?Hr:Br,S=n==="heart"?"text-destructive":"text-chart-5",w=Array.from({length:a},(b,m)=>m+1);return e.jsxs("div",{className:`inline-flex items-center ${v} ${s?"opacity-50 pointer-events-none":""}`,children:[d&&e.jsx("span",{className:"text-foreground mr-2",style:ia,children:d}),w.map(b=>{const m=b<=(h||t);return e.jsx("button",{type:"button",className:`transition-transform ${l||s?"":"cursor-pointer hover:scale-110"} ${m?S:"text-muted-foreground/40"}`,onMouseEnter:()=>!l&&!s&&u(b),onMouseLeave:()=>u(0),onClick:()=>!l&&!s&&(r==null?void 0:r(b===t?0:b)),disabled:s||l,children:e.jsx(c,{size:p,fill:m?"currentColor":"none"})},b)}),i&&e.jsxs("span",{className:"text-foreground ml-1",style:da,children:[t,"/",a]})]})}const fa={fontFamily:"var(--font-label)",fontSize:"var(--text-label)",fontWeight:"var(--weight-button)"},ha={fontFamily:"var(--font-label)",fontSize:"var(--text-label)"},Oe={fontFamily:"var(--font-button)",fontSize:"var(--text-button)",fontWeight:"var(--weight-button)"},ua={fontFamily:"var(--font-button)",fontSize:"var(--text-button)",fontWeight:"var(--weight-label)"};function Jt({brand:t,groups:r,activeItem:a,onNavigate:o,collapsed:s=!1,onCollapsedChange:l,className:n=""}){return e.jsxs("div",{className:`bg-sidebar border-r border-sidebar-border flex flex-col flex-shrink-0 transition-all ${s?"w-16":"w-64"} ${n}`,children:[t&&e.jsxs("div",{className:"px-4 py-4 border-b border-sidebar-border flex items-center gap-2",children:[t.logo?e.jsx("img",{src:t.logo,alt:t.name,className:"w-8 h-8 rounded-[var(--radius-sm)] flex-shrink-0 object-cover"}):e.jsx("div",{className:"w-8 h-8 rounded-[var(--radius-sm)] bg-primary flex items-center justify-center text-primary-foreground flex-shrink-0",style:Oe,children:t.name.charAt(0).toUpperCase()}),!s&&e.jsx("span",{className:"text-sidebar-foreground truncate",style:fa,children:t.name})]}),e.jsx("nav",{className:"flex-1 overflow-y-auto py-3 px-2",children:r.map(i=>e.jsxs("div",{className:"mb-4",children:[!s&&e.jsx("span",{className:"px-2 mb-1.5 block text-muted-foreground uppercase tracking-wider",style:Oe,children:i.label}),e.jsx("div",{className:"space-y-0.5",children:i.items.map(d=>{const h=a===d.id;return e.jsxs("button",{onClick:()=>o==null?void 0:o(d),className:`w-full flex items-center gap-2 px-2 py-2 rounded-[var(--radius-md)] transition-colors cursor-pointer ${h?"bg-sidebar-accent text-sidebar-accent-foreground":"text-sidebar-foreground hover:bg-sidebar-accent/50"}`,style:ha,children:[e.jsx("span",{className:h?"text-sidebar-primary":"text-muted-foreground",children:d.icon}),!s&&e.jsx("span",{className:"truncate flex-1 text-left",children:d.label}),!s&&d.badge&&e.jsx("span",{className:"px-1.5 py-0.5 rounded-full bg-primary text-primary-foreground",style:{...Oe,lineHeight:"1"},children:d.badge})]},d.id)})})]},i.label))}),l&&e.jsx("div",{className:"px-3 py-3 border-t border-sidebar-border",children:e.jsx("button",{onClick:()=>l(!s),className:"w-full px-2 py-1.5 rounded-[var(--radius-md)] text-muted-foreground hover:text-foreground hover:bg-sidebar-accent/50 cursor-pointer text-left",style:ua,children:s?">":"Collapse"})})]})}Jt.displayName="Sidebar";function X({width:t,height:r,variant:a="rectangular",animate:o=!0,className:s}){const l="bg-muted",n=o?"animate-pulse":"",i=a==="circular"?"rounded-full":a==="rounded"?"rounded-[var(--radius-md)]":"rounded-[var(--radius-sm)]";return e.jsx("div",{className:`${l} ${n} ${i} ${s??""}`,style:{width:t??"100%",height:r??(a==="text"?"1em":a==="circular"?40:20)}})}function ba(){return e.jsxs("div",{className:"rounded-[var(--radius-lg)] border border-border bg-card p-4 space-y-4 w-full max-w-sm",children:[e.jsx(X,{variant:"rounded",height:160}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(X,{variant:"text",width:"60%",height:20}),e.jsx(X,{variant:"text",width:"100%",height:14}),e.jsx(X,{variant:"text",width:"80%",height:14})]}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(X,{variant:"circular",width:36,height:36}),e.jsxs("div",{className:"flex-1 space-y-1.5",children:[e.jsx(X,{variant:"text",width:"40%",height:14}),e.jsx(X,{variant:"text",width:"25%",height:12})]})]})]})}function ga(){return e.jsxs("div",{className:"rounded-[var(--radius-lg)] border border-border bg-card overflow-hidden",children:[e.jsx("div",{className:"px-4 py-3 border-b border-border bg-muted/30 flex gap-4",children:[120,160,100,80].map((t,r)=>e.jsx(X,{variant:"text",width:t,height:14},r))}),[0,1,2,3].map(t=>e.jsxs("div",{className:"px-4 py-3 border-b border-border flex items-center gap-4",children:[e.jsx(X,{variant:"circular",width:28,height:28}),e.jsx(X,{variant:"text",width:100+t*15,height:14}),e.jsx(X,{variant:"text",width:140,height:14,className:"flex-1"}),e.jsx(X,{variant:"rounded",width:60,height:22}),e.jsx(X,{variant:"text",width:80,height:14})]},t))]})}function pa(){return e.jsx("div",{className:"space-y-3 w-full max-w-md",children:[0,1,2].map(t=>e.jsxs("div",{className:"flex items-center gap-3 px-3 py-2.5 rounded-[var(--radius-md)] border border-border bg-card",children:[e.jsx(X,{variant:"circular",width:40,height:40}),e.jsxs("div",{className:"flex-1 space-y-1.5",children:[e.jsx(X,{variant:"text",width:`${60+t*10}%`,height:14}),e.jsx(X,{variant:"text",width:`${40+t*5}%`,height:12})]}),e.jsx(X,{variant:"rounded",width:50,height:24})]},t))})}const va={sm:"w-4 h-4 border-2",md:"w-8 h-8 border-[3px]",lg:"w-12 h-12 border-4",xl:"w-16 h-16 border-4"};function Pt({size:t="md",color:r,className:a=""}){return e.jsx("div",{className:`${va[t]} rounded-full border-muted animate-spin ${a}`,style:{borderTopColor:r??"var(--primary)"},role:"status","aria-label":"Loading"})}Pt.displayName="Spinner";const Ue={fontFamily:"var(--font-label)",fontSize:"var(--text-label)",fontWeight:"var(--weight-label)"},Qt={fontFamily:"var(--font-label)",fontSize:"var(--text-label)",fontWeight:"var(--weight-button)"},Vt={fontFamily:"var(--font-button)",fontSize:"var(--text-button)",fontWeight:"var(--weight-label)"},Rt={fontFamily:"var(--font-button)",fontSize:"var(--text-button)",fontWeight:"var(--weight-button)"},ya={sm:{fontFamily:"var(--font-h4)",fontSize:"var(--text-h4)",fontWeight:"var(--weight-h4)"},md:{fontFamily:"var(--font-h2)",fontSize:"var(--text-h2)",fontWeight:"var(--weight-h2)"},lg:{fontFamily:"var(--font-h1)",fontSize:"var(--text-h1)",fontWeight:"var(--weight-h1)"}};function ma({title:t,value:r,prefix:a,suffix:o,trend:s,trendLabel:l,icon:n,size:i="md",loading:d}){const h=ya[i],u=(s==null?void 0:s.direction)==="up"?"text-chart-2":(s==null?void 0:s.direction)==="down"?"text-destructive":"text-muted-foreground",p=(s==null?void 0:s.direction)==="up"?rt:(s==null?void 0:s.direction)==="down"?tt:Ee;return d?e.jsxs("div",{className:"space-y-2 animate-pulse",children:[e.jsx("div",{className:"h-3 w-20 bg-muted rounded-[var(--radius-sm)]"}),e.jsx("div",{className:"h-8 w-32 bg-muted rounded-[var(--radius-sm)]"}),e.jsx("div",{className:"h-3 w-24 bg-muted rounded-[var(--radius-sm)]"})]}):e.jsxs("div",{className:"space-y-1",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[n&&e.jsx("span",{className:"text-muted-foreground",children:n}),e.jsx("span",{className:"text-muted-foreground",style:Ue,children:t})]}),e.jsxs("div",{className:"flex items-baseline gap-1",children:[a&&e.jsx("span",{className:"text-muted-foreground",style:Qt,children:a}),e.jsx("span",{className:"text-foreground",style:h,children:typeof r=="number"?r.toLocaleString():r}),o&&e.jsx("span",{className:"text-muted-foreground",style:Ue,children:o})]}),s&&e.jsxs("div",{className:`flex items-center gap-1 ${u}`,children:[e.jsx(p,{size:14}),e.jsxs("span",{style:Rt,children:[s.value,"%"]}),l&&e.jsx("span",{className:"text-muted-foreground",style:Vt,children:l})]})]})}function xa({title:t,value:r,prefix:a,trend:o,trendLabel:s,icon:l,iconBg:n}){const i=(o==null?void 0:o.direction)==="up"?"text-chart-2":(o==null?void 0:o.direction)==="down"?"text-destructive":"text-muted-foreground",d=(o==null?void 0:o.direction)==="up"?rt:(o==null?void 0:o.direction)==="down"?tt:Ee;return e.jsx("div",{className:"rounded-[var(--radius-lg)] border border-border bg-card p-5",children:e.jsxs("div",{className:"flex items-start justify-between",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsx("span",{className:"text-muted-foreground",style:Ue,children:t}),e.jsxs("div",{className:"flex items-baseline gap-1",children:[a&&e.jsx("span",{className:"text-muted-foreground",style:Qt,children:a}),e.jsx("span",{className:"text-foreground",style:{fontFamily:"var(--font-h3)",fontSize:"var(--text-h3)",fontWeight:"var(--weight-h3)"},children:typeof r=="number"?r.toLocaleString():r})]}),o&&e.jsxs("div",{className:`flex items-center gap-1 ${i}`,children:[e.jsx(d,{size:12}),e.jsxs("span",{style:Rt,children:[o.value,"%"]}),s&&e.jsx("span",{className:"text-muted-foreground",style:Vt,children:s})]})]}),l&&e.jsx("div",{className:`w-10 h-10 rounded-[var(--radius-md)] flex items-center justify-center flex-shrink-0 ${n||"bg-primary/10 text-primary"}`,children:l})]})})}const Na={fontFamily:"var(--font-label)",fontSize:"var(--text-label)",fontWeight:"var(--weight-label)"},er={fontFamily:"var(--font-label)",fontSize:"var(--text-label)",fontWeight:"var(--weight-button)"},tr={fontFamily:"var(--font-button)",fontSize:"var(--text-button)",fontWeight:"var(--weight-label)"},rr={fontFamily:"var(--font-button)",fontSize:"var(--text-button)",fontWeight:"var(--weight-button)"};function or({steps:t,current:r,orientation:a="horizontal",onStepClick:o,className:s=""}){return a==="vertical"?e.jsx("div",{className:`flex flex-col ${s}`,children:t.map((l,n)=>{const i=n<r,d=n===r;return e.jsxs("div",{className:"flex gap-3",onClick:()=>o==null?void 0:o(n),children:[e.jsxs("div",{className:"flex flex-col items-center",children:[e.jsx("div",{className:`w-8 h-8 rounded-full flex items-center justify-center flex-shrink-0 transition-colors ${o?"cursor-pointer":""} ${i||d?"bg-primary text-primary-foreground":"bg-muted text-muted-foreground"}`,style:rr,children:i?e.jsx(ne,{size:14}):n+1}),n<t.length-1&&e.jsx("div",{className:`w-px flex-1 min-h-[24px] my-1 ${i?"bg-primary":"bg-border"}`})]}),e.jsxs("div",{className:`pb-6 ${n===t.length-1?"pb-0":""}`,children:[e.jsx("span",{className:`block ${d?"text-foreground":"text-muted-foreground"}`,style:d?er:Na,children:l.title}),l.description&&e.jsx("span",{className:"text-muted-foreground block",style:tr,children:l.description})]})]},n)})}):e.jsx("div",{className:`flex items-center ${s}`,children:t.map((l,n)=>{const i=n<r,d=n===r;return e.jsxs("div",{className:`flex items-center ${n<t.length-1?"flex-1":""}`,children:[e.jsxs("div",{className:"flex flex-col items-center gap-1",onClick:()=>o==null?void 0:o(n),children:[e.jsx("div",{className:`w-8 h-8 rounded-full flex items-center justify-center flex-shrink-0 transition-colors ${o?"cursor-pointer":""} ${i||d?"bg-primary text-primary-foreground":"bg-muted text-muted-foreground"}`,style:rr,children:i?e.jsx(ne,{size:14}):n+1}),e.jsx("span",{className:`text-center ${d?"text-foreground":"text-muted-foreground"}`,style:d?er:tr,children:l.title})]}),n<t.length-1&&e.jsx("div",{className:`flex-1 h-px mx-2 mt-[-20px] ${i?"bg-primary":"bg-border"}`})]},n)})})}or.displayName="Stepper";const wa={fontFamily:"var(--font-label)",fontSize:"var(--text-label)",fontWeight:"var(--weight-label)"},Sa={fontFamily:"var(--font-button)",fontSize:"var(--text-button)",fontWeight:"var(--weight-label)"},$a={sm:{track:"w-7 h-4",thumb:"w-3 h-3",on:"translate-x-3"},md:{track:"w-10 h-6",thumb:"w-4.5 h-4.5",on:"translate-x-4.5"},lg:{track:"w-14 h-8",thumb:"w-6.5 h-6.5",on:"translate-x-6"}},ka={primary:"bg-primary",success:"bg-chart-2",warning:"bg-chart-5",destructive:"bg-destructive"},za={sm:{w:12,h:12,on:14},md:{w:18,h:18,on:18},lg:{w:26,h:26,on:24}};function _a({checked:t,onChange:r,label:a,description:o,size:s="md",disabled:l,color:n="primary"}){const i=$a[s],d=za[s];return e.jsxs("label",{className:`inline-flex items-start gap-3 ${l?"opacity-50 pointer-events-none":"cursor-pointer"}`,children:[e.jsx("button",{role:"switch","aria-checked":t,onClick:()=>r(!t),disabled:l,className:`${i.track} rounded-full relative flex-shrink-0 transition-colors cursor-pointer ${t?ka[n]:"bg-muted"}`,children:e.jsx("span",{className:"rounded-full bg-white shadow-sm absolute transition-transform",style:{width:d.w,height:d.h,top:"50%",transform:`translateY(-50%) translateX(${t?d.on:2}px)`,left:0}})}),(a||o)&&e.jsxs("div",{children:[a&&e.jsx("span",{className:"text-foreground block",style:wa,children:a}),o&&e.jsx("span",{className:"text-muted-foreground block",style:Sa,children:o})]})]})}const Fa={default:"bg-muted/50 text-foreground border-border",primary:"bg-primary/10 text-primary border-primary/20",success:"bg-chart-2/10 text-chart-2 border-chart-2/20",warning:"bg-chart-5/10 text-chart-5 border-chart-5/20",destructive:"bg-destructive/10 text-destructive border-destructive/20",info:"bg-accent text-accent-foreground border-primary/20"},Wa={sm:"px-1.5 py-0.5",md:"px-2 py-0.5",lg:"px-3 py-1.5"},Ma={sm:{fontFamily:"var(--font-button)",fontSize:"var(--text-button)",fontWeight:"var(--weight-button)"},md:{fontFamily:"var(--font-button)",fontSize:"var(--text-button)",fontWeight:"var(--weight-button)"},lg:{fontFamily:"var(--font-label)",fontSize:"var(--text-label)",fontWeight:"var(--weight-button)"}};function ar({children:t,color:r="default",size:a="md",icon:o,closable:s,onClose:l,className:n=""}){const i=Fa[r],d=Wa[a],h=Ma[a];return e.jsxs("span",{className:`inline-flex items-center gap-1 rounded-full border ${i} ${d} ${n}`,style:h,children:[o&&e.jsx("span",{className:"flex-shrink-0",children:o}),t,s&&e.jsx("button",{className:"hover:opacity-70 cursor-pointer",onClick:l,children:e.jsx(J,{size:a==="sm"?10:12})})]})}ar.displayName="Tag";const Ca={fontFamily:"var(--font-label)",fontSize:"var(--text-label)",fontWeight:"var(--weight-label)"},La={fontFamily:"var(--font-button)",fontSize:"var(--text-button)",fontWeight:"var(--weight-button)"},ja={default:"bg-card border-border",outline:"bg-transparent border-border",filled:"bg-muted/30 border-transparent"};function sr({tags:t,onChange:r,placeholder:a,disabled:o,maxTags:s,variant:l="default",className:n=""}){const[i,d]=f.useState(""),h=()=>{const p=i.trim();!p||t.includes(p)||s&&t.length>=s||(r([...t,p]),d(""))},u=p=>{r(t.filter(v=>v!==p))};return e.jsxs("div",{className:`flex flex-wrap items-center gap-1.5 px-3 py-2 rounded-[var(--radius)] border ${ja[l]} transition-colors focus-within:border-primary ${o?"opacity-50 pointer-events-none":""} ${n}`,children:[t.map(p=>e.jsxs("span",{className:"inline-flex items-center gap-1 px-2 py-0.5 rounded-[var(--radius-sm)] bg-primary/10 text-primary",style:La,children:[p,e.jsx("button",{className:"hover:text-destructive cursor-pointer",onClick:()=>u(p),children:e.jsx(J,{size:12})})]},p)),e.jsx("input",{value:i,onChange:p=>d(p.target.value),onKeyDown:p=>{p.key==="Enter"&&(p.preventDefault(),h()),p.key==="Backspace"&&!i&&t.length&&r(t.slice(0,-1))},placeholder:t.length?"":a,className:"flex-1 min-w-[80px] bg-transparent outline-none text-foreground placeholder:text-muted-foreground",style:Ca,disabled:o})]})}sr.displayName="TagInput";const Aa={fontFamily:"var(--font-label)",fontSize:"var(--text-label)",fontWeight:"var(--weight-label)"},nr={fontFamily:"var(--font-label)",fontSize:"var(--text-label)",fontWeight:"var(--weight-button)"},Ge={fontFamily:"var(--font-button)",fontSize:"var(--text-button)",fontWeight:"var(--weight-label)"};function Da({items:t,variant:r="default",size:a="md"}){const o=a==="sm"?"w-6 h-6":a==="lg"?"w-10 h-10":"w-8 h-8",s=a==="sm"?12:a==="lg"?18:14,l=n=>n==="completed"?"bg-chart-2 text-white":n==="current"?"bg-primary text-primary-foreground":n==="error"?"bg-destructive text-white":"bg-muted text-muted-foreground";return r==="compact"?e.jsx("div",{className:"space-y-0",children:t.map((n,i)=>e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsxs("div",{className:"flex flex-col items-center",children:[e.jsx("div",{className:`${o} rounded-full flex items-center justify-center flex-shrink-0 ${l(n.status)}`,children:n.icon||(n.status==="completed"?e.jsx(te,{size:s}):e.jsx(st,{size:s}))}),i<t.length-1&&e.jsx("div",{className:"w-0.5 flex-1 min-h-4 bg-border"})]}),e.jsxs("div",{className:"pb-4 min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"text-foreground",style:nr,children:n.title}),n.time&&e.jsx("span",{className:"text-muted-foreground",style:Ge,children:n.time})]}),n.description&&e.jsx("p",{className:"text-muted-foreground mt-0.5",style:Ge,children:n.description})]})]},i))}):e.jsx("div",{className:"relative",children:t.map((n,i)=>{const d=r==="alternate"&&i%2===1;return e.jsxs("div",{className:`flex gap-4 pb-8 last:pb-0 ${d?"flex-row-reverse":""}`,children:[e.jsxs("div",{className:"flex flex-col items-center flex-shrink-0",children:[e.jsx("div",{className:`${o} rounded-full flex items-center justify-center ${l(n.status)}`,children:n.icon||(n.status==="completed"?e.jsx(te,{size:s}):e.jsx(st,{size:s}))}),i<t.length-1&&e.jsx("div",{className:"w-0.5 flex-1 bg-border mt-1"})]}),e.jsxs("div",{className:`flex-1 min-w-0 ${d?"text-right":""}`,children:[e.jsxs("div",{className:`flex items-center gap-2 ${d?"justify-end":""}`,children:[e.jsx("span",{className:"text-foreground",style:nr,children:n.title}),n.time&&e.jsx("span",{className:"text-muted-foreground",style:Ge,children:n.time})]}),n.description&&e.jsx("p",{className:"text-muted-foreground mt-0.5",style:Aa,children:n.description}),n.children&&e.jsx("div",{className:"mt-2",children:n.children})]})]},i)})})}const Ta={top:"bottom-full left-1/2 -translate-x-1/2 mb-2",bottom:"top-full left-1/2 -translate-x-1/2 mt-2",left:"right-full top-1/2 -translate-y-1/2 mr-2",right:"left-full top-1/2 -translate-y-1/2 ml-2"},Ia={fontFamily:"var(--font-button)",fontSize:"var(--text-button)",fontWeight:"var(--weight-label)"};function lr({children:t,content:r,placement:a="top",className:o=""}){const[s,l]=f.useState(!1);return e.jsxs("div",{className:`relative inline-flex ${o}`,onMouseEnter:()=>l(!0),onMouseLeave:()=>l(!1),onFocus:()=>l(!0),onBlur:()=>l(!1),children:[t,s&&e.jsx("div",{className:`absolute ${Ta[a]} z-50 px-3 py-1.5 rounded-[var(--radius-sm)] bg-foreground text-background whitespace-nowrap shadow-md`,style:Ia,role:"tooltip",children:r})]})}lr.displayName="Tooltip";const We={fontFamily:"var(--font-button)",fontSize:"var(--text-button)",fontWeight:"var(--weight-button)"};function ir({brand:t,breadcrumbs:r,actions:a,user:o,height:s="72px",showSearch:l=!1,searchPlaceholder:n="Search... (Ctrl+K)",onSearchClick:i,notificationCount:d,onNotificationClick:h,onMobileMenuClick:u,onUserClick:p,onBreadcrumbClick:v,className:c=""}){const S=o!=null&&o.name?o.name.split(" ").map(w=>w[0]).join("").slice(0,2).toUpperCase():"";return e.jsxs("div",{className:`bg-card border-b border-border flex items-center px-5 gap-4 ${c}`,style:{height:s},children:[u&&e.jsx("button",{className:"lg:hidden w-8 h-8 flex items-center justify-center rounded-[var(--radius-md)] text-foreground hover:bg-muted/30 transition-colors cursor-pointer",onClick:u,children:e.jsx(Dr,{size:16})}),t&&e.jsx(e.Fragment,{children:typeof t.logo=="string"?e.jsx("img",{src:t.logo,alt:t.name,className:"w-8 h-8 rounded-[var(--radius-sm)] flex-shrink-0 object-cover"}):t.logo?e.jsx("div",{className:"w-8 h-8 rounded-[var(--radius-sm)] overflow-hidden flex-shrink-0",children:t.logo}):e.jsx("div",{className:"w-8 h-8 rounded-[var(--radius-sm)] bg-primary flex items-center justify-center text-primary-foreground flex-shrink-0",style:We,children:t.name.charAt(0).toUpperCase()})}),r&&r.length>0&&e.jsx("nav",{className:"hidden sm:flex items-center gap-1.5 text-muted-foreground",style:We,children:r.map((w,b)=>e.jsxs(f.Fragment,{children:[b>0&&e.jsx(ee,{size:12}),w.href||v?e.jsx("span",{className:`cursor-pointer ${b===r.length-1?"text-foreground":"hover:text-foreground"}`,onClick:()=>v==null?void 0:v(w,b),children:w.label}):e.jsx("span",{className:b===r.length-1?"text-foreground":"",children:w.label})]},b))}),e.jsx("div",{className:"flex-1"}),l&&e.jsxs("div",{className:"hidden md:flex items-center gap-2 px-3 h-8 rounded-[var(--radius)] border border-border bg-muted/20 text-muted-foreground w-56 cursor-pointer hover:border-primary/40 transition-colors",onClick:i,children:[e.jsx($e,{size:14}),e.jsx("span",{style:We,children:n})]}),a,h&&e.jsxs("button",{className:"relative w-8 h-8 flex items-center justify-center rounded-[var(--radius-md)] text-muted-foreground hover:text-foreground hover:bg-muted/30 transition-colors cursor-pointer",onClick:h,children:[e.jsx(ot,{size:16}),d!==void 0&&d>0&&e.jsx("span",{className:"absolute top-1 right-1 w-2 h-2 rounded-full bg-destructive"})]}),o&&e.jsx("div",{className:"cursor-pointer",onClick:p,children:o.avatar?e.jsx("img",{src:o.avatar,alt:o.name,className:"w-8 h-8 rounded-full object-cover"}):e.jsx("div",{className:"w-8 h-8 rounded-full bg-primary text-primary-foreground flex items-center justify-center",style:We,children:S})})]})}ir.displayName="TopNavbar";const Ea={fontFamily:"var(--font-label)",fontSize:"var(--text-label)",fontWeight:"var(--weight-label)"},Ba={fontFamily:"var(--font-label)",fontSize:"var(--text-label)",fontWeight:"var(--weight-button)"},Ke={fontFamily:"var(--font-button)",fontSize:"var(--text-button)",fontWeight:"var(--weight-label)"};function dr({title:t,items:r,selected:a,onToggle:o,search:s,onSearch:l,searchable:n}){return e.jsxs("div",{className:"flex-1 min-w-[180px] rounded-[var(--radius-lg)] border border-border bg-card overflow-hidden",children:[e.jsxs("div",{className:"px-3 py-2.5 border-b border-border bg-muted/30 flex items-center justify-between",children:[e.jsx("span",{className:"text-foreground",style:Ba,children:t}),e.jsxs("span",{className:"text-muted-foreground",style:Ke,children:[r.length," items"]})]}),n&&e.jsxs("div",{className:"px-3 py-2 border-b border-border flex items-center gap-2",children:[e.jsx($e,{size:12,className:"text-muted-foreground"}),e.jsx("input",{value:s,onChange:i=>l(i.target.value),placeholder:"Search\\u2026",className:"flex-1 bg-transparent outline-none text-foreground placeholder:text-muted-foreground",style:Ke})]}),e.jsxs("div",{className:"max-h-[240px] overflow-y-auto py-1",children:[r.length===0&&e.jsx("div",{className:"px-3 py-6 text-center text-muted-foreground",style:Ke,children:"No items"}),r.map(i=>e.jsxs("button",{onClick:()=>!i.disabled&&o(i.id),className:`w-full flex items-center gap-2 px-3 py-1.5 transition-colors cursor-pointer
342
342
  ${a.has(i.id)?"bg-primary/10":"hover:bg-accent"}
343
- ${i.disabled?"opacity-40 pointer-events-none":""}`,style:Ia,children:[e.jsx("span",{className:`w-4 h-4 rounded-[var(--radius-sm)] border flex items-center justify-center flex-shrink-0
344
- ${a.has(i.id)?"bg-primary border-primary":"border-border"}`,children:a.has(i.id)&&e.jsx("span",{className:"w-2 h-2 rounded-[1px] bg-primary-foreground"})}),e.jsx("span",{className:"text-foreground truncate",children:i.label})]},i.id))]})]})}function Ha({sourceTitle:t="Available",targetTitle:r="Selected",items:a,defaultTarget:o=[],searchable:s}){const[l,n]=c.useState(new Set(o)),[i,d]=c.useState(new Set),[h,f]=c.useState(new Set),[p,v]=c.useState(""),[u,y]=c.useState(""),S=a.filter(k=>!l.has(k.id)),b=a.filter(k=>l.has(k.id)),N=p?S.filter(k=>k.label.toLowerCase().includes(p.toLowerCase())):S,j=u?b.filter(k=>k.label.toLowerCase().includes(u.toLowerCase())):b,M=()=>{n(k=>{const $=new Set(k);return i.forEach(_=>$.add(_)),$}),d(new Set)},w=()=>{n(k=>{const $=new Set(k);return h.forEach(_=>$.delete(_)),$}),f(new Set)},L=()=>{n(new Set(a.filter(k=>!k.disabled).map(k=>k.id))),d(new Set)},T=()=>{n(new Set),f(new Set)},I=(k,$,_)=>{const B=new Set($);B.has(k)?B.delete(k):B.add(k),_(B)};return e.jsxs("div",{className:"flex items-stretch gap-3 flex-wrap",children:[e.jsx(dr,{title:t,items:N,selected:i,onToggle:k=>I(k,i,d),search:p,onSearch:v,searchable:s}),e.jsxs("div",{className:"flex flex-col items-center justify-center gap-1.5 py-4",children:[e.jsx("button",{onClick:L,disabled:S.length===0,className:"w-8 h-8 flex items-center justify-center rounded-[var(--radius-md)] border border-border text-muted-foreground hover:text-foreground hover:bg-accent disabled:opacity-30 transition-colors cursor-pointer",children:e.jsx(Te,{size:14})}),e.jsx("button",{onClick:M,disabled:i.size===0,className:"w-8 h-8 flex items-center justify-center rounded-[var(--radius-md)] border border-border text-muted-foreground hover:text-foreground hover:bg-accent disabled:opacity-30 transition-colors cursor-pointer",children:e.jsx(ee,{size:14})}),e.jsx("button",{onClick:w,disabled:h.size===0,className:"w-8 h-8 flex items-center justify-center rounded-[var(--radius-md)] border border-border text-muted-foreground hover:text-foreground hover:bg-accent disabled:opacity-30 transition-colors cursor-pointer",children:e.jsx(pe,{size:14})}),e.jsx("button",{onClick:T,disabled:b.length===0,className:"w-8 h-8 flex items-center justify-center rounded-[var(--radius-md)] border border-border text-muted-foreground hover:text-foreground hover:bg-accent disabled:opacity-30 transition-colors cursor-pointer",children:e.jsx(De,{size:14})})]}),e.jsx(dr,{title:r,items:j,selected:h,onToggle:k=>I(k,h,f),search:u,onSearch:y,searchable:s})]})}const Ya={fontFamily:"var(--font-label)",fontSize:"var(--text-label)",fontWeight:"var(--weight-label)"};function cr({node:t,level:r,expanded:a,selected:o,onToggle:s,onSelect:l,selectable:n,showLines:i}){const d=t.children&&t.children.length>0,h=a.has(t.id),f=o.has(t.id),p=d?h?e.jsx(Wr,{size:14,className:"text-chart-5"}):e.jsx(Cr,{size:14,className:"text-chart-5"}):e.jsx(it,{size:14,className:"text-muted-foreground"});return e.jsxs("div",{children:[e.jsxs("div",{className:`flex items-center gap-1.5 py-1 px-2 rounded-[var(--radius-sm)] transition-colors
343
+ ${i.disabled?"opacity-40 pointer-events-none":""}`,style:Ea,children:[e.jsx("span",{className:`w-4 h-4 rounded-[var(--radius-sm)] border flex items-center justify-center flex-shrink-0
344
+ ${a.has(i.id)?"bg-primary border-primary":"border-border"}`,children:a.has(i.id)&&e.jsx("span",{className:"w-2 h-2 rounded-[1px] bg-primary-foreground"})}),e.jsx("span",{className:"text-foreground truncate",children:i.label})]},i.id))]})]})}function Ha({sourceTitle:t="Available",targetTitle:r="Selected",items:a,defaultTarget:o=[],searchable:s,value:l,onChange:n}){const[i,d]=f.useState(new Set(o)),h=l!==void 0?new Set(l):i,u=k=>{n&&n(Array.from(k)),l===void 0&&d(k)},[p,v]=f.useState(new Set),[c,S]=f.useState(new Set),[w,b]=f.useState(""),[m,A]=f.useState(""),N=a.filter(k=>!h.has(k.id)),$=a.filter(k=>h.has(k.id)),C=w?N.filter(k=>k.label.toLowerCase().includes(w.toLowerCase())):N,L=m?$.filter(k=>k.label.toLowerCase().includes(m.toLowerCase())):$,D=()=>{const k=new Set(h);p.forEach(y=>k.add(y)),u(k),v(new Set)},B=()=>{const k=new Set(h);c.forEach(y=>k.delete(y)),u(k),S(new Set)},z=()=>{u(new Set(a.filter(k=>!k.disabled).map(k=>k.id))),v(new Set)},F=()=>{u(new Set),S(new Set)},H=(k,y,T)=>{const O=new Set(y);O.has(k)?O.delete(k):O.add(k),T(O)};return e.jsxs("div",{className:"flex items-stretch gap-3 flex-wrap",children:[e.jsx(dr,{title:t,items:C,selected:p,onToggle:k=>H(k,p,v),search:w,onSearch:b,searchable:s}),e.jsxs("div",{className:"flex flex-col items-center justify-center gap-1.5 py-4",children:[e.jsx("button",{onClick:z,disabled:N.length===0,className:"w-8 h-8 flex items-center justify-center rounded-[var(--radius-md)] border border-border text-muted-foreground hover:text-foreground hover:bg-accent disabled:opacity-30 transition-colors cursor-pointer",children:e.jsx(Ie,{size:14})}),e.jsx("button",{onClick:D,disabled:p.size===0,className:"w-8 h-8 flex items-center justify-center rounded-[var(--radius-md)] border border-border text-muted-foreground hover:text-foreground hover:bg-accent disabled:opacity-30 transition-colors cursor-pointer",children:e.jsx(ee,{size:14})}),e.jsx("button",{onClick:B,disabled:c.size===0,className:"w-8 h-8 flex items-center justify-center rounded-[var(--radius-md)] border border-border text-muted-foreground hover:text-foreground hover:bg-accent disabled:opacity-30 transition-colors cursor-pointer",children:e.jsx(pe,{size:14})}),e.jsx("button",{onClick:F,disabled:$.length===0,className:"w-8 h-8 flex items-center justify-center rounded-[var(--radius-md)] border border-border text-muted-foreground hover:text-foreground hover:bg-accent disabled:opacity-30 transition-colors cursor-pointer",children:e.jsx(Te,{size:14})})]}),e.jsx(dr,{title:r,items:L,selected:c,onToggle:k=>H(k,c,S),search:m,onSearch:A,searchable:s})]})}const Ya={fontFamily:"var(--font-label)",fontSize:"var(--text-label)",fontWeight:"var(--weight-label)"};function cr({node:t,level:r,expanded:a,selected:o,onToggle:s,onSelect:l,selectable:n,showLines:i}){const d=t.children&&t.children.length>0,h=a.has(t.id),u=o.has(t.id),p=d?h?e.jsx(Mr,{size:14,className:"text-chart-5"}):e.jsx(Cr,{size:14,className:"text-chart-5"}):e.jsx(it,{size:14,className:"text-muted-foreground"});return e.jsxs("div",{children:[e.jsxs("div",{className:`flex items-center gap-1.5 py-1 px-2 rounded-[var(--radius-sm)] transition-colors
345
345
  ${t.disabled?"opacity-40 pointer-events-none":"cursor-pointer hover:bg-accent"}
346
- ${f?"bg-primary/10 text-primary":"text-foreground"}`,style:{paddingLeft:`${r*20+8}px`,...Ya},onClick:()=>{d&&s(t.id),n&&l(t.id)},children:[d?e.jsx("span",{className:"w-4 h-4 flex items-center justify-center flex-shrink-0",children:h?e.jsx(we,{size:12}):e.jsx(ee,{size:12})}):e.jsx("span",{className:"w-4"}),n&&e.jsx("span",{className:`w-4 h-4 rounded-[var(--radius-sm)] border flex items-center justify-center flex-shrink-0 ${f?"bg-primary border-primary":"border-border"}`,children:f&&e.jsx("span",{className:"w-2 h-2 rounded-[1px] bg-primary-foreground"})}),e.jsx("span",{className:"flex-shrink-0",children:t.icon||p}),e.jsx("span",{className:"truncate",children:t.label})]}),d&&h&&e.jsx("div",{className:i?"border-l border-border ml-[22px]":"",children:t.children.map(v=>e.jsx(cr,{node:v,level:r+1,expanded:a,selected:o,onToggle:s,onSelect:l,selectable:n,showLines:i},v.id))})]})}function qa({data:t,selectable:r,showLines:a,defaultExpanded:o}){const[s,l]=c.useState(new Set(o||[])),[n,i]=c.useState(new Set),d=f=>l(p=>{const v=new Set(p);return v.has(f)?v.delete(f):v.add(f),v}),h=f=>i(p=>{const v=new Set(p);return v.has(f)?v.delete(f):v.add(f),v});return e.jsx("div",{className:"rounded-[var(--radius-md)] border border-border bg-card py-1",children:t.map(f=>e.jsx(cr,{node:f,level:0,expanded:s,selected:n,onToggle:d,onSelect:h,selectable:r,showLines:a},f.id))})}x.Accordion=Ft,x.AccordionItem=He,x.Alert=xt,x.Avatar=Wt,x.AvatarGroup=Ct,x.Badge=Qr,x.Breadcrumb=Wo,x.ButtonGroup=Gr,x.Card=Lt,x.CardBody=At,x.CardFooter=Dt,x.CardHeader=jt,x.CheckboxGroup=eo,x.ColorPicker=Eo,x.ConfirmDialog=ho,x.DSButton=ut,x.DSCheckbox=Rr,x.DSInput=yt,x.DSRadio=ro,x.DSTable=xo,x.DSTextarea=mt,x.DatePicker=co,x.Divider=Et,x.Drawer=It,x.Dropdown=Bt,x.EmptyState=Uo,x.FileUpload=Zo,x.IconButton=bt,x.ImagePreview=Qo,x.Menu=Gt,x.Modal=_t,x.Notification=Xt,x.NotificationCenter=oa,x.Pagination=po,x.Popover=sa,x.ProgressBar=Zt,x.RadioGroup=oo,x.Rating=ca,x.SearchField=mo,x.Sidebar=Jt,x.Skeleton=K,x.SkeletonCard=ba,x.SkeletonList=pa,x.SkeletonTable=ga,x.Spinner=Pt,x.StatCard=xa,x.Statistic=ma,x.Stepper=or,x.Switch=_a,x.Tabs=wo,x.Tag=ar,x.TagInput=sr,x.Timeline=Da,x.ToastContainer=Xr,x.Tooltip=lr,x.TopNavbar=ir,x.TransferList=Ha,x.Tree=qa,x.toast=le,Object.defineProperty(x,Symbol.toStringTag,{value:"Module"})}));
346
+ ${u?"bg-primary/10 text-primary":"text-foreground"}`,style:{paddingLeft:`${r*20+8}px`,...Ya},onClick:()=>{d&&s(t.id),n&&l(t.id)},children:[d?e.jsx("span",{className:"w-4 h-4 flex items-center justify-center flex-shrink-0",children:h?e.jsx(we,{size:12}):e.jsx(ee,{size:12})}):e.jsx("span",{className:"w-4"}),n&&e.jsx("span",{className:`w-4 h-4 rounded-[var(--radius-sm)] border flex items-center justify-center flex-shrink-0 ${u?"bg-primary border-primary":"border-border"}`,children:u&&e.jsx("span",{className:"w-2 h-2 rounded-[1px] bg-primary-foreground"})}),e.jsx("span",{className:"flex-shrink-0",children:t.icon||p}),e.jsx("span",{className:"truncate",children:t.label})]}),d&&h&&e.jsx("div",{className:i?"border-l border-border ml-[22px]":"",children:t.children.map(v=>e.jsx(cr,{node:v,level:r+1,expanded:a,selected:o,onToggle:s,onSelect:l,selectable:n,showLines:i},v.id))})]})}function qa({data:t,selectable:r,showLines:a,defaultExpanded:o,expandedItems:s,onExpandChange:l,selectedItems:n,onSelect:i}){const[d,h]=f.useState(new Set(o||[])),[u,p]=f.useState(new Set),v=s!==void 0?new Set(s):d,c=n!==void 0?new Set(n):u,S=b=>{const m=new Set(v);m.has(b)?m.delete(b):m.add(b),l&&l(Array.from(m)),s===void 0&&h(m)},w=b=>{const m=new Set(c);m.has(b)?m.delete(b):m.add(b),i&&i(Array.from(m)),n===void 0&&p(m)};return e.jsx("div",{className:"rounded-[var(--radius-md)] border border-border bg-card py-1",children:t.map(b=>e.jsx(cr,{node:b,level:0,expanded:v,selected:c,onToggle:S,onSelect:w,selectable:r,showLines:a},b.id))})}x.Accordion=Ft,x.AccordionItem=Ye,x.Alert=xt,x.Avatar=Mt,x.AvatarGroup=Ct,x.Badge=Qr,x.Breadcrumb=Mo,x.ButtonGroup=Gr,x.Card=Lt,x.CardBody=At,x.CardFooter=Dt,x.CardHeader=jt,x.CheckboxGroup=eo,x.ColorPicker=Io,x.ConfirmDialog=ho,x.DSButton=ut,x.DSCheckbox=Rr,x.DSInput=yt,x.DSRadio=ro,x.DSTable=xo,x.DSTextarea=mt,x.DatePicker=co,x.Divider=It,x.Drawer=Et,x.Dropdown=Bt,x.EmptyState=Uo,x.FileUpload=Zo,x.IconButton=bt,x.ImagePreview=Qo,x.Menu=Gt,x.Modal=_t,x.Notification=Xt,x.NotificationCenter=oa,x.Pagination=po,x.Popover=sa,x.ProgressBar=Zt,x.RadioGroup=oo,x.Rating=ca,x.SearchField=mo,x.Sidebar=Jt,x.Skeleton=X,x.SkeletonCard=ba,x.SkeletonList=pa,x.SkeletonTable=ga,x.Spinner=Pt,x.StatCard=xa,x.Statistic=ma,x.Stepper=or,x.Switch=_a,x.Tabs=wo,x.Tag=ar,x.TagInput=sr,x.Timeline=Da,x.ToastContainer=Xr,x.Tooltip=lr,x.TopNavbar=ir,x.TransferList=Ha,x.Tree=qa,x.toast=le,Object.defineProperty(x,Symbol.toStringTag,{value:"Module"})}));
347
347
  //# sourceMappingURL=sellsuki-ds.umd.cjs.map