@camstack/addon-benchmark 1.1.12 → 1.1.14

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.
Files changed (20) hide show
  1. package/dist/{MaskShapeCanvas-DwXCR2iE.mjs → MaskShapeCanvas-BDvrLf-K.mjs} +37 -37
  2. package/dist/{MotionZonesSettings-D-sZCPy7.mjs → MotionZonesSettings-DR5v-Kms.mjs} +123 -123
  3. package/dist/{PrivacyMaskSettings-D7V1HFBh.mjs → PrivacyMaskSettings-CNmV82I5.mjs} +22 -22
  4. package/dist/{ReactKonva-xvRRqI5S.mjs → ReactKonva-DXzDAU1q.mjs} +21 -21
  5. package/dist/_stub.js +4988 -4614
  6. package/dist/{_virtual_mf-localSharedImportMap___mfe_internal__addon_benchmark_page-q1V8Mjtq.mjs → _virtual_mf-localSharedImportMap___mfe_internal__addon_benchmark_page-WGtxmN8x.mjs} +4 -4
  7. package/dist/_virtual_mf___mfe_internal__addon_benchmark_page__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-CfDgveTk.mjs +26 -0
  8. package/dist/{_virtual_mf___mfe_internal__addon_benchmark_page__loadShare__react__loadShare__.js-Bnj8XQnA.mjs → _virtual_mf___mfe_internal__addon_benchmark_page__loadShare__react__loadShare__.js-GeuxDuzQ.mjs} +1 -1
  9. package/dist/addon-benchmark.css +1 -1
  10. package/dist/{hostInit-DUdagAtd.mjs → hostInit-cvAsYTN3.mjs} +3 -3
  11. package/dist/index.js +15 -6
  12. package/dist/index.js.map +1 -1
  13. package/dist/index.mjs +15 -6
  14. package/dist/index.mjs.map +1 -1
  15. package/dist/{player-overlays-D1-hCqsW.mjs → player-overlays-BPYk8orA.mjs} +30 -30
  16. package/dist/remoteEntry.js +1 -1
  17. package/dist/{trash-2-DiN5J6s4.mjs → trash-2-B0VQvfAb.mjs} +1 -1
  18. package/dist/{virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_benchmark_page__remoteEntry_js-De28aga9.mjs → virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_benchmark_page__remoteEntry_js-CNVmLL1u.mjs} +1 -1
  19. package/package.json +1 -1
  20. package/dist/_virtual_mf___mfe_internal__addon_benchmark_page__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-DBUeUEtt.mjs +0 -26
@@ -1,8 +1,8 @@
1
- import { a as e, b as t, c as n, h as r, m as i, u as a } from "./_virtual_mf___mfe_internal__addon_benchmark_page__loadShare__react__loadShare__.js-Bnj8XQnA.mjs";
1
+ import { a as e, c as t, g as n, h as r, u as i, x as a } from "./_virtual_mf___mfe_internal__addon_benchmark_page__loadShare__react__loadShare__.js-GeuxDuzQ.mjs";
2
2
  import { n as o, r as s } from "./_virtual_mf___mfe_internal__addon_benchmark_page__loadShare__react_mf_1_jsx_mf_2_runtime__loadShare__.js-SOU_VnTj.mjs";
3
- import { a as c, c as l, i as u, l as d, n as f, o as p, r as m, s as h } from "./ReactKonva-xvRRqI5S.mjs";
3
+ import { a as c, c as l, i as u, l as d, n as f, o as p, r as m, s as h } from "./ReactKonva-DXzDAU1q.mjs";
4
4
  //#region ../ui-library/src/composites/cap-settings/MaskShapeCanvas.tsx
5
- t();
5
+ a();
6
6
  var g = {
7
7
  rect: "#ef4444",
8
8
  polygon: "#3b82f6",
@@ -52,12 +52,12 @@ function j(e, t) {
52
52
  function M(e) {
53
53
  return e.kind === "polygon" || e.kind === "line";
54
54
  }
55
- function N({ items: e, selectedId: t, onSelect: u, onShapeChange: d, onDrawComplete: f, drawingKind: m, supportedShapes: h, transparent: _ = !1, backdrop: v, polygonVertices: A, grid: N }) {
56
- let P = i(null), [F, z] = r({
55
+ function N({ items: e, selectedId: a, onSelect: u, onShapeChange: d, onDrawComplete: f, drawingKind: m, supportedShapes: h, transparent: _ = !1, backdrop: v, polygonVertices: A, grid: N }) {
56
+ let P = r(null), [F, z] = n({
57
57
  w: 800,
58
58
  h: 450
59
- }), [B, V] = r([]), [H, U] = r(null), [W, G] = r(null), [K, q] = r(null), J = m !== null && h.includes(m);
60
- a(() => {
59
+ }), [B, V] = n([]), [H, U] = n(null), [W, G] = n(null), [K, q] = n(null), J = m !== null && h.includes(m);
60
+ i(() => {
61
61
  if (!K) return;
62
62
  let t = e.find((e) => e.id === K.itemId);
63
63
  if (!t || !M(t.shape)) {
@@ -65,7 +65,7 @@ function N({ items: e, selectedId: t, onSelect: u, onShapeChange: d, onDrawCompl
65
65
  return;
66
66
  }
67
67
  j(t.shape.points, K.points) && q(null);
68
- }, [e, K]), a(() => {
68
+ }, [e, K]), i(() => {
69
69
  let e = P.current;
70
70
  if (!e) return;
71
71
  let t = new ResizeObserver((e) => {
@@ -81,12 +81,12 @@ function N({ items: e, selectedId: t, onSelect: u, onShapeChange: d, onDrawCompl
81
81
  });
82
82
  });
83
83
  return t.observe(e), () => t.disconnect();
84
- }, [_]), a(() => {
84
+ }, [_]), i(() => {
85
85
  !J && H !== null && U(null);
86
86
  }, [J, H]);
87
- let Y = n((e) => {
87
+ let Y = t((e) => {
88
88
  f(e), V([]);
89
- }, [f]), X = n((e) => {
89
+ }, [f]), X = t((e) => {
90
90
  if (!J || m === null) {
91
91
  u(null);
92
92
  return;
@@ -153,7 +153,7 @@ function N({ items: e, selectedId: t, onSelect: u, onShapeChange: d, onDrawCompl
153
153
  N,
154
154
  Y,
155
155
  u
156
- ]), ee = n((e) => {
156
+ ]), ee = t((e) => {
157
157
  !J || m !== "polygon" || B.length < b || (e.cancelBubble = !0, Y({
158
158
  kind: "polygon",
159
159
  points: B
@@ -163,17 +163,17 @@ function N({ items: e, selectedId: t, onSelect: u, onShapeChange: d, onDrawCompl
163
163
  m,
164
164
  B,
165
165
  Y
166
- ]), Z = i(null), Q = i(null);
167
- a(() => () => {
166
+ ]), Z = r(null), Q = r(null);
167
+ i(() => () => {
168
168
  Z.current !== null && cancelAnimationFrame(Z.current);
169
169
  }, []);
170
- let te = n((e) => {
170
+ let te = t((e) => {
171
171
  if (!J) return;
172
172
  let t = e.target.getStage();
173
173
  t && (Q.current = t.getPointerPosition() ?? null, Z.current === null && (Z.current = requestAnimationFrame(() => {
174
174
  Z.current = null, U(Q.current);
175
175
  })));
176
- }, [J]), ne = i(!1), re = i(!0), ie = i(/* @__PURE__ */ new Set()), ae = n((e, t, n, r) => {
176
+ }, [J]), ne = r(!1), re = r(!0), ie = r(/* @__PURE__ */ new Set()), ae = t((e, t, n, r) => {
177
177
  let i = t.gridWidth * t.gridHeight;
178
178
  if (n < 0 || n >= i || t.cells[n] === r) return;
179
179
  let a = [...t.cells];
@@ -253,14 +253,14 @@ function N({ items: e, selectedId: t, onSelect: u, onShapeChange: d, onDrawCompl
253
253
  }), $]
254
254
  }),
255
255
  /* @__PURE__ */ o(c, { children: e.map((e) => {
256
- let n = e.id === t, r = e.enabled === !1, i = k(e), a = n && !J && !r;
256
+ let t = e.id === a, n = e.enabled === !1, r = k(e), i = t && !J && !n;
257
257
  if (e.shape.kind === "rect") return /* @__PURE__ */ o(I, {
258
258
  item: e,
259
259
  shape: e.shape,
260
- color: i,
261
- selected: n,
262
- dimmed: r,
263
- editable: a,
260
+ color: r,
261
+ selected: t,
262
+ dimmed: n,
263
+ editable: i,
264
264
  isDrawing: J,
265
265
  size: F,
266
266
  onSelect: u,
@@ -269,9 +269,9 @@ function N({ items: e, selectedId: t, onSelect: u, onShapeChange: d, onDrawCompl
269
269
  if (e.shape.kind === "grid") return /* @__PURE__ */ o(L, {
270
270
  item: e,
271
271
  shape: e.shape,
272
- color: i,
273
- dimmed: r,
274
- editable: a,
272
+ color: r,
273
+ dimmed: n,
274
+ editable: i,
275
275
  size: F,
276
276
  onSelect: u,
277
277
  paintingRef: ne,
@@ -283,10 +283,10 @@ function N({ items: e, selectedId: t, onSelect: u, onShapeChange: d, onDrawCompl
283
283
  return /* @__PURE__ */ o(R, {
284
284
  item: e,
285
285
  shape: e.shape,
286
- color: i,
287
- selected: n,
288
- dimmed: r,
289
- editable: a,
286
+ color: r,
287
+ selected: t,
288
+ dimmed: n,
289
+ editable: i,
290
290
  isLine: s,
291
291
  isDrawing: J,
292
292
  size: F,
@@ -361,14 +361,14 @@ var P = .02;
361
361
  function F(e, t) {
362
362
  return Math.abs(e.x - t.x) < 1e-6 && Math.abs(e.y - t.y) < 1e-6 && Math.abs(e.width - t.width) < 1e-6 && Math.abs(e.height - t.height) < 1e-6;
363
363
  }
364
- function I({ item: e, shape: t, color: n, selected: i, dimmed: c, editable: l, isDrawing: f, size: p, onSelect: g, onShapeChange: y }) {
365
- let [b, x] = r(null), S = {
364
+ function I({ item: e, shape: t, color: r, selected: a, dimmed: c, editable: l, isDrawing: f, size: p, onSelect: g, onShapeChange: y }) {
365
+ let [b, x] = n(null), S = {
366
366
  x: t.x,
367
367
  y: t.y,
368
368
  width: t.width,
369
369
  height: t.height
370
370
  };
371
- a(() => {
371
+ i(() => {
372
372
  b && F(S, b) && x(null);
373
373
  }, [
374
374
  t.x,
@@ -377,7 +377,7 @@ function I({ item: e, shape: t, color: n, selected: i, dimmed: c, editable: l, i
377
377
  t.height,
378
378
  b
379
379
  ]);
380
- let C = b ?? S, w = C.x * p.w, T = C.y * p.h, E = C.width * p.w, D = C.height * p.h, k = c ? .35 : i ? 1 : .85, A = (t) => {
380
+ let C = b ?? S, w = C.x * p.w, T = C.y * p.h, E = C.width * p.w, D = C.height * p.h, k = c ? .35 : a ? 1 : .85, A = (t) => {
381
381
  x(t), y(e.id, {
382
382
  kind: "rect",
383
383
  x: t.x,
@@ -425,9 +425,9 @@ function I({ item: e, shape: t, color: n, selected: i, dimmed: c, editable: l, i
425
425
  y: T,
426
426
  width: E,
427
427
  height: D,
428
- fill: n + (i ? v : _),
429
- stroke: n,
430
- strokeWidth: i ? 2.5 : 1.5,
428
+ fill: r + (a ? v : _),
429
+ stroke: r,
430
+ strokeWidth: a ? 2.5 : 1.5,
431
431
  opacity: k
432
432
  }),
433
433
  e.label ? /* @__PURE__ */ o(d, {
@@ -435,7 +435,7 @@ function I({ item: e, shape: t, color: n, selected: i, dimmed: c, editable: l, i
435
435
  y: T - 16,
436
436
  text: e.label,
437
437
  fontSize: 12,
438
- fill: n,
438
+ fill: r,
439
439
  stroke: "#000000",
440
440
  strokeWidth: 3,
441
441
  fillAfterStrokeEnabled: !0,
@@ -446,7 +446,7 @@ function I({ item: e, shape: t, color: n, selected: i, dimmed: c, editable: l, i
446
446
  x: w + E,
447
447
  y: T + D,
448
448
  radius: 6,
449
- fill: n,
449
+ fill: r,
450
450
  stroke: "#ffffff",
451
451
  strokeWidth: 1.5,
452
452
  draggable: !0,
@@ -1,8 +1,8 @@
1
- import { b as e, c as t, h as n, m as r, p as i, u as a } from "./_virtual_mf___mfe_internal__addon_benchmark_page__loadShare__react__loadShare__.js-Bnj8XQnA.mjs";
1
+ import { c as e, g as t, h as n, p as r, u as i, x as a } from "./_virtual_mf___mfe_internal__addon_benchmark_page__loadShare__react__loadShare__.js-GeuxDuzQ.mjs";
2
2
  import { n as o, r as s, t as c } from "./_virtual_mf___mfe_internal__addon_benchmark_page__loadShare__react_mf_1_jsx_mf_2_runtime__loadShare__.js-SOU_VnTj.mjs";
3
- import { a as l, f as u, i as d, p as f, s as ee, t as p, u as m } from "./player-overlays-D1-hCqsW.mjs";
4
- import { MaskShapeCanvas as h } from "./MaskShapeCanvas-DwXCR2iE.mjs";
5
- var g = m("grid-2x2", [
3
+ import { a as l, f as u, i as ee, p as d, s as f, t as p, u as m } from "./player-overlays-BPYk8orA.mjs";
4
+ import { MaskShapeCanvas as h } from "./MaskShapeCanvas-BDvrLf-K.mjs";
5
+ var te = m("grid-2x2", [
6
6
  ["path", {
7
7
  d: "M12 3v18",
8
8
  key: "108xh3"
@@ -22,180 +22,180 @@ var g = m("grid-2x2", [
22
22
  ]);
23
23
  //#endregion
24
24
  //#region ../ui-library/src/composites/cap-settings/MotionZonesSettings.tsx
25
- e();
26
- var _ = 110, te = "motion-zones", v = 0, y = [
25
+ a();
26
+ var ne = 110, g = "motion-zones", _ = 0, re = [
27
27
  1,
28
28
  2,
29
29
  3
30
- ], b = 1, x = "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", S = "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";
31
- function C(e, t, n) {
30
+ ], v = 1, y = "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", b = "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";
31
+ function x(e, t, n) {
32
32
  let r = t * n, i = Array.from({ length: r });
33
33
  for (let t = 0; t < r; t += 1) i[t] = e[t] === !0;
34
34
  return i;
35
35
  }
36
- function ne(e, t) {
36
+ function S(e, t) {
37
37
  if (e.length !== t.length) return !1;
38
38
  for (let n = 0; n < e.length; n += 1) if (e[n] !== t[n]) return !1;
39
39
  return !0;
40
40
  }
41
- function w(e, t) {
41
+ function C(e, t) {
42
42
  return Math.ceil(e / t);
43
43
  }
44
- function T(e, t, n) {
44
+ function w(e, t, n) {
45
45
  return Math.min(n - 1, Math.floor((e + .5) / t * n));
46
46
  }
47
- function E(e, t, n, r) {
48
- let i = w(t, r), a = w(n, r), o = Array.from({ length: i * a }, () => !1);
47
+ function T(e, t, n, r) {
48
+ let i = C(t, r), a = C(n, r), o = Array.from({ length: i * a }, () => !1);
49
49
  for (let r = 0; r < n; r += 1) {
50
- let s = T(r, n, a);
51
- for (let n = 0; n < t; n += 1) e[r * t + n] === !0 && (o[s * i + T(n, t, i)] = !0);
50
+ let s = w(r, n, a);
51
+ for (let n = 0; n < t; n += 1) e[r * t + n] === !0 && (o[s * i + w(n, t, i)] = !0);
52
52
  }
53
53
  return o;
54
54
  }
55
- function D(e, t, n, r) {
56
- let i = w(t, r), a = w(n, r), o = Array.from({ length: t * n }, () => !1);
55
+ function E(e, t, n, r) {
56
+ let i = C(t, r), a = C(n, r), o = Array.from({ length: t * n }, () => !1);
57
57
  for (let r = 0; r < n; r += 1) {
58
- let s = T(r, n, a);
59
- for (let n = 0; n < t; n += 1) o[r * t + n] = e[s * i + T(n, t, i)] === !0;
58
+ let s = w(r, n, a);
59
+ for (let n = 0; n < t; n += 1) o[r * t + n] = e[s * i + w(n, t, i)] === !0;
60
60
  }
61
61
  return o;
62
62
  }
63
- function O({ deviceId: e }) {
64
- let m = l(ee().trpcClient, e), [T, O] = n(null), [k, A] = n(!1), [j, M] = n(null), [N, P] = n(null), [F, I] = n(b), [L, R] = n(!1), [z, B] = n(!1), V = r(!1);
65
- a(() => {
63
+ function D({ deviceId: a }) {
64
+ let m = l(f().trpcClient, a), [w, D] = t(null), [O, k] = t(!1), [A, j] = t(null), [M, N] = t(null), [P, F] = t(v), [I, L] = t(!1), [R, z] = t(!1), B = n(!1);
65
+ i(() => {
66
66
  if (!m) return;
67
67
  let e = !1;
68
- return V.current = !1, O(null), A(!1), M(null), P(null), I(b), B(!1), (async () => {
68
+ return B.current = !1, D(null), k(!1), j(null), N(null), F(v), z(!1), (async () => {
69
69
  try {
70
70
  let t = await m.motionZones?.getOptions({});
71
71
  if (e) return;
72
72
  if (!t) throw Error("device proxy not ready");
73
- if (O(t), V.current) return;
73
+ if (D(t), B.current) return;
74
74
  let n = await m.motionZones?.getStatus({});
75
75
  if (e) return;
76
76
  if (!n) throw Error("device proxy not ready");
77
- V.current = !0;
78
- let r = n.regions.find((e) => e.shape.kind === "grid"), i = C(r ? r.shape.cells : [], t.grid.width, t.grid.height);
79
- P(i), M(E(i, t.grid.width, t.grid.height, b));
77
+ B.current = !0;
78
+ let r = n.regions.find((e) => e.shape.kind === "grid"), i = x(r ? r.shape.cells : [], t.grid.width, t.grid.height);
79
+ N(i), j(T(i, t.grid.width, t.grid.height, v));
80
80
  } catch (t) {
81
81
  if (e) return;
82
- f(t) ? A(!0) : console.error("Motion Zones load failed", t);
82
+ d(t) ? k(!0) : console.error("Motion Zones load failed", t);
83
83
  }
84
84
  })(), () => {
85
85
  e = !0;
86
86
  };
87
87
  }, [m]);
88
- 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, [
89
- j,
90
- T,
88
+ let V = w ? w.grid.width : 0, H = w ? w.grid.height : 0, U = C(V, P), W = C(H, P), G = r(() => A && w ? E(A, V, H, P) : null, [
89
+ A,
90
+ w,
91
+ V,
91
92
  H,
92
- U,
93
- F
94
- ]), q = i(() => K !== null && N !== null && !ne(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) => {
95
- X > 0 && M(Array.from({ length: X }, () => e));
96
- }, [X]), re = t(() => {
97
- M((e) => e && e.map((e) => !e));
98
- }, []), ie = t(() => {
99
- N && T && M(E(N, H, U, F));
93
+ P
94
+ ]), K = r(() => G !== null && M !== null && !S(G, M), [G, M]), q = r(() => G ? G.reduce((e, t) => t ? e + 1 : e, 0) : 0, [G]), J = V * H, Y = U * W, X = e((e) => {
95
+ Y > 0 && j(Array.from({ length: Y }, () => e));
96
+ }, [Y]), Z = e(() => {
97
+ j((e) => e && e.map((e) => !e));
98
+ }, []), ie = e(() => {
99
+ M && w && j(T(M, V, H, P));
100
100
  }, [
101
- N,
102
- T,
101
+ M,
102
+ w,
103
+ V,
103
104
  H,
104
- U,
105
- F
106
- ]), ae = t((e) => {
107
- e === F || !T || M((t) => {
108
- if (!t) return I(e), t;
109
- let n = E(D(t, H, U, F), H, U, e);
110
- return I(e), n;
105
+ P
106
+ ]), ae = e((e) => {
107
+ e === P || !w || j((t) => {
108
+ if (!t) return F(e), t;
109
+ let n = T(E(t, V, H, P), V, H, e);
110
+ return F(e), n;
111
111
  });
112
112
  }, [
113
- F,
114
- T,
115
- H,
116
- U
117
- ]), Q = i(() => T && j ? [{
118
- id: v,
113
+ P,
114
+ w,
115
+ V,
116
+ H
117
+ ]), Q = r(() => w && A ? [{
118
+ id: _,
119
119
  shape: {
120
120
  kind: "grid",
121
- gridWidth: W,
122
- gridHeight: G,
123
- cells: [...j]
121
+ gridWidth: U,
122
+ gridHeight: W,
123
+ cells: [...A]
124
124
  }
125
125
  }] : [], [
126
- T,
127
- j,
128
- W,
129
- G
130
- ]), $ = t((e, t) => {
131
- t.kind === "grid" && M(t.cells);
132
- }, []), oe = t(async () => {
133
- if (!(!m || !j || !T)) {
134
- R(!0);
126
+ w,
127
+ A,
128
+ U,
129
+ W
130
+ ]), $ = e((e, t) => {
131
+ t.kind === "grid" && j(t.cells);
132
+ }, []), oe = e(async () => {
133
+ if (!(!m || !A || !w)) {
134
+ L(!0);
135
135
  try {
136
- let e = D(j, T.grid.width, T.grid.height, F), t = {
136
+ let e = E(A, w.grid.width, w.grid.height, P), t = {
137
137
  kind: "grid",
138
- gridWidth: T.grid.width,
139
- gridHeight: T.grid.height,
138
+ gridWidth: w.grid.width,
139
+ gridHeight: w.grid.height,
140
140
  cells: e
141
141
  };
142
142
  await m.motionZones?.setZone({ patch: { regions: [{
143
- id: v,
143
+ id: _,
144
144
  enabled: !0,
145
145
  shape: t
146
146
  }] } });
147
147
  let n = await m.motionZones?.getStatus({});
148
148
  if (n) {
149
- let e = n.regions.find((e) => e.shape.kind === "grid"), t = C(e ? e.shape.cells : [], T.grid.width, T.grid.height);
150
- P(t), M(E(t, T.grid.width, T.grid.height, F));
149
+ let e = n.regions.find((e) => e.shape.kind === "grid"), t = x(e ? e.shape.cells : [], w.grid.width, w.grid.height);
150
+ N(t), j(T(t, w.grid.width, w.grid.height, P));
151
151
  }
152
152
  } catch (e) {
153
153
  console.error("Motion Zones save failed", e);
154
154
  } finally {
155
- R(!1);
155
+ L(!1);
156
156
  }
157
157
  }
158
158
  }, [
159
159
  m,
160
- j,
161
- T,
162
- F
160
+ A,
161
+ w,
162
+ P
163
163
  ]);
164
- return p(i(() => z && !k && T && j ? {
165
- id: te,
166
- order: _,
164
+ return p(r(() => R && !O && w && A ? {
165
+ id: g,
166
+ order: ne,
167
167
  node: /* @__PURE__ */ o(h, {
168
168
  transparent: !0,
169
169
  items: Q,
170
170
  supportedShapes: ["grid"],
171
171
  grid: {
172
- width: W,
173
- height: G
172
+ width: U,
173
+ height: W
174
174
  },
175
- selectedId: v,
175
+ selectedId: _,
176
176
  onSelect: () => {},
177
177
  onShapeChange: $,
178
178
  onDrawComplete: () => {},
179
179
  drawingKind: null
180
180
  })
181
181
  } : null, [
182
- z,
183
- k,
184
- T,
185
- j,
182
+ R,
183
+ O,
184
+ w,
185
+ A,
186
186
  Q,
187
187
  $,
188
- W,
189
- G
190
- ])), m ? /* @__PURE__ */ o(d, {
188
+ U,
189
+ W
190
+ ])), m ? /* @__PURE__ */ o(ee, {
191
191
  title: "Motion Zones",
192
- icon: /* @__PURE__ */ o(g, { className: "h-3.5 w-3.5 text-foreground-subtle" }),
192
+ icon: /* @__PURE__ */ o(te, { className: "h-3.5 w-3.5 text-foreground-subtle" }),
193
193
  children: /* @__PURE__ */ o("div", {
194
194
  className: "flex flex-col gap-3",
195
- children: k ? /* @__PURE__ */ o("p", {
195
+ children: O ? /* @__PURE__ */ o("p", {
196
196
  className: `${u} leading-relaxed`,
197
197
  children: "This camera doesn't expose an on-board motion zones grid."
198
- }) : !k && T !== null && j !== null ? /* @__PURE__ */ s(c, { children: [/* @__PURE__ */ s("p", {
198
+ }) : !O && w !== null && A !== null ? /* @__PURE__ */ s(c, { children: [/* @__PURE__ */ s("p", {
199
199
  className: `${u} leading-relaxed`,
200
200
  children: [
201
201
  "Toggle ",
@@ -215,9 +215,9 @@ function O({ deviceId: e }) {
215
215
  children: "Cell size"
216
216
  }),
217
217
  " for quicker, broad-stroke painting — it's resampled to the camera's native ",
218
- T.grid.width,
218
+ w.grid.width,
219
219
  "×",
220
- T.grid.height,
220
+ w.grid.height,
221
221
  " grid on save (×1 is the finest)."
222
222
  ]
223
223
  }), /* @__PURE__ */ s("div", {
@@ -225,31 +225,31 @@ function O({ deviceId: e }) {
225
225
  children: [
226
226
  /* @__PURE__ */ o("button", {
227
227
  type: "button",
228
- onClick: () => B((e) => !e),
229
- disabled: L,
230
- "aria-pressed": z,
231
- className: z ? S : x,
232
- children: z ? "Done editing" : "Edit grid"
228
+ onClick: () => z((e) => !e),
229
+ disabled: I,
230
+ "aria-pressed": R,
231
+ className: R ? b : y,
232
+ children: R ? "Done editing" : "Edit grid"
233
233
  }),
234
234
  /* @__PURE__ */ o("button", {
235
235
  type: "button",
236
- onClick: () => Z(!0),
237
- disabled: L,
238
- className: x,
236
+ onClick: () => X(!0),
237
+ disabled: I,
238
+ className: y,
239
239
  children: "All on"
240
240
  }),
241
241
  /* @__PURE__ */ o("button", {
242
242
  type: "button",
243
- onClick: () => Z(!1),
244
- disabled: L,
245
- className: x,
243
+ onClick: () => X(!1),
244
+ disabled: I,
245
+ className: y,
246
246
  children: "All off"
247
247
  }),
248
248
  /* @__PURE__ */ o("button", {
249
249
  type: "button",
250
- onClick: re,
251
- disabled: L,
252
- className: x,
250
+ onClick: Z,
251
+ disabled: I,
252
+ className: y,
253
253
  children: "Invert"
254
254
  }),
255
255
  /* @__PURE__ */ s("div", {
@@ -259,43 +259,43 @@ function O({ deviceId: e }) {
259
259
  children: [/* @__PURE__ */ o("span", {
260
260
  className: `${u} mr-0.5`,
261
261
  children: "Cell size"
262
- }), y.map((e) => /* @__PURE__ */ s("button", {
262
+ }), re.map((e) => /* @__PURE__ */ s("button", {
263
263
  type: "button",
264
264
  onClick: () => ae(e),
265
- disabled: L,
266
- "aria-pressed": F === e,
267
- title: e === 1 ? `Camera grid ${H}×${U} (finest)` : `${w(H, e)}×${w(U, e)} painting grid · cells ×${e} bigger`,
268
- className: F === e ? S : x,
265
+ disabled: I,
266
+ "aria-pressed": P === e,
267
+ title: e === 1 ? `Camera grid ${V}×${H} (finest)` : `${C(V, e)}×${C(H, e)} painting grid · cells ×${e} bigger`,
268
+ className: P === e ? b : y,
269
269
  children: ["×", e]
270
270
  }, e))]
271
271
  }),
272
272
  /* @__PURE__ */ s("span", {
273
273
  className: `${u} ml-1 tabular-nums`,
274
274
  children: [
275
- J,
275
+ q,
276
276
  " / ",
277
- Y,
277
+ J,
278
278
  " cells · ",
279
- T.grid.width,
279
+ w.grid.width,
280
280
  "×",
281
- T.grid.height,
282
- F === 1 ? "" : ` · paint ${W}×${G}`
281
+ w.grid.height,
282
+ P === 1 ? "" : ` · paint ${U}×${W}`
283
283
  ]
284
284
  }),
285
285
  /* @__PURE__ */ o("span", { className: "flex-1" }),
286
286
  /* @__PURE__ */ o("button", {
287
287
  type: "button",
288
288
  onClick: ie,
289
- disabled: L || !q,
289
+ disabled: I || !K,
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
291
  children: "Revert"
292
292
  }),
293
293
  /* @__PURE__ */ o("button", {
294
294
  type: "button",
295
295
  onClick: () => void oe(),
296
- disabled: L || !q,
297
- className: S,
298
- children: L ? "Saving…" : "Save"
296
+ disabled: I || !K,
297
+ className: b,
298
+ children: I ? "Saving…" : "Save"
299
299
  })
300
300
  ]
301
301
  })] }) : /* @__PURE__ */ o("p", {
@@ -306,4 +306,4 @@ function O({ deviceId: e }) {
306
306
  }) : null;
307
307
  }
308
308
  //#endregion
309
- export { O as MotionZonesSettings };
309
+ export { D as MotionZonesSettings };