@camstack/addon-model-studio 1.1.213 → 1.1.214

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 (19) hide show
  1. package/dist/{MaskShapeCanvas-C4g96eMz.mjs → MaskShapeCanvas-DBaZffFb.mjs} +113 -113
  2. package/dist/{MotionZonesSettings-C7HEiRnq.mjs → MotionZonesSettings-BQ0UOfb8.mjs} +121 -121
  3. package/dist/{PrivacyMaskSettings-BSosgHnv.mjs → PrivacyMaskSettings-q_9yxl4v.mjs} +25 -25
  4. package/dist/{SceneMonitorEditor-DRtryprB.mjs → SceneMonitorEditor-Bmz5Y9X5.mjs} +299 -299
  5. package/dist/_stub.js +4893 -4652
  6. package/dist/{_virtual_mf-localSharedImportMap___mfe_internal__addon_model_studio_page-BR9IJC7m.mjs → _virtual_mf-localSharedImportMap___mfe_internal__addon_model_studio_page-uW1Zd-nw.mjs} +3 -3
  7. package/dist/_virtual_mf___mfe_internal__addon_model_studio_page__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-CL_c14D8.mjs +26 -0
  8. 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
  9. package/dist/addon-model-studio.css +1 -1
  10. package/dist/{hostInit-B8Cs1GFO.mjs → hostInit-XNV3DgEX.mjs} +2 -2
  11. package/dist/{player-overlays-ClwdY6ON.mjs → player-overlays-DyBPgoW8.mjs} +11 -11
  12. package/dist/remoteEntry.js +1 -1
  13. package/dist/{responsive-DpIGDl9c.mjs → responsive-CvxBWUH9.mjs} +22 -22
  14. package/dist/{scene-monitor-copy-CQT83BYQ.mjs → scene-monitor-copy-Bbrh5uOi.mjs} +13 -13
  15. package/dist/{square-D90TdUQE.mjs → square-Ebm5mZPx.mjs} +1 -1
  16. package/dist/{trash-2-Cg4yxhps.mjs → trash-2-BX4TiX8o.mjs} +1 -1
  17. 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-r8bN15Ml.mjs} +1 -1
  18. package/package.json +1 -1
  19. 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 { c as e, h as t, m as n, p as r, u as i, y as a } from "./_virtual_mf___mfe_internal__addon_model_studio_page__loadShare__react__loadShare__.js-DJDHChgO.mjs";
2
- import { b as o, g as s, h as c, p as l, v as u } from "./responsive-DpIGDl9c.mjs";
3
- import { n as ee, t as d } from "./player-overlays-ClwdY6ON.mjs";
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-CvxBWUH9.mjs";
3
+ import { n as ee, t as d } from "./player-overlays-DyBPgoW8.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-C4g96eMz.mjs";
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
- a();
27
- var ne = 110, re = "motion-zones", g = 0, _ = [
26
+ e();
27
+ var g = 110, ne = "motion-zones", _ = 0, v = [
28
28
  1,
29
29
  2,
30
30
  3
31
- ], 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";
32
- function x(e, t, n) {
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 S(e, t) {
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 C(e, t) {
42
+ function w(e, t) {
43
43
  return Math.ceil(e / t);
44
44
  }
45
- function w(e, t, n) {
45
+ function T(e, t, n) {
46
46
  return Math.min(n - 1, Math.floor((e + .5) / t * n));
47
47
  }
48
- function T(e, t, n, r) {
49
- let i = C(t, r), a = C(n, r), o = Array.from({ length: i * a }, () => !1);
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 = w(r, n, a);
52
- for (let n = 0; n < t; n += 1) e[r * t + n] === !0 && (o[s * i + w(n, t, i)] = !0);
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 E(e, t, n, r) {
57
- let i = C(t, r), a = C(n, r), o = Array.from({ length: t * n }, () => !1);
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 = w(r, n, a);
60
- for (let n = 0; n < t; n += 1) o[r * t + n] = e[s * i + w(n, t, i)] === !0;
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 D({ deviceId: a }) {
65
- let o = s(u().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);
66
- i(() => {
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 B.current = !1, D(null), k(!1), j(null), N(null), F(v), z(!1), (async () => {
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 (D(t), B.current) return;
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
- B.current = !0;
79
- let r = n.regions.find((e) => e.shape.kind === "grid"), i = x(r ? r.shape.cells : [], t.grid.width, t.grid.height);
80
- N(i), j(T(i, t.grid.width, t.grid.height, v));
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) ? k(!0) : console.error("Motion Zones load failed", 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 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, [
90
- A,
91
- w,
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
- P
95
- ]), 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) => {
96
- Y > 0 && j(Array.from({ length: Y }, () => e));
97
- }, [Y]), Z = e(() => {
98
- j((e) => e && e.map((e) => !e));
99
- }, []), ie = e(() => {
100
- M && w && j(T(M, V, H, P));
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
- M,
103
- w,
104
- V,
102
+ N,
103
+ T,
105
104
  H,
106
- P
107
- ]), ae = e((e) => {
108
- e === P || !w || j((t) => {
109
- if (!t) return F(e), t;
110
- let n = T(E(t, V, H, P), V, H, e);
111
- return F(e), n;
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
- P,
115
- w,
116
- V,
117
- H
118
- ]), Q = r(() => w && A ? [{
119
- id: g,
114
+ F,
115
+ T,
116
+ H,
117
+ U
118
+ ]), Q = i(() => T && j ? [{
119
+ id: _,
120
120
  shape: {
121
121
  kind: "grid",
122
- gridWidth: U,
123
- gridHeight: W,
124
- cells: [...A]
122
+ gridWidth: W,
123
+ gridHeight: G,
124
+ cells: [...j]
125
125
  }
126
126
  }] : [], [
127
- w,
128
- A,
129
- U,
130
- W
131
- ]), $ = e((e, t) => {
132
- t.kind === "grid" && j(t.cells);
133
- }, []), oe = e(async () => {
134
- if (!(!o || !A || !w)) {
135
- L(!0);
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 = E(A, w.grid.width, w.grid.height, P), t = {
137
+ let e = D(j, T.grid.width, T.grid.height, F), t = {
138
138
  kind: "grid",
139
- gridWidth: w.grid.width,
140
- gridHeight: w.grid.height,
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: g,
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 = x(e ? e.shape.cells : [], w.grid.width, w.grid.height);
151
- N(t), j(T(t, w.grid.width, w.grid.height, P));
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
- L(!1);
156
+ R(!1);
157
157
  }
158
158
  }
159
159
  }, [
160
160
  o,
161
- A,
162
- w,
163
- P
161
+ j,
162
+ T,
163
+ F
164
164
  ]);
165
- return d(r(() => R && !O && w && A ? {
166
- id: re,
167
- order: ne,
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: U,
174
- height: W
173
+ width: W,
174
+ height: G
175
175
  },
176
- selectedId: g,
176
+ selectedId: _,
177
177
  onSelect: () => {},
178
178
  onShapeChange: $,
179
179
  onDrawComplete: () => {},
180
180
  drawingKind: null
181
181
  })
182
182
  } : null, [
183
- R,
184
- O,
185
- w,
186
- A,
183
+ z,
184
+ k,
185
+ T,
186
+ j,
187
187
  Q,
188
188
  $,
189
- U,
190
- W
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: O ? /* @__PURE__ */ f("p", {
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
- }) : !O && w !== null && A !== null ? /* @__PURE__ */ p(te, { children: [/* @__PURE__ */ p("p", {
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
- w.grid.width,
219
+ T.grid.width,
220
220
  "×",
221
- w.grid.height,
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: () => z((e) => !e),
230
- disabled: I,
231
- "aria-pressed": R,
232
- className: R ? b : y,
233
- children: R ? "Done editing" : "Edit grid"
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: () => X(!0),
238
- disabled: I,
239
- className: y,
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: () => X(!1),
245
- disabled: I,
246
- className: y,
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: Z,
252
- disabled: I,
253
- className: y,
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
- }), _.map((e) => /* @__PURE__ */ p("button", {
263
+ }), v.map((e) => /* @__PURE__ */ p("button", {
264
264
  type: "button",
265
265
  onClick: () => ae(e),
266
- disabled: I,
267
- "aria-pressed": P === e,
268
- title: e === 1 ? `Camera grid ${V}×${H} (finest)` : `${C(V, e)}×${C(H, e)} painting grid · cells ×${e} bigger`,
269
- className: P === e ? b : y,
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
- w.grid.width,
280
+ T.grid.width,
281
281
  "×",
282
- w.grid.height,
283
- P === 1 ? "" : ` · paint ${U}×${W}`
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: I || !K,
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: I || !K,
298
- className: b,
299
- children: I ? "Saving…" : "Save"
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 { D as MotionZonesSettings };
310
+ export { O as MotionZonesSettings };
@@ -1,10 +1,10 @@
1
- import { c as e, h as t, m as n, p as r, u as i, y as a } from "./_virtual_mf___mfe_internal__addon_model_studio_page__loadShare__react__loadShare__.js-DJDHChgO.mjs";
2
- import { b as o, g as ee, h as te, p as s, v as ne } from "./responsive-DpIGDl9c.mjs";
3
- import { n as re, t as ie } from "./player-overlays-ClwdY6ON.mjs";
4
- import { n as ae, r as oe, t as se } from "./square-D90TdUQE.mjs";
5
- import { t as c } from "./trash-2-Cg4yxhps.mjs";
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-CvxBWUH9.mjs";
3
+ import { n as re, t as ie } from "./player-overlays-DyBPgoW8.mjs";
4
+ import { n as ae, r as oe, t as se } from "./square-Ebm5mZPx.mjs";
5
+ import { t as c } from "./trash-2-BX4TiX8o.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-C4g96eMz.mjs";
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
- a();
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: a }) {
71
- let o = ee(ne().trpcClient, a), [d, f] = t(null), [v, y] = t(!1), [b, x] = t(!1), [S, C] = t(null), [w, T] = t(null), [E, D] = t(!1), [O, k] = t(!1), [A, j] = t(null), [M, N] = t(null), [ge, P] = t(null), [F, I] = t(null), [L, R] = t(null), z = n(!1);
72
- i(() => {
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 = r(() => 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 = n(0);
103
- i(() => {
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 = 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 = e((e) => {
111
+ }, []), G = t((e) => {
112
112
  j(typeof e == "number" ? e : null);
113
- }, []), K = r(() => S ? S.regions.map((e) => ({
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 = e((e, t) => {
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 = e((e) => {
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 = e((e) => {
143
+ }, []), Y = t((e) => {
144
144
  k(!0), j(null), N(e);
145
- }, []), ve = e((e) => {
145
+ }, []), ve = t((e) => {
146
146
  k(!0), N(null), j(e);
147
- }, []), X = e((e) => {
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 = e(() => {
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 = e(async () => {
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 = e(async () => {
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 = e(() => {
197
+ }, [o, Z]), Se = t(() => {
198
198
  k((e) => (e && (N(null), j(null)), !e));
199
199
  }, []), Q = d?.supportedShapes ?? [];
200
- ie(r(() => O && !v && d && S ? {
200
+ ie(i(() => O && !v && d && S ? {
201
201
  id: pe,
202
202
  order: fe,
203
203
  node: /* @__PURE__ */ l(le, {