@camstack/addon-model-studio 1.1.213 → 1.1.215
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/{MaskShapeCanvas-C4g96eMz.mjs → MaskShapeCanvas-DBaZffFb.mjs} +113 -113
- package/dist/{MotionZonesSettings-C7HEiRnq.mjs → MotionZonesSettings-DXSyjvNy.mjs} +121 -121
- package/dist/{PrivacyMaskSettings-BSosgHnv.mjs → PrivacyMaskSettings-BylU0nae.mjs} +25 -25
- package/dist/{SceneMonitorEditor-DRtryprB.mjs → SceneMonitorEditor-DzSlJ6_E.mjs} +299 -299
- package/dist/_stub.js +5207 -4674
- package/dist/{_virtual_mf-localSharedImportMap___mfe_internal__addon_model_studio_page-BR9IJC7m.mjs → _virtual_mf-localSharedImportMap___mfe_internal__addon_model_studio_page-BO3dLQ3f.mjs} +3 -3
- package/dist/_virtual_mf___mfe_internal__addon_model_studio_page__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-Ct7N7aeG.mjs +26 -0
- package/dist/{_virtual_mf___mfe_internal__addon_model_studio_page__loadShare__react__loadShare__.js-DJDHChgO.mjs → _virtual_mf___mfe_internal__addon_model_studio_page__loadShare__react__loadShare__.js-CHL8loOl.mjs} +1 -1
- package/dist/addon-model-studio.css +1 -1
- package/dist/{hostInit-B8Cs1GFO.mjs → hostInit-Dzfl__ZV.mjs} +2 -2
- package/dist/model-studio.addon.js +11 -113
- package/dist/model-studio.addon.mjs +11 -113
- package/dist/{player-overlays-ClwdY6ON.mjs → player-overlays-B4n780bX.mjs} +11 -11
- package/dist/remoteEntry.js +1 -1
- package/dist/{responsive-DpIGDl9c.mjs → responsive-D44B_0jH.mjs} +22 -22
- package/dist/{scene-monitor-copy-CQT83BYQ.mjs → scene-monitor-copy-jhFEkFsr.mjs} +13 -13
- package/dist/{square-D90TdUQE.mjs → square-CsSCYWAC.mjs} +1 -1
- package/dist/{trash-2-Cg4yxhps.mjs → trash-2-B7yfTgaq.mjs} +1 -1
- package/dist/{virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_model_studio_page__remoteEntry_js-DvaBnD53.mjs → virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_model_studio_page__remoteEntry_js-BMJU4Yku.mjs} +1 -1
- package/package.json +1 -1
- package/dist/_virtual_mf___mfe_internal__addon_model_studio_page__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-BMZsjQzQ.mjs +0 -26
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { b as o, g as s, h as c, p as l, v as u } from "./responsive-
|
|
3
|
-
import { n as ee, t as d } from "./player-overlays-
|
|
1
|
+
import { b as e, c as t, g as n, h as r, m as i, u as a } from "./_virtual_mf___mfe_internal__addon_model_studio_page__loadShare__react__loadShare__.js-CHL8loOl.mjs";
|
|
2
|
+
import { b as o, g as s, h as c, p as l, v as u } from "./responsive-D44B_0jH.mjs";
|
|
3
|
+
import { n as ee, t as d } from "./player-overlays-B4n780bX.mjs";
|
|
4
4
|
import { n as f, r as p, t as te } from "./_virtual_mf___mfe_internal__addon_model_studio_page__loadShare__react_mf_1_jsx_mf_2_runtime__loadShare__.js-ds_Ehzaa.mjs";
|
|
5
|
-
import { MaskShapeCanvas as m } from "./MaskShapeCanvas-
|
|
5
|
+
import { MaskShapeCanvas as m } from "./MaskShapeCanvas-DBaZffFb.mjs";
|
|
6
6
|
var h = o("grid-2x2", [
|
|
7
7
|
["path", {
|
|
8
8
|
d: "M12 3v18",
|
|
@@ -23,180 +23,180 @@ var h = o("grid-2x2", [
|
|
|
23
23
|
]);
|
|
24
24
|
//#endregion
|
|
25
25
|
//#region ../ui-library/src/composites/cap-settings/MotionZonesSettings.tsx
|
|
26
|
-
|
|
27
|
-
var
|
|
26
|
+
e();
|
|
27
|
+
var g = 110, ne = "motion-zones", _ = 0, v = [
|
|
28
28
|
1,
|
|
29
29
|
2,
|
|
30
30
|
3
|
|
31
|
-
],
|
|
32
|
-
function
|
|
31
|
+
], y = 1, b = "rounded-md border border-border bg-surface px-2 py-1 text-[11px] font-medium text-foreground-subtle hover:bg-surface-hover disabled:opacity-40 transition-colors", x = "rounded-md border border-primary/50 bg-primary/15 px-2.5 py-1 text-[11px] font-medium text-primary hover:bg-primary/25 disabled:opacity-40 transition-colors";
|
|
32
|
+
function S(e, t, n) {
|
|
33
33
|
let r = t * n, i = Array.from({ length: r });
|
|
34
34
|
for (let t = 0; t < r; t += 1) i[t] = e[t] === !0;
|
|
35
35
|
return i;
|
|
36
36
|
}
|
|
37
|
-
function
|
|
37
|
+
function C(e, t) {
|
|
38
38
|
if (e.length !== t.length) return !1;
|
|
39
39
|
for (let n = 0; n < e.length; n += 1) if (e[n] !== t[n]) return !1;
|
|
40
40
|
return !0;
|
|
41
41
|
}
|
|
42
|
-
function
|
|
42
|
+
function w(e, t) {
|
|
43
43
|
return Math.ceil(e / t);
|
|
44
44
|
}
|
|
45
|
-
function
|
|
45
|
+
function T(e, t, n) {
|
|
46
46
|
return Math.min(n - 1, Math.floor((e + .5) / t * n));
|
|
47
47
|
}
|
|
48
|
-
function
|
|
49
|
-
let i =
|
|
48
|
+
function E(e, t, n, r) {
|
|
49
|
+
let i = w(t, r), a = w(n, r), o = Array.from({ length: i * a }, () => !1);
|
|
50
50
|
for (let r = 0; r < n; r += 1) {
|
|
51
|
-
let s =
|
|
52
|
-
for (let n = 0; n < t; n += 1) e[r * t + n] === !0 && (o[s * i +
|
|
51
|
+
let s = T(r, n, a);
|
|
52
|
+
for (let n = 0; n < t; n += 1) e[r * t + n] === !0 && (o[s * i + T(n, t, i)] = !0);
|
|
53
53
|
}
|
|
54
54
|
return o;
|
|
55
55
|
}
|
|
56
|
-
function
|
|
57
|
-
let i =
|
|
56
|
+
function D(e, t, n, r) {
|
|
57
|
+
let i = w(t, r), a = w(n, r), o = Array.from({ length: t * n }, () => !1);
|
|
58
58
|
for (let r = 0; r < n; r += 1) {
|
|
59
|
-
let s =
|
|
60
|
-
for (let n = 0; n < t; n += 1) o[r * t + n] = e[s * i +
|
|
59
|
+
let s = T(r, n, a);
|
|
60
|
+
for (let n = 0; n < t; n += 1) o[r * t + n] = e[s * i + T(n, t, i)] === !0;
|
|
61
61
|
}
|
|
62
62
|
return o;
|
|
63
63
|
}
|
|
64
|
-
function
|
|
65
|
-
let o = s(u().trpcClient,
|
|
66
|
-
|
|
64
|
+
function O({ deviceId: e }) {
|
|
65
|
+
let o = s(u().trpcClient, e), [T, O] = n(null), [k, A] = n(!1), [j, M] = n(null), [N, P] = n(null), [F, I] = n(y), [L, R] = n(!1), [z, B] = n(!1), V = r(!1);
|
|
66
|
+
a(() => {
|
|
67
67
|
if (!o) return;
|
|
68
68
|
let e = !1;
|
|
69
|
-
return
|
|
69
|
+
return V.current = !1, O(null), A(!1), M(null), P(null), I(y), B(!1), (async () => {
|
|
70
70
|
try {
|
|
71
71
|
let t = await o.motionZones?.getOptions({});
|
|
72
72
|
if (e) return;
|
|
73
73
|
if (!t) throw Error("device proxy not ready");
|
|
74
|
-
if (
|
|
74
|
+
if (O(t), V.current) return;
|
|
75
75
|
let n = await o.motionZones?.getStatus({});
|
|
76
76
|
if (e) return;
|
|
77
77
|
if (!n) throw Error("device proxy not ready");
|
|
78
|
-
|
|
79
|
-
let r = n.regions.find((e) => e.shape.kind === "grid"), i =
|
|
80
|
-
|
|
78
|
+
V.current = !0;
|
|
79
|
+
let r = n.regions.find((e) => e.shape.kind === "grid"), i = S(r ? r.shape.cells : [], t.grid.width, t.grid.height);
|
|
80
|
+
P(i), M(E(i, t.grid.width, t.grid.height, y));
|
|
81
81
|
} catch (t) {
|
|
82
82
|
if (e) return;
|
|
83
|
-
c(t) ?
|
|
83
|
+
c(t) ? A(!0) : console.error("Motion Zones load failed", t);
|
|
84
84
|
}
|
|
85
85
|
})(), () => {
|
|
86
86
|
e = !0;
|
|
87
87
|
};
|
|
88
88
|
}, [o]);
|
|
89
|
-
let
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
V,
|
|
89
|
+
let H = T ? T.grid.width : 0, U = T ? T.grid.height : 0, W = w(H, F), G = w(U, F), K = i(() => j && T ? D(j, H, U, F) : null, [
|
|
90
|
+
j,
|
|
91
|
+
T,
|
|
93
92
|
H,
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
93
|
+
U,
|
|
94
|
+
F
|
|
95
|
+
]), q = i(() => K !== null && N !== null && !C(K, N), [K, N]), J = i(() => K ? K.reduce((e, t) => t ? e + 1 : e, 0) : 0, [K]), Y = H * U, X = W * G, Z = t((e) => {
|
|
96
|
+
X > 0 && M(Array.from({ length: X }, () => e));
|
|
97
|
+
}, [X]), re = t(() => {
|
|
98
|
+
M((e) => e && e.map((e) => !e));
|
|
99
|
+
}, []), ie = t(() => {
|
|
100
|
+
N && T && M(E(N, H, U, F));
|
|
101
101
|
}, [
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
V,
|
|
102
|
+
N,
|
|
103
|
+
T,
|
|
105
104
|
H,
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
105
|
+
U,
|
|
106
|
+
F
|
|
107
|
+
]), ae = t((e) => {
|
|
108
|
+
e === F || !T || M((t) => {
|
|
109
|
+
if (!t) return I(e), t;
|
|
110
|
+
let n = E(D(t, H, U, F), H, U, e);
|
|
111
|
+
return I(e), n;
|
|
112
112
|
});
|
|
113
113
|
}, [
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
]), Q =
|
|
119
|
-
id:
|
|
114
|
+
F,
|
|
115
|
+
T,
|
|
116
|
+
H,
|
|
117
|
+
U
|
|
118
|
+
]), Q = i(() => T && j ? [{
|
|
119
|
+
id: _,
|
|
120
120
|
shape: {
|
|
121
121
|
kind: "grid",
|
|
122
|
-
gridWidth:
|
|
123
|
-
gridHeight:
|
|
124
|
-
cells: [...
|
|
122
|
+
gridWidth: W,
|
|
123
|
+
gridHeight: G,
|
|
124
|
+
cells: [...j]
|
|
125
125
|
}
|
|
126
126
|
}] : [], [
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
]), $ =
|
|
132
|
-
t.kind === "grid" &&
|
|
133
|
-
}, []), oe =
|
|
134
|
-
if (!(!o || !
|
|
135
|
-
|
|
127
|
+
T,
|
|
128
|
+
j,
|
|
129
|
+
W,
|
|
130
|
+
G
|
|
131
|
+
]), $ = t((e, t) => {
|
|
132
|
+
t.kind === "grid" && M(t.cells);
|
|
133
|
+
}, []), oe = t(async () => {
|
|
134
|
+
if (!(!o || !j || !T)) {
|
|
135
|
+
R(!0);
|
|
136
136
|
try {
|
|
137
|
-
let e =
|
|
137
|
+
let e = D(j, T.grid.width, T.grid.height, F), t = {
|
|
138
138
|
kind: "grid",
|
|
139
|
-
gridWidth:
|
|
140
|
-
gridHeight:
|
|
139
|
+
gridWidth: T.grid.width,
|
|
140
|
+
gridHeight: T.grid.height,
|
|
141
141
|
cells: e
|
|
142
142
|
};
|
|
143
143
|
await o.motionZones?.setZone({ patch: { regions: [{
|
|
144
|
-
id:
|
|
144
|
+
id: _,
|
|
145
145
|
enabled: !0,
|
|
146
146
|
shape: t
|
|
147
147
|
}] } });
|
|
148
148
|
let n = await o.motionZones?.getStatus({});
|
|
149
149
|
if (n) {
|
|
150
|
-
let e = n.regions.find((e) => e.shape.kind === "grid"), t =
|
|
151
|
-
|
|
150
|
+
let e = n.regions.find((e) => e.shape.kind === "grid"), t = S(e ? e.shape.cells : [], T.grid.width, T.grid.height);
|
|
151
|
+
P(t), M(E(t, T.grid.width, T.grid.height, F));
|
|
152
152
|
}
|
|
153
153
|
} catch (e) {
|
|
154
154
|
console.error("Motion Zones save failed", e);
|
|
155
155
|
} finally {
|
|
156
|
-
|
|
156
|
+
R(!1);
|
|
157
157
|
}
|
|
158
158
|
}
|
|
159
159
|
}, [
|
|
160
160
|
o,
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
161
|
+
j,
|
|
162
|
+
T,
|
|
163
|
+
F
|
|
164
164
|
]);
|
|
165
|
-
return d(
|
|
166
|
-
id:
|
|
167
|
-
order:
|
|
165
|
+
return d(i(() => z && !k && T && j ? {
|
|
166
|
+
id: ne,
|
|
167
|
+
order: g,
|
|
168
168
|
node: /* @__PURE__ */ f(m, {
|
|
169
169
|
transparent: !0,
|
|
170
170
|
items: Q,
|
|
171
171
|
supportedShapes: ["grid"],
|
|
172
172
|
grid: {
|
|
173
|
-
width:
|
|
174
|
-
height:
|
|
173
|
+
width: W,
|
|
174
|
+
height: G
|
|
175
175
|
},
|
|
176
|
-
selectedId:
|
|
176
|
+
selectedId: _,
|
|
177
177
|
onSelect: () => {},
|
|
178
178
|
onShapeChange: $,
|
|
179
179
|
onDrawComplete: () => {},
|
|
180
180
|
drawingKind: null
|
|
181
181
|
})
|
|
182
182
|
} : null, [
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
183
|
+
z,
|
|
184
|
+
k,
|
|
185
|
+
T,
|
|
186
|
+
j,
|
|
187
187
|
Q,
|
|
188
188
|
$,
|
|
189
|
-
|
|
190
|
-
|
|
189
|
+
W,
|
|
190
|
+
G
|
|
191
191
|
])), o ? /* @__PURE__ */ f(ee, {
|
|
192
192
|
title: "Motion Zones",
|
|
193
193
|
icon: /* @__PURE__ */ f(h, { className: "h-3.5 w-3.5 text-foreground-subtle" }),
|
|
194
194
|
children: /* @__PURE__ */ f("div", {
|
|
195
195
|
className: "flex flex-col gap-3",
|
|
196
|
-
children:
|
|
196
|
+
children: k ? /* @__PURE__ */ f("p", {
|
|
197
197
|
className: `${l} leading-relaxed`,
|
|
198
198
|
children: "This camera doesn't expose an on-board motion zones grid."
|
|
199
|
-
}) : !
|
|
199
|
+
}) : !k && T !== null && j !== null ? /* @__PURE__ */ p(te, { children: [/* @__PURE__ */ p("p", {
|
|
200
200
|
className: `${l} leading-relaxed`,
|
|
201
201
|
children: [
|
|
202
202
|
"Toggle ",
|
|
@@ -216,9 +216,9 @@ function D({ deviceId: a }) {
|
|
|
216
216
|
children: "Cell size"
|
|
217
217
|
}),
|
|
218
218
|
" for quicker, broad-stroke painting — it's resampled to the camera's native ",
|
|
219
|
-
|
|
219
|
+
T.grid.width,
|
|
220
220
|
"×",
|
|
221
|
-
|
|
221
|
+
T.grid.height,
|
|
222
222
|
" grid on save (×1 is the finest)."
|
|
223
223
|
]
|
|
224
224
|
}), /* @__PURE__ */ p("div", {
|
|
@@ -226,31 +226,31 @@ function D({ deviceId: a }) {
|
|
|
226
226
|
children: [
|
|
227
227
|
/* @__PURE__ */ f("button", {
|
|
228
228
|
type: "button",
|
|
229
|
-
onClick: () =>
|
|
230
|
-
disabled:
|
|
231
|
-
"aria-pressed":
|
|
232
|
-
className:
|
|
233
|
-
children:
|
|
229
|
+
onClick: () => B((e) => !e),
|
|
230
|
+
disabled: L,
|
|
231
|
+
"aria-pressed": z,
|
|
232
|
+
className: z ? x : b,
|
|
233
|
+
children: z ? "Done editing" : "Edit grid"
|
|
234
234
|
}),
|
|
235
235
|
/* @__PURE__ */ f("button", {
|
|
236
236
|
type: "button",
|
|
237
|
-
onClick: () =>
|
|
238
|
-
disabled:
|
|
239
|
-
className:
|
|
237
|
+
onClick: () => Z(!0),
|
|
238
|
+
disabled: L,
|
|
239
|
+
className: b,
|
|
240
240
|
children: "All on"
|
|
241
241
|
}),
|
|
242
242
|
/* @__PURE__ */ f("button", {
|
|
243
243
|
type: "button",
|
|
244
|
-
onClick: () =>
|
|
245
|
-
disabled:
|
|
246
|
-
className:
|
|
244
|
+
onClick: () => Z(!1),
|
|
245
|
+
disabled: L,
|
|
246
|
+
className: b,
|
|
247
247
|
children: "All off"
|
|
248
248
|
}),
|
|
249
249
|
/* @__PURE__ */ f("button", {
|
|
250
250
|
type: "button",
|
|
251
|
-
onClick:
|
|
252
|
-
disabled:
|
|
253
|
-
className:
|
|
251
|
+
onClick: re,
|
|
252
|
+
disabled: L,
|
|
253
|
+
className: b,
|
|
254
254
|
children: "Invert"
|
|
255
255
|
}),
|
|
256
256
|
/* @__PURE__ */ p("div", {
|
|
@@ -260,43 +260,43 @@ function D({ deviceId: a }) {
|
|
|
260
260
|
children: [/* @__PURE__ */ f("span", {
|
|
261
261
|
className: `${l} mr-0.5`,
|
|
262
262
|
children: "Cell size"
|
|
263
|
-
}),
|
|
263
|
+
}), v.map((e) => /* @__PURE__ */ p("button", {
|
|
264
264
|
type: "button",
|
|
265
265
|
onClick: () => ae(e),
|
|
266
|
-
disabled:
|
|
267
|
-
"aria-pressed":
|
|
268
|
-
title: e === 1 ? `Camera grid ${
|
|
269
|
-
className:
|
|
266
|
+
disabled: L,
|
|
267
|
+
"aria-pressed": F === e,
|
|
268
|
+
title: e === 1 ? `Camera grid ${H}×${U} (finest)` : `${w(H, e)}×${w(U, e)} painting grid · cells ×${e} bigger`,
|
|
269
|
+
className: F === e ? x : b,
|
|
270
270
|
children: ["×", e]
|
|
271
271
|
}, e))]
|
|
272
272
|
}),
|
|
273
273
|
/* @__PURE__ */ p("span", {
|
|
274
274
|
className: `${l} ml-1 tabular-nums`,
|
|
275
275
|
children: [
|
|
276
|
-
q,
|
|
277
|
-
" / ",
|
|
278
276
|
J,
|
|
277
|
+
" / ",
|
|
278
|
+
Y,
|
|
279
279
|
" cells · ",
|
|
280
|
-
|
|
280
|
+
T.grid.width,
|
|
281
281
|
"×",
|
|
282
|
-
|
|
283
|
-
|
|
282
|
+
T.grid.height,
|
|
283
|
+
F === 1 ? "" : ` · paint ${W}×${G}`
|
|
284
284
|
]
|
|
285
285
|
}),
|
|
286
286
|
/* @__PURE__ */ f("span", { className: "flex-1" }),
|
|
287
287
|
/* @__PURE__ */ f("button", {
|
|
288
288
|
type: "button",
|
|
289
289
|
onClick: ie,
|
|
290
|
-
disabled:
|
|
290
|
+
disabled: L || !q,
|
|
291
291
|
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",
|
|
292
292
|
children: "Revert"
|
|
293
293
|
}),
|
|
294
294
|
/* @__PURE__ */ f("button", {
|
|
295
295
|
type: "button",
|
|
296
296
|
onClick: () => void oe(),
|
|
297
|
-
disabled:
|
|
298
|
-
className:
|
|
299
|
-
children:
|
|
297
|
+
disabled: L || !q,
|
|
298
|
+
className: x,
|
|
299
|
+
children: L ? "Saving…" : "Save"
|
|
300
300
|
})
|
|
301
301
|
]
|
|
302
302
|
})] }) : /* @__PURE__ */ f("p", {
|
|
@@ -307,4 +307,4 @@ function D({ deviceId: a }) {
|
|
|
307
307
|
}) : null;
|
|
308
308
|
}
|
|
309
309
|
//#endregion
|
|
310
|
-
export {
|
|
310
|
+
export { O as MotionZonesSettings };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { b as o, g as ee, h as te, p as s, v as ne } from "./responsive-
|
|
3
|
-
import { n as re, t as ie } from "./player-overlays-
|
|
4
|
-
import { n as ae, r as oe, t as se } from "./square-
|
|
5
|
-
import { t as c } from "./trash-2-
|
|
1
|
+
import { b as e, c as t, g as n, h as r, m as i, u as a } from "./_virtual_mf___mfe_internal__addon_model_studio_page__loadShare__react__loadShare__.js-CHL8loOl.mjs";
|
|
2
|
+
import { b as o, g as ee, h as te, p as s, v as ne } from "./responsive-D44B_0jH.mjs";
|
|
3
|
+
import { n as re, t as ie } from "./player-overlays-B4n780bX.mjs";
|
|
4
|
+
import { n as ae, r as oe, t as se } from "./square-CsSCYWAC.mjs";
|
|
5
|
+
import { t as c } from "./trash-2-B7yfTgaq.mjs";
|
|
6
6
|
import { n as l, r as u, t as ce } from "./_virtual_mf___mfe_internal__addon_model_studio_page__loadShare__react_mf_1_jsx_mf_2_runtime__loadShare__.js-ds_Ehzaa.mjs";
|
|
7
|
-
import { MaskShapeCanvas as le } from "./MaskShapeCanvas-
|
|
7
|
+
import { MaskShapeCanvas as le } from "./MaskShapeCanvas-DBaZffFb.mjs";
|
|
8
8
|
var ue = o("hexagon", [["path", {
|
|
9
9
|
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",
|
|
10
10
|
key: "yt0hxn"
|
|
@@ -36,7 +36,7 @@ var ue = o("hexagon", [["path", {
|
|
|
36
36
|
]);
|
|
37
37
|
//#endregion
|
|
38
38
|
//#region ../ui-library/src/composites/cap-settings/privacy-mask-audio.ts
|
|
39
|
-
|
|
39
|
+
e();
|
|
40
40
|
var d = "Microphone", f = "The camera encodes no audio at all — live view, recordings, exports and the audio analyzer are all silent.";
|
|
41
41
|
function p(e) {
|
|
42
42
|
let t = e.supportsAudioMute === !0, n = t ? e.audioEnabled : null, r = e.pendingOn ?? null;
|
|
@@ -67,9 +67,9 @@ function he(e, t) {
|
|
|
67
67
|
for (let n = 0; n < e.length; n += 1) if (JSON.stringify(e[n]) !== JSON.stringify(t[n])) return !1;
|
|
68
68
|
return !0;
|
|
69
69
|
}
|
|
70
|
-
function v({ deviceId:
|
|
71
|
-
let o = ee(ne().trpcClient,
|
|
72
|
-
|
|
70
|
+
function v({ deviceId: e }) {
|
|
71
|
+
let o = ee(ne().trpcClient, e), [d, f] = n(null), [v, y] = n(!1), [b, x] = n(!1), [S, C] = n(null), [w, T] = n(null), [E, D] = n(!1), [O, k] = n(!1), [A, j] = n(null), [M, N] = n(null), [ge, P] = n(null), [F, I] = n(null), [L, R] = n(null), z = r(!1);
|
|
72
|
+
a(() => {
|
|
73
73
|
if (!o) return;
|
|
74
74
|
let e = !1;
|
|
75
75
|
return z.current = !1, f(null), y(!1), x(!1), C(null), T(null), k(!1), j(null), N(null), P(null), I(null), R(null), (async () => {
|
|
@@ -99,23 +99,23 @@ function v({ deviceId: a }) {
|
|
|
99
99
|
e = !0;
|
|
100
100
|
};
|
|
101
101
|
}, [o]);
|
|
102
|
-
let B =
|
|
103
|
-
|
|
102
|
+
let B = i(() => S !== null && w !== null && (S.enabled !== w.enabled || !he(S.regions, w.regions)), [S, w]), V = S ? S.regions.length : 0, H = d ? d.maxRegions : 0, U = r(0);
|
|
103
|
+
a(() => {
|
|
104
104
|
U.current = H;
|
|
105
105
|
}, [H]);
|
|
106
|
-
let W = H > 0 && V >= H, _e =
|
|
106
|
+
let W = H > 0 && V >= H, _e = t(() => {
|
|
107
107
|
C((e) => e && {
|
|
108
108
|
...e,
|
|
109
109
|
enabled: !e.enabled
|
|
110
110
|
});
|
|
111
|
-
}, []), G =
|
|
111
|
+
}, []), G = t((e) => {
|
|
112
112
|
j(typeof e == "number" ? e : null);
|
|
113
|
-
}, []), K =
|
|
113
|
+
}, []), K = i(() => S ? S.regions.map((e) => ({
|
|
114
114
|
id: e.id,
|
|
115
115
|
shape: e.shape,
|
|
116
116
|
enabled: e.enabled,
|
|
117
117
|
label: `Zone ${String(e.id)}`
|
|
118
|
-
})) : [], [S]), q =
|
|
118
|
+
})) : [], [S]), q = t((e, t) => {
|
|
119
119
|
let n = _(t);
|
|
120
120
|
n && C((t) => t && {
|
|
121
121
|
...t,
|
|
@@ -124,7 +124,7 @@ function v({ deviceId: a }) {
|
|
|
124
124
|
shape: n
|
|
125
125
|
} : t)
|
|
126
126
|
});
|
|
127
|
-
}, []), J =
|
|
127
|
+
}, []), J = t((e) => {
|
|
128
128
|
let t = _(e);
|
|
129
129
|
t && (N(null), C((e) => {
|
|
130
130
|
if (!e) return e;
|
|
@@ -140,21 +140,21 @@ function v({ deviceId: a }) {
|
|
|
140
140
|
regions: [...e.regions, i]
|
|
141
141
|
};
|
|
142
142
|
}));
|
|
143
|
-
}, []), Y =
|
|
143
|
+
}, []), Y = t((e) => {
|
|
144
144
|
k(!0), j(null), N(e);
|
|
145
|
-
}, []), ve =
|
|
145
|
+
}, []), ve = t((e) => {
|
|
146
146
|
k(!0), N(null), j(e);
|
|
147
|
-
}, []), X =
|
|
147
|
+
}, []), X = t((e) => {
|
|
148
148
|
j((t) => t === e ? null : t), C((t) => t && {
|
|
149
149
|
...t,
|
|
150
150
|
regions: t.regions.filter((t) => t.id !== e)
|
|
151
151
|
});
|
|
152
|
-
}, []), ye =
|
|
152
|
+
}, []), ye = t(() => {
|
|
153
153
|
N(null), j(null), w && C({
|
|
154
154
|
enabled: w.enabled,
|
|
155
155
|
regions: w.regions
|
|
156
156
|
});
|
|
157
|
-
}, [w]), be =
|
|
157
|
+
}, [w]), be = t(async () => {
|
|
158
158
|
if (!(!o || !S)) {
|
|
159
159
|
D(!0);
|
|
160
160
|
try {
|
|
@@ -180,7 +180,7 @@ function v({ deviceId: a }) {
|
|
|
180
180
|
supportsAudioMute: d === null ? null : d.supportsAudioMute,
|
|
181
181
|
audioEnabled: ge,
|
|
182
182
|
pendingOn: F
|
|
183
|
-
}), xe =
|
|
183
|
+
}), xe = t(async () => {
|
|
184
184
|
let e = m(Z);
|
|
185
185
|
if (!(!o || e === null)) {
|
|
186
186
|
I(e.enabled), R(null);
|
|
@@ -194,10 +194,10 @@ function v({ deviceId: a }) {
|
|
|
194
194
|
I(null);
|
|
195
195
|
}
|
|
196
196
|
}
|
|
197
|
-
}, [o, Z]), Se =
|
|
197
|
+
}, [o, Z]), Se = t(() => {
|
|
198
198
|
k((e) => (e && (N(null), j(null)), !e));
|
|
199
199
|
}, []), Q = d?.supportedShapes ?? [];
|
|
200
|
-
ie(
|
|
200
|
+
ie(i(() => O && !v && d && S ? {
|
|
201
201
|
id: pe,
|
|
202
202
|
order: fe,
|
|
203
203
|
node: /* @__PURE__ */ l(le, {
|