@camstack/addon-training 0.1.5 → 0.1.6
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-DPtcv80q.mjs +310 -0
- package/dist/{PrivacyMaskSettings-BwYjIkQR.mjs → PrivacyMaskSettings-Wsn5QL0_.mjs} +4 -4
- package/dist/{SceneMonitorEditor-BBfow3Lm.mjs → SceneMonitorEditor-BlMwyiH8.mjs} +313 -313
- package/dist/_stub.js +3465 -3410
- package/dist/{_virtual_mf-localSharedImportMap___mfe_internal__addon_training_page-CGhkyuU-.mjs → _virtual_mf-localSharedImportMap___mfe_internal__addon_training_page-Cbrdn9ib.mjs} +3 -3
- package/dist/addon-training.css +1 -1
- package/dist/{dist-BiSFqfpy.js → dist-BhCRZEE4.js} +12 -1
- package/dist/{dist-B_79m03G.mjs → dist-Cqa2fHNk.mjs} +12 -1
- package/dist/{hostInit-BEPknhsh.mjs → hostInit-BI98RYIm.mjs} +2 -2
- package/dist/index.js +1 -1
- package/dist/orchestrator/training.addon.js +1 -1
- package/dist/orchestrator/training.addon.mjs +1 -1
- package/dist/{player-overlays-wE5IcDiI.mjs → player-overlays-BX3obOMu.mjs} +5 -5
- package/dist/providers/modal/training-modal.addon.js +1 -1
- package/dist/providers/modal/training-modal.addon.mjs +1 -1
- package/dist/remoteEntry.js +1 -1
- package/dist/{responsive-D17kMsm1.mjs → responsive-CdDIJCpI.mjs} +2 -2
- package/dist/{scene-monitor-copy-LjlvhSRM.mjs → scene-monitor-copy-5u5w3K-Y.mjs} +1 -1
- package/dist/{square-JGDHhLlY.mjs → square-C-P1-89Q.mjs} +1 -1
- package/dist/{trash-2-zeFnLJvf.mjs → trash-2-BikGYiWf.mjs} +1 -1
- package/dist/{virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_training_page__remoteEntry_js-C0RB_rkV.mjs → virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_training_page__remoteEntry_js-DGLUs0o6.mjs} +1 -1
- package/package.json +1 -1
- package/dist/MotionZonesSettings-aj085Nrn.mjs +0 -310
|
@@ -25648,11 +25648,14 @@ var HardwareClassIdSchema = _enum([
|
|
|
25648
25648
|
"intel-n-series",
|
|
25649
25649
|
"apple-m-base",
|
|
25650
25650
|
"apple-m-pro",
|
|
25651
|
+
"amd-phoenix",
|
|
25651
25652
|
"unknown"
|
|
25652
25653
|
]);
|
|
25653
25654
|
var AcceleratorKindSchema = _enum([
|
|
25654
25655
|
"intel-npu",
|
|
25655
25656
|
"intel-igpu",
|
|
25657
|
+
"amd-igpu",
|
|
25658
|
+
"amd-npu",
|
|
25656
25659
|
"x86-cpu",
|
|
25657
25660
|
"arm-cpu",
|
|
25658
25661
|
"apple-ane",
|
|
@@ -35538,7 +35541,15 @@ var GpuInfoSchema = object({
|
|
|
35538
35541
|
name: string(),
|
|
35539
35542
|
memoryMB: number().optional()
|
|
35540
35543
|
});
|
|
35541
|
-
var NpuInfoSchema = object({
|
|
35544
|
+
var NpuInfoSchema = object({
|
|
35545
|
+
type: _enum([
|
|
35546
|
+
"apple-ane",
|
|
35547
|
+
"intel-npu",
|
|
35548
|
+
"amd-xdna"
|
|
35549
|
+
]),
|
|
35550
|
+
name: string().optional(),
|
|
35551
|
+
generation: _enum(["xdna1", "xdna2"]).optional()
|
|
35552
|
+
});
|
|
35542
35553
|
var CoralInfoSchema = object({
|
|
35543
35554
|
type: literal("coral-edgetpu"),
|
|
35544
35555
|
bus: string().optional()
|
|
@@ -25615,11 +25615,14 @@ var HardwareClassIdSchema = _enum([
|
|
|
25615
25615
|
"intel-n-series",
|
|
25616
25616
|
"apple-m-base",
|
|
25617
25617
|
"apple-m-pro",
|
|
25618
|
+
"amd-phoenix",
|
|
25618
25619
|
"unknown"
|
|
25619
25620
|
]);
|
|
25620
25621
|
var AcceleratorKindSchema = _enum([
|
|
25621
25622
|
"intel-npu",
|
|
25622
25623
|
"intel-igpu",
|
|
25624
|
+
"amd-igpu",
|
|
25625
|
+
"amd-npu",
|
|
25623
25626
|
"x86-cpu",
|
|
25624
25627
|
"arm-cpu",
|
|
25625
25628
|
"apple-ane",
|
|
@@ -35505,7 +35508,15 @@ var GpuInfoSchema = object({
|
|
|
35505
35508
|
name: string(),
|
|
35506
35509
|
memoryMB: number().optional()
|
|
35507
35510
|
});
|
|
35508
|
-
var NpuInfoSchema = object({
|
|
35511
|
+
var NpuInfoSchema = object({
|
|
35512
|
+
type: _enum([
|
|
35513
|
+
"apple-ane",
|
|
35514
|
+
"intel-npu",
|
|
35515
|
+
"amd-xdna"
|
|
35516
|
+
]),
|
|
35517
|
+
name: string().optional(),
|
|
35518
|
+
generation: _enum(["xdna1", "xdna2"]).optional()
|
|
35519
|
+
});
|
|
35509
35520
|
var CoralInfoSchema = object({
|
|
35510
35521
|
type: literal("coral-edgetpu"),
|
|
35511
35522
|
bus: string().optional()
|
|
@@ -36,7 +36,7 @@ async function r() {
|
|
|
36
36
|
}
|
|
37
37
|
},
|
|
38
38
|
"@camstack/types": {
|
|
39
|
-
version: "1.2.
|
|
39
|
+
version: "1.2.339",
|
|
40
40
|
scope: "default",
|
|
41
41
|
shareConfig: {
|
|
42
42
|
singleton: !0,
|
|
@@ -81,7 +81,7 @@ async function r() {
|
|
|
81
81
|
}
|
|
82
82
|
},
|
|
83
83
|
"@camstack/ui-library": {
|
|
84
|
-
version: "1.2.
|
|
84
|
+
version: "1.2.259",
|
|
85
85
|
scope: "default",
|
|
86
86
|
shareConfig: {
|
|
87
87
|
singleton: !0,
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
require("./dist-
|
|
2
|
+
require("./dist-BhCRZEE4.js");
|
|
3
3
|
const require_orchestrator_training_addon = require("./orchestrator/training.addon.js");
|
|
4
4
|
const require_providers_modal_training_modal_addon = require("./providers/modal/training-modal.addon.js");
|
|
5
5
|
//#region src/providers/fake/fake-provider.ts
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_dist = require("../dist-
|
|
2
|
+
const require_dist = require("../dist-BhCRZEE4.js");
|
|
3
3
|
let node_path = require("node:path");
|
|
4
4
|
node_path = require_dist.__toESM(node_path);
|
|
5
5
|
let node_crypto = require("node:crypto");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as TrainingResultSchema, c as trainingCapability, i as TrainingJobSpecSchema, n as TrainingDatasetVersionRowSchema, o as addonPagesSourceCapability, r as TrainingJobSchema, s as parseTrainingEventLine, t as TRAINING_JOB_SCHEMA, u as BaseAddon } from "../dist-
|
|
1
|
+
import { a as TrainingResultSchema, c as trainingCapability, i as TrainingJobSpecSchema, n as TrainingDatasetVersionRowSchema, o as addonPagesSourceCapability, r as TrainingJobSchema, s as parseTrainingEventLine, t as TRAINING_JOB_SCHEMA, u as BaseAddon } from "../dist-Cqa2fHNk.mjs";
|
|
2
2
|
import path from "node:path";
|
|
3
3
|
import { createHash } from "node:crypto";
|
|
4
4
|
import { createReadStream } from "node:fs";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { b as e, g as t, l as n, u as r } from "./_virtual_mf___mfe_internal__addon_training_page__loadShare__react__loadShare__.js-BT_wL8s3.mjs";
|
|
2
|
-
import {
|
|
2
|
+
import { d as i, u as a } from "./responsive-CdDIJCpI.mjs";
|
|
3
3
|
import { n as o, r as s, t as c } from "./_virtual_mf___mfe_internal__addon_training_page__loadShare__react_mf_1_jsx_mf_2_runtime__loadShare__.js-DDBEvLdo.mjs";
|
|
4
|
-
var l =
|
|
4
|
+
var l = i("chevron-down", [["path", {
|
|
5
5
|
d: "m6 9 6 6 6-6",
|
|
6
6
|
key: "qrunsl"
|
|
7
|
-
}]]), u =
|
|
7
|
+
}]]), u = i("chevron-right", [["path", {
|
|
8
8
|
d: "m9 18 6-6-6-6",
|
|
9
9
|
key: "mthhwq"
|
|
10
10
|
}]]);
|
|
@@ -32,8 +32,8 @@ function d({ title: e, icon: n, headerRight: r, collapsible: i = !1, defaultOpen
|
|
|
32
32
|
}) : null]
|
|
33
33
|
});
|
|
34
34
|
}
|
|
35
|
-
e(),
|
|
36
|
-
var f =
|
|
35
|
+
e(), a("camstack:player-overlays-state", null);
|
|
36
|
+
var f = a("camstack:player-overlays-actions", null);
|
|
37
37
|
function p(e) {
|
|
38
38
|
let t = n(f);
|
|
39
39
|
r(() => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_dist = require("../../dist-
|
|
2
|
+
const require_dist = require("../../dist-BhCRZEE4.js");
|
|
3
3
|
let node_path = require("node:path");
|
|
4
4
|
node_path = require_dist.__toESM(node_path, 1);
|
|
5
5
|
let node_crypto = require("node:crypto");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { d as boolean, f as number, h as string, l as trainingProviderCapability, m as record, p as object, u as BaseAddon } from "../../dist-
|
|
1
|
+
import { d as boolean, f as number, h as string, l as trainingProviderCapability, m as record, p as object, u as BaseAddon } from "../../dist-Cqa2fHNk.mjs";
|
|
2
2
|
import { createRequire } from "node:module";
|
|
3
3
|
import path, { dirname, posix } from "node:path";
|
|
4
4
|
import { createHash, createPrivateKey, createPublicKey, createSign, randomBytes } from "node:crypto";
|
package/dist/remoteEntry.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as e, t } from "./virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_training_page__remoteEntry_js-
|
|
1
|
+
import { n as e, t } from "./virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_training_page__remoteEntry_js-DGLUs0o6.mjs";
|
|
2
2
|
export { t as get, e as init };
|
|
@@ -117,6 +117,6 @@ function E(e) {
|
|
|
117
117
|
}
|
|
118
118
|
//#endregion
|
|
119
119
|
//#region ../ui-library/src/lib/responsive.ts
|
|
120
|
-
var D = "text-[10px] text-foreground-subtle";
|
|
120
|
+
var D = "rounded-lg border border-border bg-surface overflow-hidden", O = "border-b border-border px-3 sm:px-4 py-1.5 sm:py-2", k = "p-2 sm:p-3 lg:p-4", A = "text-[10px] sm:text-[11px] font-semibold text-foreground uppercase tracking-wider", j = "text-[10px] text-foreground-subtle";
|
|
121
121
|
//#endregion
|
|
122
|
-
export {
|
|
122
|
+
export { A as a, w as c, v as d, j as i, x as l, D as n, E as o, O as r, C as s, k as t, y as u };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { b as e, c as t, g as n, m as r } from "./_virtual_mf___mfe_internal__addon_training_page__loadShare__react__loadShare__.js-BT_wL8s3.mjs";
|
|
2
|
-
import {
|
|
2
|
+
import { d as i } from "./responsive-CdDIJCpI.mjs";
|
|
3
3
|
var a = i("camera", [["path", {
|
|
4
4
|
d: "M13.997 4a2 2 0 0 1 1.76 1.05l.486.9A2 2 0 0 0 18.003 7H20a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2h1.997a2 2 0 0 0 1.759-1.048l.489-.904A2 2 0 0 1 10.004 4z",
|
|
5
5
|
key: "18u6gg"
|
|
@@ -2753,7 +2753,7 @@ async function rr(e) {
|
|
|
2753
2753
|
}
|
|
2754
2754
|
}
|
|
2755
2755
|
async function ir() {
|
|
2756
|
-
return tr ||= rr(() => import("./_virtual_mf-localSharedImportMap___mfe_internal__addon_training_page-
|
|
2756
|
+
return tr ||= rr(() => import("./_virtual_mf-localSharedImportMap___mfe_internal__addon_training_page-Cbrdn9ib.mjs")).catch((e) => {
|
|
2757
2757
|
throw tr = void 0, e;
|
|
2758
2758
|
}), tr;
|
|
2759
2759
|
}
|
package/package.json
CHANGED
|
@@ -1,310 +0,0 @@
|
|
|
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_training_page__loadShare__react__loadShare__.js-BT_wL8s3.mjs";
|
|
2
|
-
import { a as o, n as s, r as c, s as l, t as u } from "./responsive-D17kMsm1.mjs";
|
|
3
|
-
import { n as d, t as f } from "./player-overlays-wE5IcDiI.mjs";
|
|
4
|
-
import { n as p, r as m, t as ee } from "./_virtual_mf___mfe_internal__addon_training_page__loadShare__react_mf_1_jsx_mf_2_runtime__loadShare__.js-DDBEvLdo.mjs";
|
|
5
|
-
import { MaskShapeCanvas as h } from "./MaskShapeCanvas-BokARvOj.mjs";
|
|
6
|
-
var g = l("grid-2x2", [
|
|
7
|
-
["path", {
|
|
8
|
-
d: "M12 3v18",
|
|
9
|
-
key: "108xh3"
|
|
10
|
-
}],
|
|
11
|
-
["path", {
|
|
12
|
-
d: "M3 12h18",
|
|
13
|
-
key: "1i2n21"
|
|
14
|
-
}],
|
|
15
|
-
["rect", {
|
|
16
|
-
x: "3",
|
|
17
|
-
y: "3",
|
|
18
|
-
width: "18",
|
|
19
|
-
height: "18",
|
|
20
|
-
rx: "2",
|
|
21
|
-
key: "h1oib"
|
|
22
|
-
}]
|
|
23
|
-
]);
|
|
24
|
-
//#endregion
|
|
25
|
-
//#region ../ui-library/src/composites/cap-settings/MotionZonesSettings.tsx
|
|
26
|
-
e();
|
|
27
|
-
var te = 110, _ = "motion-zones", v = 0, ne = [
|
|
28
|
-
1,
|
|
29
|
-
2,
|
|
30
|
-
3
|
|
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
|
-
let r = t * n, i = Array.from({ length: r });
|
|
34
|
-
for (let t = 0; t < r; t += 1) i[t] = e[t] === !0;
|
|
35
|
-
return i;
|
|
36
|
-
}
|
|
37
|
-
function re(e, t) {
|
|
38
|
-
if (e.length !== t.length) return !1;
|
|
39
|
-
for (let n = 0; n < e.length; n += 1) if (e[n] !== t[n]) return !1;
|
|
40
|
-
return !0;
|
|
41
|
-
}
|
|
42
|
-
function C(e, t) {
|
|
43
|
-
return Math.ceil(e / t);
|
|
44
|
-
}
|
|
45
|
-
function w(e, t, n) {
|
|
46
|
-
return Math.min(n - 1, Math.floor((e + .5) / t * n));
|
|
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);
|
|
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);
|
|
53
|
-
}
|
|
54
|
-
return o;
|
|
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);
|
|
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;
|
|
61
|
-
}
|
|
62
|
-
return o;
|
|
63
|
-
}
|
|
64
|
-
function D({ deviceId: e }) {
|
|
65
|
-
let l = c(o().trpcClient, e), [w, D] = n(null), [O, k] = n(!1), [A, j] = n(null), [M, N] = n(null), [P, F] = n(y), [I, L] = n(!1), [R, z] = n(!1), B = r(!1);
|
|
66
|
-
a(() => {
|
|
67
|
-
if (!l) return;
|
|
68
|
-
let e = !1;
|
|
69
|
-
return B.current = !1, D(null), k(!1), j(null), N(null), F(y), z(!1), (async () => {
|
|
70
|
-
try {
|
|
71
|
-
let t = await l.motionZones?.getOptions({});
|
|
72
|
-
if (e) return;
|
|
73
|
-
if (!t) throw Error("device proxy not ready");
|
|
74
|
-
if (D(t), B.current) return;
|
|
75
|
-
let n = await l.motionZones?.getStatus({});
|
|
76
|
-
if (e) return;
|
|
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 = S(r ? r.shape.cells : [], t.grid.width, t.grid.height);
|
|
80
|
-
N(i), j(T(i, t.grid.width, t.grid.height, y));
|
|
81
|
-
} catch (t) {
|
|
82
|
-
if (e) return;
|
|
83
|
-
s(t) ? k(!0) : console.error("Motion Zones load failed", t);
|
|
84
|
-
}
|
|
85
|
-
})(), () => {
|
|
86
|
-
e = !0;
|
|
87
|
-
};
|
|
88
|
-
}, [l]);
|
|
89
|
-
let V = w ? w.grid.width : 0, H = w ? w.grid.height : 0, U = C(V, P), W = C(H, P), G = i(() => A && w ? E(A, V, H, P) : null, [
|
|
90
|
-
A,
|
|
91
|
-
w,
|
|
92
|
-
V,
|
|
93
|
-
H,
|
|
94
|
-
P
|
|
95
|
-
]), K = i(() => G !== null && M !== null && !re(G, M), [G, M]), q = i(() => G ? G.reduce((e, t) => t ? e + 1 : e, 0) : 0, [G]), J = V * H, Y = U * W, X = t((e) => {
|
|
96
|
-
Y > 0 && j(Array.from({ length: Y }, () => e));
|
|
97
|
-
}, [Y]), ie = t(() => {
|
|
98
|
-
j((e) => e && e.map((e) => !e));
|
|
99
|
-
}, []), Z = t(() => {
|
|
100
|
-
M && w && j(T(M, V, H, P));
|
|
101
|
-
}, [
|
|
102
|
-
M,
|
|
103
|
-
w,
|
|
104
|
-
V,
|
|
105
|
-
H,
|
|
106
|
-
P
|
|
107
|
-
]), ae = t((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;
|
|
112
|
-
});
|
|
113
|
-
}, [
|
|
114
|
-
P,
|
|
115
|
-
w,
|
|
116
|
-
V,
|
|
117
|
-
H
|
|
118
|
-
]), Q = i(() => w && A ? [{
|
|
119
|
-
id: v,
|
|
120
|
-
shape: {
|
|
121
|
-
kind: "grid",
|
|
122
|
-
gridWidth: U,
|
|
123
|
-
gridHeight: W,
|
|
124
|
-
cells: [...A]
|
|
125
|
-
}
|
|
126
|
-
}] : [], [
|
|
127
|
-
w,
|
|
128
|
-
A,
|
|
129
|
-
U,
|
|
130
|
-
W
|
|
131
|
-
]), $ = t((e, t) => {
|
|
132
|
-
t.kind === "grid" && j(t.cells);
|
|
133
|
-
}, []), oe = t(async () => {
|
|
134
|
-
if (!(!l || !A || !w)) {
|
|
135
|
-
L(!0);
|
|
136
|
-
try {
|
|
137
|
-
let e = E(A, w.grid.width, w.grid.height, P), t = {
|
|
138
|
-
kind: "grid",
|
|
139
|
-
gridWidth: w.grid.width,
|
|
140
|
-
gridHeight: w.grid.height,
|
|
141
|
-
cells: e
|
|
142
|
-
};
|
|
143
|
-
await l.motionZones?.setZone({ patch: { regions: [{
|
|
144
|
-
id: v,
|
|
145
|
-
enabled: !0,
|
|
146
|
-
shape: t
|
|
147
|
-
}] } });
|
|
148
|
-
let n = await l.motionZones?.getStatus({});
|
|
149
|
-
if (n) {
|
|
150
|
-
let e = n.regions.find((e) => e.shape.kind === "grid"), t = S(e ? e.shape.cells : [], w.grid.width, w.grid.height);
|
|
151
|
-
N(t), j(T(t, w.grid.width, w.grid.height, P));
|
|
152
|
-
}
|
|
153
|
-
} catch (e) {
|
|
154
|
-
console.error("Motion Zones save failed", e);
|
|
155
|
-
} finally {
|
|
156
|
-
L(!1);
|
|
157
|
-
}
|
|
158
|
-
}
|
|
159
|
-
}, [
|
|
160
|
-
l,
|
|
161
|
-
A,
|
|
162
|
-
w,
|
|
163
|
-
P
|
|
164
|
-
]);
|
|
165
|
-
return f(i(() => R && !O && w && A ? {
|
|
166
|
-
id: _,
|
|
167
|
-
order: te,
|
|
168
|
-
node: /* @__PURE__ */ p(h, {
|
|
169
|
-
transparent: !0,
|
|
170
|
-
items: Q,
|
|
171
|
-
supportedShapes: ["grid"],
|
|
172
|
-
grid: {
|
|
173
|
-
width: U,
|
|
174
|
-
height: W
|
|
175
|
-
},
|
|
176
|
-
selectedId: v,
|
|
177
|
-
onSelect: () => {},
|
|
178
|
-
onShapeChange: $,
|
|
179
|
-
onDrawComplete: () => {},
|
|
180
|
-
drawingKind: null
|
|
181
|
-
})
|
|
182
|
-
} : null, [
|
|
183
|
-
R,
|
|
184
|
-
O,
|
|
185
|
-
w,
|
|
186
|
-
A,
|
|
187
|
-
Q,
|
|
188
|
-
$,
|
|
189
|
-
U,
|
|
190
|
-
W
|
|
191
|
-
])), l ? /* @__PURE__ */ p(d, {
|
|
192
|
-
title: "Motion Zones",
|
|
193
|
-
icon: /* @__PURE__ */ p(g, { className: "h-3.5 w-3.5 text-foreground-subtle" }),
|
|
194
|
-
children: /* @__PURE__ */ p("div", {
|
|
195
|
-
className: "flex flex-col gap-3",
|
|
196
|
-
children: O ? /* @__PURE__ */ p("p", {
|
|
197
|
-
className: `${u} leading-relaxed`,
|
|
198
|
-
children: "This camera doesn't expose an on-board motion zones grid."
|
|
199
|
-
}) : !O && w !== null && A !== null ? /* @__PURE__ */ m(ee, { children: [/* @__PURE__ */ m("p", {
|
|
200
|
-
className: `${u} leading-relaxed`,
|
|
201
|
-
children: [
|
|
202
|
-
"Toggle ",
|
|
203
|
-
/* @__PURE__ */ p("strong", {
|
|
204
|
-
className: "text-foreground",
|
|
205
|
-
children: "Edit grid"
|
|
206
|
-
}),
|
|
207
|
-
" to paint the region directly on the live frame, then ",
|
|
208
|
-
/* @__PURE__ */ p("strong", {
|
|
209
|
-
className: "text-foreground",
|
|
210
|
-
children: "Save"
|
|
211
|
-
}),
|
|
212
|
-
" to push the mask to the camera. Pick a bigger",
|
|
213
|
-
" ",
|
|
214
|
-
/* @__PURE__ */ p("strong", {
|
|
215
|
-
className: "text-foreground",
|
|
216
|
-
children: "Cell size"
|
|
217
|
-
}),
|
|
218
|
-
" for quicker, broad-stroke painting — it's resampled to the camera's native ",
|
|
219
|
-
w.grid.width,
|
|
220
|
-
"×",
|
|
221
|
-
w.grid.height,
|
|
222
|
-
" grid on save (×1 is the finest)."
|
|
223
|
-
]
|
|
224
|
-
}), /* @__PURE__ */ m("div", {
|
|
225
|
-
className: "flex items-center gap-2 flex-wrap",
|
|
226
|
-
children: [
|
|
227
|
-
/* @__PURE__ */ p("button", {
|
|
228
|
-
type: "button",
|
|
229
|
-
onClick: () => z((e) => !e),
|
|
230
|
-
disabled: I,
|
|
231
|
-
"aria-pressed": R,
|
|
232
|
-
className: R ? x : b,
|
|
233
|
-
children: R ? "Done editing" : "Edit grid"
|
|
234
|
-
}),
|
|
235
|
-
/* @__PURE__ */ p("button", {
|
|
236
|
-
type: "button",
|
|
237
|
-
onClick: () => X(!0),
|
|
238
|
-
disabled: I,
|
|
239
|
-
className: b,
|
|
240
|
-
children: "All on"
|
|
241
|
-
}),
|
|
242
|
-
/* @__PURE__ */ p("button", {
|
|
243
|
-
type: "button",
|
|
244
|
-
onClick: () => X(!1),
|
|
245
|
-
disabled: I,
|
|
246
|
-
className: b,
|
|
247
|
-
children: "All off"
|
|
248
|
-
}),
|
|
249
|
-
/* @__PURE__ */ p("button", {
|
|
250
|
-
type: "button",
|
|
251
|
-
onClick: ie,
|
|
252
|
-
disabled: I,
|
|
253
|
-
className: b,
|
|
254
|
-
children: "Invert"
|
|
255
|
-
}),
|
|
256
|
-
/* @__PURE__ */ m("div", {
|
|
257
|
-
className: "flex items-center gap-1 ml-1",
|
|
258
|
-
role: "group",
|
|
259
|
-
"aria-label": "Cell size",
|
|
260
|
-
children: [/* @__PURE__ */ p("span", {
|
|
261
|
-
className: `${u} mr-0.5`,
|
|
262
|
-
children: "Cell size"
|
|
263
|
-
}), ne.map((e) => /* @__PURE__ */ m("button", {
|
|
264
|
-
type: "button",
|
|
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 ? x : b,
|
|
270
|
-
children: ["×", e]
|
|
271
|
-
}, e))]
|
|
272
|
-
}),
|
|
273
|
-
/* @__PURE__ */ m("span", {
|
|
274
|
-
className: `${u} ml-1 tabular-nums`,
|
|
275
|
-
children: [
|
|
276
|
-
q,
|
|
277
|
-
" / ",
|
|
278
|
-
J,
|
|
279
|
-
" cells · ",
|
|
280
|
-
w.grid.width,
|
|
281
|
-
"×",
|
|
282
|
-
w.grid.height,
|
|
283
|
-
P === 1 ? "" : ` · paint ${U}×${W}`
|
|
284
|
-
]
|
|
285
|
-
}),
|
|
286
|
-
/* @__PURE__ */ p("span", { className: "flex-1" }),
|
|
287
|
-
/* @__PURE__ */ p("button", {
|
|
288
|
-
type: "button",
|
|
289
|
-
onClick: Z,
|
|
290
|
-
disabled: I || !K,
|
|
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
|
-
children: "Revert"
|
|
293
|
-
}),
|
|
294
|
-
/* @__PURE__ */ p("button", {
|
|
295
|
-
type: "button",
|
|
296
|
-
onClick: () => void oe(),
|
|
297
|
-
disabled: I || !K,
|
|
298
|
-
className: x,
|
|
299
|
-
children: I ? "Saving…" : "Save"
|
|
300
|
-
})
|
|
301
|
-
]
|
|
302
|
-
})] }) : /* @__PURE__ */ p("p", {
|
|
303
|
-
className: `${u} leading-relaxed`,
|
|
304
|
-
children: "Loading the camera's grid…"
|
|
305
|
-
})
|
|
306
|
-
})
|
|
307
|
-
}) : null;
|
|
308
|
-
}
|
|
309
|
-
//#endregion
|
|
310
|
-
export { D as MotionZonesSettings };
|