@camstack/addon-osd-manager 0.1.271 → 0.1.272
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/{MotionZonesSettings-CVom9abm.mjs → MotionZonesSettings-DO_rCcth.mjs} +26 -26
- package/dist/{PrivacyMaskSettings-Bo-mhwY3.mjs → PrivacyMaskSettings-CayY5BmJ.mjs} +34 -34
- package/dist/{SceneMonitorEditor-jI0DFCps.mjs → SceneMonitorEditor-L-q8wwb4.mjs} +37 -37
- package/dist/_stub.js +4136 -4150
- package/dist/{_virtual_mf-localSharedImportMap___mfe_internal__addon_osd_manager_page-B5CazK97.mjs → _virtual_mf-localSharedImportMap___mfe_internal__addon_osd_manager_page-D-aTY-A7.mjs} +3 -3
- package/dist/_virtual_mf___mfe_internal__addon_osd_manager_page__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-BBm95C74.mjs +26 -0
- package/dist/{hostInit-pON4kdVL.mjs → hostInit-NSw9ILTo.mjs} +2 -2
- package/dist/index.js +422 -422
- package/dist/index.mjs +422 -422
- package/dist/{player-overlays-CVErPzOI.mjs → player-overlays-C7qgUCpt.mjs} +1 -1
- package/dist/remoteEntry.js +1 -1
- package/dist/{responsive-DvKLz6tZ.mjs → responsive-PTiwxSHa.mjs} +13 -10
- package/dist/{scene-monitor-copy-CFMKYWvN.mjs → scene-monitor-copy-BOMlNMKs.mjs} +1 -1
- package/dist/{square-7EBGU9cd.mjs → square-bnP3Db28.mjs} +1 -1
- package/dist/{trash-2-CL68AGsL.mjs → trash-2-DJvcr3Yh.mjs} +1 -1
- package/dist/{virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_osd_manager_page__remoteEntry_js-DCVaeJpP.mjs → virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_osd_manager_page__remoteEntry_js-CySnUJzK.mjs} +1 -1
- package/package.json +1 -1
- package/dist/_virtual_mf___mfe_internal__addon_osd_manager_page__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-eQtDkbeP.mjs +0 -26
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { S as e, _ as t, d as n, g as r, l as i, v as a } from "./_virtual_mf___mfe_internal__addon_osd_manager_page__loadShare__react__loadShare__.js-C-pbjC7c.mjs";
|
|
2
2
|
import { n as o, r as s, t as c } from "./_virtual_mf___mfe_internal__addon_osd_manager_page__loadShare__react_mf_1_jsx_mf_2_runtime__loadShare__.js-DalfdIDw.mjs";
|
|
3
|
-
import { r as
|
|
4
|
-
import { a as
|
|
5
|
-
import { n as ne, t as m } from "./player-overlays-
|
|
3
|
+
import { r as ee, t as te } from "./ui-text-BitwQ50T.mjs";
|
|
4
|
+
import { a as l, c as u, i as d, r as f, u as p } from "./responsive-PTiwxSHa.mjs";
|
|
5
|
+
import { n as ne, t as m } from "./player-overlays-C7qgUCpt.mjs";
|
|
6
6
|
import { MaskShapeCanvas as h } from "./MaskShapeCanvas-BFhkWNJD.mjs";
|
|
7
|
-
var g =
|
|
7
|
+
var g = p("grid-2x2", [
|
|
8
8
|
["path", {
|
|
9
9
|
d: "M12 3v18",
|
|
10
10
|
key: "108xh3"
|
|
@@ -63,7 +63,7 @@ function O(e, t, n, r) {
|
|
|
63
63
|
return o;
|
|
64
64
|
}
|
|
65
65
|
function k({ deviceId: e }) {
|
|
66
|
-
let
|
|
66
|
+
let p = ee(), E = l(u().trpcClient, e), [k, A] = a(null), [j, M] = a(!1), [N, P] = a(null), [F, I] = a(null), [L, R] = a(b), [z, B] = a(!1), [V, H] = a(!1), U = t(!1);
|
|
67
67
|
n(() => {
|
|
68
68
|
if (!E) return;
|
|
69
69
|
let e = !1;
|
|
@@ -192,16 +192,16 @@ function k({ deviceId: e }) {
|
|
|
192
192
|
]));
|
|
193
193
|
let ue = !j && k !== null && N !== null;
|
|
194
194
|
return E ? /* @__PURE__ */ o(ne, {
|
|
195
|
-
title:
|
|
195
|
+
title: p("uiLibrary.motionZones.title", "Motion Zones"),
|
|
196
196
|
icon: /* @__PURE__ */ o(g, { className: "h-3.5 w-3.5 text-foreground-subtle" }),
|
|
197
197
|
children: /* @__PURE__ */ o("div", {
|
|
198
198
|
className: "flex flex-col gap-3",
|
|
199
199
|
children: j ? /* @__PURE__ */ o("p", {
|
|
200
|
-
className: `${
|
|
201
|
-
children:
|
|
200
|
+
className: `${f} leading-relaxed`,
|
|
201
|
+
children: p("uiLibrary.motionZones.unsupported", "This camera doesn't expose an on-board motion zones grid.")
|
|
202
202
|
}) : ue ? /* @__PURE__ */ s(c, { children: [/* @__PURE__ */ o("p", {
|
|
203
|
-
className: `${
|
|
204
|
-
children: /* @__PURE__ */ o(
|
|
203
|
+
className: `${f} leading-relaxed`,
|
|
204
|
+
children: /* @__PURE__ */ o(te, {
|
|
205
205
|
uiKey: "uiLibrary.motionZones.intro",
|
|
206
206
|
fallback: "Toggle <0>Edit grid</0> to paint the region directly on the live frame, then <1>Save</1> to push the mask to the camera. Pick a bigger <2>Cell size</2> for quicker, broad-stroke painting — it's resampled to the camera's native {{width}}×{{height}} grid on save (×1 is the finest).",
|
|
207
207
|
components: [
|
|
@@ -223,45 +223,45 @@ function k({ deviceId: e }) {
|
|
|
223
223
|
disabled: z,
|
|
224
224
|
"aria-pressed": V,
|
|
225
225
|
className: V ? S : x,
|
|
226
|
-
children: V ?
|
|
226
|
+
children: V ? p("uiLibrary.motionZones.doneEditing", "Done editing") : p("uiLibrary.motionZones.editGrid", "Edit grid")
|
|
227
227
|
}),
|
|
228
228
|
/* @__PURE__ */ o("button", {
|
|
229
229
|
type: "button",
|
|
230
230
|
onClick: () => Z(!0),
|
|
231
231
|
disabled: z,
|
|
232
232
|
className: x,
|
|
233
|
-
children:
|
|
233
|
+
children: p("uiLibrary.motionZones.allOn", "All on")
|
|
234
234
|
}),
|
|
235
235
|
/* @__PURE__ */ o("button", {
|
|
236
236
|
type: "button",
|
|
237
237
|
onClick: () => Z(!1),
|
|
238
238
|
disabled: z,
|
|
239
239
|
className: x,
|
|
240
|
-
children:
|
|
240
|
+
children: p("uiLibrary.motionZones.allOff", "All off")
|
|
241
241
|
}),
|
|
242
242
|
/* @__PURE__ */ o("button", {
|
|
243
243
|
type: "button",
|
|
244
244
|
onClick: oe,
|
|
245
245
|
disabled: z,
|
|
246
246
|
className: x,
|
|
247
|
-
children:
|
|
247
|
+
children: p("uiLibrary.motionZones.invert", "Invert")
|
|
248
248
|
}),
|
|
249
249
|
/* @__PURE__ */ s("div", {
|
|
250
250
|
className: "flex items-center gap-1 ml-1",
|
|
251
251
|
role: "group",
|
|
252
|
-
"aria-label":
|
|
252
|
+
"aria-label": p("uiLibrary.motionZones.cellSize", "Cell size"),
|
|
253
253
|
children: [/* @__PURE__ */ o("span", {
|
|
254
|
-
className: `${
|
|
255
|
-
children:
|
|
254
|
+
className: `${f} mr-0.5`,
|
|
255
|
+
children: p("uiLibrary.motionZones.cellSize", "Cell size")
|
|
256
256
|
}), re.map((e) => /* @__PURE__ */ s("button", {
|
|
257
257
|
type: "button",
|
|
258
258
|
onClick: () => ce(e),
|
|
259
259
|
disabled: z,
|
|
260
260
|
"aria-pressed": L === e,
|
|
261
|
-
title: e === 1 ?
|
|
261
|
+
title: e === 1 ? p("uiLibrary.motionZones.cameraGrid", "Camera grid {{width}}×{{height}} (finest)", {
|
|
262
262
|
width: W,
|
|
263
263
|
height: G
|
|
264
|
-
}) :
|
|
264
|
+
}) : p("uiLibrary.motionZones.paintingGrid", "{{width}}×{{height}} painting grid · cells ×{{factor}} bigger", {
|
|
265
265
|
width: T(W, e),
|
|
266
266
|
height: T(G, e),
|
|
267
267
|
factor: e
|
|
@@ -271,13 +271,13 @@ function k({ deviceId: e }) {
|
|
|
271
271
|
}, e))]
|
|
272
272
|
}),
|
|
273
273
|
/* @__PURE__ */ s("span", {
|
|
274
|
-
className: `${
|
|
275
|
-
children: [
|
|
274
|
+
className: `${f} ml-1 tabular-nums`,
|
|
275
|
+
children: [p("uiLibrary.motionZones.cells", "{{active}} / {{total}} cells · {{width}}×{{height}}", {
|
|
276
276
|
active: ie,
|
|
277
277
|
total: ae,
|
|
278
278
|
width: k.grid.width,
|
|
279
279
|
height: k.grid.height
|
|
280
|
-
}), L === 1 ? "" :
|
|
280
|
+
}), L === 1 ? "" : p("uiLibrary.motionZones.paintSuffix", " · paint {{width}}×{{height}}", {
|
|
281
281
|
width: K,
|
|
282
282
|
height: q
|
|
283
283
|
})]
|
|
@@ -288,19 +288,19 @@ function k({ deviceId: e }) {
|
|
|
288
288
|
onClick: se,
|
|
289
289
|
disabled: z || !Y,
|
|
290
290
|
className: "rounded-md border border-border bg-surface px-2 py-1 text-[11px] text-foreground-subtle hover:bg-surface-hover disabled:opacity-40 transition-colors",
|
|
291
|
-
children:
|
|
291
|
+
children: p("uiLibrary.motionZones.revert", "Revert")
|
|
292
292
|
}),
|
|
293
293
|
/* @__PURE__ */ o("button", {
|
|
294
294
|
type: "button",
|
|
295
295
|
onClick: () => void le(),
|
|
296
296
|
disabled: z || !Y,
|
|
297
297
|
className: S,
|
|
298
|
-
children: z ?
|
|
298
|
+
children: z ? p("uiLibrary.motionZones.saving", "Saving…") : p("uiLibrary.motionZones.save", "Save")
|
|
299
299
|
})
|
|
300
300
|
]
|
|
301
301
|
})] }) : /* @__PURE__ */ o("p", {
|
|
302
|
-
className: `${
|
|
303
|
-
children:
|
|
302
|
+
className: `${f} leading-relaxed`,
|
|
303
|
+
children: p("uiLibrary.motionZones.loading", "Loading the camera's grid…")
|
|
304
304
|
})
|
|
305
305
|
})
|
|
306
306
|
}) : null;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { S as e, _ as t, d as n, g as r, l as i, v as a } from "./_virtual_mf___mfe_internal__addon_osd_manager_page__loadShare__react__loadShare__.js-C-pbjC7c.mjs";
|
|
2
2
|
import { n as o, r as s, t as ee } from "./_virtual_mf___mfe_internal__addon_osd_manager_page__loadShare__react_mf_1_jsx_mf_2_runtime__loadShare__.js-DalfdIDw.mjs";
|
|
3
3
|
import { r as te, t as ne } from "./ui-text-BitwQ50T.mjs";
|
|
4
|
-
import { a as re,
|
|
5
|
-
import { n as oe, t as se } from "./player-overlays-
|
|
6
|
-
import { n as ce, r as le, t as ue } from "./square-
|
|
7
|
-
import { t as de } from "./trash-2-
|
|
4
|
+
import { a as re, c as ie, i as ae, r as c, u as l } from "./responsive-PTiwxSHa.mjs";
|
|
5
|
+
import { n as oe, t as se } from "./player-overlays-C7qgUCpt.mjs";
|
|
6
|
+
import { n as ce, r as le, t as ue } from "./square-bnP3Db28.mjs";
|
|
7
|
+
import { t as de } from "./trash-2-DJvcr3Yh.mjs";
|
|
8
8
|
import { MaskShapeCanvas as fe } from "./MaskShapeCanvas-BFhkWNJD.mjs";
|
|
9
|
-
var pe =
|
|
9
|
+
var pe = l("hexagon", [["path", {
|
|
10
10
|
d: "M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z",
|
|
11
11
|
key: "yt0hxn"
|
|
12
|
-
}]]), me =
|
|
12
|
+
}]]), me = l("mic-off", [
|
|
13
13
|
["path", {
|
|
14
14
|
d: "M12 19v3",
|
|
15
15
|
key: "npa21l"
|
|
@@ -69,7 +69,7 @@ function ve(e, t) {
|
|
|
69
69
|
return !0;
|
|
70
70
|
}
|
|
71
71
|
function _({ deviceId: e }) {
|
|
72
|
-
let
|
|
72
|
+
let l = te(), u = re(ie().trpcClient, e), [d, _] = a(null), [v, y] = a(!1), [b, x] = a(!1), [S, C] = a(null), [w, T] = a(null), [E, D] = a(!1), [O, k] = a(!1), [A, j] = a(null), [M, N] = a(null), [P, F] = a(null), [I, L] = a(null), [R, z] = a(null), B = t(!1);
|
|
73
73
|
n(() => {
|
|
74
74
|
if (!u) return;
|
|
75
75
|
let e = !1;
|
|
@@ -94,7 +94,7 @@ function _({ deviceId: e }) {
|
|
|
94
94
|
T(r), C(r), F(n.audioEnabled);
|
|
95
95
|
} catch (t) {
|
|
96
96
|
if (e) return;
|
|
97
|
-
|
|
97
|
+
ae(t) ? y(!0) : console.error("Privacy Mask load failed", t);
|
|
98
98
|
}
|
|
99
99
|
})(), () => {
|
|
100
100
|
e = !0;
|
|
@@ -115,8 +115,8 @@ function _({ deviceId: e }) {
|
|
|
115
115
|
id: e.id,
|
|
116
116
|
shape: e.shape,
|
|
117
117
|
enabled: e.enabled,
|
|
118
|
-
label:
|
|
119
|
-
})) : [], [S,
|
|
118
|
+
label: l("uiLibrary.privacyMaskSettings.zoneN", "Zone {{id}}", { id: e.id })
|
|
119
|
+
})) : [], [S, l]), J = i((e, t) => {
|
|
120
120
|
let n = g(t);
|
|
121
121
|
n && C((t) => t && {
|
|
122
122
|
...t,
|
|
@@ -227,19 +227,19 @@ function _({ deviceId: e }) {
|
|
|
227
227
|
]));
|
|
228
228
|
let Ee = d?.supportedShapes.includes("rect") ?? !1, De = d?.supportedShapes.includes("polygon") ?? !1, $ = d !== null && (d.maxRegions <= 0 || d.supportedShapes.length === 0), Oe = !v && !$ && !b && d !== null && S !== null;
|
|
229
229
|
return u ? /* @__PURE__ */ o(oe, {
|
|
230
|
-
title:
|
|
230
|
+
title: l("uiLibrary.privacyMaskSettings.title", "Privacy Mask"),
|
|
231
231
|
icon: /* @__PURE__ */ o(le, { className: "h-3.5 w-3.5 text-foreground-subtle" }),
|
|
232
232
|
children: /* @__PURE__ */ s("div", {
|
|
233
233
|
className: "flex flex-col gap-3",
|
|
234
234
|
children: [v || $ ? /* @__PURE__ */ o("p", {
|
|
235
|
-
className: `${
|
|
236
|
-
children:
|
|
235
|
+
className: `${c} leading-relaxed`,
|
|
236
|
+
children: l("uiLibrary.privacyMaskSettings.unsupported", "This camera doesn't support an on-board privacy mask.")
|
|
237
237
|
}) : b ? /* @__PURE__ */ o("p", {
|
|
238
|
-
className: `${
|
|
239
|
-
children:
|
|
238
|
+
className: `${c} leading-relaxed`,
|
|
239
|
+
children: l("uiLibrary.privacyMaskSettings.unreadable", "This camera hasn't answered, so what it currently masks is unknown — the editor stays closed rather than showing an empty frame you could save over. A battery camera answers once it wakes; otherwise check that it is reachable.")
|
|
240
240
|
}) : Oe ? /* @__PURE__ */ s(ee, { children: [
|
|
241
241
|
/* @__PURE__ */ o("p", {
|
|
242
|
-
className: `${
|
|
242
|
+
className: `${c} leading-relaxed`,
|
|
243
243
|
children: /* @__PURE__ */ o(ne, {
|
|
244
244
|
uiKey: "uiLibrary.privacyMaskSettings.help",
|
|
245
245
|
fallback: "Toggle <0>Edit mask</0> to draw blanked-out zones on the live frame, then <1>Save</1> to push them to the camera. Drag a rectangle to move, its corner to resize; drag polygon vertices, click an edge midpoint to add one, or right-click a vertex to remove it.",
|
|
@@ -255,7 +255,7 @@ function _({ deviceId: e }) {
|
|
|
255
255
|
disabled: E,
|
|
256
256
|
"aria-pressed": O,
|
|
257
257
|
className: O ? h : m,
|
|
258
|
-
children: O ?
|
|
258
|
+
children: O ? l("uiLibrary.privacyMaskSettings.doneEditing", "Done editing") : l("uiLibrary.privacyMaskSettings.editMask", "Edit mask")
|
|
259
259
|
}),
|
|
260
260
|
/* @__PURE__ */ o("button", {
|
|
261
261
|
type: "button",
|
|
@@ -263,7 +263,7 @@ function _({ deviceId: e }) {
|
|
|
263
263
|
disabled: E,
|
|
264
264
|
"aria-pressed": S.enabled,
|
|
265
265
|
className: S.enabled ? h : m,
|
|
266
|
-
children: S.enabled ?
|
|
266
|
+
children: S.enabled ? l("uiLibrary.privacyMaskSettings.maskOn", "Mask on") : l("uiLibrary.privacyMaskSettings.maskOff", "Mask off")
|
|
267
267
|
}),
|
|
268
268
|
Ee && /* @__PURE__ */ o("button", {
|
|
269
269
|
type: "button",
|
|
@@ -271,8 +271,8 @@ function _({ deviceId: e }) {
|
|
|
271
271
|
disabled: E || G,
|
|
272
272
|
"aria-pressed": M === "rect",
|
|
273
273
|
className: M === "rect" ? h : m,
|
|
274
|
-
title: G ?
|
|
275
|
-
children:
|
|
274
|
+
title: G ? l("uiLibrary.privacyMaskSettings.maxZones", "Maximum zones reached") : l("uiLibrary.privacyMaskSettings.addRect", "Add a rectangle zone"),
|
|
275
|
+
children: l("uiLibrary.privacyMaskSettings.rectButton", "+ Rect")
|
|
276
276
|
}),
|
|
277
277
|
De && /* @__PURE__ */ o("button", {
|
|
278
278
|
type: "button",
|
|
@@ -280,12 +280,12 @@ function _({ deviceId: e }) {
|
|
|
280
280
|
disabled: E || G,
|
|
281
281
|
"aria-pressed": M === "polygon",
|
|
282
282
|
className: M === "polygon" ? h : m,
|
|
283
|
-
title: G ?
|
|
284
|
-
children:
|
|
283
|
+
title: G ? l("uiLibrary.privacyMaskSettings.maxZones", "Maximum zones reached") : l("uiLibrary.privacyMaskSettings.addPolygon", "Add a polygon zone"),
|
|
284
|
+
children: l("uiLibrary.privacyMaskSettings.polygonButton", "+ Polygon")
|
|
285
285
|
}),
|
|
286
286
|
/* @__PURE__ */ o("span", {
|
|
287
|
-
className: `${
|
|
288
|
-
children:
|
|
287
|
+
className: `${c} ml-1 tabular-nums`,
|
|
288
|
+
children: l("uiLibrary.privacyMaskSettings.zoneCount", "{{active}} / {{max}} zones", {
|
|
289
289
|
active: H,
|
|
290
290
|
max: U
|
|
291
291
|
})
|
|
@@ -296,14 +296,14 @@ function _({ deviceId: e }) {
|
|
|
296
296
|
onClick: Se,
|
|
297
297
|
disabled: E || !V,
|
|
298
298
|
className: "rounded-md border border-border bg-surface px-2 py-1 text-[11px] text-foreground-subtle hover:bg-surface-hover disabled:opacity-40 transition-colors",
|
|
299
|
-
children:
|
|
299
|
+
children: l("uiLibrary.privacyMaskSettings.revert", "Revert")
|
|
300
300
|
}),
|
|
301
301
|
/* @__PURE__ */ o("button", {
|
|
302
302
|
type: "button",
|
|
303
303
|
onClick: () => void Ce(),
|
|
304
304
|
disabled: E || !V,
|
|
305
305
|
className: h,
|
|
306
|
-
children: E ?
|
|
306
|
+
children: E ? l("uiLibrary.privacyMaskSettings.saving", "Saving…") : l("uiLibrary.privacyMaskSettings.save", "Save")
|
|
307
307
|
})
|
|
308
308
|
]
|
|
309
309
|
}),
|
|
@@ -320,7 +320,7 @@ function _({ deviceId: e }) {
|
|
|
320
320
|
className: "flex flex-1 items-center gap-2 text-left text-[11px] font-medium text-foreground-subtle hover:text-foreground disabled:opacity-40 transition-colors",
|
|
321
321
|
children: [
|
|
322
322
|
/* @__PURE__ */ o(n, { className: "h-3.5 w-3.5 shrink-0" }),
|
|
323
|
-
/* @__PURE__ */ o("span", { children:
|
|
323
|
+
/* @__PURE__ */ o("span", { children: l("uiLibrary.privacyMaskSettings.zoneN", "Zone {{id}}", { id: e.id }) }),
|
|
324
324
|
/* @__PURE__ */ o("span", {
|
|
325
325
|
className: "text-foreground-faint capitalize",
|
|
326
326
|
children: e.shape.kind
|
|
@@ -330,8 +330,8 @@ function _({ deviceId: e }) {
|
|
|
330
330
|
type: "button",
|
|
331
331
|
onClick: () => xe(e.id),
|
|
332
332
|
disabled: E,
|
|
333
|
-
"aria-label":
|
|
334
|
-
title:
|
|
333
|
+
"aria-label": l("uiLibrary.privacyMaskSettings.deleteZoneN", "Delete zone {{id}}", { id: e.id }),
|
|
334
|
+
title: l("uiLibrary.privacyMaskSettings.deleteZone", "Delete zone"),
|
|
335
335
|
className: "inline-flex h-6 w-6 items-center justify-center rounded border border-border bg-surface text-foreground-subtle hover:border-red-400/40 hover:bg-red-500/10 hover:text-red-400 disabled:opacity-40 transition-colors",
|
|
336
336
|
children: /* @__PURE__ */ o(de, { className: "h-3.5 w-3.5" })
|
|
337
337
|
})]
|
|
@@ -339,8 +339,8 @@ function _({ deviceId: e }) {
|
|
|
339
339
|
})
|
|
340
340
|
}) : null
|
|
341
341
|
] }) : /* @__PURE__ */ o("p", {
|
|
342
|
-
className: `${
|
|
343
|
-
children:
|
|
342
|
+
className: `${c} leading-relaxed`,
|
|
343
|
+
children: l("uiLibrary.privacyMaskSettings.loading", "Loading the camera's privacy mask…")
|
|
344
344
|
}), Z.supported && /* @__PURE__ */ s("div", {
|
|
345
345
|
className: "flex items-start gap-3 rounded-md border border-border bg-surface px-2 py-2",
|
|
346
346
|
children: [/* @__PURE__ */ o("button", {
|
|
@@ -350,15 +350,15 @@ function _({ deviceId: e }) {
|
|
|
350
350
|
"aria-checked": Z.on === !0,
|
|
351
351
|
disabled: !Z.available || I !== null,
|
|
352
352
|
onClick: () => void we(),
|
|
353
|
-
title: Z.on === null ?
|
|
353
|
+
title: Z.on === null ? l("uiLibrary.privacyMaskSettings.micTitleUnknown", "Microphone — state unknown; the camera did not answer.") : Z.on ? l("uiLibrary.privacyMaskSettings.micTitleOn", "The camera is capturing sound. Turning it off: {{cost}}", { cost: Z.costWhenOff }) : l("uiLibrary.privacyMaskSettings.micTitleOff", "The camera is silent. {{cost}}", { cost: Z.costWhenOff }),
|
|
354
354
|
className: Z.on === !1 || Z.on === null ? m : h,
|
|
355
355
|
children: /* @__PURE__ */ s("span", {
|
|
356
356
|
className: "inline-flex items-center gap-1.5",
|
|
357
|
-
children: [Z.on === !1 ? /* @__PURE__ */ o(me, { className: "h-3.5 w-3.5" }) : /* @__PURE__ */ o(ce, { className: "h-3.5 w-3.5" }), Z.on === null ?
|
|
357
|
+
children: [Z.on === !1 ? /* @__PURE__ */ o(me, { className: "h-3.5 w-3.5" }) : /* @__PURE__ */ o(ce, { className: "h-3.5 w-3.5" }), Z.on === null ? l("uiLibrary.privacyMaskSettings.micUnknown", "Microphone unknown") : Z.on ? l("uiLibrary.privacyMaskSettings.micOn", "Microphone on") : l("uiLibrary.privacyMaskSettings.micOff", "Microphone off")]
|
|
358
358
|
})
|
|
359
359
|
}), /* @__PURE__ */ o("p", {
|
|
360
360
|
className: "text-[10px] text-foreground-subtle flex-1 leading-relaxed",
|
|
361
|
-
children: R === null ? Z.on === null ?
|
|
361
|
+
children: R === null ? Z.on === null ? l("uiLibrary.privacyMaskSettings.micNotReported", "The camera did not report its microphone, so this state is unknown.") : Z.costWhenOff : l("uiLibrary.privacyMaskSettings.writeFailed", "Write failed: {{reason}}", { reason: R })
|
|
362
362
|
})]
|
|
363
363
|
})]
|
|
364
364
|
})
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { S as e, _ as t, d as n, g as r, l as i, v as a } from "./_virtual_mf___mfe_internal__addon_osd_manager_page__loadShare__react__loadShare__.js-C-pbjC7c.mjs";
|
|
2
2
|
import { n as o, r as s, t as c } from "./_virtual_mf___mfe_internal__addon_osd_manager_page__loadShare__react_mf_1_jsx_mf_2_runtime__loadShare__.js-DalfdIDw.mjs";
|
|
3
3
|
import { r as l, t as u } from "./ui-text-BitwQ50T.mjs";
|
|
4
|
-
import { a as d,
|
|
5
|
-
import { a as _, c as v, d as y, i as ee, l as
|
|
6
|
-
import { t as
|
|
7
|
-
import { MaskShapeCanvas as
|
|
8
|
-
var
|
|
4
|
+
import { a as d, c as f, i as p, o as m, r as h, u as g } from "./responsive-PTiwxSHa.mjs";
|
|
5
|
+
import { a as _, c as v, d as y, i as ee, l as b, n as x, o as S, r as C, s as w, t as T, u as E } from "./scene-monitor-copy-BOMlNMKs.mjs";
|
|
6
|
+
import { t as D } from "./trash-2-DJvcr3Yh.mjs";
|
|
7
|
+
import { MaskShapeCanvas as O } from "./MaskShapeCanvas-BFhkWNJD.mjs";
|
|
8
|
+
var te = g("settings-2", [
|
|
9
9
|
["path", {
|
|
10
10
|
d: "M14 17H5",
|
|
11
11
|
key: "gfn3mx"
|
|
@@ -65,7 +65,7 @@ function ne({ monitor: e, disabled: t, onDelete: n }) {
|
|
|
65
65
|
children: [/* @__PURE__ */ s("p", {
|
|
66
66
|
className: "text-[10px] font-semibold uppercase tracking-wide text-foreground-subtle",
|
|
67
67
|
children: [
|
|
68
|
-
|
|
68
|
+
S(e.condition, r),
|
|
69
69
|
" · ",
|
|
70
70
|
e.tiles.length
|
|
71
71
|
]
|
|
@@ -86,7 +86,7 @@ function ne({ monitor: e, disabled: t, onDelete: n }) {
|
|
|
86
86
|
className: N,
|
|
87
87
|
disabled: t,
|
|
88
88
|
"aria-label": r("uiLibrary.sceneReferenceGallery.deleteLabel", "Delete the {{variant}} photograph from {{date}}", {
|
|
89
|
-
variant:
|
|
89
|
+
variant: S(e.condition, r).toLowerCase(),
|
|
90
90
|
date: F(i.reference.capturedAt)
|
|
91
91
|
}),
|
|
92
92
|
onClick: () => {
|
|
@@ -99,7 +99,7 @@ function ne({ monitor: e, disabled: t, onDelete: n }) {
|
|
|
99
99
|
index: i.index
|
|
100
100
|
});
|
|
101
101
|
},
|
|
102
|
-
children: [/* @__PURE__ */ o(
|
|
102
|
+
children: [/* @__PURE__ */ o(D, { className: "mr-1 inline h-3 w-3" }), f ? r("uiLibrary.sceneReferenceGallery.confirm", "Confirm") : r("uiLibrary.sceneReferenceGallery.delete", "Delete")]
|
|
103
103
|
}),
|
|
104
104
|
f && /* @__PURE__ */ o("p", {
|
|
105
105
|
className: "text-[10px] leading-snug text-warning",
|
|
@@ -117,7 +117,7 @@ function P({ reference: e }) {
|
|
|
117
117
|
return i === void 0 || n ? /* @__PURE__ */ s("div", {
|
|
118
118
|
className: "flex h-16 w-full flex-col items-center justify-center gap-0.5 rounded bg-surface text-foreground-subtle",
|
|
119
119
|
title: t("uiLibrary.sceneReferenceGallery.missingPicture", "The picture for this reference is no longer stored. The reference itself is intact and still being scored against."),
|
|
120
|
-
children: [/* @__PURE__ */ o(
|
|
120
|
+
children: [/* @__PURE__ */ o(E, { className: "h-4 w-4" }), /* @__PURE__ */ o("span", {
|
|
121
121
|
className: "text-[9px]",
|
|
122
122
|
children: t("uiLibrary.sceneReferenceGallery.noPicture", "no picture")
|
|
123
123
|
})]
|
|
@@ -578,20 +578,20 @@ var J = "rounded-md border border-border bg-surface px-2 py-1 text-[11px] font-m
|
|
|
578
578
|
unknown: "border-border bg-surface text-foreground-subtle"
|
|
579
579
|
}, ae = .8, oe = 3;
|
|
580
580
|
function X({ deviceId: e }) {
|
|
581
|
-
let u = l(),
|
|
581
|
+
let u = l(), g = d(f().trpcClient, e), v = m(g?.state.sceneMonitor), E = w(e, { width: 640 }), [k, A] = a(null), [j, M] = a(!1), [N, P] = a(null), [F, I] = a(null), [L, R] = a(null), [z, B] = a(null), [V, H] = a(!1), [U, W] = a(null), [K, q] = a(""), X = t(!0);
|
|
582
582
|
n(() => (X.current = !0, () => {
|
|
583
583
|
X.current = !1;
|
|
584
584
|
}), []);
|
|
585
585
|
let Z = i(async () => {
|
|
586
|
-
if (
|
|
587
|
-
let e = await
|
|
586
|
+
if (g) try {
|
|
587
|
+
let e = await g.sceneMonitor?.listScenes({});
|
|
588
588
|
if (!X.current) return;
|
|
589
589
|
e && A(e);
|
|
590
590
|
} catch (e) {
|
|
591
591
|
if (!X.current) return;
|
|
592
|
-
|
|
592
|
+
p(e) ? M(!0) : I(e instanceof Error ? e.message : String(e));
|
|
593
593
|
}
|
|
594
|
-
}, [
|
|
594
|
+
}, [g]);
|
|
595
595
|
n(() => {
|
|
596
596
|
A(null), M(!1), I(null), Z();
|
|
597
597
|
}, [Z]);
|
|
@@ -626,16 +626,16 @@ function X({ deviceId: e }) {
|
|
|
626
626
|
W(t);
|
|
627
627
|
return;
|
|
628
628
|
}
|
|
629
|
-
$(`roi-${String(e)}`, async () =>
|
|
629
|
+
$(`roi-${String(e)}`, async () => g?.sceneMonitor?.updateScene({
|
|
630
630
|
monitorId: String(e),
|
|
631
631
|
patch: { roi: t }
|
|
632
632
|
}));
|
|
633
633
|
}
|
|
634
|
-
}, [
|
|
634
|
+
}, [g, $]), ue = i((e) => {
|
|
635
635
|
e.kind === "rect" && W(e);
|
|
636
636
|
}, []), de = i(async () => {
|
|
637
637
|
U === null || K.trim().length === 0 || (await $("create", async () => {
|
|
638
|
-
await
|
|
638
|
+
await g?.sceneMonitor?.createScene({
|
|
639
639
|
label: K.trim(),
|
|
640
640
|
roi: U,
|
|
641
641
|
check: {
|
|
@@ -646,12 +646,12 @@ function X({ deviceId: e }) {
|
|
|
646
646
|
});
|
|
647
647
|
}), W(null), q(""), H(!1));
|
|
648
648
|
}, [
|
|
649
|
-
|
|
649
|
+
g,
|
|
650
650
|
U,
|
|
651
651
|
K,
|
|
652
652
|
$
|
|
653
653
|
]);
|
|
654
|
-
return
|
|
654
|
+
return g ? /* @__PURE__ */ o("div", {
|
|
655
655
|
className: "flex flex-col gap-3",
|
|
656
656
|
children: j ? /* @__PURE__ */ o("p", {
|
|
657
657
|
className: `${h} leading-relaxed`,
|
|
@@ -663,7 +663,7 @@ function X({ deviceId: e }) {
|
|
|
663
663
|
}),
|
|
664
664
|
/* @__PURE__ */ o("div", {
|
|
665
665
|
className: "relative overflow-hidden rounded-md border border-border",
|
|
666
|
-
children: /* @__PURE__ */ o(
|
|
666
|
+
children: /* @__PURE__ */ o(O, {
|
|
667
667
|
items: ce,
|
|
668
668
|
supportedShapes: ["rect"],
|
|
669
669
|
selectedId: L ?? (U === null ? null : "__draft__"),
|
|
@@ -671,8 +671,8 @@ function X({ deviceId: e }) {
|
|
|
671
671
|
onShapeChange: le,
|
|
672
672
|
onDrawComplete: ue,
|
|
673
673
|
drawingKind: V && U === null ? "rect" : null,
|
|
674
|
-
backdrop:
|
|
675
|
-
src:
|
|
674
|
+
backdrop: E.src === null ? null : /* @__PURE__ */ o("img", {
|
|
675
|
+
src: E.src,
|
|
676
676
|
alt: "",
|
|
677
677
|
className: "h-full w-full object-contain",
|
|
678
678
|
draggable: !1
|
|
@@ -693,7 +693,7 @@ function X({ deviceId: e }) {
|
|
|
693
693
|
}), /* @__PURE__ */ o("button", {
|
|
694
694
|
type: "button",
|
|
695
695
|
className: J,
|
|
696
|
-
onClick:
|
|
696
|
+
onClick: E.refresh,
|
|
697
697
|
disabled: N !== null,
|
|
698
698
|
children: u("uiLibrary.sceneMonitor.refresh", "Refresh frame")
|
|
699
699
|
})]
|
|
@@ -737,7 +737,7 @@ function X({ deviceId: e }) {
|
|
|
737
737
|
}) : /* @__PURE__ */ o("ul", {
|
|
738
738
|
className: "flex flex-col gap-2",
|
|
739
739
|
children: Q.map((e) => {
|
|
740
|
-
let t =
|
|
740
|
+
let t = x(e, u);
|
|
741
741
|
return /* @__PURE__ */ s("li", {
|
|
742
742
|
className: `flex flex-col gap-1.5 rounded-md border p-2 ${L === e.id ? "border-primary/50" : "border-border"}`,
|
|
743
743
|
children: [
|
|
@@ -759,12 +759,12 @@ function X({ deviceId: e }) {
|
|
|
759
759
|
}),
|
|
760
760
|
/* @__PURE__ */ o("p", {
|
|
761
761
|
className: `${h} tabular-nums`,
|
|
762
|
-
children:
|
|
762
|
+
children: C(e, u)
|
|
763
763
|
}),
|
|
764
764
|
/* @__PURE__ */ o(ne, {
|
|
765
765
|
monitor: e,
|
|
766
766
|
disabled: N !== null,
|
|
767
|
-
onDelete: ({ stateId: t, index: n }) => void $(`refdel-${e.id}-${t}-${String(n)}`, async () =>
|
|
767
|
+
onDelete: ({ stateId: t, index: n }) => void $(`refdel-${e.id}-${t}-${String(n)}`, async () => g.sceneMonitor?.deleteReference({
|
|
768
768
|
monitorId: e.id,
|
|
769
769
|
stateId: t,
|
|
770
770
|
index: n
|
|
@@ -773,20 +773,20 @@ function X({ deviceId: e }) {
|
|
|
773
773
|
/* @__PURE__ */ s("div", {
|
|
774
774
|
className: "flex flex-wrap items-center gap-1.5",
|
|
775
775
|
children: [
|
|
776
|
-
|
|
776
|
+
T.map((t) => {
|
|
777
777
|
let n = t === "ir";
|
|
778
778
|
return /* @__PURE__ */ s("button", {
|
|
779
779
|
type: "button",
|
|
780
780
|
className: J,
|
|
781
781
|
disabled: N !== null,
|
|
782
|
-
title: n ? u("uiLibrary.sceneMonitor.optionalTitle", "Optional. Without a night reference the checks in infrared are simply skipped — the scene keeps working in daylight and nothing is reported as broken.") : u("uiLibrary.sceneMonitor.captureTitle", "Take a fresh photo now and store it as the {{variant}} reference", { variant:
|
|
783
|
-
onClick: () => void $(`cap-${e.id}-${t}`, async () =>
|
|
782
|
+
title: n ? u("uiLibrary.sceneMonitor.optionalTitle", "Optional. Without a night reference the checks in infrared are simply skipped — the scene keeps working in daylight and nothing is reported as broken.") : u("uiLibrary.sceneMonitor.captureTitle", "Take a fresh photo now and store it as the {{variant}} reference", { variant: S(t, u).toLowerCase() }),
|
|
783
|
+
onClick: () => void $(`cap-${e.id}-${t}`, async () => g.sceneMonitor?.captureReference({
|
|
784
784
|
monitorId: e.id,
|
|
785
785
|
condition: t
|
|
786
786
|
})),
|
|
787
787
|
children: [
|
|
788
788
|
/* @__PURE__ */ o(y, { className: "mr-1 inline h-3 w-3" }),
|
|
789
|
-
u("uiLibrary.sceneMonitor.capture", "Capture {{variant}}", { variant:
|
|
789
|
+
u("uiLibrary.sceneMonitor.capture", "Capture {{variant}}", { variant: S(t, u).toLowerCase() }),
|
|
790
790
|
n && /* @__PURE__ */ o("span", {
|
|
791
791
|
className: "ml-1 text-foreground-subtle/70",
|
|
792
792
|
children: u("uiLibrary.sceneMonitor.optional", "(optional)")
|
|
@@ -799,14 +799,14 @@ function X({ deviceId: e }) {
|
|
|
799
799
|
className: Y,
|
|
800
800
|
disabled: N !== null || e.states.length === 0,
|
|
801
801
|
title: u("uiLibrary.sceneMonitor.resetTitle", "Clear the flag and re-photograph what normal looks like right now"),
|
|
802
|
-
onClick: () => void $(`reset-${e.id}`, async () =>
|
|
803
|
-
children: [/* @__PURE__ */ o(
|
|
802
|
+
onClick: () => void $(`reset-${e.id}`, async () => g.sceneMonitor?.resetScene({ monitorId: e.id })),
|
|
803
|
+
children: [/* @__PURE__ */ o(b, { className: "mr-1 inline h-3 w-3" }), u("uiLibrary.sceneMonitor.reset", "Reset")]
|
|
804
804
|
}),
|
|
805
805
|
/* @__PURE__ */ o("button", {
|
|
806
806
|
type: "button",
|
|
807
807
|
className: J,
|
|
808
808
|
disabled: N !== null,
|
|
809
|
-
onClick: () => void $(`check-${e.id}`, async () =>
|
|
809
|
+
onClick: () => void $(`check-${e.id}`, async () => g.sceneMonitor?.recheckNow({ monitorId: e.id })),
|
|
810
810
|
children: u("uiLibrary.sceneMonitor.checkNow", "Check now")
|
|
811
811
|
}),
|
|
812
812
|
/* @__PURE__ */ s("button", {
|
|
@@ -816,21 +816,21 @@ function X({ deviceId: e }) {
|
|
|
816
816
|
"aria-label": u("uiLibrary.sceneMonitor.settingsFor", "Settings for {{label}}", { label: e.label }),
|
|
817
817
|
disabled: N !== null,
|
|
818
818
|
onClick: () => B((t) => t === e.id ? null : e.id),
|
|
819
|
-
children: [/* @__PURE__ */ o(
|
|
819
|
+
children: [/* @__PURE__ */ o(te, { className: "mr-1 inline h-3 w-3" }), u("uiLibrary.sceneMonitor.settings", "Settings")]
|
|
820
820
|
}),
|
|
821
821
|
/* @__PURE__ */ o("button", {
|
|
822
822
|
type: "button",
|
|
823
823
|
className: re,
|
|
824
824
|
disabled: N !== null,
|
|
825
|
-
onClick: () => void $(`del-${e.id}`, async () =>
|
|
826
|
-
children: /* @__PURE__ */ o(
|
|
825
|
+
onClick: () => void $(`del-${e.id}`, async () => g.sceneMonitor?.deleteScene({ monitorId: e.id })),
|
|
826
|
+
children: /* @__PURE__ */ o(D, { className: "h-3 w-3" })
|
|
827
827
|
})
|
|
828
828
|
]
|
|
829
829
|
}),
|
|
830
830
|
z === e.id && /* @__PURE__ */ o(G, {
|
|
831
831
|
monitor: e,
|
|
832
832
|
disabled: N !== null,
|
|
833
|
-
onPatch: (t) => void $(`tune-${e.id}`, async () =>
|
|
833
|
+
onPatch: (t) => void $(`tune-${e.id}`, async () => g.sceneMonitor?.updateScene({
|
|
834
834
|
monitorId: e.id,
|
|
835
835
|
patch: t
|
|
836
836
|
}))
|