@nice2dev/ui-video 1.0.20 → 1.0.22

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -1,6 +1,1764 @@
1
- import { jsxs as a, jsx as e, Fragment as ae } from "react/jsx-runtime";
2
- import { useState as p, useRef as T, useEffect as re, useCallback as le } from "react";
3
- const ue = {
1
+ import { jsx as e, jsxs as r, Fragment as ie } from "react/jsx-runtime";
2
+ import { useContext as ye, createContext as $, memo as Se, useState as v, useEffect as ne, useRef as F, useCallback as me } from "react";
3
+ const He = (l, m) => m, Ie = $(He);
4
+ function Te() {
5
+ return { t: ye(Ie) };
6
+ }
7
+ $({
8
+ dir: "ltr",
9
+ isRTL: !1,
10
+ flip: (l) => l,
11
+ value: (l) => l.ltr
12
+ });
13
+ $(null);
14
+ $(null);
15
+ const Re = {
16
+ radius: "md",
17
+ shadow: "md",
18
+ fill: "solid",
19
+ buttonStyle: "flat",
20
+ inputStyle: "bordered",
21
+ cardStyle: "elevated",
22
+ badgeStyle: "solid",
23
+ tabStyle: "underline",
24
+ toggleStyle: "default",
25
+ tooltipStyle: "dark",
26
+ modalStyle: "default",
27
+ tableStyle: "default",
28
+ menuStyle: "default",
29
+ animation: "normal",
30
+ density: "normal"
31
+ };
32
+ $({
33
+ displayStyle: "default",
34
+ variantConfig: Re,
35
+ setDisplayStyle: () => {
36
+ }
37
+ });
38
+ $({});
39
+ $({
40
+ direction: "ltr",
41
+ isRTL: !1,
42
+ flip: (l) => l,
43
+ flipStyle: (l, m) => ({ [l]: m })
44
+ });
45
+ $({
46
+ permissions: {},
47
+ getAccessMode: () => "full"
48
+ });
49
+ $(null);
50
+ const Me = process.env.NODE_ENV === "development";
51
+ let he = {
52
+ enabled: Me,
53
+ slowRenderThreshold: 16
54
+ };
55
+ const be = [], pe = /* @__PURE__ */ new Map(), ve = /* @__PURE__ */ new Map();
56
+ function De() {
57
+ be.length = 0, pe.clear(), ve.clear();
58
+ }
59
+ function _e(l) {
60
+ const m = he.slowRenderThreshold;
61
+ return be.filter((f) => f.actualDuration > m);
62
+ }
63
+ function ae(l) {
64
+ return l < 1 ? `${(l * 1e3).toFixed(0)}μs` : l < 1e3 ? `${l.toFixed(2)}ms` : `${(l / 1e3).toFixed(2)}s`;
65
+ }
66
+ function $e() {
67
+ const l = Array.from(pe.values()), m = _e(), f = l.reduce((T, p) => T + p.renderCount, 0), C = l.length > 0 ? l.reduce((T, p) => T + p.avgRenderTime, 0) / l.length : 0, I = Array.from(ve.values());
68
+ return { stats: l, slowRenders: m, totalRenders: f, avgRenderTime: C, marks: I };
69
+ }
70
+ function Ae() {
71
+ const l = $e();
72
+ console.group(
73
+ "%c[Nice2Dev Performance Report]",
74
+ "color: var(--nice-info, #6366f1); font-weight: bold; font-size: 14px"
75
+ ), console.log(`Total renders: ${l.totalRenders}`), console.log(`Average render time: ${ae(l.avgRenderTime)}`), console.log(`Slow renders: ${l.slowRenders.length}`), console.group("Component Stats"), console.table(
76
+ l.stats.sort((m, f) => f.totalRenderTime - m.totalRenderTime).map((m) => ({
77
+ Name: m.componentName,
78
+ Renders: m.renderCount,
79
+ "Avg Time": ae(m.avgRenderTime),
80
+ "Max Time": ae(m.maxRenderTime),
81
+ "Total Time": ae(m.totalRenderTime),
82
+ "Slow Renders": m.slowRenderCount
83
+ }))
84
+ ), console.groupEnd(), l.slowRenders.length > 0 && (console.group("Slow Renders (last 10)"), console.table(
85
+ l.slowRenders.slice(-10).map((m) => ({
86
+ Component: m.componentName,
87
+ Phase: m.phase,
88
+ Duration: ae(m.actualDuration),
89
+ Time: new Date(m.timestamp).toLocaleTimeString()
90
+ }))
91
+ ), console.groupEnd()), l.marks.length > 0 && (console.group("Custom Marks"), console.table(
92
+ l.marks.filter((m) => m.duration).map((m) => ({
93
+ Name: m.name,
94
+ Duration: ae(m.duration)
95
+ }))
96
+ ), console.groupEnd()), console.groupEnd();
97
+ }
98
+ const Ee = Se(
99
+ ({ position: l = "bottom-right", defaultCollapsed: m = !0 }) => {
100
+ const [f, C] = v(m), [I, T] = v([]), [p, i] = v({ used: 0, total: 0 });
101
+ if (ne(() => {
102
+ const b = () => {
103
+ const y = Array.from(pe.values());
104
+ T(y.sort((S, z) => z.totalRenderTime - S.totalRenderTime).slice(0, 10));
105
+ const k = window.performance;
106
+ k.memory && i({
107
+ used: k.memory.usedJSHeapSize / 1024 / 1024,
108
+ total: k.memory.totalJSHeapSize / 1024 / 1024
109
+ });
110
+ };
111
+ b();
112
+ const E = setInterval(b, 2e3);
113
+ return () => clearInterval(E);
114
+ }, []), !he.enabled)
115
+ return null;
116
+ const D = {
117
+ position: "fixed",
118
+ zIndex: 99999,
119
+ ...l.includes("top") ? { top: 8 } : { bottom: 8 },
120
+ ...l.includes("left") ? { left: 8 } : { right: 8 }
121
+ };
122
+ return /* @__PURE__ */ r(
123
+ "div",
124
+ {
125
+ style: {
126
+ ...D,
127
+ background: "var(--nice-overlay-85, rgba(0, 0, 0, 0.85))",
128
+ color: "var(--bg-primary, #fff)",
129
+ borderRadius: 8,
130
+ fontSize: 11,
131
+ fontFamily: "Monaco, Consolas, monospace",
132
+ padding: f ? "4px 8px" : 8,
133
+ maxWidth: f ? "auto" : 300,
134
+ maxHeight: f ? "auto" : 400,
135
+ overflow: "auto"
136
+ },
137
+ children: [
138
+ /* @__PURE__ */ r(
139
+ "div",
140
+ {
141
+ style: { cursor: "pointer", display: "flex", alignItems: "center", gap: 8 },
142
+ onClick: () => C((b) => !b),
143
+ children: [
144
+ /* @__PURE__ */ e("span", { style: { color: "var(--color-success, #22c55e)" }, children: "●" }),
145
+ /* @__PURE__ */ e("span", { children: "Profiler" }),
146
+ p.used > 0 && /* @__PURE__ */ r(
147
+ "span",
148
+ {
149
+ style: {
150
+ color: p.used > 100 ? "var(--color-warning, #f59e0b)" : "var(--text-muted, #64748b)"
151
+ },
152
+ children: [
153
+ p.used.toFixed(0),
154
+ "MB"
155
+ ]
156
+ }
157
+ ),
158
+ /* @__PURE__ */ e("span", { style: { marginLeft: "auto", opacity: 0.5 }, children: f ? "▼" : "▲" })
159
+ ]
160
+ }
161
+ ),
162
+ !f && /* @__PURE__ */ r("div", { style: { marginTop: 8 }, children: [
163
+ /* @__PURE__ */ e(
164
+ "div",
165
+ {
166
+ style: {
167
+ borderBottom: "1px solid var(--border-color, #333)",
168
+ paddingBottom: 4,
169
+ marginBottom: 8
170
+ },
171
+ children: /* @__PURE__ */ e("strong", { children: "Top Components" })
172
+ }
173
+ ),
174
+ I.map((b) => /* @__PURE__ */ r("div", { style: { marginBottom: 4, display: "flex", gap: 8 }, children: [
175
+ /* @__PURE__ */ e("span", { style: { flex: 1, overflow: "hidden", textOverflow: "ellipsis" }, children: b.componentName }),
176
+ /* @__PURE__ */ e(
177
+ "span",
178
+ {
179
+ style: {
180
+ color: b.avgRenderTime > 16 ? "var(--color-warning, #f59e0b)" : "var(--color-success, #22c55e)"
181
+ },
182
+ children: ae(b.avgRenderTime)
183
+ }
184
+ ),
185
+ /* @__PURE__ */ r(
186
+ "span",
187
+ {
188
+ style: { color: "var(--text-muted, #64748b)", minWidth: 30, textAlign: "right" },
189
+ children: [
190
+ "x",
191
+ b.renderCount
192
+ ]
193
+ }
194
+ )
195
+ ] }, b.componentName)),
196
+ /* @__PURE__ */ r("div", { style: { marginTop: 8, display: "flex", gap: 8 }, children: [
197
+ /* @__PURE__ */ e(
198
+ "button",
199
+ {
200
+ onClick: Ae,
201
+ style: {
202
+ flex: 1,
203
+ padding: "4px 8px",
204
+ background: "var(--bg-tertiary, #333)",
205
+ border: "none",
206
+ borderRadius: 4,
207
+ color: "var(--bg-primary, #fff)",
208
+ cursor: "pointer",
209
+ fontSize: 10
210
+ },
211
+ children: "Print Report"
212
+ }
213
+ ),
214
+ /* @__PURE__ */ e(
215
+ "button",
216
+ {
217
+ onClick: De,
218
+ style: {
219
+ flex: 1,
220
+ padding: "4px 8px",
221
+ background: "var(--bg-tertiary, #333)",
222
+ border: "none",
223
+ borderRadius: 4,
224
+ color: "var(--bg-primary, #fff)",
225
+ cursor: "pointer",
226
+ fontSize: 10
227
+ },
228
+ children: "Clear"
229
+ }
230
+ )
231
+ ] })
232
+ ] })
233
+ ]
234
+ }
235
+ );
236
+ }
237
+ );
238
+ Ee.displayName = "ProfilerOverlay";
239
+ process.env.NODE_ENV;
240
+ $(null);
241
+ const ze = $({
242
+ enabled: !0,
243
+ active: !1,
244
+ run: () => {
245
+ }
246
+ });
247
+ function Pe() {
248
+ return ye(ze);
249
+ }
250
+ function Ue(l, m) {
251
+ if (!l)
252
+ return null;
253
+ if (l === !0)
254
+ return m && m.length > 0 ? m : null;
255
+ if (Array.isArray(l))
256
+ return l.length > 0 ? l : null;
257
+ const f = l.steps ?? m;
258
+ return f && f.length > 0 ? f : null;
259
+ }
260
+ function Fe(l, m) {
261
+ return l.map((f) => ({
262
+ target: f.target,
263
+ title: f.titleKey ? m(f.titleKey, f.title ?? "") : f.title ?? "",
264
+ content: f.contentKey ? m(f.contentKey, f.content ?? "") : f.content ?? "",
265
+ placement: f.placement,
266
+ highlightPadding: f.highlightPadding,
267
+ showArrow: f.showArrow,
268
+ scrollIntoView: f.scrollIntoView,
269
+ disableInteraction: f.disableInteraction
270
+ }));
271
+ }
272
+ const Le = ({
273
+ steps: l,
274
+ autoStart: m,
275
+ label: f,
276
+ size: C = "md",
277
+ className: I,
278
+ style: T,
279
+ "data-testid": p
280
+ }) => {
281
+ const { enabled: i, run: D } = Pe(), { t: b } = Te();
282
+ if (!i || !l || l.length === 0)
283
+ return null;
284
+ const E = f ?? b("tutorial.startAria", "Start tutorial");
285
+ return /* @__PURE__ */ e(
286
+ "button",
287
+ {
288
+ type: "button",
289
+ className: `nice-tutorial-button nice-tutorial-button--${C}` + (I ? ` ${I}` : ""),
290
+ style: T,
291
+ "data-testid": p,
292
+ "aria-label": E,
293
+ title: E,
294
+ onClick: () => D(Fe(l, b), { autoStart: m }),
295
+ children: "?"
296
+ }
297
+ );
298
+ }, ue = "nice-tutorial-button-styles";
299
+ if (typeof document < "u" && !document.getElementById(ue)) {
300
+ const l = document.createElement("style");
301
+ l.id = ue, l.textContent = `
302
+ .nice-tutorial-button {
303
+ display: inline-flex;
304
+ align-items: center;
305
+ justify-content: center;
306
+ border: 1px solid var(--nice-border, #cbd5e1);
307
+ background: var(--nice-bg, #fff);
308
+ color: var(--nice-text-secondary, #475569);
309
+ border-radius: var(--nice-radius-full, 9999px);
310
+ cursor: help;
311
+ font-weight: 700;
312
+ line-height: 1;
313
+ padding: 0;
314
+ transition: background var(--nice-transition, 200ms ease), color var(--nice-transition, 200ms ease), border-color var(--nice-transition, 200ms ease);
315
+ }
316
+ .nice-tutorial-button:hover {
317
+ background: var(--nice-primary, #2563eb);
318
+ border-color: var(--nice-primary, #2563eb);
319
+ color: var(--nice-text-inverse, #fff);
320
+ }
321
+ .nice-tutorial-button:focus-visible {
322
+ outline: none;
323
+ box-shadow: 0 0 0 2px var(--nice-bg, #fff), 0 0 0 4px var(--nice-primary, #2563eb);
324
+ }
325
+ .nice-tutorial-button--sm { width: 16px; height: 16px; font-size: 11px; }
326
+ .nice-tutorial-button--md { width: 20px; height: 20px; font-size: 12px; }
327
+ `, document.head.appendChild(l);
328
+ }
329
+ $(null);
330
+ $(null);
331
+ $(null);
332
+ const ge = {
333
+ space1: "4px",
334
+ space2: "8px",
335
+ space3: "12px",
336
+ space4: "16px",
337
+ space5: "20px",
338
+ space6: "24px",
339
+ space8: "32px"
340
+ }, we = {
341
+ fontFamily: "'Inter', system-ui, -apple-system, sans-serif",
342
+ fontSizeXs: "0.75rem",
343
+ fontSizeSm: "0.8125rem",
344
+ fontSizeMd: "0.875rem",
345
+ fontSizeLg: "1rem",
346
+ fontSizeXl: "1.125rem",
347
+ fontWeightNormal: 400,
348
+ fontWeightMedium: 500,
349
+ fontWeightSemibold: 600,
350
+ fontWeightBold: 700,
351
+ lineHeight: 1.5
352
+ }, Ne = { fast: "120ms ease", normal: "200ms ease", slow: "300ms ease" }, ke = (l) => ({
353
+ color: l,
354
+ radiusSm: "4px",
355
+ radiusMd: "6px",
356
+ radiusLg: "8px",
357
+ radiusXl: "12px",
358
+ radiusFull: "9999px"
359
+ }), Ve = {
360
+ sm: "0 1px 2px rgba(0,0,0,0.05)",
361
+ md: "0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1)",
362
+ lg: "0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1)",
363
+ xl: "0 20px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.1)"
364
+ }, Oe = {
365
+ sm: "0 1px 2px rgba(0,0,0,0.3)",
366
+ md: "0 4px 6px -1px rgba(0,0,0,0.4)",
367
+ lg: "0 10px 15px -3px rgba(0,0,0,0.4)",
368
+ xl: "0 20px 25px -5px rgba(0,0,0,0.4)"
369
+ };
370
+ function d(l, m, f, C, I) {
371
+ return {
372
+ name: l,
373
+ darkMode: "light",
374
+ colors: {
375
+ ...m,
376
+ surface: m.surface ?? f.primary,
377
+ surfaceHover: m.surfaceHover ?? f.secondary
378
+ },
379
+ backgrounds: {
380
+ ...f,
381
+ elevated: f.elevated ?? f.primary,
382
+ inset: f.inset ?? f.tertiary,
383
+ canvas: f.canvas ?? f.primary
384
+ },
385
+ text: { ...C, inverse: C.inverse ?? "#ffffff" },
386
+ borders: ke(I),
387
+ shadows: Ve,
388
+ spacing: ge,
389
+ typography: we,
390
+ transitions: Ne
391
+ };
392
+ }
393
+ function x(l, m, f, C, I) {
394
+ return {
395
+ name: l,
396
+ darkMode: "dark",
397
+ colors: {
398
+ ...m,
399
+ surface: m.surface ?? f.secondary,
400
+ surfaceHover: m.surfaceHover ?? f.tertiary
401
+ },
402
+ backgrounds: {
403
+ ...f,
404
+ elevated: f.elevated ?? f.secondary,
405
+ inset: f.inset ?? f.primary,
406
+ canvas: f.canvas ?? f.primary
407
+ },
408
+ text: { ...C, inverse: C.inverse ?? "#0f172a" },
409
+ borders: ke(I),
410
+ shadows: Oe,
411
+ spacing: ge,
412
+ typography: we,
413
+ transitions: Ne
414
+ };
415
+ }
416
+ d(
417
+ "Slate",
418
+ {
419
+ primary: "#64748b",
420
+ primaryHover: "#475569",
421
+ success: "#10b981",
422
+ warning: "#f59e0b",
423
+ error: "#ef4444",
424
+ info: "#06b6d4"
425
+ },
426
+ { primary: "#f8fafc", secondary: "#f1f5f9", tertiary: "#e2e8f0", hover: "#e2e8f0" },
427
+ { primary: "#1e293b", secondary: "#475569", muted: "#94a3b8" },
428
+ "#cbd5e1"
429
+ );
430
+ d(
431
+ "Zinc",
432
+ {
433
+ primary: "#71717a",
434
+ primaryHover: "#52525b",
435
+ success: "#22c55e",
436
+ warning: "#eab308",
437
+ error: "#ef4444",
438
+ info: "#06b6d4"
439
+ },
440
+ { primary: "#fafafa", secondary: "#f4f4f5", tertiary: "#e4e4e7", hover: "#e4e4e7" },
441
+ { primary: "#18181b", secondary: "#3f3f46", muted: "#a1a1aa" },
442
+ "#d4d4d8"
443
+ );
444
+ d(
445
+ "Stone",
446
+ {
447
+ primary: "#78716c",
448
+ primaryHover: "#57534e",
449
+ success: "#16a34a",
450
+ warning: "#ca8a04",
451
+ error: "#dc2626",
452
+ info: "#0891b2"
453
+ },
454
+ { primary: "#fafaf9", secondary: "#f5f5f4", tertiary: "#e7e5e4", hover: "#e7e5e4" },
455
+ { primary: "#1c1917", secondary: "#44403c", muted: "#a8a29e" },
456
+ "#d6d3d1"
457
+ );
458
+ d(
459
+ "Cool Gray",
460
+ {
461
+ primary: "#6b7280",
462
+ primaryHover: "#4b5563",
463
+ success: "#10b981",
464
+ warning: "#f59e0b",
465
+ error: "#ef4444",
466
+ info: "#3b82f6"
467
+ },
468
+ { primary: "#f9fafb", secondary: "#f3f4f6", tertiary: "#e5e7eb", hover: "#e5e7eb" },
469
+ { primary: "#111827", secondary: "#374151", muted: "#9ca3af" },
470
+ "#d1d5db"
471
+ );
472
+ d(
473
+ "Warm Gray",
474
+ {
475
+ primary: "#7c7568",
476
+ primaryHover: "#5c564c",
477
+ success: "#4d7c0f",
478
+ warning: "#a16207",
479
+ error: "#b91c1c",
480
+ info: "#0e7490"
481
+ },
482
+ { primary: "#faf9f7", secondary: "#f5f4f0", tertiary: "#e8e6e1", hover: "#e8e6e1" },
483
+ { primary: "#1f1d19", secondary: "#4a463d", muted: "#a09888" },
484
+ "#d4d0c8"
485
+ );
486
+ d(
487
+ "Silver",
488
+ {
489
+ primary: "#94a3b8",
490
+ primaryHover: "#64748b",
491
+ success: "#10b981",
492
+ warning: "#f59e0b",
493
+ error: "#ef4444",
494
+ info: "#38bdf8"
495
+ },
496
+ { primary: "#f8fafc", secondary: "#f1f5f9", tertiary: "#e2e8f0", hover: "#e2e8f0" },
497
+ { primary: "#334155", secondary: "#64748b", muted: "#94a3b8" },
498
+ "#cbd5e1"
499
+ );
500
+ d(
501
+ "Charcoal",
502
+ {
503
+ primary: "#374151",
504
+ primaryHover: "#1f2937",
505
+ success: "#059669",
506
+ warning: "#d97706",
507
+ error: "#dc2626",
508
+ info: "#0284c7"
509
+ },
510
+ { primary: "#f9fafb", secondary: "#f3f4f6", tertiary: "#e5e7eb", hover: "#e5e7eb" },
511
+ { primary: "#111827", secondary: "#374151", muted: "#6b7280" },
512
+ "#d1d5db"
513
+ );
514
+ d(
515
+ "Ivory",
516
+ {
517
+ primary: "#92876d",
518
+ primaryHover: "#7a6f55",
519
+ success: "#4d7c0f",
520
+ warning: "#a16207",
521
+ error: "#b91c1c",
522
+ info: "#0e7490"
523
+ },
524
+ { primary: "#fffef7", secondary: "#faf6eb", tertiary: "#f0ead6", hover: "#f0ead6" },
525
+ { primary: "#2b2517", secondary: "#5c5340", muted: "#9c9280" },
526
+ "#ddd8c4"
527
+ );
528
+ d(
529
+ "Rose",
530
+ {
531
+ primary: "#e11d48",
532
+ primaryHover: "#be123c",
533
+ success: "#16a34a",
534
+ warning: "#ea580c",
535
+ error: "#dc2626",
536
+ info: "#0891b2"
537
+ },
538
+ { primary: "#fff1f2", secondary: "#ffe4e6", tertiary: "#fecdd3", hover: "#ffe4e6" },
539
+ { primary: "#4c0519", secondary: "#881337", muted: "#f43f5e" },
540
+ "#fda4af"
541
+ );
542
+ d(
543
+ "Emerald",
544
+ {
545
+ primary: "#059669",
546
+ primaryHover: "#047857",
547
+ success: "#16a34a",
548
+ warning: "#d97706",
549
+ error: "#dc2626",
550
+ info: "#0891b2"
551
+ },
552
+ { primary: "#ecfdf5", secondary: "#d1fae5", tertiary: "#a7f3d0", hover: "#d1fae5" },
553
+ { primary: "#064e3b", secondary: "#065f46", muted: "#34d399" },
554
+ "#6ee7b7"
555
+ );
556
+ d(
557
+ "Amber",
558
+ {
559
+ primary: "#d97706",
560
+ primaryHover: "#b45309",
561
+ success: "#16a34a",
562
+ warning: "#ca8a04",
563
+ error: "#dc2626",
564
+ info: "#0284c7"
565
+ },
566
+ { primary: "#fffbeb", secondary: "#fef3c7", tertiary: "#fde68a", hover: "#fef3c7" },
567
+ { primary: "#451a03", secondary: "#78350f", muted: "#f59e0b" },
568
+ "#fcd34d"
569
+ );
570
+ d(
571
+ "Violet",
572
+ {
573
+ primary: "#7c3aed",
574
+ primaryHover: "#6d28d9",
575
+ success: "#10b981",
576
+ warning: "#f59e0b",
577
+ error: "#ef4444",
578
+ info: "#06b6d4"
579
+ },
580
+ { primary: "#f5f3ff", secondary: "#ede9fe", tertiary: "#ddd6fe", hover: "#ede9fe" },
581
+ { primary: "#2e1065", secondary: "#4c1d95", muted: "#a78bfa" },
582
+ "#c4b5fd"
583
+ );
584
+ d(
585
+ "Teal",
586
+ {
587
+ primary: "#0d9488",
588
+ primaryHover: "#0f766e",
589
+ success: "#16a34a",
590
+ warning: "#d97706",
591
+ error: "#dc2626",
592
+ info: "#0284c7"
593
+ },
594
+ { primary: "#f0fdfa", secondary: "#ccfbf1", tertiary: "#99f6e4", hover: "#ccfbf1" },
595
+ { primary: "#134e4a", secondary: "#115e59", muted: "#2dd4bf" },
596
+ "#5eead4"
597
+ );
598
+ d(
599
+ "Indigo",
600
+ {
601
+ primary: "#4f46e5",
602
+ primaryHover: "#4338ca",
603
+ success: "#10b981",
604
+ warning: "#f59e0b",
605
+ error: "#ef4444",
606
+ info: "#06b6d4"
607
+ },
608
+ { primary: "#eef2ff", secondary: "#e0e7ff", tertiary: "#c7d2fe", hover: "#e0e7ff" },
609
+ { primary: "#1e1b4b", secondary: "#312e81", muted: "#818cf8" },
610
+ "#a5b4fc"
611
+ );
612
+ d(
613
+ "Cyan",
614
+ {
615
+ primary: "#0891b2",
616
+ primaryHover: "#0e7490",
617
+ success: "#10b981",
618
+ warning: "#f59e0b",
619
+ error: "#ef4444",
620
+ info: "#0284c7"
621
+ },
622
+ { primary: "#ecfeff", secondary: "#cffafe", tertiary: "#a5f3fc", hover: "#cffafe" },
623
+ { primary: "#164e63", secondary: "#155e75", muted: "#22d3ee" },
624
+ "#67e8f9"
625
+ );
626
+ d(
627
+ "Lime",
628
+ {
629
+ primary: "#65a30d",
630
+ primaryHover: "#4d7c0f",
631
+ success: "#16a34a",
632
+ warning: "#ca8a04",
633
+ error: "#dc2626",
634
+ info: "#0891b2"
635
+ },
636
+ { primary: "#f7fee7", secondary: "#ecfccb", tertiary: "#d9f99d", hover: "#ecfccb" },
637
+ { primary: "#1a2e05", secondary: "#365314", muted: "#84cc16" },
638
+ "#bef264"
639
+ );
640
+ d(
641
+ "Pink",
642
+ {
643
+ primary: "#db2777",
644
+ primaryHover: "#be185d",
645
+ success: "#10b981",
646
+ warning: "#f59e0b",
647
+ error: "#dc2626",
648
+ info: "#06b6d4"
649
+ },
650
+ { primary: "#fdf2f8", secondary: "#fce7f3", tertiary: "#fbcfe8", hover: "#fce7f3" },
651
+ { primary: "#500724", secondary: "#831843", muted: "#f472b6" },
652
+ "#f9a8d4"
653
+ );
654
+ d(
655
+ "Orange",
656
+ {
657
+ primary: "#ea580c",
658
+ primaryHover: "#c2410c",
659
+ success: "#16a34a",
660
+ warning: "#ca8a04",
661
+ error: "#dc2626",
662
+ info: "#0891b2"
663
+ },
664
+ { primary: "#fff7ed", secondary: "#ffedd5", tertiary: "#fed7aa", hover: "#ffedd5" },
665
+ { primary: "#431407", secondary: "#7c2d12", muted: "#fb923c" },
666
+ "#fdba74"
667
+ );
668
+ d(
669
+ "Fuchsia",
670
+ {
671
+ primary: "#c026d3",
672
+ primaryHover: "#a21caf",
673
+ success: "#10b981",
674
+ warning: "#eab308",
675
+ error: "#ef4444",
676
+ info: "#06b6d4"
677
+ },
678
+ { primary: "#fdf4ff", secondary: "#fae8ff", tertiary: "#f5d0fe", hover: "#fae8ff" },
679
+ { primary: "#4a044e", secondary: "#701a75", muted: "#d946ef" },
680
+ "#e879f9"
681
+ );
682
+ d(
683
+ "Sky",
684
+ {
685
+ primary: "#0284c7",
686
+ primaryHover: "#0369a1",
687
+ success: "#10b981",
688
+ warning: "#f59e0b",
689
+ error: "#ef4444",
690
+ info: "#06b6d4"
691
+ },
692
+ { primary: "#f0f9ff", secondary: "#e0f2fe", tertiary: "#bae6fd", hover: "#e0f2fe" },
693
+ { primary: "#0c4a6e", secondary: "#075985", muted: "#38bdf8" },
694
+ "#7dd3fc"
695
+ );
696
+ d(
697
+ "Ruby",
698
+ {
699
+ primary: "#be123c",
700
+ primaryHover: "#9f1239",
701
+ success: "#059669",
702
+ warning: "#d97706",
703
+ error: "#dc2626",
704
+ info: "#0284c7"
705
+ },
706
+ { primary: "#fff1f2", secondary: "#ffe4e6", tertiary: "#fecdd3", hover: "#ffe4e6" },
707
+ { primary: "#4c0519", secondary: "#881337", muted: "#fb7185" },
708
+ "#fda4af"
709
+ );
710
+ d(
711
+ "Coral",
712
+ {
713
+ primary: "#f97316",
714
+ primaryHover: "#ea580c",
715
+ success: "#10b981",
716
+ warning: "#eab308",
717
+ error: "#ef4444",
718
+ info: "#06b6d4"
719
+ },
720
+ { primary: "#fff7ed", secondary: "#ffedd5", tertiary: "#fed7aa", hover: "#ffedd5" },
721
+ { primary: "#431407", secondary: "#9a3412", muted: "#fb923c" },
722
+ "#fdba74"
723
+ );
724
+ x(
725
+ "Midnight",
726
+ {
727
+ primary: "#818cf8",
728
+ primaryHover: "#6366f1",
729
+ success: "#34d399",
730
+ warning: "#fbbf24",
731
+ error: "#f87171",
732
+ info: "#22d3ee"
733
+ },
734
+ { primary: "#020617", secondary: "#0f172a", tertiary: "#1e293b", hover: "#1e293b" },
735
+ { primary: "#f1f5f9", secondary: "#94a3b8", muted: "#475569" },
736
+ "#1e293b"
737
+ );
738
+ x(
739
+ "Obsidian",
740
+ {
741
+ primary: "#a78bfa",
742
+ primaryHover: "#8b5cf6",
743
+ success: "#4ade80",
744
+ warning: "#facc15",
745
+ error: "#fb7185",
746
+ info: "#38bdf8"
747
+ },
748
+ { primary: "#09090b", secondary: "#18181b", tertiary: "#27272a", hover: "#27272a" },
749
+ { primary: "#fafafa", secondary: "#a1a1aa", muted: "#52525b" },
750
+ "#3f3f46"
751
+ );
752
+ x(
753
+ "Eclipse",
754
+ {
755
+ primary: "#c084fc",
756
+ primaryHover: "#a855f7",
757
+ success: "#34d399",
758
+ warning: "#fbbf24",
759
+ error: "#f87171",
760
+ info: "#67e8f9"
761
+ },
762
+ { primary: "#0c0a1d", secondary: "#1a1533", tertiary: "#2a2248", hover: "#2a2248" },
763
+ { primary: "#f5f3ff", secondary: "#a78bfa", muted: "#6d5eac" },
764
+ "#3b3266"
765
+ );
766
+ x(
767
+ "Onyx",
768
+ {
769
+ primary: "#60a5fa",
770
+ primaryHover: "#3b82f6",
771
+ success: "#4ade80",
772
+ warning: "#fbbf24",
773
+ error: "#f87171",
774
+ info: "#22d3ee"
775
+ },
776
+ { primary: "#000000", secondary: "#0a0a0a", tertiary: "#171717", hover: "#171717" },
777
+ { primary: "#ffffff", secondary: "#a3a3a3", muted: "#525252" },
778
+ "#262626"
779
+ );
780
+ x(
781
+ "Carbon",
782
+ {
783
+ primary: "#38bdf8",
784
+ primaryHover: "#0ea5e9",
785
+ success: "#4ade80",
786
+ warning: "#facc15",
787
+ error: "#f87171",
788
+ info: "#67e8f9"
789
+ },
790
+ { primary: "#161616", secondary: "#262626", tertiary: "#393939", hover: "#393939" },
791
+ { primary: "#f4f4f4", secondary: "#c6c6c6", muted: "#6f6f6f" },
792
+ "#525252"
793
+ );
794
+ x(
795
+ "Cosmos",
796
+ {
797
+ primary: "#6366f1",
798
+ primaryHover: "#4f46e5",
799
+ success: "#34d399",
800
+ warning: "#fbbf24",
801
+ error: "#f87171",
802
+ info: "#22d3ee"
803
+ },
804
+ { primary: "#030712", secondary: "#111827", tertiary: "#1f2937", hover: "#1f2937" },
805
+ { primary: "#e5e7eb", secondary: "#9ca3af", muted: "#4b5563" },
806
+ "#374151"
807
+ );
808
+ x(
809
+ "Nebula",
810
+ {
811
+ primary: "#e879f9",
812
+ primaryHover: "#d946ef",
813
+ success: "#4ade80",
814
+ warning: "#fbbf24",
815
+ error: "#fb7185",
816
+ info: "#67e8f9"
817
+ },
818
+ { primary: "#0d0117", secondary: "#1a0533", tertiary: "#2d0a52", hover: "#2d0a52" },
819
+ { primary: "#fae8ff", secondary: "#d8b4fe", muted: "#7c3aed" },
820
+ "#581c87"
821
+ );
822
+ x(
823
+ "Abyss",
824
+ {
825
+ primary: "#22d3ee",
826
+ primaryHover: "#06b6d4",
827
+ success: "#34d399",
828
+ warning: "#fbbf24",
829
+ error: "#f87171",
830
+ info: "#38bdf8"
831
+ },
832
+ { primary: "#001219", secondary: "#002a3a", tertiary: "#003e54", hover: "#003e54" },
833
+ { primary: "#e0f2fe", secondary: "#7dd3fc", muted: "#0369a1" },
834
+ "#075985"
835
+ );
836
+ x(
837
+ "Shadow",
838
+ {
839
+ primary: "#a3a3a3",
840
+ primaryHover: "#737373",
841
+ success: "#4ade80",
842
+ warning: "#facc15",
843
+ error: "#f87171",
844
+ info: "#38bdf8"
845
+ },
846
+ { primary: "#171717", secondary: "#1f1f1f", tertiary: "#2a2a2a", hover: "#2a2a2a" },
847
+ { primary: "#e5e5e5", secondary: "#a3a3a3", muted: "#525252" },
848
+ "#404040"
849
+ );
850
+ x(
851
+ "Emerald Dark",
852
+ {
853
+ primary: "#34d399",
854
+ primaryHover: "#10b981",
855
+ success: "#4ade80",
856
+ warning: "#fbbf24",
857
+ error: "#f87171",
858
+ info: "#22d3ee"
859
+ },
860
+ { primary: "#022c22", secondary: "#064e3b", tertiary: "#065f46", hover: "#065f46" },
861
+ { primary: "#ecfdf5", secondary: "#6ee7b7", muted: "#047857" },
862
+ "#047857"
863
+ );
864
+ d(
865
+ "Forest",
866
+ {
867
+ primary: "#166534",
868
+ primaryHover: "#14532d",
869
+ success: "#22c55e",
870
+ warning: "#ca8a04",
871
+ error: "#dc2626",
872
+ info: "#0891b2"
873
+ },
874
+ { primary: "#f0fdf4", secondary: "#dcfce7", tertiary: "#bbf7d0", hover: "#dcfce7" },
875
+ { primary: "#052e16", secondary: "#166534", muted: "#4ade80" },
876
+ "#86efac"
877
+ );
878
+ d(
879
+ "Ocean",
880
+ {
881
+ primary: "#0369a1",
882
+ primaryHover: "#075985",
883
+ success: "#059669",
884
+ warning: "#d97706",
885
+ error: "#dc2626",
886
+ info: "#0284c7"
887
+ },
888
+ { primary: "#f0f9ff", secondary: "#e0f2fe", tertiary: "#bae6fd", hover: "#e0f2fe" },
889
+ { primary: "#0c4a6e", secondary: "#0369a1", muted: "#38bdf8" },
890
+ "#7dd3fc"
891
+ );
892
+ d(
893
+ "Desert",
894
+ {
895
+ primary: "#b45309",
896
+ primaryHover: "#92400e",
897
+ success: "#4d7c0f",
898
+ warning: "#a16207",
899
+ error: "#b91c1c",
900
+ info: "#0e7490"
901
+ },
902
+ { primary: "#fefce8", secondary: "#fef9c3", tertiary: "#fef08a", hover: "#fef9c3" },
903
+ { primary: "#422006", secondary: "#713f12", muted: "#ca8a04" },
904
+ "#fde047"
905
+ );
906
+ d(
907
+ "Sunset",
908
+ {
909
+ primary: "#ea580c",
910
+ primaryHover: "#c2410c",
911
+ success: "#16a34a",
912
+ warning: "#d97706",
913
+ error: "#dc2626",
914
+ info: "#0891b2"
915
+ },
916
+ { primary: "#fff7ed", secondary: "#ffedd5", tertiary: "#fed7aa", hover: "#ffedd5" },
917
+ { primary: "#431407", secondary: "#9a3412", muted: "#f97316" },
918
+ "#fdba74"
919
+ );
920
+ d(
921
+ "Aurora",
922
+ {
923
+ primary: "#0d9488",
924
+ primaryHover: "#0f766e",
925
+ success: "#22c55e",
926
+ warning: "#eab308",
927
+ error: "#ef4444",
928
+ info: "#06b6d4"
929
+ },
930
+ { primary: "#f0fdfa", secondary: "#ccfbf1", tertiary: "#99f6e4", hover: "#ccfbf1" },
931
+ { primary: "#134e4a", secondary: "#115e59", muted: "#2dd4bf" },
932
+ "#5eead4"
933
+ );
934
+ d(
935
+ "Lavender",
936
+ {
937
+ primary: "#7e22ce",
938
+ primaryHover: "#6b21a8",
939
+ success: "#16a34a",
940
+ warning: "#d97706",
941
+ error: "#dc2626",
942
+ info: "#0891b2"
943
+ },
944
+ { primary: "#faf5ff", secondary: "#f3e8ff", tertiary: "#e9d5ff", hover: "#f3e8ff" },
945
+ { primary: "#3b0764", secondary: "#581c87", muted: "#a855f7" },
946
+ "#d8b4fe"
947
+ );
948
+ d(
949
+ "Autumn",
950
+ {
951
+ primary: "#c2410c",
952
+ primaryHover: "#9a3412",
953
+ success: "#4d7c0f",
954
+ warning: "#a16207",
955
+ error: "#b91c1c",
956
+ info: "#0e7490"
957
+ },
958
+ { primary: "#fef2f2", secondary: "#fee2e2", tertiary: "#fecaca", hover: "#fee2e2" },
959
+ { primary: "#450a0a", secondary: "#7f1d1d", muted: "#f87171" },
960
+ "#fca5a5"
961
+ );
962
+ d(
963
+ "Spring",
964
+ {
965
+ primary: "#16a34a",
966
+ primaryHover: "#15803d",
967
+ success: "#22c55e",
968
+ warning: "#eab308",
969
+ error: "#ef4444",
970
+ info: "#06b6d4"
971
+ },
972
+ { primary: "#f0fdf4", secondary: "#dcfce7", tertiary: "#bbf7d0", hover: "#dcfce7" },
973
+ { primary: "#14532d", secondary: "#166534", muted: "#4ade80" },
974
+ "#86efac"
975
+ );
976
+ d(
977
+ "Arctic",
978
+ {
979
+ primary: "#0ea5e9",
980
+ primaryHover: "#0284c7",
981
+ success: "#10b981",
982
+ warning: "#f59e0b",
983
+ error: "#ef4444",
984
+ info: "#06b6d4"
985
+ },
986
+ { primary: "#f0f9ff", secondary: "#e0f2fe", tertiary: "#bae6fd", hover: "#e0f2fe" },
987
+ { primary: "#0c4a6e", secondary: "#0369a1", muted: "#7dd3fc" },
988
+ "#bae6fd"
989
+ );
990
+ d(
991
+ "Tropical",
992
+ {
993
+ primary: "#0d9488",
994
+ primaryHover: "#0f766e",
995
+ success: "#16a34a",
996
+ warning: "#f59e0b",
997
+ error: "#ef4444",
998
+ info: "#06b6d4"
999
+ },
1000
+ { primary: "#ecfdf5", secondary: "#d1fae5", tertiary: "#a7f3d0", hover: "#d1fae5" },
1001
+ { primary: "#064e3b", secondary: "#065f46", muted: "#6ee7b7" },
1002
+ "#a7f3d0"
1003
+ );
1004
+ d(
1005
+ "Pastel Rose",
1006
+ {
1007
+ primary: "#f472b6",
1008
+ primaryHover: "#ec4899",
1009
+ success: "#4ade80",
1010
+ warning: "#fcd34d",
1011
+ error: "#fb7185",
1012
+ info: "#67e8f9"
1013
+ },
1014
+ { primary: "#fdf2f8", secondary: "#fce7f3", tertiary: "#fbcfe8", hover: "#fce7f3" },
1015
+ { primary: "#831843", secondary: "#9d174d", muted: "#f9a8d4" },
1016
+ "#f9a8d4"
1017
+ );
1018
+ d(
1019
+ "Pastel Sky",
1020
+ {
1021
+ primary: "#38bdf8",
1022
+ primaryHover: "#0ea5e9",
1023
+ success: "#4ade80",
1024
+ warning: "#fcd34d",
1025
+ error: "#fb7185",
1026
+ info: "#67e8f9"
1027
+ },
1028
+ { primary: "#f0f9ff", secondary: "#e0f2fe", tertiary: "#bae6fd", hover: "#e0f2fe" },
1029
+ { primary: "#075985", secondary: "#0369a1", muted: "#7dd3fc" },
1030
+ "#bae6fd"
1031
+ );
1032
+ d(
1033
+ "Pastel Mint",
1034
+ {
1035
+ primary: "#34d399",
1036
+ primaryHover: "#10b981",
1037
+ success: "#4ade80",
1038
+ warning: "#fcd34d",
1039
+ error: "#fb7185",
1040
+ info: "#67e8f9"
1041
+ },
1042
+ { primary: "#ecfdf5", secondary: "#d1fae5", tertiary: "#a7f3d0", hover: "#d1fae5" },
1043
+ { primary: "#065f46", secondary: "#047857", muted: "#6ee7b7" },
1044
+ "#a7f3d0"
1045
+ );
1046
+ d(
1047
+ "Pastel Peach",
1048
+ {
1049
+ primary: "#fb923c",
1050
+ primaryHover: "#f97316",
1051
+ success: "#4ade80",
1052
+ warning: "#fcd34d",
1053
+ error: "#fb7185",
1054
+ info: "#67e8f9"
1055
+ },
1056
+ { primary: "#fff7ed", secondary: "#ffedd5", tertiary: "#fed7aa", hover: "#ffedd5" },
1057
+ { primary: "#7c2d12", secondary: "#9a3412", muted: "#fdba74" },
1058
+ "#fed7aa"
1059
+ );
1060
+ d(
1061
+ "Pastel Lavender",
1062
+ {
1063
+ primary: "#a78bfa",
1064
+ primaryHover: "#8b5cf6",
1065
+ success: "#4ade80",
1066
+ warning: "#fcd34d",
1067
+ error: "#fb7185",
1068
+ info: "#67e8f9"
1069
+ },
1070
+ { primary: "#f5f3ff", secondary: "#ede9fe", tertiary: "#ddd6fe", hover: "#ede9fe" },
1071
+ { primary: "#4c1d95", secondary: "#5b21b6", muted: "#c4b5fd" },
1072
+ "#ddd6fe"
1073
+ );
1074
+ d(
1075
+ "Pastel Lemon",
1076
+ {
1077
+ primary: "#facc15",
1078
+ primaryHover: "#eab308",
1079
+ success: "#4ade80",
1080
+ warning: "#fcd34d",
1081
+ error: "#fb7185",
1082
+ info: "#67e8f9"
1083
+ },
1084
+ { primary: "#fefce8", secondary: "#fef9c3", tertiary: "#fef08a", hover: "#fef9c3" },
1085
+ { primary: "#713f12", secondary: "#854d0e", muted: "#fde047" },
1086
+ "#fef08a"
1087
+ );
1088
+ d(
1089
+ "Pastel Sage",
1090
+ {
1091
+ primary: "#86efac",
1092
+ primaryHover: "#4ade80",
1093
+ success: "#22c55e",
1094
+ warning: "#fcd34d",
1095
+ error: "#fb7185",
1096
+ info: "#67e8f9"
1097
+ },
1098
+ { primary: "#f0fdf4", secondary: "#dcfce7", tertiary: "#bbf7d0", hover: "#dcfce7" },
1099
+ { primary: "#166534", secondary: "#15803d", muted: "#86efac" },
1100
+ "#bbf7d0"
1101
+ );
1102
+ d(
1103
+ "Pastel Coral",
1104
+ {
1105
+ primary: "#fb7185",
1106
+ primaryHover: "#f43f5e",
1107
+ success: "#4ade80",
1108
+ warning: "#fcd34d",
1109
+ error: "#ef4444",
1110
+ info: "#67e8f9"
1111
+ },
1112
+ { primary: "#fff1f2", secondary: "#ffe4e6", tertiary: "#fecdd3", hover: "#ffe4e6" },
1113
+ { primary: "#881337", secondary: "#9f1239", muted: "#fda4af" },
1114
+ "#fecdd3"
1115
+ );
1116
+ d(
1117
+ "Banking",
1118
+ {
1119
+ primary: "#1e3a5f",
1120
+ primaryHover: "#152c4a",
1121
+ success: "#059669",
1122
+ warning: "#d97706",
1123
+ error: "#dc2626",
1124
+ info: "#0891b2"
1125
+ },
1126
+ { primary: "#f8fafc", secondary: "#f1f5f9", tertiary: "#e2e8f0", hover: "#e2e8f0" },
1127
+ { primary: "#0f172a", secondary: "#334155", muted: "#94a3b8" },
1128
+ "#cbd5e1"
1129
+ );
1130
+ d(
1131
+ "Healthcare",
1132
+ {
1133
+ primary: "#0891b2",
1134
+ primaryHover: "#0e7490",
1135
+ success: "#059669",
1136
+ warning: "#d97706",
1137
+ error: "#dc2626",
1138
+ info: "#0284c7"
1139
+ },
1140
+ { primary: "#f0fdfa", secondary: "#e0f7fa", tertiary: "#b2ebf2", hover: "#e0f7fa" },
1141
+ { primary: "#134e4a", secondary: "#1a6b6a", muted: "#80cbc4" },
1142
+ "#b2dfdb"
1143
+ );
1144
+ d(
1145
+ "Legal",
1146
+ {
1147
+ primary: "#1e293b",
1148
+ primaryHover: "#0f172a",
1149
+ success: "#059669",
1150
+ warning: "#d97706",
1151
+ error: "#dc2626",
1152
+ info: "#0284c7"
1153
+ },
1154
+ { primary: "#fafaf9", secondary: "#f5f5f4", tertiary: "#e7e5e4", hover: "#e7e5e4" },
1155
+ { primary: "#0f172a", secondary: "#44403c", muted: "#a8a29e" },
1156
+ "#d6d3d1"
1157
+ );
1158
+ d(
1159
+ "Tech Startup",
1160
+ {
1161
+ primary: "#7c3aed",
1162
+ primaryHover: "#6d28d9",
1163
+ success: "#10b981",
1164
+ warning: "#f59e0b",
1165
+ error: "#ef4444",
1166
+ info: "#06b6d4"
1167
+ },
1168
+ { primary: "#faf5ff", secondary: "#f3e8ff", tertiary: "#e9d5ff", hover: "#f3e8ff" },
1169
+ { primary: "#1e1b4b", secondary: "#4c1d95", muted: "#a78bfa" },
1170
+ "#c4b5fd"
1171
+ );
1172
+ d(
1173
+ "Enterprise",
1174
+ {
1175
+ primary: "#1e40af",
1176
+ primaryHover: "#1e3a8a",
1177
+ success: "#059669",
1178
+ warning: "#d97706",
1179
+ error: "#dc2626",
1180
+ info: "#0891b2"
1181
+ },
1182
+ { primary: "#eff6ff", secondary: "#dbeafe", tertiary: "#bfdbfe", hover: "#dbeafe" },
1183
+ { primary: "#1e3a5f", secondary: "#1e40af", muted: "#60a5fa" },
1184
+ "#93c5fd"
1185
+ );
1186
+ d(
1187
+ "Government",
1188
+ {
1189
+ primary: "#1d4ed8",
1190
+ primaryHover: "#1e40af",
1191
+ success: "#059669",
1192
+ warning: "#d97706",
1193
+ error: "#dc2626",
1194
+ info: "#0891b2"
1195
+ },
1196
+ { primary: "#f8fafc", secondary: "#f1f5f9", tertiary: "#e2e8f0", hover: "#e2e8f0" },
1197
+ { primary: "#0f172a", secondary: "#1e293b", muted: "#64748b" },
1198
+ "#cbd5e1"
1199
+ );
1200
+ d(
1201
+ "Education",
1202
+ {
1203
+ primary: "#059669",
1204
+ primaryHover: "#047857",
1205
+ success: "#16a34a",
1206
+ warning: "#f59e0b",
1207
+ error: "#ef4444",
1208
+ info: "#0891b2"
1209
+ },
1210
+ { primary: "#f0fdf9", secondary: "#d1fae5", tertiary: "#a7f3d0", hover: "#d1fae5" },
1211
+ { primary: "#064e3b", secondary: "#065f46", muted: "#6ee7b7" },
1212
+ "#a7f3d0"
1213
+ );
1214
+ d(
1215
+ "Real Estate",
1216
+ {
1217
+ primary: "#92400e",
1218
+ primaryHover: "#78350f",
1219
+ success: "#059669",
1220
+ warning: "#b45309",
1221
+ error: "#dc2626",
1222
+ info: "#0891b2"
1223
+ },
1224
+ { primary: "#fffbeb", secondary: "#fef3c7", tertiary: "#fde68a", hover: "#fef3c7" },
1225
+ { primary: "#422006", secondary: "#713f12", muted: "#d97706" },
1226
+ "#fcd34d"
1227
+ );
1228
+ d(
1229
+ "Nord",
1230
+ {
1231
+ primary: "#5e81ac",
1232
+ primaryHover: "#4c6b90",
1233
+ success: "#a3be8c",
1234
+ warning: "#ebcb8b",
1235
+ error: "#bf616a",
1236
+ info: "#88c0d0"
1237
+ },
1238
+ { primary: "#eceff4", secondary: "#e5e9f0", tertiary: "#d8dee9", hover: "#d8dee9" },
1239
+ { primary: "#2e3440", secondary: "#3b4252", muted: "#4c566a" },
1240
+ "#d8dee9"
1241
+ );
1242
+ x(
1243
+ "Dracula",
1244
+ {
1245
+ primary: "#bd93f9",
1246
+ primaryHover: "#9d79d9",
1247
+ success: "#50fa7b",
1248
+ warning: "#f1fa8c",
1249
+ error: "#ff5555",
1250
+ info: "#8be9fd"
1251
+ },
1252
+ { primary: "#282a36", secondary: "#343746", tertiary: "#44475a", hover: "#44475a" },
1253
+ { primary: "#f8f8f2", secondary: "#c0c0c0", muted: "#6272a4" },
1254
+ "#44475a"
1255
+ );
1256
+ d(
1257
+ "Solarized Light",
1258
+ {
1259
+ primary: "#268bd2",
1260
+ primaryHover: "#1a6da0",
1261
+ success: "#859900",
1262
+ warning: "#b58900",
1263
+ error: "#dc322f",
1264
+ info: "#2aa198"
1265
+ },
1266
+ { primary: "#fdf6e3", secondary: "#eee8d5", tertiary: "#e0dbc7", hover: "#eee8d5" },
1267
+ { primary: "#073642", secondary: "#586e75", muted: "#93a1a1" },
1268
+ "#eee8d5"
1269
+ );
1270
+ x(
1271
+ "Solarized Dark",
1272
+ {
1273
+ primary: "#268bd2",
1274
+ primaryHover: "#3d98db",
1275
+ success: "#859900",
1276
+ warning: "#b58900",
1277
+ error: "#dc322f",
1278
+ info: "#2aa198"
1279
+ },
1280
+ { primary: "#002b36", secondary: "#073642", tertiary: "#0a4858", hover: "#073642" },
1281
+ { primary: "#eee8d5", secondary: "#93a1a1", muted: "#586e75" },
1282
+ "#073642"
1283
+ );
1284
+ x(
1285
+ "Monokai",
1286
+ {
1287
+ primary: "#66d9ef",
1288
+ primaryHover: "#45c0d6",
1289
+ success: "#a6e22e",
1290
+ warning: "#e6db74",
1291
+ error: "#f92672",
1292
+ info: "#66d9ef"
1293
+ },
1294
+ { primary: "#272822", secondary: "#34352e", tertiary: "#3e3d32", hover: "#3e3d32" },
1295
+ { primary: "#f8f8f2", secondary: "#cfcfc2", muted: "#75715e" },
1296
+ "#3e3d32"
1297
+ );
1298
+ x(
1299
+ "One Dark",
1300
+ {
1301
+ primary: "#61afef",
1302
+ primaryHover: "#4b9ee0",
1303
+ success: "#98c379",
1304
+ warning: "#e5c07b",
1305
+ error: "#e06c75",
1306
+ info: "#56b6c2"
1307
+ },
1308
+ { primary: "#282c34", secondary: "#2c313a", tertiary: "#353b45", hover: "#353b45" },
1309
+ { primary: "#abb2bf", secondary: "#828997", muted: "#545862" },
1310
+ "#3e4452"
1311
+ );
1312
+ x(
1313
+ "Synthwave",
1314
+ {
1315
+ primary: "#ff7edb",
1316
+ primaryHover: "#e660c2",
1317
+ success: "#72f1b8",
1318
+ warning: "#fede5d",
1319
+ error: "#fe4450",
1320
+ info: "#36f9f6"
1321
+ },
1322
+ { primary: "#241b2f", secondary: "#2d2140", tertiary: "#362a50", hover: "#362a50" },
1323
+ { primary: "#f0e4fc", secondary: "#b4a0cc", muted: "#6c5c84" },
1324
+ "#4a3866"
1325
+ );
1326
+ d(
1327
+ "Vaporwave",
1328
+ {
1329
+ primary: "#ff71ce",
1330
+ primaryHover: "#e655b5",
1331
+ success: "#78dcca",
1332
+ warning: "#ffb86c",
1333
+ error: "#ff5555",
1334
+ info: "#76e8fc"
1335
+ },
1336
+ { primary: "#fce4f7", secondary: "#e8d0f4", tertiary: "#d4bcf0", hover: "#e8d0f4" },
1337
+ { primary: "#4a1a4e", secondary: "#7b3f7d", muted: "#c080c0" },
1338
+ "#d8a8e8"
1339
+ );
1340
+ x(
1341
+ "Terminal Green",
1342
+ {
1343
+ primary: "#00ff41",
1344
+ primaryHover: "#00cc34",
1345
+ success: "#00ff41",
1346
+ warning: "#ffff00",
1347
+ error: "#ff0000",
1348
+ info: "#00ffff"
1349
+ },
1350
+ { primary: "#0a0a0a", secondary: "#0d1a0d", tertiary: "#1a2e1a", hover: "#1a2e1a" },
1351
+ { primary: "#00ff41", secondary: "#00cc33", muted: "#008822" },
1352
+ "#003300"
1353
+ );
1354
+ d(
1355
+ "Sepia",
1356
+ {
1357
+ primary: "#8b6914",
1358
+ primaryHover: "#704f10",
1359
+ success: "#6b8e23",
1360
+ warning: "#cd853f",
1361
+ error: "#b22222",
1362
+ info: "#5f9ea0"
1363
+ },
1364
+ { primary: "#faf0e6", secondary: "#f5e6d3", tertiary: "#eddcc7", hover: "#f5e6d3" },
1365
+ { primary: "#3e2723", secondary: "#5d4037", muted: "#a1887f" },
1366
+ "#d7ccc8"
1367
+ );
1368
+ d(
1369
+ "Vintage",
1370
+ {
1371
+ primary: "#8d6e63",
1372
+ primaryHover: "#6d4c41",
1373
+ success: "#66bb6a",
1374
+ warning: "#ffb300",
1375
+ error: "#e53935",
1376
+ info: "#29b6f6"
1377
+ },
1378
+ { primary: "#efebe9", secondary: "#d7ccc8", tertiary: "#bcaaa4", hover: "#d7ccc8" },
1379
+ { primary: "#3e2723", secondary: "#5d4037", muted: "#a1887f" },
1380
+ "#bcaaa4"
1381
+ );
1382
+ x(
1383
+ "Cyberpunk",
1384
+ {
1385
+ primary: "#00f0ff",
1386
+ primaryHover: "#00c8d4",
1387
+ success: "#39ff14",
1388
+ warning: "#ffff00",
1389
+ error: "#ff003c",
1390
+ info: "#bf00ff"
1391
+ },
1392
+ { primary: "#0a0e17", secondary: "#131824", tertiary: "#1c2333", hover: "#1c2333" },
1393
+ { primary: "#e0fbfc", secondary: "#80d4dd", muted: "#3a6b72" },
1394
+ "#1c3a44"
1395
+ );
1396
+ x(
1397
+ "Neon",
1398
+ {
1399
+ primary: "#ff00ff",
1400
+ primaryHover: "#cc00cc",
1401
+ success: "#00ff00",
1402
+ warning: "#ffff00",
1403
+ error: "#ff0000",
1404
+ info: "#00ffff"
1405
+ },
1406
+ { primary: "#0d0d0d", secondary: "#1a1a1a", tertiary: "#262626", hover: "#262626" },
1407
+ { primary: "#ffffff", secondary: "#cccccc", muted: "#666666" },
1408
+ "#333333"
1409
+ );
1410
+ x(
1411
+ "Retrowave",
1412
+ {
1413
+ primary: "#f77fbe",
1414
+ primaryHover: "#e462a3",
1415
+ success: "#72f1b8",
1416
+ warning: "#ffe261",
1417
+ error: "#ff4444",
1418
+ info: "#79e8fb"
1419
+ },
1420
+ { primary: "#1b0a2e", secondary: "#261440", tertiary: "#321e52", hover: "#321e52" },
1421
+ { primary: "#ffe6f7", secondary: "#c9a0c9", muted: "#6b4c7a" },
1422
+ "#4a2d66"
1423
+ );
1424
+ d(
1425
+ "Christmas",
1426
+ {
1427
+ primary: "#c41e3a",
1428
+ primaryHover: "#a01830",
1429
+ success: "#228b22",
1430
+ warning: "#ffd700",
1431
+ error: "#dc2626",
1432
+ info: "#0891b2"
1433
+ },
1434
+ { primary: "#fef2f2", secondary: "#fde8e8", tertiary: "#f8d0d0", hover: "#fde8e8" },
1435
+ { primary: "#3b0a0a", secondary: "#7f1d1d", muted: "#dc6868" },
1436
+ "#e8a0a0"
1437
+ );
1438
+ x(
1439
+ "Halloween",
1440
+ {
1441
+ primary: "#ff6600",
1442
+ primaryHover: "#e05500",
1443
+ success: "#4ade80",
1444
+ warning: "#fbbf24",
1445
+ error: "#ff0000",
1446
+ info: "#9333ea"
1447
+ },
1448
+ { primary: "#1a0a00", secondary: "#2d1500", tertiary: "#402000", hover: "#402000" },
1449
+ { primary: "#ffedd5", secondary: "#fdba74", muted: "#9a5c28" },
1450
+ "#5c3400"
1451
+ );
1452
+ d(
1453
+ "Valentine",
1454
+ {
1455
+ primary: "#e11d48",
1456
+ primaryHover: "#be123c",
1457
+ success: "#10b981",
1458
+ warning: "#f59e0b",
1459
+ error: "#dc2626",
1460
+ info: "#ec4899"
1461
+ },
1462
+ { primary: "#fff1f2", secondary: "#ffe4e6", tertiary: "#fecdd3", hover: "#ffe4e6" },
1463
+ { primary: "#4c0519", secondary: "#881337", muted: "#f9a8d4" },
1464
+ "#fda4af"
1465
+ );
1466
+ d(
1467
+ "Easter",
1468
+ {
1469
+ primary: "#a78bfa",
1470
+ primaryHover: "#8b5cf6",
1471
+ success: "#4ade80",
1472
+ warning: "#fcd34d",
1473
+ error: "#fb7185",
1474
+ info: "#67e8f9"
1475
+ },
1476
+ { primary: "#fef9ff", secondary: "#f3e8ff", tertiary: "#e8d5ff", hover: "#f3e8ff" },
1477
+ { primary: "#581c87", secondary: "#6d28d9", muted: "#c4b5fd" },
1478
+ "#ddd6fe"
1479
+ );
1480
+ d(
1481
+ "Summer Beach",
1482
+ {
1483
+ primary: "#0ea5e9",
1484
+ primaryHover: "#0284c7",
1485
+ success: "#10b981",
1486
+ warning: "#f59e0b",
1487
+ error: "#ef4444",
1488
+ info: "#06b6d4"
1489
+ },
1490
+ { primary: "#fffbeb", secondary: "#fef3c7", tertiary: "#fde68a", hover: "#fef3c7" },
1491
+ { primary: "#0c4a6e", secondary: "#0369a1", muted: "#7dd3fc" },
1492
+ "#fcd34d"
1493
+ );
1494
+ d(
1495
+ "Winter Frost",
1496
+ {
1497
+ primary: "#3b82f6",
1498
+ primaryHover: "#2563eb",
1499
+ success: "#10b981",
1500
+ warning: "#f59e0b",
1501
+ error: "#ef4444",
1502
+ info: "#06b6d4"
1503
+ },
1504
+ { primary: "#f0f9ff", secondary: "#e0f2fe", tertiary: "#bae6fd", hover: "#e0f2fe" },
1505
+ { primary: "#1e3a5f", secondary: "#1e40af", muted: "#93c5fd" },
1506
+ "#bfdbfe"
1507
+ );
1508
+ d(
1509
+ "Cherry Blossom",
1510
+ {
1511
+ primary: "#ec4899",
1512
+ primaryHover: "#db2777",
1513
+ success: "#10b981",
1514
+ warning: "#f59e0b",
1515
+ error: "#ef4444",
1516
+ info: "#06b6d4"
1517
+ },
1518
+ { primary: "#fdf2f8", secondary: "#fce7f3", tertiary: "#fbcfe8", hover: "#fce7f3" },
1519
+ { primary: "#831843", secondary: "#9d174d", muted: "#f9a8d4" },
1520
+ "#fbcfe8"
1521
+ );
1522
+ d(
1523
+ "Harvest",
1524
+ {
1525
+ primary: "#b45309",
1526
+ primaryHover: "#92400e",
1527
+ success: "#4d7c0f",
1528
+ warning: "#a16207",
1529
+ error: "#b91c1c",
1530
+ info: "#0e7490"
1531
+ },
1532
+ { primary: "#fffbeb", secondary: "#fef3c7", tertiary: "#fde68a", hover: "#fef3c7" },
1533
+ { primary: "#451a03", secondary: "#78350f", muted: "#d97706" },
1534
+ "#fcd34d"
1535
+ );
1536
+ d(
1537
+ "Japanese Zen",
1538
+ {
1539
+ primary: "#6b7280",
1540
+ primaryHover: "#4b5563",
1541
+ success: "#6b8e23",
1542
+ warning: "#d4a017",
1543
+ error: "#c0392b",
1544
+ info: "#5f9ea0"
1545
+ },
1546
+ { primary: "#faf9f6", secondary: "#f0ece3", tertiary: "#e6e0d4", hover: "#f0ece3" },
1547
+ { primary: "#2c2c2c", secondary: "#5c5c5c", muted: "#a0998a" },
1548
+ "#d5cec0"
1549
+ );
1550
+ d(
1551
+ "Moroccan",
1552
+ {
1553
+ primary: "#c2410c",
1554
+ primaryHover: "#9a3412",
1555
+ success: "#15803d",
1556
+ warning: "#ca8a04",
1557
+ error: "#b91c1c",
1558
+ info: "#0e7490"
1559
+ },
1560
+ { primary: "#fffbf0", secondary: "#fef3e0", tertiary: "#fde6c4", hover: "#fef3e0" },
1561
+ { primary: "#3a1a00", secondary: "#7c2d12", muted: "#d97706" },
1562
+ "#f5d0a0"
1563
+ );
1564
+ d(
1565
+ "Scandinavian",
1566
+ {
1567
+ primary: "#4b5563",
1568
+ primaryHover: "#374151",
1569
+ success: "#059669",
1570
+ warning: "#d97706",
1571
+ error: "#dc2626",
1572
+ info: "#0891b2"
1573
+ },
1574
+ { primary: "#ffffff", secondary: "#f9fafb", tertiary: "#f3f4f6", hover: "#f3f4f6" },
1575
+ { primary: "#111827", secondary: "#374151", muted: "#9ca3af" },
1576
+ "#e5e7eb"
1577
+ );
1578
+ d(
1579
+ "Mediterranean",
1580
+ {
1581
+ primary: "#1e40af",
1582
+ primaryHover: "#1e3a8a",
1583
+ success: "#059669",
1584
+ warning: "#d97706",
1585
+ error: "#dc2626",
1586
+ info: "#0891b2"
1587
+ },
1588
+ { primary: "#eff6ff", secondary: "#dbeafe", tertiary: "#bfdbfe", hover: "#dbeafe" },
1589
+ { primary: "#1e3a5f", secondary: "#2563eb", muted: "#93c5fd" },
1590
+ "#bfdbfe"
1591
+ );
1592
+ d(
1593
+ "Chinese New Year",
1594
+ {
1595
+ primary: "#dc2626",
1596
+ primaryHover: "#b91c1c",
1597
+ success: "#16a34a",
1598
+ warning: "#d4a017",
1599
+ error: "#ef4444",
1600
+ info: "#0891b2"
1601
+ },
1602
+ { primary: "#fef2f2", secondary: "#fee2e2", tertiary: "#fecaca", hover: "#fee2e2" },
1603
+ { primary: "#450a0a", secondary: "#991b1b", muted: "#f87171" },
1604
+ "#fca5a5"
1605
+ );
1606
+ d(
1607
+ "Indian Festive",
1608
+ {
1609
+ primary: "#d97706",
1610
+ primaryHover: "#b45309",
1611
+ success: "#16a34a",
1612
+ warning: "#ca8a04",
1613
+ error: "#dc2626",
1614
+ info: "#7c3aed"
1615
+ },
1616
+ { primary: "#fffbeb", secondary: "#fef3c7", tertiary: "#fde68a", hover: "#fef3c7" },
1617
+ { primary: "#451a03", secondary: "#92400e", muted: "#f59e0b" },
1618
+ "#fcd34d"
1619
+ );
1620
+ d(
1621
+ "Brazilian Carnival",
1622
+ {
1623
+ primary: "#16a34a",
1624
+ primaryHover: "#15803d",
1625
+ success: "#22c55e",
1626
+ warning: "#facc15",
1627
+ error: "#ef4444",
1628
+ info: "#0ea5e9"
1629
+ },
1630
+ { primary: "#f0fdf4", secondary: "#dcfce7", tertiary: "#bbf7d0", hover: "#dcfce7" },
1631
+ { primary: "#052e16", secondary: "#166534", muted: "#4ade80" },
1632
+ "#86efac"
1633
+ );
1634
+ d(
1635
+ "African Earth",
1636
+ {
1637
+ primary: "#92400e",
1638
+ primaryHover: "#78350f",
1639
+ success: "#4d7c0f",
1640
+ warning: "#a16207",
1641
+ error: "#b91c1c",
1642
+ info: "#0e7490"
1643
+ },
1644
+ { primary: "#faf5f0", secondary: "#f0e6d6", tertiary: "#e6d5bb", hover: "#f0e6d6" },
1645
+ { primary: "#2b1a0e", secondary: "#5c3d1e", muted: "#a08060" },
1646
+ "#d4b896"
1647
+ );
1648
+ x(
1649
+ "High Contrast Dark",
1650
+ {
1651
+ primary: "#ffff00",
1652
+ primaryHover: "#cccc00",
1653
+ success: "#00ff00",
1654
+ warning: "#ff8c00",
1655
+ error: "#ff0000",
1656
+ info: "#00ffff"
1657
+ },
1658
+ { primary: "#000000", secondary: "#1a1a1a", tertiary: "#333333", hover: "#333333" },
1659
+ { primary: "#ffffff", secondary: "#ffffff", muted: "#cccccc" },
1660
+ "#ffffff"
1661
+ );
1662
+ d(
1663
+ "Monochrome",
1664
+ {
1665
+ primary: "#404040",
1666
+ primaryHover: "#262626",
1667
+ success: "#4d7c0f",
1668
+ warning: "#a16207",
1669
+ error: "#b91c1c",
1670
+ info: "#0e7490"
1671
+ },
1672
+ { primary: "#fafafa", secondary: "#f0f0f0", tertiary: "#e0e0e0", hover: "#e0e0e0" },
1673
+ { primary: "#1a1a1a", secondary: "#404040", muted: "#808080" },
1674
+ "#c0c0c0"
1675
+ );
1676
+ d(
1677
+ "Enhanced Contrast",
1678
+ {
1679
+ primary: "#0050b3",
1680
+ primaryHover: "#003d8c",
1681
+ success: "#006400",
1682
+ warning: "#cc7000",
1683
+ error: "#cc0000",
1684
+ info: "#006680"
1685
+ },
1686
+ { primary: "#ffffff", secondary: "#f5f5f5", tertiary: "#ebebeb", hover: "#ebebeb" },
1687
+ { primary: "#000000", secondary: "#1a1a1a", muted: "#595959" },
1688
+ "#8c8c8c"
1689
+ );
1690
+ d(
1691
+ "Minimalist",
1692
+ {
1693
+ primary: "#18181b",
1694
+ primaryHover: "#27272a",
1695
+ success: "#22c55e",
1696
+ warning: "#eab308",
1697
+ error: "#ef4444",
1698
+ info: "#3b82f6"
1699
+ },
1700
+ { primary: "#ffffff", secondary: "#fafafa", tertiary: "#f5f5f5", hover: "#f5f5f5" },
1701
+ { primary: "#0a0a0a", secondary: "#404040", muted: "#a3a3a3" },
1702
+ "#e5e5e5"
1703
+ );
1704
+ x(
1705
+ "Warm Dark",
1706
+ {
1707
+ primary: "#f59e0b",
1708
+ primaryHover: "#d97706",
1709
+ success: "#10b981",
1710
+ warning: "#fbbf24",
1711
+ error: "#f87171",
1712
+ info: "#38bdf8"
1713
+ },
1714
+ { primary: "#1c1917", secondary: "#292524", tertiary: "#44403c", hover: "#44403c" },
1715
+ { primary: "#fafaf9", secondary: "#d6d3d1", muted: "#78716c" },
1716
+ "#57534e"
1717
+ );
1718
+ x(
1719
+ "Soft Dark",
1720
+ {
1721
+ primary: "#a78bfa",
1722
+ primaryHover: "#8b5cf6",
1723
+ success: "#34d399",
1724
+ warning: "#fcd34d",
1725
+ error: "#fb7185",
1726
+ info: "#67e8f9"
1727
+ },
1728
+ { primary: "#1e1e2e", secondary: "#262637", tertiary: "#313147", hover: "#313147" },
1729
+ { primary: "#e8e8f0", secondary: "#a0a0b8", muted: "#5c5c74" },
1730
+ "#3e3e58"
1731
+ );
1732
+ d(
1733
+ "Coffee",
1734
+ {
1735
+ primary: "#6f4e37",
1736
+ primaryHover: "#5c3d28",
1737
+ success: "#4d7c0f",
1738
+ warning: "#a16207",
1739
+ error: "#b91c1c",
1740
+ info: "#0e7490"
1741
+ },
1742
+ { primary: "#faf6f1", secondary: "#f0e8dc", tertiary: "#e6d8c6", hover: "#f0e8dc" },
1743
+ { primary: "#2c1a0e", secondary: "#5c3d28", muted: "#a08868" },
1744
+ "#d4c4a8"
1745
+ );
1746
+ d(
1747
+ "Wine",
1748
+ {
1749
+ primary: "#7f1d1d",
1750
+ primaryHover: "#641717",
1751
+ success: "#059669",
1752
+ warning: "#d97706",
1753
+ error: "#dc2626",
1754
+ info: "#0891b2"
1755
+ },
1756
+ { primary: "#fef2f2", secondary: "#fde8e8", tertiary: "#f8d0d0", hover: "#fde8e8" },
1757
+ { primary: "#3b0a0a", secondary: "#7f1d1d", muted: "#dc6868" },
1758
+ "#e8a0a0"
1759
+ );
1760
+ $(null);
1761
+ const Be = {
4
1762
  id: crypto.randomUUID(),
5
1763
  name: "Untitled Project",
6
1764
  resolution: { width: 1920, height: 1080, label: "1080p" },
@@ -32,7 +1790,7 @@ const ue = {
32
1790
  audio: { sampleRate: 48e3, channels: 2, bitrate: 320 },
33
1791
  video: { codec: "h264", bitrate: 8e3, profile: "high" }
34
1792
  }
35
- }, me = [
1793
+ }, We = [
36
1794
  { type: "blur", name: "Blur", icon: "🔵" },
37
1795
  { type: "brightness", name: "Brightness", icon: "☀️" },
38
1796
  { type: "contrast", name: "Contrast", icon: "◐" },
@@ -42,79 +1800,89 @@ const ue = {
42
1800
  { type: "chromaKey", name: "Chroma Key", icon: "🟢" },
43
1801
  { type: "crop", name: "Crop", icon: "✂️" },
44
1802
  { type: "zoom", name: "Zoom", icon: "🔍" }
45
- ], he = [
1803
+ ], Ke = [
46
1804
  { type: "fade", name: "Fade" },
47
1805
  { type: "dissolve", name: "Dissolve" },
48
1806
  { type: "wipe", name: "Wipe" },
49
1807
  { type: "slide", name: "Slide" },
50
1808
  { type: "zoom", name: "Zoom" },
51
1809
  { type: "push", name: "Push" }
52
- ], be = ({
53
- project: M,
54
- onProjectChange: S,
55
- onExport: D,
56
- onAssetUpload: R,
57
- className: F = ""
1810
+ ], Ge = [
1811
+ {
1812
+ target: ".nice-video-editor",
1813
+ titleKey: "tutorial.videoEditorPro.intro.title",
1814
+ title: "Video editor",
1815
+ contentKey: "tutorial.videoEditorPro.intro.content",
1816
+ content: "Add media to the timeline, arrange and trim clips, apply effects and transitions, then configure and run the export.",
1817
+ placement: "auto"
1818
+ }
1819
+ ], Xe = ({
1820
+ project: l,
1821
+ onProjectChange: m,
1822
+ onExport: f,
1823
+ onAssetUpload: C,
1824
+ className: I = "",
1825
+ tutorial: T
58
1826
  }) => {
59
- const [c, J] = p(M || ue), [n, Q] = p(
1827
+ const [p, i] = v(l || Be), [D, b] = v(
60
1828
  "timeline"
61
- ), [g, K] = p(null), [m, C] = p(null), [b, P] = p(0), [k, L] = p(!1), [x, U] = p(1), [q, V] = p(!0), [y, A] = p(null), X = T(null), ne = T(null), z = T(null);
62
- re(() => {
63
- M && J(M);
64
- }, [M]), re(() => () => {
65
- z.current && clearInterval(z.current);
1829
+ ), [E, y] = v(null), [k, S] = v(null), [z, R] = v(0), [q, W] = v(!1), [M, J] = v(1), [K, P] = v(!0), [U, O] = v(null), oe = F(null), se = F(null), A = F(null);
1830
+ ne(() => {
1831
+ l && i(l);
1832
+ }, [l]), ne(() => () => {
1833
+ A.current && clearInterval(A.current);
66
1834
  }, []);
67
- const f = le(
68
- (s) => {
69
- const r = { ...c, ...s };
70
- J(r), S == null || S(r);
1835
+ const w = me(
1836
+ (n) => {
1837
+ const o = { ...p, ...n };
1838
+ i(o), m == null || m(o);
71
1839
  },
72
- [c, S]
73
- ), _ = async (s) => {
74
- const r = [];
75
- for (const u of Array.from(s)) {
76
- const t = u.type.startsWith("video/") ? "video" : u.type.startsWith("audio/") ? "audio" : "image";
77
- let i;
78
- R ? i = await R(u) : i = {
1840
+ [p, m]
1841
+ ), g = async (n) => {
1842
+ const o = [];
1843
+ for (const a of Array.from(n)) {
1844
+ const t = a.type.startsWith("video/") ? "video" : a.type.startsWith("audio/") ? "audio" : "image";
1845
+ let c;
1846
+ C ? c = await C(a) : c = {
79
1847
  id: crypto.randomUUID(),
80
1848
  type: t,
81
- name: u.name,
82
- url: URL.createObjectURL(u),
83
- size: u.size
84
- }, r.push(i);
1849
+ name: a.name,
1850
+ url: URL.createObjectURL(a),
1851
+ size: a.size
1852
+ }, o.push(c);
85
1853
  }
86
- f({ assets: [...c.assets, ...r] });
87
- }, h = (s) => {
88
- const r = {
1854
+ w({ assets: [...p.assets, ...o] });
1855
+ }, B = (n) => {
1856
+ const o = {
89
1857
  id: crypto.randomUUID(),
90
- type: s,
91
- name: `${s.charAt(0).toUpperCase() + s.slice(1)} ${c.tracks.filter((u) => u.type === s).length + 1}`,
1858
+ type: n,
1859
+ name: `${n.charAt(0).toUpperCase() + n.slice(1)} ${p.tracks.filter((a) => a.type === n).length + 1}`,
92
1860
  items: [],
93
1861
  muted: !1,
94
1862
  locked: !1,
95
1863
  visible: !0
96
1864
  };
97
- f({ tracks: [...c.tracks, r] });
98
- }, W = (s) => {
99
- f({ tracks: c.tracks.filter((r) => r.id !== s) }), g === s && K(null);
100
- }, G = (s) => {
101
- f({
102
- tracks: c.tracks.map((r) => r.id === s ? { ...r, muted: !r.muted } : r)
1865
+ w({ tracks: [...p.tracks, o] });
1866
+ }, X = (n) => {
1867
+ w({ tracks: p.tracks.filter((o) => o.id !== n) }), E === n && y(null);
1868
+ }, G = (n) => {
1869
+ w({
1870
+ tracks: p.tracks.map((o) => o.id === n ? { ...o, muted: !o.muted } : o)
103
1871
  });
104
- }, O = (s) => {
105
- f({
106
- tracks: c.tracks.map((r) => r.id === s ? { ...r, locked: !r.locked } : r)
1872
+ }, re = (n) => {
1873
+ w({
1874
+ tracks: p.tracks.map((o) => o.id === n ? { ...o, locked: !o.locked } : o)
107
1875
  });
108
- }, ee = (s, r) => {
109
- const u = c.tracks.find((d) => d.id === s);
110
- if (!u || u.locked)
1876
+ }, _ = (n, o) => {
1877
+ const a = p.tracks.find((h) => h.id === n);
1878
+ if (!a || a.locked)
111
1879
  return;
112
- const t = u.items[u.items.length - 1], i = t ? t.startTime + t.duration : 0, o = {
1880
+ const t = a.items[a.items.length - 1], c = t ? t.startTime + t.duration : 0, u = {
113
1881
  id: crypto.randomUUID(),
114
- assetId: r.id,
115
- type: r.type,
116
- startTime: i,
117
- duration: r.duration || 5,
1882
+ assetId: o.id,
1883
+ type: o.type,
1884
+ startTime: c,
1885
+ duration: o.duration || 5,
118
1886
  offset: 0,
119
1887
  properties: {
120
1888
  x: 0,
@@ -126,47 +1894,47 @@ const ue = {
126
1894
  effects: [],
127
1895
  transitions: []
128
1896
  };
129
- f({
130
- tracks: c.tracks.map(
131
- (d) => d.id === s ? { ...d, items: [...d.items, o] } : d
1897
+ w({
1898
+ tracks: p.tracks.map(
1899
+ (h) => h.id === n ? { ...h, items: [...h.items, u] } : h
132
1900
  )
133
1901
  });
134
- }, w = (s, r, u) => {
1902
+ }, Y = (n, o, a) => {
135
1903
  const t = {
136
1904
  id: crypto.randomUUID(),
137
- type: u,
138
- name: u.charAt(0).toUpperCase() + u.slice(1),
139
- parameters: E(u)
1905
+ type: a,
1906
+ name: a.charAt(0).toUpperCase() + a.slice(1),
1907
+ parameters: ce(a)
140
1908
  };
141
- f({
142
- tracks: c.tracks.map(
143
- (i) => i.id === s ? {
144
- ...i,
145
- items: i.items.map(
146
- (o) => o.id === r ? { ...o, effects: [...o.effects, t] } : o
1909
+ w({
1910
+ tracks: p.tracks.map(
1911
+ (c) => c.id === n ? {
1912
+ ...c,
1913
+ items: c.items.map(
1914
+ (u) => u.id === o ? { ...u, effects: [...u.effects, t] } : u
147
1915
  )
148
- } : i
1916
+ } : c
149
1917
  )
150
1918
  });
151
- }, H = (s, r, u, t) => {
152
- const i = {
1919
+ }, L = (n, o, a, t) => {
1920
+ const c = {
153
1921
  id: crypto.randomUUID(),
154
- type: u,
1922
+ type: a,
155
1923
  duration: 0.5,
156
1924
  position: t
157
1925
  };
158
- f({
159
- tracks: c.tracks.map(
160
- (o) => o.id === s ? {
161
- ...o,
162
- items: o.items.map(
163
- (d) => d.id === r ? { ...d, transitions: [...d.transitions, i] } : d
1926
+ w({
1927
+ tracks: p.tracks.map(
1928
+ (u) => u.id === n ? {
1929
+ ...u,
1930
+ items: u.items.map(
1931
+ (h) => h.id === o ? { ...h, transitions: [...h.transitions, c] } : h
164
1932
  )
165
- } : o
1933
+ } : u
166
1934
  )
167
1935
  });
168
- }, E = (s) => {
169
- switch (s) {
1936
+ }, ce = (n) => {
1937
+ switch (n) {
170
1938
  case "blur":
171
1939
  return { radius: 5 };
172
1940
  case "brightness":
@@ -188,206 +1956,207 @@ const ue = {
188
1956
  default:
189
1957
  return {};
190
1958
  }
191
- }, ie = () => {
192
- k ? (z.current && clearInterval(z.current), L(!1)) : (z.current = setInterval(() => {
193
- P((s) => {
194
- const r = Math.max(
195
- ...c.tracks.flatMap((u) => u.items.map((t) => t.startTime + t.duration)),
1959
+ }, de = () => {
1960
+ q ? (A.current && clearInterval(A.current), W(!1)) : (A.current = setInterval(() => {
1961
+ R((n) => {
1962
+ const o = Math.max(
1963
+ ...p.tracks.flatMap((a) => a.items.map((t) => t.startTime + t.duration)),
196
1964
  0
197
1965
  );
198
- return s >= r ? (clearInterval(z.current), L(!1), 0) : s + 1 / c.frameRate;
1966
+ return n >= o ? (clearInterval(A.current), W(!1), 0) : n + 1 / p.frameRate;
199
1967
  });
200
- }, 1e3 / c.frameRate), L(!0));
201
- }, Y = (s) => {
202
- P(Math.max(0, s));
203
- }, te = async () => {
204
- if (D) {
205
- A(0);
1968
+ }, 1e3 / p.frameRate), W(!0));
1969
+ }, Q = (n) => {
1970
+ R(Math.max(0, n));
1971
+ }, ee = async () => {
1972
+ if (f) {
1973
+ O(0);
206
1974
  try {
207
- const s = setInterval(() => {
208
- A((r) => r !== null && r < 90 ? r + Math.random() * 10 : r);
1975
+ const n = setInterval(() => {
1976
+ O((o) => o !== null && o < 90 ? o + Math.random() * 10 : o);
209
1977
  }, 500);
210
- await D(c, c.settings.video.codec), clearInterval(s), A(100), setTimeout(() => A(null), 2e3);
211
- } catch (s) {
212
- A(null), console.error("Export failed:", s);
1978
+ await f(p, p.settings.video.codec), clearInterval(n), O(100), setTimeout(() => O(null), 2e3);
1979
+ } catch (n) {
1980
+ O(null), console.error("Export failed:", n);
213
1981
  }
214
1982
  }
215
- }, Z = (s) => {
216
- const r = Math.floor(s / 60), u = Math.floor(s % 60), t = Math.floor(s % 1 * c.frameRate);
217
- return `${r.toString().padStart(2, "0")}:${u.toString().padStart(2, "0")}:${t.toString().padStart(2, "0")}`;
218
- }, j = () => {
219
- for (const s of c.tracks) {
220
- const r = s.items.find((u) => u.id === m);
221
- if (r)
222
- return { track: s, item: r };
1983
+ }, te = (n) => {
1984
+ const o = Math.floor(n / 60), a = Math.floor(n % 60), t = Math.floor(n % 1 * p.frameRate);
1985
+ return `${o.toString().padStart(2, "0")}:${a.toString().padStart(2, "0")}:${t.toString().padStart(2, "0")}`;
1986
+ }, Z = () => {
1987
+ for (const n of p.tracks) {
1988
+ const o = n.items.find((a) => a.id === k);
1989
+ if (o)
1990
+ return { track: n, item: o };
223
1991
  }
224
1992
  return null;
225
1993
  };
226
- return /* @__PURE__ */ a("div", { className: `nice-video-editor ${F}`, children: [
227
- /* @__PURE__ */ a("header", { className: "video-editor__header", children: [
228
- /* @__PURE__ */ a("div", { className: "header__project-info", children: [
1994
+ return /* @__PURE__ */ r("div", { className: `nice-video-editor ${I}`, style: { position: "relative" }, children: [
1995
+ /* @__PURE__ */ e("span", { style: { position: "absolute", top: 6, right: 6, zIndex: 30 }, children: /* @__PURE__ */ e(Le, { steps: Ue(T, Ge) }) }),
1996
+ /* @__PURE__ */ r("header", { className: "video-editor__header", children: [
1997
+ /* @__PURE__ */ r("div", { className: "header__project-info", children: [
229
1998
  /* @__PURE__ */ e(
230
1999
  "input",
231
2000
  {
232
2001
  type: "text",
233
- value: c.name,
234
- onChange: (s) => f({ name: s.target.value }),
2002
+ value: p.name,
2003
+ onChange: (n) => w({ name: n.target.value }),
235
2004
  className: "project-name-input"
236
2005
  }
237
2006
  ),
238
- /* @__PURE__ */ a("span", { className: "project-settings", children: [
239
- c.resolution.width,
2007
+ /* @__PURE__ */ r("span", { className: "project-settings", children: [
2008
+ p.resolution.width,
240
2009
  "x",
241
- c.resolution.height,
2010
+ p.resolution.height,
242
2011
  " • ",
243
- c.frameRate,
2012
+ p.frameRate,
244
2013
  "fps"
245
2014
  ] })
246
2015
  ] }),
247
- /* @__PURE__ */ e("div", { className: "header__tabs", children: ["timeline", "effects", "transitions", "export"].map((s) => /* @__PURE__ */ e(
2016
+ /* @__PURE__ */ e("div", { className: "header__tabs", children: ["timeline", "effects", "transitions", "export"].map((n) => /* @__PURE__ */ e(
248
2017
  "button",
249
2018
  {
250
- className: `tab-button ${n === s ? "tab-button--active" : ""}`,
251
- onClick: () => Q(s),
252
- children: s.charAt(0).toUpperCase() + s.slice(1)
2019
+ className: `tab-button ${D === n ? "tab-button--active" : ""}`,
2020
+ onClick: () => b(n),
2021
+ children: n.charAt(0).toUpperCase() + n.slice(1)
253
2022
  },
254
- s
2023
+ n
255
2024
  )) }),
256
2025
  /* @__PURE__ */ e("div", { className: "header__actions", children: /* @__PURE__ */ e(
257
2026
  "button",
258
2027
  {
259
2028
  className: "action-button action-button--primary",
260
- onClick: te,
261
- disabled: y !== null,
262
- children: y !== null ? `Exporting ${Math.round(y)}%` : "Export"
2029
+ onClick: ee,
2030
+ disabled: U !== null,
2031
+ children: U !== null ? `Exporting ${Math.round(U)}%` : "Export"
263
2032
  }
264
2033
  ) })
265
2034
  ] }),
266
- /* @__PURE__ */ a("div", { className: "video-editor__main", children: [
267
- q && /* @__PURE__ */ a("aside", { className: "video-editor__asset-library", children: [
268
- /* @__PURE__ */ a("div", { className: "asset-library__header", children: [
2035
+ /* @__PURE__ */ r("div", { className: "video-editor__main", children: [
2036
+ K && /* @__PURE__ */ r("aside", { className: "video-editor__asset-library", children: [
2037
+ /* @__PURE__ */ r("div", { className: "asset-library__header", children: [
269
2038
  /* @__PURE__ */ e("h3", { children: "Assets" }),
270
- /* @__PURE__ */ e("button", { className: "close-button", onClick: () => V(!1), children: "×" })
2039
+ /* @__PURE__ */ e("button", { className: "close-button", onClick: () => P(!1), children: "×" })
271
2040
  ] }),
272
- /* @__PURE__ */ e("div", { className: "asset-library__upload", children: /* @__PURE__ */ a("label", { className: "upload-zone", children: [
2041
+ /* @__PURE__ */ e("div", { className: "asset-library__upload", children: /* @__PURE__ */ r("label", { className: "upload-zone", children: [
273
2042
  /* @__PURE__ */ e(
274
2043
  "input",
275
2044
  {
276
2045
  type: "file",
277
2046
  multiple: !0,
278
2047
  accept: "video/*,audio/*,image/*",
279
- onChange: (s) => s.target.files && _(s.target.files),
2048
+ onChange: (n) => n.target.files && g(n.target.files),
280
2049
  hidden: !0
281
2050
  }
282
2051
  ),
283
2052
  /* @__PURE__ */ e("span", { className: "upload-icon", children: "+" }),
284
2053
  /* @__PURE__ */ e("span", { children: "Drop files or click to upload" })
285
2054
  ] }) }),
286
- /* @__PURE__ */ e("div", { className: "asset-library__list", children: c.assets.map((s) => /* @__PURE__ */ a(
2055
+ /* @__PURE__ */ e("div", { className: "asset-library__list", children: p.assets.map((n) => /* @__PURE__ */ r(
287
2056
  "div",
288
2057
  {
289
2058
  className: "asset-item",
290
2059
  draggable: !0,
291
- onDragStart: (r) => r.dataTransfer.setData("assetId", s.id),
2060
+ onDragStart: (o) => o.dataTransfer.setData("assetId", n.id),
292
2061
  children: [
293
- /* @__PURE__ */ e("div", { className: "asset-thumbnail", children: s.thumbnail ? /* @__PURE__ */ e("img", { src: s.thumbnail, alt: s.name }) : /* @__PURE__ */ e("span", { className: "asset-type-icon", children: s.type === "video" ? "🎬" : s.type === "audio" ? "🎵" : "🖼️" }) }),
294
- /* @__PURE__ */ a("div", { className: "asset-info", children: [
295
- /* @__PURE__ */ e("span", { className: "asset-name", children: s.name }),
296
- /* @__PURE__ */ a("span", { className: "asset-meta", children: [
297
- (s.size / 1024 / 1024).toFixed(1),
2062
+ /* @__PURE__ */ e("div", { className: "asset-thumbnail", children: n.thumbnail ? /* @__PURE__ */ e("img", { src: n.thumbnail, alt: n.name }) : /* @__PURE__ */ e("span", { className: "asset-type-icon", children: n.type === "video" ? "🎬" : n.type === "audio" ? "🎵" : "🖼️" }) }),
2063
+ /* @__PURE__ */ r("div", { className: "asset-info", children: [
2064
+ /* @__PURE__ */ e("span", { className: "asset-name", children: n.name }),
2065
+ /* @__PURE__ */ r("span", { className: "asset-meta", children: [
2066
+ (n.size / 1024 / 1024).toFixed(1),
298
2067
  "MB"
299
2068
  ] })
300
2069
  ] })
301
2070
  ]
302
2071
  },
303
- s.id
2072
+ n.id
304
2073
  )) })
305
2074
  ] }),
306
- /* @__PURE__ */ a("div", { className: "video-editor__preview-area", children: [
307
- /* @__PURE__ */ a("div", { className: "preview-container", children: [
308
- /* @__PURE__ */ a(
2075
+ /* @__PURE__ */ r("div", { className: "video-editor__preview-area", children: [
2076
+ /* @__PURE__ */ r("div", { className: "preview-container", children: [
2077
+ /* @__PURE__ */ r(
309
2078
  "div",
310
2079
  {
311
2080
  className: "preview-canvas",
312
- style: { aspectRatio: `${c.resolution.width}/${c.resolution.height}` },
2081
+ style: { aspectRatio: `${p.resolution.width}/${p.resolution.height}` },
313
2082
  children: [
314
- /* @__PURE__ */ e("video", { ref: ne, className: "preview-video" }),
315
- /* @__PURE__ */ e("div", { className: "preview-overlay", children: !q && /* @__PURE__ */ e(
2083
+ /* @__PURE__ */ e("video", { ref: se, className: "preview-video" }),
2084
+ /* @__PURE__ */ e("div", { className: "preview-overlay", children: !K && /* @__PURE__ */ e(
316
2085
  "button",
317
2086
  {
318
2087
  className: "toggle-library-button",
319
- onClick: () => V(!0),
2088
+ onClick: () => P(!0),
320
2089
  children: "📁"
321
2090
  }
322
2091
  ) })
323
2092
  ]
324
2093
  }
325
2094
  ),
326
- /* @__PURE__ */ a("div", { className: "playback-controls", children: [
327
- /* @__PURE__ */ e("button", { onClick: () => Y(0), children: "⏮️" }),
328
- /* @__PURE__ */ e("button", { onClick: () => Y(b - 1 / c.frameRate), children: "⏪" }),
329
- /* @__PURE__ */ e("button", { onClick: ie, className: "play-button", children: k ? "⏸️" : "▶️" }),
330
- /* @__PURE__ */ e("button", { onClick: () => Y(b + 1 / c.frameRate), children: "⏩" }),
331
- /* @__PURE__ */ e("span", { className: "time-display", children: Z(b) })
2095
+ /* @__PURE__ */ r("div", { className: "playback-controls", children: [
2096
+ /* @__PURE__ */ e("button", { onClick: () => Q(0), children: "⏮️" }),
2097
+ /* @__PURE__ */ e("button", { onClick: () => Q(z - 1 / p.frameRate), children: "⏪" }),
2098
+ /* @__PURE__ */ e("button", { onClick: de, className: "play-button", children: q ? "⏸️" : "▶️" }),
2099
+ /* @__PURE__ */ e("button", { onClick: () => Q(z + 1 / p.frameRate), children: "⏩" }),
2100
+ /* @__PURE__ */ e("span", { className: "time-display", children: te(z) })
332
2101
  ] })
333
2102
  ] }),
334
- m && n !== "export" && /* @__PURE__ */ e("div", { className: "item-inspector", children: (() => {
335
- const s = j();
336
- if (!s)
2103
+ k && D !== "export" && /* @__PURE__ */ e("div", { className: "item-inspector", children: (() => {
2104
+ const n = Z();
2105
+ if (!n)
337
2106
  return null;
338
- const { track: r, item: u } = s;
339
- return /* @__PURE__ */ a(ae, { children: [
2107
+ const { track: o, item: a } = n;
2108
+ return /* @__PURE__ */ r(ie, { children: [
340
2109
  /* @__PURE__ */ e("h4", { children: "Item Properties" }),
341
- /* @__PURE__ */ a("div", { className: "inspector-section", children: [
342
- /* @__PURE__ */ a("label", { children: [
2110
+ /* @__PURE__ */ r("div", { className: "inspector-section", children: [
2111
+ /* @__PURE__ */ r("label", { children: [
343
2112
  "Start Time",
344
2113
  /* @__PURE__ */ e(
345
2114
  "input",
346
2115
  {
347
2116
  type: "number",
348
2117
  step: "0.1",
349
- value: u.startTime,
2118
+ value: a.startTime,
350
2119
  onChange: (t) => {
351
- const i = parseFloat(t.target.value);
352
- f({
353
- tracks: c.tracks.map(
354
- (o) => o.id === r.id ? {
355
- ...o,
356
- items: o.items.map(
357
- (d) => d.id === u.id ? { ...d, startTime: i } : d
2120
+ const c = parseFloat(t.target.value);
2121
+ w({
2122
+ tracks: p.tracks.map(
2123
+ (u) => u.id === o.id ? {
2124
+ ...u,
2125
+ items: u.items.map(
2126
+ (h) => h.id === a.id ? { ...h, startTime: c } : h
358
2127
  )
359
- } : o
2128
+ } : u
360
2129
  )
361
2130
  });
362
2131
  }
363
2132
  }
364
2133
  )
365
2134
  ] }),
366
- /* @__PURE__ */ a("label", { children: [
2135
+ /* @__PURE__ */ r("label", { children: [
367
2136
  "Duration",
368
2137
  /* @__PURE__ */ e(
369
2138
  "input",
370
2139
  {
371
2140
  type: "number",
372
2141
  step: "0.1",
373
- value: u.duration,
2142
+ value: a.duration,
374
2143
  onChange: (t) => {
375
- const i = parseFloat(t.target.value);
376
- f({
377
- tracks: c.tracks.map(
378
- (o) => o.id === r.id ? {
379
- ...o,
380
- items: o.items.map(
381
- (d) => d.id === u.id ? { ...d, duration: i } : d
2144
+ const c = parseFloat(t.target.value);
2145
+ w({
2146
+ tracks: p.tracks.map(
2147
+ (u) => u.id === o.id ? {
2148
+ ...u,
2149
+ items: u.items.map(
2150
+ (h) => h.id === a.id ? { ...h, duration: c } : h
382
2151
  )
383
- } : o
2152
+ } : u
384
2153
  )
385
2154
  });
386
2155
  }
387
2156
  }
388
2157
  )
389
2158
  ] }),
390
- /* @__PURE__ */ a("label", { children: [
2159
+ /* @__PURE__ */ r("label", { children: [
391
2160
  "Opacity",
392
2161
  /* @__PURE__ */ e(
393
2162
  "input",
@@ -396,20 +2165,20 @@ const ue = {
396
2165
  min: "0",
397
2166
  max: "1",
398
2167
  step: "0.1",
399
- value: u.properties.opacity ?? 1,
2168
+ value: a.properties.opacity ?? 1,
400
2169
  onChange: (t) => {
401
- const i = parseFloat(t.target.value);
402
- f({
403
- tracks: c.tracks.map(
404
- (o) => o.id === r.id ? {
405
- ...o,
406
- items: o.items.map(
407
- (d) => d.id === u.id ? {
408
- ...d,
409
- properties: { ...d.properties, opacity: i }
410
- } : d
2170
+ const c = parseFloat(t.target.value);
2171
+ w({
2172
+ tracks: p.tracks.map(
2173
+ (u) => u.id === o.id ? {
2174
+ ...u,
2175
+ items: u.items.map(
2176
+ (h) => h.id === a.id ? {
2177
+ ...h,
2178
+ properties: { ...h.properties, opacity: c }
2179
+ } : h
411
2180
  )
412
- } : o
2181
+ } : u
413
2182
  )
414
2183
  });
415
2184
  }
@@ -417,146 +2186,146 @@ const ue = {
417
2186
  )
418
2187
  ] })
419
2188
  ] }),
420
- /* @__PURE__ */ a("h4", { children: [
2189
+ /* @__PURE__ */ r("h4", { children: [
421
2190
  "Effects (",
422
- u.effects.length,
2191
+ a.effects.length,
423
2192
  ")"
424
2193
  ] }),
425
- /* @__PURE__ */ e("div", { className: "effects-list", children: u.effects.map((t) => /* @__PURE__ */ e("div", { className: "effect-badge", children: t.name }, t.id)) })
2194
+ /* @__PURE__ */ e("div", { className: "effects-list", children: a.effects.map((t) => /* @__PURE__ */ e("div", { className: "effect-badge", children: t.name }, t.id)) })
426
2195
  ] });
427
2196
  })() })
428
2197
  ] })
429
2198
  ] }),
430
- /* @__PURE__ */ a("div", { className: "video-editor__panel", children: [
431
- n === "timeline" && /* @__PURE__ */ a("div", { className: "timeline-panel", children: [
432
- /* @__PURE__ */ a("div", { className: "timeline-toolbar", children: [
433
- /* @__PURE__ */ a("div", { className: "track-buttons", children: [
434
- /* @__PURE__ */ e("button", { onClick: () => h("video"), children: "+ Video Track" }),
435
- /* @__PURE__ */ e("button", { onClick: () => h("audio"), children: "+ Audio Track" }),
436
- /* @__PURE__ */ e("button", { onClick: () => h("text"), children: "+ Text Track" })
2199
+ /* @__PURE__ */ r("div", { className: "video-editor__panel", children: [
2200
+ D === "timeline" && /* @__PURE__ */ r("div", { className: "timeline-panel", children: [
2201
+ /* @__PURE__ */ r("div", { className: "timeline-toolbar", children: [
2202
+ /* @__PURE__ */ r("div", { className: "track-buttons", children: [
2203
+ /* @__PURE__ */ e("button", { onClick: () => B("video"), children: "+ Video Track" }),
2204
+ /* @__PURE__ */ e("button", { onClick: () => B("audio"), children: "+ Audio Track" }),
2205
+ /* @__PURE__ */ e("button", { onClick: () => B("text"), children: "+ Text Track" })
437
2206
  ] }),
438
- /* @__PURE__ */ a("div", { className: "zoom-controls", children: [
439
- /* @__PURE__ */ e("button", { onClick: () => U(Math.max(0.25, x - 0.25)), children: "-" }),
440
- /* @__PURE__ */ a("span", { children: [
441
- Math.round(x * 100),
2207
+ /* @__PURE__ */ r("div", { className: "zoom-controls", children: [
2208
+ /* @__PURE__ */ e("button", { onClick: () => J(Math.max(0.25, M - 0.25)), children: "-" }),
2209
+ /* @__PURE__ */ r("span", { children: [
2210
+ Math.round(M * 100),
442
2211
  "%"
443
2212
  ] }),
444
- /* @__PURE__ */ e("button", { onClick: () => U(Math.min(4, x + 0.25)), children: "+" })
2213
+ /* @__PURE__ */ e("button", { onClick: () => J(Math.min(4, M + 0.25)), children: "+" })
445
2214
  ] })
446
2215
  ] }),
447
- /* @__PURE__ */ a("div", { className: "timeline-container", ref: X, children: [
448
- /* @__PURE__ */ e("div", { className: "timeline-ruler", children: Array.from({ length: Math.ceil(30 / x) }).map((s, r) => /* @__PURE__ */ e("div", { className: "ruler-mark", style: { left: `${r * 50 * x}px` }, children: Z(r) }, r)) }),
449
- /* @__PURE__ */ e("div", { className: "timeline-playhead", style: { left: `${b * 50 * x}px` } }),
450
- /* @__PURE__ */ e("div", { className: "timeline-tracks", children: c.tracks.map((s) => /* @__PURE__ */ a(
2216
+ /* @__PURE__ */ r("div", { className: "timeline-container", ref: oe, children: [
2217
+ /* @__PURE__ */ e("div", { className: "timeline-ruler", children: Array.from({ length: Math.ceil(30 / M) }).map((n, o) => /* @__PURE__ */ e("div", { className: "ruler-mark", style: { left: `${o * 50 * M}px` }, children: te(o) }, o)) }),
2218
+ /* @__PURE__ */ e("div", { className: "timeline-playhead", style: { left: `${z * 50 * M}px` } }),
2219
+ /* @__PURE__ */ e("div", { className: "timeline-tracks", children: p.tracks.map((n) => /* @__PURE__ */ r(
451
2220
  "div",
452
2221
  {
453
- className: `timeline-track ${g === s.id ? "timeline-track--selected" : ""} ${s.locked ? "timeline-track--locked" : ""}`,
454
- onClick: () => K(s.id),
455
- onDrop: (r) => {
456
- r.preventDefault();
457
- const u = r.dataTransfer.getData("assetId"), t = c.assets.find((i) => i.id === u);
458
- t && ee(s.id, t);
2222
+ className: `timeline-track ${E === n.id ? "timeline-track--selected" : ""} ${n.locked ? "timeline-track--locked" : ""}`,
2223
+ onClick: () => y(n.id),
2224
+ onDrop: (o) => {
2225
+ o.preventDefault();
2226
+ const a = o.dataTransfer.getData("assetId"), t = p.assets.find((c) => c.id === a);
2227
+ t && _(n.id, t);
459
2228
  },
460
- onDragOver: (r) => r.preventDefault(),
2229
+ onDragOver: (o) => o.preventDefault(),
461
2230
  children: [
462
- /* @__PURE__ */ a("div", { className: "track-header", children: [
463
- /* @__PURE__ */ e("span", { className: "track-name", children: s.name }),
464
- /* @__PURE__ */ a("div", { className: "track-controls", children: [
2231
+ /* @__PURE__ */ r("div", { className: "track-header", children: [
2232
+ /* @__PURE__ */ e("span", { className: "track-name", children: n.name }),
2233
+ /* @__PURE__ */ r("div", { className: "track-controls", children: [
465
2234
  /* @__PURE__ */ e(
466
2235
  "button",
467
2236
  {
468
- className: s.muted ? "active" : "",
469
- onClick: (r) => {
470
- r.stopPropagation(), G(s.id);
2237
+ className: n.muted ? "active" : "",
2238
+ onClick: (o) => {
2239
+ o.stopPropagation(), G(n.id);
471
2240
  },
472
- children: s.muted ? "🔇" : "🔊"
2241
+ children: n.muted ? "🔇" : "🔊"
473
2242
  }
474
2243
  ),
475
2244
  /* @__PURE__ */ e(
476
2245
  "button",
477
2246
  {
478
- className: s.locked ? "active" : "",
479
- onClick: (r) => {
480
- r.stopPropagation(), O(s.id);
2247
+ className: n.locked ? "active" : "",
2248
+ onClick: (o) => {
2249
+ o.stopPropagation(), re(n.id);
481
2250
  },
482
- children: s.locked ? "🔒" : "🔓"
2251
+ children: n.locked ? "🔒" : "🔓"
483
2252
  }
484
2253
  ),
485
2254
  /* @__PURE__ */ e(
486
2255
  "button",
487
2256
  {
488
- onClick: (r) => {
489
- r.stopPropagation(), W(s.id);
2257
+ onClick: (o) => {
2258
+ o.stopPropagation(), X(n.id);
490
2259
  },
491
2260
  children: "🗑️"
492
2261
  }
493
2262
  )
494
2263
  ] })
495
2264
  ] }),
496
- /* @__PURE__ */ e("div", { className: "track-items", children: s.items.map((r) => {
497
- const u = c.assets.find((t) => t.id === r.assetId);
498
- return /* @__PURE__ */ a(
2265
+ /* @__PURE__ */ e("div", { className: "track-items", children: n.items.map((o) => {
2266
+ const a = p.assets.find((t) => t.id === o.assetId);
2267
+ return /* @__PURE__ */ r(
499
2268
  "div",
500
2269
  {
501
- className: `track-item track-item--${r.type} ${m === r.id ? "track-item--selected" : ""}`,
2270
+ className: `track-item track-item--${o.type} ${k === o.id ? "track-item--selected" : ""}`,
502
2271
  style: {
503
- left: `${r.startTime * 50 * x}px`,
504
- width: `${r.duration * 50 * x}px`
2272
+ left: `${o.startTime * 50 * M}px`,
2273
+ width: `${o.duration * 50 * M}px`
505
2274
  },
506
2275
  onClick: (t) => {
507
- t.stopPropagation(), C(r.id);
2276
+ t.stopPropagation(), S(o.id);
508
2277
  },
509
2278
  children: [
510
- /* @__PURE__ */ e("span", { className: "item-name", children: (u == null ? void 0 : u.name) || "Untitled" }),
511
- r.transitions.length > 0 && /* @__PURE__ */ e("span", { className: "item-transitions", children: "✨" }),
512
- r.effects.length > 0 && /* @__PURE__ */ e("span", { className: "item-effects", children: "🎨" })
2279
+ /* @__PURE__ */ e("span", { className: "item-name", children: (a == null ? void 0 : a.name) || "Untitled" }),
2280
+ o.transitions.length > 0 && /* @__PURE__ */ e("span", { className: "item-transitions", children: "✨" }),
2281
+ o.effects.length > 0 && /* @__PURE__ */ e("span", { className: "item-effects", children: "🎨" })
513
2282
  ]
514
2283
  },
515
- r.id
2284
+ o.id
516
2285
  );
517
2286
  }) })
518
2287
  ]
519
2288
  },
520
- s.id
2289
+ n.id
521
2290
  )) })
522
2291
  ] })
523
2292
  ] }),
524
- n === "effects" && /* @__PURE__ */ a("div", { className: "effects-panel", children: [
2293
+ D === "effects" && /* @__PURE__ */ r("div", { className: "effects-panel", children: [
525
2294
  /* @__PURE__ */ e("h3", { children: "Video Effects" }),
526
2295
  /* @__PURE__ */ e("p", { className: "panel-hint", children: "Select a clip to apply effects" }),
527
- /* @__PURE__ */ e("div", { className: "effects-grid", children: me.map((s) => /* @__PURE__ */ a(
2296
+ /* @__PURE__ */ e("div", { className: "effects-grid", children: We.map((n) => /* @__PURE__ */ r(
528
2297
  "button",
529
2298
  {
530
2299
  className: "effect-preset",
531
- disabled: !m,
2300
+ disabled: !k,
532
2301
  onClick: () => {
533
- const r = j();
534
- r && w(r.track.id, r.item.id, s.type);
2302
+ const o = Z();
2303
+ o && Y(o.track.id, o.item.id, n.type);
535
2304
  },
536
2305
  children: [
537
- /* @__PURE__ */ e("span", { className: "effect-icon", children: s.icon }),
538
- /* @__PURE__ */ e("span", { className: "effect-name", children: s.name })
2306
+ /* @__PURE__ */ e("span", { className: "effect-icon", children: n.icon }),
2307
+ /* @__PURE__ */ e("span", { className: "effect-name", children: n.name })
539
2308
  ]
540
2309
  },
541
- s.type
2310
+ n.type
542
2311
  )) })
543
2312
  ] }),
544
- n === "transitions" && /* @__PURE__ */ a("div", { className: "transitions-panel", children: [
2313
+ D === "transitions" && /* @__PURE__ */ r("div", { className: "transitions-panel", children: [
545
2314
  /* @__PURE__ */ e("h3", { children: "Transitions" }),
546
2315
  /* @__PURE__ */ e("p", { className: "panel-hint", children: "Select a clip and add transitions between clips" }),
547
- /* @__PURE__ */ e("div", { className: "transitions-grid", children: he.map((s) => /* @__PURE__ */ a("div", { className: "transition-preset", children: [
548
- /* @__PURE__ */ e("span", { className: "transition-name", children: s.name }),
549
- /* @__PURE__ */ a("div", { className: "transition-buttons", children: [
2316
+ /* @__PURE__ */ e("div", { className: "transitions-grid", children: Ke.map((n) => /* @__PURE__ */ r("div", { className: "transition-preset", children: [
2317
+ /* @__PURE__ */ e("span", { className: "transition-name", children: n.name }),
2318
+ /* @__PURE__ */ r("div", { className: "transition-buttons", children: [
550
2319
  /* @__PURE__ */ e(
551
2320
  "button",
552
2321
  {
553
- disabled: !m,
2322
+ disabled: !k,
554
2323
  onClick: () => {
555
- const r = j();
556
- r && H(
557
- r.track.id,
558
- r.item.id,
559
- s.type,
2324
+ const o = Z();
2325
+ o && L(
2326
+ o.track.id,
2327
+ o.item.id,
2328
+ n.type,
560
2329
  "start"
561
2330
  );
562
2331
  },
@@ -566,29 +2335,29 @@ const ue = {
566
2335
  /* @__PURE__ */ e(
567
2336
  "button",
568
2337
  {
569
- disabled: !m,
2338
+ disabled: !k,
570
2339
  onClick: () => {
571
- const r = j();
572
- r && H(r.track.id, r.item.id, s.type, "end");
2340
+ const o = Z();
2341
+ o && L(o.track.id, o.item.id, n.type, "end");
573
2342
  },
574
2343
  children: "Out"
575
2344
  }
576
2345
  )
577
2346
  ] })
578
- ] }, s.type)) })
2347
+ ] }, n.type)) })
579
2348
  ] }),
580
- n === "export" && /* @__PURE__ */ a("div", { className: "export-panel", children: [
2349
+ D === "export" && /* @__PURE__ */ r("div", { className: "export-panel", children: [
581
2350
  /* @__PURE__ */ e("h3", { children: "Export Settings" }),
582
- /* @__PURE__ */ a("div", { className: "export-settings", children: [
583
- /* @__PURE__ */ a("div", { className: "setting-group", children: [
2351
+ /* @__PURE__ */ r("div", { className: "export-settings", children: [
2352
+ /* @__PURE__ */ r("div", { className: "setting-group", children: [
584
2353
  /* @__PURE__ */ e("label", { children: "Resolution" }),
585
- /* @__PURE__ */ a(
2354
+ /* @__PURE__ */ r(
586
2355
  "select",
587
2356
  {
588
- value: `${c.resolution.width}x${c.resolution.height}`,
589
- onChange: (s) => {
590
- const [r, u] = s.target.value.split("x").map(Number);
591
- f({ resolution: { width: r, height: u } });
2357
+ value: `${p.resolution.width}x${p.resolution.height}`,
2358
+ onChange: (n) => {
2359
+ const [o, a] = n.target.value.split("x").map(Number);
2360
+ w({ resolution: { width: o, height: a } });
592
2361
  },
593
2362
  children: [
594
2363
  /* @__PURE__ */ e("option", { value: "1920x1080", children: "1080p (1920x1080)" }),
@@ -599,13 +2368,13 @@ const ue = {
599
2368
  }
600
2369
  )
601
2370
  ] }),
602
- /* @__PURE__ */ a("div", { className: "setting-group", children: [
2371
+ /* @__PURE__ */ r("div", { className: "setting-group", children: [
603
2372
  /* @__PURE__ */ e("label", { children: "Frame Rate" }),
604
- /* @__PURE__ */ a(
2373
+ /* @__PURE__ */ r(
605
2374
  "select",
606
2375
  {
607
- value: c.frameRate,
608
- onChange: (s) => f({ frameRate: parseInt(s.target.value) }),
2376
+ value: p.frameRate,
2377
+ onChange: (n) => w({ frameRate: parseInt(n.target.value) }),
609
2378
  children: [
610
2379
  /* @__PURE__ */ e("option", { value: "24", children: "24 fps" }),
611
2380
  /* @__PURE__ */ e("option", { value: "30", children: "30 fps" }),
@@ -615,18 +2384,18 @@ const ue = {
615
2384
  }
616
2385
  )
617
2386
  ] }),
618
- /* @__PURE__ */ a("div", { className: "setting-group", children: [
2387
+ /* @__PURE__ */ r("div", { className: "setting-group", children: [
619
2388
  /* @__PURE__ */ e("label", { children: "Video Codec" }),
620
- /* @__PURE__ */ a(
2389
+ /* @__PURE__ */ r(
621
2390
  "select",
622
2391
  {
623
- value: c.settings.video.codec,
624
- onChange: (s) => f({
2392
+ value: p.settings.video.codec,
2393
+ onChange: (n) => w({
625
2394
  settings: {
626
- ...c.settings,
2395
+ ...p.settings,
627
2396
  video: {
628
- ...c.settings.video,
629
- codec: s.target.value
2397
+ ...p.settings.video,
2398
+ codec: n.target.value
630
2399
  }
631
2400
  }
632
2401
  }),
@@ -639,19 +2408,19 @@ const ue = {
639
2408
  }
640
2409
  )
641
2410
  ] }),
642
- /* @__PURE__ */ a("div", { className: "setting-group", children: [
2411
+ /* @__PURE__ */ r("div", { className: "setting-group", children: [
643
2412
  /* @__PURE__ */ e("label", { children: "Video Bitrate (Mbps)" }),
644
2413
  /* @__PURE__ */ e(
645
2414
  "input",
646
2415
  {
647
2416
  type: "number",
648
- value: c.settings.video.bitrate / 1e3,
649
- onChange: (s) => f({
2417
+ value: p.settings.video.bitrate / 1e3,
2418
+ onChange: (n) => w({
650
2419
  settings: {
651
- ...c.settings,
2420
+ ...p.settings,
652
2421
  video: {
653
- ...c.settings.video,
654
- bitrate: parseFloat(s.target.value) * 1e3
2422
+ ...p.settings.video,
2423
+ bitrate: parseFloat(n.target.value) * 1e3
655
2424
  }
656
2425
  }
657
2426
  }),
@@ -665,16 +2434,16 @@ const ue = {
665
2434
  "button",
666
2435
  {
667
2436
  className: "export-button",
668
- onClick: te,
669
- disabled: y !== null,
670
- children: y !== null ? `Exporting... ${Math.round(y)}%` : "Export Video"
2437
+ onClick: ee,
2438
+ disabled: U !== null,
2439
+ children: U !== null ? `Exporting... ${Math.round(U)}%` : "Export Video"
671
2440
  }
672
2441
  ),
673
- y !== null && /* @__PURE__ */ e("div", { className: "export-progress", children: /* @__PURE__ */ e("div", { className: "export-progress-bar", style: { width: `${y}%` } }) })
2442
+ U !== null && /* @__PURE__ */ e("div", { className: "export-progress", children: /* @__PURE__ */ e("div", { className: "export-progress-bar", style: { width: `${U}%` } }) })
674
2443
  ] })
675
2444
  ] })
676
2445
  ] });
677
- }, pe = {
2446
+ }, je = {
678
2447
  video: {
679
2448
  source: "screen",
680
2449
  showCursor: !0,
@@ -691,121 +2460,121 @@ const ue = {
691
2460
  format: "webm",
692
2461
  quality: "high"
693
2462
  }
694
- }, Ne = ({
695
- options: M,
696
- onRecordingStart: S,
697
- onRecordingStop: D,
698
- onRecordingPause: R,
699
- onRecordingResume: F,
700
- onError: c,
701
- className: J = ""
2463
+ }, Ye = ({
2464
+ options: l,
2465
+ onRecordingStart: m,
2466
+ onRecordingStop: f,
2467
+ onRecordingPause: C,
2468
+ onRecordingResume: I,
2469
+ onError: T,
2470
+ className: p = ""
702
2471
  }) => {
703
- var d, I;
704
- const [n, Q] = p({
705
- ...pe,
706
- ...M
707
- }), [g, K] = p(null), [m, C] = p("idle"), [b, P] = p([]), [k, L] = p(null), [x, U] = p(null), [q, V] = p(!1), [y, A] = p(!1), [X, ne] = p(
2472
+ var u, h;
2473
+ const [i, D] = v({
2474
+ ...je,
2475
+ ...l
2476
+ }), [b, E] = v(null), [y, k] = v("idle"), [S, z] = v([]), [R, q] = v(null), [W, M] = v(null), [J, K] = v(!1), [P, U] = v(!1), [O, oe] = v(
708
2477
  "pen"
709
- ), [z, f] = p("var(--nice-danger, #ff0000)"), _ = T(null), h = T([]), W = T(null), G = T(null), O = T(null), ee = T(0);
710
- re(() => () => {
711
- k && k.getTracks().forEach((l) => l.stop()), O.current && clearInterval(O.current);
712
- }, [k]);
713
- const w = (l) => {
714
- Q((v) => ({
715
- ...v,
716
- ...l,
717
- video: { ...v.video, ...l.video },
718
- audio: { ...v.audio, ...l.audio },
719
- output: { ...v.output, ...l.output }
2478
+ ), [se, A] = v("var(--nice-danger, #ff0000)"), w = F(null), g = F([]), B = F(null), X = F(null), G = F(null), re = F(0);
2479
+ ne(() => () => {
2480
+ R && R.getTracks().forEach((s) => s.stop()), G.current && clearInterval(G.current);
2481
+ }, [R]);
2482
+ const _ = (s) => {
2483
+ D((N) => ({
2484
+ ...N,
2485
+ ...s,
2486
+ video: { ...N.video, ...s.video },
2487
+ audio: { ...N.audio, ...s.audio },
2488
+ output: { ...N.output, ...s.output }
720
2489
  }));
721
- }, H = async () => {
2490
+ }, Y = async () => {
722
2491
  try {
723
- C("preparing");
724
- const l = {
2492
+ k("preparing");
2493
+ const s = {
725
2494
  video: {
726
- cursor: n.video.showCursor ? "always" : "never",
727
- frameRate: n.video.frameRate
2495
+ cursor: i.video.showCursor ? "always" : "never",
2496
+ frameRate: i.video.frameRate
728
2497
  },
729
- audio: n.audio.source === "system" || n.audio.source === "both"
730
- }, v = await navigator.mediaDevices.getDisplayMedia(l);
731
- if (n.audio.enabled && (n.audio.source === "microphone" || n.audio.source === "both"))
2498
+ audio: i.audio.source === "system" || i.audio.source === "both"
2499
+ }, N = await navigator.mediaDevices.getDisplayMedia(s);
2500
+ if (i.audio.enabled && (i.audio.source === "microphone" || i.audio.source === "both"))
732
2501
  try {
733
2502
  (await navigator.mediaDevices.getUserMedia({
734
2503
  audio: {
735
- echoCancellation: n.audio.echoCancellation,
736
- noiseSuppression: n.audio.noiseSuppression
2504
+ echoCancellation: i.audio.echoCancellation,
2505
+ noiseSuppression: i.audio.noiseSuppression
737
2506
  }
738
- })).getAudioTracks().forEach(($) => v.addTrack($));
739
- } catch (N) {
740
- console.warn("Could not access microphone:", N);
2507
+ })).getAudioTracks().forEach((V) => N.addTrack(V));
2508
+ } catch (H) {
2509
+ console.warn("Could not access microphone:", H);
741
2510
  }
742
- L(v), W.current && (W.current.srcObject = v, W.current.play()), C("idle");
743
- } catch (l) {
744
- C("error"), c == null || c(l instanceof Error ? l : new Error("Failed to start preview"));
2511
+ q(N), B.current && (B.current.srcObject = N, B.current.play()), k("idle");
2512
+ } catch (s) {
2513
+ k("error"), T == null || T(s instanceof Error ? s : new Error("Failed to start preview"));
745
2514
  }
746
- }, E = async () => {
747
- k || await H();
748
- for (let l = 3; l > 0; l--)
749
- U(l), await new Promise((v) => setTimeout(v, 1e3));
750
- U(null);
2515
+ }, L = async () => {
2516
+ R || await Y();
2517
+ for (let s = 3; s > 0; s--)
2518
+ M(s), await new Promise((N) => setTimeout(N, 1e3));
2519
+ M(null);
751
2520
  try {
752
- const l = k || await ie();
753
- if (!l)
2521
+ const s = R || await ce();
2522
+ if (!s)
754
2523
  throw new Error("No stream available");
755
- const v = r(n.output.format), N = new MediaRecorder(l, {
756
- mimeType: v,
757
- videoBitsPerSecond: u(n.output.quality)
2524
+ const N = n(i.output.format), H = new MediaRecorder(s, {
2525
+ mimeType: N,
2526
+ videoBitsPerSecond: o(i.output.quality)
758
2527
  });
759
- h.current = [], N.ondataavailable = (B) => {
760
- B.data.size > 0 && h.current.push(B.data);
761
- }, N.onstop = () => {
762
- const B = new Blob(h.current, { type: v });
763
- g && (D == null || D({ ...g, status: "stopped" }, B));
764
- }, _.current = N, N.start(1e3), ee.current = Date.now();
765
- const $ = {
2528
+ g.current = [], H.ondataavailable = (j) => {
2529
+ j.data.size > 0 && g.current.push(j.data);
2530
+ }, H.onstop = () => {
2531
+ const j = new Blob(g.current, { type: N });
2532
+ b && (f == null || f({ ...b, status: "stopped" }, j));
2533
+ }, w.current = H, H.start(1e3), re.current = Date.now();
2534
+ const V = {
766
2535
  id: crypto.randomUUID(),
767
2536
  status: "recording",
768
2537
  startTime: /* @__PURE__ */ new Date(),
769
2538
  duration: 0,
770
2539
  size: 0,
771
- options: n,
2540
+ options: i,
772
2541
  chunks: []
773
2542
  };
774
- K($), C("recording"), S == null || S($), O.current = setInterval(() => {
775
- K(
776
- (B) => B ? {
777
- ...B,
778
- duration: (Date.now() - ee.current) / 1e3,
779
- size: h.current.reduce((ce, de) => ce + de.size, 0)
2543
+ E(V), k("recording"), m == null || m(V), G.current = setInterval(() => {
2544
+ E(
2545
+ (j) => j ? {
2546
+ ...j,
2547
+ duration: (Date.now() - re.current) / 1e3,
2548
+ size: g.current.reduce((xe, Ce) => xe + Ce.size, 0)
780
2549
  } : null
781
2550
  );
782
2551
  }, 100);
783
- } catch (l) {
784
- C("error"), c == null || c(l instanceof Error ? l : new Error("Failed to start recording"));
2552
+ } catch (s) {
2553
+ k("error"), T == null || T(s instanceof Error ? s : new Error("Failed to start recording"));
785
2554
  }
786
- }, ie = async () => (await H(), k), Y = () => {
787
- _.current && m === "recording" && (_.current.pause(), C("paused"), R == null || R());
788
- }, te = () => {
789
- _.current && m === "paused" && (_.current.resume(), C("recording"), F == null || F());
790
- }, Z = () => {
791
- O.current && clearInterval(O.current), _.current && (m === "recording" || m === "paused") && (_.current.stop(), C("stopped")), k && (k.getTracks().forEach((l) => l.stop()), L(null));
792
- }, j = le(
793
- (l) => {
794
- if (m !== "recording")
2555
+ }, ce = async () => (await Y(), R), de = () => {
2556
+ w.current && y === "recording" && (w.current.pause(), k("paused"), C == null || C());
2557
+ }, Q = () => {
2558
+ w.current && y === "paused" && (w.current.resume(), k("recording"), I == null || I());
2559
+ }, ee = () => {
2560
+ G.current && clearInterval(G.current), w.current && (y === "recording" || y === "paused") && (w.current.stop(), k("stopped")), R && (R.getTracks().forEach((s) => s.stop()), q(null));
2561
+ }, te = me(
2562
+ (s) => {
2563
+ if (y !== "recording")
795
2564
  return;
796
- const v = {
2565
+ const N = {
797
2566
  id: crypto.randomUUID(),
798
- time: (g == null ? void 0 : g.duration) || 0,
799
- label: l || `Marker ${b.length + 1}`,
800
- color: t()
2567
+ time: (b == null ? void 0 : b.duration) || 0,
2568
+ label: s || `Marker ${S.length + 1}`,
2569
+ color: a()
801
2570
  };
802
- P((N) => [...N, v]);
2571
+ z((H) => [...H, N]);
803
2572
  },
804
- [m, g == null ? void 0 : g.duration, b.length]
805
- ), s = (l) => {
806
- P((v) => v.filter((N) => N.id !== l));
807
- }, r = (l) => {
808
- switch (l) {
2573
+ [y, b == null ? void 0 : b.duration, S.length]
2574
+ ), Z = (s) => {
2575
+ z((N) => N.filter((H) => H.id !== s));
2576
+ }, n = (s) => {
2577
+ switch (s) {
809
2578
  case "mp4":
810
2579
  return "video/mp4";
811
2580
  case "mkv":
@@ -813,8 +2582,8 @@ const ue = {
813
2582
  default:
814
2583
  return "video/webm;codecs=vp9";
815
2584
  }
816
- }, u = (l) => {
817
- switch (l) {
2585
+ }, o = (s) => {
2586
+ switch (s) {
818
2587
  case "low":
819
2588
  return 25e5;
820
2589
  case "medium":
@@ -824,67 +2593,67 @@ const ue = {
824
2593
  default:
825
2594
  return 8e6;
826
2595
  }
827
- }, t = () => {
828
- const l = ["var(--nice-danger, #ff4444)", "#44ff44", "#4444ff", "#ffff44", "#ff44ff", "#44ffff"];
829
- return l[Math.floor(Math.random() * l.length)];
830
- }, i = (l) => {
831
- const v = Math.floor(l / 3600), N = Math.floor(l % 3600 / 60), $ = Math.floor(l % 60), B = Math.floor(l % 1 * 100);
832
- return v > 0 ? `${v}:${N.toString().padStart(2, "0")}:${$.toString().padStart(2, "0")}` : `${N.toString().padStart(2, "0")}:${$.toString().padStart(2, "0")}.${B.toString().padStart(2, "0")}`;
833
- }, o = (l) => l < 1024 ? `${l} B` : l < 1024 * 1024 ? `${(l / 1024).toFixed(1)} KB` : `${(l / 1024 / 1024).toFixed(1)} MB`;
834
- return /* @__PURE__ */ a("div", { className: `nice-screen-recorder ${J}`, children: [
835
- /* @__PURE__ */ a("div", { className: "recorder__preview", children: [
836
- x !== null && /* @__PURE__ */ e("div", { className: "countdown-overlay", children: /* @__PURE__ */ e("span", { className: "countdown-number", children: x }) }),
837
- /* @__PURE__ */ e("video", { ref: W, className: "preview-video", muted: !0, playsInline: !0 }),
838
- y && /* @__PURE__ */ e("canvas", { ref: G, className: "annotation-canvas" }),
839
- !k && m === "idle" && /* @__PURE__ */ e("div", { className: "preview-placeholder", children: /* @__PURE__ */ a("button", { className: "start-preview-button", onClick: H, children: [
2596
+ }, a = () => {
2597
+ const s = ["var(--nice-danger, #ff4444)", "#44ff44", "#4444ff", "#ffff44", "#ff44ff", "#44ffff"];
2598
+ return s[Math.floor(Math.random() * s.length)];
2599
+ }, t = (s) => {
2600
+ const N = Math.floor(s / 3600), H = Math.floor(s % 3600 / 60), V = Math.floor(s % 60), j = Math.floor(s % 1 * 100);
2601
+ return N > 0 ? `${N}:${H.toString().padStart(2, "0")}:${V.toString().padStart(2, "0")}` : `${H.toString().padStart(2, "0")}:${V.toString().padStart(2, "0")}.${j.toString().padStart(2, "0")}`;
2602
+ }, c = (s) => s < 1024 ? `${s} B` : s < 1024 * 1024 ? `${(s / 1024).toFixed(1)} KB` : `${(s / 1024 / 1024).toFixed(1)} MB`;
2603
+ return /* @__PURE__ */ r("div", { className: `nice-screen-recorder ${p}`, children: [
2604
+ /* @__PURE__ */ r("div", { className: "recorder__preview", children: [
2605
+ W !== null && /* @__PURE__ */ e("div", { className: "countdown-overlay", children: /* @__PURE__ */ e("span", { className: "countdown-number", children: W }) }),
2606
+ /* @__PURE__ */ e("video", { ref: B, className: "preview-video", muted: !0, playsInline: !0 }),
2607
+ P && /* @__PURE__ */ e("canvas", { ref: X, className: "annotation-canvas" }),
2608
+ !R && y === "idle" && /* @__PURE__ */ e("div", { className: "preview-placeholder", children: /* @__PURE__ */ r("button", { className: "start-preview-button", onClick: Y, children: [
840
2609
  /* @__PURE__ */ e("span", { className: "icon", children: "🖥️" }),
841
2610
  /* @__PURE__ */ e("span", { children: "Select Screen to Record" })
842
2611
  ] }) }),
843
- m === "recording" && /* @__PURE__ */ a("div", { className: "recording-indicator", children: [
2612
+ y === "recording" && /* @__PURE__ */ r("div", { className: "recording-indicator", children: [
844
2613
  /* @__PURE__ */ e("span", { className: "recording-dot" }),
845
2614
  /* @__PURE__ */ e("span", { children: "REC" })
846
2615
  ] })
847
2616
  ] }),
848
- /* @__PURE__ */ a("div", { className: "recorder__controls", children: [
849
- /* @__PURE__ */ a("div", { className: "controls__main", children: [
850
- m === "idle" && /* @__PURE__ */ a(
2617
+ /* @__PURE__ */ r("div", { className: "recorder__controls", children: [
2618
+ /* @__PURE__ */ r("div", { className: "controls__main", children: [
2619
+ y === "idle" && /* @__PURE__ */ r(
851
2620
  "button",
852
2621
  {
853
2622
  className: "control-button control-button--record",
854
- onClick: E,
855
- disabled: !!x,
2623
+ onClick: L,
2624
+ disabled: !!W,
856
2625
  children: [
857
2626
  /* @__PURE__ */ e("span", { className: "icon", children: "⏺️" }),
858
2627
  /* @__PURE__ */ e("span", { children: "Start Recording" })
859
2628
  ]
860
2629
  }
861
2630
  ),
862
- m === "recording" && /* @__PURE__ */ a(ae, { children: [
863
- /* @__PURE__ */ a("button", { className: "control-button control-button--pause", onClick: Y, children: [
2631
+ y === "recording" && /* @__PURE__ */ r(ie, { children: [
2632
+ /* @__PURE__ */ r("button", { className: "control-button control-button--pause", onClick: de, children: [
864
2633
  /* @__PURE__ */ e("span", { className: "icon", children: "⏸️" }),
865
2634
  /* @__PURE__ */ e("span", { children: "Pause" })
866
2635
  ] }),
867
- /* @__PURE__ */ a("button", { className: "control-button control-button--stop", onClick: Z, children: [
2636
+ /* @__PURE__ */ r("button", { className: "control-button control-button--stop", onClick: ee, children: [
868
2637
  /* @__PURE__ */ e("span", { className: "icon", children: "⏹️" }),
869
2638
  /* @__PURE__ */ e("span", { children: "Stop" })
870
2639
  ] })
871
2640
  ] }),
872
- m === "paused" && /* @__PURE__ */ a(ae, { children: [
873
- /* @__PURE__ */ a("button", { className: "control-button control-button--resume", onClick: te, children: [
2641
+ y === "paused" && /* @__PURE__ */ r(ie, { children: [
2642
+ /* @__PURE__ */ r("button", { className: "control-button control-button--resume", onClick: Q, children: [
874
2643
  /* @__PURE__ */ e("span", { className: "icon", children: "▶️" }),
875
2644
  /* @__PURE__ */ e("span", { children: "Resume" })
876
2645
  ] }),
877
- /* @__PURE__ */ a("button", { className: "control-button control-button--stop", onClick: Z, children: [
2646
+ /* @__PURE__ */ r("button", { className: "control-button control-button--stop", onClick: ee, children: [
878
2647
  /* @__PURE__ */ e("span", { className: "icon", children: "⏹️" }),
879
2648
  /* @__PURE__ */ e("span", { children: "Stop" })
880
2649
  ] })
881
2650
  ] }),
882
- m === "stopped" && /* @__PURE__ */ a(
2651
+ y === "stopped" && /* @__PURE__ */ r(
883
2652
  "button",
884
2653
  {
885
2654
  className: "control-button control-button--new",
886
2655
  onClick: () => {
887
- C("idle"), K(null), P([]);
2656
+ k("idle"), E(null), z([]);
888
2657
  },
889
2658
  children: [
890
2659
  /* @__PURE__ */ e("span", { className: "icon", children: "🔄" }),
@@ -893,17 +2662,17 @@ const ue = {
893
2662
  }
894
2663
  )
895
2664
  ] }),
896
- /* @__PURE__ */ a("div", { className: "controls__secondary", children: [
897
- (m === "recording" || m === "paused") && /* @__PURE__ */ a("button", { className: "control-button control-button--marker", onClick: () => j(), children: [
2665
+ /* @__PURE__ */ r("div", { className: "controls__secondary", children: [
2666
+ (y === "recording" || y === "paused") && /* @__PURE__ */ r("button", { className: "control-button control-button--marker", onClick: () => te(), children: [
898
2667
  /* @__PURE__ */ e("span", { className: "icon", children: "🚩" }),
899
2668
  /* @__PURE__ */ e("span", { children: "Add Marker" })
900
2669
  ] }),
901
- /* @__PURE__ */ a(
2670
+ /* @__PURE__ */ r(
902
2671
  "button",
903
2672
  {
904
- className: `control-button ${y ? "control-button--active" : ""}`,
905
- onClick: () => A(!y),
906
- disabled: m !== "recording",
2673
+ className: `control-button ${P ? "control-button--active" : ""}`,
2674
+ onClick: () => U(!P),
2675
+ disabled: y !== "recording",
907
2676
  children: [
908
2677
  /* @__PURE__ */ e("span", { className: "icon", children: "✏️" }),
909
2678
  /* @__PURE__ */ e("span", { children: "Annotate" })
@@ -914,114 +2683,114 @@ const ue = {
914
2683
  "button",
915
2684
  {
916
2685
  className: "control-button control-button--settings",
917
- onClick: () => V(!q),
918
- disabled: m === "recording",
2686
+ onClick: () => K(!J),
2687
+ disabled: y === "recording",
919
2688
  children: /* @__PURE__ */ e("span", { className: "icon", children: "⚙️" })
920
2689
  }
921
2690
  )
922
2691
  ] })
923
2692
  ] }),
924
- /* @__PURE__ */ a("div", { className: "recorder__status", children: [
925
- /* @__PURE__ */ a("div", { className: "status__info", children: [
926
- /* @__PURE__ */ a("span", { className: "status-item", children: [
2693
+ /* @__PURE__ */ r("div", { className: "recorder__status", children: [
2694
+ /* @__PURE__ */ r("div", { className: "status__info", children: [
2695
+ /* @__PURE__ */ r("span", { className: "status-item", children: [
927
2696
  /* @__PURE__ */ e("strong", { children: "Duration:" }),
928
2697
  " ",
929
- i((g == null ? void 0 : g.duration) || 0)
2698
+ t((b == null ? void 0 : b.duration) || 0)
930
2699
  ] }),
931
- /* @__PURE__ */ a("span", { className: "status-item", children: [
2700
+ /* @__PURE__ */ r("span", { className: "status-item", children: [
932
2701
  /* @__PURE__ */ e("strong", { children: "Size:" }),
933
2702
  " ",
934
- o((g == null ? void 0 : g.size) || 0)
2703
+ c((b == null ? void 0 : b.size) || 0)
935
2704
  ] }),
936
- /* @__PURE__ */ a("span", { className: "status-item", children: [
2705
+ /* @__PURE__ */ r("span", { className: "status-item", children: [
937
2706
  /* @__PURE__ */ e("strong", { children: "Markers:" }),
938
2707
  " ",
939
- b.length
2708
+ S.length
940
2709
  ] })
941
2710
  ] }),
942
- /* @__PURE__ */ a("div", { className: "status__quality", children: [
943
- n.video.resolution && /* @__PURE__ */ a("span", { children: [
944
- n.video.resolution.width,
2711
+ /* @__PURE__ */ r("div", { className: "status__quality", children: [
2712
+ i.video.resolution && /* @__PURE__ */ r("span", { children: [
2713
+ i.video.resolution.width,
945
2714
  "x",
946
- n.video.resolution.height
2715
+ i.video.resolution.height
947
2716
  ] }),
948
- /* @__PURE__ */ a("span", { children: [
949
- n.video.frameRate,
2717
+ /* @__PURE__ */ r("span", { children: [
2718
+ i.video.frameRate,
950
2719
  "fps"
951
2720
  ] }),
952
- /* @__PURE__ */ e("span", { className: n.audio.enabled ? "audio-on" : "audio-off", children: n.audio.enabled ? "🔊" : "🔇" })
2721
+ /* @__PURE__ */ e("span", { className: i.audio.enabled ? "audio-on" : "audio-off", children: i.audio.enabled ? "🔊" : "🔇" })
953
2722
  ] })
954
2723
  ] }),
955
- y && m === "recording" && /* @__PURE__ */ a("div", { className: "recorder__annotation-tools", children: [
956
- /* @__PURE__ */ e("div", { className: "tool-group", children: ["pen", "arrow", "rectangle", "text"].map((l) => /* @__PURE__ */ a(
2724
+ P && y === "recording" && /* @__PURE__ */ r("div", { className: "recorder__annotation-tools", children: [
2725
+ /* @__PURE__ */ e("div", { className: "tool-group", children: ["pen", "arrow", "rectangle", "text"].map((s) => /* @__PURE__ */ r(
957
2726
  "button",
958
2727
  {
959
- className: `tool-button ${X === l ? "tool-button--active" : ""}`,
960
- onClick: () => ne(l),
2728
+ className: `tool-button ${O === s ? "tool-button--active" : ""}`,
2729
+ onClick: () => oe(s),
961
2730
  children: [
962
- l === "pen" && "✏️",
963
- l === "arrow" && "➡️",
964
- l === "rectangle" && "⬜",
965
- l === "text" && "T"
2731
+ s === "pen" && "✏️",
2732
+ s === "arrow" && "➡️",
2733
+ s === "rectangle" && "⬜",
2734
+ s === "text" && "T"
966
2735
  ]
967
2736
  },
968
- l
2737
+ s
969
2738
  )) }),
970
- /* @__PURE__ */ e("div", { className: "color-group", children: ["var(--nice-danger, #ff0000)", "var(--nice-success, #00ff00)", "var(--nice-primary, #0000ff)", "var(--nice-warning, #ffff00)", "var(--nice-bg, #fff)", "var(--nice-text, #000000)"].map((l) => /* @__PURE__ */ e(
2739
+ /* @__PURE__ */ e("div", { className: "color-group", children: ["var(--nice-danger, #ff0000)", "var(--nice-success, #00ff00)", "var(--nice-primary, #0000ff)", "var(--nice-warning, #ffff00)", "var(--nice-bg, #fff)", "var(--nice-text, #000000)"].map((s) => /* @__PURE__ */ e(
971
2740
  "button",
972
2741
  {
973
- className: `color-button ${z === l ? "color-button--active" : ""}`,
974
- style: { backgroundColor: l },
975
- onClick: () => f(l)
2742
+ className: `color-button ${se === s ? "color-button--active" : ""}`,
2743
+ style: { backgroundColor: s },
2744
+ onClick: () => A(s)
976
2745
  },
977
- l
2746
+ s
978
2747
  )) })
979
2748
  ] }),
980
- b.length > 0 && /* @__PURE__ */ a("div", { className: "recorder__markers", children: [
2749
+ S.length > 0 && /* @__PURE__ */ r("div", { className: "recorder__markers", children: [
981
2750
  /* @__PURE__ */ e("h4", { children: "Markers" }),
982
- /* @__PURE__ */ e("div", { className: "markers-list", children: b.map((l) => /* @__PURE__ */ a(
2751
+ /* @__PURE__ */ e("div", { className: "markers-list", children: S.map((s) => /* @__PURE__ */ r(
983
2752
  "div",
984
2753
  {
985
2754
  className: "marker-item",
986
- style: { borderLeftColor: l.color },
2755
+ style: { borderLeftColor: s.color },
987
2756
  children: [
988
- /* @__PURE__ */ e("span", { className: "marker-time", children: i(l.time) }),
2757
+ /* @__PURE__ */ e("span", { className: "marker-time", children: t(s.time) }),
989
2758
  /* @__PURE__ */ e(
990
2759
  "input",
991
2760
  {
992
2761
  type: "text",
993
- value: l.label,
994
- onChange: (v) => {
995
- P(
996
- (N) => N.map(($) => $.id === l.id ? { ...$, label: v.target.value } : $)
2762
+ value: s.label,
2763
+ onChange: (N) => {
2764
+ z(
2765
+ (H) => H.map((V) => V.id === s.id ? { ...V, label: N.target.value } : V)
997
2766
  );
998
2767
  },
999
2768
  className: "marker-label"
1000
2769
  }
1001
2770
  ),
1002
- /* @__PURE__ */ e("button", { className: "marker-remove", onClick: () => s(l.id), children: "×" })
2771
+ /* @__PURE__ */ e("button", { className: "marker-remove", onClick: () => Z(s.id), children: "×" })
1003
2772
  ]
1004
2773
  },
1005
- l.id
2774
+ s.id
1006
2775
  )) })
1007
2776
  ] }),
1008
- q && /* @__PURE__ */ a("div", { className: "recorder__settings", children: [
1009
- /* @__PURE__ */ a("div", { className: "settings-header", children: [
2777
+ J && /* @__PURE__ */ r("div", { className: "recorder__settings", children: [
2778
+ /* @__PURE__ */ r("div", { className: "settings-header", children: [
1010
2779
  /* @__PURE__ */ e("h3", { children: "Recording Settings" }),
1011
- /* @__PURE__ */ e("button", { className: "close-button", onClick: () => V(!1), children: "×" })
2780
+ /* @__PURE__ */ e("button", { className: "close-button", onClick: () => K(!1), children: "×" })
1012
2781
  ] }),
1013
- /* @__PURE__ */ a("div", { className: "settings-section", children: [
2782
+ /* @__PURE__ */ r("div", { className: "settings-section", children: [
1014
2783
  /* @__PURE__ */ e("h4", { children: "Video" }),
1015
- /* @__PURE__ */ a("label", { children: [
2784
+ /* @__PURE__ */ r("label", { children: [
1016
2785
  "Source",
1017
- /* @__PURE__ */ a(
2786
+ /* @__PURE__ */ r(
1018
2787
  "select",
1019
2788
  {
1020
- value: n.video.source,
1021
- onChange: (l) => w({
2789
+ value: i.video.source,
2790
+ onChange: (s) => _({
1022
2791
  video: {
1023
- ...n.video,
1024
- source: l.target.value
2792
+ ...i.video,
2793
+ source: s.target.value
1025
2794
  }
1026
2795
  }),
1027
2796
  children: [
@@ -1033,16 +2802,16 @@ const ue = {
1033
2802
  }
1034
2803
  )
1035
2804
  ] }),
1036
- /* @__PURE__ */ a("label", { children: [
2805
+ /* @__PURE__ */ r("label", { children: [
1037
2806
  "Resolution",
1038
- /* @__PURE__ */ a(
2807
+ /* @__PURE__ */ r(
1039
2808
  "select",
1040
2809
  {
1041
- value: `${(d = n.video.resolution) == null ? void 0 : d.width}x${(I = n.video.resolution) == null ? void 0 : I.height}`,
1042
- onChange: (l) => {
1043
- const [v, N] = l.target.value.split("x").map(Number);
1044
- w({
1045
- video: { ...n.video, resolution: { width: v, height: N } }
2810
+ value: `${(u = i.video.resolution) == null ? void 0 : u.width}x${(h = i.video.resolution) == null ? void 0 : h.height}`,
2811
+ onChange: (s) => {
2812
+ const [N, H] = s.target.value.split("x").map(Number);
2813
+ _({
2814
+ video: { ...i.video, resolution: { width: N, height: H } }
1046
2815
  });
1047
2816
  },
1048
2817
  children: [
@@ -1054,14 +2823,14 @@ const ue = {
1054
2823
  }
1055
2824
  )
1056
2825
  ] }),
1057
- /* @__PURE__ */ a("label", { children: [
2826
+ /* @__PURE__ */ r("label", { children: [
1058
2827
  "Frame Rate",
1059
- /* @__PURE__ */ a(
2828
+ /* @__PURE__ */ r(
1060
2829
  "select",
1061
2830
  {
1062
- value: n.video.frameRate,
1063
- onChange: (l) => w({
1064
- video: { ...n.video, frameRate: parseInt(l.target.value) }
2831
+ value: i.video.frameRate,
2832
+ onChange: (s) => _({
2833
+ video: { ...i.video, frameRate: parseInt(s.target.value) }
1065
2834
  }),
1066
2835
  children: [
1067
2836
  /* @__PURE__ */ e("option", { value: "15", children: "15 fps" }),
@@ -1072,46 +2841,46 @@ const ue = {
1072
2841
  }
1073
2842
  )
1074
2843
  ] }),
1075
- /* @__PURE__ */ a("label", { className: "checkbox-label", children: [
2844
+ /* @__PURE__ */ r("label", { className: "checkbox-label", children: [
1076
2845
  /* @__PURE__ */ e(
1077
2846
  "input",
1078
2847
  {
1079
2848
  type: "checkbox",
1080
- checked: n.video.showCursor,
1081
- onChange: (l) => w({
1082
- video: { ...n.video, showCursor: l.target.checked }
2849
+ checked: i.video.showCursor,
2850
+ onChange: (s) => _({
2851
+ video: { ...i.video, showCursor: s.target.checked }
1083
2852
  })
1084
2853
  }
1085
2854
  ),
1086
2855
  "Show Cursor"
1087
2856
  ] })
1088
2857
  ] }),
1089
- /* @__PURE__ */ a("div", { className: "settings-section", children: [
2858
+ /* @__PURE__ */ r("div", { className: "settings-section", children: [
1090
2859
  /* @__PURE__ */ e("h4", { children: "Audio" }),
1091
- /* @__PURE__ */ a("label", { className: "checkbox-label", children: [
2860
+ /* @__PURE__ */ r("label", { className: "checkbox-label", children: [
1092
2861
  /* @__PURE__ */ e(
1093
2862
  "input",
1094
2863
  {
1095
2864
  type: "checkbox",
1096
- checked: n.audio.enabled,
1097
- onChange: (l) => w({
1098
- audio: { ...n.audio, enabled: l.target.checked }
2865
+ checked: i.audio.enabled,
2866
+ onChange: (s) => _({
2867
+ audio: { ...i.audio, enabled: s.target.checked }
1099
2868
  })
1100
2869
  }
1101
2870
  ),
1102
2871
  "Enable Audio"
1103
2872
  ] }),
1104
- n.audio.enabled && /* @__PURE__ */ a(ae, { children: [
1105
- /* @__PURE__ */ a("label", { children: [
2873
+ i.audio.enabled && /* @__PURE__ */ r(ie, { children: [
2874
+ /* @__PURE__ */ r("label", { children: [
1106
2875
  "Source",
1107
- /* @__PURE__ */ a(
2876
+ /* @__PURE__ */ r(
1108
2877
  "select",
1109
2878
  {
1110
- value: n.audio.source,
1111
- onChange: (l) => w({
2879
+ value: i.audio.source,
2880
+ onChange: (s) => _({
1112
2881
  audio: {
1113
- ...n.audio,
1114
- source: l.target.value
2882
+ ...i.audio,
2883
+ source: s.target.value
1115
2884
  }
1116
2885
  }),
1117
2886
  children: [
@@ -1122,27 +2891,27 @@ const ue = {
1122
2891
  }
1123
2892
  )
1124
2893
  ] }),
1125
- /* @__PURE__ */ a("label", { className: "checkbox-label", children: [
2894
+ /* @__PURE__ */ r("label", { className: "checkbox-label", children: [
1126
2895
  /* @__PURE__ */ e(
1127
2896
  "input",
1128
2897
  {
1129
2898
  type: "checkbox",
1130
- checked: n.audio.echoCancellation,
1131
- onChange: (l) => w({
1132
- audio: { ...n.audio, echoCancellation: l.target.checked }
2899
+ checked: i.audio.echoCancellation,
2900
+ onChange: (s) => _({
2901
+ audio: { ...i.audio, echoCancellation: s.target.checked }
1133
2902
  })
1134
2903
  }
1135
2904
  ),
1136
2905
  "Echo Cancellation"
1137
2906
  ] }),
1138
- /* @__PURE__ */ a("label", { className: "checkbox-label", children: [
2907
+ /* @__PURE__ */ r("label", { className: "checkbox-label", children: [
1139
2908
  /* @__PURE__ */ e(
1140
2909
  "input",
1141
2910
  {
1142
2911
  type: "checkbox",
1143
- checked: n.audio.noiseSuppression,
1144
- onChange: (l) => w({
1145
- audio: { ...n.audio, noiseSuppression: l.target.checked }
2912
+ checked: i.audio.noiseSuppression,
2913
+ onChange: (s) => _({
2914
+ audio: { ...i.audio, noiseSuppression: s.target.checked }
1146
2915
  })
1147
2916
  }
1148
2917
  ),
@@ -1150,16 +2919,16 @@ const ue = {
1150
2919
  ] })
1151
2920
  ] })
1152
2921
  ] }),
1153
- /* @__PURE__ */ a("div", { className: "settings-section", children: [
2922
+ /* @__PURE__ */ r("div", { className: "settings-section", children: [
1154
2923
  /* @__PURE__ */ e("h4", { children: "Output" }),
1155
- /* @__PURE__ */ a("label", { children: [
2924
+ /* @__PURE__ */ r("label", { children: [
1156
2925
  "Format",
1157
- /* @__PURE__ */ a(
2926
+ /* @__PURE__ */ r(
1158
2927
  "select",
1159
2928
  {
1160
- value: n.output.format,
1161
- onChange: (l) => w({
1162
- output: { ...n.output, format: l.target.value }
2929
+ value: i.output.format,
2930
+ onChange: (s) => _({
2931
+ output: { ...i.output, format: s.target.value }
1163
2932
  }),
1164
2933
  children: [
1165
2934
  /* @__PURE__ */ e("option", { value: "webm", children: "WebM (Best Web)" }),
@@ -1169,16 +2938,16 @@ const ue = {
1169
2938
  }
1170
2939
  )
1171
2940
  ] }),
1172
- /* @__PURE__ */ a("label", { children: [
2941
+ /* @__PURE__ */ r("label", { children: [
1173
2942
  "Quality",
1174
- /* @__PURE__ */ a(
2943
+ /* @__PURE__ */ r(
1175
2944
  "select",
1176
2945
  {
1177
- value: n.output.quality,
1178
- onChange: (l) => w({
2946
+ value: i.output.quality,
2947
+ onChange: (s) => _({
1179
2948
  output: {
1180
- ...n.output,
1181
- quality: l.target.value
2949
+ ...i.output,
2950
+ quality: s.target.value
1182
2951
  }
1183
2952
  }),
1184
2953
  children: [
@@ -1193,7 +2962,7 @@ const ue = {
1193
2962
  ] })
1194
2963
  ] })
1195
2964
  ] });
1196
- }, ve = {
2965
+ }, qe = {
1197
2966
  id: crypto.randomUUID(),
1198
2967
  name: "My Stream",
1199
2968
  protocol: "rtmp",
@@ -1220,7 +2989,7 @@ const ue = {
1220
2989
  codec: "aac"
1221
2990
  }
1222
2991
  }
1223
- }, oe = [
2992
+ }, fe = [
1224
2993
  {
1225
2994
  platform: "youtube",
1226
2995
  name: "YouTube",
@@ -1236,7 +3005,7 @@ const ue = {
1236
3005
  },
1237
3006
  { platform: "custom-rtmp", name: "Custom RTMP", icon: "🔗", defaultUrl: "" },
1238
3007
  { platform: "custom-srt", name: "Custom SRT", icon: "🔒", defaultUrl: "" }
1239
- ], se = [
3008
+ ], le = [
1240
3009
  { type: "camera", name: "Camera", icon: "📷" },
1241
3010
  { type: "screen", name: "Screen Capture", icon: "🖥️" },
1242
3011
  { type: "window", name: "Window Capture", icon: "🪟" },
@@ -1245,18 +3014,18 @@ const ue = {
1245
3014
  { type: "video", name: "Video", icon: "🎬" },
1246
3015
  { type: "microphone", name: "Microphone", icon: "🎤" },
1247
3016
  { type: "system-audio", name: "System Audio", icon: "🔊" }
1248
- ], ye = ({
1249
- config: M,
1250
- onConfigChange: S,
1251
- onStreamStart: D,
1252
- onStreamStop: R,
1253
- onStatsUpdate: F,
1254
- onError: c,
1255
- className: J = ""
3017
+ ], Qe = ({
3018
+ config: l,
3019
+ onConfigChange: m,
3020
+ onStreamStart: f,
3021
+ onStreamStop: C,
3022
+ onStatsUpdate: I,
3023
+ onError: T,
3024
+ className: p = ""
1256
3025
  }) => {
1257
- const [n, Q] = p(M || ve), [g, K] = p(
3026
+ const [i, D] = v(l || qe), [b, E] = v(
1258
3027
  "sources"
1259
- ), [m, C] = p(!1), [b, P] = p({
3028
+ ), [y, k] = v(!1), [S, z] = v({
1260
3029
  duration: 0,
1261
3030
  viewers: 0,
1262
3031
  peakViewers: 0,
@@ -1265,155 +3034,155 @@ const ue = {
1265
3034
  droppedFrames: 0,
1266
3035
  cpuUsage: 0,
1267
3036
  memoryUsage: 0
1268
- }), [k, L] = p(null), [x, U] = p(!1), [q, V] = p(!1), [y, A] = p([n.layout]), [X, ne] = p(0), z = T(null), f = T(null), _ = T(0);
1269
- re(() => {
1270
- M && Q(M);
1271
- }, [M]), re(() => () => {
1272
- f.current && clearInterval(f.current);
3037
+ }), [R, q] = v(null), [W, M] = v(!1), [J, K] = v(!1), [P, U] = v([i.layout]), [O, oe] = v(0), se = F(null), A = F(null), w = F(0);
3038
+ ne(() => {
3039
+ l && D(l);
3040
+ }, [l]), ne(() => () => {
3041
+ A.current && clearInterval(A.current);
1273
3042
  }, []);
1274
- const h = le(
1275
- (t) => {
1276
- const i = { ...n, ...t };
1277
- Q(i), S == null || S(i);
3043
+ const g = me(
3044
+ (a) => {
3045
+ const t = { ...i, ...a };
3046
+ D(t), m == null || m(t);
1278
3047
  },
1279
- [n, S]
1280
- ), W = (t) => {
1281
- const i = oe.find((d) => d.platform === t), o = {
3048
+ [i, m]
3049
+ ), B = (a) => {
3050
+ const t = fe.find((u) => u.platform === a), c = {
1282
3051
  id: crypto.randomUUID(),
1283
- name: (i == null ? void 0 : i.name) || "Custom",
1284
- platform: t,
1285
- url: (i == null ? void 0 : i.defaultUrl) || "",
3052
+ name: (t == null ? void 0 : t.name) || "Custom",
3053
+ platform: a,
3054
+ url: (t == null ? void 0 : t.defaultUrl) || "",
1286
3055
  streamKey: "",
1287
3056
  enabled: !0,
1288
3057
  status: "idle"
1289
3058
  };
1290
- h({ destinations: [...n.destinations, o] }), V(!1);
1291
- }, G = (t, i) => {
1292
- h({
1293
- destinations: n.destinations.map((o) => o.id === t ? { ...o, ...i } : o)
3059
+ g({ destinations: [...i.destinations, c] }), K(!1);
3060
+ }, X = (a, t) => {
3061
+ g({
3062
+ destinations: i.destinations.map((c) => c.id === a ? { ...c, ...t } : c)
1294
3063
  });
1295
- }, O = (t) => {
1296
- h({ destinations: n.destinations.filter((i) => i.id !== t) });
1297
- }, ee = async (t) => {
1298
- const i = se.find((I) => I.type === t), o = {
3064
+ }, G = (a) => {
3065
+ g({ destinations: i.destinations.filter((t) => t.id !== a) });
3066
+ }, re = async (a) => {
3067
+ const t = le.find((h) => h.type === a), c = {
1299
3068
  id: crypto.randomUUID(),
1300
- type: t,
1301
- name: `${(i == null ? void 0 : i.name) || t} ${n.sources.filter((I) => I.type === t).length + 1}`,
3069
+ type: a,
3070
+ name: `${(t == null ? void 0 : t.name) || a} ${i.sources.filter((h) => h.type === a).length + 1}`,
1302
3071
  settings: {},
1303
3072
  volume: 1,
1304
3073
  muted: !1
1305
3074
  };
1306
3075
  try {
1307
- if (t === "camera" || t === "microphone") {
1308
- const I = t === "camera" ? { video: !0 } : { audio: !0 }, v = (await navigator.mediaDevices.enumerateDevices()).filter(
1309
- (N) => t === "camera" ? N.kind === "videoinput" : N.kind === "audioinput"
3076
+ if (a === "camera" || a === "microphone") {
3077
+ const h = a === "camera" ? { video: !0 } : { audio: !0 }, N = (await navigator.mediaDevices.enumerateDevices()).filter(
3078
+ (H) => a === "camera" ? H.kind === "videoinput" : H.kind === "audioinput"
1310
3079
  );
1311
- v.length > 0 && (o.settings.deviceId = v[0].deviceId);
1312
- } else (t === "screen" || t === "window") && await navigator.mediaDevices.getDisplayMedia({ video: !0 });
1313
- } catch (I) {
1314
- console.warn(`Could not access ${t}:`, I);
3080
+ N.length > 0 && (c.settings.deviceId = N[0].deviceId);
3081
+ } else (a === "screen" || a === "window") && await navigator.mediaDevices.getDisplayMedia({ video: !0 });
3082
+ } catch (h) {
3083
+ console.warn(`Could not access ${a}:`, h);
1315
3084
  }
1316
- h({ sources: [...n.sources, o] });
1317
- const d = {
3085
+ g({ sources: [...i.sources, c] });
3086
+ const u = {
1318
3087
  id: crypto.randomUUID(),
1319
- sourceId: o.id,
3088
+ sourceId: c.id,
1320
3089
  position: { x: 0, y: 0 },
1321
- size: { width: n.layout.canvas.width, height: n.layout.canvas.height },
3090
+ size: { width: i.layout.canvas.width, height: i.layout.canvas.height },
1322
3091
  visible: !0,
1323
3092
  opacity: 1,
1324
- zIndex: n.layout.layers.length
3093
+ zIndex: i.layout.layers.length
1325
3094
  };
1326
- h({
3095
+ g({
1327
3096
  layout: {
1328
- ...n.layout,
1329
- layers: [...n.layout.layers, d]
3097
+ ...i.layout,
3098
+ layers: [...i.layout.layers, u]
1330
3099
  }
1331
- }), U(!1);
1332
- }, w = (t, i) => {
1333
- h({
1334
- sources: n.sources.map((o) => o.id === t ? { ...o, ...i } : o)
3100
+ }), M(!1);
3101
+ }, _ = (a, t) => {
3102
+ g({
3103
+ sources: i.sources.map((c) => c.id === a ? { ...c, ...t } : c)
1335
3104
  });
1336
- }, H = (t) => {
1337
- h({
1338
- sources: n.sources.filter((i) => i.id !== t),
3105
+ }, Y = (a) => {
3106
+ g({
3107
+ sources: i.sources.filter((t) => t.id !== a),
1339
3108
  layout: {
1340
- ...n.layout,
1341
- layers: n.layout.layers.filter((i) => i.sourceId !== t)
3109
+ ...i.layout,
3110
+ layers: i.layout.layers.filter((t) => t.sourceId !== a)
1342
3111
  }
1343
3112
  });
1344
- }, E = (t, i) => {
1345
- h({
3113
+ }, L = (a, t) => {
3114
+ g({
1346
3115
  layout: {
1347
- ...n.layout,
1348
- layers: n.layout.layers.map((o) => o.id === t ? { ...o, ...i } : o)
3116
+ ...i.layout,
3117
+ layers: i.layout.layers.map((c) => c.id === a ? { ...c, ...t } : c)
1349
3118
  }
1350
3119
  });
1351
- }, ie = (t) => {
1352
- const i = n.layout.layers.findIndex((o) => o.id === t);
1353
- if (i < n.layout.layers.length - 1) {
1354
- const o = [...n.layout.layers];
1355
- [o[i], o[i + 1]] = [o[i + 1], o[i]], o.forEach((d, I) => {
1356
- d.zIndex = I;
1357
- }), h({ layout: { ...n.layout, layers: o } });
3120
+ }, ce = (a) => {
3121
+ const t = i.layout.layers.findIndex((c) => c.id === a);
3122
+ if (t < i.layout.layers.length - 1) {
3123
+ const c = [...i.layout.layers];
3124
+ [c[t], c[t + 1]] = [c[t + 1], c[t]], c.forEach((u, h) => {
3125
+ u.zIndex = h;
3126
+ }), g({ layout: { ...i.layout, layers: c } });
1358
3127
  }
1359
- }, Y = (t) => {
1360
- const i = n.layout.layers.findIndex((o) => o.id === t);
1361
- if (i > 0) {
1362
- const o = [...n.layout.layers];
1363
- [o[i], o[i - 1]] = [o[i - 1], o[i]], o.forEach((d, I) => {
1364
- d.zIndex = I;
1365
- }), h({ layout: { ...n.layout, layers: o } });
3128
+ }, de = (a) => {
3129
+ const t = i.layout.layers.findIndex((c) => c.id === a);
3130
+ if (t > 0) {
3131
+ const c = [...i.layout.layers];
3132
+ [c[t], c[t - 1]] = [c[t - 1], c[t]], c.forEach((u, h) => {
3133
+ u.zIndex = h;
3134
+ }), g({ layout: { ...i.layout, layers: c } });
1366
3135
  }
1367
- }, te = () => {
1368
- const t = {
1369
- name: `Scene ${y.length + 1}`,
1370
- canvas: { ...n.layout.canvas },
3136
+ }, Q = () => {
3137
+ const a = {
3138
+ name: `Scene ${P.length + 1}`,
3139
+ canvas: { ...i.layout.canvas },
1371
3140
  layers: []
1372
3141
  };
1373
- A([...y, t]);
1374
- }, Z = (t) => {
1375
- const i = [...y];
1376
- i[X] = n.layout, A(i), ne(t), h({ layout: y[t] });
1377
- }, j = async () => {
3142
+ U([...P, a]);
3143
+ }, ee = (a) => {
3144
+ const t = [...P];
3145
+ t[O] = i.layout, U(t), oe(a), g({ layout: P[a] });
3146
+ }, te = async () => {
1378
3147
  try {
1379
- h({
1380
- destinations: n.destinations.map(
1381
- (t) => t.enabled ? { ...t, status: "connecting" } : t
3148
+ g({
3149
+ destinations: i.destinations.map(
3150
+ (a) => a.enabled ? { ...a, status: "connecting" } : a
1382
3151
  )
1383
- }), await new Promise((t) => setTimeout(t, 2e3)), h({
1384
- destinations: n.destinations.map(
1385
- (t) => t.enabled ? { ...t, status: "live" } : t
3152
+ }), await new Promise((a) => setTimeout(a, 2e3)), g({
3153
+ destinations: i.destinations.map(
3154
+ (a) => a.enabled ? { ...a, status: "live" } : a
1386
3155
  )
1387
- }), C(!0), _.current = Date.now(), D == null || D(), f.current = setInterval(() => {
1388
- const t = {
1389
- duration: (Date.now() - _.current) / 1e3,
1390
- viewers: Math.floor(Math.random() * 100) + b.viewers,
1391
- peakViewers: Math.max(b.peakViewers, b.viewers),
1392
- bitrate: n.settings.video.bitrate + Math.floor(Math.random() * 500 - 250),
1393
- fps: n.settings.video.frameRate - Math.random() * 2,
1394
- droppedFrames: b.droppedFrames + (Math.random() > 0.95 ? 1 : 0),
3156
+ }), k(!0), w.current = Date.now(), f == null || f(), A.current = setInterval(() => {
3157
+ const a = {
3158
+ duration: (Date.now() - w.current) / 1e3,
3159
+ viewers: Math.floor(Math.random() * 100) + S.viewers,
3160
+ peakViewers: Math.max(S.peakViewers, S.viewers),
3161
+ bitrate: i.settings.video.bitrate + Math.floor(Math.random() * 500 - 250),
3162
+ fps: i.settings.video.frameRate - Math.random() * 2,
3163
+ droppedFrames: S.droppedFrames + (Math.random() > 0.95 ? 1 : 0),
1395
3164
  cpuUsage: 15 + Math.random() * 30,
1396
3165
  memoryUsage: 40 + Math.random() * 20
1397
3166
  };
1398
- P(t), F == null || F(t);
3167
+ z(a), I == null || I(a);
1399
3168
  }, 1e3);
1400
- } catch (t) {
1401
- c == null || c(t instanceof Error ? t : new Error("Failed to start stream")), h({
1402
- destinations: n.destinations.map((i) => ({
1403
- ...i,
3169
+ } catch (a) {
3170
+ T == null || T(a instanceof Error ? a : new Error("Failed to start stream")), g({
3171
+ destinations: i.destinations.map((t) => ({
3172
+ ...t,
1404
3173
  status: "error"
1405
3174
  }))
1406
3175
  });
1407
3176
  }
1408
- }, s = () => {
1409
- f.current && clearInterval(f.current), h({
1410
- destinations: n.destinations.map((t) => ({ ...t, status: "idle" }))
1411
- }), C(!1), R == null || R();
1412
- }, r = (t) => {
1413
- const i = Math.floor(t / 3600), o = Math.floor(t % 3600 / 60), d = Math.floor(t % 60);
1414
- return `${i.toString().padStart(2, "0")}:${o.toString().padStart(2, "0")}:${d.toString().padStart(2, "0")}`;
1415
- }, u = (t) => {
1416
- switch (t) {
3177
+ }, Z = () => {
3178
+ A.current && clearInterval(A.current), g({
3179
+ destinations: i.destinations.map((a) => ({ ...a, status: "idle" }))
3180
+ }), k(!1), C == null || C();
3181
+ }, n = (a) => {
3182
+ const t = Math.floor(a / 3600), c = Math.floor(a % 3600 / 60), u = Math.floor(a % 60);
3183
+ return `${t.toString().padStart(2, "0")}:${c.toString().padStart(2, "0")}:${u.toString().padStart(2, "0")}`;
3184
+ }, o = (a) => {
3185
+ switch (a) {
1417
3186
  case "live":
1418
3187
  return "var(--nice-success, #00ff00)";
1419
3188
  case "connecting":
@@ -1424,154 +3193,154 @@ const ue = {
1424
3193
  return "var(--nice-text-secondary, #888888)";
1425
3194
  }
1426
3195
  };
1427
- return /* @__PURE__ */ a("div", { className: `nice-live-streaming ${J}`, children: [
1428
- /* @__PURE__ */ a("header", { className: "streaming__header", children: [
1429
- /* @__PURE__ */ a("div", { className: "header__title", children: [
3196
+ return /* @__PURE__ */ r("div", { className: `nice-live-streaming ${p}`, children: [
3197
+ /* @__PURE__ */ r("header", { className: "streaming__header", children: [
3198
+ /* @__PURE__ */ r("div", { className: "header__title", children: [
1430
3199
  /* @__PURE__ */ e(
1431
3200
  "input",
1432
3201
  {
1433
3202
  type: "text",
1434
- value: n.name,
1435
- onChange: (t) => h({ name: t.target.value }),
3203
+ value: i.name,
3204
+ onChange: (a) => g({ name: a.target.value }),
1436
3205
  className: "stream-name-input"
1437
3206
  }
1438
3207
  ),
1439
- m && /* @__PURE__ */ a("span", { className: "live-badge", children: [
3208
+ y && /* @__PURE__ */ r("span", { className: "live-badge", children: [
1440
3209
  /* @__PURE__ */ e("span", { className: "live-dot" }),
1441
3210
  " LIVE"
1442
3211
  ] })
1443
3212
  ] }),
1444
- /* @__PURE__ */ e("div", { className: "header__stats", children: m && /* @__PURE__ */ a(ae, { children: [
1445
- /* @__PURE__ */ a("span", { className: "stat-item", children: [
3213
+ /* @__PURE__ */ e("div", { className: "header__stats", children: y && /* @__PURE__ */ r(ie, { children: [
3214
+ /* @__PURE__ */ r("span", { className: "stat-item", children: [
1446
3215
  "⏱️ ",
1447
- r(b.duration)
3216
+ n(S.duration)
1448
3217
  ] }),
1449
- /* @__PURE__ */ a("span", { className: "stat-item", children: [
3218
+ /* @__PURE__ */ r("span", { className: "stat-item", children: [
1450
3219
  "👥 ",
1451
- b.viewers
3220
+ S.viewers
1452
3221
  ] }),
1453
- /* @__PURE__ */ a("span", { className: "stat-item", children: [
3222
+ /* @__PURE__ */ r("span", { className: "stat-item", children: [
1454
3223
  "📊 ",
1455
- Math.round(b.bitrate),
3224
+ Math.round(S.bitrate),
1456
3225
  " kbps"
1457
3226
  ] }),
1458
- /* @__PURE__ */ a("span", { className: "stat-item", children: [
3227
+ /* @__PURE__ */ r("span", { className: "stat-item", children: [
1459
3228
  "🎬 ",
1460
- b.fps.toFixed(1),
3229
+ S.fps.toFixed(1),
1461
3230
  " fps"
1462
3231
  ] })
1463
3232
  ] }) }),
1464
- /* @__PURE__ */ e("div", { className: "header__actions", children: m ? /* @__PURE__ */ e("button", { className: "action-button action-button--stop", onClick: s, children: "End Stream" }) : /* @__PURE__ */ e(
3233
+ /* @__PURE__ */ e("div", { className: "header__actions", children: y ? /* @__PURE__ */ e("button", { className: "action-button action-button--stop", onClick: Z, children: "End Stream" }) : /* @__PURE__ */ e(
1465
3234
  "button",
1466
3235
  {
1467
3236
  className: "action-button action-button--go-live",
1468
- onClick: j,
1469
- disabled: n.destinations.filter((t) => t.enabled).length === 0,
3237
+ onClick: te,
3238
+ disabled: i.destinations.filter((a) => a.enabled).length === 0,
1470
3239
  children: "Go Live"
1471
3240
  }
1472
3241
  ) })
1473
3242
  ] }),
1474
- /* @__PURE__ */ a("div", { className: "streaming__main", children: [
1475
- /* @__PURE__ */ a("div", { className: "streaming__preview", children: [
1476
- /* @__PURE__ */ a("div", { className: "scenes-bar", children: [
1477
- y.map((t, i) => /* @__PURE__ */ e(
3243
+ /* @__PURE__ */ r("div", { className: "streaming__main", children: [
3244
+ /* @__PURE__ */ r("div", { className: "streaming__preview", children: [
3245
+ /* @__PURE__ */ r("div", { className: "scenes-bar", children: [
3246
+ P.map((a, t) => /* @__PURE__ */ e(
1478
3247
  "button",
1479
3248
  {
1480
- className: `scene-button ${X === i ? "scene-button--active" : ""}`,
1481
- onClick: () => Z(i),
1482
- children: t.name
3249
+ className: `scene-button ${O === t ? "scene-button--active" : ""}`,
3250
+ onClick: () => ee(t),
3251
+ children: a.name
1483
3252
  },
1484
- i
3253
+ t
1485
3254
  )),
1486
- /* @__PURE__ */ e("button", { className: "scene-button scene-button--add", onClick: te, children: "+" })
3255
+ /* @__PURE__ */ e("button", { className: "scene-button scene-button--add", onClick: Q, children: "+" })
1487
3256
  ] }),
1488
3257
  /* @__PURE__ */ e(
1489
3258
  "div",
1490
3259
  {
1491
- ref: z,
3260
+ ref: se,
1492
3261
  className: "preview-canvas",
1493
3262
  style: {
1494
- aspectRatio: `${n.layout.canvas.width}/${n.layout.canvas.height}`,
1495
- backgroundColor: n.layout.canvas.backgroundColor
3263
+ aspectRatio: `${i.layout.canvas.width}/${i.layout.canvas.height}`,
3264
+ backgroundColor: i.layout.canvas.backgroundColor
1496
3265
  },
1497
- children: n.layout.layers.sort((t, i) => t.zIndex - i.zIndex).map((t) => {
1498
- var o;
1499
- const i = n.sources.find((d) => d.id === t.sourceId);
1500
- return !t.visible || !i ? null : /* @__PURE__ */ e(
3266
+ children: i.layout.layers.sort((a, t) => a.zIndex - t.zIndex).map((a) => {
3267
+ var c;
3268
+ const t = i.sources.find((u) => u.id === a.sourceId);
3269
+ return !a.visible || !t ? null : /* @__PURE__ */ e(
1501
3270
  "div",
1502
3271
  {
1503
- className: `canvas-layer ${k === t.id ? "canvas-layer--selected" : ""}`,
3272
+ className: `canvas-layer ${R === a.id ? "canvas-layer--selected" : ""}`,
1504
3273
  style: {
1505
- left: `${t.position.x / n.layout.canvas.width * 100}%`,
1506
- top: `${t.position.y / n.layout.canvas.height * 100}%`,
1507
- width: `${t.size.width / n.layout.canvas.width * 100}%`,
1508
- height: `${t.size.height / n.layout.canvas.height * 100}%`,
1509
- opacity: t.opacity,
1510
- zIndex: t.zIndex
3274
+ left: `${a.position.x / i.layout.canvas.width * 100}%`,
3275
+ top: `${a.position.y / i.layout.canvas.height * 100}%`,
3276
+ width: `${a.size.width / i.layout.canvas.width * 100}%`,
3277
+ height: `${a.size.height / i.layout.canvas.height * 100}%`,
3278
+ opacity: a.opacity,
3279
+ zIndex: a.zIndex
1511
3280
  },
1512
- onClick: () => L(t.id),
1513
- children: /* @__PURE__ */ a("div", { className: "layer-content", children: [
1514
- /* @__PURE__ */ e("span", { className: "layer-icon", children: ((o = se.find((d) => d.type === i.type)) == null ? void 0 : o.icon) || "📦" }),
1515
- /* @__PURE__ */ e("span", { className: "layer-name", children: i.name })
3281
+ onClick: () => q(a.id),
3282
+ children: /* @__PURE__ */ r("div", { className: "layer-content", children: [
3283
+ /* @__PURE__ */ e("span", { className: "layer-icon", children: ((c = le.find((u) => u.type === t.type)) == null ? void 0 : c.icon) || "📦" }),
3284
+ /* @__PURE__ */ e("span", { className: "layer-name", children: t.name })
1516
3285
  ] })
1517
3286
  },
1518
- t.id
3287
+ a.id
1519
3288
  );
1520
3289
  })
1521
3290
  }
1522
3291
  )
1523
3292
  ] }),
1524
- /* @__PURE__ */ a("aside", { className: "streaming__panel", children: [
1525
- /* @__PURE__ */ e("div", { className: "panel-tabs", children: ["sources", "audio", "destinations", "settings"].map((t) => /* @__PURE__ */ e(
3293
+ /* @__PURE__ */ r("aside", { className: "streaming__panel", children: [
3294
+ /* @__PURE__ */ e("div", { className: "panel-tabs", children: ["sources", "audio", "destinations", "settings"].map((a) => /* @__PURE__ */ e(
1526
3295
  "button",
1527
3296
  {
1528
- className: `panel-tab ${g === t ? "panel-tab--active" : ""}`,
1529
- onClick: () => K(t),
1530
- children: t.charAt(0).toUpperCase() + t.slice(1)
3297
+ className: `panel-tab ${b === a ? "panel-tab--active" : ""}`,
3298
+ onClick: () => E(a),
3299
+ children: a.charAt(0).toUpperCase() + a.slice(1)
1531
3300
  },
1532
- t
3301
+ a
1533
3302
  )) }),
1534
- /* @__PURE__ */ a("div", { className: "panel-content", children: [
1535
- g === "sources" && /* @__PURE__ */ a("div", { className: "sources-panel", children: [
1536
- /* @__PURE__ */ a("div", { className: "panel-header", children: [
3303
+ /* @__PURE__ */ r("div", { className: "panel-content", children: [
3304
+ b === "sources" && /* @__PURE__ */ r("div", { className: "sources-panel", children: [
3305
+ /* @__PURE__ */ r("div", { className: "panel-header", children: [
1537
3306
  /* @__PURE__ */ e("h3", { children: "Sources" }),
1538
3307
  /* @__PURE__ */ e(
1539
3308
  "button",
1540
3309
  {
1541
3310
  className: "add-button",
1542
- onClick: () => U(!0),
1543
- disabled: m,
3311
+ onClick: () => M(!0),
3312
+ disabled: y,
1544
3313
  children: "+ Add"
1545
3314
  }
1546
3315
  )
1547
3316
  ] }),
1548
- /* @__PURE__ */ e("div", { className: "sources-list", children: n.sources.filter((t) => t.type !== "microphone" && t.type !== "system-audio").map((t) => {
1549
- var o;
1550
- const i = n.layout.layers.find((d) => d.sourceId === t.id);
1551
- return /* @__PURE__ */ a(
3317
+ /* @__PURE__ */ e("div", { className: "sources-list", children: i.sources.filter((a) => a.type !== "microphone" && a.type !== "system-audio").map((a) => {
3318
+ var c;
3319
+ const t = i.layout.layers.find((u) => u.sourceId === a.id);
3320
+ return /* @__PURE__ */ r(
1552
3321
  "div",
1553
3322
  {
1554
- className: `source-item ${k === (i == null ? void 0 : i.id) ? "source-item--selected" : ""}`,
1555
- onClick: () => i && L(i.id),
3323
+ className: `source-item ${R === (t == null ? void 0 : t.id) ? "source-item--selected" : ""}`,
3324
+ onClick: () => t && q(t.id),
1556
3325
  children: [
1557
- /* @__PURE__ */ e("span", { className: "source-icon", children: (o = se.find((d) => d.type === t.type)) == null ? void 0 : o.icon }),
1558
- /* @__PURE__ */ e("span", { className: "source-name", children: t.name }),
1559
- /* @__PURE__ */ a("div", { className: "source-controls", children: [
3326
+ /* @__PURE__ */ e("span", { className: "source-icon", children: (c = le.find((u) => u.type === a.type)) == null ? void 0 : c.icon }),
3327
+ /* @__PURE__ */ e("span", { className: "source-name", children: a.name }),
3328
+ /* @__PURE__ */ r("div", { className: "source-controls", children: [
1560
3329
  /* @__PURE__ */ e(
1561
3330
  "button",
1562
3331
  {
1563
- className: i != null && i.visible ? "" : "inactive",
1564
- onClick: (d) => {
1565
- d.stopPropagation(), i && E(i.id, { visible: !i.visible });
3332
+ className: t != null && t.visible ? "" : "inactive",
3333
+ onClick: (u) => {
3334
+ u.stopPropagation(), t && L(t.id, { visible: !t.visible });
1566
3335
  },
1567
- children: i != null && i.visible ? "👁️" : "👁️‍🗨️"
3336
+ children: t != null && t.visible ? "👁️" : "👁️‍🗨️"
1568
3337
  }
1569
3338
  ),
1570
3339
  /* @__PURE__ */ e(
1571
3340
  "button",
1572
3341
  {
1573
- onClick: (d) => {
1574
- d.stopPropagation(), i && ie(i.id);
3342
+ onClick: (u) => {
3343
+ u.stopPropagation(), t && ce(t.id);
1575
3344
  },
1576
3345
  children: "⬆️"
1577
3346
  }
@@ -1579,8 +3348,8 @@ const ue = {
1579
3348
  /* @__PURE__ */ e(
1580
3349
  "button",
1581
3350
  {
1582
- onClick: (d) => {
1583
- d.stopPropagation(), i && Y(i.id);
3351
+ onClick: (u) => {
3352
+ u.stopPropagation(), t && de(t.id);
1584
3353
  },
1585
3354
  children: "⬇️"
1586
3355
  }
@@ -1588,77 +3357,77 @@ const ue = {
1588
3357
  /* @__PURE__ */ e(
1589
3358
  "button",
1590
3359
  {
1591
- onClick: (d) => {
1592
- d.stopPropagation(), H(t.id);
3360
+ onClick: (u) => {
3361
+ u.stopPropagation(), Y(a.id);
1593
3362
  },
1594
- disabled: m,
3363
+ disabled: y,
1595
3364
  children: "🗑️"
1596
3365
  }
1597
3366
  )
1598
3367
  ] })
1599
3368
  ]
1600
3369
  },
1601
- t.id
3370
+ a.id
1602
3371
  );
1603
3372
  }) }),
1604
- k && /* @__PURE__ */ a("div", { className: "layer-properties", children: [
3373
+ R && /* @__PURE__ */ r("div", { className: "layer-properties", children: [
1605
3374
  /* @__PURE__ */ e("h4", { children: "Properties" }),
1606
3375
  (() => {
1607
- const t = n.layout.layers.find((i) => i.id === k);
1608
- return t ? /* @__PURE__ */ a(ae, { children: [
1609
- /* @__PURE__ */ a("label", { children: [
3376
+ const a = i.layout.layers.find((t) => t.id === R);
3377
+ return a ? /* @__PURE__ */ r(ie, { children: [
3378
+ /* @__PURE__ */ r("label", { children: [
1610
3379
  "X Position",
1611
3380
  /* @__PURE__ */ e(
1612
3381
  "input",
1613
3382
  {
1614
3383
  type: "number",
1615
- value: t.position.x,
1616
- onChange: (i) => E(t.id, {
1617
- position: { ...t.position, x: parseInt(i.target.value) || 0 }
3384
+ value: a.position.x,
3385
+ onChange: (t) => L(a.id, {
3386
+ position: { ...a.position, x: parseInt(t.target.value) || 0 }
1618
3387
  })
1619
3388
  }
1620
3389
  )
1621
3390
  ] }),
1622
- /* @__PURE__ */ a("label", { children: [
3391
+ /* @__PURE__ */ r("label", { children: [
1623
3392
  "Y Position",
1624
3393
  /* @__PURE__ */ e(
1625
3394
  "input",
1626
3395
  {
1627
3396
  type: "number",
1628
- value: t.position.y,
1629
- onChange: (i) => E(t.id, {
1630
- position: { ...t.position, y: parseInt(i.target.value) || 0 }
3397
+ value: a.position.y,
3398
+ onChange: (t) => L(a.id, {
3399
+ position: { ...a.position, y: parseInt(t.target.value) || 0 }
1631
3400
  })
1632
3401
  }
1633
3402
  )
1634
3403
  ] }),
1635
- /* @__PURE__ */ a("label", { children: [
3404
+ /* @__PURE__ */ r("label", { children: [
1636
3405
  "Width",
1637
3406
  /* @__PURE__ */ e(
1638
3407
  "input",
1639
3408
  {
1640
3409
  type: "number",
1641
- value: t.size.width,
1642
- onChange: (i) => E(t.id, {
1643
- size: { ...t.size, width: parseInt(i.target.value) || 100 }
3410
+ value: a.size.width,
3411
+ onChange: (t) => L(a.id, {
3412
+ size: { ...a.size, width: parseInt(t.target.value) || 100 }
1644
3413
  })
1645
3414
  }
1646
3415
  )
1647
3416
  ] }),
1648
- /* @__PURE__ */ a("label", { children: [
3417
+ /* @__PURE__ */ r("label", { children: [
1649
3418
  "Height",
1650
3419
  /* @__PURE__ */ e(
1651
3420
  "input",
1652
3421
  {
1653
3422
  type: "number",
1654
- value: t.size.height,
1655
- onChange: (i) => E(t.id, {
1656
- size: { ...t.size, height: parseInt(i.target.value) || 100 }
3423
+ value: a.size.height,
3424
+ onChange: (t) => L(a.id, {
3425
+ size: { ...a.size, height: parseInt(t.target.value) || 100 }
1657
3426
  })
1658
3427
  }
1659
3428
  )
1660
3429
  ] }),
1661
- /* @__PURE__ */ a("label", { children: [
3430
+ /* @__PURE__ */ r("label", { children: [
1662
3431
  "Opacity",
1663
3432
  /* @__PURE__ */ e(
1664
3433
  "input",
@@ -1667,9 +3436,9 @@ const ue = {
1667
3436
  min: "0",
1668
3437
  max: "1",
1669
3438
  step: "0.1",
1670
- value: t.opacity,
1671
- onChange: (i) => E(t.id, {
1672
- opacity: parseFloat(i.target.value)
3439
+ value: a.opacity,
3440
+ onChange: (t) => L(a.id, {
3441
+ opacity: parseFloat(t.target.value)
1673
3442
  })
1674
3443
  }
1675
3444
  )
@@ -1678,40 +3447,40 @@ const ue = {
1678
3447
  })()
1679
3448
  ] })
1680
3449
  ] }),
1681
- g === "audio" && /* @__PURE__ */ a("div", { className: "audio-panel", children: [
1682
- /* @__PURE__ */ a("div", { className: "panel-header", children: [
3450
+ b === "audio" && /* @__PURE__ */ r("div", { className: "audio-panel", children: [
3451
+ /* @__PURE__ */ r("div", { className: "panel-header", children: [
1683
3452
  /* @__PURE__ */ e("h3", { children: "Audio Mixer" }),
1684
3453
  /* @__PURE__ */ e(
1685
3454
  "button",
1686
3455
  {
1687
3456
  className: "add-button",
1688
3457
  onClick: () => {
1689
- U(!0);
3458
+ M(!0);
1690
3459
  },
1691
- disabled: m,
3460
+ disabled: y,
1692
3461
  children: "+ Add"
1693
3462
  }
1694
3463
  )
1695
3464
  ] }),
1696
- /* @__PURE__ */ a("div", { className: "audio-sources", children: [
1697
- n.sources.filter(
1698
- (t) => t.type === "microphone" || t.type === "system-audio" || t.type === "video"
1699
- ).map((t) => {
1700
- var i;
1701
- return /* @__PURE__ */ a("div", { className: "audio-source", children: [
1702
- /* @__PURE__ */ a("div", { className: "audio-header", children: [
1703
- /* @__PURE__ */ e("span", { className: "audio-icon", children: (i = se.find((o) => o.type === t.type)) == null ? void 0 : i.icon }),
1704
- /* @__PURE__ */ e("span", { className: "audio-name", children: t.name }),
3465
+ /* @__PURE__ */ r("div", { className: "audio-sources", children: [
3466
+ i.sources.filter(
3467
+ (a) => a.type === "microphone" || a.type === "system-audio" || a.type === "video"
3468
+ ).map((a) => {
3469
+ var t;
3470
+ return /* @__PURE__ */ r("div", { className: "audio-source", children: [
3471
+ /* @__PURE__ */ r("div", { className: "audio-header", children: [
3472
+ /* @__PURE__ */ e("span", { className: "audio-icon", children: (t = le.find((c) => c.type === a.type)) == null ? void 0 : t.icon }),
3473
+ /* @__PURE__ */ e("span", { className: "audio-name", children: a.name }),
1705
3474
  /* @__PURE__ */ e(
1706
3475
  "button",
1707
3476
  {
1708
- className: t.muted ? "muted" : "",
1709
- onClick: () => w(t.id, { muted: !t.muted }),
1710
- children: t.muted ? "🔇" : "🔊"
3477
+ className: a.muted ? "muted" : "",
3478
+ onClick: () => _(a.id, { muted: !a.muted }),
3479
+ children: a.muted ? "🔇" : "🔊"
1711
3480
  }
1712
3481
  )
1713
3482
  ] }),
1714
- /* @__PURE__ */ a("div", { className: "audio-slider", children: [
3483
+ /* @__PURE__ */ r("div", { className: "audio-slider", children: [
1715
3484
  /* @__PURE__ */ e(
1716
3485
  "input",
1717
3486
  {
@@ -1719,13 +3488,13 @@ const ue = {
1719
3488
  min: "0",
1720
3489
  max: "1",
1721
3490
  step: "0.01",
1722
- value: t.volume ?? 1,
1723
- onChange: (o) => w(t.id, { volume: parseFloat(o.target.value) }),
1724
- disabled: t.muted
3491
+ value: a.volume ?? 1,
3492
+ onChange: (c) => _(a.id, { volume: parseFloat(c.target.value) }),
3493
+ disabled: a.muted
1725
3494
  }
1726
3495
  ),
1727
- /* @__PURE__ */ a("span", { className: "volume-value", children: [
1728
- Math.round((t.volume ?? 1) * 100),
3496
+ /* @__PURE__ */ r("span", { className: "volume-value", children: [
3497
+ Math.round((a.volume ?? 1) * 100),
1729
3498
  "%"
1730
3499
  ] })
1731
3500
  ] }),
@@ -1733,80 +3502,80 @@ const ue = {
1733
3502
  "div",
1734
3503
  {
1735
3504
  className: "meter-fill",
1736
- style: { width: `${(t.volume ?? 1) * 70 + Math.random() * 30}%` }
3505
+ style: { width: `${(a.volume ?? 1) * 70 + Math.random() * 30}%` }
1737
3506
  }
1738
3507
  ) })
1739
- ] }, t.id);
3508
+ ] }, a.id);
1740
3509
  }),
1741
- n.sources.filter(
1742
- (t) => t.type === "microphone" || t.type === "system-audio"
3510
+ i.sources.filter(
3511
+ (a) => a.type === "microphone" || a.type === "system-audio"
1743
3512
  ).length === 0 && /* @__PURE__ */ e("p", { className: "empty-message", children: "No audio sources added" })
1744
3513
  ] })
1745
3514
  ] }),
1746
- g === "destinations" && /* @__PURE__ */ a("div", { className: "destinations-panel", children: [
1747
- /* @__PURE__ */ a("div", { className: "panel-header", children: [
3515
+ b === "destinations" && /* @__PURE__ */ r("div", { className: "destinations-panel", children: [
3516
+ /* @__PURE__ */ r("div", { className: "panel-header", children: [
1748
3517
  /* @__PURE__ */ e("h3", { children: "Destinations" }),
1749
3518
  /* @__PURE__ */ e(
1750
3519
  "button",
1751
3520
  {
1752
3521
  className: "add-button",
1753
- onClick: () => V(!0),
1754
- disabled: m,
3522
+ onClick: () => K(!0),
3523
+ disabled: y,
1755
3524
  children: "+ Add"
1756
3525
  }
1757
3526
  )
1758
3527
  ] }),
1759
- /* @__PURE__ */ a("div", { className: "destinations-list", children: [
1760
- n.destinations.map((t) => {
1761
- var i;
1762
- return /* @__PURE__ */ a("div", { className: "destination-item", children: [
1763
- /* @__PURE__ */ a("div", { className: "destination-header", children: [
3528
+ /* @__PURE__ */ r("div", { className: "destinations-list", children: [
3529
+ i.destinations.map((a) => {
3530
+ var t;
3531
+ return /* @__PURE__ */ r("div", { className: "destination-item", children: [
3532
+ /* @__PURE__ */ r("div", { className: "destination-header", children: [
1764
3533
  /* @__PURE__ */ e(
1765
3534
  "span",
1766
3535
  {
1767
3536
  className: "status-indicator",
1768
- style: { backgroundColor: u(t.status) }
3537
+ style: { backgroundColor: o(a.status) }
1769
3538
  }
1770
3539
  ),
1771
- /* @__PURE__ */ e("span", { className: "destination-icon", children: (i = oe.find((o) => o.platform === t.platform)) == null ? void 0 : i.icon }),
1772
- /* @__PURE__ */ e("span", { className: "destination-name", children: t.name }),
1773
- /* @__PURE__ */ a("label", { className: "toggle", children: [
3540
+ /* @__PURE__ */ e("span", { className: "destination-icon", children: (t = fe.find((c) => c.platform === a.platform)) == null ? void 0 : t.icon }),
3541
+ /* @__PURE__ */ e("span", { className: "destination-name", children: a.name }),
3542
+ /* @__PURE__ */ r("label", { className: "toggle", children: [
1774
3543
  /* @__PURE__ */ e(
1775
3544
  "input",
1776
3545
  {
1777
3546
  type: "checkbox",
1778
- checked: t.enabled,
1779
- onChange: (o) => G(t.id, { enabled: o.target.checked }),
1780
- disabled: m
3547
+ checked: a.enabled,
3548
+ onChange: (c) => X(a.id, { enabled: c.target.checked }),
3549
+ disabled: y
1781
3550
  }
1782
3551
  ),
1783
3552
  /* @__PURE__ */ e("span", { className: "toggle-slider" })
1784
3553
  ] })
1785
3554
  ] }),
1786
- /* @__PURE__ */ a("div", { className: "destination-config", children: [
1787
- /* @__PURE__ */ a("label", { children: [
3555
+ /* @__PURE__ */ r("div", { className: "destination-config", children: [
3556
+ /* @__PURE__ */ r("label", { children: [
1788
3557
  "Server URL",
1789
3558
  /* @__PURE__ */ e(
1790
3559
  "input",
1791
3560
  {
1792
3561
  type: "text",
1793
- value: t.url,
1794
- onChange: (o) => G(t.id, { url: o.target.value }),
3562
+ value: a.url,
3563
+ onChange: (c) => X(a.id, { url: c.target.value }),
1795
3564
  placeholder: "rtmp://...",
1796
- disabled: m
3565
+ disabled: y
1797
3566
  }
1798
3567
  )
1799
3568
  ] }),
1800
- /* @__PURE__ */ a("label", { children: [
3569
+ /* @__PURE__ */ r("label", { children: [
1801
3570
  "Stream Key",
1802
3571
  /* @__PURE__ */ e(
1803
3572
  "input",
1804
3573
  {
1805
3574
  type: "password",
1806
- value: t.streamKey || "",
1807
- onChange: (o) => G(t.id, { streamKey: o.target.value }),
3575
+ value: a.streamKey || "",
3576
+ onChange: (c) => X(a.id, { streamKey: c.target.value }),
1808
3577
  placeholder: "Enter stream key",
1809
- disabled: m
3578
+ disabled: y
1810
3579
  }
1811
3580
  )
1812
3581
  ] })
@@ -1815,39 +3584,39 @@ const ue = {
1815
3584
  "button",
1816
3585
  {
1817
3586
  className: "remove-button",
1818
- onClick: () => O(t.id),
1819
- disabled: m,
3587
+ onClick: () => G(a.id),
3588
+ disabled: y,
1820
3589
  children: "Remove"
1821
3590
  }
1822
3591
  )
1823
- ] }, t.id);
3592
+ ] }, a.id);
1824
3593
  }),
1825
- n.destinations.length === 0 && /* @__PURE__ */ e("p", { className: "empty-message", children: "No destinations configured" })
3594
+ i.destinations.length === 0 && /* @__PURE__ */ e("p", { className: "empty-message", children: "No destinations configured" })
1826
3595
  ] })
1827
3596
  ] }),
1828
- g === "settings" && /* @__PURE__ */ a("div", { className: "settings-panel", children: [
1829
- /* @__PURE__ */ a("div", { className: "setting-section", children: [
3597
+ b === "settings" && /* @__PURE__ */ r("div", { className: "settings-panel", children: [
3598
+ /* @__PURE__ */ r("div", { className: "setting-section", children: [
1830
3599
  /* @__PURE__ */ e("h4", { children: "Video" }),
1831
- /* @__PURE__ */ a("label", { children: [
3600
+ /* @__PURE__ */ r("label", { children: [
1832
3601
  "Resolution",
1833
- /* @__PURE__ */ a(
3602
+ /* @__PURE__ */ r(
1834
3603
  "select",
1835
3604
  {
1836
- value: `${n.settings.video.resolution.width}x${n.settings.video.resolution.height}`,
1837
- onChange: (t) => {
1838
- const [i, o] = t.target.value.split("x").map(Number);
1839
- h({
3605
+ value: `${i.settings.video.resolution.width}x${i.settings.video.resolution.height}`,
3606
+ onChange: (a) => {
3607
+ const [t, c] = a.target.value.split("x").map(Number);
3608
+ g({
1840
3609
  settings: {
1841
- ...n.settings,
1842
- video: { ...n.settings.video, resolution: { width: i, height: o } }
3610
+ ...i.settings,
3611
+ video: { ...i.settings.video, resolution: { width: t, height: c } }
1843
3612
  },
1844
3613
  layout: {
1845
- ...n.layout,
1846
- canvas: { ...n.layout.canvas, width: i, height: o }
3614
+ ...i.layout,
3615
+ canvas: { ...i.layout.canvas, width: t, height: c }
1847
3616
  }
1848
3617
  });
1849
3618
  },
1850
- disabled: m,
3619
+ disabled: y,
1851
3620
  children: [
1852
3621
  /* @__PURE__ */ e("option", { value: "1920x1080", children: "1080p (1920x1080)" }),
1853
3622
  /* @__PURE__ */ e("option", { value: "1280x720", children: "720p (1280x720)" }),
@@ -1856,22 +3625,22 @@ const ue = {
1856
3625
  }
1857
3626
  )
1858
3627
  ] }),
1859
- /* @__PURE__ */ a("label", { children: [
3628
+ /* @__PURE__ */ r("label", { children: [
1860
3629
  "Frame Rate",
1861
- /* @__PURE__ */ a(
3630
+ /* @__PURE__ */ r(
1862
3631
  "select",
1863
3632
  {
1864
- value: n.settings.video.frameRate,
1865
- onChange: (t) => h({
3633
+ value: i.settings.video.frameRate,
3634
+ onChange: (a) => g({
1866
3635
  settings: {
1867
- ...n.settings,
3636
+ ...i.settings,
1868
3637
  video: {
1869
- ...n.settings.video,
1870
- frameRate: parseInt(t.target.value)
3638
+ ...i.settings.video,
3639
+ frameRate: parseInt(a.target.value)
1871
3640
  }
1872
3641
  }
1873
3642
  }),
1874
- disabled: m,
3643
+ disabled: y,
1875
3644
  children: [
1876
3645
  /* @__PURE__ */ e("option", { value: "24", children: "24 fps" }),
1877
3646
  /* @__PURE__ */ e("option", { value: "30", children: "30 fps" }),
@@ -1880,69 +3649,69 @@ const ue = {
1880
3649
  }
1881
3650
  )
1882
3651
  ] }),
1883
- /* @__PURE__ */ a("label", { children: [
3652
+ /* @__PURE__ */ r("label", { children: [
1884
3653
  "Bitrate (kbps)",
1885
3654
  /* @__PURE__ */ e(
1886
3655
  "input",
1887
3656
  {
1888
3657
  type: "number",
1889
- value: n.settings.video.bitrate,
1890
- onChange: (t) => h({
3658
+ value: i.settings.video.bitrate,
3659
+ onChange: (a) => g({
1891
3660
  settings: {
1892
- ...n.settings,
3661
+ ...i.settings,
1893
3662
  video: {
1894
- ...n.settings.video,
1895
- bitrate: parseInt(t.target.value) || 6e3
3663
+ ...i.settings.video,
3664
+ bitrate: parseInt(a.target.value) || 6e3
1896
3665
  }
1897
3666
  }
1898
3667
  }),
1899
3668
  min: "1000",
1900
3669
  max: "50000",
1901
- disabled: m
3670
+ disabled: y
1902
3671
  }
1903
3672
  )
1904
3673
  ] }),
1905
- /* @__PURE__ */ a("label", { children: [
3674
+ /* @__PURE__ */ r("label", { children: [
1906
3675
  "Keyframe Interval (sec)",
1907
3676
  /* @__PURE__ */ e(
1908
3677
  "input",
1909
3678
  {
1910
3679
  type: "number",
1911
- value: n.settings.video.keyframe,
1912
- onChange: (t) => h({
3680
+ value: i.settings.video.keyframe,
3681
+ onChange: (a) => g({
1913
3682
  settings: {
1914
- ...n.settings,
3683
+ ...i.settings,
1915
3684
  video: {
1916
- ...n.settings.video,
1917
- keyframe: parseInt(t.target.value) || 2
3685
+ ...i.settings.video,
3686
+ keyframe: parseInt(a.target.value) || 2
1918
3687
  }
1919
3688
  }
1920
3689
  }),
1921
3690
  min: "1",
1922
3691
  max: "10",
1923
- disabled: m
3692
+ disabled: y
1924
3693
  }
1925
3694
  )
1926
3695
  ] })
1927
3696
  ] }),
1928
- /* @__PURE__ */ a("div", { className: "setting-section", children: [
3697
+ /* @__PURE__ */ r("div", { className: "setting-section", children: [
1929
3698
  /* @__PURE__ */ e("h4", { children: "Audio" }),
1930
- /* @__PURE__ */ a("label", { children: [
3699
+ /* @__PURE__ */ r("label", { children: [
1931
3700
  "Sample Rate",
1932
- /* @__PURE__ */ a(
3701
+ /* @__PURE__ */ r(
1933
3702
  "select",
1934
3703
  {
1935
- value: n.settings.audio.sampleRate,
1936
- onChange: (t) => h({
3704
+ value: i.settings.audio.sampleRate,
3705
+ onChange: (a) => g({
1937
3706
  settings: {
1938
- ...n.settings,
3707
+ ...i.settings,
1939
3708
  audio: {
1940
- ...n.settings.audio,
1941
- sampleRate: parseInt(t.target.value)
3709
+ ...i.settings.audio,
3710
+ sampleRate: parseInt(a.target.value)
1942
3711
  }
1943
3712
  }
1944
3713
  }),
1945
- disabled: m,
3714
+ disabled: y,
1946
3715
  children: [
1947
3716
  /* @__PURE__ */ e("option", { value: "44100", children: "44.1 kHz" }),
1948
3717
  /* @__PURE__ */ e("option", { value: "48000", children: "48 kHz" })
@@ -1950,19 +3719,19 @@ const ue = {
1950
3719
  }
1951
3720
  )
1952
3721
  ] }),
1953
- /* @__PURE__ */ a("label", { children: [
3722
+ /* @__PURE__ */ r("label", { children: [
1954
3723
  "Audio Bitrate (kbps)",
1955
- /* @__PURE__ */ a(
3724
+ /* @__PURE__ */ r(
1956
3725
  "select",
1957
3726
  {
1958
- value: n.settings.audio.bitrate,
1959
- onChange: (t) => h({
3727
+ value: i.settings.audio.bitrate,
3728
+ onChange: (a) => g({
1960
3729
  settings: {
1961
- ...n.settings,
1962
- audio: { ...n.settings.audio, bitrate: parseInt(t.target.value) }
3730
+ ...i.settings,
3731
+ audio: { ...i.settings.audio, bitrate: parseInt(a.target.value) }
1963
3732
  }
1964
3733
  }),
1965
- disabled: m,
3734
+ disabled: y,
1966
3735
  children: [
1967
3736
  /* @__PURE__ */ e("option", { value: "96", children: "96 kbps" }),
1968
3737
  /* @__PURE__ */ e("option", { value: "128", children: "128 kbps" }),
@@ -1977,70 +3746,70 @@ const ue = {
1977
3746
  ] })
1978
3747
  ] })
1979
3748
  ] }),
1980
- m && /* @__PURE__ */ e("footer", { className: "streaming__footer", children: /* @__PURE__ */ a("div", { className: "footer-stats", children: [
1981
- /* @__PURE__ */ a("span", { className: "stat", children: [
3749
+ y && /* @__PURE__ */ e("footer", { className: "streaming__footer", children: /* @__PURE__ */ r("div", { className: "footer-stats", children: [
3750
+ /* @__PURE__ */ r("span", { className: "stat", children: [
1982
3751
  /* @__PURE__ */ e("label", { children: "CPU" }),
1983
- /* @__PURE__ */ a("span", { className: "value", children: [
1984
- b.cpuUsage.toFixed(1),
3752
+ /* @__PURE__ */ r("span", { className: "value", children: [
3753
+ S.cpuUsage.toFixed(1),
1985
3754
  "%"
1986
3755
  ] })
1987
3756
  ] }),
1988
- /* @__PURE__ */ a("span", { className: "stat", children: [
3757
+ /* @__PURE__ */ r("span", { className: "stat", children: [
1989
3758
  /* @__PURE__ */ e("label", { children: "Memory" }),
1990
- /* @__PURE__ */ a("span", { className: "value", children: [
1991
- b.memoryUsage.toFixed(1),
3759
+ /* @__PURE__ */ r("span", { className: "value", children: [
3760
+ S.memoryUsage.toFixed(1),
1992
3761
  "%"
1993
3762
  ] })
1994
3763
  ] }),
1995
- /* @__PURE__ */ a("span", { className: "stat", children: [
3764
+ /* @__PURE__ */ r("span", { className: "stat", children: [
1996
3765
  /* @__PURE__ */ e("label", { children: "Dropped" }),
1997
- /* @__PURE__ */ e("span", { className: "value", children: b.droppedFrames })
3766
+ /* @__PURE__ */ e("span", { className: "value", children: S.droppedFrames })
1998
3767
  ] }),
1999
- /* @__PURE__ */ a("span", { className: "stat", children: [
3768
+ /* @__PURE__ */ r("span", { className: "stat", children: [
2000
3769
  /* @__PURE__ */ e("label", { children: "Peak Viewers" }),
2001
- /* @__PURE__ */ e("span", { className: "value", children: b.peakViewers })
3770
+ /* @__PURE__ */ e("span", { className: "value", children: S.peakViewers })
2002
3771
  ] })
2003
3772
  ] }) }),
2004
- x && /* @__PURE__ */ e("div", { className: "modal-overlay", children: /* @__PURE__ */ a("div", { className: "modal", children: [
2005
- /* @__PURE__ */ a("div", { className: "modal-header", children: [
3773
+ W && /* @__PURE__ */ e("div", { className: "modal-overlay", children: /* @__PURE__ */ r("div", { className: "modal", children: [
3774
+ /* @__PURE__ */ r("div", { className: "modal-header", children: [
2006
3775
  /* @__PURE__ */ e("h3", { children: "Add Source" }),
2007
- /* @__PURE__ */ e("button", { className: "close-button", onClick: () => U(!1), children: "×" })
3776
+ /* @__PURE__ */ e("button", { className: "close-button", onClick: () => M(!1), children: "×" })
2008
3777
  ] }),
2009
- /* @__PURE__ */ e("div", { className: "modal-content", children: /* @__PURE__ */ e("div", { className: "source-type-grid", children: se.map((t) => /* @__PURE__ */ a(
3778
+ /* @__PURE__ */ e("div", { className: "modal-content", children: /* @__PURE__ */ e("div", { className: "source-type-grid", children: le.map((a) => /* @__PURE__ */ r(
2010
3779
  "button",
2011
3780
  {
2012
3781
  className: "source-type-button",
2013
- onClick: () => ee(t.type),
3782
+ onClick: () => re(a.type),
2014
3783
  children: [
2015
- /* @__PURE__ */ e("span", { className: "icon", children: t.icon }),
2016
- /* @__PURE__ */ e("span", { className: "name", children: t.name })
3784
+ /* @__PURE__ */ e("span", { className: "icon", children: a.icon }),
3785
+ /* @__PURE__ */ e("span", { className: "name", children: a.name })
2017
3786
  ]
2018
3787
  },
2019
- t.type
3788
+ a.type
2020
3789
  )) }) })
2021
3790
  ] }) }),
2022
- q && /* @__PURE__ */ e("div", { className: "modal-overlay", children: /* @__PURE__ */ a("div", { className: "modal", children: [
2023
- /* @__PURE__ */ a("div", { className: "modal-header", children: [
3791
+ J && /* @__PURE__ */ e("div", { className: "modal-overlay", children: /* @__PURE__ */ r("div", { className: "modal", children: [
3792
+ /* @__PURE__ */ r("div", { className: "modal-header", children: [
2024
3793
  /* @__PURE__ */ e("h3", { children: "Add Destination" }),
2025
- /* @__PURE__ */ e("button", { className: "close-button", onClick: () => V(!1), children: "×" })
3794
+ /* @__PURE__ */ e("button", { className: "close-button", onClick: () => K(!1), children: "×" })
2026
3795
  ] }),
2027
- /* @__PURE__ */ e("div", { className: "modal-content", children: /* @__PURE__ */ e("div", { className: "platform-grid", children: oe.map((t) => /* @__PURE__ */ a(
3796
+ /* @__PURE__ */ e("div", { className: "modal-content", children: /* @__PURE__ */ e("div", { className: "platform-grid", children: fe.map((a) => /* @__PURE__ */ r(
2028
3797
  "button",
2029
3798
  {
2030
3799
  className: "platform-button",
2031
- onClick: () => W(t.platform),
3800
+ onClick: () => B(a.platform),
2032
3801
  children: [
2033
- /* @__PURE__ */ e("span", { className: "icon", children: t.icon }),
2034
- /* @__PURE__ */ e("span", { className: "name", children: t.name })
3802
+ /* @__PURE__ */ e("span", { className: "icon", children: a.icon }),
3803
+ /* @__PURE__ */ e("span", { className: "name", children: a.name })
2035
3804
  ]
2036
3805
  },
2037
- t.platform
3806
+ a.platform
2038
3807
  )) }) })
2039
3808
  ] }) })
2040
3809
  ] });
2041
3810
  };
2042
3811
  export {
2043
- ye as NiceLiveStreaming,
2044
- Ne as NiceScreenRecorder,
2045
- be as NiceVideoEditor
3812
+ Qe as NiceLiveStreaming,
3813
+ Ye as NiceScreenRecorder,
3814
+ Xe as NiceVideoEditor
2046
3815
  };