zabi-components 1.0.3 → 1.0.5

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.
@@ -0,0 +1,2277 @@
1
+ import { a0 as wa, u as se, a1 as ka, a as sa, p as t, C as m, D as Ye, i as Ae, f as u, _ as za, c as w, s as la, e as q, g as r, h as Te, j as He, r as l, l as e, m as i, n as s, o as L, k as n, x as ca, w as ke, b as me, t as N, B as ce, M as ia, d as Ue, G as We, q as K, F as de, v as T, $ as oa, P as aa, y as da, z as Ca, I as Je, H as Qe, J as Ze, K as $e, L as ea, A as qa, a2 as ja, X as va, E as ta, a3 as ha, a4 as ma, a5 as ya, N as ua, O as fa, a6 as Ea, Y as xa, a7 as Ba, Z as La } from "./x-DpVwziig.js";
2
+ import { createEventDispatcher as Xe, onMount as ba } from "svelte";
3
+ function Na(M, a, c = a) {
4
+ wa(M, "change", (d) => {
5
+ var f = d ? M.defaultChecked : M.checked;
6
+ c(f);
7
+ }), // If we are hydrating and the value has since changed,
8
+ // then use the update value from the input instead.
9
+ // If defaultChecked is set, then checked == defaultChecked
10
+ se(a) == null && c(M.checked), ka(() => {
11
+ var d = a();
12
+ M.checked = !!d;
13
+ });
14
+ }
15
+ var Ta = ca('<svg class="animate-spin h-4 w-4 svelte-v0x5nl" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" aria-hidden="true"><circle class="opacity-25" cx="12" cy="12" r="10" stroke="currentColor" stroke-width="4"></circle><path class="opacity-75" fill="currentColor" d="M4 12a8 8 0 018-8v4a4 4 0 00-4 4H4z"></path></svg>'), Ha = u('<span class="h-4 w-4 flex items-center justify-center"> </span>'), Ma = u('<span class="h-4 w-4 flex items-center justify-center"> </span>'), Sa = u("<button><!> <!> <!> <!></button>");
16
+ const Pa = {
17
+ hash: "svelte-v0x5nl",
18
+ code: `
19
+ /* Ensure proper focus styles for reduced motion users */
20
+ @media (prefers-reduced-motion: reduce) {button.svelte-v0x5nl {transition:none;}
21
+ }
22
+
23
+ /* Ensure proper contrast for disabled state */button.svelte-v0x5nl:disabled {opacity:0.6;}
24
+
25
+ /* Loading state animation */
26
+ @keyframes svelte-v0x5nl-spin {
27
+ from {
28
+ transform: rotate(0deg);
29
+ }
30
+ to {
31
+ transform: rotate(360deg);
32
+ }
33
+ }.animate-spin.svelte-v0x5nl {
34
+ animation: svelte-v0x5nl-spin 1s linear infinite;}`
35
+ };
36
+ function or(M, a) {
37
+ He(a, !1), sa(M, Pa);
38
+ const c = i(), d = i();
39
+ let f = t(a, "variant", 8, "primary"), F = t(a, "size", 8, "md"), v = t(a, "disabled", 8, !1), y = t(a, "loading", 8, !1), O = t(a, "type", 8, "button"), j = t(a, "className", 8, ""), V = t(a, "iconLeft", 8, null), W = t(a, "iconRight", 8, null), J = t(a, "ariaLabel", 8, ""), E = t(a, "ariaDescribedBy", 8, ""), S = t(a, "ariaExpanded", 8, void 0), Q = t(a, "ariaControls", 8, void 0), B = t(a, "ariaPressed", 8, void 0);
40
+ const g = Xe();
41
+ function k(X) {
42
+ var te;
43
+ if (v() || y()) {
44
+ X.preventDefault();
45
+ return;
46
+ }
47
+ g("click", { value: !0, event: ((te = X.detail) == null ? void 0 : te.event) || X });
48
+ }
49
+ function H(X) {
50
+ v() || y() || (X.key === "Enter" || X.key === " ") && (X.preventDefault(), g("click", { value: !0, event: X }));
51
+ }
52
+ const p = "inline-flex items-center justify-center gap-2 font-medium transition-all duration-200 disabled:opacity-50 disabled:cursor-not-allowed focus:outline-none focus:ring-2 focus:ring-offset-2 relative overflow-hidden", Y = {
53
+ sm: "px-3 py-1.5 text-sm rounded-md",
54
+ md: "px-4 py-2 text-sm rounded-md",
55
+ lg: "px-5 py-3 text-base rounded-lg"
56
+ }, R = {
57
+ primary: [
58
+ "bg-[var(--zabi-primary)] text-[var(--zabi-text-inverse)] border border-[var(--zabi-primary)]",
59
+ "hover:bg-[var(--zabi-primary-hover)] hover:border-[var(--zabi-primary-hover)]",
60
+ "active:bg-[var(--zabi-primary-active)] active:border-[var(--zabi-primary-active)]",
61
+ "focus:ring-2 focus:ring-[var(--zabi-focus-ring)] focus:ring-offset-2",
62
+ "shadow-sm hover:shadow-md"
63
+ ].join(" "),
64
+ secondary: [
65
+ "bg-[var(--zabi-surface)] text-[var(--zabi-text)] border border-[var(--zabi-border)]",
66
+ "hover:bg-[var(--zabi-surface-hover)] hover:border-[var(--zabi-border-hover)]",
67
+ "active:bg-[var(--zabi-surface-active)] active:border-[var(--zabi-border-hover)]",
68
+ "focus:ring-2 focus:ring-[var(--zabi-focus-ring)] focus:ring-offset-2",
69
+ "shadow-sm hover:shadow-md"
70
+ ].join(" "),
71
+ success: [
72
+ "bg-[var(--zabi-success)] text-[var(--zabi-text-inverse)] border border-[var(--zabi-success)]",
73
+ "hover:bg-[var(--zabi-success-hover)] hover:border-[var(--zabi-success-hover)]",
74
+ "active:bg-[var(--zabi-success-active)] active:border-[var(--zabi-success-active)]",
75
+ "focus:ring-2 focus:ring-[var(--zabi-focus-ring)] focus:ring-offset-2",
76
+ "shadow-sm hover:shadow-md"
77
+ ].join(" "),
78
+ warning: [
79
+ "bg-[var(--zabi-warning)] text-[var(--zabi-text-inverse)] border border-[var(--zabi-warning)]",
80
+ "hover:bg-[var(--zabi-warning-hover)] hover:border-[var(--zabi-warning-hover)]",
81
+ "active:bg-[var(--zabi-warning-active)] active:border-[var(--zabi-warning-active)]",
82
+ "focus:ring-2 focus:ring-[var(--zabi-focus-ring)] focus:ring-offset-2",
83
+ "shadow-sm hover:shadow-md"
84
+ ].join(" "),
85
+ danger: [
86
+ "bg-[var(--zabi-error)] text-[var(--zabi-text-inverse)] border border-[var(--zabi-error)]",
87
+ "hover:bg-[var(--zabi-error-hover)] hover:border-[var(--zabi-error-hover)]",
88
+ "active:bg-[var(--zabi-error-active)] active:border-[var(--zabi-error-active)]",
89
+ "focus:ring-2 focus:ring-[var(--zabi-focus-ring)] focus:ring-offset-2",
90
+ "shadow-sm hover:shadow-md"
91
+ ].join(" "),
92
+ info: [
93
+ "bg-[var(--zabi-info)] text-[var(--zabi-text-inverse)] border border-[var(--zabi-info)]",
94
+ "hover:bg-[var(--zabi-info-hover)] hover:border-[var(--zabi-info-hover)]",
95
+ "active:bg-[var(--zabi-info-active)] active:border-[var(--zabi-info-active)]",
96
+ "focus:ring-2 focus:ring-[var(--zabi-focus-ring)] focus:ring-offset-2",
97
+ "shadow-sm hover:shadow-md"
98
+ ].join(" ")
99
+ }, A = v() ? [
100
+ "bg-[var(--zabi-surface-disabled)] text-[var(--zabi-text-disabled)] border-[var(--zabi-border-disabled)]",
101
+ "hover:bg-[var(--zabi-surface-disabled)] hover:text-[var(--zabi-text-disabled)] hover:border-[var(--zabi-border-disabled)]",
102
+ "active:bg-[var(--zabi-surface-disabled)] active:text-[var(--zabi-text-disabled)] active:border-[var(--zabi-border-disabled)]",
103
+ "shadow-none"
104
+ ].join(" ") : "";
105
+ y(), m(
106
+ () => (l(F()), l(v()), l(f()), l(j())),
107
+ () => {
108
+ n(c, [
109
+ p,
110
+ Y[F()],
111
+ v() ? A : R[f()],
112
+ j()
113
+ ].filter(Boolean).join(" "));
114
+ }
115
+ ), m(
116
+ () => (l(y()), l(J()), l(E()), l(S()), l(Q()), l(B()), l(v())),
117
+ () => {
118
+ n(d, {
119
+ "aria-busy": y(),
120
+ "aria-label": J() || (y() ? "Loading..." : void 0),
121
+ "aria-describedby": E() || void 0,
122
+ "aria-expanded": S(),
123
+ "aria-controls": Q(),
124
+ "aria-pressed": B(),
125
+ "aria-disabled": v()
126
+ });
127
+ }
128
+ ), Ye(), Ae();
129
+ var ee = Sa();
130
+ za(
131
+ ee,
132
+ () => ({
133
+ type: O(),
134
+ class: e(c),
135
+ disabled: v() || y(),
136
+ ...e(d)
137
+ }),
138
+ void 0,
139
+ void 0,
140
+ "svelte-v0x5nl"
141
+ );
142
+ var le = s(ee);
143
+ {
144
+ var be = (X) => {
145
+ var te = Ta();
146
+ r(X, te);
147
+ };
148
+ w(le, (X) => {
149
+ y() && X(be);
150
+ });
151
+ }
152
+ var ve = L(le, 2);
153
+ {
154
+ var oe = (X) => {
155
+ var te = ke(), P = me(te);
156
+ {
157
+ var Z = (z) => {
158
+ var C = Ha(), U = s(C);
159
+ N(() => ce(U, V())), r(z, C);
160
+ }, D = (z) => {
161
+ var C = ke(), U = me(C);
162
+ ia(U, V, (pe, qe) => {
163
+ qe(pe, { class: "h-4 w-4" });
164
+ }), r(z, C);
165
+ };
166
+ w(P, (z) => {
167
+ typeof V() == "string" ? z(Z) : z(D, !1);
168
+ });
169
+ }
170
+ r(X, te);
171
+ };
172
+ w(ve, (X) => {
173
+ V() && !y() && X(oe);
174
+ });
175
+ }
176
+ var xe = L(ve, 2);
177
+ la(xe, a, "default", {}, null);
178
+ var ze = L(xe, 2);
179
+ {
180
+ var Ce = (X) => {
181
+ var te = ke(), P = me(te);
182
+ {
183
+ var Z = (z) => {
184
+ var C = Ma(), U = s(C);
185
+ N(() => ce(U, W())), r(z, C);
186
+ }, D = (z) => {
187
+ var C = ke(), U = me(C);
188
+ ia(U, W, (pe, qe) => {
189
+ qe(pe, { class: "h-4 w-4" });
190
+ }), r(z, C);
191
+ };
192
+ w(P, (z) => {
193
+ typeof W() == "string" ? z(Z) : z(D, !1);
194
+ });
195
+ }
196
+ r(X, te);
197
+ };
198
+ w(ze, (X) => {
199
+ W() && !y() && X(Ce);
200
+ });
201
+ }
202
+ q("click", ee, k), q("keydown", ee, H), r(M, ee), Te();
203
+ }
204
+ var Ia = ca('<svg fill="currentColor" viewBox="0 0 20 20"><path fill-rule="evenodd" d="M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z" clip-rule="evenodd" class="svelte-1wpeqgu"></path></svg>'), Oa = ca('<svg fill="currentColor" viewBox="0 0 20 20"><path fill-rule="evenodd" d="M3 10a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1z" clip-rule="evenodd" class="svelte-1wpeqgu"></path></svg>'), Da = u('<span class="text-error ml-1 svelte-1wpeqgu">*</span>'), Fa = u("<label> <!></label>"), Ra = u('<div class="flex items-center gap-1 svelte-1wpeqgu"><svg class="w-3 h-3 flex-shrink-0 svelte-1wpeqgu" fill="currentColor" viewBox="0 0 20 20"><path fill-rule="evenodd" d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7 4a1 1 0 11-2 0 1 1 0 012 0zm-1-9a1 1 0 00-1 1v4a1 1 0 102 0V6a1 1 0 00-1-1z" clip-rule="evenodd" class="svelte-1wpeqgu"></path></svg> <span class="svelte-1wpeqgu"> </span></div>'), Ka = u('<span class="svelte-1wpeqgu"> </span>'), Wa = u("<div><!></div>"), Aa = u('<div><div class="relative svelte-1wpeqgu"><input type="checkbox" class="sr-only svelte-1wpeqgu"/> <div><!></div> <div></div></div> <div class="flex-1 min-w-0 svelte-1wpeqgu"><!> <!></div></div>');
205
+ const Xa = {
206
+ hash: "svelte-1wpeqgu",
207
+ code: `
208
+ /* Custom focus styles for better accessibility */.checkbox-focus-visible {outline:2px solid var(--color-plasma-red-500);outline-offset:2px;}
209
+
210
+ /* Smooth transitions for all interactive elements */.checkbox-input.svelte-1wpeqgu {transition:all 0.2s cubic-bezier(0.4, 0, 0.2, 1);}
211
+
212
+ /* Hover effects */.checkbox-container.svelte-1wpeqgu:hover .checkbox-visual:where(.svelte-1wpeqgu) {transform:scale(1.05);}.checkbox-container.svelte-1wpeqgu:active .checkbox-visual:where(.svelte-1wpeqgu) {transform:scale(0.95);}
213
+
214
+ /* Check animation */.checkbox-check.svelte-1wpeqgu {
215
+ animation: svelte-1wpeqgu-checkbox-check 0.2s ease-out;}
216
+
217
+ @keyframes svelte-1wpeqgu-checkbox-check {
218
+ 0% {
219
+ opacity: 0;
220
+ transform: scale(0.8);
221
+ }
222
+ 100% {
223
+ opacity: 1;
224
+ transform: scale(1);
225
+ }
226
+ }
227
+
228
+ /* Indeterminate animation */.checkbox-indeterminate.svelte-1wpeqgu {
229
+ animation: svelte-1wpeqgu-checkbox-indeterminate 0.2s ease-out;}
230
+
231
+ @keyframes svelte-1wpeqgu-checkbox-indeterminate {
232
+ 0% {
233
+ opacity: 0;
234
+ transform: scaleX(0);
235
+ }
236
+ 100% {
237
+ opacity: 1;
238
+ transform: scaleX(1);
239
+ }
240
+ }
241
+
242
+ /* Focus ring animation */.checkbox-focus-ring.svelte-1wpeqgu {
243
+ animation: svelte-1wpeqgu-checkbox-focus-ring 0.2s ease-out;}
244
+
245
+ @keyframes svelte-1wpeqgu-checkbox-focus-ring {
246
+ 0% {
247
+ transform: scale(0.95);
248
+ opacity: 0;
249
+ }
250
+ 100% {
251
+ transform: scale(1);
252
+ opacity: 1;
253
+ }
254
+ }
255
+
256
+ /* Disabled state styling */.checkbox-disabled.svelte-1wpeqgu {opacity:0.5;cursor:not-allowed;}.checkbox-disabled.svelte-1wpeqgu:hover {transform:none;}
257
+
258
+ /* Required indicator styling */.checkbox-required.svelte-1wpeqgu {color:var(--color-blood-red-500);}`
259
+ };
260
+ function ir(M, a) {
261
+ He(a, !1), sa(M, Xa);
262
+ const c = i(), d = i(), f = i(), F = i(), v = i(), y = i(), O = i(), j = i(), V = i(), W = i();
263
+ let J = t(a, "checked", 12, !1), E = t(a, "disabled", 8, !1), S = t(a, "required", 8, !1), Q = t(a, "label", 8, ""), B = t(a, "helpText", 8, ""), g = t(a, "error", 8, ""), k = t(a, "size", 8, "md"), H = t(a, "variant", 8, "default"), p = t(a, "indeterminate", 8, !1), Y = t(a, "name", 8, void 0), R = t(a, "id", 8, void 0), A = t(a, "value", 8, void 0), ee = t(a, "className", 8, "");
264
+ const le = Xe();
265
+ let be = i(), ve = i(!1);
266
+ function oe(b) {
267
+ const $ = b.target;
268
+ J($.checked), le("change", { checked: J() });
269
+ }
270
+ function xe(b) {
271
+ n(ve, !0), le("focus", { event: b });
272
+ }
273
+ function ze(b) {
274
+ n(ve, !1), le("blur", { event: b });
275
+ }
276
+ function Ce() {
277
+ var b;
278
+ (b = e(be)) == null || b.focus();
279
+ }
280
+ function X() {
281
+ var b;
282
+ (b = e(be)) == null || b.blur();
283
+ }
284
+ m(() => l(R()), () => {
285
+ n(c, R() || `checkbox-${Math.random().toString(36).substr(2, 9)}`);
286
+ }), m(() => {
287
+ }, () => {
288
+ n(d, { sm: "w-4 h-4", md: "w-5 h-5", lg: "w-6 h-6" });
289
+ }), m(() => {
290
+ }, () => {
291
+ n(f, {
292
+ default: "bg-surface border border-primary text-primary focus:ring-primary focus:border-transparent",
293
+ outlined: "bg-surface-secondary border border-primary text-primary focus:ring-primary focus:border-transparent",
294
+ filled: "bg-surface-secondary border border-primary text-primary focus:ring-primary focus:border-transparent"
295
+ });
296
+ }), m(() => l(g()), () => {
297
+ n(F, g() ? "focus:ring-error border-error" : "");
298
+ }), m(() => l(ee()), () => {
299
+ n(v, [
300
+ "relative",
301
+ "flex",
302
+ "items-start",
303
+ "gap-3",
304
+ "group",
305
+ "transition-all",
306
+ "duration-200",
307
+ "ease-in-out",
308
+ ee()
309
+ ].join(" "));
310
+ }), m(
311
+ () => (e(d), l(k()), e(f), l(H()), e(F), l(g())),
312
+ () => {
313
+ n(y, [
314
+ "flex-shrink-0",
315
+ "rounded",
316
+ "transition-all",
317
+ "duration-200",
318
+ "ease-in-out",
319
+ "focus:outline-none",
320
+ "focus:ring-2",
321
+ "focus:ring-offset-2",
322
+ "focus:ring-offset-dark-900",
323
+ "disabled:opacity-50",
324
+ "disabled:cursor-not-allowed",
325
+ "cursor-pointer",
326
+ e(d)[k()],
327
+ e(f)[H()],
328
+ e(F),
329
+ g() ? "grainy-red" : "grainy-texture"
330
+ ].join(" "));
331
+ }
332
+ ), m(() => (l(g()), l(E())), () => {
333
+ n(O, [
334
+ "text-sm",
335
+ "font-medium",
336
+ "cursor-pointer",
337
+ "select-none",
338
+ "transition-colors",
339
+ "duration-200",
340
+ g() ? "text-error" : "text-primary",
341
+ E() ? "opacity-50 cursor-not-allowed" : ""
342
+ ].join(" "));
343
+ }), m(() => l(g()), () => {
344
+ n(j, ["text-xs", "mt-1", g() ? "text-error" : "text-tertiary"].join(" "));
345
+ }), m(() => {
346
+ }, () => {
347
+ n(V, [
348
+ "w-full",
349
+ "h-full",
350
+ "text-current",
351
+ "transition-all",
352
+ "duration-200",
353
+ "ease-in-out"
354
+ ].join(" "));
355
+ }), m(() => {
356
+ }, () => {
357
+ n(W, [
358
+ "w-full",
359
+ "h-full",
360
+ "text-current",
361
+ "transition-all",
362
+ "duration-200",
363
+ "ease-in-out"
364
+ ].join(" "));
365
+ }), Ye();
366
+ var te = { focus: Ce, blur: X };
367
+ Ae();
368
+ var P = Aa(), Z = s(P), D = s(Z);
369
+ Ue(D, (b) => n(be, b), () => e(be));
370
+ var z, C = L(D, 2), U = s(C);
371
+ {
372
+ var pe = (b) => {
373
+ var $ = Ia();
374
+ N(() => K($, 0, de(e(V)), "svelte-1wpeqgu")), r(b, $);
375
+ }, qe = (b) => {
376
+ var $ = ke(), Ee = me($);
377
+ {
378
+ var _e = (ue) => {
379
+ var ie = Oa();
380
+ N(() => K(ie, 0, de(e(W)), "svelte-1wpeqgu")), r(ue, ie);
381
+ };
382
+ w(
383
+ Ee,
384
+ (ue) => {
385
+ p() && ue(_e);
386
+ },
387
+ !0
388
+ );
389
+ }
390
+ r(b, $);
391
+ };
392
+ w(U, (b) => {
393
+ J() && !p() ? b(pe) : b(qe, !1);
394
+ });
395
+ }
396
+ var Se = L(C, 2), Pe = L(Z, 2), ae = s(Pe);
397
+ {
398
+ var ge = (b) => {
399
+ var $ = Fa(), Ee = s($), _e = L(Ee);
400
+ {
401
+ var ue = (ie) => {
402
+ var Le = Da();
403
+ r(ie, Le);
404
+ };
405
+ w(_e, (ie) => {
406
+ S() && ie(ue);
407
+ });
408
+ }
409
+ N(() => {
410
+ T($, "for", e(c)), K($, 1, de(e(O)), "svelte-1wpeqgu"), ce(Ee, `${Q() ?? ""} `);
411
+ }), r(b, $);
412
+ };
413
+ w(ae, (b) => {
414
+ Q() && b(ge);
415
+ });
416
+ }
417
+ var he = L(ae, 2);
418
+ {
419
+ var je = (b) => {
420
+ var $ = Wa(), Ee = s($);
421
+ {
422
+ var _e = (ie) => {
423
+ var Le = Ra(), fe = L(s(Le), 2), h = s(fe);
424
+ N(() => ce(h, g())), r(ie, Le);
425
+ }, ue = (ie) => {
426
+ var Le = ke(), fe = me(Le);
427
+ {
428
+ var h = (Ie) => {
429
+ var Ke = Ka(), Ge = s(Ke);
430
+ N(() => ce(Ge, B())), r(Ie, Ke);
431
+ };
432
+ w(
433
+ fe,
434
+ (Ie) => {
435
+ B() && Ie(h);
436
+ },
437
+ !0
438
+ );
439
+ }
440
+ r(ie, Le);
441
+ };
442
+ w(Ee, (ie) => {
443
+ g() ? ie(_e) : ie(ue, !1);
444
+ });
445
+ }
446
+ N(() => {
447
+ T($, "id", `${e(c) ?? ""}-help`), K($, 1, de(e(j)), "svelte-1wpeqgu");
448
+ }), r(b, $);
449
+ };
450
+ w(he, (b) => {
451
+ (g() || B()) && b(je);
452
+ });
453
+ }
454
+ return N(() => {
455
+ K(P, 1, de(e(v)), "svelte-1wpeqgu"), T(D, "id", e(c)), D.disabled = E(), D.required = S(), T(D, "name", Y()), T(D, "aria-invalid", g() ? "true" : "false"), T(D, "aria-describedby", g() || B() ? `${e(c)}-help` : void 0), z !== (z = A()) && (D.value = (D.__value = A()) ?? ""), K(C, 1, de(e(y)), "svelte-1wpeqgu"), K(Se, 1, `absolute inset-0 rounded pointer-events-none transition-all duration-200 ${e(ve) ? "ring-2 ring-primary" : ""}`, "svelte-1wpeqgu");
456
+ }), Na(D, J), q("change", D, oe), q("focus", D, xe), q("blur", D, ze), r(M, P), We(a, "focus", Ce), We(a, "blur", X), Te(te);
457
+ }
458
+ var Ga = u('<div role="menu" aria-orientation="vertical"><div class="max-h-full overflow-y-auto"><!></div></div>'), Va = u("<div><!></div> <!>", 1);
459
+ function Ya(M, a) {
460
+ He(a, !1);
461
+ let c = t(a, "isOpen", 8, !1), d = t(a, "placement", 8, "bottom-start"), f = t(a, "offset", 8, 8), F = t(a, "maxHeight", 8, "20rem"), v = t(a, "width", 8, "auto"), y = t(a, "zIndex", 8, 50);
462
+ const O = Xe();
463
+ let j = i(), V = i(), W;
464
+ function J() {
465
+ var be, ve, oe, xe, ze, Ce, X, te;
466
+ if (!e(V)) return { top: 0, left: 0 };
467
+ W = e(V).getBoundingClientRect();
468
+ const p = window.scrollY, Y = window.scrollX;
469
+ let R = W.bottom + p + f(), A = W.left + Y;
470
+ switch (d()) {
471
+ case "bottom-end":
472
+ A = W.right + Y - (((be = e(j)) == null ? void 0 : be.offsetWidth) || 0);
473
+ break;
474
+ case "top-start":
475
+ R = W.top + p - (((ve = e(j)) == null ? void 0 : ve.offsetHeight) || 0) - f();
476
+ break;
477
+ case "top-end":
478
+ R = W.top + p - (((oe = e(j)) == null ? void 0 : oe.offsetHeight) || 0) - f(), A = W.right + Y - (((xe = e(j)) == null ? void 0 : xe.offsetWidth) || 0);
479
+ break;
480
+ }
481
+ const ee = window.innerWidth, le = window.innerHeight;
482
+ return A < 0 && (A = 8), A + (((ze = e(j)) == null ? void 0 : ze.offsetWidth) || 0) > ee && (A = ee - (((Ce = e(j)) == null ? void 0 : Ce.offsetWidth) || 0) - 8), R < 0 && (R = 8), R + (((X = e(j)) == null ? void 0 : X.offsetHeight) || 0) > le + p && (R = le + p - (((te = e(j)) == null ? void 0 : te.offsetHeight) || 0) - 8), { top: R, left: A };
483
+ }
484
+ function E(p) {
485
+ c() && e(j) && !e(j).contains(p.target) && e(V) && !e(V).contains(p.target) && O("close");
486
+ }
487
+ function S(p) {
488
+ p.key === "Escape" && c() && O("close");
489
+ }
490
+ ba(() => (document.addEventListener("click", E), document.addEventListener("keydown", S), () => {
491
+ document.removeEventListener("click", E), document.removeEventListener("keydown", S);
492
+ })), m(
493
+ () => (l(c()), e(V), e(j)),
494
+ () => {
495
+ c() && e(V) && requestAnimationFrame(() => {
496
+ const p = J();
497
+ e(j) && (oa(j, e(j).style.top = `${p.top}px`), oa(j, e(j).style.left = `${p.left}px`));
498
+ });
499
+ }
500
+ ), Ye(), Ae();
501
+ var Q = Va(), B = me(Q), g = s(B);
502
+ la(g, a, "trigger", {}, null), Ue(B, (p) => n(V, p), () => e(V));
503
+ var k = L(B, 2);
504
+ {
505
+ var H = (p) => {
506
+ var Y = Ga(), R = s(Y), A = s(R);
507
+ la(A, a, "default", {}, null), Ue(Y, (ee) => n(j, ee), () => e(j)), N(() => {
508
+ K(Y, 1, `fixed z-${y() ?? ""} bg-stone-800 border border-stone-700 rounded-lg shadow-xl`), aa(Y, `max-height: ${F() ?? ""}; width: ${v() ?? ""};`);
509
+ }), da(3, Y, () => Ca, () => ({ y: -10, duration: 200 })), r(p, Y);
510
+ };
511
+ w(k, (p) => {
512
+ c() && p(H);
513
+ });
514
+ }
515
+ r(M, Q), Te();
516
+ }
517
+ function pa(M, a) {
518
+ He(a, !0);
519
+ /**
520
+ * @license @lucide/svelte v0.544.0 - ISC
521
+ *
522
+ * ISC License
523
+ *
524
+ * Copyright (c) for portions of Lucide are held by Cole Bemis 2013-2023 as part of Feather (MIT). All other copyright (c) for Lucide are held by Lucide Contributors 2025.
525
+ *
526
+ * Permission to use, copy, modify, and/or distribute this software for any
527
+ * purpose with or without fee is hereby granted, provided that the above
528
+ * copyright notice and this permission notice appear in all copies.
529
+ *
530
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
531
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
532
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
533
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
534
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
535
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
536
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
537
+ *
538
+ * ---
539
+ *
540
+ * The MIT License (MIT) (for portions derived from Feather)
541
+ *
542
+ * Copyright (c) 2013-2023 Cole Bemis
543
+ *
544
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
545
+ * of this software and associated documentation files (the "Software"), to deal
546
+ * in the Software without restriction, including without limitation the rights
547
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
548
+ * copies of the Software, and to permit persons to whom the Software is
549
+ * furnished to do so, subject to the following conditions:
550
+ *
551
+ * The above copyright notice and this permission notice shall be included in all
552
+ * copies or substantial portions of the Software.
553
+ *
554
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
555
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
556
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
557
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
558
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
559
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
560
+ * SOFTWARE.
561
+ *
562
+ */
563
+ let c = ea(a, ["$$slots", "$$events", "$$legacy"]);
564
+ const d = [["path", { d: "M20 6 9 17l-5-5" }]];
565
+ Je(M, Qe(
566
+ { name: "check" },
567
+ () => c,
568
+ {
569
+ get iconNode() {
570
+ return d;
571
+ },
572
+ children: (f, F) => {
573
+ var v = ke(), y = me(v);
574
+ Ze(y, () => a.children ?? $e), r(f, v);
575
+ },
576
+ $$slots: { default: !0 }
577
+ }
578
+ )), Te();
579
+ }
580
+ function Ua(M, a) {
581
+ He(a, !0);
582
+ /**
583
+ * @license @lucide/svelte v0.544.0 - ISC
584
+ *
585
+ * ISC License
586
+ *
587
+ * Copyright (c) for portions of Lucide are held by Cole Bemis 2013-2023 as part of Feather (MIT). All other copyright (c) for Lucide are held by Lucide Contributors 2025.
588
+ *
589
+ * Permission to use, copy, modify, and/or distribute this software for any
590
+ * purpose with or without fee is hereby granted, provided that the above
591
+ * copyright notice and this permission notice appear in all copies.
592
+ *
593
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
594
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
595
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
596
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
597
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
598
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
599
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
600
+ *
601
+ * ---
602
+ *
603
+ * The MIT License (MIT) (for portions derived from Feather)
604
+ *
605
+ * Copyright (c) 2013-2023 Cole Bemis
606
+ *
607
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
608
+ * of this software and associated documentation files (the "Software"), to deal
609
+ * in the Software without restriction, including without limitation the rights
610
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
611
+ * copies of the Software, and to permit persons to whom the Software is
612
+ * furnished to do so, subject to the following conditions:
613
+ *
614
+ * The above copyright notice and this permission notice shall be included in all
615
+ * copies or substantial portions of the Software.
616
+ *
617
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
618
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
619
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
620
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
621
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
622
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
623
+ * SOFTWARE.
624
+ *
625
+ */
626
+ let c = ea(a, ["$$slots", "$$events", "$$legacy"]);
627
+ const d = [["path", { d: "m6 9 6 6 6-6" }]];
628
+ Je(M, Qe(
629
+ { name: "chevron-down" },
630
+ () => c,
631
+ {
632
+ get iconNode() {
633
+ return d;
634
+ },
635
+ children: (f, F) => {
636
+ var v = ke(), y = me(v);
637
+ Ze(y, () => a.children ?? $e), r(f, v);
638
+ },
639
+ $$slots: { default: !0 }
640
+ }
641
+ )), Te();
642
+ }
643
+ function Ja(M, a) {
644
+ He(a, !0);
645
+ /**
646
+ * @license @lucide/svelte v0.544.0 - ISC
647
+ *
648
+ * ISC License
649
+ *
650
+ * Copyright (c) for portions of Lucide are held by Cole Bemis 2013-2023 as part of Feather (MIT). All other copyright (c) for Lucide are held by Lucide Contributors 2025.
651
+ *
652
+ * Permission to use, copy, modify, and/or distribute this software for any
653
+ * purpose with or without fee is hereby granted, provided that the above
654
+ * copyright notice and this permission notice appear in all copies.
655
+ *
656
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
657
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
658
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
659
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
660
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
661
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
662
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
663
+ *
664
+ * ---
665
+ *
666
+ * The MIT License (MIT) (for portions derived from Feather)
667
+ *
668
+ * Copyright (c) 2013-2023 Cole Bemis
669
+ *
670
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
671
+ * of this software and associated documentation files (the "Software"), to deal
672
+ * in the Software without restriction, including without limitation the rights
673
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
674
+ * copies of the Software, and to permit persons to whom the Software is
675
+ * furnished to do so, subject to the following conditions:
676
+ *
677
+ * The above copyright notice and this permission notice shall be included in all
678
+ * copies or substantial portions of the Software.
679
+ *
680
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
681
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
682
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
683
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
684
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
685
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
686
+ * SOFTWARE.
687
+ *
688
+ */
689
+ let c = ea(a, ["$$slots", "$$events", "$$legacy"]);
690
+ const d = [
691
+ [
692
+ "path",
693
+ {
694
+ 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"
695
+ }
696
+ ],
697
+ ["path", { d: "M14.084 14.158a3 3 0 0 1-4.242-4.242" }],
698
+ [
699
+ "path",
700
+ {
701
+ 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"
702
+ }
703
+ ],
704
+ ["path", { d: "m2 2 20 20" }]
705
+ ];
706
+ Je(M, Qe(
707
+ { name: "eye-off" },
708
+ () => c,
709
+ {
710
+ get iconNode() {
711
+ return d;
712
+ },
713
+ children: (f, F) => {
714
+ var v = ke(), y = me(v);
715
+ Ze(y, () => a.children ?? $e), r(f, v);
716
+ },
717
+ $$slots: { default: !0 }
718
+ }
719
+ )), Te();
720
+ }
721
+ function Qa(M, a) {
722
+ He(a, !0);
723
+ /**
724
+ * @license @lucide/svelte v0.544.0 - ISC
725
+ *
726
+ * ISC License
727
+ *
728
+ * Copyright (c) for portions of Lucide are held by Cole Bemis 2013-2023 as part of Feather (MIT). All other copyright (c) for Lucide are held by Lucide Contributors 2025.
729
+ *
730
+ * Permission to use, copy, modify, and/or distribute this software for any
731
+ * purpose with or without fee is hereby granted, provided that the above
732
+ * copyright notice and this permission notice appear in all copies.
733
+ *
734
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
735
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
736
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
737
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
738
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
739
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
740
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
741
+ *
742
+ * ---
743
+ *
744
+ * The MIT License (MIT) (for portions derived from Feather)
745
+ *
746
+ * Copyright (c) 2013-2023 Cole Bemis
747
+ *
748
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
749
+ * of this software and associated documentation files (the "Software"), to deal
750
+ * in the Software without restriction, including without limitation the rights
751
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
752
+ * copies of the Software, and to permit persons to whom the Software is
753
+ * furnished to do so, subject to the following conditions:
754
+ *
755
+ * The above copyright notice and this permission notice shall be included in all
756
+ * copies or substantial portions of the Software.
757
+ *
758
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
759
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
760
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
761
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
762
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
763
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
764
+ * SOFTWARE.
765
+ *
766
+ */
767
+ let c = ea(a, ["$$slots", "$$events", "$$legacy"]);
768
+ const d = [
769
+ [
770
+ "path",
771
+ {
772
+ 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"
773
+ }
774
+ ],
775
+ ["circle", { cx: "12", cy: "12", r: "3" }]
776
+ ];
777
+ Je(M, Qe(
778
+ { name: "eye" },
779
+ () => c,
780
+ {
781
+ get iconNode() {
782
+ return d;
783
+ },
784
+ children: (f, F) => {
785
+ var v = ke(), y = me(v);
786
+ Ze(y, () => a.children ?? $e), r(f, v);
787
+ },
788
+ $$slots: { default: !0 }
789
+ }
790
+ )), Te();
791
+ }
792
+ function Za(M, a) {
793
+ He(a, !0);
794
+ /**
795
+ * @license @lucide/svelte v0.544.0 - ISC
796
+ *
797
+ * ISC License
798
+ *
799
+ * Copyright (c) for portions of Lucide are held by Cole Bemis 2013-2023 as part of Feather (MIT). All other copyright (c) for Lucide are held by Lucide Contributors 2025.
800
+ *
801
+ * Permission to use, copy, modify, and/or distribute this software for any
802
+ * purpose with or without fee is hereby granted, provided that the above
803
+ * copyright notice and this permission notice appear in all copies.
804
+ *
805
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
806
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
807
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
808
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
809
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
810
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
811
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
812
+ *
813
+ * ---
814
+ *
815
+ * The MIT License (MIT) (for portions derived from Feather)
816
+ *
817
+ * Copyright (c) 2013-2023 Cole Bemis
818
+ *
819
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
820
+ * of this software and associated documentation files (the "Software"), to deal
821
+ * in the Software without restriction, including without limitation the rights
822
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
823
+ * copies of the Software, and to permit persons to whom the Software is
824
+ * furnished to do so, subject to the following conditions:
825
+ *
826
+ * The above copyright notice and this permission notice shall be included in all
827
+ * copies or substantial portions of the Software.
828
+ *
829
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
830
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
831
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
832
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
833
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
834
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
835
+ * SOFTWARE.
836
+ *
837
+ */
838
+ let c = ea(a, ["$$slots", "$$events", "$$legacy"]);
839
+ const d = [
840
+ ["path", { d: "M21 5H3" }],
841
+ ["path", { d: "M17 12H7" }],
842
+ ["path", { d: "M19 19H5" }]
843
+ ];
844
+ Je(M, Qe(
845
+ { name: "text-align-center" },
846
+ () => c,
847
+ {
848
+ get iconNode() {
849
+ return d;
850
+ },
851
+ children: (f, F) => {
852
+ var v = ke(), y = me(v);
853
+ Ze(y, () => a.children ?? $e), r(f, v);
854
+ },
855
+ $$slots: { default: !0 }
856
+ }
857
+ )), Te();
858
+ }
859
+ function $a(M, a) {
860
+ He(a, !0);
861
+ /**
862
+ * @license @lucide/svelte v0.544.0 - ISC
863
+ *
864
+ * ISC License
865
+ *
866
+ * Copyright (c) for portions of Lucide are held by Cole Bemis 2013-2023 as part of Feather (MIT). All other copyright (c) for Lucide are held by Lucide Contributors 2025.
867
+ *
868
+ * Permission to use, copy, modify, and/or distribute this software for any
869
+ * purpose with or without fee is hereby granted, provided that the above
870
+ * copyright notice and this permission notice appear in all copies.
871
+ *
872
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
873
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
874
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
875
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
876
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
877
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
878
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
879
+ *
880
+ * ---
881
+ *
882
+ * The MIT License (MIT) (for portions derived from Feather)
883
+ *
884
+ * Copyright (c) 2013-2023 Cole Bemis
885
+ *
886
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
887
+ * of this software and associated documentation files (the "Software"), to deal
888
+ * in the Software without restriction, including without limitation the rights
889
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
890
+ * copies of the Software, and to permit persons to whom the Software is
891
+ * furnished to do so, subject to the following conditions:
892
+ *
893
+ * The above copyright notice and this permission notice shall be included in all
894
+ * copies or substantial portions of the Software.
895
+ *
896
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
897
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
898
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
899
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
900
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
901
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
902
+ * SOFTWARE.
903
+ *
904
+ */
905
+ let c = ea(a, ["$$slots", "$$events", "$$legacy"]);
906
+ const d = [
907
+ ["path", { d: "M21 5H3" }],
908
+ ["path", { d: "M21 12H9" }],
909
+ ["path", { d: "M21 19H7" }]
910
+ ];
911
+ Je(M, Qe(
912
+ { name: "text-align-end" },
913
+ () => c,
914
+ {
915
+ get iconNode() {
916
+ return d;
917
+ },
918
+ children: (f, F) => {
919
+ var v = ke(), y = me(v);
920
+ Ze(y, () => a.children ?? $e), r(f, v);
921
+ },
922
+ $$slots: { default: !0 }
923
+ }
924
+ )), Te();
925
+ }
926
+ function et(M, a) {
927
+ He(a, !0);
928
+ /**
929
+ * @license @lucide/svelte v0.544.0 - ISC
930
+ *
931
+ * ISC License
932
+ *
933
+ * Copyright (c) for portions of Lucide are held by Cole Bemis 2013-2023 as part of Feather (MIT). All other copyright (c) for Lucide are held by Lucide Contributors 2025.
934
+ *
935
+ * Permission to use, copy, modify, and/or distribute this software for any
936
+ * purpose with or without fee is hereby granted, provided that the above
937
+ * copyright notice and this permission notice appear in all copies.
938
+ *
939
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
940
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
941
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
942
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
943
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
944
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
945
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
946
+ *
947
+ * ---
948
+ *
949
+ * The MIT License (MIT) (for portions derived from Feather)
950
+ *
951
+ * Copyright (c) 2013-2023 Cole Bemis
952
+ *
953
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
954
+ * of this software and associated documentation files (the "Software"), to deal
955
+ * in the Software without restriction, including without limitation the rights
956
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
957
+ * copies of the Software, and to permit persons to whom the Software is
958
+ * furnished to do so, subject to the following conditions:
959
+ *
960
+ * The above copyright notice and this permission notice shall be included in all
961
+ * copies or substantial portions of the Software.
962
+ *
963
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
964
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
965
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
966
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
967
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
968
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
969
+ * SOFTWARE.
970
+ *
971
+ */
972
+ let c = ea(a, ["$$slots", "$$events", "$$legacy"]);
973
+ const d = [
974
+ ["path", { d: "M21 5H3" }],
975
+ ["path", { d: "M15 12H3" }],
976
+ ["path", { d: "M17 19H3" }]
977
+ ];
978
+ Je(M, Qe(
979
+ { name: "text-align-start" },
980
+ () => c,
981
+ {
982
+ get iconNode() {
983
+ return d;
984
+ },
985
+ children: (f, F) => {
986
+ var v = ke(), y = me(v);
987
+ Ze(y, () => a.children ?? $e), r(f, v);
988
+ },
989
+ $$slots: { default: !0 }
990
+ }
991
+ )), Te();
992
+ }
993
+ var at = u('<div role="dialog" aria-modal="true" aria-labelledby="slideup-title" tabindex="-1"></div>'), tt = u('<div class="flex items-center justify-between p-4 border-b border-stone-700"><h3 id="slideup-title" class="text-lg font-semibold text-white"> </h3> <button type="button" class="p-2 text-gray-400 hover:text-white transition-colors duration-200" aria-label="Close"><!></button></div>'), rt = u('<div role="dialog" aria-modal="true" aria-labelledby="slideup-title"><!> <div class="max-h-full overflow-y-auto"><!></div></div>'), nt = u("<!> <!>", 1);
994
+ function st(M, a) {
995
+ He(a, !1);
996
+ let c = t(a, "isOpen", 8, !1), d = t(a, "title", 8, ""), f = t(a, "maxHeight", 8, "80vh"), F = t(a, "zIndex", 8, 50);
997
+ const v = Xe();
998
+ let y = i(), O = i();
999
+ function j(g) {
1000
+ c() && e(O) && g.target === e(O) && v("close");
1001
+ }
1002
+ function V(g) {
1003
+ g.key === "Escape" && c() && v("close");
1004
+ }
1005
+ function W(g) {
1006
+ typeof document < "u" && (g ? document.body.style.overflow = "hidden" : document.body.style.overflow = "");
1007
+ }
1008
+ ba(() => (typeof document < "u" && document.addEventListener("keydown", V), () => {
1009
+ typeof document < "u" && (document.removeEventListener("keydown", V), document.body.style.overflow = "");
1010
+ })), m(() => l(c()), () => {
1011
+ typeof document < "u" && W(c());
1012
+ }), Ye(), Ae();
1013
+ var J = nt(), E = me(J);
1014
+ {
1015
+ var S = (g) => {
1016
+ var k = at();
1017
+ Ue(k, (H) => n(O, H), () => e(O)), N(() => K(k, 1, `fixed inset-0 z-${F() ?? ""} bg-black/50`)), q("click", k, j), q("keydown", k, (H) => H.key === "Escape" && j(H)), da(3, k, () => qa, () => ({ duration: 200 })), r(g, k);
1018
+ };
1019
+ w(E, (g) => {
1020
+ c() && g(S);
1021
+ });
1022
+ }
1023
+ var Q = L(E, 2);
1024
+ {
1025
+ var B = (g) => {
1026
+ var k = rt(), H = s(k);
1027
+ {
1028
+ var p = (A) => {
1029
+ var ee = tt(), le = s(ee), be = s(le), ve = L(le, 2), oe = s(ve);
1030
+ va(oe, { size: 20 }), N(() => ce(be, d())), q("click", ve, () => v("close")), r(A, ee);
1031
+ };
1032
+ w(H, (A) => {
1033
+ d() && A(p);
1034
+ });
1035
+ }
1036
+ var Y = L(H, 2), R = s(Y);
1037
+ la(R, a, "default", {}, null), Ue(k, (A) => n(y, A), () => e(y)), N(() => {
1038
+ K(k, 1, `fixed bottom-0 left-0 right-0 z-${F() + 1} bg-stone-800 border-t border-stone-700 rounded-t-xl shadow-2xl`), aa(k, `max-height: ${f() ?? ""};`);
1039
+ }), da(3, k, () => ja, () => ({ axis: "y", duration: 300 })), r(g, k);
1040
+ };
1041
+ w(Q, (g) => {
1042
+ c() && g(B);
1043
+ });
1044
+ }
1045
+ r(M, J), Te();
1046
+ }
1047
+ var lt = u('<span class="text-blood-red-500 ml-1">*</span>'), ot = u("<label> <!></label>"), it = u('<div class="absolute -top-1 -right-1 w-4 h-4 bg-cyber-amber-500 rounded-full flex items-center justify-center"><!></div>'), dt = u('<button type="button"><div></div> <!></button>'), ct = u('<div class="space-y-2"><div class="grid grid-cols-11 gap-3 p-1 bg-stone-800 rounded-lg border border-stone-700"></div></div>'), vt = u('<div class="p-4"><div class="max-h-96 overflow-y-auto space-y-4 pr-2"></div></div>'), ut = u('<div class="w-8 h-8 rounded border border-stone-600 flex-shrink-0"></div>'), ft = u('<div class="w-8 h-8 rounded border border-stone-600 flex-shrink-0 bg-stone-700"></div> <span class="text-gray-400">Select a color</span>', 1), bt = u('<div class="relative"><button type="button"><div class="flex items-center space-x-3"><!></div></button> <div></div></div>'), gt = u('<div class="w-8 h-8 rounded border border-stone-600 flex-shrink-0"></div>'), ht = u('<div class="w-8 h-8 rounded border border-stone-600 flex-shrink-0 bg-stone-700"></div> <span class="text-gray-400">Select a color</span>', 1), mt = u('<div class="absolute -top-1 -right-1 w-4 h-4 bg-cyber-amber-500 rounded-full flex items-center justify-center"><!></div>'), xt = u('<button type="button"><div></div> <!></button>'), pt = u('<div class="space-y-2"><div class="grid grid-cols-8 gap-3 p-1 bg-stone-800 rounded-lg border border-stone-700"></div></div>'), yt = u('<div class="p-4"><div class="max-h-96 overflow-y-auto space-y-4 pr-2"></div></div>'), _t = u('<div class="relative"><button type="button"><div class="flex items-center space-x-3"><!></div></button> <div></div></div> <!>', 1), wt = u('<div class="text-center py-6 text-stone-500 text-sm">No colors available</div>'), kt = u('<div class="space-y-3"><!> <!> <!> <!></div>');
1048
+ function dr(M, a) {
1049
+ He(a, !1);
1050
+ const c = i(), d = i(), f = i(), F = i(), v = i(), y = i();
1051
+ let O = t(a, "value", 12, ""), j = t(a, "label", 8, ""), V = t(a, "required", 8, !1), W = t(a, "disabled", 8, !1), J = t(a, "size", 8, "md"), E = t(a, "variant", 8, "outlined"), S = t(a, "colors", 24, () => [
1052
+ // Default color palette - can be customized by parent
1053
+ { label: "Red", value: "#ef4444", family: "Basic" },
1054
+ { label: "Blue", value: "#3b82f6", family: "Basic" },
1055
+ { label: "Green", value: "#10b981", family: "Basic" },
1056
+ { label: "Yellow", value: "#f59e0b", family: "Basic" },
1057
+ { label: "Purple", value: "#8b5cf6", family: "Basic" },
1058
+ { label: "Pink", value: "#ec4899", family: "Basic" },
1059
+ { label: "Indigo", value: "#6366f1", family: "Basic" },
1060
+ { label: "Gray", value: "#6b7280", family: "Basic" },
1061
+ { label: "Black", value: "#000000", family: "Basic" },
1062
+ { label: "White", value: "#ffffff", family: "Basic" }
1063
+ ]), Q = i(!1), B = i(!1), g = i(!1);
1064
+ const k = Xe(), H = `color-picker-${Math.random().toString(36).substr(2, 9)}`;
1065
+ ba(() => {
1066
+ n(g, window.innerWidth < 768);
1067
+ const P = () => {
1068
+ n(g, window.innerWidth < 768);
1069
+ };
1070
+ return window.addEventListener("resize", P), () => window.removeEventListener("resize", P);
1071
+ });
1072
+ function p(P) {
1073
+ W() || (O(P.value), n(
1074
+ Q,
1075
+ !1
1076
+ // Collapse after selection
1077
+ ), k("change", { value: P.value }));
1078
+ }
1079
+ function Y() {
1080
+ W() || n(Q, !e(Q));
1081
+ }
1082
+ function R() {
1083
+ n(B, !0);
1084
+ }
1085
+ function A() {
1086
+ n(B, !1);
1087
+ }
1088
+ function ee() {
1089
+ n(Q, !1);
1090
+ }
1091
+ m(() => {
1092
+ }, () => {
1093
+ n(c, {
1094
+ sm: "px-3 py-1.5 text-sm",
1095
+ md: "px-4 py-2.5 text-base",
1096
+ lg: "px-5 py-3 text-lg"
1097
+ });
1098
+ }), m(() => {
1099
+ }, () => {
1100
+ n(d, {
1101
+ default: "bg-dark-700 border-0 text-white placeholder-gray-400 focus:ring-plasma-red-500/20",
1102
+ outlined: "bg-dark-600 border-0 text-white placeholder-gray-400 focus:ring-plasma-red-500/20",
1103
+ filled: "bg-dark-600 border-0 text-white placeholder-gray-400 focus:ring-plasma-red-500/20",
1104
+ ghost: "bg-transparent border-0 text-white placeholder-gray-400 focus:ring-plasma-red-500/20"
1105
+ });
1106
+ }), m(() => {
1107
+ }, () => {
1108
+ n(f, [
1109
+ "block",
1110
+ "text-sm",
1111
+ "font-medium",
1112
+ "mb-2",
1113
+ "transition-colors",
1114
+ "duration-200",
1115
+ "text-gray-300"
1116
+ ].join(" "));
1117
+ }), m(
1118
+ () => (e(c), l(J()), e(d), l(E())),
1119
+ () => {
1120
+ n(F, [
1121
+ "w-full",
1122
+ "min-w-40 sm:min-w-48 md:min-w-56 lg:min-w-64",
1123
+ "rounded-lg",
1124
+ "transition-all",
1125
+ "duration-200",
1126
+ "ease-in-out",
1127
+ "focus:outline-none",
1128
+ "focus:ring-2",
1129
+ "focus:ring-offset-2",
1130
+ "focus:ring-offset-dark-900",
1131
+ "disabled:opacity-50",
1132
+ "disabled:cursor-not-allowed",
1133
+ e(c)[J()],
1134
+ e(d)[E()],
1135
+ "grainy-texture"
1136
+ ].join(" "));
1137
+ }
1138
+ ), m(() => (l(S()), l(O())), () => {
1139
+ n(v, S().find((P) => P.value === O()));
1140
+ }), m(() => l(S()), () => {
1141
+ n(y, S().reduce(
1142
+ (P, Z) => {
1143
+ const D = Z.family || "Other";
1144
+ return P[D] || (P[D] = []), P[D].push(Z), P;
1145
+ },
1146
+ {}
1147
+ ));
1148
+ }), Ye(), Ae();
1149
+ var le = kt(), be = s(le);
1150
+ {
1151
+ var ve = (P) => {
1152
+ var Z = ot(), D = s(Z), z = L(D);
1153
+ {
1154
+ var C = (U) => {
1155
+ var pe = lt();
1156
+ r(U, pe);
1157
+ };
1158
+ w(z, (U) => {
1159
+ V() && U(C);
1160
+ });
1161
+ }
1162
+ N(() => {
1163
+ T(Z, "for", H), K(Z, 1, de(e(f))), ce(D, `${j() ?? ""} `);
1164
+ }), r(P, Z);
1165
+ };
1166
+ w(be, (P) => {
1167
+ j() && P(ve);
1168
+ });
1169
+ }
1170
+ var oe = L(be, 2);
1171
+ {
1172
+ var xe = (P) => {
1173
+ Ya(P, {
1174
+ placement: "bottom-start",
1175
+ width: "auto",
1176
+ maxHeight: "20rem",
1177
+ get isOpen() {
1178
+ return e(Q);
1179
+ },
1180
+ set isOpen(Z) {
1181
+ n(Q, Z);
1182
+ },
1183
+ $$events: { close: ee },
1184
+ children: (Z, D) => {
1185
+ var z = vt(), C = s(z);
1186
+ ta(
1187
+ C,
1188
+ 5,
1189
+ () => (e(y), se(() => Object.entries(e(y)))),
1190
+ ([U, pe]) => U,
1191
+ (U, pe) => {
1192
+ var qe = ha(() => ma(e(pe), 2));
1193
+ let Se = () => e(qe)[1];
1194
+ var Pe = ct(), ae = s(Pe);
1195
+ ta(ae, 5, Se, (ge) => ge.value, (ge, he) => {
1196
+ var je = dt(), b = s(je), $ = L(b, 2);
1197
+ {
1198
+ var Ee = (_e) => {
1199
+ var ue = it(), ie = s(ue);
1200
+ pa(ie, { size: 8, class: "text-stone-900" }), r(_e, ue);
1201
+ };
1202
+ w($, (_e) => {
1203
+ l(O()), e(he), se(() => O() === e(he).value) && _e(Ee);
1204
+ });
1205
+ }
1206
+ N(() => {
1207
+ K(je, 1, `group relative flex flex-col items-center rounded-lg transition-all duration-200 hover:bg-stone-700 focus:outline-none focus:ring-2 focus:ring-cyber-amber-500 focus:ring-opacity-50 ${l(O()), e(he), se(() => O() === e(he).value ? "bg-cyber-amber-500/20 ring-2 ring-cyber-amber-500" : "") ?? ""} ${W() ? "opacity-50 cursor-not-allowed" : "cursor-pointer"}`), je.disabled = W(), K(b, 1, `w-8 h-8 rounded-lg group-hover:scale-110 transition-transform duration-200 ${l(O()), e(he), se(() => O() === e(he).value ? "border-cyber-amber-500" : "") ?? ""}`), aa(b, `background-color: ${e(he), se(() => e(he).value) ?? ""}`);
1208
+ }), q("click", je, () => p(e(he))), q("keydown", je, (_e) => _e.key === "Enter" && p(e(he))), r(ge, je);
1209
+ }), r(U, Pe);
1210
+ }
1211
+ ), r(Z, z);
1212
+ },
1213
+ $$slots: {
1214
+ default: !0,
1215
+ trigger: (Z, D) => {
1216
+ var z = bt(), C = s(z), U = s(C), pe = s(U);
1217
+ {
1218
+ var qe = (ae) => {
1219
+ var ge = ut();
1220
+ N(() => aa(ge, `background-color: ${e(v), se(() => e(v).value) ?? ""}`)), r(ae, ge);
1221
+ }, Se = (ae) => {
1222
+ var ge = ft();
1223
+ r(ae, ge);
1224
+ };
1225
+ w(pe, (ae) => {
1226
+ e(v) ? ae(qe) : ae(Se, !1);
1227
+ });
1228
+ }
1229
+ var Pe = L(C, 2);
1230
+ N(() => {
1231
+ K(C, 1, de(e(F))), C.disabled = W(), K(Pe, 1, `absolute inset-0 rounded-lg pointer-events-none transition-all duration-200 ${e(B) ? "ring-2 ring-plasma-red-500/20" : ""}`);
1232
+ }), q("click", C, Y), q("focus", C, R), q("blur", C, A), r(Z, z);
1233
+ }
1234
+ },
1235
+ $$legacy: !0
1236
+ });
1237
+ };
1238
+ w(oe, (P) => {
1239
+ e(g) || P(xe);
1240
+ });
1241
+ }
1242
+ var ze = L(oe, 2);
1243
+ {
1244
+ var Ce = (P) => {
1245
+ var Z = _t(), D = me(Z), z = s(D), C = s(z), U = s(C);
1246
+ {
1247
+ var pe = (ae) => {
1248
+ var ge = gt();
1249
+ N(() => aa(ge, `background-color: ${e(v), se(() => e(v).value) ?? ""}`)), r(ae, ge);
1250
+ }, qe = (ae) => {
1251
+ var ge = ht();
1252
+ r(ae, ge);
1253
+ };
1254
+ w(U, (ae) => {
1255
+ e(v) ? ae(pe) : ae(qe, !1);
1256
+ });
1257
+ }
1258
+ var Se = L(z, 2), Pe = L(D, 2);
1259
+ st(Pe, {
1260
+ title: "Select Color",
1261
+ maxHeight: "80vh",
1262
+ get isOpen() {
1263
+ return e(Q);
1264
+ },
1265
+ set isOpen(ae) {
1266
+ n(Q, ae);
1267
+ },
1268
+ $$events: { close: ee },
1269
+ children: (ae, ge) => {
1270
+ var he = yt(), je = s(he);
1271
+ ta(
1272
+ je,
1273
+ 5,
1274
+ () => (e(y), se(() => Object.entries(e(y)))),
1275
+ ([b, $]) => b,
1276
+ (b, $) => {
1277
+ var Ee = ha(() => ma(e($), 2));
1278
+ let _e = () => e(Ee)[1];
1279
+ var ue = pt(), ie = s(ue);
1280
+ ta(ie, 5, _e, (Le) => Le.value, (Le, fe) => {
1281
+ var h = xt(), Ie = s(h), Ke = L(Ie, 2);
1282
+ {
1283
+ var Ge = (x) => {
1284
+ var o = mt(), G = s(o);
1285
+ pa(G, { size: 8, class: "text-stone-900" }), r(x, o);
1286
+ };
1287
+ w(Ke, (x) => {
1288
+ l(O()), e(fe), se(() => O() === e(fe).value) && x(Ge);
1289
+ });
1290
+ }
1291
+ N(() => {
1292
+ K(h, 1, `group relative flex flex-col items-center rounded-lg transition-all duration-200 hover:bg-stone-700 focus:outline-none focus:ring-2 focus:ring-cyber-amber-500 focus:ring-opacity-50 ${l(O()), e(fe), se(() => O() === e(fe).value ? "bg-cyber-amber-500/20 ring-2 ring-cyber-amber-500" : "") ?? ""} ${W() ? "opacity-50 cursor-not-allowed" : "cursor-pointer"}`), h.disabled = W(), K(Ie, 1, `w-8 h-8 rounded-lg group-hover:scale-110 transition-transform duration-200 ${l(O()), e(fe), se(() => O() === e(fe).value ? "border-cyber-amber-500" : "") ?? ""}`), aa(Ie, `background-color: ${e(fe), se(() => e(fe).value) ?? ""}`);
1293
+ }), q("click", h, () => p(e(fe))), q("keydown", h, (x) => x.key === "Enter" && p(e(fe))), r(Le, h);
1294
+ }), r(b, ue);
1295
+ }
1296
+ ), r(ae, he);
1297
+ },
1298
+ $$slots: { default: !0 },
1299
+ $$legacy: !0
1300
+ }), N(() => {
1301
+ K(z, 1, de(e(F))), z.disabled = W(), K(Se, 1, `absolute inset-0 rounded-lg pointer-events-none transition-all duration-200 ${e(B) ? "ring-2 ring-plasma-red-500/20" : ""}`);
1302
+ }), q("click", z, Y), q("focus", z, R), q("blur", z, A), r(P, Z);
1303
+ };
1304
+ w(ze, (P) => {
1305
+ e(g) && P(Ce);
1306
+ });
1307
+ }
1308
+ var X = L(ze, 2);
1309
+ {
1310
+ var te = (P) => {
1311
+ var Z = wt();
1312
+ r(P, Z);
1313
+ };
1314
+ w(X, (P) => {
1315
+ l(S()), se(() => !S() || S().length === 0) && P(te);
1316
+ });
1317
+ }
1318
+ r(M, le), Te();
1319
+ }
1320
+ var zt = u('<span class="text-error ml-1 svelte-7hu4vd" aria-label="required">*</span>'), Ct = u("<label> <!></label>"), qt = u('<button type="button" aria-label="Clear input"><!></button>'), jt = u('<button type="button"><!></button>'), Et = u('<div class="flex items-center gap-1 svelte-7hu4vd"><!> <span class="svelte-7hu4vd"> </span></div>'), Bt = u('<div class="flex items-center gap-1 svelte-7hu4vd"><!> <span class="svelte-7hu4vd"> </span></div>'), Lt = u('<span class="svelte-7hu4vd"> </span>'), Nt = u("<div><!></div>"), Tt = u('<div><!> <div class="relative svelte-7hu4vd"><input/> <div class="absolute right-3 top-1/2 -translate-y-1/2 flex items-center gap-1 svelte-7hu4vd"><!> <!></div></div> <!></div>');
1321
+ const Ht = {
1322
+ hash: "svelte-7hu4vd",
1323
+ code: `
1324
+ /* Enhanced focus styles using semantic tokens */.input-focus-visible {outline:2px solid rgb(var(--color-focus-ring));outline-offset:2px;}
1325
+
1326
+ /* Smooth transitions for all interactive elements */input.svelte-7hu4vd {transition:all 0.2s cubic-bezier(0.4, 0, 0.2, 1);}
1327
+
1328
+ /* Placeholder styling using semantic tokens */input.svelte-7hu4vd::-moz-placeholder {-moz-transition:color 0.2s ease;transition:color 0.2s ease;color:rgb(var(--color-text-placeholder));}input.svelte-7hu4vd::placeholder {transition:color 0.2s ease;color:rgb(var(--color-text-placeholder));}input.svelte-7hu4vd:focus::-moz-placeholder {color:rgb(var(--color-text-tertiary));}input.svelte-7hu4vd:focus::placeholder {color:rgb(var(--color-text-tertiary));}
1329
+
1330
+ /* Number input spinner styling */input[type="number"].svelte-7hu4vd::-webkit-outer-spin-button,
1331
+ input[type="number"].svelte-7hu4vd::-webkit-inner-spin-button {-webkit-appearance:none;margin:0;}input[type="number"].svelte-7hu4vd {-moz-appearance:textfield;-webkit-appearance:textfield;appearance:textfield;}
1332
+
1333
+ /* Search input styling */input[type="search"].svelte-7hu4vd::-webkit-search-cancel-button,
1334
+ input[type="search"].svelte-7hu4vd::-webkit-search-decoration {-webkit-appearance:none;}
1335
+
1336
+ /* Action button hover effects */button[aria-label].svelte-7hu4vd {transition:all 0.2s ease;}button[aria-label].svelte-7hu4vd:hover {transform:scale(1.05);}button[aria-label].svelte-7hu4vd:active {transform:scale(0.95);}
1337
+
1338
+ /* Focus ring animation */.focus-ring.svelte-7hu4vd {
1339
+ animation: svelte-7hu4vd-focus-ring-pulse 0.2s ease-out;}
1340
+
1341
+ @keyframes svelte-7hu4vd-focus-ring-pulse {
1342
+ 0% {
1343
+ transform: scale(0.95);
1344
+ opacity: 0;
1345
+ }
1346
+ 100% {
1347
+ transform: scale(1);
1348
+ opacity: 1;
1349
+ }
1350
+ }`
1351
+ };
1352
+ function cr(M, a) {
1353
+ He(a, !1), sa(M, Ht);
1354
+ const c = i(), d = i(), f = i(), F = i(), v = i(), y = i(), O = i(), j = i(), V = i(), W = i(), J = i(), E = i();
1355
+ let S = t(a, "value", 12, ""), Q = t(a, "type", 8, "text"), B = t(a, "label", 8, ""), g = t(a, "placeholder", 8, ""), k = t(a, "required", 8, !1), H = t(a, "disabled", 8, !1), p = t(a, "readonly", 8, !1), Y = t(a, "size", 8, "md"), R = t(a, "variant", 8, "default"), A = t(a, "error", 8, ""), ee = t(a, "success", 8, ""), le = t(a, "helpText", 8, ""), be = t(a, "className", 8, ""), ve = t(a, "id", 8, ""), oe = t(a, "name", 8, void 0), xe = t(a, "maxLength", 8, void 0), ze = t(a, "minLength", 8, void 0), Ce = t(a, "pattern", 8, void 0), X = t(a, "autocomplete", 8, void 0), te = t(a, "showPasswordToggle", 8, !1), P = t(a, "showClearButton", 8, !1), Z = t(a, "ariaLabel", 8, void 0);
1356
+ const D = Xe();
1357
+ let z = i(), C = i(!1), U = i(!1);
1358
+ function pe(_) {
1359
+ const I = _.target;
1360
+ S(I.value), n(U, S() !== ""), D("input", { value: S(), event: _ });
1361
+ }
1362
+ function qe(_) {
1363
+ const I = _.target;
1364
+ S(I.value), n(U, S() !== ""), D("change", { value: S(), event: _ });
1365
+ }
1366
+ function Se(_) {
1367
+ D("focus", { event: _ });
1368
+ }
1369
+ function Pe(_) {
1370
+ D("blur", { event: _ });
1371
+ }
1372
+ function ae(_) {
1373
+ D("keydown", { event: _ });
1374
+ }
1375
+ function ge(_) {
1376
+ D("keyup", { event: _ });
1377
+ }
1378
+ function he() {
1379
+ n(C, !e(C));
1380
+ }
1381
+ function je(_) {
1382
+ var I;
1383
+ _.preventDefault(), S(""), n(U, !1), D("clear", { event: _ }), (I = e(z)) == null || I.focus();
1384
+ }
1385
+ function b() {
1386
+ var _;
1387
+ (_ = e(z)) == null || _.focus();
1388
+ }
1389
+ function $() {
1390
+ var _;
1391
+ (_ = e(z)) == null || _.blur();
1392
+ }
1393
+ function Ee() {
1394
+ var _;
1395
+ (_ = e(z)) == null || _.select();
1396
+ }
1397
+ m(() => l(ve()), () => {
1398
+ n(c, ve() || `input-${Math.random().toString(36).substr(2, 9)}`);
1399
+ }), m(() => l(S()), () => {
1400
+ n(U, S() !== "" && S() !== null && S() !== void 0);
1401
+ }), m(() => (l(A()), l(R())), () => {
1402
+ n(d, !!A() || R() === "error");
1403
+ }), m(() => (l(ee()), l(R())), () => {
1404
+ n(f, !!ee() || R() === "success");
1405
+ }), m(() => {
1406
+ }, () => {
1407
+ n(F, {
1408
+ sm: "px-3 py-1.5 text-sm",
1409
+ md: "px-4 py-2.5 text-sm",
1410
+ lg: "px-5 py-3 text-base"
1411
+ });
1412
+ }), m(
1413
+ () => (e(F), l(Y()), l(be())),
1414
+ () => {
1415
+ n(v, [
1416
+ "w-full",
1417
+ "min-w-0",
1418
+ "rounded-md",
1419
+ "transition-all",
1420
+ "duration-200",
1421
+ "ease-in-out",
1422
+ "focus:outline-none",
1423
+ "focus:ring-2",
1424
+ "focus:ring-[var(--zabi-focus-ring)]",
1425
+ "focus:ring-offset-2",
1426
+ "disabled:opacity-50",
1427
+ "disabled:cursor-not-allowed",
1428
+ "read-only:cursor-default",
1429
+ "read-only:opacity-75",
1430
+ e(F)[Y()],
1431
+ be()
1432
+ ].join(" "));
1433
+ }
1434
+ ), m(() => (e(d), e(f)), () => {
1435
+ n(y, e(d) ? "border-[var(--zabi-error)] text-[var(--zabi-text)] placeholder-[var(--zabi-text-placeholder)] focus:ring-[var(--zabi-error)] focus:border-[var(--zabi-error)]" : e(f) ? "border-[var(--zabi-success)] text-[var(--zabi-text)] placeholder-[var(--zabi-text-placeholder)] focus:ring-[var(--zabi-success)] focus:border-[var(--zabi-success)]" : "border-[var(--zabi-border)] text-[var(--zabi-text)] placeholder-[var(--zabi-text-placeholder)] focus:ring-[var(--zabi-focus-ring)] focus:border-[var(--zabi-border-focus)]");
1436
+ }), m(() => l(H()), () => {
1437
+ n(O, H() ? "bg-[var(--zabi-surface-disabled)] text-[var(--zabi-text-disabled)] border-[var(--zabi-border-disabled)] cursor-not-allowed" : "");
1438
+ }), m(
1439
+ () => (e(v), e(y), e(O)),
1440
+ () => {
1441
+ n(j, [
1442
+ e(v),
1443
+ e(y),
1444
+ e(O)
1445
+ ].join(" "));
1446
+ }
1447
+ ), m(() => {
1448
+ }, () => {
1449
+ n(V, [
1450
+ "relative",
1451
+ "group",
1452
+ "transition-all",
1453
+ "duration-200",
1454
+ "ease-in-out"
1455
+ ].join(" "));
1456
+ }), m(() => (e(d), e(f)), () => {
1457
+ n(W, [
1458
+ "block",
1459
+ "text-sm",
1460
+ "font-medium",
1461
+ "mb-2",
1462
+ "transition-colors",
1463
+ "duration-200",
1464
+ e(d) ? "text-[var(--zabi-error)]" : e(f) ? "text-[var(--zabi-success)]" : "text-[var(--zabi-text)]"
1465
+ ].join(" "));
1466
+ }), m(() => (e(d), e(f)), () => {
1467
+ n(J, [
1468
+ "mt-2",
1469
+ "text-xs",
1470
+ e(d) ? "text-[var(--zabi-error)]" : e(f) ? "text-[var(--zabi-success)]" : "text-[var(--zabi-text-muted)]"
1471
+ ].join(" "));
1472
+ }), m(() => {
1473
+ }, () => {
1474
+ n(E, [
1475
+ "absolute",
1476
+ "right-3",
1477
+ "top-1/2",
1478
+ "-translate-y-1/2",
1479
+ "text-tertiary",
1480
+ "hover:text-primary",
1481
+ "transition-colors",
1482
+ "duration-200",
1483
+ "focus:outline-none",
1484
+ "focus:text-primary",
1485
+ "focus:ring-2",
1486
+ "focus:ring-focus",
1487
+ "focus:ring-offset-1",
1488
+ "rounded-sm",
1489
+ "p-1"
1490
+ ].join(" "));
1491
+ }), Ye();
1492
+ var _e = { focus: b, blur: $, select: Ee };
1493
+ Ae();
1494
+ var ue = Tt(), ie = s(ue);
1495
+ {
1496
+ var Le = (_) => {
1497
+ var I = Ct(), re = s(I), ye = L(re);
1498
+ {
1499
+ var Oe = (ne) => {
1500
+ var Be = zt();
1501
+ r(ne, Be);
1502
+ };
1503
+ w(ye, (ne) => {
1504
+ k() && ne(Oe);
1505
+ });
1506
+ }
1507
+ N(() => {
1508
+ T(I, "for", e(c)), K(I, 1, de(e(W)), "svelte-7hu4vd"), ce(re, `${B() ?? ""} `);
1509
+ }), r(_, I);
1510
+ };
1511
+ w(ie, (_) => {
1512
+ B() && _(Le);
1513
+ });
1514
+ }
1515
+ var fe = L(ie, 2), h = s(fe);
1516
+ Ue(h, (_) => n(z, _), () => e(z));
1517
+ var Ie = L(h, 2), Ke = s(Ie);
1518
+ {
1519
+ var Ge = (_) => {
1520
+ var I = qt(), re = s(I);
1521
+ va(re, { size: 16 }), N(() => K(I, 1, de(e(E)), "svelte-7hu4vd")), q("click", I, je), q("keydown", I, (ye) => ye.key === "Enter" && je(ye)), r(_, I);
1522
+ };
1523
+ w(Ke, (_) => {
1524
+ P() && e(U) && !H() && !p() && _(Ge);
1525
+ });
1526
+ }
1527
+ var x = L(Ke, 2);
1528
+ {
1529
+ var o = (_) => {
1530
+ var I = jt(), re = s(I);
1531
+ {
1532
+ var ye = (ne) => {
1533
+ Ja(ne, { size: 16 });
1534
+ }, Oe = (ne) => {
1535
+ Qa(ne, { size: 16 });
1536
+ };
1537
+ w(re, (ne) => {
1538
+ e(C) ? ne(ye) : ne(Oe, !1);
1539
+ });
1540
+ }
1541
+ N(() => {
1542
+ K(I, 1, de(e(E)), "svelte-7hu4vd"), T(I, "aria-label", e(C) ? "Hide password" : "Show password");
1543
+ }), q("click", I, he), q("keydown", I, (ne) => ne.key === "Enter" && he()), r(_, I);
1544
+ };
1545
+ w(x, (_) => {
1546
+ te() && Q() === "password" && _(o);
1547
+ });
1548
+ }
1549
+ var G = L(fe, 2);
1550
+ {
1551
+ var we = (_) => {
1552
+ var I = Nt(), re = s(I);
1553
+ {
1554
+ var ye = (ne) => {
1555
+ var Be = Et(), Ne = s(Be);
1556
+ ua(Ne, { size: 14, class: "flex-shrink-0" });
1557
+ var De = L(Ne, 2), Re = s(De);
1558
+ N(() => ce(Re, A())), r(ne, Be);
1559
+ }, Oe = (ne) => {
1560
+ var Be = ke(), Ne = me(Be);
1561
+ {
1562
+ var De = (Me) => {
1563
+ var Fe = Bt(), Ve = s(Fe);
1564
+ fa(Ve, { size: 14, class: "flex-shrink-0" });
1565
+ var ra = L(Ve, 2), na = s(ra);
1566
+ N(() => ce(na, ee())), r(Me, Fe);
1567
+ }, Re = (Me) => {
1568
+ var Fe = ke(), Ve = me(Fe);
1569
+ {
1570
+ var ra = (na) => {
1571
+ var ga = Lt(), _a = s(ga);
1572
+ N(() => ce(_a, le())), r(na, ga);
1573
+ };
1574
+ w(
1575
+ Ve,
1576
+ (na) => {
1577
+ le() && na(ra);
1578
+ },
1579
+ !0
1580
+ );
1581
+ }
1582
+ r(Me, Fe);
1583
+ };
1584
+ w(
1585
+ Ne,
1586
+ (Me) => {
1587
+ e(f) ? Me(De) : Me(Re, !1);
1588
+ },
1589
+ !0
1590
+ );
1591
+ }
1592
+ r(ne, Be);
1593
+ };
1594
+ w(re, (ne) => {
1595
+ e(d) ? ne(ye) : ne(Oe, !1);
1596
+ });
1597
+ }
1598
+ N(() => {
1599
+ T(I, "id", `${e(c) ?? ""}-help`), K(I, 1, de(e(J)), "svelte-7hu4vd");
1600
+ }), r(_, I);
1601
+ };
1602
+ w(G, (_) => {
1603
+ (e(d) || e(f) || le()) && _(we);
1604
+ });
1605
+ }
1606
+ return N(() => {
1607
+ K(ue, 1, de(e(V)), "svelte-7hu4vd"), T(h, "id", e(c)), T(h, "type", te() && e(C) ? "text" : Q()), ya(h, S()), T(h, "placeholder", g()), h.disabled = H(), h.required = k(), h.readOnly = p(), T(h, "maxlength", xe()), T(h, "minlength", ze()), T(h, "pattern", Ce()), T(h, "autocomplete", X() || void 0), T(h, "name", oe()), K(h, 1, de(e(j)), "svelte-7hu4vd"), T(h, "aria-invalid", e(d) ? "true" : "false"), T(h, "aria-describedby", e(d) || e(f) || le() ? `${e(c)}-help` : void 0), T(h, "aria-label", Z() || (B() ? void 0 : "Input field")), T(h, "aria-required", k());
1608
+ }), q("input", h, pe), q("change", h, qe), q("focus", h, Se), q("blur", h, Pe), q("keydown", h, ae), q("keyup", h, ge), r(M, ue), We(a, "focus", b), We(a, "blur", $), We(a, "select", Ee), Te(_e);
1609
+ }
1610
+ var Mt = u('<span class="text-error ml-1 svelte-1qdann5">*</span>'), St = u("<label> <!></label>"), Pt = u('<option disabled class="svelte-1qdann5"> </option>'), It = u('<option class="bg-dark-800 text-white svelte-1qdann5"> </option>'), Ot = u('<button type="button" tabindex="-1" aria-label="Clear selection"><!></button>'), Dt = u('<div class="flex items-center gap-1 svelte-1qdann5"><!> <span class="svelte-1qdann5"> </span></div>'), Ft = u('<div class="flex items-center gap-1 svelte-1qdann5"><!> <span class="svelte-1qdann5"> </span></div>'), Rt = u('<span class="svelte-1qdann5"> </span>'), Kt = u("<div><!></div>"), Wt = u('<div><!> <div class="relative svelte-1qdann5"><select><!><!></select> <!> <div><!></div> <div></div></div> <!></div>');
1611
+ const At = {
1612
+ hash: "svelte-1qdann5",
1613
+ code: `
1614
+ /* Custom focus styles for better accessibility */.select-focus-visible {outline:2px solid var(--color-plasma-red-500);outline-offset:2px;}
1615
+
1616
+ /* Smooth transitions for all interactive elements */select.svelte-1qdann5 {transition:all 0.2s cubic-bezier(0.4, 0, 0.2, 1);}
1617
+
1618
+ /* Custom dropdown arrow styling */select.svelte-1qdann5::-ms-expand {display:none;}
1619
+
1620
+ /* Option styling */option.svelte-1qdann5 {background-color:var(--color-dark-800);color:white;padding:0.5rem;}
1621
+
1622
+ /* Hover effects */.select-container.svelte-1qdann5:hover .select-icon:where(.svelte-1qdann5) {transform:scale(1.1);}.select-container.svelte-1qdann5:active .select-icon:where(.svelte-1qdann5) {transform:scale(0.95);}
1623
+
1624
+ /* Clear button hover effects */button[aria-label="Clear selection"].svelte-1qdann5 {transition:all 0.2s ease;}button[aria-label="Clear selection"].svelte-1qdann5:hover {transform:scale(1.1);}button[aria-label="Clear selection"].svelte-1qdann5:active {transform:scale(0.95);}
1625
+
1626
+ /* Focus ring animation */.select-focus-ring.svelte-1qdann5 {
1627
+ animation: svelte-1qdann5-select-focus-ring-pulse 0.2s ease-out;}
1628
+
1629
+ @keyframes svelte-1qdann5-select-focus-ring-pulse {
1630
+ 0% {
1631
+ transform: scale(0.95);
1632
+ opacity: 0;
1633
+ }
1634
+ 100% {
1635
+ transform: scale(1);
1636
+ opacity: 1;
1637
+ }
1638
+ }
1639
+
1640
+ /* Disabled state styling */.select-disabled.svelte-1qdann5 {opacity:0.5;cursor:not-allowed;}.select-disabled.svelte-1qdann5:hover {transform:none;}
1641
+
1642
+ /* Required indicator styling */.select-required.svelte-1qdann5 {color:var(--color-blood-red-500);}`
1643
+ };
1644
+ function vr(M, a) {
1645
+ He(a, !1), sa(M, At);
1646
+ const c = i(), d = i(), f = i(), F = i(), v = i(), y = i(), O = i(), j = i(), V = i(), W = i(), J = i();
1647
+ let E = t(a, "value", 12, void 0), S = t(a, "options", 24, () => []), Q = t(a, "placeholder", 8, "Select an option"), B = t(a, "label", 8, ""), g = t(a, "disabled", 8, !1), k = t(a, "required", 8, !1), H = t(a, "error", 8, ""), p = t(a, "success", 8, ""), Y = t(a, "helpText", 8, ""), R = t(a, "size", 8, "md"), A = t(a, "variant", 8, "outlined"), ee = t(a, "searchable", 8, !1), le = t(a, "clearable", 8, !1), be = t(a, "name", 8, void 0), ve = t(a, "id", 8, void 0), oe = t(a, "className", 8, "");
1648
+ const xe = Xe();
1649
+ let ze = i(), Ce = i(!1), X = i(""), te = i([]);
1650
+ function P(x) {
1651
+ const o = x.target;
1652
+ E(o.value), xe("input", { value: String(E()) });
1653
+ }
1654
+ function Z(x) {
1655
+ const o = x.target;
1656
+ E(o.value), xe("change", { value: String(E()) });
1657
+ }
1658
+ function D(x) {
1659
+ n(Ce, !0), xe("focus", { event: x });
1660
+ }
1661
+ function z(x) {
1662
+ n(Ce, !1), xe("blur", { event: x });
1663
+ }
1664
+ function C(x) {
1665
+ xe("keydown", { event: x });
1666
+ }
1667
+ function U(x) {
1668
+ xe("keyup", { event: x });
1669
+ }
1670
+ function pe(x) {
1671
+ x.stopPropagation(), E(void 0), xe("clear", { event: x });
1672
+ }
1673
+ function qe() {
1674
+ var x;
1675
+ (x = e(ze)) == null || x.focus();
1676
+ }
1677
+ function Se() {
1678
+ var x;
1679
+ (x = e(ze)) == null || x.blur();
1680
+ }
1681
+ m(() => l(ve()), () => {
1682
+ n(c, ve() || `select-${Math.random().toString(36).substr(2, 9)}`);
1683
+ }), m(
1684
+ () => (l(ee()), e(X), l(S())),
1685
+ () => {
1686
+ ee() && e(X) ? n(te, S().filter((x) => x.label.toLowerCase().includes(e(X).toLowerCase()))) : n(te, S());
1687
+ }
1688
+ ), m(() => (l(S()), l(E())), () => {
1689
+ n(d, S().find((x) => x.value === E()));
1690
+ }), m(() => {
1691
+ }, () => {
1692
+ n(f, {
1693
+ sm: "px-3 py-1.5 text-sm",
1694
+ md: "px-4 py-2.5 text-base",
1695
+ lg: "px-5 py-3 text-lg"
1696
+ });
1697
+ }), m(() => {
1698
+ }, () => {
1699
+ n(F, {
1700
+ outlined: "border border-primary bg-surface",
1701
+ filled: "border-0 bg-surface-secondary",
1702
+ underlined: "border-0 border-b border-primary bg-transparent rounded-none"
1703
+ });
1704
+ }), m(() => (l(H()), l(p())), () => {
1705
+ n(v, H() ? "focus:ring-error border-error" : p() ? "focus:ring-success border-success" : "");
1706
+ }), m(() => {
1707
+ }, () => {
1708
+ n(y, [
1709
+ "relative",
1710
+ "group",
1711
+ "transition-all",
1712
+ "duration-200",
1713
+ "ease-in-out"
1714
+ ].join(" "));
1715
+ }), m(
1716
+ () => (l(A()), e(f), l(R()), e(F), e(v), l(oe())),
1717
+ () => {
1718
+ n(O, [
1719
+ "w-full",
1720
+ "min-w-40 sm:min-w-48 md:min-w-56 lg:min-w-64",
1721
+ A() === "underlined" ? "rounded-none" : "rounded-lg",
1722
+ "transition-all",
1723
+ "duration-200",
1724
+ "ease-in-out",
1725
+ "focus:outline-none",
1726
+ "focus:ring-2",
1727
+ "focus:ring-offset-2",
1728
+ "focus:ring-offset-dark-900",
1729
+ "disabled:opacity-50",
1730
+ "disabled:cursor-not-allowed",
1731
+ "cursor-pointer",
1732
+ "appearance-none",
1733
+ "pr-10",
1734
+ e(f)[R()],
1735
+ e(F)[A()],
1736
+ e(v),
1737
+ oe()
1738
+ ].join(" "));
1739
+ }
1740
+ ), m(() => (l(H()), l(p())), () => {
1741
+ n(j, [
1742
+ "block",
1743
+ "text-sm",
1744
+ "font-medium",
1745
+ "mb-2",
1746
+ "transition-colors",
1747
+ "duration-200",
1748
+ H() ? "text-error" : p() ? "text-success" : "text-primary"
1749
+ ].join(" "));
1750
+ }), m(() => (l(H()), l(p())), () => {
1751
+ n(V, [
1752
+ "mt-2",
1753
+ "text-xs",
1754
+ H() ? "text-error" : p() ? "text-success" : "text-tertiary"
1755
+ ].join(" "));
1756
+ }), m(() => l(R()), () => {
1757
+ n(W, [
1758
+ "absolute",
1759
+ "right-3",
1760
+ "top-1/2",
1761
+ "-translate-y-1/2",
1762
+ "pointer-events-none",
1763
+ "transition-transform",
1764
+ "duration-200",
1765
+ "",
1766
+ R() === "sm" ? "w-4 h-4" : R() === "md" ? "w-5 h-5" : "w-6 h-6"
1767
+ ].join(" "));
1768
+ }), m(() => l(R()), () => {
1769
+ n(J, [
1770
+ "absolute",
1771
+ "right-8",
1772
+ "top-1/2",
1773
+ "-translate-y-1/2",
1774
+ "text-gray-400",
1775
+ "hover:text-white",
1776
+ "transition-colors",
1777
+ "duration-200",
1778
+ "focus:outline-none",
1779
+ "focus:text-white",
1780
+ R() === "sm" ? "w-4 h-4" : R() === "md" ? "w-5 h-5" : "w-6 h-6"
1781
+ ].join(" "));
1782
+ }), Ye();
1783
+ var Pe = { focus: qe, blur: Se };
1784
+ Ae();
1785
+ var ae = Wt(), ge = s(ae);
1786
+ {
1787
+ var he = (x) => {
1788
+ var o = St(), G = s(o), we = L(G);
1789
+ {
1790
+ var _ = (I) => {
1791
+ var re = Mt();
1792
+ r(I, re);
1793
+ };
1794
+ w(we, (I) => {
1795
+ k() && I(_);
1796
+ });
1797
+ }
1798
+ N(() => {
1799
+ T(o, "for", e(c)), K(o, 1, de(e(j)), "svelte-1qdann5"), ce(G, `${B() ?? ""} `);
1800
+ }), r(x, o);
1801
+ };
1802
+ w(ge, (x) => {
1803
+ B() && x(he);
1804
+ });
1805
+ }
1806
+ var je = L(ge, 2), b = s(je), $ = s(b);
1807
+ {
1808
+ var Ee = (x) => {
1809
+ var o = Pt(), G = s(o);
1810
+ o.value = o.__value = "", N(() => ce(G, Q())), r(x, o);
1811
+ };
1812
+ w($, (x) => {
1813
+ Q() && !E() && x(Ee);
1814
+ });
1815
+ }
1816
+ var _e = L($);
1817
+ ta(_e, 1, () => e(te), (x) => x.value, (x, o) => {
1818
+ var G = It(), we = s(G), _ = {};
1819
+ N(() => {
1820
+ G.disabled = (e(o), se(() => e(o).disabled)), ce(we, (e(o), se(() => e(o).label))), _ !== (_ = (e(o), se(() => e(o).value))) && (G.value = (G.__value = (e(o), se(() => e(o).value))) ?? "");
1821
+ }), r(x, G);
1822
+ }), Ue(b, (x) => n(ze, x), () => e(ze));
1823
+ var ue;
1824
+ Ea(b);
1825
+ var ie = L(b, 2);
1826
+ {
1827
+ var Le = (x) => {
1828
+ var o = Ot(), G = s(o);
1829
+ {
1830
+ let we = xa(() => R() === "sm" ? 12 : R() === "md" ? 16 : 20);
1831
+ va(G, {
1832
+ get size() {
1833
+ return e(we);
1834
+ }
1835
+ });
1836
+ }
1837
+ N(() => K(o, 1, de(e(J)), "svelte-1qdann5")), q("click", o, pe), q("keydown", o, (we) => we.key === "Enter" && pe(we)), r(x, o);
1838
+ };
1839
+ w(ie, (x) => {
1840
+ le() && E() !== void 0 && E() !== "" && x(Le);
1841
+ });
1842
+ }
1843
+ var fe = L(ie, 2), h = s(fe);
1844
+ {
1845
+ let x = xa(() => R() === "sm" ? 16 : R() === "md" ? 20 : 24);
1846
+ Ua(h, {
1847
+ get size() {
1848
+ return e(x);
1849
+ }
1850
+ });
1851
+ }
1852
+ var Ie = L(fe, 2), Ke = L(je, 2);
1853
+ {
1854
+ var Ge = (x) => {
1855
+ var o = Kt(), G = s(o);
1856
+ {
1857
+ var we = (I) => {
1858
+ var re = Dt(), ye = s(re);
1859
+ ua(ye, { size: 16, class: "flex-shrink-0" });
1860
+ var Oe = L(ye, 2), ne = s(Oe);
1861
+ N(() => ce(ne, H())), r(I, re);
1862
+ }, _ = (I) => {
1863
+ var re = ke(), ye = me(re);
1864
+ {
1865
+ var Oe = (Be) => {
1866
+ var Ne = Ft(), De = s(Ne);
1867
+ fa(De, { size: 16, class: "flex-shrink-0" });
1868
+ var Re = L(De, 2), Me = s(Re);
1869
+ N(() => ce(Me, p())), r(Be, Ne);
1870
+ }, ne = (Be) => {
1871
+ var Ne = ke(), De = me(Ne);
1872
+ {
1873
+ var Re = (Me) => {
1874
+ var Fe = Rt(), Ve = s(Fe);
1875
+ N(() => ce(Ve, Y())), r(Me, Fe);
1876
+ };
1877
+ w(
1878
+ De,
1879
+ (Me) => {
1880
+ Y() && Me(Re);
1881
+ },
1882
+ !0
1883
+ );
1884
+ }
1885
+ r(Be, Ne);
1886
+ };
1887
+ w(
1888
+ ye,
1889
+ (Be) => {
1890
+ p() ? Be(Oe) : Be(ne, !1);
1891
+ },
1892
+ !0
1893
+ );
1894
+ }
1895
+ r(I, re);
1896
+ };
1897
+ w(G, (I) => {
1898
+ H() ? I(we) : I(_, !1);
1899
+ });
1900
+ }
1901
+ N(() => {
1902
+ T(o, "id", `${e(c) ?? ""}-help`), K(o, 1, de(e(V)), "svelte-1qdann5");
1903
+ }), r(x, o);
1904
+ };
1905
+ w(Ke, (x) => {
1906
+ (H() || p() || Y()) && x(Ge);
1907
+ });
1908
+ }
1909
+ return N(() => {
1910
+ K(ae, 1, de(e(y)), "svelte-1qdann5"), T(b, "id", e(c)), b.disabled = g(), b.required = k(), T(b, "name", be()), K(b, 1, de(e(O)), "svelte-1qdann5"), T(b, "aria-invalid", H() ? "true" : "false"), T(b, "aria-describedby", H() || p() || Y() ? `${e(c)}-help` : void 0), ue !== (ue = E()) && (b.value = (b.__value = E()) ?? "", Ba(b, E())), K(fe, 1, de(e(W)), "svelte-1qdann5"), K(Ie, 1, `absolute inset-0 rounded-lg pointer-events-none transition-all duration-200 ${e(Ce) ? "ring-2 ring-primary" : ""}`, "svelte-1qdann5");
1911
+ }), q("input", b, P), q("change", b, Z), q("focus", b, D), q("blur", b, z), q("keydown", b, C), q("keyup", b, U), r(M, ae), We(a, "focus", qe), We(a, "blur", Se), Te(Pe);
1912
+ }
1913
+ var Xt = u('<span class="text-error ml-1 svelte-1bsl3nr" aria-label="required">*</span>'), Gt = u("<label> <!></label>"), Vt = u("<div> </div>"), Yt = u('<div class="flex items-center gap-1 svelte-1bsl3nr"><!> <span class="svelte-1bsl3nr"> </span></div>'), Ut = u('<div class="flex items-center gap-1 svelte-1bsl3nr"><!> <span class="svelte-1bsl3nr"> </span></div>'), Jt = u('<span class="svelte-1bsl3nr"> </span>'), Qt = u("<div><!></div>"), Zt = u('<div><!> <div class="relative svelte-1bsl3nr"><textarea></textarea></div> <!> <!></div>');
1914
+ const $t = {
1915
+ hash: "svelte-1bsl3nr",
1916
+ code: `
1917
+ /* Enhanced focus styles using semantic tokens */.textarea-focus-visible {outline:2px solid rgb(var(--color-focus-ring));outline-offset:2px;}
1918
+
1919
+ /* Smooth transitions for all interactive elements */textarea.svelte-1bsl3nr {transition:all 0.2s cubic-bezier(0.4, 0, 0.2, 1);}
1920
+
1921
+ /* Custom scrollbar for textarea using semantic tokens */textarea.svelte-1bsl3nr::-webkit-scrollbar {width:6px;}textarea.svelte-1bsl3nr::-webkit-scrollbar-track {background:transparent;}textarea.svelte-1bsl3nr::-webkit-scrollbar-thumb {background:rgb(var(--color-border-secondary));border-radius:3px;}textarea.svelte-1bsl3nr::-webkit-scrollbar-thumb:hover {background:rgb(var(--color-border-hover));}
1922
+
1923
+ /* Placeholder styling using semantic tokens */textarea.svelte-1bsl3nr::-moz-placeholder {-moz-transition:color 0.2s ease;transition:color 0.2s ease;color:rgb(var(--color-text-placeholder));}textarea.svelte-1bsl3nr::placeholder {transition:color 0.2s ease;color:rgb(var(--color-text-placeholder));}textarea.svelte-1bsl3nr:focus::-moz-placeholder {color:rgb(var(--color-text-tertiary));}textarea.svelte-1bsl3nr:focus::placeholder {color:rgb(var(--color-text-tertiary));}
1924
+
1925
+ /* Character count styling using semantic tokens */.char-count-warning.svelte-1bsl3nr {color:rgb(var(--color-warning));}.char-count-error.svelte-1bsl3nr {color:rgb(var(--color-error));}
1926
+
1927
+ /* Resize handle styling */textarea.svelte-1bsl3nr:not(.resize-none) {resize:both;}textarea.resize-x.svelte-1bsl3nr {resize:horizontal;}textarea.resize-y.svelte-1bsl3nr {resize:vertical;}
1928
+
1929
+ /* Focus ring animation */.focus-ring.svelte-1bsl3nr {
1930
+ animation: svelte-1bsl3nr-focus-ring-pulse 0.2s ease-out;}
1931
+
1932
+ @keyframes svelte-1bsl3nr-focus-ring-pulse {
1933
+ 0% {
1934
+ transform: scale(0.95);
1935
+ opacity: 0;
1936
+ }
1937
+ 100% {
1938
+ transform: scale(1);
1939
+ opacity: 1;
1940
+ }
1941
+ }`
1942
+ };
1943
+ function ur(M, a) {
1944
+ He(a, !1), sa(M, $t);
1945
+ const c = i(), d = i(), f = i(), F = i(), v = i(), y = i(), O = i(), j = i(), V = i(), W = i(), J = i(), E = i(), S = i(), Q = i();
1946
+ let B = t(a, "value", 12, ""), g = t(a, "label", 8, ""), k = t(a, "placeholder", 8, ""), H = t(a, "helperText", 8, ""), p = t(a, "disabled", 8, !1), Y = t(a, "required", 8, !1), R = t(a, "readonly", 8, !1), A = t(a, "id", 8, void 0), ee = t(a, "name", 8, void 0), le = t(a, "error", 8, ""), be = t(a, "success", 8, ""), ve = t(a, "helpText", 8, ""), oe = t(a, "maxLength", 8, void 0), xe = t(a, "minLength", 8, void 0), ze = t(a, "rows", 8, 4), Ce = t(a, "resize", 8, "vertical"), X = t(a, "autoResize", 8, !1), te = t(a, "size", 8, "md"), P = t(a, "variant", 8, "outlined"), Z = t(a, "className", 8, ""), D = t(a, "ariaLabel", 8, void 0);
1947
+ const z = Xe();
1948
+ let C = i(), U = i(!1);
1949
+ function pe(o) {
1950
+ const G = o.target;
1951
+ B(G.value), n(U, B() !== ""), X() && je(), z("input", { value: B() });
1952
+ }
1953
+ function qe(o) {
1954
+ const G = o.target;
1955
+ B(G.value), n(U, B() !== ""), z("change", { value: B() });
1956
+ }
1957
+ function Se(o) {
1958
+ z("focus", { event: o });
1959
+ }
1960
+ function Pe(o) {
1961
+ z("blur", { event: o });
1962
+ }
1963
+ function ae(o) {
1964
+ z("keydown", { event: o });
1965
+ }
1966
+ function ge(o) {
1967
+ z("keyup", { event: o });
1968
+ }
1969
+ function he(o) {
1970
+ z("resize", { event: o });
1971
+ }
1972
+ function je() {
1973
+ e(C) && (oa(C, e(C).style.height = "auto"), oa(C, e(C).style.height = e(C).scrollHeight + "px"));
1974
+ }
1975
+ function b() {
1976
+ var o;
1977
+ (o = e(C)) == null || o.focus();
1978
+ }
1979
+ function $() {
1980
+ var o;
1981
+ (o = e(C)) == null || o.blur();
1982
+ }
1983
+ function Ee() {
1984
+ var o;
1985
+ (o = e(C)) == null || o.select();
1986
+ }
1987
+ m(() => l(A()), () => {
1988
+ n(c, A() || `textarea-${Math.random().toString(36).substr(2, 9)}`);
1989
+ }), m(() => l(B()), () => {
1990
+ n(U, B() !== "" && B() !== null && B() !== void 0);
1991
+ }), m(() => l(le()), () => {
1992
+ n(d, !!le());
1993
+ }), m(() => l(be()), () => {
1994
+ n(f, !!be());
1995
+ }), m(() => {
1996
+ }, () => {
1997
+ n(F, {
1998
+ sm: "px-3 py-1.5 text-sm",
1999
+ md: "px-4 py-2.5 text-sm",
2000
+ lg: "px-5 py-3 text-base"
2001
+ });
2002
+ }), m(() => {
2003
+ }, () => {
2004
+ n(v, {
2005
+ outlined: "border border-primary bg-surface",
2006
+ filled: "border-0 bg-surface-secondary",
2007
+ underlined: "border-0 border-b border-primary bg-transparent rounded-none"
2008
+ });
2009
+ }), m(() => {
2010
+ }, () => {
2011
+ n(y, {
2012
+ none: "resize-none",
2013
+ both: "resize",
2014
+ horizontal: "resize-x",
2015
+ vertical: "resize-y"
2016
+ });
2017
+ }), m(
2018
+ () => (l(P()), e(F), l(te()), e(v), e(y), l(Ce()), l(Z())),
2019
+ () => {
2020
+ n(O, [
2021
+ "w-full",
2022
+ "min-w-0",
2023
+ P() === "underlined" ? "rounded-none" : "rounded-md",
2024
+ "transition-all",
2025
+ "duration-200",
2026
+ "ease-in-out",
2027
+ "focus:outline-none",
2028
+ "focus:ring-2",
2029
+ "focus:ring-focus",
2030
+ "focus:ring-offset-2",
2031
+ "focus:ring-offset-surface",
2032
+ "disabled:opacity-50",
2033
+ "disabled:cursor-not-allowed",
2034
+ "read-only:cursor-default",
2035
+ "read-only:opacity-75",
2036
+ "overflow-hidden",
2037
+ e(F)[te()],
2038
+ e(v)[P()],
2039
+ e(y)[Ce()],
2040
+ Z()
2041
+ ].join(" "));
2042
+ }
2043
+ ), m(() => (e(d), e(f)), () => {
2044
+ n(j, e(d) ? "border-error text-primary placeholder-placeholder focus:ring-error focus:border-error" : e(f) ? "border-success text-primary placeholder-placeholder focus:ring-success focus:border-success" : "text-primary placeholder-placeholder focus:ring-focus focus:border-focus");
2045
+ }), m(() => l(p()), () => {
2046
+ n(V, p() ? "bg-surface-disabled text-disabled border-disabled cursor-not-allowed" : "");
2047
+ }), m(
2048
+ () => (e(O), e(j), e(V)),
2049
+ () => {
2050
+ n(W, [
2051
+ e(O),
2052
+ e(j),
2053
+ e(V)
2054
+ ].join(" "));
2055
+ }
2056
+ ), m(() => {
2057
+ }, () => {
2058
+ n(J, [
2059
+ "relative",
2060
+ "group",
2061
+ "transition-all",
2062
+ "duration-200",
2063
+ "ease-in-out"
2064
+ ].join(" "));
2065
+ }), m(() => (e(d), e(f)), () => {
2066
+ n(E, [
2067
+ "block",
2068
+ "text-sm",
2069
+ "font-medium",
2070
+ "mb-2",
2071
+ "transition-colors",
2072
+ "duration-200",
2073
+ e(d) ? "text-error" : e(f) ? "text-success" : "text-primary"
2074
+ ].join(" "));
2075
+ }), m(() => (e(d), e(f)), () => {
2076
+ n(S, [
2077
+ "mt-2",
2078
+ "text-xs",
2079
+ e(d) ? "text-error" : e(f) ? "text-success" : "text-secondary"
2080
+ ].join(" "));
2081
+ }), m(() => (l(oe()), l(B())), () => {
2082
+ n(Q, [
2083
+ "text-xs",
2084
+ "text-secondary",
2085
+ "mt-1",
2086
+ "text-right",
2087
+ oe() && B().length > oe() * 0.9 ? "text-warning" : "",
2088
+ oe() && B().length >= oe() ? "text-error" : ""
2089
+ ].join(" "));
2090
+ }), Ye();
2091
+ var _e = { focus: b, blur: $, select: Ee };
2092
+ Ae();
2093
+ var ue = Zt(), ie = s(ue);
2094
+ {
2095
+ var Le = (o) => {
2096
+ var G = Gt(), we = s(G), _ = L(we);
2097
+ {
2098
+ var I = (re) => {
2099
+ var ye = Xt();
2100
+ r(re, ye);
2101
+ };
2102
+ w(_, (re) => {
2103
+ Y() && re(I);
2104
+ });
2105
+ }
2106
+ N(() => {
2107
+ T(G, "for", e(c)), K(G, 1, de(e(E)), "svelte-1bsl3nr"), ce(we, `${g() ?? ""} `);
2108
+ }), r(o, G);
2109
+ };
2110
+ w(ie, (o) => {
2111
+ g() && o(Le);
2112
+ });
2113
+ }
2114
+ var fe = L(ie, 2), h = s(fe);
2115
+ Ue(h, (o) => n(C, o), () => e(C));
2116
+ var Ie = L(fe, 2);
2117
+ {
2118
+ var Ke = (o) => {
2119
+ var G = Vt(), we = s(G);
2120
+ N(() => {
2121
+ K(G, 1, de(e(Q)), "svelte-1bsl3nr"), ce(we, `${l(B()), se(() => B().length) ?? ""}/${oe() ?? ""}`);
2122
+ }), r(o, G);
2123
+ };
2124
+ w(Ie, (o) => {
2125
+ oe() && o(Ke);
2126
+ });
2127
+ }
2128
+ var Ge = L(Ie, 2);
2129
+ {
2130
+ var x = (o) => {
2131
+ var G = Qt(), we = s(G);
2132
+ {
2133
+ var _ = (re) => {
2134
+ var ye = Yt(), Oe = s(ye);
2135
+ ua(Oe, { size: 14, class: "flex-shrink-0" });
2136
+ var ne = L(Oe, 2), Be = s(ne);
2137
+ N(() => ce(Be, le())), r(re, ye);
2138
+ }, I = (re) => {
2139
+ var ye = ke(), Oe = me(ye);
2140
+ {
2141
+ var ne = (Ne) => {
2142
+ var De = Ut(), Re = s(De);
2143
+ fa(Re, { size: 14, class: "flex-shrink-0" });
2144
+ var Me = L(Re, 2), Fe = s(Me);
2145
+ N(() => ce(Fe, be())), r(Ne, De);
2146
+ }, Be = (Ne) => {
2147
+ var De = ke(), Re = me(De);
2148
+ {
2149
+ var Me = (Fe) => {
2150
+ var Ve = Jt(), ra = s(Ve);
2151
+ N(() => ce(ra, ve())), r(Fe, Ve);
2152
+ };
2153
+ w(
2154
+ Re,
2155
+ (Fe) => {
2156
+ ve() && Fe(Me);
2157
+ },
2158
+ !0
2159
+ );
2160
+ }
2161
+ r(Ne, De);
2162
+ };
2163
+ w(
2164
+ Oe,
2165
+ (Ne) => {
2166
+ e(f) ? Ne(ne) : Ne(Be, !1);
2167
+ },
2168
+ !0
2169
+ );
2170
+ }
2171
+ r(re, ye);
2172
+ };
2173
+ w(we, (re) => {
2174
+ e(d) ? re(_) : re(I, !1);
2175
+ });
2176
+ }
2177
+ N(() => {
2178
+ T(G, "id", `${e(c) ?? ""}-help`), K(G, 1, de(e(S)), "svelte-1bsl3nr");
2179
+ }), r(o, G);
2180
+ };
2181
+ w(Ge, (o) => {
2182
+ (e(d) || e(f) || ve()) && o(x);
2183
+ });
2184
+ }
2185
+ return N(() => {
2186
+ K(ue, 1, de(e(J)), "svelte-1bsl3nr"), T(h, "id", e(c)), ya(h, B()), T(h, "placeholder", k()), h.disabled = p(), h.required = Y(), h.readOnly = R(), T(h, "maxlength", oe()), T(h, "minlength", xe()), T(h, "name", ee()), T(h, "rows", ze()), K(h, 1, de(e(W)), "svelte-1bsl3nr"), T(h, "aria-invalid", e(d) ? "true" : "false"), T(h, "aria-describedby", e(d) || e(f) || H() || oe() ? `${e(c)}-help` : void 0), T(h, "aria-label", D() || (g() ? void 0 : "Textarea field")), T(h, "aria-required", Y());
2187
+ }), q("input", h, pe), q("change", h, qe), q("focus", h, Se), q("blur", h, Pe), q("keydown", h, ae), q("keyup", h, ge), q("resize", h, he), r(M, ue), We(a, "focus", b), We(a, "blur", $), We(a, "select", Ee), Te(_e);
2188
+ }
2189
+ var er = u('<span class="text-red-400 ml-1">*</span>'), ar = u('<button type="button" role="radio"><!> <span class="hidden sm:inline"> </span></button>'), tr = u('<div class="space-y-2"><label class="block text-sm font-medium text-stone-300"> <!></label> <div class="flex gap-1 p-1 bg-stone-800 rounded-lg border border-stone-700 min-w-48 sm:min-w-56 md:min-w-64 lg:min-w-72" role="radiogroup"></div></div>');
2190
+ function fr(M, a) {
2191
+ He(a, !1);
2192
+ let c = t(a, "value", 12, "center"), d = t(a, "label", 8, "Text Alignment"), f = t(a, "required", 8, !1), F = t(a, "size", 8, "sm");
2193
+ const v = Xe(), y = `text-alignment-${Math.random().toString(36).substr(2, 9)}`, O = [
2194
+ { value: "left", label: "Left", component: et },
2195
+ { value: "center", label: "Center", component: Za },
2196
+ { value: "right", label: "Right", component: $a }
2197
+ ];
2198
+ function j(g) {
2199
+ c(g), v("change", { value: g });
2200
+ }
2201
+ const V = {
2202
+ sm: "text-xs px-2 py-1",
2203
+ md: "text-sm px-3 py-2",
2204
+ lg: "text-base px-4 py-3"
2205
+ };
2206
+ Ae();
2207
+ var W = tr(), J = s(W), E = s(J), S = L(E);
2208
+ {
2209
+ var Q = (g) => {
2210
+ var k = er();
2211
+ r(g, k);
2212
+ };
2213
+ w(S, (g) => {
2214
+ f() && g(Q);
2215
+ });
2216
+ }
2217
+ var B = L(J, 2);
2218
+ ta(B, 5, () => O, La, (g, k) => {
2219
+ var H = ar(), p = s(H);
2220
+ ia(p, () => e(k).component, (A, ee) => {
2221
+ ee(A, { size: 16 });
2222
+ });
2223
+ var Y = L(p, 2), R = s(Y);
2224
+ N(() => {
2225
+ K(H, 1, `flex-1 flex items-center justify-center gap-2 ${l(F()), se(() => V[F()]) ?? ""} rounded-md transition-all duration-200 ${l(c()), e(k), se(() => c() === e(k).value ? "bg-blue-600 text-white shadow-sm" : "text-stone-400 hover:text-stone-200 hover:bg-stone-700") ?? ""}`), T(H, "aria-checked", (l(c()), e(k), se(() => c() === e(k).value))), T(H, "aria-label", (e(k), se(() => e(k).label))), ce(R, (e(k), se(() => e(k).label)));
2226
+ }), q("click", H, () => j(e(k).value)), q("keydown", H, (A) => A.key === "Enter" && j(e(k).value)), r(g, H);
2227
+ }), N(() => {
2228
+ T(J, "for", y), ce(E, `${d() ?? ""} `), T(B, "id", y), T(B, "aria-label", d());
2229
+ }), r(M, W), Te();
2230
+ }
2231
+ var rr = u('<button type="button" class="text-sm font-medium text-primary cursor-pointer select-none hover:text-secondary transition-colors"> </button>'), nr = u('<div><button type="button" role="switch"><span></span></button> <!></div>');
2232
+ function br(M, a) {
2233
+ He(a, !1);
2234
+ const c = i();
2235
+ let d = t(a, "checked", 12, !1), f = t(a, "disabled", 8, !1), F = t(a, "label", 8, ""), v = t(a, "size", 8, "md"), y = t(a, "className", 8, "");
2236
+ const O = Xe();
2237
+ function j() {
2238
+ f() || (d(!d()), O("change", { checked: d() }));
2239
+ }
2240
+ const V = { sm: "w-8 h-4", md: "w-11 h-6", lg: "w-14 h-7" }, W = { sm: "w-3 h-3", md: "w-5 h-5", lg: "w-6 h-6" };
2241
+ m(() => l(d()), () => {
2242
+ n(c, {
2243
+ sm: d() ? "translate-x-4" : "translate-x-0",
2244
+ md: d() ? "translate-x-5" : "translate-x-0",
2245
+ lg: d() ? "translate-x-7" : "translate-x-0"
2246
+ });
2247
+ }), Ye(), Ae();
2248
+ var J = nr(), E = s(J), S = s(E), Q = L(E, 2);
2249
+ {
2250
+ var B = (g) => {
2251
+ var k = rr(), H = s(k);
2252
+ N(() => ce(H, F())), q("click", k, j), q("keydown", k, (p) => {
2253
+ (p.key === "Enter" || p.key === " ") && (p.preventDefault(), j());
2254
+ }), r(g, k);
2255
+ };
2256
+ w(Q, (g) => {
2257
+ F() && g(B);
2258
+ });
2259
+ }
2260
+ N(() => {
2261
+ K(J, 1, `flex items-center space-x-3 min-w-32 sm:min-w-36 md:min-w-40 lg:min-w-44 ${y() ?? ""}`), T(E, "aria-checked", d()), T(E, "aria-label", F() || "Toggle"), E.disabled = f(), K(E, 1, `relative inline-flex ${l(v()), se(() => V[v()]) ?? ""} flex-shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors duration-200 ease-in-out focus:outline-none focus:ring-2 focus:ring-primary focus:ring-offset-2 ${d() ? "bg-primary" : "bg-surface-tertiary"} ${f() ? "opacity-50 cursor-not-allowed" : "hover:bg-opacity-80"}`), K(S, 1, `pointer-events-none inline-block ${l(v()), se(() => W[v()]) ?? ""} transform rounded-full bg-surface shadow-lg ring-0 transition duration-200 ease-in-out ${e(c), l(v()), se(() => e(c)[v()]) ?? ""}`);
2262
+ }), q("click", E, j), q("keydown", E, (g) => {
2263
+ (g.key === "Enter" || g.key === " ") && (g.preventDefault(), j());
2264
+ }), r(M, J), Te();
2265
+ }
2266
+ export {
2267
+ or as B,
2268
+ ir as C,
2269
+ Ya as D,
2270
+ cr as I,
2271
+ vr as S,
2272
+ ur as T,
2273
+ dr as a,
2274
+ fr as b,
2275
+ br as c,
2276
+ st as d
2277
+ };