@camstack/addon-benchmark 1.2.140 → 1.2.141
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-j0THd_Ad.mjs → MotionZonesSettings-yEjr0atj.mjs} +3 -3
- package/dist/{PrivacyMaskSettings-CrRAoTVY.mjs → PrivacyMaskSettings-Cxsijo16.mjs} +4 -4
- package/dist/{SceneMonitorEditor-C6j9Fu47.mjs → SceneMonitorEditor-hmy5Xiu8.mjs} +3 -3
- package/dist/_stub.js +459 -459
- package/dist/{_virtual_mf-localSharedImportMap___mfe_internal__addon_benchmark_page-DeiZdla6.mjs → _virtual_mf-localSharedImportMap___mfe_internal__addon_benchmark_page-C3xd2-oU.mjs} +3 -3
- package/dist/_virtual_mf___mfe_internal__addon_benchmark_page__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-DotLEH7a.mjs +26 -0
- package/dist/addon-benchmark.css +1 -1
- package/dist/{grid-2x2-BLrTmaY1.mjs → grid-2x2-DJSJcf5j.mjs} +1 -1
- package/dist/{hostInit-BFhy2HV1.mjs → hostInit-Ba4GWv0I.mjs} +2 -2
- package/dist/{player-overlays-CR2lsh-A.mjs → player-overlays-CqejZNxy.mjs} +1 -1
- package/dist/remoteEntry.js +1 -1
- package/dist/{responsive-Y7J7gtG7.mjs → responsive-BZeXybJw.mjs} +1 -1
- package/dist/{scene-monitor-copy-CQCHYNUK.mjs → scene-monitor-copy-BtJBkUb6.mjs} +1 -1
- package/dist/{square-4JrrEHjL.mjs → square-BSdwzJMm.mjs} +1 -1
- package/dist/{trash-2-BEMwnuoe.mjs → trash-2-BeZ3aLiG.mjs} +1 -1
- package/dist/{virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_benchmark_page__remoteEntry_js-DPVPT6jA.mjs → virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_benchmark_page__remoteEntry_js-C2-wMqb1.mjs} +1 -1
- package/package.json +1 -1
- package/dist/_virtual_mf___mfe_internal__addon_benchmark_page__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-9l4Xs4gS.mjs +0 -26
package/dist/_stub.js
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import "./virtualExposes-erbhyesj.mjs";
|
|
2
|
-
import { a as e, i as t, o as n, r } from "./virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_benchmark_page__remoteEntry_js-
|
|
2
|
+
import { a as e, i as t, o as n, r } from "./virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_benchmark_page__remoteEntry_js-C2-wMqb1.mjs";
|
|
3
3
|
import { _ as i, b as a, c as o, d as s, f as c, g as l, h as u, i as d, l as f, m as p, n as m, p as h, r as g, t as _, u as v, v as y, x as b, y as x } from "./_virtual_mf___mfe_internal__addon_benchmark_page__loadShare__react__loadShare__.js-GeuxDuzQ.mjs";
|
|
4
|
-
import { a as S, c as C, i as w, n as T, o as E, r as D, s as O } from "./responsive-
|
|
5
|
-
import { c as k, d as A, f as
|
|
6
|
-
import { a as ne, i as N, n as P, o as re, r as F } from "./player-overlays-
|
|
7
|
-
import { n as I, r as L, t as R } from "./square-
|
|
8
|
-
import { t as z } from "./grid-2x2-
|
|
9
|
-
import { t as ie } from "./trash-2-
|
|
4
|
+
import { a as S, c as C, i as w, n as T, o as E, r as D, s as O } from "./responsive-BZeXybJw.mjs";
|
|
5
|
+
import { c as k, d as A, f as j, l as ee, s as te, u as M } from "./scene-monitor-copy-BtJBkUb6.mjs";
|
|
6
|
+
import { a as ne, i as N, n as P, o as re, r as F } from "./player-overlays-CqejZNxy.mjs";
|
|
7
|
+
import { n as I, r as L, t as R } from "./square-BSdwzJMm.mjs";
|
|
8
|
+
import { t as z } from "./grid-2x2-DJSJcf5j.mjs";
|
|
9
|
+
import { t as ie } from "./trash-2-BeZ3aLiG.mjs";
|
|
10
10
|
import { n as B, t as ae } from "./_virtual_mf___mfe_internal__addon_benchmark_page__loadShare___mf_0_trpc_mf_1_react_mf_2_query__loadShare__.js-Bh7FS7ML.mjs";
|
|
11
11
|
import { i as oe, n as V, r as H, t as U } from "./_virtual_mf___mfe_internal__addon_benchmark_page__loadShare__react_mf_1_jsx_mf_2_runtime__loadShare__.js-SOU_VnTj.mjs";
|
|
12
12
|
import { n as se, t as ce } from "./_virtual_mf___mfe_internal__addon_benchmark_page__loadShare__react_mf_2_dom__loadShare__.js-DQaf3kYb.mjs";
|
|
13
13
|
import { n as le, t as ue } from "./_virtual_mf___mfe_internal__addon_benchmark_page__loadShare___mf_0_tanstack_mf_1_react_mf_2_query__loadShare__.js-lv97RBhq.mjs";
|
|
14
14
|
import { t as de } from "./_virtual_mf___mfe_internal__addon_benchmark_page__loadShare__react_mf_2_dom_mf_1_client__loadShare__.js-DUzuN6aS.mjs";
|
|
15
15
|
import { t as fe } from "./_virtual_mf___mfe_internal__addon_benchmark_page__loadShare___mf_0_trpc_mf_1_client__loadShare__.js-DtWmo0vJ.mjs";
|
|
16
|
-
import { A as pe, C as W, D as G, F as me, I as he, L as ge, M as _e, N as ve, O as ye, P as be, R as xe, S as
|
|
16
|
+
import { A as pe, C as W, D as G, F as me, I as he, L as ge, M as _e, N as ve, O as ye, P as be, R as xe, S as K, T as q, _ as Se, a as Ce, b as we, c as Te, d as Ee, f as De, g as Oe, h as ke, j as Ae, k as je, l as Me, m as Ne, n as Pe, o as Fe, p as Ie, r as Le, s as Re, t as ze, u as Be, v as Ve, w as He, x as Ue, y as We } from "./_virtual_mf___mfe_internal__addon_benchmark_page__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-DotLEH7a.mjs";
|
|
17
17
|
import "./_virtual_mf___mfe_internal__addon_benchmark_page__loadShare___mf_0_camstack_mf_1_sdk__loadShare__.js-BWPcewPF.mjs";
|
|
18
18
|
var Ge = C("activity", [["path", {
|
|
19
19
|
d: "M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",
|
|
@@ -2767,7 +2767,7 @@ J.recording.getDeviceSettingsContribution.useQuery, J.recording.getDeviceLiveCon
|
|
|
2767
2767
|
var _i = J.streamBroker.listAllProfileSlots.useQuery;
|
|
2768
2768
|
J.streamBroker.getBrokerStats.useQuery, J.streamBroker.probeStream.useMutation, J.streamBroker.listClients.useQuery, J.streamBroker.killClient.useMutation, J.streamBroker.restartProfile.useMutation, J.streamBroker.getStreamUrl.useQuery, J.streamBroker.getStreamWithCodec.useMutation, J.streamBroker.releaseStreamWithCodec.useMutation, J.streamBroker.acquireEgressTranscode.useMutation, J.streamBroker.releaseEgressTranscode.useMutation, J.streamBroker.subscribeAudioChunks.useMutation, J.streamBroker.pullAudioChunks.useQuery, J.streamBroker.unsubscribeAudioChunks.useMutation, J.streamBroker.subscribeFrames.useMutation, J.streamBroker.pullFrameHandles.useQuery, J.streamBroker.unsubscribeFrames.useMutation, J.streamBroker.setPreBufferDuration.useMutation, J.streamBroker.getPreBufferInfo.useQuery, J.streamBroker.getRtspPort.useQuery, J.streamBroker.getAllRtspEntries.useQuery, J.streamBroker.getRtspEntry.useQuery, J.streamBroker.regenerateRtspToken.useMutation, J.streamBroker.setRtspEnabled.useMutation, J.streamBroker.isRtspEnabled.useQuery, J.streamBroker.getDeviceAudioMute.useQuery, J.streamBroker.setDeviceAudioMute.useMutation, J.streamBroker.getDeviceSettingsContribution.useQuery, J.streamBroker.getDeviceLiveContribution.useQuery, J.streamBroker.applyDeviceSettingsPatch.useMutation, J.streamCatalog.getCatalog.useQuery, J.streamParams.getOptions.useQuery, J.streamParams.setProfile.useMutation, J.streamParams.getConfigSchema.useQuery, J.streamParams.getStatus.useQuery, J.streamSignals.listSignals.useQuery, J.switch.setState.useMutation, J.switch.getStatus.useQuery, J.system.info.useQuery, J.system.health.useQuery, J.system.featureFlags.useQuery, J.system.networkAddresses.useQuery, J.system.getRetentionConfig.useQuery, J.system.setRetentionConfig.useMutation, J.system.forceRetentionCleanup.useMutation, J.system.getSiteLocation.useQuery, J.system.setSiteLocation.useMutation, J.system.detectSiteLocation.useMutation, J.system.getRequestCensus.useQuery, J.system.getLoadContributions.useQuery, J.system.getFailureContributions.useQuery, J.system.getLoggingSettings.useQuery, J.system.setLoggingSettings.useMutation, J.tamper.getStatus.useQuery, J.temperatureSensor.getStatus.useQuery, J.terminalSession.listProfiles.useQuery, J.terminalSession.listInstances.useQuery, J.terminalSession.createInstance.useMutation, J.terminalSession.updateInstance.useMutation, J.terminalSession.deleteInstance.useMutation, J.terminalSession.setInstanceEnabled.useMutation, J.terminalSession.listLegacyCameras.useQuery, J.terminalSession.adoptLegacyMonitor.useMutation, J.terminalSession.listSessions.useQuery, J.terminalSession.openSession.useMutation, J.terminalSession.resize.useMutation, J.terminalSession.pullOutput.useMutation, J.terminalSession.writeInput.useMutation, J.terminalSession.close.useMutation, J.toast.onToast.useSubscription, J.turnProvider.getTurnServers.useQuery, J.update.installUpdate.useMutation, J.update.getStatus.useQuery, J.userManagement.listUsers.useQuery, J.userManagement.createUser.useMutation, J.userManagement.updateUser.useMutation, J.userManagement.deleteUser.useMutation, J.userManagement.resetPassword.useMutation, J.userManagement.setUserScopes.useMutation, J.userManagement.validateCredentials.useMutation, J.userManagement.listApiKeys.useQuery, J.userManagement.createApiKey.useMutation, J.userManagement.revokeApiKey.useMutation, J.userManagement.validateApiKey.useMutation, J.userManagement.createScopedToken.useMutation, J.userManagement.revokeScopedToken.useMutation, J.userManagement.validateScopedToken.useQuery, J.userManagement.listScopedTokens.useQuery, J.userManagement.setupTotp.useMutation, J.userManagement.confirmTotp.useMutation, J.userManagement.disableTotp.useMutation, J.userManagement.getTotpStatus.useQuery, J.userManagement.verifyTotp.useMutation, J.userManagement.oauthIssueCode.useMutation, J.userManagement.oauthExchangeCode.useMutation, J.userManagement.oauthRefresh.useMutation, J.userManagement.oauthVerifyAccessToken.useQuery, J.userManagement.listOauthSessions.useQuery, J.userManagement.revokeOauthSession.useMutation, J.vacuumControl.start.useMutation, J.vacuumControl.pause.useMutation, J.vacuumControl.stop.useMutation, J.vacuumControl.returnToBase.useMutation, J.vacuumControl.locate.useMutation, J.vacuumControl.setFanSpeed.useMutation, J.vacuumControl.getStatus.useQuery, J.valve.open.useMutation, J.valve.close.useMutation, J.valve.stop.useMutation, J.valve.setPosition.useMutation, J.valve.getStatus.useQuery, J.vibration.getStatus.useQuery;
|
|
2769
2769
|
var vi = J.videoclips.listClips.useQuery, yi = J.videoclips.listSources.useQuery, bi = J.videoclips.getClipPlayback.useQuery;
|
|
2770
|
-
J.videoclips.readClipBytes.useQuery, J.waterHeater.setTargetTemp.useMutation, J.waterHeater.setOperationMode.useMutation, J.waterHeater.setAway.useMutation, J.waterHeater.getStatus.useQuery, J.weather.getStatus.useQuery, J.webrtcSession.listStreams.useQuery, J.webrtcSession.createSession.useMutation, J.webrtcSession.handleOffer.useMutation, J.webrtcSession.handleAnswer.useMutation, J.webrtcSession.addIceCandidate.useMutation, J.webrtcSession.getIceCandidates.useQuery, J.webrtcSession.closeSession.useMutation, J.webrtcSession.hasAdaptiveBitrate.useQuery, J.webrtcSession.getSessionState.useQuery, J.webrtcSession.getSessionDebug.useQuery, J.zoneAnalytics.getCurrentSnapshot.useQuery, J.zoneAnalytics.getCurrentSnapshotBatch.useQuery, J.zoneAnalytics.getZoneHistory.useQuery, J.zoneAnalytics.getCameraHistory.useQuery, J.zoneAnalytics.getUnzonedHistory.useQuery, J.zoneRules.listRules.useQuery, J.zoneRules.setRules.useMutation, J.zones.listZones.useQuery, J.zones.addZone.useMutation, J.zones.removeZone.useMutation, J.zones.updateZone.useMutation;
|
|
2770
|
+
J.videoclips.readClipBytes.useQuery, J.videoclips.dialClipStream.useQuery, J.waterHeater.setTargetTemp.useMutation, J.waterHeater.setOperationMode.useMutation, J.waterHeater.setAway.useMutation, J.waterHeater.getStatus.useQuery, J.weather.getStatus.useQuery, J.webrtcSession.listStreams.useQuery, J.webrtcSession.createSession.useMutation, J.webrtcSession.handleOffer.useMutation, J.webrtcSession.handleAnswer.useMutation, J.webrtcSession.addIceCandidate.useMutation, J.webrtcSession.getIceCandidates.useQuery, J.webrtcSession.closeSession.useMutation, J.webrtcSession.hasAdaptiveBitrate.useQuery, J.webrtcSession.getSessionState.useQuery, J.webrtcSession.getSessionDebug.useQuery, J.zoneAnalytics.getCurrentSnapshot.useQuery, J.zoneAnalytics.getCurrentSnapshotBatch.useQuery, J.zoneAnalytics.getZoneHistory.useQuery, J.zoneAnalytics.getCameraHistory.useQuery, J.zoneAnalytics.getUnzonedHistory.useQuery, J.zoneRules.listRules.useQuery, J.zoneRules.setRules.useMutation, J.zones.listZones.useQuery, J.zones.addZone.useMutation, J.zones.removeZone.useMutation, J.zones.updateZone.useMutation;
|
|
2771
2771
|
//#endregion
|
|
2772
2772
|
//#region ../../node_modules/clsx/dist/clsx.mjs
|
|
2773
2773
|
function xi(e) {
|
|
@@ -3107,14 +3107,14 @@ var Ci = (e, t) => {
|
|
|
3107
3107
|
"baseline",
|
|
3108
3108
|
"center-safe",
|
|
3109
3109
|
"end-safe"
|
|
3110
|
-
],
|
|
3110
|
+
], j = () => [
|
|
3111
3111
|
"start",
|
|
3112
3112
|
"end",
|
|
3113
3113
|
"center",
|
|
3114
3114
|
"stretch",
|
|
3115
3115
|
"center-safe",
|
|
3116
3116
|
"end-safe"
|
|
3117
|
-
],
|
|
3117
|
+
], ee = () => ["auto", ...w()], te = () => [
|
|
3118
3118
|
da,
|
|
3119
3119
|
"auto",
|
|
3120
3120
|
"full",
|
|
@@ -3494,18 +3494,18 @@ var Ci = (e, t) => {
|
|
|
3494
3494
|
"gap-x": [{ "gap-x": w() }],
|
|
3495
3495
|
"gap-y": [{ "gap-y": w() }],
|
|
3496
3496
|
"justify-content": [{ justify: [...A(), "normal"] }],
|
|
3497
|
-
"justify-items": [{ "justify-items": [...
|
|
3498
|
-
"justify-self": [{ "justify-self": ["auto", ...
|
|
3497
|
+
"justify-items": [{ "justify-items": [...j(), "normal"] }],
|
|
3498
|
+
"justify-self": [{ "justify-self": ["auto", ...j()] }],
|
|
3499
3499
|
"align-content": [{ content: ["normal", ...A()] }],
|
|
3500
|
-
"align-items": [{ items: [...
|
|
3500
|
+
"align-items": [{ items: [...j(), { baseline: ["", "last"] }] }],
|
|
3501
3501
|
"align-self": [{ self: [
|
|
3502
3502
|
"auto",
|
|
3503
|
-
...
|
|
3503
|
+
...j(),
|
|
3504
3504
|
{ baseline: ["", "last"] }
|
|
3505
3505
|
] }],
|
|
3506
3506
|
"place-content": [{ "place-content": A() }],
|
|
3507
|
-
"place-items": [{ "place-items": [...
|
|
3508
|
-
"place-self": [{ "place-self": ["auto", ...
|
|
3507
|
+
"place-items": [{ "place-items": [...j(), "baseline"] }],
|
|
3508
|
+
"place-self": [{ "place-self": ["auto", ...j()] }],
|
|
3509
3509
|
p: [{ p: w() }],
|
|
3510
3510
|
px: [{ px: w() }],
|
|
3511
3511
|
py: [{ py: w() }],
|
|
@@ -3517,17 +3517,17 @@ var Ci = (e, t) => {
|
|
|
3517
3517
|
pr: [{ pr: w() }],
|
|
3518
3518
|
pb: [{ pb: w() }],
|
|
3519
3519
|
pl: [{ pl: w() }],
|
|
3520
|
-
m: [{ m:
|
|
3521
|
-
mx: [{ mx:
|
|
3522
|
-
my: [{ my:
|
|
3523
|
-
ms: [{ ms:
|
|
3524
|
-
me: [{ me:
|
|
3525
|
-
mbs: [{ mbs:
|
|
3526
|
-
mbe: [{ mbe:
|
|
3527
|
-
mt: [{ mt:
|
|
3528
|
-
mr: [{ mr:
|
|
3529
|
-
mb: [{ mb:
|
|
3530
|
-
ml: [{ ml:
|
|
3520
|
+
m: [{ m: ee() }],
|
|
3521
|
+
mx: [{ mx: ee() }],
|
|
3522
|
+
my: [{ my: ee() }],
|
|
3523
|
+
ms: [{ ms: ee() }],
|
|
3524
|
+
me: [{ me: ee() }],
|
|
3525
|
+
mbs: [{ mbs: ee() }],
|
|
3526
|
+
mbe: [{ mbe: ee() }],
|
|
3527
|
+
mt: [{ mt: ee() }],
|
|
3528
|
+
mr: [{ mr: ee() }],
|
|
3529
|
+
mb: [{ mb: ee() }],
|
|
3530
|
+
ml: [{ ml: ee() }],
|
|
3531
3531
|
"space-x": [{ "space-x": w() }],
|
|
3532
3532
|
"space-x-reverse": ["space-x-reverse"],
|
|
3533
3533
|
"space-y": [{ "space-y": w() }],
|
|
@@ -4792,19 +4792,19 @@ function Co({ field: e, value: t, onChange: n, disabled: r, translationFn: i })
|
|
|
4792
4792
|
O,
|
|
4793
4793
|
o,
|
|
4794
4794
|
e.suggestLocation
|
|
4795
|
-
]), A = h(() => [...k.suggested, ...k.others], [k]),
|
|
4795
|
+
]), A = h(() => [...k.suggested, ...k.others], [k]), j = (t) => {
|
|
4796
4796
|
if (!_) if (g.includes(t)) n(g.filter((e) => e !== t));
|
|
4797
4797
|
else {
|
|
4798
4798
|
if (e.maxItems !== void 0 && g.length >= e.maxItems) return;
|
|
4799
4799
|
n([...g, t]);
|
|
4800
4800
|
}
|
|
4801
|
-
},
|
|
4801
|
+
}, ee = (e) => {
|
|
4802
4802
|
if (e.key === "ArrowDown") e.preventDefault(), S(!0), w((e) => A.length === 0 ? 0 : (e + 1) % A.length);
|
|
4803
4803
|
else if (e.key === "ArrowUp") e.preventDefault(), S(!0), w((e) => A.length === 0 ? 0 : (e - 1 + A.length) % A.length);
|
|
4804
4804
|
else if (e.key === "Enter") {
|
|
4805
4805
|
e.preventDefault();
|
|
4806
4806
|
let t = A[C];
|
|
4807
|
-
t &&
|
|
4807
|
+
t && j(t.value);
|
|
4808
4808
|
} else e.key === "Escape" ? S(!1) : e.key === "Backspace" && y === "" && g.length > 0 && n(g.slice(0, -1));
|
|
4809
4809
|
}, te = Kd(e.label, i), M = Kd(e.description, i);
|
|
4810
4810
|
return /* @__PURE__ */ H("div", {
|
|
@@ -4825,7 +4825,7 @@ function Co({ field: e, value: t, onChange: n, disabled: r, translationFn: i })
|
|
|
4825
4825
|
type: "button",
|
|
4826
4826
|
className: "shrink-0 hover:text-danger",
|
|
4827
4827
|
"aria-label": `Remove ${e.label}`,
|
|
4828
|
-
onClick: () =>
|
|
4828
|
+
onClick: () => j(e.value),
|
|
4829
4829
|
children: /* @__PURE__ */ V(Gr, { className: "h-2.5 w-2.5" })
|
|
4830
4830
|
})]
|
|
4831
4831
|
}, e.value))
|
|
@@ -4872,7 +4872,7 @@ function Co({ field: e, value: t, onChange: n, disabled: r, translationFn: i })
|
|
|
4872
4872
|
onBlur: () => {
|
|
4873
4873
|
E.current = setTimeout(() => S(!1), 120);
|
|
4874
4874
|
},
|
|
4875
|
-
onKeyDown:
|
|
4875
|
+
onKeyDown: ee
|
|
4876
4876
|
}),
|
|
4877
4877
|
/* @__PURE__ */ V(re, {
|
|
4878
4878
|
className: "h-3.5 w-3.5 shrink-0 cursor-pointer text-foreground-subtle",
|
|
@@ -4908,7 +4908,7 @@ function Co({ field: e, value: t, onChange: n, disabled: r, translationFn: i })
|
|
|
4908
4908
|
i ? "opacity-40 cursor-not-allowed" : "cursor-pointer"
|
|
4909
4909
|
].join(" "),
|
|
4910
4910
|
onMouseEnter: () => w(n),
|
|
4911
|
-
onClick: () =>
|
|
4911
|
+
onClick: () => j(t.value),
|
|
4912
4912
|
children: [/* @__PURE__ */ V("span", {
|
|
4913
4913
|
className: ["flex h-3.5 w-3.5 shrink-0 items-center justify-center rounded border", r ? "border-primary bg-primary text-white" : "border-border"].join(" "),
|
|
4914
4914
|
children: r && /* @__PURE__ */ V(_t, { className: "h-2.5 w-2.5" })
|
|
@@ -5132,7 +5132,7 @@ async function Xo(t, r, i) {
|
|
|
5132
5132
|
if (s) return s;
|
|
5133
5133
|
Ko.has(t) || (Ho(), n([{
|
|
5134
5134
|
name: t,
|
|
5135
|
-
entry:
|
|
5135
|
+
entry: ee(i),
|
|
5136
5136
|
type: "module"
|
|
5137
5137
|
}], { force: !1 }), Ko.add(t));
|
|
5138
5138
|
let c = e(`${t}/${r.startsWith("./") ? r.slice(2) : r}`).then((e) => {
|
|
@@ -6737,7 +6737,7 @@ function wc({ deviceId: e, clip: t, profile: n, onProfileChange: r }) {
|
|
|
6737
6737
|
}), o = a.data, s = `${new Date(t.timeRange.startMs).toLocaleString()} · ${t.source}`;
|
|
6738
6738
|
return v(() => {
|
|
6739
6739
|
o !== void 0 && i.play({
|
|
6740
|
-
url:
|
|
6740
|
+
url: ee(o.playbackUrl),
|
|
6741
6741
|
...o.format === void 0 ? {} : { format: o.format },
|
|
6742
6742
|
label: s
|
|
6743
6743
|
});
|
|
@@ -6783,7 +6783,7 @@ function wc({ deviceId: e, clip: t, profile: n, onProfileChange: r }) {
|
|
|
6783
6783
|
"twin."
|
|
6784
6784
|
] })
|
|
6785
6785
|
}), /* @__PURE__ */ H("a", {
|
|
6786
|
-
href:
|
|
6786
|
+
href: ee(o.playbackUrl),
|
|
6787
6787
|
download: !0,
|
|
6788
6788
|
className: "inline-flex items-center gap-1.5 text-xs font-medium text-primary hover:underline",
|
|
6789
6789
|
children: [/* @__PURE__ */ V(Wt, {
|
|
@@ -6902,9 +6902,9 @@ async function Nc(e, t) {
|
|
|
6902
6902
|
function Pc(e) {
|
|
6903
6903
|
let t = e.headers.get("retry-after"), n = t === null ? NaN : Number(t);
|
|
6904
6904
|
return {
|
|
6905
|
-
code: e.headers.get(
|
|
6906
|
-
reason: e.headers.get(
|
|
6907
|
-
disposition: e.headers.get(
|
|
6905
|
+
code: e.headers.get(Ee) ?? void 0,
|
|
6906
|
+
reason: e.headers.get(De) ?? "no reason given",
|
|
6907
|
+
disposition: e.headers.get(Be) ?? void 0,
|
|
6908
6908
|
retryAfterMs: Number.isFinite(n) && n > 0 ? n * 1e3 : null
|
|
6909
6909
|
};
|
|
6910
6910
|
}
|
|
@@ -6940,7 +6940,7 @@ function Vc(e) {
|
|
|
6940
6940
|
return v(() => {
|
|
6941
6941
|
if (r(null), i === null || typeof fetch != "function") return;
|
|
6942
6942
|
let e = null, t = !1, n, a = async (o) => {
|
|
6943
|
-
let s = await Nc(
|
|
6943
|
+
let s = await Nc(ee(i), fetch);
|
|
6944
6944
|
if (t) return;
|
|
6945
6945
|
if (s.kind === "image") {
|
|
6946
6946
|
e = URL.createObjectURL(s.blob), r({
|
|
@@ -7235,7 +7235,7 @@ function ol({ deviceId: e }) {
|
|
|
7235
7235
|
sources: D,
|
|
7236
7236
|
...k.error ? { clipsError: k.error.message } : {},
|
|
7237
7237
|
...E.error ? { sourcesError: E.error.message } : {}
|
|
7238
|
-
}),
|
|
7238
|
+
}), j = h(() => {
|
|
7239
7239
|
let e = /* @__PURE__ */ new Map();
|
|
7240
7240
|
for (let t of D) {
|
|
7241
7241
|
let n = t.addonId;
|
|
@@ -7251,7 +7251,7 @@ function ol({ deviceId: e }) {
|
|
|
7251
7251
|
v(() => {
|
|
7252
7252
|
d(1);
|
|
7253
7253
|
}, [w.fromMs, w.toMs]);
|
|
7254
|
-
let
|
|
7254
|
+
let ee = (e) => {
|
|
7255
7255
|
n(e), i(Qs(e, Date.now())), o(null);
|
|
7256
7256
|
}, te = (e) => {
|
|
7257
7257
|
i(e), o(null);
|
|
@@ -7311,13 +7311,13 @@ function ol({ deviceId: e }) {
|
|
|
7311
7311
|
className: "w-60",
|
|
7312
7312
|
children: /* @__PURE__ */ V(Gs, {
|
|
7313
7313
|
id: "clips-provider",
|
|
7314
|
-
options:
|
|
7314
|
+
options: j,
|
|
7315
7315
|
value: O,
|
|
7316
|
-
disabled:
|
|
7316
|
+
disabled: j.length < 2,
|
|
7317
7317
|
onChange: (e) => ne(e.target.value)
|
|
7318
7318
|
})
|
|
7319
7319
|
}),
|
|
7320
|
-
|
|
7320
|
+
j.length < 2 ? /* @__PURE__ */ V("span", {
|
|
7321
7321
|
className: "text-[11px] text-foreground-subtle",
|
|
7322
7322
|
children: "This camera is bound to one clip provider today."
|
|
7323
7323
|
}) : null,
|
|
@@ -7336,7 +7336,7 @@ function ol({ deviceId: e }) {
|
|
|
7336
7336
|
}),
|
|
7337
7337
|
/* @__PURE__ */ V(vc, {
|
|
7338
7338
|
day: t,
|
|
7339
|
-
onDayChange:
|
|
7339
|
+
onDayChange: ee,
|
|
7340
7340
|
view: r,
|
|
7341
7341
|
dayBounds: y,
|
|
7342
7342
|
onViewChange: te,
|
|
@@ -7479,7 +7479,7 @@ function ul(e, t, n) {
|
|
|
7479
7479
|
let E = o((e) => x(async () => i?.runAction({ actionId: e })), [i, x]), O = o((e) => x(async () => i?.playSound({ soundId: e })), [i, x]), k = o((e) => x(async () => i?.setLightOn({ on: e })), [i, x]), A = o((e, t) => x(async () => i?.setLightMode(t === void 0 ? { mode: e } : {
|
|
7480
7480
|
mode: e,
|
|
7481
7481
|
level: t
|
|
7482
|
-
})), [i, x]),
|
|
7482
|
+
})), [i, x]), j = o((e) => x(async () => i?.setLightLevel({ level: e })), [i, x]);
|
|
7483
7483
|
return {
|
|
7484
7484
|
features: s,
|
|
7485
7485
|
actions: d,
|
|
@@ -7490,7 +7490,7 @@ function ul(e, t, n) {
|
|
|
7490
7490
|
playSound: O,
|
|
7491
7491
|
setLightOn: k,
|
|
7492
7492
|
setLightMode: A,
|
|
7493
|
-
setLightLevel:
|
|
7493
|
+
setLightLevel: j,
|
|
7494
7494
|
busy: p,
|
|
7495
7495
|
error: h,
|
|
7496
7496
|
driving: _
|
|
@@ -7689,7 +7689,7 @@ function _l({ deviceId: e }) {
|
|
|
7689
7689
|
type: "range",
|
|
7690
7690
|
"aria-label": "Light level",
|
|
7691
7691
|
className: "flex-1",
|
|
7692
|
-
min:
|
|
7692
|
+
min: Ae,
|
|
7693
7693
|
max: pe,
|
|
7694
7694
|
step: 1,
|
|
7695
7695
|
value: s?.lightLevel ?? pe,
|
|
@@ -8045,7 +8045,7 @@ function Sl({ direction: e, icon: t, disabled: n, className: r, variant: i, onMo
|
|
|
8045
8045
|
});
|
|
8046
8046
|
}
|
|
8047
8047
|
function Cl({ controls: e, mode: t = "overlay", showPresets: n, showZoom: r = !0, showHome: i = !0, className: a }) {
|
|
8048
|
-
let { move: s, startContinuous: d, stopContinuous: f, zoom: p, goHome: m, homePreset: h, goToPreset: g, savePreset: _, updatePreset: y, deletePreset: b, presets: x, options: S, busy: C, error: w } = e, T = jo(), [E, D] = l(!1), [O, k] = l(""), A = u(null),
|
|
8048
|
+
let { move: s, startContinuous: d, stopContinuous: f, zoom: p, goHome: m, homePreset: h, goToPreset: g, savePreset: _, updatePreset: y, deletePreset: b, presets: x, options: S, busy: C, error: w } = e, T = jo(), [E, D] = l(!1), [O, k] = l(""), A = u(null), j = u(null), [ee, te] = l(null), M = t === "panel", ne = r && (S?.hasZoom ?? !0), N = S?.supportsPresets ?? x.length > 0, P = (n ?? N) && N, F = M && (S?.supportsPresets ?? !1), I = S?.maxPresets !== void 0 && x.length >= S.maxPresets, L = o(async () => {
|
|
8049
8049
|
let e = O.trim();
|
|
8050
8050
|
!e || C || I || await _(e) !== void 0 && k("");
|
|
8051
8051
|
}, [
|
|
@@ -8086,7 +8086,7 @@ function Cl({ controls: e, mode: t = "overlay", showPresets: n, showZoom: r = !0
|
|
|
8086
8086
|
if (!E) return;
|
|
8087
8087
|
let e = (e) => {
|
|
8088
8088
|
let t = e.target;
|
|
8089
|
-
|
|
8089
|
+
j.current?.contains(t) || A.current?.contains(t) || D(!1);
|
|
8090
8090
|
}, t = (e) => {
|
|
8091
8091
|
e.key === "Escape" && D(!1);
|
|
8092
8092
|
};
|
|
@@ -8196,12 +8196,12 @@ function Cl({ controls: e, mode: t = "overlay", showPresets: n, showZoom: r = !0
|
|
|
8196
8196
|
className: Z("flex items-center gap-1 rounded px-2 text-[10px] disabled:opacity-40", M ? "h-9 text-foreground hover:bg-surface-hover" : "h-7 text-white hover:bg-white/15"),
|
|
8197
8197
|
title: "Presets",
|
|
8198
8198
|
children: ["Presets", /* @__PURE__ */ V(re, { className: Z("h-3 w-3 transition-transform", E && "rotate-180") })]
|
|
8199
|
-
}), E &&
|
|
8200
|
-
ref:
|
|
8199
|
+
}), E && ee && ce(/* @__PURE__ */ H("div", {
|
|
8200
|
+
ref: j,
|
|
8201
8201
|
style: {
|
|
8202
8202
|
position: "fixed",
|
|
8203
|
-
top:
|
|
8204
|
-
right:
|
|
8203
|
+
top: ee.top,
|
|
8204
|
+
right: ee.right,
|
|
8205
8205
|
zIndex: 60
|
|
8206
8206
|
},
|
|
8207
8207
|
className: Z("rounded-lg shadow-xl py-1", F ? "min-w-[220px]" : "min-w-[140px]", M ? "bg-surface border border-border" : "border border-white/30 bg-zinc-900/95 backdrop-blur-md"),
|
|
@@ -8604,7 +8604,7 @@ function zl({ band: e, onChange: t, onRemove: n, sensorContext: r }) {
|
|
|
8604
8604
|
type: "number",
|
|
8605
8605
|
min: 0,
|
|
8606
8606
|
value: e.postBufferSec ?? "",
|
|
8607
|
-
placeholder: String(
|
|
8607
|
+
placeholder: String(Se.postBufferSec),
|
|
8608
8608
|
onChange: (e) => t({ postBufferSec: Rl(e.target.value) }),
|
|
8609
8609
|
className: "w-16 rounded-md border border-border bg-background px-1 py-1 text-xs"
|
|
8610
8610
|
}),
|
|
@@ -8652,11 +8652,11 @@ function Hl({ initial: e, availableProfiles: t, saving: n, onSave: r, sensorCont
|
|
|
8652
8652
|
...f,
|
|
8653
8653
|
...e
|
|
8654
8654
|
}
|
|
8655
|
-
}), m = (e) => e === "" ? void 0 : Number(e), h =
|
|
8655
|
+
}), m = (e) => e === "" ? void 0 : Number(e), h = Ce({
|
|
8656
8656
|
enabled: s || a.length > 0,
|
|
8657
8657
|
bands: a,
|
|
8658
8658
|
deviceDecision: s
|
|
8659
|
-
}), g = i?.deviceSignal, _ = g === "present" || s, v =
|
|
8659
|
+
}), g = i?.deviceSignal, _ = g === "present" || s, v = Ie(t, u.profiles), y = (e) => {
|
|
8660
8660
|
let t = v.includes(e) ? v.filter((t) => t !== e) : [...v, e];
|
|
8661
8661
|
d({
|
|
8662
8662
|
...u,
|
|
@@ -8673,7 +8673,7 @@ function Hl({ initial: e, availableProfiles: t, saving: n, onSave: r, sensorCont
|
|
|
8673
8673
|
}
|
|
8674
8674
|
c(!1), e !== h && o([kl(e)]);
|
|
8675
8675
|
}, x = () => {
|
|
8676
|
-
let e = t.length > 0 ?
|
|
8676
|
+
let e = t.length > 0 ? Ie(t, u.profiles) : u.profiles ? [...u.profiles] : void 0;
|
|
8677
8677
|
r({
|
|
8678
8678
|
enabled: s || a.length > 0,
|
|
8679
8679
|
bands: s ? [] : a,
|
|
@@ -8682,7 +8682,7 @@ function Hl({ initial: e, availableProfiles: t, saving: n, onSave: r, sensorCont
|
|
|
8682
8682
|
segmentSeconds: u.segmentSeconds,
|
|
8683
8683
|
retention: u.retention
|
|
8684
8684
|
});
|
|
8685
|
-
}, S =
|
|
8685
|
+
}, S = Re.filter((e) => t.includes(e));
|
|
8686
8686
|
return /* @__PURE__ */ H("div", {
|
|
8687
8687
|
className: "space-y-4",
|
|
8688
8688
|
children: [
|
|
@@ -9208,10 +9208,10 @@ function pu({ deviceId: e }) {
|
|
|
9208
9208
|
}
|
|
9209
9209
|
}), [g]), T = u(_);
|
|
9210
9210
|
T.current = _;
|
|
9211
|
-
let { state: D, beginScrub: O, updateScrub: k, endScrub: A, seek:
|
|
9211
|
+
let { state: D, beginScrub: O, updateScrub: k, endScrub: A, seek: j, setPlayhead: ee, reset: te } = Zl(w, o(() => T.current === "live", []));
|
|
9212
9212
|
v(() => {
|
|
9213
|
-
y !== null &&
|
|
9214
|
-
}, [y,
|
|
9213
|
+
y !== null && ee(y);
|
|
9214
|
+
}, [y, ee]), v(() => {
|
|
9215
9215
|
(!m.channelOpen || _ === "live") && te();
|
|
9216
9216
|
}, [
|
|
9217
9217
|
m.channelOpen,
|
|
@@ -9314,7 +9314,7 @@ function pu({ deviceId: e }) {
|
|
|
9314
9314
|
ve.data,
|
|
9315
9315
|
ye.data,
|
|
9316
9316
|
F
|
|
9317
|
-
]),
|
|
9317
|
+
]), K = o(async (r, i, a, o, c) => {
|
|
9318
9318
|
d(r), p(null);
|
|
9319
9319
|
try {
|
|
9320
9320
|
let r = await t.trpcClient.recording.getPlaybackManifest.query({
|
|
@@ -9335,11 +9335,11 @@ function pu({ deviceId: e }) {
|
|
|
9335
9335
|
t,
|
|
9336
9336
|
e,
|
|
9337
9337
|
n
|
|
9338
|
-
]),
|
|
9338
|
+
]), q = o((e) => {
|
|
9339
9339
|
let t = Xs(e, pe);
|
|
9340
9340
|
if (!t) return;
|
|
9341
9341
|
if (C.current) {
|
|
9342
|
-
|
|
9342
|
+
j(t.fromMs, "timeline");
|
|
9343
9343
|
return;
|
|
9344
9344
|
}
|
|
9345
9345
|
let n = `Recording · ${new Date(t.fromMs).toLocaleString(void 0, {
|
|
@@ -9348,30 +9348,30 @@ function pu({ deviceId: e }) {
|
|
|
9348
9348
|
hour: "2-digit",
|
|
9349
9349
|
minute: "2-digit"
|
|
9350
9350
|
})}`;
|
|
9351
|
-
|
|
9351
|
+
K(`seek:${t.fromMs}`, t.fromMs, t.toMs, n, t.fromMs);
|
|
9352
9352
|
}, [
|
|
9353
9353
|
pe,
|
|
9354
|
-
|
|
9355
|
-
|
|
9356
|
-
]),
|
|
9354
|
+
K,
|
|
9355
|
+
j
|
|
9356
|
+
]), Se = o(() => {
|
|
9357
9357
|
O("timeline");
|
|
9358
|
-
}, [O]),
|
|
9358
|
+
}, [O]), Ce = o((e) => {
|
|
9359
9359
|
k(e, "timeline");
|
|
9360
|
-
}, [k]),
|
|
9360
|
+
}, [k]), we = o((e) => {
|
|
9361
9361
|
A(Xs(e, pe)?.fromMs ?? e, "timeline");
|
|
9362
|
-
}, [pe, A]),
|
|
9362
|
+
}, [pe, A]), Te = o((e) => {
|
|
9363
9363
|
if (C.current) {
|
|
9364
|
-
|
|
9364
|
+
j(e.timestamp - lu, "timeline");
|
|
9365
9365
|
return;
|
|
9366
9366
|
}
|
|
9367
9367
|
let t = `${e.label} · ${new Date(e.timestamp).toLocaleTimeString(void 0, {
|
|
9368
9368
|
hour: "2-digit",
|
|
9369
9369
|
minute: "2-digit"
|
|
9370
9370
|
})}`;
|
|
9371
|
-
|
|
9372
|
-
}, [
|
|
9371
|
+
K(`${e.kind}:${e.id}`, e.timestamp - lu, e.timestamp + uu, t, e.timestamp);
|
|
9372
|
+
}, [K, j]), Ee = o((e) => {
|
|
9373
9373
|
i((t) => t === e ? null : e);
|
|
9374
|
-
}, []),
|
|
9374
|
+
}, []), De = ue.isLoading, Oe = de.isLoading, ke = (_e.isLoading || ve.isLoading || ye.isLoading) && me, Ae = h(() => ic(ie.fromMs, ie.toMs, 5), [ie.fromMs, ie.toMs]), je = S ? D.scrubbing ? D.scrubEpoch : D.playheadEpoch : a, Me = S && (_ === "playing" || _ === "paused");
|
|
9375
9375
|
return /* @__PURE__ */ H("div", {
|
|
9376
9376
|
className: "space-y-3",
|
|
9377
9377
|
children: [
|
|
@@ -9403,7 +9403,7 @@ function pu({ deviceId: e }) {
|
|
|
9403
9403
|
className: "tabular-nums text-foreground-subtle",
|
|
9404
9404
|
children: new Date(y).toLocaleTimeString()
|
|
9405
9405
|
}) : null,
|
|
9406
|
-
|
|
9406
|
+
Me ? /* @__PURE__ */ H("button", {
|
|
9407
9407
|
type: "button",
|
|
9408
9408
|
"data-testid": "frame-push-rate-toggle",
|
|
9409
9409
|
onClick: ne,
|
|
@@ -9439,19 +9439,19 @@ function pu({ deviceId: e }) {
|
|
|
9439
9439
|
children: [/* @__PURE__ */ V("div", {
|
|
9440
9440
|
className: "text-[10px] font-semibold uppercase tracking-wider text-foreground-subtle",
|
|
9441
9441
|
children: "Recorded"
|
|
9442
|
-
}),
|
|
9442
|
+
}), De ? /* @__PURE__ */ V("div", { className: "h-5 animate-pulse rounded bg-background/40" }) : pe.length === 0 ? /* @__PURE__ */ V(cc, {
|
|
9443
9443
|
icon: Zt,
|
|
9444
9444
|
title: "No recordings for this window."
|
|
9445
9445
|
}) : /* @__PURE__ */ V(eu, {
|
|
9446
9446
|
windowFrom: ie.fromMs,
|
|
9447
9447
|
windowTo: ie.toMs,
|
|
9448
9448
|
spans: pe,
|
|
9449
|
-
playheadMs:
|
|
9450
|
-
onSeek:
|
|
9449
|
+
playheadMs: je,
|
|
9450
|
+
onSeek: q,
|
|
9451
9451
|
...S ? {
|
|
9452
|
-
onScrubStart:
|
|
9453
|
-
onScrubMove:
|
|
9454
|
-
onScrubEnd:
|
|
9452
|
+
onScrubStart: Se,
|
|
9453
|
+
onScrubMove: Ce,
|
|
9454
|
+
onScrubEnd: we
|
|
9455
9455
|
} : {}
|
|
9456
9456
|
})]
|
|
9457
9457
|
}),
|
|
@@ -9460,17 +9460,17 @@ function pu({ deviceId: e }) {
|
|
|
9460
9460
|
children: [/* @__PURE__ */ V("div", {
|
|
9461
9461
|
className: "text-[10px] font-semibold uppercase tracking-wider text-foreground-subtle",
|
|
9462
9462
|
children: "Events · density"
|
|
9463
|
-
}),
|
|
9463
|
+
}), Oe ? /* @__PURE__ */ V("div", { className: "h-6 animate-pulse rounded bg-background/40" }) : /* @__PURE__ */ V(fc, {
|
|
9464
9464
|
windowFrom: ie.fromMs,
|
|
9465
9465
|
windowTo: ie.toMs,
|
|
9466
9466
|
buckets: W,
|
|
9467
9467
|
selectedIndex: r,
|
|
9468
|
-
onSelectBucket:
|
|
9468
|
+
onSelectBucket: Ee
|
|
9469
9469
|
})]
|
|
9470
9470
|
}),
|
|
9471
9471
|
/* @__PURE__ */ V("div", {
|
|
9472
9472
|
className: "relative h-3",
|
|
9473
|
-
children:
|
|
9473
|
+
children: Ae.map((e) => /* @__PURE__ */ V("span", {
|
|
9474
9474
|
className: "absolute -translate-x-1/2 text-[9px] text-foreground-subtle",
|
|
9475
9475
|
style: { left: `${e.pct}%` },
|
|
9476
9476
|
children: e.label
|
|
@@ -9480,9 +9480,9 @@ function pu({ deviceId: e }) {
|
|
|
9480
9480
|
}),
|
|
9481
9481
|
G ? /* @__PURE__ */ V(au, {
|
|
9482
9482
|
clips: be,
|
|
9483
|
-
loading:
|
|
9483
|
+
loading: ke,
|
|
9484
9484
|
busyKey: c,
|
|
9485
|
-
onPlay:
|
|
9485
|
+
onPlay: Te,
|
|
9486
9486
|
enabledKinds: N,
|
|
9487
9487
|
onToggleKind: re,
|
|
9488
9488
|
hasMore: xe,
|
|
@@ -9499,7 +9499,7 @@ function pu({ deviceId: e }) {
|
|
|
9499
9499
|
b();
|
|
9500
9500
|
var mu = 1440 * 60 * 1e3;
|
|
9501
9501
|
function hu({ deviceId: e }) {
|
|
9502
|
-
let t = ue(), n = gi({ deviceId: e }), r = pi({ deviceId: e }), i = ri({ deviceId: e }).data?.location ?? null, a = ii({ deviceId: e }), s = a.status === "pending" ? "pending" : a.status === "error" ? "unknown" : a.data.entries.some((e) => e.capName === "recording-signal") ? "present" : "absent", c = mi(), l = hi(), { data: u } = _i(void 0, { staleTime: 3e4 }), d = h(() =>
|
|
9502
|
+
let t = ue(), n = gi({ deviceId: e }), r = pi({ deviceId: e }), i = ri({ deviceId: e }).data?.location ?? null, a = ii({ deviceId: e }), s = a.status === "pending" ? "pending" : a.status === "error" ? "unknown" : a.data.entries.some((e) => e.capName === "recording-signal") ? "present" : "absent", c = mi(), l = hi(), { data: u } = _i(void 0, { staleTime: 3e4 }), d = h(() => ke(u ?? [], e).map((e) => e.profile), [u, e]), f = (t) => {
|
|
9503
9503
|
c.mutate({
|
|
9504
9504
|
deviceId: e,
|
|
9505
9505
|
config: t
|
|
@@ -9598,8 +9598,8 @@ function hu({ deviceId: e }) {
|
|
|
9598
9598
|
//#region ../ui-library/src/widgets/host-widgets.ts
|
|
9599
9599
|
b();
|
|
9600
9600
|
var gu = {
|
|
9601
|
-
"host/motion-zones-grid": d(() => import("./MotionZonesSettings-
|
|
9602
|
-
"host/privacy-mask-grid": d(() => import("./PrivacyMaskSettings-
|
|
9601
|
+
"host/motion-zones-grid": d(() => import("./MotionZonesSettings-yEjr0atj.mjs").then((e) => ({ default: e.MotionZonesSettings }))),
|
|
9602
|
+
"host/privacy-mask-grid": d(() => import("./PrivacyMaskSettings-Cxsijo16.mjs").then((e) => ({ default: e.PrivacyMaskSettings }))),
|
|
9603
9603
|
"host/ptz-panel": Tl,
|
|
9604
9604
|
"host/navigation-panel": _l,
|
|
9605
9605
|
"host/consumables-panel": Ls,
|
|
@@ -10645,18 +10645,18 @@ function Xu({ value: e, size: t = Yu, className: n, alt: r }) {
|
|
|
10645
10645
|
var Zu = "w-full rounded-md border border-border bg-background px-2.5 py-1.5 text-xs text-foreground focus:border-primary focus:ring-1 focus:ring-primary/30 outline-none disabled:opacity-50 disabled:cursor-not-allowed";
|
|
10646
10646
|
function Qu({ value: e, onChange: t, disabled: n }) {
|
|
10647
10647
|
let r = [];
|
|
10648
|
-
for (let e of
|
|
10648
|
+
for (let e of ze) r.includes(e.region) || r.push(e.region);
|
|
10649
10649
|
return /* @__PURE__ */ H("select", {
|
|
10650
10650
|
className: Zu,
|
|
10651
10651
|
value: e,
|
|
10652
10652
|
disabled: n,
|
|
10653
10653
|
onChange: (e) => t(e.target.value),
|
|
10654
|
-
children: [!
|
|
10654
|
+
children: [!Te(e) && /* @__PURE__ */ V("option", {
|
|
10655
10655
|
value: "",
|
|
10656
10656
|
children: "— Select timezone —"
|
|
10657
10657
|
}), r.map((e) => /* @__PURE__ */ V("optgroup", {
|
|
10658
10658
|
label: e,
|
|
10659
|
-
children:
|
|
10659
|
+
children: ze.filter((t) => t.region === e).map((e) => /* @__PURE__ */ V("option", {
|
|
10660
10660
|
value: e.id,
|
|
10661
10661
|
children: e.label
|
|
10662
10662
|
}, e.id))
|
|
@@ -12354,7 +12354,7 @@ function Qd({ trpc: e, addonId: t, nodeId: n, title: r, disabled: i, onAfterChan
|
|
|
12354
12354
|
f,
|
|
12355
12355
|
JSON.stringify(T)
|
|
12356
12356
|
]);
|
|
12357
|
-
let k = h(() => Xd(p), [p]), A = h(() => p ? Zd(p) : null, [p]),
|
|
12357
|
+
let k = h(() => Xd(p), [p]), A = h(() => p ? Zd(p) : null, [p]), j = async (r) => {
|
|
12358
12358
|
if (f === "override") {
|
|
12359
12359
|
let e = D ?? k, t = {};
|
|
12360
12360
|
for (let n of Object.keys(r)) r[n] !== e[n] && (t[n] = r[n]);
|
|
@@ -12412,7 +12412,7 @@ function Qd({ trpc: e, addonId: t, nodeId: n, title: r, disabled: i, onAfterChan
|
|
|
12412
12412
|
"."
|
|
12413
12413
|
]
|
|
12414
12414
|
});
|
|
12415
|
-
let
|
|
12415
|
+
let ee = f === "override" ? {
|
|
12416
12416
|
...k,
|
|
12417
12417
|
...T
|
|
12418
12418
|
} : k, te = /* @__PURE__ */ H(U, { children: [f === "override" ? /* @__PURE__ */ V("div", {
|
|
@@ -12420,8 +12420,8 @@ function Qd({ trpc: e, addonId: t, nodeId: n, title: r, disabled: i, onAfterChan
|
|
|
12420
12420
|
children: "Benchmark override — applies to this run only. The addon's saved settings are not changed."
|
|
12421
12421
|
}) : null, /* @__PURE__ */ V(Jd, {
|
|
12422
12422
|
schema: A,
|
|
12423
|
-
values:
|
|
12424
|
-
onChange:
|
|
12423
|
+
values: ee,
|
|
12424
|
+
onChange: j,
|
|
12425
12425
|
disabled: i === !0 || x
|
|
12426
12426
|
})] });
|
|
12427
12427
|
return s === !0 ? /* @__PURE__ */ H("section", {
|
|
@@ -12496,7 +12496,7 @@ function ef({ active: e, onClick: t, disabled: n, children: r, title: i }) {
|
|
|
12496
12496
|
});
|
|
12497
12497
|
}
|
|
12498
12498
|
function tf({ catalog: e, value: t, onChange: n, disabled: r }) {
|
|
12499
|
-
let i =
|
|
12499
|
+
let i = Pe(e), a = Fe(e, t), o = i.find((e) => e.family === a?.family)?.family ?? i[0]?.family ?? "", s = i.find((e) => e.family === o) ?? i[0];
|
|
12500
12500
|
if (!s) return null;
|
|
12501
12501
|
let c = s.tiers.find((e) => e.tier === a?.tier)?.tier ?? s.tiers[0]?.tier ?? "", l = s.tiers.find((e) => e.tier === c) ?? s.tiers[0];
|
|
12502
12502
|
if (!l) return null;
|
|
@@ -12507,7 +12507,7 @@ function tf({ catalog: e, value: t, onChange: n, disabled: r }) {
|
|
|
12507
12507
|
let t = l.options.filter((t) => t.resolution === e), r = t.find((e) => e.precision === (a?.precision ?? "fp32") && e.optimization === (a?.optimization ?? "standard")) ?? t[0];
|
|
12508
12508
|
r && n(r.modelId);
|
|
12509
12509
|
}, g = (t) => {
|
|
12510
|
-
let r =
|
|
12510
|
+
let r = Ne(e, {
|
|
12511
12511
|
family: s.family,
|
|
12512
12512
|
tier: l.tier,
|
|
12513
12513
|
precision: t.precision,
|
|
@@ -12629,7 +12629,7 @@ function af({ models: e, value: t, onChange: n, disabled: r }) {
|
|
|
12629
12629
|
r ? r.push(n) : t.set(e, [n]);
|
|
12630
12630
|
}
|
|
12631
12631
|
return t;
|
|
12632
|
-
}, [e]), a = h(() =>
|
|
12632
|
+
}, [e]), a = h(() => je.filter((e) => (i.get(e)?.length ?? 0) > 0), [i]), o = h(() => {
|
|
12633
12633
|
let n = e.find((e) => e.id === t);
|
|
12634
12634
|
return n ? rf(n) : void 0;
|
|
12635
12635
|
}, [e, t]) ?? (a.includes("camstack") ? "camstack" : a[0] ?? "camstack"), [s, c] = l(o);
|
|
@@ -14198,13 +14198,13 @@ function Ip(e, t, n, r) {
|
|
|
14198
14198
|
return r ? qf(i) : i;
|
|
14199
14199
|
}
|
|
14200
14200
|
var Lp = 8e3;
|
|
14201
|
-
function Rp({ serverUrl: e, streamKey: t, label: n, autoPlay: r = !0, muted: i = !0, showControls: a = !0, showStats: s = !1, onDebugStats: c, onPlaybackStats: d, onClientNetworkSample: f, onConnectTiming: p, className: m = "", onStateChange: h, onError: g, onReconnectAttempt: _, overlay: y, createSession: b, sendAnswer: x, handleOffer: S, getIceServers: C, addIceCandidate: w, getIceCandidates: T, closeSession: E, getSessionState: D, getSessionDebug: O, reoffer: k, posterUrl: A, hintsOverride:
|
|
14201
|
+
function Rp({ serverUrl: e, streamKey: t, label: n, autoPlay: r = !0, muted: i = !0, showControls: a = !0, showStats: s = !1, onDebugStats: c, onPlaybackStats: d, onClientNetworkSample: f, onConnectTiming: p, className: m = "", onStateChange: h, onError: g, onReconnectAttempt: _, overlay: y, createSession: b, sendAnswer: x, handleOffer: S, getIceServers: C, addIceCandidate: w, getIceCandidates: T, closeSession: E, getSessionState: D, getSessionDebug: O, reoffer: k, posterUrl: A, hintsOverride: j, onAdaptiveHints: ee, reconnectSignal: te, onControlChannel: M, onVideoElement: ne }) {
|
|
14202
14202
|
let N = u(null), P = u(null), re = u(null), F = u(/* @__PURE__ */ new Set()), I = u(null), L = u(null), R = u(0), z = u(!0), ie = u(M);
|
|
14203
14203
|
ie.current = M;
|
|
14204
14204
|
let B = u(ne);
|
|
14205
14205
|
B.current = ne, v(() => (B.current?.(N.current), () => B.current?.(null)), []);
|
|
14206
|
-
let ae = u(
|
|
14207
|
-
ae.current =
|
|
14206
|
+
let ae = u(ee);
|
|
14207
|
+
ae.current = ee;
|
|
14208
14208
|
let oe = u(null), U = o((e, t, n) => {
|
|
14209
14209
|
let r = ae.current;
|
|
14210
14210
|
if (!r) return;
|
|
@@ -14216,29 +14216,29 @@ function Rp({ serverUrl: e, streamKey: t, label: n, autoPlay: r = !0, muted: i =
|
|
|
14216
14216
|
a !== oe.current && (oe.current = a, r(i));
|
|
14217
14217
|
}, []), se = u(null), ce = u(null), le = u(0), ue = u(!1), de = u(!1), fe = u(async () => {}), [pe, W] = l("idle"), [G, me] = l(""), [he, ge] = l(i), _e = u(he);
|
|
14218
14218
|
_e.current = he;
|
|
14219
|
-
let [ve, ye] = l(!1), [be, xe] = l(!1),
|
|
14220
|
-
(x || b) && (
|
|
14221
|
-
let
|
|
14222
|
-
S && (
|
|
14223
|
-
let
|
|
14219
|
+
let [ve, ye] = l(!1), [be, xe] = l(!1), K = kp(), [q, Se] = l(!0), Ce = u(null), we = u(!1);
|
|
14220
|
+
(x || b) && (we.current = !0);
|
|
14221
|
+
let Te = we.current, Ee = u(!1);
|
|
14222
|
+
S && (Ee.current = !0);
|
|
14223
|
+
let De = Ee.current, [Oe, ke] = l(!1), Ae = u(null), [je, Me] = l(null), [Ne, Pe] = l(!1), Fe = o(() => {
|
|
14224
14224
|
let e = N.current;
|
|
14225
14225
|
if (!(!e || e.readyState < 2 || !e.videoWidth || !e.videoHeight)) try {
|
|
14226
14226
|
let t = document.createElement("canvas");
|
|
14227
14227
|
t.width = e.videoWidth, t.height = e.videoHeight;
|
|
14228
14228
|
let n = t.getContext("2d");
|
|
14229
14229
|
if (!n || (n.drawImage(e, 0, 0), Ap(n, t.width, t.height))) return;
|
|
14230
|
-
|
|
14230
|
+
Ae.current = t.toDataURL("image/jpeg", .6);
|
|
14231
14231
|
} catch {}
|
|
14232
|
-
}, []),
|
|
14233
|
-
W(e), e === "playing" &&
|
|
14234
|
-
}, [h]),
|
|
14232
|
+
}, []), Ie = o((e) => {
|
|
14233
|
+
W(e), e === "playing" && ke(!0), h?.(e);
|
|
14234
|
+
}, [h]), Le = o(() => {
|
|
14235
14235
|
if (I.current?.abort(), I.current = null, L.current &&= (clearTimeout(L.current), null), ce.current &&= (clearTimeout(ce.current), null), se.current = null, de.current = !1, le.current = 0, re.current &&= (re.current.close(), null), E && F.current.size > 0) {
|
|
14236
14236
|
for (let e of F.current) E(e).catch(() => {});
|
|
14237
14237
|
F.current.clear();
|
|
14238
14238
|
}
|
|
14239
|
-
}, [E]),
|
|
14239
|
+
}, [E]), Re = o(() => {
|
|
14240
14240
|
I.current?.abort(), I.current = null, L.current &&= (clearTimeout(L.current), null), ce.current &&= (clearTimeout(ce.current), null), se.current = null, de.current = !1, le.current = 0;
|
|
14241
|
-
}, []),
|
|
14241
|
+
}, []), ze = 1e3, Be = o((e) => {
|
|
14242
14242
|
if (!D || !k) return;
|
|
14243
14243
|
ce.current &&= (clearTimeout(ce.current), null);
|
|
14244
14244
|
let t = async () => {
|
|
@@ -14252,24 +14252,24 @@ function Rp({ serverUrl: e, streamKey: t, label: n, autoPlay: r = !0, muted: i =
|
|
|
14252
14252
|
} catch {}
|
|
14253
14253
|
!z.current || se.current !== e || (ce.current = setTimeout(() => {
|
|
14254
14254
|
t();
|
|
14255
|
-
},
|
|
14255
|
+
}, ze));
|
|
14256
14256
|
}
|
|
14257
14257
|
};
|
|
14258
14258
|
ce.current = setTimeout(() => {
|
|
14259
14259
|
t();
|
|
14260
|
-
},
|
|
14261
|
-
}, [D, k]),
|
|
14260
|
+
}, ze);
|
|
14261
|
+
}, [D, k]), Ve = o(async (t = !1, n = t) => {
|
|
14262
14262
|
if (!z.current || !b || !x) return;
|
|
14263
14263
|
let r = t ? re.current : null, i = t ? new Set(F.current) : null;
|
|
14264
|
-
t ?
|
|
14264
|
+
t ? Re() : Le(), Ie("connecting");
|
|
14265
14265
|
let a = new AbortController();
|
|
14266
14266
|
I.current = a;
|
|
14267
14267
|
try {
|
|
14268
|
-
let o = n ? void 0 : Fp(e), s = Ip(jp(P.current),
|
|
14268
|
+
let o = n ? void 0 : Fp(e), s = Ip(jp(P.current), j, n ? await Fp(e) : void 0, !n);
|
|
14269
14269
|
U(n ? "probe-climb" : "cold-start", s, Pp(e));
|
|
14270
14270
|
let { sessionId: c, sdpOffer: l, iceServers: u } = await b(s);
|
|
14271
14271
|
if (F.current.add(c), o !== void 0 && o.then((e) => {
|
|
14272
|
-
e === void 0 || !Jf(e) || !z.current || a.signal.aborted || ue.current || (ue.current = !0,
|
|
14272
|
+
e === void 0 || !Jf(e) || !z.current || a.signal.aborted || ue.current || (ue.current = !0, Ve(!0, !0));
|
|
14273
14273
|
}), !z.current || a.signal.aborted) {
|
|
14274
14274
|
E?.(c).catch(() => {}), F.current.delete(c);
|
|
14275
14275
|
return;
|
|
@@ -14293,12 +14293,12 @@ function Rp({ serverUrl: e, streamKey: t, label: n, autoPlay: r = !0, muted: i =
|
|
|
14293
14293
|
}, d.oniceconnectionstatechange = () => {
|
|
14294
14294
|
if (!z.current) return;
|
|
14295
14295
|
let e = d.iceConnectionState;
|
|
14296
|
-
if (console.debug("[WebRTC] ICE state:", e), e === "connected" || e === "completed") R.current = 0, t && m(),
|
|
14296
|
+
if (console.debug("[WebRTC] ICE state:", e), e === "connected" || e === "completed") R.current = 0, t && m(), Ie("playing"), N.current?.paused && (console.debug("[WebRTC] video was paused at ICE connected — calling play()"), N.current.play().catch(() => {}));
|
|
14297
14297
|
else if (e === "failed" || e === "disconnected" || e === "closed") {
|
|
14298
14298
|
if (t && !p) try {
|
|
14299
14299
|
d.close();
|
|
14300
14300
|
} catch {}
|
|
14301
|
-
|
|
14301
|
+
Ie("disconnected"), Je();
|
|
14302
14302
|
}
|
|
14303
14303
|
}, d.onicecandidateerror = (e) => {
|
|
14304
14304
|
console.debug("[WebRTC] ICE candidate error:", e);
|
|
@@ -14323,23 +14323,23 @@ function Rp({ serverUrl: e, streamKey: t, label: n, autoPlay: r = !0, muted: i =
|
|
|
14323
14323
|
} catch (e) {
|
|
14324
14324
|
if (!z.current) return;
|
|
14325
14325
|
let t = e instanceof Error ? e.message : String(e);
|
|
14326
|
-
me(t),
|
|
14326
|
+
me(t), Ie("error"), g?.(t), Je();
|
|
14327
14327
|
}
|
|
14328
14328
|
}, [
|
|
14329
14329
|
e,
|
|
14330
14330
|
t,
|
|
14331
14331
|
b,
|
|
14332
14332
|
x,
|
|
14333
|
+
Le,
|
|
14333
14334
|
Re,
|
|
14334
|
-
ze,
|
|
14335
14335
|
E,
|
|
14336
|
-
|
|
14336
|
+
Ie,
|
|
14337
14337
|
g,
|
|
14338
|
-
|
|
14338
|
+
j,
|
|
14339
14339
|
U
|
|
14340
|
-
]),
|
|
14340
|
+
]), He = o(async () => {
|
|
14341
14341
|
if (z.current) {
|
|
14342
|
-
|
|
14342
|
+
Le(), Ie("connecting");
|
|
14343
14343
|
try {
|
|
14344
14344
|
let n = new RTCPeerConnection({ iceServers: [{ urls: "stun:stun.l.google.com:19302" }] });
|
|
14345
14345
|
re.current = n, n.addTransceiver("video", { direction: "recvonly" }), n.addTransceiver("audio", { direction: "recvonly" });
|
|
@@ -14349,7 +14349,7 @@ function Rp({ serverUrl: e, streamKey: t, label: n, autoPlay: r = !0, muted: i =
|
|
|
14349
14349
|
}, n.oniceconnectionstatechange = () => {
|
|
14350
14350
|
if (!z.current) return;
|
|
14351
14351
|
let e = n.iceConnectionState;
|
|
14352
|
-
e === "connected" || e === "completed" ? (R.current = 0,
|
|
14352
|
+
e === "connected" || e === "completed" ? (R.current = 0, Ie("playing"), N.current?.paused && N.current.play().catch(() => {})) : (e === "failed" || e === "disconnected" || e === "closed") && (Ie("disconnected"), Je());
|
|
14353
14353
|
};
|
|
14354
14354
|
let i = await n.createOffer();
|
|
14355
14355
|
if (await n.setLocalDescription(i), await Bp(n), !z.current) return;
|
|
@@ -14367,19 +14367,19 @@ function Rp({ serverUrl: e, streamKey: t, label: n, autoPlay: r = !0, muted: i =
|
|
|
14367
14367
|
} catch (e) {
|
|
14368
14368
|
if (!z.current) return;
|
|
14369
14369
|
let t = e instanceof Error ? e.message : String(e);
|
|
14370
|
-
me(t),
|
|
14370
|
+
me(t), Ie("error"), g?.(t), Je();
|
|
14371
14371
|
}
|
|
14372
14372
|
}
|
|
14373
14373
|
}, [
|
|
14374
14374
|
e,
|
|
14375
14375
|
t,
|
|
14376
|
-
Re,
|
|
14377
14376
|
Le,
|
|
14377
|
+
Ie,
|
|
14378
14378
|
g
|
|
14379
|
-
]),
|
|
14379
|
+
]), Ue = o(async (n = !1, r = n) => {
|
|
14380
14380
|
if (!z.current || !S) return;
|
|
14381
14381
|
let i = n ? re.current : null, a = n ? new Set(F.current) : null;
|
|
14382
|
-
n ?
|
|
14382
|
+
n ? Re() : Le(), Ie("connecting");
|
|
14383
14383
|
let o = new AbortController();
|
|
14384
14384
|
I.current = o;
|
|
14385
14385
|
let s = performance.now(), c = () => Math.round(performance.now() - s), l = {};
|
|
@@ -14428,12 +14428,12 @@ function Rp({ serverUrl: e, streamKey: t, label: n, autoPlay: r = !0, muted: i =
|
|
|
14428
14428
|
}), qe.current("no decoded frame after connect"), Je());
|
|
14429
14429
|
}, Lp));
|
|
14430
14430
|
}
|
|
14431
|
-
R.current = 0, n && h(),
|
|
14431
|
+
R.current = 0, n && h(), Ie("playing"), N.current?.paused && N.current.play().catch(() => {});
|
|
14432
14432
|
} else if (e === "failed" || e === "disconnected" || e === "closed") {
|
|
14433
14433
|
if (n && !m) try {
|
|
14434
14434
|
d.close();
|
|
14435
14435
|
} catch {}
|
|
14436
|
-
|
|
14436
|
+
Ie("disconnected"), Je();
|
|
14437
14437
|
}
|
|
14438
14438
|
};
|
|
14439
14439
|
let _ = null, v = [];
|
|
@@ -14447,11 +14447,11 @@ function Rp({ serverUrl: e, streamKey: t, label: n, autoPlay: r = !0, muted: i =
|
|
|
14447
14447
|
}
|
|
14448
14448
|
let y = await d.createOffer();
|
|
14449
14449
|
if (l.offerCreatedMs = c(), await d.setLocalDescription(y), l.localSetMs = c(), !z.current || o.signal.aborted) return;
|
|
14450
|
-
let b = r ? await Fp(e) : void 0, x = Ip(jp(P.current),
|
|
14450
|
+
let b = r ? await Fp(e) : void 0, x = Ip(jp(P.current), j, b, !r);
|
|
14451
14451
|
U(r ? "probe-climb" : "cold-start", x, Pp(e));
|
|
14452
14452
|
let D = c(), { sessionId: O, sdpAnswer: k } = await S(d.localDescription?.sdp ?? y.sdp ?? "", void 0, x);
|
|
14453
14453
|
if (l.signalingRttMs = c() - D, _ = O, F.current.add(O), s !== void 0 && s.then((e) => {
|
|
14454
|
-
e === void 0 || !Jf(e) || !z.current || o.signal.aborted || ue.current || (ue.current = !0,
|
|
14454
|
+
e === void 0 || !Jf(e) || !z.current || o.signal.aborted || ue.current || (ue.current = !0, Ue(!0, !0));
|
|
14455
14455
|
}), se.current = O, !z.current || o.signal.aborted) {
|
|
14456
14456
|
E?.(O).catch(() => {}), F.current.delete(O);
|
|
14457
14457
|
return;
|
|
@@ -14479,11 +14479,11 @@ function Rp({ serverUrl: e, streamKey: t, label: n, autoPlay: r = !0, muted: i =
|
|
|
14479
14479
|
};
|
|
14480
14480
|
n();
|
|
14481
14481
|
}
|
|
14482
|
-
|
|
14482
|
+
Be(O);
|
|
14483
14483
|
} catch (e) {
|
|
14484
14484
|
if (!z.current) return;
|
|
14485
14485
|
let t = e instanceof Error ? e.message : String(e);
|
|
14486
|
-
me(t),
|
|
14486
|
+
me(t), Ie("error"), g?.(t), Je();
|
|
14487
14487
|
}
|
|
14488
14488
|
}, [
|
|
14489
14489
|
e,
|
|
@@ -14492,12 +14492,12 @@ function Rp({ serverUrl: e, streamKey: t, label: n, autoPlay: r = !0, muted: i =
|
|
|
14492
14492
|
w,
|
|
14493
14493
|
T,
|
|
14494
14494
|
E,
|
|
14495
|
-
Re,
|
|
14496
|
-
ze,
|
|
14497
14495
|
Le,
|
|
14496
|
+
Re,
|
|
14497
|
+
Ie,
|
|
14498
14498
|
g,
|
|
14499
|
-
|
|
14500
|
-
|
|
14499
|
+
Be,
|
|
14500
|
+
j,
|
|
14501
14501
|
U
|
|
14502
14502
|
]);
|
|
14503
14503
|
fe.current = o(async (t, n) => {
|
|
@@ -14540,7 +14540,7 @@ function Rp({ serverUrl: e, streamKey: t, label: n, autoPlay: r = !0, muted: i =
|
|
|
14540
14540
|
}, o.oniceconnectionstatechange = () => {
|
|
14541
14541
|
if (!z.current) return;
|
|
14542
14542
|
let e = o.iceConnectionState;
|
|
14543
|
-
console.debug("[WebRTC] ICE state (reoffer):", e), e === "connected" || e === "completed" ? (R.current = 0, h(),
|
|
14543
|
+
console.debug("[WebRTC] ICE state (reoffer):", e), e === "connected" || e === "completed" ? (R.current = 0, h(), Ie("playing"), N.current?.paused && N.current.play().catch(() => {})) : (e === "failed" || e === "closed") && (p(), !c && e === "failed" && o.close(), Ie("disconnected"), Je());
|
|
14544
14544
|
};
|
|
14545
14545
|
let g = null, _ = [];
|
|
14546
14546
|
if (o.onicecandidate = (e) => {
|
|
@@ -14559,7 +14559,7 @@ function Rp({ serverUrl: e, streamKey: t, label: n, autoPlay: r = !0, muted: i =
|
|
|
14559
14559
|
let y = await Fp(e), b = {
|
|
14560
14560
|
...jp(P.current),
|
|
14561
14561
|
...y === void 0 ? {} : { downlinkMbps: y },
|
|
14562
|
-
...
|
|
14562
|
+
...j
|
|
14563
14563
|
};
|
|
14564
14564
|
U("renegotiate", b, Pp(e));
|
|
14565
14565
|
let { sessionId: x, sdpAnswer: S } = await r(t, o.localDescription?.sdp ?? v.sdp ?? "", n, b);
|
|
@@ -14590,9 +14590,9 @@ function Rp({ serverUrl: e, streamKey: t, label: n, autoPlay: r = !0, muted: i =
|
|
|
14590
14590
|
};
|
|
14591
14591
|
n();
|
|
14592
14592
|
}
|
|
14593
|
-
|
|
14593
|
+
Be(x);
|
|
14594
14594
|
} catch (e) {
|
|
14595
|
-
console.debug("[WebRTC] reoffer failed; keeping last frame, re-arming poll", e instanceof Error ? e.message : String(e)),
|
|
14595
|
+
console.debug("[WebRTC] reoffer failed; keeping last frame, re-arming poll", e instanceof Error ? e.message : String(e)), Be(t);
|
|
14596
14596
|
} finally {
|
|
14597
14597
|
de.current = !1;
|
|
14598
14598
|
}
|
|
@@ -14602,19 +14602,19 @@ function Rp({ serverUrl: e, streamKey: t, label: n, autoPlay: r = !0, muted: i =
|
|
|
14602
14602
|
C,
|
|
14603
14603
|
w,
|
|
14604
14604
|
T,
|
|
14605
|
-
|
|
14606
|
-
|
|
14607
|
-
|
|
14605
|
+
Ie,
|
|
14606
|
+
Be,
|
|
14607
|
+
j,
|
|
14608
14608
|
U
|
|
14609
14609
|
]);
|
|
14610
|
-
let We =
|
|
14610
|
+
let We = De ? Ue : Te ? Ve : He, Ge = u(() => {}), Ke = u(_);
|
|
14611
14611
|
Ke.current = _;
|
|
14612
14612
|
let qe = u(() => {});
|
|
14613
14613
|
qe.current = (e) => {
|
|
14614
14614
|
console.warn("[WebRTC] hard error", {
|
|
14615
14615
|
streamKey: t,
|
|
14616
14616
|
msg: e
|
|
14617
|
-
}), me(e), g?.(e),
|
|
14617
|
+
}), me(e), g?.(e), Ie("error");
|
|
14618
14618
|
}, Ge.current = We;
|
|
14619
14619
|
let Je = o(() => {
|
|
14620
14620
|
if (!z.current) return;
|
|
@@ -14628,22 +14628,22 @@ function Rp({ serverUrl: e, streamKey: t, label: n, autoPlay: r = !0, muted: i =
|
|
|
14628
14628
|
}, t.delayMs);
|
|
14629
14629
|
}, []);
|
|
14630
14630
|
v(() => (z.current = !0, R.current = 0, r && We(), () => {
|
|
14631
|
-
z.current = !1,
|
|
14631
|
+
z.current = !1, Le();
|
|
14632
14632
|
}), []);
|
|
14633
14633
|
let Ye = u(!1);
|
|
14634
14634
|
v(() => {
|
|
14635
14635
|
if (r) {
|
|
14636
|
-
if (
|
|
14636
|
+
if (De) {
|
|
14637
14637
|
if (!S) return;
|
|
14638
|
-
} else if (
|
|
14638
|
+
} else if (Te) {
|
|
14639
14639
|
if (!b || !x) return;
|
|
14640
14640
|
} else return;
|
|
14641
14641
|
Ye.current || re.current || (Ye.current = !0, We());
|
|
14642
14642
|
}
|
|
14643
14643
|
}, [
|
|
14644
14644
|
r,
|
|
14645
|
-
|
|
14646
|
-
|
|
14645
|
+
De,
|
|
14646
|
+
Te,
|
|
14647
14647
|
S,
|
|
14648
14648
|
b,
|
|
14649
14649
|
x,
|
|
@@ -14652,12 +14652,12 @@ function Rp({ serverUrl: e, streamKey: t, label: n, autoPlay: r = !0, muted: i =
|
|
|
14652
14652
|
let Xe = () => {
|
|
14653
14653
|
R.current = 0, We();
|
|
14654
14654
|
}, Ze = () => {
|
|
14655
|
-
if (R.current = 0, re.current &&
|
|
14656
|
-
|
|
14655
|
+
if (R.current = 0, re.current && De) {
|
|
14656
|
+
Ue(!0);
|
|
14657
14657
|
return;
|
|
14658
14658
|
}
|
|
14659
|
-
if (re.current &&
|
|
14660
|
-
|
|
14659
|
+
if (re.current && Te) {
|
|
14660
|
+
Ve(!0);
|
|
14661
14661
|
return;
|
|
14662
14662
|
}
|
|
14663
14663
|
We();
|
|
@@ -14666,7 +14666,7 @@ function Rp({ serverUrl: e, streamKey: t, label: n, autoPlay: r = !0, muted: i =
|
|
|
14666
14666
|
let n = Qe.current !== e, r = $e.current !== t;
|
|
14667
14667
|
if (Qe.current = e, $e.current = t, !(!n && !r) && z.current) {
|
|
14668
14668
|
if (R.current = 0, ue.current = !1, n) {
|
|
14669
|
-
|
|
14669
|
+
Le(), We();
|
|
14670
14670
|
return;
|
|
14671
14671
|
}
|
|
14672
14672
|
Ze();
|
|
@@ -14893,30 +14893,30 @@ function Rp({ serverUrl: e, streamKey: t, label: n, autoPlay: r = !0, muted: i =
|
|
|
14893
14893
|
e && (Op(e, i), i || e.play().catch(() => {}));
|
|
14894
14894
|
}, [i]);
|
|
14895
14895
|
let bt = () => {
|
|
14896
|
-
|
|
14896
|
+
K || (Se(!0), Ce.current && clearTimeout(Ce.current), Ce.current = setTimeout(() => Se(!1), 3e3));
|
|
14897
14897
|
}, xt = () => {
|
|
14898
|
-
|
|
14898
|
+
Se((e) => !e), Ce.current && clearTimeout(Ce.current);
|
|
14899
14899
|
};
|
|
14900
14900
|
v(() => {
|
|
14901
14901
|
if (pe === "playing") {
|
|
14902
|
-
|
|
14903
|
-
let e = setInterval(
|
|
14902
|
+
Fe();
|
|
14903
|
+
let e = setInterval(Fe, 2e3);
|
|
14904
14904
|
return () => clearInterval(e);
|
|
14905
14905
|
}
|
|
14906
|
-
|
|
14906
|
+
Oe && Ae.current && Me(Ae.current);
|
|
14907
14907
|
}, [
|
|
14908
14908
|
pe,
|
|
14909
|
-
|
|
14910
|
-
|
|
14909
|
+
Oe,
|
|
14910
|
+
Fe
|
|
14911
14911
|
]), v(() => {
|
|
14912
14912
|
if (pe !== "playing") {
|
|
14913
|
-
|
|
14913
|
+
Pe(!1);
|
|
14914
14914
|
return;
|
|
14915
14915
|
}
|
|
14916
14916
|
let e = N.current;
|
|
14917
14917
|
if (!e) return;
|
|
14918
14918
|
let t = !1, n = () => {
|
|
14919
|
-
t ||
|
|
14919
|
+
t || Pe(!0);
|
|
14920
14920
|
}, r;
|
|
14921
14921
|
typeof e.requestVideoFrameCallback == "function" && (r = e.requestVideoFrameCallback(() => n())), e.addEventListener("loadeddata", n, { once: !0 });
|
|
14922
14922
|
let i = setTimeout(n, 12e3);
|
|
@@ -14924,7 +14924,7 @@ function Rp({ serverUrl: e, streamKey: t, label: n, autoPlay: r = !0, muted: i =
|
|
|
14924
14924
|
t = !0, clearTimeout(i), r !== void 0 && typeof e.cancelVideoFrameCallback == "function" && e.cancelVideoFrameCallback(r), e.removeEventListener("loadeddata", n);
|
|
14925
14925
|
};
|
|
14926
14926
|
}, [pe]);
|
|
14927
|
-
let St =
|
|
14927
|
+
let St = Oe && je ? je : A ?? null, Ct = !Ne && St !== null;
|
|
14928
14928
|
return /* @__PURE__ */ H("div", {
|
|
14929
14929
|
ref: P,
|
|
14930
14930
|
className: `relative isolate bg-black overflow-hidden group ${m}`,
|
|
@@ -15039,7 +15039,7 @@ function Rp({ serverUrl: e, streamKey: t, label: n, autoPlay: r = !0, muted: i =
|
|
|
15039
15039
|
})
|
|
15040
15040
|
}),
|
|
15041
15041
|
a && pe !== "idle" && pe !== "error" && /* @__PURE__ */ H("div", {
|
|
15042
|
-
className: `absolute bottom-0 inset-x-0 z-20 transform-gpu flex items-center justify-between px-3 py-1.5 bg-gradient-to-t from-black/80 to-transparent transition-opacity duration-200 ${
|
|
15042
|
+
className: `absolute bottom-0 inset-x-0 z-20 transform-gpu flex items-center justify-between px-3 py-1.5 bg-gradient-to-t from-black/80 to-transparent transition-opacity duration-200 ${K || q ? "opacity-100 pointer-events-auto" : "opacity-0 pointer-events-none"}`,
|
|
15043
15043
|
children: [/* @__PURE__ */ V("div", {
|
|
15044
15044
|
className: "flex items-center gap-1",
|
|
15045
15045
|
children: /* @__PURE__ */ V(zp, {
|
|
@@ -15168,15 +15168,15 @@ async function Bp(e) {
|
|
|
15168
15168
|
});
|
|
15169
15169
|
}
|
|
15170
15170
|
//#endregion
|
|
15171
|
-
//#region ../ui-library/src/composites/data-table.
|
|
15172
|
-
b(), b(), b(), b();
|
|
15171
|
+
//#region ../ui-library/src/composites/use-data-table-filter.ts
|
|
15172
|
+
b(), b(), b(), b(), b();
|
|
15173
15173
|
//#endregion
|
|
15174
15174
|
//#region ../ui-library/src/composites/detection-colors.ts
|
|
15175
15175
|
var Vp = {
|
|
15176
15176
|
face: "#a855f7",
|
|
15177
15177
|
plate: "#ec4899"
|
|
15178
15178
|
}, Hp = Object.freeze({
|
|
15179
|
-
...Object.fromEntries(Object.values(
|
|
15179
|
+
...Object.fromEntries(Object.values(He).filter((e) => e.category === "detection" || e.kind === "motion").map((e) => [e.kind, e.color])),
|
|
15180
15180
|
...Vp
|
|
15181
15181
|
}), Up = [
|
|
15182
15182
|
"#ef4444",
|
|
@@ -15189,11 +15189,11 @@ var Vp = {
|
|
|
15189
15189
|
"#0891b2",
|
|
15190
15190
|
"#7c3aed",
|
|
15191
15191
|
"#059669"
|
|
15192
|
-
], Wp =
|
|
15192
|
+
], Wp = Ve;
|
|
15193
15193
|
function Gp(e, t) {
|
|
15194
15194
|
if (t?.[e]) return t[e];
|
|
15195
15195
|
if (t?.[e.toLowerCase()]) return t[e.toLowerCase()];
|
|
15196
|
-
let n =
|
|
15196
|
+
let n = He[e] ?? He[e.toLowerCase()];
|
|
15197
15197
|
if (n !== void 0) return n.color;
|
|
15198
15198
|
if (Hp[e]) return Hp[e];
|
|
15199
15199
|
if (Hp[e.toLowerCase()]) return Hp[e.toLowerCase()];
|
|
@@ -15505,7 +15505,7 @@ function im({ boxes: e }) {
|
|
|
15505
15505
|
children: [
|
|
15506
15506
|
e.label ?? e.className,
|
|
15507
15507
|
" · ",
|
|
15508
|
-
|
|
15508
|
+
Me(t - e.becameStationaryAt)
|
|
15509
15509
|
]
|
|
15510
15510
|
})
|
|
15511
15511
|
}, e.id);
|
|
@@ -16311,25 +16311,25 @@ function Oh(e, t) {
|
|
|
16311
16311
|
return t ? (Th[e] ?? 0) >= (Th[t] ?? 0) : !0;
|
|
16312
16312
|
}
|
|
16313
16313
|
function kh({ agentId: e, addonId: t, deviceId: n, containerDeviceId: r, integrationId: i, requestId: a, level: s, maxHeight: d = "max-h-96", showScope: f = !1, showDeviceChip: p = !1, showFilters: m = !0, limit: g = 100, liveBuffer: _, onClose: y, className: b }) {
|
|
16314
|
-
let [x, S] = l(""), [C, w] = l(""), [T, E] = l(s ?? "info"), D = e, O = t ?? (x || void 0), k = n ?? (C ? Number(C) : void 0), A = i,
|
|
16314
|
+
let [x, S] = l(""), [C, w] = l(""), [T, E] = l(s ?? "info"), D = e, O = t ?? (x || void 0), k = n ?? (C ? Number(C) : void 0), A = i, j = a, ee = h(() => {
|
|
16315
16315
|
let e = {};
|
|
16316
|
-
return D && (e.agentId = D), O && (e.addonId = O), r !== void 0 && Number.isFinite(r) ? e.containerDeviceId = r : k !== void 0 && Number.isFinite(k) && (e.deviceId = k), A && (e.integrationId = A),
|
|
16316
|
+
return D && (e.agentId = D), O && (e.addonId = O), r !== void 0 && Number.isFinite(r) ? e.containerDeviceId = r : k !== void 0 && Number.isFinite(k) && (e.deviceId = k), A && (e.integrationId = A), j && (e.requestId = j), Object.keys(e).length > 0 ? e : void 0;
|
|
16317
16317
|
}, [
|
|
16318
16318
|
D,
|
|
16319
16319
|
O,
|
|
16320
16320
|
k,
|
|
16321
16321
|
r,
|
|
16322
16322
|
A,
|
|
16323
|
-
|
|
16324
|
-
]), te = xh(Dh), M = _ ?? te, N = M.entries, [P, F] = l(0), [I, L] = l(!0), R = u(!1), [z, B] = l(!1), [ae, oe] = l(!1), [U, se] = l(/* @__PURE__ */ new Set()), [ce, le] = l(""), ue = u(null), de = `${D ?? ""}:${O ?? ""}:${String(k ?? "")}:${String(r ?? "")}:${A ?? ""}:${
|
|
16323
|
+
j
|
|
16324
|
+
]), te = xh(Dh), M = _ ?? te, N = M.entries, [P, F] = l(0), [I, L] = l(!0), R = u(!1), [z, B] = l(!1), [ae, oe] = l(!1), [U, se] = l(/* @__PURE__ */ new Set()), [ce, le] = l(""), ue = u(null), de = `${D ?? ""}:${O ?? ""}:${String(k ?? "")}:${String(r ?? "")}:${A ?? ""}:${j ?? ""}`, fe = u(de);
|
|
16325
16325
|
v(() => {
|
|
16326
16326
|
fe.current !== de && (fe.current = de, M.reset(), F(0), se(/* @__PURE__ */ new Set()), B(!1));
|
|
16327
16327
|
}, [de, M]);
|
|
16328
16328
|
let { data: pe, isLoading: W } = J.logs.query.useQuery({
|
|
16329
|
-
...
|
|
16329
|
+
...ee ? { tags: ee } : {},
|
|
16330
16330
|
limit: g
|
|
16331
16331
|
}, { staleTime: 3e4 });
|
|
16332
|
-
J.logs.subscribe.useSubscription(
|
|
16332
|
+
J.logs.subscribe.useSubscription(ee ? { tags: ee } : {}, { onData: (e) => {
|
|
16333
16333
|
M.append(e);
|
|
16334
16334
|
} });
|
|
16335
16335
|
let G = h(() => {
|
|
@@ -16390,7 +16390,7 @@ function kh({ agentId: e, addonId: t, deviceId: n, containerDeviceId: r, integra
|
|
|
16390
16390
|
L((e) => e === t ? e : t);
|
|
16391
16391
|
}, []), be = h(() => G.filter((e) => e.tags && Object.keys(e.tags).length > 0 || e.meta && Object.keys(e.meta).length > 0).map((e) => `${e.timestamp}|${e.level}|${e.scope ?? ""}|${e.message}`), [G]), xe = o(() => {
|
|
16392
16392
|
B((e) => (e && se(/* @__PURE__ */ new Set()), !e));
|
|
16393
|
-
}, []),
|
|
16393
|
+
}, []), K = o(() => {
|
|
16394
16394
|
let e = G.map((e) => {
|
|
16395
16395
|
let t = new Date(e.timestamp).toLocaleTimeString(), n = e.tags ? " " + Object.entries(e.tags).filter(([, e]) => e).map(([e, t]) => `${e}=${t}`).join(" ") : "";
|
|
16396
16396
|
return `${t} [${e.level.toUpperCase()}]${e.scope ? ` [${e.scope}]` : ""}${n} ${e.message}`;
|
|
@@ -16398,23 +16398,23 @@ function kh({ agentId: e, addonId: t, deviceId: n, containerDeviceId: r, integra
|
|
|
16398
16398
|
navigator.clipboard.writeText(e.join("\n")).then(() => {
|
|
16399
16399
|
oe(!0), setTimeout(() => oe(!1), 1500);
|
|
16400
16400
|
});
|
|
16401
|
-
}, [G]),
|
|
16402
|
-
F(Date.now()), M.reset(),
|
|
16401
|
+
}, [G]), q = J.logs.clear.useMutation(), Se = o(() => {
|
|
16402
|
+
F(Date.now()), M.reset(), q.mutate(ee ? { tags: ee } : {});
|
|
16403
16403
|
}, [
|
|
16404
16404
|
M,
|
|
16405
|
-
|
|
16406
|
-
|
|
16407
|
-
]),
|
|
16405
|
+
q,
|
|
16406
|
+
ee
|
|
16407
|
+
]), Ce = o((e) => {
|
|
16408
16408
|
se((t) => {
|
|
16409
16409
|
let n = new Set(t);
|
|
16410
16410
|
return n.has(e) ? n.delete(e) : n.add(e), n;
|
|
16411
16411
|
});
|
|
16412
|
-
}, []), [
|
|
16412
|
+
}, []), [we, Te] = l(null), Ee = o((e, t) => {
|
|
16413
16413
|
let n = new Date(e.timestamp).toISOString(), r = e.tags ? " " + Object.entries(e.tags).filter(([, e]) => e).map(([e, t]) => `${e}=${t}`).join(" ") : "", i = e.meta && Object.keys(e.meta).length > 0 ? ` meta=${JSON.stringify(e.meta)}` : "", a = `${n} [${e.level.toUpperCase()}]${e.scope ? ` [${e.scope}]` : ""}${r} ${e.message}${i}`;
|
|
16414
16414
|
navigator.clipboard.writeText(a).then(() => {
|
|
16415
|
-
|
|
16415
|
+
Te(t), setTimeout(() => Te((e) => e === t ? null : e), 1200);
|
|
16416
16416
|
});
|
|
16417
|
-
}, []),
|
|
16417
|
+
}, []), De = o((e) => `${e.timestamp}|${e.level}|${e.scope ?? ""}|${e.message}`, []);
|
|
16418
16418
|
return /* @__PURE__ */ H("div", {
|
|
16419
16419
|
className: Z("h-full min-h-0 flex flex-col", b),
|
|
16420
16420
|
onClick: (e) => e.stopPropagation(),
|
|
@@ -16467,13 +16467,13 @@ function kh({ agentId: e, addonId: t, deviceId: n, containerDeviceId: r, integra
|
|
|
16467
16467
|
/* @__PURE__ */ V(Nh, {
|
|
16468
16468
|
icon: Rt,
|
|
16469
16469
|
label: ae ? "Copied!" : "Copy",
|
|
16470
|
-
onClick:
|
|
16470
|
+
onClick: K,
|
|
16471
16471
|
disabled: G.length === 0
|
|
16472
16472
|
}),
|
|
16473
16473
|
/* @__PURE__ */ V(Nh, {
|
|
16474
16474
|
icon: ie,
|
|
16475
16475
|
label: "Clear",
|
|
16476
|
-
onClick:
|
|
16476
|
+
onClick: Se
|
|
16477
16477
|
}),
|
|
16478
16478
|
/* @__PURE__ */ H("div", {
|
|
16479
16479
|
className: "relative",
|
|
@@ -16560,10 +16560,10 @@ function kh({ agentId: e, addonId: t, deviceId: n, containerDeviceId: r, integra
|
|
|
16560
16560
|
G.length > 0 && /* @__PURE__ */ V("table", {
|
|
16561
16561
|
className: "w-full",
|
|
16562
16562
|
children: /* @__PURE__ */ V("tbody", { children: G.map((e) => {
|
|
16563
|
-
let t = wh[e.level] ?? wh.info, n = t.icon, r =
|
|
16563
|
+
let t = wh[e.level] ?? wh.info, n = t.icon, r = De(e), i = z || U.has(r), a = e.tags && Object.keys(e.tags).length > 0, o = e.meta && Object.keys(e.meta).length > 0, s = a || o;
|
|
16564
16564
|
return /* @__PURE__ */ H("tr", {
|
|
16565
16565
|
className: Z("hover:bg-surface-hover/30 border-b border-border/30", s && "cursor-pointer"),
|
|
16566
|
-
onClick: s ? () =>
|
|
16566
|
+
onClick: s ? () => Ce(r) : void 0,
|
|
16567
16567
|
children: [
|
|
16568
16568
|
/* @__PURE__ */ V("td", {
|
|
16569
16569
|
className: "px-2 py-1 text-foreground-subtle whitespace-nowrap align-top w-[70px]",
|
|
@@ -16633,8 +16633,8 @@ function kh({ agentId: e, addonId: t, deviceId: n, containerDeviceId: r, integra
|
|
|
16633
16633
|
/* @__PURE__ */ V("td", {
|
|
16634
16634
|
className: "px-1 py-1 align-top w-5",
|
|
16635
16635
|
children: /* @__PURE__ */ V(Mh, {
|
|
16636
|
-
copied:
|
|
16637
|
-
onCopy: () =>
|
|
16636
|
+
copied: we === r,
|
|
16637
|
+
onCopy: () => Ee(e, r)
|
|
16638
16638
|
})
|
|
16639
16639
|
})
|
|
16640
16640
|
]
|
|
@@ -16697,122 +16697,122 @@ function Ph(e, t, n, r) {
|
|
|
16697
16697
|
return !0;
|
|
16698
16698
|
}
|
|
16699
16699
|
var Fh = {
|
|
16700
|
-
[
|
|
16700
|
+
[q.AddonStarted]: {
|
|
16701
16701
|
icon: Gn,
|
|
16702
16702
|
color: "bg-emerald-500/15 text-emerald-400 border-emerald-500/30",
|
|
16703
16703
|
label: "Started"
|
|
16704
16704
|
},
|
|
16705
|
-
[
|
|
16705
|
+
[q.AddonInstalled]: {
|
|
16706
16706
|
icon: Wt,
|
|
16707
16707
|
color: "bg-emerald-500/15 text-emerald-400 border-emerald-500/30",
|
|
16708
16708
|
label: "Installed"
|
|
16709
16709
|
},
|
|
16710
|
-
[
|
|
16710
|
+
[q.AddonRestarted]: {
|
|
16711
16711
|
icon: Xn,
|
|
16712
16712
|
color: "bg-blue-500/15 text-blue-400 border-blue-500/30",
|
|
16713
16713
|
label: "Restarted"
|
|
16714
16714
|
},
|
|
16715
|
-
[
|
|
16715
|
+
[q.AddonUpdated]: {
|
|
16716
16716
|
icon: jr,
|
|
16717
16717
|
color: "bg-blue-500/15 text-blue-400 border-blue-500/30",
|
|
16718
16718
|
label: "Updated"
|
|
16719
16719
|
},
|
|
16720
|
-
[
|
|
16720
|
+
[q.AddonStopped]: {
|
|
16721
16721
|
icon: R,
|
|
16722
16722
|
color: "bg-foreground-subtle/10 text-foreground-subtle border-border",
|
|
16723
16723
|
label: "Stopped"
|
|
16724
16724
|
},
|
|
16725
|
-
[
|
|
16725
|
+
[q.AddonUninstalled]: {
|
|
16726
16726
|
icon: ie,
|
|
16727
16727
|
color: "bg-foreground-subtle/10 text-foreground-subtle border-border",
|
|
16728
16728
|
label: "Uninstalled"
|
|
16729
16729
|
},
|
|
16730
|
-
[
|
|
16730
|
+
[q.AddonCrashed]: {
|
|
16731
16731
|
icon: St,
|
|
16732
16732
|
color: "bg-red-500/15 text-red-400 border-red-500/30",
|
|
16733
16733
|
label: "Crashed"
|
|
16734
16734
|
},
|
|
16735
|
-
[
|
|
16735
|
+
[q.AddonError]: {
|
|
16736
16736
|
icon: Dr,
|
|
16737
16737
|
color: "bg-red-500/15 text-red-400 border-red-500/30",
|
|
16738
16738
|
label: "Error"
|
|
16739
16739
|
},
|
|
16740
|
-
[
|
|
16740
|
+
[q.DetectionPhaseTransition]: {
|
|
16741
16741
|
icon: Ge,
|
|
16742
16742
|
color: "bg-violet-500/15 text-violet-400 border-violet-500/30",
|
|
16743
16743
|
label: "Phase"
|
|
16744
16744
|
},
|
|
16745
|
-
[
|
|
16745
|
+
[q.DetectionResult]: {
|
|
16746
16746
|
icon: er,
|
|
16747
16747
|
color: "bg-purple-500/15 text-purple-400 border-purple-500/30",
|
|
16748
16748
|
label: "Detection"
|
|
16749
16749
|
},
|
|
16750
|
-
[
|
|
16750
|
+
[q.DetectionEvent]: {
|
|
16751
16751
|
icon: Jt,
|
|
16752
16752
|
color: "bg-blue-500/15 text-blue-400 border-blue-500/30",
|
|
16753
16753
|
label: "Event"
|
|
16754
16754
|
},
|
|
16755
|
-
[
|
|
16755
|
+
[q.DetectionCameraNative]: {
|
|
16756
16756
|
icon: xr,
|
|
16757
16757
|
color: "bg-cyan-500/15 text-cyan-400 border-cyan-500/30",
|
|
16758
16758
|
label: "Camera AI"
|
|
16759
16759
|
},
|
|
16760
|
-
[
|
|
16760
|
+
[q.ProviderMotion]: {
|
|
16761
16761
|
icon: Kr,
|
|
16762
16762
|
color: "bg-orange-500/15 text-orange-400 border-orange-500/30",
|
|
16763
16763
|
label: "Motion"
|
|
16764
16764
|
},
|
|
16765
|
-
[
|
|
16765
|
+
[q.MotionOnMotionChanged]: {
|
|
16766
16766
|
icon: Kr,
|
|
16767
16767
|
color: "bg-orange-500/15 text-orange-400 border-orange-500/30",
|
|
16768
16768
|
label: "Motion"
|
|
16769
16769
|
},
|
|
16770
|
-
[
|
|
16770
|
+
[q.MotionAnalysis]: {
|
|
16771
16771
|
icon: Ge,
|
|
16772
16772
|
color: "bg-orange-500/10 text-orange-300 border-orange-500/20",
|
|
16773
16773
|
label: "Motion analysis"
|
|
16774
16774
|
},
|
|
16775
|
-
[
|
|
16775
|
+
[q.MotionZonesRaw]: {
|
|
16776
16776
|
icon: Ge,
|
|
16777
16777
|
color: "bg-orange-500/10 text-orange-300 border-orange-500/20",
|
|
16778
16778
|
label: "Motion zones"
|
|
16779
16779
|
},
|
|
16780
|
-
[
|
|
16780
|
+
[q.ProviderDetection]: {
|
|
16781
16781
|
icon: xr,
|
|
16782
16782
|
color: "bg-cyan-500/15 text-cyan-400 border-cyan-500/30",
|
|
16783
16783
|
label: "Provider Det"
|
|
16784
16784
|
},
|
|
16785
|
-
[
|
|
16785
|
+
[q.PipelineAudioInferenceResult]: {
|
|
16786
16786
|
icon: I,
|
|
16787
16787
|
color: "bg-pink-500/15 text-pink-400 border-pink-500/30",
|
|
16788
16788
|
label: "Audio"
|
|
16789
16789
|
},
|
|
16790
|
-
[
|
|
16790
|
+
[q.AgentOnline]: {
|
|
16791
16791
|
icon: Gn,
|
|
16792
16792
|
color: "bg-emerald-500/15 text-emerald-400 border-emerald-500/30",
|
|
16793
16793
|
label: "Agent Online"
|
|
16794
16794
|
},
|
|
16795
|
-
[
|
|
16795
|
+
[q.AgentOffline]: {
|
|
16796
16796
|
icon: R,
|
|
16797
16797
|
color: "bg-red-500/15 text-red-400 border-red-500/30",
|
|
16798
16798
|
label: "Agent Offline"
|
|
16799
16799
|
},
|
|
16800
|
-
[
|
|
16800
|
+
[q.DeviceRegistered]: {
|
|
16801
16801
|
icon: Wt,
|
|
16802
16802
|
color: "bg-emerald-500/15 text-emerald-400 border-emerald-500/30",
|
|
16803
16803
|
label: "Registered"
|
|
16804
16804
|
},
|
|
16805
|
-
[
|
|
16805
|
+
[q.DeviceUnregistered]: {
|
|
16806
16806
|
icon: ie,
|
|
16807
16807
|
color: "bg-red-500/15 text-red-400 border-red-500/30",
|
|
16808
16808
|
label: "Unregistered"
|
|
16809
16809
|
},
|
|
16810
|
-
[
|
|
16810
|
+
[q.DeviceStateChanged]: {
|
|
16811
16811
|
icon: Ge,
|
|
16812
16812
|
color: "bg-foreground-subtle/10 text-foreground-subtle border-border",
|
|
16813
16813
|
label: "State"
|
|
16814
16814
|
},
|
|
16815
|
-
[
|
|
16815
|
+
[q.EventEmitted]: {
|
|
16816
16816
|
icon: Kr,
|
|
16817
16817
|
color: "bg-amber-500/15 text-amber-400 border-amber-500/30",
|
|
16818
16818
|
label: "Event"
|
|
@@ -16824,7 +16824,7 @@ function Ih(e, t) {
|
|
|
16824
16824
|
color: "bg-foreground-subtle/10 text-foreground-subtle border-border",
|
|
16825
16825
|
label: e.split(".").pop() ?? e
|
|
16826
16826
|
};
|
|
16827
|
-
if (e ===
|
|
16827
|
+
if (e === q.DeviceStateChanged && t && typeof t.capName == "string") {
|
|
16828
16828
|
let e = t.capName;
|
|
16829
16829
|
return {
|
|
16830
16830
|
...n,
|
|
@@ -16833,31 +16833,31 @@ function Ih(e, t) {
|
|
|
16833
16833
|
}
|
|
16834
16834
|
return n;
|
|
16835
16835
|
}
|
|
16836
|
-
var Lh = Object.freeze([...new Set(Object.values(
|
|
16837
|
-
|
|
16838
|
-
|
|
16839
|
-
|
|
16840
|
-
|
|
16841
|
-
|
|
16842
|
-
|
|
16843
|
-
|
|
16844
|
-
|
|
16845
|
-
|
|
16846
|
-
|
|
16847
|
-
|
|
16848
|
-
|
|
16849
|
-
|
|
16850
|
-
|
|
16851
|
-
|
|
16852
|
-
|
|
16853
|
-
|
|
16836
|
+
var Lh = Object.freeze([...new Set(Object.values(q))].toSorted()), Rh = Object.freeze([
|
|
16837
|
+
q.PipelineCameraMetricsSnapshot,
|
|
16838
|
+
q.PipelineRunnerLoadSnapshot,
|
|
16839
|
+
q.PipelineEngineMetricsSnapshot,
|
|
16840
|
+
q.PipelineInferenceResult,
|
|
16841
|
+
q.PipelineTrace,
|
|
16842
|
+
q.PipelineProgress,
|
|
16843
|
+
q.StreamBrokerMetricsSnapshot,
|
|
16844
|
+
q.MetricsNodeResourcesSnapshot,
|
|
16845
|
+
q.MetricsNodeProcessesSnapshot,
|
|
16846
|
+
q.ClusterTopologySnapshot,
|
|
16847
|
+
q.MotionAnalysis,
|
|
16848
|
+
q.MotionZonesRaw,
|
|
16849
|
+
q.DetectionResult,
|
|
16850
|
+
q.PipelineAudioInferenceResult,
|
|
16851
|
+
q.PlatformProbePhase,
|
|
16852
|
+
q.BenchmarkProgress,
|
|
16853
|
+
q.ModelDownloadProgress
|
|
16854
16854
|
]), zh = new Set(Rh), Bh = Object.freeze(Lh.filter((e) => !zh.has(e)));
|
|
16855
16855
|
function Vh(e, t) {
|
|
16856
|
-
if (e ===
|
|
16856
|
+
if (e === q.DetectionPhaseTransition) {
|
|
16857
16857
|
let e = t.to, n = t.from, r = typeof t.source == "string" ? t.source : null, i = typeof t.cooldownMs == "number" ? t.cooldownMs : null, a = r ? ` (${r}${i ? `, ${Math.round(i / 1e3)}s cooldown` : ""})` : "";
|
|
16858
16858
|
return e === "active" ? `Motion detected — phase active${a}` : e === "watching" ? `Cooldown expired — phase watching${a}` : `Phase: ${String(n)} → ${String(e)}${a}`;
|
|
16859
16859
|
}
|
|
16860
|
-
if (e ===
|
|
16860
|
+
if (e === q.DetectionResult) {
|
|
16861
16861
|
let e = t.frame?.detections ?? [];
|
|
16862
16862
|
if (e.length === 0) return null;
|
|
16863
16863
|
let n = /* @__PURE__ */ new Map();
|
|
@@ -16867,19 +16867,19 @@ function Vh(e, t) {
|
|
|
16867
16867
|
}
|
|
16868
16868
|
return [...n.entries()].map(([e, t]) => t > 1 ? `${e} ×${t}` : e).join(", ");
|
|
16869
16869
|
}
|
|
16870
|
-
if (e ===
|
|
16870
|
+
if (e === q.PipelineAudioInferenceResult) {
|
|
16871
16871
|
let e = t.frame?.detections ?? [];
|
|
16872
16872
|
return e.length === 0 ? null : e.map((e) => {
|
|
16873
16873
|
let t = e, n = t.macroClass ?? t.class ?? t.label, r = typeof n == "string" ? n : "", i = t.score;
|
|
16874
16874
|
return i ? `${r} (${Math.round(i * 100)}%)` : r;
|
|
16875
16875
|
}).filter(Boolean).join(", ");
|
|
16876
16876
|
}
|
|
16877
|
-
if (e ===
|
|
16877
|
+
if (e === q.DetectionEvent) {
|
|
16878
16878
|
let e = t.label ?? t.class, n = t.score ?? t.confidence, r = [];
|
|
16879
16879
|
return typeof e == "string" && r.push(e), typeof n == "number" && r.push(`${Math.round(n * 100)}%`), r.length > 0 ? r.join(" — ") : null;
|
|
16880
16880
|
}
|
|
16881
|
-
if (e ===
|
|
16882
|
-
if (e ===
|
|
16881
|
+
if (e === q.ProviderMotion) return t.active === !0 ? "motion start" : "motion stop";
|
|
16882
|
+
if (e === q.DeviceStateChanged) {
|
|
16883
16883
|
let e = t.slice;
|
|
16884
16884
|
if (e && typeof e == "object") {
|
|
16885
16885
|
let t = Object.keys(e).filter((e) => e !== "lastFetchedAt" && e !== "ts");
|
|
@@ -16887,12 +16887,12 @@ function Vh(e, t) {
|
|
|
16887
16887
|
}
|
|
16888
16888
|
return null;
|
|
16889
16889
|
}
|
|
16890
|
-
if (e ===
|
|
16891
|
-
if (e ===
|
|
16890
|
+
if (e === q.EventEmitted) return (typeof t.eventType == "string" ? t.eventType : null) ?? null;
|
|
16891
|
+
if (e === q.MotionOnMotionChanged) {
|
|
16892
16892
|
let e = t.detected, n = typeof t.source == "string" ? t.source : null, r = e === !0 ? "motion start" : e === !1 ? "motion stop" : "motion";
|
|
16893
16893
|
return n ? `${r} (${n})` : r;
|
|
16894
16894
|
}
|
|
16895
|
-
if (e ===
|
|
16895
|
+
if (e === q.ProviderDetection || e === q.DetectionCameraNative) {
|
|
16896
16896
|
let e = t.detections ?? [];
|
|
16897
16897
|
if (!Array.isArray(e) || e.length === 0) return (typeof t.class == "string" ? t.class : null) ?? null;
|
|
16898
16898
|
let n = /* @__PURE__ */ new Map();
|
|
@@ -16907,7 +16907,7 @@ function Vh(e, t) {
|
|
|
16907
16907
|
}
|
|
16908
16908
|
function Hh(e) {
|
|
16909
16909
|
let t = e.category;
|
|
16910
|
-
return t ===
|
|
16910
|
+
return t === q.DetectionResult || t === q.PipelineAudioInferenceResult ? Vh(t, e.data) !== null : !0;
|
|
16911
16911
|
}
|
|
16912
16912
|
var Uh = 300;
|
|
16913
16913
|
function Wh({ agentId: e, addonId: t, deviceId: n, defaultCategories: r, categories: i, category: a, maxHeight: s = "max-h-96", limit: c = 50, showCategoryFilter: d = !0, showFilters: f = !1, liveBuffer: p, onClose: m, className: g }) {
|
|
@@ -16915,11 +16915,11 @@ function Wh({ agentId: e, addonId: t, deviceId: n, defaultCategories: r, categor
|
|
|
16915
16915
|
v(() => {
|
|
16916
16916
|
S.current !== y && (S.current = y, x(new Set(_)));
|
|
16917
16917
|
}, [y, _]);
|
|
16918
|
-
let C = xh(Uh), w = p ?? C, T = w.entries, [E, D] = l(!0), [O, k] = l(/* @__PURE__ */ new Set()), [A,
|
|
16918
|
+
let C = xh(Uh), w = p ?? C, T = w.entries, [E, D] = l(!0), [O, k] = l(/* @__PURE__ */ new Set()), [A, j] = l(""), [ee, te] = l(!1), [N, P] = l(""), [F, I] = l(0), L = u(null), R = u(null), z = `${e ?? ""}:${t ?? ""}:${String(n ?? "")}:${a ?? ""}`, B = u(z);
|
|
16919
16919
|
v(() => {
|
|
16920
16920
|
B.current !== z && (B.current = z, w.reset(), k(/* @__PURE__ */ new Set()), I(0));
|
|
16921
16921
|
}, [z, w]), v(() => {
|
|
16922
|
-
if (!
|
|
16922
|
+
if (!ee) return;
|
|
16923
16923
|
let e = (e) => {
|
|
16924
16924
|
let t = R.current;
|
|
16925
16925
|
t && e.target instanceof Node && !t.contains(e.target) && te(!1);
|
|
@@ -16927,7 +16927,7 @@ function Wh({ agentId: e, addonId: t, deviceId: n, defaultCategories: r, categor
|
|
|
16927
16927
|
return document.addEventListener("mousedown", e), () => {
|
|
16928
16928
|
document.removeEventListener("mousedown", e);
|
|
16929
16929
|
};
|
|
16930
|
-
}, [
|
|
16930
|
+
}, [ee]);
|
|
16931
16931
|
let ae = h(() => {
|
|
16932
16932
|
let r = {};
|
|
16933
16933
|
return e && (r.agentId = e), t && (r.addonId = t), n !== void 0 && (r.deviceId = n), a && (r.category = a), r;
|
|
@@ -17008,7 +17008,7 @@ function Wh({ agentId: e, addonId: t, deviceId: n, defaultCategories: r, categor
|
|
|
17008
17008
|
return n.has(e) ? n.delete(e) : n.add(e), n;
|
|
17009
17009
|
});
|
|
17010
17010
|
}, []), G = o(() => {
|
|
17011
|
-
x(new Set(_)),
|
|
17011
|
+
x(new Set(_)), j(""), I(0);
|
|
17012
17012
|
}, [_]), me = o(() => {
|
|
17013
17013
|
I(Date.now()), w.reset();
|
|
17014
17014
|
}, [w]), [he, ge] = l(!1), [_e, ve] = l(null), ye = o((e) => {
|
|
@@ -17023,14 +17023,14 @@ function Wh({ agentId: e, addonId: t, deviceId: n, defaultCategories: r, categor
|
|
|
17023
17023
|
navigator.clipboard.writeText(ye(e)).then(() => {
|
|
17024
17024
|
ve(e.id), setTimeout(() => ve((t) => t === e.id ? null : t), 1200);
|
|
17025
17025
|
});
|
|
17026
|
-
}, [ye]),
|
|
17026
|
+
}, [ye]), K = o(() => {
|
|
17027
17027
|
x(new Set(Lh));
|
|
17028
|
-
}, []),
|
|
17028
|
+
}, []), q = o(() => {
|
|
17029
17029
|
x(/* @__PURE__ */ new Set());
|
|
17030
|
-
}, []),
|
|
17030
|
+
}, []), Se = h(() => {
|
|
17031
17031
|
let e = N.trim().toLowerCase();
|
|
17032
17032
|
return e ? Lh.filter((t) => t.toLowerCase().includes(e)) : Lh;
|
|
17033
|
-
}, [N]),
|
|
17033
|
+
}, [N]), Ce = Lh.length, we = b.size, Te = we === Ce, Ee = Te ? "All" : `${we}/${Ce}`;
|
|
17034
17034
|
return /* @__PURE__ */ H("div", {
|
|
17035
17035
|
className: Z("h-full min-h-0 flex flex-col", g),
|
|
17036
17036
|
onClick: (e) => e.stopPropagation(),
|
|
@@ -17076,22 +17076,22 @@ function Wh({ agentId: e, addonId: t, deviceId: n, defaultCategories: r, categor
|
|
|
17076
17076
|
children: [/* @__PURE__ */ H("button", {
|
|
17077
17077
|
type: "button",
|
|
17078
17078
|
onClick: () => te((e) => !e),
|
|
17079
|
-
className: Z("inline-flex items-center gap-1 text-[9px] px-1.5 py-0.5 rounded border transition-colors",
|
|
17079
|
+
className: Z("inline-flex items-center gap-1 text-[9px] px-1.5 py-0.5 rounded border transition-colors", Te ? "border-border text-foreground-subtle hover:text-foreground" : "border-violet-500/30 bg-violet-500/10 text-violet-400"),
|
|
17080
17080
|
title: "Pick events to track",
|
|
17081
17081
|
children: [
|
|
17082
17082
|
/* @__PURE__ */ V(rn, { className: "h-2.5 w-2.5" }),
|
|
17083
17083
|
"Filter (",
|
|
17084
|
-
|
|
17084
|
+
Ee,
|
|
17085
17085
|
")"
|
|
17086
17086
|
]
|
|
17087
|
-
}),
|
|
17087
|
+
}), ee && /* @__PURE__ */ V(Gh, {
|
|
17088
17088
|
search: N,
|
|
17089
17089
|
onSearchChange: P,
|
|
17090
|
-
categories:
|
|
17090
|
+
categories: Se,
|
|
17091
17091
|
active: b,
|
|
17092
17092
|
onToggle: W,
|
|
17093
|
-
onSelectAll:
|
|
17094
|
-
onSelectNone:
|
|
17093
|
+
onSelectAll: K,
|
|
17094
|
+
onSelectNone: q,
|
|
17095
17095
|
onResetDefaults: G
|
|
17096
17096
|
})]
|
|
17097
17097
|
}),
|
|
@@ -17122,12 +17122,12 @@ function Wh({ agentId: e, addonId: t, deviceId: n, defaultCategories: r, categor
|
|
|
17122
17122
|
children: [/* @__PURE__ */ V("input", {
|
|
17123
17123
|
type: "text",
|
|
17124
17124
|
value: A,
|
|
17125
|
-
onChange: (e) =>
|
|
17125
|
+
onChange: (e) => j(e.target.value),
|
|
17126
17126
|
placeholder: "Search…",
|
|
17127
17127
|
className: "w-32 pl-1.5 pr-5 py-0.5 rounded border border-border bg-background text-foreground text-[10px] focus:outline-none focus:border-primary/50"
|
|
17128
17128
|
}), A && /* @__PURE__ */ V("button", {
|
|
17129
17129
|
type: "button",
|
|
17130
|
-
onClick: () =>
|
|
17130
|
+
onClick: () => j(""),
|
|
17131
17131
|
className: "absolute right-1 top-1/2 -translate-y-1/2 text-foreground-subtle hover:text-foreground",
|
|
17132
17132
|
title: "Clear search",
|
|
17133
17133
|
children: /* @__PURE__ */ V(Gr, { className: "h-2.5 w-2.5" })
|
|
@@ -17358,7 +17358,7 @@ function qh({ copied: e, onCopy: t }) {
|
|
|
17358
17358
|
}
|
|
17359
17359
|
//#endregion
|
|
17360
17360
|
//#region ../ui-library/src/composites/device-controls/atoms.tsx
|
|
17361
|
-
b(), Object.freeze([...new Set(
|
|
17361
|
+
b(), Object.freeze([...new Set(we.filter((e) => e.scope === "device").map((e) => e.name))].toSorted()), b(), b();
|
|
17362
17362
|
function Jh({ value: e, unit: t, onDelta: n }) {
|
|
17363
17363
|
return /* @__PURE__ */ H("div", {
|
|
17364
17364
|
className: "flex h-8 w-full overflow-hidden rounded-lg border border-border bg-surface",
|
|
@@ -17633,7 +17633,7 @@ function hg({ trpc: e, deviceId: t, layout: n, optimistic: r, features: i }) {
|
|
|
17633
17633
|
slice: (e) => e.state.lockControl
|
|
17634
17634
|
}), { display: c, applyOptimistic: u } = pg(o, { enabled: r ?? !0 }), [d, f] = l(null), [p, m] = l(!1), [h, g] = l(null);
|
|
17635
17635
|
if (c === void 0) return null;
|
|
17636
|
-
let _ = c.state === "locked" || c.state === "locking", v = !s || c.state === "jammed", y = i?.includes(
|
|
17636
|
+
let _ = c.state === "locked" || c.state === "locking", v = !s || c.state === "jammed", y = i?.includes(Ue.LockOpen) === !0, b = n === "compact", x = () => {
|
|
17637
17637
|
u({ state: "locking" }), a?.lock({});
|
|
17638
17638
|
}, S = () => {
|
|
17639
17639
|
u({ state: "unlocking" }), a?.unlock({});
|
|
@@ -17672,7 +17672,7 @@ function hg({ trpc: e, deviceId: t, layout: n, optimistic: r, features: i }) {
|
|
|
17672
17672
|
m(!1);
|
|
17673
17673
|
}
|
|
17674
17674
|
}
|
|
17675
|
-
}, O = _ ? "Unlock" : "Lock", k = d === "open" ? "Open door?" : "Unlock device?", A = d === "open" ? "This will release the latch and open the door." : "This will unlock the device.",
|
|
17675
|
+
}, O = _ ? "Unlock" : "Lock", k = d === "open" ? "Open door?" : "Unlock device?", A = d === "open" ? "This will release the latch and open the door." : "This will unlock the device.", j = d === "open" ? "Confirm open" : "Confirm unlock", ee = V(d === "open" ? Ut : xn, { className: "h-4 w-4 text-amber-400" });
|
|
17676
17676
|
return /* @__PURE__ */ H("div", {
|
|
17677
17677
|
className: Z("inline-flex items-center", n === "full" ? "gap-2" : "gap-1"),
|
|
17678
17678
|
children: [
|
|
@@ -17709,7 +17709,7 @@ function hg({ trpc: e, deviceId: t, layout: n, optimistic: r, features: i }) {
|
|
|
17709
17709
|
children: [
|
|
17710
17710
|
/* @__PURE__ */ H(Of, { children: [/* @__PURE__ */ H(Af, {
|
|
17711
17711
|
className: "flex items-center gap-2",
|
|
17712
|
-
children: [
|
|
17712
|
+
children: [ee, k]
|
|
17713
17713
|
}), /* @__PURE__ */ V(jf, { children: A })] }),
|
|
17714
17714
|
h !== null && /* @__PURE__ */ V("div", {
|
|
17715
17715
|
className: "mt-2 px-3 py-2 rounded border border-danger/40 bg-danger/10 text-xs text-danger",
|
|
@@ -17726,12 +17726,12 @@ function hg({ trpc: e, deviceId: t, layout: n, optimistic: r, features: i }) {
|
|
|
17726
17726
|
type: "button",
|
|
17727
17727
|
variant: "danger",
|
|
17728
17728
|
size: "sm",
|
|
17729
|
-
"aria-label":
|
|
17729
|
+
"aria-label": j,
|
|
17730
17730
|
disabled: p,
|
|
17731
17731
|
onClick: () => {
|
|
17732
17732
|
D();
|
|
17733
17733
|
},
|
|
17734
|
-
children: [p && /* @__PURE__ */ V(bn, { className: "h-3.5 w-3.5 animate-spin" }),
|
|
17734
|
+
children: [p && /* @__PURE__ */ V(bn, { className: "h-3.5 w-3.5 animate-spin" }), j]
|
|
17735
17735
|
})] })
|
|
17736
17736
|
]
|
|
17737
17737
|
})
|
|
@@ -18541,10 +18541,10 @@ b();
|
|
|
18541
18541
|
var Wg = (e) => e;
|
|
18542
18542
|
function Gg(e) {
|
|
18543
18543
|
let t = e.capName === void 0 ? void 0 : e.display?.perCap?.[e.capName], n = t?.precision ?? e.display?.precision ?? e.roleDefault?.precision ?? e.slicePrecision, r = e.sliceUnit ?? e.canonicalUnit, i = t?.unit ?? e.display?.unit ?? e.roleDefault?.unit;
|
|
18544
|
-
return i !== void 0 && r !== void 0 && i !== r &&
|
|
18544
|
+
return i !== void 0 && r !== void 0 && i !== r && Le(r, i) ? {
|
|
18545
18545
|
unit: i,
|
|
18546
18546
|
precision: n,
|
|
18547
|
-
toDisplayValue: (e) =>
|
|
18547
|
+
toDisplayValue: (e) => Oe(e, r, i) ?? e
|
|
18548
18548
|
} : {
|
|
18549
18549
|
unit: r ?? "",
|
|
18550
18550
|
precision: n,
|
|
@@ -19010,7 +19010,7 @@ function d_({ trpc: e, deviceId: t, features: n, optimistic: r }) {
|
|
|
19010
19010
|
slice: (e) => e.state.cover
|
|
19011
19011
|
}), { display: s, applyOptimistic: c } = pg(a, { enabled: r ?? !0 });
|
|
19012
19012
|
if (i === void 0) return null;
|
|
19013
|
-
let l = !o, u = (n ?? []).includes(
|
|
19013
|
+
let l = !o, u = (n ?? []).includes(Ue.CoverPositionable), d = (n ?? []).includes(Ue.CoverTilt), f = r_(s?.state), p = s?.position ?? null, m = p !== null, h = s?.state === "open" || s?.state === "opening", g = (e, t) => {
|
|
19014
19014
|
l || !e || (t !== void 0 && c(t), e({}));
|
|
19015
19015
|
}, _ = (e) => {
|
|
19016
19016
|
l || (c({ position: e }), i?.setPosition({ position: e }));
|
|
@@ -20642,7 +20642,7 @@ function dv({ label: e, busy: t, variant: n, onClick: r, children: i }) {
|
|
|
20642
20642
|
function fv({ trpc: e, deviceId: t, features: n, optimistic: r }) {
|
|
20643
20643
|
let { cap: i, slice: a, available: o } = iv(e, t), { display: s, applyOptimistic: c } = pg(a, { enabled: r ?? !0 });
|
|
20644
20644
|
if (i === void 0) return null;
|
|
20645
|
-
let l = !o, u = (n ?? []).includes(
|
|
20645
|
+
let l = !o, u = (n ?? []).includes(Ue.ValvePositionable), d = r_(s?.state), f = rv(s?.state), p = s?.position ?? null, m = p !== null, h = (e, t) => {
|
|
20646
20646
|
l || !e || (t !== void 0 && c(t), e({}));
|
|
20647
20647
|
}, g = (e) => {
|
|
20648
20648
|
l || (c({ position: e }), i.setPosition({ position: e }));
|
|
@@ -23136,7 +23136,7 @@ function Vy({ trpc: e, deviceId: t, features: n, optimistic: r }) {
|
|
|
23136
23136
|
slice: (e) => e.state.lockControl
|
|
23137
23137
|
}), { display: s, applyOptimistic: c } = pg(a, { enabled: r ?? !0 });
|
|
23138
23138
|
if (i === void 0 || s === void 0) return null;
|
|
23139
|
-
let l = Fy(s.state), u = Iy(s.state) || !o, d = n?.includes(
|
|
23139
|
+
let l = Fy(s.state), u = Iy(s.state) || !o, d = n?.includes(Ue.LockOpen) === !0, f = () => {
|
|
23140
23140
|
u || (l ? (c({ state: "unlocking" }), i.unlock({})) : (c({ state: "locking" }), i.lock({})));
|
|
23141
23141
|
}, p = () => {
|
|
23142
23142
|
u || i.open({});
|
|
@@ -23194,7 +23194,7 @@ function Yy({ trpc: e, deviceId: t, features: n, optimistic: r }) {
|
|
|
23194
23194
|
slice: (e) => e.state.color
|
|
23195
23195
|
}), s = pg(i.slice, { enabled: r ?? !0 }), c = pg(a.slice, { enabled: r ?? !0 }), l = pg(o.slice, { enabled: r ?? !0 });
|
|
23196
23196
|
if (i.cap === void 0 || s.display === void 0) return null;
|
|
23197
|
-
let u = s.display.on === !0, d = !i.available, f = c.display?.percentage ?? 0, p = !a.available, m = u ? f / 100 : 0, h = u ? qy : Jy, g = (n?.includes(
|
|
23197
|
+
let u = s.display.on === !0, d = !i.available, f = c.display?.percentage ?? 0, p = !a.available, m = u ? f / 100 : 0, h = u ? qy : Jy, g = (n?.includes(Ue.LightColorMired) ?? !1) && o.cap !== void 0, _ = l.display?.mireds, v = !o.available;
|
|
23198
23198
|
return /* @__PURE__ */ H("div", {
|
|
23199
23199
|
className: "flex flex-col items-stretch gap-4 rounded-lg border border-border bg-surface p-4",
|
|
23200
23200
|
children: [
|
|
@@ -23319,7 +23319,7 @@ function Qy({ trpc: e, deviceId: t, features: n, optimistic: r }) {
|
|
|
23319
23319
|
slice: (e) => e.state.fanControl
|
|
23320
23320
|
}), o = pg(i.slice, { enabled: r ?? !0 }), s = pg(a.slice, { enabled: r ?? !0 });
|
|
23321
23321
|
if (i.cap === void 0 || o.display === void 0) return null;
|
|
23322
|
-
let c = o.display.on === !0, l = !i.available, u = s.display?.percentage ?? 0, d = !a.available, f = c ? u / 100 : 0, p = c ? Xy : Zy, m = n?.includes(
|
|
23322
|
+
let c = o.display.on === !0, l = !i.available, u = s.display?.percentage ?? 0, d = !a.available, f = c ? u / 100 : 0, p = c ? Xy : Zy, m = n?.includes(Ue.FanSpeed) ?? !1, h = (n?.includes(Ue.FanOscillating) ?? !1) && a.cap !== void 0, g = s.display?.availablePresets ?? [], _ = (n?.includes(Ue.FanPreset) ?? !1) && a.cap !== void 0 && g.length > 0, v = s.display?.preset ?? "", y = s.display?.oscillating === !0, b = () => {
|
|
23323
23323
|
if (l) return;
|
|
23324
23324
|
let e = !c;
|
|
23325
23325
|
o.applyOptimistic({ on: e }), i.cap?.setState({ on: e });
|
|
@@ -23508,7 +23508,7 @@ function ab({ trpc: e, deviceId: t, features: n, optimistic: r }) {
|
|
|
23508
23508
|
slice: (e) => e.state.mediaPlayer
|
|
23509
23509
|
}), { display: s, applyOptimistic: c } = pg(a, { enabled: r ?? !0 });
|
|
23510
23510
|
if (i === void 0 || s === void 0) return null;
|
|
23511
|
-
let l = !o, u = eb(s.state), d = (n?.includes(
|
|
23511
|
+
let l = !o, u = eb(s.state), d = (n?.includes(Ue.MediaPlayerSeek) ?? !1) && s.durationMs !== null && s.durationMs > 0, f = n?.includes(Ue.MediaPlayerNext) ?? !1, p = n?.includes(Ue.MediaPlayerPrevious) ?? !1, m = (n?.includes(Ue.MediaPlayerVolume) ?? !1) && s.volumeLevel !== null, h = () => {
|
|
23512
23512
|
l || (u === "play" ? (c({ state: "playing" }), i.play({})) : (c({ state: "paused" }), i.pause({})));
|
|
23513
23513
|
}, g = s.currentMedia?.artist ?? s.currentMedia?.album ?? null, _ = tb(s.positionMs, s.durationMs), v = s.volumeLevel ?? 0;
|
|
23514
23514
|
return /* @__PURE__ */ H("div", {
|
|
@@ -27334,7 +27334,7 @@ b(), b();
|
|
|
27334
27334
|
//#region ../ui-library/src/composites/device-meta.ts
|
|
27335
27335
|
var bD = {
|
|
27336
27336
|
[W.Camera]: {
|
|
27337
|
-
icon:
|
|
27337
|
+
icon: j,
|
|
27338
27338
|
label: "Camera"
|
|
27339
27339
|
},
|
|
27340
27340
|
[W.Hub]: {
|
|
@@ -27458,205 +27458,205 @@ var bD = {
|
|
|
27458
27458
|
label: "Pet feeder"
|
|
27459
27459
|
}
|
|
27460
27460
|
}, xD = {
|
|
27461
|
-
[
|
|
27461
|
+
[K.Siren]: {
|
|
27462
27462
|
icon: lr,
|
|
27463
27463
|
label: "Siren"
|
|
27464
27464
|
},
|
|
27465
|
-
[
|
|
27465
|
+
[K.Floodlight]: {
|
|
27466
27466
|
icon: _n,
|
|
27467
27467
|
label: "Floodlight"
|
|
27468
27468
|
},
|
|
27469
|
-
[
|
|
27469
|
+
[K.Spotlight]: {
|
|
27470
27470
|
icon: en,
|
|
27471
27471
|
label: "Spotlight"
|
|
27472
27472
|
},
|
|
27473
|
-
[
|
|
27473
|
+
[K.PirSensor]: {
|
|
27474
27474
|
icon: Jn,
|
|
27475
27475
|
label: "PIR sensor"
|
|
27476
27476
|
},
|
|
27477
|
-
[
|
|
27477
|
+
[K.Chime]: {
|
|
27478
27478
|
icon: ot,
|
|
27479
27479
|
label: "Chime"
|
|
27480
27480
|
},
|
|
27481
|
-
[
|
|
27481
|
+
[K.Autotrack]: {
|
|
27482
27482
|
icon: Bt,
|
|
27483
27483
|
label: "Auto-track"
|
|
27484
27484
|
},
|
|
27485
|
-
[
|
|
27485
|
+
[K.Nightvision]: {
|
|
27486
27486
|
icon: jn,
|
|
27487
27487
|
label: "Night vision"
|
|
27488
27488
|
},
|
|
27489
|
-
[
|
|
27489
|
+
[K.PrivacyMask]: {
|
|
27490
27490
|
icon: L,
|
|
27491
27491
|
label: "Privacy mask"
|
|
27492
27492
|
},
|
|
27493
|
-
[
|
|
27493
|
+
[K.Doorbell]: {
|
|
27494
27494
|
icon: Ht,
|
|
27495
27495
|
label: "Doorbell"
|
|
27496
27496
|
},
|
|
27497
|
-
[
|
|
27497
|
+
[K.BinaryHelper]: {
|
|
27498
27498
|
icon: Cr,
|
|
27499
27499
|
label: "Binary helper"
|
|
27500
27500
|
},
|
|
27501
|
-
[
|
|
27501
|
+
[K.MotionSensor]: {
|
|
27502
27502
|
icon: nn,
|
|
27503
27503
|
label: "Motion sensor"
|
|
27504
27504
|
},
|
|
27505
|
-
[
|
|
27505
|
+
[K.ContactSensor]: {
|
|
27506
27506
|
icon: Ut,
|
|
27507
27507
|
label: "Contact sensor"
|
|
27508
27508
|
},
|
|
27509
|
-
[
|
|
27509
|
+
[K.LeakSensor]: {
|
|
27510
27510
|
icon: Gt,
|
|
27511
27511
|
label: "Leak sensor"
|
|
27512
27512
|
},
|
|
27513
|
-
[
|
|
27513
|
+
[K.SmokeSensor]: {
|
|
27514
27514
|
icon: qe,
|
|
27515
27515
|
label: "Smoke sensor"
|
|
27516
27516
|
},
|
|
27517
|
-
[
|
|
27517
|
+
[K.COSensor]: {
|
|
27518
27518
|
icon: Hr,
|
|
27519
27519
|
label: "CO sensor"
|
|
27520
27520
|
},
|
|
27521
|
-
[
|
|
27521
|
+
[K.GasSensor]: {
|
|
27522
27522
|
icon: Qt,
|
|
27523
27523
|
label: "Gas sensor"
|
|
27524
27524
|
},
|
|
27525
|
-
[
|
|
27525
|
+
[K.TamperSensor]: {
|
|
27526
27526
|
icon: ar,
|
|
27527
27527
|
label: "Tamper sensor"
|
|
27528
27528
|
},
|
|
27529
|
-
[
|
|
27529
|
+
[K.VibrationSensor]: {
|
|
27530
27530
|
icon: Ir,
|
|
27531
27531
|
label: "Vibration sensor"
|
|
27532
27532
|
},
|
|
27533
|
-
[
|
|
27533
|
+
[K.ConnectivitySensor]: {
|
|
27534
27534
|
icon: Vr,
|
|
27535
27535
|
label: "Connectivity"
|
|
27536
27536
|
},
|
|
27537
|
-
[
|
|
27537
|
+
[K.SoundSensor]: {
|
|
27538
27538
|
icon: Lr,
|
|
27539
27539
|
label: "Sound sensor"
|
|
27540
27540
|
},
|
|
27541
|
-
[
|
|
27541
|
+
[K.BinarySensor]: {
|
|
27542
27542
|
icon: Cr,
|
|
27543
27543
|
label: "Binary sensor"
|
|
27544
27544
|
},
|
|
27545
|
-
[
|
|
27545
|
+
[K.TemperatureSensor]: {
|
|
27546
27546
|
icon: Sr,
|
|
27547
27547
|
label: "Temperature"
|
|
27548
27548
|
},
|
|
27549
|
-
[
|
|
27549
|
+
[K.HumiditySensor]: {
|
|
27550
27550
|
icon: Kt,
|
|
27551
27551
|
label: "Humidity"
|
|
27552
27552
|
},
|
|
27553
|
-
[
|
|
27553
|
+
[K.AmbientLightSensor]: {
|
|
27554
27554
|
icon: vr,
|
|
27555
27555
|
label: "Ambient light"
|
|
27556
27556
|
},
|
|
27557
|
-
[
|
|
27557
|
+
[K.PressureSensor]: {
|
|
27558
27558
|
icon: an,
|
|
27559
27559
|
label: "Pressure"
|
|
27560
27560
|
},
|
|
27561
|
-
[
|
|
27561
|
+
[K.WindSensor]: {
|
|
27562
27562
|
icon: Hr,
|
|
27563
27563
|
label: "Wind"
|
|
27564
27564
|
},
|
|
27565
|
-
[
|
|
27565
|
+
[K.RainSensor]: {
|
|
27566
27566
|
icon: Mt,
|
|
27567
27567
|
label: "Rain"
|
|
27568
27568
|
},
|
|
27569
|
-
[
|
|
27569
|
+
[K.UvSensor]: {
|
|
27570
27570
|
icon: _r,
|
|
27571
27571
|
label: "UV index"
|
|
27572
27572
|
},
|
|
27573
|
-
[
|
|
27573
|
+
[K.SolarRadiationSensor]: {
|
|
27574
27574
|
icon: yr,
|
|
27575
27575
|
label: "Solar radiation"
|
|
27576
27576
|
},
|
|
27577
|
-
[
|
|
27577
|
+
[K.SoilMoistureSensor]: {
|
|
27578
27578
|
icon: gr,
|
|
27579
27579
|
label: "Soil moisture"
|
|
27580
27580
|
},
|
|
27581
|
-
[
|
|
27581
|
+
[K.PowerSensor]: {
|
|
27582
27582
|
icon: Kr,
|
|
27583
27583
|
label: "Power"
|
|
27584
27584
|
},
|
|
27585
|
-
[
|
|
27585
|
+
[K.EnergySensor]: {
|
|
27586
27586
|
icon: Kr,
|
|
27587
27587
|
label: "Energy"
|
|
27588
27588
|
},
|
|
27589
|
-
[
|
|
27589
|
+
[K.VoltageSensor]: {
|
|
27590
27590
|
icon: Kr,
|
|
27591
27591
|
label: "Voltage"
|
|
27592
27592
|
},
|
|
27593
|
-
[
|
|
27593
|
+
[K.CurrentSensor]: {
|
|
27594
27594
|
icon: Kr,
|
|
27595
27595
|
label: "Current"
|
|
27596
27596
|
},
|
|
27597
|
-
[
|
|
27597
|
+
[K.AirQualitySensor]: {
|
|
27598
27598
|
icon: Hr,
|
|
27599
27599
|
label: "Air quality"
|
|
27600
27600
|
},
|
|
27601
|
-
[
|
|
27601
|
+
[K.BatterySensor]: {
|
|
27602
27602
|
icon: an,
|
|
27603
27603
|
label: "Battery"
|
|
27604
27604
|
},
|
|
27605
|
-
[
|
|
27605
|
+
[K.NumericSensor]: {
|
|
27606
27606
|
icon: un,
|
|
27607
27607
|
label: "Numeric sensor"
|
|
27608
27608
|
},
|
|
27609
|
-
[
|
|
27609
|
+
[K.EnumSensor]: {
|
|
27610
27610
|
icon: yn,
|
|
27611
27611
|
label: "Enum sensor"
|
|
27612
27612
|
},
|
|
27613
|
-
[
|
|
27613
|
+
[K.DateTimeSensor]: {
|
|
27614
27614
|
icon: kt,
|
|
27615
27615
|
label: "Date / time"
|
|
27616
27616
|
},
|
|
27617
|
-
[
|
|
27617
|
+
[K.GenericSensor]: {
|
|
27618
27618
|
icon: an,
|
|
27619
27619
|
label: "Sensor"
|
|
27620
27620
|
},
|
|
27621
|
-
[
|
|
27621
|
+
[K.NumericControl]: {
|
|
27622
27622
|
icon: fr,
|
|
27623
27623
|
label: "Numeric control"
|
|
27624
27624
|
},
|
|
27625
|
-
[
|
|
27625
|
+
[K.SelectControl]: {
|
|
27626
27626
|
icon: vn,
|
|
27627
27627
|
label: "Select control"
|
|
27628
27628
|
},
|
|
27629
|
-
[
|
|
27629
|
+
[K.TextControl]: {
|
|
27630
27630
|
icon: kr,
|
|
27631
27631
|
label: "Text control"
|
|
27632
27632
|
},
|
|
27633
|
-
[
|
|
27633
|
+
[K.DateTimeControl]: {
|
|
27634
27634
|
icon: kt,
|
|
27635
27635
|
label: "Date / time control"
|
|
27636
27636
|
},
|
|
27637
|
-
[
|
|
27637
|
+
[K.MobilePushNotifier]: {
|
|
27638
27638
|
icon: pr,
|
|
27639
27639
|
label: "Mobile push"
|
|
27640
27640
|
},
|
|
27641
|
-
[
|
|
27641
|
+
[K.MessagingNotifier]: {
|
|
27642
27642
|
icon: Dn,
|
|
27643
27643
|
label: "Messaging"
|
|
27644
27644
|
},
|
|
27645
|
-
[
|
|
27645
|
+
[K.EmailNotifier]: {
|
|
27646
27646
|
icon: Cn,
|
|
27647
27647
|
label: "Email"
|
|
27648
27648
|
},
|
|
27649
|
-
[
|
|
27649
|
+
[K.GenericNotifier]: {
|
|
27650
27650
|
icon: ot,
|
|
27651
27651
|
label: "Notifier"
|
|
27652
27652
|
}
|
|
27653
27653
|
}, SD = new Set(Object.values(W));
|
|
27654
|
-
new Set(Object.values(
|
|
27654
|
+
new Set(Object.values(K));
|
|
27655
27655
|
function CD(e) {
|
|
27656
27656
|
return SD.has(e);
|
|
27657
27657
|
}
|
|
27658
27658
|
var wD = bD[W.Generic];
|
|
27659
|
-
xD[
|
|
27659
|
+
xD[K.GenericSensor];
|
|
27660
27660
|
function TD(e) {
|
|
27661
27661
|
return CD(e) ? bD[e] ?? wD : wD;
|
|
27662
27662
|
}
|
|
@@ -27669,7 +27669,7 @@ Object.values(W).map((e) => {
|
|
|
27669
27669
|
label: t.label,
|
|
27670
27670
|
icon: t.icon
|
|
27671
27671
|
};
|
|
27672
|
-
}), b(), b(), b(), b(), _(null), b(), new Set([W.Sensor, W.Presence]), b(), b(), Object.freeze([]), b(), b(), b(), b(), b(), b(), b(), b(), b(), b(), b(), b(), WE({
|
|
27672
|
+
}), b(), b(), b(), b(), _(null), b(), new Set([W.Sensor, W.Presence]), b(), _({}), b(), b(), Object.freeze([]), b(), b(), b(), b(), b(), b(), b(), b(), b(), b(), b(), b(), WE({
|
|
27673
27673
|
id: ME(),
|
|
27674
27674
|
stableId: uE(),
|
|
27675
27675
|
addonId: uE(),
|
|
@@ -27681,7 +27681,7 @@ Object.values(W).map((e) => {
|
|
|
27681
27681
|
role: uE().nullable().optional(),
|
|
27682
27682
|
features: HE(uE()).optional(),
|
|
27683
27683
|
isCamera: IE().optional()
|
|
27684
|
-
}), b(), b(), b(), b();
|
|
27684
|
+
}), b(), b(), b(), b(), b();
|
|
27685
27685
|
//#endregion
|
|
27686
27686
|
//#region ../ui-library/src/composites/hls-quality.ts
|
|
27687
27687
|
function ED(e, t) {
|
|
@@ -27956,12 +27956,12 @@ function ID({ schema: e, steps: t, onChange: n, templates: r, selectedTemplateId
|
|
|
27956
27956
|
let e = window.prompt("Template name:");
|
|
27957
27957
|
e?.trim() && o(e.trim(), t);
|
|
27958
27958
|
}
|
|
27959
|
-
function
|
|
27959
|
+
function j() {
|
|
27960
27960
|
if (!i) return;
|
|
27961
27961
|
let e = r.find((e) => e.id === i);
|
|
27962
27962
|
e && window.confirm(`Delete template "${e.name}"?`) && c(i);
|
|
27963
27963
|
}
|
|
27964
|
-
function
|
|
27964
|
+
function ee(e) {
|
|
27965
27965
|
n(t.map((t) => t.addonId === e.addonId ? te(e) : t));
|
|
27966
27966
|
}
|
|
27967
27967
|
function te(e) {
|
|
@@ -28021,7 +28021,7 @@ function ID({ schema: e, steps: t, onChange: n, templates: r, selectedTemplateId
|
|
|
28021
28021
|
step: r,
|
|
28022
28022
|
schema: w.get(r.addonId) ?? null,
|
|
28023
28023
|
allSchemas: w,
|
|
28024
|
-
onChange:
|
|
28024
|
+
onChange: ee,
|
|
28025
28025
|
onDelete: u ? void 0 : (e) => n(t.filter((t) => t.addonId !== e)),
|
|
28026
28026
|
readOnly: u,
|
|
28027
28027
|
...S(r.addonId)
|
|
@@ -28042,13 +28042,13 @@ function ID({ schema: e, steps: t, onChange: n, templates: r, selectedTemplateId
|
|
|
28042
28042
|
allSchemas: w,
|
|
28043
28043
|
depth: 1,
|
|
28044
28044
|
onChange: (e) => {
|
|
28045
|
-
|
|
28045
|
+
ee({
|
|
28046
28046
|
...r,
|
|
28047
28047
|
children: r.children.map((t) => t.addonId === e.addonId ? e : t)
|
|
28048
28048
|
});
|
|
28049
28049
|
},
|
|
28050
28050
|
onDelete: u ? void 0 : (e) => {
|
|
28051
|
-
|
|
28051
|
+
ee({
|
|
28052
28052
|
...r,
|
|
28053
28053
|
children: r.children.filter((t) => t.addonId !== e)
|
|
28054
28054
|
});
|
|
@@ -28068,7 +28068,7 @@ function ID({ schema: e, steps: t, onChange: n, templates: r, selectedTemplateId
|
|
|
28068
28068
|
allSchemas: w,
|
|
28069
28069
|
depth: 2,
|
|
28070
28070
|
onChange: (t) => {
|
|
28071
|
-
|
|
28071
|
+
ee({
|
|
28072
28072
|
...r,
|
|
28073
28073
|
children: r.children.map((n) => n.addonId === e.addonId ? {
|
|
28074
28074
|
...n,
|
|
@@ -28077,7 +28077,7 @@ function ID({ schema: e, steps: t, onChange: n, templates: r, selectedTemplateId
|
|
|
28077
28077
|
});
|
|
28078
28078
|
},
|
|
28079
28079
|
onDelete: u ? void 0 : (t) => {
|
|
28080
|
-
|
|
28080
|
+
ee({
|
|
28081
28081
|
...r,
|
|
28082
28082
|
children: r.children.map((n) => n.addonId === e.addonId ? {
|
|
28083
28083
|
...n,
|
|
@@ -28092,7 +28092,7 @@ function ID({ schema: e, steps: t, onChange: n, templates: r, selectedTemplateId
|
|
|
28092
28092
|
addon: t,
|
|
28093
28093
|
onClick: () => {
|
|
28094
28094
|
let n = PD(t);
|
|
28095
|
-
|
|
28095
|
+
ee({
|
|
28096
28096
|
...r,
|
|
28097
28097
|
children: r.children.map((t) => t.addonId === e.addonId ? {
|
|
28098
28098
|
...t,
|
|
@@ -28153,7 +28153,7 @@ function ID({ schema: e, steps: t, onChange: n, templates: r, selectedTemplateId
|
|
|
28153
28153
|
children: /* @__PURE__ */ V(Lt, { className: "h-4 w-4" })
|
|
28154
28154
|
}),
|
|
28155
28155
|
/* @__PURE__ */ V("button", {
|
|
28156
|
-
onClick:
|
|
28156
|
+
onClick: j,
|
|
28157
28157
|
disabled: !i || u,
|
|
28158
28158
|
title: "Delete",
|
|
28159
28159
|
className: Z("p-2 rounded-lg border border-border transition-colors", i && !u ? "text-foreground-subtle hover:text-danger" : "text-foreground-subtle/30 cursor-not-allowed"),
|
|
@@ -28437,34 +28437,34 @@ function JD({ className: e }) {
|
|
|
28437
28437
|
]
|
|
28438
28438
|
});
|
|
28439
28439
|
}
|
|
28440
|
-
function YD({ serverUrl: e, createSession: t, sendAnswer: n, handleOffer: r, getIceServers: i, addIceCandidate: a, getIceCandidates: s, closeSession: c, getSessionState: d, getSessionDebug: f, playbackUrl: p, playbackFormat: m, playbackAuthToken: g, onExitPlayback: _, posterUrl: y, streams: b, activeStreamId: x, onStreamChange: S, deviceName: C, phase: w, pipelineMetrics: T, detections: E, stationaryObjects: D, defaultShowDetections: O = !0, defaultShowMotion: k = !1, streamStats: A, autoPlay:
|
|
28441
|
-
let ce = P(), le = Wl(), [ue, de] = l(
|
|
28440
|
+
function YD({ serverUrl: e, createSession: t, sendAnswer: n, handleOffer: r, getIceServers: i, addIceCandidate: a, getIceCandidates: s, closeSession: c, getSessionState: d, getSessionDebug: f, playbackUrl: p, playbackFormat: m, playbackAuthToken: g, onExitPlayback: _, posterUrl: y, streams: b, activeStreamId: x, onStreamChange: S, deviceName: C, phase: w, pipelineMetrics: T, detections: E, stationaryObjects: D, defaultShowDetections: O = !0, defaultShowMotion: k = !1, streamStats: A, autoPlay: j = !1, showPlayStop: ee = !1, snapshotSrc: te, snapshotLoading: M = !1, onRefreshSnapshot: ne, showStreamStats: N = !1, children: re, extraOverlay: F, ptzAvailable: I = !1, ptzShown: L = !1, ptzOverlay: R, onPtzToggle: z, intercomAvailable: ie = !1, intercomShown: B = !1, onIntercomToggle: ae, chromeless: oe = !1, className: se }) {
|
|
28441
|
+
let ce = P(), le = Wl(), [ue, de] = l(j), [fe, pe] = l(O), [W, G] = l(!0), [me, he] = l(!0), [ge, _e] = l(k), [ve, ye] = l(null), [be, xe] = l([]), [K, q] = l(-1), [Se, Ce] = l(!1), we = u(null);
|
|
28442
28442
|
v(() => {
|
|
28443
|
-
if (!
|
|
28443
|
+
if (!Se) return;
|
|
28444
28444
|
function e(e) {
|
|
28445
|
-
|
|
28445
|
+
we.current && !we.current.contains(e.target) && Ce(!1);
|
|
28446
28446
|
}
|
|
28447
28447
|
return document.addEventListener("mousedown", e), () => document.removeEventListener("mousedown", e);
|
|
28448
|
-
}, [
|
|
28449
|
-
|
|
28448
|
+
}, [Se]), v(() => {
|
|
28449
|
+
q(-1);
|
|
28450
28450
|
}, [p]);
|
|
28451
|
-
let
|
|
28451
|
+
let Te = o((e) => {
|
|
28452
28452
|
xe(e);
|
|
28453
|
-
}, []),
|
|
28454
|
-
status:
|
|
28455
|
-
inputFps:
|
|
28456
|
-
bitrateKbps:
|
|
28457
|
-
},
|
|
28458
|
-
ye(e), S?.(e), ue &&
|
|
28459
|
-
},
|
|
28460
|
-
let e =
|
|
28453
|
+
}, []), Ee = x ?? ve ?? b?.[0]?.id ?? "", De = b?.find((e) => e.id === Ee) ?? b?.[0], Oe = De?.inputFps == null ? null : {
|
|
28454
|
+
status: De.status ?? "unknown",
|
|
28455
|
+
inputFps: De.inputFps,
|
|
28456
|
+
bitrateKbps: De.bitrateKbps ?? 0
|
|
28457
|
+
}, ke = (e) => {
|
|
28458
|
+
ye(e), S?.(e), ue && ee && (de(!1), setTimeout(() => de(!0), 50));
|
|
28459
|
+
}, Ae = h(() => {
|
|
28460
|
+
let e = De?.target;
|
|
28461
28461
|
if (!(!e || !t)) return (n) => t(e, n);
|
|
28462
|
-
}, [t,
|
|
28463
|
-
let e =
|
|
28462
|
+
}, [t, De]), je = h(() => {
|
|
28463
|
+
let e = De?.target;
|
|
28464
28464
|
if (!(!e || !r)) return (t, n) => r(e, t, n);
|
|
28465
|
-
}, [r,
|
|
28465
|
+
}, [r, De]), Me = h(() => {
|
|
28466
28466
|
if (r) return (e, t, n) => r(n, t, e);
|
|
28467
|
-
}, [r]),
|
|
28467
|
+
}, [r]), Ne = b, Pe = () => de(!0), Fe = () => de(!1), Ie = T?.phase ?? w, Le = Ie === "active", Re = !!E, ze = Re && (fe || ge), Be = I && L && !!R, Ve = !!p, He = Ve || (ee ? ue : !0);
|
|
28468
28468
|
return /* @__PURE__ */ H("div", {
|
|
28469
28469
|
className: `overflow-hidden ${oe ? "" : "rounded-xl border border-border bg-surface"} ${se ?? ""}`,
|
|
28470
28470
|
children: [
|
|
@@ -28473,19 +28473,19 @@ function YD({ serverUrl: e, createSession: t, sendAnswer: n, handleOffer: r, get
|
|
|
28473
28473
|
children: [/* @__PURE__ */ H("div", {
|
|
28474
28474
|
className: "flex items-center gap-2 min-w-0",
|
|
28475
28475
|
children: [
|
|
28476
|
-
(A ??
|
|
28476
|
+
(A ?? Oe) && /* @__PURE__ */ V("span", { className: `shrink-0 w-2 h-2 rounded-full ${zD((A ?? Oe).status)}` }),
|
|
28477
28477
|
C && /* @__PURE__ */ V("span", {
|
|
28478
28478
|
className: "text-xs font-medium text-foreground truncate",
|
|
28479
28479
|
children: C
|
|
28480
28480
|
}),
|
|
28481
|
-
!
|
|
28481
|
+
!Ve && Ne && Ne.length > 1 && /* @__PURE__ */ H("div", {
|
|
28482
28482
|
className: "relative",
|
|
28483
28483
|
children: [/* @__PURE__ */ V("select", {
|
|
28484
28484
|
"data-testid": "stream-profile-select",
|
|
28485
|
-
value:
|
|
28486
|
-
onChange: (e) =>
|
|
28485
|
+
value: Ee,
|
|
28486
|
+
onChange: (e) => ke(e.target.value),
|
|
28487
28487
|
className: "appearance-none cursor-pointer rounded-md border border-border bg-surface-hover hover:bg-surface text-foreground text-[11px] font-medium pl-2 pr-6 py-1 focus:outline-none focus:ring-1 focus:ring-primary transition-colors",
|
|
28488
|
-
children:
|
|
28488
|
+
children: Ne.map((e) => /* @__PURE__ */ V("option", {
|
|
28489
28489
|
value: e.id,
|
|
28490
28490
|
children: e.label
|
|
28491
28491
|
}, e.id))
|
|
@@ -28503,12 +28503,12 @@ function YD({ serverUrl: e, createSession: t, sendAnswer: n, handleOffer: r, get
|
|
|
28503
28503
|
})
|
|
28504
28504
|
})]
|
|
28505
28505
|
}),
|
|
28506
|
-
|
|
28506
|
+
Ve && be.length > 1 && /* @__PURE__ */ H("div", {
|
|
28507
28507
|
className: "relative",
|
|
28508
28508
|
children: [/* @__PURE__ */ V("select", {
|
|
28509
28509
|
"data-testid": "vod-quality-select",
|
|
28510
|
-
value:
|
|
28511
|
-
onChange: (e) =>
|
|
28510
|
+
value: K,
|
|
28511
|
+
onChange: (e) => q(Number(e.target.value)),
|
|
28512
28512
|
className: "appearance-none cursor-pointer rounded-md border border-border bg-surface-hover hover:bg-surface text-foreground text-[11px] font-medium pl-2 pr-6 py-1 focus:outline-none focus:ring-1 focus:ring-primary transition-colors",
|
|
28513
28513
|
children: be.map((e) => /* @__PURE__ */ V("option", {
|
|
28514
28514
|
value: e.value,
|
|
@@ -28532,7 +28532,7 @@ function YD({ serverUrl: e, createSession: t, sendAnswer: n, handleOffer: r, get
|
|
|
28532
28532
|
}), /* @__PURE__ */ H("div", {
|
|
28533
28533
|
className: "flex items-center gap-1.5 shrink-0 ml-auto",
|
|
28534
28534
|
children: [
|
|
28535
|
-
ie && !
|
|
28535
|
+
ie && !Ve && /* @__PURE__ */ H("button", {
|
|
28536
28536
|
"data-testid": "stream-intercom-toggle",
|
|
28537
28537
|
"data-intercom-shown": B ? "true" : "false",
|
|
28538
28538
|
onClick: ae,
|
|
@@ -28559,19 +28559,19 @@ function YD({ serverUrl: e, createSession: t, sendAnswer: n, handleOffer: r, get
|
|
|
28559
28559
|
})]
|
|
28560
28560
|
}, e.id);
|
|
28561
28561
|
}),
|
|
28562
|
-
|
|
28562
|
+
ee && /* @__PURE__ */ H("button", {
|
|
28563
28563
|
"data-testid": "stream-play-toggle",
|
|
28564
|
-
"data-stream-playing":
|
|
28565
|
-
"data-vod":
|
|
28566
|
-
onClick:
|
|
28567
|
-
className: `inline-flex items-center gap-1 rounded-md px-2 py-1 text-xs font-medium transition-colors ${
|
|
28568
|
-
title:
|
|
28569
|
-
children: [V(
|
|
28564
|
+
"data-stream-playing": He ? "true" : "false",
|
|
28565
|
+
"data-vod": Ve ? "true" : "false",
|
|
28566
|
+
onClick: Ve ? _ : He ? Fe : Pe,
|
|
28567
|
+
className: `inline-flex items-center gap-1 rounded-md px-2 py-1 text-xs font-medium transition-colors ${Ve ? "bg-primary/10 text-primary hover:bg-primary/20" : He ? "bg-danger/10 text-danger hover:bg-danger/20" : "bg-primary/10 text-primary hover:bg-primary/20"}`,
|
|
28568
|
+
title: Ve ? "Return to live" : He ? "Stop stream" : "Start stream",
|
|
28569
|
+
children: [V(Ve ? KD : He ? HD : VD, { className: "h-3 w-3" }), /* @__PURE__ */ V("span", {
|
|
28570
28570
|
className: "hidden xl:inline",
|
|
28571
|
-
children:
|
|
28571
|
+
children: Ve ? "Live" : He ? "Stop" : "Play"
|
|
28572
28572
|
})]
|
|
28573
28573
|
}),
|
|
28574
|
-
ne && !
|
|
28574
|
+
ne && !Ve && /* @__PURE__ */ H("button", {
|
|
28575
28575
|
"data-testid": "stream-snapshot-refresh",
|
|
28576
28576
|
onClick: ne,
|
|
28577
28577
|
disabled: M,
|
|
@@ -28582,15 +28582,15 @@ function YD({ serverUrl: e, createSession: t, sendAnswer: n, handleOffer: r, get
|
|
|
28582
28582
|
children: "Snapshot"
|
|
28583
28583
|
})]
|
|
28584
28584
|
}),
|
|
28585
|
-
(
|
|
28586
|
-
ref:
|
|
28585
|
+
(Re || I || T || Ie || A || Oe && Oe.inputFps > 0) && /* @__PURE__ */ H("div", {
|
|
28586
|
+
ref: we,
|
|
28587
28587
|
className: "relative",
|
|
28588
28588
|
children: [/* @__PURE__ */ V("button", {
|
|
28589
|
-
onClick: () =>
|
|
28589
|
+
onClick: () => Ce((e) => !e),
|
|
28590
28590
|
title: "More controls",
|
|
28591
28591
|
className: "inline-flex items-center justify-center rounded-md p-1 text-foreground-subtle hover:text-foreground hover:bg-surface-hover transition-colors",
|
|
28592
28592
|
children: /* @__PURE__ */ V(WD, { className: "h-3.5 w-3.5" })
|
|
28593
|
-
}),
|
|
28593
|
+
}), Se && /* @__PURE__ */ H("div", {
|
|
28594
28594
|
className: "absolute right-0 top-full mt-1 z-30 min-w-[200px] rounded-lg border border-border bg-surface shadow-xl py-1.5",
|
|
28595
28595
|
children: [
|
|
28596
28596
|
N && A && /* @__PURE__ */ H("div", {
|
|
@@ -28619,30 +28619,30 @@ function YD({ serverUrl: e, createSession: t, sendAnswer: n, handleOffer: r, get
|
|
|
28619
28619
|
})
|
|
28620
28620
|
]
|
|
28621
28621
|
}),
|
|
28622
|
-
!N &&
|
|
28622
|
+
!N && Oe && Oe.inputFps > 0 && /* @__PURE__ */ H("div", {
|
|
28623
28623
|
className: "px-3 py-1.5 text-[10px] text-foreground-subtle border-b border-border-subtle",
|
|
28624
28624
|
children: [/* @__PURE__ */ H("div", {
|
|
28625
28625
|
className: "flex justify-between gap-3",
|
|
28626
28626
|
children: [/* @__PURE__ */ V("span", { children: "Input" }), /* @__PURE__ */ H("span", {
|
|
28627
28627
|
className: "tabular-nums text-foreground",
|
|
28628
|
-
children: [
|
|
28628
|
+
children: [Oe.inputFps.toFixed(1), " fps"]
|
|
28629
28629
|
})]
|
|
28630
|
-
}),
|
|
28630
|
+
}), Oe.bitrateKbps > 0 && /* @__PURE__ */ H("div", {
|
|
28631
28631
|
className: "flex justify-between gap-3",
|
|
28632
28632
|
children: [/* @__PURE__ */ V("span", { children: "Bitrate" }), /* @__PURE__ */ H("span", {
|
|
28633
28633
|
className: "tabular-nums text-foreground",
|
|
28634
|
-
children: [
|
|
28634
|
+
children: [Oe.bitrateKbps, " kbps"]
|
|
28635
28635
|
})]
|
|
28636
28636
|
})]
|
|
28637
28637
|
}),
|
|
28638
|
-
(T ||
|
|
28638
|
+
(T || Re && Ie) && /* @__PURE__ */ H("div", {
|
|
28639
28639
|
className: "px-3 py-1.5 text-[10px] text-foreground-subtle border-b border-border-subtle",
|
|
28640
28640
|
children: [
|
|
28641
28641
|
/* @__PURE__ */ H("div", {
|
|
28642
28642
|
className: "flex justify-between gap-3 items-center",
|
|
28643
28643
|
children: [/* @__PURE__ */ V("span", { children: "Phase" }), /* @__PURE__ */ H("span", {
|
|
28644
|
-
className: `flex items-center gap-1 font-semibold uppercase tracking-wider ${
|
|
28645
|
-
children: [/* @__PURE__ */ V("span", { className: `w-1.5 h-1.5 rounded-full ${
|
|
28644
|
+
className: `flex items-center gap-1 font-semibold uppercase tracking-wider ${Le ? "text-red-400" : "text-emerald-400"}`,
|
|
28645
|
+
children: [/* @__PURE__ */ V("span", { className: `w-1.5 h-1.5 rounded-full ${Le ? "bg-red-500 animate-pulse" : "bg-emerald-500"}` }), Le ? "Active" : "Watching"]
|
|
28646
28646
|
})]
|
|
28647
28647
|
}),
|
|
28648
28648
|
T && T.detectionFps > 0 && /* @__PURE__ */ H("div", {
|
|
@@ -28661,7 +28661,7 @@ function YD({ serverUrl: e, createSession: t, sendAnswer: n, handleOffer: r, get
|
|
|
28661
28661
|
})
|
|
28662
28662
|
]
|
|
28663
28663
|
}),
|
|
28664
|
-
|
|
28664
|
+
Re && /* @__PURE__ */ H(U, { children: [
|
|
28665
28665
|
/* @__PURE__ */ V(GD, {
|
|
28666
28666
|
label: "Show detections",
|
|
28667
28667
|
active: fe,
|
|
@@ -28686,7 +28686,7 @@ function YD({ serverUrl: e, createSession: t, sendAnswer: n, handleOffer: r, get
|
|
|
28686
28686
|
label: "PTZ controls",
|
|
28687
28687
|
active: L,
|
|
28688
28688
|
onClick: () => {
|
|
28689
|
-
z?.(),
|
|
28689
|
+
z?.(), Ce(!1);
|
|
28690
28690
|
}
|
|
28691
28691
|
})
|
|
28692
28692
|
]
|
|
@@ -28701,21 +28701,21 @@ function YD({ serverUrl: e, createSession: t, sendAnswer: n, handleOffer: r, get
|
|
|
28701
28701
|
url: p,
|
|
28702
28702
|
...m ? { format: m } : {},
|
|
28703
28703
|
authToken: g ?? null,
|
|
28704
|
-
onQualityOptions:
|
|
28705
|
-
selectedLevel:
|
|
28704
|
+
onQualityOptions: Te,
|
|
28705
|
+
selectedLevel: K,
|
|
28706
28706
|
...y ? { posterUrl: y } : {}
|
|
28707
|
-
}), F ||
|
|
28708
|
-
}) :
|
|
28707
|
+
}), F || Be ? /* @__PURE__ */ H(U, { children: [F, Be && R] }) : null]
|
|
28708
|
+
}) : He && e ? /* @__PURE__ */ V("div", {
|
|
28709
28709
|
className: "aspect-video relative",
|
|
28710
28710
|
children: /* @__PURE__ */ V(Rp, {
|
|
28711
28711
|
serverUrl: e,
|
|
28712
|
-
streamKey:
|
|
28712
|
+
streamKey: Ee,
|
|
28713
28713
|
autoPlay: !0,
|
|
28714
28714
|
className: "w-full h-full",
|
|
28715
|
-
createSession:
|
|
28715
|
+
createSession: Ae,
|
|
28716
28716
|
sendAnswer: n,
|
|
28717
|
-
handleOffer:
|
|
28718
|
-
reoffer:
|
|
28717
|
+
handleOffer: je,
|
|
28718
|
+
reoffer: Me,
|
|
28719
28719
|
getSessionState: d,
|
|
28720
28720
|
...f ? { getSessionDebug: f } : {},
|
|
28721
28721
|
getIceServers: i,
|
|
@@ -28724,8 +28724,8 @@ function YD({ serverUrl: e, createSession: t, sendAnswer: n, handleOffer: r, get
|
|
|
28724
28724
|
closeSession: c,
|
|
28725
28725
|
...le.bindControlChannel ? { onControlChannel: le.bindControlChannel } : {},
|
|
28726
28726
|
...y ? { posterUrl: y } : {},
|
|
28727
|
-
overlay:
|
|
28728
|
-
|
|
28727
|
+
overlay: ze || F || Be ? /* @__PURE__ */ H(U, { children: [
|
|
28728
|
+
ze && /* @__PURE__ */ V(em, {
|
|
28729
28729
|
detections: E,
|
|
28730
28730
|
showPhaseIndicator: !1,
|
|
28731
28731
|
showMotionZones: ge,
|
|
@@ -28736,16 +28736,16 @@ function YD({ serverUrl: e, createSession: t, sendAnswer: n, handleOffer: r, get
|
|
|
28736
28736
|
...D === void 0 ? {} : { stationaryObjects: D }
|
|
28737
28737
|
}),
|
|
28738
28738
|
F,
|
|
28739
|
-
|
|
28739
|
+
Be && R
|
|
28740
28740
|
] }) : void 0
|
|
28741
28741
|
})
|
|
28742
28742
|
}) : /* @__PURE__ */ V(XD, {
|
|
28743
28743
|
src: te ?? null,
|
|
28744
28744
|
isLoading: M,
|
|
28745
|
-
onPlay:
|
|
28745
|
+
onPlay: Pe,
|
|
28746
28746
|
onRetry: ne,
|
|
28747
|
-
extraOverlay: F ||
|
|
28748
|
-
suppressPlayHover: !!F ||
|
|
28747
|
+
extraOverlay: F || Be ? /* @__PURE__ */ H(U, { children: [F, Be && R] }) : null,
|
|
28748
|
+
suppressPlayHover: !!F || Be
|
|
28749
28749
|
}),
|
|
28750
28750
|
re
|
|
28751
28751
|
]
|
|
@@ -29132,7 +29132,7 @@ function lO(e, t, n = 5e3) {
|
|
|
29132
29132
|
}, [e, t])
|
|
29133
29133
|
};
|
|
29134
29134
|
}
|
|
29135
|
-
b(), b(), b(), d(() => import("./MaskShapeCanvas-BDvrLf-K.mjs").then((e) => ({ default: e.MaskShapeCanvas }))), d(() => import("./MotionZonesSettings-
|
|
29135
|
+
b(), b(), b(), d(() => import("./MaskShapeCanvas-BDvrLf-K.mjs").then((e) => ({ default: e.MaskShapeCanvas }))), d(() => import("./MotionZonesSettings-yEjr0atj.mjs").then((e) => ({ default: e.MotionZonesSettings }))), d(() => import("./SceneMonitorEditor-hmy5Xiu8.mjs").then((e) => ({ default: e.SceneMonitorEditor }))), d(() => import("./PrivacyMaskSettings-Cxsijo16.mjs").then((e) => ({ default: e.PrivacyMaskSettings })));
|
|
29136
29136
|
//#endregion
|
|
29137
29137
|
//#region src/components/NodeSelector.tsx
|
|
29138
29138
|
function uO({ selectedNodeId: e, onSelect: t }) {
|
|
@@ -29252,9 +29252,9 @@ function hO({ trpc: e, nodeId: t }) {
|
|
|
29252
29252
|
} catch (e) {
|
|
29253
29253
|
console.warn("[benchmark:audio] Failed to load audio:", e), c(null);
|
|
29254
29254
|
}
|
|
29255
|
-
}, [e, t]),
|
|
29255
|
+
}, [e, t]), j = async (e) => {
|
|
29256
29256
|
a(e), g(null), p(""), await A(e);
|
|
29257
|
-
},
|
|
29257
|
+
}, ee = (e, t) => {
|
|
29258
29258
|
p(`Upload is not supported for audio: runAudioTest has no payload field for an uploaded file, so "${t}" cannot be classified. Pick a reference WAV above.`), c(mO(e));
|
|
29259
29259
|
}, te = async () => {
|
|
29260
29260
|
d(!0), p(""), g(null);
|
|
@@ -29386,9 +29386,9 @@ function hO({ trpc: e, nodeId: t }) {
|
|
|
29386
29386
|
})),
|
|
29387
29387
|
selectedFilename: i,
|
|
29388
29388
|
onSelect: (e) => {
|
|
29389
|
-
|
|
29389
|
+
j(e);
|
|
29390
29390
|
},
|
|
29391
|
-
onUpload: (e, t) =>
|
|
29391
|
+
onUpload: (e, t) => ee(e, t),
|
|
29392
29392
|
accept: ".wav,audio/wav",
|
|
29393
29393
|
uploadLabel: "Upload WAV (preview only)"
|
|
29394
29394
|
}),
|
|
@@ -30500,7 +30500,7 @@ function ik({ label: e, hint: t, value: n, min: r, max: i, step: a, disabled: o,
|
|
|
30500
30500
|
});
|
|
30501
30501
|
}
|
|
30502
30502
|
function ak({ trpc: e, nodeId: t, onNodeChange: n }) {
|
|
30503
|
-
let [r, i] = l([]), [a, s] = l(""), [c, d] = l(null), [f, p] = l(null), [m, g] = l(null), [_, y] = l(null), [b, x] = l(yO), [S, C] = l(null), [w, T] = l(null), [E, D] = l(null), [O, k] = l(!1), [A,
|
|
30503
|
+
let [r, i] = l([]), [a, s] = l(""), [c, d] = l(null), [f, p] = l(null), [m, g] = l(null), [_, y] = l(null), [b, x] = l(yO), [S, C] = l(null), [w, T] = l(null), [E, D] = l(null), [O, k] = l(!1), [A, j] = l(!1), [ee, te] = l(""), [M, ne] = l([]), [N, P] = l([]), re = u(null), F = u(null), I = o((e) => {
|
|
30504
30504
|
x((t) => ({
|
|
30505
30505
|
...t,
|
|
30506
30506
|
...e
|
|
@@ -30666,7 +30666,7 @@ function ak({ trpc: e, nodeId: t, onNodeChange: n }) {
|
|
|
30666
30666
|
}
|
|
30667
30667
|
}, W = async () => {
|
|
30668
30668
|
if (w) {
|
|
30669
|
-
|
|
30669
|
+
j(!0);
|
|
30670
30670
|
try {
|
|
30671
30671
|
await e.addons.custom.mutate({
|
|
30672
30672
|
addonId: rk,
|
|
@@ -30676,7 +30676,7 @@ function ak({ trpc: e, nodeId: t, onNodeChange: n }) {
|
|
|
30676
30676
|
} catch (e) {
|
|
30677
30677
|
te(e instanceof Error ? e.message : String(e));
|
|
30678
30678
|
} finally {
|
|
30679
|
-
|
|
30679
|
+
j(!1);
|
|
30680
30680
|
}
|
|
30681
30681
|
}
|
|
30682
30682
|
}, G = O || B;
|
|
@@ -30970,9 +30970,9 @@ function ak({ trpc: e, nodeId: t, onNodeChange: n }) {
|
|
|
30970
30970
|
className: "rounded-md bg-danger/10 border border-danger/20 px-3 py-2 text-xs text-danger space-y-1",
|
|
30971
30971
|
children: M.map((e) => /* @__PURE__ */ V("div", { children: e }, e))
|
|
30972
30972
|
}),
|
|
30973
|
-
|
|
30973
|
+
ee && /* @__PURE__ */ V("div", {
|
|
30974
30974
|
className: "rounded-md bg-danger/10 border border-danger/20 px-3 py-2 text-xs text-danger",
|
|
30975
|
-
children:
|
|
30975
|
+
children: ee
|
|
30976
30976
|
}),
|
|
30977
30977
|
E?.state === "failed" && E.error && /* @__PURE__ */ H("div", {
|
|
30978
30978
|
className: "rounded-md bg-danger/10 border border-danger/20 px-3 py-2 text-xs text-danger",
|
|
@@ -31145,7 +31145,7 @@ function ok(e, t) {
|
|
|
31145
31145
|
}
|
|
31146
31146
|
}
|
|
31147
31147
|
function sk({ trpc: e, nodeId: t }) {
|
|
31148
|
-
let [n, r] = l([]), [i, a] = l(""), [o, s] = l(3), [c, d] = l(25), [f, p] = l("jpeg"), [m, h] = l("duration"), [g, _] = l(60), [y, b] = l(1e3), [x, S] = l(15), [C, w] = l(2e3), [T, E] = l(5), [D, O] = l(20), [k] = l("decoder-nodeav"), [A,
|
|
31148
|
+
let [n, r] = l([]), [i, a] = l(""), [o, s] = l(3), [c, d] = l(25), [f, p] = l("jpeg"), [m, h] = l("duration"), [g, _] = l(60), [y, b] = l(1e3), [x, S] = l(15), [C, w] = l(2e3), [T, E] = l(5), [D, O] = l(20), [k] = l("decoder-nodeav"), [A, j] = l(""), [ee, te] = l(""), [M] = l(0), [ne, N] = l(null), [P, re] = l(!1), [F, I] = l(""), [L, R] = l(null), [z, ie] = l("idle"), [B, ae] = l(null), [oe, U] = l(!0), se = u(null);
|
|
31149
31149
|
return v(() => {
|
|
31150
31150
|
e.addons.custom.mutate({
|
|
31151
31151
|
addonId: "benchmark",
|
|
@@ -31163,9 +31163,9 @@ function sk({ trpc: e, nodeId: t }) {
|
|
|
31163
31163
|
nodeId: t
|
|
31164
31164
|
}).then((e) => {
|
|
31165
31165
|
let t = e;
|
|
31166
|
-
|
|
31166
|
+
j(String(ok(t, "hwaccel") ?? "")), te(String(ok(t, "probedBestHwaccel") ?? ""));
|
|
31167
31167
|
}).catch((e) => {
|
|
31168
|
-
console.warn("[benchmark:decoder] addon-settings fetch failed:", e),
|
|
31168
|
+
console.warn("[benchmark:decoder] addon-settings fetch failed:", e), j(""), te("");
|
|
31169
31169
|
});
|
|
31170
31170
|
}, [
|
|
31171
31171
|
e,
|
|
@@ -31230,7 +31230,7 @@ function sk({ trpc: e, nodeId: t }) {
|
|
|
31230
31230
|
" ",
|
|
31231
31231
|
/* @__PURE__ */ V("span", {
|
|
31232
31232
|
className: "font-mono text-foreground",
|
|
31233
|
-
children: ne || A ||
|
|
31233
|
+
children: ne || A || ee || "none"
|
|
31234
31234
|
}),
|
|
31235
31235
|
" ",
|
|
31236
31236
|
"for this run."
|
|
@@ -31436,7 +31436,7 @@ function sk({ trpc: e, nodeId: t }) {
|
|
|
31436
31436
|
I(""), ae(null), R(null), ie("init");
|
|
31437
31437
|
let r = `decoder-${Date.now()}-${Math.random().toString(36).slice(2, 10)}`;
|
|
31438
31438
|
se.current = r, re(!0);
|
|
31439
|
-
let a = ne || A ||
|
|
31439
|
+
let a = ne || A || ee || "none", s = {
|
|
31440
31440
|
sessionId: r,
|
|
31441
31441
|
nodeId: t,
|
|
31442
31442
|
cameras: o,
|
|
@@ -32200,7 +32200,7 @@ function wk({ trpc: e, nodeId: t, onNodeChange: n }) {
|
|
|
32200
32200
|
let [r, i] = l(null), [a, s] = l([]), [c, d] = l(null), [f, p] = l([]), [m, h] = l(""), [g, _] = l(null), [y, b] = l(""), [x, S] = l(null), [C, w] = l({
|
|
32201
32201
|
w: 640,
|
|
32202
32202
|
h: 480
|
|
32203
|
-
}), [T, E] = l([]), [D, O] = l(null), [k, A] = l(null), [
|
|
32203
|
+
}), [T, E] = l([]), [D, O] = l(null), [k, A] = l(null), [j, ee] = l(null), [te, M] = l(!1), [ne, N] = l(""), [P, re] = l(null), [F, I] = l(!0), [L, R] = l([]), [z, ie] = l(200), [B, ae] = l(4), [oe, U] = l(1), [se, ce] = l(!1), [le, ue] = l(null), [de, fe] = l(null), [pe, W] = l(null), [G, me] = l(null), he = u(null), [ge, _e] = l(/* @__PURE__ */ new Set()), ve = o((e, t) => {
|
|
32204
32204
|
_e((n) => {
|
|
32205
32205
|
let r = new Set(n);
|
|
32206
32206
|
return t ? r.delete(e) : r.add(e), r;
|
|
@@ -32288,7 +32288,7 @@ function wk({ trpc: e, nodeId: t, onNodeChange: n }) {
|
|
|
32288
32288
|
} catch (e) {
|
|
32289
32289
|
console.warn("[benchmark:image] Failed to load image:", e);
|
|
32290
32290
|
}
|
|
32291
|
-
}, xe =
|
|
32291
|
+
}, xe = j ? _O(j.steps) : T.map((e) => Ck(e)), K = async () => {
|
|
32292
32292
|
M(!0), N(""), re(null), R([]);
|
|
32293
32293
|
let n = `ui-${Date.now()}-${Math.random().toString(36).slice(2, 10)}`;
|
|
32294
32294
|
he.current = n;
|
|
@@ -32314,7 +32314,7 @@ function wk({ trpc: e, nodeId: t, onNodeChange: n }) {
|
|
|
32314
32314
|
} finally {
|
|
32315
32315
|
he.current = null, M(!1);
|
|
32316
32316
|
}
|
|
32317
|
-
},
|
|
32317
|
+
}, q = async (n) => {
|
|
32318
32318
|
if (!g) {
|
|
32319
32319
|
N("No image loaded");
|
|
32320
32320
|
return;
|
|
@@ -32388,10 +32388,10 @@ function wk({ trpc: e, nodeId: t, onNodeChange: n }) {
|
|
|
32388
32388
|
className: "text-sm text-foreground-subtle animate-pulse py-8 text-center",
|
|
32389
32389
|
children: "Loading..."
|
|
32390
32390
|
});
|
|
32391
|
-
let
|
|
32392
|
-
for (let e of
|
|
32393
|
-
let
|
|
32394
|
-
for (let e of
|
|
32391
|
+
let Se = C.w, Ce = C.h, we = P?.detections ? [...P.detections] : [], Te = /* @__PURE__ */ new Set();
|
|
32392
|
+
for (let e of we) e.kind === "first-level" && ge.has(e.id) && Te.add(e.id);
|
|
32393
|
+
let Ee = we.filter((e) => !(ge.has(e.id) || e.kind === "detail" && e.parentId && Te.has(e.parentId))), De = {}, Oe = P?.debug?.stepTimings ?? [];
|
|
32394
|
+
for (let e of Oe) De[`${e.source}${e.modelId ? ` (${e.modelId})` : ""}`] = e.ms;
|
|
32395
32395
|
return /* @__PURE__ */ H("div", {
|
|
32396
32396
|
className: "space-y-4",
|
|
32397
32397
|
children: [
|
|
@@ -32403,7 +32403,7 @@ function wk({ trpc: e, nodeId: t, onNodeChange: n }) {
|
|
|
32403
32403
|
onDeviceKeyChange: A,
|
|
32404
32404
|
selectedDeviceId: D,
|
|
32405
32405
|
onSelectCamera: O,
|
|
32406
|
-
onResolved:
|
|
32406
|
+
onResolved: ee,
|
|
32407
32407
|
disabled: te || se
|
|
32408
32408
|
}),
|
|
32409
32409
|
/* @__PURE__ */ V(AD, {
|
|
@@ -32425,7 +32425,7 @@ function wk({ trpc: e, nodeId: t, onNodeChange: n }) {
|
|
|
32425
32425
|
className: "space-y-2",
|
|
32426
32426
|
children: [
|
|
32427
32427
|
/* @__PURE__ */ V("button", {
|
|
32428
|
-
onClick:
|
|
32428
|
+
onClick: K,
|
|
32429
32429
|
disabled: !te && !m && !g,
|
|
32430
32430
|
className: `w-full px-4 py-2.5 text-sm font-medium rounded-lg transition-colors ${te ? "bg-primary text-primary-foreground animate-pulse" : "bg-primary text-primary-foreground hover:bg-primary/90 disabled:opacity-50"}`,
|
|
32431
32431
|
children: te ? L.length > 0 ? L[L.length - 1] : "Processing..." : "Run Pipeline"
|
|
@@ -32492,7 +32492,7 @@ function wk({ trpc: e, nodeId: t, onNodeChange: n }) {
|
|
|
32492
32492
|
children: [
|
|
32493
32493
|
/* @__PURE__ */ V("button", {
|
|
32494
32494
|
type: "button",
|
|
32495
|
-
onClick: () =>
|
|
32495
|
+
onClick: () => q("live-frame"),
|
|
32496
32496
|
disabled: se || !m && !g,
|
|
32497
32497
|
title: "The live per-frame dispatch: one runPipeline per call with plane='frame' — root-plane steps only, crop children skipped (they are served per track via runDetailSubtree). This is the shape a production camera frame takes.",
|
|
32498
32498
|
className: "px-3 py-2.5 sm:py-1.5 text-sm rounded-md border border-primary/40 bg-primary/10 hover:bg-primary hover:text-primary-foreground disabled:opacity-50 transition-colors",
|
|
@@ -32500,7 +32500,7 @@ function wk({ trpc: e, nodeId: t, onNodeChange: n }) {
|
|
|
32500
32500
|
}),
|
|
32501
32501
|
/* @__PURE__ */ V("button", {
|
|
32502
32502
|
type: "button",
|
|
32503
|
-
onClick: () =>
|
|
32503
|
+
onClick: () => q("full-tree"),
|
|
32504
32504
|
disabled: se || !m && !g,
|
|
32505
32505
|
title: "One runPipeline per call on the default 'full' plane: root AND crop children together, through sharp encode → IPC → pool. Not the live path — the live path runs the root plane only.",
|
|
32506
32506
|
className: "px-3 py-2.5 sm:py-1.5 text-sm rounded-md border border-border bg-surface hover:bg-primary/10 disabled:opacity-50 transition-colors",
|
|
@@ -32508,7 +32508,7 @@ function wk({ trpc: e, nodeId: t, onNodeChange: n }) {
|
|
|
32508
32508
|
}),
|
|
32509
32509
|
/* @__PURE__ */ V("button", {
|
|
32510
32510
|
type: "button",
|
|
32511
|
-
onClick: () =>
|
|
32511
|
+
onClick: () => q("inference"),
|
|
32512
32512
|
disabled: se || !m && !g,
|
|
32513
32513
|
title: "Pure inference: frame cached in pool once, each call sends only a 5-byte reference. Isolates the model.predict() + batching cost — no IPC, no JPEG encode/decode.",
|
|
32514
32514
|
className: "px-3 py-2.5 sm:py-1.5 text-sm rounded-md border border-border bg-surface hover:bg-primary/10 disabled:opacity-50 transition-colors",
|
|
@@ -32531,7 +32531,7 @@ function wk({ trpc: e, nodeId: t, onNodeChange: n }) {
|
|
|
32531
32531
|
t,
|
|
32532
32532
|
" · ",
|
|
32533
32533
|
k ?? "node default pool",
|
|
32534
|
-
|
|
32534
|
+
j ? ` · camera #${j.deviceId} (resolved tree)` : " · custom tree"
|
|
32535
32535
|
]
|
|
32536
32536
|
})
|
|
32537
32537
|
]
|
|
@@ -32649,21 +32649,21 @@ function wk({ trpc: e, nodeId: t, onNodeChange: n }) {
|
|
|
32649
32649
|
}),
|
|
32650
32650
|
/* @__PURE__ */ V(Kp, {
|
|
32651
32651
|
src: x,
|
|
32652
|
-
imageWidth:
|
|
32653
|
-
imageHeight:
|
|
32654
|
-
detections:
|
|
32652
|
+
imageWidth: Se,
|
|
32653
|
+
imageHeight: Ce,
|
|
32654
|
+
detections: Ee,
|
|
32655
32655
|
placeholder: "Select an image above"
|
|
32656
32656
|
}),
|
|
32657
|
-
P &&
|
|
32657
|
+
P && Ee.length > 0 && /* @__PURE__ */ H("div", {
|
|
32658
32658
|
className: "text-xs text-foreground-subtle",
|
|
32659
32659
|
children: [
|
|
32660
|
-
|
|
32660
|
+
Ee.length,
|
|
32661
32661
|
" detection",
|
|
32662
|
-
|
|
32662
|
+
Ee.length === 1 ? "" : "s",
|
|
32663
32663
|
" — ",
|
|
32664
|
-
|
|
32664
|
+
Se,
|
|
32665
32665
|
"x",
|
|
32666
|
-
|
|
32666
|
+
Ce
|
|
32667
32667
|
]
|
|
32668
32668
|
}),
|
|
32669
32669
|
L.length > 0 && /* @__PURE__ */ V("div", {
|
|
@@ -32673,12 +32673,12 @@ function wk({ trpc: e, nodeId: t, onNodeChange: n }) {
|
|
|
32673
32673
|
children: [/* @__PURE__ */ V("span", { className: `h-1.5 w-1.5 rounded-full shrink-0 ${t === L.length - 1 ? "bg-primary animate-pulse" : "bg-foreground-subtle/30"}` }), e]
|
|
32674
32674
|
}, t))
|
|
32675
32675
|
}),
|
|
32676
|
-
Object.keys(
|
|
32677
|
-
timings:
|
|
32676
|
+
Object.keys(De).length > 0 && /* @__PURE__ */ V(RD, {
|
|
32677
|
+
timings: De,
|
|
32678
32678
|
totalMs: P?.debug?.totalInferenceMs
|
|
32679
32679
|
}),
|
|
32680
32680
|
P && /* @__PURE__ */ V(om, {
|
|
32681
|
-
detections:
|
|
32681
|
+
detections: we,
|
|
32682
32682
|
hiddenKeys: ge,
|
|
32683
32683
|
onToggleVisibility: ve
|
|
32684
32684
|
}),
|
|
@@ -33941,7 +33941,7 @@ function Kk(e) {
|
|
|
33941
33941
|
return t;
|
|
33942
33942
|
}
|
|
33943
33943
|
function qk({ trpc: e }) {
|
|
33944
|
-
let [t, n] = l([]), [r, i] = l(""), [a, s] = l(null), [c, u] = l(""), [d, f] = l([]), [p, m] = l(/* @__PURE__ */ new Set()), [g, _] = l({}), [y, b] = l({}), [x, S] = l({}), [C, w] = l({}), [T, E] = l({}), [D, O] = l(15), [k, A] = l(4), [
|
|
33944
|
+
let [t, n] = l([]), [r, i] = l(""), [a, s] = l(null), [c, u] = l(""), [d, f] = l([]), [p, m] = l(/* @__PURE__ */ new Set()), [g, _] = l({}), [y, b] = l({}), [x, S] = l({}), [C, w] = l({}), [T, E] = l({}), [D, O] = l(15), [k, A] = l(4), [j, ee] = l(2), [te, M] = l(640), [ne, N] = l(!1), [P, re] = l(null), [F, I] = l(null), [L, R] = l(""), [z, ie] = l(null);
|
|
33945
33945
|
v(() => {
|
|
33946
33946
|
e.pipelineExecutor.listReferenceImages.query().then((e) => {
|
|
33947
33947
|
n(e), e.length > 0 && e[0] && (i(e[0].filename), u(e[0].filename));
|
|
@@ -34074,14 +34074,14 @@ function qk({ trpc: e }) {
|
|
|
34074
34074
|
};
|
|
34075
34075
|
});
|
|
34076
34076
|
});
|
|
34077
|
-
I(`running ${D}s · batch ${k} · concurrency ${
|
|
34077
|
+
I(`running ${D}s · batch ${k} · concurrency ${j} · ${r.length} node(s)`), ie(await e.addons.custom.mutate({
|
|
34078
34078
|
addonId: "benchmark",
|
|
34079
34079
|
action: "runSustainedThroughput",
|
|
34080
34080
|
input: {
|
|
34081
34081
|
frameId: n,
|
|
34082
34082
|
durationSec: D,
|
|
34083
34083
|
batchSize: k,
|
|
34084
|
-
concurrency:
|
|
34084
|
+
concurrency: j,
|
|
34085
34085
|
targetSize: te,
|
|
34086
34086
|
sessionId: t,
|
|
34087
34087
|
nodes: r
|
|
@@ -34107,7 +34107,7 @@ function qk({ trpc: e }) {
|
|
|
34107
34107
|
C,
|
|
34108
34108
|
D,
|
|
34109
34109
|
k,
|
|
34110
|
-
|
|
34110
|
+
j,
|
|
34111
34111
|
te
|
|
34112
34112
|
]), le = "w-24 px-2 py-1.5 text-sm rounded-md border border-border bg-surface text-foreground", ue = "rounded-lg border border-border bg-surface p-4 space-y-3";
|
|
34113
34113
|
return /* @__PURE__ */ H("div", {
|
|
@@ -34203,8 +34203,8 @@ function qk({ trpc: e }) {
|
|
|
34203
34203
|
type: "number",
|
|
34204
34204
|
min: 1,
|
|
34205
34205
|
max: 64,
|
|
34206
|
-
value:
|
|
34207
|
-
onChange: (e) =>
|
|
34206
|
+
value: j,
|
|
34207
|
+
onChange: (e) => ee(Math.max(1, Number(e.target.value) || 1)),
|
|
34208
34208
|
className: le
|
|
34209
34209
|
})]
|
|
34210
34210
|
}),
|
|
@@ -34639,7 +34639,7 @@ function rA({ trpc: e }) {
|
|
|
34639
34639
|
} finally {
|
|
34640
34640
|
m(!1);
|
|
34641
34641
|
}
|
|
34642
|
-
}, [E, a]),
|
|
34642
|
+
}, [E, a]), j = o(async () => {
|
|
34643
34643
|
m(!0), x([]);
|
|
34644
34644
|
let e = [];
|
|
34645
34645
|
for (let t of T) {
|
|
@@ -34788,7 +34788,7 @@ function rA({ trpc: e }) {
|
|
|
34788
34788
|
}),
|
|
34789
34789
|
/* @__PURE__ */ V(aA, {
|
|
34790
34790
|
label: "Test each endpoint",
|
|
34791
|
-
onClick: () => void
|
|
34791
|
+
onClick: () => void j(),
|
|
34792
34792
|
disabled: p || T.length === 0,
|
|
34793
34793
|
running: p
|
|
34794
34794
|
})
|