@camstack/addon-admin-ui 1.2.355 → 1.2.357
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/assets/Addons-BNOOF9Mv.js +4 -0
- package/dist/assets/{AdminTabs-jmzYA4Gj.js → AdminTabs-Bxj9C3Dy.js} +1 -1
- package/dist/assets/AiProfiles-CRNStk_J.js +3 -0
- package/dist/assets/{BrokerForm-Cv_WPhvt.js → BrokerForm-61eZ_BQs.js} +1 -1
- package/dist/assets/Build-Bo19wI67.js +40 -0
- package/dist/assets/{Calendars-MFMnXqjT.js → Calendars-CxIkYKMB.js} +1 -1
- package/dist/assets/{Capabilities-BzcFdoxe.js → Capabilities-DTXiVb2I.js} +1 -1
- package/dist/assets/Cluster-CAwWppiE.js +11 -0
- package/dist/assets/ClusterStepModel-DhxYveGL.js +1 -0
- package/dist/assets/{CompositionEditor-C9f51ycE.js → CompositionEditor-Bvf3zgNl.js} +1 -1
- package/dist/assets/{CompositionEditorPage-GhqEH8fu.js → CompositionEditorPage-CQgnsFrf.js} +1 -1
- package/dist/assets/{Data-DW-C0JmT.js → Data-BGRBmkR_.js} +1 -1
- package/dist/assets/DetectionIntelligence-VZ9CIaLa.js +1 -0
- package/dist/assets/DeviceDetail-CrnxJ6Hc.js +2 -0
- package/dist/assets/{DeviceDoActionFields-DTRBrGeQ.js → DeviceDoActionFields-D3Jdh2OV.js} +1 -1
- package/dist/assets/{Devices-urEV4IEL.js → Devices-CBwOsnyo.js} +1 -1
- package/dist/assets/{EmbedPlayerPage-RP6PYmQ3.js → EmbedPlayerPage-BWcoakS7.js} +1 -1
- package/dist/assets/Events-Dr5IMWMQ.js +1 -0
- package/dist/assets/Identity-DQ7LByxK.js +1 -0
- package/dist/assets/IntegrationDetail-CskqQg63.js +1 -0
- package/dist/assets/{IntegrationHub-3NtGsJ8f.js → IntegrationHub-T7WCtw8g.js} +1 -1
- package/dist/assets/{Integrations-EkMwKxz0.js → Integrations-BqdlA2Gi.js} +1 -1
- package/dist/assets/Integrations-DDDwMXbl.js +1 -0
- package/dist/assets/Locations-CxMnoEvK.js +3 -0
- package/dist/assets/{Logs-BwMwasxy.js → Logs-DP7amiQW.js} +1 -1
- package/dist/assets/{MotionZonesSettings--ZP6wq8p.js → MotionZonesSettings-40HbSg1J.js} +1 -1
- package/dist/assets/MyAccess-k7c8CGXR.js +2 -0
- package/dist/assets/Network-wpLc77BL.js +1 -0
- package/dist/assets/{NodeAddonsSettingsPanel-BbRT6OqB.js → NodeAddonsSettingsPanel-C1eKgxhI.js} +1 -1
- package/dist/assets/Notifications-DAPVC99C.js +1 -0
- package/dist/assets/{Plates-D82UR8AW.js → Plates-hAYS43bp.js} +1 -1
- package/dist/assets/{PrivacyMaskSettings-UJpZQuWF.js → PrivacyMaskSettings-9mlw-Sg2.js} +1 -1
- package/dist/assets/Recordings-CF6Q6s4b.js +1 -0
- package/dist/assets/{ScanNetworkModal-Dq6vPLgX.js → ScanNetworkModal-CJGyqlYW.js} +1 -1
- package/dist/assets/{SceneMonitorEditor-CwTxeG1H.js → SceneMonitorEditor-DNVt27Re.js} +1 -1
- package/dist/assets/{Scenes-BxWxF9RG.js → Scenes-oXjWvgG4.js} +1 -1
- package/dist/assets/{Secrets-B1Py-XlE.js → Secrets-I8Q8kwRj.js} +1 -1
- package/dist/assets/{Settings-D3l2szna.js → Settings-VQUbUtH9.js} +1 -1
- package/dist/assets/{Showroom-DCK8-7b8.js → Showroom-Bp0BOf3S.js} +1 -1
- package/dist/assets/{Terminal-C2SFvaOH.js → Terminal-tyLcs3hl.js} +3 -3
- package/dist/assets/{Viewer-qJaACnXs.js → Viewer-t4jfelvu.js} +1 -1
- package/dist/assets/{_virtual_mf-localSharedImportMap___mfe_internal__admin_ui_host-4FAaqbgl.js → _virtual_mf-localSharedImportMap___mfe_internal__admin_ui_host-CIsQtLaa.js} +1 -1
- package/dist/assets/{archive-C9jrGy5Q.js → archive-DeR3e4g-.js} +1 -1
- package/dist/assets/{authed-media-DQAkskU5.js → authed-media-st_x8Og8.js} +1 -1
- package/dist/assets/{boxes-BNIPhLCT.js → boxes-DxeTkSiW.js} +1 -1
- package/dist/assets/circle-slash-CttzF2br.js +1 -0
- package/dist/assets/client-BqN2lVYf.js +357 -0
- package/dist/assets/crop-BEmkkd3b.js +1 -0
- package/dist/assets/{debounced-invalidate-COhAlfWE.js → debounced-invalidate-BWOIWEOF.js} +1 -1
- package/dist/assets/{device-integration-icon-KaXkp2LK.js → device-integration-icon-Ce7zluJx.js} +1 -1
- package/dist/assets/device-picker-model-x_xV7wRP.js +1 -0
- package/dist/assets/{dist-YROsaxnC.js → dist-9DPeVlno.js} +1 -1
- package/dist/assets/dist-CxwXQGCF.js +357 -0
- package/dist/assets/{face-bbox-CFdWEIAo.js → face-bbox-Bx59CISY.js} +1 -1
- package/dist/assets/{hard-drive-download-D11tb7sM.js → hard-drive-download-BT7-6QED.js} +1 -1
- package/dist/assets/{hostInit-C1Zchdpp.js → hostInit-DQ0THwU5.js} +1 -1
- package/dist/assets/{index-d2QAhmc-.js → index-BNq9yPTv.js} +3 -3
- package/dist/assets/{layers-DYdFVal1.js → layers-D1ITEDh9.js} +1 -1
- package/dist/assets/{location-owned-usage-DJjVpEH8.js → location-owned-usage-B5PZZAJ9.js} +1 -1
- package/dist/assets/{mf-entry-bootstrap-0-164529ae.js → mf-entry-bootstrap-0-bd894cd4.js} +2 -2
- package/dist/assets/mount-x_xV7wRP.js +1 -0
- package/dist/assets/notification-schedule-field-Drw0rQZp.js +1 -0
- package/dist/assets/{player-overlays-tKtUzh3g.js → player-overlays-D4lg_avJ.js} +1 -1
- package/dist/assets/remoteEntry-YA5HmvZR.js +1 -0
- package/dist/assets/{send-C3mZ85mq.js → send-CYTiWXyC.js} +1 -1
- package/dist/assets/{settings-2-CCI879zJ.js → settings-2-DVqttbaa.js} +1 -1
- package/dist/assets/{src-Y4G_LfLc.js → src-DOjmjjKA.js} +17 -17
- package/dist/assets/{unlink-m4c0iz87.js → unlink-ZWAv-UAl.js} +1 -1
- package/dist/assets/{use-scenes-feed-DyIyOk7m.js → use-scenes-feed-BgsO7otE.js} +1 -1
- package/dist/assets/{use-stationary-objects-DqQJT1ff.js → use-stationary-objects-e1GejQDW.js} +1 -1
- package/dist/assets/useEventInvalidation-x_xV7wRP.js +1 -0
- package/dist/assets/{useNodeUrlSelection-CEK0v_3k.js → useNodeUrlSelection-DoS5q0lF.js} +1 -1
- package/dist/assets/user-round-D1OVtUFE.js +1 -0
- package/dist/assets/{virtual_mf-REMOTE_ENTRY_ID___mfe_internal__admin_ui_host__remoteEntry-_hash_-B0TfzpP_.js → virtual_mf-REMOTE_ENTRY_ID___mfe_internal__admin_ui_host__remoteEntry-_hash_-CFTJqMAA.js} +2 -2
- package/dist/index.html +7 -7
- package/dist/server/addon.js +151 -3
- package/package.json +1 -1
- package/dist/assets/Addons-Bzf-UqEw.js +0 -4
- package/dist/assets/AiProfiles-DDUitYj8.js +0 -3
- package/dist/assets/Build-3A9gyeeL.js +0 -40
- package/dist/assets/Cluster-B8MOp6Pr.js +0 -11
- package/dist/assets/ClusterStepModel-DCIodYpM.js +0 -1
- package/dist/assets/DetectionIntelligence-CrH_kLX1.js +0 -1
- package/dist/assets/DeviceDetail-CDOw1qyD.js +0 -2
- package/dist/assets/Events-zS0-6Rd3.js +0 -1
- package/dist/assets/Identity-Dqul-DNR.js +0 -1
- package/dist/assets/IntegrationDetail-wBX3nT_i.js +0 -1
- package/dist/assets/Integrations-BAPCCTL_.js +0 -1
- package/dist/assets/Locations-CLBXHuE9.js +0 -3
- package/dist/assets/MyAccess-DRVHIYEW.js +0 -2
- package/dist/assets/Network-vx7gg32u.js +0 -1
- package/dist/assets/Notifications-DlINBoX1.js +0 -1
- package/dist/assets/Recordings-C9JJ_i3X.js +0 -1
- package/dist/assets/circle-slash-BYpk_wjd.js +0 -1
- package/dist/assets/client-HDm3z1QL.js +0 -357
- package/dist/assets/crop-9g1Z5sFT.js +0 -1
- package/dist/assets/device-picker-model-D_5ynS9o.js +0 -1
- package/dist/assets/dist-DPdG1Rf2.js +0 -357
- package/dist/assets/mount-D_5ynS9o.js +0 -1
- package/dist/assets/notification-schedule-field-C3V8Yo1S.js +0 -1
- package/dist/assets/remoteEntry-8SJYH9n-.js +0 -1
- package/dist/assets/useEventInvalidation-D_5ynS9o.js +0 -1
- package/dist/assets/user-round-BGmDt-wq.js +0 -1
|
@@ -0,0 +1,357 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./__vite-browser-external-DF8Eb0aa.js","./rolldown-runtime-Cyuzqnbw.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{a as e,r as t}from"./rolldown-runtime-Cyuzqnbw.js";import{t as n}from"./vite-preload-helper-kNaey6uv.js";import{A as r,C as i,D as a,E as o,F as s,I as c,L as l,M as u,N as d,O as f,P as p,S as m,T as h,_ as g,a as _,b as v,c as ee,d as te,f as ne,g as y,h as re,i as ie,j as b,k as ae,l as oe,m as x,n as se,o as ce,p as S,r as le,s as ue,t as de,u as fe,v as C,w as pe,x as me,y as w}from"./__vite-browser-external-DF8Eb0aa.js";var he=[`f32le`,`pcmu`,`pcma`];function ge(e){return typeof e==`string`&&he.includes(e)}function _e(e){return e===`f32le`?4:1}function ve(e,t){if(t===`f32le`){let t=new Uint8Array(e.byteLength);return t.set(e),t}let n=t===`pcmu`?xe:Se,r=new Float32Array(e.length);for(let t=0;t<e.length;t++)r[t]=n[e[t]];return new Uint8Array(r.buffer)}function ye(){let e=new Float32Array(256);for(let t=0;t<256;t++){let n=~t&255,r=n&128?-1:1,i=n>>4&7;e[t]=r*((8*(n&15)+132<<i)-132)/32768}return e}function be(){let e=new Float32Array(256);for(let t=0;t<256;t++){let n=t^85,r=n&128?1:-1,i=n>>4&7,a=n&15;e[t]=r*(i===0?16*a+8:16*a+264<<i-1)/32768}return e}var xe=ye(),Se=be(),Ce=[`track`,`face`,`identity`,`plate`,`vehicle`,`scene`,`motion`,`object`,`audio`,`mosaic`],we=new Set(Ce),Te=/^\d+$/;function Ee(e){return we.has(e)}function De(e){let t=e.split(`:`);if(t.length!==3&&t.length!==4)return null;let[n,r,i,a]=t;return n===void 0||!Ee(n)||r===void 0||r.length===0||i===void 0||i.length===0?null:a===void 0?{ownerType:n,ownerId:r,fileKind:i}:Te.test(a)?{ownerType:n,ownerId:r,fileKind:i,timestampMs:Number(a)}:null}function Oe(e){let t=`${e.ownerType}:${e.ownerId}:${e.fileKind}`;return e.timestampMs===void 0?t:`${t}:${e.timestampMs}`}var ke=[`motion`,`object`,`audio`],Ae=S(ke),je=[...ke,`track`],Me=S(je),Ne=new Set(ke);function Pe(e){return Ne.has(e)}var T=function(e){return e.SystemBoot=`system.boot`,e.SystemAddonsReady=`system.addons-ready`,e.SystemRestarting=`system.restarting`,e.SystemRestartCompleted=`system.restart-completed`,e.SystemTlsCertChanged=`system.tls-cert-changed`,e.UpdateAvailable=`update.available`,e.SystemReadyState=`system.ready-state`,e.AddonStarted=`addon.started`,e.AddonStopped=`addon.stopped`,e.AddonRestarted=`addon.restarted`,e.AddonUpdated=`addon.updated`,e.AddonInstalled=`addon.installed`,e.AddonUninstalled=`addon.uninstalled`,e.AddonCrashed=`addon.crashed`,e.AddonRunnerFailed=`addon.runner-failed`,e.AddonError=`addon.error`,e.AddonPageReady=`addon.page-ready`,e.AddonWidgetReady=`addon.widget-ready`,e.AddonLoadFailed=`addon.load-failed`,e.KeychainChanged=`keychain.changed`,e.AddonLoadRecovered=`addon.load-recovered`,e.AddonRetryScheduled=`addon.retry-scheduled`,e.SystemLivenessFailed=`system.liveness-failed`,e.SystemLivenessRecovered=`system.liveness-recovered`,e.AddonRetryAttempting=`addon.retry-attempting`,e.DeviceRegistered=`device.registered`,e.DeviceUnregistered=`device.unregistered`,e.DeviceEnabled=`device.enabled`,e.DeviceDisabled=`device.disabled`,e.DeviceSettingsUpdated=`device.settings-updated`,e.DeviceBindingsChanged=`device.bindings-changed`,e.DeviceMetaChanged=`device.meta-changed`,e.DeviceSourceInfoChanged=`device.source-info-changed`,e.DeviceStreamsRegistered=`device.streams-registered`,e.DeviceProvisioned=`device.provisioned`,e.DeviceReady=`device.ready`,e.IntegrationEnabled=`integration.enabled`,e.IntegrationDisabled=`integration.disabled`,e.IntegrationDeleted=`integration.deleted`,e.BrokerStatusChanged=`broker.status-changed`,e.BrokerMessage=`broker.message`,e.ProviderStarted=`provider.started`,e.ProviderStopped=`provider.stopped`,e.ProcessCrashed=`process.crashed`,e.ProcessRestartScheduled=`process.restart_scheduled`,e.ProcessRestarted=`process.restarted`,e.StorageLocationsChanged=`storage.locations-changed`,e.RecordingStarted=`recording.started`,e.RecordingStopped=`recording.stopped`,e.RecordingError=`recording.error`,e.RecordingHealthDegraded=`recording.health.degraded`,e.RecordingStorageCritical=`recording.storage.critical`,e.RecordingSegmentWritten=`recording.segment.written`,e.RecordingPolicyFallback=`recording.policy.fallback`,e.RecordingRetentionCompleted=`recording.retention.completed`,e.RecordingExportProgress=`recording.export.progress`,e.RecordingExportCompleted=`recording.export.completed`,e.RecordingExportFailed=`recording.export.failed`,e.DetectionEvent=`detection.event`,e.SessionTrackNew=`session.track.new`,e.SessionTrackExpired=`session.track.expired`,e.BenchmarkProgress=`benchmark.progress`,e.PlatformProbePhase=`platform-probe.phase`,e.PipelineProgress=`pipeline.progress`,e.PipelineTrace=`pipeline.trace`,e.PipelineInferenceResult=`pipeline.inference-result`,e.PipelineCameraAssigned=`pipeline.camera-assigned`,e.PipelineCameraUnassigned=`pipeline.camera-unassigned`,e.PipelineNodeInferenceUnavailable=`pipeline.node-inference-unavailable`,e.PipelineDetectionBlind=`pipeline.detection-blind`,e.PipelineCameraUpdated=`pipeline.camera-updated`,e.PipelineIngestOwnerChanged=`pipeline.ingest-owner-changed`,e.PipelineRunnerLoadSnapshot=`pipeline.runner-load-snapshot`,e.PipelineCameraMetricsSnapshot=`pipeline.camera-metrics-snapshot`,e.StreamBrokerMetricsSnapshot=`stream-broker.metrics-snapshot`,e.StreamBrokerOnCamStreamDemand=`stream-broker.onCamStreamDemand`,e.StreamBrokerOnCamStreamIdle=`stream-broker.onCamStreamIdle`,e.StreamBrokerOnRequestStreamSourceRefresh=`stream-broker.onRequestStreamSourceRefresh`,e.StreamParamsChanged=`stream-params.changed`,e.DeviceStateChanged=`device.state-changed`,e.DeviceNativeShadowChanged=`device.native-shadow-changed`,e.ZoneAnalyticsOccupancyChanged=`zone-analytics.occupancy-changed`,e.BatteryOnStatusChanged=`battery.onStatusChanged`,e.NetworkLinkOnStatusChanged=`network-link.onStatusChanged`,e.BatteryOnWakeStarted=`battery.onWakeStarted`,e.DoorbellOnPressed=`doorbell.onPressed`,e.EventEmitted=`event-emitter.event`,e.PipelineEngineMetricsSnapshot=`pipeline.engine-metrics-snapshot`,e.PipelineEngineProvisioning=`pipeline.engine-provisioning`,e.ClusterTopologySnapshot=`cluster.topology-snapshot`,e.MetricsNodeResourcesSnapshot=`metrics.node-resources-snapshot`,e.MetricsNodeProcessesSnapshot=`metrics.node-processes-snapshot`,e.CapabilityBindingChanged=`capability.binding-changed`,e.ModelDownloadProgress=`model.download.progress`,e.AgentRegistered=`agent.registered`,e.AgentUnregistered=`agent.unregistered`,e.AgentOnline=`agent.online`,e.AgentOffline=`agent.offline`,e.WorkerOnline=`worker.online`,e.WorkerOffline=`worker.offline`,e.AgentTaskDispatched=`agent.task.dispatched`,e.AgentTaskAssigned=`agent.task.assigned`,e.AgentTrpcConnected=`agent.trpc.connected`,e.AgentWsConnected=`agent.ws.connected`,e.AgentWsDisconnected=`agent.ws.disconnected`,e.AgentBackupActivated=`agent.backup.activated`,e.OrchestrationSettingsUpdated=`orchestration.settings-updated`,e.MotionAnalysis=`detection.motion-analysis`,e.MotionZonesRaw=`detection.motion-zones-raw`,e.MotionOnMotionChanged=`motion.on-motion-changed`,e.DetectionResult=`detection.result`,e.DetectionRaw=`detection.raw`,e.DetectionCameraNative=`detection.camera-native`,e.PipelineAudioInferenceResult=`pipeline.audio-inference-result`,e.DetectionPhaseTransition=`detection.phase-transition`,e.ProviderMotion=`provider.motion`,e.ProviderDetection=`provider.detection`,e.EnrichmentEmbeddingStored=`enrichment.embedding.stored`,e.EnrichmentSceneStateChanged=`enrichment.scene.state-changed`,e.EnrichmentActivitySummary=`enrichment.activity.summary`,e.PipelineAnalyticsTrackLifecycle=`pipeline-analytics.track-lifecycle`,e.PipelineAnalyticsTrackStarted=`pipeline-analytics.track-started`,e.PipelineAnalyticsTrackEnded=`pipeline-analytics.track-ended`,e.PipelineAnalyticsDetectionEvent=`pipeline-analytics.detection-event`,e.PipelineAnalyticsFrameTracked=`pipeline-analytics.frame-tracked`,e.PipelineAnalyticsStationaryChanged=`pipeline-analytics.stationary-changed`,e.PipelineAnalyticsPackageDelivered=`pipeline-analytics.package-delivered`,e.PipelineAnalyticsPackagePickedUp=`pipeline-analytics.package-picked-up`,e.PipelineAnalyticsFaceGalleryChanged=`pipeline-analytics.face-gallery-changed`,e.PipelineAnalyticsPlateGalleryChanged=`pipeline-analytics.plate-gallery-changed`,e.CameraStreamsProfileSlotsChanged=`camera-streams.onProfileSlotsChanged`,e.StreamOnline=`stream.online`,e.StreamOffline=`stream.offline`,e.NetworkTunnelStarted=`network.tunnel.started`,e.NetworkTunnelStopped=`network.tunnel.stopped`,e.LocalNetworkChanged=`network.local.changed`,e.MeshNetworkChanged=`network.mesh.changed`,e.BackupCompleted=`backup.completed`,e.BackupRunCompleted=`backup.run-completed`,e.BackupRestored=`backup.restored`,e.NotificationDispatched=`notification.dispatched`,e.NotificationFailed=`notification.failed`,e.DeviceUpdated=`device.updated`,e.DeviceOnline=`device.online`,e.DeviceOffline=`device.offline`,e.DeviceAwake=`device.awake`,e.DeviceSleeping=`device.sleeping`,e.RetentionCleanup=`retention.cleanup`,e.AddonsBulkUpdateProgress=`addons.bulk-update-progress`,e.AddonsJobProgress=`addons.job-progress`,e.AddonsJobLog=`addons.job-log`,e.AccessoriesChildVisibilityChanged=`accessories.onChildVisibilityChanged`,e.AccessoriesChanged=`accessories.onAccessoriesChanged`,e.ModelConvertProgress=`model-convert.progress`,e}({}),Fe=new Set([`device.native-shadow-changed`]);function Ie(e){return Fe.has(e)}function Le(){let e=Object.values(T).filter(e=>typeof e==`string`);return[...new Set(e)].filter(e=>!Ie(e)).toSorted()}var Re=`__camstack_redacted__`;function ze(e){return e.type===`password`?!0:`secret`in e&&e.secret===!0}function Be(e){return!ze(e)||e.type===`textarea`&&e.isJson===!0?!1:!(`storage`in e&&e.storage===`inline`)}function Ve(e){let t=new Set;for(let n of Ke(e))for(let e of qe(n))Je(e,t);return t}function He(e){let t=new Set;for(let n of Ke(e))for(let e of qe(n))Ue(e,t);return t}function Ue(e,t){if(!Ge(e))return;let n=e.type,r=e.key,i=n===`password`||e.secret===!0,a=n===`textarea`&&e.isJson===!0;if(i&&!a&&e.storage!==`inline`&&typeof r==`string`&&r.length>0&&t.add(r),n===`group`){for(let n of qe(e))Ue(n,t);return}if(n===`sub-tabs`){let n=e.tabs;if(!Array.isArray(n))return;for(let e of n)for(let n of qe(e))Ue(n,t)}}function We(e){for(let t of Ke(e))if(qe(t).length>0)return!0;return!1}function Ge(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function Ke(e){if(!Ge(e))return[];let t=e.sections;return Array.isArray(t)?t:[]}function qe(e){if(!Ge(e))return[];let t=e.fields;return Array.isArray(t)?t:[]}function Je(e,t){if(!Ge(e))return;let n=e.type,r=e.key;if((n===`password`||e.secret===!0)&&typeof r==`string`&&r.length>0&&t.add(r),n===`group`){for(let n of qe(e))Je(n,t);return}if(n===`sub-tabs`){let n=e.tabs;if(!Array.isArray(n))return;for(let e of n)for(let n of qe(e))Je(n,t)}}var Ye={$secretClear:!0},Xe=`***`;function Ze(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function Qe(e){return{$secret:e,v:1}}function $e(e){if(!Ze(e))return!1;let t=e.$secret;return typeof t==`string`&&t.length>0}function et(e){return Ze(e)&&Object.prototype.hasOwnProperty.call(e,`$secret`)}function tt(e){return Ze(e)&&e.$secretClear===!0}function nt(e){return Ze(e)&&e.set===!0&&et(e)}function rt(e){return $e(e)?{$secret:e.$secret,v:1,set:!0}:typeof e==`string`&&e.length>0?{$secret:null,v:1,set:!0,inline:!0}:null}function it(e){return tt(e)?{kind:`clear`}:typeof e!=`string`||e.length===0||e===`__camstack_redacted__`||e===Xe?{kind:`keep`}:{kind:`set`,value:e}}var at=[{id:`overview`,label:`Overview`,icon:`layout-dashboard`,order:-10},{id:`general`,label:`General`,icon:`settings`,order:0},{id:`image`,label:`Image`,icon:`image`,order:5},{id:`light`,label:`Light`,icon:`lightbulb`,order:7},{id:`motion`,label:`Motion`,icon:`activity`,order:10},{id:`audio`,label:`Audio`,icon:`mic`,order:12},{id:`alarms`,label:`Alarms`,icon:`bell-ring`,order:13},{id:`snapshot`,label:`Snapshot`,icon:`camera`,order:15},{id:`osd`,label:`OSD`,icon:`type`,order:18},{id:`stream-broker`,label:`Stream Broker`,icon:`radio`,order:20},{id:`streaming`,label:`Streaming`,icon:`video`,order:35},{id:`ptz`,label:`PTZ`,icon:`move`,order:40},{id:`navigation`,label:`Navigation`,icon:`compass`,order:41},{id:`consumables`,label:`Consumables`,icon:`recycle`,order:44},{id:`pipeline`,label:`Detection Pipeline`,icon:`cpu`,order:39},{id:`detection-pipeline`,label:`Detection pipeline`,icon:`cpu`,order:39},{id:`zones`,label:`Detection`,icon:`shapes`,order:38},{id:`analytics`,label:`Analytics`,icon:`activity`,order:37},{id:`live-stats`,label:`Live Stats`,icon:`activity`,order:39},{id:`recording`,label:`Recording`,icon:`circle-dot`,order:40},{id:`engine`,label:`Inference Engine`,icon:`zap`,order:41},{id:`scheduler`,label:`Scheduler`,icon:`list-checks`,order:42},{id:`decoder`,label:`Decoder`,icon:`film`,order:43},{id:`notifications`,label:`Notifications`,icon:`bell`,order:50},{id:`network`,label:`Network`,icon:`globe`,order:60},{id:`storage`,label:`Storage`,icon:`hard-drive`,order:70},{id:`advanced`,label:`Advanced`,icon:`wrench`,order:100}],ot=Object.fromEntries(at.map(e=>[e.id,e]));function st(e){return e.type===`separator`||e.type===`info`||e.type===`qr-code`||e.type===`button`||e.type===`object-array`||e.type===`widget`||e.type===`addon-action-button`||e.type===`device-action-button`}function ct(e){let t=new Map;if(typeof e!=`object`||!e)return t;let n=e.sections;if(!Array.isArray(n))return t;for(let e of n)typeof e==`object`&&e&<(e.fields,t);return t}function lt(e,t){if(Array.isArray(e))for(let n of e){if(typeof n!=`object`||!n)continue;let e=n.type;if(e===`group`){lt(n.fields,t);continue}if(e===`sub-tabs`){let e=n.tabs;if(Array.isArray(e))for(let n of e)typeof n==`object`&&n&<(n.fields,t);continue}let r=n.key;typeof r!=`string`||r.length===0||`value`in n&&t.set(r,{value:n.value,default:n.default})}}function ut(e){let t=new Map;for(let[n,r]of ct(e))t.set(n,r.value??r.default);return t}function dt(e,t){let n=ct(e).get(t);return n===void 0?void 0:n.value??n.default}function ft(e,t,n={}){return{...e.tabs?{tabs:[...e.tabs]}:{},sections:e.sections.map(e=>({...e,fields:e.fields.map(e=>pt(e,t,n))}))}}function pt(e,t,n){if(st(e))return e;if(e.type===`group`){let r=e.fields.map(e=>pt(e,t,n));return{...e,fields:r}}if(e.type===`sub-tabs`){let r=e.tabs.map(e=>({...e,fields:e.fields.map(e=>pt(e,t,n))}));return{...e,tabs:r}}let r=e.key,i=Object.prototype.hasOwnProperty.call(t,r)?t[r]:void 0,a=e.default,o=e=>$e(e)||n.inlineSecretsAsViews===!0&&e!==void 0;if(Be(e)&&o(i))return{...e,value:rt(i)};if(Be(e)&&n.inlineSecretsAsViews===!0)return{...e,value:null};if(e.type===`editable-array`&&Array.isArray(i)){let t=e.itemFields.filter(e=>`key`in e&&Be(e)).map(e=>`key`in e?e.key:``);if(t.length>0){let n=i.map(e=>{if(typeof e!=`object`||!e||Array.isArray(e))return e;let n={...e};for(let r of t){let t=Reflect.get(e,r);o(t)&&(n[r]=rt(t))}return n});return{...e,value:n}}}if(e.multiple){let t=Array.isArray(i)?i:i==null?[]:[i],n=e.multiple.itemDefault===void 0?a===void 0?mt(e)===`string`?``:null:a:e.multiple.itemDefault,r=Math.max(e.multiple.min,t.length),o=[];for(let e=0;e<r;e++)o.push(e<t.length?t[e]:n);return{...e,value:o}}let s=i===void 0?a===void 0?null:a:i,c=e.type===`textarea`&&e.isJson&&typeof s==`object`&&s?JSON.stringify(s,null,2):s;if(e.type===`tags`&&typeof e.suggestionsFrom==`string`){let n=t[e.suggestionsFrom],r=Array.isArray(n)?n.filter(e=>typeof e==`string`&&e.length>0):[],i=[...new Set([...e.suggestions??[],...r])];return{...e,suggestions:i,value:c}}if((e.type===`select`||e.type===`multiselect`)&&typeof e.optionsFrom==`string`){let n=t[e.optionsFrom],r=new Map;for(let t of e.options)r.set(t.value,t);if(Array.isArray(n))for(let e of n){if(typeof e==`string`&&e.length>0){r.has(e)||r.set(e,{value:e,label:e});continue}if(typeof e!=`object`||!e)continue;let t=Reflect.get(e,`value`),n=Reflect.get(e,`label`);typeof t!=`string`||t.length===0||r.has(t)||r.set(t,{value:t,label:typeof n==`string`&&n.length>0?n:t})}return{...e,options:[...r.values()],value:c}}return{...e,value:c}}function mt(e){switch(e.type){case`text`:case`textarea`:case`password`:case`color`:case`probe`:case`timezone`:case`datetime`:return`string`;case`number`:case`slider`:return`number`;case`boolean`:return`boolean`;default:return`other`}}function ht(e,t){return e.category===t}function gt(e,t,n){return{id:typeof crypto<`u`&&crypto.randomUUID?crypto.randomUUID():Math.random().toString(36).slice(2),timestamp:new Date,source:t,category:e,data:n}}function _t(e,t){let n=t.ts??Date.now();e.emit(gt(`system.ready-state`,{type:`capability`,id:t.capName,nodeId:t.sourceNodeId},{capName:t.capName,scope:t.scope,state:t.state,generation:t.generation,sourceNodeId:t.sourceNodeId,ts:n}))}function vt(e){let t=async()=>{let t=(await e.read())[e.key];if(t===void 0)return e.fallback;let n=e.schema.safeParse(t);return n.success?n.data:(e.onParseError?.(e.key,n.error),e.fallback)},n=async t=>{let n=e.schema.parse(t);await e.write({[e.key]:n})};return{get:t,set:n,update:async e=>{await n(e(await t()))}}}function yt(e){if(e==null||e===``)return`hub`;let t=e.indexOf(`/`);if(t<0)return e;let n=e.slice(0,t);return n===``?`hub`:n}function bt(e,t){return`${e}@${yt(t)}`}function xt(e,t,n){return e[bt(t,n)]}function St(e,t,n){let r={};for(let[i,a]of Object.entries(e))r[t.has(i)?bt(i,n):i]=a;return r}function Ct(e,t,n){let r={};for(let[n,i]of Object.entries(e))n.includes(`@`)||t.has(n)||(r[n]=i);for(let i of t){let t=xt(e,i,n);t!==void 0&&(r[i]=t)}return r}var wt=`secret://`,Tt={kind:`global`};function Et(){return Tt}function Dt(e){return e.startsWith(`addon:`)?e.slice(6):e}function Ot(e){return encodeURIComponent(e)}function kt(e){try{return decodeURIComponent(e)}catch{return null}}function At(e){switch(e.kind){case`global`:return`global`;case`node`:return`node/${Ot(e.nodeId)}`;case`device`:return`device/${e.deviceId}`;case`integration`:return`integration/${Ot(e.integrationId)}`;case`row`:return`row/${Ot(e.collection)}/${Ot(e.rowId)}`}}function jt(e,t,n){return`${e}[${Ot(t)}].${n}`}function Mt(e){let t=Dt(e.owner);if(t.length===0)throw Error(`buildSecretRef: owner is empty`);if(e.fieldPath.length===0)throw Error(`buildSecretRef: fieldPath is empty`);return`${wt}${Ot(t)}/${At(e.scope)}/${e.fieldPath}`}function Nt(e){return typeof e==`string`&&Ft(e)!==null}function Pt(e){switch(e[0]){case`global`:return{scope:Tt,used:1};case`node`:{let t=e[1]===void 0?null:kt(e[1]);return t===null||t.length===0?null:{scope:{kind:`node`,nodeId:t},used:2}}case`device`:{let t=e[1];return t===void 0||!/^\d+$/.test(t)?null:{scope:{kind:`device`,deviceId:Number(t)},used:2}}case`integration`:{let t=e[1]===void 0?null:kt(e[1]);return t===null||t.length===0?null:{scope:{kind:`integration`,integrationId:t},used:2}}case`row`:{let t=e[1]===void 0?null:kt(e[1]),n=e[2]===void 0?null:kt(e[2]);return t===null||n===null||t.length===0||n.length===0?null:{scope:{kind:`row`,collection:t,rowId:n},used:3}}default:return null}}function Ft(e){if(!e.startsWith(`secret://`))return null;let t=e.slice(9).split(`/`),n=t[0]===void 0?null:kt(t[0]);if(n===null||n.length===0)return null;let r=Pt(t.slice(1));if(r===null)return null;let i=t.slice(1+r.used).join(`/`);return i.length===0?null:{owner:n,scope:r.scope,fieldPath:i}}var It=class extends Error{fieldPath;constructor(e,t){super(`secret "${e}" was not saved: the keychain could not store it (${t instanceof Error?t.message:String(t)}). Nothing was written.`),this.fieldPath=e,this.name=`KeychainWriteRefusedError`}},Lt={kind:`keep`};function Rt(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function zt(){return globalThis.crypto.randomUUID()}function Bt(e,t=[]){if($e(e))return t.push(e.$secret),t;if(Array.isArray(e))for(let n of e)Bt(n,t);else if(Rt(e))for(let n of Object.values(e))Bt(n,t);return t}async function Vt(e,t,n){let r=(await e.resolve([t.$secret]))[t.$secret];return r?.kind===`value`&&r.value===n}async function Ht(e,t,n,r){let i=it(t),a=e.secrets.ref(e.scope,r),o=$e(n)&&n.$secret===a;if(i.kind===`keep`||i.kind===`set`&&!e.operatorWrite&&typeof n==`string`&&n===i.value)return Lt;if(i.kind===`clear`)return o&&e.deletes.push(a),{kind:`value`,value:null};if(o&&await Vt(e.secrets,n,i.value))return{kind:`value`,value:n};try{await e.secrets.put(a,i.value)}catch(e){throw new It(r,e)}return{kind:`value`,value:Qe(a)}}function Ut(e,t,n,r){if(n.kind===`value`){e[t]=n.value;return}Object.prototype.hasOwnProperty.call(r,t)?e[t]=r[t]:delete e[t]}async function Wt(e,t,n,r,i){let a={...n};for(let[o,s]of t)Ut(a,o,await qt(e,s,n[o],r[o],i(o)),r);return a}function Gt(e,t){let n=e[t];return typeof n==`string`&&n.length>0?n:typeof n==`number`&&Number.isFinite(n)?String(n):null}async function Kt(e,t,n,r,i){let a=Array.isArray(r)?r.filter(Rt):[];if(!Array.isArray(n))return e.deletes.push(...Bt(a)),{kind:`value`,value:n};let o=new Map;for(let e of a){let n=Gt(e,t.idKey);n!==null&&o.set(n,e)}let s=new Set,c=[];for(let r of n){if(!Rt(r)){c.push(r);continue}let n=Gt(r,t.idKey)??e.mintId();s.add(n);let a={...r,[t.idKey]:r[t.idKey]??n};Gt(a,t.idKey)===null&&(a[t.idKey]=n);let l=o.get(n)??{};c.push(await Wt(e,t.item,a,l,e=>jt(i,n,e)))}for(let[t,n]of o)s.has(t)||e.deletes.push(...Bt(n));return{kind:`value`,value:c}}async function qt(e,t,n,r,i){switch(t.kind){case`leaf`:return Ht(e,n,r,i);case`array`:return Kt(e,t,n,r,i);case`object`:{if(!Rt(n))return n===void 0?Lt:(e.deletes.push(...Bt(r)),{kind:`value`,value:n});let a=Rt(r)?r:{};return{kind:`value`,value:await Wt(e,t.children,n,a,e=>`${i}.${e}`)}}}}function Jt(e){let t=e.indexOf(`@`);return t<=0?{base:e,nodeId:null}:{base:e.slice(0,t),nodeId:e.slice(t+1)}}async function Yt(e){let t=[],n={secrets:e.secrets,mintId:e.mintId??zt,deletes:t,operatorWrite:e.operatorWrite===!0},r={};for(let[t,i]of Object.entries(e.patch)){let{base:a,nodeId:o}=Jt(t),s=e.tree.get(a);if(s===void 0){r[t]=i;continue}let c=o!==null&&o.length>0?{kind:`node`,nodeId:o}:e.scope??Et(),l=await qt({...n,scope:c},s,i,e.stored[t],a);l.kind===`value`&&(r[t]=l.value)}return{patch:r,afterWrite:async()=>{if(t.length===0)return{orphaned:[]};try{return await e.secrets.delete([...new Set(t)]),{orphaned:[]}}catch{return{orphaned:[...new Set(t)]}}}}}async function Xt(e,t){let n=Bt(e);if(n.length===0)return{value:e,unresolved:[]};let r=await t.resolve(n),i=[];for(let e of new Set(n)){let t=r[e];t===void 0?i.push({ref:e,reason:`not-initialized`}):t.kind===`unavailable`?i.push({ref:e,reason:t.reason}):(t.kind===`missing`||t.kind===`forbidden`)&&i.push({ref:e,reason:t.kind})}let a=e=>{if($e(e)){let t=r[e.$secret];return t?.kind===`value`?{keep:!0,value:t.value}:{keep:!1,value:void 0}}if(Array.isArray(e)){let t=[];for(let n of e){let e=a(n);e.keep&&t.push(e.value)}return{keep:!0,value:t}}if(Rt(e)){let t={};for(let[n,r]of Object.entries(e)){let e=a(r);e.keep&&(t[n]=e.value)}return{keep:!0,value:t}}return{keep:!0,value:e}};return{value:a(e).value,unresolved:i}}function Zt(e,t){if(e.size===0)return!1;for(let n of Object.keys(t)){let t=n.indexOf(`@`);if(e.has(t>0?n.slice(0,t):n))return!0}return!1}async function Qt(e){let t=e.readAddonStoreResult;if(t===void 0)return e.readAddonStore();let n=await t.call(e);if(n.kind===`failed`)throw Error(`settings write refused: the stored blob could not be read (${n.error})`);return n.kind===`missing`?{}:n.value}function $t(e,t){let n=new Map,r=(e,t)=>{let r=(n.get(e)??Promise.resolve()).then(t,t),i=r.catch(()=>void 0);return n.set(e,i),i.then(()=>{n.get(e)===i&&n.delete(e)}),r},i=async(e,n,i,a,o,s)=>Zt(n,a)?r(e,async()=>{let e=await o(),r=await Yt({tree:n,secrets:t.secrets,patch:a,stored:e,...i===void 0?{}:{scope:i},operatorWrite:t.isOperatorWrite?.()===!0});Object.keys(r.patch).length>0&&await s(r.patch);let{orphaned:c}=await r.afterWrite();c.length>0&&t.onOrphaned(c)}):s(a),a={writeAddonStore:n=>i(`addon`,t.addonTree(),void 0,n,()=>Qt(e),t=>e.writeAddonStore(t)),writeDeviceStore:(n,r)=>i(`device:${n}`,t.deviceTree(),{kind:`device`,deviceId:n},r,()=>e.readDeviceStore(n),t=>e.writeDeviceStore(n,t))};return new Proxy(e,{get(e,t,n){if(t===`writeAddonStore`)return a.writeAddonStore;if(t===`writeDeviceStore`)return a.writeDeviceStore;let r=Reflect.get(e,t,n);return typeof r==`function`?r.bind(e):r}})}function en(e,t){let n=e.settings;if(n===void 0)return e;let r=$t(n,t);return new Proxy(e,{get(e,t,n){return t===`settings`?r:Reflect.get(e,t,n)}})}var tn={kind:`leaf`},nn=`id`;function rn(e,t){for(let n of e){if(n.type===`group`){rn(n.fields,t);continue}if(n.type===`sub-tabs`){for(let e of n.tabs)rn(e.fields,t);continue}if(n.type===`editable-array`){let e=new Map;for(let t of n.itemFields)`key`in t&&Be(t)&&e.set(t.key,tn);e.size>0&&t.set(n.key,{kind:`array`,idKey:n.itemIdKey??nn,item:e});continue}!(`key`in n)||typeof n.key!=`string`||Be(n)&&t.set(n.key,tn)}}function an(e){let t=new Map;if(e===null)return t;for(let n of e.sections)rn(n.fields,t);return t}function on(e){let t=[];for(let n of e.split(`.`)){let r=/^([^[\]]+)(?:\[([^[\]]+)\])?$/.exec(n);if(r===null||r[1]===void 0)throw Error(`secretStatePaths: malformed path "${e}"`);t.push(r[2]===void 0?{key:r[1]}:{key:r[1],idKey:r[2]})}if(t.length===0)throw Error(`secretStatePaths: empty path`);if(t[t.length-1]?.idKey!==void 0)throw Error(`secretStatePaths: "${e}" ends on an array — name the member that is secret`);return t}function sn(e,t){let[n,...r]=t;if(n===void 0)return;if(r.length===0){e.set(n.key,tn);return}let i=e.get(n.key);if(n.idKey!==void 0){let t=new Map(i?.kind===`array`?i.item:[]);sn(t,r),e.set(n.key,{kind:`array`,idKey:n.idKey,item:t});return}let a=new Map(i?.kind===`object`?i.children:[]);sn(a,r),e.set(n.key,{kind:`object`,children:a})}function cn(e,t){if(t.length===0)return e;let n=new Map(e);for(let e of t)sn(n,on(e));return n}function ln(e){let t=new Map;for(let n of e)n.length!==0&&sn(t,on(n.replace(/\[\]/g,`[${nn}]`)));return t}var un=5e3,dn=5*6e4,fn=250,pn=class{_ctx=null;_config;_readinessGeneration=typeof crypto<`u`&&crypto.randomUUID?crypto.randomUUID():Math.random().toString(36).slice(2,14);_registeredCapNames=[];settingsStoreReady=!1;defaults;secretStatePaths=[];_addonSecretTree=null;_deviceSecretTree=null;_configSecretRefs=new Set;_unresolvedSecrets=[];_secretRetryTimer=null;_secretRetryDelayMs=un;_secretChangeTimer=null;_secretChangeUnsub=null;_operatorWriteDepth=0;constructor(e){this.defaults=e,this._config={...e}}get autoEmitReadiness(){return!0}get ctx(){if(!this._ctx)throw Error(`${this.constructor.name}: ctx accessed before initialize()`);return this._ctx}get ctxIfReady(){return this._ctx}get config(){return this._config}async initialize(e){let t=e.secrets;this._ctx=t===void 0?e:en(e,{secrets:t,addonTree:()=>this.addonSecretTree(),deviceTree:()=>this.deviceSecretTree(),onOrphaned:t=>e.logger.warn(`keychain refs dropped by a settings write could not be deleted`,{meta:{refs:[...t]}}),isOperatorWrite:()=>this._operatorWriteDepth>0}),await this.resolveConfig(),t!==void 0&&(this._secretChangeUnsub=t.onChange(e=>{this._configSecretRefs.has(e)&&this.scheduleSecretReresolve(fn)}));let n=await this.onInitialize();this.emitLifecycle(T.AddonStarted);let r=gn(n),i=r&&`providers`in r&&r.providers?r.providers:[];return this._registeredCapNames=i.map(e=>e.capability.name),r}postBrokerStart(){this.autoEmitReadiness&&this._registeredCapNames.length>0&&this.emitReadinessForProviders(`ready`)}async onHubReachable(){}async shutdown(){this._secretChangeUnsub?.(),this._secretChangeUnsub=null,this._secretRetryTimer!==null&&clearTimeout(this._secretRetryTimer),this._secretChangeTimer!==null&&clearTimeout(this._secretChangeTimer),this._secretRetryTimer=null,this._secretChangeTimer=null,this.emitLifecycle(T.AddonStopped),this.autoEmitReadiness&&this.emitReadinessForProviders(`down`),await this.onShutdown();for(let e of this._subscriptions)e();this._subscriptions=[],this._ctx=null}async onShutdown(){}async onConfigChanged(){}field(e){return e}schema(e){return e}globalSettingsSchema(e){return null}deviceSettingsSchema(){return null}integrationSettingSections(){return[]}async getGlobalSettings(e,t,n){let r=this.globalSettingsSchema(t);if(!r)return{sections:[]};let i=await this.resolveGlobalStore(n,t);return ft(r,e?{...i,...e}:i,{inlineSecretsAsViews:!0})}async getIntegrationSettings(e){let t=this.integrationSettingSections();if(t.length===0)return null;let n=this.globalSettingsSchema();if(!n)throw Error(`${this.constructor.name}: integrationSettingSections() names [${t.join(`, `)}] but globalSettingsSchema() returns null.`);let r=new Map(n.sections.map(e=>[e.id,e])),i=[];for(let e of t){let t=r.get(e);if(!t)throw Error(`${this.constructor.name}: integrationSettingSections() names unknown section "${e}". Known sections: [${[...r.keys()].join(`, `)}].`);let n=mn(t.fields);n.length!==0&&i.push({...t,fields:n})}if(i.length===0)return null;let a=await this.resolveGlobalStore(e);return ft({...n,sections:i},a,{inlineSecretsAsViews:!0})}async resolveGlobalStore(e,t){let n=await this._ctx?.settings?.readAddonStore()??{},r=this.perNodeKeys(t),i=yt(e??this._ctx?.kernel?.localNodeId);return r.size>0?Ct(n,r,i):n}async readStoredGlobalKey(e){let t=this._ctx?.settings?.readAddonStoreResult;if(t===void 0)return{kind:`unreadable`,reason:`three-way-read-unavailable`};let n;try{n=await t.call(this._ctx?.settings)}catch(e){return{kind:`unreadable`,reason:`store-read-failed`,error:e instanceof Error?e.message:String(e)}}return n.kind===`failed`?{kind:`unreadable`,reason:`store-read-failed`,error:n.error}:n.kind===`missing`||!Object.prototype.hasOwnProperty.call(n.value,e)?{kind:`absent`}:{kind:`present`,value:n.value[e]}}async updateGlobalSettingsAsOperator(e,t){this._operatorWriteDepth++;try{await this.applyGlobalPatch(e,t)}finally{this._operatorWriteDepth--}}async updateGlobalSettings(e,t){await this.applyGlobalPatch(e,t)}async clearSecrets(e,t){let n=this.addonSecretTree(),r=this._ctx?.secrets!==void 0,i={};for(let t of e)i[t]=r&&n.has(t)?Ye:``;await this.applyGlobalPatch(i,t)}async applyGlobalPatch(e,t){let n=this.perNodeKeys(),r=yt(this._ctx?.kernel?.localNodeId),i=yt(t??this._ctx?.kernel?.localNodeId),a=n.size>0?St(e,n,i):e;await this._ctx?.settings?.writeAddonStore(a),i===r&&(await this.resolveConfig(),await this.onConfigChanged(),this.emitLifecycle(T.AddonUpdated,{level:`global`}),this.maybeAutoRestart(Object.keys(e),this.globalSettingsSchema()))}_perNodeKeysCache=new Map;perNodeKeys(e){let t=e??``,n=this._perNodeKeysCache.get(t);if(n)return n;let r=this.globalSettingsSchema(e),i=new Set(r?r.sections.flatMap(e=>hn(e.fields)):[]);return this._perNodeKeysCache.set(t,i),i}maybeAutoRestart(e,t){if(!t)return;let n=new Set;for(let e of t.sections)for(let t of e.fields)t.type===`separator`||t.type===`info`||t.requiresRestart&&n.add(t.key);if(n.size===0||!e.some(e=>n.has(e)))return;let r=this._ctx;if(!r)return;let i=r.id;setImmediate(()=>{r.api.addons?.restartAddon?.mutate({addonId:i}).then(()=>{r.logger.info(`addon auto-restart triggered by restart-required setting change`,{meta:{changedFields:e.filter(e=>n.has(e))}})}).catch(e=>{r.logger.error(`addon auto-restart failed`,{meta:{error:e instanceof Error?e.message:String(e)}})})})}async getDeviceSettings(e){let t=this.deviceSettingsSchema();return t?ft(t,await this._ctx?.settings?.readDeviceStore(e)??{},{inlineSecretsAsViews:!0}):{sections:[]}}async updateDeviceSettings(e,t){await this._ctx?.settings?.writeDeviceStore(e,t)}_subscriptions=[];watchCapability(e,t){let n=new Set(Array.isArray(e)?e:[e]);this.subscribe({category:`system.ready-state`},e=>{let r=e.data;if(typeof r.capName!=`string`||!n.has(r.capName)||r.scope?.type!==`node`)return;let i=r.scope.nodeId;if(typeof i!=`string`||i.length===0)return;let a=r.capName;r.state===`down`?t.onDown?.(i,a):r.state===`ready`&&t.onReady?.(i,a)})}subscribe(e,t){let n=this.ctx.eventBus.subscribe(e,t);this._subscriptions.push(n)}emitLifecycle(e,t){try{let n=this._ctx;if(!n)return;n.eventBus.emit({id:`${n.id}-${Date.now()}`,timestamp:new Date,source:{type:`addon`,id:n.id,nodeId:n.kernel.localNodeId??`hub`},category:e,data:{addonId:n.id,...t}})}catch{}}emitReadinessForProviders(e){let t=this._ctx;if(!t||this._registeredCapNames.length===0)return;let n=t.kernel?.localNodeId??`hub`,r=n.includes(`/`)?n.split(`/`)[0]:n;for(let n of this._registeredCapNames)try{_t(t.eventBus,{capName:n,scope:{type:`node`,nodeId:r},state:e,generation:this._readinessGeneration,sourceNodeId:r})}catch{}}async resolveModelsDir(){let{join:t}=await n(async()=>{let{join:t}=await import(`./__vite-browser-external-DF8Eb0aa.js`).then(t=>e(t.t()));return{join:t}},__vite__mapDeps([0,1]),import.meta.url),{promises:r}=await n(async()=>{let{promises:t}=await import(`./__vite-browser-external-DF8Eb0aa.js`).then(t=>e(t.t()));return{promises:t}},__vite__mapDeps([0,1]),import.meta.url),i=t(this.ctx.nodeDataDir,`models`);return await r.mkdir(i,{recursive:!0}),i}get capabilities(){return this.ctx.capabilities??null}async resolveConfig(){let e=await this.resolveStoredSecrets(await this.readAddonStoreWithRetry()),t=this.perNodeKeys(),n=yt(this._ctx?.kernel?.localNodeId),r={...this.defaults};for(let i of Object.keys(this.defaults)){let a=t.has(i)?xt(e,i,n):e[i];if(a!=null){let e=typeof this.defaults[i];typeof a===e&&(r[i]=a)}}this._config=r}state(e,t,n){return vt({key:e,schema:t,fallback:n,read:async()=>this.resolveStoredSecrets(await this.readAddonStoreWithRetry()),write:async e=>{await this._ctx?.settings?.writeAddonStore(e)},onParseError:(e,t)=>this._ctx?.logger?.warn?.(`durable-state: stored "${e}" failed validation — using fallback`,{meta:{addonId:this._ctx?.id,key:e,error:String(t)}})})}deviceState(e,t,n,r){return vt({key:t,schema:n,fallback:r,read:async()=>this.resolveStoredSecrets(await this._ctx?.settings?.readDeviceStore(e)??{},!1),write:async t=>{await this._ctx?.settings?.writeDeviceStore(e,t)},onParseError:(t,n)=>this._ctx?.logger?.warn?.(`durable-state: stored device ${e} "${t}" failed validation — using fallback`,{meta:{addonId:this._ctx?.id,deviceId:e,key:t,error:String(n)}})})}addonSecretTree(){return this._addonSecretTree??=cn(an(this.globalSettingsSchema()),this.secretStatePaths),this._addonSecretTree}deviceSecretTree(){return this._deviceSecretTree??=an(this.deviceSettingsSchema()),this._deviceSecretTree}get unresolvedSecrets(){return this._unresolvedSecrets}async resolveStoredSecrets(e,t=!0){let n=this._ctx?.secrets;if(n===void 0)return e;let r=Bt(e);if(t&&(this._configSecretRefs=new Set(r)),r.length===0)return t&&(this._unresolvedSecrets=[]),e;let{value:i,unresolved:a}=await Xt(e,n);return t&&(this._unresolvedSecrets=a,a.length>0?(this._ctx?.logger?.error?.(`secret unavailable — running without it, will retry`,{meta:{secrets:a.map(e=>({ref:e.ref,reason:e.reason}))}}),a.some(e=>e.reason!==`missing`&&e.reason!==`forbidden`)&&(this.scheduleSecretReresolve(this._secretRetryDelayMs),this._secretRetryDelayMs=Math.min(this._secretRetryDelayMs*2,dn))):this._secretRetryDelayMs=un),i}scheduleSecretReresolve(e){let t=e===fn?`_secretChangeTimer`:`_secretRetryTimer`;if(this[t]!==null)return;let n=setTimeout(()=>{this[t]=null,this._ctx!==null&&this.resolveConfig().then(()=>this.onConfigChanged()).catch(e=>{this._ctx?.logger?.error?.(`re-resolving secrets failed`,{meta:{error:e instanceof Error?e.message:String(e)}})})},e);n.unref?.(),this[t]=n}async readAddonStoreWithRetry(){let e=this._ctx?.settings;if(!e)return{};let t=[150,350,600,900],n;for(let r=0;r<=t.length;r++)try{let t=await e.readAddonStore()??{};return this.settingsStoreReady=!0,t}catch(e){n=e;let i=e instanceof Error?e.message:String(e);if(!(i.includes(`SqliteSettingsBackend not initialized`)||i.includes(`provider not available`)))throw e;if(r===t.length)break;await new Promise(e=>setTimeout(e,t[r]))}return this.settingsStoreReady=!1,this._ctx?.logger?.warn?.(`readAddonStore: settings-store unavailable after retries — using defaults`,{meta:{error:n instanceof Error?n.message:String(n)}}),{}}};function mn(e){let t=[];for(let n of e){if(n.type===`group`){let e=mn(n.fields);e.length>0&&t.push({...n,fields:e});continue}if(n.type===`sub-tabs`){let e=n.tabs.map(e=>({...e,fields:mn(e.fields)})).filter(e=>e.fields.length>0);e.length>0&&t.push({...n,tabs:e});continue}`perNode`in n&&n.perNode===!0||t.push(n)}return t}function hn(e){let t=[];for(let n of e){if(n.type===`group`){t.push(...hn(n.fields));continue}if(n.type===`sub-tabs`){for(let e of n.tabs)t.push(...hn(e.fields));continue}`perNode`in n&&n.perNode===!0&&t.push(n.key)}return t}function gn(e){if(e!=null)return Array.isArray(e)?{providers:e}:e}function _n(e,t){return{id:e,getRoutes:()=>t,invoke:async e=>{let n=vn(t,e.method,e.path);if(!n)return{status:404,headers:{},redirectUrl:null,body:{error:`No route matches ${e.method} ${e.path}`}};let r={status:200,headers:{},redirectUrl:null},i=bn(r),a={params:{...n.params,...e.params},query:e.query,body:e.body,headers:e.headers,...e.user?{user:e.user}:{},...e.scopedToken===void 0?{}:{scopedToken:e.scopedToken}};return await n.route.handler(a,i),r}}}function vn(e,t,n){let r=t.toUpperCase();for(let t of e){if(t.method!==r)continue;let e=yn(t.path,n);if(e!==null)return{route:t,params:e}}return null}function yn(e,t){let n=e.split(`/`).filter(Boolean),r=t.split(`/`).filter(Boolean);if(n.length!==r.length)return null;let i={};for(let e=0;e<n.length;e++){let t=n[e],a=r[e];if(t.startsWith(`:`))i[t.slice(1)]=a;else if(t!==a)return null}return i}function bn(e){let t={status(n){return e.status=n,t},code(n){return e.status=n,t},send(t){e.body=t},redirect(t){e.redirectUrl=t,e.status===200&&(e.status=302)},header(n,r){return e.headers[n.toLowerCase()]=r,t},type(n){return e.contentType=n,t}};return t}var xn=class{disposers=[];disposed=!1;onError;constructor(e={}){this.onError=e.onError??((e,t)=>{console.error(`[DisposerChain] disposer #${t} threw`,e)})}add(e){if(this.disposed){try{let t=e();t&&typeof t.then==`function`&&t.catch(e=>this.onError(e,-1))}catch(e){this.onError(e,-1)}return()=>void 0}return this.disposers.push(e),()=>{let t=this.disposers.indexOf(e);t>=0&&this.disposers.splice(t,1)}}get isDisposed(){return this.disposed}get size(){return this.disposers.length}async dispose(){if(this.disposed)return;this.disposed=!0;let e=this.disposers.slice().toReversed();this.disposers=[];for(let t=0;t<e.length;t++){let n=e[t];try{let e=n();e&&typeof e.then==`function`&&await e}catch(n){this.onError(n,e.length-1-t)}}}},Sn=f({codec:S([`h264`,`h265`,`copy`]),profile:S([`baseline`,`main`,`high`]).optional(),level:u().optional(),width:a().int().positive().optional(),height:a().int().positive().optional(),fps:a().positive().optional(),bitrateKbps:a().int().positive().optional(),gopFrames:a().int().positive().optional(),bf:a().int().min(0).optional(),preset:S([`ultrafast`,`superfast`,`veryfast`,`faster`,`fast`,`medium`]).optional(),tune:S([`zerolatency`,`film`,`animation`]).optional(),singleSlicePerFrame:w().optional()}),Cn=p([h(`passthrough`),f({codec:S([`opus`,`aac`,`pcmu`,`pcma`,`copy`]),bitrateKbps:a().int().positive().optional(),sampleRateHz:a().int().positive().optional(),channels:p([h(1),h(2)]).optional()})]),wn=f({video:Sn,audio:Cn,inputArgs:C(u()).optional(),outputArgs:C(u()).optional()});function Tn(e){let t=e.codec?.toLowerCase().replace(/[.\s-]/g,``),n={codec:t===`h265`||t===`hevc`?`h265`:`h264`,...e.resolution?.width===void 0?{}:{width:e.resolution.width},...e.resolution?.height===void 0?{}:{height:e.resolution.height},...e.fps===void 0?{}:{fps:e.fps}};if(!(n.width===void 0&&n.height===void 0&&n.fps===void 0))return{video:n,audio:`passthrough`}}function En(e,t,n){let r=e>=n;return r===t>=n?r?e-t:t-e:r?-1:1}function Dn(e){let t=e.toLowerCase().replace(/[.\s-]/g,``);return t===`hevc`||t===`hvc1`||t===`hev1`?`h265`:t===`avc`||t===`avc1`?`h264`:t}function On(e,t){if(t.length===0)return!0;if(e===void 0)return!1;let n=Dn(e);return t.some(e=>Dn(e)===n)}function kn(e,t){for(let n=0;n<t.length;n+=1)if(e.startsWith(t[n]))return n;return t.length}function An(e,t){let n=e.filter(e=>t.allowTranscode||On(e.codec,t.acceptCodecs));if(n.length===0)return null;let r=t.targetHeight,i=n.map(e=>({candidate:e,transcodes:!On(e.codec,t.acceptCodecs),provider:kn(e.camStreamId,t.preferredProviders),height:e.height??0}));i.sort((e,n)=>e.transcodes===n.transcodes?e.provider===n.provider?r===void 0?t.resolutionPreference===`highest`?n.height-e.height:e.height-n.height:En(e.height,n.height,r):e.provider-n.provider:e.transcodes?1:-1);let a=i[0];return a===void 0?null:{candidate:a.candidate,transcodes:a.transcodes}}var jn={opus:`libopus`,aac:`aac`,pcmu:`pcm_mulaw`,pcma:`pcm_alaw`},Mn={aac:{kind:`encode`,codec:`aac`,bitrateKbps:128,sampleRateHz:48e3,channels:1},opus:{kind:`encode`,codec:`opus`,bitrateKbps:64,sampleRateHz:48e3,channels:1},pcmu:{kind:`encode`,codec:`pcmu`,sampleRateHz:8e3,channels:1}};function Nn(e){return[`-hide_banner`,`-loglevel`,e]}function Pn(e){return!e||e===`none`||e===`copy`}function Fn(e,t){let n=[];if(Pn(t)||n.push(`-hwaccel`,String(t)),e.extraArgs?.length&&n.push(...e.extraArgs),e.decodeThreadCount!==void 0&&e.decodeThreadCount>0&&n.push(`-threads`,String(e.decodeThreadCount)),e.analyzeDurationUs!==void 0&&n.push(`-analyzeduration`,String(e.analyzeDurationUs)),e.probeSizeBytes!==void 0&&n.push(`-probesize`,String(e.probeSizeBytes)),e.lowDelay===!0&&n.push(`-flags`,`low_delay`),e.useWallclockTimestamps===!0&&n.push(`-use_wallclock_as_timestamps`,`1`),e.fflags?.length)for(let t of e.fflags)n.push(`-fflags`,t);if(e.rtspTransport&&n.push(`-rtsp_transport`,e.rtspTransport),e.rawVideo!==void 0){let t=e.rawVideo;n.push(`-f`,`rawvideo`,`-pix_fmt`,t.pixelFormat,`-video_size`,`${String(t.width)}x${String(t.height)}`,`-framerate`,String(t.framerate))}return n.push(`-i`,e.url),n}function In(e){let t=e.filterGraph;return t?{video:`[${t.videoOutLabel}]`,audio:t.audioOutLabel?`[${t.audioOutLabel}]`:`0:a:0?`}:e.extraInputs?.length?{video:`0:v:0`,audio:`0:a:0?`}:{video:null,audio:null}}function Ln(e,t,n,r){if(n){if(e)throw Error(`FfmpegInvocation: video.scale cannot be combined with a filter graph — scale inside the graph instead (the -vf would feed an output the graph already feeds)`);if(t.some(e=>e===`-vf`))throw Error(`FfmpegInvocation: outputArgs carries a -vf while a filter graph feeds the same output — fold the filter into the graph`);return[]}if(t.some(e=>e===`-vf`))return[];if(!e)return r.length>0?[`-vf`,r]:[];let i=r.length>0?`,${r}`:``;return e.mode===`exact`?[`-vf`,`scale=${e.width}:${e.height}${i}`]:[`-vf`,`scale='min(${e.width},iw)':'min(${e.height},ih)':force_original_aspect_ratio=decrease:force_divisible_by=2${i}`]}function Rn(e,t){return e===void 0||!Pn(t)?``:`format=nv12,hwupload`}function zn(e){let t=e.bitrateKbps;if(t===void 0)return[];let n=e.rateControl??{kind:`cap`,vbvSeconds:2},r=Math.max(1,Math.round(t*n.vbvSeconds));return[...n.kind===`cbr`?[`-b:v`,`${t}k`]:[],`-maxrate`,`${t}k`,`-bufsize`,`${r}k`]}function Bn(e,t,n,r){if(e.kind===`raw`){if(n&&e.filter!==void 0)throw Error(`FfmpegInvocation: video.filter cannot be combined with a filter graph — fold the filter into the graph`);return[...e.filter===void 0?[]:[`-vf`,e.filter],`-c:v`,`rawvideo`,`-pix_fmt`,e.pixelFormat,...e.fps===void 0?[]:[`-r`,String(e.fps)]]}if(e.kind===`copy`){if(n)throw Error("FfmpegInvocation: a filter graph produces a NEW picture, so video.kind must be `encode`");return[`-c:v`,`copy`,...e.bitstreamFilter?[`-bsf:v`,e.bitstreamFilter]:[]]}let i=r===void 0?``:Rn(r.device,r.decodeHwAccel);if(r!==void 0&&n)throw Error(`FfmpegInvocation: a hardware encode fed by a filter graph must upload INSIDE the graph — hwEncodeDevice cannot be combined with filterGraph`);let a=[...Ln(e.scale,t,n,i),`-c:v`,e.encoder];return e.preset!==void 0&&a.push(`-preset`,e.preset),e.tune!==void 0&&a.push(`-tune`,e.tune),e.singleSlicePerFrame===!0&&e.encoder===`libx264`&&a.push(`-x264-params`,`sliced-threads=0`),e.profile!==void 0&&a.push(`-profile:v`,e.profile),e.level!==void 0&&a.push(`-level`,e.level),e.pixelFormat!==void 0&&a.push(`-pix_fmt`,e.pixelFormat),e.fps!==void 0&&a.push(`-r`,String(e.fps)),e.gopFrames!==void 0&&a.push(`-g`,String(e.gopFrames)),e.forceKeyFramesSeconds!==void 0&&a.push(`-force_key_frames`,`expr:gte(t,n_forced*${e.forceKeyFramesSeconds})`),e.bf!==void 0&&a.push(`-bf`,String(e.bf)),a.push(...zn(e)),e.bitstreamFilter!==void 0&&a.push(`-bsf:v`,e.bitstreamFilter),a}function Vn(e){if(e.kind===`none`)return[`-an`];if(e.kind===`copy`)return[`-c:a`,`copy`];let t=[];return e.filter!==void 0&&t.push(`-af`,e.filter),t.push(`-c:a`,jn[e.codec]),e.application!==void 0&&t.push(`-application`,e.application),e.frameDurationMs!==void 0&&t.push(`-frame_duration`,String(e.frameDurationMs)),e.globalHeader===!0&&t.push(`-flags`,`+global_header`),e.sampleRateHz!==void 0&&t.push(`-ar`,String(e.sampleRateHz)),e.bitrateKbps!==void 0&&t.push(`-b:a`,`${e.bitrateKbps}k`),e.vbvBufferKbits!==void 0&&t.push(`-bufsize`,`${e.vbvBufferKbits}k`),e.channels!==void 0&&t.push(`-ac`,String(e.channels)),t}function Hn(e){let t=[];return e.payloadType!==void 0&&t.push(`-payload_type`,String(e.payloadType)),e.ssrc!==void 0&&t.push(`-ssrc`,String(e.ssrc)),e.sdpFile!==void 0&&t.push(`-sdp_file`,e.sdpFile),t.push(`-f`,`rtp`,e.url),t}function Un(e){return e.kind===`stdout`&&(e.container===`h264`||e.container===`hevc`)}var Wn=`+frag_keyframe+empty_moov+default_base_moof`;function Gn(e){return e.kind===`rtsp-listen`?[`-f`,`rtsp`,`-rtsp_transport`,`tcp`,`-rtsp_flags`,`listen`,e.url]:e.kind===`rtp-outputs`?[]:e.container===`mp4`?qn(e):[`-f`,e.container,`pipe:1`]}var Kn=.9;function qn(e){return[`-movflags`,Wn,`-min_frag_duration`,String(Math.max(0,Math.round(e.fragmentMs*Kn*1e3))),`-f`,`mp4`,`pipe:1`]}function Jn(e){return[`-map`,`0:a:0?`,...Vn(e.codec===`pcma`?{kind:`encode`,codec:`pcma`,sampleRateHz:8e3,channels:1}:Mn[e.codec]),...Hn({url:e.rtpUrl,sdpFile:e.sdpFile})]}function Yn(e){return e.hwEncodeDevice===void 0?void 0:{device:e.hwEncodeDevice,decodeHwAccel:e.decodeHwAccel}}function Xn(e){let t=e.filterGraph??null,n=[...Nn(e.logLevel),...e.hwEncodeDevice===void 0?[]:[`-vaapi_device`,e.hwEncodeDevice.renderNode],...Fn(e.input,e.decodeHwAccel),...(e.extraInputs??[]).flatMap(t=>Fn(t,e.decodeHwAccel)),...t?[`-filter_complex`,t.graph]:[]],r=[...e.threadCount>0?[`-threads`,String(e.threadCount)]:[],...e.filterThreadCount!==void 0&&e.filterThreadCount>0?[`-filter_threads`,String(e.filterThreadCount)]:[]],i=In(e),a=i.video?[`-map`,i.video]:[],o=i.audio?[`-map`,i.audio]:[];if(e.sink.kind===`rtp-outputs`){let a=e.sink.video?[`-an`,`-map`,i.video??`0:v:0`,...Bn(e.video,e.outputArgs,t,Yn(e)),...r,...e.outputArgs,...Hn(e.sink.video)]:[],o=e.sink.audio?[`-vn`,`-map`,i.audio??`0:a:0?`,...Vn(e.audio),...Hn(e.sink.audio)]:[];return[...n,...a,...o]}let s=Un(e.sink)||e.audio.kind===`none`,c=Un(e.sink)?[`-an`]:Vn(e.audio);return[...n,...a,...Bn(e.video,e.outputArgs,t,Yn(e)),...r,...s?[]:o,...c,...e.outputArgs,...Gn(e.sink),...e.audioSidecar?Jn(e.audioSidecar):[]]}var Zn={videotoolbox:{h264:`h264_videotoolbox`,h265:`hevc_videotoolbox`},vaapi:{h264:`h264_vaapi`,h265:`hevc_vaapi`},qsv:{h264:`h264_qsv`,h265:`hevc_qsv`},cuda:{h264:`h264_nvenc`,h265:`hevc_nvenc`},nvdec:{h264:`h264_nvenc`,h265:`hevc_nvenc`},amf:{h264:`h264_amf`,h265:`hevc_amf`}};function Qn(e,t,n){let r=e===`h264`?`libx264`:`libx265`;if(!n||t===null||Pn(t)||t===`auto`)return r;let i=Zn[t.toLowerCase()];return i?e===`h264`?i.h264:i.h265:r}function $n(e){return e===`passthrough`?{kind:`none`}:e.codec===`copy`?{kind:`copy`}:{kind:`encode`,codec:e.codec,...e.bitrateKbps===void 0?{}:{bitrateKbps:e.bitrateKbps},...e.sampleRateHz===void 0?{}:{sampleRateHz:e.sampleRateHz},...e.channels===void 0?{}:{channels:e.channels}}}function er(e){let t=e.profile.video,n=t.codec===`copy`||e.forceReencode!==!0&&t.codec===e.sourceCodec,r=t.width!==void 0&&t.height!==void 0?{mode:`fit`,width:t.width,height:t.height}:null,i=t.codec===`h265`?`h265`:`h264`,a=n?{kind:`copy`,...e.bitstreamFilter===void 0?{}:{bitstreamFilter:e.bitstreamFilter}}:{kind:`encode`,encoder:Qn(i,e.decodeHwAccel,e.hardwareEncoders===!0),scale:r,...t.preset===void 0?{}:{preset:t.preset},...t.tune===void 0?{}:{tune:t.tune},...t.singleSlicePerFrame===void 0?{}:{singleSlicePerFrame:t.singleSlicePerFrame},...t.profile===void 0?{}:{profile:t.profile},...t.level===void 0?{}:{level:t.level},...e.pixelFormat===void 0?{}:{pixelFormat:e.pixelFormat},...t.fps===void 0?{}:{fps:t.fps},...t.gopFrames===void 0?{}:{gopFrames:t.gopFrames},...e.forceKeyFramesSeconds===void 0?{}:{forceKeyFramesSeconds:e.forceKeyFramesSeconds},...t.bf===void 0?{}:{bf:t.bf},...t.bitrateKbps===void 0?{}:{bitrateKbps:t.bitrateKbps},...e.rateControl===void 0?{}:{rateControl:e.rateControl},...e.bitstreamFilter===void 0?{}:{bitstreamFilter:e.bitstreamFilter}};return{logLevel:e.logLevel??`error`,decodeHwAccel:e.decodeHwAccel,input:{url:e.sourceUrl,rtspTransport:`tcp`,fflags:[`+discardcorrupt`],...e.profile.inputArgs?.length?{extraArgs:e.profile.inputArgs}:{}},video:a,audio:$n(e.profile.audio),threadCount:e.threadCount??0,outputArgs:e.profile.outputArgs??[],sink:e.sink,...e.audioSidecar===void 0?{}:{audioSidecar:e.audioSidecar}}}var tr={video:{codec:`h264`,profile:`baseline`,level:`3.1`,width:1280,height:720,fps:25,bitrateKbps:2500,gopFrames:25,bf:0,preset:`veryfast`,tune:`zerolatency`},audio:`passthrough`},nr={...tr,video:{...tr.video,bitrateKbps:3e3,gopFrames:30,preset:`ultrafast`},audio:`passthrough`},rr={...tr,audio:{codec:`opus`},video:{...tr.video,singleSlicePerFrame:!0}},ir={kind:`cbr`,vbvSeconds:1},ar={kind:`cap`,vbvSeconds:2},or={kind:`encode`,codec:`opus`,bitrateKbps:24,channels:1,application:`lowdelay`,globalHeader:!0,filter:`aresample=async=1000:first_pts=0`},sr=16*1024*1024,cr=8,lr=16,ur=class{maxUnitBytes;buffer=new Uint8Array;unitStart=0;cursor=0;state=`init`;nextSequence=0;faultReason=null;interstitial=new Set;constructor(e={}){this.maxUnitBytes=e.maxUnitBytes??sr}get fault(){return this.faultReason}get pendingBytes(){return this.buffer.length-this.unitStart}get discardedInterstitialTypes(){return[...this.interstitial]}push(e){return this.faultReason!==null||e.length===0?[]:(this.append(e),this.pendingBytes>this.maxUnitBytes?this.fail(`a single fMP4 unit exceeded ${this.maxUnitBytes} bytes — this stream is not fragmented`):this.drainBoxes())}append(e){if(this.buffer.length===0){this.buffer=e.slice();return}let t=new Uint8Array(this.buffer.length+e.length);t.set(this.buffer,0),t.set(e,this.buffer.length),this.buffer=t}drainBoxes(){let e=[];for(;;){let t=this.readHeader();if(this.faultReason!==null)return e;if(t===null||this.cursor+t.totalBytes>this.buffer.length)break;let n=this.cursor,r=n+t.totalBytes;this.cursor=r;let i=this.consumeBox(t.type,n,r);if(this.faultReason!==null)return e;i!==null&&e.push(i)}return this.compact(),e}consumeBox(e,t,n){if(this.state===`init`){if(e!==`moof`)return null;if(t===this.unitStart)return this.fail(`a moof arrived before any initialisation box — there is no ftyp/moov to send`),null;let n=this.emit(`init`,this.unitStart,t);return this.unitStart=t,this.state=`fragment`,n}if(this.state===`idle`)return e===`moof`?(this.unitStart=t,this.state=`fragment`,null):(this.interstitial.add(e),this.unitStart=n,null);if(e!==`mdat`)return null;let r=this.emit(`fragment`,this.unitStart,n);return this.unitStart=n,this.state=`idle`,r}readHeader(){let e=this.buffer.length-this.cursor;if(e<cr)return null;let t=new DataView(this.buffer.buffer,this.buffer.byteOffset,this.buffer.byteLength),n=t.getUint32(this.cursor),r=String.fromCharCode(this.buffer[this.cursor+4]??0,this.buffer[this.cursor+5]??0,this.buffer[this.cursor+6]??0,this.buffer[this.cursor+7]??0);if(n===0)return this.fail(`box "${r}" declares size 0 (to EOF) — an unbounded box cannot be fragmented`),null;if(n===1){if(e<lr)return null;let n=t.getBigUint64(this.cursor+cr);return n>BigInt(this.maxUnitBytes)?(this.fail(`box "${r}" declares ${n} bytes, over the ${this.maxUnitBytes} byte bound`),null):{type:r,totalBytes:Number(n)}}return n<cr?(this.fail(`box "${r}" declares an impossible size of ${n} bytes`),null):{type:r,totalBytes:n}}emit(e,t,n){let r=this.nextSequence;return this.nextSequence+=1,{kind:e,data:this.buffer.slice(t,n),sequence:r}}compact(){this.unitStart!==0&&(this.buffer=this.buffer.slice(this.unitStart),this.cursor-=this.unitStart,this.unitStart=0)}fail(e){return this.faultReason=e,this.buffer=new Uint8Array,this.unitStart=0,this.cursor=0,[]}};function dr(e){let t=e.now??(()=>Date.now()),n=null,r=-1/0;return{read(){return t()-r<e.ttlMs?n:void 0},write(e){n=e,r=t()}}}function fr(e){return!e||e===`none`||e===`copy`}async function pr(e){let t=e.override;if(t!=null&&t!==``)return fr(t)?null:t;let n=e.cache?.read();if(n!==void 0)return n;let r;try{r=await e.readDecoderBackend()}catch(t){let n=await e.readKernelPreferred().catch(()=>[]);return e.onFallback({reason:`decoder-unreadable`,kernelPreferred:n,error:t instanceof Error?t.message:String(t)}),e.cache?.write(null),null}if(r===``){let t=await e.readKernelPreferred().catch(()=>[]);return e.onFallback({reason:`decoder-unprobed`,kernelPreferred:t}),e.cache?.write(null),null}let i=fr(r)?null:r;return e.cache?.write(i),i}function mr(e){return String(Math.round(e*1e3)/1e3)}function hr(e,t){return!Number.isFinite(t)||t<=0?e:e/t}function gr(e){let t=e.speed>0?e.speed:1;return t===1?`[0:v]fps=${mr(e.fps)},scale=${e.maxWidth}:-2:flags=lanczos,split[a][b];[a]palettegen=stats_mode=diff[p];[b][p]paletteuse=dither=bayer:bayer_scale=5:diff_mode=rectangle`:`[0:v]fps=${mr(e.fps/t)},setpts=PTS/${t},fps=${mr(e.fps)},scale=${e.maxWidth}:-2:flags=lanczos,split[a][b];[a]palettegen=stats_mode=diff[p];[b][p]paletteuse=dither=bayer:bayer_scale=5:diff_mode=rectangle`}function _r(e){return[`-y`,`-v`,`error`,`-f`,`mp4`,`-i`,e.input??`pipe:0`,`-filter_complex`,gr(e),`-loop`,`0`,`-f`,`gif`,`pipe:1`]}var vr=de();function yr(e){let t=JSON.stringify(e,br);return(0,vr.createHash)(`sha256`).update(t??``).digest(`hex`)}function br(e,t){if(t&&typeof t==`object`&&!Array.isArray(t)){let e=t,n={};for(let t of Object.keys(e).toSorted())n[t]=e[t];return n}return t}function xr(e){return{transport:e.publishLocally===!0?`push`:`dial`}}var Sr=`\0unset`;function Cr(e){return{codec:e.codec,profile:e.profile??Sr,level:e.level??Sr,width:e.width??-1,height:e.height??-1,fps:e.fps??-1,bitrateKbps:e.bitrateKbps??-1,gopFrames:e.gopFrames??-1,bf:e.bf??-1,preset:e.preset??Sr,tune:e.tune??Sr,singleSlicePerFrame:e.singleSlicePerFrame===void 0?Sr:String(e.singleSlicePerFrame)}}function wr(e){return e===`passthrough`?{codec:`passthrough`}:{codec:e.codec,bitrateKbps:e.bitrateKbps??-1,sampleRateHz:e.sampleRateHz??-1,channels:e.channels??-1}}function Tr(e,t=xr(e)){return{deviceId:e.deviceId,source:e.source.kind===`profile`?`profile:${e.source.profile}`:`cam-stream:${e.source.camStreamId}`,transport:t.transport,fragmentMs:t.fragmentMs??-1,video:Cr(e.encode.video),audio:wr(e.encode.audio),rateControl:e.rateControl??`relaxed`,bitstreamFilter:e.bitstreamFilter??Sr,pixelFormat:e.pixelFormat??Sr,decodeHwAccel:e.decodeHwAccel??Sr}}function Er(e,t=xr(e)){return`egress:${yr(Tr(e,t))}`}function Dr(e){let t=null;return()=>{if(t!==null)return t;let n=e();return t=n,n.catch(()=>{t===n&&(t=null)}),n}}var Or=`8.1.2-5`,kr=`https://github.com/jellyfin/jellyfin-ffmpeg/releases/download/v${Or}`;function Ar(e){return`${kr}/jellyfin-ffmpeg_${Or}_portable_${e}-gpl.tar.xz`}Ar(`linux64`),Ar(`linuxarm64`),Ar(`macarm64`),Ar(`mac64`);var jr=`CAMSTACK_FFMPEG_PATH`,Mr=S([`singleton`,`device`,`widget`]),Nr=f({capName:u(),kind:Mr,deviceId:a().optional(),reachable:w(),latencyMs:a(),error:u().optional()}),Pr=f({addonId:u(),caps:C(Nr).readonly(),widgets:C(Nr).readonly()}),Fr=f({nodeId:u(),addons:C(Pr).readonly()}),Ir=f({ok:w(),degraded:w(),checkedAt:u(),nodes:C(Fr).readonly(),summary:f({total:a(),reachable:a(),unreachable:a()})}),Lr=`hub-only`;function Rr(e){return{placement:e.execution?.placement??`hub-only`,group:e.execution?.group}}function zr(e){let t=Rr(e).placement;return t===`any-node`||t===`agent-only`}function Br(e){return Rr(e).placement===`agent-only`}function Vr(e){return Rr(e).group}function Hr(e,t){return e.execution?.group??t}function Ur(e){return Rr(e).placement}function Wr(e){return e.execution?.isolate===!0}var Gr=`x-camstack-dataplane-secret`,Kr=[`grid-view`,`events-view`],qr=3e4,Jr=15e3,Yr=256*1024,Xr=f({url:u().min(1),hostNodeId:u().min(1),expiresAtMs:a().int().nonnegative(),declaredBytes:a().int().nonnegative().nullable()}),Zr=S([`running`,`done`,`failed`,`cancelled`]),Qr=S([`adopted`,`already-adopted`,`failed`,`cancelled`]),$r=f({childNativeId:u(),outcome:Qr,parentDeviceId:a().int().nonnegative().nullable(),accessoryCount:a().int().nonnegative(),error:u().nullable()}),ei=f({jobId:u(),addonId:u(),integrationId:u(),state:Zr,total:a().int().nonnegative(),processed:a().int().nonnegative(),adopted:a().int().nonnegative(),alreadyAdopted:a().int().nonnegative(),failed:a().int().nonnegative(),accessoriesCreated:a().int().nonnegative(),currentChildNativeId:u().nullable(),results:C($r).readonly(),startedAt:a(),finishedAt:a().nullable(),error:u().nullable()}),ti={cleanupIntervalMs:3600*1e3,detectionEventsDays:30,audioLevelsDays:7,snapshotsDays:14},ni=S([`stream-broker`,`object-detection`,`privacy-mask`,`device-audio`,`broker-audio`,`audio-analysis`,`event-saving`,`recording`,`notifications`]),ri=[`stream-broker`,`object-detection`,`privacy-mask`,`device-audio`,`broker-audio`,`audio-analysis`,`event-saving`,`recording`,`notifications`],ii=m(`kind`,[f({kind:h(`device-disabled`)}),f({kind:h(`wrapper-binding`),capName:u()}),f({kind:h(`recording-config`)}),f({kind:h(`notification-mute`)}),f({kind:h(`camera-audio`),capName:u()}),f({kind:h(`camera-mask`),capName:u()}),f({kind:h(`broker-audio-mute`)})]),ai=S([`no-provider`,`source-unreachable`,`device-disabled`]),oi=S([`no-privacy-zones`]),si=f({id:ni,label:u(),costWhenOff:u(),available:w(),unavailableReason:ai.optional(),warning:oi.optional(),enabled:w(),authority:ii}),ci=f({deviceId:a().int(),switches:C(si).readonly(),fetchedAt:a()}),li=`detection-pipeline`,ui=`audio-analysis`,di=`privacy-mask`,fi=`pipeline-analytics`,pi=[`motion-detection`,li,ui,fi,`scene-monitor`],mi={"stream-broker":{id:`stream-broker`,label:`Camera`,costWhenOff:`Off: the whole camera stops. No live view, no recording, no detection and no notifications — its streams are released and nothing dials it again until you turn it back on.`,authority:{kind:`device-disabled`},countsAsSwitchedOff:!0},"object-detection":{id:`object-detection`,label:`Object detection & tracking`,costWhenOff:`Off: nothing is detected or tracked on this camera, so it produces no events — and with no events there are no object notifications and no event-triggered recording. Live view and continuous recording are unaffected.`,authority:{kind:`wrapper-binding`,capName:li},countsAsSwitchedOff:!0},"privacy-mask":{id:`privacy-mask`,label:`Privacy mask`,costWhenOff:`On: the zones you drew on this camera are blacked out by the camera itself — live view, playback, exports and detection all see the black boxes, and nothing behind them was ever recorded. Off: the camera captures the whole frame, and your zones are kept for when you turn it back on.`,authority:{kind:`camera-mask`,capName:di},countsAsSwitchedOff:!1},"device-audio":{id:`device-audio`,label:`Camera microphone`,costWhenOff:`Off: the camera captures no sound at all. Live view and recordings become silent video, and audio detection and classification have nothing left to analyse — turning them back on will not recover it. The picture, motion and object detection are unaffected, and two-way talk still works. Applies at the camera, so every consumer sees the same silence.`,authority:{kind:`camera-audio`,capName:di},countsAsSwitchedOff:!0},"broker-audio":{id:`broker-audio`,label:`Audio distribution`,costWhenOff:`Off: this server distributes no sound for this camera — live view is silent and everything recorded while it is off is silent FOREVER, even after you turn it back on. Audio detection and classification also have nothing to analyse. The camera keeps capturing sound, so nothing about the camera changes and turning this back on is instant, with no interruption to the picture.`,authority:{kind:`broker-audio-mute`},countsAsSwitchedOff:!0},"audio-analysis":{id:`audio-analysis`,label:`Audio detection & classification`,costWhenOff:`Off: no audio is decoded or classified for this camera. Tracks carry no audio labels and no audio-triggered rule can fire. Audio recorded alongside video is unaffected.`,authority:{kind:`wrapper-binding`,capName:ui},countsAsSwitchedOff:!0},"event-saving":{id:`event-saving`,label:`Event saving`,costWhenOff:`Off: nothing about this camera is written to its history — no tracks, no events and no event snapshots or clips. Detection keeps running and live boxes still appear, so the camera looks busy while its timeline stays empty, and anything that fires ON an event (notification rules, event-triggered recording) has nothing to fire on. Continuous recording is unaffected, and history already written is kept.`,authority:{kind:`wrapper-binding`,capName:fi},countsAsSwitchedOff:!0},recording:{id:`recording`,label:`Recording`,costWhenOff:`Off: nothing new is written to disk. Footage already recorded stays, but retention keeps deleting it — so this camera’s history shrinks and is not replaced. Your recording schedule is kept and resumes when you turn it back on.`,authority:{kind:`recording-config`},countsAsSwitchedOff:!0},notifications:{id:`notifications`,label:`Notifications`,costWhenOff:`Off: this camera never notifies anyone, on any rule, with no expiry. Detection, events and recording carry on exactly as before — you simply stop being told about them.`,authority:{kind:`notification-mute`},countsAsSwitchedOff:!0}};function hi(e,t){switch(e.authority.kind){case`device-disabled`:return{available:!0,enabled:!t.deviceDisabled};case`wrapper-binding`:{let n=e.authority.capName;return t.bindableCapNames===null||t.activeWrapperCapNames===null?{available:!1,enabled:!0,unavailableReason:`source-unreachable`}:t.bindableCapNames.includes(n)?{available:!0,enabled:t.activeWrapperCapNames.includes(n)}:{available:!1,enabled:!0,unavailableReason:`no-provider`}}case`recording-config`:return t.recordingEnabled===null?{available:!1,enabled:!0,unavailableReason:`source-unreachable`}:{available:!0,enabled:t.recordingEnabled};case`notification-mute`:return t.notificationsMuted===null?{available:!1,enabled:!0,unavailableReason:`source-unreachable`}:{available:!0,enabled:!t.notificationsMuted};case`camera-audio`:{let e=t.deviceAudio;return e===null?{available:!1,enabled:!0,unavailableReason:t.deviceDisabled?`device-disabled`:`source-unreachable`}:e.supported?e.enabled===null?{available:!1,enabled:!0,unavailableReason:`source-unreachable`}:{available:!0,enabled:e.enabled}:{available:!1,enabled:!0,unavailableReason:`no-provider`}}case`camera-mask`:{let e=t.privacyMask;return e===null?{available:!1,enabled:!1,unavailableReason:t.deviceDisabled?`device-disabled`:`source-unreachable`}:e.supported?e.configuredRegions===null||e.enabled===null?{available:!1,enabled:!1,unavailableReason:`source-unreachable`}:e.configuredRegions===0?{available:!0,enabled:e.enabled,warning:`no-privacy-zones`}:{available:!0,enabled:e.enabled}:{available:!1,enabled:!1,unavailableReason:`no-provider`}}case`broker-audio-mute`:{let e=t.brokerAudio;return e===null?{available:!1,enabled:!0,unavailableReason:`source-unreachable`}:{available:!0,enabled:!e.muted}}}}function gi(e){return ri.map(t=>{let n=mi[t],r=hi(n,e);return{id:n.id,label:n.label,costWhenOff:n.costWhenOff,available:r.available,...r.unavailableReason===void 0?{}:{unavailableReason:r.unavailableReason},...r.warning===void 0?{}:{warning:r.warning},enabled:r.enabled,authority:n.authority}})}function _i(e){return e.filter(e=>mi[e.id].countsAsSwitchedOff&&e.available&&!e.enabled).map(e=>e.id)}function vi(e){let t=[],n=[];for(let r of ri){let i=mi[r];if(!i.countsAsSwitchedOff)continue;let a=hi(i,e);a.unavailableReason===`source-unreachable`?n.push(r):a.available&&!a.enabled&&t.push(r)}return{switchedOff:t,unreadable:n}}var yi=Symbol.for(`camstack.keychain.known-secrets`);function bi(){let e=Reflect.get(globalThis,yi);if(e!=null)return e;let t={values:new Map,compiled:null};return Reflect.set(globalThis,yi,t),t}function xi(e){let t=2166136261;for(let n=0;n<e.length;n++)t^=e.charCodeAt(n),t=Math.imul(t,16777619)>>>0;return t.toString(16).padStart(8,`0`)}function Si(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function Ci(){let e=bi();if(e.values.size===0){e.compiled=null;return}let t=[...e.values.keys()].toSorted((e,t)=>t.length-e.length);e.compiled=new RegExp(t.map(Si).join(`|`),`g`)}function wi(e,t){if(e.length<8)return;let n=`‹secret:${xi(t)}›`,r=bi().values;r.get(e)!==n&&(r.set(e,n),Ci())}function Ti(e){bi().values.delete(e)&&Ci()}function Ei(){return bi().values.size}function Di(){let e=bi();e.values.clear(),e.compiled=null}function Oi(e){let t=bi(),n=t.compiled;return n===null||e.length<8||(n.lastIndex=0,!n.test(e))?e:(n.lastIndex=0,e.replace(n,e=>t.values.get(e)??`‹secret›`))}var ki=15*6e4;function Ai(e){let t={};for(let n of e)t[n]={kind:`unavailable`,reason:`not-initialized`};return t}function ji(e){let t=Dt(e.owner),n=e.now??Date.now,r=new Map,i=new Set,a=new Map,o=e=>{let t=r.get(e);if(t!==void 0){r.delete(e),Ti(t.value);for(let t of i)try{t(e)}catch{}}};e.eventBus?.subscribe({category:T.KeychainChanged},e=>{let t=e.data;if(typeof t!=`object`||!t)return;let n=Reflect.get(t,`ref`),i=Reflect.get(t,`version`);if(typeof n!=`string`)return;let a=r.get(n);a!==void 0&&(typeof i==`number`&&i===a.version||o(n))});let s=(e,t,i)=>{let a=r.get(e);a!==void 0&&a.value!==t&&Ti(a.value),r.set(e,{value:t,version:i,fetchedAt:n()}),wi(t,e)};return{owner:t,ref:(e,n)=>Mt({owner:t,scope:e,fieldPath:n}),async resolve(t){let i={},a=[],c=n();for(let e of new Set(t)){let t=r.get(e);t!==void 0&&c-t.fetchedAt<9e5?i[e]={kind:`value`,value:t.value,version:t.version}:a.push(e)}if(a.length===0)return i;let l;try{l=await e.transport.resolve({refs:a})}catch{l=Ai(a)}for(let e of a){let t=l[e]??{kind:`unavailable`,reason:`not-initialized`};if(t.kind===`value`){s(e,t.value,t.version),i[e]=t;continue}if(t.kind===`unavailable`){let n=r.get(e);i[e]=n===void 0?t:{kind:`value`,value:n.value,version:n.version};continue}r.has(e)&&o(e),i[e]=t}return i},async put(t,n){let r=await e.transport.put({ref:t,value:n});return s(t,n,r.version),r.version},async delete(t){if(t.length===0)return 0;let n=await e.transport.delete({refs:t});for(let e of t)o(e);return n.deleted},state:()=>e.transport.getState(),onChange(e){return i.add(e),()=>{i.delete(e)}},forOwner:e.transportForOwner===void 0?null:t=>{let r=Dt(t),i=a.get(r);if(i!==void 0)return i;let o=e.transportForOwner;if(o===void 0)throw Error(`forOwner: no delegate transport`);let s=ji({owner:r,transport:o(r),...e.eventBus===void 0?{}:{eventBus:e.eventBus},now:n});return a.set(r,s),s}}}function Mi(e){if(!et(e))return null;let t=Reflect.get(e,`$secret`);return typeof t==`string`&&t.length>0?t:null}function Ni(e,t){if(tt(e)||et(e)){let n=Mi(e);return n!==null&&t.add(n),!0}let n=!1;if(Array.isArray(e))for(let r of e)n=Ni(r,t)||n;else if(typeof e==`object`&&e)for(let r of Object.values(e))n=Ni(r,t)||n;return n}async function Pi(e,t){let n=new Set;if(!Ni(e,n))return e;let r=t!==void 0&&n.size>0?await t.resolve([...n]):{},i=e=>{if(tt(e)||et(e)){let t=Mi(e),n=t===null?void 0:r[t];return n?.kind===`value`?{keep:!0,value:n.value}:{keep:!1,value:void 0}}if(Array.isArray(e)){let t=[];for(let n of e){let e=i(n);e.keep&&t.push(e.value)}return{keep:!0,value:t}}if(typeof e==`object`&&e){let t={};for(let[n,r]of Object.entries(e)){let e=i(r);e.keep&&(t[n]=e.value)}return{keep:!0,value:t}}return{keep:!0,value:e}};return i(e).value}var Fi=3e4,Ii=6e4,Li=S([`confirmed`,`suppressed`,`exhausted-fallback`]),Ri=f({id:u(),at:a().int(),deviceId:a().int(),sourceTrackId:u(),className:u(),verdict:Li,reason:u().nullable(),attempts:a().int(),deferredForMs:a().int(),decidedOnCoastedFrame:w(),birthEvidenceAvailable:w(),decidedByBirthEvidence:w(),bestScore:a().nullable(),appliedMinConfidence:a().nullable(),firstSeen:a().int().nullable(),motionOnsetAt:a().int().nullable(),birthLatencyMs:a().int().nullable(),birthIndexInBurst:a().int().nullable()}),zi=f({deviceId:a().int().optional(),since:a().int().optional(),verdict:Li.optional(),limit:a().int().min(1).max(5e3).optional()}),Bi=5e3,Vi=f({id:u(),note:u(),deviceId:a().int(),sourceTrackId:u(),archivedAt:a().int(),trackStartedAt:a().int().nullable(),trackClass:u().nullable(),trackLabel:u().nullable()}),Hi=f({deviceId:a().int().optional(),limit:a().int().min(1).max(1e3).optional()}),Ui=2e4,Wi=5e3,Gi=S([`same-subject`,`different-subjects`]),Ki=S([`before`,`after`]),qi=S([`mixed`,`not-a-subject`]),Ji=f({id:u(),deviceId:a().int(),leftTrackId:u(),rightTrackId:u(),leftSide:Ki.nullable(),rightSide:Ki.nullable(),relation:Gi,presence:h(`continuous`).nullable(),leftStartedAt:a().int().nullable(),rightStartedAt:a().int().nullable(),createdAt:a().int(),updatedAt:a().int(),author:u().nullable()}),Yi=f({id:u(),deviceId:a().int(),sourceTrackId:u(),purity:qi,switchAtMs:a().int().nullable(),startedAt:a().int().nullable(),createdAt:a().int(),updatedAt:a().int(),author:u().nullable()}),Xi=f({deviceId:a().int(),trackId:u().min(1),otherTrackId:u().min(1),relation:Gi,presence:h(`continuous`).optional(),trackSide:Ki.optional(),otherSide:Ki.optional()}),Zi=f({deviceId:a().int(),trackId:u().min(1),otherTrackId:u().min(1)}),Qi=f({cleared:w()}),$i=f({deviceId:a().int(),trackId:u().min(1),purity:S([`pure`,`mixed`,`not-a-subject`]),switchAtMs:a().int().optional()}),ea=f({purity:Yi.nullable()}),ta=f({deviceId:a().int(),trackId:u().optional(),since:a().int().optional(),until:a().int().optional(),limit:a().int().min(1).max(5e3).optional()}),na=f({relations:C(Ji).readonly(),purities:C(Yi).readonly(),truncated:w()}),ra=S([`unknown-track`,`cross-device`,`self-relation`,`contradiction`,`switch-outside-track`,`switch-needs-mixed`]),ia={high:`High`,mid:`Mid`,low:`Low`};function aa(e){return ia[e]??e.charAt(0).toUpperCase()+e.slice(1)}function oa(e){return(e.width??0)*(e.height??0)}function sa(e){if(e.length===0)return[];let t=e.map((e,t)=>({s:e,i:t,px:oa(e.metadata??{})})).toSorted((e,t)=>t.px-e.px),n=Array.from({length:e.length});for(let e=0;e<t.length;e++){let{s:r,i}=t[e],a;a=e===0?`high`:e===t.length-1?`low`:`mid`,n[i]={...r,quality:a}}return n}function ca(e){let t=e.height??0,n=e.width??0;return t>=1080||n>=1920?`high`:t>=480||n>=640?`mid`:`low`}function la(e){let t=e.protocols.find(e=>e.type===`rtsp`&&e.url)??e.protocols.find(e=>e.url),n=t?.type,r=n===`rtsp`?`rtsp`:n===`http`||n===`flv`?`http-mjpeg`:`custom`;return{id:e.id,label:e.label??e.id,protocol:r,url:t?.url,profileHint:e.quality}}function E(e){return typeof e==`string`}function ua(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function da(e){return E(e)&&e.trim()?{url:e}:ua(e)&&E(e.url)&&e.url.trim()?{url:e.url,label:E(e.label)?e.label:void 0}:null}function fa(e){let t=E(e.snapshot_url)?e.snapshot_url:void 0;if(Array.isArray(e.streams)){let n=[];for(let t of e.streams){let e=da(t);e&&n.push(e)}return{streams:n,snapshot_url:t}}let n=[],r=E(e.main_stream_url)?e.main_stream_url:void 0;r&&n.push({url:r,label:E(e.main_stream_name)?e.main_stream_name:void 0});let i=E(e.sub_stream_url)?e.sub_stream_url:void 0;i&&n.push({url:i,label:E(e.sub_stream_name)?e.sub_stream_name:void 0});let a=E(e.third_stream_url)?e.third_stream_url:void 0;return a&&n.push({url:a,label:E(e.third_stream_name)?e.third_stream_name:void 0}),{streams:n,snapshot_url:t}}function pa(e){if(e.length===0)return{};let t=sa(e),n={},r=t.find(e=>e.quality===`high`),i=t.find(e=>e.quality===`mid`),a=t.find(e=>e.quality===`low`);r&&(n.high=r.id),i&&(n.mid=i.id),a&&(n.low=a.id);let o=r??i??a??t[0];return o&&(n.high||=o.id,n.mid||=o.id,n.low||=o.id),n}var ma={streaming:!0,notifications:!0,objectDetection:!1,remoteAccess:!0,agentCluster:!1,smartHome:!0,recordings:!0,backup:!0,repl:!0},ha={debug:0,info:1,warn:2,error:3};function ga(e,t){return ha[e]<=ha[t]}var _a=S([`recording`,`events`]),va=S([`prune`,`manual-delete`,`rescan`,`retention-run`,`relocate`,`orphan-audit`]),ya=S([`retention`,`quota`,`manual`,`operator`,`maintenance`,`orphaned-device`]),ba=f({id:u(),at:a(),domain:_a,op:va,reason:ya,deviceId:a().nullable(),nodeId:u(),itemsAffected:a(),bytesReclaimed:a(),detail:u().nullable(),actor:u()}),xa=f({deviceId:a().optional(),limit:a().int().min(1).max(1e3).optional()}),D=S([`high`,`mid`,`low`]),Sa=[`high`,`mid`,`low`],Ca=p([D,h(`auto`)]),wa=S([`pull-rtsp`,`pull-rtmp`,`pull-http`,`pull-flv`,`pull-rfc4571`,`push-annexb`,`derived`]),Ta=f({width:a().int().positive(),height:a().int().positive()}),Ea=f({camStreamId:u().min(1),deviceId:a().int().nonnegative(),kind:wa,url:u().optional(),codec:u().optional(),resolution:Ta.optional(),fps:a().positive().optional(),label:u().optional(),deviceFeatures:C(u()).optional(),autoEligible:w().optional(),profileHint:D.optional(),metadata:b(u(),s()).optional()}),Da=S([`unassigned`,`idle`,`connecting`,`streaming`,`error`]),Oa=f({deviceId:a().int().nonnegative(),profile:D,brokerId:u(),sourceCamStreamId:u().nullable(),status:Da,resolution:Ta.optional(),codec:u().optional(),preBufferSec:a().nonnegative().optional(),errorMessage:u().optional()});function ka(e,t){return`${e}/${t}`}function Aa(e,t){return`${e}/${t}`}function ja(e){let t=e.indexOf(`/`);if(t<=0)return null;let n=e.slice(0,t),r=e.slice(t+1);if(!/^\d+$/.test(n))return null;let i=D.safeParse(r);return i.success?{deviceId:Number(n),profile:i.data}:null}function Ma(e,t){let n=[...e].filter(e=>t===void 0||e.deviceId===t).toSorted((e,t)=>Sa.indexOf(e.profile)-Sa.indexOf(t.profile)),r=new Set,i=[];for(let e of n){let t=e.sourceCamStreamId;t!==null&&(r.has(t)||(r.add(t),i.push(e)))}return i}var Na=f({id:u(),label:u(),protocol:S([`rtsp`,`rtmp`,`annexb`,`http-mjpeg`,`webrtc`,`custom`]),url:u().optional(),resolution:f({width:a(),height:a()}).readonly().optional(),fps:a().optional(),bitrate:a().optional(),codec:u().optional(),profileHint:D.optional()}),Pa=f({type:u(),url:u(),videoCodec:u().optional(),audioCodec:u().optional(),metadata:b(u(),s()).readonly().optional()}),Fa=f({shmId:u(),slot:a().int().nonnegative(),seq:a().int().nonnegative(),width:a().int().positive(),height:a().int().positive(),format:S([`jpeg`,`rgb`,`bgr`,`yuv420`,`gray`]),pts:a(),byteLength:a().int().nonnegative(),nodeId:u(),slotCount:a().int().positive()}),Ia=S(he),La=f({data:x(Uint8Array),sampleRate:a().int().positive(),channels:a().int().positive(),timestamp:a(),format:Ia.optional()}),Ra=f({brokerId:u(),tag:u().optional(),accept:C(Ia).readonly().optional()}),za=f({subscriptionId:u()}),Ba=S([`idle`,`connecting`,`streaming`,`error`,`stopped`]),Va=f({status:Ba,inputFps:a(),encodedSubscribers:a(),uptimeMs:a(),bitrateKbps:a(),idrIntervalMs:a(),codec:u().optional(),totalBytes:a(),packetCount:a(),rtspClients:a(),pipeClients:a(),preBufferSec:a(),preBufferMs:a(),preBufferPackets:a(),audio:f({codec:u(),sampleRate:a(),channels:a(),supported:w()}).nullable().optional(),audioMuted:w().optional(),audioMutedDropped:a().optional()}),Ha=f({profile:D,brokerId:u(),url:u(),mutedUrl:u(),enabled:w(),codec:u().optional(),resolution:Ta.optional()}),Ua=f({id:u(),name:u(),category:u().optional(),description:u().optional(),icon:u().optional()}),Wa=[`person`,`vehicle`,`animal`,`package`],Ga=[`person`,`vehicle`,`animal`];function Ka(e){return Ga.some(t=>t===e)}var qa=f({mapping:b(u(),S(Wa)),preserveOriginal:w()}),Ja={preMs:5e3,postMs:1e4},Ya=a().int().min(0).max(6),Xa=/^([01]\d|2[0-3]):[0-5]\d$/,Za=S([`off`,`events`,`continuous`,`on-device-decision`]),Qa=S(Ga),$a=e=>new Set(e).size===e.length,eo=f({motion:w().optional(),audioThresholdDbfs:a().optional(),objectClasses:C(Qa).min(1).refine($a,{message:`objectClasses must not repeat a class`}).optional(),sensorDeviceIds:C(a().int().positive()).min(1).max(16).refine($a,{message:`sensorDeviceIds must not repeat a device`}).optional()}),to=S([`continuous`,`events`]),no=eo,ro=S([`on`,`muted`]),io=f({days:C(Ya),start:u().regex(Xa),end:u().regex(Xa),mode:to,audio:ro.optional(),triggers:no.optional(),preBufferSec:a().min(0).optional(),postBufferSec:a().min(0).optional()}),ao={postBufferSec:30};function oo(e){let t=[],n=e.bands.map((e,n)=>{if(e.preBufferSec===void 0)return e;t.push(n);let{preBufferSec:r,...i}=e;return i});return t.length===0?{config:e,strippedBands:t}:{config:{...e,bands:n},strippedBands:t}}var so=ao.postBufferSec*1e3,co=f({maxAgeDays:a().min(0).optional(),maxSizeGb:a().min(0).optional()}),lo=f({enabled:w(),mode:Za.optional(),profiles:C(D).optional(),segmentSeconds:a().int().positive().optional(),bands:C(io).default([]),deviceDecision:w().optional(),retention:co.optional()}).strict().refine(e=>e.deviceDecision!==!0||e.bands.length===0,{message:`deviceDecision is a whole-config mode and carries no schedule: it cannot be combined with bands`,path:[`bands`]});function uo(e){return e.enabled?e.deviceDecision===!0?`on-device-decision`:e.bands.length===0?`off`:e.bands.some(e=>e.mode===`continuous`)?`continuous`:`events`:`off`}var fo=[`high`,`low`];function po(e,t){if(t!==void 0&&t.length>0){let n=e.filter(e=>t.includes(e));return n.length>0?n:[...e]}let n=e.filter(e=>fo.includes(e));return n.length>0?n:[...e]}var mo=[`motion`,`audioThresholdDbfs`,`objectClasses`,`sensorDeviceIds`];function ho(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function go(e){return ho(e)&&ho(e.triggers)&&e.triggers.deviceSignal===!0}function _o(e){let t=e.triggers;return ho(t)?mo.some(e=>t[e]!==void 0):!1}function vo(e){let t=e.triggers;if(!ho(t))return e;let{deviceSignal:n,...r}=t;return{...e,triggers:r}}function yo(e){let t={value:e,migrated:!1,strippedOnly:!1};if(!ho(e)||!Array.isArray(e.bands)||!e.bands.some(go))return t;let n=[];for(let t of e.bands){if(!go(t)||!ho(t)){n.push(t);continue}_o(t)&&n.push(vo(t))}if(n.length>0)return{value:{...e,bands:n},migrated:!1,strippedOnly:!0};let{mode:r,...i}=e;return{value:{...i,bands:[],deviceDecision:!0},migrated:!0,strippedOnly:!1}}var bo=S([`queued`,`running`,`done`,`failed`,`cancelled`]),xo=f({jobId:u(),state:bo,fromLocationId:u(),toLocationId:u(),deviceId:a().nullable(),entities:C(u()),filesMoved:a().int(),bytesMoved:a().int(),filesTotal:a().int().nullable(),rowsReconciled:a().int().nonnegative().optional(),rowsForgotten:a().int().nonnegative().optional(),startedAt:a(),finishedAt:a().nullable(),error:u().nullable()}),So=S([`recordings`,`recordingsLow`]),Co=f({fromLocationId:u(),toLocationId:u(),entities:C(S([`segments`])).optional(),footageClass:So.optional(),deviceId:a().int().optional(),profiles:C(u()).optional(),throttleMbps:a().min(1).max(1e3).optional(),sinceMs:a().int().optional()}),wo=f({leaseId:u().min(1)}),To=Co.extend({leaseId:u().min(1)}),Eo=S([`move`,`seal`,`gallery`]),Do=f({toLocationId:u(),fromLocationId:u().optional(),throttleMbps:a().min(1).max(1e3).optional(),mode:Eo.optional()}),Oo=f({present:w(),rows:a().int().nonnegative().nullable()}),ko=f({media:Oo,retrainFrames:Oo,anyPresent:w(),total:a().int().nonnegative().nullable()}).nullable(),Ao=Do.extend({leaseId:u().min(1)}),jo=S([`recordings`,`recordingsLow`,`eventMedia`,`backups`,`galleryMedia`]),Mo=f({recordings:u().min(1).optional(),recordingsLow:u().min(1).optional(),eventMedia:u().min(1).optional(),backups:u().min(1).optional(),galleryMedia:u().min(1).optional()}).refine(e=>Object.keys(e).length>0,{message:`select at least one storage class`}),No=f({recordings:u().min(1).optional(),recordingsLow:u().min(1).optional(),eventMedia:u().min(1).optional(),backups:u().min(1).optional(),galleryMedia:u().min(1).optional()}).optional(),Po=S([`blocking`,`nonBlocking`]),Fo=f({destinations:Mo,sources:No,throttleMbps:a().min(1).max(1e3).optional(),mode:Po.optional()}),Io=S([`planning`,`sealing`,`pausing`,`moving`,`draining`,`verifying`,`repointing`,`refreshing`,`resuming`,`done`,`failed`,`cancelled`]),Lo=S([`pipeline`,`recorder`,`analytics`]),Ro=f({filesMoved:a().int().nonnegative(),filesTotal:a().int().nonnegative().nullable(),bytesMoved:a().int().nonnegative(),rowsReconciled:a().int().nonnegative().optional(),startedAt:a(),observedAt:a()}),zo=f({storageClass:jo,fromLocationId:u(),toLocationId:u(),freezeSource:w().optional(),moverJobId:u().nullable(),state:bo.nullable(),error:u().nullable(),progress:Ro.nullable()}),Bo=f({jobId:u(),phase:Io,mode:Po,destinations:Mo,sources:No,throttleMbps:a(),moves:C(zo),pauseLeaseId:u().nullable(),pausedParticipants:C(Lo),repointed:w(),cancelRequested:w(),startedAt:a(),updatedAt:a(),finishedAt:a().nullable(),error:u().nullable()}),Vo=S([`sharesDeviceWithSource`,`deviceIdentityUnknown`,`unstampedEventMediaRows`,`blockingOnly`,`noMover`]),Ho=f({code:Vo,storageClass:jo,message:u()}),Uo=f({destinations:Mo,sources:No,mode:Po,moves:C(f({storageClass:jo,fromLocationId:u(),toLocationId:u(),freezeSource:w().optional()})),findings:C(Ho)}),Wo=S([`footage`,`media`]),Go=f({lane:Wo,job:xo,migrationJobId:u().nullable(),observedAt:a()}),Ko=f({storageClass:jo,fromLocationId:u(),toLocationId:u(),items:a().int().nonnegative().nullable(),bytes:a().int().nonnegative().nullable()}),qo=f({classes:C(jo).min(1),throttleMbps:a().min(1).max(1e3).optional()}),Jo=f({fromLocationId:u().min(1),footageClass:So.optional()}),Yo=f({segments:a().int().nonnegative(),bytes:a().int().nonnegative()}).nullable(),Xo=f({locationId:u().min(1),apply:w().optional(),deviceId:a().int().positive().optional(),profiles:C(u().min(1)).optional()}),Zo=S([`location-unknown`,`source-writable`,`no-ledger`,`archive-unreadable`,`anchor-absent`,`anchor-unreadable`,`anchor-moved`]),Qo=S([`live-tail`,`listing-error`,`path-mismatch`,`durable-refused`]),$o=f({"live-tail":a().int().nonnegative(),"listing-error":a().int().nonnegative(),"path-mismatch":a().int().nonnegative(),"durable-refused":a().int().nonnegative()}),es=f({deviceId:a().int(),hoursWalked:a().int().nonnegative(),hoursMissing:a().int().nonnegative(),ghostSegments:a().int().nonnegative(),ghostBytes:a().int().nonnegative(),forgottenSegments:a().int().nonnegative(),orphanFiles:a().int().nonnegative()}),ts=f({locationId:u(),applied:w(),refused:Zo.nullable(),archiveSegments:a().int().nonnegative().nullable(),archiveBytes:a().int().nonnegative().nullable(),hoursClaimed:a().int().nonnegative(),hoursWalked:a().int().nonnegative(),hoursMissing:a().int().nonnegative(),listings:a().int().nonnegative(),segmentsClaimed:a().int().nonnegative(),ghostSegments:a().int().nonnegative(),ghostBytes:a().int().nonnegative(),ghostHoursWhole:a().int().nonnegative(),forgottenSegments:a().int().nonnegative(),forgottenBytes:a().int().nonnegative(),orphanFiles:a().int().nonnegative(),orphanSample:C(u()).readonly(),hoursSkipped:a().int().nonnegative(),skippedByReason:$o,bounded:w(),byDevice:C(es).readonly()}),ns=f({rows:a().int().nonnegative()}).nullable(),rs=f({toLocationId:u().min(1),fromLocationId:u().optional(),mode:Eo.optional()}),is=S([`orphans`,`debug-media`,`ghost-ledger`,`done`,`failed`,`cancelled`]),as=f({includeDebugMedia:w().optional()}),os=f({jobId:u(),phase:is,includeDebugMedia:w(),orphansReclaimed:a().int().nonnegative(),orphanBytesReclaimed:a().int().nonnegative(),debugMediaReclaimed:a().int().nonnegative(),debugMediaBytesReclaimed:a().int().nonnegative(),ghostsForgotten:a().int().nonnegative(),ghostBytesForgotten:a().int().nonnegative(),detail:u().nullable(),cancelRequested:w(),startedAt:a(),updatedAt:a(),finishedAt:a().nullable(),error:u().nullable()}),ss=f({jobId:u().optional()}),cs=[`face`,`plate`],ls=[`face`,`plate`,`clip`,`custom`],us=[`active`,`readonly`,`drain`,`disabled`],ds=S(us),fs=S([`normal`,`never`,`drain`]),ps=`readOnly`;function ms(e){return e===`active`}function hs(e){return e!==`disabled`}function gs(e){switch(e){case`active`:return`normal`;case`drain`:return`drain`;case`readonly`:case`disabled`:return`never`}}function _s(e){return e.mode===void 0&&(e.config.readOnly===!0||e.enabled===!1)?`readonly`:null}function vs(e){return(ys(e.mode)?e.mode:void 0)??_s(e)??`active`}function ys(e){return us.some(t=>t===e)}function bs(e){return ms(vs(e))}function xs(e){return hs(vs(e))}function Ss(e){return gs(vs(e))}function Cs(e){if(!(`readOnly`in e))return e;let t={...e};return delete t[ps],t}function ws(e,t){return{...e,mode:t,enabled:ms(t),config:Cs(e.config)}}var Ts=u().regex(/^[a-z][a-zA-Z0-9-]*$/),O=f({id:u().regex(/^[a-z][a-zA-Z0-9-]*:[a-zA-Z0-9-]+$/),type:u(),displayName:u().min(1),providerId:u().min(1),config:b(u(),s()),nodeId:u().optional(),isSystem:w().default(!1),enabled:w().optional(),mode:ds.optional(),capacity:f({totalBytes:a(),availableBytes:a()}).nullable().optional(),owned:f({bytes:a().int().nonnegative(),measuredAtMs:a().int().nonnegative()}).optional(),createdAt:a(),updatedAt:a()}),Es=f({isDefault:w().optional()});function Ds(e){return bs({...e,config:e.config??{}})}var Os=1024**3;function ks(e){return Math.floor(e*Os)}var As=f({locationId:u(),startedAtMs:a(),startBytes:a(),bytesRemaining:a(),drained:w(),estimatedEmptyAtMs:a().nullable()}),k=p([Ts,u().regex(/^[a-z][a-zA-Z0-9-]*:[a-zA-Z0-9-]+$/)]),js=S([`local-path`,`cap-mediated`]),Ms=`local-path`,Ns=f({id:u().regex(/^[a-z][a-zA-Z0-9-]*$/,{message:`id must start with a lowercase letter and contain only letters, digits, or hyphens`}),displayName:u().min(1,{message:`displayName must not be empty`}),description:u().optional(),cardinality:S([`single`,`multi`]),access:js.optional(),defaultsTo:u().optional(),defaultRoot:S([`data`,`media`,`backup`]).optional()}),Ps={offsetHours:1,startMonth:3,startWeekIndex:5,startWeekday:`Sunday`,startHour:2,endMonth:10,endWeekIndex:5,endWeekday:`Sunday`,endHour:3},Fs={offsetHours:1,startMonth:3,startWeekIndex:2,startWeekday:`Sunday`,startHour:2,endMonth:11,endWeekIndex:1,endWeekday:`Sunday`,endHour:2},Is=[{id:`UTC`,label:`UTC (UTC+0)`,region:`Universal`,stdOffsetMinutes:0,dst:null},{id:`Europe/London`,label:`Europe/London (UTC+0 / BST)`,region:`Europe`,stdOffsetMinutes:0,dst:Ps},{id:`Europe/Rome`,label:`Europe/Rome (UTC+1 / CEST)`,region:`Europe`,stdOffsetMinutes:60,dst:Ps},{id:`Europe/Paris`,label:`Europe/Paris (UTC+1 / CEST)`,region:`Europe`,stdOffsetMinutes:60,dst:Ps},{id:`Europe/Berlin`,label:`Europe/Berlin (UTC+1 / CEST)`,region:`Europe`,stdOffsetMinutes:60,dst:Ps},{id:`Europe/Madrid`,label:`Europe/Madrid (UTC+1 / CEST)`,region:`Europe`,stdOffsetMinutes:60,dst:Ps},{id:`Europe/Amsterdam`,label:`Europe/Amsterdam (UTC+1 / CEST)`,region:`Europe`,stdOffsetMinutes:60,dst:Ps},{id:`Europe/Istanbul`,label:`Europe/Istanbul (UTC+3)`,region:`Europe`,stdOffsetMinutes:180,dst:null},{id:`America/New_York`,label:`America/New York (UTC−5 / EDT)`,region:`Americas`,stdOffsetMinutes:-300,dst:Fs},{id:`America/Chicago`,label:`America/Chicago (UTC−6 / CDT)`,region:`Americas`,stdOffsetMinutes:-360,dst:Fs},{id:`America/Denver`,label:`America/Denver (UTC−7 / MDT)`,region:`Americas`,stdOffsetMinutes:-420,dst:Fs},{id:`America/Los_Angeles`,label:`America/Los Angeles (UTC−8 / PDT)`,region:`Americas`,stdOffsetMinutes:-480,dst:Fs},{id:`America/Sao_Paulo`,label:`America/Sao Paulo (UTC−3)`,region:`Americas`,stdOffsetMinutes:-180,dst:null},{id:`Asia/Dubai`,label:`Asia/Dubai (UTC+4)`,region:`Asia`,stdOffsetMinutes:240,dst:null},{id:`Asia/Kolkata`,label:`Asia/Kolkata (UTC+5:30)`,region:`Asia`,stdOffsetMinutes:330,dst:null},{id:`Asia/Singapore`,label:`Asia/Singapore (UTC+8)`,region:`Asia`,stdOffsetMinutes:480,dst:null},{id:`Asia/Shanghai`,label:`Asia/Shanghai (UTC+8)`,region:`Asia`,stdOffsetMinutes:480,dst:null},{id:`Asia/Tokyo`,label:`Asia/Tokyo (UTC+9)`,region:`Asia`,stdOffsetMinutes:540,dst:null},{id:`Australia/Sydney`,label:`Australia/Sydney (UTC+10 / AEDT)`,region:`Oceania`,stdOffsetMinutes:600,dst:{offsetHours:1,startMonth:10,startWeekIndex:1,startWeekday:`Sunday`,startHour:2,endMonth:4,endWeekIndex:1,endWeekday:`Sunday`,endHour:3}}];function Ls(e){return Is.find(t=>t.id===e)}var Rs=S([`info`,`warn`,`error`]),zs=f({name:u().min(3).regex(/^[a-z0-9-]+(\.[a-z0-9-]+)+$/,`a channel name is dotted lower-kebab, e.g. area.thing`),description:u().min(1),defaultLevel:Rs,perDevice:w()}),Bs=f({channel:u().min(1),armedUntilMs:a(),deviceIds:C(a().int()).readonly().nullable()}),Vs=class{descriptor;on=!1;devices=null;level;closesAtMs=0;constructor(e){this.descriptor=e,this.level=e.defaultLevel}get armedUntilMs(){return this.on?this.closesAtMs:0}wants(e){return this.on?this.devices===null||this.devices.has(e):!1}log(e,t,n){if(!this.on)return;let r={...n.tags,logChannel:this.descriptor.name},i={...n,tags:r};this.level===`error`?e.error(t,i):this.level===`warn`?e.warn(t,i):e.info(t,i)}arm(e){let t=e.deviceIds;this.devices=t===null||t.length===0?null:new Set(t),this.closesAtMs=e.armedUntilMs,this.on=!0}disarm(){this.on=!1,this.devices=null,this.closesAtMs=0}},Hs=class{gates=new Map;declare(e){let t=zs.parse(e);if(this.gates.get(t.name)!==void 0)throw Error(`log channel "${t.name}" is already declared in this process — two declarations of one name is a programming error, not a merge`);let n=new Vs(t);return this.gates.set(t.name,n),n}list(){return[...this.gates.values()].map(e=>e.descriptor).sort((e,t)=>e.name.localeCompare(t.name))}gate(e){return this.gates.get(e)}apply(e,t){let n=new Map,r=[];for(let i of e)if(!(i.armedUntilMs<=t)){if(!this.gates.has(i.channel)){r.push(i.channel);continue}n.set(i.channel,i)}for(let[e,t]of this.gates){let r=n.get(e);r===void 0?t.disarm():t.arm(r)}return r}tick(e){let t=[];for(let[n,r]of this.gates)r.on&&r.armedUntilMs<=e&&(r.disarm(),t.push(n));return t}armed(){let e=[];for(let[t,n]of this.gates)n.on&&e.push({channel:t,armedUntilMs:n.armedUntilMs,deviceIds:null});return e}},Us=null;function Ws(){return Us??=new Hs,Us}function Gs(e){return Ws().declare(e)}function Ks(){Us=null}var qs=5e3;function Js(e,t={}){let n=Ws(),r=t.now??Date.now,i=t.tickMs??5e3,a=setInterval(()=>{let t=n.tick(r());for(let n of t)e.info(`log channel window closed`,{tags:{logChannel:n},meta:{channel:n}})},i);return a.unref?.(),{list:()=>n.list(),apply:t=>{let i=n.apply(t.windows,r()),a=n.armed();return e.info(`log channels applied`,{meta:{armed:a.map(e=>e.channel),unknown:i,declared:n.list().length}}),{armed:a.length,unknown:i}},stop:()=>{clearInterval(a)}}}var Ys=1024,Xs=`other`;function Zs(e,t,n){return n===void 0?`${e}${t}`:`${e}${t}${n}`}var Qs=class{maxKeys;maxReasons;counters=new Map;refused=0;constructor(e=Ys,t=16){this.maxKeys=e,this.maxReasons=t}get keysRefused(){return this.refused}get size(){return this.counters.size}note(e,t){if(!Number.isInteger(e.deviceId)||e.deviceId<=0)return;let n=Zs(e.deviceId,e.family,e.variant),r=this.counters.get(n);if(r===void 0){if(this.counters.size>=this.maxKeys){this.refused+=1;return}r={deviceId:e.deviceId,family:e.family,variant:e.variant,sinceMs:t,attempts:0,succeeded:0,reasons:new Map},this.counters.set(n,r)}if(r.attempts+=1,e.reason===void 0){r.succeeded+=1;return}let i=r.reasons.has(e.reason)||r.reasons.size<this.maxReasons?e.reason:Xs;r.reasons.set(i,(r.reasons.get(i)??0)+1)}snapshot(e){let t=[];for(let n of this.counters.values())t.push({deviceId:n.deviceId,family:n.family,...n.variant===void 0?{}:{variant:n.variant},sinceMs:n.sinceMs,atMs:e,attempts:n.attempts,succeeded:n.succeeded,reasons:[...n.reasons.entries()].map(([e,t])=>({reason:e,count:t})).toSorted((e,t)=>t.count-e.count)});return t}clear(){this.counters.clear()}};function $s(e){return e.attempts<=0?null:(e.attempts-e.succeeded)/e.attempts}var ec=`__unattributed__`,tc=`__root__`;function nc(e){return e.addonId===null?e.classification===`root`?{key:tc,kind:`root`}:{key:ec,kind:`unattributed`}:{key:e.addonId,kind:`addon`}}function rc(e){return Math.round(e*10)/10}function ic(e,t){let n=new Map;for(let t of e){let{key:e,kind:r}=nc(t),i=n.get(e)??{kind:r,main:0,gc:0,lifetime:0,memory:0,count:0,splitKnown:!0},a=t.cpuMainPercent!==null&&t.cpuGcPercent!==null;n.set(e,{kind:i.kind,main:i.main+(t.cpuMainPercent??0),gc:i.gc+(t.cpuGcPercent??0),lifetime:i.lifetime+t.cpuPercent,memory:i.memory+t.memoryRssBytes,count:i.count+1,splitKnown:i.splitKnown&&a})}return[...n.entries()].map(([e,n])=>{let r=n.splitKnown?rc(n.main):null,i=n.splitKnown?rc(n.gc):null,a=rc(n.lifetime);return{key:e,kind:n.kind,point:{atMs:t,samples:1,cpuMainPercent:r,cpuMainPercentMin:r,cpuGcPercent:i,cpuGcPercentMin:i,cpuLifetimePercent:a,cpuLifetimePercentMin:a,memoryRssBytes:n.memory,memoryRssBytesMin:n.memory,processCount:n.count,processCountMin:n.count}}})}function ac(e,t){return e===null||t===null?null:e<t?e:t}function oc(e,t){return e===null||t===null?null:e>t?e:t}function sc(e,t,n){return{atMs:n,samples:e.samples+t.samples,cpuMainPercent:oc(e.cpuMainPercent,t.cpuMainPercent),cpuMainPercentMin:ac(e.cpuMainPercentMin,t.cpuMainPercentMin),cpuGcPercent:oc(e.cpuGcPercent,t.cpuGcPercent),cpuGcPercentMin:ac(e.cpuGcPercentMin,t.cpuGcPercentMin),cpuLifetimePercent:Math.max(e.cpuLifetimePercent,t.cpuLifetimePercent),cpuLifetimePercentMin:Math.min(e.cpuLifetimePercentMin,t.cpuLifetimePercentMin),memoryRssBytes:Math.max(e.memoryRssBytes,t.memoryRssBytes),memoryRssBytesMin:Math.min(e.memoryRssBytesMin,t.memoryRssBytesMin),processCount:Math.max(e.processCount,t.processCount),processCountMin:Math.min(e.processCountMin,t.processCountMin)}}function cc(e,t,n){if(n<=0||t<=0||e<=0)return Math.max(t,1);let r=e/n;return r<=t?t:Math.ceil(r/t)*t}function lc(e,t,n){if(t<=0||e.length===0)return e;let r=new Map;for(let i of e){let e=n+Math.floor((i.atMs-n)/t)*t,a=r.get(e);r.set(e,a===void 0?{...i,atMs:e}:sc(a,i,e))}return[...r.values()].toSorted((e,t)=>e.atMs-t.atMs)}var uc=class extends Error{capName;scope;waitedMs;constructor(e,t,n){super(`Timed out waiting for ${e} (${fc(t)}) to become ready after ${n}ms`),this.name=`ReadinessTimeoutError`,this.capName=e,this.scope=t,this.waitedMs=n}};function dc(e,t){return`${e}|${fc(t)}`}function fc(e){switch(e.type){case`global`:return`global`;case`node`:return`node:${e.nodeId}`;case`device`:return`device:${e.deviceId}`}}function pc(e){switch(e){case`starting`:return 0;case`ready`:return 1;case`down`:return 2}}function mc(e,t){return e.type===t.type?e.type===`global`||t.type===`global`?!0:e.type===`node`&&t.type===`node`?e.nodeId===t.nodeId:e.type===`device`&&t.type===`device`?e.deviceId===t.deviceId:!1:!1}var hc=class{bus;sourceNodeId;logger;now;generation;verboseDeviceScopeLogs;snapshot=new Map;subscriptions=new Set;unsubscribeBus;unsubscribeAgentOffline;constructor(e){if(this.bus=e.eventBus,this.sourceNodeId=e.sourceNodeId,this.logger=e.logger,this.now=e.now??(()=>Date.now()),this.generation=e.generation??gc(),this.verboseDeviceScopeLogs=e.verboseDeviceScopeLogs??!1,this.unsubscribeBus=this.bus.subscribe({category:`system.ready-state`},e=>this.ingest(e.data)),this.unsubscribeAgentOffline=this.bus.subscribe({category:`agent.offline`},e=>this.synthesizeDownForNode(e.data.agentId)),typeof this.bus.getRecent==`function`)try{let e=this.bus.getRecent({category:`system.ready-state`});for(let t of e)this.ingest(t.data)}catch{}}close(){this.unsubscribeBus(),this.unsubscribeAgentOffline(),this.subscriptions.clear()}get(e,t){return this.snapshot.get(dc(e,t))??null}getSnapshotForTransport(){return Array.from(this.snapshot.values())}hydrate(e){let t=this.now(),n=0;for(let r of e){let e=dc(r.capName,r.scope),i=this.snapshot.get(e)??null,a,o;if(i!==null){if(this.isLocallyAuthoritative(i))continue;let e=i.generation===r.generation;if(e&&pc(r.state)<=pc(i.state))continue;a=!e&&r.state===`ready`?i.epoch+1:i.epoch,o=Math.max(0,t-i.lastChange)}else a=1,o=0;let s={capName:r.capName,scope:r.scope,state:r.state,generation:r.generation,epoch:a,lastChange:t,sourceNodeId:r.sourceNodeId};this.snapshot.set(e,s),n++,this.logPerRecord(r.scope,`readiness: ${r.capName} (${fc(r.scope)}) → ${r.state} (hydrated${i===null?``:` update`}, gen=${r.generation.slice(0,6)})`);let c={capName:r.capName,scope:r.scope,state:r.state,epoch:a,generation:r.generation,sourceNodeId:`hydrated`,ts:t,durationInPrevState:o};for(let e of this.subscriptions)if(e.capName===r.capName&&mc(e.scope,r.scope))try{e.handler(c)}catch(e){this.logger?.warn(`readiness hydrate handler threw for ${r.capName}: ${e.message??String(e)}`)}}return n}logPerRecord(e,t){if(this.logger){if(e.type===`device`){if(!this.verboseDeviceScopeLogs)return;this.logger.debug(t,{tags:{deviceId:e.deviceId}});return}this.logger.debug(t)}}isLocallyAuthoritative(e){return e.scope.type===`node`?e.scope.nodeId===this.sourceNodeId:e.sourceNodeId===this.sourceNodeId}getAll(){return new Map(this.snapshot)}emitReady(e,t){this.emitTransition(e,t,`ready`)}emitStarting(e,t){this.emitTransition(e,t,`starting`)}emitDown(e,t){this.emitTransition(e,t,`down`)}awaitReady(e,t,n={}){let r=n.timeoutMs??1/0,i=this.now();return this.get(e,t)?.state===`ready`?Promise.resolve():n.signal?.aborted?Promise.reject(n.signal.reason??Error(`aborted`)):new Promise((a,o)=>{let s=!1,c=this.onReadyState(e,t,e=>{e.state===`ready`&&(s||(s=!0,f(),a()))}),l=Number.isFinite(r)?setTimeout(()=>{s||(s=!0,f(),o(new uc(e,t,this.now()-i)))},r):null,u=setInterval(()=>{s||this.logger?.warn(`readiness: still awaiting ${e} (${fc(t)}) after ${this.now()-i}ms`)},3e4);typeof u.unref==`function`&&u.unref();let d=()=>{s||(s=!0,f(),o(n.signal?.reason??Error(`aborted`)))};n.signal?.addEventListener(`abort`,d,{once:!0});function f(){c(),l!==null&&clearTimeout(l),clearInterval(u),n.signal?.removeEventListener(`abort`,d)}})}onReadyState(e,t,n){let r={capName:e,scope:t,handler:n};this.subscriptions.add(r);let i=this.get(e,t);return i!==null&&queueMicrotask(()=>{this.subscriptions.has(r)&&n({capName:e,scope:t,state:i.state,epoch:i.epoch,generation:i.generation,sourceNodeId:this.sourceNodeId,ts:i.lastChange,durationInPrevState:0})}),()=>{this.subscriptions.delete(r)}}emitTransition(e,t,n){let r=this.now();this.bus.emit(gt(`system.ready-state`,{type:`capability`,id:e,nodeId:this.sourceNodeId},{capName:e,scope:t,state:n,generation:this.generation,sourceNodeId:this.sourceNodeId,ts:r}))}ingest(e){if(typeof e?.capName!=`string`||e.state!==`ready`&&e.state!==`starting`&&e.state!==`down`||typeof e.generation!=`string`||e.scope?.type!==`global`&&e.scope?.type!==`node`&&e.scope?.type!==`device`)return;let t=dc(e.capName,e.scope),n=this.snapshot.get(t)??null,r=this.now(),i;if(i=n===null?+(e.state===`ready`):n.generation!==e.generation&&e.state===`ready`?n.epoch+1:n.epoch,n!==null&&n.generation===e.generation&&n.state===e.state)return;let a=n===null?0:Math.max(0,r-n.lastChange),o={capName:e.capName,scope:e.scope,state:e.state,generation:e.generation,epoch:i,lastChange:r,sourceNodeId:e.sourceNodeId};this.snapshot.set(t,o);let s={capName:e.capName,scope:e.scope,state:e.state,epoch:i,generation:e.generation,sourceNodeId:e.sourceNodeId,ts:e.ts,durationInPrevState:a};this.logPerRecord(e.scope,`readiness: ${e.capName} (${fc(e.scope)}) → ${e.state} epoch=${i} gen=${e.generation.slice(0,6)} (prev ${a}ms)`);for(let t of this.subscriptions)if(t.capName===e.capName&&mc(t.scope,e.scope))try{t.handler(s)}catch(t){this.logger?.warn(`readiness handler threw for ${e.capName}: ${t.message??String(t)}`)}}synthesizeDownForNode(e){let t=this.now();for(let[n,r]of this.snapshot){if(r.state===`down`||!(r.scope.type===`node`&&r.scope.nodeId===e||r.scope.type===`device`&&r.sourceNodeId===e))continue;let i=Math.max(0,t-r.lastChange),a={...r,state:`down`,lastChange:t};this.snapshot.set(n,a);let o={capName:r.capName,scope:r.scope,state:`down`,epoch:r.epoch,generation:r.generation,sourceNodeId:this.sourceNodeId,ts:t,durationInPrevState:i};this.logPerRecord(r.scope,`readiness: ${r.capName} (${fc(r.scope)}) → down (synthesized from agent.offline ${e})`);for(let e of this.subscriptions)if(e.capName===r.capName&&mc(e.scope,r.scope))try{e.handler(o)}catch(e){this.logger?.warn(`readiness handler threw during agent.offline demux for ${r.capName}: ${e.message??String(e)}`)}}}};function gc(){return typeof crypto<`u`&&crypto.randomUUID?crypto.randomUUID():Math.random().toString(36).slice(2,14)}function _c(e,t){for(let{capName:n,scope:r}of t)e.emitDown(n,r)}function vc(e,t,n,r={}){if(e.length===0)return null;let i=`${n}/`,a=e=>({brokerId:e.brokerId,profileId:e.brokerId.startsWith(i)?e.brokerId.slice(i.length):e.brokerId,url:e.url,mutedUrl:e.mutedUrl,enabled:e.enabled,...e.codec===void 0?{}:{codec:e.codec},...e.resolution===void 0?{}:{resolution:e.resolution}});if(t!==`auto`){let n=e.find(e=>e.enabled&&e.url.length>0&&(e.profile===t||e.brokerId===`${i}${t}`));if(n)return a(n)}let o=e.filter(e=>e.enabled&&e.url.length>0);if(o.length===0)return null;let s=r.targetResolution;if(s){let e=o.filter(e=>e.resolution!==void 0);if(e.length>0){let t=yc(e,s);if(t)return a(t)}}return a(o[0])}function yc(e,t){let n=t.width*t.height;return[...e.flatMap(e=>e.resolution===void 0?[]:[{entry:e,pixels:e.resolution.width*e.resolution.height}])].sort((e,t)=>En(e.pixels,t.pixels,n))[0]?.entry}var bc={upperHs:[0,32],upperV:[32,40],upperGrad:[40,48],lowerHs:[48,80],lowerV:[80,88],lowerGrad:[88,96]},xc=[`motion`,`objects`,`discarded`,`stationary`],Sc=[`motion`,`objects`,`stationary`],Cc={borderWidth:2,dashed:!0,dashPattern:[6,4],opacity:1,borderRadius:2};function wc(e){return!Number.isFinite(e)||e<=0?`0 s`:e<6e4?`${String(Math.round(e/1e3))} s`:e<36e5?`${String(Math.round(e/6e4))} min`:`${String(Math.round(e/36e5))} h`}var Tc=[`onnx`,`coreml`,`openvino`,`tflite`,`pt`],Ec={yolo26:`YOLO26`,"yolo26-seg":`YOLO26-seg`,yolov9:`YOLOv9`};function Dc(e){return Ec[e]??e.toUpperCase()}var Oc={"yolo26-seg":`detection + masks, slightly heavier`},kc=/\s*@\s*\d+\s*(?:[x×]\s*\d+)?/gi;function Ac(e,t){let n=Dc(e),r=t.replace(RegExp(`^${n}\\s+`,`i`),``).replace(kc,``).trim();return r.length>0?r:t}function jc(e,t){let n=[];return t===`test`&&n.push(`Test`),n.push(e===`int8`?`Int8`:`Standard`),n.join(` · `)}function Mc(e){return Tc.filter(t=>e.formats[t]!==void 0)}function Nc(e){let t=Tc.map(t=>e.formats[t]?.sizeMB).filter(e=>typeof e==`number`);return t.length>0?Math.min(...t):0}var Pc=[`t`,`n`,`s`,`m`,`c`,`l`,`x`],Fc=[`fp32`,`int8`];function Ic(e){let t=new Map;for(let n of e){if(n.legacy===!0||n.group===void 0)continue;let{family:e,tier:r}=n.group,i=t.get(e)??new Map,a=i.get(r)??[];a.push(n),i.set(r,a),t.set(e,i)}let n=[];for(let[e,r]of t){let t=[];for(let[n,i]of r){let r=i.map(e=>{let t=e.group?.precision??`fp32`,n=e.group?.optimization??`standard`;return{modelId:e.id,precision:t,optimization:n,resolution:e.group?.resolution,label:jc(t,n),formats:Mc(e),sizeMB:Nc(e)}}).toSorted((e,t)=>e.resolution===t.resolution?e.optimization===t.optimization?Fc.indexOf(e.precision)-Fc.indexOf(t.precision):e.optimization===`test`?1:-1:(t.resolution??1/0)-(e.resolution??1/0)),a=r.find(e=>e.precision===`fp32`&&e.optimization===`standard`)??r[0];if(a===void 0)continue;let o=i.find(e=>e.id===a.modelId);t.push({tier:n,label:o?Ac(e,o.name):n.toUpperCase(),baseModelId:a.modelId,options:r})}t.sort((e,t)=>{let n=Pc.indexOf(e.tier),r=Pc.indexOf(t.tier);return n!==-1&&r!==-1?n-r:n===-1?r===-1?e.tier.localeCompare(t.tier):1:-1});let i=Oc[e];n.push({family:e,label:Dc(e),...i===void 0?{}:{hint:i},tiers:t})}return n.sort((e,t)=>e.family.localeCompare(t.family)),n}function Lc(e,t){let n=t.precision??`fp32`,r=t.optimization??`standard`,i=e.filter(e=>e.group!==void 0&&e.group.family===t.family&&e.group.tier===t.tier&&(e.group.precision??`fp32`)===n&&(e.group.optimization??`standard`)===r);return t.resolution===void 0?i.toSorted((e,t)=>(t.group?.resolution??1/0)-(e.group?.resolution??1/0))[0]?.id??null:i.find(e=>e.group?.resolution===t.resolution)?.id??null}function Rc(e,t){let n=e.find(e=>e.id===t);return n?.group===void 0?null:{family:n.group.family,tier:n.group.tier,precision:n.group.precision??`fp32`,optimization:n.group.optimization??`standard`,resolution:n.group.resolution}}var zc=/^object-clip(-[a-z0-9][a-z0-9-]*)?$/,Bc=f({textModelId:u().min(1),embeddingDim:a().int().positive(),vectorIndex:u().regex(zc),tokenizerFile:u().min(1),contextLength:a().int().positive(),padId:a().int().nonnegative(),searchMinScore:a().min(0).max(1)}),Vc=[`loose`,`balanced`,`strict`],Hc=S(Vc),Uc={loose:1,balanced:1.25,strict:1.5};function Wc(e,t){if(t.minScore!==void 0)return t.minScore;let n=Uc[t.strictness??`loose`];return Math.min(1,Math.round(e.searchMinScore*n*1e3)/1e3)}var Gc=[`animal-classifier`,`vehicle-classifier`,`package-detection`],Kc=[`plate-detection`,`face-detection`],qc=[`segmentation`],Jc=[...Gc,...Kc,...qc];function Yc(e){return Jc.some(t=>t===e)}function Xc(e){return Gc.some(t=>t===e)}var Zc={"animal-classifier":[`bird`,`cat`,`cow`,`deer`,`dog`,`horse`,`sheep`,`squirrel`],"vehicle-classifier":[`Ambulance`,`Bicycle`,`Bus`,`Car`,`Motorcycle`,`Taxi`,`Truck`,`Van`],"package-detection":[`package`]},Qc={"animal-classifier":`animal`,"vehicle-classifier":`vehicle`,"package-detection":`package`},$c={"animal-classifier":{},"vehicle-classifier":{school_bus:`Bus`,garbage_truck:`Truck`},"package-detection":{}},el={"plate-detection":{rootLabels:[`license_plate`],parentMacro:`vehicle`,childClass:`plate`,servedChildSteps:[`plate-ocr`],use:`as-output`},"face-detection":{rootLabels:[`face`],parentMacro:`person`,childClass:`face`,servedChildSteps:[`face-embedding`],use:`refine`,minRootInputPx:640}},tl={"animal-classifier":!0,"vehicle-classifier":!0,"package-detection":!0,"plate-detection":!1,"face-detection":!1,segmentation:!0},nl=`useRootModel`,rl=`labelLink`,il=`detector-link:`;function al(e){return`${il}${e}`}function ol(e){if(e===void 0||!e.startsWith(`detector-link:`))return;let t=e.slice(14);return Xc(t)?t:void 0}function sl(e,t){let n=$c[e][t];if(n!==void 0)return n;let r=t.toLowerCase();return Zc[e].find(e=>e.toLowerCase()===r)}function cl(e,t){let n=[];if(t!==void 0)for(let r of Gc){let i={};for(let n of e){if(t.mapping[n]!==Qc[r])continue;let e=sl(r,n);e!==void 0&&(i[n]=e)}let a=new Set(Object.values(i));if(a.size===0)continue;let o=Zc[r].filter(e=>!a.has(e));n.push({kind:`label`,stepId:r,labelToEffect:i,uncovered:o})}let r=new Set(e);for(let e of Kc){let t=el[e],i=t.rootLabels.filter(e=>r.has(e));i.length!==0&&n.push({kind:`crop`,stepId:e,rootLabels:i,parentMacro:t.parentMacro,childClass:t.childClass})}return n}var ll=[`yolo-seg`];function ul(e){return e===void 0||!ll.includes(e)?[]:qc.map(e=>({kind:`mask`,stepId:e}))}function dl(e,t){let n=e?.suppliesSteps??cl(e!==void 0&&e.labels.length>0?e.labels.map(e=>e.id):t.labels,e?.classMap??t.classMap),r=ul(e?.postprocessor).filter(e=>!n.some(t=>t.stepId===e.stepId)),i=r.length>0?[...n,...r]:n,a=e===void 0?void 0:Math.min(e.inputSize.width,e.inputSize.height);return a===void 0?i:i.map(e=>e.kind===`crop`?{...e,rootInputPx:a}:e)}function fl(e,t){return e?.find(e=>e.stepId===t)}function pl(e,t){let n=t?.[nl];if(typeof n==`boolean`)return n;let r=t?.[rl];return r===`skip-when-filled`?!0:r===`run`?!1:tl[e]}function ml(e){if(e.kind!==`crop`)return;let t=el[e.stepId].minRootInputPx;if(t!==void 0)return e.rootInputPx!==void 0&&e.rootInputPx>=t?void 0:`root-input-too-small`}function hl(e,t,n){let r=fl(n,e),i=pl(e,t),a=r===void 0?`root-does-not-declare`:ml(r);return{stepId:e,supply:r,intent:i,effective:i&&a===void 0,inactive:i&&a!==void 0,...i&&a!==void 0?{inactiveReason:a}:{}}}function gl(e,t){let n=t?.enabledClasses;return!Array.isArray(n)||n.length===0?!0:n.some(t=>t===e)}function _l(e){return el[e].servedChildSteps}var vl=.9;function yl(e,t){let n=e.w*e.h;if(!(n>0))return-1;let r=-1,i=1/0;return t.forEach((t,a)=>{if(Math.max(0,Math.min(e.x+e.w,t.x+t.w)-Math.max(e.x,t.x))*Math.max(0,Math.min(e.y+e.h,t.y+t.h)-Math.max(e.y,t.y))/n<.9)return;let o=t.w*t.h;o<i&&(r=a,i=o)}),r}var bl={"animal-classifier":`animals`,"vehicle-classifier":`vehicles`,"package-detection":`packages`,"plate-detection":`plates`,"face-detection":`faces`,segmentation:`masks`};function xl(e){let t=bl[e.stepId];if(e.kind!==`label`)return t;let n=Zc[e.stepId].length;return n<=1?t:`${t} ${String(n-e.uncovered.length)}/${String(n)}`}function Sl(e){return(e??[]).map(xl).join(` · `)}var Cl=[`onnx`,`coreml`,`openvino`,`tflite`,`pt`,`gguf`],wl=f({url:u(),sizeMB:a(),isDirectory:w().optional(),files:C(u()).readonly().optional(),runtimes:C(S([`python`])).readonly().optional(),revision:u().min(1).optional()}),Tl=S([`current`,`stale`,`missing`]),El=S([`fp32`,`fp16`,`int8`]),Dl=f({downloaded:w(),sizeMB:a(),onDisk:Tl.optional(),precision:El.optional()}),Ol=f({url:u(),filename:u(),sizeMB:a()}),kl=f({onnx:wl.optional(),coreml:wl.optional(),openvino:wl.optional(),tflite:wl.optional(),pt:wl.optional(),gguf:wl.optional()}),Al=f({family:u(),tier:u(),precision:S([`fp32`,`int8`]).optional(),optimization:S([`standard`,`test`]).optional(),resolution:a().int().positive().optional()}),jl=[`camstack`,`frigate`,`scrypted`,`custom`],Ml=S(jl);function Nl(e){if(e.provider!==void 0)return e.provider;let t=`${e.id} ${e.description??``}`;return/scrypted/i.test(t)?`scrypted`:/frigate/i.test(t)?`frigate`:`custom`}var Pl=[`camstack-hf`,`third-party`,`built-in`],Fl=r(e=>typeof e==`string`?{weights:e}:e,f({weights:u().min(1),code:u().min(1).optional(),data:f({name:u().min(1),terms:u().min(1),url:u().url().optional()}).optional(),upstream:f({name:u().min(1),url:u().url()}).optional(),url:u().url().optional(),attribution:u().min(1).optional(),modifications:u().min(1).optional(),hosting:S(Pl).optional(),nonCommercial:w().optional()})),Il=m(`kind`,[f({kind:h(`label`),stepId:S(Gc),labelToEffect:b(u(),u()),uncovered:C(u()).readonly()}),f({kind:h(`crop`),stepId:S(Kc),rootLabels:C(u()).readonly(),parentMacro:S([`vehicle`,`person`]),childClass:S([`plate`,`face`]),rootInputPx:a().int().positive().optional()}),f({kind:h(`mask`),stepId:S(qc)})]),Ll=f({id:u(),name:u(),description:u(),formats:kl,inputSize:f({width:a(),height:a()}),inputChannels:a().int().positive().optional(),labels:C(Ua).readonly(),inputLayout:S([`nchw`,`nhwc`]).optional(),inputNormalization:S([`zero-one`,`imagenet`,`none`,`scrfd`]).optional(),outputProbabilities:w().optional(),preprocessMode:S([`letterbox`,`resize`]).optional(),postprocessor:v().optional(),defaultConfidence:a().min(0).max(1).optional(),defaultClassFloors:b(u(),a().min(0).max(1)).optional(),gpuInferencePrecision:S([`f32`,`f16`]).optional(),suppliedLabelFloors:b(u(),a().min(0).max(1)).optional(),faceAlignment:w().optional(),extraFiles:C(Ol).readonly().optional(),legacy:w().optional(),metrics:f({map50:a().optional(),p95LatencyMs:b(u(),a()).optional()}).optional(),license:Fl.optional(),group:Al.optional(),provider:Ml.optional(),classMap:qa.optional(),suppliesSteps:C(Il).readonly().optional(),clip:Bc.optional()}),Rl=m(`format`,[f({format:h(`openvino`),precisions:C(S([`fp16`,`int8`])).min(1).readonly()}),f({format:h(`coreml`)})]),zl=f({id:u().regex(/^[a-zA-Z0-9._-]+$/),name:u(),labels:C(Ua).readonly(),inputSize:f({width:a(),height:a()}),inputLayout:S([`nchw`,`nhwc`]).optional(),inputNormalization:S([`zero-one`,`imagenet`,`none`,`scrfd`]).optional(),preprocessMode:S([`letterbox`,`resize`]).optional(),outputFormat:S([`yolo`,`ssd`,`embedding`,`classification`,`ocr`,`segmentation`]),faceAlignment:w().optional(),classMap:qa.optional()}),Bl=f({format:S(Cl),precision:S([`fp16`,`int8`]).optional(),sizeMB:a(),validated:w(),files:C(u()).readonly()}),Vl=f({entry:Ll,artifacts:C(Bl).readonly()});function Hl(e){switch(e.toUpperCase()){case`GET`:case`HEAD`:case`OPTIONS`:return`view`;case`POST`:case`PUT`:case`PATCH`:return`create`;default:return`delete`}}function Ul(e,t){return e.some(e=>e.type===`category`&&e.target===`device`&&e.access.includes(t))}function Wl(e,t,n){return e.some(e=>e.type===`addon`&&e.target===t&&e.access.includes(n))}function Gl(e){let t=e.kind;if(t===void 0)return{kind:`session`};if(t!==`sso-bridge`)return{kind:`not-a-credential`,reason:`bridge token kind=${String(t)}`};let n=e.provider;return n===`oauth-access`?{kind:`integration`,provider:`oauth-access`}:{kind:`not-a-credential`,reason:`bridge token provider=${String(n)}`}}function Kl(e){let{principal:t}=e;if(t.kind===`not-a-credential`)return{allowed:!1,reason:t.reason};if(t.kind===`session`)return{allowed:!0};let n=Hl(e.method);return Wl(e.scopes,e.addonId,n)?{allowed:!0}:{allowed:!1,reason:`integration token holds no addon:${e.addonId}[${n}] grant`}}var ql={contact:`entryOpen`,binary:`on`,switch:`on`,motion:`detected`,flood:`flooded`,gas:`detected`,smoke:`detected`,"carbon-monoxide":`detected`,vibration:`detected`,tamper:`tampered`},Jl={contact:`lastChangedAt`,binary:`lastChangedAt`,switch:`lastChangedAt`,motion:`lastDetectedAt`,flood:`lastChangedAt`,gas:`lastChangedAt`,smoke:`lastChangedAt`,"carbon-monoxide":`lastChangedAt`,vibration:`lastChangedAt`,tamper:`lastChangedAt`},Yl=Object.keys(ql),Xl=[`sensor`,`switch`,`control`];function Zl(e){return Object.prototype.hasOwnProperty.call(ql,e)}function Ql(e,t){let n=ql[e];if(n===void 0)return null;let r=t[n];return typeof r==`boolean`?r:null}function $l(e,t){let n=Jl[e];if(n===void 0)return null;let r=t[n];return typeof r!=`number`||!Number.isFinite(r)||r<=0?null:r}var eu=3e4;function tu(e){let t=e.changedAt,n=Math.max(e.startedAtMs,e.nowMs-e.firstSightingFreshnessMs),r=e.priorLevel===void 0&&e.level&&t!==null&&Number.isFinite(t)&&t>=n,i=e.priorLevel===!1&&e.level&&t!==null&&Number.isFinite(t);return(r||i)&&t!==null?{kind:`rise`,timestamp:t}:{kind:`none`,nextPriorLevel:e.level}}function nu(e){let t=Ql(e.capName,e.slice);return t===null?{edge:`none`,value:null,reason:Zl(e.capName)?`non-boolean-value`:`unknown-cap`}:tu({level:t,changedAt:$l(e.capName,e.slice),priorLevel:e.prior,startedAtMs:e.startedAtMs,nowMs:e.nowMs,firstSightingFreshnessMs:e.firstSightingFreshnessMs}).kind===`rise`?{edge:`rising`,value:!0}:e.prior===void 0?t?{edge:`none`,value:t,reason:`baseline-seeded-stale-active`}:{edge:`none`,value:t,reason:`baseline-seeded-inactive`}:e.prior===t?{edge:`none`,value:t,reason:`no-change`}:t?{edge:`none`,value:t,reason:`missing-timestamp`}:{edge:`none`,value:t,reason:`falling-edge`}}var A=class extends Error{position;constructor(e,t){super(e),this.name=`ExpressionParseError`,this.position=t}},j=class extends Error{constructor(e){super(e),this.name=`ExpressionEvalError`}};function ru(e){return e===`rose`||e===`count`}function M(e,t,n){if(typeof e!=`number`||!Number.isFinite(e))throw new j(`${t}: argument ${n+1} must be a finite number`);return e}function iu(e,t,n){if(typeof e!=`string`)throw new j(`${t}: argument ${n+1} must be a string`);return e}function N(e,t){if(!Number.isFinite(e))throw new j(`${t}: produced a non-finite result`);return e}function au(e,t){return e.map((e,n)=>M(e,t,n))}function ou(e,t,n){if(typeof e!=`boolean`)throw new j(`${t}: argument ${n+1} must be a boolean`);return e}var su=/^[+-]?(\d+(\.\d*)?|\.\d+)([eE][+-]?\d+)?$/;function cu(e){if(typeof e==`number`)return Number.isFinite(e)?e:null;if(typeof e!=`string`)return null;let t=e.trim();if(!su.test(t))return null;let n=Number(t);return Number.isFinite(n)?n:null}var lu=2e3;function uu(e,t,n,r,i,a){let o=ou(e,`rose`,0),s=typeof t==`number`&&Number.isFinite(t)?t:null,c=n===void 0?lu:M(n,`rose`,2);if(c<0)throw new j(`rose: debounce must be a non-negative finite number`);if(r.disarmNext===!0||i.disarmRoseNext)return r.disarmNext=!1,r.priorLevel===void 0&&(r.priorLevel=o),a.currentOutput;let l=tu({level:o,changedAt:s,priorLevel:r.priorLevel,startedAtMs:a.startedAtMs,nowMs:a.nowMs,firstSightingFreshnessMs:eu});return r.priorLevel=l.kind===`rise`?!0:l.nextPriorLevel,l.kind===`none`||i.acceptedEdgeAt!==null&&l.timestamp-i.acceptedEdgeAt<c?a.currentOutput:(i.acceptedEdgeAt=l.timestamp,l.timestamp)}function du(e){e.disarmRoseNext=!0;for(let[t,n]of e.calls)n.kind===`rose`&&e.calls.set(t,{...n,disarmNext:!0})}function fu(e,t,n){let r=typeof n==`number`&&Number.isFinite(n)&&n>=0?n:0;return e===null?(t.primed=!0,r):typeof e!=`number`||!Number.isFinite(e)?r:t.primed?t.highWater!==null&&e<=t.highWater?r:(t.highWater=e,r+1):(t.primed=!0,t.highWater=e,r)}var pu=1/0,mu={min:{minArgs:1,maxArgs:pu,apply:e=>N(Math.min(...au(e,`min`)),`min`)},max:{minArgs:1,maxArgs:pu,apply:e=>N(Math.max(...au(e,`max`)),`max`)},abs:{minArgs:1,maxArgs:1,apply:e=>N(Math.abs(M(e[0],`abs`,0)),`abs`)},floor:{minArgs:1,maxArgs:1,apply:e=>N(Math.floor(M(e[0],`floor`,0)),`floor`)},ceil:{minArgs:1,maxArgs:1,apply:e=>N(Math.ceil(M(e[0],`ceil`,0)),`ceil`)},sqrt:{minArgs:1,maxArgs:1,apply:e=>N(Math.sqrt(M(e[0],`sqrt`,0)),`sqrt`)},round:{minArgs:1,maxArgs:2,apply:e=>{let t=M(e[0],`round`,0),n=e.length>1?Math.trunc(M(e[1],`round`,1)):0;if(n<0||n>100)throw new j(`round: digits must be between 0 and 100`);let r=10**n;return N(Math.round(t*r)/r,`round`)}},pow:{minArgs:2,maxArgs:2,apply:e=>N(M(e[0],`pow`,0)**M(e[1],`pow`,1),`pow`)},clamp:{minArgs:3,maxArgs:3,apply:e=>{let t=M(e[0],`clamp`,0),n=M(e[1],`clamp`,1),r=M(e[2],`clamp`,2);if(n>r)throw new j(`clamp: lower bound is greater than upper bound`);return N(Math.min(r,Math.max(n,t)),`clamp`)}},avg:{minArgs:1,maxArgs:pu,apply:e=>{let t=au(e,`avg`);return N(t.reduce((e,t)=>e+t,0)/t.length,`avg`)}},sum:{minArgs:1,maxArgs:pu,apply:e=>N(au(e,`sum`).reduce((e,t)=>e+t,0),`sum`)},coalesce:{minArgs:1,maxArgs:pu,apply:e=>{for(let t of e)if(t!==null)return t;return null}},age:{minArgs:2,maxArgs:2,apply:e=>N(M(e[0],`age`,0)-M(e[1],`age`,1),`age`)},convert:{minArgs:3,maxArgs:3,apply:(e,t)=>{let n=M(e[0],`convert`,0),r=iu(e[1],`convert`,1).trim(),i=iu(e[2],`convert`,2).trim();if(t.convert){let e=t.convert(n,r,i);if(e===null)throw new j(`convert: cannot convert '${r}' to '${i}'`);return N(e,`convert`)}if(r===i)return n;throw new j(`convert: unit conversion table not installed`)}},any:{minArgs:1,maxArgs:pu,apply:e=>e.map((e,t)=>ou(e,`any`,t)).some(e=>e)},all:{minArgs:1,maxArgs:pu,apply:e=>e.map((e,t)=>ou(e,`all`,t)).every(e=>e)},within:{minArgs:2,maxArgs:2,apply:(e,t)=>{let n=M(e[1],`within`,1);if(n<0)throw new j(`within: the window must not be negative`);let r=e[0];if(r===null)return!1;let i=M(r,`within`,0),a=t.now;if(a===void 0||!Number.isFinite(a))throw new j(`within: no clock was supplied to this evaluation`);let o=a-i<=n;return o&&t.noteDeadline?.(i+n+1),o}},number:{minArgs:1,maxArgs:1,apply:e=>cu(e[0])},latest:{minArgs:1,maxArgs:pu,apply:e=>{let t=e.flatMap((e,t)=>e===null?[]:[M(e,`latest`,t)]);return t.length===0?null:N(Math.max(...t),`latest`)}},rose:{minArgs:2,maxArgs:3,apply:()=>{throw new j(`rose: stateful evaluation context is required`)}},count:{minArgs:1,maxArgs:1,apply:()=>{throw new j(`count: stateful evaluation context is required`)}}},hu=Object.freeze(Object.assign(Object.create(null),mu)),gu=new Set(Object.keys(mu)),_u=2048,vu=4096,yu=/^[A-Za-z_][A-Za-z0-9_]*$/,bu=new Set([`now`,`true`,`false`,`null`]),xu=new Set([`true`,`false`,`null`]);function Su(e){return e>=`0`&&e<=`9`}function Cu(e){return e>=`A`&&e<=`Z`||e>=`a`&&e<=`z`||e===`_`}function wu(e){return Cu(e)||Su(e)}function Tu(e){return e===` `||e===` `||e===`
|
|
3
|
+
`||e===`\r`||e===`\f`||e===`\v`}function Eu(e){if(e.length>2048)throw new A(`expression too long (${e.length} > ${_u} chars)`,0);let t=[],n=0,r=e.length;for(;n<r;){let i=e[n];if(Tu(i)){n+=1;continue}if(Su(i)){let i=n;for(;n<r&&Su(e[n]);)n+=1;if(n<r&&e[n]===`.`){if(n+1>=r||!Su(e[n+1]))throw new A(`malformed number: decimal point needs a digit`,n);for(n+=1;n<r&&Su(e[n]);)n+=1}let a=e.slice(i,n),o=Number(a);if(!Number.isFinite(o))throw new A(`malformed number: '${a}'`,i);t.push({type:`number`,value:o,pos:i});continue}if(i===`'`||i===`"`){let a=i,o=n;n+=1;let s=``,c=!1;for(;n<r;){let t=e[n];if(t===`\\`){let t=n+1<r?e[n+1]:``;if(t===`\\`||t===`'`||t===`"`){s+=t,n+=2;continue}throw new A(`invalid string escape: '\\${t}'`,n)}if(t===a){c=!0,n+=1;break}s+=t,n+=1}if(!c)throw new A(`unterminated string literal`,o);t.push({type:`string`,value:s,pos:o});continue}if(Cu(i)){let i=n;for(;n<r&&wu(e[n]);)n+=1;let a=e.slice(i,n);xu.has(a)?t.push({type:`keyword`,keyword:Du(a),pos:i}):t.push({type:`identifier`,name:a,pos:i});continue}let a=n+1<r?e.slice(n,n+2):``;if(a===`<=`||a===`>=`||a===`==`||a===`!=`||a===`&&`||a===`||`){t.push({type:`punct`,punct:a,pos:n}),n+=2;continue}if(Ou(i)){t.push({type:`punct`,punct:i,pos:n}),n+=1;continue}throw new A(`unexpected character '${i}'`,n)}return t.push({type:`eof`,pos:r}),t}function Du(e){return e===`true`?`true`:e===`false`?`false`:`null`}function Ou(e){return e===`(`||e===`)`||e===`,`||e===`?`||e===`:`||e===`+`||e===`-`||e===`*`||e===`/`||e===`%`||e===`!`||e===`<`||e===`>`}var ku={"||":1,"&&":2,"==":3,"!=":3,"<":4,"<=":4,">":4,">=":4,"+":5,"-":5,"*":6,"/":6,"%":6};function Au(e){return e===`&&`||e===`||`}function ju(e){return e===`+`||e===`-`||e===`*`||e===`/`||e===`%`||e===`==`||e===`!=`||e===`<`||e===`<=`||e===`>`||e===`>=`}var Mu=class{tokens;pos=0;nodeCount=0;identifiers=new Set;callees=new Set;constructor(e){this.tokens=e}parse(){let e=this.parseTernary(),t=this.peek();if(t.type!==`eof`)throw new A(`unexpected trailing input`,t.pos);return{ast:e,identifiers:this.identifiers,callees:this.callees,nodeCount:this.nodeCount}}peek(){return this.tokens[this.pos]}next(){return this.tokens[this.pos++]}expectPunct(e){let t=this.peek();if(t.type!==`punct`||t.punct!==e)throw new A(`expected '${e}'`,t.pos);this.pos+=1}matchPunct(e){let t=this.peek();return t.type===`punct`&&t.punct===e?(this.pos+=1,!0):!1}countNode(){if(this.nodeCount+=1,this.nodeCount>256)throw new A(`expression too complex`,this.peek().pos)}parseTernary(){let e=this.parseBinary(1);if(this.matchPunct(`?`)){let t=this.parseTernary();this.expectPunct(`:`);let n=this.parseTernary();return this.countNode(),{kind:`conditional`,test:e,consequent:t,alternate:n}}return e}parseBinary(e){let t=this.parseUnary();for(;;){let n=this.peek();if(n.type!==`punct`)break;let r=ku[n.punct];if(r===void 0||r<e)break;let i=n.punct;this.pos+=1;let a=this.parseBinary(r+1);if(this.countNode(),Au(i))t={kind:`logical`,op:i,left:t,right:a};else if(ju(i))t={kind:`binary`,op:i,left:t,right:a};else throw new A(`unexpected operator '${i}'`,n.pos)}return t}parseUnary(){let e=this.peek();if(e.type===`punct`&&(e.punct===`!`||e.punct===`-`)){let t=e.punct;this.pos+=1;let n=this.parseUnary();return this.countNode(),{kind:`unary`,op:t,operand:n}}return this.parsePrimary()}parsePrimary(){let e=this.next();switch(e.type){case`number`:return this.countNode(),{kind:`literal`,value:e.value};case`string`:return this.countNode(),{kind:`literal`,value:e.value};case`keyword`:return this.countNode(),{kind:`literal`,value:e.keyword===`null`?null:e.keyword===`true`};case`identifier`:{let t=this.peek();return t.type===`punct`&&t.punct===`(`?this.parseCall(e.name,e.pos):(this.identifiers.add(e.name),this.countNode(),{kind:`identifier`,name:e.name})}case`punct`:if(e.punct===`(`){let e=this.parseTernary();return this.expectPunct(`)`),e}throw new A(`unexpected token '${e.punct}'`,e.pos);case`eof`:throw new A(`unexpected end of expression`,e.pos)}}parseCall(e,t){if(!gu.has(e))throw new A(`unknown function '${e}'`,t);this.expectPunct(`(`);let n=[];if(!this.matchPunct(`)`))for(;;){if(n.push(this.parseTernary()),n.length>16)throw new A(`too many arguments to '${e}'`,t);if(!this.matchPunct(`,`)){this.expectPunct(`)`);break}}return this.callees.add(e),this.countNode(),{kind:`call`,callee:e,args:n}}};function Nu(e){return new Mu(Eu(e)).parse()}var Pu=new Map;function Fu(e){let t=Pu.get(e);if(t!==void 0)return Pu.delete(e),Pu.set(e,t),t;let n;try{n={ok:!0,parsed:Nu(e)}}catch(e){n={ok:!1,error:e instanceof A?e.message:String(e)}}if(Pu.set(e,n),Pu.size>256){let e=Pu.keys().next().value;e!==void 0&&Pu.delete(e)}return n}function Iu(e){let t=Fu(e);if(t.ok)return t.parsed;throw new A(t.error)}function Lu(e){return Fu(e)}var Ru=Object.freeze({});function zu(e){let t=Object.create(null);for(let n of Object.keys(e))Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}function Bu(e){return typeof e==`number`&&Number.isFinite(e)}function Vu(e){return!!e}function Hu(e,t){if(!Number.isFinite(e))throw new j(`${t} produced a non-finite result`);return e}function Uu(e){if(e.steps+=1,e.steps>e.maxSteps)throw new j(`expression evaluation step budget exceeded`)}function P(e,t){return`${e}/${t}`}function F(e,t,n){switch(Uu(t),e.kind){case`literal`:return e.value;case`identifier`:if(!(e.name in t.scope))throw new j(`unknown identifier: ${e.name}`);return t.scope[e.name];case`unary`:return Wu(e.op,F(e.operand,t,P(n,`operand`)));case`binary`:return Gu(e.op,F(e.left,t,P(n,`left`)),F(e.right,t,P(n,`right`)));case`logical`:{let r=F(e.left,t,P(n,`left`));return e.op===`&&`?Vu(r)?F(e.right,t,P(n,`right`)):r:Vu(r)?r:F(e.right,t,P(n,`right`))}case`conditional`:return Vu(F(e.test,t,P(n,`test`)))?F(e.consequent,t,P(n,`consequent`)):F(e.alternate,t,P(n,`alternate`));case`call`:{let r=e.args.map((e,r)=>F(e,t,P(n,`arg:${r}`)));return Ku(e.callee,r,n,t)}}}function Wu(e,t){if(e===`!`)return!Vu(t);if(!Bu(t))throw new j(`unary "-" requires a finite number`);return Hu(-t,`unary "-"`)}function Gu(e,t,n){switch(e){case`==`:return t===n;case`!=`:return t!==n;case`+`:if(typeof t==`string`&&typeof n==`string`)return t+n;if(Bu(t)&&Bu(n))return Hu(t+n,`"+"`);throw new j(`"+" requires two numbers or two strings`);case`-`:case`*`:case`/`:case`%`:if(!Bu(t)||!Bu(n))throw new j(`"${e}" requires two finite numbers`);return Hu(e===`-`?t-n:e===`*`?t*n:e===`/`?t/n:t%n,`"${e}"`);case`<`:case`<=`:case`>`:case`>=`:if(Bu(t)&&Bu(n)||typeof t==`string`&&typeof n==`string`)return e===`<`?t<n:e===`<=`?t<=n:e===`>`?t>n:t>=n;throw new j(`"${e}" requires two numbers or two strings`)}}function Ku(e,t,n,r){if(!Object.prototype.hasOwnProperty.call(hu,e))throw new j(`unknown function: ${e}`);let i=hu[e];if(t.length<i.minArgs||t.length>i.maxArgs)throw new j(`${e}: wrong number of arguments (${t.length})`);if(ru(e)){if(r.invokeStateful===void 0)throw new j(`${e}: stateful evaluation context is required`);return r.invokeStateful({name:e,path:n,args:t})}return i.apply(t,r.hooks)}function qu(e,t,n){return F(e,{scope:t,hooks:n?.hooks??Ru,maxSteps:n?.maxSteps??4096,...n?.invokeStateful===void 0?{}:{invokeStateful:n.invokeStateful},steps:0},`root`)}function Ju(){return{calls:new Map,acceptedEdgeAt:null,disarmRoseNext:!1}}function Yu(e){return{calls:new Map([...e.calls].map(([e,t])=>[e,{...t}])),acceptedEdgeAt:e.acceptedEdgeAt,disarmRoseNext:e.disarmRoseNext}}function Xu(e,t,n){let r=t.calls.get(e.path);switch(e.name){case`rose`:{let i=r?.kind===`rose`?r:{kind:`rose`};t.calls.set(e.path,i);let a=n.currentOutput===null||typeof n.currentOutput==`number`&&Number.isFinite(n.currentOutput)?n.currentOutput:null;return uu(e.args[0],e.args[1],e.args[2],i,t,{currentOutput:a,startedAtMs:n.startedAtMs,nowMs:n.nowMs})}case`count`:{let i=r?.kind===`count`?r:{kind:`count`,highWater:null,primed:!1};return t.calls.set(e.path,i),fu(e.args[0],i,n.currentOutput)}}}function Zu(e){if(e===null)return null;if(typeof e==`string`||typeof e==`boolean`)return e;if(typeof e==`number`)return Number.isFinite(e)?e:void 0}function Qu(e){let t=Object.keys(e.bindings);if(t.length>32)return`too many bindings (${t.length} > 32)`;for(let e of t){if(!yu.test(e))return`invalid binding name '${e}'`;if(bu.has(e))return`binding name '${e}' is reserved`;if(gu.has(e))return`binding name '${e}' shadows a builtin function`}let n=Lu(e.expr);if(!n.ok)return n.error;let r=new Set(t);for(let e of n.parsed.identifiers)if(e!==`now`&&!r.has(e))return`expression references unbound identifier '${e}'`;return null}function $u(e,t,n,r){let i=Lu(e);if(!i.ok)return{ok:!1,error:i.error};let a=zu({...t,now:n}),o={...r?.hooks,now:n};try{return{ok:!0,value:qu(i.parsed.ast,a,{...r,hooks:o})}}catch(e){return{ok:!1,error:e instanceof j?e.message:String(e)}}}var ed=f({kind:h(`field`).optional(),sourceKey:u(),cap:u(),fieldPath:u()}),td=f({kind:h(`literal`),value:p([u(),a(),w(),re()])}),nd=f({kind:h(`global`),sourceStableId:u(),cap:u(),fieldPath:u()}),rd=p([ed,td,nd]),id=f({expr:u().min(1).max(_u),bindings:b(u().regex(yu),rd)}).superRefine((e,t)=>{let n=Qu(e);n!==null&&t.addIssue({code:`custom`,message:n,path:[`expr`]})}),ad=S([`eq`,`ne`,`gt`,`gte`,`lt`,`lte`,`contains`,`in`]),od=f({kind:h(`condition`),deviceId:a().int().nonnegative(),cap:u().min(1),fieldPath:u().min(1),operator:ad,value:p([u(),a(),w(),C(p([u(),a()]))])}),sd=f({kind:h(`expression`),expr:u().min(1).max(_u),bindings:b(u().regex(yu),rd)}).superRefine((e,t)=>{let n=Qu(e);n!==null&&t.addIssue({code:`custom`,message:n,path:[`expr`]})}),cd=pe(()=>m(`kind`,[f({kind:h(`all`),children:C(cd)}),f({kind:h(`any`),children:C(cd)}),f({kind:h(`not`),child:cd}),od,sd])),ld=m(`kind`,[f({kind:h(`device-state`),deviceId:a().int().nonnegative(),cap:u().min(1),fieldPath:u().min(1),becomes:p([u(),a(),w()]).optional(),edge:w().optional(),forMs:a().int().min(0).max(864e5).optional(),debounceMs:a().int().min(0).max(6e5).optional()}),f({kind:h(`device-event`),category:u().min(1),deviceId:a().int().nonnegative().optional()}),f({kind:h(`schedule`),cron:u().min(1).max(120)}),f({kind:h(`manual`)})]),ud=m(`kind`,[f({kind:h(`wait`),seconds:a().min(0).max(300)}),f({kind:h(`cap`),deviceId:p([a().int(),C(a().int()).min(1),f({$var:u().min(1)})]),cap:u().min(1),method:u().min(1),args:b(u(),s()).optional()}),f({kind:h(`code`),code:u().min(1).max(2e4)})]),dd=f({triggers:C(ld),conditions:cd.optional(),actions:C(ud)});function fd(e){if(e.kind===`condition`||e.kind===`expression`)return 1;if(e.kind===`not`)return 1+fd(e.child);let t=e.children;if(t.length===0)return 1;let n=0;for(let e of t){let t=fd(e);t>n&&(n=t)}return 1+n}function pd(e){if(e.kind===`condition`||e.kind===`expression`)return 1;if(e.kind===`not`)return pd(e.child);let t=0;for(let n of e.children)t+=pd(n);return t}function md(e){return e.kind===`condition`||e.kind===`expression`?!1:e.kind===`not`?md(e.child):e.children.length===0?!0:e.children.some(md)}function hd(e){if(e.triggers.length===0)return`an automation needs at least one trigger — without one nothing can start a run`;if(e.actions.length===0)return`an automation needs at least one action — a rule that does nothing is not a rule`;let t=e.conditions;if(t!==void 0){if(md(t))return`a condition group is empty — group existing rows instead of leaving a container to fill`;let e=fd(t);if(e>3)return`conditions nest ${e} levels deep — the limit is 3. "not (any of …)" is the same as "all of (not …)", which is one level shallower`;let n=pd(t);if(n>32)return`conditions use ${n} leaves — the limit is 32`}return null}var gd=15e3;function I(e){return JSON.stringify(e)}function _d(e,t){switch(e.kind){case`all`:return`allOf([\n${e.children.map(e=>`${t} () => ${_d(e,`${t} `)}`).join(`,
|
|
4
|
+
`)}\n${t}])`;case`any`:return`anyOf([\n${e.children.map(e=>`${t} () => ${_d(e,`${t} `)}`).join(`,
|
|
5
|
+
`)}\n${t}])`;case`not`:return`notOf(() => ${_d(e.child,t)})`;case`condition`:return`leaf(${I(e.deviceId)}, ${I(e.cap)}, ${I(e.fieldPath)}, ${I(e.operator)}, ${I(e.value)})`;case`expression`:return`exprLeaf(${I(e.expr)}, ${I(e.bindings)})`}}function vd(e,t){switch(e.kind){case`schedule`:return` // trigger ${t}: schedule — armed to the next minute boundary and
|
|
6
|
+
// RE-ARMED from the wall clock every tick, so it cannot drift the way a
|
|
7
|
+
// setInterval(24h) does. No cron library: a block cannot resolve one.
|
|
8
|
+
{
|
|
9
|
+
let timer: ReturnType<typeof setTimeout> | undefined
|
|
10
|
+
const arm = (): void => {
|
|
11
|
+
timer = setTimeout(() => {
|
|
12
|
+
if (cronMatches(${I(e.cron)}, new Date())) {
|
|
13
|
+
void run({ kind: 'schedule', at: Date.now() })
|
|
14
|
+
}
|
|
15
|
+
arm()
|
|
16
|
+
}, nextMinuteBoundary())
|
|
17
|
+
}
|
|
18
|
+
arm()
|
|
19
|
+
disposers.push(() => { if (timer !== undefined) clearTimeout(timer) })
|
|
20
|
+
}`;case`device-event`:return` // trigger ${t}: device event
|
|
21
|
+
disposers.push(
|
|
22
|
+
ctx.eventBus.subscribe(
|
|
23
|
+
{ category: ${I(e.category)}${e.deviceId===void 0?``:`, deviceId: ${I(e.deviceId)}`} },
|
|
24
|
+
(event) => {
|
|
25
|
+
void run({
|
|
26
|
+
kind: 'device-event',
|
|
27
|
+
at: Date.now(),
|
|
28
|
+
deviceId: event.deviceId,
|
|
29
|
+
category: ${I(e.category)},
|
|
30
|
+
})
|
|
31
|
+
},
|
|
32
|
+
),
|
|
33
|
+
)`;case`device-state`:{let n=e.becomes===void 0?`undefined`:I(e.becomes);return` // trigger ${t}: device state — the mirror is the authority, the
|
|
34
|
+
// event only WAKES the evaluation, so a dropped event delays and never loses.
|
|
35
|
+
{
|
|
36
|
+
let previous: unknown = undefined
|
|
37
|
+
let debounce: ReturnType<typeof setTimeout> | undefined
|
|
38
|
+
let heldSince: number | undefined
|
|
39
|
+
const check = async (): Promise<void> => {
|
|
40
|
+
const value = await readField(${I(e.deviceId)}, ${I(e.cap)}, ${I(e.fieldPath)})
|
|
41
|
+
const want = ${n}
|
|
42
|
+
const matches = want === undefined ? value !== previous : value === want
|
|
43
|
+
const changed = value !== previous
|
|
44
|
+
previous = value
|
|
45
|
+
if (!matches) { heldSince = undefined; return }
|
|
46
|
+
if (${e.edge===!0?`true`:`false`} && !changed) return
|
|
47
|
+
const forMs = ${I(e.forMs??0)}
|
|
48
|
+
if (forMs > 0) {
|
|
49
|
+
if (heldSince === undefined) { heldSince = Date.now(); return }
|
|
50
|
+
if (Date.now() - heldSince < forMs) return
|
|
51
|
+
}
|
|
52
|
+
heldSince = undefined
|
|
53
|
+
void run({
|
|
54
|
+
kind: 'device-state',
|
|
55
|
+
at: Date.now(),
|
|
56
|
+
deviceId: ${I(e.deviceId)},
|
|
57
|
+
cap: ${I(e.cap)},
|
|
58
|
+
field: ${I(e.fieldPath)},
|
|
59
|
+
to: value,
|
|
60
|
+
})
|
|
61
|
+
}
|
|
62
|
+
const wake = (): void => {
|
|
63
|
+
if (debounce !== undefined) clearTimeout(debounce)
|
|
64
|
+
debounce = setTimeout(() => { void check() }, ${I(e.debounceMs??0)})
|
|
65
|
+
}
|
|
66
|
+
disposers.push(
|
|
67
|
+
ctx.eventBus.subscribe({ category: 'device.state-changed', deviceId: ${I(e.deviceId)} }, wake),
|
|
68
|
+
)
|
|
69
|
+
const reconcile = setInterval(() => { void check() }, RECONCILE_MS)
|
|
70
|
+
disposers.push(() => clearInterval(reconcile))
|
|
71
|
+
}`}case`manual`:return` // trigger ${t}: manual — fired by automation-control.trigger
|
|
72
|
+
// ("Run actions"), which runs the THEN half with an EMPTY vars bag.`}}function yd(e,t){switch(e.kind){case`wait`:return` case ${t}: await sleep(${I(e.seconds*1e3)}); break`;case`cap`:return Array.isArray(e.deviceId)?` case ${t}: {
|
|
73
|
+
for (const deviceId of ${I(e.deviceId)}) {
|
|
74
|
+
await actuate(deviceId, ${I(e.cap)}, ${I(e.method)}, ${I(e.args??{})}, vars)
|
|
75
|
+
}
|
|
76
|
+
break
|
|
77
|
+
}`:` case ${t}: {
|
|
78
|
+
const deviceId = ${typeof e.deviceId==`number`?I(e.deviceId):`resolveTarget(vars, ${I(e.deviceId.$var)})`}
|
|
79
|
+
await actuate(deviceId, ${I(e.cap)}, ${I(e.method)}, ${I(e.args??{})}, vars)
|
|
80
|
+
break
|
|
81
|
+
}`;case`code`:return` case ${t}: {
|
|
82
|
+
// inline code action — a fragment of THIS block, bundled by esbuild
|
|
83
|
+
await (async () => {
|
|
84
|
+
${e.code.split(`
|
|
85
|
+
`).map(e=>` ${e}`).join(`
|
|
86
|
+
`)}
|
|
87
|
+
})()
|
|
88
|
+
break
|
|
89
|
+
}`}}function bd(e){let t=hd(e.recipe);if(t!==null)throw Error(`cannot generate an automation from an invalid recipe: ${t}`);let{name:n,recipe:r}=e,i=r.conditions===void 0?`true`:`await ${_d(r.conditions,` `)}`;return`import type { AddonContext } from '@camstack/types'
|
|
90
|
+
import { evaluateExpressionSource, toExpressionValue } from '@camstack/types'
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* ${n}
|
|
94
|
+
*
|
|
95
|
+
* GENERATED FROM A RECIPE — do not edit by hand. Editing this file makes it a
|
|
96
|
+
* script: the visual editor reads AUTOMATION_RECIPE below, and hand edits are
|
|
97
|
+
* lost the next time the recipe is saved. Use "Eject to code" to take ownership
|
|
98
|
+
* of it permanently (one way).
|
|
99
|
+
*/
|
|
100
|
+
|
|
101
|
+
const AUTOMATION_RECIPE = ${JSON.stringify(r,null,2)} as const
|
|
102
|
+
|
|
103
|
+
const RECONCILE_MS = ${gd}
|
|
104
|
+
|
|
105
|
+
/** A cap is named \`alarm-panel\`; \`ctx.api\` is keyed by the ROUTER name,
|
|
106
|
+
* \`alarmPanel\`. Indexing ctx.api with the cap name yields undefined and every
|
|
107
|
+
* action throws, so the conversion is not cosmetic. */
|
|
108
|
+
function capToRouterKey(cap: string): string {
|
|
109
|
+
return cap.replace(/-([a-z0-9])/g, (_m, c: string) => c.toUpperCase())
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
/** Ms until the top of the next minute. Recomputed every tick so a long-lived
|
|
113
|
+
* schedule cannot accumulate drift. */
|
|
114
|
+
function nextMinuteBoundary(): number {
|
|
115
|
+
const now = Date.now()
|
|
116
|
+
return 60_000 - (now % 60_000)
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
/** Does \`when\` satisfy a 5-field cron expression (min hour dom mon dow)?
|
|
120
|
+
* Supports wildcards, step syntax, ranges, comma lists and plain numbers —
|
|
121
|
+
* the subset an operator can author, and nothing that needs a library. */
|
|
122
|
+
function cronMatches(expr: string, when: Date): boolean {
|
|
123
|
+
const fields = expr.trim().split(/\\s+/)
|
|
124
|
+
if (fields.length !== 5) return false
|
|
125
|
+
const actual = [
|
|
126
|
+
when.getMinutes(),
|
|
127
|
+
when.getHours(),
|
|
128
|
+
when.getDate(),
|
|
129
|
+
when.getMonth() + 1,
|
|
130
|
+
when.getDay(),
|
|
131
|
+
]
|
|
132
|
+
return fields.every((field, i) => matchField(field, actual[i]!))
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
function matchField(field: string, value: number): boolean {
|
|
136
|
+
for (const part of field.split(',')) {
|
|
137
|
+
const [range, stepRaw] = part.split('/')
|
|
138
|
+
const step = stepRaw === undefined ? 1 : Number.parseInt(stepRaw, 10)
|
|
139
|
+
if (!Number.isFinite(step) || step < 1) continue
|
|
140
|
+
if (range === '*') {
|
|
141
|
+
if (value % step === 0) return true
|
|
142
|
+
continue
|
|
143
|
+
}
|
|
144
|
+
const bounds = range!.split('-')
|
|
145
|
+
const lo = Number.parseInt(bounds[0]!, 10)
|
|
146
|
+
const hi = bounds[1] === undefined ? lo : Number.parseInt(bounds[1], 10)
|
|
147
|
+
if (!Number.isFinite(lo) || !Number.isFinite(hi)) continue
|
|
148
|
+
if (value >= lo && value <= hi && (value - lo) % step === 0) return true
|
|
149
|
+
}
|
|
150
|
+
return false
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
export default function block(ctx: AddonContext) {
|
|
154
|
+
const disposers: Array<() => void> = []
|
|
155
|
+
const sleep = (ms: number): Promise<void> => new Promise((r) => setTimeout(r, ms))
|
|
156
|
+
|
|
157
|
+
/** Read one cap field off the state mirror. Returns undefined when the device,
|
|
158
|
+
* the cap or the field cannot be resolved — the caller decides what that
|
|
159
|
+
* means, and it always logs. */
|
|
160
|
+
async function readField(
|
|
161
|
+
deviceId: number,
|
|
162
|
+
cap: string,
|
|
163
|
+
fieldPath: string,
|
|
164
|
+
): Promise<unknown> {
|
|
165
|
+
try {
|
|
166
|
+
const slice = await ctx.api.deviceState.getCapSlice.query({ deviceId, capName: cap })
|
|
167
|
+
let cursor: unknown = slice
|
|
168
|
+
for (const part of fieldPath.split('.')) {
|
|
169
|
+
if (cursor === null || typeof cursor !== 'object') return undefined
|
|
170
|
+
cursor = (cursor as Record<string, unknown>)[part]
|
|
171
|
+
}
|
|
172
|
+
return cursor
|
|
173
|
+
} catch {
|
|
174
|
+
return undefined
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
function compare(actual: unknown, operator: string, expected: unknown): boolean {
|
|
179
|
+
switch (operator) {
|
|
180
|
+
case 'eq': return actual === expected
|
|
181
|
+
case 'ne': return actual !== expected
|
|
182
|
+
case 'gt': return typeof actual === 'number' && typeof expected === 'number' && actual > expected
|
|
183
|
+
case 'gte': return typeof actual === 'number' && typeof expected === 'number' && actual >= expected
|
|
184
|
+
case 'lt': return typeof actual === 'number' && typeof expected === 'number' && actual < expected
|
|
185
|
+
case 'lte': return typeof actual === 'number' && typeof expected === 'number' && actual <= expected
|
|
186
|
+
case 'contains': return typeof actual === 'string' && typeof expected === 'string' && actual.includes(expected)
|
|
187
|
+
case 'in': return Array.isArray(expected) && expected.some((v) => v === actual)
|
|
188
|
+
default: return false
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
/** A leaf whose device or cap is currently unresolvable is FALSE and logs.
|
|
193
|
+
* It never throws the pass away, and it never counts as true. */
|
|
194
|
+
async function leaf(
|
|
195
|
+
deviceId: number,
|
|
196
|
+
cap: string,
|
|
197
|
+
fieldPath: string,
|
|
198
|
+
operator: string,
|
|
199
|
+
expected: unknown,
|
|
200
|
+
): Promise<boolean> {
|
|
201
|
+
const actual = await readField(deviceId, cap, fieldPath)
|
|
202
|
+
if (actual === undefined) {
|
|
203
|
+
ctx.logger.warn('condition leaf unresolvable — treated as false', {
|
|
204
|
+
tags: { deviceId },
|
|
205
|
+
cap,
|
|
206
|
+
fieldPath,
|
|
207
|
+
})
|
|
208
|
+
return false
|
|
209
|
+
}
|
|
210
|
+
return compare(actual, operator, expected)
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
/** The expression leaf goes through the bounded engine — parsed AST, no
|
|
214
|
+
* member access, no loops, hard step/node limits. Never inline JS. */
|
|
215
|
+
async function exprLeaf(
|
|
216
|
+
expr: string,
|
|
217
|
+
bindings: Record<string, { kind?: string; cap?: string; fieldPath?: string; value?: unknown; sourceStableId?: string }>,
|
|
218
|
+
): Promise<boolean> {
|
|
219
|
+
const values: Record<string, string | number | boolean | null> = {}
|
|
220
|
+
for (const [alias, binding] of Object.entries(bindings)) {
|
|
221
|
+
if (binding.kind === 'literal') {
|
|
222
|
+
values[alias] = toExpressionValue(binding.value) ?? null
|
|
223
|
+
continue
|
|
224
|
+
}
|
|
225
|
+
const deviceId = await stableIdToDeviceId(binding.sourceStableId)
|
|
226
|
+
if (deviceId === undefined) {
|
|
227
|
+
ctx.logger.warn('condition leaf unresolvable — treated as false', {
|
|
228
|
+
tags: { deviceId: -1 },
|
|
229
|
+
binding: alias,
|
|
230
|
+
})
|
|
231
|
+
return false
|
|
232
|
+
}
|
|
233
|
+
const raw = await readField(deviceId, binding.cap ?? '', binding.fieldPath ?? '')
|
|
234
|
+
values[alias] = toExpressionValue(raw) ?? null
|
|
235
|
+
}
|
|
236
|
+
const result = evaluateExpressionSource(expr, values, Date.now())
|
|
237
|
+
if (!result.ok) {
|
|
238
|
+
ctx.logger.warn('expression leaf failed — treated as false', { expr, error: result.error })
|
|
239
|
+
return false
|
|
240
|
+
}
|
|
241
|
+
return result.value === true
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
async function stableIdToDeviceId(stableId: string | undefined): Promise<number | undefined> {
|
|
245
|
+
if (stableId === undefined) return undefined
|
|
246
|
+
try {
|
|
247
|
+
const all = await ctx.api.deviceManager.listAll.query({})
|
|
248
|
+
const hit = all.devices.find((d: { stableId?: string; id: number }) => d.stableId === stableId)
|
|
249
|
+
return hit?.id
|
|
250
|
+
} catch {
|
|
251
|
+
return undefined
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
async function allOf(children: Array<() => Promise<boolean>>): Promise<boolean> {
|
|
256
|
+
for (const c of children) { if (!(await c())) return false }
|
|
257
|
+
return true
|
|
258
|
+
}
|
|
259
|
+
async function anyOf(children: Array<() => Promise<boolean>>): Promise<boolean> {
|
|
260
|
+
for (const c of children) { if (await c()) return true }
|
|
261
|
+
return false
|
|
262
|
+
}
|
|
263
|
+
async function notOf(child: () => Promise<boolean>): Promise<boolean> {
|
|
264
|
+
return !(await child())
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
/** A {$var} action target, resolved from the run's bag BEFORE dispatch — the
|
|
268
|
+
* action runner only ever sees a number. */
|
|
269
|
+
function resolveTarget(vars: Record<string, unknown>, name: string): number {
|
|
270
|
+
const raw = vars[name]
|
|
271
|
+
if (typeof raw === 'number') return raw
|
|
272
|
+
throw new Error('action target var "' + name + '" is not a device id')
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
/** Substitute {{vars.x}} slots. Substitution only — never evaluation. */
|
|
276
|
+
function substitute(value: unknown, vars: Record<string, unknown>): unknown {
|
|
277
|
+
if (typeof value !== 'string') return value
|
|
278
|
+
return value.replace(/\\{\\{\\s*vars\\.([A-Za-z_][A-Za-z0-9_]*)\\s*\\}\\}/g, (_m, key: string) => {
|
|
279
|
+
const v = vars[key]
|
|
280
|
+
if (v === undefined) {
|
|
281
|
+
ctx.logger.warn('template referenced a var that was never set', { var: key })
|
|
282
|
+
return ''
|
|
283
|
+
}
|
|
284
|
+
return String(v)
|
|
285
|
+
})
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
async function actuate(
|
|
289
|
+
deviceId: number,
|
|
290
|
+
cap: string,
|
|
291
|
+
method: string,
|
|
292
|
+
args: Record<string, unknown>,
|
|
293
|
+
vars: Record<string, unknown>,
|
|
294
|
+
): Promise<void> {
|
|
295
|
+
const resolved: Record<string, unknown> = {}
|
|
296
|
+
for (const [k, v] of Object.entries(args)) resolved[k] = substitute(v, vars)
|
|
297
|
+
// Forked-addon ctx.api namespaces are tRPC Proxies over a noop function
|
|
298
|
+
// (typeof === 'function'), not plain objects — reject only null/undefined.
|
|
299
|
+
const client: unknown = Reflect.get(ctx.api, capToRouterKey(cap))
|
|
300
|
+
const proc: unknown =
|
|
301
|
+
client !== null && client !== undefined ? Reflect.get(client as object, method) : undefined
|
|
302
|
+
const mutate: unknown =
|
|
303
|
+
proc !== null && proc !== undefined ? Reflect.get(proc as object, 'mutate') : undefined
|
|
304
|
+
if (typeof mutate !== 'function') {
|
|
305
|
+
throw new Error('no such device method: ' + cap + '.' + method)
|
|
306
|
+
}
|
|
307
|
+
await mutate({ ...resolved, deviceId })
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
async function evaluateConditions(): Promise<boolean> {
|
|
311
|
+
return ${i}
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
/** The THEN half. Stops at the first failure — continuing past a failed step
|
|
315
|
+
* executes an intent the operator never expressed. */
|
|
316
|
+
async function runActions(vars: Record<string, unknown>): Promise<void> {
|
|
317
|
+
for (let step = 0; step < ${r.actions.length}; step += 1) {
|
|
318
|
+
try {
|
|
319
|
+
switch (step) {
|
|
320
|
+
${r.actions.map((e,t)=>yd(e,t)).join(`
|
|
321
|
+
`)}
|
|
322
|
+
}
|
|
323
|
+
} catch (err: unknown) {
|
|
324
|
+
ctx.logger.warn('action failed — stopping the sequence', {
|
|
325
|
+
step,
|
|
326
|
+
error: err instanceof Error ? err.message : String(err),
|
|
327
|
+
})
|
|
328
|
+
return
|
|
329
|
+
}
|
|
330
|
+
}
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
async function run(trigger: Record<string, unknown>): Promise<void> {
|
|
334
|
+
const vars: Record<string, unknown> = { ...trigger }
|
|
335
|
+
const passed = await evaluateConditions()
|
|
336
|
+
if (!passed) {
|
|
337
|
+
ctx.logger.debug('automation did not run — conditions were false', { trigger })
|
|
338
|
+
return
|
|
339
|
+
}
|
|
340
|
+
ctx.logger.info('automation running', { trigger })
|
|
341
|
+
await runActions(vars)
|
|
342
|
+
}
|
|
343
|
+
|
|
344
|
+
${r.triggers.map((e,t)=>vd(e,t)).join(`
|
|
345
|
+
|
|
346
|
+
`)}
|
|
347
|
+
|
|
348
|
+
return () => {
|
|
349
|
+
for (const dispose of disposers) dispose()
|
|
350
|
+
}
|
|
351
|
+
}
|
|
352
|
+
`}var xd=`__camstackNodePin`;function Sd(e){return{context:{[xd]:Cd(e)}}}function Cd(e){let t=e.split(`/`)[0];return t===void 0||t.length===0?e:t}function wd(e){if(typeof e!=`object`||!e)return;let t=Reflect.get(e,xd);return typeof t==`string`?t:void 0}f({field:u().min(1),on:h(`advance`)});var Td=`session`;function Ed(e){return e.mount?e.mount:e.deviceNative===!0?{kind:`device-native`}:e.scope===`device`&&e.kind===`wrapper`?{kind:`device-scoped`}:e.mode===`collection`?{kind:`collection`}:{kind:`singleton`}}var Dd=`provider`,Od=f({id:u(),title:u(),description:u().optional(),style:S([`card`,`accordion`]).optional(),defaultCollapsed:w().optional(),columns:p([h(1),h(2),h(3),h(4)]).optional(),tab:u().optional(),location:S([`settings`,`top-tab`]).optional(),order:a().optional(),fields:C(g())}),kd=f({tabs:C(f({id:u(),label:u(),icon:u(),order:a().optional()})).optional(),sections:C(Od)}).nullable(),Ad={getDeviceSettingsContribution:{input:f({deviceId:a()}),output:kd,kind:`query`,auth:`protected`},getDeviceLiveContribution:{input:f({deviceId:a()}),output:kd,kind:`query`,auth:`protected`},applyDeviceSettingsPatch:{input:f({deviceId:a(),patch:b(u(),s())}),output:f({success:h(!0)}),kind:`mutation`,auth:`admin`}},jd={getStatus:{input:f({deviceId:a()}),output:s().nullable(),kind:`query`,auth:`protected`}};function Md(e){let t=e.methods;return e.exposesDeviceSettings&&(t={...Ad,...t}),e.status&&(t={...jd,...t}),t}function L(e,t,n){return{input:e,output:t,kind:n?.kind??`query`,...n?.auth===void 0?{}:{auth:n.auth},...n?.access===void 0?{}:{access:n.access},...n?.caller===void 0?{}:{caller:n.caller},timeoutMs:n?.timeoutMs}}function Nd(e,t,n){return{...L(e,t,n),systemOnly:!0}}function Pd(e,t,n){return{...L(e,t,n),providerOptional:!0}}function Fd(e){return{data:e}}function Id(e){return e?.deviceConfig!==void 0}var Ld=f({id:u(),label:u(),icon:u(),path:u(),remoteName:u(),bundle:u(),section:u().optional(),sectionLabel:u().optional()}),Rd=f({addonId:u(),page:Ld,bundleUrl:u()}),zd={name:`addon-pages`,scope:`system`,mode:`singleton`,methods:{listPages:L(y(),C(Rd).readonly())}},Bd=f({id:u(),label:u(),icon:u(),path:u(),remoteName:u(),bundle:u(),section:u().optional(),sectionLabel:u().optional()}),Vd={name:`addon-pages-source`,scope:`system`,mode:`collection`,internal:!0,methods:{listPages:L(y(),C(Bd).readonly(),{auth:`admin`})}},Hd=f({method:S([`GET`,`POST`,`PUT`,`DELETE`,`PATCH`]),path:u(),access:S([`public`,`authenticated`,`admin`]).optional(),description:u().optional()}),Ud=f({method:u(),path:u(),params:b(u(),u()),query:b(u(),u()),body:s(),headers:b(u(),u()),user:f({id:u(),username:u(),isAdmin:w()}).optional(),scopedToken:s().optional()}),Wd=f({status:a().int(),headers:b(u(),u()),redirectUrl:u().nullable(),body:s().optional(),contentType:u().optional()}),Gd={name:`addon-routes`,scope:`system`,mode:`collection`,internal:!0,methods:{getRoutes:L(y(),C(Hd)),invoke:L(Ud,Wd,{kind:`mutation`})},mount:{kind:`skip`}},Kd=f({id:u(),label:u(),icon:u(),order:a().optional()}),qd=f({id:u(),title:u(),description:u().optional(),style:S([`card`,`accordion`]).optional(),defaultCollapsed:w().optional(),columns:p([h(1),h(2),h(3),h(4)]).optional(),tab:u().optional(),location:S([`settings`,`top-tab`]).optional(),order:a().optional(),fields:C(g())}),Jd=f({tabs:C(Kd).optional(),sections:C(qd)}),Yd=b(u(),s()),Xd=f({success:h(!0)}),Zd={name:`addon-settings`,scope:`system`,mode:`singleton`,nodeIdMode:`data`,methods:{getGlobalSettings:L(f({addonId:u(),nodeId:u().optional(),overlay:b(u(),s()).optional(),cap:u().optional()}),Jd.nullable()),updateGlobalSettings:L(f({addonId:u(),nodeId:u().optional(),patch:Yd}),Xd,{kind:`mutation`,auth:`admin`}),getIntegrationSettings:L(f({addonId:u(),nodeId:u().optional()}),Jd.nullable()),getDeviceSettings:L(f({addonId:u(),deviceId:a(),nodeId:u().optional()}),Jd.nullable()),updateDeviceSettings:L(f({addonId:u(),deviceId:a(),nodeId:u().optional(),patch:Yd}),Xd,{kind:`mutation`,auth:`admin`})}},Qd=S([`device-tab`,`dashboard`,`integration-detail`]),$d=S([`xs`,`sm`,`md`,`lg`,`xl`]),ef=f({remoteName:u(),exposedModule:u(),componentKey:u().optional()}),tf=f({tab:u(),subTab:u().optional(),label:u(),order:a().optional(),kind:h(`remote`),remote:ef,stableId:u(),description:u().optional(),icon:u().optional(),bundle:u(),hosts:C(Qd).readonly(),requires:f({deviceContext:w().default(!1),integrationContext:w().default(!1)}),preAuth:w().optional().default(!1),defaultSize:$d.default(`md`),allowedSizes:C($d).readonly().default([`sm`,`md`,`lg`]),defaultColumns:a().int().min(1).max(12).default(6),defaultRows:a().int().min(1).max(12).default(1)}),nf={name:`addon-widgets-source`,scope:`system`,mode:`collection`,internal:!0,methods:{listWidgets:L(y(),C(tf).readonly(),{auth:`admin`})}},rf=tf.extend({addonId:u(),bundleUrl:u()}),af={name:`addon-widgets`,scope:`system`,mode:`singleton`,methods:{listWidgets:L(y(),C(rf).readonly())}},of=f({staticDir:u()}),sf=f({version:u()}),cf={name:`admin-ui`,scope:`system`,mode:`singleton`,internal:!0,methods:{getStaticDir:L(y(),of,{auth:`admin`}),getVersion:L(y(),sf,{auth:`admin`})}},lf=S([`info`,`success`,`warning`,`error`]),uf=S([`active`,`in-progress`,`completed`,`failed`,`dismissed`]),df=f({type:u(),id:u()}),ff=f({id:u(),category:u(),severity:lf,title:u(),message:u(),status:uf,progress:a().optional(),read:w(),createdAt:a(),updatedAt:a(),source:df.optional(),metadata:b(u(),s()).optional()}),pf={name:`alerts`,scope:`system`,mode:`singleton`,methods:{emit:L(ff,y(),{kind:`mutation`}),update:L(f({alertId:u(),patch:ff.partial()}),y(),{kind:`mutation`}),list:L(f({unreadOnly:w().optional(),limit:a().optional()}).optional(),C(ff).readonly()),getUnreadCount:L(y(),a()),markRead:L(f({alertId:u()}),y(),{kind:`mutation`}),markAllRead:L(y(),y(),{kind:`mutation`}),dismiss:L(f({alertId:u()}),y(),{kind:`mutation`})}},R=function(e){return e.Camera=`camera`,e.Hub=`hub`,e.Light=`light`,e.Siren=`siren`,e.Switch=`switch`,e.Sensor=`sensor`,e.Thermostat=`thermostat`,e.Climate=`climate`,e.Button=`button`,e.EventEmitter=`event-emitter`,e.Update=`update`,e.Generic=`generic`,e.Notifier=`notifier`,e.Script=`script`,e.Automation=`automation`,e.Lock=`lock`,e.Cover=`cover`,e.Valve=`valve`,e.Humidifier=`humidifier`,e.WaterHeater=`water-heater`,e.Fan=`fan`,e.MediaPlayer=`media-player`,e.AlarmPanel=`alarm-panel`,e.Control=`control`,e.Presence=`presence`,e.Weather=`weather`,e.Vacuum=`vacuum`,e.LawnMower=`lawn-mower`,e.Container=`container`,e.Image=`image`,e.PetFeeder=`pet-feeder`,e}({}),mf=function(e){return e.BatteryOperated=`battery-operated`,e.Rebootable=`rebootable`,e.Resyncable=`resyncable`,e.NativeSnapshot=`native-snapshot`,e.DoorbellButton=`doorbell-button`,e.TwoWayAudio=`two-way-audio`,e.PanTiltZoom=`pan-tilt-zoom`,e.PtzAutotrack=`ptz-autotrack`,e.MotionTrigger=`motion-trigger`,e.LightColorRgb=`light-color-rgb`,e.LightColorHsv=`light-color-hsv`,e.LightColorMired=`light-color-mired`,e.ClimateDualSetpoint=`climate-dual-setpoint`,e.ClimateHumidity=`climate-humidity`,e.ClimateFanMode=`climate-fan-mode`,e.ClimatePreset=`climate-preset`,e.ClimateSwingVertical=`climate-swing-vertical`,e.ClimateSwingHorizontal=`climate-swing-horizontal`,e.CoverPositionable=`cover-positionable`,e.CoverTilt=`cover-tilt`,e.ValvePositionable=`valve-positionable`,e.FanSpeed=`fan-speed`,e.FanPreset=`fan-preset`,e.FanDirection=`fan-direction`,e.FanOscillating=`fan-oscillating`,e.LockPinRequired=`lock-pin-required`,e.LockOpen=`lock-open`,e.MediaPlayerSeek=`media-player-seek`,e.MediaPlayerVolume=`media-player-volume`,e.MediaPlayerMute=`media-player-mute`,e.MediaPlayerShuffle=`media-player-shuffle`,e.MediaPlayerRepeat=`media-player-repeat`,e.MediaPlayerSelectSource=`media-player-select-source`,e.MediaPlayerPlayMedia=`media-player-play-media`,e.MediaPlayerNext=`media-player-next`,e.MediaPlayerPrevious=`media-player-previous`,e.MediaPlayerStop=`media-player-stop`,e.AlarmPinRequired=`alarm-pin-required`,e.PresenceGps=`presence-gps`,e.NotifierImage=`notifier-image`,e.NotifierPriority=`notifier-priority`,e.NotifierData=`notifier-data`,e.NotifierActions=`notifier-actions`,e.NotifierRecipients=`notifier-recipients`,e.ScriptVariables=`script-variables`,e.AutomationSkipCondition=`automation-skip-condition`,e.VacuumHasMap=`vacuum-has-map`,e.VacuumHasAi=`vacuum-has-ai`,e.MowerHasMap=`mower-has-map`,e.MowerHasTargetedMowing=`mower-has-targeted-mowing`,e}({}),hf=function(e){return e.ChargingDC=`charging-dc`,e.ChargingSolar=`charging-solar`,e.NotCharging=`not-charging`,e}({}),z=function(e){return e.Siren=`siren`,e.Floodlight=`floodlight`,e.Spotlight=`spotlight`,e.PirSensor=`pir-sensor`,e.Chime=`chime`,e.Autotrack=`autotrack`,e.Nightvision=`nightvision`,e.PrivacyMask=`privacy-mask`,e.Doorbell=`doorbell`,e.BinaryHelper=`binary-helper`,e.MotionSensor=`motion-sensor`,e.ContactSensor=`contact-sensor`,e.LeakSensor=`leak-sensor`,e.SmokeSensor=`smoke-sensor`,e.COSensor=`co-sensor`,e.GasSensor=`gas-sensor`,e.TamperSensor=`tamper-sensor`,e.VibrationSensor=`vibration-sensor`,e.ConnectivitySensor=`connectivity-sensor`,e.SoundSensor=`sound-sensor`,e.BinarySensor=`binary-sensor`,e.TemperatureSensor=`temperature-sensor`,e.HumiditySensor=`humidity-sensor`,e.AmbientLightSensor=`ambient-light-sensor`,e.PressureSensor=`pressure-sensor`,e.WindSensor=`wind-sensor`,e.RainSensor=`rain-sensor`,e.UvSensor=`uv-sensor`,e.SolarRadiationSensor=`solar-radiation-sensor`,e.SoilMoistureSensor=`soil-moisture-sensor`,e.PowerSensor=`power-sensor`,e.EnergySensor=`energy-sensor`,e.VoltageSensor=`voltage-sensor`,e.CurrentSensor=`current-sensor`,e.AirQualitySensor=`air-quality-sensor`,e.BatterySensor=`battery-sensor`,e.NumericSensor=`numeric-sensor`,e.EnumSensor=`enum-sensor`,e.DateTimeSensor=`datetime-sensor`,e.GenericSensor=`generic-sensor`,e.NumericControl=`numeric-control`,e.SelectControl=`select-control`,e.TextControl=`text-control`,e.DateTimeControl=`datetime-control`,e.MobilePushNotifier=`mobile-push-notifier`,e.MessagingNotifier=`messaging-notifier`,e.EmailNotifier=`email-notifier`,e.GenericNotifier=`generic-notifier`,e}({}),gf={name:`audio-analysis`,scope:`device`,mode:`singleton`,kind:`wrapper`,defaultActive:!0,deviceTypes:[R.Camera],exposesDeviceSettings:!0,methods:{resolveDeviceSettings:L(f({deviceId:a()}),v())},events:{onAudioLevel:Fd(f({deviceId:a(),rms:a(),dbfs:a()}))}},_f=S([`jpeg`,`rgb`,`bgr`,`yuv420`,`gray`]),vf=f({data:v(),format:_f,width:a(),height:a(),timestamp:a()}),yf=f({x:a(),y:a(),w:a(),h:a()}),bf=f({class:u(),originalClass:u(),score:a(),bbox:yf}),xf=f({data:x(Uint8Array),sampleRate:a(),channels:a(),timestamp:a(),deviceId:a().optional()}),Sf=f({rms:a(),dbfs:a()}),Cf=f({className:u(),originalClass:u().optional(),score:a()}),wf=[`superseded`,`error`,`timeout`,`disposed`],Tf=m(`state`,[f({state:h(`classified`)}),f({state:h(`not-classified`),reason:S(wf)})]),Ef=f({level:Sf,classification:f({labels:C(Cf).readonly(),inferenceMs:a()}).optional(),classifyOutcome:Tf,timestamp:a()}),Df=f({minConfidence:a().min(0).max(1).default(.3),allowedClasses:C(u()).default([])}),Of=f({deviceId:a(),brokerId:u(),ingestNodeId:u(),settings:Df}),kf=f({attached:w(),replaced:w()}),Af=f({detached:w()}),jf=f({labels:C(Cf).readonly(),rawLabels:C(Cf).readonly().optional(),inferenceMs:a()}),Mf=[{value:`auto`,label:`Auto (platform default)`},{value:`apple-soundanalysis`,label:`Apple SoundAnalysis (macOS 12+)`},{value:`yamnet-onnx`,label:`YAMNet ONNX (cross-platform)`}],Nf={audioBackend:`auto`,probedBestAudioBackend:``},Pf={name:`audio-analyzer`,scope:`system`,mode:`singleton`,methods:{analyseChunk:L(f({chunk:xf,settings:Df}),Ef.nullable(),{kind:`mutation`}),classify:L(xf,jf,{timeoutMs:3e4}),attachDevice:L(Of,kf,{kind:`mutation`}),detachDevice:L(f({deviceId:a()}),Af,{kind:`mutation`}),isReady:L(y(),w()),dispose:L(y(),y(),{kind:`mutation`}),reprobeAudioEngine:L(y(),f({backend:u()}),{kind:`mutation`,auth:`admin`})}},Ff=S([`f32le`,`s16le`]),If=f({codec:u(),canDecode:w(),canEncode:w(),label:u().optional()}),Lf=f({codec:u(),sourceSampleRate:a().int().positive(),sourceChannels:a().int().positive(),extraData:x(Uint8Array).optional(),targetSampleRate:a().int().positive(),targetChannels:a().int().positive(),targetFormat:Ff.optional(),idleMs:a().int().positive().optional(),tag:u().optional()}),Rf=f({codec:u(),sourceSampleRate:a().int().positive(),sourceChannels:a().int().positive(),sourceFormat:Ff.optional(),targetSampleRate:a().int().positive(),targetChannels:a().int().positive(),bitrateKbps:a().int().positive().optional(),idleMs:a().int().positive().optional(),tag:u().optional()}),zf=f({data:x(Uint8Array),sampleRate:a().int().positive(),channels:a().int().positive(),format:Ff,pts:a()}),Bf=f({data:x(Uint8Array),codec:u(),pts:a(),frameComplete:w()}),Vf=f({sessionId:u(),kind:S([`decode`,`encode`]),codec:u(),sourceSampleRate:a(),sourceChannels:a(),targetSampleRate:a(),targetChannels:a(),format:Ff,tag:u().optional(),createdAtMs:a(),lastActivityMs:a(),framesIn:a(),framesOut:a()}),Hf={name:`audio-codec`,scope:`system`,mode:`singleton`,preferredProvider:`decoder-nodeav`,methods:{listSupportedCodecs:L(y(),C(If).readonly()),canHandle:L(f({codec:u(),kind:S([`decode`,`encode`])}),w()),createDecodeSession:L(Lf,f({sessionId:u(),nodeId:u()}),{kind:`mutation`}),createEncodeSession:L(Rf,f({sessionId:u(),nodeId:u()}),{kind:`mutation`}),closeSession:L(f({sessionId:u(),nodeId:u().optional()}),y(),{kind:`mutation`}),pushEncodedFrame:L(f({sessionId:u(),nodeId:u().optional(),data:x(Uint8Array),pts:a().optional()}),y(),{kind:`mutation`}),pullPcm:L(f({sessionId:u(),nodeId:u().optional(),maxCount:a().int().positive().default(8)}),C(zf)),pushPcm:L(f({sessionId:u(),nodeId:u().optional(),data:x(Uint8Array),pts:a().optional()}),y(),{kind:`mutation`}),pullEncoded:L(f({sessionId:u(),nodeId:u().optional(),maxCount:a().int().positive().default(8)}),C(Bf)),flushEncode:L(f({sessionId:u(),nodeId:u().optional()}),C(Bf),{kind:`mutation`}),listActiveSessions:L(y(),C(Vf).readonly())}},Uf=f({userId:u(),username:u(),email:u().optional(),displayName:u().optional(),isAdmin:w().default(!1)}),Wf={name:`auth-provider`,scope:`system`,mode:`collection`,internal:!0,methods:{validateCredentials:L(f({username:u(),password:u()}),Uf.nullable(),{kind:`mutation`}),getLoginUrl:L(f({state:u()}),u()),handleCallback:L(b(u(),u()),Uf,{kind:`mutation`}),validateToken:L(f({token:u()}),Uf.nullable())},mount:{kind:`skip`}},Gf=`.backup-snapshot`,Kf=`.backup-snapshot-partial`,qf=30*6e4,Jf=f({databases:C(f({livePath:u()}))}),Yf=f({name:u(),rows:a().int().nonnegative()}),Xf=f({livePath:u(),snapshotPath:u(),sizeBytes:a().int().nonnegative(),pageCount:a().int().nonnegative(),pageSize:a().int().positive(),tables:C(Yf),copyMs:a().nonnegative(),verifyMs:a().nonnegative(),takenAt:a()}),Zf=Xf.extend({livePath:u(),snapshotPath:u()}),Qf={name:`database-snapshot`,scope:`system`,mode:`singleton`,internal:!0,methods:{listDatabases:L(f({}),Jf,{auth:`admin`}),writeSnapshot:L(f({}),Xf,{kind:`mutation`,auth:`admin`,timeoutMs:qf})}},$f=f({subId:u(),displayName:u(),description:u().optional(),kind:u(),triggerSupported:w(),restoreSupported:w()}).extend({id:u(),addonId:u(),enabled:w(),retentionCount:a(),label:u().optional(),lastSuccessAt:a().optional(),lastSuccessSizeBytes:a().optional(),cron:u().optional(),nextRunAt:a().optional(),lastAttemptAt:a().optional(),lastError:u().optional()}),ep=f({id:u(),filename:u(),createdAt:a(),sizeBytes:a(),label:u().optional(),locations:C(u()).readonly()}),tp=f({id:u(),destinationId:u().optional(),label:u().optional(),createdAt:a(),sizeBytes:a(),locations:C(u()).optional()}),np=f({path:u(),kind:S([`file`,`dir`,`symlink`]),sizeBytes:a(),mtime:a()}),rp=f({archiveVersion:h(1),createdAt:a(),dataDir:u(),locations:C(u()),entries:C(np),totalBytes:a(),totalFiles:a(),sqliteSnapshots:C(Zf).optional()}),ip=f({name:u(),sizeBytes:a(),fileCount:a(),present:w()}),ap=S([`queued`,`running`,`succeeded`,`failed`,`cancelled`]),op=S([`queued`,`building`,`uploading`,`done`]),sp=f({id:u(),state:ap,phase:op,destinationIds:C(u()).readonly(),label:u().optional(),requestedAt:a(),startedAt:a().optional(),finishedAt:a().optional(),stagedBytes:a(),archiveSizeBytes:a().optional(),uploadedBytes:a(),completedDestinationIds:C(u()).readonly(),failedDestinationIds:C(u()).readonly(),error:u().optional(),queuePosition:a().int().min(1).optional()}),cp=f({runId:u(),queued:w(),joined:w(),cancelled:w(),entries:C(tp).readonly()}),lp=f({id:u(),label:u(),cron:u(),enabled:w(),locationIds:C(u()).readonly(),retentionCount:a().int().min(1).max(1e3),dataSources:C(u()).readonly().optional(),lastAttemptAt:a().optional(),lastSuccessAt:a().optional(),lastError:u().optional(),nextRunAt:a().optional()}),up={name:`backup`,scope:`system`,mode:`singleton`,methods:{listDestinations:L(y(),C($f).readonly(),{auth:`admin`}),trigger:L(f({destinations:C(u()).optional(),locations:C(u()).optional(),label:u().optional(),retentionCount:a().int().min(1).max(1e3).optional()}).optional(),cp,{kind:`mutation`,auth:`admin`}),listRuns:L(y(),C(sp).readonly(),{auth:`admin`}),cancel:L(f({runId:u()}),f({cancelled:w()}),{kind:`mutation`,auth:`admin`}),list:L(y(),C(tp).readonly(),{auth:`admin`}),listLocations:L(y(),C(ip).readonly(),{auth:`admin`}),getEntries:L(f({destinationId:u(),backupId:u()}),rp.nullable(),{auth:`admin`}),restore:L(f({destinationId:u(),backupId:u(),locations:C(u()).optional()}),y(),{kind:`mutation`,auth:`admin`}),delete:L(f({destinationId:u(),backupId:u()}),y(),{kind:`mutation`,auth:`admin`}),listArchives:L(f({destinationId:u()}),C(ep).readonly(),{auth:`admin`}),upsertDestinationPolicy:L(f({locationId:u(),enabled:w(),retentionCount:a().int().min(1).max(1e3),label:u().optional()}),y(),{kind:`mutation`,auth:`admin`}),previewSchedule:L(f({cron:u(),count:a().int().min(1).max(20).optional()}),f({ok:w(),error:u().optional(),nextRuns:C(a()).readonly()})),listSchedules:L(y(),C(lp).readonly(),{auth:`admin`}),upsertSchedule:L(f({id:u().optional(),label:u(),cron:u(),enabled:w(),locationIds:C(u()).readonly(),retentionCount:a().int().min(1).max(1e3),dataSources:C(u()).readonly().optional()}),lp,{kind:`mutation`,auth:`admin`}),deleteSchedule:L(f({id:u()}),y(),{kind:`mutation`,auth:`admin`})}},dp=S([`connected`,`disconnected`,`connecting`,`auth-failed`,`unreachable`,`error`]),fp=f({id:u(),addonId:u(),name:u(),kind:u(),status:dp,info:b(u(),s()),lastCheckedAt:a().nullable(),error:u().nullable()}),pp=f({brokerCount:a().int().nonnegative(),connectedCount:a().int().nonnegative()}),mp=f({addonId:u(),kinds:C(f({kind:u(),label:u()}))}),hp=f({kind:u().optional()}),gp=f({id:u()}),_p=f({kind:u().min(1),name:u().min(1),id:u().min(1).optional(),settings:b(u(),s())}),vp=f({id:u()}),yp=f({id:u()}),bp=m(`ok`,[f({ok:h(!0),latencyMs:a().nonnegative()}),f({ok:h(!1),error:u()})]),xp=b(u(),s()),Sp=f({kind:u()}),Cp=f({kind:u(),settings:xp}),wp=m(`ok`,[f({ok:h(!0),latencyMs:a().nonnegative().optional()}).strict(),f({ok:h(!1),error:u()})]),Tp=s().nullable(),Ep=f({brokerId:u(),target:b(u(),s()),payload:s().optional()}),Dp=f({brokerId:u(),filter:b(u(),s())}),Op=f({subscriptionId:u()}),kp=f({brokerId:u(),subscriptionId:u()}),Ap=f({brokerId:u(),key:u()}),jp={name:`broker`,scope:`system`,mode:`collection`,providerKind:`broker`,status:{schema:pp,kind:`poll`},methods:{list:L(hp,C(fp)),get:L(gp,fp.nullable()),listProviders:L(y(),C(mp),{auth:`admin`}),add:L(_p,vp,{kind:`mutation`,auth:`admin`}),remove:L(yp,y(),{kind:`mutation`,auth:`admin`}),testConnection:L(gp,bp,{kind:`mutation`,auth:`admin`}),getSettings:L(gp,xp.nullable(),{auth:`admin`}),setSettings:L(f({id:u(),settings:xp}),y(),{kind:`mutation`,auth:`admin`}),getBrokerConfig:L(gp,xp.nullable(),{auth:`admin`}),getSettingsSchema:L(Sp,Tp,{auth:`admin`}),testSettings:L(Cp,wp,{kind:`mutation`,auth:`admin`}),publish:L(Ep,s(),{kind:`mutation`,auth:`admin`}),subscribe:L(Dp,Op,{kind:`mutation`,auth:`admin`}),unsubscribe:L(kp,y(),{kind:`mutation`,auth:`admin`}),getState:L(Ap,s().nullable(),{auth:`admin`}),getStatus:L(y(),pp)}},Mp={name:`camera-pipeline-config`,scope:`device`,mode:`singleton`,kind:`wrapper`,defaultActive:!0,deviceTypes:[R.Camera],exposesDeviceSettings:!0,methods:{}},Np=S([`webrtc`,`hls`,`mjpeg`,`rtsp`]),Pp=S([`mp4`,`gif`]),Fp=f({kind:Pp,handle:u(),nodeId:u(),mime:u(),bytes:a().int(),width:a().int(),height:a().int()}),Ip=f({fromTs:a(),toTs:a(),packets:a().int()}),Lp=f({media:C(Fp).readonly(),coverage:Ip,profile:D,video:S([`copy`,`encode`])}),Rp=f({brokerId:u(),url:u(),mutedUrl:u(),enabled:w(),codec:u().optional(),resolution:f({width:a().int().positive(),height:a().int().positive()}).optional()}),zp=f({sessionId:u(),remoteAddr:u(),userAgent:u().nullish(),playing:w(),muted:w(),connectedAt:a(),lastRtpAt:a(),bytesSent:a()}),Bp=f({tag:u(),subscribedAt:a(),chunksDelivered:a()}),Vp=S([`alexa`,`homekit`,`webrtc-browser`,`webrtc-mobile`,`webrtc-whep`,`rtsp-listen`,`derived-broker`,`recording`,`pipeline`,`snapshot`,`warmup`,`unknown`]),Hp=f({kind:Vp,label:u().optional(),media:S([`audio`,`video`,`both`]).optional(),targetCodec:u().optional(),transport:S([`passthrough`,`repacketize`,`transcode`]).optional(),remoteAddr:u().optional(),userAgent:u().optional(),userId:u().optional(),sessionId:u().optional(),extra:b(u(),u()).optional()}).readonly(),Up=f({id:u(),channel:S([`annexb`,`rtp`]),attribution:Hp,subscribedAt:a(),packetsDelivered:a()}),Wp=f({rtsp:C(zp).readonly(),audio:C(Bp).readonly(),encoded:C(Up).readonly(),pipeClients:a(),encodedSubscribers:a()}),Gp=S([`reconnecting`,`sleeping`,`offline`,`disabled`,`waking`]),Kp=S([`h264`,`h265`,`copy`]),qp=S([`aac`,`opus`,`pcmu`,`copy`,`none`]),Jp=f({deviceId:a().int().nonnegative(),video:Kp,audio:qp.optional(),profile:D.optional(),targetResolution:f({width:a().int().positive(),height:a().int().positive()}).optional(),outputArgs:C(u()).optional(),audioEgress:w().optional(),hostname:u().optional(),tag:u().optional()}),Yp=f({url:u(),sentryUrl:u().nullable().optional(),videoCodec:S([`H264`,`H265`]),audioCodec:u(),resolution:f({width:a().int().positive(),height:a().int().positive()}),transcoded:w(),encoder:u(),pipelineKey:u()}),Xp=wn.omit({inputArgs:!0,outputArgs:!0}),Zp=S([`tight`,`relaxed`]),Qp=f({deviceId:a().int().nonnegative(),source:m(`kind`,[f({kind:h(`profile`),profile:D}),f({kind:h(`cam-stream`),camStreamId:u().min(1)})]),encode:Xp,rateControl:Zp.optional(),bitstreamFilter:S([`dump_extra`,`h264_mp4toannexb`,`hevc_mp4toannexb`]).optional(),publishLocally:w().optional(),pixelFormat:S([`yuv420p`,`nv12`]).optional(),decodeHwAccel:S([`auto`,`none`,`videotoolbox`,`vaapi`,`qsv`,`cuda`]).optional(),hostname:u().optional(),tag:u().optional()}),$p=f({url:u(),pipelineKey:u(),videoCodec:S([`H264`,`H265`]),resolution:f({width:a().int().positive(),height:a().int().positive()}),transcoded:w(),encoder:u(),decodeHwAccel:u().nullable(),camStreamId:u().nullable()}),em={name:`stream-broker`,scope:`system`,mode:`singleton`,exposesDeviceSettings:!0,methods:{reportStreamSignal:L(f({deviceId:a().int().nonnegative(),code:u().min(1),at:a().optional()}),f({accepted:w(),reason:S([`woke`,`hold-extended`,`not-enabled`,`no-consumer`,`unknown-code`])}),{kind:`mutation`}),publishCameraStream:L(f({deviceId:a().int().nonnegative(),camStreamId:u().min(1),kind:wa,url:u().optional(),codec:u().optional(),resolution:Ta.optional(),fps:a().positive().optional(),label:u().optional(),deviceFeatures:C(u()).optional(),autoEligible:w().optional(),profileHint:D.optional(),metadata:b(u(),s()).optional(),sourceCamStreamId:u().min(1).optional(),encodeProfile:wn.optional()}),f({success:h(!0)}),{kind:`mutation`,auth:`admin`}),retractCameraStream:L(f({deviceId:a().int().nonnegative(),camStreamId:u().min(1)}),f({success:h(!0)}),{kind:`mutation`,auth:`admin`}),assignProfile:L(f({deviceId:a().int().nonnegative(),profile:D,camStreamId:u().min(1)}),f({success:h(!0)}),{kind:`mutation`,auth:`admin`}),unassignProfile:L(f({deviceId:a().int().nonnegative(),profile:D}),f({success:h(!0)}),{kind:`mutation`,auth:`admin`}),forgetDeviceHardware:L(f({deviceId:a().int().nonnegative()}),f({derivedStreamsDeleted:C(u()).readonly(),assignmentsPurged:w(),probeSnapshotsDropped:a().int().nonnegative(),rtspTokenRowsDeleted:a().int().nonnegative()}),{kind:`mutation`,auth:`admin`}),renderPreBufferClip:L(f({deviceId:a(),profile:D.optional(),aroundMs:a(),preRollSec:a().min(0).max(20).default(3),postRollSec:a().min(0).max(20).default(5),format:S([`gif`,`mp4`]).default(`gif`),maxWidth:a().int().min(120).max(1920).default(480),fps:a().int().min(1).max(15).default(5),speed:a().min(1).max(8).default(2)}),f({base64:u(),mime:u(),bytes:a().int(),profile:D,durationMs:a()}),{kind:`mutation`,auth:`admin`}),produceEventMedia:L(f({deviceId:a(),profile:D.optional(),aroundMs:a(),preSeconds:a().min(0).max(20).default(4),postSeconds:a().min(0).max(20).default(6),kinds:C(Pp).min(1).default([`mp4`]),gifMaxWidth:a().int().min(120).max(1280).default(640),gifFps:a().int().min(1).max(15).default(12),gifSpeed:a().min(1).max(8).default(4),speed:a().min(1).max(8).default(4)}),Lp,{kind:`mutation`,auth:`admin`}),fetchEventMedia:L(f({handle:u()}),f({base64:u(),mime:u(),bytes:a().int()}).nullable(),{kind:`mutation`,auth:`admin`}),listAllCameraStreams:L(y(),C(Ea).readonly()),listAllProfileSlots:L(y(),C(Oa).readonly()),getBrokerStats:L(f({brokerId:u()}),Va),probeStream:L(f({brokerId:u()}),f({probed:w(),summary:u()}),{kind:`mutation`,auth:`admin`}),listClients:L(f({brokerId:u()}),Wp),killClient:L(f({brokerId:u(),channel:S([`rtsp`,`audio`]),handle:u()}),f({killed:w()}),{kind:`mutation`,auth:`admin`}),restartProfile:L(f({deviceId:a().int().nonnegative(),profile:D}),f({success:w()}),{kind:`mutation`,auth:`admin`}),getStreamUrl:L(f({streamId:u(),format:Np}),f({url:u()})),getStreamWithCodec:L(Jp,Yp,{kind:`mutation`,auth:`admin`}),releaseStreamWithCodec:L(f({pipelineKey:u()}),f({released:w(),refcount:a().int().nonnegative()}),{kind:`mutation`,auth:`admin`}),acquireEgressTranscode:L(Qp,$p,{kind:`mutation`,auth:`admin`}),releaseEgressTranscode:L(f({pipelineKey:u()}),f({released:w(),refcount:a().int().nonnegative()}),{kind:`mutation`,auth:`admin`}),subscribeAudioChunks:L(Ra,za,{kind:`mutation`}),pullAudioChunks:L(f({subscriptionId:u(),maxCount:a().int().positive().default(8)}),C(La).readonly()),unsubscribeAudioChunks:L(f({subscriptionId:u()}),f({released:w()}),{kind:`mutation`}),setPreBufferDuration:L(f({brokerId:u(),seconds:a().min(0).max(30)}),y(),{kind:`mutation`,auth:`admin`}),getPreBufferInfo:L(f({brokerId:u()}),f({configuredSec:a(),bufferedMs:a(),packetCount:a()})),getRtspPort:L(y(),a()),getAllRtspEntries:L(f({hostname:u().optional()}),C(Rp).readonly()),getRtspEntry:L(f({brokerId:u(),hostname:u().optional()}),Rp.nullable()),regenerateRtspToken:L(f({brokerId:u()}),u().nullable(),{kind:`mutation`,auth:`admin`}),setRtspEnabled:L(f({brokerId:u(),enabled:w()}),y(),{kind:`mutation`,auth:`admin`}),isRtspEnabled:L(f({brokerId:u()}),w()),getDeviceAudioMute:L(f({deviceId:a().int()}),f({muted:w(),appliedBrokers:a().int().nonnegative()})),setDeviceAudioMute:L(f({deviceId:a().int(),muted:w()}),f({muted:w(),appliedBrokers:a().int().nonnegative()}),{kind:`mutation`,auth:`admin`})},events:{onCamStreamDemand:Fd(f({deviceId:a().int().nonnegative(),camStreamId:u(),profile:D})),onCamStreamIdle:Fd(f({deviceId:a().int().nonnegative(),camStreamId:u()})),onRequestStreamSourceRefresh:Fd(f({deviceId:a().int().nonnegative(),camStreamId:u(),brokerId:u()}))}},tm=S([`h264`,`h265`,`hevc`,`av1`,`mjpeg`,`vp8`,`vp9`]),nm=f({acceptCodecs:C(tm).readonly().optional(),minHeight:a().int().positive().optional(),maxHeight:a().int().positive().optional(),minWidth:a().int().positive().optional(),excludeDerived:w().optional(),requireSiblingCodec:C(tm).readonly().optional(),allowTranscode:w().optional(),requireProfileBound:w().optional()}).readonly(),rm=f({preferredProviders:C(u()).readonly().optional(),resolutionPreference:S([`highest`,`lowest`]).optional(),targetHeight:a().int().positive().optional()}).readonly(),im=f({camStreamId:u(),codec:u().optional(),resolution:Ta.optional(),transcodes:w(),reason:u(),profile:D.optional(),brokerId:u().optional(),url:u().optional(),fps:a().positive().optional(),fpsSource:S([`published`,`measured`]).optional()}),am={name:`camera-streams`,scope:`device`,mode:`singleton`,kind:`wrapper`,defaultActive:!0,deviceTypes:[R.Camera],methods:{getCameraStreams:L(f({deviceId:a().int().nonnegative()}),C(Ea).readonly()),getBrokerStreams:L(f({deviceId:a().int().nonnegative()}),C(Oa).readonly()),getRtspEntries:L(f({deviceId:a().int().nonnegative(),hostname:u().optional()}),C(Rp).readonly()),getProfileRtspEntries:L(f({deviceId:a().int().nonnegative(),hostname:u().optional()}),C(Ha).readonly()),pickStream:L(f({deviceId:a().int().nonnegative(),requirements:nm,preferences:rm.optional()}),im.nullable())},events:{onCamStreamsChanged:Fd(f({deviceId:a().int().nonnegative(),camStreams:C(Ea).readonly()})),onProfileSlotsChanged:Fd(f({deviceId:a().int().nonnegative(),profileSlots:C(Oa).readonly()}))},runtimeState:f({online:w(),slotStatuses:f({high:Da.optional(),mid:Da.optional(),low:Da.optional()}),slotErrors:f({high:u().optional(),mid:u().optional(),low:u().optional()}),lastChangedAt:a()}),durability:`session`};function om(e){let t=Ed(e).kind;return t===`collection`?!0:t===`skip`&&e.mode===`collection`}function sm(e){let t=e._def;return e.constructor?.name===`ZodVoid`||t?.type===`void`||t?.typeName===`ZodVoid`}function cm(e){let t=e._def;return e.constructor?.name===`ZodObject`||t?.type===`object`||t?.typeName===`ZodObject`}function lm(e){let t=e;for(let e=0;e<8&&t!=null;e+=1){let e=t._def,n=t.constructor?.name;if(n===`ZodArray`||e?.type===`array`)return!0;if(!(n===`ZodReadonly`||e?.type===`readonly`||n===`ZodOptional`||e?.type===`optional`||n===`ZodNullable`||e?.type===`nullable`||n===`ZodDefault`||e?.type==="default")||e?.innerType==null)return!1;t=e.innerType}return!1}function um(e,t){if(e===void 0||e.mode!==`collection`)return!1;let n=Md(e)[t];return n!==void 0&&n.kind!==`subscription`&&lm(n.output)}function dm(e){let t=e.loose;return typeof t==`function`?t.call(e):e}function fm(e){if(!(typeof e!=`object`||!e)){for(let t of Object.values(e))if(typeof t==`object`&&t){let e=t.addonId;if(typeof e==`string`)return e}}}function pm(e){if(e===null||typeof e!=`object`&&typeof e!=`function`)return!1;let t=e.shape??hm(e._def?.shape);return typeof t==`object`&&!!t&&Object.prototype.hasOwnProperty.call(t,`addonId`)}function mm(e){if(e===null||typeof e!=`object`&&typeof e!=`function`)return!1;let t=e.shape??hm(e._def?.shape);if(typeof t!=`object`||!t)return!1;let n=t.deviceId;if(n==null)return!1;let r=n._def;return n.constructor?.name===`ZodNumber`||r?.type===`number`||r?.typeName===`ZodNumber`}function hm(e){return typeof e==`function`?e():e}function gm(e,t){return t.auth===void 0?e.internal===!0?`admin`:`protected`:t.auth}function _m(e){return e===`public`?`public`:e===`admin`||e===`superAdmin`?`admin`:`protected`}function vm(e){return e.replace(/-([a-z])/g,(e,t)=>t.toUpperCase())}var ym=`composer`,bm=`customize:`,xm=`composed-`,Sm=2e4,Cm=f({addonId:u().min(1),stableId:u().min(1)}),wm=f({source:Cm,cap:u().min(1),fieldPath:u().min(1)}),Tm=wm.extend({kind:h(`from`)}),Em=f({kind:h(`literal`),value:p([u(),a(),w(),re()])}),Dm=m(`kind`,[Tm,Em]),Om=f({kind:h(`expression`),expr:u().min(1).max(_u),bindings:b(u().regex(yu),Dm)}).superRefine((e,t)=>{let n=Qu(e);n!==null&&t.addIssue({code:`custom`,message:n,path:[`expr`]})}),km=f({kind:h(`code`),code:u().min(1).max(Sm)}),Am=m(`kind`,[Tm,Om,km]),jm=f({kind:h(`forward`),source:Cm,cap:u().min(1),method:u().min(1)}),Mm=m(`kind`,[jm,km]),Nm=/^[a-z0-9][a-z0-9-]{0,47}$/,Pm=`items`,Fm=f({label:u().min(1).max(80),fields:b(u().min(1),Am)}),Im=f({kind:h(`fields`),cap:u().min(1),enabled:w().optional(),fields:b(u().min(1),Am).refine(e=>Object.keys(e).length<=32,{message:`at most 32 fields per capability`}),items:b(u().regex(Nm),Fm).refine(e=>Object.keys(e).length<=16,{message:`at most 16 items`}).optional(),commands:b(u().min(1),Mm).optional()}),Lm=f({kind:h(`passthrough`),cap:u().min(1),enabled:w().optional(),source:Cm}),Rm=m(`kind`,[Im,Lm]);function zm(e){return e.enabled!==!1}var Bm=f({kind:h(`new`),type:S(R),role:S(z).optional()}),Vm=f({kind:h(`existing`),device:Cm}),Hm=m(`kind`,[Bm,Vm]),Um=f({target:Hm,features:C(Rm).min(1).max(16)}).superRefine((e,t)=>{let n=new Set;e.features.forEach((e,r)=>{n.has(e.cap)&&t.addIssue({code:`custom`,message:`capability \`${e.cap}\` is composed twice — one feature per capability`,path:[`features`,r,`cap`]}),n.add(e.cap)})});function B(e){return`${e.addonId}/${e.stableId}`}function Wm(e,t){return`${B(e)}#${t}`}function Gm(e){return`${Wm(e.source,e.cap)}.${e.fieldPath}`}function Km(e){return`${xm}${e}`}function qm(e){return{addonId:ym,stableId:Km(e)}}function Jm(e){switch(e.kind){case`from`:return[{source:e.source,cap:e.cap,fieldPath:e.fieldPath}];case`expression`:return Object.values(e.bindings).flatMap(e=>e.kind===`from`?[{source:e.source,cap:e.cap,fieldPath:e.fieldPath}]:[]);case`code`:return[]}}function Ym(e,t,n){return`${e}[${t}].${n}`}function Xm(e,t=Pm){return[...Object.entries(e.fields).map(([e,t])=>({fieldPath:e,source:t})),...Object.entries(e.items??{}).flatMap(([e,n])=>Object.entries(n.fields).map(([n,r])=>({fieldPath:Ym(t,e,n),source:r})))]}function Zm(e){return Xm(e).map(e=>e.source)}function Qm(e){let t=e;for(;t instanceof ue||t instanceof fe||t instanceof _;)t=t.unwrap();return t}function $m(e){let t=Qm(e);return t instanceof ce?{kind:`enum`,enumValues:t.options}:t instanceof ee?{kind:`number`}:t instanceof te?{kind:`string`}:t instanceof ie?{kind:`boolean`}:null}function eh(e,t=``){let n=Qm(e);if(!(n instanceof oe))return[];let r=[],i=n.shape;for(let[e,n]of Object.entries(i)){let i=t?`${t}.${e}`:e,a=Qm(n);if(a instanceof oe){r.push(...eh(a,i));continue}let o=$m(n);o&&r.push({path:i,kind:o.kind,...o.enumValues?{enumValues:o.enumValues}:{}})}return r}function th(e){return eh(e.itemSchema).filter(t=>t.path!==e.keyField).map(e=>({...e,item:!0}))}function nh(e,t){let n=e;for(let e of t.split(`.`)){let t=Qm(n);if(!(t instanceof oe))return null;let r=t.shape[e];if(!(r instanceof ne))return null;n=r}return n}function rh(e,t){let n=eh(e).find(e=>e.path===t);if(n===void 0)return null;let r=nh(e,t);return r===null?null:{path:t,kind:n.kind,nullable:r.safeParse(null).success,required:!r.safeParse(void 0).success,...n.enumValues===void 0?{}:{enumValues:n.enumValues}}}function ih(e){return new Map(eh(e).filter(e=>!e.path.includes(`.`)).flatMap(t=>{let n=rh(e,t.path);return n===null?[]:[[t.path,n]]}))}function ah(e){let t=Qm(e);return t instanceof oe?Object.entries(t.shape).flatMap(([e,t])=>t instanceof ne&&!t.safeParse(void 0).success?[e]:[]):[]}function oh(e,t){let n=t.split(`.`);return n.slice(0,-1).flatMap((t,r)=>{let i=n.slice(0,r+1).join(`.`),a=nh(e,i);return a!==null&&a.safeParse(void 0).success?[i]:[]})}var sh={"doorbell.onPressed":T.DoorbellOnPressed},ch=sh,lh=f({featureIndex:a().int().nonnegative(),cap:u(),eventName:u(),category:S(T),stateField:u(),fieldKey:u()});function uh(e,t,n){return{code:e,path:t,message:n}}function dh(e){return e.issues.map(e=>`${e.path.length===0?`payload`:e.path.join(`.`)}: ${e.message}`).join(`; `)}function fh(e,t,n){if(t.mode===`replace`)return{problems:[],events:[]};let r=[],i=[];for(let[a,o]of Object.entries(e.events??{})){let s=o.fromState;if(s===void 0)continue;let c=`features[${t.featureIndex}].fields.${s.field}`,l=e.runtimeState?rh(e.runtimeState,s.field):null;if(l===null){r.push(uh(`unknown-field`,c,`\`${e.name}.${a}\` derives from missing state field \`${s.field}\``));continue}if(l.kind!==`number`){r.push(uh(`kind-mismatch`,c,`\`${e.name}.${a}\` needs a numeric state field; \`${s.field}\` is ${l.kind}`));continue}let u=`${e.name}.${a}`,d=ch[u];if(d===void 0){r.push(uh(`not-composable`,`features[${t.featureIndex}].cap`,`\`${u}\` has no explicit composition event-category mapping`));continue}let f=o.data.safeParse({deviceId:1,timestamp:1});if(!f.success){r.push(uh(`not-composable`,`features[${t.featureIndex}].cap`,`\`${u}\` cannot be derived from { deviceId, timestamp }: ${dh(f.error)}`));continue}let p=n.find(n=>n.featureIndex===t.featureIndex&&n.cap===e.name&&n.path===s.field&&n.item===void 0);if(p===void 0){r.push(uh(`unknown-field`,c,`\`${u}\` derives from \`${s.field}\`, but that field is not composed`));continue}i.push({featureIndex:t.featureIndex,cap:e.name,eventName:a,category:d,stateField:s.field,fieldKey:`${p.cap}.${p.path}`})}return{problems:r,events:i}}var ph=S([`reserved-variant`,`unknown-capability`,`not-composable`,`wrong-device-type`,`has-commands`,`unknown-field`,`nested-field`,`missing-field`,`kind-mismatch`,`may-be-null`,`source-missing`,`source-unreadable`,`source-capability-missing`,`source-field-unknown`,`expression-invalid`,`cycle`,`duplicate-target`,`not-item-array`,`item-field-reserved`,`target-missing`,`target-unreadable`,`not-replaceable`]),mh=f({code:ph,path:u(),message:u()}),hh=S([`string`,`number`,`boolean`,`enum`]),gh=S([`null`,`offline`,`unknown`,`release`]),_h=S([`derived`,`clock`,`constant`,`accumulator`]),vh=f({arrayPath:u(),key:u(),label:u()}),yh=f({cap:u(),path:u(),item:vh.optional(),featureIndex:a().int().nonnegative(),kind:hh,nullable:w(),required:w(),unavailable:gh,role:_h,source:Am,reads:C(wm)});function bh(e){let t=e.item===void 0?e.path:Ym(e.item.arrayPath,e.item.key,e.path);return`${e.cap}.${t}`}var xh=S([`new`,`add`,`replace`]),Sh=f({featureIndex:a().int().nonnegative(),cap:u(),mode:xh}),Ch=f({ok:w(),problems:C(mh),fields:C(yh),features:C(Sh),events:C(lh)}),wh=S([`stopped`,`starting`,`running`,`degraded`,`failed`]),Th=S([`fresh`,`stale`,`unavailable`]),Eh=f({cap:u(),path:u(),item:vh.optional(),state:Th,value:p([u(),a(),w(),re()]),reason:u().optional()}),Dh=f({blockId:u(),deviceId:a().nullable(),status:wh,reason:u().optional(),fields:C(Eh)}),Oh=ym,kh=f({id:u().min(1),name:u().min(1).max(120),enabled:w(),updatedAt:a(),composition:Um}),Ah=f({id:u().min(1),name:u().nullable(),error:u()}),jh=f({integrationId:u().nullable(),storeLoaded:w(),blocks:C(kh),restartBlockIds:C(u()),unreadableBlocks:C(Ah)}),Mh=f({blockId:u(),status:wh,reason:u().optional()}),Nh=f({blocks:C(Mh),acted:w()}),Ph={name:`composer`,scope:`system`,mode:`singleton`,internal:!0,methods:{applyBlocks:L(jh,Nh,{kind:`mutation`,auth:`admin`}),getStates:L(f({blockIds:C(u())}),f({states:C(Dh)}),{auth:`admin`})}};function V(e,t,n){return{code:e,path:t,message:n}}function H(...e){return{problems:e,fields:[],features:[],events:[]}}function Fh(e){let t=e.item===void 0?`fields`:`items.${e.item.key}.fields`;return`features[${e.featureIndex}].${t}.${e.path}`}var U={kind:`fixed`,result:[`number`]},Ih={kind:`fixed`,result:[`boolean`]},Lh=Object.freeze({min:U,max:U,abs:U,floor:U,ceil:U,sqrt:U,round:U,pow:U,clamp:U,avg:U,sum:U,age:U,convert:U,coalesce:{kind:`coalesce`},any:Ih,all:Ih,within:Ih,latest:{kind:`fixed`,result:[`number`,`null`]},number:{kind:`fixed`,result:[`number`,`null`]},rose:{kind:`fixed`,result:[`number`,`null`]},count:U}),Rh=class extends Error{};function zh(e){return e===null?`null`:typeof e==`number`?`number`:typeof e==`string`?`string`:`boolean`}function Bh(e){return new Set([e])}function Vh(...e){return new Set(e.flatMap(e=>[...e]))}function Hh(e){return new Set([...e].filter(e=>e!==`null`))}function Uh(e,t,n){if(e===`+`){let e=[...t,...n];return e.every(e=>e===`string`)?Bh(`string`):e.every(e=>e===`number`)?Bh(`number`):new Set([`number`,`string`])}return Bh(e===`-`||e===`*`||e===`/`||e===`%`?`number`:`boolean`)}function Wh(e){return e.minArgs===e.maxArgs?`exactly ${e.minArgs}`:e.maxArgs===1/0?`at least ${e.minArgs}`:`${e.minArgs}–${e.maxArgs}`}function Gh(e,t){let n=hu[e];if(n!==void 0&&(t.length<n.minArgs||t.length>n.maxArgs))throw new Rh(`${e}: wrong number of arguments (${t.length}); expected ${Wh(n)}`);let r=Lh[e];if(r===void 0)throw new Rh(`no result-kind rule for builtin '${e}'`);if(r.kind===`fixed`)return new Set(r.result);let i=Vh(...t.map(Hh));return t.every(e=>e.has(`null`))?Vh(i,Bh(`null`)):i}function Kh(e,t){switch(e.kind){case`literal`:return Bh(zh(e.value));case`identifier`:{if(e.name===`now`)return Bh(`number`);let n=t.get(e.name);if(n===void 0)throw new Rh(`unbound identifier '${e.name}'`);return n}case`unary`:return Bh(e.op===`!`?`boolean`:`number`);case`binary`:return Uh(e.op,Kh(e.left,t),Kh(e.right,t));case`logical`:return Vh(Kh(e.left,t),Kh(e.right,t));case`conditional`:return Vh(Kh(e.consequent,t),Kh(e.alternate,t));case`call`:return Gh(e.callee,e.args.map(e=>Kh(e,t)))}}function qh(e,t){switch(e.kind){case`literal`:case`identifier`:return!1;case`unary`:return qh(e.operand,t);case`binary`:case`logical`:return qh(e.left,t)||qh(e.right,t);case`conditional`:return qh(e.test,t)||qh(e.consequent,t)||qh(e.alternate,t);case`call`:return e.callee===t||e.args.some(e=>qh(e,t))}}function Jh(e,t){let n=Lu(e);return n.ok&&qh(n.parsed.ast,t)}function Yh(e){let t=Lu(e.expr);if(!t.ok)return{ok:!1,error:t.error};try{return{ok:!0,kinds:Kh(t.parsed.ast,e.bindingKinds)}}catch(e){if(e instanceof Rh)return{ok:!1,error:e.message};throw e}}function Xh(e,t){let n=t(e.cap),r=n?.runtimeState??n?.status?.schema;if(n===null||r===void 0)return{ok:!1,code:`source-field-unknown`,message:`no capability \`${e.cap}\` with state to read`};let i=rh(r,e.fieldPath);if(i===null)return{ok:!1,code:`source-field-unknown`,message:`\`${e.cap}\` has no field \`${e.fieldPath}\``};let a=i.kind===`enum`?`string`:i.kind;return{ok:!0,kinds:new Set(i.nullable?[a,`null`]:[a])}}function Zh(e,t){if(e.kind===`from`)return Xh(e,t);if(e.kind===`code`)return{ok:!1,code:`reserved-variant`,message:`code fields arrive in slice 4`};let n=new Map;for(let[r,i]of Object.entries(e.bindings)){if(i.kind===`literal`){n.set(r,new Set([zh(i.value)]));continue}let e=Xh(i,t);if(!e.ok)return{...e,message:`binding \`${r}\`: ${e.message}`};n.set(r,e.kinds)}let r=Yh({expr:e.expr,bindingKinds:n});return r.ok?{ok:!0,kinds:r.kinds}:{ok:!1,code:`expression-invalid`,message:r.error}}function Qh(e,t,n,r){let i=t.kind===`enum`?`string`:t.kind,a=[...n].filter(e=>e!==`null`&&e!==i),o=[];return a.length>0&&o.push(V(`kind-mismatch`,r,`\`${e}.${t.path}\` is a ${t.kind}; this source can produce ${a.join(` or `)}`)),n.has(`null`)&&!t.nullable&&o.push(V(`may-be-null`,r,`\`${e}.${t.path}\` cannot be null and this source can produce null — wrap it in coalesce(…) or pick a non-null source`)),o}function $h(e){if(e.kind!==`expression`)return null;let t=Lu(e.expr);if(!t.ok)return null;let n=t.parsed.ast;return n.kind===`literal`&&typeof n.value==`string`?n.value:null}function eg(e,t,n,r){if(t.kind!==`enum`||t.enumValues===void 0)return null;let i=$h(n);if(i===null||t.enumValues.includes(i))return null;let a=t.enumValues.map(e=>`\`${e}\``).join(`, `);return V(`kind-mismatch`,r,`\`${e}.${t.path}\` accepts only ${a}; this source is the literal \`${i}\``)}function tg(e){if(e.kind!==`expression`)return`derived`;if(Jh(e.expr,`count`))return`accumulator`;if(Jm(e).length>0)return`derived`;let t=Lu(e.expr);return t.ok&&t.parsed.identifiers.has(`now`)?`clock`:`constant`}function ng(e,t,n,r,i){return n===`replace`&&(t===`derived`||t===`accumulator`)?{ok:!0,unavailable:`release`}:n===`new`||t!==`derived`?{ok:!0,unavailable:e.nullable?`null`:`offline`}:e.nullable?{ok:!0,unavailable:`null`}:e.enumValues?.includes(`unknown`)===!0?{ok:!0,unavailable:`unknown`}:{ok:!1,problem:V(`not-replaceable`,i,`\`${r}.${e.path}\` reads a source but can say neither null nor 'unknown', and an ADDED capability has no native reading to fall back to`)}}var rg={resettable:!1};function ig(e){return new Set([e.keyField,...e.labelField===void 0?[]:[e.labelField],...Object.keys(rg)])}function ag(e,t,n){let r=rh(e.itemSchema,t);return r===null||!r.required?!1:oh(e.itemSchema,t).every(e=>n.some(t=>t.startsWith(`${e}.`)))}function og({capName:e,itemArray:t,reserved:n},r,i){let a=Object.keys(r.fields);return eh(t.itemSchema).flatMap(o=>{if(n.has(o.path)||o.path in r.fields||!ag(t,o.path,a))return[];let s=rh(t.itemSchema,o.path);return s===null||s.nullable?[]:[V(`missing-field`,`${i}.fields.${o.path}`,`\`${e}.${t.path}[].${o.path}\` is required and has no source`)]})}function sg(e,t){let{capName:n,itemArray:r,featureIndex:i,lookupCap:a}=e,{key:o,label:s,path:c,source:l}=t,u=`features[${i}].items.${o}.fields.${c}`;if(e.reserved.has(c))return H(V(`item-field-reserved`,u,`\`${n}.${r.path}[].${c}\` is set by the composer itself — it takes no source`));let d=rh(r.itemSchema,c);if(d===null)return H(V(`unknown-field`,u,`a \`${n}\` item has no field \`${c}\``));let f=Zh(l,a);if(!f.ok)return H(V(f.code,u,f.message));let p=tg(l),m=ng(d,p,e.mode,n,u);if(!m.ok)return H(m.problem);let h={cap:n,path:c,item:{arrayPath:r.path,key:o,label:s},featureIndex:i,kind:d.kind,nullable:d.nullable,required:d.required,unavailable:m.unavailable,role:p,source:l,reads:[...Jm(l)]},g=eg(n,d,l,u);return{problems:[...Qh(n,d,f.kinds,u),...g===null?[]:[g]],fields:[h],features:[],events:[]}}function cg(e,t,n,r,i=`new`){let a=`features[${n}].items`,o=e.status?.itemArray;if(o===void 0)return H(V(`not-item-array`,a,`\`${e.name}\` has no item array — it takes no \`items\``));if(o.path!==`items`)return H(V(`not-item-array`,a,`\`${e.name}\`'s item array is at \`${o.path}\`, not \`${Pm}\` — not composable yet`));let s={capName:e.name,itemArray:o,reserved:ig(o),featureIndex:n,lookupCap:r,mode:i},c=Object.entries(t.items??{}).flatMap(([e,t])=>[{problems:og(s,t,`${a}.${e}`),fields:[],features:[],events:[]},...Object.entries(t.fields).map(([n,r])=>sg(s,{key:e,label:t.label,path:n,source:r}))]);return{problems:c.flatMap(e=>e.problems),fields:c.flatMap(e=>e.fields),features:[],events:[]}}var lg=class extends Error{};function ug(e){return new Set(e.composition.features.flatMap(e=>!zm(e)||e.kind!==`fields`?[]:Xm(e).map(({fieldPath:t})=>`${e.cap}.${t}`)))}function dg(e,t,n){if(B(n.source)!==B(e.target))return!0;let r=`${n.cap}.${n.fieldPath}`;return t.has(r)&&e.replaced?.has(r)!==!0}function fg(e){let t=ug(e);return e.composition.features.flatMap(n=>!zm(n)||n.kind!==`fields`?[]:Xm(n).map(({fieldPath:r,source:i})=>[Gm({source:e.target,cap:n.cap,fieldPath:r}),Jm(i).filter(n=>dg(e,t,n)).map(Gm)]))}function pg(e,t){let n=B(e.target),r=new Map;for(let i of t){if(i.blockId===e.blockId)continue;let t=B(i.target);if(t===n)throw new lg(`block \`${i.blockId}\` and block \`${e.blockId}\` both target device \`${t}\` — one composition per device; delete or edit the existing one`);let a=r.get(t);if(a!==void 0)throw new lg(`two stored compositions (\`${a.blockId}\`, \`${i.blockId}\`) both target device \`${t}\` — refusing to build the field graph`);r.set(t,i)}return[...r.values(),e]}function mg(e,t){let n=pg(e,t).flatMap(fg);return new Map(n)}function hg(e,t){let n=mg(e,t),r=new Map,i=new Map,a=(e,t)=>{let o=r.get(e);if(o!==`done`){if(o===`visiting`){let n=[...t.slice(t.indexOf(e)),e],r=[...new Set(n)].toSorted().join(`|`);i.has(r)||i.set(r,{path:n});return}r.set(e,`visiting`);for(let r of n.get(e)??[])a(r,[...t,e]);r.set(e,`done`)}};for(let e of n.keys())a(e,[]);return[...i.values()]}function gg(e){let t=new Map,n=new Map,r=new Set,i=[],a=[],o=s=>{t.set(s,t.size),n.set(s,t.get(s)??0),i.push(s),r.add(s);for(let i of e.get(s)??[])t.has(i)?r.has(i)&&n.set(s,Math.min(n.get(s)??0,t.get(i)??0)):(o(i),n.set(s,Math.min(n.get(s)??0,n.get(i)??0)));if(n.get(s)!==t.get(s))return;let c=[];for(let e=i.pop();e!==void 0&&(r.delete(e),c.push(e),e!==s);e=i.pop());a.push(c)};for(let n of e.keys())t.has(n)||o(n);return a}function _g(e,t,n){let r=new Map,i=[e];for(let a=0;a<i.length;a+=1){let o=i[a];if(o===void 0)break;for(let a of n.get(o)??[]){if(a===e){let t=[];for(let n=o;n!==void 0&&n!==e;n=r.get(n))t.push(n);return[e,...t.reverse(),e]}!t.has(a)||r.has(a)||(r.set(a,o),i.push(a))}}return[e,e]}function vg(e,t){let n=mg(e,t),r=`${B(e.target)}#`;return gg(n).flatMap(e=>{let t=e.find(e=>e.startsWith(r));if(t===void 0)return[];let i=new Set(e),a=e.length===1&&(n.get(t)??[]).includes(t);return e.length===1&&!a?[]:[{path:_g(t,i,n),component:i}]})}function yg(e){let t=new Map(e.map(e=>[e.name,e]));return e=>t.get(e)??null}var bg=new Set([`device-status`,`feature-probe`]),xg={addonId:ym,stableId:`${xm}(unsaved)`},Sg=`(unsaved)`;function Cg(e,t,n){let r=n(e.cap);if(r===null)return V(`unknown-capability`,`${t}.cap`,`no capability is named \`${e.cap}\``);if(bg.has(r.name))return V(`not-composable`,`${t}.cap`,`\`${r.name}\` is registered by every device itself — it cannot be composed`);let i=r.runtimeState;return r.scope!==`device`||i===void 0?V(`not-composable`,`${t}.cap`,`\`${r.name}\` has no per-device state to compose`):{def:r,state:i,fields:ih(i)}}function wg({def:e,state:t,fields:n},r,i,a){let o=[];e.deviceTypes!==void 0&&!e.deviceTypes.includes(a)&&o.push(V(`wrong-device-type`,`${i}.cap`,`\`${e.name}\` is not offered on a \`${a}\` device (it allows ${e.deviceTypes.join(`, `)})`));let s=Object.entries(e.methods).filter(([t,n])=>n.systemOnly!==!0&&e.composedMethods?.[t]===void 0).map(([e])=>`\`${e}\``);s.length>0&&o.push(V(`has-commands`,`${i}.cap`,`\`${e.name}\` has ${s.join(`, `)}, which a composed device cannot serve until commands arrive (slice 3)`));let c=r.items===void 0?null:e.status?.itemArray?.path??null;for(let a of ah(t))a!==c&&(n.has(a)?a in r.fields||o.push(V(`missing-field`,`${i}.fields.${a}`,`\`${e.name}.${a}\` is required and has no source`)):o.push(V(`not-composable`,`${i}.fields`,`\`${e.name}.${a}\` is not a scalar — nested fields arrive in a later slice`)));return o}function Tg({def:e,fields:t},n,r,i){let{featureIndex:a,path:o,source:s}=n,c=`features[${a}].fields.${o}`;if(o.includes(`.`))return H(V(`nested-field`,c,`\`${o}\` is nested — nested fields arrive in a later slice`));let l=t.get(o);if(l===void 0)return H(V(`unknown-field`,c,`\`${e.name}\` has no field \`${o}\``));let u=Zh(s,i);if(!u.ok)return H(V(u.code,c,u.message));let d=tg(s),f=ng(l,d,r,e.name,c);if(!f.ok)return H(f.problem);let p={cap:e.name,path:o,featureIndex:a,kind:l.kind,nullable:l.nullable,required:l.required,unavailable:f.unavailable,role:d,source:s,reads:[...Jm(s)]},m=eg(e.name,l,s,c);return{problems:[...Qh(e.name,l,u.kinds,c),...m===null?[]:[m]],fields:[p],features:[],events:[]}}function Eg(e,t,n,r){let i=`features[${t}]`,a=Cg(e,i,r);if(`code`in a)return H(a);let o=n.mode===`replace`?[]:[...wg(a,e,i,n.deviceType)];e.commands!==void 0&&Object.keys(e.commands).length>0&&o.push(V(`reserved-variant`,`${i}.commands`,"commands (`forward`) arrive in slice 3"));let s=Object.entries(e.fields).map(([e,i])=>Tg(a,{featureIndex:t,path:e,source:i},n.mode,r)),c=e.items===void 0?[]:[cg(a.def,e,t,r,n.mode)],l=[...s,...c],u=l.flatMap(e=>e.fields),d={featureIndex:t,cap:a.def.name,mode:n.mode},f=fh(a.def,d,u);return{problems:[...o,...l.flatMap(e=>e.problems),...f.problems],fields:u,features:[d],events:f.events}}function Dg(e,t){let n=e.nativeCaps.get(t);return n!==void 0&&n!==`composer`}function Og(e,t){if(e.target.kind===`new`)return{kind:`new`,type:e.target.type};let n=B(e.target.device);return t===void 0?V(`target-unreadable`,`target`,`target device \`${n}\` was not read — the save is refused rather than stored unchecked`):t.kind===`absent`?V(`target-missing`,`target`,`target device \`${n}\` does not exist`):t.kind===`unreadable`?V(`target-unreadable`,`target`,`could not read target device \`${n}\` (${t.error}) — the save is refused rather than stored unchecked`):{kind:`existing`,found:t}}function kg(e,t){return e.kind===`new`?{mode:`new`,deviceType:e.type}:{mode:Dg(e.found,t)?`replace`:`add`,deviceType:e.found.type}}function Ag(e,t,n){let r=Og(e,n);if(`code`in r)return H(r);let i=e.features.map((e,n)=>{let i=e.kind===`passthrough`?H(V(`reserved-variant`,`features[${n}]`,`whole-capability passthrough of \`${e.cap}\` arrives in slice 3`)):Eg(e,n,kg(r,e.cap),t);return zm(e)?i:{problems:i.problems,fields:[],features:[],events:[]}});return{problems:i.flatMap(e=>e.problems),fields:i.flatMap(e=>e.fields),features:i.flatMap(e=>e.features),events:i.flatMap(e=>e.events)}}function jg(e){let t=e.features.flatMap(e=>zm(e)&&e.kind===`fields`?Zm(e).flatMap(Jm).map(e=>e.source):[]);return[...new Map(t.map(e=>[B(e),e])).values()]}function Mg(e,t,n){return{ref:e.target.kind===`existing`?e.target.device:t.self??xg,native:e.target.kind===`existing`&&t.target?.kind===`found`?t.target:null,replaced:Ng(n)}}function Ng(e){let t=new Set(e.features.filter(e=>e.mode===`replace`).map(e=>e.featureIndex));return new Set(e.fields.filter(e=>t.has(e.featureIndex)).map(bh))}function Pg(e,t,n,r){let i=`${e.cap}.${e.fieldPath}`;return n.some(e=>bh(e)===i&&!r.replaced.has(i))?[]:r.native===null?[V(`source-field-unknown`,t,`this device has no composed field \`${e.cap}.${e.fieldPath}\``)]:Dg(r.native,e.cap)?[]:[V(`source-capability-missing`,t,`the target device (device ${r.native.deviceId}) has no native \`${e.cap}\``)]}function Fg(e,t,n){let r=B(n.ref);return e.flatMap(i=>i.reads.flatMap(a=>{let o=Fh(i),s=B(a.source);if(s===r)return Pg(a,o,e,n);let c=t.sources.get(s);return c===void 0||c.kind===`unreadable`?[V(`source-unreadable`,o,`could not read source \`${s}\` (${c===void 0?`it was not read`:c.error}) — the save is refused rather than stored unchecked`)]:c.kind===`absent`?[V(`source-missing`,o,`source \`${s}\` does not exist`)]:c.caps.has(a.cap)?[]:[V(`source-capability-missing`,o,`source \`${s}\` (device ${c.deviceId}) has no \`${a.cap}\``)]}))}function Ig(e,t){let n=`${t}#`;if(!e.startsWith(n))return null;let r=e.slice(n.length),i=r.indexOf(`.`);return i===-1?null:{cap:r.slice(0,i),fieldPath:r.slice(i+1)}}function Lg(e,t,n){for(let r of e){let e=Ig(r,t);if(e===null)continue;let i=`${e.cap}.${e.fieldPath}`,a=n.find(e=>bh(e)===i);if(a!==void 0)return Fh(a)}return`features`}function Rg(e,t){for(let[n,r]of t)if(e.some(e=>e.startsWith(`${n}#`)))return{key:n,error:r};return null}function zg(e,t,n,r){let i={blockId:t.blockId??`(unsaved)`,target:r.ref,composition:e,replaced:r.replaced},a=B(i.target),o=t.unreadTargets??new Map;try{return vg(i,t.peers).map(e=>{let t=Lg(e.path,a,n),r=Rg([...e.component],o);return r===null?V(`cycle`,t,`a field reads itself: ${e.path.join(` → `)}`):V(`cycle`,t,`possible cycle through \`${r.key}\` — its state could not be read (${r.error}): ${e.path.join(` → `)}`)})}catch(e){if(e instanceof lg)return[V(`duplicate-target`,`features`,e.message)];throw e}}function Bg(e,t){let n=Ag(e,t.lookupCap,t.target??void 0),r=Mg(e,t,n),i=zg(e,t,n.fields,r),a=[...n.problems,...Fg(n.fields,t,r),...i];return{ok:a.length===0,problems:a,fields:[...n.fields],features:[...n.features],events:[...n.events]}}var Vg=f({path:u(),kind:hh,nullable:w(),required:w(),enumValues:C(u()).optional()}),Hg=f({cap:u(),fields:C(Vg),itemArray:f({path:u(),keyField:u()}).optional()}),Ug=f({caps:C(Hg)});function Wg(e,t){if(bg.has(e.name))return[`not-composable`];let n=e.runtimeState;if(e.scope!==`device`||n===void 0)return[`not-composable`];let r=[];e.deviceTypes!==void 0&&!e.deviceTypes.includes(t)&&r.push(`wrong-device-type`),Object.entries(e.methods).filter(([t,n])=>n.systemOnly!==!0&&e.composedMethods?.[t]===void 0).length>0&&r.push(`has-commands`);let i=ih(n),a=e.status?.itemArray?.path??null;return ah(n).some(e=>e!==a&&!i.has(e))&&r.push(`not-composable`),fh(e,{featureIndex:0,cap:e.name,mode:`new`},[]).problems.some(e=>e.code===`not-composable`)&&!r.includes(`not-composable`)&&r.push(`not-composable`),r}function Gg(e,t){return e.filter(e=>Wg(e,t).length===0).map(e=>{let t=e.runtimeState,n=t===void 0?[]:[...ih(t).values()],r=e.status?.itemArray;return{cap:e.name,fields:n.map(e=>({path:e.path,kind:e.kind,nullable:e.nullable,required:e.required,...e.enumValues===void 0?{}:{enumValues:[...e.enumValues]}})),...r===void 0?{}:{itemArray:{path:r.path,keyField:r.keyField}}}}).toSorted((e,t)=>e.cap.localeCompare(t.cap))}var Kg=`core-block-`,qg=`core-blocks`;function Jg(e){return`${Kg}${e}`}function Yg(e){if(!e.startsWith(`core-block-`))return null;let t=e.slice(11);return t.length>0?t:null}var Xg=p([h(`hub`),u().min(1)]),Zg=S([`stopped`,`starting`,`running`,`degraded`,`failed`]),Qg=`main.ts`,$g=b(u().min(1).max(260),u().max(2e5)),e_=v(),t_=f({name:u().min(1).max(120),code:u().max(2e5).optional(),files:$g.optional(),entry:u().min(1).max(260).optional(),enabled:w(),placement:Xg,integrationId:u().optional(),settingsSchema:e_.optional()}),n_=t_.superRefine((e,t)=>{let n=e.entry??`main.ts`;if(e.files!==void 0){e.files[n]===void 0&&t.addIssue({code:`custom`,message:`files must include the entry "${n}"`,path:[`files`]});return}e.code===void 0&&t.addIssue({code:`custom`,message:`code or files is required`,path:[`code`]})});function r_(e){return e!==void 0&&e.length>0?e:Qg}function i_(e){let t=r_(e.entry);return e.files===void 0?{files:{[t]:e.code},entry:t}:{files:{...e.files},entry:t}}function a_(e){if(e.files!==void 0){let t=r_(e.entry);return{code:e.files[t]??e.code??``,files:{...e.files},entry:t}}return{code:e.code??``,...e.entry===void 0?{}:{entry:e.entry}}}var o_=m(`kind`,[f({kind:h(`code`)}),f({kind:h(`recipe`),recipe:dd}),f({kind:h(`composition`),composition:Um})]),s_=f({name:u().min(1).max(120).optional(),enabled:w(),composition:Um}),W=f({name:u().min(1).max(120),code:u().max(2e5),files:$g.optional(),entry:u().min(1).max(260).optional(),enabled:w(),placement:Xg,integrationId:u().optional(),settingsSchema:e_.optional(),id:u(),createdAt:a(),updatedAt:a(),createdBy:u(),status:Zg,lastError:u().optional(),lastChangedAt:a(),source:o_.optional()});function c_(e){return e.source?.kind??`code`}function l_(e){return e.source?.kind===`composition`?e.source.composition:null}var u_=m(`kind`,[f({kind:h(`answered`),state:Dh.nullable()}),f({kind:h(`unreachable`),error:u()})]),d_=f({block:W,state:u_}),f_=f({state:h(`not-loaded`),reason:u()}),p_=m(`state`,[f({state:h(`loaded`),views:C(d_)}),f_]),m_=m(`state`,[f({state:h(`loaded`),view:d_.nullable()}),f_]),h_=m(`state`,[f({state:h(`loaded`),view:d_.nullable()}),f_]),g_=f({ok:w(),error:u().optional(),line:a().optional(),column:a().optional()}),__=f({code:u().optional(),files:$g.optional(),entry:u().min(1).max(260).optional()}).superRefine((e,t)=>{if(e.files!==void 0){let n=e.entry??`main.ts`;e.files[n]===void 0&&t.addIssue({code:`custom`,message:`files must include the entry "${n}"`,path:[`files`]});return}e.code===void 0&&t.addIssue({code:`custom`,message:`code or files is required`,path:[`code`]})}),v_={name:`core-blocks`,scope:`system`,mode:`singleton`,methods:{list:L(f({}),f({blocks:C(W)}),{auth:`admin`}),get:L(f({blockId:u()}),f({block:W.nullable()}),{auth:`admin`}),create:L(f({block:n_}),f({block:W}),{kind:`mutation`,auth:`admin`,caller:`required`}),update:L(f({blockId:u(),block:t_.partial()}),f({block:W}),{kind:`mutation`,auth:`admin`,caller:`required`}),delete:L(f({blockId:u()}),f({success:h(!0)}),{kind:`mutation`,auth:`admin`}),setEnabled:L(f({blockId:u(),enabled:w()}),f({block:W}),{kind:`mutation`,auth:`admin`}),restart:L(f({blockId:u()}),f({block:W}),{kind:`mutation`,auth:`admin`}),compile:L(__,g_,{kind:`mutation`,auth:`admin`}),getBlockSettings:L(f({blockId:u()}),Jd.nullable(),{auth:`admin`}),updateBlockSettings:L(f({blockId:u(),patch:Yd}),Xd,{kind:`mutation`,auth:`admin`}),getTypeDefs:L(f({}),f({libs:C(f({filePath:u(),content:u()}))}),{auth:`admin`}),createComposition:L(f({block:s_}),f({block:W}),{kind:`mutation`,auth:`admin`,caller:`required`}),updateComposition:L(f({blockId:u(),expectedUpdatedAt:a(),block:s_.partial()}),f({block:W}),{kind:`mutation`,auth:`admin`,caller:`required`}),getComposition:L(f({blockId:u()}),m_,{auth:`admin`}),listCompositions:L(f({}),p_,{auth:`admin`}),getCustomization:L(f({addonId:u().min(1),stableId:u().min(1)}),h_,{auth:`admin`}),listComposableCaps:L(f({deviceType:S(R)}),Ug,{auth:`admin`}),validateComposition:L(f({composition:Um,blockId:u().optional()}),Ch,{kind:`mutation`,auth:`admin`,access:`view`})}};function y_(e){return e}function b_(e,t,n){return{input:e,output:t,kind:n?.kind??`query`,auth:n?.auth??`protected`,scope:n?.scope??{kind:`system`},...n?.caller?{caller:`required`}:{}}}function x_(e,t,n){return{input:e,output:t,kind:n?.kind??`query`,auth:n?.auth??`protected`,scope:{kind:`device`,...n?.deviceTypes?{deviceTypes:n.deviceTypes}:{}}}}function S_(e){let t={};for(let[n,r]of Object.entries(e))t[n]={kind:r.kind,auth:r.auth,scope:r.scope,...r.caller===`required`?{caller:`required`}:{}};return t}var C_=f({stepId:u(),entry:Ll}),w_={name:`custom-model-registry`,scope:`system`,mode:`collection`,internal:!0,methods:{listModels:L(y(),C(C_).readonly(),{auth:`admin`})}},T_=f({where:b(u(),s()).optional(),whereIn:b(u(),C(s())).optional(),whereBetween:b(u(),d([s(),s()])).optional(),whereNot:b(u(),s()).optional(),whereNotIn:b(u(),C(s())).optional(),orderBy:f({field:u(),direction:S([`asc`,`desc`])}).optional(),limit:a().optional(),offset:a().optional()}),E_=f({where:b(u(),s()).optional(),whereIn:b(u(),C(s())).optional(),whereBetween:b(u(),d([s(),s()])).optional(),whereNot:b(u(),s()).optional(),whereNotIn:b(u(),C(s())).optional()}),D_=f({as:u().min(1),field:u().min(1),op:S([`sum`,`min`,`max`])}),O_=f({count:a().int(),values:b(u(),a().nullable())}),k_=f({id:u(),data:b(u(),s())}),A_=f({id:u().optional(),data:b(u(),s())}),j_=f({name:u(),type:S([`TEXT`,`INTEGER`,`REAL`,`JSON`,`BOOLEAN`]),primaryKey:w().optional(),notNull:w().optional(),unique:w().optional(),defaultValue:p([u(),a(),w()]).optional()}),M_=f({name:u(),columns:C(u()).readonly(),unique:w().optional()}),N_={name:`settings-store`,scope:`system`,mode:`singleton`,methods:{get:L(f({namespace:u().optional(),collection:u(),key:u()}),s(),{auth:`admin`}),set:L(f({namespace:u().optional(),collection:u(),key:u(),value:s()}),y(),{kind:`mutation`,auth:`admin`}),query:L(f({namespace:u().optional(),collection:u(),filter:T_.optional(),columns:C(u()).readonly().optional()}),C(k_).readonly(),{auth:`admin`}),upsert:L(f({namespace:u().optional(),collection:u(),conflict:C(u()).readonly(),record:A_}),f({id:p([u(),a()])}),{kind:`mutation`,auth:`admin`}),insert:L(f({namespace:u().optional(),collection:u(),record:f({id:u().optional(),data:b(u(),s())})}),f({id:p([u(),a()])}),{kind:`mutation`,auth:`admin`}),insertMany:L(f({namespace:u().optional(),collection:u(),records:C(A_).readonly()}),f({inserted:a().int()}),{kind:`mutation`,auth:`admin`}),update:L(f({namespace:u().optional(),collection:u(),id:u(),data:b(u(),s())}),y(),{kind:`mutation`,auth:`admin`}),delete:L(f({namespace:u().optional(),collection:u(),key:u()}),y(),{kind:`mutation`,auth:`admin`}),deleteWhere:L(f({namespace:u().optional(),collection:u(),filter:E_}),f({deleted:a().int()}),{kind:`mutation`,auth:`admin`}),updateWhere:L(f({namespace:u().optional(),collection:u(),filter:E_,data:b(u(),s())}),f({updated:a().int()}),{kind:`mutation`,auth:`admin`}),count:L(f({namespace:u().optional(),collection:u(),filter:T_.optional()}),a(),{auth:`admin`}),aggregate:L(f({namespace:u().optional(),collection:u(),fields:C(D_).readonly(),filter:T_.optional()}),O_,{auth:`admin`}),histogram:L(f({namespace:u().optional(),collection:u(),field:u(),bucketSize:a().int().positive(),origin:a().int(),filter:T_.optional()}),C(f({bucket:a().int(),count:a().int()})).readonly(),{auth:`admin`}),isEmpty:L(f({namespace:u().optional(),collection:u()}),w(),{auth:`admin`}),declareCollection:L(f({namespace:u().optional(),collection:u(),columns:C(j_).readonly(),indexes:C(M_).readonly().optional()}),y(),{kind:`mutation`,auth:`admin`})}},P_=f({engineId:u(),kind:S([`relational`,`vector`]),displayName:u()}),F_={name:`data-store-provider`,scope:`system`,mode:`collection`,internal:!0,methods:{getEngineInfo:L(y(),P_,{auth:`admin`}),get:L(f({namespace:u().optional(),collection:u(),key:u()}),s(),{auth:`admin`}),set:L(f({namespace:u().optional(),collection:u(),key:u(),value:s()}),y(),{kind:`mutation`,auth:`admin`}),query:L(f({namespace:u().optional(),collection:u(),filter:T_.optional(),columns:C(u()).readonly().optional()}),C(k_).readonly(),{auth:`admin`}),insert:L(f({namespace:u().optional(),collection:u(),record:f({id:u().optional(),data:b(u(),s())})}),f({id:p([u(),a()])}),{kind:`mutation`,auth:`admin`}),upsert:L(f({namespace:u().optional(),collection:u(),conflict:C(u()).readonly(),record:A_}),f({id:p([u(),a()])}),{kind:`mutation`,auth:`admin`}),insertMany:L(f({namespace:u().optional(),collection:u(),records:C(A_).readonly()}),f({inserted:a().int()}),{kind:`mutation`,auth:`admin`}),update:L(f({namespace:u().optional(),collection:u(),id:u(),data:b(u(),s())}),y(),{kind:`mutation`,auth:`admin`}),delete:L(f({namespace:u().optional(),collection:u(),key:u()}),y(),{kind:`mutation`,auth:`admin`}),deleteWhere:L(f({namespace:u().optional(),collection:u(),filter:E_}),f({deleted:a().int()}),{kind:`mutation`,auth:`admin`}),updateWhere:L(f({namespace:u().optional(),collection:u(),filter:E_,data:b(u(),s())}),f({updated:a().int()}),{kind:`mutation`,auth:`admin`}),count:L(f({namespace:u().optional(),collection:u(),filter:T_.optional()}),a(),{auth:`admin`}),aggregate:L(f({namespace:u().optional(),collection:u(),fields:C(D_).readonly(),filter:T_.optional()}),O_,{auth:`admin`}),histogram:L(f({namespace:u().optional(),collection:u(),field:u(),bucketSize:a().int().positive(),origin:a().int(),filter:T_.optional()}),C(f({bucket:a().int(),count:a().int()})).readonly(),{auth:`admin`}),isEmpty:L(f({namespace:u().optional(),collection:u()}),w(),{auth:`admin`}),declareCollection:L(f({namespace:u().optional(),collection:u(),columns:C(j_).readonly(),indexes:C(M_).readonly().optional()}),y(),{kind:`mutation`,auth:`admin`})}},I_=S([`key-missing`,`wrong-key`,`key-file-unreadable`,`store-unavailable`,`not-initialized`,`decrypt-failed`]),L_=m(`state`,[f({state:h(`ready`)}),f({state:h(`locked`),reason:I_})]),R_=m(`kind`,[f({kind:h(`value`),value:u(),version:a().int()}),f({kind:h(`missing`)}),f({kind:h(`unavailable`),reason:I_}),f({kind:h(`forbidden`)})]),z_=b(u(),R_),B_=f({ref:u(),owner:u(),scope:u(),fieldPath:u(),version:a().int(),createdAt:a(),updatedAt:a(),updatedBy:u(),lastReadAt:a().nullable()}),V_=C(u().min(1)).max(512),H_={name:`keychain`,scope:`system`,mode:`singleton`,internal:!0,methods:{put:L(f({ref:u().min(1),value:u().min(1)}),f({ref:u(),version:a().int()}),{kind:`mutation`,auth:`admin`}),resolve:L(f({refs:V_}),z_,{auth:`admin`}),delete:L(f({refs:V_}),f({deleted:a().int()}),{kind:`mutation`,auth:`admin`}),listMeta:L(f({}),C(B_).readonly(),{auth:`admin`}),getState:L(f({}),L_,{auth:`admin`})}},U_=S([`config-file`,`previous-config-file`,`platform`,`default-file`]),W_=f({kind:U_,path:u().optional(),sharesBackupWithDatabase:w()}),G_=f({keychain:L_,keySource:W_.nullable(),configuredSource:W_,fingerprint:u().nullable(),activeKeyId:u().nullable(),rotationPending:w(),retiredWraps:a().int(),recoveryKeyDownloadedAt:a().nullable(),secretCount:a().int()}),K_=S([`in-use`,`orphan`,`unknown`]),q_=B_.extend({usage:K_}),J_=S([`put`,`delete`,`reveal`,`rotate-master-key`,`purge-retired-keys`,`download-recovery-key`,`delete-orphans`,`reset`,`initialize`]),Y_=f({id:u(),at:a(),action:J_,actor:u(),ref:u().nullable(),detail:u().nullable()}),X_=`RESET KEYCHAIN`,Z_=S([`jwt-signing-key`]),Q_={name:`keychain-admin`,scope:`system`,mode:`singleton`,methods:{status:L(f({}),G_,{auth:`admin`}),listSecrets:L(f({}),C(q_).readonly(),{auth:`admin`}),listAudit:L(f({limit:a().int().min(1).max(500).optional()}),C(Y_).readonly(),{auth:`admin`}),reveal:L(f({ref:u().min(1)}),f({value:u(),version:a().int()}),{kind:`mutation`,auth:`admin`,caller:`required`}),setSystemSecret:L(f({name:Z_,value:u().min(16)}),f({ref:u(),version:a().int()}),{kind:`mutation`,auth:`admin`,caller:`required`}),deleteOrphans:L(f({refs:C(u().min(1)).max(1e3)}),f({deleted:C(u()).readonly(),kept:C(f({ref:u(),usage:K_})).readonly()}),{kind:`mutation`,auth:`admin`,caller:`required`}),rotateMasterKey:L(f({}),f({fingerprint:u(),keySource:W_}),{kind:`mutation`,auth:`admin`,caller:`required`}),purgeRetiredKeys:L(f({}),f({purged:a().int()}),{kind:`mutation`,auth:`admin`,caller:`required`}),downloadRecoveryKey:L(f({}),f({key:u(),fingerprint:u(),keySource:W_}),{kind:`mutation`,auth:`admin`,caller:`required`}),resetKeychain:L(f({confirm:h(X_)}),f({archivedCollection:u().nullable(),archived:a().int()}),{kind:`mutation`,auth:`admin`,caller:`required`})}},$_=[{value:`auto`,label:`Auto (defer to probed best)`},{value:`none`,label:`Off (software)`},{value:`videotoolbox`,label:`VideoToolbox (macOS)`},{value:`cuda`,label:`CUDA (NVIDIA)`},{value:`nvdec`,label:`NVDEC (NVIDIA legacy)`},{value:`vaapi`,label:`VAAPI (Linux Intel/AMD)`},{value:`qsv`,label:`QuickSync (Intel)`},{value:`d3d11va`,label:`D3D11VA (Windows)`},{value:`dxva2`,label:`DXVA2 (Windows legacy)`},{value:`amf`,label:`AMF (AMD)`},{value:`vdpau`,label:`VDPAU (Linux NVIDIA legacy)`},{value:`drm`,label:`DRM (Linux generic)`}],ev={hwaccel:`auto`,probedBestHwaccel:``},tv={name:`decoder`,scope:`system`,mode:`singleton`,preferredProvider:`decoder-nodeav`,methods:{getInfo:L(y(),f({id:u(),name:u(),hwaccel:u().optional(),probedBestHwaccel:u().optional()})),reprobeHwaccel:L(y(),f({backend:u()}),{kind:`mutation`,auth:`admin`})}},nv={name:`detection-pipeline`,scope:`device`,mode:`singleton`,kind:`wrapper`,defaultActive:!0,deviceTypes:[R.Camera],exposesDeviceSettings:!0,methods:{}},rv=S([`device`,`integration`]),iv=f({url:u(),label:u(),target:rv,host:u()}),av={name:`device-admin-link`,scope:`device`,deviceNative:!0,mode:`singleton`,methods:{getAdminLink:L(f({deviceId:a().int().nonnegative()}),iv.nullable(),{auth:`admin`})}},ov=[`password`,`passwd`,`pwd`,`pass`,`user`,`username`,`usr`,`login`,`token`,`access_token`,`auth`,`authorization`,`apikey`,`api_key`,`secret`,`credential`,`credentials`,`session`,`sessionid`,`key`],sv=/[a-z][a-z0-9+.-]*:\/\/[^/\s:@'"]+:[^/\s:@'"]+@/i,cv=/^[a-zA-Z0-9._-]+$/,lv=/^\[[0-9a-fA-F:.]+\]$/;function uv(e){return e===`https`?443:80}function dv(e){let t=e.host.trim();if(t.length===0)return{ok:!1,reason:`empty-host`};if(t.includes(`@`))return{ok:!1,reason:`host-carries-userinfo`};if(!cv.test(t)&&!lv.test(t))return{ok:!1,reason:`host-not-plain`};if(e.port!==null&&(!Number.isInteger(e.port)||e.port<1||e.port>65535))return{ok:!1,reason:`port-out-of-range`};if(!e.path.startsWith(`/`))return{ok:!1,reason:`path-not-absolute`};let n=e.query??{};for(let e of Object.keys(n))if(ov.includes(e.toLowerCase()))return{ok:!1,reason:`credential-query-key`};let r=e.port===null||e.port===uv(e.scheme)?t:`${t}:${String(e.port)}`,i=new URLSearchParams;for(let[e,t]of Object.entries(n))i.append(e,t);let a=i.size>0?`?${i.toString()}`:``,o=`${e.scheme}://${r}${e.path}${a}`;return sv.test(o)?{ok:!1,reason:`userinfo-in-result`}:{ok:!0,url:o}}function fv(e){let t=e.trim();if(t.length===0)return{ok:!1,reason:`empty`};let n;try{n=new URL(t)}catch{return{ok:!1,reason:`unparseable`}}if(n.username!==``||n.password!==``)return{ok:!1,reason:`base-carries-userinfo`};if(n.protocol!==`http:`&&n.protocol!==`https:`)return{ok:!1,reason:`scheme-not-http`};let r=n.protocol===`https:`?`https`:`http`,i=n.port===``?null:Number(n.port),a=n.pathname===`/`?``:n.pathname.replace(/\/+$/,``);return{ok:!0,host:n.hostname,port:i,scheme:r,basePath:a}}var pv=f({id:u(),system:u(),uniqueId:u().optional(),raw:b(u(),s()).optional()});function mv(e){return{id:e.stableId,system:e.addonId}}function hv(e,t){let n={...e};for(let[r,i]of Object.entries(t))if(i!==void 0){if(r===`raw`&&typeof i==`object`&&i){n.raw={...e.raw,...i};continue}n[r]=i}return n}function gv(e){if(e==null)return;let t=e.trim();if(t===``)return;let n=t.toLowerCase();return n===`°c`||n===`c`||n===`celsius`?`°C`:n===`°f`||n===`f`||n===`fahrenheit`?`°F`:n===`k`||n===`kelvin`?`K`:n===`%`||n===`percent`||n===`percentage`?`%`:n===`lx`||n===`lux`?`lx`:n===`hpa`||n===`hectopascal`?`hPa`:n===`kpa`?`kPa`:n===`pa`?`Pa`:n===`mbar`||n===`millibar`?`mbar`:n===`w`||n===`watt`?`W`:n===`kw`||n===`kilowatt`?`kW`:n===`wh`||n===`watt-hour`?`Wh`:n===`kwh`||n===`kilowatt-hour`?`kWh`:n===`v`||n===`volt`?`V`:n===`a`||n===`amp`||n===`ampere`?`A`:n===`ma`||n===`milliampere`?`mA`:n===`va`?`VA`:n===`ppm`?`ppm`:n===`ppb`?`ppb`:n===`µg/m³`||n===`ug/m3`||n===`µg/m3`?`µg/m³`:n===`km/h`||n===`kph`?`km/h`:n===`mph`?`mph`:n===`m/s`?`m/s`:n===`m`?`m`:n===`km`?`km`:n===`kg`?`kg`:n===`g`?`g`:t}var _v=`sourceInfo`;function vv(e){if(!e)return null;let t=e[_v];if(!t)return null;let n=pv.safeParse(t);return n.success?n.data:null}var yv=S([`online`,`sleeping`,`offline`,`unknown`]),bv=pe(()=>f({childNativeId:u(),name:u(),type:S(R),status:yv,metadata:f({model:u().optional(),serialNumber:u().optional(),uid:u().optional(),rtspChannel:a().int().nonnegative().optional(),isBattery:w().optional(),isDoorbell:w().optional(),isMultifocal:w().optional(),externalLocation:u().optional(),manufacturer:u().optional(),integration:u().optional()}).default({}),alreadyAdopted:w(),adoptedDeviceId:a().int().nonnegative().nullable(),capabilities:C(u()).readonly().optional(),features:C(u()).readonly().optional(),sourceInfo:pv.optional(),children:C(bv).readonly().optional()})),xv=f({discovered:C(bv),lastDiscoveryAt:a().int().nonnegative().nullable(),lastError:u().nullable()}),Sv={name:`device-discovery`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[R.Hub],status:{schema:xv,kind:`poll`},runtimeState:xv.extend({lastFetchedAt:a().int().nonnegative()}),durability:`session`,methods:{listDiscovered:L(f({deviceId:a().int().nonnegative()}),C(bv).readonly()),refreshDiscovery:L(f({deviceId:a().int().nonnegative()}),C(bv).readonly(),{kind:`mutation`,auth:`admin`}),adoptDevice:L(f({deviceId:a().int().nonnegative(),childNativeId:u(),name:u().optional()}),f({deviceId:a().int().nonnegative(),stableId:u()}),{kind:`mutation`,auth:`admin`}),releaseDevice:L(f({deviceId:a().int().nonnegative(),childDeviceId:a().int().nonnegative()}),y(),{kind:`mutation`,auth:`admin`})}},Cv=f({id:u(),label:u(),isDefault:w().optional()}),wv=f({search:u().optional(),area:u().optional(),manufacturer:u().optional(),adoptedOnly:w().optional(),unadoptedOnly:w().optional()}),Tv=f({integrationId:u(),page:a().int().positive().default(1),pageSize:a().int().positive().max(2e4).default(50),filter:u().optional(),filterText:wv.optional()}),Ev=f({candidates:C(bv).readonly(),totalCount:a().int().nonnegative(),page:a().int().positive(),pageSize:a().int().positive()}),Dv=f({integrationId:u(),childNativeId:u()}),Ov=f({lastDiscoveryAt:a().int().nonnegative().nullable(),candidateCount:a().int().nonnegative(),adoptedCount:a().int().nonnegative(),lastError:u().nullable()}),kv=f({name:u().min(1).optional(),hiddenChildIds:C(u()).optional()}),Av=f({integrationId:u(),childNativeIds:C(u()).min(1),filter:u().optional(),importLocations:w().optional(),perCandidate:b(u(),kv).optional()}),jv=f({adopted:C(f({childNativeId:u(),parentDeviceId:a().int().nonnegative(),accessoryDeviceIds:C(a().int().nonnegative()).readonly()})).readonly()}),Mv=f({integrationId:u(),camDeviceId:a().int().nonnegative()}),Nv=f({camDeviceId:a().int().nonnegative(),resetToSource:w().optional()}),Pv=f({changed:w(),rebuiltChildren:a().int().nonnegative(),removedChildren:a().int().nonnegative().optional()}),Fv={name:`device-adoption`,scope:`system`,mode:`singleton`,status:{schema:Ov,kind:`poll`},methods:{listCandidateFilters:L(f({integrationId:u()}),f({filters:C(Cv)}),{auth:`admin`}),listCandidates:L(Tv,Ev,{auth:`admin`}),getCandidate:L(Dv,bv.nullable(),{auth:`admin`}),refresh:L(f({integrationId:u()}),Ov,{kind:`mutation`,auth:`admin`}),adopt:L(Av,jv,{kind:`mutation`,auth:`admin`}),release:L(Mv,y(),{kind:`mutation`,auth:`admin`}),resync:L(Nv,Pv,{kind:`mutation`,auth:`admin`})}},Iv=S([`unlinked`,`linked`,`error`]),Lv=f({label:u(),value:u(),secret:w().optional()}),Rv=f({qr:u().optional(),fields:C(Lv).readonly().optional(),note:u().optional()}),zv=f({linkState:Iv,exposedDeviceCount:a(),error:u().optional(),setup:Rv.optional()}),Bv=u(),Vv=f({deviceId:u(),exposedAs:u().optional(),capabilities:C(u()).optional()}),Hv=f({deviceId:u(),capabilities:C(u()).optional()}),Uv=f({deviceId:u()}),Wv={name:`device-export`,scope:`system`,mode:`collection`,providerKind:`device-export`,status:{schema:zv,kind:`poll`},exposesDeviceSettings:!0,methods:{getStatus:L(y(),zv),listSupportedDeviceKinds:L(y(),C(Bv)),listExposedDevices:L(y(),C(Vv)),exposeDevice:L(Hv,y(),{kind:`mutation`,auth:`admin`}),unexposeDevice:L(Uv,y(),{kind:`mutation`,auth:`admin`})}},Gv=[`map-pin`,`house`,`door-open`,`sofa`,`utensils`,`bed-double`,`bath`,`briefcase`,`car`,`circle-parking`,`route`,`trees`,`umbrella`,`waves-ladder`,`fence`,`package`,`warehouse`,`store`,`sun`,`radar`],Kv=`map-pin`,qv=S(Gv),Jv=f({locationKey:u(),icon:qv});function Yv(e){return e.trim().toLowerCase()}function Xv(e){let t=qv.safeParse(e);return t.success?t.data:Kv}var Zv=f({locationKey:u(),description:u()}),Qv=f({zoneKey:u(),label:u(),icon:qv.nullable(),locationKeys:C(u())});function $v(e){return e.trim().toLowerCase()}var ey=f({connected:w(),deviceCount:a(),error:u().optional(),motionSliceWriter:h(`orchestrator`).optional()}),ty=f({externalId:u(),name:u(),type:u(),metadata:b(u(),s()).optional()}),ny=f({stableId:u(),type:S(R),suggestedName:u(),prefilledConfig:b(u(),s()),sourceInfo:pv.optional(),alreadyOnboarded:w().optional(),onboardedDeviceId:a().optional(),onboardedName:u().optional()}),ry=f({id:a(),stableId:u(),addonId:u(),type:u(),name:u(),parentDeviceId:a().nullable(),online:w(),features:C(u()),config:b(u(),s()),sourceInfo:pv.optional()}),iy=f({status:S([`ok`,`error`]),labels:C(u()).optional(),error:u().optional()}),ay=s(),oy={name:`device-provider`,scope:`system`,mode:`collection`,methods:{start:L(y(),y(),{kind:`mutation`}),stop:L(y(),y(),{kind:`mutation`}),getStatus:L(y(),ey),getDevices:L(y(),C(f({id:u(),name:u(),type:u()}))),reloadDevice:L(f({stableId:u()}),f({deviceId:a()}),{kind:`mutation`,timeoutMs:3*6e4}),supportsDiscovery:L(f({}),w()),discoverDevices:L(f({params:b(u(),s()).optional()}),C(ny),{kind:`mutation`,auth:`admin`}),getDiscoveryParamsSchema:L(f({}),ay),getManualCreationType:L(f({}),f({deviceType:S(R).nullable()})),adoptDiscoveredDevice:L(f({candidate:ny}),ry,{kind:`mutation`,auth:`admin`}),supportsManualCreation:L(f({}),w()),getChildCreationSchema:L(f({type:S(R)}),ay),createDevice:L(f({type:S(R),config:b(u(),s())}),ry,{kind:`mutation`,auth:`admin`}),testCreationField:L(f({type:S(R),key:u(),value:s(),formValues:b(u(),s()).optional()}),iy,{kind:`mutation`,auth:`admin`})}},sy=f({childKey:u(),section:u(),order:a().optional(),collapsed:w().optional()}),cy=f({unit:u().min(1).optional(),precision:a().int().min(0).max(10).optional()}),ly=f({icon:u().min(1).optional(),label:u().min(1).optional(),unit:u().min(1).optional(),precision:a().int().min(0).max(10).optional(),hidden:w().optional(),perCap:b(u(),cy).optional()}),uy=f({unit:u().min(1).optional(),precision:a().int().min(0).max(10).optional(),icon:u().min(1).optional()}),dy=f({id:a(),stableId:u(),addonId:u(),type:S(R),name:u(),location:u().nullable(),disabled:w(),parentDeviceId:a().nullable(),role:u().nullable().optional(),online:w(),probed:w().optional(),features:C(u()),isCamera:w(),config:b(u(),s()),secretConfigPaths:C(u()).optional(),metadata:b(u(),s()).nullable().optional(),sourceInfo:pv.optional(),integrationId:u().optional(),linkDeviceId:a().nullable().optional(),primaryChildEntityId:u().nullable().optional(),childLayout:C(sy).readonly().optional(),display:ly.optional()}),fy=f({key:u(),value:s(),description:u().optional()}),py=S([`manual`]),my=f({deviceId:a(),name:u(),location:u().nullable(),features:C(u()),producesTrackedEvents:w().optional()}),hy=f({deviceIds:C(a().int().positive()),trackedDeviceIds:C(a().int().positive()).optional()}),gy={id:`linked-devices`,label:`Linked devices`,description:`Companion devices of this camera: their controls appear with it, and the ones you opt in produce tracked events on it.`,shape:`association`,hostDeviceTypes:[R.Camera],sourceCaps:`any`,cardinality:`many`,value:hy},_y=f({deviceId:a(),mode:py,devices:C(my)}),vy=f({deviceId:a(),entries:C(f({capName:u(),kind:S([`native`,`wrapped`]),providerAddonId:u(),providerNodeId:u(),nativeAddonId:u()}))}),yy=m(`kind`,[f({kind:h(`value`),wrapperAddonId:u().nullable()}),f({kind:h(`missing`)}),f({kind:h(`failed`),error:u()})]),by=f({id:a(),stableId:u(),type:u(),name:u(),location:u().nullable(),disabled:w(),parentDeviceId:a().nullable(),role:u().nullable().optional()}),xy=f({id:a(),stableId:u(),addonId:u(),type:u(),name:u(),userNamed:w().optional(),location:u().nullable(),disabled:w(),parentDeviceId:a().nullable(),metadata:b(u(),s()).nullable().optional(),sourceInfo:pv.optional(),integrationId:u().optional(),linkDeviceId:a().nullable().optional(),primaryChildEntityId:u().nullable().optional(),childLayout:C(sy).readonly().optional(),role:u().nullable().optional(),display:ly.optional()}),Sy=s().nullable(),Cy=f({streamId:u(),width:a().optional(),height:a().optional(),codec:u().optional(),fps:a().optional(),bitrateKbps:a().optional()}),wy=f({addonId:u(),stableId:u(),id:a(),type:u(),name:u(),location:u().nullable().optional(),disabled:w().optional(),parentDeviceId:a().nullable(),role:u().nullable().optional(),features:C(u()).optional(),config:b(u(),s()),secretConfigPaths:C(u()).optional()}),Ty=f({deviceId:a()}),Ey=f({deviceId:a(),data:b(u(),s()),secretConfigPaths:C(u()).optional()}),Dy=S([`off`,`on`,`not-offered`,`unreachable`]),Oy=f({deviceId:a(),switchId:ni,outcome:Dy,detail:u().optional()}),ky=f({sourceId:a(),targetId:a(),switches:C(Oy).readonly(),sourceStillLive:C(ni).readonly(),swapped:w()}),Ay={name:`device-manager`,scope:`system`,mode:`singleton`,extensionSlots:[gy],methods:{allocateDeviceId:L(f({addonId:u(),stableId:u()}),f({id:a()}),{kind:`mutation`}),migrateDevice:L(f({sourceId:a(),targetId:a()}),ky,{kind:`mutation`,auth:`admin`,timeoutMs:12*6e4}),registerDevice:L(wy,y(),{kind:`mutation`}),removeDevice:L(Ty,y(),{kind:`mutation`}),persistConfig:L(Ey,y(),{kind:`mutation`,auth:`admin`}),loadConfig:L(f({deviceId:a()}),b(u(),s()),{auth:`admin`}),loadRuntimeState:L(f({deviceId:a()}),b(u(),s()),{auth:`admin`}),loadMeta:L(f({deviceId:a()}),xy.nullable()),setName:L(f({deviceId:a(),name:u()}),y(),{kind:`mutation`,auth:`admin`}),setLocation:L(f({deviceId:a(),location:u().nullable()}),y(),{kind:`mutation`,auth:`admin`}),setType:L(f({deviceId:a(),type:S(R)}),y(),{kind:`mutation`,auth:`admin`}),setIntegrationId:L(f({deviceId:a(),integrationId:u()}),y(),{kind:`mutation`,auth:`admin`}),setLinkDeviceId:L(f({deviceId:a(),linkDeviceId:a().nullable()}),y(),{kind:`mutation`,auth:`admin`}),setPrimaryChildEntityId:L(f({deviceId:a(),primaryChildEntityId:u().nullable()}),y(),{kind:`mutation`,auth:`admin`}),setChildLayout:L(f({deviceId:a(),childLayout:C(sy).readonly()}),y(),{kind:`mutation`,auth:`admin`}),setDisplay:L(f({deviceId:a(),display:ly.nullable()}),y(),{kind:`mutation`,auth:`admin`}),getRoleDisplayDefaults:L(f({}),f({defaults:b(u(),uy)}),{kind:`query`}),setRoleDisplayDefaults:L(f({defaults:b(u(),uy)}),y(),{kind:`mutation`,auth:`admin`}),getWireableFields:L(f({deviceId:a(),includeSynthesizable:w().optional()}),f({caps:C(f({cap:u(),fields:C(f({path:u(),kind:S([`string`,`number`,`boolean`,`enum`]),enumValues:C(u()).optional(),item:w().optional()})).readonly(),itemArray:f({path:u(),keyField:u()}).optional()})).readonly()}),{kind:`query`}),setRole:L(f({deviceId:a(),role:u().nullable()}),y(),{kind:`mutation`,auth:`admin`}),applyInitialMeta:L(f({deviceId:a(),name:u().optional(),location:u().nullable().optional(),type:S(R).optional(),integrationId:u().optional(),linkDeviceId:a().nullable().optional(),role:u().nullable().optional()}),y(),{kind:`mutation`,auth:`admin`}),setMetadata:L(f({deviceId:a(),patch:b(u(),s())}),y(),{kind:`mutation`,auth:`admin`}),listLocations:L(y(),C(u())),addLocation:L(f({name:u()}),y(),{kind:`mutation`,auth:`admin`}),removeLocation:L(f({name:u(),cascade:w().optional()}),y(),{kind:`mutation`,auth:`admin`}),renameLocation:L(f({from:u(),to:u()}),f({moved:a()}),{kind:`mutation`,auth:`admin`}),listLocationIcons:L(y(),C(Jv)),setLocationIcon:L(f({location:u(),icon:qv.nullable()}),y(),{kind:`mutation`,auth:`admin`}),listLocationDescriptions:L(y(),C(Zv)),setLocationDescription:L(f({location:u(),description:u().max(400).nullable()}),y(),{kind:`mutation`,auth:`admin`}),listSiteZones:L(y(),C(Qv)),setSiteZone:L(f({name:u(),icon:qv.nullable().optional()}),y(),{kind:`mutation`,auth:`admin`}),removeSiteZone:L(f({name:u()}),y(),{kind:`mutation`,auth:`admin`}),renameSiteZone:L(f({from:u(),to:u()}),y(),{kind:`mutation`,auth:`admin`}),setLocationZone:L(f({location:u(),zone:u().nullable()}),y(),{kind:`mutation`,auth:`admin`}),setDisabled:L(f({deviceId:a(),disabled:w()}),y(),{kind:`mutation`,auth:`admin`}),listPersistedByAddon:L(f({addonId:u()}),C(by)),listAll:L(f({addonId:u().optional(),projection:S([`full`,`slim`]).optional(),isCamera:w().optional(),deviceIds:C(a()).optional()}),C(dy)),getDevice:L(f({deviceId:a()}),dy.nullable()),getChildren:L(f({parentDeviceId:a()}),C(dy)),getChildrenBatch:L(f({parentDeviceIds:C(a()).max(256)}),b(u(),C(dy))),getLinkedDevices:L(f({deviceId:a()}),f({mode:py,devices:C(my)})),getLinkedDevicesBatch:L(f({deviceIds:C(a())}),C(_y)),getStreamSources:L(f({deviceId:a()}),C(Na)),getConfigSchema:L(f({deviceId:a()}),C(fy)),getSettingsSchema:L(f({deviceId:a()}),Sy),updateConfig:L(f({deviceId:a(),values:b(u(),s())}),f({success:h(!0)}),{kind:`mutation`,auth:`admin`}),enable:L(f({deviceId:a()}),f({success:h(!0)}),{kind:`mutation`,auth:`admin`}),disable:L(f({deviceId:a()}),f({success:h(!0)}),{kind:`mutation`,auth:`admin`}),remove:L(f({deviceId:a()}),f({success:h(!0)}),{kind:`mutation`,auth:`admin`}),removeByIntegration:L(f({integrationId:u()}),f({removed:a()}),{kind:`mutation`,auth:`admin`}),getStreamProfileMap:L(f({deviceId:a()}),b(u(),u().nullable())),setStreamProfileMap:L(f({deviceId:a(),profileMap:b(u(),u().nullable())}),f({success:h(!0)}),{kind:`mutation`,auth:`admin`}),probeStreams:L(f({deviceId:a()}),C(Cy),{kind:`mutation`,auth:`admin`}),getBindings:L(f({deviceId:a()}),vy),getBindingsBatch:L(f({deviceIds:C(a())}),C(vy)),getAllBindings:L(f({}),C(vy)),listDeviceIdsByCaps:L(f({capNames:C(u().min(1)).min(1).max(16)}),C(a())),setWrapperActive:L(f({deviceId:a(),capName:u(),wrapperAddonId:u(),active:w()}),y(),{kind:`mutation`,auth:`admin`}),getWrapperActivation:L(f({deviceId:a(),capName:u().min(1)}),yy),listWrappersForCap:L(f({capName:u()}),C(u())),listBindableCapsForDeviceType:L(f({deviceType:u()}),C(f({capName:u(),wrappers:C(u())}))),getDeviceSettingsAggregate:L(f({deviceId:a()}),Jd.nullable()),getDeviceLiveInfoAggregate:L(f({deviceId:a()}),Jd.nullable()),getDeviceAggregate:L(f({deviceId:a()}),f({settings:Jd.nullable(),live:Jd.nullable()})),runDeviceAction:L(f({deviceId:a().int().nonnegative(),action:u().min(1),input:s()}),s(),{kind:`mutation`}),updateDeviceField:L(f({deviceId:a(),writerCapName:u(),writerAddonId:u(),key:u(),value:s()}),f({success:h(!0)}),{kind:`mutation`,auth:`admin`}),updateDeviceFieldsBatch:L(f({deviceId:a(),changes:C(f({writerCapName:u(),writerAddonId:u(),key:u(),value:s()}))}),f({success:h(!0),failures:C(f({writerCapName:u(),writerAddonId:u(),error:u()}))}),{kind:`mutation`,auth:`admin`}),discoverDevices:L(f({addonId:u()}),C(ny),{kind:`mutation`,auth:`admin`}),adoptDevice:L(f({addonId:u(),candidate:ny,integrationId:u().optional()}),ry,{kind:`mutation`,auth:`admin`}),getCreationSchema:L(f({addonId:u(),type:S(R)}),s().nullable()),createDevice:L(f({addonId:u(),type:S(R),config:b(u(),s()),integrationId:u().optional()}),ry,{kind:`mutation`,auth:`admin`}),testCreationField:L(f({addonId:u(),type:S(R),key:u(),value:s(),formValues:b(u(),s()).optional()}),iy,{kind:`mutation`,auth:`admin`}),adoptionListCandidateFilters:L(f({addonId:u(),integrationId:u()}),f({filters:C(Cv)}),{auth:`admin`}),adoptionListCandidates:L(Tv.extend({addonId:u()}),Ev,{auth:`admin`}),adoptionRefresh:L(f({addonId:u(),integrationId:u()}),Ov,{kind:`mutation`,auth:`admin`}),adoptionAdopt:L(Av.extend({addonId:u()}),jv,{kind:`mutation`,auth:`admin`}),adoptionRelease:L(Mv.extend({addonId:u()}),y(),{kind:`mutation`,auth:`admin`}),adoptionStartJob:L(Av.extend({addonId:u()}),f({jobId:u()}),{kind:`mutation`,auth:`admin`}),adoptionListJobs:L(f({addonId:u(),integrationId:u().optional()}),C(ei).readonly(),{auth:`admin`}),adoptionCancelJob:L(f({jobId:u()}),f({cancelled:w()}),{kind:`mutation`,auth:`admin`}),adoptionResync:L(Nv,Pv,{kind:`mutation`,auth:`admin`}),discoveryProviders:L(f({}),f({providers:C(f({addonId:u(),label:u()})).readonly()}),{auth:`admin`}),discoverAllProviders:L(f({}),f({groups:C(f({addonId:u(),label:u(),candidates:C(ny).readonly(),error:u().nullable()})).readonly()}),{kind:`mutation`,auth:`admin`}),discoverProvider:L(f({addonId:u(),params:b(u(),s()).optional()}),f({candidates:C(ny).readonly()}),{kind:`mutation`,auth:`admin`}),providerCreationType:L(f({addonId:u()}),f({deviceType:S(R).nullable()}),{auth:`admin`}),providerDiscoveryParamsSchema:L(f({addonId:u()}),s(),{auth:`admin`}),testField:L(f({deviceId:a(),key:u(),value:s()}),iy,{kind:`mutation`,auth:`admin`}),getDeviceStatusAggregate:L(f({deviceId:a(),caps:C(u()).readonly().optional()}),b(u(),s().nullable())),getDeviceStatusAggregateBatch:L(f({deviceIds:C(a()).readonly(),caps:C(u()).readonly().optional()}),b(u(),b(u(),s().nullable())))}},jy=[`linked-devices`],My=S(jy),Ny={"linked-devices":{descriptor:gy,declaringCap:`device-manager`,hostDeviceTypes:[R.Camera]}},Py=m(`slot`,[hy.extend({slot:h(`linked-devices`)})]),Fy=[R.Camera],Iy=`listSlots`,Ly=m(`state`,[f({state:h(`ok`)}),f({state:h(`unreachable`),reason:u()})]),Ry=f({source:u(),label:u(),addonId:u().optional(),availability:Ly}),zy=S([`ok`,`missing`,`foreign`,`unavailable`]),By=f({deviceId:a().int(),name:u().nullable(),health:zy,detail:u().optional()}),Vy=f({state:S([`active`,`inactive`,`unknown`]),authority:u(),detail:u().optional()}),Hy=f({state:h(`ok`),slotRef:u(),slot:My,authority:u(),activation:Vy.nullable(),value:Py,sources:C(By),impliedSources:C(By).optional()}),Uy=f({state:h(`unreachable`),addonId:u(),reason:u()}),Wy=m(`state`,[Hy,Uy]);function Gy(e,t){return{state:`unreachable`,addonId:e,reason:t}}var Ky=f({deviceId:a().int(),name:u(),type:u(),location:u().nullable(),parentName:u().nullable(),suggested:w(),reason:u().nullable()}),qy=f({candidates:C(Ky)}),Jy=f({applied:h(!0),reload:S([`none`,`host`,`parent`])}),Yy=f({deviceId:a().int(),slotRef:u().min(1)}),Xy=Yy.extend({value:Py}),Zy={name:`device-extension`,scope:`device`,mode:`collection`,kind:`wrapper`,defaultActive:!0,deviceTypes:Fy,deviceConfig:{ui:{kind:`widget`,widgetId:`host/extensions-panel`,tab:`general`,label:`Extensions`,order:72}},methods:{listSources:L(f({deviceId:a().int()}),C(Ry)),listSlots:L(f({deviceId:a().int()}),C(Wy)),listCandidates:L(Yy,qy),setSlot:L(Xy,Jy,{kind:`mutation`,auth:`admin`})}},Qy=S([`replace`,`add`]),$y=m(`ok`,[f({ok:h(!0),changed:w()}),f({ok:h(!1),code:S([`owned-by-other`,`not-claimed`,`field-not-claimed`,`invalid-slice`,`unknown-device`,`row-unreadable`,`migration-in-flight`]),message:u()})]),eb=f({deviceId:a(),capName:u(),owner:u().min(1),mode:Qy,fields:C(u().min(1)).min(1)}),tb=m(`state`,[f({state:h(`loaded`),claims:C(eb)}),f({state:h(`not-loaded`),reason:u()})]),nb={name:`device-state`,scope:`system`,mode:`singleton`,methods:{getSnapshot:L(f({deviceId:a()}),b(u(),b(u(),s()))),getCapSlice:L(f({deviceId:a(),capName:u()}),b(u(),s()).nullable()),getAllSnapshots:L(f({}),b(u(),b(u(),b(u(),s())))),setCapSlice:L(f({deviceId:a(),capName:u(),slice:b(u(),s())}),y(),{kind:`mutation`}),claimFields:L(f({deviceId:a(),capName:u(),owner:u().min(1),mode:Qy,fields:C(u().min(1)).min(1),values:b(u(),s())}),$y,{kind:`mutation`,auth:`admin`}),patchOwnedFields:L(f({deviceId:a(),capName:u(),owner:u().min(1),values:b(u(),s())}),$y,{kind:`mutation`,auth:`admin`}),releaseClaim:L(f({deviceId:a(),capName:u(),owner:u().min(1)}),$y,{kind:`mutation`,auth:`admin`}),listClaims:L(f({ownerPrefix:u().optional()}),tb,{auth:`admin`}),getNativeCapSlice:L(f({deviceId:a(),capName:u()}),b(u(),s()).nullable(),{auth:`admin`})},events:{onChanged:Fd(f({deviceId:a(),capName:u(),slice:b(u(),s())}))}},rb=f({embedding:C(a()),inferenceMs:a()}),ib=S([`image`,`text`]),ab=f({modelId:u(),tower:ib,nodeId:u(),crashes:a(),windowMs:a(),sinceMs:a(),lastReason:u()}),ob=f({modelId:u(),tower:ib,nodeId:u(),attempts:a(),sinceMs:a(),lastReason:u()}),sb=f({modelId:u(),embeddingDim:a(),ready:w(),nodeId:u().optional(),failedModels:C(ab).optional(),failedRequirements:C(ob).optional()}),cb=`embedding-model-failed`,lb=`embedding-requirements-unavailable`,ub=`embedding-requirements-failed`,db=S([cb,lb,ub]);function fb(e,t){return`[${e} model=${t.modelId} tower=${t.tower} node=${t.nodeId}]`}function pb(e){return Error(`${fb(cb,e)} ${e.modelId} (${e.tower} tower) crashed ${String(e.crashes)} times in ${String(Math.round(e.windowMs/1e3))}s on ${e.nodeId} — ${e.lastReason}. Cleared by embeddingEncoder.resetFailedModels({ modelId: "${e.modelId}", nodeId: "${e.nodeId}" }) or a model change.`)}function mb(e,t){return Error(`${fb(lb,e)} ${e.modelId} (${e.tower} tower) on ${e.nodeId}: ${t}`)}function hb(e){return Error(`${fb(ub,e)} ${e.modelId} (${e.tower} tower) on ${e.nodeId}: requirements can never be met — ${String(e.attempts)} attempts, last: ${e.lastReason}. Cleared by embeddingEncoder.resetFailedModels({ modelId: "${e.modelId}", nodeId: "${e.nodeId}" }) or a model change.`)}var gb=RegExp(`\\[(${cb}|${lb}|${ub}) model=([^\\s\\]]+) tower=(image|text) node=([^\\s\\]]+)\\]`);function _b(e){let t=e instanceof Error?e.message:String(e),n=gb.exec(t);if(n===null)return null;let r=db.safeParse(n[1]),i=ib.safeParse(n[3]);return!r.success||!i.success||n[2]===void 0||n[4]===void 0?null:{code:r.data,modelId:n[2],tower:i.data,nodeId:n[4]}}function vb(e){return yb(e)!==null}function yb(e){let t=_b(e);if(t===null||t.code!==`embedding-model-failed`)return null;let{modelId:n,tower:r,nodeId:i}=t;return{modelId:n,tower:r,nodeId:i}}var bb={name:`embedding-encoder`,scope:`system`,mode:`collection`,internal:!0,methods:{encode:L(f({crop:x(Uint8Array),width:a(),height:a()}),rb,{auth:`admin`}),encodeText:L(f({text:u(),modelId:u().min(1).optional()}),rb,{auth:`admin`}),getInfo:L(y(),sb,{auth:`admin`}),resetFailedModels:L(f({modelId:u().min(1).optional()}),f({cleared:C(u()),nodeId:u()}),{kind:`mutation`,auth:`admin`})}},xb=f({reason:u(),count:a().int().nonnegative()}),Sb=f({family:u(),deviceId:a().int().positive(),variant:u().optional(),sinceMs:a(),atMs:a(),attempts:a().int().nonnegative(),succeeded:a().int().nonnegative(),reasons:C(xb).readonly()}),Cb={name:`failure-contribution`,scope:`system`,mode:`collection`,internal:!0,methods:{list:L(y(),C(Sb).readonly())},mount:{kind:`skip`}},wb=f({name:u(),path:u()}),Tb=f({path:u(),entries:C(wb).readonly(),freeBytes:a(),totalBytes:a()}),Eb={name:`filesystem-browse`,scope:`system`,mode:`singleton`,internal:!0,methods:{listAllowedRoots:L(y(),C(u()).readonly(),{auth:`admin`}),browse:L(f({path:u()}),Tb,{auth:`admin`}),createDir:L(f({path:u()}),f({path:u()}),{kind:`mutation`,auth:`admin`})}},Db=`https://camstack.zentik.app`,Ob=`/viewer/camstack`;function kb(e){if(e==null||e===``)return!1;try{return new URL(e).origin===Db}catch{return!1}}function Ab(e){let t=e.baseUrl??e.resolved;return kb(t)?{form:`app`,hubBaseUrl:e.appLinkHub??null}:{form:`hub`,hubBaseUrl:t}}function jb(e){let t;try{t=new URL(e)}catch{return null}return t.protocol!==`https:`&&t.protocol!==`http:`||t.username!==``||t.password!==``||t.hostname===``?null:t.origin}function Mb(e){let t=e=>e.kind!==`public`||!e.baseUrl.startsWith(`https://`)?null:e.interfaceKind===`public`?0:e.interfaceKind===`vpn`?1:null;return e.flatMap(e=>{let n=t(e),r=jb(e.baseUrl);return n===null||r===null?[]:[{r:n,p:e.priority,origin:r}]}).toSorted((e,t)=>e.r-t.r||e.p-t.p)[0]?.origin??null}function Nb(e){switch(e.kind){case`camera`:{if(!Number.isInteger(e.deviceId)||e.deviceId<=0)return null;let t=e.atMs;return{path:`/camera/${String(e.deviceId)}`,query:t!==void 0&&Number.isFinite(t)?[[`at`,String(Math.trunc(t))]]:[]}}case`events`:return{path:`/events`,query:[]};case`notifications`:return{path:`/notifications`,query:[]}}}function Pb(e){return e.length===0?``:`?${e.map(([e,t])=>`${encodeURIComponent(e)}=${encodeURIComponent(t)}`).join(`&`)}`}function Fb(e){let t=Nb(e.destination);if(t===null)return null;let n=e.base.hubBaseUrl,r=n===null?``:n.replace(/\/+$/,``);if(e.base.form===`app`){let e=r===``?null:jb(r),n=e===null?t.query:[...t.query,[`hub`,e]];return`${Db}${t.path}${Pb(n)}`}return r===``||kb(r)?null:`${r}${Ob}${t.path}${Pb(t.query)}`}var Ib=[`appConnections`,`notificationTaps`,`internal`,`publicEndpoint`],Lb=[`notificationTaps`,`internal`,`publicEndpoint`];function Rb(e){return e!==`appConnections`}var zb={appConnections:[],notificationTaps:null,internal:null,publicEndpoint:null},Bb=/^\d{1,3}(?:\.\d{1,3}){3}$/;function Vb(e){try{let t=new URL(e).hostname;return t.length>0?t:null}catch{return null}}function Hb(e){return e.replace(/\/+$/,``)}function Ub(e){return e.kind===`public`&&e.interfaceKind===`vpn`}function Wb(e){return e.kind===`public`&&e.interfaceKind===`public`}function Gb(e){return(e.kind===`lan-ipv4`||e.kind===`lan-ipv6`)&&e.plausible}function Kb(e){if(e.kind!==`lan-ipv4`||!e.plausible)return!1;let t=Vb(e.baseUrl);return t!==null&&Bb.test(t)}function qb(e,t){return t.kind===`loopback`||t.kind===`app-link`||t.kind===`custom`||Vb(t.baseUrl)===null?null:e===`internal`?Kb(t)?0:Gb(t)?1:Ub(t)?2:null:Wb(t)?0:Ub(t)?1:Kb(t)?2:Gb(t)?3:null}var Jb=new Set([`localhost`,`0.0.0.0`,`::1`,`[::1]`,`::`,`[::]`]);function Yb(e){let t=e.toLowerCase();return Jb.has(t)||t.endsWith(`.localhost`)?!0:/^127\.\d{1,3}\.\d{1,3}\.\d{1,3}$/.test(t)}function Xb(e){let t=e.trim();if(t===``)return{ok:!1,reason:`Enter an address, e.g. https://192.168.1.50:4443.`};let n;try{n=new URL(t)}catch{return{ok:!1,reason:`Not a URL — include http:// or https://.`}}return n.protocol!==`https:`&&n.protocol!==`http:`?{ok:!1,reason:`Use an http:// or https:// address.`}:n.username!==``||n.password!==``?{ok:!1,reason:`The address must not carry a user name or password.`}:n.hostname===``?{ok:!1,reason:`The address has no host.`}:Yb(n.hostname)?{ok:!1,reason:`A loopback address names whoever dials it, never this hub — use an address other machines reach.`}:n.pathname!==`/`||n.search!==``||n.hash!==``?{ok:!1,reason:`Enter only the address (scheme, host and port), without a path.`}:{ok:!0,baseUrl:n.origin}}var Zb=`The public endpoint needs an https:// address: passkeys and most identity providers refuse a plain-http origin. Accept http only when sign-in and notification links never leave your own network.`;function Qb(e,t,n={}){if(kb(t))return e===`notificationTaps`?{ok:!0,baseUrl:Db}:{ok:!1,reason:`The CamStack app link is not a hub address — only notification taps can use it.`};let r=Xb(t);return r.ok&&e===`publicEndpoint`&&r.baseUrl.startsWith(`http:`)&&n.acceptInsecureHttp!==!0?{ok:!1,reason:Zb}:r}function $b(e,t){if(t===null||t===``)return null;let n=Qb(e,t,{acceptInsecureHttp:!0});return n.ok?n.baseUrl:null}function ex(e,t){let n=e.flatMap(e=>{let n=qb(t,e);return n===null?[]:[{rank:n,priority:e.priority,endpoint:e}]}).toSorted((e,t)=>e.rank-t.rank||e.priority-t.priority)[0];return n===void 0?null:Hb(n.endpoint.baseUrl)}function tx(e,t,n){let r=$b(t,n);if(r!==null)return{flagged:r,resolved:r,source:`flagged`};let i=ex(e,t);return{flagged:null,resolved:i,source:i===null?`none`:`auto`}}function nx(e,t){return tx(e,`internal`,t.internal)}function rx(e,t){return tx(e,`publicEndpoint`,t.publicEndpoint)}function ix(e){let t=$b(`notificationTaps`,e.notificationTaps);return t!==null&&!kb(t)?{flagged:t,resolved:t,source:`flagged`}:{flagged:null,resolved:Db,source:`auto`}}function ax(e){return e.kind===`lan-ipv4`?!0:e.kind===`public`&&e.interfaceKind===`public`}function ox(e,t){let n=e.filter(ax);if(t.appConnections.length===0)return n;let r=new Set(t.appConnections),i=e.filter(e=>r.has(e.baseUrl));return i.length>0?i:n}function sx(e,t){let n=new Set(t.appConnections),r=ox(e,t),i=r.some(e=>n.has(e.baseUrl));return{flagged:t.appConnections,resolved:r.map(e=>e.baseUrl),source:r.length===0?`none`:i?`flagged`:`auto`}}function cx(e,t,n){return{appConnections:sx(e,n),notificationTaps:ix(n),internal:nx(t,n),publicEndpoint:rx(t,n)}}function lx(e){return e===null?null:Vb(e)}var ux=6e5,dx=60*6e4,fx=f({inputTokens:a(),outputTokens:a()}),px=S([`timeout`,`rate-limited`,`auth`,`refusal`,`bad-request`,`unavailable`,`no-profile`,`budget-exceeded`,`adapter-error`]),mx=f({ok:h(!0),text:u(),model:u(),usage:fx,truncated:w(),latencyMs:a()}),hx=S([`guardrail`,`model`]),gx=f({ok:h(!1),code:px,message:u(),retryAfterMs:a().optional(),refusalSource:hx.optional()}),_x=m(`ok`,[mx,gx]),vx=f({bytes:x(Uint8Array),mimeType:u()}),yx=f({enabled:w().default(!1),maxAttempts:a().int().min(1).max(5).default(1)}),bx={totalMs:6e4,connectMs:1e4,firstTokenMs:12e4,idleMs:6e4},xx=f({addonId:u().optional(),profileId:u().optional(),consumer:u(),system:u().optional(),prompt:u(),jsonSchema:b(u(),s()).optional(),maxTokens:a().int().positive().optional(),temperature:a().optional(),topP:a().min(0).max(1).optional(),topK:a().int().positive().optional(),timeoutMs:a().int().positive().optional(),retry:yx.optional(),requestId:u().optional()}),Sx=f({url:u(),filename:u(),sizeBytes:a(),sha256:u().optional()}),Cx=m(`kind`,[f({kind:h(`catalog`),catalogId:u()}),f({kind:h(`url`),url:u(),sha256:u().optional(),label:u().optional(),sizeBytes:a().optional(),extraFiles:C(Sx).optional()}),f({kind:h(`path`),path:u()})]),wx=f({nodeId:u(),engine:S([`llama-cpp`]),model:Cx,contextSize:a().int().default(4096),gpuLayers:a().int().default(0),threads:a().int().optional(),parallel:a().int().default(1),batchSize:a().int().positive().optional(),ubatchSize:a().int().positive().optional(),flashAttention:w().default(!1),mlock:w().default(!1),noMmap:w().default(!1),cacheTypeK:S([`f32`,`f16`,`q8_0`,`q5_1`,`q5_0`,`q4_1`,`q4_0`]).optional(),cacheTypeV:S([`f32`,`f16`,`q8_0`,`q5_1`,`q5_0`,`q4_1`,`q4_0`]).optional(),extraArgs:C(u()).default([]),autoStart:w().default(!1),idleStopMinutes:a().int().default(30)}),Tx=f({phase:S([`downloading`,`verifying`]),file:u(),fileIndex:a().int(),fileCount:a().int(),downloadedBytes:a(),totalBytes:a().optional()}),Ex=f({nodeId:u(),state:S([`stopped`,`downloading`,`starting`,`ready`,`crashed`,`failed`]),pid:a().optional(),port:a().optional(),modelPath:u().optional(),modelId:u().optional(),downloadProgress:a().min(0).max(1).optional(),download:Tx.optional(),lastError:u().optional(),crashesInWindow:a(),memoryBytes:a().optional(),vramBytes:a().optional()}),Dx=f({file:u(),sizeBytes:a(),catalogId:u().optional(),installedAt:a().optional(),path:u().optional()}),Ox=f({nodeId:u(),modelsBytes:a(),freeBytes:a().optional()}),kx=xx.extend({images:C(vx).optional(),runtime:wx,timeoutMs:a().int().positive().optional()}),Ax=S([`deviceNotEligible`,`appleIntelligenceNotEnabled`,`modelNotReady`,`osTooOld`,`helperMissing`,`helperCrashed`]),jx=m(`state`,[f({state:h(`available`),osVersion:u(),contextSize:a().int().positive(),languages:C(u()),imageInput:w()}),f({state:h(`unavailable`),reason:Ax,osVersion:u().nullable(),detail:u()}),f({state:h(`unsupported-platform`),platform:u()}),f({state:h(`unknown`),error:u()})]),Mx=xx.extend({images:C(vx).optional(),timeoutMs:a().int().positive().optional()}),Nx=f({requestId:u()}),Px={name:`llm-runtime`,scope:`system`,mode:`singleton`,internal:!0,methods:{complete:L(kx,_x,{kind:`mutation`,auth:`admin`,timeoutMs:ux}),ensureStarted:L(f({runtime:wx}),Ex,{kind:`mutation`,auth:`admin`,timeoutMs:ux}),stop:L(f({}),y(),{kind:`mutation`,auth:`admin`}),status:L(f({}),Ex,{auth:`admin`}),installModel:L(f({model:Cx}),y(),{kind:`mutation`,auth:`admin`,timeoutMs:dx}),deleteModel:L(f({file:u()}),y(),{kind:`mutation`,auth:`admin`}),listLocalModels:L(f({}),C(Dx),{auth:`admin`}),getDiskUsage:L(f({}),Ox,{auth:`admin`}),cancel:L(Nx,y(),{kind:`mutation`,auth:`admin`}),appleAvailability:L(f({}),jx,{auth:`admin`}),completeApple:L(Mx,_x,{kind:`mutation`,auth:`admin`,timeoutMs:ux})}},Fx=S([`openai-compatible`,`openai`,`anthropic`,`google`,`managed-local`,`apple-foundation`]),Ix=f({id:u(),name:u(),kind:Fx,addonId:u(),enabled:w(),model:u(),baseUrl:u().optional(),apiKey:u().optional(),supportsVision:w(),temperature:a().min(0).max(2).optional(),topP:a().min(0).max(1).optional(),topK:a().int().positive().optional(),maxTokens:a().int().positive().optional(),contextLength:a().int().positive().optional(),systemPrompt:u().optional(),timeoutMs:a().int().positive().default(6e4),connectTimeoutMs:a().int().positive().default(1e4),firstTokenTimeoutMs:a().int().positive().default(12e4),idleTimeoutMs:a().int().positive().default(6e4),retry:yx.default({enabled:!1,maxAttempts:1}),toolsEnabled:w().default(!1),extraHeaders:b(u(),u()).optional(),runtime:wx.optional(),appleFoundation:f({nodeId:u()}).optional()}),Lx=s(),Rx=f({kind:Fx,label:u(),icon:u(),addonId:u(),configSchema:Lx}),zx=p([f({consumer:u()}),f({purpose:S([`text`,`vision`])})]),Bx=f({selector:zx,profileId:u()}),Vx=f({day:u(),consumer:u(),profileId:u(),calls:a(),okCalls:a(),errorCalls:a(),inputTokens:a(),outputTokens:a(),avgLatencyMs:a()}),Hx=f({id:u(),label:u(),family:u(),purpose:S([`text`,`vision`]),url:u(),sha256:u(),sizeBytes:a(),quantization:u(),minRamBytes:a(),contextSizeDefault:a().int(),mmprojUrl:u().optional()}),Ux=m(`ok`,[f({ok:h(!0),model:Cx,label:u(),repo:u(),quantization:u(),purpose:S([`text`,`vision`]),totalBytes:a(),extraFilenames:C(u())}),f({ok:h(!1),code:u(),message:u(),candidates:C(u()).optional(),requiredBytes:a().optional()})]),Wx=f({nodeId:u(),reachable:w(),status:Ex.optional(),disk:Ox.optional(),error:u().optional(),apple:jx.optional()}),Gx=xx.extend({images:C(vx).min(1)}),Kx=f({addonId:u(),profileId:u()}),qx={name:`llm`,scope:`system`,mode:`collection`,internal:!1,providerKind:`ai`,nodeIdMode:`data`,methods:{generate:L(xx,_x,{kind:`mutation`,timeoutMs:ux}),generateVision:L(Gx,_x,{kind:`mutation`,timeoutMs:ux}),cancel:L(f({addonId:u().optional(),requestId:u()}),y(),{kind:`mutation`}),listProfileKinds:L(f({}),C(Rx)),listProfiles:L(f({}),C(Ix)),upsertProfile:L(f({profile:Ix}),Ix,{kind:`mutation`,auth:`admin`}),deleteProfile:L(Kx,y(),{kind:`mutation`,auth:`admin`}),testProfile:L(Kx,_x,{kind:`mutation`,auth:`admin`,timeoutMs:ux}),listModels:L(Kx,C(u())),getDefaults:L(f({}),C(Bx)),setDefault:L(f({selector:zx,profileId:u().nullable()}),y(),{kind:`mutation`,auth:`admin`}),getUsage:L(f({since:a().optional(),until:a().optional(),consumer:u().optional(),profileId:u().optional()}),C(Vx)),listModelCatalog:L(f({}),C(Hx)),listRuntimeNodes:L(f({}),C(Wx)),listNodeModels:L(f({nodeId:u()}),C(Dx)),resolveModelRef:L(f({ref:u(),maxBytes:a().positive().optional()}),Ux,{kind:`mutation`,auth:`admin`}),installModel:L(f({nodeId:u(),model:Cx}),y(),{kind:`mutation`,auth:`admin`}),deleteModel:L(f({nodeId:u(),file:u()}),y(),{kind:`mutation`,auth:`admin`}),getRuntimeStatus:L(Kx,Ex),startRuntime:L(Kx,Ex,{kind:`mutation`,auth:`admin`}),stopRuntime:L(Kx,y(),{kind:`mutation`,auth:`admin`})}},Jx=[`decode`,`transcode`,`recording`,`streaming`,`detection`],Yx=[`measured`,`accounted`,`unattributable`],Xx=f({role:S(Jx),deviceId:a().int().positive().nullable(),attribution:S(Yx),unit:u(),pid:a().int().positive().optional(),startedAtMs:a().optional(),cpuSeconds:a().optional(),rssBytes:a().optional()}),Zx={name:`load-contribution`,scope:`system`,mode:`collection`,internal:!0,methods:{list:L(y(),C(Xx).readonly())},mount:{kind:`skip`}},Qx=f({armed:a().int().min(0),unknown:C(u()).readonly()}),$x={name:`log-channels`,scope:`system`,mode:`collection`,internal:!0,methods:{list:L(y(),C(zs).readonly()),apply:L(f({windows:C(Bs).readonly()}),Qx,{kind:`mutation`})},mount:{kind:`skip`}},eS=S([`debug`,`info`,`warn`,`error`]),tS=f({timestamp:me(),level:eS,scope:C(u()),message:u(),meta:b(u(),s()).optional(),tags:b(u(),u()).optional()}),nS={name:`log-destination`,scope:`system`,mode:`collection`,internal:!0,methods:{write:L(tS,y(),{kind:`mutation`}),query:L(f({scope:C(u()).optional(),level:eS.optional(),since:me().optional(),until:me().optional(),limit:a().optional(),tags:b(u(),u()).optional()}),C(tS).readonly())},mount:{kind:`skip`}},rS=S([`primary`,`second-factor`]),iS=f({kind:h(`redirect`),id:u(),label:u(),icon:u().optional(),startUrl:u(),stage:rS,linkable:w().optional()}),aS=f({kind:h(`widget`),id:u(),addonId:u(),bundle:u(),remote:ef,stage:rS}),oS=f({kind:h(`passkey`),id:u(),label:u(),stage:rS,rpId:u(),origin:u().nullable()}),sS=m(`kind`,[iS,aS,oS]),cS={name:`login-method`,scope:`system`,mode:`collection`,internal:!0,methods:{getLoginMethods:L(y(),C(sS).readonly())},mount:{kind:`skip`}},lS=f({total:a(),user:a(),system:a(),irq:a(),nice:a(),loadAvg:d([a(),a(),a()]),cores:a()}),uS=f({percent:a(),totalBytes:a(),usedBytes:a(),availableBytes:a(),swapUsedBytes:a(),swapTotalBytes:a()}),dS=f({readBytes:a(),writeBytes:a(),readOps:a(),writeOps:a(),timestampMs:a()}),fS=f({rxBytes:a(),txBytes:a(),rxPackets:a(),txPackets:a(),rxErrors:a(),txErrors:a(),timestampMs:a()}),pS=f({utilization:a(),model:u(),memoryUsedBytes:a(),memoryTotalBytes:a(),temperature:a().nullable()}),mS=f({openFds:a(),threadCount:a(),activeHandles:a(),activeRequests:a()}),hS=f({avg10:a(),avg60:a(),avg300:a()}),gS=f({some:hS,full:hS.nullable()}),_S=f({cpu:lS,memory:uS,gpu:pS.nullable(),network:fS,disk:dS,pressure:f({cpu:gS.nullable(),memory:gS.nullable(),io:gS.nullable()}),process:mS,cpuTemperature:a().nullable(),timestampMs:a()}),vS=f({path:u(),totalBytes:a(),usedBytes:a(),availableBytes:a(),percent:a()}),yS=f({pid:a(),cpu:a(),memory:a(),privateBytes:a().optional(),sharedBytes:a().optional()}),bS=f({addonId:u(),nodeId:u(),role:S([`hub`,`worker`]),pid:a(),state:S([`starting`,`running`,`stopping`,`stopped`,`crashed`]),uptimeSec:a()}),xS=f({pid:a(),ppid:a(),pgid:a(),classification:S([`root`,`managed`,`system`]),addonId:u().nullable(),nodeId:u().nullable(),command:u(),cpuPercent:a(),memoryRssBytes:a(),cpuMainPercent:a().nullable(),cpuGcPercent:a().nullable(),threadCount:a().nullable(),uptimeSec:a()}),SS=f({source:S([`cgroup-v2`,`cgroup-v1`]),currentBytes:a(),limitBytes:a().nullable(),anonBytes:a().nullable(),fileBytes:a().nullable(),shmemBytes:a().nullable(),slabBytes:a().nullable(),gpuShmemBytes:a().nullable()}).extend({atMs:a()}),CS=f({atMs:a(),samples:a().int(),cpuMainPercent:a().nullable(),cpuMainPercentMin:a().nullable(),cpuGcPercent:a().nullable(),cpuGcPercentMin:a().nullable(),cpuLifetimePercent:a(),cpuLifetimePercentMin:a(),memoryRssBytes:a(),memoryRssBytesMin:a(),processCount:a().int(),processCountMin:a().int()}),wS=f({key:u(),kind:S([`addon`,`root`,`unattributed`]),points:C(CS).readonly()}),TS=f({nodeId:u(),series:C(wS).readonly(),containerMemory:C(SS).readonly(),bucketMs:a(),retainedSamples:a(),oldestAtMs:a().nullable(),cadenceMs:a(),durable:w()}),ES=f({forNodeId:u(),sinceMs:a().optional(),maxPoints:a().int().positive().optional()}),DS=f({cpuPercent:a(),memoryPercent:a(),memoryUsedMB:a(),memoryTotalMB:a(),diskPercent:a().optional(),temperature:a().optional(),gpuPercent:a().optional(),gpuMemoryPercent:a().optional()}),OS={name:`metrics-provider`,scope:`system`,mode:`singleton`,methods:{collectSnapshot:L(y(),_S),getCached:L(y(),_S.nullable()),getCurrent:L(y(),DS),getDiskSpace:L(f({dirPath:u()}),vS),getGpuInfo:L(y(),pS.nullable()),getCpuTemperature:L(y(),a().nullable()),getProcessStats:L(f({pids:C(a())}),C(yS)),listAddonInstances:L(y(),C(bS).readonly()),getAddonStats:L(f({addonId:u()}),yS.nullable()),listNodeProcesses:L(y(),C(xS).readonly()),getLoadSeries:L(ES,TS)}},kS=f({sourceUrl:u(),metadata:zl,targets:C(Rl).min(1).readonly(),calibrationRef:u().optional(),sessionId:u().optional()}),AS={name:`model-convert`,scope:`system`,mode:`singleton`,internal:!0,methods:{convert:L(kS,Vl,{kind:`mutation`,auth:`admin`,timeoutMs:6e5})}},jS=f({targetNodeId:u(),modelId:u(),format:S(Cl),entry:Ll}),MS=f({ok:w(),sha256:u(),bytes:a(),path:u()}),NS={name:`model-distributor`,scope:`system`,mode:`singleton`,internal:!0,methods:{distributeModel:L(jS,MS,{kind:`mutation`,auth:`admin`})}},PS=f({bbox:yf,pixelCount:a(),intensity:a()}),FS=f({detected:w(),regionCount:a(),regions:C(PS).readonly(),rawRegions:C(PS).readonly(),frameWidth:a(),frameHeight:a(),analysisMs:a()}),IS={name:`motion-detection`,scope:`device`,mode:`singleton`,kind:`wrapper`,defaultActive:!0,deviceTypes:[R.Camera],exposesDeviceSettings:!0,methods:{analyze:L(f({deviceId:a(),frame:vf.optional(),frameHandle:Fa.optional()}),FS,{kind:`mutation`}),removeCamera:L(f({deviceId:a()}),y(),{kind:`mutation`}),reset:L(y(),y(),{kind:`mutation`})},events:{onMotion:{data:f({deviceId:a(),detected:w(),regionCount:a()})}}},LS=S([`external`,`embedded`]),RS=S([`connected`,`disconnected`,`auth-failed`,`unreachable`,`tls-error`]),zS=f({id:u(),name:u(),url:u(),kind:LS,status:RS,latencyMs:a().nullable(),error:u().optional(),connectedClients:a().int().nonnegative().optional(),lastCheckedAt:a().optional()}),BS=f({url:u(),username:u().optional(),password:u().optional(),clientIdPrefix:u().optional()}),VS=f({name:u().min(1),url:u().regex(/^(mqtt|mqtts|ws|wss):\/\//,`URL must start with mqtt(s):// or ws(s)://`),username:u().optional(),password:u().optional(),clientIdPrefix:u().optional()}),HS=f({id:u()}),US=f({id:u()}),WS=m(`ok`,[f({ok:h(!0),latencyMs:a()}),f({ok:h(!1),error:u()})]),GS=f({port:a().int().min(1).max(65535).default(1883),allowAnonymous:w().default(!1),username:u().optional(),password:u().optional()}),KS=f({id:u(),url:u()}),qS=f({brokerCount:a(),embeddedRunning:w()}),JS={name:`mqtt-broker`,scope:`system`,mode:`collection`,providerKind:`broker`,status:{schema:qS,kind:`poll`},methods:{listBrokers:L(y(),C(zS)),getBrokerConfig:L(US,BS,{auth:`admin`}),addBroker:L(VS,HS,{kind:`mutation`,auth:`admin`}),removeBroker:L(US,y(),{kind:`mutation`,auth:`admin`}),testConnection:L(US,WS,{kind:`mutation`,auth:`admin`}),startEmbeddedBroker:L(GS,KS,{kind:`mutation`,auth:`admin`}),stopEmbeddedBroker:L(US,y(),{kind:`mutation`,auth:`admin`}),getStatus:L(y(),qS)}},YS=f({url:u(),hostname:u(),port:a(),protocol:S([`http`,`https`])}),XS=f({connected:w(),endpoint:YS.nullable(),error:u().optional()}),ZS=YS.extend({id:u(),label:u(),mode:u().optional(),sourcePort:a().optional()}),QS={name:`network-access`,scope:`system`,mode:`collection`,providerKind:`ingress`,methods:{start:L(y(),YS,{kind:`mutation`}),stop:L(y(),y(),{kind:`mutation`}),getEndpoint:L(y(),YS.nullable()),getStatus:L(y(),XS),listEndpoints:L(y(),C(ZS).readonly())}},$S=S([`image`,`video`,`gif`,`audio`,`icon`]),eC=f({mediaType:$S,url:u().optional(),bytes:x(Uint8Array).optional(),mime:u().optional(),name:u().optional()}).refine(e=>e.url!==void 0||e.bytes!==void 0,{message:"Attachment requires either `url` or `bytes`"}),tC=S([`text`,`markdown`,`html`]),nC=S([`acknowledge`,`dismiss`,`silence`,`snooze`,`view`,`play`,`open`,`close`,`lock`,`unlock`,`arm`,`arm-home`,`arm-away`,`arm-night`,`disarm`,`light`,`alert`,`camera`]),rC=f({id:u(),label:u(),url:u().optional(),icon:nC.optional(),destructive:w().optional(),mode:S([`navigate`,`background`]).optional()}),iC=f({body:u(),title:u().optional(),format:tC.default(`text`),priority:a().int().min(1).max(5).default(3),level:u().optional(),attachments:C(eC).optional(),clickUrl:u().optional(),actions:C(rC).optional(),sound:u().optional(),ttl:a().optional(),tag:u().optional(),deviceId:a().optional(),eventId:u().optional(),metadata:b(u(),s()).optional()}),aC=f({id:u(),label:u(),ordinal:a().int().min(1).max(5).nullable(),flags:f({critical:w().optional(),silent:w().optional(),noPush:w().optional()}).optional(),requires:C(u()).optional(),description:u().optional()}),oC=f({attachments:f({mediaTypes:C($S),mode:S([`url`,`bytes`,`both`]),max:a().int().nonnegative(),maxBytes:a().int().positive().optional()}),actions:a().int().nonnegative(),actionIcons:w().optional(),levels:C(aC),format:C(tC),clickUrl:w(),sound:w(),ttl:w(),bodyMaxLen:a().int().positive()}),sC=s(),cC=f({kind:u(),label:u(),icon:u(),addonId:u(),iconUrl:u().optional(),iconMediaType:u().optional(),configSchema:sC,destinationKeys:C(u()).optional(),supportsDiscovery:w(),caps:oC}),lC=f({id:u(),name:u(),kind:u(),addonId:u(),enabled:w(),config:b(u(),s())}),uC=f({kind:u(),suggestedName:u(),config:b(u(),s())}),dC=f({level:u(),format:tC,attachmentsSent:a().int().nonnegative(),actionsSent:a().int().nonnegative(),truncated:w(),dropped:C(u())}),fC=f({success:w(),error:u().optional(),renderedAs:dC.optional()}),pC=fC,mC=f({ok:w(),resolvedUrl:u(),httpStatus:a().int().optional(),stateInstance:u().optional(),error:u().optional()}),hC={name:`notification-output`,scope:`system`,mode:`collection`,methods:{listTargetKinds:L(f({}),C(cC)),listTargets:L(f({}),C(lC),{auth:`admin`}),getTarget:L(f({targetId:u()}),lC,{auth:`admin`}),discoverTargets:L(f({kind:u(),config:b(u(),s()).optional(),targetId:u().optional()}),C(uC),{auth:`admin`}),probeTargetConfig:L(f({kind:u(),config:b(u(),s()),targetId:u().optional()}),mC,{kind:`mutation`,auth:`admin`}),send:L(f({targetId:u(),notification:iC}),fC,{kind:`mutation`,auth:`admin`}),testTarget:L(f({targetId:u(),sample:iC.optional()}),pC,{kind:`mutation`,auth:`admin`}),upsertTarget:L(f({target:lC,cloneSecretsFrom:u().optional()}),lC,{kind:`mutation`,auth:`admin`}),deleteTarget:L(f({targetId:u()}),y(),{kind:`mutation`,auth:`admin`}),setTargetEnabled:L(f({targetId:u(),enabled:w()}),y(),{kind:`mutation`,auth:`admin`})}},gC=[{id:`person`,name:`Person`},{id:`bicycle`,name:`Bicycle`},{id:`car`,name:`Car`},{id:`motorcycle`,name:`Motorcycle`},{id:`airplane`,name:`Airplane`},{id:`bus`,name:`Bus`},{id:`train`,name:`Train`},{id:`truck`,name:`Truck`},{id:`boat`,name:`Boat`},{id:`traffic light`,name:`Traffic Light`},{id:`fire hydrant`,name:`Fire Hydrant`},{id:`stop sign`,name:`Stop Sign`},{id:`parking meter`,name:`Parking Meter`},{id:`bench`,name:`Bench`},{id:`bird`,name:`Bird`},{id:`cat`,name:`Cat`},{id:`dog`,name:`Dog`},{id:`horse`,name:`Horse`},{id:`sheep`,name:`Sheep`},{id:`cow`,name:`Cow`},{id:`elephant`,name:`Elephant`},{id:`bear`,name:`Bear`},{id:`zebra`,name:`Zebra`},{id:`giraffe`,name:`Giraffe`},{id:`backpack`,name:`Backpack`},{id:`umbrella`,name:`Umbrella`},{id:`handbag`,name:`Handbag`},{id:`tie`,name:`Tie`},{id:`suitcase`,name:`Suitcase`},{id:`frisbee`,name:`Frisbee`},{id:`skis`,name:`Skis`},{id:`snowboard`,name:`Snowboard`},{id:`sports ball`,name:`Sports Ball`},{id:`kite`,name:`Kite`},{id:`baseball bat`,name:`Baseball Bat`},{id:`baseball glove`,name:`Baseball Glove`},{id:`skateboard`,name:`Skateboard`},{id:`surfboard`,name:`Surfboard`},{id:`tennis racket`,name:`Tennis Racket`},{id:`bottle`,name:`Bottle`},{id:`wine glass`,name:`Wine Glass`},{id:`cup`,name:`Cup`},{id:`fork`,name:`Fork`},{id:`knife`,name:`Knife`},{id:`spoon`,name:`Spoon`},{id:`bowl`,name:`Bowl`},{id:`banana`,name:`Banana`},{id:`apple`,name:`Apple`},{id:`sandwich`,name:`Sandwich`},{id:`orange`,name:`Orange`},{id:`broccoli`,name:`Broccoli`},{id:`carrot`,name:`Carrot`},{id:`hot dog`,name:`Hot Dog`},{id:`pizza`,name:`Pizza`},{id:`donut`,name:`Donut`},{id:`cake`,name:`Cake`},{id:`chair`,name:`Chair`},{id:`couch`,name:`Couch`},{id:`potted plant`,name:`Potted Plant`},{id:`bed`,name:`Bed`},{id:`dining table`,name:`Dining Table`},{id:`toilet`,name:`Toilet`},{id:`tv`,name:`TV`},{id:`laptop`,name:`Laptop`},{id:`mouse`,name:`Mouse`},{id:`remote`,name:`Remote`},{id:`keyboard`,name:`Keyboard`},{id:`cell phone`,name:`Cell Phone`},{id:`microwave`,name:`Microwave`},{id:`oven`,name:`Oven`},{id:`toaster`,name:`Toaster`},{id:`sink`,name:`Sink`},{id:`refrigerator`,name:`Refrigerator`},{id:`book`,name:`Book`},{id:`clock`,name:`Clock`},{id:`vase`,name:`Vase`},{id:`scissors`,name:`Scissors`},{id:`teddy bear`,name:`Teddy Bear`},{id:`hair drier`,name:`Hair Drier`},{id:`toothbrush`,name:`Toothbrush`}],_C=[{id:`person`,name:`Person`},{id:`vehicle`,name:`Vehicle`},{id:`animal`,name:`Animal`},{id:`package`,name:`Package`}],vC=new Set(_C.map(e=>e.id));function yC(e){return vC.has(e.trim().toLowerCase())}var bC={mapping:{person:`person`,bicycle:`vehicle`,car:`vehicle`,motorcycle:`vehicle`,airplane:`vehicle`,bus:`vehicle`,train:`vehicle`,truck:`vehicle`,boat:`vehicle`,bird:`animal`,cat:`animal`,dog:`animal`,horse:`animal`,sheep:`animal`,cow:`animal`,elephant:`animal`,bear:`animal`,zebra:`animal`,giraffe:`animal`,suitcase:`package`,backpack:`package`,handbag:`package`},preserveOriginal:!1},xC=[{id:`speech`,name:`Speech`},{id:`scream`,name:`Scream / Shout`},{id:`crying`,name:`Crying / Baby`},{id:`laughter`,name:`Laughter`},{id:`music`,name:`Music`},{id:`dog`,name:`Dog`},{id:`cat`,name:`Cat`},{id:`bird`,name:`Bird`},{id:`animal`,name:`Animal (other)`},{id:`alarm`,name:`Alarm / Siren`},{id:`doorbell`,name:`Doorbell / Knock`},{id:`glass_breaking`,name:`Glass Breaking`},{id:`gunshot`,name:`Gunshot / Explosion`},{id:`vehicle`,name:`Vehicle`},{id:`siren`,name:`Emergency Siren`},{id:`fire`,name:`Fire / Smoke`},{id:`water`,name:`Water`},{id:`wind`,name:`Wind / Weather`},{id:`door`,name:`Door`},{id:`footsteps`,name:`Footsteps`},{id:`crowd`,name:`Crowd / Chatter`},{id:`telephone`,name:`Telephone`},{id:`engine`,name:`Engine / Motor`},{id:`tools`,name:`Tools / Construction`},{id:`silence`,name:`Silence`}],SC={mapping:{Speech:`speech`,"Child speech, kid speaking":`speech`,Conversation:`speech`,"Narration, monologue":`speech`,Babbling:`speech`,Whispering:`speech`,"Speech synthesizer":`speech`,Humming:`speech`,Rapping:`speech`,Singing:`speech`,Choir:`speech`,"Child singing":`speech`,Shout:`scream`,Bellow:`scream`,Yell:`scream`,Screaming:`scream`,"Children shouting":`scream`,Whoop:`scream`,"Crying, sobbing":`crying`,"Baby cry, infant cry":`crying`,Whimper:`crying`,"Wail, moan":`crying`,Groan:`crying`,Laughter:`laughter`,"Baby laughter":`laughter`,Giggle:`laughter`,Snicker:`laughter`,"Belly laugh":`laughter`,"Chuckle, chortle":`laughter`,Music:`music`,"Musical instrument":`music`,Guitar:`music`,Piano:`music`,Drum:`music`,"Drum kit":`music`,"Violin, fiddle":`music`,Flute:`music`,Saxophone:`music`,Trumpet:`music`,Synthesizer:`music`,"Pop music":`music`,"Rock music":`music`,"Hip hop music":`music`,"Classical music":`music`,Jazz:`music`,"Electronic music":`music`,"Background music":`music`,Dog:`dog`,Bark:`dog`,Yip:`dog`,Howl:`dog`,"Bow-wow":`dog`,Growling:`dog`,"Whimper (dog)":`dog`,Cat:`cat`,Purr:`cat`,Meow:`cat`,Hiss:`cat`,Caterwaul:`cat`,Bird:`bird`,"Bird vocalization, bird call, bird song":`bird`,"Chirp, tweet":`bird`,Squawk:`bird`,Crow:`bird`,Owl:`bird`,"Pigeon, dove":`bird`,Animal:`animal`,"Domestic animals, pets":`animal`,"Livestock, farm animals, working animals":`animal`,Horse:`animal`,"Cattle, bovinae":`animal`,Pig:`animal`,Sheep:`animal`,Goat:`animal`,Frog:`animal`,Insect:`animal`,Cricket:`animal`,Alarm:`alarm`,"Alarm clock":`alarm`,"Smoke detector, smoke alarm":`alarm`,"Fire alarm":`alarm`,Buzzer:`alarm`,"Civil defense siren":`alarm`,"Car alarm":`alarm`,Siren:`siren`,"Police car (siren)":`siren`,"Ambulance (siren)":`siren`,"Fire engine, fire truck (siren)":`siren`,"Emergency vehicle":`siren`,Foghorn:`siren`,Doorbell:`doorbell`,"Ding-dong":`doorbell`,Knock:`doorbell`,Tap:`doorbell`,Glass:`glass_breaking`,Shatter:`glass_breaking`,"Chink, clink":`glass_breaking`,"Gunshot, gunfire":`gunshot`,"Machine gun":`gunshot`,Explosion:`gunshot`,Fireworks:`gunshot`,Firecracker:`gunshot`,"Artillery fire":`gunshot`,"Cap gun":`gunshot`,Boom:`gunshot`,Vehicle:`vehicle`,Car:`vehicle`,Truck:`vehicle`,Bus:`vehicle`,Motorcycle:`vehicle`,"Car passing by":`vehicle`,"Vehicle horn, car horn, honking":`vehicle`,"Traffic noise, roadway noise":`vehicle`,Train:`vehicle`,Aircraft:`vehicle`,Helicopter:`vehicle`,Bicycle:`vehicle`,Skateboard:`vehicle`,Fire:`fire`,Crackle:`fire`,Water:`water`,Rain:`water`,Raindrop:`water`,"Rain on surface":`water`,Stream:`water`,Waterfall:`water`,Ocean:`water`,"Waves, surf":`water`,"Splash, splatter":`water`,Wind:`wind`,Thunderstorm:`wind`,Thunder:`wind`,"Wind noise (microphone)":`wind`,"Rustling leaves":`wind`,Door:`door`,"Sliding door":`door`,Slam:`door`,"Cupboard open or close":`door`,"Walk, footsteps":`footsteps`,Run:`footsteps`,Shuffle:`footsteps`,Crowd:`crowd`,Chatter:`crowd`,Cheering:`crowd`,Applause:`crowd`,"Children playing":`crowd`,"Hubbub, speech noise, speech babble":`crowd`,Telephone:`telephone`,"Telephone bell ringing":`telephone`,Ringtone:`telephone`,"Telephone dialing, DTMF":`telephone`,"Busy signal":`telephone`,Engine:`engine`,"Engine starting":`engine`,Idling:`engine`,"Accelerating, revving, vroom":`engine`,"Light engine (high frequency)":`engine`,"Medium engine (mid frequency)":`engine`,"Heavy engine (low frequency)":`engine`,"Lawn mower":`engine`,Chainsaw:`engine`,Hammer:`tools`,Jackhammer:`tools`,Sawing:`tools`,"Power tool":`tools`,Drill:`tools`,Sanding:`tools`,Silence:`silence`},preserveOriginal:!1},CC={mapping:{speech:`speech`,child_speech:`speech`,conversation:`speech`,whispering:`speech`,singing:`speech`,humming:`speech`,shout:`scream`,yell:`scream`,screaming:`scream`,crying:`crying`,baby_crying:`crying`,sobbing:`crying`,laughter:`laughter`,baby_laughter:`laughter`,giggling:`laughter`,music:`music`,guitar:`music`,piano:`music`,drums:`music`,dog_bark:`dog`,dog_bow_wow:`dog`,dog_growling:`dog`,dog_howl:`dog`,cat_meow:`cat`,cat_purr:`cat`,cat_hiss:`cat`,bird:`bird`,bird_chirp:`bird`,bird_squawk:`bird`,animal:`animal`,horse:`animal`,cow_moo:`animal`,insect:`animal`,alarm:`alarm`,smoke_alarm:`alarm`,fire_alarm:`alarm`,car_alarm:`alarm`,siren:`siren`,police_siren:`siren`,ambulance_siren:`siren`,doorbell:`doorbell`,door_knock:`doorbell`,knocking:`doorbell`,glass_breaking:`glass_breaking`,glass_shatter:`glass_breaking`,gunshot:`gunshot`,explosion:`gunshot`,fireworks:`gunshot`,car:`vehicle`,truck:`vehicle`,motorcycle:`vehicle`,car_horn:`vehicle`,vehicle_horn:`vehicle`,traffic:`vehicle`,fire:`fire`,fire_crackle:`fire`,water:`water`,rain:`water`,ocean:`water`,splash:`water`,wind:`wind`,thunder:`wind`,thunderstorm:`wind`,door:`door`,door_slam:`door`,sliding_door:`door`,footsteps:`footsteps`,walking:`footsteps`,running:`footsteps`,crowd:`crowd`,chatter:`crowd`,cheering:`crowd`,applause:`crowd`,telephone_ring:`telephone`,ringtone:`telephone`,engine:`engine`,engine_starting:`engine`,lawn_mower:`engine`,chainsaw:`engine`,hammer:`tools`,jackhammer:`tools`,drill:`tools`,power_tool:`tools`,silence:`silence`},preserveOriginal:!1},wC=new Map;for(let[e,t]of Object.entries(SC.mapping))wC.set(e.toLowerCase(),t);for(let[e,t]of Object.entries(CC.mapping))wC.set(e.toLowerCase(),t);function TC(e){return wC.get(e.toLowerCase())??null}function EC(){return xC.map(e=>e.id)}var G={motion:`#f59e0b`,audio:`#06b6d4`,person:`#22c55e`,vehicle:`#3b82f6`,animal:`#f97316`,package:`#a855f7`,sensor:`#8b5cf6`,control:`#10b981`,genericDetection:`#64748b`},DC=`#22ff55`,OC={car:`#f59e0b`,truck:`#d97706`,bus:`#b45309`,motorcycle:`#eab308`,bicycle:`#ca8a04`,airplane:`#60a5fa`,boat:`#2563eb`,train:`#1d4ed8`,bird:`#14b8a6`,dog:`#84cc16`,cat:`#f97316`,horse:`#a16207`,sheep:`#a3a3a3`,cow:`#78716c`,elephant:`#6b7280`,bear:`#7c2d12`,zebra:`#404040`,giraffe:`#d4a373`};function kC(e){return e.split(/[-_ ]/).filter(e=>e.length>0).map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(` `)}var AC=new Map;function jC(e,t,n,r,i){AC.set(e,{kind:e,parentKind:null,level:`macro`,category:t,color:n,iconId:r,labelKey:`eventKind.${e}`,label:i})}function K(e,t,n,r,i,a){AC.set(e,{kind:e,parentKind:t,level:`sub`,category:n,color:r,iconId:i,labelKey:`eventKind.${e}`,label:a})}jC(`motion`,`motion`,G.motion,`motion`,`Motion`),jC(`audio`,`audio`,G.audio,`audio`,`Audio`),jC(`person`,`detection`,G.person,`person`,`Person`),jC(`vehicle`,`detection`,G.vehicle,`vehicle`,`Vehicle`),jC(`animal`,`detection`,G.animal,`animal`,`Animal`),jC(`package`,`package`,G.package,`package`,`Package`),jC(`sensor`,`sensor`,G.sensor,`sensor`,`Sensor`),jC(`control`,`control`,G.control,`control`,`Control`);for(let[e,t]of Object.entries(bC.mapping))t!==`vehicle`&&t!==`animal`||AC.has(e)||K(e,t,`detection`,OC[e]??G.genericDetection,e,kC(e));K(`package-delivered`,`package`,`package`,G.package,`package`,`Package delivered`),K(`package-picked-up`,`package`,`package`,G.package,`package`,`Package picked up`),K(`contact`,`sensor`,`sensor`,`#f59e0b`,`door`,`Contact`),K(`motion-sensor`,`sensor`,`sensor`,G.sensor,`pir`,`Motion sensor`),K(`smoke`,`sensor`,`sensor`,`#ef4444`,`smoke`,`Smoke`),K(`flood`,`sensor`,`sensor`,`#3b82f6`,`water`,`Water leak`),K(`gas`,`sensor`,`sensor`,`#ef4444`,`gas`,`Gas`),K(`carbon-monoxide`,`sensor`,`sensor`,`#dc2626`,`smoke`,`Carbon monoxide`),K(`vibration`,`sensor`,`sensor`,`#eab308`,`vibration`,`Vibration`),K(`tamper`,`sensor`,`sensor`,`#f97316`,`tamper`,`Tamper`),K(`presence`,`sensor`,`sensor`,`#22c55e`,`presence`,`Presence`),K(`enum-sensor`,`sensor`,`sensor`,G.sensor,`generic`,`Sensor state`),K(`device-event`,`sensor`,`sensor`,`#10b981`,`button`,`Device event`),K(`lock`,`control`,`control`,`#0ea5e9`,`lock`,`Lock`),K(`cover`,`control`,`control`,`#0ea5e9`,`door`,`Cover`),K(`switch`,`control`,`control`,G.control,`switch`,`Switch`),K(`siren`,`control`,`control`,`#dc2626`,`siren`,`Siren`),K(`button`,`control`,`control`,`#10b981`,`button`,`Button`),K(`doorbell`,`control`,`control`,`#a855f7`,`doorbell`,`Doorbell`);for(let e of xC){let t=`audio-${e.id}`;AC.has(t)||K(t,`audio`,`audio`,G.audio,t,e.name)}var MC=Object.freeze(Object.fromEntries(AC));function NC(e){return MC[e]}function PC(e){return MC[e]?.color??`#22ff55`}function FC(e){let t=[];for(let n of Object.values(MC))n.parentKind===e&&t.push(n);return t}var IC=f({kind:u(),label:u(),parentKind:u().nullable()}),LC=f({videoClasses:C(IC),audioKinds:C(IC),labels:C(IC)});function RC(e,t,n){return{kind:e,label:t,parentKind:n}}function zC(){let e=Object.values(MC);return{videoClasses:e.filter(e=>e.category===`detection`).map(e=>RC(e.kind,e.label,e.parentKind)),audioKinds:e.filter(e=>e.category===`audio`&&e.level===`sub`).map(e=>RC(e.kind,e.label,e.parentKind)),labels:e.filter(e=>e.category===`sensor`||e.category===`control`).map(e=>RC(e.kind,e.label,e.parentKind))}}var BC=Object.freeze(zC()),VC=S([`disarmed`,`armed_home`,`armed_away`,`armed_night`,`armed_vacation`,`armed_custom_bypass`,`arming`,`disarming`,`pending`,`triggered`]),q=S([`home`,`away`,`night`,`vacation`,`custom_bypass`]),HC=f({state:VC,targetMode:q.nullable().optional(),availableModes:C(q),requiresCode:w(),lastChangedAt:a()}),UC={name:`alarm-panel`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[R.AlarmPanel],methods:{arm:L(f({deviceId:a().int().nonnegative(),mode:q,code:u().min(1).optional()}),y(),{kind:`mutation`,auth:`protected`}),disarm:L(f({deviceId:a().int().nonnegative(),code:u().min(1).optional()}),y(),{kind:`mutation`,auth:`protected`}),trigger:L(f({deviceId:a().int().nonnegative()}),y(),{kind:`mutation`,auth:`protected`})},status:{schema:HC,kind:`push`},runtimeState:HC,durability:`restored`,volatileStateFields:[`lastChangedAt`]},WC=f({x:a(),y:a()}),GC=f({kind:h(`rect`),x:a(),y:a(),width:a(),height:a()}),KC=f({kind:h(`polygon`),points:C(WC)}),qC=f({kind:h(`grid`),gridWidth:a(),gridHeight:a(),cells:C(w())}),JC=f({kind:h(`line`),points:C(WC)}),YC=m(`kind`,[GC,KC,qC,JC]),XC=S([`rect`,`polygon`,`grid`,`line`]),ZC=f({min:a(),max:a()}),QC=f({width:a(),height:a()}),$C=S([`immediate`,`track-end`,`device-event`,`package-event`,`system-event`]),ew=S(`device-online.device-offline.device-disabled.device-enabled.device-battery-low.device-battery-normal.device-consumable-low.device-consumable-normal.device-tank-low.device-tank-full.device-tank-normal.stream-online.stream-offline.node-online.node-offline.node-restarting.node-updating.node-inference-unavailable.detection-blind.addon-crash-loop.addon-update-available.server-update-available.wrapper-update-available.alarm-triggered.alarm-armed.alarm-disarmed.alarm-arming.alarm-arm-refused.alarm-pending.alarm-rearmed.alarm-sensor-bypass.alarm-check-failed.addon-updated.server-updated.export-completed.backup-completed.camera-online.camera-offline.camera-disabled.camera-enabled`.split(`.`)),tw=new Set([`camera-online`,`camera-offline`,`camera-disabled`,`camera-enabled`]),nw=ew.options.filter(e=>!tw.has(e)),rw=[`alarm-arm-refused`,`alarm-check-failed`,`alarm-arming`,`alarm-armed`,`alarm-pending`,`alarm-triggered`,`alarm-rearmed`,`alarm-sensor-bypass`,`alarm-disarmed`],iw=[`device-battery-low`,`device-battery-normal`,`device-consumable-low`,`device-consumable-normal`],aw=[`device-consumable-low`,`device-consumable-normal`],ow=[`device-tank-low`,`device-tank-full`,`device-tank-normal`],sw=f({kinds:C(ew).min(1),deviceIds:C(a().int()).min(1).optional(),deviceTypes:C(u().min(1)).min(1).optional(),excludeDeviceIds:C(a().int()).min(1).optional(),nodeIds:C(u().min(1)).min(1).optional(),packageNames:C(u().min(1)).min(1).optional(),consumableLowPercent:a().int().min(1).max(95).optional()});function cw(e){return e.consumableLowPercent??15}var lw=1440,uw=[10,30,60],dw=f({days:C(a().int().min(0).max(6)).min(1),startMinute:a().int().min(0).max(1439),endMinute:a().int().min(0).max(1439)}),fw=f({windows:C(dw).min(1),timezone:u().optional(),invert:w().optional()}),pw=S([`instant`,`summary`]),mw=S([`rule`,`section`]),hw=m(`mode`,[f({mode:h(`instant`)}),f({mode:h(`summary`),schedule:fw,split:mw.optional()})]),gw=f({values:C(u().min(1)),maxDistance:a().int().min(0).max(3).default(1)}),_w=f({zoneId:u().optional(),className:u().optional(),op:S([`became-occupied`,`became-free`,`>=`,`<=`]).default(`became-occupied`),count:a().int().min(0).default(1),sustainSeconds:a().int().min(0).max(3600).default(15)}),vw=f({labels:C(u().min(1)).min(1).optional(),dbThreshold:a().min(-96).max(0).optional(),hitPercent:a().int().min(1).max(100).default(60),samplingSeconds:a().int().min(1).max(300).default(10),confirmHits:a().int().min(1).max(20).optional(),confirmWindowSec:a().int().min(1).max(60).optional()}),yw=S([`enter`,`exit`,`any`]),bw=S([`raised`,`cleared`]),xw=f({ids:C(u().min(1)).min(1),match:S([`any`,`all`]).optional()}),Sw=m(`kind`,[f({kind:h(`wait`),seconds:a().min(0).max(300)}),f({kind:h(`cap`),deviceId:a().int(),cap:u().min(1),method:u().min(1),args:b(u(),s()).optional()})]),Cw=f({id:u().min(1),name:u().min(1).max(120),minDelaySec:a().int().min(0).max(86400).optional(),actions:C(Sw).min(1)}),ww=f({name:u().min(1).max(120),minDelaySec:a().int().min(0).max(86400).optional(),actions:C(Sw).min(1)}),Tw=m(`kind`,[f({kind:h(`sequence`),sequenceId:u().min(1)}),f({kind:h(`do`),action:Sw})]),Ew=C(Tw).max(4),Dw=f({id:u().min(1).max(64),label:u().min(1).max(40),sequenceId:u().min(1),icon:nC.optional(),destructive:w().optional()}),Ow=f({onActivation:Ew.optional(),onDeactivation:Ew.optional(),onTrigger:Ew.optional(),onTriggerOff:Ew.optional(),buttons:C(Dw).max(8).optional()}),kw=f({name:u().min(1).max(120),enabled:w(),minDelaySec:a().int().min(0).max(86400).optional(),actions:C(Sw).min(1)}),Aw=kw,jw=f({deviceId:a().int(),states:C(u().min(1)).min(1)}),Mw=f({sceneId:u().min(1),deviceId:a().int().optional(),requiredState:S([`matched`,`diverged`]),latched:w().optional()}),Nw=f({deviceState:jw.optional(),scene:Mw.optional(),devices:C(a()).optional(),devicesExclude:C(a()).min(1).optional(),classes:C(u().min(1)).optional(),classesExclude:C(u().min(1)).optional(),minConfidence:a().min(0).max(1).optional(),zones:xw.optional(),zonesExclude:C(u().min(1)).optional(),crossing:yw.optional(),labelEquals:C(u().min(1)).optional(),identities:C(u().min(1)).optional(),plates:gw.optional(),identitiesExclude:C(u().min(1)).optional(),minImportance:a().min(0).max(1).optional(),minDwellSeconds:a().min(0).optional(),source:S([`pipeline`,`onboard`,`sensor`,`audio`,`any`]).optional(),minLabelConfidence:a().min(0).max(1).optional(),eventTypeTokens:C(u().min(1)).optional(),sensorKinds:C(u().min(1)).optional(),sensorTransition:bw.optional(),packagePhase:S([`delivered`,`picked-up`,`both`]).optional(),systemEvent:sw.optional(),customZones:C(KC).optional(),occupancy:_w.optional(),audio:vw.optional()}),Pw=f({targetId:u().min(1),params:b(u(),s()).optional()}),Fw=S([`cropped`,`full`,`boxed`]),Iw=S([`mosaic`,`each`]),Lw=f({attach:S([`best`,`best-matching`,`keyFrame`,`none`]).default(`best`),frame:Fw.optional(),zoneCrop:w().optional(),gif:w().optional(),clip:w().optional(),clipPreRollSec:a().int().min(0).max(30).optional(),clipPostRollSec:a().int().min(0).max(30).optional(),clipSpeed:a().min(1).max(8).optional(),profile:D.optional(),linkedCameras:Iw.optional()}),Rw=S([`shared`,`per-class`]),zw=f({cooldownSec:a().int().min(0).max(86400).default(60),scope:S([`rule`,`rule-device`]).default(`rule-device`),granularity:Rw.optional()}),Bw=1e3,Vw=2e4,Hw=8e3,Uw=f({op:S([`>=`,`>`,`<=`,`<`,`==`]),count:a().int().min(0).max(1e3)}),Ww=f({enabled:w().default(!1),profileId:u().optional(),prompt:u().max(1e3).optional(),expect:Uw.optional(),timeoutMs:a().int().min(Bw).max(Vw).default(Hw),onTimeout:S([`fire`,`suppress`]).default(`fire`),maxImagePx:a().int().min(64).max(2048).default(448)}),Gw=f({name:u().min(1).max(200),enabled:w().default(!0),delivery:$C,conditions:Nw.default({}),schedule:fw.optional(),systemEventDelivery:hw.optional(),targets:C(Pw),targetUsers:C(u()).optional(),media:Lw.default({attach:`best`}),throttle:zw.default({cooldownSec:60,scope:`rule-device`}),template:f({title:u().max(500).optional(),body:u().max(2e3).optional()}).optional(),priority:a().int().min(1).max(5).default(3),ownerUserId:u().optional(),snoozeAllowGlobal:w().optional(),snoozeOptions:C(a().int().min(1).max(lw)).max(4).optional(),actions:Ow.optional(),confirm:Ww.optional(),groupingSec:a().int().min(5).max(60).optional()}),Kw=Gw.partial().extend({disabledTargetIds:C(u()).optional(),enabled:w().optional(),conditions:Nw.optional(),media:Lw.optional(),throttle:zw.optional(),priority:a().int().min(1).max(5).optional()}),qw=[`waitForEnhancement`,`groupIdleSec`];function Jw(e){return qw.some(t=>t===e)}var Yw=[`template`,`schedule`,`targetUsers`,`snoozeOptions`,`snoozeAllowGlobal`,`actions`,`confirm`,`groupingSec`,`waitForEnhancement`,`groupIdleSec`],Xw=S(Yw),Zw=f({ruleId:u(),patch:Kw,clear:C(Xw).optional()}),Qw=Gw.extend({id:u(),createdBy:u(),createdAt:a(),updatedAt:a(),disabledTargetIds:C(u()).default([])}),$w=S([`device-state`,`streams`,`battery`,`consumables`,`tanks`,`detection-blind`,`nodes`,`addons`,`addon-updates`,`updates`]),eT=f({id:$w,status:S([`read`,`unavailable`]),items:a().int().nonnegative(),reason:u().optional()}),tT=f({section:$w.optional(),title:u(),text:u(),count:a().int().nonnegative()}),nT=f({empty:w(),count:a().int().nonnegative(),text:u(),sections:C(eT),dropped:b(u(),a().int().nonnegative()),excludedGroups:C(u()),split:mw.optional(),rows:C(tT).optional()}),rT=f({recordId:u(),recordKind:S([`object-event`,`track`,`device-event`,`package-event`,`system-event`]),deviceId:a(),timestamp:a(),wouldFire:w(),failedCondition:u().optional(),className:u().optional(),label:u().optional()}),iT=S([`detection`,`sensor`,`occupancy`,`sound`,`device-events`,`system`,`alarm`,`mixed`]),aT=S([`detection`,`sensor`,`occupancy`,`sound`,`system`]),oT=S([`rule`,`timelapse`,`summary`]),sT=S([`title`,`body`,`previewText`,`captionText`]),cT=S([`subject`,`place`,`time`,`rule`,`occupancy`,`sound`,`sensor`,`system`,`digest`,`ai`]),lT=f({name:u().regex(/^\w+$/),label:u(),description:u().optional(),example:u(),group:cT,families:C(oT).min(1),fields:C(sT).optional(),kinds:C(aT).optional(),deliveries:C($C).optional(),systemEventKinds:C(ew).optional(),systemEventDeliveries:C(pw).optional(),dynamic:f({prefix:h(`count_`),from:h(`classes`)}).optional()}),uT=f({family:oT,field:sT,kind:iT.optional(),delivery:$C.optional(),systemEventKinds:C(ew).optional(),systemEventDelivery:pw.optional()}),dT=f({context:uT,template:f({title:u().max(500).optional(),body:u().max(2e3).optional()})}),fT=f({title:u().nullable(),body:u().nullable(),unknown:C(u())}),pT=f({id:u(),group:S([`scope`,`class`,`zones`,`quality`,`label`,`schedule`,`device`,`package`,`occupancy`,`audio`,`system`]),label:u(),valueType:S([`deviceIdList`,`deviceIdExcludeList`,`stringList`,`number01`,`number`,`sourceSelect`,`zoneSelection`,`zoneIdList`,`schedule`,`plateMatcher`,`packagePhase`,`crossingSelect`,`sensorTransition`,`polygonDraw`,`occupancy`,`audio`,`deviceState`,`scene`,`systemEvent`]),operator:S([`in`,`notIn`,`anyOf`,`allOf`,`gte`,`fuzzyIn`,`withinSchedule`]),appliesTo:C($C),phase:u(),description:u().optional(),options:C(f({value:u(),label:u(),hint:u().optional()})).readonly().optional()}),mT=[{id:`systemEvent`,group:`system`,label:`System event`,valueType:`systemEvent`,options:[{value:`device-online`,label:`Device online`},{value:`device-offline`,label:`Device offline`},{value:`device-disabled`,label:`Device switched off`},{value:`device-enabled`,label:`Device switched on`},{value:`stream-online`,label:`Stream online`},{value:`stream-offline`,label:`Stream offline`},{value:`node-online`,label:`Node online`},{value:`node-offline`,label:`Node offline`},{value:`node-restarting`,label:`Node restarting`},{value:`node-updating`,label:`Node updating (restart imminent)`},{value:`node-inference-unavailable`,label:`Node has no usable inference device`},{value:`detection-blind`,label:`Camera detecting nothing`},{value:`addon-crash-loop`,label:`Addon stopped after repeated crashes`},{value:`addon-update-available`,label:`Addon update available`},{value:`server-update-available`,label:`Server update available`},{value:`wrapper-update-available`,label:`Container / app update available`},{value:`addon-updated`,label:`Addons updated`},{value:`server-updated`,label:`Server updated`},{value:`device-battery-low`,label:`Battery low`},{value:`device-battery-normal`,label:`Battery back to normal`},{value:`device-consumable-low`,label:`Consumable low`},{value:`device-consumable-normal`,label:`Consumable replaced`},{value:`device-tank-low`,label:`Tank low (water, detergent)`},{value:`device-tank-full`,label:`Tank full (dirty water, dust)`},{value:`device-tank-normal`,label:`Tank back to normal`},{value:`export-completed`,label:`Export completed`},{value:`backup-completed`,label:`Backup completed`},{value:`alarm-arm-refused`,label:`Alarm arm refused`},{value:`alarm-check-failed`,label:`Alarm check failed (armed anyway)`},{value:`alarm-arming`,label:`Alarm arming (exit delay)`},{value:`alarm-armed`,label:`Alarm armed`},{value:`alarm-pending`,label:`Alarm entry delay started`},{value:`alarm-triggered`,label:`Alarm triggered`},{value:`alarm-rearmed`,label:`Alarm re-armed after siren`},{value:`alarm-sensor-bypass`,label:`Alarm sensor bypass`},{value:`alarm-disarmed`,label:`Alarm disarmed`}],operator:`in`,appliesTo:[`system-event`],phase:`P1`,description:`Infrastructure and update events. Device liveness covers EVERY device type — narrow it by device type (cameras only, say) and/or by device, node events by node id, and addon updates by package name.`},{id:`devices`,group:`scope`,label:`Devices`,valueType:`deviceIdList`,operator:`in`,appliesTo:[`immediate`,`track-end`,`device-event`,`package-event`],phase:`P1`,description:`Restrict the rule to these devices; absent = all devices. A sensor event matches either the SENSOR that fired or the camera it is attributed to, so a rule may name either one.`},{id:`devicesExclude`,group:`scope`,label:`Excluded devices`,valueType:`deviceIdExcludeList`,operator:`notIn`,appliesTo:[`immediate`,`track-end`,`device-event`,`package-event`],phase:`P1`,description:`Every device except these. Judged on the same device ids as Devices: a sensor event is excluded by the SENSOR that fired or by the camera it is attributed to.`},{id:`classes`,group:`class`,label:`Object classes`,valueType:`stringList`,operator:`in`,appliesTo:[`immediate`,`track-end`,`package-event`],phase:`P1`,description:`Any overlap with the detection class set passes.`},{id:`classesExclude`,group:`class`,label:`Excluded classes`,valueType:`stringList`,operator:`notIn`,appliesTo:[`immediate`,`track-end`,`package-event`],phase:`P1`},{id:`minConfidence`,group:`quality`,label:`Minimum confidence`,valueType:`number01`,operator:`gte`,appliesTo:[`immediate`,`track-end`,`package-event`],phase:`P1`},{id:`zones`,group:`zones`,label:`Zones`,valueType:`zoneSelection`,operator:`anyOf`,appliesTo:[`immediate`,`track-end`,`package-event`],phase:`P1`,description:`The zones the subject must be in (included) or never in (excluded).`},{id:`zonesExclude`,group:`zones`,label:`Excluded zones`,valueType:`zoneIdList`,operator:`notIn`,appliesTo:[`immediate`,`track-end`,`package-event`],phase:`P1`},{id:`crossing`,group:`zones`,label:`Zone crossing`,valueType:`crossingSelect`,options:[{value:``,label:`Entering`,hint:`Entries and ordinary movement; never an exit.`},{value:`exit`,label:`Leaving`,hint:`Only an exit from a zone.`},{value:`any`,label:`Entering or leaving`,hint:`Entries, exits and ordinary movement.`}],operator:`in`,appliesTo:[`immediate`],phase:`P1`,description:`Which way the subject crosses the zone.`},{id:`labelEquals`,group:`label`,label:`Label equals`,valueType:`stringList`,operator:`in`,appliesTo:[`immediate`,`track-end`],phase:`P1`,description:`Exact match on the collapsed label (identity / plate / subclass).`},{id:`identities`,group:`label`,label:`Known faces`,valueType:`stringList`,operator:`in`,appliesTo:[`immediate`,`track-end`],phase:`P1`,description:`Only recognised people. Selecting NOBODY means every identity in the face gallery; selecting some narrows to those. Matched on the gallery id, so renaming a person does not break the rule. On Immediate delivery the name must already be known when an event is written — choose Immediate, grouped to wait for it.`},{id:`plates`,group:`label`,label:`Known plates`,valueType:`plateMatcher`,operator:`fuzzyIn`,appliesTo:[`immediate`,`track-end`],phase:`P1`,description:`Only vehicles whose plate was read. Selecting NO plate means any readable plate; listed plates are matched Levenshtein-tolerantly, because OCR noise makes an exact match useless.`},{id:`identitiesExclude`,group:`label`,label:`Excluded faces`,valueType:`stringList`,operator:`notIn`,appliesTo:[`immediate`,`track-end`],phase:`P1`,description:`Veto by identity (mirror of Known faces, same gallery ids). A subject nobody recognised passes — there is nothing to exclude.`},{id:`minLabelConfidence`,group:`label`,label:`Minimum label confidence`,valueType:`number01`,operator:`gte`,appliesTo:[`track-end`],phase:`P1`,description:`Best identity/plate recognition match confidence [0,1] for the label the track carries at close (peak assigned-identity cosine / peak plate OCR score; the higher of the two when both were read). Distinct from detection confidence. Fails closed for a track that ended un-recognized.`},{id:`minImportance`,group:`quality`,label:`Minimum importance`,valueType:`number01`,operator:`gte`,appliesTo:[`track-end`],phase:`P1`,description:`Server-computed key-event importance [0,1]; track-end rules only (importance is scored at close). Fails when the record has none.`},{id:`minDwellSeconds`,group:`quality`,label:`Minimum dwell (seconds)`,valueType:`number`,operator:`gte`,appliesTo:[`track-end`],phase:`P1`,description:`Track lifespan in seconds (lastSeen − firstSeen); track-end rules only.`},{id:`source`,group:`scope`,label:`Detection source`,valueType:`sourceSelect`,options:[{value:`any`,label:`Any source`},{value:`pipeline`,label:`Pipeline`},{value:`onboard`,label:`Onboard (camera)`},{value:`sensor`,label:`Sensor`},{value:`audio`,label:`Audio marker`}],operator:`in`,appliesTo:[`immediate`,`track-end`,`device-event`,`package-event`],phase:`P1`,description:`pipeline / onboard / sensor / audio; a record with no stamped source counts as pipeline.`},{id:`deviceState`,group:`scope`,label:`Device state`,valueType:`deviceState`,operator:`in`,appliesTo:[`immediate`,`track-end`,`device-event`,`package-event`],phase:`P2`,description:`Only fire while another device is in one of the chosen states — the alarm armed, a switch on, a contact closed. A state that cannot be read does NOT fire.`},{id:`scene`,group:`scope`,label:`Scene state`,valueType:`scene`,operator:`in`,appliesTo:[`immediate`,`track-end`,`device-event`,`package-event`],phase:`P3`,description:`Only fire while a scene is matched or diverged.`},{id:`sensorKinds`,group:`device`,label:`Sensor kinds`,valueType:`stringList`,operator:`in`,appliesTo:[`device-event`],phase:`P1`,description:`Sensor/control taxonomy kinds (doorbell / contact / button / …) matched against the persisted device event.`},{id:`eventTypeTokens`,group:`device`,label:`Event-type tokens`,valueType:`stringList`,operator:`in`,appliesTo:[`device-event`],phase:`P1`,description:`Raw device event-type tokens (e.g. doorbell press / press_long) from the event-emitter slice; absent on doorbell-pulse / passive sensors.`},{id:`sensorTransition`,group:`device`,label:`Notify when`,valueType:`sensorTransition`,options:[{value:``,label:`It triggers and when it clears`,hint:`Every change: water detected, and back to dry.`},{value:`raised`,label:`Only when it triggers`,hint:`Water detected, smoke, a contact opening — never the return to normal.`},{value:`cleared`,label:`Only when it clears`,hint:`Back to dry, smoke gone, a contact closing — never the alert itself.`}],operator:`in`,appliesTo:[`device-event`],phase:`P2`,description:`Fire on one edge of a boolean sensor. Offered only when every chosen sensor kind raises and clears; a reading that cannot be placed still notifies.`},{id:`packagePhase`,group:`package`,label:`Package phase`,valueType:`packagePhase`,options:[{value:`delivered`,label:`Delivered`},{value:`picked-up`,label:`Picked up`},{value:`both`,label:`Both`}],operator:`in`,appliesTo:[`package-event`],phase:`P1`,description:`Delivered / picked-up / both.`},{id:`occupancy`,group:`occupancy`,label:`Occupancy`,valueType:`occupancy`,operator:`anyOf`,appliesTo:[`device-event`],phase:`P1`,description:`ZoneAnalytics occupancy edge (optionally zone/class-scoped): count crosses the threshold and holds for sustainSeconds. Fail-closed on a missing snapshot.`},{id:`audio`,group:`audio`,label:`Sound`,valueType:`audio`,operator:`anyOf`,appliesTo:[`immediate`],phase:`P2`,description:`Fires when at least hitPercent% of the samples in a samplingSeconds window are hits — a hit clears the dBFS floor AND carries one of the chosen sounds. Both filters are optional and independent, but naming NEITHER never matches: every sample would be a hit, so the engine refuses rather than notifying on silence. dBFS is negative-going (0 = full scale, -96 = silence).`},{id:`customZones`,group:`zones`,label:`Custom zones`,valueType:`polygonDraw`,operator:`anyOf`,appliesTo:[`immediate`,`track-end`,`package-event`],phase:`P1`,description:`User-drawn polygons; a detection whose bbox overlaps any polygon matches.`},{id:`schedule`,group:`schedule`,label:`Schedule`,valueType:`schedule`,operator:`withinSchedule`,appliesTo:[`immediate`,`track-end`,`device-event`,`package-event`,`system-event`],phase:`P1`,description:`Weekly activation windows (invertible); absent = always active.`}],hT=S([`pending`,`sent`,`dead`]),gT=S([`object-event`,`track-end`,`device-event`,`package-event`,`system-event`]),_T=f({className:u(),label:u().optional(),confidence:a().optional(),zones:C(u()),timestamp:a(),systemEvent:f({kind:ew,subject:u(),title:u(),body:u(),data:b(u(),s())}).optional()}),vT=f({id:u(),ruleId:u(),ruleName:u(),delivery:$C,targetId:u(),deviceId:a(),recordKind:gT,recordId:u(),trackId:u().optional(),status:hT,attempts:a().int(),createdAt:a(),updatedAt:a(),error:u().optional(),subject:_T,artifactIds:C(u().min(1)).optional()}),yT=f({ruleId:u().optional(),deviceId:a().optional(),status:hT.optional(),since:a().optional(),until:a().optional(),limit:a().int().min(1).max(500).default(100)}),bT=f({ruleId:u(),lastAt:a(),status:hT,deviceId:a()}),xT=f({runs:C(bT),horizonMs:a().nonnegative().nullable()}),ST=S([`rule`,`device`,`all`]),CT=f({scope:ST,ruleId:u().optional(),deviceId:a().int().optional(),classes:C(u().min(1)).min(1).optional(),durationMinutes:a().int().min(1).max(lw),global:w().optional(),summary:w().optional()}),wT=f({id:u(),userId:u(),scope:ST,ruleId:u().optional(),deviceId:a().int().optional(),classes:C(u().min(1)).min(1).optional(),startedAt:a(),expiresAt:a(),global:w(),summary:w(),digestSentAt:a().optional()}),TT=f({snoozeId:u(),targetId:u(),ruleId:u(),ruleName:u(),deviceId:a().int(),count:a().int(),firstAt:a(),lastAt:a()}),ET=3600,DT=a().int().min(0).max(600),OT=a().int().min(0).max(ET),kT=e=>new Set(e.map(e=>e.mode)).size===e.length,AT=S([`rearmAfter`,`disableAfter`,`doNothing`]),jT=f({mode:q,exitDelaySec:DT.optional(),entryDelaySec:DT.optional(),triggeredDurationSec:OT.optional(),postTriggeredAction:AT.optional(),schedule:fw.optional(),notifyDuringEntryDelay:w().optional(),notifySensorRewatched:w().optional(),notifySensorIgnored:w().optional()}),MT=C(jT).max(8).refine(kT,{message:`modeDelays: at most one entry per arm mode`}),NT=f({mode:q,exitDelaySec:DT.nullable().optional(),entryDelaySec:DT.nullable().optional(),triggeredDurationSec:OT.nullable().optional(),postTriggeredAction:AT.nullable().optional(),schedule:fw.nullable().optional(),notifyDuringEntryDelay:w().nullable().optional(),notifySensorRewatched:w().nullable().optional(),notifySensorIgnored:w().nullable().optional()}),PT=C(NT).max(8).refine(kT,{message:`modeDelays: at most one edit per arm mode`}),FT=f({mode:q,deviceId:a().int().positive(),nonBlocking:w()}),IT=f({mode:q,deviceId:a().int().positive(),blocking:w()}),LT=f({mode:q,deviceId:a().int().positive(),secureOnArm:w()}),RT=f({mode:q,deviceIds:C(a().int()).max(200)}),zT=RT,BT=RT,VT=RT,HT=C(zT).max(8).refine(kT,{message:`nonBlocking: at most one list per arm mode`}),UT=C(BT).max(8).refine(kT,{message:`blocking: at most one list per arm mode`}),WT=C(VT).max(8).refine(kT,{message:`secureOnArmOff: at most one list per arm mode`}),GT=f({exitDelaySec:DT,entryDelaySec:DT,triggeredDurationSec:OT,postTriggeredAction:AT.optional(),announceArm:w().optional(),announceTargets:C(u().min(1)).max(16),nonBlocking:HT.default([]),blocking:UT.default([]),secureOnArmOff:WT.default([]),modeDelays:MT.default([])}),KT=f({id:u().min(1).max(64),name:u().min(1).max(64),isDefault:w()}),qT=f({activeId:u().min(1),items:C(KT).min(1)}),JT=f({name:u().min(1).max(64),cloneFromId:u().min(1).max(64).optional()}),YT=f({id:u().min(1).max(64),name:u().min(1).max(64)}),XT=f({id:u().min(1).max(64)}),ZT=GT.extend({nonBlocking:HT,blocking:UT,secureOnArmOff:WT,modeDelays:PT,nonBlockingEdit:FT,blockingEdit:IT,secureOnArmEdit:LT}).partial().refine(e=>e.nonBlocking===void 0||e.nonBlockingEdit===void 0,{message:`nonBlocking and nonBlockingEdit are exclusive — send the whole lists or one edit`}).refine(e=>e.blocking===void 0||e.blockingEdit===void 0,{message:`blocking and blockingEdit are exclusive — send the whole lists or one edit`}).refine(e=>e.secureOnArmOff===void 0||e.secureOnArmEdit===void 0,{message:`secureOnArmOff and secureOnArmEdit are exclusive — send the whole lists or one edit`}),QT=S([`muted`,`detection-off`,`offline`]),$T=f({deviceId:a().int(),reason:QT}),eE=f({mode:q,ruleCount:a().int().min(0),allDevices:w(),deviceIds:C(a().int()),allDevicesExcept:C(a().int()).default([]),skippedDevices:C($T).default([])}),tE=f({deviceId:a().int(),name:u(),state:u(),blocking:w()}),nE=f({deviceId:a().int(),name:u(),phase:S([`open`,`closed`])}),rE=f({mode:q,devices:C(tE),unknown:C(a().int())}),iE=f({state:VC,targetMode:q.nullable(),availableModes:C(q),openings:C(rE),exclusions:C(nE)}),aE=f({deviceId:a().int().nullable(),settings:GT,profiles:qT.optional(),coverage:C(eE),live:iE.optional()}),oE=S([`open`,`closed`,`unknown`,`not-opening`]),sE=f({deviceId:a().int().positive(),reading:oE,state:u().nullable(),unknownWhy:S([`read-failed`,`unknown-word`]).nullable(),online:w().nullable(),controllable:w().default(!1)}),cE=f({deviceIds:C(a().int().positive()).max(500)}),lE=f({sensors:C(sE),readAt:a().int().nonnegative()}),uE=f({deviceId:a().int().nonnegative().optional(),seconds:a().min(0).max(60),profile:D.optional(),ruleId:u(),ruleName:u(),reason:S([`window`,`occupancy`])}),dE=f({rulesLoaded:w(),asks:C(uE).readonly()}),fE={name:`notification-rules`,scope:`system`,mode:`singleton`,methods:{listRules:L(f({}),f({rules:C(Qw)}),{auth:`admin`}),getRule:L(f({ruleId:u()}),f({rule:Qw.nullable()}),{auth:`admin`}),createRule:L(f({rule:Gw}),f({rule:Qw}),{kind:`mutation`,auth:`admin`,caller:`required`}),updateRule:L(Zw,f({rule:Qw}),{kind:`mutation`,auth:`admin`,caller:`required`}),deleteRule:L(f({ruleId:u()}),f({success:h(!0)}),{kind:`mutation`,auth:`admin`}),setRuleEnabled:L(f({ruleId:u(),enabled:w()}),f({success:h(!0)}),{kind:`mutation`,auth:`admin`}),listSequences:L(f({}),f({sequences:C(Cw)}),{auth:`admin`}),getSequence:L(f({sequenceId:u().min(1)}),f({sequence:Cw.nullable()}),{auth:`admin`}),createSequence:L(f({sequence:ww}),f({sequence:Cw}),{kind:`mutation`,auth:`admin`}),updateSequence:L(f({sequenceId:u().min(1),sequence:ww}),f({sequence:Cw}),{kind:`mutation`,auth:`admin`}),deleteSequence:L(f({sequenceId:u().min(1)}),f({success:h(!0)}),{kind:`mutation`,auth:`admin`}),getClipRetentionAsks:L(f({}),dE,{auth:`admin`}),listDeviceMutes:L(f({}),f({mutedDeviceIds:C(a().int()).readonly()}),{auth:`admin`}),setDeviceMuted:L(f({deviceId:a().int(),muted:w()}),f({success:h(!0)}),{kind:`mutation`,auth:`admin`}),testRule:L(f({rule:Gw,lookbackMinutes:a().int().min(1).max(1440).default(60)}),f({results:C(rT)}),{kind:`mutation`,auth:`admin`}),previewStateSummary:L(f({rule:Gw}),nT,{kind:`mutation`,auth:`admin`,access:`view`}),getConditionCatalog:L(f({}),f({catalog:C(pT),taxonomy:LC.optional()})),getTemplateCatalog:L(f({}),f({vars:C(lT)})),previewTemplate:L(dT,fT,{kind:`mutation`,access:`view`}),getHistory:L(f({filter:yT.default({limit:100})}),f({entries:C(vT)}),{auth:`admin`}),getRuleLastRuns:L(f({}),xT,{auth:`admin`}),resolveArtifactUrl:L(f({artifactId:u().min(1)}),f({url:u().nullable()}),{auth:`admin`}),listSnoozes:L(f({}),f({snoozes:C(wT)}),{caller:`required`}),createSnooze:L(f({snooze:CT}),f({snooze:wT}),{kind:`mutation`,caller:`required`}),cancelSnooze:L(f({snoozeId:u()}),f({success:h(!0)}),{kind:`mutation`,caller:`required`}),getAlarmConfig:L(f({}),aE,{auth:`admin`}),setAlarmConfig:L(f({patch:ZT}),aE,{kind:`mutation`,auth:`admin`}),createAlarmProfile:L(JT,aE,{kind:`mutation`,auth:`admin`}),renameAlarmProfile:L(YT,aE,{kind:`mutation`,auth:`admin`}),deleteAlarmProfile:L(XT,aE,{kind:`mutation`,auth:`admin`}),activateAlarmProfile:L(XT,aE,{kind:`mutation`,auth:`admin`}),getAlarmSensors:L(cE,lE,{auth:`admin`})}},pE=S([`view`,`create`,`delete`]),mE=p([h(`*`),C(u())]),hE=b(u(),p([h(`*`),C(u())])),gE=S([`device`,`system`]),_E=m(`kind`,[f({kind:h(`all`)}),f({kind:h(`ids`),ids:C(a().int()).min(1)}),f({kind:h(`types`),types:C(S(R)).min(1)}),f({kind:h(`locations`),locations:C(u().min(1)).min(1)})]),vE=f({type:h(`device`),selector:_E,access:C(pE).min(1),includeLinked:w().optional()});function yE(e){if(typeof e!=`object`||!e||Array.isArray(e)||Reflect.get(e,`type`)!==`device`||Reflect.get(e,`selector`)!==void 0)return e;let t=Reflect.get(e,`targets`);return Array.isArray(t)?{type:`device`,selector:{kind:`ids`,ids:t.map(e=>typeof e==`string`?Number(e):e).filter(e=>typeof e==`number`&&Number.isInteger(e))},access:Reflect.get(e,`access`)}:e}var J=r(yE,m(`type`,[f({type:h(`category`),target:gE,access:C(pE).min(1)}),f({type:h(`capability`),target:u(),access:C(pE).min(1)}),f({type:h(`addon`),target:u(),access:C(pE).min(1)}),vE])),bE=f({id:u(),username:u(),passwordHash:u(),isAdmin:w().default(!1),allowedProviders:mE,allowedDevices:hE,scopes:C(J).default([]),createdAt:a(),updatedAt:a()}),xE=f({id:u(),label:u(),isAdmin:w().default(!1),allowedProviders:mE,allowedDevices:hE,tokenHash:u(),tokenPrefix:u(),createdAt:a(),lastUsedAt:a().optional()}),SE=f({id:u(),userId:u(),name:u(),tokenHash:u(),tokenPrefix:u(),scopes:C(J),expiresAt:a().nullish(),lastUsedAt:a().nullish(),createdAt:a()}),CE=f({integrationId:u(),displayName:u(),requestedScopes:C(J),allowedRedirectPrefixes:C(u()).min(1),allowedPrivateHostPaths:C(u()).optional(),requiresPkce:w().optional(),hubUrl:u().optional(),refreshTokenTtlSec:p([a().int().positive(),h(`never`)]).optional()}),wE={name:`oauth-integration`,scope:`system`,mode:`collection`,internal:!0,methods:{getDescriptor:L(y(),CE,{auth:`admin`})}},TE=m(`kind`,[f({kind:h(`camera`)}),f({kind:h(`sensor`),deviceId:a().int().positive()})]),EE=Object.freeze({kind:`camera`});function DE(e){if(e===void 0)return{triggeredBy:EE,malformed:!1};let t=TE.safeParse(e);return t.success?{triggeredBy:t.data,malformed:!1}:{triggeredBy:EE,malformed:!0}}var OE=`cameraSensors`,kE=f({addonId:u().min(1),stableId:u().min(1)});function AE(e){return`${e.addonId}/${e.stableId}`}var jE=S([`in-addition`,`confirm`,`replace`]),ME=`in-addition`,NE=kE.extend({mode:jE.default(ME)}),PE=f({sensors:C(NE).min(1).max(8)}).superRefine((e,t)=>{let n=new Set;e.sensors.forEach((e,r)=>{let i=AE(e);n.has(i)&&t.addIssue({code:`custom`,path:[`sensors`,r],message:`duplicate camera sensor ${i}`}),n.add(i)})}),FE={addonId:u(),stableId:u(),mode:jE.default(ME)},IE=m(`state`,[f({...FE,state:h(`ready`),deviceId:a(),name:u(),caps:C(u()).readonly()}),f({...FE,state:h(`offline`),deviceId:a(),name:u(),reason:S([`offline`,`disabled`])}),f({...FE,state:h(`missing`),reason:u()}),f({...FE,state:h(`unsupported`),deviceId:a(),name:u(),reason:u()}),f({...FE,state:h(`unreadable`),reason:u()})]),LE=S([`onboard-not-listed`,`no-active-detection`]),RE=S([`always`,`when-confirmed`,`never`]),zE=S([`provider-not-split`]),BE=f({detected:w(),atMs:a()}),VE=m(`state`,[f({state:h(`not-configured`),cameraLevel:BE.optional()}),f({state:h(`unreadable`),reason:u(),cameraLevel:BE.optional()}),f({state:h(`configured`),cameraLevel:BE.optional(),sensors:C(IE).readonly(),cameraMotion:RE.optional(),notForwarded:LE.optional(),notEnforced:zE.optional()})]),HE=Object.freeze({state:`unreadable`,reason:`camera sensor mappings not loaded`}),UE=[`owner-not-ready`,`store-read-failed`,`three-way-read-unavailable`,`invalid-stored`,`not-cluster-scoped`],WE=[{stepId:`face-embedding`,label:`Face recognition model`,defaultModelId:`auraface-r100`,indexName:`the enrolled face gallery`,options:[{id:`auraface-r100`,label:`AuraFace R100`}]},{stepId:`clip-embedding`,label:`Semantic search model`,defaultModelId:`siglip2-b16-224`,indexName:`the object semantic-search index`,options:[{id:`siglip2-b16-224`,label:`SigLIP2 B/16 (Apache-2.0)`}]}],GE=`cluster-step-models`;function KE(e){return`clusterModel:${e}`}function qE(e){return WE.some(t=>t.stepId===e)}var JE=Object.freeze(Object.fromEntries(WE.map(e=>[e.stepId,e.defaultModelId])));function YE(e){return e==null||e===``?{kind:`absent`}:typeof e==`string`?{kind:`chosen`,modelId:e}:{kind:`invalid`,value:e}}function XE(e){let t=[];for(let n of WE){let r=YE(e[KE(n.stepId)]);r.kind===`invalid`&&t.push({stepId:n.stepId,value:r.value})}return t}function ZE(e){let t={};for(let n of WE){let r=YE(e[KE(n.stepId)]);t[n.stepId]=r.kind===`chosen`?r.modelId:n.defaultModelId}return t}function QE(e){return typeof e==`object`&&!!e&&`key`in e}function $E(e){return e===null?JE:ZE(nD(e,tD()))}function eD(e){return e===null?[]:XE(nD(e,tD()))}function tD(){return new Set(WE.map(e=>KE(e.stepId)))}function nD(e,t){let n={};for(let r of e.sections)for(let e of r.fields)!QE(e)||typeof e.key!=`string`||t.has(e.key)&&(n[e.key]=e.value);return n}function rD(e,t){let n=WE.find(t=>t.stepId===e);if(n===void 0)return null;let r=t[e];return r!==void 0&&r!==``?r:n.defaultModelId}var iD=[{stepId:`face-embedding`,key:`minLandmarkFaceSize`,label:`Min face size to embed (detection-frame px)`,description:`Faces smaller than this in the small frame the detector sees are not embedded, so they can never be recognised. Below it the face cannot be aligned reliably and a bad embedding matches everyone. Same value on every node. 0 = no limit.`,type:`slider`,min:0,max:64,step:2,default:24}];function aD(e,t){return`clusterStepSetting:${e}:${t}`}function oD(e){return iD.filter(t=>t.stepId===e)}var sD=a().finite();function cD(e){let t={};for(let n of iD){let r=sD.safeParse(e[aD(n.stepId,n.key)]),i=r.success?r.data:n.default,a=t[n.stepId]??{};t[n.stepId]={...a,[n.key]:i}}return t}var lD=cD({});function uD(e){return e===null?lD:cD(nD(e,new Set(iD.map(e=>aD(e.stepId,e.key)))))}function dD(e,t,n){let r=n[e];return r===void 0||Object.keys(r).length===0?t===void 0?void 0:{...t}:t===void 0?{...r}:{...t,...r}}var fD=S([`new`,`entered`,`left`,`moving`,`idle`]),pD=S([`motion`,`object`,`audio`]),mD=m(`kind`,[GC,KC]),hD=S([`motion`,`audio`,`person`,`vehicle`,`animal`,`door`,`pir`,`smoke`,`water`,`button`,`package`,`generic`]),gD=S([`motion`,`audio`,`detection`,`sensor`,`control`,`custom`,`package`]),_D=S([`macro`,`sub`]),vD=f({kind:u(),labelKey:u(),label:u(),color:u(),iconId:u(),icon:hD,category:gD,parentKind:u().nullable(),level:_D,source:f({capName:u(),deviceId:a()})}),yD=f({deviceId:a(),kinds:C(vD).readonly()}),bD=f({id:u(),deviceId:a(),sourceDeviceId:a(),kind:u(),value:b(u(),s()).nullable(),timestamp:a()}),xD=f({x:a(),y:a(),timestamp:a(),bbox:yf,source:S([`frame`,`recovery`]).optional(),score:a().optional()}),SD=f({timestamp:a(),position:xD,mediaId:a().int()}),CD=f({minX:a(),minY:a(),maxX:a(),maxY:a()}),wD=S([`full`,`slim`]),TD=f({label:u(),peakScore:a(),count:a(),firstAt:a(),lastAt:a()}),ED=S([`pipeline`,`onboard`,`sensor`,`audio`]),DD=S([`none`,`staging`,`trained`]),OD={markForTrain:w().optional(),debug:w().optional(),debugNote:u().max(500).optional(),favourited:w().optional()},kD={retrainStatus:DD.optional()},AD=f(OD),jD=f({trackId:u(),markForTrain:w(),debug:w(),debugNote:u(),favourited:w(),retrainStatus:DD}),MD=p([h(1),h(2)]),ND=f({stepId:u(),modelId:u().optional(),decidedAt:a(),identityId:u().optional()}),PD={label:u().optional(),labelScore:a().optional(),labelMeta:ND.optional(),subLabel:u().optional(),subLabelScore:a().optional(),subLabelMeta:ND.optional()},FD=f({deviceId:a(),tracks:a().int(),files:a().int(),bytes:a().int()}),ID=f({generatedAt:a(),trackCount:a().int(),fileCount:a().int(),byteCount:a().int(),truncated:w(),devices:C(FD).readonly()}),LD=f({trackId:u(),deviceId:a(),className:u(),...PD,producingDeviceName:u().optional(),source:ED.optional(),firstSeen:a(),lastSeen:a(),positions:C(xD).readonly(),snapshots:C(SD).readonly(),zonesVisited:C(u()).readonly(),zoneNames:C(u()).readonly().optional(),classes:C(u()).readonly().optional(),totalDistance:a(),state:fD,active:w(),importance:a().optional(),bestEventId:u().optional(),importanceReason:u().optional(),audioLabels:C(TD).readonly().optional(),envelope:CD.optional(),hasFace:w().optional(),hasEmbeddedFace:w().optional(),hasRider:w().optional(),previewMissReason:u().optional(),modelId:u().optional(),frameWidth:a().optional(),frameHeight:a().optional(),...OD,...kD}),RD={id:a().int(),deviceId:a(),timestamp:a()},zD=f({...RD,kind:h(`motion`),regionCount:a(),regions:C(f({bbox:yf,pixelCount:a(),intensity:a()})).readonly().optional(),frameWidth:a().optional(),frameHeight:a().optional(),mediaUrl:u().optional(),triggeredBy:TE.optional(),durationMs:a().nullable().optional(),edges:C(a()).readonly().optional()}),BD=S([`pipeline`,`onboard`]),VD=S([`enter`,`exit`]),HD=f({direction:VD,zoneId:u(),zoneName:u().optional()}),UD=f({zoneId:u(),zoneName:u().optional(),overlapPct:a()}),WD=f({...RD,kind:h(`object`),source:BD.optional(),frameId:u().optional(),idempotencyKey:u().optional(),trackId:u().optional(),className:u(),...PD,confidence:a().optional(),bbox:yf.optional(),zones:C(u()).readonly().optional(),zoneOverlaps:C(UD).readonly().optional(),spawnRefused:u().optional(),state:fD.optional(),zoneCrossing:HD.optional(),frameWidth:a().optional(),frameHeight:a().optional(),mediaId:a().int().optional(),keyFrameMediaId:a().int().optional(),mediaUrl:u().optional(),observedAt:a().optional(),importance:a().optional()}),GD=f({...RD,kind:h(`audio`),rms:a(),dbfs:a(),classification:f({className:u(),originalClass:u().optional(),score:a()}).optional(),classifyOutcome:Tf.optional(),mediaUrl:u().optional()}),KD=S([`crop`,`thumbnail`,`snapshot`,`firstFrame`,`lastFrame`,`fullFrame`,`fullFrameBoxed`,`faceCrop`,`plateCrop`,`keyFrame`,`keyFrameSmall`,`thumbnailSmall`,`confirmationCrop`,`debugCrop`,`sceneFrame`,`lastSceneFrame`]),qD=f({mediaId:a().int(),kind:KD,sizeBytes:a(),timestamp:a()}),JD=qD.extend({url:u(),base64:u()}),YD=JD.omit({base64:!0}),XD=S([`person`,`vehicle`,`animal`,`package`,`face`,`plate`]),ZD=S([`subject`,`model_error`]),QD=S([`operator`,`assist`,`pipeline`,`llm`]),$D=f({x:a(),y:a(),w:a(),h:a()}),eO=f({id:u(),trackId:u().optional(),deviceId:a(),mediaKey:u(),bbox:$D,macroClass:XD,label:u().optional(),subLabel:u().optional(),kind:ZD,source:QD,assistModelId:u().optional(),assistScore:a().optional(),exportedInBatch:u().optional(),createdAt:a()}),tO=eO.omit({id:!0,trackId:!0,deviceId:!0,mediaKey:!0,createdAt:!0,exportedInBatch:!0}),nO=f({trackId:u(),deviceId:a(),className:u(),label:u().optional(),firstSeen:a(),lastSeen:a(),frameCount:a().int(),annotationCount:a().int()}),rO=f({mediaId:a().int(),kind:KD,timestamp:a(),sizeBytes:a().int(),copied:w()}),iO=f({bbox:$D,macroClass:XD,label:u().optional(),subLabel:u().optional(),score:a().optional(),modelId:u().optional(),trackId:u(),basis:S([`subject-box`,`position`]),deltaMs:a()}),aO=S([`track`,`recording`]),oO=f({frameId:u(),deviceId:a(),origin:aO,trackId:u().optional(),sourceMediaId:a().int().optional(),epochMs:a().optional(),sourceKind:KD,sizeBytes:a().int(),width:a().int(),height:a().int(),copiedAt:a(),capturedAt:a().optional(),complete:w(),pipelineBoxes:C(iO).readonly().optional(),collectionIds:C(u()).readonly().optional()}),sO=S([`source-missing`,`unreadable-image`,`write-failed`]),cO=f({copied:C(oO).readonly(),refused:C(f({sourceMediaId:a().int(),reason:sO})).readonly()}),lO=f({candidates:C(rO).readonly(),copies:C(oO).readonly(),autoPickMediaId:a().int().optional()}),uO=f({deviceIds:C(a()).optional(),frameIds:C(u()).max(2e4).optional(),collectionIds:C(u()).max(200).optional(),datasetVersionId:u().optional(),batchId:u().optional(),completeOnly:w().optional()}),dO=S([`frames`,`crops`]),fO=f({kind:h(`http`),method:S([`PUT`,`POST`]),url:u().url(),headers:b(u(),u()).optional()}),pO=f({batchId:u(),frames:a().int(),crops:a().int(),annotations:a().int(),missing:a().int(),bytes:a().int(),sha256:u(),status:a().int()}),mO=m(`kind`,[f({kind:h(`package`),zone:$D.optional()}),f({kind:h(`objects`),modelId:u(),minScore:a().optional()})]),hO=m(`kind`,[f({kind:h(`proposed`),modelId:u(),stepId:u(),minScore:a(),proposals:C(tO).readonly(),belowThreshold:a().int()}),f({kind:h(`refused`),reason:u(),detail:u().optional()})]),gO=f({id:u(),name:u(),createdAt:a(),frameCount:a().int()}),_O=m(`kind`,[f({kind:h(`created`),collection:gO}),f({kind:h(`refused`),reason:S([`empty-name`,`duplicate-name`])})]),vO=m(`kind`,[f({kind:h(`renamed`),collection:gO}),f({kind:h(`refused`),reason:S([`empty-name`,`duplicate-name`,`unknown-collection`])})]),yO=m(`kind`,[f({kind:h(`added`),collectionId:u(),frame:oO,reused:w()}),f({kind:h(`refused`),reason:S([`unknown-collection`,`still-unavailable`,`still-busy`,`unreadable-image`,`write-failed`]),detail:u().optional()})]),bO=f({id:u(),name:u(),model:u(),kind:u(),leavesHouse:w()}),xO=tO.extend({reason:u()}),SO=f({ref:u(),verdict:S([`confirmed`,`wrong-class`,`not-an-object`,`uncertain`]),suggestedClass:XD.optional(),reason:u()}),CO=m(`kind`,[f({kind:h(`proposed`),profileId:u(),model:u(),leftHouse:w(),proposals:C(xO).readonly(),reviews:C(SO).readonly(),rejected:a().int()}),f({kind:h(`refused`),reason:S([`unknown-frame`,`unreadable-frame`,`unknown-profile`,`profile-disabled`,`no-vision`,`cloud-not-confirmed`,`llm-error`,`malformed-answer`]),detail:u().optional()})]),wO=f({deviceIds:C(a()).readonly().optional(),collectionIds:C(u()).max(200).readonly().optional(),frameIds:C(u()).max(2e4).readonly().optional()}),TO=f({frames:a().int(),completeFrames:a().int(),completeness:a(),subjects:a().int(),modelErrors:a().int(),hardNegatives:a().int(),cells:C(f({macroClass:u(),deviceId:a(),lighting:S([`day`,`night`,`unknown`]),subjects:a().int(),frames:a().int()})).readonly(),cameras:C(f({deviceId:a(),frames:a().int(),completeFrames:a().int()})).readonly()}),EO=f({id:u(),name:u(),createdAt:a(),selection:wO,layout:dO,completeOnly:w(),frameCount:a().int(),annotationHash:u(),manifestSchema:u(),stats:TO}),DO=m(`kind`,[f({kind:h(`created`),version:EO}),f({kind:h(`refused`),reason:S([`empty-name`,`duplicate-name`,`no-frames`])})]),OO=f({trackId:u(),retrainStatus:DD,changed:w(),reason:S([`unknown-track`,`no-frames-copied`,`not-staging`,`not-trained`,`unchanged`]).optional()}),kO=1e3,AO=5e3,jO=f({deviceId:a(),since:a().optional(),until:a().optional(),limit:a().int().min(1).max(AO).default(kO),projection:S([`full`,`slim`]).optional()}),MO=jO.extend({classFilter:u().optional()}),NO=f({deviceIds:C(a()),since:a().optional(),until:a().optional(),limit:a().int().min(1).max(1e3).default(200),cursor:u().optional(),projection:wD.optional(),includeStationary:w().optional(),classes:C(u()).optional(),excludeSources:C(ED).optional()}),PO=f({tracks:C(LD).readonly(),nextCursor:u().nullable()}),FO=50,IO=200,LO=f({deviceId:a(),since:a(),until:a(),limit:a().int().min(1).max(IO).default(FO),minImportance:a().min(0).max(1).optional(),classFilter:u().optional()}),RO=f({id:u(),trackId:u(),timestamp:a(),className:u(),...PD,importance:a(),bestEventId:u(),windowMs:a().optional(),audioLabels:C(TD).readonly().optional(),...OD,...kD}),zO=f({deviceIds:C(a()).min(1).max(200),since:a(),until:a(),limit:a().int().min(1).max(IO).default(FO),minImportance:a().min(0).max(1).optional(),classFilter:u().optional()}),BO=f({deviceId:a(),events:C(RO).readonly()}),VO=f({bucketStart:a(),motion:a().int(),object:a().int(),audio:a().int(),audioDbfs:a().optional()}),HO=f({deviceId:a(),read:S([`read`,`unreadable`]),buckets:C(VO).readonly()}),UO=f({trackId:u(),className:u(),confidence:a(),bbox:yf,zones:C(u()).readonly(),state:fD}),WO=o({id:u(),kind:S([`first-level`,`detail`]),macroClass:u(),score:a(),bbox:f({x:a(),y:a(),width:a(),height:a()}),labels:C(o({label:u(),score:a()})).readonly(),parentId:u().optional()}),GO=WD.extend({score:a()}),KO=f({text:u(),deviceId:a().optional(),since:a().optional(),until:a().optional(),classFilter:u().optional(),limit:a().default(50),minScore:a().min(0).max(1).optional(),strictness:Hc.optional(),modelId:u().min(1).optional()}),qO=f({tracks:a().int(),events:a().int(),media:a().int(),faces:a().int(),plates:a().int(),embeddings:a().int()}),JO=f({mediaDropped:a().int(),tracks:a().int(),events:a().int()}),YO=f({deviceId:a(),rows:a().int(),bytes:a().int()}),XO=f({totalRows:a().int(),totalBytes:a().int(),devices:C(YO).readonly()}),ZO=f({kind:KD,rows:a().int(),bytes:a().int()}),QO=f({totalRows:a().int(),totalBytes:a().int(),kinds:C(ZO).readonly(),unaccountedRows:a().int(),unaccountedBytes:a().int()}),$O=f({motion:a().int(),object:a().int(),audio:a().int()}),ek=f({deviceId:a().optional(),since:a().optional(),until:a().optional(),maxTracks:a().int().positive().optional(),executeOnNodeId:u().optional(),pacingMs:a().int().nonnegative().optional(),force:w().optional()}),tk=f({deleted:a(),failedIndexes:C(u()).optional()}),nk=S([`stores-unavailable`,...UE,`method-unavailable`,`read-failed`,`reads-disagree`,`not-a-clip-model`,`force-requires-max-tracks`]),rk=f({started:w(),alreadyRunning:w(),refusal:nk.optional(),modelId:u().optional(),index:u().optional()}),ik=f({running:w(),scanned:a(),rebuilt:a(),missingKeyFrame:a(),missingEvent:a(),missingBbox:a(),boxSource:f({subjectBox:a(),positions:a(),event:a(),refused:a()}),alreadyInSpace:a(),force:w().nullable(),forcedInSpace:a(),notRunnable:a(),noCapableNode:a(),failed:a(),complete:w().nullable(),startedAtMs:a().nullable(),finishedAtMs:a().nullable(),error:u().nullable(),modelId:u().nullable(),index:u().nullable()}),ak=f({started:w(),alreadyRunning:w()}),ok=f({mode:S([`report`,`reclaim`]).default(`report`),scopes:C(S([`motion-still`,`track-filmstrip`])).min(1).optional(),deviceIds:C(a().int()).min(1).optional(),restart:w().optional(),pageSize:a().int().min(50).max(5e3).optional(),maxRowsPerDevice:a().int().min(1).max(5e5).optional(),maxReclaimPerDevice:a().int().min(1).max(5e5).optional(),maxBytesPerRun:a().int().min(1).optional(),budgetMinutes:a().int().min(1).max(720).optional(),throttleBytesPerSec:a().int().min(64*1024).optional(),graceMinutes:a().int().min(1).max(10080).optional()}),sk=f({running:w(),mode:S([`report`,`reclaim`]).nullable(),totalExamined:a(),totalEligible:a(),totalReclaimed:a(),totalBytesReclaimed:a(),totalRefused:a(),devicesDone:a(),complete:w().nullable(),startedAtMs:a().nullable(),finishedAtMs:a().nullable(),error:u().nullable()}),ck=S([`motion`,`audio-dbfs`,`battery`,`occupancy`]);function lk(e,t){let n=e??``;return t===void 0?n:`${n}|${t}`}function uk(e){let t=e.indexOf(`|`);return t<0?{zoneId:e}:{zoneId:e.slice(0,t),className:e.slice(t+1)}}var dk=f({scope:u(),bucketStart:a().int(),samples:a().int().nonnegative(),sum:a(),min:a(),max:a()}),fk={name:`pipeline-analytics`,scope:`device`,mode:`singleton`,kind:`wrapper`,defaultActive:!0,deviceTypes:[R.Camera],exposesDeviceSettings:!0,methods:{getActiveTracks:L(f({deviceId:a()}),C(LD).readonly()),getTrack:L(f({deviceId:a(),trackId:u()}),LD.nullable()),listTracks:L(f({deviceId:a(),since:a().optional(),until:a().optional(),limit:a().optional(),zone:mD.optional(),projection:wD.optional(),includeStationary:w().optional(),classes:C(u()).optional(),excludeSources:C(ED).optional()}),C(LD).readonly()),listRecentTracks:L(NO,PO),clearTracks:L(f({deviceId:a()}),y(),{kind:`mutation`,auth:`admin`}),getMotionEvents:L(jO,C(zD).readonly()),getObjectEvents:L(MO,C(WD).readonly()),getAudioEvents:L(jO,C(GD).readonly()),listEventKinds:L(f({deviceId:a()}),C(vD).readonly()),listEventKindsBatch:L(f({deviceIds:C(a()).min(1).max(200)}),C(yD).readonly()),getSensorEvents:L(f({deviceId:a(),since:a().optional(),until:a().optional(),kinds:C(u()).optional(),limit:a().int().min(1).max(AO).default(kO)}),C(bD).readonly()),getKeyEvents:L(LO,C(RO).readonly()),getKeyEventsBatch:L(zO,C(BO).readonly()),readLongTermSeries:L(f({deviceId:a(),series:ck,scope:u().optional(),from:a(),to:a(),limit:a().int().positive().optional()}),C(dk).readonly()),getEventDensity:L(f({deviceId:a(),since:a(),until:a(),bucketMs:a().int().positive()}),C(VO).readonly()),getEventDensityBatch:L(f({deviceIds:C(a()).min(1).max(200),since:a(),until:a(),bucketMs:a().int().positive()}),C(HO).readonly()),pruneEventsBefore:L(f({deviceId:a(),cutoffMs:a()}),f({motion:a().int(),object:a().int(),audio:a().int()}),{kind:`mutation`,auth:`admin`}),pruneTracksBefore:L(f({deviceId:a(),cutoffMs:a()}),qO,{kind:`mutation`,auth:`admin`}),wipeAllAnalytics:L(f({deviceId:a()}),qO,{kind:`mutation`,auth:`admin`}),reconcileFromDisk:L(f({deviceId:a()}),JO,{kind:`mutation`,auth:`admin`}),deleteTracks:L(f({deviceId:a(),trackIds:C(u()).min(1)}),f({deleted:a().int(),failed:C(u()).readonly(),sparedMediaIds:C(a().int()).readonly().optional()}),{kind:`mutation`,auth:`admin`}),setTrackFlags:L(f({deviceId:a(),trackId:u(),flags:AD}),jD,{kind:`mutation`}),listArchivedDebugNotes:L(Hi,C(Vi).readonly(),{kind:`query`}),setTrackRelation:L(Xi,Ji,{kind:`mutation`}),clearTrackRelation:L(Zi,Qi,{kind:`mutation`}),setTrackPurity:L($i,ea,{kind:`mutation`}),listTrackRelations:L(ta,na,{kind:`query`}),listBirthDecisions:L(zi,C(Ri).readonly(),{kind:`query`}),getEventStoreFootprint:L(f({}),XO,{kind:`query`,auth:`admin`}),getEventMediaFootprintByKind:L(f({deviceId:a().int().optional()}),QO,{kind:`query`,auth:`admin`}),pruneEvents:L(f({olderThanMs:a(),reason:ya.optional()}),$O,{kind:`mutation`,auth:`admin`}),deleteDeviceEvents:L(f({deviceId:a()}),$O,{kind:`mutation`,auth:`admin`}),pauseForStorageMigration:L(wo,f({paused:h(!0)}),{kind:`mutation`,auth:`admin`}),resumeForStorageMigration:L(wo,f({resumed:h(!0)}),{kind:`mutation`,auth:`admin`}),refreshStorageLocationsForMigration:L(wo,f({refreshed:h(!0)}),{kind:`mutation`,auth:`admin`}),startStorageMigrationMove:L(Ao,f({jobId:u()}),{kind:`mutation`,auth:`admin`}),getStorageMigrationMoveStatus:L(f({jobId:u()}),xo.nullable(),{auth:`admin`}),cancelStorageMigrationMove:L(f({jobId:u()}),f({cancelled:w()}),{kind:`mutation`,auth:`admin`}),relocateMedia:L(Do,f({jobId:u()}),{kind:`mutation`,auth:`admin`}),countUnstampedEventMedia:L(f({}),ko,{auth:`admin`}),countRelocatableMedia:L(rs,ns,{kind:`query`,auth:`admin`}),listRelocateMediaJobs:L(f({}),C(xo).readonly(),{kind:`query`,auth:`admin`}),cancelRelocateMedia:L(f({jobId:u()}),f({cancelled:w()}),{kind:`mutation`,auth:`admin`}),listOpsLog:L(xa,C(ba).readonly(),{kind:`query`,auth:`admin`}),reclaimDebugMedia:L(ok,ak,{kind:`mutation`,auth:`admin`}),getMediaReclaimStatus:L(f({}),sk,{kind:`query`,auth:`admin`}),getTrainingExportSummary:L(f({deviceIds:C(a()).optional()}),ID,{kind:`query`,auth:`admin`}),getTrainingExportUrl:L(f({deviceIds:C(a()).optional()}),f({url:u()}),{kind:`query`,auth:`admin`}),listRetrainStaging:L(f({deviceIds:C(a()).optional(),limit:a().int().min(1).max(500).optional()}),C(nO).readonly(),{kind:`query`,auth:`admin`}),listRetrainFrames:L(f({trackId:u()}),lO,{kind:`query`,auth:`admin`}),selectRetrainFrames:L(f({deviceId:a(),trackId:u(),mediaIds:C(a().int()).min(1)}),cO,{kind:`mutation`,auth:`admin`}),deselectRetrainFrame:L(f({deviceId:a(),trackId:u().optional(),frameId:u()}),f({removed:w(),removedAnnotations:a().int()}),{kind:`mutation`,auth:`admin`}),getRetrainFrameImage:L(f({frameId:u()}),f({base64:u(),width:a().int(),height:a().int()}),{kind:`query`,auth:`admin`}),proposeRetrainAnnotations:L(f({deviceId:a(),trackId:u().optional(),frameId:u(),subject:mO,nodeId:u().optional()}),hO,{kind:`mutation`,auth:`admin`}),listRetrainAnnotations:L(f({trackId:u().optional(),frameIds:C(u()).max(2e3).optional()}),C(eO).readonly(),{kind:`query`,auth:`admin`}),saveRetrainAnnotations:L(f({deviceId:a(),trackId:u().optional(),frameId:u(),annotations:C(tO)}),C(eO).readonly(),{kind:`mutation`,auth:`admin`}),completeRetrainTrack:L(f({deviceId:a(),trackId:u()}),OO,{kind:`mutation`,auth:`admin`}),restageRetrainTrack:L(f({deviceId:a(),trackId:u()}),OO,{kind:`mutation`,auth:`admin`}),getRetrainExportUrl:L(uO.extend({layout:dO.optional()}),f({url:u()}),{kind:`query`,auth:`admin`}),setRetrainFrameComplete:L(f({deviceId:a(),trackId:u().optional(),frameId:u(),complete:w()}),oO,{kind:`mutation`,auth:`admin`}),writeRetrainArchive:L(f({filter:uO,layout:dO,target:fO}),pO,{kind:`mutation`,auth:`admin`,timeoutMs:60*6e4}),previewRetrainDataset:L(f({selection:wO,completeOnly:w().optional()}),TO,{kind:`query`,auth:`admin`}),createRetrainDatasetVersion:L(f({name:u().max(120),selection:wO,layout:dO,completeOnly:w()}),DO,{kind:`mutation`,auth:`admin`,timeoutMs:12e4}),listRetrainDatasetVersions:L(f({}),C(EO).readonly(),{kind:`query`,auth:`admin`}),deleteRetrainDatasetVersion:L(f({id:u()}),f({deleted:w()}),{kind:`mutation`,auth:`admin`}),verifyRetrainDatasetVersion:L(f({id:u()}),f({found:w(),annotationHash:u(),matches:w(),missingFrames:a().int()}),{kind:`query`,auth:`admin`,timeoutMs:12e4}),listRetrainAssistProfiles:L(f({}),C(bO).readonly(),{kind:`query`,auth:`admin`}),proposeRetrainAnnotationsWithLlm:L(f({deviceId:a(),trackId:u().optional(),frameId:u(),profileId:u(),classes:C(XD).min(1),boxes:C(f({ref:u(),bbox:$D,macroClass:XD,label:u().optional()})).max(50),allowCloud:w()}),CO,{kind:`mutation`,auth:`admin`,timeoutMs:18e4}),createRetrainCollection:L(f({name:u().max(120)}),_O,{kind:`mutation`,auth:`admin`}),listRetrainCollections:L(f({}),C(gO).readonly(),{kind:`query`,auth:`admin`}),renameRetrainCollection:L(f({id:u(),name:u().max(120)}),vO,{kind:`mutation`,auth:`admin`}),deleteRetrainCollection:L(f({id:u()}),f({deleted:w(),removedFrames:a().int()}),{kind:`mutation`,auth:`admin`}),addRetrainFrameFromRecording:L(f({collectionId:u(),deviceId:a(),epochMs:a()}),yO,{kind:`mutation`,auth:`admin`,timeoutMs:6e4}),addRetrainFramesToCollection:L(f({collectionId:u(),frameIds:C(u()).min(1).max(500)}),f({added:a().int(),alreadyMember:a().int(),unknownFrameIds:C(u()).readonly()}),{kind:`mutation`,auth:`admin`}),removeRetrainFrameFromCollection:L(f({collectionId:u(),frameId:u()}),f({removed:w(),deletedFrame:w()}),{kind:`mutation`,auth:`admin`}),listRetrainCollectionFrames:L(f({collectionId:u()}),C(oO).readonly(),{kind:`query`,auth:`admin`}),getEventMedia:L(f({ownerType:Ae,eventId:a().int(),kind:KD.optional(),deviceId:a()}),C(JD).readonly()),getTrackMedia:L(f({trackId:u(),kinds:C(KD).optional(),deviceId:a()}),C(JD).readonly()),listTrackMedia:L(f({trackId:u(),deviceId:a()}),C(YD).readonly()),listEventMedia:L(f({ownerType:Ae,eventId:a().int(),deviceId:a()}),C(YD).readonly()),ownersWithMedia:L(f({deviceId:a(),ownerKind:Me,ownerIds:C(u()).max(5e3)}),C(u()).readonly()),searchObjectEvents:L(KO,C(GO).readonly(),{caller:`required`}),wipeObjectEmbeddings:L(f({}),tk,{kind:`mutation`,auth:`admin`}),rebuildObjectEmbeddings:L(ek,rk,{kind:`mutation`,auth:`admin`}),getObjectEmbeddingRebuildStatus:L(f({}),ik)},events:{onFrameTracked:{data:f({deviceId:a(),timestamp:a(),frameWidth:a(),frameHeight:a(),detections:C(WO).readonly()})},onTrackStarted:{data:f({deviceId:a(),trackId:u(),className:u()})},onTrackEnded:{data:f({deviceId:a(),trackId:u(),className:u(),durationMs:a()})},onDetectionEvent:{data:f({deviceId:a(),kind:pD,eventId:u(),timestamp:a()})}}},pk=f({stepId:u(),modelId:u(),detections:C(f({bbox:d([a(),a(),a(),a()]),score:a(),landmarks:C(f({x:a(),y:a()})).optional()})).min(1)}),mk=f({handle:Fa,cropFrameSpace:f({x:a(),y:a(),w:a(),h:a()})});f({crop:f({left:a(),top:a(),width:a().positive(),height:a().positive()}).optional(),content:f({width:a().int().positive(),height:a().int().positive()}),fit:S([`stretch`,`contain`]),format:S([`rgb`,`gray`,`jpeg`])});var hk=f({registryId:u().min(1),id:u().min(1),width:a().int().positive(),height:a().int().positive(),format:S([`rgb`,`gray`]),timestamp:a(),capturedAt:a().optional()}),gk=S([`onnx`,`coreml`,`openvino`,`tflite`,`pt`,`gguf`]),_k=S([`detector`,`cropper`,`classifier`,`refiner`,`audio-classifier`]),Y=f({runtime:h(`python`),backend:u(),format:gk,device:u().optional()}),vk=f({deviceKey:u().nullable(),runtime:u(),batchMode:u(),windowMs:a(),maxBatchSize:a(),concurrency:a(),numWorkers:a()}),yk=f({engine:Y,devices:C(f({id:u(),label:u(),description:u().optional()})).readonly(),defaultDevice:u()}),bk=pe(()=>f({addonId:u(),addonName:u(),slot:_k,inputClasses:C(u()).readonly(),outputClasses:C(u()).readonly(),enabled:w(),modelId:u(),children:C(bk).readonly(),group:u().optional(),settings:b(u(),s()).optional()})),xk=f({id:u(),name:u(),formats:b(u(),Dl),group:Al.optional(),legacy:w().optional(),provider:Ml.optional(),defaultConfidence:a().optional(),suppliesSteps:C(Il).readonly().optional()}),Sk=v(),Ck=f({id:u(),name:u(),slot:_k,inputClasses:C(u()).readonly(),outputClasses:C(u()).readonly(),childSlots:C(_k).readonly(),models:C(xk).readonly(),defaultModelId:u(),defaultModelIdByFormat:b(u(),u()).optional(),enabledByDefault:w().optional(),backfillIntoExistingOverrides:w().optional(),defaultConfidence:a(),group:u().optional(),configSchema:C(Sk).readonly().optional()}),wk=f({id:_k,label:u(),priority:a(),parentSlot:_k.nullable(),addons:C(Ck).readonly()}),Tk=f({availableEngines:C(yk).readonly(),selectedEngine:Y,slots:C(wk).readonly()}),Ek=f({runtimeId:S([`onnx`,`openvino`,`coreml`,`edgetpu`]).nullable(),device:u().nullable(),state:S([`idle`,`installing`,`verifying`,`ready`,`failed`]),progress:a().optional(),error:u().optional(),nextRetryAt:a().optional(),configIssues:C(u()).optional()}),Dk=pe(()=>f({addonId:u(),modelId:u().optional(),enabled:w().default(!0),children:C(Dk).optional(),settings:b(u(),s()).optional(),jumpDeviceKey:u().optional()})),Ok=f({addonId:u(),chosen:u(),running:u(),format:u()}),kk=f({addonId:u(),kind:S([`unknown-addon`,`no-format-build`,`unknown-device`]),detail:u()}),Ak=f({ok:w(),issues:C(kk).readonly(),substitutions:C(Ok).readonly(),format:u()}),jk=f({filename:u(),stepIds:C(u()).readonly().optional()}),Mk=f({base64:u(),filename:u()}),Nk=f({filename:u(),sizeKb:a()}),Pk=f({base64:u()}),Fk=f({id:u(),name:u(),description:u(),available:w(),rawLabels:C(u()).readonly().optional()}),Ik=f({activeBackend:u(),availableBackends:C(Fk).readonly(),sampleRate:a(),chunkDurationMs:a()}),Lk=f({filePath:u(),sizeMB:a(),durationMs:a()}),Rk=f({success:w(),error:u().optional(),frame:v().optional()}),zk=v(),Bk=v(),Vk=v(),Hk=v(),Uk=v(),Wk=v(),Gk={name:`pipeline-executor`,scope:`system`,mode:`singleton`,methods:{getAvailableEngines:L(y(),C(Y)),getSelectedEngine:L(y(),Y),getDefaultSteps:L(Y,C(bk)),getEngineProvisioning:L(f({nodeId:u()}),Ek),getVideoPipelineSteps:L(y(),b(u(),f({modelId:u(),settings:b(u(),s()).readonly()}))),setVideoPipelineSteps:L(f({steps:b(u(),f({modelId:u(),settings:b(u(),s()).readonly()}))}),f({success:h(!0)}),{kind:`mutation`,auth:`admin`}),clearDeviceOverrides:L(f({nodeId:u()}),f({success:h(!0),clearedDevices:a()}),{kind:`mutation`,auth:`admin`}),clearModelBoundDeviceOverrides:L(f({nodeId:u(),deviceIds:C(a()).readonly().optional(),dryRun:w()}),f({entries:C(f({deviceId:a(),keys:C(u()).readonly()})).readonly(),refused:C(f({deviceId:a(),reason:u()})).readonly()}),{kind:`mutation`,auth:`admin`}),getInferenceDeviceHealth:L(f({nodeId:u()}),f({unhealthy:C(f({deviceKey:u(),state:S([`failed`,`backoff`]),since:a(),deaths:a(),lastError:u()})).readonly()})),rearmInferenceDevice:L(f({nodeId:u(),deviceKey:u()}),f({rearmed:w()}),{kind:`mutation`,auth:`admin`}),getSchema:L(y(),Tk),getGlobalSteps:L(y(),C(bk).readonly().nullable()),getGlobalPipelineConfig:L(y(),zk),getOrchestratorConfigSchema:L(y(),Bk),validatePipeline:L(f({steps:C(Dk),deviceKey:u().optional()}),Ak),getCapabilities:L(y(),Hk),getAddonModels:L(f({addonId:u()}),Uk),downloadModel:L(f({addonId:u(),modelId:u(),format:gk}),Lk,{kind:`mutation`}),deleteModel:L(f({addonId:u(),modelId:u(),format:gk}),f({success:h(!0)}),{kind:`mutation`}),runPipeline:L(f({steps:C(Dk).min(1),frame:vf.optional(),frameRef:hk.optional(),frameHandle:Fa.optional(),imageBase64:u().optional(),image:x(Uint8Array).optional(),referenceImage:u().optional(),deviceId:a().optional(),sessionId:u().optional(),plane:S([`full`,`frame`]).optional(),deviceKey:u().optional(),nativeCropRef:mk.optional(),replay:h(!0).optional(),suppliedRoot:pk.optional()}),Wk,{kind:`mutation`}),runPipelineBatch:L(f({steps:C(Dk).min(1),frames:C(vf).min(1).max(255),deviceId:a().optional(),sessionId:u().optional(),frameId:a().int().nonnegative().optional(),deviceKey:u().optional()}),f({results:C(Wk).readonly()}),{kind:`mutation`}),cacheFrameInPool:L(f({data:x(Uint8Array),width:a().int().positive(),height:a().int().positive(),format:S([`rgb`,`bgr`,`gray`])}),f({frameId:a(),width:a(),height:a()}),{kind:`mutation`}),inferCached:L(f({stepId:u(),frameId:a().int(),modelId:u().min(1)}),b(u(),s()),{kind:`mutation`}),uncacheFrame:L(f({frameId:a().int()}),y(),{kind:`mutation`}),getEffectiveTuning:L(f({deviceKey:u().optional()}),vk),listLoadedEngines:L(y(),C(f({engineKey:u(),engine:Y,modelsLoaded:C(u()).readonly(),inUseByCameras:C(a()).readonly(),kind:S([`runtime`,`device-pool`]),poolPid:a().nullable(),idleMs:a().nullable(),idleTtlMs:a().nullable()})).readonly()),spinEngine:L(f({engine:Y}),f({success:h(!0)}),{kind:`mutation`,auth:`admin`}),killEngine:L(f({engine:Y,force:w().optional()}),f({success:w(),reason:u().optional()}),{kind:`mutation`,auth:`admin`}),listReferenceImages:L(y(),C(jk).readonly()),getReferenceImage:L(f({filename:u()}),Mk.nullable()),getReferenceAudioFiles:L(y(),C(Nk).readonly()),getReferenceAudio:L(f({filename:u()}),Pk.nullable()),getAudioCapabilities:L(y(),Ik),runAudioTest:L(f({addonId:u(),modelId:u(),filename:u().optional(),settings:b(u(),s()).optional()}),Rk,{kind:`mutation`}),getDetectionConfigSchema:L(y(),Vk)}},Kk=S(Cl),qk={min:1,max:8},Jk=S([`intel-core-ultra`,`intel-n-series`,`apple-m-base`,`apple-m-pro`,`unknown`]),Yk=S([`intel-npu`,`intel-igpu`,`x86-cpu`,`arm-cpu`,`apple-ane`,`coral`]),Xk=m(`kind`,[f({kind:h(`capacity`),sessions:a(),minSessions:a()}),f({kind:h(`tie-faster`),over:u(),recallDelta:a()}),f({kind:h(`stepped-down`),from:u(),to:u(),limitedBy:u()}),f({kind:h(`no-fit-lightest`),sessions:a(),minSessions:a()}),f({kind:h(`derived-latency`),modelId:u()}),f({kind:h(`cpu-device`)}),f({kind:h(`coral-untouched`)}),f({kind:h(`device-disabled`)}),f({kind:h(`device-unavailable`)}),f({kind:h(`node-offline`)}),f({kind:h(`no-hardware-facts`)}),f({kind:h(`no-measured-data`),hardwareClass:Jk}),f({kind:h(`no-family-build`),format:Kk}),f({kind:h(`kept-custom-pin`),modelId:u(),deviceKey:u()})]),Zk=S([`custom-pin`]),Qk=m(`kind`,[f({kind:h(`table`)}),f({kind:h(`node-benchmark`),resultId:u(),measuredAtMs:a()})]),$k=f({modelId:u(),p50Ms:a(),fps:a(),measured:w(),source:Qk.optional(),capacitySessions:a(),personRecall:a()}),eA=f({deviceKey:u(),accelerator:Yk.nullable(),enabled:w(),available:w(),chosen:$k.nullable(),kept:Zk.optional(),reasons:C(Xk).readonly()}),tA=f({nodeId:u(),reachable:w(),hardwareClass:Jk.nullable(),cpuModel:u().nullable(),skipped:w(),acceleratorModelId:u().nullable(),devices:C(eA).readonly(),reasons:C(Xk).readonly()}),nA=f({stepId:u(),before:u().nullable(),after:u().nullable()}),rA=f({nodeId:u(),deviceKey:u(),madeExplicit:w(),modelPins:C(nA).readonly(),thresholds:C(f({stepId:u(),keys:C(u()).readonly()})).readonly()}),iA=f({deviceId:a(),source:S([`step-override`,`wholesale`]),nodeId:u(),deviceKey:u().nullable(),stepId:u(),modelIdBefore:u().nullable(),keys:C(u()).readonly()}),aA=f({deviceId:a(),keys:C(u()).readonly()}),oA=m(`kind`,[f({kind:h(`detector-store-cluster-wide`),skippedNodes:C(u()).readonly()}),f({kind:h(`detector-store-unreadable`),error:u()}),f({kind:h(`coral-enabled`),nodeId:u(),deviceKey:u()}),f({kind:h(`custom-pin-kept`),nodeId:u(),deviceKey:u().nullable(),deviceId:a().nullable(),modelId:u()}),f({kind:h(`custom-registry-unreadable`),error:u()})]),sA=f({headroom:a().min(.3).max(.5).default(.4),minSessionsPerDevice:a().int().min(qk.min).max(qk.max).default(2)}),cA=f({planHash:u(),family:h(`yolov9`),headroom:a(),minSessionsPerDevice:a(),cameraFps:a(),generatedAt:a(),nodes:C(tA).readonly(),nodeChanges:C(rA).readonly(),cameraClears:C(iA).readonly(),detectorStoreClears:C(aA).readonly(),warnings:C(oA).readonly()}),lA=f({planHash:u(),headroom:a().min(.3).max(.5).default(.4),minSessionsPerDevice:a().int().min(qk.min).max(qk.max).default(2)}),uA=f({phase:S([`download`,`camera-overrides`,`detector-thresholds`,`node-models`,`redispatch`]),ok:w(),detail:u()}),dA=m(`kind`,[f({kind:h(`applied`),planHash:u(),phases:C(uA).readonly()}),f({kind:h(`aborted`),phases:C(uA).readonly()}),f({kind:h(`stale`),plan:cA}),f({kind:h(`refused`),reason:S([`apply-in-progress`])})]),fA=S([`least-loaded`,`share`]),pA=`share`,mA=`sessionPlacement`;function hA(e){let t=fA.safeParse(e);return t.success?t.data:pA}var gA=f({nodes:b(u(),a().positive()).default({}),devices:b(u(),b(u(),a().positive())).default({})}),_A=f({windowMs:a().int().min(6e4).max(1440*60*1e3).default(3600*1e3)}),vA=f({deviceKey:u(),sessionsNow:a(),sessionsStarted:a(),observedShare:a().nullable()}),yA=f({nodeId:u(),sessionsNow:a(),sessionsStarted:a(),observedShare:a().nullable(),peakSessions:a(),yieldsAway:a(),devices:C(vA).readonly()}),bA=f({deviceId:a(),deviceKey:u(),reason:S([`disabled`,`absent`])}),xA=f({policy:fA,windowMs:a(),observedForMs:a(),sessionsNow:a(),clusterPeakSessions:a(),nodes:C(yA).readonly(),stalePins:C(bA).readonly()}),SA=S([`hardware`,`benchmark`]),CA=S([`no-benchmark-results`,`partial-benchmark-results`]),wA=f({headroom:a().min(.3).max(.5).default(.4),source:SA.default(`hardware`)}),TA=f({deviceKey:u(),share:a(),modelId:u().nullable(),fps:a().nullable(),measured:w(),suggestedMaxSessions:a().nullable()}),EA=f({nodeId:u(),share:a().nullable(),capacitySessions:a(),devices:C(TA).readonly(),skippedReason:u().nullable(),capacitySource:SA.nullable(),capacityFallback:CA.nullable()}),DA=f({headroom:a(),source:SA,cameraFps:a(),minSessionsPerDevice:a(),nodes:C(EA).readonly()}),OA=S([`hardware`,`benchmark`,`manual`]),kA=`benchmark`;function AA(e){return e!==`manual`}var jA=.4,MA=`shareSource`;function NA(e){if(e===`auto`)return`hardware`;let t=OA.safeParse(e);return t.success?t.data:kA}var PA=f({source:OA}),FA=f({nodes:b(u(),a()),devices:b(u(),b(u(),a()))}),IA=f({deviceKey:u(),eligible:w(),configuredPct:a(),effectivePct:a()}),LA=f({nodeId:u(),eligible:w(),configuredPct:a(),effectivePct:a(),capacitySource:SA.nullable(),capacityFallback:CA.nullable(),devices:C(IA).readonly()}),RA=f({source:OA,policy:fA,autoPending:w(),computedAt:a().nullable(),trigger:u().nullable(),nodes:C(LA).readonly(),nodeWeights:b(u(),a()),deviceWeights:b(u(),b(u(),a()))}),X={fpsPerStream:10,budgetMinutes:45,minBudgetMinutes:10,maxBudgetMinutes:120,staleAfterDays:30,settleSec:5,measureSec:20,drainTimeoutSec:120,maxModelsPerDevice:6},zA=S([`device`,`pipeline`]),BA=f({deviceKey:u().min(1),modelIds:C(u().min(1)).min(1).max(X.maxModelsPerDevice)}),VA=f({nodeId:u().min(1),devices:C(BA).min(1),phases:C(zA).min(1).default([`device`,`pipeline`]),steps:C(u().min(1)).default([]),fpsPerStream:a().int().min(1).max(30).default(X.fpsPerStream),budgetMinutes:a().int().min(X.minBudgetMinutes).max(X.maxBudgetMinutes).default(X.budgetMinutes),keepDownloadedModels:w().default(!1),acceptInsufficientHeadroom:w().default(!1)}),HA=S([`benchmark-active`,`node-offline`,`unknown-device`,`no-phase`,`insufficient-headroom`]),UA=f({kind:HA,detail:u(),overridable:w()}),WA=f({deviceId:a(),placedOnNode:w(),pinnedToNode:w()}),GA=f({deviceId:a(),reason:h(`only-frame-source`)}),KA=f({nodeId:u(),online:w(),moving:C(WA).readonly(),staying:C(GA).readonly(),estimatedDurationMs:a(),budgetMs:a(),phases:C(zA).readonly(),steps:C(u()).readonly(),devices:C(BA).readonly(),headroom:f({sessionsNow:a(),otherNodesCapacitySessions:a().nullable()}),refusals:C(UA).readonly(),canStart:w()}),qA=f({phase:S([`preparing`,`device`,`pipeline`,`cleanup`]),deviceKey:u().nullable(),modelId:u().nullable(),load:a().nullable(),cellsDone:a(),cellsTotal:a(),message:u()}),JA=S([`p95`,`drops`,`errors`,`stall`,`cpu`,`ram`,`none`]),YA=f({load:a(),pass:w(),p95Ms:a(),dropRatio:a(),fps:a(),cpuPct:a().nullable(),ramFreePct:a().nullable(),failReasons:C(u()).readonly()}),XA=f({phase:h(`device`),deviceKey:u(),modelId:u(),p50Ms:a(),p95Ms:a(),p99Ms:a(),fps:a(),kMax:a(),limitedBy:JA,warmupMs:a(),ramp:C(YA).readonly()}),ZA=f({phase:h(`pipeline`),deviceKey:u(),modelId:u(),steps:C(u()).readonly(),maxSessions:a(),limitedBy:JA,stepsFired:C(u()).readonly(),warmupMs:a(),ramp:C(YA).readonly()}),QA=m(`phase`,[XA,ZA]),$A=f({pipelineVersion:u().nullable(),cpuModel:u().nullable(),ramGb:a().nullable(),os:u().nullable(),pools:b(u(),f({runtime:u(),numWorkers:a(),concurrency:a(),batchMode:u()})).default({})}),ej=f({id:u(),revision:u().nullable(),frames:a(),width:a(),height:a()}),tj=f({runId:u().min(1),devices:C(BA).min(1),phases:C(zA).min(1),steps:C(u()).default([]),fpsPerStream:a().int().min(1).max(30),deadlineAtMs:a(),settleSec:a().min(0).max(60).default(X.settleSec),measureSec:a().min(2).max(300).default(X.measureSec),keepDownloadedModels:w().default(!1)}),nj=S([`running`,`done`,`failed`,`aborted`]),rj=f({runId:u(),nodeId:u(),state:nj,progress:qA.nullable(),cells:C(QA).readonly(),fingerprint:$A.nullable(),clip:ej.nullable(),activeCameraIds:C(a()).readonly(),deletedModels:C(u()).readonly(),error:u().nullable(),startedAtMs:a(),finishedAtMs:a().nullable()}),ij=S([`draining`,`measuring`,`restoring`,`done`,`failed`,`aborted`]),aj=S([`completed`,`operator-abort`,`deadline`,`node-lost`,`runner-lost`,`hub-restart`,`drain-timeout`,`failed`]),oj=f({runId:u(),nodeId:u(),state:ij,plan:VA,startedAtMs:a(),deadlineAtMs:a(),finishedAtMs:a().nullable(),endReason:aj.nullable(),error:u().nullable(),moved:C(a()).readonly(),staying:C(a()).readonly(),contaminated:w(),progress:qA.nullable(),resultIds:C(u()).readonly()}),sj=f({modeNodeId:u().nullable(),run:oj.nullable()}),cj=f({id:u(),runId:u(),nodeId:u(),cell:QA,fpsPerStream:a(),fingerprint:$A.nullable(),clip:ej.nullable(),contaminated:w(),stayingCameras:C(a()).readonly(),partialRun:w(),measuredAtMs:a()}),lj=f({nodeId:u().optional(),deviceKey:u().optional()}),uj=cj.extend({standing:S([`fresh`,`stale`,`superseded`]),staleWhy:S([`age`,`runtime`,`pool-tuning`]).nullable()}),dj=f({runId:u(),nodeId:u(),startedAtMs:a(),deadlineAtMs:a(),plan:VA,moved:C(a()).readonly(),staying:C(a()).readonly()}),fj=f({nodeId:u(),reachable:w(),devices:C(f({deviceKey:u(),enabled:w(),available:w(),suggested:C(u()).readonly(),all:C(u()).readonly(),currentModelId:u().nullable()})).readonly(),steps:C(f({id:u(),name:u(),slot:u()})).readonly()}),pj=f({activeCameras:a(),throttledCameras:a(),avgInferenceTimeMs:a(),queueDepth:a()}),mj=f({detectionMode:S([`disabled`,`always-on`,`on-motion`]),configuredFps:a(),actualFps:a(),queueDepth:a(),avgInferenceTimeMs:a(),droppedFrames:a(),phase:S([`idle`,`watching`,`active`])}),hj=mj.extend({deviceId:a()}),gj=S([`polygon`,`tripwire`]),_j=f({x:a(),y:a()}),vj=f({id:u(),name:u(),kind:gj.default(`polygon`),polygon:C(_j).readonly(),color:u().default(`#3b82f6`)}),yj={name:`zones`,scope:`device`,mode:`singleton`,deviceTypes:[R.Camera],methods:{listZones:L(f({deviceId:a()}),C(vj).readonly()),addZone:L(f({deviceId:a(),zone:vj}),y(),{kind:`mutation`,auth:`admin`}),removeZone:L(f({deviceId:a(),zoneId:u()}),y(),{kind:`mutation`,auth:`admin`}),updateZone:L(f({deviceId:a(),zone:vj}),y(),{kind:`mutation`,auth:`admin`})},runtimeState:f({zones:C(vj).readonly()}),durability:`restored`},bj=f({x:a(),y:a(),w:a(),h:a()}),xj=f({bytes:x(Uint8Array).optional(),jpeg:u().optional(),jpegBytes:x(Uint8Array).optional(),width:a().int().positive(),height:a().int().positive(),tier:S([`native`,`ram-fullframe`]).optional()}),Sj=S([`keyFrame`,`thumbnail`]),Cj=S([`handle-gone`,`encode-failed`]),wj=m(`parked`,[f({parked:h(!0),nodeId:u(),width:a().int().positive(),height:a().int().positive(),bytes:a().int().nonnegative(),replaced:w()}),f({parked:h(!1),nodeId:u(),reason:Cj,handleAgeMs:a().nullable(),detail:u().optional()})]),Tj=f({jpeg:u().optional(),jpegBytes:x(Uint8Array).optional(),width:a().int().positive(),height:a().int().positive(),timestamp:a(),parkedAt:a()}),Ej=f({bbox:bj,className:u()}),Dj=f({stepId:u(),className:u(),score:a(),bbox:bj.optional(),embedding:u().optional(),embeddingMagnitude:a().optional(),embeddingModelId:u().optional(),label:u().optional(),labelTier:p([h(1),h(2)]).optional(),labelModelId:u().optional(),alignedCropJpeg:u().optional(),nativeFaceShortSidePx:a().optional(),landmarks:C(f({x:a(),y:a()})).optional()}),Oj=S([`unknown-step`,`model-not-servable`,`unreadable-frame`,`execution-failed`]),kj=m(`kind`,[f({kind:h(`ran`),nodeId:u(),modelId:u(),details:C(Dj)}),f({kind:h(`refused`),nodeId:u(),reason:Oj,detail:u()})]),Aj={min:0,max:6e4,default:3e4,step:500},jj={min:0,max:6e5,default:12e4,step:5e3},Mj={min:5e3,max:6e5,default:9e4,step:5e3},Nj={min:1,max:30,default:4,step:1},Pj={min:1,max:30,default:10,step:1},Fj={min:0,max:300,default:300,step:5},Ij={min:1,max:10,default:4,step:1},Lj={min:0,max:30,default:12,step:1},Rj=S([`onboard`,`analyzer`,`device-activity`]),zj=f({source:Rj,triggeredBy:TE,sensorName:u().optional()}),Bj=C(Rj),Vj={analyzer:`Frame-diff Analyzer (motion addon)`,onboard:`Camera sensors`,"device-activity":`Device activity (the device says it is working)`};function Hj(e){let t=Rj.safeParse(e);return t.success?Vj[t.data]:e}var Uj=[`analyzer`,`onboard`,`device-activity`],Wj=r(e=>Array.isArray(e)&&e.length>1?e.slice(0,1):e,C(BD).max(1)),Gj=f({deviceId:a(),detected:w(),source:Rj.default(`analyzer`),regions:C(PS).readonly().optional()}),Kj=m(`kind`,[f({kind:h(`local-broker`)}),f({kind:h(`remote-restream`),ownerNodeId:u(),ownerReachableHost:u().optional(),hubHostnameOverride:u().optional()})]).describe(`Per-camera frame-source mode for the runner (P2c)`),qj=f({modelId:u().optional(),settings:b(u(),s()).optional()}),Jj=f({deviceKey:u(),weight:a().positive().default(1),maxSessions:a().int().positive().nullable().default(null),steps:b(u(),qj).optional()}),Yj=f({deviceId:a(),detectionMode:S([`disabled`,`always-on`,`on-motion`]).default(`on-motion`),audioMode:S([`disabled`,`always-on`,`on-motion`]).default(`always-on`),motionCooldownMs:a().min(Aj.min).default(Aj.default),maxSessionHoldMs:a().min(jj.min).max(jj.max).optional(),audioMotionWindowMs:a().min(Mj.min).max(Mj.max).optional(),motionFps:a().min(Nj.min).max(Nj.max).default(Nj.default),detectionFps:a().min(Pj.min).max(Pj.max).default(Pj.default),motionStreamId:u(),detectionStreamId:u(),audioStreamPick:Ca.optional(),motionSources:Bj.default([`analyzer`]),sessionTrigger:zj.optional(),detectionSources:Wj.default([`pipeline`]),pipelineEnabled:w().default(!0),steps:C(Dk).readonly().optional(),audio:f({modelId:u().optional(),enabled:w()}).nullable().optional(),zones:C(vj).readonly().default([]),onboardMotionDrivesAnalyzer:w().default(!0),preRollInferenceEnabled:w().default(!0),preRollInferenceFrames:a().min(Lj.min).max(Lj.max).default(Lj.default),occupancyRecheckEnabled:w().default(!0),occupancyRecheckSec:a().min(Fj.min).max(Fj.max).default(Fj.default),occupancyRecheckFrames:a().min(Ij.min).max(Ij.max).default(Ij.default),frameSource:Kj.default({kind:`local-broker`}),deviceKey:u().optional(),inferenceDevices:C(Jj).readonly().optional()}),Xj=[{key:`motionSources`,type:`multiselect`,label:`Motion Sources`,default:[`analyzer`],options:Uj.map(e=>e===`onboard`?{value:e,label:Vj[e],description:`The camera's own motion, plus any sensor attached to it`}:{value:e,label:Vj[e]})},{key:`detectionSources`,type:`multiselect`,label:`Detection Sources`,default:[`pipeline`],options:[{value:`pipeline`,label:`This node (ML root step on decoded frames)`},{value:`onboard`,label:`Camera onboard AI (replaces the root step when picked alone)`}]},{key:`motionFps`,type:`slider`,label:`Motion FPS (analyzer)`,min:Nj.min,max:Nj.max,step:Nj.step,default:Nj.default,showValue:!0,unit:`fps`,nullable:!0,nullLabel:`Default`,showWhen:{field:`motionSources`,includes:`analyzer`}},{key:`detectionFps`,type:`slider`,label:`Detection FPS`,min:Pj.min,max:Pj.max,step:Pj.step,default:Pj.default,showValue:!0,unit:`fps`,nullable:!0,nullLabel:`Default`},{key:`motionCooldownMs`,type:`slider`,label:`Motion Cooldown`,description:`Time without a fresh motion event before the active phase ends. Applies to all motion sources — every motion event re-arms the timer.`,min:Aj.min,max:Aj.max,step:Aj.step,default:Aj.default,showValue:!0,unit:`s`,displayScale:1e3,nullable:!0,nullLabel:`Default`},{key:`maxSessionHoldMs`,type:`slider`,label:`Max session hold`,description:`Upper bound on how long detection keeps running past the motion cooldown while a subject is still moving in-frame but no longer triggering motion. Prevents the detection box from stopping on a slow-moving subject. Set to 0 to disable.`,min:jj.min,max:jj.max,step:jj.step,default:jj.default,showValue:!0,unit:`s`,displayScale:1e3,nullable:!0,nullLabel:`Default`},{key:`audioMotionWindowMs`,type:`slider`,label:`Audio window after motion`,description:`How long audio keeps being analysed after the last motion event. Each new motion event extends the window without restarting the audio stream.`,min:Mj.min,max:Mj.max,step:Mj.step,default:Mj.default,showValue:!0,unit:`s`,displayScale:1e3,nullable:!0,nullLabel:`Default`,showWhen:{field:`audioMode`,equals:`on-motion`}},{key:`onboardMotionDrivesAnalyzer`,type:`boolean`,label:`Run motion analyzer on onboard motion`,description:`When onboard motion is detected, temporarily start the frame-diff analyzer to emit zone results. Stops after the motion cooldown window.`,default:!0,showWhen:{field:`motionSources`,includes:`onboard`}},{key:`preRollInferenceEnabled`,type:`boolean`,style:`checkbox`,label:`Detect in the pre-roll`,description:`Run detection over the few seconds of footage the camera had already buffered when motion fired, so a subject that was in view before the trigger is found at the moment it appeared rather than seconds later. The burst is bounded and never delays live detection.`,default:!0},{key:`preRollInferenceFrames`,type:`slider`,label:`Pre-roll frames`,description:`How many frames of buffered history may be detected on, per session. Higher samples the history more densely; 0 disables the pass.`,min:Lj.min,max:Lj.max,step:Lj.step,default:Lj.default,showValue:!0,showWhen:{field:`preRollInferenceEnabled`,equals:!0}},{key:`occupancyRecheckEnabled`,type:`boolean`,style:`checkbox`,label:`Occupancy re-check`,description:`Periodically re-sample a few frames during the watching phase, so objects that are simply parked are still counted (motion gating alone loses them after a restart). On by default at a wide interval; turn it off on cameras where the extra decoder re-dial is expensive.`,default:!0},{key:`occupancyRecheckSec`,type:`slider`,label:`Occupancy re-check interval`,description:`How often (in seconds) the runner re-samples a few frames to confirm the scene is truly empty during the watching phase.`,min:Fj.min,max:Fj.max,step:Fj.step,default:Fj.default,showValue:!0,unit:`s`,showWhen:{field:`occupancyRecheckEnabled`,equals:!0}},{key:`occupancyRecheckFrames`,type:`slider`,label:`Occupancy re-check frames`,description:`Number of frames sampled per occupancy re-check burst.`,min:Ij.min,max:Ij.max,step:Ij.step,default:Ij.default,showValue:!0,showWhen:{field:`occupancyRecheckEnabled`,equals:!0}}],Zj=f({nodeId:u(),attachedCameras:a(),activeCameras:a(),avgInferenceFps:a(),avgInferenceTimeMs:a(),queueDepthTotal:a(),devices:C(f({deviceKey:u(),backend:u(),attachedCameras:a()})).default([]),hardware:f({hasGpu:w(),inferenceBackend:u().optional(),cpuCores:a().optional()}),motionSliceWriter:h(`orchestrator`).optional()}),Qj=f({framesDecoded:a(),framesAdmitted:a(),framesDroppedPixelFree:a(),viewsMaterialized:a(),viewsSkipped:a(),workerToRunnerBytes:a(),runnerToPoolRawBytes:a(),runnerToPoolJpegBytes:a(),onDemandFullFrameRequests:a(),onDemandCropRequests:a(),nativeHits:a(),nativeMisses:a(),tileHits:a(),tileMisses:a(),fallbackHits:a(),fallbackMisses:a(),retainedWritesAvoided:a(),residentRefs:a(),residentBytes:a(),releases:a(),evictions:a(),staleMisses:a()}),$j=f({node:Qj,cameras:C(Qj.extend({deviceId:a()}))}),eM=f({nodeId:u(),activeCameras:a(),throttledCameras:a(),avgInferenceTimeMs:a(),queueDepth:a(),frameLazy:$j.optional()}),tM=S([`not-attached`,`battery-asleep`,`not-watching`,`already-bursting`]),nM={name:`pipeline-runner`,scope:`system`,mode:`singleton`,methods:{attachCamera:L(Yj,f({success:h(!0)}),{kind:`mutation`}),detachCamera:L(f({deviceId:a()}),f({success:h(!0)}),{kind:`mutation`}),reportMotion:L(Gj,f({success:h(!0)}),{kind:`mutation`}),getLocalLoad:L(y(),Zj),getLocalMetrics:L(y(),eM),getCameraMetrics:L(f({deviceId:a()}),mj.nullable()),getAllCameraMetrics:L(y(),C(hj).readonly()),getLocalCameras:L(y(),C(a()).readonly()),requestOccupancyBurst:L(f({deviceId:a(),frames:a().int().positive().optional(),reason:u()}),f({started:w(),refusedBecause:tM.optional()}),{auth:`admin`,kind:`mutation`}),getNativeCrop:L(f({handle:Fa,bbox:bj,maxWidth:a().int().positive().optional(),acceptJpegBytes:w().optional(),encodeJpeg:w().optional()}),xj.nullable()),runDetailSubtree:L(f({deviceId:a(),frameHandle:Fa.optional(),frameJpeg:u().optional(),cropJpeg:u().optional(),parent:Ej,steps:C(u()).optional(),supplied:f({stepId:u(),modelId:u(),boxes:C(f({bbox:bj,score:a()})).min(1)}).optional()}),f({details:C(Dj)}).nullable(),{kind:`mutation`}),runStatelessStep:L(f({stepId:u(),modelId:u(),frameJpeg:u(),bbox:bj,className:u(),sourceDeviceId:a()}),kj,{kind:`mutation`}),parkTrackFrame:L(f({deviceId:a(),trackId:u(),kind:Sj,handle:Fa,bbox:bj,maxWidth:a().int().positive().optional(),timestamp:a()}),wj,{kind:`mutation`}),getParkedTrackFrame:L(f({deviceId:a(),trackId:u(),kind:Sj,acceptJpegBytes:w().optional()}),Tj.nullable()),releaseParkedTrackFrames:L(f({deviceId:a(),trackId:u()}),f({released:a().int().nonnegative()}),{kind:`mutation`}),startNodeBench:L(tj,f({accepted:h(!0),runId:u()}),{kind:`mutation`,auth:`admin`}),getNodeBenchStatus:L(f({runId:u()}),rj.nullable(),{auth:`admin`}),abortNodeBench:L(f({runId:u()}),f({aborted:w()}),{kind:`mutation`,auth:`admin`})}},rM=f({engine:Y.optional(),steps:C(Dk).readonly(),audio:f({engine:Y.optional(),modelId:u().optional(),enabled:w(),settings:b(u(),s()).readonly().optional()}).nullable().optional()}),iM=f({modelId:u().optional(),settings:b(u(),s()).optional(),jumpDeviceKey:u().optional()}),aM=f({maxCameras:a().int().nonnegative().nullable().default(null),detectWeight:a().positive().optional(),detect:w().optional(),decode:w().optional(),audio:w().optional(),ingest:w().optional(),decodeBudgetMb:a().int().min(1024).max(65536).optional(),maxLiveDecodeWorkers:a().int().min(1).max(32).optional(),reachableHost:u().optional(),inferenceDevices:b(u(),f({enabled:w(),weight:a().positive().optional(),maxSessions:a().int().positive().optional(),steps:b(u(),iM).optional()})).optional()}),oM=f({steps:C(Dk).readonly(),audio:f({modelId:u(),enabled:w()}).nullable()}),sM=f({modelId:u().optional(),settings:b(u(),s()).readonly().optional()}),cM=b(u(),b(u(),s()).readonly()),lM=f({stepToggles:b(u(),w()).optional(),stepSettings:cM.optional(),stepOverridesByDevice:b(u(),b(u(),b(u(),sM))).optional(),pipelineByAgent:b(u(),oM).optional()}),uM=f({deviceId:a(),agentNodeId:u(),pinned:w(),reason:S([`manual`,`capacity`,`hardware-affinity`,`failover`,`rebalance`]),assignedAt:a()}),dM=f({nodeId:u(),online:w(),load:Zj,score:a(),decodeHwaccel:u().nullable()}),fM=f({totalAgents:a(),onlineAgents:a(),totalCameras:a(),attachedCameras:a(),activeCameras:a(),avgInferenceTimeMs:a(),queueDepth:a()}),pM=b(u(),u()),mM=f({ownerNodeId:u(),reachableHost:u().optional(),configIssue:u().optional()}),hM=f({camStreamId:u(),codec:u(),width:a(),height:a(),fps:a(),kind:u()}),gM=f({streams:C(hM).readonly()}),_M=f({detectionNodeId:u().nullable(),decoderNodeId:u().nullable(),audioNodeId:u().nullable(),sourceNodeId:u().nullable(),pinned:f({detection:w(),decoder:w(),audio:w()}),reasons:f({detection:u().optional(),decoder:u().optional(),audio:u().optional()})}),vM=f({profile:u(),status:u(),codec:u(),width:a(),height:a(),subscribers:a(),inFps:a().nullable()}),yM=f({profiles:C(vM).readonly(),webrtcSessions:a(),rtspRestream:w()}),bM=f({nodeId:u()}),xM=f({enabled:w(),fps:a()}),SM=S([`idle`,`installing`,`verifying`,`ready`,`failed`]),CM=f({state:SM,error:u().optional()}),wM=S([`idle`,`watching`,`active`]),TM=f({nodeId:u(),engine:f({backend:u(),device:u()}),phase:wM,configuredFps:a(),actualFps:a(),queueDepth:a(),avgInferenceMs:a(),provisioning:CM}),EM=f({nodeId:u(),enabled:w()}),DM=Za,OM=f({mode:DM,active:w(),storageBytes:a()}),kM=S([`source`,`broker`,`detection`,`recording`,`switches`]),AM=S([`timeout`,`error`,`partial`]),jM=f({stage:kM,reason:AM,elapsedMs:a()}),MM=f({state:S([`idle`,`running`,`done`,`error`]),total:a().int().nonnegative(),completed:a().int().nonnegative(),currentDeviceId:a().int().nullable(),failed:C(a().int()).readonly(),mediaDropped:a().int().nonnegative(),tracks:a().int().nonnegative(),events:a().int().nonnegative(),startedAtMs:a().int().nullable(),finishedAtMs:a().int().nullable(),error:u().nullable()}),NM=f({deviceId:a(),assignment:_M,source:gM,broker:yM.nullable(),decoder:bM.nullable(),motion:xM.nullable(),detection:TM.nullable(),audio:EM.nullable(),recording:OM.nullable(),switchedOff:C(ni).readonly(),cameraSensors:VE.optional(),degraded:C(jM).readonly(),fetchedAt:a()}),PM=[`disabled`,`unavailable`,`cannot-host-camera-root`,`accelerator-preferred`],FM=S(PM),IM=f({key:u(),backend:u(),device:u(),format:S(Cl),available:w(),enabled:w(),weight:a(),maxSessions:a().nullable(),defaultModelId:u(),steps:b(u(),iM).optional(),exclusion:FM.nullable()}),LM=m(`kind`,[f({kind:h(`stored`),modelId:u()}),f({kind:h(`absent`),defaultModelId:u()}),f({kind:h(`unreadable`),reason:S(UE),error:u().optional()})]),RM=f({nodeId:u(),reachable:w(),devices:C(IM).readonly()}),zM=f({deviceId:a().int().nonnegative(),config:PE.nullable()}),BM=S([`unknown-camera`,`out-of-range`,`no-burst-producer`,`already-looked`]),VM=f({deviceId:a().int().nonnegative(),afterMs:a().finite(),reason:u()}),HM=f({scheduled:w(),dueInMs:a().optional(),refusedBecause:BM.optional()}),UM={name:`pipeline-orchestrator`,scope:`system`,mode:`singleton`,nodeIdMode:`data`,exposesDeviceSettings:!0,methods:{requestOccupancyLook:L(VM,HM,{kind:`mutation`,auth:`admin`}),pauseForStorageMigration:L(wo,f({paused:h(!0)}),{kind:`mutation`,auth:`admin`}),resumeForStorageMigration:L(wo,f({resumed:h(!0)}),{kind:`mutation`,auth:`admin`}),assignPipeline:L(f({deviceId:a(),agentNodeId:u()}),f({success:h(!0)}),{kind:`mutation`,auth:`admin`}),unassignPipeline:L(f({deviceId:a()}),f({success:h(!0)}),{kind:`mutation`,auth:`admin`}),setPipelineDevicePin:L(f({deviceId:a(),deviceKey:u()}),f({success:h(!0)}),{kind:`mutation`,auth:`admin`}),getPipelineDevicePin:L(f({deviceId:a()}),f({deviceKey:u().nullable()})),rebalance:L(y(),f({migrated:a(),skipped:C(f({deviceId:a(),targetNodeId:u(),reason:u()})).default([])}),{kind:`mutation`,auth:`admin`}),getPipelineAssignments:L(y(),C(uM).readonly()),getPipelineAssignment:L(f({deviceId:a()}),uM.nullable()),getAgentLoad:L(y(),C(dM).readonly()),getClusterModelChoice:L(f({stepId:u()}),LM),getGlobalMetrics:L(y(),fM),getCameraMetrics:L(f({deviceId:a()}),mj.nullable()),getCapabilityBindings:L(f({nodeId:u()}),pM),setCapabilityBinding:L(f({nodeId:u(),capName:u(),addonId:u()}),f({success:h(!0)}),{kind:`mutation`,auth:`admin`}),getIngestOwner:L(y(),mM),assignAudio:L(f({deviceId:a(),nodeId:u()}),f({success:h(!0)}),{kind:`mutation`,auth:`admin`}),unassignAudio:L(f({deviceId:a()}),f({success:h(!0)}),{kind:`mutation`,auth:`admin`}),getAudioAssignment:L(f({deviceId:a()}),f({nodeId:u(),pinned:w(),assignedAt:a()}).nullable()),getAudioNodeLoad:L(y(),C(f({nodeId:u(),deviceCount:a()}))),getAudioAssignments:L(y(),C(f({deviceId:a(),nodeId:u(),pinned:w(),assignedAt:a()}))),getAgentSettings:L(f({agentNodeId:u()}),aM.nullable()),listAgentSettings:L(y(),C(f({nodeId:u(),settings:aM})).readonly()),removeAgentSettings:L(f({agentNodeId:u()}),f({success:w(),removed:w()}),{kind:`mutation`,auth:`admin`}),setAgentMaxCameras:L(f({agentNodeId:u(),maxCameras:a().int().nonnegative().nullable()}),f({success:h(!0)}),{kind:`mutation`,auth:`admin`}),setAgentCapabilities:L(f({agentNodeId:u(),detect:w().nullable().optional(),audio:w().nullable().optional(),ingest:w().nullable().optional()}),f({success:h(!0)}),{kind:`mutation`,auth:`admin`}),setAgentDecodeLimits:L(f({agentNodeId:u(),decodeBudgetMb:a().int().min(1024).max(65536).nullable().optional(),maxLiveDecodeWorkers:a().int().min(1).max(32).nullable().optional()}),f({success:h(!0)}),{kind:`mutation`,auth:`admin`}),setAgentReachableHost:L(f({agentNodeId:u(),reachableHost:u().nullable()}),f({success:h(!0)}),{kind:`mutation`,auth:`admin`}),setAgentInferenceDevices:L(f({agentNodeId:u(),inferenceDevices:b(u(),f({enabled:w(),weight:a().positive().optional(),maxSessions:a().int().positive().optional(),steps:b(u(),iM).optional()}))}),f({success:h(!0)}),{kind:`mutation`,auth:`admin`}),getNodeInferenceDevices:L(f({nodeId:u()}),RM),resetNodePipelineDefaults:L(f({agentNodeId:u()}),f({success:h(!0),effectiveModelId:u().nullable(),clearedCameraOverrides:a()}),{kind:`mutation`,auth:`admin`}),planAutoTune:L(sA,cA,{auth:`admin`}),applyAutoTune:L(lA,dA,{kind:`mutation`,auth:`admin`}),setLoadBalancingShares:L(gA,f({success:h(!0)}),{kind:`mutation`,auth:`admin`}),getPlacementStats:L(_A,xA,{auth:`admin`}),suggestShares:L(wA,DA,{auth:`admin`}),getEffectiveShares:L(y(),RA,{auth:`admin`}),setShareSource:L(PA,f({success:h(!0)}),{kind:`mutation`,auth:`admin`}),getNodeBenchmarkPreflight:L(VA,KA,{auth:`admin`}),startNodeBenchmark:L(VA,m(`kind`,[f({kind:h(`started`),runId:u()}),f({kind:h(`refused`),preflight:KA})]),{kind:`mutation`,auth:`admin`}),getNodeBenchmarkStatus:L(y(),sj,{auth:`admin`}),abortNodeBenchmark:L(f({runId:u()}),f({aborted:w()}),{kind:`mutation`,auth:`admin`}),getNodeBenchmarkCandidates:L(f({nodeId:u()}),fj,{auth:`admin`}),listNodeBenchmarkResults:L(lj,C(uj).readonly(),{auth:`admin`}),deleteNodeBenchmarkResult:L(f({id:u()}),f({deleted:w()}),{kind:`mutation`,auth:`admin`}),getCameraSettings:L(f({deviceId:a()}),lM.nullable()),setCameraStepToggle:L(f({deviceId:a(),addonId:u(),enabled:w().nullable()}),f({success:h(!0)}),{kind:`mutation`,auth:`admin`}),getCameraStepOverrides:L(f({deviceId:a()}),b(u(),b(u(),b(u(),sM))).nullable()),setCameraStepOverride:L(f({deviceId:a(),agentNodeId:u(),deviceKey:u(),addonId:u(),patch:sM.nullable()}),f({success:h(!0)}),{kind:`mutation`,auth:`admin`}),setCameraStepSettings:L(f({deviceId:a(),addonId:u(),settings:b(u(),s()).nullable()}),f({success:h(!0)}),{kind:`mutation`,auth:`admin`}),setCameraPipelineForAgent:L(f({deviceId:a(),agentNodeId:u(),pipeline:oM.nullable()}),f({success:h(!0)}),{kind:`mutation`,auth:`admin`}),resolvePipeline:L(f({deviceId:a(),agentNodeId:u().optional()}),rM),getCameraSwitches:L(f({deviceId:a()}),ci),setCameraSwitch:L(f({deviceId:a(),switchId:ni,enabled:w()}),ci,{kind:`mutation`,auth:`admin`}),getCameraStatus:L(f({deviceId:a()}),NM),getCameraStatuses:L(f({deviceIds:C(a()).optional()}),C(NM).readonly()),setCameraSensors:L(zM,f({success:h(!0)}),{kind:`mutation`,auth:`admin`}),reconcileFromDisk:L(y(),MM,{kind:`mutation`,auth:`admin`}),getReconcileFromDiskStatus:L(y(),MM,{auth:`admin`})}},WM={motion:`motion`,audio:`audio`,person:`person`,vehicle:`vehicle`,animal:`animal`,package:`package`,door:`door`,pir:`pir`,smoke:`smoke`,water:`water`,button:`button`,generic:`generic`,gas:`smoke`,vibration:`generic`,tamper:`generic`,presence:`person`,lock:`generic`,siren:`generic`,switch:`generic`,doorbell:`button`};function GM(e){return WM[e]??`generic`}var KM={contact:`contact`,motion:`motion-sensor`,smoke:`smoke`,flood:`flood`,gas:`gas`,"carbon-monoxide":`carbon-monoxide`,vibration:`vibration`,tamper:`tamper`,presence:`presence`,"enum-sensor":`enum-sensor`,"event-emitter":`device-event`,"lock-control":`lock`,cover:`cover`,switch:`switch`,button:`button`,doorbell:`doorbell`};function qM(e,t){let n=MC[t];if(n===void 0)throw Error(`EVENT_KIND_BY_CAP: cap '${e}' maps to unknown taxonomy kind '${t}'`);return{...n,icon:GM(n.iconId)}}var JM=Object.freeze(Object.fromEntries(Object.entries(KM).map(([e,t])=>[e,qM(e,t)]))),YM=Object.keys(KM);function XM(e,t){let n=MC[e];return n===void 0?null:{kind:n.kind,labelKey:n.labelKey,label:n.label,color:n.color,iconId:n.iconId,icon:GM(n.iconId),category:n.category,parentKind:n.parentKind,level:n.level,source:{capName:t.capName,deviceId:t.deviceId}}}var ZM=S([`workspace`,`baked`,`data-root`]),QM=S([`idle`,`checking`,`staging`,`pending-restart`,`awaiting-confirmation`]),$M=S([`in-sync`,`behind-patch`,`behind-series`,`ahead`,`unknown`]),eN=f({state:$M,seedVersion:u().nullable(),contractVersion:u().nullable(),contractSource:S([`registry`,`running`]).nullable(),message:u()}),tN=S([`docker`,`electron`,`native`,`contradictory`,`unknown`]),nN=f({fact:S([`dockerenv-file`,`proc-1-cgroup`,`platform`,`electron-app-version-env`]),mode:S([`observed`,`declared`]),holds:w(),detail:u()}),rN=f({kind:tN,evidence:C(nN),currentVersion:u().nullable()}),iN=f({fromVersion:u(),toVersion:u().nullable(),atMs:a(),reason:u()}),aN=f({packageName:u(),runningVersion:u().nullable(),nodeRuntimeVersion:u().nullable(),activeVersion:u().nullable(),installedVersion:u().nullable().optional(),restartRequired:w().optional(),previousVersion:u().nullable(),seedVersion:u().nullable(),latestVersion:u().nullable(),updateAvailable:w(),bootMode:ZM,updateState:QM,pendingVersion:u().nullable(),rolledBack:iN.nullable(),stateFileCorrupt:w(),lastCheckedAtMs:a().nullable(),imageContract:eN.optional(),wrapper:rN.optional()}),oN=f({packageName:u(),runningVersion:u().nullable(),latestVersion:u().nullable(),updateAvailable:w(),checkedAtMs:a(),error:u().nullable(),pendingVersion:u().nullable().optional(),restartRequired:w().optional()}),sN=S([`staged`,`restart-scheduled`,`already-current`,`refused`,`failed`]),cN=f({accepted:w(),targetVersion:u().nullable(),restarting:w(),message:u(),outcome:sN.optional(),reason:u().nullable().optional(),error:u().nullable().optional()}),lN={name:`server-management`,scope:`system`,mode:`singleton`,methods:{getServerPackageStatus:L(y(),aN,{auth:`admin`}),checkServerUpdate:L(y(),oN,{kind:`mutation`,auth:`admin`}),applyServerUpdate:L(f({version:u().optional()}),cN,{kind:`mutation`,auth:`admin`,timeoutMs:16*6e4}),rollbackServerUpdate:L(y(),cN,{kind:`mutation`,auth:`admin`}),restartServer:L(y(),cN,{kind:`mutation`,auth:`admin`})},mount:{kind:`server-provided`}},uN=i(),dN=f({to:p([uN,C(uN).min(1)]),cc:C(uN).optional(),bcc:C(uN).optional(),from:u().optional(),replyTo:u().optional(),subject:u(),text:u(),html:u().optional()}),fN=f({messageId:u(),accepted:C(uN).default([]),rejected:C(uN).default([])}),pN=f({ready:w(),host:u(),error:u().optional(),lastVerifiedAt:a().optional()}),mN={name:`smtp-provider`,scope:`system`,mode:`collection`,internal:!0,providerKind:`email`,methods:{sendEmail:L(dN,fN,{kind:`mutation`,auth:`admin`,access:`create`}),verify:L(y(),pN,{kind:`mutation`,auth:`admin`,access:`view`}),getStatus:L(y(),pN,{auth:`admin`})}},hN=f({base64:u(),contentType:u()}),gN=f({lastCapturedAt:a().nullable(),cacheAgeMs:a().nullable(),lastBytes:a().nullable(),lastStreamId:u().nullable()}),_N={name:`snapshot`,scope:`device`,deviceNative:!0,mode:`singleton`,kind:`wrapper`,defaultActive:!0,deviceTypes:[R.Camera],exposesDeviceSettings:!0,methods:{getSnapshot:L(f({deviceId:a(),streamId:u().optional(),force:w().optional()}),hN.nullable()),invalidateCache:L(f({deviceId:a()}),y(),{kind:`mutation`,auth:`admin`}),getSnapshotOverview:Nd(f({deviceIds:C(a()).min(1).max(200)}),C(f({deviceId:a(),lastCapturedAt:a().nullable(),cacheAgeMs:a().nullable(),etag:u().nullable()}))),getDebugState:Nd(f({deviceId:a()}),f({battery:f({sleeping:w(),lastUpdated:a(),lastContactAt:a().optional()}).nullable(),state:f({isBattery:w(),reason:S([`disabled`,`offline`,`sleeping`,`unreachable`,`waking`]).nullable()}),frame:f({capturedAt:a().nullable(),ageMs:a().nullable()}),waking:w()})),getSnapshotLinks:Nd(f({targets:C(f({deviceId:a(),width:a().int().positive().optional()})).min(1).max(200)}),C(f({deviceId:a(),url:u().nullable(),capturedAt:a().nullable(),ageMs:a().nullable(),expiresAt:a().nullable(),width:a().nullable(),neverCaptured:w(),sleeping:w(),stateReason:S([`disabled`,`offline`,`sleeping`,`unreachable`,`waking`]).nullable(),battery:w()})))},status:{schema:gN,kind:`poll`}},vN=f({userId:u(),username:u(),isAdmin:w(),provider:u(),email:u().optional(),displayName:u().optional(),hubUrl:u().optional(),scopes:C(J).optional(),redirectUri:u().optional(),integrationId:u().optional(),jti:u().optional(),codeChallenge:u().optional(),sessionId:u().optional(),refreshTtl:p([a().int().positive(),h(`never`)]).optional(),linkIntent:u().optional(),issuer:u().optional()}),yN={name:`sso-bridge`,scope:`system`,mode:`singleton`,internal:!0,methods:{signBridgeToken:L(f({claims:vN,ttlSec:p([a().int().positive(),h(`never`)]).optional()}),f({token:u()}),{auth:`admin`}),verifyBridgeToken:L(f({token:u()}),vN.nullable(),{auth:`admin`})}},bN=m(`shouldSaveDiskSpace`,[f({providerId:u().min(1),displayName:u().min(1),configSchema:s(),nodeLocal:w(),shouldSaveDiskSpace:h(!0),minFreePercent:a().min(0).max(100)}),f({providerId:u().min(1),displayName:u().min(1),configSchema:s(),nodeLocal:w(),shouldSaveDiskSpace:h(!1),minFreePercent:h(null)})]),xN={name:`storage`,scope:`system`,mode:`singleton`,methods:{resolve:L(f({location:k,relativePath:u()}),u(),{auth:`admin`}),write:L(f({location:k,relativePath:u(),data:x(Uint8Array)}),y(),{kind:`mutation`,auth:`admin`}),read:L(f({location:k,relativePath:u()}),x(Uint8Array),{auth:`admin`}),exists:L(f({location:k,relativePath:u()}),w(),{auth:`admin`}),list:L(f({location:k,prefix:u().optional()}),C(u()).readonly(),{auth:`admin`}),delete:L(f({location:k,relativePath:u()}),y(),{kind:`mutation`,auth:`admin`}),getAvailableSpace:L(f({location:k}),a().nullable()),beginUpload:L(f({location:k,relativePath:u(),sizeBytes:a().optional()}),f({uploadId:u()}),{kind:`mutation`,auth:`admin`}),writeChunk:L(f({uploadId:u(),offset:a(),data:x(Uint8Array)}),y(),{kind:`mutation`,auth:`admin`}),finalizeUpload:L(f({uploadId:u()}),y(),{kind:`mutation`,auth:`admin`}),abortUpload:L(f({uploadId:u()}),y(),{kind:`mutation`,auth:`admin`}),beginDownload:L(f({location:k,relativePath:u()}),f({downloadId:u(),sizeBytes:a()}),{kind:`mutation`,auth:`admin`}),readChunk:L(f({downloadId:u(),offset:a(),length:a()}),x(Uint8Array),{auth:`admin`}),endDownload:L(f({downloadId:u()}),y(),{kind:`mutation`,auth:`admin`}),listLocations:L(f({type:Ts.optional()}),C(O).readonly()),listLocationDeclarations:L(y(),C(Ns).readonly()),upsertLocation:L(O.omit({createdAt:!0,updatedAt:!0}),O,{kind:`mutation`,auth:`admin`}),deleteLocation:L(f({id:u(),force:w().optional()}),y(),{kind:`mutation`,auth:`admin`}),listDrainProgress:L(y(),C(As).readonly()),testLocation:L(f({id:u()}),f({ok:w(),error:u().optional()}),{auth:`admin`}),listProviders:L(y(),C(bN).readonly()),testConfig:L(f({providerId:u(),locationId:u().optional(),config:b(u(),s())}),f({ok:w(),error:u().optional()}),{auth:`admin`})}},SN=f({bytes:a().int().nonnegative()}),CN=f({reclaimedBytes:a().int().nonnegative(),exhausted:w()}),wN={name:`storage-evictable`,scope:`system`,mode:`collection`,internal:!0,methods:{getEvictableUsage:L(f({locationId:u()}),SN,{auth:`admin`}),evict:L(f({locationId:u(),targetBytes:a().int().positive()}),CN,{kind:`mutation`,auth:`admin`})}},TN={name:`storage-migration`,scope:`system`,mode:`singleton`,methods:{plan:L(Fo,Uo,{auth:`admin`}),start:L(Fo,f({jobId:u()}),{kind:`mutation`,auth:`admin`}),status:L(f({jobId:u().optional()}),Bo.nullable(),{auth:`admin`}),cancel:L(f({jobId:u()}),f({cancelled:w()}),{kind:`mutation`,auth:`admin`}),movers:L(f({}),C(Go).readonly(),{auth:`admin`}),residue:L(f({}),C(Ko).readonly(),{auth:`admin`}),drain:L(qo,f({jobId:u()}),{kind:`mutation`,auth:`admin`}),cleanupStart:L(as,f({jobId:u()}),{kind:`mutation`,auth:`admin`}),cleanupStatus:L(ss,os.nullable(),{auth:`admin`}),cleanupCancel:L(f({jobId:u()}),f({cancelled:w()}),{kind:`mutation`,auth:`admin`}),history:L(f({}),C(Bo).readonly(),{auth:`admin`})}},EN=f({locationId:u(),ownedBytes:a().int().nonnegative(),measuredAtMs:a().int().nonnegative()}),DN={name:`storage-occupancy`,scope:`system`,mode:`collection`,internal:!0,methods:{getOccupancy:L(f({locationIds:C(u()).readonly()}),C(EN).readonly(),{auth:`admin`})}},ON=m(`shouldSaveDiskSpace`,[f({providerId:u().min(1),displayName:u().min(1),configSchema:s(),nodeLocal:w(),shouldSaveDiskSpace:h(!0),minFreePercent:a().min(0).max(100)}),f({providerId:u().min(1),displayName:u().min(1),configSchema:s(),nodeLocal:w(),shouldSaveDiskSpace:h(!1),minFreePercent:h(null)})]),kN=f({ok:w(),error:u().optional()}),AN=f({location:O,relativePath:u(),sizeBytes:a().optional()}),jN=f({uploadId:u()}),MN=f({uploadId:u(),offset:a(),data:x(Uint8Array)}),NN=f({uploadId:u()}),PN=f({uploadId:u()}),FN=f({location:O,relativePath:u()}),IN=f({downloadId:u(),sizeBytes:a()}),LN=f({downloadId:u(),offset:a(),length:a()}),RN=f({downloadId:u()}),zN={name:`storage-provider`,scope:`system`,mode:`collection`,internal:!0,methods:{getProviderInfo:L(y(),ON,{auth:`admin`}),testLocation:L(f({config:b(u(),s())}),kN,{auth:`admin`}),resolve:L(f({location:O,relativePath:u()}),u(),{auth:`admin`}),write:L(f({location:O,relativePath:u(),data:x(Uint8Array)}),y(),{kind:`mutation`,auth:`admin`}),read:L(f({location:O,relativePath:u()}),x(Uint8Array),{auth:`admin`}),exists:L(f({location:O,relativePath:u()}),w(),{auth:`admin`}),list:L(f({location:O,prefix:u().optional()}),C(u()).readonly(),{auth:`admin`}),delete:L(f({location:O,relativePath:u()}),y(),{kind:`mutation`,auth:`admin`}),getAvailableSpace:L(f({location:O}),a().nullable(),{auth:`admin`}),beginUpload:L(AN,jN,{kind:`mutation`,auth:`admin`}),writeChunk:L(MN,y(),{kind:`mutation`,auth:`admin`}),finalizeUpload:L(NN,y(),{kind:`mutation`,auth:`admin`}),abortUpload:L(PN,y(),{kind:`mutation`,auth:`admin`}),beginDownload:L(FN,IN,{kind:`mutation`,auth:`admin`}),readChunk:L(LN,x(Uint8Array),{auth:`admin`}),endDownload:L(RN,y(),{kind:`mutation`,auth:`admin`})}},BN=f({code:u().min(1),label:u().min(1),recommended:w()}),VN=f({signals:C(BN),lastFetchedAt:a()}),HN={name:`stream-signals`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:Object.values(R),runtimeState:VN,durability:`session`,methods:{listSignals:L(y(),C(BN).readonly())}},UN=s().nullable(),WN=b(u(),s()),GN=f({sessionId:u(),profileId:u(),label:u(),cols:a().int().positive(),rows:a().int().positive(),startedAt:a()}),KN=f({profileId:u(),label:u(),description:u().optional(),executable:u().optional(),args:C(u()).readonly().optional(),cwd:u().optional(),environment:C(u()).readonly().optional(),settingsSchema:UN.optional()}),qN=f({instanceId:u(),cameraStableId:u(),nodeId:u(),profileId:u(),profileLabel:u(),name:u(),enabled:w(),executable:u(),args:C(u()).readonly(),cwd:u(),environment:C(u()).readonly(),profileSettings:WN}),JN=f({stableId:u(),nodeId:u(),profileId:u(),profileLabel:u(),name:u(),adoptable:w()}),YN=m(`kind`,[f({seq:a().int().positive(),kind:h(`data`),data:u()}),f({seq:a().int().positive(),kind:h(`exit`),exitCode:a().int(),signal:a().int().optional()})]),XN=f({cursor:a().int().nonnegative(),reset:w(),snapshot:u().optional(),events:C(YN).readonly()}),ZN={name:`terminal-session`,scope:`system`,mode:`singleton`,methods:{listProfiles:L(y(),C(KN).readonly(),{auth:`admin`}),listInstances:L(y(),C(qN).readonly(),{auth:`admin`}),createInstance:L(f({targetNodeId:u().min(1),profileId:u().min(1),name:u().trim().min(1).max(160).optional(),executable:u().max(1024).optional(),args:C(u().max(2048)).max(64).optional(),cwd:u().max(1024).optional(),environment:C(u().max(4096)).max(64).optional(),profileSettings:WN.optional()}),qN,{kind:`mutation`,auth:`admin`}),updateInstance:L(f({instanceId:u().min(1),name:u().trim().min(1).max(160).optional(),executable:u().max(1024).optional(),args:C(u().max(2048)).max(64).optional(),cwd:u().max(1024).optional(),environment:C(u().max(4096)).max(64).optional(),profileSettings:WN.optional()}),qN,{kind:`mutation`,auth:`admin`}),deleteInstance:L(f({instanceId:u().min(1)}),y(),{kind:`mutation`,auth:`admin`}),setInstanceEnabled:L(f({instanceId:u().min(1),enabled:w()}),qN,{kind:`mutation`,auth:`admin`}),listLegacyCameras:L(y(),C(JN).readonly(),{auth:`admin`}),adoptLegacyMonitor:L(f({stableId:u().min(1),name:u().trim().min(1).max(160).optional()}),qN,{kind:`mutation`,auth:`admin`}),listSessions:L(y(),C(GN).readonly(),{auth:`admin`}),openSession:L(f({profileId:u(),cols:a().int().positive(),rows:a().int().positive(),executable:u().max(1024).optional(),args:C(u().max(2048)).max(64).optional(),cwd:u().max(1024).optional(),environment:C(u().max(4096)).max(64).optional()}),GN,{kind:`mutation`,auth:`admin`}),resize:L(f({sessionId:u(),cols:a().int().positive(),rows:a().int().positive()}),y(),{kind:`mutation`,auth:`admin`}),pullOutput:L(f({sessionId:u(),afterSeq:a().int().nonnegative(),waitMs:a().int().min(0).max(2e3).default(0),waitForOutput:w().optional()}),XN,{kind:`mutation`,auth:`admin`,timeoutMs:15e3}),writeInput:L(f({sessionId:u(),data:u().max(64*1024)}),y(),{kind:`mutation`,auth:`admin`}),close:L(f({sessionId:u()}),y(),{kind:`mutation`,auth:`admin`})}},QN=f({urls:p([u(),C(u())]),username:u().optional(),credential:u().optional()}),$N={name:`turn-provider`,scope:`system`,mode:`collection`,methods:{getTurnServers:L(y(),C(QN).readonly())}},eP=f({credentialId:u(),label:u(),createdAt:a(),lastUsedAt:a().nullable(),transports:C(u()).default([])}),tP={name:`user-passkeys`,scope:`system`,mode:`collection`,internal:!0,methods:{beginRegistration:L(f({userId:u(),username:u()}),f({optionsJSON:b(u(),s())}),{kind:`mutation`,auth:`admin`,access:`create`}),finishRegistration:L(f({userId:u(),response:b(u(),s()),label:u()}),f({success:h(!0),credentialId:u()}),{kind:`mutation`,auth:`admin`,access:`create`}),beginAuthentication:L(f({userId:u().optional()}),f({optionsJSON:b(u(),s())}),{kind:`mutation`,access:`view`,auth:`admin`}),finishAuthentication:L(f({userId:u(),response:b(u(),s())}),f({verified:w()}),{kind:`mutation`,access:`view`,auth:`admin`}),beginDiscoverableAuthentication:L(f({}),f({optionsJSON:b(u(),s())}),{kind:`mutation`,access:`view`,auth:`admin`}),finishDiscoverableAuthentication:L(f({response:b(u(),s())}),f({verified:w(),userId:u().nullable()}),{kind:`mutation`,access:`view`,auth:`admin`}),listPasskeys:L(f({userId:u()}),C(eP),{auth:`admin`}),removePasskey:L(f({userId:u(),credentialId:u()}),f({success:h(!0)}),{kind:`mutation`,auth:`admin`,access:`delete`}),getSecondFactorPreference:L(f({userId:u()}),f({enabled:w()}),{auth:`admin`}),setSecondFactorPreference:L(f({userId:u(),enabled:w()}),f({success:h(!0)}),{kind:`mutation`,auth:`admin`,access:`create`})}},nP=S([`cosine`,`dot`,`euclidean`]),rP=b(u(),p([u(),a(),w()])),iP=f({equals:b(u(),p([u(),a(),w()])).optional(),between:b(u(),d([a(),a()])).optional()}),aP=f({id:u(),vector:u(),metadata:rP}),oP=f({id:u(),score:a(),metadata:rP}),sP=f({index:u(),dim:a().int().positive(),metric:nP.default(`cosine`)}),cP=f({index:u(),items:C(aP)}),lP=f({upserted:a(),rejected:a()}),uP=f({index:u(),vector:u(),topK:a().int().positive(),minScore:a().optional(),filter:iP.optional()}),dP=f({matches:C(oP),scanned:a(),truncated:w(),effectiveTopK:a().int().positive()}),fP=f({index:u(),ids:C(u())}),pP=f({index:u(),filter:iP}),mP=f({deleted:a()}),hP=f({index:u(),ids:C(u())}),gP=f({items:C(f({id:u(),metadata:rP}))}),_P=f({index:u(),ids:C(u())}),vP=f({items:C(f({id:u(),vector:u(),metadata:rP}))}),yP=f({index:u(),cursor:a().int().nonnegative().default(0),limit:a().int().positive()}),bP=f({items:C(f({id:u(),metadata:rP})),nextCursor:a().int().nonnegative().nullable()}),xP=`vector-index-dim-conflict`;function SP(e,t,n){return Error(`[${xP}] vector-store: index "${e}" is declared with dim ${String(t)}; refusing to redeclare as ${String(n)}`)}function CP(e){return(e instanceof Error?e.message:String(e)).includes(`[${xP}]`)}var wP=f({index:u()}),TP=f({backend:u(),count:a(),dim:a(),metric:nP,bytes:a().optional(),exact:w()}),EP={name:`vector-store`,scope:`system`,mode:`singleton`,internal:!0,methods:{declareIndex:L(sP,y(),{kind:`mutation`,auth:`admin`}),upsert:L(cP,lP,{kind:`mutation`,auth:`admin`}),query:L(uP,dP,{auth:`admin`}),getByIds:L(hP,gP,{auth:`admin`}),fetchByIds:L(_P,vP,{auth:`admin`}),scan:L(yP,bP,{auth:`admin`}),deleteByIds:L(fP,mP,{kind:`mutation`,auth:`admin`}),deleteByFilter:L(pP,mP,{kind:`mutation`,auth:`admin`}),stats:L(wP,TP,{auth:`admin`})}},DP=S([`queue-full`,`camera-backoff`,`sleeping`,`camera-refused`,`no-keyframe`,`decode-failed`,`no-catalog-row`,`unsupported`,`unknown-device`,`uid-missing`]),OP=S([`deferred`,`final`]),kP=`x-camstack-reason`;function AP(e){let t=e.replace(/[\u2013\u2014\u2212]/g,`-`).replace(/[\u2018\u2019\u201b]/g,`'`).replace(/[\u201c\u201d]/g,`"`).replace(/\u2026/g,`...`).replace(/[\u00a0\u2007\u202f]/g,` `),n=``;for(let e of t){let t=e.codePointAt(0)??0;t<32||t===127?n+=` `:t>255?n+=`?`:n+=e}return n.slice(0,500).trim()}var jP=`x-camstack-reason-code`,MP=`x-camstack-disposition`,NP=`x-camstack-clip-transport`,PP=f({id:u(),source:u(),kind:S([`motion`,`object`,`audio`,`native`]),timeRange:f({startMs:a(),endMs:a()}),labels:C(u()).max(3).optional(),thumbnail:u().optional(),stillAtMs:a().optional(),eventIds:C(u()).optional(),eventCount:a().int().nonnegative().optional(),holes:C(f({startMs:a(),endMs:a()})).optional(),thumbnailMint:u().optional(),thumbnailUnavailable:f({reason:S([`sleeping`,`camera-refused`,`no-keyframe`,`unsupported`])}).optional(),catalogAsOf:a().optional(),nativeTypes:C(u()).optional(),behaviours:C(u()).optional(),streams:f({sub:f({id:u(),bytes:a().optional()}).optional(),main:f({id:u(),bytes:a().optional()}).optional()}).optional(),supportSub:w().optional(),playable:w().optional(),unplayableReason:u().optional(),inProgress:w().optional()}),FP=f({playbackUrl:u(),format:S([`hls`,`mp4`]).optional(),served:D.optional(),playbackEndpoints:C(u()).optional(),token:u().optional()}),IP=S([`authorised`]),LP=50*1024*1024,RP=500*1024*1024,zP=f({base64:u(),contentType:u(),name:u(),bytes:a().int().nonnegative(),served:D,durationMs:a().positive().optional()}),BP=f({ticket:Xr,contentType:u(),name:u(),served:D,durationMs:a().positive().optional()}),VP=S([`opus`,`pcmu`,`none`]),HP=S([`not-requested`,`unsupported-ask`]),UP=f({url:u().min(1),expiresAtMs:a(),transport:h(`forward-only`),served:D,servedAudio:VP,audioReason:HP.optional()}),WP=[.25,.5,1,1.5,2,4,8],GP=[.25,.5,1,1.5,2,4],KP=[.25,.5,1],qP=f({transport:S([`stream`,`file`]),seek:S([`forward`,`free`]),stepBack:w(),scrub:w(),rates:C(a().positive()).min(1).readonly()}),JP=f({state:S([`ok`,`sleeping`,`unreachable`,`no-storage`,`index-empty`]),reason:u().optional(),catalogAsOf:a().optional()}),YP=f({source:u(),label:u(),addonId:u().optional(),availability:JP}),XP={name:`videoclips`,scope:`device`,mode:`collection`,kind:`wrapper`,defaultActive:!0,deviceTypes:[R.Camera],deviceConfig:{ui:{kind:`widget`,widgetId:`host/clips-browser`,tab:`recording`,topTab:!0,label:`Clips`,order:100}},methods:{listClips:L(f({deviceId:a(),since:a(),until:a(),limit:a().int().positive().optional(),provider:u().min(1)}),C(PP).readonly(),{kind:`query`,auth:`protected`}),listSources:L(f({deviceId:a()}),C(YP).readonly(),{kind:`query`,auth:`protected`}),getClipPlayback:L(f({deviceId:a(),clipId:u(),profile:D.optional()}),FP,{kind:`query`,auth:`protected`}),readClipBytes:Pd(f({deviceId:a(),clipId:u().min(1),provider:u().min(1),profile:D.optional(),maxBytes:a().int().positive().optional(),wake:IP.optional()}),zP,{kind:`query`,auth:`protected`}),offerClipBytes:Pd(f({deviceId:a(),clipId:u().min(1),provider:u().min(1),profile:D.optional(),maxBytes:a().int().positive().optional(),wake:IP.optional()}),BP,{kind:`query`,auth:`protected`}),dialClipStream:Pd(f({deviceId:a(),clipId:u().min(1),provider:u().min(1),profile:D.optional(),audio:VP.optional()}),UP,{kind:`query`,auth:`protected`}),getPlaybackOptions:Pd(f({deviceId:a(),provider:u().min(1)}),qP,{kind:`query`,auth:`protected`})}},ZP={stream:{transport:`stream`,seek:`forward`,stepBack:!1,scrub:!1,rates:GP},realtimeStream:{transport:`stream`,seek:`forward`,stepBack:!1,scrub:!1,rates:KP},file:{transport:`file`,seek:`free`,stepBack:!0,scrub:!0,rates:WP}},QP=f({staticDir:u()}),$P=f({version:u()}),eF={name:`viewer-ui`,scope:`system`,mode:`singleton`,internal:!0,methods:{getStaticDir:L(y(),QP,{auth:`admin`}),getVersion:L(y(),$P,{auth:`admin`})}},tF=f({viewportWidth:a().int().positive().optional(),viewportHeight:a().int().positive().optional(),devicePixelRatio:a().positive().optional(),downlinkMbps:a().nonnegative().optional(),prefersTier:u().optional()}).partial(),nF=m(`kind`,[f({kind:h(`adaptive`)}),f({kind:h(`profile`),profile:D}),f({kind:h(`cam-stream`),camStreamId:u().min(1)})]),rF=f({id:u(),label:u(),target:nF,codec:u().nullable(),resolution:f({width:a(),height:a()}).nullable(),status:S([`idle`,`connecting`,`streaming`,`error`,`stopped`]).nullable(),inputFps:a().nullable(),bitrateKbps:a().nullable()}),iF=f({cause:S([`loss`,`stall`,`healthy`]),tier:D.nullable(),forcedTranscodeDown:w(),lossRatio:a().nullable(),clientKbps:a().nullable(),stalledForMs:a().nullable(),serverSending:w().nullable(),at:a(),causeDetail:u().optional()}),aF=[`stall-building`,`delivery`,`no-evidence`,`warming`,`cooldown`,`capacity`,`try-unclean`,`try-backoff`,`trial`,`suspended`],oF=[`delivery`,`loss`,`rtt`,`shared-telemetry`],sF=f({code:u(),nextTier:D,deliveryRatio:a().nullable(),deliveryWindowMs:a().nullable(),climbDeliveryRatio:a(),capacityKbps:a().nullable(),probeKbps:a().nullable(),nextTierKbps:a().nullable(),capacityMargin:a(),neededKbps:a().nullable(),tryBlockedBy:u().nullable(),tryDeliveryRatio:a().optional(),tryMaxLossRatio:a().optional(),retryInMs:a().nullable(),lastRevert:f({tier:D,deliveryRatio:a().nullable(),stalled:w(),at:a()}).nullable(),trialForMs:a().nullable(),trialMs:a().nullable(),healthyForMs:a().nullable(),requiredHealthyMs:a().nullable(),since:a(),summary:u()}),cF=f({tier:D,failures:a().int().nonnegative()}),lF=f({sessionId:u(),alive:w(),observedAt:a(),brokerId:u().nullable(),camStreamId:u().nullable(),sourceKind:S([`native`,`derived`,`unknown`]),adaptive:w(),servedTier:D.nullable(),ingestNodeId:u().nullable(),ingestIsRemote:w().nullable(),sourceCodec:u().nullable(),negotiatedCodec:u().nullable(),egressLeg:S([`copy`,`transcode`,`unknown`]),brokerStatus:u().nullable(),brokerCodec:u().nullable(),brokerBitrateKbps:a().nullable(),brokerInputFps:a().nullable(),brokerUptimeMs:a().nullable(),rtpPacketsSent:a().nullable(),trackMode:S([`live`,`recorded`]).nullable(),lastDecision:iF.nullable(),tierFailures:C(cF),upgradeCount:a().nullable(),climbHold:sF.nullable().optional()}),uF={name:`webrtc-session`,scope:`device`,mode:`singleton`,kind:`wrapper`,defaultActive:!0,preferredProvider:`stream-broker`,deviceTypes:[R.Camera],methods:{listStreams:L(f({deviceId:a().int().nonnegative()}),C(rF)),createSession:L(f({deviceId:a().int().nonnegative(),target:nF,hints:tF.optional(),relayOnly:w().optional(),consumerAttribution:Hp.optional()}),f({sessionId:u(),sdpOffer:u()}),{kind:`mutation`}),handleOffer:L(f({deviceId:a().int().nonnegative(),target:nF.optional(),sdpOffer:u(),sessionId:u().optional(),relayOnly:w().optional(),nonTrickle:w().optional(),disableTurn:w().optional(),disableIpv6:w().optional(),consumerAttribution:Hp.optional(),hints:tF.optional(),talkback:w().optional()}),f({sessionId:u(),sdpAnswer:u()}),{kind:`mutation`}),handleAnswer:L(f({deviceId:a().int().nonnegative(),sessionId:u(),sdpAnswer:u()}),y(),{kind:`mutation`}),addIceCandidate:L(f({deviceId:a().int().nonnegative(),sessionId:u(),candidate:u(),sdpMid:u().nullable().optional(),sdpMLineIndex:a().int().nullable().optional()}),y(),{kind:`mutation`}),getIceCandidates:L(f({deviceId:a().int().nonnegative(),sessionId:u()}),f({candidates:C(f({candidate:u(),sdpMid:u().nullable(),sdpMLineIndex:a().int().nullable()})),done:w()}),{kind:`query`}),closeSession:L(f({deviceId:a().int().nonnegative(),sessionId:u()}),y(),{kind:`mutation`}),hasAdaptiveBitrate:L(f({deviceId:a().int().nonnegative(),profile:D}),w()),getSessionState:L(f({deviceId:a().int().nonnegative(),sessionId:u()}),f({pendingRenegotiation:f({target:nF,epoch:a()}).nullable(),alive:w()})),applyDownlinkProbe:L(f({deviceId:a().int().nonnegative(),sessionId:u(),downlinkMbps:a().nonnegative()}),f({outcome:S([`switching`,`held`]),tier:D.nullable(),reason:u()}),{kind:`mutation`}),getSessionDebug:L(f({deviceId:a().int().nonnegative(),sessionId:u()}),lF,{kind:`query`})},mount:{kind:`server-provided`}},dF=f({childDeviceIds:C(a()).readonly(),hiddenChildIds:C(a()).readonly()}),fF={name:`accessories`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[R.Camera,R.Hub,R.Switch,R.Light,R.Sensor,R.Thermostat,R.Cover,R.Lock,R.Fan,R.MediaPlayer,R.AlarmPanel,R.Generic],methods:{setChildHidden:L(f({deviceId:a().int().nonnegative(),childDeviceId:a().int().nonnegative(),hidden:w()}),y(),{kind:`mutation`,auth:`admin`})},events:{onAccessoriesChanged:{data:f({deviceId:a(),childDeviceIds:C(a()).readonly(),hiddenChildIds:C(a()).readonly()})},onChildVisibilityChanged:{data:f({deviceId:a(),childDeviceId:a(),hidden:w()})}},status:{schema:dF,kind:`command-driven`}},pF=S([`install`,`update`,`uninstall`,`restart`]),mF=S([`queued`,`fetching`,`staged`,`validating`,`applying`,`restarting`,`applied`,`done`,`failed`,`skipped`]),hF=S([`framework`,`addon`]),gF=f({tsMs:a(),nodeId:u(),packageName:u(),phase:mF,message:u()}),_F=f({taskId:u(),nodeId:u(),packageName:u(),fromVersion:u().nullable(),toVersion:u(),target:hF,phase:mF,stagedPath:u().nullable(),attempts:a(),steps:C(gF),error:u().nullable(),startedAtMs:a().nullable(),finishedAtMs:a().nullable()}),vF=S([`running`,`completed`,`failed`,`partially-failed`,`cancelled`]),yF=S([`single`,`bulk`,`cluster`]),bF=f({jobId:u(),kind:pF,createdAtMs:a(),createdBy:u(),scope:yF,tasks:C(_F),state:vF,schemaVersion:h(1)}),xF=S([`debug`,`info`,`warn`,`error`]),SF=S([`off`,`latest`,`beta`]),CF=S([`off`,`latest`,`beta`,`inherit`]),wF=f({id:u(),name:u().optional(),version:u().optional(),description:u().optional(),icon:u().optional(),color:u().optional(),capabilities:C(s()).readonly().optional(),packageName:u(),packageVersion:u(),packageDisplayName:u().optional(),bundle:f({displayName:u(),description:u().optional(),icon:u().optional()}).optional(),protected:w().optional(),removable:w().optional()}),TF=f({pid:a().optional(),mode:u(),state:u()}),EF=f({phase:S([`pending`,`healthy`,`failed`]),retryCount:a(),firstFailureAt:a().nullable(),lastAttemptAt:a().nullable(),lastError:f({message:u(),stack:u().optional()}).nullable(),nextRetryAt:a().nullable(),alertEmitted:w(),retrying:w(),inGracePeriod:w()}),DF=f({manifest:wF,declaration:s().optional(),source:u(),installSource:u().optional(),process:TF.optional(),hasBackup:w().optional(),health:EF.nullable().optional()}),OF=f({name:u(),version:u(),dir:u(),installSource:u().optional()}),kF=f({name:u(),currentVersion:u(),latestVersion:u(),category:S([`addon`,`core`]),requiresRestart:w(),isSystem:w()}),AF=f({version:u(),publishedAt:u(),deprecated:u().optional(),distTags:C(u()).readonly()}),jF=f({name:u(),version:u(),description:u(),keywords:C(u()).readonly(),publishedAt:u(),author:u(),installed:w(),installedVersion:u().optional()}),MF=f({channel:SF,intervalSeconds:a(),updateCheckIntervalSeconds:a()}),NF=CF,PF=s(),FF=s(),IF=s(),LF=S([`uninstalled`,`not-installed`,`refused`,`failed`,`pending-reconnect`]),RF=f({nodeId:u(),outcome:LF,error:u().optional(),addonIds:C(u()).readonly(),runnersStopped:C(u()).readonly(),warnings:C(u()).readonly()}),zF=f({success:w(),packageName:u(),results:C(RF).readonly()}),BF=f({packageName:u(),nodeId:u(),nodeName:u(),isHub:w(),isOnline:w(),version:u().nullable(),addonIds:C(u()).readonly(),source:S([`live`,`recorded`]),onHub:w()}),VF=f({installations:C(BF).readonly(),unreachable:C(f({nodeId:u(),error:u()})).readonly()}),HF=S([`queued`,`updating`,`done`,`done-pending-restart`,`failed`]),UF=f({name:u(),isSystem:w(),fromVersion:u(),toVersion:u(),status:HF,error:u().optional(),startedAtMs:a().optional(),completedAtMs:a().optional()}),WF=S([`regular`,`system`,`restarting`,`finalizing`]);f({id:u(),nodeId:u(),startedAtMs:a(),completedAtMs:a().optional(),total:a(),completed:a(),failed:a(),current:u().nullable(),phase:WF,cancelled:w(),items:C(UF).readonly()});var GF=f({packageName:u(),currentVersion:u(),latestVersion:u().nullable(),hasUpdate:w(),description:u().optional(),buildId:u().nullable()}),KF=f({timestamp:u(),level:u(),message:u(),scope:u().optional()}),qF=s(),JF=f({addonId:u().min(1),action:u().min(1),input:s()}),YF={name:`addons`,scope:`system`,mode:`singleton`,nodeIdMode:`data`,methods:{list:L(y(),C(DF).readonly()),getLogs:L(f({addonId:u(),limit:a().min(1).max(500).default(100),level:xF.optional()}),C(qF)),listPackages:L(y(),C(OF).readonly()),installPackage:L(f({packageName:u(),version:u().optional()}),FF,{kind:`mutation`,auth:`admin`}),installFromWorkspace:L(f({packageName:u()}),FF,{kind:`mutation`,auth:`admin`}),isWorkspaceAvailable:L(y(),w()),listWorkspacePackages:L(y(),C(s()).readonly()),uninstallPackage:L(f({packageName:u().min(1),nodeId:u().optional(),everywhere:w().optional()}),zF,{kind:`mutation`,auth:`admin`}),listInstallations:L(f({packageName:u().optional()}),VF,{auth:`admin`}),reloadPackages:L(y(),IF,{kind:`mutation`,auth:`admin`}),searchAvailable:L(f({query:u().optional()}),C(jF)),listUpdates:L(f({nodeId:u().optional()}),C(kF).readonly(),{auth:`admin`}),updatePackage:L(f({name:u().min(1),version:u().optional(),nodeId:u().optional()}),s(),{kind:`mutation`,auth:`admin`}),rollbackPackage:L(f({name:u().min(1)}),f({rolledBackTo:u().nullable()}),{kind:`mutation`,auth:`admin`}),forceRefresh:L(f({nodeId:u().optional()}),s(),{kind:`mutation`,auth:`admin`}),restartServer:L(f({confirm:h(!0)}),s(),{kind:`mutation`,auth:`admin`}),getLastRestart:L(y(),f({kind:S([`framework-update`,`manual`,`system`,`framework-bulk-update`]),packageName:u().optional(),fromVersion:u().optional(),toVersion:u().optional(),requestedBy:u().optional(),requestedAt:a()}).nullable(),{auth:`admin`}),listFrameworkPackages:L(y(),C(GF).readonly(),{auth:`admin`}),listCapabilityProviders:L(f({capName:u().min(1)}),C(f({addonId:u(),mode:S([`singleton`,`collection`]),isActive:w()})).readonly()),setCapabilityProviderEnabled:L(f({capName:u().min(1),addonId:u().min(1),enabled:w()}),f({success:h(!0)}),{kind:`mutation`,auth:`admin`}),getVersions:L(f({name:u()}),C(AF).readonly()),restartAddon:L(f({addonId:u()}),PF,{kind:`mutation`,auth:`admin`}),retryLoad:L(f({packageName:u()}),f({success:h(!0)}),{kind:`mutation`,auth:`admin`}),getAutoUpdateSettings:L(y(),MF,{auth:`admin`}),setAutoUpdateSettings:L(f({channel:SF,intervalSeconds:a().min(300).max(86400).optional(),updateCheckIntervalSeconds:a().min(900).max(604800).optional()}),s(),{kind:`mutation`,auth:`admin`}),getAddonAutoUpdate:L(f({addonId:u()}),NF,{auth:`admin`}),setAddonAutoUpdate:L(f({addonId:u(),channel:CF}),s(),{kind:`mutation`,auth:`admin`}),applyAutoUpdateToAll:L(f({channel:SF}),f({success:h(!0)}),{kind:`mutation`,auth:`admin`}),custom:L(JF,s(),{kind:`mutation`}),startJob:L(f({kind:S([`install`,`update`,`uninstall`,`restart`]),targets:C(f({name:u().min(1),version:u().min(1)})).min(1),nodeIds:C(u()).optional()}),f({jobId:u()}),{kind:`mutation`,auth:`admin`}),getJob:L(f({jobId:u()}),bF.nullable(),{auth:`admin`}),listJobs:L(f({activeOnly:w().optional()}),C(bF),{auth:`admin`}),cancelJob:L(f({jobId:u()}),f({cancelled:w()}),{kind:`mutation`,auth:`admin`}),onAddonLogs:L(f({addonId:u(),level:xF.optional()}),KF,{kind:`subscription`})},mount:{kind:`server-provided`}},XF=f({co2Ppm:a().min(0).optional(),vocPpb:a().min(0).optional(),pm25:a().min(0).optional(),pm10:a().min(0).optional(),aqi:a().optional(),lastFetchedAt:a(),unit:u().optional(),precision:a().int().min(0).max(10).optional()}),ZF={name:`air-quality-sensor`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[R.Sensor],methods:{},status:{schema:XF,kind:`push`},runtimeState:XF,durability:`restored`,volatileStateFields:[`lastFetchedAt`]},QF=f({lux:a().min(0),lastFetchedAt:a(),unit:u().optional(),precision:a().int().min(0).max(10).optional()}),$F={name:`ambient-light-sensor`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[R.Sensor],methods:{},status:{schema:QF,kind:`push`},runtimeState:QF,durability:`restored`,volatileStateFields:[`lastFetchedAt`]},eI=f({className:u(),hits:a().int().nonnegative(),avgScore:a().min(0).max(1),peakScore:a().min(0).max(1)}),tI=f({ts:a().int(),windowSec:a().int().positive(),level:f({rms:a(),dbfs:a()}),peakDbfs:a(),avgDbfs:a(),current:f({className:u(),score:a().min(0).max(1),timestamp:a().int()}).nullable(),byClass:C(eI).readonly()}),nI=f({ts:a().int(),dbfs:a().nullable(),peakDbfs:a(),avgDbfs:a(),topClass:u().nullable(),topScore:a().min(0).max(1).nullable()}),rI=f({points:C(nI).readonly(),effectiveSampleEveryMs:a().int().positive(),windowMsActual:a().int().nonnegative()}),iI={name:`audio-metrics`,scope:`device`,mode:`singleton`,deviceTypes:[R.Camera],methods:{getCurrentSnapshot:L(f({deviceId:a()}),tI.nullable()),getHistory:L(f({deviceId:a(),windowSec:a().int().positive().optional(),sampleEveryMs:a().int().positive().optional()}),rI)},runtimeState:tI,durability:`session`},aI=f({enabled:w(),isRunning:w(),lastTriggeredAt:a(),lastError:u().nullable(),lastChangedAt:a()}),oI={name:`automation-control`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[R.Automation],methods:{enable:L(f({deviceId:a().int().nonnegative()}),y(),{kind:`mutation`,auth:`admin`}),disable:L(f({deviceId:a().int().nonnegative()}),y(),{kind:`mutation`,auth:`admin`}),trigger:L(f({deviceId:a().int().nonnegative(),skipCondition:w().optional()}),y(),{kind:`mutation`,auth:`admin`})},status:{schema:aI,kind:`push`},runtimeState:aI,durability:`session`},sI=f({percentage:a().min(0).max(100).nullable(),charging:S([`dc`,`solar`,`none`,`unknown`]),sleeping:w(),lastUpdated:a(),lastContactAt:a().optional(),binary:w().optional()}),cI={name:`battery`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[R.Camera,R.Sensor,R.Button,R.Switch,R.PetFeeder,R.Container],methods:{wakeForStream:L(f({deviceId:a(),timeoutMs:a().int().min(500).max(3e4).default(8e3)}),f({awoke:w(),durationMs:a()}),{kind:`mutation`})},composedMethods:{wakeForStream:{kind:`answer`,value:{awoke:!1,durationMs:0}}},events:{onStatusChanged:{data:f({deviceId:a(),status:sI})}},status:{schema:sI,kind:`push`,empty:{percentage:null,charging:`unknown`,sleeping:!1,lastUpdated:0}},runtimeState:sI,durability:`restored`,volatileStateFields:[`lastUpdated`]},lI=f({on:w(),lastChangedAt:a()}),uI={name:`binary`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[R.Sensor],methods:{},status:{schema:lI,kind:`push`},runtimeState:lI,durability:`restored`,volatileStateFields:[`lastChangedAt`]},dI=f({percentage:a().min(0).max(100),lastChangedAt:a()}),fI={name:`brightness`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[R.Light],methods:{setBrightness:L(f({deviceId:a().int().nonnegative(),percentage:a().min(0).max(100)}),y(),{kind:`mutation`,auth:`protected`})},events:{onBrightnessChanged:{data:f({deviceId:a(),percentage:a().min(0).max(100),lastChangedAt:a()})}},status:{schema:dI,kind:`command-driven`},runtimeState:dI,durability:`session`},pI={name:`button`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[R.Button],methods:{press:L(f({deviceId:a().int().nonnegative()}),y(),{kind:`mutation`,auth:`protected`})}},mI=S([`ha`,`addon`]),hI=f({id:u().min(1),name:u().min(1),source:mI,enabled:w()}),gI=f({id:u().min(1),calendarId:u().min(1),title:u(),startMs:a().int(),endMs:a().int(),allDay:w().optional(),description:u().optional(),location:u().optional()}),_I=f({calendarIds:C(u().min(1)).max(64).optional(),startMs:a().int(),endMs:a().int()}),vI={name:`calendar-source`,scope:`system`,mode:`collection`,internal:!0,methods:{listCalendars:L(y(),C(hI).readonly(),{auth:`admin`}),listEvents:L(_I,C(gI).readonly(),{auth:`admin`})}},yI=u().regex(/^#[0-9A-Fa-f]{6}$/,`expected #RRGGBB`),bI=hI.extend({id:u().min(1),providerAddonId:u().min(1).optional(),defaultColor:yI,color:yI,visible:w()}),xI=f({visible:w().optional(),color:yI.optional()}),SI=f({calendars:b(u(),xI)}),CI=f({calendarId:u().min(1),visible:w().optional(),color:yI.nullable().optional()}),wI={name:`calendars`,scope:`system`,mode:`singleton`,methods:{listCalendars:L(y(),C(bI).readonly(),{auth:`admin`}),listEvents:L(_I,C(gI).readonly(),{auth:`admin`}),getPreferences:L(f({}),SI,{auth:`admin`,caller:`required`}),setCalendarPreference:L(CI,SI,{auth:`admin`,kind:`mutation`,caller:`required`})}},TI=f({host:u(),port:a().int().positive().optional(),onvifPort:a().int().positive().optional(),rtspPort:a().int().positive().optional(),https:w().optional(),username:u().optional(),password:u().optional(),onvifProfile:u().optional()}),EI=f({host:u(),port:a().int().positive().nullable(),onvifPort:a().int().positive().nullable(),rtspPort:a().int().positive().nullable(),https:w().nullable(),hasUsername:w(),hasPassword:w(),onvifProfile:u().nullable()}),DI={name:`camera-credentials`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[R.Camera],methods:{getCredentials:L(f({deviceId:a()}),TI.nullable(),{kind:`query`,auth:`admin`})},status:{schema:EI,kind:`command-driven`}},OI=f({x:a().min(0).max(1),y:a().min(0).max(1),width:a().gt(0).max(1),height:a().gt(0).max(1)}),kI=f({deviceId:a().int().positive(),source:OI,cell:OI}),AI=f({profile:S([`high`,`mid`,`low`]),offered:w(),missingSources:C(a().int().positive()),canvas:u(),published:w()}),jI=f({instanceId:u(),deviceId:a().int().nonnegative(),name:u(),fps:a().int(),cells:C(kI),profiles:C(AI)}),MI=f({deviceId:a().int().nonnegative(),name:u().min(1).max(160).optional(),fps:a().int().min(1).max(60).optional(),publishedProfiles:C(S([`high`,`mid`,`low`])).max(3).optional(),cells:C(kI).max(16)}),NI={name:`camera-grid-layout`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[R.Camera],exposesDeviceSettings:!0,methods:{getLayout:L(f({deviceId:a().int().nonnegative()}),jI.nullable(),{auth:`admin`}),saveLayout:L(MI,jI,{kind:`mutation`,auth:`admin`})}},PI=f({detected:w(),lastChangedAt:a()}),FI={name:`carbon-monoxide`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[R.Sensor],methods:{},status:{schema:PI,kind:`push`},runtimeState:PI,durability:`restored`,volatileStateFields:[`lastChangedAt`]},II=S([`off`,`heat`,`cool`,`auto`,`heat_cool`,`fan_only`,`dry`]),LI=f({mode:II,availableModes:C(II),fanMode:u(),availableFanModes:C(u()),preset:u(),availablePresets:C(u()),target:a().nullable(),targetHigh:a().nullable(),targetLow:a().nullable(),targetHumidity:a().min(0).max(100).nullable(),currentTemp:a().nullable(),currentHumidity:a().min(0).max(100).nullable(),swingVertical:w().nullable(),swingHorizontal:w().nullable(),lastFetchedAt:a()}),RI={name:`climate-control`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[R.Thermostat,R.Climate],methods:{setMode:L(f({deviceId:a().int().nonnegative(),mode:II}),y(),{kind:`mutation`,auth:`protected`}),setFanMode:L(f({deviceId:a().int().nonnegative(),fanMode:u().min(1)}),y(),{kind:`mutation`,auth:`protected`}),setPreset:L(f({deviceId:a().int().nonnegative(),preset:u().min(1)}),y(),{kind:`mutation`,auth:`protected`}),setTarget:L(f({deviceId:a().int().nonnegative(),target:a()}),y(),{kind:`mutation`,auth:`protected`}),setTargetRange:L(f({deviceId:a().int().nonnegative(),targetLow:a(),targetHigh:a()}),y(),{kind:`mutation`,auth:`protected`}),setTargetHumidity:L(f({deviceId:a().int().nonnegative(),targetHumidity:a().min(0).max(100)}),y(),{kind:`mutation`,auth:`protected`}),setSwingVertical:L(f({deviceId:a().int().nonnegative(),on:w()}),y(),{kind:`mutation`,auth:`protected`}),setSwingHorizontal:L(f({deviceId:a().int().nonnegative(),on:w()}),y(),{kind:`mutation`,auth:`protected`})},status:{schema:LI,kind:`push`},runtimeState:LI,durability:`session`},zI=f({r:a().int().min(0).max(255),g:a().int().min(0).max(255),b:a().int().min(0).max(255)}),BI=f({h:a().min(0).max(360),s:a().min(0).max(100),v:a().min(0).max(100)}),VI=m(`mode`,[f({mode:h(`rgb`),rgb:zI}),f({mode:h(`hsv`),hsv:BI}),f({mode:h(`mired`),mireds:a().int().min(50).max(1e3)})]),HI=f({mode:S([`rgb`,`hsv`,`mired`]),rgb:zI.optional(),hsv:BI.optional(),mireds:a().int().optional(),lastChangedAt:a()}),UI={name:`color`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[R.Light],methods:{setColor:L(f({deviceId:a().int().nonnegative(),color:VI}),y(),{kind:`mutation`,auth:`protected`})},events:{onColorChanged:{data:f({deviceId:a(),mode:S([`rgb`,`hsv`,`mired`]),rgb:zI.optional(),hsv:BI.optional(),mireds:a().int().optional(),lastChangedAt:a()})}},status:{schema:HI,kind:`command-driven`},runtimeState:HI,durability:`session`},WI=2e4,GI=m(`outcome`,[f({outcome:h(`validated`),latencyMs:a().nonnegative().optional(),detail:u().optional()}).strict(),f({outcome:h(`rejected`),error:u()}).strict(),f({outcome:h(`inconclusive`),error:u()}).strict()]),KI=f({settings:b(u(),s())}),qI=f({label:u()}),JI={name:`connection-test`,scope:`system`,mode:`collection`,methods:{testSettings:L(KI,GI,{kind:`mutation`,auth:`admin`}),describeTest:L(y(),qI,{auth:`admin`})}},YI=f({connected:w(),lastChangedAt:a()}),XI={name:`connectivity`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[R.Sensor],methods:{},status:{schema:YI,kind:`push`},runtimeState:YI,durability:`restored`,volatileStateFields:[`lastChangedAt`]},ZI=S([`days`,`hours`,`cycles`]),QI=f({value:a().min(0).nullable(),unit:ZI}),$I=f({key:u().min(1),label:u().min(1),level:a().min(0).max(100).nullable(),status:S([`ok`,`replace`]).nullable(),lastResetAt:a().nullable(),resettable:w(),remaining:QI.optional()}),eL=f({items:C($I),lastChangedAt:a()}),tL={name:`consumables`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:Object.values(R),deviceConfig:{ui:{kind:`widget`,widgetId:`host/consumables-panel`,tab:`consumables`,topTab:!0,label:`Consumables`,order:5}},methods:{reset:L(f({deviceId:a().int().nonnegative(),key:u().min(1)}),y(),{kind:`mutation`,auth:`admin`})},composedMethods:{reset:{kind:`refuse`,reason:`a composed consumable is not resettable until commands (forward) arrive — slice 3`}},status:{schema:eL,kind:`push`,empty:{items:[],lastChangedAt:0},itemArray:{path:`items`,keyField:`key`,labelField:`label`,itemSchema:$I,emptyItem:{key:``,label:``,level:null,status:null,lastResetAt:null,resettable:!1}}},runtimeState:eL.extend({lastFetchedAt:a()}),durability:`restored`,volatileStateFields:[`lastChangedAt`,`lastFetchedAt`]},nL=f({entryOpen:w(),lastChangedAt:a()}),rL={name:`contact`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[R.Sensor],methods:{},status:{schema:nL,kind:`push`},runtimeState:nL,durability:`restored`,volatileStateFields:[`lastChangedAt`]},iL=S([`numeric`,`select`,`text`,`datetime`]),aL=f({kind:iL,value:p([a(),u()]),options:C(u()),lastChangedAt:a(),unit:u().optional(),min:a().optional(),max:a().optional(),step:a().optional(),precision:a().int().min(0).max(10).optional(),format:S([`date`,`time`,`datetime`]).optional()}),oL=m(`kind`,[f({kind:h(`numeric`),value:a()}),f({kind:h(`select`),value:u().min(1)}),f({kind:h(`text`),value:u()}),f({kind:h(`datetime`),value:u().min(1)})]),sL={name:`control`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[R.Control],methods:{setValue:L(f({deviceId:a().int().nonnegative(),control:oL}),y(),{kind:`mutation`,auth:`protected`})},status:{schema:aL,kind:`push`},runtimeState:aL,durability:`session`},cL=S([`open`,`opening`,`closing`,`closed`,`stopped`]),lL=f({state:cL,position:a().min(0).max(100).nullable(),tiltPosition:a().min(0).max(100).nullable(),lastChangedAt:a()}),uL={name:`cover`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[R.Cover],methods:{open:L(f({deviceId:a().int().nonnegative()}),y(),{kind:`mutation`,auth:`protected`}),close:L(f({deviceId:a().int().nonnegative()}),y(),{kind:`mutation`,auth:`protected`}),stop:L(f({deviceId:a().int().nonnegative()}),y(),{kind:`mutation`,auth:`protected`}),setPosition:L(f({deviceId:a().int().nonnegative(),position:a().min(0).max(100)}),y(),{kind:`mutation`,auth:`protected`}),setTiltPosition:L(f({deviceId:a().int().nonnegative(),tiltPosition:a().min(0).max(100)}),y(),{kind:`mutation`,auth:`protected`})},status:{schema:lL,kind:`push`},runtimeState:lL,durability:`restored`,volatileStateFields:[`lastChangedAt`]},dL=S([`auto`,`day`,`night`,`schedule`]),fL=f({min:a(),max:a(),step:a()}),pL=f({mode:dL,sensitivity:a().optional(),switchDelaySec:a().optional(),lastFetchedAt:a()}),mL=f({modes:C(dL),supportsSensitivity:w(),sensitivity:fL.optional(),supportsSwitchDelay:w(),switchDelaySec:fL.optional()}),hL=f({mode:dL.optional(),sensitivity:a().optional(),switchDelaySec:a().optional()}),gL={name:`day-night`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[R.Camera],deviceConfig:{ui:{kind:`derived-form`,builderId:`day-night`,tab:`image`}},methods:{getOptions:L(f({deviceId:a()}),mL),setSettings:L(f({deviceId:a(),settings:hL}),y(),{kind:`mutation`,auth:`admin`})},status:{schema:pL,kind:`poll`},runtimeState:pL,durability:`restored`,volatileStateFields:[`lastFetchedAt`]},_L=f({id:u(),label:u(),protocol:S([`rtsp`,`rtmp`,`annexb`,`http-mjpeg`,`webrtc`,`custom`]),url:u().optional(),resolution:f({width:a(),height:a()}).optional(),fps:a().optional(),bitrate:a().optional(),codec:u().optional(),profileHint:D.optional(),sdp:u().optional()}),vL=f({key:u(),value:s()}),yL=f({source:u(),data:b(u(),s())}),bL={name:`device-ops`,scope:`device`,deviceNative:!0,mode:`singleton`,methods:{getStreamSources:L(f({deviceId:a()}),C(_L)),getConfigEntries:L(f({deviceId:a()}),C(vL)),setConfig:L(f({deviceId:a(),values:b(u(),s())}),y(),{kind:`mutation`,auth:`admin`}),runAction:L(f({deviceId:a(),action:u().min(1),input:s()}),s(),{kind:`mutation`}),removeDevice:L(f({deviceId:a()}),y(),{kind:`mutation`,auth:`admin`}),getSettingsSchema:L(f({deviceId:a()}),s().nullable()),getRawState:L(f({deviceId:a()}),yL.nullable(),{auth:`protected`})}},xL=f({online:w(),lastChangedAt:a()}),SL={name:`device-status`,scope:`device`,deviceNative:!0,mode:`singleton`,methods:{},events:{onStatusChanged:{data:f({deviceId:a(),status:xL})}},status:{schema:xL,kind:`push`},runtimeState:xL,durability:`restored`,volatileStateFields:[`lastChangedAt`]},CL=f({lastPressedAt:a().nullable(),pressCountSinceStart:a()}),wL=f({deviceId:a(),timestamp:a()}),TL={name:`doorbell`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[R.Button,R.Camera],methods:{},events:{onPressed:{data:wL,fromState:{field:`lastPressedAt`,on:`advance`}}},status:{schema:CL,kind:`push`},runtimeState:CL,durability:`restored`},EL=S([`date`,`time`,`datetime`]),DL=f({value:u(),format:EL.optional(),lastFetchedAt:a()}),OL={name:`enum-sensor`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[R.Sensor],methods:{},status:{schema:DL,kind:`push`},runtimeState:DL,durability:`restored`,volatileStateFields:[`lastFetchedAt`]},kL=f({deviceId:a(),eventType:u(),data:b(u(),s()).nullable(),timestamp:a(),seq:a()}),AL=f({eventTypes:C(u()),lastEvent:kL.nullable(),eventCountSinceStart:a()}),jL={name:`event-emitter`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[R.EventEmitter],methods:{},events:{onEvent:{data:kL}},status:{schema:AL,kind:`push`},runtimeState:AL,durability:`session`},ML=f({id:u(),name:u(),sampleCount:a().int().nonnegative(),coverMediaId:a().int().optional(),coverBase64:u().optional()}),NL=f({id:u(),source:S([`detected`,`photo`]),addedAt:a().int(),deviceId:a().int().optional(),base64:u().optional()}),PL=f({sampleId:u(),enrolledAt:a().int(),deviceId:a().int().optional(),source:S([`detected`,`photo`]),mediaId:a().int().optional(),comparable:w(),selfMean:a().nullable(),bestForeign:f({identityId:u(),name:u(),score:a()}).optional(),suspicion:a()}),FL=f({identityId:u(),name:u(),modelId:u(),totalSamples:a().int(),comparableSamples:a().int(),flagged:a().int(),flagThreshold:a(),rows:C(PL).readonly()}),IL=f({faceId:u(),deviceId:a().int(),trackId:u(),timestamp:a().int(),recognizedIdentityId:u().optional(),identityName:u().optional(),assigned:w(),base64:u().optional(),cropUrl:u().optional(),faceBbox:yf.optional(),keyFrameMediaId:a().int().optional(),bestMatchScore:a().optional(),nativeFaceShortSidePx:a().optional(),suggestedIdentityId:u().optional(),suggestedMatchScore:a().optional()}),LL=S([`unassigned`,`recognized`,`identified`,`all`]),RL=S([`timestamp`,`suggestionConfidence`]),zL=S([`asc`,`desc`]),BL=f({faceIds:C(u()).readonly(),representativeFaceId:u(),size:a().int(),cohesion:a()}),VL=f({mediaId:a().int(),kind:u(),url:u(),sizeBytes:a(),timestamp:a()}),HL={name:`face-gallery`,scope:`system`,mode:`singleton`,methods:{listIdentities:L(f({includeCrops:w().optional()}).optional(),C(ML).readonly()),createIdentity:L(f({name:u().min(1)}),ML,{kind:`mutation`,auth:`admin`}),renameIdentity:L(f({id:u(),name:u().min(1)}),y(),{kind:`mutation`,auth:`admin`}),deleteIdentity:L(f({id:u()}),y(),{kind:`mutation`,auth:`admin`}),listIdentitySamples:L(f({identityId:u()}),C(NL).readonly()),auditIdentitySamples:L(f({identityId:u().min(1)}),FL,{auth:`admin`}),removeSample:L(f({identityId:u(),sampleId:u()}),y(),{kind:`mutation`,auth:`admin`}),listRecentFaces:L(f({deviceId:a().int().optional(),deviceIds:C(a().int()).optional(),limit:a().int().positive().optional(),filter:LL.optional(),since:a().int().optional(),until:a().int().optional(),sortBy:RL.optional(),sortDirection:zL.optional(),includeCrops:w().optional()}).optional(),C(IL).readonly()),getFaceByTrack:L(f({deviceId:a().int(),trackId:u()}),IL.nullable()),getFaceMedia:L(f({faceId:u()}),C(VL).readonly()),assignFace:L(f({faceId:u(),identityId:u()}),y(),{kind:`mutation`,auth:`admin`}),unassignFace:L(f({faceId:u()}),y(),{kind:`mutation`,auth:`admin`}),deleteFace:L(f({faceId:u()}),y(),{kind:`mutation`,auth:`admin`}),assignFaces:L(f({faceIds:C(u()).min(1),identityId:u()}),f({assigned:a().int(),failed:C(u()).readonly()}),{kind:`mutation`,auth:`admin`}),unassignFaces:L(f({faceIds:C(u()).min(1)}),f({unassigned:a().int(),failed:C(u()).readonly()}),{kind:`mutation`,auth:`admin`}),suggestFaceClusters:L(f({threshold:a().min(0).max(1).optional(),minClusterSize:a().int().min(2).optional(),maxClusters:a().int().positive().optional(),limit:a().int().positive().optional(),maxFacesScanned:a().int().positive().optional()}).optional(),C(BL).readonly())}},UL=S([`forward`,`reverse`]),WL=f({percentage:a().min(0).max(100).nullable(),percentageStep:a().positive().optional(),preset:u(),availablePresets:C(u()),direction:UL.nullable(),oscillating:w().nullable(),lastChangedAt:a()}),GL={name:`fan-control`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[R.Fan],methods:{setPercentage:L(f({deviceId:a().int().nonnegative(),percentage:a().min(0).max(100)}),y(),{kind:`mutation`,auth:`protected`}),setPreset:L(f({deviceId:a().int().nonnegative(),preset:u().min(1)}),y(),{kind:`mutation`,auth:`protected`}),setDirection:L(f({deviceId:a().int().nonnegative(),direction:UL}),y(),{kind:`mutation`,auth:`protected`}),setOscillating:L(f({deviceId:a().int().nonnegative(),oscillating:w()}),y(),{kind:`mutation`,auth:`protected`})},status:{schema:WL,kind:`push`},runtimeState:WL,durability:`session`},KL=f({flags:b(u(),s()),deviceType:u().nullable(),model:u().nullable(),channelCount:a().nullable(),lastProbedAt:a(),lastFetchedAt:a()}),qL={name:`feature-probe`,scope:`device`,deviceNative:!0,mode:`singleton`,methods:{},events:{onProbeChanged:{data:f({deviceId:a(),status:KL})}},status:{schema:KL,kind:`push`},runtimeState:KL,durability:`session`},JL=f({flooded:w(),lastChangedAt:a()}),YL={name:`flood`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[R.Sensor],methods:{},status:{schema:JL,kind:`push`},runtimeState:JL,durability:`restored`,volatileStateFields:[`lastChangedAt`]},XL=f({detected:w(),lastChangedAt:a()}),ZL={name:`gas`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[R.Sensor],methods:{},status:{schema:XL,kind:`push`},runtimeState:XL,durability:`restored`,volatileStateFields:[`lastChangedAt`]},QL=f({on:w(),currentHumidity:a().min(0).max(100).nullable(),targetHumidity:a().min(0).max(100).nullable(),mode:u().nullable(),availableModes:C(u()),action:u().nullable(),minHumidity:a().nullable(),maxHumidity:a().nullable(),lastChangedAt:a()}),$L={name:`humidifier`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[R.Humidifier],methods:{setOn:L(f({deviceId:a().int().nonnegative(),on:w()}),y(),{kind:`mutation`,auth:`protected`}),setTargetHumidity:L(f({deviceId:a().int().nonnegative(),humidity:a().min(0).max(100)}),y(),{kind:`mutation`,auth:`protected`}),setMode:L(f({deviceId:a().int().nonnegative(),mode:u().min(1)}),y(),{kind:`mutation`,auth:`protected`})},status:{schema:QL,kind:`push`},runtimeState:QL,durability:`session`},eR=f({percent:a().min(0).max(100),lastFetchedAt:a(),unit:u().optional(),precision:a().int().min(0).max(10).optional()}),tR={name:`humidity-sensor`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[R.Sensor,R.Thermostat],methods:{},status:{schema:eR,kind:`push`},runtimeState:eR,durability:`restored`,volatileStateFields:[`lastFetchedAt`]},nR=f({url:u().nullable(),lastUpdated:a().nullable()}),rR={name:`image`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[R.Image],methods:{},status:{schema:nR,kind:`push`},runtimeState:nR,durability:`session`},iR=S([`0`,`90`,`180`,`270`]),aR=S([`auto`,`manual`]),oR=S([`auto`,`manual`]),sR=S([`off`,`blc`,`wdr`,`hlc`]),cR=f({min:a(),max:a(),step:a()}),lR=f({brightness:a().optional(),contrast:a().optional(),saturation:a().optional(),sharpness:a().optional(),mirror:w().optional(),flip:w().optional(),rotate:iR.optional(),whiteBalance:aR.optional(),warmth:a().optional(),exposureMode:oR.optional(),backlightMode:sR.optional(),lastFetchedAt:a()}),uR=f({supportsBrightness:w(),brightness:cR.optional(),supportsContrast:w(),contrast:cR.optional(),supportsSaturation:w(),saturation:cR.optional(),supportsSharpness:w(),sharpness:cR.optional(),supportsMirror:w(),supportsFlip:w(),rotateOptions:C(iR),whiteBalanceModes:C(aR),supportsWarmth:w(),warmth:cR.optional(),exposureModes:C(oR),backlightModes:C(sR)}),dR=f({brightness:a().optional(),contrast:a().optional(),saturation:a().optional(),sharpness:a().optional(),mirror:w().optional(),flip:w().optional(),rotate:iR.optional(),whiteBalance:aR.optional(),warmth:a().optional(),exposureMode:oR.optional(),backlightMode:sR.optional()}),fR={name:`image-settings`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[R.Camera],deviceConfig:{ui:{kind:`derived-form`,builderId:`image-settings`,tab:`image`}},methods:{getOptions:L(f({deviceId:a()}),uR),setSettings:L(f({deviceId:a(),settings:dR}),y(),{kind:`mutation`,auth:`admin`})},status:{schema:lR,kind:`poll`},runtimeState:lR,durability:`restored`,volatileStateFields:[`lastFetchedAt`]},pR=f({id:u(),addonId:u(),name:u(),enabled:w(),info:b(u(),s()).readonly(),createdAt:a(),updatedAt:a(),processState:u()}),mR=f({id:u(),addonId:u(),name:u(),enabled:w(),info:b(u(),s()).readonly(),createdAt:a(),updatedAt:a()}),hR=f({addonId:u(),name:u(),description:u(),iconUrl:u().nullable(),color:u(),instanceMode:u(),mode:S([`standalone`,`account`,`broker`]),discoveryMode:u(),kind:S([`device-adoption`,`device-provider`]),brokerKind:u().nullable(),supportsLocationImport:w(),canTest:w(),existingInstances:C(f({id:u(),name:u()})),canAdd:w()}),gR=S([`validated`,`rejected`,`inconclusive`,`unsupported`]),_R=f({success:w(),error:u().optional(),status:gR.optional(),testedBy:u().nullable().optional(),latencyMs:a().nonnegative().optional(),detail:u().optional()}),vR=f({addonId:u(),name:u(),enabled:w().optional(),info:b(u(),s()).optional(),settings:b(u(),s()).optional(),secretKeys:C(u()).optional(),skipRestart:w().optional()}),yR=f({id:u(),name:u().optional(),enabled:w().optional(),info:b(u(),s()).optional()}),bR=f({success:w(),deletedId:u()}),xR={name:`integrations`,scope:`system`,mode:`singleton`,methods:{list:L(y(),C(pR)),get:L(f({id:u()}),pR),getByAddonId:L(f({addonId:u()}),mR.nullable()),create:L(vR,mR,{kind:`mutation`,auth:`admin`}),update:L(yR,mR,{kind:`mutation`,auth:`admin`}),delete:L(f({id:u()}),bR,{kind:`mutation`,auth:`admin`}),getSettings:L(f({id:u()}),b(u(),s()),{auth:`admin`}),setSettings:L(f({id:u(),settings:b(u(),s()),secretKeys:C(u()).optional()}),f({success:w()}),{kind:`mutation`,auth:`admin`}),getAvailableTypes:L(y(),C(hR),{auth:`admin`}),testConnection:L(f({addonId:u(),settings:b(u(),s())}),_R,{kind:`mutation`,auth:`admin`})},mount:{kind:`server-provided`}},SR=f({codecs:C(u()),sampleRate:a(),duplex:S([`half`,`full`]),maxBacklogMs:a()}),CR=f({talking:w(),lastSessionAt:a().nullable(),ability:SR.nullable()}),wR=S([`opus`,`s16le`,`g711ulaw`,`g711alaw`]),TR={name:`intercom`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[R.Camera],methods:{startSession:L(f({deviceId:a()}),f({sessionId:u(),sdpOffer:u()}),{kind:`mutation`,auth:`protected`}),handleAnswer:L(f({deviceId:a(),sessionId:u(),sdpAnswer:u()}),y(),{kind:`mutation`,auth:`protected`}),stopSession:L(f({deviceId:a(),sessionId:u()}),y(),{kind:`mutation`,auth:`protected`}),startTalkSession:L(f({deviceId:a()}),f({sessionId:u()}),{kind:`mutation`,auth:`protected`}),pushTalkAudio:L(f({deviceId:a(),audioBase64:u(),codec:wR.optional(),sampleRate:a().int().positive().optional(),channels:a().int().positive().optional(),sequenceNumber:a().int()}),f({accepted:w()}),{kind:`mutation`,auth:`protected`}),endTalkSession:L(f({deviceId:a()}),y(),{kind:`mutation`,auth:`protected`})},events:{onStatusChanged:{data:f({deviceId:a(),status:CR})}},status:{schema:CR,kind:`command-driven`},runtimeState:CR,durability:`session`},ER=S([`idle`,`mowing`,`paused`,`docked`,`error`]),DR=S([`info`,`warning`,`error`]),OR=f({activity:ER,batteryLevel:a().min(0).max(100).nullable(),progressPercent:a().min(0).max(100).nullable(),currentCode:a().nullable(),currentCodeLabel:u().nullable(),severity:DR,lastChangedAt:a()}),kR={name:`lawn-mower-control`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[R.LawnMower],methods:{startMowing:L(f({deviceId:a().int().nonnegative()}),y(),{kind:`mutation`,auth:`protected`}),pause:L(f({deviceId:a().int().nonnegative()}),y(),{kind:`mutation`,auth:`protected`}),dock:L(f({deviceId:a().int().nonnegative()}),y(),{kind:`mutation`,auth:`protected`})},status:{schema:OR,kind:`push`},runtimeState:OR,durability:`session`},AR=S([`lan`,`wifi`,`docker`,`vpn`,`loopback`,`other`]),jR=f({name:u(),family:S([`IPv4`,`IPv6`]),address:u(),cidr:u(),netmask:u(),internal:w(),mac:u(),kind:AR,preferred:w(),plausible:w(),plausibleReason:u()}),MR=f({interfaces:C(jR).readonly(),probedAt:a()}),NR=jR.nullable(),PR=f({label:u(),baseUrl:u(),kind:S([`lan-ipv4`,`lan-ipv6`,`public`,`loopback`,`app-link`,`custom`]),interfaceKind:S([`lan`,`wifi`,`docker`,`vpn`,`other`,`loopback`,`public`]),plausible:w(),plausibleReason:u(),priority:a()}),FR=S([`server-config`,`server-env`,`caller-hint`,`default`]),IR=f({port:a().int().min(1).max(65535),source:FR}),LR=f({endpoints:C(PR).readonly(),localPort:IR}),RR=f({baseUrl:u().nullable(),resolved:u().nullable(),appLinkHub:u().nullable()}),zR=f({baseUrls:C(u()).readonly(),resolved:C(u()).readonly()}),BR=f({override:u().nullable(),resolved:u().nullable(),source:S([`override`,`auto`,`none`])}),VR=f({cluster:BR,browser:BR}),HR=S(Ib),UR=S([`flagged`,`auto`,`none`]),WR=f({flagged:u().nullable(),resolved:u().nullable(),source:UR}),GR=f({flagged:C(u()).readonly(),resolved:C(u()).readonly(),source:UR}),KR=f({rows:C(PR.extend({detected:w(),custom:w(),flags:C(HR).readonly(),inUse:C(HR).readonly(),eligible:C(HR).readonly()})).readonly(),roles:f({appConnections:GR,notificationTaps:WR,internal:WR,publicEndpoint:WR}),appLinkHub:u().nullable()}),qR=f({addresses:C(u()).readonly()}),JR=f({mode:S([`generated`,`uploaded`,`disabled`]),leafFingerprintSha256:u().nullable(),caFingerprintSha256:u().nullable(),validTo:u().nullable(),sans:C(u()),caCertPem:u().nullable(),reissueError:u().nullable(),restartRequired:w()}),YR={name:`local-network`,scope:`system`,mode:`singleton`,methods:{list:L(y(),MR),getPreferred:L(y(),NR),getConnectionEndpoints:L(f({port:a().int().min(1).max(65535).optional(),includeLoopback:w().optional(),ipv4Only:w().optional(),scheme:S([`http`,`https`]).optional(),includeAppLink:w().optional()}),LR),getNotificationEndpoint:L(y(),RR),setNotificationEndpoint:L(f({baseUrl:u().nullable()}),RR,{kind:`mutation`}),getViewerEndpoints:L(y(),zR),setViewerEndpoints:L(f({baseUrls:C(u()).readonly()}),zR,{kind:`mutation`}),getAddresses:L(f({scheme:S([`http`,`https`]).optional()}).optional(),KR),addCustomAddress:L(f({baseUrl:u(),label:u().max(80)}),KR,{kind:`mutation`,auth:`admin`}),removeCustomAddress:L(f({baseUrl:u()}),KR,{kind:`mutation`,auth:`admin`}),setAddressRole:L(f({role:HR,baseUrl:u().nullable(),enabled:w(),acceptInsecureHttp:w().optional()}),KR,{kind:`mutation`,auth:`admin`}),getHubAddresses:L(y(),VR),getAllowedAddresses:L(y(),qR),setAllowedAddresses:L(qR,f({success:h(!0)}),{kind:`mutation`}),resetAllowlistToBestMatch:L(y(),qR,{kind:`mutation`}),getTlsStatus:L(y(),JR),regenerateCertificate:L(f({reason:u().optional()}),JR,{kind:`mutation`,auth:`admin`}),uploadCertificate:L(f({certPem:u().min(1),keyPem:u().min(1),caPem:u().optional()}),JR,{kind:`mutation`,auth:`admin`}),downloadCa:L(y(),f({pem:u()})),revertToGeneratedCertificate:L(y(),JR,{kind:`mutation`,auth:`admin`})},mount:{kind:`hub-only`}},XR=S([`locked`,`unlocked`,`locking`,`unlocking`,`jammed`]),ZR=f({state:XR,lastChangedAt:a()}),QR={name:`lock-control`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[R.Lock],methods:{lock:L(f({deviceId:a().int().nonnegative(),code:u().min(1).optional()}),y(),{kind:`mutation`,auth:`protected`}),unlock:L(f({deviceId:a().int().nonnegative(),code:u().min(1).optional()}),y(),{kind:`mutation`,auth:`protected`}),open:L(f({deviceId:a().int().nonnegative()}),y(),{kind:`mutation`,auth:`protected`})},status:{schema:ZR,kind:`push`},runtimeState:ZR,durability:`restored`,volatileStateFields:[`lastChangedAt`]},$R=S([`off`,`on`,`idle`,`playing`,`paused`,`buffering`,`standby`]),ez=S([`off`,`all`,`one`]),tz=f({type:u(),title:u(),artist:u().optional(),album:u().optional(),imageUrl:u().optional()}),nz=f({state:$R,volumeLevel:a().min(0).max(100).nullable(),isMuted:w().nullable(),source:u(),availableSources:C(u()),currentMedia:tz.nullable(),positionMs:a().int().nonnegative().nullable(),durationMs:a().int().nonnegative().nullable(),shuffle:w().nullable(),repeat:ez.nullable(),lastChangedAt:a()}),rz={name:`media-player`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[R.MediaPlayer],methods:{play:L(f({deviceId:a().int().nonnegative()}),y(),{kind:`mutation`,auth:`protected`}),pause:L(f({deviceId:a().int().nonnegative()}),y(),{kind:`mutation`,auth:`protected`}),stop:L(f({deviceId:a().int().nonnegative()}),y(),{kind:`mutation`,auth:`protected`}),next:L(f({deviceId:a().int().nonnegative()}),y(),{kind:`mutation`,auth:`protected`}),previous:L(f({deviceId:a().int().nonnegative()}),y(),{kind:`mutation`,auth:`protected`}),seek:L(f({deviceId:a().int().nonnegative(),positionMs:a().int().nonnegative()}),y(),{kind:`mutation`,auth:`protected`}),setVolume:L(f({deviceId:a().int().nonnegative(),volumeLevel:a().min(0).max(100)}),y(),{kind:`mutation`,auth:`protected`}),setMute:L(f({deviceId:a().int().nonnegative(),muted:w()}),y(),{kind:`mutation`,auth:`protected`}),setShuffle:L(f({deviceId:a().int().nonnegative(),shuffle:w()}),y(),{kind:`mutation`,auth:`protected`}),setRepeat:L(f({deviceId:a().int().nonnegative(),repeat:ez}),y(),{kind:`mutation`,auth:`protected`}),selectSource:L(f({deviceId:a().int().nonnegative(),source:u().min(1)}),y(),{kind:`mutation`,auth:`protected`}),playMedia:L(f({deviceId:a().int().nonnegative(),mediaId:u().min(1),mediaType:u().min(1)}),y(),{kind:`mutation`,auth:`protected`})},status:{schema:nz,kind:`push`},runtimeState:nz,durability:`session`},iz=f({id:u(),label:u(),scope:S([`mesh`,`public`]),url:u(),hostname:u(),port:a(),protocol:S([`http`,`https`])}),az=f({id:u(),hostname:u(),magicDns:u(),addresses:C(u()).readonly(),os:u().optional(),online:w(),lastSeenMs:a(),isSelf:w(),connection:S([`direct`,`relay`,`idle`]),relay:u().nullable(),lastHandshakeMs:a(),rxBytes:a(),txBytes:a(),tags:C(u()).readonly(),exitNodeOption:w(),advertisedRoutes:C(u()).readonly(),userLogin:u().nullable(),keyExpiry:a().nullable()}),oz=f({joined:w(),meshIp:u(),magicDnsHostname:u(),peerCount:a(),endpoints:C(iz).readonly(),error:u().optional(),tenantName:u(),magicDnsSuffix:u(),userLogin:u().nullable(),controlPlaneUrl:u(),keyExpiry:a().nullable(),daemonSocket:u().optional(),daemonCliPath:u().optional()}),sz={name:`mesh-network`,scope:`system`,mode:`collection`,providerKind:`mesh`,methods:{getStatus:L(y(),oz),join:L(f({authKey:u().min(8),hostname:u().optional()}),f({joined:h(!0)}),{kind:`mutation`}),startLogin:L(f({hostname:u().optional()}),f({loginUrl:u()}),{kind:`mutation`}),leave:L(y(),f({left:h(!0)}),{kind:`mutation`}),logout:L(y(),f({loggedOut:h(!0)}),{kind:`mutation`}),listPeers:L(y(),f({peers:C(az).readonly()})),testConnection:L(f({authKey:u().optional()}),f({ok:w(),tenant:u().optional(),daemonVersion:u().optional(),error:u().optional()}),{kind:`mutation`})}},cz=15e3,lz=f({detected:w(),lastDetectedAt:a().nullable(),autoClearAfterMs:a().nullable()}),uz=f({deviceId:a(),detected:w(),timestamp:a(),source:Rj,regions:C(PS).readonly().optional(),triggeredBy:TE.optional()}),dz={name:`motion`,scope:`device`,mode:`singleton`,deviceNative:!0,deviceTypes:[R.Camera,R.Sensor],methods:{isDetected:L(f({deviceId:a()}),w())},events:{onMotionChanged:{data:uz}},status:{schema:lz,kind:`push`},runtimeState:lz,durability:`session`},fz=f({enabled:w(),lastChangedAt:a()}),pz=fz.extend({lastFetchedAt:a()}),mz={name:`motion-trigger`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[R.Light,R.Siren,R.Switch],methods:{setMotionTrigger:L(f({deviceId:a().int().nonnegative(),enabled:w()}),y(),{kind:`mutation`,auth:`admin`})},events:{onMotionTriggerChanged:{data:f({deviceId:a(),enabled:w(),lastChangedAt:a()})}},status:{schema:fz,kind:`command-driven`},runtimeState:pz,durability:`session`},hz=f({id:a(),enabled:w(),shape:qC}),gz=f({enabled:w(),sensitivity:a(),regions:C(hz),lastFetchedAt:a()}),_z=f({maxRegions:a(),supportedShapes:C(XC),grid:QC,sensitivity:f({min:a(),max:a(),step:a()})}),vz=f({enabled:w().optional(),sensitivity:a().optional(),regions:C(hz).optional()}),yz={name:`motion-zones`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[R.Camera],deviceConfig:{ui:{kind:`widget`,widgetId:`host/motion-zones-grid`,tab:`motion`,label:`Motion Zones`}},methods:{getOptions:L(f({deviceId:a()}),_z),setZone:L(f({deviceId:a(),patch:vz}),y(),{kind:`mutation`,auth:`admin`})},status:{schema:gz,kind:`poll`},runtimeState:gz,durability:`restored`,volatileStateFields:[`lastFetchedAt`]},bz=S([`person`,`vehicle`,`animal`,`face`,`package`,`other`]),xz=f({class:bz,timestamp:a(),confidence:a().min(0).max(1).optional()}),Sz=f({lastByClass:ae(bz,xz.nullable()),supportedClasses:C(bz).readonly(),enabled:w()}),Cz=S([`boxed`,`while-streaming`,`flag-only`]),wz=f({supportedClasses:C(bz).readonly(),geometry:Cz}),Tz=f({enabled:w().optional()}),Ez=Sz.extend({lastFetchedAt:a()}),Dz={name:`native-object-detection`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[R.Camera],methods:{getOptions:L(f({deviceId:a()}),wz),setSettings:L(f({deviceId:a(),settings:Tz}),y(),{kind:`mutation`,auth:`admin`}),setEnabled:L(f({deviceId:a(),enabled:w()}),y(),{kind:`mutation`,auth:`admin`})},events:{onDetected:{data:f({deviceId:a(),detection:xz})}},status:{schema:Sz,kind:`push`},runtimeState:Ez,durability:`restored`,volatileStateFields:[`lastFetchedAt`]},Oz=f({pan:a().min(-1).max(1).optional(),tilt:a().min(-1).max(1).optional(),speed:a().min(0).max(1).optional()}),kz=S([`goHome`,`locate`,`spotClean`,`findPet`,`personFollow`,`stop`,`startClean`,`pauseClean`,`dockWash`,`autoEmpty`,`flashOn`,`flashOff`]),Az=S([`action`,`sound`]),jz=f({id:u(),kind:Az,label:u(),icon:u(),soundId:a().int().optional(),enabled:w()}),Mz=[{id:`startClean`,kind:`action`,label:`Start cleaning`,icon:`play`,enabled:!0},{id:`pauseClean`,kind:`action`,label:`Pause cleaning`,icon:`pause`,enabled:!0},{id:`stop`,kind:`action`,label:`Stop`,icon:`hand`,enabled:!0},{id:`goHome`,kind:`action`,label:`Return to dock`,icon:`home`,enabled:!0},{id:`locate`,kind:`action`,label:`Locate`,icon:`bell`,enabled:!0},{id:`spotClean`,kind:`action`,label:`Spot clean here`,icon:`crosshair`,enabled:!0},{id:`findPet`,kind:`action`,label:`Find pet`,icon:`paw-print`,enabled:!0},{id:`personFollow`,kind:`action`,label:`Follow me`,icon:`footprints`,enabled:!0},{id:`dockWash`,kind:`action`,label:`Wash mop`,icon:`droplets`,enabled:!0},{id:`autoEmpty`,kind:`action`,label:`Empty dustbin`,icon:`trash-2`,enabled:!0},{id:`flashOn`,kind:`action`,label:`Flash on`,icon:`flashlight`,enabled:!0},{id:`flashOff`,kind:`action`,label:`Flash off`,icon:`flashlight-off`,enabled:!0},{id:`sound:meow`,kind:`sound`,label:`Meow`,icon:`cat`,soundId:684,enabled:!0},{id:`sound:bark`,kind:`sound`,label:`Woof`,icon:`dog`,soundId:685,enabled:!0},{id:`sound:footsteps`,kind:`sound`,label:`Footsteps`,icon:`footprints`,soundId:686,enabled:!0},{id:`sound:purring`,kind:`sound`,label:`Purring`,icon:`cat`,soundId:687,enabled:!0},{id:`sound:tickTock`,kind:`sound`,label:`Tick-tock`,icon:`clock`,soundId:688,enabled:!0}],Nz=f({x:a(),y:a()}),Pz=f({move:w(),stop:w(),goToPoint:w(),runAction:w(),playSound:w(),light:w(),lightMode:w()}),Fz=S([`auto`,`manual`]),Iz=S([`idle`,`cleaning`,`spot`,`following`,`goto`,`returning`,`paused`,`unknown`]),Lz=f({mode:Iz,following:w(),flash:w(),lightMode:Fz,lightLevel:a().min(40).max(100),lastChangedAt:a()}),Rz=Lz.extend({lastFetchedAt:a()}),zz={name:`navigation`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[R.Camera],deviceConfig:{ui:{kind:`widget`,widgetId:`host/navigation-panel`,tab:`navigation`,topTab:!0,label:`Navigation`,order:0}},methods:{move:L(Oz.extend({deviceId:a()}),y(),{kind:`mutation`}),stop:L(f({deviceId:a()}),y(),{kind:`mutation`}),goToPoint:L(Nz.extend({deviceId:a()}),y(),{kind:`mutation`}),listActions:L(f({deviceId:a()}),C(jz)),runAction:L(f({deviceId:a(),actionId:kz}),y(),{kind:`mutation`}),playSound:L(f({deviceId:a(),soundId:a().int()}),y(),{kind:`mutation`}),setLightOn:L(f({deviceId:a(),on:w()}),y(),{kind:`mutation`}),setLightMode:L(f({deviceId:a(),mode:Fz,level:a().min(40).max(100).optional()}),y(),{kind:`mutation`}),setLightLevel:L(f({deviceId:a(),level:a().min(40).max(100)}),y(),{kind:`mutation`}),getFeatures:L(f({deviceId:a()}),Pz)},events:{onStatusChanged:{data:f({deviceId:a(),status:Lz})}},status:{schema:Lz,kind:`push`},runtimeState:Rz,durability:`session`},Bz=[`wifi`,`ethernet`,`cellular`,`unknown`],Vz=f({type:S(Bz),signalPercent:a().min(0).max(100).nullable(),rssiDbm:a().optional(),ssid:u().optional(),lastUpdated:a()}),Hz={type:`unknown`,signalPercent:null,lastUpdated:0};function Uz(e,t){return e===void 0||!Number.isFinite(e)||t<=0||e<0||e>t?null:Math.round(e/t*100)}function Wz(e){return e===void 0||!Number.isFinite(e)||e>0?null:Math.round((Math.min(-50,Math.max(-100,e))+100)*2)}var Gz={name:`network-link`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[R.Camera,R.Sensor,R.Button,R.Switch,R.Light,R.Lock,R.Siren],methods:{},events:{onStatusChanged:{data:f({deviceId:a(),status:Vz})}},status:{schema:Vz,kind:`push`,empty:Hz},runtimeState:Vz,durability:`restored`,volatileStateFields:[`lastUpdated`]},Kz=f({nominalBitrateKbps:a(),observedBitrateKbps:a(),peakBitrateKbps:a(),packetLossPercent:a(),lastUpdated:a()}),qz=f({rttMs:a(),jitterMs:a(),estimatedBandwidthKbps:a(),packetLossPercent:a().min(0).max(100),downlinkMbps:a().optional(),downlinkAgeMs:a().optional(),lastUpdated:a()}),Jz=f({deviceId:a(),streams:b(u(),Kz),client:qz.optional()}),Yz={name:`network-quality`,scope:`system`,mode:`singleton`,methods:{getDeviceStats:L(f({deviceId:a()}),Jz.nullable()),getAllStats:L(y(),C(Jz).readonly()),reportClientStats:L(f({deviceId:a(),rttMs:a().min(0).max(6e4),jitterMs:a().min(0).max(1e4),estimatedBandwidthKbps:a().min(0).max(1e6),packetLossPercent:a().min(0).max(100),downlinkMbps:a().min(0).max(1e5).optional(),downlinkAgeMs:a().min(0).max(864e5).optional()}),y(),{kind:`mutation`})},mount:{kind:`server-provided`}},Xz=f({addonId:u(),capabilities:C(u()).readonly(),status:u()}),Zz=f({pid:a(),name:u(),state:u(),cpuPercent:a(),memoryRss:a(),uptimeSeconds:a(),services:C(Xz).readonly(),groupId:u().optional()}),Qz=f({id:u(),status:u(),cpuPercent:a(),memoryRss:a()}),$z=f({category:u(),total:a(),healthy:a(),addons:C(Qz).readonly()}),eB=f({name:u(),version:u()}),tB=f({id:u(),name:u(),hostname:u(),platform:u(),arch:u(),cpuModel:u().nullable(),cpuCores:a(),memoryMB:a(),engines:C(u()).readonly(),isHub:w(),isOnline:w(),cpuPercent:a(),memoryPercent:a(),uptime:a(),lastSeen:u(),localIps:C(u()).readonly(),addons:C(f({id:u(),capabilities:C(u()).readonly(),status:u()})).readonly(),processes:C(Zz).readonly(),categories:C($z).readonly(),rootPackage:eB.nullable()}),nB=f({callerAddonId:u(),providerAddonId:u(),capName:u(),callsPerMin:a(),lastCallAtMs:a()}),rB=f({nodeId:u(),name:u(),version:u(),status:u(),synced:w()}),iB=f({hubVersion:u(),nodes:C(rB)}),aB=f({nodeId:u(),addonId:u()}),oB=f({id:u(),status:u(),version:u().optional(),packageName:u().optional()}),sB=f({success:w()}),cB=f({success:w(),reason:u().optional()}),lB=f({restarted:C(u()).readonly(),failed:C(u()).readonly()}),uB=f({nodeId:u(),name:u()}),dB=f({id:u(),name:u(),isHub:w(),isOnline:w()}),fB=f({nodes:C(dB).readonly(),complete:w()}),pB={name:`nodes`,scope:`system`,mode:`singleton`,nodeIdMode:`data`,methods:{topology:L(y(),C(tB).readonly(),{auth:`admin`}),directory:L(y(),fB,{auth:`admin`}),deployAddon:L(aB,sB,{kind:`mutation`,auth:`admin`}),undeployAddon:L(aB,sB,{kind:`mutation`,auth:`admin`}),restartAddon:L(aB,sB,{kind:`mutation`,auth:`admin`}),restartProcess:L(f({nodeId:u(),processName:u()}),cB,{kind:`mutation`,auth:`admin`}),restartNode:L(f({nodeId:u()}),lB,{kind:`mutation`,auth:`admin`}),shutdownNode:L(f({nodeId:u()}),sB,{kind:`mutation`,auth:`admin`}),renameNode:L(f({nodeId:u(),name:u().min(1).max(64)}),uB,{kind:`mutation`,auth:`admin`}),clusterAddonStatus:L(y(),b(u(),iB),{auth:`admin`}),getCapUsageGraph:L(f({windowSeconds:a().int().positive().max(300).default(60)}),C(nB).readonly(),{auth:`admin`}),getNodeAddons:L(f({nodeId:u()}),C(oB).readonly(),{auth:`admin`}),setProcessLogLevel:L(f({nodeId:u(),level:u()}),sB,{kind:`mutation`,auth:`admin`}),executeQuery:L(f({nodeId:u(),addonId:u(),queryName:u(),params:b(u(),s()).optional()}),s(),{kind:`mutation`,auth:`admin`})},mount:{kind:`server-provided`}},mB=S([`min`,`low`,`normal`,`high`]),hB=f({id:u().min(1),title:u().min(1),uri:c().optional(),destructive:w().optional()}),gB=f({image:w(),priority:w(),data:w(),actions:w(),recipients:w()}),_B=f({lastSentAt:a(),lastError:u().nullable(),queueDepth:a().int().nonnegative(),supports:gB}),vB=f({deviceId:a().int().nonnegative(),title:u().optional(),body:u().min(1),image:u().optional(),priority:mB.optional(),channel:u().optional(),recipients:C(u()).optional(),actions:C(hB).optional(),data:b(u(),s()).optional()}),yB=f({notificationId:u(),acceptedAt:a()}),bB={name:`notifier`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[R.Notifier],methods:{send:L(vB,yB,{kind:`mutation`,auth:`admin`}),cancel:L(f({deviceId:a().int().nonnegative(),notificationId:u().min(1)}),y(),{kind:`mutation`,auth:`admin`})},events:{onSent:{data:f({deviceId:a(),notificationId:u(),success:w(),error:u().nullable(),acceptedAt:a()})}},status:{schema:_B,kind:`command-driven`},runtimeState:_B,durability:`session`},xB=f({value:a(),unit:u().optional(),precision:a().int().min(0).max(10).optional(),lastFetchedAt:a()}),SB={name:`numeric-sensor`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[R.Sensor],methods:{},status:{schema:xB,kind:`push`},runtimeState:xB,durability:`restored`,volatileStateFields:[`lastFetchedAt`]},CB=S([`text`,`timestamp`,`watermark`]),wB=S([`top-left`,`top-center`,`top-right`,`bottom-left`,`bottom-center`,`bottom-right`,`custom`]),TB=f({id:u(),kind:CB,enabled:w(),text:u().optional(),position:wB.optional(),availablePositions:C(wB).readonly(),readOnly:w().optional(),maxCharacters:a().int().positive().optional()}),EB=f({overlays:C(TB).readonly()}),DB=f({enabled:w().optional(),text:u().optional(),position:wB.optional()}).partial(),OB={name:`osd`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[R.Camera],methods:{setOverlay:L(f({deviceId:a(),overlayId:u(),patch:DB}),y(),{kind:`mutation`,auth:`admin`})},events:{onStatusChanged:{data:f({deviceId:a(),status:EB})}},status:{schema:EB,kind:`command-driven`},settings:{bindings:[{kind:`array`,statusPath:`overlays`,idField:`id`,method:`setOverlay`,idArg:`overlayId`,patchArg:`patch`,sectionId:`osd`,sectionTitle:`Video overlays`,itemFields:{enabled:{label:e=>`${String(e.id)} enabled`,kind:`boolean`},text:{label:e=>`${String(e.id)} text`,kind:`text`,when:e=>e.kind!==`timestamp`&&!e.readOnly},position:{label:e=>`${String(e.id)} position`,kind:`select`,options:e=>e.availablePositions??[],when:e=>Array.isArray(e.availablePositions)&&e.availablePositions.length>0}}}]}},kB=S([`value`,`unit`,`full`]),AB=S([`value+unit`,`value`,`unit`]),jB=f({containerId:a().int().optional(),deviceId:a().int()}),MB=f({alias:u().min(1).max(32).regex(/^[A-Za-z][A-Za-z0-9_-]*$/,`alias must start with a letter`),pick:jB,capName:u().min(1).max(64),valuePath:u().min(1).max(64),displayUnit:u().max(16).optional(),maxDecimals:a().int().min(0).max(4).default(1),valueMap:b(u(),u()).optional()}),NB=f({id:u().min(1).max(64),name:u().min(1).max(64),bindings:C(MB).max(32).default([]),parser:u().max(256).default(``)}),PB=m(`kind`,[f({kind:h(`static`),text:u().max(64)}),f({kind:h(`clock`),pattern:u().min(1).max(32).default(`HH:mm`),timezone:u().min(1).max(64).optional()}),f({kind:h(`device-state`),deviceId:a().int().optional(),capName:u().min(1).max(64),valuePath:u().min(1).max(64),displayUnit:u().max(16).optional()}),f({kind:h(`latest-recognition`),recognition:S([`person`,`plate`])}),f({kind:h(`template`),templateId:u().min(1).max(64)})]),FB=f({enabled:w().default(!0),source:PB,template:u().max(96).default("${value}"),maxDecimals:a().int().min(0).max(4).default(1),valueMap:b(u(),u()).optional(),schedule:fw.optional(),conditions:Nw.optional()}),IB=f({slotId:u(),kind:CB,readOnly:w(),cameraEnabled:w(),cameraText:u().optional(),binding:FB.nullable()}),LB=S([`written`,`unchanged`,`gated`,`unreadable`,`disabled`,`unbound`,`failed`]),RB=f({slotId:u(),outcome:LB,text:u(),reason:u().optional()}),zB=S([`number`,`boolean`,`string`,`enum`]),BB=f({deviceId:a().int(),deviceName:u(),capName:u(),valuePath:u(),label:u(),valueType:zB,enumValues:C(u()).readonly().optional()}),VB={name:`osd-manager`,scope:`system`,mode:`singleton`,methods:{getDeviceOsd:L(f({deviceId:a().int()}),f({supported:w(),slots:C(IB)}),{auth:`admin`}),getSourceCatalog:L(f({deviceId:a().int()}),f({sources:C(BB)}),{auth:`admin`}),getConditionSupport:L(f({}),f({supported:C(u()),catalog:C(pT)}),{auth:`admin`}),setSlotBinding:L(f({deviceId:a().int(),slotId:u().min(1),binding:FB}),f({slot:IB,render:RB}),{kind:`mutation`,auth:`admin`}),clearSlotBinding:L(f({deviceId:a().int(),slotId:u().min(1)}),f({success:h(!0)}),{kind:`mutation`,auth:`admin`}),copyDeviceConfiguration:L(f({sourceDeviceId:a().int(),targetDeviceId:a().int()}),f({copied:a().int().nonnegative(),skipped:a().int().nonnegative()}),{kind:`mutation`,auth:`admin`}),previewSlot:L(f({deviceId:a().int(),slotId:u().min(1),binding:FB.optional()}),RB,{kind:`mutation`,auth:`admin`}),renderDevice:L(f({deviceId:a().int()}),f({results:C(RB)}),{kind:`mutation`,auth:`admin`}),listTemplates:L(f({}),f({templates:C(NB)}),{auth:`admin`}),upsertTemplate:L(f({template:NB}),f({template:NB}),{kind:`mutation`,auth:`admin`}),deleteTemplate:L(f({templateId:u().min(1).max(64)}),f({success:h(!0)}),{kind:`mutation`,auth:`admin`})}},HB=S([`normal`,`offline`,`on_batteries`]),UB=a().int().min(4).max(200),WB=f({foodLevel:a().nullable(),food1:a().nullable(),food2:a().nullable(),lowFood:w(),batteryPower:a().min(0).max(100).nullable(),desiccantLeftDays:a().nullable(),feeding:w(),status:HB.nullable(),error:u().nullable(),errorCode:a().nullable(),isDualHopper:w(),childLock:w(),indicatorLight:w(),feedSound:w(),volume:a(),lastFetchedAt:a()}),GB={name:`pet-feeder`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[R.PetFeeder],methods:{feed:L(f({deviceId:a().int().nonnegative(),grams:UB.optional(),hopper1:UB.optional(),hopper2:UB.optional()}),y(),{kind:`mutation`,auth:`protected`}),cancelFeed:L(f({deviceId:a().int().nonnegative()}),y(),{kind:`mutation`,auth:`protected`}),resetDesiccant:L(f({deviceId:a().int().nonnegative()}),y(),{kind:`mutation`,auth:`protected`}),markFoodReplenished:L(f({deviceId:a().int().nonnegative()}),y(),{kind:`mutation`,auth:`protected`}),callPet:L(f({deviceId:a().int().nonnegative()}),y(),{kind:`mutation`,auth:`protected`}),playSound:L(f({deviceId:a().int().nonnegative(),soundId:a().int().nonnegative()}),y(),{kind:`mutation`,auth:`protected`}),setChildLock:L(f({deviceId:a().int().nonnegative(),on:w()}),y(),{kind:`mutation`,auth:`protected`}),setIndicatorLight:L(f({deviceId:a().int().nonnegative(),on:w()}),y(),{kind:`mutation`,auth:`protected`}),setFeedSound:L(f({deviceId:a().int().nonnegative(),on:w()}),y(),{kind:`mutation`,auth:`protected`}),setVolume:L(f({deviceId:a().int().nonnegative(),level:a().int().nonnegative()}),y(),{kind:`mutation`,auth:`protected`})},status:{schema:WB,kind:`poll`},runtimeState:WB,durability:`session`},KB=f({id:u(),name:u(),sampleCount:a().int().nonnegative(),coverMediaId:a().int().optional(),coverBase64:u().optional()}),qB=f({id:u(),text:u(),score:a(),addedAt:a().int(),deviceId:a().int().optional(),base64:u().optional()}),JB=f({plateId:u(),deviceId:a().int(),trackId:u(),timestamp:a().int(),text:u(),score:a(),corrected:w(),recognizedVehicleId:u().optional(),vehicleName:u().optional(),assigned:w(),plateBbox:yf.optional(),keyFrameMediaId:a().int().optional(),base64:u().optional(),cropUrl:u().optional()}),YB=f({mediaId:a().int(),kind:u(),url:u(),sizeBytes:a(),timestamp:a()}),XB=f({plateIds:C(u()).readonly(),representativePlateId:u(),representativeText:u(),size:a().int(),cohesion:a()}),ZB={name:`plate-gallery`,scope:`system`,mode:`singleton`,methods:{listPlates:L(f({deviceId:a().int().optional(),limit:a().int().positive().optional(),includeCrops:w().optional()}).optional(),C(JB).readonly()),getPlateByTrack:L(f({deviceId:a().int(),trackId:u()}),JB.nullable()),getPlateMedia:L(f({plateId:u()}),C(YB).readonly()),searchPlates:L(f({text:u().min(1),maxDistance:a().int().min(0).optional(),limit:a().int().positive().optional(),includeCrops:w().optional()}),C(JB).readonly()),suggestPlateClusters:L(f({maxDistance:a().int().min(0).optional(),minClusterSize:a().int().min(2).optional(),limit:a().int().positive().optional()}).optional(),C(XB).readonly()),correctPlateText:L(f({plateId:u(),text:u().min(1)}),y(),{kind:`mutation`,auth:`admin`}),deletePlate:L(f({plateId:u()}),y(),{kind:`mutation`,auth:`admin`}),listVehicles:L(f({includeCrops:w().optional()}).optional(),C(KB).readonly()),createVehicle:L(f({name:u().min(1)}),KB,{kind:`mutation`,auth:`admin`}),renameVehicle:L(f({id:u(),name:u().min(1)}),y(),{kind:`mutation`,auth:`admin`}),deleteVehicle:L(f({id:u()}),y(),{kind:`mutation`,auth:`admin`}),listVehicleSamples:L(f({vehicleId:u()}),C(qB).readonly()),removeVehicleSample:L(f({vehicleId:u(),sampleId:u()}),y(),{kind:`mutation`,auth:`admin`}),assignPlate:L(f({plateId:u(),vehicleId:u()}),y(),{kind:`mutation`,auth:`admin`}),unassignPlate:L(f({plateId:u()}),y(),{kind:`mutation`,auth:`admin`}),assignPlates:L(f({plateIds:C(u()).min(1),vehicleId:u()}),f({assigned:a().int(),failed:C(u()).readonly()}),{kind:`mutation`,auth:`admin`}),unassignPlates:L(f({plateIds:C(u()).min(1)}),f({unassigned:a().int(),failed:C(u()).readonly()}),{kind:`mutation`,auth:`admin`})}},QB=S(Cl),$B=S([`videotoolbox`,`cuda`,`nvdec`,`vaapi`,`qsv`,`d3d11va`,`dxva2`,`amf`,`vdpau`,`drm`,`coreml`,`tensorrt`,`openvino`,`directml`,`webgpu`,`none`]).nullable().optional(),eV=f({preferred:C(u()).readonly(),rationale:u()}),tV=S([`h264_videotoolbox`,`hevc_videotoolbox`,`h264_vaapi`,`hevc_vaapi`,`h264_nvenc`,`hevc_nvenc`,`h264_qsv`,`hevc_qsv`,`h264_amf`,`hevc_amf`,`libx264`,`libx265`]);f({encoders:C(f({encoder:tV,codec:S([`H264`,`H265`]),family:S([`videotoolbox`,`vaapi`,`nvenc`,`qsv`,`amf`,`software`]),available:w(),reason:u().optional()})).readonly(),defaultH264:tV,defaultH265:tV,probedAt:a()}),f({methods:C(u()).readonly(),probedAt:a()});var nV=S([`darwin`,`linux`,`win32`]),rV=S([`arm64`,`x64`]),iV=f({type:S([`nvidia`,`amd`,`intel`,`apple`]),name:u(),memoryMB:a().optional()}),aV=f({type:S([`apple-ane`,`intel-npu`])}),oV=f({type:h(`coral-edgetpu`),bus:u().optional()}),sV=f({platform:nV,arch:rV,cpuModel:u(),cpuCores:a(),totalRAM_MB:a(),availableRAM_MB:a(),gpu:iV.nullable(),npu:aV.nullable(),coral:oV.nullable().optional()}),cV=f({runtime:h(`python`),backend:u(),format:S([`onnx`,`coreml`,`openvino`,`tflite`]),score:a(),reason:u(),available:w()}),lV=f({key:u(),backend:u(),device:u(),format:QB,runtime:h(`python`),score:a(),available:w()}),uV=f({hardware:sV,scores:C(cV).readonly(),bestScore:cV,pythonPath:u().nullable(),devices:C(lV).readonly()}),dV=f({modelId:u(),name:u(),minRAM_MB:a(),accuracyScore:a(),formats:C(u()).readonly()}),fV=f({modelId:u(),runtime:h(`python`),backend:u(),format:QB,reason:u()}),pV={name:`platform-probe`,scope:`system`,mode:`singleton`,methods:{getCapabilities:L(y(),uV),getHardware:L(y(),sV),resolveInferenceConfig:L(f({requirements:C(dV).readonly()}),fV),resolveHwAccel:L(f({prefer:$B}),eV)}},mV=f({watts:a().optional(),kwhTotal:a().optional(),volts:a().optional(),amps:a().optional(),va:a().optional(),powerFactor:a().min(0).max(1).optional(),lastFetchedAt:a(),unit:u().optional(),precision:a().int().min(0).max(10).optional()}),hV={name:`power-meter`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[R.Sensor],methods:{},status:{schema:mV,kind:`push`},runtimeState:mV,durability:`restored`,volatileStateFields:[`lastFetchedAt`]},gV=f({latitude:a().min(-90).max(90),longitude:a().min(-180).max(180),accuracyMeters:a().nonnegative()}),_V=f({state:u(),location:u().nullable(),gps:gV.nullable(),batteryPercent:a().min(0).max(100).nullable(),lastChangedAt:a()}),vV={name:`presence`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[R.Presence],methods:{},status:{schema:_V,kind:`push`},runtimeState:_V,durability:`restored`,volatileStateFields:[`lastChangedAt`]},yV=f({hpa:a(),lastFetchedAt:a(),unit:u().optional(),precision:a().int().min(0).max(10).optional()}),bV={name:`pressure-sensor`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[R.Sensor],methods:{},status:{schema:yV,kind:`push`},runtimeState:yV,durability:`restored`,volatileStateFields:[`lastFetchedAt`]},xV=m(`kind`,[GC,KC]),SV=f({id:a(),enabled:w(),shape:xV}),CV=f({enabled:w(),regions:C(SV).nullable(),audioEnabled:w().nullable(),lastFetchedAt:a()}),wV=f({maxRegions:a(),supportedShapes:C(XC),polygonVertices:ZC.optional(),supportsAudioMute:w()}),TV=f({enabled:w().optional(),regions:C(SV).optional()}),EV={name:`privacy-mask`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[R.Camera],deviceConfig:{ui:{kind:`widget`,widgetId:`host/privacy-mask-grid`,tab:`image`,label:`Privacy Mask`}},methods:{getOptions:L(f({deviceId:a()}),wV),setMask:L(f({deviceId:a(),patch:TV}),y(),{kind:`mutation`,auth:`admin`}),setAudioEnabled:L(f({deviceId:a(),enabled:w()}),y(),{kind:`mutation`,auth:`admin`})},status:{schema:CV,kind:`poll`},runtimeState:CV,durability:`restored`,volatileStateFields:[`lastFetchedAt`]};function DV(e){return e.length===0?null:e.some(e=>e.audioEnabled)}var OV=S([`home`,`day-mode`,`night-mode`,`day-night-auto`,`set-limits`,`save-limits`,`reboot`,`osd-menu`]),kV=f({id:u(),name:u(),fn:OV.nullable(),writable:w()}),AV=f({pan:a().nullable(),tilt:a().nullable(),zoom:a().nullable()}),jV=f({pan:a().optional(),tilt:a().optional(),zoom:a().optional(),speed:a().optional()}),MV=AV.extend({autofocus:w()}),NV=f({hasPan:w(),hasTilt:w(),hasZoom:w(),supportsPresets:w(),maxPresets:a().optional(),hasAutofocus:w(),speedSteps:a().int().positive().nullable(),moveImpulseMs:a().int().positive().nullable()}),PV=f({presetId:u().nullable(),source:S([`operator`,`firmware`,`native`,`none`])}),FV=f({enabled:w(),seconds:a().int()}),IV={name:`ptz`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[R.Camera],deviceConfig:{ui:{kind:`widget`,widgetId:`host/ptz-panel`,tab:`ptz`,topTab:!0,label:`PTZ`,order:0}},methods:{move:L(jV.extend({deviceId:a()}),y(),{kind:`mutation`}),continuousMove:L(jV.extend({deviceId:a()}),y(),{kind:`mutation`}),stop:L(f({deviceId:a()}),y(),{kind:`mutation`}),getPresets:L(f({deviceId:a()}),C(kV)),goToPreset:L(f({deviceId:a(),presetId:u()}),y(),{kind:`mutation`}),savePreset:L(f({deviceId:a(),presetId:u(),name:u()}),y(),{kind:`mutation`,auth:`admin`}),deletePreset:L(f({deviceId:a(),presetId:u()}),y(),{kind:`mutation`,auth:`admin`}),getOptions:L(f({deviceId:a()}),NV),goHome:L(f({deviceId:a()}),y(),{kind:`mutation`}),getHomePreset:L(f({deviceId:a()}),PV),setHomePreset:L(f({deviceId:a(),presetId:u().nullable()}),y(),{kind:`mutation`,auth:`admin`}),captureHomeHere:L(f({deviceId:a()}),y(),{kind:`mutation`,auth:`admin`}),getHomeReturn:L(f({deviceId:a()}),FV.nullable()),setHomeReturn:L(f({deviceId:a(),enabled:w(),seconds:a().int().min(0).max(3600)}),y(),{kind:`mutation`,auth:`admin`}),getPosition:L(f({deviceId:a()}),AV),setAutofocus:L(f({deviceId:a(),enabled:w()}),y(),{kind:`mutation`})},status:{schema:MV,kind:`command-driven`}},LV=f({targetType:u().describe(`Vendor target string (people/vehicle/pet); empty = camera default`),stopDelaySeconds:a().int().min(0).max(300),disappearDelaySeconds:a().int().min(0).max(300)}),RV=f({value:u(),label:u()}),zV=f({enabled:w(),lastChangedAt:a(),currentSettings:LV.nullable(),supportedTargetTypes:C(RV)}),BV=zV.extend({lastFetchedAt:a()}),VV={name:`ptz-autotrack`,scope:`device`,deviceNative:!0,mode:`singleton`,kind:`wrapper`,defaultActive:!1,deviceTypes:[R.Camera],deviceConfig:{ui:{kind:`widget`,widgetId:`host/ptz-autotrack`,tab:`ptz`,topTab:!0,label:`Auto-Tracking`,order:5}},methods:{getStatus:L(f({deviceId:a()}),zV),setEnabled:L(f({deviceId:a(),enabled:w()}),y(),{kind:`mutation`}),getSettings:L(f({deviceId:a()}),LV.nullable()),setSettings:L(f({deviceId:a(),settings:LV.partial()}),y(),{kind:`mutation`})},events:{onStatusChanged:{data:f({deviceId:a(),status:zV})}},status:{schema:zV,kind:`command-driven`},runtimeState:BV,durability:`session`},HV={name:`reboot`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[R.Camera,R.Sensor,R.Switch],methods:{reboot:L(f({deviceId:a().int().nonnegative()}),f({success:h(!0)}),{kind:`mutation`,auth:`admin`})}},UV=`camstack`,WV=`recorder`,GV=f({profile:u(),startMs:a(),endMs:a()}),KV=S([`read`,`unreadable`]),qV=f({deviceId:a(),read:KV,ranges:C(GV),profilesWithFootage:C(u())}),JV=f({deviceId:a(),read:KV,days:C(a())}),YV=f({deviceId:a(),localMasterPath:u().nullable(),playbackUrl:u().nullable(),playbackEndpoints:C(u())}),XV=f({state:S([`ok`,`sleeping`,`unreachable`,`no-storage`,`index-empty`]),reason:u().optional(),coverageAsOf:a().optional()}),ZV=f({source:u(),label:u(),addonId:u().optional(),availability:XV}),QV=f({transport:S([`archive`,`stream`,`realtime`]),coverage:S([`continuous`,`sparse`]),seek:S([`free`,`forward`,`segment`]),stepBack:w(),scrub:w(),rates:C(a().positive()).min(1).readonly(),exclusive:w()}),$V=m(`kind`,[f({kind:h(`hls`),manifest:YV}),f({kind:h(`clip`),source:u(),clipId:u(),startsAtMs:a()}),f({kind:h(`none`),reason:u()})]),eH={name:`recording`,scope:`device`,mode:`collection`,kind:`wrapper`,defaultActive:!0,deviceTypes:[R.Camera],methods:{listSources:L(f({deviceId:a()}),C(ZV).readonly(),{kind:`query`,auth:`protected`}),getAvailability:L(f({deviceId:a(),provider:u().min(1),fromMs:a(),toMs:a(),profile:u().optional()}),qV,{kind:`query`,auth:`protected`}),getDaysWithRecordings:L(f({deviceId:a(),provider:u().min(1),fromMs:a(),toMs:a(),tzOffsetMinutes:a()}),JV,{kind:`query`,auth:`protected`}),getPlayback:L(f({deviceId:a(),provider:u().min(1),fromMs:a(),toMs:a(),profile:D.optional()}),$V,{kind:`query`,auth:`protected`}),getPlaybackOptions:L(f({deviceId:a(),provider:u().min(1)}),QV,{kind:`query`,auth:`protected`})}},tH=f({deviceId:a(),enabled:w(),activeMode:Za,nodeId:u(),storageBytes:a()}),nH=f({deviceId:a(),read:S([`read`,`unreadable`]),ranges:C(GV).readonly(),profilesWithFootage:C(u()).readonly()}),rH=f({deviceId:a(),read:S([`read`,`unreadable`]),days:C(a()).readonly()}),iH=f({deviceId:a(),usedBytes:a(),oldestMs:a().nullable().optional(),segments:a().optional(),residentBytes:a().optional(),residentOldestMs:a().nullable().optional()}),aH=f({locationId:u().nullable(),locationIds:C(u()).optional(),root:u().optional(),usedBytes:a(),availableBytes:a().nullable(),totalBytes:a().nullable()}),oH=f({nodeId:u(),totalUsedBytes:a(),devices:C(iH),devicesRead:S([`archive`,`unavailable`]).optional(),complete:w().optional(),locations:C(aH).optional()}),sH=f({deviceId:a(),profile:u(),fromLocationId:u(),toLocationId:u(),bytes:a(),files:a().int()}),cH=S([`unassigned`,`target-not-writable`,`below-threshold`,`no-headroom`]),lH=f({deviceId:a(),profile:u(),fromLocationId:u(),toLocationId:u().nullable(),bytes:a(),reason:cH}),uH=f({moves:C(sH),skipped:C(lH),bytesToMove:a(),jobIds:C(u())}),dH=f({throttleMbps:a().min(1).max(1e3).optional(),minMoveGb:a().min(0).optional()}),fH=f({deviceId:a().int(),profile:u(),locationId:u()}),pH=f({deviceId:a().int(),locationId:u()}),mH=f({assignments:C(fH),pins:C(pH),defaultLocations:b(u(),u())}),hH=f({deviceId:a().int(),locationId:u().nullable()}),gH=m(`kind`,[f({kind:h(`segment`),startMs:a(),durMs:a(),bytes:a()}),f({kind:h(`gap`),nearestEdgeMs:a().nullable(),prevEndMs:a().nullable().optional()})]),_H=f({data:x(Uint8Array)}),vH=f({data:x(Uint8Array),gopStartMs:a(),gopDurMs:a()}),yH=m(`kind`,[f({kind:h(`ok`),data:x(Uint8Array),gopStartMs:a(),gopDurMs:a(),reachesRequestedEnd:w()}),f({kind:h(`spans-multiple-segments`),segmentEndMs:a()})]),bH={name:`recording-archive`,scope:`system`,mode:`singleton`,exposesDeviceSettings:!0,status:{schema:tH,kind:`command-driven`},methods:{getAvailabilityBatch:L(f({deviceIds:C(a()).min(1).max(200),fromMs:a(),toMs:a()}),C(nH).readonly(),{kind:`query`,auth:`protected`}),getDaysWithRecordingsBatch:L(f({deviceIds:C(a()).min(1).max(200),fromMs:a(),toMs:a(),tzOffsetMinutes:a()}),C(rH).readonly(),{kind:`query`,auth:`protected`}),getStorageUsage:L(f({}),oH,{kind:`query`,auth:`admin`}),getDeviceConfig:L(f({deviceId:a()}),lo,{kind:`query`,auth:`protected`}),locateSegment:L(f({deviceId:a(),profile:u(),epochMs:a()}),gH,{kind:`query`,auth:`admin`}),readSegmentBytes:L(f({deviceId:a(),profile:u(),startMs:a()}),_H,{kind:`query`,auth:`admin`}),readGopBytes:L(f({deviceId:a(),profile:u(),startMs:a(),epochMs:a()}),vH,{kind:`query`,auth:`admin`}),readWindowBytes:L(f({deviceId:a(),profile:u(),startMs:a(),fromMs:a(),toMs:a()}),yH,{kind:`query`,auth:`admin`}),setDeviceConfig:L(f({deviceId:a(),config:lo}),lo,{kind:`mutation`,auth:`admin`}),rescanStorage:L(f({deviceId:a()}),tH,{kind:`mutation`,auth:`admin`}),pruneFootage:L(f({deviceId:a(),reason:ya.optional()}),f({floorMs:a().nullable(),deletedBuckets:a().int(),reclaimedBytes:a().int()}),{kind:`mutation`,auth:`admin`}),deleteFootprint:L(f({deviceId:a(),fromMs:a().optional(),toMs:a().optional()}),f({deletedBuckets:a().int(),reclaimedBytes:a().int()}),{kind:`mutation`,auth:`admin`}),listOpsLog:L(xa,C(ba).readonly(),{kind:`query`,auth:`admin`}),renderGif:L(f({deviceId:a(),aroundMs:a(),preRollSec:a().min(0).max(30).default(2),postRollSec:a().min(0).max(30).default(5),maxWidth:a().int().min(120).max(1280).default(480),fps:a().int().min(1).max(15).default(5)}),f({gifBase64:u(),fromMs:a(),toMs:a()}),{kind:`mutation`,auth:`admin`}),renderClip:L(f({deviceId:a(),aroundMs:a(),preRollSec:a().min(0).max(30).default(3),postRollSec:a().min(0).max(30).default(7),maxWidth:a().int().min(160).max(1920).default(640)}),f({clipBase64:u(),mime:u(),fromMs:a(),toMs:a(),bytes:a().int()}),{kind:`mutation`,auth:`admin`}),pauseForStorageMigration:L(wo,f({paused:h(!0)}),{kind:`mutation`,auth:`admin`}),resumeForStorageMigration:L(wo,f({resumed:h(!0)}),{kind:`mutation`,auth:`admin`}),refreshStorageLocationsForMigration:L(wo,f({refreshed:h(!0)}),{kind:`mutation`,auth:`admin`}),startStorageMigrationMove:L(To,f({jobId:u()}),{kind:`mutation`,auth:`admin`}),getStorageMigrationMoveStatus:L(f({jobId:u()}),xo.nullable(),{auth:`admin`}),cancelStorageMigrationMove:L(f({jobId:u()}),f({cancelled:w()}),{kind:`mutation`,auth:`admin`}),relocateFootage:L(Co,f({jobId:u()}),{kind:`mutation`,auth:`admin`}),listRelocateJobs:L(f({}),C(xo).readonly(),{kind:`query`,auth:`admin`}),getRelocateResidue:L(Jo,Yo,{kind:`query`,auth:`admin`}),reconcileLedgerAgainstDisk:L(Xo,ts,{kind:`mutation`,auth:`admin`}),cancelRelocateJob:L(f({jobId:u()}),f({cancelled:w()}),{kind:`mutation`,auth:`admin`}),planStorageRebalance:L(dH,uH,{kind:`query`,auth:`admin`}),startStorageRebalance:L(dH,uH,{kind:`mutation`,auth:`admin`}),getPlacement:L(f({}),mH,{kind:`query`,auth:`admin`}),setDevicePlacement:L(hH,f({ok:h(!0)}),{kind:`mutation`,auth:`admin`})}},xH=a().min(.25).max(32),SH=f({fromSec:a().nonnegative(),toSec:a().nonnegative()}).refine(e=>e.toSec>e.fromSec,{message:`dense range must have toSec > fromSec`}),CH=f({everyMs:a().int().positive(),ranges:C(SH).min(1).max(200)}),wH=f({everyMs:a().int().positive(),outputFps:a().int().min(1).max(60).optional(),dense:CH.optional()}).superRefine((e,t)=>{e.dense!==void 0&&e.dense.everyMs>=e.everyMs&&t.addIssue({code:se.custom,message:`dense.everyMs must be strictly smaller than the base everyMs`,path:[`dense`,`everyMs`]})}),TH=f({speed:xH.optional(),timelapse:wH.optional(),includeAudio:w(),maxLifeMs:a().int().positive(),deleteAfterDownload:w(),title:u().max(200).optional(),notifyTargetIds:C(u().min(1)).max(20).optional()}).superRefine((e,t)=>{e.speed!==void 0&&e.timelapse!==void 0&&t.addIssue({code:se.custom,message:`speed and timelapse are mutually exclusive`,path:[`timelapse`]})}),EH=S([`queued`,`rendering`,`ready`,`failed`,`expired`,`deleted`]),DH=f({kind:h(`footage`),deviceId:a(),profiles:C(u()).min(1),fromMs:a(),toMs:a()}),OH=f({kind:h(`clip`),deviceId:a(),provider:u().min(1),source:u().min(1),sourceLabel:u().min(1),clipId:u().min(1),catalogWindow:f({sinceMs:a(),untilMs:a()}),profile:S([`high`,`mid`,`low`]),wake:IP.optional()}),kH=m(`kind`,[DH,OH]),AH=f({id:u(),deviceId:a(),profile:u(),fromMs:a(),toMs:a(),subject:kH.optional(),options:TH,state:EH,progressPct:a().nullable(),fileBytes:a().nullable(),expiresAt:a(),deleteAfterDownload:w(),downloadedAt:a().nullable(),createdAt:a(),createdBy:u(),error:u().nullable()}),jH=S([`catalog-miss`,`catalog-unreachable`,`no-file-for-window`,`clip-in-progress`,`unsupported-option`,`sleeping`,`camera-refused`,`fetch-failed`,`too-large-to-transfer`,`wake-expired`]);function MH(e,t){return t.length>0?`${e}: ${t}`:e}function NH(e){if(e===null)return null;let t=e.split(`:`,1)[0]??``,n=jH.safeParse(t.trim());return n.success?n.data:null}var PH=f({url:u(),endpoints:C(u())}),FH=50*1024*1024,IH=f({base64:u(),contentType:u(),name:u(),bytes:a().int().nonnegative()});function LH(e){return e.profiles!==void 0&&e.profiles.length>0?[...e.profiles]:typeof e.profile==`string`&&e.profile.length>0?[e.profile]:[]}var RH=f({deviceId:a(),profile:u().optional(),profiles:C(u()).min(1).optional(),fromMs:a().optional(),toMs:a().optional(),subject:kH.optional(),options:TH}).superRefine((e,t)=>{if(e.subject?.kind===`clip`){e.subject.deviceId!==e.deviceId&&t.addIssue({code:se.custom,message:`subject.deviceId (${e.subject.deviceId}) must equal deviceId (${e.deviceId}) — the top-level field is what per-device scope enforcement reads`,path:[`subject`,`deviceId`]}),(e.fromMs!==void 0||e.toMs!==void 0)&&t.addIssue({code:se.custom,message:`a clip export asks for no time range: the camera chose the boundaries and they are read from the catalog row`,path:[`fromMs`]});return}e.subject?.kind===`footage`&&e.subject.deviceId!==e.deviceId&&t.addIssue({code:se.custom,message:`subject.deviceId (${e.subject.deviceId}) must equal deviceId (${e.deviceId})`,path:[`subject`,`deviceId`]});let n=e.subject?.kind===`footage`?e.subject.fromMs:e.fromMs,r=e.subject?.kind===`footage`?e.subject.toMs:e.toMs;(typeof n!=`number`||typeof r!=`number`)&&t.addIssue({code:se.custom,message:`a footage export needs fromMs and toMs`,path:[`fromMs`]}),(e.subject?.kind===`footage`?[...e.subject.profiles]:LH(e)).length<1&&t.addIssue({code:se.custom,message:`pass profiles[] (min 1) or legacy profile`,path:[`profiles`]})});function zH(e){if(e.subject!==void 0)return e.subject;let t=LH(e);if(typeof e.fromMs!=`number`||typeof e.toMs!=`number`)throw Error(`recording-export: a footage export needs fromMs and toMs`);return{kind:`footage`,deviceId:e.deviceId,profiles:t,fromMs:e.fromMs,toMs:e.toMs}}function BH(e){return e.subject===void 0?{kind:`footage`,deviceId:e.deviceId,profiles:[e.profile],fromMs:e.fromMs,toMs:e.toMs}:e.subject}var VH={name:`recording-export`,scope:`system`,mode:`singleton`,methods:{createExport:L(RH,AH,{kind:`mutation`,auth:`protected`}),listExports:L(f({deviceId:a().optional()}),C(AH),{kind:`query`,auth:`protected`}),getExport:L(f({exportId:u()}),AH,{kind:`query`,auth:`protected`}),cancelExport:L(f({exportId:u()}),AH,{kind:`mutation`,auth:`protected`}),deleteExport:L(f({exportId:u()}),AH,{kind:`mutation`,auth:`protected`}),getDownloadUrl:L(f({exportId:u()}),PH,{kind:`query`,auth:`protected`}),readExportBytes:L(f({exportId:u()}),IH,{kind:`query`,auth:`protected`})}},HH=S([`continuous`,`motion`,`person`,`vehicle`,`animal`,`lineCrossing`,`intrusion`,`loitering`,`alarmInput`]),UH=f({trigger:HH,day:a().int().min(0).max(6),startMinute:a().int().min(0).max(1439),endMinute:a().int().min(1).max(1440)}),WH=f({id:u(),label:u().optional(),status:S([`ok`,`unformatted`,`error`,`offline`,`unknown`]),capacityMb:a().nullable(),freeMb:a().nullable(),writable:w().optional()}),GH=m(`kind`,[f({kind:h(`present`),volumes:C(WH)}),f({kind:h(`absent`),reason:u()}),f({kind:h(`unknown`),reason:u()})]),KH=f({id:u(),enabled:w(),isVideo:w(),codec:u().nullable(),resolution:u().nullable(),overwriteWhenFull:w().nullable()}),qH=f({storage:GH,tracks:C(KH),primaryTrackId:u().nullable(),enabled:w().nullable(),overwriteWhenFull:w().nullable(),preRecordSec:a().nullable(),postRecordSec:a().nullable(),segmentMinutes:a().nullable(),windows:C(UH),unreadableWindows:a(),recordingToNowhere:w(),lastFetchedAt:a()}),JH=f({min:a(),max:a(),step:a()}),YH=f({values:C(a()).min(1),sentinel:f({value:a(),meaning:S([`no-limit`,`disabled`])}).optional()}),XH=f({readable:w(),writable:w(),reason:u().optional()}),ZH=f({support:XH,granularityMinutes:a(),triggers:C(HH),supportsOverlappingTriggers:w()}),QH=f({enabled:XH,overwriteWhenFull:XH,preRecordSec:XH,preRecordSecRange:JH.optional(),preRecordSecAllowed:YH.optional(),postRecordSec:XH,postRecordSecRange:JH.optional(),postRecordSecAllowed:YH.optional(),segmentMinutes:XH,segmentMinutesRange:JH.optional(),segmentMinutesAllowed:YH.optional(),schedule:ZH}),$H=f({enabled:w().optional(),overwriteWhenFull:w().optional(),preRecordSec:a().optional(),postRecordSec:a().optional(),segmentMinutes:a().optional(),windows:C(UH).optional()}),eU={name:`recording-onboard`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[R.Camera],deviceConfig:{ui:{kind:`derived-form`,builderId:`recording-onboard`,tab:`recording`}},methods:{getOptions:L(f({deviceId:a()}),QH),setSettings:L(f({deviceId:a(),settings:$H}),y(),{kind:`mutation`,auth:`admin`})},status:{schema:qH,kind:`poll`},runtimeState:qH,durability:`restored`,volatileStateFields:[`lastFetchedAt`]},tU=1440,nU=[`Monday`,`Tuesday`,`Wednesday`,`Thursday`,`Friday`,`Saturday`,`Sunday`];function rU(e,t){if(t.enabled!==void 0&&!e.enabled.writable)return iU(`the master recording switch`,e.enabled.reason);if(t.overwriteWhenFull!==void 0&&!e.overwriteWhenFull.writable)return iU(`overwrite-when-full`,e.overwriteWhenFull.reason);let n=aU(`pre-record seconds`,t.preRecordSec,e.preRecordSec,e.preRecordSecRange,e.preRecordSecAllowed);if(n)return n;let r=aU(`post-record seconds`,t.postRecordSec,e.postRecordSec,e.postRecordSecRange,e.postRecordSecAllowed);if(r)return r;let i=aU(`segment length (minutes)`,t.segmentMinutes,e.segmentMinutes,e.segmentMinutesRange,e.segmentMinutesAllowed);if(i)return i;if(t.windows!==void 0){let n=oU(e,t.windows);if(n)return n}return null}function iU(e,t){return t?`this camera cannot change ${e}: ${t}`:`this camera cannot change ${e}`}function aU(e,t,n,r,i){if(t===void 0)return null;if(!n.writable)return iU(e,n.reason);if(!Number.isFinite(t))return`${e} must be a number, got ${String(t)}`;if(i){if(i.values.includes(t))return null;let n=e=>i.sentinel!==void 0&&e===i.sentinel.value?i.sentinel.meaning===`no-limit`?`no limit`:`off`:String(e);return`this camera accepts ${e} only as ${i.values.map(n).join(`, `)}; ${n(t)} is not one of them`}return r?t<r.min||t>r.max?`this camera accepts ${e} between ${String(r.min)} and ${String(r.max)}; ${String(t)} is outside that`:r.step>0&&(t-r.min)%r.step!==0?`this camera accepts ${e} in steps of ${String(r.step)} from ${String(r.min)}; ${String(t)} is not one of them`:null:null}function oU(e,t){let n=e.schedule;if(!n.support.writable)return iU(`the recording schedule`,n.support.reason);let r=new Set(n.triggers);for(let e of t){if(!r.has(e.trigger)){let t=n.triggers.length>0?n.triggers.join(`, `):`none`;return`this camera cannot record on "${e.trigger}"; it records on: ${t}`}if(e.endMinute<=e.startMinute)return`a window on ${cU(e.day)} ends at or before it starts (${String(e.startMinute)} → ${String(e.endMinute)})`;let t=n.granularityMinutes;if(t>1&&(e.startMinute%t!==0||e.endMinute%t!==0))return`this camera's schedule only moves in ${String(t)}-minute steps; the ${cU(e.day)} window ${lU(e.startMinute)}–${lU(e.endMinute)} is not aligned to them`}if(!n.supportsOverlappingTriggers){let e=sU(t);if(e)return`this camera stores one trigger per time range, so "${e.a.trigger}" and "${e.b.trigger}" cannot both cover ${cU(e.a.day)} ${lU(Math.max(e.a.startMinute,e.b.startMinute))}–${lU(Math.min(e.a.endMinute,e.b.endMinute))}`}return null}function sU(e){for(let t=0;t<e.length;t+=1)for(let n=t+1;n<e.length;n+=1){let r=e[t],i=e[n];if(!(!r||!i)&&r.day===i.day&&r.trigger!==i.trigger&&r.startMinute<i.endMinute&&i.startMinute<r.endMinute)return{a:r,b:i}}return null}function cU(e){return nU[e]??`day ${String(e)}`}function lU(e){let t=Math.floor(e/60),n=e%60;return`${String(t).padStart(2,`0`)}:${String(n).padStart(2,`0`)}`}function uU(e,t){return e*24+t}function dU(e){if(e.length===0)return!0;let t=e[0];for(let n of e)if(n!==t)return!1;return!0}function fU(e,t){if(e.length!==168)return[];let n=[];for(let r=0;r<7;r+=1){let i=null;for(let a=0;a<=24;a+=1){let o=a<24&&e[uU(r,a)]===`1`;o&&i===null?i=a:!o&&i!==null&&(n.push({trigger:t,day:r,startMinute:i*60,endMinute:a*60}),i=null)}}return n}function pU(e,t){let n=Array(168).fill(`0`);for(let r of e){if(r.trigger!==t||r.day<0||r.day>=7)continue;let e=Math.floor(r.startMinute/60),i=Math.ceil(r.endMinute/60);for(let t=e;t<i&&t<24;t+=1)n[uU(r.day,t)]=`1`}return n.join(``)}function mU(e){let t=/^(\d{1,2}):(\d{2})(?::(\d{2}))?$/.exec(e.trim());if(!t)return null;let n=Number(t[1]),r=Number(t[2]);if(!Number.isInteger(n)||!Number.isInteger(r)||r>59)return null;let i=n*60+r;return i>1440?null:i}function hU(e){if(e>=1440)return`24:00`;let t=Math.floor(e/60),n=e%60;return`${String(t).padStart(2,`0`)}:${String(n).padStart(2,`0`)}:00`}function gU(e){let t=e.trim().toLowerCase(),n=nU.findIndex(e=>e.toLowerCase()===t);return n>=0?n:null}function _U(e,t){let n=[];for(let[r,i]of Object.entries(e)){if(i===void 0||typeof i!=`number`&&typeof i!=`boolean`&&typeof i!=`string`)continue;let e=t===null?void 0:t[r],a=typeof e==`number`||typeof e==`boolean`||typeof e==`string`?e:null;a!==i&&n.push({field:r,asked:i,stored:a})}return n}var vU=f({active:w(),reason:u(),lastChangedAt:a()}),yU=vU.extend({lastFetchedAt:a()}),bU={name:`recording-signal`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[R.Camera],methods:{getStatus:L(f({deviceId:a()}),vU)},status:{schema:vU,kind:`push`,empty:{active:!1,reason:`unknown`,lastChangedAt:0}},runtimeState:yU,durability:`session`},xU=[{capName:`recording`,sourceId:`camstack`,addonId:`recorder`}];function SU(e,t){for(let n of xU)if(n.capName===e&&n.sourceId===t)return n.addonId;return null}var CU=u(),wU=[`day`,`ir`,`night`,`dawn`,`dusk`],TU=S([`skip`,`judge-anyway`]),EU=`__diverged__`,DU=S([`matched`,`diverged`,`unknown`]),OU=S([`no-reference-for-condition`,`view-shifted`,`no-vision-profile`,`encoder-model-changed`,`no-snapshot`]),kU=f({embedding:C(a()),modelId:u(),condition:CU,capturedAt:a(),thumbnailMediaId:a().int().optional(),anchorEmbedding:C(a()).optional()}),AU=f({id:u(),label:u(),references:C(kU),textPrompts:C(u()).optional(),referenceCount:a(),currentlyMatched:w()}),jU=m(`mode`,[f({mode:h(`similarity`),threshold:a().min(0).max(1),hysteresisCount:a().int().positive()}),f({mode:h(`llm`),prompt:u(),profileId:u().optional(),hysteresisCount:a().int().positive()})]),MU=.85,NU=`skip`,PU=8e3,FU=f({enabled:w().default(!1),prompt:u().min(1).max(1e3),profileId:u().optional(),timeoutMs:a().int().min(1e3).max(2e4).default(PU),maxImagePx:a().int().min(64).max(2048).default(448),onTimeout:S([`flip`,`hold`]).default(`hold`)}),IU=f({id:u(),label:u(),roi:GC,enabled:w(),triggerMode:S([`periodic`,`on-motion`,`both`]),checkIntervalSec:a().optional(),check:jU,states:C(AU),currentStateId:u().nullable(),lastCheckedAt:a().nullable(),lastConfidence:a().nullable(),currentCondition:CU.nullable(),availability:S([`ok`,`unavailable`]),unavailableReason:u().nullable(),baselineStateId:u().nullable(),emit:S([`latched`,`live`]).default(`latched`),verdict:DU,latched:w(),armedAt:a(),divergedAt:a().nullable(),restoredAt:a().nullable(),quietSeconds:a().int().min(0).max(3600).default(60),minObservationSpacingSec:a().int().min(0).max(3600).default(120),confirm:FU.optional(),anchorThreshold:a().min(0).max(1).default(MU),autoRestore:w().default(!1),onUncoveredCondition:TU.default(NU),suspendedCondition:CU.nullable().default(null),unavailable:OU.nullable(),coveredConditions:C(CU)}),LU=f({monitors:C(IU),lastFetchedAt:a()}),RU=f({deviceId:a(),status:LU.nullable()}),zU={name:`scene-monitor`,scope:`device`,mode:`singleton`,kind:`wrapper`,defaultActive:!0,deviceTypes:[R.Camera],methods:{listScenes:L(f({deviceId:a()}),LU),listScenesBatch:L(f({deviceIds:C(a()).min(1).max(200)}),C(RU).readonly()),createScene:L(f({deviceId:a(),label:u(),roi:GC,check:jU,triggerMode:S([`periodic`,`on-motion`,`both`]).optional(),checkIntervalSec:a().optional()}),IU,{kind:`mutation`,auth:`admin`}),updateScene:L(f({deviceId:a(),monitorId:u(),patch:f({label:u().optional(),roi:GC.optional(),enabled:w().optional(),triggerMode:S([`periodic`,`on-motion`,`both`]).optional(),checkIntervalSec:a().optional(),check:jU.optional(),emit:S([`latched`,`live`]).optional(),quietSeconds:a().int().min(0).max(3600).optional(),minObservationSpacingSec:a().int().min(0).max(3600).optional(),anchorThreshold:a().min(0).max(1).optional(),autoRestore:w().optional(),onUncoveredCondition:TU.optional(),confirm:FU.nullable().optional()})}),y(),{kind:`mutation`,auth:`admin`}),deleteScene:L(f({deviceId:a(),monitorId:u()}),y(),{kind:`mutation`,auth:`admin`}),captureReference:L(f({deviceId:a(),monitorId:u(),stateId:u().optional(),label:u().optional(),condition:CU.optional()}),f({stateId:u(),referenceCount:a()}),{kind:`mutation`,auth:`admin`}),deleteReference:L(f({deviceId:a(),monitorId:u(),stateId:u(),index:a()}),y(),{kind:`mutation`,auth:`admin`}),recheckNow:L(f({deviceId:a(),monitorId:u()}),y(),{kind:`mutation`,auth:`admin`}),resetScene:L(f({deviceId:a(),monitorId:u(),recapture:w().optional()}),y(),{kind:`mutation`,auth:`admin`})},status:{schema:LU,kind:`push`},runtimeState:LU,durability:`session`},BU=S([`include`,`exclude`]),VU=f({id:u(),name:u().optional(),zoneIds:C(u()).min(1).readonly(),mode:BU,classFilter:C(u()).readonly().optional(),overlapThreshold:a().min(0).max(1).optional(),bboxInclusionPct:a().min(0).max(100).optional(),preferMask:w().optional(),enabled:w().default(!0)}),HU=C(VU).readonly(),UU=f({isRunning:w(),lastRunAt:a(),lastRunSuccess:w().nullable(),lastError:u().nullable(),lastChangedAt:a()}),WU={name:`script-runner`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[R.Script],methods:{run:L(f({deviceId:a().int().nonnegative(),variables:b(u(),s()).optional()}),y(),{kind:`mutation`,auth:`admin`}),stop:L(f({deviceId:a().int().nonnegative()}),y(),{kind:`mutation`,auth:`admin`})},status:{schema:UU,kind:`push`},runtimeState:UU,durability:`session`},GU=f({detected:w(),lastChangedAt:a()}),KU={name:`smoke`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[R.Sensor],methods:{},status:{schema:GU,kind:`push`},runtimeState:GU,durability:`restored`,volatileStateFields:[`lastChangedAt`]},qU=f({camStreamId:u().min(1),kind:wa,url:u().optional(),codec:u().optional(),resolution:Ta.optional(),fps:a().positive().optional(),label:u().optional(),deviceFeatures:C(u()).optional(),autoEligible:w().optional(),profileHint:D.optional(),metadata:b(u(),s()).optional()}),JU=f({descriptors:C(qU),lastFetchedAt:a()}),YU={name:`stream-catalog`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[R.Camera],methods:{getCatalog:L(f({deviceId:a().int().nonnegative()}),C(qU).readonly())},runtimeState:JU,durability:`restored`,volatileStateFields:[`lastFetchedAt`]},XU=S([`main`,`sub`,`ext`]),ZU=f({width:a(),height:a(),codec:S([`h264`,`h265`]),framerate:a(),bitrate:a(),bitrateMode:S([`vbr`,`cbr`]).optional(),encoderProfile:S([`high`,`main`,`baseline`]).optional(),gop:a().optional(),audio:w().optional()}),QU=f({main:ZU.optional(),sub:ZU.optional(),ext:ZU.optional(),lastFetchedAt:a()}),$U=f({resolutions:C(f({width:a(),height:a()})),codecs:C(S([`h264`,`h265`])),framerates:C(a()),bitrates:C(a()),bitrateRange:d([a(),a()]).optional(),supportsBitrateMode:w(),supportsEncoderProfile:w(),supportsGop:w(),gop:f({min:a(),max:a(),step:a()}).optional()}),eW=f({main:$U.optional(),sub:$U.optional(),ext:$U.optional()}),tW=f({width:a().optional(),height:a().optional(),codec:S([`h264`,`h265`]).optional(),framerate:a().optional(),bitrate:a().optional(),bitrateMode:S([`vbr`,`cbr`]).optional(),encoderProfile:S([`high`,`main`,`baseline`]).optional(),gop:a().optional()}),nW={name:`stream-params`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[R.Camera],deviceConfig:{ui:{kind:`derived-form`,builderId:`stream-params`,tab:`streaming`}},methods:{getOptions:L(f({deviceId:a()}),eW),setProfile:L(f({deviceId:a(),profile:XU,patch:tW}),y(),{kind:`mutation`,auth:`admin`}),getConfigSchema:L(f({deviceId:a()}),s().nullable())},status:{schema:QU,kind:`poll`},runtimeState:QU,durability:`restored`,volatileStateFields:[`lastFetchedAt`]},rW=[{profile:`main`,prefix:`streamMain`,label:`Main stream`},{profile:`sub`,prefix:`streamSub`,label:`Sub stream`},{profile:`ext`,prefix:`streamExt`,label:`Third stream`}];function iW(e,t,n){let r=[];if(t.resolutions.length>0){let i=t.resolutions.map(e=>({value:`${String(e.width)}x${String(e.height)}`,label:`${String(e.width)}×${String(e.height)}`})),a=n?`${String(n.width)}x${String(n.height)}`:void 0;a&&!i.some(e=>e.value===a)&&i.unshift({value:a,label:`${a.replace(`x`,`×`)} (current)`}),r.push({type:`select`,key:`${e.prefix}_resolution`,label:`Resolution`,options:i,default:a??i[0]?.value??``})}if(t.codecs.length>0&&r.push({type:`select`,key:`${e.prefix}_codec`,label:`Codec`,options:t.codecs.map(e=>({value:e,label:e===`h264`?`H.264`:`H.265`})),default:n?.codec??t.codecs[0]}),t.framerates.length>0){let i=t.framerates.map(e=>({value:String(e),label:`${String(e)} fps`})),a=n?.framerate;a!==void 0&&!t.framerates.includes(a)&&i.unshift({value:String(a),label:`${String(a)} fps (current)`}),r.push({type:`select`,key:`${e.prefix}_framerate`,label:`Frame rate`,options:i,default:a===void 0?i[0]?.value??``:String(a)})}if(t.bitrates.length>0){let i=t.bitrates.map(e=>({value:String(e),label:`${String(e)} kbps`})),a=n?.bitrate;a!==void 0&&!t.bitrates.includes(a)&&i.unshift({value:String(a),label:`${String(a)} kbps (current)`}),r.push({type:`select`,key:`${e.prefix}_bitrate`,label:`Bitrate`,options:i,default:a===void 0?i[0]?.value??``:String(a)})}else{let i=t.bitrateRange;r.push({type:`number`,key:`${e.prefix}_bitrate`,label:`Bitrate`,unit:`kbps`,...i?{min:i[0],max:i[1]}:{},default:n?.bitrate??i?.[0]??0})}if(t.supportsBitrateMode&&r.push({type:`select`,key:`${e.prefix}_bitrateMode`,label:`Bitrate mode`,options:[{value:`vbr`,label:`VBR (variable)`},{value:`cbr`,label:`CBR (constant)`}],default:n?.bitrateMode??`vbr`}),t.supportsEncoderProfile&&r.push({type:`select`,key:`${e.prefix}_encoderProfile`,label:`Encoder profile`,options:[{value:`baseline`,label:`Baseline`},{value:`main`,label:`Main`},{value:`high`,label:`High`}],default:n?.encoderProfile??`main`}),t.supportsGop){let i=t.gop;if(i){let t=[];for(let e=i.min;e<=i.max;e+=i.step)t.push({value:String(e),label:`${String(e)} s`});let a=n?.gop;a!==void 0&&!t.some(e=>e.value===String(a))&&t.unshift({value:String(a),label:`${String(a)} s (current)`}),r.push({type:`select`,key:`${e.prefix}_gop`,label:`I-frame interval (GOP)`,options:t,default:a===void 0?t[0]?.value??``:String(a)})}else r.push({type:`number`,key:`${e.prefix}_gop`,label:`I-frame interval (GOP)`,unit:`s`,min:1,default:n?.gop??1})}return r.length===0?null:{id:`stream-${e.profile}`,tab:`streaming`,title:e.label,description:`Encoder parameters pushed to the camera. Option lists are read live from the camera — fields the firmware doesn't expose are hidden.`,columns:2,fields:r}}function aW(e,t){let n=[];for(let r of rW){let i=e[r.profile];if(!i)continue;let a=iW(r,i,t?.[r.profile]);a&&n.push(a)}return n.length===0?null:{sections:n}}function oW(e,t){let n={},r=!1,i=`${t}_resolution`;if(i in e&&typeof e[i]==`string`){let[t,a]=e[i].split(`x`).map(Number);Number.isFinite(t)&&Number.isFinite(a)&&(n.width=t,n.height=a,r=!0)}let a=`${t}_codec`;a in e&&(e[a]===`h264`||e[a]===`h265`)&&(n.codec=e[a],r=!0);let o=`${t}_framerate`;if(o in e){let t=Number(e[o]);Number.isFinite(t)&&(n.framerate=t,r=!0)}let s=`${t}_bitrate`;if(s in e){let t=Number(e[s]);Number.isFinite(t)&&(n.bitrate=t,r=!0)}let c=`${t}_bitrateMode`;c in e&&(e[c]===`vbr`||e[c]===`cbr`)&&(n.bitrateMode=e[c],r=!0);let l=`${t}_encoderProfile`;l in e&&(e[l]===`high`||e[l]===`main`||e[l]===`baseline`)&&(n.encoderProfile=e[l],r=!0);let u=`${t}_gop`;if(u in e){let t=Number(e[u]);Number.isFinite(t)&&(n.gop=t,r=!0)}return r?n:null}var sW=f({on:w(),lastChangedAt:a()}),cW={name:`switch`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[R.Switch,R.Siren,R.Light],methods:{setState:L(f({deviceId:a(),on:w()}),y(),{kind:`mutation`,auth:`protected`})},events:{onStateChanged:{data:f({deviceId:a(),on:w(),lastChangedAt:a()})}},status:{schema:sW,kind:`command-driven`},runtimeState:sW,durability:`restored`,volatileStateFields:[`lastChangedAt`],settings:{bindings:[{kind:`scalar`,statusPath:`on`,method:`setState`,valueArg:`on`,field:{label:`On`,kind:`boolean`}}]}},lW=f({streaming:w(),notifications:w(),objectDetection:w(),remoteAccess:w(),agentCluster:w(),smartHome:w(),recordings:w(),backup:w(),repl:w()}),uW=f({status:h(`ok`),uptime:a()}),dW=f({name:u(),address:u(),family:u(),internal:w()}),fW=S([`operator-set`,`derived-from-ip`]),pW=f({latitude:a().min(-90).max(90),longitude:a().min(-180).max(180),source:fW,updatedAt:a(),label:u().optional()}),mW=f({location:pW.nullable(),derivationAttemptedAt:a().nullable(),derivationError:u().nullable()}),hW=f({latitude:a().min(-90).max(90),longitude:a().min(-180).max(180)}).nullable(),gW=S([`http`,`ws`,`mesh`,`unknown`]),_W=f({http:a(),ws:a(),mesh:a(),unknown:a()}),vW=f({plane:gW,procedure:u(),userAgent:u(),ip:u(),principal:u(),calls:a(),subscriptions:a(),perMin:a()}),yW=f({procedure:u(),calls:a(),planes:_W,subscriptions:a(),perMin:a()}),bW=f({armed:w(),elapsedMs:a(),windowMs:a(),armedUntilMs:a(),httpRequests:a(),batchedRequests:a(),procedureCalls:a(),planes:_W,planesExplainTotal:w(),wsConnections:a(),wsMessages:a(),subscriptions:a(),subscriptionStops:a(),distinctGroups:a(),unattributedCalls:a(),procedures:C(yW).readonly(),groups:C(vW).readonly()}),xW=bW.extend({persisted:w()}),SW=S([`debug`,`info`,`warn`,`error`]),CW=S([`request-census`]),wW=S([`cluster`,`node`,`component`]),TW=S([`default`,`cluster`,`node`,`component`]),EW=f({scope:wW,nodeId:u().nullable(),component:u().nullable(),level:SW.nullable()}),DW=f({level:SW,levelSource:TW}),OW=f({layers:C(EW).readonly()}),kW=f({id:CW,armed:w(),armedUntilMs:a(),remainingMs:a(),persisted:w()}),AW=f({id:CW,armMs:a().int().min(0),reportEveryMs:a().int().positive().optional()}),jW=f({channel:u(),armed:w(),armedUntilMs:a(),remainingMs:a(),deviceIds:C(a().int()).readonly().nullable()}),MW=f({channel:u().min(1),armMs:a().int().min(0),deviceIds:C(a().int()).readonly().nullable().optional()}),NW=f({level:SW.nullable().optional(),diagnostics:C(AW).readonly().optional(),channels:C(MW).readonly().optional(),opsLogRetentionDays:a().int().min(0).max(3650).optional()}),PW=Xx.extend({addonId:u()}),FW=Sb.extend({addonId:u()}),IW=f({scopeNodeId:u().optional(),scopeComponent:u().optional()}),LW=f({scopeNodeId:u().optional(),scopeComponent:u().optional(),patch:NW}),RW=f({scopeNodeId:u().nullable(),scopeComponent:u().nullable(),effective:DW,explicit:OW,activeWindows:C(kW).readonly(),channels:C(zs).readonly(),activeChannels:C(jW).readonly(),opsLogRetentionDays:a().int().min(0),persisted:w()}),zW={name:`system`,scope:`system`,mode:`singleton`,methods:{info:L(y(),lW),health:L(y(),uW),featureFlags:L(y(),lW),networkAddresses:L(y(),C(dW).readonly()),getRetentionConfig:L(y(),s().nullable(),{auth:`admin`}),setRetentionConfig:L(b(u(),s()),re(),{kind:`mutation`,auth:`admin`}),forceRetentionCleanup:L(y(),y(),{kind:`mutation`,auth:`admin`}),getSiteLocation:L(y(),mW),setSiteLocation:L(hW,mW,{kind:`mutation`,auth:`admin`}),detectSiteLocation:L(y(),mW,{kind:`mutation`,auth:`admin`}),getRequestCensus:L(y(),xW,{auth:`admin`}),getLoadContributions:L(y(),C(PW).readonly(),{auth:`admin`}),getFailureContributions:L(y(),C(FW).readonly(),{auth:`admin`}),getLoggingSettings:L(IW,RW,{auth:`admin`}),setLoggingSettings:L(LW,RW,{kind:`mutation`,auth:`admin`})},mount:{kind:`server-provided`}},BW=f({tampered:w(),lastChangedAt:a()}),VW={name:`tamper`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[R.Sensor],methods:{},status:{schema:BW,kind:`push`},runtimeState:BW,durability:`restored`,volatileStateFields:[`lastChangedAt`]},HW=f({celsius:a(),lastFetchedAt:a(),unit:u().optional(),precision:a().int().min(0).max(10).optional()}),UW={name:`temperature-sensor`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[R.Sensor,R.Thermostat],methods:{},status:{schema:HW,kind:`push`},runtimeState:HW,durability:`restored`,volatileStateFields:[`lastFetchedAt`]},WW=f({title:u(),message:u(),severity:S([`info`,`warning`,`critical`]),duration:a().optional(),action:f({label:u(),url:u()}).optional()}),GW={name:`toast`,scope:`system`,mode:`singleton`,methods:{onToast:L(y(),WW,{kind:`subscription`})},mount:{kind:`server-provided`}},KW=f({currentVersion:u().nullable(),availableVersion:u().nullable(),updatable:w(),state:u().nullable(),inProgress:w()}),qW={name:`update`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[R.Update],methods:{installUpdate:L(y(),y(),{kind:`mutation`,auth:`admin`})},status:{schema:KW,kind:`poll`},runtimeState:KW,durability:`session`},JW=f({id:u(),username:u(),isAdmin:w().default(!1),allowedProviders:p([C(u()),h(`*`)]),allowedDevices:b(u(),p([C(u()),h(`*`)])),scopes:C(J).default([]),totpEnabled:w().default(!1),createdAt:a(),updatedAt:a()}),YW=f({username:u(),password:u().min(6),isAdmin:w().default(!1),allowedProviders:p([C(u()),h(`*`)]).optional(),allowedDevices:b(u(),p([C(u()),h(`*`)])).optional(),scopes:C(J).optional()}),XW=f({id:u(),isAdmin:w().optional(),allowedProviders:p([C(u()),h(`*`)]).optional(),allowedDevices:b(u(),p([C(u()),h(`*`)])).optional(),scopes:C(J).optional()}),ZW=f({id:u(),label:u(),isAdmin:w().default(!1),allowedProviders:p([C(u()),h(`*`)]).optional(),allowedDevices:b(u(),p([C(u()),h(`*`)])).optional(),tokenPrefix:u(),createdAt:a(),lastUsedAt:a().optional()}),QW=f({label:u(),isAdmin:w().default(!1),allowedProviders:p([C(u()),h(`*`)]).optional(),allowedDevices:b(u(),p([C(u()),h(`*`)])).optional()}),$W=f({token:u(),record:ZW}),eG=f({id:u(),userId:u(),name:u(),tokenPrefix:u(),scopes:C(J),expiresAt:a().nullish(),lastUsedAt:a().nullish(),createdAt:a()}),tG=f({userId:u(),name:u(),scopes:C(J),expiresAt:a().optional()}),nG=f({token:u(),record:eG}),rG=f({id:u(),userId:u(),username:u(),integrationId:u(),scopes:C(J),createdAt:a(),lastUsedAt:a(),revokedAt:a().nullable()}),iG=f({secret:u(),otpauthUrl:u()}),aG=f({enabled:w(),confirmedAt:a().nullable()}),oG=f({provider:u(),subject:u(),issuer:u(),userId:u(),label:u().optional(),linkedAt:a()}),sG=f({provider:u().min(1),subject:u().min(1)}),cG={name:`user-management`,scope:`system`,mode:`singleton`,methods:{listUsers:L(y(),C(JW),{auth:`admin`}),createUser:L(YW,JW,{kind:`mutation`,auth:`admin`,access:`create`}),updateUser:L(XW,f({success:h(!0)}),{kind:`mutation`,auth:`admin`,access:`create`}),deleteUser:L(f({id:u()}),f({success:h(!0)}),{kind:`mutation`,auth:`admin`,access:`delete`}),resetPassword:L(f({id:u(),newPassword:u().min(6)}),f({success:h(!0)}),{kind:`mutation`,auth:`admin`,access:`create`}),setUserScopes:L(f({userId:u(),scopes:C(J)}),f({success:h(!0)}),{kind:`mutation`,auth:`admin`,access:`create`}),validateCredentials:L(f({username:u(),password:u()}),JW.extend({passwordHash:u()}).nullable(),{kind:`mutation`,access:`view`}),listApiKeys:L(y(),C(ZW),{auth:`admin`}),createApiKey:L(QW,$W,{kind:`mutation`,auth:`admin`,access:`create`}),revokeApiKey:L(f({id:u()}),f({success:h(!0)}),{kind:`mutation`,auth:`admin`,access:`delete`}),validateApiKey:L(f({token:u()}),ZW.nullable(),{kind:`mutation`,access:`view`}),createScopedToken:L(tG,nG,{kind:`mutation`,auth:`admin`,access:`create`}),revokeScopedToken:L(f({id:u()}),f({success:h(!0)}),{kind:`mutation`,auth:`admin`,access:`delete`}),validateScopedToken:L(f({token:u()}),eG.nullable(),{access:`view`}),listScopedTokens:L(f({userId:u()}),C(eG),{auth:`admin`}),setupTotp:L(f({userId:u()}),iG,{kind:`mutation`,auth:`admin`,access:`create`}),confirmTotp:L(f({userId:u(),code:u()}),f({success:h(!0)}),{kind:`mutation`,auth:`admin`,access:`create`}),disableTotp:L(f({userId:u()}),f({success:h(!0)}),{kind:`mutation`,auth:`admin`,access:`delete`}),getTotpStatus:L(f({userId:u()}),aG,{auth:`admin`}),verifyTotp:L(f({userId:u(),code:u()}),f({valid:w()}),{kind:`mutation`,access:`view`}),oauthIssueCode:L(f({integrationId:u(),userId:u(),username:u(),scopes:C(J),redirectUri:u(),hubUrl:u(),codeChallenge:u().optional(),refreshTtlSec:p([a().int().positive(),h(`never`)]).optional()}),f({code:u()}),{kind:`mutation`,access:`create`}),oauthExchangeCode:L(f({code:u(),redirectUri:u(),codeVerifier:u().optional()}),f({accessToken:u(),refreshToken:u(),expiresIn:a()}).nullable(),{kind:`mutation`,access:`view`}),oauthRefresh:L(f({refreshToken:u()}),f({accessToken:u(),refreshToken:u(),expiresIn:a()}).nullable(),{kind:`mutation`,access:`view`}),oauthVerifyAccessToken:L(f({token:u()}),f({userId:u(),username:u(),scopes:C(J)}).nullable(),{access:`view`}),listExternalIdentities:L(f({userId:u()}),C(oG),{auth:`admin`}),findUserByExternalIdentity:L(sG,f({userId:u(),issuer:u()}).nullable(),{auth:`admin`}),linkExternalIdentity:L(sG.extend({userId:u(),issuer:u().min(1),label:u().optional()}),f({success:h(!0)}),{kind:`mutation`,auth:`admin`,access:`create`}),unlinkExternalIdentity:L(sG.extend({userId:u()}),f({success:w()}),{kind:`mutation`,auth:`admin`,access:`delete`}),listOauthSessions:L(y(),C(rG),{auth:`admin`}),revokeOauthSession:L(f({id:u()}),f({success:w()}),{kind:`mutation`,auth:`admin`,access:`delete`})}},lG=S([`idle`,`cleaning`,`paused`,`returning`,`docked`,`drying`,`error`]),uG=f({level:a().min(0).max(100).nullable(),status:S([`ok`,`low`,`full`]).nullable()}),dG=f({state:lG,batteryLevel:a().min(0).max(100).nullable(),fanSpeed:u().nullable(),availableFanSpeeds:C(u()),cleanWater:uG.nullable(),dirtyWater:uG.nullable(),detergent:uG.nullable(),dustBin:uG.nullable(),progressPercent:a().min(0).max(100).nullable(),errorCode:a().nullable(),errorLabel:u().nullable(),lastChangedAt:a()}),fG={name:`vacuum-control`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[R.Vacuum],methods:{start:L(f({deviceId:a().int().nonnegative()}),y(),{kind:`mutation`,auth:`protected`}),pause:L(f({deviceId:a().int().nonnegative()}),y(),{kind:`mutation`,auth:`protected`}),stop:L(f({deviceId:a().int().nonnegative()}),y(),{kind:`mutation`,auth:`protected`}),returnToBase:L(f({deviceId:a().int().nonnegative()}),y(),{kind:`mutation`,auth:`protected`}),locate:L(f({deviceId:a().int().nonnegative()}),y(),{kind:`mutation`,auth:`protected`}),setFanSpeed:L(f({deviceId:a().int().nonnegative(),speed:u().min(1)}),y(),{kind:`mutation`,auth:`protected`})},status:{schema:dG,kind:`push`},runtimeState:dG,durability:`session`},pG=S([`open`,`opening`,`closing`,`closed`,`stopped`]),mG=f({state:pG,position:a().min(0).max(100).nullable(),lastChangedAt:a()}),hG={name:`valve`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[R.Valve],methods:{open:L(f({deviceId:a().int().nonnegative()}),y(),{kind:`mutation`,auth:`protected`}),close:L(f({deviceId:a().int().nonnegative()}),y(),{kind:`mutation`,auth:`protected`}),stop:L(f({deviceId:a().int().nonnegative()}),y(),{kind:`mutation`,auth:`protected`}),setPosition:L(f({deviceId:a().int().nonnegative(),position:a().min(0).max(100)}),y(),{kind:`mutation`,auth:`protected`})},status:{schema:mG,kind:`push`},runtimeState:mG,durability:`session`},gG=f({detected:w(),lastChangedAt:a()}),_G={name:`vibration`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[R.Sensor],methods:{},status:{schema:gG,kind:`push`},runtimeState:gG,durability:`restored`,volatileStateFields:[`lastChangedAt`]},vG=f({currentTemp:a().nullable(),targetTemp:a().nullable(),operationMode:u().nullable(),availableModes:C(u()),away:w().nullable(),minTemp:a().nullable(),maxTemp:a().nullable(),lastChangedAt:a()}),yG={name:`water-heater`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[R.WaterHeater],methods:{setTargetTemp:L(f({deviceId:a().int().nonnegative(),temp:a().finite()}),y(),{kind:`mutation`,auth:`protected`}),setOperationMode:L(f({deviceId:a().int().nonnegative(),mode:u().min(1)}),y(),{kind:`mutation`,auth:`protected`}),setAway:L(f({deviceId:a().int().nonnegative(),on:w()}),y(),{kind:`mutation`,auth:`protected`})},status:{schema:vG,kind:`push`},runtimeState:vG,durability:`session`},bG=f({condition:u().nullable(),temperature:a().nullable(),temperatureUnit:u().nullable(),humidity:a().min(0).max(100).nullable(),pressure:a().nullable(),pressureUnit:u().nullable(),windSpeed:a().nullable(),windSpeedUnit:u().nullable(),windBearing:a().nullable(),lastFetchedAt:a()}),xG={name:`weather`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[R.Weather],methods:{},status:{schema:bG,kind:`push`},runtimeState:bG,durability:`session`},SG=f({totalObjects:a().int().nonnegative(),byClass:b(u(),a().int().nonnegative()),standingObjects:a().int().nonnegative().optional(),transientObjects:a().int().nonnegative().optional()}),CG=SG.extend({zoneId:u(),zoneName:u(),trackIds:C(u()).readonly()}),wG=f({id:u(),className:u(),bbox:f({x:a(),y:a(),w:a(),h:a()}),frameWidth:a().int().nonnegative(),frameHeight:a().int().nonnegative(),firstSeenAt:a().int(),becameStationaryAt:a().int(),lastConfirmedAt:a().int(),label:u().optional(),keyFrameMediaId:a().int().optional()}),TG=f({ts:a().int(),frameWidth:a().int().nonnegative(),frameHeight:a().int().nonnegative(),zones:C(CG).readonly(),frame:SG,unzoned:SG,stationaryObjects:C(wG).readonly().optional()}),EG=f({deviceId:a(),read:S([`read`,`unreadable`]),snapshot:TG.nullable()}),DG=S([`minute`,`5min`,`hour`]),OG=f({from:a().int(),to:a().int(),resolution:DG}),kG=f({ts:a().int(),count:a().int().nonnegative()}),AG={name:`zone-analytics`,scope:`device`,mode:`singleton`,deviceTypes:[R.Camera],methods:{getCurrentSnapshot:L(f({deviceId:a()}),TG.nullable()),getCurrentSnapshotBatch:L(f({deviceIds:C(a()).min(1).max(200)}),C(EG).readonly()),getZoneHistory:L(f({deviceId:a(),zoneId:u(),className:u().optional()}).extend(OG.shape),C(kG).readonly()),getCameraHistory:L(f({deviceId:a(),className:u().optional()}).extend(OG.shape),C(kG).readonly()),getUnzonedHistory:L(f({deviceId:a(),className:u().optional()}).extend(OG.shape),C(kG).readonly())},runtimeState:TG,durability:`session`},jG=S([`motion`,`detection`,`package`]),MG={name:`zone-rules`,scope:`device`,mode:`singleton`,deviceTypes:[R.Camera],methods:{listRules:L(f({deviceId:a(),stage:jG}),C(VU).readonly()),setRules:L(f({deviceId:a(),stage:jG,rules:C(VU).readonly()}),y(),{kind:`mutation`,auth:`admin`})},runtimeState:f({motion:C(VU).readonly(),detection:C(VU).readonly(),package:C(VU).readonly()}),durability:`restored`},NG=[`decoder`,`motion-detection`,`pipeline-executor`,`audio-analyzer`,`pipeline-analytics`,`notification-output`],PG=[...NG,`pipeline-orchestrator`,`pipeline-runner`];function FG(e,t){return t.slot===e}function IG(e,t){return{slot:e,list:async e=>{let n=await t.list(e);if(n===null)return null;let r=n.value;return{...n,value:r}},set:async(n,r)=>{if(!FG(e,r))throw Error(`device-extension: a "${r.slot}" value was sent to slot "${e}" — refused`);return await t.set(n,r)},candidates:e=>t.candidates(e)}}function LG(e,t){return`${e}:${t}`}function RG(e){let{source:t,label:n,slots:r,hostTypeOf:i,logger:a}=e,o=(e,t)=>t!==null&&Ny[e].hostDeviceTypes.some(e=>e===t),s=async(e,n)=>{let a=`${t}:`,s=n.startsWith(a)?r.find(e=>e.slot===n.slice(a.length)):void 0;if(s===void 0)throw Error(`device-extension: "${n}" is not a slot of "${t}" — it serves ${r.map(e=>LG(t,e.slot)).join(`, `)||`(none)`}`);let c=await i(e);if(!o(s.slot,c))throw Error(`device-extension: slot "${s.slot}" is not offered on device ${e} (type ${c??`unknown`}; offered on ${Ny[s.slot].hostDeviceTypes.join(`, `)})`);return s};return{listSources:async()=>[{source:t,label:n,availability:{state:`ok`}}],listSlots:async e=>{let n=await i(e.deviceId),a=[];for(let i of r){if(!o(i.slot,n))continue;let r=await i.list(e.deviceId);r!==null&&a.push({state:`ok`,slotRef:LG(t,i.slot),slot:i.slot,authority:r.authority,activation:r.activation,value:r.value,sources:[...r.sources],...r.impliedSources===void 0?{}:{impliedSources:[...r.impliedSources]}})}return a},listCandidates:async e=>({candidates:[...await(await s(e.deviceId,e.slotRef)).candidates(e.deviceId)]}),setSlot:async e=>{let t=await(await s(e.deviceId,e.slotRef)).set(e.deviceId,e.value);return a.info(`device-extension: slot written`,{tags:{deviceId:e.deviceId},meta:{slotRef:e.slotRef,reload:t.reload}}),t}}}var zG={"°C":{dimension:`temperature`,factor:1,offset:0},"°F":{dimension:`temperature`,factor:5/9,offset:-160/9},K:{dimension:`temperature`,factor:1,offset:-273.15},hPa:{dimension:`pressure`,factor:1,offset:0},kPa:{dimension:`pressure`,factor:10,offset:0},Pa:{dimension:`pressure`,factor:.01,offset:0},mbar:{dimension:`pressure`,factor:1,offset:0},bar:{dimension:`pressure`,factor:1e3,offset:0},inHg:{dimension:`pressure`,factor:33.8639,offset:0},mmHg:{dimension:`pressure`,factor:1.33322,offset:0},psi:{dimension:`pressure`,factor:68.9476,offset:0},"m/s":{dimension:`speed`,factor:1,offset:0},"km/h":{dimension:`speed`,factor:1/3.6,offset:0},mph:{dimension:`speed`,factor:.44704,offset:0},kn:{dimension:`speed`,factor:.514444,offset:0},"mm/h":{dimension:`precipitation-rate`,factor:1,offset:0},"in/h":{dimension:`precipitation-rate`,factor:25.4,offset:0},m:{dimension:`length`,factor:1,offset:0},mm:{dimension:`length`,factor:.001,offset:0},cm:{dimension:`length`,factor:.01,offset:0},km:{dimension:`length`,factor:1e3,offset:0},in:{dimension:`length`,factor:.0254,offset:0},ft:{dimension:`length`,factor:.3048,offset:0},mi:{dimension:`length`,factor:1609.344,offset:0},lx:{dimension:`illuminance`,factor:1,offset:0},"W/m²":{dimension:`irradiance`,factor:1,offset:0},W:{dimension:`power`,factor:1,offset:0},kW:{dimension:`power`,factor:1e3,offset:0},VA:{dimension:`apparent-power`,factor:1,offset:0},Wh:{dimension:`energy`,factor:1,offset:0},kWh:{dimension:`energy`,factor:1e3,offset:0},MWh:{dimension:`energy`,factor:1e6,offset:0},V:{dimension:`voltage`,factor:1,offset:0},mV:{dimension:`voltage`,factor:.001,offset:0},A:{dimension:`current`,factor:1,offset:0},mA:{dimension:`current`,factor:.001,offset:0},ppm:{dimension:`concentration-volume`,factor:1,offset:0},ppb:{dimension:`concentration-volume`,factor:.001,offset:0},"µg/m³":{dimension:`concentration-mass`,factor:1,offset:0},"mg/m³":{dimension:`concentration-mass`,factor:1e3,offset:0},kg:{dimension:`mass`,factor:1,offset:0},g:{dimension:`mass`,factor:.001,offset:0},lb:{dimension:`mass`,factor:.453592,offset:0},oz:{dimension:`mass`,factor:.0283495,offset:0},"%":{dimension:`percentage`,factor:1,offset:0}},BG=class extends Error{from;to;reason;constructor(e,t,n){super(`[units] cannot convert '${e}' → '${t}': ${n}`),this.name=`UnitConversionError`,this.from=e,this.to=t,this.reason=n}};function VG(e){return Object.hasOwn(zG,e)?zG[e]:void 0}function HG(e){return VG(e)?.dimension}function UG(e,t){return e*t.factor+t.offset}function WG(e,t){return(e-t.offset)/t.factor}function GG(e,t,n){if(t===n)return e;let r=VG(t);if(!r)throw new BG(t,n,`unknown-from`);let i=VG(n);if(!i)throw new BG(t,n,`unknown-to`);if(r.dimension!==i.dimension)throw new BG(t,n,`cross-dimension`);return WG(UG(e,r),i)}function KG(e,t,n){if(t===n)return e;let r=VG(t);if(!r)return;let i=VG(n);if(i&&r.dimension===i.dimension)return WG(UG(e,r),i)}function qG(e,t){if(e===t)return!0;let n=HG(e);return n===void 0?!1:n===HG(t)}function JG(e){let t=[];for(let[n,r]of Object.entries(zG))r.dimension===e&&t.push(n);return t}function YG(e){return`${B(e.source)} ${e.cap}.${e.fieldPath}`}function XG(e){return e.fatal||e.confirmed===!0}function ZG(e,t){return e.state===`unavailable`?{state:`unavailable`,value:null,reason:`${YG(t)}: ${e.reason}`,fatal:e.fatal,confirmed:XG(e)}:{state:e.state,value:e.value,reason:e.state===`stale`?`${YG(t)}: ${e.reason}`:null,deadline:null}}function QG(e,t,n,r){let i={},a=[],o=null,s=null;for(let[n,r]of Object.entries(e.bindings)){if(r.kind===`literal`){i[n]=r.value;continue}let e=t(r);if(e.state===`unavailable`){let t={state:`unavailable`,value:null,reason:`binding \`${n}\` (${YG(r)}): ${e.reason}`,fatal:e.fatal,confirmed:XG(e)};if(e.fatal){o=t;break}(s===null||t.confirmed&&!s.confirmed)&&(s=t);continue}i[n]=e.value,e.state===`stale`&&a.push(`\`${n}\`: ${e.reason}`)}let c=o??s;if(c!==null)return r!==void 0&&r.currentOutput!==void 0&&Jh(e.expr,`count`)?{state:`stale`,value:fu(null,{kind:`count`,highWater:null,primed:!1},r.currentOutput),reason:`${c.reason}; holding the last accumulator value`,deadline:null}:c;let l=[],u=$u(e.expr,i,n,{hooks:{noteDeadline:e=>l.push(e),convert:(e,t,n)=>KG(e,gv(t)??t,gv(n)??n)??null},...r===void 0?{}:{invokeStateful:e=>Xu(r.callPathPrefix===void 0?e:{...e,path:`${r.callPathPrefix}@${e.path}`},r.expressionMemory,{currentOutput:r.currentOutput,startedAtMs:r.startedAtMs,nowMs:n})}});return u.ok?{state:a.length>0?`stale`:`fresh`,value:u.value,reason:a.length>0?a.join(`; `):null,deadline:l.length>0?Math.min(...l):null}:{state:`unavailable`,value:null,reason:`the expression failed: ${u.error}`,fatal:!1,confirmed:!0,expressionFailed:!0}}function $G(e){let{source:t}=e;switch(t.kind){case`from`:return ZG(e.read(t),t);case`expression`:return QG(t,e.read,e.now,e.stateful);case`code`:return{state:`unavailable`,value:null,reason:`code fields are not runnable in the composer — they arrive in slice 4`,fatal:!0,confirmed:!0}}}var eK=3e5,tK=[{addonId:`provider-homeassistant`,stableId:`sensor.living_room_temperature`},{addonId:`provider-homeassistant`,stableId:`sensor.sofa_temperature`},{addonId:`provider-homeassistant`,stableId:`sensor.window_temperature`}],nK=[{addonId:`provider-homeassistant`,stableId:`binary_sensor.living_room_motion`},{addonId:`provider-homeassistant`,stableId:`binary_sensor.living_room_presence`}];function rK(e,t,n){return{kind:`from`,source:e,cap:t,fieldPath:n}}function iK(e,t,n,r){return Object.fromEntries(t.map((t,i)=>[`${e}${i+1}`,rK(t,n,r)]))}function aK(e){let t=iK(`t`,e.temperatureSources,`temperature-sensor`,`celsius`),n=iK(`f`,e.temperatureSources,`temperature-sensor`,`lastFetchedAt`),r=iK(`d`,e.motionSources,`motion`,`detected`),i=iK(`m`,e.motionSources,`motion`,`lastDetectedAt`),a=Object.keys(i).map(t=>`within(${t}, ${e.occupancyWindowMs})`);return Um.parse({target:{kind:`new`,type:R.Sensor,role:z.TemperatureSensor},features:[{kind:`fields`,cap:`temperature-sensor`,fields:{celsius:{kind:`expression`,expr:`round(avg(${Object.keys(t).join(`, `)}), 1)`,bindings:t},lastFetchedAt:{kind:`expression`,expr:`max(${Object.keys(n).join(`, `)})`,bindings:n}}},{kind:`fields`,cap:`binary`,fields:{on:{kind:`expression`,expr:`any(${[...Object.keys(r),...a].join(`, `)})`,bindings:{...r,...i}},lastChangedAt:{kind:`expression`,expr:`now`,bindings:{}}}}]})}var oK=`8dec3b512fda40cbb8cd121c7a99f890`,sK=`provider-homeassistant`;function cK(e){let t={addonId:sK,stableId:`ha:${e}:dev:${oK}`},n=e=>({addonId:sK,stableId:`${t.stableId}-${e}`});return{feeder:t,desiccantDays:n(`sensor.freshelement_3_desiccant_days_remaining`),batteryStatus:n(`sensor.freshelement_3_battery_status`),batteryCharging:n(`binary_sensor.freshelement_3_battery`)}}function lK(e){let t={d:rK(e.desiccantDays,`enum-sensor`,`value`)};return Um.parse({target:{kind:`existing`,device:e.feeder},features:[{kind:`fields`,cap:`consumables`,fields:{lastChangedAt:{kind:`expression`,expr:`now`,bindings:{}},lastFetchedAt:{kind:`expression`,expr:`now`,bindings:{}}},items:{desiccant:{label:`Desiccant`,fields:{"remaining.value":{kind:`expression`,expr:`number(d)`,bindings:t},"remaining.unit":{kind:`expression`,expr:`"days"`,bindings:{}},status:{kind:`expression`,expr:`number(d) == null ? null : (number(d) <= 0 ? "replace" : "ok")`,bindings:t}}}}},{kind:`fields`,cap:`battery`,fields:{percentage:{kind:`expression`,expr:`s == "low" ? 15 : (s == "normal" ? 100 : null)`,bindings:{s:rK(e.batteryStatus,`enum-sensor`,`value`)}},binary:{kind:`expression`,expr:`true`,bindings:{}},charging:{kind:`expression`,expr:`c ? "dc" : "unknown"`,bindings:{c:rK(e.batteryCharging,`binary`,`on`)}},sleeping:{kind:`expression`,expr:`false`,bindings:{}},lastUpdated:{kind:`expression`,expr:`now`,bindings:{}}}}]})}var uK=2e3;function dK(e,t){return Object.keys(ql).filter(e=>Object.hasOwn(Jl,e)&&t.includes(e)).toSorted().flatMap(t=>{let n=ql[t],r=Jl[t];return n===void 0||r===void 0?[]:[{source:e,cap:t,activeField:n,changedAtField:r}]})}function fK(e){let t=[...e.sources].toSorted((e,t)=>`${e.source.addonId}/${e.source.stableId}#${e.cap}`.localeCompare(`${t.source.addonId}/${t.source.stableId}#${t.cap}`));if(t.length===0)throw Error(`doorbell composition needs at least one source`);let n={};return t.forEach((e,t)=>{n[`active${t}`]={kind:`from`,source:e.source,cap:e.cap,fieldPath:e.activeField},n[`changed${t}`]={kind:`from`,source:e.source,cap:e.cap,fieldPath:e.changedAtField}}),{kind:`fields`,cap:`doorbell`,enabled:e.enabled,fields:{lastPressedAt:{kind:`expression`,expr:`latest(${t.map((e,t)=>`rose(active${t}, changed${t}, ${uK})`).join(`, `)})`,bindings:n},pressCountSinceStart:{kind:`expression`,expr:`count(lastPressedAt)`,bindings:{lastPressedAt:{kind:`from`,source:{addonId:e.camera.addonId,stableId:e.camera.stableId},cap:`doorbell`,fieldPath:`lastPressedAt`}}}}}}var pK=Yl.filter(e=>e!==`switch`&&e!==`motion`);function mK(e){let t=ql[e.cap];if(t===void 0||!pK.includes(e.cap))return null;let n={kind:`expression`,expr:`!v`,bindings:{v:{kind:`from`,source:e.self,cap:e.cap,fieldPath:t}}};return{kind:`fields`,cap:e.cap,fields:{[t]:n}}}function hK(e){return{kind:`expression`,expr:JSON.stringify(e),bindings:{}}}function gK(e){if(e.from===e.to||!qG(e.from,e.to))return null;let t={kind:`expression`,expr:`convert(v, ${JSON.stringify(e.from)}, ${JSON.stringify(e.to)})`,bindings:{v:{kind:`from`,source:e.self,cap:e.cap,fieldPath:e.fieldPath}}};return{kind:`fields`,cap:e.cap,fields:{[e.fieldPath]:t,...e.unitField===null?{}:{[e.unitField]:hK(e.to)}}}}function _K(e){return Wa.some(t=>t===e)}var vK={person:`person`,baby:`person`,car:`vehicle`,motorcycle:`vehicle`,bicycle:`vehicle`,boat:`vehicle`,school_bus:`vehicle`,garbage_truck:`vehicle`,dog:`animal`,cat:`animal`,deer:`animal`,horse:`animal`,bird:`animal`,raccoon:`animal`,fox:`animal`,bear:`animal`,cow:`animal`,squirrel:`animal`,goat:`animal`,rabbit:`animal`,skunk:`animal`,kangaroo:`animal`,possum:`animal`,rodent:`animal`,package:`package`},yK={face:`attribute`,license_plate:`attribute`,amazon:`attribute`,usps:`attribute`,ups:`attribute`,fedex:`attribute`,dhl:`attribute`,an_post:`attribute`,purolator:`attribute`,postnl:`attribute`,nzpost:`attribute`,postnord:`attribute`,gls:`attribute`,dpd:`attribute`,canada_post:`attribute`,royal_mail:`attribute`,waste_bin:`no-macro`,bbq_grill:`no-macro`,robot_lawnmower:`no-macro`,umbrella:`no-macro`,baby_stroller:`no-macro`};function bK(e){let t={};for(let n of e){let e=vK[n]??bC.mapping[n];e!==void 0&&_K(e)&&(t[n]=e)}return{mapping:t,preserveOriginal:!1}}function xK(e){let t=bK(e),n=cl(e,t);return n.length>0?{classMap:t,suppliesSteps:n}:{classMap:t}}var SK=Object.freeze({person:.5,vehicle:.5,animal:.5}),CK=Object.freeze({person:.65,vehicle:.65,animal:.65});function wK(e,t){return t===void 0?{...e===`plus`?CK:SK}:{...t}}var TK=[{cap:`alarm-panel`,field:`state`},{cap:`cover`,field:`state`},{cap:`presence`,field:`state`},{cap:`lock-control`,field:`state`},{cap:`contact`,field:`entryOpen`,booleanWords:[`open`,`closed`]},{cap:`switch`,field:`on`,booleanWords:[`on`,`off`]},{cap:`binary`,field:`on`,booleanWords:[`on`,`off`]}];function EK(e){for(let t of TK){let n=e[t.cap];if(typeof n!=`object`||!n)continue;let r=n[t.field];if(typeof r==`string`&&r.length>0)return r;if(typeof r==`boolean`&&t.booleanWords!==void 0)return r?t.booleanWords[0]:t.booleanWords[1]}}function DK(e,t=[]){for(let n of TK){let r=e[n.cap];if(typeof r!=`object`||!r)continue;if(n.booleanWords!==void 0)return[...n.booleanWords];if(n.cap===`alarm-panel`)return[...t];let i=r[n.field];return typeof i==`string`?[i]:[]}return[]}var OK=`camstack/camstack-models`,kK=`https://huggingface.co/${OK}/resolve/main`,AK={"features.streaming":!0,"features.notifications":!0,"features.objectDetection":!1,"features.remoteAccess":!0,"features.agentCluster":!1,"features.smartHome":!0,"features.recordings":!0,"features.backup":!0,"features.repl":!0,"retention.detectionEventsDays":30,"retention.audioLevelsDays":7,"logging.level":`info`,"logging.retentionDays":30,"eventBus.ringBufferSize":1e4,"storage.provider":`sqlite-storage`,"storage.locations":{data:`camstack-data/data`,media:`camstack-data/media`,recordings:`camstack-data/recordings`,cache:`/tmp/camstack-cache`,logs:`camstack-data/logs`,models:`camstack-data/models`},providers:[],"ffmpeg.hwAccel":`auto`,"ffmpeg.threadCount":0,"auth.tokenExpiry":`30d`},jK={Siren:z.Siren,Floodlight:z.Floodlight,Spotlight:z.Spotlight,PirSensor:z.PirSensor,Chime:z.Chime,Autotrack:z.Autotrack,Nightvision:z.Nightvision,PrivacyMask:z.PrivacyMask},MK={[jK.Siren]:`Siren`,[jK.Floodlight]:`Floodlight`,[jK.Spotlight]:`Spotlight`,[jK.PirSensor]:`PIR`,[jK.Chime]:`Chime`,[jK.Autotrack]:`Autotracking`,[jK.Nightvision]:`Night Vision`,[jK.PrivacyMask]:`Privacy Mask`};function NK(e,t,n){let r=`${e}:${t}`;return typeof n==`number`?`${r}:${n}`:r}var PK=class e{schema;data;persistFn;constructor(e,t,n){this.schema=e,this.data=t,this.persistFn=n}static fromSchema(t,n,r={},i){let a=t.safeParse(r);if(a.success)return new e(t,a.data,n);let o=new Set;for(let e of a.error.issues){let t=e.path[0];typeof t==`string`&&o.add(t)}let s={...r};for(let e of o)delete s[e];let c=t.safeParse(s);return i?.({droppedKeys:[...o],issues:a.error.issues}),c.success?(n(c.data).catch(()=>{}),new e(t,c.data,n)):new e(t,t.parse({}),n)}get values(){return this.data}get(e){return this.data[e]}async set(e,t){let n=this.schema.parse({...this.data,[e]:t});this.data=n,await this.persistFn(this.data)}async setAll(e){let t=this.schema.parse({...this.data,...e});this.data=t,await this.persistFn(this.data)}async deleteKey(e){let{[e]:t,...n}=this.data,r=this.schema.parse(n);this.data=r,await this.persistFn(this.data)}entries(){let e=this.schema.shape;return Object.entries(e).map(([e,t])=>({key:e,schema:t,value:this.data[e],description:t.description}))}},FK={secret:!0};function IK(e){return e._zod?.def??{}}function LK(e){return l.get(e)?.secret===!0}var RK=new Set([`optional`,`nullable`,`default`,`prefault`,`catch`,`readonly`,`nonoptional`]);function zK(e){let t=[],n=[e];for(;n.length>0;){let e=n.shift();if(!e||t.includes(e))continue;t.push(e);let r=IK(e);r.type!==void 0&&RK.has(r.type)&&r.innerType&&n.push(r.innerType),r.type===`pipe`&&(r.in&&n.push(r.in),r.out&&n.push(r.out))}return t}function BK(e){return zK(e).some(LK)}function VK(e,t=``){if(BK(e))return t.length>0?[t]:[];let n=[];for(let r of zK(e)){let e=IK(r);if(e.type===`object`&&e.shape)for(let[r,i]of Object.entries(e.shape))n.push(...VK(i,t?`${t}.${r}`:r));else if(e.type===`array`&&e.element)n.push(...VK(e.element,`${t}[]`));else if(e.type===`union`&&e.options)for(let r of e.options)n.push(...VK(r,t));else e.type===`intersection`&&(e.left&&n.push(...VK(e.left,t)),e.right&&n.push(...VK(e.right,t)))}return[...new Set(n)]}var HK=class e{writer;onWriteFailed;pendingWrites=new Set;failedWrites=new Set;slices;schemas=new Map;listeners=new Set;capListeners=new Map;constructor(e,t,n){this.writer=t,this.onWriteFailed=n,this.slices=new Map;for(let[t,n]of Object.entries(e))n&&typeof n==`object`&&!Array.isArray(n)&&this.slices.set(t,{...n})}static fromInitial(t,n,r){return new e(t,n,r)}installCapSchema(e,t){let n=this.schemas.get(e);if(n){if(n!==t)throw Error(`[DeviceRuntimeState] capability "${e}" registered a different runtime-state schema; each cap must declare ONE shape across every provider`);return}this.schemas.set(e,t);let r=this.slices.get(e);if(r){let n=t.safeParse(r);n.success?this.slices.set(e,n.data):this.slices.delete(e)}}getCapState(e){let t=this.slices.get(e);if(t)return Object.freeze({...t})}getCapField(e,t){return this.slices.get(e)?.[t]}setCapState(e,t){this.applyCapWrite(e,t,!1)}patchCapState(e,t){this.applyCapWrite(e,t,!0)}applyCapWrite(e,t,n){let r=this.schemas.get(e);if(!r)throw Error(`[DeviceRuntimeState] no schema registered for cap "${e}" — did the device register it via ctx.registerNativeCap before writing?`);let i=this.slices.get(e)??{},a=n?{...i,...t}:{...t},o=r.parse(a);if(UK(i,o)&&!this.failedWrites.has(e))return;this.slices.set(e,o),this.fireListeners([e]);let s=this.writer(e,{...o}).then(()=>{this.failedWrites.delete(e)}).catch(t=>{this.failedWrites.add(e),this.onWriteFailed?.(e,t instanceof Error?t.message:String(t))});this.pendingWrites.add(s),s.finally(()=>{this.pendingWrites.delete(s)})}fireListeners(e){let t=this.snapshot();for(let n of this.listeners)try{n(e,t)}catch{}for(let t of e){let e=this.capListeners.get(t);if(!e)continue;let n=this.getCapState(t);for(let t of e)try{t(n)}catch{}}}subscribe(e){return this.listeners.add(e),()=>{this.listeners.delete(e)}}subscribeCap(e,t){let n=this.capListeners.get(e);n||(n=new Set,this.capListeners.set(e,n));let r=e=>{t(e)};return n.add(r),()=>{let t=this.capListeners.get(e);t&&(t.delete(r),t.size===0&&this.capListeners.delete(e))}}snapshot(){let e={};for(let[t,n]of this.slices)e[t]=Object.freeze({...n});return Object.freeze(e)}async flush(){if(this.pendingWrites.size===0)return;let e=[...this.pendingWrites];await Promise.allSettled(e)}};function UK(e,t){let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let r of n)if(e[r]!==t[r])return!1;return!0}var WK={airQualitySensor:ZF,alarmPanel:UC,ambientLightSensor:$F,audioMetrics:iI,automationControl:oI,battery:cI,binary:uI,brightness:fI,cameraStreams:am,carbonMonoxide:FI,climateControl:RI,color:UI,connectivity:XI,consumables:tL,contact:rL,control:sL,cover:uL,dayNight:gL,deviceDiscovery:Sv,deviceStatus:SL,doorbell:TL,enumSensor:OL,eventEmitter:jL,fanControl:GL,featureProbe:qL,flood:YL,gas:ZL,humidifier:$L,humiditySensor:tR,image:rR,imageSettings:fR,intercom:TR,lawnMowerControl:kR,lockControl:QR,mediaPlayer:rz,motion:dz,motionTrigger:mz,motionZones:yz,nativeObjectDetection:Dz,navigation:zz,networkLink:Gz,notifier:bB,numericSensor:SB,petFeeder:GB,powerMeter:hV,presence:vV,pressureSensor:bV,privacyMask:EV,ptzAutotrack:VV,recordingOnboard:eU,recordingSignal:bU,sceneMonitor:zU,scriptRunner:WU,smoke:KU,streamCatalog:YU,streamParams:nW,streamSignals:HN,switch:cW,tamper:VW,temperatureSensor:UW,update:qW,vacuumControl:fG,valve:hG,vibration:_G,waterHeater:yG,weather:xG,zoneAnalytics:AG,zoneRules:MG,zones:yj},GK=class{id;stableId;type;name;parentDeviceId;role;get online(){return this.runtimeState.getCapState(`device-status`)?.online??!1}set online(e){this.markOnline(e)}get state(){if(!this._stateProxyCache){let e={},t={get:(t,n)=>{let r=n;if(r in e)return e[r];let i=WK[r];if(!i)return;let a=this.sliceProxy(i);return e[r]=a,a}};this._stateProxyCache=new Proxy(e,t)}return this._stateProxyCache}_stateProxyCache;config;runtimeState;ctx;location;disabled;_sourceInfoCache=null;constructor(e,t,n){if(this.ctx=e,this.id=e.id,this.stableId=e.stableId,this.type=n.type,!e.deviceMeta)throw Error(`BaseDevice constructor: ctx.deviceMeta is required (id=${e.id} stableId=${e.stableId})`);this.name=e.deviceMeta.name,this.location=e.deviceMeta.location,this.disabled=e.deviceMeta.disabled,this.role=n.role,this.parentDeviceId=e.parentDeviceId;let r=e.persistedConfig??{},i=VK(t);this.config=PK.fromSchema(t,t=>e.persistConfig(t,{secretConfigPaths:i}),r,({droppedKeys:t,issues:n})=>{e.logger.warn(`Device config recovery: dropping invalid persisted fields`,{tags:{deviceId:e.id,stableId:e.stableId},meta:{droppedKeys:[...t],firstIssue:n[0]?.message??null}})});let a=null,o=async(t,n)=>{a||=e.fetchDevice(e.id),await(await a).deviceState.setCapSlice({capName:t,slice:n})},s=e.initialRuntimeState??{},c=(t,n)=>{e.logger.warn(`runtime-state write refused by the hub — the slice is not mirrored; it is re-sent on the next write`,{tags:{deviceId:e.id},meta:{cap:t,error:n}})};this.runtimeState=HK.fromInitial(s,o,c),e.bindRuntimeState?.(this.runtimeState),e.registerNativeCap?.(SL,{});let l={online:!0,lastChangedAt:Date.now()};this.runtimeState.setCapState(`device-status`,l),e.registerNativeCap?.(qL,{}),this.runtimeState.setCapState(`feature-probe`,{flags:{},deviceType:null,model:null,channelCount:null,lastProbedAt:0,lastFetchedAt:0})}deviceActions=new Map;registerDeviceAction(e,t,n){this.deviceActions.set(e,{spec:t,handler:n})}async runDeviceAction(e,t){let n=this.deviceActions.get(e);if(!n)throw Error(`unknown device action "${e}" on device ${this.id}`);let r=n.spec.input.parse(t);return n.handler(r)}async removeDevice(){}markOnline(e){if(this.online===e)return;let t={online:e,lastChangedAt:Date.now()};this.runtimeState.setCapState(`device-status`,t)}get sourceInfo(){if(this._sourceInfoCache)return this._sourceInfoCache;let e=vv(this.ctx.deviceMeta.metadata)??mv({stableId:this.stableId,addonId:this.ctx.deviceMeta.addonId});return this._sourceInfoCache=Object.freeze({...e}),this._sourceInfoCache}get sourceId(){return this.sourceInfo.id}async updateSourceInfo(e){let t=hv(this.sourceInfo,e);this._sourceInfoCache=Object.freeze({...t});let n=this.ctx.api?.deviceManager?.setMetadata;if(n)try{await n.mutate({deviceId:this.id,patch:{[_v]:t}})}catch{}this.ctx.eventBus.emit(gt(`device.source-info-changed`,{type:`device`,id:this.stableId},{deviceId:this.id,sourceInfo:t}))}async refreshFeatures(){let e=this.ctx.api?.deviceManager?.registerDevice;if(e)try{await e.mutate({addonId:this.ctx.deviceMeta.addonId,stableId:this.stableId,id:this.id,type:this.type,name:this.name,parentDeviceId:this.parentDeviceId,features:[...this.features],config:{}})}catch{}}getCapSlice(e){return this.runtimeState.getCapState(e.name)??null}setCapSlice(e,t){this.runtimeState.setCapState(e.name,t)}sliceProxy(e){return new Proxy({},{get:(t,n)=>this.runtimeState.getCapState(e.name)?.[n],set:(t,n,r)=>(this.runtimeState.patchCapState(e.name,{[n]:r}),!0),has:(t,n)=>{let r=this.runtimeState.getCapState(e.name);return r?n in r:!1},ownKeys:()=>{let t=this.runtimeState.getCapState(e.name);return t?Object.keys(t):[]},getOwnPropertyDescriptor:(t,n)=>{let r=this.runtimeState.getCapState(e.name);if(!(!r||!(n in r)))return{configurable:!0,enumerable:!0,value:r[n]}}})}getSettingsUISchema(){return{sections:[]}}async applySettingsPatch(e){await this.config.setAll(e)}async onProbe(){let e=this.runtimeState.getCapState(`feature-probe`)??{flags:{},deviceType:null,model:null,channelCount:null,lastProbedAt:0,lastFetchedAt:0};this.runtimeState.setCapState(`feature-probe`,{...e,lastProbedAt:Date.now()})}async onActivate(){}async reprobe(){this._kernelReprobe?await this._kernelReprobe():await this.onProbe()}_kernelReprobe;getAccessoryChildren(){return[]}getProbeFlags(){return this.runtimeState.getCapState(`feature-probe`)?.flags??{}}hasProbed(){return(this.runtimeState.getCapState(`feature-probe`)?.lastProbedAt??0)>0}},KK=[1e4,3e4,9e4];function qK(e,t){return new Promise(n=>{if(t.aborted){n();return}let r=()=>{clearTimeout(i),n()},i=setTimeout(()=>{t.removeEventListener(`abort`,r),n()},e);i.unref?.(),t.addEventListener(`abort`,r,{once:!0})})}async function JK(e,t,n){let r=[...e],i=Math.max(1,Math.min(t,r.length));await Promise.all(Array.from({length:i},async()=>{for(;;){let e=r.shift();if(e===void 0)return;await n(e)}}))}var YK=class{#e;#t;#n;#r;#i;#a;#o=new AbortController;constructor(e){this.#e=e.logger,this.#t=e.attempt,this.#n=e.onPermanentFailure,this.#r=e.delaysMs??KK,this.#i=e.concurrency??4,this.#a=e.now??Date.now}cancel(){this.#o.abort()}async run(e){let t=e.map(e=>({saved:e.saved,lastError:e.error,attempts:1}));for(let e=0;e<this.#r.length&&!(t.length===0||this.#o.signal.aborted||(await qK(this.#r[e]??0,this.#o.signal),this.#o.signal.aborted));e+=1)t=await this.#s(t,e);if(this.#o.signal.aborted)return[];let n=t.map(e=>({deviceId:e.saved.id,stableId:e.saved.stableId,type:String(e.saved.type),attempts:e.attempts,lastError:e.lastError,failedAt:this.#a()}));for(let e of n)this.#n(e);return n}async#s(e,t){let n=[],r=e.filter(e=>e.saved.parentDeviceId===null),i=e.filter(e=>e.saved.parentDeviceId!==null);for(let e of[r,i])await JK(e,this.#i,async e=>{if(this.#o.signal.aborted){n.push(e);return}let r=e.attempts+1;try{await this.#t(e.saved),this.#e.info(`Device restored on retry`,{tags:{deviceId:e.saved.id,stableId:e.saved.stableId},meta:{attempt:r}})}catch(i){let a=i instanceof Error?i.message:String(i),o=this.#r.length-(t+1);this.#e.warn(`Device restore retry failed`,{tags:{deviceId:e.saved.id,stableId:e.saved.stableId},meta:{attempt:r,remainingRetries:o,error:a}}),n.push({saved:e.saved,lastError:a,attempts:r})}});return n}};function XK(e,t){let n={};for(let t of e.config.entries())n[t.key]=t.value;return{id:e.id,stableId:e.stableId,addonId:t,type:String(e.type),name:e.name,parentDeviceId:e.parentDeviceId,online:e.online,features:[...e.features],config:n,sourceInfo:e.sourceInfo}}var ZK=class extends pn{async onInitialize(){return this.ctx.logger.info(`${this.providerName} Provider initialized`),[{capability:oy,provider:this}]}async onShutdown(){this._restoreShuttingDown=!0,this.cancelRestoreRetries();let e=await this.ctx.kernel.devices?.getAll()??[];for(let t of e)try{await this.ctx.kernel.devices?.decommission(t.id)}catch(e){this.ctx.logger.warn(`${this.providerName}: decommission failed`,{tags:{deviceId:t.id,stableId:t.stableId},meta:{error:e instanceof Error?e.message:String(e)}})}this.ctx.logger.info(`${this.providerName} Provider shut down`,{meta:{decommissionedCount:e.length}})}async start(){}async stop(){}async getStatus(){let e=await this.ctx.kernel.devices?.getAll()??[],t=this.restoreFailureSummary(),n={connected:!0,deviceCount:e.length,motionSliceWriter:`orchestrator`};return t===null?n:{...n,error:t}}async getDevices(){return(await this.ctx.kernel.devices?.getAll()??[]).map(e=>({id:e.stableId,name:e.name,type:String(e.type)}))}async supportsDiscovery(){return!1}async discoverDevices(e){return[]}async getDiscoveryParamsSchema(){return null}async getManualCreationType(){return await this.supportsManualCreation()?{deviceType:Object.values(R).find(e=>this.deviceClasses[e]!==void 0)??null}:{deviceType:null}}async adoptDiscoveredDevice(e){throw Error(`${this.providerName} provider does not support discovery-based adoption`)}async supportsManualCreation(){return!0}async getChildCreationSchema(e){return this.onGetCreationSchema(e.type)}async createDevice(e){let t=await this.onCreateDevice(e.type,e.config),n=this.deviceClasses[t.meta.type];if(!n)throw Error(`${this.providerName} provider: no device class registered for type "${t.meta.type}" — add it to the deviceClasses map`);let r=this.generateStableId(t.meta.type,t.config),i=await this.ctx.kernel.devices.create(r,n,t.config,null,t.meta);if(t.onAfterCreate)try{await t.onAfterCreate(i)}catch(e){this.ctx.logger.warn(`createDevice: onAfterCreate hook threw — device is already registered`,{tags:{deviceId:i.id,stableId:r},meta:{error:e instanceof Error?e.message:String(e)}})}return this.toSummary(i)}generateStableId(e,t){return`${this.addonId}-${Date.now()}`}async testCreationField(e){return{status:`ok`,labels:[`probe not implemented`]}}async restoreDevices(e){this._restoreShuttingDown=!1;let t=await this.onRestoreDevices(e);if(e.length===0)return;if(t&&t.failedCount>0){this.ctx.logger.warn(`Restored ${t.restoredCount}/${e.length} ${this.providerName} device(s) — ${t.failedCount} failed, bounded retry scheduled`);return}let n=t?t.restoredCount:e.length;this.ctx.logger.info(`Restored ${n} ${this.providerName} device(s)`)}restoreRetryDelaysMs=KK;restoreRetryConcurrency=4;_restoreRetrySchedulers=[];_restoreRetryCompletion=null;_restoreShuttingDown=!1;_permanentRestoreFailures=new Map;get restoreRetryCompletion(){return this._restoreRetryCompletion}get permanentRestoreFailures(){return[...this._permanentRestoreFailures.values()]}restoreFailureSummary(){if(this._permanentRestoreFailures.size===0)return null;let e=[...this._permanentRestoreFailures.keys()].join(`, `);return`${this._permanentRestoreFailures.size} device(s) permanently failed restore (deviceIds: ${e}) — restart the ${this.providerName} provider to retry`}quarantineConfiglessTopLevelRestores=!0;isUnrestorableShell(e){if(!this.quarantineConfiglessTopLevelRestores||e.parentDeviceId!==null)return!1;let t=e.config;return t===void 0?!1:Object.keys(t).length===0}quarantineShell(e){this._permanentRestoreFailures.set(e.id,{deviceId:e.id,stableId:e.stableId,type:e.type,attempts:0,lastError:`persisted row has no configuration`,failedAt:Date.now()}),this.ctx.logger.error(`Persisted device row has NO configuration — quarantined: not restored, not retried. Remove it (deviceManager.removeDevice) or re-add the device.`,{tags:{deviceId:e.id,stableId:e.stableId},meta:{type:e.type,provider:this.providerName}})}cancelRestoreRetries(){for(let e of this._restoreRetrySchedulers)e.cancel();this._restoreRetrySchedulers=[]}recordPermanentRestoreFailure(e){this._permanentRestoreFailures.set(e.deviceId,e),this.ctx.logger.error(`Device restore permanently failed — its capabilities will not register until the provider restarts`,{tags:{deviceId:e.deviceId,stableId:e.stableId},meta:{type:e.type,attempts:e.attempts,error:e.lastError}})}scheduleRestoreRetries(e,t){if(this._restoreShuttingDown){this.ctx.logger.info(`Restore retries not scheduled — the provider is shutting down`,{meta:{rows:e.length,deviceIds:e.map(e=>e.saved.id)}});return}let n=new YK({logger:this.ctx.logger,delaysMs:this.restoreRetryDelaysMs,concurrency:this.restoreRetryConcurrency,attempt:t,onPermanentFailure:e=>this.recordPermanentRestoreFailure(e)});this._restoreRetrySchedulers=[...this._restoreRetrySchedulers,n];let r=n.run(e).then(()=>void 0).catch(e=>{this.ctx.logger.error(`Restore retry scheduler crashed`,{meta:{error:e instanceof Error?e.message:String(e)}})}),i=this._restoreRetryCompletion;this._restoreRetryCompletion=i===null?r:Promise.all([i,r]).then(()=>void 0)}async restoreWithBoundedRetry(e,t){let n=[];for(let r of e){if(this.isUnrestorableShell(r)){this.quarantineShell(r);continue}try{await t(r)}catch(e){let t=e instanceof Error?e.message:String(e);this.ctx.logger.warn(`Failed to restore device — bounded retry scheduled`,{tags:{deviceId:r.id,stableId:r.stableId},meta:{type:r.type,attempt:1,error:t}}),n.push({saved:r,error:t})}}n.length>0&&this.scheduleRestoreRetries(n,t)}async reloadDevice(e){let{stableId:t}=e,n=this.ctx.kernel.devices;if(!n)throw Error(`${this.providerName}: kernel.devices unavailable — cannot reload`);let r=(await n.getAll()).find(e=>e.stableId===t);r&&await n.decommission(r.id);let{id:i}=await this.ctx.api.deviceManager.allocateDeviceId.mutate({addonId:this.addonId,stableId:t}),a=await this.ctx.api.deviceManager.loadMeta.query({deviceId:i});if(a===null)throw Error(`${this.providerName}: no persisted meta for "${t}" (id ${i}) — cannot reload`);let o=Object.values(R).find(e=>e===a.type),s=o===void 0?void 0:this.deviceClasses[o];if(!s)throw Error(`${this.providerName}: no device class for type "${a.type}" — "${t}" is an accessory child; reload its parent instead`);await n.create(t,s,{},a.parentDeviceId??null);let c=await this.ctx.api.deviceManager.listPersistedByAddon.query({addonId:this.addonId});for(let e of c){if(e.parentDeviceId!==i)continue;let t=Object.values(R).find(t=>t===e.type),r=t===void 0?void 0:this.deviceClasses[t];if(r)try{await n.create(e.stableId,r,{},i)}catch(t){this.ctx.logger.warn(`reloadDevice: failed to re-create first-class child`,{tags:{deviceId:e.id,stableId:e.stableId},meta:{parentDeviceId:i,error:t instanceof Error?t.message:String(t)}})}}return this.ctx.logger.info(`device reloaded in place from persisted rows`,{tags:{deviceId:i},meta:{stableId:t,type:a.type}}),{deviceId:i}}async healSavedConfig(e,t){}async onRestoreDevices(e){let t=new Set,n=[],r=new Set((await this.ctx.kernel.devices.getAll()).map(e=>e.stableId)),i=async n=>{if(t.has(n.id))return;if(r.has(n.stableId)){this.ctx.logger.debug(`Restore row already live — not dialled again`,{tags:{deviceId:n.id,stableId:n.stableId}}),t.add(n.id);return}let i=this.deviceClasses[n.type];if(!i)throw Error(`no device class registered for type "${n.type}"`);if(n.parentDeviceId!==null&&!t.has(n.parentDeviceId))throw Error(`parent device ${n.parentDeviceId} not restored`);await this.healSavedConfig(n,e);try{await this.ctx.kernel.devices.create(n.stableId,i,{},n.parentDeviceId)}catch(e){if(!(await this.ctx.kernel.devices.getAll()).some(e=>e.stableId===n.stableId))throw e;this.ctx.logger.debug(`Restore row came to life during its own dial — kept`,{tags:{deviceId:n.id,stableId:n.stableId}})}t.add(n.id)},a=e.filter(e=>e.parentDeviceId===null),o=async e=>{if(!this.deviceClasses[e.type]){this.ctx.logger.warn(`No device class registered for restored type — skipping`,{tags:{deviceId:e.id,stableId:e.stableId},meta:{type:e.type}});return}if(this.isUnrestorableShell(e)){this.quarantineShell(e);return}try{await i(e)}catch(t){let r=t instanceof Error?t.message:String(t);this.ctx.logger.warn(`Failed to restore device — bounded retry scheduled`,{tags:{deviceId:e.id,stableId:e.stableId},meta:{type:e.type,attempt:1,error:r}}),n.push({saved:e,error:r})}};await Promise.all(a.map(e=>o(e)));let s=new Set(n.map(e=>e.saved.id)),c=e.filter(e=>e.parentDeviceId!==null);for(let e of c)if(this.deviceClasses[e.type]&&e.parentDeviceId!==null){if(t.has(e.parentDeviceId)){try{await i(e)}catch(t){let r=t instanceof Error?t.message:String(t);this.ctx.logger.warn(`Failed to restore hub-adopted child — bounded retry scheduled`,{tags:{deviceId:e.id,stableId:e.stableId,parentDeviceId:e.parentDeviceId},meta:{type:e.type,attempt:1,error:r}}),n.push({saved:e,error:r})}continue}if(s.has(e.parentDeviceId)){this.ctx.logger.warn(`Hub-adopted child deferred — parent failed initial restore`,{tags:{deviceId:e.id,stableId:e.stableId,parentDeviceId:e.parentDeviceId},meta:{type:e.type}}),n.push({saved:e,error:`parent device ${e.parentDeviceId} not restored`});continue}}return n.length>0&&this.scheduleRestoreRetries(n,i),{restoredCount:t.size,failedCount:n.length}}toSummary(e){return XK(e,this.addonId)}},QK=360*6e4;function $K(e){let t=e.status;if(!t)return`sleeping`;if(t.sleeping!==!0)return`awake`;let n=t.lastContactAt;if(typeof n!=`number`||n<=0)return`sleeping`;let r=e.unreachableAfterMs??216e5;return e.nowMs-n>r?`unreachable`:`sleeping`}function eq(e){return e===`unreachable`}var tq=[`media-player`,`alarm-panel`,`thermostat`,`climate`,`humidifier`,`water-heater`,`lock`,`cover`,`valve`,`fan`,`vacuum`,`lawn-mower`,`light`,`switch`,`siren`,`button`,`control`,`notifier`,`script`,`automation`,`update`,`presence`,`weather`,`image`,`sensor`],nq=[`contact-sensor`,`motion-sensor`,`occupancy-sensor`,`smoke-sensor`,`co-sensor`,`gas-sensor`,`leak-sensor`,`vibration-sensor`,`tamper-sensor`,`sound-sensor`];function rq(e){if(e===void 0)return nq.length;let t=nq.indexOf(e);return t===-1?nq.length:t}function iq(e){let t=tq.indexOf(e);return t===-1?tq.length:t}function aq(e,t){let n=e=>e.toLowerCase().replace(/[-_\s]+/g,` `).trim();return n(e)===n(t)}function oq(e,t,n){if(t!=null){let n=e.find(e=>e.stableId===t)??e.find(e=>e.entityId!==void 0&&e.entityId===t);if(n!==void 0)return n}let r=e=>n!==void 0&&n.length>0&&e.name!==void 0&&aq(e.name,n)?0:1;return[...e].toSorted((e,t)=>rq(e.role)-rq(t.role)||r(e)-r(t)||iq(e.type)-iq(t.type))[0]??null}function sq(e,t,n,r,i){if(r.has(e))return;let a=t.get(e);if(!a)return;if(a.type!==R.Container){i.add(e);return}let o=new Set(r);o.add(e);let s=oq((n.get(e)??[]).map(e=>({id:e.id,stableId:e.stableId,type:e.type,...e.role!==void 0&&e.role!==null?{role:e.role}:{},...e.name===void 0?{}:{name:e.name}})),t.get(e)?.primaryChildEntityId,t.get(e)?.name);s!==null&&sq(s.id,t,n,o,i)}function cq(e){let{selfId:t,selfLocation:n,candidates:r}=e;if(n===null||n.length===0)return[];let i=new Map(r.map(e=>[e.id,e])),a=new Map;for(let e of r){if(e.parentDeviceId===null)continue;let t=a.get(e.parentDeviceId);t?t.push(e):a.set(e.parentDeviceId,[e])}let o=new Set,s=e=>sq(e,i,a,new Set,o);for(let e of r){if(e.type===R.Container||e.location!==n||e.parentDeviceId===t)continue;let r=e.parentDeviceId===null?void 0:i.get(e.parentDeviceId);if(r!==void 0&&r.type===R.Container){s(r.id);continue}o.add(e.id)}return o.delete(t),[...o]}var lq=`fixed`;function uq(e){let t=e??`hub`;return t.includes(`/`)?t.split(`/`)[0]??`hub`:t}var dq=class{ports;constructor(e){let t=e.addonId;if(typeof t!=`string`||t.length===0)throw Error(`DeclaredDevices: addonId must be the declaring addon's id, got ${JSON.stringify(t)}. On an addon context it is \`ctx.id\` — there is no \`ctx.addonId\`.`);this.ports=e}async reconcile(e){if((e.placement??`hub`)===`hub`){let e=uq(this.ports.localNodeId);if(e!==`hub`)return this.ports.logger.info(`declared devices are hub-owned — skipping on this node`,{meta:{nodeId:e,rawNodeId:this.ports.localNodeId??null}}),{integrationId:null,devices:[],removed:[],owned:!1}}let t=e.integrationId??await this.ensureIntegration(e.integrationName),n=await this.readIndex(),r=await this.readLiveByStableId(),i=[];for(let a of e.devices){let e=await this.applyDeclaration(a,t,n,r);e!==null&&i.push(e)}return{integrationId:t,devices:i,removed:await this.sweepWithdrawn(e.devices,t,n),owned:!0}}async ensureIntegration(e){let t=await this.ports.getIntegration(this.ports.addonId);if(t===null){let t=await this.ports.createIntegration({addonId:this.ports.addonId,name:e,info:{[lq]:!0}});return this.ports.logger.info(`declared a fixed integration`,{meta:{integrationId:t.id,name:e}}),t.id}return t.info?.fixed!==!0&&(await this.ports.updateIntegration({id:t.id,info:{[lq]:!0}}),this.ports.logger.info("re-asserted `fixed` on a declared integration",{meta:{integrationId:t.id}})),t.id}async readIndex(){let e=await this.ports.listOwnDevices();return new Map(e.map(e=>[e.stableId,e]))}async readLiveByStableId(){try{let e=await this.ports.devices.getAll();return new Map(e.map(e=>[e.stableId,e]))}catch(e){return this.ports.logger.warn(`could not read live devices — falling back to adopt-by-row`,{meta:{error:e instanceof Error?e.message:String(e)}}),new Map}}async applyDeclaration(e,t,n,r){try{let i=r.get(e.stableId);if(i!==void 0)return{stableId:e.stableId,deviceId:i.id,device:i,created:!1};let a=n.get(e.stableId);if(a===void 0&&(a=(await this.readIndex()).get(e.stableId),a!==void 0&&this.ports.logger.warn(`device index disagreed with itself — adopting instead of re-creating`,{tags:{deviceId:a.id},meta:{stableId:e.stableId,addonId:this.ports.addonId}})),a!==void 0){let n=await this.ports.devices.create(e.stableId,e.DeviceClass,{},null,void 0);return this.ports.logger.info(`declared device adopted`,{tags:{deviceId:n.id},meta:{stableId:e.stableId,integrationId:t}}),{stableId:e.stableId,deviceId:n.id,device:n,created:!1}}let o=await this.ports.devices.create(e.stableId,e.DeviceClass,e.config??{},null,{type:e.type,name:e.name,integrationId:t,...e.role===void 0?{}:{role:e.role}});return this.ports.logger.info(`declared device created`,{tags:{deviceId:o.id},meta:{stableId:e.stableId,integrationId:t}}),{stableId:e.stableId,deviceId:o.id,device:o,created:!0}}catch(t){return this.ports.logger.warn(`a declared device could not be brought up`,{meta:{stableId:e.stableId,error:t instanceof Error?t.message:String(t)}}),null}}async sweepWithdrawn(e,t,n){let r=new Set(e.map(e=>e.stableId)),i=[...n.values()].filter(e=>e.integrationId===t&&!r.has(e.stableId));if(i.length===0)return[];if(i.length>32)return this.ports.logger.warn(`withdrawal sweep exceeded its bound — removing nothing`,{meta:{integrationId:t,candidates:i.length,bound:32}}),[];let a=[];for(let e of i)try{await this.ports.devices.remove(e.id),a.push(e.id),this.ports.logger.info(`declared device removed — its declaration was withdrawn`,{tags:{deviceId:e.id},meta:{stableId:e.stableId,integrationId:t}})}catch(t){this.ports.logger.warn(`a withdrawn declared device could not be removed`,{tags:{deviceId:e.id},meta:{stableId:e.stableId,error:t instanceof Error?t.message:String(t)}})}return a}};async function fq(e,t){let n=await e.api.integrations.getByAddonId.query({addonId:qg});return n==null?(e.logger.warn(`reconcileBlockDevices: Blocks integration is not ready — skipping this pass`,{meta:{blockAddonId:e.id}}),{integrationId:null,devices:[],removed:[],owned:!1}):new dq({logger:e.logger.child(`declared-devices`),addonId:e.id,devices:e.kernel.devices,localNodeId:e.kernel.localNodeId,getIntegration:async()=>{throw Error(`reconcileBlockDevices: devices hang off the Blocks integration; it never reads its own`)},createIntegration:async()=>{throw Error(`reconcileBlockDevices: devices hang off the Blocks integration; it never mints one`)},updateIntegration:async()=>{throw Error(`reconcileBlockDevices: devices hang off the Blocks integration; it never updates one`)},listOwnDevices:()=>e.api.deviceManager.listAll.query({addonId:e.id})}).reconcile({integrationId:n.id,integrationName:n.name,placement:t.placement??`hub`,devices:t.devices})}async function pq(e,t){for(let n of t.exporterAddonIds)for(let r of t.deviceIds)try{await e.api.deviceExport.exposeDevice.mutate({addonId:n,deviceId:String(r),nodeId:`hub`})}catch(t){e.logger.warn(`exposeBlockDevices: expose refused`,{tags:{deviceId:r},meta:{exporterAddonId:n,error:t instanceof Error?t.message:String(t)}})}}var mq={[R.Cover]:`cover`,[R.Valve]:`valve`,[R.Humidifier]:`humidifier`,[R.WaterHeater]:`water-heater`,[R.Camera]:`dummy`,[R.Hub]:`dummy`,[R.Switch]:`switch`,[R.Siren]:`switch`,[R.Light]:`light`,[R.Fan]:`fan`,[R.Sensor]:`sensor`,[R.Thermostat]:`thermostat`,[R.Climate]:`climate`,[R.Button]:`button`,[R.EventEmitter]:`dummy`,[R.Update]:`update`,[R.Generic]:`dummy`,[R.Notifier]:`dummy`,[R.Script]:`script`,[R.Automation]:`automation`,[R.Lock]:`lock`,[R.MediaPlayer]:`media-player`,[R.AlarmPanel]:`alarm`,[R.Control]:`control`,[R.Presence]:`sensor`,[R.Weather]:`weather`,[R.Vacuum]:`vacuum`,[R.LawnMower]:`lawn-mower`,[R.Container]:`dummy`,[R.Image]:`image`,[R.PetFeeder]:`pet-feeder`},hq=new Set(Object.values(R));function gq(e){return hq.has(e)?mq[e]:null}var _q=`motion-trigger`;function vq(e){return e.includes(_q)}var yq=[`temperature-sensor`,`humidity-sensor`,`ambient-light-sensor`,`numeric-sensor`,`enum-sensor`];function bq(e){let t=new Set(e.features);switch(e.type){case R.Cover:return{kind:`cover`};case R.Valve:return{kind:`valve`};case R.Lock:return{kind:`lock`};case R.AlarmPanel:return{kind:`alarm`};case R.Light:return t.has(`brightness`)?{kind:`brightness`}:{kind:`switch`};case R.Switch:case R.Siren:return{kind:`switch`};case R.Sensor:case R.Presence:{let e=yq.find(e=>t.has(e));return e?{kind:`sensor`,sensorFeature:e}:{kind:`none`}}default:return{kind:`none`}}}var xq={"temperature-sensor":{capKey:`temperatureSensor`,field:`celsius`,fallbackUnit:`°C`},"humidity-sensor":{capKey:`humiditySensor`,field:`percent`,fallbackUnit:`%`},"ambient-light-sensor":{capKey:`ambientLightSensor`,field:`lux`,fallbackUnit:`lx`},"numeric-sensor":{capKey:`numericSensor`,field:`value`}};function Sq(e){return e!==null&&(typeof e==`object`||typeof e==`function`)}function Cq(e,t){if(!Sq(e))return null;let n=e[t];if(!Sq(n))return null;let r=n.mutate;return typeof r==`function`?r:null}var wq=Object.freeze({"accessories.getStatus":{capName:`accessories`,capScope:`device`,addonId:null,access:`view`},"accessories.setChildHidden":{capName:`accessories`,capScope:`device`,addonId:null,access:`create`},"addonPages.listPages":{capName:`addon-pages`,capScope:`system`,addonId:null,access:`view`},"addonPagesSource.listPages":{capName:`addon-pages-source`,capScope:`system`,addonId:null,access:`view`},"addonRoutes.getRoutes":{capName:`addon-routes`,capScope:`system`,addonId:null,access:`view`},"addonRoutes.invoke":{capName:`addon-routes`,capScope:`system`,addonId:null,access:`create`},"addons.applyAutoUpdateToAll":{capName:`addons`,capScope:`system`,addonId:null,access:`create`},"addons.cancelJob":{capName:`addons`,capScope:`system`,addonId:null,access:`create`},"addons.custom":{capName:`addons`,capScope:`system`,addonId:null,access:`create`},"addons.forceRefresh":{capName:`addons`,capScope:`system`,addonId:null,access:`create`},"addons.getAddonAutoUpdate":{capName:`addons`,capScope:`system`,addonId:null,access:`view`},"addons.getAutoUpdateSettings":{capName:`addons`,capScope:`system`,addonId:null,access:`view`},"addons.getJob":{capName:`addons`,capScope:`system`,addonId:null,access:`view`},"addons.getLastRestart":{capName:`addons`,capScope:`system`,addonId:null,access:`view`},"addons.getLogs":{capName:`addons`,capScope:`system`,addonId:null,access:`view`},"addons.getVersions":{capName:`addons`,capScope:`system`,addonId:null,access:`view`},"addons.installFromWorkspace":{capName:`addons`,capScope:`system`,addonId:null,access:`create`},"addons.installPackage":{capName:`addons`,capScope:`system`,addonId:null,access:`create`},"addons.isWorkspaceAvailable":{capName:`addons`,capScope:`system`,addonId:null,access:`view`},"addons.list":{capName:`addons`,capScope:`system`,addonId:null,access:`view`},"addons.listCapabilityProviders":{capName:`addons`,capScope:`system`,addonId:null,access:`view`},"addons.listFrameworkPackages":{capName:`addons`,capScope:`system`,addonId:null,access:`view`},"addons.listInstallations":{capName:`addons`,capScope:`system`,addonId:null,access:`view`},"addons.listJobs":{capName:`addons`,capScope:`system`,addonId:null,access:`view`},"addons.listPackages":{capName:`addons`,capScope:`system`,addonId:null,access:`view`},"addons.listUpdates":{capName:`addons`,capScope:`system`,addonId:null,access:`view`},"addons.listWorkspacePackages":{capName:`addons`,capScope:`system`,addonId:null,access:`view`},"addons.onAddonLogs":{capName:`addons`,capScope:`system`,addonId:null,access:`view`},"addons.reloadPackages":{capName:`addons`,capScope:`system`,addonId:null,access:`create`},"addons.restartAddon":{capName:`addons`,capScope:`system`,addonId:null,access:`create`},"addons.restartServer":{capName:`addons`,capScope:`system`,addonId:null,access:`create`},"addons.retryLoad":{capName:`addons`,capScope:`system`,addonId:null,access:`create`},"addons.rollbackPackage":{capName:`addons`,capScope:`system`,addonId:null,access:`create`},"addons.searchAvailable":{capName:`addons`,capScope:`system`,addonId:null,access:`view`},"addons.setAddonAutoUpdate":{capName:`addons`,capScope:`system`,addonId:null,access:`create`},"addons.setAutoUpdateSettings":{capName:`addons`,capScope:`system`,addonId:null,access:`create`},"addons.setCapabilityProviderEnabled":{capName:`addons`,capScope:`system`,addonId:null,access:`create`},"addons.startJob":{capName:`addons`,capScope:`system`,addonId:null,access:`create`},"addons.uninstallPackage":{capName:`addons`,capScope:`system`,addonId:null,access:`delete`},"addons.updatePackage":{capName:`addons`,capScope:`system`,addonId:null,access:`create`},"addonSettings.getDeviceSettings":{capName:`addon-settings`,capScope:`system`,addonId:null,access:`view`},"addonSettings.getGlobalSettings":{capName:`addon-settings`,capScope:`system`,addonId:null,access:`view`},"addonSettings.getIntegrationSettings":{capName:`addon-settings`,capScope:`system`,addonId:null,access:`view`},"addonSettings.updateDeviceSettings":{capName:`addon-settings`,capScope:`system`,addonId:null,access:`create`},"addonSettings.updateGlobalSettings":{capName:`addon-settings`,capScope:`system`,addonId:null,access:`create`},"addonWidgets.listWidgets":{capName:`addon-widgets`,capScope:`system`,addonId:null,access:`view`},"addonWidgetsSource.listWidgets":{capName:`addon-widgets-source`,capScope:`system`,addonId:null,access:`view`},"adminUi.getStaticDir":{capName:`admin-ui`,capScope:`system`,addonId:null,access:`view`},"adminUi.getVersion":{capName:`admin-ui`,capScope:`system`,addonId:null,access:`view`},"airQualitySensor.getStatus":{capName:`air-quality-sensor`,capScope:`device`,addonId:null,access:`view`},"alarmPanel.arm":{capName:`alarm-panel`,capScope:`device`,addonId:null,access:`create`},"alarmPanel.disarm":{capName:`alarm-panel`,capScope:`device`,addonId:null,access:`create`},"alarmPanel.getStatus":{capName:`alarm-panel`,capScope:`device`,addonId:null,access:`view`},"alarmPanel.trigger":{capName:`alarm-panel`,capScope:`device`,addonId:null,access:`create`},"alerts.dismiss":{capName:`alerts`,capScope:`system`,addonId:null,access:`create`},"alerts.emit":{capName:`alerts`,capScope:`system`,addonId:null,access:`create`},"alerts.getUnreadCount":{capName:`alerts`,capScope:`system`,addonId:null,access:`view`},"alerts.list":{capName:`alerts`,capScope:`system`,addonId:null,access:`view`},"alerts.markAllRead":{capName:`alerts`,capScope:`system`,addonId:null,access:`create`},"alerts.markRead":{capName:`alerts`,capScope:`system`,addonId:null,access:`create`},"alerts.update":{capName:`alerts`,capScope:`system`,addonId:null,access:`create`},"ambientLightSensor.getStatus":{capName:`ambient-light-sensor`,capScope:`device`,addonId:null,access:`view`},"audioAnalysis.applyDeviceSettingsPatch":{capName:`audio-analysis`,capScope:`device`,addonId:null,access:`create`},"audioAnalysis.getDeviceLiveContribution":{capName:`audio-analysis`,capScope:`device`,addonId:null,access:`view`},"audioAnalysis.getDeviceSettingsContribution":{capName:`audio-analysis`,capScope:`device`,addonId:null,access:`view`},"audioAnalysis.resolveDeviceSettings":{capName:`audio-analysis`,capScope:`device`,addonId:null,access:`view`},"audioAnalyzer.analyseChunk":{capName:`audio-analyzer`,capScope:`system`,addonId:null,access:`create`},"audioAnalyzer.attachDevice":{capName:`audio-analyzer`,capScope:`system`,addonId:null,access:`create`},"audioAnalyzer.classify":{capName:`audio-analyzer`,capScope:`system`,addonId:null,access:`view`},"audioAnalyzer.detachDevice":{capName:`audio-analyzer`,capScope:`system`,addonId:null,access:`create`},"audioAnalyzer.dispose":{capName:`audio-analyzer`,capScope:`system`,addonId:null,access:`create`},"audioAnalyzer.isReady":{capName:`audio-analyzer`,capScope:`system`,addonId:null,access:`view`},"audioAnalyzer.reprobeAudioEngine":{capName:`audio-analyzer`,capScope:`system`,addonId:null,access:`create`},"audioCodec.canHandle":{capName:`audio-codec`,capScope:`system`,addonId:null,access:`view`},"audioCodec.closeSession":{capName:`audio-codec`,capScope:`system`,addonId:null,access:`create`},"audioCodec.createDecodeSession":{capName:`audio-codec`,capScope:`system`,addonId:null,access:`create`},"audioCodec.createEncodeSession":{capName:`audio-codec`,capScope:`system`,addonId:null,access:`create`},"audioCodec.flushEncode":{capName:`audio-codec`,capScope:`system`,addonId:null,access:`create`},"audioCodec.listActiveSessions":{capName:`audio-codec`,capScope:`system`,addonId:null,access:`view`},"audioCodec.listSupportedCodecs":{capName:`audio-codec`,capScope:`system`,addonId:null,access:`view`},"audioCodec.pullEncoded":{capName:`audio-codec`,capScope:`system`,addonId:null,access:`view`},"audioCodec.pullPcm":{capName:`audio-codec`,capScope:`system`,addonId:null,access:`view`},"audioCodec.pushEncodedFrame":{capName:`audio-codec`,capScope:`system`,addonId:null,access:`create`},"audioCodec.pushPcm":{capName:`audio-codec`,capScope:`system`,addonId:null,access:`create`},"audioMetrics.getCurrentSnapshot":{capName:`audio-metrics`,capScope:`device`,addonId:null,access:`view`},"audioMetrics.getHistory":{capName:`audio-metrics`,capScope:`device`,addonId:null,access:`view`},"authProvider.getLoginUrl":{capName:`auth-provider`,capScope:`system`,addonId:null,access:`view`},"authProvider.handleCallback":{capName:`auth-provider`,capScope:`system`,addonId:null,access:`create`},"authProvider.validateCredentials":{capName:`auth-provider`,capScope:`system`,addonId:null,access:`create`},"authProvider.validateToken":{capName:`auth-provider`,capScope:`system`,addonId:null,access:`view`},"automationControl.disable":{capName:`automation-control`,capScope:`device`,addonId:null,access:`create`},"automationControl.enable":{capName:`automation-control`,capScope:`device`,addonId:null,access:`create`},"automationControl.getStatus":{capName:`automation-control`,capScope:`device`,addonId:null,access:`view`},"automationControl.trigger":{capName:`automation-control`,capScope:`device`,addonId:null,access:`create`},"backup.cancel":{capName:`backup`,capScope:`system`,addonId:null,access:`create`},"backup.delete":{capName:`backup`,capScope:`system`,addonId:null,access:`delete`},"backup.deleteSchedule":{capName:`backup`,capScope:`system`,addonId:null,access:`delete`},"backup.getEntries":{capName:`backup`,capScope:`system`,addonId:null,access:`view`},"backup.list":{capName:`backup`,capScope:`system`,addonId:null,access:`view`},"backup.listArchives":{capName:`backup`,capScope:`system`,addonId:null,access:`view`},"backup.listDestinations":{capName:`backup`,capScope:`system`,addonId:null,access:`view`},"backup.listLocations":{capName:`backup`,capScope:`system`,addonId:null,access:`view`},"backup.listRuns":{capName:`backup`,capScope:`system`,addonId:null,access:`view`},"backup.listSchedules":{capName:`backup`,capScope:`system`,addonId:null,access:`view`},"backup.previewSchedule":{capName:`backup`,capScope:`system`,addonId:null,access:`view`},"backup.restore":{capName:`backup`,capScope:`system`,addonId:null,access:`create`},"backup.trigger":{capName:`backup`,capScope:`system`,addonId:null,access:`create`},"backup.upsertDestinationPolicy":{capName:`backup`,capScope:`system`,addonId:null,access:`create`},"backup.upsertSchedule":{capName:`backup`,capScope:`system`,addonId:null,access:`create`},"battery.getStatus":{capName:`battery`,capScope:`device`,addonId:null,access:`view`},"battery.wakeForStream":{capName:`battery`,capScope:`device`,addonId:null,access:`create`},"binary.getStatus":{capName:`binary`,capScope:`device`,addonId:null,access:`view`},"brightness.getStatus":{capName:`brightness`,capScope:`device`,addonId:null,access:`view`},"brightness.setBrightness":{capName:`brightness`,capScope:`device`,addonId:null,access:`create`},"broker.add":{capName:`broker`,capScope:`system`,addonId:null,access:`create`},"broker.get":{capName:`broker`,capScope:`system`,addonId:null,access:`view`},"broker.getBrokerConfig":{capName:`broker`,capScope:`system`,addonId:null,access:`view`},"broker.getSettings":{capName:`broker`,capScope:`system`,addonId:null,access:`view`},"broker.getSettingsSchema":{capName:`broker`,capScope:`system`,addonId:null,access:`view`},"broker.getState":{capName:`broker`,capScope:`system`,addonId:null,access:`view`},"broker.getStatus":{capName:`broker`,capScope:`system`,addonId:null,access:`view`},"broker.list":{capName:`broker`,capScope:`system`,addonId:null,access:`view`},"broker.listProviders":{capName:`broker`,capScope:`system`,addonId:null,access:`view`},"broker.publish":{capName:`broker`,capScope:`system`,addonId:null,access:`create`},"broker.remove":{capName:`broker`,capScope:`system`,addonId:null,access:`delete`},"broker.setSettings":{capName:`broker`,capScope:`system`,addonId:null,access:`create`},"broker.subscribe":{capName:`broker`,capScope:`system`,addonId:null,access:`create`},"broker.testConnection":{capName:`broker`,capScope:`system`,addonId:null,access:`create`},"broker.testSettings":{capName:`broker`,capScope:`system`,addonId:null,access:`create`},"broker.unsubscribe":{capName:`broker`,capScope:`system`,addonId:null,access:`create`},"button.press":{capName:`button`,capScope:`device`,addonId:null,access:`create`},"calendars.getPreferences":{capName:`calendars`,capScope:`system`,addonId:null,access:`view`},"calendars.listCalendars":{capName:`calendars`,capScope:`system`,addonId:null,access:`view`},"calendars.listEvents":{capName:`calendars`,capScope:`system`,addonId:null,access:`view`},"calendars.setCalendarPreference":{capName:`calendars`,capScope:`system`,addonId:null,access:`create`},"calendarSource.listCalendars":{capName:`calendar-source`,capScope:`system`,addonId:null,access:`view`},"calendarSource.listEvents":{capName:`calendar-source`,capScope:`system`,addonId:null,access:`view`},"cameraCredentials.getCredentials":{capName:`camera-credentials`,capScope:`device`,addonId:null,access:`view`},"cameraCredentials.getStatus":{capName:`camera-credentials`,capScope:`device`,addonId:null,access:`view`},"cameraGridLayout.applyDeviceSettingsPatch":{capName:`camera-grid-layout`,capScope:`device`,addonId:null,access:`create`},"cameraGridLayout.getDeviceLiveContribution":{capName:`camera-grid-layout`,capScope:`device`,addonId:null,access:`view`},"cameraGridLayout.getDeviceSettingsContribution":{capName:`camera-grid-layout`,capScope:`device`,addonId:null,access:`view`},"cameraGridLayout.getLayout":{capName:`camera-grid-layout`,capScope:`device`,addonId:null,access:`view`},"cameraGridLayout.saveLayout":{capName:`camera-grid-layout`,capScope:`device`,addonId:null,access:`create`},"cameraPipelineConfig.applyDeviceSettingsPatch":{capName:`camera-pipeline-config`,capScope:`device`,addonId:null,access:`create`},"cameraPipelineConfig.getDeviceLiveContribution":{capName:`camera-pipeline-config`,capScope:`device`,addonId:null,access:`view`},"cameraPipelineConfig.getDeviceSettingsContribution":{capName:`camera-pipeline-config`,capScope:`device`,addonId:null,access:`view`},"cameraStreams.getBrokerStreams":{capName:`camera-streams`,capScope:`device`,addonId:null,access:`view`},"cameraStreams.getCameraStreams":{capName:`camera-streams`,capScope:`device`,addonId:null,access:`view`},"cameraStreams.getProfileRtspEntries":{capName:`camera-streams`,capScope:`device`,addonId:null,access:`view`},"cameraStreams.getRtspEntries":{capName:`camera-streams`,capScope:`device`,addonId:null,access:`view`},"cameraStreams.pickStream":{capName:`camera-streams`,capScope:`device`,addonId:null,access:`view`},"carbonMonoxide.getStatus":{capName:`carbon-monoxide`,capScope:`device`,addonId:null,access:`view`},"climateControl.getStatus":{capName:`climate-control`,capScope:`device`,addonId:null,access:`view`},"climateControl.setFanMode":{capName:`climate-control`,capScope:`device`,addonId:null,access:`create`},"climateControl.setMode":{capName:`climate-control`,capScope:`device`,addonId:null,access:`create`},"climateControl.setPreset":{capName:`climate-control`,capScope:`device`,addonId:null,access:`create`},"climateControl.setSwingHorizontal":{capName:`climate-control`,capScope:`device`,addonId:null,access:`create`},"climateControl.setSwingVertical":{capName:`climate-control`,capScope:`device`,addonId:null,access:`create`},"climateControl.setTarget":{capName:`climate-control`,capScope:`device`,addonId:null,access:`create`},"climateControl.setTargetHumidity":{capName:`climate-control`,capScope:`device`,addonId:null,access:`create`},"climateControl.setTargetRange":{capName:`climate-control`,capScope:`device`,addonId:null,access:`create`},"color.getStatus":{capName:`color`,capScope:`device`,addonId:null,access:`view`},"color.setColor":{capName:`color`,capScope:`device`,addonId:null,access:`create`},"composer.applyBlocks":{capName:`composer`,capScope:`system`,addonId:null,access:`create`},"composer.getStates":{capName:`composer`,capScope:`system`,addonId:null,access:`view`},"connectionTest.describeTest":{capName:`connection-test`,capScope:`system`,addonId:null,access:`view`},"connectionTest.testSettings":{capName:`connection-test`,capScope:`system`,addonId:null,access:`create`},"connectivity.getStatus":{capName:`connectivity`,capScope:`device`,addonId:null,access:`view`},"consumables.getStatus":{capName:`consumables`,capScope:`device`,addonId:null,access:`view`},"consumables.reset":{capName:`consumables`,capScope:`device`,addonId:null,access:`delete`},"contact.getStatus":{capName:`contact`,capScope:`device`,addonId:null,access:`view`},"control.getStatus":{capName:`control`,capScope:`device`,addonId:null,access:`view`},"control.setValue":{capName:`control`,capScope:`device`,addonId:null,access:`create`},"coreBlocks.compile":{capName:`core-blocks`,capScope:`system`,addonId:null,access:`create`},"coreBlocks.create":{capName:`core-blocks`,capScope:`system`,addonId:null,access:`create`},"coreBlocks.createComposition":{capName:`core-blocks`,capScope:`system`,addonId:null,access:`create`},"coreBlocks.delete":{capName:`core-blocks`,capScope:`system`,addonId:null,access:`delete`},"coreBlocks.get":{capName:`core-blocks`,capScope:`system`,addonId:null,access:`view`},"coreBlocks.getBlockSettings":{capName:`core-blocks`,capScope:`system`,addonId:null,access:`view`},"coreBlocks.getComposition":{capName:`core-blocks`,capScope:`system`,addonId:null,access:`view`},"coreBlocks.getCustomization":{capName:`core-blocks`,capScope:`system`,addonId:null,access:`view`},"coreBlocks.getTypeDefs":{capName:`core-blocks`,capScope:`system`,addonId:null,access:`view`},"coreBlocks.list":{capName:`core-blocks`,capScope:`system`,addonId:null,access:`view`},"coreBlocks.listComposableCaps":{capName:`core-blocks`,capScope:`system`,addonId:null,access:`view`},"coreBlocks.listCompositions":{capName:`core-blocks`,capScope:`system`,addonId:null,access:`view`},"coreBlocks.restart":{capName:`core-blocks`,capScope:`system`,addonId:null,access:`create`},"coreBlocks.setEnabled":{capName:`core-blocks`,capScope:`system`,addonId:null,access:`create`},"coreBlocks.update":{capName:`core-blocks`,capScope:`system`,addonId:null,access:`create`},"coreBlocks.updateBlockSettings":{capName:`core-blocks`,capScope:`system`,addonId:null,access:`create`},"coreBlocks.updateComposition":{capName:`core-blocks`,capScope:`system`,addonId:null,access:`create`},"coreBlocks.validateComposition":{capName:`core-blocks`,capScope:`system`,addonId:null,access:`view`},"cover.close":{capName:`cover`,capScope:`device`,addonId:null,access:`create`},"cover.getStatus":{capName:`cover`,capScope:`device`,addonId:null,access:`view`},"cover.open":{capName:`cover`,capScope:`device`,addonId:null,access:`create`},"cover.setPosition":{capName:`cover`,capScope:`device`,addonId:null,access:`create`},"cover.setTiltPosition":{capName:`cover`,capScope:`device`,addonId:null,access:`create`},"cover.stop":{capName:`cover`,capScope:`device`,addonId:null,access:`create`},"customModelRegistry.listModels":{capName:`custom-model-registry`,capScope:`system`,addonId:null,access:`view`},"databaseSnapshot.listDatabases":{capName:`database-snapshot`,capScope:`system`,addonId:null,access:`view`},"databaseSnapshot.writeSnapshot":{capName:`database-snapshot`,capScope:`system`,addonId:null,access:`create`},"dataStoreProvider.aggregate":{capName:`data-store-provider`,capScope:`system`,addonId:null,access:`view`},"dataStoreProvider.count":{capName:`data-store-provider`,capScope:`system`,addonId:null,access:`view`},"dataStoreProvider.declareCollection":{capName:`data-store-provider`,capScope:`system`,addonId:null,access:`create`},"dataStoreProvider.delete":{capName:`data-store-provider`,capScope:`system`,addonId:null,access:`delete`},"dataStoreProvider.deleteWhere":{capName:`data-store-provider`,capScope:`system`,addonId:null,access:`delete`},"dataStoreProvider.get":{capName:`data-store-provider`,capScope:`system`,addonId:null,access:`view`},"dataStoreProvider.getEngineInfo":{capName:`data-store-provider`,capScope:`system`,addonId:null,access:`view`},"dataStoreProvider.histogram":{capName:`data-store-provider`,capScope:`system`,addonId:null,access:`view`},"dataStoreProvider.insert":{capName:`data-store-provider`,capScope:`system`,addonId:null,access:`create`},"dataStoreProvider.insertMany":{capName:`data-store-provider`,capScope:`system`,addonId:null,access:`create`},"dataStoreProvider.isEmpty":{capName:`data-store-provider`,capScope:`system`,addonId:null,access:`view`},"dataStoreProvider.query":{capName:`data-store-provider`,capScope:`system`,addonId:null,access:`view`},"dataStoreProvider.set":{capName:`data-store-provider`,capScope:`system`,addonId:null,access:`create`},"dataStoreProvider.update":{capName:`data-store-provider`,capScope:`system`,addonId:null,access:`create`},"dataStoreProvider.updateWhere":{capName:`data-store-provider`,capScope:`system`,addonId:null,access:`create`},"dataStoreProvider.upsert":{capName:`data-store-provider`,capScope:`system`,addonId:null,access:`create`},"dayNight.getOptions":{capName:`day-night`,capScope:`device`,addonId:null,access:`view`},"dayNight.getStatus":{capName:`day-night`,capScope:`device`,addonId:null,access:`view`},"dayNight.setSettings":{capName:`day-night`,capScope:`device`,addonId:null,access:`create`},"decoder.getInfo":{capName:`decoder`,capScope:`system`,addonId:null,access:`view`},"decoder.reprobeHwaccel":{capName:`decoder`,capScope:`system`,addonId:null,access:`create`},"detectionPipeline.applyDeviceSettingsPatch":{capName:`detection-pipeline`,capScope:`device`,addonId:null,access:`create`},"detectionPipeline.getDeviceLiveContribution":{capName:`detection-pipeline`,capScope:`device`,addonId:null,access:`view`},"detectionPipeline.getDeviceSettingsContribution":{capName:`detection-pipeline`,capScope:`device`,addonId:null,access:`view`},"deviceAdminLink.getAdminLink":{capName:`device-admin-link`,capScope:`device`,addonId:null,access:`view`},"deviceAdoption.adopt":{capName:`device-adoption`,capScope:`system`,addonId:null,access:`create`},"deviceAdoption.getCandidate":{capName:`device-adoption`,capScope:`system`,addonId:null,access:`view`},"deviceAdoption.getStatus":{capName:`device-adoption`,capScope:`system`,addonId:null,access:`view`},"deviceAdoption.listCandidateFilters":{capName:`device-adoption`,capScope:`system`,addonId:null,access:`view`},"deviceAdoption.listCandidates":{capName:`device-adoption`,capScope:`system`,addonId:null,access:`view`},"deviceAdoption.refresh":{capName:`device-adoption`,capScope:`system`,addonId:null,access:`create`},"deviceAdoption.release":{capName:`device-adoption`,capScope:`system`,addonId:null,access:`create`},"deviceAdoption.resync":{capName:`device-adoption`,capScope:`system`,addonId:null,access:`create`},"deviceDiscovery.adoptDevice":{capName:`device-discovery`,capScope:`device`,addonId:null,access:`create`},"deviceDiscovery.getStatus":{capName:`device-discovery`,capScope:`device`,addonId:null,access:`view`},"deviceDiscovery.listDiscovered":{capName:`device-discovery`,capScope:`device`,addonId:null,access:`view`},"deviceDiscovery.refreshDiscovery":{capName:`device-discovery`,capScope:`device`,addonId:null,access:`create`},"deviceDiscovery.releaseDevice":{capName:`device-discovery`,capScope:`device`,addonId:null,access:`create`},"deviceExport.applyDeviceSettingsPatch":{capName:`device-export`,capScope:`system`,addonId:null,access:`create`},"deviceExport.exposeDevice":{capName:`device-export`,capScope:`system`,addonId:null,access:`create`},"deviceExport.getDeviceLiveContribution":{capName:`device-export`,capScope:`system`,addonId:null,access:`view`},"deviceExport.getDeviceSettingsContribution":{capName:`device-export`,capScope:`system`,addonId:null,access:`view`},"deviceExport.getStatus":{capName:`device-export`,capScope:`system`,addonId:null,access:`view`},"deviceExport.listExposedDevices":{capName:`device-export`,capScope:`system`,addonId:null,access:`view`},"deviceExport.listSupportedDeviceKinds":{capName:`device-export`,capScope:`system`,addonId:null,access:`view`},"deviceExport.unexposeDevice":{capName:`device-export`,capScope:`system`,addonId:null,access:`create`},"deviceExtension.listCandidates":{capName:`device-extension`,capScope:`device`,addonId:null,access:`view`},"deviceExtension.listSlots":{capName:`device-extension`,capScope:`device`,addonId:null,access:`view`},"deviceExtension.listSources":{capName:`device-extension`,capScope:`device`,addonId:null,access:`view`},"deviceExtension.setSlot":{capName:`device-extension`,capScope:`device`,addonId:null,access:`create`},"deviceManager.addLocation":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.adoptDevice":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.adoptionAdopt":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.adoptionCancelJob":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.adoptionListCandidateFilters":{capName:`device-manager`,capScope:`system`,addonId:null,access:`view`},"deviceManager.adoptionListCandidates":{capName:`device-manager`,capScope:`system`,addonId:null,access:`view`},"deviceManager.adoptionListJobs":{capName:`device-manager`,capScope:`system`,addonId:null,access:`view`},"deviceManager.adoptionRefresh":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.adoptionRelease":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.adoptionResync":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.adoptionStartJob":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.allocateDeviceId":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.applyInitialMeta":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.createDevice":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.disable":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.discoverAllProviders":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.discoverDevices":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.discoverProvider":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.discoveryProviders":{capName:`device-manager`,capScope:`system`,addonId:null,access:`view`},"deviceManager.enable":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.getAllBindings":{capName:`device-manager`,capScope:`system`,addonId:null,access:`view`},"deviceManager.getBindings":{capName:`device-manager`,capScope:`system`,addonId:null,access:`view`},"deviceManager.getBindingsBatch":{capName:`device-manager`,capScope:`system`,addonId:null,access:`view`},"deviceManager.getChildren":{capName:`device-manager`,capScope:`system`,addonId:null,access:`view`},"deviceManager.getChildrenBatch":{capName:`device-manager`,capScope:`system`,addonId:null,access:`view`},"deviceManager.getConfigSchema":{capName:`device-manager`,capScope:`system`,addonId:null,access:`view`},"deviceManager.getCreationSchema":{capName:`device-manager`,capScope:`system`,addonId:null,access:`view`},"deviceManager.getDevice":{capName:`device-manager`,capScope:`system`,addonId:null,access:`view`},"deviceManager.getDeviceAggregate":{capName:`device-manager`,capScope:`system`,addonId:null,access:`view`},"deviceManager.getDeviceLiveInfoAggregate":{capName:`device-manager`,capScope:`system`,addonId:null,access:`view`},"deviceManager.getDeviceSettingsAggregate":{capName:`device-manager`,capScope:`system`,addonId:null,access:`view`},"deviceManager.getDeviceStatusAggregate":{capName:`device-manager`,capScope:`system`,addonId:null,access:`view`},"deviceManager.getDeviceStatusAggregateBatch":{capName:`device-manager`,capScope:`system`,addonId:null,access:`view`},"deviceManager.getLinkedDevices":{capName:`device-manager`,capScope:`system`,addonId:null,access:`view`},"deviceManager.getLinkedDevicesBatch":{capName:`device-manager`,capScope:`system`,addonId:null,access:`view`},"deviceManager.getRoleDisplayDefaults":{capName:`device-manager`,capScope:`system`,addonId:null,access:`view`},"deviceManager.getSettingsSchema":{capName:`device-manager`,capScope:`system`,addonId:null,access:`view`},"deviceManager.getStreamProfileMap":{capName:`device-manager`,capScope:`system`,addonId:null,access:`view`},"deviceManager.getStreamSources":{capName:`device-manager`,capScope:`system`,addonId:null,access:`view`},"deviceManager.getWireableFields":{capName:`device-manager`,capScope:`system`,addonId:null,access:`view`},"deviceManager.getWrapperActivation":{capName:`device-manager`,capScope:`system`,addonId:null,access:`view`},"deviceManager.listAll":{capName:`device-manager`,capScope:`system`,addonId:null,access:`view`},"deviceManager.listBindableCapsForDeviceType":{capName:`device-manager`,capScope:`system`,addonId:null,access:`view`},"deviceManager.listDeviceIdsByCaps":{capName:`device-manager`,capScope:`system`,addonId:null,access:`view`},"deviceManager.listLocationDescriptions":{capName:`device-manager`,capScope:`system`,addonId:null,access:`view`},"deviceManager.listLocationIcons":{capName:`device-manager`,capScope:`system`,addonId:null,access:`view`},"deviceManager.listLocations":{capName:`device-manager`,capScope:`system`,addonId:null,access:`view`},"deviceManager.listPersistedByAddon":{capName:`device-manager`,capScope:`system`,addonId:null,access:`view`},"deviceManager.listSiteZones":{capName:`device-manager`,capScope:`system`,addonId:null,access:`view`},"deviceManager.listWrappersForCap":{capName:`device-manager`,capScope:`system`,addonId:null,access:`view`},"deviceManager.loadConfig":{capName:`device-manager`,capScope:`system`,addonId:null,access:`view`},"deviceManager.loadMeta":{capName:`device-manager`,capScope:`system`,addonId:null,access:`view`},"deviceManager.loadRuntimeState":{capName:`device-manager`,capScope:`system`,addonId:null,access:`view`},"deviceManager.migrateDevice":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.persistConfig":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.probeStreams":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.providerCreationType":{capName:`device-manager`,capScope:`system`,addonId:null,access:`view`},"deviceManager.providerDiscoveryParamsSchema":{capName:`device-manager`,capScope:`system`,addonId:null,access:`view`},"deviceManager.registerDevice":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.remove":{capName:`device-manager`,capScope:`system`,addonId:null,access:`delete`},"deviceManager.removeByIntegration":{capName:`device-manager`,capScope:`system`,addonId:null,access:`delete`},"deviceManager.removeDevice":{capName:`device-manager`,capScope:`system`,addonId:null,access:`delete`},"deviceManager.removeLocation":{capName:`device-manager`,capScope:`system`,addonId:null,access:`delete`},"deviceManager.removeSiteZone":{capName:`device-manager`,capScope:`system`,addonId:null,access:`delete`},"deviceManager.renameLocation":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.renameSiteZone":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.runDeviceAction":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.setChildLayout":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.setDisabled":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.setDisplay":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.setIntegrationId":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.setLinkDeviceId":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.setLocation":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.setLocationDescription":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.setLocationIcon":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.setLocationZone":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.setMetadata":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.setName":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.setPrimaryChildEntityId":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.setRole":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.setRoleDisplayDefaults":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.setSiteZone":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.setStreamProfileMap":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.setType":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.setWrapperActive":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.testCreationField":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.testField":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.updateConfig":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.updateDeviceField":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.updateDeviceFieldsBatch":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceOps.getConfigEntries":{capName:`device-ops`,capScope:`device`,addonId:null,access:`view`},"deviceOps.getRawState":{capName:`device-ops`,capScope:`device`,addonId:null,access:`view`},"deviceOps.getSettingsSchema":{capName:`device-ops`,capScope:`device`,addonId:null,access:`view`},"deviceOps.getStreamSources":{capName:`device-ops`,capScope:`device`,addonId:null,access:`view`},"deviceOps.removeDevice":{capName:`device-ops`,capScope:`device`,addonId:null,access:`delete`},"deviceOps.runAction":{capName:`device-ops`,capScope:`device`,addonId:null,access:`create`},"deviceOps.setConfig":{capName:`device-ops`,capScope:`device`,addonId:null,access:`create`},"deviceProvider.adoptDiscoveredDevice":{capName:`device-provider`,capScope:`system`,addonId:null,access:`create`},"deviceProvider.createDevice":{capName:`device-provider`,capScope:`system`,addonId:null,access:`create`},"deviceProvider.discoverDevices":{capName:`device-provider`,capScope:`system`,addonId:null,access:`create`},"deviceProvider.getChildCreationSchema":{capName:`device-provider`,capScope:`system`,addonId:null,access:`view`},"deviceProvider.getDevices":{capName:`device-provider`,capScope:`system`,addonId:null,access:`view`},"deviceProvider.getDiscoveryParamsSchema":{capName:`device-provider`,capScope:`system`,addonId:null,access:`view`},"deviceProvider.getManualCreationType":{capName:`device-provider`,capScope:`system`,addonId:null,access:`view`},"deviceProvider.getStatus":{capName:`device-provider`,capScope:`system`,addonId:null,access:`view`},"deviceProvider.reloadDevice":{capName:`device-provider`,capScope:`system`,addonId:null,access:`create`},"deviceProvider.start":{capName:`device-provider`,capScope:`system`,addonId:null,access:`create`},"deviceProvider.stop":{capName:`device-provider`,capScope:`system`,addonId:null,access:`create`},"deviceProvider.supportsDiscovery":{capName:`device-provider`,capScope:`system`,addonId:null,access:`view`},"deviceProvider.supportsManualCreation":{capName:`device-provider`,capScope:`system`,addonId:null,access:`view`},"deviceProvider.testCreationField":{capName:`device-provider`,capScope:`system`,addonId:null,access:`create`},"deviceState.claimFields":{capName:`device-state`,capScope:`system`,addonId:null,access:`create`},"deviceState.getAllSnapshots":{capName:`device-state`,capScope:`system`,addonId:null,access:`view`},"deviceState.getCapSlice":{capName:`device-state`,capScope:`system`,addonId:null,access:`view`},"deviceState.getNativeCapSlice":{capName:`device-state`,capScope:`system`,addonId:null,access:`view`},"deviceState.getSnapshot":{capName:`device-state`,capScope:`system`,addonId:null,access:`view`},"deviceState.listClaims":{capName:`device-state`,capScope:`system`,addonId:null,access:`view`},"deviceState.patchOwnedFields":{capName:`device-state`,capScope:`system`,addonId:null,access:`create`},"deviceState.releaseClaim":{capName:`device-state`,capScope:`system`,addonId:null,access:`create`},"deviceState.setCapSlice":{capName:`device-state`,capScope:`system`,addonId:null,access:`create`},"deviceStatus.getStatus":{capName:`device-status`,capScope:`device`,addonId:null,access:`view`},"doorbell.getStatus":{capName:`doorbell`,capScope:`device`,addonId:null,access:`view`},"embeddingEncoder.encode":{capName:`embedding-encoder`,capScope:`system`,addonId:null,access:`view`},"embeddingEncoder.encodeText":{capName:`embedding-encoder`,capScope:`system`,addonId:null,access:`view`},"embeddingEncoder.getInfo":{capName:`embedding-encoder`,capScope:`system`,addonId:null,access:`view`},"embeddingEncoder.resetFailedModels":{capName:`embedding-encoder`,capScope:`system`,addonId:null,access:`delete`},"enumSensor.getStatus":{capName:`enum-sensor`,capScope:`device`,addonId:null,access:`view`},"eventEmitter.getStatus":{capName:`event-emitter`,capScope:`device`,addonId:null,access:`view`},"faceGallery.assignFace":{capName:`face-gallery`,capScope:`system`,addonId:null,access:`create`},"faceGallery.assignFaces":{capName:`face-gallery`,capScope:`system`,addonId:null,access:`create`},"faceGallery.auditIdentitySamples":{capName:`face-gallery`,capScope:`system`,addonId:null,access:`view`},"faceGallery.createIdentity":{capName:`face-gallery`,capScope:`system`,addonId:null,access:`create`},"faceGallery.deleteFace":{capName:`face-gallery`,capScope:`system`,addonId:null,access:`delete`},"faceGallery.deleteIdentity":{capName:`face-gallery`,capScope:`system`,addonId:null,access:`delete`},"faceGallery.getFaceByTrack":{capName:`face-gallery`,capScope:`system`,addonId:null,access:`view`},"faceGallery.getFaceMedia":{capName:`face-gallery`,capScope:`system`,addonId:null,access:`view`},"faceGallery.listIdentities":{capName:`face-gallery`,capScope:`system`,addonId:null,access:`view`},"faceGallery.listIdentitySamples":{capName:`face-gallery`,capScope:`system`,addonId:null,access:`view`},"faceGallery.listRecentFaces":{capName:`face-gallery`,capScope:`system`,addonId:null,access:`view`},"faceGallery.removeSample":{capName:`face-gallery`,capScope:`system`,addonId:null,access:`delete`},"faceGallery.renameIdentity":{capName:`face-gallery`,capScope:`system`,addonId:null,access:`create`},"faceGallery.suggestFaceClusters":{capName:`face-gallery`,capScope:`system`,addonId:null,access:`view`},"faceGallery.unassignFace":{capName:`face-gallery`,capScope:`system`,addonId:null,access:`create`},"faceGallery.unassignFaces":{capName:`face-gallery`,capScope:`system`,addonId:null,access:`create`},"failureContribution.list":{capName:`failure-contribution`,capScope:`system`,addonId:null,access:`view`},"fanControl.getStatus":{capName:`fan-control`,capScope:`device`,addonId:null,access:`view`},"fanControl.setDirection":{capName:`fan-control`,capScope:`device`,addonId:null,access:`create`},"fanControl.setOscillating":{capName:`fan-control`,capScope:`device`,addonId:null,access:`create`},"fanControl.setPercentage":{capName:`fan-control`,capScope:`device`,addonId:null,access:`create`},"fanControl.setPreset":{capName:`fan-control`,capScope:`device`,addonId:null,access:`create`},"featureProbe.getStatus":{capName:`feature-probe`,capScope:`device`,addonId:null,access:`view`},"filesystemBrowse.browse":{capName:`filesystem-browse`,capScope:`system`,addonId:null,access:`view`},"filesystemBrowse.createDir":{capName:`filesystem-browse`,capScope:`system`,addonId:null,access:`create`},"filesystemBrowse.listAllowedRoots":{capName:`filesystem-browse`,capScope:`system`,addonId:null,access:`view`},"flood.getStatus":{capName:`flood`,capScope:`device`,addonId:null,access:`view`},"gas.getStatus":{capName:`gas`,capScope:`device`,addonId:null,access:`view`},"humidifier.getStatus":{capName:`humidifier`,capScope:`device`,addonId:null,access:`view`},"humidifier.setMode":{capName:`humidifier`,capScope:`device`,addonId:null,access:`create`},"humidifier.setOn":{capName:`humidifier`,capScope:`device`,addonId:null,access:`create`},"humidifier.setTargetHumidity":{capName:`humidifier`,capScope:`device`,addonId:null,access:`create`},"humiditySensor.getStatus":{capName:`humidity-sensor`,capScope:`device`,addonId:null,access:`view`},"image.getStatus":{capName:`image`,capScope:`device`,addonId:null,access:`view`},"imageSettings.getOptions":{capName:`image-settings`,capScope:`device`,addonId:null,access:`view`},"imageSettings.getStatus":{capName:`image-settings`,capScope:`device`,addonId:null,access:`view`},"imageSettings.setSettings":{capName:`image-settings`,capScope:`device`,addonId:null,access:`create`},"integrations.create":{capName:`integrations`,capScope:`system`,addonId:null,access:`create`},"integrations.delete":{capName:`integrations`,capScope:`system`,addonId:null,access:`delete`},"integrations.get":{capName:`integrations`,capScope:`system`,addonId:null,access:`view`},"integrations.getAvailableTypes":{capName:`integrations`,capScope:`system`,addonId:null,access:`view`},"integrations.getByAddonId":{capName:`integrations`,capScope:`system`,addonId:null,access:`view`},"integrations.getSettings":{capName:`integrations`,capScope:`system`,addonId:null,access:`view`},"integrations.list":{capName:`integrations`,capScope:`system`,addonId:null,access:`view`},"integrations.setSettings":{capName:`integrations`,capScope:`system`,addonId:null,access:`create`},"integrations.testConnection":{capName:`integrations`,capScope:`system`,addonId:null,access:`create`},"integrations.update":{capName:`integrations`,capScope:`system`,addonId:null,access:`create`},"intercom.endTalkSession":{capName:`intercom`,capScope:`device`,addonId:null,access:`create`},"intercom.getStatus":{capName:`intercom`,capScope:`device`,addonId:null,access:`view`},"intercom.handleAnswer":{capName:`intercom`,capScope:`device`,addonId:null,access:`create`},"intercom.pushTalkAudio":{capName:`intercom`,capScope:`device`,addonId:null,access:`create`},"intercom.startSession":{capName:`intercom`,capScope:`device`,addonId:null,access:`create`},"intercom.startTalkSession":{capName:`intercom`,capScope:`device`,addonId:null,access:`create`},"intercom.stopSession":{capName:`intercom`,capScope:`device`,addonId:null,access:`create`},"keychain.delete":{capName:`keychain`,capScope:`system`,addonId:null,access:`delete`},"keychain.getState":{capName:`keychain`,capScope:`system`,addonId:null,access:`view`},"keychain.listMeta":{capName:`keychain`,capScope:`system`,addonId:null,access:`view`},"keychain.put":{capName:`keychain`,capScope:`system`,addonId:null,access:`create`},"keychain.resolve":{capName:`keychain`,capScope:`system`,addonId:null,access:`view`},"keychainAdmin.deleteOrphans":{capName:`keychain-admin`,capScope:`system`,addonId:null,access:`delete`},"keychainAdmin.downloadRecoveryKey":{capName:`keychain-admin`,capScope:`system`,addonId:null,access:`create`},"keychainAdmin.listAudit":{capName:`keychain-admin`,capScope:`system`,addonId:null,access:`view`},"keychainAdmin.listSecrets":{capName:`keychain-admin`,capScope:`system`,addonId:null,access:`view`},"keychainAdmin.purgeRetiredKeys":{capName:`keychain-admin`,capScope:`system`,addonId:null,access:`delete`},"keychainAdmin.resetKeychain":{capName:`keychain-admin`,capScope:`system`,addonId:null,access:`delete`},"keychainAdmin.reveal":{capName:`keychain-admin`,capScope:`system`,addonId:null,access:`create`},"keychainAdmin.rotateMasterKey":{capName:`keychain-admin`,capScope:`system`,addonId:null,access:`create`},"keychainAdmin.setSystemSecret":{capName:`keychain-admin`,capScope:`system`,addonId:null,access:`create`},"keychainAdmin.status":{capName:`keychain-admin`,capScope:`system`,addonId:null,access:`view`},"lawnMowerControl.dock":{capName:`lawn-mower-control`,capScope:`device`,addonId:null,access:`create`},"lawnMowerControl.getStatus":{capName:`lawn-mower-control`,capScope:`device`,addonId:null,access:`view`},"lawnMowerControl.pause":{capName:`lawn-mower-control`,capScope:`device`,addonId:null,access:`create`},"lawnMowerControl.startMowing":{capName:`lawn-mower-control`,capScope:`device`,addonId:null,access:`create`},"llm.cancel":{capName:`llm`,capScope:`system`,addonId:null,access:`create`},"llm.deleteModel":{capName:`llm`,capScope:`system`,addonId:null,access:`delete`},"llm.deleteProfile":{capName:`llm`,capScope:`system`,addonId:null,access:`delete`},"llm.generate":{capName:`llm`,capScope:`system`,addonId:null,access:`create`},"llm.generateVision":{capName:`llm`,capScope:`system`,addonId:null,access:`create`},"llm.getDefaults":{capName:`llm`,capScope:`system`,addonId:null,access:`view`},"llm.getRuntimeStatus":{capName:`llm`,capScope:`system`,addonId:null,access:`view`},"llm.getUsage":{capName:`llm`,capScope:`system`,addonId:null,access:`view`},"llm.installModel":{capName:`llm`,capScope:`system`,addonId:null,access:`create`},"llm.listModelCatalog":{capName:`llm`,capScope:`system`,addonId:null,access:`view`},"llm.listModels":{capName:`llm`,capScope:`system`,addonId:null,access:`view`},"llm.listNodeModels":{capName:`llm`,capScope:`system`,addonId:null,access:`view`},"llm.listProfileKinds":{capName:`llm`,capScope:`system`,addonId:null,access:`view`},"llm.listProfiles":{capName:`llm`,capScope:`system`,addonId:null,access:`view`},"llm.listRuntimeNodes":{capName:`llm`,capScope:`system`,addonId:null,access:`view`},"llm.resolveModelRef":{capName:`llm`,capScope:`system`,addonId:null,access:`create`},"llm.setDefault":{capName:`llm`,capScope:`system`,addonId:null,access:`create`},"llm.startRuntime":{capName:`llm`,capScope:`system`,addonId:null,access:`create`},"llm.stopRuntime":{capName:`llm`,capScope:`system`,addonId:null,access:`create`},"llm.testProfile":{capName:`llm`,capScope:`system`,addonId:null,access:`create`},"llm.upsertProfile":{capName:`llm`,capScope:`system`,addonId:null,access:`create`},"llmRuntime.appleAvailability":{capName:`llm-runtime`,capScope:`system`,addonId:null,access:`view`},"llmRuntime.cancel":{capName:`llm-runtime`,capScope:`system`,addonId:null,access:`create`},"llmRuntime.complete":{capName:`llm-runtime`,capScope:`system`,addonId:null,access:`create`},"llmRuntime.completeApple":{capName:`llm-runtime`,capScope:`system`,addonId:null,access:`create`},"llmRuntime.deleteModel":{capName:`llm-runtime`,capScope:`system`,addonId:null,access:`delete`},"llmRuntime.ensureStarted":{capName:`llm-runtime`,capScope:`system`,addonId:null,access:`create`},"llmRuntime.getDiskUsage":{capName:`llm-runtime`,capScope:`system`,addonId:null,access:`view`},"llmRuntime.installModel":{capName:`llm-runtime`,capScope:`system`,addonId:null,access:`create`},"llmRuntime.listLocalModels":{capName:`llm-runtime`,capScope:`system`,addonId:null,access:`view`},"llmRuntime.status":{capName:`llm-runtime`,capScope:`system`,addonId:null,access:`view`},"llmRuntime.stop":{capName:`llm-runtime`,capScope:`system`,addonId:null,access:`create`},"loadContribution.list":{capName:`load-contribution`,capScope:`system`,addonId:null,access:`view`},"localNetwork.addCustomAddress":{capName:`local-network`,capScope:`system`,addonId:null,access:`create`},"localNetwork.downloadCa":{capName:`local-network`,capScope:`system`,addonId:null,access:`view`},"localNetwork.getAddresses":{capName:`local-network`,capScope:`system`,addonId:null,access:`view`},"localNetwork.getAllowedAddresses":{capName:`local-network`,capScope:`system`,addonId:null,access:`view`},"localNetwork.getConnectionEndpoints":{capName:`local-network`,capScope:`system`,addonId:null,access:`view`},"localNetwork.getHubAddresses":{capName:`local-network`,capScope:`system`,addonId:null,access:`view`},"localNetwork.getNotificationEndpoint":{capName:`local-network`,capScope:`system`,addonId:null,access:`view`},"localNetwork.getPreferred":{capName:`local-network`,capScope:`system`,addonId:null,access:`view`},"localNetwork.getTlsStatus":{capName:`local-network`,capScope:`system`,addonId:null,access:`view`},"localNetwork.getViewerEndpoints":{capName:`local-network`,capScope:`system`,addonId:null,access:`view`},"localNetwork.list":{capName:`local-network`,capScope:`system`,addonId:null,access:`view`},"localNetwork.regenerateCertificate":{capName:`local-network`,capScope:`system`,addonId:null,access:`create`},"localNetwork.removeCustomAddress":{capName:`local-network`,capScope:`system`,addonId:null,access:`delete`},"localNetwork.resetAllowlistToBestMatch":{capName:`local-network`,capScope:`system`,addonId:null,access:`delete`},"localNetwork.revertToGeneratedCertificate":{capName:`local-network`,capScope:`system`,addonId:null,access:`create`},"localNetwork.setAddressRole":{capName:`local-network`,capScope:`system`,addonId:null,access:`create`},"localNetwork.setAllowedAddresses":{capName:`local-network`,capScope:`system`,addonId:null,access:`create`},"localNetwork.setNotificationEndpoint":{capName:`local-network`,capScope:`system`,addonId:null,access:`create`},"localNetwork.setViewerEndpoints":{capName:`local-network`,capScope:`system`,addonId:null,access:`create`},"localNetwork.uploadCertificate":{capName:`local-network`,capScope:`system`,addonId:null,access:`create`},"lockControl.getStatus":{capName:`lock-control`,capScope:`device`,addonId:null,access:`view`},"lockControl.lock":{capName:`lock-control`,capScope:`device`,addonId:null,access:`create`},"lockControl.open":{capName:`lock-control`,capScope:`device`,addonId:null,access:`create`},"lockControl.unlock":{capName:`lock-control`,capScope:`device`,addonId:null,access:`create`},"logChannels.apply":{capName:`log-channels`,capScope:`system`,addonId:null,access:`create`},"logChannels.list":{capName:`log-channels`,capScope:`system`,addonId:null,access:`view`},"logDestination.query":{capName:`log-destination`,capScope:`system`,addonId:null,access:`view`},"logDestination.write":{capName:`log-destination`,capScope:`system`,addonId:null,access:`create`},"loginMethod.getLoginMethods":{capName:`login-method`,capScope:`system`,addonId:null,access:`view`},"mediaPlayer.getStatus":{capName:`media-player`,capScope:`device`,addonId:null,access:`view`},"mediaPlayer.next":{capName:`media-player`,capScope:`device`,addonId:null,access:`create`},"mediaPlayer.pause":{capName:`media-player`,capScope:`device`,addonId:null,access:`create`},"mediaPlayer.play":{capName:`media-player`,capScope:`device`,addonId:null,access:`create`},"mediaPlayer.playMedia":{capName:`media-player`,capScope:`device`,addonId:null,access:`create`},"mediaPlayer.previous":{capName:`media-player`,capScope:`device`,addonId:null,access:`create`},"mediaPlayer.seek":{capName:`media-player`,capScope:`device`,addonId:null,access:`create`},"mediaPlayer.selectSource":{capName:`media-player`,capScope:`device`,addonId:null,access:`create`},"mediaPlayer.setMute":{capName:`media-player`,capScope:`device`,addonId:null,access:`create`},"mediaPlayer.setRepeat":{capName:`media-player`,capScope:`device`,addonId:null,access:`create`},"mediaPlayer.setShuffle":{capName:`media-player`,capScope:`device`,addonId:null,access:`create`},"mediaPlayer.setVolume":{capName:`media-player`,capScope:`device`,addonId:null,access:`create`},"mediaPlayer.stop":{capName:`media-player`,capScope:`device`,addonId:null,access:`create`},"meshNetwork.getStatus":{capName:`mesh-network`,capScope:`system`,addonId:null,access:`view`},"meshNetwork.join":{capName:`mesh-network`,capScope:`system`,addonId:null,access:`create`},"meshNetwork.leave":{capName:`mesh-network`,capScope:`system`,addonId:null,access:`create`},"meshNetwork.listPeers":{capName:`mesh-network`,capScope:`system`,addonId:null,access:`view`},"meshNetwork.logout":{capName:`mesh-network`,capScope:`system`,addonId:null,access:`create`},"meshNetwork.startLogin":{capName:`mesh-network`,capScope:`system`,addonId:null,access:`create`},"meshNetwork.testConnection":{capName:`mesh-network`,capScope:`system`,addonId:null,access:`create`},"metricsProvider.collectSnapshot":{capName:`metrics-provider`,capScope:`system`,addonId:null,access:`view`},"metricsProvider.getAddonStats":{capName:`metrics-provider`,capScope:`system`,addonId:null,access:`view`},"metricsProvider.getCached":{capName:`metrics-provider`,capScope:`system`,addonId:null,access:`view`},"metricsProvider.getCpuTemperature":{capName:`metrics-provider`,capScope:`system`,addonId:null,access:`view`},"metricsProvider.getCurrent":{capName:`metrics-provider`,capScope:`system`,addonId:null,access:`view`},"metricsProvider.getDiskSpace":{capName:`metrics-provider`,capScope:`system`,addonId:null,access:`view`},"metricsProvider.getGpuInfo":{capName:`metrics-provider`,capScope:`system`,addonId:null,access:`view`},"metricsProvider.getLoadSeries":{capName:`metrics-provider`,capScope:`system`,addonId:null,access:`view`},"metricsProvider.getProcessStats":{capName:`metrics-provider`,capScope:`system`,addonId:null,access:`view`},"metricsProvider.listAddonInstances":{capName:`metrics-provider`,capScope:`system`,addonId:null,access:`view`},"metricsProvider.listNodeProcesses":{capName:`metrics-provider`,capScope:`system`,addonId:null,access:`view`},"modelConvert.convert":{capName:`model-convert`,capScope:`system`,addonId:null,access:`create`},"modelDistributor.distributeModel":{capName:`model-distributor`,capScope:`system`,addonId:null,access:`create`},"motion.getStatus":{capName:`motion`,capScope:`device`,addonId:null,access:`view`},"motion.isDetected":{capName:`motion`,capScope:`device`,addonId:null,access:`view`},"motionDetection.analyze":{capName:`motion-detection`,capScope:`device`,addonId:null,access:`create`},"motionDetection.applyDeviceSettingsPatch":{capName:`motion-detection`,capScope:`device`,addonId:null,access:`create`},"motionDetection.getDeviceLiveContribution":{capName:`motion-detection`,capScope:`device`,addonId:null,access:`view`},"motionDetection.getDeviceSettingsContribution":{capName:`motion-detection`,capScope:`device`,addonId:null,access:`view`},"motionDetection.removeCamera":{capName:`motion-detection`,capScope:`device`,addonId:null,access:`delete`},"motionDetection.reset":{capName:`motion-detection`,capScope:`device`,addonId:null,access:`delete`},"motionTrigger.getStatus":{capName:`motion-trigger`,capScope:`device`,addonId:null,access:`view`},"motionTrigger.setMotionTrigger":{capName:`motion-trigger`,capScope:`device`,addonId:null,access:`create`},"motionZones.getOptions":{capName:`motion-zones`,capScope:`device`,addonId:null,access:`view`},"motionZones.getStatus":{capName:`motion-zones`,capScope:`device`,addonId:null,access:`view`},"motionZones.setZone":{capName:`motion-zones`,capScope:`device`,addonId:null,access:`create`},"mqttBroker.addBroker":{capName:`mqtt-broker`,capScope:`system`,addonId:null,access:`create`},"mqttBroker.getBrokerConfig":{capName:`mqtt-broker`,capScope:`system`,addonId:null,access:`view`},"mqttBroker.getStatus":{capName:`mqtt-broker`,capScope:`system`,addonId:null,access:`view`},"mqttBroker.listBrokers":{capName:`mqtt-broker`,capScope:`system`,addonId:null,access:`view`},"mqttBroker.removeBroker":{capName:`mqtt-broker`,capScope:`system`,addonId:null,access:`delete`},"mqttBroker.startEmbeddedBroker":{capName:`mqtt-broker`,capScope:`system`,addonId:null,access:`create`},"mqttBroker.stopEmbeddedBroker":{capName:`mqtt-broker`,capScope:`system`,addonId:null,access:`create`},"mqttBroker.testConnection":{capName:`mqtt-broker`,capScope:`system`,addonId:null,access:`create`},"nativeObjectDetection.getOptions":{capName:`native-object-detection`,capScope:`device`,addonId:null,access:`view`},"nativeObjectDetection.getStatus":{capName:`native-object-detection`,capScope:`device`,addonId:null,access:`view`},"nativeObjectDetection.setEnabled":{capName:`native-object-detection`,capScope:`device`,addonId:null,access:`create`},"nativeObjectDetection.setSettings":{capName:`native-object-detection`,capScope:`device`,addonId:null,access:`create`},"navigation.getFeatures":{capName:`navigation`,capScope:`device`,addonId:null,access:`view`},"navigation.getStatus":{capName:`navigation`,capScope:`device`,addonId:null,access:`view`},"navigation.goToPoint":{capName:`navigation`,capScope:`device`,addonId:null,access:`create`},"navigation.listActions":{capName:`navigation`,capScope:`device`,addonId:null,access:`view`},"navigation.move":{capName:`navigation`,capScope:`device`,addonId:null,access:`create`},"navigation.playSound":{capName:`navigation`,capScope:`device`,addonId:null,access:`create`},"navigation.runAction":{capName:`navigation`,capScope:`device`,addonId:null,access:`create`},"navigation.setLightLevel":{capName:`navigation`,capScope:`device`,addonId:null,access:`create`},"navigation.setLightMode":{capName:`navigation`,capScope:`device`,addonId:null,access:`create`},"navigation.setLightOn":{capName:`navigation`,capScope:`device`,addonId:null,access:`create`},"navigation.stop":{capName:`navigation`,capScope:`device`,addonId:null,access:`create`},"networkAccess.getEndpoint":{capName:`network-access`,capScope:`system`,addonId:null,access:`view`},"networkAccess.getStatus":{capName:`network-access`,capScope:`system`,addonId:null,access:`view`},"networkAccess.listEndpoints":{capName:`network-access`,capScope:`system`,addonId:null,access:`view`},"networkAccess.start":{capName:`network-access`,capScope:`system`,addonId:null,access:`create`},"networkAccess.stop":{capName:`network-access`,capScope:`system`,addonId:null,access:`create`},"networkLink.getStatus":{capName:`network-link`,capScope:`device`,addonId:null,access:`view`},"networkQuality.getAllStats":{capName:`network-quality`,capScope:`system`,addonId:null,access:`view`},"networkQuality.getDeviceStats":{capName:`network-quality`,capScope:`system`,addonId:null,access:`view`},"networkQuality.reportClientStats":{capName:`network-quality`,capScope:`system`,addonId:null,access:`create`},"nodes.clusterAddonStatus":{capName:`nodes`,capScope:`system`,addonId:null,access:`view`},"nodes.deployAddon":{capName:`nodes`,capScope:`system`,addonId:null,access:`create`},"nodes.directory":{capName:`nodes`,capScope:`system`,addonId:null,access:`view`},"nodes.executeQuery":{capName:`nodes`,capScope:`system`,addonId:null,access:`create`},"nodes.getCapUsageGraph":{capName:`nodes`,capScope:`system`,addonId:null,access:`view`},"nodes.getNodeAddons":{capName:`nodes`,capScope:`system`,addonId:null,access:`view`},"nodes.renameNode":{capName:`nodes`,capScope:`system`,addonId:null,access:`create`},"nodes.restartAddon":{capName:`nodes`,capScope:`system`,addonId:null,access:`create`},"nodes.restartNode":{capName:`nodes`,capScope:`system`,addonId:null,access:`create`},"nodes.restartProcess":{capName:`nodes`,capScope:`system`,addonId:null,access:`create`},"nodes.setProcessLogLevel":{capName:`nodes`,capScope:`system`,addonId:null,access:`create`},"nodes.shutdownNode":{capName:`nodes`,capScope:`system`,addonId:null,access:`create`},"nodes.topology":{capName:`nodes`,capScope:`system`,addonId:null,access:`view`},"nodes.undeployAddon":{capName:`nodes`,capScope:`system`,addonId:null,access:`create`},"notificationOutput.deleteTarget":{capName:`notification-output`,capScope:`system`,addonId:null,access:`delete`},"notificationOutput.discoverTargets":{capName:`notification-output`,capScope:`system`,addonId:null,access:`view`},"notificationOutput.getTarget":{capName:`notification-output`,capScope:`system`,addonId:null,access:`view`},"notificationOutput.listTargetKinds":{capName:`notification-output`,capScope:`system`,addonId:null,access:`view`},"notificationOutput.listTargets":{capName:`notification-output`,capScope:`system`,addonId:null,access:`view`},"notificationOutput.probeTargetConfig":{capName:`notification-output`,capScope:`system`,addonId:null,access:`create`},"notificationOutput.send":{capName:`notification-output`,capScope:`system`,addonId:null,access:`create`},"notificationOutput.setTargetEnabled":{capName:`notification-output`,capScope:`system`,addonId:null,access:`create`},"notificationOutput.testTarget":{capName:`notification-output`,capScope:`system`,addonId:null,access:`create`},"notificationOutput.upsertTarget":{capName:`notification-output`,capScope:`system`,addonId:null,access:`create`},"notificationRules.activateAlarmProfile":{capName:`notification-rules`,capScope:`system`,addonId:null,access:`create`},"notificationRules.cancelSnooze":{capName:`notification-rules`,capScope:`system`,addonId:null,access:`create`},"notificationRules.createAlarmProfile":{capName:`notification-rules`,capScope:`system`,addonId:null,access:`create`},"notificationRules.createRule":{capName:`notification-rules`,capScope:`system`,addonId:null,access:`create`},"notificationRules.createSequence":{capName:`notification-rules`,capScope:`system`,addonId:null,access:`create`},"notificationRules.createSnooze":{capName:`notification-rules`,capScope:`system`,addonId:null,access:`create`},"notificationRules.deleteAlarmProfile":{capName:`notification-rules`,capScope:`system`,addonId:null,access:`delete`},"notificationRules.deleteRule":{capName:`notification-rules`,capScope:`system`,addonId:null,access:`delete`},"notificationRules.deleteSequence":{capName:`notification-rules`,capScope:`system`,addonId:null,access:`delete`},"notificationRules.getAlarmConfig":{capName:`notification-rules`,capScope:`system`,addonId:null,access:`view`},"notificationRules.getAlarmSensors":{capName:`notification-rules`,capScope:`system`,addonId:null,access:`view`},"notificationRules.getClipRetentionAsks":{capName:`notification-rules`,capScope:`system`,addonId:null,access:`view`},"notificationRules.getConditionCatalog":{capName:`notification-rules`,capScope:`system`,addonId:null,access:`view`},"notificationRules.getHistory":{capName:`notification-rules`,capScope:`system`,addonId:null,access:`view`},"notificationRules.getRule":{capName:`notification-rules`,capScope:`system`,addonId:null,access:`view`},"notificationRules.getRuleLastRuns":{capName:`notification-rules`,capScope:`system`,addonId:null,access:`view`},"notificationRules.getSequence":{capName:`notification-rules`,capScope:`system`,addonId:null,access:`view`},"notificationRules.getTemplateCatalog":{capName:`notification-rules`,capScope:`system`,addonId:null,access:`view`},"notificationRules.listDeviceMutes":{capName:`notification-rules`,capScope:`system`,addonId:null,access:`view`},"notificationRules.listRules":{capName:`notification-rules`,capScope:`system`,addonId:null,access:`view`},"notificationRules.listSequences":{capName:`notification-rules`,capScope:`system`,addonId:null,access:`view`},"notificationRules.listSnoozes":{capName:`notification-rules`,capScope:`system`,addonId:null,access:`view`},"notificationRules.previewStateSummary":{capName:`notification-rules`,capScope:`system`,addonId:null,access:`view`},"notificationRules.previewTemplate":{capName:`notification-rules`,capScope:`system`,addonId:null,access:`view`},"notificationRules.renameAlarmProfile":{capName:`notification-rules`,capScope:`system`,addonId:null,access:`create`},"notificationRules.resolveArtifactUrl":{capName:`notification-rules`,capScope:`system`,addonId:null,access:`view`},"notificationRules.setAlarmConfig":{capName:`notification-rules`,capScope:`system`,addonId:null,access:`create`},"notificationRules.setDeviceMuted":{capName:`notification-rules`,capScope:`system`,addonId:null,access:`create`},"notificationRules.setRuleEnabled":{capName:`notification-rules`,capScope:`system`,addonId:null,access:`create`},"notificationRules.testRule":{capName:`notification-rules`,capScope:`system`,addonId:null,access:`create`},"notificationRules.updateRule":{capName:`notification-rules`,capScope:`system`,addonId:null,access:`create`},"notificationRules.updateSequence":{capName:`notification-rules`,capScope:`system`,addonId:null,access:`create`},"notifier.cancel":{capName:`notifier`,capScope:`device`,addonId:null,access:`create`},"notifier.getStatus":{capName:`notifier`,capScope:`device`,addonId:null,access:`view`},"notifier.send":{capName:`notifier`,capScope:`device`,addonId:null,access:`create`},"numericSensor.getStatus":{capName:`numeric-sensor`,capScope:`device`,addonId:null,access:`view`},"oauthIntegration.getDescriptor":{capName:`oauth-integration`,capScope:`system`,addonId:null,access:`view`},"osd.getStatus":{capName:`osd`,capScope:`device`,addonId:null,access:`view`},"osd.setOverlay":{capName:`osd`,capScope:`device`,addonId:null,access:`create`},"osdManager.clearSlotBinding":{capName:`osd-manager`,capScope:`system`,addonId:null,access:`delete`},"osdManager.copyDeviceConfiguration":{capName:`osd-manager`,capScope:`system`,addonId:null,access:`create`},"osdManager.deleteTemplate":{capName:`osd-manager`,capScope:`system`,addonId:null,access:`delete`},"osdManager.getConditionSupport":{capName:`osd-manager`,capScope:`system`,addonId:null,access:`view`},"osdManager.getDeviceOsd":{capName:`osd-manager`,capScope:`system`,addonId:null,access:`view`},"osdManager.getSourceCatalog":{capName:`osd-manager`,capScope:`system`,addonId:null,access:`view`},"osdManager.listTemplates":{capName:`osd-manager`,capScope:`system`,addonId:null,access:`view`},"osdManager.previewSlot":{capName:`osd-manager`,capScope:`system`,addonId:null,access:`create`},"osdManager.renderDevice":{capName:`osd-manager`,capScope:`system`,addonId:null,access:`create`},"osdManager.setSlotBinding":{capName:`osd-manager`,capScope:`system`,addonId:null,access:`create`},"osdManager.upsertTemplate":{capName:`osd-manager`,capScope:`system`,addonId:null,access:`create`},"petFeeder.callPet":{capName:`pet-feeder`,capScope:`device`,addonId:null,access:`create`},"petFeeder.cancelFeed":{capName:`pet-feeder`,capScope:`device`,addonId:null,access:`create`},"petFeeder.feed":{capName:`pet-feeder`,capScope:`device`,addonId:null,access:`create`},"petFeeder.getStatus":{capName:`pet-feeder`,capScope:`device`,addonId:null,access:`view`},"petFeeder.markFoodReplenished":{capName:`pet-feeder`,capScope:`device`,addonId:null,access:`create`},"petFeeder.playSound":{capName:`pet-feeder`,capScope:`device`,addonId:null,access:`create`},"petFeeder.resetDesiccant":{capName:`pet-feeder`,capScope:`device`,addonId:null,access:`delete`},"petFeeder.setChildLock":{capName:`pet-feeder`,capScope:`device`,addonId:null,access:`create`},"petFeeder.setFeedSound":{capName:`pet-feeder`,capScope:`device`,addonId:null,access:`create`},"petFeeder.setIndicatorLight":{capName:`pet-feeder`,capScope:`device`,addonId:null,access:`create`},"petFeeder.setVolume":{capName:`pet-feeder`,capScope:`device`,addonId:null,access:`create`},"pipelineAnalytics.addRetrainFrameFromRecording":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`create`},"pipelineAnalytics.addRetrainFramesToCollection":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`create`},"pipelineAnalytics.applyDeviceSettingsPatch":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`create`},"pipelineAnalytics.cancelRelocateMedia":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`create`},"pipelineAnalytics.cancelStorageMigrationMove":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`create`},"pipelineAnalytics.clearTrackRelation":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`delete`},"pipelineAnalytics.clearTracks":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`delete`},"pipelineAnalytics.completeRetrainTrack":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`create`},"pipelineAnalytics.countRelocatableMedia":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`},"pipelineAnalytics.countUnstampedEventMedia":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`},"pipelineAnalytics.createRetrainCollection":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`create`},"pipelineAnalytics.createRetrainDatasetVersion":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`create`},"pipelineAnalytics.deleteDeviceEvents":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`delete`},"pipelineAnalytics.deleteRetrainCollection":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`delete`},"pipelineAnalytics.deleteRetrainDatasetVersion":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`delete`},"pipelineAnalytics.deleteTracks":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`delete`},"pipelineAnalytics.deselectRetrainFrame":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`create`},"pipelineAnalytics.getActiveTracks":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`},"pipelineAnalytics.getAudioEvents":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`},"pipelineAnalytics.getDeviceLiveContribution":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`},"pipelineAnalytics.getDeviceSettingsContribution":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`},"pipelineAnalytics.getEventDensity":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`},"pipelineAnalytics.getEventDensityBatch":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`},"pipelineAnalytics.getEventMedia":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`},"pipelineAnalytics.getEventMediaFootprintByKind":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`},"pipelineAnalytics.getEventStoreFootprint":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`},"pipelineAnalytics.getKeyEvents":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`},"pipelineAnalytics.getKeyEventsBatch":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`},"pipelineAnalytics.getMediaReclaimStatus":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`},"pipelineAnalytics.getMotionEvents":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`},"pipelineAnalytics.getObjectEmbeddingRebuildStatus":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`},"pipelineAnalytics.getObjectEvents":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`},"pipelineAnalytics.getRetrainExportUrl":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`},"pipelineAnalytics.getRetrainFrameImage":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`},"pipelineAnalytics.getSensorEvents":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`},"pipelineAnalytics.getStorageMigrationMoveStatus":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`},"pipelineAnalytics.getTrack":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`},"pipelineAnalytics.getTrackMedia":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`},"pipelineAnalytics.getTrainingExportSummary":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`},"pipelineAnalytics.getTrainingExportUrl":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`},"pipelineAnalytics.listArchivedDebugNotes":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`},"pipelineAnalytics.listBirthDecisions":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`},"pipelineAnalytics.listEventKinds":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`},"pipelineAnalytics.listEventKindsBatch":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`},"pipelineAnalytics.listEventMedia":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`},"pipelineAnalytics.listOpsLog":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`},"pipelineAnalytics.listRecentTracks":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`},"pipelineAnalytics.listRelocateMediaJobs":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`},"pipelineAnalytics.listRetrainAnnotations":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`},"pipelineAnalytics.listRetrainAssistProfiles":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`},"pipelineAnalytics.listRetrainCollectionFrames":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`},"pipelineAnalytics.listRetrainCollections":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`},"pipelineAnalytics.listRetrainDatasetVersions":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`},"pipelineAnalytics.listRetrainFrames":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`},"pipelineAnalytics.listRetrainStaging":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`},"pipelineAnalytics.listTrackMedia":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`},"pipelineAnalytics.listTrackRelations":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`},"pipelineAnalytics.listTracks":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`},"pipelineAnalytics.ownersWithMedia":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`},"pipelineAnalytics.pauseForStorageMigration":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`create`},"pipelineAnalytics.previewRetrainDataset":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`},"pipelineAnalytics.proposeRetrainAnnotations":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`create`},"pipelineAnalytics.proposeRetrainAnnotationsWithLlm":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`create`},"pipelineAnalytics.pruneEvents":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`create`},"pipelineAnalytics.pruneEventsBefore":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`create`},"pipelineAnalytics.pruneTracksBefore":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`create`},"pipelineAnalytics.readLongTermSeries":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`},"pipelineAnalytics.rebuildObjectEmbeddings":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`create`},"pipelineAnalytics.reclaimDebugMedia":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`create`},"pipelineAnalytics.reconcileFromDisk":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`create`},"pipelineAnalytics.refreshStorageLocationsForMigration":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`create`},"pipelineAnalytics.relocateMedia":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`create`},"pipelineAnalytics.removeRetrainFrameFromCollection":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`delete`},"pipelineAnalytics.renameRetrainCollection":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`create`},"pipelineAnalytics.restageRetrainTrack":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`create`},"pipelineAnalytics.resumeForStorageMigration":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`create`},"pipelineAnalytics.saveRetrainAnnotations":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`create`},"pipelineAnalytics.searchObjectEvents":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`},"pipelineAnalytics.selectRetrainFrames":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`create`},"pipelineAnalytics.setRetrainFrameComplete":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`create`},"pipelineAnalytics.setTrackFlags":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`create`},"pipelineAnalytics.setTrackPurity":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`create`},"pipelineAnalytics.setTrackRelation":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`create`},"pipelineAnalytics.startStorageMigrationMove":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`create`},"pipelineAnalytics.verifyRetrainDatasetVersion":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`},"pipelineAnalytics.wipeAllAnalytics":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`delete`},"pipelineAnalytics.wipeObjectEmbeddings":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`delete`},"pipelineAnalytics.writeRetrainArchive":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`create`},"pipelineExecutor.cacheFrameInPool":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`create`},"pipelineExecutor.clearDeviceOverrides":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`delete`},"pipelineExecutor.clearModelBoundDeviceOverrides":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`delete`},"pipelineExecutor.deleteModel":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`delete`},"pipelineExecutor.downloadModel":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`create`},"pipelineExecutor.getAddonModels":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`view`},"pipelineExecutor.getAudioCapabilities":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`view`},"pipelineExecutor.getAvailableEngines":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`view`},"pipelineExecutor.getCapabilities":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`view`},"pipelineExecutor.getDefaultSteps":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`view`},"pipelineExecutor.getDetectionConfigSchema":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`view`},"pipelineExecutor.getEffectiveTuning":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`view`},"pipelineExecutor.getEngineProvisioning":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`view`},"pipelineExecutor.getGlobalPipelineConfig":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`view`},"pipelineExecutor.getGlobalSteps":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`view`},"pipelineExecutor.getInferenceDeviceHealth":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`view`},"pipelineExecutor.getOrchestratorConfigSchema":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`view`},"pipelineExecutor.getReferenceAudio":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`view`},"pipelineExecutor.getReferenceAudioFiles":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`view`},"pipelineExecutor.getReferenceImage":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`view`},"pipelineExecutor.getSchema":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`view`},"pipelineExecutor.getSelectedEngine":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`view`},"pipelineExecutor.getVideoPipelineSteps":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`view`},"pipelineExecutor.inferCached":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`create`},"pipelineExecutor.killEngine":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`create`},"pipelineExecutor.listLoadedEngines":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`view`},"pipelineExecutor.listReferenceImages":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`view`},"pipelineExecutor.rearmInferenceDevice":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`create`},"pipelineExecutor.runAudioTest":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`create`},"pipelineExecutor.runPipeline":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`create`},"pipelineExecutor.runPipelineBatch":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`create`},"pipelineExecutor.setVideoPipelineSteps":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`create`},"pipelineExecutor.spinEngine":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`create`},"pipelineExecutor.uncacheFrame":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`create`},"pipelineExecutor.validatePipeline":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`view`},"pipelineOrchestrator.abortNodeBenchmark":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`create`},"pipelineOrchestrator.applyAutoTune":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`create`},"pipelineOrchestrator.applyDeviceSettingsPatch":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`create`},"pipelineOrchestrator.assignAudio":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`create`},"pipelineOrchestrator.assignPipeline":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`create`},"pipelineOrchestrator.deleteNodeBenchmarkResult":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`delete`},"pipelineOrchestrator.getAgentLoad":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`view`},"pipelineOrchestrator.getAgentSettings":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`view`},"pipelineOrchestrator.getAudioAssignment":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`view`},"pipelineOrchestrator.getAudioAssignments":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`view`},"pipelineOrchestrator.getAudioNodeLoad":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`view`},"pipelineOrchestrator.getCameraMetrics":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`view`},"pipelineOrchestrator.getCameraSettings":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`view`},"pipelineOrchestrator.getCameraStatus":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`view`},"pipelineOrchestrator.getCameraStatuses":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`view`},"pipelineOrchestrator.getCameraStepOverrides":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`view`},"pipelineOrchestrator.getCameraSwitches":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`view`},"pipelineOrchestrator.getCapabilityBindings":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`view`},"pipelineOrchestrator.getClusterModelChoice":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`view`},"pipelineOrchestrator.getDeviceLiveContribution":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`view`},"pipelineOrchestrator.getDeviceSettingsContribution":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`view`},"pipelineOrchestrator.getEffectiveShares":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`view`},"pipelineOrchestrator.getGlobalMetrics":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`view`},"pipelineOrchestrator.getIngestOwner":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`view`},"pipelineOrchestrator.getNodeBenchmarkCandidates":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`view`},"pipelineOrchestrator.getNodeBenchmarkPreflight":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`view`},"pipelineOrchestrator.getNodeBenchmarkStatus":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`view`},"pipelineOrchestrator.getNodeInferenceDevices":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`view`},"pipelineOrchestrator.getPipelineAssignment":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`view`},"pipelineOrchestrator.getPipelineAssignments":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`view`},"pipelineOrchestrator.getPipelineDevicePin":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`view`},"pipelineOrchestrator.getPlacementStats":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`view`},"pipelineOrchestrator.getReconcileFromDiskStatus":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`view`},"pipelineOrchestrator.listAgentSettings":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`view`},"pipelineOrchestrator.listNodeBenchmarkResults":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`view`},"pipelineOrchestrator.pauseForStorageMigration":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`create`},"pipelineOrchestrator.planAutoTune":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`view`},"pipelineOrchestrator.rebalance":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`create`},"pipelineOrchestrator.reconcileFromDisk":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`create`},"pipelineOrchestrator.removeAgentSettings":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`delete`},"pipelineOrchestrator.requestOccupancyLook":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`create`},"pipelineOrchestrator.resetNodePipelineDefaults":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`delete`},"pipelineOrchestrator.resolvePipeline":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`view`},"pipelineOrchestrator.resumeForStorageMigration":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`create`},"pipelineOrchestrator.setAgentCapabilities":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`create`},"pipelineOrchestrator.setAgentDecodeLimits":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`create`},"pipelineOrchestrator.setAgentInferenceDevices":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`create`},"pipelineOrchestrator.setAgentMaxCameras":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`create`},"pipelineOrchestrator.setAgentReachableHost":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`create`},"pipelineOrchestrator.setCameraPipelineForAgent":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`create`},"pipelineOrchestrator.setCameraSensors":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`create`},"pipelineOrchestrator.setCameraStepOverride":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`create`},"pipelineOrchestrator.setCameraStepSettings":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`create`},"pipelineOrchestrator.setCameraStepToggle":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`create`},"pipelineOrchestrator.setCameraSwitch":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`create`},"pipelineOrchestrator.setCapabilityBinding":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`create`},"pipelineOrchestrator.setLoadBalancingShares":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`create`},"pipelineOrchestrator.setPipelineDevicePin":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`create`},"pipelineOrchestrator.setShareSource":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`create`},"pipelineOrchestrator.startNodeBenchmark":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`create`},"pipelineOrchestrator.suggestShares":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`view`},"pipelineOrchestrator.unassignAudio":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`create`},"pipelineOrchestrator.unassignPipeline":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`create`},"pipelineRunner.abortNodeBench":{capName:`pipeline-runner`,capScope:`system`,addonId:null,access:`create`},"pipelineRunner.attachCamera":{capName:`pipeline-runner`,capScope:`system`,addonId:null,access:`create`},"pipelineRunner.detachCamera":{capName:`pipeline-runner`,capScope:`system`,addonId:null,access:`create`},"pipelineRunner.getAllCameraMetrics":{capName:`pipeline-runner`,capScope:`system`,addonId:null,access:`view`},"pipelineRunner.getCameraMetrics":{capName:`pipeline-runner`,capScope:`system`,addonId:null,access:`view`},"pipelineRunner.getLocalCameras":{capName:`pipeline-runner`,capScope:`system`,addonId:null,access:`view`},"pipelineRunner.getLocalLoad":{capName:`pipeline-runner`,capScope:`system`,addonId:null,access:`view`},"pipelineRunner.getLocalMetrics":{capName:`pipeline-runner`,capScope:`system`,addonId:null,access:`view`},"pipelineRunner.getNativeCrop":{capName:`pipeline-runner`,capScope:`system`,addonId:null,access:`view`},"pipelineRunner.getNodeBenchStatus":{capName:`pipeline-runner`,capScope:`system`,addonId:null,access:`view`},"pipelineRunner.getParkedTrackFrame":{capName:`pipeline-runner`,capScope:`system`,addonId:null,access:`view`},"pipelineRunner.parkTrackFrame":{capName:`pipeline-runner`,capScope:`system`,addonId:null,access:`create`},"pipelineRunner.releaseParkedTrackFrames":{capName:`pipeline-runner`,capScope:`system`,addonId:null,access:`create`},"pipelineRunner.reportMotion":{capName:`pipeline-runner`,capScope:`system`,addonId:null,access:`create`},"pipelineRunner.requestOccupancyBurst":{capName:`pipeline-runner`,capScope:`system`,addonId:null,access:`create`},"pipelineRunner.runDetailSubtree":{capName:`pipeline-runner`,capScope:`system`,addonId:null,access:`create`},"pipelineRunner.runStatelessStep":{capName:`pipeline-runner`,capScope:`system`,addonId:null,access:`create`},"pipelineRunner.startNodeBench":{capName:`pipeline-runner`,capScope:`system`,addonId:null,access:`create`},"plateGallery.assignPlate":{capName:`plate-gallery`,capScope:`system`,addonId:null,access:`create`},"plateGallery.assignPlates":{capName:`plate-gallery`,capScope:`system`,addonId:null,access:`create`},"plateGallery.correctPlateText":{capName:`plate-gallery`,capScope:`system`,addonId:null,access:`create`},"plateGallery.createVehicle":{capName:`plate-gallery`,capScope:`system`,addonId:null,access:`create`},"plateGallery.deletePlate":{capName:`plate-gallery`,capScope:`system`,addonId:null,access:`delete`},"plateGallery.deleteVehicle":{capName:`plate-gallery`,capScope:`system`,addonId:null,access:`delete`},"plateGallery.getPlateByTrack":{capName:`plate-gallery`,capScope:`system`,addonId:null,access:`view`},"plateGallery.getPlateMedia":{capName:`plate-gallery`,capScope:`system`,addonId:null,access:`view`},"plateGallery.listPlates":{capName:`plate-gallery`,capScope:`system`,addonId:null,access:`view`},"plateGallery.listVehicles":{capName:`plate-gallery`,capScope:`system`,addonId:null,access:`view`},"plateGallery.listVehicleSamples":{capName:`plate-gallery`,capScope:`system`,addonId:null,access:`view`},"plateGallery.removeVehicleSample":{capName:`plate-gallery`,capScope:`system`,addonId:null,access:`delete`},"plateGallery.renameVehicle":{capName:`plate-gallery`,capScope:`system`,addonId:null,access:`create`},"plateGallery.searchPlates":{capName:`plate-gallery`,capScope:`system`,addonId:null,access:`view`},"plateGallery.suggestPlateClusters":{capName:`plate-gallery`,capScope:`system`,addonId:null,access:`view`},"plateGallery.unassignPlate":{capName:`plate-gallery`,capScope:`system`,addonId:null,access:`create`},"plateGallery.unassignPlates":{capName:`plate-gallery`,capScope:`system`,addonId:null,access:`create`},"platformProbe.getCapabilities":{capName:`platform-probe`,capScope:`system`,addonId:null,access:`view`},"platformProbe.getHardware":{capName:`platform-probe`,capScope:`system`,addonId:null,access:`view`},"platformProbe.resolveHwAccel":{capName:`platform-probe`,capScope:`system`,addonId:null,access:`view`},"platformProbe.resolveInferenceConfig":{capName:`platform-probe`,capScope:`system`,addonId:null,access:`view`},"powerMeter.getStatus":{capName:`power-meter`,capScope:`device`,addonId:null,access:`view`},"presence.getStatus":{capName:`presence`,capScope:`device`,addonId:null,access:`view`},"pressureSensor.getStatus":{capName:`pressure-sensor`,capScope:`device`,addonId:null,access:`view`},"privacyMask.getOptions":{capName:`privacy-mask`,capScope:`device`,addonId:null,access:`view`},"privacyMask.getStatus":{capName:`privacy-mask`,capScope:`device`,addonId:null,access:`view`},"privacyMask.setAudioEnabled":{capName:`privacy-mask`,capScope:`device`,addonId:null,access:`create`},"privacyMask.setMask":{capName:`privacy-mask`,capScope:`device`,addonId:null,access:`create`},"ptz.captureHomeHere":{capName:`ptz`,capScope:`device`,addonId:null,access:`create`},"ptz.continuousMove":{capName:`ptz`,capScope:`device`,addonId:null,access:`create`},"ptz.deletePreset":{capName:`ptz`,capScope:`device`,addonId:null,access:`delete`},"ptz.getHomePreset":{capName:`ptz`,capScope:`device`,addonId:null,access:`view`},"ptz.getHomeReturn":{capName:`ptz`,capScope:`device`,addonId:null,access:`view`},"ptz.getOptions":{capName:`ptz`,capScope:`device`,addonId:null,access:`view`},"ptz.getPosition":{capName:`ptz`,capScope:`device`,addonId:null,access:`view`},"ptz.getPresets":{capName:`ptz`,capScope:`device`,addonId:null,access:`view`},"ptz.getStatus":{capName:`ptz`,capScope:`device`,addonId:null,access:`view`},"ptz.goHome":{capName:`ptz`,capScope:`device`,addonId:null,access:`create`},"ptz.goToPreset":{capName:`ptz`,capScope:`device`,addonId:null,access:`create`},"ptz.move":{capName:`ptz`,capScope:`device`,addonId:null,access:`create`},"ptz.savePreset":{capName:`ptz`,capScope:`device`,addonId:null,access:`create`},"ptz.setAutofocus":{capName:`ptz`,capScope:`device`,addonId:null,access:`create`},"ptz.setHomePreset":{capName:`ptz`,capScope:`device`,addonId:null,access:`create`},"ptz.setHomeReturn":{capName:`ptz`,capScope:`device`,addonId:null,access:`create`},"ptz.stop":{capName:`ptz`,capScope:`device`,addonId:null,access:`create`},"ptzAutotrack.getSettings":{capName:`ptz-autotrack`,capScope:`device`,addonId:null,access:`view`},"ptzAutotrack.getStatus":{capName:`ptz-autotrack`,capScope:`device`,addonId:null,access:`view`},"ptzAutotrack.setEnabled":{capName:`ptz-autotrack`,capScope:`device`,addonId:null,access:`create`},"ptzAutotrack.setSettings":{capName:`ptz-autotrack`,capScope:`device`,addonId:null,access:`create`},"reboot.reboot":{capName:`reboot`,capScope:`device`,addonId:null,access:`create`},"recording.getAvailability":{capName:`recording`,capScope:`device`,addonId:null,access:`view`},"recording.getDaysWithRecordings":{capName:`recording`,capScope:`device`,addonId:null,access:`view`},"recording.getPlayback":{capName:`recording`,capScope:`device`,addonId:null,access:`view`},"recording.getPlaybackOptions":{capName:`recording`,capScope:`device`,addonId:null,access:`view`},"recording.listSources":{capName:`recording`,capScope:`device`,addonId:null,access:`view`},"recordingArchive.applyDeviceSettingsPatch":{capName:`recording-archive`,capScope:`system`,addonId:null,access:`create`},"recordingArchive.cancelRelocateJob":{capName:`recording-archive`,capScope:`system`,addonId:null,access:`create`},"recordingArchive.cancelStorageMigrationMove":{capName:`recording-archive`,capScope:`system`,addonId:null,access:`create`},"recordingArchive.deleteFootprint":{capName:`recording-archive`,capScope:`system`,addonId:null,access:`delete`},"recordingArchive.getAvailabilityBatch":{capName:`recording-archive`,capScope:`system`,addonId:null,access:`view`},"recordingArchive.getDaysWithRecordingsBatch":{capName:`recording-archive`,capScope:`system`,addonId:null,access:`view`},"recordingArchive.getDeviceConfig":{capName:`recording-archive`,capScope:`system`,addonId:null,access:`view`},"recordingArchive.getDeviceLiveContribution":{capName:`recording-archive`,capScope:`system`,addonId:null,access:`view`},"recordingArchive.getDeviceSettingsContribution":{capName:`recording-archive`,capScope:`system`,addonId:null,access:`view`},"recordingArchive.getPlacement":{capName:`recording-archive`,capScope:`system`,addonId:null,access:`view`},"recordingArchive.getRelocateResidue":{capName:`recording-archive`,capScope:`system`,addonId:null,access:`view`},"recordingArchive.getStatus":{capName:`recording-archive`,capScope:`system`,addonId:null,access:`view`},"recordingArchive.getStorageMigrationMoveStatus":{capName:`recording-archive`,capScope:`system`,addonId:null,access:`view`},"recordingArchive.getStorageUsage":{capName:`recording-archive`,capScope:`system`,addonId:null,access:`view`},"recordingArchive.listOpsLog":{capName:`recording-archive`,capScope:`system`,addonId:null,access:`view`},"recordingArchive.listRelocateJobs":{capName:`recording-archive`,capScope:`system`,addonId:null,access:`view`},"recordingArchive.locateSegment":{capName:`recording-archive`,capScope:`system`,addonId:null,access:`view`},"recordingArchive.pauseForStorageMigration":{capName:`recording-archive`,capScope:`system`,addonId:null,access:`create`},"recordingArchive.planStorageRebalance":{capName:`recording-archive`,capScope:`system`,addonId:null,access:`view`},"recordingArchive.pruneFootage":{capName:`recording-archive`,capScope:`system`,addonId:null,access:`create`},"recordingArchive.readGopBytes":{capName:`recording-archive`,capScope:`system`,addonId:null,access:`view`},"recordingArchive.readSegmentBytes":{capName:`recording-archive`,capScope:`system`,addonId:null,access:`view`},"recordingArchive.readWindowBytes":{capName:`recording-archive`,capScope:`system`,addonId:null,access:`view`},"recordingArchive.reconcileLedgerAgainstDisk":{capName:`recording-archive`,capScope:`system`,addonId:null,access:`create`},"recordingArchive.refreshStorageLocationsForMigration":{capName:`recording-archive`,capScope:`system`,addonId:null,access:`create`},"recordingArchive.relocateFootage":{capName:`recording-archive`,capScope:`system`,addonId:null,access:`create`},"recordingArchive.renderClip":{capName:`recording-archive`,capScope:`system`,addonId:null,access:`create`},"recordingArchive.renderGif":{capName:`recording-archive`,capScope:`system`,addonId:null,access:`create`},"recordingArchive.rescanStorage":{capName:`recording-archive`,capScope:`system`,addonId:null,access:`create`},"recordingArchive.resumeForStorageMigration":{capName:`recording-archive`,capScope:`system`,addonId:null,access:`create`},"recordingArchive.setDeviceConfig":{capName:`recording-archive`,capScope:`system`,addonId:null,access:`create`},"recordingArchive.setDevicePlacement":{capName:`recording-archive`,capScope:`system`,addonId:null,access:`create`},"recordingArchive.startStorageMigrationMove":{capName:`recording-archive`,capScope:`system`,addonId:null,access:`create`},"recordingArchive.startStorageRebalance":{capName:`recording-archive`,capScope:`system`,addonId:null,access:`create`},"recordingExport.cancelExport":{capName:`recording-export`,capScope:`system`,addonId:null,access:`create`},"recordingExport.createExport":{capName:`recording-export`,capScope:`system`,addonId:null,access:`create`},"recordingExport.deleteExport":{capName:`recording-export`,capScope:`system`,addonId:null,access:`delete`},"recordingExport.getDownloadUrl":{capName:`recording-export`,capScope:`system`,addonId:null,access:`view`},"recordingExport.getExport":{capName:`recording-export`,capScope:`system`,addonId:null,access:`view`},"recordingExport.listExports":{capName:`recording-export`,capScope:`system`,addonId:null,access:`view`},"recordingExport.readExportBytes":{capName:`recording-export`,capScope:`system`,addonId:null,access:`view`},"recordingOnboard.getOptions":{capName:`recording-onboard`,capScope:`device`,addonId:null,access:`view`},"recordingOnboard.getStatus":{capName:`recording-onboard`,capScope:`device`,addonId:null,access:`view`},"recordingOnboard.setSettings":{capName:`recording-onboard`,capScope:`device`,addonId:null,access:`create`},"recordingSignal.getStatus":{capName:`recording-signal`,capScope:`device`,addonId:null,access:`view`},"sceneMonitor.captureReference":{capName:`scene-monitor`,capScope:`device`,addonId:null,access:`create`},"sceneMonitor.createScene":{capName:`scene-monitor`,capScope:`device`,addonId:null,access:`create`},"sceneMonitor.deleteReference":{capName:`scene-monitor`,capScope:`device`,addonId:null,access:`delete`},"sceneMonitor.deleteScene":{capName:`scene-monitor`,capScope:`device`,addonId:null,access:`delete`},"sceneMonitor.getStatus":{capName:`scene-monitor`,capScope:`device`,addonId:null,access:`view`},"sceneMonitor.listScenes":{capName:`scene-monitor`,capScope:`device`,addonId:null,access:`view`},"sceneMonitor.listScenesBatch":{capName:`scene-monitor`,capScope:`device`,addonId:null,access:`view`},"sceneMonitor.recheckNow":{capName:`scene-monitor`,capScope:`device`,addonId:null,access:`create`},"sceneMonitor.resetScene":{capName:`scene-monitor`,capScope:`device`,addonId:null,access:`delete`},"sceneMonitor.updateScene":{capName:`scene-monitor`,capScope:`device`,addonId:null,access:`create`},"scriptRunner.getStatus":{capName:`script-runner`,capScope:`device`,addonId:null,access:`view`},"scriptRunner.run":{capName:`script-runner`,capScope:`device`,addonId:null,access:`create`},"scriptRunner.stop":{capName:`script-runner`,capScope:`device`,addonId:null,access:`create`},"serverManagement.applyServerUpdate":{capName:`server-management`,capScope:`system`,addonId:null,access:`create`},"serverManagement.checkServerUpdate":{capName:`server-management`,capScope:`system`,addonId:null,access:`create`},"serverManagement.getServerPackageStatus":{capName:`server-management`,capScope:`system`,addonId:null,access:`view`},"serverManagement.restartServer":{capName:`server-management`,capScope:`system`,addonId:null,access:`create`},"serverManagement.rollbackServerUpdate":{capName:`server-management`,capScope:`system`,addonId:null,access:`create`},"settingsStore.aggregate":{capName:`settings-store`,capScope:`system`,addonId:null,access:`view`},"settingsStore.count":{capName:`settings-store`,capScope:`system`,addonId:null,access:`view`},"settingsStore.declareCollection":{capName:`settings-store`,capScope:`system`,addonId:null,access:`create`},"settingsStore.delete":{capName:`settings-store`,capScope:`system`,addonId:null,access:`delete`},"settingsStore.deleteWhere":{capName:`settings-store`,capScope:`system`,addonId:null,access:`delete`},"settingsStore.get":{capName:`settings-store`,capScope:`system`,addonId:null,access:`view`},"settingsStore.histogram":{capName:`settings-store`,capScope:`system`,addonId:null,access:`view`},"settingsStore.insert":{capName:`settings-store`,capScope:`system`,addonId:null,access:`create`},"settingsStore.insertMany":{capName:`settings-store`,capScope:`system`,addonId:null,access:`create`},"settingsStore.isEmpty":{capName:`settings-store`,capScope:`system`,addonId:null,access:`view`},"settingsStore.query":{capName:`settings-store`,capScope:`system`,addonId:null,access:`view`},"settingsStore.set":{capName:`settings-store`,capScope:`system`,addonId:null,access:`create`},"settingsStore.update":{capName:`settings-store`,capScope:`system`,addonId:null,access:`create`},"settingsStore.updateWhere":{capName:`settings-store`,capScope:`system`,addonId:null,access:`create`},"settingsStore.upsert":{capName:`settings-store`,capScope:`system`,addonId:null,access:`create`},"smoke.getStatus":{capName:`smoke`,capScope:`device`,addonId:null,access:`view`},"smtpProvider.getStatus":{capName:`smtp-provider`,capScope:`system`,addonId:null,access:`view`},"smtpProvider.sendEmail":{capName:`smtp-provider`,capScope:`system`,addonId:null,access:`create`},"smtpProvider.verify":{capName:`smtp-provider`,capScope:`system`,addonId:null,access:`view`},"snapshot.applyDeviceSettingsPatch":{capName:`snapshot`,capScope:`device`,addonId:null,access:`create`},"snapshot.getDebugState":{capName:`snapshot`,capScope:`device`,addonId:null,access:`view`},"snapshot.getDeviceLiveContribution":{capName:`snapshot`,capScope:`device`,addonId:null,access:`view`},"snapshot.getDeviceSettingsContribution":{capName:`snapshot`,capScope:`device`,addonId:null,access:`view`},"snapshot.getSnapshot":{capName:`snapshot`,capScope:`device`,addonId:null,access:`view`},"snapshot.getSnapshotLinks":{capName:`snapshot`,capScope:`device`,addonId:null,access:`view`},"snapshot.getSnapshotOverview":{capName:`snapshot`,capScope:`device`,addonId:null,access:`view`},"snapshot.getStatus":{capName:`snapshot`,capScope:`device`,addonId:null,access:`view`},"snapshot.invalidateCache":{capName:`snapshot`,capScope:`device`,addonId:null,access:`create`},"ssoBridge.signBridgeToken":{capName:`sso-bridge`,capScope:`system`,addonId:null,access:`view`},"ssoBridge.verifyBridgeToken":{capName:`sso-bridge`,capScope:`system`,addonId:null,access:`view`},"storage.abortUpload":{capName:`storage`,capScope:`system`,addonId:null,access:`create`},"storage.beginDownload":{capName:`storage`,capScope:`system`,addonId:null,access:`create`},"storage.beginUpload":{capName:`storage`,capScope:`system`,addonId:null,access:`create`},"storage.delete":{capName:`storage`,capScope:`system`,addonId:null,access:`delete`},"storage.deleteLocation":{capName:`storage`,capScope:`system`,addonId:null,access:`delete`},"storage.endDownload":{capName:`storage`,capScope:`system`,addonId:null,access:`create`},"storage.exists":{capName:`storage`,capScope:`system`,addonId:null,access:`view`},"storage.finalizeUpload":{capName:`storage`,capScope:`system`,addonId:null,access:`create`},"storage.getAvailableSpace":{capName:`storage`,capScope:`system`,addonId:null,access:`view`},"storage.list":{capName:`storage`,capScope:`system`,addonId:null,access:`view`},"storage.listDrainProgress":{capName:`storage`,capScope:`system`,addonId:null,access:`view`},"storage.listLocationDeclarations":{capName:`storage`,capScope:`system`,addonId:null,access:`view`},"storage.listLocations":{capName:`storage`,capScope:`system`,addonId:null,access:`view`},"storage.listProviders":{capName:`storage`,capScope:`system`,addonId:null,access:`view`},"storage.read":{capName:`storage`,capScope:`system`,addonId:null,access:`view`},"storage.readChunk":{capName:`storage`,capScope:`system`,addonId:null,access:`view`},"storage.resolve":{capName:`storage`,capScope:`system`,addonId:null,access:`view`},"storage.testConfig":{capName:`storage`,capScope:`system`,addonId:null,access:`view`},"storage.testLocation":{capName:`storage`,capScope:`system`,addonId:null,access:`view`},"storage.upsertLocation":{capName:`storage`,capScope:`system`,addonId:null,access:`create`},"storage.write":{capName:`storage`,capScope:`system`,addonId:null,access:`create`},"storage.writeChunk":{capName:`storage`,capScope:`system`,addonId:null,access:`create`},"storageEvictable.evict":{capName:`storage-evictable`,capScope:`system`,addonId:null,access:`create`},"storageEvictable.getEvictableUsage":{capName:`storage-evictable`,capScope:`system`,addonId:null,access:`view`},"storageMigration.cancel":{capName:`storage-migration`,capScope:`system`,addonId:null,access:`create`},"storageMigration.cleanupCancel":{capName:`storage-migration`,capScope:`system`,addonId:null,access:`create`},"storageMigration.cleanupStart":{capName:`storage-migration`,capScope:`system`,addonId:null,access:`create`},"storageMigration.cleanupStatus":{capName:`storage-migration`,capScope:`system`,addonId:null,access:`view`},"storageMigration.drain":{capName:`storage-migration`,capScope:`system`,addonId:null,access:`create`},"storageMigration.history":{capName:`storage-migration`,capScope:`system`,addonId:null,access:`view`},"storageMigration.movers":{capName:`storage-migration`,capScope:`system`,addonId:null,access:`view`},"storageMigration.plan":{capName:`storage-migration`,capScope:`system`,addonId:null,access:`view`},"storageMigration.residue":{capName:`storage-migration`,capScope:`system`,addonId:null,access:`view`},"storageMigration.start":{capName:`storage-migration`,capScope:`system`,addonId:null,access:`create`},"storageMigration.status":{capName:`storage-migration`,capScope:`system`,addonId:null,access:`view`},"storageOccupancy.getOccupancy":{capName:`storage-occupancy`,capScope:`system`,addonId:null,access:`view`},"storageProvider.abortUpload":{capName:`storage-provider`,capScope:`system`,addonId:null,access:`create`},"storageProvider.beginDownload":{capName:`storage-provider`,capScope:`system`,addonId:null,access:`create`},"storageProvider.beginUpload":{capName:`storage-provider`,capScope:`system`,addonId:null,access:`create`},"storageProvider.delete":{capName:`storage-provider`,capScope:`system`,addonId:null,access:`delete`},"storageProvider.endDownload":{capName:`storage-provider`,capScope:`system`,addonId:null,access:`create`},"storageProvider.exists":{capName:`storage-provider`,capScope:`system`,addonId:null,access:`view`},"storageProvider.finalizeUpload":{capName:`storage-provider`,capScope:`system`,addonId:null,access:`create`},"storageProvider.getAvailableSpace":{capName:`storage-provider`,capScope:`system`,addonId:null,access:`view`},"storageProvider.getProviderInfo":{capName:`storage-provider`,capScope:`system`,addonId:null,access:`view`},"storageProvider.list":{capName:`storage-provider`,capScope:`system`,addonId:null,access:`view`},"storageProvider.read":{capName:`storage-provider`,capScope:`system`,addonId:null,access:`view`},"storageProvider.readChunk":{capName:`storage-provider`,capScope:`system`,addonId:null,access:`view`},"storageProvider.resolve":{capName:`storage-provider`,capScope:`system`,addonId:null,access:`view`},"storageProvider.testLocation":{capName:`storage-provider`,capScope:`system`,addonId:null,access:`view`},"storageProvider.write":{capName:`storage-provider`,capScope:`system`,addonId:null,access:`create`},"storageProvider.writeChunk":{capName:`storage-provider`,capScope:`system`,addonId:null,access:`create`},"streamBroker.acquireEgressTranscode":{capName:`stream-broker`,capScope:`system`,addonId:null,access:`create`},"streamBroker.applyDeviceSettingsPatch":{capName:`stream-broker`,capScope:`system`,addonId:null,access:`create`},"streamBroker.assignProfile":{capName:`stream-broker`,capScope:`system`,addonId:null,access:`create`},"streamBroker.fetchEventMedia":{capName:`stream-broker`,capScope:`system`,addonId:null,access:`create`},"streamBroker.forgetDeviceHardware":{capName:`stream-broker`,capScope:`system`,addonId:null,access:`delete`},"streamBroker.getAllRtspEntries":{capName:`stream-broker`,capScope:`system`,addonId:null,access:`view`},"streamBroker.getBrokerStats":{capName:`stream-broker`,capScope:`system`,addonId:null,access:`view`},"streamBroker.getDeviceAudioMute":{capName:`stream-broker`,capScope:`system`,addonId:null,access:`view`},"streamBroker.getDeviceLiveContribution":{capName:`stream-broker`,capScope:`system`,addonId:null,access:`view`},"streamBroker.getDeviceSettingsContribution":{capName:`stream-broker`,capScope:`system`,addonId:null,access:`view`},"streamBroker.getPreBufferInfo":{capName:`stream-broker`,capScope:`system`,addonId:null,access:`view`},"streamBroker.getRtspEntry":{capName:`stream-broker`,capScope:`system`,addonId:null,access:`view`},"streamBroker.getRtspPort":{capName:`stream-broker`,capScope:`system`,addonId:null,access:`view`},"streamBroker.getStreamUrl":{capName:`stream-broker`,capScope:`system`,addonId:null,access:`view`},"streamBroker.getStreamWithCodec":{capName:`stream-broker`,capScope:`system`,addonId:null,access:`create`},"streamBroker.isRtspEnabled":{capName:`stream-broker`,capScope:`system`,addonId:null,access:`view`},"streamBroker.killClient":{capName:`stream-broker`,capScope:`system`,addonId:null,access:`create`},"streamBroker.listAllCameraStreams":{capName:`stream-broker`,capScope:`system`,addonId:null,access:`view`},"streamBroker.listAllProfileSlots":{capName:`stream-broker`,capScope:`system`,addonId:null,access:`view`},"streamBroker.listClients":{capName:`stream-broker`,capScope:`system`,addonId:null,access:`view`},"streamBroker.probeStream":{capName:`stream-broker`,capScope:`system`,addonId:null,access:`create`},"streamBroker.produceEventMedia":{capName:`stream-broker`,capScope:`system`,addonId:null,access:`create`},"streamBroker.publishCameraStream":{capName:`stream-broker`,capScope:`system`,addonId:null,access:`create`},"streamBroker.pullAudioChunks":{capName:`stream-broker`,capScope:`system`,addonId:null,access:`view`},"streamBroker.regenerateRtspToken":{capName:`stream-broker`,capScope:`system`,addonId:null,access:`create`},"streamBroker.releaseEgressTranscode":{capName:`stream-broker`,capScope:`system`,addonId:null,access:`create`},"streamBroker.releaseStreamWithCodec":{capName:`stream-broker`,capScope:`system`,addonId:null,access:`create`},"streamBroker.renderPreBufferClip":{capName:`stream-broker`,capScope:`system`,addonId:null,access:`create`},"streamBroker.reportStreamSignal":{capName:`stream-broker`,capScope:`system`,addonId:null,access:`create`},"streamBroker.restartProfile":{capName:`stream-broker`,capScope:`system`,addonId:null,access:`create`},"streamBroker.retractCameraStream":{capName:`stream-broker`,capScope:`system`,addonId:null,access:`create`},"streamBroker.setDeviceAudioMute":{capName:`stream-broker`,capScope:`system`,addonId:null,access:`create`},"streamBroker.setPreBufferDuration":{capName:`stream-broker`,capScope:`system`,addonId:null,access:`create`},"streamBroker.setRtspEnabled":{capName:`stream-broker`,capScope:`system`,addonId:null,access:`create`},"streamBroker.subscribeAudioChunks":{capName:`stream-broker`,capScope:`system`,addonId:null,access:`create`},"streamBroker.unassignProfile":{capName:`stream-broker`,capScope:`system`,addonId:null,access:`create`},"streamBroker.unsubscribeAudioChunks":{capName:`stream-broker`,capScope:`system`,addonId:null,access:`create`},"streamCatalog.getCatalog":{capName:`stream-catalog`,capScope:`device`,addonId:null,access:`view`},"streamParams.getConfigSchema":{capName:`stream-params`,capScope:`device`,addonId:null,access:`view`},"streamParams.getOptions":{capName:`stream-params`,capScope:`device`,addonId:null,access:`view`},"streamParams.getStatus":{capName:`stream-params`,capScope:`device`,addonId:null,access:`view`},"streamParams.setProfile":{capName:`stream-params`,capScope:`device`,addonId:null,access:`create`},"streamSignals.listSignals":{capName:`stream-signals`,capScope:`device`,addonId:null,access:`view`},"switch.getStatus":{capName:`switch`,capScope:`device`,addonId:null,access:`view`},"switch.setState":{capName:`switch`,capScope:`device`,addonId:null,access:`create`},"system.detectSiteLocation":{capName:`system`,capScope:`system`,addonId:null,access:`create`},"system.featureFlags":{capName:`system`,capScope:`system`,addonId:null,access:`view`},"system.forceRetentionCleanup":{capName:`system`,capScope:`system`,addonId:null,access:`create`},"system.getFailureContributions":{capName:`system`,capScope:`system`,addonId:null,access:`view`},"system.getLoadContributions":{capName:`system`,capScope:`system`,addonId:null,access:`view`},"system.getLoggingSettings":{capName:`system`,capScope:`system`,addonId:null,access:`view`},"system.getRequestCensus":{capName:`system`,capScope:`system`,addonId:null,access:`view`},"system.getRetentionConfig":{capName:`system`,capScope:`system`,addonId:null,access:`view`},"system.getSiteLocation":{capName:`system`,capScope:`system`,addonId:null,access:`view`},"system.health":{capName:`system`,capScope:`system`,addonId:null,access:`view`},"system.info":{capName:`system`,capScope:`system`,addonId:null,access:`view`},"system.networkAddresses":{capName:`system`,capScope:`system`,addonId:null,access:`view`},"system.setLoggingSettings":{capName:`system`,capScope:`system`,addonId:null,access:`create`},"system.setRetentionConfig":{capName:`system`,capScope:`system`,addonId:null,access:`create`},"system.setSiteLocation":{capName:`system`,capScope:`system`,addonId:null,access:`create`},"tamper.getStatus":{capName:`tamper`,capScope:`device`,addonId:null,access:`view`},"temperatureSensor.getStatus":{capName:`temperature-sensor`,capScope:`device`,addonId:null,access:`view`},"terminalSession.adoptLegacyMonitor":{capName:`terminal-session`,capScope:`system`,addonId:null,access:`create`},"terminalSession.close":{capName:`terminal-session`,capScope:`system`,addonId:null,access:`create`},"terminalSession.createInstance":{capName:`terminal-session`,capScope:`system`,addonId:null,access:`create`},"terminalSession.deleteInstance":{capName:`terminal-session`,capScope:`system`,addonId:null,access:`delete`},"terminalSession.listInstances":{capName:`terminal-session`,capScope:`system`,addonId:null,access:`view`},"terminalSession.listLegacyCameras":{capName:`terminal-session`,capScope:`system`,addonId:null,access:`view`},"terminalSession.listProfiles":{capName:`terminal-session`,capScope:`system`,addonId:null,access:`view`},"terminalSession.listSessions":{capName:`terminal-session`,capScope:`system`,addonId:null,access:`view`},"terminalSession.openSession":{capName:`terminal-session`,capScope:`system`,addonId:null,access:`create`},"terminalSession.pullOutput":{capName:`terminal-session`,capScope:`system`,addonId:null,access:`create`},"terminalSession.resize":{capName:`terminal-session`,capScope:`system`,addonId:null,access:`create`},"terminalSession.setInstanceEnabled":{capName:`terminal-session`,capScope:`system`,addonId:null,access:`create`},"terminalSession.updateInstance":{capName:`terminal-session`,capScope:`system`,addonId:null,access:`create`},"terminalSession.writeInput":{capName:`terminal-session`,capScope:`system`,addonId:null,access:`create`},"toast.onToast":{capName:`toast`,capScope:`system`,addonId:null,access:`view`},"turnProvider.getTurnServers":{capName:`turn-provider`,capScope:`system`,addonId:null,access:`view`},"update.getStatus":{capName:`update`,capScope:`device`,addonId:null,access:`view`},"update.installUpdate":{capName:`update`,capScope:`device`,addonId:null,access:`create`},"userManagement.confirmTotp":{capName:`user-management`,capScope:`system`,addonId:null,access:`create`},"userManagement.createApiKey":{capName:`user-management`,capScope:`system`,addonId:null,access:`create`},"userManagement.createScopedToken":{capName:`user-management`,capScope:`system`,addonId:null,access:`create`},"userManagement.createUser":{capName:`user-management`,capScope:`system`,addonId:null,access:`create`},"userManagement.deleteUser":{capName:`user-management`,capScope:`system`,addonId:null,access:`delete`},"userManagement.disableTotp":{capName:`user-management`,capScope:`system`,addonId:null,access:`delete`},"userManagement.findUserByExternalIdentity":{capName:`user-management`,capScope:`system`,addonId:null,access:`view`},"userManagement.getTotpStatus":{capName:`user-management`,capScope:`system`,addonId:null,access:`view`},"userManagement.linkExternalIdentity":{capName:`user-management`,capScope:`system`,addonId:null,access:`create`},"userManagement.listApiKeys":{capName:`user-management`,capScope:`system`,addonId:null,access:`view`},"userManagement.listExternalIdentities":{capName:`user-management`,capScope:`system`,addonId:null,access:`view`},"userManagement.listOauthSessions":{capName:`user-management`,capScope:`system`,addonId:null,access:`view`},"userManagement.listScopedTokens":{capName:`user-management`,capScope:`system`,addonId:null,access:`view`},"userManagement.listUsers":{capName:`user-management`,capScope:`system`,addonId:null,access:`view`},"userManagement.oauthExchangeCode":{capName:`user-management`,capScope:`system`,addonId:null,access:`view`},"userManagement.oauthIssueCode":{capName:`user-management`,capScope:`system`,addonId:null,access:`create`},"userManagement.oauthRefresh":{capName:`user-management`,capScope:`system`,addonId:null,access:`view`},"userManagement.oauthVerifyAccessToken":{capName:`user-management`,capScope:`system`,addonId:null,access:`view`},"userManagement.resetPassword":{capName:`user-management`,capScope:`system`,addonId:null,access:`create`},"userManagement.revokeApiKey":{capName:`user-management`,capScope:`system`,addonId:null,access:`delete`},"userManagement.revokeOauthSession":{capName:`user-management`,capScope:`system`,addonId:null,access:`delete`},"userManagement.revokeScopedToken":{capName:`user-management`,capScope:`system`,addonId:null,access:`delete`},"userManagement.setupTotp":{capName:`user-management`,capScope:`system`,addonId:null,access:`create`},"userManagement.setUserScopes":{capName:`user-management`,capScope:`system`,addonId:null,access:`create`},"userManagement.unlinkExternalIdentity":{capName:`user-management`,capScope:`system`,addonId:null,access:`delete`},"userManagement.updateUser":{capName:`user-management`,capScope:`system`,addonId:null,access:`create`},"userManagement.validateApiKey":{capName:`user-management`,capScope:`system`,addonId:null,access:`view`},"userManagement.validateCredentials":{capName:`user-management`,capScope:`system`,addonId:null,access:`view`},"userManagement.validateScopedToken":{capName:`user-management`,capScope:`system`,addonId:null,access:`view`},"userManagement.verifyTotp":{capName:`user-management`,capScope:`system`,addonId:null,access:`view`},"userPasskeys.beginAuthentication":{capName:`user-passkeys`,capScope:`system`,addonId:null,access:`view`},"userPasskeys.beginDiscoverableAuthentication":{capName:`user-passkeys`,capScope:`system`,addonId:null,access:`view`},"userPasskeys.beginRegistration":{capName:`user-passkeys`,capScope:`system`,addonId:null,access:`create`},"userPasskeys.finishAuthentication":{capName:`user-passkeys`,capScope:`system`,addonId:null,access:`view`},"userPasskeys.finishDiscoverableAuthentication":{capName:`user-passkeys`,capScope:`system`,addonId:null,access:`view`},"userPasskeys.finishRegistration":{capName:`user-passkeys`,capScope:`system`,addonId:null,access:`create`},"userPasskeys.getSecondFactorPreference":{capName:`user-passkeys`,capScope:`system`,addonId:null,access:`view`},"userPasskeys.listPasskeys":{capName:`user-passkeys`,capScope:`system`,addonId:null,access:`view`},"userPasskeys.removePasskey":{capName:`user-passkeys`,capScope:`system`,addonId:null,access:`delete`},"userPasskeys.setSecondFactorPreference":{capName:`user-passkeys`,capScope:`system`,addonId:null,access:`create`},"vacuumControl.getStatus":{capName:`vacuum-control`,capScope:`device`,addonId:null,access:`view`},"vacuumControl.locate":{capName:`vacuum-control`,capScope:`device`,addonId:null,access:`create`},"vacuumControl.pause":{capName:`vacuum-control`,capScope:`device`,addonId:null,access:`create`},"vacuumControl.returnToBase":{capName:`vacuum-control`,capScope:`device`,addonId:null,access:`create`},"vacuumControl.setFanSpeed":{capName:`vacuum-control`,capScope:`device`,addonId:null,access:`create`},"vacuumControl.start":{capName:`vacuum-control`,capScope:`device`,addonId:null,access:`create`},"vacuumControl.stop":{capName:`vacuum-control`,capScope:`device`,addonId:null,access:`create`},"valve.close":{capName:`valve`,capScope:`device`,addonId:null,access:`create`},"valve.getStatus":{capName:`valve`,capScope:`device`,addonId:null,access:`view`},"valve.open":{capName:`valve`,capScope:`device`,addonId:null,access:`create`},"valve.setPosition":{capName:`valve`,capScope:`device`,addonId:null,access:`create`},"valve.stop":{capName:`valve`,capScope:`device`,addonId:null,access:`create`},"vectorStore.declareIndex":{capName:`vector-store`,capScope:`system`,addonId:null,access:`create`},"vectorStore.deleteByFilter":{capName:`vector-store`,capScope:`system`,addonId:null,access:`delete`},"vectorStore.deleteByIds":{capName:`vector-store`,capScope:`system`,addonId:null,access:`delete`},"vectorStore.fetchByIds":{capName:`vector-store`,capScope:`system`,addonId:null,access:`view`},"vectorStore.getByIds":{capName:`vector-store`,capScope:`system`,addonId:null,access:`view`},"vectorStore.query":{capName:`vector-store`,capScope:`system`,addonId:null,access:`view`},"vectorStore.scan":{capName:`vector-store`,capScope:`system`,addonId:null,access:`view`},"vectorStore.stats":{capName:`vector-store`,capScope:`system`,addonId:null,access:`view`},"vectorStore.upsert":{capName:`vector-store`,capScope:`system`,addonId:null,access:`create`},"vibration.getStatus":{capName:`vibration`,capScope:`device`,addonId:null,access:`view`},"videoclips.dialClipStream":{capName:`videoclips`,capScope:`device`,addonId:null,access:`view`},"videoclips.getClipPlayback":{capName:`videoclips`,capScope:`device`,addonId:null,access:`view`},"videoclips.getPlaybackOptions":{capName:`videoclips`,capScope:`device`,addonId:null,access:`view`},"videoclips.listClips":{capName:`videoclips`,capScope:`device`,addonId:null,access:`view`},"videoclips.listSources":{capName:`videoclips`,capScope:`device`,addonId:null,access:`view`},"videoclips.offerClipBytes":{capName:`videoclips`,capScope:`device`,addonId:null,access:`view`},"videoclips.readClipBytes":{capName:`videoclips`,capScope:`device`,addonId:null,access:`view`},"viewerUi.getStaticDir":{capName:`viewer-ui`,capScope:`system`,addonId:null,access:`view`},"viewerUi.getVersion":{capName:`viewer-ui`,capScope:`system`,addonId:null,access:`view`},"waterHeater.getStatus":{capName:`water-heater`,capScope:`device`,addonId:null,access:`view`},"waterHeater.setAway":{capName:`water-heater`,capScope:`device`,addonId:null,access:`create`},"waterHeater.setOperationMode":{capName:`water-heater`,capScope:`device`,addonId:null,access:`create`},"waterHeater.setTargetTemp":{capName:`water-heater`,capScope:`device`,addonId:null,access:`create`},"weather.getStatus":{capName:`weather`,capScope:`device`,addonId:null,access:`view`},"webrtcSession.addIceCandidate":{capName:`webrtc-session`,capScope:`device`,addonId:null,access:`create`},"webrtcSession.applyDownlinkProbe":{capName:`webrtc-session`,capScope:`device`,addonId:null,access:`create`},"webrtcSession.closeSession":{capName:`webrtc-session`,capScope:`device`,addonId:null,access:`create`},"webrtcSession.createSession":{capName:`webrtc-session`,capScope:`device`,addonId:null,access:`create`},"webrtcSession.getIceCandidates":{capName:`webrtc-session`,capScope:`device`,addonId:null,access:`view`},"webrtcSession.getSessionDebug":{capName:`webrtc-session`,capScope:`device`,addonId:null,access:`view`},"webrtcSession.getSessionState":{capName:`webrtc-session`,capScope:`device`,addonId:null,access:`view`},"webrtcSession.handleAnswer":{capName:`webrtc-session`,capScope:`device`,addonId:null,access:`create`},"webrtcSession.handleOffer":{capName:`webrtc-session`,capScope:`device`,addonId:null,access:`create`},"webrtcSession.hasAdaptiveBitrate":{capName:`webrtc-session`,capScope:`device`,addonId:null,access:`view`},"webrtcSession.listStreams":{capName:`webrtc-session`,capScope:`device`,addonId:null,access:`view`},"zoneAnalytics.getCameraHistory":{capName:`zone-analytics`,capScope:`device`,addonId:null,access:`view`},"zoneAnalytics.getCurrentSnapshot":{capName:`zone-analytics`,capScope:`device`,addonId:null,access:`view`},"zoneAnalytics.getCurrentSnapshotBatch":{capName:`zone-analytics`,capScope:`device`,addonId:null,access:`view`},"zoneAnalytics.getUnzonedHistory":{capName:`zone-analytics`,capScope:`device`,addonId:null,access:`view`},"zoneAnalytics.getZoneHistory":{capName:`zone-analytics`,capScope:`device`,addonId:null,access:`view`},"zoneRules.listRules":{capName:`zone-rules`,capScope:`device`,addonId:null,access:`view`},"zoneRules.setRules":{capName:`zone-rules`,capScope:`device`,addonId:null,access:`create`},"zones.addZone":{capName:`zones`,capScope:`device`,addonId:null,access:`create`},"zones.listZones":{capName:`zones`,capScope:`device`,addonId:null,access:`view`},"zones.removeZone":{capName:`zones`,capScope:`device`,addonId:null,access:`delete`},"zones.updateZone":{capName:`zones`,capScope:`device`,addonId:null,access:`create`}}),Tq=`accessories.addon-pages.addon-pages-source.addon-routes.addon-settings.addon-widgets.addon-widgets-source.addons.admin-ui.air-quality-sensor.alarm-panel.alerts.ambient-light-sensor.audio-analysis.audio-analyzer.audio-codec.audio-metrics.auth-provider.automation-control.backup.battery.binary.brightness.broker.button.calendar-source.calendars.camera-credentials.camera-grid-layout.camera-pipeline-config.camera-streams.carbon-monoxide.climate-control.color.composer.connection-test.connectivity.consumables.contact.control.core-blocks.cover.custom-model-registry.data-store-provider.database-snapshot.day-night.decoder.detection-pipeline.device-admin-link.device-adoption.device-discovery.device-export.device-extension.device-manager.device-ops.device-provider.device-state.device-status.doorbell.embedding-encoder.enum-sensor.event-emitter.face-gallery.failure-contribution.fan-control.feature-probe.filesystem-browse.flood.gas.humidifier.humidity-sensor.image.image-settings.integrations.intercom.keychain.keychain-admin.lawn-mower-control.llm.llm-runtime.load-contribution.local-network.lock-control.log-channels.log-destination.login-method.media-player.mesh-network.metrics-provider.model-convert.model-distributor.motion.motion-detection.motion-trigger.motion-zones.mqtt-broker.native-object-detection.navigation.network-access.network-link.network-quality.nodes.notification-output.notification-rules.notifier.numeric-sensor.oauth-integration.osd.osd-manager.pet-feeder.pipeline-analytics.pipeline-executor.pipeline-orchestrator.pipeline-runner.plate-gallery.platform-probe.power-meter.presence.pressure-sensor.privacy-mask.ptz.ptz-autotrack.reboot.recording.recording-archive.recording-export.recording-onboard.recording-signal.scene-monitor.script-runner.server-management.settings-store.smoke.smtp-provider.snapshot.sso-bridge.storage.storage-evictable.storage-migration.storage-occupancy.storage-provider.stream-broker.stream-catalog.stream-params.stream-signals.switch.system.tamper.temperature-sensor.terminal-session.toast.turn-provider.update.user-management.user-passkeys.vacuum-control.valve.vector-store.vibration.videoclips.viewer-ui.water-heater.weather.webrtc-session.zone-analytics.zone-rules.zones`.split(`.`),Eq=`accessories.air-quality-sensor.alarm-panel.ambient-light-sensor.audio-analysis.audio-metrics.automation-control.battery.binary.brightness.button.camera-credentials.camera-grid-layout.camera-pipeline-config.camera-streams.carbon-monoxide.climate-control.color.connectivity.consumables.contact.control.cover.day-night.detection-pipeline.device-admin-link.device-discovery.device-extension.device-ops.device-status.doorbell.enum-sensor.event-emitter.fan-control.feature-probe.flood.gas.humidifier.humidity-sensor.image.image-settings.intercom.lawn-mower-control.lock-control.media-player.motion.motion-detection.motion-trigger.motion-zones.native-object-detection.navigation.network-link.notifier.numeric-sensor.osd.pet-feeder.pipeline-analytics.power-meter.presence.pressure-sensor.privacy-mask.ptz.ptz-autotrack.reboot.recording.recording-onboard.recording-signal.scene-monitor.script-runner.smoke.snapshot.stream-catalog.stream-params.stream-signals.switch.tamper.temperature-sensor.update.vacuum-control.valve.vibration.videoclips.water-heater.weather.webrtc-session.zone-analytics.zone-rules.zones`.split(`.`),Dq=`addon-pages.addon-pages-source.addon-routes.addon-settings.addon-widgets.addon-widgets-source.addons.admin-ui.alerts.audio-analyzer.audio-codec.auth-provider.backup.broker.calendar-source.calendars.composer.connection-test.core-blocks.custom-model-registry.data-store-provider.database-snapshot.decoder.device-adoption.device-export.device-manager.device-provider.device-state.embedding-encoder.face-gallery.failure-contribution.filesystem-browse.integrations.keychain.keychain-admin.llm.llm-runtime.load-contribution.local-network.log-channels.log-destination.login-method.mesh-network.metrics-provider.model-convert.model-distributor.mqtt-broker.network-access.network-quality.nodes.notification-output.notification-rules.oauth-integration.osd-manager.pipeline-executor.pipeline-orchestrator.pipeline-runner.plate-gallery.platform-probe.recording-archive.recording-export.server-management.settings-store.smtp-provider.sso-bridge.storage.storage-evictable.storage-migration.storage-occupancy.storage-provider.stream-broker.system.terminal-session.toast.turn-provider.user-management.user-passkeys.vector-store.viewer-ui`.split(`.`),Oq=[{id:`switch.on`,label:`Turn on`,cap:`switch`,method:`setState`,args:{on:!0}},{id:`switch.off`,label:`Turn off`,cap:`switch`,method:`setState`,args:{on:!1}},{id:`lock.lock`,label:`Lock`,cap:`lock-control`,method:`lock`,args:{}},{id:`lock.unlock`,label:`Unlock`,cap:`lock-control`,method:`unlock`,args:{}},{id:`lock.open`,label:`Open latch`,cap:`lock-control`,method:`open`,args:{}},{id:`cover.open`,label:`Open`,cap:`cover`,method:`open`,args:{}},{id:`cover.close`,label:`Close`,cap:`cover`,method:`close`,args:{}},{id:`cover.stop`,label:`Stop`,cap:`cover`,method:`stop`,args:{}},{id:`valve.open`,label:`Open valve`,cap:`valve`,method:`open`,args:{}},{id:`valve.close`,label:`Close valve`,cap:`valve`,method:`close`,args:{}},{id:`valve.stop`,label:`Stop valve`,cap:`valve`,method:`stop`,args:{}},{id:`humidifier.on`,label:`Humidifier on`,cap:`humidifier`,method:`setOn`,args:{on:!0}},{id:`humidifier.off`,label:`Humidifier off`,cap:`humidifier`,method:`setOn`,args:{on:!1}},{id:`waterHeater.off`,label:`Water heater off`,cap:`water-heater`,method:`setOperationMode`,args:{mode:`off`}},{id:`waterHeater.awayOn`,label:`Water heater away on`,cap:`water-heater`,method:`setAway`,args:{on:!0}},{id:`waterHeater.awayOff`,label:`Water heater away off`,cap:`water-heater`,method:`setAway`,args:{on:!1}},{id:`climate.off`,label:`Climate off`,cap:`climate-control`,method:`setMode`,args:{mode:`off`}},{id:`climate.heat`,label:`Heat`,cap:`climate-control`,method:`setMode`,args:{mode:`heat`}},{id:`climate.cool`,label:`Cool`,cap:`climate-control`,method:`setMode`,args:{mode:`cool`}},{id:`climate.auto`,label:`Climate auto`,cap:`climate-control`,method:`setMode`,args:{mode:`auto`}},{id:`fan.off`,label:`Fan off`,cap:`fan-control`,method:`setPercentage`,args:{percentage:0}},{id:`fan.full`,label:`Fan full`,cap:`fan-control`,method:`setPercentage`,args:{percentage:100}},{id:`vacuum.start`,label:`Start cleaning`,cap:`vacuum-control`,method:`start`,args:{}},{id:`vacuum.pause`,label:`Pause`,cap:`vacuum-control`,method:`pause`,args:{}},{id:`vacuum.stop`,label:`Stop`,cap:`vacuum-control`,method:`stop`,args:{}},{id:`vacuum.dock`,label:`Return to base`,cap:`vacuum-control`,method:`returnToBase`,args:{}},{id:`lawnMower.start`,label:`Start mowing`,cap:`lawn-mower-control`,method:`startMowing`,args:{}},{id:`lawnMower.pause`,label:`Pause mower`,cap:`lawn-mower-control`,method:`pause`,args:{}},{id:`lawnMower.dock`,label:`Dock mower`,cap:`lawn-mower-control`,method:`dock`,args:{}},{id:`media.play`,label:`Play`,cap:`media-player`,method:`play`,args:{}},{id:`media.pause`,label:`Pause media`,cap:`media-player`,method:`pause`,args:{}},{id:`media.stop`,label:`Stop media`,cap:`media-player`,method:`stop`,args:{}},{id:`media.next`,label:`Next track`,cap:`media-player`,method:`next`,args:{}},{id:`media.previous`,label:`Previous track`,cap:`media-player`,method:`previous`,args:{}},{id:`script.run`,label:`Run script`,cap:`script-runner`,method:`run`,args:{}},{id:`script.stop`,label:`Stop script`,cap:`script-runner`,method:`stop`,args:{}},{id:`haAutomation.enable`,label:`Enable automation`,cap:`automation-control`,method:`enable`,args:{}},{id:`haAutomation.disable`,label:`Disable automation`,cap:`automation-control`,method:`disable`,args:{}},{id:`haAutomation.trigger`,label:`Trigger automation`,cap:`automation-control`,method:`trigger`,args:{}},{id:`petFeeder.feed`,label:`Feed`,cap:`pet-feeder`,method:`feed`,openArgs:[{key:`grams`,label:`Grams`,kind:`number`}]},{id:`petFeeder.callPet`,label:`Call pet`,cap:`pet-feeder`,method:`callPet`,args:{}},{id:`ptz.goHome`,label:`PTZ go home`,cap:`ptz`,method:`goHome`,args:{}},{id:`ptz.goToPreset`,label:`PTZ go to preset`,cap:`ptz`,method:`goToPreset`,openArgs:[{key:`presetId`,label:`Preset id`,kind:`string`}]},{id:`ptz.autotrackOn`,label:`Autotrack on`,cap:`ptz-autotrack`,method:`setEnabled`,args:{enabled:!0}},{id:`ptz.autotrackOff`,label:`Autotrack off`,cap:`ptz-autotrack`,method:`setEnabled`,args:{enabled:!1}},{id:`privacy.maskOn`,label:`Privacy mask on`,cap:`privacy-mask`,method:`setMask`,args:{patch:{enabled:!0}}},{id:`privacy.maskOff`,label:`Privacy mask off`,cap:`privacy-mask`,method:`setMask`,args:{patch:{enabled:!1}}},{id:`privacy.micOn`,label:`Microphone on`,cap:`privacy-mask`,method:`setAudioEnabled`,args:{enabled:!0}},{id:`privacy.micOff`,label:`Microphone off`,cap:`privacy-mask`,method:`setAudioEnabled`,args:{enabled:!1}},{id:`dayNight.auto`,label:`Day/night auto`,cap:`day-night`,method:`setSettings`,args:{settings:{mode:`auto`}}},{id:`dayNight.day`,label:`Day mode`,cap:`day-night`,method:`setSettings`,args:{settings:{mode:`day`}}},{id:`dayNight.night`,label:`Night mode`,cap:`day-night`,method:`setSettings`,args:{settings:{mode:`night`}}},{id:`reboot.reboot`,label:`Reboot device`,cap:`reboot`,method:`reboot`,args:{}},{id:`brightness.full`,label:`Brightness full`,cap:`brightness`,method:`setBrightness`,args:{percentage:100}},{id:`brightness.half`,label:`Brightness half`,cap:`brightness`,method:`setBrightness`,args:{percentage:50}},{id:`brightness.off`,label:`Brightness off`,cap:`brightness`,method:`setBrightness`,args:{percentage:0}},{id:`motionTrigger.on`,label:`Motion trigger on`,cap:`motion-trigger`,method:`setMotionTrigger`,args:{enabled:!0}},{id:`motionTrigger.off`,label:`Motion trigger off`,cap:`motion-trigger`,method:`setMotionTrigger`,args:{enabled:!1}},{id:`alarm.trigger`,label:`Trigger alarm`,cap:`alarm-panel`,method:`trigger`,args:{}},{id:`alarm.disarm`,label:`Disarm`,cap:`alarm-panel`,method:`disarm`,args:{}},{id:`alarm.arm.home`,label:`Arm home`,cap:`alarm-panel`,method:`arm`,args:{mode:`home`}},{id:`alarm.arm.away`,label:`Arm away`,cap:`alarm-panel`,method:`arm`,args:{mode:`away`}},{id:`alarm.arm.night`,label:`Arm night`,cap:`alarm-panel`,method:`arm`,args:{mode:`night`}},{id:`alarm.arm.vacation`,label:`Arm vacation`,cap:`alarm-panel`,method:`arm`,args:{mode:`vacation`}},{id:`alarm.arm.custom_bypass`,label:`Arm custom bypass`,cap:`alarm-panel`,method:`arm`,args:{mode:`custom_bypass`}},{id:`button.press`,label:`Press`,cap:`button`,method:`press`,args:{}}];function kq(e){for(let[t,n]of Object.entries(wq))if(n.capName===e.cap&&n.capScope===`device`&&n.access!==`view`&&t.slice(t.indexOf(`.`)+1)===e.method)return!0;return!1}function Aq(e,t){if(e===t)return!0;if(e===null||t===null)return e===t;if(typeof e!=`object`||typeof t!=`object`)return!1;if(Array.isArray(e)||Array.isArray(t)){if(!Array.isArray(e)||!Array.isArray(t)||e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(!Aq(e[n],t[n]))return!1;return!0}let n=e,r=t,i=Object.keys(n),a=Object.keys(r);if(i.length!==a.length)return!1;for(let e of i)if(!Aq(n[e],r[e]))return!1;return!0}function jq(e,t){return Aq(e??{},t??{})}function Mq(e,t){if(e.openArgs!==void 0){let n=new Set(e.openArgs.map(e=>e.key)),r=e.args??{},i=t??{};for(let e of Object.keys(r))if(!Aq(r[e],i[e]))return!1;for(let e of Object.keys(i))if(!n.has(e)&&!(e in r))return!1;return!0}return jq(e.args,t)}var Nq={[R.Camera]:[`ptz`,`ptz-autotrack`,`privacy-mask`,`day-night`,`reboot`,`motion-trigger`],[R.Hub]:[],[R.Light]:[`switch`,`brightness`],[R.Siren]:[`switch`,`motion-trigger`],[R.Switch]:[`switch`,`motion-trigger`],[R.Sensor]:[],[R.Thermostat]:[`climate-control`],[R.Climate]:[`climate-control`],[R.Button]:[`button`],[R.EventEmitter]:[],[R.Update]:[],[R.Generic]:[],[R.Notifier]:[],[R.Script]:[`script-runner`],[R.Automation]:[`automation-control`],[R.Lock]:[`lock-control`],[R.Cover]:[`cover`],[R.Valve]:[`valve`],[R.Humidifier]:[`humidifier`],[R.WaterHeater]:[`water-heater`],[R.Fan]:[`fan-control`,`switch`],[R.MediaPlayer]:[`media-player`],[R.AlarmPanel]:[`alarm-panel`],[R.Control]:[],[R.Presence]:[],[R.Weather]:[],[R.Vacuum]:[`vacuum-control`],[R.LawnMower]:[`lawn-mower-control`],[R.Container]:[],[R.Image]:[],[R.PetFeeder]:[`pet-feeder`]};function Pq(e){return e!==R.Container}function Fq(e){switch(e){case R.Climate:case R.Thermostat:case R.Humidifier:case R.WaterHeater:return`climate-family`;case R.Cover:case R.Valve:return`cover-family`;case R.Switch:case R.Siren:case R.Light:return`switch-family`;case R.Vacuum:case R.LawnMower:return`robot-family`;default:return e}}function Iq(e,t){return Fq(e)===Fq(t)}function Lq(e){if(e.length===0)return[];let t=new Set(e);return Oq.filter(e=>t.has(e.cap)&&kq(e))}function Rq(e){return Object.values(R).includes(e)?Lq(Nq[e]):[]}function zq(e){let t=e.boundCaps!==void 0&&e.boundCaps.length>0?Lq(e.boundCaps):[];return t.length>0?t:e.deviceType!==void 0&&e.deviceType.length>0?Rq(e.deviceType):[]}function Bq(e){if(e.length===0)return[];let t=null;for(let n of e){let e=zq({boundCaps:n.boundCaps,deviceType:n.deviceType});if(t===null){t=e;continue}let r=new Set(e.map(e=>e.id));t=t.filter(e=>r.has(e.id))}return t??[]}function Vq(){return Oq.filter(kq)}function Hq(e,t,n){for(let r of Oq)if(!(r.cap!==e||r.method!==t)&&Mq(r,n))return r;return null}function Uq(e,t,n){let r=Hq(e,t,n);return r===null?`custom:${e}.${t}`:r.id}function Wq(e,t){return!e||e.length===0?!1:e.includes(t.when.hasFeature)}var Gq={id:`battery`,label:`Battery-operated camera`,when:{hasFeature:mf.BatteryOperated},defaults:{audioMode:`disabled`,detectionMode:`on-motion`},settings:{}},Kq=[Gq];function qq(e){for(let t of Kq)if(Wq(e,t))return t;return null}var Jq=`device.state-changed`;function Yq(e){let t=new Map,n=new Map,r=null,i=(e,t)=>`${e}:${t}`,a=()=>{r||e.live?.onEvent&&(r=e.live.onEvent.subscribe({category:Jq},{onData:e=>{let r=e.data;if(!r||typeof r.deviceId!=`number`||typeof r.capName!=`string`)return;let a=i(r.deviceId,r.capName);t.set(a,r.slice);let o=n.get(a);if(o)for(let e of o)try{e(r.slice)}catch{}}}))},o=()=>{r&&(n.size>0||(r.unsubscribe(),r=null))};return{read(e,n){return t.get(i(e,n))},async refresh(r,a){let o=await e.deviceState.getCapSlice.query({deviceId:r,capName:a}),s=i(r,a);t.set(s,o??void 0);let c=n.get(s);if(c)for(let e of c)try{e(o??void 0)}catch{}},watch(e,t,r){let s=i(e,t),c=n.get(s);return c||(c=new Set,n.set(s,c)),c.add(r),a(),()=>{c.delete(r),c.size===0&&n.delete(s),o()}},async write(t,n,r){await e.deviceState.setCapSlice.mutate({deviceId:t,capName:n,slice:r})}}}function Xq(e){let{eventBus:t,api:n}=e,r=new Map,i=new Map,a=null,o=(e,t)=>`${e}:${t}`,s=(e,t,n)=>{let a=o(e,t);r.set(a,n);let s=i.get(a);if(s)for(let e of s)try{e(n)}catch{}},c=()=>{a||=t.subscribe({category:Jq},e=>{let t=e.data;if(typeof t!=`object`||!t)return;let n=Reflect.get(t,`deviceId`),r=Reflect.get(t,`capName`);typeof n!=`number`||typeof r!=`string`||s(n,r,Reflect.get(t,`slice`))})},l=()=>{a!==null&&(i.size>0||(a(),a=null))};return{read(e,t){return r.get(o(e,t))},async refresh(e,t){s(e,t,await n.deviceState.getCapSlice.query({deviceId:e,capName:t})??void 0)},watch(e,t,n){let r=o(e,t),a=i.get(r);return a||(a=new Set,i.set(r,a)),a.add(n),c(),()=>{a.delete(n),a.size===0&&i.delete(r),l()}},async write(e,t,r){await n.deviceState.setCapSlice.mutate({deviceId:e,capName:t,slice:r})}}}function Zq(e,t,n){let r=(e,t)=>`${e}:${t}`;return{read(t,n){return e.get(t)?.get(n)},async refresh(){},watch(e,n,i){let a=r(e,n),o=t.get(a);return o||(o=new Set,t.set(a,o)),o.add(i),()=>{o.delete(i),o.size===0&&t.delete(a)}},async write(e,t,r){if(!n)throw Error(`createMirrorSource: write requires an api reference — pass it as the third argument when constructing the source`);await n.deviceState.setCapSlice.mutate({deviceId:e,capName:t,slice:r})}}}function Z(e,t,n){let r=Qq(e)?e:Yq(e);return{get value(){return r.read(t,n)},refresh(){return r.refresh(t,n)},subscribe(e){let i=r.watch(t,n,t=>{try{e(t)}catch{}});try{e(r.read(t,n))}catch{}return r.read(t,n)===void 0&&r.refresh(t,n).catch(()=>void 0),i},async set(e){await r.write(t,n,e)},async patch(e){let i={...r.read(t,n),...e};await r.write(t,n,i)}}}function Qq(e){return typeof e.read==`function`&&typeof e.watch==`function`}var $q=[`device`,`lighting`,`sensing`,`place`,`life`],eJ=[{key:`camera`,group:`device`,synonyms:[`telecamera`,`videocamera`,`camera`,`cam`]},{key:`network`,group:`device`,synonyms:[`rete`,`network`,`lan`]},{key:`toggle-left`,group:`device`,synonyms:[`interruttore`,`switch`,`toggle`]},{key:`toggle-right`,group:`device`,synonyms:[`interruttore`,`switch`,`toggle`,`acceso`]},{key:`circle-dot`,group:`device`,synonyms:[`pulsante`,`bottone`,`button`,`dot`]},{key:`refresh-cw`,group:`device`,synonyms:[`aggiorna`,`ricarica`,`refresh`,`reload`,`ciclo`]},{key:`box`,group:`device`,synonyms:[`scatola`,`box`,`contenitore`]},{key:`scroll-text`,group:`device`,synonyms:[`registro`,`log`,`testo`]},{key:`workflow`,group:`device`,synonyms:[`automazione`,`flusso`,`workflow`,`scenario`]},{key:`lock`,group:`device`,synonyms:[`serratura`,`chiave`,`lucchetto`,`chiuso`,`locked`]},{key:`lock-open`,group:`device`,synonyms:[`serratura`,`aperta`,`sbloccato`,`unlocked`]},{key:`blinds`,group:`device`,synonyms:[`tapparella`,`persiana`,`serranda`,`avvolgibile`,`shutter`,`blind`,`veneziana`]},{key:`air-vent`,group:`device`,synonyms:[`bocchetta`,`aria`,`ventilazione`,`condizionatore`,`vent`]},{key:`monitor-play`,group:`device`,synonyms:[`schermo`,`riproduzione`,`player`,`display`]},{key:`sliders-horizontal`,group:`device`,synonyms:[`regolazione`,`cursori`,`impostazioni`,`slider`]},{key:`map-pin`,group:`device`,synonyms:[`posizione`,`luogo`,`mappa`,`pin`]},{key:`bot`,group:`device`,synonyms:[`robot`,`aspirapolvere`,`bot`]},{key:`tractor`,group:`device`,synonyms:[`trattore`,`tosaerba`,`giardino`]},{key:`image`,group:`device`,synonyms:[`immagine`,`foto`,`snapshot`]},{key:`bone`,group:`device`,synonyms:[`osso`,`cane`]},{key:`door-closed`,group:`device`,synonyms:[`porta`,`chiusa`,`contatto`]},{key:`door-open`,group:`device`,synonyms:[`porta`,`aperta`,`contatto`,`ingresso`,`uscita`]},{key:`crosshair`,group:`device`,synonyms:[`mirino`,`puntamento`,`centro`]},{key:`eye`,group:`device`,synonyms:[`occhio`,`visibile`,`visto`]},{key:`eye-off`,group:`device`,synonyms:[`privacy`,`nascosto`,`oscurato`,`mascherato`,`invisibile`]},{key:`smartphone`,group:`device`,synonyms:[`telefono`,`cellulare`,`smartphone`]},{key:`phone`,group:`device`,synonyms:[`telefono`,`chiamata`]},{key:`tablet`,group:`device`,synonyms:[`tablet`,`ipad`]},{key:`laptop`,group:`device`,synonyms:[`portatile`,`laptop`,`notebook`]},{key:`monitor`,group:`device`,synonyms:[`monitor`,`schermo`]},{key:`tv`,group:`device`,synonyms:[`televisore`,`tv`]},{key:`speaker`,group:`device`,synonyms:[`altoparlante`,`cassa`,`speaker`]},{key:`printer`,group:`device`,synonyms:[`stampante`]},{key:`projector`,group:`device`,synonyms:[`proiettore`]},{key:`gamepad-2`,group:`device`,synonyms:[`console`,`gioco`,`joystick`]},{key:`radio`,group:`device`,synonyms:[`radio`]},{key:`router`,group:`device`,synonyms:[`router`,`modem`]},{key:`bluetooth`,group:`device`,synonyms:[`bluetooth`]},{key:`cpu`,group:`device`,synonyms:[`processore`,`cpu`,`chip`,`dispositivo`]},{key:`hard-drive`,group:`device`,synonyms:[`disco`,`hdd`,`archiviazione`,`storage`]},{key:`server`,group:`device`,synonyms:[`server`,`nas`]},{key:`mic`,group:`device`,synonyms:[`microfono`,`audio`]},{key:`mic-off`,group:`device`,synonyms:[`microfono`,`spento`,`muto`]},{key:`video`,group:`device`,synonyms:[`video`]},{key:`video-off`,group:`device`,synonyms:[`video`,`spento`]},{key:`music`,group:`device`,synonyms:[`musica`]},{key:`plug`,group:`device`,synonyms:[`presa`,`spina`,`plug`]},{key:`plug-zap`,group:`device`,synonyms:[`presa`,`alimentata`]},{key:`power`,group:`device`,synonyms:[`accensione`,`alimentazione`,`power`]},{key:`power-off`,group:`device`,synonyms:[`spegnimento`,`spento`]},{key:`cable`,group:`device`,synonyms:[`cavo`]},{key:`battery`,group:`device`,synonyms:[`batteria`]},{key:`battery-charging`,group:`device`,synonyms:[`batteria`,`carica`,`ricarica`]},{key:`battery-full`,group:`device`,synonyms:[`batteria`,`carica`,`piena`]},{key:`battery-low`,group:`device`,synonyms:[`batteria`,`scarica`]},{key:`key`,group:`device`,synonyms:[`chiave`]},{key:`key-round`,group:`device`,synonyms:[`chiave`,`tonda`]},{key:`mailbox`,group:`device`,synonyms:[`cassetta`,`postale`,`posta`]},{key:`package`,group:`device`,synonyms:[`pacco`,`consegna`]},{key:`shield`,group:`device`,synonyms:[`scudo`,`protezione`,`sicurezza`,`allarme`]},{key:`shield-check`,group:`device`,synonyms:[`protetto`,`sicuro`,`armato`]},{key:`shield-off`,group:`device`,synonyms:[`protezione`,`disattivata`,`disarmato`]},{key:`briefcase`,group:`device`,synonyms:[`ufficio`,`lavoro`,`valigetta`,`studio`]},{key:`lightbulb`,group:`lighting`,synonyms:[`luce`,`lampadina`,`lampada`,`light`]},{key:`lamp`,group:`lighting`,synonyms:[`lampada`,`abatjour`]},{key:`lamp-ceiling`,group:`lighting`,synonyms:[`plafoniera`,`lampadario`,`luce`,`soffitto`]},{key:`lamp-desk`,group:`lighting`,synonyms:[`lampada`,`scrivania`,`abatjour`]},{key:`lamp-floor`,group:`lighting`,synonyms:[`piantana`,`lampada`,`terra`]},{key:`flashlight`,group:`lighting`,synonyms:[`faretto`,`torcia`,`spot`,`faro`]},{key:`heater`,group:`lighting`,synonyms:[`riscaldamento`,`termosifone`,`stufa`,`calore`]},{key:`snowflake`,group:`lighting`,synonyms:[`freddo`,`raffrescamento`,`aria`,`condizionata`,`neve`]},{key:`thermometer-sun`,group:`lighting`,synonyms:[`caldo`,`temperatura`,`alta`]},{key:`thermometer-snowflake`,group:`lighting`,synonyms:[`freddo`,`temperatura`,`bassa`]},{key:`refrigerator`,group:`lighting`,synonyms:[`frigorifero`,`frigo`]},{key:`microwave`,group:`lighting`,synonyms:[`microonde`,`forno`]},{key:`washing-machine`,group:`lighting`,synonyms:[`lavatrice`,`lavastoviglie`,`asciugatrice`]},{key:`cooking-pot`,group:`lighting`,synonyms:[`pentola`,`cucina`,`fornello`]},{key:`utensils`,group:`lighting`,synonyms:[`cucina`,`posate`,`sala`,`pranzo`]},{key:`thermometer`,group:`sensing`,synonyms:[`temperatura`,`termometro`,`termostato`]},{key:`droplets`,group:`sensing`,synonyms:[`umidita`,`acqua`,`allagamento`,`perdita`]},{key:`droplet`,group:`sensing`,synonyms:[`goccia`,`acqua`,`perdita`,`allagamento`]},{key:`gauge`,group:`sensing`,synonyms:[`misura`,`livello`,`pressione`,`indicatore`]},{key:`gauge2`,group:`sensing`,synonyms:[`misura`,`livello`,`pressione`,`indicatore`],aliasOf:`gauge`},{key:`sun`,group:`sensing`,synonyms:[`sole`,`luminosita`,`giorno`,`esterno`]},{key:`sun-medium`,group:`sensing`,synonyms:[`sole`,`luminosita`]},{key:`sunrise`,group:`sensing`,synonyms:[`alba`]},{key:`moon`,group:`sensing`,synonyms:[`notte`,`luna`,`notturna`,`nightvision`]},{key:`wind`,group:`sensing`,synonyms:[`vento`,`aria`,`gas`,`monossido`,`co`]},{key:`cloud`,group:`sensing`,synonyms:[`nuvola`,`nuvoloso`]},{key:`cloud-rain`,group:`sensing`,synonyms:[`pioggia`]},{key:`cloud-sun`,group:`sensing`,synonyms:[`variabile`,`sole`,`nuvole`]},{key:`waves`,group:`sensing`,synonyms:[`onde`,`acqua`,`vibrazione`]},{key:`sprout`,group:`sensing`,synonyms:[`irrigazione`,`pianta`,`germoglio`,`orto`]},{key:`leaf`,group:`sensing`,synonyms:[`foglia`,`pianta`,`verde`]},{key:`flower`,group:`sensing`,synonyms:[`fiore`,`pianta`]},{key:`zap`,group:`sensing`,synonyms:[`energia`,`corrente`,`consumo`,`watt`,`elettricita`]},{key:`flame`,group:`sensing`,synonyms:[`fiamma`,`gas`,`fuoco`,`incendio`]},{key:`bell`,group:`sensing`,synonyms:[`campanello`,`suoneria`,`notifica`,`bell`,`chime`]},{key:`bell-ring`,group:`sensing`,synonyms:[`campanello`,`suona`,`doorbell`,`notifica`]},{key:`bell-off`,group:`sensing`,synonyms:[`silenzioso`,`notifiche`,`disattivate`,`muto`]},{key:`siren`,group:`sensing`,synonyms:[`sirena`,`allarme`]},{key:`radar`,group:`sensing`,synonyms:[`movimento`,`presenza`,`pir`,`rilevamento`,`radar`]},{key:`activity`,group:`sensing`,synonyms:[`attivita`,`sensore`,`generico`]},{key:`hash`,group:`sensing`,synonyms:[`numero`,`contatore`,`valore`]},{key:`clock`,group:`sensing`,synonyms:[`orologio`,`ora`,`tempo`]},{key:`timer`,group:`sensing`,synonyms:[`timer`,`conto`,`rovescia`]},{key:`calendar`,group:`sensing`,synonyms:[`calendario`,`data`,`pianificazione`]},{key:`pipette`,group:`sensing`,synonyms:[`qualita`,`aria`,`misura`,`campione`]},{key:`fan`,group:`sensing`,synonyms:[`ventilatore`,`ventola`,`aria`]},{key:`bath`,group:`sensing`,synonyms:[`bagno`,`vasca`,`doccia`]},{key:`footprints`,group:`sensing`,synonyms:[`movimento`,`passi`,`presenza`,`motion`]},{key:`alarm-smoke`,group:`sensing`,synonyms:[`fumo`,`antincendio`,`rilevatore`]},{key:`shield-alert`,group:`sensing`,synonyms:[`manomissione`,`allarme`,`tamper`,`avviso`]},{key:`vibrate`,group:`sensing`,synonyms:[`vibrazione`,`urto`,`tamper`]},{key:`wifi`,group:`sensing`,synonyms:[`wifi`,`rete`,`segnale`]},{key:`wifi-off`,group:`sensing`,synonyms:[`wifi`,`assente`,`offline`,`disconnesso`]},{key:`volume-2`,group:`sensing`,synonyms:[`volume`,`audio`,`altoparlante`,`suono`]},{key:`volume-x`,group:`sensing`,synonyms:[`muto`,`silenziato`,`volume`,`spento`]},{key:`heart`,group:`sensing`,synonyms:[`cuore`,`preferito`,`salute`]},{key:`heart-pulse`,group:`sensing`,synonyms:[`battito`,`salute`,`monitoraggio`]},{key:`star`,group:`sensing`,synonyms:[`preferito`,`stella`,`importante`]},{key:`sparkles`,group:`sensing`,synonyms:[`automatico`,`intelligente`,`ai`,`scena`]},{key:`house`,group:`place`,synonyms:[`casa`,`abitazione`,`home`]},{key:`sofa`,group:`place`,synonyms:[`salone`,`soggiorno`,`divano`,`living`]},{key:`bed-double`,group:`place`,synonyms:[`camera`,`letto`,`matrimoniale`]},{key:`bed`,group:`place`,synonyms:[`cameretta`,`letto`,`singolo`]},{key:`warehouse`,group:`place`,synonyms:[`magazzino`,`capanno`,`deposito`,`cantina`]},{key:`trees`,group:`place`,synonyms:[`giardino`,`alberi`,`esterno`,`parco`]},{key:`tree-pine`,group:`place`,synonyms:[`albero`,`pino`,`giardino`]},{key:`fence`,group:`place`,synonyms:[`recinto`,`cancello`,`staccionata`,`perimetro`]},{key:`store`,group:`place`,synonyms:[`negozio`,`ingresso`,`vetrina`]},{key:`building`,group:`place`,synonyms:[`edificio`,`palazzo`]},{key:`building-2`,group:`place`,synonyms:[`edificio`,`uffici`,`condominio`]},{key:`mountain`,group:`place`,synonyms:[`montagna`,`esterno`,`panorama`]},{key:`umbrella`,group:`place`,synonyms:[`tenda`,`markise`,`ombrellone`,`pergola`,`veranda`]},{key:`dumbbell`,group:`place`,synonyms:[`palestra`,`attrezzi`]},{key:`wrench`,group:`place`,synonyms:[`officina`,`manutenzione`,`attrezzi`,`utenze`]},{key:`hammer`,group:`place`,synonyms:[`officina`,`martello`,`lavori`]},{key:`drill`,group:`place`,synonyms:[`officina`,`trapano`,`lavori`]},{key:`waves-ladder`,group:`place`,synonyms:[`piscina`,`vasca`]},{key:`circle-parking`,group:`place`,synonyms:[`parcheggio`,`posto`,`auto`,`garage`]},{key:`route`,group:`place`,synonyms:[`percorso`,`strada`,`vialetto`,`tragitto`]},{key:`car`,group:`life`,synonyms:[`auto`,`macchina`,`veicolo`,`parcheggio`]},{key:`bike`,group:`life`,synonyms:[`bicicletta`,`bici`,`moto`]},{key:`bus`,group:`life`,synonyms:[`autobus`,`pullman`]},{key:`truck`,group:`life`,synonyms:[`camion`,`furgone`,`consegna`]},{key:`plane`,group:`life`,synonyms:[`aereo`]},{key:`train-front`,group:`life`,synonyms:[`treno`]},{key:`sailboat`,group:`life`,synonyms:[`barca`,`imbarcazione`]},{key:`dog`,group:`life`,synonyms:[`cane`,`animale`]},{key:`cat`,group:`life`,synonyms:[`gatto`,`animale`]},{key:`bird`,group:`life`,synonyms:[`uccello`,`animale`]},{key:`paw-print`,group:`life`,synonyms:[`animale`,`zampa`,`pet`]},{key:`baby`,group:`life`,synonyms:[`neonato`,`bimbo`,`cameretta`,`babymonitor`]},{key:`user`,group:`life`,synonyms:[`persona`,`utente`]},{key:`users`,group:`life`,synonyms:[`persone`,`gruppo`,`famiglia`]},{key:`person-standing`,group:`life`,synonyms:[`persona`,`piedi`,`presenza`]}],tJ=eJ.map(e=>e.key),nJ=eJ.filter(e=>e.aliasOf===void 0).map(e=>e.key),rJ=new Map(eJ.map(e=>[e.key,e]));function iJ(e){return typeof e==`string`&&rJ.has(e)}function aJ(e,t){return typeof e==`string`&&iJ(e)?e:t}function oJ(e){return rJ.get(e)}function sJ(e){return eJ.filter(t=>t.group===e)}function cJ(e){return e.normalize(`NFD`).replace(/\p{Diacritic}/gu,``).toLowerCase().replace(/[_-]+/g,` `).trim()}function lJ(e,t){let n=0;for(let r of t)if(r===e[n]&&(n+=1),n===e.length)return!0;return e.length===0}function uJ(e,t){return t===e?100:t.startsWith(e)?80:t.split(` `).some(t=>t.startsWith(e))?60:t.includes(e)?40:lJ(e,t)?15:0}function dJ(e,t){let n=cJ(e);if(n.length===0)return eJ.filter(e=>e.aliasOf===void 0).map(e=>({entry:e,score:0}));let r=[];for(let e of eJ){if(e.aliasOf!==void 0)continue;let i=[cJ(e.key),...e.synonyms.map(cJ),...(t?.get(e.key)??[]).map(cJ)],a=0;for(let[e,t]of i.entries()){let r=uJ(n,t);if(r===0)continue;let i=e===0?r+1:r;i>a&&(a=i)}a>0&&r.push({entry:e,score:a})}return r.sort((e,t)=>t.score-e.score)}function fJ(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function pJ(e,t){let n=t.split(`.`),r=e;for(let e of n){if(!fJ(r))return;r=r[e]}return r}function mJ(e,t,n){let r=t.indexOf(`.`);if(r===-1)return{...e,[t]:n};let i=t.slice(0,r),a=t.slice(r+1),o=e[i],s=fJ(o)?o:{};return{...e,[i]:mJ(s,a,n)}}var hJ=3e4,gJ=1e4;async function _J(e,t,n){let r,i=new Promise((e,i)=>{r=setTimeout(()=>i(Error(`${n} timed out after ${String(t)}ms`)),t)});try{return await Promise.race([e,i])}finally{r!==void 0&&clearTimeout(r)}}function vJ(e){let t=e.intervalMs??3e4,n=e.failuresToOffline??3,r=e.probeTimeoutMs??1e4,i=e.runImmediately??!0,a=!1,o=!1,s=0,c,l=async()=>{if(!a&&!o&&!(e.isEnabled&&!e.isEnabled())){o=!0;try{let t=await _J(Promise.resolve().then(e.probe),r,`reachability probe`);if(a)return;t?(s=0,e.setOnline(!0)):u(`probe resolved unreachable`)}catch(e){if(a)return;u(e instanceof Error?e.message:`probe threw`)}finally{o=!1}}},u=t=>{s+=1,e.logger?.debug(`reachability probe failed`,{reason:t,consecutiveFailures:s,failuresToOffline:n}),s>=n&&e.setOnline(!1)};return c=setInterval(()=>{l()},t),typeof c==`object`&&c&&`unref`in c&&c.unref(),i&&l(),{stop:()=>{a||(a=!0,c!==void 0&&clearInterval(c),c=void 0)}}}var yJ=`lastFetchedAt`,bJ=6e4,xJ=10*6e4;function SJ(e){let{runtimeState:t,cap:n,ownDeviceId:r,refresh:i,staleMs:a,empty:o,logger:s}=e,c=e.refreshMissCooldownMs??6e4,l=e.staleRead??`await-refresh`,u=0,d=null,f=()=>{let e=t.getCapState(n.name)?.[yJ];return typeof e==`number`?e:0},p=e=>{u=Date.now()+c,s?.warn(`${n.name}: refresh did not land — serving the last slice and not re-reading the camera for ${String(c)}ms`,{tags:{deviceId:r},meta:{cooldownMs:c,error:e===void 0?null:e instanceof Error?e.message:String(e)}})},m=async e=>{try{await i()}catch(e){throw p(e),e}if(f()>e){u!==0&&(u=0,s?.info(`${n.name}: refresh landed again — resuming normal polling`,{tags:{deviceId:r}}));return}p(void 0)},h=e=>{let t=d;if(t!==null)return t;let n=m(e).catch(()=>void 0).finally(()=>{d=null});return d=n,n},g=async()=>{let e=t.getCapState(n.name),r=f();if(e&&Date.now()-r<=a){u=0;return}if(!(Date.now()<u)){if(l===`serve-and-revalidate`){if(d!==null)return;if(e&&r>0){h(r);return}await h(r);return}await m(r)}},_=()=>{let e=t.getCapState(n.name);if(!e)return o();let{[yJ]:r,...i}=e;return i};return{ensureFresh:g,getStatus:async({deviceId:e})=>{if(e!==r)throw Error(`${n.name}: deviceId mismatch, expected ${r}, got ${e}`);return await g(),_()}}}function CJ(e,t,n){let r=e,i=n?.stateSource??Yq(e);function a(e,n){let r=typeof e==`object`&&e?e:{};return n===void 0?{...r,deviceId:t.deviceId}:{...r,deviceId:t.deviceId,nodeId:n}}function o(e,t,n,i,a){let o=r[e]?.[t];if(!o)throw Error(`DeviceProxy: api has no '${e}.${t}'`);let s=o;return n===`mutation`?s.mutate(i):n===`subscription`?s.subscribe(i,a):s.query(i)}function s(e,n,r,i,s,c){return o(n,r,i,a(s,t.entries.find(t=>t.capName===e)?.providerNodeId),c)}function c(e,t,n,r,i){return o(e,t,n,a(r,void 0),i)}function l(e){return t.entries.some(t=>t.capName===e)}let u={setChildHidden:e=>s(`accessories`,`accessories`,`setChildHidden`,`mutation`,e),getStatus:e=>s(`accessories`,`accessories`,`getStatus`,`query`,e)},d={getStatus:e=>s(`air-quality-sensor`,`airQualitySensor`,`getStatus`,`query`,e)},f={arm:e=>s(`alarm-panel`,`alarmPanel`,`arm`,`mutation`,e),disarm:e=>s(`alarm-panel`,`alarmPanel`,`disarm`,`mutation`,e),trigger:e=>s(`alarm-panel`,`alarmPanel`,`trigger`,`mutation`,e),getStatus:e=>s(`alarm-panel`,`alarmPanel`,`getStatus`,`query`,e)},p={getStatus:e=>s(`ambient-light-sensor`,`ambientLightSensor`,`getStatus`,`query`,e)},m={resolveDeviceSettings:e=>s(`audio-analysis`,`audioAnalysis`,`resolveDeviceSettings`,`query`,e),getDeviceSettingsContribution:e=>s(`audio-analysis`,`audioAnalysis`,`getDeviceSettingsContribution`,`query`,e),getDeviceLiveContribution:e=>s(`audio-analysis`,`audioAnalysis`,`getDeviceLiveContribution`,`query`,e),applyDeviceSettingsPatch:e=>s(`audio-analysis`,`audioAnalysis`,`applyDeviceSettingsPatch`,`mutation`,e)},h={getCurrentSnapshot:e=>s(`audio-metrics`,`audioMetrics`,`getCurrentSnapshot`,`query`,e),getHistory:e=>s(`audio-metrics`,`audioMetrics`,`getHistory`,`query`,e)},g={enable:e=>s(`automation-control`,`automationControl`,`enable`,`mutation`,e),disable:e=>s(`automation-control`,`automationControl`,`disable`,`mutation`,e),trigger:e=>s(`automation-control`,`automationControl`,`trigger`,`mutation`,e),getStatus:e=>s(`automation-control`,`automationControl`,`getStatus`,`query`,e)},_={wakeForStream:e=>s(`battery`,`battery`,`wakeForStream`,`mutation`,e),getStatus:e=>s(`battery`,`battery`,`getStatus`,`query`,e)},v={getStatus:e=>s(`binary`,`binary`,`getStatus`,`query`,e)},ee={setBrightness:e=>s(`brightness`,`brightness`,`setBrightness`,`mutation`,e),getStatus:e=>s(`brightness`,`brightness`,`getStatus`,`query`,e)},te={press:e=>s(`button`,`button`,`press`,`mutation`,e)},ne={getCredentials:e=>s(`camera-credentials`,`cameraCredentials`,`getCredentials`,`query`,e),getStatus:e=>s(`camera-credentials`,`cameraCredentials`,`getStatus`,`query`,e)},y={getLayout:e=>s(`camera-grid-layout`,`cameraGridLayout`,`getLayout`,`query`,e),saveLayout:e=>s(`camera-grid-layout`,`cameraGridLayout`,`saveLayout`,`mutation`,e),getDeviceSettingsContribution:e=>s(`camera-grid-layout`,`cameraGridLayout`,`getDeviceSettingsContribution`,`query`,e),getDeviceLiveContribution:e=>s(`camera-grid-layout`,`cameraGridLayout`,`getDeviceLiveContribution`,`query`,e),applyDeviceSettingsPatch:e=>s(`camera-grid-layout`,`cameraGridLayout`,`applyDeviceSettingsPatch`,`mutation`,e)},re={getDeviceSettingsContribution:e=>s(`camera-pipeline-config`,`cameraPipelineConfig`,`getDeviceSettingsContribution`,`query`,e),getDeviceLiveContribution:e=>s(`camera-pipeline-config`,`cameraPipelineConfig`,`getDeviceLiveContribution`,`query`,e),applyDeviceSettingsPatch:e=>s(`camera-pipeline-config`,`cameraPipelineConfig`,`applyDeviceSettingsPatch`,`mutation`,e)},ie={getCameraStreams:e=>s(`camera-streams`,`cameraStreams`,`getCameraStreams`,`query`,e),getBrokerStreams:e=>s(`camera-streams`,`cameraStreams`,`getBrokerStreams`,`query`,e),getRtspEntries:e=>s(`camera-streams`,`cameraStreams`,`getRtspEntries`,`query`,e),getProfileRtspEntries:e=>s(`camera-streams`,`cameraStreams`,`getProfileRtspEntries`,`query`,e),pickStream:e=>s(`camera-streams`,`cameraStreams`,`pickStream`,`query`,e)},b={getStatus:e=>s(`carbon-monoxide`,`carbonMonoxide`,`getStatus`,`query`,e)},ae={setMode:e=>s(`climate-control`,`climateControl`,`setMode`,`mutation`,e),setFanMode:e=>s(`climate-control`,`climateControl`,`setFanMode`,`mutation`,e),setPreset:e=>s(`climate-control`,`climateControl`,`setPreset`,`mutation`,e),setTarget:e=>s(`climate-control`,`climateControl`,`setTarget`,`mutation`,e),setTargetRange:e=>s(`climate-control`,`climateControl`,`setTargetRange`,`mutation`,e),setTargetHumidity:e=>s(`climate-control`,`climateControl`,`setTargetHumidity`,`mutation`,e),setSwingVertical:e=>s(`climate-control`,`climateControl`,`setSwingVertical`,`mutation`,e),setSwingHorizontal:e=>s(`climate-control`,`climateControl`,`setSwingHorizontal`,`mutation`,e),getStatus:e=>s(`climate-control`,`climateControl`,`getStatus`,`query`,e)},oe={setColor:e=>s(`color`,`color`,`setColor`,`mutation`,e),getStatus:e=>s(`color`,`color`,`getStatus`,`query`,e)},x={getStatus:e=>s(`connectivity`,`connectivity`,`getStatus`,`query`,e)},se={reset:e=>s(`consumables`,`consumables`,`reset`,`mutation`,e),getStatus:e=>s(`consumables`,`consumables`,`getStatus`,`query`,e)},ce={getStatus:e=>s(`contact`,`contact`,`getStatus`,`query`,e)},S={setValue:e=>s(`control`,`control`,`setValue`,`mutation`,e),getStatus:e=>s(`control`,`control`,`getStatus`,`query`,e)},le={open:e=>s(`cover`,`cover`,`open`,`mutation`,e),close:e=>s(`cover`,`cover`,`close`,`mutation`,e),stop:e=>s(`cover`,`cover`,`stop`,`mutation`,e),setPosition:e=>s(`cover`,`cover`,`setPosition`,`mutation`,e),setTiltPosition:e=>s(`cover`,`cover`,`setTiltPosition`,`mutation`,e),getStatus:e=>s(`cover`,`cover`,`getStatus`,`query`,e)},ue={getOptions:e=>s(`day-night`,`dayNight`,`getOptions`,`query`,e),setSettings:e=>s(`day-night`,`dayNight`,`setSettings`,`mutation`,e),getStatus:e=>s(`day-night`,`dayNight`,`getStatus`,`query`,e)},de={getDeviceSettingsContribution:e=>s(`detection-pipeline`,`detectionPipeline`,`getDeviceSettingsContribution`,`query`,e),getDeviceLiveContribution:e=>s(`detection-pipeline`,`detectionPipeline`,`getDeviceLiveContribution`,`query`,e),applyDeviceSettingsPatch:e=>s(`detection-pipeline`,`detectionPipeline`,`applyDeviceSettingsPatch`,`mutation`,e)},fe={getAdminLink:e=>s(`device-admin-link`,`deviceAdminLink`,`getAdminLink`,`query`,e)},C={listDiscovered:e=>s(`device-discovery`,`deviceDiscovery`,`listDiscovered`,`query`,e),refreshDiscovery:e=>s(`device-discovery`,`deviceDiscovery`,`refreshDiscovery`,`mutation`,e),adoptDevice:e=>s(`device-discovery`,`deviceDiscovery`,`adoptDevice`,`mutation`,e),releaseDevice:e=>s(`device-discovery`,`deviceDiscovery`,`releaseDevice`,`mutation`,e),getStatus:e=>s(`device-discovery`,`deviceDiscovery`,`getStatus`,`query`,e)},pe={listSources:e=>s(`device-extension`,`deviceExtension`,`listSources`,`query`,e),listSlots:e=>s(`device-extension`,`deviceExtension`,`listSlots`,`query`,e),listCandidates:e=>s(`device-extension`,`deviceExtension`,`listCandidates`,`query`,e),setSlot:e=>s(`device-extension`,`deviceExtension`,`setSlot`,`mutation`,e)},me={getStreamSources:e=>s(`device-ops`,`deviceOps`,`getStreamSources`,`query`,e),getConfigEntries:e=>s(`device-ops`,`deviceOps`,`getConfigEntries`,`query`,e),setConfig:e=>s(`device-ops`,`deviceOps`,`setConfig`,`mutation`,e),runAction:e=>s(`device-ops`,`deviceOps`,`runAction`,`mutation`,e),removeDevice:e=>s(`device-ops`,`deviceOps`,`removeDevice`,`mutation`,e),getSettingsSchema:e=>s(`device-ops`,`deviceOps`,`getSettingsSchema`,`query`,e),getRawState:e=>s(`device-ops`,`deviceOps`,`getRawState`,`query`,e)},w={getStatus:e=>s(`device-status`,`deviceStatus`,`getStatus`,`query`,e)},he={getStatus:e=>s(`doorbell`,`doorbell`,`getStatus`,`query`,e)},ge={getStatus:e=>s(`enum-sensor`,`enumSensor`,`getStatus`,`query`,e)},_e={getStatus:e=>s(`event-emitter`,`eventEmitter`,`getStatus`,`query`,e)},ve={setPercentage:e=>s(`fan-control`,`fanControl`,`setPercentage`,`mutation`,e),setPreset:e=>s(`fan-control`,`fanControl`,`setPreset`,`mutation`,e),setDirection:e=>s(`fan-control`,`fanControl`,`setDirection`,`mutation`,e),setOscillating:e=>s(`fan-control`,`fanControl`,`setOscillating`,`mutation`,e),getStatus:e=>s(`fan-control`,`fanControl`,`getStatus`,`query`,e)},ye={getStatus:e=>s(`feature-probe`,`featureProbe`,`getStatus`,`query`,e)},be={getStatus:e=>s(`flood`,`flood`,`getStatus`,`query`,e)},xe={getStatus:e=>s(`gas`,`gas`,`getStatus`,`query`,e)},Se={setOn:e=>s(`humidifier`,`humidifier`,`setOn`,`mutation`,e),setTargetHumidity:e=>s(`humidifier`,`humidifier`,`setTargetHumidity`,`mutation`,e),setMode:e=>s(`humidifier`,`humidifier`,`setMode`,`mutation`,e),getStatus:e=>s(`humidifier`,`humidifier`,`getStatus`,`query`,e)},Ce={getStatus:e=>s(`humidity-sensor`,`humiditySensor`,`getStatus`,`query`,e)},we={getStatus:e=>s(`image`,`image`,`getStatus`,`query`,e)},Te={getOptions:e=>s(`image-settings`,`imageSettings`,`getOptions`,`query`,e),setSettings:e=>s(`image-settings`,`imageSettings`,`setSettings`,`mutation`,e),getStatus:e=>s(`image-settings`,`imageSettings`,`getStatus`,`query`,e)},Ee={startSession:e=>s(`intercom`,`intercom`,`startSession`,`mutation`,e),handleAnswer:e=>s(`intercom`,`intercom`,`handleAnswer`,`mutation`,e),stopSession:e=>s(`intercom`,`intercom`,`stopSession`,`mutation`,e),startTalkSession:e=>s(`intercom`,`intercom`,`startTalkSession`,`mutation`,e),pushTalkAudio:e=>s(`intercom`,`intercom`,`pushTalkAudio`,`mutation`,e),endTalkSession:e=>s(`intercom`,`intercom`,`endTalkSession`,`mutation`,e),getStatus:e=>s(`intercom`,`intercom`,`getStatus`,`query`,e)},De={startMowing:e=>s(`lawn-mower-control`,`lawnMowerControl`,`startMowing`,`mutation`,e),pause:e=>s(`lawn-mower-control`,`lawnMowerControl`,`pause`,`mutation`,e),dock:e=>s(`lawn-mower-control`,`lawnMowerControl`,`dock`,`mutation`,e),getStatus:e=>s(`lawn-mower-control`,`lawnMowerControl`,`getStatus`,`query`,e)},Oe={lock:e=>s(`lock-control`,`lockControl`,`lock`,`mutation`,e),unlock:e=>s(`lock-control`,`lockControl`,`unlock`,`mutation`,e),open:e=>s(`lock-control`,`lockControl`,`open`,`mutation`,e),getStatus:e=>s(`lock-control`,`lockControl`,`getStatus`,`query`,e)},ke={play:e=>s(`media-player`,`mediaPlayer`,`play`,`mutation`,e),pause:e=>s(`media-player`,`mediaPlayer`,`pause`,`mutation`,e),stop:e=>s(`media-player`,`mediaPlayer`,`stop`,`mutation`,e),next:e=>s(`media-player`,`mediaPlayer`,`next`,`mutation`,e),previous:e=>s(`media-player`,`mediaPlayer`,`previous`,`mutation`,e),seek:e=>s(`media-player`,`mediaPlayer`,`seek`,`mutation`,e),setVolume:e=>s(`media-player`,`mediaPlayer`,`setVolume`,`mutation`,e),setMute:e=>s(`media-player`,`mediaPlayer`,`setMute`,`mutation`,e),setShuffle:e=>s(`media-player`,`mediaPlayer`,`setShuffle`,`mutation`,e),setRepeat:e=>s(`media-player`,`mediaPlayer`,`setRepeat`,`mutation`,e),selectSource:e=>s(`media-player`,`mediaPlayer`,`selectSource`,`mutation`,e),playMedia:e=>s(`media-player`,`mediaPlayer`,`playMedia`,`mutation`,e),getStatus:e=>s(`media-player`,`mediaPlayer`,`getStatus`,`query`,e)},Ae={isDetected:e=>s(`motion`,`motion`,`isDetected`,`query`,e),getStatus:e=>s(`motion`,`motion`,`getStatus`,`query`,e)},je={analyze:e=>s(`motion-detection`,`motionDetection`,`analyze`,`mutation`,e),removeCamera:e=>s(`motion-detection`,`motionDetection`,`removeCamera`,`mutation`,e),reset:e=>s(`motion-detection`,`motionDetection`,`reset`,`mutation`,e),getDeviceSettingsContribution:e=>s(`motion-detection`,`motionDetection`,`getDeviceSettingsContribution`,`query`,e),getDeviceLiveContribution:e=>s(`motion-detection`,`motionDetection`,`getDeviceLiveContribution`,`query`,e),applyDeviceSettingsPatch:e=>s(`motion-detection`,`motionDetection`,`applyDeviceSettingsPatch`,`mutation`,e)},Me={setMotionTrigger:e=>s(`motion-trigger`,`motionTrigger`,`setMotionTrigger`,`mutation`,e),getStatus:e=>s(`motion-trigger`,`motionTrigger`,`getStatus`,`query`,e)},Ne={getOptions:e=>s(`motion-zones`,`motionZones`,`getOptions`,`query`,e),setZone:e=>s(`motion-zones`,`motionZones`,`setZone`,`mutation`,e),getStatus:e=>s(`motion-zones`,`motionZones`,`getStatus`,`query`,e)},Pe={getOptions:e=>s(`native-object-detection`,`nativeObjectDetection`,`getOptions`,`query`,e),setSettings:e=>s(`native-object-detection`,`nativeObjectDetection`,`setSettings`,`mutation`,e),setEnabled:e=>s(`native-object-detection`,`nativeObjectDetection`,`setEnabled`,`mutation`,e),getStatus:e=>s(`native-object-detection`,`nativeObjectDetection`,`getStatus`,`query`,e)},T={move:e=>s(`navigation`,`navigation`,`move`,`mutation`,e),stop:e=>s(`navigation`,`navigation`,`stop`,`mutation`,e),goToPoint:e=>s(`navigation`,`navigation`,`goToPoint`,`mutation`,e),listActions:e=>s(`navigation`,`navigation`,`listActions`,`query`,e),runAction:e=>s(`navigation`,`navigation`,`runAction`,`mutation`,e),playSound:e=>s(`navigation`,`navigation`,`playSound`,`mutation`,e),setLightOn:e=>s(`navigation`,`navigation`,`setLightOn`,`mutation`,e),setLightMode:e=>s(`navigation`,`navigation`,`setLightMode`,`mutation`,e),setLightLevel:e=>s(`navigation`,`navigation`,`setLightLevel`,`mutation`,e),getFeatures:e=>s(`navigation`,`navigation`,`getFeatures`,`query`,e),getStatus:e=>s(`navigation`,`navigation`,`getStatus`,`query`,e)},Fe={getStatus:e=>s(`network-link`,`networkLink`,`getStatus`,`query`,e)},Ie={send:e=>s(`notifier`,`notifier`,`send`,`mutation`,e),cancel:e=>s(`notifier`,`notifier`,`cancel`,`mutation`,e),getStatus:e=>s(`notifier`,`notifier`,`getStatus`,`query`,e)},Le={getStatus:e=>s(`numeric-sensor`,`numericSensor`,`getStatus`,`query`,e)},Re={setOverlay:e=>s(`osd`,`osd`,`setOverlay`,`mutation`,e),getStatus:e=>s(`osd`,`osd`,`getStatus`,`query`,e)},ze={feed:e=>s(`pet-feeder`,`petFeeder`,`feed`,`mutation`,e),cancelFeed:e=>s(`pet-feeder`,`petFeeder`,`cancelFeed`,`mutation`,e),resetDesiccant:e=>s(`pet-feeder`,`petFeeder`,`resetDesiccant`,`mutation`,e),markFoodReplenished:e=>s(`pet-feeder`,`petFeeder`,`markFoodReplenished`,`mutation`,e),callPet:e=>s(`pet-feeder`,`petFeeder`,`callPet`,`mutation`,e),playSound:e=>s(`pet-feeder`,`petFeeder`,`playSound`,`mutation`,e),setChildLock:e=>s(`pet-feeder`,`petFeeder`,`setChildLock`,`mutation`,e),setIndicatorLight:e=>s(`pet-feeder`,`petFeeder`,`setIndicatorLight`,`mutation`,e),setFeedSound:e=>s(`pet-feeder`,`petFeeder`,`setFeedSound`,`mutation`,e),setVolume:e=>s(`pet-feeder`,`petFeeder`,`setVolume`,`mutation`,e),getStatus:e=>s(`pet-feeder`,`petFeeder`,`getStatus`,`query`,e)},Be={getActiveTracks:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`getActiveTracks`,`query`,e),getTrack:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`getTrack`,`query`,e),listTracks:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`listTracks`,`query`,e),listRecentTracks:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`listRecentTracks`,`query`,e),clearTracks:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`clearTracks`,`mutation`,e),getMotionEvents:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`getMotionEvents`,`query`,e),getObjectEvents:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`getObjectEvents`,`query`,e),getAudioEvents:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`getAudioEvents`,`query`,e),listEventKinds:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`listEventKinds`,`query`,e),listEventKindsBatch:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`listEventKindsBatch`,`query`,e),getSensorEvents:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`getSensorEvents`,`query`,e),getKeyEvents:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`getKeyEvents`,`query`,e),getKeyEventsBatch:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`getKeyEventsBatch`,`query`,e),readLongTermSeries:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`readLongTermSeries`,`query`,e),getEventDensity:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`getEventDensity`,`query`,e),getEventDensityBatch:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`getEventDensityBatch`,`query`,e),pruneEventsBefore:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`pruneEventsBefore`,`mutation`,e),pruneTracksBefore:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`pruneTracksBefore`,`mutation`,e),wipeAllAnalytics:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`wipeAllAnalytics`,`mutation`,e),reconcileFromDisk:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`reconcileFromDisk`,`mutation`,e),deleteTracks:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`deleteTracks`,`mutation`,e),setTrackFlags:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`setTrackFlags`,`mutation`,e),listArchivedDebugNotes:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`listArchivedDebugNotes`,`query`,e),setTrackRelation:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`setTrackRelation`,`mutation`,e),clearTrackRelation:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`clearTrackRelation`,`mutation`,e),setTrackPurity:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`setTrackPurity`,`mutation`,e),listTrackRelations:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`listTrackRelations`,`query`,e),listBirthDecisions:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`listBirthDecisions`,`query`,e),getEventStoreFootprint:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`getEventStoreFootprint`,`query`,e),getEventMediaFootprintByKind:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`getEventMediaFootprintByKind`,`query`,e),pruneEvents:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`pruneEvents`,`mutation`,e),deleteDeviceEvents:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`deleteDeviceEvents`,`mutation`,e),pauseForStorageMigration:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`pauseForStorageMigration`,`mutation`,e),resumeForStorageMigration:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`resumeForStorageMigration`,`mutation`,e),refreshStorageLocationsForMigration:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`refreshStorageLocationsForMigration`,`mutation`,e),startStorageMigrationMove:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`startStorageMigrationMove`,`mutation`,e),getStorageMigrationMoveStatus:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`getStorageMigrationMoveStatus`,`query`,e),cancelStorageMigrationMove:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`cancelStorageMigrationMove`,`mutation`,e),relocateMedia:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`relocateMedia`,`mutation`,e),countUnstampedEventMedia:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`countUnstampedEventMedia`,`query`,e),countRelocatableMedia:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`countRelocatableMedia`,`query`,e),listRelocateMediaJobs:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`listRelocateMediaJobs`,`query`,e),cancelRelocateMedia:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`cancelRelocateMedia`,`mutation`,e),listOpsLog:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`listOpsLog`,`query`,e),reclaimDebugMedia:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`reclaimDebugMedia`,`mutation`,e),getMediaReclaimStatus:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`getMediaReclaimStatus`,`query`,e),getTrainingExportSummary:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`getTrainingExportSummary`,`query`,e),getTrainingExportUrl:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`getTrainingExportUrl`,`query`,e),listRetrainStaging:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`listRetrainStaging`,`query`,e),listRetrainFrames:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`listRetrainFrames`,`query`,e),selectRetrainFrames:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`selectRetrainFrames`,`mutation`,e),deselectRetrainFrame:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`deselectRetrainFrame`,`mutation`,e),getRetrainFrameImage:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`getRetrainFrameImage`,`query`,e),proposeRetrainAnnotations:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`proposeRetrainAnnotations`,`mutation`,e),listRetrainAnnotations:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`listRetrainAnnotations`,`query`,e),saveRetrainAnnotations:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`saveRetrainAnnotations`,`mutation`,e),completeRetrainTrack:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`completeRetrainTrack`,`mutation`,e),restageRetrainTrack:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`restageRetrainTrack`,`mutation`,e),getRetrainExportUrl:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`getRetrainExportUrl`,`query`,e),setRetrainFrameComplete:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`setRetrainFrameComplete`,`mutation`,e),writeRetrainArchive:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`writeRetrainArchive`,`mutation`,e),previewRetrainDataset:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`previewRetrainDataset`,`query`,e),createRetrainDatasetVersion:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`createRetrainDatasetVersion`,`mutation`,e),listRetrainDatasetVersions:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`listRetrainDatasetVersions`,`query`,e),deleteRetrainDatasetVersion:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`deleteRetrainDatasetVersion`,`mutation`,e),verifyRetrainDatasetVersion:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`verifyRetrainDatasetVersion`,`query`,e),listRetrainAssistProfiles:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`listRetrainAssistProfiles`,`query`,e),proposeRetrainAnnotationsWithLlm:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`proposeRetrainAnnotationsWithLlm`,`mutation`,e),createRetrainCollection:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`createRetrainCollection`,`mutation`,e),listRetrainCollections:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`listRetrainCollections`,`query`,e),renameRetrainCollection:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`renameRetrainCollection`,`mutation`,e),deleteRetrainCollection:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`deleteRetrainCollection`,`mutation`,e),addRetrainFrameFromRecording:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`addRetrainFrameFromRecording`,`mutation`,e),addRetrainFramesToCollection:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`addRetrainFramesToCollection`,`mutation`,e),removeRetrainFrameFromCollection:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`removeRetrainFrameFromCollection`,`mutation`,e),listRetrainCollectionFrames:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`listRetrainCollectionFrames`,`query`,e),getEventMedia:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`getEventMedia`,`query`,e),getTrackMedia:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`getTrackMedia`,`query`,e),listTrackMedia:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`listTrackMedia`,`query`,e),listEventMedia:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`listEventMedia`,`query`,e),ownersWithMedia:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`ownersWithMedia`,`query`,e),searchObjectEvents:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`searchObjectEvents`,`query`,e),wipeObjectEmbeddings:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`wipeObjectEmbeddings`,`mutation`,e),rebuildObjectEmbeddings:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`rebuildObjectEmbeddings`,`mutation`,e),getObjectEmbeddingRebuildStatus:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`getObjectEmbeddingRebuildStatus`,`query`,e),getDeviceSettingsContribution:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`getDeviceSettingsContribution`,`query`,e),getDeviceLiveContribution:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`getDeviceLiveContribution`,`query`,e),applyDeviceSettingsPatch:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`applyDeviceSettingsPatch`,`mutation`,e)},Ve={getStatus:e=>s(`power-meter`,`powerMeter`,`getStatus`,`query`,e)},He={getStatus:e=>s(`presence`,`presence`,`getStatus`,`query`,e)},Ue={getStatus:e=>s(`pressure-sensor`,`pressureSensor`,`getStatus`,`query`,e)},We={getOptions:e=>s(`privacy-mask`,`privacyMask`,`getOptions`,`query`,e),setMask:e=>s(`privacy-mask`,`privacyMask`,`setMask`,`mutation`,e),setAudioEnabled:e=>s(`privacy-mask`,`privacyMask`,`setAudioEnabled`,`mutation`,e),getStatus:e=>s(`privacy-mask`,`privacyMask`,`getStatus`,`query`,e)},Ge={move:e=>s(`ptz`,`ptz`,`move`,`mutation`,e),continuousMove:e=>s(`ptz`,`ptz`,`continuousMove`,`mutation`,e),stop:e=>s(`ptz`,`ptz`,`stop`,`mutation`,e),getPresets:e=>s(`ptz`,`ptz`,`getPresets`,`query`,e),goToPreset:e=>s(`ptz`,`ptz`,`goToPreset`,`mutation`,e),savePreset:e=>s(`ptz`,`ptz`,`savePreset`,`mutation`,e),deletePreset:e=>s(`ptz`,`ptz`,`deletePreset`,`mutation`,e),getOptions:e=>s(`ptz`,`ptz`,`getOptions`,`query`,e),goHome:e=>s(`ptz`,`ptz`,`goHome`,`mutation`,e),getHomePreset:e=>s(`ptz`,`ptz`,`getHomePreset`,`query`,e),setHomePreset:e=>s(`ptz`,`ptz`,`setHomePreset`,`mutation`,e),captureHomeHere:e=>s(`ptz`,`ptz`,`captureHomeHere`,`mutation`,e),getHomeReturn:e=>s(`ptz`,`ptz`,`getHomeReturn`,`query`,e),setHomeReturn:e=>s(`ptz`,`ptz`,`setHomeReturn`,`mutation`,e),getPosition:e=>s(`ptz`,`ptz`,`getPosition`,`query`,e),setAutofocus:e=>s(`ptz`,`ptz`,`setAutofocus`,`mutation`,e),getStatus:e=>s(`ptz`,`ptz`,`getStatus`,`query`,e)},Ke={getStatus:e=>s(`ptz-autotrack`,`ptzAutotrack`,`getStatus`,`query`,e),setEnabled:e=>s(`ptz-autotrack`,`ptzAutotrack`,`setEnabled`,`mutation`,e),getSettings:e=>s(`ptz-autotrack`,`ptzAutotrack`,`getSettings`,`query`,e),setSettings:e=>s(`ptz-autotrack`,`ptzAutotrack`,`setSettings`,`mutation`,e)},qe={reboot:e=>s(`reboot`,`reboot`,`reboot`,`mutation`,e)},Je={listSources:e=>s(`recording`,`recording`,`listSources`,`query`,e),getAvailability:e=>s(`recording`,`recording`,`getAvailability`,`query`,e),getDaysWithRecordings:e=>s(`recording`,`recording`,`getDaysWithRecordings`,`query`,e),getPlayback:e=>s(`recording`,`recording`,`getPlayback`,`query`,e),getPlaybackOptions:e=>s(`recording`,`recording`,`getPlaybackOptions`,`query`,e)},Ye={getOptions:e=>s(`recording-onboard`,`recordingOnboard`,`getOptions`,`query`,e),setSettings:e=>s(`recording-onboard`,`recordingOnboard`,`setSettings`,`mutation`,e),getStatus:e=>s(`recording-onboard`,`recordingOnboard`,`getStatus`,`query`,e)},Xe={getStatus:e=>s(`recording-signal`,`recordingSignal`,`getStatus`,`query`,e)},Ze={listScenes:e=>s(`scene-monitor`,`sceneMonitor`,`listScenes`,`query`,e),listScenesBatch:e=>s(`scene-monitor`,`sceneMonitor`,`listScenesBatch`,`query`,e),createScene:e=>s(`scene-monitor`,`sceneMonitor`,`createScene`,`mutation`,e),updateScene:e=>s(`scene-monitor`,`sceneMonitor`,`updateScene`,`mutation`,e),deleteScene:e=>s(`scene-monitor`,`sceneMonitor`,`deleteScene`,`mutation`,e),captureReference:e=>s(`scene-monitor`,`sceneMonitor`,`captureReference`,`mutation`,e),deleteReference:e=>s(`scene-monitor`,`sceneMonitor`,`deleteReference`,`mutation`,e),recheckNow:e=>s(`scene-monitor`,`sceneMonitor`,`recheckNow`,`mutation`,e),resetScene:e=>s(`scene-monitor`,`sceneMonitor`,`resetScene`,`mutation`,e),getStatus:e=>s(`scene-monitor`,`sceneMonitor`,`getStatus`,`query`,e)},Qe={run:e=>s(`script-runner`,`scriptRunner`,`run`,`mutation`,e),stop:e=>s(`script-runner`,`scriptRunner`,`stop`,`mutation`,e),getStatus:e=>s(`script-runner`,`scriptRunner`,`getStatus`,`query`,e)},$e={getStatus:e=>s(`smoke`,`smoke`,`getStatus`,`query`,e)},et={getSnapshot:e=>s(`snapshot`,`snapshot`,`getSnapshot`,`query`,e),invalidateCache:e=>s(`snapshot`,`snapshot`,`invalidateCache`,`mutation`,e),getSnapshotOverview:e=>s(`snapshot`,`snapshot`,`getSnapshotOverview`,`query`,e),getDebugState:e=>s(`snapshot`,`snapshot`,`getDebugState`,`query`,e),getSnapshotLinks:e=>s(`snapshot`,`snapshot`,`getSnapshotLinks`,`query`,e),getStatus:e=>s(`snapshot`,`snapshot`,`getStatus`,`query`,e),getDeviceSettingsContribution:e=>s(`snapshot`,`snapshot`,`getDeviceSettingsContribution`,`query`,e),getDeviceLiveContribution:e=>s(`snapshot`,`snapshot`,`getDeviceLiveContribution`,`query`,e),applyDeviceSettingsPatch:e=>s(`snapshot`,`snapshot`,`applyDeviceSettingsPatch`,`mutation`,e)},tt={getCatalog:e=>s(`stream-catalog`,`streamCatalog`,`getCatalog`,`query`,e)},nt={getOptions:e=>s(`stream-params`,`streamParams`,`getOptions`,`query`,e),setProfile:e=>s(`stream-params`,`streamParams`,`setProfile`,`mutation`,e),getConfigSchema:e=>s(`stream-params`,`streamParams`,`getConfigSchema`,`query`,e),getStatus:e=>s(`stream-params`,`streamParams`,`getStatus`,`query`,e)},rt={listSignals:e=>s(`stream-signals`,`streamSignals`,`listSignals`,`query`,e)},it={setState:e=>s(`switch`,`switch`,`setState`,`mutation`,e),getStatus:e=>s(`switch`,`switch`,`getStatus`,`query`,e)},at={getStatus:e=>s(`tamper`,`tamper`,`getStatus`,`query`,e)},ot={getStatus:e=>s(`temperature-sensor`,`temperatureSensor`,`getStatus`,`query`,e)},st={installUpdate:e=>s(`update`,`update`,`installUpdate`,`mutation`,e),getStatus:e=>s(`update`,`update`,`getStatus`,`query`,e)},ct={start:e=>s(`vacuum-control`,`vacuumControl`,`start`,`mutation`,e),pause:e=>s(`vacuum-control`,`vacuumControl`,`pause`,`mutation`,e),stop:e=>s(`vacuum-control`,`vacuumControl`,`stop`,`mutation`,e),returnToBase:e=>s(`vacuum-control`,`vacuumControl`,`returnToBase`,`mutation`,e),locate:e=>s(`vacuum-control`,`vacuumControl`,`locate`,`mutation`,e),setFanSpeed:e=>s(`vacuum-control`,`vacuumControl`,`setFanSpeed`,`mutation`,e),getStatus:e=>s(`vacuum-control`,`vacuumControl`,`getStatus`,`query`,e)},lt={open:e=>s(`valve`,`valve`,`open`,`mutation`,e),close:e=>s(`valve`,`valve`,`close`,`mutation`,e),stop:e=>s(`valve`,`valve`,`stop`,`mutation`,e),setPosition:e=>s(`valve`,`valve`,`setPosition`,`mutation`,e),getStatus:e=>s(`valve`,`valve`,`getStatus`,`query`,e)},ut={getStatus:e=>s(`vibration`,`vibration`,`getStatus`,`query`,e)},dt={listClips:e=>s(`videoclips`,`videoclips`,`listClips`,`query`,e),listSources:e=>s(`videoclips`,`videoclips`,`listSources`,`query`,e),getClipPlayback:e=>s(`videoclips`,`videoclips`,`getClipPlayback`,`query`,e),readClipBytes:e=>s(`videoclips`,`videoclips`,`readClipBytes`,`query`,e),offerClipBytes:e=>s(`videoclips`,`videoclips`,`offerClipBytes`,`query`,e),dialClipStream:e=>s(`videoclips`,`videoclips`,`dialClipStream`,`query`,e),getPlaybackOptions:e=>s(`videoclips`,`videoclips`,`getPlaybackOptions`,`query`,e)},ft={setTargetTemp:e=>s(`water-heater`,`waterHeater`,`setTargetTemp`,`mutation`,e),setOperationMode:e=>s(`water-heater`,`waterHeater`,`setOperationMode`,`mutation`,e),setAway:e=>s(`water-heater`,`waterHeater`,`setAway`,`mutation`,e),getStatus:e=>s(`water-heater`,`waterHeater`,`getStatus`,`query`,e)},pt={getStatus:e=>s(`weather`,`weather`,`getStatus`,`query`,e)},mt={listStreams:e=>s(`webrtc-session`,`webrtcSession`,`listStreams`,`query`,e),createSession:e=>s(`webrtc-session`,`webrtcSession`,`createSession`,`mutation`,e),handleOffer:e=>s(`webrtc-session`,`webrtcSession`,`handleOffer`,`mutation`,e),handleAnswer:e=>s(`webrtc-session`,`webrtcSession`,`handleAnswer`,`mutation`,e),addIceCandidate:e=>s(`webrtc-session`,`webrtcSession`,`addIceCandidate`,`mutation`,e),getIceCandidates:e=>s(`webrtc-session`,`webrtcSession`,`getIceCandidates`,`query`,e),closeSession:e=>s(`webrtc-session`,`webrtcSession`,`closeSession`,`mutation`,e),hasAdaptiveBitrate:e=>s(`webrtc-session`,`webrtcSession`,`hasAdaptiveBitrate`,`query`,e),getSessionState:e=>s(`webrtc-session`,`webrtcSession`,`getSessionState`,`query`,e),applyDownlinkProbe:e=>s(`webrtc-session`,`webrtcSession`,`applyDownlinkProbe`,`mutation`,e),getSessionDebug:e=>s(`webrtc-session`,`webrtcSession`,`getSessionDebug`,`query`,e)},ht={getCurrentSnapshot:e=>s(`zone-analytics`,`zoneAnalytics`,`getCurrentSnapshot`,`query`,e),getCurrentSnapshotBatch:e=>s(`zone-analytics`,`zoneAnalytics`,`getCurrentSnapshotBatch`,`query`,e),getZoneHistory:e=>s(`zone-analytics`,`zoneAnalytics`,`getZoneHistory`,`query`,e),getCameraHistory:e=>s(`zone-analytics`,`zoneAnalytics`,`getCameraHistory`,`query`,e),getUnzonedHistory:e=>s(`zone-analytics`,`zoneAnalytics`,`getUnzonedHistory`,`query`,e)},gt={listRules:e=>s(`zone-rules`,`zoneRules`,`listRules`,`query`,e),setRules:e=>s(`zone-rules`,`zoneRules`,`setRules`,`mutation`,e)},_t={listZones:e=>s(`zones`,`zones`,`listZones`,`query`,e),addZone:e=>s(`zones`,`zones`,`addZone`,`mutation`,e),removeZone:e=>s(`zones`,`zones`,`removeZone`,`mutation`,e),updateZone:e=>s(`zones`,`zones`,`updateZone`,`mutation`,e)},vt={getDeviceSettings:e=>c(`addonSettings`,`getDeviceSettings`,`query`,e),updateDeviceSettings:e=>c(`addonSettings`,`updateDeviceSettings`,`mutation`,e)},yt={detachDevice:e=>c(`audioAnalyzer`,`detachDevice`,`mutation`,e)},bt={getStatus:e=>c(`deviceAdoption`,`getStatus`,`query`,e)},xt={getDeviceSettingsContribution:e=>c(`deviceExport`,`getDeviceSettingsContribution`,`query`,e),getDeviceLiveContribution:e=>c(`deviceExport`,`getDeviceLiveContribution`,`query`,e),applyDeviceSettingsPatch:e=>c(`deviceExport`,`applyDeviceSettingsPatch`,`mutation`,e)},St={loadConfig:e=>c(`deviceManager`,`loadConfig`,`query`,e),loadRuntimeState:e=>c(`deviceManager`,`loadRuntimeState`,`query`,e),loadMeta:e=>c(`deviceManager`,`loadMeta`,`query`,e),setName:e=>c(`deviceManager`,`setName`,`mutation`,e),setLocation:e=>c(`deviceManager`,`setLocation`,`mutation`,e),setType:e=>c(`deviceManager`,`setType`,`mutation`,e),setIntegrationId:e=>c(`deviceManager`,`setIntegrationId`,`mutation`,e),setLinkDeviceId:e=>c(`deviceManager`,`setLinkDeviceId`,`mutation`,e),setPrimaryChildEntityId:e=>c(`deviceManager`,`setPrimaryChildEntityId`,`mutation`,e),setChildLayout:e=>c(`deviceManager`,`setChildLayout`,`mutation`,e),setDisplay:e=>c(`deviceManager`,`setDisplay`,`mutation`,e),getWireableFields:e=>c(`deviceManager`,`getWireableFields`,`query`,e),setRole:e=>c(`deviceManager`,`setRole`,`mutation`,e),applyInitialMeta:e=>c(`deviceManager`,`applyInitialMeta`,`mutation`,e),setMetadata:e=>c(`deviceManager`,`setMetadata`,`mutation`,e),setDisabled:e=>c(`deviceManager`,`setDisabled`,`mutation`,e),getDevice:e=>c(`deviceManager`,`getDevice`,`query`,e),getLinkedDevices:e=>c(`deviceManager`,`getLinkedDevices`,`query`,e),getStreamSources:e=>c(`deviceManager`,`getStreamSources`,`query`,e),getConfigSchema:e=>c(`deviceManager`,`getConfigSchema`,`query`,e),getSettingsSchema:e=>c(`deviceManager`,`getSettingsSchema`,`query`,e),updateConfig:e=>c(`deviceManager`,`updateConfig`,`mutation`,e),enable:e=>c(`deviceManager`,`enable`,`mutation`,e),disable:e=>c(`deviceManager`,`disable`,`mutation`,e),remove:e=>c(`deviceManager`,`remove`,`mutation`,e),getStreamProfileMap:e=>c(`deviceManager`,`getStreamProfileMap`,`query`,e),setStreamProfileMap:e=>c(`deviceManager`,`setStreamProfileMap`,`mutation`,e),probeStreams:e=>c(`deviceManager`,`probeStreams`,`mutation`,e),getBindings:e=>c(`deviceManager`,`getBindings`,`query`,e),setWrapperActive:e=>c(`deviceManager`,`setWrapperActive`,`mutation`,e),getWrapperActivation:e=>c(`deviceManager`,`getWrapperActivation`,`query`,e),getDeviceSettingsAggregate:e=>c(`deviceManager`,`getDeviceSettingsAggregate`,`query`,e),getDeviceLiveInfoAggregate:e=>c(`deviceManager`,`getDeviceLiveInfoAggregate`,`query`,e),getDeviceAggregate:e=>c(`deviceManager`,`getDeviceAggregate`,`query`,e),runDeviceAction:e=>c(`deviceManager`,`runDeviceAction`,`mutation`,e),updateDeviceField:e=>c(`deviceManager`,`updateDeviceField`,`mutation`,e),updateDeviceFieldsBatch:e=>c(`deviceManager`,`updateDeviceFieldsBatch`,`mutation`,e),testField:e=>c(`deviceManager`,`testField`,`mutation`,e),getDeviceStatusAggregate:e=>c(`deviceManager`,`getDeviceStatusAggregate`,`query`,e)},Ct={getSnapshot:e=>c(`deviceState`,`getSnapshot`,`query`,e),getCapSlice:e=>c(`deviceState`,`getCapSlice`,`query`,e),setCapSlice:e=>c(`deviceState`,`setCapSlice`,`mutation`,e),claimFields:e=>c(`deviceState`,`claimFields`,`mutation`,e),patchOwnedFields:e=>c(`deviceState`,`patchOwnedFields`,`mutation`,e),releaseClaim:e=>c(`deviceState`,`releaseClaim`,`mutation`,e),getNativeCapSlice:e=>c(`deviceState`,`getNativeCapSlice`,`query`,e)},wt={listRecentFaces:e=>c(`faceGallery`,`listRecentFaces`,`query`,e),getFaceByTrack:e=>c(`faceGallery`,`getFaceByTrack`,`query`,e)},Tt={getDeviceStats:e=>c(`networkQuality`,`getDeviceStats`,`query`,e),reportClientStats:e=>c(`networkQuality`,`reportClientStats`,`mutation`,e)},Et={setDeviceMuted:e=>c(`notificationRules`,`setDeviceMuted`,`mutation`,e)},Dt={getDeviceOsd:e=>c(`osdManager`,`getDeviceOsd`,`query`,e),getSourceCatalog:e=>c(`osdManager`,`getSourceCatalog`,`query`,e),setSlotBinding:e=>c(`osdManager`,`setSlotBinding`,`mutation`,e),clearSlotBinding:e=>c(`osdManager`,`clearSlotBinding`,`mutation`,e),previewSlot:e=>c(`osdManager`,`previewSlot`,`mutation`,e),renderDevice:e=>c(`osdManager`,`renderDevice`,`mutation`,e)},Ot={runPipeline:e=>c(`pipelineExecutor`,`runPipeline`,`mutation`,e),runPipelineBatch:e=>c(`pipelineExecutor`,`runPipelineBatch`,`mutation`,e)},kt={assignPipeline:e=>c(`pipelineOrchestrator`,`assignPipeline`,`mutation`,e),unassignPipeline:e=>c(`pipelineOrchestrator`,`unassignPipeline`,`mutation`,e),setPipelineDevicePin:e=>c(`pipelineOrchestrator`,`setPipelineDevicePin`,`mutation`,e),getPipelineDevicePin:e=>c(`pipelineOrchestrator`,`getPipelineDevicePin`,`query`,e),getPipelineAssignment:e=>c(`pipelineOrchestrator`,`getPipelineAssignment`,`query`,e),getCameraMetrics:e=>c(`pipelineOrchestrator`,`getCameraMetrics`,`query`,e),assignAudio:e=>c(`pipelineOrchestrator`,`assignAudio`,`mutation`,e),unassignAudio:e=>c(`pipelineOrchestrator`,`unassignAudio`,`mutation`,e),getAudioAssignment:e=>c(`pipelineOrchestrator`,`getAudioAssignment`,`query`,e),getCameraSettings:e=>c(`pipelineOrchestrator`,`getCameraSettings`,`query`,e),setCameraStepToggle:e=>c(`pipelineOrchestrator`,`setCameraStepToggle`,`mutation`,e),getCameraStepOverrides:e=>c(`pipelineOrchestrator`,`getCameraStepOverrides`,`query`,e),setCameraStepOverride:e=>c(`pipelineOrchestrator`,`setCameraStepOverride`,`mutation`,e),setCameraStepSettings:e=>c(`pipelineOrchestrator`,`setCameraStepSettings`,`mutation`,e),setCameraPipelineForAgent:e=>c(`pipelineOrchestrator`,`setCameraPipelineForAgent`,`mutation`,e),resolvePipeline:e=>c(`pipelineOrchestrator`,`resolvePipeline`,`query`,e),getCameraSwitches:e=>c(`pipelineOrchestrator`,`getCameraSwitches`,`query`,e),setCameraSwitch:e=>c(`pipelineOrchestrator`,`setCameraSwitch`,`mutation`,e),getCameraStatus:e=>c(`pipelineOrchestrator`,`getCameraStatus`,`query`,e),getDeviceSettingsContribution:e=>c(`pipelineOrchestrator`,`getDeviceSettingsContribution`,`query`,e),getDeviceLiveContribution:e=>c(`pipelineOrchestrator`,`getDeviceLiveContribution`,`query`,e),applyDeviceSettingsPatch:e=>c(`pipelineOrchestrator`,`applyDeviceSettingsPatch`,`mutation`,e)},At={detachCamera:e=>c(`pipelineRunner`,`detachCamera`,`mutation`,e),getCameraMetrics:e=>c(`pipelineRunner`,`getCameraMetrics`,`query`,e),requestOccupancyBurst:e=>c(`pipelineRunner`,`requestOccupancyBurst`,`mutation`,e),runDetailSubtree:e=>c(`pipelineRunner`,`runDetailSubtree`,`mutation`,e),parkTrackFrame:e=>c(`pipelineRunner`,`parkTrackFrame`,`mutation`,e),getParkedTrackFrame:e=>c(`pipelineRunner`,`getParkedTrackFrame`,`query`,e),releaseParkedTrackFrames:e=>c(`pipelineRunner`,`releaseParkedTrackFrames`,`mutation`,e)},jt={listPlates:e=>c(`plateGallery`,`listPlates`,`query`,e),getPlateByTrack:e=>c(`plateGallery`,`getPlateByTrack`,`query`,e)},Mt={getDeviceConfig:e=>c(`recordingArchive`,`getDeviceConfig`,`query`,e),locateSegment:e=>c(`recordingArchive`,`locateSegment`,`query`,e),readSegmentBytes:e=>c(`recordingArchive`,`readSegmentBytes`,`query`,e),readGopBytes:e=>c(`recordingArchive`,`readGopBytes`,`query`,e),readWindowBytes:e=>c(`recordingArchive`,`readWindowBytes`,`query`,e),setDeviceConfig:e=>c(`recordingArchive`,`setDeviceConfig`,`mutation`,e),rescanStorage:e=>c(`recordingArchive`,`rescanStorage`,`mutation`,e),pruneFootage:e=>c(`recordingArchive`,`pruneFootage`,`mutation`,e),deleteFootprint:e=>c(`recordingArchive`,`deleteFootprint`,`mutation`,e),renderGif:e=>c(`recordingArchive`,`renderGif`,`mutation`,e),renderClip:e=>c(`recordingArchive`,`renderClip`,`mutation`,e),getStatus:e=>c(`recordingArchive`,`getStatus`,`query`,e),getDeviceSettingsContribution:e=>c(`recordingArchive`,`getDeviceSettingsContribution`,`query`,e),getDeviceLiveContribution:e=>c(`recordingArchive`,`getDeviceLiveContribution`,`query`,e),applyDeviceSettingsPatch:e=>c(`recordingArchive`,`applyDeviceSettingsPatch`,`mutation`,e)},Nt={listExports:e=>c(`recordingExport`,`listExports`,`query`,e)},Pt={reportStreamSignal:e=>c(`streamBroker`,`reportStreamSignal`,`mutation`,e),publishCameraStream:e=>c(`streamBroker`,`publishCameraStream`,`mutation`,e),retractCameraStream:e=>c(`streamBroker`,`retractCameraStream`,`mutation`,e),assignProfile:e=>c(`streamBroker`,`assignProfile`,`mutation`,e),unassignProfile:e=>c(`streamBroker`,`unassignProfile`,`mutation`,e),forgetDeviceHardware:e=>c(`streamBroker`,`forgetDeviceHardware`,`mutation`,e),renderPreBufferClip:e=>c(`streamBroker`,`renderPreBufferClip`,`mutation`,e),produceEventMedia:e=>c(`streamBroker`,`produceEventMedia`,`mutation`,e),restartProfile:e=>c(`streamBroker`,`restartProfile`,`mutation`,e),getDeviceAudioMute:e=>c(`streamBroker`,`getDeviceAudioMute`,`query`,e),setDeviceAudioMute:e=>c(`streamBroker`,`setDeviceAudioMute`,`mutation`,e),getDeviceSettingsContribution:e=>c(`streamBroker`,`getDeviceSettingsContribution`,`query`,e),getDeviceLiveContribution:e=>c(`streamBroker`,`getDeviceLiveContribution`,`query`,e),applyDeviceSettingsPatch:e=>c(`streamBroker`,`applyDeviceSettingsPatch`,`mutation`,e)};return{deviceId:t.deviceId,binding:t,state:{airQualitySensor:Z(i,t.deviceId,`air-quality-sensor`),alarmPanel:Z(i,t.deviceId,`alarm-panel`),ambientLightSensor:Z(i,t.deviceId,`ambient-light-sensor`),audioMetrics:Z(i,t.deviceId,`audio-metrics`),automationControl:Z(i,t.deviceId,`automation-control`),battery:Z(i,t.deviceId,`battery`),binary:Z(i,t.deviceId,`binary`),brightness:Z(i,t.deviceId,`brightness`),cameraStreams:Z(i,t.deviceId,`camera-streams`),carbonMonoxide:Z(i,t.deviceId,`carbon-monoxide`),climateControl:Z(i,t.deviceId,`climate-control`),color:Z(i,t.deviceId,`color`),connectivity:Z(i,t.deviceId,`connectivity`),consumables:Z(i,t.deviceId,`consumables`),contact:Z(i,t.deviceId,`contact`),control:Z(i,t.deviceId,`control`),cover:Z(i,t.deviceId,`cover`),dayNight:Z(i,t.deviceId,`day-night`),deviceDiscovery:Z(i,t.deviceId,`device-discovery`),deviceStatus:Z(i,t.deviceId,`device-status`),doorbell:Z(i,t.deviceId,`doorbell`),enumSensor:Z(i,t.deviceId,`enum-sensor`),eventEmitter:Z(i,t.deviceId,`event-emitter`),fanControl:Z(i,t.deviceId,`fan-control`),featureProbe:Z(i,t.deviceId,`feature-probe`),flood:Z(i,t.deviceId,`flood`),gas:Z(i,t.deviceId,`gas`),humidifier:Z(i,t.deviceId,`humidifier`),humiditySensor:Z(i,t.deviceId,`humidity-sensor`),image:Z(i,t.deviceId,`image`),imageSettings:Z(i,t.deviceId,`image-settings`),intercom:Z(i,t.deviceId,`intercom`),lawnMowerControl:Z(i,t.deviceId,`lawn-mower-control`),lockControl:Z(i,t.deviceId,`lock-control`),mediaPlayer:Z(i,t.deviceId,`media-player`),motion:Z(i,t.deviceId,`motion`),motionTrigger:Z(i,t.deviceId,`motion-trigger`),motionZones:Z(i,t.deviceId,`motion-zones`),nativeObjectDetection:Z(i,t.deviceId,`native-object-detection`),navigation:Z(i,t.deviceId,`navigation`),networkLink:Z(i,t.deviceId,`network-link`),notifier:Z(i,t.deviceId,`notifier`),numericSensor:Z(i,t.deviceId,`numeric-sensor`),petFeeder:Z(i,t.deviceId,`pet-feeder`),powerMeter:Z(i,t.deviceId,`power-meter`),presence:Z(i,t.deviceId,`presence`),pressureSensor:Z(i,t.deviceId,`pressure-sensor`),privacyMask:Z(i,t.deviceId,`privacy-mask`),ptzAutotrack:Z(i,t.deviceId,`ptz-autotrack`),recordingOnboard:Z(i,t.deviceId,`recording-onboard`),recordingSignal:Z(i,t.deviceId,`recording-signal`),sceneMonitor:Z(i,t.deviceId,`scene-monitor`),scriptRunner:Z(i,t.deviceId,`script-runner`),smoke:Z(i,t.deviceId,`smoke`),streamCatalog:Z(i,t.deviceId,`stream-catalog`),streamParams:Z(i,t.deviceId,`stream-params`),streamSignals:Z(i,t.deviceId,`stream-signals`),switch:Z(i,t.deviceId,`switch`),tamper:Z(i,t.deviceId,`tamper`),temperatureSensor:Z(i,t.deviceId,`temperature-sensor`),update:Z(i,t.deviceId,`update`),vacuumControl:Z(i,t.deviceId,`vacuum-control`),valve:Z(i,t.deviceId,`valve`),vibration:Z(i,t.deviceId,`vibration`),waterHeater:Z(i,t.deviceId,`water-heater`),weather:Z(i,t.deviceId,`weather`),zoneAnalytics:Z(i,t.deviceId,`zone-analytics`),zoneRules:Z(i,t.deviceId,`zone-rules`),zones:Z(i,t.deviceId,`zones`)},...l(`accessories`)?{accessories:u}:{},...l(`air-quality-sensor`)?{airQualitySensor:d}:{},...l(`alarm-panel`)?{alarmPanel:f}:{},...l(`ambient-light-sensor`)?{ambientLightSensor:p}:{},...l(`audio-analysis`)?{audioAnalysis:m}:{},...l(`audio-metrics`)?{audioMetrics:h}:{},...l(`automation-control`)?{automationControl:g}:{},...l(`battery`)?{battery:_}:{},...l(`binary`)?{binary:v}:{},...l(`brightness`)?{brightness:ee}:{},...l(`button`)?{button:te}:{},...l(`camera-credentials`)?{cameraCredentials:ne}:{},...l(`camera-grid-layout`)?{cameraGridLayout:y}:{},...l(`camera-pipeline-config`)?{cameraPipelineConfig:re}:{},...l(`camera-streams`)?{cameraStreams:ie}:{},...l(`carbon-monoxide`)?{carbonMonoxide:b}:{},...l(`climate-control`)?{climateControl:ae}:{},...l(`color`)?{color:oe}:{},...l(`connectivity`)?{connectivity:x}:{},...l(`consumables`)?{consumables:se}:{},...l(`contact`)?{contact:ce}:{},...l(`control`)?{control:S}:{},...l(`cover`)?{cover:le}:{},...l(`day-night`)?{dayNight:ue}:{},...l(`detection-pipeline`)?{detectionPipeline:de}:{},...l(`device-admin-link`)?{deviceAdminLink:fe}:{},...l(`device-discovery`)?{deviceDiscovery:C}:{},...l(`device-extension`)?{deviceExtension:pe}:{},...l(`device-ops`)?{deviceOps:me}:{},...l(`device-status`)?{deviceStatus:w}:{},...l(`doorbell`)?{doorbell:he}:{},...l(`enum-sensor`)?{enumSensor:ge}:{},...l(`event-emitter`)?{eventEmitter:_e}:{},...l(`fan-control`)?{fanControl:ve}:{},...l(`feature-probe`)?{featureProbe:ye}:{},...l(`flood`)?{flood:be}:{},...l(`gas`)?{gas:xe}:{},...l(`humidifier`)?{humidifier:Se}:{},...l(`humidity-sensor`)?{humiditySensor:Ce}:{},...l(`image`)?{image:we}:{},...l(`image-settings`)?{imageSettings:Te}:{},...l(`intercom`)?{intercom:Ee}:{},...l(`lawn-mower-control`)?{lawnMowerControl:De}:{},...l(`lock-control`)?{lockControl:Oe}:{},...l(`media-player`)?{mediaPlayer:ke}:{},...l(`motion`)?{motion:Ae}:{},...l(`motion-detection`)?{motionDetection:je}:{},...l(`motion-trigger`)?{motionTrigger:Me}:{},...l(`motion-zones`)?{motionZones:Ne}:{},...l(`native-object-detection`)?{nativeObjectDetection:Pe}:{},...l(`navigation`)?{navigation:T}:{},...l(`network-link`)?{networkLink:Fe}:{},...l(`notifier`)?{notifier:Ie}:{},...l(`numeric-sensor`)?{numericSensor:Le}:{},...l(`osd`)?{osd:Re}:{},...l(`pet-feeder`)?{petFeeder:ze}:{},...l(`pipeline-analytics`)?{pipelineAnalytics:Be}:{},...l(`power-meter`)?{powerMeter:Ve}:{},...l(`presence`)?{presence:He}:{},...l(`pressure-sensor`)?{pressureSensor:Ue}:{},...l(`privacy-mask`)?{privacyMask:We}:{},...l(`ptz`)?{ptz:Ge}:{},...l(`ptz-autotrack`)?{ptzAutotrack:Ke}:{},...l(`reboot`)?{reboot:qe}:{},...l(`recording`)?{recording:Je}:{},...l(`recording-onboard`)?{recordingOnboard:Ye}:{},...l(`recording-signal`)?{recordingSignal:Xe}:{},...l(`scene-monitor`)?{sceneMonitor:Ze}:{},...l(`script-runner`)?{scriptRunner:Qe}:{},...l(`smoke`)?{smoke:$e}:{},...l(`snapshot`)?{snapshot:et}:{},...l(`stream-catalog`)?{streamCatalog:tt}:{},...l(`stream-params`)?{streamParams:nt}:{},...l(`stream-signals`)?{streamSignals:rt}:{},...l(`switch`)?{switch:it}:{},...l(`tamper`)?{tamper:at}:{},...l(`temperature-sensor`)?{temperatureSensor:ot}:{},...l(`update`)?{update:st}:{},...l(`vacuum-control`)?{vacuumControl:ct}:{},...l(`valve`)?{valve:lt}:{},...l(`vibration`)?{vibration:ut}:{},...l(`videoclips`)?{videoclips:dt}:{},...l(`water-heater`)?{waterHeater:ft}:{},...l(`weather`)?{weather:pt}:{},...l(`webrtc-session`)?{webrtcSession:mt}:{},...l(`zone-analytics`)?{zoneAnalytics:ht}:{},...l(`zone-rules`)?{zoneRules:gt}:{},...l(`zones`)?{zones:_t}:{},addonSettings:vt,audioAnalyzer:yt,deviceAdoption:bt,deviceExport:xt,deviceManager:St,deviceState:Ct,faceGallery:wt,networkQuality:Tt,notificationRules:Et,osdManager:Dt,pipelineExecutor:Ot,pipelineOrchestrator:kt,pipelineRunner:At,plateGallery:jt,recordingArchive:Mt,recordingExport:Nt,streamBroker:Pt}}var wJ=`device.state-changed`,TJ=`capability.binding-changed`,EJ=`device.registered`,DJ=`device.unregistered`,OJ=`device.updated`,kJ=class{api;stateMirror=new Map;bindings=new Map;devices=new Map;handleListeners=new Map;globalStateListeners=new Set;capListeners=new Map;deviceListeners=new Map;addedListeners=new Set;removedListeners=new Set;pendingWaits=new Set;stateSource;bridges=[];initialized=!1;initPromise=null;constructor(e){this.api=e,this.stateSource=Zq(this.stateMirror,this.handleListeners,this.api)}async init(e=15e3){if(!this.initialized){if(this.initPromise)return this.initPromise;this.initPromise=(async()=>{let t=(t,n)=>Number.isFinite(e)?new Promise((r,i)=>{let a=setTimeout(()=>i(Error(`SystemMirror.init: '${n}' timed out after ${e}ms`)),e);t.then(e=>{clearTimeout(a),r(e)},e=>{clearTimeout(a),i(e)})}):t,[n,r,i]=await Promise.all([t(this.api.deviceManager.getAllBindings.query({}),`deviceManager.getAllBindings`),t(this.api.deviceState.getAllSnapshots.query({}),`deviceState.getAllSnapshots`),t(this.api.deviceManager.listAll.query({}),`deviceManager.listAll`)]);for(let e of n)this.bindings.set(e.deviceId,e);for(let[e,t]of Object.entries(r)){let n=Number(e);if(!Number.isFinite(n))continue;let r=new Map;for(let[e,n]of Object.entries(t))r.set(e,n);this.stateMirror.set(n,r)}for(let e of i)this.devices.set(e.id,e);try{this.subscribeBus()}catch{}this.initialized=!0})();try{await this.initPromise}finally{this.initPromise=null}}}isReady(){return this.initialized}async awaitReady(){if(!this.initialized)return this.initPromise?this.initPromise:this.init()}dispose(){for(let e of this.bridges)try{e.unsubscribe()}catch{}this.bridges=[],this.handleListeners.clear(),this.globalStateListeners.clear(),this.capListeners.clear(),this.deviceListeners.clear(),this.addedListeners.clear(),this.removedListeners.clear(),this.pendingWaits.clear(),this.initialized=!1}getDeviceById(e){let t=this.bindings.get(e);return t?CJ(this.api,t,{stateSource:this.stateSource}):null}getDeviceByName(e){for(let t of this.devices.values())if(t.name===e)return this.getDeviceById(t.id);return null}getDeviceByStableId(e){for(let t of this.devices.values())if(t.stableId===e)return this.getDeviceById(t.id);return null}getDevicesByAddon(e){return this.query({addonId:e})}getDevicesByType(e){return this.query({type:e})}getDeviceInfo(e){return this.devices.get(e)??null}getAllDevices(){let e=[];for(let t of this.bindings.keys()){let n=this.getDeviceById(t);n&&e.push(n)}return e}filterByCap(e){return this.query({caps:e})}query(e={}){let t=[];for(let[n,r]of this.bindings){let i=this.devices.get(n);if(e.id!==void 0&&!AJ(n,e.id)||e.stableId!==void 0&&(!i||!AJ(i.stableId,e.stableId))||e.addonId!==void 0&&(!i||!AJ(i.addonId,e.addonId))||e.type!==void 0&&(!i||!AJ(i.type,e.type)))continue;if(e.caps!==void 0){let t=jJ(e.caps),n=new Set(r.entries.map(e=>e.capName));if(!t.every(e=>n.has(e)))continue}if(e.anyCap!==void 0){let t=jJ(e.anyCap),n=new Set(r.entries.map(e=>e.capName));if(!t.some(e=>n.has(e)))continue}if(e.name!==void 0&&(!i||!MJ(i.name,e.name))||e.online!==void 0&&(!i||i.online!==e.online))continue;if(e.parentDeviceId!==void 0){if(!i)continue;let t=e.parentDeviceId;if((i.parentDeviceId??null)!==t)continue}if(e.feature!==void 0&&(!i||!jJ(e.feature).every(e=>i.features.includes(e)))||e.isCamera!==void 0&&(!i||i.isCamera!==e.isCamera))continue;let a=this.getDeviceById(n);if(a){if(e.where&&i){if(!e.where(i,a))continue}else if(e.where&&!i)continue;t.push(a)}}return t}whereState(e,t){let n=[];for(let[r,i]of this.stateMirror){let a=i.get(e);if(!a||!t(a,r))continue;let o=this.getDeviceById(r);o&&n.push(o)}return n}mapState(e,t){let n=[];for(let[r,i]of this.stateMirror){let a=i.get(e);a&&n.push(t(a,r))}return n}findState(e,t){for(let[n,r]of this.stateMirror){let i=r.get(e);if(i&&t(i,n))return this.getDeviceById(n)}return null}countByCap(e){let t=0;for(let n of this.bindings.values())n.entries.some(t=>t.capName===e)&&t++;return t}countByState(e,t){let n=0;for(let[r,i]of this.stateMirror){let a=i.get(e);a&&t(a,r)&&n++}return n}listen(e){return this.globalStateListeners.add(e),()=>{this.globalStateListeners.delete(e)}}listenCap(e,t){let n=this.capListeners.get(e);return n||(n=new Set,this.capListeners.set(e,n)),n.add(t),()=>{n.delete(t),n.size===0&&this.capListeners.delete(e)}}listenDevice(e,t){let n=this.deviceListeners.get(e);return n||(n=new Set,this.deviceListeners.set(e,n)),n.add(t),()=>{n.delete(t),n.size===0&&this.deviceListeners.delete(e)}}onDeviceAdded(e){return this.addedListeners.add(e),()=>{this.addedListeners.delete(e)}}onDeviceRemoved(e){return this.removedListeners.add(e),()=>{this.removedListeners.delete(e)}}waitForState(e,t,n,r=3e4){return new Promise((i,a)=>{let o=(()=>{let r=this.stateMirror.get(e)?.get(t);return r&&n(r)?r:null})();if(o){i(o);return}let s=null,c=this.listenDevice(e,(e,r,a)=>{r===t&&a&&n(a)&&(s&&clearTimeout(s),c(),i(a))});Number.isFinite(r)&&(s=setTimeout(()=>{c(),a(Error(`waitForState timed out after ${r}ms (deviceId=${e}, capName=${t})`))},r))})}waitForDevice(e,t=3e4){return new Promise((n,r)=>{let i=this.getDeviceById(e);if(i){n(i);return}let a=null,o=this.onDeviceAdded(t=>{if(t!==e)return;let r=this.getDeviceById(t);r&&(a&&clearTimeout(a),o(),n(r))});Number.isFinite(t)&&(a=setTimeout(()=>{o(),r(Error(`waitForDevice timed out after ${t}ms (deviceId=${e})`))},t))})}async forEachCap(e,t){for(let n of this.filterByCap(e))await t(n)}async invokeCap(e,t,n,r={}){let i=this.filterByCap(e),a=Math.max(1,r.parallelism??i.length),o=[];for(let r=0;r<i.length;r+=a){let s=i.slice(r,r+a),c=await Promise.allSettled(s.map(async r=>{let i=r[e];if(!i||typeof i[t]!=`function`)throw Error(`device '${r.deviceId}' does not expose '${e}.${t}'`);return await i[t](n)}));for(let e=0;e<c.length;e++){let t=s[e],n=c[e];n.status===`fulfilled`?o.push({deviceId:t.deviceId,ok:!0,result:n.value}):o.push({deviceId:t.deviceId,ok:!1,error:n.reason})}}return o}summary(){let e={},t={},n={},r=0,i=0;for(let t of this.bindings.values())for(let n of t.entries)e[n.capName]=(e[n.capName]??0)+1;for(let e of this.devices.values())t[e.addonId]=(t[e.addonId]??0)+1,n[e.type]=(n[e.type]??0)+1,e.online?r++:i++;return{totalDevices:this.bindings.size,online:r,offline:i,byCap:e,byAddon:t,byType:n,statedDevices:this.stateMirror.size}}dump(e){let t=e=>{let t=this.devices.get(e)??null,n=this.bindings.get(e)??null,r={},i=this.stateMirror.get(e);if(i)for(let[e,t]of i)r[e]={...t};return{deviceId:e,info:t,binding:n?{...n,entries:n.entries.map(e=>({...e}))}:null,state:r}};if(e!==void 0)return t(e);let n=[];for(let e of this.bindings.keys())n.push(t(e));return n}getRawMirror(){return this.stateMirror}getSystemState(){let e=new Map;for(let[t,n]of this.stateMirror){let r=new Map;for(let[e,t]of n)r.set(e,{...t});e.set(t,r)}return e}subscribeBus(){if(!this.api.live?.onEvent)return;let e=this.api.live.onEvent;this.bridges.push(e.subscribe({category:wJ},{onData:e=>{let t=e.data;!t||typeof t.deviceId!=`number`||typeof t.capName!=`string`||this.applyStateUpdate(t.deviceId,t.capName,t.slice)}})),this.bridges.push(e.subscribe({category:TJ},{onData:e=>{let t=e.data,n=typeof t?.deviceId==`number`?t.deviceId:t?.source?.type===`device`&&typeof t.source.id==`number`?t.source.id:null;n!==null&&this.refreshBinding(n)}})),this.bridges.push(e.subscribe({category:EJ},{onData:e=>{let t=e.data;typeof t?.deviceId==`number`&&this.refreshDeviceMetadata(t.deviceId,`added`)}})),this.bridges.push(e.subscribe({category:DJ},{onData:e=>{let t=e.data;typeof t?.deviceId==`number`&&this.applyDeviceRemoval(t.deviceId)}})),this.bridges.push(e.subscribe({category:OJ},{onData:e=>{let t=e.data;typeof t?.deviceId==`number`&&this.refreshDeviceMetadata(t.deviceId,`updated`)}}))}applyStateUpdate(e,t,n){let r=this.stateMirror.get(e);r||(r=new Map,this.stateMirror.set(e,r)),n===void 0?r.delete(t):r.set(t,n);let i=`${e}:${t}`,a=this.handleListeners.get(i);if(a)for(let e of a)try{e(n)}catch{}for(let r of this.globalStateListeners)try{r(e,t,n)}catch{}let o=this.capListeners.get(t);if(o)for(let t of o)try{t(e,n)}catch{}let s=this.deviceListeners.get(e);if(s)for(let r of s)try{r(e,t,n)}catch{}}applyDeviceRemoval(e){let t=this.devices.get(e)??null;this.bindings.delete(e),this.devices.delete(e),this.stateMirror.delete(e);for(let n of this.removedListeners)try{n(e,t)}catch{}}async refreshBinding(e){try{let t=await this.api.deviceManager.getBindings.query({deviceId:e});if(t.entries.length>0){this.bindings.set(e,t);return}if(await this.api.deviceManager.getDevice.query({deviceId:e})===null){this.applyDeviceRemoval(e);return}this.bindings.set(e,t)}catch{}}async refreshDeviceMetadata(e,t){try{let n=await this.api.deviceManager.getDevice.query({deviceId:e});if(!n)return;let r=!this.devices.has(e);if(this.devices.set(e,n),t===`added`&&r){await this.refreshBinding(e);for(let t of this.addedListeners)try{t(e,n)}catch{}}}catch{}}};function AJ(e,t){return Array.isArray(t)?t.includes(e):e===t}function jJ(e){return Array.isArray(e)?e:[e]}function MJ(e,t){return typeof t==`string`?e===t:t instanceof RegExp?t.test(e):`exact`in t?e===t.exact:`contains`in t?e.toLowerCase().includes(t.contains.toLowerCase()):!1}function NJ(e){return e.def}function PJ(e){return e}function FJ(e,t=`Configuration`,n=`main`){return{sections:[{id:n,title:t,fields:e.map(e=>IJ(e.key,e.schema,e.description))}]}}function IJ(e,t,n){let r=VJ(t),i=HJ(t),a={key:e,label:n??UJ(e),description:n,default:i};if(r instanceof te&&BK(t))return{...a,type:`password`,showToggle:!0};if(r instanceof te)return LJ(e,a);if(r instanceof ee)return RJ(r,a);if(r instanceof ie)return{...a,type:`boolean`};if(r instanceof ce)return BJ(r,a);if(r instanceof le||r instanceof oe){let e=BK(t)||VK(t).length>0;return{...a,type:`textarea`,rows:6,isJson:!0,...e?{secret:!0}:{}}}return{...a,type:`text`}}function LJ(e,t){let n=e.toLowerCase();return n.includes(`password`)||n.includes(`secret`)||n.includes(`token`)||n.includes(`apikey`)||n.includes(`api_key`)?{...t,type:`password`,showToggle:!0}:{...t,type:`text`}}function RJ(e,t){let n=PJ(e),r=n.minValue,i=n.maxValue,a=r!=null&&isFinite(r)?r:void 0,o=i!=null&&isFinite(i)?i:void 0,s=zJ(e);return{...t,type:`number`,...a===void 0?{}:{min:a},...o===void 0?{}:{max:o},...s===void 0?{}:{step:s}}}function zJ(e){let t=NJ(e).checks??[];for(let e of t)if(e._zod?.def?.check===`multiple_of`&&e._zod.def.value!==void 0)return e._zod.def.value}function BJ(e,t){let n=e.options.map(e=>String(e));return{...t,type:`select`,options:n.map(e=>({label:UJ(e),value:e}))}}function VJ(e){return e instanceof _||e instanceof fe||e instanceof ue?VJ(NJ(e).innerType):e}function HJ(e){if(e instanceof _)return NJ(e).defaultValue}function UJ(e){return e.replace(/([A-Z])/g,` $1`).replace(/[_-]/g,` `).replace(/^\w/,e=>e.toUpperCase()).trim()}var WJ=function(e){return e.Addon=`addon`,e.Core=`core`,e.Device=`device`,e.Provider=`provider`,e.System=`system`,e}({}),GJ=`accessories.air-quality-sensor.alarm-panel.ambient-light-sensor.automation-control.battery.binary.brightness.broker.camera-credentials.carbon-monoxide.climate-control.color.connectivity.consumables.contact.control.cover.day-night.device-adoption.device-discovery.device-export.device-status.doorbell.enum-sensor.event-emitter.fan-control.feature-probe.flood.gas.humidifier.humidity-sensor.image.image-settings.intercom.lawn-mower-control.lock-control.media-player.motion.motion-trigger.motion-zones.mqtt-broker.native-object-detection.navigation.network-link.notifier.numeric-sensor.osd.pet-feeder.power-meter.presence.pressure-sensor.privacy-mask.ptz.ptz-autotrack.recording-archive.recording-onboard.recording-signal.scene-monitor.script-runner.smoke.snapshot.stream-params.switch.tamper.temperature-sensor.update.vacuum-control.valve.vibration.water-heater.weather`.split(`.`),KJ={accessories:`accessories`,addonPages:`addon-pages`,addonPagesSource:`addon-pages-source`,addonRoutes:`addon-routes`,addonSettings:`addon-settings`,addonWidgets:`addon-widgets`,addonWidgetsSource:`addon-widgets-source`,addons:`addons`,adminUi:`admin-ui`,airQualitySensor:`air-quality-sensor`,alarmPanel:`alarm-panel`,alerts:`alerts`,ambientLightSensor:`ambient-light-sensor`,audioAnalysis:`audio-analysis`,audioAnalyzer:`audio-analyzer`,audioCodec:`audio-codec`,audioMetrics:`audio-metrics`,authProvider:`auth-provider`,automationControl:`automation-control`,backup:`backup`,battery:`battery`,binary:`binary`,brightness:`brightness`,broker:`broker`,button:`button`,calendarSource:`calendar-source`,calendars:`calendars`,cameraCredentials:`camera-credentials`,cameraGridLayout:`camera-grid-layout`,cameraPipelineConfig:`camera-pipeline-config`,cameraStreams:`camera-streams`,carbonMonoxide:`carbon-monoxide`,climateControl:`climate-control`,color:`color`,composer:`composer`,connectionTest:`connection-test`,connectivity:`connectivity`,consumables:`consumables`,contact:`contact`,control:`control`,coreBlocks:`core-blocks`,cover:`cover`,customModelRegistry:`custom-model-registry`,dataStoreProvider:`data-store-provider`,databaseSnapshot:`database-snapshot`,dayNight:`day-night`,decoder:`decoder`,detectionPipeline:`detection-pipeline`,deviceAdminLink:`device-admin-link`,deviceAdoption:`device-adoption`,deviceDiscovery:`device-discovery`,deviceExport:`device-export`,deviceExtension:`device-extension`,deviceManager:`device-manager`,deviceOps:`device-ops`,deviceProvider:`device-provider`,deviceState:`device-state`,deviceStatus:`device-status`,doorbell:`doorbell`,embeddingEncoder:`embedding-encoder`,enumSensor:`enum-sensor`,eventEmitter:`event-emitter`,faceGallery:`face-gallery`,failureContribution:`failure-contribution`,fanControl:`fan-control`,featureProbe:`feature-probe`,filesystemBrowse:`filesystem-browse`,flood:`flood`,gas:`gas`,humidifier:`humidifier`,humiditySensor:`humidity-sensor`,image:`image`,imageSettings:`image-settings`,integrations:`integrations`,intercom:`intercom`,keychain:`keychain`,keychainAdmin:`keychain-admin`,lawnMowerControl:`lawn-mower-control`,llm:`llm`,llmRuntime:`llm-runtime`,loadContribution:`load-contribution`,localNetwork:`local-network`,lockControl:`lock-control`,logChannels:`log-channels`,logDestination:`log-destination`,loginMethod:`login-method`,mediaPlayer:`media-player`,meshNetwork:`mesh-network`,metricsProvider:`metrics-provider`,modelConvert:`model-convert`,modelDistributor:`model-distributor`,motion:`motion`,motionDetection:`motion-detection`,motionTrigger:`motion-trigger`,motionZones:`motion-zones`,mqttBroker:`mqtt-broker`,nativeObjectDetection:`native-object-detection`,navigation:`navigation`,networkAccess:`network-access`,networkLink:`network-link`,networkQuality:`network-quality`,nodes:`nodes`,notificationOutput:`notification-output`,notificationRules:`notification-rules`,notifier:`notifier`,numericSensor:`numeric-sensor`,oauthIntegration:`oauth-integration`,osd:`osd`,osdManager:`osd-manager`,petFeeder:`pet-feeder`,pipelineAnalytics:`pipeline-analytics`,pipelineExecutor:`pipeline-executor`,pipelineOrchestrator:`pipeline-orchestrator`,pipelineRunner:`pipeline-runner`,plateGallery:`plate-gallery`,platformProbe:`platform-probe`,powerMeter:`power-meter`,presence:`presence`,pressureSensor:`pressure-sensor`,privacyMask:`privacy-mask`,ptz:`ptz`,ptzAutotrack:`ptz-autotrack`,reboot:`reboot`,recording:`recording`,recordingArchive:`recording-archive`,recordingExport:`recording-export`,recordingOnboard:`recording-onboard`,recordingSignal:`recording-signal`,sceneMonitor:`scene-monitor`,scriptRunner:`script-runner`,serverManagement:`server-management`,settingsStore:`settings-store`,smoke:`smoke`,smtpProvider:`smtp-provider`,snapshot:`snapshot`,ssoBridge:`sso-bridge`,storage:`storage`,storageEvictable:`storage-evictable`,storageMigration:`storage-migration`,storageOccupancy:`storage-occupancy`,storageProvider:`storage-provider`,streamBroker:`stream-broker`,streamCatalog:`stream-catalog`,streamParams:`stream-params`,streamSignals:`stream-signals`,switch:`switch`,system:`system`,tamper:`tamper`,temperatureSensor:`temperature-sensor`,terminalSession:`terminal-session`,toast:`toast`,turnProvider:`turn-provider`,update:`update`,userManagement:`user-management`,userPasskeys:`user-passkeys`,vacuumControl:`vacuum-control`,valve:`valve`,vectorStore:`vector-store`,vibration:`vibration`,videoclips:`videoclips`,viewerUi:`viewer-ui`,waterHeater:`water-heater`,weather:`weather`,webrtcSession:`webrtc-session`,zoneAnalytics:`zone-analytics`,zoneRules:`zone-rules`,zones:`zones`},qJ=[{key:`accessories`,name:`accessories`},{key:`addonPages`,name:`addon-pages`},{key:`addonPagesSource`,name:`addon-pages-source`},{key:`addonRoutes`,name:`addon-routes`},{key:`addonSettings`,name:`addon-settings`},{key:`addonWidgets`,name:`addon-widgets`},{key:`addonWidgetsSource`,name:`addon-widgets-source`},{key:`addons`,name:`addons`},{key:`adminUi`,name:`admin-ui`},{key:`airQualitySensor`,name:`air-quality-sensor`},{key:`alarmPanel`,name:`alarm-panel`},{key:`alerts`,name:`alerts`},{key:`ambientLightSensor`,name:`ambient-light-sensor`},{key:`audioAnalysis`,name:`audio-analysis`},{key:`audioAnalyzer`,name:`audio-analyzer`},{key:`audioCodec`,name:`audio-codec`},{key:`audioMetrics`,name:`audio-metrics`},{key:`authProvider`,name:`auth-provider`},{key:`automationControl`,name:`automation-control`},{key:`backup`,name:`backup`},{key:`battery`,name:`battery`},{key:`binary`,name:`binary`},{key:`brightness`,name:`brightness`},{key:`broker`,name:`broker`},{key:`button`,name:`button`},{key:`calendarSource`,name:`calendar-source`},{key:`calendars`,name:`calendars`},{key:`cameraCredentials`,name:`camera-credentials`},{key:`cameraGridLayout`,name:`camera-grid-layout`},{key:`cameraPipelineConfig`,name:`camera-pipeline-config`},{key:`cameraStreams`,name:`camera-streams`},{key:`carbonMonoxide`,name:`carbon-monoxide`},{key:`climateControl`,name:`climate-control`},{key:`color`,name:`color`},{key:`composer`,name:`composer`},{key:`connectionTest`,name:`connection-test`},{key:`connectivity`,name:`connectivity`},{key:`consumables`,name:`consumables`},{key:`contact`,name:`contact`},{key:`control`,name:`control`},{key:`coreBlocks`,name:`core-blocks`},{key:`cover`,name:`cover`},{key:`customModelRegistry`,name:`custom-model-registry`},{key:`dataStoreProvider`,name:`data-store-provider`},{key:`databaseSnapshot`,name:`database-snapshot`},{key:`dayNight`,name:`day-night`},{key:`decoder`,name:`decoder`},{key:`detectionPipeline`,name:`detection-pipeline`},{key:`deviceAdminLink`,name:`device-admin-link`},{key:`deviceAdoption`,name:`device-adoption`},{key:`deviceDiscovery`,name:`device-discovery`},{key:`deviceExport`,name:`device-export`},{key:`deviceExtension`,name:`device-extension`},{key:`deviceManager`,name:`device-manager`},{key:`deviceOps`,name:`device-ops`},{key:`deviceProvider`,name:`device-provider`},{key:`deviceState`,name:`device-state`},{key:`deviceStatus`,name:`device-status`},{key:`doorbell`,name:`doorbell`},{key:`embeddingEncoder`,name:`embedding-encoder`},{key:`enumSensor`,name:`enum-sensor`},{key:`eventEmitter`,name:`event-emitter`},{key:`faceGallery`,name:`face-gallery`},{key:`failureContribution`,name:`failure-contribution`},{key:`fanControl`,name:`fan-control`},{key:`featureProbe`,name:`feature-probe`},{key:`filesystemBrowse`,name:`filesystem-browse`},{key:`flood`,name:`flood`},{key:`gas`,name:`gas`},{key:`humidifier`,name:`humidifier`},{key:`humiditySensor`,name:`humidity-sensor`},{key:`image`,name:`image`},{key:`imageSettings`,name:`image-settings`},{key:`integrations`,name:`integrations`},{key:`intercom`,name:`intercom`},{key:`keychain`,name:`keychain`},{key:`keychainAdmin`,name:`keychain-admin`},{key:`lawnMowerControl`,name:`lawn-mower-control`},{key:`llm`,name:`llm`},{key:`llmRuntime`,name:`llm-runtime`},{key:`loadContribution`,name:`load-contribution`},{key:`localNetwork`,name:`local-network`},{key:`lockControl`,name:`lock-control`},{key:`logChannels`,name:`log-channels`},{key:`logDestination`,name:`log-destination`},{key:`loginMethod`,name:`login-method`},{key:`mediaPlayer`,name:`media-player`},{key:`meshNetwork`,name:`mesh-network`},{key:`metricsProvider`,name:`metrics-provider`},{key:`modelConvert`,name:`model-convert`},{key:`modelDistributor`,name:`model-distributor`},{key:`motion`,name:`motion`},{key:`motionDetection`,name:`motion-detection`},{key:`motionTrigger`,name:`motion-trigger`},{key:`motionZones`,name:`motion-zones`},{key:`mqttBroker`,name:`mqtt-broker`},{key:`nativeObjectDetection`,name:`native-object-detection`},{key:`navigation`,name:`navigation`},{key:`networkAccess`,name:`network-access`},{key:`networkLink`,name:`network-link`},{key:`networkQuality`,name:`network-quality`},{key:`nodes`,name:`nodes`},{key:`notificationOutput`,name:`notification-output`},{key:`notificationRules`,name:`notification-rules`},{key:`notifier`,name:`notifier`},{key:`numericSensor`,name:`numeric-sensor`},{key:`oauthIntegration`,name:`oauth-integration`},{key:`osd`,name:`osd`},{key:`osdManager`,name:`osd-manager`},{key:`petFeeder`,name:`pet-feeder`},{key:`pipelineAnalytics`,name:`pipeline-analytics`},{key:`pipelineExecutor`,name:`pipeline-executor`},{key:`pipelineOrchestrator`,name:`pipeline-orchestrator`},{key:`pipelineRunner`,name:`pipeline-runner`},{key:`plateGallery`,name:`plate-gallery`},{key:`platformProbe`,name:`platform-probe`},{key:`powerMeter`,name:`power-meter`},{key:`presence`,name:`presence`},{key:`pressureSensor`,name:`pressure-sensor`},{key:`privacyMask`,name:`privacy-mask`},{key:`ptz`,name:`ptz`},{key:`ptzAutotrack`,name:`ptz-autotrack`},{key:`reboot`,name:`reboot`},{key:`recording`,name:`recording`},{key:`recordingArchive`,name:`recording-archive`},{key:`recordingExport`,name:`recording-export`},{key:`recordingOnboard`,name:`recording-onboard`},{key:`recordingSignal`,name:`recording-signal`},{key:`sceneMonitor`,name:`scene-monitor`},{key:`scriptRunner`,name:`script-runner`},{key:`serverManagement`,name:`server-management`},{key:`settingsStore`,name:`settings-store`},{key:`smoke`,name:`smoke`},{key:`smtpProvider`,name:`smtp-provider`},{key:`snapshot`,name:`snapshot`},{key:`ssoBridge`,name:`sso-bridge`},{key:`storage`,name:`storage`},{key:`storageEvictable`,name:`storage-evictable`},{key:`storageMigration`,name:`storage-migration`},{key:`storageOccupancy`,name:`storage-occupancy`},{key:`storageProvider`,name:`storage-provider`},{key:`streamBroker`,name:`stream-broker`},{key:`streamCatalog`,name:`stream-catalog`},{key:`streamParams`,name:`stream-params`},{key:`streamSignals`,name:`stream-signals`},{key:`switch`,name:`switch`},{key:`system`,name:`system`},{key:`tamper`,name:`tamper`},{key:`temperatureSensor`,name:`temperature-sensor`},{key:`terminalSession`,name:`terminal-session`},{key:`toast`,name:`toast`},{key:`turnProvider`,name:`turn-provider`},{key:`update`,name:`update`},{key:`userManagement`,name:`user-management`},{key:`userPasskeys`,name:`user-passkeys`},{key:`vacuumControl`,name:`vacuum-control`},{key:`valve`,name:`valve`},{key:`vectorStore`,name:`vector-store`},{key:`vibration`,name:`vibration`},{key:`videoclips`,name:`videoclips`},{key:`viewerUi`,name:`viewer-ui`},{key:`waterHeater`,name:`water-heater`},{key:`weather`,name:`weather`},{key:`webrtcSession`,name:`webrtc-session`},{key:`zoneAnalytics`,name:`zone-analytics`},{key:`zoneRules`,name:`zone-rules`},{key:`zones`,name:`zones`}],JJ=[fF,zd,Vd,Gd,Zd,af,nf,YF,cf,ZF,UC,pf,$F,gf,Pf,Hf,iI,Wf,oI,up,cI,uI,fI,jp,pI,vI,wI,DI,NI,Mp,am,FI,RI,UI,Ph,JI,XI,tL,rL,sL,v_,uL,w_,F_,Qf,gL,tv,nv,av,Fv,Sv,Wv,Zy,Ay,bL,oy,nb,SL,TL,bb,OL,jL,HL,Cb,GL,qL,Eb,YL,ZL,$L,tR,rR,fR,xR,TR,H_,Q_,kR,qx,Px,Zx,YR,QR,$x,nS,cS,rz,sz,OS,AS,NS,dz,IS,mz,yz,JS,Dz,zz,QS,Gz,Yz,pB,hC,fE,bB,SB,wE,OB,VB,GB,fk,Gk,UM,nM,ZB,pV,hV,vV,bV,EV,IV,VV,HV,eH,bH,VH,eU,bU,zU,WU,lN,N_,KU,mN,_N,yN,xN,wN,TN,DN,zN,em,YU,nW,HN,cW,zW,VW,UW,ZN,GW,$N,qW,cG,tP,fG,hG,EP,_G,XP,eF,yG,xG,uF,AG,MG,yj],YJ=new Set(`accessories.air-quality-sensor.alarm-panel.ambient-light-sensor.audio-analysis.audio-metrics.automation-control.battery.binary.brightness.button.camera-credentials.camera-grid-layout.camera-pipeline-config.camera-streams.carbon-monoxide.climate-control.color.connectivity.consumables.contact.control.cover.day-night.detection-pipeline.device-admin-link.device-discovery.device-extension.device-ops.device-status.doorbell.enum-sensor.event-emitter.fan-control.feature-probe.flood.gas.humidifier.humidity-sensor.image.image-settings.intercom.lawn-mower-control.lock-control.media-player.motion.motion-detection.motion-trigger.motion-zones.native-object-detection.navigation.network-link.notifier.numeric-sensor.osd.pet-feeder.pipeline-analytics.power-meter.presence.pressure-sensor.privacy-mask.ptz.ptz-autotrack.reboot.recording.recording-onboard.recording-signal.scene-monitor.script-runner.smoke.snapshot.stream-catalog.stream-params.stream-signals.switch.tamper.temperature-sensor.update.vacuum-control.valve.vibration.videoclips.water-heater.weather.webrtc-session.zone-analytics.zone-rules.zones`.split(`.`));function XJ(e){return YJ.has(e)}var ZJ=Object.freeze({"accessories.getStatus":[{name:`deviceId`,form:`single`,optional:!1}],"accessories.setChildHidden":[{name:`childDeviceId`,form:`single`,optional:!1},{name:`deviceId`,form:`single`,optional:!1}],"addonSettings.getDeviceSettings":[{name:`deviceId`,form:`single`,optional:!1}],"addonSettings.updateDeviceSettings":[{name:`deviceId`,form:`single`,optional:!1}],"airQualitySensor.getStatus":[{name:`deviceId`,form:`single`,optional:!1}],"alarmPanel.arm":[{name:`deviceId`,form:`single`,optional:!1}],"alarmPanel.disarm":[{name:`deviceId`,form:`single`,optional:!1}],"alarmPanel.getStatus":[{name:`deviceId`,form:`single`,optional:!1}],"alarmPanel.trigger":[{name:`deviceId`,form:`single`,optional:!1}],"ambientLightSensor.getStatus":[{name:`deviceId`,form:`single`,optional:!1}],"audioAnalysis.applyDeviceSettingsPatch":[{name:`deviceId`,form:`single`,optional:!1}],"audioAnalysis.getDeviceLiveContribution":[{name:`deviceId`,form:`single`,optional:!1}],"audioAnalysis.getDeviceSettingsContribution":[{name:`deviceId`,form:`single`,optional:!1}],"audioAnalysis.resolveDeviceSettings":[{name:`deviceId`,form:`single`,optional:!1}],"audioAnalyzer.attachDevice":[{name:`deviceId`,form:`single`,optional:!1}],"audioAnalyzer.classify":[{name:`deviceId`,form:`single`,optional:!0}],"audioAnalyzer.detachDevice":[{name:`deviceId`,form:`single`,optional:!1}],"audioMetrics.getCurrentSnapshot":[{name:`deviceId`,form:`single`,optional:!1}],"audioMetrics.getHistory":[{name:`deviceId`,form:`single`,optional:!1}],"automationControl.disable":[{name:`deviceId`,form:`single`,optional:!1}],"automationControl.enable":[{name:`deviceId`,form:`single`,optional:!1}],"automationControl.getStatus":[{name:`deviceId`,form:`single`,optional:!1}],"automationControl.trigger":[{name:`deviceId`,form:`single`,optional:!1}],"battery.getStatus":[{name:`deviceId`,form:`single`,optional:!1}],"battery.wakeForStream":[{name:`deviceId`,form:`single`,optional:!1}],"binary.getStatus":[{name:`deviceId`,form:`single`,optional:!1}],"brightness.getStatus":[{name:`deviceId`,form:`single`,optional:!1}],"brightness.setBrightness":[{name:`deviceId`,form:`single`,optional:!1}],"button.press":[{name:`deviceId`,form:`single`,optional:!1}],"cameraCredentials.getCredentials":[{name:`deviceId`,form:`single`,optional:!1}],"cameraCredentials.getStatus":[{name:`deviceId`,form:`single`,optional:!1}],"cameraGridLayout.applyDeviceSettingsPatch":[{name:`deviceId`,form:`single`,optional:!1}],"cameraGridLayout.getDeviceLiveContribution":[{name:`deviceId`,form:`single`,optional:!1}],"cameraGridLayout.getDeviceSettingsContribution":[{name:`deviceId`,form:`single`,optional:!1}],"cameraGridLayout.getLayout":[{name:`deviceId`,form:`single`,optional:!1}],"cameraGridLayout.saveLayout":[{name:`cells`,form:`object-array`,optional:!1,itemField:`deviceId`},{name:`deviceId`,form:`single`,optional:!1}],"cameraPipelineConfig.applyDeviceSettingsPatch":[{name:`deviceId`,form:`single`,optional:!1}],"cameraPipelineConfig.getDeviceLiveContribution":[{name:`deviceId`,form:`single`,optional:!1}],"cameraPipelineConfig.getDeviceSettingsContribution":[{name:`deviceId`,form:`single`,optional:!1}],"cameraStreams.getBrokerStreams":[{name:`deviceId`,form:`single`,optional:!1}],"cameraStreams.getCameraStreams":[{name:`deviceId`,form:`single`,optional:!1}],"cameraStreams.getProfileRtspEntries":[{name:`deviceId`,form:`single`,optional:!1}],"cameraStreams.getRtspEntries":[{name:`deviceId`,form:`single`,optional:!1}],"cameraStreams.pickStream":[{name:`deviceId`,form:`single`,optional:!1}],"carbonMonoxide.getStatus":[{name:`deviceId`,form:`single`,optional:!1}],"climateControl.getStatus":[{name:`deviceId`,form:`single`,optional:!1}],"climateControl.setFanMode":[{name:`deviceId`,form:`single`,optional:!1}],"climateControl.setMode":[{name:`deviceId`,form:`single`,optional:!1}],"climateControl.setPreset":[{name:`deviceId`,form:`single`,optional:!1}],"climateControl.setSwingHorizontal":[{name:`deviceId`,form:`single`,optional:!1}],"climateControl.setSwingVertical":[{name:`deviceId`,form:`single`,optional:!1}],"climateControl.setTarget":[{name:`deviceId`,form:`single`,optional:!1}],"climateControl.setTargetHumidity":[{name:`deviceId`,form:`single`,optional:!1}],"climateControl.setTargetRange":[{name:`deviceId`,form:`single`,optional:!1}],"color.getStatus":[{name:`deviceId`,form:`single`,optional:!1}],"color.setColor":[{name:`deviceId`,form:`single`,optional:!1}],"connectivity.getStatus":[{name:`deviceId`,form:`single`,optional:!1}],"consumables.getStatus":[{name:`deviceId`,form:`single`,optional:!1}],"consumables.reset":[{name:`deviceId`,form:`single`,optional:!1}],"contact.getStatus":[{name:`deviceId`,form:`single`,optional:!1}],"control.getStatus":[{name:`deviceId`,form:`single`,optional:!1}],"control.setValue":[{name:`deviceId`,form:`single`,optional:!1}],"cover.close":[{name:`deviceId`,form:`single`,optional:!1}],"cover.getStatus":[{name:`deviceId`,form:`single`,optional:!1}],"cover.open":[{name:`deviceId`,form:`single`,optional:!1}],"cover.setPosition":[{name:`deviceId`,form:`single`,optional:!1}],"cover.setTiltPosition":[{name:`deviceId`,form:`single`,optional:!1}],"cover.stop":[{name:`deviceId`,form:`single`,optional:!1}],"dayNight.getOptions":[{name:`deviceId`,form:`single`,optional:!1}],"dayNight.getStatus":[{name:`deviceId`,form:`single`,optional:!1}],"dayNight.setSettings":[{name:`deviceId`,form:`single`,optional:!1}],"detectionPipeline.applyDeviceSettingsPatch":[{name:`deviceId`,form:`single`,optional:!1}],"detectionPipeline.getDeviceLiveContribution":[{name:`deviceId`,form:`single`,optional:!1}],"detectionPipeline.getDeviceSettingsContribution":[{name:`deviceId`,form:`single`,optional:!1}],"deviceAdminLink.getAdminLink":[{name:`deviceId`,form:`single`,optional:!1}],"deviceAdoption.getStatus":[{name:`deviceId`,form:`single`,optional:!1}],"deviceAdoption.release":[{name:`camDeviceId`,form:`single`,optional:!1}],"deviceAdoption.resync":[{name:`camDeviceId`,form:`single`,optional:!1}],"deviceDiscovery.adoptDevice":[{name:`deviceId`,form:`single`,optional:!1}],"deviceDiscovery.getStatus":[{name:`deviceId`,form:`single`,optional:!1}],"deviceDiscovery.listDiscovered":[{name:`deviceId`,form:`single`,optional:!1}],"deviceDiscovery.refreshDiscovery":[{name:`deviceId`,form:`single`,optional:!1}],"deviceDiscovery.releaseDevice":[{name:`childDeviceId`,form:`single`,optional:!1},{name:`deviceId`,form:`single`,optional:!1}],"deviceExport.applyDeviceSettingsPatch":[{name:`deviceId`,form:`single`,optional:!1}],"deviceExport.getDeviceLiveContribution":[{name:`deviceId`,form:`single`,optional:!1}],"deviceExport.getDeviceSettingsContribution":[{name:`deviceId`,form:`single`,optional:!1}],"deviceExtension.listCandidates":[{name:`deviceId`,form:`single`,optional:!1}],"deviceExtension.listSlots":[{name:`deviceId`,form:`single`,optional:!1}],"deviceExtension.listSources":[{name:`deviceId`,form:`single`,optional:!1}],"deviceExtension.setSlot":[{name:`deviceId`,form:`single`,optional:!1}],"deviceManager.adoptionRelease":[{name:`camDeviceId`,form:`single`,optional:!1}],"deviceManager.adoptionResync":[{name:`camDeviceId`,form:`single`,optional:!1}],"deviceManager.applyInitialMeta":[{name:`deviceId`,form:`single`,optional:!1},{name:`linkDeviceId`,form:`single`,optional:!0}],"deviceManager.disable":[{name:`deviceId`,form:`single`,optional:!1}],"deviceManager.enable":[{name:`deviceId`,form:`single`,optional:!1}],"deviceManager.getBindings":[{name:`deviceId`,form:`single`,optional:!1}],"deviceManager.getBindingsBatch":[{name:`deviceIds`,form:`array`,optional:!1}],"deviceManager.getChildren":[{name:`parentDeviceId`,form:`single`,optional:!1}],"deviceManager.getChildrenBatch":[{name:`parentDeviceIds`,form:`array`,optional:!1}],"deviceManager.getConfigSchema":[{name:`deviceId`,form:`single`,optional:!1}],"deviceManager.getDevice":[{name:`deviceId`,form:`single`,optional:!1}],"deviceManager.getDeviceAggregate":[{name:`deviceId`,form:`single`,optional:!1}],"deviceManager.getDeviceLiveInfoAggregate":[{name:`deviceId`,form:`single`,optional:!1}],"deviceManager.getDeviceSettingsAggregate":[{name:`deviceId`,form:`single`,optional:!1}],"deviceManager.getDeviceStatusAggregate":[{name:`deviceId`,form:`single`,optional:!1}],"deviceManager.getDeviceStatusAggregateBatch":[{name:`deviceIds`,form:`array`,optional:!1}],"deviceManager.getLinkedDevices":[{name:`deviceId`,form:`single`,optional:!1}],"deviceManager.getLinkedDevicesBatch":[{name:`deviceIds`,form:`array`,optional:!1}],"deviceManager.getSettingsSchema":[{name:`deviceId`,form:`single`,optional:!1}],"deviceManager.getStreamProfileMap":[{name:`deviceId`,form:`single`,optional:!1}],"deviceManager.getStreamSources":[{name:`deviceId`,form:`single`,optional:!1}],"deviceManager.getWireableFields":[{name:`deviceId`,form:`single`,optional:!1}],"deviceManager.getWrapperActivation":[{name:`deviceId`,form:`single`,optional:!1}],"deviceManager.listAll":[{name:`deviceIds`,form:`array`,optional:!0}],"deviceManager.loadConfig":[{name:`deviceId`,form:`single`,optional:!1}],"deviceManager.loadMeta":[{name:`deviceId`,form:`single`,optional:!1}],"deviceManager.loadRuntimeState":[{name:`deviceId`,form:`single`,optional:!1}],"deviceManager.persistConfig":[{name:`deviceId`,form:`single`,optional:!1}],"deviceManager.probeStreams":[{name:`deviceId`,form:`single`,optional:!1}],"deviceManager.registerDevice":[{name:`parentDeviceId`,form:`single`,optional:!0}],"deviceManager.remove":[{name:`deviceId`,form:`single`,optional:!1}],"deviceManager.removeDevice":[{name:`deviceId`,form:`single`,optional:!1}],"deviceManager.runDeviceAction":[{name:`deviceId`,form:`single`,optional:!1}],"deviceManager.setChildLayout":[{name:`deviceId`,form:`single`,optional:!1}],"deviceManager.setDisabled":[{name:`deviceId`,form:`single`,optional:!1}],"deviceManager.setDisplay":[{name:`deviceId`,form:`single`,optional:!1}],"deviceManager.setIntegrationId":[{name:`deviceId`,form:`single`,optional:!1}],"deviceManager.setLinkDeviceId":[{name:`deviceId`,form:`single`,optional:!1},{name:`linkDeviceId`,form:`single`,optional:!0}],"deviceManager.setLocation":[{name:`deviceId`,form:`single`,optional:!1}],"deviceManager.setMetadata":[{name:`deviceId`,form:`single`,optional:!1}],"deviceManager.setName":[{name:`deviceId`,form:`single`,optional:!1}],"deviceManager.setPrimaryChildEntityId":[{name:`deviceId`,form:`single`,optional:!1}],"deviceManager.setRole":[{name:`deviceId`,form:`single`,optional:!1}],"deviceManager.setStreamProfileMap":[{name:`deviceId`,form:`single`,optional:!1}],"deviceManager.setType":[{name:`deviceId`,form:`single`,optional:!1}],"deviceManager.setWrapperActive":[{name:`deviceId`,form:`single`,optional:!1}],"deviceManager.testField":[{name:`deviceId`,form:`single`,optional:!1}],"deviceManager.updateConfig":[{name:`deviceId`,form:`single`,optional:!1}],"deviceManager.updateDeviceField":[{name:`deviceId`,form:`single`,optional:!1}],"deviceManager.updateDeviceFieldsBatch":[{name:`deviceId`,form:`single`,optional:!1}],"deviceOps.getConfigEntries":[{name:`deviceId`,form:`single`,optional:!1}],"deviceOps.getRawState":[{name:`deviceId`,form:`single`,optional:!1}],"deviceOps.getSettingsSchema":[{name:`deviceId`,form:`single`,optional:!1}],"deviceOps.getStreamSources":[{name:`deviceId`,form:`single`,optional:!1}],"deviceOps.removeDevice":[{name:`deviceId`,form:`single`,optional:!1}],"deviceOps.runAction":[{name:`deviceId`,form:`single`,optional:!1}],"deviceOps.setConfig":[{name:`deviceId`,form:`single`,optional:!1}],"deviceState.claimFields":[{name:`deviceId`,form:`single`,optional:!1}],"deviceState.getCapSlice":[{name:`deviceId`,form:`single`,optional:!1}],"deviceState.getNativeCapSlice":[{name:`deviceId`,form:`single`,optional:!1}],"deviceState.getSnapshot":[{name:`deviceId`,form:`single`,optional:!1}],"deviceState.patchOwnedFields":[{name:`deviceId`,form:`single`,optional:!1}],"deviceState.releaseClaim":[{name:`deviceId`,form:`single`,optional:!1}],"deviceState.setCapSlice":[{name:`deviceId`,form:`single`,optional:!1}],"deviceStatus.getStatus":[{name:`deviceId`,form:`single`,optional:!1}],"doorbell.getStatus":[{name:`deviceId`,form:`single`,optional:!1}],"enumSensor.getStatus":[{name:`deviceId`,form:`single`,optional:!1}],"eventEmitter.getStatus":[{name:`deviceId`,form:`single`,optional:!1}],"faceGallery.getFaceByTrack":[{name:`deviceId`,form:`single`,optional:!1}],"faceGallery.listRecentFaces":[{name:`deviceId`,form:`single`,optional:!0},{name:`deviceIds`,form:`array`,optional:!0}],"fanControl.getStatus":[{name:`deviceId`,form:`single`,optional:!1}],"fanControl.setDirection":[{name:`deviceId`,form:`single`,optional:!1}],"fanControl.setOscillating":[{name:`deviceId`,form:`single`,optional:!1}],"fanControl.setPercentage":[{name:`deviceId`,form:`single`,optional:!1}],"fanControl.setPreset":[{name:`deviceId`,form:`single`,optional:!1}],"featureProbe.getStatus":[{name:`deviceId`,form:`single`,optional:!1}],"flood.getStatus":[{name:`deviceId`,form:`single`,optional:!1}],"gas.getStatus":[{name:`deviceId`,form:`single`,optional:!1}],"humidifier.getStatus":[{name:`deviceId`,form:`single`,optional:!1}],"humidifier.setMode":[{name:`deviceId`,form:`single`,optional:!1}],"humidifier.setOn":[{name:`deviceId`,form:`single`,optional:!1}],"humidifier.setTargetHumidity":[{name:`deviceId`,form:`single`,optional:!1}],"humiditySensor.getStatus":[{name:`deviceId`,form:`single`,optional:!1}],"image.getStatus":[{name:`deviceId`,form:`single`,optional:!1}],"imageSettings.getOptions":[{name:`deviceId`,form:`single`,optional:!1}],"imageSettings.getStatus":[{name:`deviceId`,form:`single`,optional:!1}],"imageSettings.setSettings":[{name:`deviceId`,form:`single`,optional:!1}],"intercom.endTalkSession":[{name:`deviceId`,form:`single`,optional:!1}],"intercom.getStatus":[{name:`deviceId`,form:`single`,optional:!1}],"intercom.handleAnswer":[{name:`deviceId`,form:`single`,optional:!1}],"intercom.pushTalkAudio":[{name:`deviceId`,form:`single`,optional:!1}],"intercom.startSession":[{name:`deviceId`,form:`single`,optional:!1}],"intercom.startTalkSession":[{name:`deviceId`,form:`single`,optional:!1}],"intercom.stopSession":[{name:`deviceId`,form:`single`,optional:!1}],"lawnMowerControl.dock":[{name:`deviceId`,form:`single`,optional:!1}],"lawnMowerControl.getStatus":[{name:`deviceId`,form:`single`,optional:!1}],"lawnMowerControl.pause":[{name:`deviceId`,form:`single`,optional:!1}],"lawnMowerControl.startMowing":[{name:`deviceId`,form:`single`,optional:!1}],"lockControl.getStatus":[{name:`deviceId`,form:`single`,optional:!1}],"lockControl.lock":[{name:`deviceId`,form:`single`,optional:!1}],"lockControl.open":[{name:`deviceId`,form:`single`,optional:!1}],"lockControl.unlock":[{name:`deviceId`,form:`single`,optional:!1}],"mediaPlayer.getStatus":[{name:`deviceId`,form:`single`,optional:!1}],"mediaPlayer.next":[{name:`deviceId`,form:`single`,optional:!1}],"mediaPlayer.pause":[{name:`deviceId`,form:`single`,optional:!1}],"mediaPlayer.play":[{name:`deviceId`,form:`single`,optional:!1}],"mediaPlayer.playMedia":[{name:`deviceId`,form:`single`,optional:!1}],"mediaPlayer.previous":[{name:`deviceId`,form:`single`,optional:!1}],"mediaPlayer.seek":[{name:`deviceId`,form:`single`,optional:!1}],"mediaPlayer.selectSource":[{name:`deviceId`,form:`single`,optional:!1}],"mediaPlayer.setMute":[{name:`deviceId`,form:`single`,optional:!1}],"mediaPlayer.setRepeat":[{name:`deviceId`,form:`single`,optional:!1}],"mediaPlayer.setShuffle":[{name:`deviceId`,form:`single`,optional:!1}],"mediaPlayer.setVolume":[{name:`deviceId`,form:`single`,optional:!1}],"mediaPlayer.stop":[{name:`deviceId`,form:`single`,optional:!1}],"motion.getStatus":[{name:`deviceId`,form:`single`,optional:!1}],"motion.isDetected":[{name:`deviceId`,form:`single`,optional:!1}],"motionDetection.analyze":[{name:`deviceId`,form:`single`,optional:!1}],"motionDetection.applyDeviceSettingsPatch":[{name:`deviceId`,form:`single`,optional:!1}],"motionDetection.getDeviceLiveContribution":[{name:`deviceId`,form:`single`,optional:!1}],"motionDetection.getDeviceSettingsContribution":[{name:`deviceId`,form:`single`,optional:!1}],"motionDetection.removeCamera":[{name:`deviceId`,form:`single`,optional:!1}],"motionTrigger.getStatus":[{name:`deviceId`,form:`single`,optional:!1}],"motionTrigger.setMotionTrigger":[{name:`deviceId`,form:`single`,optional:!1}],"motionZones.getOptions":[{name:`deviceId`,form:`single`,optional:!1}],"motionZones.getStatus":[{name:`deviceId`,form:`single`,optional:!1}],"motionZones.setZone":[{name:`deviceId`,form:`single`,optional:!1}],"nativeObjectDetection.getOptions":[{name:`deviceId`,form:`single`,optional:!1}],"nativeObjectDetection.getStatus":[{name:`deviceId`,form:`single`,optional:!1}],"nativeObjectDetection.setEnabled":[{name:`deviceId`,form:`single`,optional:!1}],"nativeObjectDetection.setSettings":[{name:`deviceId`,form:`single`,optional:!1}],"navigation.getFeatures":[{name:`deviceId`,form:`single`,optional:!1}],"navigation.getStatus":[{name:`deviceId`,form:`single`,optional:!1}],"navigation.goToPoint":[{name:`deviceId`,form:`single`,optional:!1}],"navigation.listActions":[{name:`deviceId`,form:`single`,optional:!1}],"navigation.move":[{name:`deviceId`,form:`single`,optional:!1}],"navigation.playSound":[{name:`deviceId`,form:`single`,optional:!1}],"navigation.runAction":[{name:`deviceId`,form:`single`,optional:!1}],"navigation.setLightLevel":[{name:`deviceId`,form:`single`,optional:!1}],"navigation.setLightMode":[{name:`deviceId`,form:`single`,optional:!1}],"navigation.setLightOn":[{name:`deviceId`,form:`single`,optional:!1}],"navigation.stop":[{name:`deviceId`,form:`single`,optional:!1}],"networkLink.getStatus":[{name:`deviceId`,form:`single`,optional:!1}],"networkQuality.getDeviceStats":[{name:`deviceId`,form:`single`,optional:!1}],"networkQuality.reportClientStats":[{name:`deviceId`,form:`single`,optional:!1}],"notificationRules.getAlarmSensors":[{name:`deviceIds`,form:`array`,optional:!1}],"notificationRules.setDeviceMuted":[{name:`deviceId`,form:`single`,optional:!1}],"notifier.cancel":[{name:`deviceId`,form:`single`,optional:!1}],"notifier.getStatus":[{name:`deviceId`,form:`single`,optional:!1}],"notifier.send":[{name:`deviceId`,form:`single`,optional:!1}],"numericSensor.getStatus":[{name:`deviceId`,form:`single`,optional:!1}],"osd.getStatus":[{name:`deviceId`,form:`single`,optional:!1}],"osd.setOverlay":[{name:`deviceId`,form:`single`,optional:!1}],"osdManager.clearSlotBinding":[{name:`deviceId`,form:`single`,optional:!1}],"osdManager.copyDeviceConfiguration":[{name:`sourceDeviceId`,form:`single`,optional:!1},{name:`targetDeviceId`,form:`single`,optional:!1}],"osdManager.getDeviceOsd":[{name:`deviceId`,form:`single`,optional:!1}],"osdManager.getSourceCatalog":[{name:`deviceId`,form:`single`,optional:!1}],"osdManager.previewSlot":[{name:`deviceId`,form:`single`,optional:!1}],"osdManager.renderDevice":[{name:`deviceId`,form:`single`,optional:!1}],"osdManager.setSlotBinding":[{name:`deviceId`,form:`single`,optional:!1}],"petFeeder.callPet":[{name:`deviceId`,form:`single`,optional:!1}],"petFeeder.cancelFeed":[{name:`deviceId`,form:`single`,optional:!1}],"petFeeder.feed":[{name:`deviceId`,form:`single`,optional:!1}],"petFeeder.getStatus":[{name:`deviceId`,form:`single`,optional:!1}],"petFeeder.markFoodReplenished":[{name:`deviceId`,form:`single`,optional:!1}],"petFeeder.playSound":[{name:`deviceId`,form:`single`,optional:!1}],"petFeeder.resetDesiccant":[{name:`deviceId`,form:`single`,optional:!1}],"petFeeder.setChildLock":[{name:`deviceId`,form:`single`,optional:!1}],"petFeeder.setFeedSound":[{name:`deviceId`,form:`single`,optional:!1}],"petFeeder.setIndicatorLight":[{name:`deviceId`,form:`single`,optional:!1}],"petFeeder.setVolume":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineAnalytics.addRetrainFrameFromRecording":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineAnalytics.applyDeviceSettingsPatch":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineAnalytics.clearTrackRelation":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineAnalytics.clearTracks":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineAnalytics.completeRetrainTrack":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineAnalytics.deleteDeviceEvents":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineAnalytics.deleteTracks":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineAnalytics.deselectRetrainFrame":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineAnalytics.getActiveTracks":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineAnalytics.getAudioEvents":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineAnalytics.getDeviceLiveContribution":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineAnalytics.getDeviceSettingsContribution":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineAnalytics.getEventDensity":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineAnalytics.getEventDensityBatch":[{name:`deviceIds`,form:`array`,optional:!1}],"pipelineAnalytics.getEventMedia":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineAnalytics.getEventMediaFootprintByKind":[{name:`deviceId`,form:`single`,optional:!0}],"pipelineAnalytics.getKeyEvents":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineAnalytics.getKeyEventsBatch":[{name:`deviceIds`,form:`array`,optional:!1}],"pipelineAnalytics.getMotionEvents":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineAnalytics.getObjectEvents":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineAnalytics.getRetrainExportUrl":[{name:`deviceIds`,form:`array`,optional:!0}],"pipelineAnalytics.getSensorEvents":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineAnalytics.getTrack":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineAnalytics.getTrackMedia":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineAnalytics.getTrainingExportSummary":[{name:`deviceIds`,form:`array`,optional:!0}],"pipelineAnalytics.getTrainingExportUrl":[{name:`deviceIds`,form:`array`,optional:!0}],"pipelineAnalytics.listArchivedDebugNotes":[{name:`deviceId`,form:`single`,optional:!0}],"pipelineAnalytics.listBirthDecisions":[{name:`deviceId`,form:`single`,optional:!0}],"pipelineAnalytics.listEventKinds":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineAnalytics.listEventKindsBatch":[{name:`deviceIds`,form:`array`,optional:!1}],"pipelineAnalytics.listEventMedia":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineAnalytics.listOpsLog":[{name:`deviceId`,form:`single`,optional:!0}],"pipelineAnalytics.listRecentTracks":[{name:`deviceIds`,form:`array`,optional:!1}],"pipelineAnalytics.listRetrainStaging":[{name:`deviceIds`,form:`array`,optional:!0}],"pipelineAnalytics.listTrackMedia":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineAnalytics.listTrackRelations":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineAnalytics.listTracks":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineAnalytics.ownersWithMedia":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineAnalytics.proposeRetrainAnnotations":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineAnalytics.proposeRetrainAnnotationsWithLlm":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineAnalytics.pruneEventsBefore":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineAnalytics.pruneTracksBefore":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineAnalytics.readLongTermSeries":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineAnalytics.rebuildObjectEmbeddings":[{name:`deviceId`,form:`single`,optional:!0}],"pipelineAnalytics.reclaimDebugMedia":[{name:`deviceIds`,form:`array`,optional:!0}],"pipelineAnalytics.reconcileFromDisk":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineAnalytics.restageRetrainTrack":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineAnalytics.saveRetrainAnnotations":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineAnalytics.searchObjectEvents":[{name:`deviceId`,form:`single`,optional:!0}],"pipelineAnalytics.selectRetrainFrames":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineAnalytics.setRetrainFrameComplete":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineAnalytics.setTrackFlags":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineAnalytics.setTrackPurity":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineAnalytics.setTrackRelation":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineAnalytics.wipeAllAnalytics":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineExecutor.clearModelBoundDeviceOverrides":[{name:`deviceIds`,form:`array`,optional:!0}],"pipelineExecutor.runPipeline":[{name:`deviceId`,form:`single`,optional:!0}],"pipelineExecutor.runPipelineBatch":[{name:`deviceId`,form:`single`,optional:!0}],"pipelineOrchestrator.applyDeviceSettingsPatch":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineOrchestrator.assignAudio":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineOrchestrator.assignPipeline":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineOrchestrator.getAudioAssignment":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineOrchestrator.getCameraMetrics":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineOrchestrator.getCameraSettings":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineOrchestrator.getCameraStatus":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineOrchestrator.getCameraStatuses":[{name:`deviceIds`,form:`array`,optional:!0}],"pipelineOrchestrator.getCameraStepOverrides":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineOrchestrator.getCameraSwitches":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineOrchestrator.getDeviceLiveContribution":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineOrchestrator.getDeviceSettingsContribution":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineOrchestrator.getPipelineAssignment":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineOrchestrator.getPipelineDevicePin":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineOrchestrator.requestOccupancyLook":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineOrchestrator.resolvePipeline":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineOrchestrator.setCameraPipelineForAgent":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineOrchestrator.setCameraSensors":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineOrchestrator.setCameraStepOverride":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineOrchestrator.setCameraStepSettings":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineOrchestrator.setCameraStepToggle":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineOrchestrator.setCameraSwitch":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineOrchestrator.setPipelineDevicePin":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineOrchestrator.unassignAudio":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineOrchestrator.unassignPipeline":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineRunner.attachCamera":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineRunner.detachCamera":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineRunner.getCameraMetrics":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineRunner.getParkedTrackFrame":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineRunner.parkTrackFrame":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineRunner.releaseParkedTrackFrames":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineRunner.reportMotion":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineRunner.requestOccupancyBurst":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineRunner.runDetailSubtree":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineRunner.runStatelessStep":[{name:`sourceDeviceId`,form:`single`,optional:!1}],"plateGallery.getPlateByTrack":[{name:`deviceId`,form:`single`,optional:!1}],"plateGallery.listPlates":[{name:`deviceId`,form:`single`,optional:!0}],"powerMeter.getStatus":[{name:`deviceId`,form:`single`,optional:!1}],"presence.getStatus":[{name:`deviceId`,form:`single`,optional:!1}],"pressureSensor.getStatus":[{name:`deviceId`,form:`single`,optional:!1}],"privacyMask.getOptions":[{name:`deviceId`,form:`single`,optional:!1}],"privacyMask.getStatus":[{name:`deviceId`,form:`single`,optional:!1}],"privacyMask.setAudioEnabled":[{name:`deviceId`,form:`single`,optional:!1}],"privacyMask.setMask":[{name:`deviceId`,form:`single`,optional:!1}],"ptz.captureHomeHere":[{name:`deviceId`,form:`single`,optional:!1}],"ptz.continuousMove":[{name:`deviceId`,form:`single`,optional:!1}],"ptz.deletePreset":[{name:`deviceId`,form:`single`,optional:!1}],"ptz.getHomePreset":[{name:`deviceId`,form:`single`,optional:!1}],"ptz.getHomeReturn":[{name:`deviceId`,form:`single`,optional:!1}],"ptz.getOptions":[{name:`deviceId`,form:`single`,optional:!1}],"ptz.getPosition":[{name:`deviceId`,form:`single`,optional:!1}],"ptz.getPresets":[{name:`deviceId`,form:`single`,optional:!1}],"ptz.getStatus":[{name:`deviceId`,form:`single`,optional:!1}],"ptz.goHome":[{name:`deviceId`,form:`single`,optional:!1}],"ptz.goToPreset":[{name:`deviceId`,form:`single`,optional:!1}],"ptz.move":[{name:`deviceId`,form:`single`,optional:!1}],"ptz.savePreset":[{name:`deviceId`,form:`single`,optional:!1}],"ptz.setAutofocus":[{name:`deviceId`,form:`single`,optional:!1}],"ptz.setHomePreset":[{name:`deviceId`,form:`single`,optional:!1}],"ptz.setHomeReturn":[{name:`deviceId`,form:`single`,optional:!1}],"ptz.stop":[{name:`deviceId`,form:`single`,optional:!1}],"ptzAutotrack.getSettings":[{name:`deviceId`,form:`single`,optional:!1}],"ptzAutotrack.getStatus":[{name:`deviceId`,form:`single`,optional:!1}],"ptzAutotrack.setEnabled":[{name:`deviceId`,form:`single`,optional:!1}],"ptzAutotrack.setSettings":[{name:`deviceId`,form:`single`,optional:!1}],"reboot.reboot":[{name:`deviceId`,form:`single`,optional:!1}],"recording.getAvailability":[{name:`deviceId`,form:`single`,optional:!1}],"recording.getDaysWithRecordings":[{name:`deviceId`,form:`single`,optional:!1}],"recording.getPlayback":[{name:`deviceId`,form:`single`,optional:!1}],"recording.getPlaybackOptions":[{name:`deviceId`,form:`single`,optional:!1}],"recording.listSources":[{name:`deviceId`,form:`single`,optional:!1}],"recordingArchive.applyDeviceSettingsPatch":[{name:`deviceId`,form:`single`,optional:!1}],"recordingArchive.deleteFootprint":[{name:`deviceId`,form:`single`,optional:!1}],"recordingArchive.getAvailabilityBatch":[{name:`deviceIds`,form:`array`,optional:!1}],"recordingArchive.getDaysWithRecordingsBatch":[{name:`deviceIds`,form:`array`,optional:!1}],"recordingArchive.getDeviceConfig":[{name:`deviceId`,form:`single`,optional:!1}],"recordingArchive.getDeviceLiveContribution":[{name:`deviceId`,form:`single`,optional:!1}],"recordingArchive.getDeviceSettingsContribution":[{name:`deviceId`,form:`single`,optional:!1}],"recordingArchive.getStatus":[{name:`deviceId`,form:`single`,optional:!1}],"recordingArchive.listOpsLog":[{name:`deviceId`,form:`single`,optional:!0}],"recordingArchive.locateSegment":[{name:`deviceId`,form:`single`,optional:!1}],"recordingArchive.pruneFootage":[{name:`deviceId`,form:`single`,optional:!1}],"recordingArchive.readGopBytes":[{name:`deviceId`,form:`single`,optional:!1}],"recordingArchive.readSegmentBytes":[{name:`deviceId`,form:`single`,optional:!1}],"recordingArchive.readWindowBytes":[{name:`deviceId`,form:`single`,optional:!1}],"recordingArchive.reconcileLedgerAgainstDisk":[{name:`deviceId`,form:`single`,optional:!0}],"recordingArchive.relocateFootage":[{name:`deviceId`,form:`single`,optional:!0}],"recordingArchive.renderClip":[{name:`deviceId`,form:`single`,optional:!1}],"recordingArchive.renderGif":[{name:`deviceId`,form:`single`,optional:!1}],"recordingArchive.rescanStorage":[{name:`deviceId`,form:`single`,optional:!1}],"recordingArchive.setDeviceConfig":[{name:`deviceId`,form:`single`,optional:!1}],"recordingArchive.setDevicePlacement":[{name:`deviceId`,form:`single`,optional:!1}],"recordingArchive.startStorageMigrationMove":[{name:`deviceId`,form:`single`,optional:!0}],"recordingExport.createExport":[{name:`deviceId`,form:`single`,optional:!1}],"recordingExport.listExports":[{name:`deviceId`,form:`single`,optional:!0}],"recordingOnboard.getOptions":[{name:`deviceId`,form:`single`,optional:!1}],"recordingOnboard.getStatus":[{name:`deviceId`,form:`single`,optional:!1}],"recordingOnboard.setSettings":[{name:`deviceId`,form:`single`,optional:!1}],"recordingSignal.getStatus":[{name:`deviceId`,form:`single`,optional:!1}],"sceneMonitor.captureReference":[{name:`deviceId`,form:`single`,optional:!1}],"sceneMonitor.createScene":[{name:`deviceId`,form:`single`,optional:!1}],"sceneMonitor.deleteReference":[{name:`deviceId`,form:`single`,optional:!1}],"sceneMonitor.deleteScene":[{name:`deviceId`,form:`single`,optional:!1}],"sceneMonitor.getStatus":[{name:`deviceId`,form:`single`,optional:!1}],"sceneMonitor.listScenes":[{name:`deviceId`,form:`single`,optional:!1}],"sceneMonitor.listScenesBatch":[{name:`deviceIds`,form:`array`,optional:!1}],"sceneMonitor.recheckNow":[{name:`deviceId`,form:`single`,optional:!1}],"sceneMonitor.resetScene":[{name:`deviceId`,form:`single`,optional:!1}],"sceneMonitor.updateScene":[{name:`deviceId`,form:`single`,optional:!1}],"scriptRunner.getStatus":[{name:`deviceId`,form:`single`,optional:!1}],"scriptRunner.run":[{name:`deviceId`,form:`single`,optional:!1}],"scriptRunner.stop":[{name:`deviceId`,form:`single`,optional:!1}],"smoke.getStatus":[{name:`deviceId`,form:`single`,optional:!1}],"snapshot.applyDeviceSettingsPatch":[{name:`deviceId`,form:`single`,optional:!1}],"snapshot.getDebugState":[{name:`deviceId`,form:`single`,optional:!1}],"snapshot.getDeviceLiveContribution":[{name:`deviceId`,form:`single`,optional:!1}],"snapshot.getDeviceSettingsContribution":[{name:`deviceId`,form:`single`,optional:!1}],"snapshot.getSnapshot":[{name:`deviceId`,form:`single`,optional:!1}],"snapshot.getSnapshotLinks":[{name:`targets`,form:`object-array`,optional:!1,itemField:`deviceId`}],"snapshot.getSnapshotOverview":[{name:`deviceIds`,form:`array`,optional:!1}],"snapshot.getStatus":[{name:`deviceId`,form:`single`,optional:!1}],"snapshot.invalidateCache":[{name:`deviceId`,form:`single`,optional:!1}],"streamBroker.acquireEgressTranscode":[{name:`deviceId`,form:`single`,optional:!1}],"streamBroker.applyDeviceSettingsPatch":[{name:`deviceId`,form:`single`,optional:!1}],"streamBroker.assignProfile":[{name:`deviceId`,form:`single`,optional:!1}],"streamBroker.forgetDeviceHardware":[{name:`deviceId`,form:`single`,optional:!1}],"streamBroker.getDeviceAudioMute":[{name:`deviceId`,form:`single`,optional:!1}],"streamBroker.getDeviceLiveContribution":[{name:`deviceId`,form:`single`,optional:!1}],"streamBroker.getDeviceSettingsContribution":[{name:`deviceId`,form:`single`,optional:!1}],"streamBroker.getStreamWithCodec":[{name:`deviceId`,form:`single`,optional:!1}],"streamBroker.produceEventMedia":[{name:`deviceId`,form:`single`,optional:!1}],"streamBroker.publishCameraStream":[{name:`deviceId`,form:`single`,optional:!1}],"streamBroker.renderPreBufferClip":[{name:`deviceId`,form:`single`,optional:!1}],"streamBroker.reportStreamSignal":[{name:`deviceId`,form:`single`,optional:!1}],"streamBroker.restartProfile":[{name:`deviceId`,form:`single`,optional:!1}],"streamBroker.retractCameraStream":[{name:`deviceId`,form:`single`,optional:!1}],"streamBroker.setDeviceAudioMute":[{name:`deviceId`,form:`single`,optional:!1}],"streamBroker.unassignProfile":[{name:`deviceId`,form:`single`,optional:!1}],"streamCatalog.getCatalog":[{name:`deviceId`,form:`single`,optional:!1}],"streamParams.getConfigSchema":[{name:`deviceId`,form:`single`,optional:!1}],"streamParams.getOptions":[{name:`deviceId`,form:`single`,optional:!1}],"streamParams.getStatus":[{name:`deviceId`,form:`single`,optional:!1}],"streamParams.setProfile":[{name:`deviceId`,form:`single`,optional:!1}],"switch.getStatus":[{name:`deviceId`,form:`single`,optional:!1}],"switch.setState":[{name:`deviceId`,form:`single`,optional:!1}],"tamper.getStatus":[{name:`deviceId`,form:`single`,optional:!1}],"temperatureSensor.getStatus":[{name:`deviceId`,form:`single`,optional:!1}],"update.getStatus":[{name:`deviceId`,form:`single`,optional:!1}],"vacuumControl.getStatus":[{name:`deviceId`,form:`single`,optional:!1}],"vacuumControl.locate":[{name:`deviceId`,form:`single`,optional:!1}],"vacuumControl.pause":[{name:`deviceId`,form:`single`,optional:!1}],"vacuumControl.returnToBase":[{name:`deviceId`,form:`single`,optional:!1}],"vacuumControl.setFanSpeed":[{name:`deviceId`,form:`single`,optional:!1}],"vacuumControl.start":[{name:`deviceId`,form:`single`,optional:!1}],"vacuumControl.stop":[{name:`deviceId`,form:`single`,optional:!1}],"valve.close":[{name:`deviceId`,form:`single`,optional:!1}],"valve.getStatus":[{name:`deviceId`,form:`single`,optional:!1}],"valve.open":[{name:`deviceId`,form:`single`,optional:!1}],"valve.setPosition":[{name:`deviceId`,form:`single`,optional:!1}],"valve.stop":[{name:`deviceId`,form:`single`,optional:!1}],"vibration.getStatus":[{name:`deviceId`,form:`single`,optional:!1}],"videoclips.dialClipStream":[{name:`deviceId`,form:`single`,optional:!1}],"videoclips.getClipPlayback":[{name:`deviceId`,form:`single`,optional:!1}],"videoclips.getPlaybackOptions":[{name:`deviceId`,form:`single`,optional:!1}],"videoclips.listClips":[{name:`deviceId`,form:`single`,optional:!1}],"videoclips.listSources":[{name:`deviceId`,form:`single`,optional:!1}],"videoclips.offerClipBytes":[{name:`deviceId`,form:`single`,optional:!1}],"videoclips.readClipBytes":[{name:`deviceId`,form:`single`,optional:!1}],"waterHeater.getStatus":[{name:`deviceId`,form:`single`,optional:!1}],"waterHeater.setAway":[{name:`deviceId`,form:`single`,optional:!1}],"waterHeater.setOperationMode":[{name:`deviceId`,form:`single`,optional:!1}],"waterHeater.setTargetTemp":[{name:`deviceId`,form:`single`,optional:!1}],"weather.getStatus":[{name:`deviceId`,form:`single`,optional:!1}],"webrtcSession.addIceCandidate":[{name:`deviceId`,form:`single`,optional:!1}],"webrtcSession.applyDownlinkProbe":[{name:`deviceId`,form:`single`,optional:!1}],"webrtcSession.closeSession":[{name:`deviceId`,form:`single`,optional:!1}],"webrtcSession.createSession":[{name:`deviceId`,form:`single`,optional:!1}],"webrtcSession.getIceCandidates":[{name:`deviceId`,form:`single`,optional:!1}],"webrtcSession.getSessionDebug":[{name:`deviceId`,form:`single`,optional:!1}],"webrtcSession.getSessionState":[{name:`deviceId`,form:`single`,optional:!1}],"webrtcSession.handleAnswer":[{name:`deviceId`,form:`single`,optional:!1}],"webrtcSession.handleOffer":[{name:`deviceId`,form:`single`,optional:!1}],"webrtcSession.hasAdaptiveBitrate":[{name:`deviceId`,form:`single`,optional:!1}],"webrtcSession.listStreams":[{name:`deviceId`,form:`single`,optional:!1}],"zoneAnalytics.getCameraHistory":[{name:`deviceId`,form:`single`,optional:!1}],"zoneAnalytics.getCurrentSnapshot":[{name:`deviceId`,form:`single`,optional:!1}],"zoneAnalytics.getCurrentSnapshotBatch":[{name:`deviceIds`,form:`array`,optional:!1}],"zoneAnalytics.getUnzonedHistory":[{name:`deviceId`,form:`single`,optional:!1}],"zoneAnalytics.getZoneHistory":[{name:`deviceId`,form:`single`,optional:!1}],"zoneRules.listRules":[{name:`deviceId`,form:`single`,optional:!1}],"zoneRules.setRules":[{name:`deviceId`,form:`single`,optional:!1}],"zones.addZone":[{name:`deviceId`,form:`single`,optional:!1}],"zones.listZones":[{name:`deviceId`,form:`single`,optional:!1}],"zones.removeZone":[{name:`deviceId`,form:`single`,optional:!1}],"zones.updateZone":[{name:`deviceId`,form:`single`,optional:!1}]}),QJ=`addonSettings.getDeviceSettings,addonSettings.updateDeviceSettings,audioAnalyzer.attachDevice,audioAnalyzer.classify,audioAnalyzer.detachDevice,deviceAdoption.getStatus,deviceAdoption.release,deviceAdoption.resync,deviceExport.applyDeviceSettingsPatch,deviceExport.getDeviceLiveContribution,deviceExport.getDeviceSettingsContribution,deviceManager.adoptionRelease,deviceManager.adoptionResync,deviceManager.applyInitialMeta,deviceManager.disable,deviceManager.enable,deviceManager.getBindings,deviceManager.getBindingsBatch,deviceManager.getChildren,deviceManager.getChildrenBatch,deviceManager.getConfigSchema,deviceManager.getDevice,deviceManager.getDeviceAggregate,deviceManager.getDeviceLiveInfoAggregate,deviceManager.getDeviceSettingsAggregate,deviceManager.getDeviceStatusAggregate,deviceManager.getDeviceStatusAggregateBatch,deviceManager.getLinkedDevices,deviceManager.getLinkedDevicesBatch,deviceManager.getSettingsSchema,deviceManager.getStreamProfileMap,deviceManager.getStreamSources,deviceManager.getWireableFields,deviceManager.getWrapperActivation,deviceManager.listAll,deviceManager.loadConfig,deviceManager.loadMeta,deviceManager.loadRuntimeState,deviceManager.persistConfig,deviceManager.probeStreams,deviceManager.registerDevice,deviceManager.remove,deviceManager.removeDevice,deviceManager.runDeviceAction,deviceManager.setChildLayout,deviceManager.setDisabled,deviceManager.setDisplay,deviceManager.setIntegrationId,deviceManager.setLinkDeviceId,deviceManager.setLocation,deviceManager.setMetadata,deviceManager.setName,deviceManager.setPrimaryChildEntityId,deviceManager.setRole,deviceManager.setStreamProfileMap,deviceManager.setType,deviceManager.setWrapperActive,deviceManager.testField,deviceManager.updateConfig,deviceManager.updateDeviceField,deviceManager.updateDeviceFieldsBatch,deviceState.claimFields,deviceState.getCapSlice,deviceState.getNativeCapSlice,deviceState.getSnapshot,deviceState.patchOwnedFields,deviceState.releaseClaim,deviceState.setCapSlice,faceGallery.getFaceByTrack,faceGallery.listRecentFaces,networkQuality.getDeviceStats,networkQuality.reportClientStats,notificationRules.getAlarmSensors,notificationRules.setDeviceMuted,osdManager.clearSlotBinding,osdManager.copyDeviceConfiguration,osdManager.getDeviceOsd,osdManager.getSourceCatalog,osdManager.previewSlot,osdManager.renderDevice,osdManager.setSlotBinding,pipelineExecutor.clearModelBoundDeviceOverrides,pipelineExecutor.runPipeline,pipelineExecutor.runPipelineBatch,pipelineOrchestrator.applyDeviceSettingsPatch,pipelineOrchestrator.assignAudio,pipelineOrchestrator.assignPipeline,pipelineOrchestrator.getAudioAssignment,pipelineOrchestrator.getCameraMetrics,pipelineOrchestrator.getCameraSettings,pipelineOrchestrator.getCameraStatus,pipelineOrchestrator.getCameraStatuses,pipelineOrchestrator.getCameraStepOverrides,pipelineOrchestrator.getCameraSwitches,pipelineOrchestrator.getDeviceLiveContribution,pipelineOrchestrator.getDeviceSettingsContribution,pipelineOrchestrator.getPipelineAssignment,pipelineOrchestrator.getPipelineDevicePin,pipelineOrchestrator.requestOccupancyLook,pipelineOrchestrator.resolvePipeline,pipelineOrchestrator.setCameraPipelineForAgent,pipelineOrchestrator.setCameraSensors,pipelineOrchestrator.setCameraStepOverride,pipelineOrchestrator.setCameraStepSettings,pipelineOrchestrator.setCameraStepToggle,pipelineOrchestrator.setCameraSwitch,pipelineOrchestrator.setPipelineDevicePin,pipelineOrchestrator.unassignAudio,pipelineOrchestrator.unassignPipeline,pipelineRunner.attachCamera,pipelineRunner.detachCamera,pipelineRunner.getCameraMetrics,pipelineRunner.getParkedTrackFrame,pipelineRunner.parkTrackFrame,pipelineRunner.releaseParkedTrackFrames,pipelineRunner.reportMotion,pipelineRunner.requestOccupancyBurst,pipelineRunner.runDetailSubtree,pipelineRunner.runStatelessStep,plateGallery.getPlateByTrack,plateGallery.listPlates,recordingArchive.applyDeviceSettingsPatch,recordingArchive.deleteFootprint,recordingArchive.getAvailabilityBatch,recordingArchive.getDaysWithRecordingsBatch,recordingArchive.getDeviceConfig,recordingArchive.getDeviceLiveContribution,recordingArchive.getDeviceSettingsContribution,recordingArchive.getStatus,recordingArchive.listOpsLog,recordingArchive.locateSegment,recordingArchive.pruneFootage,recordingArchive.readGopBytes,recordingArchive.readSegmentBytes,recordingArchive.readWindowBytes,recordingArchive.reconcileLedgerAgainstDisk,recordingArchive.relocateFootage,recordingArchive.renderClip,recordingArchive.renderGif,recordingArchive.rescanStorage,recordingArchive.setDeviceConfig,recordingArchive.setDevicePlacement,recordingArchive.startStorageMigrationMove,recordingExport.createExport,recordingExport.listExports,streamBroker.acquireEgressTranscode,streamBroker.applyDeviceSettingsPatch,streamBroker.assignProfile,streamBroker.forgetDeviceHardware,streamBroker.getDeviceAudioMute,streamBroker.getDeviceLiveContribution,streamBroker.getDeviceSettingsContribution,streamBroker.getStreamWithCodec,streamBroker.produceEventMedia,streamBroker.publishCameraStream,streamBroker.renderPreBufferClip,streamBroker.reportStreamSignal,streamBroker.restartProfile,streamBroker.retractCameraStream,streamBroker.setDeviceAudioMute,streamBroker.unassignProfile`.split(`,`),$J=Object.freeze({broker:`broker`,"device-export":`device-export`,llm:`ai`,"mesh-network":`mesh`,"mqtt-broker":`broker`,"network-access":`ingress`,"smtp-provider":`email`}),eY=[`broker`,`device-export`,`llm`,`mesh-network`,`mqtt-broker`,`network-access`,`smtp-provider`];function tY(e){let t=[];for(let[n,r]of Object.entries($J))r===e&&t.push(n);return t}var nY={"air-quality-sensor":{durability:`restored`,volatileFields:[`lastFetchedAt`]},"alarm-panel":{durability:`restored`,volatileFields:[`lastChangedAt`]},"ambient-light-sensor":{durability:`restored`,volatileFields:[`lastFetchedAt`]},"audio-metrics":{durability:`session`,volatileFields:[]},"automation-control":{durability:`session`,volatileFields:[]},battery:{durability:`restored`,volatileFields:[`lastUpdated`]},binary:{durability:`restored`,volatileFields:[`lastChangedAt`]},brightness:{durability:`session`,volatileFields:[]},"camera-streams":{durability:`session`,volatileFields:[]},"carbon-monoxide":{durability:`restored`,volatileFields:[`lastChangedAt`]},"climate-control":{durability:`session`,volatileFields:[]},color:{durability:`session`,volatileFields:[]},connectivity:{durability:`restored`,volatileFields:[`lastChangedAt`]},consumables:{durability:`restored`,volatileFields:[`lastChangedAt`,`lastFetchedAt`]},contact:{durability:`restored`,volatileFields:[`lastChangedAt`]},control:{durability:`session`,volatileFields:[]},cover:{durability:`restored`,volatileFields:[`lastChangedAt`]},"day-night":{durability:`restored`,volatileFields:[`lastFetchedAt`]},"device-discovery":{durability:`session`,volatileFields:[]},"device-status":{durability:`restored`,volatileFields:[`lastChangedAt`]},doorbell:{durability:`restored`,volatileFields:[]},"enum-sensor":{durability:`restored`,volatileFields:[`lastFetchedAt`]},"event-emitter":{durability:`session`,volatileFields:[]},"fan-control":{durability:`session`,volatileFields:[]},"feature-probe":{durability:`session`,volatileFields:[]},flood:{durability:`restored`,volatileFields:[`lastChangedAt`]},gas:{durability:`restored`,volatileFields:[`lastChangedAt`]},humidifier:{durability:`session`,volatileFields:[]},"humidity-sensor":{durability:`restored`,volatileFields:[`lastFetchedAt`]},image:{durability:`session`,volatileFields:[]},"image-settings":{durability:`restored`,volatileFields:[`lastFetchedAt`]},intercom:{durability:`session`,volatileFields:[]},"lawn-mower-control":{durability:`session`,volatileFields:[]},"lock-control":{durability:`restored`,volatileFields:[`lastChangedAt`]},"media-player":{durability:`session`,volatileFields:[]},motion:{durability:`session`,volatileFields:[]},"motion-trigger":{durability:`session`,volatileFields:[]},"motion-zones":{durability:`restored`,volatileFields:[`lastFetchedAt`]},"native-object-detection":{durability:`restored`,volatileFields:[`lastFetchedAt`]},navigation:{durability:`session`,volatileFields:[]},"network-link":{durability:`restored`,volatileFields:[`lastUpdated`]},notifier:{durability:`session`,volatileFields:[]},"numeric-sensor":{durability:`restored`,volatileFields:[`lastFetchedAt`]},"pet-feeder":{durability:`session`,volatileFields:[]},"power-meter":{durability:`restored`,volatileFields:[`lastFetchedAt`]},presence:{durability:`restored`,volatileFields:[`lastChangedAt`]},"pressure-sensor":{durability:`restored`,volatileFields:[`lastFetchedAt`]},"privacy-mask":{durability:`restored`,volatileFields:[`lastFetchedAt`]},"ptz-autotrack":{durability:`session`,volatileFields:[]},"recording-onboard":{durability:`restored`,volatileFields:[`lastFetchedAt`]},"recording-signal":{durability:`session`,volatileFields:[]},"scene-monitor":{durability:`session`,volatileFields:[]},"script-runner":{durability:`session`,volatileFields:[]},smoke:{durability:`restored`,volatileFields:[`lastChangedAt`]},"stream-catalog":{durability:`restored`,volatileFields:[`lastFetchedAt`]},"stream-params":{durability:`restored`,volatileFields:[`lastFetchedAt`]},"stream-signals":{durability:`session`,volatileFields:[]},switch:{durability:`restored`,volatileFields:[`lastChangedAt`]},tamper:{durability:`restored`,volatileFields:[`lastChangedAt`]},"temperature-sensor":{durability:`restored`,volatileFields:[`lastFetchedAt`]},update:{durability:`session`,volatileFields:[]},"vacuum-control":{durability:`session`,volatileFields:[]},valve:{durability:`session`,volatileFields:[]},vibration:{durability:`restored`,volatileFields:[`lastChangedAt`]},"water-heater":{durability:`session`,volatileFields:[]},weather:{durability:`session`,volatileFields:[]},"zone-analytics":{durability:`session`,volatileFields:[]},"zone-rules":{durability:`restored`,volatileFields:[]},zones:{durability:`restored`,volatileFields:[]}};function rY(e){return nY[e]??iY}var iY={durability:`session`,volatileFields:[]};function aY(e){return rY(e).durability===`restored`}var oY=`air-quality-sensor.alarm-panel.ambient-light-sensor.battery.binary.carbon-monoxide.connectivity.consumables.contact.cover.day-night.device-status.doorbell.enum-sensor.flood.gas.humidity-sensor.image-settings.lock-control.motion-zones.native-object-detection.network-link.numeric-sensor.power-meter.presence.pressure-sensor.privacy-mask.recording-onboard.smoke.stream-catalog.stream-params.switch.tamper.temperature-sensor.vibration.zone-rules.zones`.split(`.`),sY=[{id:`camera-viewer`,label:`Camera viewer`,description:"Read-only over every device — live streams, recordings, motion events, battery state. Pair with a `device` grant (an `ids` / `types` / `locations` selector) to restrict to specific cameras.",rows:[{type:`category`,target:`device`,access:[`view`]}]},{id:`camera-operator`,label:`Camera operator`,description:"Everything `camera-viewer` does plus live control of every granted camera — PTZ movement, intercom talk-back and on-demand snapshots. Cannot delete devices, and grants nothing on system-scope caps (recording control, users, addons).",rows:[{type:`category`,target:`device`,access:[`view`,`create`]}]},{id:`full-management`,label:`Full management`,description:`Complete device + system control short of admin: view/create/delete on every device and every system capability. Use for a trusted operator who manages the whole deployment but should not hold the admin bypass.`,rows:[{type:`category`,target:`device`,access:[`view`,`create`,`delete`]},{type:`category`,target:`system`,access:[`view`,`create`,`delete`]}]},{id:`cli-deployer`,label:`CLI deployer`,description:"Push addons to the hub and tail their logs. Used by the `camstack` CLI on dev machines. No delete access — a stolen token cannot uninstall.",rows:[{type:`capability`,target:`addons`,access:[`view`,`create`]}]},{id:`event-listener`,label:`Event listener`,description:`Subscribe to motion / audio events. Used by webhook bridges and Home Assistant integrations.`,rows:[{type:`capability`,target:`motion-detection`,access:[`view`]},{type:`capability`,target:`audio-analysis`,access:[`view`]}]}];function cY(e){let t=e;function n(e,n,r,i,a){let o=t[e]?.[n];if(!o)throw Error(`SystemProxy: api has no '${e}.${n}'`);let s=o;return r===`mutation`?s.mutate(i):r===`subscription`?s.subscribe(i,a):s.query(i)}return{addonPages:{listPages:e=>n(`addonPages`,`listPages`,`query`,e)},addons:{list:e=>n(`addons`,`list`,`query`,e),getLogs:e=>n(`addons`,`getLogs`,`query`,e),listPackages:e=>n(`addons`,`listPackages`,`query`,e),installPackage:e=>n(`addons`,`installPackage`,`mutation`,e),installFromWorkspace:e=>n(`addons`,`installFromWorkspace`,`mutation`,e),isWorkspaceAvailable:e=>n(`addons`,`isWorkspaceAvailable`,`query`,e),listWorkspacePackages:e=>n(`addons`,`listWorkspacePackages`,`query`,e),uninstallPackage:e=>n(`addons`,`uninstallPackage`,`mutation`,e),listInstallations:e=>n(`addons`,`listInstallations`,`query`,e),reloadPackages:e=>n(`addons`,`reloadPackages`,`mutation`,e),searchAvailable:e=>n(`addons`,`searchAvailable`,`query`,e),listUpdates:e=>n(`addons`,`listUpdates`,`query`,e),updatePackage:e=>n(`addons`,`updatePackage`,`mutation`,e),rollbackPackage:e=>n(`addons`,`rollbackPackage`,`mutation`,e),forceRefresh:e=>n(`addons`,`forceRefresh`,`mutation`,e),restartServer:e=>n(`addons`,`restartServer`,`mutation`,e),getLastRestart:e=>n(`addons`,`getLastRestart`,`query`,e),listFrameworkPackages:e=>n(`addons`,`listFrameworkPackages`,`query`,e),listCapabilityProviders:e=>n(`addons`,`listCapabilityProviders`,`query`,e),setCapabilityProviderEnabled:e=>n(`addons`,`setCapabilityProviderEnabled`,`mutation`,e),getVersions:e=>n(`addons`,`getVersions`,`query`,e),restartAddon:e=>n(`addons`,`restartAddon`,`mutation`,e),retryLoad:e=>n(`addons`,`retryLoad`,`mutation`,e),getAutoUpdateSettings:e=>n(`addons`,`getAutoUpdateSettings`,`query`,e),setAutoUpdateSettings:e=>n(`addons`,`setAutoUpdateSettings`,`mutation`,e),getAddonAutoUpdate:e=>n(`addons`,`getAddonAutoUpdate`,`query`,e),setAddonAutoUpdate:e=>n(`addons`,`setAddonAutoUpdate`,`mutation`,e),applyAutoUpdateToAll:e=>n(`addons`,`applyAutoUpdateToAll`,`mutation`,e),custom:e=>n(`addons`,`custom`,`mutation`,e),startJob:e=>n(`addons`,`startJob`,`mutation`,e),getJob:e=>n(`addons`,`getJob`,`query`,e),listJobs:e=>n(`addons`,`listJobs`,`query`,e),cancelJob:e=>n(`addons`,`cancelJob`,`mutation`,e),onAddonLogs:(e,t)=>n(`addons`,`onAddonLogs`,`subscription`,e,t)},addonSettings:{getGlobalSettings:e=>n(`addonSettings`,`getGlobalSettings`,`query`,e),updateGlobalSettings:e=>n(`addonSettings`,`updateGlobalSettings`,`mutation`,e),getIntegrationSettings:e=>n(`addonSettings`,`getIntegrationSettings`,`query`,e)},addonWidgets:{listWidgets:e=>n(`addonWidgets`,`listWidgets`,`query`,e)},alerts:{emit:e=>n(`alerts`,`emit`,`mutation`,e),update:e=>n(`alerts`,`update`,`mutation`,e),list:e=>n(`alerts`,`list`,`query`,e),getUnreadCount:e=>n(`alerts`,`getUnreadCount`,`query`,e),markRead:e=>n(`alerts`,`markRead`,`mutation`,e),markAllRead:e=>n(`alerts`,`markAllRead`,`mutation`,e),dismiss:e=>n(`alerts`,`dismiss`,`mutation`,e)},audioAnalyzer:{analyseChunk:e=>n(`audioAnalyzer`,`analyseChunk`,`mutation`,e),classify:e=>n(`audioAnalyzer`,`classify`,`query`,e),attachDevice:e=>n(`audioAnalyzer`,`attachDevice`,`mutation`,e),isReady:e=>n(`audioAnalyzer`,`isReady`,`query`,e),dispose:e=>n(`audioAnalyzer`,`dispose`,`mutation`,e),reprobeAudioEngine:e=>n(`audioAnalyzer`,`reprobeAudioEngine`,`mutation`,e)},audioCodec:{listSupportedCodecs:e=>n(`audioCodec`,`listSupportedCodecs`,`query`,e),canHandle:e=>n(`audioCodec`,`canHandle`,`query`,e),createDecodeSession:e=>n(`audioCodec`,`createDecodeSession`,`mutation`,e),createEncodeSession:e=>n(`audioCodec`,`createEncodeSession`,`mutation`,e),closeSession:e=>n(`audioCodec`,`closeSession`,`mutation`,e),pushEncodedFrame:e=>n(`audioCodec`,`pushEncodedFrame`,`mutation`,e),pullPcm:e=>n(`audioCodec`,`pullPcm`,`query`,e),pushPcm:e=>n(`audioCodec`,`pushPcm`,`mutation`,e),pullEncoded:e=>n(`audioCodec`,`pullEncoded`,`query`,e),flushEncode:e=>n(`audioCodec`,`flushEncode`,`mutation`,e),listActiveSessions:e=>n(`audioCodec`,`listActiveSessions`,`query`,e)},backup:{listDestinations:e=>n(`backup`,`listDestinations`,`query`,e),trigger:e=>n(`backup`,`trigger`,`mutation`,e),listRuns:e=>n(`backup`,`listRuns`,`query`,e),cancel:e=>n(`backup`,`cancel`,`mutation`,e),list:e=>n(`backup`,`list`,`query`,e),listLocations:e=>n(`backup`,`listLocations`,`query`,e),getEntries:e=>n(`backup`,`getEntries`,`query`,e),restore:e=>n(`backup`,`restore`,`mutation`,e),delete:e=>n(`backup`,`delete`,`mutation`,e),listArchives:e=>n(`backup`,`listArchives`,`query`,e),upsertDestinationPolicy:e=>n(`backup`,`upsertDestinationPolicy`,`mutation`,e),previewSchedule:e=>n(`backup`,`previewSchedule`,`query`,e),listSchedules:e=>n(`backup`,`listSchedules`,`query`,e),upsertSchedule:e=>n(`backup`,`upsertSchedule`,`mutation`,e),deleteSchedule:e=>n(`backup`,`deleteSchedule`,`mutation`,e)},broker:{list:e=>n(`broker`,`list`,`query`,e),get:e=>n(`broker`,`get`,`query`,e),listProviders:e=>n(`broker`,`listProviders`,`query`,e),add:e=>n(`broker`,`add`,`mutation`,e),remove:e=>n(`broker`,`remove`,`mutation`,e),testConnection:e=>n(`broker`,`testConnection`,`mutation`,e),getSettings:e=>n(`broker`,`getSettings`,`query`,e),setSettings:e=>n(`broker`,`setSettings`,`mutation`,e),getBrokerConfig:e=>n(`broker`,`getBrokerConfig`,`query`,e),getSettingsSchema:e=>n(`broker`,`getSettingsSchema`,`query`,e),testSettings:e=>n(`broker`,`testSettings`,`mutation`,e),publish:e=>n(`broker`,`publish`,`mutation`,e),subscribe:e=>n(`broker`,`subscribe`,`mutation`,e),unsubscribe:e=>n(`broker`,`unsubscribe`,`mutation`,e),getState:e=>n(`broker`,`getState`,`query`,e),getStatus:e=>n(`broker`,`getStatus`,`query`,e)},calendars:{listCalendars:e=>n(`calendars`,`listCalendars`,`query`,e),listEvents:e=>n(`calendars`,`listEvents`,`query`,e),getPreferences:e=>n(`calendars`,`getPreferences`,`query`,e),setCalendarPreference:e=>n(`calendars`,`setCalendarPreference`,`mutation`,e)},connectionTest:{testSettings:e=>n(`connectionTest`,`testSettings`,`mutation`,e),describeTest:e=>n(`connectionTest`,`describeTest`,`query`,e)},coreBlocks:{list:e=>n(`coreBlocks`,`list`,`query`,e),get:e=>n(`coreBlocks`,`get`,`query`,e),create:e=>n(`coreBlocks`,`create`,`mutation`,e),update:e=>n(`coreBlocks`,`update`,`mutation`,e),delete:e=>n(`coreBlocks`,`delete`,`mutation`,e),setEnabled:e=>n(`coreBlocks`,`setEnabled`,`mutation`,e),restart:e=>n(`coreBlocks`,`restart`,`mutation`,e),compile:e=>n(`coreBlocks`,`compile`,`mutation`,e),getBlockSettings:e=>n(`coreBlocks`,`getBlockSettings`,`query`,e),updateBlockSettings:e=>n(`coreBlocks`,`updateBlockSettings`,`mutation`,e),getTypeDefs:e=>n(`coreBlocks`,`getTypeDefs`,`query`,e),createComposition:e=>n(`coreBlocks`,`createComposition`,`mutation`,e),updateComposition:e=>n(`coreBlocks`,`updateComposition`,`mutation`,e),getComposition:e=>n(`coreBlocks`,`getComposition`,`query`,e),listCompositions:e=>n(`coreBlocks`,`listCompositions`,`query`,e),getCustomization:e=>n(`coreBlocks`,`getCustomization`,`query`,e),listComposableCaps:e=>n(`coreBlocks`,`listComposableCaps`,`query`,e),validateComposition:e=>n(`coreBlocks`,`validateComposition`,`mutation`,e)},decoder:{getInfo:e=>n(`decoder`,`getInfo`,`query`,e),reprobeHwaccel:e=>n(`decoder`,`reprobeHwaccel`,`mutation`,e)},deviceAdoption:{listCandidateFilters:e=>n(`deviceAdoption`,`listCandidateFilters`,`query`,e),listCandidates:e=>n(`deviceAdoption`,`listCandidates`,`query`,e),getCandidate:e=>n(`deviceAdoption`,`getCandidate`,`query`,e),refresh:e=>n(`deviceAdoption`,`refresh`,`mutation`,e),adopt:e=>n(`deviceAdoption`,`adopt`,`mutation`,e),release:e=>n(`deviceAdoption`,`release`,`mutation`,e),resync:e=>n(`deviceAdoption`,`resync`,`mutation`,e)},deviceExport:{getStatus:e=>n(`deviceExport`,`getStatus`,`query`,e),listSupportedDeviceKinds:e=>n(`deviceExport`,`listSupportedDeviceKinds`,`query`,e),listExposedDevices:e=>n(`deviceExport`,`listExposedDevices`,`query`,e),exposeDevice:e=>n(`deviceExport`,`exposeDevice`,`mutation`,e),unexposeDevice:e=>n(`deviceExport`,`unexposeDevice`,`mutation`,e)},deviceManager:{allocateDeviceId:e=>n(`deviceManager`,`allocateDeviceId`,`mutation`,e),migrateDevice:e=>n(`deviceManager`,`migrateDevice`,`mutation`,e),registerDevice:e=>n(`deviceManager`,`registerDevice`,`mutation`,e),removeDevice:e=>n(`deviceManager`,`removeDevice`,`mutation`,e),persistConfig:e=>n(`deviceManager`,`persistConfig`,`mutation`,e),getRoleDisplayDefaults:e=>n(`deviceManager`,`getRoleDisplayDefaults`,`query`,e),setRoleDisplayDefaults:e=>n(`deviceManager`,`setRoleDisplayDefaults`,`mutation`,e),listLocations:e=>n(`deviceManager`,`listLocations`,`query`,e),addLocation:e=>n(`deviceManager`,`addLocation`,`mutation`,e),removeLocation:e=>n(`deviceManager`,`removeLocation`,`mutation`,e),renameLocation:e=>n(`deviceManager`,`renameLocation`,`mutation`,e),listLocationIcons:e=>n(`deviceManager`,`listLocationIcons`,`query`,e),setLocationIcon:e=>n(`deviceManager`,`setLocationIcon`,`mutation`,e),listLocationDescriptions:e=>n(`deviceManager`,`listLocationDescriptions`,`query`,e),setLocationDescription:e=>n(`deviceManager`,`setLocationDescription`,`mutation`,e),listSiteZones:e=>n(`deviceManager`,`listSiteZones`,`query`,e),setSiteZone:e=>n(`deviceManager`,`setSiteZone`,`mutation`,e),removeSiteZone:e=>n(`deviceManager`,`removeSiteZone`,`mutation`,e),renameSiteZone:e=>n(`deviceManager`,`renameSiteZone`,`mutation`,e),setLocationZone:e=>n(`deviceManager`,`setLocationZone`,`mutation`,e),listPersistedByAddon:e=>n(`deviceManager`,`listPersistedByAddon`,`query`,e),listAll:e=>n(`deviceManager`,`listAll`,`query`,e),getChildren:e=>n(`deviceManager`,`getChildren`,`query`,e),getChildrenBatch:e=>n(`deviceManager`,`getChildrenBatch`,`query`,e),getLinkedDevicesBatch:e=>n(`deviceManager`,`getLinkedDevicesBatch`,`query`,e),removeByIntegration:e=>n(`deviceManager`,`removeByIntegration`,`mutation`,e),getBindingsBatch:e=>n(`deviceManager`,`getBindingsBatch`,`query`,e),getAllBindings:e=>n(`deviceManager`,`getAllBindings`,`query`,e),listDeviceIdsByCaps:e=>n(`deviceManager`,`listDeviceIdsByCaps`,`query`,e),listWrappersForCap:e=>n(`deviceManager`,`listWrappersForCap`,`query`,e),listBindableCapsForDeviceType:e=>n(`deviceManager`,`listBindableCapsForDeviceType`,`query`,e),discoverDevices:e=>n(`deviceManager`,`discoverDevices`,`mutation`,e),adoptDevice:e=>n(`deviceManager`,`adoptDevice`,`mutation`,e),getCreationSchema:e=>n(`deviceManager`,`getCreationSchema`,`query`,e),createDevice:e=>n(`deviceManager`,`createDevice`,`mutation`,e),testCreationField:e=>n(`deviceManager`,`testCreationField`,`mutation`,e),adoptionListCandidateFilters:e=>n(`deviceManager`,`adoptionListCandidateFilters`,`query`,e),adoptionListCandidates:e=>n(`deviceManager`,`adoptionListCandidates`,`query`,e),adoptionRefresh:e=>n(`deviceManager`,`adoptionRefresh`,`mutation`,e),adoptionAdopt:e=>n(`deviceManager`,`adoptionAdopt`,`mutation`,e),adoptionRelease:e=>n(`deviceManager`,`adoptionRelease`,`mutation`,e),adoptionStartJob:e=>n(`deviceManager`,`adoptionStartJob`,`mutation`,e),adoptionListJobs:e=>n(`deviceManager`,`adoptionListJobs`,`query`,e),adoptionCancelJob:e=>n(`deviceManager`,`adoptionCancelJob`,`mutation`,e),adoptionResync:e=>n(`deviceManager`,`adoptionResync`,`mutation`,e),discoveryProviders:e=>n(`deviceManager`,`discoveryProviders`,`query`,e),discoverAllProviders:e=>n(`deviceManager`,`discoverAllProviders`,`mutation`,e),discoverProvider:e=>n(`deviceManager`,`discoverProvider`,`mutation`,e),providerCreationType:e=>n(`deviceManager`,`providerCreationType`,`query`,e),providerDiscoveryParamsSchema:e=>n(`deviceManager`,`providerDiscoveryParamsSchema`,`query`,e),getDeviceStatusAggregateBatch:e=>n(`deviceManager`,`getDeviceStatusAggregateBatch`,`query`,e)},deviceProvider:{start:e=>n(`deviceProvider`,`start`,`mutation`,e),stop:e=>n(`deviceProvider`,`stop`,`mutation`,e),getStatus:e=>n(`deviceProvider`,`getStatus`,`query`,e),getDevices:e=>n(`deviceProvider`,`getDevices`,`query`,e),reloadDevice:e=>n(`deviceProvider`,`reloadDevice`,`mutation`,e),supportsDiscovery:e=>n(`deviceProvider`,`supportsDiscovery`,`query`,e),discoverDevices:e=>n(`deviceProvider`,`discoverDevices`,`mutation`,e),getDiscoveryParamsSchema:e=>n(`deviceProvider`,`getDiscoveryParamsSchema`,`query`,e),getManualCreationType:e=>n(`deviceProvider`,`getManualCreationType`,`query`,e),adoptDiscoveredDevice:e=>n(`deviceProvider`,`adoptDiscoveredDevice`,`mutation`,e),supportsManualCreation:e=>n(`deviceProvider`,`supportsManualCreation`,`query`,e),getChildCreationSchema:e=>n(`deviceProvider`,`getChildCreationSchema`,`query`,e),createDevice:e=>n(`deviceProvider`,`createDevice`,`mutation`,e),testCreationField:e=>n(`deviceProvider`,`testCreationField`,`mutation`,e)},deviceState:{getAllSnapshots:e=>n(`deviceState`,`getAllSnapshots`,`query`,e),listClaims:e=>n(`deviceState`,`listClaims`,`query`,e)},faceGallery:{listIdentities:e=>n(`faceGallery`,`listIdentities`,`query`,e),createIdentity:e=>n(`faceGallery`,`createIdentity`,`mutation`,e),renameIdentity:e=>n(`faceGallery`,`renameIdentity`,`mutation`,e),deleteIdentity:e=>n(`faceGallery`,`deleteIdentity`,`mutation`,e),listIdentitySamples:e=>n(`faceGallery`,`listIdentitySamples`,`query`,e),auditIdentitySamples:e=>n(`faceGallery`,`auditIdentitySamples`,`query`,e),removeSample:e=>n(`faceGallery`,`removeSample`,`mutation`,e),getFaceMedia:e=>n(`faceGallery`,`getFaceMedia`,`query`,e),assignFace:e=>n(`faceGallery`,`assignFace`,`mutation`,e),unassignFace:e=>n(`faceGallery`,`unassignFace`,`mutation`,e),deleteFace:e=>n(`faceGallery`,`deleteFace`,`mutation`,e),assignFaces:e=>n(`faceGallery`,`assignFaces`,`mutation`,e),unassignFaces:e=>n(`faceGallery`,`unassignFaces`,`mutation`,e),suggestFaceClusters:e=>n(`faceGallery`,`suggestFaceClusters`,`query`,e)},integrations:{list:e=>n(`integrations`,`list`,`query`,e),get:e=>n(`integrations`,`get`,`query`,e),getByAddonId:e=>n(`integrations`,`getByAddonId`,`query`,e),create:e=>n(`integrations`,`create`,`mutation`,e),update:e=>n(`integrations`,`update`,`mutation`,e),delete:e=>n(`integrations`,`delete`,`mutation`,e),getSettings:e=>n(`integrations`,`getSettings`,`query`,e),setSettings:e=>n(`integrations`,`setSettings`,`mutation`,e),getAvailableTypes:e=>n(`integrations`,`getAvailableTypes`,`query`,e),testConnection:e=>n(`integrations`,`testConnection`,`mutation`,e)},keychainAdmin:{status:e=>n(`keychainAdmin`,`status`,`query`,e),listSecrets:e=>n(`keychainAdmin`,`listSecrets`,`query`,e),listAudit:e=>n(`keychainAdmin`,`listAudit`,`query`,e),reveal:e=>n(`keychainAdmin`,`reveal`,`mutation`,e),setSystemSecret:e=>n(`keychainAdmin`,`setSystemSecret`,`mutation`,e),deleteOrphans:e=>n(`keychainAdmin`,`deleteOrphans`,`mutation`,e),rotateMasterKey:e=>n(`keychainAdmin`,`rotateMasterKey`,`mutation`,e),purgeRetiredKeys:e=>n(`keychainAdmin`,`purgeRetiredKeys`,`mutation`,e),downloadRecoveryKey:e=>n(`keychainAdmin`,`downloadRecoveryKey`,`mutation`,e),resetKeychain:e=>n(`keychainAdmin`,`resetKeychain`,`mutation`,e)},llm:{generate:e=>n(`llm`,`generate`,`mutation`,e),generateVision:e=>n(`llm`,`generateVision`,`mutation`,e),cancel:e=>n(`llm`,`cancel`,`mutation`,e),listProfileKinds:e=>n(`llm`,`listProfileKinds`,`query`,e),listProfiles:e=>n(`llm`,`listProfiles`,`query`,e),upsertProfile:e=>n(`llm`,`upsertProfile`,`mutation`,e),deleteProfile:e=>n(`llm`,`deleteProfile`,`mutation`,e),testProfile:e=>n(`llm`,`testProfile`,`mutation`,e),listModels:e=>n(`llm`,`listModels`,`query`,e),getDefaults:e=>n(`llm`,`getDefaults`,`query`,e),setDefault:e=>n(`llm`,`setDefault`,`mutation`,e),getUsage:e=>n(`llm`,`getUsage`,`query`,e),listModelCatalog:e=>n(`llm`,`listModelCatalog`,`query`,e),listRuntimeNodes:e=>n(`llm`,`listRuntimeNodes`,`query`,e),listNodeModels:e=>n(`llm`,`listNodeModels`,`query`,e),resolveModelRef:e=>n(`llm`,`resolveModelRef`,`mutation`,e),installModel:e=>n(`llm`,`installModel`,`mutation`,e),deleteModel:e=>n(`llm`,`deleteModel`,`mutation`,e),getRuntimeStatus:e=>n(`llm`,`getRuntimeStatus`,`query`,e),startRuntime:e=>n(`llm`,`startRuntime`,`mutation`,e),stopRuntime:e=>n(`llm`,`stopRuntime`,`mutation`,e)},localNetwork:{list:e=>n(`localNetwork`,`list`,`query`,e),getPreferred:e=>n(`localNetwork`,`getPreferred`,`query`,e),getConnectionEndpoints:e=>n(`localNetwork`,`getConnectionEndpoints`,`query`,e),getNotificationEndpoint:e=>n(`localNetwork`,`getNotificationEndpoint`,`query`,e),setNotificationEndpoint:e=>n(`localNetwork`,`setNotificationEndpoint`,`mutation`,e),getViewerEndpoints:e=>n(`localNetwork`,`getViewerEndpoints`,`query`,e),setViewerEndpoints:e=>n(`localNetwork`,`setViewerEndpoints`,`mutation`,e),getAddresses:e=>n(`localNetwork`,`getAddresses`,`query`,e),addCustomAddress:e=>n(`localNetwork`,`addCustomAddress`,`mutation`,e),removeCustomAddress:e=>n(`localNetwork`,`removeCustomAddress`,`mutation`,e),setAddressRole:e=>n(`localNetwork`,`setAddressRole`,`mutation`,e),getHubAddresses:e=>n(`localNetwork`,`getHubAddresses`,`query`,e),getAllowedAddresses:e=>n(`localNetwork`,`getAllowedAddresses`,`query`,e),setAllowedAddresses:e=>n(`localNetwork`,`setAllowedAddresses`,`mutation`,e),resetAllowlistToBestMatch:e=>n(`localNetwork`,`resetAllowlistToBestMatch`,`mutation`,e),getTlsStatus:e=>n(`localNetwork`,`getTlsStatus`,`query`,e),regenerateCertificate:e=>n(`localNetwork`,`regenerateCertificate`,`mutation`,e),uploadCertificate:e=>n(`localNetwork`,`uploadCertificate`,`mutation`,e),downloadCa:e=>n(`localNetwork`,`downloadCa`,`query`,e),revertToGeneratedCertificate:e=>n(`localNetwork`,`revertToGeneratedCertificate`,`mutation`,e)},meshNetwork:{getStatus:e=>n(`meshNetwork`,`getStatus`,`query`,e),join:e=>n(`meshNetwork`,`join`,`mutation`,e),startLogin:e=>n(`meshNetwork`,`startLogin`,`mutation`,e),leave:e=>n(`meshNetwork`,`leave`,`mutation`,e),logout:e=>n(`meshNetwork`,`logout`,`mutation`,e),listPeers:e=>n(`meshNetwork`,`listPeers`,`query`,e),testConnection:e=>n(`meshNetwork`,`testConnection`,`mutation`,e)},metricsProvider:{collectSnapshot:e=>n(`metricsProvider`,`collectSnapshot`,`query`,e),getCached:e=>n(`metricsProvider`,`getCached`,`query`,e),getCurrent:e=>n(`metricsProvider`,`getCurrent`,`query`,e),getDiskSpace:e=>n(`metricsProvider`,`getDiskSpace`,`query`,e),getGpuInfo:e=>n(`metricsProvider`,`getGpuInfo`,`query`,e),getCpuTemperature:e=>n(`metricsProvider`,`getCpuTemperature`,`query`,e),getProcessStats:e=>n(`metricsProvider`,`getProcessStats`,`query`,e),listAddonInstances:e=>n(`metricsProvider`,`listAddonInstances`,`query`,e),getAddonStats:e=>n(`metricsProvider`,`getAddonStats`,`query`,e),listNodeProcesses:e=>n(`metricsProvider`,`listNodeProcesses`,`query`,e),getLoadSeries:e=>n(`metricsProvider`,`getLoadSeries`,`query`,e)},mqttBroker:{listBrokers:e=>n(`mqttBroker`,`listBrokers`,`query`,e),getBrokerConfig:e=>n(`mqttBroker`,`getBrokerConfig`,`query`,e),addBroker:e=>n(`mqttBroker`,`addBroker`,`mutation`,e),removeBroker:e=>n(`mqttBroker`,`removeBroker`,`mutation`,e),testConnection:e=>n(`mqttBroker`,`testConnection`,`mutation`,e),startEmbeddedBroker:e=>n(`mqttBroker`,`startEmbeddedBroker`,`mutation`,e),stopEmbeddedBroker:e=>n(`mqttBroker`,`stopEmbeddedBroker`,`mutation`,e),getStatus:e=>n(`mqttBroker`,`getStatus`,`query`,e)},networkAccess:{start:e=>n(`networkAccess`,`start`,`mutation`,e),stop:e=>n(`networkAccess`,`stop`,`mutation`,e),getEndpoint:e=>n(`networkAccess`,`getEndpoint`,`query`,e),getStatus:e=>n(`networkAccess`,`getStatus`,`query`,e),listEndpoints:e=>n(`networkAccess`,`listEndpoints`,`query`,e)},networkQuality:{getAllStats:e=>n(`networkQuality`,`getAllStats`,`query`,e)},nodes:{topology:e=>n(`nodes`,`topology`,`query`,e),directory:e=>n(`nodes`,`directory`,`query`,e),deployAddon:e=>n(`nodes`,`deployAddon`,`mutation`,e),undeployAddon:e=>n(`nodes`,`undeployAddon`,`mutation`,e),restartAddon:e=>n(`nodes`,`restartAddon`,`mutation`,e),restartProcess:e=>n(`nodes`,`restartProcess`,`mutation`,e),restartNode:e=>n(`nodes`,`restartNode`,`mutation`,e),shutdownNode:e=>n(`nodes`,`shutdownNode`,`mutation`,e),renameNode:e=>n(`nodes`,`renameNode`,`mutation`,e),clusterAddonStatus:e=>n(`nodes`,`clusterAddonStatus`,`query`,e),getCapUsageGraph:e=>n(`nodes`,`getCapUsageGraph`,`query`,e),getNodeAddons:e=>n(`nodes`,`getNodeAddons`,`query`,e),setProcessLogLevel:e=>n(`nodes`,`setProcessLogLevel`,`mutation`,e),executeQuery:e=>n(`nodes`,`executeQuery`,`mutation`,e)},notificationOutput:{listTargetKinds:e=>n(`notificationOutput`,`listTargetKinds`,`query`,e),listTargets:e=>n(`notificationOutput`,`listTargets`,`query`,e),getTarget:e=>n(`notificationOutput`,`getTarget`,`query`,e),discoverTargets:e=>n(`notificationOutput`,`discoverTargets`,`query`,e),probeTargetConfig:e=>n(`notificationOutput`,`probeTargetConfig`,`mutation`,e),send:e=>n(`notificationOutput`,`send`,`mutation`,e),testTarget:e=>n(`notificationOutput`,`testTarget`,`mutation`,e),upsertTarget:e=>n(`notificationOutput`,`upsertTarget`,`mutation`,e),deleteTarget:e=>n(`notificationOutput`,`deleteTarget`,`mutation`,e),setTargetEnabled:e=>n(`notificationOutput`,`setTargetEnabled`,`mutation`,e)},notificationRules:{listRules:e=>n(`notificationRules`,`listRules`,`query`,e),getRule:e=>n(`notificationRules`,`getRule`,`query`,e),createRule:e=>n(`notificationRules`,`createRule`,`mutation`,e),updateRule:e=>n(`notificationRules`,`updateRule`,`mutation`,e),deleteRule:e=>n(`notificationRules`,`deleteRule`,`mutation`,e),setRuleEnabled:e=>n(`notificationRules`,`setRuleEnabled`,`mutation`,e),listSequences:e=>n(`notificationRules`,`listSequences`,`query`,e),getSequence:e=>n(`notificationRules`,`getSequence`,`query`,e),createSequence:e=>n(`notificationRules`,`createSequence`,`mutation`,e),updateSequence:e=>n(`notificationRules`,`updateSequence`,`mutation`,e),deleteSequence:e=>n(`notificationRules`,`deleteSequence`,`mutation`,e),getClipRetentionAsks:e=>n(`notificationRules`,`getClipRetentionAsks`,`query`,e),listDeviceMutes:e=>n(`notificationRules`,`listDeviceMutes`,`query`,e),testRule:e=>n(`notificationRules`,`testRule`,`mutation`,e),previewStateSummary:e=>n(`notificationRules`,`previewStateSummary`,`mutation`,e),getConditionCatalog:e=>n(`notificationRules`,`getConditionCatalog`,`query`,e),getTemplateCatalog:e=>n(`notificationRules`,`getTemplateCatalog`,`query`,e),previewTemplate:e=>n(`notificationRules`,`previewTemplate`,`mutation`,e),getHistory:e=>n(`notificationRules`,`getHistory`,`query`,e),getRuleLastRuns:e=>n(`notificationRules`,`getRuleLastRuns`,`query`,e),resolveArtifactUrl:e=>n(`notificationRules`,`resolveArtifactUrl`,`query`,e),listSnoozes:e=>n(`notificationRules`,`listSnoozes`,`query`,e),createSnooze:e=>n(`notificationRules`,`createSnooze`,`mutation`,e),cancelSnooze:e=>n(`notificationRules`,`cancelSnooze`,`mutation`,e),getAlarmConfig:e=>n(`notificationRules`,`getAlarmConfig`,`query`,e),setAlarmConfig:e=>n(`notificationRules`,`setAlarmConfig`,`mutation`,e),createAlarmProfile:e=>n(`notificationRules`,`createAlarmProfile`,`mutation`,e),renameAlarmProfile:e=>n(`notificationRules`,`renameAlarmProfile`,`mutation`,e),deleteAlarmProfile:e=>n(`notificationRules`,`deleteAlarmProfile`,`mutation`,e),activateAlarmProfile:e=>n(`notificationRules`,`activateAlarmProfile`,`mutation`,e),getAlarmSensors:e=>n(`notificationRules`,`getAlarmSensors`,`query`,e)},osdManager:{getConditionSupport:e=>n(`osdManager`,`getConditionSupport`,`query`,e),copyDeviceConfiguration:e=>n(`osdManager`,`copyDeviceConfiguration`,`mutation`,e),listTemplates:e=>n(`osdManager`,`listTemplates`,`query`,e),upsertTemplate:e=>n(`osdManager`,`upsertTemplate`,`mutation`,e),deleteTemplate:e=>n(`osdManager`,`deleteTemplate`,`mutation`,e)},pipelineExecutor:{getAvailableEngines:e=>n(`pipelineExecutor`,`getAvailableEngines`,`query`,e),getSelectedEngine:e=>n(`pipelineExecutor`,`getSelectedEngine`,`query`,e),getDefaultSteps:e=>n(`pipelineExecutor`,`getDefaultSteps`,`query`,e),getEngineProvisioning:e=>n(`pipelineExecutor`,`getEngineProvisioning`,`query`,e),getVideoPipelineSteps:e=>n(`pipelineExecutor`,`getVideoPipelineSteps`,`query`,e),setVideoPipelineSteps:e=>n(`pipelineExecutor`,`setVideoPipelineSteps`,`mutation`,e),clearDeviceOverrides:e=>n(`pipelineExecutor`,`clearDeviceOverrides`,`mutation`,e),clearModelBoundDeviceOverrides:e=>n(`pipelineExecutor`,`clearModelBoundDeviceOverrides`,`mutation`,e),getInferenceDeviceHealth:e=>n(`pipelineExecutor`,`getInferenceDeviceHealth`,`query`,e),rearmInferenceDevice:e=>n(`pipelineExecutor`,`rearmInferenceDevice`,`mutation`,e),getSchema:e=>n(`pipelineExecutor`,`getSchema`,`query`,e),getGlobalSteps:e=>n(`pipelineExecutor`,`getGlobalSteps`,`query`,e),getGlobalPipelineConfig:e=>n(`pipelineExecutor`,`getGlobalPipelineConfig`,`query`,e),getOrchestratorConfigSchema:e=>n(`pipelineExecutor`,`getOrchestratorConfigSchema`,`query`,e),validatePipeline:e=>n(`pipelineExecutor`,`validatePipeline`,`query`,e),getCapabilities:e=>n(`pipelineExecutor`,`getCapabilities`,`query`,e),getAddonModels:e=>n(`pipelineExecutor`,`getAddonModels`,`query`,e),downloadModel:e=>n(`pipelineExecutor`,`downloadModel`,`mutation`,e),deleteModel:e=>n(`pipelineExecutor`,`deleteModel`,`mutation`,e),cacheFrameInPool:e=>n(`pipelineExecutor`,`cacheFrameInPool`,`mutation`,e),inferCached:e=>n(`pipelineExecutor`,`inferCached`,`mutation`,e),uncacheFrame:e=>n(`pipelineExecutor`,`uncacheFrame`,`mutation`,e),getEffectiveTuning:e=>n(`pipelineExecutor`,`getEffectiveTuning`,`query`,e),listLoadedEngines:e=>n(`pipelineExecutor`,`listLoadedEngines`,`query`,e),spinEngine:e=>n(`pipelineExecutor`,`spinEngine`,`mutation`,e),killEngine:e=>n(`pipelineExecutor`,`killEngine`,`mutation`,e),listReferenceImages:e=>n(`pipelineExecutor`,`listReferenceImages`,`query`,e),getReferenceImage:e=>n(`pipelineExecutor`,`getReferenceImage`,`query`,e),getReferenceAudioFiles:e=>n(`pipelineExecutor`,`getReferenceAudioFiles`,`query`,e),getReferenceAudio:e=>n(`pipelineExecutor`,`getReferenceAudio`,`query`,e),getAudioCapabilities:e=>n(`pipelineExecutor`,`getAudioCapabilities`,`query`,e),runAudioTest:e=>n(`pipelineExecutor`,`runAudioTest`,`mutation`,e),getDetectionConfigSchema:e=>n(`pipelineExecutor`,`getDetectionConfigSchema`,`query`,e)},pipelineOrchestrator:{requestOccupancyLook:e=>n(`pipelineOrchestrator`,`requestOccupancyLook`,`mutation`,e),pauseForStorageMigration:e=>n(`pipelineOrchestrator`,`pauseForStorageMigration`,`mutation`,e),resumeForStorageMigration:e=>n(`pipelineOrchestrator`,`resumeForStorageMigration`,`mutation`,e),rebalance:e=>n(`pipelineOrchestrator`,`rebalance`,`mutation`,e),getPipelineAssignments:e=>n(`pipelineOrchestrator`,`getPipelineAssignments`,`query`,e),getAgentLoad:e=>n(`pipelineOrchestrator`,`getAgentLoad`,`query`,e),getClusterModelChoice:e=>n(`pipelineOrchestrator`,`getClusterModelChoice`,`query`,e),getGlobalMetrics:e=>n(`pipelineOrchestrator`,`getGlobalMetrics`,`query`,e),getCapabilityBindings:e=>n(`pipelineOrchestrator`,`getCapabilityBindings`,`query`,e),setCapabilityBinding:e=>n(`pipelineOrchestrator`,`setCapabilityBinding`,`mutation`,e),getIngestOwner:e=>n(`pipelineOrchestrator`,`getIngestOwner`,`query`,e),getAudioNodeLoad:e=>n(`pipelineOrchestrator`,`getAudioNodeLoad`,`query`,e),getAudioAssignments:e=>n(`pipelineOrchestrator`,`getAudioAssignments`,`query`,e),getAgentSettings:e=>n(`pipelineOrchestrator`,`getAgentSettings`,`query`,e),listAgentSettings:e=>n(`pipelineOrchestrator`,`listAgentSettings`,`query`,e),removeAgentSettings:e=>n(`pipelineOrchestrator`,`removeAgentSettings`,`mutation`,e),setAgentMaxCameras:e=>n(`pipelineOrchestrator`,`setAgentMaxCameras`,`mutation`,e),setAgentCapabilities:e=>n(`pipelineOrchestrator`,`setAgentCapabilities`,`mutation`,e),setAgentDecodeLimits:e=>n(`pipelineOrchestrator`,`setAgentDecodeLimits`,`mutation`,e),setAgentReachableHost:e=>n(`pipelineOrchestrator`,`setAgentReachableHost`,`mutation`,e),setAgentInferenceDevices:e=>n(`pipelineOrchestrator`,`setAgentInferenceDevices`,`mutation`,e),getNodeInferenceDevices:e=>n(`pipelineOrchestrator`,`getNodeInferenceDevices`,`query`,e),resetNodePipelineDefaults:e=>n(`pipelineOrchestrator`,`resetNodePipelineDefaults`,`mutation`,e),planAutoTune:e=>n(`pipelineOrchestrator`,`planAutoTune`,`query`,e),applyAutoTune:e=>n(`pipelineOrchestrator`,`applyAutoTune`,`mutation`,e),setLoadBalancingShares:e=>n(`pipelineOrchestrator`,`setLoadBalancingShares`,`mutation`,e),getPlacementStats:e=>n(`pipelineOrchestrator`,`getPlacementStats`,`query`,e),suggestShares:e=>n(`pipelineOrchestrator`,`suggestShares`,`query`,e),getEffectiveShares:e=>n(`pipelineOrchestrator`,`getEffectiveShares`,`query`,e),setShareSource:e=>n(`pipelineOrchestrator`,`setShareSource`,`mutation`,e),getNodeBenchmarkPreflight:e=>n(`pipelineOrchestrator`,`getNodeBenchmarkPreflight`,`query`,e),startNodeBenchmark:e=>n(`pipelineOrchestrator`,`startNodeBenchmark`,`mutation`,e),getNodeBenchmarkStatus:e=>n(`pipelineOrchestrator`,`getNodeBenchmarkStatus`,`query`,e),abortNodeBenchmark:e=>n(`pipelineOrchestrator`,`abortNodeBenchmark`,`mutation`,e),getNodeBenchmarkCandidates:e=>n(`pipelineOrchestrator`,`getNodeBenchmarkCandidates`,`query`,e),listNodeBenchmarkResults:e=>n(`pipelineOrchestrator`,`listNodeBenchmarkResults`,`query`,e),deleteNodeBenchmarkResult:e=>n(`pipelineOrchestrator`,`deleteNodeBenchmarkResult`,`mutation`,e),getCameraStatuses:e=>n(`pipelineOrchestrator`,`getCameraStatuses`,`query`,e),setCameraSensors:e=>n(`pipelineOrchestrator`,`setCameraSensors`,`mutation`,e),reconcileFromDisk:e=>n(`pipelineOrchestrator`,`reconcileFromDisk`,`mutation`,e),getReconcileFromDiskStatus:e=>n(`pipelineOrchestrator`,`getReconcileFromDiskStatus`,`query`,e)},pipelineRunner:{attachCamera:e=>n(`pipelineRunner`,`attachCamera`,`mutation`,e),reportMotion:e=>n(`pipelineRunner`,`reportMotion`,`mutation`,e),getLocalLoad:e=>n(`pipelineRunner`,`getLocalLoad`,`query`,e),getLocalMetrics:e=>n(`pipelineRunner`,`getLocalMetrics`,`query`,e),getAllCameraMetrics:e=>n(`pipelineRunner`,`getAllCameraMetrics`,`query`,e),getLocalCameras:e=>n(`pipelineRunner`,`getLocalCameras`,`query`,e),getNativeCrop:e=>n(`pipelineRunner`,`getNativeCrop`,`query`,e),runStatelessStep:e=>n(`pipelineRunner`,`runStatelessStep`,`mutation`,e),startNodeBench:e=>n(`pipelineRunner`,`startNodeBench`,`mutation`,e),getNodeBenchStatus:e=>n(`pipelineRunner`,`getNodeBenchStatus`,`query`,e),abortNodeBench:e=>n(`pipelineRunner`,`abortNodeBench`,`mutation`,e)},plateGallery:{getPlateMedia:e=>n(`plateGallery`,`getPlateMedia`,`query`,e),searchPlates:e=>n(`plateGallery`,`searchPlates`,`query`,e),suggestPlateClusters:e=>n(`plateGallery`,`suggestPlateClusters`,`query`,e),correctPlateText:e=>n(`plateGallery`,`correctPlateText`,`mutation`,e),deletePlate:e=>n(`plateGallery`,`deletePlate`,`mutation`,e),listVehicles:e=>n(`plateGallery`,`listVehicles`,`query`,e),createVehicle:e=>n(`plateGallery`,`createVehicle`,`mutation`,e),renameVehicle:e=>n(`plateGallery`,`renameVehicle`,`mutation`,e),deleteVehicle:e=>n(`plateGallery`,`deleteVehicle`,`mutation`,e),listVehicleSamples:e=>n(`plateGallery`,`listVehicleSamples`,`query`,e),removeVehicleSample:e=>n(`plateGallery`,`removeVehicleSample`,`mutation`,e),assignPlate:e=>n(`plateGallery`,`assignPlate`,`mutation`,e),unassignPlate:e=>n(`plateGallery`,`unassignPlate`,`mutation`,e),assignPlates:e=>n(`plateGallery`,`assignPlates`,`mutation`,e),unassignPlates:e=>n(`plateGallery`,`unassignPlates`,`mutation`,e)},recordingArchive:{getAvailabilityBatch:e=>n(`recordingArchive`,`getAvailabilityBatch`,`query`,e),getDaysWithRecordingsBatch:e=>n(`recordingArchive`,`getDaysWithRecordingsBatch`,`query`,e),getStorageUsage:e=>n(`recordingArchive`,`getStorageUsage`,`query`,e),listOpsLog:e=>n(`recordingArchive`,`listOpsLog`,`query`,e),pauseForStorageMigration:e=>n(`recordingArchive`,`pauseForStorageMigration`,`mutation`,e),resumeForStorageMigration:e=>n(`recordingArchive`,`resumeForStorageMigration`,`mutation`,e),refreshStorageLocationsForMigration:e=>n(`recordingArchive`,`refreshStorageLocationsForMigration`,`mutation`,e),startStorageMigrationMove:e=>n(`recordingArchive`,`startStorageMigrationMove`,`mutation`,e),getStorageMigrationMoveStatus:e=>n(`recordingArchive`,`getStorageMigrationMoveStatus`,`query`,e),cancelStorageMigrationMove:e=>n(`recordingArchive`,`cancelStorageMigrationMove`,`mutation`,e),relocateFootage:e=>n(`recordingArchive`,`relocateFootage`,`mutation`,e),listRelocateJobs:e=>n(`recordingArchive`,`listRelocateJobs`,`query`,e),getRelocateResidue:e=>n(`recordingArchive`,`getRelocateResidue`,`query`,e),reconcileLedgerAgainstDisk:e=>n(`recordingArchive`,`reconcileLedgerAgainstDisk`,`mutation`,e),cancelRelocateJob:e=>n(`recordingArchive`,`cancelRelocateJob`,`mutation`,e),planStorageRebalance:e=>n(`recordingArchive`,`planStorageRebalance`,`query`,e),startStorageRebalance:e=>n(`recordingArchive`,`startStorageRebalance`,`mutation`,e),getPlacement:e=>n(`recordingArchive`,`getPlacement`,`query`,e),setDevicePlacement:e=>n(`recordingArchive`,`setDevicePlacement`,`mutation`,e)},recordingExport:{createExport:e=>n(`recordingExport`,`createExport`,`mutation`,e),getExport:e=>n(`recordingExport`,`getExport`,`query`,e),cancelExport:e=>n(`recordingExport`,`cancelExport`,`mutation`,e),deleteExport:e=>n(`recordingExport`,`deleteExport`,`mutation`,e),getDownloadUrl:e=>n(`recordingExport`,`getDownloadUrl`,`query`,e),readExportBytes:e=>n(`recordingExport`,`readExportBytes`,`query`,e)},serverManagement:{getServerPackageStatus:e=>n(`serverManagement`,`getServerPackageStatus`,`query`,e),checkServerUpdate:e=>n(`serverManagement`,`checkServerUpdate`,`mutation`,e),applyServerUpdate:e=>n(`serverManagement`,`applyServerUpdate`,`mutation`,e),rollbackServerUpdate:e=>n(`serverManagement`,`rollbackServerUpdate`,`mutation`,e),restartServer:e=>n(`serverManagement`,`restartServer`,`mutation`,e)},settingsStore:{get:e=>n(`settingsStore`,`get`,`query`,e),set:e=>n(`settingsStore`,`set`,`mutation`,e),query:e=>n(`settingsStore`,`query`,`query`,e),upsert:e=>n(`settingsStore`,`upsert`,`mutation`,e),insert:e=>n(`settingsStore`,`insert`,`mutation`,e),insertMany:e=>n(`settingsStore`,`insertMany`,`mutation`,e),update:e=>n(`settingsStore`,`update`,`mutation`,e),delete:e=>n(`settingsStore`,`delete`,`mutation`,e),deleteWhere:e=>n(`settingsStore`,`deleteWhere`,`mutation`,e),updateWhere:e=>n(`settingsStore`,`updateWhere`,`mutation`,e),count:e=>n(`settingsStore`,`count`,`query`,e),aggregate:e=>n(`settingsStore`,`aggregate`,`query`,e),histogram:e=>n(`settingsStore`,`histogram`,`query`,e),isEmpty:e=>n(`settingsStore`,`isEmpty`,`query`,e),declareCollection:e=>n(`settingsStore`,`declareCollection`,`mutation`,e)},storage:{resolve:e=>n(`storage`,`resolve`,`query`,e),write:e=>n(`storage`,`write`,`mutation`,e),read:e=>n(`storage`,`read`,`query`,e),exists:e=>n(`storage`,`exists`,`query`,e),list:e=>n(`storage`,`list`,`query`,e),delete:e=>n(`storage`,`delete`,`mutation`,e),getAvailableSpace:e=>n(`storage`,`getAvailableSpace`,`query`,e),beginUpload:e=>n(`storage`,`beginUpload`,`mutation`,e),writeChunk:e=>n(`storage`,`writeChunk`,`mutation`,e),finalizeUpload:e=>n(`storage`,`finalizeUpload`,`mutation`,e),abortUpload:e=>n(`storage`,`abortUpload`,`mutation`,e),beginDownload:e=>n(`storage`,`beginDownload`,`mutation`,e),readChunk:e=>n(`storage`,`readChunk`,`query`,e),endDownload:e=>n(`storage`,`endDownload`,`mutation`,e),listLocations:e=>n(`storage`,`listLocations`,`query`,e),listLocationDeclarations:e=>n(`storage`,`listLocationDeclarations`,`query`,e),upsertLocation:e=>n(`storage`,`upsertLocation`,`mutation`,e),deleteLocation:e=>n(`storage`,`deleteLocation`,`mutation`,e),listDrainProgress:e=>n(`storage`,`listDrainProgress`,`query`,e),testLocation:e=>n(`storage`,`testLocation`,`query`,e),listProviders:e=>n(`storage`,`listProviders`,`query`,e),testConfig:e=>n(`storage`,`testConfig`,`query`,e)},storageMigration:{plan:e=>n(`storageMigration`,`plan`,`query`,e),start:e=>n(`storageMigration`,`start`,`mutation`,e),status:e=>n(`storageMigration`,`status`,`query`,e),cancel:e=>n(`storageMigration`,`cancel`,`mutation`,e),movers:e=>n(`storageMigration`,`movers`,`query`,e),residue:e=>n(`storageMigration`,`residue`,`query`,e),drain:e=>n(`storageMigration`,`drain`,`mutation`,e),cleanupStart:e=>n(`storageMigration`,`cleanupStart`,`mutation`,e),cleanupStatus:e=>n(`storageMigration`,`cleanupStatus`,`query`,e),cleanupCancel:e=>n(`storageMigration`,`cleanupCancel`,`mutation`,e),history:e=>n(`storageMigration`,`history`,`query`,e)},streamBroker:{fetchEventMedia:e=>n(`streamBroker`,`fetchEventMedia`,`mutation`,e),listAllCameraStreams:e=>n(`streamBroker`,`listAllCameraStreams`,`query`,e),listAllProfileSlots:e=>n(`streamBroker`,`listAllProfileSlots`,`query`,e),getBrokerStats:e=>n(`streamBroker`,`getBrokerStats`,`query`,e),probeStream:e=>n(`streamBroker`,`probeStream`,`mutation`,e),listClients:e=>n(`streamBroker`,`listClients`,`query`,e),killClient:e=>n(`streamBroker`,`killClient`,`mutation`,e),getStreamUrl:e=>n(`streamBroker`,`getStreamUrl`,`query`,e),getStreamWithCodec:e=>n(`streamBroker`,`getStreamWithCodec`,`mutation`,e),releaseStreamWithCodec:e=>n(`streamBroker`,`releaseStreamWithCodec`,`mutation`,e),acquireEgressTranscode:e=>n(`streamBroker`,`acquireEgressTranscode`,`mutation`,e),releaseEgressTranscode:e=>n(`streamBroker`,`releaseEgressTranscode`,`mutation`,e),subscribeAudioChunks:e=>n(`streamBroker`,`subscribeAudioChunks`,`mutation`,e),pullAudioChunks:e=>n(`streamBroker`,`pullAudioChunks`,`query`,e),unsubscribeAudioChunks:e=>n(`streamBroker`,`unsubscribeAudioChunks`,`mutation`,e),setPreBufferDuration:e=>n(`streamBroker`,`setPreBufferDuration`,`mutation`,e),getPreBufferInfo:e=>n(`streamBroker`,`getPreBufferInfo`,`query`,e),getRtspPort:e=>n(`streamBroker`,`getRtspPort`,`query`,e),getAllRtspEntries:e=>n(`streamBroker`,`getAllRtspEntries`,`query`,e),getRtspEntry:e=>n(`streamBroker`,`getRtspEntry`,`query`,e),regenerateRtspToken:e=>n(`streamBroker`,`regenerateRtspToken`,`mutation`,e),setRtspEnabled:e=>n(`streamBroker`,`setRtspEnabled`,`mutation`,e),isRtspEnabled:e=>n(`streamBroker`,`isRtspEnabled`,`query`,e)},system:{info:e=>n(`system`,`info`,`query`,e),health:e=>n(`system`,`health`,`query`,e),featureFlags:e=>n(`system`,`featureFlags`,`query`,e),networkAddresses:e=>n(`system`,`networkAddresses`,`query`,e),getRetentionConfig:e=>n(`system`,`getRetentionConfig`,`query`,e),setRetentionConfig:e=>n(`system`,`setRetentionConfig`,`mutation`,e),forceRetentionCleanup:e=>n(`system`,`forceRetentionCleanup`,`mutation`,e),getSiteLocation:e=>n(`system`,`getSiteLocation`,`query`,e),setSiteLocation:e=>n(`system`,`setSiteLocation`,`mutation`,e),detectSiteLocation:e=>n(`system`,`detectSiteLocation`,`mutation`,e),getRequestCensus:e=>n(`system`,`getRequestCensus`,`query`,e),getLoadContributions:e=>n(`system`,`getLoadContributions`,`query`,e),getFailureContributions:e=>n(`system`,`getFailureContributions`,`query`,e),getLoggingSettings:e=>n(`system`,`getLoggingSettings`,`query`,e),setLoggingSettings:e=>n(`system`,`setLoggingSettings`,`mutation`,e)},terminalSession:{listProfiles:e=>n(`terminalSession`,`listProfiles`,`query`,e),listInstances:e=>n(`terminalSession`,`listInstances`,`query`,e),createInstance:e=>n(`terminalSession`,`createInstance`,`mutation`,e),updateInstance:e=>n(`terminalSession`,`updateInstance`,`mutation`,e),deleteInstance:e=>n(`terminalSession`,`deleteInstance`,`mutation`,e),setInstanceEnabled:e=>n(`terminalSession`,`setInstanceEnabled`,`mutation`,e),listLegacyCameras:e=>n(`terminalSession`,`listLegacyCameras`,`query`,e),adoptLegacyMonitor:e=>n(`terminalSession`,`adoptLegacyMonitor`,`mutation`,e),listSessions:e=>n(`terminalSession`,`listSessions`,`query`,e),openSession:e=>n(`terminalSession`,`openSession`,`mutation`,e),resize:e=>n(`terminalSession`,`resize`,`mutation`,e),pullOutput:e=>n(`terminalSession`,`pullOutput`,`mutation`,e),writeInput:e=>n(`terminalSession`,`writeInput`,`mutation`,e),close:e=>n(`terminalSession`,`close`,`mutation`,e)},toast:{onToast:(e,t)=>n(`toast`,`onToast`,`subscription`,e,t)},turnProvider:{getTurnServers:e=>n(`turnProvider`,`getTurnServers`,`query`,e)},userManagement:{listUsers:e=>n(`userManagement`,`listUsers`,`query`,e),createUser:e=>n(`userManagement`,`createUser`,`mutation`,e),updateUser:e=>n(`userManagement`,`updateUser`,`mutation`,e),deleteUser:e=>n(`userManagement`,`deleteUser`,`mutation`,e),resetPassword:e=>n(`userManagement`,`resetPassword`,`mutation`,e),setUserScopes:e=>n(`userManagement`,`setUserScopes`,`mutation`,e),validateCredentials:e=>n(`userManagement`,`validateCredentials`,`mutation`,e),listApiKeys:e=>n(`userManagement`,`listApiKeys`,`query`,e),createApiKey:e=>n(`userManagement`,`createApiKey`,`mutation`,e),revokeApiKey:e=>n(`userManagement`,`revokeApiKey`,`mutation`,e),validateApiKey:e=>n(`userManagement`,`validateApiKey`,`mutation`,e),createScopedToken:e=>n(`userManagement`,`createScopedToken`,`mutation`,e),revokeScopedToken:e=>n(`userManagement`,`revokeScopedToken`,`mutation`,e),validateScopedToken:e=>n(`userManagement`,`validateScopedToken`,`query`,e),listScopedTokens:e=>n(`userManagement`,`listScopedTokens`,`query`,e),setupTotp:e=>n(`userManagement`,`setupTotp`,`mutation`,e),confirmTotp:e=>n(`userManagement`,`confirmTotp`,`mutation`,e),disableTotp:e=>n(`userManagement`,`disableTotp`,`mutation`,e),getTotpStatus:e=>n(`userManagement`,`getTotpStatus`,`query`,e),verifyTotp:e=>n(`userManagement`,`verifyTotp`,`mutation`,e),oauthIssueCode:e=>n(`userManagement`,`oauthIssueCode`,`mutation`,e),oauthExchangeCode:e=>n(`userManagement`,`oauthExchangeCode`,`mutation`,e),oauthRefresh:e=>n(`userManagement`,`oauthRefresh`,`mutation`,e),oauthVerifyAccessToken:e=>n(`userManagement`,`oauthVerifyAccessToken`,`query`,e),listExternalIdentities:e=>n(`userManagement`,`listExternalIdentities`,`query`,e),findUserByExternalIdentity:e=>n(`userManagement`,`findUserByExternalIdentity`,`query`,e),linkExternalIdentity:e=>n(`userManagement`,`linkExternalIdentity`,`mutation`,e),unlinkExternalIdentity:e=>n(`userManagement`,`unlinkExternalIdentity`,`mutation`,e),listOauthSessions:e=>n(`userManagement`,`listOauthSessions`,`query`,e),revokeOauthSession:e=>n(`userManagement`,`revokeOauthSession`,`mutation`,e)}}}var lY=`2026-09-11T00:00:00.000Z`,uY=Date.parse(lY),dY={PCMU:20*Math.log10(4),PCMA:20*Math.log10(8)};function fY(e,t){return t+dY[e]}function pY(e){return!Number.isFinite(e)||e<=0?`unknown`:e>=uY?`itu`:`pre-itu`}var mY=`audio-`;function hY(e){return e.startsWith(mY)?e.slice(6):e}function gY(e){return e.startsWith(mY)?e:`${mY}${e}`}var _Y=-96,vY=Math.round(fY(`PCMU`,-55)),yY={hitPercent:60,samplingSeconds:10};function bY(e){return e??yY}function xY(e){return e===void 0?null:e.labels!==void 0&&e.labels.length>0?`label`:e.dbThreshold===void 0?null:`level`}function SY(e){return e===void 0?!1:e.dbThreshold===void 0&&(e.labels===void 0||e.labels.length===0)}function CY(e,t,n){return Number.isFinite(e)?Math.min(n,Math.max(t,Math.round(e))):t}function wY(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function TY(e,t){let n=bY(e),r=wY(t,`labels`)?t.labels:n.labels,i=wY(t,`dbThreshold`)?t.dbThreshold:n.dbThreshold,a=r!==void 0&&r.length>0,o=t.mode??(wY(t,`labels`)&&a?`label`:wY(t,`dbThreshold`)&&i!==void 0?`level`:a?`label`:i===void 0?null:`level`),s=o===`label`&&a?r:void 0,c=o===`level`?i??(t.mode===`level`?vY:void 0):void 0;return{...s===void 0?{}:{labels:[...s]},...c===void 0?{}:{dbThreshold:CY(c,_Y,0)},hitPercent:CY(t.hitPercent??n.hitPercent,1,100),samplingSeconds:CY(t.samplingSeconds??n.samplingSeconds,1,300),...(()=>{let e=wY(t,`confirmHits`)?t.confirmHits:n.confirmHits,r=wY(t,`confirmWindowSec`)?t.confirmWindowSec:n.confirmWindowSec;return{...e===void 0?{}:{confirmHits:CY(e,1,20)},...r===void 0?{}:{confirmWindowSec:CY(r,1,60)}}})()}}function EY(e,t){let n=e?.audioKinds??[],r=n.length>0?n.map(e=>{let t=hY(e.kind);return{value:t,label:e.label,iconId:gY(t),unknown:!1}}):xC.map(e=>({value:e.id,label:e.name,iconId:gY(e.id),unknown:!1})),i=new Set(r.map(e=>e.value)),a=[];for(let e of t??[]){let t=hY(e);i.has(t)||a.includes(t)||(a.push(t),r.push({value:t,label:t,iconId:gY(t),unknown:!0}))}return{choices:r,unknownLabels:a}}function DY(e,t){let n=hY(t);return(e??[]).some(e=>hY(e)===n)}function OY(e,t){let n=hY(t),r=e??[];if(DY(r,n)){let e=r.filter(e=>hY(e)!==n);return e.length>0?e:void 0}return[...r,n]}var kY=new Set([`classes`,`classesExclude`]),AY=new Set([`sensorKinds`]),jY=new Set([`occupancy`]);function MY(e){return{value:e.kind,label:e.label}}function NY(e){let t=[],n=new Map,r=(e,r)=>{let i=n.get(e);if(i!==void 0)return i;let a={fallbackLabel:r,options:[]};return n.set(e,a),t.push(e),a};for(let t of e){let e=t.parentKind??t.kind,n=r(e,t.parentKind===null?t.label:e);n.options.push(MY(t)),t.parentKind===null&&(n.fallbackLabel=t.label)}return t.flatMap(e=>{let t=n.get(e);return t===void 0?[]:[{key:e,fallbackLabel:t.fallbackLabel,options:t.options}]})}function PY(e){let t=[],n=new Map;for(let r of e){let e=r.parentKind??`other`,i=n.get(e);i===void 0?(n.set(e,[MY(r)]),t.push(e)):i.push(MY(r))}return t.flatMap(e=>{let t=n.get(e);return t===void 0?[]:[{key:e,fallbackLabel:e,options:t}]})}function FY(e,t){if(!t)return null;if(kY.has(e)){let e=NY(t.videoClasses);return t.audioKinds.length>0&&e.push({key:`audio`,fallbackLabel:`Audio`,options:t.audioKinds.map(MY)}),e.length>0?{groups:e}:null}if(jY.has(e)){let e=t.videoClasses.filter(e=>e.parentKind===null).map(MY);return e.length>0?{groups:[{key:`macro`,fallbackLabel:`Classes`,options:e}]}:null}if(AY.has(e)){let e=PY(t.labels);return e.length>0?{groups:e}:null}return null}var IY=`audio`;function LY(e){let t=FY(`classes`,e);if(t===null)return null;let n=t.groups.filter(e=>e.key!==IY);return n.length>0?{groups:n}:null}function RY(e){return e.trim().toLowerCase().startsWith(`${IY}-`)}function zY(e){let t=new Set;for(let n of e.groups)for(let e of n.options)t.add(e.value);return t}var BY=[`devices`,`classes`],VY=new Set(BY);function HY(e){return VY.has(e)}function UY(e){return e.replace(/!\[([^\]]*)\]\([^)]*\)/g,`$1`).replace(/\[([^\]]*)\]\([^)]*\)/g,`$1`).replace(/(\*\*|__)(.*?)\1/g,`$2`).replace(/(\*|_)(.*?)\1/g,`$2`).replace(/`([^`]*)`/g,`$1`).replace(/^\s{0,3}#{1,6}\s*/gm,``).replace(/^\s{0,3}>\s?/gm,``).replace(/^\s{0,3}[-*+]\s+/gm,``).replace(/^\s{0,3}\d+\.\s+/gm,``).trim()}var WY=[[/ /g,` `],[/&/g,`&`],[/</g,`<`],[/>/g,`>`],[/"/g,`"`],[/'/g,`'`]];function GY(e){let t=e.replace(/<\s*br\s*\/?\s*>/gi,`
|
|
353
|
+
`).replace(/<\s*\/\s*(p|div|li|h[1-6])\s*>/gi,`
|
|
354
|
+
`).replace(/<[^>]+>/g,``);for(let[e,n]of WY)t=t.replace(e,n);return t.replace(/\n{3,}/g,`
|
|
355
|
+
|
|
356
|
+
`).trim()}var KY=[[/&/g,`&`],[/</g,`<`],[/>/g,`>`],[/"/g,`"`],[/'/g,`'`]];function qY(e){let t=e;for(let[e,n]of KY)t=t.replace(e,n);return t}function JY(e){return qY(e).replace(/\n/g,`<br>`)}function YY(e){return qY(e).replace(/(\*\*|__)(.*?)\1/g,`<b>$2</b>`).replace(/(\*|_)(.*?)\1/g,`<i>$2</i>`).replace(/`([^`]*)`/g,`<code>$1</code>`).replace(/\[([^\]]*)\]\(([^)]*)\)/g,`<a href="$2">$1</a>`).replace(/\n/g,`<br>`)}var XY={text:[`text`,`markdown`,`html`],markdown:[`markdown`,`html`,`text`],html:[`html`,`text`,`markdown`]};function ZY(e,t){for(let n of XY[e]??XY.text)if(t.includes(n))return n;return t[0]??`text`}function QY(e,t,n){if(t===n)return e;if(n===`text`){if(t===`markdown`)return UY(e);if(t===`html`)return GY(e)}if(n===`html`){if(t===`text`)return JY(e);if(t===`markdown`)return YY(e)}if(n===`markdown`){if(t===`text`)return e;if(t===`html`)return GY(e)}return e}function $Y(e){return{id:e.id,ordinal:e.ordinal,...e.flags?{flags:e.flags}:{},...e.requires?{requires:e.requires}:{}}}function eX(e,t){if(e.length===0)return null;if(t.level!==void 0){let n=e.find(e=>e.id===t.level);if(n)return $Y(n)}let n=e.filter(e=>e.ordinal!==null);if(n.length===0)return $Y(e[0]);let r=t.priority;return $Y([...n].sort((e,t)=>{let n=Math.abs((e.ordinal??0)-r),i=Math.abs((t.ordinal??0)-r);return n===i?(t.ordinal??0)-(e.ordinal??0):n-i})[0])}function tX(e,t){if(!Number.isFinite(t)||t<=0||e.length<=t)return[e];let n=[];for(let r=0;r<e.length;r+=t)n.push(e.slice(r,r+t));return n}function nX(e,t){let n=[],r=t.format,i=ZY(r,e.format);i!==r&&n.push(`format`);let a=QY(t.body,r,i),o=eX(e.levels,t),s=t.attachments??[],c=[];for(let t of s){if(!e.attachments.mediaTypes.includes(t.mediaType)){n.push(`attachment:${t.mediaType}`);continue}if(e.attachments.mode===`url`&&t.url===void 0){n.push(`attachment:noUrl`);continue}if(t.bytes!==void 0&&e.attachments.maxBytes!==void 0&&t.bytes.length>e.attachments.maxBytes){n.push(`attachment:maxBytes`);continue}if(c.length>=e.attachments.max){n.push(`attachment:max`);continue}let r=e.attachments.mode===`bytes`&&t.bytes===void 0&&t.url!==void 0;c.push({mediaType:t.mediaType,...t.url===void 0?{}:{url:t.url},...t.bytes===void 0?{}:{bytes:t.bytes},...t.mime===void 0?{}:{mime:t.mime},...t.name===void 0?{}:{name:t.name},needsFetch:r})}let l=t.actions??[],u=l.slice(0,Math.max(0,e.actions));l.length>u.length&&n.push(`actions`);let d=e.actionIcons===!0;!d&&u.some(e=>e.icon!==void 0)&&n.push(`actionIcons`);let f=d?u:u.map(({icon:e,...t})=>t),p=null;t.clickUrl!==void 0&&(e.clickUrl?p=t.clickUrl:n.push(`clickUrl`));let m=null;t.sound!==void 0&&(e.sound?m=t.sound:n.push(`sound`));let h=null;t.ttl!==void 0&&(e.ttl?h=t.ttl:n.push(`ttl`));let g=t.tag??null,_=tX(a,e.bodyMaxLen),v=_.length>1,ee={level:o?.id??``,format:i,attachmentsSent:c.length,actionsSent:f.length,truncated:v,dropped:n};return{body:_[0]??``,...t.title===void 0?{}:{title:t.title},format:i,level:o,attachments:c,actions:f,clickUrl:p,sound:m,ttl:h,tag:g,bodyParts:_,renderedAs:ee}}var rX=[`deviceIds`,`deviceTypes`,`nodeIds`,`packageNames`,`consumableLowPercent`];function iX(e,t){switch(t){case`deviceIds`:return e.startsWith(`device-`)||e.startsWith(`stream-`)||e===`detection-blind`||e===`alarm-triggered`;case`deviceTypes`:return e.startsWith(`device-`)||e===`detection-blind`;case`nodeIds`:return e.startsWith(`node-`)||e===`addon-crash-loop`||e===`addon-update-available`||e===`addon-updated`||e===`server-update-available`||e===`wrapper-update-available`||e===`server-updated`;case`packageNames`:return e.endsWith(`update-available`)||e===`addon-updated`||e===`node-updating`||e===`server-updated`;case`consumableLowPercent`:return aw.includes(e)}}function aX(e,t){return e.some(e=>iX(e,t))}var oX=[`device-events`,`system`,`alarm`];function sX(e){return oX.some(t=>t===e)}var cX={"device-online":`device-events`,"device-offline":`device-events`,"device-disabled":`device-events`,"device-enabled":`device-events`,"device-battery-low":`device-events`,"device-battery-normal":`device-events`,"device-consumable-low":`device-events`,"device-consumable-normal":`device-events`,"device-tank-low":`device-events`,"device-tank-full":`device-events`,"device-tank-normal":`device-events`,"stream-online":`device-events`,"stream-offline":`device-events`,"detection-blind":`device-events`,"node-online":`system`,"node-offline":`system`,"node-restarting":`system`,"node-updating":`system`,"node-inference-unavailable":`system`,"addon-crash-loop":`system`,"addon-update-available":`system`,"addon-updated":`system`,"server-update-available":`system`,"server-updated":`system`,"wrapper-update-available":`system`,"backup-completed":`system`,"export-completed":`system`,"alarm-triggered":`alarm`,"alarm-armed":`alarm`,"alarm-disarmed":`alarm`,"alarm-arming":`alarm`,"alarm-arm-refused":`alarm`,"alarm-pending":`alarm`,"alarm-rearmed":`alarm`,"alarm-sensor-bypass":`alarm`,"alarm-check-failed":`alarm`,"camera-online":null,"camera-offline":null,"camera-disabled":null,"camera-enabled":null},lX=new Map(Object.entries(cX)),uX=[...rX,`excludeDeviceIds`],dX={"device-events":[`deviceIds`,`excludeDeviceIds`,`deviceTypes`,`consumableLowPercent`],system:[`nodeIds`,`packageNames`],alarm:[`deviceIds`]},fX=[{id:`device-state`,family:`device-events`,label:`Device state`,kinds:[`device-offline`,`device-online`,`device-disabled`,`device-enabled`]},{id:`streams`,family:`device-events`,label:`Streams`,kinds:[`stream-offline`,`stream-online`]},{id:`battery`,family:`device-events`,label:`Battery`,kinds:[`device-battery-low`,`device-battery-normal`]},{id:`consumables`,family:`device-events`,label:`Consumables`,kinds:[`device-consumable-low`,`device-consumable-normal`]},{id:`tanks`,family:`device-events`,label:`Tanks`,kinds:[`device-tank-low`,`device-tank-full`,`device-tank-normal`]},{id:`detection-blind`,family:`device-events`,label:`Detecting nothing`,kinds:[`detection-blind`]},{id:`nodes`,family:`system`,label:`Nodes`,kinds:[`node-offline`,`node-online`,`node-restarting`,`node-inference-unavailable`]},{id:`addons`,family:`system`,label:`Addons stopped`,kinds:[`addon-crash-loop`]},{id:`addon-updates`,family:`system`,label:`Addon updates`,kinds:[`addon-update-available`,`addon-updated`]},{id:`updates`,family:`system`,label:`Server & container updates`,kinds:[`server-update-available`,`node-updating`,`server-updated`,`wrapper-update-available`]},{id:`backups-exports`,family:`system`,label:`Backups & exports`,kinds:[`backup-completed`,`export-completed`]},{id:`alarm`,family:`alarm`,label:`Alarm`,kinds:rw}];function pX(e){return fX.filter(t=>t.family===e).flatMap(e=>e.kinds)}function mX(e){if(typeof e!=`object`||!e||!(`kinds`in e))return;let t=e.kinds;if(Array.isArray(t))return t.filter(e=>typeof e==`string`)}function hX(e){let t=new Set;for(let n of e){let e=lX.get(n);if(e==null)return{kind:`mixed`};t.add(e)}let[n]=[...t];return t.size===1&&n!==void 0?{kind:`family`,family:n}:{kind:`mixed`}}function gX(e){if(e===void 0||e.kinds.length===0)return[{code:`no-kinds`}];let t=[],n=new Set;for(let r of e.kinds){let e=cX[r];e===null?t.push({code:`legacy-kind`,kind:r}):n.add(e)}let r=oX.filter(e=>n.has(e));r.length>1&&t.push({code:`mixed-families`,families:r});let[i]=r;if(r.length!==1||i===void 0)return t;let a=dX[i];for(let n of uX)e[n]!==void 0&&!a.includes(n)&&t.push({code:`filter-outside-family`,filter:n,family:i});return t}function _X(e){switch(e.code){case`no-kinds`:return`a system-event rule needs at least one event kind`;case`legacy-kind`:return`'${e.kind}' is a legacy kind and cannot be authored`;case`mixed-families`:return`event kinds span ${e.families.join(` + `)} — one rule per family`;case`filter-outside-family`:return`filter '${e.filter}' is not allowed on a ${e.family} rule`}}var vX=[`device-events`,`system`,`alarm`,`mixed`];function yX(e){return vX.some(t=>t===e)}function bX(e){return sX(e)?e:void 0}var xX=`An occupancy edge is not a sensor event: it carries no sensor kind, so this condition can never match one.`,SX=`An occupancy edge carries no device event-type token — that comes from an event-emitter slice, which a count crossing has none of.`,CX=`An occupancy edge is a count crossing, not a sensor reading: it has no raise or clear, so this choice could never narrow it.`,wX=`An occupancy edge is always produced by the pipeline, so any other source can never match and “pipeline” narrows nothing.`,TX=`A confirmed sound window is always stamped as an audio subject, so any other source can never match.`,EX=`A sound rule fires on what the camera HEARD. Its subject carries no detection, so this condition can never match one — name the sounds in the Sound condition instead.`,DX=`A sound window’s evidence is a percentage of samples, not a detector score, so a confidence threshold can never be satisfied.`,OX=`A sound has no position in the frame, so a zone or a drawn polygon can never match it.`,kX=[{kind:`detection`,label:`Conditions`,excluded:{audio:`A detection rule fires on what the camera SAW. Sounds are a Sound rule of their own — adding one here turned the rule into a sound rule and dropped every detection condition.`},editable:!0,carriesMedia:!0,carriesSubjectCrop:!0},{kind:`sensor`,label:`Conditions`,excluded:{},editable:!0,carriesMedia:!0,carriesSubjectCrop:!0,blurb:`A doorbell press or a linked sensor changing state. The picture comes from the camera the sensor is attributed to.`},{kind:`occupancy`,label:`Occupancy`,discriminator:`occupancy`,excluded:{sensorKinds:xX,eventTypeTokens:SX,sensorTransition:CX,source:wX},editable:!0,carriesMedia:!0,carriesSubjectCrop:!0,blurb:`Fires when the count in a camera frame or a zone crosses your threshold and holds. Pick the camera first — the zone list is that camera’s.`},{kind:`sound`,label:`Sound`,discriminator:`audio`,excluded:{classes:EX,classesExclude:EX,minConfidence:DX,zones:OX,zonesExclude:OX,customZones:OX,crossing:OX,labelEquals:EX,identities:EX,identitiesExclude:EX,plates:EX,source:TX},editable:!0,carriesMedia:!0,carriesSubjectCrop:!1,blurb:`Fires on a confirmed sampling window of audio, never on a picture. Name the sounds and/or keep a level threshold — with neither it can never match.`,mediaBlurb:`A sound owns no frame, so the picture is a photograph of the camera taken at the moment of the match — the whole scene, never a crop. The GIF and the clip are cut around the same instant, from the camera.`},{kind:`device-events`,label:`Device events`,discriminator:`systemEvent`,excluded:{},editable:!0,carriesMedia:!1,carriesSubjectCrop:!1,blurb:`A device or its stream going away or coming back, switched off or on, a battery or consumable running low, a camera detecting nothing. There is no frame to attach.`},{kind:`system`,label:`System events`,discriminator:`systemEvent`,excluded:{},editable:!0,carriesMedia:!1,carriesSubjectCrop:!1,blurb:`The installation itself: a node leaving, an addon crash-looping, an update available or installed, a backup or an export finishing.`},{kind:`alarm`,label:`Alarm`,discriminator:`systemEvent`,excluded:{},editable:!0,carriesMedia:!1,carriesSubjectCrop:!1,blurb:`The alarm panel: refused, arming, armed, entry delay, triggered, re-armed, sensor bypass, disarmed.`,mediaBlurb:`An alarm set off by a rule arrives with THAT rule's pictures, combined into one notification. This rule adds none of its own.`},{kind:`mixed`,label:`To recreate`,discriminator:`systemEvent`,excluded:{},editable:!1,carriesMedia:!1,carriesSubjectCrop:!1,blurb:`This rule mixes events from more than one family (device events, system, alarm). It keeps firing as it is, but it can no longer be edited: create one rule per family, then delete this one.`}];function AX(e){return kX.find(t=>t.kind===e)??kX[0]}function jX(e){return kX.filter(t=>t.discriminator===e).map(e=>e.kind)}var MX=`system-event`;function NX(e){return e===MX}function PX(e){switch(e){case`sensor`:return YM;case`detection`:case`occupancy`:return[`detection-pipeline`];case`sound`:return[`audio-metrics`];case`device-events`:case`system`:case`alarm`:case`mixed`:return null}}var FX=`camera-streams`;function IX(e){let t=PX(e);return t===null?null:e===`sensor`?[t,[FX]]:[t]}function LX(e){return NX(e.delivery)?zX(e.conditions.systemEvent):e.conditions.occupancy!==void 0&&e.delivery===`device-event`?`occupancy`:e.conditions.audio!==void 0&&e.delivery===`immediate`?`sound`:e.delivery===`device-event`?`sensor`:`detection`}function RX(e){return e.delivery===`immediate`&&LX(e)===`detection`}function zX(e){let t=hX(mX(e)??[]);return t.kind===`family`?t.family:`mixed`}function BX(e,t,n){let r=AX(n);return e.id===r.discriminator?!0:e.appliesTo.includes(t)?r.excluded[e.id]===void 0:!1}function VX(e,t){let n=AX(t);return e===n.discriminator?null:n.excluded[e]??null}function HX(e,t){let n=AX(t),r=[];for(let[t,i]of Object.entries(e)){if(i===void 0||Array.isArray(i)&&i.length===0)continue;let e=n.excluded[t];e!==void 0&&r.push({conditionId:t,reason:e})}return r}var UX=[{key:`all`,label:`All rules`,blurb:`Every notification rule, whatever its trigger. Each rule picks a trigger, matches conditions and fans out to one or more delivery targets.`,newRuleLabel:`New rule`,emptyHint:`No notification rules yet. Create one to be told what your cameras see.`,creatable:!0},{key:`detection`,label:`Detections`,blurb:`Rules driven by what the cameras SEE — detections, tracks and package events.`,newRuleLabel:`New detection rule`,emptyHint:`No detection rules yet. Create one to be told what your cameras see.`,creatable:!0},{key:`sensor`,label:`Sensors`,blurb:`Rules driven by a device or sensor CHANGING STATE — a doorbell press, a linked sensor opening or closing. The picture comes from the camera the sensor is attributed to.`,newRuleLabel:`New sensor rule`,emptyHint:`No sensor rules yet. Create one to be told when a doorbell is pressed or a linked sensor changes.`,creatable:!0},{key:`audio`,label:`Sound`,blurb:`Rules on what the cameras HEAR: a sustained window of sound loud enough, or classified as one of the sounds you name. A sound rule fires only on a confirmed sampling window, never on a picture.`,newRuleLabel:`New sound rule`,emptyHint:`No sound rules yet. A new sound rule opens on the sound condition already filled in with a level threshold, so you only have to name the sounds and the targets.`,creatable:!0},{key:`occupancy`,label:`Occupancy`,blurb:`Rules on how many objects are in a camera frame or a zone, and for how long: "the driveway became occupied", "the garden emptied".`,newRuleLabel:`New occupancy rule`,emptyHint:`No occupancy rules yet. A new occupancy rule opens on the occupancy condition; pick the camera first, then the zone and the count.`,creatable:!0},{key:`device-events`,label:`Device events`,blurb:`Rules about your devices: offline or back, switched off or on, a stream dropping, a battery or consumable running low, a camera detecting nothing.`,newRuleLabel:`New device-event rule`,emptyHint:`No device-event rules yet. These tell you when a device drops, a battery runs low or a camera goes blind.`,creatable:!0},{key:`system`,label:`System events`,blurb:`Rules about the installation: a node leaving the cluster, an addon crash-looping, an update available or installed, a backup or export finishing.`,newRuleLabel:`New system rule`,emptyHint:`No system rules yet. These tell you when a node leaves, an update lands or a backup finishes.`,creatable:!0},{key:`alarm`,label:`Alarm`,blurb:`Rules about the alarm panel: arming, armed, triggered, disarmed, and the refusals in between.`,newRuleLabel:`New alarm rule`,emptyHint:`No alarm rules yet. These tell you when the alarm arms, goes off or is disarmed.`,creatable:!0},{key:`mixed`,label:`To recreate`,blurb:`System rules authored before the three families existed. Each mixes families, keeps firing as it is, and can only be read or deleted: recreate it as one rule per family.`,newRuleLabel:`New rule`,emptyHint:`Nothing to recreate.`,creatable:!1}];function WX(e){return UX.find(t=>t.key===e)??UX[0]}function GX(e){return UX.find(t=>t.key===e)?.key}function KX(e){return e.conditions.audio!==void 0}function qX(e){return e.conditions.occupancy!==void 0}function JX(e,t){return t===`all`?!0:NX(e.delivery)?LX(e)===t:t===`audio`?KX(e):t===`occupancy`?qX(e):t===`sensor`?e.delivery===`device-event`&&!qX(e):t===`detection`?!KX(e)&&!qX(e)&&e.delivery!==`device-event`:!1}function YX(e){return NX(e.delivery)?zX(e.conditions.systemEvent):KX(e)?`audio`:qX(e)?`occupancy`:e.delivery===`device-event`?`sensor`:`detection`}var XX={op:`became-occupied`,count:1,sustainSeconds:15},ZX={hitPercent:yY.hitPercent,samplingSeconds:yY.samplingSeconds,dbThreshold:vY};function QX(e){switch(e){case`device-events`:return{delivery:MX,conditions:{systemEvent:{kinds:[`device-offline`,`device-online`]}}};case`system`:return{delivery:MX,conditions:{systemEvent:{kinds:[`node-offline`,`node-online`]}}};case`alarm`:return{delivery:MX,conditions:{systemEvent:{kinds:[`alarm-triggered`]}}};case`audio`:return{delivery:`immediate`,conditions:{audio:ZX}};case`occupancy`:return{delivery:`device-event`,conditions:{occupancy:XX}};case`sensor`:return{delivery:`device-event`,conditions:{}};default:return{delivery:`immediate`,conditions:{source:`pipeline`}}}}function $X(e){return QX(e).delivery}var eZ=[`rule`,`devices`,`conditions`,`notification`,`actions`,`advanced`],tZ={rule:`Rule`,devices:`Cameras`,conditions:`Conditions`,notification:`Notification`,actions:`Actions`,advanced:`Advanced`};function nZ(e){let t=AX(e),n=[];for(let r of eZ)r===`devices`&&yX(e)||n.push({key:r,label:r===`conditions`?t.label:tZ[r]});return n}var rZ={Sun:0,Mon:1,Tue:2,Wed:3,Thu:4,Fri:5,Sat:6},iZ=new Map;function aZ(e){let t=iZ.get(e);if(t!==void 0)return t;let n;try{n=new Intl.DateTimeFormat(`en-US`,{timeZone:e,weekday:`short`,hour:`numeric`,minute:`numeric`,hourCycle:`h23`})}catch{n=null}return iZ.set(e,n),n}function oZ(e,t){let n=new Date(e),r=t===void 0?null:aZ(t);if(r!==null)try{let e=r.formatToParts(n),t,i,a;for(let n of e)n.type===`weekday`?t=n.value:n.type===`hour`?i=Number(n.value):n.type===`minute`&&(a=Number(n.value));let o=t===void 0?void 0:rZ[t];if(o!==void 0&&i!==void 0&&a!==void 0)return{day:o,minute:i*60+a}}catch{}return{day:n.getDay(),minute:n.getHours()*60+n.getMinutes()}}function sZ(e,t){if(e===void 0)return!0;let{day:n,minute:r}=oZ(t,e.timezone),i=(n+6)%7,a=!1;for(let t of e.windows)if(t.startMinute<=t.endMinute){if(t.days.includes(n)&&r>=t.startMinute&&r<t.endMinute){a=!0;break}}else if(t.days.includes(n)&&r>=t.startMinute||t.days.includes(i)&&r<t.endMinute){a=!0;break}return e.invert===!0?!a:a}var cZ=`armed_`,lZ=`alarm-panel`,uZ=`trigger`,dZ=[`contact`,`cover`,`lock`,`switch`],fZ=[`cover`,`lock-control`,`switch`];function pZ(e){return fZ.includes(e)}function mZ(e,t){if(e.kind===`do`){let t=e.action;return t.kind===`cap`&&t.cap===lZ&&t.method===uZ}let n=t?.(e.sequenceId);return n===void 0?!1:n.some(e=>e.kind===`cap`&&e.cap===lZ&&e.method===uZ)}function hZ(e){return(e.conditions.deviceState?.states??[]).some(e=>e.trim().toLowerCase().startsWith(cZ))}function gZ(e){if(hZ(e))return!0;for(let t of e.actions?.onTrigger??[])if(mZ(t,e.sequenceActionsOf))return!0;return!1}function _Z(e){return hZ(e)}function vZ(e){let t=e.trim().toLowerCase();return dZ.some(e=>e===t)}var yZ=`This rule belongs to the alarm, and an alarm rule fires only when an opening OPENS. Set to “only when it clears”, it can never fire.`;function bZ(e){if(e.conditions.sensorTransition!==`cleared`)return!1;let t=e.conditions.sensorKinds??[];return t.length===0||!t.every(vZ)?!1:gZ(e)}function xZ(e){return e.controllable?e.blocking.includes(e.deviceId):!e.nonBlocking.includes(e.deviceId)}function SZ(e){return e.controllable?!e.secureOnArmOff.includes(e.deviceId):!1}function CZ(e){if(!pZ(e))return null;switch(e){case`cover`:return{cap:e,method:`close`,args:{}};case`lock-control`:return{cap:e,method:`lock`,args:{}};case`switch`:return{cap:e,method:`setState`,args:{on:!1}}}}var wZ=[`exitDelaySec`,`entryDelaySec`,`triggeredDurationSec`],TZ=[`notifyDuringEntryDelay`,`notifySensorRewatched`,`notifySensorIgnored`];function EZ(e,t){let n=(e.modeDelays??[]).find(e=>e.mode===t);return{notifyDuringEntryDelay:n?.notifyDuringEntryDelay===!0,notifySensorRewatched:n?.notifySensorRewatched===!0,notifySensorIgnored:n?.notifySensorIgnored===!0}}function DZ(e,t){return e===void 0?t>0?`rearmAfter`:`doNothing`:e}function OZ(e,t){return e===void 0?{value:t,source:`default`}:{value:e,source:`mode`}}function kZ(e,t){let n=(e.modeDelays??[]).find(e=>e.mode===t),r=OZ(n?.exitDelaySec,e.exitDelaySec),i=OZ(n?.entryDelaySec,e.entryDelaySec),a=OZ(n?.triggeredDurationSec,e.triggeredDurationSec),o=n?.postTriggeredAction,s=o===void 0?`default`:`mode`,c=DZ(o??e.postTriggeredAction,a.value);return{exitDelaySec:r.value,entryDelaySec:i.value,triggeredDurationSec:a.value,postTriggeredAction:c,source:{exitDelaySec:r.source,entryDelaySec:i.source,triggeredDurationSec:a.source,postTriggeredAction:s}}}function AZ(e,t){return t===void 0?e:t===null?void 0:t}function jZ(e,t){return t===void 0?e:t===null?void 0:t}function MZ(e,t){return t===void 0?e:t===null?void 0:t}function NZ(e,t){return t===void 0?e:t===null?void 0:t}function PZ(e,t){if(e===void 0&&t===void 0)return!0;if(e===void 0||t===void 0||e.invert!==t.invert||e.timezone!==t.timezone||e.windows.length!==t.windows.length)return!1;for(let n=0;n<e.windows.length;n++){let r=e.windows[n],i=t.windows[n];if(r===void 0||i===void 0||r.startMinute!==i.startMinute||r.endMinute!==i.endMinute||r.days.length!==i.days.length)return!1;for(let e=0;e<r.days.length;e++)if(r.days[e]!==i.days[e])return!1}return!0}function FZ(e,t){let n=e.map(e=>({...e}));for(let e of t){let t=n.findIndex(t=>t.mode===e.mode),r=t>=0?n[t]??{mode:e.mode}:{mode:e.mode},i={mode:e.mode},a=AZ(r.exitDelaySec,e.exitDelaySec),o=AZ(r.entryDelaySec,e.entryDelaySec),s=AZ(r.triggeredDurationSec,e.triggeredDurationSec),c=jZ(r.postTriggeredAction,e.postTriggeredAction),l=NZ(r.schedule,e.schedule),u=MZ(r.notifyDuringEntryDelay,e.notifyDuringEntryDelay),d=MZ(r.notifySensorRewatched,e.notifySensorRewatched),f=MZ(r.notifySensorIgnored,e.notifySensorIgnored);a!==void 0&&(i.exitDelaySec=a),o!==void 0&&(i.entryDelaySec=o),s!==void 0&&(i.triggeredDurationSec=s),c!==void 0&&(i.postTriggeredAction=c),l!==void 0&&(i.schedule=l),u!==void 0&&(i.notifyDuringEntryDelay=u),d!==void 0&&(i.notifySensorRewatched=d),f!==void 0&&(i.notifySensorIgnored=f),t>=0?n[t]=i:n.push(i)}return n.filter(e=>e.exitDelaySec!==void 0||e.entryDelaySec!==void 0||e.triggeredDurationSec!==void 0||e.postTriggeredAction!==void 0||e.schedule!==void 0||e.notifyDuringEntryDelay!==void 0||e.notifySensorRewatched!==void 0||e.notifySensorIgnored!==void 0)}function IZ(e,t){let n=e.map(e=>({mode:e.mode,deviceIds:[...e.deviceIds]})),r=n.findIndex(e=>e.mode===t.mode),i=r>=0?n[r]?.deviceIds??[]:[],a=i.includes(t.deviceId);if(t.present===a)return{kind:`applied`,lists:n,changed:!1};if(t.present){if(i.length>=200)return{kind:`refused`,reason:`list-full`,mode:t.mode,max:200};let e={mode:t.mode,deviceIds:[...i,t.deviceId]};r>=0?n[r]=e:n.push(e)}else{let e={mode:t.mode,deviceIds:i.filter(e=>e!==t.deviceId)};r>=0&&(n[r]=e)}return{kind:`applied`,lists:n.filter(e=>e.deviceIds.length>0),changed:!0}}function LZ(e,t){return IZ(e,{mode:t.mode,deviceId:t.deviceId,present:t.nonBlocking})}function RZ(e,t){return IZ(e,{mode:t.mode,deviceId:t.deviceId,present:t.blocking})}function zZ(e,t){return IZ(e,{mode:t.mode,deviceId:t.deviceId,present:!t.secureOnArm})}function BZ(e,t){let n=new Set(e),r=new Set(t);return n.size===r.size&&[...n].every(e=>r.has(e))}function VZ(e){let t=new Map;for(let n of e)n.deviceIds.length>0&&t.set(n.mode,new Set(n.deviceIds));return t}function HZ(e,t){let n=VZ(e),r=VZ(t);if(n.size!==r.size)return!1;for(let[e,t]of n){let n=r.get(e);if(n===void 0||!BZ([...t],[...n]))return!1}return!0}function UZ(e,t){if(e!==void 0)switch(t){case`exitDelaySec`:return e.exitDelaySec;case`entryDelaySec`:return e.entryDelaySec;case`triggeredDurationSec`:return e.triggeredDurationSec}}function WZ(e,t){switch(t){case`exitDelaySec`:return e.exitDelaySec;case`entryDelaySec`:return e.entryDelaySec;case`triggeredDurationSec`:return e.triggeredDurationSec}}function GZ(e,t,n){return e?.find(e=>e.mode===t)?.deviceIds.includes(n)??!1}function KZ(e,t){if(e.exitDelaySec!==void 0&&e.exitDelaySec!==t.exitDelaySec||e.entryDelaySec!==void 0&&e.entryDelaySec!==t.entryDelaySec||e.triggeredDurationSec!==void 0&&e.triggeredDurationSec!==t.triggeredDurationSec||e.postTriggeredAction!==void 0&&e.postTriggeredAction!==DZ(t.postTriggeredAction,t.triggeredDurationSec)||e.announceTargets!==void 0&&!BZ(e.announceTargets,t.announceTargets)||e.nonBlocking!==void 0&&!HZ(e.nonBlocking,t.nonBlocking??[])||e.blocking!==void 0&&!HZ(e.blocking,t.blocking??[])||e.secureOnArmOff!==void 0&&!HZ(e.secureOnArmOff,t.secureOnArmOff??[]))return!1;for(let n of e.modeDelays??[]){let e=(t.modeDelays??[]).find(e=>e.mode===n.mode);for(let t of wZ){let r=WZ(n,t);if(r===void 0)continue;let i=UZ(e,t);if(r===null?i!==void 0:i!==r)return!1}if(n.postTriggeredAction!==void 0){let t=e?.postTriggeredAction;if(n.postTriggeredAction===null?t!==void 0:t!==n.postTriggeredAction)return!1}for(let t of TZ){let r=n[t];if(r===void 0)continue;let i=e?.[t];if(r===null?i!==void 0:i!==r)return!1}if(n.schedule!==void 0){let t=e?.schedule;if(n.schedule===null?t!==void 0:!PZ(t,n.schedule))return!1}}if(e.nonBlockingEdit!==void 0){let n=e.nonBlockingEdit;if(GZ(t.nonBlocking,n.mode,n.deviceId)!==n.nonBlocking)return!1}if(e.blockingEdit!==void 0){let n=e.blockingEdit;if(GZ(t.blocking,n.mode,n.deviceId)!==n.blocking)return!1}if(e.secureOnArmEdit!==void 0){let n=e.secureOnArmEdit;if(GZ(t.secureOnArmOff,n.mode,n.deviceId)===n.secureOnArm)return!1}return!0}var qZ=`default`,JZ=`Default`,YZ={exitDelaySec:30,entryDelaySec:20,triggeredDurationSec:10,postTriggeredAction:`rearmAfter`};function XZ(){return{...YZ,announceTargets:[],nonBlocking:[],blocking:[],secureOnArmOff:[],modeDelays:[]}}function ZZ(e){return e===qZ}function QZ(e){return{exitDelaySec:e.exitDelaySec,entryDelaySec:e.entryDelaySec,triggeredDurationSec:e.triggeredDurationSec,...e.postTriggeredAction===void 0?{}:{postTriggeredAction:e.postTriggeredAction},...e.announceArm===void 0?{}:{announceArm:e.announceArm},announceTargets:[...e.announceTargets],nonBlocking:e.nonBlocking.map(e=>({mode:e.mode,deviceIds:[...e.deviceIds]})),blocking:e.blocking.map(e=>({mode:e.mode,deviceIds:[...e.deviceIds]})),secureOnArmOff:e.secureOnArmOff.map(e=>({mode:e.mode,deviceIds:[...e.deviceIds]})),modeDelays:e.modeDelays.map(e=>({mode:e.mode,...e.exitDelaySec===void 0?{}:{exitDelaySec:e.exitDelaySec},...e.entryDelaySec===void 0?{}:{entryDelaySec:e.entryDelaySec},...e.triggeredDurationSec===void 0?{}:{triggeredDurationSec:e.triggeredDurationSec},...e.postTriggeredAction===void 0?{}:{postTriggeredAction:e.postTriggeredAction},...e.schedule===void 0?{}:{schedule:{windows:e.schedule.windows.map(e=>({days:[...e.days],startMinute:e.startMinute,endMinute:e.endMinute})),...e.schedule.timezone===void 0?{}:{timezone:e.schedule.timezone},...e.schedule.invert===!0?{invert:!0}:{}}}}))}}function $Z(e,t){return e!=null&&e.profiles.length>0?e.profiles.some(e=>e.id==="default")?e.profiles.some(t=>t.id===e.activeId)?e:{activeId:qZ,profiles:e.profiles}:{activeId:e.activeId,profiles:[{id:qZ,name:JZ,settings:QZ(t)},...e.profiles]}:{activeId:qZ,profiles:[{id:qZ,name:JZ,settings:QZ(t)}]}}function eQ(e){return e.trim()}function tQ(e,t,n){let r=t.toLowerCase();return e.profiles.some(e=>e.id!==n&&e.name.trim().toLowerCase()===r)}function nQ(e,t){let n=eQ(t.name);if(n.length===0)return{kind:`refused`,reason:`name-empty`};if(tQ(e,n))return{kind:`refused`,reason:`name-taken`,detail:n};if(ZZ(t.id))return{kind:`refused`,reason:`cannot-rename-default-id`};let r;if(t.source.kind===`defaults`)r=XZ();else{let n=t.source.fromId,i=e.profiles.find(e=>e.id===n);if(i===void 0)return{kind:`refused`,reason:`clone-source-missing`,detail:n};r=QZ(i.settings)}return{kind:`ok`,state:{activeId:e.activeId,profiles:[...e.profiles,{id:t.id,name:n,settings:r}]}}}function rQ(e,t){let n=eQ(t.name);if(n.length===0)return{kind:`refused`,reason:`name-empty`};let r=e.profiles.findIndex(e=>e.id===t.id);if(r<0)return{kind:`refused`,reason:`not-found`,detail:t.id};if(tQ(e,n,t.id))return{kind:`refused`,reason:`name-taken`,detail:n};let i=e.profiles.map((e,t)=>t===r?{...e,name:n}:e);return{kind:`ok`,state:{activeId:e.activeId,profiles:i}}}function iQ(e,t){if(ZZ(t))return{kind:`refused`,reason:`cannot-delete-default`};if(!e.profiles.some(e=>e.id===t))return{kind:`refused`,reason:`not-found`,detail:t};let n=e.profiles.filter(e=>e.id!==t);return{kind:`ok`,state:{activeId:e.activeId===t?qZ:e.activeId,profiles:n}}}function aQ(e,t){return e.profiles.some(e=>e.id===t)?{kind:`ok`,state:{activeId:t,profiles:e.profiles}}:{kind:`refused`,reason:`not-found`,detail:t}}function oQ(e,t){return{activeId:e.activeId,profiles:e.profiles.map(n=>n.id===e.activeId?{...n,settings:QZ(t)}:n)}}function sQ(e,t){return e.profiles.find(e=>e.id===t)}var cQ=Object.freeze(Object.fromEntries(Object.entries(JM).flatMap(([e,t])=>{let n=ql[e];return n===void 0||t.category!==`sensor`?[]:[[t.kind,n]]}))),lQ=Object.freeze(Object.keys(cQ));function uQ(e){return e.trim().toLowerCase()}function dQ(e,t){if(t===null)return;let n=cQ[uQ(e)];if(n===void 0)return;let r=Object.entries(t).find(([e])=>e===n)?.[1];return typeof r==`boolean`?r:void 0}function fQ(e){return e===void 0||e.length===0?!1:e.every(e=>lQ.includes(uQ(e)))}var pQ=`Only a sensor that raises and clears (water, smoke, gas, CO, vibration, tamper, motion, contact) can fire on one edge. Pick only such sensor kinds, or the rule fires on every change.`,mQ=[`body`],Q=[`title`,`body`],hQ=[`device-battery-low`,`device-battery-normal`],gQ=[`device-consumable-low`,`device-consumable-normal`],_Q=[`device-tank-low`,`device-tank-full`,`device-tank-normal`],vQ=[`addon-update-available`,`server-update-available`,`wrapper-update-available`],yQ=[`addon-update-available`,`server-update-available`],bQ=[`alarm-triggered`,`alarm-armed`,`alarm-disarmed`,`alarm-arming`,`alarm-arm-refused`,`alarm-pending`,`alarm-rearmed`,`alarm-sensor-bypass`,`alarm-check-failed`],xQ=[`alarm-triggered`],SQ=[`device-online`,`device-offline`,`device-disabled`,`device-enabled`,...hQ,...gQ,..._Q,`stream-online`,`stream-offline`,`detection-blind`,...bQ],CQ=[...pX(`device-events`),...pX(`system`)],wQ=[{name:`summaryDevices`,label:`Summary: devices offline / switched off`,example:`Garage — offline since 07:12`,kinds:[`device-offline`,`device-online`,`device-disabled`,`device-enabled`]},{name:`summaryStreams`,label:`Summary: streams offline`,example:`Ingresso (high) — since 06:40`,kinds:[`stream-offline`,`stream-online`]},{name:`summaryBattery`,label:`Summary: low batteries`,example:`Sensore porta — 8 %`,kinds:hQ},{name:`summaryConsumables`,label:`Summary: consumables`,example:`Robot — filter 10 %`,kinds:gQ},{name:`summaryTanks`,label:`Summary: tanks`,example:`Robot — clean water low`,kinds:_Q},{name:`summaryDetection`,label:`Summary: cameras detecting nothing`,example:`Ingresso — since 05:10`,kinds:[`detection-blind`]},{name:`summaryNodes`,label:`Summary: nodes`,example:`little-unraid — offline since 03:00`,kinds:[`node-offline`,`node-online`,`node-restarting`,`node-inference-unavailable`]},{name:`summaryAddons`,label:`Summary: addons stopped`,example:`hub — recorder stopped after repeated crashes`,kinds:[`addon-crash-loop`]},{name:`summaryAddonUpdates`,label:`Summary: addon updates`,example:`hub:
|
|
357
|
+
• @camstack/addon-recorder 1.2.3 → 1.2.4`,kinds:[`addon-update-available`,`addon-updated`]},{name:`summaryUpdates`,label:`Summary: server & container updates`,example:`server 1.2.377 → 1.2.378`,kinds:[`server-update-available`,`node-updating`,`server-updated`,`wrapper-update-available`]}],TQ=[{name:`summaryText`,label:`Summary: every section`,description:`One block per section with something to report, one line per item.`,example:`Batterie scariche: Sensore porta — 8 %`,group:`system`,families:[`rule`],fields:[...Q],kinds:[`system`],systemEventKinds:[...CQ],systemEventDeliveries:[`summary`]},{name:`summaryCount`,label:`Summary: items reported`,example:`3`,group:`system`,families:[`rule`],fields:[...Q],kinds:[`system`],systemEventKinds:[...CQ],systemEventDeliveries:[`summary`]},{name:`summarySection`,label:`Summary: this section`,description:`The section a per-section summary row is about; on a summary sent as one message, every section it reports, comma-separated.`,example:`Batterie scariche`,group:`system`,families:[`rule`],fields:[...Q],kinds:[`system`],systemEventKinds:[...CQ],systemEventDeliveries:[`summary`]},...wQ.map(e=>({name:e.name,label:e.label,example:e.example,group:`system`,families:[`rule`],fields:[...Q],kinds:[`system`],systemEventKinds:[...e.kinds],systemEventDeliveries:[`summary`]}))],EQ=[{name:`camera`,label:`Camera`,example:`Ingresso`,group:`subject`,families:[`rule`,`timelapse`],systemEventKinds:[...SQ,`export-completed`]},{name:`class`,label:`Detected class`,description:`The wire class id (e.g. "person", "cat"); the counted class on an occupancy row.`,example:`person`,group:`subject`,families:[`rule`],fields:[...Q],kinds:[`detection`,`sensor`,`sound`,`occupancy`,`system`],systemEventKinds:[...xQ]},{name:`classLabel`,label:`Detected class (translated)`,description:`Human label of {{class}} in the notification language (EVENT_KIND_LABELS); falls back to the raw id.`,example:`Persona`,group:`subject`,families:[`rule`],fields:[...Q],kinds:[`detection`,`sensor`,`sound`,`occupancy`,`system`],systemEventKinds:[...xQ]},{name:`label`,label:`Name or plate`,description:`Recognised person or read plate; empty otherwise.`,example:`Mario`,group:`subject`,families:[`rule`],fields:[...Q],kinds:[`detection`,`system`],systemEventKinds:[...xQ]},{name:`subject`,label:`Subject sentence`,description:`Composed in the notification language, e.g. "person (Mario)".`,example:`persona (Mario)`,group:`subject`,families:[`rule`],fields:[...Q],kinds:[`detection`,`sensor`,`sound`,`occupancy`]},{name:`confidence`,label:`Confidence`,example:`87%`,group:`subject`,families:[`rule`],fields:[...Q],kinds:[`detection`,`system`],systemEventKinds:[...xQ]},{name:`count`,label:`Count`,description:`Occupancy count, subjects in a grouped notification, or the event count of a system notice.`,example:`3`,group:`subject`,families:[`rule`],fields:[...Q],kinds:[`detection`,`occupancy`,`system`],systemEventKinds:[`addon-crash-loop`,...yQ,`addon-updated`]},{name:`detectionSummary`,label:`Detection summary`,description:`Class composition, e.g. "2 persons and 1 car".`,example:`2 persone e 1 auto`,group:`subject`,families:[`rule`,`timelapse`,`summary`],fields:[...Q],kinds:[`detection`]},{name:`zones`,label:`Zones`,example:`Cancello, Vialetto`,group:`place`,families:[`rule`],fields:[...Q],kinds:[`detection`,`system`],systemEventKinds:[...xQ]},{name:`zone`,label:`Zone`,example:`Cancello`,group:`place`,families:[`rule`],fields:[...Q],kinds:[`detection`,`occupancy`,`system`],systemEventKinds:[...xQ]},{name:`inZones`,label:`"in <zones>" fragment`,description:`Leading space included; empty when no zone.`,example:` in Cancello`,group:`place`,families:[`rule`],fields:[...Q],kinds:[`detection`,`system`],systemEventKinds:[...xQ]},{name:`scope`,label:`Occupancy scope`,example:`Cancello`,group:`place`,families:[`rule`],fields:[...Q],kinds:[`occupancy`]},{name:`time`,label:`Time`,description:`Hours and minutes, in the notification language.`,example:`20:05`,group:`time`,families:[`rule`,`timelapse`,`summary`],fields:[...Q]},{name:`rule`,label:`Rule name`,example:`Ingresso notte`,group:`rule`,families:[`rule`,`timelapse`,`summary`]},{name:`from`,label:`Window start`,example:`07:00`,group:`time`,families:[`timelapse`,`summary`]},{name:`to`,label:`Window end`,example:`08:00`,group:`time`,families:[`timelapse`,`summary`]},{name:`capacity`,label:`Capacity`,example:`2`,group:`occupancy`,families:[`rule`],fields:[...Q],kinds:[`occupancy`]},{name:`op`,label:`Occupied / free`,example:`occupata`,group:`occupancy`,families:[`rule`],fields:[...Q],kinds:[`occupancy`]},{name:`sounds`,label:`Sounds heard`,example:`abbaio, clacson`,group:`sound`,families:[`rule`],fields:[...Q],kinds:[`sound`]},{name:`hitPercent`,label:`Share of the window`,description:`Level mode only: percentage of samples above the threshold.`,example:`42`,group:`sound`,families:[`rule`],fields:[...Q],kinds:[`sound`]},{name:`db`,label:`Peak level (dBFS)`,example:`-18`,group:`sound`,families:[`rule`],fields:[...Q],kinds:[`sound`]},{name:`eventType`,label:`Event type`,description:`Raw device event token, e.g. "press" or "open"; empty when the device sends none.`,example:`press`,group:`sensor`,families:[`rule`],fields:[...Q],kinds:[`sensor`]},{name:`ai`,label:`AI sentence`,description:`Where the AI description goes; appended on its own line when absent.`,example:`Una persona lascia un pacco.`,group:`ai`,families:[`rule`,`summary`],fields:[...mQ],kinds:[`detection`,`occupancy`]},{name:`eventKind`,label:`Event kind`,example:`device-offline`,group:`system`,families:[`rule`],fields:[...Q],kinds:[`system`],systemEventDeliveries:[`instant`]},{name:`deviceName`,label:`Device`,example:`Ingresso`,group:`system`,families:[`rule`],fields:[...Q],kinds:[`system`],systemEventKinds:[...SQ]},{name:`locations`,label:`Intrusion locations`,example:`Ingresso, Corridoio, Salone`,group:`system`,families:[`rule`],fields:[...Q],kinds:[`system`],systemEventKinds:[...xQ]},{name:`deviceId`,label:`Device id`,example:`617`,group:`system`,families:[`rule`],fields:[...Q],kinds:[`system`],systemEventKinds:[...SQ,`export-completed`]},{name:`percentage`,label:`Percentage`,example:`15`,group:`system`,families:[`rule`],fields:[...Q],kinds:[`system`],systemEventKinds:[...hQ,...gQ]},{name:`item`,label:`Consumable`,example:`Filtro`,group:`system`,families:[`rule`],fields:[...Q],kinds:[`system`],systemEventKinds:[...gQ]},{name:`tank`,label:`Tank`,description:`Which tank: clean water, dirty water, detergent or dust bin.`,example:`clean water`,group:`system`,families:[`rule`],fields:[...Q],kinds:[`system`],systemEventKinds:[..._Q]},{name:`profile`,label:`Stream profile`,example:`high`,group:`system`,families:[`rule`],fields:[...Q],kinds:[`system`],systemEventKinds:[`stream-online`,`stream-offline`]},{name:`node`,label:`Node`,example:`hub`,group:`system`,families:[`rule`],fields:[...Q],kinds:[`system`],systemEventKinds:[`node-online`,`node-offline`,`node-restarting`,`node-updating`,`node-inference-unavailable`,`addon-crash-loop`,...vQ,`addon-updated`,`server-updated`]},{name:`nodeId`,label:`Node id`,example:`hub`,group:`system`,families:[`rule`],fields:[...Q],kinds:[`system`],systemEventKinds:[`node-online`,`node-offline`,`node-restarting`,`node-updating`,`node-inference-unavailable`,`addon-crash-loop`,...vQ,`server-updated`]},{name:`devices`,label:`Devices`,description:`node-inference-unavailable: the affected cameras, comma-joined. Alarm arm / arming / refusal: HOW MANY devices are armed (or open).`,example:`Ingresso, Garage`,group:`system`,families:[`rule`],fields:[...Q],kinds:[`system`],systemEventKinds:[`node-inference-unavailable`,`alarm-armed`,`alarm-arming`,`alarm-arm-refused`]},{name:`addons`,label:`Addons`,example:`stream-broker`,group:`system`,families:[`rule`],fields:[...Q],kinds:[`system`],systemEventKinds:[`addon-crash-loop`]},{name:`minutes`,label:`Minutes`,example:`12`,group:`system`,families:[`rule`],fields:[...Q],kinds:[`system`],systemEventKinds:[`detection-blind`]},{name:`package`,label:`Package`,example:`@camstack/addon-recorder`,group:`system`,families:[`rule`],fields:[...Q],kinds:[`system`],systemEventKinds:[...vQ,`addon-updated`,`node-updating`,`server-updated`]},{name:`packageName`,label:`Package`,example:`@camstack/addon-recorder`,group:`system`,families:[`rule`],fields:[...Q],kinds:[`system`],systemEventKinds:[...yQ,`node-updating`,`server-updated`]},{name:`nodes`,label:`Nodes`,description:"Comma-joined node ids, when an update spans more than one — the single-node case names it through {{nodeId}} instead. `incomingFromUpdateAvailable` (event-intake.ts) fills `nodes` from ONE shared textParams object for both addon- and server-update-available, exactly like packageName/currentVersion/latestVersion/count — only the shipped TEXT (system.server-update-available.body.onNodes) reads it today, but the var is real on both kinds.",example:`hub, little-unraid`,group:`system`,families:[`rule`],fields:[...Q],kinds:[`system`],systemEventKinds:[...yQ]},{name:`currentVersion`,label:`Current version`,example:`1.2.377`,group:`system`,families:[`rule`],fields:[...Q],kinds:[`system`],systemEventKinds:[...vQ]},{name:`latestVersion`,label:`Latest version`,example:`1.2.378`,group:`system`,families:[`rule`],fields:[...Q],kinds:[`system`],systemEventKinds:[...vQ]},{name:`list`,label:`Updated packages`,description:"One line per package. `incomingFromUpdateAvailable` fills it for addon-/server-update-available too (the SAME shared textParams object as `nodes`) — `system.addon-update-available.body` reads it; `incomingFromAddonUpdates` fills it again, independently, for the completed `addon-updated` event.",example:`recorder, notifiers`,group:`system`,families:[`rule`],fields:[...Q],kinds:[`system`],systemEventKinds:[...yQ,`addon-updated`]},{name:`fromVersion`,label:`From version`,example:`1.2.377`,group:`system`,families:[`rule`],fields:[...Q],kinds:[`system`],systemEventKinds:[`node-updating`,`server-updated`]},{name:`toVersion`,label:`To version`,example:`1.2.378`,group:`system`,families:[`rule`],fields:[...Q],kinds:[`system`],systemEventKinds:[`node-updating`,`server-updated`]},{name:`destinationsOk`,label:`Destinations ok`,example:`2`,group:`system`,families:[`rule`],fields:[...Q],kinds:[`system`],systemEventKinds:[`backup-completed`]},{name:`destinationsTotal`,label:`Destinations`,example:`2`,group:`system`,families:[`rule`],fields:[...Q],kinds:[`system`],systemEventKinds:[`backup-completed`]},{name:`destinationsFailed`,label:`Destinations failed`,example:`0`,group:`system`,families:[`rule`],fields:[...Q],kinds:[`system`],systemEventKinds:[`backup-completed`]},{name:`sizeMB`,label:`Size (MB)`,example:`412`,group:`system`,families:[`rule`],fields:[...Q],kinds:[`system`],systemEventKinds:[`backup-completed`]},{name:`backupId`,label:`Backup id`,example:`bk-20260924`,group:`system`,families:[`rule`],fields:[...Q],kinds:[`system`],systemEventKinds:[`backup-completed`]},{name:`title`,label:`Export title`,example:`Ingresso 08:00`,group:`system`,families:[`rule`],fields:[...Q],kinds:[`system`],systemEventKinds:[`export-completed`]},{name:`exportId`,label:`Export id`,example:`exp-20260924`,group:`system`,families:[`rule`],fields:[...Q],kinds:[`system`],systemEventKinds:[`export-completed`]},{name:`bytes`,label:`Export size (bytes)`,example:`10485760`,group:`system`,families:[`rule`],fields:[...Q],kinds:[`system`],systemEventKinds:[`export-completed`]},{name:`mode`,label:`Alarm mode`,example:`away`,group:`system`,families:[`rule`],fields:[...Q],kinds:[`system`],systemEventKinds:[`alarm-armed`,`alarm-arming`,`alarm-arm-refused`,`alarm-pending`,`alarm-rearmed`,`alarm-check-failed`]},{name:`seconds`,label:`Seconds`,description:`Arming: the exit delay left. Pending: the entry delay left to disarm.`,example:`30`,group:`system`,families:[`rule`],fields:[...Q],kinds:[`system`],systemEventKinds:[`alarm-arming`,`alarm-pending`]},{name:`rules`,label:`Covering rules`,description:`How many enabled rules the armed / arming mode gates.`,example:`2`,group:`system`,families:[`rule`],fields:[...Q],kinds:[`system`],systemEventKinds:[`alarm-armed`,`alarm-arming`]},{name:`names`,label:`Device names`,description:`Armed / arming: the Active devices (or every skipped name when none are Active). Refusal: the open sensors.`,example:`Ingresso, Garage`,group:`system`,families:[`rule`],fields:[...Q],kinds:[`system`],systemEventKinds:[`alarm-armed`,`alarm-arming`,`alarm-arm-refused`]},{name:`skippedNames`,label:`Skipped devices`,description:`Devices the mode names but cannot arm (muted, detection off, offline).`,example:`Garage`,group:`system`,families:[`rule`],fields:[...Q],kinds:[`system`],systemEventKinds:[`alarm-armed`,`alarm-arming`]},{name:`active`,label:`Active count`,description:`How many named devices the armed / arming mode is watching (title: n attivi / n active).`,example:`3`,group:`system`,families:[`rule`],fields:[...Q],kinds:[`system`],systemEventKinds:[`alarm-armed`,`alarm-arming`]},{name:`skipped`,label:`Skipped count`,description:`How many named devices the mode cannot arm — muted, detection off, offline (title: m saltati).`,example:`1`,group:`system`,families:[`rule`],fields:[...Q],kinds:[`system`],systemEventKinds:[`alarm-armed`,`alarm-arming`]},{name:`bypassedNames`,label:`Bypassed sensors`,description:`Sensors the operator armed around because they were open.`,example:`Finestra veranda`,group:`system`,families:[`rule`],fields:[...Q],kinds:[`system`],systemEventKinds:[`alarm-armed`,`alarm-arming`]},{name:`coverage`,label:`Coverage %`,example:`96`,group:`digest`,families:[`timelapse`],fields:[...Q]},{name:`events`,label:`Events`,example:`4`,group:`digest`,families:[`timelapse`,`summary`],fields:[...Q]},{name:`detections`,label:`Detections`,example:`7`,group:`digest`,families:[`timelapse`,`summary`],fields:[...Q]},{name:`count_person`,label:`Count of one class`,description:`count_<class>, e.g. count_person, count_car.`,example:`3`,group:`digest`,families:[`timelapse`,`summary`],fields:[...Q],dynamic:{prefix:`count_`,from:`classes`}},{name:`cameras`,label:`Cameras`,example:`3`,group:`digest`,families:[`summary`],fields:[...Q]},{name:`matched`,label:`Matched events`,example:`12`,group:`digest`,families:[`summary`],fields:[...Q]},{name:`shown`,label:`Events shown`,example:`9`,group:`digest`,families:[`summary`],fields:[...Q]},{name:`total`,label:`Events total`,example:`12`,group:`digest`,families:[`summary`],fields:[...Q]},...TQ],DQ=[`device-tank-low`,`device-tank-full`,`device-tank-normal`,`node-restarting`,`node-updating`];function OQ(){return EQ.filter(e=>!kQ(e)).map(e=>e.systemEventKinds===void 0?e:{...e,systemEventKinds:e.systemEventKinds.filter(e=>!DQ.includes(e))})}function kQ(e){return e.systemEventDeliveries!==void 0&&!e.systemEventDeliveries.includes(`instant`)}function AQ(e,t){if(!yX(t.kind))return!0;let n=t.systemEventDelivery??`instant`;return(e.systemEventDeliveries??(e.systemEventKinds===void 0?[n]:[`instant`])).includes(n)}var jQ={previewText:[`camera`,`rule`,`from`,`to`],captionText:[`rule`,`from`,`to`]};function MQ(e,t){return e===void 0||t===void 0||e.includes(t)}function NQ(e,t){return e===void 0||t===void 0||e.some(e=>e===t)?!0:yX(t)&&e.includes(`system`)}function PQ(e,t){if(!yX(t.kind)||e.systemEventKinds===void 0)return!0;let n=e.systemEventKinds,r=t.systemEventKinds??[];if(r.length>0)return r.some(e=>n.includes(e));let i=t.kind===void 0?void 0:bX(t.kind);if(i===void 0)return!0;let a=pX(i);return n.some(e=>a.includes(e))}function FQ(e){if(e.field===`previewText`||e.field===`captionText`){let t=jQ[e.field];return EQ.filter(n=>n.families.includes(e.family)&&t.includes(n.name)&&n.dynamic===void 0)}return EQ.filter(t=>t.families.includes(e.family)&&MQ(t.fields,e.field)&&NQ(t.kinds,e.kind)&&MQ(t.deliveries,e.delivery)&&PQ(t,e)&&AQ(t,e))}function IQ(e,t){return FQ(t).some(t=>t.dynamic===void 0?t.name===e:e.startsWith(t.dynamic.prefix)&&e.length>t.dynamic.prefix.length)}var LQ=[`device-events`,`system`];function RQ(e){if(!NX(e.delivery))return null;let t=e.systemEventDelivery;return t?.mode===`summary`?t.schedule:null}function zQ(e){let t=e.systemEventDelivery;return t?.mode===`summary`?t.split??`rule`:`rule`}function BQ(e){return RQ(e)!==null}function VQ(e){return e===void 0?!1:(e.onActivation?.length??0)>0||(e.onDeactivation?.length??0)>0||(e.onTrigger?.length??0)>0||(e.onTriggerOff?.length??0)>0||(e.buttons?.length??0)>0}function HQ(e){if(e.systemEventDelivery?.mode!==`summary`)return[];if(!NX(e.delivery))return[{code:`not-a-system-rule`,delivery:e.delivery}];let t=[],n=hX(e.conditions.systemEvent?.kinds??[]),r=n.kind===`family`?n.family:`mixed`;(r===`mixed`||!LQ.includes(r))&&t.push({code:`family-not-summarisable`,family:r});let i=e.systemEventDelivery.schedule.windows;return i.length===0&&t.push({code:`empty-schedule`}),i.forEach((e,n)=>{(e.days.length===0||e.startMinute===e.endMinute)&&t.push({code:`degenerate-window`,index:n})}),e.schedule!==void 0&&t.push({code:`schedule-beside-summary`}),VQ(e.actions)&&t.push({code:`actions-beside-summary`}),t}function UQ(e){switch(e.code){case`not-a-system-rule`:return`a '${e.delivery}' rule has no summary delivery — only device-events and system rules do`;case`family-not-summarisable`:return e.family===`alarm`?`an alarm rule cannot be a scheduled summary — the alarm stays instant`:`a ${e.family} rule cannot be a scheduled summary — only device-events and system rules`;case`degenerate-window`:return`send time ${String(e.index+1)} has no day, or starts and ends on the same minute — it never closes, so nothing would be sent`;case`empty-schedule`:return`a summary rule needs at least one send time — its schedule has no window`;case`schedule-beside-summary`:return`a summary rule is sent on its summary schedule — remove the active-hours schedule`;case`actions-beside-summary`:return`a summary rule never matches an event, so its actions would never run — remove them`}}var WQ=1440;function GQ(e,t){return{windows:e.map(e=>{let t=(e.minute+WQ-1)%WQ;return{days:(e.minute===0?e.days.map(e=>(e+6)%7):[...e.days]).toSorted((e,t)=>e-t),startMinute:t,endMinute:e.minute}}),...t===void 0?{}:{timezone:t}}}function KQ(e){if(e.invert===!0)return null;let t=[];for(let n of e.windows){if((n.endMinute-n.startMinute+WQ)%WQ!==1)return null;let e=n.endMinute===0?n.days.map(e=>(e+1)%7):n.days;t.push({days:e.toSorted((e,t)=>e-t),minute:n.endMinute})}return t}function qQ(e){let t=KQ(e);if(t!==null)return{times:t,approximated:!1};if(e.invert===!0)return null;let n=[];for(let t of e.windows){let e=t.endMinute===0?t.days.map(e=>(e+1)%7):t.days;n.push({days:e.toSorted((e,t)=>e-t),minute:t.endMinute})}return{times:n,approximated:n.length>0}}var JQ=/\{\{\s*summary(?:Text|Devices|Streams|Battery|Consumables|Tanks|Detection|Nodes|Addons|AddonUpdates|Updates)\s*\}\}/;function YQ(e){return e===void 0||e.trim().length===0?!0:JQ.test(e)}function XQ(e){return e.map(e=>({id:e.id,name:e.name,type:e.isHub?`hub`:`agent`,location:e.isOnline?`online`:`offline`,...e.name===e.id?{}:{detail:e.id}}))}var ZQ=`@camstack/server`,QQ=[ZQ,`@camstack/system`,`camstack-wrapper`],$Q={"@camstack/server":`server`,"@camstack/system":`framework`,"camstack-wrapper":`wrapper`};function e$(e){return QQ.some(t=>t===e)}function t$(e){let t=new Map(e.map(e=>[e.name,e.version])),n=QQ.map(e=>{let n=t.get(e);return{id:e,name:e,type:$Q[e],location:null,...n===void 0?{}:{detail:n}}}),r=e.filter(e=>!e$(e.name)).map(e=>({id:e.name,name:e.name,type:`addon`,location:null,detail:e.version})).sort((e,t)=>e.name.localeCompare(t.name));return[...n,...r]}var n$=`disarmed.armed_home.armed_away.armed_night.armed_vacation.armed_custom_bypass.arming.disarming.pending.triggered.open.opening.closing.closed.stopped.locked.unlocked.locking.unlocking.jammed.on.off.home.not_home.matched.diverged.unknown.latched.live`.split(`.`),r$={disarmed:{en:`Disarmed`,it:`Disinserito`},armed_home:{en:`Armed (home)`,it:`Inserito (in casa)`},armed_away:{en:`Armed (away)`,it:`Inserito (fuori casa)`},armed_night:{en:`Armed (night)`,it:`Inserito (notte)`},armed_vacation:{en:`Armed (vacation)`,it:`Inserito (vacanza)`},armed_custom_bypass:{en:`Armed (custom)`,it:`Inserito (personalizzato)`},arming:{en:`Arming`,it:`In inserimento`},disarming:{en:`Disarming`,it:`In disinserimento`},pending:{en:`Pending (entry delay)`,it:`In attesa (ritardo ingresso)`},triggered:{en:`Triggered`,it:`In allarme`},open:{en:`Open`,it:`Aperto`},opening:{en:`Opening`,it:`In apertura`},closing:{en:`Closing`,it:`In chiusura`},closed:{en:`Closed`,it:`Chiuso`},stopped:{en:`Stopped`,it:`Fermo`},locked:{en:`Locked`,it:`Bloccata`},unlocked:{en:`Unlocked`,it:`Sbloccata`},locking:{en:`Locking`,it:`In blocco`},unlocking:{en:`Unlocking`,it:`In sblocco`},jammed:{en:`Jammed`,it:`Inceppata`},on:{en:`On`,it:`Acceso`},off:{en:`Off`,it:`Spento`},home:{en:`Home`,it:`In casa`},not_home:{en:`Away`,it:`Fuori casa`},matched:{en:`Matched (as captured)`,it:`Corrisponde (come acquisita)`},diverged:{en:`Diverged (changed)`,it:`Diversa (cambiata)`},unknown:{en:`Cannot judge`,it:`Non valutabile`},latched:{en:`Latched`,it:`Memorizzato`},live:{en:`Live`,it:`In tempo reale`}},i$=new Set(n$);function a$(e){return i$.has(e)}function o$(e,t){return a$(e)?r$[e][t]:e}var s$=`motion.audio.person.vehicle.animal.package.sensor.control.car.truck.bus.motorcycle.bicycle.airplane.boat.train.bird.cat.dog.horse.sheep.cow.elephant.bear.zebra.giraffe.package-delivered.package-picked-up.contact.motion-sensor.smoke.flood.gas.carbon-monoxide.vibration.tamper.presence.enum-sensor.device-event.lock.cover.switch.siren.button.doorbell.audio-speech.audio-scream.audio-crying.audio-laughter.audio-music.audio-dog.audio-cat.audio-bird.audio-animal.audio-alarm.audio-doorbell.audio-glass_breaking.audio-gunshot.audio-vehicle.audio-siren.audio-fire.audio-water.audio-wind.audio-door.audio-footsteps.audio-crowd.audio-telephone.audio-engine.audio-tools.audio-silence`.split(`.`),c$={motion:{en:`Motion`,it:`Movimento`},audio:{en:`Audio`,it:`Audio`},person:{en:`Person`,it:`Persona`},vehicle:{en:`Vehicle`,it:`Veicolo`},animal:{en:`Animal`,it:`Animale`},package:{en:`Package`,it:`Pacco`},sensor:{en:`Sensor`,it:`Sensore`},control:{en:`Control`,it:`Controllo`},car:{en:`Car`,it:`Auto`},truck:{en:`Truck`,it:`Camion`},bus:{en:`Bus`,it:`Autobus`},motorcycle:{en:`Motorcycle`,it:`Motocicletta`},bicycle:{en:`Bicycle`,it:`Bicicletta`},airplane:{en:`Airplane`,it:`Aereo`},boat:{en:`Boat`,it:`Barca`},train:{en:`Train`,it:`Treno`},bird:{en:`Bird`,it:`Uccello`},cat:{en:`Cat`,it:`Gatto`},dog:{en:`Dog`,it:`Cane`},horse:{en:`Horse`,it:`Cavallo`},sheep:{en:`Sheep`,it:`Pecora`},cow:{en:`Cow`,it:`Mucca`},elephant:{en:`Elephant`,it:`Elefante`},bear:{en:`Bear`,it:`Orso`},zebra:{en:`Zebra`,it:`Zebra`},giraffe:{en:`Giraffe`,it:`Giraffa`},"package-delivered":{en:`Package delivered`,it:`Pacco consegnato`},"package-picked-up":{en:`Package picked up`,it:`Pacco ritirato`},contact:{en:`Contact`,it:`Contatto`},"motion-sensor":{en:`Motion sensor`,it:`Sensore movimento`},smoke:{en:`Smoke`,it:`Fumo`},flood:{en:`Water leak`,it:`Allagamento`},gas:{en:`Gas`,it:`Gas`},"carbon-monoxide":{en:`Carbon monoxide`,it:`Monossido di carbonio`},vibration:{en:`Vibration`,it:`Vibrazione`},tamper:{en:`Tamper`,it:`Manomissione`},presence:{en:`Presence`,it:`Presenza`},"enum-sensor":{en:`Sensor state`,it:`Stato sensore`},"device-event":{en:`Device event`,it:`Evento dispositivo`},lock:{en:`Lock`,it:`Serratura`},cover:{en:`Cover`,it:`Tapparella`},switch:{en:`Switch`,it:`Interruttore`},siren:{en:`Siren`,it:`Sirena`},button:{en:`Button`,it:`Pulsante`},doorbell:{en:`Doorbell`,it:`Campanello`},"audio-speech":{en:`Speech`,it:`Voce`},"audio-scream":{en:`Scream / Shout`,it:`Urlo`},"audio-crying":{en:`Crying / Baby`,it:`Pianto / Neonato`},"audio-laughter":{en:`Laughter`,it:`Risata`},"audio-music":{en:`Music`,it:`Musica`},"audio-dog":{en:`Dog`,it:`Cane`},"audio-cat":{en:`Cat`,it:`Gatto`},"audio-bird":{en:`Bird`,it:`Uccello`},"audio-animal":{en:`Animal (other)`,it:`Animale (altro)`},"audio-alarm":{en:`Alarm / Siren`,it:`Allarme`},"audio-doorbell":{en:`Doorbell / Knock`,it:`Campanello`},"audio-glass_breaking":{en:`Glass Breaking`,it:`Vetro rotto`},"audio-gunshot":{en:`Gunshot / Explosion`,it:`Sparo / Esplosione`},"audio-vehicle":{en:`Vehicle`,it:`Veicolo`},"audio-siren":{en:`Emergency Siren`,it:`Sirena`},"audio-fire":{en:`Fire / Smoke`,it:`Fuoco / Fumo`},"audio-water":{en:`Water`,it:`Acqua`},"audio-wind":{en:`Wind / Weather`,it:`Vento / Maltempo`},"audio-door":{en:`Door`,it:`Porta`},"audio-footsteps":{en:`Footsteps`,it:`Passi`},"audio-crowd":{en:`Crowd / Chatter`,it:`Folla / Chiacchiericcio`},"audio-telephone":{en:`Telephone`,it:`Telefono`},"audio-engine":{en:`Engine / Motor`,it:`Motore`},"audio-tools":{en:`Tools / Construction`,it:`Utensili / Lavori`},"audio-silence":{en:`Silence`,it:`Silenzio`}},l$=new Set(s$);function u$(e){return l$.has(e)}function d$(e,t){let n=e.trim().toLowerCase();return u$(n)?c$[n][t]:e}var f$=f({title:u().max(500).optional(),body:u().max(2e3).optional()}),p$=u().min(1).max(200),m$=C(a()).min(1),h$=a().int().min(2).max(3600),g$=a().int().min(1).max(60),_$=C(Pw).min(1),v$=a().int().min(1).max(5),y$=.1,b$=a().min(y$).max(3600),x$=a().min(0).max(60),S$=u().max(200),C$=S([`image`,`gif`]),w$=C(u().min(1).max(40)).max(20),T$=f({name:p$,enabled:w().default(!0),deviceIds:m$,schedule:fw,cadenceSec:h$.default(15),framerate:g$.default(10),denseCadenceSec:b$.optional(),minDwellSec:x$.optional(),targets:_$,template:f$.optional(),previewText:S$.optional(),previewMode:C$.default(`image`),reportClasses:w$.optional(),priority:v$.default(3)}),E$=`Timelapse {{camera}}`,D$=f({name:p$.optional(),enabled:w().optional(),deviceIds:m$.optional(),schedule:fw.optional(),cadenceSec:h$.optional(),framerate:g$.optional(),denseCadenceSec:b$.optional(),minDwellSec:x$.optional(),targets:_$.optional(),template:f$.nullable().optional(),previewText:S$.optional(),previewMode:C$.optional(),reportClasses:w$.optional(),priority:v$.optional()}),O$=T$.extend({id:u(),ownerUserId:u().optional(),lastGeneratedAt:a().optional(),generatedByDevice:b(u(),a()).optional(),createdBy:u(),createdAt:a(),updatedAt:a()});function k$(e){let t=e.denseCadenceSec;if(t!==void 0&&t>=e.cadenceSec)throw Error(`denseCadenceSec (${t}s) must be strictly smaller than cadenceSec (${e.cadenceSec}s) — a dense cadence that is not denser renders a uniform timelapse`)}function A$(e,t){let n=e.generatedByDevice;return n===void 0?e.lastGeneratedAt??0:n[String(t)]??0}function j$(e){return e.some(e=>e!==`analyzer`)}async function M$(e,t){try{return await e.getCapSlice.query({deviceId:t,capName:`motion`})}catch(e){let n=e instanceof Error?e.message:String(e);throw Error(`motion state of device ${t} is unreadable: ${n}`,{cause:e})}}async function N$(e,t){let n=await M$(e,t);if(n===null)return null;let r=lz.safeParse(n);if(!r.success)throw Error(`motion state of device ${t} is malformed on the hub: ${r.error.message}`);return r.data}async function P$(e,t){let n=(await M$(e,t))?.detected;if(typeof n!=`boolean`)throw Error(`motion state of device ${t} is not published yet (unknown)`);return n}function F$(e,t,n){let r=e=>{if(e!==t)throw Error(`${n}: motion deviceId mismatch, expected ${t}, got ${e}`)};return{isDetected:async({deviceId:n})=>(r(n),P$(e,t)),getStatus:async({deviceId:n})=>(r(n),N$(e,t))}}var I$=uz.omit({triggeredBy:!0});function L$(e,t){return gt(T.ProviderMotion,e,t)}function R$(e,t){return!!e.formats[t]}function z$(e,t,n){if(t!=null){let r=e.find(e=>e.id===t);if(r!==void 0&&R$(r,n))return!0}return e.some(e=>e.legacy!==!0&&R$(e,n))}var B$={"object-detection":[`efficientdet-lite0-edgetpu`,`ssdlite-mobiledet-coco-edgetpu`],"face-detection":[`scrypted-yolov9t-face`,`scrfd-2.5g`,`ssd-mobilenet-v2-face-edgetpu`],"face-embedding":[`arcface-r100`,`inception-resnet-v1`],"plate-detection":[`yolov8n-plate`],"plate-ocr":[`vgg-english-g2`],"clip-embedding":[`mobileclip-s1`,`mobileclip-s2`],"package-detection":[`yolov8n-package`],"bird-classifier":[`bird-classifier-aiy-edgetpu`,`bird-nabirds-404`],"animal-classifier":[`animals-10`],"vehicle-classifier":[`vehicle-type-efficientnet`]};function V$(e,t){return B$[e]?.includes(t)??!1}var H$=`ModelId`;function U$(e){return`${e}${H$}`}function W$(e,t){let n=e?.[U$(t)];return typeof n==`string`&&n.length>0?n:void 0}function G$(e,t,n,r,i){let a=e?.[t],o=W$(e,t);if(a!==void 0&&o===void 0)return{value:a,source:`override`};if(a!==void 0&&o!==void 0&&o===n)return{value:a,source:`override`,boundModelId:o};let s=a!==void 0&&o!==void 0?{inapplicableOverride:{value:a,modelId:o}}:{};return r===void 0?{value:i,source:`global-default`,...s}:{value:r,source:`model-default`,...s}}function K$(e,t,n){if(e===void 0)return;let r={...e};for(let i of t){let t=W$(e,i);t!==void 0&&t!==n&&delete r[i],delete r[U$(i)]}return r}function q$(e,t,n,r){return{...e,[t]:n,[U$(t)]:r}}function J$(e,t){let n={...e};return delete n[t],delete n[U$(t)],n}function Y$(e,t,n){return t.some(t=>G$(e,t,n,void 0,void 0).source===`override`)}function X$(e,t,n){return t.reduce((e,t)=>G$(e,t,n,void 0,void 0).source===`override`?J$(e,t):e,{...e})}function Z$(e){return e.flatMap(e=>e.type===`group`?Z$(e.fields):`key`in e&&`bindsToModel`in e&&e.bindsToModel===!0?[e.key]:[])}var Q$=[`accelerator`,`camera`,`node`];function $$(e,t){return t.includes(e)?[e,U$(e)]:[e]}function e1(e,t){return t.find(t=>U$(t)===e)??e}function t1(e,t){if(Object.is(e,t))return!0;if(Array.isArray(e)&&Array.isArray(t))return e.length===t.length&&e.every((e,n)=>t1(e,t[n]));if(n1(e)&&n1(t)){let n=Object.keys(e),r=Object.keys(t);return n.length===r.length&&n.every(n=>t1(e[n],t[n]))}return!1}function n1(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function r1(...e){return e.reduce((e,t)=>({...e,...t}),{})}function i1(e,t){return r1(...Q$.slice(Q$.indexOf(t)+1).toReversed().map(t=>e[t]))}function a1(e){return r1(e.node,e.camera,e.accelerator)}function o1(e,t,n){let r=$$(t,n);for(let t of Q$){let n=e[t];if(n!==void 0&&r.some(e=>n[e]!==void 0))return t}return`default`}function s1(e,t,n,r){let i={...e};for(let e of $$(t,r))n[e]===void 0?delete i[e]:i[e]=n[e];return i}function c1(e,t,n){let r={...e};for(let e of $$(t,n))delete r[e];return r}function l1(e,t){return[...new Set(Object.keys(e).map(e=>e1(e,t)))]}function u1(e,t,n,r){return $$(n,r).every(n=>t1(e[n],t[n]))}function d1(e,t,n){if(e===void 0)return;let r={};for(let i of l1(e,n))if(!u1(e,t,i,n))for(let t of $$(i,n))e[t]!==void 0&&(r[t]=e[t]);return Object.keys(r).length>0?r:void 0}function f1(e,t,n){return e===void 0?[]:l1(e,n).filter(r=>u1(e,t,r,n)).toSorted()}var p1=/^Apple M(\d+)(?:\s+(Pro|Max|Ultra))?\b/i,m1=/Core\(TM\)\s+Ultra|Core Ultra/i,h1=/Intel\(R\)\s+N\d{2,3}\b|\bIntel\s+N\d{2,3}\b/i;function g1(e){let t=p1.exec(e.trim());if(t===null)return null;let n=Number(t[1]),r=(t[2]??`base`).toLowerCase();return{generation:n,variant:r===`pro`||r===`max`||r===`ultra`?r:`base`}}function _1(e){let t=e.cpuModel,n=g1(t);return n===null?m1.test(t)?{hardwareClass:`intel-core-ultra`,cpuModel:t}:h1.test(t)?{hardwareClass:`intel-n-series`,cpuModel:t}:{hardwareClass:`unknown`,cpuModel:t}:{hardwareClass:n.variant===`base`?`apple-m-base`:`apple-m-pro`,cpuModel:t,apple:n}}function v1(e,t){let[n=``,r=``]=e.split(`:`);return n===`edgetpu`?`coral`:n===`coreml`?r===`cpu`?`arm-cpu`:`apple-ane`:n===`openvino`&&r===`npu`?`intel-npu`:n===`openvino`&&r===`gpu`?`intel-igpu`:n===`cpu`||r===`cpu`?t.arch===`arm64`?`arm-cpu`:`x86-cpu`:null}var y1={"intel-core-ultra":{"intel-npu":{"yolov9t-320":{p50Ms:2.9,fps:383,measured:!0},"yolov9t-320-int8":{p50Ms:3.8,fps:333,measured:!0},"yolov9t-640":{p50Ms:7.4,fps:139,measured:!0},"yolov9t-640-int8":{p50Ms:7.5,fps:144,measured:!0},"yolov9s-320":{p50Ms:4.4,fps:241,measured:!0},"yolov9s-320-int8":{p50Ms:4.1,fps:264,measured:!0},"yolov9s-640":{p50Ms:12.7,fps:82,measured:!0},"yolov9s-640-int8":{p50Ms:10.7,fps:99,measured:!0},"yolov9m-320":{p50Ms:8.4,fps:123,measured:!0},"yolov9m-320-int8":{p50Ms:6.5,fps:165,measured:!0},"yolov9m-640":{p50Ms:29.5,fps:32,measured:!0},"yolov9m-640-int8":{p50Ms:19.5,fps:52,measured:!0}},"intel-igpu":{"yolov9t-320":{p50Ms:2.6,fps:405,measured:!0},"yolov9t-320-int8":{p50Ms:2.8,fps:324,measured:!0},"yolov9t-640":{p50Ms:6.5,fps:157,measured:!0},"yolov9t-640-int8":{p50Ms:5.6,fps:185,measured:!0},"yolov9s-320":{p50Ms:4.6,fps:200,measured:!0},"yolov9s-320-int8":{p50Ms:4.1,fps:239,measured:!0},"yolov9s-640":{p50Ms:15.2,fps:69,measured:!0},"yolov9s-640-int8":{p50Ms:10.5,fps:99,measured:!0},"yolov9m-320":{p50Ms:11.4,fps:88,measured:!0},"yolov9m-320-int8":{p50Ms:7,fps:127,measured:!0},"yolov9m-640":{p50Ms:40,fps:25,measured:!0},"yolov9m-640-int8":{p50Ms:23.5,fps:44,measured:!0}},"x86-cpu":{"yolov9t-320":{p50Ms:6.9,fps:145,measured:!0},"yolov9t-320-int8":{p50Ms:2.7,fps:405,measured:!0},"yolov9t-640":{p50Ms:23,fps:44,measured:!0},"yolov9t-640-int8":{p50Ms:8.8,fps:124,measured:!0},"yolov9s-320":{p50Ms:15.8,fps:63,measured:!0},"yolov9s-320-int8":{p50Ms:6.5,fps:180,measured:!0},"yolov9s-640":{p50Ms:58.2,fps:17,measured:!0},"yolov9s-640-int8":{p50Ms:20.1,fps:52,measured:!0},"yolov9m-320":{p50Ms:40,fps:25,measured:!0},"yolov9m-320-int8":{p50Ms:14.2,fps:74,measured:!0},"yolov9m-640":{p50Ms:155.8,fps:6,measured:!0},"yolov9m-640-int8":{p50Ms:52.4,fps:19,measured:!0}}},"intel-n-series":{"intel-igpu":{"yolov9t-320":{p50Ms:15,fps:48,measured:!0},"yolov9t-320-int8":{p50Ms:14.1,fps:67,measured:!0},"yolov9t-640":{p50Ms:38.5,fps:26,measured:!0},"yolov9t-640-int8":{p50Ms:33.1,fps:33,measured:!0},"yolov9s-320":{p50Ms:41.4,fps:24,measured:!0},"yolov9s-320-int8":{p50Ms:23.3,fps:34,measured:!0},"yolov9s-640":{p50Ms:127.4,fps:8,measured:!0},"yolov9s-640-int8":{p50Ms:92.9,fps:11,measured:!0},"yolov9m-320":{p50Ms:63.5,fps:16,measured:!0},"yolov9m-320-int8":{p50Ms:39.4,fps:26,measured:!0},"yolov9m-640":{p50Ms:215.5,fps:5,measured:!0},"yolov9m-640-int8":{p50Ms:139.1,fps:7,measured:!0}},"x86-cpu":{"yolov9t-320":{p50Ms:86.2,fps:12,measured:!0},"yolov9t-320-int8":{p50Ms:52.7,fps:20,measured:!0},"yolov9t-640":{p50Ms:322.1,fps:3,measured:!0},"yolov9t-640-int8":{p50Ms:205.6,fps:5,measured:!0},"yolov9s-320":{p50Ms:164.4,fps:6,measured:!0},"yolov9s-320-int8":{p50Ms:86.9,fps:12,measured:!0},"yolov9s-640":{p50Ms:341.3,fps:3,measured:!0},"yolov9s-640-int8":{p50Ms:185.3,fps:5,measured:!0},"yolov9m-320":{p50Ms:166.8,fps:6,measured:!0},"yolov9m-320-int8":{p50Ms:226.3,fps:4,measured:!0},"yolov9m-640":{p50Ms:663.5,fps:2,measured:!0},"yolov9m-640-int8":{p50Ms:324.4,fps:3,measured:!0}}},"apple-m-pro":{"apple-ane":{"yolov9t-320":{p50Ms:1.1,fps:952,measured:!0},"yolov9t-640":{p50Ms:3,fps:333,measured:!0},"yolov9s-320":{p50Ms:1.5,fps:667,measured:!0},"yolov9s-640":{p50Ms:5.1,fps:196,measured:!0},"yolov9m-320":{p50Ms:3.2,fps:312,measured:!0},"yolov9m-640":{p50Ms:10.2,fps:98,measured:!0}}},"apple-m-base":{"apple-ane":{"yolov9t-320":{p50Ms:1.32,fps:758,measured:!1},"yolov9t-640":{p50Ms:3.45,fps:290,measured:!0},"yolov9s-320":{p50Ms:1.8,fps:556,measured:!1},"yolov9s-640":{p50Ms:5.46,fps:183,measured:!0},"yolov9m-320":{p50Ms:3.79,fps:264,measured:!0},"yolov9m-640":{p50Ms:10.34,fps:97,measured:!0}}}},b1={"yolov9m-320":{personPrecision:.979,personRecall:.649},"yolov9m-320-int8":{personPrecision:.974,personRecall:.684},"yolov9m-640":{personPrecision:.976,personRecall:.854},"yolov9m-640-int8":{personPrecision:.976,personRecall:.847},"yolov9s-320":{personPrecision:.958,personRecall:.479},"yolov9s-320-int8":{personPrecision:.969,personRecall:.438},"yolov9s-640":{personPrecision:.986,personRecall:.753},"yolov9s-640-int8":{personPrecision:.963,personRecall:.823},"yolov9t-320":{personPrecision:.946,personRecall:.368},"yolov9t-320-int8":{personPrecision:.943,personRecall:.347},"yolov9t-640":{personPrecision:.979,personRecall:.646},"yolov9t-640-int8":{personPrecision:.979,personRecall:.646}},x1=`yolov9`,S1=.02,C1=.4;function w1(e,t,n){return!(e>0)||!(n>0)?0:Math.max(0,Math.floor(e*(1-t)/n+1e-9))}function T1(e,t){if(t===void 0||Object.keys(t).length===0)return e;let n={...e};for(let[e,r]of Object.entries(t))n[e]={p50Ms:r.p50Ms,fps:r.fps,measured:!0,source:{kind:`node-benchmark`,resultId:r.resultId,measuredAtMs:r.measuredAtMs}};return n}function E1(e,t=3){let n=10**t;return Math.round(e*n)/n}function D1(e,t){return e===void 0?0:w1(e.fps,t.headroom,t.cameraFps)}function O1(e,t){return D1(e,t)>=t.minSessions}function k1(e,t){return Object.keys(b1).filter(e=>e.startsWith(x1)).filter(n=>e.every(e=>e.column[n]!==void 0&&(t[n]??[]).includes(e.device.format))).map(e=>({modelId:e,personRecall:b1[e]?.personRecall??0})).toSorted((e,t)=>t.personRecall-e.personRecall||e.modelId.localeCompare(t.modelId))}function A1(e,t){return e.reduce((e,n)=>e+(n.column[t]?.p50Ms??1/0),0)}function j1(e,t,n){return e.reduce((e,r)=>Math.min(e,D1(r.column[t],n)),1/0)}function M1(e,t,n){let r=k1(e,t);if(r.length===0)return null;let i=r.filter(t=>e.every(e=>O1(e.column[t.modelId],n)));if(i.length===0){let t=r.toSorted((t,r)=>j1(e,r.modelId,n)-j1(e,t.modelId,n)||A1(e,t.modelId)-A1(e,r.modelId))[0];return t===void 0?null:{modelId:t.modelId,reasons:[{kind:`no-fit-lightest`,sessions:j1(e,t.modelId,n),minSessions:n.minSessions}]}}let a=i[0];if(a===void 0)return null;let o=i.filter(e=>a.personRecall-e.personRecall<=.02).toSorted((t,n)=>A1(e,t.modelId)-A1(e,n.modelId)||n.personRecall-t.personRecall)[0]??a,s=[],c=r[0];if(c!==void 0&&c.modelId!==a.modelId){let t=e.find(e=>!O1(e.column[c.modelId],n))?.device.key??``;s.push({kind:`stepped-down`,from:c.modelId,to:a.modelId,limitedBy:t})}return o.modelId!==a.modelId&&s.push({kind:`tie-faster`,over:a.modelId,recallDelta:E1(a.personRecall-o.personRecall)}),{modelId:o.modelId,reasons:s}}function N1(e,t,n){let r=e.column[t];return r===void 0?null:{modelId:t,p50Ms:r.p50Ms,fps:r.fps,measured:r.measured,source:r.source??{kind:`table`},capacitySessions:D1(r,n),personRecall:b1[t]?.personRecall??0}}function P1(e,t){let n=[{kind:`capacity`,sessions:e.capacitySessions,minSessions:t.minSessions}];return e.measured||n.push({kind:`derived-latency`,modelId:e.modelId}),n}function F1(e,t,n){return{nodeId:e.nodeId,reachable:e.reachable,hardwareClass:n,cpuModel:e.hardware?.cpuModel??null,skipped:!0,acceleratorModelId:null,devices:e.devices.map(t=>({deviceKey:t.key,accelerator:e.hardware?v1(t.key,e.hardware):null,enabled:t.enabled,available:t.available,chosen:null,reasons:[]})),reasons:[t]}}function I1(e){let{node:t}=e,n={headroom:e.headroom??.4,cameraFps:e.cameraFps??10,minSessions:e.minSessionsPerDevice??2},r=e.perf??y1;if(!t.reachable)return F1(t,{kind:`node-offline`},null);if(t.hardware===null)return F1(t,{kind:`no-hardware-facts`},null);let i=t.hardware,{hardwareClass:a,cpuModel:o}=_1(i),s=e.measured??{},c=Object.values(s).some(e=>Object.keys(e).length>0),l=a===`unknown`?void 0:r[a];if(l===void 0&&!c)return F1(t,{kind:`no-measured-data`,hardwareClass:a},a);let u=l??{},d=t.devices.toSorted((e,t)=>e.key.localeCompare(t.key)),f=new Map,p=new Map;for(let e of d){let t=v1(e.key,i);if(t===`coral`){p.set(e.key,e.enabled?[{kind:`coral-untouched`}]:[]);continue}if(!e.enabled){p.set(e.key,[{kind:`device-disabled`}]);continue}if(!e.available){p.set(e.key,[{kind:`device-unavailable`}]);continue}let n=t===null?void 0:T1(u[t],s[e.key]);if(t===null||n===void 0){p.set(e.key,[{kind:`no-family-build`,format:e.format}]);continue}f.set(e.key,{device:e,accelerator:t,column:n})}let m=e=>e===`x86-cpu`||e===`arm-cpu`,h=new Map,g=e=>{let t=e.find(e=>e.device.customPinModelId!==void 0);if(t?.device.customPinModelId===void 0)return null;let n={kind:`kept-custom-pin`,modelId:t.device.customPinModelId,deviceKey:t.device.key};for(let t of e)h.set(t.device.key,[n]);return n},_=[...f.values()].filter(e=>!m(e.accelerator)),v=g(_),ee=v===null?_:[],te=[...f.values()].filter(e=>m(e.accelerator)).filter(e=>g([e])===null),ne=new Map,y=new Map,re=[],ie=null,b=ee.length>0?M1(ee,t.formatsByModel,n):null;if(v!==null&&re.push(v),b!==null){ie=b.modelId,re.push(...b.reasons);for(let e of ee){let t=N1(e,b.modelId,n);t!==null&&(ne.set(e.device.key,t),y.set(e.device.key,P1(t,n)))}}else for(let e of ee)y.set(e.device.key,[{kind:`no-family-build`,format:e.device.format}]);for(let e of te){let r=M1([e],t.formatsByModel,n),i=r===null?null:N1(e,r.modelId,n);if(r===null||i===null){y.set(e.device.key,[{kind:`no-family-build`,format:e.device.format}]);continue}ne.set(e.device.key,i),y.set(e.device.key,[{kind:`cpu-device`},...r.reasons,...P1(i,n)])}return{nodeId:t.nodeId,reachable:!0,hardwareClass:a,cpuModel:o,skipped:ne.size===0,acceleratorModelId:ie,devices:d.map(e=>({deviceKey:e.key,accelerator:v1(e.key,i),enabled:e.enabled,available:e.available,chosen:ne.get(e.key)??null,...h.has(e.key)?{kept:`custom-pin`}:{},reasons:p.get(e.key)??h.get(e.key)??y.get(e.key)??[]})),reasons:re}}var L1=1e-9;function R1(e,t){let n=t.deficit-e.deficit;return(Math.abs(n)<L1?0:n)||t.candidate.share-e.candidate.share||e.candidate.key.localeCompare(t.candidate.key)}function z1(e){return e.spare??1/0}function B1(e){if(e.length===0)return{kind:`none`};let t=e.reduce((e,t)=>e+Math.max(t.share,0),0),n=e.reduce((e,t)=>e+Math.max(t.running,0),0),r=e.map(r=>({candidate:r,deficit:(t>0?Math.max(r.share,0)/t:1/e.length)*(n+1)-r.running})).toSorted(R1),i=r[0].candidate;if(!i.capped&&!i.saturated)return{kind:`elected`,key:i.key,reason:`share`};let a=r.filter(e=>!e.candidate.capped&&!e.candidate.saturated).toSorted((e,t)=>z1(t.candidate)-z1(e.candidate)||R1(e,t)),o=i.capped?`at-cap`:`saturated`;if(a.length>0)return{kind:`elected`,key:a[0].candidate.key,reason:`yield`,turnKey:i.key,yieldReason:o};let s=r.find(e=>!e.candidate.capped);return s===void 0?{kind:`none`}:{kind:`elected`,key:s.candidate.key,reason:`share`}}var V1=1;function H1(e){return e!==void 0&&e>0?e:V1}function U1(e,t,n){let r=e.reduce((e,r)=>e+(n(r)?t(r):0),0);return new Map(e.map(e=>[e,r>0&&n(e)?Math.round(t(e)/r*1e3)/10:0]))}function W1(e){let t=AA(e.source)&&e.auto!==null,n=t&&e.auto!==null?e.auto:e.stored,r={};for(let t of e.nodeIds)r[t]=H1(n.nodes[t]);let i=new Set(e.eligibleNodes),a=U1(e.nodeIds,e=>r[e]??V1,()=>!0),o=U1(e.nodeIds,e=>r[e]??V1,e=>i.has(e)),s={},c=e.nodeIds.map(r=>{let c=new Set(e.eligibleDevices[r]??[]),l=n.devices[r]??{},u=[...new Set([...Object.keys(l),...c])].toSorted(),d={};for(let e of u)d[e]=H1(l[e]);u.length>0&&(s[r]=d);let f=U1(u,e=>d[e]??V1,()=>!0),p=U1(u,e=>d[e]??V1,e=>i.has(r)&&c.has(e)),m=u.map(e=>({deviceKey:e,eligible:c.has(e),configuredPct:f.get(e)??0,effectivePct:p.get(e)??0})),h=t?e.autoCapacity?.[r]:void 0;return{nodeId:r,eligible:i.has(r),configuredPct:a.get(r)??0,effectivePct:o.get(r)??0,capacitySource:h?.source??null,capacityFallback:h?.fallback??null,devices:m}});return{source:e.source,policy:e.policy??`share`,autoPending:AA(e.source)&&e.auto===null,computedAt:e.computedAt??null,trigger:e.trigger??null,nodes:c,nodeWeights:r,deviceWeights:s}}var G1={readMeasuredCapacity:async()=>new Map};function K1(e){let t=[...e.values()].reduce((e,t)=>e+t,0),n=new Map;if(t<=0)return n;let r=[...e].map(([e,n])=>({k:e,exact:n/t*100})),i=0;for(let e of r)n.set(e.k,Math.floor(e.exact)),i+=Math.floor(e.exact);let a=e=>Math.round((e-Math.floor(e))*1e6),o=r.toSorted((e,t)=>a(t.exact)-a(e.exact)||e.k.localeCompare(t.k));for(let e=0;e<100-i;e++){let t=o[e%o.length];if(t===void 0)break;n.set(t.k,(n.get(t.k)??0)+1)}return n}function q1(e,t,n){return e.devices.filter(e=>e.enabled&&e.available&&e.chosen!==null).map(e=>{let r=e.chosen?.fps??0;return{deviceKey:e.deviceKey,sessions:w1(r,t,n),weight:Math.max(r,0),modelId:e.chosen?.modelId??null,fps:e.chosen?.fps??null,measured:e.chosen?.measured??!1}})}function J1(e,t){let n=n=>{let r=e.skipped?[]:q1(e,t.headroom,t.cameraFps),i=r.reduce((e,t)=>e+t.sessions,0);return{rec:e,devices:r,capacitySource:e.skipped?null:`hardware`,capacityFallback:e.skipped?null:n,skippedReason:e.skipped?e.reasons[0]?.kind??`skipped`:i>0?null:`no-capacity`}};if(t.source===`hardware`||!e.reachable)return n(null);let r=t.measured.get(e.nodeId),i=new Map((r?.devices??[]).map(e=>[e.deviceKey,e])),a=e.devices.filter(e=>e.enabled&&e.available),o=e.devices.filter(e=>e.enabled&&e.available&&e.chosen!==null),s=a.filter(e=>i.has(e.deviceKey));if(s.length===0)return n(`no-benchmark-results`);if(o.some(e=>!i.has(e.deviceKey)))return n(`partial-benchmark-results`);let c=s.map(e=>{let t=i.get(e.deviceKey),n=Math.max(0,Math.floor(t?.maxSessions??0));return{deviceKey:e.deviceKey,sessions:n,weight:n,modelId:t?.modelId??null,fps:null,measured:!0}});return{rec:e,devices:c,capacitySource:`benchmark`,capacityFallback:null,skippedReason:c.reduce((e,t)=>e+t.sessions,0)>0?null:`no-capacity`}}function Y1(e){let t=e.recommendations.map(t=>J1(t,e)),n=new Map;for(let e of t){let t=e.devices.reduce((e,t)=>e+t.sessions,0);e.skippedReason===null&&t>0&&n.set(e.rec.nodeId,t)}let r=K1(n),i=t.map(e=>{let t=K1(new Map(e.devices.map(e=>[e.deviceKey,e.weight])));return{nodeId:e.rec.nodeId,share:r.get(e.rec.nodeId)??null,capacitySessions:e.devices.reduce((e,t)=>e+t.sessions,0),skippedReason:e.skippedReason,capacitySource:e.capacitySource,capacityFallback:e.capacityFallback,devices:e.devices.map(e=>({deviceKey:e.deviceKey,share:t.get(e.deviceKey)??0,modelId:e.modelId,fps:e.fps,measured:e.measured,suggestedMaxSessions:e.sessions}))}});return{headroom:e.headroom,source:e.source,cameraFps:e.cameraFps,minSessionsPerDevice:e.minSessionsPerDevice,nodes:i}}function X1(e,t){if(t===null||!e.includes(t))return e;let n=e.filter(e=>e!==t);return n.length>0?n:e}function Z1(e,t,n){return e===null||t===null||e!==t?e:n.some(e=>e!==t)?null:e}function Q1(e,t){let n=[],r=[];for(let i of t.toSorted((e,t)=>e.deviceId-t.deviceId)){let t=i.placedNodeId===e,a=i.nodePin===e;!t&&!a||(i.frameSourceNodes.some(t=>t!==e)?n.push({deviceId:i.deviceId,placedOnNode:t,pinnedToNode:a}):r.push({deviceId:i.deviceId,reason:`only-frame-source`}))}return{moving:n,staying:r}}var $1=[1,2,4,6,8,12,16,24,32],e0=[1,2,3,4,6,8,10,12,16],t0=3*6e4,n0=2e4;function r0(e,t={}){let n=((t.settleSec??X.settleSec)+(t.measureSec??X.measureSec))*1e3,r=t0;if(e.phases.includes(`device`))for(let t of e.devices)r+=t.modelIds.length*(n0+$1.length*n);return e.phases.includes(`pipeline`)&&(r+=e.devices.length*(n0+e0.length*n)),Math.min(r,e.budgetMinutes*6e4)}function i0(e){let t=[];e.activeRunNodeId!==null&&t.push({kind:`benchmark-active`,detail:`A benchmark of ${e.activeRunNodeId} is running — one node at a time.`,overridable:!1}),e.online||t.push({kind:`node-offline`,detail:`${e.plan.nodeId} is not online.`,overridable:!1});let n=e.plan.devices.map(e=>e.deviceKey).filter(t=>!e.knownDeviceKeys.includes(t));n.length>0&&t.push({kind:`unknown-device`,detail:`${e.plan.nodeId} reports no device ${n.join(`, `)}.`,overridable:!1}),e.plan.phases.length===0&&t.push({kind:`no-phase`,detail:`Choose at least one measurement.`,overridable:!1});let r=e.otherNodesCapacitySessions;return r!==null&&e.sessionsNow>r&&!e.plan.acceptInsufficientHeadroom&&t.push({kind:`insufficient-headroom`,detail:`The cluster runs ${e.sessionsNow} sessions now; the other nodes can carry ${r}.`,overridable:!0}),t}function a0(e){let{cell:t}=e,n=t.phase===`pipeline`?t.steps.toSorted().join(`,`):``;return[e.nodeId,t.deviceKey,t.phase,t.modelId,n].join(`|`)}function o0(e,t){let n=t.staleAfterMs??X.staleAfterDays*864e5;if(t.nowMs-e.measuredAtMs>n)return`age`;let r=t.currentPools[e.nodeId]?.[e.cell.deviceKey],i=e.fingerprint?.pools[e.cell.deviceKey];return r===void 0||i===void 0?null:r.runtime===i.runtime?r.numWorkers!==i.numWorkers||r.concurrency!==i.concurrency||r.batchMode!==i.batchMode?`pool-tuning`:null:`runtime`}function s0(e,t){let n=new Map;for(let t of e){let e=a0(t),r=n.get(e);(r===void 0||t.measuredAtMs>r.measuredAtMs)&&n.set(e,t)}let r=new Map;for(let i of e){if(n.get(a0(i))?.id!==i.id){r.set(i.id,{standing:`superseded`,staleWhy:null});continue}let e=o0(i,t);r.set(i.id,e===null?{standing:`fresh`,staleWhy:null}:{standing:`stale`,staleWhy:e})}return r}function c0(e,t){let n=s0(e,t);return e.filter(e=>n.get(e.id)?.standing===`fresh`)}function l0(e,t,n){let r={};for(let i of c0(e,n)){if(i.nodeId!==t||i.cell.phase!==`device`)continue;let e=r[i.cell.deviceKey]??{};e[i.cell.modelId]={p50Ms:Math.round(i.cell.p50Ms*100)/100,fps:i.cell.fps,resultId:i.id,measuredAtMs:i.measuredAtMs},r[i.cell.deviceKey]=e}return r}function u0(e,t,n){let r=new Map;for(let i of c0(e,n)){if(!t.includes(i.nodeId)||i.cell.phase!==`pipeline`)continue;let e=r.get(i.nodeId)??new Map,n=e.get(i.cell.deviceKey);(n===void 0||i.measuredAtMs>n.measuredAtMs)&&e.set(i.cell.deviceKey,i),r.set(i.nodeId,e)}let i=new Map;for(let e of t){let t=r.get(e);t!==void 0&&i.set(e,{nodeId:e,devices:[...t.values()].toSorted((e,t)=>e.cell.deviceKey.localeCompare(t.cell.deviceKey)).map(e=>({deviceKey:e.cell.deviceKey,maxSessions:e.cell.phase===`pipeline`?e.cell.maxSessions:0,modelId:e.cell.modelId,measuredAtMs:e.measuredAtMs}))})}return i}var d0=`object-detection`;function f0(e,t){return e.slots.find(e=>e.id===t)?.addons??[]}var p0=(e,t)=>t.inputClasses.some(t=>e.outputClasses.includes(t));function m0(e){let t=f0(e,`detector`).find(e=>e.id===d0);if(t===void 0)return null;let n=f0(e,`classifier`),r=f0(e,`cropper`).filter(e=>p0(t,e)).map(e=>({cropper:e,recognizers:n.filter(t=>p0(e,t))})),i=new Set(r.flatMap(e=>e.recognizers.map(e=>e.id)));return{root:t,croppers:r,classifiers:n.filter(e=>p0(t,e)&&!i.has(e.id)),refiners:f0(e,`refiner`)}}function h0(e){let t=m0(e);if(t===null)return[];let n=e=>({id:e.id,name:e.name,slot:e.slot});return[...t.croppers.flatMap(e=>[n(e.cropper),...e.recognizers.map(n)]),...t.classifiers.map(n),...t.refiners.map(n)]}function g0(e,t,n){let r=m0(e);if(r===null)throw Error(`the node's catalog has no ${d0} step`);let i=new Set(n),a=(e,t)=>({addonId:e.id,enabled:t});return[{addonId:r.root.id,modelId:t,enabled:!0,children:[...r.croppers.map(({cropper:e,recognizers:t})=>({...a(e,i.has(e.id)||t.some(e=>i.has(e.id))),children:t.map(e=>a(e,i.has(e.id)))})),...r.classifiers.map(e=>a(e,i.has(e.id))),...r.refiners.map(e=>a(e,i.has(e.id)))]}]}var _0=1.6;function v0(e,t,n){let r=Math.min(Math.max(e.w,e.h)*_0,Math.min(t,n)),i=e.x+e.w/2,a=e.y+e.h/2;return{x:Math.min(Math.max(0,i-r/2),t-r),y:Math.min(Math.max(0,a-r/2),n-r),w:r,h:r}}var y0=`detail-crop`,b0=`detailCropPaddingRatio`,x0=`detailCropSquare`,S0=f({paddingRatio:a().min(0).max(4),square:w()}),C0={paddingRatio:.15,square:!1};function w0(e){let t=S0.shape.paddingRatio.safeParse(e[b0]),n=S0.shape.square.safeParse(e[x0]);return{paddingRatio:t.success?t.data:C0.paddingRatio,square:n.success?n.data:C0.square}}function T0(e){return typeof e==`object`&&!!e&&`key`in e}function E0(e){if(e===null)return C0;let t={};for(let n of e.sections)for(let e of n.fields)!T0(e)||typeof e.key!=`string`||(e.key===`detailCropPaddingRatio`||e.key===`detailCropSquare`)&&(t[e.key]=e.value);return w0(t)}var D0=Object.freeze({x:0,y:0,w:1,h:1}),O0={min:0,max:1,step:.05,default:C0.paddingRatio};function k0(e,t,n,r){let i=r.paddingRatio*e.w,a=r.paddingRatio*e.h,o={x:e.x-i,y:e.y-a,w:e.w+2*i,h:e.h+2*a};return r.square?M0(A0(o,t,n),t,n):j0(o,t,n)}function A0(e,t,n){let r=Math.min(Math.max(e.w,e.h),Math.min(t,n)),i=e.x+e.w/2,a=e.y+e.h/2;return{x:i-r/2,y:a-r/2,w:r,h:r}}function j0(e,t,n){let r=Math.max(0,e.x),i=Math.max(0,e.y),a=Math.min(t,e.x+e.w),o=Math.min(n,e.y+e.h);return{x:r,y:i,w:Math.max(0,a-r),h:Math.max(0,o-i)}}function M0(e,t,n){let r=Math.max(0,Math.min(e.w,t)),i=Math.max(0,Math.min(e.h,n));return{x:Math.min(Math.max(0,e.x),Math.max(0,t-r)),y:Math.min(Math.max(0,e.y),Math.max(0,n-i)),w:r,h:i}}var N0=`native-lease`,P0=`nativeLeaseHoldFrames`,F0=`nativeLeaseBudgetMb`,I0=`nativeLeaseActivityMs`,L0=`nativeLeaseAdmission`,R0=`nativeTileBudgetMb`,z0=`nativeSceneBudgetMb`,B0=S([`all`,`inferred`]),V0=f({holdFrames:a().int().min(1).max(64),budgetMb:a().int().min(0).max(4096),activityMs:a().int().min(0).max(12e4),admission:B0,tileBudgetMb:a().int().min(0).max(1024),sceneBudgetMb:a().int().min(0).max(1024)}),H0={holdFrames:8,budgetMb:1024,activityMs:15e3,tileBudgetMb:64,sceneBudgetMb:48,admission:`inferred`},U0={min:1,max:64,step:1,default:H0.holdFrames},W0={min:0,max:4096,step:64,default:H0.budgetMb},G0={min:0,max:12e4,step:1e3,default:H0.activityMs},K0={min:0,max:1024,step:16,default:H0.tileBudgetMb},q0={min:0,max:1024,step:16,default:H0.sceneBudgetMb},J0={options:[{value:`all`,label:`Every delivered frame`},{value:`inferred`,label:`Only frames sent to inference`}],default:H0.admission};function Y0(e,t){let n=V0.shape[e].safeParse(t);return n.success?n.data===H0[e]?null:n.data:null}function X0(e){let t=B0.safeParse(e);return t.success?t.data===H0.admission?null:t.data:null}function Z0(e){let t=Y0(`holdFrames`,e[P0]),n=Y0(`budgetMb`,e[F0]),r=Y0(`activityMs`,e[I0]),i=X0(e[L0]),a=Y0(`tileBudgetMb`,e[R0]),o=Y0(`sceneBudgetMb`,e[z0]);return{...t===null?{}:{holdFrames:t},...n===null?{}:{budgetMb:n},...r===null?{}:{activityMs:r},...i===null?{}:{admission:i},...a===null?{}:{tileBudgetMb:a},...o===null?{}:{sceneBudgetMb:o}}}function Q0(e){return typeof e==`object`&&!!e&&`key`in e}var $0=[P0,F0,I0,L0,R0,z0];function e2(e){if(e===null)return{};let t={};for(let n of e.sections)for(let e of n.fields)!Q0(e)||typeof e.key!=`string`||$0.includes(e.key)&&(t[e.key]=e.value);return Z0(t)}var t2=[{id:`viewer`,label:`View`,description:`Watch live and recorded video, browse events and read device state. Cannot change anything.`,deviceAccess:[`view`],systemAccess:[`view`]},{id:`operator`,label:`Operate`,description:`Everything View does, plus acting on a device: PTZ, lights, sirens, locks, and snoozing notifications. Cannot delete.`,deviceAccess:[`view`,`create`],systemAccess:[`view`,`create`]},{id:`manager`,label:`Full management`,description:`Everything Operate does, plus deleting devices, recordings and events. Short of admin — no user or cluster administration.`,deviceAccess:[`view`,`create`,`delete`],systemAccess:[`view`,`create`,`delete`]}];function n2(e){let t=t2.find(t=>t.id===e);if(!t)throw Error(`Unknown access role '${e}'`);return t}function r2(e){let t=n2(e.roleId);return[{type:`device`,selector:e.selector,access:[...t.deviceAccess],includeLinked:e.includeLinked},{type:`category`,target:`system`,access:[...t.systemAccess]}]}function i2(e,t){if(e.length!==t.length)return!1;let n=new Set(e);return t.every(e=>n.has(e))}function a2(e){if(e.length!==2)return null;let t=e.filter(e=>e.type===`device`),n=e.filter(e=>e.type===`category`&&e.target===`system`);if(t.length!==1||n.length!==1)return null;let[r]=t,[i]=n;if(r===void 0||i===void 0||r.type!==`device`||r.includeLinked===void 0)return null;let a=t2.find(e=>i2(e.deviceAccess,r.access)&&i2(e.systemAccess,i.access));return a?{roleId:a.id,selector:r.selector,includeLinked:r.includeLinked}:null}var o2=8;function s2(e,t){switch(e.kind){case`all`:return!0;case`ids`:return e.ids.includes(t.id);case`types`:return e.types.some(e=>String(e)===t.type);case`locations`:return t.location!==null&&e.locations.includes(t.location)}}function c2(e,t){return e.some(e=>e.type===`category`&&e.target===`device`&&e.access.includes(t))}function l2(e,t){return e.filter(e=>e.type===`device`&&e.access.includes(t))}function u2(e,t){return e.includeLinked??t===`view`}function d2(e,t){let n=[],r=e;for(let e=0;e<o2;e++){let e=r===null?null:t.get(r)?.parentDeviceId??null;if(e===null||e===r)break;n.push(e),r=e}return n}function f2(e,t,n){if(c2(e,n))return new Set(t.map(e=>e.id));let r=new Map;for(let e of t)r.set(e.id,e);let i=l2(e,n),a=new Set;for(let e of t)for(let t of i){if(s2(t.selector,e)){a.add(e.id);break}if(u2(t,n)&&d2(e.id,r).some(e=>{let n=r.get(e);return n!==void 0&&s2(t.selector,n)})){a.add(e.id);break}}return a}function p2(e){if(!Array.isArray(e))return[];let t=[];for(let n of e){let e=J.safeParse(n);e.success&&t.push(e.data)}return t}var m2=[`view`,`create`,`delete`];function h2(e,t,n,r){return r?{all:!0,deviceCount:t.length}:{all:c2(e,n)||l2(e,n).some(e=>e.selector.kind===`all`),deviceCount:f2(e,t,n).size}}function g2(e){let t=[];for(let n of e)n.type===`capability`&&t.push({name:n.target,access:n.access});return t}function _2(e){let t=[];for(let n of e)n.type===`addon`&&t.push({name:n.target,access:n.access});return t}function v2(e,t,n){let r={view:h2(e,t,`view`,n),create:h2(e,t,`create`,n),delete:h2(e,t,`delete`,n)},i=n?m2:m2.filter(t=>e.some(e=>e.type===`category`&&e.target===`system`&&e.access.includes(t)));return{isAdmin:n,allDevicesViewable:r.view.all,viewableDeviceCount:r.view.deviceCount,device:r,system:i,capabilities:g2(e),addons:_2(e)}}var y2={camera:{type:`camera`,label:`Camera`,icon:`camera`}},b2=[15e3,6e4,5*6e4,15*6e4,30*6e4,60*6e4,90*6e4];function x2(e,t){let n=e.length,r=t.length;if(n===0)return r;if(r===0)return n;let i=Array.from({length:r+1},(e,t)=>t),a=Array.from({length:r+1},()=>0);for(let o=1;o<=n;o++){a[0]=o;let n=i[0]??0;for(let s=1;s<=r;s++){let r=i[s]??0,c=a[s-1]??0,l=e.charCodeAt(o-1)===t.charCodeAt(s-1)?0:1;a[s]=Math.min(r+1,c+1,n+l),n=r}for(let e=0;e<=r;e++)i[e]=a[e]??0}return i[r]??0}function S2(e,t){let n=e.trim().toLowerCase(),r=t.trim().toLowerCase();return n===r?1:n.length===0||r.length===0?0:1-x2(n,r)/Math.max(n.length,r.length)}function C2(e,t,n=.8){let r=null,i=0;for(let a of t){let t=S2(e,a);t>=n&&t>i&&(r=a,i=t)}return r}var w2=`addon:`;function T2(e){return e.startsWith(w2)?e.slice(6):e}function E2(e,t){return T2(e)===T2(t)}function D2(e){return{runId:e.runId,state:e.state,startedAtMs:e.startedAtMs,finishedAtMs:e.finishedAtMs,progress:e.progress,result:e.result,error:e.error}}var O2=class{opts;runs=new Map;now;constructor(e){this.opts=e,this.now=e.now??Date.now}get runningCount(){let e=0;for(let t of this.runs.values())t.state===`running`&&(e+=1);return e}start(e,t){let n=this.runs.get(e);if(n!==void 0&&n.state===`running`)throw Error(`run '${e}' is already running`);if(this.runningCount>=this.opts.maxConcurrent)throw Error(`busy: ${this.runningCount}/${this.opts.maxConcurrent} run(s) already in progress — wait for one to finish or abort it`);let r={runId:e,state:`running`,startedAtMs:this.now(),finishedAtMs:null,progress:null,result:null,error:null,controller:new AbortController};this.runs.delete(e),this.runs.set(e,r);let i={signal:r.controller.signal,report:e=>{r.progress=e}},a=e=>{e.error===void 0?(r.state=r.controller.signal.aborted?`aborted`:`done`,r.result=e.result??null):(r.state=`failed`,r.error=e.error),r.finishedAtMs=this.now(),this.prune(),this.opts.onSettled?.(D2(r))},o;try{o=t(i)}catch(e){o=Promise.reject(e)}return o.then(e=>a({result:e}),e=>a({error:e instanceof Error?e.message:String(e)})),D2(r)}status(e){let t=this.runs.get(e);return t===void 0?null:D2(t)}list(){let e=[...this.runs.values()],t=e.filter(e=>e.state===`running`).toSorted((e,t)=>t.startedAtMs-e.startedAtMs),n=e.filter(e=>e.state!==`running`).toSorted((e,t)=>(t.finishedAtMs??0)-(e.finishedAtMs??0));return[...t,...n].map(D2)}abort(e){let t=this.runs.get(e);return t===void 0||t.state!==`running`?!1:(t.controller.abort(),!0)}abortAll(){for(let e of this.runs.values())e.state===`running`&&e.controller.abort()}prune(){let e=[...this.runs.values()].filter(e=>e.state!==`running`).toSorted((e,t)=>(e.finishedAtMs??0)-(t.finishedAtMs??0)),t=e.length-this.opts.keepFinished;for(let n=0;n<t;n++){let t=e[n];t!==void 0&&this.runs.delete(t.runId)}}};function k2(e,t){if(e.length!==t.length)return 0;let n=0,r=0,i=0;for(let a=0;a<e.length;a++)n+=e[a]*t[a],r+=e[a]*e[a],i+=t[a]*t[a];let a=Math.sqrt(r)*Math.sqrt(i);return a===0?0:n/a}var A2=class{elementId;cache={};listeners=new Set;loaded=!1;getBackend;constructor(e,t){this.elementId=e,this.getBackend=typeof t==`function`?t:()=>t}async ensureLoaded(){if(this.loaded)return;let e=this.getBackend();if(!e)throw Error(`ElementConfigStore(${this.elementId}): settings backend not available`);let t=await e.query({collection:`config`,filter:{where:{id:this.elementId},limit:1}});t.length>0&&(this.cache=t[0].data??{}),this.loaded=!0}getAll(){return{...this.cache}}get(e){let t=e.split(`.`),n=this.cache;for(let e of t){if(typeof n!=`object`||!n||Array.isArray(n))return;n=Reflect.get(n,e)}return n}async set(e,t){await this.ensureLoaded(),j2(this.cache,e,t),await this.persist(),this.notifyListeners()}async setAll(e){await this.ensureLoaded(),this.cache={...e},await this.persist(),this.notifyListeners()}onChange(e){return this.listeners.add(e),()=>{this.listeners.delete(e)}}async load(){await this.ensureLoaded()}async loadDefaults(e){await this.ensureLoaded(),Object.keys(this.cache).length===0&&(this.cache={...e},await this.persist())}async persist(){let e=this.getBackend();if(!e)throw Error(`ElementConfigStore(${this.elementId}): settings backend not available — cannot persist config`);await e.set({collection:`config`,key:this.elementId,value:this.cache})}notifyListeners(){let e=this.getAll();for(let t of this.listeners)try{t(e)}catch{}}};function j2(e,t,n){let r=t.split(`.`),i=e;for(let e=0;e<r.length-1;e++){let t=r[e],n=i[t];if(typeof n!=`object`||!n||Array.isArray(n)){let e={};i[t]=e,i=e}else i=n}i[r[r.length-1]]=n}function M2(e){return e instanceof Error?e.message:typeof e==`string`?e:String(e)}function N2(e,t){return`https://huggingface.co/${e}/resolve/main/${t}`}function P2(e){return JSON.parse(e)}function F2(e){return typeof e!=`object`||!e||Array.isArray(e)?null:{...e}}function I2(e){return Array.isArray(e)?e:[]}function L2(e,t=``){return typeof e==`string`?e:t}function R2(e,t=0){return typeof e==`number`?e:t}function z2(e,t=!1){return typeof e==`boolean`?e:t}function B2(e){try{return F2(P2(e))}catch{return null}}function V2(e){try{let t=P2(e);return Array.isArray(t)?t:null}catch{return null}}var H2=[/^user$/i,/^usr$/i,/^username$/i,/^password$/i,/^pwd$/i,/^pass$/i,/^passwd$/i,/^secret$/i,/^token$/i,/^auth$/i,/^auth[_-]?token$/i,/^bearer$/i,/^api[_-]?key$/i,/^access[_-]?token$/i,/^refresh[_-]?token$/i];function U2(e){return H2.some(t=>t.test(e))}function W2(e){try{let t=new URL(e),n=!1;(t.username||t.password)&&(t.username=``,t.password=``,n=!0);for(let e of Array.from(t.searchParams.keys()))U2(e)&&(t.searchParams.set(e,`***`),n=!0);return n?t.toString():e}catch{return e}}var $=1024*1024,G2={sampleIntervalMs:6e4,baselineSettleSamples:5,baselineSampleCount:3,restartMultiple:4,floorBytes:1024*$,ceilingBytes:3072*$,cooldownMs:30*6e4,maxRestartsPerWindow:6,restartWindowMs:1440*6e4};function K2(e){let t=(t,n,r)=>{let i=e[t];if(i===void 0)return n;let a=Number(i);return Number.isFinite(a)&&a>=r?a:n},n=G2;return{sampleIntervalMs:t(`CAMSTACK_POOL_MEM_INTERVAL_MS`,n.sampleIntervalMs,5e3),baselineSettleSamples:n.baselineSettleSamples,baselineSampleCount:n.baselineSampleCount,restartMultiple:t(`CAMSTACK_POOL_MEM_MULTIPLE`,n.restartMultiple,1.5),floorBytes:t(`CAMSTACK_POOL_MEM_FLOOR_MB`,n.floorBytes/$,128)*$,ceilingBytes:t(`CAMSTACK_POOL_MEM_CEILING_MB`,n.ceilingBytes/$,256)*$,cooldownMs:t(`CAMSTACK_POOL_MEM_COOLDOWN_MS`,n.cooldownMs,6e4),maxRestartsPerWindow:t(`CAMSTACK_POOL_MEM_MAX_RESTARTS`,n.maxRestartsPerWindow,1),restartWindowMs:t(`CAMSTACK_POOL_MEM_RESTART_WINDOW_MS`,n.restartWindowMs,6e4)}}function q2(e){let t=t=>{let n=e.match(RegExp(`^${t}:\\s+(\\d+)\\s*kB`,`m`));return n?Number(n[1])*1024:null},n=t(`VmRSS`);if(n===null)return null;let r=e.match(/^Threads:\s+(\d+)/m);return{rssBytes:n,vmBytes:t(`VmSize`)??0,hwmBytes:t(`VmHWM`)??0,swapBytes:t(`VmSwap`)??0,threads:r?Number(r[1]):0}}function J2(){return{settleSeen:0,baselineWindow:[],baselineBytes:null,restartsAt:[],lastRestartAt:null}}function Y2(e){let t=[...e].sort((e,t)=>e-t);return t[Math.floor(t.length/2)]}function X2(e,t,n){if(e.baselineBytes!==null)return e;if(e.settleSeen<n.baselineSettleSamples)return{...e,settleSeen:e.settleSeen+1};let r=[...e.baselineWindow,t];return r.length<n.baselineSampleCount?{...e,baselineWindow:r}:{...e,baselineWindow:r,baselineBytes:Y2(r)}}function Z2(e,t){return e===null?t.ceilingBytes:Math.min(t.ceilingBytes,Math.max(t.floorBytes,t.restartMultiple*e))}function Q2(e,t,n){return e.filter(e=>t-e<n.restartWindowMs)}function $2(e,t,n,r){let i=X2(e,t,r),a=Z2(i.baselineBytes,r);if(t<=a)return{state:i,action:i.baselineBytes===null?`baseline-pending`:`ok`,baselineBytes:i.baselineBytes,thresholdBytes:a};let o=Q2(i.restartsAt,n,r),s={...i,restartsAt:o};return o.length>=r.maxRestartsPerWindow?{state:s,action:`exhausted`,baselineBytes:i.baselineBytes,thresholdBytes:a}:s.lastRestartAt!==null&&n-s.lastRestartAt<r.cooldownMs?{state:s,action:`cooldown`,baselineBytes:i.baselineBytes,thresholdBytes:a}:{state:s,action:`restart`,baselineBytes:i.baselineBytes,thresholdBytes:a}}function e4(e,t){return{...J2(),restartsAt:[...e.restartsAt,t],lastRestartAt:t}}function t4(e){return{...J2(),restartsAt:e.restartsAt,lastRestartAt:e.lastRestartAt}}function n4(e){if(e.length===0)return null;let t=e[0];for(let n of e)n.rssBytes/n.thresholdBytes>t.rssBytes/t.thresholdBytes&&(t=n);return t.key}var r4=class{pools=new Map;timer=null;sweeping=!1;stopped=!1;opts;now;setTimer;clearTimer;constructor(e){this.opts=e,this.now=e.now??(()=>Date.now()),this.setTimer=e.setTimer??((e,t)=>setTimeout(e,t)),this.clearTimer=e.clearTimer??(e=>clearTimeout(e))}start(){this.timer||this.stopped||this.arm()}stop(){this.stopped=!0,this.timer&&=(this.clearTimer(this.timer),null)}arm(){let e=this.setTimer(()=>{this.sweep().finally(()=>{this.stopped||this.arm()})},this.opts.policy.sampleIntervalMs);typeof e.unref==`function`&&e.unref(),this.timer=e}async sweep(){if(!this.sweeping){this.sweeping=!0;try{await this.doSweep()}catch(e){this.opts.log.warn(`pool memory sweep failed`,{meta:{error:e instanceof Error?e.message:String(e)}})}finally{this.sweeping=!1}}}async doSweep(){let e=this.now(),t=await this.opts.sample(),n=[],r=new Map;for(let i of t){let t=this.pools.get(i.key),a=t?.state??J2();t&&t.pids.length>0&&!i4(t.pids,i.pids)&&(this.opts.log.warn(`pool process changed outside the watchdog — re-baselining`,{meta:{poolKey:i.key,previousPids:t.pids,pids:i.pids}}),a=t4(a));let o=$2(a,i.rssBytes,e,this.opts.policy);this.pools.set(i.key,{state:o.state,pids:i.pids}),r.set(i.key,o),this.opts.log.info(`pool memory`,{meta:{poolKey:i.key,pids:i.pids,rssMb:Math.round(i.rssBytes/$),baselineMb:o.baselineBytes===null?null:Math.round(o.baselineBytes/$),thresholdMb:Math.round(o.thresholdBytes/$),action:o.action,...i.meta}}),o.action===`restart`?n.push({key:i.key,rssBytes:i.rssBytes,thresholdBytes:o.thresholdBytes}):o.action===`cooldown`?this.opts.log.warn(`pool over memory threshold but inside restart cooldown`,{meta:{poolKey:i.key,rssMb:Math.round(i.rssBytes/$),thresholdMb:Math.round(o.thresholdBytes/$),cooldownMs:this.opts.policy.cooldownMs}}):o.action===`exhausted`&&this.opts.log.error(`pool memory watchdog gave up — restart budget exhausted, pool leaks faster than restarts can pay for; needs a heap profile (py-spy / tracemalloc)`,{meta:{poolKey:i.key,rssMb:Math.round(i.rssBytes/$),thresholdMb:Math.round(o.thresholdBytes/$),maxRestartsPerWindow:this.opts.policy.maxRestartsPerWindow,restartWindowMs:this.opts.policy.restartWindowMs}})}for(let e of[...this.pools.keys()])t.some(t=>t.key===e)||this.pools.delete(e);let i=n4(n);if(i===null)return;let a=n.find(e=>e.key===i),o=r.get(i),s=this.pools.get(i),c=s.state.restartsAt.length+1;this.opts.log.warn(`pool memory watchdog restarting pool — RSS over threshold`,{meta:{poolKey:i,pids:s.pids,rssMb:Math.round(a.rssBytes/$),thresholdMb:Math.round(a.thresholdBytes/$),baselineMb:o.baselineBytes===null?null:Math.round(o.baselineBytes/$),restartsInWindow:c,deferredCandidates:n.filter(e=>e.key!==i).map(e=>e.key)}});try{await this.opts.restart(i),this.pools.set(i,{state:e4(s.state,this.now()),pids:[]})}catch(e){this.opts.log.error(`pool memory watchdog restart failed`,{meta:{poolKey:i,error:e instanceof Error?e.message:String(e)}})}}};function i4(e,t){if(e.length!==t.length)return!1;let n=[...e].sort((e,t)=>e-t),r=[...t].sort((e,t)=>e-t);return n.every((e,t)=>e===r[t])}function a4(e,t,n){let r=t*n;if(r<=0||e.length===0)return Array.from({length:Math.max(0,r)}).fill(!1);let i=Array.from({length:r}).fill(!1);for(let r=0;r<n;r++)for(let a=0;a<t;a++){let o=(a+.5)/t,s=(r+.5)/n;for(let n of e)if(o>=n.x&&o<=n.x+n.w&&s>=n.y&&s<=n.y+n.h){i[r*t+a]=!0;break}}return i}function o4(e,t,n,r){if(t<=0||n<=0||r<=0)return[];let i=t*n,a=Array.from({length:i}).fill(!1),o=Math.min(e.length,i);for(let t=0;t<o;t++)a[t]=e[t]===!0;let s=[],c=[];for(let e=0;e<=n;e++){let r=[];if(e<n){let n=-1;for(let i=0;i<=t;i++){let o=i<t&&a[e*t+i]===!0;o&&n===-1?n=i:!o&&n!==-1&&(r.push({colStart:n,colEnd:i-1}),n=-1)}}let i=new Set,o=[];for(let t of c){let n=r.findIndex(e=>e.colStart===t.colStart&&e.colEnd===t.colEnd);n>=0?(o.push(t),i.add(n)):s.push({...t,rowEnd:e-1})}for(let t=0;t<r.length;t++)if(!i.has(t)){let n=r[t];o.push({colStart:n.colStart,colEnd:n.colEnd,rowStart:e})}c.length=0;for(let e of o)c.push(e)}if(s.length===0)return[];let l=s.slice().toSorted((e,t)=>{let n=(e.colEnd-e.colStart+1)*(e.rowEnd-e.rowStart+1);return(t.colEnd-t.colStart+1)*(t.rowEnd-t.rowStart+1)-n});return(r>0?l.slice(0,r):l).map(e=>({x:e.colStart/t,y:e.rowStart/n,w:(e.colEnd-e.colStart+1)/t,h:(e.rowEnd-e.rowStart+1)/n}))}var s4=class{capacity;items;head=0;tail=0;count=0;constructor(e){this.capacity=e,this.items=Array.from({length:e})}get size(){return this.count}push(e){this.items[this.tail]=e,this.tail=(this.tail+1)%this.capacity,this.count<this.capacity?this.count++:this.head=(this.head+1)%this.capacity}drain(e){let t=[],n=Math.min(e,this.count);for(let e=0;e<n;e++)t.push(this.items[this.head]),this.items[this.head]=void 0,this.head=(this.head+1)%this.capacity;return this.count-=n,t}};async function c4(e,t){let n=performance.now();try{return{output:t===void 0?await e():await u4(e(),t),durationMs:l4(performance.now()-n),ok:!0}}catch(e){return{output:void 0,durationMs:l4(performance.now()-n),ok:!1,error:M2(e)}}}function l4(e){return Math.round(e*100)/100}function u4(e,t){return new Promise((n,r)=>{let i=setTimeout(()=>r(Error(`Inference timeout after ${t}ms`)),t);e.then(e=>{clearTimeout(i),n(e)}).catch(e=>{clearTimeout(i),r(e)})})}var d4={openvino:`openvino`,edgetpu:`tflite`,coreml:`coreml`,onnx:`onnx`,cpu:`onnx`,cuda:`onnx`};function f4(e){return d4[e]??`onnx`}var p4={onnx:`onnx`,coreml:`coreml`,openvino:`openvino`,tflite:`tflite`,pytorch:`pt`},m4={coreml:`coreml_inference.py`,pytorch:`pytorch_inference.py`,openvino:`openvino_inference.py`};function h4(e){return p4[e]}function g4(e){return m4[e]}function _4(e){return e===`coreml`||e===`pytorch`||e===`openvino`}function v4(e){return new Promise(t=>setTimeout(t,Math.max(0,e)))}function y4(e,t){return t.aborted?Promise.resolve():new Promise(n=>{let r=setTimeout(()=>{t.removeEventListener(`abort`,i),n()},Math.max(0,e)),i=()=>{clearTimeout(r),t.removeEventListener(`abort`,i),n()};t.addEventListener(`abort`,i,{once:!0})})}function b4(e){let t=e instanceof Float32Array?e:Float32Array.from(e),n=new Uint8Array(t.length*4),r=new DataView(n.buffer);for(let e=0;e<t.length;e+=1)r.setFloat32(e*4,t[e]??0,!0);return Buffer.from(n).toString(`base64`)}function x4(e){let t=Buffer.from(e,`base64`);if(t.byteLength%4!=0)throw Error(`decodeVectorBase64: ${t.byteLength} bytes is not a whole number of Float32 values`);let n=new Float32Array(t.byteLength/4);for(let e=0;e<n.length;e+=1)n[e]=t.readFloatLE(e*4);return n}function S4(e){return Math.floor(Buffer.from(e,`base64`).byteLength/4)}function C4(e,t,n,r,i){if(n.length===0||t.length===0)return{passed:e,excluded:[]};let a=n.filter(e=>e.enabled!==!1),o=a.filter(e=>e.mode===`include`),s=a.filter(e=>e.mode===`exclude`),c=o.length>0,l=new Map(t.map(e=>[e.id,e])),u=[],d=[];for(let t of e){let e=r(t),n=i?.(t),a=o.some(t=>w4(t,e,n,l)),f=s.some(t=>w4(t,e,n,l));c?a&&!f?u.push(t):d.push(t):f?d.push(t):u.push(t)}return{passed:u,excluded:d}}function w4(e,t,n,r){if(e.classFilter&&e.classFilter.length>0&&n!==void 0&&!e.classFilter.includes(n))return!1;for(let n of e.zoneIds){let e=r.get(n);if(e&&T4(t,e.polygon))return!0}return!1}function T4(e,t){if(t.length<3)return!1;let n=!1,{x:r,y:i}=e;for(let e=0,a=t.length-1;e<t.length;a=e++){let o=t[e],s=t[a];o.y>i!=s.y>i&&r<(s.x-o.x)*(i-o.y)/(s.y-o.y||2**-52)+o.x&&(n=!n)}return n}function E4(e,t,n){let r={};for(let i of Object.keys(n))r[i]=n=>e.addons.custom.mutate({addonId:t,action:i,input:n});return r}var D4={value:`auto`,label:`Auto`},O4={value:`cpu`,label:`CPU`},k4={value:`usb`,label:`Coral USB`},A4=[{id:`onnx`,supports:()=>!0,devices:e=>{if(!e)return[O4];let t=[O4];return e.gpu?.type===`nvidia`&&t.push({value:`cuda`,label:`CUDA`}),e.npu?.type===`apple-ane`&&t.push({value:`coreml`,label:`CoreML EP`}),t},defaultDevice:`cpu`},{id:`openvino`,supports:e=>e?.arch===`x64`&&e.platform!==`darwin`&&e.gpu?.type===`intel`,devices:e=>{if(!e)return[D4];let t=[D4,O4];return e.gpu?.type===`intel`&&t.push({value:`gpu`,label:`GPU`}),e.npu?.type===`intel-npu`&&t.push({value:`npu`,label:`NPU`}),t},defaultDevice:`auto`},{id:`coreml`,supports:e=>e?.platform===`darwin`,devices:e=>{let t={value:`all`,label:`All (ANE + GPU + CPU)`};if(!e)return[t];let n=[t];return e.npu?.type===`apple-ane`&&n.push({value:`ane`,label:`Apple Neural Engine`}),n.push({value:`gpu`,label:`GPU`},O4),n},defaultDevice:`all`},{id:`edgetpu`,supports:e=>e?.coral!=null,devices:()=>[k4],defaultDevice:`usb`}];function j4(e){let t=A4.find(t=>t.id===e);if(!t)throw Error(`Unknown runtime: ${e}`);return t}function M4(e){return A4.filter(t=>t.supports(e)).map(e=>e.id)}function N4(e,t){return j4(e).devices(t)}function P4(e){return j4(e).defaultDevice}function F4(e){return e===`edgetpu`?`tflite`:h4(e)}function I4(e){let t=[];if(e.platform===`darwin`&&e.arch===`arm64`&&t.push({runtime:`python`,backend:`coreml`,format:`coreml`,score:95,reason:`Apple Neural Engine (Python CoreML)`,available:!0}),e.gpu?.type===`nvidia`&&t.push({runtime:`python`,backend:`cuda`,format:`onnx`,score:85,reason:`NVIDIA CUDA (Python ONNX Runtime)`,available:!0}),e.gpu?.type===`intel`){let n=e.npu?.type===`intel-npu`?90:80;t.push({runtime:`python`,backend:`openvino`,format:`openvino`,score:n,reason:`Intel OpenVINO`,available:!0})}e.coral!=null&&t.push({runtime:`python`,backend:`edgetpu`,format:`tflite`,score:70,reason:`Coral Edge TPU (Python LiteRT)`,available:!0}),t.push({runtime:`python`,backend:`cpu`,format:`onnx`,score:50,reason:`CPU (Python ONNX Runtime)`,available:!0});let n=t.toSorted((e,t)=>t.score-e.score);return{scores:n,best:n.find(e=>e.available)??n[n.length-1]}}var L4={cuda:`gpu`,edgetpu:`usb`,coreml:`all`,cpu:`cpu`};function R4(e,t,n,r){return{key:e===`cpu`?`cpu`:`${e}:${t}`,backend:e,device:t,format:n,runtime:`python`,score:r,available:!0}}function z4(e){let{scores:t}=I4(e),n=[];for(let r of t){if(r.backend===`openvino`){e.npu?.type===`intel-npu`&&n.push(R4(`openvino`,`npu`,r.format,r.score+2)),e.gpu?.type===`intel`&&n.push(R4(`openvino`,`gpu`,r.format,r.score));continue}if(r.backend===`edgetpu`){let t=Math.max(1,e.coral?.count??1);for(let e=0;e<t;e++){let t=e===0?`usb`:`usb:${e}`;n.push(R4(`edgetpu`,t,r.format,r.score))}continue}let t=L4[r.backend]??r.backend;n.push(R4(r.backend,t,r.format,r.score))}return n}var B4=t({ACCESSORY_LABEL:()=>MK,ACCESS_ROLES:()=>t2,ALEXA_EGRESS_PROFILE:()=>rr,ALL_CAPABILITY_DEFINITIONS:()=>JJ,APPEARANCE_BIN_COUNT:()=>96,APPEARANCE_BLOCKS:()=>bc,APPEARANCE_DESCRIPTOR_VERSION:()=>1,APPEARANCE_RESOLVES_AMBIGUITY_DEFAULT:()=>!1,APPLE_SA_TO_MACRO:()=>CC,ARCHIVED_DEBUG_NOTES_DEFAULT_LIMIT:()=>200,AUDIO_ANALYSIS_CAP_NAME:()=>ui,AUDIO_BACKEND_CHOICES:()=>Mf,AUDIO_CHUNK_FORMATS:()=>he,AUDIO_MACRO_LABELS:()=>xC,AUDIO_NOT_CLASSIFIED_REASONS:()=>wf,AUDIO_PRESETS:()=>Mn,AUDIO_SCALE_EPOCH_ISO:()=>lY,AUDIO_SCALE_EPOCH_MS:()=>uY,AUTOMATIC_HUB_ADDRESS_FLAGS:()=>zb,AUTO_SHARE_HEADROOM:()=>jA,AUTO_TUNE_FAMILY:()=>x1,AcceleratorKindSchema:()=>Yk,AccessoriesStatusSchema:()=>dF,AccessoryKind:()=>jK,AddBrokerInputSchema:()=>VS,AddRetrainFrameFromRecordingResultSchema:()=>yO,AddonAutoUpdateSchema:()=>NF,AddonListItemSchema:()=>DF,AddonPageDeclarationSchema:()=>Bd,AddonPageInfoSchema:()=>Rd,AdminLinkTargetEnum:()=>rv,AdoptionAdoptInputSchema:()=>Av,AdoptionAdoptResultSchema:()=>jv,AdoptionCandidateResultSchema:()=>$r,AdoptionFilterSchema:()=>Cv,AdoptionGetCandidateInputSchema:()=>Dv,AdoptionJobSchema:()=>ei,AdoptionJobStateSchema:()=>Zr,AdoptionListCandidatesInputSchema:()=>Tv,AdoptionListCandidatesOutputSchema:()=>Ev,AdoptionOutcomeSchema:()=>Qr,AdoptionReleaseInputSchema:()=>Mv,AdoptionStatusSchema:()=>Ov,AgentLoadSummarySchema:()=>dM,AirQualitySensorStatusSchema:()=>XF,AlarmArmModeSchema:()=>q,AlarmPanelStatusSchema:()=>HC,AlarmStateSchema:()=>VC,AlertSchema:()=>ff,AlertSeveritySchema:()=>lf,AlertSourceSchema:()=>df,AlertStatusSchema:()=>uf,AmbientLightSensorStatusSchema:()=>QF,AnalyticsLtsSeriesSchema:()=>ck,ApiKeyRecordSchema:()=>xE,ApiKeySummarySchema:()=>ZW,AppleFmAvailabilitySchema:()=>jx,AppleFmUnavailableReasonSchema:()=>Ax,ArchiveEntrySchema:()=>np,ArchiveManifestSchema:()=>rp,ArchiveSqliteSnapshotSchema:()=>Zf,ArchivedDebugNoteQueryInputSchema:()=>Hi,ArchivedDebugNoteSchema:()=>Vi,AttachmentMediaTypeSchema:()=>$S,AttachmentSchema:()=>eC,AudioAnalysisResultSchema:()=>Ef,AudioAnalysisSettingsSchema:()=>Df,AudioAttachDeviceInputSchema:()=>Of,AudioAttachDeviceResultSchema:()=>kf,AudioChunkFormatSchema:()=>Ia,AudioChunkInputSchema:()=>xf,AudioClassSummarySchema:()=>eI,AudioClassificationLabelSchema:()=>Cf,AudioClassificationResultSchema:()=>jf,AudioClassifyOutcomeSchema:()=>Tf,AudioCodecInfoSchema:()=>If,AudioDecodeSessionConfigSchema:()=>Lf,AudioDetachDeviceResultSchema:()=>Af,AudioEncodeSchema:()=>Cn,AudioEncodeSessionConfigSchema:()=>Rf,AudioEncodedChunkSchema:()=>Bf,AudioEventSchema:()=>GD,AudioLevelSchema:()=>Sf,AudioMetricsHistoryPointSchema:()=>nI,AudioMetricsHistorySchema:()=>rI,AudioMetricsSnapshotSchema:()=>tI,AudioPcmChunkSchema:()=>zf,AudioStreamPickSchema:()=>Ca,AuthResultSchema:()=>Uf,AutoTuneApplyInputSchema:()=>lA,AutoTuneApplyResultSchema:()=>dA,AutoTuneOptionsSchema:()=>sA,AutoTunePhaseResultSchema:()=>uA,AutoTunePlanSchema:()=>cA,AutoTuneWarningSchema:()=>oA,AutoUpdateSettingsSchema:()=>MF,AutomationActionSchema:()=>ud,AutomationConditionOperatorSchema:()=>ad,AutomationConditionSchema:()=>cd,AutomationControlStatusSchema:()=>aI,AutomationRecipeSchema:()=>dd,AutomationTriggerSchema:()=>ld,AvailableIntegrationTypeSchema:()=>hR,BASE_DEVICE_CAPS:()=>bg,BASE_LIVE_EGRESS_PROFILE:()=>tr,BATTERY_DEVICE_PROFILE:()=>Gq,BATTERY_UNREACHABLE_AFTER_MS:()=>QK,BENCH_ROOT_STEP_ID:()=>d0,BIRTH_DECISION_DEFAULT_LIMIT:()=>500,BOOT_RECOVERY_BACKOFF_MS:()=>b2,BUILTIN_RESULT_KINDS:()=>Lh,BackgroundRunRegistry:()=>O2,BacklightModeSchema:()=>sR,BackupDestinationInfoSchema:()=>$f,BackupEntrySchema:()=>tp,BackupRunPhaseSchema:()=>op,BackupRunSchema:()=>sp,BackupRunStateSchema:()=>ap,BackupTriggerResultSchema:()=>cp,BaseAddon:()=>pn,BaseDevice:()=>GK,BaseDeviceProvider:()=>ZK,BatteryStatusSchema:()=>sI,BinaryStatusSchema:()=>lI,BirthDecisionQueryInputSchema:()=>zi,BirthDecisionRecordSchema:()=>Ri,BirthDecisionVerdictSchema:()=>Li,BoundingBoxSchema:()=>yf,BrightnessStatusSchema:()=>dI,BrokerAddInputSchema:()=>_p,BrokerAudioClientSchema:()=>Bp,BrokerClientsSchema:()=>Wp,BrokerConnectionDetailsSchema:()=>BS,BrokerConsumerAttributionSchema:()=>Hp,BrokerConsumerKindSchema:()=>Vp,BrokerEncodedClientSchema:()=>Up,BrokerGetStateInputSchema:()=>Ap,BrokerInfoSchema:()=>fp,BrokerProviderInfoSchema:()=>mp,BrokerPublishInputSchema:()=>Ep,BrokerRegistryStatusSchema:()=>pp,BrokerRtspClientSchema:()=>zp,BrokerStatsSchema:()=>Va,BrokerStatusEnum:()=>dp,BrokerStatusSchema:()=>Ba,BrokerSubscribeInputSchema:()=>Dp,BrokerSubscribeResultSchema:()=>Op,BrokerTestConnectionResultSchema:()=>bp,BrokerUnsubscribeInputSchema:()=>kp,BulkRecordSchema:()=>A_,CAMERA_SENSORS_NOT_LOADED:()=>HE,CAMERA_SENSORS_SETTINGS_KEY:()=>OE,CAMERA_SWITCH_CATALOG:()=>mi,CAMERA_SWITCH_ORDER:()=>ri,CAMERA_TRIGGER:()=>EE,CAMSTACK_APP_LINK_ORIGIN:()=>Db,CAM_PROFILE_ORDER:()=>Sa,CAPABILITY_NAMES:()=>KJ,CAPABILITY_ROUTER_KEYS:()=>qJ,CAP_NAMES_WITH_STATUS:()=>GJ,CAP_NODE_PIN_CONTEXT_KEY:()=>xd,CAP_PROVIDER_KIND_MAP:()=>$J,CLASS_MAP_MACRO_TARGETS:()=>Wa,CLIP_BROKER_PACED_RATES:()=>WP,CLIP_PLAYBACK_OPTIONS:()=>ZP,CLIP_REALTIME_SOURCE_RATES:()=>KP,CLIP_REASON_HEADER_MAX:()=>500,CLIP_SEARCH_STRICTNESS:()=>Vc,CLIP_STILL_DISPOSITION_HEADER:()=>MP,CLIP_STILL_REASON_CODE_HEADER:()=>jP,CLIP_STILL_REASON_HEADER:()=>kP,CLIP_STREAM_SOURCE_RATES:()=>GP,CLIP_STREAM_TRANSPORT_HEADER:()=>NP,CLIP_STRICTNESS_FACTOR:()=>Uc,CLIP_VECTOR_INDEX_PATTERN:()=>zc,CLUSTER_MODEL_CHOICE_UNREADABLE_REASONS:()=>UE,CLUSTER_MODEL_SCOPED_STEPS:()=>WE,CLUSTER_MODEL_SECTION_ID:()=>GE,CLUSTER_STEP_SETTING_FIELDS:()=>iD,COCO_80_LABELS:()=>gC,COCO_TO_MACRO:()=>bC,COMPOSED_DEVICE_STABLE_ID_PREFIX:()=>xm,COMPOSED_ITEM_FIXED_FIELDS:()=>rg,COMPOSER_ADDON_ID:()=>ym,COMPOSER_RUNNER_ID:()=>Oh,COMPOSITION_EVENT_CATEGORY:()=>sh,COMPOSITION_ITEM_ARRAY_PATH:()=>Pm,COMPOSITION_ITEM_KEY_RE:()=>Nm,CONNECTION_TEST_TIMEOUT_MS:()=>WI,CONTAINER_CHILD_PRIORITY:()=>tq,CORE_BLOCKS_ADDON_ID:()=>qg,CORE_BLOCK_ADDON_PREFIX:()=>Kg,CROP_SUPPLY_SOURCES:()=>el,CROP_SUPPLY_STEP_IDS:()=>Kc,CUSTOMIZATION_BLOCK_NAME_PREFIX:()=>bm,CalendarColorSchema:()=>yI,CalendarEntrySchema:()=>bI,CalendarEventSchema:()=>gI,CalendarInfoSchema:()=>hI,CalendarListEventsInputSchema:()=>_I,CalendarPreferenceEntrySchema:()=>xI,CalendarPreferencesSchema:()=>SI,CalendarSetPreferenceInputSchema:()=>CI,CalendarSourceKindSchema:()=>mI,CamProfileSchema:()=>D,CamStreamDescriptorSchema:()=>qU,CamStreamKindSchema:()=>wa,CamStreamResolutionSchema:()=>Ta,CameraAssignmentStatusSchema:()=>_M,CameraAudioStatusSchema:()=>EM,CameraBrokerProfileSchema:()=>vM,CameraBrokerStatusSchema:()=>yM,CameraCredentialsSchema:()=>TI,CameraCredentialsStatusSchema:()=>EI,CameraDecoderStatusSchema:()=>bM,CameraDetectionPhaseSchema:()=>wM,CameraDetectionProvisioningSchema:()=>CM,CameraDetectionProvisioningStateSchema:()=>SM,CameraDetectionStatusSchema:()=>TM,CameraMetricsSchema:()=>mj,CameraMetricsWithDeviceIdSchema:()=>hj,CameraMotionStatusSchema:()=>xM,CameraOccupancySnapshotForDeviceSchema:()=>EG,CameraOverrideClearSchema:()=>iA,CameraOwnMotionSchema:()=>RE,CameraRawLevelSchema:()=>BE,CameraRecordingModeSchema:()=>DM,CameraRecordingStatusSchema:()=>OM,CameraSensorAttachmentSchema:()=>IE,CameraSensorEntrySchema:()=>NE,CameraSensorModeSchema:()=>jE,CameraSensorRefSchema:()=>kE,CameraSensorsConfigSchema:()=>PE,CameraSensorsNotEnforcedSchema:()=>zE,CameraSensorsNotForwardedSchema:()=>LE,CameraSensorsStatusSchema:()=>VE,CameraSourceStatusSchema:()=>gM,CameraSourceStreamSchema:()=>hM,CameraStatusDegradationReasonSchema:()=>AM,CameraStatusDegradationSchema:()=>jM,CameraStatusSchema:()=>NM,CameraStatusStageSchema:()=>kM,CameraStreamSchema:()=>Ea,CameraSwitchAuthoritySchema:()=>ii,CameraSwitchGroupSchema:()=>ci,CameraSwitchIdSchema:()=>ni,CameraSwitchSchema:()=>si,CameraSwitchUnavailableReasonSchema:()=>ai,CameraSwitchWarningSchema:()=>oi,CandidateQueryFilterSchema:()=>wv,CapScopeSchema:()=>gE,CapabilityBindingsSchema:()=>pM,CapacityFallbackSchema:()=>CA,CapacitySourceSchema:()=>SA,CarbonMonoxideStatusSchema:()=>PI,ChargingStatus:()=>hf,ClaimOutcomeSchema:()=>$y,ClaimsListingSchema:()=>tb,ClearTrackRelationInputSchema:()=>Zi,ClearTrackRelationResultSchema:()=>Qi,ClientNetworkStatsSchema:()=>qz,ClimateControlStatusSchema:()=>LI,ClipBytesOfferSchema:()=>BP,ClipBytesSchema:()=>zP,ClipExportFailureSchema:()=>jH,ClipModelMetaSchema:()=>Bc,ClipPlaybackOptionsSchema:()=>qP,ClipPlaybackSchema:()=>FP,ClipSchema:()=>PP,ClipSearchStrictnessSchema:()=>Hc,ClipSourceAvailabilitySchema:()=>JP,ClipSourceSchema:()=>YP,ClipStillDispositionSchema:()=>OP,ClipStillRefusalCodeSchema:()=>DP,ClipStreamAudioReasonSchema:()=>HP,ClipStreamAudioSchema:()=>VP,ClipStreamDialSchema:()=>UP,ClipWakeSchema:()=>IP,ClusterAddonNodeDeploymentSchema:()=>rB,ClusterAddonStatusEntrySchema:()=>iB,ClusterModelChoiceSchema:()=>LM,CollectionColumnSchema:()=>j_,CollectionIndexSchema:()=>M_,ColorStatusSchema:()=>HI,ComposableCapabilitiesSchema:()=>Ug,ComposableCapabilitySchema:()=>Hg,ComposableFieldSchema:()=>Vg,ComposerApplyInputSchema:()=>jh,ComposerApplyResultSchema:()=>Nh,ComposerBlockSchema:()=>kh,ComposerBlockVerdictSchema:()=>Mh,ComposerUnreadableBlockSchema:()=>Ah,CompositionBindingSchema:()=>Dm,CompositionBlockInputSchema:()=>s_,CompositionBlockStateSchema:()=>Dh,CompositionCodeSourceSchema:()=>km,CompositionCommandTargetSchema:()=>Mm,CompositionCustomizationReadSchema:()=>h_,CompositionEventPlanSchema:()=>lh,CompositionExistingTargetSchema:()=>Vm,CompositionExpressionSourceSchema:()=>Om,CompositionFeatureModeSchema:()=>xh,CompositionFeaturePlanSchema:()=>Sh,CompositionFeatureSchema:()=>Rm,CompositionFieldItemSchema:()=>vh,CompositionFieldKindSchema:()=>hh,CompositionFieldPlanSchema:()=>yh,CompositionFieldReadSchema:()=>wm,CompositionFieldRoleSchema:()=>_h,CompositionFieldSourceSchema:()=>Am,CompositionFieldStateKindSchema:()=>Th,CompositionFieldStateSchema:()=>Eh,CompositionFieldsFeatureSchema:()=>Im,CompositionForwardCommandSchema:()=>jm,CompositionFromSourceSchema:()=>Tm,CompositionGetReadSchema:()=>m_,CompositionGraphError:()=>lg,CompositionItemEntrySchema:()=>Fm,CompositionListReadSchema:()=>p_,CompositionLiteralBindingSchema:()=>Em,CompositionNewTargetSchema:()=>Bm,CompositionPassthroughFeatureSchema:()=>Lm,CompositionProblemCodeSchema:()=>ph,CompositionProblemSchema:()=>mh,CompositionRunStatusSchema:()=>wh,CompositionSchema:()=>Um,CompositionSourceRefSchema:()=>Cm,CompositionStateReadSchema:()=>u_,CompositionTargetSchema:()=>Hm,CompositionUnavailableModeSchema:()=>gh,CompositionValidationSchema:()=>Ch,CompositionViewSchema:()=>d_,ConfigEntrySchema:()=>fy,ConfigSectionWithValuesSchema:()=>qd,ConfigTabDeclarationSchema:()=>Kd,ConnectionTestDescriptorSchema:()=>qI,ConnectionTestInputSchema:()=>KI,ConnectionTestOutcomeSchema:()=>GI,ConnectivityStatusSchema:()=>YI,ConsumableItemSchema:()=>$I,ConsumableRemainingSchema:()=>QI,ConsumableRemainingUnitSchema:()=>ZI,ConsumablesStatusSchema:()=>eL,ContactStatusSchema:()=>nL,ControlKindSchema:()=>iL,ControlStatusSchema:()=>aL,ConvertArtifactSchema:()=>Bl,ConvertResultSchema:()=>Vl,ConvertTargetSchema:()=>Rl,CoreBlockCompileInputSchema:()=>__,CoreBlockCompileResultSchema:()=>g_,CoreBlockFilesSchema:()=>$g,CoreBlockInputFieldsSchema:()=>t_,CoreBlockInputSchema:()=>n_,CoreBlockPlacementSchema:()=>Xg,CoreBlockSchema:()=>W,CoreBlockSourceSchema:()=>o_,CoreBlockStatusSchema:()=>Zg,CoverStateSchema:()=>cL,CoverStatusSchema:()=>lL,CreateApiKeyInputSchema:()=>QW,CreateApiKeyResultSchema:()=>$W,CreateIntegrationInputSchema:()=>vR,CreateRetrainDatasetVersionResultSchema:()=>DO,CreateScopedTokenInputSchema:()=>tG,CreateScopedTokenResultSchema:()=>nG,CreateUserInputSchema:()=>YW,CustomActionInputSchema:()=>JF,CustomModelDescriptorSchema:()=>C_,DATABASE_SNAPSHOT_PARTIAL_SUFFIX:()=>Kf,DATABASE_SNAPSHOT_SUFFIX:()=>Gf,DATABASE_SNAPSHOT_TIMEOUT_MS:()=>qf,DATAPLANE_SECRET_HEADER:()=>Gr,DAYS_PER_WEEK:()=>7,DAY_NAMES:()=>nU,DECLARED_DEVICE_SWEEP_LIMIT:()=>32,DECLARED_INTEGRATION_FIXED_KEY:()=>lq,DEFAULT_ADDON_PLACEMENT:()=>Lr,DEFAULT_AUDIO_ANALYZER_CONFIG:()=>Nf,DEFAULT_CAMERA_FPS:()=>10,DEFAULT_CAMERA_SENSOR_MODE:()=>ME,DEFAULT_CLUSTER_STEP_MODELS:()=>JE,DEFAULT_CLUSTER_STEP_SETTINGS:()=>lD,DEFAULT_CORE_BLOCK_ENTRY:()=>Qg,DEFAULT_DECODER_HWACCEL_CONFIG:()=>ev,DEFAULT_DETAIL_CROP_CONVENTION:()=>C0,DEFAULT_EVENTS_BAND_BUFFER_SEC:()=>ao,DEFAULT_EVENT_COLOR:()=>DC,DEFAULT_FEATURES:()=>ma,DEFAULT_FIRST_SIGHTING_FRESHNESS_MS:()=>eu,DEFAULT_HEADROOM:()=>C1,DEFAULT_MIN_LANDMARK_FACE_SIZE_PX:()=>24,DEFAULT_MIN_SESSIONS_PER_DEVICE:()=>2,DEFAULT_NATIVE_LEASE_SETTINGS:()=>H0,DEFAULT_OVERLAY_LAYERS:()=>Sc,DEFAULT_POOL_MEMORY_POLICY:()=>G2,DEFAULT_RECORDING_PROFILES:()=>fo,DEFAULT_RETENTION:()=>ti,DEFAULT_RUNTIME_STATE_DURABILITY:()=>Td,DEFAULT_SESSION_PLACEMENT_POLICY:()=>pA,DEFAULT_SHARE_SOURCE:()=>kA,DEFAULT_TIMELAPSE_PREVIEW_TEXT:()=>E$,DEFAULT_TOKEN_EXPIRY:()=>`30d`,DERIVED_CAMERA_SILENCED_CAP_NAMES:()=>pi,DETAIL_CROP_PADDING_FIELD:()=>O0,DETAIL_CROP_PADDING_KEY:()=>b0,DETAIL_CROP_SECTION_ID:()=>y0,DETAIL_CROP_SQUARE_KEY:()=>x0,DETECTION_MACRO_CLASSES:()=>vC,DETECTION_PIPELINE_CAP_NAME:()=>li,DETECTOR_ACCURACY:()=>b1,DETECTOR_PERF:()=>y1,DEVICE_BACKEND_TO_FORMAT:()=>d4,DEVICE_CAP_NAMES:()=>Eq,DEVICE_CHILDREN_BATCH_MAX:()=>256,DEVICE_DO_ACTIONS:()=>Oq,DEVICE_PROFILES:()=>Kq,DEVICE_RAMP:()=>$1,DEVICE_RESTORE_RETRY_CONCURRENCY:()=>4,DEVICE_RESTORE_RETRY_DELAYS_MS:()=>KK,DEVICE_SCOPED_CAPS:()=>YJ,DEVICE_SETTINGS_CONTRIBUTION_METHODS:()=>Ad,DEVICE_STATE_READERS:()=>TK,DEVICE_STATUS_METHOD:()=>jd,DEVICE_TYPE_CONTROL_KIND:()=>mq,DEVICE_TYPE_DO_CAPS:()=>Nq,DEVICE_TYPE_INFO:()=>y2,DISPLAY_ICON_GROUPS:()=>$q,DISPLAY_ICON_KEYS:()=>tJ,DISPLAY_ICON_OFFERED_KEYS:()=>nJ,DISPLAY_ICON_VOCABULARY:()=>eJ,DOORBELL_RISE_DEBOUNCE_MS:()=>uK,DataStoreEngineInfoSchema:()=>P_,DatabaseSnapshotResultSchema:()=>Xf,DatabaseSnapshotTableSchema:()=>Yf,DatabaseSnapshotTargetsSchema:()=>Jf,DayNightModeSchema:()=>dL,DayNightOptionsSchema:()=>mL,DayNightSettingsPatchSchema:()=>hL,DayNightStatusSchema:()=>pL,DeclaredDevices:()=>dq,DecodedAudioChunkSchema:()=>La,DeleteIntegrationResultSchema:()=>bR,DetailCropConventionSchema:()=>S0,DetectionCatalogClassMapSchema:()=>qa,DetectionSourceSchema:()=>BD,DetectionSourcesSchema:()=>Wj,DetectorStoreClearSchema:()=>aA,DeviceAdminLinkSchema:()=>iv,DeviceCodeSeveritySchema:()=>DR,DeviceConfig:()=>PK,DeviceDiscoveryStatusSchema:()=>xv,DeviceExportExposeInputSchema:()=>Hv,DeviceExportStatusSchema:()=>zv,DeviceExportUnexposeInputSchema:()=>Uv,DeviceFeature:()=>mf,DeviceInfoSchema:()=>dy,DeviceModelChoiceSchema:()=>$k,DeviceNetworkStatsSchema:()=>Jz,DeviceRecommendationSchema:()=>eA,DeviceRestoreRetryScheduler:()=>YK,DeviceRole:()=>z,DeviceRuntimeState:()=>HK,DeviceSelectorSchema:()=>_E,DeviceStatusSchema:()=>xL,DeviceType:()=>R,DiagnosticIdSchema:()=>CW,DiagnosticWindowPatchSchema:()=>AW,DiagnosticWindowSchema:()=>kW,DiscoveredChildDeviceSchema:()=>bv,DiscoveredChildStatusSchema:()=>yv,DiscoveredDeviceSchema:()=>ty,DiscoveredTargetSchema:()=>uC,DiskReconcileJobSchema:()=>MM,DisposerChain:()=>xn,DoorbellPressEventSchema:()=>wL,DoorbellStatusSchema:()=>CL,EMBEDDING_MODEL_FAILED:()=>cb,EMBEDDING_REQUIREMENTS_FAILED:()=>ub,EMBEDDING_REQUIREMENTS_UNAVAILABLE:()=>lb,EVENTFUL_CAP_NAMES:()=>YM,EVENT_DENSITY_BATCH_MAX:()=>200,EVENT_KIND_BY_CAP:()=>JM,EVENT_KIND_LABELS:()=>c$,EVENT_KIND_LABEL_KEYS:()=>s$,EVENT_OWNER_TYPES:()=>ke,EVENT_PAD_MS:()=>Ja,EVENT_TAXONOMY:()=>MC,EXPORT_DENSE_MAX_RANGES:()=>200,EXPRESSION_BUILTINS:()=>hu,EXPRESSION_BUILTIN_NAMES:()=>gu,EXPRESSION_COMPILE_CACHE_CAPACITY:()=>256,EXPRESSION_IDENTIFIER_RE:()=>yu,EXPRESSION_INJECTED_NOW:()=>`now`,EXTENSION_HOST_DEVICE_TYPES:()=>Fy,EXTENSION_SLOTS:()=>Ny,EXTENSION_SLOT_IDS:()=>jy,EXTENSION_SLOT_LISTING_METHOD:()=>Iy,EXTENSION_SLOT_REF_SEPARATOR:()=>`:`,EffectiveDeviceShareSchema:()=>IA,EffectiveNodeShareSchema:()=>LA,EffectiveSharesSchema:()=>RA,EffectiveTuningSchema:()=>vk,EgressEncodeSchema:()=>Xp,EgressRateControlSchema:()=>Zp,EgressTranscodeRequestSchema:()=>Qp,EgressTranscodeSchema:()=>$p,ElementConfigStore:()=>A2,EmbeddingFailedModelSchema:()=>ab,EmbeddingFailedRequirementSchema:()=>ob,EmbeddingInfoSchema:()=>sb,EmbeddingRefusalCodeSchema:()=>db,EmbeddingResultSchema:()=>rb,EmbeddingTowerSchema:()=>ib,EncodeProfileSchema:()=>wn,EnrichedWidgetMetadataSchema:()=>rf,EnumSensorDateTimeFormatSchema:()=>EL,EnumSensorStatusSchema:()=>DL,EventCategory:()=>T,EventDensityBucketSchema:()=>VO,EventDensityForDeviceSchema:()=>HO,EventEmitterStatusSchema:()=>AL,EventFireSchema:()=>kL,EventKindCategorySchema:()=>gD,EventKindDescriptorSchema:()=>vD,EventKindIconSchema:()=>hD,EventKindSchema:()=>pD,EventKindsForDeviceSchema:()=>yD,EventMediaArtifactSchema:()=>Fp,EventMediaCoverageSchema:()=>Ip,EventMediaKindSchema:()=>Pp,EventMediaProductionSchema:()=>Lp,EventOwnerTypeSchema:()=>Ae,EventSourceType:()=>WJ,ExportBytesSchema:()=>IH,ExportClipSubjectSchema:()=>OH,ExportDenseRangeSchema:()=>SH,ExportDenseSchema:()=>CH,ExportDownloadSchema:()=>PH,ExportFootageSubjectSchema:()=>DH,ExportOptionsSchema:()=>TH,ExportRecordSchema:()=>AH,ExportSetupFieldSchema:()=>Lv,ExportSetupSchema:()=>Rv,ExportSpeedSchema:()=>xH,ExportStateSchema:()=>EH,ExportSubjectSchema:()=>kH,ExportTimelapseSchema:()=>wH,ExposedDeviceSchema:()=>Vv,ExposureModeSchema:()=>oR,ExpressionBindingSourceSchema:()=>rd,ExpressionEvalError:()=>j,ExpressionFieldBindingSchema:()=>ed,ExpressionGlobalBindingSchema:()=>nd,ExpressionLiteralBindingSchema:()=>td,ExpressionParseError:()=>A,ExpressionSourceSchema:()=>id,ExtensionCandidateSchema:()=>Ky,ExtensionCandidatesSchema:()=>qy,ExtensionSetResultSchema:()=>Jy,ExtensionSetSlotInputSchema:()=>Xy,ExtensionSlotActivationSchema:()=>Vy,ExtensionSlotIdSchema:()=>My,ExtensionSlotRefInputSchema:()=>Yy,ExtensionSlotRowSchema:()=>Wy,ExtensionSlotSourceSchema:()=>By,ExtensionSlotStateSchema:()=>Hy,ExtensionSlotUnreachableSchema:()=>Uy,ExtensionSlotValueSchema:()=>Py,ExtensionSourceAvailabilitySchema:()=>Ly,ExtensionSourceHealthSchema:()=>zy,ExtensionSourceSchema:()=>Ry,ExternalIdentityKeySchema:()=>sG,ExternalIdentitySchema:()=>oG,FEEDER_EXAMPLE_ADDON_ID:()=>sK,FEEDER_EXAMPLE_HA_DEVICE_ID:()=>oK,FFMPEG_PATH_ENV:()=>jr,FIRST_LEVEL_MACRO_CLASSES:()=>Ga,FRIGATE_PLUS_CLASS_FLOORS:()=>CK,FRIGATE_PLUS_TO_MACRO:()=>vK,FRIGATE_PLUS_UNMAPPED_LABELS:()=>yK,FRIGATE_STOCK_CLASS_FLOORS:()=>SK,FULL_IMAGE_BBOX:()=>D0,FailureContributionSchema:()=>Sb,FailureCounters:()=>Qs,FailureReasonCountSchema:()=>xb,FanControlStatusSchema:()=>WL,FanDirectionSchema:()=>UL,FeatureManifestSchema:()=>lW,FeatureProbeStatusSchema:()=>KL,FieldClaimModeSchema:()=>Qy,FieldClaimSchema:()=>eb,FloodStatusSchema:()=>JL,Fmp4BoxSplitter:()=>ur,FrameHandleSchema:()=>Fa,FrameInputSchema:()=>vf,FrameLazyCountersSchema:()=>Qj,FrameLazyMetricsSchema:()=>$j,G711_SCALE_CORRECTION_DB:()=>dY,GasStatusSchema:()=>XL,GetLoggingSettingsInputSchema:()=>IW,GetStreamWithCodecInputSchema:()=>Jp,GlobalMetricsSchema:()=>fM,GridLayoutPatchSchema:()=>MI,GridLayoutViewSchema:()=>jI,HAP_AUDIO_BASE:()=>or,HAP_AUDIO_BITRATE_KBPS:()=>24,HAP_AUDIO_VBV_KBITS:()=>96,HAP_KEYFRAME_INTERVAL_SEC:()=>4,HF_BASE_URL:()=>kK,HF_REPO:()=>OK,HOURS_PER_DAY:()=>24,HUB_ADDRESS_ROLES:()=>Ib,HUB_VIEWER_MOUNT:()=>Ob,HWACCEL_OPTIONS:()=>$_,HardwareClassIdSchema:()=>Jk,HealthStatusSchema:()=>uW,HfModelResolutionSchema:()=>Ux,HistoryPointSchema:()=>kG,HistoryResolutionEnum:()=>DG,HubAddressRoleSchema:()=>HR,HumidifierStatusSchema:()=>QL,HumiditySensorStatusSchema:()=>eR,HvacModeSchema:()=>II,INFERENCE_DEVICE_EXCLUSION_REASONS:()=>PM,INVERTIBLE_CAPS:()=>pK,ImageContractSchema:()=>eN,ImageContractStateSchema:()=>$M,ImageRotateSchema:()=>iR,ImageSettingsOptionsSchema:()=>uR,ImageSettingsPatchSchema:()=>dR,ImageSettingsStatusSchema:()=>lR,ImageStatusSchema:()=>nR,InferenceDeviceExclusionReasonSchema:()=>FM,IngestOwnerSchema:()=>mM,InstalledPackageSchema:()=>OF,IntegrationLiteSchema:()=>mR,IntegrationWithStateSchema:()=>pR,IntercomAbilitySchema:()=>SR,IntercomStatusSchema:()=>CR,KEYCHAIN_MAX_REFS_PER_CALL:()=>512,KEYCHAIN_RESET_CONFIRMATION:()=>X_,KNOWN_CAP_NAMES:()=>Tq,KeptReasonSchema:()=>Zk,KeyEventSchema:()=>RO,KeychainAdminSecretSchema:()=>q_,KeychainAuditActionSchema:()=>J_,KeychainAuditEntrySchema:()=>Y_,KeychainKeySourceKindSchema:()=>U_,KeychainKeySourceSchema:()=>W_,KeychainResolveEntrySchema:()=>R_,KeychainResolveResultSchema:()=>z_,KeychainSecretMetaSchema:()=>B_,KeychainSecretUsageSchema:()=>K_,KeychainStateSchema:()=>L_,KeychainStatusSchema:()=>G_,KeychainUnavailableReasonSchema:()=>I_,KeychainWriteRefusedError:()=>It,LABEL_SUPPLY_MACRO:()=>Qc,LABEL_SUPPLY_STEP_IDS:()=>Gc,LABEL_SUPPLY_VOCABULARIES:()=>Zc,LEGACY_READ_ONLY_CONFIG_KEY:()=>ps,LINKED_DEVICES_SLOT:()=>gy,LINKED_LABEL_STEP_PREFIX:()=>il,LOAD_CONTRIBUTION_ATTRIBUTIONS:()=>Yx,LOAD_CONTRIBUTION_ROLES:()=>Jx,LOCATION_DESCRIPTION_MAX:()=>400,LOCATION_ICON_FALLBACK:()=>Kv,LOCATION_ICON_IDS:()=>Gv,LOG_CHANNEL_TICK_MS:()=>qs,LOG_LEVEL_RANK:()=>ha,LTS_SCOPE_CLASS_SEPARATOR:()=>`|`,LabelAttributionSchema:()=>ND,LabelDefinitionSchema:()=>Ua,LabelTierSchema:()=>MD,LatencySourceSchema:()=>Qk,LawnMowerActivitySchema:()=>ER,LawnMowerControlStatusSchema:()=>OR,LedgerWalkDeviceReportSchema:()=>es,LedgerWalkInputSchema:()=>Xo,LedgerWalkRefusalSchema:()=>Zo,LedgerWalkReportSchema:()=>ts,LedgerWalkSkipCountsSchema:()=>$o,LedgerWalkSkipReasonSchema:()=>Qo,LegacyStorageLocationDefaultSchema:()=>Es,LinkedDeviceSchema:()=>my,LinkedDevicesModeSchema:()=>py,LinkedDevicesSlotValueSchema:()=>hy,ListNodeBenchmarkResultsInputSchema:()=>lj,ListTrackRelationsInputSchema:()=>ta,ListTrackRelationsResultSchema:()=>na,LlmDefaultSchema:()=>Bx,LlmDefaultSelectorSchema:()=>zx,LlmDownloadProgressSchema:()=>Tx,LlmErrorCodeSchema:()=>px,LlmGenerateBaseInputSchema:()=>xx,LlmGenerateErrSchema:()=>gx,LlmGenerateOkSchema:()=>mx,LlmGenerateResultSchema:()=>_x,LlmImageSchema:()=>vx,LlmNodeModelSchema:()=>Dx,LlmProfileKindDescriptorSchema:()=>Rx,LlmProfileKindSchema:()=>Fx,LlmProfileSchema:()=>Ix,LlmRefusalSourceSchema:()=>hx,LlmRetryPolicySchema:()=>yx,LlmRuntimeAppleCompleteInputSchema:()=>Mx,LlmRuntimeCancelInputSchema:()=>Nx,LlmRuntimeCompleteInputSchema:()=>kx,LlmRuntimeDiskUsageSchema:()=>Ox,LlmRuntimeNodeSchema:()=>Wx,LlmRuntimeStatusSchema:()=>Ex,LlmTimeoutDefaults:()=>bx,LlmUsageRollupSchema:()=>Vx,LlmUsageSchema:()=>fx,LoadBalancingSharesInputSchema:()=>gA,LoadContributionSchema:()=>Xx,LocateSegmentResultSchema:()=>gH,LocationDescriptionAssignmentSchema:()=>Zv,LocationIconAssignmentSchema:()=>Jv,LocationIconIdSchema:()=>qv,LocationStatSchema:()=>ip,LockControlStatusSchema:()=>ZR,LockStateSchema:()=>XR,LogChannelApplyResultSchema:()=>Qx,LogChannelDescriptorSchema:()=>zs,LogChannelGate:()=>Vs,LogChannelLevelSchema:()=>Rs,LogChannelRegistry:()=>Hs,LogChannelWindowPatchSchema:()=>MW,LogChannelWindowSchema:()=>Bs,LogChannelWindowStateSchema:()=>jW,LogEntrySchema:()=>tS,LogLevelSchema:()=>eS,LogStreamEntrySchema:()=>KF,LoggingEffectiveSchema:()=>DW,LoggingExplicitSchema:()=>OW,LoggingLevelLayerSchema:()=>EW,LoggingLevelSourceSchema:()=>TW,LoggingScopeKindSchema:()=>wW,LoggingSettingsPatchSchema:()=>NW,LoggingSettingsStateSchema:()=>RW,LoginMethodContributionSchema:()=>sS,LoginStageEnum:()=>rS,LtsBucketSchema:()=>dk,MACRO_LABELS:()=>_C,MASK_EMITTING_POSTPROCESSORS:()=>ll,MASK_SUPPLY_STEP_IDS:()=>qc,MAX_ARCHIVED_DEBUG_NOTES:()=>Bi,MAX_BIRTH_DECISION_RECORDS:()=>Fi,MAX_BIRTH_LATENCY_PROXY_MS:()=>Ii,MAX_CAMERA_SENSORS:()=>8,MAX_CLIP_EVENT_IDS:()=>24,MAX_CLIP_LABELS:()=>3,MAX_COMPOSITION_CODE_LENGTH:()=>Sm,MAX_COMPOSITION_FEATURES:()=>16,MAX_COMPOSITION_FIELDS_PER_FEATURE:()=>32,MAX_COMPOSITION_ITEMS:()=>16,MAX_CONDITION_DEPTH:()=>3,MAX_CONDITION_LEAVES:()=>32,MAX_EXPRESSION_AST_NODES:()=>256,MAX_EXPRESSION_BINDINGS:()=>32,MAX_EXPRESSION_CALL_ARGS:()=>16,MAX_EXPRESSION_EVAL_STEPS:()=>vu,MAX_EXPRESSION_SOURCE_LENGTH:()=>_u,MAX_KEYS:()=>Ys,MAX_REASONS_PER_KEY:()=>16,MAX_SENSOR_TRIGGER_DEVICES:()=>16,MAX_TRACK_DEBUG_NOTE_LEN:()=>500,MAX_TRACK_PURITIES:()=>Wi,MAX_TRACK_RELATIONS:()=>Ui,MEDIA_OWNER_TYPES:()=>Ce,MEDIA_PRESENCE_OWNER_KINDS:()=>je,METHOD_ACCESS_MAP:()=>wq,METHOD_DEVICE_SELECTORS:()=>ZJ,MINUTES_PER_DAY:()=>tU,MIN_SCRUBBED_LENGTH:()=>8,MIN_SESSIONS_PER_DEVICE_RANGE:()=>qk,MODEL_FORMATS:()=>Cl,MODEL_HOSTING:()=>Pl,MODEL_PROVIDER_IDS:()=>jl,MOTION_CLOSE_AFTER_MS:()=>cz,MOTION_SOURCE_LABELS:()=>Vj,MOTION_TRIGGER_FEATURE:()=>_q,ManagedModelCatalogEntrySchema:()=>Hx,ManagedModelExtraFileSchema:()=>Sx,ManagedModelRefSchema:()=>Cx,ManagedRuntimeConfigSchema:()=>wx,MaskGridDimsSchema:()=>QC,MaskGridShapeSchema:()=>qC,MaskLineShapeSchema:()=>JC,MaskPointSchema:()=>WC,MaskPolygonShapeSchema:()=>KC,MaskPolygonVerticesSchema:()=>ZC,MaskRectShapeSchema:()=>GC,MaskShapeKindSchema:()=>XC,MaskShapeSchema:()=>YC,MediaFileInfoSchema:()=>YD,MediaFileKindEnum:()=>KD,MediaFileRefSchema:()=>qD,MediaFileSchema:()=>JD,MediaPlayerRepeatSchema:()=>ez,MediaPlayerStateSchema:()=>$R,MediaPlayerStatusSchema:()=>nz,MediaPresenceOwnerKindSchema:()=>Me,MediaRelocateModeSchema:()=>Eo,MeshPeerSchema:()=>az,MeshStatusSchema:()=>oz,MethodAccessSchema:()=>pE,MigrateDeviceResultSchema:()=>ky,MigrateSwitchOutcomeSchema:()=>Dy,MigrateSwitchReportSchema:()=>Oy,ModelCatalogEntrySchema:()=>Ll,ModelConvertInputSchema:()=>kS,ModelConvertMetadataSchema:()=>zl,ModelDistributeInputSchema:()=>jS,ModelDistributeResultSchema:()=>MS,ModelExtraFileSchema:()=>Ol,ModelFormatEntrySchema:()=>wl,ModelFormatPrecisionSchema:()=>El,ModelFormatsSchema:()=>kl,ModelLicenseSchema:()=>Fl,ModelOnDiskStateSchema:()=>Tl,ModelPinChangeSchema:()=>nA,ModelProviderIdSchema:()=>Ml,ModelSubstitutionSchema:()=>Ok,ModelVariantGroupSchema:()=>Al,MotionAnalysisResultSchema:()=>FS,MotionEventSchema:()=>zD,MotionOnMotionChangedDataSchema:()=>uz,MotionRegionSchema:()=>PS,MotionSourceEnum:()=>Rj,MotionSourcesSchema:()=>Bj,MotionStatusSchema:()=>lz,MotionTriggerRuntimeStateSchema:()=>pz,MotionTriggerStatusSchema:()=>fz,MotionTriggeredBySchema:()=>TE,MotionZoneOptionsSchema:()=>_z,MotionZonePatchSchema:()=>vz,MotionZoneRegionSchema:()=>hz,MotionZoneStatusSchema:()=>gz,MqttBrokerInfoSchema:()=>zS,MqttBrokerStatusSchema:()=>qS,MutationFilterSchema:()=>E_,NATIVE_LEASE_ACTIVITY_FIELD:()=>G0,NATIVE_LEASE_ACTIVITY_KEY:()=>I0,NATIVE_LEASE_ADMISSION_FIELD:()=>J0,NATIVE_LEASE_ADMISSION_KEY:()=>L0,NATIVE_LEASE_BUDGET_FIELD:()=>W0,NATIVE_LEASE_BUDGET_KEY:()=>F0,NATIVE_LEASE_HOLD_FIELD:()=>U0,NATIVE_LEASE_HOLD_KEY:()=>P0,NATIVE_LEASE_SCENE_BUDGET_FIELD:()=>q0,NATIVE_LEASE_SCENE_BUDGET_KEY:()=>z0,NATIVE_LEASE_SECTION_ID:()=>N0,NATIVE_LEASE_TILE_BUDGET_FIELD:()=>K0,NATIVE_LEASE_TILE_BUDGET_KEY:()=>R0,NAVIGATION_ACTION_CATALOG:()=>Mz,NAVIGATION_LIGHT_LEVEL_MAX:()=>100,NAVIGATION_LIGHT_LEVEL_MIN:()=>40,NC_ALARM_CONTROLLABLE_CAPS:()=>fZ,NC_ALARM_DEFAULT_PROFILE_ID:()=>qZ,NC_ALARM_DEFAULT_PROFILE_NAME:()=>JZ,NC_ALARM_DEFAULT_TRIGGERED_DURATION_SEC:()=>30,NC_ALARM_DELAY_FIELDS:()=>wZ,NC_ALARM_DELAY_MAX_SEC:()=>600,NC_ALARM_NONBLOCKING_MAX:()=>200,NC_ALARM_NOTIFY_FIELDS:()=>TZ,NC_ALARM_OPENING_EVENT_KINDS:()=>dZ,NC_ALARM_SENSORS_MAX:()=>500,NC_ALARM_SYSTEM_DEFAULT_DELAYS:()=>YZ,NC_ALARM_SYSTEM_EVENT_KINDS:()=>rw,NC_ALARM_TRIGGERED_MAX_SEC:()=>ET,NC_AUDIO_CONFIRM_HITS_DEFAULT:()=>2,NC_AUDIO_CONFIRM_HITS_MAX:()=>20,NC_AUDIO_CONFIRM_HITS_MIN:()=>1,NC_AUDIO_CONFIRM_WINDOW_MAX_SEC:()=>60,NC_AUDIO_CONFIRM_WINDOW_MIN_SEC:()=>1,NC_AUDIO_CONFIRM_WINDOW_SEC_DEFAULT:()=>5,NC_AUDIO_DBFS_FLOOR:()=>-96,NC_AUDIO_DB_MAX:()=>0,NC_AUDIO_DB_MIN:()=>_Y,NC_AUDIO_DB_OFFERED:()=>vY,NC_AUDIO_DB_STEP:()=>3,NC_AUDIO_DEFAULTS:()=>yY,NC_AUDIO_HIT_PERCENT_MAX:()=>100,NC_AUDIO_HIT_PERCENT_MIN:()=>1,NC_AUDIO_SAMPLING_MAX_SEC:()=>300,NC_AUDIO_SAMPLING_MIN_SEC:()=>1,NC_AUDIO_SEED:()=>ZX,NC_AUTHORABLE_SYSTEM_EVENT_KINDS:()=>nw,NC_BASE_CONDITION_KEYS:()=>BY,NC_BATTERY_CONSUMABLE_SYSTEM_EVENT_KINDS:()=>iw,NC_CAMERA_SCOPE_CAP_NAME:()=>FX,NC_CLIP_POST_ROLL_DEFAULT_SEC:()=>6,NC_CLIP_PRE_ROLL_DEFAULT_SEC:()=>4,NC_CLIP_RETENTION_MAX_SEC:()=>60,NC_CONDITION_CATALOG:()=>mT,NC_CONFIRM_DEFAULT_MAX_IMAGE_PX:()=>448,NC_CONFIRM_DEFAULT_TIMEOUT_MS:()=>Hw,NC_CONFIRM_MAX_TIMEOUT_MS:()=>Vw,NC_CONFIRM_MIN_TIMEOUT_MS:()=>Bw,NC_CONSUMABLE_LOW_PERCENT_DEFAULT:()=>15,NC_CONSUMABLE_LOW_PERCENT_MAX:()=>95,NC_CONSUMABLE_SYSTEM_EVENT_KINDS:()=>aw,NC_DEFAULT_SNOOZE_MINUTES:()=>uw,NC_GROUPING_DEFAULT_SEC:()=>20,NC_GROUPING_MAX_SEC:()=>60,NC_GROUPING_MIN_SEC:()=>5,NC_HISTORY_LIMIT_DEFAULT:()=>100,NC_HISTORY_LIMIT_MAX:()=>500,NC_MAX_PER_TRACK_IMMEDIATE:()=>1,NC_OCCUPANCY_DEFAULTS:()=>XX,NC_RULE_CLEARABLE_KEYS:()=>Yw,NC_RULE_EDITOR_SECTION_ORDER:()=>eZ,NC_RULE_KIND_SPECS:()=>kX,NC_RULE_RETIRED_CLEAR_KEYS:()=>qw,NC_RULE_SECTIONS:()=>UX,NC_SENSOR_RAISED_FIELD_BY_KIND:()=>cQ,NC_SENSOR_TRANSITION_KINDS:()=>lQ,NC_SENSOR_TRANSITION_NEVER_FIRES_WARNING:()=>yZ,NC_SENSOR_TRANSITION_UNSUPPORTED_REASON:()=>pQ,NC_SERVER_PACKAGE_NAME:()=>ZQ,NC_SNOOZE_MAX_MINUTES:()=>lw,NC_SYSTEM_DELIVERY:()=>MX,NC_SYSTEM_EVENT_CONDITION_FILTER_KEYS:()=>uX,NC_SYSTEM_EVENT_FAMILIES:()=>oX,NC_SYSTEM_EVENT_FAMILY:()=>cX,NC_SYSTEM_EVENT_FAMILY_FILTERS:()=>dX,NC_SYSTEM_EVENT_FILTER_KEYS:()=>rX,NC_SYSTEM_EVENT_KIND_GROUP_SPECS:()=>fX,NC_SYSTEM_EVENT_SUMMARY_FAMILIES:()=>LQ,NC_SYSTEM_RULE_KINDS:()=>vX,NC_TANK_SYSTEM_EVENT_KINDS:()=>ow,NC_TAXONOMY:()=>BC,NC_TEMPLATE_HELD_BACK_SYSTEM_EVENT_KINDS:()=>DQ,NC_TEMPLATE_VARS:()=>EQ,NC_UPDATE_EVENT_PACKAGE_NAMES:()=>QQ,NETWORK_LINK_TYPES:()=>Bz,NETWORK_LINK_UNKNOWN:()=>Hz,NODE_BENCHMARK_DEFAULTS:()=>X,NO_MEASURED_CAPACITY:()=>G1,NativeCropBboxSchema:()=>bj,NativeCropRefSchema:()=>mk,NativeCropResultSchema:()=>xj,NativeDetectionSchema:()=>xz,NativeLeaseAdmissionSchema:()=>B0,NativeLeaseSettingsSchema:()=>V0,NativeObjectClassEnum:()=>bz,NativeObjectDetectionOptionsSchema:()=>wz,NativeObjectDetectionRuntimeStateSchema:()=>Ez,NativeObjectDetectionSettingsPatchSchema:()=>Tz,NativeObjectDetectionStatusSchema:()=>Sz,NativeObjectGeometryEnum:()=>Cz,NavigationActionEntrySchema:()=>jz,NavigationActionIdSchema:()=>kz,NavigationEntryKindSchema:()=>Az,NavigationFeaturesSchema:()=>Pz,NavigationLightModeSchema:()=>Fz,NavigationModeSchema:()=>Iz,NavigationMoveCommandSchema:()=>Oz,NavigationPointSchema:()=>Nz,NavigationRuntimeStateSchema:()=>Rz,NavigationStatusSchema:()=>Lz,NcActionBindingSchema:()=>Tw,NcAlarmBlockingEditSchema:()=>IT,NcAlarmBlockingSchema:()=>BT,NcAlarmConfigSchema:()=>aE,NcAlarmCreateProfileInputSchema:()=>JT,NcAlarmModeCoverageSchema:()=>eE,NcAlarmModeDelaysEditSchema:()=>NT,NcAlarmModeDelaysSchema:()=>jT,NcAlarmModeDeviceListSchema:()=>RT,NcAlarmNonBlockingEditSchema:()=>FT,NcAlarmNonBlockingSchema:()=>zT,NcAlarmPostTriggeredActionSchema:()=>AT,NcAlarmProfileIdInputSchema:()=>XT,NcAlarmProfileMetaSchema:()=>KT,NcAlarmProfilesViewSchema:()=>qT,NcAlarmRenameProfileInputSchema:()=>YT,NcAlarmSecureOnArmEditSchema:()=>LT,NcAlarmSecureOnArmOffSchema:()=>VT,NcAlarmSensorReadingSchema:()=>oE,NcAlarmSensorStateSchema:()=>sE,NcAlarmSensorsInputSchema:()=>cE,NcAlarmSensorsSchema:()=>lE,NcAlarmSettingsPatchSchema:()=>ZT,NcAlarmSettingsSchema:()=>GT,NcAlarmSkipReasonSchema:()=>QT,NcAlarmSkippedDeviceSchema:()=>$T,NcAudioConditionSchema:()=>vw,NcClipRetentionAskSchema:()=>uE,NcClipRetentionPlanSchema:()=>dE,NcConditionDescriptorSchema:()=>pT,NcConditionsSchema:()=>Nw,NcConfirmExpectSchema:()=>Uw,NcConfirmSchema:()=>Ww,NcCrossingSchema:()=>yw,NcDeliverySchema:()=>$C,NcDeviceStateConditionSchema:()=>jw,NcHistoryEntrySchema:()=>vT,NcHistoryFilterSchema:()=>yT,NcHistoryRecordKindSchema:()=>gT,NcHistoryStatusSchema:()=>hT,NcHistorySubjectSchema:()=>_T,NcHookBindingsSchema:()=>Ew,NcLegacyRuleActionSequenceSchema:()=>kw,NcLinkedCameraModeSchema:()=>Iw,NcMediaFrameSchema:()=>Fw,NcMediaPolicySchema:()=>Lw,NcOccupancyConditionSchema:()=>_w,NcPlateMatcherSchema:()=>gw,NcRuleActionSchema:()=>Sw,NcRuleActionSequenceSchema:()=>Aw,NcRuleActionsSchema:()=>Ow,NcRuleClearableKeySchema:()=>Xw,NcRuleInputSchema:()=>Gw,NcRuleKindSchema:()=>iT,NcRuleLastRunSchema:()=>bT,NcRuleLastRunsSchema:()=>xT,NcRuleNotificationButtonSchema:()=>Dw,NcRulePatchSchema:()=>Kw,NcRuleSchema:()=>Qw,NcRuleTargetSchema:()=>Pw,NcRuleUpdateInputSchema:()=>Zw,NcSceneConditionSchema:()=>Mw,NcScheduleSchema:()=>fw,NcScheduleWindowSchema:()=>dw,NcSensorTransitionSchema:()=>bw,NcSharedSequenceInputSchema:()=>ww,NcSharedSequenceSchema:()=>Cw,NcSnoozeInputSchema:()=>CT,NcSnoozeSchema:()=>wT,NcSnoozeScopeSchema:()=>ST,NcSnoozeSuppressedSchema:()=>TT,NcStateSummaryPreviewRowSchema:()=>tT,NcStateSummaryPreviewSchema:()=>nT,NcStateSummaryPreviewSectionSchema:()=>eT,NcStateSummarySectionIdSchema:()=>$w,NcStateSummarySplitSchema:()=>mw,NcSystemEventConditionSchema:()=>sw,NcSystemEventDeliveryModeSchema:()=>pw,NcSystemEventDeliverySchema:()=>hw,NcSystemEventKindSchema:()=>ew,NcTaxonomyEntrySchema:()=>IC,NcTaxonomySchema:()=>LC,NcTemplateFamilySchema:()=>oT,NcTemplateFieldSchema:()=>sT,NcTemplatePreviewInputSchema:()=>dT,NcTemplatePreviewSchema:()=>fT,NcTemplateVarContextSchema:()=>uT,NcTemplateVarDescriptorSchema:()=>lT,NcTemplateVarGroupSchema:()=>cT,NcTemplateVarKindSchema:()=>aT,NcTestResultSchema:()=>rT,NcThrottleGranularitySchema:()=>Rw,NcThrottleSchema:()=>zw,NcZoneConditionSchema:()=>xw,NetworkAccessStatusSchema:()=>XS,NetworkAddressSchema:()=>dW,NetworkEndpointSchema:()=>YS,NetworkLinkStatusSchema:()=>Vz,NodeBenchCellSchema:()=>QA,NodeBenchClipSchema:()=>ej,NodeBenchDeviceCellSchema:()=>XA,NodeBenchFingerprintSchema:()=>$A,NodeBenchLimitSchema:()=>JA,NodeBenchPipelineCellSchema:()=>ZA,NodeBenchProgressSchema:()=>qA,NodeBenchRampStepSchema:()=>YA,NodeBenchRunnerInputSchema:()=>tj,NodeBenchRunnerStateSchema:()=>nj,NodeBenchRunnerStatusSchema:()=>rj,NodeBenchmarkCandidatesSchema:()=>fj,NodeBenchmarkDevicePlanSchema:()=>BA,NodeBenchmarkEndReasonSchema:()=>aj,NodeBenchmarkManifestSchema:()=>dj,NodeBenchmarkMovingCameraSchema:()=>WA,NodeBenchmarkPhaseSchema:()=>zA,NodeBenchmarkPlanSchema:()=>VA,NodeBenchmarkPreflightSchema:()=>KA,NodeBenchmarkRefusalKindSchema:()=>HA,NodeBenchmarkRefusalSchema:()=>UA,NodeBenchmarkResultSchema:()=>cj,NodeBenchmarkResultViewSchema:()=>uj,NodeBenchmarkRunSchema:()=>oj,NodeBenchmarkStateSchema:()=>ij,NodeBenchmarkStatusSchema:()=>sj,NodeBenchmarkStayingCameraSchema:()=>GA,NodeDeviceChangeSchema:()=>rA,NodeDirectoryEntrySchema:()=>dB,NodeDirectorySchema:()=>fB,NodeRecommendationSchema:()=>tA,NotificationActionIconSchema:()=>nC,NotificationActionSchema:()=>rC,NotificationFormatSchema:()=>tC,NotificationSchema:()=>iC,NotifierStatusSchema:()=>_B,NumericSensorStatusSchema:()=>xB,OPERATOR_WRITTEN_STALE_MS:()=>xJ,OPS_LOG_DEFAULT_LIMIT:()=>200,OPS_LOG_RING_DEFAULT_MAX:()=>500,OVERFLOW_REASON:()=>Xs,OVERLAY_LAYERS:()=>xc,OWNER_ONLY_EVENT_CATEGORIES:()=>Fe,OauthIntegrationDescriptorSchema:()=>CE,ObjectEventSchema:()=>WD,OccupancyBurstRefusalSchema:()=>tM,OccupancyLookAnswerSchema:()=>HM,OccupancyLookRefusalSchema:()=>BM,OccupancyLookRequestSchema:()=>VM,OnboardFieldSupportSchema:()=>XH,OnboardRecordTrackSchema:()=>KH,OnboardScheduleSupportSchema:()=>ZH,OnboardStorageSchema:()=>GH,OnboardStorageVolumeSchema:()=>WH,OpsLogDomainSchema:()=>_a,OpsLogEntrySchema:()=>ba,OpsLogOpSchema:()=>va,OpsLogQueryInputSchema:()=>xa,OpsLogReasonSchema:()=>ya,OrchestratorMetricsSchema:()=>pj,OsdNamedTemplateSchema:()=>NB,OsdOverlayKindEnum:()=>CB,OsdOverlayPatchSchema:()=>DB,OsdOverlaySchema:()=>TB,OsdPositionEnum:()=>wB,OsdRenderOutcomeEnum:()=>LB,OsdRenderResultSchema:()=>RB,OsdSlotBindingSchema:()=>FB,OsdSlotViewSchema:()=>IB,OsdSourceOptionSchema:()=>BB,OsdSourceSchema:()=>PB,OsdSourceValueTypeEnum:()=>zB,OsdStatusSchema:()=>EB,OsdTemplateBindingSchema:()=>MB,OsdTemplateFormatSchema:()=>AB,OsdTemplatePickSchema:()=>jB,OsdTemplateTokenKindSchema:()=>kB,PEER_BYTES_CHUNK_BYTES:()=>Yr,PEER_BYTES_MAX_OUTSTANDING:()=>64,PEER_BYTES_STALL_MS:()=>Jr,PEER_BYTES_TICKET_TTL_MS:()=>qr,PENDING_BLOCK_ID:()=>Sg,PET_FEEDER_MANUAL_FEED_MAX:()=>200,PET_FEEDER_MANUAL_FEED_MIN:()=>4,PIPELINE_ANALYTICS_CAP_NAME:()=>fi,PIPELINE_FLOW_CAPABILITY_NAMES:()=>NG,PIPELINE_OWNER_CAPABILITY_NAMES:()=>PG,PIPELINE_RAMP:()=>e0,PRIVACY_MASK_CAP_NAME:()=>di,PROVIDER_KIND_CAP_NAMES:()=>eY,PROVIDER_PIN_FIELD:()=>Dd,PUBLIC_ENDPOINT_HTTP_REASON:()=>Zb,PYTHON_SCRIPT:()=>m4,PackageInstallationSchema:()=>BF,PackageInstallationsSchema:()=>VF,PackageUpdateSchema:()=>kF,PackageVersionInfoSchema:()=>AF,ParkRefusalSchema:()=>Cj,ParkTrackFrameResultSchema:()=>wj,ParkedFrameKindSchema:()=>Sj,ParkedTrackFrameSchema:()=>Tj,PasskeyLoginMethodSchema:()=>oS,PasskeySummarySchema:()=>eP,PcmSampleFormatSchema:()=>Ff,PeerBytesTicketSchema:()=>Xr,PerScopeBreakdownSchema:()=>SG,PetFeederStatusSchema:()=>WB,PickStreamPreferencesSchema:()=>rm,PickStreamRequirementsSchema:()=>nm,PickedCamStreamSchema:()=>im,PipelineAssignmentSchema:()=>uM,PipelineDefaultStepSchema:()=>bk,PipelineEngineChoiceSchema:()=>Y,PipelineModelFormatStatusSchema:()=>Dl,PipelineRunResultBridge:()=>Wk,PipelineStepInputSchema:()=>Dk,PipelineValidationIssueSchema:()=>kk,PipelineValidationResultSchema:()=>Ak,PlaceholderReasonSchema:()=>Gp,PlacementDeviceStatsSchema:()=>vA,PlacementNodeStatsSchema:()=>yA,PlacementStatsInputSchema:()=>_A,PlacementStatsSchema:()=>xA,PolygonPointSchema:()=>_j,PoolMemoryWatchdog:()=>r4,PowerMeterStatusSchema:()=>mV,PresenceStatusSchema:()=>_V,PressureSensorStatusSchema:()=>yV,PrivacyMaskOptionsSchema:()=>wV,PrivacyMaskPatchSchema:()=>TV,PrivacyMaskRegionSchema:()=>SV,PrivacyMaskShapeSchema:()=>xV,PrivacyMaskStatusSchema:()=>CV,ProbeTargetConfigResultSchema:()=>mC,ProfileRtspEntrySchema:()=>Ha,ProfileSlotSchema:()=>Oa,ProfileSlotStatusSchema:()=>Da,ProviderMotionDataSchema:()=>I$,ProviderStatusSchema:()=>ey,PtzAutotrackRuntimeStateSchema:()=>BV,PtzAutotrackSettingsSchema:()=>LV,PtzAutotrackStatusSchema:()=>zV,PtzAutotrackTargetOptionSchema:()=>RV,PtzHomePresetSchema:()=>PV,PtzHomeReturnSchema:()=>FV,PtzMoveCommandSchema:()=>jV,PtzOptionsSchema:()=>NV,PtzPositionSchema:()=>AV,PtzPresetFunctionSchema:()=>OV,PtzPresetSchema:()=>kV,PtzStatusSchema:()=>MV,QueryFilterSchema:()=>T_,RATE_CONTROL_RELAXED:()=>ar,RATE_CONTROL_TIGHT:()=>ir,REACHABILITY_FAILURES_TO_OFFLINE:()=>3,REACHABILITY_POLL_INTERVAL_MS:()=>hJ,REACHABILITY_PROBE_TIMEOUT_MS:()=>gJ,RECALL_TIE:()=>S1,RECOGNITION_TYPES:()=>ls,RECORDING_AUDIO_TRIGGER_OFFERED_DBFS:()=>-30,RECORDING_EXPORT_MAX_READ_BYTES:()=>FH,RECORDING_SOURCE_CAMSTACK:()=>UV,RECORDING_SOURCE_CAMSTACK_ADDON:()=>WV,RECORDING_TIMELINE_BATCH_MAX:()=>200,REDACTED_SECRET:()=>Re,REMOVED_MODEL_IDS:()=>B$,RESERVED_BINDING_NAMES:()=>bu,RESERVED_COLLECTION_SOURCES:()=>xU,RESTORED_CAP_NAMES:()=>oY,REVALIDATE_AFTER_MS:()=>ki,ROOM_EXAMPLE_MOTION_SOURCES:()=>nK,ROOM_EXAMPLE_TEMPERATURE_SOURCES:()=>tK,ROOM_OCCUPANCY_WINDOW_MS:()=>eK,ROOT_BUCKET_KEY:()=>tc,ROOT_CHILD_CONTAINMENT_MIN:()=>vl,ROOT_FACE_REFINE_INPUT_PX:()=>160,ROOT_FACE_REFINE_SCALE:()=>_0,ROOT_SUPPLIABLE_STEP_IDS:()=>Jc,RUNTIME_DEFAULTS:()=>AK,RUNTIME_STATE_POLICY:()=>nY,RUNTIME_STATE_REFRESH_MISS_COOLDOWN_MS:()=>bJ,RUNTIME_TO_FORMAT:()=>p4,RawStateResultSchema:()=>yL,ReadGopBytesResultSchema:()=>vH,ReadSegmentBytesResultSchema:()=>_H,ReadWindowBytesResultSchema:()=>yH,ReadinessRegistry:()=>hc,ReadinessTimeoutError:()=>uc,RebuildObjectEmbeddingsRefusalSchema:()=>nk,RecentTracksPageSchema:()=>PO,RecentTracksQueryInput:()=>NO,RecommendationReasonSchema:()=>Xk,RecordTriggerSchema:()=>HH,RecordWindowSchema:()=>UH,RecordingAvailabilityForDeviceSchema:()=>nH,RecordingAvailabilitySchema:()=>qV,RecordingBandAudioSchema:()=>ro,RecordingBandModeSchema:()=>to,RecordingBandSchema:()=>io,RecordingBandTriggersSchema:()=>no,RecordingConfigSchema:()=>lo,RecordingDaysForDeviceSchema:()=>rH,RecordingDaysSchema:()=>JV,RecordingDeviceUsageSchema:()=>iH,RecordingLocationUsageSchema:()=>aH,RecordingManifestSchema:()=>YV,RecordingObjectTriggerClassSchema:()=>Qa,RecordingOnboardOptionsSchema:()=>QH,RecordingOnboardPatchSchema:()=>$H,RecordingOnboardStatusSchema:()=>qH,RecordingPlaybackSchema:()=>$V,RecordingRangeSchema:()=>GV,RecordingReadSchema:()=>KV,RecordingRebalanceInputSchema:()=>dH,RecordingRebalanceMoveSchema:()=>sH,RecordingRebalancePlanSchema:()=>uH,RecordingRebalanceSkipReasonSchema:()=>cH,RecordingRebalanceSkipSchema:()=>lH,RecordingRetentionSchema:()=>co,RecordingSignalRuntimeStateSchema:()=>yU,RecordingSignalStatusSchema:()=>vU,RecordingSourceAvailabilitySchema:()=>XV,RecordingSourceOptionsSchema:()=>QV,RecordingSourceSchema:()=>ZV,RecordingStatusSchema:()=>tH,RecordingStorageModeSchema:()=>Za,RecordingStorageUsageSchema:()=>oH,RecordingTriggersSchema:()=>eo,RecordingWeekdaySchema:()=>Ya,RedirectLoginMethodSchema:()=>iS,RelocatableMediaCountInputSchema:()=>rs,RelocatableMediaCountSchema:()=>ns,RelocateFootageClassSchema:()=>So,RelocateFootageInputSchema:()=>Co,RelocateJobSchema:()=>xo,RelocateJobStateSchema:()=>bo,RelocateMediaInputSchema:()=>Do,RelocateResidueInputSchema:()=>Jo,RelocateResidueSchema:()=>Yo,RenderedAsSchema:()=>dC,ReportMotionInputSchema:()=>Gj,ReportedFailureContributionSchema:()=>FW,ReportedLoadContributionSchema:()=>PW,RequestCensusGroupSchema:()=>vW,RequestCensusProcedureSchema:()=>yW,RequestCensusSnapshotSchema:()=>bW,RequestCensusStatusSchema:()=>xW,RetrainAnnotationDraftSchema:()=>tO,RetrainAnnotationKindSchema:()=>ZD,RetrainAnnotationSchema:()=>eO,RetrainAnnotationSourceSchema:()=>QD,RetrainArchiveResultSchema:()=>pO,RetrainArchiveTargetSchema:()=>fO,RetrainAssistProfileSchema:()=>bO,RetrainAssistResultSchema:()=>hO,RetrainAssistSubjectSchema:()=>mO,RetrainCollectionCreateResultSchema:()=>_O,RetrainCollectionRenameResultSchema:()=>vO,RetrainCollectionSchema:()=>gO,RetrainCopyRefusalSchema:()=>sO,RetrainDatasetSelectionSchema:()=>wO,RetrainDatasetStatsSchema:()=>TO,RetrainDatasetVersionSchema:()=>EO,RetrainExportFilterSchema:()=>uO,RetrainExportLayoutSchema:()=>dO,RetrainFrameCandidateSchema:()=>rO,RetrainFrameListSchema:()=>lO,RetrainFrameOriginSchema:()=>aO,RetrainFrameSchema:()=>oO,RetrainFrameSelectionSchema:()=>cO,RetrainLlmAssistResultSchema:()=>CO,RetrainLlmProposalSchema:()=>xO,RetrainLlmReviewSchema:()=>SO,RetrainMacroClassSchema:()=>XD,RetrainPipelineBoxSchema:()=>iO,RetrainStatusSchema:()=>DD,RetrainTrackSchema:()=>nO,RetrainTransitionResultSchema:()=>OO,RingBuffer:()=>s4,RootStepSupplySchema:()=>Il,RtpSourceSchema:()=>Yp,RtspRestreamEntrySchema:()=>Rp,RunnerCameraConfigSchema:()=>Yj,RunnerCameraDeviceUIFields:()=>Xj,RunnerFrameSourceSchema:()=>Kj,RunnerInferenceDeviceSchema:()=>Jj,RunnerJumpStepProvisioningSchema:()=>qj,RunnerLocalLoadSchema:()=>Zj,RunnerLocalMetricsSchema:()=>eM,SCENE_CONDITIONS:()=>wU,SCENE_CONFIRM_DEFAULT_MAX_IMAGE_PX:()=>448,SCENE_CONFIRM_DEFAULT_TIMEOUT_MS:()=>PU,SCENE_DEFAULT_ANCHOR_THRESHOLD:()=>MU,SCENE_DEFAULT_CHECK_INTERVAL_SEC:()=>60,SCENE_DEFAULT_OBSERVATION_SPACING_SEC:()=>120,SCENE_DEFAULT_QUIET_SECONDS:()=>60,SCENE_DEFAULT_UNCOVERED_POLICY:()=>NU,SCENE_DIVERGED:()=>EU,SCENE_RESET_RECAPTURES:()=>!0,SCOPE_PRESETS:()=>sY,SECRET_CLEAR:()=>Ye,SECRET_META:()=>FK,SECRET_REF_SCHEME:()=>wt,SENSOR_FEATURES:()=>yq,SENSOR_MAP:()=>xq,SESSION_PLACEMENT_SETTING_KEY:()=>mA,SHARE_SOURCE_SETTING_KEY:()=>MA,SHARE_VIEW_KINDS:()=>Kr,SINGLE_HUB_ADDRESS_ROLES:()=>Lb,SOURCE_CAPS:()=>Yl,SOURCE_CAP_ACTIVE_FIELD:()=>ql,SOURCE_CAP_CHANGED_AT_FIELD:()=>Jl,SOURCE_DEVICE_TYPES:()=>Xl,SOURCE_INFO_METADATA_KEY:()=>_v,STATE_LABELS:()=>r$,STATE_LABEL_KEYS:()=>n$,STATIONARY_OVERLAY_STYLE:()=>Cc,STORAGE_ACCESS_FALLBACK:()=>Ms,STORAGE_BYTES_PER_GB:()=>Os,STORAGE_LOCATION_MODES:()=>us,STREAM_PROFILE_META:()=>rW,STREAM_QUALITY_LABELS:()=>ia,SUB_DETECTION_TYPES:()=>cs,SYSTEM_CAP_NAMES:()=>Dq,SYSTEM_SCOPE_DEVICE_METHODS:()=>QJ,SceneCheckSchema:()=>jU,SceneConditionSchema:()=>CU,SceneConfirmSchema:()=>FU,SceneMonitorSchema:()=>IU,SceneMonitorStateSchema:()=>AU,SceneMonitorStatusForDeviceSchema:()=>RU,SceneMonitorStatusSchema:()=>LU,SceneReferenceSchema:()=>kU,SceneUnavailableSchema:()=>OU,SceneUncoveredPolicySchema:()=>TU,SceneVerdictSchema:()=>DU,ScopedTokenSchema:()=>SE,ScopedTokenSummarySchema:()=>eG,ScoredObjectEventSchema:()=>GO,ScriptRunnerStatusSchema:()=>UU,SearchResultSchema:()=>jF,SendEmailInputSchema:()=>dN,SendEmailResultSchema:()=>fN,SendResultSchema:()=>fC,SensorEventSchema:()=>bD,ServerBootModeSchema:()=>ZM,ServerPackageStatusSchema:()=>aN,ServerRollbackInfoSchema:()=>iN,ServerUpdateActionResultSchema:()=>cN,ServerUpdateCheckResultSchema:()=>oN,ServerUpdateOutcomeSchema:()=>sN,ServerUpdateStateSchema:()=>QM,SessionPlacementPolicySchema:()=>fA,SessionTriggerSchema:()=>zj,SetCameraSensorsInputSchema:()=>zM,SetLoggingSettingsInputSchema:()=>LW,SetShareSourceInputSchema:()=>PA,SetSiteLocationInputSchema:()=>hW,SetTrackPurityInputSchema:()=>$i,SetTrackPurityResultSchema:()=>ea,SetTrackRelationInputSchema:()=>Xi,SettingsPatchSchema:()=>Yd,SettingsRecordSchema:()=>k_,SettingsSchemaWithValuesSchema:()=>Jd,SettingsUpdateResultSchema:()=>Xd,ShareSourceSchema:()=>OA,ShareWeightsSchema:()=>FA,SiteLocationSchema:()=>pW,SiteLocationSourceSchema:()=>fW,SiteLocationStatusSchema:()=>mW,SiteZoneSchema:()=>Qv,SmokeStatusSchema:()=>GU,SmtpStatusSchema:()=>pN,SnapshotImageSchema:()=>hN,SourceInfoSchema:()=>pv,SpatialDetectionSchema:()=>bf,SsoBridgeClaimsSchema:()=>vN,StaleDevicePinSchema:()=>bA,StartEmbeddedInputSchema:()=>GS,StationaryObjectSchema:()=>wG,StorageAbortUploadInputSchema:()=>PN,StorageAccessSchema:()=>js,StorageBeginDownloadInputSchema:()=>FN,StorageBeginDownloadResultSchema:()=>IN,StorageBeginUploadInputSchema:()=>AN,StorageBeginUploadResultSchema:()=>jN,StorageCleanupInputSchema:()=>as,StorageCleanupJobSchema:()=>os,StorageCleanupPhaseSchema:()=>is,StorageCleanupStatusInputSchema:()=>ss,StorageDrainProgressSchema:()=>As,StorageEndDownloadInputSchema:()=>RN,StorageEvictionPolicySchema:()=>fs,StorageFinalizeUploadInputSchema:()=>NN,StorageLocationDeclarationSchema:()=>Ns,StorageLocationModeSchema:()=>ds,StorageLocationRefSchema:()=>k,StorageLocationSchema:()=>O,StorageLocationTypeSchema:()=>Ts,StorageMigrationClassSchema:()=>jo,StorageMigrationDestinationsSchema:()=>Mo,StorageMigrationDrainInputSchema:()=>qo,StorageMigrationFindingCodeSchema:()=>Vo,StorageMigrationFindingSchema:()=>Ho,StorageMigrationFootageMoveInputSchema:()=>To,StorageMigrationInputSchema:()=>Fo,StorageMigrationJobSchema:()=>Bo,StorageMigrationLaneSchema:()=>Wo,StorageMigrationLeaseInputSchema:()=>wo,StorageMigrationMediaMoveInputSchema:()=>Ao,StorageMigrationModeSchema:()=>Po,StorageMigrationMoveProgressSchema:()=>Ro,StorageMigrationMoveSchema:()=>zo,StorageMigrationMoverSchema:()=>Go,StorageMigrationParticipantSchema:()=>Lo,StorageMigrationPhaseSchema:()=>Io,StorageMigrationPlanSchema:()=>Uo,StorageMigrationResidueSchema:()=>Ko,StorageMigrationSourcesSchema:()=>No,StorageOccupancyReportSchema:()=>EN,StorageProviderInfoSchema:()=>ON,StorageReadChunkInputSchema:()=>LN,StorageTestLocationResultSchema:()=>kN,StorageWriteChunkInputSchema:()=>MN,StreamCodecSchema:()=>tm,StreamFormatSchema:()=>Np,StreamNetworkStatsSchema:()=>Kz,StreamParamsOptionsSchema:()=>eW,StreamParamsStatusSchema:()=>QU,StreamProfileConfigSchema:()=>ZU,StreamProfileOptionsSchema:()=>$U,StreamProfilePatchSchema:()=>tW,StreamProfileSchema:()=>XU,StreamSignalSchema:()=>BN,StreamSignalsStatusSchema:()=>VN,StreamSourceEntrySchema:()=>Na,StreamSourceSchema:()=>Pa,SubscribeAudioChunksInputSchema:()=>Ra,SubscribeAudioChunksResultSchema:()=>za,SuggestSharesInputSchema:()=>wA,SuggestSharesResultSchema:()=>DA,SuggestedDeviceShareSchema:()=>TA,SuggestedNodeShareSchema:()=>EA,SuppliedRootOutputSchema:()=>pk,SwitchStatusSchema:()=>sW,SystemHeldSecretNameSchema:()=>Z_,SystemMetricsSchema:()=>DS,SystemMirror:()=>kJ,TAXONOMY_COLORS:()=>G,TIMELAPSE_DENSE_FLOOR_SEC:()=>y$,TIMEZONES:()=>Is,TRACK_RELATIONS_DEFAULT_LIMIT:()=>500,TRANSCODE_DOWN_MAX_BITRATE_KBPS:()=>400,TRANSCODE_DOWN_MAX_HEIGHT:()=>360,TamperStatusSchema:()=>BW,TankStatusSchema:()=>uG,TargetKindCapsSchema:()=>oC,TargetKindLevelSchema:()=>aC,TargetKindSchema:()=>cC,TargetSchema:()=>lC,TemperatureSensorStatusSchema:()=>HW,TerminalInstanceInfoSchema:()=>qN,TerminalLegacyCameraSchema:()=>JN,TerminalOutputBatchSchema:()=>XN,TerminalOutputEventSchema:()=>YN,TerminalProfileInfoSchema:()=>KN,TerminalSessionInfoSchema:()=>GN,TestConnectionResultSchema:()=>_R,TestConnectionStatusEnum:()=>gR,TestResultSchema:()=>pC,TimelapseRuleInputSchema:()=>T$,TimelapseRulePatchSchema:()=>D$,TimelapseRuleSchema:()=>O$,TimelapseTemplateSchema:()=>f$,ToastSchema:()=>WW,TokenScopeSchema:()=>J,TopologyNodeSchema:()=>tB,TopologyProcessSchema:()=>Zz,TopologyServiceSchema:()=>Xz,TrackCascadeCountsSchema:()=>qO,TrackEnvelopeSchema:()=>CD,TrackFlagsPatchSchema:()=>AD,TrackFlagsSchema:()=>jD,TrackProjectionSchema:()=>wD,TrackPuritySchema:()=>Yi,TrackPurityValueSchema:()=>qi,TrackRelationKindSchema:()=>Gi,TrackRelationRefusalSchema:()=>ra,TrackRelationSchema:()=>Ji,TrackSchema:()=>LD,TrackSideSchema:()=>Ki,TrackSourceSchema:()=>ED,TrackStateSchema:()=>fD,TrackZoneFilterSchema:()=>mD,TrackedDetectionSchema:()=>UO,TrainingExportDeviceTotalsSchema:()=>FD,TrainingExportSummarySchema:()=>ID,TransportPlaneCountsSchema:()=>_W,TransportPlaneSchema:()=>gW,TurnServerSchema:()=>QN,UNATTRIBUTED_BUCKET_KEY:()=>ec,UNIT_TABLE:()=>zG,USE_ROOT_MODEL_DEFAULTS:()=>tl,USE_ROOT_MODEL_SETTING_KEY:()=>nl,UnifiedBrokerInfoSchema:()=>fp,UninstallNodeOutcomeSchema:()=>LF,UninstallNodeResultSchema:()=>RF,UninstallPackageResultSchema:()=>zF,UnitConversionError:()=>BG,UnstampedEventMediaCountSchema:()=>ko,UnstampedRowsSchema:()=>Oo,UpdateIntegrationInputSchema:()=>yR,UpdateStatusSchema:()=>KW,UpdateUserInputSchema:()=>XW,UserRecordSchema:()=>bE,UserSummarySchema:()=>JW,VECTOR_INDEX_DIM_CONFLICT:()=>xP,VIDEOCLIPS_MAX_OFFER_BYTES:()=>RP,VIDEOCLIPS_MAX_READ_BYTES:()=>LP,VISIT_MERGE_GAP_MS:()=>so,VacuumControlStatusSchema:()=>dG,VacuumStateSchema:()=>lG,ValveStateSchema:()=>pG,ValveStatusSchema:()=>mG,VectorDeclareIndexInputSchema:()=>sP,VectorDeleteByFilterInputSchema:()=>pP,VectorDeleteInputSchema:()=>fP,VectorDeleteResultSchema:()=>mP,VectorFilterSchema:()=>iP,VectorGetInputSchema:()=>hP,VectorGetResultSchema:()=>gP,VectorItemSchema:()=>aP,VectorMatchSchema:()=>oP,VectorMetadataSchema:()=>rP,VectorMetricSchema:()=>nP,VectorQueryInputSchema:()=>uP,VectorQueryResultSchema:()=>dP,VectorStatsInputSchema:()=>wP,VectorStatsResultSchema:()=>TP,VectorUpsertInputSchema:()=>cP,VectorUpsertResultSchema:()=>lP,VibrationStatusSchema:()=>gG,VideoEncodeSchema:()=>Sn,WEBRTC_CLIMB_HOLD_CODES:()=>aF,WEBRTC_EGRESS_PROFILE:()=>nr,WEBRTC_TRY_BLOCKERS:()=>oF,WEEKLY_MASK_LENGTH:()=>168,WELL_KNOWN_TABS:()=>at,WELL_KNOWN_TAB_MAP:()=>ot,WaterHeaterStatusSchema:()=>vG,WeatherStatusSchema:()=>bG,WebrtcClimbHoldSchema:()=>sF,WebrtcLadderDecisionSchema:()=>iF,WebrtcSessionDebugSchema:()=>lF,WebrtcStreamChoiceSchema:()=>rF,WebrtcStreamTargetSchema:()=>nF,WebrtcTierFailureSchema:()=>cF,WhiteBalanceModeSchema:()=>aR,WidgetHostEnum:()=>Qd,WidgetLoginMethodSchema:()=>aS,WidgetMetadataSchema:()=>tf,WidgetRemoteSchema:()=>ef,WidgetSizeEnum:()=>$d,WrapperActivationReadSchema:()=>yy,WrapperEvidenceSchema:()=>nN,WrapperIdentitySchema:()=>rN,WrapperKindSchema:()=>tN,YAMNET_TO_MACRO:()=>SC,ZoneCrossingDirectionSchema:()=>VD,ZoneCrossingSchema:()=>HD,ZoneKindEnum:()=>gj,ZoneRuleModeEnum:()=>BU,ZoneRuleSchema:()=>VU,ZoneRuleStageEnum:()=>jG,ZoneRulesArraySchema:()=>HU,ZoneSchema:()=>vj,ZoneScopeBreakdownSchema:()=>CG,__resetLogChannelRegistryForTests:()=>Ks,acceleratorKindOf:()=>v1,accessoriesCapability:()=>fF,accessoryStableId:()=>NK,actionsForBoundCaps:()=>Lq,actionsForDevice:()=>zq,actionsForDeviceType:()=>Rq,actionsForDevices:()=>Bq,activateAlarmProfile:()=>aQ,addonPagesCapability:()=>zd,addonPagesSourceCapability:()=>Vd,addonRoutesCapability:()=>Gd,addonSettingsCapability:()=>Zd,addonWidgetsCapability:()=>af,addonWidgetsSourceCapability:()=>nf,addonsCapability:()=>YF,adminUiCapability:()=>cf,airQualitySensorCapability:()=>ZF,alarmDeviceBlocksArming:()=>xZ,alarmDeviceSecureOnArm:()=>SZ,alarmPanelCapability:()=>UC,alarmPatchLanded:()=>KZ,alarmProfileById:()=>sQ,alertsCapability:()=>pf,allDoActions:()=>Vq,allowedSuppliedEffect:()=>gl,ambientLightSensorCapability:()=>$F,applyBlockingEdit:()=>RZ,applyModeDelaysEdits:()=>FZ,applyModeDeviceListEdit:()=>IZ,applyModelBoundSettings:()=>K$,applyNonBlockingEdit:()=>LZ,applySecureOnArmEdit:()=>zZ,arrayItemFieldPath:()=>jt,asBoolean:()=>z2,asJsonArray:()=>I2,asJsonObject:()=>F2,asNumber:()=>R2,asString:()=>L2,assertTimelapseCadences:()=>k$,audioAnalysisCapability:()=>gf,audioAnalyzerCapability:()=>Pf,audioChunkBytesPerSample:()=>_e,audioCodecCapability:()=>Hf,audioIsFailClosed:()=>SY,audioKindId:()=>gY,audioLabelChoices:()=>EY,audioMetricsCapability:()=>iI,audioModeOf:()=>xY,audioOrDefaults:()=>bY,audioPlanFromEncodeProfile:()=>$n,audioScaleEraOf:()=>pY,authProviderCapability:()=>Wf,autoAssignProfiles:()=>pa,automationControlCapability:()=>oI,backupCapability:()=>up,bareAddonId:()=>T2,batteryCapability:()=>cI,bestLocationMatch:()=>C2,binaryCapability:()=>uI,bindAddonActions:()=>E4,brightnessCapability:()=>fI,brokerCapability:()=>jp,buildAddonRouteProvider:()=>_n,buildAudioArgs:()=>Vn,buildBenchStepTree:()=>g0,buildCapabilityLookup:()=>yg,buildDeviceAdminUrl:()=>dv,buildDoorbellCompositionFeature:()=>fK,buildEventKindDescriptor:()=>XM,buildFfmpegArgs:()=>Xn,buildFrigateClassMap:()=>bK,buildInputArgs:()=>Fn,buildModelVariantGroups:()=>Ic,buildNcTaxonomy:()=>zC,buildRoleScopes:()=>r2,buildSecretRef:()=>Mt,buildStreamParamsConfigSchema:()=>aW,buildVideoArgs:()=>Bn,buildViewerLink:()=>Fb,builtCapabilityBlockers:()=>Wg,buttonCapability:()=>pI,calendarSourceCapability:()=>vI,calendarsCapability:()=>wI,cameraCredentialsCapability:()=>DI,cameraGridLayoutCapability:()=>NI,cameraOwnsMotionViaSensor:()=>j$,cameraPipelineConfigCapability:()=>Mp,cameraSensorRefKey:()=>AE,cameraStreamsCapability:()=>am,canConvertUnit:()=>qG,canonicalEgressPlan:()=>Tr,capacitySessionsOf:()=>w1,carbonMonoxideCapability:()=>FI,cellsToRects:()=>o4,checkRoleAddress:()=>Qb,classifyBearerPrincipal:()=>Gl,classifyCamerasForBenchmark:()=>Q1,classifyInferenceHardware:()=>_1,classifySecretWrite:()=>it,classifyStream:()=>ca,classifyStreams:()=>sa,clearKnownSecrets:()=>Di,clearModelBoundOverrides:()=>X$,clearModelBoundSetting:()=>J$,climateControlCapability:()=>RI,clipExportFailure:()=>MH,clipExportFailureOf:()=>NH,clipReasonHeaderValue:()=>AP,cloneAlarmSettings:()=>QZ,cloneStatefulExpressionMemory:()=>Yu,clusterModelSettingKey:()=>KE,clusterStepSettingFieldsFor:()=>oD,clusterStepSettingKey:()=>aD,codecIsAccepted:()=>On,collectHydratedFieldEntries:()=>ct,collectHydratedFieldValues:()=>ut,collectKeychainStoredKeys:()=>He,collectModelBoundKeys:()=>Z$,collectSecretConfigKeys:()=>Ve,collectSecretMarkerRefs:()=>Bt,collectZodSecretPaths:()=>VK,colorCapability:()=>UI,colorForKind:()=>PC,commitWatchdogRestart:()=>e4,compareToTarget:()=>En,compileExpression:()=>Iu,compileExpressionSafe:()=>Lu,composeSwitchedOff:()=>vi,composedDeviceRef:()=>qm,composedDeviceStableId:()=>Km,composerCapability:()=>Ph,compositionEdges:()=>mg,compositionFeatureEnabled:()=>zm,compositionFieldKey:()=>bh,compositionItemFieldPath:()=>Ym,compositionReadKey:()=>Gm,compositionSliceKey:()=>Wm,compositionSourceKey:()=>B,compositionSourceRefs:()=>jg,computeCapacityShares:()=>Y1,conditionDepth:()=>fd,conditionExclusionReason:()=>VX,conditionVisibleForKind:()=>BX,connectionTestCapability:()=>JI,connectivityCapability:()=>XI,consumableLowPercentOf:()=>cw,consumablesCapability:()=>tL,contactCapability:()=>rL,containingParentIndex:()=>yl,controlCapability:()=>sL,convertPresetFeature:()=>gK,convertUnit:()=>GG,coreBlockAddonId:()=>Jg,coreBlockComposition:()=>l_,coreBlockIdFromAddonId:()=>Yg,coreBlockSourceKind:()=>c_,coreBlocksCapability:()=>v_,cosineSimilarity:()=>k2,countConditionLeaves:()=>pd,coverCapability:()=>uL,createAlarmProfile:()=>nQ,createDeviceExtensionProvider:()=>RG,createDeviceProxy:()=>CJ,createDurableState:()=>vt,createEvent:()=>gt,createEventBusSliceSource:()=>Xq,createExpressionScope:()=>zu,createHwAccelCache:()=>dr,createLazyTrpcSource:()=>Yq,createLogChannelsProvider:()=>Js,createMirrorSource:()=>Zq,createRuntimeStateBridge:()=>SJ,createSecretsAccess:()=>ji,createSliceHandle:()=>Z,createStatefulExpressionMemory:()=>Ju,createSystemProxy:()=>cY,customAction:()=>b_,customModelRegistryCapability:()=>w_,dataStoreProviderCapability:()=>F_,databaseSnapshotCapability:()=>Qf,dayNightCapability:()=>gL,dayOfWeekToIndex:()=>gU,declarationOwnerNodeId:()=>uq,declareLogChannel:()=>Gs,decodeVectorBase64:()=>x4,decoderCapability:()=>tv,defaultDeliveryForSection:()=>$X,defaultDeviceFor:()=>P4,defineCustomActions:()=>y_,defineExtensionSlotProvider:()=>IG,deleteAlarmProfile:()=>iQ,deriveBatteryPresence:()=>$K,deriveCameraSwitches:()=>gi,deriveDetailCropRect:()=>k0,deriveMaskSupplies:()=>ul,derivePostTriggeredAction:()=>DZ,deriveRecordingMode:()=>uo,deriveRootFaceRefineRect:()=>v0,deriveRootSupplies:()=>cl,describeComposableCaps:()=>Gg,describeCustomActions:()=>S_,describeModelVariant:()=>Rc,describeOnboardClamp:()=>_U,describeOnboardRefusal:()=>rU,describeRootSupplies:()=>Sl,describeRootSupply:()=>xl,describeStateField:()=>rh,describeSystemEventDeliveryProblem:()=>UQ,describeSystemEventFamilyProblem:()=>_X,describeTopLevelStateFields:()=>ih,detectAccessRole:()=>a2,detectionPipelineCapability:()=>nv,deviceAdminLinkCapability:()=>av,deviceAdoptionCapability:()=>Fv,deviceBackendToFormat:()=>f4,deviceCustomAction:()=>x_,deviceDiscoveryCapability:()=>Sv,deviceDoFamily:()=>Fq,deviceExportCapability:()=>Wv,deviceExtensionCapability:()=>Zy,deviceManagerCapability:()=>Ay,deviceMatchesProfile:()=>Wq,deviceOpsCapability:()=>bL,deviceProviderCapability:()=>oy,deviceSelectorMatches:()=>s2,deviceStateCapability:()=>nb,deviceStatusCapability:()=>SL,diffStepSettings:()=>d1,disarmRoseMemory:()=>du,displayIconEntry:()=>oJ,displayIconsInGroup:()=>sJ,doActionSelectValue:()=>Uq,doorbellCapability:()=>TL,doorbellFeatureSources:()=>dK,droppedConditionsForKind:()=>HX,effectiveStepSettings:()=>a1,egressTranscodeSharingKey:()=>Er,egressTransportFromRequest:()=>xr,electByShare:()=>B1,eligibleUnderBenchmark:()=>X1,embeddingEncoderCapability:()=>bb,embeddingModelFailedError:()=>pb,embeddingModelFailedOf:()=>yb,embeddingRefusalOf:()=>_b,embeddingRequirementsFailedError:()=>hb,embeddingRequirementsUnavailableError:()=>mb,emitDownForOwnedCaps:()=>_c,emitReadiness:()=>_t,emitsCollectionSelector:()=>om,encodeProfileFromStreamShape:()=>Tn,encodeVectorBase64:()=>b4,ensureAlarmProfiles:()=>$Z,enumSensorCapability:()=>OL,enumerateInferenceDevices:()=>z4,enumerateItemArrayFields:()=>th,enumerateSchemaFields:()=>eh,errMsg:()=>M2,estimateNodeBenchmarkDurationMs:()=>r0,evaluateAst:()=>qu,evaluateCompositionField:()=>$G,evaluateCount:()=>fu,evaluateExpressionSource:()=>$u,evaluatePoolMemory:()=>$2,evaluateRose:()=>uu,evaluateSensorEdge:()=>nu,evaluateSensorLevelEdge:()=>tu,evaluateStatefulExpressionCall:()=>Xu,evaluateZoneRules:()=>C4,event:()=>Fd,eventEmitterCapability:()=>jL,eventKindLabel:()=>d$,evictionPolicyForMode:()=>gs,evictionPolicyOfLocation:()=>Ss,expandAudioChunkToF32le:()=>ve,expandCapMethods:()=>Md,expandContainer:()=>sq,exportSubjectOf:()=>BH,exposeBlockDevices:()=>pq,expressionContainsBuiltinCall:()=>Jh,extensionSlotRef:()=>LG,extractNestedAddonId:()=>fm,extractSourceInfoFromMetadata:()=>vv,faceGalleryCapability:()=>HL,failureContributionCapability:()=>Cb,failureRate:()=>$s,fanControlCapability:()=>GL,featureFieldEntries:()=>Xm,featureProbeCapability:()=>qL,featureSources:()=>Zm,feederCustomizationExample:()=>lK,feederExampleSources:()=>cK,ffmpegRate:()=>mr,fieldReads:()=>Jm,fieldUnitKeys:()=>$$,fieldsPinnedAtValueBelow:()=>f1,filesystemBrowseCapability:()=>Eb,findCandidateCycles:()=>vg,findCompositionCycles:()=>hg,findTimezone:()=>Ls,floodCapability:()=>YL,foldSnapshotByFunction:()=>ic,forgetKnownSecret:()=>Ti,formatForRuntime:()=>h4,formatMediaOwnerKey:()=>Oe,formatMinutes:()=>lU,formatParkedFor:()=>wc,formatSecretScope:()=>At,freshResults:()=>c0,frigateDefaultClassFloors:()=>wK,frigateLabelFields:()=>xK,gasCapability:()=>ZL,gbToBytes:()=>ks,generateAutomationBlock:()=>bd,getAudioMacroClassIds:()=>EC,getByPath:()=>pJ,getCapsByProviderKind:()=>tY,getLogChannelRegistry:()=>Ws,getTaxonomyEntry:()=>NC,gifDeriveSpeed:()=>hr,gifFilterComplex:()=>gr,gifFromMp4Args:()=>_r,globalSecretScope:()=>Et,hasModelBoundOverrides:()=>Y$,hasMotionTrigger:()=>vq,hfModelUrl:()=>N2,htmlToText:()=>GY,hubAddressHostname:()=>lx,hubMotionNativeProvider:()=>F$,humidifierCapability:()=>$L,humiditySensorCapability:()=>tR,hydrateSchema:()=>ft,imageCapability:()=>rR,imageSettingsCapability:()=>fR,inferExpressionKinds:()=>Yh,inferModelProvider:()=>Nl,initialPoolMemoryState:()=>J2,integrationsCapability:()=>xR,intercomCapability:()=>TR,interpretStoredClusterModel:()=>YE,invalidClusterStepModelEntries:()=>XE,invertPresetFeature:()=>mK,invocationFromEncodeProfile:()=>er,isAgentOnlyPlacement:()=>Br,isAlarmControllableCap:()=>pZ,isAppLinkBase:()=>kb,isArrayOutputSchema:()=>lm,isAudioChunkFormat:()=>ge,isAudioClassName:()=>RY,isAudioLabelSelected:()=>DY,isAudioRule:()=>KX,isAutomaticShareSource:()=>AA,isBaseConditionKey:()=>HY,isBatteryPresenceFault:()=>eq,isClusterScopedStep:()=>qE,isCollectionArrayMethod:()=>um,isDefaultAlarmProfileId:()=>ZZ,isDefaultAppConnectionEndpoint:()=>ax,isDeployableToAgent:()=>zr,isDetectionMacroClass:()=>yC,isDeviceConfigCap:()=>Id,isDeviceScopedCap:()=>XJ,isDisplayIconKey:()=>iJ,isDoActionActuatable:()=>kq,isDoPickerDeviceType:()=>Pq,isEmbeddingModelFailed:()=>vb,isEvent:()=>ht,isEventKindLabelKey:()=>u$,isEventOwnerType:()=>Pe,isFirstLevelMacroClass:()=>Ka,isHeldBackTemplateVar:()=>kQ,isIsolatedBuiltin:()=>Wr,isKeychainStoredField:()=>Be,isKnownTemplateVar:()=>IQ,isLabelSupplyStepId:()=>Xc,isLocationEnabled:()=>Ds,isMediaOwnerType:()=>Ee,isNode:()=>Sq,isObjectInput:()=>cm,isOccupancyRule:()=>qX,isOwnerOnlyEventCategory:()=>Ie,isRemovedModelId:()=>V$,isRestoredCap:()=>aY,isRetiredClearKey:()=>Jw,isRootSuppliableStepId:()=>Yc,isSameAddonId:()=>E2,isScheduleActive:()=>sZ,isSecretClear:()=>tt,isSecretConfigField:()=>ze,isSecretFieldView:()=>nt,isSecretMarker:()=>$e,isSecretMarkerLike:()=>et,isSecretRef:()=>Nt,isSingleHubAddressRole:()=>Rb,isSoftwareDecode:()=>Pn,isSourceCap:()=>Zl,isStateLabelKey:()=>a$,isStatefulBuiltin:()=>ru,isStorageLocationMode:()=>ys,isSystemDelivery:()=>NX,isSystemEventFamily:()=>sX,isSystemEventSummaryRule:()=>BQ,isSystemRuleKind:()=>yX,isVectorIndexDimConflict:()=>CP,isVoidInput:()=>sm,isZodSecret:()=>BK,ituDbfsFromPreEpoch:()=>fY,jobKindSchema:()=>pF,kebabToCamel:()=>vm,keychainAdminCapability:()=>Q_,keychainCapability:()=>H_,kindOfValue:()=>zh,kindsForDiscriminator:()=>jX,knownSecretCount:()=>Ei,knownValues:()=>zY,lawnMowerControlCapability:()=>kR,legacyAutoLinkIds:()=>cq,legacyModeOf:()=>_s,lifecycleJobSchema:()=>bF,lifecycleJobScopeSchema:()=>yF,lifecycleJobStateSchema:()=>vF,lifecycleTaskSchema:()=>_F,linkedLabelStepId:()=>al,linkedStepOf:()=>ol,listBenchDetailSteps:()=>h0,llmCapability:()=>qx,llmRuntimeCapability:()=>Px,loadContributionCapability:()=>Zx,localNetworkCapability:()=>YR,locationIconKey:()=>Yv,locationSimilarity:()=>S2,lockControlCapability:()=>QR,logBannerArgs:()=>Nn,logChannelsCapability:()=>$x,logDestinationCapability:()=>nS,logLevelAtMost:()=>ga,loginMethodCapability:()=>cS,looseSchema:()=>dm,makeProfileBrokerId:()=>ka,makeSecretMarker:()=>Qe,makeSourceBrokerId:()=>Aa,mapAudioLabelToMacro:()=>TC,markdownToHtmlLite:()=>YY,markdownToText:()=>UY,maskUrlCredentials:()=>W2,matchDoAction:()=>Hq,mayReadLocation:()=>xs,mayWriteToLocation:()=>bs,measuredCapacityFromResults:()=>u0,measuredDetectorCells:()=>l0,mediaPlayerCapability:()=>rz,memoizePinnedFfmpeg:()=>Dr,mergeSecretStatePaths:()=>cn,mergeSettingsBags:()=>r1,mergeSourceInfo:()=>hv,meshNetworkCapability:()=>sz,method:()=>L,methodAccessForHttpMethod:()=>Hl,metricsProviderCapability:()=>OS,migrateLegacyDeviceSignalConfig:()=>yo,minutesToTimeOfDay:()=>hU,modeMayRead:()=>hs,modeMayWrite:()=>ms,modelBindingKey:()=>U$,modelConvertCapability:()=>AS,modelDistributorCapability:()=>NS,modelFormatForRuntime:()=>F4,motionCapability:()=>dz,motionDetectionCapability:()=>IS,motionSourceLabel:()=>Hj,motionTriggerCapability:()=>mz,motionZonesCapability:()=>yz,mqttBrokerCapability:()=>JS,nativeObjectDetectionCapability:()=>Dz,navigationCapability:()=>zz,ncAlarmSystemDefaultSettings:()=>XZ,networkAccessCapability:()=>QS,networkLinkCapability:()=>Gz,networkQualityCapability:()=>Yz,nodeBenchmarkRefusals:()=>i0,nodePickerItems:()=>XQ,nodePin:()=>Sd,nodesCapability:()=>pB,normalizeAddonInitResult:()=>gn,normalizeAudioLabel:()=>hY,normalizeCoreBlockWrite:()=>a_,normalizeNodeId:()=>yt,normalizeSecretOwner:()=>Dt,normalizeTokenScopes:()=>p2,normalizeUnit:()=>gv,notificationOutputCapability:()=>hC,notificationRulesCapability:()=>fE,notifierCapability:()=>bB,numericSensorCapability:()=>SB,oauthIntegrationCapability:()=>wE,objectInputDeclaresAddonId:()=>pm,objectInputDeclaresRequiredDeviceId:()=>mm,occupancyScope:()=>lk,optionalAncestors:()=>oh,optionalMethod:()=>Pd,osdCapability:()=>OB,osdManagerCapability:()=>VB,overlayClusterStepSettings:()=>dD,packagePickerItems:()=>t$,parseAdminBase:()=>fv,parseCameraStreamConfig:()=>fa,parseExpression:()=>Nu,parseJsonArray:()=>V2,parseJsonObject:()=>B2,parseJsonUnknown:()=>P2,parseMediaOwnerKey:()=>De,parseOccupancyScope:()=>uk,parseProcStatus:()=>q2,parseProfileBrokerId:()=>ja,parseRuleSection:()=>GX,parseSecretRef:()=>Ft,parseSecretStatePath:()=>on,parseSessionPlacementPolicy:()=>hA,parseShareSource:()=>NA,parseStreamParamsFormPatch:()=>oW,patchAudio:()=>TY,petFeederCapability:()=>GB,pickAccessoryControl:()=>bq,pickAppLinkHub:()=>Mb,pickClusterStepModels:()=>$E,pickClusterStepSettings:()=>uD,pickDetailCropConvention:()=>E0,pickInvalidClusterStepModels:()=>eD,pickNativeLeaseOverride:()=>e2,pickPreferredRtspEntry:()=>vc,pickRestartCandidate:()=>n4,pickVideoEncoder:()=>Qn,pickerForCondition:()=>FY,pickerForRuleClasses:()=>LY,pinUnderBenchmark:()=>Z1,pipelineAnalyticsCapability:()=>fk,pipelineExecutorCapability:()=>Gk,pipelineOrchestratorCapability:()=>UM,pipelineRunnerCapability:()=>nM,planComposition:()=>Ag,planCompositionEvents:()=>fh,planItems:()=>cg,plateGalleryCapability:()=>ZB,platformProbeCapability:()=>pV,poolMemoryThreshold:()=>Z2,powerMeterCapability:()=>hV,prepareNotification:()=>nX,presenceCapability:()=>vV,pressureSensorCapability:()=>bV,principalMayReachAddon:()=>Kl,privacyMaskCapability:()=>EV,procedureAuthKey:()=>_m,providerMotionEvent:()=>L$,ptzAutotrackCapability:()=>VV,ptzCapability:()=>IV,publicEventCategories:()=>Le,pythonScriptForBackend:()=>g4,rankStreams:()=>An,readClusterStepModels:()=>ZE,readClusterStepSettings:()=>cD,readDetailCropConvention:()=>w0,readDeviceStateFrom:()=>EK,readHubMotionDetected:()=>P$,readHubMotionStatus:()=>N$,readMotionTriggeredBy:()=>DE,readNativeLeaseOverride:()=>Z0,readNodePin:()=>wd,readTimelapseGeneratedAt:()=>A$,readUseRootModel:()=>pl,readinessKey:()=>dc,rebootCapability:()=>HV,recommendNode:()=>I1,reconcileBlockDevices:()=>fq,recordingArchiveCapability:()=>bH,recordingCapability:()=>eH,recordingExportCapability:()=>VH,recordingOnboardCapability:()=>eU,recordingSignalCapability:()=>bU,rectsToCells:()=>a4,reducePoints:()=>lc,registerKnownSecret:()=>wi,renameAlarmProfile:()=>rQ,replacedFieldKeys:()=>Ng,requiredTopLevelKeys:()=>ah,requiresPython:()=>_4,reservedSourceOwner:()=>SU,resetPoolBaseline:()=>t4,resolveAddonExecution:()=>Rr,resolveAddonGroup:()=>Vr,resolveAddonPlacement:()=>Ur,resolveAppConnections:()=>sx,resolveBucketMs:()=>cc,resolveCapMount:()=>Ed,resolveClipSearchMinScore:()=>Wc,resolveClusterStepModelId:()=>rD,resolveContainerPrimaryChild:()=>oq,resolveCoreBlockEntry:()=>r_,resolveCoreBlockFiles:()=>i_,resolveCreateExportSubject:()=>zH,resolveDeviceControlKind:()=>gq,resolveDeviceProfile:()=>qq,resolveDisplayIconKey:()=>aJ,resolveEffectiveShares:()=>W1,resolveEgressDecodeHwAccel:()=>pr,resolveExportProfiles:()=>LH,resolveFormat:()=>ZY,resolveHubAddressRoles:()=>cx,resolveHydratedFieldValue:()=>dt,resolveInternalAddress:()=>nx,resolveLocationIcon:()=>Xv,resolveLocationMode:()=>vs,resolveMethodAuth:()=>gm,resolveModeDelays:()=>kZ,resolveModeNotifyPolicy:()=>EZ,resolveModelBoundSetting:()=>G$,resolveMutate:()=>Cq,resolveNotificationTapAddress:()=>ix,resolvePoolMemoryPolicy:()=>K2,resolvePublicEndpoint:()=>rx,resolveRecordingProfiles:()=>po,resolveRootSupply:()=>hl,resolveRunnerId:()=>Hr,resolveSecretMarkers:()=>Xt,resolveSecretViewsIn:()=>Pi,resolveStreamMaps:()=>In,resolveVariantModelId:()=>Lc,resolveViewableDeviceIds:()=>f2,resultCellKey:()=>a0,resultStandings:()=>s0,roleSpec:()=>n2,roomCompositionExample:()=>aK,rootSuppliesOf:()=>dl,rootSupplyServes:()=>_l,ruleAutoTriggersAlarm:()=>_Z,ruleBelongsToAlarm:()=>gZ,ruleDeviceCompatCapNames:()=>PX,ruleDeviceCompatCapQueries:()=>IX,ruleEditorSectionsForKind:()=>nZ,ruleGatedOnArmedState:()=>hZ,ruleGroupingApplies:()=>RX,ruleKindOf:()=>LX,ruleKindSpec:()=>AX,ruleMatchesSection:()=>JX,ruleSection:()=>WX,ruleSectionOf:()=>YX,ruleSeedForSection:()=>QX,runInferenceStep:()=>c4,runtimeDevices:()=>N4,runtimeStatePolicyFor:()=>rY,sameDoFamily:()=>Iq,sceneMonitorCapability:()=>zU,scheduleForSendTimes:()=>GQ,schemaDeclaresAnyField:()=>We,scopeInherits:()=>u2,scopeKey:()=>fc,scopesAllowAddon:()=>Wl,scopesAllowDeviceCap:()=>Ul,scoreRuntimes:()=>I4,scriptRunnerCapability:()=>WU,scrubKnownSecrets:()=>Oi,searchDisplayIcons:()=>dJ,secretTreeFromPaths:()=>ln,secretTreeFromSchema:()=>an,secureActuationFor:()=>CZ,selectAppConnectionEndpoints:()=>ox,selectAssignedProfileSlots:()=>Ma,sendTimesForEditor:()=>qQ,sendTimesOfSchedule:()=>KQ,sensorRaisedOf:()=>dQ,sensorTransitionNeverFires:()=>bZ,sensorTransitionOffered:()=>fQ,servedTemplateVars:()=>OQ,serverManagementCapability:()=>lN,setByPath:()=>mJ,settingValuesEqual:()=>t1,settingsBelow:()=>i1,settingsStoreCapability:()=>N_,shortSecretRefHash:()=>xi,signalPercentFromBars:()=>Uz,signalPercentFromRssi:()=>Wz,siteZoneKey:()=>$v,sleep:()=>v4,sleepCancellable:()=>y4,sliceActiveValue:()=>Ql,sliceChangedAt:()=>$l,smokeCapability:()=>KU,smtpProviderCapability:()=>mN,snapshotCapability:()=>_N,ssoBridgeCapability:()=>yN,startReachabilityPoll:()=>vJ,stateLabel:()=>o$,stateVocabularyFor:()=>DK,stepModelRunsOnFormat:()=>z$,stepSettingSource:()=>o1,storageCapability:()=>xN,storageEvictableCapability:()=>wN,storageMigrationCapability:()=>TN,storageOccupancyCapability:()=>DN,storageProviderCapability:()=>zN,streamBrokerCapability:()=>em,streamCatalogCapability:()=>YU,streamParamsCapability:()=>nW,streamPixels:()=>oa,streamQualityLabel:()=>aa,streamSignalsCapability:()=>HN,stripRetiredBandPreBufferSec:()=>oo,strippedOfLegacyReadOnly:()=>Cs,subKindsOf:()=>FC,summarisePrivacyAudio:()=>DV,summarizeEffectiveScope:()=>v2,supplyFor:()=>fl,supportedRuntimes:()=>M4,switchCapability:()=>cW,switchedOffIds:()=>_i,syncActiveAlarmProfileSettings:()=>oQ,synthesizeSourceInfo:()=>mv,systemCapability:()=>zW,systemEventDeliveryProblems:()=>HQ,systemEventFamilyOf:()=>hX,systemEventFamilyProblems:()=>gX,systemEventFilterApplies:()=>iX,systemEventFilterAppliesToAnyKind:()=>aX,systemEventKindNamesOf:()=>mX,systemEventKindsOfFamily:()=>pX,systemEventSummaryScheduleOf:()=>RQ,systemEventSummarySplitOf:()=>zQ,systemFamilyOfKind:()=>bX,systemRuleKindOf:()=>zX,tamperCapability:()=>VW,taskLogEntrySchema:()=>gF,taskPhaseSchema:()=>mF,taskTargetSchema:()=>hF,temperatureSensorCapability:()=>UW,templateCarriesSummary:()=>YQ,templateVarDeliveryApplies:()=>AQ,templateVarKindApplies:()=>NQ,templateVarSystemEventApplies:()=>PQ,templateVarsFor:()=>FQ,terminalSessionCapability:()=>ZN,textToHtml:()=>JY,timeOfDayToMinutes:()=>mU,toAppLinkHubOrigin:()=>jb,toDeviceSummary:()=>XK,toExpressionValue:()=>Zu,toNodeId:()=>Cd,toPercentShares:()=>K1,toSecretFieldView:()=>rt,toStreamSourceEntry:()=>la,toastCapability:()=>GW,toggleAudioLabel:()=>OY,tokenize:()=>Eu,transcodeBody:()=>QY,transformSecretWrite:()=>Yt,tryConvertUnit:()=>KG,turnProviderCapability:()=>$N,unitDimension:()=>HG,unitsForDimension:()=>JG,unreachableExtensionSlotRow:()=>Gy,unwrapSchema:()=>Qm,updateCapability:()=>qW,userManagementCapability:()=>cG,userPasskeysCapability:()=>tP,vacuumControlCapability:()=>fG,validateComposition:()=>Bg,validateCustomAddress:()=>Xb,validateExpressionSource:()=>Qu,validateRecipeBounds:()=>hd,valveCapability:()=>hG,vectorDimFromBase64:()=>S4,vectorIndexDimConflictError:()=>SP,vectorStoreCapability:()=>EP,vibrationCapability:()=>_G,videoclipsCapability:()=>XP,viewerLinkBaseOf:()=>Ab,viewerUiCapability:()=>eF,waterHeaterCapability:()=>yG,weatherCapability:()=>xG,webrtcClientHintsSchema:()=>tF,webrtcSessionCapability:()=>uF,weeklyMaskIndex:()=>uU,weeklyMaskIsUniform:()=>dU,weeklyMaskToWindows:()=>fU,windowsToWeeklyMask:()=>pU,wiringAddonHealthSchema:()=>Pr,wiringHealthSnapshotSchema:()=>Ir,wiringNodeHealthSchema:()=>Fr,wiringProbeKindSchema:()=>Mr,wiringProbeResultSchema:()=>Nr,withFieldFrom:()=>s1,withLocationMode:()=>ws,withoutField:()=>c1,writeModelBoundSetting:()=>q$,zodEntriesToConfigUI:()=>FJ,zoneAnalyticsCapability:()=>AG,zoneRulesCapability:()=>MG,zonesCapability:()=>yj});export{bZ as $,Yv as $n,po as $r,cq as $t,t$ as A,$E as An,hd as Ar,TY as At,EQ as B,VC as Bn,Rc as Br,Yq as Bt,G$ as C,kP as Cn,mf as Cr,vY as Ct,O$ as D,KE as Dn,dd as Dr,xY as Dt,y$ as E,iD as En,bd as Er,EY as Et,KQ as F,AE as Fn,jl as Fr,kJ as Ft,pQ as G,Zb as Gn,ec as Gr,Vq as Gt,AQ as H,MC as Hn,Cc as Hr,Oq as Ht,HQ as I,ET as In,nl as Ir,CJ as It,kZ as J,jb as Jn,Ls as Jr,Hq as Jt,fQ as K,Xb as Kn,ic as Kr,Uq as Kt,zQ as L,iw as Ln,Yc as Lr,$q as Lt,UQ as M,HE as Mn,gu as Mr,cY as Mt,GQ as N,jE as Nn,Yl as Nr,$J as Nt,o$ as O,oD as On,fd as Or,bY as Ot,qQ as P,ME as Pn,ql as Pr,JJ as Pt,yZ as Q,Gv as Qn,uo as Qr,gq as Qt,YQ as R,mT as Rn,hl as Rr,aJ as Rt,U$ as S,jP as Sn,pp as Sr,_Y as St,E$ as T,WE as Tn,R as Tr,SY as Tt,NQ as U,XS as Un,wc as Ur,zq as Ut,kQ as V,DC as Vn,Lc as Vr,Z as Vt,PQ as W,bx as Wn,tc as Wr,Bq as Wt,xZ as X,Ny as Xn,ao as Xr,Tq as Xt,EZ as Y,Fy as Yn,vs as Yr,Iq as Yt,SZ as Z,jy as Zn,lo as Zr,mq as Zt,c1 as _,tH as _n,Ym as _r,sX as _t,r2 as a,mi as ai,mK as an,Jg as ar,GX as at,Z$ as b,ZI as bn,B as br,FY as bt,N0 as c,Ye as ci,nK as cn,i_ as cr,LX as ct,a1 as d,He as di,aK as dn,ym as dr,QX as dt,Ga as ei,tq as en,Xv as er,XX as et,f1 as f,Be as fi,$G as fn,Pm as fr,bX as ft,s1 as g,JG as gn,zm as gr,fX as gt,o1 as h,Pe as hi,HG as hn,qm as hr,dX as ht,t2 as i,Ma as ii,gK as in,X_ as ir,yX as it,LQ as j,uD as jn,Zu as jr,OY as jt,XQ as k,aD as kn,pd as kr,DY as kt,y0 as l,tt as li,tK as ln,Jh as lr,AX as lt,t1 as m,Le as mi,KG as mn,Um as mr,oX as mt,p2 as n,D as ni,DK as nn,Vv as nr,HX as nt,a2 as o,ot as oi,fK as on,l_ as or,IX as ot,r1 as p,T as pi,qG as pn,Nm as pr,zX as pt,KZ as q,Db as qn,Is as qr,Pq as qt,f2 as r,Aa as ri,pK as rn,gv as rr,NX as rt,n2 as s,ct as si,dK as sn,c_ as sr,RX as st,B4 as t,Sa as ti,oq as tn,zv as tr,BX as tt,d1 as u,nt as ui,eK as un,xm as ur,JX as ut,X$ as v,WV as vn,Gm as vr,aX as vt,q$ as w,Hj as wn,z as wr,yY as wt,Y$ as x,MP as xn,Jm as xr,LY as xt,J$ as y,oz as yn,Wm as yr,zY as yt,DQ as z,AT as zn,Ic as zr,dJ as zt};
|