@nice2dev/ui-video 1.2.1 → 1.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -1,9 +1,9 @@
1
- import { jsxs as t, jsx as e, Fragment as oe } from "react/jsx-runtime";
2
- import { NiceAppShell as pe } from "@nice2dev/ui";
3
- import { useNiceTranslation as me, NiceIcon as m, NiceTutorialButton as _e, resolveTutorial as ge, createId as $ } from "@nice2dev/ui-core";
4
- import { useState as g, useRef as M, useEffect as le, useCallback as ue } from "react";
5
- const fe = {
6
- id: $(),
1
+ import { jsxs as t, jsx as e, Fragment as ce } from "react/jsx-runtime";
2
+ import { NiceAppShell as _e } from "@nice2dev/ui";
3
+ import { useNiceTranslation as ue, NiceIcon as m, clickOnActivationKey as me, NiceTutorialButton as ge, resolveTutorial as fe, createId as M } from "@nice2dev/ui-core";
4
+ import { useState as f, useRef as I, useEffect as le, useCallback as ve } from "react";
5
+ const be = {
6
+ id: M(),
7
7
  name: "Untitled Project",
8
8
  resolution: { width: 1920, height: 1080, label: "1080p" },
9
9
  frameRate: 30,
@@ -35,7 +35,7 @@ const fe = {
35
35
  audio: { sampleRate: 48e3, channels: 2, bitrate: 320 },
36
36
  video: { codec: "h264", bitrate: 8e3, profile: "high" }
37
37
  }
38
- }, be = [
38
+ }, ye = [
39
39
  { type: "blur", name: "Blur", icon: "droplet" },
40
40
  { type: "brightness", name: "Brightness", icon: "sun" },
41
41
  { type: "contrast", name: "Contrast", icon: "moon" },
@@ -45,14 +45,14 @@ const fe = {
45
45
  { type: "chromaKey", name: "Chroma Key", icon: "layers" },
46
46
  { type: "crop", name: "Crop", icon: "crop" },
47
47
  { type: "zoom", name: "Zoom", icon: "search" }
48
- ], ye = [
48
+ ], Ne = [
49
49
  { type: "fade", name: "Fade" },
50
50
  { type: "dissolve", name: "Dissolve" },
51
51
  { type: "wipe", name: "Wipe" },
52
52
  { type: "slide", name: "Slide" },
53
53
  { type: "zoom", name: "Zoom" },
54
54
  { type: "push", name: "Push" }
55
- ], Ne = [
55
+ ], ke = [
56
56
  {
57
57
  target: ".nice-video-editor",
58
58
  titleKey: "tutorial.videoEditorPro.intro.title",
@@ -61,73 +61,73 @@ const fe = {
61
61
  content: "Add media to the timeline, arrange and trim clips, apply effects and transitions, then configure and run the export.",
62
62
  placement: "auto"
63
63
  }
64
- ], ze = ({
65
- project: E,
64
+ ], Ee = ({
65
+ project: $,
66
66
  onProjectChange: R,
67
67
  onExport: F,
68
68
  onAssetUpload: L,
69
69
  className: O = "",
70
- tutorial: I
70
+ tutorial: T
71
71
  }) => {
72
- const { t: b } = me(), [r, s] = g(E || fe), [A, y] = g(
72
+ const { t: u } = ue(), [n, s] = f($ || be), [A, y] = f(
73
73
  "timeline"
74
- ), [H, v] = g(null), [k, N] = g(null), [D, w] = g(0), [B, K] = g(!1), [C, G] = g(1), [W, z] = g(!0), [T, U] = g(null), ie = M(null), te = M(null), x = M(null);
74
+ ), [q, h] = f(null), [k, N] = f(null), [D, w] = f(0), [B, K] = f(!1), [S, G] = f(1), [W, z] = f(!0), [E, U] = f(null), ie = I(null), te = I(null), x = I(null);
75
75
  le(() => {
76
- E && s(E);
77
- }, [E]), le(() => () => {
76
+ $ && s($);
77
+ }, [$]), le(() => () => {
78
78
  x.current && clearInterval(x.current);
79
79
  }, []);
80
- const f = ue(
81
- (a) => {
82
- const o = { ...r, ...a };
83
- s(o), R == null || R(o);
80
+ const b = ve(
81
+ (r) => {
82
+ const c = { ...n, ...r };
83
+ s(c), R == null || R(c);
84
84
  },
85
- [r, R]
86
- ), _ = async (a) => {
87
- const o = [];
88
- for (const n of Array.from(a)) {
89
- const d = n.type.startsWith("video/") ? "video" : n.type.startsWith("audio/") ? "audio" : "image";
90
- let u;
91
- L ? u = await L(n) : u = {
92
- id: $(),
85
+ [n, R]
86
+ ), g = async (r) => {
87
+ const c = [];
88
+ for (const a of Array.from(r)) {
89
+ const d = a.type.startsWith("video/") ? "video" : a.type.startsWith("audio/") ? "audio" : "image";
90
+ let v;
91
+ L ? v = await L(a) : v = {
92
+ id: M(),
93
93
  type: d,
94
- name: n.name,
95
- url: URL.createObjectURL(n),
96
- size: n.size
97
- }, o.push(u);
94
+ name: a.name,
95
+ url: URL.createObjectURL(a),
96
+ size: a.size
97
+ }, c.push(v);
98
98
  }
99
- f({ assets: [...r.assets, ...o] });
100
- }, V = (a) => {
101
- const o = {
102
- id: $(),
103
- type: a,
104
- name: `${a.charAt(0).toUpperCase() + a.slice(1)} ${r.tracks.filter((n) => n.type === a).length + 1}`,
99
+ b({ assets: [...n.assets, ...c] });
100
+ }, V = (r) => {
101
+ const c = {
102
+ id: M(),
103
+ type: r,
104
+ name: `${r.charAt(0).toUpperCase() + r.slice(1)} ${n.tracks.filter((a) => a.type === r).length + 1}`,
105
105
  items: [],
106
106
  muted: !1,
107
107
  locked: !1,
108
108
  visible: !0
109
109
  };
110
- f({ tracks: [...r.tracks, o] });
111
- }, Y = (a) => {
112
- f({ tracks: r.tracks.filter((o) => o.id !== a) }), H === a && v(null);
113
- }, q = (a) => {
114
- f({
115
- tracks: r.tracks.map((o) => o.id === a ? { ...o, muted: !o.muted } : o)
110
+ b({ tracks: [...n.tracks, c] });
111
+ }, Y = (r) => {
112
+ b({ tracks: n.tracks.filter((c) => c.id !== r) }), q === r && h(null);
113
+ }, H = (r) => {
114
+ b({
115
+ tracks: n.tracks.map((c) => c.id === r ? { ...c, muted: !c.muted } : c)
116
116
  });
117
- }, X = (a) => {
118
- f({
119
- tracks: r.tracks.map((o) => o.id === a ? { ...o, locked: !o.locked } : o)
117
+ }, X = (r) => {
118
+ b({
119
+ tracks: n.tracks.map((c) => c.id === r ? { ...c, locked: !c.locked } : c)
120
120
  });
121
- }, S = (a, o) => {
122
- const n = r.tracks.find((p) => p.id === a);
123
- if (!n || n.locked)
121
+ }, C = (r, c) => {
122
+ const a = n.tracks.find((_) => _.id === r);
123
+ if (!a || a.locked)
124
124
  return;
125
- const d = n.items[n.items.length - 1], u = d ? d.startTime + d.duration : 0, h = {
126
- id: $(),
127
- assetId: o.id,
128
- type: o.type,
129
- startTime: u,
130
- duration: o.duration || 5,
125
+ const d = a.items[a.items.length - 1], v = d ? d.startTime + d.duration : 0, p = {
126
+ id: M(),
127
+ assetId: c.id,
128
+ type: c.type,
129
+ startTime: v,
130
+ duration: c.duration || 5,
131
131
  offset: 0,
132
132
  properties: {
133
133
  x: 0,
@@ -139,47 +139,47 @@ const fe = {
139
139
  effects: [],
140
140
  transitions: []
141
141
  };
142
- f({
143
- tracks: r.tracks.map(
144
- (p) => p.id === a ? { ...p, items: [...p.items, h] } : p
142
+ b({
143
+ tracks: n.tracks.map(
144
+ (_) => _.id === r ? { ..._, items: [..._.items, p] } : _
145
145
  )
146
146
  });
147
- }, Z = (a, o, n) => {
147
+ }, Z = (r, c, a) => {
148
148
  const d = {
149
- id: $(),
150
- type: n,
151
- name: n.charAt(0).toUpperCase() + n.slice(1),
152
- parameters: ne(n)
149
+ id: M(),
150
+ type: a,
151
+ name: a.charAt(0).toUpperCase() + a.slice(1),
152
+ parameters: ne(a)
153
153
  };
154
- f({
155
- tracks: r.tracks.map(
156
- (u) => u.id === a ? {
157
- ...u,
158
- items: u.items.map(
159
- (h) => h.id === o ? { ...h, effects: [...h.effects, d] } : h
154
+ b({
155
+ tracks: n.tracks.map(
156
+ (v) => v.id === r ? {
157
+ ...v,
158
+ items: v.items.map(
159
+ (p) => p.id === c ? { ...p, effects: [...p.effects, d] } : p
160
160
  )
161
- } : u
161
+ } : v
162
162
  )
163
163
  });
164
- }, P = (a, o, n, d) => {
165
- const u = {
166
- id: $(),
167
- type: n,
164
+ }, P = (r, c, a, d) => {
165
+ const v = {
166
+ id: M(),
167
+ type: a,
168
168
  duration: 0.5,
169
169
  position: d
170
170
  };
171
- f({
172
- tracks: r.tracks.map(
173
- (h) => h.id === a ? {
174
- ...h,
175
- items: h.items.map(
176
- (p) => p.id === o ? { ...p, transitions: [...p.transitions, u] } : p
171
+ b({
172
+ tracks: n.tracks.map(
173
+ (p) => p.id === r ? {
174
+ ...p,
175
+ items: p.items.map(
176
+ (_) => _.id === c ? { ..._, transitions: [..._.transitions, v] } : _
177
177
  )
178
- } : h
178
+ } : p
179
179
  )
180
180
  });
181
- }, ne = (a) => {
182
- switch (a) {
181
+ }, ne = (r) => {
182
+ switch (r) {
183
183
  case "blur":
184
184
  return { radius: 5 };
185
185
  case "brightness":
@@ -203,102 +203,105 @@ const fe = {
203
203
  }
204
204
  }, ae = () => {
205
205
  B ? (x.current && clearInterval(x.current), K(!1)) : (x.current = setInterval(() => {
206
- w((a) => {
207
- const o = Math.max(
208
- ...r.tracks.flatMap((n) => n.items.map((d) => d.startTime + d.duration)),
206
+ w((r) => {
207
+ const c = Math.max(
208
+ ...n.tracks.flatMap((a) => a.items.map((d) => d.startTime + d.duration)),
209
209
  0
210
210
  );
211
- return a >= o ? (clearInterval(x.current), K(!1), 0) : a + 1 / r.frameRate;
211
+ return r >= c ? (clearInterval(x.current), K(!1), 0) : r + 1 / n.frameRate;
212
212
  });
213
- }, 1e3 / r.frameRate), K(!0));
214
- }, J = (a) => {
215
- w(Math.max(0, a));
213
+ }, 1e3 / n.frameRate), K(!0));
214
+ }, J = (r) => {
215
+ w(Math.max(0, r));
216
216
  }, Q = async () => {
217
217
  if (F) {
218
218
  U(0);
219
219
  try {
220
- const a = setInterval(() => {
221
- U((o) => o !== null && o < 90 ? o + Math.random() * 10 : o);
220
+ const r = setInterval(() => {
221
+ U((c) => c !== null && c < 90 ? c + Math.random() * 10 : c);
222
222
  }, 500);
223
- await F(r, r.settings.video.codec), clearInterval(a), U(100), setTimeout(() => U(null), 2e3);
224
- } catch (a) {
225
- U(null), console.error("Export failed:", a);
223
+ await F(n, n.settings.video.codec), clearInterval(r), U(100), setTimeout(() => U(null), 2e3);
224
+ } catch (r) {
225
+ U(null), console.error("Export failed:", r);
226
226
  }
227
227
  }
228
- }, ee = (a) => {
229
- const o = Math.floor(a / 60), n = Math.floor(a % 60), d = Math.floor(a % 1 * r.frameRate);
230
- return `${o.toString().padStart(2, "0")}:${n.toString().padStart(2, "0")}:${d.toString().padStart(2, "0")}`;
228
+ }, ee = (r) => {
229
+ const c = Math.floor(r / 60), a = Math.floor(r % 60), d = Math.floor(r % 1 * n.frameRate);
230
+ return `${c.toString().padStart(2, "0")}:${a.toString().padStart(2, "0")}:${d.toString().padStart(2, "0")}`;
231
231
  }, j = () => {
232
- for (const a of r.tracks) {
233
- const o = a.items.find((n) => n.id === k);
234
- if (o)
235
- return { track: a, item: o };
232
+ for (const r of n.tracks) {
233
+ const c = r.items.find((a) => a.id === k);
234
+ if (c)
235
+ return { track: r, item: c };
236
236
  }
237
237
  return null;
238
- }, se = /* @__PURE__ */ t("header", { className: "nice-video-studio__header", children: [
238
+ }, re = /* @__PURE__ */ t("header", { className: "nice-video-studio__header", children: [
239
239
  /* @__PURE__ */ t("div", { className: "nice-video-studio__header-project-info", children: [
240
240
  /* @__PURE__ */ e(
241
241
  "input",
242
242
  {
243
243
  type: "text",
244
- value: r.name,
245
- onChange: (a) => f({ name: a.target.value }),
244
+ value: n.name,
245
+ onChange: (r) => b({ name: r.target.value }),
246
246
  className: "nice-video-studio__project-name-input"
247
247
  }
248
248
  ),
249
249
  /* @__PURE__ */ t("span", { className: "nice-video-studio__project-settings", children: [
250
- r.resolution.width,
250
+ n.resolution.width,
251
251
  "x",
252
- r.resolution.height,
252
+ n.resolution.height,
253
253
  " • ",
254
- r.frameRate,
254
+ n.frameRate,
255
255
  "fps"
256
256
  ] })
257
257
  ] }),
258
- /* @__PURE__ */ e("div", { className: "nice-video-studio__header-tabs", children: ["timeline", "effects", "transitions", "export"].map((a) => /* @__PURE__ */ e(
258
+ /* @__PURE__ */ e("div", { className: "nice-video-studio__header-tabs", children: ["timeline", "effects", "transitions", "export"].map((r) => /* @__PURE__ */ e(
259
259
  "button",
260
260
  {
261
- className: `nice-video-studio__tab-button ${A === a ? "nice-video-studio__tab-button--active" : ""}`,
262
- onClick: () => y(a),
263
- children: a.charAt(0).toUpperCase() + a.slice(1)
261
+ className: `nice-video-studio__tab-button ${A === r ? "nice-video-studio__tab-button--active" : ""}`,
262
+ onClick: () => y(r),
263
+ children: r.charAt(0).toUpperCase() + r.slice(1)
264
264
  },
265
- a
265
+ r
266
266
  )) }),
267
267
  /* @__PURE__ */ e("div", { className: "nice-video-studio__header-actions", children: /* @__PURE__ */ e(
268
268
  "button",
269
269
  {
270
270
  className: "nice-video-studio__action-button nice-video-studio__action-button--primary",
271
271
  onClick: Q,
272
- disabled: T !== null,
273
- children: T !== null ? `Exporting ${Math.round(T)}%` : "Export"
272
+ disabled: E !== null,
273
+ children: E !== null ? u("videoEditor.exporting", "Exporting {exportProgress}%").replace(
274
+ "{exportProgress}",
275
+ String(Math.round(E))
276
+ ) : u("videoEditor.export", "Export")
274
277
  }
275
278
  ) })
276
- ] }), re = k && A !== "export" ? (() => {
277
- const a = j();
278
- if (!a)
279
+ ] }), se = k && A !== "export" ? (() => {
280
+ const r = j();
281
+ if (!r)
279
282
  return null;
280
- const { track: o, item: n } = a;
283
+ const { track: c, item: a } = r;
281
284
  return /* @__PURE__ */ t("div", { className: "nice-video-studio__item-inspector", children: [
282
- /* @__PURE__ */ e("h4", { children: b("videoEditor.itemProperties", "Item Properties") }),
285
+ /* @__PURE__ */ e("h4", { children: u("videoEditor.itemProperties", "Item Properties") }),
283
286
  /* @__PURE__ */ t("div", { className: "nice-video-studio__inspector-section", children: [
284
287
  /* @__PURE__ */ t("label", { children: [
285
- b("videoEditor.startTime", "Start Time"),
288
+ u("videoEditor.startTime", "Start Time"),
286
289
  /* @__PURE__ */ e(
287
290
  "input",
288
291
  {
289
292
  type: "number",
290
293
  step: "0.1",
291
- value: n.startTime,
294
+ value: a.startTime,
292
295
  onChange: (d) => {
293
- const u = parseFloat(d.target.value);
294
- f({
295
- tracks: r.tracks.map(
296
- (h) => h.id === o.id ? {
297
- ...h,
298
- items: h.items.map(
299
- (p) => p.id === n.id ? { ...p, startTime: u } : p
296
+ const v = parseFloat(d.target.value);
297
+ b({
298
+ tracks: n.tracks.map(
299
+ (p) => p.id === c.id ? {
300
+ ...p,
301
+ items: p.items.map(
302
+ (_) => _.id === a.id ? { ..._, startTime: v } : _
300
303
  )
301
- } : h
304
+ } : p
302
305
  )
303
306
  });
304
307
  }
@@ -306,23 +309,23 @@ const fe = {
306
309
  )
307
310
  ] }),
308
311
  /* @__PURE__ */ t("label", { children: [
309
- b("videoEditor.duration", "Duration"),
312
+ u("videoEditor.duration", "Duration"),
310
313
  /* @__PURE__ */ e(
311
314
  "input",
312
315
  {
313
316
  type: "number",
314
317
  step: "0.1",
315
- value: n.duration,
318
+ value: a.duration,
316
319
  onChange: (d) => {
317
- const u = parseFloat(d.target.value);
318
- f({
319
- tracks: r.tracks.map(
320
- (h) => h.id === o.id ? {
321
- ...h,
322
- items: h.items.map(
323
- (p) => p.id === n.id ? { ...p, duration: u } : p
320
+ const v = parseFloat(d.target.value);
321
+ b({
322
+ tracks: n.tracks.map(
323
+ (p) => p.id === c.id ? {
324
+ ...p,
325
+ items: p.items.map(
326
+ (_) => _.id === a.id ? { ..._, duration: v } : _
324
327
  )
325
- } : h
328
+ } : p
326
329
  )
327
330
  });
328
331
  }
@@ -330,7 +333,7 @@ const fe = {
330
333
  )
331
334
  ] }),
332
335
  /* @__PURE__ */ t("label", { children: [
333
- b("videoEditor.opacity", "Opacity"),
336
+ u("videoEditor.opacity", "Opacity"),
334
337
  /* @__PURE__ */ e(
335
338
  "input",
336
339
  {
@@ -338,20 +341,20 @@ const fe = {
338
341
  min: "0",
339
342
  max: "1",
340
343
  step: "0.1",
341
- value: n.properties.opacity ?? 1,
344
+ value: a.properties.opacity ?? 1,
342
345
  onChange: (d) => {
343
- const u = parseFloat(d.target.value);
344
- f({
345
- tracks: r.tracks.map(
346
- (h) => h.id === o.id ? {
347
- ...h,
348
- items: h.items.map(
349
- (p) => p.id === n.id ? {
350
- ...p,
351
- properties: { ...p.properties, opacity: u }
352
- } : p
346
+ const v = parseFloat(d.target.value);
347
+ b({
348
+ tracks: n.tracks.map(
349
+ (p) => p.id === c.id ? {
350
+ ...p,
351
+ items: p.items.map(
352
+ (_) => _.id === a.id ? {
353
+ ..._,
354
+ properties: { ..._.properties, opacity: v }
355
+ } : _
353
356
  )
354
- } : h
357
+ } : p
355
358
  )
356
359
  });
357
360
  }
@@ -359,20 +362,19 @@ const fe = {
359
362
  )
360
363
  ] })
361
364
  ] }),
362
- /* @__PURE__ */ t("h4", { children: [
363
- "Effects (",
364
- n.effects.length,
365
- ")"
366
- ] }),
367
- /* @__PURE__ */ e("div", { className: "nice-video-studio__effects-list", children: n.effects.map((d) => /* @__PURE__ */ e("div", { className: "nice-video-studio__effect-badge", children: d.name }, d.id)) })
365
+ /* @__PURE__ */ e("h4", { children: u("videoEditor.effects", "Effects ({effects})").replace(
366
+ "{effects}",
367
+ String(a.effects.length)
368
+ ) }),
369
+ /* @__PURE__ */ e("div", { className: "nice-video-studio__effects-list", children: a.effects.map((d) => /* @__PURE__ */ e("div", { className: "nice-video-studio__effect-badge", children: d.name }, d.id)) })
368
370
  ] });
369
371
  })() : null, i = W ? /* @__PURE__ */ t("aside", { className: "nice-video-studio__asset-library", children: [
370
372
  /* @__PURE__ */ t("div", { className: "nice-video-studio__asset-library-header", children: [
371
- /* @__PURE__ */ e("h3", { children: b("videoEditor.assets", "Assets") }),
373
+ /* @__PURE__ */ e("h3", { children: u("videoEditor.assets", "Assets") }),
372
374
  /* @__PURE__ */ e(
373
375
  "button",
374
376
  {
375
- "aria-label": b("videoEditor.close", "Close"),
377
+ "aria-label": u("videoEditor.close", "Close"),
376
378
  className: "nice-video-studio__close-button",
377
379
  onClick: () => z(!1),
378
380
  children: /* @__PURE__ */ e(m, { name: "close", size: 16 })
@@ -386,44 +388,44 @@ const fe = {
386
388
  type: "file",
387
389
  multiple: !0,
388
390
  accept: "video/*,audio/*,image/*",
389
- onChange: (a) => a.target.files && _(a.target.files),
391
+ onChange: (r) => r.target.files && g(r.target.files),
390
392
  hidden: !0
391
393
  }
392
394
  ),
393
395
  /* @__PURE__ */ e("span", { className: "nice-video-studio__upload-icon", children: "+" }),
394
- /* @__PURE__ */ e("span", { children: b("videoEditor.dropFilesOrClickTo", "Drop files or click to upload") })
396
+ /* @__PURE__ */ e("span", { children: u("videoEditor.dropFilesOrClickTo", "Drop files or click to upload") })
395
397
  ] }) }),
396
- /* @__PURE__ */ e("div", { className: "nice-video-studio__asset-library-list", children: r.assets.map((a) => /* @__PURE__ */ t(
398
+ /* @__PURE__ */ e("div", { className: "nice-video-studio__asset-library-list", children: n.assets.map((r) => /* @__PURE__ */ t(
397
399
  "div",
398
400
  {
399
401
  className: "nice-video-studio__asset-item",
400
402
  draggable: !0,
401
- onDragStart: (o) => o.dataTransfer.setData("assetId", a.id),
403
+ onDragStart: (c) => c.dataTransfer.setData("assetId", r.id),
402
404
  children: [
403
- /* @__PURE__ */ e("div", { className: "nice-video-studio__asset-thumbnail", children: a.thumbnail ? /* @__PURE__ */ e("img", { src: a.thumbnail, alt: a.name }) : /* @__PURE__ */ e("span", { className: "nice-video-studio__asset-type-icon", children: /* @__PURE__ */ e(
405
+ /* @__PURE__ */ e("div", { className: "nice-video-studio__asset-thumbnail", children: r.thumbnail ? /* @__PURE__ */ e("img", { src: r.thumbnail, alt: r.name }) : /* @__PURE__ */ e("span", { className: "nice-video-studio__asset-type-icon", children: /* @__PURE__ */ e(
404
406
  m,
405
407
  {
406
- name: a.type === "video" ? "video" : a.type === "audio" ? "music" : "image",
408
+ name: r.type === "video" ? "video" : r.type === "audio" ? "music" : "image",
407
409
  size: 24
408
410
  }
409
411
  ) }) }),
410
412
  /* @__PURE__ */ t("div", { className: "nice-video-studio__asset-info", children: [
411
- /* @__PURE__ */ e("span", { className: "nice-video-studio__asset-name", children: a.name }),
413
+ /* @__PURE__ */ e("span", { className: "nice-video-studio__asset-name", children: r.name }),
412
414
  /* @__PURE__ */ t("span", { className: "nice-video-studio__asset-meta", children: [
413
- (a.size / 1024 / 1024).toFixed(1),
415
+ (r.size / 1024 / 1024).toFixed(1),
414
416
  "MB"
415
417
  ] })
416
418
  ] })
417
419
  ]
418
420
  },
419
- a.id
421
+ r.id
420
422
  )) })
421
- ] }) : void 0, c = /* @__PURE__ */ e("div", { className: "nice-video-studio__preview-area", children: /* @__PURE__ */ t("div", { className: "nice-video-studio__preview-container", children: [
423
+ ] }) : void 0, o = /* @__PURE__ */ e("div", { className: "nice-video-studio__preview-area", children: /* @__PURE__ */ t("div", { className: "nice-video-studio__preview-container", children: [
422
424
  /* @__PURE__ */ t(
423
425
  "div",
424
426
  {
425
427
  className: "nice-video-studio__preview-canvas",
426
- style: { aspectRatio: `${r.resolution.width}/${r.resolution.height}` },
428
+ style: { aspectRatio: `${n.resolution.width}/${n.resolution.height}` },
427
429
  children: [
428
430
  /* @__PURE__ */ e("video", { ref: te, className: "nice-video-studio__preview-video" }),
429
431
  /* @__PURE__ */ e("div", { className: "nice-video-studio__preview-overlay", children: !W && /* @__PURE__ */ e(
@@ -431,7 +433,7 @@ const fe = {
431
433
  {
432
434
  className: "nice-video-studio__toggle-library-button",
433
435
  onClick: () => z(!0),
434
- "aria-label": b("videoEditor.showAssetLibrary", "Show asset library"),
436
+ "aria-label": u("videoEditor.showAssetLibrary", "Show asset library"),
435
437
  children: /* @__PURE__ */ e(m, { name: "folder", size: 16 })
436
438
  }
437
439
  ) })
@@ -443,15 +445,15 @@ const fe = {
443
445
  "button",
444
446
  {
445
447
  onClick: () => J(0),
446
- "aria-label": b("videoEditor.goToStart", "Go to start"),
448
+ "aria-label": u("videoEditor.goToStart", "Go to start"),
447
449
  children: /* @__PURE__ */ e(m, { name: "skip-back", size: 16 })
448
450
  }
449
451
  ),
450
452
  /* @__PURE__ */ e(
451
453
  "button",
452
454
  {
453
- onClick: () => J(D - 1 / r.frameRate),
454
- "aria-label": b("videoEditor.previousFrame", "Previous frame"),
455
+ onClick: () => J(D - 1 / n.frameRate),
456
+ "aria-label": u("videoEditor.previousFrame", "Previous frame"),
455
457
  children: /* @__PURE__ */ e(m, { name: "chevron-left", size: 16 })
456
458
  }
457
459
  ),
@@ -460,15 +462,15 @@ const fe = {
460
462
  {
461
463
  onClick: ae,
462
464
  className: "nice-video-studio__play-button",
463
- "aria-label": B ? "Pause" : "Play",
465
+ "aria-label": B ? u("videoEditor.pause", "Pause") : u("videoEditor.play", "Play"),
464
466
  children: /* @__PURE__ */ e(m, { name: B ? "pause" : "play", size: 18 })
465
467
  }
466
468
  ),
467
469
  /* @__PURE__ */ e(
468
470
  "button",
469
471
  {
470
- onClick: () => J(D + 1 / r.frameRate),
471
- "aria-label": b("videoEditor.nextFrame", "Next frame"),
472
+ onClick: () => J(D + 1 / n.frameRate),
473
+ "aria-label": u("videoEditor.nextFrame", "Next frame"),
472
474
  children: /* @__PURE__ */ e(m, { name: "chevron-right", size: 16 })
473
475
  }
474
476
  ),
@@ -478,146 +480,152 @@ const fe = {
478
480
  A === "timeline" && /* @__PURE__ */ t("div", { className: "nice-video-studio__timeline-panel", children: [
479
481
  /* @__PURE__ */ t("div", { className: "nice-video-studio__timeline-toolbar", children: [
480
482
  /* @__PURE__ */ t("div", { className: "nice-video-studio__track-buttons", children: [
481
- /* @__PURE__ */ e("button", { onClick: () => V("video"), children: "+ Video Track" }),
482
- /* @__PURE__ */ e("button", { onClick: () => V("audio"), children: "+ Audio Track" }),
483
- /* @__PURE__ */ e("button", { onClick: () => V("text"), children: "+ Text Track" })
483
+ /* @__PURE__ */ e("button", { onClick: () => V("video"), children: u("videoEditor.videoTrack", "+ Video Track") }),
484
+ /* @__PURE__ */ e("button", { onClick: () => V("audio"), children: u("videoEditor.audioTrack", "+ Audio Track") }),
485
+ /* @__PURE__ */ e("button", { onClick: () => V("text"), children: u("videoEditor.textTrack", "+ Text Track") })
484
486
  ] }),
485
487
  /* @__PURE__ */ t("div", { className: "nice-video-studio__zoom-controls", children: [
486
- /* @__PURE__ */ e("button", { onClick: () => G(Math.max(0.25, C - 0.25)), children: "-" }),
488
+ /* @__PURE__ */ e("button", { onClick: () => G(Math.max(0.25, S - 0.25)), children: "-" }),
487
489
  /* @__PURE__ */ t("span", { children: [
488
- Math.round(C * 100),
490
+ Math.round(S * 100),
489
491
  "%"
490
492
  ] }),
491
- /* @__PURE__ */ e("button", { onClick: () => G(Math.min(4, C + 0.25)), children: "+" })
493
+ /* @__PURE__ */ e("button", { onClick: () => G(Math.min(4, S + 0.25)), children: "+" })
492
494
  ] })
493
495
  ] }),
494
496
  /* @__PURE__ */ t("div", { className: "nice-video-studio__timeline-container", ref: ie, children: [
495
- /* @__PURE__ */ e("div", { className: "nice-video-studio__timeline-ruler", children: Array.from({ length: Math.ceil(30 / C) }).map((a, o) => /* @__PURE__ */ e(
497
+ /* @__PURE__ */ e("div", { className: "nice-video-studio__timeline-ruler", children: Array.from({ length: Math.ceil(30 / S) }).map((r, c) => /* @__PURE__ */ e(
496
498
  "div",
497
499
  {
498
500
  className: "nice-video-studio__ruler-mark",
499
- style: { left: `${o * 50 * C}px` },
500
- children: ee(o)
501
+ style: { left: `${c * 50 * S}px` },
502
+ children: ee(c)
501
503
  },
502
- o
504
+ c
503
505
  )) }),
504
506
  /* @__PURE__ */ e(
505
507
  "div",
506
508
  {
507
509
  className: "nice-video-studio__timeline-playhead",
508
- style: { left: `${D * 50 * C}px` }
510
+ style: { left: `${D * 50 * S}px` }
509
511
  }
510
512
  ),
511
- /* @__PURE__ */ e("div", { className: "nice-video-studio__timeline-tracks", children: r.tracks.map((a) => /* @__PURE__ */ t(
513
+ /* @__PURE__ */ e("div", { className: "nice-video-studio__timeline-tracks", children: n.tracks.map((r) => /* @__PURE__ */ t(
512
514
  "div",
513
515
  {
514
- className: `nice-video-studio__timeline-track ${H === a.id ? "nice-video-studio__timeline-track--selected" : ""} ${a.locked ? "nice-video-studio__timeline-track--locked" : ""}`,
515
- onClick: () => v(a.id),
516
- onDrop: (o) => {
517
- o.preventDefault();
518
- const n = o.dataTransfer.getData("assetId"), d = r.assets.find((u) => u.id === n);
519
- d && S(a.id, d);
516
+ role: "button",
517
+ tabIndex: 0,
518
+ onKeyDown: me,
519
+ className: `nice-video-studio__timeline-track ${q === r.id ? "nice-video-studio__timeline-track--selected" : ""} ${r.locked ? "nice-video-studio__timeline-track--locked" : ""}`,
520
+ onClick: () => h(r.id),
521
+ onDrop: (c) => {
522
+ c.preventDefault();
523
+ const a = c.dataTransfer.getData("assetId"), d = n.assets.find((v) => v.id === a);
524
+ d && C(r.id, d);
520
525
  },
521
- onDragOver: (o) => o.preventDefault(),
526
+ onDragOver: (c) => c.preventDefault(),
522
527
  children: [
523
528
  /* @__PURE__ */ t("div", { className: "nice-video-studio__track-header", children: [
524
- /* @__PURE__ */ e("span", { className: "nice-video-studio__track-name", children: a.name }),
529
+ /* @__PURE__ */ e("span", { className: "nice-video-studio__track-name", children: r.name }),
525
530
  /* @__PURE__ */ t("div", { className: "nice-video-studio__track-controls", children: [
526
531
  /* @__PURE__ */ e(
527
532
  "button",
528
533
  {
529
- className: `nice-video-studio__track-toggle ${a.muted ? "nice-video-studio__track-toggle--active" : ""}`,
530
- onClick: (o) => {
531
- o.stopPropagation(), q(a.id);
534
+ className: `nice-video-studio__track-toggle ${r.muted ? "nice-video-studio__track-toggle--active" : ""}`,
535
+ onClick: (c) => {
536
+ c.stopPropagation(), H(r.id);
532
537
  },
533
- children: /* @__PURE__ */ e(m, { name: a.muted ? "volume-off" : "volume", size: 14 })
538
+ children: /* @__PURE__ */ e(m, { name: r.muted ? "volume-off" : "volume", size: 14 })
534
539
  }
535
540
  ),
536
541
  /* @__PURE__ */ e(
537
542
  "button",
538
543
  {
539
- className: `nice-video-studio__track-toggle ${a.locked ? "nice-video-studio__track-toggle--active" : ""}`,
540
- onClick: (o) => {
541
- o.stopPropagation(), X(a.id);
544
+ className: `nice-video-studio__track-toggle ${r.locked ? "nice-video-studio__track-toggle--active" : ""}`,
545
+ onClick: (c) => {
546
+ c.stopPropagation(), X(r.id);
542
547
  },
543
- children: /* @__PURE__ */ e(m, { name: a.locked ? "lock" : "unlock", size: 14 })
548
+ children: /* @__PURE__ */ e(m, { name: r.locked ? "lock" : "unlock", size: 14 })
544
549
  }
545
550
  ),
546
551
  /* @__PURE__ */ e(
547
552
  "button",
548
553
  {
549
- onClick: (o) => {
550
- o.stopPropagation(), Y(a.id);
554
+ onClick: (c) => {
555
+ c.stopPropagation(), Y(r.id);
551
556
  },
552
- "aria-label": b("videoEditor.removeTrack", "Remove track"),
557
+ "aria-label": u("videoEditor.removeTrack", "Remove track"),
553
558
  children: /* @__PURE__ */ e(m, { name: "trash", size: 14 })
554
559
  }
555
560
  )
556
561
  ] })
557
562
  ] }),
558
- /* @__PURE__ */ e("div", { className: "nice-video-studio__track-items", children: a.items.map((o) => {
559
- const n = r.assets.find((d) => d.id === o.assetId);
563
+ /* @__PURE__ */ e("div", { className: "nice-video-studio__track-items", children: r.items.map((c) => {
564
+ const a = n.assets.find((d) => d.id === c.assetId);
560
565
  return /* @__PURE__ */ t(
561
566
  "div",
562
567
  {
563
- className: `nice-video-studio__track-item nice-video-studio__track-item--${o.type} ${k === o.id ? "nice-video-studio__track-item--selected" : ""}`,
568
+ role: "button",
569
+ tabIndex: 0,
570
+ onKeyDown: me,
571
+ className: `nice-video-studio__track-item nice-video-studio__track-item--${c.type} ${k === c.id ? "nice-video-studio__track-item--selected" : ""}`,
564
572
  style: {
565
- left: `${o.startTime * 50 * C}px`,
566
- width: `${o.duration * 50 * C}px`
573
+ left: `${c.startTime * 50 * S}px`,
574
+ width: `${c.duration * 50 * S}px`
567
575
  },
568
576
  onClick: (d) => {
569
- d.stopPropagation(), N(o.id);
577
+ d.stopPropagation(), N(c.id);
570
578
  },
571
579
  children: [
572
- /* @__PURE__ */ e("span", { className: "nice-video-studio__item-name", children: (n == null ? void 0 : n.name) || "Untitled" }),
573
- o.transitions.length > 0 && /* @__PURE__ */ e("span", { className: "nice-video-studio__item-transitions", children: /* @__PURE__ */ e(m, { name: "wand", size: 12 }) }),
574
- o.effects.length > 0 && /* @__PURE__ */ e("span", { className: "nice-video-studio__item-effects", children: /* @__PURE__ */ e(m, { name: "palette", size: 12 }) })
580
+ /* @__PURE__ */ e("span", { className: "nice-video-studio__item-name", children: (a == null ? void 0 : a.name) || u("videoEditor.untitled", "Untitled") }),
581
+ c.transitions.length > 0 && /* @__PURE__ */ e("span", { className: "nice-video-studio__item-transitions", children: /* @__PURE__ */ e(m, { name: "wand", size: 12 }) }),
582
+ c.effects.length > 0 && /* @__PURE__ */ e("span", { className: "nice-video-studio__item-effects", children: /* @__PURE__ */ e(m, { name: "palette", size: 12 }) })
575
583
  ]
576
584
  },
577
- o.id
585
+ c.id
578
586
  );
579
587
  }) })
580
588
  ]
581
589
  },
582
- a.id
590
+ r.id
583
591
  )) })
584
592
  ] })
585
593
  ] }),
586
594
  A === "effects" && /* @__PURE__ */ t("div", { className: "nice-video-studio__effects-panel", children: [
587
- /* @__PURE__ */ e("h3", { children: b("videoEditor.videoEffects", "Video Effects") }),
588
- /* @__PURE__ */ e("p", { className: "nice-video-studio__panel-hint", children: b("videoEditor.selectAClipToApply", "Select a clip to apply effects") }),
589
- /* @__PURE__ */ e("div", { className: "nice-video-studio__effects-grid", children: be.map((a) => /* @__PURE__ */ t(
595
+ /* @__PURE__ */ e("h3", { children: u("videoEditor.videoEffects", "Video Effects") }),
596
+ /* @__PURE__ */ e("p", { className: "nice-video-studio__panel-hint", children: u("videoEditor.selectAClipToApply", "Select a clip to apply effects") }),
597
+ /* @__PURE__ */ e("div", { className: "nice-video-studio__effects-grid", children: ye.map((r) => /* @__PURE__ */ t(
590
598
  "button",
591
599
  {
592
600
  className: "nice-video-studio__effect-preset",
593
601
  disabled: !k,
594
602
  onClick: () => {
595
- const o = j();
596
- o && Z(o.track.id, o.item.id, a.type);
603
+ const c = j();
604
+ c && Z(c.track.id, c.item.id, r.type);
597
605
  },
598
606
  children: [
599
- /* @__PURE__ */ e("span", { className: "nice-video-studio__effect-icon", children: /* @__PURE__ */ e(m, { name: a.icon, size: 16 }) }),
600
- /* @__PURE__ */ e("span", { className: "nice-video-studio__effect-name", children: a.name })
607
+ /* @__PURE__ */ e("span", { className: "nice-video-studio__effect-icon", children: /* @__PURE__ */ e(m, { name: r.icon, size: 16 }) }),
608
+ /* @__PURE__ */ e("span", { className: "nice-video-studio__effect-name", children: r.name })
601
609
  ]
602
610
  },
603
- a.type
611
+ r.type
604
612
  )) })
605
613
  ] }),
606
614
  A === "transitions" && /* @__PURE__ */ t("div", { className: "nice-video-studio__transitions-panel", children: [
607
- /* @__PURE__ */ e("h3", { children: b("videoEditor.transitions", "Transitions") }),
608
- /* @__PURE__ */ e("p", { className: "nice-video-studio__panel-hint", children: b("videoEditor.selectAClipAndAdd", "Select a clip and add transitions between clips") }),
609
- /* @__PURE__ */ e("div", { className: "nice-video-studio__transitions-grid", children: ye.map((a) => /* @__PURE__ */ t("div", { className: "nice-video-studio__transition-preset", children: [
610
- /* @__PURE__ */ e("span", { className: "nice-video-studio__transition-name", children: a.name }),
615
+ /* @__PURE__ */ e("h3", { children: u("videoEditor.transitions", "Transitions") }),
616
+ /* @__PURE__ */ e("p", { className: "nice-video-studio__panel-hint", children: u("videoEditor.selectAClipAndAdd", "Select a clip and add transitions between clips") }),
617
+ /* @__PURE__ */ e("div", { className: "nice-video-studio__transitions-grid", children: Ne.map((r) => /* @__PURE__ */ t("div", { className: "nice-video-studio__transition-preset", children: [
618
+ /* @__PURE__ */ e("span", { className: "nice-video-studio__transition-name", children: r.name }),
611
619
  /* @__PURE__ */ t("div", { className: "nice-video-studio__transition-buttons", children: [
612
620
  /* @__PURE__ */ e(
613
621
  "button",
614
622
  {
615
623
  disabled: !k,
616
624
  onClick: () => {
617
- const o = j();
618
- o && P(o.track.id, o.item.id, a.type, "start");
625
+ const c = j();
626
+ c && P(c.track.id, c.item.id, r.type, "start");
619
627
  },
620
- children: "In"
628
+ children: u("videoEditor.in", "In")
621
629
  }
622
630
  ),
623
631
  /* @__PURE__ */ e(
@@ -625,27 +633,27 @@ const fe = {
625
633
  {
626
634
  disabled: !k,
627
635
  onClick: () => {
628
- const o = j();
629
- o && P(o.track.id, o.item.id, a.type, "end");
636
+ const c = j();
637
+ c && P(c.track.id, c.item.id, r.type, "end");
630
638
  },
631
- children: "Out"
639
+ children: u("videoEditor.out", "Out")
632
640
  }
633
641
  )
634
642
  ] })
635
- ] }, a.type)) })
643
+ ] }, r.type)) })
636
644
  ] }),
637
645
  A === "export" && /* @__PURE__ */ t("div", { className: "nice-video-studio__export-panel", children: [
638
- /* @__PURE__ */ e("h3", { children: b("videoEditor.exportSettings", "Export Settings") }),
646
+ /* @__PURE__ */ e("h3", { children: u("videoEditor.exportSettings", "Export Settings") }),
639
647
  /* @__PURE__ */ t("div", { className: "nice-video-studio__export-settings", children: [
640
648
  /* @__PURE__ */ t("div", { className: "nice-video-studio__setting-group", children: [
641
- /* @__PURE__ */ e("label", { children: b("videoEditor.resolution", "Resolution") }),
649
+ /* @__PURE__ */ e("label", { children: u("videoEditor.resolution", "Resolution") }),
642
650
  /* @__PURE__ */ t(
643
651
  "select",
644
652
  {
645
- value: `${r.resolution.width}x${r.resolution.height}`,
646
- onChange: (a) => {
647
- const [o, n] = a.target.value.split("x").map(Number);
648
- f({ resolution: { width: o, height: n } });
653
+ value: `${n.resolution.width}x${n.resolution.height}`,
654
+ onChange: (r) => {
655
+ const [c, a] = r.target.value.split("x").map(Number);
656
+ b({ resolution: { width: c, height: a } });
649
657
  },
650
658
  children: [
651
659
  /* @__PURE__ */ e("option", { value: "1920x1080", children: "1080p (1920x1080)" }),
@@ -657,12 +665,12 @@ const fe = {
657
665
  )
658
666
  ] }),
659
667
  /* @__PURE__ */ t("div", { className: "nice-video-studio__setting-group", children: [
660
- /* @__PURE__ */ e("label", { children: b("videoEditor.frameRate", "Frame Rate") }),
668
+ /* @__PURE__ */ e("label", { children: u("videoEditor.frameRate", "Frame Rate") }),
661
669
  /* @__PURE__ */ t(
662
670
  "select",
663
671
  {
664
- value: r.frameRate,
665
- onChange: (a) => f({ frameRate: parseInt(a.target.value) }),
672
+ value: n.frameRate,
673
+ onChange: (r) => b({ frameRate: parseInt(r.target.value) }),
666
674
  children: [
667
675
  /* @__PURE__ */ e("option", { value: "24", children: "24 fps" }),
668
676
  /* @__PURE__ */ e("option", { value: "30", children: "30 fps" }),
@@ -673,42 +681,42 @@ const fe = {
673
681
  )
674
682
  ] }),
675
683
  /* @__PURE__ */ t("div", { className: "nice-video-studio__setting-group", children: [
676
- /* @__PURE__ */ e("label", { children: b("videoEditor.videoCodec", "Video Codec") }),
684
+ /* @__PURE__ */ e("label", { children: u("videoEditor.videoCodec", "Video Codec") }),
677
685
  /* @__PURE__ */ t(
678
686
  "select",
679
687
  {
680
- value: r.settings.video.codec,
681
- onChange: (a) => f({
688
+ value: n.settings.video.codec,
689
+ onChange: (r) => b({
682
690
  settings: {
683
- ...r.settings,
691
+ ...n.settings,
684
692
  video: {
685
- ...r.settings.video,
686
- codec: a.target.value
693
+ ...n.settings.video,
694
+ codec: r.target.value
687
695
  }
688
696
  }
689
697
  }),
690
698
  children: [
691
- /* @__PURE__ */ e("option", { value: "h264", children: "H.264 (Best Compatibility)" }),
692
- /* @__PURE__ */ e("option", { value: "h265", children: "H.265/HEVC (Smaller Size)" }),
693
- /* @__PURE__ */ e("option", { value: "vp9", children: "VP9 (Web Optimized)" }),
694
- /* @__PURE__ */ e("option", { value: "av1", children: "AV1 (Future Standard)" })
699
+ /* @__PURE__ */ e("option", { value: "h264", children: u("videoEditor.h264BestCompatibility", "H.264 (Best Compatibility)") }),
700
+ /* @__PURE__ */ e("option", { value: "h265", children: u("videoEditor.h265HevcSmallerSize", "H.265/HEVC (Smaller Size)") }),
701
+ /* @__PURE__ */ e("option", { value: "vp9", children: u("videoEditor.vp9WebOptimized", "VP9 (Web Optimized)") }),
702
+ /* @__PURE__ */ e("option", { value: "av1", children: u("videoEditor.av1FutureStandard", "AV1 (Future Standard)") })
695
703
  ]
696
704
  }
697
705
  )
698
706
  ] }),
699
707
  /* @__PURE__ */ t("div", { className: "nice-video-studio__setting-group", children: [
700
- /* @__PURE__ */ e("label", { children: "Video Bitrate (Mbps)" }),
708
+ /* @__PURE__ */ e("label", { children: u("videoEditor.videoBitrateMbps", "Video Bitrate (Mbps)") }),
701
709
  /* @__PURE__ */ e(
702
710
  "input",
703
711
  {
704
712
  type: "number",
705
- value: r.settings.video.bitrate / 1e3,
706
- onChange: (a) => f({
713
+ value: n.settings.video.bitrate / 1e3,
714
+ onChange: (r) => b({
707
715
  settings: {
708
- ...r.settings,
716
+ ...n.settings,
709
717
  video: {
710
- ...r.settings.video,
711
- bitrate: parseFloat(a.target.value) * 1e3
718
+ ...n.settings.video,
719
+ bitrate: parseFloat(r.target.value) * 1e3
712
720
  }
713
721
  }
714
722
  }),
@@ -723,37 +731,40 @@ const fe = {
723
731
  {
724
732
  className: "nice-video-studio__export-button",
725
733
  onClick: Q,
726
- disabled: T !== null,
727
- children: T !== null ? `Exporting... ${Math.round(T)}%` : "Export Video"
734
+ disabled: E !== null,
735
+ children: E !== null ? u("videoEditor.exporting2", "Exporting... {exportProgress}%").replace(
736
+ "{exportProgress}",
737
+ String(Math.round(E))
738
+ ) : u("videoEditor.exportVideo", "Export Video")
728
739
  }
729
740
  ),
730
- T !== null && /* @__PURE__ */ e("div", { className: "nice-video-studio__export-progress", children: /* @__PURE__ */ e(
741
+ E !== null && /* @__PURE__ */ e("div", { className: "nice-video-studio__export-progress", children: /* @__PURE__ */ e(
731
742
  "div",
732
743
  {
733
744
  className: "nice-video-studio__export-progress-bar",
734
- style: { width: `${T}%` }
745
+ style: { width: `${E}%` }
735
746
  }
736
747
  ) })
737
748
  ] })
738
749
  ] });
739
750
  return /* @__PURE__ */ t(
740
- pe,
751
+ _e,
741
752
  {
742
753
  flush: !0,
743
754
  className: `nice-video-editor nice-video-studio ${O}`,
744
755
  height: "100%",
745
756
  style: { position: "relative", minHeight: 600 },
746
- toolbar: se,
757
+ toolbar: re,
747
758
  sidebar: i,
748
- rightSidebar: re ?? void 0,
759
+ rightSidebar: se ?? void 0,
749
760
  bottomPanel: l,
750
761
  children: [
751
- /* @__PURE__ */ e("span", { style: { position: "absolute", top: 6, right: 6, zIndex: 30 }, children: /* @__PURE__ */ e(_e, { steps: ge(I, Ne) }) }),
752
- c
762
+ /* @__PURE__ */ e("span", { style: { position: "absolute", top: 6, right: 6, zIndex: 30 }, children: /* @__PURE__ */ e(ge, { steps: fe(T, ke) }) }),
763
+ o
753
764
  ]
754
765
  }
755
766
  );
756
- }, ke = {
767
+ }, we = {
757
768
  video: {
758
769
  source: "screen",
759
770
  showCursor: !0,
@@ -771,42 +782,42 @@ const fe = {
771
782
  quality: "high"
772
783
  }
773
784
  }, Te = ({
774
- options: E,
785
+ options: $,
775
786
  onRecordingStart: R,
776
787
  onRecordingStop: F,
777
788
  onRecordingPause: L,
778
789
  onRecordingResume: O,
779
- onError: I,
780
- className: b = ""
790
+ onError: T,
791
+ className: u = ""
781
792
  }) => {
782
- var a, o;
783
- const { t: r } = me(), [s, A] = g({
784
- ...ke,
785
- ...E
786
- }), [y, H] = g(null), [v, k] = g("idle"), [N, D] = g([]), [w, B] = g(null), [K, C] = g(null), [G, W] = g(!1), [z, T] = g(!1), [U, ie] = g(
793
+ var r, c;
794
+ const { t: n } = ue(), [s, A] = f({
795
+ ...we,
796
+ ...$
797
+ }), [y, q] = f(null), [h, k] = f("idle"), [N, D] = f([]), [w, B] = f(null), [K, S] = f(null), [G, W] = f(!1), [z, E] = f(!1), [U, ie] = f(
787
798
  "pen"
788
- ), [te, x] = g("var(--nice-danger, #ff0000)"), f = M(null), _ = M([]), V = M(null), Y = M(null), q = M(null), X = M(0);
799
+ ), [te, x] = f("var(--nice-danger, #ff0000)"), b = I(null), g = I([]), V = I(null), Y = I(null), H = I(null), X = I(0);
789
800
  le(() => () => {
790
- w && w.getTracks().forEach((n) => n.stop()), q.current && clearInterval(q.current);
801
+ w && w.getTracks().forEach((a) => a.stop()), H.current && clearInterval(H.current);
791
802
  }, [w]);
792
- const S = (n) => {
803
+ const C = (a) => {
793
804
  A((d) => ({
794
805
  ...d,
795
- ...n,
796
- video: { ...d.video, ...n.video },
797
- audio: { ...d.audio, ...n.audio },
798
- output: { ...d.output, ...n.output }
806
+ ...a,
807
+ video: { ...d.video, ...a.video },
808
+ audio: { ...d.audio, ...a.audio },
809
+ output: { ...d.output, ...a.output }
799
810
  }));
800
811
  }, Z = async () => {
801
812
  try {
802
813
  k("preparing");
803
- const n = {
814
+ const a = {
804
815
  video: {
805
816
  cursor: s.video.showCursor ? "always" : "never",
806
817
  frameRate: s.video.frameRate
807
818
  },
808
819
  audio: s.audio.source === "system" || s.audio.source === "both"
809
- }, d = await navigator.mediaDevices.getDisplayMedia(n);
820
+ }, d = await navigator.mediaDevices.getDisplayMedia(a);
810
821
  if (s.audio.enabled && (s.audio.source === "microphone" || s.audio.source === "both"))
811
822
  try {
812
823
  (await navigator.mediaDevices.getUserMedia({
@@ -814,35 +825,35 @@ const fe = {
814
825
  echoCancellation: s.audio.echoCancellation,
815
826
  noiseSuppression: s.audio.noiseSuppression
816
827
  }
817
- })).getAudioTracks().forEach((h) => d.addTrack(h));
818
- } catch (u) {
819
- console.warn("Could not access microphone:", u);
828
+ })).getAudioTracks().forEach((p) => d.addTrack(p));
829
+ } catch (v) {
830
+ console.warn("Could not access microphone:", v);
820
831
  }
821
832
  B(d), V.current && (V.current.srcObject = d, V.current.play()), k("idle");
822
- } catch (n) {
823
- k("error"), I == null || I(n instanceof Error ? n : new Error("Failed to start preview"));
833
+ } catch (a) {
834
+ k("error"), T == null || T(a instanceof Error ? a : new Error("Failed to start preview"));
824
835
  }
825
836
  }, P = async () => {
826
837
  w || await Z();
827
- for (let n = 3; n > 0; n--)
828
- C(n), await new Promise((d) => setTimeout(d, 1e3));
829
- C(null);
838
+ for (let a = 3; a > 0; a--)
839
+ S(a), await new Promise((d) => setTimeout(d, 1e3));
840
+ S(null);
830
841
  try {
831
- const n = w || await ne();
832
- if (!n)
842
+ const a = w || await ne();
843
+ if (!a)
833
844
  throw new Error("No stream available");
834
- const d = se(s.output.format), u = new MediaRecorder(n, {
845
+ const d = re(s.output.format), v = new MediaRecorder(a, {
835
846
  mimeType: d,
836
- videoBitsPerSecond: re(s.output.quality)
847
+ videoBitsPerSecond: se(s.output.quality)
837
848
  });
838
- _.current = [], u.ondataavailable = (p) => {
839
- p.data.size > 0 && _.current.push(p.data);
840
- }, u.onstop = () => {
841
- const p = new Blob(_.current, { type: d });
842
- y && (F == null || F({ ...y, status: "stopped" }, p));
843
- }, f.current = u, u.start(1e3), X.current = Date.now();
844
- const h = {
845
- id: $(),
849
+ g.current = [], v.ondataavailable = (_) => {
850
+ _.data.size > 0 && g.current.push(_.data);
851
+ }, v.onstop = () => {
852
+ const _ = new Blob(g.current, { type: d });
853
+ y && (F == null || F({ ...y, status: "stopped" }, _));
854
+ }, b.current = v, v.start(1e3), X.current = Date.now();
855
+ const p = {
856
+ id: M(),
846
857
  status: "recording",
847
858
  startTime: /* @__PURE__ */ new Date(),
848
859
  duration: 0,
@@ -850,41 +861,44 @@ const fe = {
850
861
  options: s,
851
862
  chunks: []
852
863
  };
853
- H(h), k("recording"), R == null || R(h), q.current = setInterval(() => {
854
- H(
855
- (p) => p ? {
856
- ...p,
864
+ q(p), k("recording"), R == null || R(p), H.current = setInterval(() => {
865
+ q(
866
+ (_) => _ ? {
867
+ ..._,
857
868
  duration: (Date.now() - X.current) / 1e3,
858
- size: _.current.reduce((ve, he) => ve + he.size, 0)
869
+ size: g.current.reduce((he, pe) => he + pe.size, 0)
859
870
  } : null
860
871
  );
861
872
  }, 100);
862
- } catch (n) {
863
- k("error"), I == null || I(n instanceof Error ? n : new Error("Failed to start recording"));
873
+ } catch (a) {
874
+ k("error"), T == null || T(a instanceof Error ? a : new Error("Failed to start recording"));
864
875
  }
865
876
  }, ne = async () => (await Z(), w), ae = () => {
866
- f.current && v === "recording" && (f.current.pause(), k("paused"), L == null || L());
877
+ b.current && h === "recording" && (b.current.pause(), k("paused"), L == null || L());
867
878
  }, J = () => {
868
- f.current && v === "paused" && (f.current.resume(), k("recording"), O == null || O());
879
+ b.current && h === "paused" && (b.current.resume(), k("recording"), O == null || O());
869
880
  }, Q = () => {
870
- q.current && clearInterval(q.current), f.current && (v === "recording" || v === "paused") && (f.current.stop(), k("stopped")), w && (w.getTracks().forEach((n) => n.stop()), B(null));
871
- }, ee = ue(
872
- (n) => {
873
- if (v !== "recording")
881
+ H.current && clearInterval(H.current), b.current && (h === "recording" || h === "paused") && (b.current.stop(), k("stopped")), w && (w.getTracks().forEach((a) => a.stop()), B(null));
882
+ }, ee = ve(
883
+ (a) => {
884
+ if (h !== "recording")
874
885
  return;
875
886
  const d = {
876
- id: $(),
887
+ id: M(),
877
888
  time: (y == null ? void 0 : y.duration) || 0,
878
- label: n || `Marker ${N.length + 1}`,
889
+ label: a || n("screenRecorder.marker", "Marker {markers}").replace(
890
+ "{markers}",
891
+ String(N.length + 1)
892
+ ),
879
893
  color: i()
880
894
  };
881
- D((u) => [...u, d]);
895
+ D((v) => [...v, d]);
882
896
  },
883
- [v, y == null ? void 0 : y.duration, N.length]
884
- ), j = (n) => {
885
- D((d) => d.filter((u) => u.id !== n));
886
- }, se = (n) => {
887
- switch (n) {
897
+ [h, y == null ? void 0 : y.duration, N.length, n]
898
+ ), j = (a) => {
899
+ D((d) => d.filter((v) => v.id !== a));
900
+ }, re = (a) => {
901
+ switch (a) {
888
902
  case "mp4":
889
903
  return "video/mp4";
890
904
  case "mkv":
@@ -892,8 +906,8 @@ const fe = {
892
906
  default:
893
907
  return "video/webm;codecs=vp9";
894
908
  }
895
- }, re = (n) => {
896
- switch (n) {
909
+ }, se = (a) => {
910
+ switch (a) {
897
911
  case "low":
898
912
  return 25e5;
899
913
  case "medium":
@@ -904,7 +918,7 @@ const fe = {
904
918
  return 8e6;
905
919
  }
906
920
  }, i = () => {
907
- const n = [
921
+ const a = [
908
922
  "var(--nice-danger, #ff4444)",
909
923
  // audit-allow: literal-color +5 — annotation pens drawn into the recording
910
924
  "#44ff44",
@@ -913,12 +927,12 @@ const fe = {
913
927
  "#ff44ff",
914
928
  "#44ffff"
915
929
  ];
916
- return n[Math.floor(Math.random() * n.length)];
917
- }, c = (n) => {
918
- const d = Math.floor(n / 3600), u = Math.floor(n % 3600 / 60), h = Math.floor(n % 60), p = Math.floor(n % 1 * 100);
919
- return d > 0 ? `${d}:${u.toString().padStart(2, "0")}:${h.toString().padStart(2, "0")}` : `${u.toString().padStart(2, "0")}:${h.toString().padStart(2, "0")}.${p.toString().padStart(2, "0")}`;
920
- }, l = (n) => n < 1024 ? `${n} B` : n < 1024 * 1024 ? `${(n / 1024).toFixed(1)} KB` : `${(n / 1024 / 1024).toFixed(1)} MB`;
921
- return /* @__PURE__ */ t("div", { className: `nice-screen-recorder ${b}`, children: [
930
+ return a[Math.floor(Math.random() * a.length)];
931
+ }, o = (a) => {
932
+ const d = Math.floor(a / 3600), v = Math.floor(a % 3600 / 60), p = Math.floor(a % 60), _ = Math.floor(a % 1 * 100);
933
+ return d > 0 ? `${d}:${v.toString().padStart(2, "0")}:${p.toString().padStart(2, "0")}` : `${v.toString().padStart(2, "0")}:${p.toString().padStart(2, "0")}.${_.toString().padStart(2, "0")}`;
934
+ }, l = (a) => a < 1024 ? `${a} B` : a < 1024 * 1024 ? `${(a / 1024).toFixed(1)} KB` : `${(a / 1024 / 1024).toFixed(1)} MB`;
935
+ return /* @__PURE__ */ t("div", { className: `nice-screen-recorder ${u}`, children: [
922
936
  /* @__PURE__ */ t("div", { className: "nice-screen-recorder__preview", children: [
923
937
  K !== null && /* @__PURE__ */ e("div", { className: "nice-screen-recorder__countdown-overlay", children: /* @__PURE__ */ e("span", { className: "nice-screen-recorder__countdown-number", children: K }) }),
924
938
  /* @__PURE__ */ e(
@@ -931,18 +945,18 @@ const fe = {
931
945
  }
932
946
  ),
933
947
  z && /* @__PURE__ */ e("canvas", { ref: Y, className: "nice-screen-recorder__annotation-canvas" }),
934
- !w && v === "idle" && /* @__PURE__ */ e("div", { className: "nice-screen-recorder__preview-placeholder", children: /* @__PURE__ */ t("button", { className: "nice-screen-recorder__start-preview-button", onClick: Z, children: [
948
+ !w && h === "idle" && /* @__PURE__ */ e("div", { className: "nice-screen-recorder__preview-placeholder", children: /* @__PURE__ */ t("button", { className: "nice-screen-recorder__start-preview-button", onClick: Z, children: [
935
949
  /* @__PURE__ */ e("span", { className: "nice-screen-recorder__icon", children: /* @__PURE__ */ e(m, { name: "monitor", size: 18 }) }),
936
- /* @__PURE__ */ e("span", { children: r("screenRecorder.selectScreenToRecord", "Select Screen to Record") })
950
+ /* @__PURE__ */ e("span", { children: n("screenRecorder.selectScreenToRecord", "Select Screen to Record") })
937
951
  ] }) }),
938
- v === "recording" && /* @__PURE__ */ t("div", { className: "nice-screen-recorder__recording-indicator", children: [
952
+ h === "recording" && /* @__PURE__ */ t("div", { className: "nice-screen-recorder__recording-indicator", children: [
939
953
  /* @__PURE__ */ e("span", { className: "nice-screen-recorder__recording-dot" }),
940
- /* @__PURE__ */ e("span", { children: "REC" })
954
+ /* @__PURE__ */ e("span", { children: n("screenRecorder.rec", "REC") })
941
955
  ] })
942
956
  ] }),
943
957
  /* @__PURE__ */ t("div", { className: "nice-screen-recorder__controls", children: [
944
958
  /* @__PURE__ */ t("div", { className: "nice-screen-recorder__controls-main", children: [
945
- v === "idle" && /* @__PURE__ */ t(
959
+ h === "idle" && /* @__PURE__ */ t(
946
960
  "button",
947
961
  {
948
962
  className: "nice-screen-recorder__control-button nice-screen-recorder__control-button--record",
@@ -950,11 +964,11 @@ const fe = {
950
964
  disabled: !!K,
951
965
  children: [
952
966
  /* @__PURE__ */ e("span", { className: "nice-screen-recorder__icon", children: /* @__PURE__ */ e(m, { name: "circle", size: 18 }) }),
953
- /* @__PURE__ */ e("span", { children: r("screenRecorder.startRecording", "Start Recording") })
967
+ /* @__PURE__ */ e("span", { children: n("screenRecorder.startRecording", "Start Recording") })
954
968
  ]
955
969
  }
956
970
  ),
957
- v === "recording" && /* @__PURE__ */ t(oe, { children: [
971
+ h === "recording" && /* @__PURE__ */ t(ce, { children: [
958
972
  /* @__PURE__ */ t(
959
973
  "button",
960
974
  {
@@ -962,7 +976,7 @@ const fe = {
962
976
  onClick: ae,
963
977
  children: [
964
978
  /* @__PURE__ */ e("span", { className: "nice-screen-recorder__icon", children: /* @__PURE__ */ e(m, { name: "pause", size: 18 }) }),
965
- /* @__PURE__ */ e("span", { children: r("screenRecorder.pause", "Pause") })
979
+ /* @__PURE__ */ e("span", { children: n("screenRecorder.pause", "Pause") })
966
980
  ]
967
981
  }
968
982
  ),
@@ -973,12 +987,12 @@ const fe = {
973
987
  onClick: Q,
974
988
  children: [
975
989
  /* @__PURE__ */ e("span", { className: "nice-screen-recorder__icon", children: /* @__PURE__ */ e(m, { name: "stop", size: 18 }) }),
976
- /* @__PURE__ */ e("span", { children: r("screenRecorder.stop", "Stop") })
990
+ /* @__PURE__ */ e("span", { children: n("screenRecorder.stop", "Stop") })
977
991
  ]
978
992
  }
979
993
  )
980
994
  ] }),
981
- v === "paused" && /* @__PURE__ */ t(oe, { children: [
995
+ h === "paused" && /* @__PURE__ */ t(ce, { children: [
982
996
  /* @__PURE__ */ t(
983
997
  "button",
984
998
  {
@@ -986,7 +1000,7 @@ const fe = {
986
1000
  onClick: J,
987
1001
  children: [
988
1002
  /* @__PURE__ */ e("span", { className: "nice-screen-recorder__icon", children: /* @__PURE__ */ e(m, { name: "play", size: 18 }) }),
989
- /* @__PURE__ */ e("span", { children: r("screenRecorder.resume", "Resume") })
1003
+ /* @__PURE__ */ e("span", { children: n("screenRecorder.resume", "Resume") })
990
1004
  ]
991
1005
  }
992
1006
  ),
@@ -997,34 +1011,34 @@ const fe = {
997
1011
  onClick: Q,
998
1012
  children: [
999
1013
  /* @__PURE__ */ e("span", { className: "nice-screen-recorder__icon", children: /* @__PURE__ */ e(m, { name: "stop", size: 18 }) }),
1000
- /* @__PURE__ */ e("span", { children: r("screenRecorder.stop", "Stop") })
1014
+ /* @__PURE__ */ e("span", { children: n("screenRecorder.stop", "Stop") })
1001
1015
  ]
1002
1016
  }
1003
1017
  )
1004
1018
  ] }),
1005
- v === "stopped" && /* @__PURE__ */ t(
1019
+ h === "stopped" && /* @__PURE__ */ t(
1006
1020
  "button",
1007
1021
  {
1008
1022
  className: "nice-screen-recorder__control-button nice-screen-recorder__control-button--new",
1009
1023
  onClick: () => {
1010
- k("idle"), H(null), D([]);
1024
+ k("idle"), q(null), D([]);
1011
1025
  },
1012
1026
  children: [
1013
1027
  /* @__PURE__ */ e("span", { className: "nice-screen-recorder__icon", children: /* @__PURE__ */ e(m, { name: "refresh", size: 18 }) }),
1014
- /* @__PURE__ */ e("span", { children: r("screenRecorder.newRecording", "New Recording") })
1028
+ /* @__PURE__ */ e("span", { children: n("screenRecorder.newRecording", "New Recording") })
1015
1029
  ]
1016
1030
  }
1017
1031
  )
1018
1032
  ] }),
1019
1033
  /* @__PURE__ */ t("div", { className: "nice-screen-recorder__controls-secondary", children: [
1020
- (v === "recording" || v === "paused") && /* @__PURE__ */ t(
1034
+ (h === "recording" || h === "paused") && /* @__PURE__ */ t(
1021
1035
  "button",
1022
1036
  {
1023
1037
  className: "nice-screen-recorder__control-button nice-screen-recorder__control-button--marker",
1024
1038
  onClick: () => ee(),
1025
1039
  children: [
1026
1040
  /* @__PURE__ */ e("span", { className: "nice-screen-recorder__icon", children: /* @__PURE__ */ e(m, { name: "tag", size: 18 }) }),
1027
- /* @__PURE__ */ e("span", { children: r("screenRecorder.addMarker", "Add Marker") })
1041
+ /* @__PURE__ */ e("span", { children: n("screenRecorder.addMarker", "Add Marker") })
1028
1042
  ]
1029
1043
  }
1030
1044
  ),
@@ -1032,11 +1046,11 @@ const fe = {
1032
1046
  "button",
1033
1047
  {
1034
1048
  className: `nice-screen-recorder__control-button ${z ? "nice-screen-recorder__control-button--active" : ""}`,
1035
- onClick: () => T(!z),
1036
- disabled: v !== "recording",
1049
+ onClick: () => E(!z),
1050
+ disabled: h !== "recording",
1037
1051
  children: [
1038
1052
  /* @__PURE__ */ e("span", { className: "nice-screen-recorder__icon", children: /* @__PURE__ */ e(m, { name: "pen", size: 18 }) }),
1039
- /* @__PURE__ */ e("span", { children: r("screenRecorder.annotate", "Annotate") })
1053
+ /* @__PURE__ */ e("span", { children: n("screenRecorder.annotate", "Annotate") })
1040
1054
  ]
1041
1055
  }
1042
1056
  ),
@@ -1045,8 +1059,8 @@ const fe = {
1045
1059
  {
1046
1060
  className: "nice-screen-recorder__control-button nice-screen-recorder__control-button--settings",
1047
1061
  onClick: () => W(!G),
1048
- disabled: v === "recording",
1049
- "aria-label": r("screenRecorder.settings", "Settings"),
1062
+ disabled: h === "recording",
1063
+ "aria-label": n("screenRecorder.settings", "Settings"),
1050
1064
  children: /* @__PURE__ */ e("span", { className: "nice-screen-recorder__icon", children: /* @__PURE__ */ e(m, { name: "settings", size: 18 }) })
1051
1065
  }
1052
1066
  )
@@ -1055,17 +1069,17 @@ const fe = {
1055
1069
  /* @__PURE__ */ t("div", { className: "nice-screen-recorder__status", children: [
1056
1070
  /* @__PURE__ */ t("div", { className: "nice-screen-recorder__status-info", children: [
1057
1071
  /* @__PURE__ */ t("span", { className: "nice-screen-recorder__status-item", children: [
1058
- /* @__PURE__ */ e("strong", { children: "Duration:" }),
1072
+ /* @__PURE__ */ e("strong", { children: n("screenRecorder.duration", "Duration:") }),
1059
1073
  " ",
1060
- c((y == null ? void 0 : y.duration) || 0)
1074
+ o((y == null ? void 0 : y.duration) || 0)
1061
1075
  ] }),
1062
1076
  /* @__PURE__ */ t("span", { className: "nice-screen-recorder__status-item", children: [
1063
- /* @__PURE__ */ e("strong", { children: "Size:" }),
1077
+ /* @__PURE__ */ e("strong", { children: n("screenRecorder.size", "Size:") }),
1064
1078
  " ",
1065
1079
  l((y == null ? void 0 : y.size) || 0)
1066
1080
  ] }),
1067
1081
  /* @__PURE__ */ t("span", { className: "nice-screen-recorder__status-item", children: [
1068
- /* @__PURE__ */ e("strong", { children: "Markers:" }),
1082
+ /* @__PURE__ */ e("strong", { children: n("screenRecorder.markers2", "Markers:") }),
1069
1083
  " ",
1070
1084
  N.length
1071
1085
  ] })
@@ -1089,22 +1103,22 @@ const fe = {
1089
1103
  )
1090
1104
  ] })
1091
1105
  ] }),
1092
- z && v === "recording" && /* @__PURE__ */ t("div", { className: "nice-screen-recorder__annotation-tools", children: [
1093
- /* @__PURE__ */ e("div", { className: "nice-screen-recorder__tool-group", children: ["pen", "arrow", "rectangle", "text"].map((n) => /* @__PURE__ */ e(
1106
+ z && h === "recording" && /* @__PURE__ */ t("div", { className: "nice-screen-recorder__annotation-tools", children: [
1107
+ /* @__PURE__ */ e("div", { className: "nice-screen-recorder__tool-group", children: ["pen", "arrow", "rectangle", "text"].map((a) => /* @__PURE__ */ e(
1094
1108
  "button",
1095
1109
  {
1096
- className: `nice-screen-recorder__tool-button ${U === n ? "nice-screen-recorder__tool-button--active" : ""}`,
1097
- onClick: () => ie(n),
1098
- "aria-label": n,
1110
+ className: `nice-screen-recorder__tool-button ${U === a ? "nice-screen-recorder__tool-button--active" : ""}`,
1111
+ onClick: () => ie(a),
1112
+ "aria-label": a,
1099
1113
  children: /* @__PURE__ */ e(
1100
1114
  m,
1101
1115
  {
1102
- name: n === "pen" ? "pen" : n === "arrow" ? "arrow-right" : n === "rectangle" ? "square" : "type",
1116
+ name: a === "pen" ? "pen" : a === "arrow" ? "arrow-right" : a === "rectangle" ? "square" : "type",
1103
1117
  size: 16
1104
1118
  }
1105
1119
  )
1106
1120
  },
1107
- n
1121
+ a
1108
1122
  )) }),
1109
1123
  /* @__PURE__ */ e("div", { className: "nice-screen-recorder__color-group", children: [
1110
1124
  "var(--nice-danger, #ff0000)",
@@ -1113,33 +1127,33 @@ const fe = {
1113
1127
  "var(--nice-warning, #ffff00)",
1114
1128
  "var(--nice-bg, #fff)",
1115
1129
  "var(--nice-text, #000000)"
1116
- ].map((n) => /* @__PURE__ */ e(
1130
+ ].map((a) => /* @__PURE__ */ e(
1117
1131
  "button",
1118
1132
  {
1119
- className: `nice-screen-recorder__color-button ${te === n ? "nice-screen-recorder__color-button--active" : ""}`,
1120
- style: { backgroundColor: n },
1121
- onClick: () => x(n)
1133
+ className: `nice-screen-recorder__color-button ${te === a ? "nice-screen-recorder__color-button--active" : ""}`,
1134
+ style: { backgroundColor: a },
1135
+ onClick: () => x(a)
1122
1136
  },
1123
- n
1137
+ a
1124
1138
  )) })
1125
1139
  ] }),
1126
1140
  N.length > 0 && /* @__PURE__ */ t("div", { className: "nice-screen-recorder__markers", children: [
1127
- /* @__PURE__ */ e("h4", { children: r("screenRecorder.markers", "Markers") }),
1128
- /* @__PURE__ */ e("div", { className: "nice-screen-recorder__markers-list", children: N.map((n) => /* @__PURE__ */ t(
1141
+ /* @__PURE__ */ e("h4", { children: n("screenRecorder.markers", "Markers") }),
1142
+ /* @__PURE__ */ e("div", { className: "nice-screen-recorder__markers-list", children: N.map((a) => /* @__PURE__ */ t(
1129
1143
  "div",
1130
1144
  {
1131
1145
  className: "nice-screen-recorder__marker-item",
1132
- style: { borderLeftColor: n.color },
1146
+ style: { borderLeftColor: a.color },
1133
1147
  children: [
1134
- /* @__PURE__ */ e("span", { className: "nice-screen-recorder__marker-time", children: c(n.time) }),
1148
+ /* @__PURE__ */ e("span", { className: "nice-screen-recorder__marker-time", children: o(a.time) }),
1135
1149
  /* @__PURE__ */ e(
1136
1150
  "input",
1137
1151
  {
1138
1152
  type: "text",
1139
- value: n.label,
1153
+ value: a.label,
1140
1154
  onChange: (d) => {
1141
1155
  D(
1142
- (u) => u.map((h) => h.id === n.id ? { ...h, label: d.target.value } : h)
1156
+ (v) => v.map((p) => p.id === a.id ? { ...p, label: d.target.value } : p)
1143
1157
  );
1144
1158
  },
1145
1159
  className: "nice-screen-recorder__marker-label"
@@ -1148,24 +1162,24 @@ const fe = {
1148
1162
  /* @__PURE__ */ e(
1149
1163
  "button",
1150
1164
  {
1151
- "aria-label": r("screenRecorder.close", "Close"),
1165
+ "aria-label": n("screenRecorder.close", "Close"),
1152
1166
  className: "nice-screen-recorder__marker-remove",
1153
- onClick: () => j(n.id),
1167
+ onClick: () => j(a.id),
1154
1168
  children: /* @__PURE__ */ e(m, { name: "close", size: 16 })
1155
1169
  }
1156
1170
  )
1157
1171
  ]
1158
1172
  },
1159
- n.id
1173
+ a.id
1160
1174
  )) })
1161
1175
  ] }),
1162
1176
  G && /* @__PURE__ */ t("div", { className: "nice-screen-recorder__settings", children: [
1163
1177
  /* @__PURE__ */ t("div", { className: "nice-screen-recorder__settings-header", children: [
1164
- /* @__PURE__ */ e("h3", { children: r("screenRecorder.recordingSettings", "Recording Settings") }),
1178
+ /* @__PURE__ */ e("h3", { children: n("screenRecorder.recordingSettings", "Recording Settings") }),
1165
1179
  /* @__PURE__ */ e(
1166
1180
  "button",
1167
1181
  {
1168
- "aria-label": r("screenRecorder.close", "Close"),
1182
+ "aria-label": n("screenRecorder.close", "Close"),
1169
1183
  className: "nice-screen-recorder__close-button",
1170
1184
  onClick: () => W(!1),
1171
1185
  children: /* @__PURE__ */ e(m, { name: "close", size: 16 })
@@ -1173,38 +1187,38 @@ const fe = {
1173
1187
  )
1174
1188
  ] }),
1175
1189
  /* @__PURE__ */ t("div", { className: "nice-screen-recorder__settings-section", children: [
1176
- /* @__PURE__ */ e("h4", { children: r("screenRecorder.video", "Video") }),
1190
+ /* @__PURE__ */ e("h4", { children: n("screenRecorder.video", "Video") }),
1177
1191
  /* @__PURE__ */ t("label", { children: [
1178
- r("screenRecorder.source", "Source"),
1192
+ n("screenRecorder.source", "Source"),
1179
1193
  /* @__PURE__ */ t(
1180
1194
  "select",
1181
1195
  {
1182
1196
  value: s.video.source,
1183
- onChange: (n) => S({
1197
+ onChange: (a) => C({
1184
1198
  video: {
1185
1199
  ...s.video,
1186
- source: n.target.value
1200
+ source: a.target.value
1187
1201
  }
1188
1202
  }),
1189
1203
  children: [
1190
- /* @__PURE__ */ e("option", { value: "screen", children: r("screenRecorder.entireScreen", "Entire Screen") }),
1191
- /* @__PURE__ */ e("option", { value: "window", children: r("screenRecorder.applicationWindow", "Application Window") }),
1192
- /* @__PURE__ */ e("option", { value: "tab", children: r("screenRecorder.browserTab", "Browser Tab") }),
1193
- /* @__PURE__ */ e("option", { value: "camera", children: r("screenRecorder.camera", "Camera") })
1204
+ /* @__PURE__ */ e("option", { value: "screen", children: n("screenRecorder.entireScreen", "Entire Screen") }),
1205
+ /* @__PURE__ */ e("option", { value: "window", children: n("screenRecorder.applicationWindow", "Application Window") }),
1206
+ /* @__PURE__ */ e("option", { value: "tab", children: n("screenRecorder.browserTab", "Browser Tab") }),
1207
+ /* @__PURE__ */ e("option", { value: "camera", children: n("screenRecorder.camera", "Camera") })
1194
1208
  ]
1195
1209
  }
1196
1210
  )
1197
1211
  ] }),
1198
1212
  /* @__PURE__ */ t("label", { children: [
1199
- r("screenRecorder.resolution", "Resolution"),
1213
+ n("screenRecorder.resolution", "Resolution"),
1200
1214
  /* @__PURE__ */ t(
1201
1215
  "select",
1202
1216
  {
1203
- value: `${(a = s.video.resolution) == null ? void 0 : a.width}x${(o = s.video.resolution) == null ? void 0 : o.height}`,
1204
- onChange: (n) => {
1205
- const [d, u] = n.target.value.split("x").map(Number);
1206
- S({
1207
- video: { ...s.video, resolution: { width: d, height: u } }
1217
+ value: `${(r = s.video.resolution) == null ? void 0 : r.width}x${(c = s.video.resolution) == null ? void 0 : c.height}`,
1218
+ onChange: (a) => {
1219
+ const [d, v] = a.target.value.split("x").map(Number);
1220
+ C({
1221
+ video: { ...s.video, resolution: { width: d, height: v } }
1208
1222
  });
1209
1223
  },
1210
1224
  children: [
@@ -1217,13 +1231,13 @@ const fe = {
1217
1231
  )
1218
1232
  ] }),
1219
1233
  /* @__PURE__ */ t("label", { children: [
1220
- r("screenRecorder.frameRate", "Frame Rate"),
1234
+ n("screenRecorder.frameRate", "Frame Rate"),
1221
1235
  /* @__PURE__ */ t(
1222
1236
  "select",
1223
1237
  {
1224
1238
  value: s.video.frameRate,
1225
- onChange: (n) => S({
1226
- video: { ...s.video, frameRate: parseInt(n.target.value) }
1239
+ onChange: (a) => C({
1240
+ video: { ...s.video, frameRate: parseInt(a.target.value) }
1227
1241
  }),
1228
1242
  children: [
1229
1243
  /* @__PURE__ */ e("option", { value: "15", children: "15 fps" }),
@@ -1240,46 +1254,46 @@ const fe = {
1240
1254
  {
1241
1255
  type: "checkbox",
1242
1256
  checked: s.video.showCursor,
1243
- onChange: (n) => S({
1244
- video: { ...s.video, showCursor: n.target.checked }
1257
+ onChange: (a) => C({
1258
+ video: { ...s.video, showCursor: a.target.checked }
1245
1259
  })
1246
1260
  }
1247
1261
  ),
1248
- r("screenRecorder.showCursor", "Show Cursor")
1262
+ n("screenRecorder.showCursor", "Show Cursor")
1249
1263
  ] })
1250
1264
  ] }),
1251
1265
  /* @__PURE__ */ t("div", { className: "nice-screen-recorder__settings-section", children: [
1252
- /* @__PURE__ */ e("h4", { children: r("screenRecorder.audio", "Audio") }),
1266
+ /* @__PURE__ */ e("h4", { children: n("screenRecorder.audio", "Audio") }),
1253
1267
  /* @__PURE__ */ t("label", { className: "nice-screen-recorder__checkbox-label", children: [
1254
1268
  /* @__PURE__ */ e(
1255
1269
  "input",
1256
1270
  {
1257
1271
  type: "checkbox",
1258
1272
  checked: s.audio.enabled,
1259
- onChange: (n) => S({
1260
- audio: { ...s.audio, enabled: n.target.checked }
1273
+ onChange: (a) => C({
1274
+ audio: { ...s.audio, enabled: a.target.checked }
1261
1275
  })
1262
1276
  }
1263
1277
  ),
1264
- r("screenRecorder.enableAudio", "Enable Audio")
1278
+ n("screenRecorder.enableAudio", "Enable Audio")
1265
1279
  ] }),
1266
- s.audio.enabled && /* @__PURE__ */ t(oe, { children: [
1280
+ s.audio.enabled && /* @__PURE__ */ t(ce, { children: [
1267
1281
  /* @__PURE__ */ t("label", { children: [
1268
- r("screenRecorder.source", "Source"),
1282
+ n("screenRecorder.source", "Source"),
1269
1283
  /* @__PURE__ */ t(
1270
1284
  "select",
1271
1285
  {
1272
1286
  value: s.audio.source,
1273
- onChange: (n) => S({
1287
+ onChange: (a) => C({
1274
1288
  audio: {
1275
1289
  ...s.audio,
1276
- source: n.target.value
1290
+ source: a.target.value
1277
1291
  }
1278
1292
  }),
1279
1293
  children: [
1280
- /* @__PURE__ */ e("option", { value: "system", children: r("screenRecorder.systemAudio", "System Audio") }),
1281
- /* @__PURE__ */ e("option", { value: "microphone", children: r("screenRecorder.microphone", "Microphone") }),
1282
- /* @__PURE__ */ e("option", { value: "both", children: r("screenRecorder.both", "Both") })
1294
+ /* @__PURE__ */ e("option", { value: "system", children: n("screenRecorder.systemAudio", "System Audio") }),
1295
+ /* @__PURE__ */ e("option", { value: "microphone", children: n("screenRecorder.microphone", "Microphone") }),
1296
+ /* @__PURE__ */ e("option", { value: "both", children: n("screenRecorder.both", "Both") })
1283
1297
  ]
1284
1298
  }
1285
1299
  )
@@ -1290,12 +1304,12 @@ const fe = {
1290
1304
  {
1291
1305
  type: "checkbox",
1292
1306
  checked: s.audio.echoCancellation,
1293
- onChange: (n) => S({
1294
- audio: { ...s.audio, echoCancellation: n.target.checked }
1307
+ onChange: (a) => C({
1308
+ audio: { ...s.audio, echoCancellation: a.target.checked }
1295
1309
  })
1296
1310
  }
1297
1311
  ),
1298
- r("screenRecorder.echoCancellation", "Echo Cancellation")
1312
+ n("screenRecorder.echoCancellation", "Echo Cancellation")
1299
1313
  ] }),
1300
1314
  /* @__PURE__ */ t("label", { className: "nice-screen-recorder__checkbox-label", children: [
1301
1315
  /* @__PURE__ */ e(
@@ -1303,51 +1317,51 @@ const fe = {
1303
1317
  {
1304
1318
  type: "checkbox",
1305
1319
  checked: s.audio.noiseSuppression,
1306
- onChange: (n) => S({
1307
- audio: { ...s.audio, noiseSuppression: n.target.checked }
1320
+ onChange: (a) => C({
1321
+ audio: { ...s.audio, noiseSuppression: a.target.checked }
1308
1322
  })
1309
1323
  }
1310
1324
  ),
1311
- r("screenRecorder.noiseSuppression", "Noise Suppression")
1325
+ n("screenRecorder.noiseSuppression", "Noise Suppression")
1312
1326
  ] })
1313
1327
  ] })
1314
1328
  ] }),
1315
1329
  /* @__PURE__ */ t("div", { className: "nice-screen-recorder__settings-section", children: [
1316
- /* @__PURE__ */ e("h4", { children: r("screenRecorder.output", "Output") }),
1330
+ /* @__PURE__ */ e("h4", { children: n("screenRecorder.output", "Output") }),
1317
1331
  /* @__PURE__ */ t("label", { children: [
1318
- r("screenRecorder.format", "Format"),
1332
+ n("screenRecorder.format", "Format"),
1319
1333
  /* @__PURE__ */ t(
1320
1334
  "select",
1321
1335
  {
1322
1336
  value: s.output.format,
1323
- onChange: (n) => S({
1324
- output: { ...s.output, format: n.target.value }
1337
+ onChange: (a) => C({
1338
+ output: { ...s.output, format: a.target.value }
1325
1339
  }),
1326
1340
  children: [
1327
- /* @__PURE__ */ e("option", { value: "webm", children: "WebM (Best Web)" }),
1328
- /* @__PURE__ */ e("option", { value: "mp4", children: "MP4 (Most Compatible)" }),
1329
- /* @__PURE__ */ e("option", { value: "mkv", children: "MKV (Lossless)" })
1341
+ /* @__PURE__ */ e("option", { value: "webm", children: n("screenRecorder.webmBestWeb", "WebM (Best Web)") }),
1342
+ /* @__PURE__ */ e("option", { value: "mp4", children: n("screenRecorder.mp4MostCompatible", "MP4 (Most Compatible)") }),
1343
+ /* @__PURE__ */ e("option", { value: "mkv", children: n("screenRecorder.mkvLossless", "MKV (Lossless)") })
1330
1344
  ]
1331
1345
  }
1332
1346
  )
1333
1347
  ] }),
1334
1348
  /* @__PURE__ */ t("label", { children: [
1335
- r("screenRecorder.quality", "Quality"),
1349
+ n("screenRecorder.quality", "Quality"),
1336
1350
  /* @__PURE__ */ t(
1337
1351
  "select",
1338
1352
  {
1339
1353
  value: s.output.quality,
1340
- onChange: (n) => S({
1354
+ onChange: (a) => C({
1341
1355
  output: {
1342
1356
  ...s.output,
1343
- quality: n.target.value
1357
+ quality: a.target.value
1344
1358
  }
1345
1359
  }),
1346
1360
  children: [
1347
- /* @__PURE__ */ e("option", { value: "low", children: "Low (Smaller file)" }),
1348
- /* @__PURE__ */ e("option", { value: "medium", children: r("screenRecorder.medium", "Medium") }),
1349
- /* @__PURE__ */ e("option", { value: "high", children: "High (Recommended)" }),
1350
- /* @__PURE__ */ e("option", { value: "lossless", children: "Lossless (Largest file)" })
1361
+ /* @__PURE__ */ e("option", { value: "low", children: n("screenRecorder.lowSmallerFile", "Low (Smaller file)") }),
1362
+ /* @__PURE__ */ e("option", { value: "medium", children: n("screenRecorder.medium", "Medium") }),
1363
+ /* @__PURE__ */ e("option", { value: "high", children: n("screenRecorder.highRecommended", "High (Recommended)") }),
1364
+ /* @__PURE__ */ e("option", { value: "lossless", children: n("screenRecorder.losslessLargestFile", "Lossless (Largest file)") })
1351
1365
  ]
1352
1366
  }
1353
1367
  )
@@ -1355,8 +1369,8 @@ const fe = {
1355
1369
  ] })
1356
1370
  ] })
1357
1371
  ] });
1358
- }, we = {
1359
- id: $(),
1372
+ }, Se = {
1373
+ id: M(),
1360
1374
  name: "My Stream",
1361
1375
  protocol: "rtmp",
1362
1376
  destinations: [],
@@ -1399,7 +1413,7 @@ const fe = {
1399
1413
  },
1400
1414
  { platform: "custom-rtmp", name: "Custom RTMP", icon: "link", defaultUrl: "" },
1401
1415
  { platform: "custom-srt", name: "Custom SRT", icon: "lock", defaultUrl: "" }
1402
- ], ce = [
1416
+ ], oe = [
1403
1417
  { type: "camera", name: "Camera", icon: "camera" },
1404
1418
  { type: "screen", name: "Screen Capture", icon: "monitor" },
1405
1419
  { type: "window", name: "Window Capture", icon: "window" },
@@ -1409,17 +1423,17 @@ const fe = {
1409
1423
  { type: "microphone", name: "Microphone", icon: "mic" },
1410
1424
  { type: "system-audio", name: "System Audio", icon: "volume" }
1411
1425
  ], Ie = ({
1412
- config: E,
1426
+ config: $,
1413
1427
  onConfigChange: R,
1414
1428
  onStreamStart: F,
1415
1429
  onStreamStop: L,
1416
1430
  onStatsUpdate: O,
1417
- onError: I,
1418
- className: b = ""
1431
+ onError: T,
1432
+ className: u = ""
1419
1433
  }) => {
1420
- const { t: r } = me(), [s, A] = g(E || we), [y, H] = g(
1434
+ const { t: n } = ue(), [s, A] = f($ || Se), [y, q] = f(
1421
1435
  "sources"
1422
- ), [v, k] = g(!1), [N, D] = g({
1436
+ ), [h, k] = f(!1), [N, D] = f({
1423
1437
  duration: 0,
1424
1438
  viewers: 0,
1425
1439
  peakViewers: 0,
@@ -1428,57 +1442,57 @@ const fe = {
1428
1442
  droppedFrames: 0,
1429
1443
  cpuUsage: 0,
1430
1444
  memoryUsage: 0
1431
- }), [w, B] = g(null), [K, C] = g(!1), [G, W] = g(!1), [z, T] = g([s.layout]), [U, ie] = g(0), te = M(null), x = M(null), f = M(0);
1445
+ }), [w, B] = f(null), [K, S] = f(!1), [G, W] = f(!1), [z, E] = f([s.layout]), [U, ie] = f(0), te = I(null), x = I(null), b = I(0);
1432
1446
  le(() => {
1433
- E && A(E);
1434
- }, [E]), le(() => () => {
1447
+ $ && A($);
1448
+ }, [$]), le(() => () => {
1435
1449
  x.current && clearInterval(x.current);
1436
1450
  }, []);
1437
- const _ = ue(
1451
+ const g = ve(
1438
1452
  (i) => {
1439
- const c = { ...s, ...i };
1440
- A(c), R == null || R(c);
1453
+ const o = { ...s, ...i };
1454
+ A(o), R == null || R(o);
1441
1455
  },
1442
1456
  [s, R]
1443
1457
  ), V = (i) => {
1444
- const c = de.find((a) => a.platform === i), l = {
1445
- id: $(),
1446
- name: (c == null ? void 0 : c.name) || "Custom",
1458
+ const o = de.find((r) => r.platform === i), l = {
1459
+ id: M(),
1460
+ name: (o == null ? void 0 : o.name) || "Custom",
1447
1461
  platform: i,
1448
- url: (c == null ? void 0 : c.defaultUrl) || "",
1462
+ url: (o == null ? void 0 : o.defaultUrl) || "",
1449
1463
  streamKey: "",
1450
1464
  enabled: !0,
1451
1465
  status: "idle"
1452
1466
  };
1453
- _({ destinations: [...s.destinations, l] }), W(!1);
1454
- }, Y = (i, c) => {
1455
- _({
1456
- destinations: s.destinations.map((l) => l.id === i ? { ...l, ...c } : l)
1467
+ g({ destinations: [...s.destinations, l] }), W(!1);
1468
+ }, Y = (i, o) => {
1469
+ g({
1470
+ destinations: s.destinations.map((l) => l.id === i ? { ...l, ...o } : l)
1457
1471
  });
1458
- }, q = (i) => {
1459
- _({ destinations: s.destinations.filter((c) => c.id !== i) });
1472
+ }, H = (i) => {
1473
+ g({ destinations: s.destinations.filter((o) => o.id !== i) });
1460
1474
  }, X = async (i) => {
1461
- const c = ce.find((o) => o.type === i), l = {
1462
- id: $(),
1475
+ const o = oe.find((c) => c.type === i), l = {
1476
+ id: M(),
1463
1477
  type: i,
1464
- name: `${(c == null ? void 0 : c.name) || i} ${s.sources.filter((o) => o.type === i).length + 1}`,
1478
+ name: `${(o == null ? void 0 : o.name) || i} ${s.sources.filter((c) => c.type === i).length + 1}`,
1465
1479
  settings: {},
1466
1480
  volume: 1,
1467
1481
  muted: !1
1468
1482
  };
1469
1483
  try {
1470
1484
  if (i === "camera" || i === "microphone") {
1471
- const o = i === "camera" ? { video: !0 } : { audio: !0 }, d = (await navigator.mediaDevices.enumerateDevices()).filter(
1472
- (u) => i === "camera" ? u.kind === "videoinput" : u.kind === "audioinput"
1485
+ const c = i === "camera" ? { video: !0 } : { audio: !0 }, d = (await navigator.mediaDevices.enumerateDevices()).filter(
1486
+ (v) => i === "camera" ? v.kind === "videoinput" : v.kind === "audioinput"
1473
1487
  );
1474
1488
  d.length > 0 && (l.settings.deviceId = d[0].deviceId);
1475
1489
  } else (i === "screen" || i === "window") && await navigator.mediaDevices.getDisplayMedia({ video: !0 });
1476
- } catch (o) {
1477
- console.warn(`Could not access ${i}:`, o);
1490
+ } catch (c) {
1491
+ console.warn(`Could not access ${i}:`, c);
1478
1492
  }
1479
- _({ sources: [...s.sources, l] });
1480
- const a = {
1481
- id: $(),
1493
+ g({ sources: [...s.sources, l] });
1494
+ const r = {
1495
+ id: M(),
1482
1496
  sourceId: l.id,
1483
1497
  position: { x: 0, y: 0 },
1484
1498
  size: { width: s.layout.canvas.width, height: s.layout.canvas.height },
@@ -1486,46 +1500,46 @@ const fe = {
1486
1500
  opacity: 1,
1487
1501
  zIndex: s.layout.layers.length
1488
1502
  };
1489
- _({
1503
+ g({
1490
1504
  layout: {
1491
1505
  ...s.layout,
1492
- layers: [...s.layout.layers, a]
1506
+ layers: [...s.layout.layers, r]
1493
1507
  }
1494
- }), C(!1);
1495
- }, S = (i, c) => {
1496
- _({
1497
- sources: s.sources.map((l) => l.id === i ? { ...l, ...c } : l)
1508
+ }), S(!1);
1509
+ }, C = (i, o) => {
1510
+ g({
1511
+ sources: s.sources.map((l) => l.id === i ? { ...l, ...o } : l)
1498
1512
  });
1499
1513
  }, Z = (i) => {
1500
- _({
1501
- sources: s.sources.filter((c) => c.id !== i),
1514
+ g({
1515
+ sources: s.sources.filter((o) => o.id !== i),
1502
1516
  layout: {
1503
1517
  ...s.layout,
1504
- layers: s.layout.layers.filter((c) => c.sourceId !== i)
1518
+ layers: s.layout.layers.filter((o) => o.sourceId !== i)
1505
1519
  }
1506
1520
  });
1507
- }, P = (i, c) => {
1508
- _({
1521
+ }, P = (i, o) => {
1522
+ g({
1509
1523
  layout: {
1510
1524
  ...s.layout,
1511
- layers: s.layout.layers.map((l) => l.id === i ? { ...l, ...c } : l)
1525
+ layers: s.layout.layers.map((l) => l.id === i ? { ...l, ...o } : l)
1512
1526
  }
1513
1527
  });
1514
1528
  }, ne = (i) => {
1515
- const c = s.layout.layers.findIndex((l) => l.id === i);
1516
- if (c < s.layout.layers.length - 1) {
1529
+ const o = s.layout.layers.findIndex((l) => l.id === i);
1530
+ if (o < s.layout.layers.length - 1) {
1517
1531
  const l = [...s.layout.layers];
1518
- [l[c], l[c + 1]] = [l[c + 1], l[c]], l.forEach((a, o) => {
1519
- a.zIndex = o;
1520
- }), _({ layout: { ...s.layout, layers: l } });
1532
+ [l[o], l[o + 1]] = [l[o + 1], l[o]], l.forEach((r, c) => {
1533
+ r.zIndex = c;
1534
+ }), g({ layout: { ...s.layout, layers: l } });
1521
1535
  }
1522
1536
  }, ae = (i) => {
1523
- const c = s.layout.layers.findIndex((l) => l.id === i);
1524
- if (c > 0) {
1537
+ const o = s.layout.layers.findIndex((l) => l.id === i);
1538
+ if (o > 0) {
1525
1539
  const l = [...s.layout.layers];
1526
- [l[c], l[c - 1]] = [l[c - 1], l[c]], l.forEach((a, o) => {
1527
- a.zIndex = o;
1528
- }), _({ layout: { ...s.layout, layers: l } });
1540
+ [l[o], l[o - 1]] = [l[o - 1], l[o]], l.forEach((r, c) => {
1541
+ r.zIndex = c;
1542
+ }), g({ layout: { ...s.layout, layers: l } });
1529
1543
  }
1530
1544
  }, J = () => {
1531
1545
  const i = {
@@ -1533,23 +1547,23 @@ const fe = {
1533
1547
  canvas: { ...s.layout.canvas },
1534
1548
  layers: []
1535
1549
  };
1536
- T([...z, i]);
1550
+ E([...z, i]);
1537
1551
  }, Q = (i) => {
1538
- const c = [...z];
1539
- c[U] = s.layout, T(c), ie(i), _({ layout: z[i] });
1552
+ const o = [...z];
1553
+ o[U] = s.layout, E(o), ie(i), g({ layout: z[i] });
1540
1554
  }, ee = async () => {
1541
1555
  try {
1542
- _({
1556
+ g({
1543
1557
  destinations: s.destinations.map(
1544
1558
  (i) => i.enabled ? { ...i, status: "connecting" } : i
1545
1559
  )
1546
- }), await new Promise((i) => setTimeout(i, 2e3)), _({
1560
+ }), await new Promise((i) => setTimeout(i, 2e3)), g({
1547
1561
  destinations: s.destinations.map(
1548
1562
  (i) => i.enabled ? { ...i, status: "live" } : i
1549
1563
  )
1550
- }), k(!0), f.current = Date.now(), F == null || F(), x.current = setInterval(() => {
1564
+ }), k(!0), b.current = Date.now(), F == null || F(), x.current = setInterval(() => {
1551
1565
  const i = {
1552
- duration: (Date.now() - f.current) / 1e3,
1566
+ duration: (Date.now() - b.current) / 1e3,
1553
1567
  viewers: Math.floor(Math.random() * 100) + N.viewers,
1554
1568
  peakViewers: Math.max(N.peakViewers, N.viewers),
1555
1569
  bitrate: s.settings.video.bitrate + Math.floor(Math.random() * 500 - 250),
@@ -1561,21 +1575,21 @@ const fe = {
1561
1575
  D(i), O == null || O(i);
1562
1576
  }, 1e3);
1563
1577
  } catch (i) {
1564
- I == null || I(i instanceof Error ? i : new Error("Failed to start stream")), _({
1565
- destinations: s.destinations.map((c) => ({
1566
- ...c,
1578
+ T == null || T(i instanceof Error ? i : new Error("Failed to start stream")), g({
1579
+ destinations: s.destinations.map((o) => ({
1580
+ ...o,
1567
1581
  status: "error"
1568
1582
  }))
1569
1583
  });
1570
1584
  }
1571
1585
  }, j = () => {
1572
- x.current && clearInterval(x.current), _({
1586
+ x.current && clearInterval(x.current), g({
1573
1587
  destinations: s.destinations.map((i) => ({ ...i, status: "idle" }))
1574
1588
  }), k(!1), L == null || L();
1575
- }, se = (i) => {
1576
- const c = Math.floor(i / 3600), l = Math.floor(i % 3600 / 60), a = Math.floor(i % 60);
1577
- return `${c.toString().padStart(2, "0")}:${l.toString().padStart(2, "0")}:${a.toString().padStart(2, "0")}`;
1578
1589
  }, re = (i) => {
1590
+ const o = Math.floor(i / 3600), l = Math.floor(i % 3600 / 60), r = Math.floor(i % 60);
1591
+ return `${o.toString().padStart(2, "0")}:${l.toString().padStart(2, "0")}:${r.toString().padStart(2, "0")}`;
1592
+ }, se = (i) => {
1579
1593
  switch (i) {
1580
1594
  case "live":
1581
1595
  return "var(--nice-success, #00ff00)";
@@ -1587,7 +1601,7 @@ const fe = {
1587
1601
  return "var(--nice-text-secondary, #888888)";
1588
1602
  }
1589
1603
  };
1590
- return /* @__PURE__ */ t("div", { className: `nice-live-streaming ${b}`, children: [
1604
+ return /* @__PURE__ */ t("div", { className: `nice-live-streaming ${u}`, children: [
1591
1605
  /* @__PURE__ */ t("header", { className: "nice-live-streaming__header", children: [
1592
1606
  /* @__PURE__ */ t("div", { className: "nice-live-streaming__header-title", children: [
1593
1607
  /* @__PURE__ */ e(
@@ -1595,21 +1609,21 @@ const fe = {
1595
1609
  {
1596
1610
  type: "text",
1597
1611
  value: s.name,
1598
- onChange: (i) => _({ name: i.target.value }),
1612
+ onChange: (i) => g({ name: i.target.value }),
1599
1613
  className: "nice-live-streaming__stream-name-input"
1600
1614
  }
1601
1615
  ),
1602
- v && /* @__PURE__ */ t("span", { className: "nice-live-streaming__live-badge", children: [
1616
+ h && /* @__PURE__ */ t("span", { className: "nice-live-streaming__live-badge", children: [
1603
1617
  /* @__PURE__ */ e("span", { className: "nice-live-streaming__live-dot" }),
1604
1618
  " ",
1605
- r("liveStreaming.live", "LIVE")
1619
+ n("liveStreaming.live", "LIVE")
1606
1620
  ] })
1607
1621
  ] }),
1608
- /* @__PURE__ */ e("div", { className: "nice-live-streaming__header-stats", children: v && /* @__PURE__ */ t(oe, { children: [
1622
+ /* @__PURE__ */ e("div", { className: "nice-live-streaming__header-stats", children: h && /* @__PURE__ */ t(ce, { children: [
1609
1623
  /* @__PURE__ */ t("span", { className: "nice-live-streaming__stat-item", children: [
1610
1624
  /* @__PURE__ */ e(m, { name: "clock", size: 14 }),
1611
1625
  " ",
1612
- se(N.duration)
1626
+ re(N.duration)
1613
1627
  ] }),
1614
1628
  /* @__PURE__ */ t("span", { className: "nice-live-streaming__stat-item", children: [
1615
1629
  /* @__PURE__ */ e(m, { name: "users", size: 14 }),
@@ -1619,8 +1633,10 @@ const fe = {
1619
1633
  /* @__PURE__ */ t("span", { className: "nice-live-streaming__stat-item", children: [
1620
1634
  /* @__PURE__ */ e(m, { name: "bar-chart", size: 14 }),
1621
1635
  " ",
1622
- Math.round(N.bitrate),
1623
- " kbps"
1636
+ n("liveStreaming.kbps", "{bitrate} kbps").replace(
1637
+ "{bitrate}",
1638
+ String(Math.round(N.bitrate))
1639
+ )
1624
1640
  ] }),
1625
1641
  /* @__PURE__ */ t("span", { className: "nice-live-streaming__stat-item", children: [
1626
1642
  /* @__PURE__ */ e(m, { name: "video", size: 14 }),
@@ -1629,12 +1645,12 @@ const fe = {
1629
1645
  " fps"
1630
1646
  ] })
1631
1647
  ] }) }),
1632
- /* @__PURE__ */ e("div", { className: "nice-live-streaming__header-actions", children: v ? /* @__PURE__ */ e(
1648
+ /* @__PURE__ */ e("div", { className: "nice-live-streaming__header-actions", children: h ? /* @__PURE__ */ e(
1633
1649
  "button",
1634
1650
  {
1635
1651
  className: "nice-live-streaming__action-button nice-live-streaming__action-button--stop",
1636
1652
  onClick: j,
1637
- children: r("liveStreaming.endStream", "End Stream")
1653
+ children: n("liveStreaming.endStream", "End Stream")
1638
1654
  }
1639
1655
  ) : /* @__PURE__ */ e(
1640
1656
  "button",
@@ -1642,21 +1658,21 @@ const fe = {
1642
1658
  className: "nice-live-streaming__action-button nice-live-streaming__action-button--go-live",
1643
1659
  onClick: ee,
1644
1660
  disabled: s.destinations.filter((i) => i.enabled).length === 0,
1645
- children: r("liveStreaming.goLive", "Go Live")
1661
+ children: n("liveStreaming.goLive", "Go Live")
1646
1662
  }
1647
1663
  ) })
1648
1664
  ] }),
1649
1665
  /* @__PURE__ */ t("div", { className: "nice-live-streaming__main", children: [
1650
1666
  /* @__PURE__ */ t("div", { className: "nice-live-streaming__preview", children: [
1651
1667
  /* @__PURE__ */ t("div", { className: "nice-live-streaming__scenes-bar", children: [
1652
- z.map((i, c) => /* @__PURE__ */ e(
1668
+ z.map((i, o) => /* @__PURE__ */ e(
1653
1669
  "button",
1654
1670
  {
1655
- className: `nice-live-streaming__scene-button ${U === c ? "nice-live-streaming__scene-button--active" : ""}`,
1656
- onClick: () => Q(c),
1671
+ className: `nice-live-streaming__scene-button ${U === o ? "nice-live-streaming__scene-button--active" : ""}`,
1672
+ onClick: () => Q(o),
1657
1673
  children: i.name
1658
1674
  },
1659
- c
1675
+ o
1660
1676
  )),
1661
1677
  /* @__PURE__ */ e(
1662
1678
  "button",
@@ -1676,12 +1692,13 @@ const fe = {
1676
1692
  aspectRatio: `${s.layout.canvas.width}/${s.layout.canvas.height}`,
1677
1693
  backgroundColor: s.layout.canvas.backgroundColor
1678
1694
  },
1679
- children: s.layout.layers.sort((i, c) => i.zIndex - c.zIndex).map((i) => {
1695
+ children: s.layout.layers.sort((i, o) => i.zIndex - o.zIndex).map((i) => {
1680
1696
  var l;
1681
- const c = s.sources.find((a) => a.id === i.sourceId);
1682
- return !i.visible || !c ? null : /* @__PURE__ */ e(
1697
+ const o = s.sources.find((r) => r.id === i.sourceId);
1698
+ return !i.visible || !o ? null : /* @__PURE__ */ e(
1683
1699
  "div",
1684
1700
  {
1701
+ role: "presentation",
1685
1702
  className: `nice-live-streaming__canvas-layer ${w === i.id ? "nice-live-streaming__canvas-layer--selected" : ""}`,
1686
1703
  style: {
1687
1704
  left: `${i.position.x / s.layout.canvas.width * 100}%`,
@@ -1696,11 +1713,11 @@ const fe = {
1696
1713
  /* @__PURE__ */ e("span", { className: "nice-live-streaming__layer-icon", children: /* @__PURE__ */ e(
1697
1714
  m,
1698
1715
  {
1699
- name: ((l = ce.find((a) => a.type === c.type)) == null ? void 0 : l.icon) ?? "box",
1716
+ name: ((l = oe.find((r) => r.type === o.type)) == null ? void 0 : l.icon) ?? "box",
1700
1717
  size: 16
1701
1718
  }
1702
1719
  ) }),
1703
- /* @__PURE__ */ e("span", { className: "nice-live-streaming__layer-name", children: c.name })
1720
+ /* @__PURE__ */ e("span", { className: "nice-live-streaming__layer-name", children: o.name })
1704
1721
  ] })
1705
1722
  },
1706
1723
  i.id
@@ -1714,7 +1731,7 @@ const fe = {
1714
1731
  "button",
1715
1732
  {
1716
1733
  className: `nice-live-streaming__panel-tab ${y === i ? "nice-live-streaming__panel-tab--active" : ""}`,
1717
- onClick: () => H(i),
1734
+ onClick: () => q(i),
1718
1735
  children: i.charAt(0).toUpperCase() + i.slice(1)
1719
1736
  },
1720
1737
  i
@@ -1722,30 +1739,33 @@ const fe = {
1722
1739
  /* @__PURE__ */ t("div", { className: "nice-live-streaming__panel-content", children: [
1723
1740
  y === "sources" && /* @__PURE__ */ t("div", { className: "nice-live-streaming__sources-panel", children: [
1724
1741
  /* @__PURE__ */ t("div", { className: "nice-live-streaming__panel-header", children: [
1725
- /* @__PURE__ */ e("h3", { children: r("liveStreaming.sources", "Sources") }),
1742
+ /* @__PURE__ */ e("h3", { children: n("liveStreaming.sources", "Sources") }),
1726
1743
  /* @__PURE__ */ e(
1727
1744
  "button",
1728
1745
  {
1729
1746
  className: "nice-live-streaming__add-button",
1730
- onClick: () => C(!0),
1731
- disabled: v,
1732
- children: "+ Add"
1747
+ onClick: () => S(!0),
1748
+ disabled: h,
1749
+ children: n("liveStreaming.add", "+ Add")
1733
1750
  }
1734
1751
  )
1735
1752
  ] }),
1736
1753
  /* @__PURE__ */ e("div", { className: "nice-live-streaming__sources-list", children: s.sources.filter((i) => i.type !== "microphone" && i.type !== "system-audio").map((i) => {
1737
1754
  var l;
1738
- const c = s.layout.layers.find((a) => a.sourceId === i.id);
1755
+ const o = s.layout.layers.find((r) => r.sourceId === i.id);
1739
1756
  return /* @__PURE__ */ t(
1740
1757
  "div",
1741
1758
  {
1742
- className: `nice-live-streaming__source-item ${w === (c == null ? void 0 : c.id) ? "nice-live-streaming__source-item--selected" : ""}`,
1743
- onClick: () => c && B(c.id),
1759
+ role: o ? "button" : void 0,
1760
+ tabIndex: o ? 0 : void 0,
1761
+ onKeyDown: o ? me : void 0,
1762
+ className: `nice-live-streaming__source-item ${w === (o == null ? void 0 : o.id) ? "nice-live-streaming__source-item--selected" : ""}`,
1763
+ onClick: () => o && B(o.id),
1744
1764
  children: [
1745
1765
  /* @__PURE__ */ e("span", { className: "nice-live-streaming__source-icon", children: /* @__PURE__ */ e(
1746
1766
  m,
1747
1767
  {
1748
- name: ((l = ce.find((a) => a.type === i.type)) == null ? void 0 : l.icon) ?? "box",
1768
+ name: ((l = oe.find((r) => r.type === i.type)) == null ? void 0 : l.icon) ?? "box",
1749
1769
  size: 16
1750
1770
  }
1751
1771
  ) }),
@@ -1754,18 +1774,18 @@ const fe = {
1754
1774
  /* @__PURE__ */ e(
1755
1775
  "button",
1756
1776
  {
1757
- className: `nice-live-streaming__visibility-toggle ${c != null && c.visible ? "" : "nice-live-streaming__visibility-toggle--hidden"}`,
1758
- onClick: (a) => {
1759
- a.stopPropagation(), c && P(c.id, { visible: !c.visible });
1777
+ className: `nice-live-streaming__visibility-toggle ${o != null && o.visible ? "" : "nice-live-streaming__visibility-toggle--hidden"}`,
1778
+ onClick: (r) => {
1779
+ r.stopPropagation(), o && P(o.id, { visible: !o.visible });
1760
1780
  },
1761
- children: /* @__PURE__ */ e(m, { name: c != null && c.visible ? "eye" : "eye-off", size: 14 })
1781
+ children: /* @__PURE__ */ e(m, { name: o != null && o.visible ? "eye" : "eye-off", size: 14 })
1762
1782
  }
1763
1783
  ),
1764
1784
  /* @__PURE__ */ e(
1765
1785
  "button",
1766
1786
  {
1767
- onClick: (a) => {
1768
- a.stopPropagation(), c && ne(c.id);
1787
+ onClick: (r) => {
1788
+ r.stopPropagation(), o && ne(o.id);
1769
1789
  },
1770
1790
  children: /* @__PURE__ */ e(m, { name: "arrow-up", size: 14 })
1771
1791
  }
@@ -1773,8 +1793,8 @@ const fe = {
1773
1793
  /* @__PURE__ */ e(
1774
1794
  "button",
1775
1795
  {
1776
- onClick: (a) => {
1777
- a.stopPropagation(), c && ae(c.id);
1796
+ onClick: (r) => {
1797
+ r.stopPropagation(), o && ae(o.id);
1778
1798
  },
1779
1799
  children: /* @__PURE__ */ e(m, { name: "arrow-down", size: 14 })
1780
1800
  }
@@ -1782,10 +1802,10 @@ const fe = {
1782
1802
  /* @__PURE__ */ e(
1783
1803
  "button",
1784
1804
  {
1785
- onClick: (a) => {
1786
- a.stopPropagation(), Z(i.id);
1805
+ onClick: (r) => {
1806
+ r.stopPropagation(), Z(i.id);
1787
1807
  },
1788
- disabled: v,
1808
+ disabled: h,
1789
1809
  children: /* @__PURE__ */ e(m, { name: "trash", size: 14 })
1790
1810
  }
1791
1811
  )
@@ -1796,64 +1816,64 @@ const fe = {
1796
1816
  );
1797
1817
  }) }),
1798
1818
  w && /* @__PURE__ */ t("div", { className: "nice-live-streaming__layer-properties", children: [
1799
- /* @__PURE__ */ e("h4", { children: r("liveStreaming.properties", "Properties") }),
1819
+ /* @__PURE__ */ e("h4", { children: n("liveStreaming.properties", "Properties") }),
1800
1820
  (() => {
1801
- const i = s.layout.layers.find((c) => c.id === w);
1802
- return i ? /* @__PURE__ */ t(oe, { children: [
1821
+ const i = s.layout.layers.find((o) => o.id === w);
1822
+ return i ? /* @__PURE__ */ t(ce, { children: [
1803
1823
  /* @__PURE__ */ t("label", { children: [
1804
- r("liveStreaming.xPosition", "X Position"),
1824
+ n("liveStreaming.xPosition", "X Position"),
1805
1825
  /* @__PURE__ */ e(
1806
1826
  "input",
1807
1827
  {
1808
1828
  type: "number",
1809
1829
  value: i.position.x,
1810
- onChange: (c) => P(i.id, {
1811
- position: { ...i.position, x: parseInt(c.target.value) || 0 }
1830
+ onChange: (o) => P(i.id, {
1831
+ position: { ...i.position, x: parseInt(o.target.value) || 0 }
1812
1832
  })
1813
1833
  }
1814
1834
  )
1815
1835
  ] }),
1816
1836
  /* @__PURE__ */ t("label", { children: [
1817
- r("liveStreaming.yPosition", "Y Position"),
1837
+ n("liveStreaming.yPosition", "Y Position"),
1818
1838
  /* @__PURE__ */ e(
1819
1839
  "input",
1820
1840
  {
1821
1841
  type: "number",
1822
1842
  value: i.position.y,
1823
- onChange: (c) => P(i.id, {
1824
- position: { ...i.position, y: parseInt(c.target.value) || 0 }
1843
+ onChange: (o) => P(i.id, {
1844
+ position: { ...i.position, y: parseInt(o.target.value) || 0 }
1825
1845
  })
1826
1846
  }
1827
1847
  )
1828
1848
  ] }),
1829
1849
  /* @__PURE__ */ t("label", { children: [
1830
- r("liveStreaming.width", "Width"),
1850
+ n("liveStreaming.width", "Width"),
1831
1851
  /* @__PURE__ */ e(
1832
1852
  "input",
1833
1853
  {
1834
1854
  type: "number",
1835
1855
  value: i.size.width,
1836
- onChange: (c) => P(i.id, {
1837
- size: { ...i.size, width: parseInt(c.target.value) || 100 }
1856
+ onChange: (o) => P(i.id, {
1857
+ size: { ...i.size, width: parseInt(o.target.value) || 100 }
1838
1858
  })
1839
1859
  }
1840
1860
  )
1841
1861
  ] }),
1842
1862
  /* @__PURE__ */ t("label", { children: [
1843
- r("liveStreaming.height", "Height"),
1863
+ n("liveStreaming.height", "Height"),
1844
1864
  /* @__PURE__ */ e(
1845
1865
  "input",
1846
1866
  {
1847
1867
  type: "number",
1848
1868
  value: i.size.height,
1849
- onChange: (c) => P(i.id, {
1850
- size: { ...i.size, height: parseInt(c.target.value) || 100 }
1869
+ onChange: (o) => P(i.id, {
1870
+ size: { ...i.size, height: parseInt(o.target.value) || 100 }
1851
1871
  })
1852
1872
  }
1853
1873
  )
1854
1874
  ] }),
1855
1875
  /* @__PURE__ */ t("label", { children: [
1856
- r("liveStreaming.opacity", "Opacity"),
1876
+ n("liveStreaming.opacity", "Opacity"),
1857
1877
  /* @__PURE__ */ e(
1858
1878
  "input",
1859
1879
  {
@@ -1862,8 +1882,8 @@ const fe = {
1862
1882
  max: "1",
1863
1883
  step: "0.1",
1864
1884
  value: i.opacity,
1865
- onChange: (c) => P(i.id, {
1866
- opacity: parseFloat(c.target.value)
1885
+ onChange: (o) => P(i.id, {
1886
+ opacity: parseFloat(o.target.value)
1867
1887
  })
1868
1888
  }
1869
1889
  )
@@ -1874,16 +1894,16 @@ const fe = {
1874
1894
  ] }),
1875
1895
  y === "audio" && /* @__PURE__ */ t("div", { className: "nice-live-streaming__audio-panel", children: [
1876
1896
  /* @__PURE__ */ t("div", { className: "nice-live-streaming__panel-header", children: [
1877
- /* @__PURE__ */ e("h3", { children: r("liveStreaming.audioMixer", "Audio Mixer") }),
1897
+ /* @__PURE__ */ e("h3", { children: n("liveStreaming.audioMixer", "Audio Mixer") }),
1878
1898
  /* @__PURE__ */ e(
1879
1899
  "button",
1880
1900
  {
1881
1901
  className: "nice-live-streaming__add-button",
1882
1902
  onClick: () => {
1883
- C(!0);
1903
+ S(!0);
1884
1904
  },
1885
- disabled: v,
1886
- children: "+ Add"
1905
+ disabled: h,
1906
+ children: n("liveStreaming.add", "+ Add")
1887
1907
  }
1888
1908
  )
1889
1909
  ] }),
@@ -1891,13 +1911,13 @@ const fe = {
1891
1911
  s.sources.filter(
1892
1912
  (i) => i.type === "microphone" || i.type === "system-audio" || i.type === "video"
1893
1913
  ).map((i) => {
1894
- var c;
1914
+ var o;
1895
1915
  return /* @__PURE__ */ t("div", { className: "nice-live-streaming__audio-source", children: [
1896
1916
  /* @__PURE__ */ t("div", { className: "nice-live-streaming__audio-header", children: [
1897
1917
  /* @__PURE__ */ e("span", { className: "nice-live-streaming__audio-icon", children: /* @__PURE__ */ e(
1898
1918
  m,
1899
1919
  {
1900
- name: ((c = ce.find((l) => l.type === i.type)) == null ? void 0 : c.icon) ?? "box",
1920
+ name: ((o = oe.find((l) => l.type === i.type)) == null ? void 0 : o.icon) ?? "box",
1901
1921
  size: 16
1902
1922
  }
1903
1923
  ) }),
@@ -1906,7 +1926,7 @@ const fe = {
1906
1926
  "button",
1907
1927
  {
1908
1928
  className: `nice-live-streaming__mute-toggle ${i.muted ? "nice-live-streaming__mute-toggle--muted" : ""}`,
1909
- onClick: () => S(i.id, { muted: !i.muted }),
1929
+ onClick: () => C(i.id, { muted: !i.muted }),
1910
1930
  children: /* @__PURE__ */ e(m, { name: i.muted ? "volume-off" : "volume", size: 14 })
1911
1931
  }
1912
1932
  )
@@ -1920,7 +1940,7 @@ const fe = {
1920
1940
  max: "1",
1921
1941
  step: "0.01",
1922
1942
  value: i.volume ?? 1,
1923
- onChange: (l) => S(i.id, { volume: parseFloat(l.target.value) }),
1943
+ onChange: (l) => C(i.id, { volume: parseFloat(l.target.value) }),
1924
1944
  disabled: i.muted
1925
1945
  }
1926
1946
  ),
@@ -1940,38 +1960,38 @@ const fe = {
1940
1960
  }),
1941
1961
  s.sources.filter(
1942
1962
  (i) => i.type === "microphone" || i.type === "system-audio"
1943
- ).length === 0 && /* @__PURE__ */ e("p", { className: "nice-live-streaming__empty-message", children: r("liveStreaming.noAudioSourcesAdded", "No audio sources added") })
1963
+ ).length === 0 && /* @__PURE__ */ e("p", { className: "nice-live-streaming__empty-message", children: n("liveStreaming.noAudioSourcesAdded", "No audio sources added") })
1944
1964
  ] })
1945
1965
  ] }),
1946
1966
  y === "destinations" && /* @__PURE__ */ t("div", { className: "nice-live-streaming__destinations-panel", children: [
1947
1967
  /* @__PURE__ */ t("div", { className: "nice-live-streaming__panel-header", children: [
1948
- /* @__PURE__ */ e("h3", { children: r("liveStreaming.destinations", "Destinations") }),
1968
+ /* @__PURE__ */ e("h3", { children: n("liveStreaming.destinations", "Destinations") }),
1949
1969
  /* @__PURE__ */ e(
1950
1970
  "button",
1951
1971
  {
1952
1972
  className: "nice-live-streaming__add-button",
1953
1973
  onClick: () => W(!0),
1954
- disabled: v,
1955
- children: "+ Add"
1974
+ disabled: h,
1975
+ children: n("liveStreaming.add", "+ Add")
1956
1976
  }
1957
1977
  )
1958
1978
  ] }),
1959
1979
  /* @__PURE__ */ t("div", { className: "nice-live-streaming__destinations-list", children: [
1960
1980
  s.destinations.map((i) => {
1961
- var c;
1981
+ var o;
1962
1982
  return /* @__PURE__ */ t("div", { className: "nice-live-streaming__destination-item", children: [
1963
1983
  /* @__PURE__ */ t("div", { className: "nice-live-streaming__destination-header", children: [
1964
1984
  /* @__PURE__ */ e(
1965
1985
  "span",
1966
1986
  {
1967
1987
  className: "nice-live-streaming__status-indicator",
1968
- style: { backgroundColor: re(i.status) }
1988
+ style: { backgroundColor: se(i.status) }
1969
1989
  }
1970
1990
  ),
1971
1991
  /* @__PURE__ */ e("span", { className: "nice-live-streaming__destination-icon", children: /* @__PURE__ */ e(
1972
1992
  m,
1973
1993
  {
1974
- name: ((c = de.find((l) => l.platform === i.platform)) == null ? void 0 : c.icon) ?? "link",
1994
+ name: ((o = de.find((l) => l.platform === i.platform)) == null ? void 0 : o.icon) ?? "link",
1975
1995
  size: 16
1976
1996
  }
1977
1997
  ) }),
@@ -1983,7 +2003,7 @@ const fe = {
1983
2003
  type: "checkbox",
1984
2004
  checked: i.enabled,
1985
2005
  onChange: (l) => Y(i.id, { enabled: l.target.checked }),
1986
- disabled: v
2006
+ disabled: h
1987
2007
  }
1988
2008
  ),
1989
2009
  /* @__PURE__ */ e("span", { className: "nice-live-streaming__toggle-slider" })
@@ -1991,28 +2011,28 @@ const fe = {
1991
2011
  ] }),
1992
2012
  /* @__PURE__ */ t("div", { className: "nice-live-streaming__destination-config", children: [
1993
2013
  /* @__PURE__ */ t("label", { children: [
1994
- r("liveStreaming.serverUrl", "Server URL"),
2014
+ n("liveStreaming.serverUrl", "Server URL"),
1995
2015
  /* @__PURE__ */ e(
1996
2016
  "input",
1997
2017
  {
1998
2018
  type: "text",
1999
2019
  value: i.url,
2000
2020
  onChange: (l) => Y(i.id, { url: l.target.value }),
2001
- placeholder: r("liveStreaming.rtmp", "rtmp://..."),
2002
- disabled: v
2021
+ placeholder: n("liveStreaming.rtmp", "rtmp://..."),
2022
+ disabled: h
2003
2023
  }
2004
2024
  )
2005
2025
  ] }),
2006
2026
  /* @__PURE__ */ t("label", { children: [
2007
- r("liveStreaming.streamKey", "Stream Key"),
2027
+ n("liveStreaming.streamKey", "Stream Key"),
2008
2028
  /* @__PURE__ */ e(
2009
2029
  "input",
2010
2030
  {
2011
2031
  type: "password",
2012
2032
  value: i.streamKey || "",
2013
2033
  onChange: (l) => Y(i.id, { streamKey: l.target.value }),
2014
- placeholder: r("liveStreaming.enterStreamKey", "Enter stream key"),
2015
- disabled: v
2034
+ placeholder: n("liveStreaming.enterStreamKey", "Enter stream key"),
2035
+ disabled: h
2016
2036
  }
2017
2037
  )
2018
2038
  ] })
@@ -2021,39 +2041,39 @@ const fe = {
2021
2041
  "button",
2022
2042
  {
2023
2043
  className: "nice-live-streaming__remove-button",
2024
- onClick: () => q(i.id),
2025
- disabled: v,
2026
- children: r("liveStreaming.remove", "Remove")
2044
+ onClick: () => H(i.id),
2045
+ disabled: h,
2046
+ children: n("liveStreaming.remove", "Remove")
2027
2047
  }
2028
2048
  )
2029
2049
  ] }, i.id);
2030
2050
  }),
2031
- s.destinations.length === 0 && /* @__PURE__ */ e("p", { className: "nice-live-streaming__empty-message", children: r("liveStreaming.noDestinationsConfigured", "No destinations configured") })
2051
+ s.destinations.length === 0 && /* @__PURE__ */ e("p", { className: "nice-live-streaming__empty-message", children: n("liveStreaming.noDestinationsConfigured", "No destinations configured") })
2032
2052
  ] })
2033
2053
  ] }),
2034
2054
  y === "settings" && /* @__PURE__ */ t("div", { className: "nice-live-streaming__settings-panel", children: [
2035
2055
  /* @__PURE__ */ t("div", { className: "nice-live-streaming__setting-section", children: [
2036
- /* @__PURE__ */ e("h4", { children: r("liveStreaming.video", "Video") }),
2056
+ /* @__PURE__ */ e("h4", { children: n("liveStreaming.video", "Video") }),
2037
2057
  /* @__PURE__ */ t("label", { children: [
2038
- r("liveStreaming.resolution", "Resolution"),
2058
+ n("liveStreaming.resolution", "Resolution"),
2039
2059
  /* @__PURE__ */ t(
2040
2060
  "select",
2041
2061
  {
2042
2062
  value: `${s.settings.video.resolution.width}x${s.settings.video.resolution.height}`,
2043
2063
  onChange: (i) => {
2044
- const [c, l] = i.target.value.split("x").map(Number);
2045
- _({
2064
+ const [o, l] = i.target.value.split("x").map(Number);
2065
+ g({
2046
2066
  settings: {
2047
2067
  ...s.settings,
2048
- video: { ...s.settings.video, resolution: { width: c, height: l } }
2068
+ video: { ...s.settings.video, resolution: { width: o, height: l } }
2049
2069
  },
2050
2070
  layout: {
2051
2071
  ...s.layout,
2052
- canvas: { ...s.layout.canvas, width: c, height: l }
2072
+ canvas: { ...s.layout.canvas, width: o, height: l }
2053
2073
  }
2054
2074
  });
2055
2075
  },
2056
- disabled: v,
2076
+ disabled: h,
2057
2077
  children: [
2058
2078
  /* @__PURE__ */ e("option", { value: "1920x1080", children: "1080p (1920x1080)" }),
2059
2079
  /* @__PURE__ */ e("option", { value: "1280x720", children: "720p (1280x720)" }),
@@ -2063,12 +2083,12 @@ const fe = {
2063
2083
  )
2064
2084
  ] }),
2065
2085
  /* @__PURE__ */ t("label", { children: [
2066
- r("liveStreaming.frameRate", "Frame Rate"),
2086
+ n("liveStreaming.frameRate", "Frame Rate"),
2067
2087
  /* @__PURE__ */ t(
2068
2088
  "select",
2069
2089
  {
2070
2090
  value: s.settings.video.frameRate,
2071
- onChange: (i) => _({
2091
+ onChange: (i) => g({
2072
2092
  settings: {
2073
2093
  ...s.settings,
2074
2094
  video: {
@@ -2077,7 +2097,7 @@ const fe = {
2077
2097
  }
2078
2098
  }
2079
2099
  }),
2080
- disabled: v,
2100
+ disabled: h,
2081
2101
  children: [
2082
2102
  /* @__PURE__ */ e("option", { value: "24", children: "24 fps" }),
2083
2103
  /* @__PURE__ */ e("option", { value: "30", children: "30 fps" }),
@@ -2087,13 +2107,13 @@ const fe = {
2087
2107
  )
2088
2108
  ] }),
2089
2109
  /* @__PURE__ */ t("label", { children: [
2090
- "Bitrate (kbps)",
2110
+ n("liveStreaming.bitrateKbps", "Bitrate (kbps)"),
2091
2111
  /* @__PURE__ */ e(
2092
2112
  "input",
2093
2113
  {
2094
2114
  type: "number",
2095
2115
  value: s.settings.video.bitrate,
2096
- onChange: (i) => _({
2116
+ onChange: (i) => g({
2097
2117
  settings: {
2098
2118
  ...s.settings,
2099
2119
  video: {
@@ -2104,18 +2124,18 @@ const fe = {
2104
2124
  }),
2105
2125
  min: "1000",
2106
2126
  max: "50000",
2107
- disabled: v
2127
+ disabled: h
2108
2128
  }
2109
2129
  )
2110
2130
  ] }),
2111
2131
  /* @__PURE__ */ t("label", { children: [
2112
- "Keyframe Interval (sec)",
2132
+ n("liveStreaming.keyframeIntervalSec", "Keyframe Interval (sec)"),
2113
2133
  /* @__PURE__ */ e(
2114
2134
  "input",
2115
2135
  {
2116
2136
  type: "number",
2117
2137
  value: s.settings.video.keyframe,
2118
- onChange: (i) => _({
2138
+ onChange: (i) => g({
2119
2139
  settings: {
2120
2140
  ...s.settings,
2121
2141
  video: {
@@ -2126,20 +2146,20 @@ const fe = {
2126
2146
  }),
2127
2147
  min: "1",
2128
2148
  max: "10",
2129
- disabled: v
2149
+ disabled: h
2130
2150
  }
2131
2151
  )
2132
2152
  ] })
2133
2153
  ] }),
2134
2154
  /* @__PURE__ */ t("div", { className: "nice-live-streaming__setting-section", children: [
2135
- /* @__PURE__ */ e("h4", { children: r("liveStreaming.audio", "Audio") }),
2155
+ /* @__PURE__ */ e("h4", { children: n("liveStreaming.audio", "Audio") }),
2136
2156
  /* @__PURE__ */ t("label", { children: [
2137
- r("liveStreaming.sampleRate", "Sample Rate"),
2157
+ n("liveStreaming.sampleRate", "Sample Rate"),
2138
2158
  /* @__PURE__ */ t(
2139
2159
  "select",
2140
2160
  {
2141
2161
  value: s.settings.audio.sampleRate,
2142
- onChange: (i) => _({
2162
+ onChange: (i) => g({
2143
2163
  settings: {
2144
2164
  ...s.settings,
2145
2165
  audio: {
@@ -2148,7 +2168,7 @@ const fe = {
2148
2168
  }
2149
2169
  }
2150
2170
  }),
2151
- disabled: v,
2171
+ disabled: h,
2152
2172
  children: [
2153
2173
  /* @__PURE__ */ e("option", { value: "44100", children: "44.1 kHz" }),
2154
2174
  /* @__PURE__ */ e("option", { value: "48000", children: "48 kHz" })
@@ -2157,18 +2177,18 @@ const fe = {
2157
2177
  )
2158
2178
  ] }),
2159
2179
  /* @__PURE__ */ t("label", { children: [
2160
- "Audio Bitrate (kbps)",
2180
+ n("liveStreaming.audioBitrateKbps", "Audio Bitrate (kbps)"),
2161
2181
  /* @__PURE__ */ t(
2162
2182
  "select",
2163
2183
  {
2164
2184
  value: s.settings.audio.bitrate,
2165
- onChange: (i) => _({
2185
+ onChange: (i) => g({
2166
2186
  settings: {
2167
2187
  ...s.settings,
2168
2188
  audio: { ...s.settings.audio, bitrate: parseInt(i.target.value) }
2169
2189
  }
2170
2190
  }),
2171
- disabled: v,
2191
+ disabled: h,
2172
2192
  children: [
2173
2193
  /* @__PURE__ */ e("option", { value: "96", children: "96 kbps" }),
2174
2194
  /* @__PURE__ */ e("option", { value: "128", children: "128 kbps" }),
@@ -2183,7 +2203,7 @@ const fe = {
2183
2203
  ] })
2184
2204
  ] })
2185
2205
  ] }),
2186
- v && /* @__PURE__ */ e("footer", { className: "nice-live-streaming__footer", children: /* @__PURE__ */ t("div", { className: "nice-live-streaming__footer-stats", children: [
2206
+ h && /* @__PURE__ */ e("footer", { className: "nice-live-streaming__footer", children: /* @__PURE__ */ t("div", { className: "nice-live-streaming__footer-stats", children: [
2187
2207
  /* @__PURE__ */ t("span", { className: "nice-live-streaming__stat", children: [
2188
2208
  /* @__PURE__ */ e("label", { children: "CPU" }),
2189
2209
  /* @__PURE__ */ t("span", { className: "nice-live-streaming__value", children: [
@@ -2192,35 +2212,35 @@ const fe = {
2192
2212
  ] })
2193
2213
  ] }),
2194
2214
  /* @__PURE__ */ t("span", { className: "nice-live-streaming__stat", children: [
2195
- /* @__PURE__ */ e("label", { children: r("liveStreaming.memory", "Memory") }),
2215
+ /* @__PURE__ */ e("label", { children: n("liveStreaming.memory", "Memory") }),
2196
2216
  /* @__PURE__ */ t("span", { className: "nice-live-streaming__value", children: [
2197
2217
  N.memoryUsage.toFixed(1),
2198
2218
  "%"
2199
2219
  ] })
2200
2220
  ] }),
2201
2221
  /* @__PURE__ */ t("span", { className: "nice-live-streaming__stat", children: [
2202
- /* @__PURE__ */ e("label", { children: r("liveStreaming.dropped", "Dropped") }),
2222
+ /* @__PURE__ */ e("label", { children: n("liveStreaming.dropped", "Dropped") }),
2203
2223
  /* @__PURE__ */ e("span", { className: "nice-live-streaming__value", children: N.droppedFrames })
2204
2224
  ] }),
2205
2225
  /* @__PURE__ */ t("span", { className: "nice-live-streaming__stat", children: [
2206
- /* @__PURE__ */ e("label", { children: r("liveStreaming.peakViewers", "Peak Viewers") }),
2226
+ /* @__PURE__ */ e("label", { children: n("liveStreaming.peakViewers", "Peak Viewers") }),
2207
2227
  /* @__PURE__ */ e("span", { className: "nice-live-streaming__value", children: N.peakViewers })
2208
2228
  ] })
2209
2229
  ] }) }),
2210
2230
  K && /* @__PURE__ */ e("div", { className: "nice-live-streaming__modal-overlay", children: /* @__PURE__ */ t("div", { className: "nice-live-streaming__modal", children: [
2211
2231
  /* @__PURE__ */ t("div", { className: "nice-live-streaming__modal-header", children: [
2212
- /* @__PURE__ */ e("h3", { children: r("liveStreaming.addSource", "Add Source") }),
2232
+ /* @__PURE__ */ e("h3", { children: n("liveStreaming.addSource", "Add Source") }),
2213
2233
  /* @__PURE__ */ e(
2214
2234
  "button",
2215
2235
  {
2216
- "aria-label": r("liveStreaming.close", "Close"),
2236
+ "aria-label": n("liveStreaming.close", "Close"),
2217
2237
  className: "nice-live-streaming__close-button",
2218
- onClick: () => C(!1),
2238
+ onClick: () => S(!1),
2219
2239
  children: /* @__PURE__ */ e(m, { name: "close", size: 16 })
2220
2240
  }
2221
2241
  )
2222
2242
  ] }),
2223
- /* @__PURE__ */ e("div", { className: "nice-live-streaming__modal-content", children: /* @__PURE__ */ e("div", { className: "nice-live-streaming__source-type-grid", children: ce.map((i) => /* @__PURE__ */ t(
2243
+ /* @__PURE__ */ e("div", { className: "nice-live-streaming__modal-content", children: /* @__PURE__ */ e("div", { className: "nice-live-streaming__source-type-grid", children: oe.map((i) => /* @__PURE__ */ t(
2224
2244
  "button",
2225
2245
  {
2226
2246
  className: "nice-live-streaming__source-type-button",
@@ -2235,11 +2255,11 @@ const fe = {
2235
2255
  ] }) }),
2236
2256
  G && /* @__PURE__ */ e("div", { className: "nice-live-streaming__modal-overlay", children: /* @__PURE__ */ t("div", { className: "nice-live-streaming__modal", children: [
2237
2257
  /* @__PURE__ */ t("div", { className: "nice-live-streaming__modal-header", children: [
2238
- /* @__PURE__ */ e("h3", { children: r("liveStreaming.addDestination", "Add Destination") }),
2258
+ /* @__PURE__ */ e("h3", { children: n("liveStreaming.addDestination", "Add Destination") }),
2239
2259
  /* @__PURE__ */ e(
2240
2260
  "button",
2241
2261
  {
2242
- "aria-label": r("liveStreaming.close", "Close"),
2262
+ "aria-label": n("liveStreaming.close", "Close"),
2243
2263
  className: "nice-live-streaming__close-button",
2244
2264
  onClick: () => W(!1),
2245
2265
  children: /* @__PURE__ */ e(m, { name: "close", size: 16 })
@@ -2264,5 +2284,5 @@ const fe = {
2264
2284
  export {
2265
2285
  Ie as NiceLiveStreaming,
2266
2286
  Te as NiceScreenRecorder,
2267
- ze as NiceVideoEditor
2287
+ Ee as NiceVideoEditor
2268
2288
  };