@camstack/addon-pipeline 1.1.43 → 1.1.45
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/audio-analyzer/index.js +5 -4
- package/dist/audio-analyzer/index.mjs +1 -1
- package/dist/chunk-D6vf50IK.js +28 -0
- package/dist/detection-pipeline/index.js +2714 -2028
- package/dist/detection-pipeline/index.mjs +2708 -2023
- package/dist/{dist-NvwN60Fq.js → dist-CjxqjgEv.js} +255 -185
- package/dist/{dist-GFd8M6KO.mjs → dist-D04numuO.mjs} +250 -186
- package/dist/{model-download-service-C-IHWnXx-DxM2DSns.js → model-download-service-C-IHWnXx-BLXzxpRB.js} +3 -29
- package/dist/motion-wasm/index.js +1 -1
- package/dist/motion-wasm/index.mjs +1 -1
- package/dist/pipeline-runner/index.js +122 -287
- package/dist/pipeline-runner/index.mjs +118 -285
- package/dist/recorder/index.js +60 -20
- package/dist/recorder/index.mjs +57 -18
- package/dist/{frame-handle-plane-B3Fxww8H.js → remote-source-plane-CLuxyDV2.js} +236 -1
- package/dist/{frame-handle-plane-E_AsR77T.mjs → remote-source-plane-D31IILFN.mjs} +219 -2
- package/dist/session-decode/decode-worker-child.js +86 -2
- package/dist/session-decode/decode-worker-child.mjs +83 -2
- package/dist/stream-broker/_stub.js +550 -523
- package/dist/stream-broker/{_virtual_mf-localSharedImportMap___mfe_internal__addon_stream_broker_widgets-CeielP5P.mjs → _virtual_mf-localSharedImportMap___mfe_internal__addon_stream_broker_widgets-BGKueo9D.mjs} +2 -2
- package/dist/stream-broker/_virtual_mf___mfe_internal__addon_stream_broker_widgets__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-D0sKyXiy.mjs +26 -0
- package/dist/stream-broker/_virtual_mf___mfe_internal__addon_stream_broker_widgets__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.js-8BUVCFIR.mjs +26 -0
- package/dist/stream-broker/{hostInit-DmjqskOR.mjs → hostInit-DazV2RCq.mjs} +2 -2
- package/dist/stream-broker/index.js +746 -135
- package/dist/stream-broker/index.mjs +737 -127
- package/dist/stream-broker/remoteEntry.js +1 -1
- package/embed-dist/assets/{MaskShapeCanvas-DI4BY7W2-CEsPjwzT.js → MaskShapeCanvas-DI4BY7W2-D_F4a_3H.js} +1 -1
- package/embed-dist/assets/{MotionZonesSettings-NcxxQN8r-D43fIRgB.js → MotionZonesSettings-NcxxQN8r-CfTBrn4G.js} +1 -1
- package/embed-dist/assets/{PrivacyMaskSettings-APgPLF7p-C3wJxG8V.js → PrivacyMaskSettings-APgPLF7p-BWYkeoRj.js} +1 -1
- package/embed-dist/assets/{index-CSFtK41z.css → index-CA4kv43T.css} +1 -1
- package/embed-dist/assets/index-_ccEdNW7.js +81 -0
- package/embed-dist/index.html +2 -2
- package/package.json +2 -2
- package/dist/stream-broker/_virtual_mf___mfe_internal__addon_stream_broker_widgets__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-DqJvWBKS.mjs +0 -26
- package/dist/stream-broker/_virtual_mf___mfe_internal__addon_stream_broker_widgets__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.js-dGka8yZY.mjs +0 -26
- package/embed-dist/assets/index-CX-rILhw.js +0 -81
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { a as e, c as t,
|
|
2
|
-
import { a as
|
|
3
|
-
import { n as
|
|
4
|
-
import { n as
|
|
5
|
-
import { t as
|
|
1
|
+
import { a as e, c as t, d as n, i as r, l as i, n as a, o, r as s, s as c, t as l, u } from "./_virtual_mf___mfe_internal__addon_stream_broker_widgets__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.js-8BUVCFIR.mjs";
|
|
2
|
+
import { a as d, i as f, n as p, o as m, r as h, t as g } from "./_virtual_mf___mfe_internal__addon_stream_broker_widgets__loadShare__react__loadShare__.js-C9j-2lBe.mjs";
|
|
3
|
+
import { n as _, r as v, t as y } from "./_virtual_mf___mfe_internal__addon_stream_broker_widgets__loadShare__react_mf_1_jsx_mf_2_runtime__loadShare__.js-XO0-Pyu6.mjs";
|
|
4
|
+
import { n as b, t as x } from "./_virtual_mf___mfe_internal__addon_stream_broker_widgets__loadShare___mf_0_tanstack_mf_1_react_mf_2_query__loadShare__.js-BO7TIbJV.mjs";
|
|
5
|
+
import { t as S } from "./_virtual_mf___mfe_internal__addon_stream_broker_widgets__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-D0sKyXiy.mjs";
|
|
6
6
|
//#region ../../node_modules/lucide-react/dist/esm/shared/src/utils.js
|
|
7
|
-
var
|
|
8
|
-
let t =
|
|
7
|
+
var C = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), w = (e) => e.replace(/^([A-Z])|[\s-_]+(\w)/g, (e, t, n) => n ? n.toUpperCase() : t.toLowerCase()), T = (e) => {
|
|
8
|
+
let t = w(e);
|
|
9
9
|
return t.charAt(0).toUpperCase() + t.slice(1);
|
|
10
|
-
},
|
|
10
|
+
}, E = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e) === t).join(" ").trim(), D = (e) => {
|
|
11
11
|
for (let t in e) if (t.startsWith("aria-") || t === "role" || t === "title") return !0;
|
|
12
|
-
},
|
|
12
|
+
}, O = {
|
|
13
13
|
xmlns: "http://www.w3.org/2000/svg",
|
|
14
14
|
width: 24,
|
|
15
15
|
height: 24,
|
|
@@ -19,37 +19,37 @@ var S = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), C = (e) =
|
|
|
19
19
|
strokeWidth: 2,
|
|
20
20
|
strokeLinecap: "round",
|
|
21
21
|
strokeLinejoin: "round"
|
|
22
|
-
},
|
|
22
|
+
}, k = p(({ color: e = "currentColor", size: t = 24, strokeWidth: n = 2, absoluteStrokeWidth: r, className: i = "", children: a, iconNode: o, ...s }, c) => g("svg", {
|
|
23
23
|
ref: c,
|
|
24
|
-
...
|
|
24
|
+
...O,
|
|
25
25
|
width: t,
|
|
26
26
|
height: t,
|
|
27
27
|
stroke: e,
|
|
28
28
|
strokeWidth: r ? Number(n) * 24 / Number(t) : n,
|
|
29
|
-
className:
|
|
30
|
-
...!a && !
|
|
29
|
+
className: E("lucide", i),
|
|
30
|
+
...!a && !D(s) && { "aria-hidden": "true" },
|
|
31
31
|
...s
|
|
32
|
-
}, [...o.map(([e, t]) =>
|
|
33
|
-
let n =
|
|
32
|
+
}, [...o.map(([e, t]) => g(e, t)), ...Array.isArray(a) ? a : [a]])), A = (e, t) => {
|
|
33
|
+
let n = p(({ className: n, ...r }, i) => g(k, {
|
|
34
34
|
ref: i,
|
|
35
35
|
iconNode: t,
|
|
36
|
-
className:
|
|
36
|
+
className: E(`lucide-${C(T(e))}`, `lucide-${e}`, n),
|
|
37
37
|
...r
|
|
38
38
|
}));
|
|
39
|
-
return n.displayName =
|
|
40
|
-
},
|
|
39
|
+
return n.displayName = T(e), n;
|
|
40
|
+
}, j = A("chevron-down", [["path", {
|
|
41
41
|
d: "m6 9 6 6 6-6",
|
|
42
42
|
key: "qrunsl"
|
|
43
|
-
}]]),
|
|
43
|
+
}]]), M = A("chevron-right", [["path", {
|
|
44
44
|
d: "m9 18 6-6-6-6",
|
|
45
45
|
key: "mthhwq"
|
|
46
|
-
}]]),
|
|
46
|
+
}]]), ee = A("plus", [["path", {
|
|
47
47
|
d: "M5 12h14",
|
|
48
48
|
key: "1ays0h"
|
|
49
49
|
}], ["path", {
|
|
50
50
|
d: "M12 5v14",
|
|
51
51
|
key: "s699le"
|
|
52
|
-
}]]),
|
|
52
|
+
}]]), N = A("radio", [
|
|
53
53
|
["path", {
|
|
54
54
|
d: "M4.9 19.1C1 15.2 1 8.8 4.9 4.9",
|
|
55
55
|
key: "1vaf9d"
|
|
@@ -72,7 +72,7 @@ var S = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), C = (e) =
|
|
|
72
72
|
d: "M19.1 4.9C23 8.8 23 15.1 19.1 19",
|
|
73
73
|
key: "10b0cb"
|
|
74
74
|
}]
|
|
75
|
-
]), te =
|
|
75
|
+
]), te = A("x", [["path", {
|
|
76
76
|
d: "M18 6 6 18",
|
|
77
77
|
key: "1bl5f8"
|
|
78
78
|
}], ["path", {
|
|
@@ -101,9 +101,9 @@ function re(e, t) {
|
|
|
101
101
|
}
|
|
102
102
|
return t.length > 0 && n.push("-vf", t), n;
|
|
103
103
|
}
|
|
104
|
-
var
|
|
104
|
+
var P = "text-[11px] uppercase tracking-wider text-foreground-subtle font-medium";
|
|
105
105
|
function ie({ outputArgs: e, onChange: t }) {
|
|
106
|
-
let [n, r] =
|
|
106
|
+
let [n, r] = m(""), [i, a] = m("pad"), [o, s] = m("1920"), [c, l] = m("1080"), [u, d] = m(!1), [f, p] = m("0"), [h, g] = m("0"), [b, x] = m("0"), [S, C] = m("0"), [w, T] = m(0), [E, D] = m(!1), [O, k] = m(!1), A = ne((() => {
|
|
107
107
|
let e = {
|
|
108
108
|
rotate: w,
|
|
109
109
|
hflip: E,
|
|
@@ -116,82 +116,82 @@ function ie({ outputArgs: e, onChange: t }) {
|
|
|
116
116
|
h: Number(S)
|
|
117
117
|
}), e;
|
|
118
118
|
})());
|
|
119
|
-
return /* @__PURE__ */
|
|
119
|
+
return /* @__PURE__ */ v("div", {
|
|
120
120
|
className: "space-y-2 rounded border border-border/50 bg-surface-2/30 px-3 py-2",
|
|
121
121
|
children: [
|
|
122
|
-
/* @__PURE__ */
|
|
122
|
+
/* @__PURE__ */ v("div", {
|
|
123
123
|
className: "flex items-center justify-between",
|
|
124
|
-
children: [/* @__PURE__ */
|
|
125
|
-
className:
|
|
126
|
-
children: ["Geometry / zoom", /* @__PURE__ */
|
|
124
|
+
children: [/* @__PURE__ */ v("span", {
|
|
125
|
+
className: P,
|
|
126
|
+
children: ["Geometry / zoom", /* @__PURE__ */ _("span", {
|
|
127
127
|
className: "ml-2 text-[10px] normal-case text-foreground-subtle italic",
|
|
128
128
|
children: "composes a single -vf into output args"
|
|
129
129
|
})]
|
|
130
|
-
}), /* @__PURE__ */
|
|
130
|
+
}), /* @__PURE__ */ _("button", {
|
|
131
131
|
type: "button",
|
|
132
132
|
onClick: () => t(re(e, A)),
|
|
133
133
|
className: "rounded-md border border-border bg-surface-hover px-2 py-0.5 text-[10px] font-medium text-foreground hover:bg-surface-hover/70 transition-colors",
|
|
134
134
|
children: "Apply geometry"
|
|
135
135
|
})]
|
|
136
136
|
}),
|
|
137
|
-
/* @__PURE__ */
|
|
137
|
+
/* @__PURE__ */ v("div", {
|
|
138
138
|
className: "flex flex-wrap items-center gap-2",
|
|
139
139
|
children: [
|
|
140
|
-
/* @__PURE__ */
|
|
141
|
-
className:
|
|
140
|
+
/* @__PURE__ */ _("label", {
|
|
141
|
+
className: P,
|
|
142
142
|
htmlFor: "geom-aspect",
|
|
143
143
|
children: "Aspect"
|
|
144
144
|
}),
|
|
145
|
-
/* @__PURE__ */
|
|
145
|
+
/* @__PURE__ */ v("select", {
|
|
146
146
|
id: "geom-aspect",
|
|
147
147
|
value: n,
|
|
148
148
|
onChange: (e) => r(e.target.value),
|
|
149
149
|
className: "rounded border border-border bg-surface-2 px-2 py-1 text-xs text-foreground focus:outline-none focus:ring-1 focus:ring-accent disabled:opacity-50 disabled:cursor-not-allowed appearance-none pr-6 min-w-[90px]",
|
|
150
150
|
children: [
|
|
151
|
-
/* @__PURE__ */
|
|
151
|
+
/* @__PURE__ */ _("option", {
|
|
152
152
|
value: "",
|
|
153
153
|
children: "none"
|
|
154
154
|
}),
|
|
155
|
-
/* @__PURE__ */
|
|
155
|
+
/* @__PURE__ */ _("option", {
|
|
156
156
|
value: "16:9",
|
|
157
157
|
children: "16:9"
|
|
158
158
|
}),
|
|
159
|
-
/* @__PURE__ */
|
|
159
|
+
/* @__PURE__ */ _("option", {
|
|
160
160
|
value: "4:3",
|
|
161
161
|
children: "4:3"
|
|
162
162
|
}),
|
|
163
|
-
/* @__PURE__ */
|
|
163
|
+
/* @__PURE__ */ _("option", {
|
|
164
164
|
value: "1:1",
|
|
165
165
|
children: "1:1"
|
|
166
166
|
})
|
|
167
167
|
]
|
|
168
168
|
}),
|
|
169
|
-
n !== "" && /* @__PURE__ */
|
|
170
|
-
/* @__PURE__ */
|
|
169
|
+
n !== "" && /* @__PURE__ */ v(y, { children: [
|
|
170
|
+
/* @__PURE__ */ v("select", {
|
|
171
171
|
"aria-label": "Aspect mode",
|
|
172
172
|
value: i,
|
|
173
173
|
onChange: (e) => a(e.target.value),
|
|
174
174
|
className: "rounded border border-border bg-surface-2 px-2 py-1 text-xs text-foreground focus:outline-none focus:ring-1 focus:ring-accent disabled:opacity-50 disabled:cursor-not-allowed appearance-none pr-6 min-w-[80px]",
|
|
175
|
-
children: [/* @__PURE__ */
|
|
175
|
+
children: [/* @__PURE__ */ _("option", {
|
|
176
176
|
value: "pad",
|
|
177
177
|
children: "pad"
|
|
178
|
-
}), /* @__PURE__ */
|
|
178
|
+
}), /* @__PURE__ */ _("option", {
|
|
179
179
|
value: "crop",
|
|
180
180
|
children: "crop"
|
|
181
181
|
})]
|
|
182
182
|
}),
|
|
183
|
-
/* @__PURE__ */
|
|
183
|
+
/* @__PURE__ */ _("input", {
|
|
184
184
|
type: "number",
|
|
185
185
|
"aria-label": "Aspect width",
|
|
186
186
|
value: o,
|
|
187
187
|
onChange: (e) => s(e.target.value),
|
|
188
188
|
className: "rounded border border-border bg-surface-2 px-2 py-1 text-xs text-foreground focus:outline-none focus:ring-1 focus:ring-accent disabled:opacity-50 disabled:cursor-not-allowed w-20 text-right"
|
|
189
189
|
}),
|
|
190
|
-
/* @__PURE__ */
|
|
190
|
+
/* @__PURE__ */ _("span", {
|
|
191
191
|
className: "text-[11px] text-foreground-subtle",
|
|
192
192
|
children: "×"
|
|
193
193
|
}),
|
|
194
|
-
/* @__PURE__ */
|
|
194
|
+
/* @__PURE__ */ _("input", {
|
|
195
195
|
type: "number",
|
|
196
196
|
"aria-label": "Aspect height",
|
|
197
197
|
value: c,
|
|
@@ -201,33 +201,33 @@ function ie({ outputArgs: e, onChange: t }) {
|
|
|
201
201
|
] })
|
|
202
202
|
]
|
|
203
203
|
}),
|
|
204
|
-
/* @__PURE__ */
|
|
204
|
+
/* @__PURE__ */ v("div", {
|
|
205
205
|
className: "flex flex-wrap items-center gap-2",
|
|
206
|
-
children: [/* @__PURE__ */
|
|
206
|
+
children: [/* @__PURE__ */ v("label", {
|
|
207
207
|
className: "text-[11px] uppercase tracking-wider text-foreground-subtle font-medium inline-flex items-center gap-1",
|
|
208
|
-
children: [/* @__PURE__ */
|
|
208
|
+
children: [/* @__PURE__ */ _("input", {
|
|
209
209
|
type: "checkbox",
|
|
210
210
|
checked: u,
|
|
211
211
|
onChange: (e) => d(e.target.checked)
|
|
212
212
|
}), "Crop / zoom"]
|
|
213
|
-
}), u && /* @__PURE__ */
|
|
214
|
-
/* @__PURE__ */
|
|
213
|
+
}), u && /* @__PURE__ */ v(y, { children: [
|
|
214
|
+
/* @__PURE__ */ _("input", {
|
|
215
215
|
type: "number",
|
|
216
216
|
"aria-label": "Crop x",
|
|
217
217
|
value: f,
|
|
218
|
-
onChange: (e) =>
|
|
218
|
+
onChange: (e) => p(e.target.value),
|
|
219
219
|
className: "rounded border border-border bg-surface-2 px-2 py-1 text-xs text-foreground focus:outline-none focus:ring-1 focus:ring-accent disabled:opacity-50 disabled:cursor-not-allowed w-16 text-right",
|
|
220
220
|
placeholder: "x"
|
|
221
221
|
}),
|
|
222
|
-
/* @__PURE__ */
|
|
222
|
+
/* @__PURE__ */ _("input", {
|
|
223
223
|
type: "number",
|
|
224
224
|
"aria-label": "Crop y",
|
|
225
225
|
value: h,
|
|
226
|
-
onChange: (e) =>
|
|
226
|
+
onChange: (e) => g(e.target.value),
|
|
227
227
|
className: "rounded border border-border bg-surface-2 px-2 py-1 text-xs text-foreground focus:outline-none focus:ring-1 focus:ring-accent disabled:opacity-50 disabled:cursor-not-allowed w-16 text-right",
|
|
228
228
|
placeholder: "y"
|
|
229
229
|
}),
|
|
230
|
-
/* @__PURE__ */
|
|
230
|
+
/* @__PURE__ */ _("input", {
|
|
231
231
|
type: "number",
|
|
232
232
|
"aria-label": "Crop width",
|
|
233
233
|
value: b,
|
|
@@ -235,7 +235,7 @@ function ie({ outputArgs: e, onChange: t }) {
|
|
|
235
235
|
className: "rounded border border-border bg-surface-2 px-2 py-1 text-xs text-foreground focus:outline-none focus:ring-1 focus:ring-accent disabled:opacity-50 disabled:cursor-not-allowed w-20 text-right",
|
|
236
236
|
placeholder: "w"
|
|
237
237
|
}),
|
|
238
|
-
/* @__PURE__ */
|
|
238
|
+
/* @__PURE__ */ _("input", {
|
|
239
239
|
type: "number",
|
|
240
240
|
"aria-label": "Crop height",
|
|
241
241
|
value: S,
|
|
@@ -245,49 +245,49 @@ function ie({ outputArgs: e, onChange: t }) {
|
|
|
245
245
|
})
|
|
246
246
|
] })]
|
|
247
247
|
}),
|
|
248
|
-
/* @__PURE__ */
|
|
248
|
+
/* @__PURE__ */ v("div", {
|
|
249
249
|
className: "flex flex-wrap items-center gap-2",
|
|
250
250
|
children: [
|
|
251
|
-
/* @__PURE__ */
|
|
252
|
-
className:
|
|
251
|
+
/* @__PURE__ */ _("label", {
|
|
252
|
+
className: P,
|
|
253
253
|
htmlFor: "geom-rotate",
|
|
254
254
|
children: "Rotate"
|
|
255
255
|
}),
|
|
256
|
-
/* @__PURE__ */
|
|
256
|
+
/* @__PURE__ */ v("select", {
|
|
257
257
|
id: "geom-rotate",
|
|
258
258
|
value: String(w),
|
|
259
259
|
onChange: (e) => T(Number(e.target.value)),
|
|
260
260
|
className: "rounded border border-border bg-surface-2 px-2 py-1 text-xs text-foreground focus:outline-none focus:ring-1 focus:ring-accent disabled:opacity-50 disabled:cursor-not-allowed appearance-none pr-6 min-w-[80px]",
|
|
261
261
|
children: [
|
|
262
|
-
/* @__PURE__ */
|
|
262
|
+
/* @__PURE__ */ _("option", {
|
|
263
263
|
value: "0",
|
|
264
264
|
children: "0°"
|
|
265
265
|
}),
|
|
266
|
-
/* @__PURE__ */
|
|
266
|
+
/* @__PURE__ */ _("option", {
|
|
267
267
|
value: "90",
|
|
268
268
|
children: "90°"
|
|
269
269
|
}),
|
|
270
|
-
/* @__PURE__ */
|
|
270
|
+
/* @__PURE__ */ _("option", {
|
|
271
271
|
value: "180",
|
|
272
272
|
children: "180°"
|
|
273
273
|
}),
|
|
274
|
-
/* @__PURE__ */
|
|
274
|
+
/* @__PURE__ */ _("option", {
|
|
275
275
|
value: "270",
|
|
276
276
|
children: "270°"
|
|
277
277
|
})
|
|
278
278
|
]
|
|
279
279
|
}),
|
|
280
|
-
/* @__PURE__ */
|
|
280
|
+
/* @__PURE__ */ v("label", {
|
|
281
281
|
className: "text-[11px] uppercase tracking-wider text-foreground-subtle font-medium inline-flex items-center gap-1",
|
|
282
|
-
children: [/* @__PURE__ */
|
|
282
|
+
children: [/* @__PURE__ */ _("input", {
|
|
283
283
|
type: "checkbox",
|
|
284
284
|
checked: E,
|
|
285
285
|
onChange: (e) => D(e.target.checked)
|
|
286
286
|
}), "hflip"]
|
|
287
287
|
}),
|
|
288
|
-
/* @__PURE__ */
|
|
288
|
+
/* @__PURE__ */ v("label", {
|
|
289
289
|
className: "text-[11px] uppercase tracking-wider text-foreground-subtle font-medium inline-flex items-center gap-1",
|
|
290
|
-
children: [/* @__PURE__ */
|
|
290
|
+
children: [/* @__PURE__ */ _("input", {
|
|
291
291
|
type: "checkbox",
|
|
292
292
|
checked: O,
|
|
293
293
|
onChange: (e) => k(e.target.checked)
|
|
@@ -295,9 +295,9 @@ function ie({ outputArgs: e, onChange: t }) {
|
|
|
295
295
|
})
|
|
296
296
|
]
|
|
297
297
|
}),
|
|
298
|
-
/* @__PURE__ */
|
|
298
|
+
/* @__PURE__ */ v("div", {
|
|
299
299
|
className: "font-mono text-[10px] text-foreground-subtle break-all",
|
|
300
|
-
children: ["-vf ", A.length > 0 ? A : /* @__PURE__ */
|
|
300
|
+
children: ["-vf ", A.length > 0 ? A : /* @__PURE__ */ _("span", {
|
|
301
301
|
className: "italic",
|
|
302
302
|
children: "(empty)"
|
|
303
303
|
})]
|
|
@@ -456,52 +456,52 @@ var ae = [
|
|
|
456
456
|
], se = {
|
|
457
457
|
video: { codec: "copy" },
|
|
458
458
|
audio: "passthrough"
|
|
459
|
-
},
|
|
459
|
+
}, F = "w-full rounded border border-border bg-surface-2 px-2 py-1.5 text-[11px] font-mono text-foreground focus:outline-none focus:ring-1 focus:ring-accent disabled:opacity-50 read-only:opacity-60 min-h-[60px] resize-y", I = "flex items-center justify-between gap-3 py-1.5", L = "text-[11px] uppercase tracking-wider text-foreground-subtle font-medium", R = "rounded-lg border border-border bg-surface overflow-hidden", z = "border-b border-border px-3 py-1.5 flex items-center justify-between bg-surface-hover/30", B = "text-[11px] font-semibold text-foreground uppercase tracking-wider";
|
|
460
460
|
function ce({ config: e, value: t, onSave: n }) {
|
|
461
|
-
let [r, i] =
|
|
462
|
-
f.current !== o && (f.current = o, c((o.inputArgs ?? []).join("\n")),
|
|
463
|
-
let
|
|
461
|
+
let [r, i] = m(!1), a = e.argsOnly === !0, o = t ?? se, [s, c] = m(() => (o.inputArgs ?? []).join("\n")), [l, u] = m(() => (o.outputArgs ?? []).join("\n")), f = d(o);
|
|
462
|
+
f.current !== o && (f.current = o, c((o.inputArgs ?? []).join("\n")), u((o.outputArgs ?? []).join("\n")));
|
|
463
|
+
let p = (e) => {
|
|
464
464
|
n(e(o));
|
|
465
|
-
}, h = (e) =>
|
|
465
|
+
}, h = (e) => p((t) => ({
|
|
466
466
|
...t,
|
|
467
467
|
video: {
|
|
468
468
|
...t.video,
|
|
469
469
|
codec: e
|
|
470
470
|
}
|
|
471
|
-
})),
|
|
471
|
+
})), g = (e) => p((t) => ({
|
|
472
472
|
...t,
|
|
473
473
|
video: {
|
|
474
474
|
...t.video,
|
|
475
475
|
width: e
|
|
476
476
|
}
|
|
477
|
-
})), b = (e) =>
|
|
477
|
+
})), b = (e) => p((t) => ({
|
|
478
478
|
...t,
|
|
479
479
|
video: {
|
|
480
480
|
...t.video,
|
|
481
481
|
height: e
|
|
482
482
|
}
|
|
483
|
-
})), x = (e) =>
|
|
483
|
+
})), x = (e) => p((t) => ({
|
|
484
484
|
...t,
|
|
485
485
|
video: {
|
|
486
486
|
...t.video,
|
|
487
487
|
fps: e
|
|
488
488
|
}
|
|
489
|
-
})), S = (e) =>
|
|
489
|
+
})), S = (e) => p((t) => ({
|
|
490
490
|
...t,
|
|
491
491
|
video: {
|
|
492
492
|
...t.video,
|
|
493
493
|
bitrateKbps: e
|
|
494
494
|
}
|
|
495
|
-
})), C = () =>
|
|
495
|
+
})), C = () => p((e) => ({
|
|
496
496
|
...e,
|
|
497
497
|
audio: "passthrough"
|
|
498
|
-
})), w = (e) =>
|
|
498
|
+
})), w = (e) => p((t) => ({
|
|
499
499
|
...t,
|
|
500
500
|
audio: typeof t.audio == "object" ? {
|
|
501
501
|
...t.audio,
|
|
502
502
|
codec: e
|
|
503
503
|
} : { codec: e }
|
|
504
|
-
})), T = (e) =>
|
|
504
|
+
})), T = (e) => p((t) => ({
|
|
505
505
|
...t,
|
|
506
506
|
audio: typeof t.audio == "object" ? {
|
|
507
507
|
...t.audio,
|
|
@@ -510,10 +510,10 @@ function ce({ config: e, value: t, onSave: n }) {
|
|
|
510
510
|
codec: "opus",
|
|
511
511
|
bitrateKbps: e
|
|
512
512
|
}
|
|
513
|
-
})), E = (e) =>
|
|
513
|
+
})), E = (e) => p((t) => ({
|
|
514
514
|
...t,
|
|
515
515
|
inputArgs: e.split("\n").map((e) => e.trim()).filter((e) => e.length > 0)
|
|
516
|
-
})), D = (e) =>
|
|
516
|
+
})), D = (e) => p((t) => ({
|
|
517
517
|
...t,
|
|
518
518
|
outputArgs: e.split("\n").map((e) => e.trim()).filter((e) => e.length > 0)
|
|
519
519
|
})), O = (e, t) => {
|
|
@@ -523,141 +523,141 @@ function ce({ config: e, value: t, onSave: n }) {
|
|
|
523
523
|
c(e), E(e);
|
|
524
524
|
} else {
|
|
525
525
|
let e = l.length === 0 ? n : `${l}\n${n}`;
|
|
526
|
-
|
|
526
|
+
u(e), D(e);
|
|
527
527
|
}
|
|
528
|
-
}, k = /* @__PURE__ */
|
|
528
|
+
}, k = /* @__PURE__ */ v("div", {
|
|
529
529
|
className: "space-y-1.5",
|
|
530
|
-
children: [/* @__PURE__ */
|
|
530
|
+
children: [/* @__PURE__ */ v("div", {
|
|
531
531
|
className: "flex items-center justify-between",
|
|
532
|
-
children: [/* @__PURE__ */
|
|
532
|
+
children: [/* @__PURE__ */ v("label", {
|
|
533
533
|
htmlFor: `${e.fieldKey}-input-args`,
|
|
534
|
-
className:
|
|
535
|
-
children: ["Input args", /* @__PURE__ */
|
|
534
|
+
className: L,
|
|
535
|
+
children: ["Input args", /* @__PURE__ */ _("span", {
|
|
536
536
|
className: "ml-2 text-[10px] normal-case text-foreground-subtle italic",
|
|
537
537
|
children: "one per line · inserted between globals and -i"
|
|
538
538
|
})]
|
|
539
|
-
}), /* @__PURE__ */
|
|
539
|
+
}), /* @__PURE__ */ _(V, {
|
|
540
540
|
id: `${e.fieldKey}-input-picker`,
|
|
541
541
|
disabled: !1,
|
|
542
542
|
catalogue: ae,
|
|
543
543
|
onPick: (e) => O("input", e)
|
|
544
544
|
})]
|
|
545
|
-
}), /* @__PURE__ */
|
|
545
|
+
}), /* @__PURE__ */ _("textarea", {
|
|
546
546
|
id: `${e.fieldKey}-input-args`,
|
|
547
547
|
value: s,
|
|
548
548
|
onChange: (e) => c(e.target.value),
|
|
549
549
|
onBlur: (e) => E(e.target.value),
|
|
550
550
|
placeholder: "-thread_queue_size 1024",
|
|
551
|
-
className:
|
|
551
|
+
className: F
|
|
552
552
|
})]
|
|
553
|
-
}),
|
|
553
|
+
}), A = /* @__PURE__ */ v("div", {
|
|
554
554
|
className: "space-y-1.5",
|
|
555
|
-
children: [/* @__PURE__ */
|
|
555
|
+
children: [/* @__PURE__ */ v("div", {
|
|
556
556
|
className: "flex items-center justify-between",
|
|
557
|
-
children: [/* @__PURE__ */
|
|
557
|
+
children: [/* @__PURE__ */ v("label", {
|
|
558
558
|
htmlFor: `${e.fieldKey}-output-args`,
|
|
559
|
-
className:
|
|
560
|
-
children: ["Output args", /* @__PURE__ */
|
|
559
|
+
className: L,
|
|
560
|
+
children: ["Output args", /* @__PURE__ */ _("span", {
|
|
561
561
|
className: "ml-2 text-[10px] normal-case text-foreground-subtle italic",
|
|
562
562
|
children: "one per line · inserted before the final muxer"
|
|
563
563
|
})]
|
|
564
|
-
}), /* @__PURE__ */
|
|
564
|
+
}), /* @__PURE__ */ _(V, {
|
|
565
565
|
id: `${e.fieldKey}-output-picker`,
|
|
566
566
|
disabled: !1,
|
|
567
567
|
catalogue: oe,
|
|
568
568
|
onPick: (e) => O("output", e)
|
|
569
569
|
})]
|
|
570
|
-
}), /* @__PURE__ */
|
|
570
|
+
}), /* @__PURE__ */ _("textarea", {
|
|
571
571
|
id: `${e.fieldKey}-output-args`,
|
|
572
572
|
value: l,
|
|
573
|
-
onChange: (e) =>
|
|
573
|
+
onChange: (e) => u(e.target.value),
|
|
574
574
|
onBlur: (e) => D(e.target.value),
|
|
575
575
|
placeholder: "-bsf:v h264_mp4toannexb",
|
|
576
|
-
className:
|
|
576
|
+
className: F
|
|
577
577
|
})]
|
|
578
578
|
});
|
|
579
|
-
return /* @__PURE__ */
|
|
579
|
+
return /* @__PURE__ */ v("div", {
|
|
580
580
|
className: "space-y-3",
|
|
581
581
|
children: [
|
|
582
|
-
e.sourceParams !== void 0 && /* @__PURE__ */
|
|
583
|
-
className:
|
|
584
|
-
children: [/* @__PURE__ */
|
|
585
|
-
className:
|
|
586
|
-
children: [/* @__PURE__ */
|
|
587
|
-
className:
|
|
582
|
+
e.sourceParams !== void 0 && /* @__PURE__ */ v("div", {
|
|
583
|
+
className: R,
|
|
584
|
+
children: [/* @__PURE__ */ v("div", {
|
|
585
|
+
className: z,
|
|
586
|
+
children: [/* @__PURE__ */ _("h3", {
|
|
587
|
+
className: B,
|
|
588
588
|
children: "Source (probed)"
|
|
589
|
-
}), /* @__PURE__ */
|
|
589
|
+
}), /* @__PURE__ */ _("span", {
|
|
590
590
|
className: "text-[10px] text-foreground-subtle italic",
|
|
591
591
|
children: "From the publisher"
|
|
592
592
|
})]
|
|
593
|
-
}), /* @__PURE__ */
|
|
593
|
+
}), /* @__PURE__ */ _("div", {
|
|
594
594
|
className: "px-3 py-2 flex flex-wrap gap-1.5",
|
|
595
|
-
children: /* @__PURE__ */
|
|
595
|
+
children: /* @__PURE__ */ _(le, { profile: e.sourceParams })
|
|
596
596
|
})]
|
|
597
597
|
}),
|
|
598
|
-
!a && /* @__PURE__ */
|
|
598
|
+
!a && /* @__PURE__ */ _("div", {
|
|
599
599
|
className: "@container",
|
|
600
|
-
children: /* @__PURE__ */
|
|
600
|
+
children: /* @__PURE__ */ v("div", {
|
|
601
601
|
className: "grid grid-cols-1 @[480px]:grid-cols-2 gap-3",
|
|
602
|
-
children: [/* @__PURE__ */
|
|
603
|
-
className:
|
|
604
|
-
children: [/* @__PURE__ */
|
|
605
|
-
className:
|
|
606
|
-
children: /* @__PURE__ */
|
|
607
|
-
className:
|
|
602
|
+
children: [/* @__PURE__ */ v("div", {
|
|
603
|
+
className: R,
|
|
604
|
+
children: [/* @__PURE__ */ _("div", {
|
|
605
|
+
className: z,
|
|
606
|
+
children: /* @__PURE__ */ _("h3", {
|
|
607
|
+
className: B,
|
|
608
608
|
children: "Video"
|
|
609
609
|
})
|
|
610
|
-
}), /* @__PURE__ */
|
|
610
|
+
}), /* @__PURE__ */ v("div", {
|
|
611
611
|
className: "px-3 py-2 divide-y divide-border/30",
|
|
612
|
-
children: [/* @__PURE__ */
|
|
613
|
-
className:
|
|
614
|
-
children: [/* @__PURE__ */
|
|
612
|
+
children: [/* @__PURE__ */ v("div", {
|
|
613
|
+
className: I,
|
|
614
|
+
children: [/* @__PURE__ */ _("label", {
|
|
615
615
|
htmlFor: `${e.fieldKey}-video-codec`,
|
|
616
|
-
className:
|
|
616
|
+
className: L,
|
|
617
617
|
children: "Codec"
|
|
618
|
-
}), /* @__PURE__ */
|
|
618
|
+
}), /* @__PURE__ */ v("select", {
|
|
619
619
|
id: `${e.fieldKey}-video-codec`,
|
|
620
620
|
value: o.video.codec,
|
|
621
621
|
onChange: (e) => h(e.target.value),
|
|
622
622
|
className: "rounded border border-border bg-surface-2 px-2 py-1 text-xs text-foreground focus:outline-none focus:ring-1 focus:ring-accent disabled:opacity-50 disabled:cursor-not-allowed read-only:opacity-60 read-only:cursor-not-allowed appearance-none pr-6 min-w-[120px]",
|
|
623
623
|
children: [
|
|
624
|
-
/* @__PURE__ */
|
|
624
|
+
/* @__PURE__ */ _("option", {
|
|
625
625
|
value: "h264",
|
|
626
626
|
children: "h264"
|
|
627
627
|
}),
|
|
628
|
-
/* @__PURE__ */
|
|
628
|
+
/* @__PURE__ */ _("option", {
|
|
629
629
|
value: "h265",
|
|
630
630
|
children: "h265"
|
|
631
631
|
}),
|
|
632
|
-
/* @__PURE__ */
|
|
632
|
+
/* @__PURE__ */ _("option", {
|
|
633
633
|
value: "copy",
|
|
634
634
|
children: "copy (passthrough)"
|
|
635
635
|
})
|
|
636
636
|
]
|
|
637
637
|
})]
|
|
638
|
-
}), o.video.codec !== "copy" && /* @__PURE__ */
|
|
639
|
-
/* @__PURE__ */
|
|
640
|
-
className:
|
|
641
|
-
children: [/* @__PURE__ */
|
|
638
|
+
}), o.video.codec !== "copy" && /* @__PURE__ */ v(y, { children: [
|
|
639
|
+
/* @__PURE__ */ v("div", {
|
|
640
|
+
className: I,
|
|
641
|
+
children: [/* @__PURE__ */ _("label", {
|
|
642
642
|
htmlFor: `${e.fieldKey}-video-width`,
|
|
643
|
-
className:
|
|
643
|
+
className: L,
|
|
644
644
|
children: "Width"
|
|
645
|
-
}), /* @__PURE__ */
|
|
645
|
+
}), /* @__PURE__ */ _("input", {
|
|
646
646
|
id: `${e.fieldKey}-video-width`,
|
|
647
647
|
type: "number",
|
|
648
648
|
"aria-label": "Width",
|
|
649
649
|
value: o.video.width ?? "",
|
|
650
|
-
onChange: (e) =>
|
|
650
|
+
onChange: (e) => g(Number(e.target.value)),
|
|
651
651
|
className: "rounded border border-border bg-surface-2 px-2 py-1 text-xs text-foreground focus:outline-none focus:ring-1 focus:ring-accent disabled:opacity-50 disabled:cursor-not-allowed read-only:opacity-60 read-only:cursor-not-allowed w-24 text-right"
|
|
652
652
|
})]
|
|
653
653
|
}),
|
|
654
|
-
/* @__PURE__ */
|
|
655
|
-
className:
|
|
656
|
-
children: [/* @__PURE__ */
|
|
654
|
+
/* @__PURE__ */ v("div", {
|
|
655
|
+
className: I,
|
|
656
|
+
children: [/* @__PURE__ */ _("label", {
|
|
657
657
|
htmlFor: `${e.fieldKey}-video-height`,
|
|
658
|
-
className:
|
|
658
|
+
className: L,
|
|
659
659
|
children: "Height"
|
|
660
|
-
}), /* @__PURE__ */
|
|
660
|
+
}), /* @__PURE__ */ _("input", {
|
|
661
661
|
id: `${e.fieldKey}-video-height`,
|
|
662
662
|
type: "number",
|
|
663
663
|
value: o.video.height ?? "",
|
|
@@ -665,13 +665,13 @@ function ce({ config: e, value: t, onSave: n }) {
|
|
|
665
665
|
className: "rounded border border-border bg-surface-2 px-2 py-1 text-xs text-foreground focus:outline-none focus:ring-1 focus:ring-accent disabled:opacity-50 disabled:cursor-not-allowed read-only:opacity-60 read-only:cursor-not-allowed w-24 text-right"
|
|
666
666
|
})]
|
|
667
667
|
}),
|
|
668
|
-
/* @__PURE__ */
|
|
669
|
-
className:
|
|
670
|
-
children: [/* @__PURE__ */
|
|
668
|
+
/* @__PURE__ */ v("div", {
|
|
669
|
+
className: I,
|
|
670
|
+
children: [/* @__PURE__ */ _("label", {
|
|
671
671
|
htmlFor: `${e.fieldKey}-video-fps`,
|
|
672
|
-
className:
|
|
672
|
+
className: L,
|
|
673
673
|
children: "FPS"
|
|
674
|
-
}), /* @__PURE__ */
|
|
674
|
+
}), /* @__PURE__ */ _("input", {
|
|
675
675
|
id: `${e.fieldKey}-video-fps`,
|
|
676
676
|
type: "number",
|
|
677
677
|
value: o.video.fps ?? "",
|
|
@@ -679,13 +679,13 @@ function ce({ config: e, value: t, onSave: n }) {
|
|
|
679
679
|
className: "rounded border border-border bg-surface-2 px-2 py-1 text-xs text-foreground focus:outline-none focus:ring-1 focus:ring-accent disabled:opacity-50 disabled:cursor-not-allowed read-only:opacity-60 read-only:cursor-not-allowed w-24 text-right"
|
|
680
680
|
})]
|
|
681
681
|
}),
|
|
682
|
-
/* @__PURE__ */
|
|
683
|
-
className:
|
|
684
|
-
children: [/* @__PURE__ */
|
|
682
|
+
/* @__PURE__ */ v("div", {
|
|
683
|
+
className: I,
|
|
684
|
+
children: [/* @__PURE__ */ _("label", {
|
|
685
685
|
htmlFor: `${e.fieldKey}-video-bitrate`,
|
|
686
|
-
className:
|
|
686
|
+
className: L,
|
|
687
687
|
children: "Bitrate (kbps)"
|
|
688
|
-
}), /* @__PURE__ */
|
|
688
|
+
}), /* @__PURE__ */ _("input", {
|
|
689
689
|
id: `${e.fieldKey}-video-bitrate`,
|
|
690
690
|
type: "number",
|
|
691
691
|
value: o.video.bitrateKbps ?? "",
|
|
@@ -695,72 +695,72 @@ function ce({ config: e, value: t, onSave: n }) {
|
|
|
695
695
|
})
|
|
696
696
|
] })]
|
|
697
697
|
})]
|
|
698
|
-
}), /* @__PURE__ */
|
|
699
|
-
className:
|
|
700
|
-
children: [/* @__PURE__ */
|
|
701
|
-
className:
|
|
702
|
-
children: /* @__PURE__ */
|
|
703
|
-
className:
|
|
698
|
+
}), /* @__PURE__ */ v("div", {
|
|
699
|
+
className: R,
|
|
700
|
+
children: [/* @__PURE__ */ _("div", {
|
|
701
|
+
className: z,
|
|
702
|
+
children: /* @__PURE__ */ _("h3", {
|
|
703
|
+
className: B,
|
|
704
704
|
children: "Audio"
|
|
705
705
|
})
|
|
706
|
-
}), /* @__PURE__ */
|
|
706
|
+
}), /* @__PURE__ */ _("div", {
|
|
707
707
|
className: "px-3 py-2",
|
|
708
|
-
children: o.audio === "passthrough" ? /* @__PURE__ */
|
|
708
|
+
children: o.audio === "passthrough" ? /* @__PURE__ */ v("div", {
|
|
709
709
|
className: "flex items-center justify-between gap-3",
|
|
710
|
-
children: [/* @__PURE__ */
|
|
710
|
+
children: [/* @__PURE__ */ _("span", {
|
|
711
711
|
className: "text-[11px] text-foreground-subtle italic",
|
|
712
712
|
children: "Source audio forwarded without re-encode."
|
|
713
|
-
}), /* @__PURE__ */
|
|
713
|
+
}), /* @__PURE__ */ _("button", {
|
|
714
714
|
type: "button",
|
|
715
715
|
onClick: () => w("opus"),
|
|
716
716
|
className: "rounded-md border border-border bg-surface-hover px-2 py-1 text-[11px] text-foreground hover:bg-surface-hover/70 transition-colors",
|
|
717
717
|
children: "Switch to custom encode"
|
|
718
718
|
})]
|
|
719
|
-
}) : /* @__PURE__ */
|
|
719
|
+
}) : /* @__PURE__ */ v("div", {
|
|
720
720
|
className: "divide-y divide-border/30",
|
|
721
721
|
children: [
|
|
722
|
-
/* @__PURE__ */
|
|
723
|
-
className:
|
|
724
|
-
children: [/* @__PURE__ */
|
|
722
|
+
/* @__PURE__ */ v("div", {
|
|
723
|
+
className: I,
|
|
724
|
+
children: [/* @__PURE__ */ _("label", {
|
|
725
725
|
htmlFor: `${e.fieldKey}-audio-codec`,
|
|
726
|
-
className:
|
|
726
|
+
className: L,
|
|
727
727
|
children: "Codec"
|
|
728
|
-
}), /* @__PURE__ */
|
|
728
|
+
}), /* @__PURE__ */ v("select", {
|
|
729
729
|
id: `${e.fieldKey}-audio-codec`,
|
|
730
730
|
value: o.audio.codec,
|
|
731
731
|
onChange: (e) => w(e.target.value),
|
|
732
732
|
className: "rounded border border-border bg-surface-2 px-2 py-1 text-xs text-foreground focus:outline-none focus:ring-1 focus:ring-accent disabled:opacity-50 disabled:cursor-not-allowed read-only:opacity-60 read-only:cursor-not-allowed appearance-none pr-6 min-w-[120px]",
|
|
733
733
|
children: [
|
|
734
|
-
/* @__PURE__ */
|
|
734
|
+
/* @__PURE__ */ _("option", {
|
|
735
735
|
value: "opus",
|
|
736
736
|
children: "opus"
|
|
737
737
|
}),
|
|
738
|
-
/* @__PURE__ */
|
|
738
|
+
/* @__PURE__ */ _("option", {
|
|
739
739
|
value: "aac",
|
|
740
740
|
children: "aac"
|
|
741
741
|
}),
|
|
742
|
-
/* @__PURE__ */
|
|
742
|
+
/* @__PURE__ */ _("option", {
|
|
743
743
|
value: "pcmu",
|
|
744
744
|
children: "pcmu"
|
|
745
745
|
}),
|
|
746
|
-
/* @__PURE__ */
|
|
746
|
+
/* @__PURE__ */ _("option", {
|
|
747
747
|
value: "pcma",
|
|
748
748
|
children: "pcma"
|
|
749
749
|
}),
|
|
750
|
-
/* @__PURE__ */
|
|
750
|
+
/* @__PURE__ */ _("option", {
|
|
751
751
|
value: "copy",
|
|
752
752
|
children: "copy (passthrough)"
|
|
753
753
|
})
|
|
754
754
|
]
|
|
755
755
|
})]
|
|
756
756
|
}),
|
|
757
|
-
/* @__PURE__ */
|
|
758
|
-
className:
|
|
759
|
-
children: [/* @__PURE__ */
|
|
757
|
+
/* @__PURE__ */ v("div", {
|
|
758
|
+
className: I,
|
|
759
|
+
children: [/* @__PURE__ */ _("label", {
|
|
760
760
|
htmlFor: `${e.fieldKey}-audio-bitrate`,
|
|
761
|
-
className:
|
|
761
|
+
className: L,
|
|
762
762
|
children: "Bitrate (kbps)"
|
|
763
|
-
}), /* @__PURE__ */
|
|
763
|
+
}), /* @__PURE__ */ _("input", {
|
|
764
764
|
id: `${e.fieldKey}-audio-bitrate`,
|
|
765
765
|
type: "number",
|
|
766
766
|
value: o.audio.bitrateKbps ?? "",
|
|
@@ -768,9 +768,9 @@ function ce({ config: e, value: t, onSave: n }) {
|
|
|
768
768
|
className: "rounded border border-border bg-surface-2 px-2 py-1 text-xs text-foreground focus:outline-none focus:ring-1 focus:ring-accent disabled:opacity-50 disabled:cursor-not-allowed read-only:opacity-60 read-only:cursor-not-allowed w-24 text-right"
|
|
769
769
|
})]
|
|
770
770
|
}),
|
|
771
|
-
/* @__PURE__ */
|
|
771
|
+
/* @__PURE__ */ _("div", {
|
|
772
772
|
className: "pt-2",
|
|
773
|
-
children: /* @__PURE__ */
|
|
773
|
+
children: /* @__PURE__ */ _("button", {
|
|
774
774
|
type: "button",
|
|
775
775
|
onClick: C,
|
|
776
776
|
className: "text-[11px] text-foreground-subtle hover:text-foreground underline-offset-2 hover:underline",
|
|
@@ -783,54 +783,54 @@ function ce({ config: e, value: t, onSave: n }) {
|
|
|
783
783
|
})]
|
|
784
784
|
})
|
|
785
785
|
}),
|
|
786
|
-
a ? /* @__PURE__ */
|
|
787
|
-
className:
|
|
788
|
-
children: [/* @__PURE__ */
|
|
789
|
-
className:
|
|
790
|
-
children: /* @__PURE__ */
|
|
791
|
-
className:
|
|
786
|
+
a ? /* @__PURE__ */ v(y, { children: [/* @__PURE__ */ v("div", {
|
|
787
|
+
className: R,
|
|
788
|
+
children: [/* @__PURE__ */ _("div", {
|
|
789
|
+
className: z,
|
|
790
|
+
children: /* @__PURE__ */ _("h3", {
|
|
791
|
+
className: B,
|
|
792
792
|
children: "Input args"
|
|
793
793
|
})
|
|
794
|
-
}), /* @__PURE__ */
|
|
794
|
+
}), /* @__PURE__ */ _("div", {
|
|
795
795
|
className: "px-3 py-2",
|
|
796
796
|
children: k
|
|
797
797
|
})]
|
|
798
|
-
}), /* @__PURE__ */
|
|
799
|
-
className:
|
|
800
|
-
children: [/* @__PURE__ */
|
|
801
|
-
className:
|
|
802
|
-
children: /* @__PURE__ */
|
|
803
|
-
className:
|
|
798
|
+
}), /* @__PURE__ */ v("div", {
|
|
799
|
+
className: R,
|
|
800
|
+
children: [/* @__PURE__ */ _("div", {
|
|
801
|
+
className: z,
|
|
802
|
+
children: /* @__PURE__ */ _("h3", {
|
|
803
|
+
className: B,
|
|
804
804
|
children: "Output args"
|
|
805
805
|
})
|
|
806
|
-
}), /* @__PURE__ */
|
|
806
|
+
}), /* @__PURE__ */ _("div", {
|
|
807
807
|
className: "px-3 py-2",
|
|
808
|
-
children:
|
|
808
|
+
children: A
|
|
809
809
|
})]
|
|
810
|
-
})] }) : /* @__PURE__ */
|
|
811
|
-
className:
|
|
812
|
-
children: [/* @__PURE__ */
|
|
810
|
+
})] }) : /* @__PURE__ */ v("div", {
|
|
811
|
+
className: R,
|
|
812
|
+
children: [/* @__PURE__ */ v("button", {
|
|
813
813
|
type: "button",
|
|
814
814
|
onClick: () => i((e) => !e),
|
|
815
815
|
className: "w-full px-3 py-1.5 flex items-center justify-between bg-surface-hover/30 hover:bg-surface-hover transition-colors",
|
|
816
|
-
children: [/* @__PURE__ */
|
|
816
|
+
children: [/* @__PURE__ */ v("span", {
|
|
817
817
|
className: "inline-flex items-center gap-1.5 text-[11px] font-semibold text-foreground uppercase tracking-wider",
|
|
818
|
-
children: [
|
|
819
|
-
}), /* @__PURE__ */
|
|
818
|
+
children: [_(r ? j : M, { className: "h-3 w-3" }), "Advanced — raw ffmpeg args"]
|
|
819
|
+
}), /* @__PURE__ */ v("span", {
|
|
820
820
|
className: "text-[10px] text-foreground-subtle italic",
|
|
821
821
|
children: [(o.inputArgs?.length ?? 0) + (o.outputArgs?.length ?? 0), " args"]
|
|
822
822
|
})]
|
|
823
|
-
}), r && /* @__PURE__ */
|
|
823
|
+
}), r && /* @__PURE__ */ v("div", {
|
|
824
824
|
className: "px-3 py-2 space-y-3 border-t border-border/50",
|
|
825
825
|
children: [
|
|
826
826
|
k,
|
|
827
|
-
/* @__PURE__ */
|
|
827
|
+
/* @__PURE__ */ _(ie, {
|
|
828
828
|
outputArgs: o.outputArgs ?? [],
|
|
829
829
|
onChange: (e) => {
|
|
830
|
-
|
|
830
|
+
u(e.join("\n")), D(e.join("\n"));
|
|
831
831
|
}
|
|
832
832
|
}),
|
|
833
|
-
|
|
833
|
+
A
|
|
834
834
|
]
|
|
835
835
|
})]
|
|
836
836
|
})
|
|
@@ -839,32 +839,32 @@ function ce({ config: e, value: t, onSave: n }) {
|
|
|
839
839
|
}
|
|
840
840
|
function le({ profile: e }) {
|
|
841
841
|
let t = "inline-flex items-center gap-1 rounded-full bg-foreground-subtle/10 border border-border px-2 py-0.5 text-[11px] font-mono text-foreground-subtle", { video: n, audio: r } = e, i = n.width !== void 0 && n.height !== void 0 ? `${n.width}×${n.height}` : void 0;
|
|
842
|
-
return /* @__PURE__ */
|
|
843
|
-
/* @__PURE__ */
|
|
842
|
+
return /* @__PURE__ */ v(y, { children: [
|
|
843
|
+
/* @__PURE__ */ v("span", {
|
|
844
844
|
className: t,
|
|
845
|
-
children: [/* @__PURE__ */
|
|
845
|
+
children: [/* @__PURE__ */ _("span", {
|
|
846
846
|
className: "opacity-60",
|
|
847
847
|
children: "codec"
|
|
848
848
|
}), n.codec]
|
|
849
849
|
}),
|
|
850
|
-
i !== void 0 && /* @__PURE__ */
|
|
850
|
+
i !== void 0 && /* @__PURE__ */ v("span", {
|
|
851
851
|
className: t,
|
|
852
|
-
children: [/* @__PURE__ */
|
|
852
|
+
children: [/* @__PURE__ */ _("span", {
|
|
853
853
|
className: "opacity-60",
|
|
854
854
|
children: "res"
|
|
855
855
|
}), i]
|
|
856
856
|
}),
|
|
857
|
-
n.fps !== void 0 && /* @__PURE__ */
|
|
857
|
+
n.fps !== void 0 && /* @__PURE__ */ v("span", {
|
|
858
858
|
className: t,
|
|
859
|
-
children: [/* @__PURE__ */
|
|
859
|
+
children: [/* @__PURE__ */ _("span", {
|
|
860
860
|
className: "opacity-60",
|
|
861
861
|
children: "fps"
|
|
862
862
|
}), n.fps]
|
|
863
863
|
}),
|
|
864
|
-
n.bitrateKbps !== void 0 && /* @__PURE__ */
|
|
864
|
+
n.bitrateKbps !== void 0 && /* @__PURE__ */ v("span", {
|
|
865
865
|
className: t,
|
|
866
866
|
children: [
|
|
867
|
-
/* @__PURE__ */
|
|
867
|
+
/* @__PURE__ */ _("span", {
|
|
868
868
|
className: "opacity-60",
|
|
869
869
|
children: "bitrate"
|
|
870
870
|
}),
|
|
@@ -872,24 +872,24 @@ function le({ profile: e }) {
|
|
|
872
872
|
"k"
|
|
873
873
|
]
|
|
874
874
|
}),
|
|
875
|
-
r === "passthrough" ? /* @__PURE__ */
|
|
875
|
+
r === "passthrough" ? /* @__PURE__ */ v("span", {
|
|
876
876
|
className: t,
|
|
877
|
-
children: [/* @__PURE__ */
|
|
877
|
+
children: [/* @__PURE__ */ _("span", {
|
|
878
878
|
className: "opacity-60",
|
|
879
879
|
children: "audio"
|
|
880
880
|
}), "passthrough"]
|
|
881
|
-
}) : /* @__PURE__ */
|
|
882
|
-
/* @__PURE__ */
|
|
881
|
+
}) : /* @__PURE__ */ v(y, { children: [
|
|
882
|
+
/* @__PURE__ */ v("span", {
|
|
883
883
|
className: t,
|
|
884
|
-
children: [/* @__PURE__ */
|
|
884
|
+
children: [/* @__PURE__ */ _("span", {
|
|
885
885
|
className: "opacity-60",
|
|
886
886
|
children: "audio"
|
|
887
887
|
}), r.codec]
|
|
888
888
|
}),
|
|
889
|
-
r.bitrateKbps !== void 0 && /* @__PURE__ */
|
|
889
|
+
r.bitrateKbps !== void 0 && /* @__PURE__ */ v("span", {
|
|
890
890
|
className: t,
|
|
891
891
|
children: [
|
|
892
|
-
/* @__PURE__ */
|
|
892
|
+
/* @__PURE__ */ _("span", {
|
|
893
893
|
className: "opacity-60",
|
|
894
894
|
children: "a-bitrate"
|
|
895
895
|
}),
|
|
@@ -897,10 +897,10 @@ function le({ profile: e }) {
|
|
|
897
897
|
"k"
|
|
898
898
|
]
|
|
899
899
|
}),
|
|
900
|
-
r.sampleRateHz !== void 0 && /* @__PURE__ */
|
|
900
|
+
r.sampleRateHz !== void 0 && /* @__PURE__ */ v("span", {
|
|
901
901
|
className: t,
|
|
902
902
|
children: [
|
|
903
|
-
/* @__PURE__ */
|
|
903
|
+
/* @__PURE__ */ _("span", {
|
|
904
904
|
className: "opacity-60",
|
|
905
905
|
children: "a-sr"
|
|
906
906
|
}),
|
|
@@ -908,9 +908,9 @@ function le({ profile: e }) {
|
|
|
908
908
|
"Hz"
|
|
909
909
|
]
|
|
910
910
|
}),
|
|
911
|
-
r.channels !== void 0 && /* @__PURE__ */
|
|
911
|
+
r.channels !== void 0 && /* @__PURE__ */ v("span", {
|
|
912
912
|
className: t,
|
|
913
|
-
children: [/* @__PURE__ */
|
|
913
|
+
children: [/* @__PURE__ */ _("span", {
|
|
914
914
|
className: "opacity-60",
|
|
915
915
|
children: "a-ch"
|
|
916
916
|
}), r.channels]
|
|
@@ -919,7 +919,7 @@ function le({ profile: e }) {
|
|
|
919
919
|
] });
|
|
920
920
|
}
|
|
921
921
|
function ue(t) {
|
|
922
|
-
let n = t.config ?? {}, r = e(), [i, a] =
|
|
922
|
+
let n = t.config ?? {}, r = e(), [i, a] = m(() => n.initialValue), o = h((e) => {
|
|
923
923
|
if (a(e), t.deviceId === void 0) return;
|
|
924
924
|
let i = n.writerCapName, o = n.writerAddonId, s = n.fieldKey;
|
|
925
925
|
if (i === void 0 || o === void 0 || s === void 0) {
|
|
@@ -940,15 +940,15 @@ function ue(t) {
|
|
|
940
940
|
n.writerAddonId,
|
|
941
941
|
r
|
|
942
942
|
]);
|
|
943
|
-
if (t.deviceId === void 0) return /* @__PURE__ */
|
|
943
|
+
if (t.deviceId === void 0) return /* @__PURE__ */ _("div", {
|
|
944
944
|
className: "rounded-lg border border-warning/30 bg-warning/10 px-3 py-2 text-xs text-warning",
|
|
945
945
|
children: "ffmpeg-params: no deviceId in widget context — this widget only renders inside a device tab."
|
|
946
946
|
});
|
|
947
947
|
let s = n.fieldKey;
|
|
948
|
-
return s === void 0 || s.length === 0 ? /* @__PURE__ */
|
|
948
|
+
return s === void 0 || s.length === 0 ? /* @__PURE__ */ _("div", {
|
|
949
949
|
className: "rounded-lg border border-warning/30 bg-warning/10 px-3 py-2 text-xs text-warning",
|
|
950
950
|
children: "ffmpeg-params: widgetConfig.fieldKey is required — fix the contribution builder."
|
|
951
|
-
}) : /* @__PURE__ */
|
|
951
|
+
}) : /* @__PURE__ */ _(ce, {
|
|
952
952
|
config: {
|
|
953
953
|
...n,
|
|
954
954
|
fieldKey: s
|
|
@@ -957,8 +957,8 @@ function ue(t) {
|
|
|
957
957
|
onSave: o
|
|
958
958
|
});
|
|
959
959
|
}
|
|
960
|
-
function
|
|
961
|
-
let [i, a] =
|
|
960
|
+
function V({ id: e, disabled: t, catalogue: n, onPick: r }) {
|
|
961
|
+
let [i, a] = m(!1), o = f(() => {
|
|
962
962
|
let e = /* @__PURE__ */ new Map();
|
|
963
963
|
for (let t of n) {
|
|
964
964
|
let n = e.get(t.group) ?? [];
|
|
@@ -966,37 +966,37 @@ function B({ id: e, disabled: t, catalogue: n, onPick: r }) {
|
|
|
966
966
|
}
|
|
967
967
|
return e;
|
|
968
968
|
}, [n]);
|
|
969
|
-
return /* @__PURE__ */
|
|
969
|
+
return /* @__PURE__ */ v("div", {
|
|
970
970
|
className: "relative",
|
|
971
|
-
children: [/* @__PURE__ */
|
|
971
|
+
children: [/* @__PURE__ */ v("button", {
|
|
972
972
|
id: e,
|
|
973
973
|
type: "button",
|
|
974
974
|
disabled: t,
|
|
975
975
|
onClick: () => a((e) => !e),
|
|
976
976
|
className: "inline-flex items-center gap-1 rounded-md border border-border bg-surface-hover px-2 py-0.5 text-[10px] font-medium text-foreground-subtle hover:bg-surface-hover/70 disabled:opacity-40 disabled:cursor-not-allowed transition-colors",
|
|
977
|
-
children: [/* @__PURE__ */
|
|
978
|
-
}), i && !t && /* @__PURE__ */
|
|
977
|
+
children: [/* @__PURE__ */ _(ee, { className: "h-3 w-3" }), "Add flag…"]
|
|
978
|
+
}), i && !t && /* @__PURE__ */ v(y, { children: [/* @__PURE__ */ _("div", {
|
|
979
979
|
className: "fixed inset-0 z-40",
|
|
980
980
|
onClick: () => a(!1),
|
|
981
981
|
"aria-hidden": "true"
|
|
982
|
-
}), /* @__PURE__ */
|
|
982
|
+
}), /* @__PURE__ */ _("div", {
|
|
983
983
|
className: "absolute right-0 top-full z-50 mt-1 max-h-72 w-72 overflow-y-auto rounded-lg border border-border bg-surface shadow-lg",
|
|
984
984
|
role: "menu",
|
|
985
|
-
children: Array.from(o.entries()).map(([e, t]) => /* @__PURE__ */
|
|
985
|
+
children: Array.from(o.entries()).map(([e, t]) => /* @__PURE__ */ v("div", {
|
|
986
986
|
className: "border-b border-border/30 last:border-b-0",
|
|
987
|
-
children: [/* @__PURE__ */
|
|
987
|
+
children: [/* @__PURE__ */ _("div", {
|
|
988
988
|
className: "sticky top-0 bg-surface-hover/80 backdrop-blur px-2 py-1 text-[9px] font-semibold uppercase tracking-wider text-foreground-subtle",
|
|
989
989
|
children: e
|
|
990
|
-
}), t.map((e) => /* @__PURE__ */
|
|
990
|
+
}), t.map((e) => /* @__PURE__ */ v("button", {
|
|
991
991
|
type: "button",
|
|
992
992
|
onClick: () => {
|
|
993
993
|
r(e), a(!1);
|
|
994
994
|
},
|
|
995
995
|
className: "w-full text-left px-2 py-1.5 hover:bg-surface-hover transition-colors group",
|
|
996
|
-
children: [/* @__PURE__ */
|
|
996
|
+
children: [/* @__PURE__ */ _("div", {
|
|
997
997
|
className: "font-mono text-[11px] text-foreground",
|
|
998
998
|
children: e.label
|
|
999
|
-
}), e.description !== void 0 && /* @__PURE__ */
|
|
999
|
+
}), e.description !== void 0 && /* @__PURE__ */ _("div", {
|
|
1000
1000
|
className: "text-[10px] text-foreground-subtle leading-snug mt-0.5",
|
|
1001
1001
|
children: e.description
|
|
1002
1002
|
})]
|
|
@@ -1007,18 +1007,18 @@ function B({ id: e, disabled: t, catalogue: n, onPick: r }) {
|
|
|
1007
1007
|
}
|
|
1008
1008
|
//#endregion
|
|
1009
1009
|
//#region src/stream-broker/widgets/format-ua.ts
|
|
1010
|
-
var
|
|
1010
|
+
var H = 24;
|
|
1011
1011
|
function de(e) {
|
|
1012
1012
|
return /\bEdg\b|\bEdgA\b|\bEdgiOS\b|Edge\//.test(e) ? "Edge" : /\bOPR\b|Opera/.test(e) ? "Opera" : /Firefox\/|\bFxiOS\b/.test(e) ? "Firefox" : /Chrome\/|\bCriOS\b/.test(e) ? "Chrome" : /Safari\//.test(e) ? "Safari" : null;
|
|
1013
1013
|
}
|
|
1014
1014
|
function fe(e) {
|
|
1015
1015
|
return /iPhone|iPad|iPod|\biOS\b|CriOS|FxiOS/.test(e) ? "iOS" : /Mac OS X|Macintosh/.test(e) ? "macOS" : /Windows/.test(e) ? "Windows" : /Android/.test(e) ? "Android" : /Linux/.test(e) ? "Linux" : null;
|
|
1016
1016
|
}
|
|
1017
|
-
function
|
|
1017
|
+
function U(e) {
|
|
1018
1018
|
let t = e.trim();
|
|
1019
1019
|
if (t.length === 0) return "";
|
|
1020
1020
|
let n = de(t), r = fe(t);
|
|
1021
|
-
return n && r ? `${n}/${r}` : n || r || (t.length >
|
|
1021
|
+
return n && r ? `${n}/${r}` : n || r || (t.length > H ? `${t.slice(0, H)}…` : t);
|
|
1022
1022
|
}
|
|
1023
1023
|
//#endregion
|
|
1024
1024
|
//#region src/stream-broker/widgets/StreamBrokerPanel.tsx
|
|
@@ -1028,11 +1028,11 @@ function pe(e) {
|
|
|
1028
1028
|
let n = Math.floor(t / 60);
|
|
1029
1029
|
return n < 60 ? `${n}m` : `${Math.floor(n / 60)}h ${n % 60}m`;
|
|
1030
1030
|
}
|
|
1031
|
-
var
|
|
1031
|
+
var W = {
|
|
1032
1032
|
high: "High",
|
|
1033
1033
|
mid: "Mid",
|
|
1034
1034
|
low: "Low"
|
|
1035
|
-
},
|
|
1035
|
+
}, G = [
|
|
1036
1036
|
"high",
|
|
1037
1037
|
"mid",
|
|
1038
1038
|
"low"
|
|
@@ -1049,7 +1049,7 @@ var U = {
|
|
|
1049
1049
|
snapshot: "bg-cyan-500/15 text-cyan-400",
|
|
1050
1050
|
warmup: "bg-foreground-subtle/10 text-foreground-subtle",
|
|
1051
1051
|
unknown: "bg-foreground-subtle/10 text-foreground-subtle"
|
|
1052
|
-
},
|
|
1052
|
+
}, K = {
|
|
1053
1053
|
alexa: "ALEXA",
|
|
1054
1054
|
homekit: "HOMEKIT",
|
|
1055
1055
|
"webrtc-browser": "BROWSER",
|
|
@@ -1064,105 +1064,115 @@ var U = {
|
|
|
1064
1064
|
unknown: "—"
|
|
1065
1065
|
};
|
|
1066
1066
|
function he(e) {
|
|
1067
|
-
return
|
|
1067
|
+
return K[e] ?? e.toUpperCase().slice(0, 8);
|
|
1068
1068
|
}
|
|
1069
1069
|
function ge(e) {
|
|
1070
|
-
return
|
|
1070
|
+
return K[e] ?? e;
|
|
1071
1071
|
}
|
|
1072
1072
|
function _e(e) {
|
|
1073
1073
|
let t = e.config ?? {};
|
|
1074
|
-
return e.deviceId === void 0 ? /* @__PURE__ */
|
|
1074
|
+
return e.deviceId === void 0 ? /* @__PURE__ */ _("div", {
|
|
1075
1075
|
className: "rounded-lg border border-warning/30 bg-warning/10 px-3 py-2 text-xs text-warning",
|
|
1076
1076
|
children: "StreamBrokerPanel requires a deviceId"
|
|
1077
|
-
}) : /* @__PURE__ */
|
|
1077
|
+
}) : /* @__PURE__ */ _(ve, {
|
|
1078
1078
|
deviceId: e.deviceId,
|
|
1079
1079
|
title: t.title,
|
|
1080
1080
|
variant: t.variant,
|
|
1081
1081
|
hideEmpty: t.hideEmpty
|
|
1082
1082
|
});
|
|
1083
1083
|
}
|
|
1084
|
-
function ve({ deviceId: e, title: t = "Stream Brokers", variant:
|
|
1085
|
-
|
|
1084
|
+
function ve({ deviceId: e, title: t = "Stream Brokers", variant: n = "full", hideEmpty: s = !1 }) {
|
|
1085
|
+
c(["streamBroker", "listAllProfileSlots"], [
|
|
1086
1086
|
"device.streams-registered",
|
|
1087
1087
|
"device.streams-unregistered",
|
|
1088
1088
|
"device.registered",
|
|
1089
1089
|
"device.unregistered"
|
|
1090
1090
|
]);
|
|
1091
|
-
let { data:
|
|
1091
|
+
let { data: l } = a(void 0, { staleTime: 3e4 }), u = (l ?? []).filter((t) => t.deviceId === e && t.sourceCamStreamId !== null).slice().toSorted((e, t) => G.indexOf(e.profile) - G.indexOf(t.profile)), d = o(r().trpcClient, e), { data: f } = x({
|
|
1092
1092
|
queryKey: [
|
|
1093
1093
|
"device",
|
|
1094
1094
|
e,
|
|
1095
1095
|
"cameraStreams.getCameraStreams"
|
|
1096
1096
|
],
|
|
1097
|
-
queryFn: () =>
|
|
1098
|
-
enabled: !!
|
|
1097
|
+
queryFn: () => d?.cameraStreams?.getCameraStreams({}) ?? [],
|
|
1098
|
+
enabled: !!d,
|
|
1099
1099
|
staleTime: 3e4
|
|
1100
|
-
}),
|
|
1101
|
-
for (let e of
|
|
1102
|
-
let
|
|
1103
|
-
return
|
|
1100
|
+
}), p = /* @__PURE__ */ new Map();
|
|
1101
|
+
for (let e of f ?? []) p.set(e.camStreamId, e);
|
|
1102
|
+
let { data: m } = i({ deviceId: e }, { staleTime: 3e4 }), h = m?.assignment.sourceNodeId ?? null, g = new Set(u.map((e) => e.sourceCamStreamId).filter((e) => e !== null)), y = (f ?? []).filter((e) => !g.has(e.camStreamId)), b = u.length > 0, S = y.length > 0;
|
|
1103
|
+
return s && !b && !S ? null : n === "compact" ? b ? /* @__PURE__ */ _("div", {
|
|
1104
1104
|
className: "divide-y divide-border/30",
|
|
1105
|
-
children:
|
|
1105
|
+
children: u.map((e) => /* @__PURE__ */ _(J, {
|
|
1106
1106
|
slot: e,
|
|
1107
|
-
camStreams:
|
|
1107
|
+
camStreams: p,
|
|
1108
1108
|
compact: !0
|
|
1109
1109
|
}, e.brokerId))
|
|
1110
|
-
}) : /* @__PURE__ */
|
|
1110
|
+
}) : /* @__PURE__ */ _("div", {
|
|
1111
1111
|
className: "text-[11px] text-foreground-subtle italic px-2 py-1",
|
|
1112
1112
|
children: "No active profile slots"
|
|
1113
|
-
}) : /* @__PURE__ */
|
|
1113
|
+
}) : /* @__PURE__ */ v("div", {
|
|
1114
1114
|
className: "rounded-lg border border-border bg-surface overflow-hidden",
|
|
1115
1115
|
children: [
|
|
1116
|
-
/* @__PURE__ */
|
|
1117
|
-
className: "border-b border-border px-4 py-2 flex items-center justify-between",
|
|
1118
|
-
children: [/* @__PURE__ */
|
|
1119
|
-
className: "text-xs font-semibold text-foreground uppercase tracking-wider",
|
|
1116
|
+
/* @__PURE__ */ v("div", {
|
|
1117
|
+
className: "border-b border-border px-4 py-2 flex flex-wrap items-center justify-between gap-x-2 gap-y-1",
|
|
1118
|
+
children: [/* @__PURE__ */ _("h2", {
|
|
1119
|
+
className: "text-xs font-semibold text-foreground uppercase tracking-wider shrink-0",
|
|
1120
1120
|
children: t
|
|
1121
|
-
}),
|
|
1122
|
-
className: "
|
|
1123
|
-
children: [
|
|
1121
|
+
}), /* @__PURE__ */ v("div", {
|
|
1122
|
+
className: "flex items-center gap-1.5 min-w-0",
|
|
1123
|
+
children: [h !== null && /* @__PURE__ */ v("span", {
|
|
1124
|
+
title: `Cluster node dialing this camera's source: ${h}`,
|
|
1125
|
+
className: "inline-flex items-center gap-1.5 rounded-full px-2 py-0.5 text-[10px] font-medium bg-accent/10 text-accent border border-accent/30 min-w-0 max-w-full",
|
|
1126
|
+
children: [/* @__PURE__ */ _(N, { className: "h-2.5 w-2.5 shrink-0" }), /* @__PURE__ */ _("span", {
|
|
1127
|
+
className: "truncate",
|
|
1128
|
+
children: h
|
|
1129
|
+
})]
|
|
1130
|
+
}), b && /* @__PURE__ */ v("span", {
|
|
1131
|
+
className: "inline-flex items-center gap-1.5 rounded-full px-2 py-0.5 text-[10px] font-medium bg-foreground-subtle/10 text-foreground-subtle border border-border shrink-0 whitespace-nowrap",
|
|
1132
|
+
children: [u.length, " assigned"]
|
|
1133
|
+
})]
|
|
1124
1134
|
})]
|
|
1125
1135
|
}),
|
|
1126
|
-
|
|
1136
|
+
b ? /* @__PURE__ */ _("div", {
|
|
1127
1137
|
className: "divide-y divide-border/30",
|
|
1128
|
-
children:
|
|
1138
|
+
children: u.map((e) => /* @__PURE__ */ _(J, {
|
|
1129
1139
|
slot: e,
|
|
1130
|
-
camStreams:
|
|
1140
|
+
camStreams: p,
|
|
1131
1141
|
compact: !1
|
|
1132
1142
|
}, e.brokerId))
|
|
1133
|
-
}) : /* @__PURE__ */
|
|
1143
|
+
}) : /* @__PURE__ */ v("div", {
|
|
1134
1144
|
className: "px-4 py-6 flex flex-col items-center text-center text-foreground-subtle",
|
|
1135
|
-
children: [/* @__PURE__ */
|
|
1145
|
+
children: [/* @__PURE__ */ _(N, { className: "h-5 w-5 mb-2 opacity-30" }), /* @__PURE__ */ _("p", {
|
|
1136
1146
|
className: "text-xs",
|
|
1137
1147
|
children: "No profile slots assigned for this device"
|
|
1138
1148
|
})]
|
|
1139
1149
|
}),
|
|
1140
|
-
|
|
1150
|
+
S && /* @__PURE__ */ _(ye, {
|
|
1141
1151
|
deviceId: e,
|
|
1142
|
-
camStreamIds:
|
|
1143
|
-
camStreams:
|
|
1152
|
+
camStreamIds: y.map((e) => e.camStreamId),
|
|
1153
|
+
camStreams: p
|
|
1144
1154
|
})
|
|
1145
1155
|
]
|
|
1146
1156
|
});
|
|
1147
1157
|
}
|
|
1148
1158
|
function ye({ deviceId: e, camStreamIds: t, camStreams: n }) {
|
|
1149
|
-
let [r, i] =
|
|
1150
|
-
return /* @__PURE__ */
|
|
1159
|
+
let [r, i] = m(!1);
|
|
1160
|
+
return /* @__PURE__ */ v("div", {
|
|
1151
1161
|
className: "border-t border-border/50",
|
|
1152
|
-
children: [/* @__PURE__ */
|
|
1162
|
+
children: [/* @__PURE__ */ v("button", {
|
|
1153
1163
|
type: "button",
|
|
1154
1164
|
onClick: () => i((e) => !e),
|
|
1155
1165
|
className: "w-full px-4 py-1.5 flex items-center justify-between bg-surface-hover/30 hover:bg-surface-hover transition-colors",
|
|
1156
|
-
children: [/* @__PURE__ */
|
|
1166
|
+
children: [/* @__PURE__ */ v("span", {
|
|
1157
1167
|
className: "inline-flex items-center gap-1.5 text-[11px] uppercase tracking-wider text-foreground-subtle",
|
|
1158
|
-
children: [
|
|
1159
|
-
}), /* @__PURE__ */
|
|
1168
|
+
children: [_(r ? j : M, { className: "h-3 w-3" }), "Other active streams"]
|
|
1169
|
+
}), /* @__PURE__ */ _("span", {
|
|
1160
1170
|
className: "rounded-full px-2 py-0.5 text-[10px] font-medium bg-foreground-subtle/10 text-foreground-subtle border border-border",
|
|
1161
1171
|
children: t.length
|
|
1162
1172
|
})]
|
|
1163
|
-
}), r && /* @__PURE__ */
|
|
1173
|
+
}), r && /* @__PURE__ */ _("div", {
|
|
1164
1174
|
className: "divide-y divide-border/30",
|
|
1165
|
-
children: t.map((t) => /* @__PURE__ */
|
|
1175
|
+
children: t.map((t) => /* @__PURE__ */ _(be, {
|
|
1166
1176
|
deviceId: e,
|
|
1167
1177
|
camStreamId: t,
|
|
1168
1178
|
camStreams: n
|
|
@@ -1171,20 +1181,20 @@ function ye({ deviceId: e, camStreamIds: t, camStreams: n }) {
|
|
|
1171
1181
|
});
|
|
1172
1182
|
}
|
|
1173
1183
|
function be({ deviceId: e, camStreamId: n, camStreams: r }) {
|
|
1174
|
-
let i =
|
|
1175
|
-
return /* @__PURE__ */
|
|
1184
|
+
let i = S(e, n), a = t("stream-broker.metrics-snapshot", (e) => e.brokerId === i)?.stats, o = r.get(n), s = a?.status === "streaming";
|
|
1185
|
+
return /* @__PURE__ */ v("div", {
|
|
1176
1186
|
className: "px-4 py-2",
|
|
1177
|
-
children: [/* @__PURE__ */
|
|
1187
|
+
children: [/* @__PURE__ */ _("div", {
|
|
1178
1188
|
className: "flex items-center justify-between mb-1",
|
|
1179
|
-
children: /* @__PURE__ */
|
|
1189
|
+
children: /* @__PURE__ */ v("div", {
|
|
1180
1190
|
className: "flex items-center gap-1.5",
|
|
1181
1191
|
children: [
|
|
1182
|
-
/* @__PURE__ */
|
|
1183
|
-
/* @__PURE__ */
|
|
1192
|
+
/* @__PURE__ */ _("span", { className: `h-1.5 w-1.5 rounded-full ${s ? "bg-success" : "bg-foreground-subtle/40"}` }),
|
|
1193
|
+
/* @__PURE__ */ _("span", {
|
|
1184
1194
|
className: "text-[11px] font-medium text-foreground",
|
|
1185
1195
|
children: o?.label ?? n
|
|
1186
1196
|
}),
|
|
1187
|
-
o?.resolution && /* @__PURE__ */
|
|
1197
|
+
o?.resolution && /* @__PURE__ */ v("span", {
|
|
1188
1198
|
className: "text-[10px] text-foreground-subtle",
|
|
1189
1199
|
children: [
|
|
1190
1200
|
o.resolution.width,
|
|
@@ -1192,51 +1202,51 @@ function be({ deviceId: e, camStreamId: n, camStreams: r }) {
|
|
|
1192
1202
|
o.resolution.height
|
|
1193
1203
|
]
|
|
1194
1204
|
}),
|
|
1195
|
-
/* @__PURE__ */
|
|
1205
|
+
/* @__PURE__ */ _("span", {
|
|
1196
1206
|
className: `text-[10px] ${s ? "text-success" : "text-foreground-subtle"}`,
|
|
1197
1207
|
children: a?.status ?? "idle"
|
|
1198
1208
|
})
|
|
1199
1209
|
]
|
|
1200
1210
|
})
|
|
1201
|
-
}), a && s && /* @__PURE__ */
|
|
1211
|
+
}), a && s && /* @__PURE__ */ v("div", {
|
|
1202
1212
|
className: "flex flex-wrap gap-x-3 gap-y-1 text-[10px]",
|
|
1203
1213
|
children: [
|
|
1204
|
-
/* @__PURE__ */
|
|
1214
|
+
/* @__PURE__ */ v("span", {
|
|
1205
1215
|
className: "inline-flex whitespace-nowrap gap-1",
|
|
1206
|
-
children: [/* @__PURE__ */
|
|
1216
|
+
children: [/* @__PURE__ */ _("span", {
|
|
1207
1217
|
className: "text-foreground-subtle",
|
|
1208
1218
|
children: "FPS:"
|
|
1209
|
-
}), /* @__PURE__ */
|
|
1219
|
+
}), /* @__PURE__ */ _("span", {
|
|
1210
1220
|
className: "text-foreground",
|
|
1211
1221
|
children: a.inputFps.toFixed(1)
|
|
1212
1222
|
})]
|
|
1213
1223
|
}),
|
|
1214
|
-
/* @__PURE__ */
|
|
1224
|
+
/* @__PURE__ */ v("span", {
|
|
1215
1225
|
className: "inline-flex whitespace-nowrap gap-1",
|
|
1216
|
-
children: [/* @__PURE__ */
|
|
1226
|
+
children: [/* @__PURE__ */ _("span", {
|
|
1217
1227
|
className: "text-foreground-subtle",
|
|
1218
1228
|
children: "Bitrate:"
|
|
1219
|
-
}), /* @__PURE__ */
|
|
1229
|
+
}), /* @__PURE__ */ _("span", {
|
|
1220
1230
|
className: "text-foreground",
|
|
1221
1231
|
children: a.bitrateKbps >= 1e3 ? `${(a.bitrateKbps / 1e3).toFixed(1)} Mbps` : `${a.bitrateKbps} kbps`
|
|
1222
1232
|
})]
|
|
1223
1233
|
}),
|
|
1224
|
-
/* @__PURE__ */
|
|
1234
|
+
/* @__PURE__ */ v("span", {
|
|
1225
1235
|
className: "inline-flex whitespace-nowrap gap-1",
|
|
1226
|
-
children: [/* @__PURE__ */
|
|
1236
|
+
children: [/* @__PURE__ */ _("span", {
|
|
1227
1237
|
className: "text-foreground-subtle",
|
|
1228
1238
|
children: "Codec:"
|
|
1229
|
-
}), /* @__PURE__ */
|
|
1239
|
+
}), /* @__PURE__ */ _("span", {
|
|
1230
1240
|
className: "text-foreground",
|
|
1231
1241
|
children: a.codec?.toUpperCase() ?? "—"
|
|
1232
1242
|
})]
|
|
1233
1243
|
}),
|
|
1234
|
-
/* @__PURE__ */
|
|
1244
|
+
/* @__PURE__ */ v("span", {
|
|
1235
1245
|
className: "inline-flex whitespace-nowrap gap-1",
|
|
1236
|
-
children: [/* @__PURE__ */
|
|
1246
|
+
children: [/* @__PURE__ */ _("span", {
|
|
1237
1247
|
className: "text-foreground-subtle",
|
|
1238
1248
|
children: "Pkts:"
|
|
1239
|
-
}), /* @__PURE__ */
|
|
1249
|
+
}), /* @__PURE__ */ _("span", {
|
|
1240
1250
|
className: "text-foreground",
|
|
1241
1251
|
children: a.packetCount > 1e3 ? `${(a.packetCount / 1e3).toFixed(1)}k` : a.packetCount
|
|
1242
1252
|
})]
|
|
@@ -1245,7 +1255,7 @@ function be({ deviceId: e, camStreamId: n, camStreams: r }) {
|
|
|
1245
1255
|
})]
|
|
1246
1256
|
});
|
|
1247
1257
|
}
|
|
1248
|
-
function
|
|
1258
|
+
function q(e, t) {
|
|
1249
1259
|
let n = (e) => {
|
|
1250
1260
|
if (!e || typeof e != "object") return;
|
|
1251
1261
|
let r = e;
|
|
@@ -1266,293 +1276,294 @@ function K(e, t) {
|
|
|
1266
1276
|
if (t !== void 0) return t;
|
|
1267
1277
|
}
|
|
1268
1278
|
}
|
|
1269
|
-
function
|
|
1270
|
-
let a =
|
|
1271
|
-
|
|
1272
|
-
let { data: d } =
|
|
1273
|
-
enabled:
|
|
1279
|
+
function J({ slot: e, camStreams: r, compact: i }) {
|
|
1280
|
+
let a = b(), o = t("stream-broker.metrics-snapshot", (t) => t.brokerId === e.brokerId)?.stats;
|
|
1281
|
+
c(["streamBroker", "listClients"], ["stream-broker.metrics-snapshot"]);
|
|
1282
|
+
let { data: d } = s({ brokerId: e.brokerId }, {
|
|
1283
|
+
enabled: o?.status === "streaming",
|
|
1274
1284
|
staleTime: 2e3
|
|
1275
|
-
}), { data: f } =
|
|
1285
|
+
}), { data: f } = n({ deviceId: e.deviceId }, { staleTime: 15e3 }), p = e.sourceCamStreamId ?? e.profile, m = !!(q(f, `preBufferEnabled:${p}`) ?? !0), g = q(f, `preBufferSec:${p}`), x = u({ onSuccess: () => {
|
|
1276
1286
|
a.invalidateQueries({ queryKey: [["streamBroker", "getDeviceSettingsContribution"]] });
|
|
1277
1287
|
} }), S = (t) => {
|
|
1278
1288
|
x.mutate({
|
|
1279
1289
|
deviceId: e.deviceId,
|
|
1280
1290
|
patch: { [`preBufferEnabled:${p}`]: t }
|
|
1281
1291
|
});
|
|
1282
|
-
}, C =
|
|
1292
|
+
}, C = l({ onSuccess: () => {
|
|
1283
1293
|
a.invalidateQueries({ queryKey: [["streamBroker", "listClients"]] });
|
|
1284
|
-
} }), w =
|
|
1294
|
+
} }), w = h((t) => {
|
|
1285
1295
|
C.mutate({
|
|
1286
1296
|
brokerId: e.brokerId,
|
|
1287
1297
|
...t
|
|
1288
1298
|
});
|
|
1289
|
-
}, [C, e.brokerId]), T = (e.sourceCamStreamId ?
|
|
1290
|
-
return /* @__PURE__ */
|
|
1299
|
+
}, [C, e.brokerId]), T = (e.sourceCamStreamId ? r.get(e.sourceCamStreamId) : void 0)?.resolution ?? e.resolution, E = o?.status === "streaming", D = T ? `${W[e.profile]} (${T.width}×${T.height})` : W[e.profile], O = o ? o.encodedSubscribers + o.decodedSubscribers + (o.rtspClients ?? 0) + (o.pipeClients ?? 0) : 0;
|
|
1300
|
+
return /* @__PURE__ */ v("div", {
|
|
1291
1301
|
className: `@container ${i ? "px-3 py-1.5" : "px-4 py-2"}`,
|
|
1292
1302
|
style: { containerType: "inline-size" },
|
|
1293
1303
|
children: [
|
|
1294
|
-
/* @__PURE__ */
|
|
1295
|
-
className: "flex items-center justify-between mb-1.5",
|
|
1296
|
-
children: [/* @__PURE__ */
|
|
1297
|
-
className: "flex items-center gap-1.5",
|
|
1304
|
+
/* @__PURE__ */ v("div", {
|
|
1305
|
+
className: "flex items-center justify-between gap-2 mb-1.5",
|
|
1306
|
+
children: [/* @__PURE__ */ v("div", {
|
|
1307
|
+
className: "flex items-center gap-1.5 min-w-0",
|
|
1298
1308
|
children: [
|
|
1299
|
-
/* @__PURE__ */
|
|
1300
|
-
/* @__PURE__ */
|
|
1301
|
-
className: "text-[11px] font-medium text-foreground",
|
|
1309
|
+
/* @__PURE__ */ _("span", { className: `h-1.5 w-1.5 shrink-0 rounded-full ${E ? e.profile === "high" ? "bg-success" : e.profile === "mid" ? "bg-warning" : "bg-foreground-subtle" : "bg-foreground-subtle/40"}` }),
|
|
1310
|
+
/* @__PURE__ */ _("span", {
|
|
1311
|
+
className: "text-[11px] font-medium text-foreground whitespace-nowrap shrink-0",
|
|
1302
1312
|
children: D
|
|
1303
1313
|
}),
|
|
1304
|
-
/* @__PURE__ */
|
|
1305
|
-
className: `text-[10px] ${E ? "text-success" : "text-foreground-subtle"}`,
|
|
1306
|
-
children:
|
|
1314
|
+
/* @__PURE__ */ _("span", {
|
|
1315
|
+
className: `text-[10px] shrink-0 ${E ? "text-success" : "text-foreground-subtle"}`,
|
|
1316
|
+
children: o?.status ?? "loading"
|
|
1307
1317
|
}),
|
|
1308
|
-
e.sourceCamStreamId && /* @__PURE__ */
|
|
1309
|
-
className: "text-[10px] text-foreground-subtle",
|
|
1318
|
+
e.sourceCamStreamId && /* @__PURE__ */ v("span", {
|
|
1319
|
+
className: "text-[10px] text-foreground-subtle truncate min-w-0",
|
|
1320
|
+
title: e.sourceCamStreamId,
|
|
1310
1321
|
children: ["← ", e.sourceCamStreamId]
|
|
1311
1322
|
})
|
|
1312
1323
|
]
|
|
1313
|
-
}), /* @__PURE__ */
|
|
1314
|
-
className: "text-[10px] text-foreground-subtle",
|
|
1315
|
-
children:
|
|
1324
|
+
}), /* @__PURE__ */ _("span", {
|
|
1325
|
+
className: "text-[10px] text-foreground-subtle shrink-0 whitespace-nowrap",
|
|
1326
|
+
children: o && o.uptimeMs > 0 ? pe(o.uptimeMs) : "—"
|
|
1316
1327
|
})]
|
|
1317
1328
|
}),
|
|
1318
|
-
|
|
1329
|
+
o && E ? i ? /* @__PURE__ */ v("div", {
|
|
1319
1330
|
className: "flex flex-wrap gap-x-3 gap-y-0.5 text-[10px]",
|
|
1320
1331
|
children: [
|
|
1321
|
-
/* @__PURE__ */
|
|
1332
|
+
/* @__PURE__ */ v("span", {
|
|
1322
1333
|
className: "inline-flex whitespace-nowrap gap-1",
|
|
1323
|
-
children: [/* @__PURE__ */
|
|
1334
|
+
children: [/* @__PURE__ */ _("span", {
|
|
1324
1335
|
className: "text-foreground-subtle",
|
|
1325
1336
|
children: "FPS:"
|
|
1326
|
-
}), /* @__PURE__ */
|
|
1337
|
+
}), /* @__PURE__ */ v("span", {
|
|
1327
1338
|
className: "text-foreground",
|
|
1328
1339
|
children: [
|
|
1329
|
-
|
|
1340
|
+
o.inputFps.toFixed(1),
|
|
1330
1341
|
"/",
|
|
1331
|
-
|
|
1342
|
+
o.decodeFps.toFixed(1)
|
|
1332
1343
|
]
|
|
1333
1344
|
})]
|
|
1334
1345
|
}),
|
|
1335
|
-
/* @__PURE__ */
|
|
1346
|
+
/* @__PURE__ */ v("span", {
|
|
1336
1347
|
className: "inline-flex whitespace-nowrap gap-1",
|
|
1337
|
-
children: [/* @__PURE__ */
|
|
1348
|
+
children: [/* @__PURE__ */ _("span", {
|
|
1338
1349
|
className: "text-foreground-subtle",
|
|
1339
1350
|
children: "Bitrate:"
|
|
1340
|
-
}), /* @__PURE__ */
|
|
1351
|
+
}), /* @__PURE__ */ _("span", {
|
|
1341
1352
|
className: "text-foreground",
|
|
1342
|
-
children:
|
|
1353
|
+
children: o.bitrateKbps >= 1e3 ? `${(o.bitrateKbps / 1e3).toFixed(1)} Mbps` : `${o.bitrateKbps} kbps`
|
|
1343
1354
|
})]
|
|
1344
1355
|
}),
|
|
1345
|
-
/* @__PURE__ */
|
|
1356
|
+
/* @__PURE__ */ v("span", {
|
|
1346
1357
|
className: "inline-flex whitespace-nowrap gap-1",
|
|
1347
|
-
children: [/* @__PURE__ */
|
|
1358
|
+
children: [/* @__PURE__ */ _("span", {
|
|
1348
1359
|
className: "text-foreground-subtle",
|
|
1349
1360
|
children: "Codec:"
|
|
1350
|
-
}), /* @__PURE__ */
|
|
1361
|
+
}), /* @__PURE__ */ _("span", {
|
|
1351
1362
|
className: "text-foreground",
|
|
1352
|
-
children:
|
|
1363
|
+
children: o.codec?.toUpperCase() ?? "—"
|
|
1353
1364
|
})]
|
|
1354
1365
|
}),
|
|
1355
|
-
/* @__PURE__ */
|
|
1366
|
+
/* @__PURE__ */ v("span", {
|
|
1356
1367
|
className: "inline-flex items-center whitespace-nowrap gap-1",
|
|
1357
1368
|
children: [
|
|
1358
|
-
/* @__PURE__ */
|
|
1369
|
+
/* @__PURE__ */ _("span", {
|
|
1359
1370
|
className: "text-foreground-subtle",
|
|
1360
1371
|
children: "Clients:"
|
|
1361
1372
|
}),
|
|
1362
|
-
/* @__PURE__ */
|
|
1373
|
+
/* @__PURE__ */ _("span", {
|
|
1363
1374
|
className: "text-foreground font-semibold",
|
|
1364
1375
|
children: O
|
|
1365
1376
|
}),
|
|
1366
|
-
/* @__PURE__ */
|
|
1377
|
+
/* @__PURE__ */ _("span", {
|
|
1367
1378
|
className: "text-foreground-subtle/70",
|
|
1368
1379
|
children: "("
|
|
1369
1380
|
}),
|
|
1370
|
-
/* @__PURE__ */
|
|
1371
|
-
count:
|
|
1381
|
+
/* @__PURE__ */ _(we, {
|
|
1382
|
+
count: o.encodedSubscribers + o.decodedSubscribers,
|
|
1372
1383
|
clients: d,
|
|
1373
1384
|
onKill: w
|
|
1374
1385
|
}),
|
|
1375
|
-
/* @__PURE__ */
|
|
1386
|
+
/* @__PURE__ */ _("span", {
|
|
1376
1387
|
className: "text-foreground-subtle/70",
|
|
1377
1388
|
children: "·"
|
|
1378
1389
|
}),
|
|
1379
|
-
/* @__PURE__ */
|
|
1380
|
-
count:
|
|
1390
|
+
/* @__PURE__ */ _(Ee, {
|
|
1391
|
+
count: o.rtspClients ?? 0,
|
|
1381
1392
|
clients: d,
|
|
1382
1393
|
onKill: w
|
|
1383
1394
|
}),
|
|
1384
|
-
/* @__PURE__ */
|
|
1395
|
+
/* @__PURE__ */ v("span", {
|
|
1385
1396
|
className: "text-foreground-subtle/70",
|
|
1386
1397
|
children: [
|
|
1387
1398
|
"· pipe ",
|
|
1388
|
-
|
|
1399
|
+
o.pipeClients ?? 0,
|
|
1389
1400
|
")"
|
|
1390
1401
|
]
|
|
1391
1402
|
})
|
|
1392
1403
|
]
|
|
1393
1404
|
})
|
|
1394
1405
|
]
|
|
1395
|
-
}) : /* @__PURE__ */
|
|
1406
|
+
}) : /* @__PURE__ */ v(y, { children: [/* @__PURE__ */ v("div", {
|
|
1396
1407
|
className: "flex flex-wrap gap-x-3 gap-y-1 text-[10px]",
|
|
1397
1408
|
children: [
|
|
1398
|
-
/* @__PURE__ */
|
|
1409
|
+
/* @__PURE__ */ v("span", {
|
|
1399
1410
|
className: "inline-flex whitespace-nowrap gap-1",
|
|
1400
|
-
children: [/* @__PURE__ */
|
|
1411
|
+
children: [/* @__PURE__ */ _("span", {
|
|
1401
1412
|
className: "text-foreground-subtle",
|
|
1402
1413
|
children: "In:"
|
|
1403
|
-
}), /* @__PURE__ */
|
|
1414
|
+
}), /* @__PURE__ */ v("span", {
|
|
1404
1415
|
className: "text-foreground",
|
|
1405
|
-
children: [
|
|
1416
|
+
children: [o.inputFps.toFixed(1), " fps"]
|
|
1406
1417
|
})]
|
|
1407
1418
|
}),
|
|
1408
|
-
/* @__PURE__ */
|
|
1419
|
+
/* @__PURE__ */ v("span", {
|
|
1409
1420
|
className: "inline-flex whitespace-nowrap gap-1",
|
|
1410
|
-
children: [/* @__PURE__ */
|
|
1421
|
+
children: [/* @__PURE__ */ _("span", {
|
|
1411
1422
|
className: "text-foreground-subtle",
|
|
1412
1423
|
children: "Dec:"
|
|
1413
|
-
}), /* @__PURE__ */
|
|
1424
|
+
}), /* @__PURE__ */ v("span", {
|
|
1414
1425
|
className: "text-foreground",
|
|
1415
|
-
children: [
|
|
1426
|
+
children: [o.decodeFps.toFixed(1), " fps"]
|
|
1416
1427
|
})]
|
|
1417
1428
|
}),
|
|
1418
|
-
/* @__PURE__ */
|
|
1429
|
+
/* @__PURE__ */ v("span", {
|
|
1419
1430
|
className: "inline-flex whitespace-nowrap gap-1",
|
|
1420
|
-
children: [/* @__PURE__ */
|
|
1431
|
+
children: [/* @__PURE__ */ _("span", {
|
|
1421
1432
|
className: "text-foreground-subtle",
|
|
1422
1433
|
children: "Bitrate:"
|
|
1423
|
-
}), /* @__PURE__ */
|
|
1434
|
+
}), /* @__PURE__ */ _("span", {
|
|
1424
1435
|
className: "text-foreground",
|
|
1425
|
-
children:
|
|
1436
|
+
children: o.bitrateKbps >= 1e3 ? `${(o.bitrateKbps / 1e3).toFixed(1)} Mbps` : `${o.bitrateKbps} kbps`
|
|
1426
1437
|
})]
|
|
1427
1438
|
}),
|
|
1428
|
-
/* @__PURE__ */
|
|
1439
|
+
/* @__PURE__ */ v("span", {
|
|
1429
1440
|
className: "hidden @[480px]:inline-flex whitespace-nowrap gap-1",
|
|
1430
|
-
children: [/* @__PURE__ */
|
|
1441
|
+
children: [/* @__PURE__ */ _("span", {
|
|
1431
1442
|
className: "text-foreground-subtle",
|
|
1432
1443
|
children: "IDR:"
|
|
1433
|
-
}), /* @__PURE__ */
|
|
1444
|
+
}), /* @__PURE__ */ _("span", {
|
|
1434
1445
|
className: "text-foreground",
|
|
1435
|
-
children:
|
|
1446
|
+
children: o.idrIntervalMs > 0 ? `${(o.idrIntervalMs / 1e3).toFixed(1)}s` : "—"
|
|
1436
1447
|
})]
|
|
1437
1448
|
}),
|
|
1438
|
-
/* @__PURE__ */
|
|
1449
|
+
/* @__PURE__ */ v("span", {
|
|
1439
1450
|
className: "inline-flex whitespace-nowrap gap-1",
|
|
1440
|
-
children: [/* @__PURE__ */
|
|
1451
|
+
children: [/* @__PURE__ */ _("span", {
|
|
1441
1452
|
className: "text-foreground-subtle",
|
|
1442
1453
|
children: "Codec:"
|
|
1443
|
-
}), /* @__PURE__ */
|
|
1454
|
+
}), /* @__PURE__ */ _("span", {
|
|
1444
1455
|
className: "text-foreground",
|
|
1445
|
-
children:
|
|
1456
|
+
children: o.codec?.toUpperCase() ?? "—"
|
|
1446
1457
|
})]
|
|
1447
1458
|
}),
|
|
1448
|
-
/* @__PURE__ */
|
|
1459
|
+
/* @__PURE__ */ v("span", {
|
|
1449
1460
|
className: "hidden @[480px]:inline-flex whitespace-nowrap gap-1 max-w-full overflow-hidden",
|
|
1450
|
-
children: [/* @__PURE__ */
|
|
1461
|
+
children: [/* @__PURE__ */ _("span", {
|
|
1451
1462
|
className: "text-foreground-subtle",
|
|
1452
1463
|
children: "Decoder:"
|
|
1453
|
-
}), /* @__PURE__ */
|
|
1464
|
+
}), /* @__PURE__ */ _("span", {
|
|
1454
1465
|
className: "text-foreground font-mono truncate",
|
|
1455
|
-
children:
|
|
1466
|
+
children: o.decoderNodeId ?? /* @__PURE__ */ _("span", {
|
|
1456
1467
|
className: "text-foreground-subtle italic",
|
|
1457
1468
|
children: "deferred"
|
|
1458
1469
|
})
|
|
1459
1470
|
})]
|
|
1460
1471
|
}),
|
|
1461
|
-
/* @__PURE__ */
|
|
1472
|
+
/* @__PURE__ */ v("span", {
|
|
1462
1473
|
className: "hidden @[640px]:inline-flex whitespace-nowrap gap-1",
|
|
1463
|
-
children: [/* @__PURE__ */
|
|
1474
|
+
children: [/* @__PURE__ */ _("span", {
|
|
1464
1475
|
className: "text-foreground-subtle",
|
|
1465
1476
|
children: "Pipe:"
|
|
1466
|
-
}), /* @__PURE__ */
|
|
1477
|
+
}), /* @__PURE__ */ _("span", {
|
|
1467
1478
|
className: "text-foreground",
|
|
1468
|
-
children:
|
|
1479
|
+
children: o.pipeClients ?? 0
|
|
1469
1480
|
})]
|
|
1470
1481
|
}),
|
|
1471
|
-
/* @__PURE__ */
|
|
1482
|
+
/* @__PURE__ */ v("span", {
|
|
1472
1483
|
className: "hidden @[640px]:inline-flex whitespace-nowrap gap-1",
|
|
1473
|
-
children: [/* @__PURE__ */
|
|
1484
|
+
children: [/* @__PURE__ */ _("span", {
|
|
1474
1485
|
className: "text-foreground-subtle",
|
|
1475
1486
|
children: "Packets:"
|
|
1476
|
-
}), /* @__PURE__ */
|
|
1487
|
+
}), /* @__PURE__ */ _("span", {
|
|
1477
1488
|
className: "text-foreground",
|
|
1478
|
-
children:
|
|
1489
|
+
children: o.packetCount > 1e3 ? `${(o.packetCount / 1e3).toFixed(1)}k` : o.packetCount
|
|
1479
1490
|
})]
|
|
1480
1491
|
}),
|
|
1481
|
-
/* @__PURE__ */
|
|
1492
|
+
/* @__PURE__ */ v("span", {
|
|
1482
1493
|
className: "hidden @[640px]:inline-flex whitespace-nowrap gap-1",
|
|
1483
|
-
children: [/* @__PURE__ */
|
|
1494
|
+
children: [/* @__PURE__ */ _("span", {
|
|
1484
1495
|
className: "text-foreground-subtle",
|
|
1485
1496
|
children: "Data:"
|
|
1486
|
-
}), /* @__PURE__ */
|
|
1497
|
+
}), /* @__PURE__ */ _("span", {
|
|
1487
1498
|
className: "text-foreground",
|
|
1488
|
-
children:
|
|
1499
|
+
children: o.totalBytes > 1048576 ? `${(o.totalBytes / 1048576).toFixed(1)} MB` : `${(o.totalBytes / 1024).toFixed(0)} KB`
|
|
1489
1500
|
})]
|
|
1490
1501
|
}),
|
|
1491
|
-
|
|
1502
|
+
o.audio && /* @__PURE__ */ v("div", {
|
|
1492
1503
|
className: "basis-full flex flex-wrap items-center gap-x-1.5 gap-y-0.5",
|
|
1493
1504
|
children: [
|
|
1494
|
-
/* @__PURE__ */
|
|
1505
|
+
/* @__PURE__ */ _("span", {
|
|
1495
1506
|
className: "text-foreground-subtle whitespace-nowrap",
|
|
1496
1507
|
children: "Audio:"
|
|
1497
1508
|
}),
|
|
1498
|
-
/* @__PURE__ */
|
|
1509
|
+
/* @__PURE__ */ v("span", {
|
|
1499
1510
|
className: "inline-flex whitespace-nowrap items-center gap-1.5",
|
|
1500
1511
|
children: [
|
|
1501
|
-
/* @__PURE__ */
|
|
1512
|
+
/* @__PURE__ */ _("span", {
|
|
1502
1513
|
className: "text-foreground",
|
|
1503
|
-
children:
|
|
1514
|
+
children: o.audio.codec.toUpperCase()
|
|
1504
1515
|
}),
|
|
1505
|
-
/* @__PURE__ */
|
|
1516
|
+
/* @__PURE__ */ _("span", {
|
|
1506
1517
|
className: "text-foreground-subtle",
|
|
1507
1518
|
children: "·"
|
|
1508
1519
|
}),
|
|
1509
|
-
/* @__PURE__ */
|
|
1520
|
+
/* @__PURE__ */ _("span", {
|
|
1510
1521
|
className: "text-foreground",
|
|
1511
|
-
children:
|
|
1522
|
+
children: o.audio.sampleRate >= 1e3 ? `${(o.audio.sampleRate / 1e3).toFixed(o.audio.sampleRate % 1e3 == 0 ? 0 : 1)}kHz` : `${o.audio.sampleRate}Hz`
|
|
1512
1523
|
}),
|
|
1513
|
-
/* @__PURE__ */
|
|
1524
|
+
/* @__PURE__ */ _("span", {
|
|
1514
1525
|
className: "text-foreground-subtle",
|
|
1515
1526
|
children: "·"
|
|
1516
1527
|
}),
|
|
1517
|
-
/* @__PURE__ */
|
|
1528
|
+
/* @__PURE__ */ _("span", {
|
|
1518
1529
|
className: "text-foreground",
|
|
1519
|
-
children:
|
|
1530
|
+
children: o.audio.channels === 1 ? "mono" : o.audio.channels === 2 ? "stereo" : `${o.audio.channels}ch`
|
|
1520
1531
|
})
|
|
1521
1532
|
]
|
|
1522
1533
|
}),
|
|
1523
|
-
/* @__PURE__ */
|
|
1524
|
-
className: `px-1 py-px rounded text-[8px] font-medium whitespace-nowrap ${
|
|
1525
|
-
children:
|
|
1534
|
+
/* @__PURE__ */ _("span", {
|
|
1535
|
+
className: `px-1 py-px rounded text-[8px] font-medium whitespace-nowrap ${o.audio.supported ? "bg-success/15 text-success" : "bg-amber-500/15 text-amber-500"}`,
|
|
1536
|
+
children: o.audio.supported ? "decoded" : "no decoder"
|
|
1526
1537
|
})
|
|
1527
1538
|
]
|
|
1528
1539
|
})
|
|
1529
1540
|
]
|
|
1530
|
-
}), /* @__PURE__ */
|
|
1541
|
+
}), /* @__PURE__ */ _(Ce, {
|
|
1531
1542
|
clients: d,
|
|
1532
|
-
encodedCount:
|
|
1543
|
+
encodedCount: o.encodedSubscribers,
|
|
1533
1544
|
onKill: w
|
|
1534
|
-
})] }) : /* @__PURE__ */
|
|
1545
|
+
})] }) : /* @__PURE__ */ _("p", {
|
|
1535
1546
|
className: "text-[10px] text-foreground-subtle italic",
|
|
1536
1547
|
children: "No demand — stream suspended"
|
|
1537
1548
|
}),
|
|
1538
|
-
/* @__PURE__ */
|
|
1549
|
+
/* @__PURE__ */ v("div", {
|
|
1539
1550
|
className: "mt-1.5 flex items-center gap-1.5 text-[10px]",
|
|
1540
1551
|
children: [
|
|
1541
|
-
/* @__PURE__ */
|
|
1552
|
+
/* @__PURE__ */ _("span", {
|
|
1542
1553
|
className: "text-foreground-subtle",
|
|
1543
1554
|
children: "Buffer:"
|
|
1544
1555
|
}),
|
|
1545
|
-
/* @__PURE__ */
|
|
1546
|
-
enabled:
|
|
1556
|
+
/* @__PURE__ */ _(Te, {
|
|
1557
|
+
enabled: m,
|
|
1547
1558
|
onToggle: (e) => S(e),
|
|
1548
1559
|
disabled: x.isPending
|
|
1549
1560
|
}),
|
|
1550
|
-
/* @__PURE__ */
|
|
1561
|
+
/* @__PURE__ */ v("span", {
|
|
1551
1562
|
className: "text-foreground",
|
|
1552
1563
|
children: [
|
|
1553
|
-
|
|
1564
|
+
g ?? o?.preBufferSec ?? 0,
|
|
1554
1565
|
"s",
|
|
1555
|
-
|
|
1566
|
+
o && E ? ` (${o.preBufferPackets}p)` : ""
|
|
1556
1567
|
]
|
|
1557
1568
|
})
|
|
1558
1569
|
]
|
|
@@ -1561,16 +1572,16 @@ function q({ slot: e, camStreams: n, compact: i }) {
|
|
|
1561
1572
|
});
|
|
1562
1573
|
}
|
|
1563
1574
|
var xe = 280, Se = 120;
|
|
1564
|
-
function
|
|
1565
|
-
let r =
|
|
1575
|
+
function Y({ trigger: e, content: t, widthClass: n }) {
|
|
1576
|
+
let r = d(null), i = d(null), [a, o] = m(!1), [s, c] = m(!1), l = h(() => {
|
|
1566
1577
|
i.current &&= (clearTimeout(i.current), null);
|
|
1567
|
-
}, []),
|
|
1578
|
+
}, []), u = h(() => {
|
|
1568
1579
|
l(), i.current = setTimeout(() => o(!1), Se);
|
|
1569
1580
|
}, [l]);
|
|
1570
|
-
return /* @__PURE__ */
|
|
1581
|
+
return /* @__PURE__ */ v("span", {
|
|
1571
1582
|
ref: r,
|
|
1572
1583
|
className: "relative inline-block",
|
|
1573
|
-
onMouseEnter:
|
|
1584
|
+
onMouseEnter: h(() => {
|
|
1574
1585
|
l();
|
|
1575
1586
|
let e = r.current;
|
|
1576
1587
|
if (e) {
|
|
@@ -1579,37 +1590,37 @@ function J({ trigger: e, content: t, widthClass: n }) {
|
|
|
1579
1590
|
}
|
|
1580
1591
|
o(!0);
|
|
1581
1592
|
}, [l]),
|
|
1582
|
-
onMouseLeave:
|
|
1583
|
-
children: [e, a && /* @__PURE__ */
|
|
1593
|
+
onMouseLeave: u,
|
|
1594
|
+
children: [e, a && /* @__PURE__ */ _("div", {
|
|
1584
1595
|
className: `absolute left-0 ${s ? "bottom-full mb-1" : "top-full mt-1"} z-50 ${n} rounded-md border border-border bg-surface shadow-xl p-2 text-[10px] normal-case`,
|
|
1585
1596
|
onMouseEnter: l,
|
|
1586
|
-
onMouseLeave:
|
|
1597
|
+
onMouseLeave: u,
|
|
1587
1598
|
children: t
|
|
1588
1599
|
})]
|
|
1589
1600
|
});
|
|
1590
1601
|
}
|
|
1591
|
-
function
|
|
1602
|
+
function X(e) {
|
|
1592
1603
|
if (e < 1e3) return `${e}ms`;
|
|
1593
1604
|
let t = Math.floor(e / 1e3);
|
|
1594
1605
|
if (t < 60) return `${t}s`;
|
|
1595
1606
|
let n = Math.floor(t / 60);
|
|
1596
1607
|
return n < 60 ? `${n}m ${t % 60}s` : `${Math.floor(n / 60)}h ${n % 60}m`;
|
|
1597
1608
|
}
|
|
1598
|
-
function
|
|
1609
|
+
function Z(e) {
|
|
1599
1610
|
return e < 1024 ? `${e} B` : e < 1048576 ? `${(e / 1024).toFixed(1)} KB` : e < 1073741824 ? `${(e / 1048576).toFixed(1)} MB` : `${(e / 1073741824).toFixed(2)} GB`;
|
|
1600
1611
|
}
|
|
1601
|
-
function
|
|
1602
|
-
let r = e?.decoded ?? [], i = e?.audio ?? [], a = e?.rtsp ?? [], o = e?.encoded ?? [], s = r.length + i.length + a.length + o.length, [c, l] =
|
|
1603
|
-
return s === 0 ? /* @__PURE__ */
|
|
1612
|
+
function Ce({ clients: e, encodedCount: t, onKill: n }) {
|
|
1613
|
+
let r = e?.decoded ?? [], i = e?.audio ?? [], a = e?.rtsp ?? [], o = e?.encoded ?? [], s = r.length + i.length + a.length + o.length, [c, l] = m(!0);
|
|
1614
|
+
return s === 0 ? /* @__PURE__ */ _("div", {
|
|
1604
1615
|
className: "mt-1.5 text-[10px] text-foreground-subtle italic",
|
|
1605
1616
|
children: "No active subscribers"
|
|
1606
|
-
}) : /* @__PURE__ */
|
|
1617
|
+
}) : /* @__PURE__ */ v("div", {
|
|
1607
1618
|
className: "mt-1.5 border-t border-border/30 pt-1.5",
|
|
1608
|
-
children: [/* @__PURE__ */
|
|
1619
|
+
children: [/* @__PURE__ */ v("button", {
|
|
1609
1620
|
type: "button",
|
|
1610
1621
|
onClick: () => l((e) => !e),
|
|
1611
1622
|
className: "flex items-center gap-1 text-[10px] text-foreground-subtle hover:text-foreground transition-colors",
|
|
1612
|
-
children: [
|
|
1623
|
+
children: [_(c ? j : M, { className: "h-3 w-3" }), /* @__PURE__ */ v("span", {
|
|
1613
1624
|
className: "uppercase tracking-wider",
|
|
1614
1625
|
children: [
|
|
1615
1626
|
"Subscribers (",
|
|
@@ -1617,10 +1628,10 @@ function Z({ clients: e, encodedCount: t, onKill: n }) {
|
|
|
1617
1628
|
")"
|
|
1618
1629
|
]
|
|
1619
1630
|
})]
|
|
1620
|
-
}), c && /* @__PURE__ */
|
|
1631
|
+
}), c && /* @__PURE__ */ v("div", {
|
|
1621
1632
|
className: "mt-1 divide-y divide-border/20",
|
|
1622
1633
|
children: [
|
|
1623
|
-
r.map((e, t) => /* @__PURE__ */
|
|
1634
|
+
r.map((e, t) => /* @__PURE__ */ _(Q, {
|
|
1624
1635
|
kind: "DECODED",
|
|
1625
1636
|
kindClass: "bg-success/10 text-success",
|
|
1626
1637
|
tag: e.tag || "unknown",
|
|
@@ -1638,7 +1649,7 @@ function Z({ clients: e, encodedCount: t, onKill: n }) {
|
|
|
1638
1649
|
handle: e.tag
|
|
1639
1650
|
}) : void 0
|
|
1640
1651
|
}, `d-${t}`)),
|
|
1641
|
-
i.map((e, t) => /* @__PURE__ */
|
|
1652
|
+
i.map((e, t) => /* @__PURE__ */ _(Q, {
|
|
1642
1653
|
kind: "AUDIO",
|
|
1643
1654
|
kindClass: "bg-info/10 text-info",
|
|
1644
1655
|
tag: e.tag || "unknown",
|
|
@@ -1651,15 +1662,15 @@ function Z({ clients: e, encodedCount: t, onKill: n }) {
|
|
|
1651
1662
|
}, `a-${t}`)),
|
|
1652
1663
|
a.map((e) => {
|
|
1653
1664
|
let t = Date.now() - e.lastRtpAt, r = t > 5e3, i = e.playing ? r ? "stalled" : "playing" : "paused", a = e.playing ? r ? "bg-amber-400/10 text-amber-400" : "bg-success/10 text-success" : "bg-foreground-subtle/10 text-foreground-subtle";
|
|
1654
|
-
return /* @__PURE__ */
|
|
1665
|
+
return /* @__PURE__ */ _(Q, {
|
|
1655
1666
|
kind: "RTSP",
|
|
1656
1667
|
kindClass: "bg-warning/10 text-warning",
|
|
1657
|
-
tag: e.userAgent ?
|
|
1668
|
+
tag: e.userAgent ? U(e.userAgent) : e.remoteAddr,
|
|
1658
1669
|
state: {
|
|
1659
1670
|
text: i + (e.muted ? " · muted" : ""),
|
|
1660
1671
|
className: a
|
|
1661
1672
|
},
|
|
1662
|
-
metrics: [
|
|
1673
|
+
metrics: [Z(e.bytesSent), `last rtp ${X(t)} ago`],
|
|
1663
1674
|
age: Date.now() - e.connectedAt,
|
|
1664
1675
|
onKill: n ? () => n({
|
|
1665
1676
|
channel: "rtsp",
|
|
@@ -1669,9 +1680,9 @@ function Z({ clients: e, encodedCount: t, onKill: n }) {
|
|
|
1669
1680
|
}),
|
|
1670
1681
|
o.map((e) => {
|
|
1671
1682
|
let t = e.attribution, n = me[t.kind] ?? "bg-foreground-subtle/10 text-foreground-subtle", r = t.sessionId ? t.sessionId.slice(0, 8) : null, i = [];
|
|
1672
|
-
t.label && i.push(t.label), r && i.push(`sess ${r}`), t.userId && i.push(`user ${t.userId.slice(0, 8)}`), t.remoteAddr && i.push(`@${t.remoteAddr}`), t.userAgent && i.push(
|
|
1683
|
+
t.label && i.push(t.label), r && i.push(`sess ${r}`), t.userId && i.push(`user ${t.userId.slice(0, 8)}`), t.remoteAddr && i.push(`@${t.remoteAddr}`), t.userAgent && i.push(U(t.userAgent));
|
|
1673
1684
|
let a = i.length > 0 ? i.join(" · ") : ge(t.kind), o = [];
|
|
1674
|
-
return t.media && o.push({ text: t.media }), t.targetCodec && o.push(t.targetCodec), t.transport && o.push(t.transport), o.push(`${e.packetsDelivered} pkts`), /* @__PURE__ */
|
|
1685
|
+
return t.media && o.push({ text: t.media }), t.targetCodec && o.push(t.targetCodec), t.transport && o.push(t.transport), o.push(`${e.packetsDelivered} pkts`), /* @__PURE__ */ _(Q, {
|
|
1675
1686
|
kind: he(t.kind),
|
|
1676
1687
|
kindClass: n,
|
|
1677
1688
|
tag: a,
|
|
@@ -1679,10 +1690,10 @@ function Z({ clients: e, encodedCount: t, onKill: n }) {
|
|
|
1679
1690
|
age: Date.now() - e.subscribedAt
|
|
1680
1691
|
}, e.id);
|
|
1681
1692
|
}),
|
|
1682
|
-
o.length === 0 && t > 0 && /* @__PURE__ */
|
|
1693
|
+
o.length === 0 && t > 0 && /* @__PURE__ */ v("div", {
|
|
1683
1694
|
className: "py-0.5 text-[10px] text-foreground-subtle",
|
|
1684
1695
|
children: [
|
|
1685
|
-
/* @__PURE__ */
|
|
1696
|
+
/* @__PURE__ */ _("span", {
|
|
1686
1697
|
className: "inline-block px-1 rounded text-[9px] font-bold bg-foreground-subtle/10 text-foreground-subtle mr-2",
|
|
1687
1698
|
children: "ENCODED"
|
|
1688
1699
|
}),
|
|
@@ -1695,66 +1706,82 @@ function Z({ clients: e, encodedCount: t, onKill: n }) {
|
|
|
1695
1706
|
});
|
|
1696
1707
|
}
|
|
1697
1708
|
function Q({ kind: e, kindClass: t, tag: n, state: r, metrics: i, age: a, onKill: o }) {
|
|
1698
|
-
return /* @__PURE__ */
|
|
1699
|
-
className: "flex
|
|
1709
|
+
return /* @__PURE__ */ v("div", {
|
|
1710
|
+
className: "flex flex-col gap-y-0.5 py-0.5 text-[10px] @[420px]:flex-row @[420px]:items-center @[420px]:gap-2",
|
|
1700
1711
|
children: [
|
|
1701
|
-
/* @__PURE__ */
|
|
1702
|
-
className:
|
|
1703
|
-
children:
|
|
1704
|
-
|
|
1705
|
-
|
|
1706
|
-
|
|
1707
|
-
|
|
1708
|
-
|
|
1709
|
-
|
|
1710
|
-
|
|
1711
|
-
|
|
1712
|
+
/* @__PURE__ */ v("div", {
|
|
1713
|
+
className: "flex items-center gap-2 min-w-0 @[420px]:flex-1",
|
|
1714
|
+
children: [
|
|
1715
|
+
/* @__PURE__ */ _("span", {
|
|
1716
|
+
className: `inline-block px-1 rounded text-[9px] font-bold shrink-0 w-14 text-center ${t}`,
|
|
1717
|
+
children: e
|
|
1718
|
+
}),
|
|
1719
|
+
/* @__PURE__ */ _("span", {
|
|
1720
|
+
className: "text-foreground font-medium truncate min-w-0 flex-1",
|
|
1721
|
+
title: n,
|
|
1722
|
+
children: n
|
|
1723
|
+
}),
|
|
1724
|
+
o && /* @__PURE__ */ _("div", {
|
|
1725
|
+
className: "shrink-0 flex items-center justify-end @[420px]:hidden",
|
|
1726
|
+
children: /* @__PURE__ */ _($, { onClick: o })
|
|
1727
|
+
})
|
|
1728
|
+
]
|
|
1712
1729
|
}),
|
|
1713
|
-
/* @__PURE__ */
|
|
1714
|
-
className: "
|
|
1715
|
-
children: [
|
|
1716
|
-
|
|
1717
|
-
|
|
1718
|
-
|
|
1719
|
-
|
|
1720
|
-
|
|
1721
|
-
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
-
|
|
1730
|
+
/* @__PURE__ */ v("div", {
|
|
1731
|
+
className: "flex items-center flex-wrap gap-1.5 text-foreground-subtle pl-16 @[420px]:pl-0 @[420px]:flex-nowrap @[420px]:shrink-0",
|
|
1732
|
+
children: [
|
|
1733
|
+
r && /* @__PURE__ */ _("span", {
|
|
1734
|
+
className: `text-[9px] px-1 rounded shrink-0 ${r.className}`,
|
|
1735
|
+
children: r.text
|
|
1736
|
+
}),
|
|
1737
|
+
i.map((e, t) => /* @__PURE__ */ v("span", {
|
|
1738
|
+
className: "whitespace-nowrap",
|
|
1739
|
+
children: [t > 0 && /* @__PURE__ */ _("span", {
|
|
1740
|
+
className: "mr-1.5 text-foreground-subtle/50",
|
|
1741
|
+
children: "·"
|
|
1742
|
+
}), typeof e == "string" ? e : /* @__PURE__ */ _("span", {
|
|
1743
|
+
className: e.warn ? "text-amber-400" : "",
|
|
1744
|
+
children: e.text
|
|
1745
|
+
})]
|
|
1746
|
+
}, t)),
|
|
1747
|
+
/* @__PURE__ */ v("span", {
|
|
1748
|
+
className: "text-foreground-subtle/70 whitespace-nowrap",
|
|
1749
|
+
children: ["· ", X(a)]
|
|
1750
|
+
})
|
|
1751
|
+
]
|
|
1725
1752
|
}),
|
|
1726
|
-
/* @__PURE__ */
|
|
1727
|
-
className: "w-5 flex-shrink-0
|
|
1728
|
-
children: o ? /* @__PURE__ */
|
|
1753
|
+
/* @__PURE__ */ _("div", {
|
|
1754
|
+
className: "hidden @[420px]:flex w-5 flex-shrink-0 items-center justify-end",
|
|
1755
|
+
children: o ? /* @__PURE__ */ _($, { onClick: o }) : null
|
|
1729
1756
|
})
|
|
1730
1757
|
]
|
|
1731
1758
|
});
|
|
1732
1759
|
}
|
|
1733
|
-
function
|
|
1734
|
-
let r = t?.decoded ?? [], i = t?.audio ?? [], a = t ? t.encodedSubscribers : 0, o = r.length > 0 || i.length > 0 || a > 0, s = /* @__PURE__ */
|
|
1760
|
+
function we({ count: e, clients: t, onKill: n }) {
|
|
1761
|
+
let r = t?.decoded ?? [], i = t?.audio ?? [], a = t ? t.encodedSubscribers : 0, o = r.length > 0 || i.length > 0 || a > 0, s = /* @__PURE__ */ _("span", {
|
|
1735
1762
|
className: `text-foreground ${o ? "underline decoration-dotted decoration-foreground-subtle/50 underline-offset-2 cursor-help" : ""}`,
|
|
1736
1763
|
children: e
|
|
1737
1764
|
});
|
|
1738
|
-
return o ? /* @__PURE__ */
|
|
1765
|
+
return o ? /* @__PURE__ */ _(Y, {
|
|
1739
1766
|
trigger: s,
|
|
1740
|
-
content: /* @__PURE__ */
|
|
1741
|
-
r.length > 0 && /* @__PURE__ */
|
|
1767
|
+
content: /* @__PURE__ */ v(y, { children: [
|
|
1768
|
+
r.length > 0 && /* @__PURE__ */ v("div", {
|
|
1742
1769
|
className: "mb-2",
|
|
1743
|
-
children: [/* @__PURE__ */
|
|
1770
|
+
children: [/* @__PURE__ */ _("div", {
|
|
1744
1771
|
className: "text-foreground-subtle uppercase text-[9px] tracking-wider mb-1",
|
|
1745
1772
|
children: "Decoded subscribers"
|
|
1746
|
-
}), r.map((e, t) => /* @__PURE__ */
|
|
1773
|
+
}), r.map((e, t) => /* @__PURE__ */ v("div", {
|
|
1747
1774
|
className: "flex items-center justify-between gap-2 py-0.5",
|
|
1748
|
-
children: [/* @__PURE__ */
|
|
1775
|
+
children: [/* @__PURE__ */ _("span", {
|
|
1749
1776
|
className: "text-foreground font-medium truncate",
|
|
1750
1777
|
children: e.tag || "unknown"
|
|
1751
|
-
}), /* @__PURE__ */
|
|
1778
|
+
}), /* @__PURE__ */ v("span", {
|
|
1752
1779
|
className: "text-foreground-subtle text-[9px] flex items-center gap-1.5 shrink-0",
|
|
1753
1780
|
children: [
|
|
1754
|
-
/* @__PURE__ */
|
|
1755
|
-
/* @__PURE__ */
|
|
1756
|
-
/* @__PURE__ */
|
|
1757
|
-
e.framesDropped > 0 && /* @__PURE__ */
|
|
1781
|
+
/* @__PURE__ */ v("span", { children: [e.maxFps.toFixed(0), "fps"] }),
|
|
1782
|
+
/* @__PURE__ */ _("span", { children: "·" }),
|
|
1783
|
+
/* @__PURE__ */ v("span", { children: [e.framesDelivered, " del"] }),
|
|
1784
|
+
e.framesDropped > 0 && /* @__PURE__ */ v("span", {
|
|
1758
1785
|
className: "text-amber-400",
|
|
1759
1786
|
children: [
|
|
1760
1787
|
"· ",
|
|
@@ -1762,9 +1789,9 @@ function Ce({ count: e, clients: t, onKill: n }) {
|
|
|
1762
1789
|
" drop"
|
|
1763
1790
|
]
|
|
1764
1791
|
}),
|
|
1765
|
-
/* @__PURE__ */
|
|
1766
|
-
/* @__PURE__ */
|
|
1767
|
-
n && e.tag && /* @__PURE__ */
|
|
1792
|
+
/* @__PURE__ */ _("span", { children: "·" }),
|
|
1793
|
+
/* @__PURE__ */ _("span", { children: X(Date.now() - e.subscribedAt) }),
|
|
1794
|
+
n && e.tag && /* @__PURE__ */ _($, { onClick: () => n({
|
|
1768
1795
|
channel: "decoded",
|
|
1769
1796
|
handle: e.tag
|
|
1770
1797
|
}) })
|
|
@@ -1772,23 +1799,23 @@ function Ce({ count: e, clients: t, onKill: n }) {
|
|
|
1772
1799
|
})]
|
|
1773
1800
|
}, `d-${t}`))]
|
|
1774
1801
|
}),
|
|
1775
|
-
i.length > 0 && /* @__PURE__ */
|
|
1802
|
+
i.length > 0 && /* @__PURE__ */ v("div", {
|
|
1776
1803
|
className: "mb-2",
|
|
1777
|
-
children: [/* @__PURE__ */
|
|
1804
|
+
children: [/* @__PURE__ */ _("div", {
|
|
1778
1805
|
className: "text-foreground-subtle uppercase text-[9px] tracking-wider mb-1",
|
|
1779
1806
|
children: "Audio subscribers"
|
|
1780
|
-
}), i.map((e, t) => /* @__PURE__ */
|
|
1807
|
+
}), i.map((e, t) => /* @__PURE__ */ v("div", {
|
|
1781
1808
|
className: "flex items-center justify-between gap-2 py-0.5",
|
|
1782
|
-
children: [/* @__PURE__ */
|
|
1809
|
+
children: [/* @__PURE__ */ _("span", {
|
|
1783
1810
|
className: "text-foreground font-medium truncate",
|
|
1784
1811
|
children: e.tag || "unknown"
|
|
1785
|
-
}), /* @__PURE__ */
|
|
1812
|
+
}), /* @__PURE__ */ v("span", {
|
|
1786
1813
|
className: "text-foreground-subtle text-[9px] flex items-center gap-1.5 shrink-0",
|
|
1787
1814
|
children: [
|
|
1788
|
-
/* @__PURE__ */
|
|
1789
|
-
/* @__PURE__ */
|
|
1790
|
-
/* @__PURE__ */
|
|
1791
|
-
n && e.tag && /* @__PURE__ */
|
|
1815
|
+
/* @__PURE__ */ v("span", { children: [e.chunksDelivered, " chunks"] }),
|
|
1816
|
+
/* @__PURE__ */ _("span", { children: "·" }),
|
|
1817
|
+
/* @__PURE__ */ _("span", { children: X(Date.now() - e.subscribedAt) }),
|
|
1818
|
+
n && e.tag && /* @__PURE__ */ _($, { onClick: () => n({
|
|
1792
1819
|
channel: "audio",
|
|
1793
1820
|
handle: e.tag
|
|
1794
1821
|
}) })
|
|
@@ -1796,10 +1823,10 @@ function Ce({ count: e, clients: t, onKill: n }) {
|
|
|
1796
1823
|
})]
|
|
1797
1824
|
}, `a-${t}`))]
|
|
1798
1825
|
}),
|
|
1799
|
-
a > 0 && /* @__PURE__ */
|
|
1826
|
+
a > 0 && /* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("div", {
|
|
1800
1827
|
className: "text-foreground-subtle uppercase text-[9px] tracking-wider mb-1",
|
|
1801
1828
|
children: "Encoded"
|
|
1802
|
-
}), /* @__PURE__ */
|
|
1829
|
+
}), /* @__PURE__ */ v("div", {
|
|
1803
1830
|
className: "text-foreground",
|
|
1804
1831
|
children: [a, " callback subscriber(s)"]
|
|
1805
1832
|
})] })
|
|
@@ -1807,8 +1834,8 @@ function Ce({ count: e, clients: t, onKill: n }) {
|
|
|
1807
1834
|
widthClass: "min-w-[260px] max-w-[360px]"
|
|
1808
1835
|
}) : s;
|
|
1809
1836
|
}
|
|
1810
|
-
function
|
|
1811
|
-
return /* @__PURE__ */
|
|
1837
|
+
function Te({ enabled: e, onToggle: t, disabled: n }) {
|
|
1838
|
+
return /* @__PURE__ */ _("button", {
|
|
1812
1839
|
type: "button",
|
|
1813
1840
|
role: "switch",
|
|
1814
1841
|
"aria-checked": e,
|
|
@@ -1816,61 +1843,61 @@ function we({ enabled: e, onToggle: t, disabled: n }) {
|
|
|
1816
1843
|
onClick: () => t(!e),
|
|
1817
1844
|
className: `relative inline-flex h-3 w-6 shrink-0 items-center rounded-full transition-colors ${e ? "bg-success/60" : "bg-foreground-subtle/30"} ${n ? "opacity-50 cursor-wait" : "cursor-pointer"}`,
|
|
1818
1845
|
title: e ? "Pre-buffer enabled — click to disable" : "Pre-buffer disabled — click to enable",
|
|
1819
|
-
children: /* @__PURE__ */
|
|
1846
|
+
children: /* @__PURE__ */ _("span", { className: `inline-block h-2.5 w-2.5 rounded-full bg-white shadow transition-transform ${e ? "translate-x-3" : "translate-x-0.5"}` })
|
|
1820
1847
|
});
|
|
1821
1848
|
}
|
|
1822
1849
|
function $({ onClick: e }) {
|
|
1823
|
-
return /* @__PURE__ */
|
|
1850
|
+
return /* @__PURE__ */ _("button", {
|
|
1824
1851
|
type: "button",
|
|
1825
1852
|
title: "Force-disconnect this client",
|
|
1826
1853
|
onClick: (t) => {
|
|
1827
1854
|
t.stopPropagation(), e();
|
|
1828
1855
|
},
|
|
1829
1856
|
className: "inline-flex items-center justify-center h-4 w-4 rounded-sm border border-border/60 text-foreground-subtle hover:bg-red-500/10 hover:text-red-400 hover:border-red-500/40 transition-colors",
|
|
1830
|
-
children: /* @__PURE__ */
|
|
1857
|
+
children: /* @__PURE__ */ _(te, { className: "h-2.5 w-2.5" })
|
|
1831
1858
|
});
|
|
1832
1859
|
}
|
|
1833
|
-
function
|
|
1834
|
-
let r = t?.rtsp ?? [], i = r.length > 0, a = /* @__PURE__ */
|
|
1860
|
+
function Ee({ count: e, clients: t, onKill: n }) {
|
|
1861
|
+
let r = t?.rtsp ?? [], i = r.length > 0, a = /* @__PURE__ */ _("span", {
|
|
1835
1862
|
className: `text-foreground ${i ? "underline decoration-dotted decoration-foreground-subtle/50 underline-offset-2 cursor-help" : ""}`,
|
|
1836
1863
|
children: e
|
|
1837
1864
|
});
|
|
1838
|
-
return i ? /* @__PURE__ */
|
|
1865
|
+
return i ? /* @__PURE__ */ _(Y, {
|
|
1839
1866
|
trigger: a,
|
|
1840
|
-
content: /* @__PURE__ */
|
|
1867
|
+
content: /* @__PURE__ */ v(y, { children: [/* @__PURE__ */ _("div", {
|
|
1841
1868
|
className: "text-foreground-subtle uppercase text-[9px] tracking-wider mb-1",
|
|
1842
1869
|
children: "RTSP sessions"
|
|
1843
1870
|
}), r.map((e) => {
|
|
1844
1871
|
let t = Date.now() - e.lastRtpAt, r = t > 5e3;
|
|
1845
|
-
return /* @__PURE__ */
|
|
1872
|
+
return /* @__PURE__ */ v("div", {
|
|
1846
1873
|
className: "py-1 border-b border-border/40 last:border-b-0",
|
|
1847
|
-
children: [/* @__PURE__ */
|
|
1874
|
+
children: [/* @__PURE__ */ v("div", {
|
|
1848
1875
|
className: "flex items-center justify-between gap-2",
|
|
1849
|
-
children: [/* @__PURE__ */
|
|
1876
|
+
children: [/* @__PURE__ */ _("span", {
|
|
1850
1877
|
className: "text-foreground font-mono",
|
|
1851
|
-
children: e.userAgent ?
|
|
1852
|
-
}), /* @__PURE__ */
|
|
1878
|
+
children: e.userAgent ? U(e.userAgent) : e.remoteAddr
|
|
1879
|
+
}), /* @__PURE__ */ v("span", {
|
|
1853
1880
|
className: "flex items-center gap-1 shrink-0",
|
|
1854
|
-
children: [/* @__PURE__ */
|
|
1881
|
+
children: [/* @__PURE__ */ v("span", {
|
|
1855
1882
|
className: `text-[9px] px-1 rounded ${e.playing ? r ? "bg-amber-400/10 text-amber-400" : "bg-success/10 text-success" : "bg-foreground-subtle/10 text-foreground-subtle"}`,
|
|
1856
1883
|
children: [e.playing ? r ? "stalled" : "playing" : "paused", e.muted && " · muted"]
|
|
1857
|
-
}), n && /* @__PURE__ */
|
|
1884
|
+
}), n && /* @__PURE__ */ _($, { onClick: () => n({
|
|
1858
1885
|
channel: "rtsp",
|
|
1859
1886
|
handle: e.sessionId
|
|
1860
1887
|
}) })]
|
|
1861
1888
|
})]
|
|
1862
|
-
}), /* @__PURE__ */
|
|
1889
|
+
}), /* @__PURE__ */ v("div", {
|
|
1863
1890
|
className: "flex items-center justify-between gap-2 text-foreground-subtle text-[9px] mt-0.5",
|
|
1864
1891
|
children: [
|
|
1865
|
-
/* @__PURE__ */
|
|
1866
|
-
/* @__PURE__ */
|
|
1892
|
+
/* @__PURE__ */ v("span", { children: [Z(e.bytesSent), " sent"] }),
|
|
1893
|
+
/* @__PURE__ */ v("span", { children: [
|
|
1867
1894
|
"connected ",
|
|
1868
|
-
|
|
1895
|
+
X(Date.now() - e.connectedAt),
|
|
1869
1896
|
" ago"
|
|
1870
1897
|
] }),
|
|
1871
|
-
/* @__PURE__ */
|
|
1898
|
+
/* @__PURE__ */ v("span", { children: [
|
|
1872
1899
|
"last rtp ",
|
|
1873
|
-
|
|
1900
|
+
X(t),
|
|
1874
1901
|
" ago"
|
|
1875
1902
|
] })
|
|
1876
1903
|
]
|
|
@@ -1882,9 +1909,9 @@ function Te({ count: e, clients: t, onKill: n }) {
|
|
|
1882
1909
|
}
|
|
1883
1910
|
//#endregion
|
|
1884
1911
|
//#region src/stream-broker/widgets/index.tsx
|
|
1885
|
-
var
|
|
1912
|
+
var De = {
|
|
1886
1913
|
"stream-broker-panel": _e,
|
|
1887
1914
|
"ffmpeg-params": ue
|
|
1888
1915
|
};
|
|
1889
1916
|
//#endregion
|
|
1890
|
-
export {
|
|
1917
|
+
export { De as default };
|