@camstack/addon-admin-ui 1.2.495 → 1.2.496
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/CHANGELOG.md +6 -0
- package/dist/assets/{AddonAssetIcon-CFX3RwXW.js → AddonAssetIcon-DIGI0J-I.js} +1 -1
- package/dist/assets/{Addons-DpVH9nAf.js → Addons-BXBVaw0C.js} +1 -1
- package/dist/assets/{AdminPage-BJaaesfk.js → AdminPage-rM4C_UeK.js} +1 -1
- package/dist/assets/{AdminSectionedPage-CNjLEAGW.js → AdminSectionedPage-hs_sRKSH.js} +1 -1
- package/dist/assets/{AiProfiles-BJRJ5zJK.js → AiProfiles-FyDOlZrB.js} +1 -1
- package/dist/assets/BrokerEditorDialog-CpjjEowc.js +1 -0
- package/dist/assets/{Build-3M_d0_rj.js → Build-BHWi77ox.js} +1 -1
- package/dist/assets/{Calendars-DxftJ_an.js → Calendars-DpfM0tWi.js} +1 -1
- package/dist/assets/{Cluster-HHqJRHI1.js → Cluster-CGbK_RcF.js} +1 -1
- package/dist/assets/{CompositionBlockEditor-DXfPsKQ0.js → CompositionBlockEditor-C-oGyTOT.js} +1 -1
- package/dist/assets/{CompositionEditorPage-D9VfeM5q.js → CompositionEditorPage--pC-fQTK.js} +1 -1
- package/dist/assets/{Data-4tIzvoZk.js → Data-5YjPSX0u.js} +1 -1
- package/dist/assets/{DeviceDetail-DSCDR1Cp.js → DeviceDetail-MgYrZi-H.js} +1 -1
- package/dist/assets/{DeviceDoActionFields-B8m61VBx.js → DeviceDoActionFields-C8dC5weu.js} +1 -1
- package/dist/assets/{Devices-DMgEOarQ.js → Devices-BDxPWKee.js} +1 -1
- package/dist/assets/{EmbedPlayerPage-kdaZaPUi.js → EmbedPlayerPage-CXfoZEoy.js} +1 -1
- package/dist/assets/{HelperWizard-CrfZ5Vv0.js → HelperWizard-DPb6SH1D.js} +1 -1
- package/dist/assets/{History-BOBC6XKv.js → History-CgY-ADwx.js} +1 -1
- package/dist/assets/{Identity-CKhLFZy8.js → Identity-CngM910j.js} +1 -1
- package/dist/assets/{IntegrationDetail-CwztjSvz.js → IntegrationDetail-tLO3mmbA.js} +1 -1
- package/dist/assets/{IntegrationHub-BnLIS74H.js → IntegrationHub-M6BlF8kI.js} +1 -1
- package/dist/assets/{Integrations-BjjqLgHB.js → Integrations-CEbaKS2K.js} +1 -1
- package/dist/assets/{Integrations-D9JKfDPr.js → Integrations-lFHvSwS1.js} +1 -1
- package/dist/assets/{Library-CIoEX1yM.js → Library-owv8dCJn.js} +1 -1
- package/dist/assets/{Locations-CeULSBbP.js → Locations-CIbPLu6Y.js} +1 -1
- package/dist/assets/{Logs-DqMDFyDI.js → Logs-BkVwtIoJ.js} +1 -1
- package/dist/assets/{MaskShapeCanvas-5TYDYckS.js → MaskShapeCanvas-BdJHOhru.js} +1 -1
- package/dist/assets/{MotionZonesSettings-BnEAkRqe.js → MotionZonesSettings-eigY1-yb.js} +1 -1
- package/dist/assets/{MyAccess-C9ZlQjl7.js → MyAccess-kMqHvFdO.js} +1 -1
- package/dist/assets/{Network-DWsy6sps.js → Network-DNgds3SY.js} +1 -1
- package/dist/assets/{NodeAddonsSettingsPanel-BWoo8ZpJ.js → NodeAddonsSettingsPanel-BTLr6xzq.js} +1 -1
- package/dist/assets/{Notifications-D45pUZf1.js → Notifications-3HA167No.js} +1 -1
- package/dist/assets/{Pipeline-DtXlNNOZ.js → Pipeline-Duxnzw0u.js} +1 -1
- package/dist/assets/{PrivacyMaskSettings-CozNRgQC.js → PrivacyMaskSettings-DQxuAo8I.js} +1 -1
- package/dist/assets/{Recordings-C7QC3Pxj.js → Recordings-DNM6KFbT.js} +1 -1
- package/dist/assets/{ScanNetworkModal-Bq6Sr4qL.js → ScanNetworkModal-DGxeTl6N.js} +1 -1
- package/dist/assets/{SceneMonitorEditor-DtTzOArV.js → SceneMonitorEditor-D7lPRwkb.js} +1 -1
- package/dist/assets/{SessionsList-BHjPSf3H.js → SessionsList-v1GWS7lS.js} +1 -1
- package/dist/assets/{Showroom-33b_lNAT.js → Showroom-BQjG5SEZ.js} +1 -1
- package/dist/assets/{System-8xlWQY0F.js → System-1vAVXVvO.js} +1 -1
- package/dist/assets/{Terminal-DxLUTA7D.js → Terminal-CAeZSUkp.js} +1 -1
- package/dist/assets/{Viewer-BeUf0fdC.js → Viewer-CoaaY2ah.js} +1 -1
- package/dist/assets/{_virtual_mf-localSharedImportMap___mfe_internal__admin_ui_host-BopscExo.js → _virtual_mf-localSharedImportMap___mfe_internal__admin_ui_host-Dt6nbTOI.js} +1 -1
- package/dist/assets/{addon-icons-context-DGXC9vor.js → addon-icons-context-B-CR3D5Y.js} +1 -1
- package/dist/assets/{archive-CvXjfAJ5.js → archive-Caq0fiUd.js} +1 -1
- package/dist/assets/{assignment-candidates-YyTJV_56.js → assignment-candidates-oUf0MmfV.js} +1 -1
- package/dist/assets/{authed-media-LqwyDFYD.js → authed-media-rsowuJD_.js} +1 -1
- package/dist/assets/{bell-off-DQjR_xqX.js → bell-off-7NO0NCk5.js} +1 -1
- package/dist/assets/{board-model-DHqTtLge.js → board-model-CXoBU-My.js} +1 -1
- package/dist/assets/{boxes-g1SWI3TC.js → boxes-CfX2DaXN.js} +1 -1
- package/dist/assets/circle-slash-CNw3qaX5.js +1 -0
- package/dist/assets/client-UkFHArbd.js +648 -0
- package/dist/assets/{cloud-upload-BsaCZZve.js → cloud-upload-Bha3MQZ0.js} +1 -1
- package/dist/assets/crop-KD442bNz.js +1 -0
- package/dist/assets/{device-integration-icon-B4EhX_LL.js → device-integration-icon-Ca6J7BrE.js} +1 -1
- package/dist/assets/device-picker-model-C0bjqXeS.js +1 -0
- package/dist/assets/{dist-C-xa27xq.js → dist-Bm86l9VH.js} +1 -1
- package/dist/assets/dist-Db-bCS6Y.js +648 -0
- package/dist/assets/{eraser-Cayo_0zK.js → eraser-DcRrD8r0.js} +1 -1
- package/dist/assets/{format-BA7Kq5Xz.js → format-B-Mz_Gp5.js} +1 -1
- package/dist/assets/{hard-drive-download-DDQriCJk.js → hard-drive-download-Ds3LLqZ_.js} +1 -1
- package/dist/assets/{hostInit-CzNFxC77.js → hostInit-CLJxS8C0.js} +1 -1
- package/dist/assets/i18n-Dodsa0QQ.js +1 -0
- package/dist/assets/{icons-BPbbdJnj.js → icons-CxLU2kUU.js} +1 -1
- package/dist/assets/{index-5eo6U8kw.js → index-DAYRmkvA.js} +3 -3
- package/dist/assets/{key-BSu0zrWB.js → key-CPCN1bXO.js} +1 -1
- package/dist/assets/{key-round-DvMZJgfp.js → key-round-DSSlw3bb.js} +1 -1
- package/dist/assets/{layers-DF_k6hWC.js → layers-Au38YP9x.js} +1 -1
- package/dist/assets/{linked-devices-model-C-5bW2__.js → linked-devices-model-CAcKgihZ.js} +1 -1
- package/dist/assets/{list-ordered-BY9cDz4x.js → list-ordered-BcEAxRcq.js} +1 -1
- package/dist/assets/{location-owned-usage-FBzPOvfn.js → location-owned-usage-DC8YfZHt.js} +1 -1
- package/dist/assets/{log-in-S_8y8Jt7.js → log-in-BIF-VHyB.js} +1 -1
- package/dist/assets/{memory-stick-N7YG8WDr.js → memory-stick-dd2TtD8X.js} +1 -1
- package/dist/assets/{message-square-plus-B6OMDBFd.js → message-square-plus--EqwnnsY.js} +1 -1
- package/dist/assets/{mf-entry-bootstrap-0-05b5b10f.js → mf-entry-bootstrap-0-d8302735.js} +2 -2
- package/dist/assets/{mic-off-wSLIBpcb.js → mic-off-C4AEP_LS.js} +1 -1
- package/dist/assets/{monitor-off-BPkjr8Kb.js → monitor-off-BMFLRGf9.js} +1 -1
- package/dist/assets/{monitor-smartphone-BaKbWsBX.js → monitor-smartphone-BKJ1_LnF.js} +1 -1
- package/dist/assets/mount-C0bjqXeS.js +1 -0
- package/dist/assets/{player-overlays-BpkVlGCk.js → player-overlays-DVETFMIk.js} +1 -1
- package/dist/assets/{recycle-BpmmXPs6.js → recycle-BayFw4ej.js} +1 -1
- package/dist/assets/remoteEntry-BkQqqD-X.js +1 -0
- package/dist/assets/{scan-eye-Cu1C2mB8.js → scan-eye-BrzMkZIm.js} +1 -1
- package/dist/assets/{scissors-CfgqlM1P.js → scissors-Cdea5FpP.js} +1 -1
- package/dist/assets/{search-x-D03g42iG.js → search-x-D5U75yFR.js} +1 -1
- package/dist/assets/{send-Ct8Iyrnk.js → send-DdLpBXJo.js} +1 -1
- package/dist/assets/{settings-2-DcFFzE15.js → settings-2-E7MRkJ8L.js} +1 -1
- package/dist/assets/{sigma-BBZ6UUbV.js → sigma-DQ448qdQ.js} +1 -1
- package/dist/assets/{speaker-B0avnbSb.js → speaker-8vDFm1aL.js} +1 -1
- package/dist/assets/src-CJMN3ac7.js +67 -0
- package/dist/assets/{step-inspector-model-DSf88Gyc.js → step-inspector-model-DrrErQ-Z.js} +1 -1
- package/dist/assets/{table-2-DMA3aZl4.js → table-2-BWAe4fOI.js} +1 -1
- package/dist/assets/{timer-reset-Bbx4AGN0.js → timer-reset-BlrgM8RC.js} +1 -1
- package/dist/assets/{ungroup-BQn6cqqW.js → ungroup-D9nsaCkT.js} +1 -1
- package/dist/assets/{unlink-4NHoJGD6.js → unlink-BZggCuRp.js} +1 -1
- package/dist/assets/{usb-7LyYlbOn.js → usb-CnowURs8.js} +1 -1
- package/dist/assets/{use-scenes-feed-BMxBsO4L.js → use-scenes-feed-CKTWN5k9.js} +1 -1
- package/dist/assets/{use-stationary-objects-vMMZk1OF.js → use-stationary-objects-CFZh0JGL.js} +1 -1
- package/dist/assets/useEventInvalidation-C0bjqXeS.js +1 -0
- package/dist/assets/{useNodeUrlSelection-D50tuj4_.js → useNodeUrlSelection-CPhmr6x9.js} +1 -1
- package/dist/assets/user-round-DX7v4O3o.js +1 -0
- package/dist/assets/{user-x-BjoN1Vho.js → user-x-S0MRC6zp.js} +1 -1
- package/dist/assets/{video-1DOXNRH4.js → video-oLlCkBIP.js} +1 -1
- package/dist/assets/{virtual_mf-REMOTE_ENTRY_ID___mfe_internal__admin_ui_host__remoteEntry-_hash_-DBgm9Tfr.js → virtual_mf-REMOTE_ENTRY_ID___mfe_internal__admin_ui_host__remoteEntry-_hash_-Ddnry646.js} +2 -2
- package/dist/index.html +9 -9
- package/dist/server/addon.js +649 -71
- package/package.json +1 -1
- package/dist/assets/BrokerEditorDialog-DfJWCNWC.js +0 -1
- package/dist/assets/circle-slash-Be75TgNF.js +0 -1
- package/dist/assets/client-Boy4MYN9.js +0 -358
- package/dist/assets/crop-ChAbNHDL.js +0 -1
- package/dist/assets/device-picker-model-DgqPui1o.js +0 -1
- package/dist/assets/dist-CoizE_WQ.js +0 -358
- package/dist/assets/i18n-BKbDJexS.js +0 -1
- package/dist/assets/mount-DgqPui1o.js +0 -1
- package/dist/assets/remoteEntry-TI8zrKEx.js +0 -1
- package/dist/assets/src-B1DsO1Ze.js +0 -67
- package/dist/assets/useEventInvalidation-DgqPui1o.js +0 -1
- package/dist/assets/user-round-Dk_iTJlv.js +0 -1
|
@@ -0,0 +1,648 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./__vite-browser-external-BlMfPwfH.js","./rolldown-runtime-Cyuzqnbw.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{a as e}from"./rolldown-runtime-Cyuzqnbw.js";import{t}from"./vite-preload-helper-kNaey6uv.js";import{A as n,C as r,D as i,E as a,F as o,I as s,L as c,M as l,N as u,O as d,P as f,R 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 b,i as re,j as x,k as ie,l as ae,m as S,n as oe,o as se,p as C,r as ce,s as le,t as ue,u as de,v as w,w as fe,x as pe,y as T}from"./__vite-browser-external-BlMfPwfH.js";var E=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.AddonRunnerRefused=`addon.runner-refused`,e.ProcessStateChanged=`process.state-changed`,e.SystemRunnerCheck=`system.runner-check`,e.AlertEpisode=`alert.episode`,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.RecordingHealthStalled=`recording.health.stalled`,e.RecordingHealthOk=`recording.health.ok`,e.RecordingStorageCritical=`recording.storage.critical`,e.StorageLocationLow=`storage.location.low`,e.StorageLocationCritical=`storage.location.critical`,e.StorageLocationOk=`storage.location.ok`,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.PipelineMotionNoisy=`pipeline.motion-noisy`,e.PipelineMotionCalm=`pipeline.motion-calm`,e.PipelinePackageLlmSilent=`pipeline.package-llm-silent`,e.PipelinePackageLlmAnswered=`pipeline.package-llm-answered`,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.RunningStarted=`running.started`,e.RunningFinished=`running.finished`,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.NotificationRuleBroken=`notification.rule-broken`,e.NotificationRuleRepaired=`notification.rule-repaired`,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.ActionsRunChanged=`actions.onRunChanged`,e.ModelConvertProgress=`model-convert.progress`,e}({}),me=new Set([`device.native-shadow-changed`]);function he(e){return me.has(e)}function ge(){let e=Object.values(E).filter(e=>typeof e==`string`);return[...new Set(e)].filter(e=>!he(e)).toSorted()}var _e=[`f32le`,`pcmu`,`pcma`];function ve(e){return typeof e==`string`&&_e.includes(e)}function ye(e){return e===`f32le`?4:1}function be(e,t){if(t===`f32le`){let t=new Uint8Array(e.byteLength);return t.set(e),t}let n=t===`pcmu`?Ce:we,r=new Float32Array(e.length);for(let t=0;t<e.length;t++)r[t]=n[e[t]];return new Uint8Array(r.buffer)}function xe(){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 Se(){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 Ce=xe(),we=Se(),Te=`__camstack_redacted__`;function Ee(e){return e.type===`password`?!0:`secret`in e&&e.secret===!0}function De(e){return!Ee(e)||e.type===`textarea`&&e.isJson===!0?!1:!(`storage`in e&&e.storage===`inline`)}function Oe(e){let t=new Set;for(let n of Fe(e))for(let e of Ie(n))Le(e,t);return t}function ke(e,t){let n=new Set;for(let t of Fe(e))for(let e of Ie(t))Ae(e,n);if(n.size===0)return t;let r={...t};for(let e of n)delete r[e];return r}function Ae(e,t){if(!Pe(e))return;let n=e.type,r=e.key;if(e.omitFromSettings===!0&&typeof r==`string`&&r.length>0&&t.add(r),n===`group`){for(let n of Ie(e))Ae(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 Ie(e))Ae(n,t)}}function je(e){let t=new Set;for(let n of Fe(e))for(let e of Ie(n))Me(e,t);return t}function Me(e,t){if(!Pe(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 Ie(e))Me(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 Ie(e))Me(n,t)}}function Ne(e){for(let t of Fe(e))if(Ie(t).length>0)return!0;return!1}function Pe(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function Fe(e){if(!Pe(e))return[];let t=e.sections;return Array.isArray(t)?t:[]}function Ie(e){if(!Pe(e))return[];let t=e.fields;return Array.isArray(t)?t:[]}function Le(e,t){if(!Pe(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 Ie(e))Le(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 Ie(e))Le(n,t)}}var Re={$secretClear:!0},ze=`***`;function Be(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function Ve(e){return{$secret:e,v:1}}function He(e){if(!Be(e))return!1;let t=e.$secret;return typeof t==`string`&&t.length>0}function Ue(e){return Be(e)&&Object.prototype.hasOwnProperty.call(e,`$secret`)}function We(e){return Be(e)&&e.$secretClear===!0}function Ge(e){return Be(e)&&e.set===!0&&Ue(e)}function Ke(e){return He(e)?{$secret:e.$secret,v:1,set:!0}:typeof e==`string`&&e.length>0?{$secret:null,v:1,set:!0,inline:!0}:null}function qe(e){return We(e)?{kind:`clear`}:typeof e!=`string`||e.length===0||e===`__camstack_redacted__`||e===ze?{kind:`keep`}:{kind:`set`,value:e}}var Je=[{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}],Ye=Object.fromEntries(Je.map(e=>[e.id,e]));function Xe(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`||e.type===`account-sign-in`||e.type===`secret-presence`}function Ze(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&&Qe(e.fields,t);return t}function Qe(e,t){if(Array.isArray(e))for(let n of e){if(typeof n!=`object`||!n)continue;let e=n.type;if(e===`group`){Qe(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&&Qe(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 $e(e){let t=new Map;for(let[n,r]of Ze(e))t.set(n,r.value??r.default);return t}function et(e,t){let n=Ze(e).get(t);return n===void 0?void 0:n.value??n.default}function tt(e,t,n={}){return{...e.tabs?{tabs:[...e.tabs]}:{},sections:e.sections.map(e=>({...e,fields:e.fields.map(e=>nt(e,t,n))}))}}function nt(e,t,n){if(Xe(e))return e;if(e.type===`group`){let r=e.fields.map(e=>nt(e,t,n));return{...e,fields:r}}if(e.type===`sub-tabs`){let r=e.tabs.map(e=>({...e,fields:e.fields.map(e=>nt(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=>He(e)||n.inlineSecretsAsViews===!0&&e!==void 0;if(De(e)&&o(i))return{...e,value:Ke(i)};if(De(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&&De(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]=Ke(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?rt(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 rt(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 it(e){if(e.type===`group`)return{...e,fields:e.fields.map(it)};if(e.type===`sub-tabs`)return{...e,tabs:e.tabs.map(e=>({...e,fields:e.fields.map(it)}))};if(Xe(e))return e;let{value:t,...n}=e;return n}function at(e){return{...e.tabs?{tabs:[...e.tabs]}:{},sections:e.sections.map(e=>({...e,fields:e.fields.map(it)}))}}function ot(e,t){return e.category===t}function st(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 ct(e,t){let n=t.ts??Date.now();e.emit(st(`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 lt(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 ut(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 dt(e,t){return`${e}@${ut(t)}`}function ft(e,t,n){return e[dt(t,n)]}function pt(e,t,n){let r={};for(let[i,a]of Object.entries(e))r[t.has(i)?dt(i,n):i]=a;return r}function mt(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=ft(e,i,n);t!==void 0&&(r[i]=t)}return r}var ht=`secret://`,gt={kind:`global`};function _t(){return gt}function vt(e){return e.startsWith(`addon:`)?e.slice(6):e}function yt(e){return encodeURIComponent(e)}function bt(e){try{return decodeURIComponent(e)}catch{return null}}function xt(e){switch(e.kind){case`global`:return`global`;case`node`:return`node/${yt(e.nodeId)}`;case`device`:return`device/${e.deviceId}`;case`integration`:return`integration/${yt(e.integrationId)}`;case`row`:return`row/${yt(e.collection)}/${yt(e.rowId)}`}}function St(e,t,n){return`${e}[${yt(t)}].${n}`}function Ct(e){let t=vt(e.owner);if(t.length===0)throw Error(`buildSecretRef: owner is empty`);if(e.fieldPath.length===0)throw Error(`buildSecretRef: fieldPath is empty`);return`${ht}${yt(t)}/${xt(e.scope)}/${e.fieldPath}`}function wt(e){return typeof e==`string`&&Et(e)!==null}function Tt(e){switch(e[0]){case`global`:return{scope:gt,used:1};case`node`:{let t=e[1]===void 0?null:bt(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:bt(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:bt(e[1]),n=e[2]===void 0?null:bt(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 Et(e){if(!e.startsWith(`secret://`))return null;let t=e.slice(9).split(`/`),n=t[0]===void 0?null:bt(t[0]);if(n===null||n.length===0)return null;let r=Tt(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 Dt=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`}},Ot={kind:`keep`};function kt(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function At(){return globalThis.crypto.randomUUID()}function jt(e,t=[]){if(He(e))return t.push(e.$secret),t;if(Array.isArray(e))for(let n of e)jt(n,t);else if(kt(e))for(let n of Object.values(e))jt(n,t);return t}async function Mt(e,t,n){let r=(await e.resolve([t.$secret]))[t.$secret];return r?.kind===`value`&&r.value===n}async function Nt(e,t,n,r){let i=qe(t),a=e.secrets.ref(e.scope,r),o=He(n)&&n.$secret===a;if(i.kind===`keep`||i.kind===`set`&&!e.operatorWrite&&typeof n==`string`&&n===i.value)return Ot;if(i.kind===`clear`)return o&&e.deletes.push(a),{kind:`value`,value:null};if(o&&await Mt(e.secrets,n,i.value))return{kind:`value`,value:n};try{await e.secrets.put(a,i.value)}catch(e){throw new Dt(r,e)}return{kind:`value`,value:Ve(a)}}function Pt(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 Ft(e,t,n,r,i){let a={...n};for(let[o,s]of t)Pt(a,o,await Rt(e,s,n[o],r[o],i(o)),r);return a}function It(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 Lt(e,t,n,r,i){let a=Array.isArray(r)?r.filter(kt):[];if(!Array.isArray(n))return e.deletes.push(...jt(a)),{kind:`value`,value:n};let o=new Map;for(let e of a){let n=It(e,t.idKey);n!==null&&o.set(n,e)}let s=new Set,c=[];for(let r of n){if(!kt(r)){c.push(r);continue}let n=It(r,t.idKey)??e.mintId();s.add(n);let a={...r,[t.idKey]:r[t.idKey]??n};It(a,t.idKey)===null&&(a[t.idKey]=n);let l=o.get(n)??{};c.push(await Ft(e,t.item,a,l,e=>St(i,n,e)))}for(let[t,n]of o)s.has(t)||e.deletes.push(...jt(n));return{kind:`value`,value:c}}async function Rt(e,t,n,r,i){switch(t.kind){case`leaf`:return Nt(e,n,r,i);case`array`:return Lt(e,t,n,r,i);case`object`:{if(!kt(n))return n===void 0?Ot:(e.deletes.push(...jt(r)),{kind:`value`,value:n});let a=kt(r)?r:{};return{kind:`value`,value:await Ft(e,t.children,n,a,e=>`${i}.${e}`)}}}}function zt(e){let t=e.indexOf(`@`);return t<=0?{base:e,nodeId:null}:{base:e.slice(0,t),nodeId:e.slice(t+1)}}async function Bt(e){let t=[],n={secrets:e.secrets,mintId:e.mintId??At,deletes:t,operatorWrite:e.operatorWrite===!0},r={};for(let[t,i]of Object.entries(e.patch)){let{base:a,nodeId:o}=zt(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??_t(),l=await Rt({...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)]}}}}}function Vt(e,t){return Et(e)?.owner===t}async function Ht(e,t,n={}){let r=n.unresolved===`keep-marker`,i=n.ownedBy,a=e=>i===void 0||Vt(e,i),o=jt(e).filter(a);if(o.length===0)return{value:e,unresolved:[]};let s=await t.resolve(o),c=[];for(let e of new Set(o)){let t=s[e];t===void 0?c.push({ref:e,reason:`not-initialized`}):t.kind===`unavailable`?c.push({ref:e,reason:t.reason}):(t.kind===`missing`||t.kind===`forbidden`)&&c.push({ref:e,reason:t.kind})}let l=e=>{if(He(e)){if(!a(e.$secret))return{keep:!0,value:e};let t=s[e.$secret];return t?.kind===`value`?{keep:!0,value:t.value}:r?{keep:!0,value:e}:{keep:!1,value:void 0}}if(Array.isArray(e)){let t=[];for(let n of e){let e=l(n);e.keep&&t.push(e.value)}return{keep:!0,value:t}}if(kt(e)){let t={};for(let[n,r]of Object.entries(e)){let e=l(r);e.keep&&(t[n]=e.value)}return{keep:!0,value:t}}return{keep:!0,value:e}};return{value:l(e).value,unresolved:c}}var eee=class extends Error{ref;reason;constructor(e,t){super(`secret ${e} was not replaced: its stored value cannot be read right now (${t}), and an addon may not overwrite a secret it cannot see. Nothing was written.`),this.ref=e,this.reason=t,this.name=`SecretOverwriteRefusedError`}};function Ut(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function Wt(e,t){let n=e.answers[t.$secret];return n?.kind===`value`?n.value:null}async function Gt(e,t,n){if(t===null)return n;if(typeof t!=`string`)return t;if(t===Wt(e,n))return n;let r=qe(t);if(r.kind!==`set`)return n;let i=n.$secret;if(!Vt(i,e.secrets.owner))return t;let a=e.answers[i];if((a===void 0||a.kind===`unavailable`||a.kind===`forbidden`)&&!e.operatorWrite)throw new eee(i,a===void 0?`not-initialized`:a.kind===`unavailable`?a.reason:a.kind);try{await e.secrets.put(i,r.value)}catch(e){throw new Dt(i,e)}return e.changedRefs.push(i),n}function Kt(e,t,n){return t.map((t,r)=>{let i=n[r];return He(i)?typeof t==`string`&&t===Wt(e,i)?i:t:Ut(t)&&Ut(i)?qt(e,t,i):Array.isArray(t)&&Array.isArray(i)?Kt(e,t,i):t})}function qt(e,t,n){let r={...t};for(let[i,a]of Object.entries(t)){let t=n[i];He(t)?typeof a==`string`&&a===Wt(e,t)&&(r[i]=t):Ut(a)&&Ut(t)?r[i]=qt(e,a,t):Array.isArray(a)&&Array.isArray(t)&&(r[i]=Kt(e,a,t))}return r}async function Jt(e,t,n){if(He(n))return Gt(e,t,n);if(Array.isArray(t)&&Array.isArray(n))return Kt(e,t,n);if(!Ut(t)||!Ut(n))return t;let r={...t};for(let[i,a]of Object.entries(t))r[i]=await Jt(e,a,n[i]);return r}async function Yt(e){let t=[];for(let n of Object.keys(e.patch))jt(e.stored[n],t);let n=t.filter(t=>Vt(t,e.secrets.owner));if(n.length===0)return{patch:e.patch,changedRefs:[]};let r={secrets:e.secrets,answers:await e.secrets.resolve([...new Set(n)]),operatorWrite:e.operatorWrite,changedRefs:[]},i={};for(let[t,n]of Object.entries(e.patch))i[t]=await Jt(r,n,e.stored[t]);return{patch:i,changedRefs:r.changedRefs}}function Xt(e,t){if(Object.is(e,t))return!0;if(Array.isArray(e))return Array.isArray(t)&&e.length===t.length&&e.every((e,n)=>Xt(e,t[n]));if(Ut(e)&&Ut(t)){let n=Object.keys(e);return n.length===Object.keys(t).length?n.every(n=>Object.prototype.hasOwnProperty.call(t,n)&&Xt(e[n],t[n])):!1}return!1}function Zt(e,t){let n={};for(let[r,i]of Object.entries(e))Object.prototype.hasOwnProperty.call(t,r)&&Xt(i,t[r])||(n[r]=i);return n}function Qt(e,t){let n=new Set;for(let[r,i]of Object.entries(e))jt(i).some(e=>Vt(e,t))&&n.add(r);return n}function $t(e,t){if(He(e))return Vt(e.$secret,t)?{kind:`leaf`}:null;if(!Ut(e))return null;let n=new Map;for(let[r,i]of Object.entries(e)){let e=$t(i,t);e!==null&&n.set(r,e)}return n.size>0?{kind:`object`,children:n}:null}function tee(e,t,n,r){let i=new Map;for(let a of n){let n=a.indexOf(`@`),o=n>0?a.slice(0,n):a;if(e.has(o)||i.has(o))continue;let s=$t(t[a],r);s!==null&&i.set(o,s)}return i.size===0?e:new Map([...e,...i])}async function nee(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 ree(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}var iee=class{owner;byStore=new Map;constructor(e){this.owner=e}seen(e,t){this.byStore.set(e,Qt(t,this.owner))}wrote(e,t){let n=this.byStore.get(e);if(n===void 0)return;let r=Qt(t,this.owner);for(let e of Object.keys(t))r.has(e)?n.add(e):n.delete(e)}mayHoldMarkers(e,t){let n=this.byStore.get(e);return n===void 0?!0:Object.keys(t).some(e=>n.has(e))}};function aee(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=new iee(t.secrets.owner),a=async(e,n)=>{i.seen(e,n);let{value:r,unresolved:a}=await Ht(n,t.secrets,{unresolved:`keep-marker`,ownedBy:t.secrets.owner});return a.length>0&&t.onUnresolved?.(a),r},o=async(e,n,a,o,s,c)=>!ree(n,o)&&!i.mayHoldMarkers(e,o)?(await c(o),i.wrote(e,o),{changed:!0}):r(e,async()=>{let r=await s();i.seen(e,r);let l=t.isOperatorWrite?.()===!0,u=await Yt({patch:o,stored:r,secrets:t.secrets,operatorWrite:l}),d=await Bt({tree:tee(n,r,Object.keys(u.patch),t.secrets.owner),secrets:t.secrets,patch:u.patch,stored:r,...a===void 0?{}:{scope:a},operatorWrite:l}),f=Zt(d.patch,r),p=Object.keys(f).length>0;p&&(await c(f),i.wrote(e,f));let{orphaned:m}=await d.afterWrite();return m.length>0&&t.onOrphaned(m),{changed:p||u.changedRefs.length>0}}),s=n=>o(`addon`,t.addonTree(),void 0,n,()=>nee(e),t=>e.writeAddonStore(t)),c=e.readAddonStoreResult,l=e.readAddonStoreKeyResult,u={readAddonStore:async()=>a(`addon`,await e.readAddonStore()),...c===void 0?{}:{readAddonStoreResult:async()=>{let t=await c.call(e);return t.kind===`value`?{kind:`value`,value:await a(`addon`,t.value)}:t}},...l===void 0?{}:{readAddonStoreKeyResult:async n=>{let r=await l.call(e,n);if(r.kind!==`present`)return r;let{value:i,unresolved:a}=await Ht({[n]:r.value},t.secrets,{unresolved:`keep-marker`,ownedBy:t.secrets.owner});return a.length>0&&t.onUnresolved?.(a),{kind:`present`,value:i[n]}}},readDeviceStore:async t=>a(`device:${t}`,await e.readDeviceStore(t)),readDeviceStoreBatch:async t=>{let n=await e.readDeviceStoreBatch(t),r=new Map;for(let[e,t]of n)r.set(e,await a(`device:${e}`,t));return r},writeAddonStore:async e=>{await s(e)},writeDeviceStore:async(n,r)=>{await o(`device:${n}`,t.deviceTree(),{kind:`device`,deviceId:n},r,()=>e.readDeviceStore(n),t=>e.writeDeviceStore(n,t))}};return{settings:new Proxy(e,{get(e,t,n){if(typeof t==`string`&&Object.prototype.hasOwnProperty.call(u,t))return Reflect.get(u,t);let r=Reflect.get(e,t,n);return typeof r==`function`?r.bind(e):r}}),raw:{readAddonStore:async()=>{let t=await e.readAddonStore();return i.seen(`addon`,t),t},readDeviceStore:async t=>{let n=await e.readDeviceStore(t);return i.seen(`device:${t}`,n),n}},writeAddonStore:s}}function oee(e,t){let n=e.settings;if(n===void 0)return{context:e,handle:null};let r=aee(n,t);return{context:new Proxy(e,{get(e,t,n){return t===`settings`?r.settings:Reflect.get(e,t,n)}}),handle:r}}var en={kind:`leaf`},tn=`id`;function nn(e,t){for(let n of e){if(n.type===`group`){nn(n.fields,t);continue}if(n.type===`sub-tabs`){for(let e of n.tabs)nn(e.fields,t);continue}if(n.type===`editable-array`){let e=new Map;for(let t of n.itemFields)`key`in t&&De(t)&&e.set(t.key,en);e.size>0&&t.set(n.key,{kind:`array`,idKey:n.itemIdKey??tn,item:e});continue}!(`key`in n)||typeof n.key!=`string`||De(n)&&t.set(n.key,en)}}function rn(e){let t=new Map;if(e===null)return t;for(let n of e.sections)nn(n.fields,t);return t}function an(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 on(e,t){let[n,...r]=t;if(n===void 0)return;if(r.length===0){e.set(n.key,en);return}let i=e.get(n.key);if(n.idKey!==void 0){let t=new Map(i?.kind===`array`?i.item:[]);on(t,r),e.set(n.key,{kind:`array`,idKey:n.idKey,item:t});return}let a=new Map(i?.kind===`object`?i.children:[]);on(a,r),e.set(n.key,{kind:`object`,children:a})}function sn(e,t){if(t.length===0)return e;let n=new Map(e);for(let e of t)on(n,an(e));return n}function cn(e){let t=new Map;for(let n of e)n.length!==0&&on(t,an(n.replace(/\[\]/g,`[${tn}]`)));return t}var ln=5e3,un=5*6e4,dn=250,fn=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=ln;_secretChangeTimer=null;_secretChangeUnsub=null;_operatorWriteDepth=0;_secretSettings=null;_loggedUnresolvedReads=new Set;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;if(t!==void 0){let{context:n,handle:r}=oee(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,onUnresolved:e=>this.logUnresolvedRead(e)});this._ctx=n,this._secretSettings=r}else this._ctx=e,this._secretSettings=null;await this.resolveConfig(),t!==void 0&&(this._secretChangeUnsub=t.onChange(e=>{this._configSecretRefs.has(e)&&this.scheduleSecretReresolve(dn)}));let n=await this.onInitialize();this.emitLifecycle(E.AddonStarted);let r=wn(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(E.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.readRawProjectedStore(n,t);return tt(r,e?await this.overlayKeepingMarkers(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=Sn(t.fields);n.length!==0&&i.push({...t,fields:n})}if(i.length===0)return null;let a=await this.readRawProjectedStore(e);return tt({...n,sections:i},a,{inlineSecretsAsViews:!0})}async resolveGlobalStore(e,t){let n=await this._ctx?.settings?.readAddonStore()??{};return this.projectForNode(n,e,t)}projectForNode(e,t,n){let r=this.perNodeKeys(n),i=ut(t??this._ctx?.kernel?.localNodeId);return r.size>0?mt(e,r,i):e}async readRawProjectedStore(e,t){let n=await this.rawSettings()?.readAddonStore()??{};return this.projectForNode(n,e,t)}async overlayKeepingMarkers(e,t){let n=this._ctx?.secrets,r={...e,...t};if(n===void 0||jt(e).length===0)return r;let{value:i}=await Ht(e,n,{unresolved:`keep-marker`,ownedBy:n.owner});for(let n of Object.keys(t))jt(e[n]).length!==0&&Xt(t[n],i[n])&&(r[n]=e[n]);return r}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=r?await this.readAddonStoreWithRetry():{},a={};for(let t of e){let e=n.has(t)||jt(i[t]).length>0;a[t]=r&&e?Re:``}await this.applyGlobalPatch(a,t)}async applyGlobalPatch(e,t){let n=this.perNodeKeys(),r=ut(this._ctx?.kernel?.localNodeId),i=ut(t??this._ctx?.kernel?.localNodeId),a=n.size>0?pt(e,n,i):e,o=this._secretSettings;if(o!==null){let{changed:e}=await o.writeAddonStore(a);if(!e)return}else await this._ctx?.settings?.writeAddonStore(a);i===r&&(await this.resolveConfig(),await this.onConfigChanged(),this.emitLifecycle(E.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=>Cn(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?tt(t,await this.rawSettings()?.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{ct(t.eventBus,{capName:n,scope:{type:`node`,nodeId:r},state:e,generation:this._readinessGeneration,sourceNodeId:r})}catch{}}async resolveModelsDir(){let{join:n}=await t(async()=>{let{join:t}=await import(`./__vite-browser-external-BlMfPwfH.js`).then(t=>e(t.t(),1));return{join:t}},__vite__mapDeps([0,1]),import.meta.url),{promises:r}=await t(async()=>{let{promises:t}=await import(`./__vite-browser-external-BlMfPwfH.js`).then(t=>e(t.t(),1));return{promises:t}},__vite__mapDeps([0,1]),import.meta.url),i=n(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=ut(this._ctx?.kernel?.localNodeId),r={...this.defaults};for(let i of Object.keys(this.defaults)){let a=t.has(i)?ft(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 lt({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 lt({key:t,schema:n,fallback:r,read:async()=>this.resolveStoredSecrets(await this.rawSettings()?.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??=sn(rn(this.globalSettingsSchema()),this.secretStatePaths),this._addonSecretTree}deviceSecretTree(){return this._deviceSecretTree??=sn(rn(this.deviceSettingsSchema()),this.secretStatePaths),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=jt(e);if(t&&(this._configSecretRefs=new Set(r)),r.length===0)return t&&(this._unresolvedSecrets=[]),e;let{value:i,unresolved:a}=await Ht(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,un))):this._secretRetryDelayMs=ln),i}rawSettings(){return this._secretSettings?.raw??this._ctx?.settings}logUnresolvedRead(e){let t=e.filter(e=>!this._loggedUnresolvedReads.has(e.ref));if(t.length!==0){for(let e of t)this._loggedUnresolvedReads.add(e.ref);this._ctx?.logger?.warn?.(`settings read: a stored secret is unavailable — it reads as its marker, not as a value`,{meta:{secrets:t.map(e=>({ref:e.ref,reason:e.reason}))}})}}scheduleSecretReresolve(e){let t=e===dn?`_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.rawSettings();if(!e)return{};let t;for(let n=0;;n++)try{let t=await e.readAddonStore()??{};return this.settingsStoreReady=!0,t}catch(e){t=e;let r=xn(e);if(r===`permanent`)throw e;let i=(r===`transport`?mn:pn)[n];if(i===void 0){if(r===`transport`)throw e;break}await new Promise(e=>setTimeout(e,i))}return this.settingsStoreReady=!1,this._ctx?.logger?.warn?.(`readAddonStore: settings-store unavailable after retries — using defaults`,{meta:{error:t instanceof Error?t.message:String(t)}}),{}}},pn=[150,350,600,900],mn=[150,350,600,900,2e3,5e3,1e4,2e4,3e4,3e4],hn=[`SqliteSettingsBackend not initialized`,`provider not available`],gn=new Set([`ECONNREFUSED`,`ECONNRESET`,`ETIMEDOUT`,`EPIPE`,`EHOSTUNREACH`,`ENETUNREACH`]),_n=new Set([`TIMEOUT`,`SERVICE_UNAVAILABLE`,`BAD_GATEWAY`,`GATEWAY_TIMEOUT`]),vn=[`discovery deadline exceeded`,`parent could not route child unowned cap call`,`UDS request timed out after`,`channel closed`],yn=new Set([`REQUEST_TIMEOUT`,`SERVICE_NOT_FOUND`,`SERVICE_NOT_AVAILABLE`,`REQUEST_REJECTED`,`BROKER_DISCONNECTED`]);function bn(e,t){if(typeof e!=`object`||!e)return;let n=Reflect.get(e,t);return typeof n==`string`?n:void 0}function see(e){let t={},n=typeof e==`object`&&e?Reflect.get(e,`cause`):void 0,r=typeof e==`object`&&e?Reflect.get(e,`data`):void 0,i=bn(e,`code`)??bn(n,`code`);i!==void 0&&(t.node=i);let a=bn(r,`code`);return a!==void 0&&(t.trpc=a),t}function xn(e){let t=e instanceof Error?e.message:String(e);if(hn.some(e=>t.includes(e)))return`restart`;let n=see(e);if(n.node!==void 0&&gn.has(n.node)||n.trpc!==void 0&&_n.has(n.trpc))return`transport`;if(typeof e==`object`&&e){if(Reflect.get(e,`retryable`)===!0)return`transport`;let t=bn(e,`type`);if(t!==void 0&&yn.has(t))return`transport`}return vn.some(e=>t.includes(e))?`transport`:`permanent`}function Sn(e){let t=[];for(let n of e){if(n.type===`group`){let e=Sn(n.fields);e.length>0&&t.push({...n,fields:e});continue}if(n.type===`sub-tabs`){let e=n.tabs.map(e=>({...e,fields:Sn(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 Cn(e){let t=[];for(let n of e){if(n.type===`group`){t.push(...Cn(n.fields));continue}if(n.type===`sub-tabs`){for(let e of n.tabs)t.push(...Cn(e.fields));continue}`perNode`in n&&n.perNode===!0&&t.push(n.key)}return t}function wn(e){if(e!=null)return Array.isArray(e)?{providers:e}:e}var cee=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)}}}},lee=`x-camstack-dataplane-secret`,Tn=[`grid-view`,`events-view`],uee=3e4,En=64,Dn=15e3,dee=256*1024,On=d({url:l().min(1),hostNodeId:l().min(1),expiresAtMs:i().int().nonnegative(),declaredBytes:i().int().nonnegative().nullable()}),kn=8,An=Symbol.for(`camstack.keychain.known-secrets`);function jn(){let e=Reflect.get(globalThis,An);if(e!=null)return e;let t={values:new Map,compiled:null};return Reflect.set(globalThis,An,t),t}function Mn(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 fee(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function Nn(){let e=jn();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(fee).join(`|`),`g`)}function Pn(e,t){if(e.length<8)return;let n=`‹secret:${Mn(t)}›`,r=jn().values;r.get(e)!==n&&(r.set(e,n),Nn())}function Fn(e){jn().values.delete(e)&&Nn()}function In(){return jn().values.size}function Ln(){let e=jn();e.values.clear(),e.compiled=null}function Rn(e){let t=jn(),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 zn=15*6e4;function Bn(e){let t={};for(let n of e)t[n]={kind:`unavailable`,reason:`not-initialized`};return t}function Vn(e){let t=vt(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),Fn(t.value);for(let t of i)try{t(e)}catch{}}};e.eventBus?.subscribe({category:E.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&&Fn(a.value),r.set(e,{value:t,version:i,fetchedAt:n()}),Pn(t,e)};return{owner:t,ref:(e,n)=>Ct({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=Bn(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(),...e.transport.deleteDeviceScope===void 0?{}:{deleteDeviceScope:async t=>{let n=e.transport.deleteDeviceScope;if(n===void 0)return[];let{refs:r}=await n.call(e.transport,{deviceId:t});for(let e of r)o(e);return r}},onChange(e){return i.add(e),()=>{i.delete(e)}},forOwner:e.transportForOwner===void 0?null:t=>{let r=vt(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=Vn({owner:r,transport:o(r),...e.eventBus===void 0?{}:{eventBus:e.eventBus},now:n});return a.set(r,s),s}}}function Hn(e){if(!Ue(e))return null;let t=Reflect.get(e,`$secret`);return typeof t==`string`&&t.length>0?t:null}function Un(e,t){if(We(e)||Ue(e)){let n=Hn(e);return n!==null&&t.add(n),!0}let n=!1;if(Array.isArray(e))for(let r of e)n=Un(r,t)||n;else if(typeof e==`object`&&e)for(let r of Object.values(e))n=Un(r,t)||n;return n}async function pee(e,t){let n=new Set;if(!Un(e,n))return e;let r=t!==void 0&&n.size>0?await t.resolve([...n]):{},i=e=>{if(We(e)||Ue(e)){let t=Hn(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 Wn=[`settings`,`events`],Gn=[`config`,`ledger`,`audit`,`mirror`,`ephemeral`],Kn=64*1024,qn=1024*1024,mee=256,Jn=1e3,Yn=4*1024*1024,Xn=1e3,Zn=5e3,Qn=5e4,hee=8,$n=4,er=10*6e4,tr=`records:`,nr=[`rev-conflict`,`too-large`,`unindexed-filter`,`filter-required`,`unknown-kind`,`not-found`,`unique-violation`,`plaintext-secret`,`foreign-marker`,`secret-unavailable`,`invalid-record`,`declaration-refused`,`no-caller`,`batch-too-large`,`transact-refused`],rr=`records/`,D=class extends Error{code;detail;constructor(e,t){super(`${rr}${e}: ${t}`),this.name=`RecordsError`,this.code=e,this.detail=t}},ir=class extends D{constructor(e){super(`rev-conflict`,e),this.name=`RevConflictError`}},ar=class extends D{constructor(e){super(`too-large`,e),this.name=`RecordTooLargeError`}},or=class extends D{constructor(e){super(`unindexed-filter`,e),this.name=`UnindexedFilterError`}},sr=class extends D{constructor(e){super(`filter-required`,e),this.name=`FilterRequiredError`}},cr=class extends D{constructor(e){super(`unknown-kind`,e),this.name=`UnknownRecordKindError`}},lr=class extends D{constructor(e){super(`not-found`,e),this.name=`RecordNotFoundError`}},ur=class extends D{constructor(e){super(`unique-violation`,e),this.name=`RecordUniqueViolationError`}},dr=class extends D{constructor(e){super(`plaintext-secret`,e),this.name=`PlaintextSecretError`}},fr=class extends D{constructor(e){super(`foreign-marker`,e),this.name=`ForeignSecretMarkerError`}},pr=class extends D{constructor(e){super(`secret-unavailable`,e),this.name=`RecordSecretUnavailableError`}},O=class extends D{constructor(e){super(`invalid-record`,e),this.name=`InvalidRecordError`}},mr=class extends D{constructor(e){super(`declaration-refused`,e),this.name=`DeclarationRefusedError`}},hr=class extends D{constructor(e){super(`no-caller`,e),this.name=`NoCallerError`}},gr=class extends D{constructor(e){super(`batch-too-large`,e),this.name=`BatchTooLargeError`}},_r=class extends D{constructor(e){super(`transact-refused`,e),this.name=`TransactRefusedError`}},gee={"rev-conflict":e=>new ir(e),"too-large":e=>new ar(e),"unindexed-filter":e=>new or(e),"filter-required":e=>new sr(e),"unknown-kind":e=>new cr(e),"not-found":e=>new lr(e),"unique-violation":e=>new ur(e),"plaintext-secret":e=>new dr(e),"foreign-marker":e=>new fr(e),"secret-unavailable":e=>new pr(e),"invalid-record":e=>new O(e),"declaration-refused":e=>new mr(e),"no-caller":e=>new hr(e),"batch-too-large":e=>new gr(e),"transact-refused":e=>new _r(e)};function _ee(e){return nr.some(t=>t===e)}function vr(e){if(!e.startsWith(rr))return null;let t=e.indexOf(`: `);if(t<0)return null;let n=e.slice(8,t);return _ee(n)?gee[n](e.slice(t+2)):null}function yr(e){if(e instanceof D)return e;if(e instanceof Error){let t=vr(e.message);if(t!==null)return t}return e}var vee={secret:!0};function br(e){let t=Reflect.get(e,`_zod`);if(typeof t!=`object`||!t)return{};let n=Reflect.get(t,`def`);return typeof n!=`object`||!n?{}:n}function yee(e){return p.get(e)?.secret===!0}var bee=new Set([`optional`,`nullable`,`default`,`prefault`,`catch`,`readonly`,`nonoptional`]);function xr(e){let t=[],n=[e];for(;n.length>0;){let e=n.shift();if(!e||t.includes(e))continue;t.push(e);let r=br(e);r.type!==void 0&&bee.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 Sr(e){return xr(e).some(yee)}function Cr(e,t=``){if(Sr(e))return t.length>0?[t]:[];let n=[];for(let r of xr(e)){let e=br(r);if(e.type===`object`&&e.shape)for(let[r,i]of Object.entries(e.shape))n.push(...Cr(i,t?`${t}.${r}`:r));else if(e.type===`array`&&e.element)n.push(...Cr(e.element,`${t}[]`));else if(e.type===`union`&&e.options)for(let r of e.options)n.push(...Cr(r,t));else e.type===`intersection`&&(e.left&&n.push(...Cr(e.left,t)),e.right&&n.push(...Cr(e.right,t)))}return[...new Set(n)]}function wr(e){if(e.length===0)throw new O(`an empty secret path`);return e.split(`.`).map(t=>{let n=t.endsWith(`[]`),r=n?t.slice(0,-2):t;if(r.length===0)throw new O(`secret path "${e}" has an empty segment`);return{key:r,each:n}})}function Tr(e){let t=wr(e),n=[],r=[];for(let e of t)r.push(e.key),e.each&&n.push(r.join(`.`));return n}function Er(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function xee(e,t,n,r){let i=Er(e)?e[t]:void 0;if(typeof i!=`string`||i.length===0)throw new O(`"${n}": every element of "${r}" needs a non-empty string "${t}" to carry a secret`);return i}var Dr=Symbol(`remove-leaf`);function Or(e,t,n,r,i,a,o,s){if(!Er(e))return e;let c=t[n];if(c===void 0||!Object.prototype.hasOwnProperty.call(e,c.key))return e;let l=e[c.key],u=[...r,c.key],d=n===t.length-1;if(c.each){if(!Array.isArray(l))return e;let r=u.join(`.`),f=o[r];if(f===void 0)throw new O(`"${a}": no id key declared for the array "${r}"`);let p=l.map(e=>{let l=xee(e,f,a,r),p=`${i}${i.length>0?`.`:``}${c.key}[${encodeURIComponent(l)}]`;return d?e:Or(e,t,n+1,u,p,a,o,s)});return{...e,[c.key]:p}}let f=`${i}${i.length>0?`.`:``}${c.key}`;if(d){let t=s({declared:a,concrete:f,value:l});return t===Dr?Object.fromEntries(Object.entries(e).filter(([e])=>e!==c.key)):{...e,[c.key]:t}}return{...e,[c.key]:Or(l,t,n+1,u,f,a,o,s)}}function kr(e,t,n,r){let i=e;for(let e of t)i=Or(i,wr(e),0,[],``,e,n,r);return i}function Ar(e,t,n){let r=[];return kr(e,t,n,e=>(r.push(e),e.value)),r}function jr(e){return`${tr}${e}`}function Mr(e,t,n,r){return Ct({owner:e,scope:{kind:`row`,collection:jr(t),rowId:n},fieldPath:r})}var Nr=St,Pr=l().regex(/^[A-Za-z_][A-Za-z0-9_]{0,63}(\.[A-Za-z_][A-Za-z0-9_]{0,63}){0,3}$/),Fr=d({name:l().regex(/^[a-z][a-z0-9_]{0,31}$/),fields:w(Pr).min(1).max(4),unique:T().optional()}).strict(),Ir=f([d({ttlMs:i().int().positive(),from:C([`at`,`write`])}).strict(),d({maxRows:i().int().positive().optional(),maxRowsPerDevice:i().int().positive().optional()}).strict().refine(e=>e.maxRows!==void 0||e.maxRowsPerDevice!==void 0,{message:`name maxRows, maxRowsPerDevice or both`}),d({owner:l().min(1),reason:l().min(1)}).strict(),d({none:l().min(1)}).strict()]),Lr=d({title:l().min(1),nameField:l().min(1),fields:x(l(),o())}).strict(),Rr=d({database:C(Wn).default(`settings`),class:C(Gn),writeTrigger:l().min(1),device:C([`required`,`optional`,`none`]).default(`none`),at:C([`required`,`none`]).default(`none`),indexes:w(Fr).max(8).default([]),retention:Ir,deviceRemoval:C([`delete`,`none`]).default(`none`),maxDataBytes:i().int().positive().max(qn).default(Kn),secretPaths:w(l().min(1)).default([]),secretArrayKeys:x(l(),l()).default({}),transactFamily:l().min(1).optional(),entry:Lr.optional()}),zr=Rr.strict(),Br=Rr,Vr=l().regex(/^[a-z][a-z0-9-]{0,47}$/);function Hr(e,t){let n=t=>{throw new mr(`kind "${e}": ${t}`)};Vr.safeParse(e).success||n(`the name must be lower-case-dashed`);let r=new Set;for(let e of t.indexes)r.has(e.name)&&n(`index name "${e.name}" is declared twice`),r.add(e.name);let{retention:i}=t,a=t.secretPaths.length>0;if(`ttlMs`in i&&(i.from===`at`&&t.at!==`required`&&n(`a ttl from "at" needs at: "required"`),a&&n(`a kind with secret fields cannot use engine TTL (its keychain values would be orphaned)`)),`maxRows`in i||`maxRowsPerDevice`in i){i.maxRowsPerDevice!==void 0&&t.device!==`required`&&n(`maxRowsPerDevice needs device: "required"`),t.at!==`required`&&n(`a row bound trims the oldest "at": it needs at: "required"`),a&&n(`a kind with secret fields cannot use an engine row bound`);let e=Math.max(i.maxRows??0,i.maxRowsPerDevice??0);t.database===`settings`&&e>5e4&&n(`a row bound above ${Qn} belongs in database: "events" (a big delete on the settings thread stalls every configuration read)`)}t.deviceRemoval===`delete`&&t.device===`none`&&n(`deviceRemoval: "delete" needs a device: "required" or "optional"`);for(let e of t.secretPaths)for(let r of Tr(e))t.secretArrayKeys[r]===void 0&&n(`secret path "${e}" crosses the array "${r}": declare its id key in secretArrayKeys`)}function Ur(e){return{...c(e,{unrepresentable:`any`,io:`input`})}}function Wr(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function Gr(e,t){let n=e.oneOf??e.anyOf;if(Array.isArray(n))return n.length>0&&n.every(e=>Wr(e)&&Gr(e,t));let r=e.properties;return Wr(r)&&Object.prototype.hasOwnProperty.call(r,t)}function Kr(e){let t={};for(let[n,r]of Object.entries(e)){let e=Cr(r.schema),i=r.entry?.nameField??`name`,a=Ur(r.schema);if(r.entry!==void 0&&!Gr(a,i))throw new mr(`kind "${n}": an entry kind's schema needs a "${i}" field`);let o=zr.parse({database:r.database,class:r.class,writeTrigger:r.writeTrigger,device:r.device,at:r.at,indexes:r.indexes===void 0?void 0:[...r.indexes],retention:r.retention,deviceRemoval:r.deviceRemoval,maxDataBytes:r.maxDataBytes,secretPaths:[...e],secretArrayKeys:r.secretArrayKeys===void 0?void 0:{...r.secretArrayKeys},transactFamily:r.transactFamily,entry:r.entry===void 0?void 0:{title:r.entry.title,nameField:i,fields:a}});Hr(n,o),t[n]={name:n,schema:r.schema,declaration:o}}return t}function qr(e){return Object.fromEntries(Object.entries(e).map(([e,t])=>[e,t.declaration]))}function Jr(e){let t=new Map;for(let n of e)t.set(n.kind,n);let n=[...t.values()];if(new Set(n.map(e=>e.declaration.database)).size>1)throw new _r(`cross-file: the ops span more than one database file (${n.map(e=>`${e.kind}@${e.declaration.database}`).join(`, `)}); a transaction lives in ONE file`);if(n.length<=1)return;let r=n.filter(e=>e.declaration.transactFamily===void 0);if(r.length>0)throw new _r(`no-family: ${r.map(e=>e.kind).join(`, `)} declare no transactFamily; kinds that must agree through transact share one`);if(new Set(n.map(e=>e.declaration.transactFamily)).size>1)throw new _r(`cross-family: the ops span more than one transactFamily (${n.map(e=>`${e.kind}=${String(e.declaration.transactFamily)}`).join(`, `)})`)}function Yr(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}async function k(e){try{return await e()}catch(e){throw yr(e)}}function See(e){return e.issues.slice(0,5).map(e=>`${e.path.join(`.`)||`(root)`}: ${e.message}`).join(`; `)}function Cee(e,t){return{id:e.id,deviceId:e.deviceId,at:e.at,expiresAt:e.expiresAt,rev:e.rev,updatedAt:e.updatedAt,data:t}}var wee=class{def;o;name;decl;constructor(e,t){this.def=e,this.o=t,this.name=e.name,this.decl=e.declaration}get hasSecrets(){return this.decl.secretPaths.length>0}requireSecrets(){if(this.o.secrets===null)throw new pr(`kind "${this.name}" has secret fields and this process has no keychain door`);return this.o.secrets}typed(e){return Cee(e,e.data)}async storeSecrets(e,t,n){if(!this.hasSecrets)return{body:t,rollback:async()=>{}};let r=this.requireSecrets(),i=[],a=kr(t,this.decl.secretPaths,this.decl.secretArrayKeys,t=>{let r=qe(t.value);if(r.kind===`clear`)return Dr;if(r.kind===`keep`)return n===`put`?Te:t.value===null?null:t.concrete.includes(`[`)?Te:Dr;let a=Mr(this.o.owner,this.name,e,t.concrete);return i.push({ref:a,value:r.value}),Ve(a)}),o=[],s=async()=>{for(let{ref:e,previous:t}of o)try{t===void 0?await r.delete([e]):await r.put(e,t)}catch(e){this.o.logger?.warn(`records: could not restore a keychain value after a refused write`,{meta:{kind:this.name,error:e instanceof Error?e.message:`unknown`}})}};for(let t of i)try{let e=(await r.resolve([t.ref]))[t.ref],n=e?.kind===`value`?e.value:void 0;await r.put(t.ref,t.value),o.push({ref:t.ref,previous:n})}catch(t){throw await s(),new pr(`cannot store a secret of ${this.name}/${e}: ${t instanceof Error?t.message:`the keychain refused`}. Unlock the keychain (System -> Secrets) and save again`)}return{body:a,rollback:s}}async releaseRefs(e){if(!(e.length===0||this.o.secrets===null))try{await this.o.secrets.delete(e)}catch(t){this.o.logger?.warn(`records: could not remove released keychain values`,{meta:{kind:this.name,count:e.length,error:t instanceof Error?t.message:`unknown`}})}}validate(e,t){let n=this.hasSecrets?kr(e,this.decl.secretPaths,this.decl.secretArrayKeys,e=>{let t=qe(e.value);return t.kind===`clear`?Dr:t.kind===`keep`?Te:e.value}):e,r=this.def.schema.safeParse(n);if(!r.success)throw new O(`${this.name}/${t}: ${See(r.error)}`);if(!Yr(r.data))throw new O(`${this.name}/${t}: the body must be an object`);return r.data}async get(e){let t=await k(()=>this.o.transport.get({kind:this.name,id:e}));return t===null?null:this.typed(t)}async getMany(e){return e.length===0?[]:(await k(()=>this.o.transport.getMany({kind:this.name,ids:[...e]}))).map(e=>this.typed(e))}async getResolved(e){let t=await this.get(e);return t===null?null:(await this.resolveRows([t]))[0]??t}async resolveRows(e){if(!this.hasSecrets||e.length===0)return e;let t=this.requireSecrets(),n=await k(()=>this.o.transport.secretRefs({kind:this.name,ids:e.map(e=>e.id)})),r=Object.values(n).flatMap(e=>Object.values(e));if(r.length===0)return e;let i=await t.resolve(r);return e.map(e=>{let t=n[e.id]??{},r=kr(e.data,this.decl.secretPaths,this.decl.secretArrayKeys,n=>{let r=t[n.concrete];if(r===void 0)return n.value;let a=i[r];if(a?.kind===`value`)return a.value;let o=a?.kind===`unavailable`?a.reason:a?.kind??`no answer`;throw new pr(`the secret "${n.concrete}" of ${this.name}/${e.id} cannot be served (${o})`)});return{...e,data:r}})}async txPut(e,t={}){let n=this.validate(e.data,e.id),{body:r,rollback:i}=await this.storeSecrets(e.id,n,`put`);return{wire:{op:`put`,kind:this.name,record:{...e,data:Xr(r)},...t.ifRev===void 0?{}:{ifRev:t.ifRev}},rollback:i}}async txPatch(e,t,n={}){let{body:r,rollback:i}=await this.storeSecrets(e,t,`patch`);return{wire:{op:`patch`,kind:this.name,id:e,data:Xr(r),...n.at===void 0?{}:{at:n.at},...n.expiresAt===void 0?{}:{expiresAt:n.expiresAt},...n.ifRev===void 0?{}:{ifRev:n.ifRev}},rollback:i}}txDelete(e){return{wire:{op:`delete`,kind:this.name,id:e},rollback:async()=>{}}}async put(e,t={}){let n=this.validate(e.data,e.id),{body:r,rollback:i}=await this.storeSecrets(e.id,n,`put`),a=await k(()=>this.o.transport.put({kind:this.name,record:{...e,data:Xr(r)},...t.ifRev===void 0?{}:{ifRev:t.ifRev}})).catch(async e=>{throw await i(),e});return await this.releaseRefs(a.releasedRefs),{rev:a.rev}}async putMany(e){if(e.length===0)return{count:0};let t=[],n=[];try{for(let r of e){let e=this.validate(r.data,r.id),{body:i,rollback:a}=await this.storeSecrets(r.id,e,`put`);n.push(a),t.push({...r,data:Xr(i)})}}catch(e){for(let e of n)await e();throw e}let r=await k(()=>this.o.transport.putMany({kind:this.name,records:t})).catch(async e=>{for(let e of n)await e();throw e});return await this.releaseRefs(r.releasedRefs),{count:r.count}}async patch(e,t,n={}){let{body:r,rollback:i}=await this.storeSecrets(e,t,`patch`),a=await k(()=>this.o.transport.patch({kind:this.name,id:e,data:Xr(r),...n.at===void 0?{}:{at:n.at},...n.expiresAt===void 0?{}:{expiresAt:n.expiresAt},...n.ifRev===void 0?{}:{ifRev:n.ifRev}})).catch(async e=>{throw await i(),e});return await this.releaseRefs(a.releasedRefs),{rev:a.rev}}async delete(e){let t=await k(()=>this.o.transport.delete({kind:this.name,id:e}));return await this.releaseRefs(t.secretRefs),t.deleted}async deleteMany(e){if(e.length===0)return 0;let t=await k(()=>this.o.transport.deleteMany({kind:this.name,ids:[...e]}));return await this.releaseRefs(t.secretRefs),t.deleted}async query(e,t={}){let n=await k(()=>this.o.transport.query({...e,kind:this.name,limit:e.limit??100})),r=n.records.map(e=>this.typed(e));return{records:t.resolveSecrets===!0?await this.resolveRows(r):r,nextCursor:n.nextCursor}}async count(e){return(await k(()=>this.o.transport.count({...e,kind:this.name}))).count}async histogram(e){return(await k(()=>this.o.transport.histogram({...e,kind:this.name}))).buckets}async aggregate(e){return(await k(()=>this.o.transport.aggregate({...e,kind:this.name}))).rows}async deleteWhere(e){let t=await k(()=>this.o.transport.deleteWhere({...e,kind:this.name}));return await this.releaseRefs(t.secretRefs),t.deleted}async allocateId(){return(await k(()=>this.o.transport.allocateId({kind:this.name}))).id}};function Xr(e){if(!Yr(e))throw new O(`the record body must be an object`);return e}function Zr(e){let t=new WeakMap,n=new Map;return{owner:e.owner,forOwner:e.transportForOwner===void 0?null:t=>{let r=n.get(t);if(r!==void 0)return r;let i=e.transportForOwner;if(i===void 0)throw Error(`forOwner: no delegate transport`);let a=Zr({owner:t,transport:i(t),secrets:e.secrets?.forOwner?.(t)??null,...e.logger===void 0?{}:{logger:e.logger}});return n.set(t,a),a},async declare(t){return(await k(()=>e.transport.declareKinds({kinds:{...qr(t)}}))).kinds},kind(n){let r=t.get(n);if(r!==void 0)return r;let i=new wee(n,e);return t.set(n,i),i},async transact(t){if(t.length===0)return[];let n=await k(()=>e.transport.transact({ops:t.map(e=>e.wire)})).catch(async e=>{for(let e of t)await e.rollback();throw e}),r=[...n.releasedRefs,...n.secretRefs];if(r.length>0&&e.secrets!==null)try{await e.secrets.delete(r)}catch(t){e.logger?.warn(`records: could not remove released keychain values`,{meta:{count:r.length,error:t instanceof Error?t.message:`unknown`}})}return n.results},async deleteDevice(t,n={}){let r=await k(()=>e.transport.deleteDevice({deviceId:t,...n.kinds===void 0?{}:{kinds:[...n.kinds]}}));if(r.secretRefs.length>0&&e.secrets!==null)try{await e.secrets.delete(r.secretRefs)}catch(t){e.logger?.warn(`records: could not remove released keychain values`,{meta:{count:r.secretRefs.length,error:t instanceof Error?t.message:`unknown`}})}return r.deleted}}}function Tee(e){return d({name:l().min(1),...e})}function Eee(e,t){let n=Kr({[e]:{schema:t.schema,class:`config`,writeTrigger:t.writeTrigger??`an operator adds or edits an entry in the entries UI`,retention:{none:`an entry goes only when the operator deletes it`},...t.database===void 0?{}:{database:t.database},...t.indexes===void 0?{}:{indexes:t.indexes},...t.secretArrayKeys===void 0?{}:{secretArrayKeys:t.secretArrayKeys},entry:{title:t.title,...t.nameField===void 0?{}:{nameField:t.nameField}}}})[e];if(n===void 0)throw new mr(`entry kind "${e}" was not built`);return n}function Dee(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function Qr(e,t){let n=e;for(let e of t.split(`.`)){if(!Dee(n))return null;n=n[e]}return n==null?null:typeof n==`boolean`?+!!n:typeof n==`number`||typeof n==`string`?n:JSON.stringify(n)}function $r(e){if(typeof e==`boolean`)return+!!e;if(typeof e==`string`||typeof e==`number`)return e;throw new O(`a where value must be a string, number or boolean`)}function Oee(e,t){let n=e[Symbol.iterator](),r=t[Symbol.iterator]();for(;;){let e=n.next(),t=r.next();if(e.done===!0)return t.done===!0?0:-1;if(t.done===!0)return 1;let i=e.value.codePointAt(0)??0,a=t.value.codePointAt(0)??0;if(i!==a)return i<a?-1:1}}function ei(e,t){return e===null||t===null?e===t?0:e===null?-1:1:typeof e==`number`&&typeof t==`number`?e===t?0:e<t?-1:1:typeof e==`number`?-1:typeof t==`number`?1:Oee(e,t)}function ti(e,t,n){for(let r=0;r<e.length;r+=1){let i=e[r]??null,a=t[r]??null;if(i===null||a===null)return!1;let o=ei(i,a);if(o!==0)return n?o<0:o>0}return!1}function kee(e,t){return typeof t==`object`?{field:e,shape:`in`in t?`in`:`range`,value:t}:{field:e,shape:`eq`,value:t}}function Aee(e){let t=e.value;if(e.shape===`eq`){let n=$r(t);return t=>{let r=Qr(t,e.field);return r!==null&&ei(r,n)===0}}if(typeof t==`object`&&`in`in t){let n=t.in.map($r);return t=>{let r=Qr(t,e.field);return r!==null&&n.some(e=>e!==null&&ei(r,e)===0)}}if(typeof t!=`object`)return()=>!1;let n=[[`gt`in t?t.gt:void 0,e=>e>0],[`gte`in t?t.gte:void 0,e=>e>=0],[`lt`in t?t.lt:void 0,e=>e<0],[`lte`in t?t.lte:void 0,e=>e<=0]].flatMap(([e,t])=>e===void 0?[]:[{bound:$r(e),ok:t}]);return t=>{let r=Qr(t,e.field);return r===null?!1:n.every(({bound:e,ok:t})=>t(ei(r,e)))}}function ni(e,t,n,r){let i=Object.entries(n??{}).map(([e,t])=>kee(e,t)),a=r.extraFields??[];if(i.length===0&&a.length===0)return null;let o=i.filter(e=>e.shape!==`range`),s=i.filter(e=>e.shape===`range`);if(s.length>1)throw new or(`${e}: at most one range predicate (${s.map(e=>e.field).join(`, `)}) - it must be the field right after the equality fields of one index`);if(!r.allowIn&&o.some(e=>e.shape===`in`))throw new or(`${e}: an "in" set cannot be paged in index order - ask once per value`);let c=o.length,l=new Set(o.map(e=>e.field)),u=s[0],d=t.indexes.filter(e=>{let t=e.fields.slice(0,c);return t.length!==c||!t.every(e=>l.has(e))||u!==void 0&&e.fields[c]!==u.field?!1:a.every(t=>e.fields.includes(t))}),f=r.groupBy,p=(f===void 0?void 0:d.find(e=>e.fields[c]===f))??d[0];if(p===void 0){let n=t.indexes.map(e=>`${e.name}(${e.fields.join(`, `)})`).join(`; `);throw new or(`${e}: no declared index serves [${[...i.map(e=>e.field),...a].join(`, `)}]. Declared: ${n.length>0?n:`none`}. A filter on an unindexed field does not compile - declare an index`)}let m=i.map(Aee);return{indexName:p.name,orderFields:p.fields.slice(c),matches:e=>m.every(t=>t(e))}}function ri(e,t,n){if(n.deviceId!==void 0&&t.device===`none`)throw new O(`${e}: declared device: "none", it cannot be filtered by deviceId`);if((n.atFrom!==void 0||n.atTo!==void 0)&&t.at===`none`)throw new O(`${e}: declared at: "none", it cannot be filtered by time`)}function ii(e,t){return!(t.deviceId!==void 0&&e.deviceId!==t.deviceId||t.atFrom!==void 0&&(e.at===null||e.at<t.atFrom)||t.atTo!==void 0&&(e.at===null||e.at>=t.atTo))}function ai(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function jee(e,t,n,r){let i=t=>{throw new O(`${e}/${n.id.slice(0,64)}: ${t}`)};(n.id.length===0||n.id.length>256)&&i(`the id must be 1..256 characters`),t.device===`required`&&n.deviceId===void 0&&i(`deviceId is required`),t.device===`none`&&n.deviceId!==void 0&&i(`this kind is not device-scoped`),t.at===`required`&&n.at===void 0&&i(`at is required`),t.at===`none`&&n.at!==void 0&&i(`this kind has no time`);let{retention:a}=t,o=n.expiresAt??null;return`ttlMs`in a?(n.expiresAt!==void 0&&i(`expiresAt is set by the engine on a kind with a ttl retention`),o=(a.from===`at`?n.at??r:r)+a.ttlMs):n.expiresAt!==void 0&&t.secretPaths.length>0&&i(`a kind with secret fields cannot expire by the engine (its keychain values would be orphaned)`),{id:n.id,deviceId:n.deviceId??null,at:n.at??null,expiresAt:o}}function Mee(e,t,n,r){let i=JSON.stringify(r),a=Buffer.byteLength(i,`utf8`);if(a>t.maxDataBytes)throw new ar(`${e}/${n.slice(0,64)}: ${a} bytes exceeds maxDataBytes ${t.maxDataBytes}. Bytes are never record fields - use files and ctx.peerBytes`);return i}function oi(e,t){let n=new Map;if(e.secretPaths.length===0)return n;for(let r of Ar(t,e.secretPaths,e.secretArrayKeys))He(r.value)&&n.set(r.concrete,r.value.$secret);return n}function si(e,t){if(e.secretPaths.length===0)return t;let n=kr(t,e.secretPaths,e.secretArrayKeys,e=>e.value===null?null:Te);return ai(n)?n:t}function ci(e,t,n,r,i,a,o){if(n.secretPaths.length===0)return{body:i,releasedRefs:[]};let s=a===null?new Map:oi(n,a),c=kr(i,n.secretPaths,n.secretArrayKeys,n=>{let i=Mr(e,t,r,n.concrete);if(He(n.value)){if(n.value.$secret!==i)throw new fr(`${t}/${r.slice(0,64)} field "${n.concrete}": the marker is not this row's own ref`);return n.value}if(n.value===`__camstack_redacted__`){let e=s.get(n.concrete);return e===void 0||o===`patch`&&!n.concrete.includes(`[`)?Dr:{$secret:e,v:1}}if(n.value===null||n.value===void 0)return o===`patch`?null:Dr;throw new dr(`${t}/${r.slice(0,64)} field "${n.concrete}": a secret field takes a keychain marker, never a value`)});if(!ai(c))throw new O(`${t}/${r}: the body must be an object`);let l=oi(n,c);return{body:c,releasedRefs:[...s.entries()].filter(([e,t])=>o===`put`&&l.get(e)!==t).map(([,e])=>e)}}function li(e,t){let n={...e};for(let[e,r]of Object.entries(t)){if(r===null){delete n[e];continue}let t=n[e];n[e]=ai(r)?li(ai(t)?t:{},r):r}return n}function ui(e){let t=JSON.parse(JSON.stringify(e));if(!ai(t))throw new O(`a stored body is not an object`);return t}function di(e){let t=new Map;return{access:{owner:e,ref:(t,n)=>Ct({owner:e,scope:t,fieldPath:n}),resolve:async e=>{let n={};for(let r of e){let e=t.get(r);n[r]=e===void 0?{kind:`missing`}:{kind:`value`,value:e,version:1}}return n},put:async(e,n)=>(t.set(e,n),1),delete:async e=>{let n=0;for(let r of e)t.delete(r)&&(n+=1);return n},state:async()=>({state:`ready`}),onChange:()=>()=>void 0,forOwner:null}}}function fi(e,t){return Buffer.from(JSON.stringify({t:e,v:t}),`utf8`).toString(`base64url`)}function pi(e){try{let t=JSON.parse(Buffer.from(e,`base64url`).toString(`utf8`));if(typeof t==`object`&&t){let e=Reflect.get(t,`t`),n=Reflect.get(t,`v`);if(typeof e==`string`&&Array.isArray(n)){let t=[];for(let e of n)if(typeof e==`string`||typeof e==`number`||e===null)t.push(e);else throw Error(`bad cursor value`);return{tag:e,values:t}}}}catch{}throw new O(`the cursor is not valid`)}function mi(e,t,n){if(e.tag!==t||e.values.length!==n)throw new O(`the cursor does not belong to this query`)}function hi(e,t){for(let n=0;n<e.length;n+=1){let r=ei(e[n]??null,t[n]??null);if(r!==0)return r}return 0}function gi(e,t,n){let r=t=>{throw new mr(`kind "${e}": ${t} - the engine never migrates data; a changed index is a new name`)};t.database!==n.database&&r(`the database cannot change`),t.device!==n.device&&r(`"device" cannot change`),t.at!==n.at&&r(`"at" cannot change`);for(let e of t.indexes){let t=n.indexes.find(t=>t.name===e.name);t!==void 0&&(t.unique!==e.unique||t.fields.join(`,`)!==e.fields.join(`,`))&&r(`index "${e.name}" was declared differently before`)}for(let e of t.secretPaths)n.secretPaths.includes(e)||r(`secret path "${e}" cannot stop being secret`)}function _i(e){let{retention:t}=e;return`maxRows`in t||`maxRowsPerDevice`in t?{...t.maxRows===void 0?{}:{maxRows:t.maxRows},...t.maxRowsPerDevice===void 0?{}:{maxRowsPerDevice:t.maxRowsPerDevice}}:null}var vi=1e4;function yi(e,t,n){if(t===void 0)return n.length;let r=n.map(e=>Qr(e.data,t)).filter(e=>e!==null);if(e===`count`)return r.length;if(r.length===0)return null;if(e===`sum`)return r.reduce((e,t)=>e+(typeof t==`number`?t:Number(t)||0),0);let i=[...r].sort(ei),a=e===`min`?i[0]:i.at(-1);return typeof a==`number`?a:null}function bi(e=`spec`,t={}){let n=t.now??Date.now,r=new Map,i=new Map,a=new Map,o=new Map,s=new Set,c=new Map,l=[],u=1,d=!1,f=!1,p=e=>{let t=a.get(e);return t===void 0&&(t=new Map,a.set(e,t)),t},m=t=>{let n=r.get(t);if(n===void 0)throw new cr(`"${e}" declared no kind "${t}"`);return n},h=()=>{if(f)throw Error(`records engine unreachable`)},g=()=>{if(d)throw Error(`records engine unreachable`)},_=(e,t)=>({id:t.id,deviceId:t.deviceId,at:t.at,expiresAt:t.expiresAt,rev:t.rev,updatedAt:t.updatedAt,data:si(e,ui(t.data))}),v=(e,t,n,r)=>{for(let i of t.indexes){if(i.unique!==!0)continue;let t=i.fields.map(e=>Qr(r,e));if(!t.some(e=>e===null))for(let r of p(e).values()){if(r.id===n)continue;let a=i.fields.map(e=>Qr(r.data,e));if(hi(t,a)===0&&a.every(e=>e!==null))throw new ur(`${e}: the unique index "${i.name}" refused the write`)}}},ee=(e,t,n)=>{let r=t?.rid??u;t===void 0&&(u+=1),p(e).set(n.id,{...n,rid:r})},te=(t,n,r,i)=>{let a=m(t),o=jee(t,a,n,i),c=`${t}:${n.id}`,l=p(t).get(n.id);if(s.has(c)&&l!==void 0)throw new ir(`${t}/${n.id}: an allocated id is insert-only and a row already holds it`);if(r!==void 0){if(r===0&&l!==void 0)throw new ir(`${t}/${n.id}: the row exists (ifRev 0 means "must not exist")`);if(r>0&&l?.rev!==r)throw new ir(`${t}/${n.id}: expected rev ${r}, found ${l===void 0?`no row`:`rev ${l.rev}`}`)}let u=ci(e,t,a,n.id,n.data,l?.data??null,`put`);Mee(t,a,n.id,u.body);let d=ui(u.body);v(t,a,n.id,d);let f=(l?.rev??0)+1;return ee(t,l,{id:o.id,deviceId:o.deviceId,at:o.at,expiresAt:o.expiresAt,rev:f,updatedAt:i,data:d}),s.delete(c),{rev:f,released:u.releasedRefs}},ne=(e,t,n)=>{let r=[...p(e).values()].filter(e=>n===void 0||e.deviceId===n),i=Math.min(r.length-t,Zn);if(!(i<=0)){r.sort((e,t)=>hi([e.at,e.rid],[t.at,t.rid]));for(let t of r.slice(0,i))p(e).delete(t.id)}},y=(e,t)=>{let n=_i(m(e));if(n===null)return;let r=Math.max(n.maxRows??0,n.maxRowsPerDevice??0),i=r<=100?1:Math.floor(r/100),a=(c.get(e)??0)+t.length;if(a<i){c.set(e,a);return}if(c.set(e,0),n.maxRows!==void 0&&ne(e,n.maxRows,void 0),n.maxRowsPerDevice!==void 0){let r=new Set(t.filter(e=>e!==void 0));for(let t of r)ne(e,n.maxRowsPerDevice,t)}},b=(e,t)=>t.flatMap(t=>[...oi(e,t.data).values()]),re=(e,t)=>{let n=m(e),r=[...p(e).values()].filter(t);for(let t of r)p(e).delete(t.id);return{deleted:r.length,secretRefs:b(n,r)}},x={declareKinds:async({kinds:e})=>{let t={};for(let[n,a]of Object.entries(e)){let e=zr.parse(a);Hr(n,e);let o=r.get(n);o!==void 0&&gi(n,o,e);let s=i.get(n)??i.size+1;i.set(n,s);let c=e.indexes.filter(e=>o?.indexes.every(t=>t.name!==e.name)??!0).map(e=>e.name),l=o===void 0?`created`:JSON.stringify(o)===JSON.stringify(e)?`unchanged`:`updated`;r.set(n,e),t[n]={kindId:s,state:l,createdIndexes:c}}return{kinds:t}},get:async({kind:e,id:t})=>{h();let n=m(e),r=p(e).get(t);return r===void 0?null:_(n,r)},getMany:async({kind:e,ids:t})=>{h();let n=m(e);return[...new Set(t)].sort((e,t)=>ei(e,t)).flatMap(t=>{let r=p(e).get(t);return r===void 0?[]:[_(n,r)]})},secretRefs:async({kind:e,ids:t})=>{h();let n=m(e),r={};for(let i of t){let t=p(e).get(i);if(t===void 0)continue;let a=Object.fromEntries(oi(n,t.data));Object.keys(a).length>0&&(r[i]=a)}return r},put:async({kind:e,record:t,ifRev:r})=>{g();let i=te(e,t,r,n());return y(e,[t.deviceId]),{rev:i.rev,releasedRefs:[...i.released]}},putMany:async({kind:e,records:t})=>{if(g(),m(e),t.length>1e3)throw new gr(`${t.length} records exceed ${Jn}`);let r=t.reduce((e,t)=>e+Buffer.byteLength(JSON.stringify(t.data),`utf8`),0);if(r>4194304)throw new gr(`${r} bytes exceed ${Yn}`);let i=n(),s=new Map(p(e)),c=u,l=[];try{for(let n of t)l.push(...te(e,n,void 0,i).released)}catch(t){throw a.set(e,s),u=c,t}let d=-1;for(let e of t)/^\d{1,15}$/.test(e.id)&&(d=Math.max(d,Number(e.id)));return d>=0&&o.set(e,Math.max(o.get(e)??0,d+1)),y(e,t.map(e=>e.deviceId)),{count:t.length,releasedRefs:l}},patch:async t=>{g();let r=m(t.kind);if(t.at!==void 0&&r.at!==`required`)throw new O(`${t.kind}: declared at: "none"`);if(t.at===null)throw new O(`${t.kind}: "at" cannot be removed`);if(t.expiresAt!==void 0&&r.secretPaths.length>0)throw new O(`${t.kind}: a kind with secret fields cannot expire by the engine (its keychain values would be orphaned)`);if(t.expiresAt!==void 0&&`ttlMs`in r.retention)throw new O(`${t.kind}: expiresAt is set by the engine`);let i=p(t.kind).get(t.id),a=ci(e,t.kind,r,t.id,t.data,i?.data??null,`patch`);if(i===void 0)throw new lr(`${t.kind}/${t.id}: no such row`);if(t.ifRev!==void 0&&i.rev!==t.ifRev)throw new ir(`${t.kind}/${t.id}: expected rev ${String(t.ifRev)}, found rev ${i.rev}`);let o=ui(li(i.data,ui(a.body))),s=[...JSON.stringify(o)].length;if(s>r.maxDataBytes)throw new ar(`${t.kind}/${t.id}: the patched body is ${s} bytes, over maxDataBytes ${r.maxDataBytes}`);v(t.kind,r,t.id,o);let c=i.rev+1;ee(t.kind,i,{...i,at:t.at??i.at,expiresAt:t.expiresAt===void 0?i.expiresAt:t.expiresAt,rev:c,updatedAt:n(),data:o});let l=new Set(oi(r,o).values());return{rev:c,releasedRefs:[...oi(r,i.data).values()].filter(e=>!l.has(e))}},delete:async({kind:e,id:t})=>{g();let n=m(e),r=p(e).get(t);return r===void 0?{deleted:!1,secretRefs:[]}:(p(e).delete(t),{deleted:!0,secretRefs:b(n,[r])})},deleteMany:async({kind:e,ids:t})=>{g();let n=new Set(t);return re(e,e=>n.has(e.id))},query:async e=>{h();let t=m(e.kind);l.push({kind:e.kind,limit:e.limit}),ri(e.kind,t,e);let n=e.desc===!0,r=n?`DESC`:`ASC`,i=ni(e.kind,t,e.where,{allowIn:!1}),a=e.cursor===void 0?void 0:pi(e.cursor),o=[...p(e.kind).values()].filter(t=>ii(t,e)),s,c,u;if(i!==null){if(e.order!==void 0)throw new O(`${e.kind}: with a where the order is the index's; drop "order"`);let t=i.orderFields;s=e=>[...t.map(t=>Qr(e.data,t)),e.rid],c=t.length,u=`rx:${i.indexName}:${r}`,o=o.filter(e=>i.matches(e.data)),a!==void 0&&(mi(a,u,t.length+1),o=o.filter(e=>ti(s(e),a.values,n)))}else{let i=e.order??(t.at===`required`?`at`:`id`);if(c=1,i===`at`){if(t.at!==`required`)throw new O(`${e.kind}: declared at: "none", it has no time order - use order: "id"`);s=e=>[e.at,e.rid],u=`at:${r}`,a!==void 0&&(mi(a,u,2),o=o.filter(e=>ti(s(e),a.values,n)))}else{if(e.deviceId!==void 0||e.atFrom!==void 0||e.atTo!==void 0)throw new or(`${e.kind}: order "id" cannot be combined with a device or time window (use order "at")`);if(s=e=>[e.id,e.rid],u=`id:${r}`,a!==void 0){mi(a,u,2);let e=a.values[0]??null;o=o.filter(t=>ti([t.id],[e],n))}}}o.sort((e,t)=>(n?-1:1)*hi(s(e),s(t)));let d=o.slice(0,e.limit),f=o.length>e.limit,g=d.at(-1),v=null;if(f&&g!==void 0){let t=s(g),n=[];for(let r=0;r<c;r+=1){let i=t[r];if(typeof i!=`string`&&typeof i!=`number`)throw new O(`${e.kind}: a row has no value for an ordering field, so this query cannot be paged`);n.push(i)}n.push(g.rid),v=fi(u,n)}return{records:d.map(e=>_(t,e)),nextCursor:v}},count:async e=>{h();let t=m(e.kind);ri(e.kind,t,e);let n=ni(e.kind,t,e.where,{allowIn:!0}),r=0;for(let t of p(e.kind).values())ii(t,e)&&(n===null||n.matches(t.data))&&(r+=1);return{count:r}},histogram:async e=>{h();let t=m(e.kind);if(ri(e.kind,t,{deviceId:e.deviceId,atFrom:e.from}),!(e.to>e.from))throw new O(`${e.kind}: histogram needs from < to`);if(Math.ceil((e.to-e.from)/e.bucketMs)>1e4)throw new O(`${e.kind}: histogram would exceed ${vi} buckets`);let n=Math.floor(e.from),r=Math.ceil(e.to),i=Math.trunc(e.bucketMs),a=new Map;for(let t of p(e.kind).values()){if(e.deviceId!==void 0&&t.deviceId!==e.deviceId||t.at===null||t.at<n||t.at>=r)continue;let o=Math.trunc((t.at-n)/i);a.set(o,(a.get(o)??0)+1)}return{buckets:[...a.entries()].sort(([e],[t])=>e-t).map(([t,r])=>({bucketStart:n+t*e.bucketMs,count:r}))}},aggregate:async e=>{h();let t=m(e.kind);if(e.op!==`count`&&e.field===void 0)throw new O(`${e.kind}: ${e.op} needs a field`);let n=[e.field,e.groupBy].filter(e=>e!==void 0);if(n.length===0&&e.where===void 0)throw new O(`${e.kind}: a count with no field and no groupBy is "count"`);let r=ni(e.kind,t,e.where,{allowIn:!0,extraFields:n,groupBy:e.groupBy});if(r===null)throw new O(`${e.kind}: aggregate has nothing to read`);let i=[...p(e.kind).values()].filter(e=>r.matches(e.data)),a=new Map;if(e.groupBy===void 0)a.set(null,i);else{let t=e.groupBy;for(let e of i){let n=Qr(e.data,t);a.set(n,[...a.get(n)??[],e])}}return{rows:[...a.entries()].sort(([e],[t])=>ei(e,t)).map(([t,n])=>({group:t,value:yi(e.op,e.field,n)}))}},deleteWhere:async e=>{g();let t=m(e.kind);if(e.deviceId===void 0&&e.atBefore===void 0&&(e.where===void 0||Object.keys(e.where).length===0))throw new sr(`${e.kind}: deleteWhere needs deviceId, atBefore or where - there is no "delete all"`);ri(e.kind,t,{deviceId:e.deviceId,atFrom:e.atBefore});let n=ni(e.kind,t,e.where,{allowIn:!0});return re(e.kind,t=>!(n!==null&&!n.matches(t.data)||e.deviceId!==void 0&&t.deviceId!==e.deviceId||e.atBefore!==void 0&&(t.at===null||t.at>=e.atBefore)))},transact:async({ops:e})=>{g(),Jr(e.map(e=>({kind:e.kind,declaration:m(e.kind)})));let t=new Map([...a].map(([e,t])=>[e,new Map(t)])),n=u,r=[],i=[],o=[];try{for(let t of e)if(t.op===`put`){let e=await x.put({kind:t.kind,record:t.record,...t.ifRev===void 0?{}:{ifRev:t.ifRev}});i.push(...e.releasedRefs),r.push({rev:e.rev,deleted:!1})}else if(t.op===`patch`){let e=await x.patch({kind:t.kind,id:t.id,data:t.data,...t.at===void 0?{}:{at:t.at},...t.expiresAt===void 0?{}:{expiresAt:t.expiresAt},...t.ifRev===void 0?{}:{ifRev:t.ifRev}});i.push(...e.releasedRefs),r.push({rev:e.rev,deleted:!1})}else{let e=await x.delete({kind:t.kind,id:t.id});o.push(...e.secretRefs),r.push({rev:null,deleted:e.deleted})}}catch(e){a.clear();for(let[e,n]of t)a.set(e,n);throw u=n,e}return{results:r,releasedRefs:i,secretRefs:o}},deleteDevice:async({deviceId:e,kinds:t})=>{g();let n={},i=[];for(let[a,o]of r){if(o.deviceRemoval!==`delete`||t!==void 0&&!t.includes(a))continue;let r=re(a,t=>t.deviceId===e);n[a]=r.deleted,i.push(...r.secretRefs)}return{deleted:n,secretRefs:i}},allocateId:async({kind:e})=>{g(),m(e);let t=o.get(e)??1;return o.set(e,t+1),s.add(`${e}:${t}`),{id:t}}};return{records:Zr({owner:e,transport:x,secrets:di(e).access}),tables:a,queries:l,failWrites:e=>{d=e},failReads:e=>{f=e},seed:(e,t)=>{ee(e,p(e).get(t.id),{id:t.id,deviceId:t.deviceId??null,at:t.at??null,expiresAt:t.expiresAt??null,rev:1,updatedAt:1,data:ui(t.data)})}}}var xi=`temperature.pressure.speed.precipitation.precipitation-rate.length.area.illuminance.irradiance.power.energy.voltage.current.apparent-power.humidity.percentage.concentration-volume.concentration-mass.concentration-ppb.volume.duration.duration-ms.information.sound-level.signal-level.colour-temperature.angle.bitrate.rate.mass.index.ratio.count.none.device`.split(`.`),Si=C(xi),Ci=new Set(xi);function wi(e){return typeof e==`string`&&Ci.has(e)}var Ti={temperature:`°C`,pressure:`hPa`,speed:`m/s`,precipitation:`mm`,"precipitation-rate":`mm/h`,length:`m`,area:`m²`,illuminance:`lx`,irradiance:`W/m²`,power:`W`,energy:`kWh`,voltage:`V`,current:`A`,"apparent-power":`VA`,humidity:`%`,percentage:`%`,"concentration-volume":`ppm`,"concentration-mass":`µg/m³`,"concentration-ppb":`ppb`,volume:`L`,duration:`s`,"duration-ms":`ms`,information:`B`,"sound-level":`dBFS`,"signal-level":`dBm`,"colour-temperature":`mired`,angle:`°`,bitrate:`kbps`,rate:`fps`,mass:`kg`,index:`none`,ratio:`none`,count:`none`,none:`none`,device:`device`};function Ei(e){let t=Ti[e];if(!(t===`none`||t===`device`))return t}function Di(e){return e===`index`||e===`count`?`count`:e===`ratio`?`ratio`:Ei(e)}function A(e,t){return{quantity:e,...t?.precision===void 0?{}:{precision:t.precision},...t?.label===void 0?{}:{label:t.label}}}var Oi={temperature:`°F`,pressure:`inHg`,speed:`mph`,precipitation:`in`,"precipitation-rate":`in/h`,length:`ft`,volume:`gal`},ki=[`metric`,`imperial`],Ai=`metric`;function ji(e,t){let n=Ei(e);if(n!==void 0){if(t===`imperial`){let t=Oi[e];if(t!==void 0)return t}return n}}var j=C([`high`,`mid`,`low`]),Mi=[`high`,`mid`,`low`],Ni=f([j,h(`auto`)]),Pi=C([`pull-rtsp`,`pull-rtmp`,`pull-http`,`pull-flv`,`pull-rfc4571`,`push-annexb`,`derived`]),Fi=d({width:i().int().positive().meta(A(`none`)),height:i().int().positive().meta(A(`none`))}),Ii=d({camStreamId:l().min(1),deviceId:i().int().nonnegative(),kind:Pi,url:l().optional(),codec:l().optional(),resolution:Fi.optional(),fps:i().positive().optional(),label:l().optional(),deviceFeatures:w(l()).optional(),autoEligible:T().optional(),profileHint:j.optional(),metadata:x(l(),o()).optional()}),Li=C([`unassigned`,`idle`,`connecting`,`streaming`,`error`]),Ri=d({deviceId:i().int().nonnegative(),profile:j,brokerId:l(),sourceCamStreamId:l().nullable(),status:Li,resolution:Fi.optional(),codec:l().optional(),preBufferSec:i().nonnegative().optional(),errorMessage:l().optional()});function zi(e,t){return`${e}/${t}`}function Bi(e,t){return`${e}/${t}`}function Vi(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=j.safeParse(r);return i.success?{deviceId:Number(n),profile:i.data}:null}function Hi(e,t){let n=[...e].filter(e=>t===void 0||e.deviceId===t).toSorted((e,t)=>Mi.indexOf(e.profile)-Mi.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 Ui=d({id:l(),label:l(),protocol:C([`rtsp`,`rtmp`,`annexb`,`http-mjpeg`,`webrtc`,`custom`]),url:l().optional(),resolution:d({width:i(),height:i()}).readonly().optional(),fps:i().optional(),bitrate:i().optional(),codec:l().optional(),profileHint:j.optional()}),Wi=d({type:l(),url:l(),videoCodec:l().optional(),audioCodec:l().optional(),metadata:x(l(),o()).readonly().optional()}),Gi=d({shmId:l(),slot:i().int().nonnegative(),seq:i().int().nonnegative(),width:i().int().positive(),height:i().int().positive(),format:C([`jpeg`,`rgb`,`bgr`,`yuv420`,`gray`]),pts:i(),byteLength:i().int().nonnegative(),nodeId:l(),slotCount:i().int().positive()}),Ki=C(_e),qi=d({data:S(Uint8Array),sampleRate:i().int().positive(),channels:i().int().positive(),timestamp:i(),format:Ki.optional()}),Ji=d({brokerId:l(),tag:l().optional(),accept:w(Ki).readonly().optional()}),Yi=d({subscriptionId:l()}),Xi=C([`idle`,`connecting`,`streaming`,`error`,`stopped`]),Zi=d({status:Xi,inputFps:i(),encodedSubscribers:i(),uptimeMs:i(),bitrateKbps:i(),idrIntervalMs:i(),codec:l().optional(),totalBytes:i(),packetCount:i(),rtspClients:i(),pipeClients:i(),preBufferSec:i(),preBufferMs:i(),preBufferPackets:i(),audio:d({codec:l(),sampleRate:i(),channels:i(),supported:T()}).nullable().optional(),audioMuted:T().optional(),audioMutedDropped:i().optional()}),Qi=d({profile:j,brokerId:l(),url:l(),mutedUrl:l(),enabled:T(),codec:l().optional(),resolution:Fi.optional()}),$i=class extends Error{capName;scope;waitedMs;constructor(e,t,n){super(`Timed out waiting for ${e} (${ta(t)}) to become ready after ${n}ms`),this.name=`ReadinessTimeoutError`,this.capName=e,this.scope=t,this.waitedMs=n}};function ea(e,t){return`${e}|${ta(t)}`}function ta(e){switch(e.type){case`global`:return`global`;case`node`:return`node:${e.nodeId}`;case`device`:return`device:${e.deviceId}`}}function na(e){switch(e){case`starting`:return 0;case`ready`:return 1;case`down`:return 2}}function ra(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 Nee=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??Pee(),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(ea(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=ea(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&&na(r.state)<=na(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} (${ta(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&&ra(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 $i(e,t,this.now()-i)))},r):null,u=setInterval(()=>{s||this.logger?.warn(`readiness: still awaiting ${e} (${ta(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(st(`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=ea(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} (${ta(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&&ra(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} (${ta(r.scope)}) → down (synthesized from agent.offline ${e})`);for(let e of this.subscriptions)if(e.capName===r.capName&&ra(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 Pee(){return typeof crypto<`u`&&crypto.randomUUID?crypto.randomUUID():Math.random().toString(36).slice(2,14)}function Fee(e,t){for(let{capName:n,scope:r}of t)e.emitDown(n,r)}var ia=[`onnx`,`coreml`,`openvino`,`tflite`,`pt`,`gguf`],aa=`__camstackNodePin`;function Iee(e){return{context:{[aa]:oa(e)}}}function oa(e){let t=e.split(`/`)[0];return t===void 0||t.length===0?e:t}function Lee(e){if(typeof e!=`object`||!e)return;let t=Reflect.get(e,aa);return typeof t==`string`?t:void 0}d({field:l().min(1),on:h(`advance`)});var Ree=`session`,zee={"%":`%`,dBFS:`dBFS`,dBm:`dBm`,"°C":`°C`,W:`W`,kWh:`kWh`,V:`V`,A:`A`,VA:`VA`,lx:`lx`,ppm:`ppm`,ppb:`ppb`,"µg/m³":`µg/m³`,hPa:`hPa`,count:`count`,ratio:`ratio`,ms:`ms`,s:`s`,days:`days`,bytes:`bytes`,kbps:`kbps`,fps:`fps`,"m/s":`m/s`};function Bee(e,t){return`${e}[].${t}`}var Vee=1e4;function sa(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 Hee=`provider`,Uee=d({id:l(),title:l(),description:l().optional(),style:C([`card`,`accordion`]).optional(),defaultCollapsed:T().optional(),columns:f([h(1),h(2),h(3),h(4)]).optional(),tab:l().optional(),location:C([`settings`,`top-tab`,`hero`]).optional(),order:i().optional(),fields:w(g())}),ca=d({tabs:w(d({id:l(),label:l(),icon:l(),order:i().optional()})).optional(),sections:w(Uee)}).nullable(),la={getDeviceSettingsContribution:{input:d({deviceId:i()}),output:ca,kind:`query`,auth:`protected`},getDeviceLiveContribution:{input:d({deviceId:i()}),output:ca,kind:`query`,auth:`protected`},applyDeviceSettingsPatch:{input:d({deviceId:i(),patch:x(l(),o())}),output:d({success:h(!0)}),kind:`mutation`,auth:`admin`}},ua={getStatus:{input:d({deviceId:i()}),output:o().nullable(),kind:`query`,auth:`protected`}};function da(e){let t=e.methods;return e.exposesDeviceSettings&&(t={...la,...t}),e.status&&(t={...ua,...t}),t}function M(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?.role===void 0?{}:{role:n.role},...n?.caller===void 0?{}:{caller:n.caller},timeoutMs:n?.timeoutMs}}function fa(e,t,n){return{...M(e,t,n),systemOnly:!0}}function pa(e,t,n){return{...M(e,t,n),providerOptional:!0}}function ma(e){return{data:e}}function Wee(e){return e?.deviceConfig!==void 0}var Gee=d({staticDir:l()}),Kee=d({version:l()}),ha={name:`admin-ui`,scope:`system`,mode:`singleton`,internal:!0,methods:{getStaticDir:M(y(),Gee,{auth:`admin`}),getVersion:M(y(),Kee,{auth:`admin`})}};function qee(e){return e}function Jee(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 Yee(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 Xee(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 Zee=[`keychain`,`device-history`,`records`,`integrations`,`device-manager`,`core-blocks`];function Qee(e){return typeof e!=`object`||!e||Array.isArray(e)||!Object.prototype.hasOwnProperty.call(e,`callerAddonId`)?e:Object.fromEntries(Object.entries(e).filter(([e])=>e!==`callerAddonId`))}var $ee=256,ete=d({staticDir:l()}),ga=d({version:l()}),_a={name:`viewer-ui`,scope:`system`,mode:`singleton`,internal:!0,methods:{getStaticDir:M(y(),ete,{auth:`admin`}),getVersion:M(y(),ga,{auth:`admin`})}},va=d({id:l(),label:l(),protocol:C([`rtsp`,`rtmp`,`annexb`,`http-mjpeg`,`webrtc`,`custom`]),url:l().optional(),resolution:d({width:i(),height:i()}).optional(),fps:i().optional(),bitrate:i().optional(),codec:l().optional(),profileHint:j.optional(),sdp:l().optional()}),tte=d({key:l(),value:o()}),ya=d({source:l(),data:x(l(),o())}),ba={name:`device-ops`,scope:`device`,deviceNative:!0,mode:`singleton`,methods:{getStreamSources:M(d({deviceId:i()}),w(va)),getConfigEntries:M(d({deviceId:i()}),w(tte)),setConfig:M(d({deviceId:i(),values:x(l(),o())}),y(),{kind:`mutation`,auth:`admin`}),runAction:M(d({deviceId:i(),action:l().min(1),input:o()}),o(),{kind:`mutation`}),removeDevice:M(d({deviceId:i()}),y(),{kind:`mutation`,auth:`admin`}),getSettingsSchema:M(d({deviceId:i()}),o().nullable()),getRawState:M(d({deviceId:i()}),ya.nullable(),{auth:`protected`})}};Object.freeze({doorbell:`lastPressedAt`});var xa=Object.freeze(`accessories.action-source.actions.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-credentials.device-discovery.device-export.device-extension.device-history.device-manager.device-ops.device-provider.device-removal-hook.device-state.device-status.dishwasher.display-palette.doorbell.embedding-encoder.enum-sensor.event-emitter.face-gallery.failure-contribution.fan-control.feature-probe.filesystem-browse.flood.gas.group-active.group-commands.group-status.heating-valve.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.meter.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.node-certificates.nodes.notification-output.notification-rules.notifier.numeric-sensor.oauth-integration.oidc-connections.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.record-entries.recording.recording-archive.recording-export.recording-onboard.recording-signal.records.running-state.scene-monitor.script-runner.server-management.settings-store.smoke.smtp-provider.snapshot.sso-bridge.storage.storage-admin.storage-evictable.storage-migration.storage-occupancy.storage-provider.stream-broker.stream-catalog.stream-params.stream-signals.switch.system.tamper.temperature-sensor.terminal-session.toast.training.training-provider.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(`.`));Object.freeze({"air-quality-sensor":[{path:`co2Ppm`,valueType:`number`},{path:`vocPpb`,valueType:`number`},{path:`pm25`,valueType:`number`},{path:`pm10`,valueType:`number`},{path:`aqi`,valueType:`number`}],"alarm-panel":[{path:`state`,valueType:`enum`,enumValues:[`disarmed`,`armed_home`,`armed_away`,`armed_night`,`armed_vacation`,`armed_custom_bypass`,`arming`,`disarming`,`pending`,`triggered`]},{path:`targetMode`,valueType:`enum`,enumValues:[`home`,`away`,`night`,`vacation`,`custom_bypass`]},{path:`requiresCode`,valueType:`boolean`}],"ambient-light-sensor":[{path:`lux`,valueType:`number`}],"audio-metrics":[{path:`ts`,valueType:`number`},{path:`windowSec`,valueType:`number`},{path:`level.rms`,valueType:`number`},{path:`level.dbfs`,valueType:`number`},{path:`peakDbfs`,valueType:`number`},{path:`avgDbfs`,valueType:`number`},{path:`current.className`,valueType:`string`},{path:`current.score`,valueType:`number`},{path:`current.timestamp`,valueType:`number`}],"automation-control":[{path:`enabled`,valueType:`boolean`},{path:`isRunning`,valueType:`boolean`},{path:`lastTriggeredAt`,valueType:`number`},{path:`lastError`,valueType:`string`}],battery:[{path:`percentage`,valueType:`number`},{path:`charging`,valueType:`enum`,enumValues:[`dc`,`solar`,`none`,`unknown`]},{path:`sleeping`,valueType:`boolean`},{path:`lastUpdated`,valueType:`number`},{path:`volts`,valueType:`number`},{path:`lastContactAt`,valueType:`number`},{path:`lastFullRefreshAt`,valueType:`number`},{path:`binary`,valueType:`boolean`}],binary:[{path:`on`,valueType:`boolean`}],brightness:[{path:`percentage`,valueType:`number`}],broker:[{path:`brokerCount`,valueType:`number`},{path:`connectedCount`,valueType:`number`}],"camera-credentials":[{path:`host`,valueType:`string`},{path:`port`,valueType:`number`},{path:`onvifPort`,valueType:`number`},{path:`rtspPort`,valueType:`number`},{path:`https`,valueType:`boolean`},{path:`hasUsername`,valueType:`boolean`},{path:`hasPassword`,valueType:`boolean`},{path:`onvifProfile`,valueType:`string`}],"camera-streams":[{path:`online`,valueType:`boolean`},{path:`slotStatuses.high`,valueType:`enum`,enumValues:[`unassigned`,`idle`,`connecting`,`streaming`,`error`]},{path:`slotStatuses.mid`,valueType:`enum`,enumValues:[`unassigned`,`idle`,`connecting`,`streaming`,`error`]},{path:`slotStatuses.low`,valueType:`enum`,enumValues:[`unassigned`,`idle`,`connecting`,`streaming`,`error`]},{path:`slotErrors.high`,valueType:`string`},{path:`slotErrors.mid`,valueType:`string`},{path:`slotErrors.low`,valueType:`string`}],"carbon-monoxide":[{path:`detected`,valueType:`boolean`}],"climate-control":[{path:`mode`,valueType:`enum`,enumValues:[`off`,`heat`,`cool`,`auto`,`heat_cool`,`fan_only`,`dry`]},{path:`fanMode`,valueType:`string`},{path:`preset`,valueType:`string`},{path:`target`,valueType:`number`},{path:`targetHigh`,valueType:`number`},{path:`targetLow`,valueType:`number`},{path:`targetHumidity`,valueType:`number`},{path:`currentTemp`,valueType:`number`},{path:`currentHumidity`,valueType:`number`},{path:`swingVertical`,valueType:`boolean`},{path:`swingHorizontal`,valueType:`boolean`},{path:`minTemp`,valueType:`number`},{path:`maxTemp`,valueType:`number`},{path:`tempStep`,valueType:`number`}],color:[{path:`mode`,valueType:`enum`,enumValues:[`rgb`,`hsv`,`mired`]},{path:`rgb.r`,valueType:`number`},{path:`rgb.g`,valueType:`number`},{path:`rgb.b`,valueType:`number`},{path:`hsv.h`,valueType:`number`},{path:`hsv.s`,valueType:`number`},{path:`hsv.v`,valueType:`number`},{path:`mireds`,valueType:`number`}],connectivity:[{path:`connected`,valueType:`boolean`}],contact:[{path:`entryOpen`,valueType:`boolean`}],control:[{path:`kind`,valueType:`enum`,enumValues:[`numeric`,`select`,`text`,`datetime`]},{path:`min`,valueType:`number`},{path:`max`,valueType:`number`},{path:`step`,valueType:`number`}],cover:[{path:`state`,valueType:`enum`,enumValues:[`open`,`opening`,`closing`,`closed`,`stopped`]},{path:`position`,valueType:`number`},{path:`tiltPosition`,valueType:`number`}],"day-night":[{path:`mode`,valueType:`enum`,enumValues:[`auto`,`day`,`night`,`schedule`]},{path:`sensitivity`,valueType:`number`},{path:`switchDelaySec`,valueType:`number`}],"device-adoption":[{path:`lastDiscoveryAt`,valueType:`number`},{path:`candidateCount`,valueType:`number`},{path:`adoptedCount`,valueType:`number`},{path:`lastError`,valueType:`string`}],"device-discovery":[{path:`lastDiscoveryAt`,valueType:`number`},{path:`lastError`,valueType:`string`}],"device-export":[{path:`linkState`,valueType:`enum`,enumValues:[`unlinked`,`linked`,`error`]},{path:`exposedDeviceCount`,valueType:`number`},{path:`error`,valueType:`string`},{path:`setup.qr`,valueType:`string`},{path:`setup.note`,valueType:`string`}],"device-status":[{path:`online`,valueType:`boolean`}],dishwasher:[{path:`availability`,valueType:`enum`,enumValues:[`available`,`offline`,`description-missing`]},{path:`state`,valueType:`enum`,enumValues:[`idle`,`running`,`paused`,`finished`,`error`,`unavailable`]},{path:`operationState`,valueType:`enum`,enumValues:[`Inactive`,`Ready`,`DelayedStart`,`Run`,`Pause`,`ActionRequired`,`Finished`,`Error`,`Aborting`]},{path:`program`,valueType:`string`},{path:`selectedProgram`,valueType:`string`},{path:`remainingSeconds`,valueType:`number`},{path:`delayedStartSeconds`,valueType:`number`},{path:`progressPercent`,valueType:`number`},{path:`doorOpen`,valueType:`boolean`},{path:`doorLocked`,valueType:`boolean`},{path:`remoteStartAllowed`,valueType:`boolean`},{path:`remoteControlActive`,valueType:`boolean`},{path:`localControlActive`,valueType:`boolean`},{path:`powerOn`,valueType:`boolean`},{path:`powerState`,valueType:`string`},{path:`filterCleaningDue`,valueType:`boolean`},{path:`machineCareDue`,valueType:`boolean`},{path:`machineCareRemainingRuns`,valueType:`number`},{path:`halfLoad`,valueType:`boolean`},{path:`hygienePlus`,valueType:`boolean`},{path:`extraDry`,valueType:`boolean`},{path:`intensiveZone`,valueType:`boolean`},{path:`varioSpeedPlus`,valueType:`boolean`},{path:`childLock`,valueType:`boolean`},{path:`errorCode`,valueType:`number`},{path:`errorLabel`,valueType:`string`}],doorbell:[{path:`lastPressedAt`,valueType:`number`},{path:`pressCountSinceStart`,valueType:`number`}],"enum-sensor":[{path:`value`,valueType:`string`},{path:`timestamp`,valueType:`boolean`}],"event-emitter":[{path:`lastEvent.deviceId`,valueType:`number`},{path:`lastEvent.eventType`,valueType:`string`},{path:`lastEvent.timestamp`,valueType:`number`},{path:`lastEvent.seq`,valueType:`number`},{path:`eventCountSinceStart`,valueType:`number`}],"fan-control":[{path:`percentage`,valueType:`number`},{path:`percentageStep`,valueType:`number`},{path:`preset`,valueType:`string`},{path:`direction`,valueType:`enum`,enumValues:[`forward`,`reverse`]},{path:`oscillating`,valueType:`boolean`}],"feature-probe":[{path:`deviceType`,valueType:`string`},{path:`model`,valueType:`string`},{path:`channelCount`,valueType:`number`},{path:`lastProbedAt`,valueType:`number`}],flood:[{path:`flooded`,valueType:`boolean`}],gas:[{path:`detected`,valueType:`boolean`}],"group-active":[{path:`active`,valueType:`boolean`}],"group-status":[{path:`included`,valueType:`number`},{path:`excluded`,valueType:`number`},{path:`total`,valueType:`number`}],"heating-valve":[{path:`position`,valueType:`number`}],humidifier:[{path:`on`,valueType:`boolean`},{path:`currentHumidity`,valueType:`number`},{path:`targetHumidity`,valueType:`number`},{path:`mode`,valueType:`string`},{path:`action`,valueType:`string`},{path:`minHumidity`,valueType:`number`},{path:`maxHumidity`,valueType:`number`}],"humidity-sensor":[{path:`percent`,valueType:`number`}],image:[{path:`url`,valueType:`string`},{path:`lastUpdated`,valueType:`number`}],"image-settings":[{path:`brightness`,valueType:`number`},{path:`contrast`,valueType:`number`},{path:`saturation`,valueType:`number`},{path:`sharpness`,valueType:`number`},{path:`mirror`,valueType:`boolean`},{path:`flip`,valueType:`boolean`},{path:`rotate`,valueType:`enum`,enumValues:[`0`,`90`,`180`,`270`]},{path:`whiteBalance`,valueType:`enum`,enumValues:[`auto`,`manual`]},{path:`warmth`,valueType:`number`},{path:`exposureMode`,valueType:`enum`,enumValues:[`auto`,`manual`]},{path:`backlightMode`,valueType:`enum`,enumValues:[`off`,`blc`,`wdr`,`hlc`]}],intercom:[{path:`talking`,valueType:`boolean`},{path:`lastSessionAt`,valueType:`number`},{path:`ability.sampleRate`,valueType:`number`},{path:`ability.duplex`,valueType:`enum`,enumValues:[`half`,`full`]},{path:`ability.maxBacklogMs`,valueType:`number`}],"lawn-mower-control":[{path:`activity`,valueType:`enum`,enumValues:[`idle`,`mowing`,`paused`,`docked`,`error`]},{path:`batteryLevel`,valueType:`number`},{path:`progressPercent`,valueType:`number`},{path:`currentCode`,valueType:`number`},{path:`currentCodeLabel`,valueType:`string`},{path:`severity`,valueType:`enum`,enumValues:[`info`,`warning`,`error`]}],"lock-control":[{path:`state`,valueType:`enum`,enumValues:[`locked`,`unlocked`,`locking`,`unlocking`,`jammed`]}],"media-player":[{path:`state`,valueType:`enum`,enumValues:[`off`,`on`,`idle`,`playing`,`paused`,`buffering`,`standby`]},{path:`volumeLevel`,valueType:`number`},{path:`isMuted`,valueType:`boolean`},{path:`source`,valueType:`string`},{path:`currentMedia.type`,valueType:`string`},{path:`currentMedia.title`,valueType:`string`},{path:`currentMedia.artist`,valueType:`string`},{path:`currentMedia.album`,valueType:`string`},{path:`currentMedia.imageUrl`,valueType:`string`},{path:`positionMs`,valueType:`number`},{path:`durationMs`,valueType:`number`},{path:`shuffle`,valueType:`boolean`},{path:`repeat`,valueType:`enum`,enumValues:[`off`,`all`,`one`]}],meter:[{path:`value`,valueType:`number`}],motion:[{path:`detected`,valueType:`boolean`},{path:`lastDetectedAt`,valueType:`number`},{path:`autoClearAfterMs`,valueType:`number`}],"motion-trigger":[{path:`enabled`,valueType:`boolean`}],"motion-zones":[{path:`enabled`,valueType:`boolean`},{path:`sensitivity`,valueType:`number`}],"mqtt-broker":[{path:`brokerCount`,valueType:`number`},{path:`embeddedRunning`,valueType:`boolean`}],"native-object-detection":[{path:`enabled`,valueType:`boolean`}],navigation:[{path:`mode`,valueType:`enum`,enumValues:[`idle`,`cleaning`,`spot`,`following`,`goto`,`returning`,`paused`,`unknown`]},{path:`following`,valueType:`boolean`},{path:`flash`,valueType:`boolean`},{path:`lightMode`,valueType:`enum`,enumValues:[`auto`,`manual`]},{path:`lightLevel`,valueType:`number`}],"network-link":[{path:`type`,valueType:`enum`,enumValues:[`wifi`,`ethernet`,`cellular`,`unknown`]},{path:`signalPercent`,valueType:`number`},{path:`rssiDbm`,valueType:`number`},{path:`ssid`,valueType:`string`},{path:`lastUpdated`,valueType:`number`}],notifier:[{path:`lastSentAt`,valueType:`number`},{path:`lastError`,valueType:`string`},{path:`queueDepth`,valueType:`number`},{path:`supports.image`,valueType:`boolean`},{path:`supports.priority`,valueType:`boolean`},{path:`supports.data`,valueType:`boolean`},{path:`supports.actions`,valueType:`boolean`},{path:`supports.recipients`,valueType:`boolean`}],"numeric-sensor":[{path:`value`,valueType:`number`}],"pet-feeder":[{path:`foodLevel`,valueType:`number`},{path:`bowlFood`,valueType:`number`},{path:`eating`,valueType:`boolean`},{path:`supportsMarkRefilled`,valueType:`boolean`},{path:`food1`,valueType:`number`},{path:`food2`,valueType:`number`},{path:`lowFood`,valueType:`boolean`},{path:`batteryPower`,valueType:`number`},{path:`desiccantLeftDays`,valueType:`number`},{path:`feeding`,valueType:`boolean`},{path:`status`,valueType:`enum`,enumValues:[`normal`,`offline`,`on_batteries`]},{path:`error`,valueType:`string`},{path:`errorCode`,valueType:`number`},{path:`isDualHopper`,valueType:`boolean`},{path:`childLock`,valueType:`boolean`},{path:`indicatorLight`,valueType:`boolean`},{path:`feedSound`,valueType:`boolean`},{path:`volume`,valueType:`number`}],"power-meter":[{path:`watts`,valueType:`number`},{path:`kwhTotal`,valueType:`number`},{path:`volts`,valueType:`number`},{path:`amps`,valueType:`number`},{path:`va`,valueType:`number`},{path:`powerFactor`,valueType:`number`}],presence:[{path:`state`,valueType:`string`},{path:`location`,valueType:`string`},{path:`gps.latitude`,valueType:`number`},{path:`gps.longitude`,valueType:`number`},{path:`gps.accuracyMeters`,valueType:`number`},{path:`batteryPercent`,valueType:`number`}],"pressure-sensor":[{path:`hpa`,valueType:`number`}],"privacy-mask":[{path:`enabled`,valueType:`boolean`},{path:`audioEnabled`,valueType:`boolean`}],ptz:[{path:`pan`,valueType:`number`},{path:`tilt`,valueType:`number`},{path:`zoom`,valueType:`number`},{path:`autofocus`,valueType:`boolean`}],"ptz-autotrack":[{path:`enabled`,valueType:`boolean`},{path:`currentSettings.targetType`,valueType:`string`},{path:`currentSettings.stopDelaySeconds`,valueType:`number`},{path:`currentSettings.disappearDelaySeconds`,valueType:`number`}],"recording-archive":[{path:`deviceId`,valueType:`number`},{path:`enabled`,valueType:`boolean`},{path:`activeMode`,valueType:`enum`,enumValues:[`off`,`events`,`continuous`,`on-device-decision`]},{path:`nodeId`,valueType:`string`},{path:`storageBytes`,valueType:`number`}],"recording-onboard":[{path:`primaryTrackId`,valueType:`string`},{path:`enabled`,valueType:`boolean`},{path:`overwriteWhenFull`,valueType:`boolean`},{path:`preRecordSec`,valueType:`number`},{path:`postRecordSec`,valueType:`number`},{path:`segmentMinutes`,valueType:`number`},{path:`unreadableWindows`,valueType:`number`},{path:`recordingToNowhere`,valueType:`boolean`}],"recording-signal":[{path:`active`,valueType:`boolean`},{path:`reason`,valueType:`string`}],"running-state":[{path:`running`,valueType:`boolean`},{path:`since`,valueType:`number`},{path:`source`,valueType:`enum`,enumValues:[`native`,`assigned`]},{path:`phase`,valueType:`string`}],"script-runner":[{path:`isRunning`,valueType:`boolean`},{path:`lastRunAt`,valueType:`number`},{path:`lastRunSuccess`,valueType:`boolean`},{path:`lastError`,valueType:`string`}],smoke:[{path:`detected`,valueType:`boolean`}],snapshot:[{path:`lastCapturedAt`,valueType:`number`},{path:`cacheAgeMs`,valueType:`number`},{path:`lastBytes`,valueType:`number`},{path:`lastStreamId`,valueType:`string`}],"stream-params":[{path:`main.width`,valueType:`number`},{path:`main.height`,valueType:`number`},{path:`main.codec`,valueType:`enum`,enumValues:[`h264`,`h265`]},{path:`main.framerate`,valueType:`number`},{path:`main.bitrate`,valueType:`number`},{path:`main.bitrateMode`,valueType:`enum`,enumValues:[`vbr`,`cbr`]},{path:`main.encoderProfile`,valueType:`enum`,enumValues:[`high`,`main`,`baseline`]},{path:`main.gop`,valueType:`number`},{path:`main.audio`,valueType:`boolean`},{path:`sub.width`,valueType:`number`},{path:`sub.height`,valueType:`number`},{path:`sub.codec`,valueType:`enum`,enumValues:[`h264`,`h265`]},{path:`sub.framerate`,valueType:`number`},{path:`sub.bitrate`,valueType:`number`},{path:`sub.bitrateMode`,valueType:`enum`,enumValues:[`vbr`,`cbr`]},{path:`sub.encoderProfile`,valueType:`enum`,enumValues:[`high`,`main`,`baseline`]},{path:`sub.gop`,valueType:`number`},{path:`sub.audio`,valueType:`boolean`},{path:`ext.width`,valueType:`number`},{path:`ext.height`,valueType:`number`},{path:`ext.codec`,valueType:`enum`,enumValues:[`h264`,`h265`]},{path:`ext.framerate`,valueType:`number`},{path:`ext.bitrate`,valueType:`number`},{path:`ext.bitrateMode`,valueType:`enum`,enumValues:[`vbr`,`cbr`]},{path:`ext.encoderProfile`,valueType:`enum`,enumValues:[`high`,`main`,`baseline`]},{path:`ext.gop`,valueType:`number`},{path:`ext.audio`,valueType:`boolean`}],switch:[{path:`on`,valueType:`boolean`}],tamper:[{path:`tampered`,valueType:`boolean`}],"temperature-sensor":[{path:`celsius`,valueType:`number`}],update:[{path:`currentVersion`,valueType:`string`},{path:`availableVersion`,valueType:`string`},{path:`updatable`,valueType:`boolean`},{path:`state`,valueType:`string`},{path:`inProgress`,valueType:`boolean`}],"vacuum-control":[{path:`state`,valueType:`enum`,enumValues:[`idle`,`cleaning`,`paused`,`returning`,`docked`,`drying`,`error`]},{path:`batteryLevel`,valueType:`number`},{path:`fanSpeed`,valueType:`string`},{path:`progressPercent`,valueType:`number`},{path:`errorCode`,valueType:`number`},{path:`errorLabel`,valueType:`string`}],valve:[{path:`state`,valueType:`enum`,enumValues:[`open`,`opening`,`closing`,`closed`,`stopped`]},{path:`position`,valueType:`number`}],vibration:[{path:`detected`,valueType:`boolean`}],"water-heater":[{path:`currentTemp`,valueType:`number`},{path:`targetTemp`,valueType:`number`},{path:`operationMode`,valueType:`string`},{path:`away`,valueType:`boolean`},{path:`minTemp`,valueType:`number`},{path:`maxTemp`,valueType:`number`}],weather:[{path:`condition`,valueType:`string`},{path:`temperature`,valueType:`number`},{path:`humidity`,valueType:`number`},{path:`pressure`,valueType:`number`},{path:`windSpeed`,valueType:`number`},{path:`windBearing`,valueType:`number`}],"zone-analytics":[{path:`ts`,valueType:`number`},{path:`frameWidth`,valueType:`number`},{path:`frameHeight`,valueType:`number`},{path:`frame.totalObjects`,valueType:`number`},{path:`frame.standingObjects`,valueType:`number`},{path:`frame.transientObjects`,valueType:`number`},{path:`unzoned.totalObjects`,valueType:`number`},{path:`unzoned.standingObjects`,valueType:`number`},{path:`unzoned.transientObjects`,valueType:`number`}]});var Sa=`camstack/camstack-models`,nte=`https://huggingface.co/${Sa}/resolve/main`,rte=`30d`,ite={"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`},Ca=`device.state-changed`;function wa(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:Ca},{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 Ta(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:Ca},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 Ea(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 N(e,t,n){let r=Da(e)?e:wa(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 Da(e){return typeof e.read==`function`&&typeof e.watch==`function`}function ate(e){return e}function Oa(e){if(e===null||Array.isArray(e))return!1;let t=typeof e;return t===`object`||t===`function`}function ote(e){if(!Oa(e))return!1;let t=e;return typeof t.query==`function`||typeof t.mutate==`function`||typeof t.subscribe==`function`}function ste(e,t){let n=Reflect.get(e,t);if(Oa(n))return n}function cte(e,t,n){let r=ste(e,t);if(!r)throw Error(`tRPC client has no router '${t}'`);let i=r[n];if(!ote(i))throw Error(`tRPC client has no '${t}.${n}'`);return i}function ka(e,t,n,r,i,a){let o=cte(e,t,n);if(r===`mutation`){if(typeof o.mutate!=`function`)throw Error(`tRPC '${t}.${n}' has no mutate()`);return o.mutate(i)}if(r===`subscription`){if(typeof o.subscribe!=`function`)throw Error(`tRPC '${t}.${n}' has no subscribe()`);return o.subscribe(i,a)}if(typeof o.query!=`function`)throw Error(`tRPC '${t}.${n}' has no query()`);return o.query(i)}function Aa(e,t,n){let r=n?.stateSource??wa(ate(e));function i(e,n){let r=typeof e==`object`&&e?e:{};return n===void 0?{...r,deviceId:t.deviceId}:{...r,deviceId:t.deviceId,nodeId:n}}function a(t,n,r,i,a){return ka(e,t,n,r,i,a)}function o(e,n,r,o,s,c){return a(n,r,o,i(s,t.entries.find(t=>t.capName===e)?.providerNodeId),c)}function s(e,t,n,r,o){return a(e,t,n,i(r,void 0),o)}function c(e){return t.entries.some(t=>t.capName===e)}let l={setChildHidden:e=>o(`accessories`,`accessories`,`setChildHidden`,`mutation`,e),getStatus:e=>o(`accessories`,`accessories`,`getStatus`,`query`,e)},u={getStatus:e=>o(`air-quality-sensor`,`airQualitySensor`,`getStatus`,`query`,e)},d={arm:e=>o(`alarm-panel`,`alarmPanel`,`arm`,`mutation`,e),disarm:e=>o(`alarm-panel`,`alarmPanel`,`disarm`,`mutation`,e),trigger:e=>o(`alarm-panel`,`alarmPanel`,`trigger`,`mutation`,e),getStatus:e=>o(`alarm-panel`,`alarmPanel`,`getStatus`,`query`,e)},f={getStatus:e=>o(`ambient-light-sensor`,`ambientLightSensor`,`getStatus`,`query`,e)},p={resolveDeviceSettings:e=>o(`audio-analysis`,`audioAnalysis`,`resolveDeviceSettings`,`query`,e),getDeviceSettingsContribution:e=>o(`audio-analysis`,`audioAnalysis`,`getDeviceSettingsContribution`,`query`,e),getDeviceLiveContribution:e=>o(`audio-analysis`,`audioAnalysis`,`getDeviceLiveContribution`,`query`,e),applyDeviceSettingsPatch:e=>o(`audio-analysis`,`audioAnalysis`,`applyDeviceSettingsPatch`,`mutation`,e)},m={getCurrentSnapshot:e=>o(`audio-metrics`,`audioMetrics`,`getCurrentSnapshot`,`query`,e),getHistory:e=>o(`audio-metrics`,`audioMetrics`,`getHistory`,`query`,e)},h={enable:e=>o(`automation-control`,`automationControl`,`enable`,`mutation`,e),disable:e=>o(`automation-control`,`automationControl`,`disable`,`mutation`,e),trigger:e=>o(`automation-control`,`automationControl`,`trigger`,`mutation`,e),getStatus:e=>o(`automation-control`,`automationControl`,`getStatus`,`query`,e)},g={wakeForStream:e=>o(`battery`,`battery`,`wakeForStream`,`mutation`,e),getStatus:e=>o(`battery`,`battery`,`getStatus`,`query`,e)},_={getStatus:e=>o(`binary`,`binary`,`getStatus`,`query`,e)},v={setBrightness:e=>o(`brightness`,`brightness`,`setBrightness`,`mutation`,e),getStatus:e=>o(`brightness`,`brightness`,`getStatus`,`query`,e)},ee={press:e=>o(`button`,`button`,`press`,`mutation`,e)},te={getCredentials:e=>o(`camera-credentials`,`cameraCredentials`,`getCredentials`,`query`,e),getStatus:e=>o(`camera-credentials`,`cameraCredentials`,`getStatus`,`query`,e)},ne={getLayout:e=>o(`camera-grid-layout`,`cameraGridLayout`,`getLayout`,`query`,e),saveLayout:e=>o(`camera-grid-layout`,`cameraGridLayout`,`saveLayout`,`mutation`,e),getDeviceSettingsContribution:e=>o(`camera-grid-layout`,`cameraGridLayout`,`getDeviceSettingsContribution`,`query`,e),getDeviceLiveContribution:e=>o(`camera-grid-layout`,`cameraGridLayout`,`getDeviceLiveContribution`,`query`,e),applyDeviceSettingsPatch:e=>o(`camera-grid-layout`,`cameraGridLayout`,`applyDeviceSettingsPatch`,`mutation`,e)},y={getDeviceSettingsContribution:e=>o(`camera-pipeline-config`,`cameraPipelineConfig`,`getDeviceSettingsContribution`,`query`,e),getDeviceLiveContribution:e=>o(`camera-pipeline-config`,`cameraPipelineConfig`,`getDeviceLiveContribution`,`query`,e),applyDeviceSettingsPatch:e=>o(`camera-pipeline-config`,`cameraPipelineConfig`,`applyDeviceSettingsPatch`,`mutation`,e)},b={getCameraStreams:e=>o(`camera-streams`,`cameraStreams`,`getCameraStreams`,`query`,e),getBrokerStreams:e=>o(`camera-streams`,`cameraStreams`,`getBrokerStreams`,`query`,e),getRtspEntries:e=>o(`camera-streams`,`cameraStreams`,`getRtspEntries`,`query`,e),getProfileRtspEntries:e=>o(`camera-streams`,`cameraStreams`,`getProfileRtspEntries`,`query`,e),pickStream:e=>o(`camera-streams`,`cameraStreams`,`pickStream`,`query`,e)},re={getStatus:e=>o(`carbon-monoxide`,`carbonMonoxide`,`getStatus`,`query`,e)},x={setMode:e=>o(`climate-control`,`climateControl`,`setMode`,`mutation`,e),setFanMode:e=>o(`climate-control`,`climateControl`,`setFanMode`,`mutation`,e),setPreset:e=>o(`climate-control`,`climateControl`,`setPreset`,`mutation`,e),setTarget:e=>o(`climate-control`,`climateControl`,`setTarget`,`mutation`,e),setTargetRange:e=>o(`climate-control`,`climateControl`,`setTargetRange`,`mutation`,e),setTargetHumidity:e=>o(`climate-control`,`climateControl`,`setTargetHumidity`,`mutation`,e),setSwingVertical:e=>o(`climate-control`,`climateControl`,`setSwingVertical`,`mutation`,e),setSwingHorizontal:e=>o(`climate-control`,`climateControl`,`setSwingHorizontal`,`mutation`,e),getStatus:e=>o(`climate-control`,`climateControl`,`getStatus`,`query`,e)},ie={setColor:e=>o(`color`,`color`,`setColor`,`mutation`,e),getStatus:e=>o(`color`,`color`,`getStatus`,`query`,e)},ae={getStatus:e=>o(`connectivity`,`connectivity`,`getStatus`,`query`,e)},S={reset:e=>o(`consumables`,`consumables`,`reset`,`mutation`,e),getStatus:e=>o(`consumables`,`consumables`,`getStatus`,`query`,e)},oe={getStatus:e=>o(`contact`,`contact`,`getStatus`,`query`,e)},se={setValue:e=>o(`control`,`control`,`setValue`,`mutation`,e),getStatus:e=>o(`control`,`control`,`getStatus`,`query`,e)},C={open:e=>o(`cover`,`cover`,`open`,`mutation`,e),close:e=>o(`cover`,`cover`,`close`,`mutation`,e),stop:e=>o(`cover`,`cover`,`stop`,`mutation`,e),setPosition:e=>o(`cover`,`cover`,`setPosition`,`mutation`,e),setTiltPosition:e=>o(`cover`,`cover`,`setTiltPosition`,`mutation`,e),getStatus:e=>o(`cover`,`cover`,`getStatus`,`query`,e)},ce={getOptions:e=>o(`day-night`,`dayNight`,`getOptions`,`query`,e),setSettings:e=>o(`day-night`,`dayNight`,`setSettings`,`mutation`,e),getStatus:e=>o(`day-night`,`dayNight`,`getStatus`,`query`,e)},le={getDeviceSettingsContribution:e=>o(`detection-pipeline`,`detectionPipeline`,`getDeviceSettingsContribution`,`query`,e),getDeviceLiveContribution:e=>o(`detection-pipeline`,`detectionPipeline`,`getDeviceLiveContribution`,`query`,e),applyDeviceSettingsPatch:e=>o(`detection-pipeline`,`detectionPipeline`,`applyDeviceSettingsPatch`,`mutation`,e)},ue={getAdminLink:e=>o(`device-admin-link`,`deviceAdminLink`,`getAdminLink`,`query`,e)},de={listDiscovered:e=>o(`device-discovery`,`deviceDiscovery`,`listDiscovered`,`query`,e),refreshDiscovery:e=>o(`device-discovery`,`deviceDiscovery`,`refreshDiscovery`,`mutation`,e),adoptDevice:e=>o(`device-discovery`,`deviceDiscovery`,`adoptDevice`,`mutation`,e),releaseDevice:e=>o(`device-discovery`,`deviceDiscovery`,`releaseDevice`,`mutation`,e),getStatus:e=>o(`device-discovery`,`deviceDiscovery`,`getStatus`,`query`,e)},w={listSources:e=>o(`device-extension`,`deviceExtension`,`listSources`,`query`,e),listSlots:e=>o(`device-extension`,`deviceExtension`,`listSlots`,`query`,e),listCandidates:e=>o(`device-extension`,`deviceExtension`,`listCandidates`,`query`,e),setSlot:e=>o(`device-extension`,`deviceExtension`,`setSlot`,`mutation`,e)},fe={getStreamSources:e=>o(`device-ops`,`deviceOps`,`getStreamSources`,`query`,e),getConfigEntries:e=>o(`device-ops`,`deviceOps`,`getConfigEntries`,`query`,e),setConfig:e=>o(`device-ops`,`deviceOps`,`setConfig`,`mutation`,e),runAction:e=>o(`device-ops`,`deviceOps`,`runAction`,`mutation`,e),removeDevice:e=>o(`device-ops`,`deviceOps`,`removeDevice`,`mutation`,e),getSettingsSchema:e=>o(`device-ops`,`deviceOps`,`getSettingsSchema`,`query`,e),getRawState:e=>o(`device-ops`,`deviceOps`,`getRawState`,`query`,e)},pe={getStatus:e=>o(`device-status`,`deviceStatus`,`getStatus`,`query`,e)},T={start:e=>o(`dishwasher`,`dishwasher`,`start`,`mutation`,e),pause:e=>o(`dishwasher`,`dishwasher`,`pause`,`mutation`,e),resume:e=>o(`dishwasher`,`dishwasher`,`resume`,`mutation`,e),stop:e=>o(`dishwasher`,`dishwasher`,`stop`,`mutation`,e),setProgram:e=>o(`dishwasher`,`dishwasher`,`setProgram`,`mutation`,e),setPower:e=>o(`dishwasher`,`dishwasher`,`setPower`,`mutation`,e),setHalfLoad:e=>o(`dishwasher`,`dishwasher`,`setHalfLoad`,`mutation`,e),setHygienePlus:e=>o(`dishwasher`,`dishwasher`,`setHygienePlus`,`mutation`,e),setExtraDry:e=>o(`dishwasher`,`dishwasher`,`setExtraDry`,`mutation`,e),setIntensiveZone:e=>o(`dishwasher`,`dishwasher`,`setIntensiveZone`,`mutation`,e),setVarioSpeedPlus:e=>o(`dishwasher`,`dishwasher`,`setVarioSpeedPlus`,`mutation`,e),setChildLock:e=>o(`dishwasher`,`dishwasher`,`setChildLock`,`mutation`,e),setOption:e=>o(`dishwasher`,`dishwasher`,`setOption`,`mutation`,e),getOptions:e=>o(`dishwasher`,`dishwasher`,`getOptions`,`query`,e),getStatus:e=>o(`dishwasher`,`dishwasher`,`getStatus`,`query`,e)},E={getStatus:e=>o(`doorbell`,`doorbell`,`getStatus`,`query`,e)},me={getStatus:e=>o(`enum-sensor`,`enumSensor`,`getStatus`,`query`,e)},he={getStatus:e=>o(`event-emitter`,`eventEmitter`,`getStatus`,`query`,e)},ge={setPercentage:e=>o(`fan-control`,`fanControl`,`setPercentage`,`mutation`,e),setPreset:e=>o(`fan-control`,`fanControl`,`setPreset`,`mutation`,e),setDirection:e=>o(`fan-control`,`fanControl`,`setDirection`,`mutation`,e),setOscillating:e=>o(`fan-control`,`fanControl`,`setOscillating`,`mutation`,e),getStatus:e=>o(`fan-control`,`fanControl`,`getStatus`,`query`,e)},_e={getStatus:e=>o(`feature-probe`,`featureProbe`,`getStatus`,`query`,e)},ve={getStatus:e=>o(`flood`,`flood`,`getStatus`,`query`,e)},ye={getStatus:e=>o(`gas`,`gas`,`getStatus`,`query`,e)},be={getStatus:e=>o(`group-active`,`groupActive`,`getStatus`,`query`,e)},xe={getStatus:e=>o(`group-commands`,`groupCommands`,`getStatus`,`query`,e)},Se={getStatus:e=>o(`group-status`,`groupStatus`,`getStatus`,`query`,e)},Ce={getStatus:e=>o(`heating-valve`,`heatingValve`,`getStatus`,`query`,e)},we={setOn:e=>o(`humidifier`,`humidifier`,`setOn`,`mutation`,e),setTargetHumidity:e=>o(`humidifier`,`humidifier`,`setTargetHumidity`,`mutation`,e),setMode:e=>o(`humidifier`,`humidifier`,`setMode`,`mutation`,e),getStatus:e=>o(`humidifier`,`humidifier`,`getStatus`,`query`,e)},Te={getStatus:e=>o(`humidity-sensor`,`humiditySensor`,`getStatus`,`query`,e)},Ee={getStatus:e=>o(`image`,`image`,`getStatus`,`query`,e)},De={getOptions:e=>o(`image-settings`,`imageSettings`,`getOptions`,`query`,e),setSettings:e=>o(`image-settings`,`imageSettings`,`setSettings`,`mutation`,e),getStatus:e=>o(`image-settings`,`imageSettings`,`getStatus`,`query`,e)},Oe={startSession:e=>o(`intercom`,`intercom`,`startSession`,`mutation`,e),handleAnswer:e=>o(`intercom`,`intercom`,`handleAnswer`,`mutation`,e),stopSession:e=>o(`intercom`,`intercom`,`stopSession`,`mutation`,e),startTalkSession:e=>o(`intercom`,`intercom`,`startTalkSession`,`mutation`,e),pushTalkAudio:e=>o(`intercom`,`intercom`,`pushTalkAudio`,`mutation`,e),endTalkSession:e=>o(`intercom`,`intercom`,`endTalkSession`,`mutation`,e),getStatus:e=>o(`intercom`,`intercom`,`getStatus`,`query`,e)},ke={startMowing:e=>o(`lawn-mower-control`,`lawnMowerControl`,`startMowing`,`mutation`,e),pause:e=>o(`lawn-mower-control`,`lawnMowerControl`,`pause`,`mutation`,e),dock:e=>o(`lawn-mower-control`,`lawnMowerControl`,`dock`,`mutation`,e),getStatus:e=>o(`lawn-mower-control`,`lawnMowerControl`,`getStatus`,`query`,e)},Ae={lock:e=>o(`lock-control`,`lockControl`,`lock`,`mutation`,e),unlock:e=>o(`lock-control`,`lockControl`,`unlock`,`mutation`,e),open:e=>o(`lock-control`,`lockControl`,`open`,`mutation`,e),getStatus:e=>o(`lock-control`,`lockControl`,`getStatus`,`query`,e)},je={play:e=>o(`media-player`,`mediaPlayer`,`play`,`mutation`,e),pause:e=>o(`media-player`,`mediaPlayer`,`pause`,`mutation`,e),stop:e=>o(`media-player`,`mediaPlayer`,`stop`,`mutation`,e),next:e=>o(`media-player`,`mediaPlayer`,`next`,`mutation`,e),previous:e=>o(`media-player`,`mediaPlayer`,`previous`,`mutation`,e),seek:e=>o(`media-player`,`mediaPlayer`,`seek`,`mutation`,e),setVolume:e=>o(`media-player`,`mediaPlayer`,`setVolume`,`mutation`,e),setMute:e=>o(`media-player`,`mediaPlayer`,`setMute`,`mutation`,e),setShuffle:e=>o(`media-player`,`mediaPlayer`,`setShuffle`,`mutation`,e),setRepeat:e=>o(`media-player`,`mediaPlayer`,`setRepeat`,`mutation`,e),selectSource:e=>o(`media-player`,`mediaPlayer`,`selectSource`,`mutation`,e),playMedia:e=>o(`media-player`,`mediaPlayer`,`playMedia`,`mutation`,e),getStatus:e=>o(`media-player`,`mediaPlayer`,`getStatus`,`query`,e)},Me={getStatus:e=>o(`meter`,`meter`,`getStatus`,`query`,e)},Ne={isDetected:e=>o(`motion`,`motion`,`isDetected`,`query`,e),getStatus:e=>o(`motion`,`motion`,`getStatus`,`query`,e)},Pe={analyze:e=>o(`motion-detection`,`motionDetection`,`analyze`,`mutation`,e),removeCamera:e=>o(`motion-detection`,`motionDetection`,`removeCamera`,`mutation`,e),reset:e=>o(`motion-detection`,`motionDetection`,`reset`,`mutation`,e),getDeviceSettingsContribution:e=>o(`motion-detection`,`motionDetection`,`getDeviceSettingsContribution`,`query`,e),getDeviceLiveContribution:e=>o(`motion-detection`,`motionDetection`,`getDeviceLiveContribution`,`query`,e),applyDeviceSettingsPatch:e=>o(`motion-detection`,`motionDetection`,`applyDeviceSettingsPatch`,`mutation`,e)},Fe={setMotionTrigger:e=>o(`motion-trigger`,`motionTrigger`,`setMotionTrigger`,`mutation`,e),getStatus:e=>o(`motion-trigger`,`motionTrigger`,`getStatus`,`query`,e)},Ie={getOptions:e=>o(`motion-zones`,`motionZones`,`getOptions`,`query`,e),setZone:e=>o(`motion-zones`,`motionZones`,`setZone`,`mutation`,e),getStatus:e=>o(`motion-zones`,`motionZones`,`getStatus`,`query`,e)},Le={getOptions:e=>o(`native-object-detection`,`nativeObjectDetection`,`getOptions`,`query`,e),setSettings:e=>o(`native-object-detection`,`nativeObjectDetection`,`setSettings`,`mutation`,e),setEnabled:e=>o(`native-object-detection`,`nativeObjectDetection`,`setEnabled`,`mutation`,e),getStatus:e=>o(`native-object-detection`,`nativeObjectDetection`,`getStatus`,`query`,e)},Re={move:e=>o(`navigation`,`navigation`,`move`,`mutation`,e),stop:e=>o(`navigation`,`navigation`,`stop`,`mutation`,e),goToPoint:e=>o(`navigation`,`navigation`,`goToPoint`,`mutation`,e),listActions:e=>o(`navigation`,`navigation`,`listActions`,`query`,e),runAction:e=>o(`navigation`,`navigation`,`runAction`,`mutation`,e),playSound:e=>o(`navigation`,`navigation`,`playSound`,`mutation`,e),setLightOn:e=>o(`navigation`,`navigation`,`setLightOn`,`mutation`,e),setLightMode:e=>o(`navigation`,`navigation`,`setLightMode`,`mutation`,e),setLightLevel:e=>o(`navigation`,`navigation`,`setLightLevel`,`mutation`,e),getFeatures:e=>o(`navigation`,`navigation`,`getFeatures`,`query`,e),getStatus:e=>o(`navigation`,`navigation`,`getStatus`,`query`,e)},ze={getStatus:e=>o(`network-link`,`networkLink`,`getStatus`,`query`,e)},Be={send:e=>o(`notifier`,`notifier`,`send`,`mutation`,e),cancel:e=>o(`notifier`,`notifier`,`cancel`,`mutation`,e),getStatus:e=>o(`notifier`,`notifier`,`getStatus`,`query`,e)},Ve={getStatus:e=>o(`numeric-sensor`,`numericSensor`,`getStatus`,`query`,e)},He={setOverlay:e=>o(`osd`,`osd`,`setOverlay`,`mutation`,e),getStatus:e=>o(`osd`,`osd`,`getStatus`,`query`,e)},Ue={feed:e=>o(`pet-feeder`,`petFeeder`,`feed`,`mutation`,e),cancelFeed:e=>o(`pet-feeder`,`petFeeder`,`cancelFeed`,`mutation`,e),resetDesiccant:e=>o(`pet-feeder`,`petFeeder`,`resetDesiccant`,`mutation`,e),markFoodReplenished:e=>o(`pet-feeder`,`petFeeder`,`markFoodReplenished`,`mutation`,e),callPet:e=>o(`pet-feeder`,`petFeeder`,`callPet`,`mutation`,e),playSound:e=>o(`pet-feeder`,`petFeeder`,`playSound`,`mutation`,e),setChildLock:e=>o(`pet-feeder`,`petFeeder`,`setChildLock`,`mutation`,e),setIndicatorLight:e=>o(`pet-feeder`,`petFeeder`,`setIndicatorLight`,`mutation`,e),setFeedSound:e=>o(`pet-feeder`,`petFeeder`,`setFeedSound`,`mutation`,e),setVolume:e=>o(`pet-feeder`,`petFeeder`,`setVolume`,`mutation`,e),getStatus:e=>o(`pet-feeder`,`petFeeder`,`getStatus`,`query`,e)},We={getActiveTracks:e=>o(`pipeline-analytics`,`pipelineAnalytics`,`getActiveTracks`,`query`,e),getTrack:e=>o(`pipeline-analytics`,`pipelineAnalytics`,`getTrack`,`query`,e),listTracks:e=>o(`pipeline-analytics`,`pipelineAnalytics`,`listTracks`,`query`,e),listRecentTracks:e=>o(`pipeline-analytics`,`pipelineAnalytics`,`listRecentTracks`,`query`,e),clearTracks:e=>o(`pipeline-analytics`,`pipelineAnalytics`,`clearTracks`,`mutation`,e),getMotionEvents:e=>o(`pipeline-analytics`,`pipelineAnalytics`,`getMotionEvents`,`query`,e),getObjectEvents:e=>o(`pipeline-analytics`,`pipelineAnalytics`,`getObjectEvents`,`query`,e),getAudioEvents:e=>o(`pipeline-analytics`,`pipelineAnalytics`,`getAudioEvents`,`query`,e),listEventKinds:e=>o(`pipeline-analytics`,`pipelineAnalytics`,`listEventKinds`,`query`,e),listEventKindsBatch:e=>o(`pipeline-analytics`,`pipelineAnalytics`,`listEventKindsBatch`,`query`,e),getSensorEvents:e=>o(`pipeline-analytics`,`pipelineAnalytics`,`getSensorEvents`,`query`,e),getKeyEvents:e=>o(`pipeline-analytics`,`pipelineAnalytics`,`getKeyEvents`,`query`,e),getKeyEventsBatch:e=>o(`pipeline-analytics`,`pipelineAnalytics`,`getKeyEventsBatch`,`query`,e),readLongTermSeries:e=>o(`pipeline-analytics`,`pipelineAnalytics`,`readLongTermSeries`,`query`,e),getEventDensity:e=>o(`pipeline-analytics`,`pipelineAnalytics`,`getEventDensity`,`query`,e),getEventDensityBatch:e=>o(`pipeline-analytics`,`pipelineAnalytics`,`getEventDensityBatch`,`query`,e),pruneEventsBefore:e=>o(`pipeline-analytics`,`pipelineAnalytics`,`pruneEventsBefore`,`mutation`,e),pruneTracksBefore:e=>o(`pipeline-analytics`,`pipelineAnalytics`,`pruneTracksBefore`,`mutation`,e),wipeAllAnalytics:e=>o(`pipeline-analytics`,`pipelineAnalytics`,`wipeAllAnalytics`,`mutation`,e),reconcileFromDisk:e=>o(`pipeline-analytics`,`pipelineAnalytics`,`reconcileFromDisk`,`mutation`,e),deleteTracks:e=>o(`pipeline-analytics`,`pipelineAnalytics`,`deleteTracks`,`mutation`,e),setTrackFlags:e=>o(`pipeline-analytics`,`pipelineAnalytics`,`setTrackFlags`,`mutation`,e),listArchivedDebugNotes:e=>o(`pipeline-analytics`,`pipelineAnalytics`,`listArchivedDebugNotes`,`query`,e),setTrackRelation:e=>o(`pipeline-analytics`,`pipelineAnalytics`,`setTrackRelation`,`mutation`,e),clearTrackRelation:e=>o(`pipeline-analytics`,`pipelineAnalytics`,`clearTrackRelation`,`mutation`,e),setTrackPurity:e=>o(`pipeline-analytics`,`pipelineAnalytics`,`setTrackPurity`,`mutation`,e),listTrackRelations:e=>o(`pipeline-analytics`,`pipelineAnalytics`,`listTrackRelations`,`query`,e),listBirthDecisions:e=>o(`pipeline-analytics`,`pipelineAnalytics`,`listBirthDecisions`,`query`,e),getEventStoreFootprint:e=>o(`pipeline-analytics`,`pipelineAnalytics`,`getEventStoreFootprint`,`query`,e),getEventMediaFootprintByKind:e=>o(`pipeline-analytics`,`pipelineAnalytics`,`getEventMediaFootprintByKind`,`query`,e),pruneEvents:e=>o(`pipeline-analytics`,`pipelineAnalytics`,`pruneEvents`,`mutation`,e),deleteDeviceEvents:e=>o(`pipeline-analytics`,`pipelineAnalytics`,`deleteDeviceEvents`,`mutation`,e),pauseForStorageMigration:e=>o(`pipeline-analytics`,`pipelineAnalytics`,`pauseForStorageMigration`,`mutation`,e),resumeForStorageMigration:e=>o(`pipeline-analytics`,`pipelineAnalytics`,`resumeForStorageMigration`,`mutation`,e),refreshStorageLocationsForMigration:e=>o(`pipeline-analytics`,`pipelineAnalytics`,`refreshStorageLocationsForMigration`,`mutation`,e),startStorageMigrationMove:e=>o(`pipeline-analytics`,`pipelineAnalytics`,`startStorageMigrationMove`,`mutation`,e),getStorageMigrationMoveStatus:e=>o(`pipeline-analytics`,`pipelineAnalytics`,`getStorageMigrationMoveStatus`,`query`,e),cancelStorageMigrationMove:e=>o(`pipeline-analytics`,`pipelineAnalytics`,`cancelStorageMigrationMove`,`mutation`,e),relocateMedia:e=>o(`pipeline-analytics`,`pipelineAnalytics`,`relocateMedia`,`mutation`,e),countUnstampedEventMedia:e=>o(`pipeline-analytics`,`pipelineAnalytics`,`countUnstampedEventMedia`,`query`,e),countRelocatableMedia:e=>o(`pipeline-analytics`,`pipelineAnalytics`,`countRelocatableMedia`,`query`,e),listRelocateMediaJobs:e=>o(`pipeline-analytics`,`pipelineAnalytics`,`listRelocateMediaJobs`,`query`,e),cancelRelocateMedia:e=>o(`pipeline-analytics`,`pipelineAnalytics`,`cancelRelocateMedia`,`mutation`,e),listOpsLog:e=>o(`pipeline-analytics`,`pipelineAnalytics`,`listOpsLog`,`query`,e),reclaimDebugMedia:e=>o(`pipeline-analytics`,`pipelineAnalytics`,`reclaimDebugMedia`,`mutation`,e),getMediaReclaimStatus:e=>o(`pipeline-analytics`,`pipelineAnalytics`,`getMediaReclaimStatus`,`query`,e),getTrainingExportSummary:e=>o(`pipeline-analytics`,`pipelineAnalytics`,`getTrainingExportSummary`,`query`,e),getTrainingExportUrl:e=>o(`pipeline-analytics`,`pipelineAnalytics`,`getTrainingExportUrl`,`query`,e),listRetrainStaging:e=>o(`pipeline-analytics`,`pipelineAnalytics`,`listRetrainStaging`,`query`,e),listRetrainCorpusPage:e=>o(`pipeline-analytics`,`pipelineAnalytics`,`listRetrainCorpusPage`,`query`,e),getRetrainCorpusKpi:e=>o(`pipeline-analytics`,`pipelineAnalytics`,`getRetrainCorpusKpi`,`query`,e),listRetrainFrames:e=>o(`pipeline-analytics`,`pipelineAnalytics`,`listRetrainFrames`,`query`,e),selectRetrainFrames:e=>o(`pipeline-analytics`,`pipelineAnalytics`,`selectRetrainFrames`,`mutation`,e),deselectRetrainFrame:e=>o(`pipeline-analytics`,`pipelineAnalytics`,`deselectRetrainFrame`,`mutation`,e),getRetrainFrameImage:e=>o(`pipeline-analytics`,`pipelineAnalytics`,`getRetrainFrameImage`,`query`,e),proposeRetrainAnnotations:e=>o(`pipeline-analytics`,`pipelineAnalytics`,`proposeRetrainAnnotations`,`mutation`,e),listRetrainAnnotations:e=>o(`pipeline-analytics`,`pipelineAnalytics`,`listRetrainAnnotations`,`query`,e),saveRetrainAnnotations:e=>o(`pipeline-analytics`,`pipelineAnalytics`,`saveRetrainAnnotations`,`mutation`,e),backfillRetrainOrigins:e=>o(`pipeline-analytics`,`pipelineAnalytics`,`backfillRetrainOrigins`,`mutation`,e),completeRetrainTrack:e=>o(`pipeline-analytics`,`pipelineAnalytics`,`completeRetrainTrack`,`mutation`,e),restageRetrainTrack:e=>o(`pipeline-analytics`,`pipelineAnalytics`,`restageRetrainTrack`,`mutation`,e),getRetrainExportUrl:e=>o(`pipeline-analytics`,`pipelineAnalytics`,`getRetrainExportUrl`,`query`,e),setRetrainFrameComplete:e=>o(`pipeline-analytics`,`pipelineAnalytics`,`setRetrainFrameComplete`,`mutation`,e),writeRetrainArchive:e=>o(`pipeline-analytics`,`pipelineAnalytics`,`writeRetrainArchive`,`mutation`,e),offerRetrainArchive:e=>o(`pipeline-analytics`,`pipelineAnalytics`,`offerRetrainArchive`,`mutation`,e),listRetrainAssistProfiles:e=>o(`pipeline-analytics`,`pipelineAnalytics`,`listRetrainAssistProfiles`,`query`,e),proposeRetrainAnnotationsWithLlm:e=>o(`pipeline-analytics`,`pipelineAnalytics`,`proposeRetrainAnnotationsWithLlm`,`mutation`,e),createRetrainCollection:e=>o(`pipeline-analytics`,`pipelineAnalytics`,`createRetrainCollection`,`mutation`,e),listRetrainCollections:e=>o(`pipeline-analytics`,`pipelineAnalytics`,`listRetrainCollections`,`query`,e),resolveRetrainTrainingCorpus:e=>o(`pipeline-analytics`,`pipelineAnalytics`,`resolveRetrainTrainingCorpus`,`query`,e),renameRetrainCollection:e=>o(`pipeline-analytics`,`pipelineAnalytics`,`renameRetrainCollection`,`mutation`,e),deleteRetrainCollection:e=>o(`pipeline-analytics`,`pipelineAnalytics`,`deleteRetrainCollection`,`mutation`,e),addRetrainFrameFromRecording:e=>o(`pipeline-analytics`,`pipelineAnalytics`,`addRetrainFrameFromRecording`,`mutation`,e),addRetrainFramesToCollection:e=>o(`pipeline-analytics`,`pipelineAnalytics`,`addRetrainFramesToCollection`,`mutation`,e),removeRetrainFrameFromCollection:e=>o(`pipeline-analytics`,`pipelineAnalytics`,`removeRetrainFrameFromCollection`,`mutation`,e),listRetrainCollectionFrames:e=>o(`pipeline-analytics`,`pipelineAnalytics`,`listRetrainCollectionFrames`,`query`,e),getEventMedia:e=>o(`pipeline-analytics`,`pipelineAnalytics`,`getEventMedia`,`query`,e),getTrackMedia:e=>o(`pipeline-analytics`,`pipelineAnalytics`,`getTrackMedia`,`query`,e),listTrackMedia:e=>o(`pipeline-analytics`,`pipelineAnalytics`,`listTrackMedia`,`query`,e),listEventMedia:e=>o(`pipeline-analytics`,`pipelineAnalytics`,`listEventMedia`,`query`,e),ownersWithMedia:e=>o(`pipeline-analytics`,`pipelineAnalytics`,`ownersWithMedia`,`query`,e),searchObjectEvents:e=>o(`pipeline-analytics`,`pipelineAnalytics`,`searchObjectEvents`,`query`,e),wipeObjectEmbeddings:e=>o(`pipeline-analytics`,`pipelineAnalytics`,`wipeObjectEmbeddings`,`mutation`,e),rebuildObjectEmbeddings:e=>o(`pipeline-analytics`,`pipelineAnalytics`,`rebuildObjectEmbeddings`,`mutation`,e),getObjectEmbeddingRebuildStatus:e=>o(`pipeline-analytics`,`pipelineAnalytics`,`getObjectEmbeddingRebuildStatus`,`query`,e),getDeviceSettingsContribution:e=>o(`pipeline-analytics`,`pipelineAnalytics`,`getDeviceSettingsContribution`,`query`,e),getDeviceLiveContribution:e=>o(`pipeline-analytics`,`pipelineAnalytics`,`getDeviceLiveContribution`,`query`,e),applyDeviceSettingsPatch:e=>o(`pipeline-analytics`,`pipelineAnalytics`,`applyDeviceSettingsPatch`,`mutation`,e)},Ge={getStatus:e=>o(`power-meter`,`powerMeter`,`getStatus`,`query`,e)},Ke={getStatus:e=>o(`presence`,`presence`,`getStatus`,`query`,e)},qe={getStatus:e=>o(`pressure-sensor`,`pressureSensor`,`getStatus`,`query`,e)},Je={getOptions:e=>o(`privacy-mask`,`privacyMask`,`getOptions`,`query`,e),setMask:e=>o(`privacy-mask`,`privacyMask`,`setMask`,`mutation`,e),setAudioEnabled:e=>o(`privacy-mask`,`privacyMask`,`setAudioEnabled`,`mutation`,e),getStatus:e=>o(`privacy-mask`,`privacyMask`,`getStatus`,`query`,e)},Ye={move:e=>o(`ptz`,`ptz`,`move`,`mutation`,e),continuousMove:e=>o(`ptz`,`ptz`,`continuousMove`,`mutation`,e),stop:e=>o(`ptz`,`ptz`,`stop`,`mutation`,e),getPresets:e=>o(`ptz`,`ptz`,`getPresets`,`query`,e),goToPreset:e=>o(`ptz`,`ptz`,`goToPreset`,`mutation`,e),savePreset:e=>o(`ptz`,`ptz`,`savePreset`,`mutation`,e),deletePreset:e=>o(`ptz`,`ptz`,`deletePreset`,`mutation`,e),getOptions:e=>o(`ptz`,`ptz`,`getOptions`,`query`,e),goHome:e=>o(`ptz`,`ptz`,`goHome`,`mutation`,e),getHomePreset:e=>o(`ptz`,`ptz`,`getHomePreset`,`query`,e),setHomePreset:e=>o(`ptz`,`ptz`,`setHomePreset`,`mutation`,e),captureHomeHere:e=>o(`ptz`,`ptz`,`captureHomeHere`,`mutation`,e),getHomeReturn:e=>o(`ptz`,`ptz`,`getHomeReturn`,`query`,e),setHomeReturn:e=>o(`ptz`,`ptz`,`setHomeReturn`,`mutation`,e),getPosition:e=>o(`ptz`,`ptz`,`getPosition`,`query`,e),setAutofocus:e=>o(`ptz`,`ptz`,`setAutofocus`,`mutation`,e),getStatus:e=>o(`ptz`,`ptz`,`getStatus`,`query`,e)},Xe={getStatus:e=>o(`ptz-autotrack`,`ptzAutotrack`,`getStatus`,`query`,e),setEnabled:e=>o(`ptz-autotrack`,`ptzAutotrack`,`setEnabled`,`mutation`,e),getSettings:e=>o(`ptz-autotrack`,`ptzAutotrack`,`getSettings`,`query`,e),setSettings:e=>o(`ptz-autotrack`,`ptzAutotrack`,`setSettings`,`mutation`,e)},Ze={reboot:e=>o(`reboot`,`reboot`,`reboot`,`mutation`,e)},Qe={listSources:e=>o(`recording`,`recording`,`listSources`,`query`,e),getAvailability:e=>o(`recording`,`recording`,`getAvailability`,`query`,e),getDaysWithRecordings:e=>o(`recording`,`recording`,`getDaysWithRecordings`,`query`,e),getPlayback:e=>o(`recording`,`recording`,`getPlayback`,`query`,e),getPlaybackOptions:e=>o(`recording`,`recording`,`getPlaybackOptions`,`query`,e)},$e={getOptions:e=>o(`recording-onboard`,`recordingOnboard`,`getOptions`,`query`,e),setSettings:e=>o(`recording-onboard`,`recordingOnboard`,`setSettings`,`mutation`,e),getStatus:e=>o(`recording-onboard`,`recordingOnboard`,`getStatus`,`query`,e)},et={getStatus:e=>o(`recording-signal`,`recordingSignal`,`getStatus`,`query`,e)},tt={getStatus:e=>o(`running-state`,`runningState`,`getStatus`,`query`,e)},nt={listScenes:e=>o(`scene-monitor`,`sceneMonitor`,`listScenes`,`query`,e),listScenesBatch:e=>o(`scene-monitor`,`sceneMonitor`,`listScenesBatch`,`query`,e),createScene:e=>o(`scene-monitor`,`sceneMonitor`,`createScene`,`mutation`,e),updateScene:e=>o(`scene-monitor`,`sceneMonitor`,`updateScene`,`mutation`,e),deleteScene:e=>o(`scene-monitor`,`sceneMonitor`,`deleteScene`,`mutation`,e),captureReference:e=>o(`scene-monitor`,`sceneMonitor`,`captureReference`,`mutation`,e),deleteReference:e=>o(`scene-monitor`,`sceneMonitor`,`deleteReference`,`mutation`,e),recheckNow:e=>o(`scene-monitor`,`sceneMonitor`,`recheckNow`,`mutation`,e),resetScene:e=>o(`scene-monitor`,`sceneMonitor`,`resetScene`,`mutation`,e),getStatus:e=>o(`scene-monitor`,`sceneMonitor`,`getStatus`,`query`,e)},rt={run:e=>o(`script-runner`,`scriptRunner`,`run`,`mutation`,e),stop:e=>o(`script-runner`,`scriptRunner`,`stop`,`mutation`,e),getStatus:e=>o(`script-runner`,`scriptRunner`,`getStatus`,`query`,e)},it={getStatus:e=>o(`smoke`,`smoke`,`getStatus`,`query`,e)},at={getSnapshot:e=>o(`snapshot`,`snapshot`,`getSnapshot`,`query`,e),invalidateCache:e=>o(`snapshot`,`snapshot`,`invalidateCache`,`mutation`,e),getSnapshotOverview:e=>o(`snapshot`,`snapshot`,`getSnapshotOverview`,`query`,e),getDebugState:e=>o(`snapshot`,`snapshot`,`getDebugState`,`query`,e),getSnapshotLinks:e=>o(`snapshot`,`snapshot`,`getSnapshotLinks`,`query`,e),getStatus:e=>o(`snapshot`,`snapshot`,`getStatus`,`query`,e),getDeviceSettingsContribution:e=>o(`snapshot`,`snapshot`,`getDeviceSettingsContribution`,`query`,e),getDeviceLiveContribution:e=>o(`snapshot`,`snapshot`,`getDeviceLiveContribution`,`query`,e),applyDeviceSettingsPatch:e=>o(`snapshot`,`snapshot`,`applyDeviceSettingsPatch`,`mutation`,e)},ot={getCatalog:e=>o(`stream-catalog`,`streamCatalog`,`getCatalog`,`query`,e)},st={getOptions:e=>o(`stream-params`,`streamParams`,`getOptions`,`query`,e),setProfile:e=>o(`stream-params`,`streamParams`,`setProfile`,`mutation`,e),getConfigSchema:e=>o(`stream-params`,`streamParams`,`getConfigSchema`,`query`,e),getStatus:e=>o(`stream-params`,`streamParams`,`getStatus`,`query`,e)},ct={listSignals:e=>o(`stream-signals`,`streamSignals`,`listSignals`,`query`,e)},lt={setState:e=>o(`switch`,`switch`,`setState`,`mutation`,e),getStatus:e=>o(`switch`,`switch`,`getStatus`,`query`,e)},ut={getStatus:e=>o(`tamper`,`tamper`,`getStatus`,`query`,e)},dt={getStatus:e=>o(`temperature-sensor`,`temperatureSensor`,`getStatus`,`query`,e)},ft={installUpdate:e=>o(`update`,`update`,`installUpdate`,`mutation`,e),getStatus:e=>o(`update`,`update`,`getStatus`,`query`,e)},pt={start:e=>o(`vacuum-control`,`vacuumControl`,`start`,`mutation`,e),pause:e=>o(`vacuum-control`,`vacuumControl`,`pause`,`mutation`,e),stop:e=>o(`vacuum-control`,`vacuumControl`,`stop`,`mutation`,e),returnToBase:e=>o(`vacuum-control`,`vacuumControl`,`returnToBase`,`mutation`,e),locate:e=>o(`vacuum-control`,`vacuumControl`,`locate`,`mutation`,e),setFanSpeed:e=>o(`vacuum-control`,`vacuumControl`,`setFanSpeed`,`mutation`,e),getStatus:e=>o(`vacuum-control`,`vacuumControl`,`getStatus`,`query`,e)},mt={open:e=>o(`valve`,`valve`,`open`,`mutation`,e),close:e=>o(`valve`,`valve`,`close`,`mutation`,e),stop:e=>o(`valve`,`valve`,`stop`,`mutation`,e),setPosition:e=>o(`valve`,`valve`,`setPosition`,`mutation`,e),getStatus:e=>o(`valve`,`valve`,`getStatus`,`query`,e)},ht={getStatus:e=>o(`vibration`,`vibration`,`getStatus`,`query`,e)},gt={listClips:e=>o(`videoclips`,`videoclips`,`listClips`,`query`,e),listSources:e=>o(`videoclips`,`videoclips`,`listSources`,`query`,e),getClipPlayback:e=>o(`videoclips`,`videoclips`,`getClipPlayback`,`query`,e),readClipBytes:e=>o(`videoclips`,`videoclips`,`readClipBytes`,`query`,e),offerClipBytes:e=>o(`videoclips`,`videoclips`,`offerClipBytes`,`query`,e),dialClipStream:e=>o(`videoclips`,`videoclips`,`dialClipStream`,`query`,e),getPlaybackOptions:e=>o(`videoclips`,`videoclips`,`getPlaybackOptions`,`query`,e)},_t={setTargetTemp:e=>o(`water-heater`,`waterHeater`,`setTargetTemp`,`mutation`,e),setOperationMode:e=>o(`water-heater`,`waterHeater`,`setOperationMode`,`mutation`,e),setAway:e=>o(`water-heater`,`waterHeater`,`setAway`,`mutation`,e),getStatus:e=>o(`water-heater`,`waterHeater`,`getStatus`,`query`,e)},vt={getStatus:e=>o(`weather`,`weather`,`getStatus`,`query`,e)},yt={listStreams:e=>o(`webrtc-session`,`webrtcSession`,`listStreams`,`query`,e),createSession:e=>o(`webrtc-session`,`webrtcSession`,`createSession`,`mutation`,e),handleOffer:e=>o(`webrtc-session`,`webrtcSession`,`handleOffer`,`mutation`,e),handleAnswer:e=>o(`webrtc-session`,`webrtcSession`,`handleAnswer`,`mutation`,e),addIceCandidate:e=>o(`webrtc-session`,`webrtcSession`,`addIceCandidate`,`mutation`,e),getIceCandidates:e=>o(`webrtc-session`,`webrtcSession`,`getIceCandidates`,`query`,e),closeSession:e=>o(`webrtc-session`,`webrtcSession`,`closeSession`,`mutation`,e),hasAdaptiveBitrate:e=>o(`webrtc-session`,`webrtcSession`,`hasAdaptiveBitrate`,`query`,e),getSessionState:e=>o(`webrtc-session`,`webrtcSession`,`getSessionState`,`query`,e),applyDownlinkProbe:e=>o(`webrtc-session`,`webrtcSession`,`applyDownlinkProbe`,`mutation`,e),getSessionDebug:e=>o(`webrtc-session`,`webrtcSession`,`getSessionDebug`,`query`,e)},bt={getCurrentSnapshot:e=>o(`zone-analytics`,`zoneAnalytics`,`getCurrentSnapshot`,`query`,e),getCurrentSnapshotBatch:e=>o(`zone-analytics`,`zoneAnalytics`,`getCurrentSnapshotBatch`,`query`,e),getZoneHistory:e=>o(`zone-analytics`,`zoneAnalytics`,`getZoneHistory`,`query`,e),getCameraHistory:e=>o(`zone-analytics`,`zoneAnalytics`,`getCameraHistory`,`query`,e),getUnzonedHistory:e=>o(`zone-analytics`,`zoneAnalytics`,`getUnzonedHistory`,`query`,e)},xt={listRules:e=>o(`zone-rules`,`zoneRules`,`listRules`,`query`,e),setRules:e=>o(`zone-rules`,`zoneRules`,`setRules`,`mutation`,e)},St={listZones:e=>o(`zones`,`zones`,`listZones`,`query`,e),addZone:e=>o(`zones`,`zones`,`addZone`,`mutation`,e),removeZone:e=>o(`zones`,`zones`,`removeZone`,`mutation`,e),updateZone:e=>o(`zones`,`zones`,`updateZone`,`mutation`,e)},Ct={get:e=>s(`actions`,`get`,`query`,e),run:e=>s(`actions`,`run`,`mutation`,e),listForCamera:e=>s(`actions`,`listForCamera`,`query`,e),getLinks:e=>s(`actions`,`getLinks`,`query`,e)},wt={getDeviceSettings:e=>s(`addonSettings`,`getDeviceSettings`,`query`,e),updateDeviceSettings:e=>s(`addonSettings`,`updateDeviceSettings`,`mutation`,e)},Tt={detachDevice:e=>s(`audioAnalyzer`,`detachDevice`,`mutation`,e)},Et={getStatus:e=>s(`deviceAdoption`,`getStatus`,`query`,e)},Dt={getDeviceSettingsContribution:e=>s(`deviceExport`,`getDeviceSettingsContribution`,`query`,e),getDeviceLiveContribution:e=>s(`deviceExport`,`getDeviceLiveContribution`,`query`,e),applyDeviceSettingsPatch:e=>s(`deviceExport`,`applyDeviceSettingsPatch`,`mutation`,e)},Ot={listSeries:e=>s(`deviceHistory`,`listSeries`,`query`,e),query:e=>s(`deviceHistory`,`query`,`query`,e),getDeviceEnabled:e=>s(`deviceHistory`,`getDeviceEnabled`,`query`,e),setDeviceEnabled:e=>s(`deviceHistory`,`setDeviceEnabled`,`mutation`,e)},kt={loadConfig:e=>s(`deviceManager`,`loadConfig`,`query`,e),loadRuntimeState:e=>s(`deviceManager`,`loadRuntimeState`,`query`,e),loadMeta:e=>s(`deviceManager`,`loadMeta`,`query`,e),setName:e=>s(`deviceManager`,`setName`,`mutation`,e),setLocation:e=>s(`deviceManager`,`setLocation`,`mutation`,e),setType:e=>s(`deviceManager`,`setType`,`mutation`,e),setIntegrationId:e=>s(`deviceManager`,`setIntegrationId`,`mutation`,e),setLinkDeviceId:e=>s(`deviceManager`,`setLinkDeviceId`,`mutation`,e),setPrimaryChildEntityId:e=>s(`deviceManager`,`setPrimaryChildEntityId`,`mutation`,e),setChildLayout:e=>s(`deviceManager`,`setChildLayout`,`mutation`,e),setDisplay:e=>s(`deviceManager`,`setDisplay`,`mutation`,e),getWireableFields:e=>s(`deviceManager`,`getWireableFields`,`query`,e),setRole:e=>s(`deviceManager`,`setRole`,`mutation`,e),applyInitialMeta:e=>s(`deviceManager`,`applyInitialMeta`,`mutation`,e),setMetadata:e=>s(`deviceManager`,`setMetadata`,`mutation`,e),setDisabled:e=>s(`deviceManager`,`setDisabled`,`mutation`,e),getDevice:e=>s(`deviceManager`,`getDevice`,`query`,e),getLinkedDevices:e=>s(`deviceManager`,`getLinkedDevices`,`query`,e),getStreamSources:e=>s(`deviceManager`,`getStreamSources`,`query`,e),getConfigSchema:e=>s(`deviceManager`,`getConfigSchema`,`query`,e),getSettingsSchema:e=>s(`deviceManager`,`getSettingsSchema`,`query`,e),updateConfig:e=>s(`deviceManager`,`updateConfig`,`mutation`,e),enable:e=>s(`deviceManager`,`enable`,`mutation`,e),disable:e=>s(`deviceManager`,`disable`,`mutation`,e),remove:e=>s(`deviceManager`,`remove`,`mutation`,e),getStreamProfileMap:e=>s(`deviceManager`,`getStreamProfileMap`,`query`,e),setStreamProfileMap:e=>s(`deviceManager`,`setStreamProfileMap`,`mutation`,e),probeStreams:e=>s(`deviceManager`,`probeStreams`,`mutation`,e),getBindings:e=>s(`deviceManager`,`getBindings`,`query`,e),setWrapperActive:e=>s(`deviceManager`,`setWrapperActive`,`mutation`,e),getWrapperActivation:e=>s(`deviceManager`,`getWrapperActivation`,`query`,e),getDeviceSettingsAggregate:e=>s(`deviceManager`,`getDeviceSettingsAggregate`,`query`,e),getDeviceLiveInfoAggregate:e=>s(`deviceManager`,`getDeviceLiveInfoAggregate`,`query`,e),getDeviceAggregate:e=>s(`deviceManager`,`getDeviceAggregate`,`query`,e),runDeviceAction:e=>s(`deviceManager`,`runDeviceAction`,`mutation`,e),updateDeviceField:e=>s(`deviceManager`,`updateDeviceField`,`mutation`,e),updateDeviceFieldsBatch:e=>s(`deviceManager`,`updateDeviceFieldsBatch`,`mutation`,e),testField:e=>s(`deviceManager`,`testField`,`mutation`,e),getDeviceStatusAggregate:e=>s(`deviceManager`,`getDeviceStatusAggregate`,`query`,e)},At={getSnapshot:e=>s(`deviceState`,`getSnapshot`,`query`,e),getCapSlice:e=>s(`deviceState`,`getCapSlice`,`query`,e),setCapSlice:e=>s(`deviceState`,`setCapSlice`,`mutation`,e),claimFields:e=>s(`deviceState`,`claimFields`,`mutation`,e),patchOwnedFields:e=>s(`deviceState`,`patchOwnedFields`,`mutation`,e),releaseClaim:e=>s(`deviceState`,`releaseClaim`,`mutation`,e),getNativeCapSlice:e=>s(`deviceState`,`getNativeCapSlice`,`query`,e)},jt={listRecentFaces:e=>s(`faceGallery`,`listRecentFaces`,`query`,e),getFaceByTrack:e=>s(`faceGallery`,`getFaceByTrack`,`query`,e)},Mt={getDeviceStats:e=>s(`networkQuality`,`getDeviceStats`,`query`,e),reportClientStats:e=>s(`networkQuality`,`reportClientStats`,`mutation`,e)},Nt={setDeviceMuted:e=>s(`notificationRules`,`setDeviceMuted`,`mutation`,e)},Pt={getDeviceOsd:e=>s(`osdManager`,`getDeviceOsd`,`query`,e),getSourceCatalog:e=>s(`osdManager`,`getSourceCatalog`,`query`,e),setSlotBinding:e=>s(`osdManager`,`setSlotBinding`,`mutation`,e),clearSlotBinding:e=>s(`osdManager`,`clearSlotBinding`,`mutation`,e),setSlotCameraEnabled:e=>s(`osdManager`,`setSlotCameraEnabled`,`mutation`,e),previewSlot:e=>s(`osdManager`,`previewSlot`,`mutation`,e),renderDevice:e=>s(`osdManager`,`renderDevice`,`mutation`,e)},Ft={runPipeline:e=>s(`pipelineExecutor`,`runPipeline`,`mutation`,e),runPipelineBatch:e=>s(`pipelineExecutor`,`runPipelineBatch`,`mutation`,e)},It={assignPipeline:e=>s(`pipelineOrchestrator`,`assignPipeline`,`mutation`,e),unassignPipeline:e=>s(`pipelineOrchestrator`,`unassignPipeline`,`mutation`,e),setPipelineDevicePin:e=>s(`pipelineOrchestrator`,`setPipelineDevicePin`,`mutation`,e),getPipelineDevicePin:e=>s(`pipelineOrchestrator`,`getPipelineDevicePin`,`query`,e),getPipelineAssignment:e=>s(`pipelineOrchestrator`,`getPipelineAssignment`,`query`,e),getCameraMetrics:e=>s(`pipelineOrchestrator`,`getCameraMetrics`,`query`,e),assignAudio:e=>s(`pipelineOrchestrator`,`assignAudio`,`mutation`,e),unassignAudio:e=>s(`pipelineOrchestrator`,`unassignAudio`,`mutation`,e),getAudioAssignment:e=>s(`pipelineOrchestrator`,`getAudioAssignment`,`query`,e),getCameraSettings:e=>s(`pipelineOrchestrator`,`getCameraSettings`,`query`,e),setCameraStepToggle:e=>s(`pipelineOrchestrator`,`setCameraStepToggle`,`mutation`,e),getCameraDetectionSource:e=>s(`pipelineOrchestrator`,`getCameraDetectionSource`,`query`,e),setCameraDetectionSource:e=>s(`pipelineOrchestrator`,`setCameraDetectionSource`,`mutation`,e),setCameraStepSettings:e=>s(`pipelineOrchestrator`,`setCameraStepSettings`,`mutation`,e),resolvePipeline:e=>s(`pipelineOrchestrator`,`resolvePipeline`,`query`,e),getCameraSwitches:e=>s(`pipelineOrchestrator`,`getCameraSwitches`,`query`,e),setCameraSwitch:e=>s(`pipelineOrchestrator`,`setCameraSwitch`,`mutation`,e),getCameraStatus:e=>s(`pipelineOrchestrator`,`getCameraStatus`,`query`,e),getDeviceSettingsContribution:e=>s(`pipelineOrchestrator`,`getDeviceSettingsContribution`,`query`,e),getDeviceLiveContribution:e=>s(`pipelineOrchestrator`,`getDeviceLiveContribution`,`query`,e),applyDeviceSettingsPatch:e=>s(`pipelineOrchestrator`,`applyDeviceSettingsPatch`,`mutation`,e)},Lt={detachCamera:e=>s(`pipelineRunner`,`detachCamera`,`mutation`,e),getCameraMetrics:e=>s(`pipelineRunner`,`getCameraMetrics`,`query`,e),requestOccupancyBurst:e=>s(`pipelineRunner`,`requestOccupancyBurst`,`mutation`,e),runDetailSubtree:e=>s(`pipelineRunner`,`runDetailSubtree`,`mutation`,e),parkTrackFrame:e=>s(`pipelineRunner`,`parkTrackFrame`,`mutation`,e),getParkedTrackFrame:e=>s(`pipelineRunner`,`getParkedTrackFrame`,`query`,e),releaseParkedTrackFrames:e=>s(`pipelineRunner`,`releaseParkedTrackFrames`,`mutation`,e)},Rt={listPlates:e=>s(`plateGallery`,`listPlates`,`query`,e),getPlateByTrack:e=>s(`plateGallery`,`getPlateByTrack`,`query`,e)},zt={getDeviceConfig:e=>s(`recordingArchive`,`getDeviceConfig`,`query`,e),locateSegment:e=>s(`recordingArchive`,`locateSegment`,`query`,e),readSegmentBytes:e=>s(`recordingArchive`,`readSegmentBytes`,`query`,e),readGopBytes:e=>s(`recordingArchive`,`readGopBytes`,`query`,e),readWindowBytes:e=>s(`recordingArchive`,`readWindowBytes`,`query`,e),setDeviceConfig:e=>s(`recordingArchive`,`setDeviceConfig`,`mutation`,e),rescanStorage:e=>s(`recordingArchive`,`rescanStorage`,`mutation`,e),pruneFootage:e=>s(`recordingArchive`,`pruneFootage`,`mutation`,e),deleteFootprint:e=>s(`recordingArchive`,`deleteFootprint`,`mutation`,e),renderGif:e=>s(`recordingArchive`,`renderGif`,`mutation`,e),renderClip:e=>s(`recordingArchive`,`renderClip`,`mutation`,e),getStatus:e=>s(`recordingArchive`,`getStatus`,`query`,e),getDeviceSettingsContribution:e=>s(`recordingArchive`,`getDeviceSettingsContribution`,`query`,e),getDeviceLiveContribution:e=>s(`recordingArchive`,`getDeviceLiveContribution`,`query`,e),applyDeviceSettingsPatch:e=>s(`recordingArchive`,`applyDeviceSettingsPatch`,`mutation`,e)},Bt={listExports:e=>s(`recordingExport`,`listExports`,`query`,e)},Vt={reportStreamSignal:e=>s(`streamBroker`,`reportStreamSignal`,`mutation`,e),publishCameraStream:e=>s(`streamBroker`,`publishCameraStream`,`mutation`,e),retractCameraStream:e=>s(`streamBroker`,`retractCameraStream`,`mutation`,e),assignProfile:e=>s(`streamBroker`,`assignProfile`,`mutation`,e),unassignProfile:e=>s(`streamBroker`,`unassignProfile`,`mutation`,e),forgetDeviceHardware:e=>s(`streamBroker`,`forgetDeviceHardware`,`mutation`,e),renderPreBufferClip:e=>s(`streamBroker`,`renderPreBufferClip`,`mutation`,e),produceEventMedia:e=>s(`streamBroker`,`produceEventMedia`,`mutation`,e),restartProfile:e=>s(`streamBroker`,`restartProfile`,`mutation`,e),getDeviceAudioMute:e=>s(`streamBroker`,`getDeviceAudioMute`,`query`,e),setDeviceAudioMute:e=>s(`streamBroker`,`setDeviceAudioMute`,`mutation`,e),getDeviceSettingsContribution:e=>s(`streamBroker`,`getDeviceSettingsContribution`,`query`,e),getDeviceLiveContribution:e=>s(`streamBroker`,`getDeviceLiveContribution`,`query`,e),applyDeviceSettingsPatch:e=>s(`streamBroker`,`applyDeviceSettingsPatch`,`mutation`,e)};return{deviceId:t.deviceId,binding:t,state:{airQualitySensor:N(r,t.deviceId,`air-quality-sensor`),alarmPanel:N(r,t.deviceId,`alarm-panel`),ambientLightSensor:N(r,t.deviceId,`ambient-light-sensor`),audioMetrics:N(r,t.deviceId,`audio-metrics`),automationControl:N(r,t.deviceId,`automation-control`),battery:N(r,t.deviceId,`battery`),binary:N(r,t.deviceId,`binary`),brightness:N(r,t.deviceId,`brightness`),cameraStreams:N(r,t.deviceId,`camera-streams`),carbonMonoxide:N(r,t.deviceId,`carbon-monoxide`),climateControl:N(r,t.deviceId,`climate-control`),color:N(r,t.deviceId,`color`),connectivity:N(r,t.deviceId,`connectivity`),consumables:N(r,t.deviceId,`consumables`),contact:N(r,t.deviceId,`contact`),control:N(r,t.deviceId,`control`),cover:N(r,t.deviceId,`cover`),dayNight:N(r,t.deviceId,`day-night`),deviceDiscovery:N(r,t.deviceId,`device-discovery`),deviceStatus:N(r,t.deviceId,`device-status`),dishwasher:N(r,t.deviceId,`dishwasher`),doorbell:N(r,t.deviceId,`doorbell`),enumSensor:N(r,t.deviceId,`enum-sensor`),eventEmitter:N(r,t.deviceId,`event-emitter`),fanControl:N(r,t.deviceId,`fan-control`),featureProbe:N(r,t.deviceId,`feature-probe`),flood:N(r,t.deviceId,`flood`),gas:N(r,t.deviceId,`gas`),groupActive:N(r,t.deviceId,`group-active`),groupCommands:N(r,t.deviceId,`group-commands`),groupStatus:N(r,t.deviceId,`group-status`),heatingValve:N(r,t.deviceId,`heating-valve`),humidifier:N(r,t.deviceId,`humidifier`),humiditySensor:N(r,t.deviceId,`humidity-sensor`),image:N(r,t.deviceId,`image`),imageSettings:N(r,t.deviceId,`image-settings`),intercom:N(r,t.deviceId,`intercom`),lawnMowerControl:N(r,t.deviceId,`lawn-mower-control`),lockControl:N(r,t.deviceId,`lock-control`),mediaPlayer:N(r,t.deviceId,`media-player`),meter:N(r,t.deviceId,`meter`),motion:N(r,t.deviceId,`motion`),motionTrigger:N(r,t.deviceId,`motion-trigger`),motionZones:N(r,t.deviceId,`motion-zones`),nativeObjectDetection:N(r,t.deviceId,`native-object-detection`),navigation:N(r,t.deviceId,`navigation`),networkLink:N(r,t.deviceId,`network-link`),notifier:N(r,t.deviceId,`notifier`),numericSensor:N(r,t.deviceId,`numeric-sensor`),petFeeder:N(r,t.deviceId,`pet-feeder`),powerMeter:N(r,t.deviceId,`power-meter`),presence:N(r,t.deviceId,`presence`),pressureSensor:N(r,t.deviceId,`pressure-sensor`),privacyMask:N(r,t.deviceId,`privacy-mask`),ptzAutotrack:N(r,t.deviceId,`ptz-autotrack`),recordingOnboard:N(r,t.deviceId,`recording-onboard`),recordingSignal:N(r,t.deviceId,`recording-signal`),runningState:N(r,t.deviceId,`running-state`),sceneMonitor:N(r,t.deviceId,`scene-monitor`),scriptRunner:N(r,t.deviceId,`script-runner`),smoke:N(r,t.deviceId,`smoke`),streamCatalog:N(r,t.deviceId,`stream-catalog`),streamParams:N(r,t.deviceId,`stream-params`),streamSignals:N(r,t.deviceId,`stream-signals`),switch:N(r,t.deviceId,`switch`),tamper:N(r,t.deviceId,`tamper`),temperatureSensor:N(r,t.deviceId,`temperature-sensor`),update:N(r,t.deviceId,`update`),vacuumControl:N(r,t.deviceId,`vacuum-control`),valve:N(r,t.deviceId,`valve`),vibration:N(r,t.deviceId,`vibration`),waterHeater:N(r,t.deviceId,`water-heater`),weather:N(r,t.deviceId,`weather`),zoneAnalytics:N(r,t.deviceId,`zone-analytics`),zoneRules:N(r,t.deviceId,`zone-rules`),zones:N(r,t.deviceId,`zones`)},...c(`accessories`)?{accessories:l}:{},...c(`air-quality-sensor`)?{airQualitySensor:u}:{},...c(`alarm-panel`)?{alarmPanel:d}:{},...c(`ambient-light-sensor`)?{ambientLightSensor:f}:{},...c(`audio-analysis`)?{audioAnalysis:p}:{},...c(`audio-metrics`)?{audioMetrics:m}:{},...c(`automation-control`)?{automationControl:h}:{},...c(`battery`)?{battery:g}:{},...c(`binary`)?{binary:_}:{},...c(`brightness`)?{brightness:v}:{},...c(`button`)?{button:ee}:{},...c(`camera-credentials`)?{cameraCredentials:te}:{},...c(`camera-grid-layout`)?{cameraGridLayout:ne}:{},...c(`camera-pipeline-config`)?{cameraPipelineConfig:y}:{},...c(`camera-streams`)?{cameraStreams:b}:{},...c(`carbon-monoxide`)?{carbonMonoxide:re}:{},...c(`climate-control`)?{climateControl:x}:{},...c(`color`)?{color:ie}:{},...c(`connectivity`)?{connectivity:ae}:{},...c(`consumables`)?{consumables:S}:{},...c(`contact`)?{contact:oe}:{},...c(`control`)?{control:se}:{},...c(`cover`)?{cover:C}:{},...c(`day-night`)?{dayNight:ce}:{},...c(`detection-pipeline`)?{detectionPipeline:le}:{},...c(`device-admin-link`)?{deviceAdminLink:ue}:{},...c(`device-discovery`)?{deviceDiscovery:de}:{},...c(`device-extension`)?{deviceExtension:w}:{},...c(`device-ops`)?{deviceOps:fe}:{},...c(`device-status`)?{deviceStatus:pe}:{},...c(`dishwasher`)?{dishwasher:T}:{},...c(`doorbell`)?{doorbell:E}:{},...c(`enum-sensor`)?{enumSensor:me}:{},...c(`event-emitter`)?{eventEmitter:he}:{},...c(`fan-control`)?{fanControl:ge}:{},...c(`feature-probe`)?{featureProbe:_e}:{},...c(`flood`)?{flood:ve}:{},...c(`gas`)?{gas:ye}:{},...c(`group-active`)?{groupActive:be}:{},...c(`group-commands`)?{groupCommands:xe}:{},...c(`group-status`)?{groupStatus:Se}:{},...c(`heating-valve`)?{heatingValve:Ce}:{},...c(`humidifier`)?{humidifier:we}:{},...c(`humidity-sensor`)?{humiditySensor:Te}:{},...c(`image`)?{image:Ee}:{},...c(`image-settings`)?{imageSettings:De}:{},...c(`intercom`)?{intercom:Oe}:{},...c(`lawn-mower-control`)?{lawnMowerControl:ke}:{},...c(`lock-control`)?{lockControl:Ae}:{},...c(`media-player`)?{mediaPlayer:je}:{},...c(`meter`)?{meter:Me}:{},...c(`motion`)?{motion:Ne}:{},...c(`motion-detection`)?{motionDetection:Pe}:{},...c(`motion-trigger`)?{motionTrigger:Fe}:{},...c(`motion-zones`)?{motionZones:Ie}:{},...c(`native-object-detection`)?{nativeObjectDetection:Le}:{},...c(`navigation`)?{navigation:Re}:{},...c(`network-link`)?{networkLink:ze}:{},...c(`notifier`)?{notifier:Be}:{},...c(`numeric-sensor`)?{numericSensor:Ve}:{},...c(`osd`)?{osd:He}:{},...c(`pet-feeder`)?{petFeeder:Ue}:{},...c(`pipeline-analytics`)?{pipelineAnalytics:We}:{},...c(`power-meter`)?{powerMeter:Ge}:{},...c(`presence`)?{presence:Ke}:{},...c(`pressure-sensor`)?{pressureSensor:qe}:{},...c(`privacy-mask`)?{privacyMask:Je}:{},...c(`ptz`)?{ptz:Ye}:{},...c(`ptz-autotrack`)?{ptzAutotrack:Xe}:{},...c(`reboot`)?{reboot:Ze}:{},...c(`recording`)?{recording:Qe}:{},...c(`recording-onboard`)?{recordingOnboard:$e}:{},...c(`recording-signal`)?{recordingSignal:et}:{},...c(`running-state`)?{runningState:tt}:{},...c(`scene-monitor`)?{sceneMonitor:nt}:{},...c(`script-runner`)?{scriptRunner:rt}:{},...c(`smoke`)?{smoke:it}:{},...c(`snapshot`)?{snapshot:at}:{},...c(`stream-catalog`)?{streamCatalog:ot}:{},...c(`stream-params`)?{streamParams:st}:{},...c(`stream-signals`)?{streamSignals:ct}:{},...c(`switch`)?{switch:lt}:{},...c(`tamper`)?{tamper:ut}:{},...c(`temperature-sensor`)?{temperatureSensor:dt}:{},...c(`update`)?{update:ft}:{},...c(`vacuum-control`)?{vacuumControl:pt}:{},...c(`valve`)?{valve:mt}:{},...c(`vibration`)?{vibration:ht}:{},...c(`videoclips`)?{videoclips:gt}:{},...c(`water-heater`)?{waterHeater:_t}:{},...c(`weather`)?{weather:vt}:{},...c(`webrtc-session`)?{webrtcSession:yt}:{},...c(`zone-analytics`)?{zoneAnalytics:bt}:{},...c(`zone-rules`)?{zoneRules:xt}:{},...c(`zones`)?{zones:St}:{},actions:Ct,addonSettings:wt,audioAnalyzer:Tt,deviceAdoption:Et,deviceExport:Dt,deviceHistory:Ot,deviceManager:kt,deviceState:At,faceGallery:jt,networkQuality:Mt,notificationRules:Nt,osdManager:Pt,pipelineExecutor:Ft,pipelineOrchestrator:It,pipelineRunner:Lt,plateGallery:Rt,recordingArchive:zt,recordingExport:Bt,streamBroker:Vt}}var ja=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.dishwasher.doorbell.enum-sensor.event-emitter.fan-control.feature-probe.flood.gas.group-active.group-commands.group-status.heating-valve.humidifier.humidity-sensor.image.image-settings.intercom.lawn-mower-control.lock-control.media-player.meter.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.running-state.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 Ma(e){return ja.has(e)}var Na=l().regex(/^[a-z][a-z0-9-]*(\.[a-z0-9-]+)+$/),Pa=d({code:Na,params:x(l(),f([l(),i()])).optional()}),Fa=class extends Error{i18nCode;i18nParams;constructor(e,t,n){super(n),this.name=`CamstackError`,this.i18nCode=e,this.i18nParams=t}};function Ia(e,t,n){return new Fa(e,t,n)}function La(e){let t=e;for(let e=0;e<8;e++){if(typeof t!=`object`||!t)return null;let e=Reflect.get(t,`i18nCode`);if(typeof e==`string`){let n=Pa.safeParse({code:e,params:Reflect.get(t,`i18nParams`)});return n.success?n.data:null}let n=Reflect.get(t,`cause`);if(n===t)return null;t=n}return null}var Ra=[15e3,6e4,5*6e4,15*6e4,30*6e4,60*6e4,90*6e4];function za(e,t){return`https://huggingface.co/${e}/resolve/main/${t}`}function Ba(e){return JSON.parse(e)}function Va(e){return typeof e!=`object`||!e||Array.isArray(e)?null:{...e}}function lte(e){return Array.isArray(e)?e:[]}function ute(e,t=``){return typeof e==`string`?e:t}function dte(e,t=0){return typeof e==`number`?e:t}function fte(e,t=!1){return typeof e==`boolean`?e:t}function pte(e){try{return Va(Ba(e))}catch{return null}}function mte(e){try{let t=Ba(e);return Array.isArray(t)?t:null}catch{return null}}var hte=[/^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,/^bridge$/i,/^code$/i,/^state$/i,/^challenge$/i,/^code[_-]?challenge$/i,/^confirm$/i,/^link$/i];function gte(e){return hte.some(t=>t.test(e))}function Ha(e){if(e.startsWith(`/`)&&!e.startsWith(`//`)){let t=Ha(`http://relative.invalid${e}`);return t.startsWith(`http://relative.invalid`)?t.slice(23):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()))gte(e)&&(t.searchParams.set(e,`***`),n=!0);return n?t.toString():e}catch{return e}}function Ua(e){return new Promise(t=>setTimeout(t,Math.max(0,e)))}function Wa(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})})}var P=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.Dishwasher=`dishwasher`,e.Washer=`washer`,e.Dryer=`dryer`,e}({}),Ga=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}({}),Ka=function(e){return e.ChargingDC=`charging-dc`,e.ChargingSolar=`charging-solar`,e.NotCharging=`not-charging`,e}({}),F=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.CoverBlind=`cover-blind`,e.CoverShutter=`cover-shutter`,e.CoverAwning=`cover-awning`,e.CoverCurtain=`cover-curtain`,e.CoverGarage=`cover-garage`,e.CoverGate=`cover-gate`,e.CoverDoor=`cover-door`,e.CoverWindow=`cover-window`,e.BinaryHelper=`binary-helper`,e.Outlet=`outlet`,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}({});function qa(e){return e instanceof Error?e.message:typeof e==`string`?e:String(e)}var _te=ue(),vte={opus:`libopus`,aac:`aac`,pcmu:`pcm_mulaw`,pcma:`pcm_alaw`},Ja={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 Ya(e){return[`-hide_banner`,`-loglevel`,e]}function Xa(e){return!e||e===`none`||e===`copy`}function Za(e,t){let n=[];if(Xa(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 Qa(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 yte(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 bte(e,t){return e===void 0||!Xa(t)?``:`format=nv12,hwupload`}function xte(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 $a(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?``:bte(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=[...yte(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(...xte(e)),e.bitstreamFilter!==void 0&&a.push(`-bsf:v`,e.bitstreamFilter),a}function eo(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`,vte[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 to(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 no(e){return e.kind===`stdout`&&(e.container===`h264`||e.container===`hevc`)}var Ste=`+frag_keyframe+empty_moov+default_base_moof`;function Cte(e){return e.kind===`rtsp-listen`?[`-f`,`rtsp`,`-rtsp_transport`,`tcp`,`-rtsp_flags`,`listen`,e.url]:e.kind===`rtp-outputs`?[]:e.container===`mp4`?Tte(e):[`-f`,e.container,`pipe:1`]}var wte=.9;function Tte(e){return[`-movflags`,Ste,`-min_frag_duration`,String(Math.max(0,Math.round(e.fragmentMs*wte*1e3))),`-f`,`mp4`,`pipe:1`]}function Ete(e){return[`-map`,`0:a:0?`,...eo(e.codec===`pcma`?{kind:`encode`,codec:`pcma`,sampleRateHz:8e3,channels:1}:Ja[e.codec]),...to({url:e.rtpUrl,sdpFile:e.sdpFile})]}function ro(e){return e.hwEncodeDevice===void 0?void 0:{device:e.hwEncodeDevice,decodeHwAccel:e.decodeHwAccel}}function Dte(e){let t=e.filterGraph??null,n=[...Ya(e.logLevel),...e.hwEncodeDevice===void 0?[]:[`-vaapi_device`,e.hwEncodeDevice.renderNode],...Za(e.input,e.decodeHwAccel),...(e.extraInputs??[]).flatMap(t=>Za(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=Qa(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`,...$a(e.video,e.outputArgs,t,ro(e)),...r,...e.outputArgs,...to(e.sink.video)]:[],o=e.sink.audio?[`-vn`,`-map`,i.audio??`0:a:0?`,...eo(e.audio),...to(e.sink.audio)]:[];return[...n,...a,...o]}let s=no(e.sink)||e.audio.kind===`none`,c=no(e.sink)?[`-an`]:eo(e.audio);return[...n,...a,...$a(e.video,e.outputArgs,t,ro(e)),...r,...s?[]:o,...c,...e.outputArgs,...Cte(e.sink),...e.audioSidecar?Ete(e.audioSidecar):[]]}var Ote={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 io(e,t,n){let r=e===`h264`?`libx264`:`libx265`;if(!n||t===null||Xa(t)||t===`auto`)return r;let i=Ote[t.toLowerCase()];return i?e===`h264`?i.h264:i.h265:r}function ao(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 kte(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:io(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:ao(e.profile.audio),threadCount:e.threadCount??0,outputArgs:e.profile.outputArgs??[],sink:e.sink,...e.audioSidecar===void 0?{}:{audioSidecar:e.audioSidecar}}}var oo=16*1024*1024,so=8,co=16,lo=class{maxUnitBytes;buffer=new Uint8Array;unitStart=0;cursor=0;state=`init`;nextSequence=0;faultReason=null;interstitial=new Set;constructor(e={}){this.maxUnitBytes=e.maxUnitBytes??oo}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<so)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<co)return null;let n=t.getBigUint64(this.cursor+so);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<so?(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 uo(e){let t=JSON.stringify(e,fo);return(0,_te.createHash)(`sha256`).update(t??``).digest(`hex`)}function fo(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}var po=`8.1.2-5`,mo=`https://github.com/jellyfin/jellyfin-ffmpeg/releases/download/v${po}`;function ho(e){return`${mo}/jellyfin-ffmpeg_${po}_portable_${e}-gpl.tar.xz`}ho(`linux64`),ho(`linuxarm64`),ho(`macarm64`),ho(`mac64`),`${mo}${po}`;var go=`CAMSTACK_FFMPEG_PATH`,_o={contact:`entryOpen`,binary:`on`,switch:`on`,motion:`detected`,flood:`flooded`,gas:`detected`,smoke:`detected`,"carbon-monoxide":`detected`,vibration:`detected`,tamper:`tampered`},vo={contact:`lastChangedAt`,binary:`lastChangedAt`,switch:`lastChangedAt`,motion:`lastDetectedAt`,flood:`lastChangedAt`,gas:`lastChangedAt`,smoke:`lastChangedAt`,"carbon-monoxide":`lastChangedAt`,vibration:`lastChangedAt`,tamper:`lastChangedAt`},yo=Object.keys(_o),bo=[`sensor`,`switch`,`control`];function xo(e){return Object.prototype.hasOwnProperty.call(_o,e)}function So(e,t){let n=_o[e];if(n===void 0)return null;let r=t[n];return typeof r==`boolean`?r:null}function Co(e,t){let n=vo[e];if(n===void 0)return null;let r=t[n];return typeof r!=`number`||!Number.isFinite(r)||r<=0?null:r}var wo=3e4;function To(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 Eo(e){let t=So(e.capName,e.slice);return t===null?{edge:`none`,value:null,reason:xo(e.capName)?`non-boolean-value`:`unknown-cap`}:To({level:t,changedAt:Co(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 I=class extends Error{position;constructor(e,t){super(e),this.name=`ExpressionParseError`,this.position=t}},L=class extends Error{constructor(e){super(e),this.name=`ExpressionEvalError`}};function Do(e){return e===`rose`||e===`count`||e===`dwell`||e===`latchedAt`||e===`schmitt`}function R(e,t,n){if(typeof e!=`number`||!Number.isFinite(e))throw new L(`${t}: argument ${n+1} must be a finite number`);return e}function Oo(e,t,n){if(typeof e!=`string`)throw new L(`${t}: argument ${n+1} must be a string`);return e}function ko(e,t){if(!Number.isFinite(e))throw new L(`${t}: produced a non-finite result`);return e}function Ao(e,t){return e.map((e,n)=>R(e,t,n))}function jo(e,t,n){if(typeof e!=`boolean`)throw new L(`${t}: argument ${n+1} must be a boolean`);return e}var Ate=/^[+-]?(\d+(\.\d*)?|\.\d+)([eE][+-]?\d+)?$/;function jte(e){if(typeof e==`number`)return Number.isFinite(e)?e:null;if(typeof e!=`string`)return null;let t=e.trim();if(!Ate.test(t))return null;let n=Number(t);return Number.isFinite(n)?n:null}var Mte=2e3;function Mo(e,t,n,r,i,a){let o=jo(e,`rose`,0),s=typeof t==`number`&&Number.isFinite(t)?t:null,c=n===void 0?Mte:R(n,`rose`,2);if(c<0)throw new L(`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=To({level:o,changedAt:s,priorLevel:r.priorLevel,startedAtMs:a.startedAtMs,nowMs:a.nowMs,firstSightingFreshnessMs:wo});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 Nte(e){e.disarmRoseNext=!0;for(let[t,n]of e.calls)n.kind===`rose`&&e.calls.set(t,{...n,disarmNext:!0})}function No(e,t,n){let r=R(e,t,n);if(r<0)throw new L(`${t}: delay must be a non-negative finite number`);return r}function Pte(e,t,n,r,i,a){let o=jo(e,`dwell`,0),s=No(t,`dwell`,1),c=No(n,`dwell`,2);if(r.latched===null){r.seenSince===null&&(r.seenSince=i);let e=o?s:c;return i-r.seenSince>=e?(r.latched=o,r.latched):(a?.noteDeadline?.(r.seenSince+e),null)}if(o===r.latched)return r.pendingSince=null,r.latched;r.pendingSince===null&&(r.pendingSince=i);let l=o?s:c;return i-r.pendingSince>=l?(r.latched=o,r.pendingSince=null,r.latched):(a?.noteDeadline?.(r.pendingSince+l),r.latched)}function Fte(e,t,n,r,i){let a=R(e[0],`schmitt`,0),o=R(e[1],`schmitt`,1),s=R(e[2],`schmitt`,2),c=e.length>3?No(e[3],`schmitt`,3):0,l=e.length>4?No(e[4],`schmitt`,4):0;if(s>o)throw new L(`schmitt: the low edge is above the high edge`);t.latched===null&&r!==null&&(t.latched=r);let u=a>=o?!0:a<=s?!1:t.latched;if(t.latched===null)return u!==null&&(t.latched=u),t.latched;if(u===null||u===t.latched)return t.pendingSince=null,t.latched;t.pendingSince===null&&(t.pendingSince=n);let d=u?c:l;return n-t.pendingSince>=d?(t.latched=u,t.pendingSince=null,t.latched):(i?.noteDeadline?.(t.pendingSince+d),t.latched)}function Ite(e,t,n){return e===null?(t.last=null,t.at=null,null):(typeof e!=`boolean`&&typeof e!=`number`&&typeof e!=`string`||t.last!==e&&(t.last=e,t.at=n),t.at)}function Po(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 Fo=1/0,Io={min:{minArgs:1,maxArgs:Fo,apply:e=>ko(Math.min(...Ao(e,`min`)),`min`)},max:{minArgs:1,maxArgs:Fo,apply:e=>ko(Math.max(...Ao(e,`max`)),`max`)},abs:{minArgs:1,maxArgs:1,apply:e=>ko(Math.abs(R(e[0],`abs`,0)),`abs`)},floor:{minArgs:1,maxArgs:1,apply:e=>ko(Math.floor(R(e[0],`floor`,0)),`floor`)},ceil:{minArgs:1,maxArgs:1,apply:e=>ko(Math.ceil(R(e[0],`ceil`,0)),`ceil`)},sqrt:{minArgs:1,maxArgs:1,apply:e=>ko(Math.sqrt(R(e[0],`sqrt`,0)),`sqrt`)},round:{minArgs:1,maxArgs:2,apply:e=>{let t=R(e[0],`round`,0),n=e.length>1?Math.trunc(R(e[1],`round`,1)):0;if(n<0||n>100)throw new L(`round: digits must be between 0 and 100`);let r=10**n;return ko(Math.round(t*r)/r,`round`)}},pow:{minArgs:2,maxArgs:2,apply:e=>ko(R(e[0],`pow`,0)**R(e[1],`pow`,1),`pow`)},clamp:{minArgs:3,maxArgs:3,apply:e=>{let t=R(e[0],`clamp`,0),n=R(e[1],`clamp`,1),r=R(e[2],`clamp`,2);if(n>r)throw new L(`clamp: lower bound is greater than upper bound`);return ko(Math.min(r,Math.max(n,t)),`clamp`)}},avg:{minArgs:1,maxArgs:Fo,apply:e=>{let t=Ao(e,`avg`);return ko(t.reduce((e,t)=>e+t,0)/t.length,`avg`)}},sum:{minArgs:1,maxArgs:Fo,apply:e=>ko(Ao(e,`sum`).reduce((e,t)=>e+t,0),`sum`)},coalesce:{minArgs:1,maxArgs:Fo,apply:e=>{for(let t of e)if(t!==null)return t;return null}},age:{minArgs:2,maxArgs:2,apply:e=>ko(R(e[0],`age`,0)-R(e[1],`age`,1),`age`)},convert:{minArgs:3,maxArgs:3,apply:(e,t)=>{let n=R(e[0],`convert`,0),r=Oo(e[1],`convert`,1).trim(),i=Oo(e[2],`convert`,2).trim();if(t.convert){let e=t.convert(n,r,i);if(e===null)throw new L(`convert: cannot convert '${r}' to '${i}'`);return ko(e,`convert`)}if(r===i)return n;throw new L(`convert: unit conversion table not installed`)}},any:{minArgs:1,maxArgs:Fo,apply:e=>e.map((e,t)=>jo(e,`any`,t)).some(e=>e)},all:{minArgs:1,maxArgs:Fo,apply:e=>e.map((e,t)=>jo(e,`all`,t)).every(e=>e)},within:{minArgs:2,maxArgs:2,apply:(e,t)=>{let n=R(e[1],`within`,1);if(n<0)throw new L(`within: the window must not be negative`);let r=e[0];if(r===null)return!1;let i=R(r,`within`,0),a=t.now;if(a===void 0||!Number.isFinite(a))throw new L(`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=>jte(e[0])},latest:{minArgs:1,maxArgs:Fo,apply:e=>{let t=e.flatMap((e,t)=>e===null?[]:[R(e,`latest`,t)]);return t.length===0?null:ko(Math.max(...t),`latest`)}},rose:{minArgs:2,maxArgs:3,apply:()=>{throw new L(`rose: stateful evaluation context is required`)}},count:{minArgs:1,maxArgs:1,apply:()=>{throw new L(`count: stateful evaluation context is required`)}},dwell:{minArgs:3,maxArgs:3,apply:()=>{throw new L(`dwell: stateful evaluation context is required`)}},latchedAt:{minArgs:1,maxArgs:1,apply:()=>{throw new L(`latchedAt: stateful evaluation context is required`)}},schmitt:{minArgs:3,maxArgs:5,apply:()=>{throw new L(`schmitt: stateful evaluation context is required`)}}},Lo=Object.freeze(Object.assign(Object.create(null),Io)),Ro=new Set(Object.keys(Io)),zo=2048,Lte=256,Rte=4096,zte=32,Bte=16,Vte=256,Bo=/^[A-Za-z_][A-Za-z0-9_]*$/,Vo=new Set([`now`,`true`,`false`,`null`]),Hte=new Set([`true`,`false`,`null`]);function Ho(e){return e>=`0`&&e<=`9`}function Uo(e){return e>=`A`&&e<=`Z`||e>=`a`&&e<=`z`||e===`_`}function Ute(e){return Uo(e)||Ho(e)}function Wte(e){return e===` `||e===` `||e===`
|
|
3
|
+
`||e===`\r`||e===`\f`||e===`\v`}function Wo(e){if(e.length>2048)throw new I(`expression too long (${e.length} > ${zo} chars)`,0);let t=[],n=0,r=e.length;for(;n<r;){let i=e[n];if(Wte(i)){n+=1;continue}if(Ho(i)){let i=n;for(;n<r&&Ho(e[n]);)n+=1;if(n<r&&e[n]===`.`){if(n+1>=r||!Ho(e[n+1]))throw new I(`malformed number: decimal point needs a digit`,n);for(n+=1;n<r&&Ho(e[n]);)n+=1}let a=e.slice(i,n),o=Number(a);if(!Number.isFinite(o))throw new I(`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 I(`invalid string escape: '\\${t}'`,n)}if(t===a){c=!0,n+=1;break}s+=t,n+=1}if(!c)throw new I(`unterminated string literal`,o);t.push({type:`string`,value:s,pos:o});continue}if(Uo(i)){let i=n;for(;n<r&&Ute(e[n]);)n+=1;let a=e.slice(i,n);Hte.has(a)?t.push({type:`keyword`,keyword:Gte(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(Go(i)){t.push({type:`punct`,punct:i,pos:n}),n+=1;continue}throw new I(`unexpected character '${i}'`,n)}return t.push({type:`eof`,pos:r}),t}function Gte(e){return e===`true`?`true`:e===`false`?`false`:`null`}function Go(e){return e===`(`||e===`)`||e===`,`||e===`?`||e===`:`||e===`+`||e===`-`||e===`*`||e===`/`||e===`%`||e===`!`||e===`<`||e===`>`}var Ko={"||":1,"&&":2,"==":3,"!=":3,"<":4,"<=":4,">":4,">=":4,"+":5,"-":5,"*":6,"/":6,"%":6};function qo(e){return e===`&&`||e===`||`}function Jo(e){return e===`+`||e===`-`||e===`*`||e===`/`||e===`%`||e===`==`||e===`!=`||e===`<`||e===`<=`||e===`>`||e===`>=`}var Yo=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 I(`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 I(`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 I(`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=Ko[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(),qo(i))t={kind:`logical`,op:i,left:t,right:a};else if(Jo(i))t={kind:`binary`,op:i,left:t,right:a};else throw new I(`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 I(`unexpected token '${e.punct}'`,e.pos);case`eof`:throw new I(`unexpected end of expression`,e.pos)}}parseCall(e,t){if(!Ro.has(e))throw new I(`unknown function '${e}'`,t);this.expectPunct(`(`);let n=[];if(!this.matchPunct(`)`))for(;;){if(n.push(this.parseTernary()),n.length>16)throw new I(`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 Xo(e){return new Yo(Wo(e)).parse()}var Zo=new Map;function Qo(e){let t=Zo.get(e);if(t!==void 0)return Zo.delete(e),Zo.set(e,t),t;let n;try{n={ok:!0,parsed:Xo(e)}}catch(e){n={ok:!1,error:e instanceof I?e.message:String(e)}}if(Zo.set(e,n),Zo.size>256){let e=Zo.keys().next().value;e!==void 0&&Zo.delete(e)}return n}function $o(e){let t=Qo(e);if(t.ok)return t.parsed;throw new I(t.error)}function es(e){return Qo(e)}var ts=Object.freeze({});function ns(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 rs(e){return typeof e==`number`&&Number.isFinite(e)}function is(e){return!!e}function as(e,t){if(!Number.isFinite(e))throw new L(`${t} produced a non-finite result`);return e}function os(e){if(e.steps+=1,e.steps>e.maxSteps)throw new L(`expression evaluation step budget exceeded`)}function ss(e,t){return`${e}/${t}`}function cs(e,t,n){switch(os(t),e.kind){case`literal`:return e.value;case`identifier`:if(!(e.name in t.scope))throw new L(`unknown identifier: ${e.name}`);return t.scope[e.name];case`unary`:return ls(e.op,cs(e.operand,t,ss(n,`operand`)));case`binary`:return us(e.op,cs(e.left,t,ss(n,`left`)),cs(e.right,t,ss(n,`right`)));case`logical`:{let r=cs(e.left,t,ss(n,`left`));return e.op===`&&`?is(r)?cs(e.right,t,ss(n,`right`)):r:is(r)?r:cs(e.right,t,ss(n,`right`))}case`conditional`:return is(cs(e.test,t,ss(n,`test`)))?cs(e.consequent,t,ss(n,`consequent`)):cs(e.alternate,t,ss(n,`alternate`));case`call`:{let r=e.args.map((e,r)=>cs(e,t,ss(n,`arg:${r}`)));return ds(e.callee,r,n,t)}}}function ls(e,t){if(e===`!`)return!is(t);if(!rs(t))throw new L(`unary "-" requires a finite number`);return as(-t,`unary "-"`)}function us(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(rs(t)&&rs(n))return as(t+n,`"+"`);throw new L(`"+" requires two numbers or two strings`);case`-`:case`*`:case`/`:case`%`:if(!rs(t)||!rs(n))throw new L(`"${e}" requires two finite numbers`);return as(e===`-`?t-n:e===`*`?t*n:e===`/`?t/n:t%n,`"${e}"`);case`<`:case`<=`:case`>`:case`>=`:if(rs(t)&&rs(n)||typeof t==`string`&&typeof n==`string`)return e===`<`?t<n:e===`<=`?t<=n:e===`>`?t>n:t>=n;throw new L(`"${e}" requires two numbers or two strings`)}}function ds(e,t,n,r){if(!Object.prototype.hasOwnProperty.call(Lo,e))throw new L(`unknown function: ${e}`);let i=Lo[e];if(t.length<i.minArgs||t.length>i.maxArgs)throw new L(`${e}: wrong number of arguments (${t.length})`);if(Do(e)){if(r.invokeStateful===void 0)throw new L(`${e}: stateful evaluation context is required`);return r.invokeStateful({name:e,path:n,args:t})}return i.apply(t,r.hooks)}function fs(e,t,n){return cs(e,{scope:t,hooks:n?.hooks??ts,maxSteps:n?.maxSteps??4096,...n?.invokeStateful===void 0?{}:{invokeStateful:n.invokeStateful},steps:0},`root`)}function ps(){return{calls:new Map,acceptedEdgeAt:null,disarmRoseNext:!1}}function ms(e){return{calls:new Map([...e.calls].map(([e,t])=>[e,{...t}])),acceptedEdgeAt:e.acceptedEdgeAt,disarmRoseNext:e.disarmRoseNext}}function hs(e,t,n,r){let i=t.calls.get(e.path);switch(e.name){case`rose`:{let r=i?.kind===`rose`?i:{kind:`rose`};t.calls.set(e.path,r);let a=n.currentOutput===null||typeof n.currentOutput==`number`&&Number.isFinite(n.currentOutput)?n.currentOutput:null;return Mo(e.args[0],e.args[1],e.args[2],r,t,{currentOutput:a,startedAtMs:n.startedAtMs,nowMs:n.nowMs})}case`count`:{let r=i?.kind===`count`?i:{kind:`count`,highWater:null,primed:!1};return t.calls.set(e.path,r),Po(e.args[0],r,n.currentOutput)}case`dwell`:{let a=i?.kind===`dwell`?i:{kind:`dwell`,pendingSince:null,latched:null,seenSince:null};return t.calls.set(e.path,a),Pte(e.args[0],e.args[1],e.args[2],a,n.nowMs,r)}case`schmitt`:{let a=i?.kind===`schmitt`?i:{kind:`schmitt`,latched:null,pendingSince:null};t.calls.set(e.path,a);let o=typeof n.currentOutput==`boolean`?n.currentOutput:null;return Fte(e.args,a,n.nowMs,o,r)}case`latchedAt`:{let r=i?.kind===`latchedAt`?i:{kind:`latchedAt`,last:void 0,at:null};return t.calls.set(e.path,r),Ite(e.args[0],r,n.nowMs)}}}var gs=`now`;function _s(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 vs(e){let t=Object.keys(e.bindings);if(t.length>32)return`too many bindings (${t.length} > 32)`;for(let e of t){if(!Bo.test(e))return`invalid binding name '${e}'`;if(Vo.has(e))return`binding name '${e}' is reserved`;if(Ro.has(e))return`binding name '${e}' shadows a builtin function`}let n=es(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 ys(e,t,n,r){let i=es(e);if(!i.ok)return{ok:!1,error:i.error};let a=ns({...t,now:n}),o={...r?.hooks,now:n};try{return{ok:!0,value:fs(i.parsed.ast,a,{...r,hooks:o})}}catch(e){return{ok:!1,error:e instanceof L?e.message:String(e)}}}var bs=`appliance`,xs=[`washer`,`dryer`,`dishwasher`],Ss=3e4,Cs=6e5,ws=5,Ts={washer:{thresholdWatts:ws,startDwellMs:Ss,stopDwellMs:Cs},dryer:{thresholdWatts:ws,startDwellMs:Ss,stopDwellMs:Cs},dishwasher:{thresholdWatts:ws,startDwellMs:Ss,stopDwellMs:Cs}},Es={washer:P.Washer,dryer:P.Dryer,dishwasher:P.Dishwasher};function Ds(e){return Es[e]}function Os(e){return xs.some(t=>t===e)}function ks(){return{purpose:`reading`,multiple:!1,max:1,deviceTypes:[P.Sensor,P.Switch],accept:[{cap:`power-meter`,fieldPath:`watts`,valueKind:`number`}],history:{required:!1,minRetentionMs:null},mustBindCaps:[],exclude:[]}}var As=1/36e8;function js(e){return e*As}var Ms=[`min`,`max`,`mean`,`sum`,`count`,`change`],Ns=[`gauge`,`counter`,`boolean`];function z(e){return typeof e==`number`&&Number.isFinite(e)}function Ps(e){return z(e.value)?e.value:z(e.last)?e.last:null}function Fs(e){let t=e.points.filter(t=>t.t>=e.from&&t.t<e.to),n=z(e.before?.value)?e.before.value:null,r=n,i=e.from,a=0,o=[];if(r===null){let n=t.find(e=>Ps(e)!==null);if(n===void 0)return{segments:o,included:0,gaps:1,end:null,start:null};n.t>e.from&&(a+=1),i=n.t,r=Ps(n)}for(let e of t){let t=Ps(e);r!==null&&e.t>i&&o.push({value:r,ms:e.t-i}),t!==null&&(r=t),e.t>i&&(i=e.t)}r!==null&&e.to>i&&o.push({value:r,ms:e.to-i});let s=t.reduce((e,t)=>Ps(t)??e,r);return{segments:o,included:t.length,gaps:a,end:s,start:n}}function Is(e){let t=e.points.filter(e=>z(e.twMean)&&z(e.twMs)&&e.twMs>0);if(t.length===0)return null;let n=t[0],r=+(e.before===null&&n!==void 0&&n.t>e.from),i=e.points.flatMap(e=>z(e.last)?[e.last]:[]),a=i.length>0?i[i.length-1]??null:null;return{segments:t.flatMap(e=>z(e.twMean)&&z(e.twMs)?[{value:e.twMean,ms:e.twMs}]:[]),included:t.length,gaps:r,end:a,start:z(e.before?.value)?e.before.value:null}}function Ls(e){if(e.tier!==`raw`){let t=Is(e);if(t!==null)return t}return Fs(e)}function Rs(e){let t=0,n=0;for(let r of e)t+=r.ms,n+=r.value*r.ms;return t<=0?null:n/t}function zs(e,t){let n=[],r=[];for(let t of e.points)z(t.min)&&n.push(t.min),z(t.max)&&r.push(t.max);return t.start!==null&&(n.push(t.start),r.push(t.start)),{min:n.length===0?null:Math.min(...n),max:r.length===0?null:Math.max(...r)}}function Kte(e){let t=e.points.flatMap(e=>z(e.delta)?[e.delta]:[]);return t.length===0?null:t.reduce((e,t)=>e+t,0)}function Bs(e){return{write:`hold`,value:null,included:0,excluded:0,reason:e}}function Vs(e,t){return{write:`null`,value:null,included:t,excluded:1,reason:e}}function Hs(e,t,n,r){return{write:`number`,value:e,included:t,excluded:n,reason:n>0?r:null}}var Us=`history has a gap — that interval was not counted as zero`;function qte(e,t){if(t.truncated)return Bs(`the history query was truncated — the last statistic is kept`);if(e===`sum`&&t.kind!==`counter`)return Bs(`a gauge has no sum — that is the integral template`);if(t.to<=t.from)return Vs(`the range is empty`,0);let n=Ls(t);if(n.segments.length===0&&n.start===null)return Vs(Us,n.included);if(e===`count`)return Hs(n.included,n.included,n.gaps,Us);if(e===`sum`||e===`change`&&t.kind===`counter`){let e=Kte(t);return e===null?Vs(`the counter has no growth in this range`,n.included):Hs(e,n.included,n.gaps,Us)}if(e===`change`)return n.start===null||n.end===null?Vs(`the change has no value at the start of the range`,n.included):Hs(n.end-n.start,n.included,n.gaps,Us);if(e===`min`||e===`max`){let r=zs(t,n),i=e===`min`?r.min:r.max;return i===null?Vs(Us,n.included):Hs(i,n.included,n.gaps,Us)}let r=Rs(n.segments);return r===null?Vs(Us,n.included):Hs(r,n.included,n.gaps,Us)}function Jte(e,t){if(e.truncated)return Bs(`the history query was truncated — the last total is kept`);if(e.kind===`counter`)return Bs(`a counter is already a total — it is not integrated again`);if(e.to<=e.from)return Vs(`the range is empty`,0);let n=Ls(e);if(n.segments.length===0)return{write:`hold`,value:null,included:n.included,excluded:n.gaps,reason:Us};let r=0;for(let e of n.segments)r+=e.value*e.ms;return Hs(t===`energy-kwh`?js(r):r/1e3,n.included,n.gaps,Us)}function Yte(e){let t=[];e.before!==null&&z(e.before.value)&&t.push({at:e.from,value:e.before.value});for(let n of e.points){if(n.t<e.from||n.t>e.to)continue;let r=Ps(n);if(r===null)continue;let i=e.tier===`raw`||!z(n.twMs)?n.t:n.t+n.twMs;t.push({at:Math.min(i,e.to),value:r})}return t.toSorted((e,t)=>e.at-t.at)}var Xte=.1,Zte=`history stops short of the window — the rate is over the part that was measured`;function Ws(e,t,n,r,i){return Hs(e/(t/n),r,+(i-t>i*Xte),Zte)}function Qte(e,t){if(e.truncated)return Bs(`the history query was truncated — the last rate is kept`);if(e.to<=e.from)return Vs(`the range is empty`,0);let n=e.to-e.from,r=Yte(e),i=r[0],a=r[r.length-1];if(i===void 0||a===void 0)return Vs(`history has no reading in this window`,0);if(e.kind===`counter`){let o=e.before!==null&&z(e.before.value),s=o?e.from:i.at,c=e.points.flatMap(t=>t.t>=e.from&&t.t<=e.to&&z(t.delta)&&(o||t.t>i.at)?[t.delta]:[]),l=a.at-s;return c.length===0||l<=0?Vs(`the counter has no growth in this window`,r.length):Ws(c.reduce((e,t)=>e+t,0),l,t,r.length,n)}if(r.length===1&&i.at===e.from&&e.before!==null)return Hs(0,1,0,null);let o=a.at-i.at;return r.length<2||o<=0?Vs(`the rate needs two readings in the window`,r.length):Ws(a.value-i.value,o,t,r.length,n)}var Gs=6e4,Ks=60*Gs,qs=24*Ks,Js=[`1h`,`24h`,`2d`,`7d`,`30d`,`custom`],Ys=[`today`,`yesterday`,`this-week`,`this-month`],$te=[`raw`,`5m`,`1h`,`1d`],Xs=[`never`,`daily`,`weekly`,`monthly`],ene=5,Zs=6e4,Qs=5*Gs,tne={"1h":Ks,"24h":24*Ks,"2d":2*qs,"7d":7*qs,"30d":30*qs},$s={rawMs:7*qs,fiveMinuteMs:30*qs,hourMs:365*qs,dayMs:null},ec=d({kind:h(`rolling`),span:C(Js),customMinutes:i().int().min(5).optional()}).check(e=>{e.value.span===`custom`&&e.value.customMinutes===void 0&&e.issues.push({code:`custom`,message:`a custom range needs a duration in minutes`,path:[`customMinutes`],input:e.value}),e.value.span!==`custom`&&e.value.customMinutes!==void 0&&e.issues.push({code:`custom`,message:`only a custom range carries a duration`,path:[`customMinutes`],input:e.value})}),tc=ec,nc=d({kind:h(`calendar`),period:C(Ys)}),nne=nc,rc=m(`kind`,[ec,nc]),rne={Sun:0,Mon:1,Tue:2,Wed:3,Thu:4,Fri:5,Sat:6},ic=new Map;function ine(e){let t=ic.get(e);if(t!==void 0)return t;let n;try{n=new Intl.DateTimeFormat(`en-US`,{timeZone:e,weekday:`short`,year:`numeric`,month:`2-digit`,day:`2-digit`,hour:`2-digit`,minute:`2-digit`,second:`2-digit`,hourCycle:`h23`})}catch{n=null}return ic.set(e,n),n}function ac(e,t){let n=ine(t);if(n===null)return null;let r=n.formatToParts(new Date(e)),i=e=>r.find(t=>t.type===e)?.value,a=Number(i(`year`)),o=Number(i(`month`)),s=Number(i(`day`)),c=Number(i(`hour`)),l=Number(i(`minute`)),u=Number(i(`second`)),d=rne[i(`weekday`)??``];return!Number.isInteger(a)||!Number.isInteger(o)||!Number.isInteger(s)||!Number.isInteger(c)||!Number.isInteger(l)||!Number.isInteger(u)||d===void 0?null:{year:a,month:o,day:s,hour:c===24?0:c,minute:l,second:u,weekday:d}}function oc(e,t){let n=Date.UTC(e.year,e.month-1,e.day,e.hour,e.minute,e.second),r=ac(n,t);if(r===null)return null;let i=Date.UTC(r.year,r.month-1,r.day,r.hour,r.minute,r.second)-n,a=n-i,o=ac(a,t);if(o===null)return null;let s=Date.UTC(o.year,o.month-1,o.day,o.hour,o.minute,o.second)-a;return s===i?a:n-s}function sc(e,t){let n=ac(e,t);return n===null?null:oc({...n,hour:0,minute:0,second:0},t)}function cc(e,t){let n=ac(e,t);return n===null?null:oc({...n,day:1,hour:0,minute:0,second:0},t)}function lc(e,t){let n=ac(e,t),r=sc(e,t);if(n===null||r===null)return null;let i=n.weekday===0?6:n.weekday-1;for(let e=0;e<i;e++){let e=sc(r-1,t);if(e===null)return null;r=e}return r}function uc(e){return e===null?`forever`:e%864e5==0?`${e/qs} d`:e%36e5==0?`${e/Ks} h`:`${e/Gs} min`}function ane(e){return`raw ${uc(e.rawMs)}, 5m ${uc(e.fiveMinuteMs)}, 1h ${uc(e.hourMs)}, 1d ${uc(e.dayMs)}`}function dc(e,t){let n=[{tier:`raw`,keptMs:t.rawMs},{tier:`5m`,keptMs:t.fiveMinuteMs},{tier:`1h`,keptMs:t.hourMs},{tier:`1d`,keptMs:t.dayMs}];for(let t of n)if(t.keptMs===null||t.keptMs>e)return{ok:!0,tier:t.tier,maxDurationMs:e};return{ok:!1,reason:`the range is ${uc(e)} and no history tier is kept strictly longer (${ane(t)})`}}function fc(e){return e.span===`custom`?e.customMinutes===void 0?null:e.customMinutes*Gs:tne[e.span]}function pc(e){if(e.kind===`rolling`)return fc(e);switch(e.period){case`today`:case`yesterday`:return 25*Ks;case`this-week`:return 6084e5;case`this-month`:return 2682e6}}function mc(e,t){let n=pc(e);return n===null?{ok:!1,reason:`a custom range needs a duration of at least 5 minutes`}:dc(n,t)}function hc(e,t){switch(e){case`never`:return dc(1/0,t);case`daily`:return dc(25*Ks,t);case`weekly`:return dc(6084e5,t);case`monthly`:return dc(2682e6,t)}}function one(e,t,n){if(e.kind===`rolling`){let n=fc(e);return n===null?null:{from:t-n,to:t}}let r=sc(t,n);if(r===null)return null;switch(e.period){case`today`:return{from:r,to:t};case`yesterday`:{let e=sc(r-1,n);return e===null?null:{from:e,to:r}}case`this-week`:{let e=lc(t,n);return e===null?null:{from:e,to:t}}case`this-month`:{let e=cc(t,n);return e===null?null:{from:e,to:t}}}}function sne(e,t,n){if(e===`never`)return{from:0,to:t};let r=sc(t,n);if(r===null)return null;if(e===`daily`)return{from:r,to:t};if(e===`weekly`){let e=lc(t,n);return e===null?null:{from:e,to:t}}let i=cc(t,n);return i===null?null:{from:i,to:t}}function cne(e,t){let n=sc(e,t);return n===null?null:sc(n+26*Ks,t)}function lne(e){if(e.kind===`calendar`)return e.period===`today`?Zs:Qs;let t=fc(e);return t!==null&&t<=24*36e5?Zs:Qs}function une(e){return e===`raw`?Zs:Qs}var gc=d({addonId:l().min(1),stableId:l().min(1)}),dne=64,_c=[`temperature`,`humidity`,`pressure`,`illuminance`,`power`,`energy`,`battery`,`numeric`,`motion`,`contact`,`leak`,`smoke`,`occupancy`,`binary`,`switch`,`light`,`fan`,`cover`,`valve`,`lock`,`media-player`,`climate`],vc=[`mean`,`median`,`min`,`max`,`sum`],yc=[`any`,`all`],bc=[`at-least-one`,`all`],xc=[`mean`,`median`,`min`,`max`,`sum`,`any`,`all`],Sc=C(_c),Cc=C(xc),wc=C(bc),Tc=d({source:gc,cap:l().min(1),fieldPath:l().min(1)}),Ec=d({kind:h(`group`),templateId:Sc,aggregate:Cc,members:w(Tc).min(1).max(64),active:wc.optional()}),Dc=d({kind:h(`appliance`),templateId:h(bs),appliance:C(xs),thresholdWatts:i().positive(),startDwellMs:i().int().nonnegative(),stopDwellMs:i().int().nonnegative(),member:Tc}),Oc=d({kind:h(`statistic`),stat:C(Ms),window:rc,source:Tc}),fne=Oc,kc=[`energy`,`meter`],Ac=d({kind:h(`integral`),reset:C(Xs),output:C(kc),source:Tc}),pne=Ac,jc=d({kind:h(`threshold`),source:Tc,high:i(),low:i(),onForMs:i().int().nonnegative(),offForMs:i().int().nonnegative()}),mne=jc,Mc=[`sum`,`difference`,`ratio`],Nc=d({kind:h(`arithmetic`),op:C(Mc),inputs:w(Tc).min(2).max(64)}),hne=Nc,Pc=[`number`,`boolean`],Fc=d({kind:h(`expression`),expr:l().min(1),inputs:w(d({name:l().min(1),member:Tc})).min(1).max(64),output:C(Pc)}),gne=Fc,Ic=[`second`,`minute`,`hour`],Lc=d({kind:h(`derivative`),window:tc,per:C(Ic),source:Tc}),Rc=Lc,zc=m(`kind`,[Ec,Dc,Oc,Ac,jc,Nc,Fc,Lc]);function Bc(e){return e.kind===`statistic`||e.kind===`integral`||e.kind===`derivative`}function Vc(e){switch(e.kind){case`group`:return e.members;case`appliance`:return[e.member];case`statistic`:case`integral`:case`threshold`:case`derivative`:return[e.source];case`arithmetic`:return e.inputs;case`expression`:return e.inputs.map(e=>e.member)}}var Hc=`composer`,Uc=`customize:`,Wc=`composed-`,Gc=16,Kc=32,qc=2e4,Jc=d({source:gc,cap:l().min(1),fieldPath:l().min(1)}),Yc=Jc.extend({kind:h(`from`)}),Xc=d({kind:h(`literal`),value:f([l(),i(),T(),b()])}),Zc=m(`kind`,[Yc,Xc]),Qc=d({kind:h(`expression`),expr:l().min(1).max(zo),bindings:x(l().regex(Bo),Zc)}).superRefine((e,t)=>{let n=vs(e);n!==null&&t.addIssue({code:`custom`,message:n,path:[`expr`]})}),$c=d({kind:h(`code`),code:l().min(1).max(qc)}),el=d({kind:h(`aggregate`),reducer:C([`mean`,`median`,`min`,`max`,`sum`,`any`,`all`]),reads:w(Jc).min(1).max(64),activeWhen:w(l().min(1)).min(1).optional(),publish:C([`value`,`included`,`excluded`,`total`]),empty:C([`null`,`omit`,`offline`])}),tl=d({kind:h(`series`),read:Jc,publish:C([`value`,`included`,`excluded`,`total`]),empty:C([`null`,`omit`,`offline`])}),nl=m(`kind`,[Yc,Qc,$c,el,tl]),rl=d({kind:h(`forward`),source:gc,cap:l().min(1),method:l().min(1)}),il=m(`kind`,[rl,$c]),al=/^[a-z0-9][a-z0-9-]{0,47}$/,ol=16,sl=`items`,cl=d({label:l().min(1).max(80),fields:x(l().min(1),nl)}),ll=d({kind:h(`fields`),cap:l().min(1),enabled:T().optional(),fields:x(l().min(1),nl).refine(e=>Object.keys(e).length<=32,{message:`at most 32 fields per capability`}),items:x(l().regex(al),cl).refine(e=>Object.keys(e).length<=16,{message:`at most 16 items`}).optional(),commands:x(l().min(1),il).optional()}),ul=d({kind:h(`passthrough`),cap:l().min(1),enabled:T().optional(),source:gc}),dl=m(`kind`,[ll,ul]);function fl(e){return e.enabled!==!1}var pl=d({kind:h(`new`),type:C(P),role:C(F).optional()}),ml=d({kind:h(`existing`),device:gc}),hl=m(`kind`,[pl,ml]),gl=d({target:hl,features:w(dl).min(1).max(16),helper:zc.optional()}).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 _l(e,t){return`${B(e)}#${t}`}function vl(e){return`${_l(e.source,e.cap)}.${e.fieldPath}`}function yl(e){return`${Wc}${e}`}function bl(e){return{addonId:Hc,stableId:yl(e)}}function xl(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`aggregate`:return e.reads;case`series`:return[e.read];case`code`:return[]}}function Sl(e,t,n){return`${e}[${t}].${n}`}function Cl(e,t=sl){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:Sl(t,e,n),source:r})))]}function wl(e){return Cl(e).map(e=>e.source)}var Tl=[`node-a`,`node-b`,`node-c`,`node-d`,`node-e`,`node-f`,`node-g`,`node-h`],El=C(Tl);function Dl(e){let t=2166136261;for(let n=0;n<e.length;n++)t^=e.charCodeAt(n),t=Math.imul(t,16777619);return t>>>0}function Ol(e){let t=Tl[Dl(e)%Tl.length];return t===void 0?`node-a`:t}var kl=function(e){return e.Addon=`addon`,e.Core=`core`,e.Device=`device`,e.Provider=`provider`,e.System=`system`,e}({}),Al=[`track`,`face`,`identity`,`plate`,`vehicle`,`scene`,`motion`,`object`,`audio`,`mosaic`],jl=new Set(Al),Ml=/^\d+$/;function Nl(e){return jl.has(e)}function Pl(e){let t=e.split(`:`);if(t.length!==3&&t.length!==4)return null;let[n,r,i,a]=t;return n===void 0||!Nl(n)||r===void 0||r.length===0||i===void 0||i.length===0?null:a===void 0?{ownerType:n,ownerId:r,fileKind:i}:Ml.test(a)?{ownerType:n,ownerId:r,fileKind:i,timestampMs:Number(a)}:null}function Fl(e){let t=`${e.ownerType}:${e.ownerId}:${e.fileKind}`;return e.timestampMs===void 0?t:`${t}:${e.timestampMs}`}var Il=[`motion`,`object`,`audio`],Ll=C(Il),Rl=[...Il,`track`],zl=C(Rl),Bl=new Set(Il);function Vl(e){return Bl.has(e)}function Hl(e,t){return{id:e,getRoutes:()=>t,invoke:async e=>{let n=Ul(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=Gl(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 Ul(e,t,n){let r=t.toUpperCase();for(let t of e){if(t.method!==r)continue;let e=Wl(t.path,n);if(e!==null)return{route:t,params:e}}return null}function Wl(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 Gl(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 Kl=`integration.session-lost`,ql=`session-lost`,Jl=2*6e4,Yl={kicked:`the account was signed in on another device, which ended this session`,"auth-rejected":`the cloud rejected the sign-in (check the credentials)`,"token-expired":`the session token expired and could not be renewed`,"connection-lost":`the connection to the cloud was lost`};function Xl(e,t){return`session:${e}:${t}`}function Zl(e){let t=e.now??Date.now();return{id:Xl(e.kind,e.integrationId),category:Kl,severity:e.severity??`error`,title:`${e.providerName} connection lost`,message:`${e.integrationName} lost its ${e.providerName} session: ${Yl[e.reason]}.`,action:e.action??{label:`Open integration`,href:`/integrations/${encodeURIComponent(e.integrationId)}`},status:`active`,read:!1,createdAt:t,updatedAt:t,source:{type:e.kind,id:e.integrationId},metadata:{episodeKey:ql,reason:e.reason}}}var Ql=class{#e;#t;#n=new Map;constructor(e){this.#e=e,this.#t=e.debounceMs??12e4}lost(e,t){let n={integrationId:e},r=this.#n.get(e);if(r===void 0||r.phase===`ok`){let r=setTimeout(()=>void this.#i(e),this.#t);this.#n.set(e,{phase:`pending`,info:t,timer:r}),this.#e.logger.info(`${this.#e.providerName} session lost — alert after ${this.#t}ms unless it recovers`,{tags:n,meta:{reason:t.reason}});return}if(r.info=t,r.phase===`pending`){this.#e.logger.debug(`${this.#e.providerName} session still lost — alert pending`,{tags:n,meta:{reason:t.reason}});return}if(r.phase===`unsent`){this.#a(e,r);return}this.#e.logger.debug(`${this.#e.providerName} session still lost — alert already active`,{tags:n,meta:{reason:t.reason}})}async restored(e){let t={integrationId:e},n=this.#n.get(e);if(n===void 0){this.#n.set(e,{phase:`ok`,info:$l,timer:null}),await this.#o(e,`startup reconcile`)||this.#n.delete(e);return}if(n.phase===`ok`)return;this.#r(n);let r=n.phase;if(n.phase=`ok`,r===`pending`||r===`unsent`){this.#e.logger.info(`${this.#e.providerName} session recovered inside the debounce — no alert`,{tags:t});return}await this.#o(e,`session restored`)}async forget(e){let t=this.#n.get(e);t!==void 0&&(this.#r(t),this.#n.delete(e),t.phase===`alerted`&&await this.#o(e,`integration removed`))}dispose(){for(let e of this.#n.values())this.#r(e);this.#n.clear()}#r(e){e.timer!==null&&clearTimeout(e.timer),e.timer=null}async#i(e){let t=this.#n.get(e);t===void 0||t.phase!==`pending`||(t.timer=null,await this.#a(e,t))}async#a(e,t){let n={integrationId:e},r=this.#e.getAlerts()?.emit;if(r===void 0){t.phase=`unsent`,this.#e.logger.warn(`${this.#e.providerName} session alert skipped — alerts capability missing`,{tags:n});return}try{await r.mutate(Zl({kind:this.#e.kind,providerName:this.#e.providerName,integrationId:e,integrationName:t.info.integrationName,reason:t.info.reason,...t.info.action===void 0?{}:{action:t.info.action}})),t.phase=`alerted`,this.#e.logger.warn(`${this.#e.providerName} session lost — alert raised`,{tags:n,meta:{reason:t.info.reason}})}catch(e){t.phase=`unsent`,this.#e.logger.warn(`${this.#e.providerName} session alert emit failed`,{tags:n,meta:{error:e instanceof Error?e.message:String(e)}})}}async#o(e,t){let n={integrationId:e},r=this.#e.getAlerts()?.update;if(r===void 0)return this.#e.logger.debug(`${this.#e.providerName} session alert not resolved — no alerts cap`,{tags:n}),!1;try{await r.mutate({alertId:Xl(this.#e.kind,e),patch:{status:`completed`,read:!0}}),this.#e.logger.info(`${this.#e.providerName} session alert resolved`,{tags:n,meta:{why:t}})}catch(e){this.#e.logger.debug(`${this.#e.providerName} session alert resolve skipped`,{tags:n,meta:{why:t,error:e instanceof Error?e.message:String(e)}})}return!0}},$l={integrationName:``,reason:`connection-lost`},eu=class{#e;#t=null;#n=new Map;constructor(e){this.#e=e}bind(e){this.#t?.dispose(),this.#t=new Ql({kind:this.#e.kind,providerName:this.#e.providerName,logger:e.logger,getAlerts:e.getAlerts,...e.debounceMs===void 0?{}:{debounceMs:e.debounceMs}})}unbind(){this.#t?.dispose(),this.#t=null}register(e,t){this.#n.set(e,t)}failure(e,t){let n=this.#e.classify(t);if(n===null)return;let r=this.#e.action?.(e);this.#t?.lost(e,{integrationName:this.#n.get(e)??e,reason:n,...r===void 0?{}:{action:r}})}async ok(e){await this.#t?.restored(e)}async forget(e){this.#n.delete(e),await this.#t?.forget(e)}},tu=d({codec:C([`h264`,`h265`,`copy`]),profile:C([`baseline`,`main`,`high`]).optional(),level:l().optional(),width:i().int().positive().optional(),height:i().int().positive().optional(),fps:i().positive().optional(),bitrateKbps:i().int().positive().optional(),gopFrames:i().int().positive().optional(),bf:i().int().min(0).optional(),preset:C([`ultrafast`,`superfast`,`veryfast`,`faster`,`fast`,`medium`]).optional(),tune:C([`zerolatency`,`film`,`animation`]).optional(),singleSlicePerFrame:T().optional()}),nu=f([h(`passthrough`),d({codec:C([`opus`,`aac`,`pcmu`,`pcma`,`copy`]),bitrateKbps:i().int().positive().optional(),sampleRateHz:i().int().positive().optional(),channels:f([h(1),h(2)]).optional()})]),ru=d({video:tu,audio:nu,inputArgs:w(l()).optional(),outputArgs:w(l()).optional()});function iu(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 au(e,t,n){let r=e>=n;return r===t>=n?r?e-t:t-e:r?-1:1}function ou(e){let t=e.toLowerCase().replace(/[.\s-]/g,``);return t===`hevc`||t===`hvc1`||t===`hev1`?`h265`:t===`avc`||t===`avc1`?`h264`:t}function su(e,t){if(t.length===0)return!0;if(e===void 0)return!1;let n=ou(e);return t.some(e=>ou(e)===n)}function _ne(e,t){for(let n=0;n<t.length;n+=1)if(e.startsWith(t[n]))return n;return t.length}function vne(e,t){let n=e.filter(e=>t.allowTranscode||su(e.codec,t.acceptCodecs));if(n.length===0)return null;let r=t.targetHeight,i=n.map(e=>({candidate:e,transcodes:!su(e.codec,t.acceptCodecs),provider:_ne(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:au(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 cu={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`},yne={...cu,video:{...cu.video,bitrateKbps:3e3,gopFrames:30,preset:`ultrafast`},audio:`passthrough`},bne={...cu,audio:{codec:`opus`},video:{...cu.video,singleSlicePerFrame:!0}},xne={kind:`cbr`,vbvSeconds:1},Sne={kind:`cap`,vbvSeconds:2},Cne=360,wne=400,Tne=24,Ene={kind:`encode`,codec:`opus`,bitrateKbps:24,channels:1,application:`lowdelay`,globalHeader:!0,filter:`aresample=async=1000:first_pts=0`},Dne=96,One=4;function kne(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 lu(e){return!e||e===`none`||e===`copy`}async function Ane(e){let t=e.override;if(t!=null&&t!==``)return lu(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=lu(r)?null:r;return e.cache?.write(i),i}function uu(e){return String(Math.round(e*1e3)/1e3)}function jne(e,t){return!Number.isFinite(t)||t<=0?e:e/t}function du(e){let t=e.speed>0?e.speed:1;return t===1?`[0:v]fps=${uu(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=${uu(e.fps/t)},setpts=PTS/${t},fps=${uu(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 Mne(e){return[`-y`,`-v`,`error`,`-f`,`mp4`,`-i`,e.input??`pipe:0`,`-filter_complex`,du(e),`-loop`,`0`,`-f`,`gif`,`pipe:1`]}function fu(e){return{transport:e.publishLocally===!0?`push`:`dial`}}var pu=`\0unset`;function Nne(e){return{codec:e.codec,profile:e.profile??pu,level:e.level??pu,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??pu,tune:e.tune??pu,singleSlicePerFrame:e.singleSlicePerFrame===void 0?pu:String(e.singleSlicePerFrame)}}function Pne(e){return e===`passthrough`?{codec:`passthrough`}:{codec:e.codec,bitrateKbps:e.bitrateKbps??-1,sampleRateHz:e.sampleRateHz??-1,channels:e.channels??-1}}function mu(e,t=fu(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:Nne(e.encode.video),audio:Pne(e.encode.audio),rateControl:e.rateControl??`relaxed`,bitstreamFilter:e.bitstreamFilter??pu,pixelFormat:e.pixelFormat??pu,decodeHwAccel:e.decodeHwAccel??pu}}function Fne(e,t=fu(e)){return`egress:${uo(mu(e,t))}`}function Ine(e){let t=null;return()=>{if(t!==null)return t;let n=e();return t=n,n.catch(()=>{t===n&&(t=null)}),n}}var hu=C([`singleton`,`device`,`widget`]),gu=d({capName:l(),kind:hu,deviceId:i().optional(),reachable:T(),latencyMs:i(),error:l().optional()}),_u=d({addonId:l(),caps:w(gu).readonly(),widgets:w(gu).readonly()}),vu=d({nodeId:l(),addons:w(_u).readonly()}),Lne=d({ok:T(),degraded:T(),checkedAt:l(),nodes:w(vu).readonly(),summary:d({total:i(),reachable:i(),unreachable:i()})}),Rne=`hub-only`;function yu(e){return{placement:e.execution?.placement??`hub-only`,group:e.execution?.group}}function zne(e){let t=yu(e).placement;return t===`any-node`||t===`agent-only`}function Bne(e){return yu(e).placement===`agent-only`}function Vne(e){return yu(e).group}function Hne(e,t){return e.execution?.group??t}function Une(e){return yu(e).placement}function Wne(e){return e.execution?.isolate===!0}var bu=C([`running`,`done`,`failed`,`cancelled`]),xu=C([`adopted`,`already-adopted`,`failed`,`cancelled`]),Su=d({childNativeId:l(),outcome:xu,parentDeviceId:i().int().nonnegative().nullable(),accessoryCount:i().int().nonnegative(),error:l().nullable()}),Cu=d({jobId:l(),addonId:l(),integrationId:l(),state:bu,total:i().int().nonnegative(),processed:i().int().nonnegative(),adopted:i().int().nonnegative(),alreadyAdopted:i().int().nonnegative(),failed:i().int().nonnegative(),accessoriesCreated:i().int().nonnegative(),currentChildNativeId:l().nullable(),results:w(Su).readonly(),startedAt:i(),finishedAt:i().nullable(),error:l().nullable()}),Gne={cleanupIntervalMs:3600*1e3,detectionEventsDays:30,audioLevelsDays:7,snapshotsDays:14},wu=C([`stream-broker`,`object-detection`,`privacy-mask`,`device-audio`,`broker-audio`,`audio-analysis`,`event-saving`,`recording`,`notifications`]),Tu=[`stream-broker`,`object-detection`,`privacy-mask`,`device-audio`,`broker-audio`,`audio-analysis`,`event-saving`,`recording`,`notifications`],Eu=m(`kind`,[d({kind:h(`device-disabled`)}),d({kind:h(`wrapper-binding`),capName:l()}),d({kind:h(`recording-config`)}),d({kind:h(`notification-mute`)}),d({kind:h(`camera-audio`),capName:l()}),d({kind:h(`camera-mask`),capName:l()}),d({kind:h(`broker-audio-mute`)})]),Du=C([`no-provider`,`source-unreachable`,`device-disabled`]),Ou=C([`no-privacy-zones`]),ku=d({id:wu,label:l(),costWhenOff:l(),available:T(),unavailableReason:Du.optional(),warning:Ou.optional(),enabled:T(),authority:Eu}),Au=d({deviceId:i().int(),switches:w(ku).readonly(),fetchedAt:i()}),ju=`detection-pipeline`,Mu=`audio-analysis`,Nu=`privacy-mask`,Pu=`pipeline-analytics`,Kne=[`motion-detection`,ju,Mu,Pu,`scene-monitor`],Fu={"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:ju},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:Nu},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:Nu},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:Mu},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:Pu},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 Iu(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 qne(e){return Tu.map(t=>{let n=Fu[t],r=Iu(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 Jne(e){return e.filter(e=>Fu[e.id].countsAsSwitchedOff&&e.available&&!e.enabled).map(e=>e.id)}function Yne(e){let t=[],n=[];for(let r of Tu){let i=Fu[r];if(!i.countsAsSwitchedOff)continue;let a=Iu(i,e);a.unavailableReason===`source-unreachable`?n.push(r):a.available&&!a.enabled&&t.push(r)}return{switchedOff:t,unreadable:n}}var Lu=`camstack.training/v1`,Ru=`camstack.training-result/v1`,zu=`CAMSTACK_EVENT `,Bu=C([`onnx`,`openvino-fp16`,`openvino-int8`,`coreml-fp16`]),Vu=x(l(),i().min(0).max(1)),Xne=d({schema:h(Lu),jobKey:l().uuid(),target:d({kind:h(`detector`),step:h(`object-detection`)}),base:d({modelId:l().min(1),weights:l().min(1),imgsz:i().int().positive()}),baseline:d({modelId:l().min(1),onnxUrl:l().url(),imgsz:i().int().positive(),floors:Vu}),dataset:d({versionId:l().min(1),annotationHash:l(),sha256:l().regex(/^[0-9a-f]{64}$/)}),split:d({holdoutCameras:w(i().int()),holdoutLastDays:i().int().nonnegative(),valFraction:i().min(0).max(.5),seed:i().int()}),hyper:d({epochs:i().int().positive(),batch:i().int().positive(),lr0:i().positive(),freeze:i().int().nonnegative(),patience:i().int().nonnegative(),seed:i().int()}),replay:d({source:h(`coco2017`),count:i().int().nonnegative()}),exports:w(Bu).min(1),calibration:d({maxFrames:i().int().positive()}),floors:d({minSupport:i().int().positive(),clamp:i().min(0).max(1)}),int8Gate:d({maxMap50Drop:i().min(0).max(1)}),catalog:d({id:l().regex(/^[a-z0-9][a-z0-9-]{2,80}$/),name:l().min(1).max(160)})}),Hu=d({path:l().min(1),bytes:i().int().nonnegative(),sha256:l().regex(/^[0-9a-f]{64}$/),format:C([`onnx`,`openvino`,`coreml`,`pt`]),variant:C([`base`,`int8`])}),Uu=d({url:l().min(1),sizeMB:i().nonnegative(),isDirectory:T().optional(),files:w(l()).optional(),runtimes:w(h(`python`)).optional(),revision:l().min(1)}),Wu=d({id:l().min(1),name:l().min(1),description:l(),labels:w(o()),inputSize:d({width:i().int().positive(),height:i().int().positive()}),preprocessMode:h(`letterbox`),defaultClassFloors:Vu,formats:d({onnx:Uu.optional(),openvino:Uu.optional(),coreml:Uu.optional()})}),Gu=d({positives:i().int(),floor:i().nullable(),tp:i().int(),fp:i().int(),fn:i().int(),precision:i().nullable(),recall:i().nullable(),ap50:i().nullable(),recallByCamera:x(l(),i().nullable()).optional(),recallByLight:x(l(),i().nullable()).optional(),fpByCamera:x(l(),i()).optional(),smallFound:i().int().optional(),smallTotal:i().int().optional()}).passthrough(),Ku=d({frames:i().int(),classes:x(l(),Gu)}).passthrough(),qu=d({schema:h(Ru),jobKey:l(),status:C([`succeeded`,`failed`]),error:d({stage:l(),code:l(),message:l()}).nullable(),trainer:d({version:l(),revision:l()}),toolchain:x(l(),l().nullable()),dataset:d({versionId:l(),annotationHash:l(),sha256:l(),frames:d({train:i().int(),val:i().int(),holdout:i().int()}),holdoutCameras:w(i().int()),replayImages:i().int()}).optional(),training:d({epochsRun:i().int(),bestEpoch:i().int(),bestMap50:i(),bestMap50_95:i(),seconds:i()}).optional(),evaluation:d({holdoutFrames:i().int(),baseline:Ku.nullable(),candidate:Ku.nullable(),candidateInt8:Ku.nullable(),recallDeltaByCamera:x(l(),x(l(),i())).nullable(),map50:x(l(),i().nullable())}).optional(),floors:d({baseline:Vu,candidate:Vu,candidateInt8:Vu.nullable(),notes:w(l())}).optional(),int8:d({kept:T(),map50Fp16:i().nullable(),map50Int8:i().nullable(),reason:l().nullable()}).optional(),exportsDropped:w(d({export:l(),reason:l()})).optional(),files:w(Hu).optional(),bundle:d({path:h(`bundle.tar`),bytes:i().int().nonnegative(),sha256:l().regex(/^[0-9a-f]{64}$/)}).nullable().optional(),catalogDraft:d({base:Wu,int8:Wu.nullable()}).nullable().optional(),licence:l()}),Ju=C([`prepare`,`replay`,`train`,`eval`,`export`,`package`]),Yu={v:h(1),ts:i()},Xu=m(`type`,[d({...Yu,type:h(`stage`),stage:Ju}),d({...Yu,type:h(`epoch`),epoch:i().int(),epochs:i().int(),boxLoss:i().nullable().optional(),map50:i().nullable().optional(),map50_95:i().nullable().optional(),etaSec:i().nullable().optional()}),d({...Yu,type:h(`metric`),name:l(),value:i()}),d({...Yu,type:h(`artifact`),path:l(),bytes:i(),sha256:l()}),d({...Yu,type:h(`done`),status:C([`succeeded`,`failed`]),resultSha256:l().nullable().optional()}),d({...Yu,type:h(`error`),stage:l(),code:l(),message:l()})]);function Zne(e){let t=e.indexOf(zu);if(t<0)return null;let n;try{n=JSON.parse(e.slice(t+15))}catch{return null}let r=Xu.safeParse(n);return r.success?r.data:null}var Zu=[`unchanged`,`adjusted`,`reclassified`,`added`,`removed`,`model-error`],Qne=.5,$ne=.95,Qu=1e-6,$u=e=>e===void 0?{}:{label:e};function ed(e,t){let n=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)),r=e.w*e.h+t.w*t.h-n;return r>0?n/r:0}function td(e,t){return Math.abs(e.x-t.x)<=Qu&&Math.abs(e.y-t.y)<=Qu&&Math.abs(e.w-t.w)<=Qu&&Math.abs(e.h-t.h)<=Qu}function nd(e){return e?.trim()??``}function rd(e,t,n){let r=ed(e.bbox,t.bbox);return e.macroClass!==t.macroClass||nd(e.label)!==nd(t.label)?{status:`reclassified`,iou:r}:{status:r<n?`adjusted`:`unchanged`,iou:r}}function id(e,t,n,r){let i=[];for(let a of t){let t=e[a];t!==void 0&&n.forEach((e,n)=>{let o=td(t.bbox,e.bbox),s=o?1:ed(t.bbox,e.bbox);(o||s>=r)&&i.push({savedIndex:a,originIndex:n,iou:s,exact:o})})}i.sort((e,t)=>Number(t.exact)-Number(e.exact)||t.iou-e.iou);let a=new Map,o=new Set;for(let e of i)a.has(e.savedIndex)||o.has(e.originIndex)||(a.set(e.savedIndex,e.originIndex),o.add(e.originIndex));return a}function ad(e,t,n,r={}){let i=r.matchIou??.5,a=r.adjustedIou??.95,o=new Set,s=[],c=[];e.forEach((e,t)=>{e.origin===null?c.push(t):o.add(e.origin.ref)});for(let e of n)o.add(e.ref);let l=id(e,c,t,i);for(let e of l.values()){let n=t[e];n!==void 0&&o.add(n.ref)}e.forEach((e,n)=>{let r=e.origin,i=r===null?t[l.get(n)??-1]:void 0,o=r??i??null,c=r===null;if(e.kind===`model_error`){s.push({ref:e.id,savedId:e.id,status:`model-error`,approximate:!1,macroClass:e.macroClass,...$u(e.label),...o===null?{}:{origin:o,iou:ed(e.bbox,o.bbox)}});return}if(o===null||o.source===`operator`){s.push({ref:e.id,savedId:e.id,status:`added`,approximate:c&&o===null,macroClass:e.macroClass,...$u(e.label),...o===null?{}:{origin:o}});return}let u=rd(e,o,a);s.push({ref:e.id,savedId:e.id,status:u.status,approximate:c,macroClass:e.macroClass,...$u(e.label),origin:o,iou:u.iou})});for(let e of n)s.push({ref:e.ref,status:`removed`,approximate:!1,macroClass:e.snapshot.macroClass,...$u(e.snapshot.label),origin:e.snapshot});if(r.inferRemoved===!0)for(let e of t)o.has(e.ref)||s.push({ref:e.ref,status:`removed`,approximate:!0,macroClass:e.macroClass,...$u(e.label),origin:e});return{boxes:s,approximate:s.some(e=>e.approximate)}}function od(e){let t={unchanged:0,adjusted:0,reclassified:0,added:0,removed:0,"model-error":0};for(let n of e.boxes)t[n.status]+=1;return{counts:t,total:e.boxes.length,changed:e.boxes.length-t.unchanged,approximate:e.approximate}}var sd=`retrain-revision-conflict`;function cd(e,t){return`${sd}: frame ${e} moved on — it is at revision ${String(t.currentRevision)}, the save expected ${String(t.expectedRevision)} (current=${String(t.currentRevision)} expected=${String(t.expectedRevision)})`}function ld(e){if(!e.includes(`retrain-revision-conflict`))return null;let t=/current=(\d+) expected=(\d+)/.exec(e);return t?.[1]===void 0||t[2]===void 0?null:{currentRevision:Number(t[1]),expectedRevision:Number(t[2])}}var ud=3e4,dd=500,fd=6e4,pd=C([`confirmed`,`suppressed`,`exhausted-fallback`]),md=C([`carried`,`native`,`fallback`]),hd=d({id:l(),at:i().int(),deviceId:i().int(),sourceTrackId:l(),className:l(),verdict:pd,reason:l().nullable(),cropSource:md.nullable().default(null),attempts:i().int(),deferredForMs:i().int(),decidedOnCoastedFrame:T(),birthEvidenceAvailable:T(),decidedByBirthEvidence:T(),bestScore:i().nullable(),appliedMinConfidence:i().nullable(),detectorModelId:l().nullable().default(null),detectorDeviceKey:l().nullable().default(null),detectorNodeId:l().nullable().default(null),firstSeen:i().int().nullable(),motionOnsetAt:i().int().nullable(),birthLatencyMs:i().int().nullable(),birthIndexInBurst:i().int().nullable()}),gd=d({deviceId:i().int().optional(),since:i().int().optional(),verdict:pd.optional(),limit:i().int().min(1).max(5e3).optional()}),_d=5e3,vd=200,yd=d({id:l(),note:l(),deviceId:i().int(),sourceTrackId:l(),archivedAt:i().int(),trackStartedAt:i().int().nullable(),trackClass:l().nullable(),trackLabel:l().nullable()}),bd=d({deviceId:i().int().optional(),limit:i().int().min(1).max(1e3).optional()}),xd=2e4,Sd=5e3,Cd=500,wd=C([`same-subject`,`different-subjects`]),Td=C([`before`,`after`]),Ed=C([`mixed`,`not-a-subject`]),Dd=d({id:l(),deviceId:i().int(),leftTrackId:l(),rightTrackId:l(),leftSide:Td.nullable(),rightSide:Td.nullable(),relation:wd,presence:h(`continuous`).nullable(),leftStartedAt:i().int().nullable(),rightStartedAt:i().int().nullable(),createdAt:i().int(),updatedAt:i().int(),author:l().nullable()}),Od=d({id:l(),deviceId:i().int(),sourceTrackId:l(),purity:Ed,switchAtMs:i().int().nullable(),startedAt:i().int().nullable(),createdAt:i().int(),updatedAt:i().int(),author:l().nullable()}),kd=d({deviceId:i().int(),trackId:l().min(1),otherTrackId:l().min(1),relation:wd,presence:h(`continuous`).optional(),trackSide:Td.optional(),otherSide:Td.optional()}),Ad=d({deviceId:i().int(),trackId:l().min(1),otherTrackId:l().min(1)}),jd=d({cleared:T()}),Md=d({deviceId:i().int(),trackId:l().min(1),purity:C([`pure`,`mixed`,`not-a-subject`]),switchAtMs:i().int().optional()}),Nd=d({purity:Od.nullable()}),Pd=d({deviceId:i().int(),trackId:l().optional(),since:i().int().optional(),until:i().int().optional(),limit:i().int().min(1).max(5e3).optional()}),Fd=d({relations:w(Dd).readonly(),purities:w(Od).readonly(),truncated:T()}),Id=C([`unknown-track`,`cross-device`,`self-relation`,`contradiction`,`switch-outside-track`,`switch-needs-mixed`]),Ld={high:`High`,mid:`Mid`,low:`Low`};function Rd(e){return Ld[e]??e.charAt(0).toUpperCase()+e.slice(1)}function zd(e){return(e.width??0)*(e.height??0)}function Bd(e){if(e.length===0)return[];let t=e.map((e,t)=>({s:e,i:t,px:zd(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 Vd(e){let t=e.height??0,n=e.width??0;return t>=1080||n>=1920?`high`:t>=480||n>=640?`mid`:`low`}function Hd(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 Ud(e){return typeof e==`string`}function Wd(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function Gd(e){return Ud(e)&&e.trim()?{url:e}:Wd(e)&&Ud(e.url)&&e.url.trim()?{url:e.url,label:Ud(e.label)?e.label:void 0}:null}function Kd(e){let t=Ud(e.snapshot_url)?e.snapshot_url:void 0;if(Array.isArray(e.streams)){let n=[];for(let t of e.streams){let e=Gd(t);e&&n.push(e)}return{streams:n,snapshot_url:t}}let n=[],r=Ud(e.main_stream_url)?e.main_stream_url:void 0;r&&n.push({url:r,label:Ud(e.main_stream_name)?e.main_stream_name:void 0});let i=Ud(e.sub_stream_url)?e.sub_stream_url:void 0;i&&n.push({url:i,label:Ud(e.sub_stream_name)?e.sub_stream_name:void 0});let a=Ud(e.third_stream_url)?e.third_stream_url:void 0;return a&&n.push({url:a,label:Ud(e.third_stream_name)?e.third_stream_name:void 0}),{streams:n,snapshot_url:t}}function qd(e){if(e.length===0)return{};let t=Bd(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 Jd={streaming:!0,notifications:!0,objectDetection:!1,remoteAccess:!0,agentCluster:!1,smartHome:!0,recordings:!0,backup:!0,repl:!0},Yd={debug:0,info:1,warn:2,error:3};function Xd(e,t){return Yd[e]<=Yd[t]}var Zd=C([`recording`,`events`]),Qd=C([`prune`,`manual-delete`,`rescan`,`retention-run`,`relocate`,`orphan-audit`]),$d=C([`retention`,`quota`,`manual`,`operator`,`maintenance`,`orphaned-device`]),ef=d({id:l(),at:i(),domain:Zd,op:Qd,reason:$d,deviceId:i().nullable(),nodeId:l(),itemsAffected:i(),bytesReclaimed:i(),detail:l().nullable(),actor:l()}),tf=d({deviceId:i().optional(),limit:i().int().min(1).max(1e3).optional()}),nf=500,rf=200,af=d({id:l(),name:l(),category:l().optional(),description:l().optional(),icon:l().optional()}),of=[`person`,`vehicle`,`animal`,`package`],sf=[`person`,`vehicle`,`animal`];function cf(e){return sf.some(t=>t===e)}var lf=d({mapping:x(l(),C(of)),preserveOriginal:T()}),uf={preMs:5e3,postMs:1e4},df=i().int().min(0).max(6),ff=/^([01]\d|2[0-3]):[0-5]\d$/,pf=C([`off`,`events`,`continuous`,`on-device-decision`]),mf=C(sf),hf=e=>new Set(e).size===e.length,gf=16,_f=-30,vf=d({motion:T().optional(),audioThresholdDbfs:i().optional(),objectClasses:w(mf).min(1).refine(hf,{message:`objectClasses must not repeat a class`}).optional(),sensorDeviceIds:w(i().int().positive()).min(1).max(16).refine(hf,{message:`sensorDeviceIds must not repeat a device`}).optional()}),yf=C([`continuous`,`events`]),bf=vf,xf=C([`on`,`muted`]),Sf=d({days:w(df),start:l().regex(ff),end:l().regex(ff),mode:yf,audio:xf.optional(),triggers:bf.optional(),preBufferSec:i().min(0).optional(),postBufferSec:i().min(0).optional()}),Cf={postBufferSec:30};function wf(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 Tf=Cf.postBufferSec*1e3,Ef=d({maxAgeDays:i().min(0).optional(),maxSizeGb:i().min(0).optional()}),Df=d({enabled:T(),mode:pf.optional(),profiles:w(j).optional(),segmentSeconds:i().int().positive().optional(),bands:w(Sf).default([]),deviceDecision:T().optional(),retention:Ef.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 Of(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 kf=[`high`,`low`];function Af(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=>kf.includes(e));return n.length>0?n:[...e]}var jf=[`motion`,`audioThresholdDbfs`,`objectClasses`,`sensorDeviceIds`];function Mf(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function Nf(e){return Mf(e)&&Mf(e.triggers)&&e.triggers.deviceSignal===!0}function Pf(e){let t=e.triggers;return Mf(t)?jf.some(e=>t[e]!==void 0):!1}function Ff(e){let t=e.triggers;if(!Mf(t))return e;let{deviceSignal:n,...r}=t;return{...e,triggers:r}}function If(e){let t={value:e,migrated:!1,strippedOnly:!1};if(!Mf(e)||!Array.isArray(e.bands)||!e.bands.some(Nf))return t;let n=[];for(let t of e.bands){if(!Nf(t)||!Mf(t)){n.push(t);continue}Pf(t)&&n.push(Ff(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 Lf=C([`queued`,`running`,`done`,`failed`,`cancelled`]),Rf=d({jobId:l(),state:Lf,fromLocationId:l(),toLocationId:l(),deviceId:i().nullable(),entities:w(l()),filesMoved:i().int(),bytesMoved:i().int(),filesTotal:i().int().nullable(),rowsReconciled:i().int().nonnegative().optional(),rowsForgotten:i().int().nonnegative().optional(),startedAt:i(),finishedAt:i().nullable(),error:l().nullable()}),zf=C([`recordings`,`recordingsLow`]),Bf=d({fromLocationId:l(),toLocationId:l(),entities:w(C([`segments`])).optional(),footageClass:zf.optional(),deviceId:i().int().optional(),profiles:w(l()).optional(),throttleMbps:i().min(1).max(1e3).optional(),sinceMs:i().int().optional()}),Vf=d({leaseId:l().min(1)}),Hf=Bf.extend({leaseId:l().min(1)}),Uf=C([`move`,`seal`,`gallery`]),Wf=d({toLocationId:l(),fromLocationId:l().optional(),throttleMbps:i().min(1).max(1e3).optional(),mode:Uf.optional()}),Gf=d({present:T(),rows:i().int().nonnegative().nullable()}),Kf=d({media:Gf,retrainFrames:Gf,anyPresent:T(),total:i().int().nonnegative().nullable()}).nullable(),qf=Wf.extend({leaseId:l().min(1)}),Jf=C([`recordings`,`recordingsLow`,`eventMedia`,`backups`,`galleryMedia`]),Yf=d({recordings:l().min(1).optional(),recordingsLow:l().min(1).optional(),eventMedia:l().min(1).optional(),backups:l().min(1).optional(),galleryMedia:l().min(1).optional()}).refine(e=>Object.keys(e).length>0,{message:`select at least one storage class`}),Xf=d({recordings:l().min(1).optional(),recordingsLow:l().min(1).optional(),eventMedia:l().min(1).optional(),backups:l().min(1).optional(),galleryMedia:l().min(1).optional()}).optional(),Zf=C([`blocking`,`nonBlocking`]),Qf=d({destinations:Yf,sources:Xf,throttleMbps:i().min(1).max(1e3).optional(),mode:Zf.optional()}),$f=C([`planning`,`sealing`,`pausing`,`moving`,`draining`,`verifying`,`repointing`,`refreshing`,`resuming`,`done`,`failed`,`cancelled`]),ep=C([`pipeline`,`recorder`,`analytics`]),tp=d({filesMoved:i().int().nonnegative(),filesTotal:i().int().nonnegative().nullable(),bytesMoved:i().int().nonnegative(),rowsReconciled:i().int().nonnegative().optional(),startedAt:i(),observedAt:i()}),np=d({storageClass:Jf,fromLocationId:l(),toLocationId:l(),freezeSource:T().optional(),moverJobId:l().nullable(),state:Lf.nullable(),error:l().nullable(),progress:tp.nullable()}),rp=d({jobId:l(),phase:$f,mode:Zf,destinations:Yf,sources:Xf,throttleMbps:i(),moves:w(np),pauseLeaseId:l().nullable(),pausedParticipants:w(ep),repointed:T(),cancelRequested:T(),startedAt:i(),updatedAt:i(),finishedAt:i().nullable(),error:l().nullable()}),ip=C([`sharesDeviceWithSource`,`deviceIdentityUnknown`,`unstampedEventMediaRows`,`blockingOnly`,`noMover`]),ap=d({code:ip,storageClass:Jf,message:l()}),op=d({destinations:Yf,sources:Xf,mode:Zf,moves:w(d({storageClass:Jf,fromLocationId:l(),toLocationId:l(),freezeSource:T().optional()})),findings:w(ap)}),sp=C([`footage`,`media`]),cp=d({lane:sp,job:Rf,migrationJobId:l().nullable(),observedAt:i()}),lp=d({storageClass:Jf,fromLocationId:l(),toLocationId:l(),items:i().int().nonnegative().nullable(),bytes:i().int().nonnegative().nullable()}),up=d({classes:w(Jf).min(1),throttleMbps:i().min(1).max(1e3).optional()}),dp=d({fromLocationId:l().min(1),footageClass:zf.optional()}),fp=d({segments:i().int().nonnegative(),bytes:i().int().nonnegative()}).nullable(),pp=d({locationId:l().min(1),apply:T().optional(),deviceId:i().int().positive().optional(),profiles:w(l().min(1)).optional()}),mp=C([`location-unknown`,`source-writable`,`no-ledger`,`archive-unreadable`,`anchor-absent`,`anchor-unreadable`,`anchor-moved`]),hp=C([`live-tail`,`listing-error`,`path-mismatch`,`durable-refused`]),gp=d({"live-tail":i().int().nonnegative(),"listing-error":i().int().nonnegative(),"path-mismatch":i().int().nonnegative(),"durable-refused":i().int().nonnegative()}),_p=d({deviceId:i().int(),hoursWalked:i().int().nonnegative(),hoursMissing:i().int().nonnegative(),ghostSegments:i().int().nonnegative(),ghostBytes:i().int().nonnegative(),forgottenSegments:i().int().nonnegative(),orphanFiles:i().int().nonnegative()}),vp=d({locationId:l(),applied:T(),refused:mp.nullable(),archiveSegments:i().int().nonnegative().nullable(),archiveBytes:i().int().nonnegative().nullable(),hoursClaimed:i().int().nonnegative(),hoursWalked:i().int().nonnegative(),hoursMissing:i().int().nonnegative(),listings:i().int().nonnegative(),segmentsClaimed:i().int().nonnegative(),ghostSegments:i().int().nonnegative(),ghostBytes:i().int().nonnegative(),ghostHoursWhole:i().int().nonnegative(),forgottenSegments:i().int().nonnegative(),forgottenBytes:i().int().nonnegative(),orphanFiles:i().int().nonnegative(),orphanSample:w(l()).readonly(),hoursSkipped:i().int().nonnegative(),skippedByReason:gp,bounded:T(),byDevice:w(_p).readonly()}),yp=d({rows:i().int().nonnegative()}).nullable(),bp=d({toLocationId:l().min(1),fromLocationId:l().optional(),mode:Uf.optional()}),xp=C([`orphans`,`debug-media`,`ghost-ledger`,`done`,`failed`,`cancelled`]),Sp=d({includeDebugMedia:T().optional()}),Cp=d({jobId:l(),phase:xp,includeDebugMedia:T(),orphansReclaimed:i().int().nonnegative(),orphanBytesReclaimed:i().int().nonnegative(),debugMediaReclaimed:i().int().nonnegative(),debugMediaBytesReclaimed:i().int().nonnegative(),ghostsForgotten:i().int().nonnegative(),ghostBytesForgotten:i().int().nonnegative(),detail:l().nullable(),cancelRequested:T(),startedAt:i(),updatedAt:i(),finishedAt:i().nullable(),error:l().nullable()}),wp=d({jobId:l().optional()});async function Tp(e){let t=e=>{throw Error(`mover refused: ${e}`)},n=async()=>{try{return await e.clearance(e.locationIds)}catch(e){return t(`the storage orchestrator could not be asked (${e instanceof Error?e.message:String(e)})`)}},r=e=>`a re-point of "${e.repointLocationId??`a location`}" holds an overlapping storage root`,i=await n();if(!i.clear)return t(r(i));let a=e.start(),o=await n().catch(t=>{throw e.cancel(a),t});return o.clear?a:(e.cancel(a),t(r(o)))}var Ep=[`face`,`plate`],Dp=[`face`,`plate`,`clip`,`custom`],Op=[`active`,`readonly`,`drain`,`disabled`],kp=C(Op),Ap=C([`normal`,`never`,`drain`]),jp=`readOnly`;function Mp(e){return e===`active`}function Np(e){return e!==`disabled`}function Pp(e){switch(e){case`active`:return`normal`;case`drain`:return`drain`;case`readonly`:case`disabled`:return`never`}}function Fp(e){return e.mode===void 0&&(e.config.readOnly===!0||e.enabled===!1)?`readonly`:null}function Ip(e){return(Lp(e.mode)?e.mode:void 0)??Fp(e)??`active`}function Lp(e){return Op.some(t=>t===e)}function Rp(e){return Mp(Ip(e))}function zp(e){return Np(Ip(e))}function Bp(e){return Pp(Ip(e))}function Vp(e){if(!(`readOnly`in e))return e;let t={...e};return delete t[jp],t}function Hp(e,t){return{...e,mode:t,enabled:Mp(t),config:Vp(e.config)}}var Up=l().regex(/^[a-z][a-zA-Z0-9-]*$/),Wp=d({id:l().regex(/^[a-z][a-zA-Z0-9-]*:[a-zA-Z0-9-]+$/),type:l(),displayName:l().min(1),providerId:l().min(1),config:x(l(),o()),nodeId:l().optional(),isSystem:T().default(!1),enabled:T().optional(),mode:kp.optional(),capacity:d({totalBytes:i(),availableBytes:i()}).nullable().optional(),owned:d({bytes:i().int().nonnegative(),measuredAtMs:i().int().nonnegative()}).optional(),createdAt:i(),updatedAt:i()}),Gp=d({isDefault:T().optional()});function Kp(e){return Rp({...e,config:e.config??{}})}var qp=1024**3;function Jp(e){return Math.floor(e*qp)}var Yp=d({locationId:l(),startedAtMs:i(),startBytes:i(),bytesRemaining:i(),drained:T(),estimatedEmptyAtMs:i().nullable()}),Xp=f([Up,l().regex(/^[a-z][a-zA-Z0-9-]*:[a-zA-Z0-9-]+$/)]),Zp=C([`local-path`,`cap-mediated`]),Qp=`local-path`,$p=d({id:l().regex(/^[a-z][a-zA-Z0-9-]*$/,{message:`id must start with a lowercase letter and contain only letters, digits, or hyphens`}),displayName:l().min(1,{message:`displayName must not be empty`}),description:l().optional(),cardinality:C([`single`,`multi`]),access:Zp.optional(),defaultsTo:l().optional(),defaultRoot:C([`data`,`media`,`backup`]).optional()}),em={offsetHours:1,startMonth:3,startWeekIndex:5,startWeekday:`Sunday`,startHour:2,endMonth:10,endWeekIndex:5,endWeekday:`Sunday`,endHour:3},tm={offsetHours:1,startMonth:3,startWeekIndex:2,startWeekday:`Sunday`,startHour:2,endMonth:11,endWeekIndex:1,endWeekday:`Sunday`,endHour:2},nm=[{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:em},{id:`Europe/Rome`,label:`Europe/Rome (UTC+1 / CEST)`,region:`Europe`,stdOffsetMinutes:60,dst:em},{id:`Europe/Paris`,label:`Europe/Paris (UTC+1 / CEST)`,region:`Europe`,stdOffsetMinutes:60,dst:em},{id:`Europe/Berlin`,label:`Europe/Berlin (UTC+1 / CEST)`,region:`Europe`,stdOffsetMinutes:60,dst:em},{id:`Europe/Madrid`,label:`Europe/Madrid (UTC+1 / CEST)`,region:`Europe`,stdOffsetMinutes:60,dst:em},{id:`Europe/Amsterdam`,label:`Europe/Amsterdam (UTC+1 / CEST)`,region:`Europe`,stdOffsetMinutes:60,dst:em},{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:tm},{id:`America/Chicago`,label:`America/Chicago (UTC−6 / CDT)`,region:`Americas`,stdOffsetMinutes:-360,dst:tm},{id:`America/Denver`,label:`America/Denver (UTC−7 / MDT)`,region:`Americas`,stdOffsetMinutes:-420,dst:tm},{id:`America/Los_Angeles`,label:`America/Los Angeles (UTC−8 / PDT)`,region:`Americas`,stdOffsetMinutes:-480,dst:tm},{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 rm(e){return nm.find(t=>t.id===e)}var im=C([`info`,`warn`,`error`]),am=d({name:l().min(3).regex(/^[a-z0-9-]+(\.[a-z0-9-]+)+$/,`a channel name is dotted lower-kebab, e.g. area.thing`),description:l().min(1),defaultLevel:im,perDevice:T()}),om=d({channel:l().min(1),armedUntilMs:i(),deviceIds:w(i().int()).readonly().nullable()}),sm=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}},cm=class{gates=new Map;declare(e){let t=am.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 sm(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}},lm=null;function um(){return lm??=new cm,lm}function dm(e){return um().declare(e)}function fm(){lm=null}var pm=5e3;function mm(e,t={}){let n=um(),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 hm=16,gm=1024,_m=`other`;function vm(e,t,n){return n===void 0?`${e}${t}`:`${e}${t}${n}`}var ym=class{maxKeys;maxReasons;counters=new Map;refused=0;constructor(e=gm,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=vm(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:_m;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 bm(e){return e.attempts<=0?null:(e.attempts-e.succeeded)/e.attempts}var xm=`__unattributed__`,Sm=`__root__`;function Cm(e){return e.addonId===null?e.classification===`root`?{key:Sm,kind:`root`}:{key:xm,kind:`unattributed`}:{key:e.addonId,kind:`addon`}}function wm(e){return Math.round(e*10)/10}function Tm(e,t){let n=new Map;for(let t of e){let{key:e,kind:r}=Cm(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?wm(n.main):null,i=n.splitKnown?wm(n.gc):null,a=wm(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 Em(e,t){return e===null||t===null?null:e<t?e:t}function Dm(e,t){return e===null||t===null?null:e>t?e:t}function Om(e,t,n){return{atMs:n,samples:e.samples+t.samples,cpuMainPercent:Dm(e.cpuMainPercent,t.cpuMainPercent),cpuMainPercentMin:Em(e.cpuMainPercentMin,t.cpuMainPercentMin),cpuGcPercent:Dm(e.cpuGcPercent,t.cpuGcPercent),cpuGcPercentMin:Em(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 km(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 Am(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}:Om(a,i,e))}return[...r.values()].toSorted((e,t)=>e.atMs-t.atMs)}function jm(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=Mm(e,s);if(t)return a(t)}}return a(o[0])}function Mm(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)=>au(e.pixels,t.pixels,n))[0]?.entry}function Nm(e){return e===`modelId`||e.endsWith(`ModelId`)||e.startsWith(`minConfidence`)}function Pm(e){return Object.keys(e).filter(Nm).toSorted()}function Fm(e){return Object.fromEntries(Object.entries(e).filter(([e])=>!Nm(e)))}var Im=1,Lm=96,Rm={upperHs:[0,32],upperV:[32,40],upperGrad:[40,48],lowerHs:[48,80],lowerV:[80,88],lowerGrad:[88,96]},zm=!1,Bm=[`motion`,`objects`,`discarded`,`stationary`],Vm=[`motion`,`objects`,`stationary`],Hm={borderWidth:2,dashed:!0,dashPattern:[6,4],opacity:1,borderRadius:2};function Um(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 Wm=[`onnx`,`coreml`,`openvino`,`tflite`,`pt`],Gm={yolo26:`YOLO26`,"yolo26-seg":`YOLO26-seg`,yolov9:`YOLOv9`};function Km(e){return Gm[e]??e.toUpperCase()}var qm={"yolo26-seg":`detection + masks, slightly heavier`},Jm=/\s*@\s*\d+\s*(?:[x×]\s*\d+)?/gi;function Ym(e,t){let n=Km(e),r=t.replace(RegExp(`^${n}\\s+`,`i`),``).replace(Jm,``).trim();return r.length>0?r:t}function Xm(e,t){let n=[];return t===`test`&&n.push(`Test`),n.push(e===`int8`?`Int8`:`Standard`),n.join(` · `)}function Zm(e){return Wm.filter(t=>e.formats[t]!==void 0)}function Qm(e){let t=Wm.map(t=>e.formats[t]?.sizeMB).filter(e=>typeof e==`number`);return t.length>0?Math.min(...t):0}var $m=[`t`,`n`,`s`,`m`,`c`,`l`,`x`],eh=[`fp32`,`int8`];function th(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:Xm(t,n),formats:Zm(e),sizeMB:Qm(e)}}).toSorted((e,t)=>e.resolution===t.resolution?e.optimization===t.optimization?eh.indexOf(e.precision)-eh.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?Ym(e,o.name):n.toUpperCase(),baseModelId:a.modelId,options:r})}t.sort((e,t)=>{let n=$m.indexOf(e.tier),r=$m.indexOf(t.tier);return n!==-1&&r!==-1?n-r:n===-1?r===-1?e.tier.localeCompare(t.tier):1:-1});let i=qm[e];n.push({family:e,label:Km(e),...i===void 0?{}:{hint:i},tiers:t})}return n.sort((e,t)=>e.family.localeCompare(t.family)),n}function nh(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 rh(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 ih=/^object-clip-[a-z0-9][a-z0-9-]*$/,ah=d({textModelId:l().min(1),embeddingDim:i().int().positive(),vectorIndex:l().regex(ih),tokenizerFile:l().min(1),contextLength:i().int().positive(),padId:i().int().nonnegative(),searchMinScore:i().min(0).max(1)}),oh=[`loose`,`balanced`,`strict`],sh=C(oh),ch={loose:1,balanced:1.25,strict:1.5};function ere(e,t){if(t.minScore!==void 0)return t.minScore;let n=ch[t.strictness??`loose`];return Math.min(1,Math.round(e.searchMinScore*n*1e3)/1e3)}var lh=[`animal-classifier`,`vehicle-classifier`,`package-detection`],uh=[`plate-detection`,`face-detection`],dh=[`segmentation`],fh=[...lh,...uh,...dh];function tre(e){return fh.some(t=>t===e)}function ph(e){return lh.some(t=>t===e)}var mh={"animal-classifier":[`bird`,`cat`,`cow`,`deer`,`dog`,`horse`,`sheep`,`squirrel`],"vehicle-classifier":[`Ambulance`,`Bicycle`,`Bus`,`Car`,`Motorcycle`,`Taxi`,`Truck`,`Van`],"package-detection":[`package`]},hh={"animal-classifier":`animal`,"vehicle-classifier":`vehicle`,"package-detection":`package`},nre={"animal-classifier":{},"vehicle-classifier":{school_bus:`Bus`,garbage_truck:`Truck`},"package-detection":{}},gh={"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}},_h={"animal-classifier":!0,"vehicle-classifier":!0,"package-detection":!0,"plate-detection":!1,"face-detection":!1,segmentation:!0},vh=`useRootModel`,rre=`labelLink`,yh=`detector-link:`;function ire(e){return`${yh}${e}`}function are(e){if(e===void 0||!e.startsWith(`detector-link:`))return;let t=e.slice(14);return ph(t)?t:void 0}function ore(e,t){let n=nre[e][t];if(n!==void 0)return n;let r=t.toLowerCase();return mh[e].find(e=>e.toLowerCase()===r)}function bh(e,t){let n=[];if(t!==void 0)for(let r of lh){let i={};for(let n of e){if(t.mapping[n]!==hh[r])continue;let e=ore(r,n);e!==void 0&&(i[n]=e)}let a=new Set(Object.values(i));if(a.size===0)continue;let o=mh[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 uh){let t=gh[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 xh=[`yolo-seg`];function Sh(e){return e===void 0||!xh.includes(e)?[]:dh.map(e=>({kind:`mask`,stepId:e}))}function sre(e,t){let n=e?.suppliesSteps??bh(e!==void 0&&e.labels.length>0?e.labels.map(e=>e.id):t.labels,e?.classMap??t.classMap),r=Sh(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 Ch(e,t){return e?.find(e=>e.stepId===t)}function wh(e,t){let n=t?.[vh];if(typeof n==`boolean`)return n;let r=t?.[rre];return r===`skip-when-filled`?!0:r===`run`?!1:_h[e]}function cre(e){if(e.kind!==`crop`)return;let t=gh[e.stepId].minRootInputPx;if(t!==void 0)return e.rootInputPx!==void 0&&e.rootInputPx>=t?void 0:`root-input-too-small`}function lre(e,t,n){let r=Ch(n,e),i=wh(e,t),a=r===void 0?`root-does-not-declare`:cre(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 ure(e,t){let n=t?.enabledClasses;return!Array.isArray(n)||n.length===0?!0:n.some(t=>t===e)}function dre(e){return gh[e].servedChildSteps}var fre=.9;function pre(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 mre={"animal-classifier":`animals`,"vehicle-classifier":`vehicles`,"package-detection":`packages`,"plate-detection":`plates`,"face-detection":`faces`,segmentation:`masks`};function Th(e){let t=mre[e.stepId];if(e.kind!==`label`)return t;let n=mh[e.stepId].length;return n<=1?t:`${t} ${String(n-e.uncovered.length)}/${String(n)}`}function hre(e){return(e??[]).map(Th).join(` · `)}var Eh=d({url:l(),sizeMB:i(),isDirectory:T().optional(),files:w(l()).readonly().optional(),runtimes:w(C([`python`])).readonly().optional(),revision:l().min(1).optional()}),Dh=C([`current`,`stale`,`missing`]),Oh=C([`fp32`,`fp16`,`int8`]),kh=d({downloaded:T(),sizeMB:i(),onDisk:Dh.optional(),precision:Oh.optional()}),Ah=d({url:l(),filename:l(),sizeMB:i()}),jh=d({onnx:Eh.optional(),coreml:Eh.optional(),openvino:Eh.optional(),tflite:Eh.optional(),pt:Eh.optional(),gguf:Eh.optional()}),Mh=d({family:l(),tier:l(),precision:C([`fp32`,`int8`]).optional(),optimization:C([`standard`,`test`]).optional(),resolution:i().int().positive().optional()}),Nh=[`camstack`,`frigate`,`scrypted`,`custom`],Ph=C(Nh);function gre(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 Fh=[`camstack-hf`,`third-party`,`built-in`],Ih=n(e=>typeof e==`string`?{weights:e}:e,d({weights:l().min(1),code:l().min(1).optional(),data:d({name:l().min(1),terms:l().min(1),url:l().url().optional()}).optional(),upstream:d({name:l().min(1),url:l().url()}).optional(),url:l().url().optional(),attribution:l().min(1).optional(),modifications:l().min(1).optional(),hosting:C(Fh).optional(),nonCommercial:T().optional()})),Lh=m(`kind`,[d({kind:h(`label`),stepId:C(lh),labelToEffect:x(l(),l()),uncovered:w(l()).readonly()}),d({kind:h(`crop`),stepId:C(uh),rootLabels:w(l()).readonly(),parentMacro:C([`vehicle`,`person`]),childClass:C([`plate`,`face`]),rootInputPx:i().int().positive().optional()}),d({kind:h(`mask`),stepId:C(dh)})]),Rh=d({id:l(),name:l(),description:l(),formats:jh,inputSize:d({width:i(),height:i()}),inputChannels:i().int().positive().optional(),labels:w(af).readonly(),inputLayout:C([`nchw`,`nhwc`]).optional(),inputNormalization:C([`zero-one`,`imagenet`,`none`,`scrfd`]).optional(),outputProbabilities:T().optional(),preprocessMode:C([`letterbox`,`resize`]).optional(),postprocessor:v().optional(),defaultConfidence:i().min(0).max(1).optional(),defaultClassFloors:x(l(),i().min(0).max(1)).optional(),gpuInferencePrecision:C([`f32`,`f16`]).optional(),suppliedLabelFloors:x(l(),i().min(0).max(1)).optional(),faceAlignment:T().optional(),extraFiles:w(Ah).readonly().optional(),legacy:T().optional(),metrics:d({map50:i().optional(),p95LatencyMs:x(l(),i()).optional()}).optional(),license:Ih.optional(),group:Mh.optional(),provider:Ph.optional(),classMap:lf.optional(),suppliesSteps:w(Lh).readonly().optional(),clip:ah.optional()}),zh=m(`format`,[d({format:h(`openvino`),precisions:w(C([`fp16`,`int8`])).min(1).readonly()}),d({format:h(`coreml`)})]),Bh=d({id:l().regex(/^[a-zA-Z0-9._-]+$/),name:l(),labels:w(af).readonly(),inputSize:d({width:i(),height:i()}),inputLayout:C([`nchw`,`nhwc`]).optional(),inputNormalization:C([`zero-one`,`imagenet`,`none`,`scrfd`]).optional(),preprocessMode:C([`letterbox`,`resize`]).optional(),outputFormat:C([`yolo`,`ssd`,`embedding`,`classification`,`ocr`,`segmentation`]),faceAlignment:T().optional(),classMap:lf.optional()}),Vh=d({format:C(ia),precision:C([`fp16`,`int8`]).optional(),sizeMB:i(),validated:T(),files:w(l()).readonly()}),Hh=d({entry:Rh,artifacts:w(Vh).readonly()});function Uh(e){switch(e.toUpperCase()){case`GET`:case`HEAD`:case`OPTIONS`:return`view`;case`POST`:case`PUT`:case`PATCH`:return`create`;default:return`delete`}}function _re(e,t){return e.some(e=>e.type===`category`&&e.target===`device`&&e.access.includes(t))}function Wh(e,t,n){return e.some(e=>e.type===`addon`&&e.target===t&&e.access.includes(n))}function vre(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 yre(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=Uh(e.method);return Wh(e.scopes,e.addonId,n)?{allowed:!0}:{allowed:!1,reason:`integration token holds no addon:${e.addonId}[${n}] grant`}}var Gh=[`face-assignment`,`plate-assignment`,`retrain`,`scenes`],Kh=C(Gh),bre=[{id:`face-assignment`,label:`Faces`,description:`See recognised people and assign, rename, merge or delete faces.`,viewerSections:[`review`]},{id:`plate-assignment`,label:`License plates`,description:`See plates and vehicles, correct plate text, assign or delete plates.`,viewerSections:[`plates`]},{id:`retrain`,label:`Training data`,description:`Pick and annotate frames for retraining and manage their collections.`,viewerSections:[`retrain`]},{id:`scenes`,label:`Scenes`,description:`Create, check and reset monitored scenes.`,viewerSections:[`scenes`]}],qh=f([h(`*`),w(i().int().nonnegative())]),Jh=d({type:h(`viewer`),allow:qh,block:w(i().int().nonnegative()),features:w(Kh)}),xre={type:`viewer`,allow:`*`,block:[],features:[]};function Yh(e){return typeof e==`string`?e:`feature:${e.feature}`}function Xh(e){if(!e.startsWith(`feature:`))return null;let t=Kh.safeParse(e.slice(8));return t.success?t.data:null}function Sre(e){return e.methodRole===void 0?e.capRole===void 0?e.auth===`public`?`public`:e.auth===`admin`||e.auth===`superAdmin`?`admin`:e.capScope===`device`?`viewer`:`admin`:Yh(e.capRole):Yh(e.methodRole)}function Zh(e,t,n){let r=n?.(t)??null;if(r===null)return e.block.includes(t)?!1:e.allow===`*`?e.block.length===0:e.allow.includes(t);let i=[t,...r];if(i.some(t=>e.block.includes(t)))return!1;if(e.allow===`*`)return!0;let a=e.allow;return i.some(e=>a.includes(e))}function Cre(e,t){if(t===`public`||t===`viewer`)return!0;if(t===`admin`)return!1;let n=Xh(t);return n!==null&&e.features.includes(n)}var Qh=C([`view`,`create`,`delete`]),wre=f([h(`*`),w(l())]),Tre=x(l(),f([h(`*`),w(l())])),$h=C([`device`,`system`]),eg=m(`kind`,[d({kind:h(`all`)}),d({kind:h(`ids`),ids:w(i().int()).min(1)}),d({kind:h(`types`),types:w(C(P)).min(1)}),d({kind:h(`locations`),locations:w(l().min(1)).min(1)})]),Ere=d({type:h(`device`),selector:eg,access:w(Qh).min(1),includeLinked:T().optional()});function Dre(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 tg=n(Dre,m(`type`,[d({type:h(`category`),target:$h,access:w(Qh).min(1)}),d({type:h(`capability`),target:l(),access:w(Qh).min(1)}),d({type:h(`addon`),target:l(),access:w(Qh).min(1)}),Ere])),ng=f([Jh,tg]),Ore=d({id:l(),username:l(),passwordHash:l(),isAdmin:T().default(!1),allowedProviders:wre,allowedDevices:Tre,scopes:w(ng).default([]),createdAt:i(),updatedAt:i()}),kre=d({id:l(),userId:l(),name:l(),tokenHash:l(),tokenPrefix:l(),scopes:w(tg),expiresAt:i().nullish(),lastUsedAt:i().nullish(),createdAt:i()}),Are=`*`,jre=64,rg=d({kind:C(Tn),deviceIds:w(i().int().nonnegative()).min(1).max(64),talk:T().optional()}),ig=d({type:h(`share-view`),grant:rg}),ag=d({type:h(`addon-routes`),access:w(Qh).min(1)}),og=d({type:h(`preferences-self`)}),Mre={type:`preferences-self`},sg=f([h(`*`),ig,ag,og,Jh,tg]),Nre=[`view`,`create`,`delete`];function Pre(e){return e!==`*`&&e.type!==`share-view`&&e.type!==`addon-routes`&&e.type!==`preferences-self`}function Fre(e){return e.includes(`*`)}function cg(e){for(let t of e)if(t!==`*`&&t.type===`share-view`)return t.grant;return null}function Ire(e){return e.filter(Pre)}function Lre(e,t){return e.some(e=>e!==`*`&&e.type===`addon-routes`&&e.access.includes(t))}function Rre(e){return cg(e)===null?e.some(e=>e!==`*`&&e.type===`preferences-self`):!1}function zre(e){let t=w(sg).safeParse(e);return t.success?t.data:null}var lg=`credential`,Bre=`camstack:credential`;function Vre(e){if(typeof e!=`object`||!e)return!1;let t=Reflect.get(e,`kind`),n=Reflect.get(e,`aud`);return t===`credential`||n===`camstack:credential`||Array.isArray(n)&&n.includes(`camstack:credential`)}var Hre=d({kind:h(lg),sub:l().min(1),jti:l().min(16),scopes:w(sg).min(1)}),ug=/^[a-z][a-z0-9.-]{0,63}$/,Ure=256*1024,Wre=32,Gre=64,dg=l().regex(ug),fg=x(l(),o()),pg=l().min(1).max(64),mg=d({namespace:dg,value:fg,revision:i().int().positive(),updatedAt:i().int(),updatedByDevice:pg.nullable()}),Kre=d({namespaces:w(dg).max(32).optional()}),qre=d({rows:w(mg)}),Jre=d({namespace:dg,value:fg,baseRevision:i().int().nonnegative().optional(),deviceId:pg.optional()}),Yre=m(`status`,[d({status:h(`saved`),row:mg}),d({status:h(`conflict`),current:mg.nullable()})]),Xre=d({namespace:dg}),Zre=d({deleted:T()}),Qre=d({revisionByNamespace:x(dg,i().int().nonnegative()).refine(e=>Object.keys(e).length<=32,{message:`at most 32 namespaces`})}),$re=d({rows:w(mg),deleted:w(dg)}),hg=[`camstack://auth-callback`,`camstack.dev://auth-callback`],eie=512;function gg(e){return e.replace(/^([a-z][a-z0-9.+-]*):\/\/\/(?!\/)/i,`$1://`).replace(/\/$/,``)}function _g(e){if(typeof e!=`string`||e.length===0||e.length>512)return null;let t=gg(e);return hg.includes(t)?t:null}function tie(e){return/^[a-z][a-z0-9+.-]*:/i.test(e)}var vg=C([`new-session`,`step-up`]),yg=C([`en`,`it`]);function bg(e){let t=yg.safeParse(e);return t.success?t.data:void 0}var xg=`camstack://auth-callback`,nie=`a.`,rie=/^[A-Za-z0-9_-]{43}$/,iie=/^[A-Za-z0-9._~-]{1,256}$/,Sg={"bad-challenge":`The sign-in request has no valid PKCE challenge (S256).`,"bad-challenge-method":`Only the S256 PKCE method is supported.`,"bad-state":`The sign-in request has no valid state.`,"bad-purpose":`The sign-in request names an unknown purpose.`,"bad-redirect":`The sign-in request names a return address this hub does not accept.`},Cg={...Sg,"combined-flow":`An app sign-in cannot be combined with linking or a popup.`},aie=`/auth/app/refused`;function oie(e){return typeof e==`string`&&Object.hasOwn(Cg,e)}function sie(e){let t=e.code_challenge;if(t===void 0||!rie.test(t))return{ok:!1,reason:`bad-challenge`};if(e.code_challenge_method!==`S256`)return{ok:!1,reason:`bad-challenge-method`};let n=e.state;if(n===void 0||!iie.test(n))return{ok:!1,reason:`bad-state`};let r=vg.safeParse(e.purpose);if(!r.success)return{ok:!1,reason:`bad-purpose`};let i=e.redirect,a=i===void 0?xg:_g(i);if(a===null)return{ok:!1,reason:`bad-redirect`};let o=bg(e.lang);return{ok:!0,request:{codeChallenge:t,state:n,purpose:r.data,redirect:a,...o===void 0?{}:{lang:o}}}}function cie(e,t,n){let r=new URLSearchParams;return`code`in t?r.set(`code`,t.code):r.set(`error`,t.error),n!==void 0&&r.set(`state`,n),`${e}?${r.toString()}`}var wg=m(`kind`,[d({kind:h(`native`)}),d({kind:h(`browser`),startPath:l().startsWith(`/`)})]),lie=`camstack_sso_state`,uie=600,Tg=`ecdsa-p256-sha256`,Eg=`camstack-device-cert-v1`,die=C([`login`,`renew`,`revoke`]),fie=365,pie=30,mie=10*6e4,hie=6e4,gie=`camstack:credential:`,_ie=`camstack:user:`;function vie(e){return[Eg,e.purpose,e.origin,e.nonce].join(`
|
|
4
|
+
`)}function yie(e){let t=new URLSearchParams;return e.hub!==void 0&&t.set(`hub`,e.hub),t.set(`code`,e.code),`${e.scheme??`camstack`}://enroll?${t.toString()}`}function bie(e){let t;try{t=new URL(e)}catch{return null}if(t.protocol!==`camstack:`&&t.protocol!==`camstack.dev:`||t.hostname!==`enroll`)return null;let n=t.searchParams.get(`code`);if(n===null||n===``)return null;let r=t.searchParams.get(`hub`);return{hub:r===null||r===``?null:r,code:n}}var Dg=C([`ios`,`android`,`web`,`other`]),Og=l().min(1).max(4096).regex(/^[A-Za-z0-9_-]+$/),kg=l().min(1).max(16384),Ag=C([`revoked`,`unknown-credential`,`expired`,`bad-signature`,`nonce-invalid`,`rate-limited`,`invalid-certificate`,`superseded`,`user-gone`,`unavailable`,`code-invalid`,`self-enrollment-disabled`,`step-up-required`,`bad-public-key`]),jg=[`revoked`,`unknown-credential`,`user-gone`],xie=3;function Sie(e){return jg.includes(e)}var Mg=d({ok:h(!1),reason:Ag,definitive:T(),retryAfterSeconds:i().optional()}),Cie=`device-credential:`;function wie(e){if(!e.startsWith(`device-credential:`))return null;let t=Ag.safeParse(e.slice(18));return t.success?t.data:null}var Tie=d({code:l().min(1).max(256),publicKeySpki:Og,deviceName:l().min(1).max(80).optional(),platform:Dg}),Ng=d({credentialId:l(),certPem:kg,chainPem:kg,notAfter:i(),user:d({id:l(),username:l()})}),Eie=m(`ok`,[Ng.extend({ok:h(!0)}),Mg]),Die=d({proof:l().min(1).max(512),publicKeySpki:Og,deviceName:l().min(1).max(80),platform:Dg}),Oie=d({proof:l(),expiresAt:i()}),Pg=d({nonce:l(),origin:l(),expiresAt:i(),signature:h(Tg)}),kie=m(`ok`,[Pg.extend({ok:h(!0)}),Mg]),Aie=d({certPem:kg,nonce:l().min(1).max(256),signature:Og}),Fg=d({credentialId:l(),certPem:kg,chainPem:kg,notAfter:i()}),jie=m(`ok`,[Fg.extend({ok:h(!0)}),Mg]),Mie=m(`ok`,[d({ok:h(!0),credentialId:l(),sessionsEnded:i().int()}),Mg]);function Nie(e){return e.kind===`device`?`device`:`${e.kind}:${e.userId}`}var Ig=C([`active`,`expired`,`revoked`]),Lg=d({id:l(),userId:l(),username:l().nullable(),deviceName:l(),platform:Dg,enrolledVia:C([`qr`,`self`]),fingerprint:l(),issuedAt:i(),expiresAt:i(),lastUsedAt:i().nullable(),lastUsedFrom:l().nullable(),revokedAt:i().nullable(),revokedBy:l().nullable(),status:Ig}),Rg=d({code:l(),expiresAt:i(),enrollUrl:l(),hubOrigin:l().nullable(),hubOrigins:w(l())}),Pie=d({kind:h(`device-certificate`),id:h(`device-certificate`),label:l(),stage:h(`primary`),challengePath:h(`auth.getDeviceChallenge`),revokePath:h(`auth.revokeOwnDeviceCertificate`),enrollSelfPath:h(`auth.enrollSelf`),loginPath:h(`auth.loginWithDeviceCertificate`),renewPath:h(`auth.renewDeviceCertificate`),signature:h(Tg),messageVersion:h(Eg),clients:w(C([`native`,`web`])),app:wg.nullable()}),Fie=/^(?:[a-z0-9.-]+|\[[0-9a-f:.]+\])(?::\d{1,5})?$/i,Iie=/^\/[A-Za-z0-9_\-.]+(?:\/[A-Za-z0-9_\-.]+)*$/,Lie=512;function zg(e){if(e===void 0)return null;let t=e.split(`,`)[0]?.trim()??``;return t.length===0?null:t}function Bg(e){try{let t=new URL(e);return t.protocol!==`https:`&&t.protocol!==`http:`||t.username!==``||t.password!==``?null:t.origin}catch{return null}}function Rie(e){let t=e[`x-forwarded-prefix`];if(t===void 0||t.length===0||t.length>Lie)return``;let n=t.endsWith(`/`)?t.slice(0,-1):t;return n===``||!Iie.test(n)||n.split(`/`).some(e=>e===`..`||e===`.`)?``:n}function Vg(e){let t=zg(e[`x-forwarded-host`])??zg(e.host);if(t===null||!Fie.test(t))return[];let n=zg(e[`x-forwarded-proto`])?.toLowerCase()??null,r=n===`https`||n===`http`?[n]:n===null?[`https`,`http`]:[],i=[];for(let e of r){let n=Bg(`${e}://${t}`);n!==null&&i.push(n)}return i}function zie(e){let t=[];for(let n of e.rows)n.kind===`app-link`||n.kind===`loopback`||t.push(n.baseUrl);let{publicEndpoint:n,internal:r,appConnections:i}=e.roles;n.resolved!==null&&t.push(n.resolved),r.resolved!==null&&t.push(r.resolved),t.push(...i.resolved),t.push(...e.listenerOrigins??[]);let a=new Set;for(let e of t){let t=Bg(e);t!==null&&a.add(t)}return a}function Bie(e,t){for(let n of Vg(e))if(t.has(n))return n;return null}var Hg=d({kind:h(`field`).optional(),sourceKey:l(),cap:l(),fieldPath:l()}),Ug=d({kind:h(`literal`),value:f([l(),i(),T(),b()])}),Wg=d({kind:h(`global`),sourceStableId:l(),cap:l(),fieldPath:l()}),Gg=f([Hg,Ug,Wg]),Vie=d({expr:l().min(1).max(zo),bindings:x(l().regex(Bo),Gg)}).superRefine((e,t)=>{let n=vs(e);n!==null&&t.addIssue({code:`custom`,message:n,path:[`expr`]})}),Hie=3,Uie=32,Kg=C([`eq`,`ne`,`gt`,`gte`,`lt`,`lte`,`contains`,`in`]),Wie=d({kind:h(`condition`),deviceId:i().int().nonnegative(),cap:l().min(1),fieldPath:l().min(1),operator:Kg,value:f([l(),i(),T(),w(f([l(),i()]))])}),Gie=d({kind:h(`expression`),expr:l().min(1).max(zo),bindings:x(l().regex(Bo),Gg)}).superRefine((e,t)=>{let n=vs(e);n!==null&&t.addIssue({code:`custom`,message:n,path:[`expr`]})}),qg=fe(()=>m(`kind`,[d({kind:h(`all`),children:w(qg)}),d({kind:h(`any`),children:w(qg)}),d({kind:h(`not`),child:qg}),Wie,Gie])),Jg=m(`kind`,[d({kind:h(`device-state`),deviceId:i().int().nonnegative(),cap:l().min(1),fieldPath:l().min(1),becomes:f([l(),i(),T()]).optional(),edge:T().optional(),forMs:i().int().min(0).max(864e5).optional(),debounceMs:i().int().min(0).max(6e5).optional()}),d({kind:h(`device-event`),category:l().min(1),deviceId:i().int().nonnegative().optional()}),d({kind:h(`schedule`),cron:l().min(1).max(120)}),d({kind:h(`manual`)}),d({kind:h(`detection`),classes:w(l().min(1)).min(1),deviceIds:w(i().int().nonnegative()).min(1),zones:w(l().min(1)).min(1).optional(),minScore:i().min(0).max(1).optional()}),d({kind:h(`interval`),minutes:i().int().min(1).max(1440)})]),Yg=d({kind:h(`wait`),seconds:i().min(0).max(300)}),Xg=d({kind:h(`cap`),deviceId:f([i().int(),w(i().int()).min(1),d({$var:l().min(1)})]),cap:l().min(1),method:l().min(1),args:x(l(),o()).optional()}),Zg=m(`kind`,[Yg,Xg]),Qg=m(`kind`,[Yg,Xg,d({kind:h(`action`),actionId:l().min(1),variables:x(l(),f([l(),i(),T()])).optional()}),d({kind:h(`code`),code:l().min(1).max(2e4)})]),$g=m(`mode`,[d({mode:h(`single`)}),d({mode:h(`restart`)}),d({mode:h(`queued`),max:i().int().min(1).max(10)}),d({mode:h(`parallel`),max:i().int().min(1).max(10)}),d({mode:h(`cooldown`),minutes:i().int().min(1).max(1440)})]),Kie=20,qie=100,e_=d({triggers:w(Jg),conditions:qg.optional(),actions:w(Qg),runMode:$g.optional(),keepTraces:i().int().min(1).max(100).optional()});function t_(e){if(e.kind===`condition`||e.kind===`expression`)return 1;if(e.kind===`not`)return 1+t_(e.child);let t=e.children;if(t.length===0)return 1;let n=0;for(let e of t){let t=t_(e);t>n&&(n=t)}return 1+n}function n_(e){if(e.kind===`condition`||e.kind===`expression`)return 1;if(e.kind===`not`)return n_(e.child);let t=0;for(let n of e.children)t+=n_(n);return t}function r_(e){return e.kind===`condition`||e.kind===`expression`?!1:e.kind===`not`?r_(e.child):e.children.length===0?!0:e.children.some(r_)}function i_(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(r_(t))return`a condition group is empty — group existing rows instead of leaving a container to fill`;let e=t_(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=n_(t);if(n>32)return`conditions use ${n} leaves — the limit is 32`}return null}var Jie=15e3;function Yie(e){switch(e.kind){case`wait`:return{kind:`wait`};case`code`:return{kind:`code`};case`action`:return{kind:`action`};case`cap`:return{kind:`cap`,cap:e.cap,method:e.method,...typeof e.deviceId==`number`?{deviceId:e.deviceId}:{}}}}function V(e){return JSON.stringify(e)}function Xie(e,t){switch(e.kind){case`schedule`:return` // trigger ${t}: schedule — armed to the next minute boundary and
|
|
5
|
+
// RE-ARMED from the wall clock every tick, so it cannot drift the way a
|
|
6
|
+
// setInterval(24h) does. No cron library: a block cannot resolve one.
|
|
7
|
+
{
|
|
8
|
+
let timer: ReturnType<typeof setTimeout> | undefined
|
|
9
|
+
const arm = (): void => {
|
|
10
|
+
timer = setTimeout(() => {
|
|
11
|
+
if (cronMatches(${V(e.cron)}, new Date())) {
|
|
12
|
+
void run({ kind: 'schedule', at: Date.now() })
|
|
13
|
+
}
|
|
14
|
+
arm()
|
|
15
|
+
}, nextMinuteBoundary())
|
|
16
|
+
}
|
|
17
|
+
arm()
|
|
18
|
+
disposers.push(() => { if (timer !== undefined) clearTimeout(timer) })
|
|
19
|
+
}`;case`device-event`:return` // trigger ${t}: device event
|
|
20
|
+
disposers.push(
|
|
21
|
+
ctx.eventBus.subscribe(
|
|
22
|
+
{ category: ${V(e.category)}${e.deviceId===void 0?``:`, deviceId: ${V(e.deviceId)}`} },
|
|
23
|
+
(event) => {
|
|
24
|
+
void run({
|
|
25
|
+
kind: 'device-event',
|
|
26
|
+
at: Date.now(),
|
|
27
|
+
deviceId: event.deviceId,
|
|
28
|
+
category: ${V(e.category)},
|
|
29
|
+
})
|
|
30
|
+
},
|
|
31
|
+
),
|
|
32
|
+
)`;case`device-state`:{let n=e.becomes===void 0?`undefined`:V(e.becomes);return` // trigger ${t}: device state — the mirror is the authority, the
|
|
33
|
+
// event only WAKES the evaluation, so a dropped event delays and never loses.
|
|
34
|
+
{
|
|
35
|
+
let previous: unknown = undefined
|
|
36
|
+
let debounce: ReturnType<typeof setTimeout> | undefined
|
|
37
|
+
let heldSince: number | undefined
|
|
38
|
+
const check = async (): Promise<void> => {
|
|
39
|
+
const value = await readField(${V(e.deviceId)}, ${V(e.cap)}, ${V(e.fieldPath)})
|
|
40
|
+
const want = ${n}
|
|
41
|
+
const matches = want === undefined ? value !== previous : value === want
|
|
42
|
+
const changed = value !== previous
|
|
43
|
+
previous = value
|
|
44
|
+
if (!matches) { heldSince = undefined; return }
|
|
45
|
+
if (${e.edge===!0?`true`:`false`} && !changed) return
|
|
46
|
+
const forMs = ${V(e.forMs??0)}
|
|
47
|
+
if (forMs > 0) {
|
|
48
|
+
if (heldSince === undefined) { heldSince = Date.now(); return }
|
|
49
|
+
if (Date.now() - heldSince < forMs) return
|
|
50
|
+
}
|
|
51
|
+
heldSince = undefined
|
|
52
|
+
void run({
|
|
53
|
+
kind: 'device-state',
|
|
54
|
+
at: Date.now(),
|
|
55
|
+
deviceId: ${V(e.deviceId)},
|
|
56
|
+
cap: ${V(e.cap)},
|
|
57
|
+
field: ${V(e.fieldPath)},
|
|
58
|
+
to: value,
|
|
59
|
+
})
|
|
60
|
+
}
|
|
61
|
+
const wake = (): void => {
|
|
62
|
+
if (debounce !== undefined) clearTimeout(debounce)
|
|
63
|
+
debounce = setTimeout(() => { void check() }, ${V(e.debounceMs??0)})
|
|
64
|
+
}
|
|
65
|
+
disposers.push(
|
|
66
|
+
ctx.eventBus.subscribe({ category: 'device.state-changed', deviceId: ${V(e.deviceId)} }, wake),
|
|
67
|
+
)
|
|
68
|
+
const reconcile = setInterval(() => { void check() }, RECONCILE_MS)
|
|
69
|
+
disposers.push(() => clearInterval(reconcile))
|
|
70
|
+
}`}case`manual`:return` // trigger ${t}: manual — fired by automation-control.trigger
|
|
71
|
+
// ("Run actions"), which runs the THEN half with an EMPTY vars bag. A manual
|
|
72
|
+
// run bypasses only the cooldown wait, never the single/queued limits.`;case`interval`:return` // trigger ${t}: interval — every ${e.minutes} min, first run jittered so
|
|
73
|
+
// blocks restarted together do not all fire on the same second.
|
|
74
|
+
{
|
|
75
|
+
let interval: ReturnType<typeof setInterval> | undefined
|
|
76
|
+
const first = setTimeout(() => {
|
|
77
|
+
void run({ kind: 'interval', at: Date.now() })
|
|
78
|
+
interval = setInterval(() => { void run({ kind: 'interval', at: Date.now() }) }, ${V(e.minutes*6e4)})
|
|
79
|
+
}, Math.floor(Math.random() * Math.min(${V(e.minutes*6e4)}, 30_000)) + 1)
|
|
80
|
+
disposers.push(() => {
|
|
81
|
+
clearTimeout(first)
|
|
82
|
+
if (interval !== undefined) clearInterval(interval)
|
|
83
|
+
})
|
|
84
|
+
}`;case`detection`:return` // trigger ${t}: detection — ONE fire per (device, track); a rejected event is
|
|
85
|
+
// traced with its reason and never fires.
|
|
86
|
+
{
|
|
87
|
+
const filter = new DetectionTriggerFilter(${V(e)})
|
|
88
|
+
disposers.push(
|
|
89
|
+
ctx.eventBus.subscribe(
|
|
90
|
+
{ category: EventCategory.PipelineAnalyticsTrackLifecycle },
|
|
91
|
+
(event) => {
|
|
92
|
+
const decision = filter.evaluate(event.data, Date.now())
|
|
93
|
+
if (decision.kind === 'ignore') return
|
|
94
|
+
if (decision.kind === 'reject') {
|
|
95
|
+
ctx.logger.debug('detection trigger rejected an event', {
|
|
96
|
+
tags: { deviceId: decision.vars.deviceId },
|
|
97
|
+
reason: decision.reason,
|
|
98
|
+
})
|
|
99
|
+
}
|
|
100
|
+
void run(
|
|
101
|
+
{ kind: 'detection', at: Date.now(), ...decision.vars },
|
|
102
|
+
decision.reason,
|
|
103
|
+
decision.kind === 'fire',
|
|
104
|
+
)
|
|
105
|
+
},
|
|
106
|
+
),
|
|
107
|
+
)
|
|
108
|
+
}`}}function Zie(e,t){let n=e=>` {
|
|
109
|
+
meta: STEP_META[${t}]!,
|
|
110
|
+
run: async (scope) => {
|
|
111
|
+
${e}
|
|
112
|
+
},
|
|
113
|
+
},`;switch(e.kind){case`wait`:return n(` await sleep(${V(e.seconds*1e3)})`);case`cap`:return Array.isArray(e.deviceId)?n(` for (const deviceId of ${V(e.deviceId)}) {
|
|
114
|
+
scope.setDeviceId(deviceId)
|
|
115
|
+
await actuate(deviceId, ${V(e.cap)}, ${V(e.method)}, ${V(e.args??{})}, vars)
|
|
116
|
+
}`):n(` const deviceId = ${typeof e.deviceId==`number`?V(e.deviceId):`resolveTarget(vars, ${V(e.deviceId.$var)})`}
|
|
117
|
+
scope.setDeviceId(deviceId)
|
|
118
|
+
await actuate(deviceId, ${V(e.cap)}, ${V(e.method)}, ${V(e.args??{})}, vars)`);case`action`:return n(` // an Action run, awaited: the step takes THAT run's outcome
|
|
119
|
+
const result = await ctx.api.actions.run.mutate({
|
|
120
|
+
actionId: ${V(e.actionId)},
|
|
121
|
+
variables: substituteVariables(${V(e.variables??{})}, vars),
|
|
122
|
+
wait: true,
|
|
123
|
+
origin: { blockId: BLOCK_ID ?? undefined },
|
|
124
|
+
})
|
|
125
|
+
if (result.outcome !== 'ran') {
|
|
126
|
+
throw new Error('action ' + ${V(e.actionId)} + ' ' + result.outcome + (result.message === undefined ? '' : ': ' + result.message))
|
|
127
|
+
}`);case`code`:return n(` // inline code action — a fragment of THIS block, bundled by esbuild
|
|
128
|
+
await (async () => {
|
|
129
|
+
${e.code.split(`
|
|
130
|
+
`).map(e=>` ${e}`).join(`
|
|
131
|
+
`)}
|
|
132
|
+
})()`)}}function Qie(e){let t=i_(e.recipe);if(t!==null)throw Error(`cannot generate an automation from an invalid recipe: ${t}`);let{name:n,recipe:r}=e,i=r.runMode??{mode:`single`},a=r.actions.map(Yie);return`import type {
|
|
133
|
+
AddonContext,
|
|
134
|
+
AutomationConditionTraceNode,
|
|
135
|
+
AutomationRunTrace,
|
|
136
|
+
AutomationRunVerdict,
|
|
137
|
+
AutomationStepTrace,
|
|
138
|
+
RunnableStep,
|
|
139
|
+
} from '@camstack/types'
|
|
140
|
+
import {
|
|
141
|
+
ConditionMirror,
|
|
142
|
+
DetectionTriggerFilter,
|
|
143
|
+
EventCategory,
|
|
144
|
+
RunGate,
|
|
145
|
+
buildTriggerTrace,
|
|
146
|
+
collectMirrorSources,
|
|
147
|
+
coreBlockIdFromAddonId,
|
|
148
|
+
evaluateConditionTree,
|
|
149
|
+
isSkippedTrace,
|
|
150
|
+
mergeSkipTraces,
|
|
151
|
+
resolveDeviceTarget,
|
|
152
|
+
resolveStepArgs,
|
|
153
|
+
runSteps,
|
|
154
|
+
} from '@camstack/types'
|
|
155
|
+
|
|
156
|
+
/**
|
|
157
|
+
* ${n}
|
|
158
|
+
*
|
|
159
|
+
* GENERATED FROM A RECIPE — do not edit by hand. Editing this file makes it a
|
|
160
|
+
* script: the visual editor reads AUTOMATION_RECIPE below, and hand edits are
|
|
161
|
+
* lost the next time the recipe is saved. Use "Eject to code" to take ownership
|
|
162
|
+
* of it permanently (one way).
|
|
163
|
+
*/
|
|
164
|
+
|
|
165
|
+
const AUTOMATION_RECIPE = ${JSON.stringify(r,null,2)} as const
|
|
166
|
+
|
|
167
|
+
const RECONCILE_MS = ${Jie}
|
|
168
|
+
|
|
169
|
+
/** How triggers that arrive while busy (or cooling down) are handled. */
|
|
170
|
+
const RUN_MODE = ${V(i)} as const
|
|
171
|
+
|
|
172
|
+
/** Run traces kept (a ring, held in the hub's runs ledger). */
|
|
173
|
+
const KEEP_TRACES = ${r.keepTraces??20}
|
|
174
|
+
|
|
175
|
+
const CONDITIONS = ${r.conditions===void 0?`undefined`:`AUTOMATION_RECIPE.conditions`}
|
|
176
|
+
|
|
177
|
+
/** Skips that repeat are folded into one trace; it goes to the hub after this. */
|
|
178
|
+
const SKIP_FLUSH_MS = 5_000
|
|
179
|
+
|
|
180
|
+
/** Static facts about each action step, for its trace. */
|
|
181
|
+
const STEP_META: ReadonlyArray<{ kind: string; cap?: string; method?: string; deviceId?: number }> = ${V(a)}
|
|
182
|
+
|
|
183
|
+
/** A cap is named \`alarm-panel\`; \`ctx.api\` is keyed by the ROUTER name,
|
|
184
|
+
* \`alarmPanel\`. Indexing ctx.api with the cap name yields undefined and every
|
|
185
|
+
* action throws, so the conversion is not cosmetic. */
|
|
186
|
+
function capToRouterKey(cap: string): string {
|
|
187
|
+
return cap.replace(/-([a-z0-9])/g, (_m, c: string) => c.toUpperCase())
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
/** Ms until the top of the next minute. Recomputed every tick so a long-lived
|
|
191
|
+
* schedule cannot accumulate drift. */
|
|
192
|
+
function nextMinuteBoundary(): number {
|
|
193
|
+
const now = Date.now()
|
|
194
|
+
return 60_000 - (now % 60_000)
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
/** Does \`when\` satisfy a 5-field cron expression (min hour dom mon dow)?
|
|
198
|
+
* Supports wildcards, step syntax, ranges, comma lists and plain numbers —
|
|
199
|
+
* the subset an operator can author, and nothing that needs a library. */
|
|
200
|
+
function cronMatches(expr: string, when: Date): boolean {
|
|
201
|
+
const fields = expr.trim().split(/\\s+/)
|
|
202
|
+
if (fields.length !== 5) return false
|
|
203
|
+
const actual = [
|
|
204
|
+
when.getMinutes(),
|
|
205
|
+
when.getHours(),
|
|
206
|
+
when.getDate(),
|
|
207
|
+
when.getMonth() + 1,
|
|
208
|
+
when.getDay(),
|
|
209
|
+
]
|
|
210
|
+
return fields.every((field, i) => matchField(field, actual[i]!))
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
function matchField(field: string, value: number): boolean {
|
|
214
|
+
for (const part of field.split(',')) {
|
|
215
|
+
const [range, stepRaw] = part.split('/')
|
|
216
|
+
const step = stepRaw === undefined ? 1 : Number.parseInt(stepRaw, 10)
|
|
217
|
+
if (!Number.isFinite(step) || step < 1) continue
|
|
218
|
+
if (range === '*') {
|
|
219
|
+
if (value % step === 0) return true
|
|
220
|
+
continue
|
|
221
|
+
}
|
|
222
|
+
const bounds = range!.split('-')
|
|
223
|
+
const lo = Number.parseInt(bounds[0]!, 10)
|
|
224
|
+
const hi = bounds[1] === undefined ? lo : Number.parseInt(bounds[1], 10)
|
|
225
|
+
if (!Number.isFinite(lo) || !Number.isFinite(hi)) continue
|
|
226
|
+
if (value >= lo && value <= hi && (value - lo) % step === 0) return true
|
|
227
|
+
}
|
|
228
|
+
return false
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
export default function block(ctx: AddonContext) {
|
|
232
|
+
const disposers: Array<() => void> = []
|
|
233
|
+
const gate = new RunGate(RUN_MODE)
|
|
234
|
+
const mirror = new ConditionMirror(collectMirrorSources(CONDITIONS))
|
|
235
|
+
const BLOCK_ID = coreBlockIdFromAddonId(ctx.id)
|
|
236
|
+
/** The cooldown stamp: memory is the authority at fire time (D49); the hub ledger is read once at start. */
|
|
237
|
+
let lastRunStartedAt: number | null = null
|
|
238
|
+
/** True when the stamp could not be read at start — the first run is let through and says so. */
|
|
239
|
+
let stampUnknown = false
|
|
240
|
+
let sendChain: Promise<void> = Promise.resolve()
|
|
241
|
+
let pendingSkip: AutomationRunTrace | undefined
|
|
242
|
+
let skipTimer: ReturnType<typeof setTimeout> | undefined
|
|
243
|
+
let stopped = false
|
|
244
|
+
let runCounter = 0
|
|
245
|
+
const runningTokens = new Set<RunToken>()
|
|
246
|
+
const queue: QueuedRun[] = []
|
|
247
|
+
|
|
248
|
+
interface RunToken {
|
|
249
|
+
aborted: boolean
|
|
250
|
+
wake?: () => void
|
|
251
|
+
}
|
|
252
|
+
interface QueuedRun {
|
|
253
|
+
readonly trigger: Record<string, unknown>
|
|
254
|
+
readonly reason: string
|
|
255
|
+
readonly queuedAt: number
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
/** Sleep that a restart can cut short. */
|
|
259
|
+
const abortableSleep = (ms: number, token: RunToken): Promise<void> =>
|
|
260
|
+
new Promise((resolve) => {
|
|
261
|
+
const timer = setTimeout(resolve, ms)
|
|
262
|
+
token.wake = () => {
|
|
263
|
+
clearTimeout(timer)
|
|
264
|
+
resolve()
|
|
265
|
+
}
|
|
266
|
+
})
|
|
267
|
+
|
|
268
|
+
// ── the hub's runs ledger: the stamp is read ONCE here, the ring is written through RPC ──
|
|
269
|
+
async function loadState(): Promise<void> {
|
|
270
|
+
if (BLOCK_ID === null) {
|
|
271
|
+
ctx.logger.warn('this is not a core-block addon id — no run ledger, cooldown and traces will not survive a restart', { addonId: ctx.id })
|
|
272
|
+
return
|
|
273
|
+
}
|
|
274
|
+
try {
|
|
275
|
+
const doc = await ctx.api.coreBlocks.getAutomationRunState.query({ blockId: BLOCK_ID })
|
|
276
|
+
lastRunStartedAt = doc.lastRunStartedAt
|
|
277
|
+
} catch (err: unknown) {
|
|
278
|
+
stampUnknown = true
|
|
279
|
+
ctx.logger.warn('could not read the stored cooldown stamp — the first run is let through', {
|
|
280
|
+
blockId: BLOCK_ID,
|
|
281
|
+
error: err instanceof Error ? err.message : String(err),
|
|
282
|
+
})
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
function send(payload: { trace?: AutomationRunTrace; runStartedAt?: number }): Promise<void> {
|
|
287
|
+
if (BLOCK_ID === null) return Promise.resolve()
|
|
288
|
+
const blockId = BLOCK_ID
|
|
289
|
+
sendChain = sendChain.then(async () => {
|
|
290
|
+
try {
|
|
291
|
+
await ctx.api.coreBlocks.reportAutomationRun.mutate({ blockId, keepTraces: KEEP_TRACES, ...payload })
|
|
292
|
+
} catch (err: unknown) {
|
|
293
|
+
ctx.logger.warn('could not report the run to the hub ledger', {
|
|
294
|
+
blockId,
|
|
295
|
+
error: err instanceof Error ? err.message : String(err),
|
|
296
|
+
})
|
|
297
|
+
}
|
|
298
|
+
})
|
|
299
|
+
return sendChain
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
function flushSkip(): void {
|
|
303
|
+
if (skipTimer !== undefined) {
|
|
304
|
+
clearTimeout(skipTimer)
|
|
305
|
+
skipTimer = undefined
|
|
306
|
+
}
|
|
307
|
+
if (pendingSkip === undefined) return
|
|
308
|
+
const trace = pendingSkip
|
|
309
|
+
pendingSkip = undefined
|
|
310
|
+
void send({ trace })
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
/** A skip identical to the one waiting is COUNTED on it; anything else flushes it first. */
|
|
314
|
+
function record(trace: AutomationRunTrace): void {
|
|
315
|
+
if (isSkippedTrace(trace)) {
|
|
316
|
+
if (pendingSkip !== undefined) {
|
|
317
|
+
const merged = mergeSkipTraces(pendingSkip, trace)
|
|
318
|
+
if (merged !== null) {
|
|
319
|
+
pendingSkip = merged
|
|
320
|
+
return
|
|
321
|
+
}
|
|
322
|
+
flushSkip()
|
|
323
|
+
}
|
|
324
|
+
pendingSkip = trace
|
|
325
|
+
skipTimer = setTimeout(flushSkip, SKIP_FLUSH_MS)
|
|
326
|
+
return
|
|
327
|
+
}
|
|
328
|
+
flushSkip()
|
|
329
|
+
void send({ trace })
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
// ── the condition mirror (D49): memory only at fire time ──
|
|
333
|
+
async function refreshMirror(): Promise<void> {
|
|
334
|
+
const report = await mirror.refresh({
|
|
335
|
+
fetchSlice: (deviceId, cap) => ctx.api.deviceState.getCapSlice.query({ deviceId, capName: cap }),
|
|
336
|
+
fetchStableIds: async () => {
|
|
337
|
+
const all = await ctx.api.deviceManager.listAll.query({})
|
|
338
|
+
return new Map(all.devices.flatMap((d: { stableId?: string; id: number }) =>
|
|
339
|
+
d.stableId === undefined ? [] : [[d.stableId, d.id] as [string, number]]))
|
|
340
|
+
},
|
|
341
|
+
})
|
|
342
|
+
if (report.kept > 0) {
|
|
343
|
+
ctx.logger.debug('condition mirror kept stale values for sources it could not read', report)
|
|
344
|
+
}
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
/** Read one cap field off the state mirror. Returns undefined when the device,
|
|
348
|
+
* the cap or the field cannot be resolved — the caller decides what that
|
|
349
|
+
* means, and it always logs. (Used by the device-state TRIGGER, which the
|
|
350
|
+
* reconcile backs; conditions read the ConditionMirror instead.) */
|
|
351
|
+
async function readField(
|
|
352
|
+
deviceId: number,
|
|
353
|
+
cap: string,
|
|
354
|
+
fieldPath: string,
|
|
355
|
+
): Promise<unknown> {
|
|
356
|
+
try {
|
|
357
|
+
const slice = await ctx.api.deviceState.getCapSlice.query({ deviceId, capName: cap })
|
|
358
|
+
let cursor: unknown = slice
|
|
359
|
+
for (const part of fieldPath.split('.')) {
|
|
360
|
+
if (cursor === null || typeof cursor !== 'object') return undefined
|
|
361
|
+
cursor = (cursor as Record<string, unknown>)[part]
|
|
362
|
+
}
|
|
363
|
+
return cursor
|
|
364
|
+
} catch {
|
|
365
|
+
return undefined
|
|
366
|
+
}
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
/** A {$var} action target, resolved from the run's bag BEFORE dispatch — the
|
|
370
|
+
* action runner only ever sees a number. */
|
|
371
|
+
function resolveTarget(vars: Record<string, unknown>, name: string): number {
|
|
372
|
+
return resolveDeviceTarget(vars, name)
|
|
373
|
+
}
|
|
374
|
+
|
|
375
|
+
function warnMissingVar(name: string): void {
|
|
376
|
+
ctx.logger.warn('template referenced a var that was never set', { var: name })
|
|
377
|
+
}
|
|
378
|
+
|
|
379
|
+
/** Substitute {{vars.x}} slots and { $var } values. Substitution only — never evaluation. */
|
|
380
|
+
function substitute(value: unknown, vars: Record<string, unknown>): unknown {
|
|
381
|
+
return resolveStepArgs(value, vars, warnMissingVar)
|
|
382
|
+
}
|
|
383
|
+
|
|
384
|
+
/** The variables handed to an Action step, substituted and kept to primitives. */
|
|
385
|
+
function substituteVariables(
|
|
386
|
+
raw: Record<string, string | number | boolean>,
|
|
387
|
+
vars: Record<string, unknown>,
|
|
388
|
+
): Record<string, string | number | boolean> {
|
|
389
|
+
const out: Record<string, string | number | boolean> = {}
|
|
390
|
+
for (const [key, value] of Object.entries(raw)) {
|
|
391
|
+
const resolved = substitute(value, vars)
|
|
392
|
+
if (typeof resolved === 'string' || typeof resolved === 'number' || typeof resolved === 'boolean') {
|
|
393
|
+
out[key] = resolved
|
|
394
|
+
}
|
|
395
|
+
}
|
|
396
|
+
return out
|
|
397
|
+
}
|
|
398
|
+
|
|
399
|
+
async function actuate(
|
|
400
|
+
deviceId: number,
|
|
401
|
+
cap: string,
|
|
402
|
+
method: string,
|
|
403
|
+
args: Record<string, unknown>,
|
|
404
|
+
vars: Record<string, unknown>,
|
|
405
|
+
): Promise<void> {
|
|
406
|
+
const substituted = substitute(args, vars)
|
|
407
|
+
const resolved: Record<string, unknown> =
|
|
408
|
+
substituted !== null && typeof substituted === 'object' ? { ...substituted } : {}
|
|
409
|
+
// Forked-addon ctx.api namespaces are tRPC Proxies over a noop function
|
|
410
|
+
// (typeof === 'function'), not plain objects — reject only null/undefined.
|
|
411
|
+
const client: unknown = Reflect.get(ctx.api, capToRouterKey(cap))
|
|
412
|
+
const proc: unknown =
|
|
413
|
+
client !== null && client !== undefined ? Reflect.get(client as object, method) : undefined
|
|
414
|
+
const mutate: unknown =
|
|
415
|
+
proc !== null && proc !== undefined ? Reflect.get(proc as object, 'mutate') : undefined
|
|
416
|
+
if (typeof mutate !== 'function') {
|
|
417
|
+
throw new Error('no such device method: ' + cap + '.' + method)
|
|
418
|
+
}
|
|
419
|
+
await mutate({ ...resolved, deviceId })
|
|
420
|
+
}
|
|
421
|
+
|
|
422
|
+
/** The THEN half, through the ONE shared step runner: stops at the first
|
|
423
|
+
* failure (continuing past a failed step executes an intent the operator
|
|
424
|
+
* never expressed); every step is traced, the ones after a failure (or an
|
|
425
|
+
* abort) are marked not-run. */
|
|
426
|
+
async function runActions(
|
|
427
|
+
vars: Record<string, unknown>,
|
|
428
|
+
token: RunToken,
|
|
429
|
+
): Promise<{ steps: readonly AutomationStepTrace[]; failed: boolean }> {
|
|
430
|
+
const sleep = (ms: number): Promise<void> => abortableSleep(ms, token)
|
|
431
|
+
const steps: RunnableStep[] = [
|
|
432
|
+
${r.actions.map((e,t)=>Zie(e,t)).join(`
|
|
433
|
+
`)}
|
|
434
|
+
]
|
|
435
|
+
return runSteps(steps, {
|
|
436
|
+
pathPrefix: 'actions',
|
|
437
|
+
isAborted: () => token.aborted,
|
|
438
|
+
abortReason: 'aborted by a restart',
|
|
439
|
+
now: () => Date.now(),
|
|
440
|
+
onFailure: (failure) => {
|
|
441
|
+
ctx.logger.warn('action failed — stopping the sequence', {
|
|
442
|
+
...(failure.deviceId === undefined ? {} : { tags: { deviceId: failure.deviceId } }),
|
|
443
|
+
step: failure.index,
|
|
444
|
+
error: failure.message,
|
|
445
|
+
})
|
|
446
|
+
},
|
|
447
|
+
})
|
|
448
|
+
}
|
|
449
|
+
|
|
450
|
+
function deviceTags(trigger: Record<string, unknown>): { tags?: { deviceId: number } } {
|
|
451
|
+
const deviceId = trigger['deviceId']
|
|
452
|
+
return typeof deviceId === 'number' ? { tags: { deviceId } } : {}
|
|
453
|
+
}
|
|
454
|
+
|
|
455
|
+
function newRunId(at: number): string {
|
|
456
|
+
runCounter += 1
|
|
457
|
+
return at.toString(36) + '-' + runCounter.toString(36)
|
|
458
|
+
}
|
|
459
|
+
|
|
460
|
+
/** A trigger that never became a run (rejected, or dropped by the run mode). */
|
|
461
|
+
function skipTrace(
|
|
462
|
+
trigger: Record<string, unknown>,
|
|
463
|
+
reason: string,
|
|
464
|
+
outcome: AutomationRunTrace['outcome'],
|
|
465
|
+
verdict: AutomationRunVerdict | undefined,
|
|
466
|
+
accepted: boolean,
|
|
467
|
+
): AutomationRunTrace {
|
|
468
|
+
const now = Date.now()
|
|
469
|
+
return {
|
|
470
|
+
runId: newRunId(now),
|
|
471
|
+
startedAt: now,
|
|
472
|
+
endedAt: now,
|
|
473
|
+
trigger: buildTriggerTrace(trigger, accepted ? 'pass' : 'fail', reason),
|
|
474
|
+
conditions: [],
|
|
475
|
+
...(verdict === undefined ? {} : { verdict }),
|
|
476
|
+
steps: [],
|
|
477
|
+
outcome,
|
|
478
|
+
repeat: 1,
|
|
479
|
+
lastAt: now,
|
|
480
|
+
}
|
|
481
|
+
}
|
|
482
|
+
|
|
483
|
+
/** One admitted run: conditions (memory only), the cooldown, the actions. */
|
|
484
|
+
async function execute(
|
|
485
|
+
trigger: Record<string, unknown>,
|
|
486
|
+
reason: string,
|
|
487
|
+
admission: AutomationRunVerdict,
|
|
488
|
+
): Promise<void> {
|
|
489
|
+
const token: RunToken = { aborted: false }
|
|
490
|
+
runningTokens.add(token)
|
|
491
|
+
const startedAt = Date.now()
|
|
492
|
+
const runId = newRunId(startedAt)
|
|
493
|
+
let verdict = admission
|
|
494
|
+
let outcome: AutomationRunTrace['outcome'] = 'ran'
|
|
495
|
+
let nodes: AutomationConditionTraceNode[] = []
|
|
496
|
+
let steps: AutomationStepTrace[] = []
|
|
497
|
+
try {
|
|
498
|
+
const evaluation = evaluateConditionTree(CONDITIONS, mirror, Date.now())
|
|
499
|
+
nodes = [...evaluation.nodes]
|
|
500
|
+
for (const node of nodes) {
|
|
501
|
+
if (node.kind === 'condition' && node.observed === null && node.deviceId !== undefined) {
|
|
502
|
+
ctx.logger.warn('condition leaf value unknown — treated as false', {
|
|
503
|
+
tags: { deviceId: node.deviceId },
|
|
504
|
+
path: node.path,
|
|
505
|
+
cap: node.cap,
|
|
506
|
+
fieldPath: node.fieldPath,
|
|
507
|
+
})
|
|
508
|
+
}
|
|
509
|
+
}
|
|
510
|
+
if (!evaluation.pass) {
|
|
511
|
+
outcome = 'skipped-conditions'
|
|
512
|
+
ctx.logger.debug('automation did not run — conditions were false', { trigger, ...deviceTags(trigger) })
|
|
513
|
+
return
|
|
514
|
+
}
|
|
515
|
+
const letThrough = stampUnknown && RUN_MODE.mode === 'cooldown'
|
|
516
|
+
const cooldown = letThrough
|
|
517
|
+
? { ok: true, bypassed: true, reason: 'cooldown stamp unreadable at start — run let through' }
|
|
518
|
+
: gate.cooldown({
|
|
519
|
+
manual: trigger['kind'] === 'manual',
|
|
520
|
+
now: Date.now(),
|
|
521
|
+
lastRunStartedAt,
|
|
522
|
+
})
|
|
523
|
+
if (!cooldown.ok) {
|
|
524
|
+
outcome = 'skipped-cooldown'
|
|
525
|
+
verdict = { mode: RUN_MODE, decision: 'cooldown', reason: cooldown.reason }
|
|
526
|
+
ctx.logger.info('automation did not run — ' + cooldown.reason, deviceTags(trigger))
|
|
527
|
+
return
|
|
528
|
+
}
|
|
529
|
+
if (cooldown.bypassed) verdict = { mode: RUN_MODE, decision: 'bypass', reason: cooldown.reason }
|
|
530
|
+
// Stamped when the actions START, and reported to the hub before they run,
|
|
531
|
+
// so a restart mid-run cannot fire again inside the window.
|
|
532
|
+
lastRunStartedAt = startedAt
|
|
533
|
+
stampUnknown = false
|
|
534
|
+
await send({ runStartedAt: startedAt })
|
|
535
|
+
ctx.logger.info('automation running', { trigger, ...deviceTags(trigger) })
|
|
536
|
+
const vars: Record<string, unknown> = { ...trigger }
|
|
537
|
+
const result = await runActions(vars, token)
|
|
538
|
+
steps = result.steps
|
|
539
|
+
outcome = token.aborted ? 'aborted' : result.failed ? 'failed' : 'ran'
|
|
540
|
+
} catch (err: unknown) {
|
|
541
|
+
outcome = 'failed'
|
|
542
|
+
ctx.logger.warn('automation run failed', { error: err instanceof Error ? err.message : String(err), ...deviceTags(trigger) })
|
|
543
|
+
} finally {
|
|
544
|
+
runningTokens.delete(token)
|
|
545
|
+
const endedAt = Date.now()
|
|
546
|
+
record({
|
|
547
|
+
runId,
|
|
548
|
+
startedAt,
|
|
549
|
+
endedAt,
|
|
550
|
+
trigger: buildTriggerTrace(trigger, 'pass', reason),
|
|
551
|
+
conditions: nodes,
|
|
552
|
+
verdict,
|
|
553
|
+
steps,
|
|
554
|
+
outcome,
|
|
555
|
+
repeat: 1,
|
|
556
|
+
lastAt: endedAt,
|
|
557
|
+
})
|
|
558
|
+
if (gate.release()) {
|
|
559
|
+
const next = queue.shift()
|
|
560
|
+
if (next !== undefined && !stopped) {
|
|
561
|
+
void execute(next.trigger, next.reason, {
|
|
562
|
+
mode: RUN_MODE,
|
|
563
|
+
decision: 'queued',
|
|
564
|
+
reason: 'queued, then ran after waiting ' + (Date.now() - next.queuedAt) + ' ms',
|
|
565
|
+
})
|
|
566
|
+
}
|
|
567
|
+
}
|
|
568
|
+
}
|
|
569
|
+
}
|
|
570
|
+
|
|
571
|
+
/** Every trigger lands here. \`accepted\` = the trigger itself was satisfied
|
|
572
|
+
* (a rejected detection event is only traced). */
|
|
573
|
+
async function run(
|
|
574
|
+
trigger: Record<string, unknown>,
|
|
575
|
+
reason = 'fired',
|
|
576
|
+
accepted = true,
|
|
577
|
+
): Promise<void> {
|
|
578
|
+
await ready
|
|
579
|
+
if (stopped) return
|
|
580
|
+
if (!accepted) {
|
|
581
|
+
record(skipTrace(trigger, reason, 'skipped-trigger', undefined, false))
|
|
582
|
+
return
|
|
583
|
+
}
|
|
584
|
+
const admission = gate.admit()
|
|
585
|
+
const verdict: AutomationRunVerdict = { mode: RUN_MODE, decision: admission.decision, reason: admission.reason }
|
|
586
|
+
switch (admission.decision) {
|
|
587
|
+
case 'drop':
|
|
588
|
+
ctx.logger.info('automation trigger dropped — ' + admission.reason, deviceTags(trigger))
|
|
589
|
+
record(skipTrace(trigger, reason, 'skipped-overlap', verdict, true))
|
|
590
|
+
return
|
|
591
|
+
case 'queued':
|
|
592
|
+
ctx.logger.info('automation trigger queued — ' + admission.reason, deviceTags(trigger))
|
|
593
|
+
queue.push({ trigger, reason, queuedAt: Date.now() })
|
|
594
|
+
return
|
|
595
|
+
case 'restart':
|
|
596
|
+
ctx.logger.info('automation restarting — ' + admission.reason, deviceTags(trigger))
|
|
597
|
+
for (const running of runningTokens) {
|
|
598
|
+
running.aborted = true
|
|
599
|
+
running.wake?.()
|
|
600
|
+
}
|
|
601
|
+
break
|
|
602
|
+
case 'run':
|
|
603
|
+
break
|
|
604
|
+
}
|
|
605
|
+
await execute(trigger, reason, verdict)
|
|
606
|
+
}
|
|
607
|
+
|
|
608
|
+
const ready: Promise<void> = (async () => {
|
|
609
|
+
await loadState()
|
|
610
|
+
await refreshMirror()
|
|
611
|
+
})()
|
|
612
|
+
|
|
613
|
+
if (CONDITIONS !== undefined) {
|
|
614
|
+
disposers.push(
|
|
615
|
+
ctx.eventBus.subscribe({ category: EventCategory.DeviceStateChanged }, (event) => {
|
|
616
|
+
const data = event.data
|
|
617
|
+
const deviceId = data['deviceId']
|
|
618
|
+
const capName = data['capName']
|
|
619
|
+
if (typeof deviceId === 'number' && typeof capName === 'string') {
|
|
620
|
+
mirror.apply(deviceId, capName, data['slice'])
|
|
621
|
+
}
|
|
622
|
+
}),
|
|
623
|
+
)
|
|
624
|
+
const mirrorReconcile = setInterval(() => { void refreshMirror() }, RECONCILE_MS)
|
|
625
|
+
disposers.push(() => clearInterval(mirrorReconcile))
|
|
626
|
+
}
|
|
627
|
+
|
|
628
|
+
${r.triggers.map((e,t)=>Xie(e,t)).join(`
|
|
629
|
+
|
|
630
|
+
`)}
|
|
631
|
+
|
|
632
|
+
return () => {
|
|
633
|
+
stopped = true
|
|
634
|
+
queue.length = 0
|
|
635
|
+
flushSkip()
|
|
636
|
+
for (const running of runningTokens) {
|
|
637
|
+
running.aborted = true
|
|
638
|
+
running.wake?.()
|
|
639
|
+
}
|
|
640
|
+
for (const dispose of disposers) dispose()
|
|
641
|
+
}
|
|
642
|
+
}
|
|
643
|
+
`}function a_(e,t){switch(e.kind){case`all`:case`any`:for(let n of e.children)a_(n,t);return;case`not`:a_(e.child,t);return;case`condition`:t.push({kind:`device`,deviceId:e.deviceId,cap:e.cap});return;case`expression`:for(let n of Object.values(e.bindings))n.kind===`global`&&t.push({kind:`stable`,stableId:n.sourceStableId,cap:n.cap});return}}function o_(e){if(e===void 0)return[];let t=[];a_(e,t);let n=new Set;return t.filter(e=>{let t=e.kind===`device`?`d|${e.deviceId}|${e.cap}`:`s|${e.stableId}|${e.cap}`;return n.has(t)?!1:(n.add(t),!0)})}function s_(e,t){return`${e}|${t}`}function $ie(e,t){let n=e;for(let e of t.split(`.`)){if(typeof n!=`object`||!n)return;n=Reflect.get(n,e)}return n}function c_(e){return typeof e==`object`&&!!e}var eae=class{sources;slices=new Map;stableIds=new Map;watched;constructor(e){this.sources=e,this.watched=new Set(e.filter(e=>e.kind===`device`).map(e=>s_(e.deviceId,e.cap)))}apply(e,t,n){let r=s_(e,t);c_(n)&&(!this.watched.has(r)&&!this.isStableTarget(e,t)||this.slices.set(r,n))}isStableTarget(e,t){for(let n of this.sources)if(n.kind===`stable`&&n.cap===t&&this.stableIds.get(n.stableId)===e)return!0;return!1}read(e,t,n){let r=this.slices.get(s_(e,t));return r===void 0?void 0:$ie(r,n)}readStable(e,t,n){let r=this.stableIds.get(e);return r===void 0?void 0:this.read(r,t,n)}async refresh(e){let t=0,n=0;if(this.sources.some(e=>e.kind===`stable`))try{this.stableIds=await e.fetchStableIds()}catch{}let r=new Map;for(let e of this.sources){let t=e.kind===`device`?e.deviceId:this.stableIds.get(e.stableId);if(t===void 0){n+=1;continue}r.set(s_(t,e.cap),{deviceId:t,cap:e.cap})}for(let[i,a]of r)try{let r=await e.fetchSlice(a.deviceId,a.cap);c_(r)?(this.slices.set(i,r),t+=1):n+=1}catch{n+=1}return{updated:t,kept:n}}},l_={eq:`=`,ne:`≠`,gt:`>`,gte:`≥`,lt:`<`,lte:`≤`,contains:`contains`,in:`in`};function u_(e,t,n){switch(t){case`eq`:return e===n;case`ne`:return e!==n;case`gt`:return typeof e==`number`&&typeof n==`number`&&e>n;case`gte`:return typeof e==`number`&&typeof n==`number`&&e>=n;case`lt`:return typeof e==`number`&&typeof n==`number`&&e<n;case`lte`:return typeof e==`number`&&typeof n==`number`&&e<=n;case`contains`:return typeof e==`string`&&typeof n==`string`&&e.includes(n);case`in`:return Array.isArray(n)&&n.some(t=>t===e)}}function d_(e){return e==null?null:typeof e==`string`||typeof e==`number`||typeof e==`boolean`||Array.isArray(e)&&e.every(e=>typeof e==`string`||typeof e==`number`)?e:JSON.stringify(e)}function f_(e){return Array.isArray(e)?`[${e.join(`, `)}]`:String(e)}function p_(e,t,n,r){r.push({path:t,kind:e.kind,outcome:`not-evaluated`,reason:n}),e.kind===`all`||e.kind===`any`?e.children.forEach((e,i)=>{p_(e,`${t}.${i}`,n,r)}):e.kind===`not`&&p_(e.child,`${t}.0`,n,r)}function m_(e,t,n,r,i){switch(e.kind){case`condition`:{let r=n.read(e.deviceId,e.cap,e.fieldPath),a={path:t,kind:e.kind,deviceId:e.deviceId,cap:e.cap,fieldPath:e.fieldPath,operator:e.operator,expected:d_(e.value),observed:d_(r)};if(r===void 0)return i.push({...a,outcome:`fail`,reason:`${e.fieldPath} value unknown → fail`}),!1;let o=u_(r,e.operator,e.value);return i.push({...a,outcome:o?`pass`:`fail`,reason:`${e.fieldPath} ${f_(r)}, expected ${l_[e.operator]} ${f_(e.value)} → ${o?`pass`:`fail`}`}),o}case`expression`:{let a={};for(let[r,o]of Object.entries(e.bindings)){if(o.kind===`literal`){a[r]=_s(o.value)??null;continue}let s=o.kind===`global`?n.readStable(o.sourceStableId,o.cap,o.fieldPath):void 0;if(s===void 0)return i.push({path:t,kind:e.kind,outcome:`fail`,reason:`${r} value unknown → fail`}),!1;a[r]=_s(s)??null}let o=ys(e.expr,a,r);if(!o.ok)return i.push({path:t,kind:e.kind,outcome:`fail`,reason:`${e.expr}: ${o.error} → fail`}),!1;let s=o.value===!0;return i.push({path:t,kind:e.kind,outcome:s?`pass`:`fail`,reason:`${e.expr} with ${JSON.stringify(a)} → ${s?`pass`:`fail`}`}),s}case`not`:{let a=i.length;i.push({path:t,kind:`not`,outcome:`not-evaluated`,reason:``});let o=m_(e.child,`${t}.0`,n,r,i),s=!o;return i.splice(a,1,{path:t,kind:`not`,outcome:s?`pass`:`fail`,reason:`not (${o?`pass`:`fail`}) → ${s?`pass`:`fail`}`}),s}case`all`:case`any`:{let a=e.kind===`all`,o=i.length;i.push({path:t,kind:e.kind,outcome:`not-evaluated`,reason:``});let s=null;for(let o=0;o<e.children.length;o+=1){let c=e.children[o];if(c===void 0)continue;if(s!==null){p_(c,`${t}.${o}`,`short-circuited by ${t}.${s}`,i);continue}let l=m_(c,`${t}.${o}`,n,r,i);(a?!l:l)&&(s=o)}let c=a?s===null:s!==null,l=a?c?`all ${e.children.length} passed → pass`:`${t}.${s} failed → fail`:c?`${t}.${s} passed → pass`:`none of ${e.children.length} passed → fail`;return i.splice(o,1,{path:t,kind:e.kind,outcome:c?`pass`:`fail`,reason:l}),c}}}function tae(e,t,n){if(e===void 0)return{pass:!0,nodes:[]};let r=[];return{pass:m_(e,`conditions`,t,n,r),nodes:r}}var h_=[{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`}],g_=[{id:`person`,name:`Person`},{id:`vehicle`,name:`Vehicle`},{id:`animal`,name:`Animal`},{id:`package`,name:`Package`}],__=new Set(g_.map(e=>e.id));function nae(e){return __.has(e.trim().toLowerCase())}var v_={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},rae=new Set(Object.values(v_.mapping));function y_(e){return v_.mapping[e]??e}function b_(e,t){let n=e.toLowerCase(),r=t.toLowerCase();return n===r?!0:rae.has(n)&&y_(r)===n}function x_(e){return e===`start`||e===`update`||e===`end`}var S_=class{trigger;fired=new Map;constructor(e){this.trigger=e}get firedCount(){return this.fired.size}evaluate(e,t){let{deviceId:n,trackId:r,phase:i}=e;if(typeof n!=`number`||typeof r!=`string`||!x_(i))return{kind:`ignore`,why:`malformed track-lifecycle event`};if(!this.trigger.deviceIds.includes(n))return{kind:`ignore`,why:`device ${n} is not one of the trigger's devices`};let a=`${n}|${r}`;if(i===`end`)return this.fired.delete(a),{kind:`ignore`,why:`track ended`};this.expire(t);let o=typeof e.bestClassName==`string`?e.bestClassName:``,s=typeof e.bestConfidence==`number`?e.bestConfidence:0,c={deviceId:n,className:o,trackId:r,score:s};if(this.fired.has(a))return{kind:`reject`,reason:`already fired for track ${r}`,vars:c};if(!this.trigger.classes.some(e=>b_(e,o)))return{kind:`reject`,reason:`class ${o||`unknown`} not in [${this.trigger.classes.join(`, `)}]`,vars:c};if(this.trigger.minScore!==void 0&&s<this.trigger.minScore)return{kind:`reject`,reason:`score ${s} < ${this.trigger.minScore}`,vars:c};if(this.trigger.zones!==void 0){let t=Array.isArray(e.zonesVisited)?e.zonesVisited.filter(e=>typeof e==`string`):[];if(!this.trigger.zones.some(e=>t.includes(e)))return{kind:`reject`,reason:`zone mismatch: visited [${t.join(`, `)}], wanted [${this.trigger.zones.join(`, `)}]`,vars:c}}return this.remember(a,t),{kind:`fire`,reason:`${o} ${s} on device ${n}`,vars:c}}remember(e,t){for(this.fired.set(e,t);this.fired.size>512;){let e=this.fired.keys().next();if(e.done===!0)break;this.fired.delete(e.value)}}expire(e){for(let[t,n]of this.fired){if(e-n<9e5)break;this.fired.delete(t)}}},C_=6e4;function w_(e){return(e/C_).toFixed(1)}var T_=class{mode;active=0;pending=0;constructor(e){this.mode=e}get activeRuns(){return this.active}get queuedTriggers(){return this.pending}admit(){let e=this.mode;switch(e.mode){case`single`:case`cooldown`:return this.active>0?{decision:`drop`,reason:`${e.mode}: a run is already in progress`}:(this.active+=1,{decision:`run`,reason:`${e.mode}: no run in progress`});case`restart`:return this.active>0?(this.active+=1,{decision:`restart`,reason:`restart: aborting ${this.active-1} run(s) in progress`}):(this.active+=1,{decision:`run`,reason:`restart: no run in progress`});case`queued`:return this.active===0?(this.active+=1,{decision:`run`,reason:`queued: no run in progress`}):this.pending<e.max?(this.pending+=1,{decision:`queued`,reason:`queued: a run is in progress, waiting ${this.pending} of ${e.max}`}):{decision:`drop`,reason:`queued: a run is in progress and the queue is full (${e.max})`};case`parallel`:return this.active<e.max?(this.active+=1,{decision:`run`,reason:`parallel: ${this.active} of ${e.max} running`}):{decision:`drop`,reason:`parallel: ${e.max} runs already in progress`}}}release(){return this.active>0&&--this.active,this.mode.mode===`queued`&&this.pending>0?(--this.pending,this.active+=1,!0):!1}cooldown(e){if(this.mode.mode!==`cooldown`)return{ok:!0,bypassed:!1,reason:``};let t=this.mode.minutes*C_;if(e.lastRunStartedAt===null)return{ok:!0,bypassed:!1,reason:`cooldown ${this.mode.minutes} min: no earlier run`};let n=e.now-e.lastRunStartedAt;if(n>=t)return{ok:!0,bypassed:!1,reason:`cooldown ${this.mode.minutes} min: last run started ${w_(n)} min ago`};let r=`${w_(t-n)} min left`;return e.manual?{ok:!0,bypassed:!0,reason:`cooldown ${this.mode.minutes} min bypassed by a manual trigger (${r})`}:{ok:!1,bypassed:!1,reason:`cooldown ${this.mode.minutes} min: last run started ${w_(n)} min ago, ${r}`}}},E_=f([l(),i(),T(),b(),w(f([l(),i()]))]),D_=C([`ran`,`skipped-trigger`,`skipped-conditions`,`skipped-cooldown`,`skipped-overlap`,`failed`,`aborted`]),O_=C([`pass`,`fail`,`not-evaluated`]),k_=d({kind:l().min(1),outcome:C([`pass`,`fail`]),reason:l(),vars:x(l(),E_)}),A_=d({path:l().min(1),kind:C([`all`,`any`,`not`,`condition`,`expression`]),outcome:O_,reason:l(),deviceId:i().int().optional(),cap:l().optional(),fieldPath:l().optional(),operator:l().optional(),expected:E_.optional(),observed:E_.optional()}),j_=d({mode:$g,decision:C([`run`,`queued`,`restart`,`drop`,`cooldown`,`bypass`]),reason:l()}),M_=d({path:l().min(1),kind:l().min(1),cap:l().optional(),method:l().optional(),deviceId:i().int().optional(),startedAt:i().optional(),endedAt:i().optional(),outcome:C([`ok`,`error`,`not-run`]),message:l().optional()}),N_=d({runId:l().min(1),startedAt:i(),endedAt:i(),trigger:k_,conditions:w(A_),verdict:j_.optional(),steps:w(M_),outcome:D_,repeat:i().int().min(1),lastAt:i()}),P_=d({version:h(1),lastRunStartedAt:i().nullable(),traces:w(N_)}),iae={version:1,lastRunStartedAt:null,traces:[]};function F_(e){return e.outcome.startsWith(`skipped-`)}function I_(e){return e.replace(/\d+(\.\d+)?/g,`#`)}function L_(e){return JSON.stringify([e.outcome,e.trigger.kind,e.trigger.outcome,I_(e.trigger.reason),e.verdict===void 0?null:[e.verdict.decision,I_(e.verdict.reason)],e.conditions.map(e=>[e.path,e.outcome])])}function R_(e,t){return!F_(e)||!F_(t)||L_(e)!==L_(t)?null:{...e,repeat:e.repeat+t.repeat,lastAt:t.lastAt,endedAt:t.endedAt}}function aae(e,t,n){let r=e[e.length-1],i=r===void 0?null:R_(r,t);if(i!==null)return[...e.slice(0,-1),i];let a=[...e,t];for(;a.length>n;){let e=a.findIndex((e,t)=>t<a.length-1&&F_(e));a.splice(e===-1?0:e,1)}return a}function oae(e,t,n){let r={};for(let[t,n]of Object.entries(e))t===`kind`||t===`at`||(typeof n==`string`||typeof n==`number`||typeof n==`boolean`||n===null)&&(r[t]=n);return{kind:typeof e.kind==`string`?e.kind:`unknown`,outcome:t,reason:n,vars:r}}var z_=C([`string`,`number`,`boolean`,`select`]),sae=/^[A-Za-z_][A-Za-z0-9_]*$/,B_=f([l(),i(),T()]),V_=d({name:l().regex(sae),label:l().min(1).max(120).optional(),type:z_,required:T().optional(),default:B_.optional(),options:w(l().min(1)).min(1).optional()}).superRefine((e,t)=>{e.type===`select`&&e.options===void 0&&t.addIssue({code:`custom`,message:`a select variable needs options`,path:[`options`]}),e.default!==void 0&&H_(e,e.default)!==null&&t.addIssue({code:`custom`,message:H_(e,e.default)??`invalid default`,path:[`default`]})});function H_(e,t){switch(e.type){case`string`:return typeof t==`string`?null:`variable "${e.name}" must be a string`;case`number`:return typeof t==`number`&&Number.isFinite(t)?null:`variable "${e.name}" must be a number`;case`boolean`:return typeof t==`boolean`?null:`variable "${e.name}" must be true or false`;case`select`:return typeof t==`string`&&(e.options??[]).includes(t)?null:`variable "${e.name}" must be one of ${(e.options??[]).join(`, `)}`}}function U_(e,t){let n=e??[],r=t??{};for(let e of Object.keys(r))if(!n.some(t=>t.name===e))return{ok:!1,error:`unknown variable "${e}"`};let i={};for(let e of n){let t=r[e.name]??e.default;if(t===void 0){if(e.required===!0)return{ok:!1,error:`variable "${e.name}" is required`};continue}let n=H_(e,t);if(n!==null)return{ok:!1,error:n};i[e.name]=t}return{ok:!0,values:i}}var W_=C([`internal`,`addon`]),G_=`internal:`;function K_(e){return`${G_}${e}`}function q_(e){return e.startsWith(`internal:`)&&e.length>9}function J_(e){if(q_(e))return null;let t=e.indexOf(`:`);return t>0&&t<e.length-1?e.slice(0,t):null}var Y_=d({isRunning:T(),lastRunAt:i().nullable(),lastError:l().nullable()}),X_={isRunning:!1,lastRunAt:null,lastError:null},Z_=d({id:l().min(3),name:l().min(1).max(120),addonId:l().min(1),source:W_,readOnly:T(),steps:w(Zg).min(1).max(50).optional(),variables:w(V_).max(20).optional(),status:Y_}).superRefine((e,t)=>{if(e.source===`internal`){q_(e.id)||t.addIssue({code:`custom`,message:`an internal action id is internal:<uuid>`,path:[`id`]});return}e.steps!==void 0&&t.addIssue({code:`custom`,message:`only an internal action carries steps`,path:[`steps`]}),e.readOnly||t.addIssue({code:`custom`,message:`an addon action is read-only here`,path:[`readOnly`]}),J_(e.id)===null&&t.addIssue({code:`custom`,message:`an addon action id is <addonId>:<localId>`,path:[`id`]})}),Q_=d({name:l().min(1).max(120),steps:w(Zg).min(1).max(50),variables:w(V_).max(20).optional()}),$_=d({blockId:l().min(1).optional()}),ev=f([D_,h(`started`)]),tv=d({runId:l().min(1),outcome:ev,message:l().optional()}),nv=C([`not-found`,`read-only`,`invalid-variables`,`invalid-steps`,`not-linked`,`busy`]),rv=class extends Error{code;constructor(e,t){super(`[${e}] ${t}`),this.name=`ActionError`,this.code=e}},iv=d({actionId:l(),runId:l(),isRunning:T(),outcome:D_.optional(),lastRunAt:i().nullable(),lastError:l().nullable()});function cae(e){return e instanceof Error?e.message:String(e)}async function lae(e,t){let n=[],r=!1,i=!1;for(let[a,o]of e.entries()){let e=`${t.pathPrefix}.${a}`;if(r||i||t.isAborted()){r||(i=!0),n.push({...o.meta,path:e,outcome:`not-run`,message:r?`an earlier step failed`:t.abortReason});continue}let s=t.now(),c=o.meta.deviceId,l={setDeviceId:e=>{c=e}};try{await o.run(l),n.push({...o.meta,...c===void 0?{}:{deviceId:c},path:e,startedAt:s,endedAt:t.now(),outcome:`ok`})}catch(i){r=!0;let l=cae(i);t.onFailure({index:a,path:e,message:l,deviceId:c}),n.push({...o.meta,...c===void 0?{}:{deviceId:c},path:e,startedAt:s,endedAt:t.now(),outcome:`error`,message:l})}}return{steps:n,failed:r,aborted:i&&!r}}function uae(e){if(typeof e!=`object`||!e||Array.isArray(e))return!1;let t=Object.keys(e);return t.length===1&&t[0]===`$var`&&typeof Reflect.get(e,`$var`)==`string`}var dae=/\{\{\s*vars\.([A-Za-z_][A-Za-z0-9_]*)\s*\}\}/g;function av(e,t,n){if(uae(e)){let n=t[e.$var];if(n===void 0)throw Error(`variable "${e.$var}" is not set`);return n}return typeof e==`string`?e.replace(dae,(e,r)=>{let i=t[r];return i===void 0?(n(r),``):String(i)}):Array.isArray(e)?e.map(e=>av(e,t,n)):typeof e==`object`&&e?Object.fromEntries(Object.entries(e).map(([e,r])=>[e,av(r,t,n)])):e}function ov(e,t){let n=e[t];if(typeof n==`number`)return n;throw Error(`action target var "${t}" is not a device id`)}function fae(e){return e.kind===`wait`?{kind:`wait`}:{kind:`cap`,cap:e.cap,method:e.method,...typeof e.deviceId==`number`?{deviceId:e.deviceId}:{}}}function pae(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function mae(e,t,n){return e.map(e=>{let r=fae(e);return e.kind===`wait`?{meta:r,run:()=>n.sleep(e.seconds*1e3)}:{meta:r,run:async r=>{let i=av(e.args??{},t,n.onMissingVar),a=pae(i)?i:{},o=typeof e.deviceId==`number`?[e.deviceId]:Array.isArray(e.deviceId)?e.deviceId:[ov(t,e.deviceId.$var)];for(let t of o)r.setDeviceId(t),await n.invokeCap({deviceId:t,cap:e.cap,method:e.method,args:a})}}})}var hae=d({id:l(),label:l(),icon:l(),path:l(),remoteName:l(),bundle:l(),section:l().optional(),sectionLabel:l().optional()}),sv=d({addonId:l(),page:hae,bundleUrl:l()}),cv={name:`addon-pages`,scope:`system`,mode:`singleton`,methods:{listPages:M(y(),w(sv).readonly())}},lv=d({id:l(),label:l(),icon:l(),path:l(),remoteName:l(),bundle:l(),section:l().optional(),sectionLabel:l().optional()}),uv={name:`addon-pages-source`,scope:`system`,mode:`collection`,internal:!0,methods:{listPages:M(y(),w(lv).readonly(),{auth:`admin`})}},gae=d({method:C([`GET`,`POST`,`PUT`,`DELETE`,`PATCH`]),path:l(),access:C([`public`,`authenticated`,`admin`]).optional(),description:l().optional(),rateLimit:C([`auth`]).optional()}),_ae=d({method:l(),path:l(),params:x(l(),l()),query:x(l(),l()),body:o(),headers:x(l(),l()),user:d({id:l(),username:l(),isAdmin:T()}).optional(),scopedToken:o().optional()}),vae=d({status:i().int(),headers:x(l(),l()),redirectUrl:l().nullable(),body:o().optional(),contentType:l().optional()}),dv={name:`addon-routes`,scope:`system`,mode:`collection`,internal:!0,methods:{getRoutes:M(y(),w(gae)),invoke:M(_ae,vae,{kind:`mutation`})},mount:{kind:`skip`}},fv=d({id:l(),label:l(),icon:l(),order:i().optional()}),pv=d({id:l(),title:l(),titleKey:l().optional(),description:l().optional(),descriptionKey:l().optional(),style:C([`card`,`accordion`]).optional(),defaultCollapsed:T().optional(),columns:f([h(1),h(2),h(3),h(4)]).optional(),tab:l().optional(),location:C([`settings`,`top-tab`,`hero`]).optional(),order:i().optional(),fields:w(g())}),mv=d({tabs:w(fv).optional(),sections:w(pv)}),hv=x(l(),o()),gv=d({success:h(!0)}),_v={name:`addon-settings`,scope:`system`,mode:`singleton`,nodeIdMode:`data`,methods:{getGlobalSettings:M(d({addonId:l(),nodeId:l().optional(),overlay:x(l(),o()).optional(),cap:l().optional()}),mv.nullable()),updateGlobalSettings:M(d({addonId:l(),nodeId:l().optional(),patch:hv}),gv,{kind:`mutation`,auth:`admin`}),getIntegrationSettings:M(d({addonId:l(),nodeId:l().optional()}),mv.nullable()),getDeviceSettings:M(d({addonId:l(),deviceId:i(),nodeId:l().optional()}),mv.nullable()),updateDeviceSettings:M(d({addonId:l(),deviceId:i(),nodeId:l().optional(),patch:hv}),gv,{kind:`mutation`,auth:`admin`})}},vv=C([`device-tab`,`dashboard`,`integration-detail`]),yv=C([`xs`,`sm`,`md`,`lg`,`xl`]),bv=d({remoteName:l(),exposedModule:l(),componentKey:l().optional()}),xv=d({tab:l(),subTab:l().optional(),label:l(),order:i().optional(),kind:h(`remote`),remote:bv,stableId:l(),description:l().optional(),icon:l().optional(),bundle:l(),hosts:w(vv).readonly(),requires:d({deviceContext:T().default(!1),integrationContext:T().default(!1)}),preAuth:T().optional().default(!1),defaultSize:yv.default(`md`),allowedSizes:w(yv).readonly().default([`sm`,`md`,`lg`]),defaultColumns:i().int().min(1).max(12).default(6),defaultRows:i().int().min(1).max(12).default(1)}),Sv={name:`addon-widgets-source`,scope:`system`,mode:`collection`,internal:!0,methods:{listWidgets:M(y(),w(xv).readonly(),{auth:`admin`})}},Cv=xv.extend({addonId:l(),bundleUrl:l()}),wv={name:`addon-widgets`,scope:`system`,mode:`singleton`,methods:{listWidgets:M(y(),w(Cv).readonly())}},Tv=C([`info`,`success`,`warning`,`error`,`critical`]),Ev=d({label:l(),href:l().optional(),navigation:C([`app`,`server`]).optional()}),Dv=C([`active`,`in-progress`,`completed`,`failed`,`dismissed`]),Ov=d({type:l(),id:l()}),kv=d({id:l(),category:l(),severity:Tv,title:l(),message:l(),action:Ev.optional(),status:Dv,progress:i().optional(),read:T(),createdAt:i(),updatedAt:i(),source:Ov.optional(),metadata:x(l(),o()).optional()}),Av={name:`alerts`,scope:`system`,mode:`singleton`,methods:{emit:M(kv,y(),{kind:`mutation`}),update:M(d({alertId:l(),patch:kv.partial()}),y(),{kind:`mutation`}),list:M(d({unreadOnly:T().optional(),limit:i().optional()}).optional(),w(kv).readonly()),getUnreadCount:M(y(),i()),markRead:M(d({alertId:l()}),y(),{kind:`mutation`}),markAllRead:M(y(),y(),{kind:`mutation`}),dismiss:M(d({alertId:l()}),y(),{kind:`mutation`})}},jv={name:`audio-analysis`,scope:`device`,mode:`singleton`,kind:`wrapper`,defaultActive:!0,deviceTypes:[P.Camera],exposesDeviceSettings:!0,methods:{resolveDeviceSettings:M(d({deviceId:i()}),v())},events:{onAudioLevel:ma(d({deviceId:i(),rms:i(),dbfs:i()}))}},Mv=C([`jpeg`,`rgb`,`bgr`,`yuv420`,`gray`]),Nv=d({data:v(),format:Mv,width:i(),height:i(),timestamp:i()}),Pv=d({x:i(),y:i(),w:i(),h:i()}),Fv=d({class:l(),originalClass:l(),score:i(),bbox:Pv}),Iv=d({data:S(Uint8Array),sampleRate:i(),channels:i(),timestamp:i(),deviceId:i().optional()}),Lv=d({rms:i(),dbfs:i()}),Rv=d({className:l(),originalClass:l().optional(),score:i()}),zv=[`superseded`,`error`,`timeout`,`disposed`],Bv=m(`state`,[d({state:h(`classified`)}),d({state:h(`not-classified`),reason:C(zv)})]),Vv=d({level:Lv,classification:d({labels:w(Rv).readonly(),inferenceMs:i()}).optional(),classifyOutcome:Bv,timestamp:i()}),Hv=d({minConfidence:i().min(0).max(1).default(.3),allowedClasses:w(l()).default([])}),Uv=d({deviceId:i(),brokerId:l(),ingestNodeId:l(),settings:Hv}),Wv=d({attached:T(),replaced:T()}),Gv=d({detached:T()}),Kv=d({labels:w(Rv).readonly(),rawLabels:w(Rv).readonly().optional(),inferenceMs:i()}),qv=[{value:`auto`,label:`Auto (platform default)`},{value:`apple-soundanalysis`,label:`Apple SoundAnalysis (macOS 12+)`},{value:`yamnet-onnx`,label:`YAMNet ONNX (cross-platform)`}],Jv={audioBackend:`auto`,probedBestAudioBackend:``},Yv={name:`audio-analyzer`,scope:`system`,mode:`singleton`,methods:{analyseChunk:M(d({chunk:Iv,settings:Hv}),Vv.nullable(),{kind:`mutation`}),classify:M(Iv,Kv,{timeoutMs:3e4}),attachDevice:M(Uv,Wv,{kind:`mutation`}),detachDevice:M(d({deviceId:i()}),Gv,{kind:`mutation`}),isReady:M(y(),T()),dispose:M(y(),y(),{kind:`mutation`}),reprobeAudioEngine:M(y(),d({backend:l()}),{kind:`mutation`,auth:`admin`})}},Xv=C([`f32le`,`s16le`]),Zv=d({codec:l(),canDecode:T(),canEncode:T(),label:l().optional()}),Qv=d({codec:l(),sourceSampleRate:i().int().positive(),sourceChannels:i().int().positive(),extraData:S(Uint8Array).optional(),targetSampleRate:i().int().positive(),targetChannels:i().int().positive(),targetFormat:Xv.optional(),idleMs:i().int().positive().optional(),tag:l().optional()}),$v=d({codec:l(),sourceSampleRate:i().int().positive(),sourceChannels:i().int().positive(),sourceFormat:Xv.optional(),targetSampleRate:i().int().positive(),targetChannels:i().int().positive(),bitrateKbps:i().int().positive().optional(),idleMs:i().int().positive().optional(),tag:l().optional()}),ey=d({data:S(Uint8Array),sampleRate:i().int().positive(),channels:i().int().positive(),format:Xv,pts:i()}),ty=d({data:S(Uint8Array),codec:l(),pts:i(),frameComplete:T()}),yae=d({sessionId:l(),kind:C([`decode`,`encode`]),codec:l(),sourceSampleRate:i(),sourceChannels:i(),targetSampleRate:i(),targetChannels:i(),format:Xv,tag:l().optional(),createdAtMs:i(),lastActivityMs:i(),framesIn:i(),framesOut:i()}),ny={name:`audio-codec`,scope:`system`,mode:`singleton`,preferredProvider:`decoder-nodeav`,methods:{listSupportedCodecs:M(y(),w(Zv).readonly()),canHandle:M(d({codec:l(),kind:C([`decode`,`encode`])}),T()),createDecodeSession:M(Qv,d({sessionId:l(),nodeId:l()}),{kind:`mutation`}),createEncodeSession:M($v,d({sessionId:l(),nodeId:l()}),{kind:`mutation`}),closeSession:M(d({sessionId:l(),nodeId:l().optional()}),y(),{kind:`mutation`}),pushEncodedFrame:M(d({sessionId:l(),nodeId:l().optional(),data:S(Uint8Array),pts:i().optional()}),y(),{kind:`mutation`}),pullPcm:M(d({sessionId:l(),nodeId:l().optional(),maxCount:i().int().positive().default(8)}),w(ey)),pushPcm:M(d({sessionId:l(),nodeId:l().optional(),data:S(Uint8Array),pts:i().optional()}),y(),{kind:`mutation`}),pullEncoded:M(d({sessionId:l(),nodeId:l().optional(),maxCount:i().int().positive().default(8)}),w(ty)),flushEncode:M(d({sessionId:l(),nodeId:l().optional()}),w(ty),{kind:`mutation`}),listActiveSessions:M(y(),w(yae).readonly())}},ry=d({userId:l(),username:l(),email:l().optional(),displayName:l().optional(),isAdmin:T().default(!1)}),iy={name:`auth-provider`,scope:`system`,mode:`collection`,internal:!0,methods:{validateCredentials:M(d({username:l(),password:l()}),ry.nullable(),{kind:`mutation`}),getLoginUrl:M(d({state:l()}),l()),handleCallback:M(x(l(),l()),ry,{kind:`mutation`}),validateToken:M(d({token:l()}),ry.nullable())},mount:{kind:`skip`}},ay=d({where:x(l(),o()).optional(),whereIn:x(l(),w(o())).optional(),whereBetween:x(l(),u([o(),o()])).optional(),whereNot:x(l(),o()).optional(),whereNotIn:x(l(),w(o())).optional(),orderBy:d({field:l(),direction:C([`asc`,`desc`])}).optional(),limit:i().optional(),offset:i().optional()}),oy=d({where:x(l(),o()).optional(),whereIn:x(l(),w(o())).optional(),whereBetween:x(l(),u([o(),o()])).optional(),whereNot:x(l(),o()).optional(),whereNotIn:x(l(),w(o())).optional()}),sy=d({as:l().min(1),field:l().min(1),op:C([`sum`,`min`,`max`])}),cy=d({count:i().int(),values:x(l(),i().nullable())}),ly=d({id:l(),data:x(l(),o())}),uy=d({id:l().optional(),data:x(l(),o())}),dy=C([`settings`,`events`,`history`]),bae=dy.options,fy=m(`op`,[d({op:h(`deleteWhere`),collection:l(),filter:oy}),d({op:h(`insertMany`),collection:l(),records:w(uy).readonly()}),d({op:h(`update`),collection:l(),id:l(),data:x(l(),o())}),d({op:h(`upsertMany`),collection:l(),conflict:w(l()).readonly(),records:w(uy).readonly()})]),py=d({collection:l(),key:l(),column:l(),equals:o()}),my=d({name:l(),type:C([`TEXT`,`INTEGER`,`REAL`,`JSON`,`BOOLEAN`]),primaryKey:T().optional(),notNull:T().optional(),unique:T().optional(),defaultValue:f([l(),i(),T()]).optional()}),hy=d({name:l(),columns:w(l()).readonly(),unique:T().optional()}),gy=d({namespace:l().optional(),collection:l(),columns:w(my).readonly(),indexes:w(hy).readonly().optional(),database:dy.optional(),primaryKey:w(l()).readonly().optional(),withoutRowid:T().optional()}),_y={name:`settings-store`,scope:`system`,mode:`singleton`,methods:{get:M(d({namespace:l().optional(),collection:l(),key:l()}),o(),{auth:`admin`}),set:M(d({namespace:l().optional(),collection:l(),key:l(),value:o()}),y(),{kind:`mutation`,auth:`admin`}),query:M(d({namespace:l().optional(),collection:l(),filter:ay.optional(),columns:w(l()).readonly().optional()}),w(ly).readonly(),{auth:`admin`}),upsert:M(d({namespace:l().optional(),collection:l(),conflict:w(l()).readonly(),record:uy}),d({id:f([l(),i()])}),{kind:`mutation`,auth:`admin`}),upsertMany:M(d({namespace:l().optional(),collection:l(),conflict:w(l()).readonly(),records:w(uy).readonly()}),d({upserted:i().int()}),{kind:`mutation`,auth:`admin`}),insert:M(d({namespace:l().optional(),collection:l(),record:d({id:l().optional(),data:x(l(),o())})}),d({id:f([l(),i()])}),{kind:`mutation`,auth:`admin`}),insertMany:M(d({namespace:l().optional(),collection:l(),records:w(uy).readonly()}),d({inserted:i().int()}),{kind:`mutation`,auth:`admin`}),transact:M(d({namespace:l().optional(),guard:py.optional(),ops:w(fy).readonly()}),d({applied:T(),current:o().optional()}),{kind:`mutation`,auth:`admin`}),update:M(d({namespace:l().optional(),collection:l(),id:l(),data:x(l(),o())}),y(),{kind:`mutation`,auth:`admin`}),delete:M(d({namespace:l().optional(),collection:l(),key:l()}),y(),{kind:`mutation`,auth:`admin`}),deleteWhere:M(d({namespace:l().optional(),collection:l(),filter:oy}),d({deleted:i().int()}),{kind:`mutation`,auth:`admin`}),updateWhere:M(d({namespace:l().optional(),collection:l(),filter:oy,data:x(l(),o())}),d({updated:i().int()}),{kind:`mutation`,auth:`admin`}),count:M(d({namespace:l().optional(),collection:l(),filter:ay.optional()}),i(),{auth:`admin`}),aggregate:M(d({namespace:l().optional(),collection:l(),fields:w(sy).readonly(),filter:ay.optional()}),cy,{auth:`admin`}),histogram:M(d({namespace:l().optional(),collection:l(),field:l(),bucketSize:i().int().positive(),origin:i().int(),filter:ay.optional()}),w(d({bucket:i().int(),count:i().int()})).readonly(),{auth:`admin`}),isEmpty:M(d({namespace:l().optional(),collection:l()}),T(),{auth:`admin`}),declareCollection:M(gy,y(),{kind:`mutation`,auth:`admin`})}},xae=`.backup-snapshot`,Sae=`.backup-snapshot-partial`,vy=30*6e4,yy=d({databases:w(d({databaseId:dy,livePath:l()}))}),by=d({name:l(),rows:i().int().nonnegative()}),xy=d({livePath:l(),snapshotPath:l(),sizeBytes:i().int().nonnegative(),pageCount:i().int().nonnegative(),pageSize:i().int().positive(),tables:w(by),copyMs:i().nonnegative(),verifyMs:i().nonnegative(),takenAt:i()}),Sy=xy.extend({databaseId:dy}),Cy=d({databaseId:dy}),wy=xy.extend({livePath:l(),snapshotPath:l(),databaseId:dy.optional()}),Ty={name:`database-snapshot`,scope:`system`,mode:`singleton`,internal:!0,methods:{listDatabases:M(d({}),yy,{auth:`admin`}),writeSnapshot:M(Cy,Sy,{kind:`mutation`,auth:`admin`,timeoutMs:vy})}},Ey=d({subId:l(),displayName:l(),description:l().optional(),kind:l(),triggerSupported:T(),restoreSupported:T()}).extend({id:l(),addonId:l(),enabled:T(),retentionCount:i(),label:l().optional(),lastSuccessAt:i().optional(),lastSuccessSizeBytes:i().optional(),cron:l().optional(),nextRunAt:i().optional(),lastAttemptAt:i().optional(),lastError:l().optional()}),Dy=d({scheme:l(),keyId:l()}),Oy=d({enabled:T(),active:d({keyId:l(),publicKey:l(),createdAt:i()}).nullable(),keys:w(d({keyId:l(),createdAt:i(),retiredAt:i().nullable()})).readonly()}),Cae=d({id:l(),filename:l(),createdAt:i(),sizeBytes:i(),label:l().optional(),locations:w(l()).readonly(),encryption:Dy.optional(),databases:w(dy).readonly().optional()}),ky=d({id:l(),destinationId:l().optional(),label:l().optional(),createdAt:i(),sizeBytes:i(),locations:w(l()).optional(),encryption:Dy.optional()}),Ay=d({path:l(),kind:C([`file`,`dir`,`symlink`]),sizeBytes:i(),mtime:i()}),jy=d({archiveVersion:h(1),createdAt:i(),dataDir:l(),locations:w(l()),entries:w(Ay),totalBytes:i(),totalFiles:i(),sqliteSnapshots:w(wy).optional(),omittedDatabases:w(dy).optional()}),My=d({name:l(),sizeBytes:i(),fileCount:i(),present:T()}),Ny=C([`queued`,`running`,`succeeded`,`failed`,`cancelled`]),Py=C([`queued`,`building`,`uploading`,`done`]),Fy=d({id:l(),state:Ny,phase:Py,destinationIds:w(l()).readonly(),label:l().optional(),requestedAt:i(),startedAt:i().optional(),finishedAt:i().optional(),stagedBytes:i(),archiveSizeBytes:i().optional(),uploadedBytes:i(),completedDestinationIds:w(l()).readonly(),failedDestinationIds:w(l()).readonly(),error:l().optional(),queuePosition:i().int().min(1).optional()}),Iy=d({runId:l(),queued:T(),joined:T(),cancelled:T(),entries:w(ky).readonly()}),Ly=d({id:l(),label:l(),cron:l(),enabled:T(),locationIds:w(l()).readonly(),retentionCount:i().int().min(1).max(1e3),dataSources:w(l()).readonly().optional(),databases:w(dy).readonly().optional(),lastAttemptAt:i().optional(),lastSuccessAt:i().optional(),lastError:l().optional(),nextRunAt:i().optional()}),Ry={name:`backup`,scope:`system`,mode:`singleton`,methods:{listDestinations:M(y(),w(Ey).readonly(),{auth:`admin`}),trigger:M(d({destinations:w(l()).optional(),locations:w(l()).optional(),label:l().optional(),retentionCount:i().int().min(1).max(1e3).optional(),databases:w(dy).optional()}).optional(),Iy,{kind:`mutation`,auth:`admin`}),listRuns:M(y(),w(Fy).readonly(),{auth:`admin`}),cancel:M(d({runId:l()}),d({cancelled:T()}),{kind:`mutation`,auth:`admin`}),list:M(y(),w(ky).readonly(),{auth:`admin`}),listLocations:M(y(),w(My).readonly(),{auth:`admin`}),getEntries:M(d({destinationId:l(),backupId:l()}),jy.nullable(),{auth:`admin`}),restore:M(d({destinationId:l(),backupId:l(),locations:w(l()).optional(),backupSecretKey:l().optional()}),y(),{kind:`mutation`,auth:`admin`}),getEncryption:M(y(),Oy,{auth:`admin`}),setupEncryption:M(d({}),d({keyId:l(),secretKey:l(),publicKey:l(),createdAt:i(),replacedKeyId:l().nullable()}),{kind:`mutation`,auth:`admin`}),disableEncryption:M(d({}),d({disabledKeyId:l().nullable()}),{kind:`mutation`,auth:`admin`}),checkBackupKey:M(d({backupSecretKey:l()}),d({valid:T(),keyId:l().nullable(),known:T(),active:T(),error:l().optional()}),{kind:`mutation`,auth:`admin`}),delete:M(d({destinationId:l(),backupId:l()}),y(),{kind:`mutation`,auth:`admin`}),listArchives:M(d({destinationId:l()}),w(Cae).readonly(),{auth:`admin`}),upsertDestinationPolicy:M(d({locationId:l(),enabled:T(),retentionCount:i().int().min(1).max(1e3),label:l().optional()}),y(),{kind:`mutation`,auth:`admin`}),previewSchedule:M(d({cron:l(),count:i().int().min(1).max(20).optional()}),d({ok:T(),error:l().optional(),nextRuns:w(i()).readonly()})),listSchedules:M(y(),w(Ly).readonly(),{auth:`admin`}),listAvailableDatabases:M(y(),d({answered:T(),databases:w(dy).readonly()}),{auth:`admin`}),upsertSchedule:M(d({id:l().optional(),label:l(),cron:l(),enabled:T(),locationIds:w(l()).readonly(),retentionCount:i().int().min(1).max(1e3),dataSources:w(l()).readonly().optional(),databases:w(dy).readonly().optional()}),Ly,{kind:`mutation`,auth:`admin`}),deleteSchedule:M(d({id:l()}),y(),{kind:`mutation`,auth:`admin`})}},zy=C([`connected`,`disconnected`,`connecting`,`auth-failed`,`unreachable`,`error`]),By=d({id:l(),addonId:l(),name:l(),kind:l(),status:zy,info:x(l(),o()),lastCheckedAt:i().nullable(),error:l().nullable()}),Vy=d({brokerCount:i().int().nonnegative(),connectedCount:i().int().nonnegative()}),Hy=d({addonId:l(),kinds:w(d({kind:l(),label:l(),interactiveConnectPath:l().min(1).optional(),interactiveDisconnectPath:l().min(1).optional(),signIn:d({basePath:l().min(1)}).optional()}))}),Uy=d({kind:l().optional()}),Wy=d({id:l()}),Gy=d({kind:l().min(1),name:l().min(1),id:l().min(1).optional(),settings:x(l(),o())}),Ky=d({id:l()}),qy=d({id:l()}),Jy=m(`ok`,[d({ok:h(!0),latencyMs:i().nonnegative()}),d({ok:h(!1),error:l()})]),Yy=x(l(),o()),Xy=d({kind:l()}),Zy=d({kind:l(),settings:Yy}),Qy=m(`ok`,[d({ok:h(!0),latencyMs:i().nonnegative().optional()}).strict(),d({ok:h(!1),error:l()})]),$y=o().nullable(),eb=d({brokerId:l(),target:x(l(),o()),payload:o().optional()}),tb=d({brokerId:l(),filter:x(l(),o())}),nb=d({subscriptionId:l()}),rb=d({brokerId:l(),subscriptionId:l()}),ib=d({brokerId:l(),key:l()}),ab={name:`broker`,scope:`system`,mode:`collection`,providerKind:`broker`,status:{schema:Vy,kind:`poll`},methods:{list:M(Uy,w(By)),get:M(Wy,By.nullable()),listProviders:M(y(),w(Hy),{auth:`admin`}),add:M(Gy,Ky,{kind:`mutation`,auth:`admin`}),remove:M(qy,y(),{kind:`mutation`,auth:`admin`}),testConnection:M(Wy,Jy,{kind:`mutation`,auth:`admin`}),getSettings:M(Wy,Yy.nullable(),{auth:`admin`}),setSettings:M(d({id:l(),settings:Yy}),y(),{kind:`mutation`,auth:`admin`}),getBrokerConfig:M(Wy,Yy.nullable(),{auth:`admin`}),getSettingsSchema:M(Xy,$y,{auth:`admin`}),testSettings:M(Zy,Qy,{kind:`mutation`,auth:`admin`}),publish:M(eb,o(),{kind:`mutation`,auth:`admin`}),subscribe:M(tb,nb,{kind:`mutation`,auth:`admin`}),unsubscribe:M(rb,y(),{kind:`mutation`,auth:`admin`}),getState:M(ib,o().nullable(),{auth:`admin`}),getStatus:M(y(),Vy)}},ob={name:`camera-pipeline-config`,scope:`device`,mode:`singleton`,kind:`wrapper`,defaultActive:!0,deviceTypes:[P.Camera],exposesDeviceSettings:!0,methods:{}},sb=C([`webrtc`,`hls`,`mjpeg`,`rtsp`]),cb=C([`mp4`,`gif`]),lb=d({kind:cb,handle:l(),nodeId:l(),mime:l(),bytes:i().int(),width:i().int(),height:i().int()}),ub=d({fromTs:i(),toTs:i(),packets:i().int()}),db=d({media:w(lb).readonly(),coverage:ub,profile:j,video:C([`copy`,`encode`])}),fb=d({brokerId:l(),url:l(),mutedUrl:l(),enabled:T(),codec:l().optional(),resolution:d({width:i().int().positive(),height:i().int().positive()}).optional()}),pb=d({sessionId:l(),remoteAddr:l(),userAgent:l().nullish(),playing:T(),muted:T(),connectedAt:i(),lastRtpAt:i(),bytesSent:i()}),mb=d({tag:l(),subscribedAt:i(),chunksDelivered:i()}),hb=C([`alexa`,`homekit`,`webrtc-browser`,`webrtc-mobile`,`webrtc-whep`,`rtsp-listen`,`derived-broker`,`recording`,`pipeline`,`snapshot`,`warmup`,`unknown`]),gb=d({kind:hb,label:l().optional(),media:C([`audio`,`video`,`both`]).optional(),targetCodec:l().optional(),transport:C([`passthrough`,`repacketize`,`transcode`]).optional(),remoteAddr:l().optional(),userAgent:l().optional(),userId:l().optional(),sessionId:l().optional(),extra:x(l(),l()).optional()}).readonly(),_b=d({id:l(),channel:C([`annexb`,`rtp`]),attribution:gb,subscribedAt:i(),packetsDelivered:i()}),vb=d({rtsp:w(pb).readonly(),audio:w(mb).readonly(),encoded:w(_b).readonly(),pipeClients:i(),encodedSubscribers:i()}),yb=d({deviceId:i().int().nonnegative(),viewers:i().int().positive()}),bb=C([`reconnecting`,`sleeping`,`offline`,`disabled`,`waking`]),xb=C([`h264`,`h265`,`copy`]),Sb=C([`aac`,`opus`,`pcmu`,`copy`,`none`]),Cb=d({deviceId:i().int().nonnegative(),video:xb,audio:Sb.optional(),profile:j.optional(),targetResolution:d({width:i().int().positive(),height:i().int().positive()}).optional(),outputArgs:w(l()).optional(),audioEgress:T().optional(),hostname:l().optional(),tag:l().optional()}),wb=d({url:l(),sentryUrl:l().nullable().optional(),videoCodec:C([`H264`,`H265`]),audioCodec:l(),resolution:d({width:i().int().positive(),height:i().int().positive()}),transcoded:T(),encoder:l(),pipelineKey:l()}),Tb=ru.omit({inputArgs:!0,outputArgs:!0}),Eb=C([`tight`,`relaxed`]),Db=d({deviceId:i().int().nonnegative(),source:m(`kind`,[d({kind:h(`profile`),profile:j}),d({kind:h(`cam-stream`),camStreamId:l().min(1)})]),encode:Tb,rateControl:Eb.optional(),bitstreamFilter:C([`dump_extra`,`h264_mp4toannexb`,`hevc_mp4toannexb`]).optional(),publishLocally:T().optional(),pixelFormat:C([`yuv420p`,`nv12`]).optional(),decodeHwAccel:C([`auto`,`none`,`videotoolbox`,`vaapi`,`qsv`,`cuda`]).optional(),hostname:l().optional(),tag:l().optional()}),Ob=d({url:l(),pipelineKey:l(),videoCodec:C([`H264`,`H265`]),resolution:d({width:i().int().positive(),height:i().int().positive()}),transcoded:T(),encoder:l(),decodeHwAccel:l().nullable(),camStreamId:l().nullable()}),kb={name:`stream-broker`,scope:`system`,mode:`singleton`,exposesDeviceSettings:!0,methods:{reportStreamSignal:M(d({deviceId:i().int().nonnegative(),code:l().min(1),at:i().optional()}),d({accepted:T(),reason:C([`woke`,`hold-extended`,`not-enabled`,`no-consumer`,`unknown-code`])}),{kind:`mutation`}),publishCameraStream:M(d({deviceId:i().int().nonnegative(),camStreamId:l().min(1),kind:Pi,url:l().optional(),codec:l().optional(),resolution:Fi.optional(),fps:i().positive().optional(),label:l().optional(),deviceFeatures:w(l()).optional(),autoEligible:T().optional(),profileHint:j.optional(),metadata:x(l(),o()).optional(),sourceCamStreamId:l().min(1).optional(),encodeProfile:ru.optional()}),d({success:h(!0)}),{kind:`mutation`,auth:`admin`}),retractCameraStream:M(d({deviceId:i().int().nonnegative(),camStreamId:l().min(1)}),d({success:h(!0)}),{kind:`mutation`,auth:`admin`}),assignProfile:M(d({deviceId:i().int().nonnegative(),profile:j,camStreamId:l().min(1)}),d({success:h(!0)}),{kind:`mutation`,auth:`admin`}),unassignProfile:M(d({deviceId:i().int().nonnegative(),profile:j}),d({success:h(!0)}),{kind:`mutation`,auth:`admin`}),forgetDeviceHardware:M(d({deviceId:i().int().nonnegative()}),d({derivedStreamsDeleted:w(l()).readonly(),assignmentsPurged:T(),probeSnapshotsDropped:i().int().nonnegative(),rtspTokenRowsDeleted:i().int().nonnegative()}),{kind:`mutation`,auth:`admin`}),renderPreBufferClip:M(d({deviceId:i(),profile:j.optional(),aroundMs:i(),preRollSec:i().min(0).max(20).default(3),postRollSec:i().min(0).max(20).default(5),format:C([`gif`,`mp4`]).default(`gif`),maxWidth:i().int().min(120).max(1920).default(480),fps:i().int().min(1).max(15).default(5),speed:i().min(1).max(8).default(2)}),d({base64:l(),mime:l(),bytes:i().int(),profile:j,durationMs:i()}),{kind:`mutation`,auth:`admin`}),produceEventMedia:M(d({deviceId:i(),profile:j.optional(),aroundMs:i(),preSeconds:i().min(0).max(20).default(4),postSeconds:i().min(0).max(20).default(6),kinds:w(cb).min(1).default([`mp4`]),gifMaxWidth:i().int().min(120).max(1280).default(640),gifFps:i().int().min(1).max(15).default(12),gifSpeed:i().min(1).max(8).default(4),speed:i().min(1).max(8).default(4)}),db,{kind:`mutation`,auth:`admin`}),fetchEventMedia:M(d({handle:l()}),d({base64:l(),mime:l(),bytes:i().int()}).nullable(),{kind:`mutation`,auth:`admin`}),listAllCameraStreams:M(y(),w(Ii).readonly()),listAllProfileSlots:M(y(),w(Ri).readonly()),getBrokerStats:M(d({brokerId:l()}),Zi),probeStream:M(d({brokerId:l()}),d({probed:T(),summary:l()}),{kind:`mutation`,auth:`admin`}),listClients:M(d({brokerId:l()}),vb),getLiveViewerCounts:M(y(),w(yb).readonly(),{role:`viewer`}),killClient:M(d({brokerId:l(),channel:C([`rtsp`,`audio`]),handle:l()}),d({killed:T()}),{kind:`mutation`,auth:`admin`}),restartProfile:M(d({deviceId:i().int().nonnegative(),profile:j}),d({success:T()}),{kind:`mutation`,auth:`admin`}),getStreamUrl:M(d({streamId:l(),format:sb}),d({url:l()})),getStreamWithCodec:M(Cb,wb,{kind:`mutation`,auth:`admin`}),releaseStreamWithCodec:M(d({pipelineKey:l()}),d({released:T(),refcount:i().int().nonnegative()}),{kind:`mutation`,auth:`admin`}),acquireEgressTranscode:M(Db,Ob,{kind:`mutation`,auth:`admin`}),releaseEgressTranscode:M(d({pipelineKey:l()}),d({released:T(),refcount:i().int().nonnegative()}),{kind:`mutation`,auth:`admin`}),subscribeAudioChunks:M(Ji,Yi,{kind:`mutation`}),pullAudioChunks:M(d({subscriptionId:l(),maxCount:i().int().positive().default(8)}),w(qi).readonly()),unsubscribeAudioChunks:M(d({subscriptionId:l()}),d({released:T()}),{kind:`mutation`}),setPreBufferDuration:M(d({brokerId:l(),seconds:i().min(0).max(30)}),y(),{kind:`mutation`,auth:`admin`}),getPreBufferInfo:M(d({brokerId:l()}),d({configuredSec:i(),bufferedMs:i(),packetCount:i()})),getRtspPort:M(y(),i()),getAllRtspEntries:M(d({hostname:l().optional()}),w(fb).readonly()),getRtspEntry:M(d({brokerId:l(),hostname:l().optional()}),fb.nullable()),regenerateRtspToken:M(d({brokerId:l()}),l().nullable(),{kind:`mutation`,auth:`admin`}),setRtspEnabled:M(d({brokerId:l(),enabled:T()}),y(),{kind:`mutation`,auth:`admin`}),isRtspEnabled:M(d({brokerId:l()}),T()),getDeviceAudioMute:M(d({deviceId:i().int()}),d({muted:T(),appliedBrokers:i().int().nonnegative()})),setDeviceAudioMute:M(d({deviceId:i().int(),muted:T()}),d({muted:T(),appliedBrokers:i().int().nonnegative()}),{kind:`mutation`,auth:`admin`})},events:{onCamStreamDemand:ma(d({deviceId:i().int().nonnegative(),camStreamId:l(),profile:j})),onCamStreamIdle:ma(d({deviceId:i().int().nonnegative(),camStreamId:l()})),onRequestStreamSourceRefresh:ma(d({deviceId:i().int().nonnegative(),camStreamId:l(),brokerId:l()}))}},Ab=C([`h264`,`h265`,`hevc`,`av1`,`mjpeg`,`vp8`,`vp9`]),jb=d({acceptCodecs:w(Ab).readonly().optional(),minHeight:i().int().positive().optional(),maxHeight:i().int().positive().optional(),minWidth:i().int().positive().optional(),excludeDerived:T().optional(),requireSiblingCodec:w(Ab).readonly().optional(),allowTranscode:T().optional(),requireProfileBound:T().optional()}).readonly(),Mb=d({preferredProviders:w(l()).readonly().optional(),resolutionPreference:C([`highest`,`lowest`]).optional(),targetHeight:i().int().positive().optional()}).readonly(),Nb=d({camStreamId:l(),codec:l().optional(),resolution:Fi.optional(),transcodes:T(),reason:l(),profile:j.optional(),brokerId:l().optional(),url:l().optional(),fps:i().positive().optional(),fpsSource:C([`published`,`measured`]).optional()}),Pb={name:`camera-streams`,scope:`device`,mode:`singleton`,kind:`wrapper`,defaultActive:!0,deviceTypes:[P.Camera],methods:{getCameraStreams:M(d({deviceId:i().int().nonnegative()}),w(Ii).readonly()),getBrokerStreams:M(d({deviceId:i().int().nonnegative()}),w(Ri).readonly()),getRtspEntries:M(d({deviceId:i().int().nonnegative(),hostname:l().optional()}),w(fb).readonly()),getProfileRtspEntries:M(d({deviceId:i().int().nonnegative(),hostname:l().optional()}),w(Qi).readonly()),pickStream:M(d({deviceId:i().int().nonnegative(),requirements:jb,preferences:Mb.optional()}),Nb.nullable())},events:{onCamStreamsChanged:ma(d({deviceId:i().int().nonnegative(),camStreams:w(Ii).readonly()})),onProfileSlotsChanged:ma(d({deviceId:i().int().nonnegative(),profileSlots:w(Ri).readonly()}))},runtimeState:d({online:T(),slotStatuses:d({high:Li.optional(),mid:Li.optional(),low:Li.optional()}),slotErrors:d({high:l().optional(),mid:l().optional(),low:l().optional()}),lastChangedAt:i()}),durability:`session`,history:`none`};function wae(e){let t=sa(e).kind;return t===`collection`?!0:t===`skip`&&e.mode===`collection`}function Tae(e){let t=e._def;return e.constructor?.name===`ZodVoid`||t?.type===`void`||t?.typeName===`ZodVoid`}function Eae(e){let t=e._def;return e.constructor?.name===`ZodObject`||t?.type===`object`||t?.typeName===`ZodObject`}function Fb(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 Dae(e,t){if(e===void 0||e.mode!==`collection`)return!1;let n=da(e)[t];return n!==void 0&&n.kind!==`subscription`&&Fb(n.output)}function Oae(e){let t=e.loose;return typeof t==`function`?t.call(e):e}function kae(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 Aae(e){if(e===null||typeof e!=`object`&&typeof e!=`function`)return!1;let t=e.shape??Ib(e._def?.shape);return typeof t==`object`&&!!t&&Object.prototype.hasOwnProperty.call(t,`addonId`)}function jae(e){if(e===null||typeof e!=`object`&&typeof e!=`function`)return!1;let t=e.shape??Ib(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 Ib(e){return typeof e==`function`?e():e}function Mae(e,t){return t.auth===void 0?e.internal===!0?`admin`:`protected`:t.auth}function Nae(e){return e===`public`?`public`:e===`admin`||e===`superAdmin`?`admin`:`protected`}function Lb(e){return e.replace(/-([a-z])/g,(e,t)=>t.toUpperCase())}function Rb(e){let t=e;for(;t instanceof le||t instanceof de||t instanceof _;)t=t.unwrap();return t}function Pae(e){return typeof e==`object`&&!!e}function zb(e){let t=p.get(e);if(Pae(t)&&wi(t.quantity))return t.quantity}function Fae(e){return zb(e)??zb(Rb(e))}function Iae(e){let t=Rb(e);return t instanceof se?{kind:`enum`,enumValues:t.options}:t instanceof ee?{kind:`number`}:t instanceof te?{kind:`string`}:t instanceof re?{kind:`boolean`}:null}function Bb(e,t=``){let n=Rb(e);if(!(n instanceof ae))return[];let r=[],i=n.shape;for(let[e,n]of Object.entries(i)){let i=t?`${t}.${e}`:e,a=Rb(n);if(a instanceof ae){r.push(...Bb(a,i));continue}let o=Iae(n);if(o){let e=Fae(n);r.push({path:i,kind:o.kind,...o.enumValues?{enumValues:o.enumValues}:{},...e===void 0?{}:{quantity:e}})}}return r}function Lae(e){return Bb(e.itemSchema).filter(t=>t.path!==e.keyField).map(e=>({...e,item:!0}))}function Vb(e,t){let n=e;for(let e of t.split(`.`)){let t=Rb(n);if(!(t instanceof ae))return null;let r=t.shape[e];if(!(r instanceof ne))return null;n=r}return n}function Hb(e,t){let n=Bb(e).find(e=>e.path===t);if(n===void 0)return null;let r=Vb(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 Ub(e){return new Map(Bb(e).filter(e=>!e.path.includes(`.`)).flatMap(t=>{let n=Hb(e,t.path);return n===null?[]:[[t.path,n]]}))}function Wb(e){let t=Rb(e);return t instanceof ae?Object.entries(t.shape).flatMap(([e,t])=>t instanceof ne&&!t.safeParse(void 0).success?[e]:[]):[]}function Gb(e,t){let n=t.split(`.`);return n.slice(0,-1).flatMap((t,r)=>{let i=n.slice(0,r+1).join(`.`),a=Vb(e,i);return a!==null&&a.safeParse(void 0).success?[i]:[]})}var Kb={"doorbell.onPressed":E.DoorbellOnPressed},Rae=Kb,qb=d({featureIndex:i().int().nonnegative(),cap:l(),eventName:l(),category:C(E),stateField:l(),fieldKey:l()});function Jb(e,t,n){return{code:e,path:t,message:n}}function zae(e){return e.issues.map(e=>`${e.path.length===0?`payload`:e.path.join(`.`)}: ${e.message}`).join(`; `)}function Yb(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?Hb(e.runtimeState,s.field):null;if(l===null){r.push(Jb(`unknown-field`,c,`\`${e.name}.${a}\` derives from missing state field \`${s.field}\``));continue}if(l.kind!==`number`){r.push(Jb(`kind-mismatch`,c,`\`${e.name}.${a}\` needs a numeric state field; \`${s.field}\` is ${l.kind}`));continue}let u=`${e.name}.${a}`,d=Rae[u];if(d===void 0){r.push(Jb(`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(Jb(`not-composable`,`features[${t.featureIndex}].cap`,`\`${u}\` cannot be derived from { deviceId, timestamp }: ${zae(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(Jb(`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 Xb=C(`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.native-capability-replace.mixed-quantity.helper-mismatch.member-constraint.retention`.split(`.`)),Zb=d({code:Xb,path:l(),message:l()}),Qb=C([`string`,`number`,`boolean`,`enum`]),$b=C([`null`,`offline`,`unknown`,`release`,`omit`]),ex=C([`derived`,`clock`,`constant`,`accumulator`]),tx=d({arrayPath:l(),key:l(),label:l()}),nx=d({cap:l(),path:l(),item:tx.optional(),featureIndex:i().int().nonnegative(),kind:Qb,nullable:T(),required:T(),unavailable:$b,role:ex,source:nl,reads:w(Jc)});function rx(e){let t=e.item===void 0?e.path:Sl(e.item.arrayPath,e.item.key,e.path);return`${e.cap}.${t}`}var ix=C([`new`,`add`,`replace`]),ax=d({featureIndex:i().int().nonnegative(),cap:l(),mode:ix}),ox=d({ok:T(),problems:w(Zb),fields:w(nx),features:w(ax),events:w(qb)}),sx=C([`stopped`,`starting`,`running`,`degraded`,`incomplete`,`failed`]),cx=C([`fresh`,`stale`,`unavailable`]),lx=d({cap:l(),path:l(),item:tx.optional(),state:cx,value:f([l(),i(),T(),b()]),reason:l().optional()}),ux=d({blockId:l(),deviceId:i().nullable(),status:sx,reason:l().optional(),fields:w(lx)}),Bae=Hc,dx=d({id:l().min(1),name:l().min(1).max(120),enabled:T(),updatedAt:i(),composition:gl}),fx=d({id:l().min(1),name:l().nullable(),error:l()}),px=d({deviceId:i().int(),capName:l(),owner:l(),error:l()}),mx=d({integrationId:l().nullable(),storeLoaded:T(),blocks:w(dx),restartBlockIds:w(l()),unreadableBlocks:w(fx),retiredBlockIds:w(l()).optional()}),hx=d({blockId:l(),status:sx,reason:l().optional()}),gx=d({blocks:w(hx),acted:T(),unreleasedClaims:w(px).optional()}),_x={name:`composer`,scope:`system`,mode:`singleton`,internal:!0,methods:{applyBlocks:M(mx,gx,{kind:`mutation`,auth:`admin`}),getStates:M(d({blockIds:w(l())}),d({states:w(ux)}),{auth:`admin`})}};function H(e,t,n){return{code:e,path:t,message:n}}function vx(...e){return{problems:e,fields:[],features:[],events:[]}}function yx(e){let t=e.item===void 0?`fields`:`items.${e.item.key}.fields`;return`features[${e.featureIndex}].${t}.${e.path}`}var bx={kind:`fixed`,result:[`number`]},xx={kind:`fixed`,result:[`boolean`]},Sx=Object.freeze({min:bx,max:bx,abs:bx,floor:bx,ceil:bx,sqrt:bx,round:bx,pow:bx,clamp:bx,avg:bx,sum:bx,age:bx,convert:bx,coalesce:{kind:`coalesce`},any:xx,all:xx,within:xx,latest:{kind:`fixed`,result:[`number`,`null`]},number:{kind:`fixed`,result:[`number`,`null`]},rose:{kind:`fixed`,result:[`number`,`null`]},count:bx,dwell:{kind:`fixed`,result:[`boolean`,`null`]},latchedAt:{kind:`fixed`,result:[`number`,`null`]},schmitt:{kind:`fixed`,result:[`boolean`,`null`]}}),Cx=class extends Error{};function wx(e){return e===null?`null`:typeof e==`number`?`number`:typeof e==`string`?`string`:`boolean`}function Tx(e){return new Set([e])}function Ex(...e){return new Set(e.flatMap(e=>[...e]))}function Vae(e){return new Set([...e].filter(e=>e!==`null`))}function Hae(e,t,n){if(e===`+`){let e=[...t,...n];return e.every(e=>e===`string`)?Tx(`string`):e.every(e=>e===`number`)?Tx(`number`):new Set([`number`,`string`])}return Tx(e===`-`||e===`*`||e===`/`||e===`%`?`number`:`boolean`)}function Uae(e){return e.minArgs===e.maxArgs?`exactly ${e.minArgs}`:e.maxArgs===1/0?`at least ${e.minArgs}`:`${e.minArgs}–${e.maxArgs}`}function Wae(e,t){let n=Lo[e];if(n!==void 0&&(t.length<n.minArgs||t.length>n.maxArgs))throw new Cx(`${e}: wrong number of arguments (${t.length}); expected ${Uae(n)}`);let r=Sx[e];if(r===void 0)throw new Cx(`no result-kind rule for builtin '${e}'`);if(r.kind===`fixed`)return new Set(r.result);let i=Ex(...t.map(Vae));return t.every(e=>e.has(`null`))?Ex(i,Tx(`null`)):i}function Dx(e,t){switch(e.kind){case`literal`:return Tx(wx(e.value));case`identifier`:{if(e.name===`now`)return Tx(`number`);let n=t.get(e.name);if(n===void 0)throw new Cx(`unbound identifier '${e.name}'`);return n}case`unary`:return Tx(e.op===`!`?`boolean`:`number`);case`binary`:return Hae(e.op,Dx(e.left,t),Dx(e.right,t));case`logical`:return Ex(Dx(e.left,t),Dx(e.right,t));case`conditional`:return Ex(Dx(e.consequent,t),Dx(e.alternate,t));case`call`:return Wae(e.callee,e.args.map(e=>Dx(e,t)))}}function Ox(e,t){switch(e.kind){case`literal`:case`identifier`:return!1;case`unary`:return Ox(e.operand,t);case`binary`:case`logical`:return Ox(e.left,t)||Ox(e.right,t);case`conditional`:return Ox(e.test,t)||Ox(e.consequent,t)||Ox(e.alternate,t);case`call`:return e.callee===t||e.args.some(e=>Ox(e,t))}}function kx(e,t){let n=es(e);return n.ok&&Ox(n.parsed.ast,t)}function Ax(e){let t=es(e.expr);if(!t.ok)return{ok:!1,error:t.error};try{return{ok:!0,kinds:Dx(t.parsed.ast,e.bindingKinds)}}catch(e){if(e instanceof Cx)return{ok:!1,error:e.message};throw e}}function jx(e){return e.publish===`value`&&e.empty===`null`?{ok:!0,kinds:new Set([`number`,`null`])}:{ok:!0,kinds:new Set([`number`])}}function Mx(e){return e.publish===`value`?e.reducer===`any`||e.reducer===`all`?{ok:!0,kinds:new Set([`boolean`])}:e.empty===`null`?{ok:!0,kinds:new Set([`number`,`null`])}:{ok:!0,kinds:new Set([`number`])}:{ok:!0,kinds:new Set([`number`])}}function Nx(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=Hb(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 Px(e,t){if(e.kind===`from`)return Nx(e,t);if(e.kind===`code`)return{ok:!1,code:`reserved-variant`,message:`code fields arrive in slice 4`};if(e.kind===`aggregate`)return Mx(e);if(e.kind===`series`)return jx(e);let n=new Map;for(let[r,i]of Object.entries(e.bindings)){if(i.kind===`literal`){n.set(r,new Set([wx(i.value)]));continue}let e=Nx(i,t);if(!e.ok)return{...e,message:`binding \`${r}\`: ${e.message}`};n.set(r,e.kinds)}let r=Ax({expr:e.expr,bindingKinds:n});return r.ok?{ok:!0,kinds:r.kinds}:{ok:!1,code:`expression-invalid`,message:r.error}}function Fx(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(H(`kind-mismatch`,r,`\`${e}.${t.path}\` is a ${t.kind}; this source can produce ${a.join(` or `)}`)),n.has(`null`)&&!t.nullable&&o.push(H(`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 Ix(e){if(e.kind!==`expression`)return null;let t=es(e.expr);if(!t.ok)return null;let n=t.parsed.ast;return n.kind===`literal`&&typeof n.value==`string`?n.value:null}function Lx(e,t,n,r){if(t.kind!==`enum`||t.enumValues===void 0)return null;let i=Ix(n);if(i===null||t.enumValues.includes(i))return null;let a=t.enumValues.map(e=>`\`${e}\``).join(`, `);return H(`kind-mismatch`,r,`\`${e}.${t.path}\` accepts only ${a}; this source is the literal \`${i}\``)}function Rx(e){if(e.kind!==`expression`)return`derived`;if(kx(e.expr,`count`))return`accumulator`;if(xl(e).length>0)return`derived`;let t=es(e.expr);return t.ok&&t.parsed.identifiers.has(`now`)?`clock`:`constant`}function zx(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:H(`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 Bx={resettable:!1};function Vx(e){return new Set([e.keyField,...e.labelField===void 0?[]:[e.labelField],...Object.keys(Bx)])}function Hx(e,t,n){let r=Hb(e.itemSchema,t);return r===null||!r.required?!1:Gb(e.itemSchema,t).every(e=>n.some(t=>t.startsWith(`${e}.`)))}function Ux({capName:e,itemArray:t,reserved:n},r,i){let a=Object.keys(r.fields);return Bb(t.itemSchema).flatMap(o=>{if(n.has(o.path)||o.path in r.fields||!Hx(t,o.path,a))return[];let s=Hb(t.itemSchema,o.path);return s===null||s.nullable?[]:[H(`missing-field`,`${i}.fields.${o.path}`,`\`${e}.${t.path}[].${o.path}\` is required and has no source`)]})}function Wx(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 vx(H(`item-field-reserved`,u,`\`${n}.${r.path}[].${c}\` is set by the composer itself — it takes no source`));let d=Hb(r.itemSchema,c);if(d===null)return vx(H(`unknown-field`,u,`a \`${n}\` item has no field \`${c}\``));let f=Px(l,a);if(!f.ok)return vx(H(f.code,u,f.message));let p=Rx(l),m=zx(d,p,e.mode,n,u);if(!m.ok)return vx(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:[...xl(l)]},g=Lx(n,d,l,u);return{problems:[...Fx(n,d,f.kinds,u),...g===null?[]:[g]],fields:[h],features:[],events:[]}}function Gx(e,t,n,r,i=`new`){let a=`features[${n}].items`,o=e.status?.itemArray;if(o===void 0)return vx(H(`not-item-array`,a,`\`${e.name}\` has no item array — it takes no \`items\``));if(o.path!==`items`)return vx(H(`not-item-array`,a,`\`${e.name}\`'s item array is at \`${o.path}\`, not \`${sl}\` — not composable yet`));let s={capName:e.name,itemArray:o,reserved:Vx(o),featureIndex:n,lookupCap:r,mode:i},c=Object.entries(t.items??{}).flatMap(([e,t])=>[{problems:Ux(s,t,`${a}.${e}`),fields:[],features:[],events:[]},...Object.entries(t.fields).map(([n,r])=>Wx(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 Kx={fieldPath:`lastFetchedAt`,expr:`now`},qx={fieldPath:`lastChangedAt`,expr:`now`};function Jx(e){return{...e,family:`numeric`,deviceType:P.Sensor,memberDeviceType:P.Sensor,memberDeviceTypes:[P.Sensor],activeWhen:void 0,commandCaps:[],baseUnit:Ei(e.quantity),aggregates:vc,accept:[{cap:e.outputCap,fieldPath:e.outputField}]}}function Yx(e){return{...e,family:`binary`,deviceType:P.Sensor,memberDeviceType:P.Sensor,memberDeviceTypes:[P.Sensor],activeWhen:void 0,commandCaps:[],quantity:`none`,baseUnit:void 0,aggregates:yc,empty:`offline`}}var Xx=[Jx({id:`temperature`,summary:`Mean, median, min, max or sum of temperatures. Offline and unknown members are left out, never read as 0 °C.`,role:F.TemperatureSensor,outputCap:`temperature-sensor`,outputField:`celsius`,quantity:`temperature`,defaultAggregate:`mean`,empty:`null`,companions:[Kx]}),Jx({id:`humidity`,summary:`Humidity in percent. Offline and unknown members are left out, never read as 0 %.`,role:F.HumiditySensor,outputCap:`humidity-sensor`,outputField:`percent`,quantity:`humidity`,defaultAggregate:`mean`,empty:`null`,companions:[Kx]}),Jx({id:`pressure`,summary:`Pressure in hectopascals. Offline and unknown members are left out, never read as 0 hPa.`,role:F.PressureSensor,outputCap:`pressure-sensor`,outputField:`hpa`,quantity:`pressure`,defaultAggregate:`mean`,empty:`null`,companions:[Kx]}),Jx({id:`illuminance`,summary:`Illuminance in lux. Offline and unknown members are left out, never read as 0 lx.`,role:F.AmbientLightSensor,outputCap:`ambient-light-sensor`,outputField:`lux`,quantity:`illuminance`,defaultAggregate:`mean`,empty:`null`,companions:[Kx]}),Jx({id:`power`,summary:`Power in watts, summed by default. Nobody reporting omits the key rather than writing 0 W.`,role:F.PowerSensor,outputCap:`power-meter`,outputField:`watts`,quantity:`power`,defaultAggregate:`sum`,empty:`omit`,companions:[Kx]}),Jx({id:`energy`,summary:`Energy in kilowatt-hours, summed by default. Nobody reporting omits the key rather than writing 0 kWh.`,role:F.EnergySensor,outputCap:`power-meter`,outputField:`kwhTotal`,quantity:`energy`,defaultAggregate:`sum`,empty:`omit`,companions:[Kx]}),Jx({id:`battery`,summary:`Battery charge in percent. Offline and unknown members are left out, never read as 0 %.`,role:F.BatterySensor,outputCap:`battery`,outputField:`percentage`,quantity:`percentage`,defaultAggregate:`mean`,empty:`null`,companions:[{fieldPath:`charging`,expr:`"unknown"`},{fieldPath:`sleeping`,expr:`false`},{fieldPath:`lastUpdated`,expr:`now`}]}),Jx({id:`numeric`,summary:`A numeric reading in the members’ shared quantity. Mixed quantities are refused. Nobody reporting publishes null, not 0.`,role:F.NumericSensor,outputCap:`numeric-sensor`,outputField:`value`,quantity:`device`,defaultAggregate:`mean`,empty:`null`,companions:[Kx]}),Yx({id:`motion`,summary:`Any or all motion. Offline and unknown members are left out, never read as off. Nobody reporting takes the device offline.`,role:F.MotionSensor,outputCap:`motion`,outputField:`detected`,defaultAggregate:`any`,accept:[{cap:`motion`,fieldPath:`detected`}],companions:[{fieldPath:`lastDetectedAt`,expr:`null`},{fieldPath:`autoClearAfterMs`,expr:`null`}]}),Yx({id:`contact`,summary:`Any or all open contacts. Offline and unknown members are left out, never read as closed.`,role:F.ContactSensor,outputCap:`contact`,outputField:`entryOpen`,defaultAggregate:`any`,accept:[{cap:`contact`,fieldPath:`entryOpen`}],companions:[qx]}),Yx({id:`leak`,summary:`Any or all leak detections. Offline and unknown members are left out, never read as dry.`,role:F.LeakSensor,outputCap:`flood`,outputField:`flooded`,defaultAggregate:`any`,accept:[{cap:`flood`,fieldPath:`flooded`}],companions:[qx]}),Yx({id:`smoke`,summary:`Any or all smoke detections. Offline and unknown members are left out, never read as clear.`,role:F.SmokeSensor,outputCap:`smoke`,outputField:`detected`,defaultAggregate:`any`,accept:[{cap:`smoke`,fieldPath:`detected`}],companions:[qx]}),Yx({id:`occupancy`,summary:`Any or all of motion or binary sensors, published as a binary. Presence zones are not aggregated. Nobody reporting is offline, not off.`,role:F.BinarySensor,outputCap:`binary`,outputField:`on`,defaultAggregate:`any`,accept:[{cap:`motion`,fieldPath:`detected`},{cap:`binary`,fieldPath:`on`}],companions:[qx]}),Yx({id:`binary`,summary:`Any or all generic binary sensors. Offline and unknown members are left out, never read as off.`,role:F.BinarySensor,outputCap:`binary`,outputField:`on`,defaultAggregate:`any`,accept:[{cap:`binary`,fieldPath:`on`}],companions:[qx]}),Zx({id:`switch`,summary:`On when at least one switch is on, or when all of them are. Offline and unknown members are left out of that decision, never read as off, and still receive the command.`,deviceType:P.Switch,outputCap:`switch`,outputField:`on`,member:{cap:`switch`,fieldPath:`on`},commandCaps:[`switch`]}),Zx({id:`light`,summary:`On when at least one light is on, or when all of them are. Brightness and colour are offered only when every member has them. A command is not sent to a member that lacks it.`,deviceType:P.Light,outputCap:`switch`,outputField:`on`,member:{cap:`switch`,fieldPath:`on`},commandCaps:[`switch`,`brightness`,`color`]}),Zx({id:`fan`,summary:`On when at least one fan is on, or when all of them are. Speed, preset, direction and oscillation are offered only when every fan has them. A command is not sent to a fan that lacks it.`,deviceType:P.Fan,outputCap:`switch`,outputField:`on`,member:{cap:`switch`,fieldPath:`on`},commandCaps:[`switch`,`fan-control`]}),Zx({id:`cover`,summary:`Open when at least one cover is open or part-open, or only when all of them are. Position and tilt are offered only when every cover has them. A cover that reports nothing is left out, never read as closed.`,deviceType:P.Cover,outputCap:`group-active`,outputField:`active`,member:{cap:`cover`,fieldPath:`state`},activeWhen:[`open`,`opening`,`stopped`],commandCaps:[`cover`]}),Zx({id:`valve`,summary:`Open when at least one valve is open or part-open, or only when all of them are. Position is offered only when every valve has it. A valve that reports nothing is left out, never read as closed.`,deviceType:P.Valve,outputCap:`group-active`,outputField:`active`,member:{cap:`valve`,fieldPath:`state`},activeWhen:[`open`,`opening`,`stopped`],commandCaps:[`valve`]}),Zx({id:`lock`,summary:`Locked when at least one lock is locked, or only when all of them are. A jammed or moving lock is not locked. Locking is one tap; unlocking the group needs a confirmation every time, and nothing is sent without it.`,deviceType:P.Lock,outputCap:`group-active`,outputField:`active`,member:{cap:`lock-control`,fieldPath:`state`},activeWhen:[`locked`],commandCaps:[`lock-control`]}),Zx({id:`media-player`,summary:`Playing when at least one player is playing, or only when all of them are. Volume is offered only when every player has it. A player that reports nothing is left out, never read as stopped.`,deviceType:P.MediaPlayer,outputCap:`group-active`,outputField:`active`,member:{cap:`media-player`,fieldPath:`state`},activeWhen:[`playing`,`buffering`],commandCaps:[`media-player`]}),Zx({id:`climate`,summary:`Running when at least one thermostat or air conditioner is not off, or only when all of them are. Target temperature and fan are offered only when every device has them. A device that reports nothing is left out, never read as off.`,deviceType:P.Thermostat,memberDeviceTypes:[P.Thermostat,P.Climate],outputCap:`group-active`,outputField:`active`,member:{cap:`climate-control`,fieldPath:`mode`},activeWhen:[`heat`,`cool`,`auto`,`heat_cool`,`fan_only`,`dry`],commandCaps:[`climate-control`]})];function Zx(e){return{id:e.id,summary:e.summary,deviceType:e.deviceType,outputCap:e.outputCap,outputField:e.outputField,commandCaps:e.commandCaps,family:`actuator`,role:void 0,memberDeviceType:e.deviceType,memberDeviceTypes:e.memberDeviceTypes??[e.deviceType],activeWhen:e.activeWhen,quantity:`none`,baseUnit:void 0,aggregates:yc,defaultAggregate:`any`,empty:`offline`,accept:[e.member],companions:[qx]}}var Qx=new Map(Xx.map(e=>[e.id,e]));function $x(e){return Qx.get(e)??null}var eS=/^\d+(?:\.\d+)?$/,tS=/^-?\d+(?:\.\d+)?$/,nS=/^dwell\(x (>=|<=) (\d+(?:\.\d+)?), (\d+(?:\.\d+)?), (\d+(?:\.\d+)?)\)$/,rS=/^clamp\((x|number\(x\)) \* (-?\d+(?:\.\d+)?) \+ (-?\d+(?:\.\d+)?), (-?\d+(?:\.\d+)?), (-?\d+(?:\.\d+)?)\)$/,iS=/^(x|number\(x\)) \* (-?\d+(?:\.\d+)?) \+ (-?\d+(?:\.\d+)?)$/,aS=/^[A-Za-z_][A-Za-z0-9_]*$/;function oS(e){return hS(e,eS)}function sS(e){return hS(e,tS)}function cS(e){return typeof e==`string`?JSON.stringify(e):typeof e==`number`?sS(e):typeof e==`boolean`?e?`true`:`false`:`null`}function lS(e){return aS.test(e)}function uS(e,t,n,r){return`dwell(x ${e===`gte`?`>=`:`<=`} ${t}, ${n}, ${r})`}function dS(e,t,n,r,i){let a=`${e} * ${t} + ${n}`;return r===null||i===null?a:`clamp(${a}, ${r}, ${i})`}function fS(e){let t=nS.exec(e);if(t===null)return null;let n=Number(t[2]),r=Number(t[3]),i=Number(t[4]);return!Number.isFinite(n)||!Number.isFinite(r)||!Number.isFinite(i)?null:{comparison:t[1]===`<=`?`lte`:`gte`,threshold:n,startDwellMs:r,stopDwellMs:i}}function pS(e){let t=rS.exec(e);if(t!==null)return gS(t[1],t[2],t[3],t[4],t[5]);let n=iS.exec(e);return n===null?null:gS(n[1],n[2],n[3],void 0,void 0)}function mS(e){if(e.kind===`from`)return{cap:e.cap,fieldPath:e.fieldPath,addonId:e.source.addonId,stableId:e.source.stableId};if(e.kind!==`expression`||Object.keys(e.bindings).length!==1)return null;let t=e.bindings.x;return t===void 0||t.kind!==`from`?null:{cap:t.cap,fieldPath:t.fieldPath,addonId:t.source.addonId,stableId:t.source.stableId}}function hS(e,t){if(!Number.isFinite(e))return null;let n=Object.is(e,-0)?`0`:String(e);return t.test(n)?n:null}function gS(e,t,n,r,i){if(e!==`x`&&e!==`number(x)`||t===void 0||n===void 0)return null;let a=Number(t),o=Number(n);if(!Number.isFinite(a)||!Number.isFinite(o))return null;if(r===void 0||i===void 0)return{inner:e,scale:a,offset:o};let s=Number(r),c=Number(i);return!Number.isFinite(s)||!Number.isFinite(c)?null:{inner:e,scale:a,offset:o,clampMin:s,clampMax:c}}var _S=[`switch`,`brightness`,`color`],vS=[Ga.LightColorRgb,Ga.LightColorHsv,Ga.LightColorMired],yS=4;function bS(e){return e===`all`?`all`:`any`}function xS(e){return e===`all`?`all`:`at-least-one`}function SS(e){return e.length===0?[]:_S.filter(t=>e.every(e=>e.includes(t)))}function CS(e){return e.length===0?[]:vS.filter(t=>e.every(e=>e.includes(t)))}function wS(e,t,n,r){return e.flatMap(e=>e.caps.includes(t)?[{deviceId:e.deviceId,cap:t,method:n,args:{...r}}]:[])}async function TS(e,t){let n=[],r=0,i=async()=>{for(;;){let i=r;r+=1;let a=e[i];if(a===void 0)return;try{await t(a),n[i]={deviceId:a.deviceId,ok:!0}}catch(e){let t=e instanceof Error?e.message:String(e);n[i]={deviceId:a.deviceId,ok:!1,error:t}}}},a=Math.min(4,e.length);return await Promise.all(Array.from({length:a},()=>i())),n}var ES={"air-quality-sensor":{co2Ppm:{kind:`gauge`,unit:`ppm`,deadband:5},vocPpb:{kind:`gauge`,unit:`ppb`,deadband:5},pm25:{kind:`gauge`,unit:`µg/m³`,deadband:1},pm10:{kind:`gauge`,unit:`µg/m³`,deadband:1},aqi:{kind:`gauge`,unit:`count`,deadband:1}},"alarm-panel":{state:{kind:`enum`,values:[`disarmed`,`armed_home`,`armed_away`,`armed_night`,`armed_vacation`,`armed_custom_bypass`,`arming`,`disarming`,`pending`,`triggered`]}},"ambient-light-sensor":{lux:{kind:`gauge`,unit:`lx`,deadbandPct:10,minIntervalMs:6e4}},battery:{percentage:{kind:`gauge`,unit:`%`},volts:{kind:`gauge`,unit:`V`}},binary:{on:{kind:`boolean`}},brightness:{percentage:{kind:`gauge`,unit:`%`,minIntervalMs:0}},"carbon-monoxide":{detected:{kind:`boolean`}},"climate-control":{currentTemp:{kind:`gauge`,unit:`°C`,deadband:.1},currentHumidity:{kind:`gauge`,unit:`%`,deadband:.5},target:{kind:`gauge`,unit:`°C`,minIntervalMs:0},targetHigh:{kind:`gauge`,unit:`°C`,minIntervalMs:0},targetLow:{kind:`gauge`,unit:`°C`,minIntervalMs:0}},connectivity:{connected:{kind:`boolean`}},contact:{entryOpen:{kind:`boolean`}},cover:{position:{kind:`gauge`,unit:`%`,minIntervalMs:0}},"device-status":{online:{kind:`boolean`}},dishwasher:{progressPercent:{kind:`gauge`,unit:`%`,deadband:2},state:{kind:`enum`,values:[`idle`,`running`,`paused`,`finished`,`error`,`unavailable`]},operationState:{kind:`enum`,values:[`Inactive`,`Ready`,`DelayedStart`,`Run`,`Pause`,`ActionRequired`,`Finished`,`Error`,`Aborting`]},remainingSeconds:{kind:`gauge`,unit:`s`,minIntervalMs:6e4},doorOpen:{kind:`boolean`},powerOn:{kind:`boolean`}},"enum-sensor":{value:{kind:`enum`,skipWhenSet:`timestamp`}},"fan-control":{percentage:{kind:`gauge`,unit:`%`,minIntervalMs:0},oscillating:{kind:`boolean`}},flood:{flooded:{kind:`boolean`}},gas:{detected:{kind:`boolean`}},"heating-valve":{position:{kind:`gauge`,unit:`%`,deadband:1}},humidifier:{currentHumidity:{kind:`gauge`,unit:`%`,deadband:.5},on:{kind:`boolean`}},"humidity-sensor":{percent:{kind:`gauge`,unit:`%`,deadband:.5}},"lawn-mower-control":{batteryLevel:{kind:`gauge`,unit:`%`,deadband:2}},"lock-control":{state:{kind:`enum`,values:[`locked`,`unlocked`,`locking`,`unlocking`,`jammed`]}},"media-player":{volumeLevel:{kind:`gauge`,unit:`%`,deadband:1},isMuted:{kind:`boolean`}},meter:{value:{kind:`counter`,deadband:.001,minIntervalMs:6e4}},motion:{detected:{kind:`boolean`,excludeDeviceTypes:[P.Camera]}},"network-link":{signalPercent:{kind:`gauge`,unit:`%`,deadband:3,minIntervalMs:6e4},rssiDbm:{kind:`gauge`,unit:`dBm`,deadband:2,minIntervalMs:6e4}},"numeric-sensor":{value:{kind:`gauge`,minIntervalMs:3e4}},"pet-feeder":{foodLevel:{kind:`gauge`},bowlFood:{kind:`gauge`},food1:{kind:`gauge`},food2:{kind:`gauge`},batteryPower:{kind:`gauge`,unit:`%`,deadband:2},desiccantLeftDays:{kind:`gauge`,unit:`s`}},"power-meter":{watts:{kind:`gauge`,unit:`W`,deadband:1,minIntervalMs:3e4},kwhTotal:{kind:`counter`,unit:`kWh`,deadband:.01,minIntervalMs:6e4},volts:{kind:`gauge`,unit:`V`,deadband:1,minIntervalMs:3e4},amps:{kind:`gauge`,unit:`A`,deadband:.05,minIntervalMs:3e4},va:{kind:`gauge`,unit:`VA`,deadband:1,minIntervalMs:3e4},powerFactor:{kind:`gauge`,unit:`ratio`,deadband:.01,minIntervalMs:6e4}},presence:{batteryPercent:{kind:`gauge`,unit:`%`,deadband:1}},"pressure-sensor":{hpa:{kind:`gauge`,unit:`hPa`,deadband:.1}},"running-state":{running:{kind:`boolean`}},smoke:{detected:{kind:`boolean`}},"stream-params":{"main.bitrate":{kind:`gauge`,unit:`kbps`},"main.framerate":{kind:`gauge`,unit:`fps`},"sub.bitrate":{kind:`gauge`,unit:`kbps`},"sub.framerate":{kind:`gauge`,unit:`fps`}},switch:{on:{kind:`boolean`}},tamper:{tampered:{kind:`boolean`}},"temperature-sensor":{celsius:{kind:`gauge`,unit:`°C`,deadband:.1}},"vacuum-control":{batteryLevel:{kind:`gauge`,unit:`%`,deadband:2}},valve:{position:{kind:`gauge`,unit:`%`,minIntervalMs:0}},vibration:{detected:{kind:`boolean`}},"water-heater":{currentTemp:{kind:`gauge`,unit:`°C`,deadband:.5},targetTemp:{kind:`gauge`,unit:`°C`,minIntervalMs:0}},weather:{temperature:{kind:`gauge`,unit:`°C`,deadband:.2},humidity:{kind:`gauge`,unit:`%`,deadband:1},pressure:{kind:`gauge`,unit:`hPa`,deadband:.5},windSpeed:{kind:`gauge`,unit:`m/s`,deadband:.5}}},DS={consumables:{path:`items`,key:`key`,label:`label`,fields:{level:{kind:`gauge`,unit:`%`,deadband:2,displayName:`Level`},status:{kind:`enum`,displayName:`Status`,values:[`ok`,`low`,`empty`,`full`,`replace`]},"remaining.value":{kind:`gauge`,deadband:1,displayName:`Remaining`}}}},OS=`audio-metrics.automation-control.camera-streams.color.control.day-night.device-discovery.doorbell.event-emitter.feature-probe.group-active.group-commands.group-status.image.image-settings.intercom.motion-trigger.motion-zones.native-object-detection.navigation.notifier.privacy-mask.ptz-autotrack.recording-onboard.recording-signal.scene-monitor.script-runner.stream-catalog.stream-signals.update.zone-analytics.zone-rules.zones`.split(`.`);function kS(e){return ES[e]??{}}var AS={kind:`expression`,expr:`now`,bindings:{}};function jS(e,t,n){return{kind:`series`,read:{source:e.source,cap:e.cap,fieldPath:e.fieldPath},publish:t,empty:n}}function MS(e){return{included:jS(e,`included`,`offline`),excluded:jS(e,`excluded`,`offline`),total:jS(e,`total`,`offline`)}}var NS={second:`s`,minute:`min`,hour:`h`};function PS(e){let t=kS(e.source.cap)[e.source.fieldPath]?.unit;return t===void 0?null:`${t}/${NS[e.per]}`}function FS(e){let t=kS(e.cap)[e.fieldPath];return t===void 0?null:t.kind}function IS(e){return FS(e)===null?[H(`member-constraint`,`helper.source`,`${e.cap}.${e.fieldPath} has no history declaration`)]:[]}function LS(e){return{target:{kind:`new`,type:P.Sensor,role:e.role},helper:e.spec,features:[{kind:`fields`,cap:e.cap,fields:{[e.field]:jS(e.member,`value`,e.empty),lastFetchedAt:AS}},{kind:`fields`,cap:`group-status`,fields:MS(e.member)}]}}function RS(e,t=$s){let n=[...IS(e.source)],r=FS(e.source);r===`enum`&&n.push(H(`kind-mismatch`,`helper.source`,`a statistic reads a number or a boolean, not a state`)),e.stat===`sum`&&r!==`counter`&&n.push(H(`kind-mismatch`,`helper.stat`,`a gauge has no sum — that is the integral template`));let i=mc(e.window,t);return i.ok||n.push(H(`retention`,`helper.window`,i.reason)),{problems:n,draft:LS({role:F.NumericSensor,cap:`numeric-sensor`,field:`value`,empty:`null`,spec:e,member:e.source})}}function zS(e,t=$s){let n=[...IS(e.source)],r=FS(e.source);(r===`enum`||r===`boolean`)&&n.push(H(`kind-mismatch`,`helper.source`,`a derivative reads a number that moves, not a yes/no or a state`));let i=mc(e.window,t);return i.ok||n.push(H(`retention`,`helper.window`,i.reason)),{problems:n,draft:LS({role:F.NumericSensor,cap:`numeric-sensor`,field:`value`,empty:`null`,spec:e,member:e.source})}}function BS(e,t=$s){let n=[...IS(e.source)],r=FS(e.source),i=e.source.cap===`power-meter`&&e.source.fieldPath===`watts`;(r===`counter`||r===`boolean`||r===`enum`)&&n.push(H(`kind-mismatch`,`helper.source`,`an integral reads an instantaneous gauge, not a counter or a state`)),e.output===`energy`&&!i&&n.push(H(`kind-mismatch`,`helper.output`,`energy is the integral of power-meter.watts; another reading uses the meter`)),e.output===`meter`&&i&&n.push(H(`kind-mismatch`,`helper.output`,`power integrates to power-meter.kwhTotal, which energy dashboards already read`));let a=hc(e.reset,t);a.ok||n.push(H(`retention`,`helper.reset`,a.reason));let o=e.output===`energy`;return{problems:n,draft:LS({role:o?F.EnergySensor:F.NumericSensor,cap:o?`power-meter`:`meter`,field:o?`kwhTotal`:`value`,empty:`offline`,spec:e,member:e.source})}}var VS={kind:`expression`,expr:`now`,bindings:{}};function HS(e){return{kind:`from`,source:e.source,cap:e.cap,fieldPath:e.fieldPath}}function US(e,t){return{kind:`expression`,expr:e,bindings:t}}function WS(e,t){return e.source.addonId===t.source.addonId&&e.source.stableId===t.source.stableId&&e.cap===t.cap&&e.fieldPath===t.fieldPath}function GS(e,t,n=[]){return{target:{kind:`new`,type:P.Sensor,role:F.NumericSensor},helper:e,features:[{kind:`fields`,cap:`numeric-sensor`,fields:{value:t,lastFetchedAt:VS}},...n]}}function KS(e,t){return{target:{kind:`new`,type:P.Sensor,role:F.BinarySensor},helper:e,features:[{kind:`fields`,cap:`binary`,fields:{on:t,lastChangedAt:VS}}]}}function qS(e){let t=[],n=sS(e.high),r=sS(e.low);n===null&&t.push(H(`kind-mismatch`,`helper.high`,`the high edge is a finite number`)),r===null&&t.push(H(`kind-mismatch`,`helper.low`,`the low edge is a finite number`)),n!==null&&r!==null&&e.low>e.high&&t.push(H(`kind-mismatch`,`helper.low`,`the low edge (${e.low}) is above the high edge (${e.high}) — it turns on at the high edge and off at the low one`));let i=oS(e.onForMs),a=oS(e.offForMs);(i===null||a===null)&&t.push(H(`kind-mismatch`,`helper.onForMs`,`the on and off delays are a non-negative number of milliseconds`));let o=i!==null&&a!==null&&(e.onForMs>0||e.offForMs>0)?`, ${i}, ${a}`:``;return{problems:t,draft:KS(e,US(`coalesce(schmitt(x, ${n??`0`}, ${r??`0`}${o}), false)`,{x:HS(e.source)}))}}var JS=[`a`,`b`];function YS(e){let t=[],n=e.op!==`sum`;return n&&e.inputs.length!==2&&t.push(H(`member-constraint`,`helper.inputs`,`a ${e.op} takes exactly two readings, the first ${e.op===`ratio`?`over`:`minus`} the second`)),!n&&e.inputs.length<2&&t.push(H(`member-constraint`,`helper.inputs`,`a sum takes two or more readings`)),e.inputs.forEach((n,r)=>{e.inputs.slice(0,r).some(e=>WS(e,n))&&t.push(H(`member-constraint`,`helper.inputs[${r}]`,`this reading is already an input`))}),t}var XS=[`included`,`excluded`,`total`];function ZS(e){let t=YS(e);if(e.op===`sum`){let n=e.inputs.map(e=>({source:e.source,cap:e.cap,fieldPath:e.fieldPath})),r=e=>({kind:`aggregate`,reducer:`sum`,reads:n,publish:e,empty:`null`}),i=Object.fromEntries(XS.map(e=>[e,r(e)]));return{problems:t,draft:GS(e,r(`value`),[{kind:`fields`,cap:`group-status`,fields:i}])}}let n=Object.fromEntries(e.inputs.slice(0,2).map((e,t)=>[JS[t]??`a`,HS(e)]));return{problems:t,draft:GS(e,US(e.op===`difference`?`a - b`:`b == 0 ? null : a / b`,n))}}function QS(e){let t=[],n=new Set;if(e.inputs.forEach((e,r)=>{let i=`helper.inputs[${r}].name`;lS(e.name)||t.push(H(`expression-invalid`,i,`\`${e.name}\` is not a name — use letters, digits and _, starting with a letter`)),n.has(e.name)&&t.push(H(`expression-invalid`,i,`the name \`${e.name}\` is used twice`)),n.add(e.name)}),t.length>0)return t;let r=Object.fromEntries(e.inputs.map(e=>[e.name,HS(e.member)])),i=vs({expr:e.expr,bindings:r});return i===null?[]:[H(`expression-invalid`,`helper.expr`,i)]}function $S(e){let t=QS(e),n=Object.fromEntries(e.inputs.map(e=>[e.name,HS(e.member)])),r=US(e.expr,n);return{problems:t,draft:e.output===`boolean`?KS(e,r):GS(e,r)}}function eC(e,t){return e.addonId===t.addonId&&e.stableId===t.stableId}function tC(e,t){return eC(e.source,t.source)&&e.cap===t.cap&&e.fieldPath===t.fieldPath}function nC(e,t){return e.accept.some(e=>e.cap===t.cap&&e.fieldPath===t.fieldPath)}function rC(e,t){return t.members.flatMap((n,r)=>{let i=`helper.members[${r}]`,a=[];if(!nC(e,n)){let t=e.accept.map(e=>`${e.cap}.${e.fieldPath}`).join(` or `);a.push(H(`member-constraint`,i,`a ${e.id} group reads ${t}; this member is ${n.cap}.${n.fieldPath}`))}return t.members.slice(0,r).some(e=>tC(e,n))&&a.push(H(`member-constraint`,i,`this member is already in the group`)),a})}function iC(e,t,n,r){return{kind:`aggregate`,reducer:t.aggregate,reads:[...n],publish:r,empty:e.empty,...e.activeWhen===void 0?{}:{activeWhen:[...e.activeWhen]}}}function aC(e,t){let n=t.members.map(e=>({source:e.source,cap:e.cap,fieldPath:e.fieldPath})),r=Object.fromEntries(e.companions.map(e=>[e.fieldPath,cC(e.expr)]));return{target:{kind:`new`,type:e.deviceType,...e.role===void 0?{}:{role:e.role}},helper:t,features:[{kind:`fields`,cap:e.outputCap,fields:{[e.outputField]:iC(e,t,n,`value`),...r}},{kind:`fields`,cap:`group-status`,fields:{included:iC(e,t,n,`included`),excluded:iC(e,t,n,`excluded`),total:iC(e,t,n,`total`)}}]}}function oC(e,t){if(e.family===`actuator`){if(t.active===void 0)return[H(`kind-mismatch`,`helper.active`,`a ${e.id} group needs an active criterion (at-least-one or all)`)];let n=bS(t.active);return t.aggregate===n?[]:[H(`kind-mismatch`,`helper.aggregate`,`active \`${t.active}\` aggregates by \`${n}\`, not \`${t.aggregate}\``)]}return t.active===void 0?[]:[H(`kind-mismatch`,`helper.active`,`a ${e.id} group has no active criterion — that belongs to an actuator group`)]}function sC(e){let t=gl.safeParse(e);return t.success?{ok:!0,composition:t.data}:{ok:!1,problems:[H(`helper-mismatch`,`helper`,`the template did not compile: ${t.error.issues.map(e=>e.message).join(`; `)}`)]}}function cC(e,t={}){return{kind:`expression`,expr:e,bindings:t}}function lC(e){let t=e.member;if(t.cap!==`power-meter`||t.fieldPath!==`watts`)return{ok:!1,problems:[H(`member-constraint`,`helper.member`,`an appliance helper reads power-meter.watts`)]};let n=oS(e.thresholdWatts),r=oS(e.startDwellMs),i=oS(e.stopDwellMs);if(n===null||e.thresholdWatts<=0)return{ok:!1,problems:[H(`kind-mismatch`,`helper.thresholdWatts`,`the threshold is watts above which the appliance is running`)]};if(r===null||i===null)return{ok:!1,problems:[H(`kind-mismatch`,`helper.startDwellMs`,`start and stop dwells are a non-negative number of milliseconds`)]};let a={kind:`from`,source:t.source,cap:t.cap,fieldPath:t.fieldPath},o=uS(`gte`,n,r,i),s=cC(`now`);return sC({target:{kind:`new`,type:Ds(e.appliance)},helper:e,features:[{kind:`fields`,cap:`running-state`,fields:{running:cC(o,{x:a}),source:cC(`"assigned"`),phase:cC(`null`),lastFetchedAt:s,since:cC(`latchedAt(${o})`,{x:a})}},{kind:`fields`,cap:`power-meter`,fields:{watts:a,lastFetchedAt:s}}]})}function uC(e,t=$s){switch(e.kind){case`group`:return fC(e);case`appliance`:return lC(e);case`statistic`:{let n=RS(e,t);return n.problems.length>0?{ok:!1,problems:n.problems}:sC(n.draft)}case`integral`:{let n=BS(e,t);return n.problems.length>0?{ok:!1,problems:n.problems}:sC(n.draft)}case`derivative`:{let n=zS(e,t);return n.problems.length>0?{ok:!1,problems:n.problems}:sC(n.draft)}case`threshold`:return dC(qS(e));case`arithmetic`:return dC(ZS(e));case`expression`:return dC($S(e))}}function dC(e){return e.problems.length>0?{ok:!1,problems:e.problems}:sC(e.draft)}function fC(e){let t=$x(e.templateId);if(t===null)return{ok:!1,problems:[H(`member-constraint`,`helper.templateId`,`unknown template \`${e.templateId}\``)]};let n=oC(t,e);if(n.length>0)return{ok:!1,problems:n};if(!t.aggregates.includes(e.aggregate)){let n=t.aggregates.join(`, `);return{ok:!1,problems:[H(`kind-mismatch`,`helper.aggregate`,`a ${t.id} group aggregates by ${n}, not \`${e.aggregate}\``)]}}let r=rC(t,e);return r.length>0?{ok:!1,problems:r}:sC(aC(t,e))}function pC(e,t){return JSON.stringify(e.target)===JSON.stringify(t.target)&&JSON.stringify(e.features)===JSON.stringify(t.features)}function mC(e){return e.kind===`appliance`?Ds(e.appliance):e.kind===`group`?$x(e.templateId)?.memberDeviceType??null:null}function hC(e,t){if(e.kind!==`group`)return[];let n=$x(e.templateId);if(n===null||n.family!==`numeric`)return[];let r=e.members.flatMap((e,n)=>{let r=t.get(B(e.source))?.quantity;return r===void 0?[]:[{index:n,quantity:r}]});if(n.quantity!==`device`)return r.flatMap(e=>e.quantity===n.quantity?[]:[H(`mixed-quantity`,`helper.members[${e.index}]`,`a ${n.id} group is ${n.quantity}${n.baseUnit===void 0?``:` (${n.baseUnit})`}; this member is ${e.quantity}`)]);let i=[...new Set(r.map(e=>e.quantity))];return i.length<=1?[]:[H(`mixed-quantity`,`helper.members`,`a numeric group requires one quantity; members report ${i.join(` and `)}`)]}function gC(e,t){if(e.kind!==`group`)return[];let n=$x(e.templateId);return n===null?[]:e.members.flatMap((e,r)=>{let i=t.get(B(e.source))?.deviceType;return i===void 0||n.memberDeviceTypes.includes(i)?[]:[H(`member-constraint`,`helper.members[${r}]`,`a ${n.id} group takes ${n.memberDeviceTypes.join(` or `)} devices; this member is a ${i}`)]})}function _C(e,t){let n=e.helper;if(n===void 0)return[];let r=uC(n);return r.ok?pC(e,r.composition)?n.kind===`appliance`?vC(n.member,t):n.kind===`arithmetic`?yC(n,t):n.kind===`group`?[...hC(n,t),...gC(n,t)]:[]:[H(`helper-mismatch`,`helper`,`the stored features are not this template — the helper spec is the only writer`)]:r.problems}function vC(e,t){let n=t.get(B(e.source));if(n===void 0)return[];let r=[];return n.deviceType!==void 0&&n.deviceType!==P.Sensor&&n.deviceType!==P.Switch&&r.push(H(`member-constraint`,`helper.member`,`an appliance helper reads a sensor or a switch; this member is a ${n.deviceType}`)),n.quantity!==void 0&&n.quantity!==`power`&&r.push(H(`mixed-quantity`,`helper.member`,`an appliance helper reads power (W); this member is ${n.quantity}`)),r}function yC(e,t){let n=e.inputs.flatMap(e=>{let n=t.get(B(e.source))?.quantity;return n===void 0?[]:[n]}),r=[...new Set(n)];return r.length<=1?[]:[H(`mixed-quantity`,`helper.inputs`,`a ${e.op} needs readings of one quantity; these inputs report ${r.join(` and `)}`)]}var bC=class extends Error{};function xC(e){return new Set(e.composition.features.flatMap(e=>!fl(e)||e.kind!==`fields`?[]:Cl(e).map(({fieldPath:t})=>`${e.cap}.${t}`)))}function SC(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 CC(e){let t=xC(e);return e.composition.features.flatMap(n=>!fl(n)||n.kind!==`fields`?[]:Cl(n).map(({fieldPath:r,source:i})=>[vl({source:e.target,cap:n.cap,fieldPath:r}),xl(i).filter(n=>SC(e,t,n)).map(vl)]))}function wC(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 bC(`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 bC(`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 TC(e,t){let n=wC(e,t).flatMap(CC);return new Map(n)}function EC(e,t){let n=TC(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 DC(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 OC(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 kC(e,t){let n=TC(e,t),r=`${B(e.target)}#`;return DC(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:OC(t,i,n),component:i}]})}function AC(e){let t=new Map(e.map(e=>[e.name,e]));return e=>t.get(e)??null}var jC=new Set([`device-status`,`feature-probe`]),MC={addonId:Hc,stableId:`${Wc}(unsaved)`},NC=`(unsaved)`;function PC(e,t,n){let r=n(e.cap);if(r===null)return H(`unknown-capability`,`${t}.cap`,`no capability is named \`${e.cap}\``);if(jC.has(r.name))return H(`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?H(`not-composable`,`${t}.cap`,`\`${r.name}\` has no per-device state to compose`):{def:r,state:i,fields:Ub(i)}}function FC(e){let t=e.helper;if(t===void 0||t.kind!==`group`)return new Set;let n=$x(t.templateId);return n===null||n.family!==`actuator`?new Set:new Set(n.commandCaps)}function IC({def:e,state:t,fields:n},r,i,a,o){let s=[];e.deviceTypes!==void 0&&!e.deviceTypes.includes(a)&&s.push(H(`wrong-device-type`,`${i}.cap`,`\`${e.name}\` is not offered on a \`${a}\` device (it allows ${e.deviceTypes.join(`, `)})`));let c=Object.entries(e.methods).filter(([t,n])=>n.systemOnly!==!0&&e.composedMethods?.[t]===void 0).map(([e])=>`\`${e}\``);c.length>0&&!o.has(e.name)&&s.push(H(`has-commands`,`${i}.cap`,`\`${e.name}\` has ${c.join(`, `)}, which a composed device cannot serve until commands arrive (slice 3)`));let l=r.items===void 0?null:e.status?.itemArray?.path??null;for(let a of Wb(t))a!==l&&(n.has(a)?a in r.fields||s.push(H(`missing-field`,`${i}.fields.${a}`,`\`${e.name}.${a}\` is required and has no source`)):s.push(H(`not-composable`,`${i}.fields`,`\`${e.name}.${a}\` is not a scalar — nested fields arrive in a later slice`)));return s}function Gae({def:e,fields:t},n,r,i){let{featureIndex:a,path:o,source:s}=n,c=`features[${a}].fields.${o}`;if(o.includes(`.`))return vx(H(`nested-field`,c,`\`${o}\` is nested — nested fields arrive in a later slice`));let l=t.get(o);if(l===void 0)return vx(H(`unknown-field`,c,`\`${e.name}\` has no field \`${o}\``));let u=Px(s,i);if(!u.ok)return vx(H(u.code,c,u.message));let d=Rx(s),f=zx(l,d,r,e.name,c);if(!f.ok)return vx(f.problem);let p=s.kind===`aggregate`&&s.publish===`value`&&s.empty===`omit`,m={cap:e.name,path:o,featureIndex:a,kind:l.kind,nullable:l.nullable,required:l.required,unavailable:p?`omit`:f.unavailable,role:d,source:s,reads:[...xl(s)]},h=Lx(e.name,l,s,c);return{problems:[...Fx(e.name,l,u.kinds,c),...h===null?[]:[h]],fields:[m],features:[],events:[]}}function LC(e,t,n,r,i){let a=`features[${t}]`,o=PC(e,a,r);if(`code`in o)return vx(o);let s=n.mode===`replace`?[]:[...IC(o,e,a,n.deviceType,i)];e.commands!==void 0&&Object.keys(e.commands).length>0&&s.push(H(`reserved-variant`,`${a}.commands`,"commands (`forward`) arrive in slice 3"));let c=Object.entries(e.fields).map(([e,i])=>Gae(o,{featureIndex:t,path:e,source:i},n.mode,r)),l=e.items===void 0?[]:[Gx(o.def,e,t,r,n.mode)],u=[...c,...l],d=u.flatMap(e=>e.fields),f={featureIndex:t,cap:o.def.name,mode:n.mode},p=Yb(o.def,f,d);return{problems:[...s,...u.flatMap(e=>e.problems),...p.problems],fields:d,features:[f],events:p.events}}function RC(e,t){let n=e.nativeCaps.get(t);return n!==void 0&&n!==`composer`}function Kae(e){return`code`in e}function qae(e,t){if(e.target.kind===`new`)return{kind:`new`,type:e.target.type};let n=B(e.target.device);return t===void 0?H(`target-unreadable`,`target`,`target device \`${n}\` was not read — the save is refused rather than stored unchecked`):t.kind===`absent`?H(`target-missing`,`target`,`target device \`${n}\` does not exist`):t.kind===`unreadable`?H(`target-unreadable`,`target`,`could not read target device \`${n}\` (${t.error}) — the save is refused rather than stored unchecked`):{kind:`existing`,found:t}}var Jae=new Set([`not-composable`,`unknown-capability`,`reserved-variant`]);function Yae(e,t){let n=t.problems.filter(e=>Jae.has(e.code));return n.length>0?{problems:n,fields:[],features:[],events:[]}:vx(e)}function Xae(e,t,n){return e.kind===`new`?{mode:`new`,deviceType:e.type}:RC(e.found,t)?H(`native-capability-replace`,n,`native-capability-replace: stored override replaces native capability \`${t}\` on device ${e.found.deviceId} — refused (D944)`):{mode:`add`,deviceType:e.found.type}}function zC(e,t,n){let r=qae(e,n);if(`code`in r)return vx(r);let i=FC(e),a=e.features.map((e,n)=>{let a=`features[${n}]`;if(e.kind===`passthrough`)return vx(H(`reserved-variant`,a,`whole-capability passthrough of \`${e.cap}\` arrives in slice 3`));let o=Xae(r,e.cap,a);if(Kae(o))return!fl(e)||r.kind!==`existing`?{problems:[],fields:[],features:[],events:[]}:Yae(o,LC(e,n,{mode:`add`,deviceType:r.found.type},t,i));let s=LC(e,n,o,t,i);return fl(e)?s:{problems:s.problems,fields:[],features:[],events:[]}});return{problems:a.flatMap(e=>e.problems),fields:a.flatMap(e=>e.fields),features:a.flatMap(e=>e.features),events:a.flatMap(e=>e.events)}}function Zae(e){let t=e.features.flatMap(e=>fl(e)&&e.kind===`fields`?wl(e).flatMap(xl).map(e=>e.source):[]);return[...new Map(t.map(e=>[B(e),e])).values()]}function Qae(e,t,n){return{ref:e.target.kind===`existing`?e.target.device:t.self??MC,native:e.target.kind===`existing`&&t.target?.kind===`found`?t.target:null,replaced:BC(n)}}function BC(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(rx))}function $ae(e,t,n,r){let i=`${e.cap}.${e.fieldPath}`;return n.some(e=>rx(e)===i&&!r.replaced.has(i))?[]:r.native===null?[H(`source-field-unknown`,t,`this device has no composed field \`${e.cap}.${e.fieldPath}\``)]:RC(r.native,e.cap)?[]:[H(`source-capability-missing`,t,`the target device (device ${r.native.deviceId}) has no native \`${e.cap}\``)]}function eoe(e,t,n){let r=B(n.ref);return e.flatMap(i=>i.reads.flatMap(a=>{let o=yx(i),s=B(a.source);if(s===r)return $ae(a,o,e,n);let c=t.sources.get(s);return c===void 0||c.kind===`unreadable`?[H(`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`?[H(`source-missing`,o,`source \`${s}\` does not exist`)]:c.caps.has(a.cap)?[]:[H(`source-capability-missing`,o,`source \`${s}\` (device ${c.deviceId}) has no \`${a.cap}\``)]}))}function toe(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 noe(e,t,n){for(let r of e){let e=toe(r,t);if(e===null)continue;let i=`${e.cap}.${e.fieldPath}`,a=n.find(e=>rx(e)===i);if(a!==void 0)return yx(a)}return`features`}function roe(e,t){for(let[n,r]of t)if(e.some(e=>e.startsWith(`${n}#`)))return{key:n,error:r};return null}function ioe(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 kC(i,t.peers).map(e=>{let t=noe(e.path,a,n),r=roe([...e.component],o);return r===null?H(`cycle`,t,`a field reads itself: ${e.path.join(` → `)}`):H(`cycle`,t,`possible cycle through \`${r.key}\` — its state could not be read (${r.error}): ${e.path.join(` → `)}`)})}catch(e){if(e instanceof bC)return[H(`duplicate-target`,`features`,e.message)];throw e}}function aoe(e,t){let n=zC(e,t.lookupCap,t.target??void 0),r=Qae(e,t,n),i=n.problems.filter(e=>e.code===`native-capability-replace`).map(e=>e.path),a=ioe(e,t,n.fields,r).filter(e=>i.some(t=>e.path===t||e.path.startsWith(`${t}.`))?!1:i.length===0||e.path!==`features`),o=new Map([...t.sources].flatMap(([e,t])=>t.kind===`found`?[[e,{deviceType:t.deviceType,quantity:t.quantity}]]:[])),s=[...n.problems,...eoe(n.fields,t,r),...a,..._C(e,o)];return{ok:s.length===0,problems:s,fields:[...n.fields],features:[...n.features],events:[...n.events]}}var VC=d({path:l(),kind:Qb,nullable:T(),required:T(),enumValues:w(l()).optional()}),HC=d({cap:l(),fields:w(VC),itemArray:d({path:l(),keyField:l()}).optional()}),UC=d({caps:w(HC)});function WC(e,t){if(jC.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=Ub(n),a=e.status?.itemArray?.path??null;return Wb(n).some(e=>e!==a&&!i.has(e))&&r.push(`not-composable`),Yb(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 ooe(e,t){return e.filter(e=>WC(e,t).length===0).map(e=>{let t=e.runtimeState,n=t===void 0?[]:[...Ub(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 GC=d({apply:T()}),KC=d({apply:T(),rows:i().int(),raw:i().int(),markers:i().int(),migrated:i().int(),failed:i().int(),remainingRaw:i().int(),unresolvedMarkers:i().int(),redundantCopies:i().int().optional(),verified:T()}),qC=`core-block-`,JC=`core-blocks`;function soe(e){return`${qC}${e}`}function coe(e){if(!e.startsWith(`core-block-`))return null;let t=e.slice(11);return t.length>0?t:null}var YC=f([h(`hub`),l().min(1)]),XC=C([`stopped`,`starting`,`running`,`degraded`,`incomplete`,`failed`]),ZC=`main.ts`,QC=x(l().min(1).max(260),l().max(2e5)),$C=v(),ew=d({name:l().min(1).max(120),code:l().max(2e5).optional(),files:QC.optional(),entry:l().min(1).max(260).optional(),enabled:T(),placement:YC,integrationId:l().optional(),settingsSchema:$C.optional()}),tw=ew.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 nw(e){return e!==void 0&&e.length>0?e:ZC}function loe(e){let t=nw(e.entry);return e.files===void 0?{files:{[t]:e.code},entry:t}:{files:{...e.files},entry:t}}function uoe(e){if(e.files!==void 0){let t=nw(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 rw=m(`kind`,[d({kind:h(`code`)}),d({kind:h(`recipe`),recipe:e_}),d({kind:h(`composition`),composition:gl})]),iw=d({name:l().min(1).max(120).optional(),enabled:T(),composition:gl}),aw=d({name:l().min(1).max(120),code:l().max(2e5),files:QC.optional(),entry:l().min(1).max(260).optional(),enabled:T(),placement:YC,integrationId:l().optional(),settingsSchema:$C.optional(),id:l(),createdAt:i(),updatedAt:i(),createdBy:l(),status:XC,lastError:l().optional(),lastChangedAt:i(),source:rw.optional()});function doe(e){return e.source?.kind??`code`}function foe(e){return e.source?.kind===`composition`?e.source.composition:null}var ow=m(`kind`,[d({kind:h(`answered`),state:ux.nullable()}),d({kind:h(`unreachable`),error:l()})]),sw=d({block:aw,state:ow}),cw=d({state:h(`not-loaded`),reason:l()}),lw=m(`state`,[d({state:h(`loaded`),views:w(sw)}),cw]),uw=m(`state`,[d({state:h(`loaded`),view:sw.nullable()}),cw]),dw=m(`state`,[d({state:h(`loaded`),view:sw.nullable()}),cw]),fw=d({ok:T(),error:l().optional(),line:i().optional(),column:i().optional()}),pw=d({code:l().optional(),files:QC.optional(),entry:l().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`]})}),mw={name:`core-blocks`,scope:`system`,mode:`singleton`,methods:{list:M(d({}),d({blocks:w(aw)}),{auth:`admin`}),get:M(d({blockId:l()}),d({block:aw.nullable()}),{auth:`admin`}),create:M(d({block:tw}),d({block:aw}),{kind:`mutation`,auth:`admin`,caller:`required`}),update:M(d({blockId:l(),block:ew.partial()}),d({block:aw}),{kind:`mutation`,auth:`admin`,caller:`required`}),delete:M(d({blockId:l()}),d({success:h(!0)}),{kind:`mutation`,auth:`admin`}),setEnabled:M(d({blockId:l(),enabled:T()}),d({block:aw}),{kind:`mutation`,auth:`admin`}),restart:M(d({blockId:l()}),d({block:aw}),{kind:`mutation`,auth:`admin`}),compile:M(pw,fw,{kind:`mutation`,auth:`admin`}),getBlockSettings:M(d({blockId:l()}),mv.nullable(),{auth:`admin`}),updateBlockSettings:M(d({blockId:l(),patch:hv}),gv,{kind:`mutation`,auth:`admin`}),migrateRawSecrets:M(GC,KC,{kind:`mutation`,auth:`admin`}),getTypeDefs:M(d({}),d({libs:w(d({filePath:l(),content:l()}))}),{auth:`admin`}),createComposition:M(d({block:iw}),d({block:aw}),{kind:`mutation`,auth:`admin`,caller:`required`}),updateComposition:M(d({blockId:l(),expectedUpdatedAt:i(),block:iw.partial()}),d({block:aw}),{kind:`mutation`,auth:`admin`,caller:`required`}),getComposition:M(d({blockId:l()}),uw,{auth:`admin`}),listCompositions:M(d({}),lw,{auth:`admin`}),getCustomization:M(d({addonId:l().min(1),stableId:l().min(1)}),dw,{auth:`admin`}),listComposableCaps:M(d({deviceType:C(P)}),UC,{auth:`admin`}),validateComposition:M(d({composition:gl,blockId:l().optional()}),ox,{kind:`mutation`,auth:`admin`,access:`view`}),reportAutomationRun:M(d({blockId:l().min(1),trace:N_.optional(),runStartedAt:i().optional(),keepTraces:i().int().min(1).max(100).optional()}),y(),{kind:`mutation`,auth:`admin`}),getAutomationRunState:M(d({blockId:l().min(1)}),P_,{auth:`admin`}),getTraces:M(d({blockId:l().min(1)}),d({traces:w(N_),lastError:l().nullable()}),{auth:`admin`})}},hw=d({stepId:l(),entry:Rh}),gw=d({path:l().min(1),bytes:i().int().nonnegative(),sha256:l().regex(/^[0-9a-f]{64}$/)}),_w=d({addonId:l(),stepId:l().min(1),entries:w(Rh).min(1).max(4),bundle:d({ticket:On,bytes:i().int().positive(),sha256:l().regex(/^[0-9a-f]{64}$/)}),files:w(gw).min(1).max(64),distribute:T()}),vw=m(`kind`,[d({kind:h(`imported`),modelIds:w(l()).readonly(),distributed:w(d({modelId:l(),nodeId:l(),format:C(ia),ok:T(),error:l().optional()})).readonly()}),d({kind:h(`refused`),reason:C([`transfer-failed`,`checksum-mismatch`,`bundle-mismatch`,`invalid-entry`,`id-taken`]),detail:l()})]),yw={name:`custom-model-registry`,scope:`system`,mode:`collection`,internal:!0,methods:{listModels:M(y(),w(hw).readonly(),{auth:`admin`}),importModelBundle:M(_w,vw,{kind:`mutation`,auth:`admin`,timeoutMs:30*6e4})}},bw=d({engineId:l(),kind:C([`relational`,`vector`]),displayName:l()}),xw={name:`data-store-provider`,scope:`system`,mode:`collection`,internal:!0,methods:{getEngineInfo:M(y(),bw,{auth:`admin`}),get:M(d({namespace:l().optional(),collection:l(),key:l()}),o(),{auth:`admin`}),set:M(d({namespace:l().optional(),collection:l(),key:l(),value:o()}),y(),{kind:`mutation`,auth:`admin`}),query:M(d({namespace:l().optional(),collection:l(),filter:ay.optional(),columns:w(l()).readonly().optional()}),w(ly).readonly(),{auth:`admin`}),insert:M(d({namespace:l().optional(),collection:l(),record:d({id:l().optional(),data:x(l(),o())})}),d({id:f([l(),i()])}),{kind:`mutation`,auth:`admin`}),upsert:M(d({namespace:l().optional(),collection:l(),conflict:w(l()).readonly(),record:uy}),d({id:f([l(),i()])}),{kind:`mutation`,auth:`admin`}),upsertMany:M(d({namespace:l().optional(),collection:l(),conflict:w(l()).readonly(),records:w(uy).readonly()}),d({upserted:i().int()}),{kind:`mutation`,auth:`admin`}),insertMany:M(d({namespace:l().optional(),collection:l(),records:w(uy).readonly()}),d({inserted:i().int()}),{kind:`mutation`,auth:`admin`}),transact:M(d({namespace:l().optional(),guard:py.optional(),ops:w(fy).readonly()}),d({applied:T(),current:o().optional()}),{kind:`mutation`,auth:`admin`}),update:M(d({namespace:l().optional(),collection:l(),id:l(),data:x(l(),o())}),y(),{kind:`mutation`,auth:`admin`}),delete:M(d({namespace:l().optional(),collection:l(),key:l()}),y(),{kind:`mutation`,auth:`admin`}),deleteWhere:M(d({namespace:l().optional(),collection:l(),filter:oy}),d({deleted:i().int()}),{kind:`mutation`,auth:`admin`}),updateWhere:M(d({namespace:l().optional(),collection:l(),filter:oy,data:x(l(),o())}),d({updated:i().int()}),{kind:`mutation`,auth:`admin`}),count:M(d({namespace:l().optional(),collection:l(),filter:ay.optional()}),i(),{auth:`admin`}),aggregate:M(d({namespace:l().optional(),collection:l(),fields:w(sy).readonly(),filter:ay.optional()}),cy,{auth:`admin`}),histogram:M(d({namespace:l().optional(),collection:l(),field:l(),bucketSize:i().int().positive(),origin:i().int(),filter:ay.optional()}),w(d({bucket:i().int(),count:i().int()})).readonly(),{auth:`admin`}),isEmpty:M(d({namespace:l().optional(),collection:l()}),T(),{auth:`admin`}),declareCollection:M(gy,y(),{kind:`mutation`,auth:`admin`})}},Sw=l().min(1).max(256),Cw=x(l(),o()),ww=d({id:Sw,deviceId:i().int().optional(),at:i().int().optional(),expiresAt:i().int().optional(),data:Cw}),Tw=d({id:l(),deviceId:i().int().nullable(),at:i().nullable(),expiresAt:i().nullable(),rev:i().int(),updatedAt:i(),data:Cw}),Ew=x(Pr,f([l(),i(),T(),d({in:w(f([l(),i(),T()])).min(1).max(Jn)}),d({gt:f([l(),i()]).optional(),gte:f([l(),i()]).optional(),lt:f([l(),i()]).optional(),lte:f([l(),i()]).optional()}).refine(e=>Object.keys(e).length>0,{message:`name at least one bound`})])),Dw={kind:Vr},Ow={deviceId:i().int().optional(),atFrom:i().optional(),atTo:i().optional()},kw=d({...Dw,...Ow,where:Ew.optional(),order:C([`at`,`id`]).optional(),desc:T().optional(),limit:i().int().min(1).max(Xn).default(100),cursor:l().min(1).optional()}),Aw=d({records:w(Tw),nextCursor:l().nullable()}),poe=C([`created`,`unchanged`,`updated`]),jw=d({kindId:i().int(),state:poe,createdIndexes:w(l())}),Mw=w(l()),Nw=m(`op`,[d({op:h(`put`),kind:Vr,record:ww,ifRev:i().int().min(0).optional()}),d({op:h(`patch`),kind:Vr,id:Sw,data:Cw,at:i().int().nullable().optional(),expiresAt:i().int().nullable().optional(),ifRev:i().int().min(1).optional()}),d({op:h(`delete`),kind:Vr,id:Sw})]),Pw=x(l(),x(l(),l())),Fw={name:`records`,scope:`system`,mode:`singleton`,internal:!0,methods:{declareKinds:M(d({kinds:x(Vr,zr)}),d({kinds:x(l(),jw)}),{kind:`mutation`,auth:`admin`}),get:M(d({...Dw,id:Sw}),Tw.nullable(),{auth:`admin`}),getMany:M(d({...Dw,ids:w(Sw).min(1).max(Jn)}),w(Tw),{auth:`admin`}),secretRefs:M(d({...Dw,ids:w(Sw).min(1).max(Jn)}),Pw,{auth:`admin`}),put:M(d({...Dw,record:ww,ifRev:i().int().min(0).optional()}),d({rev:i().int(),releasedRefs:Mw}),{kind:`mutation`,auth:`admin`}),putMany:M(d({...Dw,records:w(ww).min(1).max(Jn)}),d({count:i().int(),releasedRefs:Mw}),{kind:`mutation`,auth:`admin`}),patch:M(d({...Dw,id:Sw,data:Cw,at:i().int().nullable().optional(),expiresAt:i().int().nullable().optional(),ifRev:i().int().min(1).optional()}),d({rev:i().int(),releasedRefs:Mw}),{kind:`mutation`,auth:`admin`}),delete:M(d({...Dw,id:Sw}),d({deleted:T(),secretRefs:Mw}),{kind:`mutation`,auth:`admin`}),deleteMany:M(d({...Dw,ids:w(Sw).min(1).max(Jn)}),d({deleted:i().int(),secretRefs:Mw}),{kind:`mutation`,auth:`admin`}),query:M(kw,Aw,{auth:`admin`}),count:M(d({...Dw,...Ow,where:Ew.optional()}),d({count:i().int()}),{auth:`admin`}),histogram:M(d({...Dw,deviceId:i().int().optional(),from:i(),to:i(),bucketMs:i().int().positive()}),d({buckets:w(d({bucketStart:i(),count:i().int()}))}),{auth:`admin`}),aggregate:M(d({...Dw,op:C([`sum`,`min`,`max`,`count`]),field:Pr.optional(),groupBy:Pr.optional(),where:Ew.optional()}),d({rows:w(d({group:f([l(),i(),b()]),value:i().nullable()}))}),{auth:`admin`}),deleteWhere:M(d({...Dw,deviceId:i().int().optional(),atBefore:i().optional(),where:Ew.optional()}),d({deleted:i().int(),secretRefs:Mw}),{kind:`mutation`,auth:`admin`}),transact:M(d({ops:w(Nw).min(1).max(Jn)}),d({results:w(d({rev:i().int().nullable(),deleted:T()})),releasedRefs:Mw,secretRefs:Mw}),{kind:`mutation`,auth:`admin`}),deleteDevice:M(d({deviceId:i().int(),kinds:w(Vr).optional()}),d({deleted:x(l(),i().int()),secretRefs:Mw}),{kind:`mutation`,auth:`admin`}),allocateId:M(d(Dw),d({id:i().int()}),{kind:`mutation`,auth:`admin`})}},Iw=d({name:l(),owner:l().nullable(),rows:i().int().nonnegative(),bytes:i().int().nonnegative().nullable(),declaredThisBoot:T()}),Lw=d({owner:l(),kind:l(),database:C([`settings`,`events`]),class:l(),state:C([`declared`,`orphaned`,`dropped`]),rows:i().int().nonnegative().nullable(),bytesEstimate:i().int().nonnegative().nullable(),writeTrigger:l(),retention:Ir,entry:T(),declaration:zr}),Rw={name:`storage-admin`,scope:`system`,mode:`singleton`,internal:!0,methods:{listTables:M(d({ownerPrefix:l().min(1).optional()}),d({tables:w(Iw)}),{auth:`admin`}),listKinds:M(d({owner:l().min(1).optional(),counts:T().optional()}),d({kinds:w(Lw)}),{auth:`admin`}),readRecords:M(kw.extend({owner:l().min(1),kind:Vr}),Aw,{auth:`admin`})}},zw=d({owner:l(),kind:Vr,title:l(),nameField:l(),fields:x(l(),o()),secretPaths:w(l()),rows:i().int().nonnegative()}),Bw=d({id:Sw,name:l(),rev:i().int(),updatedAt:i(),data:Cw}),Vw={owner:l().min(1),kind:Vr},Hw={name:`record-entries`,scope:`system`,mode:`singleton`,methods:{listEntryKinds:M(d({}),d({kinds:w(zw)}),{auth:`admin`}),listEntries:M(d({...Vw}),d({entries:w(Bw)}),{auth:`admin`}),putEntry:M(d({...Vw,id:Sw.optional(),data:Cw,ifRev:i().int().min(1).optional()}),d({id:l(),rev:i().int()}),{kind:`mutation`,auth:`admin`}),deleteEntry:M(d({...Vw,id:Sw}),d({deleted:T()}),{kind:`mutation`,auth:`admin`})}},Uw=C([`key-missing`,`wrong-key`,`key-file-unreadable`,`store-unavailable`,`not-initialized`,`decrypt-failed`]),Ww=m(`state`,[d({state:h(`ready`)}),d({state:h(`locked`),reason:Uw})]),Gw=m(`kind`,[d({kind:h(`value`),value:l(),version:i().int()}),d({kind:h(`missing`)}),d({kind:h(`unavailable`),reason:Uw}),d({kind:h(`forbidden`)})]),Kw=x(l(),Gw),qw=d({ref:l(),owner:l(),scope:l(),fieldPath:l(),version:i().int(),createdAt:i(),updatedAt:i(),updatedBy:l(),lastReadAt:i().nullable()}),moe=512,Jw=w(l().min(1)).max(512),Yw={name:`keychain`,scope:`system`,mode:`singleton`,internal:!0,methods:{put:M(d({ref:l().min(1),value:l().min(1)}),d({ref:l(),version:i().int()}),{kind:`mutation`,auth:`admin`}),resolve:M(d({refs:Jw}),Kw,{auth:`admin`}),delete:M(d({refs:Jw}),d({deleted:i().int()}),{kind:`mutation`,auth:`admin`}),deleteDeviceScope:M(d({deviceId:i().int()}),d({refs:w(l()).readonly()}),{kind:`mutation`,auth:`admin`}),listMeta:M(d({}),w(qw).readonly(),{auth:`admin`}),getState:M(d({}),Ww,{auth:`admin`})}},Xw=m(`kind`,[d({kind:h(`device`),deviceId:i().int()}),d({kind:h(`node`),nodeId:l().min(1)})]),Zw=C([`gauge`,`counter`,`boolean`,`enum`]),Qw=C([`gauge`,`counter`,`boolean`]),hoe=`derived:energy.kwh`,$w=C([`raw`,`5m`,`1h`,`1d`]),eT=C([`undeclared`,`not-owner`,`opted-out`,`not-a-real-device`,`rate`,`ingest-mismatch`,`out-of-range`]),goe=d({key:l(),reason:eT,count:i().int()}),tT=d({accepted:i().int(),refused:w(goe).readonly()}),nT=d({key:l(),scope:l(),kind:Zw,unit:l().nullable(),displayName:l(),source:C([`cap`,`addon`,`derived`]),values:w(l()).readonly().nullable(),firstTs:i(),lastTs:i()}),_oe=d({t:i(),samples:i().int(),mean:i().nullable(),twMean:i().nullable(),min:i(),max:i(),last:i().nullable(),delta:i().nullable(),state:l().nullable(),states:x(l(),i()).nullable()}),voe=d({scope:l(),before:d({t:i(),value:i().nullable(),state:l().nullable()}).nullable(),points:w(_oe).readonly(),derivedFrom:l().nullable()}),rT={key:l(),scope:l().optional(),from:i(),to:i(),resolution:f([$w,h(`auto`)]).default(`auto`),maxPoints:i().int().positive().max(5e3).default(1e3)},iT=d({resolution:$w,series:w(voe).readonly(),truncated:T()}),yoe=24,boe=f([d({deviceId:i().int(),key:l(),scope:l().optional()}),d({forNodeId:l().min(1),key:l(),scope:l().optional()})]),xoe=m(`ok`,[d({ok:h(!0),result:iT}),d({ok:h(!1),error:l()})]),Soe=d({tier:$w,rows:i().int().nullable(),approxBytes:i().nullable(),countedAt:i().nullable()}),aT=C([`device-gone`,`undeclared`]),oT=d({raw:i().int(),"5m":i().int(),"1h":i().int(),"1d":i().int()}),Coe=d({seriesId:i().int(),deviceId:i().int(),key:l(),scope:l(),displayName:l().nullable(),reason:aT,missingSince:i().nullable(),firstTs:i(),lastTs:i(),rows:oT}),woe=200,Toe=50,sT=C([`not-found`,`not-orphan`,`failed`]),Eoe=m(`ok`,[d({seriesId:i().int(),ok:h(!0),deleted:oT}),d({seriesId:i().int(),ok:h(!1),reason:sT})]),Doe=d({series:w(Coe).readonly(),truncated:T()}),cT=d({startedAt:i(),ready:T(),series:i().int(),metrics:i().int(),optedOutDevices:i().int(),tiers:w(Soe).readonly(),capture:d({eventsSeen:i().int(),pointsEmitted:i().int(),pointsWritten:i().int(),pointsDropped:i().int(),bufferDepth:i().int(),trailingEmitted:i().int(),reconciledPoints:i().int(),reconcileRuns:i().int(),reconcileFailures:i().int(),lastReconcileAt:i().nullable(),lastFlushAt:i().nullable(),flushFailures:i().int(),skipped:x(l(),i().int())}),ingest:d({accepted:i().int(),refused:x(l(),i().int())}),rollup:d({last5mAt:i().nullable(),last1hAt:i().nullable(),last1dAt:i().nullable(),errors:i().int(),dirty5m:i().int(),dirty1h:i().int(),dirty1d:i().int()}),retention:d({lastRunAt:i().nullable(),deleted:x(l(),i().int()),purgedSeries:i().int()}),directory:d({devices:i().int(),lastRefreshAt:i().nullable()})}),lT={name:`device-history`,scope:`system`,mode:`singleton`,methods:{listSeries:M(d({deviceId:i().int()}),w(nT).readonly()),listNodeSeries:M(d({forNodeId:l().min(1)}),w(nT).readonly(),{auth:`admin`}),query:M(d({deviceId:i().int(),...rT}),iT),queryNode:M(d({forNodeId:l().min(1),...rT}),iT,{auth:`admin`}),queryMany:M(d({items:w(boe).min(1).max(24),from:rT.from,to:rT.to,resolution:rT.resolution,maxPoints:rT.maxPoints}),d({results:w(xoe).readonly()}),{auth:`admin`}),declareSeries:M(d({name:l().regex(/^[a-z0-9-]+$/),subjectKind:C([`device`,`node`]),kind:Qw,unit:l().optional(),displayName:l().min(1),ingest:C([`points`,`buckets`])}),d({key:l()}),{kind:`mutation`,auth:`admin`}),record:M(d({points:w(d({key:l(),subject:Xw,scope:l().default(``),ts:i(),value:i()})).max(5e3)}),tT,{kind:`mutation`,auth:`admin`}),recordBuckets:M(d({buckets:w(d({key:l(),subject:Xw,scope:l().default(``),bucketStart:i(),samples:i().int().positive(),sum:i(),min:i(),max:i(),last:i().nullable(),lastTs:i().nullable()})).max(5e3)}),tT,{kind:`mutation`,auth:`admin`}),getDeviceEnabled:M(d({deviceId:i().int()}),d({enabled:T()})),setDeviceEnabled:M(d({deviceId:i().int(),enabled:T()}),d({enabled:T()}),{kind:`mutation`,auth:`admin`}),getStatus:M(d({}),cT,{auth:`admin`}),listOrphanSeries:M(d({}),Doe,{auth:`admin`}),deleteOrphanSeries:M(d({seriesIds:w(i().int()).min(1).max(50)}),d({results:w(Eoe).readonly()}),{kind:`mutation`,auth:`admin`})}},uT=m(`state`,[d({state:h(`absent`)}),d({state:h(`ready`),subject:l(),fingerprintSha256:l(),validTo:l()}),d({state:h(`unavailable`),reason:l()})]),dT=d({selfEnrollment:C([`allowed`,`disabled`])}),fT={name:`device-credentials`,scope:`system`,mode:`singleton`,methods:{listDeviceCredentials:M(d({userId:l().min(1).optional(),includeRevoked:T().default(!1)}),w(Lg).readonly(),{auth:`admin`}),startEnrollment:M(d({userId:l().min(1),deviceName:l().min(1).max(80)}),Rg,{kind:`mutation`,auth:`admin`,caller:`required`}),revokeDeviceCredential:M(d({id:l().min(1)}),d({revoked:T(),sessionsEnded:i().int(),status:Ig}),{kind:`mutation`,auth:`admin`,caller:`required`}),getDeviceCertificateSettings:M(d({}),dT,{auth:`admin`}),setDeviceCertificateSettings:M(dT,dT,{kind:`mutation`,auth:`admin`}),deleteDeviceCredential:M(d({id:l().min(1)}),d({result:C([`deleted`,`live`,`unknown`])}),{kind:`mutation`,auth:`admin`,caller:`required`}),getDeviceCaStatus:M(d({}),uT,{auth:`admin`}),renameDeviceCredential:M(d({id:l().min(1),deviceName:l().min(1).max(80)}),d({renamed:T()}),{kind:`mutation`,auth:`admin`})}},pT=d({cn:l(),serial:l(),fingerprintSha256:l(),notBefore:i(),notAfter:i()}),mT=d({fingerprintSha256:l(),issuer:l(),sans:w(l()),notBefore:i(),notAfter:i()}),hT=m(`state`,[d({state:h(`served`),leaf:mT}),d({state:h(`not-issued`),reason:l()})]),gT={name:`node-certificates`,scope:`system`,mode:`singleton`,internal:!0,methods:{getCertificates:M(d({}),d({nodeId:l(),mesh:pT.nullable(),https:hT}),{auth:`admin`}),prepareMeshRenewal:M(d({}),d({csrPem:l()}),{kind:`mutation`,auth:`admin`}),installMeshLeaf:M(d({certPem:l().min(1),caCertPem:l().min(1),confirmWithinMs:i().int().min(1e4).max(6e5)}),d({fingerprintSha256:l(),serial:l()}),{kind:`mutation`,auth:`admin`}),confirmMeshLeaf:M(d({fingerprintSha256:l()}),d({confirmed:T()}),{kind:`mutation`,auth:`admin`}),rollbackMeshLeaf:M(d({}),d({rolledBack:T()}),{kind:`mutation`,auth:`admin`}),prepareHttpsCertificate:M(d({}),d({csrPem:l(),hostnames:w(l()),addresses:w(l()),pinnedCaFingerprintSha256:l().nullable()}),{kind:`mutation`,auth:`admin`}),forgetHub:M(d({}),d({ok:h(!0)}),{kind:`mutation`,auth:`admin`}),installHttpsCertificate:M(d({certPem:l().min(1),caCertPem:l().min(1),caRotation:T().optional()}),mT,{kind:`mutation`,auth:`admin`})},mount:{kind:`skip`}},_T=C([`config-file`,`previous-config-file`,`platform`,`default-file`]),vT=d({kind:_T,path:l().optional(),sharesBackupWithDatabase:T()}),Ooe=`trigger-file`,yT=d({id:l(),at:i(),actor:l(),lockedReason:l().nullable(),archived:i().int(),archivedCollection:l().nullable(),archivedKeysCollection:l().nullable(),clearedSettingsKeys:w(l()).readonly(),acknowledgedAt:i().nullable()}),bT=d({keychain:Ww,keySource:vT.nullable(),configuredSource:vT,fingerprint:l().nullable(),activeKeyId:l().nullable(),rotationPending:T(),retiredWraps:i().int(),recoveryKeyDownloadedAt:i().nullable(),secretCount:i().int(),lastReset:yT.nullable()}),xT=C([`in-use`,`orphan`,`unknown`]),ST=qw.extend({usage:xT}),CT=C([`put`,`delete`,`reveal`,`rotate-master-key`,`purge-retired-keys`,`download-recovery-key`,`delete-orphans`,`reset`,`acknowledge-reset`,`initialize`]),wT=d({id:l(),at:i(),action:CT,actor:l(),ref:l().nullable(),detail:l().nullable()}),TT=`RESET KEYCHAIN`,ET=C([`jwt-signing-key`]),DT={name:`keychain-admin`,scope:`system`,mode:`singleton`,methods:{status:M(d({}),bT,{auth:`admin`}),listSecrets:M(d({}),w(ST).readonly(),{auth:`admin`}),listAudit:M(d({limit:i().int().min(1).max(500).optional()}),w(wT).readonly(),{auth:`admin`}),reveal:M(d({ref:l().min(1)}),d({value:l(),version:i().int()}),{kind:`mutation`,auth:`admin`,caller:`required`}),setSystemSecret:M(d({name:ET,value:l().min(16)}),d({ref:l(),version:i().int()}),{kind:`mutation`,auth:`admin`,caller:`required`}),importSecret:M(d({ref:l().min(1),value:l().min(1)}),d({ref:l(),version:i().int()}),{kind:`mutation`,auth:`admin`,caller:`required`}),deleteOrphans:M(d({refs:w(l().min(1)).max(1e3)}),d({deleted:w(l()).readonly(),kept:w(d({ref:l(),usage:xT})).readonly()}),{kind:`mutation`,auth:`admin`,caller:`required`}),rotateMasterKey:M(d({}),d({fingerprint:l(),keySource:vT}),{kind:`mutation`,auth:`admin`,caller:`required`}),purgeRetiredKeys:M(d({}),d({purged:i().int()}),{kind:`mutation`,auth:`admin`,caller:`required`}),downloadRecoveryKey:M(d({}),d({key:l(),fingerprint:l(),keySource:vT}),{kind:`mutation`,auth:`admin`,caller:`required`}),resetKeychain:M(d({confirm:h(TT)}),d({archivedCollection:l().nullable(),archived:i().int()}),{kind:`mutation`,auth:`admin`,caller:`required`}),resetReport:M(d({}),d({reset:yT.nullable(),pendingReentry:w(qw).readonly()}),{auth:`admin`}),acknowledgeReset:M(d({}),d({acknowledged:T()}),{kind:`mutation`,auth:`admin`,caller:`required`})}},OT=[{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)`}],kT={hwaccel:`auto`,probedBestHwaccel:``},AT={name:`decoder`,scope:`system`,mode:`singleton`,preferredProvider:`decoder-nodeav`,methods:{getInfo:M(y(),d({id:l(),name:l(),hwaccel:l().optional(),probedBestHwaccel:l().optional()})),reprobeHwaccel:M(y(),d({backend:l()}),{kind:`mutation`,auth:`admin`})}},jT={name:`detection-pipeline`,scope:`device`,mode:`singleton`,kind:`wrapper`,defaultActive:!0,deviceTypes:[P.Camera],exposesDeviceSettings:!0,methods:{}},MT=C([`device`,`integration`]),NT=d({url:l(),label:l(),target:MT,host:l()}),PT={name:`device-admin-link`,scope:`device`,deviceNative:!0,mode:`singleton`,methods:{getAdminLink:M(d({deviceId:i().int().nonnegative()}),NT.nullable(),{auth:`admin`})}},FT=[`password`,`passwd`,`pwd`,`pass`,`user`,`username`,`usr`,`login`,`token`,`access_token`,`auth`,`authorization`,`apikey`,`api_key`,`secret`,`credential`,`credentials`,`session`,`sessionid`,`key`],IT=/[a-z][a-z0-9+.-]*:\/\/[^/\s:@'"]+:[^/\s:@'"]+@/i,LT=/^[a-zA-Z0-9._-]+$/,RT=/^\[[0-9a-fA-F:.]+\]$/;function zT(e){return e===`https`?443:80}function BT(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(!LT.test(t)&&!RT.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(FT.includes(e.toLowerCase()))return{ok:!1,reason:`credential-query-key`};let r=e.port===null||e.port===zT(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 IT.test(o)?{ok:!1,reason:`userinfo-in-result`}:{ok:!0,url:o}}function VT(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 HT=d({id:l(),system:l(),uniqueId:l().optional(),quantity:Si.optional(),dateTimeShape:C([`date`,`time`,`datetime`]).optional(),raw:x(l(),o()).optional()});function UT(e){return{id:e.stableId,system:e.addonId}}function WT(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 GT(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===`m²`||n===`m2`?`m²`:n===`mm`?`mm`:n===`cm`?`cm`:n===`km`?`km`:n===`in`||n===`inch`||n===`inches`?`in`:n===`ft`||n===`foot`||n===`feet`?`ft`:n===`kg`?`kg`:n===`g`?`g`:n===`l`||n===`liter`||n===`litre`||n===`liters`||n===`litres`?`L`:n===`ml`?`mL`:n===`gal`||n===`gallon`||n===`gallons`?`gal`:n===`s`||n===`sec`||n===`second`||n===`seconds`?`s`:n===`ms`?`ms`:n===`min`||n===`minute`||n===`minutes`?`min`:n===`h`||n===`hr`||n===`hour`||n===`hours`?`h`:n===`d`||n===`day`||n===`days`?`d`:n===`b`||n===`byte`||n===`bytes`?`B`:n===`kib`?`KiB`:n===`mib`?`MiB`:n===`gib`?`GiB`:n===`tib`?`TiB`:n===`kb`?`kB`:n===`mb`?`MB`:n===`gb`?`GB`:n===`dbm`?`dBm`:n===`dbfs`?`dBFS`:n===`inhg`?`inHg`:n===`mm/h`?`mm/h`:n===`w/m²`||n===`w/m2`?`W/m²`:n===`°`||n===`deg`||n===`degree`||n===`degrees`?`°`:n===`kbps`?`kbps`:n===`fps`?`fps`:t}var KT=`sourceInfo`;function qT(e){if(!e)return null;let t=e[KT];if(!t)return null;let n=HT.safeParse(t);return n.success?n.data:null}var JT=C([`online`,`sleeping`,`offline`,`unknown`]),YT=fe(()=>d({childNativeId:l(),name:l(),type:C(P),status:JT,metadata:d({model:l().optional(),serialNumber:l().optional(),uid:l().optional(),rtspChannel:i().int().nonnegative().optional(),isBattery:T().optional(),isDoorbell:T().optional(),isMultifocal:T().optional(),externalLocation:l().optional(),manufacturer:l().optional(),integration:l().optional()}).default({}),alreadyAdopted:T(),adoptedDeviceId:i().int().nonnegative().nullable(),capabilities:w(l()).readonly().optional(),features:w(l()).readonly().optional(),sourceInfo:HT.optional(),children:w(YT).readonly().optional()})),XT=d({discovered:w(YT),lastDiscoveryAt:i().int().nonnegative().nullable(),lastError:l().nullable()}),ZT={name:`device-discovery`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[P.Hub],status:{schema:XT,kind:`poll`},runtimeState:XT.extend({lastFetchedAt:i().int().nonnegative()}),durability:`session`,history:`none`,methods:{listDiscovered:M(d({deviceId:i().int().nonnegative()}),w(YT).readonly()),refreshDiscovery:M(d({deviceId:i().int().nonnegative()}),w(YT).readonly(),{kind:`mutation`,auth:`admin`}),adoptDevice:M(d({deviceId:i().int().nonnegative(),childNativeId:l(),name:l().optional()}),d({deviceId:i().int().nonnegative(),stableId:l()}),{kind:`mutation`,auth:`admin`}),releaseDevice:M(d({deviceId:i().int().nonnegative(),childDeviceId:i().int().nonnegative()}),y(),{kind:`mutation`,auth:`admin`})}},QT=d({id:l(),label:l(),isDefault:T().optional()}),$T=d({search:l().optional(),area:l().optional(),manufacturer:l().optional(),adoptedOnly:T().optional(),unadoptedOnly:T().optional()}),eE=d({integrationId:l(),page:i().int().positive().default(1),pageSize:i().int().positive().max(2e4).default(50),filter:l().optional(),filterText:$T.optional()}),tE=d({candidates:w(YT).readonly(),totalCount:i().int().nonnegative(),page:i().int().positive(),pageSize:i().int().positive()}),nE=d({integrationId:l(),childNativeId:l()}),rE=d({lastDiscoveryAt:i().int().nonnegative().nullable(),candidateCount:i().int().nonnegative(),adoptedCount:i().int().nonnegative(),lastError:l().nullable()}),iE=d({name:l().min(1).optional(),hiddenChildIds:w(l()).optional()}),aE=d({integrationId:l(),childNativeIds:w(l()).min(1),filter:l().optional(),importLocations:T().optional(),perCandidate:x(l(),iE).optional()}),oE=d({adopted:w(d({childNativeId:l(),parentDeviceId:i().int().nonnegative(),accessoryDeviceIds:w(i().int().nonnegative()).readonly()})).readonly()}),sE=d({integrationId:l(),camDeviceId:i().int().nonnegative()}),cE=d({camDeviceId:i().int().nonnegative(),resetToSource:T().optional()}),lE=d({changed:T(),rebuiltChildren:i().int().nonnegative(),removedChildren:i().int().nonnegative().optional()}),uE={name:`device-adoption`,scope:`system`,mode:`collection`,status:{schema:rE,kind:`poll`},methods:{listCandidateFilters:M(d({integrationId:l()}),d({filters:w(QT)}),{auth:`admin`}),listCandidates:M(eE,tE,{auth:`admin`}),getCandidate:M(nE,YT.nullable(),{auth:`admin`}),refresh:M(d({integrationId:l()}),rE,{kind:`mutation`,auth:`admin`}),adopt:M(aE,oE,{kind:`mutation`,auth:`admin`}),release:M(sE,y(),{kind:`mutation`,auth:`admin`}),resync:M(cE,lE,{kind:`mutation`,auth:`admin`})}},dE=C([`unlinked`,`linked`,`error`]),fE=d({label:l(),value:l(),secret:T().optional()}),pE=d({qr:l().optional(),fields:w(fE).readonly().optional(),note:l().optional()}),mE=d({linkState:dE,exposedDeviceCount:i(),error:l().optional(),setup:pE.optional()}),hE=l(),gE=d({deviceId:l(),exposedAs:l().optional(),capabilities:w(l()).optional()}),_E=d({deviceId:l(),capabilities:w(l()).optional()}),vE=d({deviceId:l()}),yE={name:`device-export`,scope:`system`,mode:`collection`,providerKind:`device-export`,status:{schema:mE,kind:`poll`},exposesDeviceSettings:!0,methods:{getStatus:M(y(),mE),listSupportedDeviceKinds:M(y(),w(hE)),listExposedDevices:M(y(),w(gE)),exposeDevice:M(_E,y(),{kind:`mutation`,auth:`admin`}),unexposeDevice:M(vE,y(),{kind:`mutation`,auth:`admin`})}},bE={lucideReact:`0.576.0`,lucideReactNative:`1.24.0`,metadata:`lucide-icons/lucide@0.576.0 icons/*.json`},xE=`accessibility.account.animals.arrows.brands.buildings.charts.communication.connectivity.cursors.design.development.devices.emoji.files.finance.food-beverage.gaming.home.layout.mail.math.medical.multimedia.nature.navigation.notifications.people.photography.science.seasons.security.shapes.shopping.social.sports.sustainability.text.time.tools.transportation.travel.weather`.split(`.`),SE=`a-arrow-down.a-arrow-up.a-large-small.accessibility.activity.air-vent.airplay.alarm-clock.alarm-clock-check.alarm-clock-minus.alarm-clock-off.alarm-clock-plus.alarm-smoke.album.align-center-horizontal.align-center-vertical.align-end-horizontal.align-end-vertical.align-horizontal-distribute-center.align-horizontal-distribute-end.align-horizontal-distribute-start.align-horizontal-justify-center.align-horizontal-justify-end.align-horizontal-justify-start.align-horizontal-space-around.align-horizontal-space-between.align-start-horizontal.align-start-vertical.align-vertical-distribute-center.align-vertical-distribute-end.align-vertical-distribute-start.align-vertical-justify-center.align-vertical-justify-end.align-vertical-justify-start.align-vertical-space-around.align-vertical-space-between.ambulance.ampersand.ampersands.amphora.anchor.angry.annoyed.antenna.anvil.aperture.app-window.app-window-mac.apple.archive.archive-restore.archive-x.armchair.arrow-big-down.arrow-big-down-dash.arrow-big-left.arrow-big-left-dash.arrow-big-right.arrow-big-right-dash.arrow-big-up.arrow-big-up-dash.arrow-down.arrow-down-0-1.arrow-down-1-0.arrow-down-a-z.arrow-down-from-line.arrow-down-left.arrow-down-narrow-wide.arrow-down-right.arrow-down-to-dot.arrow-down-to-line.arrow-down-up.arrow-down-wide-narrow.arrow-down-z-a.arrow-left.arrow-left-from-line.arrow-left-right.arrow-left-to-line.arrow-right.arrow-right-from-line.arrow-right-left.arrow-right-to-line.arrow-up.arrow-up-0-1.arrow-up-1-0.arrow-up-a-z.arrow-up-down.arrow-up-from-dot.arrow-up-from-line.arrow-up-left.arrow-up-narrow-wide.arrow-up-right.arrow-up-to-line.arrow-up-wide-narrow.arrow-up-z-a.arrows-up-from-line.asterisk.at-sign.atom.audio-lines.audio-waveform.award.axe.axis-3d.baby.backpack.badge.badge-alert.badge-cent.badge-check.badge-dollar-sign.badge-euro.badge-indian-rupee.badge-info.badge-japanese-yen.badge-minus.badge-percent.badge-plus.badge-pound-sterling.badge-question-mark.badge-russian-ruble.badge-swiss-franc.badge-turkish-lira.badge-x.baggage-claim.balloon.ban.banana.bandage.banknote.banknote-arrow-down.banknote-arrow-up.banknote-x.barcode.barrel.baseline.bath.battery.battery-charging.battery-full.battery-low.battery-medium.battery-plus.battery-warning.beaker.bean.bean-off.bed.bed-double.bed-single.beef.beer.beer-off.bell.bell-dot.bell-electric.bell-minus.bell-off.bell-plus.bell-ring.between-horizontal-end.between-horizontal-start.between-vertical-end.between-vertical-start.biceps-flexed.bike.binary.binoculars.biohazard.bird.birdhouse.bitcoin.blend.blinds.blocks.bluetooth.bluetooth-connected.bluetooth-off.bluetooth-searching.bold.bolt.bomb.bone.book.book-a.book-alert.book-audio.book-check.book-copy.book-dashed.book-down.book-headphones.book-heart.book-image.book-key.book-lock.book-marked.book-minus.book-open.book-open-check.book-open-text.book-plus.book-search.book-text.book-type.book-up.book-up-2.book-user.book-x.bookmark.bookmark-check.bookmark-minus.bookmark-plus.bookmark-x.boom-box.bot.bot-message-square.bot-off.bottle-wine.bow-arrow.box.boxes.braces.brackets.brain.brain-circuit.brain-cog.brick-wall.brick-wall-fire.brick-wall-shield.briefcase.briefcase-business.briefcase-conveyor-belt.briefcase-medical.bring-to-front.brush.brush-cleaning.bubbles.bug.bug-off.bug-play.building.building-2.bus.bus-front.cable.cable-car.cake.cake-slice.calculator.calendar.calendar-1.calendar-arrow-down.calendar-arrow-up.calendar-check.calendar-check-2.calendar-clock.calendar-cog.calendar-days.calendar-fold.calendar-heart.calendar-minus.calendar-minus-2.calendar-off.calendar-plus.calendar-plus-2.calendar-range.calendar-search.calendar-sync.calendar-x.calendar-x-2.calendars.camera.camera-off.candy.candy-cane.candy-off.cannabis.cannabis-off.captions.captions-off.car.car-front.car-taxi-front.caravan.card-sim.carrot.case-lower.case-sensitive.case-upper.cassette-tape.cast.castle.cat.cctv.chart-area.chart-bar.chart-bar-big.chart-bar-decreasing.chart-bar-increasing.chart-bar-stacked.chart-candlestick.chart-column.chart-column-big.chart-column-decreasing.chart-column-increasing.chart-column-stacked.chart-gantt.chart-line.chart-network.chart-no-axes-column.chart-no-axes-column-decreasing.chart-no-axes-column-increasing.chart-no-axes-combined.chart-no-axes-gantt.chart-pie.chart-scatter.chart-spline.check.check-check.check-line.chef-hat.cherry.chess-bishop.chess-king.chess-knight.chess-pawn.chess-queen.chess-rook.chevron-down.chevron-first.chevron-last.chevron-left.chevron-right.chevron-up.chevrons-down.chevrons-down-up.chevrons-left.chevrons-left-right.chevrons-left-right-ellipsis.chevrons-right.chevrons-right-left.chevrons-up.chevrons-up-down.church.cigarette.cigarette-off.circle.circle-alert.circle-arrow-down.circle-arrow-left.circle-arrow-out-down-left.circle-arrow-out-down-right.circle-arrow-out-up-left.circle-arrow-out-up-right.circle-arrow-right.circle-arrow-up.circle-check.circle-check-big.circle-chevron-down.circle-chevron-left.circle-chevron-right.circle-chevron-up.circle-dashed.circle-divide.circle-dollar-sign.circle-dot.circle-dot-dashed.circle-ellipsis.circle-equal.circle-fading-arrow-up.circle-fading-plus.circle-gauge.circle-minus.circle-off.circle-parking.circle-parking-off.circle-pause.circle-percent.circle-pile.circle-play.circle-plus.circle-pound-sterling.circle-power.circle-question-mark.circle-slash.circle-slash-2.circle-small.circle-star.circle-stop.circle-user.circle-user-round.circle-x.circuit-board.citrus.clapperboard.clipboard.clipboard-check.clipboard-clock.clipboard-copy.clipboard-list.clipboard-minus.clipboard-paste.clipboard-pen.clipboard-pen-line.clipboard-plus.clipboard-type.clipboard-x.clock.clock-1.clock-10.clock-11.clock-12.clock-2.clock-3.clock-4.clock-5.clock-6.clock-7.clock-8.clock-9.clock-alert.clock-arrow-down.clock-arrow-up.clock-check.clock-fading.clock-plus.closed-caption.cloud.cloud-alert.cloud-backup.cloud-check.cloud-cog.cloud-download.cloud-drizzle.cloud-fog.cloud-hail.cloud-lightning.cloud-moon.cloud-moon-rain.cloud-off.cloud-rain.cloud-rain-wind.cloud-snow.cloud-sun.cloud-sun-rain.cloud-sync.cloud-upload.cloudy.clover.club.code.code-xml.coffee.cog.coins.columns-2.columns-3.columns-3-cog.columns-4.combine.command.compass.component.computer.concierge-bell.cone.construction.contact.contact-round.container.contrast.cookie.cooking-pot.copy.copy-check.copy-minus.copy-plus.copy-slash.copy-x.copyleft.copyright.corner-down-left.corner-down-right.corner-left-down.corner-left-up.corner-right-down.corner-right-up.corner-up-left.corner-up-right.cpu.creative-commons.credit-card.croissant.crop.cross.crosshair.crown.cuboid.cup-soda.currency.cylinder.dam.database.database-backup.database-search.database-zap.decimals-arrow-left.decimals-arrow-right.delete.dessert.diameter.diamond.diamond-minus.diamond-percent.diamond-plus.dice-1.dice-2.dice-3.dice-4.dice-5.dice-6.dices.diff.disc.disc-2.disc-3.disc-album.divide.dna.dna-off.dock.dog.dollar-sign.donut.door-closed.door-closed-locked.door-open.dot.download.drafting-compass.drama.drill.drone.droplet.droplet-off.droplets.drum.drumstick.dumbbell.ear.ear-off.earth.earth-lock.eclipse.egg.egg-fried.egg-off.ellipsis.ellipsis-vertical.equal.equal-approximately.equal-not.eraser.ethernet-port.euro.ev-charger.expand.external-link.eye.eye-closed.eye-off.factory.fan.fast-forward.feather.fence.ferris-wheel.file.file-archive.file-axis-3d.file-badge.file-box.file-braces.file-braces-corner.file-chart-column.file-chart-column-increasing.file-chart-line.file-chart-pie.file-check.file-check-corner.file-clock.file-code.file-code-corner.file-cog.file-diff.file-digit.file-down.file-exclamation-point.file-headphone.file-heart.file-image.file-input.file-key.file-lock.file-minus.file-minus-corner.file-music.file-output.file-pen.file-pen-line.file-play.file-plus.file-plus-corner.file-question-mark.file-scan.file-search.file-search-corner.file-signal.file-sliders.file-spreadsheet.file-stack.file-symlink.file-terminal.file-text.file-type.file-type-corner.file-up.file-user.file-video-camera.file-volume.file-x.file-x-corner.files.film.fingerprint-pattern.fire-extinguisher.fish.fish-off.fish-symbol.fishing-hook.fishing-rod.flag.flag-off.flag-triangle-left.flag-triangle-right.flame.flame-kindling.flashlight.flashlight-off.flask-conical.flask-conical-off.flask-round.flip-horizontal-2.flip-vertical-2.flower.flower-2.focus.fold-horizontal.fold-vertical.folder.folder-archive.folder-check.folder-clock.folder-closed.folder-code.folder-cog.folder-dot.folder-down.folder-git.folder-git-2.folder-heart.folder-input.folder-kanban.folder-key.folder-lock.folder-minus.folder-open.folder-open-dot.folder-output.folder-pen.folder-plus.folder-root.folder-search.folder-search-2.folder-symlink.folder-sync.folder-tree.folder-up.folder-x.folders.footprints.forklift.form.forward.frame.frown.fuel.fullscreen.funnel.funnel-plus.funnel-x.gallery-horizontal.gallery-horizontal-end.gallery-thumbnails.gallery-vertical.gallery-vertical-end.gamepad.gamepad-2.gamepad-directional.gauge.gavel.gem.georgian-lari.ghost.gift.git-branch.git-branch-minus.git-branch-plus.git-commit-horizontal.git-commit-vertical.git-compare.git-compare-arrows.git-fork.git-graph.git-merge.git-merge-conflict.git-pull-request.git-pull-request-arrow.git-pull-request-closed.git-pull-request-create.git-pull-request-create-arrow.git-pull-request-draft.glass-water.glasses.globe.globe-lock.globe-off.globe-x.goal.gpu.graduation-cap.grape.grid-2x2.grid-2x2-check.grid-2x2-plus.grid-2x2-x.grid-3x2.grid-3x3.grip.grip-horizontal.grip-vertical.group.guitar.ham.hamburger.hammer.hand.hand-coins.hand-fist.hand-grab.hand-heart.hand-helping.hand-metal.hand-platter.handbag.handshake.hard-drive.hard-drive-download.hard-drive-upload.hard-hat.hash.hat-glasses.haze.hd.hdmi-port.heading.heading-1.heading-2.heading-3.heading-4.heading-5.heading-6.headphone-off.headphones.headset.heart.heart-crack.heart-handshake.heart-minus.heart-off.heart-plus.heart-pulse.heater.helicopter.hexagon.highlighter.history.hop.hop-off.hospital.hotel.hourglass.house.house-heart.house-plug.house-plus.house-wifi.ice-cream-bowl.ice-cream-cone.id-card.id-card-lanyard.image.image-down.image-minus.image-off.image-play.image-plus.image-up.image-upscale.images.import.inbox.indian-rupee.infinity.info.inspection-panel.italic.iteration-ccw.iteration-cw.japanese-yen.joystick.kanban.kayak.key.key-round.key-square.keyboard.keyboard-music.keyboard-off.lamp.lamp-ceiling.lamp-desk.lamp-floor.lamp-wall-down.lamp-wall-up.land-plot.landmark.languages.laptop.laptop-minimal.laptop-minimal-check.lasso.lasso-select.laugh.layers.layers-2.layers-plus.layout-dashboard.layout-grid.layout-list.layout-panel-left.layout-panel-top.layout-template.leaf.leafy-green.lectern.lens-concave.lens-convex.library.library-big.life-buoy.ligature.lightbulb.lightbulb-off.line-dot-right-horizontal.line-squiggle.link.link-2.link-2-off.list.list-check.list-checks.list-chevrons-down-up.list-chevrons-up-down.list-collapse.list-end.list-filter.list-filter-plus.list-indent-decrease.list-indent-increase.list-minus.list-music.list-ordered.list-plus.list-restart.list-start.list-todo.list-tree.list-video.list-x.loader.loader-circle.loader-pinwheel.locate.locate-fixed.locate-off.lock.lock-keyhole.lock-keyhole-open.lock-open.log-in.log-out.logs.lollipop.luggage.magnet.mail.mail-check.mail-minus.mail-open.mail-plus.mail-question-mark.mail-search.mail-warning.mail-x.mailbox.mails.map.map-minus.map-pin.map-pin-check.map-pin-check-inside.map-pin-house.map-pin-minus.map-pin-minus-inside.map-pin-off.map-pin-pen.map-pin-plus.map-pin-plus-inside.map-pin-x.map-pin-x-inside.map-pinned.map-plus.mars.mars-stroke.martini.maximize.maximize-2.medal.megaphone.megaphone-off.meh.memory-stick.menu.merge.message-circle.message-circle-check.message-circle-code.message-circle-dashed.message-circle-heart.message-circle-more.message-circle-off.message-circle-plus.message-circle-question-mark.message-circle-reply.message-circle-warning.message-circle-x.message-square.message-square-check.message-square-code.message-square-dashed.message-square-diff.message-square-dot.message-square-heart.message-square-lock.message-square-more.message-square-off.message-square-plus.message-square-quote.message-square-reply.message-square-share.message-square-text.message-square-warning.message-square-x.messages-square.metronome.mic.mic-off.mic-vocal.microchip.microscope.microwave.milestone.milk.milk-off.minimize.minimize-2.minus.mirror-rectangular.mirror-round.monitor.monitor-check.monitor-cloud.monitor-cog.monitor-dot.monitor-down.monitor-off.monitor-pause.monitor-play.monitor-smartphone.monitor-speaker.monitor-stop.monitor-up.monitor-x.moon.moon-star.motorbike.mountain.mountain-snow.mouse.mouse-left.mouse-off.mouse-pointer.mouse-pointer-2.mouse-pointer-2-off.mouse-pointer-ban.mouse-pointer-click.mouse-right.move.move-3d.move-diagonal.move-diagonal-2.move-down.move-down-left.move-down-right.move-horizontal.move-left.move-right.move-up.move-up-left.move-up-right.move-vertical.music.music-2.music-3.music-4.navigation.navigation-2.navigation-2-off.navigation-off.network.newspaper.nfc.non-binary.notebook.notebook-pen.notebook-tabs.notebook-text.notepad-text.notepad-text-dashed.nut.nut-off.octagon.octagon-alert.octagon-minus.octagon-pause.octagon-x.omega.option.orbit.origami.package.package-2.package-check.package-minus.package-open.package-plus.package-search.package-x.paint-bucket.paint-roller.paintbrush.paintbrush-vertical.palette.panda.panel-bottom.panel-bottom-close.panel-bottom-dashed.panel-bottom-open.panel-left.panel-left-close.panel-left-dashed.panel-left-open.panel-left-right-dashed.panel-right.panel-right-close.panel-right-dashed.panel-right-open.panel-top.panel-top-bottom-dashed.panel-top-close.panel-top-dashed.panel-top-open.panels-left-bottom.panels-right-bottom.panels-top-left.paperclip.parentheses.parking-meter.party-popper.pause.paw-print.pc-case.pen.pen-line.pen-off.pen-tool.pencil.pencil-line.pencil-off.pencil-ruler.pentagon.percent.person-standing.philippine-peso.phone.phone-call.phone-forwarded.phone-incoming.phone-missed.phone-off.phone-outgoing.pi.piano.pickaxe.picture-in-picture.picture-in-picture-2.piggy-bank.pilcrow.pilcrow-left.pilcrow-right.pill.pill-bottle.pin.pin-off.pipette.pizza.plane.plane-landing.plane-takeoff.play.plug.plug-2.plug-zap.plus.pocket-knife.podcast.pointer.pointer-off.popcorn.popsicle.pound-sterling.power.power-off.presentation.printer.printer-check.printer-x.projector.proportions.puzzle.pyramid.qr-code.quote.rabbit.radar.radiation.radical.radio.radio-receiver.radio-tower.radius.rainbow.rat.ratio.receipt.receipt-cent.receipt-euro.receipt-indian-rupee.receipt-japanese-yen.receipt-pound-sterling.receipt-russian-ruble.receipt-swiss-franc.receipt-text.receipt-turkish-lira.rectangle-circle.rectangle-ellipsis.rectangle-goggles.rectangle-horizontal.rectangle-vertical.recycle.redo.redo-2.redo-dot.refresh-ccw.refresh-ccw-dot.refresh-cw.refresh-cw-off.refrigerator.regex.remove-formatting.repeat.repeat-1.repeat-2.replace.replace-all.reply.reply-all.rewind.ribbon.rocket.rocking-chair.roller-coaster.rose.rotate-3d.rotate-ccw.rotate-ccw-key.rotate-ccw-square.rotate-cw.rotate-cw-square.route.route-off.router.rows-2.rows-3.rows-4.rss.ruler.ruler-dimension-line.russian-ruble.sailboat.salad.sandwich.satellite.satellite-dish.saudi-riyal.save.save-all.save-off.scale.scale-3d.scaling.scan.scan-barcode.scan-eye.scan-face.scan-heart.scan-line.scan-qr-code.scan-search.scan-text.school.scissors.scissors-line-dashed.scooter.screen-share.screen-share-off.scroll.scroll-text.search.search-alert.search-check.search-code.search-slash.search-x.section.send.send-horizontal.send-to-back.separator-horizontal.separator-vertical.server.server-cog.server-crash.server-off.settings.settings-2.shapes.share.share-2.sheet.shell.shelving-unit.shield.shield-alert.shield-ban.shield-check.shield-ellipsis.shield-half.shield-minus.shield-off.shield-plus.shield-question-mark.shield-user.shield-x.ship.ship-wheel.shirt.shopping-bag.shopping-basket.shopping-cart.shovel.shower-head.shredder.shrimp.shrink.shrub.shuffle.sigma.signal.signal-high.signal-low.signal-medium.signal-zero.signature.signpost.signpost-big.siren.skip-back.skip-forward.skull.slash.slice.sliders-horizontal.sliders-vertical.smartphone.smartphone-charging.smartphone-nfc.smile.smile-plus.snail.snowflake.soap-dispenser-droplet.sofa.solar-panel.soup.space.spade.sparkle.sparkles.speaker.speech.spell-check.spell-check-2.spline.spline-pointer.split.spool.spotlight.spray-can.sprout.square.square-activity.square-arrow-down.square-arrow-down-left.square-arrow-down-right.square-arrow-left.square-arrow-out-down-left.square-arrow-out-down-right.square-arrow-out-up-left.square-arrow-out-up-right.square-arrow-right.square-arrow-right-enter.square-arrow-right-exit.square-arrow-up.square-arrow-up-left.square-arrow-up-right.square-asterisk.square-bottom-dashed-scissors.square-centerline-dashed-horizontal.square-centerline-dashed-vertical.square-chart-gantt.square-check.square-check-big.square-chevron-down.square-chevron-left.square-chevron-right.square-chevron-up.square-code.square-dashed.square-dashed-bottom.square-dashed-bottom-code.square-dashed-kanban.square-dashed-mouse-pointer.square-dashed-top-solid.square-divide.square-dot.square-equal.square-function.square-kanban.square-library.square-m.square-menu.square-minus.square-mouse-pointer.square-parking.square-parking-off.square-pause.square-pen.square-percent.square-pi.square-pilcrow.square-play.square-plus.square-power.square-radical.square-round-corner.square-scissors.square-sigma.square-slash.square-split-horizontal.square-split-vertical.square-square.square-stack.square-star.square-stop.square-terminal.square-user.square-user-round.square-x.squares-exclude.squares-intersect.squares-subtract.squares-unite.squircle.squircle-dashed.squirrel.stamp.star.star-half.star-off.step-back.step-forward.stethoscope.sticker.sticky-note.stone.store.stretch-horizontal.stretch-vertical.strikethrough.subscript.sun.sun-dim.sun-medium.sun-moon.sun-snow.sunrise.sunset.superscript.swatch-book.swiss-franc.switch-camera.sword.swords.syringe.table.table-2.table-cells-merge.table-cells-split.table-columns-split.table-of-contents.table-properties.table-rows-split.tablet.tablet-smartphone.tablets.tag.tags.tally-1.tally-2.tally-3.tally-4.tally-5.tangent.target.telescope.tent.tent-tree.terminal.test-tube.test-tube-diagonal.test-tubes.text-align-center.text-align-end.text-align-justify.text-align-start.text-cursor.text-cursor-input.text-initial.text-quote.text-search.text-select.text-wrap.theater.thermometer.thermometer-snowflake.thermometer-sun.thumbs-down.thumbs-up.ticket.ticket-check.ticket-minus.ticket-percent.ticket-plus.ticket-slash.ticket-x.tickets.tickets-plane.timer.timer-off.timer-reset.toggle-left.toggle-right.toilet.tool-case.toolbox.tornado.torus.touchpad.touchpad-off.towel-rack.tower-control.toy-brick.tractor.traffic-cone.train-front.train-front-tunnel.train-track.tram-front.transgender.trash.trash-2.tree-deciduous.tree-palm.tree-pine.trees.trending-down.trending-up.trending-up-down.triangle.triangle-alert.triangle-dashed.triangle-right.trophy.truck.truck-electric.turkish-lira.turntable.turtle.tv.tv-minimal.tv-minimal-play.type.type-outline.umbrella.umbrella-off.underline.undo.undo-2.undo-dot.unfold-horizontal.unfold-vertical.ungroup.university.unlink.unlink-2.unplug.upload.usb.user.user-check.user-cog.user-key.user-lock.user-minus.user-pen.user-plus.user-round.user-round-check.user-round-cog.user-round-key.user-round-minus.user-round-pen.user-round-plus.user-round-search.user-round-x.user-search.user-star.user-x.users.users-round.utensils.utensils-crossed.utility-pole.van.variable.vault.vector-square.vegan.venetian-mask.venus.venus-and-mars.vibrate.vibrate-off.video.video-off.videotape.view.voicemail.volleyball.volume.volume-1.volume-2.volume-off.volume-x.vote.wallet.wallet-cards.wallet-minimal.wallpaper.wand.wand-sparkles.warehouse.washing-machine.watch.waves.waves-arrow-down.waves-arrow-up.waves-ladder.waypoints.webcam.webhook.webhook-off.weight.weight-tilde.wheat.wheat-off.whole-word.wifi.wifi-cog.wifi-high.wifi-low.wifi-off.wifi-pen.wifi-sync.wifi-zero.wind.wind-arrow-down.wine.wine-off.workflow.worm.wrench.x.x-line-top.zap.zap-off.zodiac-aquarius.zodiac-aries.zodiac-cancer.zodiac-capricorn.zodiac-gemini.zodiac-leo.zodiac-libra.zodiac-ophiuchus.zodiac-pisces.zodiac-sagittarius.zodiac-scorpio.zodiac-taurus.zodiac-virgo.zoom-in.zoom-out`.split(`.`),CE=[[[37,10],[`letter`,`font size`,`text`,`formatting`,`smaller`]],[[37,10],[`letter`,`font size`,`text`,`formatting`,`larger`,`bigger`]],[[37,10],[`letter`,`font size`,`text`,`formatting`]],[[0,22],[`disability`,`disabled`,`dda`,`wheelchair`]],[[22,1,34,29,23],`pulse.action.motion.movement.exercise.fitness.healthcare.heart rate monitor.vital signs.vitals.emergency room.er.intensive care.hospital.defibrillator.earthquake.siesmic.magnitude.richter scale.aftershock.tremor.shockwave.audio.waveform.synthesizer.synthesiser.music`.split(`.`)],[[18],[`air conditioner`,`ac`,`central air`,`cooling`,`climate-control`]],[[23,8,12,4],[`stream`,`cast`,`mirroring`,`screen`,`monitor`,`macos`,`osx`]],[[12,26,38],[`morning`]],[[12,26,38],[`done`,`todo`,`tick`,`complete`,`task`]],[[12,26,38],[`remove`]],[[12,26,38],[`morning`,`turn-off`]],[[12,26,38],[`add`]],[[18,12,41],[`fire`,`alert`,`warning`,`detector`,`carbon monoxide`,`safety`,`equipment`,`amenities`]],[[28,23],[`photo`,`book`]],[[19],[`items`,`flex`,`justify`]],[[19],[`items`,`flex`,`justify`]],[[19],[`items`,`bottom`,`flex`,`justify`]],[[19],[`items`,`right`,`flex`,`justify`]],[[19],[`items`,`flex`,`justify`,`space`,`evenly`,`around`]],[[19],[`right`,`items`,`flex`,`justify`]],[[19],[`left`,`items`,`flex`,`justify`]],[[19],[`center`,`items`,`flex`,`justify`]],[[19],[`right`,`items`,`flex`,`justify`]],[[19],[`left`,`items`,`flex`,`justify`]],[[19],[`center`,`items`,`flex`,`justify`,`distribute`,`between`]],[[19],[`around`,`items`,`bottom`,`flex`,`justify`]],[[19],[`top`,`items`,`flex`,`justify`]],[[19],[`left`,`items`,`flex`,`justify`]],[[19],[`items`,`flex`,`justify`,`space`,`evenly`,`around`]],[[19],[`bottom`,`items`,`flex`,`justify`]],[[19],[`top`,`items`,`flex`,`justify`]],[[19],[`center`,`items`,`flex`,`justify`,`distribute`,`between`]],[[19],[`bottom`,`items`,`flex`,`justify`,`distribute`,`between`]],[[19],[`top`,`items`,`flex`,`justify`,`distribute`,`between`]],[[19],[`center`,`items`,`flex`,`justify`,`distribute`,`between`]],[[19],[`center`,`items`,`flex`,`justify`,`distribute`,`between`]],[[22,40],[`ambulance`,`emergency`,`medical`,`vehicle`,`siren`,`healthcare`,`transportation`,`rescue`,`urgent`,`first aid`]],[[37,11],[`and`,`typography`,`operator`,`join`,`concatenate`,`code`,`&`]],[[37,11],[`and`,`operator`,`then`,`code`,`&&`]],[[16,17],[`pottery`,`artifact`,`artefact`,`vase`,`ceramics`,`clay`,`archaeology`,`museum`,`wine`,`oil`]],[[40,37],[`ship`]],[[13],[`emoji`,`anger`,`face`,`emotion`]],[[13],[`emoji`,`nuisance`,`face`,`emotion`]],[[12,23,7],[`signal`,`connection`,`connectivity`,`tv`,`television`,`broadcast`,`live`,`frequency`,`tune`,`scan`,`channels`,`aerial`,`receiver`,`transmission`,`transducer`,`terrestrial`,`satellite`,`cable`]],[[5,39,17],[`metal`,`iron`,`alloy`,`materials`,`heavy`,`weight`,`blacksmith`,`forge`,`acme`]],[[28],[`camera`,`photo`,`pictures`,`shutter`,`exposure`]],[[19,10,11,14],[`application`,`menu bar`,`pane`,`executable`]],[[19,10,11,14],[`application`,`menu bar`,`pane`,`preferences`,`macos`,`osx`,`executable`]],[[16],[`fruit`,`food`,`healthy`,`snack`,`nutrition`,`fresh`,`produce`,`grocery`,`organic`,`harvest`,`vitamin`,`red`,`green`,`juicy`,`sweet`,`tart`,`bite`,`orchard`,`plant`,`core`,`raw`,`diet`]],[[14,20],[`index`,`backup`,`box`,`storage`,`records`]],[[14,20],[`unarchive`,`index`,`backup`,`box`,`storage`,`records`]],[[14,20],[`index`,`backup`,`box`,`storage`,`records`,`junk`]],[[18],[`sofa`,`furniture`,`leisure`,`lounge`,`loveseat`,`couch`]],[[3,17],[`backwards`,`reverse`,`direction`,`south`]],[[3,17,14],[`backwards`,`reverse`,`slow`,`direction`,`south`,`download`]],[[3,17],[`previous`,`back`,`direction`,`west`,`indicate turn`]],[[3,17],[`previous`,`back`,`direction`,`west`,`turn`,`corner`]],[[3,17],[`next`,`forward`,`direction`,`east`,`indicate turn`]],[[3,17],[`next`,`forward`,`direction`,`east`,`turn`,`corner`]],[[3,37,11,17],[`shift`,`keyboard`,`button`,`mac`,`capitalize`,`capitalise`,`forward`,`direction`,`north`]],[[3,37,11,17],[`caps lock`,`capitals`,`keyboard`,`button`,`mac`,`forward`,`direction`,`north`,`faster`,`speed`,`boost`]],[[3],[`backwards`,`reverse`,`direction`,`south`]],[[37,19,3],[`filter`,`sort`,`ascending`,`descending`,`increasing`,`decreasing`,`rising`,`falling`,`numerical`]],[[37,19,3],[`filter`,`sort`,`ascending`,`descending`,`increasing`,`decreasing`,`rising`,`falling`,`numerical`]],[[37,19,3],[`filter`,`sort`,`ascending`,`descending`,`increasing`,`decreasing`,`rising`,`falling`,`alphabetical`]],[[3,14],[`backwards`,`reverse`,`direction`,`south`,`download`,`expand`,`fold`,`vertical`]],[[3],[`direction`,`south-west`,`diagonal`]],[[37,19,3],[`filter`,`sort`,`ascending`,`descending`,`increasing`,`decreasing`,`rising`,`falling`]],[[3],[`direction`,`south-east`,`diagonal`]],[[3],[`direction`,`south`,`waypoint`,`location`,`step`,`into`]],[[3,14,11],[`behind`,`direction`,`south`,`download`,`save`,`git`,`version control`,`pull`,`collapse`,`fold`,`vertical`]],[[3],[`bidirectional`,`two-way`,`2-way`,`swap`,`switch`,`network`,`traffic`,`flow`,`mobile data`,`internet`,`sort`,`reorder`,`move`]],[[37,19,3],[`filter`,`sort`,`ascending`,`descending`,`increasing`,`decreasing`,`rising`,`falling`]],[[37,19,3],[`filter`,`sort`,`ascending`,`descending`,`increasing`,`decreasing`,`rising`,`falling`,`alphabetical`,`reverse`]],[[3],[`previous`,`back`,`direction`,`west`,`<-`]],[[3],[`previous`,`back`,`direction`,`west`,`expand`,`fold`,`horizontal`,`<-|`]],[[3],[`bidirectional`,`two-way`,`2-way`,`swap`,`switch`,`transaction`,`reorder`,`move`,`<-`,`->`]],[[3],[`previous`,`back`,`direction`,`west`,`collapse`,`fold`,`horizontal`,`|<-`]],[[3],[`forward`,`next`,`direction`,`east`,`->`]],[[3],[`next`,`forward`,`direction`,`east`,`export`,`expand`,`fold`,`horizontal`,`|->`]],[[3],[`bidirectional`,`two-way`,`2-way`,`swap`,`switch`,`transaction`,`reorder`,`move`,`<-`,`->`]],[[3,11],[`next`,`forward`,`direction`,`east`,`tab`,`keyboard`,`mac`,`indent`,`collapse`,`fold`,`horizontal`,`->|`]],[[3],[`forward`,`direction`,`north`]],[[37,19,3],[`filter`,`sort`,`ascending`,`descending`,`increasing`,`decreasing`,`rising`,`falling`,`numerical`]],[[37,19,3],[`filter`,`sort`,`ascending`,`descending`,`increasing`,`decreasing`,`rising`,`falling`,`numerical`]],[[37,19,3],[`filter`,`sort`,`ascending`,`descending`,`increasing`,`decreasing`,`rising`,`falling`,`alphabetical`]],[[3],[`bidirectional`,`two-way`,`2-way`,`swap`,`switch`,`network`,`mobile data`,`internet`,`sort`,`reorder`,`move`]],[[3],[`direction`,`north`,`step`,`out`]],[[3,14,11],[`forward`,`direction`,`north`,`upload`,`git`,`version control`,`push`,`expand`,`fold`,`vertical`]],[[3],[`direction`,`north-west`,`diagonal`]],[[37,19,3],[`filter`,`sort`,`ascending`,`descending`,`increasing`,`decreasing`,`rising`,`falling`]],[[3],[`direction`,`north-east`,`diagonal`]],[[3,14],[`forward`,`direction`,`north`,`upload`,`collapse`,`fold`,`vertical`]],[[37,19,3],[`filter`,`sort`,`ascending`,`descending`,`increasing`,`decreasing`,`rising`,`falling`]],[[37,19,3],[`filter`,`sort`,`ascending`,`descending`,`increasing`,`decreasing`,`rising`,`falling`,`alphabetical`,`reverse`]],[[3,40,20],[`direction`,`orientation`,`this way up`,`vertical`,`package`,`box`,`fragile`,`postage`,`shipping`]],[[37,21,11],[`reference`,`times`,`multiply`,`multiplication`,`operator`,`code`,`glob pattern`,`wildcard`,`*`]],[[37,1],[`mention`,`at`,`email`,`message`,`@`]],[[29],[`atomic`,`nuclear`,`physics`,`particle`,`element`,`molecule`,`electricity`,`energy`,`chemistry`]],[[23,7],[`graphic equaliser`,`sound`,`noise`,`listen`,`hearing`,`hertz`,`frequency`,`wavelength`,`vibrate`,`sine`,`synthesizer`,`synthesiser`,`levels`,`track`,`music`,`playback`,`radio`,`broadcast`,`airwaves`,`voice`,`vocals`,`singer`,`song`]],[[23,7],[`sound`,`noise`,`listen`,`hearing`,`hertz`,`frequency`,`wavelength`,`vibrate`,`sine`,`synthesizer`,`synthesiser`,`levels`,`track`,`music`,`playback`,`radio`,`broadcast`,`airwaves`,`voice`,`vocals`,`singer`,`song`]],[[1,35,17],[`achievement`,`badge`,`rosette`,`prize`,`winner`]],[[39,17],[`hatchet`,`weapon`,`chop`,`sharp`,`equipment`,`fireman`,`firefighter`,`brigade`,`lumberjack`,`woodcutter`,`logger`,`forestry`]],[[10],[`gizmo`,`coordinates`]],[[0,27],[`child`,`childproof`,`children`]],[[17,28,41],[`bag`,`hiking`,`travel`,`camping`,`school`,`childhood`]],[[1,34,32],[`check`,`verified`,`unverified`]],[[1,34],[`check`,`verified`,`unverified`,`security`,`safety`,`issue`]],[[33,15],[`discount`,`offer`,`sale`,`voucher`,`tag`,`monetization`,`marketing`,`finance`,`financial`,`exchange`,`transaction`,`payment`,`cents`,`dollar`,`usd`,`$`,`¢`]],[[34],[`verified`,`check`]],[[33,15],[`discount`,`offer`,`sale`,`voucher`,`tag`,`monetization`,`marketing`,`finance`,`financial`,`exchange`,`transaction`,`payment`,`usd`,`$`]],[[33,15],[`discount`,`offer`,`sale`,`voucher`,`tag`,`monetization`,`marketing`,`finance`,`financial`,`exchange`,`transaction`,`payment`,`€`]],[[33,15],[`discount`,`offer`,`sale`,`voucher`,`tag`,`monetization`,`marketing`,`finance`,`financial`,`exchange`,`transaction`,`payment`,`inr`,`₹`]],[[1,0,34],[`verified`,`unverified`,`help`]],[[33,15],[`discount`,`offer`,`sale`,`voucher`,`tag`,`monetization`,`marketing`,`finance`,`financial`,`exchange`,`transaction`,`payment`,`jpy`,`¥`]],[[34],[`verified`,`unverified`,`delete`,`remove`,`erase`]],[[34,15,33,21],[`verified`,`unverified`,`sale`,`discount`,`offer`,`marketing`,`sticker`,`price tag`]],[[34],[`verified`,`unverified`,`add`,`create`,`new`]],[[33,15],[`discount`,`offer`,`sale`,`voucher`,`tag`,`monetization`,`marketing`,`finance`,`financial`,`exchange`,`transaction`,`payment`,`british`,`gbp`,`£`]],[[0,34,32],[`verified`,`unverified`,`help`]],[[33,15],[`discount`,`offer`,`sale`,`voucher`,`tag`,`monetization`,`marketing`,`finance`,`financial`,`exchange`,`transaction`,`payment`,`rub`,`₽`]],[[33,15],[`discount`,`offer`,`sale`,`voucher`,`tag`,`monetization`,`marketing`,`finance`,`financial`,`exchange`,`transaction`,`payment`,`chf`,`₣`]],[[33,15],[`discount`,`offer`,`sale`,`voucher`,`tag`,`monetization`,`marketing`,`finance`,`financial`,`exchange`,`transaction`,`payment`,`try`,`₺`]],[[34],[`verified`,`unverified`,`lost`,`delete`,`remove`]],[[40,41],[`baggage`,`luggage`,`travel`,`cart`,`trolley`,`suitcase`]],[[13],[`party`,`festival`,`congratulations`,`celebration`,`decoration`,`colorful`,`floating`,`fun`,`birthday`,`event`,`entertainment`]],[[1],[`cancel`,`no`,`stop`,`forbidden`,`prohibited`,`error`,`incorrect`,`mistake`,`wrong`,`failure`,`circle`,`slash`,`null`,`void`]],[[16],[`fruit`,`food`]],[[22],[`plaster`,`band-aid`,`first aid`,`medical`,`health`,`wound`,`injury`,`care`,`treatment`,`healing`,`protection`,`emergency`,`aid`,`safety`,`patch`]],[[15],[`currency`,`money`,`payment`]],[[15],[`bill`,`currency`,`money`,`payment`,`funds`,`transaction`,`cash`,`finance`,`withdraw`,`expense`,`out`,`payout`,`refund`,`debit`,`spending`,`decrease`]],[[15],[`bill`,`currency`,`money`,`payment`,`funds`,`transaction`,`cash`,`finance`,`deposit`,`earnings`,`income`,`in`,`credit`,`prepaid`,`growth`,`increase`]],[[15],[`bill`,`currency`,`money`,`payment`,`funds`,`transaction`,`cash`,`finance`,`error`,`failed`,`rejected`,`canceled`,`declined`,`lost`,`delete`,`remove`]],[[33],[`scan`,`checkout`,`till`,`cart`,`transaction`,`purchase`,`buy`,`product`,`packaging`,`retail`,`consumer`]],[[16,25],[`keg`,`drum`,`tank`,`wine`,`beer`,`oak`,`wood`,`firkin`,`hogshead`,`kilderkin`,`barrique`,`solera`,`aging`,`whiskey`,`brewery`,`distillery`,`winery`,`vineyard`]],[[37],[`text`,`format`,`color`]],[[41],[`amenities`,`services`,`bathroom`,`shower`]],[[8,12],[`power`,`electricity`,`energy`,`accumulator`,`charge`]],[[8,12],[`power`,`electricity`,`energy`,`accumulator`,`charge`]],[[8,12],[`power`,`electricity`,`energy`,`accumulator`,`charge`]],[[8,12],[`power`,`electricity`,`energy`,`accumulator`,`charge`]],[[8,12],[`power`,`electricity`,`energy`,`accumulator`,`charge`]],[[12],[`power`,`electricity`,`energy`,`accumulator`,`charge`,`plus`,`economy`,`health`,`add`,`new`,`maximum`,`upgrade`,`extra`,`+`]],[[8,12],[`power`,`electricity`,`energy`,`accumulator`,`charge`,`exclamation mark`]],[[29,17],[`cup`,`lab`,`chemistry`,`experiment`,`test`]],[[16],[`legume`,`soy`,`food`,`seed`]],[[16],[`soy free`,`legume`,`soy`,`food`,`seed`,`allergy`,`intolerance`,`diet`]],[[18],[`sleep`,`hotel`,`furniture`]],[[18],[`sleep`,`hotel`,`furniture`]],[[18],[`sleep`,`hotel`,`furniture`]],[[16],[`food`,`dish`,`restaurant`,`course`,`meal`,`meat`,`bbq`,`steak`]],[[16],[`alcohol`,`bar`,`beverage`,`brewery`,`drink`]],[[16],[`alcohol`,`bar`,`beverage`,`brewery`,`drink`]],[[1,26],[`alarm`,`notification`,`sound`,`reminder`]],[[1,26],[`alarm`,`notification`,`sound`,`reminder`,`unread`]],[[12,26,18],[`fire alarm`,`flames`,`smoke`,`firefighter`,`fireman`,`department`,`brigade`,`station`,`emergency`,`alert`,`safety`,`school bell`,`period break`,`recess`,`doorbell`,`entrance`,`entry`,`ring`,`reception`]],[[26],[`alarm`,`notification`,`silent`,`reminder`,`delete`,`remove`,`erase`]],[[26],[`alarm`,`notification`,`silent`,`reminder`]],[[26],[`notification`,`silent`,`reminder`,`add`,`create`,`new`]],[[26],[`alarm`,`notification`,`sound`,`reminder`]],[[19,10,39],[`insert`,`add`,`left`,`slot`,`squeeze`,`space`,`vertical`,`grid`,`table`,`rows`,`cells`,`excel`,`spreadsheet`,`accountancy`,`data`,`enter`,`entry`,`entries`,`blocks`,`rectangles`,`chevron`]],[[19,10,39],[`insert`,`add`,`right`,`slot`,`squeeze`,`space`,`vertical`,`grid`,`table`,`rows`,`cells`,`excel`,`spreadsheet`,`accountancy`,`data`,`enter`,`entry`,`entries`,`blocks`,`rectangles`,`chevron`]],[[19,10,39],[`insert`,`add`,`top`,`slot`,`squeeze`,`space`,`vertical`,`grid`,`table`,`columns`,`cells`,`data`,`enter`,`entry`,`entries`,`blocks`,`rectangles`,`chevron`]],[[19,10,39],[`insert`,`add`,`bottom`,`slot`,`squeeze`,`space`,`vertical`,`grid`,`table`,`columns`,`cells`,`data`,`enter`,`entry`,`entries`,`blocks`,`rectangles`,`chevron`]],[[13],[`arm`,`muscle`,`strong`,`working out`,`athletic`,`toned`,`muscular`,`forelimb`,`curled`]],[[40],[`bicycle`,`transport`,`trip`]],[[37,11],[`code`,`digits`,`computer`,`zero`,`one`,`boolean`]],[[25,24,28,29,41,11],[`field glasses`,`lorgnette`,`pince-nez`,`observation`,`sightseeing`,`nature`,`wildlife`,`birdwatching`,`scouting`,`surveillance`,`search`,`discovery`,`monitoring`,`lookout`,`viewpoint`,`travel`,`tourism`,`research`]],[[29],[`fallout`,`waste`,`biology`,`chemistry`,`chemical`,`element`]],[[2],[`peace`,`freedom`,`wing`,`avian`,`tweet`]],[[24,2,25,18],[`birdhouse`,`bird`,`garden`,`home`,`house`,`woodwork`]],[[4,11,15],[`currency`,`money`,`payment`]],[[10,28,39,11],[`mode`,`overlay`,`multiply`,`screen`,`opacity`,`transparency`,`alpha`,`filters`,`lenses`,`mixed`,`shades`,`tints`,`hues`,`saturation`,`brightness`,`overlap`,`colors`,`colours`]],[[18],[`shades`,`screen`,`curtain`,`shutter`,`roller blind`,`window`,`lighting`,`household`,`home`]],[[11,19,32],[`addon`,`plugin`,`integration`,`extension`,`package`,`build`,`stack`,`toys`,`kids`,`children`,`learning`,`squares`,`corner`]],[[8,12],[`wireless`]],[[8,12],[`paired`]],[[8,12],[`lost`]],[[8,12],[`pairing`]],[[37],[`text`,`strong`,`format`]],[[39,18],[`nut`,`screw`,`settings`,`preferences`,`configuration`,`controls`,`edit`,`diy`,`fixed`,`build`,`construction`,`parts`]],[[31,39],[`fatal`,`error`,`crash`,`blockbuster`,`mine`,`explosion`,`explode`,`explosive`]],[[2,22,17],[`health`,`skeleton`,`skull`,`death`,`pets`,`dog`]],[[37,11,17],`reading.paperback.booklet.magazine.leaflet.pamphlet.tome.library.writing.written.writer.author.story.script.fiction.novel.information.knowledge.education.high school.university.college.academy.student.study.learning.homework.research.documentation`.split(`.`)],[[37,17],`dictionary.define.definition.thesaurus.encyclopedia.encyclopaedia.reading.booklet.magazine.leaflet.pamphlet.tome.library.writing.written.writer.author.story.script.fiction.novel.information.knowledge.education.high school.university.college.academy.student.study.learning.homework.research.language.translate.alphabetical.a-z.ordered`.split(`.`)],[[37,11,17],`reading.paperback.booklet.magazine.leaflet.pamphlet.tome.library.writing.written.writer.author.story.script.fiction.novel.information.knowledge.education.high school.university.college.academy.student.study.learning.homework.research.documentation.warning.alert.danger.exclamation mark`.split(`.`)],[[23,37],[`audiobook`,`reading`,`listening`,`sound`,`story`,`fiction`,`novel`,`information`,`knowledge`,`education`,`student`,`study`,`learning`,`research`]],[[37,11,17],`read.booklet.magazine.leaflet.pamphlet.library.written.authored.published.informed.knowledgeable.educated.schooled.homework.examined.tested.marked.passed.graduated.studied.learned.lesson.researched.documented.revealed.blank.plain language.true.truth.verified.corrected.task.todo.done.completed.finished.ticked`.split(`.`)],[[11,37,17],`code.coding.version control.git.repository.clone.fork.duplicate.multiple.books.library.copies.copied.plagiarism.plagiarised.plagiarized.reading list.information.informed.knowledge.knowledgeable.knowledgable.education.high school.university.college.academy.student.study.learning.research.smart.intelligent.intellectual`.split(`.`)],[[11],[`code`,`coding`,`version control`,`git`,`repository`,`template`,`draft`,`script`,`screenplay`,`writing`,`writer`,`author`,`unwritten`,`unpublished`,`untold`]],[[11],[`code`,`coding`,`version control`,`git`,`repository`,`pull`]],[[23,37],[`audiobook`,`reading`,`listening`,`sound`,`story`,`fiction`,`novel`,`information`,`knowledge`,`education`,`student`,`study`,`learning`,`research`]],[[34,37,17],`diary.romance.novel.journal.entry.entries.personal.private.secret.crush.like.love.emotion.feminine.girls.teens.teenager.therapy.theraputic.therapist.planner.organizer.organiser.notes.notepad.stationery.sketchbook.writing.written.reading.favorite.favourite.high school`.split(`.`)],[[28,37,23,14,34,33,41],[`images`,`pictures`,`photos`,`album`,`collection`,`event`,`magazine`,`catalog`,`catalogue`,`brochure`,`browse`,`gallery`]],[[11,31,17],[`code`,`coding`,`version control`,`git`,`repository`,`private`,`public`,`secret`,`unlocked`,`hidden`,`revealed`,`knowledge`,`learning`]],[[11,31,17],[`code`,`coding`,`version control`,`git`,`repository`,`private`,`secret`,`hidden`,`knowledge`]],[[37,11,17],`dictionary.reading.booklet.magazine.leaflet.pamphlet.tome.library.writing.written.writer.author.story.script.fiction.novel.information.knowledge.education.high school.university.college.academy.student.study.learning.homework.research.documentation.saved.later.future.reference.index.code.coding.version control.git.repository`.split(`.`)],[[11,37,17],[`code`,`coding`,`version control`,`git`,`repository`,`remove`,`delete`,`censor`,`cancel`,`forbid`,`prohibit`,`ban`,`uneducated`,`re-educate`,`unlearn`,`downgrade`]],[[37,11,17],`reading.pages.booklet.magazine.leaflet.pamphlet.library.writing.written.writer.author.story.script.screenplay.fiction.novel.information.knowledge.education.high school.university.college.academy.student.study.learning.homework.research.documentation.revealed.blank.plain`.split(`.`)],[[37,11,17],`read.pages.booklet.magazine.leaflet.pamphlet.library.written.authored.published.informed.knowledgeable.educated.schooled.homework.examined.tested.marked.passed.graduated.studied.learned.lesson.researched.documented.revealed.blank.plain language.true.truth.verified.corrected.task.todo.done.completed.finished.ticked`.split(`.`)],[[37,11],`reading.pages.booklet.magazine.leaflet.pamphlet.library.writing.written.writer.author.story.script.fiction.novel.information.knowledge.education.high school.university.college.academy.student.study.learning.homework.research.documentation.revealed`.split(`.`)],[[11,37,17],[`code`,`coding`,`version control`,`git`,`repository`,`remove`,`delete`,`read`,`write`,`author`,`publish`,`inform`,`graduate`,`re-educate`,`study`,`learn`,`research`,`knowledge`,`improve`,`upgrade`,`level up`]],[[37,11,17],[`reading`,`library`,`study`,`education`,`research`,`knowledge`,`discover`,`browsing`,`lookup`,`finding`,`scanning`]],[[37,17],`reading.booklet.magazine.leaflet.pamphlet.tome.library.writing.written.writer.author.story.script.fiction.novel.information.knowledge.education.high school.university.college.academy.student.study.learning.homework.research.documentation`.split(`.`)],[[37,10,17],`thesaurus.synonym.reading.booklet.magazine.leaflet.pamphlet.tome.library.writing.written.writer.author.story.script.fiction.novel.information.knowledge.education.high school.university.college.academy.student.study.learning.homework.research.language.translate.typography.fonts.collection`.split(`.`)],[[11],[`code`,`coding`,`version control`,`git`,`repository`,`push`]],[[11],[`code`,`coding`,`version control`,`git`,`repository`,`push`,`force`]],[[1,8,7,34],[`person`,`people`,`family`,`friends`,`acquaintances`,`contacts`,`details`,`addresses`,`phone numbers`,`directory`,`listing`,`networking`]],[[37,17],[`code`,`coding`,`version control`,`git`,`repository`,`remove`,`delete`,`reading`,`misinformation`,`disinformation`,`misinformed`,`charlatan`,`sophistry`,`false`,`lies`,`untruth`,`propaganda`,`censored`,`cancelled`,`forbidden`,`prohibited`,`banned`,`uneducated`,`re-education`,`unlearn`]],[[1],[`save`,`favorite`,`mark`,`label`,`attachment`,`file`,`stick`,`pin`,`read`,`clip`,`marker`,`tag`]],[[1],[`read`,`finished`,`complete`,`clip`,`marker`,`tag`,`task`,`todo`]],[[1],[`delete`,`remove`]],[[1],[`add`]],[[1],[`read`,`clip`,`marker`,`tag`,`cancel`,`close`,`delete`,`remove`,`clear`]],[[12,23,34],[`radio`,`speakers`,`audio`,`music`,`sound`,`broadcast`,`live`,`frequency`]],[[11,34],[`robot`,`ai`,`chat`,`assistant`]],[[11,34],[`robot`,`ai`,`chat`,`assistant`]],[[11,34],[`robot`,`ai`,`chat`,`assistant`]],[[16],[`alcohol`,`drink`,`glass`,`goblet`,`chalice`,`vineyard`,`winery`,`red`,`white`,`rose`,`dry`,`sparkling`,`bar`,`party`,`nightclub`,`nightlife`,`sommelier`,`restaurant`,`dinner`,`meal`]],[[17,39],[`archer`,`archery`,`game`,`war`,`weapon`]],[[32,17,11,21],[`cube`,`package`,`container`,`storage`,`geometry`,`3d`,`isometric`]],[[32,17,11],[`cubes`,`packages`,`parts`,`group`,`units`,`collection`,`cluster`,`geometry`]],[[11,14],[`json`,`code`,`token`,`curly brackets`,`data`,`{`,`}`]],[[11,14],[`code`,`token`,`array`,`list`,`square`,`[`,`]`]],[[22,29],[`medical`,`mind`,`mental`,`intellect`,`cerebral`,`consciousness`,`genius`,`artificial intelligence`,`ai`,`think`,`thought`,`insight`,`intelligent`,`smart`]],[[29,11],[`mind`,`intellect`,`artificial intelligence`,`ai`,`deep learning`,`machine learning`,`computing`]],[[29,11],[`mind`,`intellect`,`artificial intelligence`,`ai`,`deep learning`,`machine learning`,`computing`]],[[5,18],[`bricks`,`mortar`,`cement`,`materials`,`construction`,`builder`,`labourer`,`quantity surveyor`,`blocks`,`stone`]],[[31,18,8],[`firewall`,`security`,`bricks`,`mortar`,`cement`,`materials`,`construction`,`builder`,`labourer`,`quantity surveyor`,`blocks`,`stone`,`campfire`,`camping`,`wilderness`,`outdoors`,`lit`,`warmth`,`wood`,`twigs`,`sticks`]],[[31,18,8],`firewall.security.bricks.mortar.cement.materials.construction.builder.labourer.quantity surveyor.blocks.stone.cybersecurity.secure.safety.protection.guardian.armored.armoured.defense.defence.defender.block.threat.prevention.antivirus.vigilance.vigilant.detection.scan.find.strength.strong.tough.invincible.invincibility.invulnerable.undamaged.audit.admin.verification.crest.bravery.knight.foot soldier.infantry.trooper.pawn.battle.war.military.army.cadet.scout`.split(`.`)],[[40],[`work`,`bag`,`baggage`,`folder`]],[[40],[`work`,`bag`,`baggage`,`folder`,`portfolio`]],[[41,40],[`baggage`,`luggage`,`travel`,`suitcase`,`conveyor`,`carousel`]],[[22,40],[`doctor`,`medicine`,`first aid`]],[[10,19],[`bring`,`send`,`move`,`over`,`forward`,`front`,`overlap`,`layer`,`order`]],[[37,10,39],[`clean`,`sweep`,`refactor`,`remove`,`draw`,`paint`,`color`,`artist`]],[[18,39,10],`cleaning.utensil.housekeeping.tool.sweeping.scrubbing.hygiene.maintenance.household.cleaner.chores.equipment.sanitation.bristles.handle.home care.sanitize.purify.wash.disinfect.sterilize.scrub.polish.decontaminate.wipe.spotless.remove.empty.erase.purge.eliminate`.split(`.`)],[[42],[`water`,`cleaning`,`soap`,`bath`,`hygiene`,`freshness`,`wash`,`foam`,`cleanliness`,`shampoo`,`purity`,`splash`,`lightness`,`airy`,`relaxation`,`spa`,`bubbly`,`fluid`,`floating`,`drop`]],[[11,2],[`issue`,`error`,`defect`,`testing`,`troubleshoot`,`problem`,`report`,`debug`,`code`,`insect`,`beetle`]],[[11,2],[`issue`,`fixed`,`resolved`,`testing`,`debug`,`code`,`insect`,`kill`,`exterminate`,`pest control`]],[[11,2],[`issue`,`testing`,`debug`,`reproduce`,`code`,`insect`]],[[1,5],[`organisation`,`organization`]],[[1,5],[`business`,`company`,`enterprise`,`skyscraper`,`organisation`,`organization`,`city`]],[[40],[`bus`,`vehicle`,`transport`,`trip`]],[[40],[`coach`,`vehicle`,`trip`,`road`]],[[8,12,23],`cord.wire.connector.connection.link.signal.console.computer.equipment.electricity.energy.electronics.recharging.charger.power.supply.disconnected.unplugged.plugs.interface.input.output.audio video.av.rca.scart.tv.television.optical`.split(`.`)],[[40,41],[`ski lift`,`winter holiday`,`alpine`,`resort`,`mountains`]],[[16,34,1],[`birthday`,`birthdate`,`celebration`,`party`,`surprise`,`gateaux`,`dessert`,`fondant`,`icing sugar`,`sweet`,`baking`]],[[16,34],[`birthday`,`birthdate`,`celebration`,`party`,`surprise`,`gateaux`,`dessert`,`candles`,`wish`,`fondant`,`icing sugar`,`sweet`,`baking`]],[[21,12],[`count`,`calculating machine`]],[[38],[`date`,`month`,`year`,`event`,`birthday`,`birthdate`]],[[38],[`date`,`month`,`year`,`event`,`single`,`singular`,`once`,`1`,`first`]],[[38],[`date`,`month`,`year`,`event`,`sort`,`order`,`ascending`,`descending`,`increasing`,`decreasing`,`rising`,`falling`]],[[38],[`date`,`month`,`year`,`event`,`sort`,`order`,`ascending`,`descending`,`increasing`,`decreasing`,`rising`,`falling`]],[[38],[`date`,`day`,`month`,`year`,`event`,`confirm`,`subscribe`,`schedule`,`done`,`todo`,`tick`,`complete`,`task`]],[[38],[`date`,`day`,`month`,`year`,`event`,`confirm`,`subscribe`,`schedule`,`done`,`todo`,`tick`,`complete`,`task`]],[[38],[`date`,`day`,`month`,`year`,`event`,`clock`,`hour`]],[[38],[`date`,`day`,`month`,`year`,`events`,`settings`,`gear`,`cog`]],[[38],[`date`,`month`,`year`,`event`]],[[38,14],[`date`,`month`,`year`,`event`,`birthday`,`birthdate`,`ics`]],[[38],[`date`,`month`,`year`,`event`,`heart`,`favourite`,`subscribe`,`valentines day`]],[[38],[`date`,`day`,`month`,`year`,`event`,`delete`,`remove`]],[[38],[`date`,`day`,`month`,`year`,`event`,`delete`,`remove`]],[[38],[`date`,`day`,`month`,`year`,`event`,`delete`,`remove`]],[[38],[`date`,`day`,`month`,`year`,`event`,`add`,`subscribe`,`create`,`new`]],[[38],[`date`,`day`,`month`,`year`,`event`,`add`,`subscribe`,`create`,`new`]],[[38],[`date`,`day`,`month`,`year`,`event`,`range`,`period`]],[[38],[`date`,`day`,`month`,`year`,`events`,`search`,`lens`]],[[3,38],[`repeat`,`refresh`,`reconnect`,`transfer`,`backup`,`date`,`month`,`year`,`event`,`subscribe`,`recurring`,`schedule`,`reminder`,`automatic`,`auto`]],[[38],[`date`,`day`,`month`,`year`,`event`,`remove`,`busy`]],[[38],[`date`,`day`,`month`,`year`,`event`,`remove`]],[[38],[`date`,`month`,`year`,`event`,`dates`,`months`,`years`,`events`]],[[28,12,7],[`photography`,`lens`,`focus`,`capture`,`shot`,`visual`,`image`,`device`,`equipment`,`photo`,`webcam`,`video`]],[[28,12,7],[`photo`,`webcam`,`video`]],[[16],[`sugar`,`food`,`sweet`]],[[16],[`sugar`,`food`,`sweet`,`christmas`,`xmas`]],[[16],[`sugar free`,`food`,`sweet`,`allergy`,`intolerance`,`diet`]],[[24],[`cannabis`,`weed`,`leaf`]],[[24],[`cannabis`,`weed`,`leaf`]],[[23],[`closed captions`,`subtitles`,`subhead`,`transcription`,`transcribe`,`dialogue`,`accessibility`]],[[23],[`closed captions`,`subtitles`,`subhead`,`transcription`,`transcribe`,`dialogue`,`accessibility`]],[[40],[`vehicle`,`drive`,`trip`,`journey`]],[[40],[`vehicle`,`drive`,`trip`,`journey`]],[[40],[`cab`,`vehicle`,`drive`,`trip`,`journey`]],[[40,41,24],[`trailer`,`tow`,`camping`,`campsite`,`mobile home`,`holiday`,`nomadic`,`wilderness`,`outdoors`]],[[8,7,23,12],[`cellphone`,`smartphone`,`mobile`,`network`,`cellular`,`service`,`provider`,`signal`,`coverage`,`disk`,`data`,`format`,`storage`,`flash`,`digital`,`contacts`,`phone book`,`contractual`,`circuit board`,`chip`]],[[16],[`vegetable`,`food`,`eat`]],[[37,11],[`text`,`letters`,`characters`,`font`,`typography`]],[[37],[`text`,`letters`,`characters`,`font`,`typography`]],[[37,11],[`text`,`letters`,`characters`,`font`,`typography`]],[[8,12,23,7,14],[`audio`,`music`,`recording`,`play`]],[[12,8],[`chromecast`,`airplay`,`screen`]],[[5,17,25],[`fortress`,`stronghold`,`palace`,`chateau`,`building`]],[[2],[`animal`,`pet`,`kitten`,`feline`]],[[31,12,7,8,28],[`camera`,`surveillance`,`recording`,`film`,`videotape`,`crime`,`watching`]],[[6],[`statistics`,`analytics`,`diagram`,`graph`,`area`]],[[6],[`statistics`,`analytics`,`diagram`,`graph`]],[[6],[`statistics`,`analytics`,`diagram`,`graph`]],[[6],[`statistics`,`analytics`,`diagram`,`graph`,`trending down`]],[[6],[`statistics`,`analytics`,`diagram`,`graph`,`trending up`]],[[6],[`statistics`,`analytics`,`diagram`,`graph`,`multivariate`,`categorical`,`comparison`]],[[6,15],[`trading`,`trader`,`financial`,`markets`,`portfolio`,`assets`,`prices`,`value`,`valuation`,`commodities`,`currencies`,`currency`,`stocks`,`exchange`,`hedge fund`,`statistics`,`analytics`,`diagram`,`graph`]],[[6],[`statistics`,`analytics`,`diagram`,`graph`]],[[6],[`statistics`,`analytics`,`diagram`,`graph`]],[[6],[`statistics`,`analytics`,`diagram`,`graph`,`trending down`]],[[6],[`statistics`,`analytics`,`diagram`,`graph`,`trending up`]],[[6],[`statistics`,`analytics`,`diagram`,`graph`,`multivariate`,`categorical`,`comparison`]],[[6],[`diagram`,`graph`,`timeline`,`planning`]],[[6],[`statistics`,`analytics`,`diagram`,`graph`]],[[6],[`statistics`,`analytics`,`diagram`,`graph`,`topology`,`cluster`,`web`,`nodes`,`connections`,`edges`]],[[6],[`statistics`,`analytics`,`diagram`,`graph`]],[[6],[`statistics`,`analytics`,`diagram`,`graph`,`trending down`]],[[6],[`statistics`,`analytics`,`diagram`,`graph`,`trending up`]],[[6],[`statistics`,`analytics`,`diagram`,`graph`,`trending up`]],[[6,38,11,10],[`projects`,`manage`,`overview`,`roadmap`,`plan`,`intentions`,`timeline`,`deadline`,`date`,`event`,`range`,`period`,`productivity`,`work`,`agile`,`code`,`coding`]],[[6,14],[`statistics`,`analytics`,`diagram`,`presentation`]],[[6],[`statistics`,`analytics`,`diagram`,`graph`]],[[6],[`statistics`,`analytics`,`diagram`,`graph`,`curve`,`continuous`,`smooth`,`polynomial`,`quadratic`,`function`,`interpolation`]],[[26],[`done`,`todo`,`tick`,`complete`,`task`]],[[26],[`done`,`received`,`double`,`todo`,`tick`,`complete`,`task`]],[[26],[`done`,`todo`,`tick`,`complete`,`task`]],[[16],[`cooking`,`food`,`kitchen`,`restaurant`]],[[16],[`fruit`,`food`]],[[17,13],[`mitre`,`miter`,`piece`,`board game`,`religion`]],[[17,13],[`ruler`,`crown`,`piece`,`board game`,`stalemate`]],[[17,13],[`piece`,`horse`,`board game`]],[[17,13],[`piece`,`board game`]],[[17,13],[`ruler`,`crown`,`piece`,`board game`,`stalemate`]],[[17,13],[`castle`,`piece`,`board game`]],[[3,17],[`backwards`,`reverse`,`slow`,`dropdown`]],[[3,23],[`previous`,`music`]],[[3,23],[`skip`,`next`,`music`]],[[3],[`back`,`previous`,`less than`,`fewer`,`menu`,`<`]],[[3,21,11],[`forward`,`next`,`more than`,`greater`,`menu`,`code`,`coding`,`command line`,`terminal`,`prompt`,`shell`,`>`]],[[3,21,17],[`caret`,`keyboard`,`mac`,`control`,`ctrl`,`superscript`,`exponential`,`power`,`ahead`,`fast`,`^`,`dropdown`]],[[3,17],[`backwards`,`reverse`,`slower`]],[[3],[`collapse`,`fold`,`vertical`]],[[3,17],[`turn`,`corner`]],[[3],[`expand`,`horizontal`,`unfold`]],[[7,12,23,17],[`internet`,`network`,`connection`,`cable`,`lan`,`port`,`router`,`switch`,`hub`,`modem`,`web`,`online`,`networking`,`communication`,`socket`,`plug`,`slot`,`controller`,`connector`,`interface`,`console`,`signal`,`data`,`input`,`output`]],[[3,17],[`turn`,`corner`]],[[3],[`collapse`,`fold`,`horizontal`]],[[3,17],[`forward`,`ahead`,`faster`,`speed`,`boost`]],[[3],[`expand`,`unfold`,`vertical`]],[[5,25],[`temple`,`building`]],[[41,40,22],[`smoking`]],[[41,40,22],[`smoking`,`no-smoking`]],[[32],[`off`,`zero`,`record`,`shape`]],[[26],[`warning`,`alert`,`danger`,`exclamation mark`]],[[3,17],[`backwards`,`reverse`,`direction`,`south`,`sign`,`button`]],[[3,17],[`previous`,`back`,`direction`,`west`,`sign`,`turn`,`button`,`<-`]],[[3],[`outwards`,`direction`,`south-west`,`diagonal`]],[[3],[`outwards`,`direction`,`south-east`,`diagonal`]],[[3,11],[`outwards`,`direction`,`north-west`,`diagonal`,`keyboard`,`button`,`escape`]],[[3],[`outwards`,`direction`,`north-east`,`diagonal`]],[[3,17],[`next`,`forward`,`direction`,`east`,`sign`,`turn`,`button`,`->`]],[[3,17],[`forward`,`direction`,`north`,`sign`,`button`]],[[26],[`done`,`todo`,`tick`,`complete`,`task`]],[[26],[`done`,`todo`,`tick`,`complete`,`task`]],[[3],[`back`,`menu`]],[[3],[`back`,`previous`,`less than`,`fewer`,`menu`,`<`]],[[3],[`back`,`more than`,`greater`,`menu`,`>`]],[[3],[`caret`,`ahead`,`menu`,`^`]],[[11,32],[`pending`,`dot`,`progress`,`issue`,`draft`,`code`,`coding`,`version control`]],[[21],[`calculate`,`math`,`÷`,`/`]],[[15],[`monetization`,`marketing`,`currency`,`money`,`payment`]],[[11,32],[`pending`,`dot`,`progress`,`issue`,`code`,`coding`,`version control`,`choices`,`multiple choice`,`choose`]],[[11,32],[`pending`,`dot`,`progress`,`issue`,`draft`,`code`,`coding`,`version control`]],[[19,11],[`ellipsis`,`et cetera`,`etc`,`loader`,`loading`,`progress`,`pending`,`throbber`,`menu`,`options`,`operator`,`code`,`spread`,`rest`,`more`,`further`,`extra`,`overflow`,`dots`,`…`,`...`]],[[21],[`calculate`,`shape`,`=`]],[[3,11],[`north`,`up`,`upgrade`,`improve`,`circle`,`button`]],[[7,34],[`stories`,`social media`,`instagram`,`facebook`,`meta`,`snapchat`,`sharing`,`content`]],[[40,35,29],[`dashboard`,`dial`,`meter`,`speed`,`pressure`,`measure`,`level`]],[[21],[`subtract`,`remove`,`decrease`,`reduce`,`calculate`,`line`,`operator`,`code`,`coding`,`minimum`,`downgrade`,`-`]],[[32],[`diameter`,`zero`,`ø`,`nothing`,`null`,`void`,`cancel`,`ban`,`no`,`stop`,`forbidden`,`prohibited`,`error`,`incorrect`,`mistake`,`wrong`,`failure`]],[[40,25],[`parking lot`,`car park`]],[[40,25],[`parking lot`,`car park`,`no parking`]],[[23],[`music`,`audio`,`stop`]],[[34,15,33,21],[`verified`,`unverified`,`sale`,`discount`,`offer`,`marketing`,`sticker`,`price tag`]],[[32],[`off`,`zero`,`record`,`shape`,`circle-pile`,`circle`,`pile`,`stack`,`layer`,`structure`,`form`,`group`,`collection`,`stock`,`inventory`,`materials`,`warehouse`]],[[23],[`music`,`start`,`run`]],[[21,11,9,17],[`add`,`new`,`increase`,`increment`,`positive`,`calculate`,`crosshair`,`aim`,`target`,`scope`,`sight`,`reticule`,`maximum`,`upgrade`,`extra`,`operator`,`join`,`concatenate`,`code`,`coding`,`+`]],[[15],[`monetization`,`coin`,`penny`,`marketing`,`currency`,`money`,`payment`,`british`,`gbp`,`£`]],[[8],[`on`,`off`,`device`,`switch`,`toggle`,`binary`,`boolean`,`reboot`,`restart`,`button`,`keyboard`,`troubleshoot`]],[[0,37,26],[`question mark`]],[[11,21],[`diameter`,`zero`,`ø`,`nothing`,`null`,`void`,`cancel`,`ban`,`no`,`stop`,`forbidden`,`prohibited`,`error`,`incorrect`,`mistake`,`wrong`,`failure`,`divide`,`division`,`or`,`/`]],[[32,21,11],[`diameter`,`zero`,`ø`,`nothing`,`null`,`void`,`ban`,`math`,`divide`,`division`,`half`,`split`,`/`,`average`,`avg`,`mean`,`median`,`normal`]],[[32,22],[`shape`,`bullet`,`gender`,`genderless`]],[[35,17],[`badge`,`medal`,`honour`,`decoration`,`order`,`pin`,`laurel`,`trophy`,`medallion`,`insignia`,`bronze`,`silver`,`gold`]],[[23],[`media`,`music`]],[[1],[`person`,`account`,`contact`]],[[1],[`person`,`account`,`contact`]],[[21,11],[`cancel`,`close`,`delete`,`remove`,`times`,`clear`,`error`,`incorrect`,`wrong`,`mistake`,`failure`,`linter`,`multiply`,`multiplication`]],[[29,11],[`computing`,`electricity`,`electronics`]],[[16],[`lemon`,`orange`,`grapefruit`,`fruit`]],[[23],[`movie`,`film`,`video`,`camera`,`cinema`,`cut`,`action`,`television`,`tv`,`show`,`entertainment`]],[[37],[`copy`,`paste`]],[[37],[`copied`,`pasted`,`done`,`todo`,`tick`,`complete`,`task`]],[[38,37],[`copy`,`paste`,`history`,`log`,`clock`,`time`,`watch`,`alarm`,`hour`,`minute`,`reminder`,`scheduled`,`deadline`,`pending`,`time tracking`,`timesheets`,`appointment`,`logbook`]],[[37,3],[`copy`,`paste`]],[[37],[`copy`,`paste`,`tasks`]],[[37,22],[`copy`,`delete`,`remove`,`erase`,`document`,`medical`,`report`,`doctor`]],[[37,3],[`copy`,`paste`]],[[37],[`paste`,`signature`]],[[37],[`paste`]],[[37,22],[`copy`,`paste`,`add`,`create`,`new`,`document`,`medical`,`report`,`doctor`]],[[37],[`paste`,`format`,`text`]],[[37],[`copy`,`paste`,`discard`,`remove`]],[[38],[`time`,`watch`,`alarm`]],[[38],[`time`,`watch`,`alarm`]],[[38],[`time`,`watch`,`alarm`]],[[38],[`time`,`watch`,`alarm`]],[[38],[`time`,`watch`,`alarm`,`noon`,`midnight`]],[[38],[`time`,`watch`,`alarm`]],[[38],[`time`,`watch`,`alarm`]],[[38],[`time`,`watch`,`alarm`]],[[38],[`time`,`watch`,`alarm`]],[[38],[`time`,`watch`,`alarm`]],[[38],[`time`,`watch`,`alarm`]],[[38],[`time`,`watch`,`alarm`]],[[38],[`time`,`watch`,`alarm`]],[[38],[`time`,`watch`,`alarm`,`warning`,`wrong`]],[[38],[`time`,`watch`,`alarm`,`sort`,`order`,`ascending`,`descending`,`increasing`,`decreasing`,`rising`,`falling`]],[[38],[`time`,`watch`,`alarm`,`sort`,`order`,`ascending`,`descending`,`increasing`,`decreasing`,`rising`,`falling`]],[[38],[`time`,`watch`,`alarm`]],[[38],[`time`,`watch`,`alarm`]],[[38],[`time`,`watch`,`alarm`,`add`,`create`,`new`]],[[0,23],[`tv`,`movie`,`video`,`closed captions`,`subtitles`,`subhead`,`transcription`,`transcribe`,`dialogue`,`accessibility`]],[[42],[`weather`]],[[11],[`weather`,`danger`,`warning`,`alert`,`error`,`sync`,`network`,`exclamation`]],[[3,14],[`storage`,`memory`,`bytes`,`servers`,`backup`,`timemachine`,`rotate`,`synchronize`,`synchronise`,`refresh`,`reconnect`,`transfer`,`data`,`security`,`upload`,`save`,`remote`,`safety`]],[[11],[`sync`,`network`,`success`,`done`,`completed`,`saved`,`persisted`]],[[11],[`computing`,`ai`,`cluster`,`network`]],[[3,14],[`import`]],[[42],[`weather`,`shower`]],[[42],[`weather`,`mist`]],[[42],[`weather`,`rainfall`]],[[42],[`weather`,`bolt`]],[[42],[`weather`,`night`]],[[42],[`weather`,`partly`,`night`,`rainfall`]],[[8,42],[`disconnect`]],[[42],[`weather`,`rainfall`]],[[42],[`weather`,`rainfall`]],[[42],[`weather`,`blizzard`]],[[42],[`weather`,`partly`]],[[42],[`weather`,`partly`,`rainfall`]],[[3,14],[`synchronize`,`synchronise`,`refresh`,`reconnect`,`transfer`,`backup`,`storage`,`upload`,`download`,`connection`,`network`,`data`]],[[3,14],[`file`]],[[42],[`weather`,`clouds`]],[[17],[`leaf`,`luck`,`plant`]],[[32,17],[`shape`,`suit`,`playing`,`cards`]],[[37,11],[`source`,`programming`,`html`,`xml`]],[[37,11],[`source`,`programming`,`html`,`xml`]],[[16],[`drink`,`cup`,`mug`,`tea`,`cafe`,`hot`,`beverage`]],[[1],[`computing`,`settings`,`cog`,`edit`,`gear`,`preferences`,`controls`,`configuration`,`fixed`,`build`,`construction`,`parts`]],[[17],[`money`,`cash`,`finance`,`gamble`]],[[19,10,37],[`lines`,`list`,`queue`,`preview`,`panel`,`parallel`,`series`,`split`,`vertical`,`horizontal`,`half`,`center`,`middle`,`even`,`sidebar`,`drawer`,`gutter`,`fold`,`reflow`,`typography`,`pagination`,`pages`]],[[19,10,37],[`lines`,`list`,`queue`,`preview`,`parallel`,`series`,`split`,`vertical`,`horizontal`,`thirds`,`triple`,`center`,`middle`,`alignment`,`even`,`sidebars`,`drawers`,`gutters`,`fold`,`reflow`,`typography`,`pagination`,`pages`]],[[19,10],[`columns`,`settings`,`customize`,`table`,`grid`,`adjust`,`configuration`,`panel`,`layout`]],[[19,10,37,31],`lines.list.queue.preview.parallel.series.split.vertical.horizontal.thirds.triple.center.middle.alignment.even.sidebars.drawers.gutters.fold.reflow.typography.pagination.pages.prison.jail.bars.sentence.police.cops.cell.crime.criminal.justice.law.enforcement.grill`.split(`.`)],[[11,14],[`cubes`,`packages`,`parts`,`units`,`collection`,`cluster`,`combine`,`gather`,`merge`]],[[11],[`keyboard`,`key`,`mac`,`cmd`,`button`]],[[25,41],[`direction`,`north`,`east`,`south`,`west`,`safari`,`browser`]],[[10,11],[`design`,`element`,`group`,`module`,`part`,`symbol`]],[[12,11,17],[`pc`,`chassis`,`codespaces`,`github`]],[[41],[`reception`,`bell`,`porter`]],[[32,21],[`conical`,`triangle`,`triangular`,`geometry`,`filter`,`funnel`,`hopper`,`spotlight`,`searchlight`]],[[11],[`roadwork`,`maintenance`,`blockade`,`barricade`]],[[1,8,7,34],[`user`,`person`,`family`,`friend`,`acquaintance`,`listing`,`networking`]],[[1,8,7,34],[`user`,`person`,`family`,`friend`,`acquaintance`,`listing`,`networking`]],[[11,40,20],[`storage`,`shipping`,`freight`,`supply chain`,`docker`,`environment`,`devops`,`code`,`coding`]],[[28,0,10],[`display`,`accessibility`]],[[1,16],[`biscuit`,`privacy`,`legal`,`food`]],[[16,18],[`pod`,`cooking`,`recipe`,`food`,`kitchen`,`chef`,`restaurant`,`dinner`,`lunch`,`breakfast`,`meal`,`eat`]],[[37],[`clone`,`duplicate`,`multiple`]],[[37,26],[`clone`,`duplicate`,`done`,`multiple`]],[[37,21],[`clone`,`duplicate`,`remove`,`delete`,`collapse`,`subtract`,`multiple`,`-`]],[[37,21],[`clone`,`duplicate`,`add`,`multiple`,`expand`,`+`]],[[37,11,21],[`clone`,`duplicate`,`cancel`,`ban`,`no`,`stop`,`forbidden`,`prohibited`,`error`,`multiple`,`divide`,`division`,`split`,`or`,`/`]],[[26,21],[`cancel`,`close`,`delete`,`remove`,`clear`,`multiple`,`multiply`,`multiplication`,`times`]],[[37],[`licence`]],[[37],[`licence`,`license`]],[[3],[`arrow`,`return`]],[[3,37,11],[`arrow`,`indent`,`tab`]],[[3],[`arrow`]],[[3],[`arrow`]],[[3],[`arrow`]],[[3],[`arrow`]],[[3],[`arrow`]],[[3],[`arrow`]],[[12],[`processor`,`cores`,`technology`,`computer`,`chip`,`circuit`,`memory`,`ram`,`specs`,`gigahertz`,`ghz`]],[[37],[`licence`,`license`]],[[1,15],[`bank`,`purchase`,`payment`,`cc`]],[[16],[`bakery`,`cooking`,`food`,`pastry`]],[[28,10],[`photo`,`image`]],[[32],[`healthcare`,`first aid`]],[[28],[`aim`,`target`]],[[17],[`diadem`,`tiara`,`circlet`,`corona`,`king`,`ruler`,`winner`,`favourite`]],[[32,21,16],[`brick`,`block`,`box`,`3d`,`solid`,`volume`,`container`,`storage`,`shipping`,`carton`,`geometry`,`rectangular`,`hexahedron`,`butter`,`tofu`,`soap`,`cheese`,`package`,`parcel`,`crate`]],[[16],[`beverage`,`cup`,`drink`,`soda`,`straw`,`water`]],[[15],[`finance`,`money`]],[[32,10,21],[`shape`,`elliptical`,`geometry`,`container`,`storage`,`tin`,`pot`]],[[5,36,25],[`electricity`,`energy`,`water`]],[[12,11],[`storage`,`memory`,`container`,`tin`,`pot`,`bytes`,`servers`]],[[12,3,10,11,28],[`storage`,`memory`,`bytes`,`servers`,`backup`,`timemachine`,`rotate`,`arrow`,`left`]],[[12,11],[`storage`,`memory`,`container`,`tin`,`pot`,`bytes`,`servers`]],[[12,11],[`cache busting`,`storage`,`memory`,`bytes`,`servers`,`power`,`crash`]],[[10,37,3,21],[`numerical`,`decimal`,`decrease`,`less`,`fewer`,`precision`,`rounding`,`digits`,`fraction`,`float`,`number`]],[[10,37,3,21],[`numerical`,`decimal`,`increase`,`more`,`precision`,`rounding`,`digits`,`fraction`,`float`,`number`]],[[37,3],[`backspace`,`remove`]],[[16],[`pudding`,`christmas`,`xmas`,`custard`,`iced bun`,`icing`,`fondant`,`cake`,`ice cream`,`gelato`,`sundae`,`scoop`,`dollop`,`sugar`,`food`,`sweet`]],[[32,21,10,39],[`shape`,`circle`,`geometry`,`trigonometry`,`width`,`height`,`size`,`calculate`,`measure`]],[[32,17],[`square`,`rectangle`,`oblique`,`rhombus`,`shape`,`suit`,`playing`,`cards`]],[[23,28,39,12],[`keyframe`,`subtract`,`remove`,`decrease`,`reduce`,`calculator`,`button`,`keyboard`,`line`,`divider`,`separator`,`horizontal rule`,`hr`,`html`,`markup`,`markdown`,`---`,`toolbar`,`operator`,`code`,`coding`,`minimum`,`downgrade`]],[[34,15,33,21],[`verified`,`unverified`,`sale`,`discount`,`offer`,`marketing`,`sticker`,`price tag`]],[[23,28,39,12],[`keyframe`,`add`,`new`,`increase`,`increment`,`positive`,`calculate`,`toolbar`,`crosshair`,`aim`,`target`,`scope`,`sight`,`reticule`,`maximum`,`upgrade`,`extra`,`+`]],[[17],[`dice`,`random`,`tabletop`,`1`,`board`,`game`]],[[17],[`dice`,`random`,`tabletop`,`2`,`board`,`game`]],[[17],[`dice`,`random`,`tabletop`,`3`,`board`,`game`]],[[17],[`dice`,`random`,`tabletop`,`4`,`board`,`game`]],[[17],[`dice`,`random`,`tabletop`,`5`,`board`,`game`]],[[17],[`dice`,`random`,`tabletop`,`6`,`board`,`game`]],[[17],[`dice`,`random`,`tabletop`,`board`,`game`]],[[11,14],[`patch`,`difference`,`compare`,`plus`,`minus`,`plus-minus`,`math`]],[[12,23],[`album`,`music`,`songs`,`format`,`cd`,`dvd`,`vinyl`,`sleeve`,`cover`,`platinum`,`compilation`,`ep`,`recording`,`playback`,`spin`,`rotate`,`rpm`,`dj`]],[[12,23],[`album`,`music`,`vinyl`,`record`,`cd`,`dvd`,`format`,`dj`,`spin`,`rotate`,`rpm`]],[[12,23],[`album`,`music`,`vinyl`,`record`,`cd`,`dvd`,`format`,`dj`,`spin`,`rotate`,`rpm`]],[[12,23],[`album`,`music`,`songs`,`format`,`cd`,`dvd`,`vinyl`,`sleeve`,`cover`,`platinum`,`compilation`,`ep`,`recording`,`playback`,`spin`,`rotate`,`rpm`,`dj`]],[[21,11],[`calculate`,`math`,`division`,`operator`,`code`,`÷`,`/`]],[[22],[`gene`,`gmo`,`helix`,`heredity`,`chromosome`,`nucleic acid`]],[[22,16],[`gene`,`gmo free`,`helix`,`heredity`,`chromosome`,`nucleic acid`]],[[19,10,11,14],[`desktop`,`applications`,`launch`,`home`,`menu bar`,`bottom`,`line`,`macos`,`osx`]],[[2],[`animal`,`pet`,`puppy`,`hound`,`canine`]],[[15],[`currency`,`money`,`payment`]],[[16],[`doughnut`,`sprinkles`,`topping`,`fast food`,`junk food`,`snack`,`treat`,`sweet`,`sugar`,`dessert`,`hollow`,`ring`]],[[18,41,31],[`entrance`,`entry`,`exit`,`ingress`,`egress`,`gate`,`gateway`,`emergency exit`]],[[18,41,31],[`entrance`,`entry`,`exit`,`ingress`,`egress`,`gate`,`gateway`,`emergency exit`,`lock`]],[[18,41,31],[`entrance`,`entry`,`exit`,`ingress`,`egress`,`gate`,`gateway`,`emergency exit`]],[[32,37],[`interpunct`,`interpoint`,`middot`,`step`,`punctuation`,`period`,`full stop`,`end`,`finish`,`final`,`characters`,`font`,`typography`,`type`,`center`,`.`]],[[3,14],[`import`,`export`,`save`]],[[21,10,39],[`geometry`,`trigonometry`,`radius`,`diameter`,`circumference`,`calculate`,`measure`,`arc`,`curve`,`draw`,`sketch`]],[[23],[`drama`,`masks`,`theater`,`theatre`,`entertainment`,`show`]],[[39,18,12],[`power`,`bit`,`head`,`hole`,`diy`,`toolbox`,`build`,`construction`]],[[40,12],[`quadcopter`,`uav`,`aerial`,`flight`,`flying`,`technology`,`airborne`,`robotics`]],[[42,17],[`water`,`weather`,`liquid`,`fluid`,`wet`,`moisture`,`damp`,`bead`,`globule`]],[[42,17],[`water`,`weather`,`liquid`,`fluid`,`wet`,`moisture`,`damp`,`bead`,`globule`]],[[42],[`water`,`weather`,`liquid`,`fluid`,`wet`,`moisture`,`damp`,`bead`,`globule`]],[[23,12],[`drummer`,`kit`,`sticks`,`instrument`,`beat`,`bang`,`bass`,`backing track`,`band`,`play`,`performance`,`concert`,`march`,`music`,`audio`,`sound`,`noise`,`loud`]],[[16],[`food`,`chicken`,`meat`]],[[25,35],[`barbell`,`weight`,`workout`,`gym`]],[[22,0],[`hearing`,`noise`,`audio`,`accessibility`]],[[22,0],[`hearing`,`hard of hearing`,`hearing loss`,`deafness`,`noise`,`silence`,`audio`,`accessibility`]],[[25],[`world`,`browser`,`language`,`translate`,`globe`]],[[31,11,12],[`vpn`,`private`,`privacy`,`network`,`world`,`browser`,`security`,`encryption`,`protection`,`connection`]],[[29,10,11,0,28],[`lunar`,`solar`,`crescent moon`,`sun`,`earth`,`day`,`night`,`planet`,`space`,`mode`,`dark`,`light`,`toggle`,`switch`,`color`,`css`,`styles`,`display`,`accessibility`,`contrast`,`brightness`,`blend`,`shade`]],[[16,2],[`bird`,`chicken`,`nest`,`hatch`,`shell`,`incubate`,`soft boiled`,`hard`,`breakfast`,`brunch`,`morning`,`easter`]],[[16],[`food`,`breakfast`]],[[16],[`egg free`,`vegan`,`hatched`,`bad egg`]],[[19,11],[`et cetera`,`etc`,`loader`,`loading`,`progress`,`pending`,`throbber`,`menu`,`options`,`operator`,`code`,`coding`,`spread`,`rest`,`more`,`further`,`extra`,`overflow`,`dots`,`…`,`...`]],[[19],[`menu`,`options`,`spread`,`more`,`further`,`extra`,`overflow`,`dots`,`…`,`...`]],[[21,11],[`calculate`,`math`,`operator`,`assignment`,`code`,`=`]],[[21],[`about`,`calculate`,`math`,`operater`]],[[21,11],[`calculate`,`off`,`math`,`operator`,`code`,`≠`]],[[37],[`pencil`,`drawing`,`undo`,`delete`,`clear`,`trash`,`remove`]],[[7,12,23,17],[`internet`,`network`,`connection`,`cable`,`lan`,`port`,`router`,`switch`,`hub`,`modem`,`web`,`online`,`networking`,`communication`,`socket`,`plug`,`slot`,`controller`,`connector`,`interface`,`console`,`signal`,`data`,`input`,`output`]],[[15],[`currency`,`money`,`payment`]],[[40,25],[`electric`,`charger`,`station`,`vehicle`,`fast`,`plug`,`ev`,`power`,`electricity`,`energy`,`accumulator`,`charge`]],[[37,3],[`scale`,`fullscreen`,`maximize`,`minimize`,`contract`]],[[3,37,34],[`outbound`,`open`,`share`]],[[0,28,10,31],[`view`,`watch`,`see`,`show`,`expose`,`reveal`,`display`,`visible`,`visibility`,`vision`,`preview`,`read`]],[[0,28,10,31],[`view`,`watch`,`see`,`hide`,`conceal`,`mask`,`hidden`,`visibility`,`vision`]],[[0,28,10,31],[`view`,`watch`,`see`,`hide`,`conceal`,`mask`,`hidden`,`visibility`,`vision`]],[[5,25],[`building`,`business`,`energy`,`industry`,`manufacture`,`sector`]],[[18],[`air`,`cooler`,`ventilation`,`ventilator`,`blower`]],[[23,3],[`music`]],[[17],[`logo`]],[[18,5],[`picket`,`panels`,`woodwork`,`diy`,`materials`,`suburban`,`garden`,`property`,`territory`]],[[25],[`big wheel`,`daisy wheel`,`observation`,`attraction`,`entertainment`,`amusement park`,`theme park`,`funfair`]],[[14],[`document`]],[[14],[`zip`,`package`,`archive`]],[[10,14],[`model`,`3d`,`axis`,`coordinates`]],[[14],[`award`,`achievement`,`badge`,`rosette`,`prize`,`winner`]],[[14],[`box`,`package`,`model`]],[[14,11],[`code`,`json`,`curly braces`,`curly brackets`]],[[14,11],[`code`,`json`,`curly braces`,`curly brackets`]],[[14],[`statistics`,`analytics`,`diagram`,`graph`,`presentation`]],[[14],[`statistics`,`analytics`,`diagram`,`graph`,`presentation`,`trending up`]],[[14],[`statistics`,`analytics`,`diagram`,`graph`,`presentation`]],[[14],[`statistics`,`analytics`,`diagram`,`graph`,`presentation`]],[[14],[`done`,`document`,`todo`,`tick`,`complete`,`task`]],[[14],[`done`,`document`,`todo`,`tick`,`complete`,`task`]],[[14,38],[`history`,`log`,`clock`]],[[14,11],[`script`,`document`,`gist`,`html`,`xml`,`property list`,`plist`]],[[14,11],[`script`,`document`,`html`,`xml`,`property list`,`plist`]],[[14],[`executable`,`settings`,`cog`,`edit`,`gear`]],[[14,11],[`diff`,`patch`]],[[14,11],[`number`,`document`]],[[14,3],[`download`,`import`,`export`]],[[14,26],[`hidden`,`warning`,`alert`,`danger`,`protected`,`exclamation mark`]],[[14],[`music`,`audio`,`sound`,`headphones`]],[[14],[`heart`,`favourite`,`bookmark`,`quick link`]],[[14],[`image`,`graphics`,`photo`,`picture`]],[[14,3],[`document`]],[[14,31],[`key`,`private`,`public`,`security`]],[[14,31],[`lock`,`password`,`security`]],[[14],[`delete`,`remove`,`erase`,`document`]],[[14],[`document`]],[[14,23],[`audio`,`sound`,`noise`,`track`,`digital`,`recording`,`playback`,`piano`,`keyboard`,`keys`,`notes`,`chord`,`midi`,`octave`]],[[14,3],[`document`]],[[14],[`signature`]],[[14],[`edit`]],[[14],[`movie`,`video`,`film`]],[[14],[`add`,`create`,`new`,`document`]],[[14],[`add`,`create`,`new`,`document`]],[[14],[`readme`,`help`,`question`]],[[14],[`scan`,`code`,`qr-code`]],[[14],[`lost`,`document`,`find`,`browser`,`lens`]],[[14],[`lost`,`document`,`find`,`browser`,`lens`]],[[14],[`audio`,`music`,`volume`]],[[14,11],[`cogged`,`gear`,`mechanical`,`machinery`,`configuration`,`controls`,`preferences`,`settings`,`system`,`admin`,`edit`,`executable`]],[[14],[`spreadsheet`,`sheet`,`table`]],[[14,11],[`versions`,`multiple`,`copy`,`documents`,`revisions`,`version control`,`history`]],[[14],[`symlink`,`symbolic`,`link`]],[[14,11],[`terminal`,`bash`,`script`,`executable`]],[[14,37],[`data`,`txt`,`pdf`,`document`]],[[14,37],[`font`,`text`,`typography`,`type`]],[[14,37],[`font`,`text`,`typography`,`type`]],[[14,3],[`upload`,`import`,`export`]],[[1,14],[`person`,`personal information`,`people`,`listing`,`networking`,`document`,`contact`,`cover letter`,`resume`,`cv`,`curriculum vitae`,`application form`]],[[14],[`movie`,`video`,`film`]],[[14],[`audio`,`music`,`volume`]],[[14],[`lost`,`delete`,`remove`,`document`]],[[14],[`lost`,`delete`,`remove`,`document`]],[[14],[`multiple`,`copy`,`documents`]],[[28,23],[`movie`,`video`,`reel`,`camera`,`cinema`,`entertainment`]],[[1,31,22,12],[`2fa`,`authentication`,`biometric`,`identity`,`security`]],[[18,39,41],[`flames`,`smoke`,`foam`,`water`,`spray`,`hose`,`firefighter`,`fireman`,`department`,`brigade`,`station`,`emergency`,`suppress`,`compressed`,`tank`,`cylinder`,`safety`,`equipment`,`amenities`]],[[16,2],[`dish`,`restaurant`,`course`,`meal`,`seafood`,`pet`,`sea`,`marine`]],[[16,2],[`food`,`dish`,`restaurant`,`course`,`meal`,`seafood`,`animal`,`pet`,`sea`,`marine`,`allergy`,`intolerance`,`diet`]],[[16,2],[`dish`,`restaurant`,`course`,`meal`,`seafood`,`pet`,`sea`,`marine`]],[[35,41],[`sea`,`boating`,`angler`,`bait`,`reel`,`tackle`,`marine`,`outdoors`,`fish`,`fishing`,`hook`,`sports`,`travel`]],[[35,41],[`fishing`,`rod`,`hobby`,`equipment`,`reel`]],[[1,34],[`report`,`marker`,`notification`,`warning`,`milestone`,`goal`,`notice`,`signal`,`attention`,`banner`]],[[1,34],[`unflag`,`unmark`,`report`,`marker`,`notification`,`warning`,`milestone`,`goal`,`notice`,`signal`,`attention`,`banner`]],[[11,25],[`report`,`timeline`,`marker`,`pin`]],[[11,25],[`report`,`timeline`,`marker`,`pin`]],[[42,34,17],[`heat`,`burn`,`light`,`glow`,`ignite`,`passion`,`ember`,`fire`,`lit`,`burning`,`spark`,`embers`,`smoke`,`firefighter`,`fireman`,`department`,`brigade`,`station`,`emergency`]],[[24,34,17],[`campfire`,`camping`,`wilderness`,`outdoors`,`lit`,`warmth`,`wood`,`twigs`,`sticks`]],[[28,12],[`torch`,`light`,`beam`,`emergency`,`safety`,`tool`,`bright`]],[[28,12],[`torch`,`light`,`beam`,`emergency`,`safety`,`tool`,`bright`]],[[29,17],[`beaker`,`erlenmeyer`,`lab`,`chemistry`,`experiment`,`test`]],[[29,17],[`beaker`,`erlenmeyer`,`non toxic`,`lab`,`chemistry`,`experiment`,`test`]],[[29,17],[`beaker`,`lab`,`chemistry`,`experiment`,`test`]],[[10,28],[`reflect`,`mirror`,`alignment`,`dashed`]],[[10,28],[`reflect`,`mirror`,`alignment`,`dashed`]],[[24,17,36],[`sustainability`,`nature`,`plant`,`spring`]],[[24,36,30],[`sustainability`,`nature`,`plant`]],[[28],[`camera`,`lens`,`photo`,`dashed`]],[[3,19],[`arrow`,`collapse`,`fold`,`vertical`,`dashed`]],[[3,19],[`arrow`,`collapse`,`fold`,`vertical`,`dashed`]],[[14],[`directory`]],[[14],[`archive`,`zip`,`package`]],[[14],[`done`,`directory`,`todo`,`tick`,`complete`,`task`]],[[14,38],[`history`,`directory`,`clock`]],[[14],[`directory`,`closed`]],[[14,11],[`directory`,`coding`,`develop`,`software`]],[[14],[`directory`,`settings`,`control`,`preferences`,`cog`,`edit`,`gear`]],[[14,11],[`directory`,`root`,`project`,`pinned`,`active`,`current`,`cogged`,`gear`,`mechanical`,`machinery`,`configuration`,`controls`,`preferences`,`settings`,`system`,`admin`,`edit`]],[[14,3],[`directory`,`download`,`import`,`export`]],[[14],[`directory`,`root`,`project`,`git`,`repo`]],[[14],[`directory`,`root`,`project`,`git`,`repo`]],[[14],[`directory`,`heart`,`favourite`,`bookmark`,`quick link`]],[[14,3],[`directory`,`import`,`export`]],[[6,11,10,14],[`projects`,`manage`,`overview`,`board`,`tickets`,`issues`,`roadmap`,`plan`,`intentions`,`productivity`,`work`,`agile`,`code`,`coding`,`directory`,`project`,`root`]],[[14,31],[`directory`,`key`,`private`,`security`,`protected`]],[[14,31],[`directory`,`lock`,`private`,`security`,`protected`]],[[14],[`directory`,`remove`,`delete`]],[[14],[`directory`]],[[14,11],[`directory`,`root`,`project`,`active`,`current`,`pinned`]],[[14,3],[`directory`,`import`,`export`]],[[14],[`directory`,`rename`]],[[14],[`directory`,`add`,`create`,`new`]],[[14,11],[`directory`,`root`,`project`,`git`,`repo`]],[[14],[`directory`,`search`,`find`,`lost`,`browser`,`lens`]],[[14],[`directory`,`search`,`find`,`lost`,`browser`,`lens`]],[[14],[`directory`,`symlink`,`symbolic`,`link`]],[[14,3],[`directory`,`synchronize`,`synchronise`,`refresh`,`reconnect`,`transfer`,`backup`]],[[14],[`directory`,`tree`,`browser`]],[[14,3],[`directory`,`upload`,`import`,`export`]],[[14],[`directory`,`remove`,`delete`]],[[14],[`multiple`,`copy`,`directories`]],[[25],[`steps`,`walking`,`foot`,`feet`,`trail`,`shoe`]],[[40],[`machinery`,`industrial`,`warehouse`,`lifting`,`storage`,`equipment`,`heavy-duty`,`moving`,`vehicle`,`transport`,`logistics`]],[[11],[`document`,`page`,`file`,`layout`,`paper`,`stub`,`formality`,`structure`,`template`,`inputs`,`design`,`components`]],[[20],[`send`,`share`,`email`]],[[10,28],[`logo`,`design`,`tool`]],[[13,1],[`emoji`,`face`,`bad`,`sad`,`emotion`]],[[40,25],[`filling-station`,`gas`,`petrol`,`tank`]],[[19,23,10,28],[`expand`,`zoom`,`preview`,`focus`,`camera`,`lens`,`image`]],[[19],[`filter`,`hopper`]],[[19],[`filter`,`hopper`,`add`,`create`,`new`]],[[19],[`filter`,`hopper`,`remove`,`delete`]],[[19,10,11,28,23],[`carousel`,`pictures`,`images`,`scroll`,`swipe`,`album`,`portfolio`]],[[19,10,11,28,23,14],[`carousel`,`pictures`,`images`,`scroll`,`swipe`,`album`,`portfolio`,`history`,`versions`,`backup`,`time machine`]],[[19,10,11,28,23],[`carousel`,`pictures`,`images`,`album`,`portfolio`,`preview`]],[[19,10,11,28,23],[`carousel`,`pictures`,`images`,`scroll`,`swipe`,`album`,`portfolio`]],[[19,10,11,28,23,14],[`carousel`,`pictures`,`images`,`scroll`,`swipe`,`album`,`portfolio`,`history`,`versions`,`backup`,`time machine`]],[[17,12],[`console`]],[[17,12],[`console`]],[[17,12],[`direction`,`arrow`,`controller`,`navigation`,`button`,`move`,`pointer`,`arrowhead`,`console`,`game`,`gaming`]],[[40,35,29],[`dashboard`,`dial`,`meter`,`speed`,`pressure`,`measure`,`level`]],[[25,39],[`justice`,`law`,`court`,`judgment`,`legal`,`hands`,`penalty`,`decision`,`authority`,`hammer`,`mallet`]],[[17,11,15],[`diamond`,`crystal`,`ruby`,`jewellery`,`price`,`special`,`present`,`gift`,`ring`,`wedding`,`proposal`,`marriage`,`rubygems`]],[[15],[`currency`,`money`,`payment`]],[[17],[`pac-man`,`spooky`]],[[17,1],[`present`,`box`,`birthday`,`party`]],[[11],[`code`,`version control`,`vcs`,`repository`]],[[11],[`code`,`version control`,`vcs`,`repository`,`delete`,`remove`,`-`]],[[11],[`code`,`version control`,`vcs`,`repository`,`add`,`create`,`+`]],[[11,25],[`code`,`version control`,`waypoint`,`stop`,`station`]],[[11,25],[`code`,`version control`,`waypoint`,`stop`,`station`]],[[11],[`code`,`version control`,`diff`]],[[11,3],[`code`,`version control`,`diff`]],[[11],[`code`,`version control`]],[[11],[`code`,`version control`,`commit graph`,`commits`,`gitlens`]],[[11],[`code`,`version control`]],[[11],[`code`,`version control`,`commits`,`diff`,`error`,`conflict`]],[[11],[`code`,`version control`,`open`]],[[11,3],[`code`,`version control`,`open`]],[[11],[`code`,`version control`,`rejected`,`closed`,`cancelled`,`x`]],[[11],[`code`,`version control`,`open`,`plus`,`add`,`+`]],[[11,3],[`code`,`version control`,`open`,`plus`,`add`,`+`]],[[11],[`code`,`version control`,`open`,`draft`,`dashed`]],[[16],[`beverage`,`drink`,`glass`,`water`]],[[0],[`glasses`,`spectacles`]],[[25],[`world`,`browser`,`language`,`translate`]],[[31,11,12],[`vpn`,`private`,`privacy`,`network`,`world`,`browser`,`security`,`encryption`,`protection`,`connection`]],[[25,8,12],[`globe`,`earth`,`planet`,`disable`,`mute`,`off`,`hide`,`avoid`,`world`,`browser`,`language`,`translate`,`internet`,`offline`,`disconnected`,`network`,`connection`,`no connection`,`network failure`,`signal off`]],[[8,12,25],[`globe`,`internet`,`offline`,`disconnected`,`network`,`connection`,`world`,`no connection`,`network failure`,`signal off`]],[[17],[`flag`,`bullseye`]],[[12,17],[`processor`,`cores`,`technology`,`computer`,`chip`,`circuit`,`specs`,`graphics processing unit`,`video card`,`display adapter`,`gddr`,`rendering`,`digital image processing`,`crypto mining`]],[[5],[`school`,`university`,`learn`,`study`,`mortarboard`,`education`,`ceremony`,`academic`,`hat`,`diploma`,`bachlor's`,`master's`,`doctorate`]],[[16],[`fruit`,`wine`,`food`]],[[37,19,10,21],[`table`,`rows`,`columns`,`blocks`,`plot`,`land`,`geometry`,`measure`,`size`,`width`,`height`,`distance`,`surface area`,`square meter`,`acre`,`window`,`skylight`]],[[37,19,21],[`table`,`rows`,`columns`,`blocks`,`plot`,`land`,`geometry`,`measure`,`data`,`size`,`width`,`height`,`distance`,`surface area`,`square meter`,`acre`]],[[37,19,21],[`table`,`rows`,`columns`,`blocks`,`plot`,`land`,`geometry`,`measure`,`data`,`size`,`width`,`height`,`distance`,`surface area`,`square meter`,`acre`]],[[37,19,21],[`table`,`rows`,`columns`,`data`,`blocks`,`plot`,`land`,`geometry`,`measure`,`size`,`width`,`height`,`distance`,`surface area`,`square meter`,`acre`]],[[37,21,19,10],[`table`,`rows`,`columns`,`blocks`,`plot`,`land`,`geometry`,`measure`,`size`,`width`,`height`,`distance`,`surface area`,`square meter`,`acre`,`window`]],[[37,19,10],[`table`,`rows`,`columns`]],[[19],[`grab`,`dots`,`handle`,`move`,`drag`]],[[19],[`grab`,`dots`,`handle`,`move`,`drag`]],[[19],[`grab`,`dots`,`handle`,`move`,`drag`]],[[14],[`cubes`,`packages`,`parts`,`units`,`collection`,`cluster`,`gather`,`dashed`]],[[23],[`acoustic`,`instrument`,`strings`,`riff`,`rock`,`band`,`country`,`concert`,`performance`,`play`,`lead`,`loud`,`music`,`audio`,`sound`,`noise`]],[[16],[`food`,`pork`,`pig`,`meat`,`bone`,`hock`,`knuckle`,`gammon`,`cured`]],[[16],`burger.cheeseburger.meat.beef.patty.bun.fast food.junk food.takeaway.takeout.snack.dish.restaurant.lunch.meal.savory.savoury.cookery.cooking.grilled.barbecue.barbeque.bbq.lettuce.tomato.relish.pickles.onions.ketchup.mustard.mayonnaise`.split(`.`)],[[39,18],[`mallet`,`nails`,`diy`,`toolbox`,`build`,`construction`]],[[9,0],[`wave`,`move`,`mouse`,`grab`]],[[15,1],[`savings`,`banking`,`money`,`finance`,`offers`,`mortgage`,`payment`,`received`,`wage`,`payroll`,`allowance`,`pocket money`,`handout`,`pennies`]],[[34,13,7,35],[`clench`,`strength`,`power`,`unity`,`solidarity`,`rebellion`,`victory`,`triumph`,`support`,`fight`,`combat`,`brawl`]],[[9,10,19],[`hand`]],[[34],[`love`,`like`,`emotion`]],[[13],[`agreement`,`help`,`proposal`,`charity`,`begging`,`terms`]],[[13,23],[`rock`]],[[16,27],[`waiter`,`waitress`,`restaurant`,`table service`,`served`,`dinner`,`dining`,`meal`,`course`,`luxury`]],[[33,40],[`bag`,`baggage`,`carry`,`clutch`,`fashion`,`luggage`,`purse`,`tote`,`travel`]],[[1,34,7,15,31],[`agreement`,`partnership`,`deal`,`business`,`assistance`,`cooperation`,`friendship`,`union`,`terms`]],[[11,12],[`computer`,`server`,`memory`,`data`,`ssd`,`disk`,`hard disk`,`storage`,`hardware`,`backup`,`media`]],[[11,12,3,14],[`computer`,`server`,`memory`,`data`,`ssd`,`disk`,`hard disk`,`save`]],[[11,12,3,14],[`computer`,`server`,`memory`,`data`,`ssd`,`disk`,`hard disk`,`save`]],[[39],[`helmet`,`construction`,`safety`,`savety`]],[[37,34],[`hashtag`,`number`,`pound`]],[[34,1,31],[`incognito`,`disguise`,`costume`,`masked`,`anonymous`,`anonymity`,`privacy`,`private browsing`,`stealth`,`hidden`,`undercover`,`cloak`,`invisible`,`ghost`,`spy`,`agent`,`detective`,`identity`,`cap`,`fedora`,`spectacles`,`shades`,`sunglasses`,`eyewear`]],[[42],[`mist`,`fog`]],[[12,23],[`tv`,`resolution`,`video`,`high definition`,`720p`,`1080p`]],[[12,23,17],[`socket`,`plug`,`slot`,`controller`,`connector`,`interface`,`console`,`signal`,`audio`,`video`,`visual`,`av`,`data`,`input`,`output`]],[[37],[`h1`,`html`,`markup`,`markdown`]],[[37],[`h1`,`html`,`markup`,`markdown`]],[[37],[`h2`,`html`,`markup`,`markdown`]],[[37],[`h3`,`html`,`markup`,`markdown`]],[[37],[`h4`,`html`,`markup`,`markdown`]],[[37],[`h5`,`html`,`markup`,`markdown`]],[[37],[`h6`,`html`,`markup`,`markdown`]],[[23,8,7,12,17],[`music`,`audio`,`sound`,`mute`,`off`]],[[23,8,12,14,17],[`music`,`audio`,`sound`]],[[23,8,12,14,17],[`music`,`audio`,`sound`,`gaming`,`headphones`,`headset`,`call`,`center`,`phone`,`telephone`,`voip`,`video`]],[[22,34,23,13,17,32],[`like`,`love`,`emotion`,`suit`,`playing`,`cards`]],[[13],[`heartbreak`,`sadness`,`emotion`]],[[13,1,31],[`agreement`,`charity`,`help`,`deal`,`terms`,`emotion`,`together`,`handshake`]],[[22,1,23,17,34],[`unlike`,`unfavorite`,`remove`,`damage`,`ui & ux`]],[[34,23],[`unlike`,`dislike`,`hate`,`emotion`]],[[22,1,23,17,34],[`plus`,`like`,`favorite`,`add`,`health`,`support`]],[[22],[`heartbeat`,`pulse`,`health`,`medical`,`blood pressure`,`cardiac`,`systole`,`diastole`]],[[18,12,41],[`heating`,`warmth`,`comfort`,`fire`,`stove`,`electric`,`electronics`,`amenities`]],[[40,41],[`transport`,`flying`,`rotor`,`aviation`,`helipad`,`gear`,`flyer`,`technology`,`helicopter`,`aircraft`,`vehicle`]],[[32,4,11],[`shape`,`node.js`,`logo`]],[[37,10],[`mark`,`text`]],[[3,38],[`time`,`redo`,`undo`,`rewind`,`timeline`,`version`,`time machine`,`backup`,`rotate`,`ccw`]],[[16],[`beer`,`brewery`,`drink`]],[[16],[`beer`,`brewery`,`drink`,`hop free`,`allergy`,`intolerance`,`diet`]],[[22,5,25,41],[`infirmary`,`sanatorium`,`healthcare`,`doctor`,`hospice`,`clinic`,`emergency room`,`ward`,`building`,`medical`,`vet`]],[[5,25,41],[`building`,`hostel`,`motel`,`inn`]],[[38,17],[`timer`,`time`,`sandglass`]],[[5,18,25],[`home`,`living`,`building`,`residence`,`architecture`]],[[18,5,22],[`home sweet home`,`abode`,`building`,`residence`,`healthy living`,`lifestyle`]],[[5,18,36],[`home`,`living`,`building`,`residence`,`architecture`,`autarky`,`energy`]],[[5,22],[`home`,`living`,`medical`,`new`,`addition`,`building`,`residence`,`architecture`]],[[18,5,8],[`home`,`living`,`building`,`wifi`,`connectivity`]],[[16],[`gelato`,`food`,`dessert`,`dish`,`restaurant`,`course`,`meal`]],[[16],[`gelato`,`food`]],[[31,1],[`card`,`badge`,`identity`,`authentication`,`secure`]],[[31,1],[`id-card`,`id-card-lanyard`,`identity`,`employee`,`gate-pass`,`badge`]],[[28,37,23,14],[`picture`,`photo`]],[[28,37,23,14],[`picture`,`photo`,`download`,`save`,`export`]],[[28,23,14],[`remove`,`delete`]],[[28,23,14],[`picture`,`photo`]],[[28,37,23,14],[`picture`,`gif`,`photo`]],[[28,23,14],[`add`,`create`,`picture`]],[[28,37,23,14],[`picture`,`photo`,`upload`,`import`]],[[28,23],[`resize`,`picture`,`sharpen`,`increase`]],[[28,37,23,14],[`picture`,`photo`,`multiple`,`copy`,`gallery`,`album`,`collection`,`slideshow`,`showcase`]],[[3,14],[`save`]],[[1,20],[`email`]],[[15],[`currency`,`money`,`payment`]],[[23],[`unlimited`,`forever`,`loop`,`math`]],[[0,26],[`about`,`advice`,`clue`,`details`,`help`,`hint`,`indicator`,`information`,`knowledge`,`notice`,`status`,`support`,`tooltip`]],[[39],[`access`,`cover`,`tile`,`metal`,`materials`,`screws`]],[[37],[`oblique`,`text`,`format`]],[[3,10],[`arrow`,`right`]],[[3,10],[`arrow`,`left`]],[[15],[`currency`,`money`,`payment`]],[[17,12],[`game`,`console`,`control stick`]],[[6,11,10],[`projects`,`manage`,`overview`,`board`,`tickets`,`issues`,`roadmap`,`plan`,`intentions`,`productivity`,`work`,`agile`,`code`,`coding`]],[[40],[`kayak`,`boat`,`paddle`,`water`,`sport`,`recreation`,`adventure`,`outdoors`,`equipment`,`lake`,`ocean`]],[[31,1],[`password`,`login`,`authentication`,`secure`,`unlock`,`keychain`,`key ring`,`fob`]],[[31,1],[`password`,`login`,`authentication`,`secure`,`unlock`]],[[31,1],[`password`,`login`,`authentication`,`secure`,`unlock`,`car key`]],[[37,12,11],[`layout`,`spell`,`settings`,`mouse`]],[[23,12],[`music`,`audio`,`sound`,`noise`,`notes`,`keys`,`chord`,`octave`,`midi`,`controller`,`instrument`,`electric`,`signal`,`digital`,`studio`,`production`,`producer`,`pianist`,`piano`,`play`,`performance`,`concert`]],[[12,37,11],[`unkeys`,`layout`,`spell`,`settings`,`mouse`]],[[18],[`lighting`,`household`,`home`,`furniture`]],[[18],[`lighting`,`household`,`home`,`furniture`]],[[18],[`lighting`,`household`,`office`,`desk`,`home`,`furniture`]],[[18],[`lighting`,`household`,`floor`,`home`,`furniture`]],[[18],[`lighting`,`household`,`wall`,`home`,`furniture`]],[[18],[`lighting`,`household`,`wall`,`home`,`furniture`]],[[10,39,21,35,17],[`area`,`surface`,`square metres`,`allotment`,`parcel`,`property`,`plane`,`acres`,`measure`,`distance`,`isometric`,`flag`,`golf course`,`hole`]],[[15,25,5],[`bank`,`building`,`capitol`,`finance`,`money`,`museum`,`art gallery`,`hall`,`institute`,`pediment`,`portico`,`columns`,`pillars`,`classical`,`architecture`,`government`,`institution`]],[[37],[`translate`]],[[12],[`computer`,`screen`,`remote`]],[[12],[`computer`,`screen`,`remote`]],[[12,26],[`computer`,`screen`,`remote`,`success`,`done`,`todo`,`tick`,`complete`,`task`]],[[10,9],[`select`,`cursor`]],[[3,10,9],[`select`,`cursor`]],[[13],[`emoji`,`face`,`happy`,`good`,`emotion`]],[[10,19],[`stack`,`pile`,`pages`,`sheets`,`paperwork`,`copies`,`copy`]],[[10,19],[`stack`,`pile`,`pages`,`sheets`,`paperwork`,`copies`,`copy`,`duplicate`,`double`,`shortcuts`]],[[10,19],[`stack`,`layers`,`add`,`new`,`increase`,`create`,`positive`,`copy`,`upgrade`]],[[10,19],[`masonry`,`brick`]],[[10,19],[`app`,`home`,`start`]],[[10,19,28,37],[`todo`,`tasks`,`items`,`pending`,`image`,`photo`]],[[10,19],[`app`,`home`,`start`,`grid`]],[[19],[`window`,`webpage`,`block`,`section`,`grid`,`template`,`structure`]],[[19],[`window`,`webpage`,`block`,`section`]],[[24,36,30],[`sustainability`,`nature`,`energy`,`plant`,`autumn`]],[[16,13,36],[`salad`,`lettuce`,`vegetable`,`chard`,`cabbage`,`bok choy`]],[[7,23],[`pulpit`,`podium`,`stand`]],[[29,39,32],[`concave`,`lens`,`optics`,`light`,`magnification`,`curved`,`focus`,`refraction`,`science`,`physics`,`eyeglass`,`telescope`,`microscope`]],[[29,39,32],[`convex`,`lens`,`optics`,`magnification`,`focus`,`light`,`refraction`,`physics`,`eyeglass`,`telescope`,`microscope`,`curved`,`science`]],[[37,28,23,25,11],[`books`,`reading`,`written`,`authors`,`stories`,`fiction`,`novels`,`information`,`knowledge`,`education`,`high school`,`university`,`college`,`academy`,`learning`,`study`,`research`,`collection`,`vinyl`,`records`,`albums`,`music`,`package`]],[[37,28,23,25,11],[`books`,`reading`,`written`,`authors`,`stories`,`fiction`,`novels`,`information`,`knowledge`,`education`,`high school`,`university`,`college`,`academy`,`learning`,`study`,`research`,`collection`,`vinyl`,`records`,`albums`,`music`,`package`]],[[0,22],[`preserver`,`life belt`,`lifesaver`,`help`,`rescue`,`ship`,`ring`,`raft`,`inflatable`,`wheel`,`donut`]],[[37],[`text`,`font`,`typography`,`alternates`,`alternatives`]],[[28],[`idea`,`bright`,`lights`]],[[28],[`lights`]],[[11,25],[`code`,`version control`,`waypoint`,`stop`,`station`,`last`,`end`]],[[32,21,10],[`line`,`snakes`,`annotate`,`curve`,`doodle`,`stroke`,`pen`,`tool`,`gesture`,`draw`,`wave`,`art`,`road`]],[[37,1],[`chain`,`url`]],[[37,1],[`chain`,`url`]],[[37],[`unchain`,`chain`]],[[37],[`options`]],[[37],[`done`,`check`,`tick`,`complete`,`list`,`to-do`,`bom`]],[[37],[`todo`,`done`,`check`,`tick`,`complete`,`tasks`,`items`,`pending`]],[[37,3],[`options`,`items`,`collapse`,`expand`,`details`,`disclosure`,`show`,`hide`,`toggle`,`accordion`,`more`,`less`,`fold`,`unfold`,`vertical`]],[[37,3],[`options`,`items`,`collapse`,`expand`,`details`,`disclosure`,`show`,`hide`,`toggle`,`accordion`,`more`,`less`,`fold`,`unfold`,`vertical`]],[[37],[`items`,`collapse`,`expand`,`details`,`disclosure`,`show`,`hide`,`toggle`,`accordion`,`more`,`less`,`fold`,`unfold`]],[[23,37],[`queue`,`bottom`,`end`,`playlist`]],[[37],[`options`]],[[37,19],[`filter`,`plus`,`options`,`add`]],[[37,11],[`text`,`tab`]],[[37,11],[`text`,`tab`]],[[23,37],[`playlist`,`remove`,`song`,`subtract`,`delete`,`unqueue`]],[[23],[`playlist`,`queue`,`music`,`audio`,`playback`]],[[37],[`number`,`order`,`queue`]],[[23,37],[`playlist`,`add`,`song`,`track`,`new`]],[[23,37],[`reset`,`refresh`,`reload`,`playlist`,`replay`]],[[23,37],[`queue`,`top`,`start`,`next`,`playlist`]],[[37],[`todo`,`done`,`check`,`tick`,`complete`,`tasks`,`items`,`pending`]],[[14,37,19],[`tree`,`browser`]],[[23],[`playlist`,`video`,`playback`]],[[23,37],[`playlist`,`subtract`,`remove`,`delete`,`unqueue`]],[[9,23,19,10],[`loading`,`wait`,`busy`,`progress`,`spinner`,`spinning`,`throbber`]],[[9,23,19],[`loading`,`wait`,`busy`,`progress`,`spinner`,`spinning`,`throbber`,`circle`]],[[9,10],[`loading`,`wait`,`busy`,`progress`,`throbber`,`spinner`,`spinning`,`beach ball`,`frozen`,`freeze`]],[[25],[`map`,`gps`,`location`,`cross`]],[[25],[`map`,`gps`,`location`,`cross`]],[[25],[`map`,`gps`,`location`,`cross`]],[[31],[`security`,`password`,`secure`,`admin`]],[[31],[`security`,`password`,`secure`,`admin`]],[[31],[`security`]],[[31],[`security`]],[[3,1],[`sign in`,`arrow`,`enter`,`auth`]],[[3,1],[`sign out`,`arrow`,`exit`,`auth`]],[[37],[`options`,`list`,`menu`,`order`,`queue`,`tasks`,`logs`]],[[16],[`lolly`,`candy`,`sugar`,`food`,`sweet`,`dessert`,`spiral`]],[[41,40],[`baggage`,`luggage`,`travel`,`suitcase`]],[[10],[`horseshoe`,`lock`,`science`,`snap`]],[[37,1,20],[`email`,`message`,`letter`,`unread`]],[[20],[`email`,`message`,`letter`,`subscribe`,`delivered`,`success`,`read`,`done`,`todo`,`tick`,`complete`,`task`]],[[20],[`email`,`message`,`letter`,`remove`,`delete`]],[[20],[`email`,`message`,`letter`,`read`]],[[20],[`email`,`message`,`letter`,`add`,`create`,`new`,`compose`]],[[20],[`email`,`message`,`letter`,`delivery`,`undelivered`]],[[20],[`email`,`message`,`letter`,`search`,`lens`]],[[20],[`email`,`message`,`letter`,`delivery error`,`exclamation mark`]],[[20],[`email`,`message`,`letter`,`remove`,`delete`]],[[20],[`emails`,`messages`,`letters`,`mailing list`,`newsletter`]],[[20],[`emails`,`messages`,`letters`,`multiple`,`mailing list`,`newsletter`,`copy`]],[[37,25],[`location`,`navigation`,`travel`]],[[25,41],[`location`,`navigation`,`travel`,`drop`,`delete`,`remove`,`erase`]],[[25,41,1],[`location`,`waypoint`,`marker`,`drop`]],[[25,41,1],[`location`,`waypoint`,`marker`,`drop`,`done`,`tick`,`complete`,`task`,`added`]],[[25,41,1],[`location`,`waypoint`,`marker`,`drop`,`done`,`tick`,`complete`,`task`,`added`]],[[25,41,1],[`location`,`waypoint`,`marker`,`drop`,`home`,`living`,`building`,`residence`,`architecture`,`address`,`poi`,`real estate`,`property`,`navigation`,`destination`,`geolocation`,`place`,`landmark`]],[[25,41,1],[`location`,`waypoint`,`marker`,`drop`,`delete`,`remove`,`erase`]],[[25,41,1],[`location`,`waypoint`,`marker`,`drop`,`delete`,`remove`,`erase`]],[[25,41],[`location`,`waypoint`,`marker`,`remove`]],[[25,41,1],[`location`,`waypoint`,`marker`,`drop`,`edit`]],[[25,41,1],[`location`,`waypoint`,`marker`,`drop`,`add`,`create`,`new`]],[[25,41,1],[`location`,`waypoint`,`marker`,`drop`,`add`,`create`,`new`]],[[25,41,1],[`location`,`waypoint`,`marker`,`drop`,`delete`,`remove`,`erase`]],[[25,41,1],[`location`,`waypoint`,`marker`,`drop`,`delete`,`remove`,`erase`]],[[25,41,1],[`location`,`waypoint`,`marker`,`drop`]],[[25],[`location`,`navigation`,`travel`,`new`,`add`,`create`]],[[22],[`gender`,`sex`,`male`,`masculine`,`man`,`boy`]],[[22],[`gender`,`androgyne`,`transgender`]],[[16],[`cocktail`,`alcohol`,`beverage`,`bar`,`drink`,`glass`]],[[19,10],[`fullscreen`,`expand`,`dashed`]],[[3,19,10],[`fullscreen`,`arrows`,`expand`]],[[35,17],[`prize`,`sports`,`winner`,`trophy`,`award`,`achievement`]],[[23,26],[`advertisement`,`announcement`,`attention`,`alert`,`loudspeaker`,`megaphone`,`notification`]],[[23,26],[`advertisement`,`announcement`,`attention`,`alert`,`loudspeaker`,`megaphone`,`notification`,`disable`,`silent`]],[[13],[`emoji`,`face`,`neutral`,`emotion`]],[[12,17],[`ram`,`random access`,`technology`,`computer`,`chip`,`circuit`,`specs`,`capacity`,`gigabytes`,`gb`]],[[19,1],[`bars`,`navigation`,`hamburger`,`options`]],[[11,3],[`combine`,`join`,`unite`]],[[34],[`comment`,`chat`,`conversation`,`dialog`,`feedback`,`speech bubble`]],[[34,1],[`comment`,`chat`,`conversation`,`dialog`,`feedback`,`speech bubble`,`moderate`,`check`,`done`,`todo`,`complete`]],[[11,34],[`comment`,`chat`,`conversation`,`dialog`,`feedback`,`speech bubble`,`code review`,`coding`]],[[34],[`comment`,`chat`,`conversation`,`dialog`,`feedback`,`speech bubble`,`draft`]],[[34],[`comment`,`chat`,`conversation`,`dialog`,`feedback`,`positive`,`like`,`love`,`interest`,`valentine`,`dating`,`date`,`speech bubble`]],[[34],[`comment`,`chat`,`conversation`,`dialog`,`feedback`,`speech bubble`,`typing`,`writing`,`responding`,`ellipsis`,`etc`,`et cetera`,`...`,`…`]],[[34],[`comment`,`chat`,`conversation`,`dialog`,`feedback`,`speech bubble`,`clear`,`close`,`delete`,`remove`,`cancel`,`silence`,`mute`,`moderate`]],[[34],[`comment`,`chat`,`conversation`,`dialog`,`feedback`,`speech bubble`,`add`]],[[34],[`comment`,`chat`,`conversation`,`dialog`,`feedback`,`speech bubble`,`help`]],[[34],[`comment`,`chat`,`conversation`,`dialog`,`feedback`,`speech bubble`,`reply`,`response`]],[[34,26],[`comment`,`chat`,`conversation`,`dialog`,`feedback`,`speech bubble`,`report`,`abuse`,`offense`,`alert`,`danger`,`caution`,`protected`,`exclamation mark`]],[[1,34],[`comment`,`chat`,`conversation`,`dialog`,`feedback`,`speech bubble`,`clear`,`close`,`delete`,`remove`,`cancel`,`silence`,`mute`,`moderate`]],[[34],[`comment`,`chat`,`conversation`,`dialog`,`feedback`,`speech bubble`]],[[34,1],[`comment`,`chat`,`conversation`,`dialog`,`feedback`,`speech bubble`,`moderate`,`check`,`done`,`todo`,`complete`]],[[11,34],[`comment`,`chat`,`conversation`,`dialog`,`feedback`,`speech bubble`,`code review`,`coding`]],[[34],[`comment`,`chat`,`conversation`,`dialog`,`feedback`,`speech bubble`,`draft`]],[[11,14,34],[`comment`,`chat`,`conversation`,`dialog`,`feedback`,`speech bubble`,`add`,`patch`,`difference`,`plus`,`minus`,`plus-minus`,`math`,`code review`,`coding`,`version control`,`git`]],[[34,26],[`unread`,`unresolved`,`comment`,`chat`,`conversation`,`dialog`,`feedback`,`speech bubble`]],[[34],[`comment`,`chat`,`conversation`,`dialog`,`feedback`,`positive`,`like`,`love`,`interest`,`valentine`,`dating`,`date`,`speech bubble`]],[[34],[`comment`,`chat`,`conversation`,`dialog`,`feedback`,`speech bubble`,`secure`,`encrypted`]],[[34],[`comment`,`chat`,`conversation`,`dialog`,`feedback`,`speech bubble`,`typing`,`writing`,`responding`,`ellipsis`,`etc`,`et cetera`,`...`,`…`]],[[34],[`comment`,`chat`,`conversation`,`dialog`,`feedback`,`speech bubble`,`clear`,`close`,`delete`,`remove`,`cancel`,`silence`,`mute`,`moderate`]],[[34],[`comment`,`chat`,`conversation`,`dialog`,`feedback`,`speech bubble`,`add`]],[[34,37],[`comment`,`chat`,`conversation`,`dialog`,`feedback`,`speech bubble`,`blockquote`,`quotation`,`indent`,`reply`,`response`]],[[34],[`comment`,`chat`,`conversation`,`dialog`,`feedback`,`speech bubble`,`reply`,`response`]],[[34],[`comment`,`chat`,`conversation`,`dialog`,`feedback`,`speech bubble`,`network`,`forward`]],[[34],[`comment`,`chat`,`conversation`,`dialog`,`feedback`,`speech bubble`]],[[34,26],[`comment`,`chat`,`conversation`,`dialog`,`feedback`,`speech bubble`,`report`,`abuse`,`offense`,`alert`,`danger`,`caution`,`protected`,`exclamation mark`]],[[34],[`comment`,`chat`,`conversation`,`dialog`,`feedback`,`speech bubble`,`clear`,`close`,`delete`,`remove`,`cancel`,`silence`,`mute`,`moderate`]],[[34],[`comment`,`chat`,`conversation`,`dialog`,`feedback`,`speech bubbles`,`copy`,`multiple`,`discussion`,`interview`,`debate`]],[[23,38],[`metronome`,`tempo`,`rhythm`,`beat`,`bpm`,`music`,`audio`,`sound`,`practice`,`timing`,`timer`,`time`,`pulse`,`sync`,`cadence`,`control`,`playback`,`studio`,`tool`]],[[12,7,8,23],[`record`,`sound`,`listen`,`radio`,`podcast`,`microphone`]],[[12,7,8,23],[`record`,`sound`,`mute`,`microphone`]],[[12,23],[`lyrics`,`voice`,`listen`,`sound`,`music`,`radio`,`podcast`,`karaoke`,`singing`,`microphone`]],[[12],[`processor`,`cores`,`technology`,`computer`,`chip`,`integrated circuit`,`memory`,`ram`,`specs`,`gpu`,`gigahertz`,`ghz`]],[[29,22],[`medical`,`education`,`science`,`imaging`,`research`]],[[16,18],[`oven`,`cooker`,`toaster oven`,`bake`]],[[3,25,11,17],[`signpost`,`direction`,`right`,`east`,`forward`,`version control`,`waypoint`]],[[16],[`lactose`,`bottle`,`beverage`,`drink`,`water`,`diet`]],[[16],[`lactose free`,`bottle`,`beverage`,`drink`,`water`,`allergy`,`intolerance`,`diet`]],[[19,10],[`exit fullscreen`,`close`,`shrink`]],[[3,19,10],[`exit fullscreen`,`arrows`,`close`,`shrink`]],[[21,11,37,39],[`subtract`,`remove`,`decrease`,`decrement`,`reduce`,`negative`,`calculate`,`line`,`divider`,`separator`,`horizontal rule`,`hr`,`html`,`markup`,`markdown`,`---`,`toolbar`,`operator`,`code`,`coding`,`minimum`,`downgrade`]],[[29,18,39],[`reflection`,`optics`,`glass`,`surface`,`image`,`physics`,`science`,`bathroom`,`decor`,`cosmetic`,`shiny`,`periscope`,`vanity`]],[[29,18,39],[`reflection`,`optics`,`glass`,`surface`,`image`,`physics`,`science`,`bathroom`,`vanity`,`makeup`,`decor`,`cosmetic`,`shiny`,`periscope`]],[[8,12],[`tv`,`screen`,`display`,`virtual machine`,`vm`]],[[8,12],[`tv`,`screen`,`display`,`desktop`,`running`,`active`,`virtual machine`,`vm`]],[[8,12,11],[`virtual machine`,`virtual desktop`,`vm`,`vdi`,`computing`,`remote work`,`monitoring`,`infrastructure`,`software as a service`,`saas`,`workstation`,`environment`,`tv`,`screen`,`display`]],[[8,12],[`tv`,`screen`,`display`,`virtual machine`,`vm`,`executable`,`settings`,`cog`,`edit`,`gear`,`configuration`,`preferences`,`system`,`control panel`,`network`,`computing`]],[[8,12],[`tv`,`screen`,`display`,`desktop`,`running`,`active`,`virtual machine`,`vm`]],[[8,12],[`tv`,`screen`,`display`,`desktop`,`download`]],[[8,12],[`share`]],[[8,12,23],[`tv`,`screen`,`display`,`desktop`,`video`,`movie`,`film`,`suspend`,`hibernate`,`boot`,`virtual machine`,`vm`]],[[8,12,23],[`tv`,`screen`,`display`,`desktop`,`video`,`movie`,`film`,`running`,`start`,`boot`,`virtual machine`,`vm`]],[[8,12],[`smartphone`,`phone`,`cellphone`,`device`,`mobile`,`desktop`,`monitor`,`responsive`,`screens`]],[[8,12],[`devices`,`connect`,`cast`]],[[8,12,23],[`tv`,`screen`,`display`,`desktop`,`video`,`movie`,`film`,`stop`,`shutdown`,`virtual machine`,`vm`]],[[8,12],[`tv`,`screen`,`display`,`upload`,`connect`,`remote`,`screen share`]],[[8,12],[`tv`,`screen`,`display`,`desktop`,`virtual machine`,`vm`,`close`,`stop`,`suspend`,`remove`,`delete`]],[[0],[`dark`,`night`]],[[0,42],[`dark`,`night`,`star`]],[[40],[`moto`,`motorcycle`,`transport`,`vehicle`,`drive`,`ride`,`trip`,`race`,`racing`,`journey`,`delivery`]],[[24,17],[`climb`,`hike`,`rock`]],[[24],[`alpine`,`climb`,`snow`]],[[12],[`device`,`scroll`,`click`]],[[12],[`device`,`scroll`,`click`]],[[12],[`device`,`scroll`,`click`,`disabled`]],[[3,9],[`click`,`select`]],[[3,9],[`click`,`select`]],[[3,9],[`pointer`,`mouse`,`cursor`,`off`,`disable`,`arrow`,`navigation`,`selection`,`select`,`click`,`no-click`,`interaction`]],[[3,9],[`wait`,`busy`,`loading`,`blocked`,`frozen`,`freeze`]],[[3,9],[`click`,`select`]],[[12],[`device`,`scroll`,`click`]],[[3,9],[`arrows`]],[[10],[`arrows`,`axis`,`gizmo`,`coordinates`,`transform`,`translate`]],[[3,9],[`double`,`arrow`]],[[3,9],[`double`,`arrow`]],[[3],[`arrow`,`direction`,`downwards`,`south`]],[[3],[`arrow`,`direction`]],[[3],[`arrow`,`direction`]],[[3,9],[`double`,`arrow`]],[[3],[`arrow`,`direction`,`back`,`west`]],[[3],[`arrow`,`direction`,`trend flat`,`east`]],[[3],[`arrow`,`direction`,`upwards`,`north`]],[[3],[`arrow`,`direction`]],[[3],[`arrow`,`direction`]],[[3,9],[`double`,`arrow`]],[[23,14],[`note`,`quaver`,`eighth note`]],[[23,14],[`quaver`,`eighth note`,`note`]],[[23,14],[`crotchet`,`minim`,`quarter note`,`half note`,`note`]],[[23,14],[`semiquaver`,`sixteenth note`,`note`]],[[25],[`location`,`travel`]],[[25],[`location`,`travel`]],[[25],[`location`,`travel`]],[[25],[`location`,`travel`]],[[11],[`tree`]],[[23,7],[`news`,`feed`,`home`,`magazine`,`article`,`headline`]],[[7,15,12],[`contactless`,`payment`,`near-field communication`]],[[22],[`gender`,`nonbinary`,`enby`]],[[37,7,34,10],`notepad.notes.stationery.sketchbook.moleskine.closure.strap.band.elastic.organizer.organiser.planner.diary.journal.writing.written.writer.reading.high school.university.college.academy.student.study.homework.research`.split(`.`)],[[37,34],[`pencil`,`notepad`,`notes`,`noted`,`stationery`,`sketchbook`,`organizer`,`organiser`,`planner`,`diary`,`journal`,`writing`,`write`,`written`,`reading`,`high school`,`university`,`college`,`academy`,`student`,`study`,`research`,`homework`,`eraser`,`rubber`]],[[1,7,34],[`notepad`,`notes`,`people`,`family`,`friends`,`acquaintances`,`contacts`,`details`,`addresses`,`phone numbers`,`directory`,`listing`,`networking`,`alphabetical`,`a-z`,`organizer`,`organiser`,`planner`,`diary`,`stationery`]],[[37,34],[`notepad`,`notes`,`pages`,`paper`,`stationery`,`sketchbook`,`organizer`,`organiser`,`planner`,`diary`,`journal`,`writing`,`write`,`written`,`reading`,`high school`,`university`,`college`,`academy`,`student`,`study`,`research`,`homework`,`lines`,`opened`]],[[37,34],[`notebook`,`notes`,`pages`,`paper`,`stationery`,`sketchbook`,`organizer`,`organiser`,`planner`,`diary`,`journal`,`writing`,`write`,`written`,`reading`,`high school`,`university`,`college`,`academy`,`student`,`study`,`homework`,`research`,`lines`,`opened`]],[[37,34],[`notebook`,`notes`,`pages`,`paper`,`stationery`,`diary`,`journal`,`writing`,`write`,`written`,`draft`,`template`,`lines`]],[[16],[`hazelnut`,`acorn`,`food`,`diet`]],[[16],[`hazelnut`,`acorn`,`food`,`allergy`,`intolerance`,`diet`]],[[32],[`stop`,`shape`]],[[26,32],[`warning`,`alert`,`danger`,`exclamation mark`]],[[40],[`stop`,`forbidden`,`subtract`,`remove`,`decrease`,`reduce`,`-`,`traffic`,`halt`,`restricted`]],[[23,32],[`music`,`audio`,`stop`]],[[21,26],[`delete`,`stop`,`alert`,`warning`,`times`,`clear`,`math`]],[[21,11,37,29],[`greek`,`symbol`,`mathematics`,`education`,`physics`,`engineering`,`ohms`,`electrical resistance`,`angular frequency`,`dynamical systems`,`astronomy`,`constellations`,`philosophy`]],[[11],[`keyboard`,`key`,`mac`,`alt`,`button`]],[[29],[`planet`,`space`,`physics`,`satellites`,`moons`]],[[2,10],[`paper`,`bird`]],[[14,11],[`box`,`container`,`storage`,`sealed`,`delivery`,`undelivered`,`unopened`,`packed`,`archive`,`zip`,`module`]],[[14,11],[`box`,`container`,`storage`,`sealed`,`packed`,`unopened`,`undelivered`,`archive`,`zip`]],[[11],[`confirm`,`verified`,`done`,`todo`,`tick`,`complete`,`task`,`delivered`]],[[11],[`delete`,`remove`]],[[14,11],[`box`,`container`,`storage`,`unpack`,`unarchive`,`unzip`,`opened`,`delivered`]],[[11],[`new`,`add`,`create`]],[[14,11],[`find`,`product process`,`lens`]],[[11],[`delete`,`remove`]],[[10,39],[`fill`,`paint`,`bucket`,`color`,`colour`]],[[37,10,18,39],[`brush`,`color`,`colour`,`decoration`,`diy`]],[[37,10,28,18,39],[`brush`,`paintbrush`,`design`,`color`,`colour`,`decoration`,`diy`]],[[37,10,28,18,39],[`brush`,`paintbrush`,`design`,`color`,`colour`,`decoration`,`diy`]],[[37,10,28],[`colors`,`colours`,`theme`,`scheme`,`paint`,`watercolor`,`watercolour`,`artist`]],[[2],[`animal`,`wildlife`,`bear`,`zoo`,`bamboo`]],[[19],[`drawer`,`dock`]],[[19,3],[`drawer`,`dock`,`hide`,`chevron`,`down`]],[[19],[`drawer`,`dock`,`show`,`reveal`,`padding`,`margin`,`guide`,`layout`,`bleed`]],[[19,3],[`drawer`,`dock`,`show`,`reveal`,`chevron`,`up`]],[[19],[`primary`,`drawer`]],[[19,3],[`primary`,`drawer`,`hide`,`chevron`,`<`]],[[19],[`sidebar`,`primary`,`drawer`,`show`,`reveal`,`padding`,`margin`,`guide`,`layout`,`bleed`]],[[19,3],[`primary`,`drawer`,`show`,`reveal`,`chevron`,`right`,`>`]],[[19],[`sidebar`,`primary`,`drawer`,`show`,`reveal`,`padding`,`margin`,`guide`,`layout`,`vertical`,`bleed`]],[[19],[`sidebar`,`secondary`,`drawer`]],[[19,3],[`sidebar`,`secondary`,`drawer`,`hide`,`chevron`,`>`]],[[19],[`sidebar`,`secondary`,`drawer`,`show`,`reveal`,`padding`,`margin`,`guide`,`layout`,`bleed`]],[[19,3],[`sidebar`,`secondary`,`drawer`,`show`,`reveal`,`chevron`,`left`,`<`]],[[19,10,11],[`drawer`,`browser`,`webpage`]],[[19],[`sidebar`,`primary`,`drawer`,`show`,`reveal`,`padding`,`margin`,`guide`,`layout`,`horizontal`,`bleed`]],[[19,3],[`menu bar`,`drawer`,`hide`,`chevron`,`up`]],[[19],[`menu bar`,`drawer`,`show`,`reveal`,`padding`,`margin`,`guide`,`layout`,`bleed`]],[[19,3],[`menu bar`,`drawer`,`show`,`reveal`,`chevron`,`down`]],[[19],[`drawers`,`sidebar`,`primary`]],[[19],[`drawers`,`sidebar`,`secondary`]],[[19,10,11],[`menu bar`,`sidebar`,`primary`,`drawers`,`window`,`webpage`,`projects`,`overview`]],[[37,10,14,20],[`attachment`,`file`]],[[11,14,21],[`code`,`token`,`parenthesis`,`parens`,`brackets`,`parameters`,`arguments`,`args`,`input`,`call`,`math`,`formula`,`function`,`(`,`)`]],[[40,25],[`driving`,`car park`,`pay`,`sidewalk`,`pavement`]],[[13],[`emoji`,`congratulations`,`celebration`,`party`,`tada`,`🎉`,`🎊`,`excitement`,`exciting`,`excites`,`confetti`]],[[23],[`music`,`stop`]],[[2],[`pets`,`vets`,`veterinarian`,`domesticated`,`cat`,`dog`,`bear`]],[[12,17],[`computer`,`chassis`]],[[37,10,39],[`pencil`,`change`,`create`,`draw`,`writer`,`writing`,`biro`,`ink`,`marker`,`felt tip`,`stationery`,`artist`]],[[37,10,39],[`pencil`,`change`,`create`,`draw`,`writer`,`writing`,`biro`,`ink`,`marker`,`felt tip`,`stationery`,`artist`]],[[37,10,39],[`disabled`,`inactive`,`non-editable`,`locked`,`read-only`,`unmodifiable`,`frozen`,`restricted`,`pencil`,`change`,`create`,`draw`,`writer`,`writing`,`biro`,`ink`,`marker`,`felt tip`,`stationery`,`artist`]],[[37,10,9],[`vector`,`drawing`,`path`]],[[10,9,39,37],[`rubber`,`edit`,`create`,`draw`,`sketch`,`draft`,`writer`,`writing`,`stationery`,`artist`]],[[37,10,39],[`pencil`,`change`,`create`,`draw`,`sketch`,`draft`,`writer`,`writing`,`biro`,`ink`,`marker`,`felt tip`,`stationery`,`artist`]],[[10,9,39,37],[`disabled`,`inactive`,`non-editable`,`locked`,`read-only`,`unmodifiable`,`frozen`,`restricted`,`rubber`,`edit`,`create`,`draw`,`sketch`,`draft`,`writer`,`writing`,`stationery`,`artist`]],[[39,10,19,37],`edit.create.draw.sketch.draft.writer.writing.stationery.artist.measurements.centimeters.cm.millimeters.mm.metre.foot.feet.inches.units.size.length.width.height.dimensions.depth.breadth.extent`.split(`.`)],[[32],[`shape`]],[[21,11,15,33],[`percentage`,`modulo`,`modulus`,`remainder`,`%`,`sale`,`discount`,`offer`,`marketing`]],[[0,27],[`people`,`human`,`accessibility`,`stick figure`]],[[15],[`currency`,`peso`,`money`,`php`]],[[37,8,12,7],[`call`]],[[8,12,7],[`ring`]],[[3,8,12,7],[`call`]],[[3,8,12,7],[`call`]],[[8,12,7],[`call`]],[[8,12,7],[`call`,`mute`]],[[3,8,12,7],[`call`]],[[11,21],[`constant`,`code`,`coding`,`programming`,`symbol`,`trigonometry`,`geometry`,`formula`]],[[23,12],[`music`,`audio`,`sound`,`noise`,`notes`,`chord`,`keys`,`octave`,`acoustic`,`instrument`,`play`,`pianist`,`performance`,`concert`]],[[39,17],[`mining`,`mine`,`land worker`,`extraction`,`labor`,`construction`,`progress`,`advancement`,`crafting`,`building`,`creation`]],[[23],[`display`,`play`,`video`,`pop out`,`always on top`,`window`,`inset`,`multitask`]],[[23],[`display`,`play`,`video`,`pop out`,`always on top`,`window`,`inset`,`multitask`]],[[15],[`money`,`savings`]],[[37],[`paragraph`,`mark`,`paraph`,`blind`,`typography`,`type`,`text`,`prose`,`symbol`]],[[37],[`direction`,`paragraph`,`mark`,`paraph`,`blind`,`typography`,`type`,`text`,`prose`,`symbol`]],[[37],[`direction`,`paragraph`,`mark`,`paraph`,`blind`,`typography`,`type`,`text`,`prose`,`symbol`]],[[22],[`medicine`,`medication`,`drug`,`prescription`,`tablet`,`pharmacy`]],[[22],[`medicine`,`medication`,`prescription`,`drug`,`supplement`,`vitamin`,`capsule`,`jar`,`container`,`healthcare`,`pharmaceutical`,`tablet`]],[[25,1],[`save`,`map`,`lock`,`fix`]],[[25],[`unpin`,`map`,`unlock`,`unfix`,`unsave`,`remove`]],[[37,10,29],[`eye dropper`,`color picker`,`lab`,`chemistry`]],[[16],[`pie`,`quiche`,`food`]],[[40,41,25],[`plane`,`trip`,`airplane`]],[[40,41],[`arrival`,`plane`,`trip`,`airplane`,`landing`]],[[40,41],[`departure`,`plane`,`trip`,`airplane`,`takeoff`]],[[3,23],[`music`,`audio`,`video`,`start`,`run`]],[[12,11],[`electricity`,`energy`,`electronics`,`socket`,`outlet`,`power`,`voltage`,`current`,`charger`]],[[12,11],[`electricity`,`energy`,`socket`,`outlet`]],[[12],[`electricity`,`energy`,`electronics`,`charge`,`charging`,`battery`,`connect`]],[[21,39,11,37,9,17],[`add`,`new`,`increase`,`increment`,`positive`,`calculate`,`toolbar`,`crosshair`,`aim`,`target`,`scope`,`sight`,`reticule`,`maximum`,`upgrade`,`extra`,`+`]],[[39],[`swiss army knife`,`penknife`,`multi-tool`,`multitask`,`blade`,`cutter`,`gadget`,`corkscrew`]],[[23,34],[`audio`,`music`,`mic`,`talk`,`voice`,`subscribe`,`subscription`,`stream`]],[[9],[`mouse`]],[[9],[`mouse`]],[[16,23],[`cinema`,`movies`,`films`,`salted`,`sweet`,`sugar`,`candy`,`snack`]],[[16],[`ice lolly`,`ice cream`,`sweet`,`food`]],[[15],[`currency`,`money`,`payment`]],[[8],[`on`,`off`,`device`,`switch`,`toggle`,`binary`,`boolean`,`reboot`,`restart`,`button`,`keyboard`,`troubleshoot`]],[[8],[`on`,`off`,`device`,`switch`]],[[23,28,12,7,10],[`screen`,`whiteboard`,`marker pens`,`markers`,`blackboard`,`chalk`,`easel`,`school`,`learning`,`lesson`,`office`,`meeting`,`project`,`planning`]],[[12],[`fax`,`office`,`device`]],[[12],[`fax`,`office`,`device`,`success`,`printed`]],[[12],[`fax`,`office`,`device`,`cross`,`cancel`,`remove`,`error`]],[[23,28,12,7],[`cinema`,`film`,`movie`,`home video`,`presentation`,`slideshow`,`office`,`meeting`,`project`,`planning`]],[[19,10,28,12],[`screens`,`sizes`,`rotate`,`rotation`,`adjust`,`aspect ratio`,`16:9`,`widescreen`,`4:3`,`resolution`,`responsive`,`mobile`,`desktop`,`dimensions`,`monitor`,`orientation`,`portrait`,`landscape`]],[[11,17],[`component`,`module`,`part`,`piece`]],[[32,21,41],[`prism`,`triangle`,`triangular`,`hierarchy`,`structure`,`geometry`,`ancient`,`egyptian`,`landmark`,`tourism`]],[[11,34],[`barcode`,`scan`,`link`,`url`,`information`,`digital`]],[[37],[`quotation`]],[[2],[`animal`,`rodent`,`pet`,`pest`,`bunny`,`hare`,`fast`,`speed`,`hop`]],[[25,31,7],[`scan`,`sonar`,`detect`,`find`,`locate`]],[[29],[`radioactive`,`nuclear`,`fallout`,`waste`,`atomic`,`physics`,`particle`,`element`,`molecule`]],[[11,21],[`calculate`,`formula`,`math`,`operator`,`root`,`square`,`symbol`]],[[12,23,34],[`signal`,`broadcast`,`connectivity`,`live`,`frequency`]],[[12],[`device`,`music`,`connect`]],[[12,23,34],[`signal`,`broadcast`,`connectivity`,`live`,`frequency`]],[[32,21,10,39],[`shape`,`circle`,`geometry`,`trigonometry`,`radii`,`calculate`,`measure`,`size`]],[[42],[`colors`,`colours`,`spectrum`,`light`,`prism`,`arc`,`clear`,`sunshine`]],[[2],[`mouse`,`mice`,`gerbil`,`rodent`,`pet`,`pest`,`plague`,`disease`]],[[19,10,28],[`screens`,`sizes`,`rotate`,`rotation`,`adjust`,`aspect ratio`,`proportions`,`16:9`,`widescreen`,`4:3`,`resolution`,`responsive`,`mobile`,`desktop`,`dimensions`,`monitor`,`orientation`,`portrait`,`landscape`]],[[15,41],[`bill`,`voucher`,`slip`,`check`,`counterfoil`,`currency`,`dollar`,`usd`,`$`]],[[15,41],[`bill`,`voucher`,`slip`,`check`,`counterfoil`,`currency`,`cents`,`dollar`,`usd`,`$`,`¢`]],[[15,41],[`bill`,`voucher`,`slip`,`check`,`counterfoil`,`currency`,`€`]],[[15,41],[`bill`,`voucher`,`slip`,`check`,`counterfoil`,`currency`,`inr`,`₹`]],[[15,41],[`bill`,`voucher`,`slip`,`check`,`counterfoil`,`currency`,`jpy`,`¥`]],[[15,41],[`bill`,`voucher`,`slip`,`check`,`counterfoil`,`british`,`currency`,`gbp`,`£`]],[[15,41],[`bill`,`voucher`,`slip`,`check`,`counterfoil`,`currency`,`rub`,`₽`]],[[15,41],[`bill`,`voucher`,`slip`,`check`,`counterfoil`,`currency`,`chf`,`₣`]],[[15,41],[`bill`,`voucher`,`slip`,`check`,`counterfoil`,`details`,`small print`,`terms`,`conditions`,`contract`]],[[15,41],[`bill`,`voucher`,`slip`,`check`,`counterfoil`,`currency`,`try`,`₺`]],[[11,37],[`compose`,`keyboard`,`key`,`button`]],[[37,11],`login,password,authenticate,2fa,field,fill,ellipsis,et cetera,etc,loader,loading,progress,pending,throbber,menu,options,operator,code,spread,rest,more,further,extra,overflow,dots,…,...`.split(`,`)],[[12,17,23,8],[`vr`,`virtual`,`augmented`,`reality`,`headset`,`goggles`]],[[32,10],[`rectangle`,`aspect ratio`,`16:9`,`horizontal`,`shape`]],[[32,10],[`rectangle`,`aspect ratio`,`9:16`,`vertical`,`shape`]],[[36],[`sustainability`,`salvage`,`arrows`]],[[37,3],[`undo`,`rerun`,`history`]],[[37,3],[`undo`,`rerun`,`history`]],[[37,3],[`redo`,`history`,`step`,`over`,`forward`]],[[3],[`arrows`,`rotate`,`reload`,`rerun`,`synchronise`,`synchronize`,`circular`,`cycle`]],[[3,11],[`arrows`,`rotate`,`reload`,`synchronise`,`synchronize`,`circular`,`cycle`,`issue`,`code`,`coding`,`version control`]],[[3],[`rotate`,`reload`,`rerun`,`synchronise`,`synchronize`,`arrows`,`circular`,`cycle`]],[[3],[`rotate`,`reload`,`rerun`,`synchronise`,`synchronize`,`arrows`,`circular`,`cycle`,`cancel`,`no`,`stop`,`error`,`disconnect`,`ignore`]],[[16,18],[`frigerator`,`fridge`,`freezer`,`cooler`,`icebox`,`chiller`,`cold storage`]],[[37,11],[`search`,`text`,`code`]],[[37],[`text`,`font`,`typography`,`format`,`x`,`remove`,`delete`,`times`,`clear`]],[[3,23],[`loop`,`arrows`]],[[23],[`replay`]],[[3,34,23],[`arrows`,`retweet`,`repost`,`share`,`repeat`,`loop`]],[[37],[`search`,`substitute`,`swap`,`change`]],[[37],[`search`,`substitute`,`swap`,`change`]],[[20],[`email`]],[[20],[`email`]],[[3,23],[`music`]],[[34,22,13],[`awareness`,`strip`,`band`,`tape`,`strap`,`cordon`]],[[17,11],[`release`,`boost`,`launch`,`space`,`version`]],[[18],[`chair`,`furniture`,`seat`,`comfort`,`relax`]],[[25],[`attraction`,`entertainment`,`amusement park`,`theme park`,`funfair`]],[[24,30,36,18,34],[`roses`,`thorns`,`petals`,`plant`,`stem`,`leaves`,`spring`,`bloom`,`blossom`,`gardening`,`botanical`,`flora`,`florist`,`bouquet`,`bunch`,`gift`,`date`,`romance`,`romantic`,`valentines day`,`special occasion`]],[[10],[`gizmo`,`transform`,`orientation`,`orbit`,`axis`]],[[3,10,28],[`arrow`,`left`,`counter-clockwise`,`restart`,`reload`,`rerun`,`refresh`,`backup`,`undo`,`replay`,`redo`,`retry`,`rewind`,`reverse`]],[[31,1],[`password`,`key`,`refresh`,`change`]],[[19,10,28,39,3],[`left`,`counter-clockwise`,`rotate`,`image`,`90`,`45`,`degrees`,`°`]],[[3,10,28],[`arrow`,`right`,`clockwise`,`refresh`,`reload`,`rerun`,`redo`]],[[19,10,28,39,3],[`right`,`clockwise`,`rotate`,`image`,`90`,`45`,`degrees`,`°`]],[[25],[`path`,`journey`,`planner`,`points`,`stops`,`stations`]],[[25],[`path`,`journey`,`planner`,`points`,`stops`,`stations`,`reset`,`clear`,`cancelled`,`closed`,`blocked`]],[[11,12,8,18],[`computer`,`server`,`cloud`]],[[19,10,37],[`lines`,`list`,`queue`,`preview`,`panel`,`paragraphs`,`parallel`,`series`,`split`,`vertical`,`horizontal`,`half`,`center`,`middle`,`even`,`drawer`]],[[19,10,37],[`lines`,`list`,`queue`,`preview`,`paragraphs`,`parallel`,`series`,`split`,`vertical`,`horizontal`,`half`,`center`,`middle`,`even`,`drawers`]],[[19,10,37],[`lines`,`list`,`queue`,`preview`,`paragraphs`,`parallel`,`series`,`split`,`vertical`,`horizontal`,`half`,`center`,`middle`,`even`,`drawers`,`grill`]],[[11,34],[`feed`,`subscribe`,`news`,`updates`,`notifications`,`content`,`blog`,`articles`,`broadcast`,`syndication`,`reader`,`channels`,`posts`,`publishing`,`digest`,`alert`,`following`,`inbox`,`newsletter`,`weblog`,`podcast`]],[[39,10,19],[`measurements`,`centimeters`,`cm`,`millimeters`,`mm`,`metre`,`foot`,`feet`,`inches`,`units`,`size`,`length`,`width`,`height`,`dimensions`,`depth`,`breadth`,`extent`,`stationery`]],[[39,10,19],[`measurements`,`centimeters`,`cm`,`millimeters`,`mm`,`metre`,`foot`,`feet`,`inches`,`units`,`size`,`length`,`width`,`height`,`dimensions`,`depth`,`breadth`,`extent`,`stationery`]],[[15],[`currency`,`money`,`payment`]],[[40,41],[`ship`,`boat`,`harbor`,`harbour`,`dock`]],[[16,13],[`food`,`vegetarian`,`dish`,`restaurant`,`course`,`meal`,`side`,`vegetables`,`health`]],[[16],[`food`,`snack`,`dish`,`restaurant`,`lunch`,`meal`]],[[8,29],[`space station`,`orbit`,`transmitter`]],[[8,12,23],[`antenna`,`receiver`,`dish aerial`,`saucer`]],[[15],[`currency`,`money`,`payment`]],[[37,14],[`floppy disk`]],[[37,14],[`floppy disks`,`copy`]],[[37,14],[`floppy disk`,`unsalvageable`]],[[25,29,15],[`balance`,`legal`,`license`,`right`,`rule`,`law`,`justice`,`weight`,`measure`,`compare`,`judge`,`fair`,`ethics`,`decision`]],[[10],[`gizmo`,`transform`,`size`,`axis`]],[[10],[`scale`,`resize`,`design`]],[[12,33,31,34,17],[`qr-code`,`barcode`,`checkout`,`augmented reality`,`ar`,`target`,`surveillance`,`camera`,`lens`,`focus`,`frame`,`select`,`box`,`boundary`,`bounds`,`area`,`square`,`dashed`]],[[33,12],[`checkout`,`till`,`cart`,`transaction`,`purchase`,`buy`,`product`,`packaging`,`retail`,`consumer`]],[[28,23,0,31,12,1],[`preview`,`zoom`,`expand`,`fullscreen`,`gallery`,`image`,`camera`,`watch`,`surveillance`,`retina`,`focus`,`lens`,`biometric`,`identification`,`authentication`,`access`,`login`]],[[1,31,12,34],[`face`,`biometric`,`identification`,`authentication`,`2fa`,`access`,`login`,`dashed`]],[[22],[`health`,`heart rate`,`pulse`,`monitoring`,`healthiness`,`screening`,`dashed`]],[[12,33],[`checkout`,`till`,`cart`,`transaction`,`purchase`,`buy`,`product`,`packaging`,`retail`,`consumer`,`qr-code`,`dashed`]],[[1,33,12,31],[`barcode`,`scan`,`qrcode`,`url`,`information`,`digital`,`scanner`]],[[28,23,0],[`preview`,`zoom`,`expand`,`fullscreen`,`gallery`,`image`,`focus`,`lens`]],[[37,12],[`recognition`,`read`,`translate`,`copy`,`lines`]],[[5,25],[`building`,`education`,`childhood`,`university`,`learning`,`campus`,`scholar`,`student`,`lecture`,`degree`,`course`,`academia`,`study`,`knowledge`,`classroom`,`research`,`diploma`,`graduation`,`professor`,`tutorial`,`homework`,`assignment`,`exam`]],[[37,10,39],[`cut`,`snip`,`chop`,`stationery`,`crafts`]],[[10,39],[`cut here`,`along`,`snip`,`chop`,`stationery`,`crafts`,`instructions`,`diagram`]],[[40],[`vehicle`,`drive`,`trip`,`journey`,`transport`,`electric`,`ride`,`urban`,`commute`,`speed`]],[[8,12,7],[`host`,`desktop`,`monitor`]],[[8,12,7],[`desktop`,`disconnect`,`monitor`]],[[17,11,37],[`paper`,`log`,`scripture`,`document`,`notes`,`parchment`,`list`,`long`,`script`,`story`,`code`,`coding`]],[[17,11,37],[`paper`,`log`,`scripture`,`document`,`notes`,`parchment`,`list`,`long`,`script`,`story`,`code`,`coding`]],[[37,34],[`find`,`scan`,`magnifier`,`magnifying glass`,`lens`]],[[37,34],[`find`,`scan`,`magnifier`,`magnifying glass`,`stop`,`warning`,`alert`,`error`,`anomaly`,`lens`]],[[37,34],[`find`,`scan`,`magnifier`,`magnifying glass`,`found`,`correct`,`complete`,`tick`,`lens`]],[[37,34,11],[`find`,`scan`,`magnifier`,`magnifying glass`,`grep`,`chevrons`,`<>`,`lens`]],[[37,34],[`find`,`scan`,`magnifier`,`magnifying glass`,`stop`,`clear`,`cancel`,`abort`,`/`,`lens`]],[[37,34],[`find`,`scan`,`magnifier`,`magnifying glass`,`stop`,`clear`,`cancel`,`abort`,`lens`]],[[37],[`mark`,`typography`,`punctuation`,`legal`,`type`,`text`,`prose`,`symbol`]],[[20,7,8],[`email`,`message`,`mail`,`paper airplane`,`paper aeroplane`,`submit`]],[[20,7,8],[`email`,`message`,`mail`,`paper airplane`,`paper aeroplane`,`submit`]],[[10,19],[`bring`,`send`,`move`,`under`,`back`,`backwards`,`overlap`,`layer`,`order`]],[[37,3,19],[`move`,`split`]],[[37,3,19],[`move`,`split`]],[[11,12],[`cloud`,`storage`]],[[11,12],[`cloud`,`storage`,`computing`,`cog`,`gear`]],[[11,12],[`cloud`,`storage`,`problem`,`error`]],[[11,12],[`cloud`,`storage`]],[[1],[`cog`,`edit`,`gear`,`preferences`]],[[1],[`cog`,`edit`,`gear`,`preferences`,`slider`]],[[32,17],[`triangle`,`equilateral`,`square`,`circle`,`classification`,`different`,`collection`,`toy`,`blocks`,`learning`]],[[1,34],[`network`,`connections`]],[[1,34],[`network`,`connections`]],[[37,14],[`spreadsheets`,`table`,`excel`]],[[2,11,24,29,41,16,18],`beach.sand.holiday.sealife.fossil.ammonite.biology.ocean.terminal.command line.session.bash.zsh.roll.wrap.chewing gum.bubble gum.sweet.sugar.hosepipe.carpet.string.spiral.spinner.hypnotise.hypnosis`.split(`.`)],[[18],[`ledge`,`rack`,`storage`,`inventory`,`furniture`,`sill`,`shelves`,`shelf`,`organize`,`display`,`store`,`arrange`,`unit`,`cabinet`,`fixture`,`retail`,`warehouse`]],[[1,31,11,17,32],`cybersecurity.secure.safety.protection.guardian.armored.armoured.defense.defence.defender.block.threat.prevention.antivirus.vigilance.vigilant.detection.scan.find.strength.strong.tough.invincible.invincibility.invulnerable.undamaged.audit.admin.verification.crest.bravery.knight.foot soldier.infantry.trooper.pawn.battle.war.military.army.cadet.scout`.split(`.`)],[[1,31,11,26,17],`unshielded.cybersecurity.insecure.unsecured.safety.unsafe.protection.unprotected.guardian.unguarded.unarmored.unarmoured.defenseless.defenceless.undefended.defender.blocked.stopped.intercepted.interception.saved.thwarted.threat.prevention.unprevented.antivirus.vigilance.vigilant.detection.detected.scanned.found.exploit.vulnerability.vulnerable.weakness.infection.infected.comprimised.data leak.audited.admin.verification.unverified.uncertified.warning.emergency.attention.urgent.alarm.crest.bravery.strength.tough.attacked.damaged.injured.hit.expired.disabled.inactive.error.exclamation mark.!`.split(`.`)],[[1,31,11,17],`unshielded.cybersecurity.insecure.unsecured.safety.unsafe.protection.unprotected.guardian.unguarded.unarmored.unarmoured.defenseless.defenceless.undefended.defender.blocked.stopped.intercepted.interception.saved.thwarted.threat.prevention.unprevented.antivirus.vigilance.vigilant.detection.detected.scanned.found.exploit.vulnerability.vulnerable.weakness.infection.infected.comprimised.data leak.audited.admin.verification.unverified.uncertified.cancel.error.crest.bravery.attacked.damaged.injured.hit.expired.eliminated.disabled.inactive./`.split(`.`)],[[1,31,11,17],`cybersecurity.secured.safety.protection.protected.guardian.guarded.armored.armoured.defense.defence.defended.blocked.threat.prevention.prevented.antivirus.vigilance.vigilant.active.activated.enabled.detection.scanned.found.strength.strong.tough.invincible.invincibility.invulnerable.undamaged.audited.admin.verification.verified.certification.certified.tested.passed.qualified.cleared.cleaned.disinfected.uninfected.task.completed.todo.done.ticked.checked.crest.bravery`.split(`.`)],[[1,31,11,17],`cybersecurity,securing,protecting,guarding,armoring,armouring,defending,blocking,preventing,antivirus,detecting,scanning,finding,auditing,admin,verifying,crest,upgrading,loader,loading,throbber,progress,dots,more,etc,...,…`.split(`,`)],[[1,31,11,17],`cybersecurity.secure.safety.protection.guardian.armored.armoured.defense.defence.defender.block.threat.prevention.antivirus.vigilance.vigilant.detection.scan.strength.strong.tough.invincible.invincibility.invulnerable.undamaged.audit.admin.verification.crest.logo.sigil.flag.team.faction.fraternity.university.college.academy.school.education.uniform.bravery.knight.foot soldier.infantry.trooper.pawn.battle.war.military.ranking.army.cadet.scout`.split(`.`)],[[1,31,11,17],`unshield.cybersecurity.unsecure.unguard.unblock.antivirus.clean.clear.disinfect.patch.fix.stop.cancel.remove.relax.admin.crest.bravery.weakened.damaged.hit.unarm.disable.deactivate.decommission.downgraded.minimum.-`.split(`.`)],[[1,31,11,17],`unshielded.cybersecurity.insecure.unsecured.safety.unsafe.protection.unprotected.guardian.unguarded.unarmored.unarmoured.defenseless.defenceless.undefended.defender.interception.threat.prevention.unprevented.antivirus.detection.undetected.exploit.vulnerability.vulnerable.weakness.infected.infection.comprimised.data leak.unaudited.admin.verification.unverified.inactive.cancelled.error.crest.bravery.damaged.injured.hit.expired.eliminated`.split(`.`)],[[1,31,11,17,22],`cybersecurity.secure.safety.protection.guardian.armored.armoured.defense.defence.defender.block.threat.prevention.antivirus.vigilance.vigilant.detection.scan.strength.strong.tough.invincible.invincibility.invulnerable.undamaged.extra.added.professional.enterprise.full.maximum.upgraded.ultra.activate.enable.audit.admin.verification.crest.medic.+`.split(`.`)],[[1,31,11,17],`unshielded.cybersecurity.insecure.unsecured.safety.unsafe.protection.unprotected.guardian.unguarded.unarmored.unarmoured.defenseless.defenceless.undefended.defender.threat.prevention.unprevented.antivirus.vigilance.vigilant.detection.undetected.scan.find.exploit.vulnerability.vulnerable.weakness.infection.comprimised.data leak.audit.admin.verification.unverified.uncertified.uncertain.unknown.inactive.crest.question mark.?`.split(`.`)],[[1,31,11],[`shield`,`user`,`admin`,`protection`,`protected`,`safety`,`guard`]],[[1,31,11,17],`unshielded.cybersecurity.insecure.unsecured.safety.unsafe.protection.unprotected.guardian.unguarded.unarmored.unarmoured.defenseless.defenceless.undefended.defender.blocked.stopped.intercepted.interception.saved.thwarted.threat.prevention.prevented.antivirus.vigilance.vigilant.detection.detected.scanned.found.exploit.vulnerability.vulnerable.weakness.infection.infected.comprimised.data leak.audited.admin.verification.unverified.inactive.cancel.error.wrong.false.crest.bravery.attacked.damaged.injured.hit.dead.deceased.expired.eliminated.exterminated`.split(`.`)],[[40,25,41],[`boat`,`knots`,`nautical mile`,`maritime`,`sailing`,`yacht`,`cruise`,`ocean liner`,`tanker`,`vessel`,`navy`,`trip`,`releases`]],[[40,25,41],[`steering`,`rudder`,`boat`,`knots`,`nautical mile`,`maritime`,`sailing`,`yacht`,`cruise`,`ocean liner`,`tanker`,`vessel`,`navy`,`trip`]],[[33],[`t-shirt`,`shopping`,`store`,`clothing`,`clothes`]],[[33],[`ecommerce`,`cart`,`purchase`,`store`]],[[33],[`cart`,`e-commerce`,`store`,`purchase`,`products`,`items`,`ingredients`]],[[33],[`trolley`,`cart`,`basket`,`e-commerce`,`store`,`purchase`,`products`,`items`,`ingredients`]],[[24,39,17],[`dig`,`spade`,`treasure`]],[[18,41],[`shower`,`bath`,`bathroom`,`amenities`,`services`]],[[20,14],[`file`,`paper`,`tear`,`cut`,`delete`,`destroy`,`remove`,`erase`,`document`,`destruction`,`secure`,`security`,`confidential`,`data`,`trash`,`dispose`,`disposal`,`information`,`waste`,`permanent`]],[[2],[`seafood`,`shellfish`,`crustacean`,`prawn`,`scallop`,`whelk`,`arthropod`,`littleneck`,`quahog`,`cherrystone`]],[[19,3],[`scale`,`fullscreen`]],[[24],[`forest`,`undergrowth`,`park`,`nature`]],[[23,3],[`music`,`random`,`reorder`]],[[37,21,29],[`sum`,`calculate`,`formula`,`math`,`enumeration`,`enumerate`]],[[8],[`connection`,`wireless`,`gsm`,`phone`,`2g`,`3g`,`4g`,`5g`]],[[8],[`connection`,`wireless`,`gsm`,`phone`,`2g`,`3g`,`4g`,`5g`]],[[8],[`connection`,`wireless`,`gsm`,`phone`,`2g`,`3g`,`4g`,`5g`]],[[8],[`connection`,`wireless`,`gsm`,`phone`,`2g`,`3g`,`4g`,`5g`]],[[8],[`connection`,`wireless`,`gsm`,`phone`,`2g`,`3g`,`4g`,`5g`,`lost`]],[[37],[`text`,`format`,`input`,`contract`,`autograph`,`handwriting`,`sign`,`cursive`,`ink`,`scribble`,`authorize`,`personal`,`agreement`,`legal`,`document`,`identity`,`authentic`,`approval`,`verification`,`unique`]],[[3,25,11,17],[`bidirectional`,`left`,`right`,`east`,`west`]],[[3,25,11,17],[`bidirectional`,`left`,`right`,`east`,`west`]],[[22],[`police`,`ambulance`,`emergency`,`security`,`alert`,`alarm`,`light`]],[[23,3],[`arrow`,`previous`,`music`]],[[23,3],[`arrow`,`skip`,`next`,`music`]],[[17],[`death`,`danger`,`bone`]],[[11,21],[`divide`,`division`,`or`,`/`]],[[10],[`cutter`,`scalpel`,`knife`]],[[1],[`settings`,`filters`,`controls`]],[[1],[`settings`,`controls`]],[[8,12],[`phone`,`cellphone`,`device`,`screen`]],[[8,12],[`phone`,`cellphone`,`device`,`power`,`screen`]],[[7,15,12],[`contactless`,`payment`,`near-field communication`,`screen`]],[[13,1],[`emoji`,`face`,`happy`,`good`,`emotion`]],[[13,34,26,7],[`emoji`,`face`,`happy`,`good`,`emotion`,`react`,`reaction`,`add`]],[[2,16],[`animal`,`insect`,`slow`,`speed`,`delicacy`,`spiral`]],[[42,30],[`cold`,`weather`,`freeze`,`snow`,`winter`]],[[18,41],[`wash`,`bath`,`water`,`liquid`,`fluid`,`wet`,`moisture`,`damp`,`bead`,`globule`]],[[18],[`armchair`,`furniture`,`leisure`,`lounge`,`loveseat`,`couch`]],[[18,29,36,42],[`solar panel`,`solar`,`panel`,`sun`,`energy`,`electricity`,`light`]],[[16],[`food`,`dish`,`restaurant`,`course`,`meal`,`bowl`,`starter`]],[[37],[`text`,`selection`,`letters`,`characters`,`font`,`typography`]],[[32,17],[`shape`,`suit`,`playing`,`cards`]],[[32],[`star`,`effect`,`filter`,`night`,`magic`,`shiny`,`glitter`,`twinkle`,`celebration`]],[[9,23,17,42],[`stars`,`effect`,`filter`,`night`,`magic`]],[[23,12],[`sound`,`audio`,`music`,`tweeter`,`subwoofer`,`bass`,`production`,`producer`,`dj`]],[[0,7],[`disability`,`disabled`,`dda`,`human`,`accessibility`,`people`,`sound`]],[[37,11],[`spelling`,`error`,`mistake`,`oversight`,`typo`,`correction`,`code`,`linter`,`a`]],[[37,11],[`spelling`,`error`,`mistake`,`oversight`,`typo`,`correction`,`code`,`linter`,`a`]],[[10],[`path`,`pen`,`tool`,`shape`,`curve`,`draw`]],[[3,9,10,39],[`path`,`tool`,`curve`,`node`,`click`,`pointer`,`target`,`vector`]],[[11,3],[`break`,`disband`,`divide`,`separate`,`branch`,`disunite`]],[[7,39,34],[`bobbin`,`spindle`,`yarn`,`thread`,`string`,`sewing`,`needlework`]],[[12,28,23,7],[`winner`,`soapbox`,`stage`,`entertainment`,`drama`,`podium`,`actor`,`actress`,`singer`,`light`,`beam`,`play`,`theatre`,`show`,`focus`,`concert`,`performance`,`lens`,`leaderboard`,`followspot`,`best`,`highlight`]],[[10,39],[`paint`,`color`,`graffiti`,`decoration`,`aerosol`,`deodorant`,`shaving foam`,`air freshener`]],[[24,17,36],[`eco`,`green`,`growth`,`leaf`,`nature`,`plant`,`seed`,`spring`,`sustainability`]],[[32,23],[`stop`,`playback`,`music`,`audio`,`video`,`rectangle`,`aspect ratio`,`1:1`,`shape`]],[[22,34,29,23],`pulse.action.motion.movement.exercise.fitness.healthcare.heart rate monitor.vital signs.vitals.emergency room.er.intensive care.hospital.defibrillator.earthquake.siesmic.magnitude.richter scale.aftershock.tremor.shockwave.audio.waveform.synthesizer.synthesiser.music`.split(`.`)],[[3,17],[`backwards`,`reverse`,`direction`,`south`,`sign`,`keyboard`,`button`]],[[3,17],[`direction`,`south-west`,`diagonal`,`sign`,`turn`,`keyboard`,`button`]],[[3,17],[`direction`,`south-east`,`diagonal`,`sign`,`turn`,`keyboard`,`button`]],[[3],[`previous`,`back`,`direction`,`west`,`sign`,`keyboard`,`button`,`<-`]],[[3],[`outwards`,`direction`,`south-west`,`diagonal`]],[[3],[`outwards`,`direction`,`south-east`,`diagonal`]],[[3],[`outwards`,`direction`,`north-west`,`diagonal`]],[[3,34],[`outwards`,`direction`,`north-east`,`diagonal`,`share`,`open`,`external`,`link`]],[[3],[`next`,`forward`,`direction`,`west`,`sign`,`keyboard`,`button`,`->`]],[[3,32,19,23],[`left`,`in`,`inside`,`input`,`insert`,`source`,`import`,`place`,`->`]],[[3,32,19,23],[`out`,`outside`,`output`,`export`,`->`]],[[3],[`forward`,`direction`,`north`,`sign`,`keyboard`,`button`]],[[3],[`direction`,`north-west`,`diagonal`,`sign`,`keyboard`,`button`]],[[3,34],[`direction`,`north-east`,`diagonal`,`sign`,`keyboard`,`button`,`share`]],[[37,31,21,11],[`password`,`secret`,`access`,`key`,`multiply`,`multiplication`,`glob pattern`,`wildcard`,`*`]],[[37,10,39,14,11],[`cut`,`snippet`,`chop`,`stationery`,`crafts`]],[[10,28],[`reflect`,`mirror`,`alignment`,`dashed`]],[[10,28],[`reflect`,`mirror`,`alignment`,`dashed`]],[[6,38,11,10],[`projects`,`manage`,`overview`,`roadmap`,`plan`,`intentions`,`timeline`,`deadline`,`date`,`event`,`range`,`period`,`productivity`,`work`,`agile`,`code`,`coding`,`toolbar`,`button`]],[[26],[`done`,`todo`,`tick`,`complete`,`task`]],[[26],[`done`,`todo`,`tick`,`complete`,`task`]],[[3,25],[`back`,`menu`,`panel`]],[[3,25],[`back`,`previous`,`less than`,`fewer`,`menu`,`panel`,`button`,`keyboard`,`<`]],[[3,25,11],[`forward`,`next`,`more than`,`greater`,`menu`,`panel`,`code`,`coding`,`command line`,`terminal`,`prompt`,`shell`,`console`,`>`]],[[3,25,21],[`caret`,`keyboard`,`button`,`mac`,`control`,`ctrl`,`superscript`,`exponential`,`power`,`ahead`,`menu`,`panel`,`^`]],[[37,11],[`gist`,`source`,`programming`,`html`,`xml`,`coding`]],[[37,10],[`selection`,`square`,`rectangular`,`marquee`,`tool`,`dashed`,`box`]],[[11,14],[`rectangle`,`aspect ratio`,`1:1`,`shape`,`snippet`,`code`,`coding`]],[[11,14],[`rectangle`,`aspect ratio`,`1:1`,`shape`,`snippet`,`code`,`coding`]],[[6,11,10],[`projects`,`manage`,`overview`,`board`,`tickets`,`issues`,`roadmap`,`plan`,`intentions`,`productivity`,`work`,`agile`,`draft`,`template`,`boilerplate`,`code`,`coding`]],[[3,9,11,39],[`inspector`,`element`,`mouse`,`click`,`pointer`,`box`,`browser`,`selector`,`target`,`dom`,`node`]],[[10,11,19],[`square`,`border`,`width`,`layout`,`style`,`design`,`rectangular`,`marquee`,`dashed`,`box`,`rectangle`,`aspect ratio`,`1:1`]],[[21],[`calculate`,`math`,`÷`,`/`]],[[11],[`git`,`diff`,`modified`,`.`]],[[21],[`calculate`,`=`]],[[11,21],[`programming`,`code`,`automation`,`math`]],[[6,11,10],[`projects`,`manage`,`overview`,`board`,`tickets`,`issues`,`roadmap`,`plan`,`intentions`,`productivity`,`work`,`agile`,`code`,`coding`,`toolbar`,`button`]],[[37,28,23,25,11],[`books`,`reading`,`written`,`authors`,`stories`,`fiction`,`novels`,`information`,`knowledge`,`education`,`high school`,`university`,`college`,`academy`,`learning`,`study`,`research`,`collection`,`vinyl`,`records`,`albums`,`music`,`package`]],[[40,25],[`metro`,`subway`,`underground`,`track`,`line`]],[[19],[`bars`,`navigation`,`hamburger`,`options`,`menu bar`,`panel`]],[[21,11,37,39,12],[`subtract`,`remove`,`decrease`,`reduce`,`calculator`,`button`,`keyboard`,`line`,`divider`,`separator`,`horizontal rule`,`hr`,`html`,`markup`,`markdown`,`---`,`toolbar`,`operator`,`code`,`coding`,`minimum`,`downgrade`]],[[3,9,11,39],[`inspector`,`element`,`mouse`,`click`,`pointer`,`box`,`browser`,`selector`,`target`,`dom`,`node`]],[[40,25],[`parking lot`,`car park`]],[[40,25],[`parking lot`,`car park`,`no parking`]],[[23],[`music`,`audio`,`stop`]],[[37],[`pencil`,`edit`,`change`,`create`,`draw`,`sketch`,`draft`,`writer`,`writing`,`biro`,`ink`,`marker`,`felt tip`,`stationery`,`artist`]],[[34,15,33,21],[`verified`,`unverified`,`sale`,`discount`,`offer`,`marketing`,`sticker`,`price tag`]],[[11,21],[`constant`,`code`,`coding`,`programming`,`symbol`,`trigonometry`,`geometry`,`formula`]],[[37],[`paragraph`,`mark`,`paraph`,`blind`,`typography`,`type`,`text`,`prose`,`symbol`]],[[3,23],[`music`,`audio`,`video`,`start`,`run`]],[[21,39,11,37],[`add`,`new`,`increase`,`increment`,`positive`,`calculate`,`calculator`,`button`,`keyboard`,`toolbar`,`maximum`,`upgrade`,`extra`,`operator`,`join`,`concatenate`,`code`,`coding`,`+`]],[[8],[`on`,`off`,`device`,`switch`,`toggle`,`binary`,`boolean`,`reboot`,`restart`,`button`,`keyboard`,`troubleshoot`]],[[11,21],[`calculate`,`formula`,`math`,`operator`,`root`,`square`,`symbol`]],[[10,11,19],[`border`,`radius`,`style`,`design`,`corner`,`layout`,`round`,`rounded`]],[[37,10,39,14,11],[`cut`,`snippet`,`chop`,`stationery`,`crafts`,`toolbar`,`button`]],[[37,21],[`sum`,`calculate`,`formula`,`math`,`enumeration`,`enumerate`]],[[11,21],[`git`,`diff`,`ignored`,`divide`,`division`,`shortcut`,`or`,`/`]],[[19],[`split`,`divide`]],[[19],[`split`,`divide`]],[[19],[`float`,`center`,`rectangle`]],[[37,14,11],[`versions`,`clone`,`copy`,`duplicate`,`multiple`,`revisions`,`version control`,`backup`,`history`]],[[35,17],[`badge`,`medal`,`honour`,`decoration`,`order`,`pin`,`laurel`,`trophy`,`medallion`,`insignia`,`bronze`,`silver`,`gold`]],[[23],[`media`,`music`]],[[11],[`code`,`command line`,`prompt`,`shell`]],[[1],[`person`,`account`,`contact`]],[[1],[`person`,`account`,`contact`]],[[21,26],[`cancel`,`close`,`delete`,`remove`,`times`,`clear`,`math`,`multiply`,`multiplication`]],[[10],[`square`,`pathfinder`,`path`,`exclude`,`invert`,`xor`,`shape`,`vector`]],[[10],[`square`,`pathfinder`,`path`,`intersect`,`shape`,`include`,`vector`]],[[10],[`square`,`pathfinder`,`path`,`minus`,`subtract`,`subtraction`,`shape`,`front`,`vector`]],[[10],[`square`,`pathfinder`,`path`,`unite`,`union`,`shape`,`merge`,`vector`]],[[32],[`shape`]],[[11,32,10],[`shape`,`pending`,`progress`,`issue`,`draft`,`code`,`coding`,`version control`]],[[2],[`animal`,`rodent`,`pet`,`pest`,`nuts`,`retrieve`,`updates`,`storage`,`stash`]],[[10,9,39],[`mark`,`print`,`clone`,`loyalty`,`library`]],[[1,34,32,23,42,13,17],[`bookmark`,`favorite`,`like`,`review`,`rating`]],[[34,23],[`bookmark`,`favorite`,`like`,`review`,`rating`]],[[23,34],[`dislike`,`unlike`,`remove`,`unrate`]],[[23,3],[`arrow`,`previous`,`music`,`left`,`reverse`]],[[23,3],[`arrow`,`next`,`music`,`right`,`continue`]],[[29,22],[`phonendoscope`,`medical`,`heart`,`lungs`,`sound`]],[[34],[`reaction`,`emotion`,`smile`,`happy`,`feedback`]],[[37,34],[`post-it`,`comment`,`annotation`,`reaction`,`memo`,`reminder`,`todo`,`task`,`idea`,`brainstorm`,`document`,`page`,`paper`,`sheet`,`stationary`,`office`]],[[24],[`mineral`,`geology`,`nature`,`solid`,`pebble`,`crystal`,`ore`,`hard`,`coal`,`stone`,`rock`,`boulder`]],[[5,25,33],[`shop`,`supermarket`,`stand`,`boutique`,`building`]],[[19],[`items`,`flex`,`justify`,`distribute`]],[[19],[`items`,`flex`,`justify`,`distribute`]],[[37],[`cross out`,`delete`,`remove`,`format`]],[[37],[`text`]],[[0,42,30,36],[`brightness`,`weather`,`light`,`summer`]],[[0,42],[`brightness`,`dim`,`low`,`brightness low`]],[[0,42],[`brightness`,`medium`]],[[0],[`dark`,`light`,`moon`,`sun`,`brightness`,`theme`,`auto theme`,`system theme`,`appearance`]],[[42],[`weather`,`air conditioning`,`temperature`,`hot`,`cold`,`seasons`]],[[3,42,38],[`weather`,`time`,`morning`,`day`]],[[3,42],[`weather`,`time`,`evening`,`night`]],[[37],[`text`,`exponent`]],[[10,18,28],[`colors`,`colours`,`swatches`,`pantone`,`shades`,`tint`,`hue`,`saturation`,`brightness`,`theme`,`scheme`,`palette`,`samples`,`textile`,`carpet`]],[[15],[`currency`,`money`,`payment`]],[[7,12],[`photo`,`selfie`,`front`,`back`]],[[17,39],[`battle`,`challenge`,`game`,`war`,`weapon`]],[[17,39],[`battle`,`challenge`,`game`,`war`,`weapon`]],[[29,22],[`medicine`,`medical`,`needle`,`pump`,`plunger`,`nozzle`,`blood`]],[[37,14],[`spreadsheet`,`grid`]],[[37,14],[`spreadsheet`,`grid`]],[[37,14],[`spreadsheet`,`grid`,`row`]],[[37,14],[`spreadsheet`,`grid`,`row`]],[[37,14],[`spreadsheet`,`grid`,`cut`,`break`,`divide`,`separate`,`segment`]],[[37],[`toc`,`outline`,`navigation`,`document structure`,`index`,`overview`,`sections`,`chapters`,`content`,`documentation`,`manual`,`knowledge base`,`faq`]],[[37,11,14],[`property list`,`plist`,`spreadsheet`,`grid`,`dictionary`,`object`,`hash`]],[[37,14],[`spreadsheet`,`grid`,`cut`,`break`,`divide`,`separate`,`segment`]],[[12],[`device`]],[[12,10,11,39],[`responsive`,`screens`,`browser`,`testing`,`mobile`]],[[22],[`medicine`,`medication`,`drug`,`prescription`,`pills`,`pharmacy`]],[[1],[`label`,`badge`,`ticket`,`mark`]],[[1],[`labels`,`badges`,`tickets`,`marks`,`copy`,`multiple`]],[[21,17],[`count`,`score`,`enumerate`,`days`,`one`,`1`,`first`,`bar`,`prison`,`cell`,`sentence`]],[[21,17],[`count`,`score`,`enumerate`,`days`,`two`,`2`,`second`,`double`,`bars`,`prison`,`cell`,`sentence`]],[[21,17],[`count`,`score`,`enumerate`,`days`,`three`,`3`,`third`,`triple`,`bars`,`prison`,`cell`,`sentence`]],[[21,17],[`count`,`score`,`enumerate`,`days`,`4`,`fourth`,`quadruple`,`bars`,`prison`,`cell`,`sentence`]],[[21,17],[`count`,`score`,`enumerate`,`days`,`five`,`5`,`fifth`,`bars`,`prison`,`cell`,`sentence`,`slash`,`/`]],[[32,21,10,39],[`tangential`,`shape`,`circle`,`geometry`,`trigonometry`,`bezier curve`]],[[4,17],[`logo`,`bullseye`,`deadline`,`projects`,`overview`,`work`,`productivity`]],[[29,11,39],[`astronomy`,`space`,`discovery`,`exploration`,`explore`,`vision`,`perspective`,`focus`,`stargazing`,`observe`,`view`]],[[41,24,36],[`tipi`,`teepee`,`wigwam`,`lodge`,`camping`,`campsite`,`holiday`,`retreat`,`nomadic`,`native american`,`indian`,`wilderness`,`outdoors`]],[[41,24],[`camping`,`campsite`,`holiday`,`retreat`,`nomadic`,`wilderness`,`outdoors`]],[[11],[`code`,`command line`,`prompt`,`shell`]],[[29],[`tube`,`vial`,`phial`,`flask`,`ampoule`,`ampule`,`lab`,`chemistry`,`experiment`,`test`]],[[29],[`tube`,`vial`,`phial`,`flask`,`ampoule`,`ampule`,`lab`,`chemistry`,`experiment`,`test`]],[[29],[`tubes`,`vials`,`phials`,`flasks`,`ampoules`,`ampules`,`lab`,`chemistry`,`experiment`,`test`]],[[37],[`text`,`alignment`,`center`]],[[37],[`text`,`alignment`,`right`]],[[37],[`text`,`alignment`,`justified`,`menu`,`list`]],[[37],[`text`,`alignment`,`left`,`list`]],[[37,9],[`select`]],[[37,19],[`select`]],[[37],[`drop cap`,`text`,`format`,`typography`,`letter`,`font size`]],[[37],[`blockquote`,`quotation`,`indent`,`reply`,`response`]],[[37],[`find`,`data`,`copy`,`txt`,`pdf`,`document`,`scan`,`magnifier`,`magnifying glass`,`lens`]],[[37,9],[`find`,`search`,`selection`,`dashed`]],[[37,3],[`words`,`lines`,`break`,`paragraph`]],[[5,34],[`theater`,`theatre`,`entertainment`,`podium`,`stage`,`musical`]],[[42],[`temperature`,`celsius`,`fahrenheit`,`weather`]],[[42],[`temperature`,`celsius`,`fahrenheit`,`weather`,`cold`,`freeze`,`freezing`]],[[42],[`temperature`,`celsius`,`fahrenheit`,`weather`,`warm`,`hot`]],[[1,34,13],[`dislike`,`bad`,`emotion`]],[[1,34,13],[`like`,`good`,`emotion`]],[[1,40],[`entry`,`pass`,`voucher`,`event`,`concert`,`show`,`perforated`,`dashed`]],[[40],[`entry`,`pass`,`voucher`,`event`,`concert`,`show`,`booked`,`purchased`,`receipt`,`redeemed`,`validated`,`verified`,`certified`,`checked`,`used`]],[[40],[`entry`,`pass`,`voucher`,`event`,`concert`,`show`,`remove`,`cancel`,`unbook`,`subtract`,`decrease`,`-`]],[[40,33],[`discount`,`reduced`,`offer`,`voucher`,`entry`,`pass`,`event`,`concert`,`show`,`book`,`purchase`,`%`]],[[40],[`entry`,`pass`,`voucher`,`event`,`concert`,`show`,`book`,`purchase`,`add`,`+`]],[[40],`entry.pass.voucher.event.concert.show.redeemed.used.marked.checked.verified.spoiled.invalidated.void.denied.refused.banned.barred.forbidden.prohibited.cancelled.cancellation.refunded.delete.remove.clear.error`.split(`.`)],[[40],[`entry`,`pass`,`voucher`,`event`,`concert`,`show`,`cancelled`,`cancellation`,`refunded`,`used`,`void`,`invalidated`,`spoiled`,`denied`,`refused`,`banned`,`barred`,`forbidden`,`prohibited`,`delete`,`remove`,`clear`,`error`,`x`]],[[41,1,40],[`trip`,`travel`,`pass`,`entry`,`voucher`,`event`,`concert`,`show`,`perforated`,`dashed`]],[[40,41],[`plane`,`trip`,`airplane`,`flight`,`travel`,`fly`,`takeoff`,`vacation`,`passenger`,`pass`,`check-in`,`airport`]],[[38],[`time`,`timer`,`stopwatch`]],[[38],[`time`,`timer`,`stopwatch`]],[[38],[`time`,`timer`,`stopwatch`]],[[19,1,11],[`on`,`off`,`switch`,`boolean`]],[[19,1,11],[`on`,`off`,`switch`,`boolean`]],[[12,18],[`toilet`,`potty`,`bathroom`,`washroom`]],[[39,11,18],[`tools`,`maintenance`,`repair`]],[[39,18],[`toolkit`,`tools`,`trunk`,`chest`,`box`,`storage`,`utility`,`utilities`,`container`,`kit`,`set`,`repair`,`fix`,`service`,`maintenance`,`mechanic`,`workshop`,`construction`,`hardware`,`equipment`,`gear`,`handyman`,`engineering`,`craft`,`diy`]],[[42],[`weather`,`wind`,`storm`,`hurricane`]],[[32,10,39,16],[`donut`,`doughnut`,`ring`,`hollow`,`3d`,`fast food`,`junk food`,`snack`,`treat`,`sweet`,`sugar`,`dessert`]],[[12],[`trackpad`,`cursor`]],[[12],[`trackpad`,`cursor`]],[[18,41],[`flannel`,`bathroom`,`toiletries`,`sanitation`,`clean`,`fresh`,`dry`,`laundry`,`laundrette`,`hospitality`,`housekeeping`,`room service`,`spa break`,`health club`,`amenities`,`hanging`]],[[41,40],[`airport`,`travel`,`tower`,`transportation`,`lighthouse`]],[[17,11],[`lego`,`block`,`addon`,`plugin`,`integration`]],[[40,36,16],[`farming`,`farmer`,`ranch`,`harvest`,`equipment`,`vehicle`]],[[40],[`roadworks`,`tarmac`,`safety`,`block`]],[[40],[`railway`,`metro`,`subway`,`underground`,`high-speed`,`bullet`,`fast`,`track`,`line`]],[[40,25],[`railway`,`metro`,`subway`,`underground`,`speed`,`bullet`,`fast`,`track`,`line`]],[[40,25],[`railway`,`line`]],[[40],[`railway`,`metro`,`subway`,`underground`,`track`,`line`,`tourism`]],[[22,0],[`gender`,`inclusive`]],[[14,20],[`empty`,`deletion`,`cleanup`,`junk`,`clear`,`garbage`,`delete`,`remove`,`bin`,`waste`,`recycle`,`discard`,`binoculars`,`rubbish`]],[[14,20],[`garbage`,`delete`,`remove`,`bin`]],[[24,36],[`tree`,`forest`,`park`,`nature`]],[[24,36],[`vacation`,`leisure`,`island`]],[[24,36],[`tree`,`pine`,`forest`,`park`,`nature`]],[[24,36],[`tree`,`forest`,`park`,`nature`]],[[6,3],[`statistics`]],[[6,3],[`statistics`]],[[6,3],[`arrows`,`estimated`,`indeterminate`,`data fluctuation`,`uncertain`,`forecast`,`variable`,`prediction`,`dynamic`,`volatile`]],[[32],[`equilateral`,`delta`,`shape`,`pyramid`,`hierarchy`]],[[26,32,11],[`warning`,`alert`,`danger`,`exclamation mark`,`linter`]],[[32],[`equilateral`,`delta`,`shape`,`pyramid`,`hierarchy`,`dashed`]],[[32,21],[`volume`,`controls`,`controller`,`tv remote`,`geometry`,`delta`,`ramp`,`slope`,`incline`,`increase`]],[[35,17],[`prize`,`sports`,`winner`,`achievement`,`award`,`champion`,`celebration`,`victory`]],[[40],[`delivery`,`van`,`shipping`,`haulage`,`lorry`]],[[40],[`delivery`,`van`,`shipping`,`haulage`,`lorry`,`electric`]],[[15],[`currency`,`money`,`payment`]],[[23,18],[`record player`,`gramophone`,`stereo`,`phonograph`,`vinyl`,`lp`,`disc`,`platter`,`cut`,`music`,`analog`,`retro`,`dj deck`,`disc jockey`,`scratch`,`spinning`]],[[2],[`animal`,`pet`,`tortoise`,`slow`,`speed`]],[[12,23,7],`television.stream.display.widescreen.high-definition.hd.1080p.4k.8k.smart.digital.video.entertainment.showtime.channels.terrestrial.satellite.cable.broadcast.live.frequency.tune.scan.aerial.receiver.transmission.signal.connection.connectivity`.split(`.`)],[[12,23],[`flatscreen`,`television`,`stream`,`display`,`widescreen`,`high-definition`,`hd`,`1080p`,`4k`,`8k`,`smart`,`digital`,`video`,`home cinema`,`entertainment`,`showtime`,`channels`,`catchup`]],[[12,23],[`flatscreen`,`television`,`stream`,`display`,`widescreen`,`high-definition`,`hd`,`1080p`,`4k`,`8k`,`smart`,`digital`,`video`,`movie`,`live`,`ott`,`running`,`start`,`film`,`home cinema`,`entertainment`,`showtime`,`channels`,`catchup`]],[[37],[`text`,`font`,`typography`]],[[37],[`text`,`font`,`typography`,`silhouette`,`profile`,`contour`,`stroke`,`line`]],[[42],[`rain`,`weather`]],[[42],[`rain`,`weather`,`uncovered`,`uninsured`,`antivirus`,`unprotected`,`risky`]],[[37],[`text`,`format`]],[[37,3],[`redo`,`rerun`,`history`]],[[37,3],[`redo`,`rerun`,`history`,`back`,`return`,`reverse`,`revert`,`direction`,`u-turn`]],[[37,3],[`redo`,`history`,`step`,`back`]],[[3,19],[`arrow`,`collapse`,`fold`,`vertical`,`dashed`]],[[3,19],[`arrow`,`expand`,`vertical`,`dashed`]],[[32,14],[`cubes`,`packages`,`parts`,`units`,`collection`,`cluster`,`separate`]],[[5,25],[`building`,`education`,`childhood`,`school`,`college`,`academy`,`institute`]],[[37],[`url`,`unchain`]],[[37],[`url`,`unchain`]],[[12,11],[`electricity`,`energy`,`electronics`,`socket`,`outlet`,`disconnect`]],[[3,14],[`file`]],[[12,23,18],[`universal`,`serial`,`bus`,`controller`,`connector`,`interface`]],[[1],[`person`,`account`,`contact`]],[[1],[`followed`,`subscribed`,`done`,`todo`,`tick`,`complete`,`task`]],[[1],[`settings`,`edit`,`cog`,`gear`]],[[1],[`passkey`,`password`,`login`,`authentication`,`authorization`,`roles`,`permissions`,`private`,`public`,`security`,`person`,`account`,`contact`]],[[1,31],[`person`,`lock`,`locked`,`account`,`secure`]],[[1],[`delete`,`remove`,`unfollow`,`unsubscribe`]],[[1],[`person`,`account`,`contact`,`profile`,`edit`,`change`]],[[1],[`new`,`add`,`create`,`follow`,`subscribe`]],[[1],[`person`,`account`,`contact`]],[[1],[`followed`,`subscribed`,`done`,`todo`,`tick`,`complete`,`task`]],[[1],[`settings`,`edit`,`cog`,`gear`]],[[1],[`passkey`,`password`,`login`,`authentication`,`authorization`,`roles`,`permissions`,`private`,`public`,`security`,`person`,`account`,`contact`]],[[1],[`delete`,`remove`,`unfollow`,`unsubscribe`]],[[1],[`person`,`account`,`contact`,`profile`,`edit`,`change`]],[[1],[`new`,`add`,`create`,`follow`,`subscribe`]],[[1,34],[`person`,`account`,`contact`,`find`,`scan`,`magnifier`,`magnifying glass`,`lens`]],[[1],[`delete`,`remove`,`unfollow`,`unsubscribe`,`unavailable`]],[[1,34],[`person`,`account`,`contact`,`find`,`scan`,`magnifier`,`magnifying glass`,`lens`]],[[1],[`person`,`account`,`favorite`,`contact`,`like`,`review`,`rating`,`admin`]],[[1],[`delete`,`remove`,`unfollow`,`unsubscribe`,`unavailable`]],[[1],[`group`,`people`]],[[1],[`group`,`people`]],[[16,41,25],[`fork`,`knife`,`cutlery`,`flatware`,`tableware`,`silverware`,`food`,`restaurant`,`meal`,`breakfast`,`dinner`,`supper`]],[[16,41,25],[`fork`,`knife`,`cutlery`,`flatware`,`tableware`,`silverware`,`food`,`restaurant`,`meal`,`breakfast`,`dinner`,`supper`]],[[5,18,36],[`electricity`,`energy`,`transmission line`,`telegraph pole`,`power lines`,`phone`]],[[40],[`minivan`,`cart`,`wagon`,`truck`,`lorry`,`trailer`,`camper`,`vehicle`,`drive`,`trip`,`journey`,`van`,`transport`,`carriage`,`delivery`,`travel`]],[[11,21],[`code`,`coding`,`programming`,`symbol`,`calculate`,`algebra`,`x`,`parentheses`,`parenthesis`,`brackets`,`parameter`,`(`,`)`]],[[31,41,18],[`safe`,`lockbox`,`deposit`,`locker`,`coffer`,`strongbox`,`safety`,`secure`,`storage`,`valuables`,`bank`]],[[32,21,10,39],[`shape`,`geometry`,`art`,`width`,`height`,`size`,`calculate`,`measure`,`select`,`graphics`,`box`]],[[16,36],[`vegetarian`,`fruitarian`,`herbivorous`,`animal rights`,`diet`]],[[1,17],[`mask`,`masquerade`,`impersonate`,`secret`,`incognito`]],[[22],[`gender`,`sex`,`female`,`feminine`,`woman`,`girl`]],[[22],[`gender`,`sex`,`intersex`,`androgynous`,`hermaphrodite`]],[[12,8,1,26],[`smartphone`,`notification`,`rumble`,`haptic feedback`,`screen`]],[[12,8,1],[`smartphone`,`notification`,`rumble`,`haptic feedback`,`notifications`,`screen`]],[[12,7,8,28],[`camera`,`movie`,`film`,`recording`,`motion picture`,`camcorder`,`reel`]],[[12,7,8,28],[`camera`,`movie`,`film`]],[[12,7,8,28,14],[`vhs`,`movie`,`film`,`recording`,`motion picture`,`showreel`,`cassette`]],[[10,28],[`eye`,`look`]],[[8,12,34],[`phone`,`cassette`,`tape`,`reel`,`recording`,`audio`]],[[35,17,41],[`beach`,`sand`,`net`,`holiday`,`vacation`,`summer`,`soccer`,`football`,`futbol`,`kick`,`pitch`,`goal`,`score`,`bounce`,`leather`,`wool`,`yarn`,`knitting`,`sewing`,`thread`,`embroidery`,`textile`]],[[8,7,23],[`music`,`sound`,`mute`,`speaker`]],[[8,7,23],[`music`,`sound`,`speaker`]],[[8,7,23],[`music`,`sound`,`speaker`]],[[8,7,23],[`music`,`sound`,`mute`,`speaker`]],[[8,7,23],[`music`,`sound`,`mute`,`speaker`]],[[34],[`vote`,`poll`,`ballot`,`political`,`social`,`check`,`tick`]],[[1,15],[`money`,`finance`,`pocket`]],[[1,15],[`money`,`finance`,`pocket`,`credit`,`purchase`,`payment`,`shopping`,`retail`,`consumer`,`cc`]],[[1,15],[`finance`,`pocket`]],[[1,12],[`background`,`texture`,`image`,`art`,`design`,`visual`,`decor`,`pattern`,`screen`,`cover`,`lock screen`]],[[10,17,9,28],[`magic`,`selection`]],[[10,17,9,28],[`magic`,`wizard`,`magician`]],[[5,25],[`storage`,`storehouse`,`depot`,`depository`,`repository`,`stockroom`,`logistics`,`building`]],[[18,12,41],[`tumble dryer`,`amenities`,`electronics`,`cycle`,`clothes`,`rinse`,`spin`,`drum`]],[[38],[`clock`,`time`]],[[42,25,23,36],[`water`,`sea`,`sound`,`hertz`,`wavelength`,`vibrate`]],[[42,36],[`water`,`sea`,`level`,`sound`,`hertz`,`wavelength`,`vibrate`,`low`,`tide`,`ocean`,`rising`,`down`,`falling`]],[[42,36],[`water`,`sea`,`level`,`sound`,`hertz`,`wavelength`,`vibrate`,`high`,`tide`,`ocean`,`rising`]],[[35,18],[`swimming`,`water`,`pool`,`lifeguard`,`ocean`,`🌊`,`🏊♂️`,`🏊♀️`,`🏊`,`🥽`]],[[31,1,25,11,34],[`indirection`,`vpn`,`virtual private network`,`proxy`,`connections`,`bounce`,`reroute`,`path`,`journey`,`planner`,`stops`,`stations`,`shared`,`spread`,`viral`]],[[8,12,7],[`camera`,`security`]],[[11,34,1],[`push api`,`interface`,`callback`]],[[11,34,1],[`push api`,`interface`,`callback`]],[[21],[`mass`,`heavy`,`lead`,`metal`,`measure`,`geometry`,`scales`,`balance`]],[[21],[`measure`,`scale`,`estimate`,`load`,`balance`,`size`,`measurement`,`quantity`,`mass`]],[[16],[`corn`,`cereal`,`grain`,`gluten`]],[[16],[`corn`,`cereal`,`grain`,`gluten free`,`allergy`,`intolerance`,`diet`]],[[37],[`text`,`selection`,`letters`,`characters`,`font`,`typography`]],[[8,12],[`connection`,`signal`,`wireless`]],[[8,12,14],[`connection`,`signal`,`wireless`,`directory`,`settings`,`control`,`preferences`,`cog`,`edit`,`gear`]],[[8,12],[`connection`,`signal`,`wireless`]],[[8,12],[`connection`,`signal`,`wireless`]],[[8,12],[`disabled`]],[[8,12],[`edit`,`wifi`,`pen`,`change`,`network`]],[[8,12],[`connection`,`signal`,`wireless`,`synchronize`,`reconnect`,`reset`,`restart`]],[[8,12],[`connection`,`signal`,`wireless`]],[[42,36],[`weather`,`air`,`blow`]],[[42,36],[`weather`,`air`,`pressure`,`blow`]],[[16],[`alcohol`,`beverage`,`bar`,`drink`,`glass`,`sommelier`,`vineyard`,`winery`]],[[16],[`alcohol`,`beverage`,`drink`,`glass`,`alcohol free`,`abstinence`,`abstaining`,`teetotalism`,`allergy`,`intolerance`]],[[11],[`action`,`continuous integration`,`ci`,`automation`,`devops`,`network`,`node`,`connection`]],[[2,31],[`invertebrate`,`grub`,`larva`,`snake`,`crawl`,`wiggle`,`slither`,`pest control`,`computer virus`,`malware`]],[[1,11,39],[`account`,`settings`,`spanner`,`diy`,`toolbox`,`build`,`construction`]],[[26,21],[`cancel`,`close`,`cross`,`delete`,`ex`,`remove`,`times`,`clear`,`math`,`multiply`,`multiplication`]],[[26,21],[`line`,`top`,`arrow`,`navigation`,`up`,`pointer`,`direction`,`vector`,`symbol`,`cancel`,`close`,`delete`,`remove`,`times`,`clear`,`math`,`multiply`,`multiplication`,`mean`,`median`,`average`,`x̄`]],[[8,12,28,42],[`flash`,`camera`,`lightning`,`electricity`,`energy`]],[[8,12,28,42],[`flash`,`camera`,`lightning`,`electricity`,`energy`]],[[34,13],[`water bearer`,`waves`,`innovation`,`air`,`future`,`astrology`,`star sign`,`horoscope`,`constellation`,`celestial`]],[[34,13],[`ram`,`horns`,`fire`,`energy`,`initiative`,`astrology`,`star sign`,`horoscope`,`constellation`,`celestial`]],[[34,13],[`crab`,`shell`,`protection`,`water`,`intuition`,`astrology`,`star sign`,`horoscope`,`constellation`,`celestial`]],[[34,13],[`goat`,`mountain`,`ambition`,`earth`,`discipline`,`astrology`,`star sign`,`horoscope`,`constellation`,`celestial`]],[[34,13],[`twins`,`duality`,`communication`,`air`,`adaptability`,`astrology`,`star sign`,`horoscope`,`constellation`,`celestial`]],[[34,13],[`lion`,`crown`,`leadership`,`fire`,`confidence`,`astrology`,`star sign`,`horoscope`,`constellation`,`celestial`]],[[34,13],[`scales`,`balance`,`justice`,`air`,`harmony`,`astrology`,`star sign`,`horoscope`,`constellation`,`celestial`]],[[34,13],[`serpent`,`snake holder`,`healing`,`knowledge`,`astronomy`,`astrology`,`star sign`,`horoscope`,`constellation`,`celestial`]],[[34,13],[`fish`,`duality`,`water`,`dreams`,`empathy`,`astrology`,`star sign`,`horoscope`,`constellation`,`celestial`]],[[34,13],[`archer`,`arrow`,`exploration`,`fire`,`philosophy`,`astrology`,`star sign`,`horoscope`,`constellation`,`celestial`]],[[34,13],[`scorpion`,`stinger`,`intensity`,`water`,`transformation`,`astrology`,`star sign`,`horoscope`,`constellation`,`celestial`]],[[34,13],[`bull`,`strength`,`stability`,`earth`,`endurance`,`astrology`,`star sign`,`horoscope`,`constellation`,`celestial`]],[[34,13],[`virgin`,`maiden`,`harvest`,`precision`,`earth`,`analysis`,`astrology`,`star sign`,`horoscope`,`constellation`,`celestial`]],[[0,19,10,37,28],[`magnifying glass`,`plus`]],[[0,19,10,37,28],[`magnifying glass`,`plus`]]],wE={"text-select":`square-dashed-text`,waves:`waves-horizontal`},TE={"activity-square":`square-activity`,"alarm-check":`alarm-clock-check`,"alarm-minus":`alarm-clock-minus`,"alarm-plus":`alarm-clock-plus`,"alert-circle":`circle-alert`,"alert-octagon":`octagon-alert`,"alert-triangle":`triangle-alert`,"align-center":`text-align-center`,"align-justify":`text-align-justify`,"align-left":`text-align-start`,"align-right":`text-align-end`,"area-chart":`chart-area`,"arrow-down-01":`arrow-down-0-1`,"arrow-down-10":`arrow-down-1-0`,"arrow-down-az":`arrow-down-a-z`,"arrow-down-circle":`circle-arrow-down`,"arrow-down-left-from-circle":`circle-arrow-out-down-left`,"arrow-down-left-from-square":`square-arrow-out-down-left`,"arrow-down-left-square":`square-arrow-down-left`,"arrow-down-right-from-circle":`circle-arrow-out-down-right`,"arrow-down-right-from-square":`square-arrow-out-down-right`,"arrow-down-right-square":`square-arrow-down-right`,"arrow-down-square":`square-arrow-down`,"arrow-down-za":`arrow-down-z-a`,"arrow-left-circle":`circle-arrow-left`,"arrow-left-square":`square-arrow-left`,"arrow-right-circle":`circle-arrow-right`,"arrow-right-square":`square-arrow-right`,"arrow-up-01":`arrow-up-0-1`,"arrow-up-10":`arrow-up-1-0`,"arrow-up-az":`arrow-up-a-z`,"arrow-up-circle":`circle-arrow-up`,"arrow-up-left-from-circle":`circle-arrow-out-up-left`,"arrow-up-left-from-square":`square-arrow-out-up-left`,"arrow-up-left-square":`square-arrow-up-left`,"arrow-up-right-from-circle":`circle-arrow-out-up-right`,"arrow-up-right-from-square":`square-arrow-out-up-right`,"arrow-up-right-square":`square-arrow-up-right`,"arrow-up-square":`square-arrow-up`,"arrow-up-za":`arrow-up-z-a`,"asterisk-square":`square-asterisk`,"axis-3-d":`axis-3d`,"badge-help":`badge-question-mark`,"bar-chart":`chart-no-axes-column-increasing`,"bar-chart-2":`chart-no-axes-column`,"bar-chart-3":`chart-column`,"bar-chart-4":`chart-column-increasing`,"bar-chart-big":`chart-column-big`,"bar-chart-horizontal":`chart-bar`,"bar-chart-horizontal-big":`chart-bar-big`,"between-horizonal-end":`between-horizontal-end`,"between-horizonal-start":`between-horizontal-start`,"book-template":`book-dashed`,"box-select":`square-dashed`,"candlestick-chart":`chart-candlestick`,"check-circle":`circle-check-big`,"check-circle-2":`circle-check`,"check-square":`square-check-big`,"check-square-2":`square-check`,"chevron-down-circle":`circle-chevron-down`,"chevron-down-square":`square-chevron-down`,"chevron-left-circle":`circle-chevron-left`,"chevron-left-square":`square-chevron-left`,"chevron-right-circle":`circle-chevron-right`,"chevron-right-square":`square-chevron-right`,"chevron-up-circle":`circle-chevron-up`,"chevron-up-square":`square-chevron-up`,"circle-help":`circle-question-mark`,"circle-slashed":`circle-slash-2`,"clipboard-edit":`clipboard-pen`,"clipboard-signature":`clipboard-pen-line`,"code-2":`code-xml`,"code-square":`square-code`,columns:`columns-2`,"columns-settings":`columns-3-cog`,"contact-2":`contact-round`,"curly-braces":`braces`,"divide-circle":`circle-divide`,"divide-square":`square-divide`,"dot-square":`square-dot`,"download-cloud":`cloud-download`,edit:`square-pen`,"edit-2":`pen`,"edit-3":`pen-line`,"equal-square":`square-equal`,"file-audio":`file-headphone`,"file-audio-2":`file-headphone`,"file-axis-3-d":`file-axis-3d`,"file-badge-2":`file-badge`,"file-bar-chart":`file-chart-column-increasing`,"file-bar-chart-2":`file-chart-column`,"file-check-2":`file-check-corner`,"file-code-2":`file-code-corner`,"file-cog-2":`file-cog`,"file-edit":`file-pen`,"file-json":`file-braces`,"file-json-2":`file-braces-corner`,"file-key-2":`file-key`,"file-line-chart":`file-chart-line`,"file-lock-2":`file-lock`,"file-minus-2":`file-minus-corner`,"file-pie-chart":`file-chart-pie`,"file-plus-2":`file-plus-corner`,"file-question":`file-question-mark`,"file-search-2":`file-search-corner`,"file-signature":`file-pen-line`,"file-type-2":`file-type-corner`,"file-video":`file-play`,"file-video-2":`file-video-camera`,"file-volume-2":`file-signal`,"file-warning":`file-exclamation-point`,"file-x-2":`file-x-corner`,filter:`funnel`,"filter-x":`funnel-x`,fingerprint:`fingerprint-pattern`,"flip-horizontal":`square-centerline-dashed-horizontal`,"flip-vertical":`square-centerline-dashed-vertical`,"folder-cog-2":`folder-cog`,"folder-edit":`folder-pen`,"fork-knife":`utensils`,"fork-knife-crossed":`utensils-crossed`,"form-input":`rectangle-ellipsis`,"function-square":`square-function`,"gantt-chart":`chart-no-axes-gantt`,"gantt-chart-square":`square-chart-gantt`,"gauge-circle":`circle-gauge`,"git-commit":`git-commit-horizontal`,"globe-2":`earth`,grab:`hand-grab`,grid:`grid-3x3`,"grid-2-x-2":`grid-2x2`,"grid-2-x-2-check":`grid-2x2-check`,"grid-2-x-2-plus":`grid-2x2-plus`,"grid-2-x-2-x":`grid-2x2-x`,"grid-3-x-3":`grid-3x3`,"help-circle":`circle-question-mark`,"helping-hand":`hand-helping`,home:`house`,"ice-cream":`ice-cream-cone`,"ice-cream-2":`ice-cream-bowl`,indent:`list-indent-increase`,"indent-decrease":`list-indent-decrease`,"indent-increase":`list-indent-increase`,inspect:`square-mouse-pointer`,"kanban-square":`square-kanban`,"kanban-square-dashed":`square-dashed-kanban`,"laptop-2":`laptop-minimal`,"layers-3":`layers`,layout:`panels-top-left`,"letter-text":`text-initial`,"library-square":`square-library`,"line-chart":`chart-line`,"loader-2":`loader-circle`,"location-edit":`map-pin-pen`,"m-square":`square-m`,"mail-question":`mail-question-mark`,"menu-square":`square-menu`,"message-circle-question":`message-circle-question-mark`,"mic-2":`mic-vocal`,"minus-circle":`circle-minus`,"minus-square":`square-minus`,"more-horizontal":`ellipsis`,"more-vertical":`ellipsis-vertical`,"mouse-pointer-square-dashed":`square-dashed-mouse-pointer`,"move-3-d":`move-3d`,outdent:`list-indent-decrease`,"paintbrush-2":`paintbrush-vertical`,palmtree:`tree-palm`,"panel-bottom-inactive":`panel-bottom-dashed`,"panel-left-inactive":`panel-left-dashed`,"panel-right-inactive":`panel-right-dashed`,"panel-top-inactive":`panel-top-dashed`,"panels-left-right":`columns-3`,"panels-top-bottom":`rows-3`,"parking-circle":`circle-parking`,"parking-circle-off":`circle-parking-off`,"parking-square":`square-parking`,"parking-square-off":`square-parking-off`,"pause-circle":`circle-pause`,"pause-octagon":`octagon-pause`,"pen-box":`square-pen`,"pen-square":`square-pen`,"percent-circle":`circle-percent`,"percent-diamond":`diamond-percent`,"percent-square":`square-percent`,"pi-square":`square-pi`,"pie-chart":`chart-pie`,"pilcrow-square":`square-pilcrow`,"play-circle":`circle-play`,"play-square":`square-play`,"plug-zap-2":`plug-zap`,"plus-circle":`circle-plus`,"plus-square":`square-plus`,"power-circle":`circle-power`,"power-square":`square-power`,"rotate-3-d":`rotate-3d`,rows:`rows-2`,"scale-3-d":`scale-3d`,"scatter-chart":`chart-scatter`,"school-2":`university`,"scissors-square":`square-scissors`,"scissors-square-dashed-bottom":`square-bottom-dashed-scissors`,"send-horizonal":`send-horizontal`,"shield-close":`shield-x`,"shield-question":`shield-question-mark`,sidebar:`panel-left`,"sidebar-close":`panel-left-close`,"sidebar-open":`panel-left-open`,"sigma-square":`square-sigma`,"slash-square":`square-slash`,sliders:`sliders-vertical`,"sort-asc":`arrow-up-narrow-wide`,"sort-desc":`arrow-down-wide-narrow`,"split-square-horizontal":`square-split-horizontal`,"split-square-vertical":`square-split-vertical`,"square-gantt-chart":`square-chart-gantt`,stars:`sparkles`,"stop-circle":`circle-stop`,subtitles:`captions`,"table-config":`columns-3-cog`,"terminal-square":`square-terminal`,"test-tube-2":`test-tube-diagonal`,text:`text-align-start`,"text-selection":`text-select`,train:`tram-front`,"tv-2":`tv-minimal`,unlock:`lock-open`,"unlock-keyhole":`lock-keyhole-open`,"upload-cloud":`cloud-upload`,"user-2":`user-round`,"user-check-2":`user-round-check`,"user-circle":`circle-user`,"user-circle-2":`circle-user-round`,"user-cog-2":`user-round-cog`,"user-minus-2":`user-round-minus`,"user-plus-2":`user-round-plus`,"user-square":`square-user`,"user-square-2":`square-user-round`,"user-x-2":`user-round-x`,"users-2":`users-round`,verified:`badge-check`,"wallet-2":`wallet-minimal`,"wand-2":`wand-sparkles`,"wrap-text":`text-wrap`,"x-circle":`circle-x`,"x-octagon":`octagon-x`,"x-square":`square-x`},EE={activity:[`attivita`,`sensore`,`generico`],"air-vent":[`bocchetta`,`aria`,`ventilazione`,`condizionatore`,`vent`],"alarm-smoke":[`fumo`,`antincendio`,`rilevatore`],baby:[`neonato`,`bimbo`,`cameretta`,`babymonitor`],bath:[`bagno`,`vasca`,`doccia`,`bathroom`],battery:[`batteria`],"battery-charging":[`batteria`,`carica`,`ricarica`],"battery-full":[`batteria`,`carica`,`piena`],"battery-low":[`batteria`,`scarica`],bed:[`cameretta`,`letto`,`singolo`],"bed-double":[`camera`,`letto`,`matrimoniale`,`bedroom`],bell:[`campanello`,`suoneria`,`notifica`,`chime`],"bell-off":[`silenzioso`,`notifiche`,`disattivate`,`muto`],"bell-ring":[`campanello`,`suona`,`doorbell`,`notifica`],bike:[`bicicletta`,`bici`,`moto`],bird:[`uccello`,`animale`],blinds:[`tapparella`,`persiana`,`serranda`,`avvolgibile`,`shutter`,`blind`,`veneziana`],bluetooth:[],bone:[`osso`,`cane`],bot:[`robot`,`aspirapolvere`],box:[`scatola`,`contenitore`],briefcase:[`ufficio`,`lavoro`,`valigetta`,`studio`,`office`],building:[`edificio`,`palazzo`],"building-2":[`edificio`,`uffici`,`condominio`],bus:[`autobus`,`pullman`],cable:[`cavo`],calendar:[`calendario`,`data`,`pianificazione`],camera:[`telecamera`,`videocamera`,`cam`],car:[`auto`,`macchina`,`veicolo`,`parcheggio`,`garage`],cat:[`gatto`,`animale`],"circle-dot":[`pulsante`,`bottone`,`button`,`dot`],"circle-parking":[`parcheggio`,`posto`,`auto`,`garage`,`parking`],clock:[`orologio`,`ora`,`tempo`],cloud:[`nuvola`,`nuvoloso`],"cloud-rain":[`pioggia`],"cloud-sun":[`variabile`,`sole`,`nuvole`],"cooking-pot":[`pentola`,`cucina`,`fornello`],cpu:[`processore`,`chip`,`dispositivo`],crosshair:[`mirino`,`puntamento`,`centro`],dog:[`cane`,`animale`],"door-closed":[`porta`,`chiusa`,`contatto`],"door-open":[`porta`,`aperta`,`contatto`,`ingresso`,`uscita`,`entrance`],drill:[`officina`,`trapano`,`lavori`],droplet:[`goccia`,`acqua`,`perdita`,`allagamento`],droplets:[`umidita`,`acqua`,`allagamento`,`perdita`],dumbbell:[`palestra`,`attrezzi`],eye:[`occhio`,`visibile`,`visto`],"eye-off":[`privacy`,`nascosto`,`oscurato`,`mascherato`,`invisibile`],fan:[`ventilatore`,`ventola`,`aria`],fence:[`recinto`,`cancello`,`staccionata`,`perimetro`,`gate`],flame:[`fiamma`,`gas`,`fuoco`,`incendio`],flashlight:[`faretto`,`torcia`,`spot`,`faro`],flower:[`fiore`,`pianta`],footprints:[`movimento`,`passi`,`presenza`,`motion`],"gamepad-2":[`console`,`gioco`,`joystick`],gauge:[`misura`,`livello`,`pressione`,`indicatore`],hammer:[`officina`,`martello`,`lavori`],"hard-drive":[`disco`,`hdd`,`archiviazione`,`storage`],hash:[`numero`,`contatore`,`valore`],heart:[`cuore`,`preferito`,`salute`],"heart-pulse":[`battito`,`salute`,`monitoraggio`],heater:[`riscaldamento`,`termosifone`,`stufa`,`calore`],house:[`casa`,`abitazione`,`home`],image:[`immagine`,`foto`,`snapshot`],key:[`chiave`],"key-round":[`chiave`,`tonda`],lamp:[`lampada`,`abatjour`],"lamp-ceiling":[`plafoniera`,`lampadario`,`luce`,`soffitto`],"lamp-desk":[`lampada`,`scrivania`,`abatjour`],"lamp-floor":[`piantana`,`lampada`,`terra`],laptop:[`portatile`,`notebook`],leaf:[`foglia`,`pianta`,`verde`],lightbulb:[`luce`,`lampadina`,`lampada`,`light`],lock:[`serratura`,`chiave`,`lucchetto`,`chiuso`,`locked`],"lock-open":[`serratura`,`aperta`,`sbloccato`,`unlocked`],mailbox:[`cassetta`,`postale`,`posta`],"map-pin":[`posizione`,`luogo`,`mappa`,`pin`],mic:[`microfono`,`audio`],"mic-off":[`microfono`,`spento`,`muto`],microwave:[`microonde`,`forno`],monitor:[`schermo`],"monitor-play":[`schermo`,`riproduzione`,`player`,`display`],moon:[`notte`,`luna`,`notturna`,`nightvision`],mountain:[`montagna`,`esterno`,`panorama`],music:[`musica`],network:[`rete`,`lan`],package:[`pacco`,`consegna`,`storage`],"paw-print":[`animale`,`zampa`,`pet`],"person-standing":[`persona`,`piedi`,`presenza`],phone:[`telefono`,`chiamata`],pipette:[`qualita`,`aria`,`misura`,`campione`],plane:[`aereo`],plug:[`presa`,`spina`],"plug-zap":[`presa`,`alimentata`],power:[`accensione`,`alimentazione`],"power-off":[`spegnimento`,`spento`],printer:[`stampante`],projector:[`proiettore`],radar:[`movimento`,`presenza`,`pir`,`rilevamento`,`perimeter`],radio:[],"refresh-cw":[`aggiorna`,`ricarica`,`refresh`,`reload`,`ciclo`],refrigerator:[`frigorifero`,`frigo`],route:[`percorso`,`strada`,`vialetto`,`tragitto`,`street`],router:[`modem`],sailboat:[`barca`,`imbarcazione`],"scroll-text":[`registro`,`log`,`testo`],server:[`nas`],shield:[`scudo`,`protezione`,`sicurezza`,`allarme`],"shield-alert":[`manomissione`,`allarme`,`tamper`,`avviso`],"shield-check":[`protetto`,`sicuro`,`armato`],"shield-off":[`protezione`,`disattivata`,`disarmato`],siren:[`sirena`,`allarme`],"sliders-horizontal":[`regolazione`,`cursori`,`impostazioni`,`slider`],smartphone:[`telefono`,`cellulare`],snowflake:[`freddo`,`raffrescamento`,`aria`,`condizionata`,`neve`],sofa:[`salone`,`soggiorno`,`divano`,`living`,`living room`],sparkles:[`automatico`,`intelligente`,`ai`,`scena`],speaker:[`altoparlante`,`cassa`],sprout:[`irrigazione`,`pianta`,`germoglio`,`orto`],star:[`preferito`,`stella`,`importante`],store:[`negozio`,`ingresso`,`vetrina`,`shop`],sun:[`sole`,`luminosita`,`giorno`,`esterno`,`outdoor`],"sun-medium":[`sole`,`luminosita`],sunrise:[`alba`],tablet:[`ipad`],thermometer:[`temperatura`,`termometro`,`termostato`],"thermometer-snowflake":[`freddo`,`temperatura`,`bassa`],"thermometer-sun":[`caldo`,`temperatura`,`alta`],timer:[`conto`,`rovescia`],"toggle-left":[`interruttore`,`switch`,`toggle`],"toggle-right":[`interruttore`,`switch`,`toggle`,`acceso`],tractor:[`trattore`,`tosaerba`,`giardino`],"train-front":[`treno`],"tree-pine":[`albero`,`pino`,`giardino`],trees:[`giardino`,`alberi`,`esterno`,`parco`,`garden`],truck:[`camion`,`furgone`,`consegna`],tv:[`televisore`],umbrella:[`tenda`,`markise`,`ombrellone`,`pergola`,`veranda`,`terrace`],user:[`persona`,`utente`],users:[`persone`,`gruppo`,`famiglia`],utensils:[`cucina`,`posate`,`sala`,`pranzo`,`kitchen`],vibrate:[`vibrazione`,`urto`,`tamper`],video:[],"video-off":[`video`,`spento`],"volume-2":[`volume`,`audio`,`altoparlante`,`suono`],"volume-x":[`muto`,`silenziato`,`volume`,`spento`],warehouse:[`magazzino`,`capanno`,`deposito`,`cantina`,`warehouse`],"washing-machine":[`lavatrice`,`lavastoviglie`,`asciugatrice`],waves:[`onde`,`acqua`,`vibrazione`],"waves-ladder":[`piscina`,`vasca`,`pool`],wifi:[`rete`,`segnale`],"wifi-off":[`wifi`,`assente`,`offline`,`disconnesso`],wind:[`vento`,`aria`,`gas`,`monossido`,`co`],workflow:[`automazione`,`flusso`,`scenario`],wrench:[`officina`,`manutenzione`,`attrezzi`,`utenze`],zap:[`energia`,`corrente`,`consumo`,`watt`,`elettricita`]},DE={gauge2:`gauge`},OE=new Set(SE),kE=new Map([...Object.entries(TE),...Object.entries(DE)]);function AE(e){return typeof e==`string`&&OE.has(e)}function jE(e){if(typeof e==`string`)return AE(e)?e:kE.get(e)}function ME(e,t){return jE(e)??t}var NE=v(AE,`Not an icon of the catalog`),PE=SE.map((e,t)=>{let[n,r]=CE[t]??[[],[]],i=n.flatMap(e=>{let t=xE[e];return t===void 0?[]:[t]});return{key:e,categories:i,primaryCategory:i[0]??xE[0],tags:r,synonyms:EE[e]??[]}}),FE=new Map(PE.map(e=>[e.key,e]));function IE(e){return FE.get(e)}var LE=PE,RE=[`devices`,`home`,`security`,`buildings`,`connectivity`,`multimedia`,`nature`,`weather`,`transportation`,`animals`],zE=new Set(PE.map(e=>e.primaryCategory)),BE=[...RE,...xE.filter(e=>!RE.includes(e))].filter(e=>zE.has(e));function VE(e){return PE.filter(t=>t.primaryCategory===e)}function HE(e){return e.normalize(`NFD`).replace(/\p{Diacritic}/gu,``).toLowerCase().replace(/[_-]+/g,` `).trim()}function UE(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 WE(e,t,n){return t===e?100:t.startsWith(e)?80:t.split(` `).some(t=>t.startsWith(e))?60:t.includes(e)?40:n&&UE(e,t)?15:0}var GE=new Map;function KE(e){let t=GE.get(e.key);if(t!==void 0)return t;let n={key:HE(e.key),synonyms:e.synonyms.map(HE),tags:e.tags.map(HE)};return GE.set(e.key,n),n}function qE(e,t){let n=HE(e);if(n.length===0)return PE.map(e=>({entry:e,score:0}));let r=[];for(let e of PE){let i=KE(e),a=WE(n,i.key,!0),o=a>0?a+2:0;for(let r of[...i.synonyms,...(t?.get(e.key)??[]).map(HE)]){let e=WE(n,r,!0);e>0&&e+1>o&&(o=e+1)}for(let e of i.tags){let t=WE(n,e,!1);t>o&&(o=t)}o>0&&r.push({entry:e,score:o})}return r.toSorted((e,t)=>t.score-e.score)}function JE(e){let t=e.replace(/-/g,` `);return t.charAt(0).toUpperCase()+t.slice(1)}var YE=`map-pin`,XE=d({locationKey:l(),icon:NE});function ZE(e){return e.trim().toLowerCase()}var QE=400,$E=d({locationKey:l(),description:l()}),eD=d({zoneKey:l(),label:l(),icon:NE.nullable(),locationKeys:w(l())});function tD(e){return e.trim().toLowerCase()}var nD=d({connected:T(),deviceCount:i(),error:l().optional(),motionSliceWriter:h(`orchestrator`).optional()}),rD=d({externalId:l(),name:l(),type:l(),metadata:x(l(),o()).optional()}),iD=d({stableId:l(),type:C(P),suggestedName:l(),prefilledConfig:x(l(),o()),sourceInfo:HT.optional(),alreadyOnboarded:T().optional(),onboardedDeviceId:i().optional(),onboardedName:l().optional()}),aD=d({id:i(),stableId:l(),addonId:l(),type:l(),name:l(),parentDeviceId:i().nullable(),online:T(),features:w(l()),config:x(l(),o()),sourceInfo:HT.optional()}),oD=d({status:C([`ok`,`error`]),labels:w(l()).optional(),error:l().optional()}),sD=o(),cD={name:`device-provider`,scope:`system`,mode:`collection`,methods:{start:M(y(),y(),{kind:`mutation`}),stop:M(y(),y(),{kind:`mutation`}),getStatus:M(y(),nD),getDevices:M(y(),w(d({id:l(),name:l(),type:l()}))),reloadDevice:M(d({stableId:l()}),d({deviceId:i()}),{kind:`mutation`,timeoutMs:3*6e4}),supportsDiscovery:M(d({}),T()),discoverDevices:M(d({params:x(l(),o()).optional()}),w(iD),{kind:`mutation`,auth:`admin`}),getDiscoveryParamsSchema:M(d({}),sD),getManualCreationType:M(d({}),d({deviceType:C(P).nullable()})),adoptDiscoveredDevice:M(d({candidate:iD}),aD,{kind:`mutation`,auth:`admin`}),supportsManualCreation:M(d({}),T()),getChildCreationSchema:M(d({type:C(P)}),sD),createDevice:M(d({type:C(P),config:x(l(),o())}),aD,{kind:`mutation`,auth:`admin`}),testCreationField:M(d({type:C(P),key:l(),value:o(),formValues:x(l(),o()).optional()}),oD,{kind:`mutation`,auth:`admin`})}},lD=d({childKey:l(),section:l(),order:i().optional(),collapsed:T().optional()}),uD=d({unit:l().min(1).optional(),precision:i().int().min(0).max(10).optional()}),dD=d({icon:l().min(1).optional(),label:l().min(1).optional(),unit:l().min(1).optional(),precision:i().int().min(0).max(10).optional(),hidden:T().optional(),perCap:x(l(),uD).optional()}),fD=d({unit:l().min(1).optional(),precision:i().int().min(0).max(10).optional(),icon:l().min(1).optional()}),pD=d({id:i(),stableId:l(),addonId:l(),type:C(P),name:l(),location:l().nullable(),disabled:T(),parentDeviceId:i().nullable(),role:l().nullable().optional(),online:T(),probed:T().optional(),features:w(l()),isCamera:T(),config:x(l(),o()),secretConfigPaths:w(l()).optional(),metadata:x(l(),o()).nullable().optional(),sourceInfo:HT.optional(),integrationId:l().optional(),linkDeviceId:i().nullable().optional(),primaryChildEntityId:l().nullable().optional(),childLayout:w(lD).readonly().optional(),display:dD.optional()}),mD=d({key:l(),value:o(),description:l().optional()}),hD=C([`manual`]),gD=d({deviceId:i(),name:l(),location:l().nullable(),features:w(l()),producesTrackedEvents:T().optional()}),_D=d({deviceIds:w(i().int().positive()),trackedDeviceIds:w(i().int().positive()).optional()}),vD={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:[P.Camera],sourceCaps:`any`,cardinality:`many`,value:_D},yD=d({deviceId:i(),mode:hD,devices:w(gD)}),bD=d({deviceId:i(),entries:w(d({capName:l(),kind:C([`native`,`wrapped`]),providerAddonId:l(),providerNodeId:l(),nativeAddonId:l()}))}),xD=m(`kind`,[d({kind:h(`value`),wrapperAddonId:l().nullable()}),d({kind:h(`missing`)}),d({kind:h(`failed`),error:l()})]),SD=d({id:i(),stableId:l(),type:l(),name:l(),location:l().nullable(),disabled:T(),parentDeviceId:i().nullable(),role:l().nullable().optional()}),CD=d({id:i(),stableId:l(),addonId:l(),type:l(),name:l(),userNamed:T().optional(),location:l().nullable(),disabled:T(),parentDeviceId:i().nullable(),metadata:x(l(),o()).nullable().optional(),sourceInfo:HT.optional(),integrationId:l().optional(),linkDeviceId:i().nullable().optional(),primaryChildEntityId:l().nullable().optional(),childLayout:w(lD).readonly().optional(),role:l().nullable().optional(),display:dD.optional()}),wD=o().nullable(),TD=d({streamId:l(),width:i().optional(),height:i().optional(),codec:l().optional(),fps:i().optional(),bitrateKbps:i().optional()}),ED=d({addonId:l(),stableId:l(),id:i(),type:l(),name:l(),location:l().nullable().optional(),disabled:T().optional(),parentDeviceId:i().nullable(),role:l().nullable().optional(),features:w(l()).optional(),config:x(l(),o()),secretConfigPaths:w(l()).optional()}),DD=d({deviceId:i().int().positive(),deletedAt:i(),providerAddonId:l()}),OD=2160*60*60*1e3,kD=d({deviceId:i().int().positive(),stores:x(l(),i().int().nonnegative())}),AD=d({status:C([`skipped`,`dry-run`,`cleaned`]),reason:l().nullable(),devices:w(kD),unreachable:w(l())}),jD=d({deviceId:i()}),MD=d({deviceId:i(),data:x(l(),o()),secretConfigPaths:w(l()).optional()}),ND=C([`off`,`on`,`not-offered`,`unreachable`]),PD=d({deviceId:i(),switchId:wu,outcome:ND,detail:l().optional()}),FD=d({sourceId:i(),targetId:i(),switches:w(PD).readonly(),sourceStillLive:w(wu).readonly(),swapped:T()}),ID={name:`device-manager`,scope:`system`,mode:`singleton`,extensionSlots:[vD],methods:{allocateDeviceId:M(d({addonId:l(),stableId:l()}),d({id:i()}),{kind:`mutation`}),migrateDevice:M(d({sourceId:i(),targetId:i()}),FD,{kind:`mutation`,auth:`admin`,timeoutMs:12*6e4}),registerDevice:M(ED,y(),{kind:`mutation`}),removeDevice:M(jD,y(),{kind:`mutation`}),persistConfig:M(MD,y(),{kind:`mutation`,auth:`admin`}),loadConfig:M(d({deviceId:i()}),x(l(),o()),{auth:`admin`}),loadRuntimeState:M(d({deviceId:i()}),x(l(),o()),{auth:`admin`}),loadMeta:M(d({deviceId:i()}),CD.nullable()),setName:M(d({deviceId:i(),name:l()}),y(),{kind:`mutation`,auth:`admin`}),setLocation:M(d({deviceId:i(),location:l().nullable()}),y(),{kind:`mutation`,auth:`admin`}),setType:M(d({deviceId:i(),type:C(P)}),y(),{kind:`mutation`,auth:`admin`}),setIntegrationId:M(d({deviceId:i(),integrationId:l()}),y(),{kind:`mutation`,auth:`admin`}),setLinkDeviceId:M(d({deviceId:i(),linkDeviceId:i().nullable()}),y(),{kind:`mutation`,auth:`admin`}),setPrimaryChildEntityId:M(d({deviceId:i(),primaryChildEntityId:l().nullable()}),y(),{kind:`mutation`,auth:`admin`}),setChildLayout:M(d({deviceId:i(),childLayout:w(lD).readonly()}),y(),{kind:`mutation`,auth:`admin`}),setDisplay:M(d({deviceId:i(),display:dD.nullable()}),y(),{kind:`mutation`,auth:`admin`}),getRoleDisplayDefaults:M(d({}),d({defaults:x(l(),fD)}),{role:`viewer`,kind:`query`}),setRoleDisplayDefaults:M(d({defaults:x(l(),fD)}),y(),{kind:`mutation`,auth:`admin`}),getWireableFields:M(d({deviceId:i(),includeSynthesizable:T().optional()}),d({caps:w(d({cap:l(),fields:w(d({path:l(),kind:C([`string`,`number`,`boolean`,`enum`]),enumValues:w(l()).optional(),item:T().optional(),quantity:Si.optional()})).readonly(),itemArray:d({path:l(),keyField:l()}).optional()})).readonly()}),{kind:`query`}),setRole:M(d({deviceId:i(),role:l().nullable()}),y(),{kind:`mutation`,auth:`admin`}),applyInitialMeta:M(d({deviceId:i(),name:l().optional(),location:l().nullable().optional(),type:C(P).optional(),integrationId:l().optional(),linkDeviceId:i().nullable().optional(),role:l().nullable().optional()}),y(),{kind:`mutation`,auth:`admin`}),setMetadata:M(d({deviceId:i(),patch:x(l(),o())}),y(),{kind:`mutation`,auth:`admin`}),listLocations:M(y(),w(l())),addLocation:M(d({name:l()}),y(),{kind:`mutation`,auth:`admin`}),removeLocation:M(d({name:l(),cascade:T().optional()}),y(),{kind:`mutation`,auth:`admin`}),renameLocation:M(d({from:l(),to:l()}),d({moved:i()}),{kind:`mutation`,auth:`admin`}),listLocationIcons:M(y(),w(XE),{role:`viewer`}),setLocationIcon:M(d({location:l(),icon:NE.nullable()}),y(),{kind:`mutation`,auth:`admin`}),listLocationDescriptions:M(y(),w($E)),setLocationDescription:M(d({location:l(),description:l().max(400).nullable()}),y(),{kind:`mutation`,auth:`admin`}),listSiteZones:M(y(),w(eD),{role:`viewer`}),setSiteZone:M(d({name:l(),icon:NE.nullable().optional()}),y(),{kind:`mutation`,auth:`admin`}),removeSiteZone:M(d({name:l()}),y(),{kind:`mutation`,auth:`admin`}),renameSiteZone:M(d({from:l(),to:l()}),y(),{kind:`mutation`,auth:`admin`}),setLocationZone:M(d({location:l(),zone:l().nullable()}),y(),{kind:`mutation`,auth:`admin`}),setDisabled:M(d({deviceId:i(),disabled:T()}),y(),{kind:`mutation`,auth:`admin`}),listPersistedByAddon:M(d({addonId:l()}),w(SD)),listAll:M(d({addonId:l().optional(),projection:C([`full`,`slim`]).optional(),isCamera:T().optional(),deviceIds:w(i()).optional()}),w(pD),{role:`viewer`}),getDevice:M(d({deviceId:i()}),pD.nullable()),getChildren:M(d({parentDeviceId:i()}),w(pD),{role:`viewer`}),getChildrenBatch:M(d({parentDeviceIds:w(i()).max(256)}),x(l(),w(pD))),getLinkedDevices:M(d({deviceId:i()}),d({mode:hD,devices:w(gD)}),{role:`viewer`}),getLinkedDevicesBatch:M(d({deviceIds:w(i())}),w(yD),{role:`viewer`}),getStreamSources:M(d({deviceId:i()}),w(Ui)),getConfigSchema:M(d({deviceId:i()}),w(mD)),getSettingsSchema:M(d({deviceId:i()}),wD),updateConfig:M(d({deviceId:i(),values:x(l(),o())}),d({success:h(!0)}),{kind:`mutation`,auth:`admin`}),enable:M(d({deviceId:i()}),d({success:h(!0)}),{kind:`mutation`,auth:`admin`}),disable:M(d({deviceId:i()}),d({success:h(!0)}),{kind:`mutation`,auth:`admin`}),remove:M(d({deviceId:i()}),d({success:h(!0)}),{kind:`mutation`,auth:`admin`}),listDeletedSince:M(d({sinceMs:i()}),w(DD).readonly(),{auth:`admin`}),cleanupDeletedDevicesData:M(d({confirm:T()}),AD,{kind:`mutation`,auth:`admin`}),removeByIntegration:M(d({integrationId:l()}),d({removed:i()}),{kind:`mutation`,auth:`admin`}),getStreamProfileMap:M(d({deviceId:i()}),x(l(),l().nullable())),setStreamProfileMap:M(d({deviceId:i(),profileMap:x(l(),l().nullable())}),d({success:h(!0)}),{kind:`mutation`,auth:`admin`}),probeStreams:M(d({deviceId:i()}),w(TD),{kind:`mutation`,auth:`admin`}),getBindings:M(d({deviceId:i()}),bD,{role:`viewer`}),getBindingsBatch:M(d({deviceIds:w(i())}),w(bD)),getAllBindings:M(d({}),w(bD)),listDeviceIdsByCaps:M(d({capNames:w(l().min(1)).min(1).max(16)}),w(i()),{role:`viewer`}),setWrapperActive:M(d({deviceId:i(),capName:l(),wrapperAddonId:l(),active:T()}),y(),{kind:`mutation`,auth:`admin`}),getWrapperActivation:M(d({deviceId:i(),capName:l().min(1)}),xD),listWrappersForCap:M(d({capName:l()}),w(l())),listBindableCapsForDeviceType:M(d({deviceType:l()}),w(d({capName:l(),wrappers:w(l())}))),getDeviceSettingsAggregate:M(d({deviceId:i()}),mv.nullable()),getDeviceLiveInfoAggregate:M(d({deviceId:i()}),mv.nullable(),{role:`viewer`}),getDeviceAggregate:M(d({deviceId:i()}),d({settings:mv.nullable(),live:mv.nullable()})),runDeviceAction:M(d({deviceId:i().int().nonnegative(),action:l().min(1),input:o()}),o(),{kind:`mutation`}),updateDeviceField:M(d({deviceId:i(),writerCapName:l(),writerAddonId:l(),key:l(),value:o()}),d({success:h(!0)}),{kind:`mutation`,auth:`admin`}),updateDeviceFieldsBatch:M(d({deviceId:i(),changes:w(d({writerCapName:l(),writerAddonId:l(),key:l(),value:o()}))}),d({success:h(!0),failures:w(d({writerCapName:l(),writerAddonId:l(),error:l()}))}),{kind:`mutation`,auth:`admin`}),discoverDevices:M(d({addonId:l()}),w(iD),{kind:`mutation`,auth:`admin`}),adoptDevice:M(d({addonId:l(),candidate:iD,integrationId:l().optional()}),aD,{kind:`mutation`,auth:`admin`}),getCreationSchema:M(d({addonId:l(),type:C(P)}),o().nullable()),createDevice:M(d({addonId:l(),type:C(P),config:x(l(),o()),integrationId:l().optional()}),aD,{kind:`mutation`,auth:`admin`}),testCreationField:M(d({addonId:l(),type:C(P),key:l(),value:o(),formValues:x(l(),o()).optional()}),oD,{kind:`mutation`,auth:`admin`}),adoptionListCandidateFilters:M(d({addonId:l(),integrationId:l()}),d({filters:w(QT)}),{auth:`admin`}),adoptionListCandidates:M(eE.extend({addonId:l()}),tE,{auth:`admin`}),adoptionRefresh:M(d({addonId:l(),integrationId:l()}),rE,{kind:`mutation`,auth:`admin`}),adoptionAdopt:M(aE.extend({addonId:l()}),oE,{kind:`mutation`,auth:`admin`}),adoptionRelease:M(sE.extend({addonId:l()}),y(),{kind:`mutation`,auth:`admin`}),adoptionStartJob:M(aE.extend({addonId:l()}),d({jobId:l()}),{kind:`mutation`,auth:`admin`}),adoptionListJobs:M(d({addonId:l(),integrationId:l().optional()}),w(Cu).readonly(),{auth:`admin`}),adoptionCancelJob:M(d({jobId:l()}),d({cancelled:T()}),{kind:`mutation`,auth:`admin`}),adoptionResync:M(cE,lE,{kind:`mutation`,auth:`admin`}),discoveryProviders:M(d({}),d({providers:w(d({addonId:l(),label:l()})).readonly()}),{auth:`admin`}),discoverAllProviders:M(d({}),d({groups:w(d({addonId:l(),label:l(),candidates:w(iD).readonly(),error:l().nullable()})).readonly()}),{kind:`mutation`,auth:`admin`}),discoverProvider:M(d({addonId:l(),params:x(l(),o()).optional()}),d({candidates:w(iD).readonly()}),{kind:`mutation`,auth:`admin`}),providerCreationType:M(d({addonId:l()}),d({deviceType:C(P).nullable()}),{auth:`admin`}),providerDiscoveryParamsSchema:M(d({addonId:l()}),o(),{auth:`admin`}),testField:M(d({deviceId:i(),key:l(),value:o()}),oD,{kind:`mutation`,auth:`admin`}),getDeviceStatusAggregate:M(d({deviceId:i(),caps:w(l()).readonly().optional()}),x(l(),o().nullable())),getDeviceStatusAggregateBatch:M(d({deviceIds:w(i()).readonly(),caps:w(l()).readonly().optional()}),x(l(),x(l(),o().nullable())),{role:`viewer`})}},LD=[`linked-devices`],RD=C(LD),zD={"linked-devices":{descriptor:vD,declaringCap:`device-manager`,hostDeviceTypes:[P.Camera]}},BD=m(`slot`,[_D.extend({slot:h(`linked-devices`)})]),VD=[P.Camera],HD=`:`,UD=`listSlots`,WD=m(`state`,[d({state:h(`ok`)}),d({state:h(`unreachable`),reason:l()})]),GD=d({source:l(),label:l(),addonId:l().optional(),availability:WD}),KD=C([`ok`,`missing`,`foreign`,`unavailable`]),qD=d({deviceId:i().int(),name:l().nullable(),health:KD,detail:l().optional()}),JD=d({state:C([`active`,`inactive`,`unknown`]),authority:l(),detail:l().optional()}),YD=d({state:h(`ok`),slotRef:l(),slot:RD,authority:l(),activation:JD.nullable(),value:BD,sources:w(qD),impliedSources:w(qD).optional()}),XD=d({state:h(`unreachable`),addonId:l(),reason:l()}),ZD=m(`state`,[YD,XD]);function QD(e,t){return{state:`unreachable`,addonId:e,reason:t}}var $D=d({deviceId:i().int(),name:l(),type:l(),location:l().nullable(),parentName:l().nullable(),suggested:T(),reason:l().nullable()}),eO=d({candidates:w($D)}),tO=d({applied:h(!0),reload:C([`none`,`host`,`parent`])}),nO=d({deviceId:i().int(),slotRef:l().min(1)}),rO=nO.extend({value:BD}),iO={name:`device-extension`,scope:`device`,mode:`collection`,kind:`wrapper`,defaultActive:!0,deviceTypes:VD,deviceConfig:{ui:{kind:`widget`,widgetId:`host/extensions-panel`,tab:`general`,label:`Extensions`,order:72}},methods:{listSources:M(d({deviceId:i().int()}),w(GD)),listSlots:M(d({deviceId:i().int()}),w(ZD)),listCandidates:M(nO,eO),setSlot:M(rO,tO,{kind:`mutation`,auth:`admin`})}},aO=C([`replace`,`add`]),oO=m(`ok`,[d({ok:h(!0),changed:T()}),d({ok:h(!1),code:C([`owned-by-other`,`not-claimed`,`field-not-claimed`,`invalid-slice`,`unknown-device`,`row-unreadable`,`migration-in-flight`]),message:l()})]),sO=d({deviceId:i(),capName:l(),owner:l().min(1),mode:aO,fields:w(l().min(1)).min(1)}),cO=m(`state`,[d({state:h(`loaded`),claims:w(sO)}),d({state:h(`not-loaded`),reason:l()})]),lO={name:`device-state`,scope:`system`,mode:`singleton`,methods:{getSnapshot:M(d({deviceId:i()}),x(l(),x(l(),o()))),getCapSlice:M(d({deviceId:i(),capName:l()}),x(l(),o()).nullable()),getAllSnapshots:M(d({}),x(l(),x(l(),x(l(),o())))),setCapSlice:M(d({deviceId:i(),capName:l(),slice:x(l(),o())}),y(),{kind:`mutation`}),claimFields:M(d({deviceId:i(),capName:l(),owner:l().min(1),mode:aO,fields:w(l().min(1)).min(1),values:x(l(),o())}),oO,{kind:`mutation`,auth:`admin`}),patchOwnedFields:M(d({deviceId:i(),capName:l(),owner:l().min(1),values:x(l(),o())}),oO,{kind:`mutation`,auth:`admin`}),releaseClaim:M(d({deviceId:i(),capName:l(),owner:l().min(1)}),oO,{kind:`mutation`,auth:`admin`}),listClaims:M(d({ownerPrefix:l().optional()}),cO,{auth:`admin`}),getNativeCapSlice:M(d({deviceId:i(),capName:l()}),x(l(),o()).nullable(),{auth:`admin`})},events:{onChanged:ma(d({deviceId:i(),capName:l(),slice:x(l(),o())}))}},uO=d({embedding:w(i()),inferenceMs:i()}),dO=C([`image`,`text`]),fO=d({modelId:l(),tower:dO,nodeId:l(),crashes:i(),windowMs:i(),sinceMs:i(),lastReason:l()}),pO=d({modelId:l(),tower:dO,nodeId:l(),attempts:i(),sinceMs:i(),lastReason:l()}),mO=d({modelId:l(),embeddingDim:i(),ready:T(),nodeId:l().optional(),failedModels:w(fO).optional(),failedRequirements:w(pO).optional()}),hO=`embedding-model-failed`,gO=`embedding-requirements-unavailable`,_O=`embedding-requirements-failed`,vO=C([hO,gO,_O]);function yO(e,t){return`[${e} model=${t.modelId} tower=${t.tower} node=${t.nodeId}]`}function bO(e){return Error(`${yO(hO,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 xO(e,t){return Error(`${yO(gO,e)} ${e.modelId} (${e.tower} tower) on ${e.nodeId}: ${t}`)}function SO(e){return Error(`${yO(_O,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 CO=RegExp(`\\[(${hO}|${gO}|${_O}) model=([^\\s\\]]+) tower=(image|text) node=([^\\s\\]]+)\\]`);function wO(e){let t=e instanceof Error?e.message:String(e),n=CO.exec(t);if(n===null)return null;let r=vO.safeParse(n[1]),i=dO.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 TO(e){return EO(e)!==null}function EO(e){let t=wO(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 DO={name:`embedding-encoder`,scope:`system`,mode:`collection`,internal:!0,methods:{encode:M(d({crop:S(Uint8Array),width:i(),height:i()}),uO,{auth:`admin`}),encodeText:M(d({text:l(),modelId:l().min(1).optional()}),uO,{auth:`admin`}),getInfo:M(y(),mO,{auth:`admin`}),resetFailedModels:M(d({modelId:l().min(1).optional()}),d({cleared:w(l()),nodeId:l()}),{kind:`mutation`,auth:`admin`})}},OO=d({deviceId:i().int().positive(),deletedAt:i(),providerAddonId:l()}),kO=d({counts:x(l(),i().int().nonnegative())}),AO=d({store:l(),deviceId:i().int().positive(),count:i().int().nonnegative()}),jO={name:`device-removal-hook`,scope:`system`,mode:`collection`,internal:!0,methods:{onDeviceRemoved:M(OO,kO,{kind:`mutation`,auth:`admin`}),listDeviceData:M(y(),w(AO).readonly(),{auth:`admin`})},mount:{kind:`skip`}},MO=d({reason:l(),count:i().int().nonnegative()}),NO=d({family:l(),deviceId:i().int().positive(),variant:l().optional(),sinceMs:i(),atMs:i(),attempts:i().int().nonnegative(),succeeded:i().int().nonnegative(),reasons:w(MO).readonly()}),PO={name:`failure-contribution`,scope:`system`,mode:`collection`,internal:!0,methods:{list:M(y(),w(NO).readonly())},mount:{kind:`skip`}},FO=d({name:l(),path:l()}),IO=d({path:l(),entries:w(FO).readonly(),freeBytes:i(),totalBytes:i()}),LO={name:`filesystem-browse`,scope:`system`,mode:`singleton`,internal:!0,methods:{listAllowedRoots:M(y(),w(l()).readonly(),{auth:`admin`}),browse:M(d({path:l()}),IO,{auth:`admin`}),createDir:M(d({path:l()}),d({path:l()}),{kind:`mutation`,auth:`admin`})}},RO=`https://camstack.zentik.app`,zO=`/viewer/camstack`;function BO(e){if(e==null||e===``)return!1;try{return new URL(e).origin===RO}catch{return!1}}function VO(e){let t=e.baseUrl??e.resolved;return BO(t)?{form:`app`,hubBaseUrl:e.appLinkHub??null}:{form:`hub`,hubBaseUrl:t}}function HO(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 UO(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=HO(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 WO(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 GO(e){return e.length===0?``:`?${e.map(([e,t])=>`${encodeURIComponent(e)}=${encodeURIComponent(t)}`).join(`&`)}`}function KO(e){let t=WO(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:HO(r),n=e===null?t.query:[...t.query,[`hub`,e]];return`${RO}${t.path}${GO(n)}`}return r===``||BO(r)?null:`${r}${zO}${t.path}${GO(t.query)}`}var qO=[`appConnections`,`notificationTaps`,`internal`,`publicEndpoint`],JO=[`notificationTaps`,`internal`,`publicEndpoint`];function YO(e){return e!==`appConnections`}var XO={appConnections:[],notificationTaps:null,internal:null,publicEndpoint:null},ZO=/^\d{1,3}(?:\.\d{1,3}){3}$/;function QO(e){try{let t=new URL(e).hostname;return t.length>0?t:null}catch{return null}}function $O(e){return e.replace(/\/+$/,``)}function ek(e){return e.kind===`public`&&e.interfaceKind===`vpn`}function tk(e){return e.kind===`public`&&e.interfaceKind===`public`}function nk(e){return(e.kind===`lan-ipv4`||e.kind===`lan-ipv6`)&&e.plausible}function rk(e){if(e.kind!==`lan-ipv4`||!e.plausible)return!1;let t=QO(e.baseUrl);return t!==null&&ZO.test(t)}function ik(e){return e.stable===!1}function ak(e,t){return t.kind===`loopback`||t.kind===`app-link`||t.kind===`custom`||QO(t.baseUrl)===null||ik(t)?null:e===`internal`?rk(t)?0:nk(t)?1:ek(t)?2:null:tk(t)?0:ek(t)?1:rk(t)?2:nk(t)?3:null}var ok=new Set([`localhost`,`0.0.0.0`,`::1`,`[::1]`,`::`,`[::]`]);function sk(e){let t=e.toLowerCase();return ok.has(t)||t.endsWith(`.localhost`)?!0:/^127\.\d{1,3}\.\d{1,3}\.\d{1,3}$/.test(t)}function ck(e){let t=e.trim();if(t===``)return{ok:!1,reason:`Enter an address, e.g. https://192.0.2.20: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.`}:sk(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 lk=`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 uk(e,t,n={}){if(BO(t))return e===`notificationTaps`?{ok:!0,baseUrl:RO}:{ok:!1,reason:`The CamStack app link is not a hub address — only notification taps can use it.`};let r=ck(t);return r.ok&&e===`publicEndpoint`&&r.baseUrl.startsWith(`http:`)&&n.acceptInsecureHttp!==!0?{ok:!1,reason:lk}:r}function dk(e,t){if(t===null||t===``)return null;let n=uk(e,t,{acceptInsecureHttp:!0});return n.ok?n.baseUrl:null}function fk(e,t){let n=e.flatMap(e=>{let n=ak(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:$O(n.endpoint.baseUrl)}function pk(e,t,n){let r=dk(t,n);if(r!==null)return{flagged:r,resolved:r,source:`flagged`};let i=fk(e,t);return{flagged:null,resolved:i,source:i===null?`none`:`auto`}}function mk(e,t){return pk(e,`internal`,t.internal)}function hk(e,t){return pk(e,`publicEndpoint`,t.publicEndpoint)}function gk(e){let t=dk(`notificationTaps`,e.notificationTaps);return t!==null&&!BO(t)?{flagged:t,resolved:t,source:`flagged`}:{flagged:null,resolved:RO,source:`auto`}}function _k(e){return ik(e)?!1:e.kind===`lan-ipv4`?!0:e.kind===`public`&&e.interfaceKind===`public`}function vk(e,t){let n=e.filter(_k);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 yk(e,t){let n=new Set(t.appConnections),r=vk(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 koe(e,t,n){return{appConnections:yk(e,n),notificationTaps:gk(n),internal:mk(t,n),publicEndpoint:hk(t,n)}}function Aoe(e){return e===null?null:QO(e)}var joe=`camstack`,Moe=`_camstack._tcp.local`,Noe={nodeId:`nodeId`,version:`version`,role:`role`,url:`url`},Poe=`hub`,Foe=`camstack-agent`,Ioe=`_camstack-agent._tcp.local`,Loe={nodeId:`nodeId`,version:`version`,state:`state`,keyFingerprint:`fp`};function Roe(e){return`/system/addons?${new URLSearchParams({capability:e}).toString()}`}var bk=6e5,zoe=60*6e4,xk=d({inputTokens:i(),outputTokens:i()}),Sk=C([`timeout`,`rate-limited`,`auth`,`refusal`,`bad-request`,`unavailable`,`no-profile`,`budget-exceeded`,`adapter-error`]),Ck=d({ok:h(!0),text:l(),model:l(),usage:xk,truncated:T(),latencyMs:i()}),wk=C([`guardrail`,`model`]),Tk=d({ok:h(!1),code:Sk,message:l(),retryAfterMs:i().optional(),refusalSource:wk.optional()}),Ek=m(`ok`,[Ck,Tk]),Dk=d({bytes:S(Uint8Array),mimeType:l()}),Ok=d({enabled:T().default(!1),maxAttempts:i().int().min(1).max(5).default(1)}),Boe={totalMs:6e4,connectMs:1e4,firstTokenMs:12e4,idleMs:6e4},kk=d({addonId:l().optional(),profileId:l().optional(),consumer:l(),system:l().optional(),prompt:l(),jsonSchema:x(l(),o()).optional(),maxTokens:i().int().positive().optional(),temperature:i().optional(),topP:i().min(0).max(1).optional(),topK:i().int().positive().optional(),timeoutMs:i().int().positive().optional(),retry:Ok.optional(),requestId:l().optional()}),Ak=d({url:l(),filename:l(),sizeBytes:i(),sha256:l().optional()}),jk=m(`kind`,[d({kind:h(`catalog`),catalogId:l()}),d({kind:h(`url`),url:l(),sha256:l().optional(),label:l().optional(),sizeBytes:i().optional(),extraFiles:w(Ak).optional()}),d({kind:h(`path`),path:l()})]),Mk=d({nodeId:l(),engine:C([`llama-cpp`]),model:jk,contextSize:i().int().default(4096),gpuLayers:i().int().default(0),threads:i().int().optional(),parallel:i().int().default(1),batchSize:i().int().positive().optional(),ubatchSize:i().int().positive().optional(),flashAttention:T().default(!1),mlock:T().default(!1),noMmap:T().default(!1),cacheTypeK:C([`f32`,`f16`,`q8_0`,`q5_1`,`q5_0`,`q4_1`,`q4_0`]).optional(),cacheTypeV:C([`f32`,`f16`,`q8_0`,`q5_1`,`q5_0`,`q4_1`,`q4_0`]).optional(),extraArgs:w(l()).default([]),autoStart:T().default(!1),idleStopMinutes:i().int().default(30)}),Nk=d({phase:C([`downloading`,`verifying`]),file:l(),fileIndex:i().int(),fileCount:i().int(),downloadedBytes:i(),totalBytes:i().optional()}),Pk=d({nodeId:l(),state:C([`stopped`,`downloading`,`starting`,`ready`,`crashed`,`failed`]),pid:i().optional(),port:i().optional(),modelPath:l().optional(),modelId:l().optional(),downloadProgress:i().min(0).max(1).optional(),download:Nk.optional(),lastError:l().optional(),crashesInWindow:i(),memoryBytes:i().optional(),vramBytes:i().optional()}),Fk=d({file:l(),sizeBytes:i(),catalogId:l().optional(),installedAt:i().optional(),path:l().optional()}),Ik=d({nodeId:l(),modelsBytes:i(),freeBytes:i().optional()}),Lk=kk.extend({images:w(Dk).optional(),runtime:Mk,timeoutMs:i().int().positive().optional()}),Rk=C([`deviceNotEligible`,`appleIntelligenceNotEnabled`,`modelNotReady`,`osTooOld`,`helperMissing`,`helperCrashed`]),zk=m(`state`,[d({state:h(`available`),osVersion:l(),contextSize:i().int().positive(),languages:w(l()),imageInput:T()}),d({state:h(`unavailable`),reason:Rk,osVersion:l().nullable(),detail:l()}),d({state:h(`unsupported-platform`),platform:l()}),d({state:h(`unknown`),error:l()})]),Bk=kk.extend({images:w(Dk).optional(),timeoutMs:i().int().positive().optional()}),Vk=d({requestId:l()}),Hk={name:`llm-runtime`,scope:`system`,mode:`singleton`,internal:!0,methods:{complete:M(Lk,Ek,{kind:`mutation`,auth:`admin`,timeoutMs:bk}),ensureStarted:M(d({runtime:Mk}),Pk,{kind:`mutation`,auth:`admin`,timeoutMs:bk}),stop:M(d({}),y(),{kind:`mutation`,auth:`admin`}),status:M(d({}),Pk,{auth:`admin`}),installModel:M(d({model:jk}),y(),{kind:`mutation`,auth:`admin`,timeoutMs:zoe}),deleteModel:M(d({file:l()}),y(),{kind:`mutation`,auth:`admin`}),listLocalModels:M(d({}),w(Fk),{auth:`admin`}),getDiskUsage:M(d({}),Ik,{auth:`admin`}),cancel:M(Vk,y(),{kind:`mutation`,auth:`admin`}),appleAvailability:M(d({}),zk,{auth:`admin`}),completeApple:M(Bk,Ek,{kind:`mutation`,auth:`admin`,timeoutMs:bk})}},Uk=/^[a-z0-9][a-z0-9-]{0,63}$/,Wk=l().regex(Uk,`a kind id is lower-case letters, digits and dashes`),Gk=d({vision:T(),tools:T(),streaming:T()}),Kk=d({id:l(),label:l().optional(),contextLength:i().int().positive().optional(),features:Gk.partial().optional()}),qk=x(l(),o()),Jk=d({id:l(),name:l(),kind:Wk,addonId:l(),enabled:T(),model:l(),supportsVision:T(),temperature:i().min(0).max(2).optional(),topP:i().min(0).max(1).optional(),topK:i().int().positive().optional(),maxTokens:i().int().positive().optional(),contextLength:i().int().positive().optional(),systemPrompt:l().optional(),timeoutMs:i().int().positive().default(6e4),connectTimeoutMs:i().int().positive().default(1e4),firstTokenTimeoutMs:i().int().positive().default(12e4),idleTimeoutMs:i().int().positive().default(6e4),retry:Ok.default({enabled:!1,maxAttempts:1}),toolsEnabled:T().default(!1),providerConfig:qk.default({})}),Yk=C([`temperature`,`topP`,`topK`,`maxTokens`,`contextLength`,`systemPrompt`,`timeoutMs`,`connectTimeoutMs`,`firstTokenTimeoutMs`,`idleTimeoutMs`,`retry`,`toolsEnabled`]),Xk=d({id:l(),placement:C([`connection`,`model`]),requires:w(l()).optional()}),Zk=o(),Qk=d({kind:Wk,label:l(),icon:l(),addonId:l(),connectionSchema:Zk,advancedSchema:Zk.optional(),features:Gk,visionEditable:T(),modelCatalog:C([`fetch`,`static`,`none`]),staticModels:w(Kk).optional(),profileFields:w(Yk),providerWidgets:w(Xk).optional()}),$k=d({addonId:l(),kind:Wk,profileId:l().optional(),connection:qk.optional()}),eA=C([`auth`,`network`,`unsupported`,`invalid`]),tA=m(`ok`,[d({ok:h(!0),models:w(Kk)}),d({ok:h(!1),code:eA,message:l()})]),nA=f([d({consumer:l()}),d({purpose:C([`text`,`vision`])})]),rA=d({selector:nA,profileId:l()}),iA=d({day:l(),consumer:l(),profileId:l(),calls:i(),okCalls:i(),errorCalls:i(),inputTokens:i(),outputTokens:i(),avgLatencyMs:i()}),aA=d({id:l(),label:l(),family:l(),purpose:C([`text`,`vision`]),url:l(),sha256:l(),sizeBytes:i(),quantization:l(),minRamBytes:i(),contextSizeDefault:i().int(),mmprojUrl:l().optional()}),oA=m(`ok`,[d({ok:h(!0),model:jk,label:l(),repo:l(),quantization:l(),purpose:C([`text`,`vision`]),totalBytes:i(),extraFilenames:w(l())}),d({ok:h(!1),code:l(),message:l(),candidates:w(l()).optional(),requiredBytes:i().optional()})]),sA=d({nodeId:l(),reachable:T(),status:Pk.optional(),disk:Ik.optional(),error:l().optional(),apple:zk.optional()}),Voe=kk.extend({images:w(Dk).min(1)}),cA=d({addonId:l(),profileId:l()}),lA={name:`llm`,scope:`system`,mode:`collection`,internal:!1,providerKind:`ai`,nodeIdMode:`data`,methods:{generate:M(kk,Ek,{kind:`mutation`,timeoutMs:bk}),generateVision:M(Voe,Ek,{kind:`mutation`,timeoutMs:bk}),cancel:M(d({addonId:l().optional(),requestId:l()}),y(),{kind:`mutation`}),listProfileKinds:M(d({}),w(Qk)),listProfiles:M(d({}),w(Jk)),upsertProfile:M(d({profile:Jk}),Jk,{kind:`mutation`,auth:`admin`}),migrateRawSecrets:M(GC,KC,{kind:`mutation`,auth:`admin`}),deleteProfile:M(cA,y(),{kind:`mutation`,auth:`admin`}),testProfile:M(cA,Ek,{kind:`mutation`,auth:`admin`,timeoutMs:bk}),listModels:M($k,tA,{kind:`mutation`,auth:`admin`}),getDefaults:M(d({}),w(rA)),setDefault:M(d({selector:nA,profileId:l().nullable()}),y(),{kind:`mutation`,auth:`admin`}),getUsage:M(d({since:i().optional(),until:i().optional(),consumer:l().optional(),profileId:l().optional()}),w(iA)),listModelCatalog:M(d({}),w(aA)),listRuntimeNodes:M(d({}),w(sA)),listNodeModels:M(d({nodeId:l()}),w(Fk)),resolveModelRef:M(d({ref:l(),maxBytes:i().positive().optional()}),oA,{kind:`mutation`,auth:`admin`}),installModel:M(d({nodeId:l(),model:jk}),y(),{kind:`mutation`,auth:`admin`}),deleteModel:M(d({nodeId:l(),file:l()}),y(),{kind:`mutation`,auth:`admin`}),getRuntimeStatus:M(cA,Pk),startRuntime:M(cA,Pk,{kind:`mutation`,auth:`admin`}),stopRuntime:M(cA,y(),{kind:`mutation`,auth:`admin`})}},uA=[`decode`,`transcode`,`recording`,`streaming`,`detection`],dA=[`measured`,`accounted`,`unattributable`],fA=d({role:C(uA),deviceId:i().int().positive().nullable(),attribution:C(dA),unit:l(),pid:i().int().positive().optional(),startedAtMs:i().optional(),cpuSeconds:i().optional(),rssBytes:i().optional()}),pA={name:`load-contribution`,scope:`system`,mode:`collection`,internal:!0,methods:{list:M(y(),w(fA).readonly())},mount:{kind:`skip`}},mA=d({armed:i().int().min(0),unknown:w(l()).readonly()}),hA={name:`log-channels`,scope:`system`,mode:`collection`,internal:!0,methods:{list:M(y(),w(am).readonly()),apply:M(d({windows:w(om).readonly()}),mA,{kind:`mutation`})},mount:{kind:`skip`}},gA=C([`debug`,`info`,`warn`,`error`]),_A=d({timestamp:pe(),level:gA,scope:w(l()),message:l(),meta:x(l(),o()).optional(),tags:x(l(),l()).optional()}),vA=d({requestId:l().min(1).max(64).optional(),deviceId:i().int().optional(),fromAddonId:l().min(1).max(200).optional(),fromNodeId:l().min(1).max(200).optional(),tags:x(l(),f([l(),i()])).optional(),level:gA.optional(),text:l().min(1).max(200).optional(),since:i().optional(),until:i().optional(),before:l().min(1).max(1024).optional(),after:l().min(1).max(1024).optional(),limit:i().int().min(1).max(1e3).optional(),budgetMs:i().int().min(50).max(1e4).optional()}),yA=d({id:l().optional(),timestamp:i(),level:gA,scope:l().optional(),message:l(),tags:x(l(),f([l(),i()])).optional(),meta:x(l(),o()).optional()}),bA=d({entries:w(yA),nextBefore:l().nullable(),nextAfter:l().nullable(),scannedBytes:i().int().nonnegative(),done:T(),cancelled:T().optional()}),xA=d({readable:T(),reason:l().nullable(),filters:d({deviceId:T(),addonId:T(),nodeId:T(),tags:T(),level:T(),text:T(),timeRange:T()}),retentionDays:i().nullable()}),SA={name:`log-destination`,scope:`system`,mode:`collection`,internal:!0,methods:{write:M(_A,y(),{kind:`mutation`}),describeRead:pa(y(),xA,{auth:`admin`}),read:pa(vA,bA,{auth:`admin`}),cancelRead:pa(d({requestId:l().min(1).max(64)}),d({cancelled:T()}),{kind:`mutation`,auth:`admin`})},mount:{kind:`skip`}},CA=C([`primary`,`second-factor`]),wA=d({kind:h(`redirect`),id:l(),label:l(),icon:l().optional(),startUrl:l(),stage:CA,linkable:T().optional(),app:wg.nullable().optional()}),TA=d({kind:h(`widget`),id:l(),addonId:l(),bundle:l(),remote:bv,stage:CA,app:wg.nullable().optional()}),EA=d({kind:h(`passkey`),id:l(),label:l(),stage:CA,rpId:l(),origin:l().nullable(),app:wg.nullable().optional()}),DA=m(`kind`,[wA,TA,EA]),OA={name:`login-method`,scope:`system`,mode:`collection`,internal:!0,methods:{getLoginMethods:M(y(),w(DA).readonly())},mount:{kind:`skip`}},Hoe=d({total:i(),user:i(),system:i(),irq:i(),nice:i(),loadAvg:u([i(),i(),i()]),cores:i()}),Uoe=d({percent:i(),totalBytes:i(),usedBytes:i(),availableBytes:i(),swapUsedBytes:i(),swapTotalBytes:i()}),Woe=d({readBytes:i(),writeBytes:i(),readOps:i(),writeOps:i(),timestampMs:i()}),Goe=d({rxBytes:i(),txBytes:i(),rxPackets:i(),txPackets:i(),rxErrors:i(),txErrors:i(),timestampMs:i()}),kA=d({utilization:i(),model:l(),memoryUsedBytes:i(),memoryTotalBytes:i(),temperature:i().nullable()}),Koe=d({openFds:i(),threadCount:i(),activeHandles:i(),activeRequests:i()}),AA=d({avg10:i(),avg60:i(),avg300:i()}),jA=d({some:AA,full:AA.nullable()}),MA=d({cpu:Hoe,memory:Uoe,gpu:kA.nullable(),network:Goe,disk:Woe,pressure:d({cpu:jA.nullable(),memory:jA.nullable(),io:jA.nullable()}),process:Koe,cpuTemperature:i().nullable(),timestampMs:i()}),qoe=d({path:l(),totalBytes:i(),usedBytes:i(),availableBytes:i(),percent:i()}),NA=d({pid:i(),cpu:i(),memory:i(),privateBytes:i().optional(),sharedBytes:i().optional()}),Joe=d({addonId:l(),nodeId:l(),role:C([`hub`,`worker`]),pid:i(),state:C([`starting`,`running`,`stopping`,`stopped`,`crashed`]),uptimeSec:i()}),Yoe=d({pid:i(),ppid:i(),pgid:i(),classification:C([`root`,`managed`,`system`]),addonId:l().nullable(),nodeId:l().nullable(),command:l(),cpuPercent:i(),memoryRssBytes:i(),cpuMainPercent:i().nullable(),cpuGcPercent:i().nullable(),threadCount:i().nullable(),uptimeSec:i()}),Xoe=d({source:C([`cgroup-v2`,`cgroup-v1`]),currentBytes:i(),limitBytes:i().nullable(),anonBytes:i().nullable(),fileBytes:i().nullable(),shmemBytes:i().nullable(),slabBytes:i().nullable(),gpuShmemBytes:i().nullable()}).extend({atMs:i()}),Zoe=d({atMs:i(),samples:i().int(),cpuMainPercent:i().nullable(),cpuMainPercentMin:i().nullable(),cpuGcPercent:i().nullable(),cpuGcPercentMin:i().nullable(),cpuLifetimePercent:i(),cpuLifetimePercentMin:i(),memoryRssBytes:i(),memoryRssBytesMin:i(),processCount:i().int(),processCountMin:i().int()}),Qoe=d({key:l(),kind:C([`addon`,`root`,`unattributed`]),points:w(Zoe).readonly()}),$oe=d({nodeId:l(),series:w(Qoe).readonly(),containerMemory:w(Xoe).readonly(),bucketMs:i(),retainedSamples:i(),oldestAtMs:i().nullable(),cadenceMs:i(),durable:T()}),ese=d({forNodeId:l(),sinceMs:i().optional(),maxPoints:i().int().positive().optional()}),PA=d({cpuPercent:i(),memoryPercent:i(),memoryUsedMB:i(),memoryTotalMB:i(),diskPercent:i().optional(),temperature:i().optional(),gpuPercent:i().optional(),gpuMemoryPercent:i().optional()}),FA={name:`metrics-provider`,scope:`system`,mode:`singleton`,methods:{collectSnapshot:M(y(),MA),getCached:M(y(),MA.nullable()),getCurrent:M(y(),PA),getDiskSpace:M(d({dirPath:l()}),qoe),getGpuInfo:M(y(),kA.nullable()),getCpuTemperature:M(y(),i().nullable()),getProcessStats:M(d({pids:w(i())}),w(NA)),listAddonInstances:M(y(),w(Joe).readonly()),getAddonStats:M(d({addonId:l()}),NA.nullable()),listNodeProcesses:M(y(),w(Yoe).readonly()),getLoadSeries:M(ese,$oe)}},IA=d({sourceUrl:l(),metadata:Bh,targets:w(zh).min(1).readonly(),calibrationRef:l().optional(),sessionId:l().optional()}),LA={name:`model-convert`,scope:`system`,mode:`singleton`,internal:!0,methods:{convert:M(IA,Hh,{kind:`mutation`,auth:`admin`,timeoutMs:6e5})}},RA=d({targetNodeId:l(),modelId:l(),format:C(ia),entry:Rh}),zA=d({ok:T(),sha256:l(),bytes:i(),path:l()}),BA={name:`model-distributor`,scope:`system`,mode:`singleton`,internal:!0,methods:{distributeModel:M(RA,zA,{kind:`mutation`,auth:`admin`})}},VA=d({bbox:Pv,pixelCount:i(),intensity:i()}),HA=d({detected:T(),regionCount:i(),regions:w(VA).readonly(),rawRegions:w(VA).readonly(),frameWidth:i(),frameHeight:i(),analysisMs:i()}),UA={name:`motion-detection`,scope:`device`,mode:`singleton`,kind:`wrapper`,defaultActive:!0,deviceTypes:[P.Camera],exposesDeviceSettings:!0,methods:{analyze:M(d({deviceId:i(),frame:Nv.optional(),frameHandle:Gi.optional()}),HA,{role:`admin`,kind:`mutation`}),removeCamera:M(d({deviceId:i()}),y(),{role:`admin`,kind:`mutation`}),reset:M(y(),y(),{role:`admin`,kind:`mutation`})},events:{onMotion:{data:d({deviceId:i(),detected:T(),regionCount:i()})}}},tse=C([`external`,`embedded`]),nse=C([`connected`,`disconnected`,`auth-failed`,`unreachable`,`tls-error`]),WA=d({id:l(),name:l(),url:l(),kind:tse,status:nse,latencyMs:i().nullable(),error:l().optional(),connectedClients:i().int().nonnegative().optional(),lastCheckedAt:i().optional()}),GA=d({url:l(),username:l().optional(),password:l().optional(),clientIdPrefix:l().optional()}),KA=d({name:l().min(1),url:l().regex(/^(mqtt|mqtts|ws|wss):\/\//,`URL must start with mqtt(s):// or ws(s)://`),username:l().optional(),password:l().optional(),clientIdPrefix:l().optional()}),rse=d({id:l()}),qA=d({id:l()}),ise=m(`ok`,[d({ok:h(!0),latencyMs:i()}),d({ok:h(!1),error:l()})]),JA=d({port:i().int().min(1).max(65535).default(1883),allowAnonymous:T().default(!1),username:l().optional(),password:l().optional()}),ase=d({id:l(),url:l()}),YA=d({brokerCount:i(),embeddedRunning:T()}),XA={name:`mqtt-broker`,scope:`system`,mode:`collection`,providerKind:`broker`,status:{schema:YA,kind:`poll`},methods:{listBrokers:M(y(),w(WA)),getBrokerConfig:M(qA,GA,{auth:`admin`}),addBroker:M(KA,rse,{kind:`mutation`,auth:`admin`}),removeBroker:M(qA,y(),{kind:`mutation`,auth:`admin`}),testConnection:M(qA,ise,{kind:`mutation`,auth:`admin`}),startEmbeddedBroker:M(JA,ase,{kind:`mutation`,auth:`admin`}),stopEmbeddedBroker:M(qA,y(),{kind:`mutation`,auth:`admin`}),getStatus:M(y(),YA)}},ZA=d({url:l(),hostname:l(),port:i(),protocol:C([`http`,`https`]),stable:T().optional()}),ose=d({url:l(),stable:T().optional(),updated:T().optional()}),QA=d({connected:T(),endpoint:ZA.nullable(),error:l().optional()}),sse=ZA.extend({id:l(),label:l(),mode:l().optional(),sourcePort:i().optional()}),$A={name:`network-access`,scope:`system`,mode:`collection`,providerKind:`ingress`,methods:{start:M(y(),ZA,{kind:`mutation`}),stop:M(y(),y(),{kind:`mutation`}),getEndpoint:M(y(),ZA.nullable()),getStatus:M(y(),QA),listEndpoints:M(y(),w(sse).readonly())}},ej=C([`image`,`video`,`gif`,`audio`,`icon`]),tj=d({mediaType:ej,url:l().optional(),bytes:S(Uint8Array).optional(),mime:l().optional(),name:l().optional()}).refine(e=>e.url!==void 0||e.bytes!==void 0,{message:"Attachment requires either `url` or `bytes`"}),nj=C([`text`,`markdown`,`html`]),rj=C([`acknowledge`,`dismiss`,`silence`,`snooze`,`view`,`play`,`open`,`close`,`lock`,`unlock`,`arm`,`arm-home`,`arm-away`,`arm-night`,`disarm`,`light`,`alert`,`camera`]),ij=d({id:l(),label:l(),url:l().optional(),icon:rj.optional(),destructive:T().optional(),mode:C([`navigate`,`background`]).optional()}),aj=d({body:l(),title:l().optional(),format:nj.default(`text`),priority:i().int().min(1).max(5).default(3),level:l().optional(),attachments:w(tj).optional(),clickUrl:l().optional(),actions:w(ij).optional(),sound:l().optional(),ttl:i().optional(),tag:l().optional(),deviceId:i().optional(),eventId:l().optional(),metadata:x(l(),o()).optional()}),oj=d({id:l(),label:l(),ordinal:i().int().min(1).max(5).nullable(),flags:d({critical:T().optional(),silent:T().optional(),noPush:T().optional()}).optional(),requires:w(l()).optional(),description:l().optional()}),sj=d({attachments:d({mediaTypes:w(ej),mode:C([`url`,`bytes`,`both`]),max:i().int().nonnegative(),maxBytes:i().int().positive().optional()}),actions:i().int().nonnegative(),actionIcons:T().optional(),levels:w(oj),format:w(nj),clickUrl:T(),sound:T(),ttl:T(),bodyMaxLen:i().int().positive()}),cse=o(),cj=d({kind:l(),label:l(),icon:l(),addonId:l(),iconUrl:l().optional(),iconMediaType:l().optional(),configSchema:cse,destinationKeys:w(l()).optional(),supportsDiscovery:T(),caps:sj}),lj=d({id:l(),name:l(),kind:l(),addonId:l(),enabled:T(),config:x(l(),o())}),uj=d({kind:l(),suggestedName:l(),config:x(l(),o())}),dj=d({level:l(),format:nj,attachmentsSent:i().int().nonnegative(),actionsSent:i().int().nonnegative(),truncated:T(),dropped:w(l())}),fj=d({success:T(),error:l().optional(),renderedAs:dj.optional()}),pj=fj,mj=d({ok:T(),resolvedUrl:l(),httpStatus:i().int().optional(),stateInstance:l().optional(),error:l().optional()}),hj={name:`notification-output`,scope:`system`,mode:`collection`,methods:{listTargetKinds:M(d({}),w(cj)),listTargets:M(d({}),w(lj),{auth:`admin`}),getTarget:M(d({targetId:l()}),lj,{auth:`admin`}),discoverTargets:M(d({kind:l(),config:x(l(),o()).optional(),targetId:l().optional()}),w(uj),{auth:`admin`}),probeTargetConfig:M(d({kind:l(),config:x(l(),o()),targetId:l().optional()}),mj,{kind:`mutation`,auth:`admin`}),send:M(d({targetId:l(),notification:aj}),fj,{kind:`mutation`,auth:`admin`}),testTarget:M(d({targetId:l(),sample:aj.optional()}),pj,{kind:`mutation`,auth:`admin`}),upsertTarget:M(d({target:lj,cloneSecretsFrom:l().optional()}),lj,{kind:`mutation`,auth:`admin`}),deleteTarget:M(d({targetId:l()}),y(),{kind:`mutation`,auth:`admin`}),setTargetEnabled:M(d({targetId:l(),enabled:T()}),y(),{kind:`mutation`,auth:`admin`})}},gj=[{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`}],_j={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},vj={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},yj=new Map;for(let[e,t]of Object.entries(_j.mapping))yj.set(e.toLowerCase(),t);for(let[e,t]of Object.entries(vj.mapping))yj.set(e.toLowerCase(),t);function lse(e){return yj.get(e.toLowerCase())??null}function use(){return gj.map(e=>e.id)}var bj=`motion.audio.recording.live.heatmapScrub.person.vehicle.animal.package.sensor.control.face.plate.car.truck.bus.motorcycle.bicycle.airplane.boat.train.bird.dog.cat.horse.sheep.cow.elephant.bear.zebra.giraffe.package-delivered.package-picked-up.suitcase.backpack.handbag.contact.motion-sensor.smoke.flood.gas.carbon-monoxide.vibration.tamper.presence.enum-sensor.device-event.lock.cover.switch.siren.button.doorbell`.split(`.`),xj=`audio`,Sj=[.3,.42,.55,.7,.85,1],Cj=[`camstack`,`high-contrast`,`okabe-ito`];function dse(e){return bj.includes(e)}function fse(e){return Cj.includes(e)}var wj={dark:`#0c0a09`,light:`#fafaf9`},pse=7,mse=20,hse=[`live`,`heatmapScrub`],gse=3,Tj=/^#[0-9a-fA-F]{6}$/;function Ej(e,t){return Number.parseInt(e.slice(t,t+2),16)}function Dj(e){let t=e/255;return t<=.04045?t/12.92:((t+.055)/1.055)**2.4}function Oj(e){let t=Dj(Ej(e,1)),n=Dj(Ej(e,3)),r=Dj(Ej(e,5));return .2126*t+.7152*n+.0722*r}function _se(e,t){if(!Tj.test(e)||!Tj.test(t))return 0;let n=Math.max(Oj(e),Oj(t)),r=Math.min(Oj(e),Oj(t));return(n+.05)/(r+.05)}function kj(e){let t=Dj(Ej(e,1)),n=Dj(Ej(e,3)),r=Dj(Ej(e,5)),i=.4124564*t+.3575761*n+.1804375*r,a=.2126729*t+.7151522*n+.072175*r,o=.0193339*t+.119192*n+.9503041*r,s=e=>e>.008856?Math.cbrt(e):7.787*e+16/116,c=s(i/.95047),l=s(a),u=s(o/1.08883);return{L:116*l-16,a:500*(c-l),b:200*(l-u)}}function Aj(e,t){if(e===0&&t===0)return 0;let n=Math.atan2(t,e)*180/Math.PI;return n<0?n+360:n}function vse(e,t){if(!Tj.test(e)||!Tj.test(t))return 0;let n=kj(e),r=kj(t),i=((Math.hypot(n.a,n.b)+Math.hypot(r.a,r.b))/2)**7,a=.5*(1-Math.sqrt(i/(i+25**7))),o=(1+a)*n.a,s=(1+a)*r.a,c=Math.hypot(o,n.b),l=Math.hypot(s,r.b),u=Aj(o,n.b),d=Aj(s,r.b),f=0;c*l!==0&&(f=d-u,f>180?f-=360:f<-180&&(f+=360));let p=2*Math.sqrt(c*l)*Math.sin(f*Math.PI/360),m=(n.L+r.L)/2,h=(c+l)/2,g=u+d;c*l!==0&&(Math.abs(u-d)>180&&(g+=g<360?360:-360),g/=2);let _=1-.17*Math.cos((g-30)*Math.PI/180)+.24*Math.cos(2*g*Math.PI/180)+.32*Math.cos((3*g+6)*Math.PI/180)-.2*Math.cos((4*g-63)*Math.PI/180),v=30*Math.exp(-(((g-275)/25)**2)),ee=h**7,te=2*Math.sqrt(ee/(ee+25**7)),ne=1+.015*(m-50)**2/Math.sqrt(20+(m-50)**2),y=1+.045*h,b=1+.015*h*_,re=-Math.sin(2*v*Math.PI/180)*te,x=r.L-n.L,ie=l-c;return Math.sqrt((x/ne)**2+(ie/y)**2+(p/b)**2+ie/y*re*(p/b))}var yse={motion:`#d946ef`,audio:`#059eb8`,recording:`#ef4444`,live:`#8d7a00`,heatmapScrub:`#4b32ff`,person:`#11a64c`,vehicle:`#3b82f6`,animal:`#ea6a09`,package:`#924667`,sensor:`#624bbc`,control:`#944d24`,face:`#ed4f8d`,plate:`#4b7027`,car:`#9684cf`,truck:`#0f9b89`,bus:`#a734a9`,motorcycle:`#c1133a`,bicycle:`#0e6a9b`,airplane:`#7c9928`,boat:`#b17933`,train:`#ad6ca3`,bird:`#0f7c55`,dog:`#c82700`,cat:`#7268f2`,horse:`#cb795e`,sheep:`#b8636b`,cow:`#cb2969`,elephant:`#1158d2`,bear:`#8d5e00`,zebra:`#0097d6`,giraffe:`#8f61bb`,"package-delivered":`#cd3f9b`,"package-picked-up":`#388a08`,suitcase:`#666800`,backpack:`#ec5022`,handbag:`#a76ef8`,contact:`#ab5a49`,"motion-sensor":`#b95d1a`,smoke:`#dd3858`,flood:`#b31e7d`,gas:`#5b70b5`,"carbon-monoxide":`#7b4e8e`,vibration:`#e65bba`,tamper:`#98464b`,presence:`#3a9468`,"enum-sensor":`#7885f8`,"device-event":`#8c43c8`,lock:`#649653`,cover:`#c67597`,switch:`#7a812a`,siren:`#ac5d7f`,button:`#b276cd`,doorbell:`#0087ab`},bse=[`#b34dc7`,`#1d7d34`,`#db6b6c`,`#a43d29`,`#0e6ee6`,`#29a10b`,`#a98731`,`#0181c6`],xse={motion:`#964360`,audio:`#23a132`,recording:`#2494ca`,live:`#bd7e2b`,heatmapScrub:`#ad6eea`,person:`#62611e`,vehicle:`#f4534c`,animal:`#1556cd`,package:`#9c4415`,sensor:`#066c48`,control:`#f2479f`,face:`#139d8a`,plate:`#909024`,car:`#8e35ab`,truck:`#bd0b2b`,bus:`#7a88ca`,motorcycle:`#e26725`,bicycle:`#a6679b`,airplane:`#7c5720`,boat:`#467a1b`,train:`#6f65a4`,bird:`#cb717f`,dog:`#c62490`,cat:`#b36850`,horse:`#1872ac`,sheep:`#927939`,cow:`#428a5c`,elephant:`#d41160`,bear:`#799453`,zebra:`#a85455`,giraffe:`#746be8`,"package-delivered":`#824a80`,"package-picked-up":`#614ac1`,suitcase:`#2f77f3`,backpack:`#fa476d`,handbag:`#c14cbe`,contact:`#c83921`,"motion-sensor":`#a07ebd`,smoke:`#a25b13`,flood:`#526bab`,gas:`#924938`,"carbon-monoxide":`#bb7e53`,vibration:`#b66182`,tamper:`#3c6931`,presence:`#6c851d`,"enum-sensor":`#ad2d48`,"device-event":`#5e9b04`,lock:`#00a062`,cover:`#ad8624`,switch:`#d05259`,siren:`#cd67b3`,button:`#c9746a`,doorbell:`#338eeb`},Sse=[`#817f3b`,`#a0733e`,`#8658b2`,`#956301`,`#bc652d`,`#647331`,`#a14c9e`,`#d14e71`],Cse={motion:`#b88128`,audio:`#1096c8`,recording:`#009e73`,live:`#9c8c22`,heatmapScrub:`#0072b2`,person:`#d55e00`,vehicle:`#c0739f`,animal:`#226d18`,package:`#91446c`,sensor:`#217b56`,control:`#648647`,face:`#c22998`,plate:`#fa4575`,car:`#956301`,truck:`#2f77f3`,bus:`#7a4e86`,motorcycle:`#f54597`,bicycle:`#bb3e75`,airplane:`#e054c0`,boat:`#457942`,train:`#867afa`,bird:`#88914c`,dog:`#1556cd`,cat:`#71702c`,horse:`#9b4fa4`,sheep:`#c0559d`,cow:`#d14f65`,elephant:`#98470f`,bear:`#595896`,zebra:`#96790e`,giraffe:`#cb717b`,"package-delivered":`#139d8a`,"package-picked-up":`#906ead`,suitcase:`#d02939`,backpack:`#d41160`,handbag:`#f64f54`,contact:`#7258d2`,"motion-sensor":`#b66182`,smoke:`#627abb`,flood:`#b86ae4`,gas:`#a95261`,"carbon-monoxide":`#c65d3c`,vibration:`#7a40b7`,tamper:`#914b34`,presence:`#9481c3`,"enum-sensor":`#ac6d47`,"device-event":`#7b6fce`,lock:`#c67662`,cover:`#a6564d`,switch:`#ad2c4e`,siren:`#348e08`,button:`#d27303`,doorbell:`#55770f`},wse=[`#9a3784`,`#a7392c`,`#409d50`,`#6987e7`,`#ee5b3d`,`#c0430d`,`#af79b3`,`#4b6628`],jj=l().regex(/^#[0-9a-f]{6}$/),Mj=m(`form`,[d({form:h(`solid`),hex:jj}),d({form:h(`gradient`),hex:jj,alphas:w(i().gt(0).lte(1)).length(Sj.length)})]),Nj=d({status:h(`ready`),presetId:C(Cj),customized:T(),source:C([`stored`,`unconfigured`]),swatches:x(l(),Mj),fallbacks:w(jj).length(8)}),Pj=m(`status`,[Nj,d({status:h(`unknown`),reason:l()})]),Fj=f([d({presetId:l()}),d({presetId:l(),overrides:x(l(),Mj)})]),Ij=d({presetId:l(),overrides:x(l(),Mj)});function Tse(e){return{form:`solid`,hex:e}}function Ese(e){return{form:`gradient`,hex:e,alphas:[...Sj]}}function Dse(e){let t={};for(let n of bj){let r=e[n];if(r===void 0)throw Error(`palette table missing ${n}`);t[n]=n===`audio`?Ese(r):Tse(r)}return t}function Lj(e,t,n,r){return{id:e,name:t,swatches:Dse(n),fallbacks:r}}var Rj=[Lj(`camstack`,`CamStack`,yse,bse),Lj(`high-contrast`,`High contrast`,xse,Sse),Lj(`okabe-ito`,`Colour-blind safe`,Cse,wse)];function zj(e){return Rj.find(t=>t.id===e)}function Bj(){let e=zj(`camstack`);if(e===void 0)throw Error(`CamStack preset missing`);return Ose(e,`unconfigured`,!1)}function Ose(e,t,n){return{status:`ready`,presetId:e.id,customized:n,source:t,swatches:e.swatches,fallbacks:[...e.fallbacks]}}function kse(e){return e.hex}function Ase(e,t){let n=[];for(let t of bj){let r=e[t];r!==void 0&&n.push({name:t,hex:r.hex})}return t.forEach((e,t)=>{n.push({name:`fallback-${t}`,hex:e})}),n}function jse(e){let t=e[xj];return t===void 0||t.form===`gradient`&&Sj.every((e,n)=>t.alphas[n]===e)?[]:[{code:`bad-gradient`,entry:xj}]}function Mse(e,t){let n=hse;return n.includes(e)&&n.includes(t)}function Vj(e,t){let n=[];for(let t of bj)e[t]===void 0&&n.push({code:`missing-entry`,entry:t});for(let t of Object.keys(e))dse(t)||n.push({code:`unknown-entry`,entry:t});t.length!==8&&n.push({code:`bad-fallbacks`}),n.push(...jse(e));let r=Ase(e,t);for(let e=0;e<r.length;e++)for(let t=e+1;t<r.length;t++){let i=r[e],a=r[t];if(i===void 0||a===void 0)continue;let o=vse(i.hex,a.hex);o<(Mse(i.name,a.name)?20:7)&&n.push({code:`too-close`,left:i.name,right:a.name,deltaE:o})}for(let e of r)for(let t of[`dark`,`light`]){let r=_se(e.hex,wj[t]);r<3&&n.push({code:`low-contrast`,entry:e.name,background:t,contrast:r})}return n.length===0?{ok:!0}:{ok:!1,violations:n}}function Nse(e){switch(e.code){case`too-close`:return`${e.left} vs ${e.right} (ΔE ${e.deltaE.toFixed(1)})`;case`low-contrast`:return`${e.entry} on ${e.background} (${e.contrast.toFixed(1)}:1)`;case`missing-entry`:return`${e.entry} is missing`;case`unknown-entry`:return`${e.entry} is not a palette entry`;case`bad-gradient`:return`${e.entry} gradient is not the six canonical steps`;case`bad-fallbacks`:return`fallback list must hold eight colours`;case`unknown-preset`:return`${e.presetId} is not a preset`}}function Hj(e){return e.map(Nse).join(`; `)}var Uj=class extends Error{violations;constructor(e){super(Hj(e)),this.name=`PaletteRejectedError`,this.violations=e}};function Wj(e,t){let n=0;for(let t=0;t<e.length;t++)n=n*31+(e.codePointAt(t)??0)>>>0;let r=t[n%t.length];if(r===void 0)throw Error(`display palette has no fallback colour`);return r}function Gj(e,t,n){let r=n.trim().toLowerCase();if(r.startsWith(`audio-`)){let n=e[xj];return n===void 0?Wj(r,t):n.hex}let i=e[r];return i===void 0?Wj(r,t):i.hex}function Kj(e,t){return{...e,...t}}function Pse(e){return`overrides`in e?e.overrides:{}}function Fse(e){let t=zj(e.presetId);if(t===void 0||!fse(e.presetId))throw new Uj([{code:`unknown-preset`,presetId:e.presetId}]);let n=Pse(e),r=Kj(t.swatches,n),i=Vj(r,t.fallbacks);if(!i.ok)throw new Uj(i.violations);let a=Object.keys(n).length>0;return{status:`ready`,presetId:t.id,customized:a,source:`stored`,swatches:r,fallbacks:[...t.fallbacks]}}function Ise(e){return typeof e==`object`&&!!e&&!Array.isArray(e)&&Object.keys(e).length===0}function Lse(e){if(e==null||Ise(e))return Bj();let t=Ij.safeParse(e);if(!t.success)return{status:`unknown`,reason:`stored palette is unreadable`};let n=zj(t.data.presetId);if(n===void 0)return{status:`unknown`,reason:`unknown preset ${t.data.presetId}`};let r=Kj(n.swatches,t.data.overrides),i=Vj(r,n.fallbacks);if(!i.ok)return{status:`unknown`,reason:Hj(i.violations)};let a=Object.keys(t.data.overrides).length>0;return{status:`ready`,presetId:n.id,customized:a,source:`stored`,swatches:r,fallbacks:[...n.fallbacks]}}function Rse(e,t){return{presetId:e.presetId,overrides:{...t}}}var qj=Bj();function Jj(e){return Gj(qj.swatches,qj.fallbacks,e)}function zse(e){let t=e[0];if(t===void 0)throw Error(`display palette has no fallback colour`);return t}var Bse=zse(qj.fallbacks);function Vse(e){return e.split(/[-_ ]/).filter(e=>e.length>0).map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(` `)}var Yj=new Map;function Xj(e,t,n,r){Yj.set(e,{kind:e,parentKind:null,level:`macro`,category:t,color:Jj(e),iconId:n,labelKey:`eventKind.${e}`,label:r})}function U(e,t,n,r,i){Yj.set(e,{kind:e,parentKind:t,level:`sub`,category:n,color:Jj(e),iconId:r,labelKey:`eventKind.${e}`,label:i})}Xj(`motion`,`motion`,`motion`,`Motion`),Xj(`audio`,`audio`,`audio`,`Audio`),Xj(`person`,`detection`,`person`,`Person`),Xj(`vehicle`,`detection`,`vehicle`,`Vehicle`),Xj(`animal`,`detection`,`animal`,`Animal`),Xj(`package`,`package`,`package`,`Package`),Xj(`sensor`,`sensor`,`sensor`,`Sensor`),Xj(`control`,`control`,`control`,`Control`);for(let[e,t]of Object.entries(v_.mapping))t!==`vehicle`&&t!==`animal`||Yj.has(e)||U(e,t,`detection`,e,Vse(e));U(`package-delivered`,`package`,`package`,`package`,`Package delivered`),U(`package-picked-up`,`package`,`package`,`package`,`Package picked up`),U(`contact`,`sensor`,`sensor`,`door`,`Contact`),U(`motion-sensor`,`sensor`,`sensor`,`pir`,`Motion sensor`),U(`smoke`,`sensor`,`sensor`,`smoke`,`Smoke`),U(`flood`,`sensor`,`sensor`,`water`,`Water leak`),U(`gas`,`sensor`,`sensor`,`gas`,`Gas`),U(`carbon-monoxide`,`sensor`,`sensor`,`smoke`,`Carbon monoxide`),U(`vibration`,`sensor`,`sensor`,`vibration`,`Vibration`),U(`tamper`,`sensor`,`sensor`,`tamper`,`Tamper`),U(`presence`,`sensor`,`sensor`,`presence`,`Presence`),U(`enum-sensor`,`sensor`,`sensor`,`generic`,`Sensor state`),U(`device-event`,`sensor`,`sensor`,`button`,`Device event`),U(`lock`,`control`,`control`,`lock`,`Lock`),U(`cover`,`control`,`control`,`door`,`Cover`),U(`switch`,`control`,`control`,`switch`,`Switch`),U(`siren`,`control`,`control`,`siren`,`Siren`),U(`button`,`control`,`control`,`button`,`Button`),U(`doorbell`,`control`,`control`,`doorbell`,`Doorbell`);for(let e of gj){let t=`audio-${e.id}`;Yj.has(t)||U(t,`audio`,`audio`,t,e.name)}var Zj=Object.freeze(Object.fromEntries(Yj));function Qj(e){return Zj[e]}function Hse(e){return Jj(e)}function Use(e){let t=[];for(let n of Object.values(Zj))n.parentKind===e&&t.push(n);return t}var $j=d({kind:l(),label:l(),parentKind:l().nullable()}),eM=d({videoClasses:w($j),audioKinds:w($j),labels:w($j)});function tM(e,t,n){return{kind:e,label:t,parentKind:n}}function nM(){let e=Object.values(Zj);return{videoClasses:e.filter(e=>e.category===`detection`).map(e=>tM(e.kind,e.label,e.parentKind)),audioKinds:e.filter(e=>e.category===`audio`&&e.level===`sub`).map(e=>tM(e.kind,e.label,e.parentKind)),labels:e.filter(e=>e.category===`sensor`||e.category===`control`).map(e=>tM(e.kind,e.label,e.parentKind))}}var Wse=Object.freeze(nM()),rM=C([`disarmed`,`armed_home`,`armed_away`,`armed_night`,`armed_vacation`,`armed_custom_bypass`,`arming`,`disarming`,`pending`,`triggered`]),iM=C([`home`,`away`,`night`,`vacation`,`custom_bypass`]),aM=d({state:rM,targetMode:iM.nullable().optional(),availableModes:w(iM),requiresCode:T(),lastChangedAt:i()}),oM={name:`alarm-panel`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[P.AlarmPanel],methods:{arm:M(d({deviceId:i().int().nonnegative(),mode:iM,code:l().min(1).optional()}),y(),{kind:`mutation`,auth:`protected`}),disarm:M(d({deviceId:i().int().nonnegative(),code:l().min(1).optional()}),y(),{kind:`mutation`,auth:`protected`}),trigger:M(d({deviceId:i().int().nonnegative()}),y(),{kind:`mutation`,auth:`protected`})},status:{schema:aM,kind:`push`},runtimeState:aM,durability:`restored`,history:{fields:{state:{kind:`enum`}}},volatileStateFields:[`lastChangedAt`]},sM=d({x:i(),y:i()}),cM=d({kind:h(`rect`),x:i(),y:i(),width:i(),height:i()}),lM=d({kind:h(`polygon`),points:w(sM)}),uM=d({kind:h(`grid`),gridWidth:i().meta(A(`none`)),gridHeight:i().meta(A(`none`)),cells:w(T())}),dM=d({kind:h(`line`),points:w(sM)}),Gse=m(`kind`,[cM,lM,uM,dM]),fM=C([`rect`,`polygon`,`grid`,`line`]),pM=d({min:i(),max:i()}),mM=d({width:i(),height:i()}),hM=C([`immediate`,`track-end`,`device-event`,`package-event`,`system-event`]),gM=C(`device-online.device-offline.device-disabled.device-enabled.device-battery-low.device-battery-normal.device-consumable-low.device-consumable-normal.stream-online.stream-offline.node-online.node-offline.node-restarting.node-updating.node-inference-unavailable.detection-blind.motion-noisy.motion-calm.package-llm-silent.package-llm-answered.recording-stalled.recording-healthy.recording-degraded.device-attention-required.device-attention-resolved.storage-location-low.storage-location-critical.storage-location-ok.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.alert-critical.alert-error.alert-critical-resolved.rule-broken.rule-repaired.camera-online.camera-offline.camera-disabled.camera-enabled`.split(`.`)),_M=[`camera-online`,`camera-offline`,`camera-disabled`,`camera-enabled`],Kse=new Set(_M),qse=gM.options.filter(e=>!Kse.has(e)),vM=[`alarm-arm-refused`,`alarm-check-failed`,`alarm-arming`,`alarm-armed`,`alarm-pending`,`alarm-triggered`,`alarm-rearmed`,`alarm-sensor-bypass`,`alarm-disarmed`],Jse=[`device-battery-low`,`device-battery-normal`,`device-consumable-low`,`device-consumable-normal`],yM=[`device-consumable-low`,`device-consumable-normal`],Yse=15,Xse=95,bM=d({kinds:w(gM).min(1),deviceIds:w(i().int()).min(1).optional(),deviceTypes:w(l().min(1)).min(1).optional(),excludeDeviceIds:w(i().int()).min(1).optional(),nodeIds:w(l().min(1)).min(1).optional(),packageNames:w(l().min(1)).min(1).optional(),consumableLowPercent:i().int().min(1).max(95).optional()});function Zse(e){return e.consumableLowPercent??15}var Qse=1,xM=1440,$se=[10,30,60],SM=d({days:w(i().int().min(0).max(6)).min(1),startMinute:i().int().min(0).max(1439),endMinute:i().int().min(0).max(1439)}),CM=d({windows:w(SM).min(1),timezone:l().optional(),invert:T().optional()}),wM=C([`instant`,`summary`]),TM=C([`rule`,`section`]),EM=m(`mode`,[d({mode:h(`instant`)}),d({mode:h(`summary`),schedule:CM,split:TM.optional()})]),DM=d({values:w(l().min(1)),maxDistance:i().int().min(0).max(3).default(1)}),OM=d({zoneId:l().optional(),className:l().optional(),op:C([`became-occupied`,`became-free`,`>=`,`<=`]).default(`became-occupied`),count:i().int().min(0).default(1),sustainSeconds:i().int().min(0).max(3600).default(15)}),kM=-96,AM=d({labels:w(l().min(1)).min(1).optional(),dbThreshold:i().min(-96).max(0).optional(),hitPercent:i().int().min(1).max(100).default(60),samplingSeconds:i().int().min(1).max(300).default(10),confirmHits:i().int().min(1).max(20).optional(),confirmWindowSec:i().int().min(1).max(60).optional()}),jM=C([`enter`,`exit`,`any`]),MM=C([`raised`,`cleared`]),NM=d({ids:w(l().min(1)).min(1),match:C([`any`,`all`]).optional()}),PM=m(`kind`,[d({kind:h(`wait`),seconds:i().min(0).max(300)}),d({kind:h(`cap`),deviceId:i().int(),cap:l().min(1),method:l().min(1),args:x(l(),o()).optional()})]),FM=d({id:l().min(1),name:l().min(1).max(120),minDelaySec:i().int().min(0).max(86400).optional(),actions:w(PM).min(1)}),IM=d({name:l().min(1).max(120),minDelaySec:i().int().min(0).max(86400).optional(),actions:w(PM).min(1)}),LM=m(`kind`,[d({kind:h(`sequence`),sequenceId:l().min(1)}),d({kind:h(`do`),action:PM})]),RM=w(LM).max(4),zM=d({id:l().min(1).max(64),label:l().min(1).max(40),sequenceId:l().min(1),icon:rj.optional(),destructive:T().optional()}),BM=d({onActivation:RM.optional(),onDeactivation:RM.optional(),onTrigger:RM.optional(),onTriggerOff:RM.optional(),buttons:w(zM).max(8).optional()}),VM=d({name:l().min(1).max(120),enabled:T(),minDelaySec:i().int().min(0).max(86400).optional(),actions:w(PM).min(1)}),HM=VM,UM=d({deviceId:i().int(),states:w(l().min(1)).min(1)}),WM=d({sceneId:l().min(1),deviceId:i().int().optional(),requiredState:C([`matched`,`diverged`]),latched:T().optional()}),GM=d({deviceState:UM.optional(),scene:WM.optional(),devices:w(i()).optional(),devicesExclude:w(i()).min(1).optional(),classes:w(l().min(1)).optional(),classesExclude:w(l().min(1)).optional(),minConfidence:i().min(0).max(1).optional(),zones:NM.optional(),zonesExclude:w(l().min(1)).optional(),crossing:jM.optional(),labelEquals:w(l().min(1)).optional(),identities:w(l().min(1)).optional(),plates:DM.optional(),identitiesExclude:w(l().min(1)).optional(),minImportance:i().min(0).max(1).optional(),minDwellSeconds:i().min(0).optional(),source:C([`pipeline`,`onboard`,`sensor`,`audio`,`any`]).optional(),minLabelConfidence:i().min(0).max(1).optional(),eventTypeTokens:w(l().min(1)).optional(),sensorKinds:w(l().min(1)).optional(),sensorTransition:MM.optional(),packagePhase:C([`delivered`,`picked-up`,`both`]).optional(),systemEvent:bM.optional(),customZones:w(lM).optional(),occupancy:OM.optional(),audio:AM.optional()}),KM=d({targetId:l().min(1),params:x(l(),o()).optional()}),qM=C([`scene-boxes`,`crop`,`clean`,`none`]),JM=C([`cropped`,`full`,`boxed`]),YM=C([`mosaic`,`each`]),XM=4,ZM=6,QM=d({image:qM.optional(),showTriggerZone:T().optional(),showSubjectPath:T().optional(),attach:C([`best`,`best-matching`,`keyFrame`,`none`]).optional(),frame:JM.optional(),zoneCrop:T().optional(),gif:T().optional(),clip:T().optional(),clipPreRollSec:i().int().min(0).max(30).optional(),clipPostRollSec:i().int().min(0).max(30).optional(),clipSpeed:i().min(1).max(8).optional(),profile:j.optional(),linkedCameras:YM.optional()}),$M=C([`shared`,`per-class`]),eN=d({cooldownSec:i().int().min(0).max(86400).default(60),scope:C([`rule`,`rule-device`]).default(`rule-device`),granularity:$M.optional()}),tN=1e3,nN=2e4,rN=8e3,iN=448,aN=d({op:C([`>=`,`>`,`<=`,`<`,`==`]),count:i().int().min(0).max(1e3)}),oN=d({enabled:T().default(!1),profileId:l().optional(),prompt:l().max(1e3).optional(),expect:aN.optional(),timeoutMs:i().int().min(tN).max(nN).default(rN),onTimeout:C([`fire`,`suppress`]).default(`fire`),maxImagePx:i().int().min(64).max(2048).default(448)}),sN=5,cN=20,lN=60,uN=d({name:l().min(1).max(200),enabled:T().default(!0),delivery:hM,conditions:GM.default({}),schedule:CM.optional(),systemEventDelivery:EM.optional(),targets:w(KM),targetUsers:w(l()).optional(),media:QM.default({}),throttle:eN.default({cooldownSec:60,scope:`rule-device`}),template:d({title:l().max(500).optional(),body:l().max(2e3).optional()}).optional(),priority:i().int().min(1).max(5).default(3),ownerUserId:l().optional(),snoozeAllowGlobal:T().optional(),snoozeOptions:w(i().int().min(1).max(xM)).max(4).optional(),actions:BM.optional(),confirm:oN.optional(),groupingSec:i().int().min(5).max(60).optional(),askVerdict:T().optional()}),dN=uN.partial().extend({disabledTargetIds:w(l()).optional(),enabled:T().optional(),conditions:GM.optional(),media:QM.optional(),throttle:eN.optional(),priority:i().int().min(1).max(5).optional()}),fN=[`waitForEnhancement`,`groupIdleSec`];function pN(e){return fN.some(t=>t===e)}var mN=[`template`,`schedule`,`targetUsers`,`snoozeOptions`,`snoozeAllowGlobal`,`actions`,`confirm`,`groupingSec`,`waitForEnhancement`,`groupIdleSec`],hN=C(mN),gN=d({ruleId:l(),patch:dN,clear:w(hN).optional()}),_N=uN.extend({id:l(),createdBy:l(),createdAt:i(),updatedAt:i(),disabledTargetIds:w(l()).default([])}),vN=[`device-state`,`streams`,`battery`,`consumables`,`detection-blind`,`nodes`,`addons`,`addon-updates`,`updates`],yN=C(vN),bN=d({id:yN,status:C([`read`,`unavailable`]),items:i().int().nonnegative(),reason:l().optional()}),xN=d({section:yN.optional(),title:l(),text:l(),count:i().int().nonnegative()}),SN=d({empty:T(),count:i().int().nonnegative(),text:l(),sections:w(bN),dropped:x(l(),i().int().nonnegative()),excludedGroups:w(l()),split:TM.optional(),rows:w(xN).optional()}),CN=d({recordId:l(),recordKind:C([`object-event`,`track`,`device-event`,`package-event`,`system-event`]),deviceId:i(),timestamp:i(),wouldFire:T(),failedCondition:l().optional(),className:l().optional(),label:l().optional()}),wN=C([`detection`,`sensor`,`occupancy`,`sound`,`device-events`,`system`,`alarm`,`mixed`]),TN=C([`detection`,`sensor`,`occupancy`,`sound`,`system`]),EN=C([`rule`,`timelapse`,`summary`]),DN=C([`title`,`body`,`previewText`,`captionText`]),ON=C([`subject`,`place`,`time`,`rule`,`occupancy`,`sound`,`sensor`,`system`,`digest`,`ai`]),kN=d({name:l().regex(/^\w+$/),label:l(),description:l().optional(),example:l(),group:ON,families:w(EN).min(1),fields:w(DN).optional(),kinds:w(TN).optional(),deliveries:w(hM).optional(),systemEventKinds:w(gM).optional(),systemEventDeliveries:w(wM).optional(),dynamic:d({prefix:h(`count_`),from:h(`classes`)}).optional()}),AN=d({family:EN,field:DN,kind:wN.optional(),delivery:hM.optional(),systemEventKinds:w(gM).optional(),systemEventDelivery:wM.optional()}),jN=d({context:AN,template:d({title:l().max(500).optional(),body:l().max(2e3).optional()})}),MN=d({title:l().nullable(),body:l().nullable(),unknown:w(l())}),NN=d({id:l(),group:C([`scope`,`class`,`zones`,`quality`,`label`,`schedule`,`device`,`package`,`occupancy`,`audio`,`system`]),label:l(),valueType:C([`deviceIdList`,`deviceIdExcludeList`,`stringList`,`number01`,`number`,`sourceSelect`,`zoneSelection`,`zoneIdList`,`schedule`,`plateMatcher`,`packagePhase`,`crossingSelect`,`sensorTransition`,`polygonDraw`,`occupancy`,`audio`,`deviceState`,`scene`,`systemEvent`]),operator:C([`in`,`notIn`,`anyOf`,`allOf`,`gte`,`fuzzyIn`,`withinSchedule`]),appliesTo:w(hM),phase:l(),description:l().optional(),options:w(d({value:l(),label:l(),hint:l().optional()})).readonly().optional()}),PN=[{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:`motion-noisy`,label:`Camera motion constant, no subject`},{value:`motion-calm`,label:`Camera motion calm again`},{value:`package-llm-silent`,label:`Package confirm not answering`},{value:`package-llm-answered`,label:`Package confirm answering again`},{value:`recording-stalled`,label:`Recording stalled`},{value:`recording-healthy`,label:`Recording healthy again`},{value:`recording-degraded`,label:`Recording degraded (restart storm)`},{value:`device-attention-required`,label:`Device needs attention`},{value:`device-attention-resolved`,label:`Device attention resolved`},{value:`storage-location-low`,label:`Storage location low`},{value:`storage-location-critical`,label:`Storage location critical`},{value:`storage-location-ok`,label:`Storage location ok again`},{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:`export-completed`,label:`Export completed`},{value:`backup-completed`,label:`Backup completed`},{value:`alert-critical`,label:`Critical alert raised`},{value:`alert-error`,label:`Error alert raised`},{value:`alert-critical-resolved`,label:`Critical alert resolved`},{value:`rule-broken`,label:`Notification rule broken`},{value:`rule-repaired`,label:`Notification rule repaired`},{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.`}],FN=C([`pending`,`sent`,`dead`]),IN=C([`object-event`,`track-end`,`device-event`,`package-event`,`system-event`]),LN=d({className:l(),label:l().optional(),confidence:i().optional(),zones:w(l()),timestamp:i(),systemEvent:d({kind:gM,subject:l(),title:l(),body:l(),data:x(l(),o())}).optional()}),RN=d({id:l(),ruleId:l(),ruleName:l(),delivery:hM,targetId:l(),deviceId:i(),recordKind:IN,recordId:l(),trackId:l().optional(),status:FN,attempts:i().int(),createdAt:i(),updatedAt:i(),error:l().optional(),subject:LN,artifactIds:w(l().min(1)).optional()}),zN=100,BN=500,VN=d({ruleId:l().optional(),deviceId:i().optional(),status:FN.optional(),since:i().optional(),until:i().optional(),limit:i().int().min(1).max(500).default(100)}),HN=d({ruleId:l(),lastAt:i(),status:FN,deviceId:i()}),UN=d({runs:w(HN),horizonMs:i().nonnegative().nullable()}),WN=C([`rule`,`device`,`all`]),GN=d({scope:WN,ruleId:l().optional(),deviceId:i().int().optional(),classes:w(l().min(1)).min(1).optional(),durationMinutes:i().int().min(1).max(xM),global:T().optional(),summary:T().optional()}),KN=d({id:l(),userId:l(),scope:WN,ruleId:l().optional(),deviceId:i().int().optional(),classes:w(l().min(1)).min(1).optional(),startedAt:i(),expiresAt:i(),global:T(),summary:T(),digestSentAt:i().optional()}),qN=d({snoozeId:l(),targetId:l(),ruleId:l(),ruleName:l(),deviceId:i().int(),count:i().int(),firstAt:i(),lastAt:i()}),JN=600,YN=3600,XN=200,ZN=i().int().min(0).max(600),QN=i().int().min(0).max(YN),$N=e=>new Set(e.map(e=>e.mode)).size===e.length,eP=C([`rearmAfter`,`disableAfter`,`doNothing`]),tP=d({mode:iM,exitDelaySec:ZN.optional(),entryDelaySec:ZN.optional(),triggeredDurationSec:QN.optional(),postTriggeredAction:eP.optional(),schedule:CM.optional(),notifyDuringEntryDelay:T().optional(),notifySensorRewatched:T().optional(),notifySensorIgnored:T().optional()}),nP=w(tP).max(8).refine($N,{message:`modeDelays: at most one entry per arm mode`}),rP=d({mode:iM,exitDelaySec:ZN.nullable().optional(),entryDelaySec:ZN.nullable().optional(),triggeredDurationSec:QN.nullable().optional(),postTriggeredAction:eP.nullable().optional(),schedule:CM.nullable().optional(),notifyDuringEntryDelay:T().nullable().optional(),notifySensorRewatched:T().nullable().optional(),notifySensorIgnored:T().nullable().optional()}),iP=w(rP).max(8).refine($N,{message:`modeDelays: at most one edit per arm mode`}),aP=d({mode:iM,deviceId:i().int().positive(),nonBlocking:T()}),oP=d({mode:iM,deviceId:i().int().positive(),blocking:T()}),sP=d({mode:iM,deviceId:i().int().positive(),secureOnArm:T()}),cP=d({mode:iM,deviceIds:w(i().int()).max(200)}),lP=cP,uP=cP,dP=cP,fP=w(lP).max(8).refine($N,{message:`nonBlocking: at most one list per arm mode`}),pP=w(uP).max(8).refine($N,{message:`blocking: at most one list per arm mode`}),mP=w(dP).max(8).refine($N,{message:`secureOnArmOff: at most one list per arm mode`}),hP=d({exitDelaySec:ZN,entryDelaySec:ZN,triggeredDurationSec:QN,postTriggeredAction:eP.optional(),announceArm:T().optional(),announceTargets:w(l().min(1)).max(16),nonBlocking:fP.default([]),blocking:pP.default([]),secureOnArmOff:mP.default([]),modeDelays:nP.default([])}),gP=d({id:l().min(1).max(64),name:l().min(1).max(64),isDefault:T()}),_P=d({activeId:l().min(1),items:w(gP).min(1)}),vP=d({name:l().min(1).max(64),cloneFromId:l().min(1).max(64).optional()}),yP=d({id:l().min(1).max(64),name:l().min(1).max(64)}),bP=d({id:l().min(1).max(64)}),xP=hP.extend({nonBlocking:fP,blocking:pP,secureOnArmOff:mP,modeDelays:iP,nonBlockingEdit:aP,blockingEdit:oP,secureOnArmEdit:sP}).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`}),SP=C([`muted`,`detection-off`,`offline`]),CP=d({deviceId:i().int(),reason:SP}),wP=d({mode:iM,ruleCount:i().int().min(0),allDevices:T(),deviceIds:w(i().int()),allDevicesExcept:w(i().int()).default([]),skippedDevices:w(CP).default([])}),TP=d({deviceId:i().int(),name:l(),state:l(),blocking:T()}),EP=d({deviceId:i().int(),name:l(),phase:C([`open`,`closed`])}),DP=d({mode:iM,devices:w(TP),unknown:w(i().int())}),OP=d({ruleId:l(),ruleName:l(),deviceId:i().int(),name:l(),since:i(),dropped:i().int().min(0)}),kP=d({state:rM,targetMode:iM.nullable(),availableModes:w(iM),openings:w(DP),exclusions:w(EP),bypassedInputs:w(OP).default([])}),AP=d({deviceId:i().int().nullable(),settings:hP,profiles:_P.optional(),coverage:w(wP),live:kP.optional()}),jP=500,MP=C([`open`,`closed`,`unknown`,`not-opening`]),NP=d({deviceId:i().int().positive(),reading:MP,state:l().nullable(),unknownWhy:C([`read-failed`,`unknown-word`]).nullable(),online:T().nullable(),controllable:T().default(!1)}),PP=d({deviceIds:w(i().int().positive()).max(500)}),FP=d({sensors:w(NP),readAt:i().int().nonnegative()}),IP=60,LP=d({deviceId:i().int().nonnegative().optional(),seconds:i().min(0).max(60),profile:j.optional(),ruleId:l(),ruleName:l(),reason:C([`window`,`occupancy`])}),RP=d({rulesLoaded:T(),asks:w(LP).readonly()}),zP={name:`notification-rules`,scope:`system`,mode:`singleton`,methods:{listRules:M(d({}),d({rules:w(_N)}),{auth:`admin`}),getRule:M(d({ruleId:l()}),d({rule:_N.nullable()}),{auth:`admin`}),createRule:M(d({rule:uN}),d({rule:_N}),{kind:`mutation`,auth:`admin`,caller:`required`}),updateRule:M(gN,d({rule:_N}),{kind:`mutation`,auth:`admin`,caller:`required`}),deleteRule:M(d({ruleId:l()}),d({success:h(!0)}),{kind:`mutation`,auth:`admin`}),setRuleEnabled:M(d({ruleId:l(),enabled:T()}),d({success:h(!0)}),{kind:`mutation`,auth:`admin`}),listSequences:M(d({}),d({sequences:w(FM)}),{auth:`admin`}),getSequence:M(d({sequenceId:l().min(1)}),d({sequence:FM.nullable()}),{auth:`admin`}),createSequence:M(d({sequence:IM}),d({sequence:FM}),{kind:`mutation`,auth:`admin`}),updateSequence:M(d({sequenceId:l().min(1),sequence:IM}),d({sequence:FM}),{kind:`mutation`,auth:`admin`}),deleteSequence:M(d({sequenceId:l().min(1)}),d({success:h(!0)}),{kind:`mutation`,auth:`admin`}),getClipRetentionAsks:M(d({}),RP,{auth:`admin`}),listDeviceMutes:M(d({}),d({mutedDeviceIds:w(i().int()).readonly()}),{auth:`admin`}),setDeviceMuted:M(d({deviceId:i().int(),muted:T()}),d({success:h(!0)}),{kind:`mutation`,auth:`admin`}),testRule:M(d({rule:uN,lookbackMinutes:i().int().min(1).max(1440).default(60)}),d({results:w(CN)}),{kind:`mutation`,auth:`admin`}),previewStateSummary:M(d({rule:uN}),SN,{kind:`mutation`,auth:`admin`,access:`view`}),getConditionCatalog:M(d({}),d({catalog:w(NN),taxonomy:eM.optional()})),getTemplateCatalog:M(d({}),d({vars:w(kN)})),previewTemplate:M(jN,MN,{kind:`mutation`,access:`view`}),getHistory:M(d({filter:VN.default({limit:100})}),d({entries:w(RN)}),{auth:`admin`}),getRuleLastRuns:M(d({}),UN,{auth:`admin`}),resolveArtifactUrl:M(d({artifactId:l().min(1)}),d({url:l().nullable()}),{auth:`admin`}),listSnoozes:M(d({}),d({snoozes:w(KN)}),{caller:`required`}),createSnooze:M(d({snooze:GN}),d({snooze:KN}),{kind:`mutation`,caller:`required`}),cancelSnooze:M(d({snoozeId:l()}),d({success:h(!0)}),{kind:`mutation`,caller:`required`}),getAlarmConfig:M(d({}),AP,{auth:`admin`}),setAlarmConfig:M(d({patch:xP}),AP,{kind:`mutation`,auth:`admin`}),createAlarmProfile:M(vP,AP,{kind:`mutation`,auth:`admin`}),renameAlarmProfile:M(yP,AP,{kind:`mutation`,auth:`admin`}),deleteAlarmProfile:M(bP,AP,{kind:`mutation`,auth:`admin`}),activateAlarmProfile:M(bP,AP,{kind:`mutation`,auth:`admin`}),getAlarmSensors:M(PP,FP,{auth:`admin`})}},BP=d({integrationId:l(),displayName:l(),requestedScopes:w(tg),allowedRedirectPrefixes:w(l()).min(1),allowedPrivateHostPaths:w(l()).optional(),requiresPkce:T().optional(),hubUrl:l().optional(),refreshTokenTtlSec:f([i().int().positive(),h(`never`)]).optional()}),VP={name:`oauth-integration`,scope:`system`,mode:`collection`,internal:!0,methods:{getDescriptor:M(y(),BP,{auth:`admin`})}},HP=o(),UP=d({id:l().min(1),displayName:l(),icon:l(),issuerUrl:l(),clientId:l(),configured:T(),formValues:x(l(),o()).optional()}),WP=d({id:l().min(1),displayName:l().min(1),icon:l().optional(),issuerUrl:l().optional(),clientId:l().optional(),clientSecret:f([l(),d({$secretClear:h(!0)})]).optional(),redirectUri:l().optional(),scopes:l().optional(),usernameClaim:C([`preferred_username`,`email`,`sub`]).optional()}),GP={name:`oidc-connections`,scope:`system`,mode:`singleton`,methods:{connectionFormSchema:M(d({}),HP,{auth:`admin`}),listConnections:M(d({}),w(UP).readonly(),{auth:`admin`}),createConnection:M(d({id:l().min(1).regex(/^[a-z0-9][a-z0-9-]{0,63}$/,`id must be a lowercase slug`),displayName:l().min(1)}),d({id:l()}),{kind:`mutation`,auth:`admin`}),updateConnection:M(WP,d({ok:h(!0)}),{kind:`mutation`,auth:`admin`}),deleteConnection:M(d({id:l().min(1)}),d({ok:h(!0)}),{kind:`mutation`,auth:`admin`})}},KP=m(`kind`,[d({kind:h(`camera`)}),d({kind:h(`sensor`),deviceId:i().int().positive()})]),qP=Object.freeze({kind:`camera`});function JP(e){if(e===void 0)return{triggeredBy:qP,malformed:!1};let t=KP.safeParse(e);return t.success?{triggeredBy:t.data,malformed:!1}:{triggeredBy:qP,malformed:!0}}var YP=`cameraSensors`,XP=8,ZP=d({addonId:l().min(1),stableId:l().min(1)});function QP(e){return`${e.addonId}/${e.stableId}`}var $P=C([`in-addition`,`confirm`,`replace`]),eF=`in-addition`,tF=ZP.extend({mode:$P.default(eF)}),nF=d({sensors:w(tF).min(1).max(8)}).superRefine((e,t)=>{let n=new Set;e.sensors.forEach((e,r)=>{let i=QP(e);n.has(i)&&t.addIssue({code:`custom`,path:[`sensors`,r],message:`duplicate camera sensor ${i}`}),n.add(i)})}),rF={addonId:l(),stableId:l(),mode:$P.default(eF)},iF=m(`state`,[d({...rF,state:h(`ready`),deviceId:i(),name:l(),caps:w(l()).readonly()}),d({...rF,state:h(`offline`),deviceId:i(),name:l(),reason:C([`offline`,`disabled`])}),d({...rF,state:h(`missing`),reason:l()}),d({...rF,state:h(`unsupported`),deviceId:i(),name:l(),reason:l()}),d({...rF,state:h(`unreadable`),reason:l()})]),aF=C([`onboard-not-listed`,`no-active-detection`]),oF=C([`always`,`when-confirmed`,`never`]),sF=C([`provider-not-split`]),cF=d({detected:T(),atMs:i()}),lF=m(`state`,[d({state:h(`not-configured`),cameraLevel:cF.optional()}),d({state:h(`unreadable`),reason:l(),cameraLevel:cF.optional()}),d({state:h(`configured`),cameraLevel:cF.optional(),sensors:w(iF).readonly(),cameraMotion:oF.optional(),notForwarded:aF.optional(),notEnforced:sF.optional()})]),uF=Object.freeze({state:`unreadable`,reason:`camera sensor mappings not loaded`}),dF=d({package:T(),confidence:i().min(0).max(1),reason:l().min(1)}),fF=[`owner-not-ready`,`store-read-failed`,`three-way-read-unavailable`,`invalid-stored`,`not-cluster-scoped`],pF=[{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)`}]}],mF=`cluster-step-models`;function hF(e){return`clusterModel:${e}`}function gF(e){return pF.some(t=>t.stepId===e)}var _F=Object.freeze(Object.fromEntries(pF.map(e=>[e.stepId,e.defaultModelId])));function vF(e){return e==null||e===``?{kind:`absent`}:typeof e==`string`?{kind:`chosen`,modelId:e}:{kind:`invalid`,value:e}}function yF(e){let t=[];for(let n of pF){let r=vF(e[hF(n.stepId)]);r.kind===`invalid`&&t.push({stepId:n.stepId,value:r.value})}return t}function bF(e){let t={};for(let n of pF){let r=vF(e[hF(n.stepId)]);t[n.stepId]=r.kind===`chosen`?r.modelId:n.defaultModelId}return t}function xF(e){return typeof e==`object`&&!!e&&`key`in e}function SF(e){return e===null?_F:bF(TF(e,wF()))}function CF(e){return e===null?[]:yF(TF(e,wF()))}function wF(){return new Set(pF.map(e=>hF(e.stepId)))}function TF(e,t){let n={};for(let r of e.sections)for(let e of r.fields)!xF(e)||typeof e.key!=`string`||t.has(e.key)&&(n[e.key]=e.value);return n}function EF(e,t){let n=pF.find(t=>t.stepId===e);if(n===void 0)return null;let r=t[e];return r!==void 0&&r!==``?r:n.defaultModelId}var DF=24,OF=[{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 kF(e,t){return`clusterStepSetting:${e}:${t}`}function AF(e){return OF.filter(t=>t.stepId===e)}var jF=i().finite();function MF(e){let t={};for(let n of OF){let r=jF.safeParse(e[kF(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 NF=MF({});function PF(e){return e===null?NF:MF(TF(e,new Set(OF.map(e=>kF(e.stepId,e.key)))))}function FF(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 IF=C([`new`,`entered`,`left`,`moving`,`idle`]),LF=C([`motion`,`object`,`audio`]),RF=m(`kind`,[cM,lM]),zF=C([`motion`,`audio`,`person`,`vehicle`,`animal`,`door`,`pir`,`smoke`,`water`,`button`,`package`,`generic`]),BF=C([`motion`,`audio`,`detection`,`sensor`,`control`,`custom`,`package`]),VF=C([`macro`,`sub`]),HF=d({kind:l(),labelKey:l(),label:l(),color:l(),iconId:l(),icon:zF,category:BF,parentKind:l().nullable(),level:VF,source:d({capName:l(),deviceId:i()})}),UF=d({deviceId:i(),kinds:w(HF).readonly()}),WF=d({id:l(),deviceId:i(),sourceDeviceId:i(),kind:l(),value:x(l(),o()).nullable(),timestamp:i()}),GF=d({x:i(),y:i(),timestamp:i(),bbox:Pv,source:C([`frame`,`recovery`]).optional(),score:i().optional()}),KF=d({timestamp:i(),position:GF,mediaId:i().int()}),qF=d({minX:i(),minY:i(),maxX:i(),maxY:i()}),JF=C([`full`,`slim`]),YF=d({label:l(),peakScore:i(),count:i(),firstAt:i(),lastAt:i()}),XF=C([`pipeline`,`onboard`,`sensor`,`audio`]),ZF=C([`none`,`staging`,`trained`]),QF=500,$F={markForTrain:T().optional(),debug:T().optional(),debugNote:l().max(500).optional(),favourited:T().optional()},eI={retrainStatus:ZF.optional()},tI=d($F),nI=d({trackId:l(),markForTrain:T(),debug:T(),debugNote:l(),favourited:T(),retrainStatus:ZF}),rI=f([h(1),h(2)]),iI=d({stepId:l(),modelId:l().optional(),decidedAt:i(),identityId:l().optional()}),aI={label:l().optional(),labelScore:i().optional(),labelMeta:iI.optional(),subLabel:l().optional(),subLabelScore:i().optional(),subLabelMeta:iI.optional()},oI=d({deviceId:i(),tracks:i().int(),files:i().int(),bytes:i().int()}),sI=d({generatedAt:i(),trackCount:i().int(),fileCount:i().int(),byteCount:i().int(),truncated:T(),devices:w(oI).readonly()}),cI=d({nodeId:l(),deviceKey:l().optional(),modelId:l().optional()}),lI=d({trackId:l(),deviceId:i(),className:l(),...aI,producingDeviceName:l().optional(),source:XF.optional(),firstSeen:i(),lastSeen:i(),positions:w(GF).readonly(),snapshots:w(KF).readonly(),zonesVisited:w(l()).readonly(),zoneNames:w(l()).readonly().optional(),classes:w(l()).readonly().optional(),totalDistance:i(),state:IF,active:T(),importance:i().optional(),bestEventId:l().optional(),importanceReason:l().optional(),audioLabels:w(YF).readonly().optional(),envelope:qF.optional(),hasFace:T().optional(),hasEmbeddedFace:T().optional(),hasRider:T().optional(),previewMissReason:l().optional(),modelId:l().optional(),openedPlacement:cI.optional(),closedPlacement:cI.optional(),frameWidth:i().optional(),frameHeight:i().optional(),...$F,...eI}),uI={id:i().int(),deviceId:i(),timestamp:i()},dI=d({...uI,kind:h(`motion`),regionCount:i(),regions:w(d({bbox:Pv,pixelCount:i(),intensity:i()})).readonly().optional(),frameWidth:i().optional(),frameHeight:i().optional(),mediaUrl:l().optional(),triggeredBy:KP.optional(),durationMs:i().nullable().optional(),edges:w(i()).readonly().optional()}),fI=C([`pipeline`,`onboard`]),pI=C([`enter`,`exit`]),mI=d({direction:pI,zoneId:l(),zoneName:l().optional()}),hI=d({zoneId:l(),zoneName:l().optional(),overlapPct:i()}),gI=d({...uI,kind:h(`object`),source:fI.optional(),frameId:l().optional(),idempotencyKey:l().optional(),trackId:l().optional(),className:l(),...aI,confidence:i().optional(),bbox:Pv.optional(),zones:w(l()).readonly().optional(),zoneOverlaps:w(hI).readonly().optional(),spawnRefused:l().optional(),state:IF.optional(),zoneCrossing:mI.optional(),frameWidth:i().optional(),frameHeight:i().optional(),mediaId:i().int().optional(),keyFrameMediaId:i().int().optional(),mediaUrl:l().optional(),observedAt:i().optional(),packagePossible:T().optional(),packageLlmVerdict:dF.optional(),importance:i().optional()}),_I=d({...uI,kind:h(`audio`),rms:i(),dbfs:i(),classification:d({className:l(),originalClass:l().optional(),score:i()}).optional(),classifyOutcome:Bv.optional(),mediaUrl:l().optional()}),vI=C([`crop`,`thumbnail`,`snapshot`,`firstFrame`,`lastFrame`,`fullFrame`,`fullFrameBoxed`,`faceCrop`,`plateCrop`,`keyFrame`,`keyFrameSmall`,`thumbnailSmall`,`confirmationCrop`,`debugCrop`,`sceneFrame`,`lastSceneFrame`]),yI=d({mediaId:i().int(),kind:vI,sizeBytes:i(),timestamp:i()}),bI=yI.extend({url:l(),base64:l()}),xI=bI.omit({base64:!0}),SI=C([`person`,`vehicle`,`animal`,`package`,`face`,`plate`]),CI=C([`subject`,`model_error`]),wI=C([`operator`,`assist`,`pipeline`,`llm`]),TI=d({x:i(),y:i(),w:i(),h:i()}),EI=d({source:wI,ref:l().min(1),bbox:TI,macroClass:SI,label:l().optional(),score:i().optional(),modelId:l().optional()}),DI=d({ref:l().min(1),snapshot:EI}),OI=C(Zu),kI=d({ref:l(),savedId:l().optional(),status:OI,approximate:T(),origin:EI.optional(),macroClass:SI.optional(),label:l().optional(),iou:i().optional()}),AI=d({boxes:w(kI).readonly(),summary:d({counts:x(OI,i().int()),total:i().int(),changed:i().int(),approximate:T()})}),jI=d({id:l(),trackId:l().optional(),deviceId:i(),mediaKey:l(),bbox:TI,macroClass:SI,label:l().optional(),subLabel:l().optional(),kind:CI,source:wI,assistModelId:l().optional(),assistScore:i().optional(),origin:EI.nullable().optional(),exportedInBatch:l().optional(),createdAt:i()}),MI=jI.omit({id:!0,trackId:!0,deviceId:!0,mediaKey:!0,createdAt:!0,exportedInBatch:!0}),NI=d({trackId:l(),deviceId:i(),className:l(),label:l().optional(),firstSeen:i(),lastSeen:i(),frameCount:i().int(),annotationCount:i().int()}),PI=d({mediaId:i().int(),kind:vI,timestamp:i(),sizeBytes:i().int(),copied:T()}),FI=d({bbox:TI,macroClass:SI,label:l().optional(),subLabel:l().optional(),score:i().optional(),modelId:l().optional(),trackId:l(),basis:C([`subject-box`,`position`]),deltaMs:i()}),II=C([`track`,`recording`]),LI=d({frameId:l(),deviceId:i(),origin:II,trackId:l().optional(),sourceMediaId:i().int().optional(),epochMs:i().optional(),sourceKind:vI,sizeBytes:i().int(),width:i().int(),height:i().int(),copiedAt:i(),capturedAt:i().optional(),complete:T(),pipelineBoxes:w(FI).readonly().optional(),collectionIds:w(l()).readonly().optional(),revision:i().int().optional(),dismissed:w(DI).readonly().optional(),review:AI.optional(),imageUrl:l().optional(),thumbnailUrl:l().optional()}),RI=C([`source-missing`,`unreadable-image`,`write-failed`]),zI=d({copied:w(LI).readonly(),refused:w(d({sourceMediaId:i().int(),reason:RI})).readonly()}),BI=d({candidates:w(PI).readonly(),copies:w(LI).readonly(),autoPickMediaId:i().int().optional()}),VI=C([`unannotated`,`annotated`,`complete`]),HI=d({workState:VI.optional(),deviceIds:w(i()).max(500).optional(),collectionId:l().optional(),classes:w(SI).optional(),page:i().int().positive().default(1),pageSize:i().int().positive().max(100).default(50)}),UI=LI.extend({workState:VI}),WI=d({frames:w(UI).readonly(),total:i().int().nonnegative(),page:i().int().positive(),pageSize:i().int().positive()}),GI=d({deviceId:i(),unannotated:i().int().nonnegative(),annotated:i().int().nonnegative(),complete:i().int().nonnegative(),pctOfCorpus:i().min(0).max(1).nullable()}),KI=d({total:i().int().nonnegative(),unannotated:i().int().nonnegative(),annotated:i().int().nonnegative(),complete:i().int().nonnegative(),cameras:w(GI).readonly()}),qI=d({deviceIds:w(i()).optional(),frameIds:w(l()).max(2e4).optional(),collectionIds:w(l()).max(200).optional(),collectionId:l().optional(),batchId:l().optional(),completeOnly:T().optional(),workState:VI.optional(),classes:w(SI).optional()}),JI=C([`frames`,`crops`]),YI=d({kind:h(`http`),method:C([`PUT`,`POST`]),url:l().url(),headers:x(l(),l()).optional()}),XI=d({batchId:l(),frames:i().int(),crops:i().int(),annotations:i().int(),missing:i().int(),bytes:i().int(),sha256:l(),status:i().int()}),ZI=m(`kind`,[d({kind:h(`package`),zone:TI.optional()}),d({kind:h(`objects`),modelId:l(),minScore:i().optional()})]),QI=m(`kind`,[d({kind:h(`proposed`),modelId:l(),stepId:l(),minScore:i(),proposals:w(MI).readonly(),belowThreshold:i().int()}),d({kind:h(`refused`),reason:l(),detail:l().optional()})]),$I=d({id:l(),name:l(),createdAt:i(),frameCount:i().int()}),eL=m(`kind`,[d({kind:h(`created`),collection:$I}),d({kind:h(`refused`),reason:C([`empty-name`,`duplicate-name`])})]),tL=m(`kind`,[d({kind:h(`renamed`),collection:$I}),d({kind:h(`refused`),reason:C([`empty-name`,`duplicate-name`,`unknown-collection`])})]),nL=m(`kind`,[d({kind:h(`added`),collectionId:l(),frame:LI,reused:T()}),d({kind:h(`refused`),reason:C([`unknown-collection`,`still-unavailable`,`still-busy`,`unreadable-image`,`write-failed`]),detail:l().optional()})]),rL=d({id:l(),name:l(),model:l(),kind:l(),leavesHouse:T()}),iL=MI.extend({reason:l()}),aL=d({ref:l(),verdict:C([`confirmed`,`wrong-class`,`not-an-object`,`uncertain`]),suggestedClass:SI.optional(),reason:l()}),oL=m(`kind`,[d({kind:h(`proposed`),profileId:l(),model:l(),leftHouse:T(),proposals:w(iL).readonly(),reviews:w(aL).readonly(),rejected:i().int()}),d({kind:h(`refused`),reason:C([`unknown-frame`,`unreadable-frame`,`unknown-profile`,`profile-disabled`,`no-vision`,`cloud-not-confirmed`,`llm-error`,`malformed-answer`]),detail:l().optional()})]),sL=d({deviceIds:w(i()).readonly().optional(),collectionIds:w(l()).max(200).readonly().optional(),frameIds:w(l()).max(2e4).readonly().optional()}),cL=d({frames:i().int(),completeFrames:i().int(),completeness:i(),subjects:i().int(),modelErrors:i().int(),hardNegatives:i().int(),cells:w(d({macroClass:l(),deviceId:i(),lighting:C([`day`,`night`,`unknown`]),subjects:i().int(),frames:i().int()})).readonly(),cameras:w(d({deviceId:i(),frames:i().int(),completeFrames:i().int()})).readonly()}),lL=d({id:l(),name:l(),createdAt:i(),selection:sL,layout:JI,completeOnly:T(),frameCount:i().int(),annotationHash:l(),manifestSchema:l(),stats:cL}),uL=d({collectionIds:w(l()).min(1),workState:C([`complete`,`annotated_or_complete`,`any_annotated`]).default(`complete`)}),dL=m(`kind`,[d({kind:h(`resolved`),frameIds:w(l()).max(2e4).readonly(),stats:cL,annotationHash:l(),layout:JI}),d({kind:h(`refused`),reason:C([`unknown-collection`,`no-frames`]),detail:l()})]),fL=d({trackId:l(),retrainStatus:ZF,changed:T(),reason:C([`unknown-track`,`no-frames-copied`,`not-staging`,`not-trained`,`unchanged`]).optional()}),pL=1e3,mL=5e3,hL=d({deviceId:i(),since:i().optional(),until:i().optional(),limit:i().int().min(1).max(mL).default(pL),projection:C([`full`,`slim`]).optional()}),gL=hL.extend({classFilter:l().optional()}),_L=d({deviceIds:w(i()),since:i().optional(),until:i().optional(),limit:i().int().min(1).max(1e3).default(200),cursor:l().optional(),projection:JF.optional(),includeStationary:T().optional(),classes:w(l()).optional(),excludeSources:w(XF).optional()}),vL=d({tracks:w(lI).readonly(),nextCursor:l().nullable()}),yL=50,bL=200,xL=d({deviceId:i(),since:i(),until:i(),limit:i().int().min(1).max(bL).default(yL),minImportance:i().min(0).max(1).optional(),classFilter:l().optional()}),SL=d({id:l(),trackId:l(),timestamp:i(),className:l(),...aI,importance:i(),bestEventId:l(),windowMs:i().optional(),audioLabels:w(YF).readonly().optional(),...$F,...eI}),CL=d({deviceIds:w(i()).min(1).max(200),since:i(),until:i(),limit:i().int().min(1).max(bL).default(yL),minImportance:i().min(0).max(1).optional(),classFilter:l().optional()}),wL=d({deviceId:i(),events:w(SL).readonly()}),TL=d({bucketStart:i(),motion:i().int(),object:i().int(),audio:i().int(),audioDbfs:i().optional()}),EL=200,DL=d({deviceId:i(),read:C([`read`,`unreadable`]),buckets:w(TL).readonly()}),OL=d({trackId:l(),className:l(),confidence:i(),bbox:Pv,zones:w(l()).readonly(),state:IF}),kL=a({id:l(),kind:C([`first-level`,`detail`]),macroClass:l(),score:i(),bbox:d({x:i(),y:i(),width:i(),height:i()}),labels:w(a({label:l(),score:i()})).readonly(),parentId:l().optional()}),AL=gI.extend({score:i()}),jL=d({text:l(),deviceId:i().optional(),since:i().optional(),until:i().optional(),classFilter:l().optional(),limit:i().default(50),minScore:i().min(0).max(1).optional(),strictness:sh.optional(),modelId:l().min(1).optional()}),ML=d({tracks:i().int(),events:i().int(),media:i().int(),faces:i().int(),plates:i().int(),embeddings:i().int()}),NL=d({mediaDropped:i().int(),tracks:i().int(),events:i().int()}),PL=d({deviceId:i(),rows:i().int(),bytes:i().int()}),FL=d({totalRows:i().int(),totalBytes:i().int(),devices:w(PL).readonly()}),IL=d({kind:vI,rows:i().int(),bytes:i().int()}),LL=d({totalRows:i().int(),totalBytes:i().int(),kinds:w(IL).readonly(),unaccountedRows:i().int(),unaccountedBytes:i().int()}),RL=d({motion:i().int(),object:i().int(),audio:i().int()}),zL=d({deviceId:i().optional(),since:i().optional(),until:i().optional(),maxTracks:i().int().positive().optional(),executeOnNodeId:l().optional(),pacingMs:i().int().nonnegative().optional(),force:T().optional()}),BL=d({deleted:i(),failedIndexes:w(l()).optional()}),VL=C([`stores-unavailable`,...fF,`method-unavailable`,`read-failed`,`reads-disagree`,`not-a-clip-model`,`force-requires-max-tracks`]),HL=d({started:T(),alreadyRunning:T(),refusal:VL.optional(),modelId:l().optional(),index:l().optional()}),UL=d({running:T(),scanned:i(),rebuilt:i(),missingKeyFrame:i(),missingEvent:i(),missingBbox:i(),boxSource:d({subjectBox:i(),positions:i(),event:i(),refused:i()}),alreadyInSpace:i(),force:T().nullable(),forcedInSpace:i(),notRunnable:i(),noCapableNode:i(),failed:i(),complete:T().nullable(),startedAtMs:i().nullable(),finishedAtMs:i().nullable(),error:l().nullable(),modelId:l().nullable(),index:l().nullable()}),WL=d({started:T(),alreadyRunning:T()}),GL=d({mode:C([`report`,`reclaim`]).default(`report`),scopes:w(C([`motion-still`,`track-filmstrip`])).min(1).optional(),deviceIds:w(i().int()).min(1).optional(),restart:T().optional(),pageSize:i().int().min(50).max(5e3).optional(),maxRowsPerDevice:i().int().min(1).max(5e5).optional(),maxReclaimPerDevice:i().int().min(1).max(5e5).optional(),maxBytesPerRun:i().int().min(1).optional(),budgetMinutes:i().int().min(1).max(720).optional(),throttleBytesPerSec:i().int().min(64*1024).optional(),graceMinutes:i().int().min(1).max(10080).optional()}),KL=d({running:T(),mode:C([`report`,`reclaim`]).nullable(),totalExamined:i(),totalEligible:i(),totalReclaimed:i(),totalBytesReclaimed:i(),totalRefused:i(),devicesDone:i(),complete:T().nullable(),startedAtMs:i().nullable(),finishedAtMs:i().nullable(),error:l().nullable()}),qL=C([`motion`,`audio-dbfs`,`battery`,`occupancy`]),JL=`|`;function YL(e,t){let n=e??``;return t===void 0?n:`${n}|${t}`}function XL(e){let t=e.indexOf(`|`);return t<0?{zoneId:e}:{zoneId:e.slice(0,t),className:e.slice(t+1)}}var ZL=d({scope:l(),bucketStart:i().int(),samples:i().int().nonnegative(),sum:i(),min:i(),max:i()}),QL={name:`pipeline-analytics`,scope:`device`,mode:`singleton`,kind:`wrapper`,defaultActive:!0,deviceTypes:[P.Camera],exposesDeviceSettings:!0,methods:{getActiveTracks:M(d({deviceId:i()}),w(lI).readonly()),getTrack:M(d({deviceId:i(),trackId:l()}),lI.nullable()),listTracks:M(d({deviceId:i(),since:i().optional(),until:i().optional(),limit:i().optional(),zone:RF.optional(),projection:JF.optional(),includeStationary:T().optional(),classes:w(l()).optional(),excludeSources:w(XF).optional()}),w(lI).readonly()),listRecentTracks:M(_L,vL),clearTracks:M(d({deviceId:i()}),y(),{kind:`mutation`,auth:`admin`}),getMotionEvents:M(hL,w(dI).readonly()),getObjectEvents:M(gL,w(gI).readonly()),getAudioEvents:M(hL,w(_I).readonly()),listEventKinds:M(d({deviceId:i()}),w(HF).readonly()),listEventKindsBatch:M(d({deviceIds:w(i()).min(1).max(200)}),w(UF).readonly()),getSensorEvents:M(d({deviceId:i(),since:i().optional(),until:i().optional(),kinds:w(l()).optional(),limit:i().int().min(1).max(mL).default(pL)}),w(WF).readonly()),getKeyEvents:M(xL,w(SL).readonly()),getKeyEventsBatch:M(CL,w(wL).readonly()),readLongTermSeries:M(d({deviceId:i(),series:qL,scope:l().optional(),from:i(),to:i(),limit:i().int().positive().optional()}),w(ZL).readonly()),getEventDensity:M(d({deviceId:i(),since:i(),until:i(),bucketMs:i().int().positive()}),w(TL).readonly()),getEventDensityBatch:M(d({deviceIds:w(i()).min(1).max(200),since:i(),until:i(),bucketMs:i().int().positive()}),w(DL).readonly()),pruneEventsBefore:M(d({deviceId:i(),cutoffMs:i()}),d({motion:i().int(),object:i().int(),audio:i().int()}),{kind:`mutation`,auth:`admin`}),pruneTracksBefore:M(d({deviceId:i(),cutoffMs:i()}),ML,{kind:`mutation`,auth:`admin`}),wipeAllAnalytics:M(d({deviceId:i()}),ML,{kind:`mutation`,auth:`admin`}),reconcileFromDisk:M(d({deviceId:i()}),NL,{kind:`mutation`,auth:`admin`}),deleteTracks:M(d({deviceId:i(),trackIds:w(l()).min(1)}),d({deleted:i().int(),failed:w(l()).readonly(),sparedMediaIds:w(i().int()).readonly().optional()}),{kind:`mutation`,auth:`admin`}),setTrackFlags:M(d({deviceId:i(),trackId:l(),flags:tI}),nI,{kind:`mutation`}),listArchivedDebugNotes:M(bd,w(yd).readonly(),{kind:`query`}),setTrackRelation:M(kd,Dd,{kind:`mutation`}),clearTrackRelation:M(Ad,jd,{kind:`mutation`}),setTrackPurity:M(Md,Nd,{kind:`mutation`}),listTrackRelations:M(Pd,Fd,{kind:`query`}),listBirthDecisions:M(gd,w(hd).readonly(),{kind:`query`}),getEventStoreFootprint:M(d({}),FL,{kind:`query`,auth:`admin`}),getEventMediaFootprintByKind:M(d({deviceId:i().int().optional()}),LL,{kind:`query`,auth:`admin`}),pruneEvents:M(d({olderThanMs:i(),reason:$d.optional()}),RL,{kind:`mutation`,auth:`admin`}),deleteDeviceEvents:M(d({deviceId:i()}),RL,{kind:`mutation`,auth:`admin`}),pauseForStorageMigration:M(Vf,d({paused:h(!0)}),{kind:`mutation`,auth:`admin`}),resumeForStorageMigration:M(Vf,d({resumed:h(!0)}),{kind:`mutation`,auth:`admin`}),refreshStorageLocationsForMigration:M(Vf,d({refreshed:h(!0)}),{kind:`mutation`,auth:`admin`}),startStorageMigrationMove:M(qf,d({jobId:l()}),{kind:`mutation`,auth:`admin`}),getStorageMigrationMoveStatus:M(d({jobId:l()}),Rf.nullable(),{auth:`admin`}),cancelStorageMigrationMove:M(d({jobId:l()}),d({cancelled:T()}),{kind:`mutation`,auth:`admin`}),relocateMedia:M(Wf,d({jobId:l()}),{kind:`mutation`,auth:`admin`}),countUnstampedEventMedia:M(d({}),Kf,{auth:`admin`}),countRelocatableMedia:M(bp,yp,{kind:`query`,auth:`admin`}),listRelocateMediaJobs:M(d({}),w(Rf).readonly(),{kind:`query`,auth:`admin`}),cancelRelocateMedia:M(d({jobId:l()}),d({cancelled:T()}),{kind:`mutation`,auth:`admin`}),listOpsLog:M(tf,w(ef).readonly(),{kind:`query`,auth:`admin`}),reclaimDebugMedia:M(GL,WL,{kind:`mutation`,auth:`admin`}),getMediaReclaimStatus:M(d({}),KL,{kind:`query`,auth:`admin`}),getTrainingExportSummary:M(d({deviceIds:w(i()).optional()}),sI,{kind:`query`,auth:`admin`}),getTrainingExportUrl:M(d({deviceIds:w(i()).optional()}),d({url:l()}),{kind:`query`,auth:`admin`}),listRetrainStaging:M(d({deviceIds:w(i()).optional(),limit:i().int().min(1).max(500).optional()}),w(NI).readonly(),{role:{feature:`retrain`},kind:`query`,auth:`admin`}),listRetrainCorpusPage:M(HI,WI,{role:{feature:`retrain`},kind:`query`,auth:`admin`}),getRetrainCorpusKpi:M(d({}),KI,{role:{feature:`retrain`},kind:`query`,auth:`admin`}),listRetrainFrames:M(d({trackId:l()}),BI,{role:{feature:`retrain`},kind:`query`,auth:`admin`}),selectRetrainFrames:M(d({deviceId:i(),trackId:l(),mediaIds:w(i().int()).min(1)}),zI,{role:{feature:`retrain`},kind:`mutation`,auth:`admin`}),deselectRetrainFrame:M(d({deviceId:i(),trackId:l().optional(),frameId:l()}),d({removed:T(),removedAnnotations:i().int()}),{role:{feature:`retrain`},kind:`mutation`,auth:`admin`}),getRetrainFrameImage:M(d({frameId:l()}),d({base64:l(),width:i().int(),height:i().int()}),{role:{feature:`retrain`},kind:`query`,auth:`admin`}),proposeRetrainAnnotations:M(d({deviceId:i(),trackId:l().optional(),frameId:l(),subject:ZI,nodeId:l().optional()}),QI,{role:{feature:`retrain`},kind:`mutation`,auth:`admin`}),listRetrainAnnotations:M(d({trackId:l().optional(),frameIds:w(l()).max(2e3).optional()}),w(jI).readonly(),{role:{feature:`retrain`},kind:`query`,auth:`admin`}),saveRetrainAnnotations:M(d({deviceId:i(),trackId:l().optional(),frameId:l(),annotations:w(MI),expectedRevision:i().int().optional(),dismissed:w(DI).optional()}),w(jI).readonly(),{role:{feature:`retrain`},kind:`mutation`,auth:`admin`}),backfillRetrainOrigins:M(d({deviceId:i(),trackId:l().optional(),frameId:l(),expectedRevision:i().int().optional(),origins:w(d({annotationId:l(),origin:EI})).min(1).max(500)}),d({updated:i().int(),skipped:i().int(),revision:i().int()}),{kind:`mutation`,auth:`admin`}),completeRetrainTrack:M(d({deviceId:i(),trackId:l()}),fL,{role:{feature:`retrain`},kind:`mutation`,auth:`admin`}),restageRetrainTrack:M(d({deviceId:i(),trackId:l()}),fL,{role:{feature:`retrain`},kind:`mutation`,auth:`admin`}),getRetrainExportUrl:M(qI.extend({layout:JI.optional()}),d({url:l()}),{kind:`query`,auth:`admin`}),setRetrainFrameComplete:M(d({deviceId:i(),trackId:l().optional(),frameId:l(),complete:T()}),LI,{role:{feature:`retrain`},kind:`mutation`,auth:`admin`}),writeRetrainArchive:M(d({filter:qI,layout:JI,target:YI}),XI,{kind:`mutation`,auth:`admin`,timeoutMs:60*6e4}),offerRetrainArchive:M(d({filter:qI,layout:JI}),d({ticket:On,frames:i().int(),annotations:i().int()}),{kind:`mutation`,auth:`admin`,timeoutMs:12e4}),listRetrainAssistProfiles:M(d({}),w(rL).readonly(),{role:{feature:`retrain`},kind:`query`,auth:`admin`}),proposeRetrainAnnotationsWithLlm:M(d({deviceId:i(),trackId:l().optional(),frameId:l(),profileId:l(),classes:w(SI).min(1),boxes:w(d({ref:l(),bbox:TI,macroClass:SI,label:l().optional()})).max(50),allowCloud:T()}),oL,{kind:`mutation`,auth:`admin`,timeoutMs:18e4}),createRetrainCollection:M(d({name:l().max(120)}),eL,{role:{feature:`retrain`},kind:`mutation`,auth:`admin`}),listRetrainCollections:M(d({}),w($I).readonly(),{role:{feature:`retrain`},kind:`query`,auth:`admin`}),resolveRetrainTrainingCorpus:M(uL,dL,{kind:`query`,auth:`admin`,timeoutMs:6e4}),renameRetrainCollection:M(d({id:l(),name:l().max(120)}),tL,{role:{feature:`retrain`},kind:`mutation`,auth:`admin`}),deleteRetrainCollection:M(d({id:l()}),d({deleted:T(),removedFrames:i().int()}),{role:{feature:`retrain`},kind:`mutation`,auth:`admin`}),addRetrainFrameFromRecording:M(d({collectionId:l(),deviceId:i(),epochMs:i()}),nL,{role:{feature:`retrain`},kind:`mutation`,auth:`admin`,timeoutMs:6e4}),addRetrainFramesToCollection:M(d({collectionId:l(),frameIds:w(l()).min(1).max(500)}),d({added:i().int(),alreadyMember:i().int(),unknownFrameIds:w(l()).readonly()}),{role:{feature:`retrain`},kind:`mutation`,auth:`admin`}),removeRetrainFrameFromCollection:M(d({collectionId:l(),frameId:l()}),d({removed:T(),deletedFrame:T()}),{role:{feature:`retrain`},kind:`mutation`,auth:`admin`}),listRetrainCollectionFrames:M(d({collectionId:l()}),w(LI).readonly(),{role:{feature:`retrain`},kind:`query`,auth:`admin`}),getEventMedia:M(d({ownerType:Ll,eventId:i().int(),kind:vI.optional(),deviceId:i()}),w(bI).readonly()),getTrackMedia:M(d({trackId:l(),kinds:w(vI).optional(),deviceId:i()}),w(bI).readonly()),listTrackMedia:M(d({trackId:l(),deviceId:i()}),w(xI).readonly()),listEventMedia:M(d({ownerType:Ll,eventId:i().int(),deviceId:i()}),w(xI).readonly()),ownersWithMedia:M(d({deviceId:i(),ownerKind:zl,ownerIds:w(l()).max(5e3)}),w(l()).readonly()),searchObjectEvents:M(jL,w(AL).readonly(),{caller:`required`}),wipeObjectEmbeddings:M(d({}),BL,{kind:`mutation`,auth:`admin`}),rebuildObjectEmbeddings:M(zL,HL,{kind:`mutation`,auth:`admin`}),getObjectEmbeddingRebuildStatus:M(d({}),UL)},events:{onFrameTracked:{data:d({deviceId:i(),timestamp:i(),frameWidth:i(),frameHeight:i(),detections:w(kL).readonly()})},onTrackStarted:{data:d({deviceId:i(),trackId:l(),className:l()})},onTrackEnded:{data:d({deviceId:i(),trackId:l(),className:l(),durationMs:i()})},onDetectionEvent:{data:d({deviceId:i(),kind:LF,eventId:l(),timestamp:i()})}}},$L=d({stepId:l(),modelId:l(),detections:w(d({bbox:u([i(),i(),i(),i()]),score:i(),landmarks:w(d({x:i(),y:i()})).optional()})).min(1)}),eR=d({handle:Gi,cropFrameSpace:d({x:i(),y:i(),w:i(),h:i()})});d({crop:d({left:i(),top:i(),width:i().positive(),height:i().positive()}).optional(),content:d({width:i().int().positive(),height:i().int().positive()}),fit:C([`stretch`,`contain`]),format:C([`rgb`,`gray`,`jpeg`])});var tR=d({registryId:l().min(1),id:l().min(1),width:i().int().positive(),height:i().int().positive(),format:C([`rgb`,`gray`]),timestamp:i(),capturedAt:i().optional()}),nR=C([`onnx`,`coreml`,`openvino`,`tflite`,`pt`,`gguf`]),rR=C([`detector`,`cropper`,`classifier`,`refiner`,`audio-classifier`]),iR=d({runtime:h(`python`),backend:l(),format:nR,device:l().optional()}),aR=d({deviceKey:l().nullable(),runtime:l(),batchMode:l(),windowMs:i(),maxBatchSize:i(),concurrency:i(),numWorkers:i()}),oR=d({engine:iR,devices:w(d({id:l(),label:l(),description:l().optional()})).readonly(),defaultDevice:l()}),sR=fe(()=>d({addonId:l(),addonName:l(),slot:rR,inputClasses:w(l()).readonly(),outputClasses:w(l()).readonly(),enabled:T(),modelId:l(),children:w(sR).readonly(),group:l().optional(),settings:x(l(),o()).optional()})),cR=d({id:l(),name:l(),formats:x(l(),kh),group:Mh.optional(),legacy:T().optional(),provider:Ph.optional(),defaultConfidence:i().optional(),suppliesSteps:w(Lh).readonly().optional()}),lR=v(),uR=d({id:l(),name:l(),slot:rR,inputClasses:w(l()).readonly(),outputClasses:w(l()).readonly(),childSlots:w(rR).readonly(),models:w(cR).readonly(),defaultModelId:l(),defaultModelIdByFormat:x(l(),l()).optional(),enabledByDefault:T().optional(),defaultConfidence:i(),group:l().optional(),configSchema:w(lR).readonly().optional()}),dR=d({id:rR,label:l(),priority:i(),parentSlot:rR.nullable(),addons:w(uR).readonly()}),fR=d({availableEngines:w(oR).readonly(),selectedEngine:iR,slots:w(dR).readonly()}),pR=d({runtimeId:C([`onnx`,`openvino`,`coreml`,`edgetpu`]).nullable(),device:l().nullable(),state:C([`idle`,`installing`,`verifying`,`ready`,`failed`]),progress:i().optional(),error:l().optional(),nextRetryAt:i().optional(),configIssues:w(l()).optional()}),mR=fe(()=>d({addonId:l(),modelId:l().optional(),enabled:T().default(!0),children:w(mR).optional(),settings:x(l(),o()).optional(),jumpDeviceKey:l().optional()})),hR=d({addonId:l(),chosen:l(),running:l(),format:l()}),gR=d({addonId:l(),kind:C([`unknown-addon`,`no-format-build`,`unknown-device`]),detail:l()}),_R=d({ok:T(),issues:w(gR).readonly(),substitutions:w(hR).readonly(),format:l()}),vR=d({filename:l(),stepIds:w(l()).readonly().optional()}),yR=d({base64:l(),filename:l()}),bR=d({filename:l(),sizeKb:i()}),xR=d({base64:l()}),SR=d({id:l(),name:l(),description:l(),available:T(),rawLabels:w(l()).readonly().optional()}),CR=d({activeBackend:l(),availableBackends:w(SR).readonly(),sampleRate:i(),chunkDurationMs:i()}),wR=d({filePath:l(),sizeMB:i(),durationMs:i()}),TR=d({success:T(),error:l().optional(),frame:v().optional()}),ER=v(),DR=v(),OR=v(),kR=v(),AR=v(),jR={name:`pipeline-executor`,scope:`system`,mode:`singleton`,methods:{getAvailableEngines:M(y(),w(iR)),getSelectedEngine:M(y(),iR),getEngineProvisioning:M(d({nodeId:l()}),pR),getVideoPipelineSteps:M(y(),x(l(),d({modelId:l(),settings:x(l(),o()).readonly()}))),setVideoPipelineSteps:M(d({steps:x(l(),d({modelId:l(),settings:x(l(),o()).readonly()}))}),d({success:h(!0)}),{kind:`mutation`,auth:`admin`}),getInferenceDeviceHealth:M(d({nodeId:l()}),d({unhealthy:w(d({deviceKey:l(),state:C([`failed`,`backoff`]),since:i(),deaths:i(),lastError:l()})).readonly()})),rearmInferenceDevice:M(d({nodeId:l(),deviceKey:l()}),d({rearmed:T()}),{kind:`mutation`,auth:`admin`}),getSchema:M(y(),fR),getOrchestratorConfigSchema:M(y(),ER),validatePipeline:M(d({steps:w(mR),deviceKey:l().optional()}),_R),getCapabilities:M(y(),OR),getAddonModels:M(d({addonId:l()}),kR),downloadModel:M(d({addonId:l(),modelId:l(),format:nR}),wR,{kind:`mutation`}),deleteModel:M(d({addonId:l(),modelId:l(),format:nR}),d({success:h(!0)}),{kind:`mutation`}),runPipeline:M(d({steps:w(mR).min(1),frame:Nv.optional(),frameRef:tR.optional(),frameHandle:Gi.optional(),imageBase64:l().optional(),image:S(Uint8Array).optional(),referenceImage:l().optional(),deviceId:i().optional(),sessionId:l().optional(),plane:C([`full`,`frame`]).optional(),deviceKey:l().optional(),nativeCropRef:eR.optional(),replay:h(!0).optional(),suppliedRoot:$L.optional()}),AR,{kind:`mutation`}),runPipelineBatch:M(d({steps:w(mR).min(1),frames:w(Nv).min(1).max(255),deviceId:i().optional(),sessionId:l().optional(),frameId:i().int().nonnegative().optional(),deviceKey:l().optional()}),d({results:w(AR).readonly()}),{kind:`mutation`}),cacheFrameInPool:M(d({data:S(Uint8Array),width:i().int().positive(),height:i().int().positive(),format:C([`rgb`,`bgr`,`gray`])}),d({frameId:i(),width:i(),height:i()}),{kind:`mutation`}),inferCached:M(d({stepId:l(),frameId:i().int(),modelId:l().min(1)}),x(l(),o()),{kind:`mutation`}),uncacheFrame:M(d({frameId:i().int()}),y(),{kind:`mutation`}),getEffectiveTuning:M(d({deviceKey:l().optional()}),aR),listLoadedEngines:M(y(),w(d({engineKey:l(),engine:iR,modelsLoaded:w(l()).readonly(),inUseByCameras:w(i()).readonly(),kind:C([`runtime`,`device-pool`]),poolPid:i().nullable(),idleMs:i().nullable(),idleTtlMs:i().nullable()})).readonly()),spinEngine:M(d({engine:iR}),d({success:h(!0)}),{kind:`mutation`,auth:`admin`}),killEngine:M(d({engine:iR,force:T().optional()}),d({success:T(),reason:l().optional()}),{kind:`mutation`,auth:`admin`}),listReferenceImages:M(y(),w(vR).readonly()),getReferenceImage:M(d({filename:l()}),yR.nullable()),getReferenceAudioFiles:M(y(),w(bR).readonly()),getReferenceAudio:M(d({filename:l()}),xR.nullable()),getAudioCapabilities:M(y(),CR),runAudioTest:M(d({addonId:l(),modelId:l(),filename:l().optional(),settings:x(l(),o()).optional()}),TR,{kind:`mutation`}),getDetectionConfigSchema:M(y(),DR)}},MR=C(ia),NR=2,PR={min:1,max:8},FR=C([`intel-core-ultra`,`intel-n-series`,`apple-m-base`,`apple-m-pro`,`amd-phoenix`,`unknown`]),IR=C([`intel-npu`,`intel-igpu`,`amd-igpu`,`amd-npu`,`x86-cpu`,`arm-cpu`,`apple-ane`,`coral`]),LR=m(`kind`,[d({kind:h(`capacity`),sessions:i(),minSessions:i()}),d({kind:h(`tie-faster`),over:l(),recallDelta:i()}),d({kind:h(`stepped-down`),from:l(),to:l(),limitedBy:l()}),d({kind:h(`no-fit-lightest`),sessions:i(),minSessions:i()}),d({kind:h(`derived-latency`),modelId:l()}),d({kind:h(`cpu-device`)}),d({kind:h(`device-disabled`)}),d({kind:h(`device-unavailable`)}),d({kind:h(`node-offline`)}),d({kind:h(`no-hardware-facts`)}),d({kind:h(`no-measured-data`),hardwareClass:FR}),d({kind:h(`no-family-build`),format:MR}),d({kind:h(`kept-custom-pin`),modelId:l(),deviceKey:l()})]),RR=C([`custom-pin`]),zR=m(`kind`,[d({kind:h(`table`)}),d({kind:h(`node-benchmark`),resultId:l(),measuredAtMs:i()}),d({kind:h(`estimated`),estimatedFrom:FR})]),BR=d({modelId:l(),p50Ms:i(),fps:i(),measured:T(),source:zR.optional(),estimatedFrom:FR.optional(),capacitySessions:i(),personRecall:i()}),VR=d({deviceKey:l(),accelerator:IR.nullable(),enabled:T(),available:T(),chosen:BR.nullable(),kept:RR.optional(),reasons:w(LR).readonly()}),HR=d({nodeId:l(),reachable:T(),hardwareClass:FR.nullable(),cpuModel:l().nullable(),skipped:T(),acceleratorModelId:l().nullable(),devices:w(VR).readonly(),reasons:w(LR).readonly()}),UR=d({stepId:l(),before:l().nullable(),after:l().nullable()}),WR=d({nodeId:l(),deviceKey:l(),madeExplicit:T(),modelPins:w(UR).readonly(),thresholds:w(d({stepId:l(),keys:w(l()).readonly()})).readonly()}),GR=m(`kind`,[d({kind:h(`custom-pin-kept`),nodeId:l(),deviceKey:l(),modelId:l()}),d({kind:h(`custom-registry-unreadable`),error:l()})]),KR=d({headroom:i().min(.3).max(.5).default(.4),minSessionsPerDevice:i().int().min(PR.min).max(PR.max).default(2)}),qR=d({planHash:l(),family:h(`yolov9`),headroom:i(),minSessionsPerDevice:i(),cameraFps:i(),generatedAt:i(),nodes:w(HR).readonly(),nodeChanges:w(WR).readonly(),warnings:w(GR).readonly()}),JR=d({planHash:l(),headroom:i().min(.3).max(.5).default(.4),minSessionsPerDevice:i().int().min(PR.min).max(PR.max).default(2)}),YR=d({phase:C([`download`,`node-models`,`redispatch`]),ok:T(),detail:l()}),XR=m(`kind`,[d({kind:h(`applied`),planHash:l(),phases:w(YR).readonly()}),d({kind:h(`aborted`),phases:w(YR).readonly()}),d({kind:h(`stale`),plan:qR}),d({kind:h(`refused`),reason:C([`apply-in-progress`])})]),ZR=C([`least-loaded`,`share`]),QR=`share`,ece=`sessionPlacement`;function tce(e){let t=ZR.safeParse(e);return t.success?t.data:QR}var $R=d({nodes:x(l(),i().positive()).default({}),devices:x(l(),x(l(),i().positive())).default({})}),ez=d({windowMs:i().int().min(6e4).max(1440*60*1e3).default(3600*1e3)}),tz=d({deviceKey:l(),sessionsNow:i(),sessionsStarted:i(),observedShare:i().nullable()}),nz=d({nodeId:l(),sessionsNow:i(),sessionsStarted:i(),observedShare:i().nullable(),peakSessions:i(),yieldsAway:i(),devices:w(tz).readonly()}),rz=d({deviceId:i(),deviceKey:l(),reason:C([`disabled`,`absent`])}),iz=d({policy:ZR,windowMs:i(),observedForMs:i(),sessionsNow:i(),clusterPeakSessions:i(),nodes:w(nz).readonly(),stalePins:w(rz).readonly()}),az=C([`hardware`,`benchmark`]),oz=C([`no-benchmark-results`,`partial-benchmark-results`]),sz=d({headroom:i().min(.3).max(.5).default(.4),source:az.default(`hardware`)}),cz=d({deviceKey:l(),share:i(),modelId:l().nullable(),fps:i().nullable(),measured:T(),suggestedMaxSessions:i().nullable()}),lz=d({nodeId:l(),share:i().nullable(),capacitySessions:i(),devices:w(cz).readonly(),skippedReason:l().nullable(),capacitySource:az.nullable(),capacityFallback:oz.nullable()}),uz=d({headroom:i(),source:az,cameraFps:i(),minSessionsPerDevice:i(),nodes:w(lz).readonly()}),dz=C([`hardware`,`benchmark`,`manual`]),fz=`benchmark`;function pz(e){return e!==`manual`}var nce=.4,rce=`shareSource`;function ice(e){if(e===`auto`)return`hardware`;let t=dz.safeParse(e);return t.success?t.data:fz}var mz=d({source:dz}),ace=d({nodes:x(l(),i()),devices:x(l(),x(l(),i()))}),hz=d({deviceKey:l(),eligible:T(),configuredPct:i(),effectivePct:i()}),gz=d({nodeId:l(),eligible:T(),configuredPct:i(),effectivePct:i(),capacitySource:az.nullable(),capacityFallback:oz.nullable(),devices:w(hz).readonly()}),_z=d({source:dz,policy:ZR,autoPending:T(),computedAt:i().nullable(),trigger:l().nullable(),nodes:w(gz).readonly(),nodeWeights:x(l(),i()),deviceWeights:x(l(),x(l(),i()))}),vz={fpsPerStream:10,budgetMinutes:45,minBudgetMinutes:10,maxBudgetMinutes:120,staleAfterDays:30,settleSec:5,measureSec:20,drainTimeoutSec:120,maxModelsPerDevice:6},yz=C([`device`,`pipeline`]),bz=d({deviceKey:l().min(1),modelIds:w(l().min(1)).min(1).max(vz.maxModelsPerDevice)}),xz=d({nodeId:l().min(1),devices:w(bz).min(1),phases:w(yz).min(1).default([`device`,`pipeline`]),steps:w(l().min(1)).default([]),fpsPerStream:i().int().min(1).max(30).default(vz.fpsPerStream),budgetMinutes:i().int().min(vz.minBudgetMinutes).max(vz.maxBudgetMinutes).default(vz.budgetMinutes),keepDownloadedModels:T().default(!1),acceptInsufficientHeadroom:T().default(!1)}),Sz=C([`benchmark-active`,`node-offline`,`unknown-device`,`no-phase`,`insufficient-headroom`]),Cz=d({kind:Sz,detail:l(),overridable:T()}),wz=d({deviceId:i(),placedOnNode:T(),pinnedToNode:T()}),Tz=d({deviceId:i(),reason:h(`only-frame-source`)}),Ez=d({nodeId:l(),online:T(),moving:w(wz).readonly(),staying:w(Tz).readonly(),estimatedDurationMs:i(),budgetMs:i(),phases:w(yz).readonly(),steps:w(l()).readonly(),devices:w(bz).readonly(),headroom:d({sessionsNow:i(),otherNodesCapacitySessions:i().nullable()}),refusals:w(Cz).readonly(),canStart:T()}),Dz=d({phase:C([`preparing`,`device`,`pipeline`,`cleanup`]),deviceKey:l().nullable(),modelId:l().nullable(),load:i().nullable(),cellsDone:i(),cellsTotal:i(),message:l()}),Oz=C([`p95`,`drops`,`errors`,`stall`,`cpu`,`ram`,`none`]),kz=d({load:i(),pass:T(),p95Ms:i(),dropRatio:i(),fps:i(),cpuPct:i().nullable(),ramFreePct:i().nullable(),failReasons:w(l()).readonly()}),Az=d({phase:h(`device`),deviceKey:l(),modelId:l(),p50Ms:i(),p95Ms:i(),p99Ms:i(),fps:i(),kMax:i(),limitedBy:Oz,warmupMs:i(),ramp:w(kz).readonly()}),jz=d({phase:h(`pipeline`),deviceKey:l(),modelId:l(),steps:w(l()).readonly(),maxSessions:i(),limitedBy:Oz,stepsFired:w(l()).readonly(),warmupMs:i(),ramp:w(kz).readonly()}),Mz=m(`phase`,[Az,jz]),Nz=d({pipelineVersion:l().nullable(),cpuModel:l().nullable(),ramGb:i().nullable(),os:l().nullable(),pools:x(l(),d({runtime:l(),numWorkers:i(),concurrency:i(),batchMode:l()})).default({})}),Pz=d({id:l(),revision:l().nullable(),frames:i(),width:i(),height:i()}),Fz=d({runId:l().min(1),devices:w(bz).min(1),phases:w(yz).min(1),steps:w(l()).default([]),fpsPerStream:i().int().min(1).max(30),deadlineAtMs:i(),settleSec:i().min(0).max(60).default(vz.settleSec),measureSec:i().min(2).max(300).default(vz.measureSec),keepDownloadedModels:T().default(!1)}),Iz=C([`running`,`done`,`failed`,`aborted`]),Lz=d({runId:l(),nodeId:l(),state:Iz,progress:Dz.nullable(),cells:w(Mz).readonly(),fingerprint:Nz.nullable(),clip:Pz.nullable(),activeCameraIds:w(i()).readonly(),deletedModels:w(l()).readonly(),error:l().nullable(),startedAtMs:i(),finishedAtMs:i().nullable()}),Rz=C([`draining`,`measuring`,`restoring`,`done`,`failed`,`aborted`]),zz=C([`completed`,`operator-abort`,`deadline`,`node-lost`,`runner-lost`,`hub-restart`,`drain-timeout`,`failed`]),Bz=d({runId:l(),nodeId:l(),state:Rz,plan:xz,startedAtMs:i(),deadlineAtMs:i(),finishedAtMs:i().nullable(),endReason:zz.nullable(),error:l().nullable(),moved:w(i()).readonly(),staying:w(i()).readonly(),contaminated:T(),progress:Dz.nullable(),resultIds:w(l()).readonly()}),Vz=d({modeNodeId:l().nullable(),run:Bz.nullable()}),Hz=d({id:l(),runId:l(),nodeId:l(),cell:Mz,fpsPerStream:i(),fingerprint:Nz.nullable(),clip:Pz.nullable(),contaminated:T(),stayingCameras:w(i()).readonly(),partialRun:T(),measuredAtMs:i()}),Uz=d({nodeId:l().optional(),deviceKey:l().optional()}),Wz=Hz.extend({standing:C([`fresh`,`stale`,`superseded`]),staleWhy:C([`age`,`runtime`,`pool-tuning`]).nullable()}),oce=d({runId:l(),nodeId:l(),startedAtMs:i(),deadlineAtMs:i(),plan:xz,moved:w(i()).readonly(),staying:w(i()).readonly()}),Gz=d({nodeId:l(),reachable:T(),devices:w(d({deviceKey:l(),enabled:T(),available:T(),suggested:w(l()).readonly(),all:w(l()).readonly(),currentModelId:l().nullable()})).readonly(),steps:w(d({id:l(),name:l(),slot:l()})).readonly()}),sce=d({activeCameras:i(),throttledCameras:i(),avgInferenceTimeMs:i(),queueDepth:i()}),Kz=d({detectionMode:C([`disabled`,`always-on`,`on-motion`]),configuredFps:i(),actualFps:i(),queueDepth:i(),avgInferenceTimeMs:i(),droppedFrames:i(),phase:C([`idle`,`watching`,`active`])}),qz=Kz.extend({deviceId:i()}),Jz=C([`polygon`,`tripwire`]),Yz=d({x:i(),y:i()}),Xz=d({id:l(),name:l(),kind:Jz.default(`polygon`),polygon:w(Yz).readonly(),color:l().default(`#3b82f6`)}),Zz={name:`zones`,scope:`device`,mode:`singleton`,deviceTypes:[P.Camera],methods:{listZones:M(d({deviceId:i()}),w(Xz).readonly()),addZone:M(d({deviceId:i(),zone:Xz}),y(),{kind:`mutation`,auth:`admin`}),removeZone:M(d({deviceId:i(),zoneId:l()}),y(),{kind:`mutation`,auth:`admin`}),updateZone:M(d({deviceId:i(),zone:Xz}),y(),{kind:`mutation`,auth:`admin`})},runtimeState:d({zones:w(Xz).readonly()}),durability:`restored`,history:`none`},Qz=d({x:i(),y:i(),w:i(),h:i()}),$z=d({bytes:S(Uint8Array).optional(),jpeg:l().optional(),jpegBytes:S(Uint8Array).optional(),width:i().int().positive(),height:i().int().positive(),tier:C([`native`,`ram-fullframe`]).optional()}),eB=C([`keyFrame`,`thumbnail`]),tB=C([`handle-gone`,`encode-failed`]),nB=m(`parked`,[d({parked:h(!0),nodeId:l(),width:i().int().positive(),height:i().int().positive(),bytes:i().int().nonnegative(),replaced:T()}),d({parked:h(!1),nodeId:l(),reason:tB,handleAgeMs:i().nullable(),detail:l().optional()})]),rB=d({jpeg:l().optional(),jpegBytes:S(Uint8Array).optional(),width:i().int().positive(),height:i().int().positive(),timestamp:i(),parkedAt:i()}),cce=d({bbox:Qz,className:l()}),iB=d({stepId:l(),className:l(),score:i(),bbox:Qz.optional(),embedding:l().optional(),embeddingMagnitude:i().optional(),embeddingModelId:l().optional(),label:l().optional(),labelTier:f([h(1),h(2)]).optional(),labelModelId:l().optional(),alignedCropJpeg:l().optional(),nativeFaceShortSidePx:i().optional(),landmarks:w(d({x:i(),y:i()})).optional()}),lce=C([`unknown-step`,`model-not-servable`,`unreadable-frame`,`execution-failed`]),uce=m(`kind`,[d({kind:h(`ran`),nodeId:l(),modelId:l(),details:w(iB)}),d({kind:h(`refused`),nodeId:l(),reason:lce,detail:l()})]),aB={min:0,max:6e4,default:3e4,step:500},oB={min:0,max:6e5,default:12e4,step:5e3},sB={min:5e3,max:6e5,default:9e4,step:5e3},cB={min:1,max:30,default:4,step:1},lB={min:1,max:30,default:10,step:1},uB={min:0,max:300,default:300,step:5},dB={min:1,max:10,default:4,step:1},fB={min:0,max:30,default:12,step:1},pB=C([`onboard`,`analyzer`,`device-activity`]),mB=d({source:pB,triggeredBy:KP,sensorName:l().optional()}),hB=w(pB),gB={analyzer:`Frame-diff Analyzer (motion addon)`,onboard:`Camera sensors`,"device-activity":`Device activity (the device says it is working)`};function dce(e){let t=pB.safeParse(e);return t.success?gB[t.data]:e}var fce=[`analyzer`,`onboard`,`device-activity`],_B=n(e=>Array.isArray(e)&&e.length>1?e.slice(0,1):e,w(fI).max(1)),vB=d({deviceId:i(),detected:T(),source:pB.default(`analyzer`),regions:w(VA).readonly().optional()}),yB=m(`kind`,[d({kind:h(`local-broker`)}),d({kind:h(`remote-restream`),ownerNodeId:l(),ownerReachableHost:l().optional(),hubHostnameOverride:l().optional()})]).describe(`Per-camera frame-source mode for the runner (P2c)`),bB=d({modelId:l().optional(),settings:x(l(),o()).optional()}),xB=d({deviceKey:l(),weight:i().positive().default(1),maxSessions:i().int().positive().nullable().default(null),steps:x(l(),bB).optional()}),SB=d({deviceId:i(),detectionMode:C([`disabled`,`always-on`,`on-motion`]).default(`on-motion`),audioMode:C([`disabled`,`always-on`,`on-motion`]).default(`always-on`),motionCooldownMs:i().min(aB.min).default(aB.default),maxSessionHoldMs:i().min(oB.min).max(oB.max).optional(),audioMotionWindowMs:i().min(sB.min).max(sB.max).optional(),motionFps:i().min(cB.min).max(cB.max).default(cB.default),detectionFps:i().min(lB.min).max(lB.max).default(lB.default),motionStreamId:l(),detectionStreamId:l(),audioStreamPick:Ni.optional(),motionSources:hB.default([`analyzer`]),sessionTrigger:mB.optional(),detectionSources:_B.default([`pipeline`]),pipelineEnabled:T().default(!0),steps:w(mR).readonly().optional(),audio:d({modelId:l().optional(),enabled:T()}).nullable().optional(),zones:w(Xz).readonly().default([]),onboardMotionDrivesAnalyzer:T().default(!0),preRollInferenceEnabled:T().default(!0),preRollInferenceFrames:i().min(fB.min).max(fB.max).default(fB.default),occupancyRecheckEnabled:T().default(!0),occupancyRecheckSec:i().min(uB.min).max(uB.max).default(uB.default),occupancyRecheckFrames:i().min(dB.min).max(dB.max).default(dB.default),frameSource:yB.default({kind:`local-broker`}),deviceKey:l().optional(),inferenceDevices:w(xB).readonly().optional()}),pce=[{key:`motionSources`,type:`multiselect`,label:`Motion Sources`,default:[`analyzer`],options:fce.map(e=>e===`onboard`?{value:e,label:gB[e],description:`The camera's own motion, plus any sensor attached to it`}:{value:e,label:gB[e]})},{key:`motionFps`,type:`slider`,label:`Motion FPS (analyzer)`,min:cB.min,max:cB.max,step:cB.step,default:cB.default,showValue:!0,unit:`fps`,nullable:!0,nullLabel:`Default`,showWhen:{field:`motionSources`,includes:`analyzer`}},{key:`detectionFps`,type:`slider`,label:`Detection FPS`,min:lB.min,max:lB.max,step:lB.step,default:lB.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:aB.min,max:aB.max,step:aB.step,default:aB.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:oB.min,max:oB.max,step:oB.step,default:oB.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:sB.min,max:sB.max,step:sB.step,default:sB.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:fB.min,max:fB.max,step:fB.step,default:fB.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:uB.min,max:uB.max,step:uB.step,default:uB.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:dB.min,max:dB.max,step:dB.step,default:dB.default,showValue:!0,showWhen:{field:`occupancyRecheckEnabled`,equals:!0}}],CB=d({nodeId:l(),attachedCameras:i(),activeCameras:i(),avgInferenceFps:i(),avgInferenceTimeMs:i(),queueDepthTotal:i(),devices:w(d({deviceKey:l(),backend:l(),attachedCameras:i()})).default([]),hardware:d({hasGpu:T(),inferenceBackend:l().optional(),cpuCores:i().optional()}),motionSliceWriter:h(`orchestrator`).optional()}),wB=d({framesDecoded:i(),framesAdmitted:i(),framesDroppedPixelFree:i(),viewsMaterialized:i(),viewsSkipped:i(),workerToRunnerBytes:i(),runnerToPoolRawBytes:i(),runnerToPoolJpegBytes:i(),onDemandFullFrameRequests:i(),onDemandCropRequests:i(),nativeHits:i(),nativeMisses:i(),tileHits:i(),tileMisses:i(),fallbackHits:i(),fallbackMisses:i(),retainedWritesAvoided:i(),residentRefs:i(),residentBytes:i(),releases:i(),evictions:i(),staleMisses:i()}),TB=d({node:wB,cameras:w(wB.extend({deviceId:i()}))}),EB=d({nodeId:l(),activeCameras:i(),throttledCameras:i(),avgInferenceTimeMs:i(),queueDepth:i(),frameLazy:TB.optional()}),DB=C([`not-attached`,`battery-asleep`,`not-watching`,`already-bursting`]),OB={name:`pipeline-runner`,scope:`system`,mode:`singleton`,methods:{attachCamera:M(SB,d({success:h(!0)}),{kind:`mutation`}),detachCamera:M(d({deviceId:i()}),d({success:h(!0)}),{kind:`mutation`}),reportMotion:M(vB,d({success:h(!0)}),{kind:`mutation`}),getLocalLoad:M(y(),CB),getLocalMetrics:M(y(),EB),getCameraMetrics:M(d({deviceId:i()}),Kz.nullable()),getAllCameraMetrics:M(y(),w(qz).readonly()),getLocalCameras:M(y(),w(i()).readonly()),requestOccupancyBurst:M(d({deviceId:i(),frames:i().int().positive().optional(),reason:l()}),d({started:T(),refusedBecause:DB.optional()}),{auth:`admin`,kind:`mutation`}),getNativeCrop:M(d({handle:Gi,bbox:Qz,maxWidth:i().int().positive().optional(),acceptJpegBytes:T().optional(),encodeJpeg:T().optional()}),$z.nullable()),runDetailSubtree:M(d({deviceId:i(),frameHandle:Gi.optional(),frameJpeg:l().optional(),cropJpeg:l().optional(),parent:cce,steps:w(l()).optional(),supplied:d({stepId:l(),modelId:l(),boxes:w(d({bbox:Qz,score:i()})).min(1)}).optional()}),d({details:w(iB)}).nullable(),{kind:`mutation`}),runStatelessStep:M(d({stepId:l(),modelId:l(),frameJpeg:l(),bbox:Qz,className:l(),sourceDeviceId:i()}),uce,{kind:`mutation`}),parkTrackFrame:M(d({deviceId:i(),trackId:l(),kind:eB,handle:Gi,bbox:Qz,maxWidth:i().int().positive().optional(),timestamp:i()}),nB,{kind:`mutation`}),getParkedTrackFrame:M(d({deviceId:i(),trackId:l(),kind:eB,acceptJpegBytes:T().optional()}),rB.nullable()),releaseParkedTrackFrames:M(d({deviceId:i(),trackId:l()}),d({released:i().int().nonnegative()}),{kind:`mutation`}),startNodeBench:M(Fz,d({accepted:h(!0),runId:l()}),{kind:`mutation`,auth:`admin`}),getNodeBenchStatus:M(d({runId:l()}),Lz.nullable(),{auth:`admin`}),abortNodeBench:M(d({runId:l()}),d({aborted:T()}),{kind:`mutation`,auth:`admin`})}},mce=d({engine:iR.optional(),steps:w(mR).readonly(),audio:d({engine:iR.optional(),modelId:l().optional(),enabled:T(),settings:x(l(),o()).readonly().optional()}).nullable().optional()}),kB=d({modelId:l().optional(),settings:x(l(),o()).optional(),jumpDeviceKey:l().optional()}),AB=d({maxCameras:i().int().nonnegative().nullable().default(null),detectWeight:i().positive().optional(),detect:T().optional(),decode:T().optional(),audio:T().optional(),ingest:T().optional(),decodeBudgetMb:i().int().min(1024).max(65536).optional(),maxLiveDecodeWorkers:i().int().min(1).max(32).optional(),reachableHost:l().optional(),color:El.optional(),stepSettings:x(l(),x(l(),o()).readonly()).optional(),inferenceDevices:x(l(),d({enabled:T(),weight:i().positive().optional(),maxSessions:i().int().positive().optional(),steps:x(l(),kB).optional()})).optional()}),hce=x(l(),x(l(),o()).readonly()),jB=C([`pipeline`,`onboard`,`none`]),gce=d({stepToggles:x(l(),T()).optional(),stepSettings:hce.optional()}),MB=d({deviceId:i(),agentNodeId:l(),pinned:T(),reason:C([`manual`,`capacity`,`hardware-affinity`,`failover`,`rebalance`]),assignedAt:i()}),NB=d({nodeId:l(),online:T(),load:CB,score:i(),decodeHwaccel:l().nullable()}),PB=d({totalAgents:i(),onlineAgents:i(),totalCameras:i(),attachedCameras:i(),activeCameras:i(),avgInferenceTimeMs:i(),queueDepth:i()}),FB=x(l(),l()),IB=d({ownerNodeId:l(),reachableHost:l().optional(),configIssue:l().optional()}),LB=d({camStreamId:l(),codec:l(),width:i(),height:i(),fps:i(),kind:l()}),RB=d({streams:w(LB).readonly()}),zB=d({detectionNodeId:l().nullable(),decoderNodeId:l().nullable(),audioNodeId:l().nullable(),sourceNodeId:l().nullable(),pinned:d({detection:T(),decoder:T(),audio:T()}),reasons:d({detection:l().optional(),decoder:l().optional(),audio:l().optional()})}),BB=d({profile:l(),status:l(),codec:l(),width:i(),height:i(),subscribers:i(),inFps:i().nullable()}),VB=d({profiles:w(BB).readonly(),webrtcSessions:i(),rtspRestream:T()}),HB=d({nodeId:l()}),UB=d({enabled:T(),fps:i()}),WB=C([`idle`,`installing`,`verifying`,`ready`,`failed`]),GB=d({state:WB,error:l().optional()}),KB=C([`idle`,`watching`,`active`]),qB=d({nodeId:l(),engine:d({backend:l(),device:l()}),phase:KB,configuredFps:i(),actualFps:i(),queueDepth:i(),avgInferenceMs:i(),provisioning:GB}),JB=d({nodeId:l(),enabled:T()}),YB=pf,XB=d({mode:YB,active:T(),storageBytes:i()}),ZB=C([`source`,`broker`,`detection`,`recording`,`switches`]),QB=C([`timeout`,`error`,`partial`]),$B=d({stage:ZB,reason:QB,elapsedMs:i()}),eV=d({state:C([`idle`,`running`,`done`,`error`]),total:i().int().nonnegative(),completed:i().int().nonnegative(),currentDeviceId:i().int().nullable(),failed:w(i().int()).readonly(),mediaDropped:i().int().nonnegative(),tracks:i().int().nonnegative(),events:i().int().nonnegative(),startedAtMs:i().int().nullable(),finishedAtMs:i().int().nullable(),error:l().nullable()}),tV=d({deviceId:i(),assignment:zB,source:RB,broker:VB.nullable(),decoder:HB.nullable(),motion:UB.nullable(),detection:qB.nullable(),audio:JB.nullable(),recording:XB.nullable(),switchedOff:w(wu).readonly(),cameraSensors:lF.optional(),degraded:w($B).readonly(),fetchedAt:i()}),nV=[`disabled`,`unavailable`,`cannot-host-camera-root`,`accelerator-preferred`],rV=C(nV),_ce=d({key:l(),backend:l(),device:l(),format:C(ia),available:T(),presence:C([`present`,`absent`,`unknown`]).optional(),enabled:T(),weight:i(),maxSessions:i().nullable(),defaultModelId:l(),steps:x(l(),kB).optional(),exclusion:rV.nullable()}),iV=m(`kind`,[d({kind:h(`stored`),modelId:l()}),d({kind:h(`absent`),defaultModelId:l()}),d({kind:h(`unreadable`),reason:C(fF),error:l().optional()})]),vce=d({nodeId:l(),reachable:T(),devices:w(_ce).readonly()}),aV=d({deviceId:i().int().nonnegative(),config:nF.nullable()}),oV=C([`unknown-camera`,`out-of-range`,`no-burst-producer`,`already-looked`]),sV=d({deviceId:i().int().nonnegative(),afterMs:i().finite(),reason:l()}),cV=d({scheduled:T(),dueInMs:i().optional(),refusedBecause:oV.optional()}),lV={name:`pipeline-orchestrator`,scope:`system`,mode:`singleton`,nodeIdMode:`data`,exposesDeviceSettings:!0,methods:{requestOccupancyLook:M(sV,cV,{kind:`mutation`,auth:`admin`}),pauseForStorageMigration:M(Vf,d({paused:h(!0)}),{kind:`mutation`,auth:`admin`}),resumeForStorageMigration:M(Vf,d({resumed:h(!0)}),{kind:`mutation`,auth:`admin`}),assignPipeline:M(d({deviceId:i(),agentNodeId:l()}),d({success:h(!0)}),{kind:`mutation`,auth:`admin`}),unassignPipeline:M(d({deviceId:i()}),d({success:h(!0)}),{kind:`mutation`,auth:`admin`}),setPipelineDevicePin:M(d({deviceId:i(),deviceKey:l()}),d({success:h(!0)}),{kind:`mutation`,auth:`admin`}),getPipelineDevicePin:M(d({deviceId:i()}),d({deviceKey:l().nullable()})),rebalance:M(y(),d({migrated:i(),skipped:w(d({deviceId:i(),targetNodeId:l(),reason:l()})).default([])}),{kind:`mutation`,auth:`admin`}),getPipelineAssignments:M(y(),w(MB).readonly()),getPipelineAssignment:M(d({deviceId:i()}),MB.nullable()),getAgentLoad:M(y(),w(NB).readonly()),getClusterModelChoice:M(d({stepId:l()}),iV),getGlobalMetrics:M(y(),PB),getCameraMetrics:M(d({deviceId:i()}),Kz.nullable()),getCapabilityBindings:M(d({nodeId:l()}),FB),setCapabilityBinding:M(d({nodeId:l(),capName:l(),addonId:l()}),d({success:h(!0)}),{kind:`mutation`,auth:`admin`}),getIngestOwner:M(y(),IB),assignAudio:M(d({deviceId:i(),nodeId:l()}),d({success:h(!0)}),{kind:`mutation`,auth:`admin`}),unassignAudio:M(d({deviceId:i()}),d({success:h(!0)}),{kind:`mutation`,auth:`admin`}),getAudioAssignment:M(d({deviceId:i()}),d({nodeId:l(),pinned:T(),assignedAt:i()}).nullable()),getAudioNodeLoad:M(y(),w(d({nodeId:l(),deviceCount:i()}))),getAudioAssignments:M(y(),w(d({deviceId:i(),nodeId:l(),pinned:T(),assignedAt:i()}))),getAgentSettings:M(d({agentNodeId:l()}),AB.nullable()),listAgentSettings:M(y(),w(d({nodeId:l(),settings:AB})).readonly()),removeAgentSettings:M(d({agentNodeId:l()}),d({success:T(),removed:T()}),{kind:`mutation`,auth:`admin`}),setAgentMaxCameras:M(d({agentNodeId:l(),maxCameras:i().int().nonnegative().nullable()}),d({success:h(!0)}),{kind:`mutation`,auth:`admin`}),setAgentCapabilities:M(d({agentNodeId:l(),detect:T().nullable().optional(),audio:T().nullable().optional(),ingest:T().nullable().optional()}),d({success:h(!0)}),{kind:`mutation`,auth:`admin`}),setAgentDecodeLimits:M(d({agentNodeId:l(),decodeBudgetMb:i().int().min(1024).max(65536).nullable().optional(),maxLiveDecodeWorkers:i().int().min(1).max(32).nullable().optional()}),d({success:h(!0)}),{kind:`mutation`,auth:`admin`}),setAgentReachableHost:M(d({agentNodeId:l(),reachableHost:l().nullable().optional(),color:El.nullable().optional()}).refine(e=>e.reachableHost!==void 0||e.color!==void 0,{message:`reachableHost or color required`}),d({success:h(!0)}),{kind:`mutation`,auth:`admin`}),setAgentInferenceDevices:M(d({agentNodeId:l(),inferenceDevices:x(l(),d({enabled:T(),weight:i().positive().optional(),maxSessions:i().int().positive().optional(),steps:x(l(),kB).optional()}))}),d({success:h(!0)}),{kind:`mutation`,auth:`admin`}),setNodeStepSettings:M(d({agentNodeId:l(),addonId:l(),settings:x(l(),o()).nullable()}),d({success:h(!0)}),{kind:`mutation`,auth:`admin`}),getNodeInferenceDevices:M(d({nodeId:l()}),vce),forgetInferenceDevice:M(d({agentNodeId:l(),deviceKey:l()}),d({success:h(!0)}),{kind:`mutation`,auth:`admin`}),resetNodePipelineDefaults:M(d({agentNodeId:l()}),d({success:h(!0),effectiveModelId:l().nullable()}),{kind:`mutation`,auth:`admin`}),planAutoTune:M(KR,qR,{auth:`admin`}),applyAutoTune:M(JR,XR,{kind:`mutation`,auth:`admin`}),setLoadBalancingShares:M($R,d({success:h(!0)}),{kind:`mutation`,auth:`admin`}),getPlacementStats:M(ez,iz,{auth:`admin`}),suggestShares:M(sz,uz,{auth:`admin`}),getEffectiveShares:M(y(),_z,{auth:`admin`}),setShareSource:M(mz,d({success:h(!0)}),{kind:`mutation`,auth:`admin`}),getNodeBenchmarkPreflight:M(xz,Ez,{auth:`admin`}),startNodeBenchmark:M(xz,m(`kind`,[d({kind:h(`started`),runId:l()}),d({kind:h(`refused`),preflight:Ez})]),{kind:`mutation`,auth:`admin`}),getNodeBenchmarkStatus:M(y(),Vz,{auth:`admin`}),abortNodeBenchmark:M(d({runId:l()}),d({aborted:T()}),{kind:`mutation`,auth:`admin`}),getNodeBenchmarkCandidates:M(d({nodeId:l()}),Gz,{auth:`admin`}),listNodeBenchmarkResults:M(Uz,w(Wz).readonly(),{auth:`admin`}),deleteNodeBenchmarkResult:M(d({id:l()}),d({deleted:T()}),{kind:`mutation`,auth:`admin`}),getCameraSettings:M(d({deviceId:i()}),gce.nullable()),setCameraStepToggle:M(d({deviceId:i(),addonId:l(),enabled:T().nullable()}),d({success:h(!0)}),{kind:`mutation`,auth:`admin`}),getCameraDetectionSource:M(d({deviceId:i()}),d({source:jB,explicit:T(),onboard:d({available:T(),geometry:C([`boxed`,`while-streaming`,`flag-only`,`unknown`])})})),setCameraDetectionSource:M(d({deviceId:i(),source:jB}),d({success:h(!0)}),{kind:`mutation`,auth:`admin`}),setCameraStepSettings:M(d({deviceId:i(),addonId:l(),settings:x(l(),o()).nullable()}),d({success:h(!0)}),{kind:`mutation`,auth:`admin`}),resolvePipeline:M(d({deviceId:i(),agentNodeId:l().optional()}),mce),getCameraSwitches:M(d({deviceId:i()}),Au,{role:`viewer`}),setCameraSwitch:M(d({deviceId:i(),switchId:wu,enabled:T()}),Au,{kind:`mutation`,auth:`admin`}),getCameraStatus:M(d({deviceId:i()}),tV),getCameraStatuses:M(d({deviceIds:w(i()).optional()}),w(tV).readonly()),setCameraSensors:M(aV,d({success:h(!0)}),{kind:`mutation`,auth:`admin`}),reconcileFromDisk:M(y(),eV,{kind:`mutation`,auth:`admin`}),getReconcileFromDiskStatus:M(y(),eV,{auth:`admin`})}},yce={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 uV(e){return yce[e]??`generic`}var dV={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 bce(e,t){let n=Zj[t];if(n===void 0)throw Error(`EVENT_KIND_BY_CAP: cap '${e}' maps to unknown taxonomy kind '${t}'`);return{...n,icon:uV(n.iconId)}}var fV=Object.freeze(Object.fromEntries(Object.entries(dV).map(([e,t])=>[e,bce(e,t)]))),pV=Object.keys(dV);function xce(e,t){let n=Zj[e];return n===void 0?null:{kind:n.kind,labelKey:n.labelKey,label:n.label,color:n.color,iconId:n.iconId,icon:uV(n.iconId),category:n.category,parentKind:n.parentKind,level:n.level,source:{capName:t.capName,deviceId:t.deviceId}}}var mV=C([`workspace`,`baked`,`data-root`]),hV=C([`idle`,`checking`,`staging`,`pending-restart`,`awaiting-confirmation`]),gV=C([`in-sync`,`behind-patch`,`behind-series`,`ahead`,`unknown`]),_V=d({state:gV,seedVersion:l().nullable(),contractVersion:l().nullable(),contractSource:C([`registry`,`running`]).nullable(),message:l()}),vV=C([`docker`,`electron`,`native`,`contradictory`,`unknown`]),yV=d({fact:C([`dockerenv-file`,`proc-1-cgroup`,`platform`,`electron-app-version-env`]),mode:C([`observed`,`declared`]),holds:T(),detail:l()}),bV=d({kind:vV,evidence:w(yV),currentVersion:l().nullable()}),xV=d({fromVersion:l(),toVersion:l().nullable(),atMs:i(),reason:l()}),SV=d({runnerId:l(),addonIds:w(l()),reason:l()}),CV=d({checkedAtMs:i(),expected:i(),running:i(),failed:w(l()),refused:w(SV),missing:w(l()),pending:w(l()).optional(),planKnown:T()}),wV=d({packageName:l(),runningVersion:l().nullable(),nodeRuntimeVersion:l().nullable(),activeVersion:l().nullable(),installedVersion:l().nullable().optional(),restartRequired:T().optional(),previousVersion:l().nullable(),seedVersion:l().nullable(),latestVersion:l().nullable(),updateAvailable:T(),bootMode:mV,updateState:hV,pendingVersion:l().nullable(),rolledBack:xV.nullable(),stateFileCorrupt:T(),lastCheckedAtMs:i().nullable(),imageContract:_V.optional(),wrapper:bV.optional(),runners:CV.optional()}),TV=d({packageName:l(),runningVersion:l().nullable(),latestVersion:l().nullable(),updateAvailable:T(),checkedAtMs:i(),error:l().nullable(),pendingVersion:l().nullable().optional(),restartRequired:T().optional()}),EV=C([`staged`,`restart-scheduled`,`already-current`,`refused`,`failed`]),DV=d({addonId:l(),reason:l(),remedy:l()}),OV=d({accepted:T(),targetVersion:l().nullable(),restarting:T(),message:l(),outcome:EV.optional(),reason:l().nullable().optional(),error:l().nullable().optional(),blockers:w(DV).optional()}),kV={name:`server-management`,scope:`system`,mode:`singleton`,methods:{getServerPackageStatus:M(y(),wV,{auth:`admin`}),checkServerUpdate:M(y(),TV,{kind:`mutation`,auth:`admin`}),applyServerUpdate:M(d({version:l().optional(),acknowledgeRefusals:T().optional()}),OV,{kind:`mutation`,auth:`admin`,timeoutMs:16*6e4}),rollbackServerUpdate:M(y(),OV,{kind:`mutation`,auth:`admin`}),restartServer:M(y(),OV,{kind:`mutation`,auth:`admin`})},mount:{kind:`server-provided`}},AV=r(),jV=d({to:f([AV,w(AV).min(1)]),cc:w(AV).optional(),bcc:w(AV).optional(),from:l().optional(),replyTo:l().optional(),subject:l(),text:l(),html:l().optional()}),MV=d({messageId:l(),accepted:w(AV).default([]),rejected:w(AV).default([])}),NV=d({ready:T(),host:l(),error:l().optional(),lastVerifiedAt:i().optional()}),PV={name:`smtp-provider`,scope:`system`,mode:`collection`,internal:!0,providerKind:`email`,methods:{sendEmail:M(jV,MV,{kind:`mutation`,auth:`admin`,access:`create`}),verify:M(y(),NV,{kind:`mutation`,auth:`admin`,access:`view`}),getStatus:M(y(),NV,{auth:`admin`})}},FV=d({base64:l(),contentType:l()}),Sce=d({lastCapturedAt:i().nullable(),cacheAgeMs:i().nullable(),lastBytes:i().nullable(),lastStreamId:l().nullable()}),IV={name:`snapshot`,scope:`device`,deviceNative:!0,mode:`singleton`,kind:`wrapper`,defaultActive:!0,deviceTypes:[P.Camera],exposesDeviceSettings:!0,methods:{getSnapshot:M(d({deviceId:i(),streamId:l().optional(),force:T().optional()}),FV.nullable()),invalidateCache:M(d({deviceId:i()}),y(),{kind:`mutation`,auth:`admin`}),getSnapshotOverview:fa(d({deviceIds:w(i()).min(1).max(200)}),w(d({deviceId:i(),lastCapturedAt:i().nullable(),cacheAgeMs:i().nullable(),etag:l().nullable()}))),getDebugState:fa(d({deviceId:i()}),d({battery:d({sleeping:T(),lastUpdated:i(),lastContactAt:i().optional()}).nullable(),state:d({isBattery:T(),reason:C([`disabled`,`offline`,`sleeping`,`unreachable`,`waking`]).nullable()}),frame:d({capturedAt:i().nullable(),ageMs:i().nullable()}),waking:T()})),getSnapshotLinks:fa(d({targets:w(d({deviceId:i(),width:i().int().positive().optional()})).min(1).max(200)}),w(d({deviceId:i(),url:l().nullable(),capturedAt:i().nullable(),ageMs:i().nullable(),expiresAt:i().nullable(),width:i().nullable(),neverCaptured:T(),sleeping:T(),stateReason:C([`disabled`,`offline`,`sleeping`,`unreachable`,`waking`]).nullable(),battery:T()})))},status:{schema:Sce,kind:`poll`}},LV=d({userId:l(),username:l(),isAdmin:T(),provider:l(),email:l().optional(),displayName:l().optional(),hubUrl:l().optional(),scopes:w(tg).optional(),redirectUri:l().optional(),integrationId:l().optional(),jti:l().optional(),codeChallenge:l().optional(),sessionId:l().optional(),refreshTtl:f([i().int().positive(),h(`never`)]).optional(),linkIntent:l().optional(),issuer:l().optional(),browserBinding:l().optional(),app:d({codeChallenge:l(),state:l(),purpose:C([`new-session`,`step-up`]),redirect:l(),lang:C([`en`,`it`]).optional()}).optional()}),RV={name:`sso-bridge`,scope:`system`,mode:`singleton`,internal:!0,methods:{signBridgeToken:M(d({claims:LV,ttlSec:f([i().int().positive(),h(`never`)]).optional()}),d({token:l()}),{auth:`admin`}),verifyBridgeToken:M(d({token:l()}),LV.nullable(),{auth:`admin`})}},Cce=m(`shouldSaveDiskSpace`,[d({providerId:l().min(1),displayName:l().min(1),configSchema:o(),nodeLocal:T(),shouldSaveDiskSpace:h(!0),minFreePercent:i().min(0).max(100)}),d({providerId:l().min(1),displayName:l().min(1),configSchema:o(),nodeLocal:T(),shouldSaveDiskSpace:h(!1),minFreePercent:h(null)})]),zV={name:`storage`,scope:`system`,mode:`singleton`,methods:{resolve:M(d({location:Xp,relativePath:l()}),l(),{auth:`admin`}),write:M(d({location:Xp,relativePath:l(),data:S(Uint8Array)}),y(),{kind:`mutation`,auth:`admin`}),read:M(d({location:Xp,relativePath:l()}),S(Uint8Array),{auth:`admin`}),exists:M(d({location:Xp,relativePath:l()}),T(),{auth:`admin`}),list:M(d({location:Xp,prefix:l().optional()}),w(l()).readonly(),{auth:`admin`}),delete:M(d({location:Xp,relativePath:l()}),y(),{kind:`mutation`,auth:`admin`}),getAvailableSpace:M(d({location:Xp}),i().nullable()),beginUpload:M(d({location:Xp,relativePath:l(),sizeBytes:i().optional()}),d({uploadId:l()}),{kind:`mutation`,auth:`admin`}),writeChunk:M(d({uploadId:l(),offset:i(),data:S(Uint8Array)}),y(),{kind:`mutation`,auth:`admin`}),finalizeUpload:M(d({uploadId:l()}),y(),{kind:`mutation`,auth:`admin`}),abortUpload:M(d({uploadId:l()}),y(),{kind:`mutation`,auth:`admin`}),beginDownload:M(d({location:Xp,relativePath:l()}),d({downloadId:l(),sizeBytes:i()}),{kind:`mutation`,auth:`admin`}),readChunk:M(d({downloadId:l(),offset:i(),length:i()}),S(Uint8Array),{auth:`admin`}),endDownload:M(d({downloadId:l()}),y(),{kind:`mutation`,auth:`admin`}),listLocations:M(d({type:Up.optional()}),w(Wp).readonly()),listLocationDeclarations:M(y(),w($p).readonly()),upsertLocation:M(Wp.omit({createdAt:!0,updatedAt:!0}),Wp,{kind:`mutation`,auth:`admin`}),deleteLocation:M(d({id:l(),force:T().optional()}),y(),{kind:`mutation`,auth:`admin`}),listDrainProgress:M(y(),w(Yp).readonly()),testLocation:M(d({id:l()}),d({ok:T(),error:l().optional()}),{auth:`admin`}),listProviders:M(y(),w(Cce).readonly()),testConfig:M(d({providerId:l(),locationId:l().optional(),config:x(l(),o())}),d({ok:T(),error:l().optional()}),{auth:`admin`})}},wce=d({bytes:i().int().nonnegative()}),Tce=d({reclaimedBytes:i().int().nonnegative(),exhausted:T()}),BV={name:`storage-evictable`,scope:`system`,mode:`collection`,internal:!0,methods:{getEvictableUsage:M(d({locationId:l()}),wce,{auth:`admin`}),evict:M(d({locationId:l(),targetBytes:i().int().positive()}),Tce,{kind:`mutation`,auth:`admin`})}},VV={name:`storage-migration`,scope:`system`,mode:`singleton`,methods:{plan:M(Qf,op,{auth:`admin`}),start:M(Qf,d({jobId:l()}),{kind:`mutation`,auth:`admin`}),status:M(d({jobId:l().optional()}),rp.nullable(),{auth:`admin`}),cancel:M(d({jobId:l()}),d({cancelled:T()}),{kind:`mutation`,auth:`admin`}),movers:M(d({}),w(cp).readonly(),{auth:`admin`}),moverClearance:M(d({locationIds:w(l()).readonly()}),d({clear:T(),repointLocationId:l().optional()}),{auth:`admin`}),residue:M(d({}),w(lp).readonly(),{auth:`admin`}),drain:M(up,d({jobId:l()}),{kind:`mutation`,auth:`admin`}),cleanupStart:M(Sp,d({jobId:l()}),{kind:`mutation`,auth:`admin`}),cleanupStatus:M(wp,Cp.nullable(),{auth:`admin`}),cleanupCancel:M(d({jobId:l()}),d({cancelled:T()}),{kind:`mutation`,auth:`admin`}),history:M(d({}),w(rp).readonly(),{auth:`admin`})}},HV=d({locationId:l(),ownedBytes:i().int().nonnegative(),measuredAtMs:i().int().nonnegative()}),UV={name:`storage-occupancy`,scope:`system`,mode:`collection`,internal:!0,methods:{getOccupancy:M(d({locationIds:w(l()).readonly()}),w(HV).readonly(),{auth:`admin`})}},WV=m(`shouldSaveDiskSpace`,[d({providerId:l().min(1),displayName:l().min(1),configSchema:o(),nodeLocal:T(),shouldSaveDiskSpace:h(!0),minFreePercent:i().min(0).max(100)}),d({providerId:l().min(1),displayName:l().min(1),configSchema:o(),nodeLocal:T(),shouldSaveDiskSpace:h(!1),minFreePercent:h(null)})]),GV=d({ok:T(),error:l().optional()}),KV=d({location:Wp,relativePath:l(),sizeBytes:i().optional()}),qV=d({uploadId:l()}),JV=d({uploadId:l(),offset:i(),data:S(Uint8Array)}),YV=d({uploadId:l()}),XV=d({uploadId:l()}),ZV=d({location:Wp,relativePath:l()}),QV=d({downloadId:l(),sizeBytes:i()}),$V=d({downloadId:l(),offset:i(),length:i()}),eH=d({downloadId:l()}),tH={name:`storage-provider`,scope:`system`,mode:`collection`,internal:!0,methods:{getProviderInfo:M(y(),WV,{auth:`admin`}),testLocation:M(d({config:x(l(),o())}),GV,{auth:`admin`}),resolve:M(d({location:Wp,relativePath:l()}),l(),{auth:`admin`}),write:M(d({location:Wp,relativePath:l(),data:S(Uint8Array)}),y(),{kind:`mutation`,auth:`admin`}),read:M(d({location:Wp,relativePath:l()}),S(Uint8Array),{auth:`admin`}),exists:M(d({location:Wp,relativePath:l()}),T(),{auth:`admin`}),list:M(d({location:Wp,prefix:l().optional()}),w(l()).readonly(),{auth:`admin`}),delete:M(d({location:Wp,relativePath:l()}),y(),{kind:`mutation`,auth:`admin`}),getAvailableSpace:M(d({location:Wp}),i().nullable(),{auth:`admin`}),beginUpload:M(KV,qV,{kind:`mutation`,auth:`admin`}),writeChunk:M(JV,y(),{kind:`mutation`,auth:`admin`}),finalizeUpload:M(YV,y(),{kind:`mutation`,auth:`admin`}),abortUpload:M(XV,y(),{kind:`mutation`,auth:`admin`}),beginDownload:M(ZV,QV,{kind:`mutation`,auth:`admin`}),readChunk:M($V,S(Uint8Array),{auth:`admin`}),endDownload:M(eH,y(),{kind:`mutation`,auth:`admin`})}},nH=d({code:l().min(1),label:l().min(1),recommended:T()}),rH=d({signals:w(nH),lastFetchedAt:i()}),iH={name:`stream-signals`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:Object.values(P),runtimeState:rH,durability:`session`,history:`none`,methods:{listSignals:M(y(),w(nH).readonly())}},Ece=o().nullable(),aH=x(l(),o()),oH=d({sessionId:l(),profileId:l(),label:l(),cols:i().int().positive(),rows:i().int().positive(),startedAt:i()}),sH=d({profileId:l(),label:l(),description:l().optional(),executable:l().optional(),args:w(l()).readonly().optional(),cwd:l().optional(),environment:w(l()).readonly().optional(),settingsSchema:Ece.optional()}),cH=d({instanceId:l(),cameraStableId:l(),nodeId:l(),profileId:l(),profileLabel:l(),name:l(),enabled:T(),executable:l(),args:w(l()).readonly(),cwd:l(),environment:w(l()).readonly(),profileSettings:aH}),lH=d({stableId:l(),nodeId:l(),profileId:l(),profileLabel:l(),name:l(),adoptable:T()}),uH=m(`kind`,[d({seq:i().int().positive(),kind:h(`data`),data:l()}),d({seq:i().int().positive(),kind:h(`exit`),exitCode:i().int(),signal:i().int().optional()})]),dH=d({cursor:i().int().nonnegative(),reset:T(),snapshot:l().optional(),events:w(uH).readonly()}),fH={name:`terminal-session`,scope:`system`,mode:`singleton`,methods:{listProfiles:M(y(),w(sH).readonly(),{auth:`admin`}),listInstances:M(y(),w(cH).readonly(),{auth:`admin`}),createInstance:M(d({targetNodeId:l().min(1),profileId:l().min(1),name:l().trim().min(1).max(160).optional(),executable:l().max(1024).optional(),args:w(l().max(2048)).max(64).optional(),cwd:l().max(1024).optional(),environment:w(l().max(4096)).max(64).optional(),profileSettings:aH.optional()}),cH,{kind:`mutation`,auth:`admin`}),updateInstance:M(d({instanceId:l().min(1),name:l().trim().min(1).max(160).optional(),executable:l().max(1024).optional(),args:w(l().max(2048)).max(64).optional(),cwd:l().max(1024).optional(),environment:w(l().max(4096)).max(64).optional(),profileSettings:aH.optional()}),cH,{kind:`mutation`,auth:`admin`}),deleteInstance:M(d({instanceId:l().min(1)}),y(),{kind:`mutation`,auth:`admin`}),setInstanceEnabled:M(d({instanceId:l().min(1),enabled:T()}),cH,{kind:`mutation`,auth:`admin`}),listLegacyCameras:M(y(),w(lH).readonly(),{auth:`admin`}),adoptLegacyMonitor:M(d({stableId:l().min(1),name:l().trim().min(1).max(160).optional()}),cH,{kind:`mutation`,auth:`admin`}),listSessions:M(y(),w(oH).readonly(),{auth:`admin`}),openSession:M(d({profileId:l(),cols:i().int().positive(),rows:i().int().positive(),executable:l().max(1024).optional(),args:w(l().max(2048)).max(64).optional(),cwd:l().max(1024).optional(),environment:w(l().max(4096)).max(64).optional()}),oH,{kind:`mutation`,auth:`admin`}),resize:M(d({sessionId:l(),cols:i().int().positive(),rows:i().int().positive()}),y(),{kind:`mutation`,auth:`admin`}),pullOutput:M(d({sessionId:l(),afterSeq:i().int().nonnegative(),waitMs:i().int().min(0).max(2e3).default(0),waitForOutput:T().optional()}),dH,{kind:`mutation`,auth:`admin`,timeoutMs:15e3}),writeInput:M(d({sessionId:l(),data:l().max(64*1024)}),y(),{kind:`mutation`,auth:`admin`}),close:M(d({sessionId:l()}),y(),{kind:`mutation`,auth:`admin`})}},pH=d({urls:f([l(),w(l())]),username:l().optional(),credential:l().optional()}),mH={name:`turn-provider`,scope:`system`,mode:`collection`,methods:{getTurnServers:M(y(),w(pH).readonly(),{role:`viewer`})}},hH=d({credentialId:l(),label:l(),createdAt:i(),lastUsedAt:i().nullable(),transports:w(l()).default([])}),gH={name:`user-passkeys`,scope:`system`,mode:`collection`,internal:!0,methods:{beginRegistration:M(d({userId:l(),username:l()}),d({optionsJSON:x(l(),o())}),{kind:`mutation`,auth:`admin`,access:`create`}),finishRegistration:M(d({userId:l(),response:x(l(),o()),label:l()}),d({success:h(!0),credentialId:l()}),{kind:`mutation`,auth:`admin`,access:`create`}),beginAuthentication:M(d({userId:l().optional()}),d({optionsJSON:x(l(),o())}),{kind:`mutation`,access:`view`,auth:`admin`}),finishAuthentication:M(d({userId:l(),response:x(l(),o())}),d({verified:T()}),{kind:`mutation`,access:`view`,auth:`admin`}),beginDiscoverableAuthentication:M(d({}),d({optionsJSON:x(l(),o())}),{kind:`mutation`,access:`view`,auth:`admin`}),finishDiscoverableAuthentication:M(d({response:x(l(),o())}),d({verified:T(),userId:l().nullable()}),{kind:`mutation`,access:`view`,auth:`admin`}),listPasskeys:M(d({userId:l()}),w(hH),{auth:`admin`}),removePasskey:M(d({userId:l(),credentialId:l()}),d({success:h(!0)}),{kind:`mutation`,auth:`admin`,access:`delete`}),getSecondFactorPreference:M(d({userId:l()}),d({enabled:T()}),{auth:`admin`}),setSecondFactorPreference:M(d({userId:l(),enabled:T()}),d({success:h(!0)}),{kind:`mutation`,auth:`admin`,access:`create`})}},_H=C([`cosine`,`dot`,`euclidean`]),vH=x(l(),f([l(),i(),T()])),yH=d({equals:x(l(),f([l(),i(),T()])).optional(),between:x(l(),u([i(),i()])).optional()}),bH=d({id:l(),vector:l(),metadata:vH}),xH=d({id:l(),score:i(),metadata:vH}),SH=d({index:l(),dim:i().int().positive(),metric:_H.default(`cosine`)}),CH=d({index:l(),items:w(bH)}),wH=d({upserted:i(),rejected:i()}),TH=d({index:l(),vector:l(),topK:i().int().positive(),minScore:i().optional(),filter:yH.optional()}),EH=d({matches:w(xH),scanned:i(),truncated:T(),effectiveTopK:i().int().positive()}),DH=d({index:l(),ids:w(l())}),OH=d({index:l(),filter:yH}),kH=d({deleted:i()}),AH=d({index:l(),ids:w(l())}),jH=d({items:w(d({id:l(),metadata:vH}))}),Dce=d({index:l(),ids:w(l())}),Oce=d({items:w(d({id:l(),vector:l(),metadata:vH}))}),kce=d({index:l(),cursor:i().int().nonnegative().default(0),limit:i().int().positive()}),Ace=d({items:w(d({id:l(),metadata:vH})),nextCursor:i().int().nonnegative().nullable()}),MH=`vector-index-dim-conflict`;function jce(e,t,n){return Error(`[${MH}] vector-store: index "${e}" is declared with dim ${String(t)}; refusing to redeclare as ${String(n)}`)}function Mce(e){return(e instanceof Error?e.message:String(e)).includes(`[${MH}]`)}var NH=d({index:l()}),PH=d({backend:l(),count:i(),dim:i(),metric:_H,bytes:i().optional(),exact:T()}),FH={name:`vector-store`,scope:`system`,mode:`singleton`,internal:!0,methods:{declareIndex:M(SH,y(),{kind:`mutation`,auth:`admin`}),upsert:M(CH,wH,{kind:`mutation`,auth:`admin`}),query:M(TH,EH,{auth:`admin`}),getByIds:M(AH,jH,{auth:`admin`}),fetchByIds:M(Dce,Oce,{auth:`admin`}),scan:M(kce,Ace,{auth:`admin`}),deleteByIds:M(DH,kH,{kind:`mutation`,auth:`admin`}),deleteByFilter:M(OH,kH,{kind:`mutation`,auth:`admin`}),stats:M(NH,PH,{auth:`admin`})}},Nce=24,Pce=3,Fce=C([`queue-full`,`camera-backoff`,`sleeping`,`camera-refused`,`no-keyframe`,`decode-failed`,`no-catalog-row`,`unsupported`,`unknown-device`,`uid-missing`]),Ice=C([`deferred`,`final`]),Lce=`x-camstack-reason`,Rce=500;function zce(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 Bce=`x-camstack-reason-code`,Vce=`x-camstack-disposition`,Hce=`x-camstack-clip-transport`,IH=d({id:l(),source:l(),kind:C([`motion`,`object`,`audio`,`native`]),timeRange:d({startMs:i(),endMs:i()}),labels:w(l()).max(3).optional(),thumbnail:l().optional(),stillAtMs:i().optional(),eventIds:w(l()).optional(),eventCount:i().int().nonnegative().optional(),holes:w(d({startMs:i(),endMs:i()})).optional(),thumbnailMint:l().optional(),thumbnailUnavailable:d({reason:C([`sleeping`,`camera-refused`,`no-keyframe`,`unsupported`])}).optional(),catalogAsOf:i().optional(),nativeTypes:w(l()).optional(),behaviours:w(l()).optional(),streams:d({sub:d({id:l(),bytes:i().optional()}).optional(),main:d({id:l(),bytes:i().optional()}).optional()}).optional(),supportSub:T().optional(),playable:T().optional(),unplayableReason:l().optional(),inProgress:T().optional()}),LH=d({playbackUrl:l(),format:C([`hls`,`mp4`]).optional(),served:j.optional(),playbackEndpoints:w(l()).optional(),token:l().optional()}),RH=C([`authorised`]),Uce=50*1024*1024,Wce=500*1024*1024,zH=d({base64:l(),contentType:l(),name:l(),bytes:i().int().nonnegative(),served:j,durationMs:i().positive().optional()}),BH=d({ticket:On,contentType:l(),name:l(),served:j,durationMs:i().positive().optional()}),VH=C([`opus`,`pcmu`,`none`]),HH=C([`not-requested`,`unsupported-ask`]),UH=d({url:l().min(1),expiresAtMs:i(),transport:h(`forward-only`),served:j,servedAudio:VH,audioReason:HH.optional()}),WH=[.25,.5,1,1.5,2,4,8],GH=[.25,.5,1,1.5,2,4],KH=[.25,.5,1],qH=d({transport:C([`stream`,`file`]),seek:C([`forward`,`free`]),stepBack:T(),scrub:T(),rates:w(i().positive()).min(1).readonly()}),JH=d({state:C([`ok`,`sleeping`,`unreachable`,`no-storage`,`index-empty`]),reason:l().optional(),catalogAsOf:i().optional()}),YH=d({source:l(),label:l(),addonId:l().optional(),availability:JH}),XH={name:`videoclips`,scope:`device`,mode:`collection`,kind:`wrapper`,defaultActive:!0,deviceTypes:[P.Camera],deviceConfig:{ui:{kind:`widget`,widgetId:`host/clips-browser`,tab:`recording`,topTab:!0,label:`Clips`,order:100}},methods:{listClips:M(d({deviceId:i(),since:i(),until:i(),limit:i().int().positive().optional(),provider:l().min(1)}),w(IH).readonly(),{kind:`query`,auth:`protected`}),listSources:M(d({deviceId:i()}),w(YH).readonly(),{kind:`query`,auth:`protected`}),getClipPlayback:M(d({deviceId:i(),clipId:l(),profile:j.optional()}),LH,{kind:`query`,auth:`protected`}),readClipBytes:pa(d({deviceId:i(),clipId:l().min(1),provider:l().min(1),profile:j.optional(),maxBytes:i().int().positive().optional(),wake:RH.optional()}),zH,{kind:`query`,auth:`protected`}),offerClipBytes:pa(d({deviceId:i(),clipId:l().min(1),provider:l().min(1),profile:j.optional(),maxBytes:i().int().positive().optional(),wake:RH.optional()}),BH,{kind:`query`,auth:`protected`}),dialClipStream:pa(d({deviceId:i(),clipId:l().min(1),provider:l().min(1),profile:j.optional(),audio:VH.optional()}),UH,{kind:`query`,auth:`protected`}),getPlaybackOptions:pa(d({deviceId:i(),provider:l().min(1)}),qH,{kind:`query`,auth:`protected`})}},Gce={stream:{transport:`stream`,seek:`forward`,stepBack:!1,scrub:!1,rates:GH},realtimeStream:{transport:`stream`,seek:`forward`,stepBack:!1,scrub:!1,rates:KH},file:{transport:`file`,seek:`free`,stepBack:!0,scrub:!0,rates:WH}},ZH=d({viewportWidth:i().int().positive().optional(),viewportHeight:i().int().positive().optional(),devicePixelRatio:i().positive().optional(),downlinkMbps:i().nonnegative().optional(),prefersTier:l().optional()}).partial(),QH=m(`kind`,[d({kind:h(`adaptive`)}),d({kind:h(`profile`),profile:j}),d({kind:h(`cam-stream`),camStreamId:l().min(1)})]),$H=d({id:l(),label:l(),target:QH,codec:l().nullable(),resolution:d({width:i(),height:i()}).nullable(),status:C([`idle`,`connecting`,`streaming`,`error`,`stopped`]).nullable(),inputFps:i().nullable(),bitrateKbps:i().nullable()}),eU=d({cause:C([`loss`,`stall`,`healthy`]),tier:j.nullable(),forcedTranscodeDown:T(),lossRatio:i().nullable(),clientKbps:i().nullable(),stalledForMs:i().nullable(),serverSending:T().nullable(),at:i(),causeDetail:l().optional()}),Kce=[`stall-building`,`delivery`,`no-evidence`,`warming`,`cooldown`,`capacity`,`try-unclean`,`try-backoff`,`trial`,`suspended`],qce=[`delivery`,`loss`,`rtt`,`shared-telemetry`],tU=d({code:l(),nextTier:j,deliveryRatio:i().nullable(),deliveryWindowMs:i().nullable(),climbDeliveryRatio:i(),capacityKbps:i().nullable(),probeKbps:i().nullable(),nextTierKbps:i().nullable(),capacityMargin:i(),neededKbps:i().nullable(),tryBlockedBy:l().nullable(),tryDeliveryRatio:i().optional(),tryMaxLossRatio:i().optional(),retryInMs:i().nullable(),lastRevert:d({tier:j,deliveryRatio:i().nullable(),stalled:T(),at:i()}).nullable(),trialForMs:i().nullable(),trialMs:i().nullable(),healthyForMs:i().nullable(),requiredHealthyMs:i().nullable(),since:i(),summary:l()}),nU=d({tier:j,failures:i().int().nonnegative()}),rU=d({sessionId:l(),alive:T(),observedAt:i(),brokerId:l().nullable(),camStreamId:l().nullable(),sourceKind:C([`native`,`derived`,`unknown`]),adaptive:T(),servedTier:j.nullable(),ingestNodeId:l().nullable(),ingestIsRemote:T().nullable(),sourceCodec:l().nullable(),negotiatedCodec:l().nullable(),egressLeg:C([`copy`,`transcode`,`unknown`]),brokerStatus:l().nullable(),brokerCodec:l().nullable(),brokerBitrateKbps:i().nullable(),brokerInputFps:i().nullable(),brokerUptimeMs:i().nullable(),rtpPacketsSent:i().nullable(),trackMode:C([`live`,`recorded`]).nullable(),lastDecision:eU.nullable(),tierFailures:w(nU),upgradeCount:i().nullable(),climbHold:tU.nullable().optional()}),iU={name:`webrtc-session`,scope:`device`,mode:`singleton`,kind:`wrapper`,defaultActive:!0,preferredProvider:`stream-broker`,deviceTypes:[P.Camera],methods:{listStreams:M(d({deviceId:i().int().nonnegative()}),w($H)),createSession:M(d({deviceId:i().int().nonnegative(),target:QH,hints:ZH.optional(),relayOnly:T().optional(),consumerAttribution:gb.optional()}),d({sessionId:l(),sdpOffer:l()}),{kind:`mutation`}),handleOffer:M(d({deviceId:i().int().nonnegative(),target:QH.optional(),sdpOffer:l(),sessionId:l().optional(),relayOnly:T().optional(),nonTrickle:T().optional(),disableTurn:T().optional(),disableIpv6:T().optional(),consumerAttribution:gb.optional(),hints:ZH.optional(),talkback:T().optional()}),d({sessionId:l(),sdpAnswer:l()}),{kind:`mutation`}),handleAnswer:M(d({deviceId:i().int().nonnegative(),sessionId:l(),sdpAnswer:l()}),y(),{kind:`mutation`}),addIceCandidate:M(d({deviceId:i().int().nonnegative(),sessionId:l(),candidate:l(),sdpMid:l().nullable().optional(),sdpMLineIndex:i().int().nullable().optional()}),y(),{kind:`mutation`}),getIceCandidates:M(d({deviceId:i().int().nonnegative(),sessionId:l()}),d({candidates:w(d({candidate:l(),sdpMid:l().nullable(),sdpMLineIndex:i().int().nullable()})),done:T()}),{kind:`query`}),closeSession:M(d({deviceId:i().int().nonnegative(),sessionId:l()}),y(),{kind:`mutation`}),hasAdaptiveBitrate:M(d({deviceId:i().int().nonnegative(),profile:j}),T()),getSessionState:M(d({deviceId:i().int().nonnegative(),sessionId:l()}),d({pendingRenegotiation:d({target:QH,epoch:i()}).nullable(),alive:T()})),applyDownlinkProbe:M(d({deviceId:i().int().nonnegative(),sessionId:l(),downlinkMbps:i().nonnegative()}),d({outcome:C([`switching`,`held`]),tier:j.nullable(),reason:l()}),{kind:`mutation`}),getSessionDebug:M(d({deviceId:i().int().nonnegative(),sessionId:l()}),rU,{kind:`query`})},mount:{kind:`server-provided`}},aU=d({childDeviceIds:w(i()).readonly(),hiddenChildIds:w(i()).readonly()}),oU={name:`accessories`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[P.Camera,P.Hub,P.Switch,P.Light,P.Sensor,P.Thermostat,P.Cover,P.Lock,P.Fan,P.MediaPlayer,P.AlarmPanel,P.Generic],methods:{setChildHidden:M(d({deviceId:i().int().nonnegative(),childDeviceId:i().int().nonnegative(),hidden:T()}),y(),{kind:`mutation`,auth:`admin`})},events:{onAccessoriesChanged:{data:d({deviceId:i(),childDeviceIds:w(i()).readonly(),hiddenChildIds:w(i()).readonly()})},onChildVisibilityChanged:{data:d({deviceId:i(),childDeviceId:i(),hidden:T()})}},status:{schema:aU,kind:`command-driven`}},sU=C([`install`,`update`,`uninstall`,`restart`]),cU=C([`queued`,`fetching`,`staged`,`validating`,`applying`,`restarting`,`applied`,`done`,`failed`,`skipped`]),lU=C([`framework`,`addon`]),uU=d({tsMs:i(),nodeId:l(),packageName:l(),phase:cU,message:l()}),dU=d({taskId:l(),nodeId:l(),packageName:l(),fromVersion:l().nullable(),toVersion:l(),target:lU,phase:cU,stagedPath:l().nullable(),attempts:i(),steps:w(uU),error:l().nullable(),startedAtMs:i().nullable(),finishedAtMs:i().nullable()}),fU=C([`running`,`completed`,`failed`,`partially-failed`,`cancelled`]),pU=C([`single`,`bulk`,`cluster`]),mU=d({jobId:l(),kind:sU,createdAtMs:i(),createdBy:l(),scope:pU,tasks:w(dU),state:fU,schemaVersion:h(1)}),hU=C([`debug`,`info`,`warn`,`error`]),gU=C([`off`,`latest`,`beta`]),_U=C([`off`,`latest`,`beta`,`inherit`]),Jce=d({id:l(),name:l().optional(),version:l().optional(),description:l().optional(),icon:l().optional(),color:l().optional(),capabilities:w(o()).readonly().optional(),packageName:l(),packageVersion:l(),packageDisplayName:l().optional(),bundle:d({displayName:l(),description:l().optional(),icon:l().optional()}).optional(),protected:T().optional(),removable:T().optional()}),Yce=d({pid:i().optional(),mode:l(),state:l(),reason:l().optional()}),Xce=d({phase:C([`pending`,`healthy`,`failed`]),retryCount:i(),firstFailureAt:i().nullable(),lastAttemptAt:i().nullable(),lastError:d({message:l(),stack:l().optional()}).nullable(),nextRetryAt:i().nullable(),alertEmitted:T(),retrying:T(),inGracePeriod:T()}),vU=d({manifest:Jce,declaration:o().optional(),source:l(),installSource:l().optional(),process:Yce.optional(),hasBackup:T().optional(),health:Xce.nullable().optional()}),yU=d({name:l(),version:l(),dir:l(),installSource:l().optional()}),bU=d({name:l(),currentVersion:l(),latestVersion:l(),category:C([`addon`,`core`]),requiresRestart:T(),isSystem:T()}),xU=d({version:l(),publishedAt:l(),deprecated:l().optional(),distTags:w(l()).readonly()}),SU=m(`status`,[d({status:h(`ok`),markdown:l()}),d({status:h(`missing`)}),d({status:h(`error`),message:l()})]),Zce=d({name:l(),version:l(),readme:SU,changelog:SU}),CU=d({name:l(),version:l(),description:l(),keywords:w(l()).readonly(),publishedAt:l(),author:l(),installed:T(),installedVersion:l().optional(),capabilities:w(l()).readonly().nullable()}),wU=d({channel:gU,intervalSeconds:i(),updateCheckIntervalSeconds:i()}),TU=_U,Qce=o(),EU=o(),$ce=o(),DU=C([`uninstalled`,`not-installed`,`refused`,`failed`,`pending-reconnect`]),OU=d({nodeId:l(),outcome:DU,error:l().optional(),addonIds:w(l()).readonly(),runnersStopped:w(l()).readonly(),warnings:w(l()).readonly()}),kU=d({success:T(),packageName:l(),results:w(OU).readonly()}),AU=d({packageName:l(),nodeId:l(),nodeName:l(),isHub:T(),isOnline:T(),version:l().nullable(),addonIds:w(l()).readonly(),source:C([`live`,`recorded`]),onHub:T()}),jU=d({installations:w(AU).readonly(),unreachable:w(d({nodeId:l(),error:l()})).readonly()}),ele=C([`queued`,`updating`,`done`,`done-pending-restart`,`failed`]),tle=d({name:l(),isSystem:T(),fromVersion:l(),toVersion:l(),status:ele,error:l().optional(),startedAtMs:i().optional(),completedAtMs:i().optional()}),nle=C([`regular`,`system`,`restarting`,`finalizing`]);d({id:l(),nodeId:l(),startedAtMs:i(),completedAtMs:i().optional(),total:i(),completed:i(),failed:i(),current:l().nullable(),phase:nle,cancelled:T(),items:w(tle).readonly()});var rle=d({packageName:l(),currentVersion:l(),latestVersion:l().nullable(),hasUpdate:T(),description:l().optional(),buildId:l().nullable()}),MU=d({timestamp:l(),level:l(),message:l(),scope:l().optional()}),ile=o(),NU=d({addonId:l().min(1),action:l().min(1),input:o()}),PU={name:`addons`,scope:`system`,mode:`singleton`,nodeIdMode:`data`,methods:{list:M(d({nodeId:l().optional()}).optional(),w(vU).readonly()),getLogs:M(d({addonId:l(),limit:i().min(1).max(500).default(100),level:hU.optional()}),w(ile)),listPackages:M(y(),w(yU).readonly()),installPackage:M(d({packageName:l(),version:l().optional()}),EU,{kind:`mutation`,auth:`admin`}),installFromWorkspace:M(d({packageName:l()}),EU,{kind:`mutation`,auth:`admin`}),isWorkspaceAvailable:M(y(),T()),listWorkspacePackages:M(y(),w(o()).readonly()),uninstallPackage:M(d({packageName:l().min(1),nodeId:l().optional(),everywhere:T().optional()}),kU,{kind:`mutation`,auth:`admin`}),listInstallations:M(d({packageName:l().optional()}),jU,{auth:`admin`}),reloadPackages:M(y(),$ce,{kind:`mutation`,auth:`admin`}),searchAvailable:M(d({query:l().optional(),capability:l().optional()}),w(CU)),listUpdates:M(d({nodeId:l().optional()}),w(bU).readonly(),{auth:`admin`}),updatePackage:M(d({name:l().min(1),version:l().optional(),nodeId:l().optional()}),o(),{kind:`mutation`,auth:`admin`}),rollbackPackage:M(d({name:l().min(1)}),d({rolledBackTo:l().nullable()}),{kind:`mutation`,auth:`admin`}),forceRefresh:M(d({nodeId:l().optional()}),o(),{kind:`mutation`,auth:`admin`}),restartServer:M(d({confirm:h(!0)}),o(),{kind:`mutation`,auth:`admin`}),getLastRestart:M(y(),d({kind:C([`framework-update`,`manual`,`system`,`framework-bulk-update`]),packageName:l().optional(),fromVersion:l().optional(),toVersion:l().optional(),requestedBy:l().optional(),requestedAt:i()}).nullable(),{auth:`admin`}),listFrameworkPackages:M(y(),w(rle).readonly(),{auth:`admin`}),listCapabilityProviders:M(d({capName:l().min(1)}),w(d({addonId:l(),mode:C([`singleton`,`collection`]),isActive:T()})).readonly()),setCapabilityProviderEnabled:M(d({capName:l().min(1),addonId:l().min(1),enabled:T()}),d({success:h(!0)}),{kind:`mutation`,auth:`admin`}),getVersions:M(d({name:l()}),w(xU).readonly()),getPackageDocs:M(d({name:l().min(1),version:l().min(1).optional()}),Zce,{auth:`admin`}),restartAddon:M(d({addonId:l()}),Qce,{kind:`mutation`,auth:`admin`}),retryLoad:M(d({packageName:l()}),d({success:h(!0)}),{kind:`mutation`,auth:`admin`}),getAutoUpdateSettings:M(y(),wU,{auth:`admin`}),setAutoUpdateSettings:M(d({channel:gU,intervalSeconds:i().min(300).max(86400).optional(),updateCheckIntervalSeconds:i().min(900).max(604800).optional()}),o(),{kind:`mutation`,auth:`admin`}),getAddonAutoUpdate:M(d({addonId:l()}),TU,{auth:`admin`}),setAddonAutoUpdate:M(d({addonId:l(),channel:_U}),o(),{kind:`mutation`,auth:`admin`}),applyAutoUpdateToAll:M(d({channel:gU}),d({success:h(!0)}),{kind:`mutation`,auth:`admin`}),custom:M(NU,o(),{role:`viewer`,kind:`mutation`}),startJob:M(d({kind:C([`install`,`update`,`uninstall`,`restart`]),targets:w(d({name:l().min(1),version:l().min(1)})).min(1),nodeIds:w(l()).optional()}),d({jobId:l()}),{kind:`mutation`,auth:`admin`}),getJob:M(d({jobId:l()}),mU.nullable(),{auth:`admin`}),listJobs:M(d({activeOnly:T().optional()}),w(mU),{auth:`admin`}),cancelJob:M(d({jobId:l()}),d({cancelled:T()}),{kind:`mutation`,auth:`admin`}),onAddonLogs:M(d({addonId:l(),level:hU.optional()}),MU,{kind:`subscription`})},mount:{kind:`server-provided`}},FU=d({co2Ppm:i().min(0).optional().meta(A(`concentration-volume`)),vocPpb:i().min(0).optional().meta(A(`concentration-ppb`)),pm25:i().min(0).optional().meta(A(`concentration-mass`)),pm10:i().min(0).optional().meta(A(`concentration-mass`)),aqi:i().optional().meta(A(`index`)),lastFetchedAt:i()}),IU={name:`air-quality-sensor`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[P.Sensor],methods:{},status:{schema:FU,kind:`push`},runtimeState:FU,durability:`restored`,history:{fields:{co2Ppm:{kind:`gauge`,unit:`ppm`,deadband:5},vocPpb:{kind:`gauge`,unit:`ppb`,deadband:5},pm25:{kind:`gauge`,unit:`µg/m³`,deadband:1},pm10:{kind:`gauge`,unit:`µg/m³`,deadband:1},aqi:{kind:`gauge`,unit:`count`,deadband:1}}},volatileStateFields:[`lastFetchedAt`]},LU=d({lux:i().min(0).nullable().meta(A(`illuminance`,{precision:0,label:`Illuminance`})),lastFetchedAt:i()}),RU={name:`ambient-light-sensor`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[P.Sensor],methods:{},status:{schema:LU,kind:`push`},runtimeState:LU,durability:`restored`,history:{fields:{lux:{kind:`gauge`,unit:`lx`,deadbandPct:10,minIntervalMs:6e4}}},volatileStateFields:[`lastFetchedAt`]},zU=d({className:l(),hits:i().int().nonnegative(),avgScore:i().min(0).max(1),peakScore:i().min(0).max(1)}),BU=d({ts:i().int(),windowSec:i().int().positive(),level:d({rms:i(),dbfs:i()}),peakDbfs:i(),avgDbfs:i(),current:d({className:l(),score:i().min(0).max(1),timestamp:i().int()}).nullable(),byClass:w(zU).readonly()}),VU=d({ts:i().int(),dbfs:i().nullable(),peakDbfs:i(),avgDbfs:i(),topClass:l().nullable(),topScore:i().min(0).max(1).nullable()}),HU=d({points:w(VU).readonly(),effectiveSampleEveryMs:i().int().positive(),windowMsActual:i().int().nonnegative()}),UU={name:`audio-metrics`,scope:`device`,mode:`singleton`,deviceTypes:[P.Camera],methods:{getCurrentSnapshot:M(d({deviceId:i()}),BU.nullable()),getHistory:M(d({deviceId:i(),windowSec:i().int().positive().optional(),sampleEveryMs:i().int().positive().optional()}),HU)},runtimeState:BU,durability:`session`,history:`none`},WU={name:`action-source`,scope:`system`,mode:`collection`,methods:{listActions:M(d({}),w(Z_),{auth:`admin`}),runAction:M(d({actionId:l().min(1),variables:x(l(),B_).optional()}),y(),{kind:`mutation`,auth:`admin`}),stopAction:M(d({actionId:l().min(1)}),y(),{kind:`mutation`,auth:`admin`})}},GU=d({actionId:l().min(1)}),KU=d({deviceId:i().int().nonnegative(),actionIds:w(l().min(1)).max(100)}),qU={name:`actions`,scope:`system`,mode:`singleton`,methods:{list:M(d({}),w(Z_),{auth:`admin`}),get:M(d({actionId:l().min(1),deviceId:i().int().nonnegative().optional()}),d({action:Z_.nullable()}),{role:`viewer`,auth:`protected`,kind:`query`,caller:`required`}),run:M(d({actionId:l().min(1),variables:x(l(),B_).optional(),wait:T().optional(),origin:$_.optional(),deviceId:i().int().nonnegative().optional()}),tv,{role:`viewer`,auth:`protected`,kind:`mutation`,caller:`required`}),stop:M(GU,y(),{kind:`mutation`,auth:`admin`}),getTraces:M(GU,d({traces:w(N_)}),{auth:`admin`}),create:M(d({action:Q_}),d({action:Z_}),{kind:`mutation`,auth:`admin`}),update:M(d({actionId:l().min(1),action:Q_.partial()}),d({action:Z_}),{kind:`mutation`,auth:`admin`}),delete:M(GU,y(),{kind:`mutation`,auth:`admin`}),listForCamera:M(d({deviceId:i().int().nonnegative()}),w(Z_),{role:`viewer`,auth:`protected`,kind:`query`}),getLinks:M(d({deviceId:i().int().nonnegative()}),KU,{auth:`admin`}),setLinks:M(KU,KU,{kind:`mutation`,auth:`admin`})},events:{onRunChanged:{data:iv}}},JU=d({enabled:T(),isRunning:T(),lastTriggeredAt:i(),lastError:l().nullable(),lastChangedAt:i()}),YU={name:`automation-control`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[P.Automation],methods:{enable:M(d({deviceId:i().int().nonnegative()}),y(),{kind:`mutation`,auth:`admin`}),disable:M(d({deviceId:i().int().nonnegative()}),y(),{kind:`mutation`,auth:`admin`}),trigger:M(d({deviceId:i().int().nonnegative(),skipCondition:T().optional()}),y(),{kind:`mutation`,auth:`admin`})},status:{schema:JU,kind:`push`},runtimeState:JU,durability:`session`,history:`none`},XU=d({percentage:i().min(0).max(100).nullable().meta(A(`percentage`,{label:`Charge`})),charging:C([`dc`,`solar`,`none`,`unknown`]).meta({label:`Charging source`}),sleeping:T().meta({label:`Sleeping`}),lastUpdated:i().meta(A(`none`)),volts:i().nullable().optional().meta(A(`voltage`,{label:`Voltage`})),lastContactAt:i().optional(),lastFullRefreshAt:i().optional(),binary:T().optional().meta({label:`Binary indicator`})}),ZU=[P.Camera,P.Sensor,P.Button,P.Switch,P.PetFeeder,P.Container,P.Thermostat,P.EventEmitter],ale={version:1,targets:[{id:`percentage`,cardinality:`scalar`,vocabulary:{cap:`battery`,stateField:`percentage`},deviceTypes:ZU,apply:`add`,path:`percentage`,sources:[{kind:`field`,valueKinds:[`number`,`string`],transforms:[{kind:`identity`},{kind:`linear`,defaultScale:1,defaultOffset:0,clampMin:0,clampMax:100}]}],companions:[{kind:`constant`,path:`charging`,value:`unknown`,when:`add`},{kind:`constant`,path:`sleeping`,value:!1,when:`add`},{kind:`clock`,path:`lastUpdated`,when:`add`}],sourceReport:{status:`assignment-status`},advancedExpression:!0}]},QU={name:`battery`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:ZU,methods:{wakeForStream:M(d({deviceId:i(),timeoutMs:i().int().min(500).max(3e4).default(8e3)}),d({awoke:T(),durationMs:i()}),{kind:`mutation`})},composedMethods:{wakeForStream:{kind:`answer`,value:{awoke:!1,durationMs:0}}},events:{onStatusChanged:{data:d({deviceId:i(),status:XU})}},status:{schema:XU,kind:`push`,empty:{percentage:null,charging:`unknown`,sleeping:!1,lastUpdated:0}},runtimeState:XU,durability:`restored`,history:{fields:{percentage:{kind:`gauge`,unit:`%`},volts:{kind:`gauge`,unit:`V`}}},customize:ale,volatileStateFields:[`lastUpdated`]},$U=d({on:T().meta({label:`On`}),lastChangedAt:i()}),eW={name:`binary`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[P.Sensor],methods:{},status:{schema:$U,kind:`push`},runtimeState:$U,durability:`restored`,history:{fields:{on:{kind:`boolean`}}},volatileStateFields:[`lastChangedAt`]},tW=d({percentage:i().min(0).max(100).meta(A(`percentage`)),lastChangedAt:i()}),nW={name:`brightness`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[P.Light],methods:{setBrightness:M(d({deviceId:i().int().nonnegative(),percentage:i().min(0).max(100)}),y(),{kind:`mutation`,auth:`protected`})},events:{onBrightnessChanged:{data:d({deviceId:i(),percentage:i().min(0).max(100),lastChangedAt:i()})}},status:{schema:tW,kind:`command-driven`},runtimeState:tW,durability:`session`,history:{fields:{percentage:{kind:`gauge`,unit:`%`,minIntervalMs:0}}}},rW={name:`button`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[P.Button],methods:{press:M(d({deviceId:i().int().nonnegative()}),y(),{kind:`mutation`,auth:`protected`})}},iW=C([`ha`,`addon`]),aW=d({id:l().min(1),name:l().min(1),source:iW,enabled:T()}),oW=d({id:l().min(1),calendarId:l().min(1),title:l(),startMs:i().int(),endMs:i().int(),allDay:T().optional(),description:l().optional(),location:l().optional()}),sW=d({calendarIds:w(l().min(1)).max(64).optional(),startMs:i().int(),endMs:i().int()}),cW={name:`calendar-source`,scope:`system`,mode:`collection`,internal:!0,providerKind:`calendar`,methods:{listCalendars:M(y(),w(aW).readonly(),{auth:`admin`}),listEvents:M(sW,w(oW).readonly(),{auth:`admin`})}};function lW(e){let t=new Date(e);return new Date(t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()).getTime()}function uW(e){if(e.allDay!==!0)return{startMs:e.startMs,endMs:e.endMs};let t=lW(e.startMs),n=lW(e.endMs);if(n>t)return{startMs:t,endMs:n};let r=new Date(t);return{startMs:t,endMs:new Date(r.getFullYear(),r.getMonth(),r.getDate()+1).getTime()}}function dW(e,t){let n=new Date(t),r=new Date(n.getFullYear(),n.getMonth(),n.getDate()+1).getTime(),i=uW(e);return i.startMs<r&&i.endMs>t}var fW=l().regex(/^#[0-9A-Fa-f]{6}$/,`expected #RRGGBB`),pW=aW.extend({id:l().min(1),providerAddonId:l().min(1).optional(),defaultColor:fW,color:fW,visible:T()}),mW=d({visible:T().optional(),color:fW.optional()}),hW=d({calendars:x(l(),mW)}),gW=d({calendarId:l().min(1),visible:T().optional(),color:fW.nullable().optional()}),_W={name:`calendars`,scope:`system`,mode:`singleton`,methods:{listCalendars:M(y(),w(pW).readonly(),{auth:`admin`}),listEvents:M(sW,w(oW).readonly(),{auth:`admin`}),getPreferences:M(d({}),hW,{auth:`admin`,caller:`required`}),setCalendarPreference:M(gW,hW,{auth:`admin`,kind:`mutation`,caller:`required`})}},vW=d({host:l(),port:i().int().positive().optional(),onvifPort:i().int().positive().optional(),rtspPort:i().int().positive().optional(),https:T().optional(),username:l().optional(),password:l().optional(),onvifProfile:l().optional()}),yW=d({host:l(),port:i().int().positive().nullable(),onvifPort:i().int().positive().nullable(),rtspPort:i().int().positive().nullable(),https:T().nullable(),hasUsername:T(),hasPassword:T(),onvifProfile:l().nullable()}),bW={name:`camera-credentials`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[P.Camera],methods:{getCredentials:M(d({deviceId:i()}),vW.nullable(),{kind:`query`,auth:`admin`})},status:{schema:yW,kind:`command-driven`}},xW=d({x:i().min(0).max(1),y:i().min(0).max(1),width:i().gt(0).max(1),height:i().gt(0).max(1)}),SW=d({deviceId:i().int().positive(),source:xW,cell:xW}),CW=d({profile:C([`high`,`mid`,`low`]),offered:T(),missingSources:w(i().int().positive()),canvas:l(),published:T()}),wW=d({instanceId:l(),deviceId:i().int().nonnegative(),name:l(),fps:i().int(),cells:w(SW),profiles:w(CW)}),TW=d({deviceId:i().int().nonnegative(),name:l().min(1).max(160).optional(),fps:i().int().min(1).max(60).optional(),publishedProfiles:w(C([`high`,`mid`,`low`])).max(3).optional(),cells:w(SW).max(16)}),EW={name:`camera-grid-layout`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[P.Camera],exposesDeviceSettings:!0,methods:{getLayout:M(d({deviceId:i().int().nonnegative()}),wW.nullable(),{auth:`admin`}),saveLayout:M(TW,wW,{kind:`mutation`,auth:`admin`})}},DW=d({detected:T(),lastChangedAt:i()}),OW={name:`carbon-monoxide`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[P.Sensor],methods:{},status:{schema:DW,kind:`push`},runtimeState:DW,durability:`restored`,history:{fields:{detected:{kind:`boolean`}}},volatileStateFields:[`lastChangedAt`]},kW=C([`off`,`heat`,`cool`,`auto`,`heat_cool`,`fan_only`,`dry`]),AW=d({mode:kW,availableModes:w(kW),fanMode:l(),availableFanModes:w(l()),preset:l(),availablePresets:w(l()),target:i().nullable().meta(A(`temperature`)),targetHigh:i().nullable().meta(A(`temperature`)),targetLow:i().nullable().meta(A(`temperature`)),targetHumidity:i().min(0).max(100).nullable().meta(A(`humidity`)),currentTemp:i().nullable().meta(A(`temperature`)),currentHumidity:i().min(0).max(100).nullable().meta(A(`humidity`)),swingVertical:T().nullable(),swingHorizontal:T().nullable(),minTemp:i().nullable().optional().meta(A(`temperature`)),maxTemp:i().nullable().optional().meta(A(`temperature`)),tempStep:i().positive().nullable().optional().meta(A(`temperature`)),lastFetchedAt:i()}),jW={name:`climate-control`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[P.Thermostat,P.Climate],methods:{setMode:M(d({deviceId:i().int().nonnegative(),mode:kW}),y(),{kind:`mutation`,auth:`protected`}),setFanMode:M(d({deviceId:i().int().nonnegative(),fanMode:l().min(1)}),y(),{kind:`mutation`,auth:`protected`}),setPreset:M(d({deviceId:i().int().nonnegative(),preset:l().min(1)}),y(),{kind:`mutation`,auth:`protected`}),setTarget:M(d({deviceId:i().int().nonnegative(),target:i()}),y(),{kind:`mutation`,auth:`protected`}),setTargetRange:M(d({deviceId:i().int().nonnegative(),targetLow:i(),targetHigh:i()}),y(),{kind:`mutation`,auth:`protected`}),setTargetHumidity:M(d({deviceId:i().int().nonnegative(),targetHumidity:i().min(0).max(100)}),y(),{kind:`mutation`,auth:`protected`}),setSwingVertical:M(d({deviceId:i().int().nonnegative(),on:T()}),y(),{kind:`mutation`,auth:`protected`}),setSwingHorizontal:M(d({deviceId:i().int().nonnegative(),on:T()}),y(),{kind:`mutation`,auth:`protected`})},status:{schema:AW,kind:`push`},runtimeState:AW,durability:`session`,history:{fields:{currentTemp:{kind:`gauge`,unit:`°C`,deadband:.1},currentHumidity:{kind:`gauge`,unit:`%`,deadband:.5},target:{kind:`gauge`,unit:`°C`,minIntervalMs:0},targetHigh:{kind:`gauge`,unit:`°C`,minIntervalMs:0},targetLow:{kind:`gauge`,unit:`°C`,minIntervalMs:0}}}},MW=d({r:i().int().min(0).max(255).meta(A(`none`)),g:i().int().min(0).max(255).meta(A(`none`)),b:i().int().min(0).max(255).meta(A(`none`))}),NW=d({h:i().min(0).max(360).meta(A(`none`)),s:i().min(0).max(100).meta(A(`none`)),v:i().min(0).max(100).meta(A(`none`))}),PW=m(`mode`,[d({mode:h(`rgb`),rgb:MW}),d({mode:h(`hsv`),hsv:NW}),d({mode:h(`mired`),mireds:i().int().min(50).max(1e3)})]),FW=d({mode:C([`rgb`,`hsv`,`mired`]),rgb:MW.optional(),hsv:NW.optional(),mireds:i().int().optional().meta(A(`colour-temperature`)),lastChangedAt:i()});function IW(e){let t=PW.safeParse(e);return t.success?t.data:null}var LW={name:`color`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[P.Light],methods:{setColor:M(d({deviceId:i().int().nonnegative(),color:PW}),y(),{kind:`mutation`,auth:`protected`})},events:{onColorChanged:{data:d({deviceId:i(),mode:C([`rgb`,`hsv`,`mired`]),rgb:MW.optional(),hsv:NW.optional(),mireds:i().int().optional(),lastChangedAt:i()})}},status:{schema:FW,kind:`command-driven`},runtimeState:FW,durability:`session`,history:`none`},RW=2e4,zW=m(`outcome`,[d({outcome:h(`validated`),latencyMs:i().nonnegative().optional(),detail:l().optional()}).strict(),d({outcome:h(`rejected`),error:l()}).strict(),d({outcome:h(`inconclusive`),error:l()}).strict()]),BW=d({settings:x(l(),o())}),VW=d({label:l()}),HW={name:`connection-test`,scope:`system`,mode:`collection`,methods:{testSettings:M(BW,zW,{kind:`mutation`,auth:`admin`}),describeTest:M(y(),VW,{auth:`admin`})}},UW=d({connected:T(),lastChangedAt:i()}),WW={name:`connectivity`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[P.Sensor],methods:{},status:{schema:UW,kind:`push`},runtimeState:UW,durability:`restored`,history:{fields:{connected:{kind:`boolean`}}},volatileStateFields:[`lastChangedAt`]},GW=C([`wear`,`supply`,`waste`]),KW=C([`part`,`tank`,`product`,`bin`]),qW=C([`ok`,`low`,`empty`,`full`,`replace`]),JW=C([`ok`,`low`,`empty`,`full`]);function YW(e){return e.kind??`wear`}var XW={wear:`part`,waste:`bin`,supply:`product`};function ZW(e){return e.form??XW[YW(e)]}var QW=C([`duration`,`count`]),$W=d({value:i().min(0).nullable().meta(A(`device`)),kind:QW}),eG=d({key:l().min(1),label:l().min(1),level:i().min(0).max(100).nullable().meta(A(`percentage`)),status:qW.nullable(),kind:GW.optional(),form:KW.optional(),lastResetAt:i().nullable(),resettable:T(),remaining:$W.optional()}),tG=d({items:w(eG),lastChangedAt:i()}),nG={items:[],lastChangedAt:0},rG={version:1,targets:[{id:`items`,cardinality:`keyedArray`,vocabulary:{cap:`consumables`},deviceTypes:Object.values(P),apply:`add`,path:`items`,keyField:`key`,labelField:`label`,itemSchema:eG,nativeItems:`read-only`,sourceReport:{status:`assignment-status`},fields:[{path:`level`,sources:[{kind:`numeric`,transforms:[{kind:`identity`},{kind:`linear`,defaultScale:1,defaultOffset:0,clampMin:0,clampMax:100}]}]},{path:`remaining.value`,sources:[{kind:`numeric`,transforms:[{kind:`identity`}]}],literals:[{path:`remaining.kind`,values:[...QW.options]}]},{path:`status`,sources:[{kind:`enum`,transforms:[{kind:`enum-map`,outputValues:[...qW.options],unmapped:null}]}]}],traits:[{path:`kind`,values:[...GW.options],defaultValue:`wear`},{path:`form`,values:[...KW.options],defaultValue:`part`}],companions:[{kind:`clock`,path:`lastChangedAt`,when:`add`},{kind:`clock`,path:`lastFetchedAt`,when:`add`}],advancedExpression:!0}]},iG={name:`consumables`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:Object.values(P),deviceConfig:{ui:{kind:`widget`,widgetId:`host/consumables-panel`,tab:`consumables`,placement:`hero`,label:`Consumables`,order:5}},methods:{reset:M(d({deviceId:i().int().nonnegative(),key:l().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:tG,kind:`push`,empty:nG,itemArray:{path:`items`,keyField:`key`,labelField:`label`,itemSchema:eG,emptyItem:{key:``,label:``,level:null,status:null,lastResetAt:null,resettable:!1}}},runtimeState:tG.extend({lastFetchedAt:i()}),durability:`restored`,customize:rG,history:{fields:{},items:{path:`items`,key:`key`,label:`label`,fields:{level:{kind:`gauge`,unit:`%`,deadband:2,displayName:`Level`},status:{kind:`enum`,displayName:`Status`},"remaining.value":{kind:`gauge`,deadband:1,displayName:`Remaining`}}}},volatileStateFields:[`lastChangedAt`,`lastFetchedAt`]},aG=d({entryOpen:T(),lastChangedAt:i()}),oG={name:`contact`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[P.Sensor],methods:{},status:{schema:aG,kind:`push`},runtimeState:aG,durability:`restored`,history:{fields:{entryOpen:{kind:`boolean`}}},volatileStateFields:[`lastChangedAt`]},sG=C([`numeric`,`select`,`text`,`datetime`]),cG=d({kind:sG,value:f([i().meta(A(`device`)),l()]),options:w(l()),lastChangedAt:i(),min:i().optional().meta(A(`device`)),max:i().optional().meta(A(`device`)),step:i().optional().meta(A(`device`))}),lG=m(`kind`,[d({kind:h(`numeric`),value:i()}),d({kind:h(`select`),value:l().min(1)}),d({kind:h(`text`),value:l()}),d({kind:h(`datetime`),value:l().min(1)})]),uG={name:`control`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[P.Control],methods:{setValue:M(d({deviceId:i().int().nonnegative(),control:lG}),y(),{kind:`mutation`,auth:`protected`})},status:{schema:cG,kind:`push`},runtimeState:cG,durability:`session`,history:`none`},dG=C([`open`,`opening`,`closing`,`closed`,`stopped`]),fG=d({state:dG,position:i().min(0).max(100).nullable().meta(A(`percentage`)),tiltPosition:i().min(0).max(100).nullable().meta(A(`percentage`)),lastChangedAt:i()}),pG={name:`cover`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[P.Cover],methods:{open:M(d({deviceId:i().int().nonnegative()}),y(),{kind:`mutation`,auth:`protected`}),close:M(d({deviceId:i().int().nonnegative()}),y(),{kind:`mutation`,auth:`protected`}),stop:M(d({deviceId:i().int().nonnegative()}),y(),{kind:`mutation`,auth:`protected`}),setPosition:M(d({deviceId:i().int().nonnegative(),position:i().min(0).max(100)}),y(),{kind:`mutation`,auth:`protected`}),setTiltPosition:M(d({deviceId:i().int().nonnegative(),tiltPosition:i().min(0).max(100)}),y(),{kind:`mutation`,auth:`protected`})},status:{schema:fG,kind:`push`},runtimeState:fG,durability:`restored`,history:{fields:{position:{kind:`gauge`,unit:`%`,minIntervalMs:0}}},volatileStateFields:[`lastChangedAt`]},mG=C([`auto`,`day`,`night`,`schedule`]),hG=d({min:i(),max:i(),step:i()}),gG=d({mode:mG,sensitivity:i().optional().meta(A(`none`)),switchDelaySec:i().optional().meta(A(`duration`)),lastFetchedAt:i()}),_G=d({modes:w(mG),supportsSensitivity:T(),sensitivity:hG.optional(),supportsSwitchDelay:T(),switchDelaySec:hG.optional()}),vG=d({mode:mG.optional(),sensitivity:i().optional(),switchDelaySec:i().optional()}),yG={name:`day-night`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[P.Camera],deviceConfig:{ui:{kind:`derived-form`,builderId:`day-night`,tab:`image`}},methods:{getOptions:M(d({deviceId:i()}),_G),setSettings:M(d({deviceId:i(),settings:vG}),y(),{kind:`mutation`,auth:`admin`})},status:{schema:gG,kind:`poll`},runtimeState:gG,durability:`restored`,history:`none`,volatileStateFields:[`lastFetchedAt`]},bG=d({id:l(),name:l(),swatches:x(l(),Mj),fallbacks:w(l())}),xG={name:`display-palette`,scope:`system`,mode:`singleton`,methods:{getPalette:M(y(),Pj,{auth:`protected`,role:`viewer`}),listPresets:M(y(),w(bG).readonly(),{auth:`protected`,role:`viewer`}),setPalette:M(Fj,Nj,{kind:`mutation`,auth:`admin`})}},SG=d({online:T(),lastChangedAt:i()}),CG={name:`device-status`,scope:`device`,deviceNative:!0,mode:`singleton`,methods:{},events:{onStatusChanged:{data:d({deviceId:i(),status:SG})}},status:{schema:SG,kind:`push`},runtimeState:SG,durability:`restored`,history:{fields:{online:{kind:`boolean`}}},volatileStateFields:[`lastChangedAt`]},wG=C([`idle`,`running`,`paused`,`finished`,`error`,`unavailable`]),TG=C([`Inactive`,`Ready`,`DelayedStart`,`Run`,`Pause`,`ActionRequired`,`Finished`,`Error`,`Aborting`]),EG=C([`available`,`offline`,`description-missing`]),DG=d({availability:EG,state:wG,operationState:TG.nullable(),program:l().nullable(),selectedProgram:l().nullable(),availablePrograms:w(l()),remainingSeconds:i().int().nonnegative().nullable().meta(A(`duration`)),delayedStartSeconds:i().int().nonnegative().nullable().meta(A(`duration`)),progressPercent:i().min(0).max(100).nullable().meta(A(`percentage`)),doorOpen:T().nullable(),doorLocked:T().nullable(),remoteStartAllowed:T().nullable(),remoteControlActive:T().nullable(),localControlActive:T().nullable(),powerOn:T().nullable(),powerState:l().nullable(),filterCleaningDue:T().nullable(),machineCareDue:T().nullable(),machineCareRemainingRuns:i().int().nonnegative().nullable().meta(A(`count`)),halfLoad:T().nullable(),hygienePlus:T().nullable(),extraDry:T().nullable(),intensiveZone:T().nullable(),varioSpeedPlus:T().nullable(),childLock:T().nullable(),activeEvents:w(l()),errorCode:i().nullable().meta(A(`none`)),errorLabel:l().nullable(),lastFetchedAt:i()}),OG=i().int().nonnegative(),kG=f([T(),l(),i()]),AG=C([`none`,`read`,`readWrite`,`writeOnly`,`readStatic`]),jG=d({key:l(),name:l(),type:C([`boolean`,`number`,`enum`,`string`]),access:AG,available:T(),unit:l().nullable(),min:i().nullable(),max:i().nullable(),step:i().nullable(),enumValues:w(l()).nullable(),defaultValue:kG.nullable()}),MG=d({key:l(),name:l(),available:T(),options:w(jG)}),NG=d({availability:EG,supportsStart:T(),supportsPause:T(),supportsResume:T(),supportsStop:T(),supportsPower:T(),programs:w(MG),options:w(jG)}),PG={name:`dishwasher`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[P.Dishwasher],methods:{start:M(d({deviceId:OG,program:l().min(1).optional(),options:x(l(),kG).optional()}),y(),{kind:`mutation`,auth:`protected`}),pause:M(d({deviceId:OG}),y(),{kind:`mutation`,auth:`protected`}),resume:M(d({deviceId:OG}),y(),{kind:`mutation`,auth:`protected`}),stop:M(d({deviceId:OG}),y(),{kind:`mutation`,auth:`protected`}),setProgram:M(d({deviceId:OG,program:l().min(1)}),y(),{kind:`mutation`,auth:`protected`}),setPower:M(d({deviceId:OG,on:T()}),y(),{kind:`mutation`,auth:`protected`}),setHalfLoad:M(d({deviceId:OG,on:T()}),y(),{kind:`mutation`,auth:`protected`}),setHygienePlus:M(d({deviceId:OG,on:T()}),y(),{kind:`mutation`,auth:`protected`}),setExtraDry:M(d({deviceId:OG,on:T()}),y(),{kind:`mutation`,auth:`protected`}),setIntensiveZone:M(d({deviceId:OG,on:T()}),y(),{kind:`mutation`,auth:`protected`}),setVarioSpeedPlus:M(d({deviceId:OG,on:T()}),y(),{kind:`mutation`,auth:`protected`}),setChildLock:M(d({deviceId:OG,on:T()}),y(),{kind:`mutation`,auth:`protected`}),setOption:M(d({deviceId:OG,key:l().min(1),value:kG}),y(),{kind:`mutation`,auth:`protected`}),getOptions:M(d({deviceId:OG}),NG,{auth:`protected`})},status:{schema:DG,kind:`poll`},runtimeState:DG,durability:`session`,history:{fields:{progressPercent:{kind:`gauge`,unit:`%`,deadband:2},state:{kind:`enum`},operationState:{kind:`enum`},remainingSeconds:{kind:`gauge`,unit:`s`,minIntervalMs:6e4},doorOpen:{kind:`boolean`},powerOn:{kind:`boolean`}}}},FG=2e3,IG={version:1,targets:[{id:`pressed`,cardinality:`event`,shape:`pulse`,vocabulary:{cap:`doorbell`,eventName:`onPressed`},deviceTypes:[P.Camera],apply:`add`,applyAuthority:{kind:`composition-claim`},eventName:`onPressed`,edges:[`rising`],defaultEdge:`rising`,timestampPath:`lastPressedAt`,counterPath:`pressCountSinceStart`,highWater:`composer-advance`,combine:`any`,debounce:{kind:`rising-edge`,defaultDebounceMs:FG,changedAtRequired:!0},sources:[{kind:`binary`},{kind:`switch`}],sourceReport:{status:`assignment-status`},advancedExpression:!0}]},LG=d({lastPressedAt:i().nullable(),pressCountSinceStart:i().meta(A(`count`))}),RG=d({deviceId:i(),timestamp:i()}),zG={name:`doorbell`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[P.Button,P.Camera],methods:{},events:{onPressed:{data:RG,fromState:{field:`lastPressedAt`,on:`advance`}}},status:{schema:LG,kind:`push`},runtimeState:LG,durability:`restored`,history:`none`,customize:IG},BG=C([`date`,`time`,`datetime`]),VG=d({value:l(),timestamp:T().optional(),lastFetchedAt:i()}),HG={name:`enum-sensor`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[P.Sensor],methods:{},status:{schema:VG,kind:`push`},runtimeState:VG,durability:`restored`,history:{fields:{value:{kind:`enum`,skipWhenSet:`timestamp`}}},volatileStateFields:[`lastFetchedAt`]},UG=d({deviceId:i(),eventType:l(),data:x(l(),o()).nullable(),timestamp:i().meta(A(`none`)),seq:i().meta(A(`count`))}),WG=d({eventTypes:w(l()),lastEvent:UG.nullable(),eventCountSinceStart:i().meta(A(`count`))}),GG={name:`event-emitter`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[P.EventEmitter],methods:{},events:{onEvent:{data:UG}},status:{schema:WG,kind:`push`},runtimeState:WG,durability:`session`,history:`none`},KG=d({id:l(),name:l(),sampleCount:i().int().nonnegative(),coverMediaId:i().int().optional(),coverBase64:l().optional()}),qG=d({id:l(),source:C([`detected`,`photo`]),addedAt:i().int(),deviceId:i().int().optional(),base64:l().optional()}),JG=d({sampleId:l(),enrolledAt:i().int(),deviceId:i().int().optional(),source:C([`detected`,`photo`]),mediaId:i().int().optional(),comparable:T(),selfMean:i().nullable(),bestForeign:d({identityId:l(),name:l(),score:i()}).optional(),suspicion:i()}),YG=d({identityId:l(),name:l(),modelId:l(),totalSamples:i().int(),comparableSamples:i().int(),flagged:i().int(),flagThreshold:i(),rows:w(JG).readonly()}),XG=d({faceId:l(),deviceId:i().int(),trackId:l(),timestamp:i().int(),recognizedIdentityId:l().optional(),identityName:l().optional(),assigned:T(),base64:l().optional(),cropUrl:l().optional(),faceBbox:Pv.optional(),keyFrameMediaId:i().int().optional(),bestMatchScore:i().optional(),nativeFaceShortSidePx:i().optional(),suggestedIdentityId:l().optional(),suggestedMatchScore:i().optional()}),ZG=C([`unassigned`,`recognized`,`identified`,`all`]),QG=C([`timestamp`,`suggestionConfidence`]),$G=C([`asc`,`desc`]),eK=d({faceIds:w(l()).readonly(),representativeFaceId:l(),size:i().int(),cohesion:i()}),tK=d({mediaId:i().int(),kind:l(),url:l(),sizeBytes:i(),timestamp:i()}),nK={name:`face-gallery`,role:{feature:`face-assignment`},scope:`system`,mode:`singleton`,methods:{listIdentities:M(d({includeCrops:T().optional()}).optional(),w(KG).readonly(),{role:`viewer`}),createIdentity:M(d({name:l().min(1)}),KG,{kind:`mutation`,auth:`admin`}),renameIdentity:M(d({id:l(),name:l().min(1)}),y(),{kind:`mutation`,auth:`admin`}),deleteIdentity:M(d({id:l()}),y(),{kind:`mutation`,auth:`admin`}),listIdentitySamples:M(d({identityId:l()}),w(qG).readonly()),auditIdentitySamples:M(d({identityId:l().min(1)}),YG,{auth:`admin`}),removeSample:M(d({identityId:l(),sampleId:l()}),y(),{kind:`mutation`,auth:`admin`}),listRecentFaces:M(d({deviceId:i().int().optional(),deviceIds:w(i().int()).optional(),limit:i().int().positive().optional(),filter:ZG.optional(),since:i().int().optional(),until:i().int().optional(),sortBy:QG.optional(),sortDirection:$G.optional(),includeCrops:T().optional()}).optional(),w(XG).readonly()),getFaceByTrack:M(d({deviceId:i().int(),trackId:l()}),XG.nullable(),{role:`viewer`}),getFaceMedia:M(d({faceId:l()}),w(tK).readonly()),assignFace:M(d({faceId:l(),identityId:l()}),y(),{kind:`mutation`,auth:`admin`}),unassignFace:M(d({faceId:l()}),y(),{kind:`mutation`,auth:`admin`}),deleteFace:M(d({faceId:l()}),y(),{kind:`mutation`,auth:`admin`}),assignFaces:M(d({faceIds:w(l()).min(1),identityId:l()}),d({assigned:i().int(),failed:w(l()).readonly()}),{kind:`mutation`,auth:`admin`}),unassignFaces:M(d({faceIds:w(l()).min(1)}),d({unassigned:i().int(),failed:w(l()).readonly()}),{kind:`mutation`,auth:`admin`}),suggestFaceClusters:M(d({threshold:i().min(0).max(1).optional(),minClusterSize:i().int().min(2).optional(),maxClusters:i().int().positive().optional(),limit:i().int().positive().optional(),maxFacesScanned:i().int().positive().optional()}).optional(),w(eK).readonly())}},rK=C([`forward`,`reverse`]),iK=d({percentage:i().min(0).max(100).nullable().meta(A(`percentage`)),percentageStep:i().positive().optional().meta(A(`percentage`)),preset:l(),availablePresets:w(l()),direction:rK.nullable(),oscillating:T().nullable(),lastChangedAt:i()}),aK={name:`fan-control`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[P.Fan],methods:{setPercentage:M(d({deviceId:i().int().nonnegative(),percentage:i().min(0).max(100)}),y(),{kind:`mutation`,auth:`protected`}),setPreset:M(d({deviceId:i().int().nonnegative(),preset:l().min(1)}),y(),{kind:`mutation`,auth:`protected`}),setDirection:M(d({deviceId:i().int().nonnegative(),direction:rK}),y(),{kind:`mutation`,auth:`protected`}),setOscillating:M(d({deviceId:i().int().nonnegative(),oscillating:T()}),y(),{kind:`mutation`,auth:`protected`})},status:{schema:iK,kind:`push`},runtimeState:iK,durability:`session`,history:{fields:{percentage:{kind:`gauge`,unit:`%`,minIntervalMs:0},oscillating:{kind:`boolean`}}}},oK=d({flags:x(l(),o()),deviceType:l().nullable(),model:l().nullable(),channelCount:i().nullable().meta(A(`count`)),lastProbedAt:i(),lastFetchedAt:i()}),sK={name:`feature-probe`,scope:`device`,deviceNative:!0,mode:`singleton`,methods:{},events:{onProbeChanged:{data:d({deviceId:i(),status:oK})}},status:{schema:oK,kind:`push`},runtimeState:oK,durability:`session`,history:`none`},cK=d({flooded:T(),lastChangedAt:i()}),lK={name:`flood`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[P.Sensor],methods:{},status:{schema:cK,kind:`push`},runtimeState:cK,durability:`restored`,history:{fields:{flooded:{kind:`boolean`}}},volatileStateFields:[`lastChangedAt`]},uK=d({detected:T(),lastChangedAt:i()}),dK={name:`gas`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[P.Sensor],methods:{},status:{schema:uK,kind:`push`},runtimeState:uK,durability:`restored`,history:{fields:{detected:{kind:`boolean`}}},volatileStateFields:[`lastChangedAt`]},fK=d({deviceId:i().int().nonnegative(),cap:l().min(1),method:l().min(1),ok:T(),error:l().optional(),at:i()}),pK=d({results:w(fK)}),mK={name:`group-commands`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[P.Switch,P.Light,P.Fan,P.Cover,P.Valve,P.Lock,P.MediaPlayer,P.Thermostat,P.Climate],methods:{},status:{schema:pK,kind:`push`},runtimeState:pK,durability:`session`,history:`none`},hK=d({active:T().meta({label:`Active`}),lastChangedAt:i()}),gK={name:`group-active`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[P.Cover,P.Valve,P.Lock,P.MediaPlayer,P.Climate,P.Thermostat],methods:{},status:{schema:hK,kind:`push`},runtimeState:hK,durability:`session`,history:`none`},_K=d({included:i().int().nonnegative().meta(A(`count`,{precision:0,label:`Reporting`})),excluded:i().int().nonnegative().meta(A(`count`,{precision:0,label:`Excluded`})),total:i().int().nonnegative().meta(A(`count`,{precision:0,label:`Members`}))}),vK={name:`group-status`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[P.Sensor,P.Switch,P.Light,P.Fan,P.Cover,P.Valve,P.Lock,P.MediaPlayer,P.Thermostat,P.Climate],methods:{},status:{schema:_K,kind:`push`},runtimeState:_K,durability:`session`,history:`none`},yK=d({position:i().min(0).max(100).nullable().meta(A(`percentage`)),lastFetchedAt:i()}),bK={name:`heating-valve`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[P.Thermostat],methods:{},status:{schema:yK,kind:`push`},runtimeState:yK,durability:`session`,history:{fields:{position:{kind:`gauge`,unit:`%`,deadband:1}}},volatileStateFields:[`lastFetchedAt`]},xK=d({on:T(),currentHumidity:i().min(0).max(100).nullable().meta(A(`humidity`)),targetHumidity:i().min(0).max(100).nullable().meta(A(`humidity`)),mode:l().nullable(),availableModes:w(l()),action:l().nullable(),minHumidity:i().nullable().meta(A(`humidity`)),maxHumidity:i().nullable().meta(A(`humidity`)),lastChangedAt:i()}),SK={name:`humidifier`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[P.Humidifier],methods:{setOn:M(d({deviceId:i().int().nonnegative(),on:T()}),y(),{kind:`mutation`,auth:`protected`}),setTargetHumidity:M(d({deviceId:i().int().nonnegative(),humidity:i().min(0).max(100)}),y(),{kind:`mutation`,auth:`protected`}),setMode:M(d({deviceId:i().int().nonnegative(),mode:l().min(1)}),y(),{kind:`mutation`,auth:`protected`})},status:{schema:xK,kind:`push`},runtimeState:xK,durability:`session`,history:{fields:{currentHumidity:{kind:`gauge`,unit:`%`,deadband:.5},on:{kind:`boolean`}}}},CK=d({percent:i().min(0).max(100).nullable().meta(A(`humidity`,{precision:0,label:`Humidity`})),lastFetchedAt:i()}),wK={name:`humidity-sensor`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[P.Sensor,P.Thermostat],methods:{},status:{schema:CK,kind:`push`},runtimeState:CK,durability:`restored`,history:{fields:{percent:{kind:`gauge`,unit:`%`,deadband:.5}}},volatileStateFields:[`lastFetchedAt`]},TK=d({url:l().nullable(),lastUpdated:i().nullable().meta(A(`none`))}),EK={name:`image`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[P.Image],methods:{},status:{schema:TK,kind:`push`},runtimeState:TK,durability:`session`,history:`none`},DK=C([`0`,`90`,`180`,`270`]),OK=C([`auto`,`manual`]),kK=C([`auto`,`manual`]),AK=C([`off`,`blc`,`wdr`,`hlc`]),jK=d({min:i(),max:i(),step:i()}),MK=d({brightness:i().optional().meta(A(`none`)),contrast:i().optional().meta(A(`none`)),saturation:i().optional().meta(A(`none`)),sharpness:i().optional().meta(A(`none`)),mirror:T().optional(),flip:T().optional(),rotate:DK.optional(),whiteBalance:OK.optional(),warmth:i().optional().meta(A(`none`)),exposureMode:kK.optional(),backlightMode:AK.optional(),lastFetchedAt:i()}),NK=d({supportsBrightness:T(),brightness:jK.optional(),supportsContrast:T(),contrast:jK.optional(),supportsSaturation:T(),saturation:jK.optional(),supportsSharpness:T(),sharpness:jK.optional(),supportsMirror:T(),supportsFlip:T(),rotateOptions:w(DK),whiteBalanceModes:w(OK),supportsWarmth:T(),warmth:jK.optional(),exposureModes:w(kK),backlightModes:w(AK)}),PK=d({brightness:i().optional(),contrast:i().optional(),saturation:i().optional(),sharpness:i().optional(),mirror:T().optional(),flip:T().optional(),rotate:DK.optional(),whiteBalance:OK.optional(),warmth:i().optional(),exposureMode:kK.optional(),backlightMode:AK.optional()}),FK={name:`image-settings`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[P.Camera],deviceConfig:{ui:{kind:`derived-form`,builderId:`image-settings`,tab:`image`}},methods:{getOptions:M(d({deviceId:i()}),NK),setSettings:M(d({deviceId:i(),settings:PK}),y(),{kind:`mutation`,auth:`admin`})},status:{schema:MK,kind:`poll`},runtimeState:MK,durability:`restored`,history:`none`,volatileStateFields:[`lastFetchedAt`]},IK=d({id:l(),addonId:l(),name:l(),enabled:T(),info:x(l(),o()).readonly(),createdAt:i(),updatedAt:i(),processState:l()}),LK=d({id:l(),addonId:l(),name:l(),enabled:T(),info:x(l(),o()).readonly(),createdAt:i(),updatedAt:i()}),RK=d({addonId:l(),name:l(),description:l(),iconUrl:l().nullable(),color:l(),instanceMode:l(),mode:C([`standalone`,`account`,`broker`]),discoveryMode:l(),kind:C([`device-adoption`,`device-provider`]),brokerKind:l().nullable(),supportsLocationImport:T(),canTest:T(),existingInstances:w(d({id:l(),name:l()})),canAdd:T()}),zK=C([`validated`,`rejected`,`inconclusive`,`unsupported`]),BK=d({success:T(),error:l().optional(),status:zK.optional(),testedBy:l().nullable().optional(),latencyMs:i().nonnegative().optional(),detail:l().optional()}),VK=d({addonId:l(),name:l(),enabled:T().optional(),info:x(l(),o()).optional(),settings:x(l(),o()).optional(),secretKeys:w(l()).optional(),skipRestart:T().optional()}),HK=d({id:l(),name:l().optional(),enabled:T().optional(),info:x(l(),o()).optional()}),UK=d({success:T(),deletedId:l()}),WK={name:`integrations`,scope:`system`,mode:`singleton`,methods:{list:M(y(),w(IK)),get:M(d({id:l()}),IK),getByAddonId:M(d({addonId:l()}),LK.nullable()),create:M(VK,LK,{kind:`mutation`,auth:`admin`}),update:M(HK,LK,{kind:`mutation`,auth:`admin`}),delete:M(d({id:l()}),UK,{kind:`mutation`,auth:`admin`}),getSettings:M(d({id:l()}),x(l(),o()),{auth:`admin`}),setSettings:M(d({id:l(),settings:x(l(),o()),secretKeys:w(l()).optional()}),d({success:T()}),{kind:`mutation`,auth:`admin`}),getAvailableTypes:M(y(),w(RK),{auth:`admin`}),testConnection:M(d({addonId:l(),settings:x(l(),o())}),BK,{kind:`mutation`,auth:`admin`})},mount:{kind:`server-provided`}},GK=d({codecs:w(l()),sampleRate:i().meta(A(`none`)),duplex:C([`half`,`full`]),maxBacklogMs:i().meta(A(`duration-ms`))}),KK=d({talking:T(),lastSessionAt:i().nullable(),ability:GK.nullable()}),qK=C([`opus`,`s16le`,`g711ulaw`,`g711alaw`]),JK={name:`intercom`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[P.Camera],methods:{startSession:M(d({deviceId:i()}),d({sessionId:l(),sdpOffer:l()}),{kind:`mutation`,auth:`protected`}),handleAnswer:M(d({deviceId:i(),sessionId:l(),sdpAnswer:l()}),y(),{kind:`mutation`,auth:`protected`}),stopSession:M(d({deviceId:i(),sessionId:l()}),y(),{kind:`mutation`,auth:`protected`}),startTalkSession:M(d({deviceId:i()}),d({sessionId:l()}),{kind:`mutation`,auth:`protected`}),pushTalkAudio:M(d({deviceId:i(),audioBase64:l(),codec:qK.optional(),sampleRate:i().int().positive().optional(),channels:i().int().positive().optional(),sequenceNumber:i().int()}),d({accepted:T()}),{kind:`mutation`,auth:`protected`}),endTalkSession:M(d({deviceId:i()}),y(),{kind:`mutation`,auth:`protected`})},events:{onStatusChanged:{data:d({deviceId:i(),status:KK})}},status:{schema:KK,kind:`command-driven`},runtimeState:KK,durability:`session`,history:`none`},YK=C([`idle`,`mowing`,`paused`,`docked`,`error`]),XK=C([`info`,`warning`,`error`]),ZK=d({activity:YK,batteryLevel:i().min(0).max(100).nullable().meta(A(`percentage`)),progressPercent:i().min(0).max(100).nullable().meta(A(`percentage`)),currentCode:i().nullable().meta(A(`none`)),currentCodeLabel:l().nullable(),severity:XK,lastChangedAt:i()}),QK={name:`lawn-mower-control`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[P.LawnMower],methods:{startMowing:M(d({deviceId:i().int().nonnegative()}),y(),{kind:`mutation`,auth:`protected`}),pause:M(d({deviceId:i().int().nonnegative()}),y(),{kind:`mutation`,auth:`protected`}),dock:M(d({deviceId:i().int().nonnegative()}),y(),{kind:`mutation`,auth:`protected`})},status:{schema:ZK,kind:`push`},runtimeState:ZK,durability:`session`,history:{fields:{batteryLevel:{kind:`gauge`,unit:`%`,deadband:2}}}},$K=C([`lan`,`wifi`,`docker`,`vpn`,`loopback`,`other`]),eq=d({name:l(),family:C([`IPv4`,`IPv6`]),address:l(),cidr:l(),netmask:l(),internal:T(),mac:l(),kind:$K,preferred:T(),plausible:T(),plausibleReason:l()}),tq=d({interfaces:w(eq).readonly(),probedAt:i()}),nq=eq.nullable(),rq=d({label:l(),baseUrl:l(),kind:C([`lan-ipv4`,`lan-ipv6`,`public`,`loopback`,`app-link`,`custom`]),interfaceKind:C([`lan`,`wifi`,`docker`,`vpn`,`other`,`loopback`,`public`]),plausible:T(),plausibleReason:l(),priority:i(),stable:T().optional()}),iq=C([`server-config`,`server-env`,`caller-hint`,`default`]),aq=d({port:i().int().min(1).max(65535),source:iq}),oq=d({endpoints:w(rq).readonly(),localPort:aq}),sq=d({baseUrl:l().nullable(),resolved:l().nullable(),appLinkHub:l().nullable()}),cq=d({baseUrls:w(l()).readonly(),resolved:w(l()).readonly()}),lq=d({override:l().nullable(),resolved:l().nullable(),source:C([`override`,`auto`,`none`])}),uq=d({cluster:lq,browser:lq}),dq=C(qO),fq=C([`flagged`,`auto`,`none`]),pq=d({flagged:l().nullable(),resolved:l().nullable(),source:fq}),mq=d({flagged:w(l()).readonly(),resolved:w(l()).readonly(),source:fq}),hq=d({rows:w(rq.extend({detected:T(),custom:T(),flags:w(dq).readonly(),inUse:w(dq).readonly(),eligible:w(dq).readonly()})).readonly(),roles:d({appConnections:mq,notificationTaps:pq,internal:pq,publicEndpoint:pq}),appLinkHub:l().nullable(),listenerOrigins:w(l()).readonly().optional()}),gq=d({addresses:w(l()).readonly()}),_q=d({mode:C([`generated`,`uploaded`,`disabled`]),leafFingerprintSha256:l().nullable(),caFingerprintSha256:l().nullable(),validTo:l().nullable(),sans:w(l()),caCertPem:l().nullable(),reissueError:l().nullable(),restartRequired:T(),caMissing:T(),localCaConstrained:T().nullable(),caReplacedAt:l().nullable(),storedUpload:d({leafFingerprintSha256:l(),validTo:l(),hasCa:T()}).nullable()}),vq={name:`local-network`,scope:`system`,mode:`singleton`,methods:{list:M(y(),tq),getPreferred:M(y(),nq),getConnectionEndpoints:M(d({port:i().int().min(1).max(65535).optional(),includeLoopback:T().optional(),ipv4Only:T().optional(),scheme:C([`http`,`https`]).optional(),includeAppLink:T().optional()}),oq),getNotificationEndpoint:M(y(),sq),setNotificationEndpoint:M(d({baseUrl:l().nullable()}),sq,{kind:`mutation`}),getViewerEndpoints:M(y(),cq),setViewerEndpoints:M(d({baseUrls:w(l()).readonly()}),cq,{kind:`mutation`}),getAddresses:M(d({scheme:C([`http`,`https`]).optional()}).optional(),hq),addCustomAddress:M(d({baseUrl:l(),label:l().max(80)}),hq,{kind:`mutation`,auth:`admin`}),removeCustomAddress:M(d({baseUrl:l()}),hq,{kind:`mutation`,auth:`admin`}),setAddressRole:M(d({role:dq,baseUrl:l().nullable(),enabled:T(),acceptInsecureHttp:T().optional()}),hq,{kind:`mutation`,auth:`admin`}),getHubAddresses:M(y(),uq),getAllowedAddresses:M(y(),gq),setAllowedAddresses:M(gq,d({success:h(!0)}),{kind:`mutation`}),resetAllowlistToBestMatch:M(y(),gq,{kind:`mutation`}),getTlsStatus:M(y(),_q),regenerateCertificate:M(d({reason:l().optional()}),_q,{kind:`mutation`,auth:`admin`}),uploadCertificate:M(d({certPem:l().min(1),keyPem:l().min(1),caPem:l().optional()}),_q,{kind:`mutation`,auth:`admin`}),downloadCa:M(y(),d({pem:l()})),useStoredUploadedCertificate:M(y(),_q,{kind:`mutation`,auth:`admin`}),revertToGeneratedCertificate:M(y(),_q,{kind:`mutation`,auth:`admin`})},mount:{kind:`hub-only`}},yq=C([`locked`,`unlocked`,`locking`,`unlocking`,`jammed`]),bq=d({state:yq,lastChangedAt:i()}),xq={name:`lock-control`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[P.Lock],methods:{lock:M(d({deviceId:i().int().nonnegative(),code:l().min(1).optional()}),y(),{kind:`mutation`,auth:`protected`}),unlock:M(d({deviceId:i().int().nonnegative(),code:l().min(1).optional(),confirm:T().optional()}),y(),{kind:`mutation`,auth:`protected`}),open:M(d({deviceId:i().int().nonnegative()}),y(),{kind:`mutation`,auth:`protected`})},status:{schema:bq,kind:`push`},runtimeState:bq,durability:`restored`,history:{fields:{state:{kind:`enum`}}},volatileStateFields:[`lastChangedAt`]},Sq=d({value:i().nullable().meta(A(`device`,{label:`Total`})),lastFetchedAt:i()}),Cq={name:`meter`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[P.Sensor],methods:{},status:{schema:Sq,kind:`push`},runtimeState:Sq,durability:`restored`,history:{fields:{value:{kind:`counter`,deadband:.001,minIntervalMs:6e4}}},volatileStateFields:[`lastFetchedAt`]},wq=C([`off`,`on`,`idle`,`playing`,`paused`,`buffering`,`standby`]),Tq=C([`off`,`all`,`one`]),Eq=d({type:l(),title:l(),artist:l().optional(),album:l().optional(),imageUrl:l().optional()}),Dq=d({state:wq,volumeLevel:i().min(0).max(100).nullable().meta(A(`percentage`)),isMuted:T().nullable(),source:l(),availableSources:w(l()),currentMedia:Eq.nullable(),positionMs:i().int().nonnegative().nullable().meta(A(`duration-ms`)),durationMs:i().int().nonnegative().nullable().meta(A(`duration-ms`)),shuffle:T().nullable(),repeat:Tq.nullable(),lastChangedAt:i()}),Oq={name:`media-player`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[P.MediaPlayer],methods:{play:M(d({deviceId:i().int().nonnegative()}),y(),{kind:`mutation`,auth:`protected`}),pause:M(d({deviceId:i().int().nonnegative()}),y(),{kind:`mutation`,auth:`protected`}),stop:M(d({deviceId:i().int().nonnegative()}),y(),{kind:`mutation`,auth:`protected`}),next:M(d({deviceId:i().int().nonnegative()}),y(),{kind:`mutation`,auth:`protected`}),previous:M(d({deviceId:i().int().nonnegative()}),y(),{kind:`mutation`,auth:`protected`}),seek:M(d({deviceId:i().int().nonnegative(),positionMs:i().int().nonnegative()}),y(),{kind:`mutation`,auth:`protected`}),setVolume:M(d({deviceId:i().int().nonnegative(),volumeLevel:i().min(0).max(100)}),y(),{kind:`mutation`,auth:`protected`}),setMute:M(d({deviceId:i().int().nonnegative(),muted:T()}),y(),{kind:`mutation`,auth:`protected`}),setShuffle:M(d({deviceId:i().int().nonnegative(),shuffle:T()}),y(),{kind:`mutation`,auth:`protected`}),setRepeat:M(d({deviceId:i().int().nonnegative(),repeat:Tq}),y(),{kind:`mutation`,auth:`protected`}),selectSource:M(d({deviceId:i().int().nonnegative(),source:l().min(1)}),y(),{kind:`mutation`,auth:`protected`}),playMedia:M(d({deviceId:i().int().nonnegative(),mediaId:l().min(1),mediaType:l().min(1)}),y(),{kind:`mutation`,auth:`protected`})},status:{schema:Dq,kind:`push`},runtimeState:Dq,durability:`session`,history:{fields:{volumeLevel:{kind:`gauge`,unit:`%`,deadband:1},isMuted:{kind:`boolean`}}}},kq=d({id:l(),label:l(),scope:C([`mesh`,`public`]),url:l(),hostname:l(),port:i(),protocol:C([`http`,`https`])}),Aq=d({id:l(),hostname:l(),magicDns:l(),addresses:w(l()).readonly(),os:l().optional(),online:T(),lastSeenMs:i(),isSelf:T(),connection:C([`direct`,`relay`,`idle`]),relay:l().nullable(),lastHandshakeMs:i(),rxBytes:i(),txBytes:i(),tags:w(l()).readonly(),exitNodeOption:T(),advertisedRoutes:w(l()).readonly(),userLogin:l().nullable(),keyExpiry:i().nullable()}),jq=d({joined:T(),meshIp:l(),magicDnsHostname:l(),peerCount:i(),endpoints:w(kq).readonly(),error:l().optional(),tenantName:l(),magicDnsSuffix:l(),userLogin:l().nullable(),controlPlaneUrl:l(),keyExpiry:i().nullable(),daemonSocket:l().optional(),daemonCliPath:l().optional()}),Mq={name:`mesh-network`,scope:`system`,mode:`collection`,providerKind:`mesh`,methods:{getStatus:M(y(),jq),join:M(d({authKey:l().min(8),hostname:l().optional()}),d({joined:h(!0)}),{kind:`mutation`}),startLogin:M(d({hostname:l().optional()}),d({loginUrl:l()}),{kind:`mutation`}),leave:M(y(),d({left:h(!0)}),{kind:`mutation`}),logout:M(y(),d({loggedOut:h(!0)}),{kind:`mutation`}),listPeers:M(y(),d({peers:w(Aq).readonly()})),testConnection:M(d({authKey:l().optional()}),d({ok:T(),tenant:l().optional(),daemonVersion:l().optional(),error:l().optional()}),{kind:`mutation`})}},Nq=3e4,Pq={version:1,targets:[{id:`detected`,cardinality:`event`,shape:`span`,vocabulary:{cap:`motion`,eventName:`onMotionChanged`},deviceTypes:[P.Camera],apply:`add`,applyAuthority:{kind:`camera-sensors`,timeoutField:`motionCooldownMs`},eventName:`onMotionChanged`,start:`rising-edge`,end:`falling-edge-or-timeout`,timeoutMs:Nq,combine:`any`,sourceModes:[`in-addition`,`confirm`,`replace`],sources:[{kind:`binary`},{kind:`switch`}],sourceReport:{status:`assignment-status`},advancedExpression:!1}]},Fq=15e3,Iq=d({detected:T(),lastDetectedAt:i().nullable(),autoClearAfterMs:i().nullable().meta(A(`duration-ms`))}),Lq=d({deviceId:i(),detected:T(),timestamp:i(),source:pB,regions:w(VA).readonly().optional(),triggeredBy:KP.optional()}),Rq={name:`motion`,scope:`device`,mode:`singleton`,deviceNative:!0,deviceTypes:[P.Camera,P.Sensor],methods:{isDetected:M(d({deviceId:i()}),T())},composedMethods:{isDetected:{kind:`slice`,field:`detected`}},events:{onMotionChanged:{data:Lq}},status:{schema:Iq,kind:`push`},runtimeState:Iq,durability:`session`,history:{fields:{detected:{kind:`boolean`,excludeDeviceTypes:[P.Camera]}}},customize:Pq},zq=d({enabled:T(),lastChangedAt:i()}),Bq=zq.extend({lastFetchedAt:i()}),Vq={name:`motion-trigger`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[P.Light,P.Siren,P.Switch],methods:{setMotionTrigger:M(d({deviceId:i().int().nonnegative(),enabled:T()}),y(),{kind:`mutation`,auth:`protected`})},events:{onMotionTriggerChanged:{data:d({deviceId:i(),enabled:T(),lastChangedAt:i()})}},status:{schema:zq,kind:`command-driven`},runtimeState:Bq,durability:`session`,history:`none`},Hq=d({id:i(),enabled:T(),shape:uM}),Uq=d({enabled:T(),sensitivity:i().meta(A(`none`)),regions:w(Hq),lastFetchedAt:i()}),Wq=d({maxRegions:i(),supportedShapes:w(fM),grid:mM,sensitivity:d({min:i(),max:i(),step:i()})}),Gq=d({enabled:T().optional(),sensitivity:i().optional(),regions:w(Hq).optional()}),Kq={name:`motion-zones`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[P.Camera],deviceConfig:{ui:{kind:`widget`,widgetId:`host/motion-zones-grid`,tab:`motion`,label:`Motion Zones`}},methods:{getOptions:M(d({deviceId:i()}),Wq),setZone:M(d({deviceId:i(),patch:Gq}),y(),{kind:`mutation`,auth:`admin`})},status:{schema:Uq,kind:`poll`},runtimeState:Uq,durability:`restored`,history:`none`,volatileStateFields:[`lastFetchedAt`]},qq=C([`person`,`vehicle`,`animal`,`face`,`package`,`other`]),Jq=d({class:qq,timestamp:i(),confidence:i().min(0).max(1).optional()}),Yq=d({lastByClass:ie(qq,Jq.nullable()),supportedClasses:w(qq).readonly(),enabled:T()}),Xq=C([`boxed`,`while-streaming`,`flag-only`]),Zq=d({supportedClasses:w(qq).readonly(),geometry:Xq}),Qq=d({enabled:T().optional()}),$q=Yq.extend({lastFetchedAt:i()}),eJ={name:`native-object-detection`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[P.Camera],methods:{getOptions:M(d({deviceId:i()}),Zq),setSettings:M(d({deviceId:i(),settings:Qq}),y(),{kind:`mutation`,auth:`admin`}),setEnabled:M(d({deviceId:i(),enabled:T()}),y(),{kind:`mutation`,auth:`admin`})},events:{onDetected:{data:d({deviceId:i(),detection:Jq})}},status:{schema:Yq,kind:`push`},runtimeState:$q,durability:`restored`,history:`none`,volatileStateFields:[`lastFetchedAt`]},tJ=d({pan:i().min(-1).max(1).optional(),tilt:i().min(-1).max(1).optional(),speed:i().min(0).max(1).optional()}),nJ=C([`goHome`,`locate`,`spotClean`,`findPet`,`personFollow`,`stop`,`startClean`,`pauseClean`,`dockWash`,`autoEmpty`,`flashOn`,`flashOff`]),rJ=C([`action`,`sound`]),iJ=d({id:l(),kind:rJ,label:l(),icon:l(),soundId:i().int().optional(),enabled:T()}),aJ=[{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}],oJ=d({x:i(),y:i()}),sJ=d({move:T(),stop:T(),goToPoint:T(),runAction:T(),playSound:T(),light:T(),lightMode:T()}),cJ=C([`auto`,`manual`]),lJ=40,uJ=100,dJ=C([`idle`,`cleaning`,`spot`,`following`,`goto`,`returning`,`paused`,`unknown`]),fJ=d({mode:dJ,following:T(),flash:T(),lightMode:cJ,lightLevel:i().min(40).max(100).meta(A(`none`)),lastChangedAt:i()}),pJ=fJ.extend({lastFetchedAt:i()}),mJ={name:`navigation`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[P.Camera],deviceConfig:{ui:{kind:`widget`,widgetId:`host/navigation-panel`,tab:`navigation`,topTab:!0,label:`Navigation`,order:0}},methods:{move:M(tJ.extend({deviceId:i()}),y(),{kind:`mutation`}),stop:M(d({deviceId:i()}),y(),{kind:`mutation`}),goToPoint:M(oJ.extend({deviceId:i()}),y(),{kind:`mutation`}),listActions:M(d({deviceId:i()}),w(iJ)),runAction:M(d({deviceId:i(),actionId:nJ}),y(),{kind:`mutation`}),playSound:M(d({deviceId:i(),soundId:i().int()}),y(),{kind:`mutation`}),setLightOn:M(d({deviceId:i(),on:T()}),y(),{kind:`mutation`}),setLightMode:M(d({deviceId:i(),mode:cJ,level:i().min(40).max(100).optional()}),y(),{kind:`mutation`}),setLightLevel:M(d({deviceId:i(),level:i().min(40).max(100)}),y(),{kind:`mutation`}),getFeatures:M(d({deviceId:i()}),sJ)},events:{onStatusChanged:{data:d({deviceId:i(),status:fJ})}},status:{schema:fJ,kind:`push`},runtimeState:pJ,durability:`session`,history:`none`},hJ=[`wifi`,`ethernet`,`cellular`,`unknown`],gJ=d({type:C(hJ),signalPercent:i().min(0).max(100).nullable().meta(A(`percentage`)),rssiDbm:i().optional().meta(A(`signal-level`)),ssid:l().optional(),lastUpdated:i().meta(A(`none`))}),_J={type:`unknown`,signalPercent:null,lastUpdated:0};function vJ(e,t){return e===void 0||!Number.isFinite(e)||t<=0||e<0||e>t?null:Math.round(e/t*100)}function yJ(e){return e===void 0||!Number.isFinite(e)||e>0?null:Math.round((Math.min(-50,Math.max(-100,e))+100)*2)}var bJ={name:`network-link`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[P.Camera,P.Sensor,P.Button,P.Switch,P.Light,P.Lock,P.Siren],methods:{},events:{onStatusChanged:{data:d({deviceId:i(),status:gJ})}},status:{schema:gJ,kind:`push`,empty:_J},runtimeState:gJ,durability:`restored`,history:{fields:{signalPercent:{kind:`gauge`,unit:`%`,deadband:3,minIntervalMs:6e4},rssiDbm:{kind:`gauge`,unit:`dBm`,deadband:2,minIntervalMs:6e4}}},volatileStateFields:[`lastUpdated`]},xJ=d({nominalBitrateKbps:i(),observedBitrateKbps:i(),peakBitrateKbps:i(),packetLossPercent:i(),lastUpdated:i()}),SJ=d({rttMs:i(),jitterMs:i(),estimatedBandwidthKbps:i(),packetLossPercent:i().min(0).max(100),downlinkMbps:i().optional(),downlinkAgeMs:i().optional(),lastUpdated:i()}),CJ=d({deviceId:i(),streams:x(l(),xJ),client:SJ.optional()}),wJ={name:`network-quality`,scope:`system`,mode:`singleton`,methods:{getDeviceStats:M(d({deviceId:i()}),CJ.nullable()),getAllStats:M(y(),w(CJ).readonly()),reportClientStats:M(d({deviceId:i(),rttMs:i().min(0).max(6e4),jitterMs:i().min(0).max(1e4),estimatedBandwidthKbps:i().min(0).max(1e6),packetLossPercent:i().min(0).max(100),downlinkMbps:i().min(0).max(1e5).optional(),downlinkAgeMs:i().min(0).max(864e5).optional()}),y(),{role:`viewer`,kind:`mutation`})},mount:{kind:`server-provided`}},TJ=d({addonId:l(),capabilities:w(l()).readonly(),status:l()}),EJ=d({pid:i(),name:l(),state:l(),cpuPercent:i(),memoryRss:i(),uptimeSeconds:i(),services:w(TJ).readonly(),groupId:l().optional()}),DJ=d({id:l(),status:l(),cpuPercent:i(),memoryRss:i()}),OJ=d({category:l(),total:i(),healthy:i(),addons:w(DJ).readonly()}),kJ=d({name:l(),version:l()}),AJ=d({id:l(),name:l(),hostname:l(),platform:l(),arch:l(),cpuModel:l().nullable(),cpuCores:i(),memoryMB:i(),engines:w(l()).readonly(),isHub:T(),isOnline:T(),cpuPercent:i(),memoryPercent:i(),uptime:i(),lastSeen:l(),localIps:w(l()).readonly(),addons:w(d({id:l(),capabilities:w(l()).readonly(),status:l()})).readonly(),processes:w(EJ).readonly(),categories:w(OJ).readonly(),rootPackage:kJ.nullable(),meshTransport:C([`tls`,`clear`]).optional(),capabilitiesRegistered:T().optional()}),jJ=d({callerAddonId:l(),providerAddonId:l(),capName:l(),callsPerMin:i(),lastCallAtMs:i()}),MJ=d({nodeId:l(),name:l(),version:l(),status:l(),synced:T()}),NJ=d({hubVersion:l(),nodes:w(MJ)}),PJ=d({nodeId:l(),addonId:l()}),FJ=d({id:l(),status:l(),version:l().optional(),packageName:l().optional()}),IJ=d({success:T()}),LJ=d({success:T(),reason:l().optional()}),RJ=d({restarted:w(l()).readonly(),failed:w(l()).readonly()}),zJ=d({nodeId:l(),name:l()}),BJ=d({id:l(),name:l(),isHub:T(),isOnline:T()}),VJ=d({nodes:w(BJ).readonly(),complete:T()}),HJ={name:`nodes`,scope:`system`,mode:`singleton`,nodeIdMode:`data`,methods:{topology:M(y(),w(AJ).readonly(),{auth:`admin`}),directory:M(y(),VJ,{auth:`admin`}),deployAddon:M(PJ,IJ,{kind:`mutation`,auth:`admin`}),undeployAddon:M(PJ,IJ,{kind:`mutation`,auth:`admin`}),restartAddon:M(PJ,IJ,{kind:`mutation`,auth:`admin`}),restartProcess:M(d({nodeId:l(),processName:l()}),LJ,{kind:`mutation`,auth:`admin`}),restartNode:M(d({nodeId:l()}),RJ,{kind:`mutation`,auth:`admin`}),shutdownNode:M(d({nodeId:l()}),IJ,{kind:`mutation`,auth:`admin`}),renameNode:M(d({nodeId:l(),name:l().min(1).max(64)}),zJ,{kind:`mutation`,auth:`admin`}),clusterAddonStatus:M(y(),x(l(),NJ),{auth:`admin`}),getCapUsageGraph:M(d({windowSeconds:i().int().positive().max(300).default(60)}),w(jJ).readonly(),{auth:`admin`}),getNodeAddons:M(d({nodeId:l()}),w(FJ).readonly(),{auth:`admin`}),setProcessLogLevel:M(d({nodeId:l(),level:l()}),IJ,{kind:`mutation`,auth:`admin`}),executeQuery:M(d({nodeId:l(),addonId:l(),queryName:l(),params:x(l(),o()).optional()}),o(),{kind:`mutation`,auth:`admin`})},mount:{kind:`server-provided`}},UJ=C([`min`,`low`,`normal`,`high`]),WJ=d({id:l().min(1),title:l().min(1),uri:s().optional(),destructive:T().optional()}),GJ=d({image:T(),priority:T(),data:T(),actions:T(),recipients:T()}),KJ=d({lastSentAt:i(),lastError:l().nullable(),queueDepth:i().int().nonnegative().meta(A(`count`)),supports:GJ}),qJ=d({deviceId:i().int().nonnegative(),title:l().optional(),body:l().min(1),image:l().optional(),priority:UJ.optional(),channel:l().optional(),recipients:w(l()).optional(),actions:w(WJ).optional(),data:x(l(),o()).optional()}),JJ=d({notificationId:l(),acceptedAt:i()}),YJ={name:`notifier`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[P.Notifier],methods:{send:M(qJ,JJ,{kind:`mutation`,auth:`admin`}),cancel:M(d({deviceId:i().int().nonnegative(),notificationId:l().min(1)}),y(),{kind:`mutation`,auth:`admin`})},events:{onSent:{data:d({deviceId:i(),notificationId:l(),success:T(),error:l().nullable(),acceptedAt:i()})}},status:{schema:KJ,kind:`command-driven`},runtimeState:KJ,durability:`session`,history:`none`},XJ=d({value:i().nullable().meta(A(`device`)),lastFetchedAt:i()}),ZJ={name:`numeric-sensor`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[P.Sensor],methods:{},status:{schema:XJ,kind:`push`},runtimeState:XJ,durability:`restored`,history:{fields:{value:{kind:`gauge`,minIntervalMs:3e4}}},volatileStateFields:[`lastFetchedAt`]},QJ=C([`text`,`timestamp`,`watermark`]),$J=C([`top-left`,`top-center`,`top-right`,`bottom-left`,`bottom-center`,`bottom-right`,`custom`]),eY=d({id:l(),kind:QJ,enabled:T(),text:l().optional(),position:$J.optional(),availablePositions:w($J).readonly(),readOnly:T().optional(),maxCharacters:i().int().positive().optional()}),tY=d({overlays:w(eY).readonly()}),nY=d({enabled:T().optional(),text:l().optional(),position:$J.optional()}).partial(),rY={name:`osd`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[P.Camera],methods:{setOverlay:M(d({deviceId:i(),overlayId:l(),patch:nY}),y(),{kind:`mutation`,auth:`admin`})},events:{onStatusChanged:{data:d({deviceId:i(),status:tY})}},status:{schema:tY,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}}}]}},iY=C([`value`,`unit`,`full`]),aY=C([`value+unit`,`value`,`unit`]),oY=d({containerId:i().int().optional(),deviceId:i().int()}),sY=d({alias:l().min(1).max(32).regex(/^[A-Za-z][A-Za-z0-9_-]*$/,`alias must start with a letter`),pick:oY,capName:l().min(1).max(64),valuePath:l().min(1).max(64),displayUnit:l().max(16).optional(),maxDecimals:i().int().min(0).max(4).default(1),valueMap:x(l(),l()).optional()}),cY=d({id:l().min(1).max(64),name:l().min(1).max(64),bindings:w(sY).max(32).default([]),parser:l().max(256).default(``)}),lY=m(`kind`,[d({kind:h(`none`)}),d({kind:h(`static`),text:l().max(64)}),d({kind:h(`clock`),pattern:l().min(1).max(32).default(`HH:mm`),timezone:l().min(1).max(64).optional()}),d({kind:h(`device-state`),deviceId:i().int().optional(),capName:l().min(1).max(64),valuePath:l().min(1).max(64),displayUnit:l().max(16).optional()}),d({kind:h(`latest-recognition`),recognition:C([`person`,`plate`])}),d({kind:h(`template`),templateId:l().min(1).max(64)})]),uY=d({enabled:T().default(!0),source:lY,template:l().max(96).default("${value}"),maxDecimals:i().int().min(0).max(4).default(1),valueMap:x(l(),l()).optional(),schedule:CM.optional(),conditions:GM.optional()}),dY=d({slotId:l(),kind:QJ,readOnly:T(),cameraEnabled:T(),cameraText:l().optional(),binding:uY.nullable()}),fY=C([`written`,`unchanged`,`gated`,`unreadable`,`disabled`,`unbound`,`failed`]),pY=d({slotId:l(),outcome:fY,text:l(),reason:l().optional()}),mY=C([`number`,`boolean`,`string`,`enum`]),hY=d({deviceId:i().int(),deviceName:l(),capName:l(),valuePath:l(),label:l(),valueType:mY,enumValues:w(l()).readonly().optional()}),gY={name:`osd-manager`,scope:`system`,mode:`singleton`,methods:{getDeviceOsd:M(d({deviceId:i().int()}),d({supported:T(),slots:w(dY)}),{auth:`admin`}),getSourceCatalog:M(d({deviceId:i().int()}),d({sources:w(hY)}),{auth:`admin`}),getConditionSupport:M(d({}),d({supported:w(l()),catalog:w(NN)}),{auth:`admin`}),setSlotBinding:M(d({deviceId:i().int(),slotId:l().min(1),binding:uY}),d({slot:dY,render:pY}),{kind:`mutation`,auth:`admin`}),clearSlotBinding:M(d({deviceId:i().int(),slotId:l().min(1)}),d({success:h(!0)}),{kind:`mutation`,auth:`admin`}),setSlotCameraEnabled:M(d({deviceId:i().int(),slotId:l().min(1),enabled:T()}),d({success:h(!0)}),{kind:`mutation`,auth:`admin`}),copyDeviceConfiguration:M(d({sourceDeviceId:i().int(),targetDeviceId:i().int()}),d({copied:i().int().nonnegative(),skipped:i().int().nonnegative()}),{kind:`mutation`,auth:`admin`}),previewSlot:M(d({deviceId:i().int(),slotId:l().min(1),binding:uY.optional()}),pY,{kind:`mutation`,auth:`admin`}),renderDevice:M(d({deviceId:i().int()}),d({results:w(pY)}),{kind:`mutation`,auth:`admin`}),listTemplates:M(d({}),d({templates:w(cY)}),{auth:`admin`}),upsertTemplate:M(d({template:cY}),d({template:cY}),{kind:`mutation`,auth:`admin`}),deleteTemplate:M(d({templateId:l().min(1).max(64)}),d({success:h(!0)}),{kind:`mutation`,auth:`admin`})}},_Y=4,vY=200,yY=C([`normal`,`offline`,`on_batteries`]),bY=i().int().min(4).max(200),xY=d({foodLevel:i().nullable().meta(A(`none`)),bowlFood:i().nullable().meta(A(`none`)),eating:T(),supportsMarkRefilled:T(),food1:i().nullable().meta(A(`none`)),food2:i().nullable().meta(A(`none`)),lowFood:T(),batteryPower:i().min(0).max(100).nullable().meta(A(`percentage`)),desiccantLeftDays:i().nullable().meta(A(`duration`)),feeding:T(),status:yY.nullable(),error:l().nullable(),errorCode:i().nullable().meta(A(`none`)),isDualHopper:T(),childLock:T(),indicatorLight:T(),feedSound:T(),volume:i().meta(A(`none`)),lastFetchedAt:i()}),SY={name:`pet-feeder`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[P.PetFeeder],methods:{feed:M(d({deviceId:i().int().nonnegative(),grams:bY.optional(),hopper1:bY.optional(),hopper2:bY.optional()}),y(),{kind:`mutation`,auth:`protected`}),cancelFeed:M(d({deviceId:i().int().nonnegative()}),y(),{kind:`mutation`,auth:`protected`}),resetDesiccant:M(d({deviceId:i().int().nonnegative()}),y(),{kind:`mutation`,auth:`protected`}),markFoodReplenished:M(d({deviceId:i().int().nonnegative()}),y(),{kind:`mutation`,auth:`protected`}),callPet:M(d({deviceId:i().int().nonnegative()}),y(),{kind:`mutation`,auth:`protected`}),playSound:M(d({deviceId:i().int().nonnegative(),soundId:i().int().nonnegative()}),y(),{kind:`mutation`,auth:`protected`}),setChildLock:M(d({deviceId:i().int().nonnegative(),on:T()}),y(),{kind:`mutation`,auth:`protected`}),setIndicatorLight:M(d({deviceId:i().int().nonnegative(),on:T()}),y(),{kind:`mutation`,auth:`protected`}),setFeedSound:M(d({deviceId:i().int().nonnegative(),on:T()}),y(),{kind:`mutation`,auth:`protected`}),setVolume:M(d({deviceId:i().int().nonnegative(),level:i().int().nonnegative()}),y(),{kind:`mutation`,auth:`protected`})},status:{schema:xY,kind:`poll`},runtimeState:xY,durability:`session`,history:{fields:{foodLevel:{kind:`gauge`},bowlFood:{kind:`gauge`},food1:{kind:`gauge`},food2:{kind:`gauge`},batteryPower:{kind:`gauge`,unit:`%`,deadband:2},desiccantLeftDays:{kind:`gauge`,unit:`s`}}}},CY=d({id:l(),name:l(),sampleCount:i().int().nonnegative(),coverMediaId:i().int().optional(),coverBase64:l().optional()}),wY=d({id:l(),text:l(),score:i(),addedAt:i().int(),deviceId:i().int().optional(),base64:l().optional()}),TY=d({plateId:l(),deviceId:i().int(),trackId:l(),timestamp:i().int(),text:l(),score:i(),corrected:T(),recognizedVehicleId:l().optional(),vehicleName:l().optional(),assigned:T(),plateBbox:Pv.optional(),keyFrameMediaId:i().int().optional(),base64:l().optional(),cropUrl:l().optional()}),EY=d({mediaId:i().int(),kind:l(),url:l(),sizeBytes:i(),timestamp:i()}),DY=d({plateIds:w(l()).readonly(),representativePlateId:l(),representativeText:l(),size:i().int(),cohesion:i()}),OY={name:`plate-gallery`,role:{feature:`plate-assignment`},scope:`system`,mode:`singleton`,methods:{listPlates:M(d({deviceId:i().int().optional(),limit:i().int().positive().optional(),includeCrops:T().optional()}).optional(),w(TY).readonly()),getPlateByTrack:M(d({deviceId:i().int(),trackId:l()}),TY.nullable(),{role:`viewer`}),getPlateMedia:M(d({plateId:l()}),w(EY).readonly()),searchPlates:M(d({text:l().min(1),maxDistance:i().int().min(0).optional(),limit:i().int().positive().optional(),includeCrops:T().optional()}),w(TY).readonly()),suggestPlateClusters:M(d({maxDistance:i().int().min(0).optional(),minClusterSize:i().int().min(2).optional(),limit:i().int().positive().optional()}).optional(),w(DY).readonly()),correctPlateText:M(d({plateId:l(),text:l().min(1)}),y(),{kind:`mutation`,auth:`admin`}),deletePlate:M(d({plateId:l()}),y(),{kind:`mutation`,auth:`admin`}),listVehicles:M(d({includeCrops:T().optional()}).optional(),w(CY).readonly()),createVehicle:M(d({name:l().min(1)}),CY,{kind:`mutation`,auth:`admin`}),renameVehicle:M(d({id:l(),name:l().min(1)}),y(),{kind:`mutation`,auth:`admin`}),deleteVehicle:M(d({id:l()}),y(),{kind:`mutation`,auth:`admin`}),listVehicleSamples:M(d({vehicleId:l()}),w(wY).readonly()),removeVehicleSample:M(d({vehicleId:l(),sampleId:l()}),y(),{kind:`mutation`,auth:`admin`}),assignPlate:M(d({plateId:l(),vehicleId:l()}),y(),{kind:`mutation`,auth:`admin`}),unassignPlate:M(d({plateId:l()}),y(),{kind:`mutation`,auth:`admin`}),assignPlates:M(d({plateIds:w(l()).min(1),vehicleId:l()}),d({assigned:i().int(),failed:w(l()).readonly()}),{kind:`mutation`,auth:`admin`}),unassignPlates:M(d({plateIds:w(l()).min(1)}),d({unassigned:i().int(),failed:w(l()).readonly()}),{kind:`mutation`,auth:`admin`})}},kY={"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}},coral:{"yolov9s-320-edgetpu":{p50Ms:32,fps:31,measured:!1}}},"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:50,fps:20,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:81,fps:12,measured:!0},"yolov9m-320":{p50Ms:63.5,fps:16,measured:!0},"yolov9m-320-int8":{p50Ms:66,fps:15,measured:!0},"yolov9m-640":{p50Ms:215.5,fps:5,measured:!0},"yolov9m-640-int8":{p50Ms:163,fps:6,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}},coral:{"yolov9s-320-edgetpu":{p50Ms:32,fps:31,measured:!1}}},"amd-phoenix":{"x86-cpu":{"yolov9t-320":{p50Ms:24,fps:42,measured:!0},"yolov9t-320-int8":{p50Ms:12,fps:83,measured:!0},"yolov9t-640":{p50Ms:50,fps:20,measured:!0},"yolov9t-640-int8":{p50Ms:20,fps:50,measured:!0},"yolov9s-320":{p50Ms:30,fps:33,measured:!0},"yolov9s-320-int8":{p50Ms:15,fps:67,measured:!0},"yolov9s-640":{p50Ms:92,fps:11,measured:!0},"yolov9s-640-int8":{p50Ms:27,fps:37,measured:!0},"yolov9m-320":{p50Ms:67,fps:15,measured:!0},"yolov9m-320-int8":{p50Ms:21,fps:48,measured:!0},"yolov9m-640":{p50Ms:229,fps:4,measured:!0},"yolov9m-640-int8":{p50Ms:48,fps:21,measured:!0}},"amd-igpu":{"yolov9t-320":{p50Ms:40,fps:25,measured:!0},"yolov9t-640":{p50Ms:89,fps:11,measured:!0},"yolov9s-320":{p50Ms:65,fps:15,measured:!0},"yolov9s-640":{p50Ms:125,fps:8,measured:!0},"yolov9m-320":{p50Ms:85,fps:12,measured:!0},"yolov9m-640":{p50Ms:228,fps:4,measured:!0}},coral:{"yolov9s-320-edgetpu":{p50Ms:32,fps:31,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}},coral:{"yolov9s-320-edgetpu":{p50Ms:32,fps:31,measured:!1}}},"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}},coral:{"yolov9s-320-edgetpu":{p50Ms:32,fps:31,measured:!1}}}},AY={"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}},jY=.5,MY=2,NY=.05,PY=24,FY=750,IY=64,LY=2e3,RY=12,zY=i().nullable().transform(e=>e!==null&&Number.isFinite(e)&&e>0?e:null),BY=l().nullable().transform(e=>e!==null&&e.trim()!==``?e:null),VY=d({int8:zY,fp16:zY}),HY=d({deviceKey:l(),fullDeviceName:BY,executionUnits:zY,clockMHz:zY,gops:VY.nullable(),architecture:BY,npuName:BY,tops:zY,vendor:BY,webgpuArchitecture:BY,webgpuDevice:BY,computeUnits:zY}),UY=d({accelerators:w(HY).nullable()}),WY=[{hardwareClass:`intel-n-series`,accelerator:`intel-igpu`,score:{metric:`eu-mhz`,value:24*750}},{hardwareClass:`intel-core-ultra`,accelerator:`intel-igpu`,score:{metric:`eu-mhz`,value:64*LY}},{hardwareClass:`amd-phoenix`,accelerator:`amd-igpu`,score:{metric:`cu`,value:12}}];function GY(e){let t=UY.safeParse(e);return!t.success||t.data.accelerators===null?null:t.data.accelerators}function KY(e){return e!==null&&e>0?e:null}function qY(e){let t=[],n=KY(e.gops?.int8??null);n!==null&&t.push({metric:`gops-int8`,value:n});let r=KY(e.gops?.fp16??null);r!==null&&t.push({metric:`gops-fp16`,value:r});let i=KY(e.executionUnits),a=KY(e.clockMHz);i!==null&&a!==null&&t.push({metric:`eu-mhz`,value:i*a});let o=KY(e.computeUnits);o!==null&&t.push({metric:`cu`,value:o});let s=KY(e.tops);return s!==null&&t.push({metric:`tops`,value:s}),t}function JY(e,t,n){let r=n.filter(n=>n.accelerator===e&&n.score.metric===t.metric&&n.score.value>0),i=r[0];return i===void 0?null:r.reduce((e,n)=>Math.abs(Math.log(t.value/n.score.value))<Math.abs(Math.log(t.value/e.score.value))?n:e,i)}function YY(e,t,n){for(let r of qY(e))if(JY(t,r,n)!==null)return r;return null}function XY(e,t,n=WY){return YY(e,t,n)!==null}function ZY(e,t,n){if(t!==`unknown`)return e[t]?.[n]}function QY(e){return Math.round(e*10)/10}function $Y(e){return Math.min(2,Math.max(jY,e))}function eX(e,t,n){let r={};for(let[i,a]of Object.entries(e))r[i]={p50Ms:QY(a.p50Ms/t),fps:Math.max(1,Math.round(a.fps*t)),measured:!1,estimatedFrom:n};return r}function tX(e){let t=e.perf??kY,n=e.references??WY,r=ZY(t,e.hardwareClass,e.accelerator);if(r!==void 0&&e.hardwareClass!==`intel-n-series`)return{column:r,estimatedFrom:null};let i=e.report===null?null:YY(e.report,e.accelerator,n);if(i===null)return r===void 0?null:{column:r,estimatedFrom:null};let a=JY(e.accelerator,i,n),o=a===null?void 0:ZY(t,a.hardwareClass,e.accelerator);if(a===null||o===void 0)return r===void 0?null:{column:r,estimatedFrom:null};let s=i.value/a.score.value;return e.hardwareClass===a.hardwareClass&&Math.abs(s-1)<=.05?{column:o,estimatedFrom:null}:{column:eX(o,$Y(s),a.hardwareClass),estimatedFrom:a.hardwareClass}}var nX=C(ia),rX=C([`videotoolbox`,`cuda`,`nvdec`,`vaapi`,`qsv`,`d3d11va`,`dxva2`,`amf`,`vdpau`,`drm`,`coreml`,`tensorrt`,`openvino`,`directml`,`webgpu`,`none`]).nullable().optional(),iX=d({preferred:w(l()).readonly(),rationale:l()}),aX=C([`h264_videotoolbox`,`hevc_videotoolbox`,`h264_vaapi`,`hevc_vaapi`,`h264_nvenc`,`hevc_nvenc`,`h264_qsv`,`hevc_qsv`,`h264_amf`,`hevc_amf`,`libx264`,`libx265`]);d({encoders:w(d({encoder:aX,codec:C([`H264`,`H265`]),family:C([`videotoolbox`,`vaapi`,`nvenc`,`qsv`,`amf`,`software`]),available:T(),reason:l().optional()})).readonly(),defaultH264:aX,defaultH265:aX,probedAt:i()}),d({methods:w(l()).readonly(),probedAt:i()});var oX=C([`darwin`,`linux`,`win32`]),sX=C([`arm64`,`x64`]),cX=d({type:C([`nvidia`,`amd`,`intel`,`apple`]),name:l(),memoryMB:i().optional()}),lX=d({type:C([`apple-ane`,`intel-npu`,`amd-xdna`]),name:l().optional(),generation:C([`xdna1`,`xdna2`]).optional()}),uX=C([`usb`,`pci`]),dX=d({type:h(`coral-edgetpu`),bus:l().optional(),count:i().int().nonnegative().optional(),units:w(d({bus:uX,count:i().int().nonnegative()})).readonly().optional(),unavailable:w(d({bus:uX,count:i().int().nonnegative(),reason:C([`driver-missing`,`device-not-accessible`])})).readonly().optional()}),fX=d({platform:oX,arch:sX,cpuModel:l(),cpuCores:i(),totalRAM_MB:i(),availableRAM_MB:i(),gpu:cX.nullable(),npu:lX.nullable(),coral:dX.nullable().optional(),accelerators:w(HY).readonly().optional()}),pX=d({runtime:h(`python`),backend:l(),format:C([`onnx`,`coreml`,`openvino`,`tflite`]),score:i(),reason:l(),available:T()}),mX=d({key:l(),backend:l(),device:l(),format:nX,runtime:h(`python`),score:i(),available:T()}),hX=d({hardware:fX,scores:w(pX).readonly(),bestScore:pX,pythonPath:l().nullable(),devices:w(mX).readonly()}),gX=d({modelId:l(),name:l(),minRAM_MB:i(),accuracyScore:i(),formats:w(l()).readonly()}),_X=d({modelId:l(),runtime:h(`python`),backend:l(),format:nX,reason:l()}),vX=d({devices:w(mX).readonly(),appeared:w(l()).readonly(),disappeared:w(l()).readonly(),usbBus:C([`observed`,`unobservable`]),decidedBy:C([`usb-ids`,`pci`,`delegate-fallback`,`none`])}),yX={name:`platform-probe`,scope:`system`,mode:`singleton`,methods:{getCapabilities:M(y(),hX),getHardware:M(y(),fX),resolveInferenceConfig:M(d({requirements:w(gX).readonly()}),_X),resolveHwAccel:M(d({prefer:rX}),iX),rescanAccelerators:M(y(),vX,{kind:`mutation`,auth:`admin`})}},bX=d({watts:i().optional().meta(A(`power`,{label:`Power`})),kwhTotal:i().optional().meta(A(`energy`,{label:`Energy`})),volts:i().optional().meta(A(`voltage`,{label:`Voltage`})),amps:i().optional().meta(A(`current`,{label:`Current`})),va:i().optional().meta(A(`apparent-power`)),powerFactor:i().min(0).max(1).optional().meta(A(`ratio`)),lastFetchedAt:i()}),xX=[P.Sensor,P.Switch,P.Light,P.Fan,P.Climate,P.Thermostat,P.Humidifier,P.WaterHeater,P.MediaPlayer,P.Washer,P.Dryer,P.Dishwasher,P.Vacuum,P.LawnMower,P.PetFeeder],SX=xX.filter(e=>e!==P.Sensor);function CX(e,t){return{id:e,cardinality:`scalar`,vocabulary:{cap:`power-meter`,stateField:e},deviceTypes:SX,apply:`add`,path:e,sources:[{kind:`numeric`,requiredUnit:t,transforms:[{kind:`identity`}]}],companions:[{kind:`clock`,path:`lastFetchedAt`,when:`always`}],sourceReport:{status:`assignment-status`},advancedExpression:!0}}var wX={version:1,targets:[CX(`watts`,`W`),CX(`kwhTotal`,`kWh`),CX(`volts`,`V`),CX(`amps`,`A`)]},TX={name:`power-meter`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:xX,methods:{},status:{schema:bX,kind:`push`},runtimeState:bX,durability:`restored`,history:{fields:{watts:{kind:`gauge`,unit:`W`,deadband:1,minIntervalMs:3e4},kwhTotal:{kind:`counter`,unit:`kWh`,deadband:.01,minIntervalMs:6e4},volts:{kind:`gauge`,unit:`V`,deadband:1,minIntervalMs:3e4},amps:{kind:`gauge`,unit:`A`,deadband:.05,minIntervalMs:3e4},va:{kind:`gauge`,unit:`VA`,deadband:1,minIntervalMs:3e4},powerFactor:{kind:`gauge`,unit:`ratio`,deadband:.01,minIntervalMs:6e4}}},volatileStateFields:[`lastFetchedAt`],customize:wX},EX=d({latitude:i().min(-90).max(90).meta(A(`angle`)),longitude:i().min(-180).max(180).meta(A(`angle`)),accuracyMeters:i().nonnegative().meta(A(`length`))}),DX=d({state:l(),location:l().nullable(),gps:EX.nullable(),batteryPercent:i().min(0).max(100).nullable().meta(A(`percentage`)),lastChangedAt:i()}),OX={name:`presence`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[P.Presence],methods:{},status:{schema:DX,kind:`push`},runtimeState:DX,durability:`restored`,history:{fields:{batteryPercent:{kind:`gauge`,unit:`%`,deadband:1}}},volatileStateFields:[`lastChangedAt`]},kX=d({hpa:i().nullable().meta(A(`pressure`,{precision:0})),lastFetchedAt:i()}),AX={name:`pressure-sensor`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[P.Sensor],methods:{},status:{schema:kX,kind:`push`},runtimeState:kX,durability:`restored`,history:{fields:{hpa:{kind:`gauge`,unit:`hPa`,deadband:.1}}},volatileStateFields:[`lastFetchedAt`]},jX=m(`kind`,[cM,lM]),MX=d({id:i(),enabled:T(),shape:jX}),NX=d({enabled:T(),regions:w(MX).nullable(),audioEnabled:T().nullable(),lastFetchedAt:i()}),PX=d({maxRegions:i(),supportedShapes:w(fM),polygonVertices:pM.optional(),supportsAudioMute:T()}),FX=d({enabled:T().optional(),regions:w(MX).optional()}),IX={name:`privacy-mask`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[P.Camera],deviceConfig:{ui:{kind:`widget`,widgetId:`host/privacy-mask-grid`,tab:`image`,label:`Privacy Mask`}},methods:{getOptions:M(d({deviceId:i()}),PX),setMask:M(d({deviceId:i(),patch:FX}),y(),{kind:`mutation`,auth:`admin`}),setAudioEnabled:M(d({deviceId:i(),enabled:T()}),y(),{kind:`mutation`,auth:`admin`})},status:{schema:NX,kind:`poll`},runtimeState:NX,durability:`restored`,history:`none`,volatileStateFields:[`lastFetchedAt`]};function LX(e){return e.length===0?null:e.some(e=>e.audioEnabled)}var RX=C([`home`,`day-mode`,`night-mode`,`day-night-auto`,`set-limits`,`save-limits`,`reboot`,`osd-menu`]),zX=d({id:l(),name:l(),fn:RX.nullable(),writable:T()}),BX=d({pan:i().nullable(),tilt:i().nullable(),zoom:i().nullable()}),VX=d({pan:i().optional(),tilt:i().optional(),zoom:i().optional(),speed:i().optional()}),HX=BX.extend({autofocus:T()}),UX=d({hasPan:T(),hasTilt:T(),hasZoom:T(),supportsPresets:T(),maxPresets:i().optional(),hasAutofocus:T(),speedSteps:i().int().positive().nullable(),moveImpulseMs:i().int().positive().nullable()}),WX=d({presetId:l().nullable(),source:C([`operator`,`firmware`,`native`,`none`])}),GX=d({enabled:T(),seconds:i().int()}),KX={name:`ptz`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[P.Camera],deviceConfig:{ui:{kind:`widget`,widgetId:`host/ptz-panel`,tab:`ptz`,topTab:!0,label:`PTZ`,order:0}},methods:{move:M(VX.extend({deviceId:i()}),y(),{kind:`mutation`}),continuousMove:M(VX.extend({deviceId:i()}),y(),{kind:`mutation`}),stop:M(d({deviceId:i()}),y(),{kind:`mutation`}),getPresets:M(d({deviceId:i()}),w(zX)),goToPreset:M(d({deviceId:i(),presetId:l()}),y(),{kind:`mutation`}),savePreset:M(d({deviceId:i(),presetId:l(),name:l()}),y(),{kind:`mutation`,auth:`admin`}),deletePreset:M(d({deviceId:i(),presetId:l()}),y(),{kind:`mutation`,auth:`admin`}),getOptions:M(d({deviceId:i()}),UX),goHome:M(d({deviceId:i()}),y(),{kind:`mutation`}),getHomePreset:M(d({deviceId:i()}),WX),setHomePreset:M(d({deviceId:i(),presetId:l().nullable()}),y(),{kind:`mutation`,auth:`admin`}),captureHomeHere:M(d({deviceId:i()}),y(),{kind:`mutation`,auth:`admin`}),getHomeReturn:M(d({deviceId:i()}),GX.nullable()),setHomeReturn:M(d({deviceId:i(),enabled:T(),seconds:i().int().min(0).max(3600)}),y(),{kind:`mutation`,auth:`admin`}),getPosition:M(d({deviceId:i()}),BX),setAutofocus:M(d({deviceId:i(),enabled:T()}),y(),{kind:`mutation`})},status:{schema:HX,kind:`command-driven`}},qX=d({targetType:l().describe(`Vendor target string (people/vehicle/pet); empty = camera default`),stopDelaySeconds:i().int().min(0).max(300).meta(A(`duration`)),disappearDelaySeconds:i().int().min(0).max(300).meta(A(`duration`))}),JX=d({value:l(),label:l()}),YX=d({enabled:T(),lastChangedAt:i(),currentSettings:qX.nullable(),supportedTargetTypes:w(JX)}),XX=YX.extend({lastFetchedAt:i()}),ZX={name:`ptz-autotrack`,scope:`device`,deviceNative:!0,mode:`singleton`,kind:`wrapper`,defaultActive:!1,deviceTypes:[P.Camera],deviceConfig:{ui:{kind:`widget`,widgetId:`host/ptz-autotrack`,tab:`ptz`,topTab:!0,label:`Auto-Tracking`,order:5}},methods:{getStatus:M(d({deviceId:i()}),YX),setEnabled:M(d({deviceId:i(),enabled:T()}),y(),{kind:`mutation`}),getSettings:M(d({deviceId:i()}),qX.nullable()),setSettings:M(d({deviceId:i(),settings:qX.partial()}),y(),{role:`admin`,kind:`mutation`})},events:{onStatusChanged:{data:d({deviceId:i(),status:YX})}},status:{schema:YX,kind:`command-driven`},runtimeState:XX,durability:`session`,history:`none`},QX=5,$X=3e4,eZ=18e4,tZ={running:null,since:null,source:`native`,phase:null,lastFetchedAt:null},nZ=C([`native`,`assigned`]),rZ=d({running:T().nullable(),since:i().nullable().meta(A(`none`)),source:nZ.meta({label:`Source`}),phase:l().nullable(),lastFetchedAt:i().nullable()}),iZ=d({deviceId:i(),since:i().nullable(),phase:l().nullable()}),aZ=Object.values(P),oZ={version:1,targets:[{id:`running`,cardinality:`scalar`,vocabulary:{cap:`running-state`,stateField:`running`},deviceTypes:[P.Washer,P.Dryer,P.Dishwasher,P.Vacuum,P.LawnMower,P.MediaPlayer,P.WaterHeater,P.Humidifier,P.Fan,P.Climate,P.Thermostat,P.PetFeeder],apply:`add`,path:`running`,sources:[{kind:`switch`,transforms:[{kind:`identity`}]},{kind:`binary`,transforms:[{kind:`identity`},{kind:`invert`}]},{kind:`numeric`,requiredUnit:`W`,transforms:[{kind:`threshold`,comparisons:[`gte`,`lte`],comparison:`gte`,defaultThreshold:5,defaultStartDwellMs:$X,defaultStopDwellMs:eZ,thresholdUnit:`W`}]}],companions:[{kind:`constant`,path:`source`,value:`assigned`,when:`always`},{kind:`constant`,path:`phase`,value:null,when:`always`},{kind:`clock`,path:`lastFetchedAt`,when:`always`},{kind:`transition-time`,path:`since`,sourceChangedAt:`prefer`}],sourceReport:{status:`assignment-status`,runtimeField:`source`,nativeValue:`native`,assignedValue:`assigned`},advancedExpression:!0}]},sZ={name:`running-state`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:aZ,methods:{},events:{onStarted:{data:iZ},onFinished:{data:iZ}},status:{schema:rZ,kind:`push`},runtimeState:rZ,durability:`restored`,history:{fields:{running:{kind:`boolean`}}},volatileStateFields:[`lastFetchedAt`],customize:oZ},cZ={name:`reboot`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[P.Camera,P.Sensor,P.Switch],methods:{reboot:M(d({deviceId:i().int().nonnegative()}),d({success:h(!0)}),{kind:`mutation`,auth:`admin`})}},lZ=`camstack`,uZ=`recorder`,dZ=d({profile:l(),startMs:i(),endMs:i()}),fZ=C([`read`,`unreadable`]),pZ=d({deviceId:i(),read:fZ,ranges:w(dZ),profilesWithFootage:w(l())}),mZ=d({deviceId:i(),read:fZ,days:w(i())}),hZ=d({deviceId:i(),localMasterPath:l().nullable(),playbackUrl:l().nullable(),playbackEndpoints:w(l())}),gZ=d({state:C([`ok`,`sleeping`,`unreachable`,`no-storage`,`index-empty`]),reason:l().optional(),coverageAsOf:i().optional()}),_Z=d({source:l(),label:l(),addonId:l().optional(),availability:gZ}),vZ=d({transport:C([`archive`,`stream`,`realtime`]),coverage:C([`continuous`,`sparse`]),seek:C([`free`,`forward`,`segment`]),stepBack:T(),scrub:T(),rates:w(i().positive()).min(1).readonly(),exclusive:T()}),yZ=m(`kind`,[d({kind:h(`hls`),manifest:hZ}),d({kind:h(`clip`),source:l(),clipId:l(),startsAtMs:i()}),d({kind:h(`none`),reason:l()})]),bZ={name:`recording`,scope:`device`,mode:`collection`,kind:`wrapper`,defaultActive:!0,deviceTypes:[P.Camera],methods:{listSources:M(d({deviceId:i()}),w(_Z).readonly(),{kind:`query`,auth:`protected`}),getAvailability:M(d({deviceId:i(),provider:l().min(1),fromMs:i(),toMs:i(),profile:l().optional()}),pZ,{kind:`query`,auth:`protected`}),getDaysWithRecordings:M(d({deviceId:i(),provider:l().min(1),fromMs:i(),toMs:i(),tzOffsetMinutes:i()}),mZ,{kind:`query`,auth:`protected`}),getPlayback:M(d({deviceId:i(),provider:l().min(1),fromMs:i(),toMs:i(),profile:j.optional()}),yZ,{kind:`query`,auth:`protected`}),getPlaybackOptions:M(d({deviceId:i(),provider:l().min(1)}),vZ,{kind:`query`,auth:`protected`})}},xZ=d({deviceId:i(),enabled:T(),activeMode:pf,nodeId:l(),storageBytes:i()}),SZ=200,CZ=d({deviceId:i(),read:C([`read`,`unreadable`]),ranges:w(dZ).readonly(),profilesWithFootage:w(l()).readonly()}),wZ=d({deviceId:i(),read:C([`read`,`unreadable`]),days:w(i()).readonly()}),TZ=d({deviceId:i(),usedBytes:i(),oldestMs:i().nullable().optional(),segments:i().optional(),residentBytes:i().optional(),residentOldestMs:i().nullable().optional()}),EZ=d({locationId:l().nullable(),locationIds:w(l()).optional(),root:l().optional(),usedBytes:i(),availableBytes:i().nullable(),totalBytes:i().nullable()}),DZ=d({nodeId:l(),totalUsedBytes:i(),devices:w(TZ),devicesRead:C([`archive`,`unavailable`]).optional(),complete:T().optional(),locations:w(EZ).optional()}),OZ=d({deviceId:i(),profile:l(),fromLocationId:l(),toLocationId:l(),bytes:i(),files:i().int()}),kZ=C([`unassigned`,`target-not-writable`,`below-threshold`,`no-headroom`]),AZ=d({deviceId:i(),profile:l(),fromLocationId:l(),toLocationId:l().nullable(),bytes:i(),reason:kZ}),jZ=d({moves:w(OZ),skipped:w(AZ),bytesToMove:i(),jobIds:w(l())}),MZ=d({throttleMbps:i().min(1).max(1e3).optional(),minMoveGb:i().min(0).optional()}),NZ=d({deviceId:i().int(),profile:l(),locationId:l()}),PZ=d({deviceId:i().int(),locationId:l()}),FZ=d({assignments:w(NZ),pins:w(PZ),defaultLocations:x(l(),l())}),IZ=d({deviceId:i().int(),locationId:l().nullable()}),LZ=m(`kind`,[d({kind:h(`segment`),startMs:i(),durMs:i(),bytes:i()}),d({kind:h(`gap`),nearestEdgeMs:i().nullable(),prevEndMs:i().nullable().optional()})]),RZ=d({data:S(Uint8Array)}),zZ=d({data:S(Uint8Array),gopStartMs:i(),gopDurMs:i()}),BZ=m(`kind`,[d({kind:h(`ok`),data:S(Uint8Array),gopStartMs:i(),gopDurMs:i(),reachesRequestedEnd:T()}),d({kind:h(`spans-multiple-segments`),segmentEndMs:i()})]),VZ={name:`recording-archive`,scope:`system`,mode:`singleton`,exposesDeviceSettings:!0,status:{schema:xZ,kind:`command-driven`},methods:{getAvailabilityBatch:M(d({deviceIds:w(i()).min(1).max(200),fromMs:i(),toMs:i()}),w(CZ).readonly(),{role:`viewer`,kind:`query`,auth:`protected`}),getDaysWithRecordingsBatch:M(d({deviceIds:w(i()).min(1).max(200),fromMs:i(),toMs:i(),tzOffsetMinutes:i()}),w(wZ).readonly(),{role:`viewer`,kind:`query`,auth:`protected`}),getStorageUsage:M(d({}),DZ,{kind:`query`,auth:`admin`}),getDeviceConfig:M(d({deviceId:i()}),Df,{role:`viewer`,kind:`query`,auth:`protected`}),locateSegment:M(d({deviceId:i(),profile:l(),epochMs:i()}),LZ,{kind:`query`,auth:`admin`}),readSegmentBytes:M(d({deviceId:i(),profile:l(),startMs:i()}),RZ,{kind:`query`,auth:`admin`}),readGopBytes:M(d({deviceId:i(),profile:l(),startMs:i(),epochMs:i()}),zZ,{kind:`query`,auth:`admin`}),readWindowBytes:M(d({deviceId:i(),profile:l(),startMs:i(),fromMs:i(),toMs:i()}),BZ,{kind:`query`,auth:`admin`}),setDeviceConfig:M(d({deviceId:i(),config:Df}),Df,{kind:`mutation`,auth:`admin`}),rescanStorage:M(d({deviceId:i()}),xZ,{kind:`mutation`,auth:`admin`}),pruneFootage:M(d({deviceId:i(),reason:$d.optional()}),d({floorMs:i().nullable(),deletedBuckets:i().int(),reclaimedBytes:i().int()}),{kind:`mutation`,auth:`admin`}),deleteFootprint:M(d({deviceId:i(),fromMs:i().optional(),toMs:i().optional()}),d({deletedBuckets:i().int(),reclaimedBytes:i().int()}),{kind:`mutation`,auth:`admin`}),listOpsLog:M(tf,w(ef).readonly(),{kind:`query`,auth:`admin`}),renderGif:M(d({deviceId:i(),aroundMs:i(),preRollSec:i().min(0).max(30).default(2),postRollSec:i().min(0).max(30).default(5),maxWidth:i().int().min(120).max(1280).default(480),fps:i().int().min(1).max(15).default(5)}),d({gifBase64:l(),fromMs:i(),toMs:i()}),{kind:`mutation`,auth:`admin`}),renderClip:M(d({deviceId:i(),aroundMs:i(),preRollSec:i().min(0).max(30).default(3),postRollSec:i().min(0).max(30).default(7),maxWidth:i().int().min(160).max(1920).default(640)}),d({clipBase64:l(),mime:l(),fromMs:i(),toMs:i(),bytes:i().int()}),{kind:`mutation`,auth:`admin`}),pauseForStorageMigration:M(Vf,d({paused:h(!0)}),{kind:`mutation`,auth:`admin`}),resumeForStorageMigration:M(Vf,d({resumed:h(!0)}),{kind:`mutation`,auth:`admin`}),refreshStorageLocationsForMigration:M(Vf,d({refreshed:h(!0)}),{kind:`mutation`,auth:`admin`}),startStorageMigrationMove:M(Hf,d({jobId:l()}),{kind:`mutation`,auth:`admin`}),getStorageMigrationMoveStatus:M(d({jobId:l()}),Rf.nullable(),{auth:`admin`}),cancelStorageMigrationMove:M(d({jobId:l()}),d({cancelled:T()}),{kind:`mutation`,auth:`admin`}),relocateFootage:M(Bf,d({jobId:l()}),{kind:`mutation`,auth:`admin`}),listRelocateJobs:M(d({}),w(Rf).readonly(),{kind:`query`,auth:`admin`}),getRelocateResidue:M(dp,fp,{kind:`query`,auth:`admin`}),reconcileLedgerAgainstDisk:M(pp,vp,{kind:`mutation`,auth:`admin`}),cancelRelocateJob:M(d({jobId:l()}),d({cancelled:T()}),{kind:`mutation`,auth:`admin`}),planStorageRebalance:M(MZ,jZ,{kind:`query`,auth:`admin`}),startStorageRebalance:M(MZ,jZ,{kind:`mutation`,auth:`admin`}),getPlacement:M(d({}),FZ,{kind:`query`,auth:`admin`}),setDevicePlacement:M(IZ,d({ok:h(!0)}),{kind:`mutation`,auth:`admin`})}},HZ=i().min(.25).max(32),UZ=d({fromSec:i().nonnegative(),toSec:i().nonnegative()}).refine(e=>e.toSec>e.fromSec,{message:`dense range must have toSec > fromSec`}),WZ=200,GZ=d({everyMs:i().int().positive(),ranges:w(UZ).min(1).max(200)}),KZ=d({everyMs:i().int().positive(),outputFps:i().int().min(1).max(60).optional(),dense:GZ.optional()}).superRefine((e,t)=>{e.dense!==void 0&&e.dense.everyMs>=e.everyMs&&t.addIssue({code:oe.custom,message:`dense.everyMs must be strictly smaller than the base everyMs`,path:[`dense`,`everyMs`]})}),qZ=d({speed:HZ.optional(),timelapse:KZ.optional(),includeAudio:T(),maxLifeMs:i().int().positive(),deleteAfterDownload:T(),title:l().max(200).optional(),notifyTargetIds:w(l().min(1)).max(20).optional()}).superRefine((e,t)=>{e.speed!==void 0&&e.timelapse!==void 0&&t.addIssue({code:oe.custom,message:`speed and timelapse are mutually exclusive`,path:[`timelapse`]})}),JZ=C([`queued`,`rendering`,`ready`,`failed`,`expired`,`deleted`]),YZ=d({kind:h(`footage`),deviceId:i(),profiles:w(l()).min(1),fromMs:i(),toMs:i()}),XZ=d({kind:h(`clip`),deviceId:i(),provider:l().min(1),source:l().min(1),sourceLabel:l().min(1),clipId:l().min(1),catalogWindow:d({sinceMs:i(),untilMs:i()}),profile:C([`high`,`mid`,`low`]),wake:RH.optional()}),ZZ=m(`kind`,[YZ,XZ]),QZ=d({id:l(),deviceId:i(),profile:l(),fromMs:i(),toMs:i(),subject:ZZ.optional(),options:qZ,state:JZ,progressPct:i().nullable(),fileBytes:i().nullable(),expiresAt:i(),deleteAfterDownload:T(),downloadedAt:i().nullable(),createdAt:i(),createdBy:l(),error:l().nullable()}),$Z=C([`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 eQ(e,t){return t.length>0?`${e}: ${t}`:e}function tQ(e){if(e===null)return null;let t=e.split(`:`,1)[0]??``,n=$Z.safeParse(t.trim());return n.success?n.data:null}var nQ=d({url:l(),endpoints:w(l())}),rQ=50*1024*1024,iQ=d({base64:l(),contentType:l(),name:l(),bytes:i().int().nonnegative()});function aQ(e){return e.profiles!==void 0&&e.profiles.length>0?[...e.profiles]:typeof e.profile==`string`&&e.profile.length>0?[e.profile]:[]}var oQ=d({deviceId:i(),profile:l().optional(),profiles:w(l()).min(1).optional(),fromMs:i().optional(),toMs:i().optional(),subject:ZZ.optional(),options:qZ}).superRefine((e,t)=>{if(e.subject?.kind===`clip`){e.subject.deviceId!==e.deviceId&&t.addIssue({code:oe.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:oe.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:oe.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:oe.custom,message:`a footage export needs fromMs and toMs`,path:[`fromMs`]}),(e.subject?.kind===`footage`?[...e.subject.profiles]:aQ(e)).length<1&&t.addIssue({code:oe.custom,message:`pass profiles[] (min 1) or legacy profile`,path:[`profiles`]})});function sQ(e){if(e.subject!==void 0)return e.subject;let t=aQ(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 cQ(e){return e.subject===void 0?{kind:`footage`,deviceId:e.deviceId,profiles:[e.profile],fromMs:e.fromMs,toMs:e.toMs}:e.subject}var lQ={name:`recording-export`,scope:`system`,mode:`singleton`,methods:{createExport:M(oQ,QZ,{role:`viewer`,kind:`mutation`,auth:`protected`}),listExports:M(d({deviceId:i().optional()}),w(QZ),{role:`viewer`,kind:`query`,auth:`protected`}),getExport:M(d({exportId:l()}),QZ,{role:`viewer`,kind:`query`,auth:`protected`}),cancelExport:M(d({exportId:l()}),QZ,{role:`viewer`,kind:`mutation`,auth:`protected`}),deleteExport:M(d({exportId:l()}),QZ,{role:`viewer`,kind:`mutation`,auth:`protected`}),getDownloadUrl:M(d({exportId:l()}),nQ,{role:`viewer`,kind:`query`,auth:`protected`}),readExportBytes:M(d({exportId:l()}),iQ,{kind:`query`,auth:`protected`})}},uQ=C([`continuous`,`motion`,`person`,`vehicle`,`animal`,`lineCrossing`,`intrusion`,`loitering`,`alarmInput`]),dQ=d({trigger:uQ,day:i().int().min(0).max(6).meta(A(`none`)),startMinute:i().int().min(0).max(1439).meta(A(`none`)),endMinute:i().int().min(1).max(1440).meta(A(`none`))}),fQ=d({id:l(),label:l().optional(),status:C([`ok`,`unformatted`,`error`,`offline`,`unknown`]),capacityMb:i().nullable(),freeMb:i().nullable(),writable:T().optional()}),pQ=m(`kind`,[d({kind:h(`present`),volumes:w(fQ)}),d({kind:h(`absent`),reason:l()}),d({kind:h(`unknown`),reason:l()})]),mQ=d({id:l(),enabled:T(),isVideo:T(),codec:l().nullable(),resolution:l().nullable(),overwriteWhenFull:T().nullable()}),hQ=d({storage:pQ,tracks:w(mQ),primaryTrackId:l().nullable(),enabled:T().nullable(),overwriteWhenFull:T().nullable(),preRecordSec:i().nullable().meta(A(`duration`)),postRecordSec:i().nullable().meta(A(`duration`)),segmentMinutes:i().nullable().meta(A(`none`)),windows:w(dQ),unreadableWindows:i().meta(A(`count`)),recordingToNowhere:T(),lastFetchedAt:i()}),gQ=d({min:i(),max:i(),step:i()}),_Q=d({values:w(i()).min(1),sentinel:d({value:i(),meaning:C([`no-limit`,`disabled`])}).optional()}),vQ=d({readable:T(),writable:T(),reason:l().optional()}),yQ=d({support:vQ,granularityMinutes:i(),triggers:w(uQ),supportsOverlappingTriggers:T()}),bQ=d({enabled:vQ,overwriteWhenFull:vQ,preRecordSec:vQ,preRecordSecRange:gQ.optional(),preRecordSecAllowed:_Q.optional(),postRecordSec:vQ,postRecordSecRange:gQ.optional(),postRecordSecAllowed:_Q.optional(),segmentMinutes:vQ,segmentMinutesRange:gQ.optional(),segmentMinutesAllowed:_Q.optional(),schedule:yQ}),xQ=d({enabled:T().optional(),overwriteWhenFull:T().optional(),preRecordSec:i().optional(),postRecordSec:i().optional(),segmentMinutes:i().optional(),windows:w(dQ).optional()}),SQ={name:`recording-onboard`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[P.Camera],deviceConfig:{ui:{kind:`derived-form`,builderId:`recording-onboard`,tab:`recording`}},methods:{getOptions:M(d({deviceId:i()}),bQ),setSettings:M(d({deviceId:i(),settings:xQ}),y(),{kind:`mutation`,auth:`admin`})},status:{schema:hQ,kind:`poll`},runtimeState:hQ,durability:`restored`,history:`none`,volatileStateFields:[`lastFetchedAt`]},CQ=1440,wQ=7,TQ=24,EQ=168,DQ=[`Monday`,`Tuesday`,`Wednesday`,`Thursday`,`Friday`,`Saturday`,`Sunday`];function OQ(e,t){if(t.enabled!==void 0&&!e.enabled.writable)return kQ(`the master recording switch`,e.enabled.reason);if(t.overwriteWhenFull!==void 0&&!e.overwriteWhenFull.writable)return kQ(`overwrite-when-full`,e.overwriteWhenFull.reason);let n=AQ(`pre-record seconds`,t.preRecordSec,e.preRecordSec,e.preRecordSecRange,e.preRecordSecAllowed);if(n)return n;let r=AQ(`post-record seconds`,t.postRecordSec,e.postRecordSec,e.postRecordSecRange,e.postRecordSecAllowed);if(r)return r;let i=AQ(`segment length (minutes)`,t.segmentMinutes,e.segmentMinutes,e.segmentMinutesRange,e.segmentMinutesAllowed);if(i)return i;if(t.windows!==void 0){let n=jQ(e,t.windows);if(n)return n}return null}function kQ(e,t){return t?`this camera cannot change ${e}: ${t}`:`this camera cannot change ${e}`}function AQ(e,t,n,r,i){if(t===void 0)return null;if(!n.writable)return kQ(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 jQ(e,t){let n=e.schedule;if(!n.support.writable)return kQ(`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 ${NQ(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 ${NQ(e.day)} window ${PQ(e.startMinute)}–${PQ(e.endMinute)} is not aligned to them`}if(!n.supportsOverlappingTriggers){let e=MQ(t);if(e)return`this camera stores one trigger per time range, so "${e.a.trigger}" and "${e.b.trigger}" cannot both cover ${NQ(e.a.day)} ${PQ(Math.max(e.a.startMinute,e.b.startMinute))}–${PQ(Math.min(e.a.endMinute,e.b.endMinute))}`}return null}function MQ(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 NQ(e){return DQ[e]??`day ${String(e)}`}function PQ(e){let t=Math.floor(e/60),n=e%60;return`${String(t).padStart(2,`0`)}:${String(n).padStart(2,`0`)}`}function FQ(e,t){return e*24+t}function IQ(e){if(e.length===0)return!0;let t=e[0];for(let n of e)if(n!==t)return!1;return!0}function LQ(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[FQ(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 RQ(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[FQ(r.day,t)]=`1`}return n.join(``)}function zQ(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 BQ(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 VQ(e){let t=e.trim().toLowerCase(),n=DQ.findIndex(e=>e.toLowerCase()===t);return n>=0?n:null}function HQ(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 UQ=d({active:T(),reason:l(),lastChangedAt:i()}),WQ=UQ.extend({lastFetchedAt:i()}),GQ={name:`recording-signal`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[P.Camera],methods:{getStatus:M(d({deviceId:i()}),UQ)},status:{schema:UQ,kind:`push`,empty:{active:!1,reason:`unknown`,lastChangedAt:0}},runtimeState:WQ,durability:`session`,history:`none`},KQ=[{capName:`recording`,sourceId:`camstack`,addonId:`recorder`}];function qQ(e,t){for(let n of KQ)if(n.capName===e&&n.sourceId===t)return n.addonId;return null}var JQ=l(),YQ=[`day`,`ir`,`night`,`dawn`,`dusk`],XQ=C([`skip`,`judge-anyway`]),ZQ=`__diverged__`,QQ=C([`matched`,`diverged`,`unknown`]),$Q=C([`no-reference-for-condition`,`view-shifted`,`no-vision-profile`,`encoder-model-changed`,`no-snapshot`]),e$=d({embedding:w(i()),modelId:l(),condition:JQ,capturedAt:i(),thumbnailMediaId:i().int().optional(),anchorEmbedding:w(i()).optional()}),t$=d({id:l(),label:l(),references:w(e$),textPrompts:w(l()).optional(),referenceCount:i(),currentlyMatched:T()}),n$=m(`mode`,[d({mode:h(`similarity`),threshold:i().min(0).max(1),hysteresisCount:i().int().positive()}),d({mode:h(`llm`),prompt:l(),profileId:l().optional(),hysteresisCount:i().int().positive()})]),r$=60,i$=120,a$=60,o$=.85,s$=`skip`,c$=8e3,l$=448,u$=!0,d$=d({enabled:T().default(!1),prompt:l().min(1).max(1e3),profileId:l().optional(),timeoutMs:i().int().min(1e3).max(2e4).default(c$),maxImagePx:i().int().min(64).max(2048).default(448),onTimeout:C([`flip`,`hold`]).default(`hold`)}),f$=d({id:l(),label:l(),roi:cM,enabled:T(),triggerMode:C([`periodic`,`on-motion`,`both`]),checkIntervalSec:i().optional(),check:n$,states:w(t$),currentStateId:l().nullable(),lastCheckedAt:i().nullable(),lastConfidence:i().nullable(),currentCondition:JQ.nullable(),availability:C([`ok`,`unavailable`]),unavailableReason:l().nullable(),baselineStateId:l().nullable(),emit:C([`latched`,`live`]).default(`latched`),verdict:QQ,latched:T(),armedAt:i(),divergedAt:i().nullable(),restoredAt:i().nullable(),quietSeconds:i().int().min(0).max(3600).default(60),minObservationSpacingSec:i().int().min(0).max(3600).default(120),confirm:d$.optional(),anchorThreshold:i().min(0).max(1).default(o$),autoRestore:T().default(!1),onUncoveredCondition:XQ.default(s$),suspendedCondition:JQ.nullable().default(null),unavailable:$Q.nullable(),coveredConditions:w(JQ)}),p$=d({monitors:w(f$),lastFetchedAt:i()}),m$=d({deviceId:i(),status:p$.nullable()}),h$={name:`scene-monitor`,role:{feature:`scenes`},scope:`device`,mode:`singleton`,kind:`wrapper`,defaultActive:!0,deviceTypes:[P.Camera],methods:{listScenes:M(d({deviceId:i()}),p$),listScenesBatch:M(d({deviceIds:w(i()).min(1).max(200)}),w(m$).readonly()),createScene:M(d({deviceId:i(),label:l(),roi:cM,check:n$,triggerMode:C([`periodic`,`on-motion`,`both`]).optional(),checkIntervalSec:i().optional()}),f$,{kind:`mutation`,auth:`admin`}),updateScene:M(d({deviceId:i(),monitorId:l(),patch:d({label:l().optional(),roi:cM.optional(),enabled:T().optional(),triggerMode:C([`periodic`,`on-motion`,`both`]).optional(),checkIntervalSec:i().optional(),check:n$.optional(),emit:C([`latched`,`live`]).optional(),quietSeconds:i().int().min(0).max(3600).optional(),minObservationSpacingSec:i().int().min(0).max(3600).optional(),anchorThreshold:i().min(0).max(1).optional(),autoRestore:T().optional(),onUncoveredCondition:XQ.optional(),confirm:d$.nullable().optional()})}),y(),{kind:`mutation`,auth:`admin`}),deleteScene:M(d({deviceId:i(),monitorId:l()}),y(),{kind:`mutation`,auth:`admin`}),captureReference:M(d({deviceId:i(),monitorId:l(),stateId:l().optional(),label:l().optional(),condition:JQ.optional()}),d({stateId:l(),referenceCount:i()}),{kind:`mutation`,auth:`admin`}),deleteReference:M(d({deviceId:i(),monitorId:l(),stateId:l(),index:i()}),y(),{kind:`mutation`,auth:`admin`}),recheckNow:M(d({deviceId:i(),monitorId:l()}),y(),{kind:`mutation`,auth:`admin`}),resetScene:M(d({deviceId:i(),monitorId:l(),recapture:T().optional()}),y(),{kind:`mutation`,auth:`admin`})},status:{schema:p$,kind:`push`},runtimeState:p$,durability:`session`,history:`none`},g$=C([`include`,`exclude`]),_$=d({id:l(),name:l().optional(),zoneIds:w(l()).min(1).readonly(),mode:g$,classFilter:w(l()).readonly().optional(),overlapThreshold:i().min(0).max(1).optional(),bboxInclusionPct:i().min(0).max(100).optional(),preferMask:T().optional(),enabled:T().default(!0),detectBySceneDifference:T().optional(),confirmWithLlm:T().optional()}),v$=w(_$).readonly(),y$=d({isRunning:T(),lastRunAt:i(),lastRunSuccess:T().nullable(),lastError:l().nullable(),lastChangedAt:i()}),b$={name:`script-runner`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[P.Script],methods:{run:M(d({deviceId:i().int().nonnegative(),variables:x(l(),o()).optional()}),y(),{kind:`mutation`,auth:`admin`}),stop:M(d({deviceId:i().int().nonnegative()}),y(),{kind:`mutation`,auth:`admin`})},status:{schema:y$,kind:`push`},runtimeState:y$,durability:`session`,history:`none`},x$=d({detected:T(),lastChangedAt:i()}),S$={name:`smoke`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[P.Sensor],methods:{},status:{schema:x$,kind:`push`},runtimeState:x$,durability:`restored`,history:{fields:{detected:{kind:`boolean`}}},volatileStateFields:[`lastChangedAt`]},C$=d({camStreamId:l().min(1),kind:Pi,url:l().optional(),codec:l().optional(),resolution:Fi.optional(),fps:i().positive().optional().meta(A(`rate`)),label:l().optional(),deviceFeatures:w(l()).optional(),autoEligible:T().optional(),profileHint:j.optional(),metadata:x(l(),o()).optional()}),w$=d({descriptors:w(C$),lastFetchedAt:i()}),T$={name:`stream-catalog`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[P.Camera],methods:{getCatalog:M(d({deviceId:i().int().nonnegative()}),w(C$).readonly())},runtimeState:w$,durability:`restored`,history:`none`,volatileStateFields:[`lastFetchedAt`]},E$=C([`main`,`sub`,`ext`]),D$=d({width:i().meta(A(`none`)),height:i().meta(A(`none`)),codec:C([`h264`,`h265`]),framerate:i().meta(A(`rate`)),bitrate:i().meta(A(`bitrate`)),bitrateMode:C([`vbr`,`cbr`]).optional(),encoderProfile:C([`high`,`main`,`baseline`]).optional(),gop:i().optional().meta(A(`none`)),audio:T().optional()}),O$=d({main:D$.optional(),sub:D$.optional(),ext:D$.optional(),lastFetchedAt:i()}),k$=d({resolutions:w(d({width:i(),height:i()})),codecs:w(C([`h264`,`h265`])),framerates:w(i()),bitrates:w(i()),bitrateRange:u([i(),i()]).optional(),supportsBitrateMode:T(),supportsEncoderProfile:T(),supportsGop:T(),gop:d({min:i(),max:i(),step:i()}).optional()}),A$=d({main:k$.optional(),sub:k$.optional(),ext:k$.optional()}),j$=d({width:i().optional(),height:i().optional(),codec:C([`h264`,`h265`]).optional(),framerate:i().optional(),bitrate:i().optional(),bitrateMode:C([`vbr`,`cbr`]).optional(),encoderProfile:C([`high`,`main`,`baseline`]).optional(),gop:i().optional()}),M$={name:`stream-params`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[P.Camera],deviceConfig:{ui:{kind:`derived-form`,builderId:`stream-params`,tab:`streaming`}},methods:{getOptions:M(d({deviceId:i()}),A$),setProfile:M(d({deviceId:i(),profile:E$,patch:j$}),y(),{kind:`mutation`,auth:`admin`}),getConfigSchema:M(d({deviceId:i()}),o().nullable())},status:{schema:O$,kind:`poll`},runtimeState:O$,durability:`restored`,history:{fields:{"main.bitrate":{kind:`gauge`,unit:`kbps`},"main.framerate":{kind:`gauge`,unit:`fps`},"sub.bitrate":{kind:`gauge`,unit:`kbps`},"sub.framerate":{kind:`gauge`,unit:`fps`}}},volatileStateFields:[`lastFetchedAt`]},N$=[{profile:`main`,prefix:`streamMain`,label:`Main stream`},{profile:`sub`,prefix:`streamSub`,label:`Sub stream`},{profile:`ext`,prefix:`streamExt`,label:`Third stream`}];function P$(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 F$(e,t){let n=[];for(let r of N$){let i=e[r.profile];if(!i)continue;let a=P$(r,i,t?.[r.profile]);a&&n.push(a)}return n.length===0?null:{sections:n}}function I$(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 L$=d({on:T().meta({label:`On`}),lastChangedAt:i()}),R$={name:`switch`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[P.Switch,P.Siren,P.Light,P.Fan],methods:{setState:M(d({deviceId:i(),on:T()}),y(),{kind:`mutation`,auth:`protected`})},events:{onStateChanged:{data:d({deviceId:i(),on:T(),lastChangedAt:i()})}},status:{schema:L$,kind:`command-driven`},runtimeState:L$,durability:`restored`,history:{fields:{on:{kind:`boolean`}}},volatileStateFields:[`lastChangedAt`],settings:{bindings:[{kind:`scalar`,statusPath:`on`,method:`setState`,valueArg:`on`,field:{label:`On`,kind:`boolean`}}]}},z$=`server.name`,B$=48;function V$(e){for(let t of e){let e=t.codePointAt(0)??0;if(e<=31||e>=127&&e<=159)return!0}return!1}var H$=l().transform(e=>e.trim()).pipe(l().min(1,`The server name cannot be empty`).max(48,`The server name is at most 48 characters`).refine(e=>!V$(e),{message:`The server name cannot contain control characters`})),U$=d({name:l(),isDefault:T()}),W$=`CamStack`,G$=/^(?:[0-9a-f]{12}|[0-9a-f]{64})$/;function K$(e){let t=e.trim().split(`.`)[0]??``;return t.length===0||t.toLowerCase()===`localhost`||G$.test(t)?W$:t}function q$(e,t){let n=H$.safeParse(e);return n.success?{name:n.data,isDefault:!1}:{name:K$(t),isDefault:!0}}var J$=d({streaming:T(),notifications:T(),objectDetection:T(),remoteAccess:T(),agentCluster:T(),smartHome:T(),recordings:T(),backup:T(),repl:T()}),Y$=J$.extend({serverName:U$}),X$=d({status:h(`ok`),uptime:i()}),Z$=d({name:l(),address:l(),family:l(),internal:T()}),Q$=C([`operator-set`,`derived-from-ip`]),$$=d({latitude:i().min(-90).max(90),longitude:i().min(-180).max(180),source:Q$,updatedAt:i(),label:l().optional()}),e1=d({location:$$.nullable(),derivationAttemptedAt:i().nullable(),derivationError:l().nullable()}),t1=d({latitude:i().min(-90).max(90),longitude:i().min(-180).max(180)}).nullable(),n1=C([`http`,`ws`,`mesh`,`unknown`]),r1=d({http:i(),ws:i(),mesh:i(),unknown:i()}),i1=d({plane:n1,procedure:l(),userAgent:l(),ip:l(),principal:l(),calls:i(),subscriptions:i(),perMin:i()}),a1=d({procedure:l(),calls:i(),planes:r1,subscriptions:i(),perMin:i()}),o1=d({armed:T(),elapsedMs:i(),windowMs:i(),armedUntilMs:i(),httpRequests:i(),batchedRequests:i(),procedureCalls:i(),planes:r1,planesExplainTotal:T(),wsConnections:i(),wsMessages:i(),subscriptions:i(),subscriptionStops:i(),distinctGroups:i(),unattributedCalls:i(),procedures:w(a1).readonly(),groups:w(i1).readonly()}),s1=o1.extend({persisted:T()}),c1=C([`debug`,`info`,`warn`,`error`]),l1=C([`request-census`]),u1=C([`cluster`,`node`,`component`]),d1=C([`default`,`cluster`,`node`,`component`]),f1=d({scope:u1,nodeId:l().nullable(),component:l().nullable(),level:c1.nullable()}),p1=d({level:c1,levelSource:d1}),m1=d({layers:w(f1).readonly()}),h1=d({id:l1,armed:T(),armedUntilMs:i(),remainingMs:i(),persisted:T()}),g1=d({id:l1,armMs:i().int().min(0),reportEveryMs:i().int().positive().optional()}),_1=d({channel:l(),armed:T(),armedUntilMs:i(),remainingMs:i(),deviceIds:w(i().int()).readonly().nullable()}),v1=d({channel:l().min(1),armMs:i().int().min(0),deviceIds:w(i().int()).readonly().nullable().optional()}),y1=d({level:c1.nullable().optional(),diagnostics:w(g1).readonly().optional(),channels:w(v1).readonly().optional(),opsLogRetentionDays:i().int().min(0).max(3650).optional()}),b1=fA.extend({addonId:l()}),x1=NO.extend({addonId:l()}),S1=d({scopeNodeId:l().optional(),scopeComponent:l().optional()}),C1=d({scopeNodeId:l().optional(),scopeComponent:l().optional(),patch:y1}),w1=d({scopeNodeId:l().nullable(),scopeComponent:l().nullable(),effective:p1,explicit:m1,activeWindows:w(h1).readonly(),channels:w(am).readonly(),activeChannels:w(_1).readonly(),opsLogRetentionDays:i().int().min(0),persisted:T()}),T1={name:`system`,scope:`system`,mode:`singleton`,methods:{info:M(y(),Y$),health:M(y(),X$),featureFlags:M(y(),J$),networkAddresses:M(y(),w(Z$).readonly()),getRetentionConfig:M(y(),o().nullable(),{auth:`admin`}),setRetentionConfig:M(x(l(),o()),b(),{kind:`mutation`,auth:`admin`}),forceRetentionCleanup:M(y(),y(),{kind:`mutation`,auth:`admin`}),getSiteLocation:M(y(),e1),setSiteLocation:M(t1,e1,{kind:`mutation`,auth:`admin`}),detectSiteLocation:M(y(),e1,{kind:`mutation`,auth:`admin`}),getRequestCensus:M(y(),s1,{auth:`admin`}),getLoadContributions:M(y(),w(b1).readonly(),{auth:`admin`}),getFailureContributions:M(y(),w(x1).readonly(),{auth:`admin`}),getLoggingSettings:M(S1,w1,{auth:`admin`}),setLoggingSettings:M(C1,w1,{kind:`mutation`,auth:`admin`})},mount:{kind:`server-provided`}},E1=d({tampered:T(),lastChangedAt:i()}),D1={name:`tamper`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[P.Sensor],methods:{},status:{schema:E1,kind:`push`},runtimeState:E1,durability:`restored`,history:{fields:{tampered:{kind:`boolean`}}},volatileStateFields:[`lastChangedAt`]},O1=d({celsius:i().nullable().meta(A(`temperature`,{precision:1,label:`Temperature`})),lastFetchedAt:i()}),k1={name:`temperature-sensor`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[P.Sensor,P.Thermostat],methods:{},status:{schema:O1,kind:`push`},runtimeState:O1,durability:`restored`,history:{fields:{celsius:{kind:`gauge`,unit:`°C`,deadband:.1}}},volatileStateFields:[`lastFetchedAt`]},A1=d({title:l(),message:l(),severity:C([`info`,`warning`,`critical`]),duration:i().optional(),action:d({label:l(),url:l()}).optional()}),j1={name:`toast`,scope:`system`,mode:`singleton`,methods:{onToast:M(y(),A1,{kind:`subscription`})},mount:{kind:`server-provided`}},M1=d({currentVersion:l().nullable(),availableVersion:l().nullable(),updatable:T(),state:l().nullable(),inProgress:T()}),N1={name:`update`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[P.Update],methods:{installUpdate:M(y(),y(),{kind:`mutation`,auth:`admin`})},status:{schema:M1,kind:`poll`},runtimeState:M1,durability:`session`,history:`none`},P1=d({id:l(),username:l(),isAdmin:T().default(!1),allowedProviders:f([w(l()),h(`*`)]),allowedDevices:x(l(),f([w(l()),h(`*`)])),scopes:w(ng).default([]),totpEnabled:T().default(!1),createdAt:i(),updatedAt:i()}),F1=d({username:l(),password:l().min(6),isAdmin:T().default(!1),allowedProviders:f([w(l()),h(`*`)]).optional(),allowedDevices:x(l(),f([w(l()),h(`*`)])).optional(),scopes:w(ng).optional()}),I1=d({id:l(),isAdmin:T().optional(),allowedProviders:f([w(l()),h(`*`)]).optional(),allowedDevices:x(l(),f([w(l()),h(`*`)])).optional(),scopes:w(ng).optional()}),L1=d({id:l(),userId:l(),username:l(),integrationId:l(),scopes:w(tg),createdAt:i(),lastUsedAt:i(),revokedAt:i().nullable()}),R1=d({secret:l(),otpauthUrl:l()}),z1=d({enabled:T(),confirmedAt:i().nullable()}),B1=d({provider:l(),subject:l(),issuer:l(),userId:l(),label:l().optional(),linkedAt:i()}),V1=d({provider:l().min(1),subject:l().min(1)}),H1={name:`user-management`,scope:`system`,mode:`singleton`,methods:{listUsers:M(y(),w(P1),{auth:`admin`}),createUser:M(F1,P1,{kind:`mutation`,auth:`admin`,access:`create`}),updateUser:M(I1,d({success:h(!0)}),{kind:`mutation`,auth:`admin`,access:`create`}),deleteUser:M(d({id:l()}),d({success:h(!0)}),{kind:`mutation`,auth:`admin`,access:`delete`}),resetPassword:M(d({id:l(),newPassword:l().min(6)}),d({success:h(!0)}),{kind:`mutation`,auth:`admin`,access:`create`}),setUserScopes:M(d({userId:l(),scopes:w(ng)}),d({success:h(!0)}),{kind:`mutation`,auth:`admin`,access:`create`}),validateCredentials:M(d({username:l(),password:l()}),P1.extend({passwordHash:l()}).nullable(),{kind:`mutation`,access:`view`}),setupTotp:M(d({userId:l()}),R1,{kind:`mutation`,auth:`admin`,access:`create`}),confirmTotp:M(d({userId:l(),code:l()}),d({success:h(!0)}),{kind:`mutation`,auth:`admin`,access:`create`}),disableTotp:M(d({userId:l()}),d({success:h(!0)}),{kind:`mutation`,auth:`admin`,access:`delete`}),getTotpStatus:M(d({userId:l()}),z1,{auth:`admin`}),migrateRawSecrets:M(GC,KC,{kind:`mutation`,auth:`admin`,access:`create`}),verifyTotp:M(d({userId:l(),code:l()}),d({valid:T()}),{kind:`mutation`,access:`view`}),oauthIssueCode:M(d({integrationId:l(),userId:l(),username:l(),scopes:w(tg),redirectUri:l(),hubUrl:l(),codeChallenge:l().optional(),refreshTtlSec:f([i().int().positive(),h(`never`)]).optional()}),d({code:l()}),{kind:`mutation`,access:`create`}),oauthExchangeCode:M(d({code:l(),redirectUri:l(),codeVerifier:l().optional()}),d({accessToken:l(),refreshToken:l(),expiresIn:i()}).nullable(),{kind:`mutation`,access:`view`}),oauthRefresh:M(d({refreshToken:l()}),d({accessToken:l(),refreshToken:l(),expiresIn:i()}).nullable(),{kind:`mutation`,access:`view`}),oauthVerifyAccessToken:M(d({token:l()}),d({userId:l(),username:l(),scopes:w(tg)}).nullable(),{access:`view`}),listExternalIdentities:M(d({userId:l()}),w(B1),{auth:`admin`}),findUserByExternalIdentity:M(V1,d({userId:l(),issuer:l()}).nullable(),{auth:`admin`}),unlinkExternalIdentity:M(V1.extend({userId:l()}),d({success:T()}),{kind:`mutation`,auth:`admin`,access:`delete`}),listOauthSessions:M(y(),w(L1),{auth:`admin`}),revokeOauthSession:M(d({id:l()}),d({success:T()}),{kind:`mutation`,auth:`admin`,access:`delete`})}},U1=C([`idle`,`cleaning`,`paused`,`returning`,`docked`,`drying`,`error`]),W1=d({state:U1,batteryLevel:i().min(0).max(100).nullable().meta(A(`percentage`)),fanSpeed:l().nullable(),availableFanSpeeds:w(l()),progressPercent:i().min(0).max(100).nullable().meta(A(`percentage`)),errorCode:i().nullable().meta(A(`none`)),errorLabel:l().nullable(),lastChangedAt:i()}),G1={name:`vacuum-control`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[P.Vacuum],methods:{start:M(d({deviceId:i().int().nonnegative()}),y(),{kind:`mutation`,auth:`protected`}),pause:M(d({deviceId:i().int().nonnegative()}),y(),{kind:`mutation`,auth:`protected`}),stop:M(d({deviceId:i().int().nonnegative()}),y(),{kind:`mutation`,auth:`protected`}),returnToBase:M(d({deviceId:i().int().nonnegative()}),y(),{kind:`mutation`,auth:`protected`}),locate:M(d({deviceId:i().int().nonnegative()}),y(),{kind:`mutation`,auth:`protected`}),setFanSpeed:M(d({deviceId:i().int().nonnegative(),speed:l().min(1)}),y(),{kind:`mutation`,auth:`protected`})},status:{schema:W1,kind:`push`},runtimeState:W1,durability:`session`,history:{fields:{batteryLevel:{kind:`gauge`,unit:`%`,deadband:2}}}},K1=C([`open`,`opening`,`closing`,`closed`,`stopped`]),q1=d({state:K1,position:i().min(0).max(100).nullable().meta(A(`percentage`)),lastChangedAt:i()}),J1={name:`valve`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[P.Valve],methods:{open:M(d({deviceId:i().int().nonnegative()}),y(),{kind:`mutation`,auth:`protected`}),close:M(d({deviceId:i().int().nonnegative()}),y(),{kind:`mutation`,auth:`protected`}),stop:M(d({deviceId:i().int().nonnegative()}),y(),{kind:`mutation`,auth:`protected`}),setPosition:M(d({deviceId:i().int().nonnegative(),position:i().min(0).max(100)}),y(),{kind:`mutation`,auth:`protected`})},status:{schema:q1,kind:`push`},runtimeState:q1,durability:`session`,history:{fields:{position:{kind:`gauge`,unit:`%`,minIntervalMs:0}}}},Y1=d({detected:T(),lastChangedAt:i()}),X1={name:`vibration`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[P.Sensor],methods:{},status:{schema:Y1,kind:`push`},runtimeState:Y1,durability:`restored`,history:{fields:{detected:{kind:`boolean`}}},volatileStateFields:[`lastChangedAt`]},Z1=d({currentTemp:i().nullable().meta(A(`temperature`)),targetTemp:i().nullable().meta(A(`temperature`)),operationMode:l().nullable(),availableModes:w(l()),away:T().nullable(),minTemp:i().nullable().meta(A(`temperature`)),maxTemp:i().nullable().meta(A(`temperature`)),lastChangedAt:i()}),Q1={name:`water-heater`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[P.WaterHeater],methods:{setTargetTemp:M(d({deviceId:i().int().nonnegative(),temp:i().finite()}),y(),{kind:`mutation`,auth:`protected`}),setOperationMode:M(d({deviceId:i().int().nonnegative(),mode:l().min(1)}),y(),{kind:`mutation`,auth:`protected`}),setAway:M(d({deviceId:i().int().nonnegative(),on:T()}),y(),{kind:`mutation`,auth:`protected`})},status:{schema:Z1,kind:`push`},runtimeState:Z1,durability:`session`,history:{fields:{currentTemp:{kind:`gauge`,unit:`°C`,deadband:.5},targetTemp:{kind:`gauge`,unit:`°C`,minIntervalMs:0}}}},$1=d({condition:l().nullable(),temperature:i().nullable().meta(A(`temperature`,{precision:1})),humidity:i().min(0).max(100).nullable().meta(A(`humidity`)),pressure:i().nullable().meta(A(`pressure`)),windSpeed:i().nullable().meta(A(`speed`)),windBearing:i().nullable().meta(A(`angle`)),lastFetchedAt:i()}),e0={name:`weather`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[P.Weather],methods:{},status:{schema:$1,kind:`push`},runtimeState:$1,durability:`session`,history:{fields:{temperature:{kind:`gauge`,unit:`°C`,deadband:.2},humidity:{kind:`gauge`,unit:`%`,deadband:1},pressure:{kind:`gauge`,unit:`hPa`,deadband:.5},windSpeed:{kind:`gauge`,unit:`m/s`,deadband:.5}}}},t0=d({totalObjects:i().int().nonnegative(),byClass:x(l(),i().int().nonnegative()),standingObjects:i().int().nonnegative().optional(),transientObjects:i().int().nonnegative().optional()}),n0=t0.extend({zoneId:l(),zoneName:l(),trackIds:w(l()).readonly()}),r0=d({id:l(),className:l(),bbox:d({x:i(),y:i(),w:i(),h:i()}),frameWidth:i().int().nonnegative(),frameHeight:i().int().nonnegative(),firstSeenAt:i().int(),becameStationaryAt:i().int(),lastConfirmedAt:i().int(),label:l().optional(),keyFrameMediaId:i().int().optional()}),i0=d({ts:i().int(),frameWidth:i().int().nonnegative(),frameHeight:i().int().nonnegative(),zones:w(n0).readonly(),frame:t0,unzoned:t0,stationaryObjects:w(r0).readonly().optional()}),a0=d({deviceId:i(),read:C([`read`,`unreadable`]),snapshot:i0.nullable()}),o0=C([`minute`,`5min`,`hour`]),s0=d({from:i().int(),to:i().int(),resolution:o0}),c0=d({ts:i().int(),count:i().int().nonnegative()}),l0={name:`zone-analytics`,scope:`device`,mode:`singleton`,deviceTypes:[P.Camera],methods:{getCurrentSnapshot:M(d({deviceId:i()}),i0.nullable()),getCurrentSnapshotBatch:M(d({deviceIds:w(i()).min(1).max(200)}),w(a0).readonly()),getZoneHistory:M(d({deviceId:i(),zoneId:l(),className:l().optional()}).extend(s0.shape),w(c0).readonly()),getCameraHistory:M(d({deviceId:i(),className:l().optional()}).extend(s0.shape),w(c0).readonly()),getUnzonedHistory:M(d({deviceId:i(),className:l().optional()}).extend(s0.shape),w(c0).readonly())},runtimeState:i0,durability:`session`,history:`none`},u0=C([`motion`,`detection`,`package`]),d0={name:`zone-rules`,scope:`device`,mode:`singleton`,deviceTypes:[P.Camera],methods:{listRules:M(d({deviceId:i(),stage:u0}),w(_$).readonly()),setRules:M(d({deviceId:i(),stage:u0,rules:w(_$).readonly()}),y(),{kind:`mutation`,auth:`admin`})},runtimeState:d({motion:w(_$).readonly(),detection:w(_$).readonly(),package:w(_$).readonly()}),durability:`restored`,history:`none`},f0=d({id:l(),label:l(),usdPerHour:i().nonnegative(),vramGb:i().nonnegative()}),p0=d({id:l(),label:l(),priceMultiplier:i().positive()}),m0=d({gpuType:l(),region:l(),costCapUsd:i().nonnegative(),maxRuntimeSec:i().int().positive(),failedDatasetGraceHours:i().nonnegative()}),ole=o(),h0=d({typeId:l(),label:l(),iconAsset:l(),addonId:l(),configSchema:ole.optional()}),g0=d({entryId:l(),typeId:l(),name:l(),addonId:l(),configured:T()}),_0=d({addonId:l(),entryId:l(),typeId:l(),name:l(),iconAsset:l(),kind:l(),label:l(),gpuTypes:w(f0).readonly(),regions:w(p0).readonly(),maxDatasetBytes:i().int().positive(),maxRuntimeSec:i().int().positive(),freeTierNote:l().optional(),dataResidencyNote:l(),configured:T(),defaults:m0,formValues:x(l(),o()).optional()}),v0=d({entryId:l().min(1),name:l().min(1),tokenId:l().optional(),tokenSecret:f([l(),d({$secretClear:h(!0)})]).optional(),environment:l().optional(),gpuType:l().optional(),region:l().optional(),costCapUsd:i().nonnegative().optional(),maxRuntimeSec:i().int().positive().optional(),failedDatasetGraceHours:i().nonnegative().optional()}),y0=d({ok:T(),account:l().optional(),reason:C([`missing`,`invalid`,`forbidden`,`network`,`quota`]).optional(),detail:l().optional()}),b0=C([`pending`,`starting`,`running`,`succeeded`,`failed`,`cancelled`,`lost`]),x0=d({jobKey:l(),providerJobId:l().optional(),state:b0,startedAt:i().optional(),endedAt:i().optional(),exitCode:i().int().optional(),failureReason:l().optional(),gpuType:l(),region:l().optional(),billedSeconds:i().nonnegative(),costUsd:i().nonnegative(),costIsEstimate:T(),lastFetchedAt:i()}),S0=d({repo:l().min(1),revision:l().regex(/^[0-9a-f]{7,64}$/)}),C0={entryId:l().min(1),jobKey:l().uuid()},w0=d({ts:i(),text:l()}),T0={name:`training-provider`,scope:`system`,mode:`collection`,internal:!0,methods:{describe:M(d({}),w(_0).readonly(),{auth:`admin`}),describeTypes:M(d({}),w(h0).readonly(),{auth:`admin`}),listEntries:M(d({}),w(g0).readonly(),{auth:`admin`}),createEntry:M(d({typeId:l().min(1),name:l().min(1)}),d({entryId:l()}),{kind:`mutation`,auth:`admin`}),deleteEntry:M(d({entryId:l().min(1)}),d({ok:h(!0)}),{kind:`mutation`,auth:`admin`}),updateEntry:M(v0,d({ok:h(!0)}),{kind:`mutation`,auth:`admin`}),validateCredentials:M(d({entryId:l().min(1)}),y0,{kind:`mutation`,auth:`admin`,timeoutMs:3e4}),estimateJob:M(d({entryId:l().min(1),gpuType:l(),region:l(),datasetBytes:i().int().nonnegative(),gpuSecondsLow:i().nonnegative(),gpuSecondsHigh:i().nonnegative()}),d({usdLow:i().nonnegative(),usdHigh:i().nonnegative(),notes:w(l()).readonly()}),{auth:`admin`}),uploadDataset:M(d({...C0,ticket:On}),d({bytes:i().int().nonnegative(),sha256:l()}),{kind:`mutation`,auth:`admin`,timeoutMs:120*6e4}),submitJob:M(d({...C0,trainer:S0,jobSpecJson:l().min(2).max(64e3),gpuType:l(),region:l(),maxRuntimeSec:i().int().positive()}),x0,{kind:`mutation`,auth:`admin`,timeoutMs:30*6e4}),getJob:M(d(C0),x0,{auth:`admin`,timeoutMs:6e4}),listJobEvents:M(d({...C0,cursor:l().optional(),max:i().int().min(1).max(500)}),d({lines:w(w0).readonly(),cursor:l()}),{auth:`admin`,timeoutMs:6e4}),cancelJob:M(d(C0),d({ok:h(!0)}),{kind:`mutation`,auth:`admin`,timeoutMs:6e4}),readResult:M(d(C0),d({found:T(),text:l().optional()}),{kind:`mutation`,auth:`admin`,timeoutMs:5*6e4}),offerArtifact:M(d({...C0,path:C([`bundle.tar`])}),d({ticket:On}),{kind:`mutation`,auth:`admin`,timeoutMs:5*6e4}),cleanupJob:M(d(C0),d({deleted:w(l()).readonly()}),{kind:`mutation`,auth:`admin`,timeoutMs:5*6e4}),listJobs:M(d({entryId:l().min(1).optional()}),w(x0).readonly(),{auth:`admin`,timeoutMs:2*6e4})}},E0=d({collectionIds:w(l()).min(1),workState:C([`complete`,`annotated_or_complete`,`any_annotated`]).default(`complete`)}),D0=d({modelId:l(),label:l(),weights:l(),imgsz:i().int(),baselineOnnxUrl:l(),baselineFloors:x(l(),i()),recommended:T()}),O0=C([`quick`,`standard`,`thorough`]),k0=d({selection:E0,entryId:l().min(1),gpuType:l().min(1),region:l(),baseModelId:l().min(1),preset:O0,freeze:i().int().nonnegative().nullable(),holdoutCameras:w(i().int()).nullable()}),A0=d({holdoutCameras:w(i().int()).readonly(),holdoutLastDays:i().int().nonnegative(),holdoutSupport:x(l(),i().int()).nullable(),trainSubjects:i().int()}),j0=C([`unknown-dataset`,`unknown-provider`,`provider-not-configured`,`unknown-base-model`,`unknown-gpu`,`dataset-too-large`,`no-training-subjects`,`job-already-running`]),M0=d({refusal:d({reason:j0,detail:l()}).nullable(),warnings:w(l()).readonly(),split:A0.nullable(),estimate:d({datasetBytes:i().int(),uploadMinutesAt20Mbps:i(),gpuSecondsLow:i(),gpuSecondsHigh:i(),usdLow:i(),usdHigh:i(),notes:w(l()).readonly()}).nullable(),defaults:d({maxCostUsd:i(),maxRuntimeSec:i().int()}).nullable(),dataNotice:l()}),N0=C([`queued`,`uploading`,`submitted`,`starting`,`running`,`collecting`,`ready`,`registered`,`canary`,`failed`,`cancelling`,`cancelled`,`lost`,`expired`,`discarded`]),P0=C([`cost-cap`,`runtime-cap`,`upload-failed`,`submit-failed`,`trainer-failed`,`result-invalid`,`checksum-mismatch`,`fetch-failed`,`provider-error`,`hub-restart-during-upload`]),F0=d({epoch:i().int(),map50:i().nullable(),map50_95:i().nullable()}),I0=d({nodeId:l(),deviceKey:l()}),L0=d({accelerators:w(I0).readonly(),since:i(),previous:w(I0.extend({modelId:l().nullable()})).readonly()}),R0=I0.extend({pinnedModelId:l().nullable()}),z0=d({id:l(),idempotencyKey:l(),name:l(),createdAt:i(),updatedAt:i(),state:N0,batchId:l().nullable().default(null),stage:Ju.nullable(),failure:d({reason:P0,stage:l().nullable(),detail:l()}).nullable(),request:k0,maxCostUsd:i().nonnegative(),maxRuntimeSec:i().int().positive(),trainer:S0,datasetLayout:JI,frameCount:i().int().nonnegative(),frameIds:w(l()).max(2e4).readonly(),annotationHash:l(),dataset:d({bytes:i().int(),sha256:l(),uploadedAt:i()}).nullable(),split:A0,provider:d({state:b0.nullable(),providerJobId:l().nullable(),startedAt:i().nullable(),endedAt:i().nullable(),billedSeconds:i(),costUsd:i(),costIsEstimate:T(),lastPolledAt:i().nullable()}),progress:d({epoch:i().int().nullable(),epochs:i().int().nullable(),etaSec:i().nullable(),series:w(F0).readonly()}),logTail:w(l()).readonly(),logCursor:l().nullable(),artifacts:d({bundleBytes:i().int(),bundleSha256:l(),fetchedAt:i(),expiresAt:i()}).nullable(),cloudDatasetDeletedAt:i().nullable(),cloudCleanupDueAt:i().nullable(),registeredModelIds:w(l()).readonly(),canary:L0.nullable()}),B0=d({id:l().min(1)}),V0={name:`training`,scope:`system`,mode:`singleton`,mount:{kind:`hub-only`},methods:{listBaseModels:M(d({}),w(D0).readonly(),{auth:`admin`}),planJob:M(k0,M0,{auth:`admin`,timeoutMs:6e4}),startJob:M(k0.extend({name:l().min(1).max(120),maxCostUsd:i().positive(),maxRuntimeSec:i().int().positive(),idempotencyKey:l().min(8).max(80)}),m(`kind`,[d({kind:h(`started`),job:z0}),d({kind:h(`refused`),reason:j0,detail:l()})]),{kind:`mutation`,auth:`admin`,timeoutMs:12e4}),startJobBatch:M(k0.omit({baseModelId:!0}).extend({baseModelIds:w(l().min(1)).min(1),name:l().min(1).max(120),maxCostUsd:i().positive(),maxRuntimeSec:i().int().positive(),idempotencyKey:l().min(8).max(80)}),m(`kind`,[d({kind:h(`started`),batchId:l(),jobs:w(z0).min(1).readonly()}),d({kind:h(`refused`),reason:j0,detail:l()})]),{kind:`mutation`,auth:`admin`,timeoutMs:12e4}),listJobs:M(d({}),w(z0).readonly(),{auth:`admin`}),getJob:M(B0,z0.nullable(),{auth:`admin`}),cancelJob:M(B0,z0,{kind:`mutation`,auth:`admin`,timeoutMs:12e4}),getJobResult:M(B0,qu.nullable(),{auth:`admin`}),listCanaryTargets:M(y(),w(R0).readonly(),{auth:`admin`}),registerResult:M(B0.extend({canaryAccelerators:w(I0).readonly()}),z0,{kind:`mutation`,auth:`admin`,timeoutMs:30*6e4}),canaryResult:M(B0.extend({accelerators:w(I0).min(1).readonly()}),z0,{kind:`mutation`,auth:`admin`,timeoutMs:12e4}),rollbackCanary:M(B0,z0,{kind:`mutation`,auth:`admin`,timeoutMs:12e4}),discardResult:M(B0,z0,{kind:`mutation`,auth:`admin`})}},H0=[`decoder`,`motion-detection`,`pipeline-executor`,`audio-analyzer`,`pipeline-analytics`,`notification-output`],sle=[...H0,`pipeline-orchestrator`,`pipeline-runner`];function cle(e,t,n){return!e||t==null||t<=0?null:n-t*1e3}function lle(e,t,n,r){if(e===null)return null;let i=t?.running??null;return i===null?r:i===e?t?.since??null:n}function W(e,t,n,r,i,a){return{running:e,since:lle(e,n,r,a),source:`native`,phase:e===null?null:t,lastFetchedAt:i}}function ule(e,t,n,r,i,a){let o=a??r;if(e===null)return W(null,null,n,o,r,null);if(e===`Run`||e===`Aborting`){let a=cle(!0,i,r);return W(!0,t??e,n,o,r,a)}return e===`Pause`?W(!1,`Pause`,n,o,r,null):W(!1,e,n,o,r,null)}function dle(e,t,n,r){let i=r??n;return e===null?W(null,null,t,i,n,null):e===`cleaning`||e===`returning`||e===`drying`?W(!0,e,t,i,n,null):e===`paused`?W(!1,`paused`,t,i,n,null):W(!1,e,t,i,n,null)}function fle(e,t,n,r){let i=r??n;return e===null?W(null,null,t,i,n,null):e===`mowing`?W(!0,e,t,i,n,null):e===`paused`?W(!1,`paused`,t,i,n,null):W(!1,e,t,i,n,null)}function ple(e,t,n,r){let i=r??n;return e===null?W(null,null,t,i,n,null):e===`playing`||e===`buffering`?W(!0,e,t,i,n,null):e===`paused`?W(!1,`paused`,t,i,n,null):W(!1,e,t,i,n,null)}function U0(e,t,n){if(e>=t.startMs&&e<=t.endMs)return!0;let r=e-n.preMs,i=e+n.postMs;return r<t.endMs&&i>t.startMs}function W0(e){let t=new Map;for(let n of e){let e=n.className;typeof e!=`string`||e.length===0||t.set(e,(t.get(e)??0)+1)}return[...t.entries()].toSorted((e,t)=>t[1]-e[1]).slice(0,3).map(([e])=>e)}function G0(e,t,n){return W0(t.filter(t=>U0(t.timestamp,e,n)))}function K0(e,t){let n=[...e??[]];for(let e of t)n.includes(e)||n.push(e);return n.slice(0,3)}var q0=5e3;async function J0(e,t,n){if(t.length===0)return t;let r=Math.min(...t.map(e=>e.timeRange.startMs))-n.pad.postMs,i=Math.max(...t.map(e=>e.timeRange.endMs))+n.pad.preMs,a;try{a=await n.fetchObjectEvents({deviceId:e,since:r,until:i,limit:q0})}catch(r){return n.logger.warn(`videoclips: our detections could not be read — clips listed without them`,{tags:{deviceId:e},meta:{branch:`event-labels-unreadable`,clips:t.length,error:r instanceof Error?r.message:String(r)}}),t}return a.length>=5e3&&n.logger.info(`videoclips: the detection read behind these clips was truncated`,{tags:{deviceId:e},meta:{branch:`event-labels-truncated`,limit:q0,since:r,until:i}}),t.map(e=>{let t=G0(e.timeRange,a,n.pad);return t.length===0?e:{...e,labels:K0(e.labels,t)}})}function mle(e,t){return{pad:uf,fetchObjectEvents:({deviceId:t,since:n,until:r,limit:i})=>e.pipelineAnalytics.getObjectEvents.query({deviceId:t,since:n,until:r,limit:i,projection:`slim`}),logger:t}}function hle(e,t){let n=async(...n)=>{let r=await e.listClips(...n);return J0(n[0].deviceId,r,t)};return{...e,listClips:n}}function gle(e,t){return t.slot===e}function _le(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(!gle(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 Y0(e,t){return`${e}:${t}`}function vle(e){let{source:t,label:n,slots:r,hostTypeOf:i,logger:a}=e,o=(e,t)=>t!==null&&zD[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=>Y0(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 ${zD[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:Y0(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 yle=[`switch`,`light`,`fan`,`cover`,`valve`,`lock`,`media-player`,`climate`];function G(e,t,n=null,r=!1){return{cap:e,method:t,requires:n,confirm:r}}var X0={switch:[G(`switch`,`setState`)],light:[G(`switch`,`setState`),G(`brightness`,`setBrightness`),G(`color`,`setColor`)],fan:[G(`switch`,`setState`),G(`fan-control`,`setPercentage`,Ga.FanSpeed),G(`fan-control`,`setPreset`,Ga.FanPreset),G(`fan-control`,`setDirection`,Ga.FanDirection),G(`fan-control`,`setOscillating`,Ga.FanOscillating)],cover:[G(`cover`,`open`),G(`cover`,`close`),G(`cover`,`stop`),G(`cover`,`setPosition`,Ga.CoverPositionable),G(`cover`,`setTiltPosition`,Ga.CoverTilt)],valve:[G(`valve`,`open`),G(`valve`,`close`),G(`valve`,`setPosition`,Ga.ValvePositionable)],lock:[G(`lock-control`,`lock`),G(`lock-control`,`unlock`,null,!0)],"media-player":[G(`media-player`,`play`),G(`media-player`,`pause`),G(`media-player`,`setVolume`,Ga.MediaPlayerVolume)],climate:[G(`climate-control`,`setMode`),G(`climate-control`,`setTarget`),G(`climate-control`,`setFanMode`,Ga.ClimateFanMode)]};function ble(e,t,n){return X0[e].find(e=>e.cap===t&&e.method===n)??null}function xle(e,t){if(t.length===0)return[];let n=X0[e],r=n[0]?.cap;return n.filter(e=>{if(!(e.cap===r||t.every(t=>t.caps.includes(e.cap))))return!1;let n=e.requires;return n===null||t.every(e=>e.features.includes(n))})}function Sle(e,t){if(t.length===0)return[];let n=X0[e].flatMap(e=>e.requires===null?[]:[e.requires]);return[...new Set(n)].filter(e=>t.every(t=>t.includes(e)))}var Z0=`unlocking a group of locks needs an explicit confirmation (confirm: true) — it was not given, so no lock was sent anything`;function Cle(e,t){return e===null?`that method is not one this group shares`:e.confirm&&t.confirm!==!0?Z0:null}function Q0(e){return e===`any`||e===`all`}function wle(e,t,n){return t.state===`fresh`?Q0(e)?n===void 0?typeof t.value==`boolean`?t.value:null:typeof t.value==`string`?n.includes(t.value):null:typeof t.value==`number`&&Number.isFinite(t.value)?t.value:null:null}function Tle(e){let t=[...e].toSorted((e,t)=>e-t),n=Math.floor(t.length/2),r=t[n],i=t[n-1];if(r===void 0)throw Error(`median requires at least one finite number`);if(t.length%2==1)return r;if(i===void 0)throw Error(`median requires at least one finite number`);return(i+r)/2}function Ele(e,t){return e===`min`?Math.min(...t):e===`max`?Math.max(...t):e===`sum`?t.reduce((e,t)=>e+t,0):e===`median`?Tle(t):t.reduce((e,t)=>e+t,0)/t.length}function Dle(e,t){return e===`all`?t.every(e=>e):t.some(e=>e)}function Ole(e,t){return{included:e,excluded:t-e,total:t}}function kle(e){let t=e.flatMap(e=>e.state===`unavailable`&&e.fatal===!0?[e.reason??`source gone`]:[]);return t.length===0?null:t.join(`; `)}function Ale(e,t){return e===`null`?{kind:`value`,value:null,counts:t}:{kind:`unavailable`,fatal:!1,reason:`no member included — unknown is not 0 or off`,counts:t}}function $0(e){let t=e.members.flatMap(t=>{let n=wle(e.reducer,t,e.activeWhen);return n===null?[]:[n]}),n=Ole(t.length,e.members.length),r=kle(e.members);if(r!==null)return{kind:`unavailable`,fatal:!0,reason:r,counts:n};if(e.publish===`included`)return{kind:`value`,value:n.included,counts:n};if(e.publish===`excluded`)return{kind:`value`,value:n.excluded,counts:n};if(e.publish===`total`)return{kind:`value`,value:n.total,counts:n};if(t.length===0)return Ale(e.empty,n);if(Q0(e.reducer)){let r=t.filter(e=>typeof e==`boolean`);return{kind:`value`,value:Dle(e.reducer,r),counts:n}}let i=t.filter(e=>typeof e==`number`);return{kind:`value`,value:Ele(e.reducer,i),counts:n}}function jle(e){let t=e.family===`numeric`?`number`:e.activeWhen===void 0?`boolean`:`state`;return{purpose:`member`,multiple:!0,max:64,deviceTypes:[...e.memberDeviceTypes],accept:e.accept.map(e=>({...e,valueKind:t})),history:{required:!1,minRetentionMs:null},mustBindCaps:e.family===`actuator`?e.accept.map(e=>e.cap):[],exclude:[]}}function e2(e){return{purpose:`historised`,multiple:!1,max:1,deviceTypes:[],accept:t2(e),history:{required:!0,minRetentionMs:null},mustBindCaps:[],exclude:[]}}function t2(e){let t=[];for(let n of Object.keys(ES))for(let[r,i]of Object.entries(kS(n)))i.kind!==`enum`&&(e===`integral`&&i.kind!==`gauge`||t.push({cap:n,fieldPath:r,valueKind:i.kind===`boolean`?`boolean`:`number`}));return t}function Mle(e){if(e===`derivative`)return{...e2(`statistic`),accept:n2()};let t=e===`sum`||e===`expression`,n=e===`difference`||e===`ratio`?2:t?64:1;return{purpose:`reading`,multiple:t||n>1,max:n,deviceTypes:[],accept:n2(),history:{required:!1,minRetentionMs:null},mustBindCaps:[],exclude:[]}}function n2(){return t2(`statistic`).filter(e=>e.valueKind===`number`)}var r2={"°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},"m²":{dimension:`area`,factor:1,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},L:{dimension:`volume`,factor:1,offset:0},mL:{dimension:`volume`,factor:.001,offset:0},gal:{dimension:`volume`,factor:3.785411784,offset:0},s:{dimension:`duration`,factor:1,offset:0},ms:{dimension:`duration`,factor:.001,offset:0},min:{dimension:`duration`,factor:60,offset:0},h:{dimension:`duration`,factor:3600,offset:0},d:{dimension:`duration`,factor:86400,offset:0},B:{dimension:`information`,factor:1,offset:0},KiB:{dimension:`information`,factor:1024,offset:0},MiB:{dimension:`information`,factor:1024**2,offset:0},GiB:{dimension:`information`,factor:1024**3,offset:0},TiB:{dimension:`information`,factor:1024**4,offset:0},kB:{dimension:`information`,factor:1e3,offset:0},MB:{dimension:`information`,factor:1e6,offset:0},GB:{dimension:`information`,factor:1e9,offset:0},"°":{dimension:`angle`,factor:1,offset:0},dBFS:{dimension:`sound-level`,factor:1,offset:0},dBm:{dimension:`signal-level`,factor:1,offset:0},mired:{dimension:`colour-temperature`,factor:1,offset:0},kbps:{dimension:`bitrate`,factor:1,offset:0},Mbps:{dimension:`bitrate`,factor:1e3,offset:0},fps:{dimension:`rate`,factor:1,offset:0}},i2=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 a2(e){return Object.hasOwn(r2,e)?r2[e]:void 0}function o2(e){return a2(e)?.dimension}function s2(e,t){return e*t.factor+t.offset}function c2(e,t){return(e-t.offset)/t.factor}function Nle(e,t,n){if(t===n)return e;let r=a2(t);if(!r)throw new i2(t,n,`unknown-from`);let i=a2(n);if(!i)throw new i2(t,n,`unknown-to`);if(r.dimension!==i.dimension)throw new i2(t,n,`cross-dimension`);return c2(s2(e,r),i)}function l2(e,t,n){if(t===n)return e;let r=a2(t);if(!r)return;let i=a2(n);if(i&&r.dimension===i.dimension)return c2(s2(e,r),i)}function u2(e,t){if(e===t)return!0;let n=o2(e);return n===void 0?!1:n===o2(t)}function Ple(e,t,n){if(t===n)return e;let r=l2(0,t,n),i=l2(e,t,n);if(!(r===void 0||i===void 0))return i-r}function d2(e){let t=[];for(let[n,r]of Object.entries(r2))r.dimension===e&&t.push(n);return t}function f2(e){return`${B(e.source)} ${e.cap}.${e.fieldPath}`}function p2(e){return e.fatal||e.confirmed===!0}function Fle(e,t){return e.state===`unavailable`?{state:`unavailable`,value:null,reason:`${f2(t)}: ${e.reason}`,fatal:e.fatal,confirmed:p2(e)}:{state:e.state,value:e.value,reason:e.state===`stale`?`${f2(t)}: ${e.reason}`:null,deadline:null}}function Ile(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}\` (${f2(r)}): ${e.reason}`,fatal:e.fatal,confirmed:p2(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&&kx(e.expr,`count`)?{state:`stale`,value:Po(null,{kind:`count`,highWater:null,primed:!1},r.currentOutput),reason:`${c.reason}; holding the last accumulator value`,deadline:null}:c;let l=[],u={noteDeadline:e=>l.push(e),convert:(e,t,n)=>l2(e,GT(t)??t,GT(n)??n)??null},d=ys(e.expr,i,n,{hooks:u,...r===void 0?{}:{invokeStateful:e=>hs(r.callPathPrefix===void 0?e:{...e,path:`${r.callPathPrefix}@${e.path}`},r.expressionMemory,{currentOutput:r.currentOutput,startedAtMs:r.startedAtMs,nowMs:n},u)}});return d.ok?{state:a.length>0?`stale`:`fresh`,value:d.value,reason:a.length>0?a.join(`; `):null,deadline:l.length>0?Math.min(...l):null}:{state:`unavailable`,value:null,reason:`the expression failed: ${d.error}`,fatal:!1,confirmed:!0,expressionFailed:!0}}function Lle(e){return e.state===`unavailable`?{state:`unavailable`,fatal:e.fatal,reason:e.reason}:{state:e.state,value:e.value,...e.state===`stale`?{reason:e.reason}:{}}}function Rle(e,t){let n=$0({reducer:e.reducer,...e.activeWhen===void 0?{}:{activeWhen:e.activeWhen},members:e.reads.map(e=>Lle(t(e))),publish:e.publish,empty:e.empty});return n.kind===`value`?{state:`fresh`,value:n.value,reason:null,deadline:null}:{state:`unavailable`,value:null,reason:n.reason,fatal:n.fatal,confirmed:!0}}function zle(e){let{source:t}=e;switch(t.kind){case`from`:return Fle(e.read(t),t);case`expression`:return Ile(t,e.read,e.now,e.stateful);case`aggregate`:return Rle(t,e.read);case`series`:return{state:`unavailable`,value:null,reason:`a series field is written from device history`,fatal:!1,confirmed:!1};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 Ble=3e5,Vle=[{addonId:`provider-homeassistant`,stableId:`sensor.living_room_temperature`},{addonId:`provider-homeassistant`,stableId:`sensor.sofa_temperature`},{addonId:`provider-homeassistant`,stableId:`sensor.window_temperature`}],Hle=[{addonId:`provider-homeassistant`,stableId:`binary_sensor.living_room_motion`},{addonId:`provider-homeassistant`,stableId:`binary_sensor.living_room_presence`}];function m2(e,t,n){return{kind:`from`,source:e,cap:t,fieldPath:n}}function h2(e,t,n,r){return Object.fromEntries(t.map((t,i)=>[`${e}${i+1}`,m2(t,n,r)]))}function Ule(e){let t=h2(`t`,e.temperatureSources,`temperature-sensor`,`celsius`),n=h2(`f`,e.temperatureSources,`temperature-sensor`,`lastFetchedAt`),r=h2(`d`,e.motionSources,`motion`,`detected`),i=h2(`m`,e.motionSources,`motion`,`lastDetectedAt`),a=Object.keys(i).map(t=>`within(${t}, ${e.occupancyWindowMs})`);return gl.parse({target:{kind:`new`,type:P.Sensor,role:F.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 g2=`8dec3b512fda40cbb8cd121c7a99f890`,_2=`provider-homeassistant`;function Wle(e){let t={addonId:_2,stableId:`ha:${e}:dev:${g2}`},n=e=>({addonId:_2,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 Gle(e){let t={d:m2(e.desiccantDays,`enum-sensor`,`value`)};return gl.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.kind":{kind:`expression`,expr:`"duration"`,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:m2(e.batteryStatus,`enum-sensor`,`value`)}},binary:{kind:`expression`,expr:`true`,bindings:{}},charging:{kind:`expression`,expr:`c ? "dc" : "unknown"`,bindings:{c:m2(e.batteryCharging,`binary`,`on`)}},sleeping:{kind:`expression`,expr:`false`,bindings:{}},lastUpdated:{kind:`expression`,expr:`now`,bindings:{}}}}]})}var v2=yo.filter(e=>e!==`switch`&&e!==`motion`);function Kle(e){let t=_o[e.cap];if(t===void 0||!v2.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 qle(e){return{kind:`expression`,expr:JSON.stringify(e),bindings:{}}}var Jle={"numeric-sensor":`value`,"temperature-sensor":`celsius`,"humidity-sensor":`percent`,"pressure-sensor":`hpa`,"ambient-light-sensor":`lux`};function Yle(e,t){return Jle[e]===t?`unit`:null}function Xle(e){if(e.from===e.to||!u2(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]:qle(e.to)}}}}function y2(e){return{source:e.source,cap:e.cap,fieldPath:e.fieldPath}}function Zle(e,t){return e.cap===t.cap&&e.fieldPath===t.fieldPath&&e.source.addonId===t.source.addonId&&e.source.stableId===t.source.stableId}function b2(e){return Object.keys(e)}function Qle(e){let t=b2(e.bindings);if(t.length===0)return null;let n=[];for(let r of t){let t=e.bindings[r];if(t===void 0||t.kind!==`from`)return null;n.push(y2(t))}let r=n[0];return r===void 0||!n.every(e=>e.cap===r.cap&&e.fieldPath===r.fieldPath)?null:{cap:r.cap,fieldPath:r.fieldPath,sources:n}}var $le=/^convert\(([A-Za-z_][A-Za-z0-9_]*),\s*"([^"]*)",\s*"([^"]*)"\)$/;function eue(e){let t=$le.exec(e.expr.trim());if(t===null)return null;let n=t[1],r=t[2],i=t[3];if(n===void 0||r===void 0||i===void 0||r===``||i===``||r===i)return null;let a=Object.keys(e.bindings);if(a.length!==1||a[0]!==n)return null;let o=e.bindings[n];return o===void 0||o.kind!==`from`?null:{kind:`convert-unit`,bindingName:n,from:r,to:i,source:y2(o)}}function x2(e,t){let n=Qle(e);if(n===null)return null;let r=b2(e.bindings).join(`, `);return t===`avg-round-1`&&e.expr===`round(avg(${r}), 1)`||t===`max`&&e.expr===`max(${r})`?n.sources:null}function S2(e){if(e.kind===`from`)return{kind:`from`,sources:[y2(e)],aggregate:null};if(e.kind!==`expression`)return{kind:`formula`,expr:``,bindings:{}};if(e.expr===`now`&&Object.keys(e.bindings).length===0)return{kind:`companion`,companion:`now`};let t=x2(e,`avg-round-1`);if(t!==null)return{kind:`from`,sources:t,aggregate:`avg-round-1`};let n=x2(e,`max`);if(n!==null)return{kind:`from`,sources:n,aggregate:`max`};let r=eue(e);return r===null?{kind:`formula`,expr:e.expr,bindings:e.bindings}:r}function C2(e,t){if(e.kind===`formula`)return{kind:`expression`,expr:e.expr,bindings:e.bindings};if(e.kind===`convert-unit`)return{kind:`expression`,expr:`convert(${e.bindingName}, ${JSON.stringify(e.from)}, ${JSON.stringify(e.to)})`,bindings:{[e.bindingName]:{kind:`from`,source:e.source.source,cap:e.source.cap,fieldPath:e.source.fieldPath}}};if(e.kind===`companion`)return{kind:`expression`,expr:`now`,bindings:{}};if(e.aggregate===null){let n=e.sources[0];return n===void 0?t??{kind:`expression`,expr:`null`,bindings:{}}:{kind:`from`,source:n.source,cap:n.cap,fieldPath:n.fieldPath}}return t!==void 0&&t.kind===`expression`?t:{kind:`expression`,expr:`null`,bindings:{}}}function tue(e){let t=o2(e);return t===void 0?[]:d2(t).filter(t=>t!==e&&u2(e,t))}var w2={battery:{version:1,targets:[{id:`percentage`,cardinality:`scalar`,deviceTypes:[P.Camera,P.Sensor,P.Button,P.Switch,P.PetFeeder,P.Container,P.Thermostat,P.EventEmitter],apply:`add`,vocabularyCap:`battery`,vocabularyStateField:`percentage`,sources:[{kind:`field`,valueKinds:[`number`,`string`],transformKinds:[`identity`,`linear`],transforms:[{kind:`identity`},{kind:`linear`,defaultScale:1,defaultOffset:0,clampMin:0,clampMax:100}]}],sourceReport:{status:`assignment-status`},advancedExpression:!0,path:`percentage`,valueKind:`number`,nullable:!0,companions:[{kind:`constant`,path:`charging`,value:`unknown`,when:`add`},{kind:`constant`,path:`sleeping`,value:!1,when:`add`},{kind:`clock`,path:`lastUpdated`,when:`add`}]}]},consumables:{version:1,targets:[{id:`items`,cardinality:`keyedArray`,deviceTypes:[P.Camera,P.Hub,P.Light,P.Siren,P.Switch,P.Sensor,P.Thermostat,P.Climate,P.Button,P.EventEmitter,P.Update,P.Generic,P.Notifier,P.Script,P.Automation,P.Lock,P.Cover,P.Valve,P.Humidifier,P.WaterHeater,P.Fan,P.MediaPlayer,P.AlarmPanel,P.Control,P.Presence,P.Weather,P.Vacuum,P.LawnMower,P.Container,P.Image,P.PetFeeder,P.Dishwasher,P.Washer,P.Dryer],apply:`add`,vocabularyCap:`consumables`,sources:[],sourceReport:{status:`assignment-status`},advancedExpression:!0,path:`items`,keyField:`key`,labelField:`label`,nativeItems:`read-only`,fields:[{path:`level`,valueKind:`number`,nullable:!0,sources:[{kind:`numeric`,transformKinds:[`identity`,`linear`],transforms:[{kind:`identity`},{kind:`linear`,defaultScale:1,defaultOffset:0,clampMin:0,clampMax:100}]}]},{path:`remaining.value`,valueKind:`number`,nullable:!0,sources:[{kind:`numeric`,transformKinds:[`identity`],transforms:[{kind:`identity`}]}],literals:[{path:`remaining.kind`,values:[`duration`,`count`]}]},{path:`status`,valueKind:`enum`,nullable:!0,enumValues:[`ok`,`low`,`empty`,`full`,`replace`],sources:[{kind:`enum`,transformKinds:[`enum-map`],transforms:[{kind:`enum-map`,outputValues:[`ok`,`low`,`empty`,`full`,`replace`],unmapped:null}]}]}],traits:[{path:`kind`,values:[`wear`,`supply`,`waste`],defaultValue:`wear`},{path:`form`,values:[`part`,`tank`,`product`,`bin`],defaultValue:`part`}],companions:[{kind:`clock`,path:`lastChangedAt`,when:`add`},{kind:`clock`,path:`lastFetchedAt`,when:`add`}]}]},doorbell:{version:1,targets:[{id:`pressed`,cardinality:`event`,deviceTypes:[P.Camera],apply:`add`,vocabularyCap:`doorbell`,vocabularyEvent:`onPressed`,sources:[{kind:`binary`,transformKinds:[],transforms:[]},{kind:`switch`,transformKinds:[],transforms:[]}],sourceReport:{status:`assignment-status`},advancedExpression:!0,shape:`pulse`,applyAuthority:{kind:`composition-claim`},eventName:`onPressed`,combine:`any`,edges:[`rising`],defaultEdge:`rising`,timestampPath:`lastPressedAt`,counterPath:`pressCountSinceStart`,highWater:`composer-advance`,debounceMs:2e3}]},motion:{version:1,targets:[{id:`detected`,cardinality:`event`,deviceTypes:[P.Camera],apply:`add`,vocabularyCap:`motion`,vocabularyEvent:`onMotionChanged`,sources:[{kind:`binary`,transformKinds:[],transforms:[]},{kind:`switch`,transformKinds:[],transforms:[]}],sourceReport:{status:`assignment-status`},advancedExpression:!1,shape:`span`,applyAuthority:{kind:`camera-sensors`,timeoutField:`motionCooldownMs`},eventName:`onMotionChanged`,combine:`any`,start:`rising-edge`,end:`falling-edge-or-timeout`,timeoutMs:3e4,sourceModes:[`in-addition`,`confirm`,`replace`]}]},"power-meter":{version:1,targets:[{id:`watts`,cardinality:`scalar`,deviceTypes:[P.Switch,P.Light,P.Fan,P.Climate,P.Thermostat,P.Humidifier,P.WaterHeater,P.MediaPlayer,P.Washer,P.Dryer,P.Dishwasher,P.Vacuum,P.LawnMower,P.PetFeeder],apply:`add`,vocabularyCap:`power-meter`,vocabularyStateField:`watts`,sources:[{kind:`numeric`,requiredUnit:`W`,transformKinds:[`identity`],transforms:[{kind:`identity`}]}],sourceReport:{status:`assignment-status`},advancedExpression:!0,path:`watts`,valueKind:`number`,nullable:!1,companions:[{kind:`clock`,path:`lastFetchedAt`,when:`always`}]},{id:`kwhTotal`,cardinality:`scalar`,deviceTypes:[P.Switch,P.Light,P.Fan,P.Climate,P.Thermostat,P.Humidifier,P.WaterHeater,P.MediaPlayer,P.Washer,P.Dryer,P.Dishwasher,P.Vacuum,P.LawnMower,P.PetFeeder],apply:`add`,vocabularyCap:`power-meter`,vocabularyStateField:`kwhTotal`,sources:[{kind:`numeric`,requiredUnit:`kWh`,transformKinds:[`identity`],transforms:[{kind:`identity`}]}],sourceReport:{status:`assignment-status`},advancedExpression:!0,path:`kwhTotal`,valueKind:`number`,nullable:!1,companions:[{kind:`clock`,path:`lastFetchedAt`,when:`always`}]},{id:`volts`,cardinality:`scalar`,deviceTypes:[P.Switch,P.Light,P.Fan,P.Climate,P.Thermostat,P.Humidifier,P.WaterHeater,P.MediaPlayer,P.Washer,P.Dryer,P.Dishwasher,P.Vacuum,P.LawnMower,P.PetFeeder],apply:`add`,vocabularyCap:`power-meter`,vocabularyStateField:`volts`,sources:[{kind:`numeric`,requiredUnit:`V`,transformKinds:[`identity`],transforms:[{kind:`identity`}]}],sourceReport:{status:`assignment-status`},advancedExpression:!0,path:`volts`,valueKind:`number`,nullable:!1,companions:[{kind:`clock`,path:`lastFetchedAt`,when:`always`}]},{id:`amps`,cardinality:`scalar`,deviceTypes:[P.Switch,P.Light,P.Fan,P.Climate,P.Thermostat,P.Humidifier,P.WaterHeater,P.MediaPlayer,P.Washer,P.Dryer,P.Dishwasher,P.Vacuum,P.LawnMower,P.PetFeeder],apply:`add`,vocabularyCap:`power-meter`,vocabularyStateField:`amps`,sources:[{kind:`numeric`,requiredUnit:`A`,transformKinds:[`identity`],transforms:[{kind:`identity`}]}],sourceReport:{status:`assignment-status`},advancedExpression:!0,path:`amps`,valueKind:`number`,nullable:!1,companions:[{kind:`clock`,path:`lastFetchedAt`,when:`always`}]}]},"running-state":{version:1,targets:[{id:`running`,cardinality:`scalar`,deviceTypes:[P.Washer,P.Dryer,P.Dishwasher,P.Vacuum,P.LawnMower,P.MediaPlayer,P.WaterHeater,P.Humidifier,P.Fan,P.Climate,P.Thermostat,P.PetFeeder],apply:`add`,vocabularyCap:`running-state`,vocabularyStateField:`running`,sources:[{kind:`switch`,transformKinds:[`identity`],transforms:[{kind:`identity`}]},{kind:`binary`,transformKinds:[`identity`,`invert`],transforms:[{kind:`identity`},{kind:`invert`}]},{kind:`numeric`,requiredUnit:`W`,transformKinds:[`threshold`],transforms:[{kind:`threshold`,comparisons:[`gte`,`lte`],comparison:`gte`,defaultThreshold:5,defaultStartDwellMs:3e4,defaultStopDwellMs:18e4,thresholdUnit:`W`}]}],sourceReport:{status:`assignment-status`,runtimeField:`source`,nativeValue:`native`,assignedValue:`assigned`},advancedExpression:!0,path:`running`,valueKind:`boolean`,nullable:!0,companions:[{kind:`constant`,path:`source`,value:`assigned`,when:`always`},{kind:`constant`,path:`phase`,value:null,when:`always`},{kind:`clock`,path:`lastFetchedAt`,when:`always`},{kind:`transition-time`,path:`since`,sourceChangedAt:`prefer`}]}]}},T2={"ambient-light-sensor":{lux:`lx`},battery:{percentage:`%`,volts:`V`},"humidity-sensor":{percent:`%`},"power-meter":{watts:`W`,kwhTotal:`kWh`,volts:`V`,amps:`A`},"temperature-sensor":{celsius:`°C`}};function E2(e,t,n){return{kind:`from`,source:e,cap:t,fieldPath:n}}function D2(e,t){return{kind:`expression`,expr:e,bindings:t}}function O2(e){return D2(e,{})}function nue(e,t){return e?.kind===`expression`&&e.expr===t&&Object.keys(e.bindings).length===0}var rue=w2;function k2(e){let t=j2(e.draft.cap,e.draft.targetId);if(t===null||t.shape!==`pulse`)return K(`target`);let n=t.timestampPath,r=t.counterPath;if(n===void 0||r===void 0||!lS(n)||!lS(r))return K(`path`);let i=oue(e.draft.edges,t);if(i===null)return K(`edge`);let a=aue(e);if(!a.ok)return a;if(a.value.length===0)return K(`sources`);let o=oS(e.draft.debounceMs);if(o===null)return K(`debounce`);let s=a.value.toSorted((e,t)=>A2(e).localeCompare(A2(t))),c=sue(i,s.length,o);return c===null?K(`edge`):{ok:!0,value:{kind:`fields`,cap:e.draft.cap,enabled:e.draft.enabled,fields:{[n]:D2(lue(c),uue(s)),[r]:D2(`count(${n})`,{[n]:E2(e.device,e.draft.cap,n)})}}}}function iue(e){let t=j2(e.draft.cap,e.draft.targetId);if(t===null||t.shape!==`span`)return K(`target`);if(t.applyAuthority?.kind!==`camera-sensors`)return K(`authority`);if(e.draft.timeoutMs<0||!Number.isFinite(e.draft.timeoutMs))return K(`timeout`);if(t.cooldownMs===void 0&&e.draft.cooldownMs!==void 0||e.draft.cooldownMs!==void 0&&e.draft.cooldownMs<0)return K(`cooldown`);let n=due(e.draft.sources,e.device,t.sourceModes);if(!n.ok)return n;if(n.value.length===0)return{ok:!0,value:{config:null,timeoutMs:e.draft.timeoutMs,cooldownMs:e.draft.cooldownMs}};let r=nF.safeParse({sensors:n.value});if(!r.success){let e=r.error.issues[0];return K(e===void 0?`cameraSensors`:e.message)}return{ok:!0,value:{config:r.data,timeoutMs:e.draft.timeoutMs,cooldownMs:e.draft.cooldownMs}}}function aue(e){if(e.changedAtFields.length!==e.draft.sources.length)return K(`changed-at`);let t=e.draft.sources.map((t,n)=>({source:t,changedAtField:e.changedAtFields[n]??``}));return t.some(e=>e.changedAtField.length===0||e.source.fieldPath.length===0)?K(`changed-at`):{ok:!0,value:t}}function A2(e){return`${e.source.addonId}/${e.source.stableId}#${e.source.cap}#${e.source.fieldPath}`}function oue(e,t){let n=t.edges??[],r=e??(t.defaultEdge===void 0?[]:[t.defaultEdge]);return r.length===0||r.some(e=>!n.includes(e))?null:r}function sue(e,t,n){let r=[];for(let i=0;i<t;i+=1)for(let t of e){let e=cue(t,i,n);if(e===null)return null;r.push(e)}return r}function cue(e,t,n){return e===`rising`?`rose(active${t}, changed${t}, ${n})`:null}function lue(e){return`latest(${e.join(`, `)})`}function uue(e){let t={};return e.forEach((e,n)=>{let r={addonId:e.source.addonId,stableId:e.source.stableId};t[`active${n}`]=E2(r,e.source.cap,e.source.fieldPath),t[`changed${n}`]=E2(r,e.source.cap,e.changedAtField)}),t}function due(e,t,n){let r=[];for(let i of e){if(i.addonId===t.addonId&&i.stableId===t.stableId)return K(`self`);let e=i.mode??`in-addition`;if(n!==void 0&&!n.includes(e)||n===void 0&&i.mode!==void 0&&i.mode!==`in-addition`)return K(`mode`);r.push({addonId:i.addonId,stableId:i.stableId,mode:e})}return{ok:!0,value:r}}function j2(e,t){let n=rue[e];return n===void 0?null:n.targets.find(e=>e.id===t)??null}function K(e){return{ok:!1,reason:e}}function M2(e){return Array.isArray(e)?e.map(M2):typeof e!=`object`||!e?e:Object.fromEntries(Object.entries(e).toSorted(([e],[t])=>e.localeCompare(t)).map(([e,t])=>[e,M2(t)]))}function N2(e){return M2(e)}function P2(e,t){return JSON.stringify(N2(e))===JSON.stringify(N2(t))}var fue=String.raw`rose\(active(\d+), changed(\d+), (\d+(?:\.\d+)?)\)`;function F2(e){if(e.feature.cap!==e.cap||e.feature.kind!==`fields`||e.feature.enabled===void 0)return null;let t=e.feature.fields[e.timestampPath],n=e.feature.fields[e.counterPath];if(t===void 0||n===void 0||Object.keys(e.feature.fields).length!==2)return null;let r=pue(t);if(r===null||hue(n,e)===null)return null;let i={kind:`pulse`,cap:e.cap,targetId:e.targetId,enabled:e.feature.enabled,debounceMs:r.debounceMs,sources:r.sources},a={draft:i,changedAtFields:r.changedAtFields},o=k2({draft:i,device:e.device,changedAtFields:r.changedAtFields});return o.ok&&gue(o.value,e.feature)?a:null}function pue(e){if(e.kind!==`expression`||!e.expr.startsWith(`latest(`)||!e.expr.endsWith(`)`))return null;let t=e.expr.slice(7,-1),n=[...t.matchAll(new RegExp(fue,`g`))];if(n.length===0||n.map(e=>e[0]).join(`, `)!==t||Object.keys(e.bindings).length!==n.length*2)return null;let r=n.map((t,n)=>mue(t,n,e.bindings));if(r.some(e=>e===null))return null;let i=r.filter(e=>e!==null),a=i[0]?.debounceMs;return a===void 0||i.some(e=>e.debounceMs!==a)?null:{debounceMs:a,sources:i.map(e=>e.source),changedAtFields:i.map(e=>e.changedAtField)}}function mue(e,t,n){let r=Number(e[1]),i=Number(e[2]),a=Number(e[3]);if(r!==t||i!==t||!Number.isFinite(a))return null;let o=I2(n[`active${t}`]),s=I2(n[`changed${t}`]);return o===null||s===null||o.cap!==s.cap||o.source.addonId!==s.source.addonId||o.source.stableId!==s.source.stableId?null:{debounceMs:a,changedAtField:s.fieldPath,source:{addonId:o.source.addonId,stableId:o.source.stableId,cap:o.cap,fieldPath:o.fieldPath}}}function I2(e){return e===void 0||e.kind!==`from`?null:e}function hue(e,t){if(e.kind!==`expression`||e.expr!==`count(${t.timestampPath})`)return null;let n=I2(e.bindings[t.timestampPath]);return n===null||Object.keys(e.bindings).length!==1||n.cap!==t.cap||n.fieldPath!==t.timestampPath||n.source.addonId!==t.device.addonId||n.source.stableId!==t.device.stableId?null:!0}function gue(e,t){return P2(L2(e),L2(t))}function L2(e){return{family:`composition`,target:{addonId:`t`,stableId:`t`},feature:e}}var _ue=w2;function R2(e){let t=vue(e.draft.cap,e.draft.targetId);if(t===null||t.cardinality!==`scalar`||t.path===void 0)return q(`target`);if(e.draft.transform.kind===`enum-map`)return q(`enum`);let n=yue(t,e.sourceValueKind,e.draft.source.cap);if(n===null)return q(`source-kind`);if(n.requiredUnit!==void 0&&e.sourceUnit!==n.requiredUnit)return q(`unit`);let r=e.draft.transform.kind===`number`?`identity`:e.draft.transform.kind;if(!n.transformKinds.includes(r))return q(`transform`);let i=bue(e);if(!i.ok)return i;let a=Tue(e,t,i.value);return a.ok?{ok:!0,value:{kind:`fields`,cap:e.draft.cap,fields:a.value}}:a}function q(e){return{ok:!1,reason:e}}function vue(e,t){let n=_ue[e];return n===void 0?null:n.targets.find(e=>e.id===t)??null}function yue(e,t,n){return t===`boolean`&&n===`switch`?e.sources.find(e=>e.kind===`switch`)??null:t===`boolean`?e.sources.find(e=>e.kind===`binary`)??z2(e,`boolean`):t===`number`?e.sources.find(e=>e.kind===`numeric`)??z2(e,`number`):z2(e,`string`)}function z2(e,t){return e.sources.find(e=>e.kind===`field`&&(e.valueKinds??[]).includes(t))??null}function bue(e){let t=E2(B2(e.draft),e.draft.source.cap,e.draft.source.fieldPath),n=e.draft.transform;return n.kind===`identity`||n.kind===`number`?{ok:!0,value:xue(t,e.sourceValueKind)}:n.kind===`invert`?e.sourceValueKind===`boolean`?{ok:!0,value:D2(`!x`,{x:t})}:q(`source-kind`):n.kind===`threshold`?Sue(n,t):n.kind===`linear`?Cue(n,t,e.sourceValueKind):q(`transform`)}function xue(e,t){return t===`string`?D2(`number(x)`,{x:e}):e}function Sue(e,t){let n=oS(e.threshold);if(n===null)return q(`threshold`);let r=oS(e.startDwellMs),i=oS(e.stopDwellMs);return r===null||i===null?q(`dwell`):{ok:!0,value:D2(uS(e.comparison,n,r,i),{x:t})}}function Cue(e,t,n){let r=sS(e.scale),i=sS(e.offset);if(r===null||i===null)return q(`scale`);let a=wue(e.clampMin,e.clampMax);return a.ok?{ok:!0,value:D2(dS(n===`string`?`number(x)`:`x`,r,i,a.value.min,a.value.max),{x:t})}:a}function wue(e,t){if(e===void 0&&t===void 0)return{ok:!0,value:{min:null,max:null}};if(e===void 0||t===void 0)return q(`clamp`);let n=sS(e),r=sS(t);return n===null||r===null||e>t?q(`clamp`):{ok:!0,value:{min:n,max:r}}}function Tue(e,t,n){if(t.path===void 0)return q(`target`);let r=t.path;return(t.companions??[]).filter(t=>Eue(t,e.apply)).reduce((t,n)=>{if(!t.ok)return t;let i=Due(e,r,n);return i.ok?{ok:!0,value:{...t.value,[n.path]:i.value}}:{ok:!1,reason:i.reason}},{ok:!0,value:{[r]:n}})}function Eue(e,t){return e.kind===`transition-time`?!0:e.when===`always`||t===`add`}function Due(e,t,n){if(n.kind===`constant`){let e=cS(n.value);return e===null?q(`scale`):{ok:!0,value:O2(e)}}return n.kind===`clock`?{ok:!0,value:O2(`now`)}:Oue(e,t,n.sourceChangedAt)}function Oue(e,t,n){if(n===`prefer`&&e.sourceValueKind===`boolean`&&e.changedAtField!==null&&lS(e.changedAtField))return{ok:!0,value:E2(B2(e.draft),e.draft.source.cap,e.changedAtField)};if(!lS(t))return q(`transform`);let r={[t]:E2(e.device,e.draft.cap,t)};return{ok:!0,value:D2(`latchedAt(${t})`,r)}}function B2(e){return{addonId:e.source.addonId,stableId:e.source.stableId}}var kue=w2;function V2(e){return(kue[e]?.targets??[]).filter(e=>e.cardinality===`scalar`&&e.path!==void 0)}function H2(e){return V2(e).length}function U2(e){return e.path??e.id}function W2(e){return[U2(e),...(e.companions??[]).map(e=>e.path)]}function G2(e,t){return V2(e).find(e=>e.id===t)??null}function K2(e,t){return Object.fromEntries(Object.entries(e).filter(([e])=>!t.has(e)))}function Aue(e,t,n,r){let i=G2(n,r);if(e===null||i===null||H2(n)<2)return t;let a=K2(e.fields,new Set(W2(i)));return{...e,...t,fields:{...a,...t.fields}}}function jue(e,t,n){if(e===null)return null;let r=G2(t,n);if(r===null||H2(t)<2)return null;let i=V2(t).filter(e=>e.id!==n).filter(t=>e.fields[U2(t)]!==void 0);if(i.length===0)return null;let a=new Set(i.flatMap(e=>W2(e))),o=new Set(W2(r).filter(e=>!a.has(e)));return{...e,fields:K2(e.fields,o)}}function q2(e,t,n){let r=G2(t,n);if(r===null||H2(t)<2)return e;let i=new Set(W2(r));return{...e,fields:Object.fromEntries(Object.entries(e.fields).filter(([e])=>i.has(e)))}}function Mue(e,t,n){if(e===null)return null;let r=G2(t,n);return r===null||H2(t)<2?e:e.fields[U2(r)]===void 0?null:e}var Nue=w2;function J2(e){let t=Pue(e.cap,e.targetId);if(t===null||t.cardinality!==`scalar`||t.path===void 0||e.feature.cap!==e.cap||e.feature.kind!==`fields`)return null;let n=Fue(t.valueKind);if(n===null)return null;let r=e.feature.fields[t.path],i=Iue(r,n,e.cap,e.targetId);if(i===null)return null;let a=Lue(t,e.feature.fields);if(a===null)return null;let o=Rue(t,e.feature.fields,i),s=zue(t,i.sourceValueKind,i.draft.source.cap),c={...i,apply:a,changedAtField:o,sourceUnit:s};return Bue(c,e.device,e.feature)?c:null}function Pue(e,t){let n=Nue[e];return n===void 0?null:n.targets.find(e=>e.id===t)??null}function Fue(e){return e===`boolean`||e===`number`||e===`string`?e:null}function Iue(e,t,n,r){if(e===void 0)return null;if(e.kind===`from`)return Y2(e,{kind:`identity`},t,n,r);if(e.kind!==`expression`)return null;if(e.expr===`number(x)`&&t===`number`)return Y2(e,{kind:`identity`},`string`,n,r);if(e.expr===`!x`&&t===`boolean`)return Y2(e,{kind:`invert`},`boolean`,n,r);let i=fS(e.expr);if(i!==null)return Y2(e,{kind:`threshold`,comparison:i.comparison,threshold:i.threshold,startDwellMs:i.startDwellMs,stopDwellMs:i.stopDwellMs},`number`,n,r);let a=pS(e.expr);return a===null||t!==`number`?null:Y2(e,{kind:`linear`,scale:a.scale,offset:a.offset,...a.clampMin===void 0||a.clampMax===void 0?{}:{clampMin:a.clampMin,clampMax:a.clampMax}},a.inner===`number(x)`?`string`:`number`,n,r)}function Y2(e,t,n,r,i){let a=mS(e);return a===null?null:{sourceValueKind:n,draft:{kind:`scalar`,cap:r,targetId:i,source:{addonId:a.addonId,stableId:a.stableId,cap:a.cap,fieldPath:a.fieldPath},transform:t}}}function Lue(e,t){let n=(e.companions??[]).flatMap(e=>e.kind!==`transition-time`&&e.when===`add`?[e.path]:[]);if(n.length===0)return`replace`;let r=n.filter(e=>t[e]!==void 0);return r.length===n.length?`add`:r.length===0?`replace`:null}function Rue(e,t,n){if(n.sourceValueKind!==`boolean`)return null;let r=(e.companions??[]).find(e=>e.kind===`transition-time`);if(r===void 0||r.sourceChangedAt!==`prefer`)return null;let i=t[r.path];return i?.kind!==`from`||i.cap!==n.draft.source.cap||i.source.addonId!==n.draft.source.addonId||i.source.stableId!==n.draft.source.stableId?null:i.fieldPath}function zue(e,t,n){return t===`boolean`&&n===`switch`?null:t===`number`?e.sources.find(e=>e.kind===`numeric`)?.requiredUnit??null:null}function Bue(e,t,n){let r=R2({draft:e.draft,device:t,apply:e.apply,sourceValueKind:e.sourceValueKind,changedAtField:e.changedAtField,sourceUnit:e.sourceUnit});return r.ok?Vue(r.value,q2(n,e.draft.cap,e.draft.targetId)):!1}function Vue(e,t){return P2(Z2(X2(e)),Z2(X2(t)))}function X2(e){let{enabled:t,...n}=e;return n}function Z2(e){return{family:`composition`,target:{addonId:`t`,stableId:`t`},feature:e}}var Hue=/^x == ("(?:\\.|[^"\\])*") \? ("(?:\\.|[^"\\])*"|null) : ([\s\S]+)$/;function Uue(e){let t=Object.keys(e).toSorted();return t.length===0?null:t.reduceRight((t,n)=>{if(t===null)return null;let r=e[n];if(r===void 0)return null;let i=r===null?`null`:JSON.stringify(r);return`x == ${JSON.stringify(n)} ? ${i} : ${t}`},`null`)}function Wue(e){let t={},n=e;for(;n!==`null`;){let e=Hue.exec(n);if(e===null||e[1]===void 0||e[2]===void 0||e[3]===void 0)return null;let r=Q2(e[1]),i=e[2]===`null`?null:Q2(e[2]);if(r===null||e[2]!==`null`&&i===null||Object.prototype.hasOwnProperty.call(t,r))return null;t[r]=i,n=e[3]}return Object.keys(t).length===0?null:t}function Gue(e){return{kind:`enum-map`,mapping:{...e}}}function Q2(e){try{let t=JSON.parse(e);return typeof t==`string`?t:null}catch{return null}}var Kue=w2;function $2(e){let t=Yue(e.cap,e.targetId);if(t===null||t.cardinality!==`keyedArray`)return J(`target`);if(e.items.length===0)return J(`items`);if(e.items.some(t=>t.draft.cap!==e.cap||t.draft.targetId!==e.targetId))return J(`target`);let n=e.items.map(e=>e.draft.key);if(new Set(n).size!==n.length)return J(`key`);let r=e.items.reduce((e,n)=>{if(!e.ok)return e;let r=Xue(t,n);return r.ok?{ok:!0,value:{...e.value,[n.draft.key]:r.value}}:r},{ok:!0,value:{}});if(!r.ok)return r;let i=ide(t,e.apply);return i.ok?{ok:!0,value:{kind:`fields`,cap:e.cap,fields:i.value,items:{...r.value}}}:i}function que(e,t,n){let r=t.items?.[n];return r===void 0?null:{kind:`fields`,cap:t.cap,...e?.enabled===void 0?{}:{enabled:e.enabled},fields:e===null?t.fields:e.fields,items:{...e?.items,[n]:r}}}function Jue(e,t){let n=Object.fromEntries(Object.entries(e.items??{}).filter(([e])=>e!==t));return Object.keys(n).length===0?null:{...e,items:n}}function J(e){return{ok:!1,reason:e}}function Yue(e,t){let n=Kue[e];return n===void 0?null:n.targets.find(e=>e.id===t)??null}function Xue(e,t){if(!al.test(t.draft.key)||t.draft.label.trim()===``)return J(`key`);let n=(e.fields??[]).find(e=>e.path===t.draft.fieldPath);if(n===void 0)return J(`field`);let r=Zue(n,t);if(r===null)return J(`source-kind`);if(r.requiredUnit!==void 0&&t.sourceUnit!==r.requiredUnit)return J(`unit`);let i=t.draft.transform.kind;if(!r.transformKinds.includes(i))return J(`transform`);let a=Que(t,n);if(!a.ok)return a;let o=nde(e,n,t,a.value);return o.ok?{ok:!0,value:{label:t.draft.label.trim(),fields:o.value}}:o}function Zue(e,t){return t.sourceValueKind===`number`?e.sources.find(e=>e.kind===`numeric`)??null:t.sourceValueKind===`enum`||t.sourceValueKind===`string`?e.sources.find(e=>e.kind===`enum`)??null:null}function Que(e,t){let n=E2(ode(e.draft),e.draft.source.cap,e.draft.source.fieldPath),r=e.draft.transform;return r.kind===`identity`?{ok:!0,value:n}:r.kind===`linear`?$ue(r,n):r.kind===`enum-map`?tde(r,n,t):J(`transform`)}function $ue(e,t){let n=sS(e.scale),r=sS(e.offset);if(n===null||r===null)return J(`scale`);let i=ede(e.clampMin,e.clampMax);return i.ok?{ok:!0,value:D2(dS(`x`,n,r,i.value.min,i.value.max),{x:t})}:i}function ede(e,t){if(e===void 0&&t===void 0)return{ok:!0,value:{min:null,max:null}};if(e===void 0||t===void 0)return J(`clamp`);let n=sS(e),r=sS(t);return n===null||r===null||e>t?J(`clamp`):{ok:!0,value:{min:n,max:r}}}function tde(e,t,n){let r=new Set(n.enumValues??[]),i=Object.entries(e.mapping);if(i.length===0||i.some(([e,t])=>e.length===0||t!==null&&!r.has(t)))return J(`enum`);let a=Uue(e.mapping);return a===null?J(`enum`):{ok:!0,value:D2(a,{x:t})}}function nde(e,t,n,r){let i=new Set((t.literals??[]).map(e=>e.path)),a=new Map((e.traits??[]).map(e=>[e.path,new Set(e.values)]));return[...i].filter(e=>!n.literals.some(t=>t.path===e)).length>0?J(`literal`):n.literals.reduce((e,n)=>{if(!e.ok)return e;if(n.path===t.path||e.value[n.path]!==void 0)return J(`literal`);let r=rde(t,a,n.path);if(r===null||!r.has(n.value))return J(`literal`);let i=cS(n.value);return i===null?J(`literal`):{ok:!0,value:{...e.value,[n.path]:O2(i)}}},{ok:!0,value:{[t.path]:r}})}function rde(e,t,n){let r=t.get(n);if(r!==void 0)return r;let i=(e.literals??[]).find(e=>e.path===n);return i===void 0?null:new Set(i.values)}function ide(e,t){return(e.companions??[]).filter(e=>ade(e,t)).reduce((e,t)=>e.ok?t.kind===`clock`?{ok:!0,value:{...e.value,[t.path]:O2(`now`)}}:J(`companion`):e,{ok:!0,value:{}})}function ade(e,t){return e.kind===`transition-time`?!1:e.when===`always`||t===`add`}function ode(e){return{addonId:e.source.addonId,stableId:e.source.stableId}}var sde=w2;function e4(e,t,n){let r=yde(t,n);if(r===null||r.cardinality!==`keyedArray`||e.cap!==t)return null;let i=_de(r,e.fields),a=i!==null&&vde(r,e.fields,i),o=Object.entries(e.items??{}).map(([e,i])=>cde(r,t,n,e,i,a));return{canonical:a,apply:i??`add`,items:o}}function t4(e){let t=e4(e.feature,e.cap,e.targetId);if(t===null||!t.canonical||t.items.some(e=>e.compile===null))return null;let n=t.items.flatMap(e=>e.compile===null?[]:[e.compile]),r=$2({cap:e.cap,targetId:e.targetId,device:e.device,apply:t.apply,items:n});return r.ok&&bde(r.value,e.feature)?t:null}function cde(e,t,n,r,i,a){let o={key:r,label:i.label,recognized:!1,compile:null};if(!a)return o;let s=lde(e,t,n,r,i);return s===null?o:{key:r,label:i.label,recognized:!0,compile:s}}function lde(e,t,n,r,i){let a=ude(e,i);if(a===null)return null;let o=fde(e,a.field,i,a.path);if(o===null)return null;let s=mde(t,n,r,i.label,a);if(s===null)return null;let c={draft:s,sourceValueKind:a.sourceValueKind,sourceUnit:null,literals:o};return hde(t,n,r,c,i)?c:null}function ude(e,t){let n=Object.keys(t.fields).filter(e=>!gde(t.fields[e]));if(n.length!==1)return null;let r=n[0];if(r===void 0)return null;let i=(e.fields??[]).find(e=>e.path===r),a=t.fields[r];if(i===void 0||a===void 0)return null;let o=dde(a,i);return o===null?null:{path:r,field:i,source:a,...o}}function dde(e,t){if(e.kind===`from`)return t.valueKind===`enum`?{sourceValueKind:`enum`,transform:{kind:`identity`}}:{sourceValueKind:`number`,transform:{kind:`identity`}};if(e.kind!==`expression`)return null;let n=Wue(e.expr);if(n!==null&&t.valueKind===`enum`)return{sourceValueKind:`enum`,transform:Gue(n)};let r=pS(e.expr);return r===null||r.inner!==`x`||t.valueKind!==`number`?null:{sourceValueKind:`number`,transform:{kind:`linear`,scale:r.scale,offset:r.offset,...r.clampMin===void 0||r.clampMax===void 0?{}:{clampMin:r.clampMin,clampMax:r.clampMax}}}}function fde(e,t,n,r){let i=new Set((t.literals??[]).map(e=>e.path)),a=new Set((e.traits??[]).map(e=>e.path)),o=Object.keys(n.fields).filter(e=>e!==r);if(o.some(e=>!i.has(e)&&!a.has(e))||[...i].some(e=>!o.includes(e)))return null;let s=o.map(e=>pde(n.fields[e],e));return s.some(e=>e===null)?null:s.flatMap(e=>e===null?[]:[e])}function pde(e,t){if(e?.kind!==`expression`||Object.keys(e.bindings).length!==0||!(e.expr.startsWith(`"`)&&e.expr.endsWith(`"`)))return null;try{let n=JSON.parse(e.expr);return typeof n==`string`?{path:t,value:n}:null}catch{return null}}function mde(e,t,n,r,i){let a=mS(i.source);return a===null?null:{kind:`keyedArray`,cap:e,targetId:t,key:n,label:r,fieldPath:i.path,source:{addonId:a.addonId,stableId:a.stableId,cap:a.cap,fieldPath:a.fieldPath},transform:i.transform}}function hde(e,t,n,r,i){let a=$2({cap:e,targetId:t,device:{addonId:`t`,stableId:`t`},apply:`add`,items:[r]});if(!a.ok)return!1;let o=a.value.items?.[n];return o===void 0?!1:JSON.stringify(o)===JSON.stringify(i)}function gde(e){return e?.kind===`expression`&&Object.keys(e.bindings).length===0}function _de(e,t){let n=(e.companions??[]).flatMap(e=>e.kind!==`transition-time`&&e.when===`add`?[e.path]:[]);if(n.length===0)return`replace`;let r=n.filter(e=>t[e]!==void 0);return r.length===n.length?`add`:r.length===0?`replace`:null}function vde(e,t,n){let r=(e.companions??[]).flatMap(e=>e.kind===`transition-time`?[]:e.when===`always`||n===`add`?[e.path]:[]);return Object.keys(t).toSorted().join(`,`)===[...r].toSorted().join(`,`)?r.every(e=>nue(t[e],`now`)):!1}function yde(e,t){let n=sde[e];return n===void 0?null:n.targets.find(e=>e.id===t)??null}function bde(e,t){return P2(r4(n4(e)),r4(n4(t)))}function n4(e){let{enabled:t,...n}=e;return n}function r4(e){return{family:`composition`,target:{addonId:`t`,stableId:`t`},feature:e}}function xde(e){return e.target.kind===`existing`?e.target.device:null}function Sde(e){return Object.hasOwn(w2,e)}function i4(e){return Sde(e)?w2[e].targets:[]}function Cde(e,t,n){for(let r of i4(e.cap)){if(r.cardinality!==`event`||r.shape!==`pulse`||r.timestampPath===void 0||r.counterPath===void 0)continue;let i=F2({feature:e,device:n,cap:e.cap,targetId:r.id,timestampPath:r.timestampPath,counterPath:r.counterPath});if(i!==null)return{featureIndex:t,card:{cardKind:`pulse`,cap:e.cap,targetId:r.id,decoded:i}}}return null}function wde(e,t,n){for(let r of i4(e.cap)){if(r.cardinality!==`scalar`)continue;let i=J2({feature:e,device:n,cap:e.cap,targetId:r.id});if(i!==null)return{featureIndex:t,card:{cardKind:`scalar`,cap:e.cap,targetId:r.id,decoded:i}}}return null}function Tde(e,t,n){for(let r of i4(e.cap)){if(r.cardinality!==`keyedArray`)continue;let i=t4({feature:e,device:n,cap:e.cap,targetId:r.id});if(i!==null)return{featureIndex:t,card:{cardKind:`keyedArray`,cap:e.cap,targetId:r.id,decoded:i}}}return null}function Ede(e){let t={};for(let[n,r]of Object.entries(e.fields))t[n]=S2(r);return{cardKind:`fields`,cap:e.cap,enabled:e.enabled,entries:t,items:e.items}}function Dde(e,t){return{featureIndex:t,card:Ede(e)}}function Ode(e,t,n){if(n!==null){let r=Cde(e,t,n);if(r!==null)return r;let i=wde(e,t,n);if(i!==null)return i;let a=Tde(e,t,n);if(a!==null)return a}return Dde(e,t)}function kde(e){let t=xde(e);return{model:{original:e,passthroughFeatures:e.features.flatMap((e,t)=>e.kind===`passthrough`?[{featureIndex:t,feature:e}]:[]),cards:e.features.flatMap((e,n)=>e.kind===`fields`?[Ode(e,n,t)]:[]),editedFieldPaths:{},editedCards:{}}}}function Ade(e){return e.target.kind===`existing`?e.target.device:null}function jde(e,t){let n=t.original.features[e.featureIndex];if(n===void 0||n.kind!==`fields`)throw Error(`card encode: missing original fields feature`);let r=e.card;if(r.cardKind!==`fields`)throw Error(`card encode: expected fields card`);let i=new Set(t.editedFieldPaths[r.cap]??[]),a={};for(let e of Object.keys(n.fields)){let t=n.fields[e];if(t===void 0)continue;if(!i.has(e)){a[e]=t;continue}let o=r.entries[e];if(o===void 0){a[e]=t;continue}a[e]=C2(o,t)}for(let e of i){if(a[e]!==void 0)continue;let t=r.entries[e];t!==void 0&&(a[e]=C2(t,void 0))}return{kind:`fields`,cap:r.cap,...r.enabled===void 0?{}:{enabled:r.enabled},fields:a,...r.items===void 0?{}:{items:r.items},...n.commands===void 0?{}:{commands:n.commands}}}function Mde(e,t){let n=t.original.features[e.featureIndex];if(n===void 0||n.kind!==`fields`)throw Error(`card encode: missing pulse feature`);if(t.editedCards[n.cap]===!0){let n=e.card;if(n.cardKind!==`pulse`)throw Error(`card encode: expected pulse card`);let r=Ade(t.original);if(r===null)throw Error(`card encode: pulse requires existing target device`);let i=k2({draft:n.decoded.draft,device:r,changedAtFields:n.decoded.changedAtFields});if(!i.ok)throw Error(i.reason);return i.value}return n}function Nde(e,t){let n=t.original.features[e.featureIndex];if(n===void 0||n.kind!==`fields`)throw Error(`card encode: missing scalar feature`);if(t.editedCards[n.cap]===!0)throw Error(`card encode: scalar edit not implemented in phase 1`);return n}function Pde(e,t){let n=t.original.features[e.featureIndex];if(n===void 0||n.kind!==`fields`)throw Error(`card encode: missing keyed feature`);if(t.editedCards[n.cap]===!0)throw Error(`card encode: keyed edit not implemented in phase 1`);return n}function Fde(e,t){switch(e.card.cardKind){case`pulse`:return Mde(e,t);case`scalar`:return Nde(e,t);case`keyedArray`:return Pde(e,t);case`fields`:return jde(e,t)}}function Ide(e){let t=new Map;for(let n of e.passthroughFeatures)t.set(n.featureIndex,n.feature);for(let n of e.cards)t.set(n.featureIndex,Fde(n,e));let n=[];for(let r=0;r<e.original.features.length;r+=1){let e=t.get(r);e!==void 0&&n.push(e)}return{target:e.original.target,features:n}}function a4(e,t,n){let r=e.editedFieldPaths[t]??[];return r.includes(n)?e:{...e,editedFieldPaths:{...e.editedFieldPaths,[t]:[...r,n]}}}function Lde(e,t,n,r){let i=a4(e,t,n),a=i.cards.map(e=>{if(e.card.cardKind!==`fields`||e.card.cap!==t)return e;let i=e.card.entries[n];return i===void 0||i.kind!==`formula`?e:{...e,card:{...e.card,entries:{...e.card.entries,[n]:{...i,expr:r}}}}});return{...i,cards:a}}function Rde(e,t){return vs({expr:e,bindings:t})}var zde={[F.BinarySensor]:`binary`,[F.MotionSensor]:`motion`},o4=new Set(xa);function Bde(e){if(e===null||e===``)return null;let t=zde[e];return t===void 0?o4.has(e)?e:null:o4.has(t)?t:null}function s4(e){return e.code===`missing-field`}function Vde(e){return e.some(s4)?`incomplete`:`complete`}function Hde(e){return e.some(e=>!s4(e))}function Ude(e){return of.some(t=>t===e)}var c4={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`},Wde={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 l4(e){let t={};for(let n of e){let e=c4[n]??v_.mapping[n];e!==void 0&&Ude(e)&&(t[n]=e)}return{mapping:t,preserveOriginal:!1}}function Gde(e){let t=l4(e),n=bh(e,t);return n.length>0?{classMap:t,suppliesSteps:n}:{classMap:t}}var u4=Object.freeze({person:.5,vehicle:.5,animal:.5}),d4=Object.freeze({person:.65,vehicle:.65,animal:.65});function Kde(e,t){return t===void 0?{...e===`plus`?d4:u4}:{...t}}var f4=[{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 qde(e){for(let t of f4){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 Jde(e,t=[]){for(let n of f4){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 p4=[`person`,`vehicle`,`animal`,`motion`,`audio`,`recording`,`live`,`heatmapScrub`,`package`,`sensor`,`control`,`face`,`plate`],Yde={recording:`Recording`,live:`Live cursor`,heatmapScrub:`Heatmap handle`,face:`Face`,plate:`Plate`};function Xde(e){return Qj(e)?.parentKind??Object.entries(v_.mapping).find(([t])=>t===e)?.[1]??null}function m4(e){let t=Yde[e];if(t!==void 0)return t;let n=Qj(e)?.label;return n===void 0?h_.find(t=>t.id===e)?.name??e:n}function Zde(){let e=new Set(p4);return p4.map(t=>{let n=[];for(let r of bj)e.has(r)||Xde(r)===t&&n.push({id:r,label:m4(r)});return{id:t,label:m4(t),children:n}})}var h4={Siren:F.Siren,Floodlight:F.Floodlight,Spotlight:F.Spotlight,PirSensor:F.PirSensor,Chime:F.Chime,Autotrack:F.Autotrack,Nightvision:F.Nightvision,PrivacyMask:F.PrivacyMask},Qde={[h4.Siren]:`Siren`,[h4.Floodlight]:`Floodlight`,[h4.Spotlight]:`Spotlight`,[h4.PirSensor]:`PIR`,[h4.Chime]:`Chime`,[h4.Autotrack]:`Autotracking`,[h4.Nightvision]:`Night Vision`,[h4.PrivacyMask]:`Privacy Mask`};function $de(e,t,n){let r=`${e}:${t}`;return typeof n==`number`?`${r}:${n}`:r}var g4=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}))}},_4=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(efe(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 efe(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 tfe={airQualitySensor:IU,alarmPanel:oM,ambientLightSensor:RU,audioMetrics:UU,automationControl:YU,battery:QU,binary:eW,brightness:nW,cameraStreams:Pb,carbonMonoxide:OW,climateControl:jW,color:LW,connectivity:WW,consumables:iG,contact:oG,control:uG,cover:pG,dayNight:yG,deviceDiscovery:ZT,deviceStatus:CG,dishwasher:PG,doorbell:zG,enumSensor:HG,eventEmitter:GG,fanControl:aK,featureProbe:sK,flood:lK,gas:dK,groupActive:gK,groupCommands:mK,groupStatus:vK,heatingValve:bK,humidifier:SK,humiditySensor:wK,image:EK,imageSettings:FK,intercom:JK,lawnMowerControl:QK,lockControl:xq,mediaPlayer:Oq,meter:Cq,motion:Rq,motionTrigger:Vq,motionZones:Kq,nativeObjectDetection:eJ,navigation:mJ,networkLink:bJ,notifier:YJ,numericSensor:ZJ,petFeeder:SY,powerMeter:TX,presence:OX,pressureSensor:AX,privacyMask:IX,ptzAutotrack:ZX,recordingOnboard:SQ,recordingSignal:GQ,runningState:sZ,sceneMonitor:h$,scriptRunner:b$,smoke:S$,streamCatalog:T$,streamParams:M$,streamSignals:iH,switch:R$,tamper:D1,temperatureSensor:k1,update:N1,vacuumControl:G1,valve:J1,vibration:X1,waterHeater:Q1,weather:e0,zoneAnalytics:l0,zoneRules:d0,zones:Zz},nfe=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:(e,t)=>{let n=t,r=Reflect.get(e,n);if(r!==void 0)return r;let i=tfe[n];if(!i)return;let a=this.sliceProxy(i);return Reflect.set(e,n,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=Cr(t);this.config=g4.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=_4.fromInitial(s,o,c),e.bindRuntimeState?.(this.runtimeState),e.registerNativeCap?.(CG,{});let l={online:!0,lastChangedAt:Date.now()};this.runtimeState.setCapState(`device-status`,l),e.registerNativeCap?.(sK,{}),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=qT(this.ctx.deviceMeta.metadata)??UT({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=WT(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:{[KT]:t}})}catch{}this.ctx.eventBus.emit(st(`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}};function rfe(e,t){return t===void 0?{kind:`unknown`,reason:e}:{kind:`unknown`,reason:e,known:t}}function ife(e){return{kind:`complete`,children:e}}var v4=[1e4,3e4,9e4],afe=4;function ofe(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 sfe(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 y4=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??v4,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 ofe(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 sfe(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 b4(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 cfe=class extends fn{async onInitialize(){return this.ctx.logger.info(`${this.providerName} Provider initialized`),[{capability:cD,provider:this}]}providerRegistrationsFromSuper(e){return Array.isArray(e)?e:e!==void 0&&e.providers!==void 0?[...e.providers]:[]}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(P).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=v4;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 y4({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(P).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(P).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 b4(e,this.addonId)}},lfe=360*6e4;function ufe(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 dfe(e){return e===`unreachable`}var x4=`media-player.alarm-panel.thermostat.climate.humidifier.water-heater.lock.cover.valve.fan.vacuum.lawn-mower.washer.dryer.dishwasher.light.switch.siren.button.control.notifier.script.automation.update.presence.weather.image.sensor`.split(`.`),S4=[`contact-sensor`,`motion-sensor`,`occupancy-sensor`,`smoke-sensor`,`co-sensor`,`gas-sensor`,`leak-sensor`,`vibration-sensor`,`tamper-sensor`,`sound-sensor`];function C4(e){if(e===void 0)return S4.length;let t=S4.indexOf(e);return t===-1?S4.length:t}function w4(e){let t=x4.indexOf(e);return t===-1?x4.length:t}function ffe(e,t){let n=e=>e.toLowerCase().replace(/[-_\s]+/g,` `).trim();return n(e)===n(t)}function T4(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&&ffe(e.name,n)?0:1;return[...e].toSorted((e,t)=>C4(e.role)-C4(t.role)||r(e)-r(t)||w4(e.type)-w4(t.type))[0]??null}function E4(e,t,n,r,i){if(r.has(e))return;let a=t.get(e);if(!a)return;if(a.type!==P.Container){i.add(e);return}let o=new Set(r);o.add(e);let s=T4((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&&E4(s.id,t,n,o,i)}function pfe(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=>E4(e,i,a,new Set,o);for(let e of r){if(e.type===P.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===P.Container){s(r.id);continue}o.add(e.id)}return o.delete(t),[...o]}var D4=`fixed`;function O4(e){let t=e??`hub`;return t.includes(`/`)?t.split(`/`)[0]??`hub`:t}var mfe=32,k4=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=O4(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:{[D4]:!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:{[D4]:!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 hfe(e,t){let n=await e.api.integrations.getByAddonId.query({addonId:JC});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 k4({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 gfe(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)}})}}function _fe(e){return e}var A4={[P.Cover]:`cover`,[P.Valve]:`valve`,[P.Humidifier]:`humidifier`,[P.WaterHeater]:`water-heater`,[P.Camera]:`dummy`,[P.Hub]:`dummy`,[P.Switch]:`switch`,[P.Siren]:`switch`,[P.Light]:`light`,[P.Fan]:`fan`,[P.Sensor]:`sensor`,[P.Thermostat]:`thermostat`,[P.Climate]:`climate`,[P.Button]:`button`,[P.EventEmitter]:`dummy`,[P.Update]:`update`,[P.Generic]:`dummy`,[P.Notifier]:`dummy`,[P.Script]:`script`,[P.Automation]:`automation`,[P.Lock]:`lock`,[P.MediaPlayer]:`media-player`,[P.AlarmPanel]:`alarm`,[P.Control]:`control`,[P.Presence]:`sensor`,[P.Weather]:`weather`,[P.Vacuum]:`vacuum`,[P.LawnMower]:`lawn-mower`,[P.Container]:`dummy`,[P.Image]:`image`,[P.PetFeeder]:`pet-feeder`,[P.Dishwasher]:`dishwasher`,[P.Washer]:`dummy`,[P.Dryer]:`dummy`},vfe=new Set(Object.values(P));function yfe(e){return vfe.has(e)?A4[e]:null}var j4=`motion-trigger`;function bfe(e){return e.includes(j4)}var M4=[`temperature-sensor`,`humidity-sensor`,`ambient-light-sensor`,`numeric-sensor`,`enum-sensor`];function xfe(e){let t=new Set(e.features);switch(e.type){case P.Cover:return{kind:`cover`};case P.Valve:return{kind:`valve`};case P.Lock:return{kind:`lock`};case P.AlarmPanel:return{kind:`alarm`};case P.Light:return t.has(`brightness`)?{kind:`brightness`}:{kind:`switch`};case P.Switch:case P.Siren:return{kind:`switch`};case P.Sensor:case P.Presence:{let e=M4.find(e=>t.has(e));return e?{kind:`sensor`,sensorFeature:e}:{kind:`none`}}default:return{kind:`none`}}}var Sfe={"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 N4(e){return e!==null&&(typeof e==`object`||typeof e==`function`)}function Cfe(e,t){if(!N4(e))return null;let n=e[t];if(!N4(n))return null;let r=n.mutate;return typeof r==`function`?r:null}var P4=Object.freeze({"accessories.getStatus":{capName:`accessories`,capScope:`device`,addonId:null,access:`view`,role:`viewer`},"accessories.setChildHidden":{capName:`accessories`,capScope:`device`,addonId:null,access:`create`,role:`admin`},"actions.create":{capName:`actions`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"actions.delete":{capName:`actions`,capScope:`system`,addonId:null,access:`delete`,role:`admin`},"actions.get":{capName:`actions`,capScope:`system`,addonId:null,access:`view`,role:`viewer`},"actions.getLinks":{capName:`actions`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"actions.getTraces":{capName:`actions`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"actions.list":{capName:`actions`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"actions.listForCamera":{capName:`actions`,capScope:`system`,addonId:null,access:`view`,role:`viewer`},"actions.run":{capName:`actions`,capScope:`system`,addonId:null,access:`create`,role:`viewer`},"actions.setLinks":{capName:`actions`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"actions.stop":{capName:`actions`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"actions.update":{capName:`actions`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"actionSource.listActions":{capName:`action-source`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"actionSource.runAction":{capName:`action-source`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"actionSource.stopAction":{capName:`action-source`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"addonPages.listPages":{capName:`addon-pages`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"addonPagesSource.listPages":{capName:`addon-pages-source`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"addonRoutes.getRoutes":{capName:`addon-routes`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"addonRoutes.invoke":{capName:`addon-routes`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"addons.applyAutoUpdateToAll":{capName:`addons`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"addons.cancelJob":{capName:`addons`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"addons.custom":{capName:`addons`,capScope:`system`,addonId:null,access:`create`,role:`viewer`},"addons.forceRefresh":{capName:`addons`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"addons.getAddonAutoUpdate":{capName:`addons`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"addons.getAutoUpdateSettings":{capName:`addons`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"addons.getJob":{capName:`addons`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"addons.getLastRestart":{capName:`addons`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"addons.getLogs":{capName:`addons`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"addons.getPackageDocs":{capName:`addons`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"addons.getVersions":{capName:`addons`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"addons.installFromWorkspace":{capName:`addons`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"addons.installPackage":{capName:`addons`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"addons.isWorkspaceAvailable":{capName:`addons`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"addons.list":{capName:`addons`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"addons.listCapabilityProviders":{capName:`addons`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"addons.listFrameworkPackages":{capName:`addons`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"addons.listInstallations":{capName:`addons`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"addons.listJobs":{capName:`addons`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"addons.listPackages":{capName:`addons`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"addons.listUpdates":{capName:`addons`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"addons.listWorkspacePackages":{capName:`addons`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"addons.onAddonLogs":{capName:`addons`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"addons.reloadPackages":{capName:`addons`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"addons.restartAddon":{capName:`addons`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"addons.restartServer":{capName:`addons`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"addons.retryLoad":{capName:`addons`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"addons.rollbackPackage":{capName:`addons`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"addons.searchAvailable":{capName:`addons`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"addons.setAddonAutoUpdate":{capName:`addons`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"addons.setAutoUpdateSettings":{capName:`addons`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"addons.setCapabilityProviderEnabled":{capName:`addons`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"addons.startJob":{capName:`addons`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"addons.uninstallPackage":{capName:`addons`,capScope:`system`,addonId:null,access:`delete`,role:`admin`},"addons.updatePackage":{capName:`addons`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"addonSettings.getDeviceSettings":{capName:`addon-settings`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"addonSettings.getGlobalSettings":{capName:`addon-settings`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"addonSettings.getIntegrationSettings":{capName:`addon-settings`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"addonSettings.updateDeviceSettings":{capName:`addon-settings`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"addonSettings.updateGlobalSettings":{capName:`addon-settings`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"addonWidgets.listWidgets":{capName:`addon-widgets`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"addonWidgetsSource.listWidgets":{capName:`addon-widgets-source`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"adminUi.getStaticDir":{capName:`admin-ui`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"adminUi.getVersion":{capName:`admin-ui`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"airQualitySensor.getStatus":{capName:`air-quality-sensor`,capScope:`device`,addonId:null,access:`view`,role:`viewer`},"alarmPanel.arm":{capName:`alarm-panel`,capScope:`device`,addonId:null,access:`create`,role:`viewer`},"alarmPanel.disarm":{capName:`alarm-panel`,capScope:`device`,addonId:null,access:`create`,role:`viewer`},"alarmPanel.getStatus":{capName:`alarm-panel`,capScope:`device`,addonId:null,access:`view`,role:`viewer`},"alarmPanel.trigger":{capName:`alarm-panel`,capScope:`device`,addonId:null,access:`create`,role:`viewer`},"alerts.dismiss":{capName:`alerts`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"alerts.emit":{capName:`alerts`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"alerts.getUnreadCount":{capName:`alerts`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"alerts.list":{capName:`alerts`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"alerts.markAllRead":{capName:`alerts`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"alerts.markRead":{capName:`alerts`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"alerts.update":{capName:`alerts`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"ambientLightSensor.getStatus":{capName:`ambient-light-sensor`,capScope:`device`,addonId:null,access:`view`,role:`viewer`},"audioAnalysis.applyDeviceSettingsPatch":{capName:`audio-analysis`,capScope:`device`,addonId:null,access:`create`,role:`admin`},"audioAnalysis.getDeviceLiveContribution":{capName:`audio-analysis`,capScope:`device`,addonId:null,access:`view`,role:`viewer`},"audioAnalysis.getDeviceSettingsContribution":{capName:`audio-analysis`,capScope:`device`,addonId:null,access:`view`,role:`viewer`},"audioAnalysis.resolveDeviceSettings":{capName:`audio-analysis`,capScope:`device`,addonId:null,access:`view`,role:`viewer`},"audioAnalyzer.analyseChunk":{capName:`audio-analyzer`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"audioAnalyzer.attachDevice":{capName:`audio-analyzer`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"audioAnalyzer.classify":{capName:`audio-analyzer`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"audioAnalyzer.detachDevice":{capName:`audio-analyzer`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"audioAnalyzer.dispose":{capName:`audio-analyzer`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"audioAnalyzer.isReady":{capName:`audio-analyzer`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"audioAnalyzer.reprobeAudioEngine":{capName:`audio-analyzer`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"audioCodec.canHandle":{capName:`audio-codec`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"audioCodec.closeSession":{capName:`audio-codec`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"audioCodec.createDecodeSession":{capName:`audio-codec`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"audioCodec.createEncodeSession":{capName:`audio-codec`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"audioCodec.flushEncode":{capName:`audio-codec`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"audioCodec.listActiveSessions":{capName:`audio-codec`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"audioCodec.listSupportedCodecs":{capName:`audio-codec`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"audioCodec.pullEncoded":{capName:`audio-codec`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"audioCodec.pullPcm":{capName:`audio-codec`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"audioCodec.pushEncodedFrame":{capName:`audio-codec`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"audioCodec.pushPcm":{capName:`audio-codec`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"audioMetrics.getCurrentSnapshot":{capName:`audio-metrics`,capScope:`device`,addonId:null,access:`view`,role:`viewer`},"audioMetrics.getHistory":{capName:`audio-metrics`,capScope:`device`,addonId:null,access:`view`,role:`viewer`},"authProvider.getLoginUrl":{capName:`auth-provider`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"authProvider.handleCallback":{capName:`auth-provider`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"authProvider.validateCredentials":{capName:`auth-provider`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"authProvider.validateToken":{capName:`auth-provider`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"automationControl.disable":{capName:`automation-control`,capScope:`device`,addonId:null,access:`create`,role:`admin`},"automationControl.enable":{capName:`automation-control`,capScope:`device`,addonId:null,access:`create`,role:`admin`},"automationControl.getStatus":{capName:`automation-control`,capScope:`device`,addonId:null,access:`view`,role:`viewer`},"automationControl.trigger":{capName:`automation-control`,capScope:`device`,addonId:null,access:`create`,role:`admin`},"backup.cancel":{capName:`backup`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"backup.checkBackupKey":{capName:`backup`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"backup.delete":{capName:`backup`,capScope:`system`,addonId:null,access:`delete`,role:`admin`},"backup.deleteSchedule":{capName:`backup`,capScope:`system`,addonId:null,access:`delete`,role:`admin`},"backup.disableEncryption":{capName:`backup`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"backup.getEncryption":{capName:`backup`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"backup.getEntries":{capName:`backup`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"backup.list":{capName:`backup`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"backup.listArchives":{capName:`backup`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"backup.listAvailableDatabases":{capName:`backup`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"backup.listDestinations":{capName:`backup`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"backup.listLocations":{capName:`backup`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"backup.listRuns":{capName:`backup`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"backup.listSchedules":{capName:`backup`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"backup.previewSchedule":{capName:`backup`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"backup.restore":{capName:`backup`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"backup.setupEncryption":{capName:`backup`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"backup.trigger":{capName:`backup`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"backup.upsertDestinationPolicy":{capName:`backup`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"backup.upsertSchedule":{capName:`backup`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"battery.getStatus":{capName:`battery`,capScope:`device`,addonId:null,access:`view`,role:`viewer`},"battery.wakeForStream":{capName:`battery`,capScope:`device`,addonId:null,access:`create`,role:`viewer`},"binary.getStatus":{capName:`binary`,capScope:`device`,addonId:null,access:`view`,role:`viewer`},"brightness.getStatus":{capName:`brightness`,capScope:`device`,addonId:null,access:`view`,role:`viewer`},"brightness.setBrightness":{capName:`brightness`,capScope:`device`,addonId:null,access:`create`,role:`viewer`},"broker.add":{capName:`broker`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"broker.get":{capName:`broker`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"broker.getBrokerConfig":{capName:`broker`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"broker.getSettings":{capName:`broker`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"broker.getSettingsSchema":{capName:`broker`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"broker.getState":{capName:`broker`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"broker.getStatus":{capName:`broker`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"broker.list":{capName:`broker`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"broker.listProviders":{capName:`broker`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"broker.publish":{capName:`broker`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"broker.remove":{capName:`broker`,capScope:`system`,addonId:null,access:`delete`,role:`admin`},"broker.setSettings":{capName:`broker`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"broker.subscribe":{capName:`broker`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"broker.testConnection":{capName:`broker`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"broker.testSettings":{capName:`broker`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"broker.unsubscribe":{capName:`broker`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"button.press":{capName:`button`,capScope:`device`,addonId:null,access:`create`,role:`viewer`},"calendars.getPreferences":{capName:`calendars`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"calendars.listCalendars":{capName:`calendars`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"calendars.listEvents":{capName:`calendars`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"calendars.setCalendarPreference":{capName:`calendars`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"calendarSource.listCalendars":{capName:`calendar-source`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"calendarSource.listEvents":{capName:`calendar-source`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"cameraCredentials.getCredentials":{capName:`camera-credentials`,capScope:`device`,addonId:null,access:`view`,role:`admin`},"cameraCredentials.getStatus":{capName:`camera-credentials`,capScope:`device`,addonId:null,access:`view`,role:`viewer`},"cameraGridLayout.applyDeviceSettingsPatch":{capName:`camera-grid-layout`,capScope:`device`,addonId:null,access:`create`,role:`admin`},"cameraGridLayout.getDeviceLiveContribution":{capName:`camera-grid-layout`,capScope:`device`,addonId:null,access:`view`,role:`viewer`},"cameraGridLayout.getDeviceSettingsContribution":{capName:`camera-grid-layout`,capScope:`device`,addonId:null,access:`view`,role:`viewer`},"cameraGridLayout.getLayout":{capName:`camera-grid-layout`,capScope:`device`,addonId:null,access:`view`,role:`admin`},"cameraGridLayout.saveLayout":{capName:`camera-grid-layout`,capScope:`device`,addonId:null,access:`create`,role:`admin`},"cameraPipelineConfig.applyDeviceSettingsPatch":{capName:`camera-pipeline-config`,capScope:`device`,addonId:null,access:`create`,role:`admin`},"cameraPipelineConfig.getDeviceLiveContribution":{capName:`camera-pipeline-config`,capScope:`device`,addonId:null,access:`view`,role:`viewer`},"cameraPipelineConfig.getDeviceSettingsContribution":{capName:`camera-pipeline-config`,capScope:`device`,addonId:null,access:`view`,role:`viewer`},"cameraStreams.getBrokerStreams":{capName:`camera-streams`,capScope:`device`,addonId:null,access:`view`,role:`viewer`},"cameraStreams.getCameraStreams":{capName:`camera-streams`,capScope:`device`,addonId:null,access:`view`,role:`viewer`},"cameraStreams.getProfileRtspEntries":{capName:`camera-streams`,capScope:`device`,addonId:null,access:`view`,role:`viewer`},"cameraStreams.getRtspEntries":{capName:`camera-streams`,capScope:`device`,addonId:null,access:`view`,role:`viewer`},"cameraStreams.pickStream":{capName:`camera-streams`,capScope:`device`,addonId:null,access:`view`,role:`viewer`},"carbonMonoxide.getStatus":{capName:`carbon-monoxide`,capScope:`device`,addonId:null,access:`view`,role:`viewer`},"climateControl.getStatus":{capName:`climate-control`,capScope:`device`,addonId:null,access:`view`,role:`viewer`},"climateControl.setFanMode":{capName:`climate-control`,capScope:`device`,addonId:null,access:`create`,role:`viewer`},"climateControl.setMode":{capName:`climate-control`,capScope:`device`,addonId:null,access:`create`,role:`viewer`},"climateControl.setPreset":{capName:`climate-control`,capScope:`device`,addonId:null,access:`create`,role:`viewer`},"climateControl.setSwingHorizontal":{capName:`climate-control`,capScope:`device`,addonId:null,access:`create`,role:`viewer`},"climateControl.setSwingVertical":{capName:`climate-control`,capScope:`device`,addonId:null,access:`create`,role:`viewer`},"climateControl.setTarget":{capName:`climate-control`,capScope:`device`,addonId:null,access:`create`,role:`viewer`},"climateControl.setTargetHumidity":{capName:`climate-control`,capScope:`device`,addonId:null,access:`create`,role:`viewer`},"climateControl.setTargetRange":{capName:`climate-control`,capScope:`device`,addonId:null,access:`create`,role:`viewer`},"color.getStatus":{capName:`color`,capScope:`device`,addonId:null,access:`view`,role:`viewer`},"color.setColor":{capName:`color`,capScope:`device`,addonId:null,access:`create`,role:`viewer`},"composer.applyBlocks":{capName:`composer`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"composer.getStates":{capName:`composer`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"connectionTest.describeTest":{capName:`connection-test`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"connectionTest.testSettings":{capName:`connection-test`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"connectivity.getStatus":{capName:`connectivity`,capScope:`device`,addonId:null,access:`view`,role:`viewer`},"consumables.getStatus":{capName:`consumables`,capScope:`device`,addonId:null,access:`view`,role:`viewer`},"consumables.reset":{capName:`consumables`,capScope:`device`,addonId:null,access:`delete`,role:`admin`},"contact.getStatus":{capName:`contact`,capScope:`device`,addonId:null,access:`view`,role:`viewer`},"control.getStatus":{capName:`control`,capScope:`device`,addonId:null,access:`view`,role:`viewer`},"control.setValue":{capName:`control`,capScope:`device`,addonId:null,access:`create`,role:`viewer`},"coreBlocks.compile":{capName:`core-blocks`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"coreBlocks.create":{capName:`core-blocks`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"coreBlocks.createComposition":{capName:`core-blocks`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"coreBlocks.delete":{capName:`core-blocks`,capScope:`system`,addonId:null,access:`delete`,role:`admin`},"coreBlocks.get":{capName:`core-blocks`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"coreBlocks.getAutomationRunState":{capName:`core-blocks`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"coreBlocks.getBlockSettings":{capName:`core-blocks`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"coreBlocks.getComposition":{capName:`core-blocks`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"coreBlocks.getCustomization":{capName:`core-blocks`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"coreBlocks.getTraces":{capName:`core-blocks`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"coreBlocks.getTypeDefs":{capName:`core-blocks`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"coreBlocks.list":{capName:`core-blocks`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"coreBlocks.listComposableCaps":{capName:`core-blocks`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"coreBlocks.listCompositions":{capName:`core-blocks`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"coreBlocks.migrateRawSecrets":{capName:`core-blocks`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"coreBlocks.reportAutomationRun":{capName:`core-blocks`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"coreBlocks.restart":{capName:`core-blocks`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"coreBlocks.setEnabled":{capName:`core-blocks`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"coreBlocks.update":{capName:`core-blocks`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"coreBlocks.updateBlockSettings":{capName:`core-blocks`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"coreBlocks.updateComposition":{capName:`core-blocks`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"coreBlocks.validateComposition":{capName:`core-blocks`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"cover.close":{capName:`cover`,capScope:`device`,addonId:null,access:`create`,role:`viewer`},"cover.getStatus":{capName:`cover`,capScope:`device`,addonId:null,access:`view`,role:`viewer`},"cover.open":{capName:`cover`,capScope:`device`,addonId:null,access:`create`,role:`viewer`},"cover.setPosition":{capName:`cover`,capScope:`device`,addonId:null,access:`create`,role:`viewer`},"cover.setTiltPosition":{capName:`cover`,capScope:`device`,addonId:null,access:`create`,role:`viewer`},"cover.stop":{capName:`cover`,capScope:`device`,addonId:null,access:`create`,role:`viewer`},"customModelRegistry.importModelBundle":{capName:`custom-model-registry`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"customModelRegistry.listModels":{capName:`custom-model-registry`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"databaseSnapshot.listDatabases":{capName:`database-snapshot`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"databaseSnapshot.writeSnapshot":{capName:`database-snapshot`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"dataStoreProvider.aggregate":{capName:`data-store-provider`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"dataStoreProvider.count":{capName:`data-store-provider`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"dataStoreProvider.declareCollection":{capName:`data-store-provider`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"dataStoreProvider.delete":{capName:`data-store-provider`,capScope:`system`,addonId:null,access:`delete`,role:`admin`},"dataStoreProvider.deleteWhere":{capName:`data-store-provider`,capScope:`system`,addonId:null,access:`delete`,role:`admin`},"dataStoreProvider.get":{capName:`data-store-provider`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"dataStoreProvider.getEngineInfo":{capName:`data-store-provider`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"dataStoreProvider.histogram":{capName:`data-store-provider`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"dataStoreProvider.insert":{capName:`data-store-provider`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"dataStoreProvider.insertMany":{capName:`data-store-provider`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"dataStoreProvider.isEmpty":{capName:`data-store-provider`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"dataStoreProvider.query":{capName:`data-store-provider`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"dataStoreProvider.set":{capName:`data-store-provider`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"dataStoreProvider.transact":{capName:`data-store-provider`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"dataStoreProvider.update":{capName:`data-store-provider`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"dataStoreProvider.updateWhere":{capName:`data-store-provider`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"dataStoreProvider.upsert":{capName:`data-store-provider`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"dataStoreProvider.upsertMany":{capName:`data-store-provider`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"dayNight.getOptions":{capName:`day-night`,capScope:`device`,addonId:null,access:`view`,role:`viewer`},"dayNight.getStatus":{capName:`day-night`,capScope:`device`,addonId:null,access:`view`,role:`viewer`},"dayNight.setSettings":{capName:`day-night`,capScope:`device`,addonId:null,access:`create`,role:`admin`},"decoder.getInfo":{capName:`decoder`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"decoder.reprobeHwaccel":{capName:`decoder`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"detectionPipeline.applyDeviceSettingsPatch":{capName:`detection-pipeline`,capScope:`device`,addonId:null,access:`create`,role:`admin`},"detectionPipeline.getDeviceLiveContribution":{capName:`detection-pipeline`,capScope:`device`,addonId:null,access:`view`,role:`viewer`},"detectionPipeline.getDeviceSettingsContribution":{capName:`detection-pipeline`,capScope:`device`,addonId:null,access:`view`,role:`viewer`},"deviceAdminLink.getAdminLink":{capName:`device-admin-link`,capScope:`device`,addonId:null,access:`view`,role:`admin`},"deviceAdoption.adopt":{capName:`device-adoption`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"deviceAdoption.getCandidate":{capName:`device-adoption`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"deviceAdoption.getStatus":{capName:`device-adoption`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"deviceAdoption.listCandidateFilters":{capName:`device-adoption`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"deviceAdoption.listCandidates":{capName:`device-adoption`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"deviceAdoption.refresh":{capName:`device-adoption`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"deviceAdoption.release":{capName:`device-adoption`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"deviceAdoption.resync":{capName:`device-adoption`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"deviceCredentials.deleteDeviceCredential":{capName:`device-credentials`,capScope:`system`,addonId:null,access:`delete`,role:`admin`},"deviceCredentials.getDeviceCaStatus":{capName:`device-credentials`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"deviceCredentials.getDeviceCertificateSettings":{capName:`device-credentials`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"deviceCredentials.listDeviceCredentials":{capName:`device-credentials`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"deviceCredentials.renameDeviceCredential":{capName:`device-credentials`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"deviceCredentials.revokeDeviceCredential":{capName:`device-credentials`,capScope:`system`,addonId:null,access:`delete`,role:`admin`},"deviceCredentials.setDeviceCertificateSettings":{capName:`device-credentials`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"deviceCredentials.startEnrollment":{capName:`device-credentials`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"deviceDiscovery.adoptDevice":{capName:`device-discovery`,capScope:`device`,addonId:null,access:`create`,role:`admin`},"deviceDiscovery.getStatus":{capName:`device-discovery`,capScope:`device`,addonId:null,access:`view`,role:`viewer`},"deviceDiscovery.listDiscovered":{capName:`device-discovery`,capScope:`device`,addonId:null,access:`view`,role:`viewer`},"deviceDiscovery.refreshDiscovery":{capName:`device-discovery`,capScope:`device`,addonId:null,access:`create`,role:`admin`},"deviceDiscovery.releaseDevice":{capName:`device-discovery`,capScope:`device`,addonId:null,access:`create`,role:`admin`},"deviceExport.applyDeviceSettingsPatch":{capName:`device-export`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"deviceExport.exposeDevice":{capName:`device-export`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"deviceExport.getDeviceLiveContribution":{capName:`device-export`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"deviceExport.getDeviceSettingsContribution":{capName:`device-export`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"deviceExport.getStatus":{capName:`device-export`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"deviceExport.listExposedDevices":{capName:`device-export`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"deviceExport.listSupportedDeviceKinds":{capName:`device-export`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"deviceExport.unexposeDevice":{capName:`device-export`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"deviceExtension.listCandidates":{capName:`device-extension`,capScope:`device`,addonId:null,access:`view`,role:`viewer`},"deviceExtension.listSlots":{capName:`device-extension`,capScope:`device`,addonId:null,access:`view`,role:`viewer`},"deviceExtension.listSources":{capName:`device-extension`,capScope:`device`,addonId:null,access:`view`,role:`viewer`},"deviceExtension.setSlot":{capName:`device-extension`,capScope:`device`,addonId:null,access:`create`,role:`admin`},"deviceHistory.declareSeries":{capName:`device-history`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"deviceHistory.deleteOrphanSeries":{capName:`device-history`,capScope:`system`,addonId:null,access:`delete`,role:`admin`},"deviceHistory.getDeviceEnabled":{capName:`device-history`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"deviceHistory.getStatus":{capName:`device-history`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"deviceHistory.listNodeSeries":{capName:`device-history`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"deviceHistory.listOrphanSeries":{capName:`device-history`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"deviceHistory.listSeries":{capName:`device-history`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"deviceHistory.query":{capName:`device-history`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"deviceHistory.queryMany":{capName:`device-history`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"deviceHistory.queryNode":{capName:`device-history`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"deviceHistory.record":{capName:`device-history`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"deviceHistory.recordBuckets":{capName:`device-history`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"deviceHistory.setDeviceEnabled":{capName:`device-history`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"deviceManager.addLocation":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"deviceManager.adoptDevice":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"deviceManager.adoptionAdopt":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"deviceManager.adoptionCancelJob":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"deviceManager.adoptionListCandidateFilters":{capName:`device-manager`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"deviceManager.adoptionListCandidates":{capName:`device-manager`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"deviceManager.adoptionListJobs":{capName:`device-manager`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"deviceManager.adoptionRefresh":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"deviceManager.adoptionRelease":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"deviceManager.adoptionResync":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"deviceManager.adoptionStartJob":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"deviceManager.allocateDeviceId":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"deviceManager.applyInitialMeta":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"deviceManager.cleanupDeletedDevicesData":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"deviceManager.createDevice":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"deviceManager.disable":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"deviceManager.discoverAllProviders":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"deviceManager.discoverDevices":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"deviceManager.discoverProvider":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"deviceManager.discoveryProviders":{capName:`device-manager`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"deviceManager.enable":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"deviceManager.getAllBindings":{capName:`device-manager`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"deviceManager.getBindings":{capName:`device-manager`,capScope:`system`,addonId:null,access:`view`,role:`viewer`},"deviceManager.getBindingsBatch":{capName:`device-manager`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"deviceManager.getChildren":{capName:`device-manager`,capScope:`system`,addonId:null,access:`view`,role:`viewer`},"deviceManager.getChildrenBatch":{capName:`device-manager`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"deviceManager.getConfigSchema":{capName:`device-manager`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"deviceManager.getCreationSchema":{capName:`device-manager`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"deviceManager.getDevice":{capName:`device-manager`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"deviceManager.getDeviceAggregate":{capName:`device-manager`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"deviceManager.getDeviceLiveInfoAggregate":{capName:`device-manager`,capScope:`system`,addonId:null,access:`view`,role:`viewer`},"deviceManager.getDeviceSettingsAggregate":{capName:`device-manager`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"deviceManager.getDeviceStatusAggregate":{capName:`device-manager`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"deviceManager.getDeviceStatusAggregateBatch":{capName:`device-manager`,capScope:`system`,addonId:null,access:`view`,role:`viewer`},"deviceManager.getLinkedDevices":{capName:`device-manager`,capScope:`system`,addonId:null,access:`view`,role:`viewer`},"deviceManager.getLinkedDevicesBatch":{capName:`device-manager`,capScope:`system`,addonId:null,access:`view`,role:`viewer`},"deviceManager.getRoleDisplayDefaults":{capName:`device-manager`,capScope:`system`,addonId:null,access:`view`,role:`viewer`},"deviceManager.getSettingsSchema":{capName:`device-manager`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"deviceManager.getStreamProfileMap":{capName:`device-manager`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"deviceManager.getStreamSources":{capName:`device-manager`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"deviceManager.getWireableFields":{capName:`device-manager`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"deviceManager.getWrapperActivation":{capName:`device-manager`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"deviceManager.listAll":{capName:`device-manager`,capScope:`system`,addonId:null,access:`view`,role:`viewer`},"deviceManager.listBindableCapsForDeviceType":{capName:`device-manager`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"deviceManager.listDeletedSince":{capName:`device-manager`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"deviceManager.listDeviceIdsByCaps":{capName:`device-manager`,capScope:`system`,addonId:null,access:`view`,role:`viewer`},"deviceManager.listLocationDescriptions":{capName:`device-manager`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"deviceManager.listLocationIcons":{capName:`device-manager`,capScope:`system`,addonId:null,access:`view`,role:`viewer`},"deviceManager.listLocations":{capName:`device-manager`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"deviceManager.listPersistedByAddon":{capName:`device-manager`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"deviceManager.listSiteZones":{capName:`device-manager`,capScope:`system`,addonId:null,access:`view`,role:`viewer`},"deviceManager.listWrappersForCap":{capName:`device-manager`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"deviceManager.loadConfig":{capName:`device-manager`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"deviceManager.loadMeta":{capName:`device-manager`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"deviceManager.loadRuntimeState":{capName:`device-manager`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"deviceManager.migrateDevice":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"deviceManager.persistConfig":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"deviceManager.probeStreams":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"deviceManager.providerCreationType":{capName:`device-manager`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"deviceManager.providerDiscoveryParamsSchema":{capName:`device-manager`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"deviceManager.registerDevice":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"deviceManager.remove":{capName:`device-manager`,capScope:`system`,addonId:null,access:`delete`,role:`admin`},"deviceManager.removeByIntegration":{capName:`device-manager`,capScope:`system`,addonId:null,access:`delete`,role:`admin`},"deviceManager.removeDevice":{capName:`device-manager`,capScope:`system`,addonId:null,access:`delete`,role:`admin`},"deviceManager.removeLocation":{capName:`device-manager`,capScope:`system`,addonId:null,access:`delete`,role:`admin`},"deviceManager.removeSiteZone":{capName:`device-manager`,capScope:`system`,addonId:null,access:`delete`,role:`admin`},"deviceManager.renameLocation":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"deviceManager.renameSiteZone":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"deviceManager.runDeviceAction":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"deviceManager.setChildLayout":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"deviceManager.setDisabled":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"deviceManager.setDisplay":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"deviceManager.setIntegrationId":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"deviceManager.setLinkDeviceId":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"deviceManager.setLocation":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"deviceManager.setLocationDescription":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"deviceManager.setLocationIcon":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"deviceManager.setLocationZone":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"deviceManager.setMetadata":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"deviceManager.setName":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"deviceManager.setPrimaryChildEntityId":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"deviceManager.setRole":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"deviceManager.setRoleDisplayDefaults":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"deviceManager.setSiteZone":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"deviceManager.setStreamProfileMap":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"deviceManager.setType":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"deviceManager.setWrapperActive":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"deviceManager.testCreationField":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"deviceManager.testField":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"deviceManager.updateConfig":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"deviceManager.updateDeviceField":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"deviceManager.updateDeviceFieldsBatch":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"deviceOps.getConfigEntries":{capName:`device-ops`,capScope:`device`,addonId:null,access:`view`,role:`viewer`},"deviceOps.getRawState":{capName:`device-ops`,capScope:`device`,addonId:null,access:`view`,role:`viewer`},"deviceOps.getSettingsSchema":{capName:`device-ops`,capScope:`device`,addonId:null,access:`view`,role:`viewer`},"deviceOps.getStreamSources":{capName:`device-ops`,capScope:`device`,addonId:null,access:`view`,role:`viewer`},"deviceOps.removeDevice":{capName:`device-ops`,capScope:`device`,addonId:null,access:`delete`,role:`admin`},"deviceOps.runAction":{capName:`device-ops`,capScope:`device`,addonId:null,access:`create`,role:`viewer`},"deviceOps.setConfig":{capName:`device-ops`,capScope:`device`,addonId:null,access:`create`,role:`admin`},"deviceProvider.adoptDiscoveredDevice":{capName:`device-provider`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"deviceProvider.createDevice":{capName:`device-provider`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"deviceProvider.discoverDevices":{capName:`device-provider`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"deviceProvider.getChildCreationSchema":{capName:`device-provider`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"deviceProvider.getDevices":{capName:`device-provider`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"deviceProvider.getDiscoveryParamsSchema":{capName:`device-provider`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"deviceProvider.getManualCreationType":{capName:`device-provider`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"deviceProvider.getStatus":{capName:`device-provider`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"deviceProvider.reloadDevice":{capName:`device-provider`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"deviceProvider.start":{capName:`device-provider`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"deviceProvider.stop":{capName:`device-provider`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"deviceProvider.supportsDiscovery":{capName:`device-provider`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"deviceProvider.supportsManualCreation":{capName:`device-provider`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"deviceProvider.testCreationField":{capName:`device-provider`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"deviceRemovalHook.listDeviceData":{capName:`device-removal-hook`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"deviceRemovalHook.onDeviceRemoved":{capName:`device-removal-hook`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"deviceState.claimFields":{capName:`device-state`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"deviceState.getAllSnapshots":{capName:`device-state`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"deviceState.getCapSlice":{capName:`device-state`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"deviceState.getNativeCapSlice":{capName:`device-state`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"deviceState.getSnapshot":{capName:`device-state`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"deviceState.listClaims":{capName:`device-state`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"deviceState.patchOwnedFields":{capName:`device-state`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"deviceState.releaseClaim":{capName:`device-state`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"deviceState.setCapSlice":{capName:`device-state`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"deviceStatus.getStatus":{capName:`device-status`,capScope:`device`,addonId:null,access:`view`,role:`viewer`},"dishwasher.getOptions":{capName:`dishwasher`,capScope:`device`,addonId:null,access:`view`,role:`viewer`},"dishwasher.getStatus":{capName:`dishwasher`,capScope:`device`,addonId:null,access:`view`,role:`viewer`},"dishwasher.pause":{capName:`dishwasher`,capScope:`device`,addonId:null,access:`create`,role:`viewer`},"dishwasher.resume":{capName:`dishwasher`,capScope:`device`,addonId:null,access:`create`,role:`viewer`},"dishwasher.setChildLock":{capName:`dishwasher`,capScope:`device`,addonId:null,access:`create`,role:`viewer`},"dishwasher.setExtraDry":{capName:`dishwasher`,capScope:`device`,addonId:null,access:`create`,role:`viewer`},"dishwasher.setHalfLoad":{capName:`dishwasher`,capScope:`device`,addonId:null,access:`create`,role:`viewer`},"dishwasher.setHygienePlus":{capName:`dishwasher`,capScope:`device`,addonId:null,access:`create`,role:`viewer`},"dishwasher.setIntensiveZone":{capName:`dishwasher`,capScope:`device`,addonId:null,access:`create`,role:`viewer`},"dishwasher.setOption":{capName:`dishwasher`,capScope:`device`,addonId:null,access:`create`,role:`viewer`},"dishwasher.setPower":{capName:`dishwasher`,capScope:`device`,addonId:null,access:`create`,role:`viewer`},"dishwasher.setProgram":{capName:`dishwasher`,capScope:`device`,addonId:null,access:`create`,role:`viewer`},"dishwasher.setVarioSpeedPlus":{capName:`dishwasher`,capScope:`device`,addonId:null,access:`create`,role:`viewer`},"dishwasher.start":{capName:`dishwasher`,capScope:`device`,addonId:null,access:`create`,role:`viewer`},"dishwasher.stop":{capName:`dishwasher`,capScope:`device`,addonId:null,access:`create`,role:`viewer`},"displayPalette.getPalette":{capName:`display-palette`,capScope:`system`,addonId:null,access:`view`,role:`viewer`},"displayPalette.listPresets":{capName:`display-palette`,capScope:`system`,addonId:null,access:`view`,role:`viewer`},"displayPalette.setPalette":{capName:`display-palette`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"doorbell.getStatus":{capName:`doorbell`,capScope:`device`,addonId:null,access:`view`,role:`viewer`},"embeddingEncoder.encode":{capName:`embedding-encoder`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"embeddingEncoder.encodeText":{capName:`embedding-encoder`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"embeddingEncoder.getInfo":{capName:`embedding-encoder`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"embeddingEncoder.resetFailedModels":{capName:`embedding-encoder`,capScope:`system`,addonId:null,access:`delete`,role:`admin`},"enumSensor.getStatus":{capName:`enum-sensor`,capScope:`device`,addonId:null,access:`view`,role:`viewer`},"eventEmitter.getStatus":{capName:`event-emitter`,capScope:`device`,addonId:null,access:`view`,role:`viewer`},"faceGallery.assignFace":{capName:`face-gallery`,capScope:`system`,addonId:null,access:`create`,role:`feature:face-assignment`},"faceGallery.assignFaces":{capName:`face-gallery`,capScope:`system`,addonId:null,access:`create`,role:`feature:face-assignment`},"faceGallery.auditIdentitySamples":{capName:`face-gallery`,capScope:`system`,addonId:null,access:`view`,role:`feature:face-assignment`},"faceGallery.createIdentity":{capName:`face-gallery`,capScope:`system`,addonId:null,access:`create`,role:`feature:face-assignment`},"faceGallery.deleteFace":{capName:`face-gallery`,capScope:`system`,addonId:null,access:`delete`,role:`feature:face-assignment`},"faceGallery.deleteIdentity":{capName:`face-gallery`,capScope:`system`,addonId:null,access:`delete`,role:`feature:face-assignment`},"faceGallery.getFaceByTrack":{capName:`face-gallery`,capScope:`system`,addonId:null,access:`view`,role:`viewer`},"faceGallery.getFaceMedia":{capName:`face-gallery`,capScope:`system`,addonId:null,access:`view`,role:`feature:face-assignment`},"faceGallery.listIdentities":{capName:`face-gallery`,capScope:`system`,addonId:null,access:`view`,role:`viewer`},"faceGallery.listIdentitySamples":{capName:`face-gallery`,capScope:`system`,addonId:null,access:`view`,role:`feature:face-assignment`},"faceGallery.listRecentFaces":{capName:`face-gallery`,capScope:`system`,addonId:null,access:`view`,role:`feature:face-assignment`},"faceGallery.removeSample":{capName:`face-gallery`,capScope:`system`,addonId:null,access:`delete`,role:`feature:face-assignment`},"faceGallery.renameIdentity":{capName:`face-gallery`,capScope:`system`,addonId:null,access:`create`,role:`feature:face-assignment`},"faceGallery.suggestFaceClusters":{capName:`face-gallery`,capScope:`system`,addonId:null,access:`view`,role:`feature:face-assignment`},"faceGallery.unassignFace":{capName:`face-gallery`,capScope:`system`,addonId:null,access:`create`,role:`feature:face-assignment`},"faceGallery.unassignFaces":{capName:`face-gallery`,capScope:`system`,addonId:null,access:`create`,role:`feature:face-assignment`},"failureContribution.list":{capName:`failure-contribution`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"fanControl.getStatus":{capName:`fan-control`,capScope:`device`,addonId:null,access:`view`,role:`viewer`},"fanControl.setDirection":{capName:`fan-control`,capScope:`device`,addonId:null,access:`create`,role:`viewer`},"fanControl.setOscillating":{capName:`fan-control`,capScope:`device`,addonId:null,access:`create`,role:`viewer`},"fanControl.setPercentage":{capName:`fan-control`,capScope:`device`,addonId:null,access:`create`,role:`viewer`},"fanControl.setPreset":{capName:`fan-control`,capScope:`device`,addonId:null,access:`create`,role:`viewer`},"featureProbe.getStatus":{capName:`feature-probe`,capScope:`device`,addonId:null,access:`view`,role:`viewer`},"filesystemBrowse.browse":{capName:`filesystem-browse`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"filesystemBrowse.createDir":{capName:`filesystem-browse`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"filesystemBrowse.listAllowedRoots":{capName:`filesystem-browse`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"flood.getStatus":{capName:`flood`,capScope:`device`,addonId:null,access:`view`,role:`viewer`},"gas.getStatus":{capName:`gas`,capScope:`device`,addonId:null,access:`view`,role:`viewer`},"groupActive.getStatus":{capName:`group-active`,capScope:`device`,addonId:null,access:`view`,role:`viewer`},"groupCommands.getStatus":{capName:`group-commands`,capScope:`device`,addonId:null,access:`view`,role:`viewer`},"groupStatus.getStatus":{capName:`group-status`,capScope:`device`,addonId:null,access:`view`,role:`viewer`},"heatingValve.getStatus":{capName:`heating-valve`,capScope:`device`,addonId:null,access:`view`,role:`viewer`},"humidifier.getStatus":{capName:`humidifier`,capScope:`device`,addonId:null,access:`view`,role:`viewer`},"humidifier.setMode":{capName:`humidifier`,capScope:`device`,addonId:null,access:`create`,role:`viewer`},"humidifier.setOn":{capName:`humidifier`,capScope:`device`,addonId:null,access:`create`,role:`viewer`},"humidifier.setTargetHumidity":{capName:`humidifier`,capScope:`device`,addonId:null,access:`create`,role:`viewer`},"humiditySensor.getStatus":{capName:`humidity-sensor`,capScope:`device`,addonId:null,access:`view`,role:`viewer`},"image.getStatus":{capName:`image`,capScope:`device`,addonId:null,access:`view`,role:`viewer`},"imageSettings.getOptions":{capName:`image-settings`,capScope:`device`,addonId:null,access:`view`,role:`viewer`},"imageSettings.getStatus":{capName:`image-settings`,capScope:`device`,addonId:null,access:`view`,role:`viewer`},"imageSettings.setSettings":{capName:`image-settings`,capScope:`device`,addonId:null,access:`create`,role:`admin`},"integrations.create":{capName:`integrations`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"integrations.delete":{capName:`integrations`,capScope:`system`,addonId:null,access:`delete`,role:`admin`},"integrations.get":{capName:`integrations`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"integrations.getAvailableTypes":{capName:`integrations`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"integrations.getByAddonId":{capName:`integrations`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"integrations.getSettings":{capName:`integrations`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"integrations.list":{capName:`integrations`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"integrations.setSettings":{capName:`integrations`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"integrations.testConnection":{capName:`integrations`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"integrations.update":{capName:`integrations`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"intercom.endTalkSession":{capName:`intercom`,capScope:`device`,addonId:null,access:`create`,role:`viewer`},"intercom.getStatus":{capName:`intercom`,capScope:`device`,addonId:null,access:`view`,role:`viewer`},"intercom.handleAnswer":{capName:`intercom`,capScope:`device`,addonId:null,access:`create`,role:`viewer`},"intercom.pushTalkAudio":{capName:`intercom`,capScope:`device`,addonId:null,access:`create`,role:`viewer`},"intercom.startSession":{capName:`intercom`,capScope:`device`,addonId:null,access:`create`,role:`viewer`},"intercom.startTalkSession":{capName:`intercom`,capScope:`device`,addonId:null,access:`create`,role:`viewer`},"intercom.stopSession":{capName:`intercom`,capScope:`device`,addonId:null,access:`create`,role:`viewer`},"keychain.delete":{capName:`keychain`,capScope:`system`,addonId:null,access:`delete`,role:`admin`},"keychain.deleteDeviceScope":{capName:`keychain`,capScope:`system`,addonId:null,access:`delete`,role:`admin`},"keychain.getState":{capName:`keychain`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"keychain.listMeta":{capName:`keychain`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"keychain.put":{capName:`keychain`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"keychain.resolve":{capName:`keychain`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"keychainAdmin.acknowledgeReset":{capName:`keychain-admin`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"keychainAdmin.deleteOrphans":{capName:`keychain-admin`,capScope:`system`,addonId:null,access:`delete`,role:`admin`},"keychainAdmin.downloadRecoveryKey":{capName:`keychain-admin`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"keychainAdmin.importSecret":{capName:`keychain-admin`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"keychainAdmin.listAudit":{capName:`keychain-admin`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"keychainAdmin.listSecrets":{capName:`keychain-admin`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"keychainAdmin.purgeRetiredKeys":{capName:`keychain-admin`,capScope:`system`,addonId:null,access:`delete`,role:`admin`},"keychainAdmin.resetKeychain":{capName:`keychain-admin`,capScope:`system`,addonId:null,access:`delete`,role:`admin`},"keychainAdmin.resetReport":{capName:`keychain-admin`,capScope:`system`,addonId:null,access:`delete`,role:`admin`},"keychainAdmin.reveal":{capName:`keychain-admin`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"keychainAdmin.rotateMasterKey":{capName:`keychain-admin`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"keychainAdmin.setSystemSecret":{capName:`keychain-admin`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"keychainAdmin.status":{capName:`keychain-admin`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"lawnMowerControl.dock":{capName:`lawn-mower-control`,capScope:`device`,addonId:null,access:`create`,role:`viewer`},"lawnMowerControl.getStatus":{capName:`lawn-mower-control`,capScope:`device`,addonId:null,access:`view`,role:`viewer`},"lawnMowerControl.pause":{capName:`lawn-mower-control`,capScope:`device`,addonId:null,access:`create`,role:`viewer`},"lawnMowerControl.startMowing":{capName:`lawn-mower-control`,capScope:`device`,addonId:null,access:`create`,role:`viewer`},"llm.cancel":{capName:`llm`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"llm.deleteModel":{capName:`llm`,capScope:`system`,addonId:null,access:`delete`,role:`admin`},"llm.deleteProfile":{capName:`llm`,capScope:`system`,addonId:null,access:`delete`,role:`admin`},"llm.generate":{capName:`llm`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"llm.generateVision":{capName:`llm`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"llm.getDefaults":{capName:`llm`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"llm.getRuntimeStatus":{capName:`llm`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"llm.getUsage":{capName:`llm`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"llm.installModel":{capName:`llm`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"llm.listModelCatalog":{capName:`llm`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"llm.listModels":{capName:`llm`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"llm.listNodeModels":{capName:`llm`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"llm.listProfileKinds":{capName:`llm`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"llm.listProfiles":{capName:`llm`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"llm.listRuntimeNodes":{capName:`llm`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"llm.migrateRawSecrets":{capName:`llm`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"llm.resolveModelRef":{capName:`llm`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"llm.setDefault":{capName:`llm`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"llm.startRuntime":{capName:`llm`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"llm.stopRuntime":{capName:`llm`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"llm.testProfile":{capName:`llm`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"llm.upsertProfile":{capName:`llm`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"llmRuntime.appleAvailability":{capName:`llm-runtime`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"llmRuntime.cancel":{capName:`llm-runtime`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"llmRuntime.complete":{capName:`llm-runtime`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"llmRuntime.completeApple":{capName:`llm-runtime`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"llmRuntime.deleteModel":{capName:`llm-runtime`,capScope:`system`,addonId:null,access:`delete`,role:`admin`},"llmRuntime.ensureStarted":{capName:`llm-runtime`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"llmRuntime.getDiskUsage":{capName:`llm-runtime`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"llmRuntime.installModel":{capName:`llm-runtime`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"llmRuntime.listLocalModels":{capName:`llm-runtime`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"llmRuntime.status":{capName:`llm-runtime`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"llmRuntime.stop":{capName:`llm-runtime`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"loadContribution.list":{capName:`load-contribution`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"localNetwork.addCustomAddress":{capName:`local-network`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"localNetwork.downloadCa":{capName:`local-network`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"localNetwork.getAddresses":{capName:`local-network`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"localNetwork.getAllowedAddresses":{capName:`local-network`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"localNetwork.getConnectionEndpoints":{capName:`local-network`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"localNetwork.getHubAddresses":{capName:`local-network`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"localNetwork.getNotificationEndpoint":{capName:`local-network`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"localNetwork.getPreferred":{capName:`local-network`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"localNetwork.getTlsStatus":{capName:`local-network`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"localNetwork.getViewerEndpoints":{capName:`local-network`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"localNetwork.list":{capName:`local-network`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"localNetwork.regenerateCertificate":{capName:`local-network`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"localNetwork.removeCustomAddress":{capName:`local-network`,capScope:`system`,addonId:null,access:`delete`,role:`admin`},"localNetwork.resetAllowlistToBestMatch":{capName:`local-network`,capScope:`system`,addonId:null,access:`delete`,role:`admin`},"localNetwork.revertToGeneratedCertificate":{capName:`local-network`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"localNetwork.setAddressRole":{capName:`local-network`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"localNetwork.setAllowedAddresses":{capName:`local-network`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"localNetwork.setNotificationEndpoint":{capName:`local-network`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"localNetwork.setViewerEndpoints":{capName:`local-network`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"localNetwork.uploadCertificate":{capName:`local-network`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"localNetwork.useStoredUploadedCertificate":{capName:`local-network`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"lockControl.getStatus":{capName:`lock-control`,capScope:`device`,addonId:null,access:`view`,role:`viewer`},"lockControl.lock":{capName:`lock-control`,capScope:`device`,addonId:null,access:`create`,role:`viewer`},"lockControl.open":{capName:`lock-control`,capScope:`device`,addonId:null,access:`create`,role:`viewer`},"lockControl.unlock":{capName:`lock-control`,capScope:`device`,addonId:null,access:`create`,role:`viewer`},"logChannels.apply":{capName:`log-channels`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"logChannels.list":{capName:`log-channels`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"logDestination.cancelRead":{capName:`log-destination`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"logDestination.describeRead":{capName:`log-destination`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"logDestination.read":{capName:`log-destination`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"logDestination.write":{capName:`log-destination`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"loginMethod.getLoginMethods":{capName:`login-method`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"mediaPlayer.getStatus":{capName:`media-player`,capScope:`device`,addonId:null,access:`view`,role:`viewer`},"mediaPlayer.next":{capName:`media-player`,capScope:`device`,addonId:null,access:`create`,role:`viewer`},"mediaPlayer.pause":{capName:`media-player`,capScope:`device`,addonId:null,access:`create`,role:`viewer`},"mediaPlayer.play":{capName:`media-player`,capScope:`device`,addonId:null,access:`create`,role:`viewer`},"mediaPlayer.playMedia":{capName:`media-player`,capScope:`device`,addonId:null,access:`create`,role:`viewer`},"mediaPlayer.previous":{capName:`media-player`,capScope:`device`,addonId:null,access:`create`,role:`viewer`},"mediaPlayer.seek":{capName:`media-player`,capScope:`device`,addonId:null,access:`create`,role:`viewer`},"mediaPlayer.selectSource":{capName:`media-player`,capScope:`device`,addonId:null,access:`create`,role:`viewer`},"mediaPlayer.setMute":{capName:`media-player`,capScope:`device`,addonId:null,access:`create`,role:`viewer`},"mediaPlayer.setRepeat":{capName:`media-player`,capScope:`device`,addonId:null,access:`create`,role:`viewer`},"mediaPlayer.setShuffle":{capName:`media-player`,capScope:`device`,addonId:null,access:`create`,role:`viewer`},"mediaPlayer.setVolume":{capName:`media-player`,capScope:`device`,addonId:null,access:`create`,role:`viewer`},"mediaPlayer.stop":{capName:`media-player`,capScope:`device`,addonId:null,access:`create`,role:`viewer`},"meshNetwork.getStatus":{capName:`mesh-network`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"meshNetwork.join":{capName:`mesh-network`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"meshNetwork.leave":{capName:`mesh-network`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"meshNetwork.listPeers":{capName:`mesh-network`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"meshNetwork.logout":{capName:`mesh-network`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"meshNetwork.startLogin":{capName:`mesh-network`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"meshNetwork.testConnection":{capName:`mesh-network`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"meter.getStatus":{capName:`meter`,capScope:`device`,addonId:null,access:`view`,role:`viewer`},"metricsProvider.collectSnapshot":{capName:`metrics-provider`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"metricsProvider.getAddonStats":{capName:`metrics-provider`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"metricsProvider.getCached":{capName:`metrics-provider`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"metricsProvider.getCpuTemperature":{capName:`metrics-provider`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"metricsProvider.getCurrent":{capName:`metrics-provider`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"metricsProvider.getDiskSpace":{capName:`metrics-provider`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"metricsProvider.getGpuInfo":{capName:`metrics-provider`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"metricsProvider.getLoadSeries":{capName:`metrics-provider`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"metricsProvider.getProcessStats":{capName:`metrics-provider`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"metricsProvider.listAddonInstances":{capName:`metrics-provider`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"metricsProvider.listNodeProcesses":{capName:`metrics-provider`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"modelConvert.convert":{capName:`model-convert`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"modelDistributor.distributeModel":{capName:`model-distributor`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"motion.getStatus":{capName:`motion`,capScope:`device`,addonId:null,access:`view`,role:`viewer`},"motion.isDetected":{capName:`motion`,capScope:`device`,addonId:null,access:`view`,role:`viewer`},"motionDetection.analyze":{capName:`motion-detection`,capScope:`device`,addonId:null,access:`create`,role:`admin`},"motionDetection.applyDeviceSettingsPatch":{capName:`motion-detection`,capScope:`device`,addonId:null,access:`create`,role:`admin`},"motionDetection.getDeviceLiveContribution":{capName:`motion-detection`,capScope:`device`,addonId:null,access:`view`,role:`viewer`},"motionDetection.getDeviceSettingsContribution":{capName:`motion-detection`,capScope:`device`,addonId:null,access:`view`,role:`viewer`},"motionDetection.removeCamera":{capName:`motion-detection`,capScope:`device`,addonId:null,access:`delete`,role:`admin`},"motionDetection.reset":{capName:`motion-detection`,capScope:`device`,addonId:null,access:`delete`,role:`admin`},"motionTrigger.getStatus":{capName:`motion-trigger`,capScope:`device`,addonId:null,access:`view`,role:`viewer`},"motionTrigger.setMotionTrigger":{capName:`motion-trigger`,capScope:`device`,addonId:null,access:`create`,role:`viewer`},"motionZones.getOptions":{capName:`motion-zones`,capScope:`device`,addonId:null,access:`view`,role:`viewer`},"motionZones.getStatus":{capName:`motion-zones`,capScope:`device`,addonId:null,access:`view`,role:`viewer`},"motionZones.setZone":{capName:`motion-zones`,capScope:`device`,addonId:null,access:`create`,role:`admin`},"mqttBroker.addBroker":{capName:`mqtt-broker`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"mqttBroker.getBrokerConfig":{capName:`mqtt-broker`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"mqttBroker.getStatus":{capName:`mqtt-broker`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"mqttBroker.listBrokers":{capName:`mqtt-broker`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"mqttBroker.removeBroker":{capName:`mqtt-broker`,capScope:`system`,addonId:null,access:`delete`,role:`admin`},"mqttBroker.startEmbeddedBroker":{capName:`mqtt-broker`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"mqttBroker.stopEmbeddedBroker":{capName:`mqtt-broker`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"mqttBroker.testConnection":{capName:`mqtt-broker`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"nativeObjectDetection.getOptions":{capName:`native-object-detection`,capScope:`device`,addonId:null,access:`view`,role:`viewer`},"nativeObjectDetection.getStatus":{capName:`native-object-detection`,capScope:`device`,addonId:null,access:`view`,role:`viewer`},"nativeObjectDetection.setEnabled":{capName:`native-object-detection`,capScope:`device`,addonId:null,access:`create`,role:`admin`},"nativeObjectDetection.setSettings":{capName:`native-object-detection`,capScope:`device`,addonId:null,access:`create`,role:`admin`},"navigation.getFeatures":{capName:`navigation`,capScope:`device`,addonId:null,access:`view`,role:`viewer`},"navigation.getStatus":{capName:`navigation`,capScope:`device`,addonId:null,access:`view`,role:`viewer`},"navigation.goToPoint":{capName:`navigation`,capScope:`device`,addonId:null,access:`create`,role:`viewer`},"navigation.listActions":{capName:`navigation`,capScope:`device`,addonId:null,access:`view`,role:`viewer`},"navigation.move":{capName:`navigation`,capScope:`device`,addonId:null,access:`create`,role:`viewer`},"navigation.playSound":{capName:`navigation`,capScope:`device`,addonId:null,access:`create`,role:`viewer`},"navigation.runAction":{capName:`navigation`,capScope:`device`,addonId:null,access:`create`,role:`viewer`},"navigation.setLightLevel":{capName:`navigation`,capScope:`device`,addonId:null,access:`create`,role:`viewer`},"navigation.setLightMode":{capName:`navigation`,capScope:`device`,addonId:null,access:`create`,role:`viewer`},"navigation.setLightOn":{capName:`navigation`,capScope:`device`,addonId:null,access:`create`,role:`viewer`},"navigation.stop":{capName:`navigation`,capScope:`device`,addonId:null,access:`create`,role:`viewer`},"networkAccess.getEndpoint":{capName:`network-access`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"networkAccess.getStatus":{capName:`network-access`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"networkAccess.listEndpoints":{capName:`network-access`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"networkAccess.start":{capName:`network-access`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"networkAccess.stop":{capName:`network-access`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"networkLink.getStatus":{capName:`network-link`,capScope:`device`,addonId:null,access:`view`,role:`viewer`},"networkQuality.getAllStats":{capName:`network-quality`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"networkQuality.getDeviceStats":{capName:`network-quality`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"networkQuality.reportClientStats":{capName:`network-quality`,capScope:`system`,addonId:null,access:`create`,role:`viewer`},"nodeCertificates.confirmMeshLeaf":{capName:`node-certificates`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"nodeCertificates.forgetHub":{capName:`node-certificates`,capScope:`system`,addonId:null,access:`delete`,role:`admin`},"nodeCertificates.getCertificates":{capName:`node-certificates`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"nodeCertificates.installHttpsCertificate":{capName:`node-certificates`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"nodeCertificates.installMeshLeaf":{capName:`node-certificates`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"nodeCertificates.prepareHttpsCertificate":{capName:`node-certificates`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"nodeCertificates.prepareMeshRenewal":{capName:`node-certificates`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"nodeCertificates.rollbackMeshLeaf":{capName:`node-certificates`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"nodes.clusterAddonStatus":{capName:`nodes`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"nodes.deployAddon":{capName:`nodes`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"nodes.directory":{capName:`nodes`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"nodes.executeQuery":{capName:`nodes`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"nodes.getCapUsageGraph":{capName:`nodes`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"nodes.getNodeAddons":{capName:`nodes`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"nodes.renameNode":{capName:`nodes`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"nodes.restartAddon":{capName:`nodes`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"nodes.restartNode":{capName:`nodes`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"nodes.restartProcess":{capName:`nodes`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"nodes.setProcessLogLevel":{capName:`nodes`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"nodes.shutdownNode":{capName:`nodes`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"nodes.topology":{capName:`nodes`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"nodes.undeployAddon":{capName:`nodes`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"notificationOutput.deleteTarget":{capName:`notification-output`,capScope:`system`,addonId:null,access:`delete`,role:`admin`},"notificationOutput.discoverTargets":{capName:`notification-output`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"notificationOutput.getTarget":{capName:`notification-output`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"notificationOutput.listTargetKinds":{capName:`notification-output`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"notificationOutput.listTargets":{capName:`notification-output`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"notificationOutput.probeTargetConfig":{capName:`notification-output`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"notificationOutput.send":{capName:`notification-output`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"notificationOutput.setTargetEnabled":{capName:`notification-output`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"notificationOutput.testTarget":{capName:`notification-output`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"notificationOutput.upsertTarget":{capName:`notification-output`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"notificationRules.activateAlarmProfile":{capName:`notification-rules`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"notificationRules.cancelSnooze":{capName:`notification-rules`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"notificationRules.createAlarmProfile":{capName:`notification-rules`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"notificationRules.createRule":{capName:`notification-rules`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"notificationRules.createSequence":{capName:`notification-rules`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"notificationRules.createSnooze":{capName:`notification-rules`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"notificationRules.deleteAlarmProfile":{capName:`notification-rules`,capScope:`system`,addonId:null,access:`delete`,role:`admin`},"notificationRules.deleteRule":{capName:`notification-rules`,capScope:`system`,addonId:null,access:`delete`,role:`admin`},"notificationRules.deleteSequence":{capName:`notification-rules`,capScope:`system`,addonId:null,access:`delete`,role:`admin`},"notificationRules.getAlarmConfig":{capName:`notification-rules`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"notificationRules.getAlarmSensors":{capName:`notification-rules`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"notificationRules.getClipRetentionAsks":{capName:`notification-rules`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"notificationRules.getConditionCatalog":{capName:`notification-rules`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"notificationRules.getHistory":{capName:`notification-rules`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"notificationRules.getRule":{capName:`notification-rules`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"notificationRules.getRuleLastRuns":{capName:`notification-rules`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"notificationRules.getSequence":{capName:`notification-rules`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"notificationRules.getTemplateCatalog":{capName:`notification-rules`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"notificationRules.listDeviceMutes":{capName:`notification-rules`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"notificationRules.listRules":{capName:`notification-rules`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"notificationRules.listSequences":{capName:`notification-rules`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"notificationRules.listSnoozes":{capName:`notification-rules`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"notificationRules.previewStateSummary":{capName:`notification-rules`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"notificationRules.previewTemplate":{capName:`notification-rules`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"notificationRules.renameAlarmProfile":{capName:`notification-rules`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"notificationRules.resolveArtifactUrl":{capName:`notification-rules`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"notificationRules.setAlarmConfig":{capName:`notification-rules`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"notificationRules.setDeviceMuted":{capName:`notification-rules`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"notificationRules.setRuleEnabled":{capName:`notification-rules`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"notificationRules.testRule":{capName:`notification-rules`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"notificationRules.updateRule":{capName:`notification-rules`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"notificationRules.updateSequence":{capName:`notification-rules`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"notifier.cancel":{capName:`notifier`,capScope:`device`,addonId:null,access:`create`,role:`admin`},"notifier.getStatus":{capName:`notifier`,capScope:`device`,addonId:null,access:`view`,role:`viewer`},"notifier.send":{capName:`notifier`,capScope:`device`,addonId:null,access:`create`,role:`admin`},"numericSensor.getStatus":{capName:`numeric-sensor`,capScope:`device`,addonId:null,access:`view`,role:`viewer`},"oauthIntegration.getDescriptor":{capName:`oauth-integration`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"oidcConnections.connectionFormSchema":{capName:`oidc-connections`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"oidcConnections.createConnection":{capName:`oidc-connections`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"oidcConnections.deleteConnection":{capName:`oidc-connections`,capScope:`system`,addonId:null,access:`delete`,role:`admin`},"oidcConnections.listConnections":{capName:`oidc-connections`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"oidcConnections.updateConnection":{capName:`oidc-connections`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"osd.getStatus":{capName:`osd`,capScope:`device`,addonId:null,access:`view`,role:`viewer`},"osd.setOverlay":{capName:`osd`,capScope:`device`,addonId:null,access:`create`,role:`admin`},"osdManager.clearSlotBinding":{capName:`osd-manager`,capScope:`system`,addonId:null,access:`delete`,role:`admin`},"osdManager.copyDeviceConfiguration":{capName:`osd-manager`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"osdManager.deleteTemplate":{capName:`osd-manager`,capScope:`system`,addonId:null,access:`delete`,role:`admin`},"osdManager.getConditionSupport":{capName:`osd-manager`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"osdManager.getDeviceOsd":{capName:`osd-manager`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"osdManager.getSourceCatalog":{capName:`osd-manager`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"osdManager.listTemplates":{capName:`osd-manager`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"osdManager.previewSlot":{capName:`osd-manager`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"osdManager.renderDevice":{capName:`osd-manager`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"osdManager.setSlotBinding":{capName:`osd-manager`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"osdManager.setSlotCameraEnabled":{capName:`osd-manager`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"osdManager.upsertTemplate":{capName:`osd-manager`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"petFeeder.callPet":{capName:`pet-feeder`,capScope:`device`,addonId:null,access:`create`,role:`viewer`},"petFeeder.cancelFeed":{capName:`pet-feeder`,capScope:`device`,addonId:null,access:`create`,role:`viewer`},"petFeeder.feed":{capName:`pet-feeder`,capScope:`device`,addonId:null,access:`create`,role:`viewer`},"petFeeder.getStatus":{capName:`pet-feeder`,capScope:`device`,addonId:null,access:`view`,role:`viewer`},"petFeeder.markFoodReplenished":{capName:`pet-feeder`,capScope:`device`,addonId:null,access:`create`,role:`viewer`},"petFeeder.playSound":{capName:`pet-feeder`,capScope:`device`,addonId:null,access:`create`,role:`viewer`},"petFeeder.resetDesiccant":{capName:`pet-feeder`,capScope:`device`,addonId:null,access:`delete`,role:`viewer`},"petFeeder.setChildLock":{capName:`pet-feeder`,capScope:`device`,addonId:null,access:`create`,role:`viewer`},"petFeeder.setFeedSound":{capName:`pet-feeder`,capScope:`device`,addonId:null,access:`create`,role:`viewer`},"petFeeder.setIndicatorLight":{capName:`pet-feeder`,capScope:`device`,addonId:null,access:`create`,role:`viewer`},"petFeeder.setVolume":{capName:`pet-feeder`,capScope:`device`,addonId:null,access:`create`,role:`viewer`},"pipelineAnalytics.addRetrainFrameFromRecording":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`create`,role:`feature:retrain`},"pipelineAnalytics.addRetrainFramesToCollection":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`create`,role:`feature:retrain`},"pipelineAnalytics.applyDeviceSettingsPatch":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`create`,role:`admin`},"pipelineAnalytics.backfillRetrainOrigins":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`create`,role:`admin`},"pipelineAnalytics.cancelRelocateMedia":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`create`,role:`admin`},"pipelineAnalytics.cancelStorageMigrationMove":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`create`,role:`admin`},"pipelineAnalytics.clearTrackRelation":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`delete`,role:`viewer`},"pipelineAnalytics.clearTracks":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`delete`,role:`admin`},"pipelineAnalytics.completeRetrainTrack":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`create`,role:`feature:retrain`},"pipelineAnalytics.countRelocatableMedia":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`,role:`admin`},"pipelineAnalytics.countUnstampedEventMedia":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`,role:`admin`},"pipelineAnalytics.createRetrainCollection":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`create`,role:`feature:retrain`},"pipelineAnalytics.deleteDeviceEvents":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`delete`,role:`admin`},"pipelineAnalytics.deleteRetrainCollection":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`delete`,role:`feature:retrain`},"pipelineAnalytics.deleteTracks":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`delete`,role:`admin`},"pipelineAnalytics.deselectRetrainFrame":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`create`,role:`feature:retrain`},"pipelineAnalytics.getActiveTracks":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`,role:`viewer`},"pipelineAnalytics.getAudioEvents":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`,role:`viewer`},"pipelineAnalytics.getDeviceLiveContribution":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`,role:`viewer`},"pipelineAnalytics.getDeviceSettingsContribution":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`,role:`viewer`},"pipelineAnalytics.getEventDensity":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`,role:`viewer`},"pipelineAnalytics.getEventDensityBatch":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`,role:`viewer`},"pipelineAnalytics.getEventMedia":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`,role:`viewer`},"pipelineAnalytics.getEventMediaFootprintByKind":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`,role:`admin`},"pipelineAnalytics.getEventStoreFootprint":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`,role:`admin`},"pipelineAnalytics.getKeyEvents":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`,role:`viewer`},"pipelineAnalytics.getKeyEventsBatch":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`,role:`viewer`},"pipelineAnalytics.getMediaReclaimStatus":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`,role:`admin`},"pipelineAnalytics.getMotionEvents":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`,role:`viewer`},"pipelineAnalytics.getObjectEmbeddingRebuildStatus":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`,role:`viewer`},"pipelineAnalytics.getObjectEvents":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`,role:`viewer`},"pipelineAnalytics.getRetrainCorpusKpi":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`,role:`feature:retrain`},"pipelineAnalytics.getRetrainExportUrl":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`,role:`admin`},"pipelineAnalytics.getRetrainFrameImage":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`,role:`feature:retrain`},"pipelineAnalytics.getSensorEvents":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`,role:`viewer`},"pipelineAnalytics.getStorageMigrationMoveStatus":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`,role:`admin`},"pipelineAnalytics.getTrack":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`,role:`viewer`},"pipelineAnalytics.getTrackMedia":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`,role:`viewer`},"pipelineAnalytics.getTrainingExportSummary":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`,role:`admin`},"pipelineAnalytics.getTrainingExportUrl":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`,role:`admin`},"pipelineAnalytics.listArchivedDebugNotes":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`,role:`viewer`},"pipelineAnalytics.listBirthDecisions":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`,role:`viewer`},"pipelineAnalytics.listEventKinds":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`,role:`viewer`},"pipelineAnalytics.listEventKindsBatch":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`,role:`viewer`},"pipelineAnalytics.listEventMedia":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`,role:`viewer`},"pipelineAnalytics.listOpsLog":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`,role:`admin`},"pipelineAnalytics.listRecentTracks":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`,role:`viewer`},"pipelineAnalytics.listRelocateMediaJobs":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`,role:`admin`},"pipelineAnalytics.listRetrainAnnotations":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`,role:`feature:retrain`},"pipelineAnalytics.listRetrainAssistProfiles":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`,role:`feature:retrain`},"pipelineAnalytics.listRetrainCollectionFrames":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`,role:`feature:retrain`},"pipelineAnalytics.listRetrainCollections":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`,role:`feature:retrain`},"pipelineAnalytics.listRetrainCorpusPage":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`,role:`feature:retrain`},"pipelineAnalytics.listRetrainFrames":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`,role:`feature:retrain`},"pipelineAnalytics.listRetrainStaging":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`,role:`feature:retrain`},"pipelineAnalytics.listTrackMedia":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`,role:`viewer`},"pipelineAnalytics.listTrackRelations":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`,role:`viewer`},"pipelineAnalytics.listTracks":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`,role:`viewer`},"pipelineAnalytics.offerRetrainArchive":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`create`,role:`admin`},"pipelineAnalytics.ownersWithMedia":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`,role:`viewer`},"pipelineAnalytics.pauseForStorageMigration":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`create`,role:`admin`},"pipelineAnalytics.proposeRetrainAnnotations":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`create`,role:`feature:retrain`},"pipelineAnalytics.proposeRetrainAnnotationsWithLlm":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`create`,role:`admin`},"pipelineAnalytics.pruneEvents":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`create`,role:`admin`},"pipelineAnalytics.pruneEventsBefore":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`create`,role:`admin`},"pipelineAnalytics.pruneTracksBefore":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`create`,role:`admin`},"pipelineAnalytics.readLongTermSeries":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`,role:`viewer`},"pipelineAnalytics.rebuildObjectEmbeddings":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`create`,role:`admin`},"pipelineAnalytics.reclaimDebugMedia":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`create`,role:`admin`},"pipelineAnalytics.reconcileFromDisk":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`create`,role:`admin`},"pipelineAnalytics.refreshStorageLocationsForMigration":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`create`,role:`admin`},"pipelineAnalytics.relocateMedia":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`create`,role:`admin`},"pipelineAnalytics.removeRetrainFrameFromCollection":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`delete`,role:`feature:retrain`},"pipelineAnalytics.renameRetrainCollection":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`create`,role:`feature:retrain`},"pipelineAnalytics.resolveRetrainTrainingCorpus":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`,role:`admin`},"pipelineAnalytics.restageRetrainTrack":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`create`,role:`feature:retrain`},"pipelineAnalytics.resumeForStorageMigration":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`create`,role:`admin`},"pipelineAnalytics.saveRetrainAnnotations":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`create`,role:`feature:retrain`},"pipelineAnalytics.searchObjectEvents":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`,role:`viewer`},"pipelineAnalytics.selectRetrainFrames":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`create`,role:`feature:retrain`},"pipelineAnalytics.setRetrainFrameComplete":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`create`,role:`feature:retrain`},"pipelineAnalytics.setTrackFlags":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`create`,role:`viewer`},"pipelineAnalytics.setTrackPurity":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`create`,role:`viewer`},"pipelineAnalytics.setTrackRelation":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`create`,role:`viewer`},"pipelineAnalytics.startStorageMigrationMove":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`create`,role:`admin`},"pipelineAnalytics.wipeAllAnalytics":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`delete`,role:`admin`},"pipelineAnalytics.wipeObjectEmbeddings":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`delete`,role:`admin`},"pipelineAnalytics.writeRetrainArchive":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`create`,role:`admin`},"pipelineExecutor.cacheFrameInPool":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"pipelineExecutor.deleteModel":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`delete`,role:`admin`},"pipelineExecutor.downloadModel":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"pipelineExecutor.getAddonModels":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"pipelineExecutor.getAudioCapabilities":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"pipelineExecutor.getAvailableEngines":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"pipelineExecutor.getCapabilities":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"pipelineExecutor.getDetectionConfigSchema":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"pipelineExecutor.getEffectiveTuning":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"pipelineExecutor.getEngineProvisioning":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"pipelineExecutor.getInferenceDeviceHealth":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"pipelineExecutor.getOrchestratorConfigSchema":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"pipelineExecutor.getReferenceAudio":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"pipelineExecutor.getReferenceAudioFiles":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"pipelineExecutor.getReferenceImage":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"pipelineExecutor.getSchema":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"pipelineExecutor.getSelectedEngine":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"pipelineExecutor.getVideoPipelineSteps":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"pipelineExecutor.inferCached":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"pipelineExecutor.killEngine":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"pipelineExecutor.listLoadedEngines":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"pipelineExecutor.listReferenceImages":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"pipelineExecutor.rearmInferenceDevice":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"pipelineExecutor.runAudioTest":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"pipelineExecutor.runPipeline":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"pipelineExecutor.runPipelineBatch":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"pipelineExecutor.setVideoPipelineSteps":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"pipelineExecutor.spinEngine":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"pipelineExecutor.uncacheFrame":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"pipelineExecutor.validatePipeline":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"pipelineOrchestrator.abortNodeBenchmark":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"pipelineOrchestrator.applyAutoTune":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"pipelineOrchestrator.applyDeviceSettingsPatch":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"pipelineOrchestrator.assignAudio":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"pipelineOrchestrator.assignPipeline":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"pipelineOrchestrator.deleteNodeBenchmarkResult":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`delete`,role:`admin`},"pipelineOrchestrator.forgetInferenceDevice":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`delete`,role:`admin`},"pipelineOrchestrator.getAgentLoad":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"pipelineOrchestrator.getAgentSettings":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"pipelineOrchestrator.getAudioAssignment":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"pipelineOrchestrator.getAudioAssignments":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"pipelineOrchestrator.getAudioNodeLoad":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"pipelineOrchestrator.getCameraDetectionSource":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"pipelineOrchestrator.getCameraMetrics":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"pipelineOrchestrator.getCameraSettings":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"pipelineOrchestrator.getCameraStatus":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"pipelineOrchestrator.getCameraStatuses":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"pipelineOrchestrator.getCameraSwitches":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`view`,role:`viewer`},"pipelineOrchestrator.getCapabilityBindings":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"pipelineOrchestrator.getClusterModelChoice":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"pipelineOrchestrator.getDeviceLiveContribution":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"pipelineOrchestrator.getDeviceSettingsContribution":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"pipelineOrchestrator.getEffectiveShares":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"pipelineOrchestrator.getGlobalMetrics":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"pipelineOrchestrator.getIngestOwner":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"pipelineOrchestrator.getNodeBenchmarkCandidates":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"pipelineOrchestrator.getNodeBenchmarkPreflight":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"pipelineOrchestrator.getNodeBenchmarkStatus":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"pipelineOrchestrator.getNodeInferenceDevices":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"pipelineOrchestrator.getPipelineAssignment":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"pipelineOrchestrator.getPipelineAssignments":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"pipelineOrchestrator.getPipelineDevicePin":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"pipelineOrchestrator.getPlacementStats":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"pipelineOrchestrator.getReconcileFromDiskStatus":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"pipelineOrchestrator.listAgentSettings":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"pipelineOrchestrator.listNodeBenchmarkResults":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"pipelineOrchestrator.pauseForStorageMigration":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"pipelineOrchestrator.planAutoTune":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"pipelineOrchestrator.rebalance":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"pipelineOrchestrator.reconcileFromDisk":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"pipelineOrchestrator.removeAgentSettings":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`delete`,role:`admin`},"pipelineOrchestrator.requestOccupancyLook":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"pipelineOrchestrator.resetNodePipelineDefaults":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`delete`,role:`admin`},"pipelineOrchestrator.resolvePipeline":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"pipelineOrchestrator.resumeForStorageMigration":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"pipelineOrchestrator.setAgentCapabilities":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"pipelineOrchestrator.setAgentDecodeLimits":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"pipelineOrchestrator.setAgentInferenceDevices":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"pipelineOrchestrator.setAgentMaxCameras":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"pipelineOrchestrator.setAgentReachableHost":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"pipelineOrchestrator.setCameraDetectionSource":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"pipelineOrchestrator.setCameraSensors":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"pipelineOrchestrator.setCameraStepSettings":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"pipelineOrchestrator.setCameraStepToggle":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"pipelineOrchestrator.setCameraSwitch":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"pipelineOrchestrator.setCapabilityBinding":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"pipelineOrchestrator.setLoadBalancingShares":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"pipelineOrchestrator.setNodeStepSettings":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"pipelineOrchestrator.setPipelineDevicePin":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"pipelineOrchestrator.setShareSource":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"pipelineOrchestrator.startNodeBenchmark":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"pipelineOrchestrator.suggestShares":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"pipelineOrchestrator.unassignAudio":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"pipelineOrchestrator.unassignPipeline":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"pipelineRunner.abortNodeBench":{capName:`pipeline-runner`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"pipelineRunner.attachCamera":{capName:`pipeline-runner`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"pipelineRunner.detachCamera":{capName:`pipeline-runner`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"pipelineRunner.getAllCameraMetrics":{capName:`pipeline-runner`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"pipelineRunner.getCameraMetrics":{capName:`pipeline-runner`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"pipelineRunner.getLocalCameras":{capName:`pipeline-runner`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"pipelineRunner.getLocalLoad":{capName:`pipeline-runner`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"pipelineRunner.getLocalMetrics":{capName:`pipeline-runner`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"pipelineRunner.getNativeCrop":{capName:`pipeline-runner`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"pipelineRunner.getNodeBenchStatus":{capName:`pipeline-runner`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"pipelineRunner.getParkedTrackFrame":{capName:`pipeline-runner`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"pipelineRunner.parkTrackFrame":{capName:`pipeline-runner`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"pipelineRunner.releaseParkedTrackFrames":{capName:`pipeline-runner`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"pipelineRunner.reportMotion":{capName:`pipeline-runner`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"pipelineRunner.requestOccupancyBurst":{capName:`pipeline-runner`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"pipelineRunner.runDetailSubtree":{capName:`pipeline-runner`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"pipelineRunner.runStatelessStep":{capName:`pipeline-runner`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"pipelineRunner.startNodeBench":{capName:`pipeline-runner`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"plateGallery.assignPlate":{capName:`plate-gallery`,capScope:`system`,addonId:null,access:`create`,role:`feature:plate-assignment`},"plateGallery.assignPlates":{capName:`plate-gallery`,capScope:`system`,addonId:null,access:`create`,role:`feature:plate-assignment`},"plateGallery.correctPlateText":{capName:`plate-gallery`,capScope:`system`,addonId:null,access:`create`,role:`feature:plate-assignment`},"plateGallery.createVehicle":{capName:`plate-gallery`,capScope:`system`,addonId:null,access:`create`,role:`feature:plate-assignment`},"plateGallery.deletePlate":{capName:`plate-gallery`,capScope:`system`,addonId:null,access:`delete`,role:`feature:plate-assignment`},"plateGallery.deleteVehicle":{capName:`plate-gallery`,capScope:`system`,addonId:null,access:`delete`,role:`feature:plate-assignment`},"plateGallery.getPlateByTrack":{capName:`plate-gallery`,capScope:`system`,addonId:null,access:`view`,role:`viewer`},"plateGallery.getPlateMedia":{capName:`plate-gallery`,capScope:`system`,addonId:null,access:`view`,role:`feature:plate-assignment`},"plateGallery.listPlates":{capName:`plate-gallery`,capScope:`system`,addonId:null,access:`view`,role:`feature:plate-assignment`},"plateGallery.listVehicles":{capName:`plate-gallery`,capScope:`system`,addonId:null,access:`view`,role:`feature:plate-assignment`},"plateGallery.listVehicleSamples":{capName:`plate-gallery`,capScope:`system`,addonId:null,access:`view`,role:`feature:plate-assignment`},"plateGallery.removeVehicleSample":{capName:`plate-gallery`,capScope:`system`,addonId:null,access:`delete`,role:`feature:plate-assignment`},"plateGallery.renameVehicle":{capName:`plate-gallery`,capScope:`system`,addonId:null,access:`create`,role:`feature:plate-assignment`},"plateGallery.searchPlates":{capName:`plate-gallery`,capScope:`system`,addonId:null,access:`view`,role:`feature:plate-assignment`},"plateGallery.suggestPlateClusters":{capName:`plate-gallery`,capScope:`system`,addonId:null,access:`view`,role:`feature:plate-assignment`},"plateGallery.unassignPlate":{capName:`plate-gallery`,capScope:`system`,addonId:null,access:`create`,role:`feature:plate-assignment`},"plateGallery.unassignPlates":{capName:`plate-gallery`,capScope:`system`,addonId:null,access:`create`,role:`feature:plate-assignment`},"platformProbe.getCapabilities":{capName:`platform-probe`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"platformProbe.getHardware":{capName:`platform-probe`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"platformProbe.rescanAccelerators":{capName:`platform-probe`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"platformProbe.resolveHwAccel":{capName:`platform-probe`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"platformProbe.resolveInferenceConfig":{capName:`platform-probe`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"powerMeter.getStatus":{capName:`power-meter`,capScope:`device`,addonId:null,access:`view`,role:`viewer`},"presence.getStatus":{capName:`presence`,capScope:`device`,addonId:null,access:`view`,role:`viewer`},"pressureSensor.getStatus":{capName:`pressure-sensor`,capScope:`device`,addonId:null,access:`view`,role:`viewer`},"privacyMask.getOptions":{capName:`privacy-mask`,capScope:`device`,addonId:null,access:`view`,role:`viewer`},"privacyMask.getStatus":{capName:`privacy-mask`,capScope:`device`,addonId:null,access:`view`,role:`viewer`},"privacyMask.setAudioEnabled":{capName:`privacy-mask`,capScope:`device`,addonId:null,access:`create`,role:`admin`},"privacyMask.setMask":{capName:`privacy-mask`,capScope:`device`,addonId:null,access:`create`,role:`admin`},"ptz.captureHomeHere":{capName:`ptz`,capScope:`device`,addonId:null,access:`create`,role:`admin`},"ptz.continuousMove":{capName:`ptz`,capScope:`device`,addonId:null,access:`create`,role:`viewer`},"ptz.deletePreset":{capName:`ptz`,capScope:`device`,addonId:null,access:`delete`,role:`admin`},"ptz.getHomePreset":{capName:`ptz`,capScope:`device`,addonId:null,access:`view`,role:`viewer`},"ptz.getHomeReturn":{capName:`ptz`,capScope:`device`,addonId:null,access:`view`,role:`viewer`},"ptz.getOptions":{capName:`ptz`,capScope:`device`,addonId:null,access:`view`,role:`viewer`},"ptz.getPosition":{capName:`ptz`,capScope:`device`,addonId:null,access:`view`,role:`viewer`},"ptz.getPresets":{capName:`ptz`,capScope:`device`,addonId:null,access:`view`,role:`viewer`},"ptz.getStatus":{capName:`ptz`,capScope:`device`,addonId:null,access:`view`,role:`viewer`},"ptz.goHome":{capName:`ptz`,capScope:`device`,addonId:null,access:`create`,role:`viewer`},"ptz.goToPreset":{capName:`ptz`,capScope:`device`,addonId:null,access:`create`,role:`viewer`},"ptz.move":{capName:`ptz`,capScope:`device`,addonId:null,access:`create`,role:`viewer`},"ptz.savePreset":{capName:`ptz`,capScope:`device`,addonId:null,access:`create`,role:`admin`},"ptz.setAutofocus":{capName:`ptz`,capScope:`device`,addonId:null,access:`create`,role:`viewer`},"ptz.setHomePreset":{capName:`ptz`,capScope:`device`,addonId:null,access:`create`,role:`admin`},"ptz.setHomeReturn":{capName:`ptz`,capScope:`device`,addonId:null,access:`create`,role:`admin`},"ptz.stop":{capName:`ptz`,capScope:`device`,addonId:null,access:`create`,role:`viewer`},"ptzAutotrack.getSettings":{capName:`ptz-autotrack`,capScope:`device`,addonId:null,access:`view`,role:`viewer`},"ptzAutotrack.getStatus":{capName:`ptz-autotrack`,capScope:`device`,addonId:null,access:`view`,role:`viewer`},"ptzAutotrack.setEnabled":{capName:`ptz-autotrack`,capScope:`device`,addonId:null,access:`create`,role:`viewer`},"ptzAutotrack.setSettings":{capName:`ptz-autotrack`,capScope:`device`,addonId:null,access:`create`,role:`admin`},"reboot.reboot":{capName:`reboot`,capScope:`device`,addonId:null,access:`create`,role:`admin`},"recordEntries.deleteEntry":{capName:`record-entries`,capScope:`system`,addonId:null,access:`delete`,role:`admin`},"recordEntries.listEntries":{capName:`record-entries`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"recordEntries.listEntryKinds":{capName:`record-entries`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"recordEntries.putEntry":{capName:`record-entries`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"recording.getAvailability":{capName:`recording`,capScope:`device`,addonId:null,access:`view`,role:`viewer`},"recording.getDaysWithRecordings":{capName:`recording`,capScope:`device`,addonId:null,access:`view`,role:`viewer`},"recording.getPlayback":{capName:`recording`,capScope:`device`,addonId:null,access:`view`,role:`viewer`},"recording.getPlaybackOptions":{capName:`recording`,capScope:`device`,addonId:null,access:`view`,role:`viewer`},"recording.listSources":{capName:`recording`,capScope:`device`,addonId:null,access:`view`,role:`viewer`},"recordingArchive.applyDeviceSettingsPatch":{capName:`recording-archive`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"recordingArchive.cancelRelocateJob":{capName:`recording-archive`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"recordingArchive.cancelStorageMigrationMove":{capName:`recording-archive`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"recordingArchive.deleteFootprint":{capName:`recording-archive`,capScope:`system`,addonId:null,access:`delete`,role:`admin`},"recordingArchive.getAvailabilityBatch":{capName:`recording-archive`,capScope:`system`,addonId:null,access:`view`,role:`viewer`},"recordingArchive.getDaysWithRecordingsBatch":{capName:`recording-archive`,capScope:`system`,addonId:null,access:`view`,role:`viewer`},"recordingArchive.getDeviceConfig":{capName:`recording-archive`,capScope:`system`,addonId:null,access:`view`,role:`viewer`},"recordingArchive.getDeviceLiveContribution":{capName:`recording-archive`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"recordingArchive.getDeviceSettingsContribution":{capName:`recording-archive`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"recordingArchive.getPlacement":{capName:`recording-archive`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"recordingArchive.getRelocateResidue":{capName:`recording-archive`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"recordingArchive.getStatus":{capName:`recording-archive`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"recordingArchive.getStorageMigrationMoveStatus":{capName:`recording-archive`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"recordingArchive.getStorageUsage":{capName:`recording-archive`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"recordingArchive.listOpsLog":{capName:`recording-archive`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"recordingArchive.listRelocateJobs":{capName:`recording-archive`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"recordingArchive.locateSegment":{capName:`recording-archive`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"recordingArchive.pauseForStorageMigration":{capName:`recording-archive`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"recordingArchive.planStorageRebalance":{capName:`recording-archive`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"recordingArchive.pruneFootage":{capName:`recording-archive`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"recordingArchive.readGopBytes":{capName:`recording-archive`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"recordingArchive.readSegmentBytes":{capName:`recording-archive`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"recordingArchive.readWindowBytes":{capName:`recording-archive`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"recordingArchive.reconcileLedgerAgainstDisk":{capName:`recording-archive`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"recordingArchive.refreshStorageLocationsForMigration":{capName:`recording-archive`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"recordingArchive.relocateFootage":{capName:`recording-archive`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"recordingArchive.renderClip":{capName:`recording-archive`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"recordingArchive.renderGif":{capName:`recording-archive`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"recordingArchive.rescanStorage":{capName:`recording-archive`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"recordingArchive.resumeForStorageMigration":{capName:`recording-archive`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"recordingArchive.setDeviceConfig":{capName:`recording-archive`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"recordingArchive.setDevicePlacement":{capName:`recording-archive`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"recordingArchive.startStorageMigrationMove":{capName:`recording-archive`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"recordingArchive.startStorageRebalance":{capName:`recording-archive`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"recordingExport.cancelExport":{capName:`recording-export`,capScope:`system`,addonId:null,access:`create`,role:`viewer`},"recordingExport.createExport":{capName:`recording-export`,capScope:`system`,addonId:null,access:`create`,role:`viewer`},"recordingExport.deleteExport":{capName:`recording-export`,capScope:`system`,addonId:null,access:`delete`,role:`viewer`},"recordingExport.getDownloadUrl":{capName:`recording-export`,capScope:`system`,addonId:null,access:`view`,role:`viewer`},"recordingExport.getExport":{capName:`recording-export`,capScope:`system`,addonId:null,access:`view`,role:`viewer`},"recordingExport.listExports":{capName:`recording-export`,capScope:`system`,addonId:null,access:`view`,role:`viewer`},"recordingExport.readExportBytes":{capName:`recording-export`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"recordingOnboard.getOptions":{capName:`recording-onboard`,capScope:`device`,addonId:null,access:`view`,role:`viewer`},"recordingOnboard.getStatus":{capName:`recording-onboard`,capScope:`device`,addonId:null,access:`view`,role:`viewer`},"recordingOnboard.setSettings":{capName:`recording-onboard`,capScope:`device`,addonId:null,access:`create`,role:`admin`},"recordingSignal.getStatus":{capName:`recording-signal`,capScope:`device`,addonId:null,access:`view`,role:`viewer`},"records.aggregate":{capName:`records`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"records.allocateId":{capName:`records`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"records.count":{capName:`records`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"records.declareKinds":{capName:`records`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"records.delete":{capName:`records`,capScope:`system`,addonId:null,access:`delete`,role:`admin`},"records.deleteDevice":{capName:`records`,capScope:`system`,addonId:null,access:`delete`,role:`admin`},"records.deleteMany":{capName:`records`,capScope:`system`,addonId:null,access:`delete`,role:`admin`},"records.deleteWhere":{capName:`records`,capScope:`system`,addonId:null,access:`delete`,role:`admin`},"records.get":{capName:`records`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"records.getMany":{capName:`records`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"records.histogram":{capName:`records`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"records.patch":{capName:`records`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"records.put":{capName:`records`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"records.putMany":{capName:`records`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"records.query":{capName:`records`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"records.secretRefs":{capName:`records`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"records.transact":{capName:`records`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"runningState.getStatus":{capName:`running-state`,capScope:`device`,addonId:null,access:`view`,role:`viewer`},"sceneMonitor.captureReference":{capName:`scene-monitor`,capScope:`device`,addonId:null,access:`create`,role:`feature:scenes`},"sceneMonitor.createScene":{capName:`scene-monitor`,capScope:`device`,addonId:null,access:`create`,role:`feature:scenes`},"sceneMonitor.deleteReference":{capName:`scene-monitor`,capScope:`device`,addonId:null,access:`delete`,role:`feature:scenes`},"sceneMonitor.deleteScene":{capName:`scene-monitor`,capScope:`device`,addonId:null,access:`delete`,role:`feature:scenes`},"sceneMonitor.getStatus":{capName:`scene-monitor`,capScope:`device`,addonId:null,access:`view`,role:`feature:scenes`},"sceneMonitor.listScenes":{capName:`scene-monitor`,capScope:`device`,addonId:null,access:`view`,role:`feature:scenes`},"sceneMonitor.listScenesBatch":{capName:`scene-monitor`,capScope:`device`,addonId:null,access:`view`,role:`feature:scenes`},"sceneMonitor.recheckNow":{capName:`scene-monitor`,capScope:`device`,addonId:null,access:`create`,role:`feature:scenes`},"sceneMonitor.resetScene":{capName:`scene-monitor`,capScope:`device`,addonId:null,access:`delete`,role:`feature:scenes`},"sceneMonitor.updateScene":{capName:`scene-monitor`,capScope:`device`,addonId:null,access:`create`,role:`feature:scenes`},"scriptRunner.getStatus":{capName:`script-runner`,capScope:`device`,addonId:null,access:`view`,role:`viewer`},"scriptRunner.run":{capName:`script-runner`,capScope:`device`,addonId:null,access:`create`,role:`admin`},"scriptRunner.stop":{capName:`script-runner`,capScope:`device`,addonId:null,access:`create`,role:`admin`},"serverManagement.applyServerUpdate":{capName:`server-management`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"serverManagement.checkServerUpdate":{capName:`server-management`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"serverManagement.getServerPackageStatus":{capName:`server-management`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"serverManagement.restartServer":{capName:`server-management`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"serverManagement.rollbackServerUpdate":{capName:`server-management`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"settingsStore.aggregate":{capName:`settings-store`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"settingsStore.count":{capName:`settings-store`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"settingsStore.declareCollection":{capName:`settings-store`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"settingsStore.delete":{capName:`settings-store`,capScope:`system`,addonId:null,access:`delete`,role:`admin`},"settingsStore.deleteWhere":{capName:`settings-store`,capScope:`system`,addonId:null,access:`delete`,role:`admin`},"settingsStore.get":{capName:`settings-store`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"settingsStore.histogram":{capName:`settings-store`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"settingsStore.insert":{capName:`settings-store`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"settingsStore.insertMany":{capName:`settings-store`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"settingsStore.isEmpty":{capName:`settings-store`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"settingsStore.query":{capName:`settings-store`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"settingsStore.set":{capName:`settings-store`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"settingsStore.transact":{capName:`settings-store`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"settingsStore.update":{capName:`settings-store`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"settingsStore.updateWhere":{capName:`settings-store`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"settingsStore.upsert":{capName:`settings-store`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"settingsStore.upsertMany":{capName:`settings-store`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"smoke.getStatus":{capName:`smoke`,capScope:`device`,addonId:null,access:`view`,role:`viewer`},"smtpProvider.getStatus":{capName:`smtp-provider`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"smtpProvider.sendEmail":{capName:`smtp-provider`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"smtpProvider.verify":{capName:`smtp-provider`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"snapshot.applyDeviceSettingsPatch":{capName:`snapshot`,capScope:`device`,addonId:null,access:`create`,role:`admin`},"snapshot.getDebugState":{capName:`snapshot`,capScope:`device`,addonId:null,access:`view`,role:`viewer`},"snapshot.getDeviceLiveContribution":{capName:`snapshot`,capScope:`device`,addonId:null,access:`view`,role:`viewer`},"snapshot.getDeviceSettingsContribution":{capName:`snapshot`,capScope:`device`,addonId:null,access:`view`,role:`viewer`},"snapshot.getSnapshot":{capName:`snapshot`,capScope:`device`,addonId:null,access:`view`,role:`viewer`},"snapshot.getSnapshotLinks":{capName:`snapshot`,capScope:`device`,addonId:null,access:`view`,role:`viewer`},"snapshot.getSnapshotOverview":{capName:`snapshot`,capScope:`device`,addonId:null,access:`view`,role:`viewer`},"snapshot.getStatus":{capName:`snapshot`,capScope:`device`,addonId:null,access:`view`,role:`viewer`},"snapshot.invalidateCache":{capName:`snapshot`,capScope:`device`,addonId:null,access:`create`,role:`admin`},"ssoBridge.signBridgeToken":{capName:`sso-bridge`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"ssoBridge.verifyBridgeToken":{capName:`sso-bridge`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"storage.abortUpload":{capName:`storage`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"storage.beginDownload":{capName:`storage`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"storage.beginUpload":{capName:`storage`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"storage.delete":{capName:`storage`,capScope:`system`,addonId:null,access:`delete`,role:`admin`},"storage.deleteLocation":{capName:`storage`,capScope:`system`,addonId:null,access:`delete`,role:`admin`},"storage.endDownload":{capName:`storage`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"storage.exists":{capName:`storage`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"storage.finalizeUpload":{capName:`storage`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"storage.getAvailableSpace":{capName:`storage`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"storage.list":{capName:`storage`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"storage.listDrainProgress":{capName:`storage`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"storage.listLocationDeclarations":{capName:`storage`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"storage.listLocations":{capName:`storage`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"storage.listProviders":{capName:`storage`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"storage.read":{capName:`storage`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"storage.readChunk":{capName:`storage`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"storage.resolve":{capName:`storage`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"storage.testConfig":{capName:`storage`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"storage.testLocation":{capName:`storage`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"storage.upsertLocation":{capName:`storage`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"storage.write":{capName:`storage`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"storage.writeChunk":{capName:`storage`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"storageAdmin.listKinds":{capName:`storage-admin`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"storageAdmin.listTables":{capName:`storage-admin`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"storageAdmin.readRecords":{capName:`storage-admin`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"storageEvictable.evict":{capName:`storage-evictable`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"storageEvictable.getEvictableUsage":{capName:`storage-evictable`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"storageMigration.cancel":{capName:`storage-migration`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"storageMigration.cleanupCancel":{capName:`storage-migration`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"storageMigration.cleanupStart":{capName:`storage-migration`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"storageMigration.cleanupStatus":{capName:`storage-migration`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"storageMigration.drain":{capName:`storage-migration`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"storageMigration.history":{capName:`storage-migration`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"storageMigration.moverClearance":{capName:`storage-migration`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"storageMigration.movers":{capName:`storage-migration`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"storageMigration.plan":{capName:`storage-migration`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"storageMigration.residue":{capName:`storage-migration`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"storageMigration.start":{capName:`storage-migration`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"storageMigration.status":{capName:`storage-migration`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"storageOccupancy.getOccupancy":{capName:`storage-occupancy`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"storageProvider.abortUpload":{capName:`storage-provider`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"storageProvider.beginDownload":{capName:`storage-provider`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"storageProvider.beginUpload":{capName:`storage-provider`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"storageProvider.delete":{capName:`storage-provider`,capScope:`system`,addonId:null,access:`delete`,role:`admin`},"storageProvider.endDownload":{capName:`storage-provider`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"storageProvider.exists":{capName:`storage-provider`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"storageProvider.finalizeUpload":{capName:`storage-provider`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"storageProvider.getAvailableSpace":{capName:`storage-provider`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"storageProvider.getProviderInfo":{capName:`storage-provider`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"storageProvider.list":{capName:`storage-provider`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"storageProvider.read":{capName:`storage-provider`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"storageProvider.readChunk":{capName:`storage-provider`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"storageProvider.resolve":{capName:`storage-provider`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"storageProvider.testLocation":{capName:`storage-provider`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"storageProvider.write":{capName:`storage-provider`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"storageProvider.writeChunk":{capName:`storage-provider`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"streamBroker.acquireEgressTranscode":{capName:`stream-broker`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"streamBroker.applyDeviceSettingsPatch":{capName:`stream-broker`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"streamBroker.assignProfile":{capName:`stream-broker`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"streamBroker.fetchEventMedia":{capName:`stream-broker`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"streamBroker.forgetDeviceHardware":{capName:`stream-broker`,capScope:`system`,addonId:null,access:`delete`,role:`admin`},"streamBroker.getAllRtspEntries":{capName:`stream-broker`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"streamBroker.getBrokerStats":{capName:`stream-broker`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"streamBroker.getDeviceAudioMute":{capName:`stream-broker`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"streamBroker.getDeviceLiveContribution":{capName:`stream-broker`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"streamBroker.getDeviceSettingsContribution":{capName:`stream-broker`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"streamBroker.getLiveViewerCounts":{capName:`stream-broker`,capScope:`system`,addonId:null,access:`view`,role:`viewer`},"streamBroker.getPreBufferInfo":{capName:`stream-broker`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"streamBroker.getRtspEntry":{capName:`stream-broker`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"streamBroker.getRtspPort":{capName:`stream-broker`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"streamBroker.getStreamUrl":{capName:`stream-broker`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"streamBroker.getStreamWithCodec":{capName:`stream-broker`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"streamBroker.isRtspEnabled":{capName:`stream-broker`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"streamBroker.killClient":{capName:`stream-broker`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"streamBroker.listAllCameraStreams":{capName:`stream-broker`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"streamBroker.listAllProfileSlots":{capName:`stream-broker`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"streamBroker.listClients":{capName:`stream-broker`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"streamBroker.probeStream":{capName:`stream-broker`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"streamBroker.produceEventMedia":{capName:`stream-broker`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"streamBroker.publishCameraStream":{capName:`stream-broker`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"streamBroker.pullAudioChunks":{capName:`stream-broker`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"streamBroker.regenerateRtspToken":{capName:`stream-broker`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"streamBroker.releaseEgressTranscode":{capName:`stream-broker`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"streamBroker.releaseStreamWithCodec":{capName:`stream-broker`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"streamBroker.renderPreBufferClip":{capName:`stream-broker`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"streamBroker.reportStreamSignal":{capName:`stream-broker`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"streamBroker.restartProfile":{capName:`stream-broker`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"streamBroker.retractCameraStream":{capName:`stream-broker`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"streamBroker.setDeviceAudioMute":{capName:`stream-broker`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"streamBroker.setPreBufferDuration":{capName:`stream-broker`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"streamBroker.setRtspEnabled":{capName:`stream-broker`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"streamBroker.subscribeAudioChunks":{capName:`stream-broker`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"streamBroker.unassignProfile":{capName:`stream-broker`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"streamBroker.unsubscribeAudioChunks":{capName:`stream-broker`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"streamCatalog.getCatalog":{capName:`stream-catalog`,capScope:`device`,addonId:null,access:`view`,role:`viewer`},"streamParams.getConfigSchema":{capName:`stream-params`,capScope:`device`,addonId:null,access:`view`,role:`viewer`},"streamParams.getOptions":{capName:`stream-params`,capScope:`device`,addonId:null,access:`view`,role:`viewer`},"streamParams.getStatus":{capName:`stream-params`,capScope:`device`,addonId:null,access:`view`,role:`viewer`},"streamParams.setProfile":{capName:`stream-params`,capScope:`device`,addonId:null,access:`create`,role:`admin`},"streamSignals.listSignals":{capName:`stream-signals`,capScope:`device`,addonId:null,access:`view`,role:`viewer`},"switch.getStatus":{capName:`switch`,capScope:`device`,addonId:null,access:`view`,role:`viewer`},"switch.setState":{capName:`switch`,capScope:`device`,addonId:null,access:`create`,role:`viewer`},"system.detectSiteLocation":{capName:`system`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"system.featureFlags":{capName:`system`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"system.forceRetentionCleanup":{capName:`system`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"system.getFailureContributions":{capName:`system`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"system.getLoadContributions":{capName:`system`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"system.getLoggingSettings":{capName:`system`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"system.getRequestCensus":{capName:`system`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"system.getRetentionConfig":{capName:`system`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"system.getSiteLocation":{capName:`system`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"system.health":{capName:`system`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"system.info":{capName:`system`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"system.networkAddresses":{capName:`system`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"system.setLoggingSettings":{capName:`system`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"system.setRetentionConfig":{capName:`system`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"system.setSiteLocation":{capName:`system`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"tamper.getStatus":{capName:`tamper`,capScope:`device`,addonId:null,access:`view`,role:`viewer`},"temperatureSensor.getStatus":{capName:`temperature-sensor`,capScope:`device`,addonId:null,access:`view`,role:`viewer`},"terminalSession.adoptLegacyMonitor":{capName:`terminal-session`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"terminalSession.close":{capName:`terminal-session`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"terminalSession.createInstance":{capName:`terminal-session`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"terminalSession.deleteInstance":{capName:`terminal-session`,capScope:`system`,addonId:null,access:`delete`,role:`admin`},"terminalSession.listInstances":{capName:`terminal-session`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"terminalSession.listLegacyCameras":{capName:`terminal-session`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"terminalSession.listProfiles":{capName:`terminal-session`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"terminalSession.listSessions":{capName:`terminal-session`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"terminalSession.openSession":{capName:`terminal-session`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"terminalSession.pullOutput":{capName:`terminal-session`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"terminalSession.resize":{capName:`terminal-session`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"terminalSession.setInstanceEnabled":{capName:`terminal-session`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"terminalSession.updateInstance":{capName:`terminal-session`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"terminalSession.writeInput":{capName:`terminal-session`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"toast.onToast":{capName:`toast`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"training.canaryResult":{capName:`training`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"training.cancelJob":{capName:`training`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"training.discardResult":{capName:`training`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"training.getJob":{capName:`training`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"training.getJobResult":{capName:`training`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"training.listBaseModels":{capName:`training`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"training.listCanaryTargets":{capName:`training`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"training.listJobs":{capName:`training`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"training.planJob":{capName:`training`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"training.registerResult":{capName:`training`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"training.rollbackCanary":{capName:`training`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"training.startJob":{capName:`training`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"training.startJobBatch":{capName:`training`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"trainingProvider.cancelJob":{capName:`training-provider`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"trainingProvider.cleanupJob":{capName:`training-provider`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"trainingProvider.createEntry":{capName:`training-provider`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"trainingProvider.deleteEntry":{capName:`training-provider`,capScope:`system`,addonId:null,access:`delete`,role:`admin`},"trainingProvider.describe":{capName:`training-provider`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"trainingProvider.describeTypes":{capName:`training-provider`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"trainingProvider.estimateJob":{capName:`training-provider`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"trainingProvider.getJob":{capName:`training-provider`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"trainingProvider.listEntries":{capName:`training-provider`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"trainingProvider.listJobEvents":{capName:`training-provider`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"trainingProvider.listJobs":{capName:`training-provider`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"trainingProvider.offerArtifact":{capName:`training-provider`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"trainingProvider.readResult":{capName:`training-provider`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"trainingProvider.submitJob":{capName:`training-provider`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"trainingProvider.updateEntry":{capName:`training-provider`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"trainingProvider.uploadDataset":{capName:`training-provider`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"trainingProvider.validateCredentials":{capName:`training-provider`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"turnProvider.getTurnServers":{capName:`turn-provider`,capScope:`system`,addonId:null,access:`view`,role:`viewer`},"update.getStatus":{capName:`update`,capScope:`device`,addonId:null,access:`view`,role:`viewer`},"update.installUpdate":{capName:`update`,capScope:`device`,addonId:null,access:`create`,role:`admin`},"userManagement.confirmTotp":{capName:`user-management`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"userManagement.createUser":{capName:`user-management`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"userManagement.deleteUser":{capName:`user-management`,capScope:`system`,addonId:null,access:`delete`,role:`admin`},"userManagement.disableTotp":{capName:`user-management`,capScope:`system`,addonId:null,access:`delete`,role:`admin`},"userManagement.findUserByExternalIdentity":{capName:`user-management`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"userManagement.getTotpStatus":{capName:`user-management`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"userManagement.listExternalIdentities":{capName:`user-management`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"userManagement.listOauthSessions":{capName:`user-management`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"userManagement.listUsers":{capName:`user-management`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"userManagement.migrateRawSecrets":{capName:`user-management`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"userManagement.oauthExchangeCode":{capName:`user-management`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"userManagement.oauthIssueCode":{capName:`user-management`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"userManagement.oauthRefresh":{capName:`user-management`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"userManagement.oauthVerifyAccessToken":{capName:`user-management`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"userManagement.resetPassword":{capName:`user-management`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"userManagement.revokeOauthSession":{capName:`user-management`,capScope:`system`,addonId:null,access:`delete`,role:`admin`},"userManagement.setupTotp":{capName:`user-management`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"userManagement.setUserScopes":{capName:`user-management`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"userManagement.unlinkExternalIdentity":{capName:`user-management`,capScope:`system`,addonId:null,access:`delete`,role:`admin`},"userManagement.updateUser":{capName:`user-management`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"userManagement.validateCredentials":{capName:`user-management`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"userManagement.verifyTotp":{capName:`user-management`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"userPasskeys.beginAuthentication":{capName:`user-passkeys`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"userPasskeys.beginDiscoverableAuthentication":{capName:`user-passkeys`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"userPasskeys.beginRegistration":{capName:`user-passkeys`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"userPasskeys.finishAuthentication":{capName:`user-passkeys`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"userPasskeys.finishDiscoverableAuthentication":{capName:`user-passkeys`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"userPasskeys.finishRegistration":{capName:`user-passkeys`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"userPasskeys.getSecondFactorPreference":{capName:`user-passkeys`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"userPasskeys.listPasskeys":{capName:`user-passkeys`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"userPasskeys.removePasskey":{capName:`user-passkeys`,capScope:`system`,addonId:null,access:`delete`,role:`admin`},"userPasskeys.setSecondFactorPreference":{capName:`user-passkeys`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"vacuumControl.getStatus":{capName:`vacuum-control`,capScope:`device`,addonId:null,access:`view`,role:`viewer`},"vacuumControl.locate":{capName:`vacuum-control`,capScope:`device`,addonId:null,access:`create`,role:`viewer`},"vacuumControl.pause":{capName:`vacuum-control`,capScope:`device`,addonId:null,access:`create`,role:`viewer`},"vacuumControl.returnToBase":{capName:`vacuum-control`,capScope:`device`,addonId:null,access:`create`,role:`viewer`},"vacuumControl.setFanSpeed":{capName:`vacuum-control`,capScope:`device`,addonId:null,access:`create`,role:`viewer`},"vacuumControl.start":{capName:`vacuum-control`,capScope:`device`,addonId:null,access:`create`,role:`viewer`},"vacuumControl.stop":{capName:`vacuum-control`,capScope:`device`,addonId:null,access:`create`,role:`viewer`},"valve.close":{capName:`valve`,capScope:`device`,addonId:null,access:`create`,role:`viewer`},"valve.getStatus":{capName:`valve`,capScope:`device`,addonId:null,access:`view`,role:`viewer`},"valve.open":{capName:`valve`,capScope:`device`,addonId:null,access:`create`,role:`viewer`},"valve.setPosition":{capName:`valve`,capScope:`device`,addonId:null,access:`create`,role:`viewer`},"valve.stop":{capName:`valve`,capScope:`device`,addonId:null,access:`create`,role:`viewer`},"vectorStore.declareIndex":{capName:`vector-store`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"vectorStore.deleteByFilter":{capName:`vector-store`,capScope:`system`,addonId:null,access:`delete`,role:`admin`},"vectorStore.deleteByIds":{capName:`vector-store`,capScope:`system`,addonId:null,access:`delete`,role:`admin`},"vectorStore.fetchByIds":{capName:`vector-store`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"vectorStore.getByIds":{capName:`vector-store`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"vectorStore.query":{capName:`vector-store`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"vectorStore.scan":{capName:`vector-store`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"vectorStore.stats":{capName:`vector-store`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"vectorStore.upsert":{capName:`vector-store`,capScope:`system`,addonId:null,access:`create`,role:`admin`},"vibration.getStatus":{capName:`vibration`,capScope:`device`,addonId:null,access:`view`,role:`viewer`},"videoclips.dialClipStream":{capName:`videoclips`,capScope:`device`,addonId:null,access:`view`,role:`viewer`},"videoclips.getClipPlayback":{capName:`videoclips`,capScope:`device`,addonId:null,access:`view`,role:`viewer`},"videoclips.getPlaybackOptions":{capName:`videoclips`,capScope:`device`,addonId:null,access:`view`,role:`viewer`},"videoclips.listClips":{capName:`videoclips`,capScope:`device`,addonId:null,access:`view`,role:`viewer`},"videoclips.listSources":{capName:`videoclips`,capScope:`device`,addonId:null,access:`view`,role:`viewer`},"videoclips.offerClipBytes":{capName:`videoclips`,capScope:`device`,addonId:null,access:`view`,role:`viewer`},"videoclips.readClipBytes":{capName:`videoclips`,capScope:`device`,addonId:null,access:`view`,role:`viewer`},"viewerUi.getStaticDir":{capName:`viewer-ui`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"viewerUi.getVersion":{capName:`viewer-ui`,capScope:`system`,addonId:null,access:`view`,role:`admin`},"waterHeater.getStatus":{capName:`water-heater`,capScope:`device`,addonId:null,access:`view`,role:`viewer`},"waterHeater.setAway":{capName:`water-heater`,capScope:`device`,addonId:null,access:`create`,role:`viewer`},"waterHeater.setOperationMode":{capName:`water-heater`,capScope:`device`,addonId:null,access:`create`,role:`viewer`},"waterHeater.setTargetTemp":{capName:`water-heater`,capScope:`device`,addonId:null,access:`create`,role:`viewer`},"weather.getStatus":{capName:`weather`,capScope:`device`,addonId:null,access:`view`,role:`viewer`},"webrtcSession.addIceCandidate":{capName:`webrtc-session`,capScope:`device`,addonId:null,access:`create`,role:`viewer`},"webrtcSession.applyDownlinkProbe":{capName:`webrtc-session`,capScope:`device`,addonId:null,access:`create`,role:`viewer`},"webrtcSession.closeSession":{capName:`webrtc-session`,capScope:`device`,addonId:null,access:`create`,role:`viewer`},"webrtcSession.createSession":{capName:`webrtc-session`,capScope:`device`,addonId:null,access:`create`,role:`viewer`},"webrtcSession.getIceCandidates":{capName:`webrtc-session`,capScope:`device`,addonId:null,access:`view`,role:`viewer`},"webrtcSession.getSessionDebug":{capName:`webrtc-session`,capScope:`device`,addonId:null,access:`view`,role:`viewer`},"webrtcSession.getSessionState":{capName:`webrtc-session`,capScope:`device`,addonId:null,access:`view`,role:`viewer`},"webrtcSession.handleAnswer":{capName:`webrtc-session`,capScope:`device`,addonId:null,access:`create`,role:`viewer`},"webrtcSession.handleOffer":{capName:`webrtc-session`,capScope:`device`,addonId:null,access:`create`,role:`viewer`},"webrtcSession.hasAdaptiveBitrate":{capName:`webrtc-session`,capScope:`device`,addonId:null,access:`view`,role:`viewer`},"webrtcSession.listStreams":{capName:`webrtc-session`,capScope:`device`,addonId:null,access:`view`,role:`viewer`},"zoneAnalytics.getCameraHistory":{capName:`zone-analytics`,capScope:`device`,addonId:null,access:`view`,role:`viewer`},"zoneAnalytics.getCurrentSnapshot":{capName:`zone-analytics`,capScope:`device`,addonId:null,access:`view`,role:`viewer`},"zoneAnalytics.getCurrentSnapshotBatch":{capName:`zone-analytics`,capScope:`device`,addonId:null,access:`view`,role:`viewer`},"zoneAnalytics.getUnzonedHistory":{capName:`zone-analytics`,capScope:`device`,addonId:null,access:`view`,role:`viewer`},"zoneAnalytics.getZoneHistory":{capName:`zone-analytics`,capScope:`device`,addonId:null,access:`view`,role:`viewer`},"zoneRules.listRules":{capName:`zone-rules`,capScope:`device`,addonId:null,access:`view`,role:`viewer`},"zoneRules.setRules":{capName:`zone-rules`,capScope:`device`,addonId:null,access:`create`,role:`admin`},"zones.addZone":{capName:`zones`,capScope:`device`,addonId:null,access:`create`,role:`admin`},"zones.listZones":{capName:`zones`,capScope:`device`,addonId:null,access:`view`,role:`viewer`},"zones.removeZone":{capName:`zones`,capScope:`device`,addonId:null,access:`delete`,role:`admin`},"zones.updateZone":{capName:`zones`,capScope:`device`,addonId:null,access:`create`,role:`admin`}}),wfe=`accessories.action-source.actions.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-credentials.device-discovery.device-export.device-extension.device-history.device-manager.device-ops.device-provider.device-removal-hook.device-state.device-status.dishwasher.display-palette.doorbell.embedding-encoder.enum-sensor.event-emitter.face-gallery.failure-contribution.fan-control.feature-probe.filesystem-browse.flood.gas.group-active.group-commands.group-status.heating-valve.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.meter.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.node-certificates.nodes.notification-output.notification-rules.notifier.numeric-sensor.oauth-integration.oidc-connections.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.record-entries.recording.recording-archive.recording-export.recording-onboard.recording-signal.records.running-state.scene-monitor.script-runner.server-management.settings-store.smoke.smtp-provider.snapshot.sso-bridge.storage.storage-admin.storage-evictable.storage-migration.storage-occupancy.storage-provider.stream-broker.stream-catalog.stream-params.stream-signals.switch.system.tamper.temperature-sensor.terminal-session.toast.training.training-provider.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(`.`),Tfe=`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.dishwasher.doorbell.enum-sensor.event-emitter.fan-control.feature-probe.flood.gas.group-active.group-commands.group-status.heating-valve.humidifier.humidity-sensor.image.image-settings.intercom.lawn-mower-control.lock-control.media-player.meter.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.running-state.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(`.`),Efe=`action-source.actions.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-credentials.device-export.device-history.device-manager.device-provider.device-removal-hook.device-state.display-palette.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.node-certificates.nodes.notification-output.notification-rules.oauth-integration.oidc-connections.osd-manager.pipeline-executor.pipeline-orchestrator.pipeline-runner.plate-gallery.platform-probe.record-entries.recording-archive.recording-export.records.server-management.settings-store.smtp-provider.sso-bridge.storage.storage-admin.storage-evictable.storage-migration.storage-occupancy.storage-provider.stream-broker.system.terminal-session.toast.training.training-provider.turn-provider.user-management.user-passkeys.vector-store.viewer-ui`.split(`.`);function Y(e,t){return{en:e,it:t}}var F4=Y(`On`,`Acceso`),Dfe=Y(`Percentage`,`Percentuale`),I4=[{value:`open`,label:Y(`Open`,`Aperto`),phrase:Y(`When {device} is fully open`,`Quando {device} è tutto aperto`)},{value:`opening`,label:Y(`Opening`,`In apertura`),phrase:Y(`When {device} starts opening`,`Quando {device} inizia ad aprirsi`)},{value:`closing`,label:Y(`Closing`,`In chiusura`),phrase:Y(`When {device} starts closing`,`Quando {device} inizia a chiudersi`)},{value:`closed`,label:Y(`Closed`,`Chiuso`),phrase:Y(`When {device} is fully closed`,`Quando {device} è tutto chiuso`)},{value:`stopped`,label:Y(`Stopped`,`Fermo`),phrase:Y(`When {device} stops part-way`,`Quando {device} si ferma a metà`)}],Ofe={switch:{scope:`device`,noun:Y(`Switch`,`Interruttore`),actions:[{id:`switch.on`,method:`setState`,label:Y(`Turn on`,`Accendi`),phrase:Y(`Turn on {device}`,`Accendi {device}`),icon:`power`,args:{on:!0}},{id:`switch.off`,method:`setState`,label:Y(`Turn off`,`Spegni`),phrase:Y(`Turn off {device}`,`Spegni {device}`),icon:`power-off`,args:{on:!1}}],state:[{kind:`boolean`,field:`on`,label:F4,whenTrue:Y(`When {device} turns on`,`Quando {device} si accende`),whenFalse:Y(`When {device} turns off`,`Quando {device} si spegne`),icon:`power`}],events:{onStateChanged:{notOperatorFacing:"the `on` state trigger phrases both edges of this change"}},overrides:{byType:{[P.Siren]:{actions:{"switch.on":{label:Y(`Sound`,`Fai suonare`),phrase:Y(`Sound {device}`,`Fai suonare {device}`),icon:`siren`},"switch.off":{label:Y(`Silence`,`Zittisci`),phrase:Y(`Silence {device}`,`Zittisci {device}`),icon:`volume-x`}},state:{on:{label:Y(`Sounding`,`In funzione`),whenTrue:Y(`When {device} starts sounding`,`Quando {device} inizia a suonare`),whenFalse:Y(`When {device} falls silent`,`Quando {device} smette di suonare`),icon:`siren`}}},[P.Light]:{actions:{"switch.on":{icon:`lightbulb`},"switch.off":{icon:`lightbulb-off`}},state:{on:{icon:`lightbulb`}}}},byRole:{[F.Siren]:{actions:{"switch.on":{label:Y(`Sound`,`Fai suonare`),phrase:Y(`Sound {device}`,`Fai suonare {device}`),icon:`siren`},"switch.off":{label:Y(`Silence`,`Zittisci`),phrase:Y(`Silence {device}`,`Zittisci {device}`),icon:`volume-x`}},state:{on:{label:Y(`Sounding`,`In funzione`),whenTrue:Y(`When {device} starts sounding`,`Quando {device} inizia a suonare`),whenFalse:Y(`When {device} falls silent`,`Quando {device} smette di suonare`),icon:`siren`}}},[F.Floodlight]:{actions:{"switch.on":{icon:`lightbulb`},"switch.off":{icon:`lightbulb-off`}},state:{on:{icon:`lightbulb`}}},[F.Spotlight]:{actions:{"switch.on":{icon:`lightbulb`},"switch.off":{icon:`lightbulb-off`}},state:{on:{icon:`lightbulb`}}},[F.Chime]:{actions:{"switch.on":{label:Y(`Enable chime`,`Attiva il campanello`),phrase:Y(`Enable the chime {device}`,`Attiva il campanello {device}`),icon:`bell`},"switch.off":{label:Y(`Mute chime`,`Silenzia il campanello`),phrase:Y(`Mute the chime {device}`,`Silenzia il campanello {device}`),icon:`bell-off`}}},[F.PirSensor]:{actions:{"switch.on":{label:Y(`Arm PIR`,`Attiva il PIR`),phrase:Y(`Arm the PIR sensor {device}`,`Attiva il sensore PIR {device}`),icon:`radar`},"switch.off":{label:Y(`Disarm PIR`,`Disattiva il PIR`),phrase:Y(`Disarm the PIR sensor {device}`,`Disattiva il sensore PIR {device}`),icon:`radar`}}},[F.Nightvision]:{actions:{"switch.on":{label:Y(`Night vision on`,`Visione notturna attiva`),phrase:Y(`Turn on night vision on {device}`,`Attiva la visione notturna di {device}`),icon:`moon`},"switch.off":{label:Y(`Night vision off`,`Visione notturna spenta`),phrase:Y(`Turn off night vision on {device}`,`Disattiva la visione notturna di {device}`),icon:`sun`}}},[F.PrivacyMask]:{actions:{"switch.on":{label:Y(`Privacy on`,`Privacy attiva`),phrase:Y(`Turn on privacy on {device}`,`Attiva la privacy su {device}`),icon:`eye-off`},"switch.off":{label:Y(`Privacy off`,`Privacy disattiva`),phrase:Y(`Turn off privacy on {device}`,`Disattiva la privacy su {device}`),icon:`eye`}}},[F.Autotrack]:{actions:{"switch.on":{label:Y(`Autotrack on`,`Inseguimento attivo`),phrase:Y(`Start autotracking on {device}`,`Attiva l’inseguimento su {device}`),icon:`crosshair`},"switch.off":{label:Y(`Autotrack off`,`Inseguimento spento`),phrase:Y(`Stop autotracking on {device}`,`Disattiva l’inseguimento su {device}`),icon:`crosshair`}}},[F.Outlet]:{actions:{"switch.on":{icon:`plug-zap`},"switch.off":{icon:`plug`}},state:{on:{icon:`plug-zap`}}}}}},brightness:{scope:`device`,noun:Y(`Brightness`,`Luminosità`),actions:[{id:`brightness.full`,method:`setBrightness`,label:Y(`Full brightness`,`Luminosità massima`),phrase:Y(`Set {device} to full brightness`,`Porta {device} alla massima luminosità`),icon:`sun`,args:{percentage:100}},{id:`brightness.half`,method:`setBrightness`,label:Y(`Half brightness`,`Luminosità a metà`),phrase:Y(`Dim {device} to half`,`Abbassa {device} a metà luminosità`),icon:`sun-dim`,args:{percentage:50}},{id:`brightness.off`,method:`setBrightness`,label:Y(`Brightness off`,`Luminosità a zero`),phrase:Y(`Dim {device} to zero`,`Abbassa {device} a zero`),icon:`lightbulb-off`,args:{percentage:0}},{id:`brightness.set`,method:`setBrightness`,label:Y(`Set brightness`,`Imposta la luminosità`),phrase:Y(`Set the brightness of {device} to {percentage}`,`Imposta la luminosità di {device} a {percentage}`),icon:`sun-medium`,openArgs:[{key:`percentage`,label:Dfe,offer:{kind:`number`,min:0,max:100,step:1,unit:`%`}}]}],state:[{kind:`numeric`,field:`percentage`,quantity:Y(`the brightness`,`la luminosità`),label:Y(`Brightness`,`Luminosità`),unit:`%`,icon:`sun`}],events:{onBrightnessChanged:{notOperatorFacing:"the `percentage` state trigger reads the same change"}}},color:{scope:`device`,noun:Y(`Colour`,`Colore`),actions:[{id:`color.warmWhite`,method:`setColor`,label:Y(`Warm white`,`Bianco caldo`),phrase:Y(`Set {device} to warm white`,`Imposta {device} su bianco caldo`),icon:`sun`,args:{color:{mode:`mired`,mireds:370}}},{id:`color.coolWhite`,method:`setColor`,label:Y(`Cool white`,`Bianco freddo`),phrase:Y(`Set {device} to cool white`,`Imposta {device} su bianco freddo`),icon:`snowflake`,args:{color:{mode:`mired`,mireds:200}}},{id:`color.red`,method:`setColor`,label:Y(`Red`,`Rosso`),phrase:Y(`Turn {device} red`,`Colora {device} di rosso`),icon:`palette`,args:{color:{mode:`rgb`,rgb:{r:255,g:0,b:0}}}},{id:`color.green`,method:`setColor`,label:Y(`Green`,`Verde`),phrase:Y(`Turn {device} green`,`Colora {device} di verde`),icon:`palette`,args:{color:{mode:`rgb`,rgb:{r:0,g:255,b:0}}}},{id:`color.blue`,method:`setColor`,label:Y(`Blue`,`Blu`),phrase:Y(`Turn {device} blue`,`Colora {device} di blu`),icon:`palette`,args:{color:{mode:`rgb`,rgb:{r:0,g:0,b:255}}}}],state:[{kind:`enum`,field:`mode`,label:Y(`Colour mode`,`Modalità colore`),values:[{value:`rgb`,label:Y(`RGB colour`,`Colore RGB`)},{value:`hsv`,label:Y(`HSV colour`,`Colore HSV`)},{value:`mired`,label:Y(`White temperature`,`Temperatura del bianco`)}],icon:`palette`}],events:{onColorChanged:{notOperatorFacing:"a colour change is read through the `mode` state trigger"}}},cover:{scope:`device`,noun:Y(`Cover`,`Copertura`),actions:[{id:`cover.open`,method:`open`,label:Y(`Open`,`Apri`),phrase:Y(`Open {device}`,`Apri {device}`),icon:`arrow-up-to-line`},{id:`cover.close`,method:`close`,label:Y(`Close`,`Chiudi`),phrase:Y(`Close {device}`,`Chiudi {device}`),icon:`arrow-down-to-line`},{id:`cover.stop`,method:`stop`,label:Y(`Stop`,`Ferma`),phrase:Y(`Stop {device}`,`Ferma {device}`),icon:`square`},{id:`cover.position`,method:`setPosition`,label:Y(`Set position`,`Imposta la posizione`),phrase:Y(`Move {device} to {position} open`,`Porta {device} al {position} di apertura`),icon:`blinds`,openArgs:[{key:`position`,label:Y(`Position`,`Posizione`),offer:{kind:`number`,min:0,max:100,step:1,unit:`%`}}]},{id:`cover.tilt`,method:`setTiltPosition`,label:Y(`Set tilt`,`Imposta l’inclinazione`),phrase:Y(`Tilt {device} to {tiltPosition}`,`Inclina {device} al {tiltPosition}`),icon:`blinds`,openArgs:[{key:`tiltPosition`,label:Y(`Tilt`,`Inclinazione`),offer:{kind:`number`,min:0,max:100,step:1,unit:`%`}}]}],state:[{kind:`enum`,field:`state`,label:Y(`State`,`Stato`),values:I4,icon:`blinds`},{kind:`numeric`,field:`position`,quantity:Y(`the opening`,`l’apertura`),label:Y(`Position`,`Posizione`),unit:`%`,icon:`blinds`}],overrides:{byRole:{[F.CoverGarage]:{actions:{"cover.open":{phrase:Y(`Open the garage door {device}`,`Apri il garage {device}`),icon:`warehouse`},"cover.close":{phrase:Y(`Close the garage door {device}`,`Chiudi il garage {device}`),icon:`warehouse`}}},[F.CoverGate]:{actions:{"cover.open":{phrase:Y(`Open the gate {device}`,`Apri il cancello {device}`),icon:`fence`},"cover.close":{phrase:Y(`Close the gate {device}`,`Chiudi il cancello {device}`),icon:`fence`}}},[F.CoverDoor]:{actions:{"cover.open":{phrase:Y(`Open the door {device}`,`Apri la porta {device}`),icon:`door-open`},"cover.close":{phrase:Y(`Close the door {device}`,`Chiudi la porta {device}`),icon:`door-closed`}}},[F.CoverWindow]:{actions:{"cover.open":{phrase:Y(`Open the window {device}`,`Apri la finestra {device}`),icon:`app-window`},"cover.close":{phrase:Y(`Close the window {device}`,`Chiudi la finestra {device}`),icon:`app-window`}}},[F.CoverShutter]:{actions:{"cover.open":{phrase:Y(`Raise the shutter {device}`,`Alza la tapparella {device}`)},"cover.close":{phrase:Y(`Lower the shutter {device}`,`Abbassa la tapparella {device}`)}}},[F.CoverAwning]:{actions:{"cover.open":{phrase:Y(`Extend the awning {device}`,`Apri la tenda da sole {device}`)},"cover.close":{phrase:Y(`Retract the awning {device}`,`Chiudi la tenda da sole {device}`)}}}}}},valve:{scope:`device`,noun:Y(`Valve`,`Valvola`),actions:[{id:`valve.open`,method:`open`,label:Y(`Open valve`,`Apri la valvola`),phrase:Y(`Open {device}`,`Apri {device}`),icon:`droplets`},{id:`valve.close`,method:`close`,label:Y(`Close valve`,`Chiudi la valvola`),phrase:Y(`Close {device}`,`Chiudi {device}`),icon:`droplet-off`},{id:`valve.stop`,method:`stop`,label:Y(`Stop valve`,`Ferma la valvola`),phrase:Y(`Stop {device}`,`Ferma {device}`),icon:`square`},{id:`valve.position`,method:`setPosition`,label:Y(`Set opening`,`Imposta l’apertura`),phrase:Y(`Open {device} to {position}`,`Apri {device} al {position}`),icon:`droplets`,openArgs:[{key:`position`,label:Y(`Opening`,`Apertura`),offer:{kind:`number`,min:0,max:100,step:1,unit:`%`}}]}],state:[{kind:`enum`,field:`state`,label:Y(`State`,`Stato`),values:I4,icon:`droplets`},{kind:`numeric`,field:`position`,quantity:Y(`the opening`,`l’apertura`),label:Y(`Opening`,`Apertura`),unit:`%`,icon:`droplets`}]},"lock-control":{scope:`device`,noun:Y(`Lock`,`Serratura`),actions:[{id:`lock.lock`,method:`lock`,label:Y(`Lock`,`Chiudi a chiave`),phrase:Y(`Lock {device}`,`Chiudi a chiave {device}`),icon:`lock`,openArgs:[{key:`code`,label:Y(`PIN code`,`Codice PIN`),offer:{kind:`text`,secret:!0},optional:!0}]},{id:`lock.unlock`,method:`unlock`,label:Y(`Unlock`,`Apri la serratura`),phrase:Y(`Unlock {device}`,`Sblocca {device}`),icon:`lock-open`,openArgs:[{key:`code`,label:Y(`PIN code`,`Codice PIN`),offer:{kind:`text`,secret:!0},optional:!0}]},{id:`lock.open`,method:`open`,label:Y(`Open latch`,`Apri lo scrocco`),phrase:Y(`Release the latch of {device}`,`Fai scattare lo scrocco di {device}`),icon:`door-open`}],state:[{kind:`enum`,field:`state`,label:Y(`Lock state`,`Stato della serratura`),values:[{value:`locked`,label:Y(`Locked`,`Chiusa a chiave`),phrase:Y(`When {device} locks`,`Quando {device} si chiude a chiave`)},{value:`unlocked`,label:Y(`Unlocked`,`Sbloccata`),phrase:Y(`When {device} unlocks`,`Quando {device} si sblocca`)},{value:`locking`,label:Y(`Locking`,`In chiusura`),phrase:Y(`When {device} starts locking`,`Quando {device} inizia a chiudersi`)},{value:`unlocking`,label:Y(`Unlocking`,`In apertura`),phrase:Y(`When {device} starts unlocking`,`Quando {device} inizia a sbloccarsi`)},{value:`jammed`,label:Y(`Jammed`,`Inceppata`),phrase:Y(`When {device} jams`,`Quando {device} si inceppa`)}],icon:`lock`}]},"climate-control":{scope:`device`,noun:Y(`Climate`,`Clima`),actions:[{id:`climate.off`,method:`setMode`,label:Y(`Climate off`,`Clima spento`),phrase:Y(`Turn off {device}`,`Spegni {device}`),icon:`power-off`,args:{mode:`off`}},{id:`climate.heat`,method:`setMode`,label:Y(`Heat`,`Riscalda`),phrase:Y(`Set {device} to heat`,`Metti {device} in riscaldamento`),icon:`flame`,args:{mode:`heat`}},{id:`climate.cool`,method:`setMode`,label:Y(`Cool`,`Raffresca`),phrase:Y(`Set {device} to cool`,`Metti {device} in raffrescamento`),icon:`snowflake`,args:{mode:`cool`}},{id:`climate.auto`,method:`setMode`,label:Y(`Climate auto`,`Clima automatico`),phrase:Y(`Set {device} to automatic`,`Metti {device} in automatico`),icon:`thermometer`,args:{mode:`auto`}},{id:`climate.mode`,method:`setMode`,label:Y(`Set mode`,`Imposta la modalità`),phrase:Y(`Set {device} to {mode}`,`Imposta {device} su {mode}`),icon:`thermometer`,openArgs:[{key:`mode`,label:Y(`Mode`,`Modalità`),offer:{kind:`enum`,values:[{value:`off`,label:Y(`Off`,`Spento`)},{value:`heat`,label:Y(`Heat`,`Riscaldamento`)},{value:`cool`,label:Y(`Cool`,`Raffrescamento`)},{value:`auto`,label:Y(`Automatic`,`Automatico`)},{value:`heat_cool`,label:Y(`Heat and cool`,`Caldo e freddo`)},{value:`fan_only`,label:Y(`Fan only`,`Solo ventilazione`)},{value:`dry`,label:Y(`Dry`,`Deumidificazione`)}]}}]},{id:`climate.target`,method:`setTarget`,label:Y(`Set temperature`,`Imposta la temperatura`),phrase:Y(`Set {device} to {target}`,`Imposta {device} a {target}`),icon:`thermometer`,openArgs:[{key:`target`,label:Y(`Temperature`,`Temperatura`),offer:{kind:`number`,step:.5,unit:`°C`}}]},{id:`climate.targetRange`,method:`setTargetRange`,label:Y(`Set temperature range`,`Imposta l’intervallo di temperatura`),phrase:Y(`Keep {device} between {targetLow} and {targetHigh}`,`Mantieni {device} tra {targetLow} e {targetHigh}`),icon:`thermometer`,openArgs:[{key:`targetLow`,label:Y(`Lowest`,`Minima`),offer:{kind:`number`,step:.5,unit:`°C`}},{key:`targetHigh`,label:Y(`Highest`,`Massima`),offer:{kind:`number`,step:.5,unit:`°C`}}]},{id:`climate.targetHumidity`,method:`setTargetHumidity`,label:Y(`Set humidity`,`Imposta l’umidità`),phrase:Y(`Set the humidity target of {device} to {targetHumidity}`,`Imposta l’umidità obiettivo di {device} al {targetHumidity}`),icon:`droplets`,openArgs:[{key:`targetHumidity`,label:Y(`Humidity`,`Umidità`),offer:{kind:`number`,min:0,max:100,step:1,unit:`%`}}]},{id:`climate.fanMode`,method:`setFanMode`,label:Y(`Set fan mode`,`Imposta la ventilazione`),phrase:Y(`Set the fan of {device} to {fanMode}`,`Imposta la ventilazione di {device} su {fanMode}`),icon:`fan`,openArgs:[{key:`fanMode`,label:Y(`Fan mode`,`Ventilazione`),offer:{kind:`dynamic`,from:`status`,field:`availableFanModes`}}]},{id:`climate.preset`,method:`setPreset`,label:Y(`Set preset`,`Imposta il preset`),phrase:Y(`Set {device} to preset {preset}`,`Imposta {device} sul preset {preset}`),icon:`list`,openArgs:[{key:`preset`,label:Y(`Preset`,`Preset`),offer:{kind:`dynamic`,from:`status`,field:`availablePresets`}}]},{id:`climate.swingVerticalOn`,method:`setSwingVertical`,label:Y(`Vertical swing on`,`Oscillazione verticale attiva`),phrase:Y(`Start the vertical swing of {device}`,`Attiva l’oscillazione verticale di {device}`),icon:`move-vertical`,args:{on:!0}},{id:`climate.swingVerticalOff`,method:`setSwingVertical`,label:Y(`Vertical swing off`,`Oscillazione verticale spenta`),phrase:Y(`Stop the vertical swing of {device}`,`Ferma l’oscillazione verticale di {device}`),icon:`move-vertical`,args:{on:!1}},{id:`climate.swingHorizontalOn`,method:`setSwingHorizontal`,label:Y(`Horizontal swing on`,`Oscillazione orizzontale attiva`),phrase:Y(`Start the horizontal swing of {device}`,`Attiva l’oscillazione orizzontale di {device}`),icon:`move-horizontal`,args:{on:!0}},{id:`climate.swingHorizontalOff`,method:`setSwingHorizontal`,label:Y(`Horizontal swing off`,`Oscillazione orizzontale spenta`),phrase:Y(`Stop the horizontal swing of {device}`,`Ferma l’oscillazione orizzontale di {device}`),icon:`move-horizontal`,args:{on:!1}}],state:[{kind:`enum`,field:`mode`,label:Y(`Mode`,`Modalità`),values:[{value:`off`,label:Y(`Off`,`Spento`),phrase:Y(`When {device} turns off`,`Quando {device} si spegne`)},{value:`heat`,label:Y(`Heat`,`Riscaldamento`),phrase:Y(`When {device} starts heating`,`Quando {device} passa al riscaldamento`)},{value:`cool`,label:Y(`Cool`,`Raffrescamento`),phrase:Y(`When {device} starts cooling`,`Quando {device} passa al raffrescamento`)},{value:`auto`,label:Y(`Automatic`,`Automatico`)},{value:`heat_cool`,label:Y(`Heat and cool`,`Caldo e freddo`)},{value:`fan_only`,label:Y(`Fan only`,`Solo ventilazione`)},{value:`dry`,label:Y(`Dry`,`Deumidificazione`)}],icon:`thermometer`},{kind:`numeric`,field:`currentTemp`,quantity:Y(`the temperature`,`la temperatura`),label:Y(`Temperature`,`Temperatura`),unit:`°C`,icon:`thermometer`},{kind:`numeric`,field:`currentHumidity`,quantity:Y(`the humidity`,`l’umidità`),label:Y(`Humidity`,`Umidità`),unit:`%`,icon:`droplets`},{kind:`numeric`,field:`target`,quantity:Y(`the set temperature`,`la temperatura impostata`),label:Y(`Set temperature`,`Temperatura impostata`),unit:`°C`,icon:`thermometer`}]},"fan-control":{scope:`device`,noun:Y(`Fan`,`Ventilatore`),actions:[{id:`fan.off`,method:`setPercentage`,label:Y(`Fan off`,`Ventilatore spento`),phrase:Y(`Stop {device}`,`Ferma {device}`),icon:`power-off`,args:{percentage:0}},{id:`fan.full`,method:`setPercentage`,label:Y(`Fan full`,`Ventilatore al massimo`),phrase:Y(`Run {device} at full speed`,`Porta {device} alla massima velocità`),icon:`fan`,args:{percentage:100}},{id:`fan.speed`,method:`setPercentage`,label:Y(`Set speed`,`Imposta la velocità`),phrase:Y(`Set the speed of {device} to {percentage}`,`Imposta la velocità di {device} al {percentage}`),icon:`fan`,openArgs:[{key:`percentage`,label:Y(`Speed`,`Velocità`),offer:{kind:`number`,min:0,max:100,step:1,unit:`%`}}]},{id:`fan.preset`,method:`setPreset`,label:Y(`Set preset`,`Imposta il preset`),phrase:Y(`Set {device} to preset {preset}`,`Imposta {device} sul preset {preset}`),icon:`list`,openArgs:[{key:`preset`,label:Y(`Preset`,`Preset`),offer:{kind:`dynamic`,from:`status`,field:`availablePresets`}}]},{id:`fan.forward`,method:`setDirection`,label:Y(`Spin forward`,`Rotazione avanti`),phrase:Y(`Spin {device} forward`,`Fai girare {device} in avanti`),icon:`rotate-cw`,args:{direction:`forward`}},{id:`fan.reverse`,method:`setDirection`,label:Y(`Spin in reverse`,`Rotazione inversa`),phrase:Y(`Spin {device} in reverse`,`Fai girare {device} al contrario`),icon:`rotate-ccw`,args:{direction:`reverse`}},{id:`fan.oscillateOn`,method:`setOscillating`,label:Y(`Oscillate`,`Oscillazione attiva`),phrase:Y(`Make {device} oscillate`,`Fai oscillare {device}`),icon:`move-horizontal`,args:{oscillating:!0}},{id:`fan.oscillateOff`,method:`setOscillating`,label:Y(`Stop oscillating`,`Oscillazione spenta`),phrase:Y(`Stop {device} oscillating`,`Ferma l’oscillazione di {device}`),icon:`move-horizontal`,args:{oscillating:!1}}],state:[{kind:`numeric`,field:`percentage`,quantity:Y(`the speed`,`la velocità`),label:Y(`Speed`,`Velocità`),unit:`%`,icon:`fan`},{kind:`boolean`,field:`oscillating`,label:Y(`Oscillating`,`Oscillazione`),whenTrue:Y(`When {device} starts oscillating`,`Quando {device} inizia a oscillare`),whenFalse:Y(`When {device} stops oscillating`,`Quando {device} smette di oscillare`),icon:`move-horizontal`}]},humidifier:{scope:`device`,noun:Y(`Humidifier`,`Umidificatore`),actions:[{id:`humidifier.on`,method:`setOn`,label:Y(`Humidifier on`,`Umidificatore acceso`),phrase:Y(`Turn on {device}`,`Accendi {device}`),icon:`power`,args:{on:!0}},{id:`humidifier.off`,method:`setOn`,label:Y(`Humidifier off`,`Umidificatore spento`),phrase:Y(`Turn off {device}`,`Spegni {device}`),icon:`power-off`,args:{on:!1}},{id:`humidifier.target`,method:`setTargetHumidity`,label:Y(`Set humidity`,`Imposta l’umidità`),phrase:Y(`Set {device} to {humidity} humidity`,`Imposta {device} al {humidity} di umidità`),icon:`droplets`,openArgs:[{key:`humidity`,label:Y(`Humidity`,`Umidità`),offer:{kind:`number`,min:0,max:100,step:1,unit:`%`}}]},{id:`humidifier.mode`,method:`setMode`,label:Y(`Set mode`,`Imposta la modalità`),phrase:Y(`Set {device} to {mode}`,`Imposta {device} su {mode}`),icon:`list`,openArgs:[{key:`mode`,label:Y(`Mode`,`Modalità`),offer:{kind:`dynamic`,from:`status`,field:`availableModes`}}]}],state:[{kind:`boolean`,field:`on`,label:F4,whenTrue:Y(`When {device} turns on`,`Quando {device} si accende`),whenFalse:Y(`When {device} turns off`,`Quando {device} si spegne`),icon:`power`},{kind:`numeric`,field:`currentHumidity`,quantity:Y(`the humidity`,`l’umidità`),label:Y(`Humidity`,`Umidità`),unit:`%`,icon:`droplets`}]},"water-heater":{scope:`device`,noun:Y(`Water heater`,`Scaldacqua`),actions:[{id:`waterHeater.off`,method:`setOperationMode`,label:Y(`Water heater off`,`Scaldacqua spento`),phrase:Y(`Turn off {device}`,`Spegni {device}`),icon:`power-off`,args:{mode:`off`}},{id:`waterHeater.mode`,method:`setOperationMode`,label:Y(`Set mode`,`Imposta la modalità`),phrase:Y(`Set {device} to {mode}`,`Imposta {device} su {mode}`),icon:`list`,openArgs:[{key:`mode`,label:Y(`Mode`,`Modalità`),offer:{kind:`dynamic`,from:`status`,field:`availableModes`}}]},{id:`waterHeater.awayOn`,method:`setAway`,label:Y(`Water heater away on`,`Scaldacqua in modalità assenza`),phrase:Y(`Put {device} in away mode`,`Metti {device} in modalità assenza`),icon:`plane`,args:{on:!0}},{id:`waterHeater.awayOff`,method:`setAway`,label:Y(`Water heater away off`,`Scaldacqua fuori dalla modalità assenza`),phrase:Y(`Take {device} out of away mode`,`Togli {device} dalla modalità assenza`),icon:`house`,args:{on:!1}},{id:`waterHeater.target`,method:`setTargetTemp`,label:Y(`Set temperature`,`Imposta la temperatura`),phrase:Y(`Heat the water of {device} to {temp}`,`Scalda l’acqua di {device} a {temp}`),icon:`thermometer`,openArgs:[{key:`temp`,label:Y(`Temperature`,`Temperatura`),offer:{kind:`number`,step:1,unit:`°C`}}]}],state:[{kind:`numeric`,field:`currentTemp`,quantity:Y(`the water temperature`,`la temperatura dell’acqua`),label:Y(`Water temperature`,`Temperatura dell’acqua`),unit:`°C`,icon:`thermometer`},{kind:`boolean`,field:`away`,label:Y(`Away mode`,`Modalità assenza`),whenTrue:Y(`When {device} goes into away mode`,`Quando {device} entra in modalità assenza`),whenFalse:Y(`When {device} leaves away mode`,`Quando {device} esce dalla modalità assenza`),icon:`plane`},{kind:`value`,field:`operationMode`,label:Y(`Mode`,`Modalità`),offer:{kind:`dynamic`,from:`status`,field:`availableModes`},icon:`list`}]},"heating-valve":{scope:`device`,noun:Y(`Radiator valve`,`Valvola termostatica`),state:[{kind:`numeric`,field:`position`,quantity:Y(`the valve opening`,`l’apertura della valvola`),label:Y(`Valve opening`,`Apertura della valvola`),unit:`%`,icon:`heater`}]},"alarm-panel":{scope:`device`,noun:Y(`Alarm panel`,`Centrale d’allarme`),actions:[{id:`alarm.trigger`,method:`trigger`,label:Y(`Trigger alarm`,`Fai scattare l’allarme`),phrase:Y(`Trigger the alarm on {device}`,`Fai scattare l’allarme su {device}`),icon:`siren`},{id:`alarm.disarm`,method:`disarm`,label:Y(`Disarm`,`Disinserisci`),phrase:Y(`Disarm {device}`,`Disinserisci {device}`),icon:`shield-off`,openArgs:[{key:`code`,label:Y(`PIN code`,`Codice PIN`),offer:{kind:`text`,secret:!0},optional:!0}]},{id:`alarm.arm.home`,method:`arm`,label:Y(`Arm home`,`Inserisci in casa`),phrase:Y(`Arm {device} for home`,`Inserisci {device} in modalità casa`),icon:`house`,args:{mode:`home`},openArgs:[{key:`code`,label:Y(`PIN code`,`Codice PIN`),offer:{kind:`text`,secret:!0},optional:!0}]},{id:`alarm.arm.away`,method:`arm`,label:Y(`Arm away`,`Inserisci fuori casa`),phrase:Y(`Arm {device} for away`,`Inserisci {device} in modalità fuori casa`),icon:`shield-check`,args:{mode:`away`},openArgs:[{key:`code`,label:Y(`PIN code`,`Codice PIN`),offer:{kind:`text`,secret:!0},optional:!0}]},{id:`alarm.arm.night`,method:`arm`,label:Y(`Arm night`,`Inserisci notte`),phrase:Y(`Arm {device} for the night`,`Inserisci {device} in modalità notte`),icon:`moon`,args:{mode:`night`},openArgs:[{key:`code`,label:Y(`PIN code`,`Codice PIN`),offer:{kind:`text`,secret:!0},optional:!0}]},{id:`alarm.arm.vacation`,method:`arm`,label:Y(`Arm vacation`,`Inserisci vacanza`),phrase:Y(`Arm {device} for vacation`,`Inserisci {device} in modalità vacanza`),icon:`plane`,args:{mode:`vacation`},openArgs:[{key:`code`,label:Y(`PIN code`,`Codice PIN`),offer:{kind:`text`,secret:!0},optional:!0}]},{id:`alarm.arm.custom_bypass`,method:`arm`,label:Y(`Arm custom bypass`,`Inserisci con esclusioni`),phrase:Y(`Arm {device} with its custom bypass`,`Inserisci {device} con le zone escluse`),icon:`shield-half`,args:{mode:`custom_bypass`},openArgs:[{key:`code`,label:Y(`PIN code`,`Codice PIN`),offer:{kind:`text`,secret:!0},optional:!0}]}],state:[{kind:`enum`,field:`state`,label:Y(`Alarm state`,`Stato dell’allarme`),values:[{value:`disarmed`,label:Y(`Disarmed`,`Disinserito`),phrase:Y(`When {device} is disarmed`,`Quando {device} viene disinserito`)},{value:`armed_home`,label:Y(`Armed home`,`Inserito in casa`),phrase:Y(`When {device} is armed for home`,`Quando {device} viene inserito in modalità casa`)},{value:`armed_away`,label:Y(`Armed away`,`Inserito fuori casa`),phrase:Y(`When {device} is armed for away`,`Quando {device} viene inserito in modalità fuori casa`)},{value:`armed_night`,label:Y(`Armed night`,`Inserito notte`),phrase:Y(`When {device} is armed for the night`,`Quando {device} viene inserito in modalità notte`)},{value:`armed_vacation`,label:Y(`Armed vacation`,`Inserito vacanza`)},{value:`armed_custom_bypass`,label:Y(`Armed with bypass`,`Inserito con esclusioni`)},{value:`arming`,label:Y(`Arming`,`In inserimento`)},{value:`disarming`,label:Y(`Disarming`,`In disinserimento`)},{value:`pending`,label:Y(`Entry delay`,`Ritardo d’ingresso`)},{value:`triggered`,label:Y(`Triggered`,`In allarme`),phrase:Y(`When {device} goes off`,`Quando {device} scatta`)}],icon:`shield`}]},button:{scope:`device`,noun:Y(`Button`,`Pulsante`),actions:[{id:`button.press`,method:`press`,label:Y(`Press`,`Premi`),phrase:Y(`Press {device}`,`Premi {device}`),icon:`circle-dot`}]},control:{scope:`device`,noun:Y(`Control`,`Controllo`),notOperatorFacing:{setValue:`the value shape depends on the control kind (numeric / select / text / datetime) read from status; a typed picker for it is a follow-up of the automations rework`},state:[{kind:`value`,field:`value`,label:Y(`Value`,`Valore`),offer:{kind:`dynamic`,from:`status`,field:`options`},icon:`sliders-horizontal`}]},"motion-trigger":{scope:`device`,noun:Y(`Motion trigger`,`Attivazione al movimento`),actions:[{id:`motionTrigger.on`,method:`setMotionTrigger`,label:Y(`Motion trigger on`,`Attivazione al movimento attiva`),phrase:Y(`Let motion trigger {device}`,`Fai attivare {device} dal movimento`),icon:`activity`,args:{enabled:!0}},{id:`motionTrigger.off`,method:`setMotionTrigger`,label:Y(`Motion trigger off`,`Attivazione al movimento spenta`),phrase:Y(`Stop motion triggering {device}`,`Non far più attivare {device} dal movimento`),icon:`activity`,args:{enabled:!1}}],state:[{kind:`boolean`,field:`enabled`,label:Y(`Motion trigger`,`Attivazione al movimento`),whenTrue:Y(`When motion triggering is turned on for {device}`,`Quando si attiva l’attivazione al movimento di {device}`),whenFalse:Y(`When motion triggering is turned off for {device}`,`Quando si disattiva l’attivazione al movimento di {device}`),icon:`activity`}],events:{onMotionTriggerChanged:{notOperatorFacing:"the `enabled` state trigger phrases both edges of this change"}}}},L4=Y(`the battery level`,`il livello della batteria`),kfe={"vacuum-control":{scope:`device`,noun:Y(`Robot vacuum`,`Robot aspirapolvere`),actions:[{id:`vacuum.start`,method:`start`,label:Y(`Start cleaning`,`Avvia la pulizia`),phrase:Y(`Start {device} cleaning`,`Fai partire la pulizia di {device}`),icon:`play`},{id:`vacuum.pause`,method:`pause`,label:Y(`Pause`,`Metti in pausa`),phrase:Y(`Pause {device}`,`Metti in pausa {device}`),icon:`pause`},{id:`vacuum.stop`,method:`stop`,label:Y(`Stop`,`Ferma`),phrase:Y(`Stop {device}`,`Ferma {device}`),icon:`square`},{id:`vacuum.dock`,method:`returnToBase`,label:Y(`Return to base`,`Torna alla base`),phrase:Y(`Send {device} back to its base`,`Rimanda {device} alla base`),icon:`house`},{id:`vacuum.locate`,method:`locate`,label:Y(`Locate`,`Trova`),phrase:Y(`Make {device} beep so you can find it`,`Fai suonare {device} per trovarlo`),icon:`map-pin`},{id:`vacuum.fanSpeed`,method:`setFanSpeed`,label:Y(`Set suction`,`Imposta l’aspirazione`),phrase:Y(`Set the suction of {device} to {speed}`,`Imposta l’aspirazione di {device} su {speed}`),icon:`fan`,openArgs:[{key:`speed`,label:Y(`Suction`,`Aspirazione`),offer:{kind:`dynamic`,from:`status`,field:`availableFanSpeeds`}}]}],state:[{kind:`enum`,field:`state`,label:Y(`Activity`,`Attività`),values:[{value:`idle`,label:Y(`Idle`,`Inattivo`)},{value:`cleaning`,label:Y(`Cleaning`,`In pulizia`),phrase:Y(`When {device} starts cleaning`,`Quando {device} inizia a pulire`)},{value:`paused`,label:Y(`Paused`,`In pausa`)},{value:`returning`,label:Y(`Returning`,`In rientro`),phrase:Y(`When {device} heads back to its base`,`Quando {device} torna alla base`)},{value:`docked`,label:Y(`Docked`,`Alla base`),phrase:Y(`When {device} docks`,`Quando {device} arriva alla base`)},{value:`drying`,label:Y(`Drying`,`In asciugatura`)},{value:`error`,label:Y(`Error`,`Errore`),phrase:Y(`When {device} reports an error`,`Quando {device} segnala un errore`)}],icon:`bot`},{kind:`numeric`,field:`batteryLevel`,quantity:L4,label:Y(`Battery`,`Batteria`),unit:`%`,icon:`battery`}]},"lawn-mower-control":{scope:`device`,noun:Y(`Robot mower`,`Robot tosaerba`),actions:[{id:`lawnMower.start`,method:`startMowing`,label:Y(`Start mowing`,`Avvia il taglio`),phrase:Y(`Start {device} mowing`,`Fai partire il taglio di {device}`),icon:`play`},{id:`lawnMower.pause`,method:`pause`,label:Y(`Pause mower`,`Metti in pausa il tosaerba`),phrase:Y(`Pause {device}`,`Metti in pausa {device}`),icon:`pause`},{id:`lawnMower.dock`,method:`dock`,label:Y(`Dock mower`,`Riporta alla base`),phrase:Y(`Send {device} back to its dock`,`Rimanda {device} alla base`),icon:`house`}],state:[{kind:`enum`,field:`activity`,label:Y(`Activity`,`Attività`),values:[{value:`idle`,label:Y(`Idle`,`Inattivo`)},{value:`mowing`,label:Y(`Mowing`,`In taglio`),phrase:Y(`When {device} starts mowing`,`Quando {device} inizia a tagliare`)},{value:`paused`,label:Y(`Paused`,`In pausa`)},{value:`docked`,label:Y(`Docked`,`Alla base`),phrase:Y(`When {device} docks`,`Quando {device} arriva alla base`)},{value:`error`,label:Y(`Error`,`Errore`),phrase:Y(`When {device} reports an error`,`Quando {device} segnala un errore`)}],icon:`bot`},{kind:`numeric`,field:`batteryLevel`,quantity:L4,label:Y(`Battery`,`Batteria`),unit:`%`,icon:`battery`}]},dishwasher:{scope:`device`,noun:Y(`Dishwasher`,`Lavastoviglie`),actions:[{id:`dishwasher.start`,method:`start`,label:Y(`Start cycle`,`Avvia il lavaggio`),phrase:Y(`Start {device}`,`Avvia {device}`),icon:`play`,openArgs:[{key:`program`,label:Y(`Programme`,`Programma`),offer:{kind:`dynamic`,from:`status`,field:`availablePrograms`},optional:!0}]},{id:`dishwasher.pause`,method:`pause`,label:Y(`Pause`,`Metti in pausa`),phrase:Y(`Pause {device}`,`Metti in pausa {device}`),icon:`pause`},{id:`dishwasher.resume`,method:`resume`,label:Y(`Resume`,`Riprendi`),phrase:Y(`Resume {device}`,`Riprendi il lavaggio di {device}`),icon:`play`},{id:`dishwasher.stop`,method:`stop`,label:Y(`Stop`,`Ferma`),phrase:Y(`Stop {device}`,`Ferma {device}`),icon:`square`},{id:`dishwasher.program`,method:`setProgram`,label:Y(`Choose programme`,`Scegli il programma`),phrase:Y(`Select the {program} programme on {device}`,`Seleziona il programma {program} su {device}`),icon:`list`,openArgs:[{key:`program`,label:Y(`Programme`,`Programma`),offer:{kind:`dynamic`,from:`status`,field:`availablePrograms`}}]},{id:`dishwasher.powerOn`,method:`setPower`,label:Y(`Power on`,`Accendi`),phrase:Y(`Turn on {device}`,`Accendi {device}`),icon:`power`,args:{on:!0}},{id:`dishwasher.powerOff`,method:`setPower`,label:Y(`Power off`,`Spegni`),phrase:Y(`Turn off {device}`,`Spegni {device}`),icon:`power-off`,args:{on:!1}},{id:`dishwasher.halfLoadOn`,method:`setHalfLoad`,label:Y(`Half load on`,`Mezzo carico attivo`),phrase:Y(`Turn on half load on {device}`,`Attiva il mezzo carico su {device}`),icon:`contrast`,args:{on:!0}},{id:`dishwasher.halfLoadOff`,method:`setHalfLoad`,label:Y(`Half load off`,`Mezzo carico spento`),phrase:Y(`Turn off half load on {device}`,`Disattiva il mezzo carico su {device}`),icon:`contrast`,args:{on:!1}},{id:`dishwasher.hygienePlusOn`,method:`setHygienePlus`,label:Y(`Hygiene Plus on`,`Igiene Plus attiva`),phrase:Y(`Turn on Hygiene Plus on {device}`,`Attiva Igiene Plus su {device}`),icon:`sparkles`,args:{on:!0}},{id:`dishwasher.hygienePlusOff`,method:`setHygienePlus`,label:Y(`Hygiene Plus off`,`Igiene Plus spenta`),phrase:Y(`Turn off Hygiene Plus on {device}`,`Disattiva Igiene Plus su {device}`),icon:`sparkles`,args:{on:!1}},{id:`dishwasher.extraDryOn`,method:`setExtraDry`,label:Y(`Extra dry on`,`Asciugatura extra attiva`),phrase:Y(`Turn on extra dry on {device}`,`Attiva l’asciugatura extra su {device}`),icon:`sun`,args:{on:!0}},{id:`dishwasher.extraDryOff`,method:`setExtraDry`,label:Y(`Extra dry off`,`Asciugatura extra spenta`),phrase:Y(`Turn off extra dry on {device}`,`Disattiva l’asciugatura extra su {device}`),icon:`sun`,args:{on:!1}},{id:`dishwasher.intensiveZoneOn`,method:`setIntensiveZone`,label:Y(`Intensive zone on`,`Zona intensiva attiva`),phrase:Y(`Turn on the intensive zone on {device}`,`Attiva la zona intensiva su {device}`),icon:`flame`,args:{on:!0}},{id:`dishwasher.intensiveZoneOff`,method:`setIntensiveZone`,label:Y(`Intensive zone off`,`Zona intensiva spenta`),phrase:Y(`Turn off the intensive zone on {device}`,`Disattiva la zona intensiva su {device}`),icon:`flame`,args:{on:!1}},{id:`dishwasher.varioSpeedOn`,method:`setVarioSpeedPlus`,label:Y(`Speed boost on`,`Lavaggio rapido attivo`),phrase:Y(`Turn on the speed boost on {device}`,`Attiva il lavaggio rapido su {device}`),icon:`zap`,args:{on:!0}},{id:`dishwasher.varioSpeedOff`,method:`setVarioSpeedPlus`,label:Y(`Speed boost off`,`Lavaggio rapido spento`),phrase:Y(`Turn off the speed boost on {device}`,`Disattiva il lavaggio rapido su {device}`),icon:`zap`,args:{on:!1}},{id:`dishwasher.childLockOn`,method:`setChildLock`,label:Y(`Child lock on`,`Blocco bambini attivo`),phrase:Y(`Turn on the child lock of {device}`,`Attiva il blocco bambini di {device}`),icon:`lock`,args:{on:!0}},{id:`dishwasher.childLockOff`,method:`setChildLock`,label:Y(`Child lock off`,`Blocco bambini spento`),phrase:Y(`Turn off the child lock of {device}`,`Disattiva il blocco bambini di {device}`),icon:`lock-open`,args:{on:!1}}],notOperatorFacing:{setOption:`a raw appliance option key/value; every option worth naming has its own action above`},state:[{kind:`enum`,field:`state`,label:Y(`Cycle`,`Ciclo`),values:[{value:`idle`,label:Y(`Idle`,`Inattiva`)},{value:`running`,label:Y(`Running`,`In funzione`),phrase:Y(`When {device} starts a cycle`,`Quando {device} inizia un lavaggio`)},{value:`paused`,label:Y(`Paused`,`In pausa`)},{value:`finished`,label:Y(`Finished`,`Terminato`),phrase:Y(`When {device} finishes`,`Quando {device} finisce il lavaggio`)},{value:`error`,label:Y(`Error`,`Errore`),phrase:Y(`When {device} reports an error`,`Quando {device} segnala un errore`)},{value:`unavailable`,label:Y(`Unavailable`,`Non disponibile`)}],icon:`washing-machine`},{kind:`numeric`,field:`progressPercent`,quantity:Y(`the cycle progress`,`l’avanzamento del lavaggio`),label:Y(`Progress`,`Avanzamento`),unit:`%`,icon:`loader`},{kind:`boolean`,field:`doorOpen`,label:Y(`Door open`,`Sportello aperto`),whenTrue:Y(`When the door of {device} opens`,`Quando si apre lo sportello di {device}`),whenFalse:Y(`When the door of {device} closes`,`Quando si chiude lo sportello di {device}`),icon:`door-open`},{kind:`boolean`,field:`filterCleaningDue`,label:Y(`Filter cleaning due`,`Pulizia filtro da fare`),whenTrue:Y(`When {device} asks for its filter to be cleaned`,`Quando {device} chiede di pulire il filtro`),whenFalse:Y(`When the filter reminder of {device} clears`,`Quando l’avviso filtro di {device} rientra`),icon:`funnel`},{kind:`boolean`,field:`machineCareDue`,label:Y(`Machine care due`,`Manutenzione da fare`),whenTrue:Y(`When {device} asks for a machine-care cycle`,`Quando {device} chiede un ciclo di manutenzione`),whenFalse:Y(`When the machine-care reminder of {device} clears`,`Quando l’avviso di manutenzione di {device} rientra`),icon:`wrench`}]},"pet-feeder":{scope:`device`,noun:Y(`Pet feeder`,`Distributore di cibo`),actions:[{id:`petFeeder.feed`,method:`feed`,label:Y(`Feed`,`Dai da mangiare`),phrase:Y(`Dispense {grams} from {device}`,`Eroga {grams} da {device}`),icon:`paw-print`,openArgs:[{key:`grams`,label:Y(`Grams`,`Grammi`),offer:{kind:`number`,min:4,max:200,step:1,unit:`g`},optional:!0}]},{id:`petFeeder.feedHoppers`,method:`feed`,label:Y(`Feed from both hoppers`,`Eroga da entrambi i serbatoi`),phrase:Y(`Dispense {hopper1} and {hopper2} from {device}`,`Eroga {hopper1} e {hopper2} da {device}`),icon:`paw-print`,openArgs:[{key:`hopper1`,label:Y(`Hopper 1`,`Serbatoio 1`),offer:{kind:`number`,min:4,max:200,step:1,unit:`g`},optional:!0},{key:`hopper2`,label:Y(`Hopper 2`,`Serbatoio 2`),offer:{kind:`number`,min:4,max:200,step:1,unit:`g`},optional:!0}]},{id:`petFeeder.cancelFeed`,method:`cancelFeed`,label:Y(`Cancel feeding`,`Annulla l’erogazione`),phrase:Y(`Cancel the feeding on {device}`,`Annulla l’erogazione di {device}`),icon:`circle-x`},{id:`petFeeder.callPet`,method:`callPet`,label:Y(`Call pet`,`Chiama l’animale`),phrase:Y(`Call your pet with {device}`,`Chiama l’animale con {device}`),icon:`megaphone`},{id:`petFeeder.playSound`,method:`playSound`,label:Y(`Play sound`,`Riproduci un suono`),phrase:Y(`Play sound {soundId} on {device}`,`Riproduci il suono {soundId} su {device}`),icon:`volume-2`,openArgs:[{key:`soundId`,label:Y(`Sound`,`Suono`),offer:{kind:`number`,min:0,step:1}}]},{id:`petFeeder.resetDesiccant`,method:`resetDesiccant`,label:Y(`Desiccant replaced`,`Essiccante sostituito`),phrase:Y(`Mark the desiccant of {device} as replaced`,`Segna come sostituito l’essiccante di {device}`),icon:`refresh-cw`},{id:`petFeeder.foodReplenished`,method:`markFoodReplenished`,label:Y(`Food refilled`,`Cibo ricaricato`),phrase:Y(`Mark {device} as refilled`,`Segna {device} come ricaricato`),icon:`package`},{id:`petFeeder.childLockOn`,method:`setChildLock`,label:Y(`Child lock on`,`Blocco bambini attivo`),phrase:Y(`Turn on the child lock of {device}`,`Attiva il blocco bambini di {device}`),icon:`lock`,args:{on:!0}},{id:`petFeeder.childLockOff`,method:`setChildLock`,label:Y(`Child lock off`,`Blocco bambini spento`),phrase:Y(`Turn off the child lock of {device}`,`Disattiva il blocco bambini di {device}`),icon:`lock-open`,args:{on:!1}},{id:`petFeeder.lightOn`,method:`setIndicatorLight`,label:Y(`Indicator light on`,`Spia accesa`),phrase:Y(`Turn on the indicator light of {device}`,`Accendi la spia di {device}`),icon:`lightbulb`,args:{on:!0}},{id:`petFeeder.lightOff`,method:`setIndicatorLight`,label:Y(`Indicator light off`,`Spia spenta`),phrase:Y(`Turn off the indicator light of {device}`,`Spegni la spia di {device}`),icon:`lightbulb-off`,args:{on:!1}},{id:`petFeeder.feedSoundOn`,method:`setFeedSound`,label:Y(`Feeding sound on`,`Suono di erogazione attivo`),phrase:Y(`Turn on the feeding sound of {device}`,`Attiva il suono di erogazione di {device}`),icon:`volume-2`,args:{on:!0}},{id:`petFeeder.feedSoundOff`,method:`setFeedSound`,label:Y(`Feeding sound off`,`Suono di erogazione spento`),phrase:Y(`Turn off the feeding sound of {device}`,`Disattiva il suono di erogazione di {device}`),icon:`volume-x`,args:{on:!1}},{id:`petFeeder.volume`,method:`setVolume`,label:Y(`Set volume`,`Imposta il volume`),phrase:Y(`Set the volume of {device} to {level}`,`Imposta il volume di {device} a {level}`),icon:`volume-2`,openArgs:[{key:`level`,label:Y(`Volume`,`Volume`),offer:{kind:`number`,min:0,step:1}}]}],state:[{kind:`boolean`,field:`lowFood`,label:Y(`Food low`,`Cibo in esaurimento`),whenTrue:Y(`When {device} runs low on food`,`Quando il cibo di {device} sta finendo`),whenFalse:Y(`When {device} has enough food again`,`Quando {device} ha di nuovo cibo a sufficienza`),icon:`package`},{kind:`boolean`,field:`feeding`,label:Y(`Feeding`,`In erogazione`),whenTrue:Y(`When {device} starts feeding`,`Quando {device} inizia a erogare`),whenFalse:Y(`When {device} finishes feeding`,`Quando {device} finisce di erogare`),icon:`paw-print`},{kind:`numeric`,field:`desiccantLeftDays`,quantity:Y(`the desiccant life`,`la durata dell’essiccante`),label:Y(`Desiccant`,`Essiccante`),unit:`d`,icon:`calendar-clock`}]},"media-player":{scope:`device`,noun:Y(`Media player`,`Lettore multimediale`),actions:[{id:`media.play`,method:`play`,label:Y(`Play`,`Riproduci`),phrase:Y(`Play on {device}`,`Avvia la riproduzione su {device}`),icon:`play`},{id:`media.pause`,method:`pause`,label:Y(`Pause media`,`Metti in pausa`),phrase:Y(`Pause {device}`,`Metti in pausa {device}`),icon:`pause`},{id:`media.stop`,method:`stop`,label:Y(`Stop media`,`Ferma la riproduzione`),phrase:Y(`Stop {device}`,`Ferma {device}`),icon:`square`},{id:`media.next`,method:`next`,label:Y(`Next track`,`Brano successivo`),phrase:Y(`Skip to the next track on {device}`,`Passa al brano successivo su {device}`),icon:`skip-forward`},{id:`media.previous`,method:`previous`,label:Y(`Previous track`,`Brano precedente`),phrase:Y(`Go back to the previous track on {device}`,`Torna al brano precedente su {device}`),icon:`skip-back`},{id:`media.volume`,method:`setVolume`,label:Y(`Set volume`,`Imposta il volume`),phrase:Y(`Set the volume of {device} to {volumeLevel}`,`Imposta il volume di {device} al {volumeLevel}`),icon:`volume-2`,openArgs:[{key:`volumeLevel`,label:Y(`Volume`,`Volume`),offer:{kind:`number`,min:0,max:100,step:1,unit:`%`}}]},{id:`media.mute`,method:`setMute`,label:Y(`Mute`,`Silenzia`),phrase:Y(`Mute {device}`,`Silenzia {device}`),icon:`volume-x`,args:{muted:!0}},{id:`media.unmute`,method:`setMute`,label:Y(`Unmute`,`Riattiva l’audio`),phrase:Y(`Unmute {device}`,`Riattiva l’audio di {device}`),icon:`volume-2`,args:{muted:!1}},{id:`media.shuffleOn`,method:`setShuffle`,label:Y(`Shuffle on`,`Riproduzione casuale attiva`),phrase:Y(`Turn on shuffle on {device}`,`Attiva la riproduzione casuale su {device}`),icon:`shuffle`,args:{shuffle:!0}},{id:`media.shuffleOff`,method:`setShuffle`,label:Y(`Shuffle off`,`Riproduzione casuale spenta`),phrase:Y(`Turn off shuffle on {device}`,`Disattiva la riproduzione casuale su {device}`),icon:`shuffle`,args:{shuffle:!1}},{id:`media.repeat`,method:`setRepeat`,label:Y(`Set repeat`,`Imposta la ripetizione`),phrase:Y(`Set repeat on {device} to {repeat}`,`Imposta la ripetizione di {device} su {repeat}`),icon:`repeat`,openArgs:[{key:`repeat`,label:Y(`Repeat`,`Ripetizione`),offer:{kind:`enum`,values:[{value:`off`,label:Y(`Off`,`Disattivata`)},{value:`all`,label:Y(`All`,`Tutti i brani`)},{value:`one`,label:Y(`One track`,`Un brano`)}]}}]},{id:`media.source`,method:`selectSource`,label:Y(`Select source`,`Scegli la sorgente`),phrase:Y(`Switch {device} to {source}`,`Passa {device} alla sorgente {source}`),icon:`cast`,openArgs:[{key:`source`,label:Y(`Source`,`Sorgente`),offer:{kind:`dynamic`,from:`status`,field:`availableSources`}}]},{id:`media.seek`,method:`seek`,label:Y(`Seek`,`Vai al punto`),phrase:Y(`Move {device} to {positionMs}`,`Porta {device} al punto {positionMs}`),icon:`fast-forward`,openArgs:[{key:`positionMs`,label:Y(`Position`,`Posizione`),offer:{kind:`number`,min:0,step:1e3,unit:`ms`}}]},{id:`media.playMedia`,method:`playMedia`,label:Y(`Play media`,`Riproduci un contenuto`),phrase:Y(`Play {mediaId} on {device}`,`Riproduci {mediaId} su {device}`),icon:`music`,openArgs:[{key:`mediaId`,label:Y(`Media`,`Contenuto`),offer:{kind:`text`}},{key:`mediaType`,label:Y(`Media type`,`Tipo di contenuto`),offer:{kind:`text`}}]}],state:[{kind:`enum`,field:`state`,label:Y(`Playback`,`Riproduzione`),values:[{value:`off`,label:Y(`Off`,`Spento`),phrase:Y(`When {device} turns off`,`Quando {device} si spegne`)},{value:`on`,label:Y(`On`,`Acceso`),phrase:Y(`When {device} turns on`,`Quando {device} si accende`)},{value:`idle`,label:Y(`Idle`,`Inattivo`)},{value:`playing`,label:Y(`Playing`,`In riproduzione`),phrase:Y(`When {device} starts playing`,`Quando {device} inizia a riprodurre`)},{value:`paused`,label:Y(`Paused`,`In pausa`),phrase:Y(`When {device} is paused`,`Quando {device} va in pausa`)},{value:`buffering`,label:Y(`Buffering`,`In caricamento`)},{value:`standby`,label:Y(`Standby`,`In standby`)}],icon:`music`},{kind:`numeric`,field:`volumeLevel`,quantity:Y(`the volume`,`il volume`),label:Y(`Volume`,`Volume`),unit:`%`,icon:`volume-2`},{kind:`boolean`,field:`isMuted`,label:Y(`Muted`,`Silenziato`),whenTrue:Y(`When {device} is muted`,`Quando {device} viene silenziato`),whenFalse:Y(`When {device} is unmuted`,`Quando l’audio di {device} torna attivo`),icon:`volume-x`},{kind:`value`,field:`source`,label:Y(`Source`,`Sorgente`),offer:{kind:`dynamic`,from:`status`,field:`availableSources`},icon:`cast`}]},consumables:{scope:`device`,noun:Y(`Consumables`,`Materiali di consumo`),actions:[{id:`consumables.reset`,method:`reset`,label:Y(`Mark as replaced`,`Segna come sostituito`),phrase:Y(`Mark {key} as replaced on {device}`,`Segna {key} come sostituito su {device}`),icon:`refresh-cw`,openArgs:[{key:`key`,label:Y(`Consumable`,`Materiale`),offer:{kind:`dynamic`,from:`status`,field:`items`,valueKey:`key`,labelKey:`label`,where:{key:`resettable`,equals:!0}}}]}]},navigation:{scope:`device`,noun:Y(`Robot movement`,`Movimento del robot`),actions:[{id:`navigation.stop`,method:`stop`,label:Y(`Stop`,`Ferma`),phrase:Y(`Stop {device}`,`Ferma {device}`),icon:`square`},{id:`navigation.runAction`,method:`runAction`,label:Y(`Run a routine`,`Esegui una routine`),phrase:Y(`Have {device} {actionId}`,`Fai eseguire a {device}: {actionId}`),icon:`bot`,openArgs:[{key:`actionId`,label:Y(`Routine`,`Routine`),offer:{kind:`enum`,values:[{value:`goHome`,label:Y(`go home`,`torna alla base`)},{value:`locate`,label:Y(`beep so you can find it`,`suona per farsi trovare`)},{value:`spotClean`,label:Y(`clean this spot`,`pulisci questo punto`)},{value:`findPet`,label:Y(`find the pet`,`cerca l’animale`)},{value:`personFollow`,label:Y(`follow a person`,`segui una persona`)},{value:`stop`,label:Y(`stop`,`fermati`)},{value:`startClean`,label:Y(`start cleaning`,`inizia a pulire`)},{value:`pauseClean`,label:Y(`pause cleaning`,`metti in pausa la pulizia`)},{value:`dockWash`,label:Y(`wash the mop at the dock`,`lava il mocio alla base`)},{value:`autoEmpty`,label:Y(`empty the bin at the dock`,`svuota il contenitore alla base`)},{value:`flashOn`,label:Y(`turn the flash on`,`accendi il flash`)},{value:`flashOff`,label:Y(`turn the flash off`,`spegni il flash`)}]}}]},{id:`navigation.playSound`,method:`playSound`,label:Y(`Play sound`,`Riproduci un suono`),phrase:Y(`Play {soundId} on {device}`,`Riproduci {soundId} su {device}`),icon:`volume-2`,openArgs:[{key:`soundId`,label:Y(`Sound`,`Suono`),offer:{kind:`dynamic`,from:`method`,method:`listActions`,valueKey:`soundId`,labelKey:`label`,where:{key:`kind`,equals:`sound`},valueKind:`number`}}]},{id:`navigation.lightOn`,method:`setLightOn`,label:Y(`Light on`,`Luce accesa`),phrase:Y(`Turn on the light of {device}`,`Accendi la luce di {device}`),icon:`lightbulb`,args:{on:!0}},{id:`navigation.lightOff`,method:`setLightOn`,label:Y(`Light off`,`Luce spenta`),phrase:Y(`Turn off the light of {device}`,`Spegni la luce di {device}`),icon:`lightbulb-off`,args:{on:!1}},{id:`navigation.lightAuto`,method:`setLightMode`,label:Y(`Light automatic`,`Luce automatica`),phrase:Y(`Set the light of {device} to automatic`,`Metti la luce di {device} in automatico`),icon:`lightbulb`,args:{mode:`auto`}},{id:`navigation.lightLevel`,method:`setLightLevel`,label:Y(`Set light level`,`Imposta la luce`),phrase:Y(`Set the light of {device} to {level}`,`Imposta la luce di {device} al {level}`),icon:`sun-medium`,openArgs:[{key:`level`,label:Y(`Level`,`Livello`),offer:{kind:`number`,min:40,max:100,step:1,unit:`%`}}]}],notOperatorFacing:{move:`joystick control from the live view — continuous, not a discrete step`,goToPoint:`tap-to-go on the live map — the point only means something on that picture`},state:[{kind:`enum`,field:`mode`,label:Y(`Activity`,`Attività`),values:[{value:`idle`,label:Y(`Idle`,`Inattivo`)},{value:`cleaning`,label:Y(`Cleaning`,`In pulizia`)},{value:`spot`,label:Y(`Spot cleaning`,`Pulizia localizzata`)},{value:`following`,label:Y(`Following`,`In inseguimento`)},{value:`goto`,label:Y(`Moving to a point`,`In movimento verso un punto`)},{value:`returning`,label:Y(`Returning`,`In rientro`)},{value:`paused`,label:Y(`Paused`,`In pausa`)},{value:`unknown`,label:Y(`Unknown`,`Sconosciuto`)}],icon:`bot`}],events:{onStatusChanged:{notOperatorFacing:"the `mode` state trigger reads the same change"}}},"script-runner":{scope:`device`,noun:Y(`Script`,`Script`),actions:[{id:`script.run`,method:`run`,label:Y(`Run script`,`Esegui lo script`),phrase:Y(`Run {device}`,`Esegui {device}`),icon:`scroll-text`},{id:`script.stop`,method:`stop`,label:Y(`Stop script`,`Ferma lo script`),phrase:Y(`Stop {device}`,`Ferma {device}`),icon:`square`}],state:[{kind:`boolean`,field:`isRunning`,label:Y(`Running`,`In esecuzione`),whenTrue:Y(`When {device} starts running`,`Quando {device} parte`),whenFalse:Y(`When {device} finishes`,`Quando {device} termina`),icon:`scroll-text`}]},"automation-control":{scope:`device`,noun:Y(`Automation`,`Automazione`),actions:[{id:`haAutomation.enable`,method:`enable`,label:Y(`Enable automation`,`Abilita l’automazione`),phrase:Y(`Enable {device}`,`Abilita {device}`),icon:`toggle-right`},{id:`haAutomation.disable`,method:`disable`,label:Y(`Disable automation`,`Disabilita l’automazione`),phrase:Y(`Disable {device}`,`Disabilita {device}`),icon:`toggle-left`},{id:`haAutomation.trigger`,method:`trigger`,label:Y(`Trigger automation`,`Avvia l’automazione`),phrase:Y(`Run {device} now`,`Esegui subito {device}`),icon:`workflow`}],state:[{kind:`boolean`,field:`enabled`,label:Y(`Enabled`,`Abilitata`),whenTrue:Y(`When {device} is enabled`,`Quando {device} viene abilitata`),whenFalse:Y(`When {device} is disabled`,`Quando {device} viene disabilitata`),icon:`toggle-right`},{kind:`boolean`,field:`isRunning`,label:Y(`Running`,`In esecuzione`),whenTrue:Y(`When {device} starts running`,`Quando {device} parte`),whenFalse:Y(`When {device} finishes`,`Quando {device} termina`),icon:`workflow`}]},notifier:{scope:`device`,noun:Y(`Notifier`,`Notificatore`),actions:[{id:`notifier.send`,method:`send`,label:Y(`Send a notification`,`Invia una notifica`),phrase:Y(`Send “{body}” through {device}`,`Invia «{body}» tramite {device}`),icon:`send`,openArgs:[{key:`title`,label:Y(`Title`,`Titolo`),offer:{kind:`text`},optional:!0},{key:`body`,label:Y(`Message`,`Messaggio`),offer:{kind:`text`}},{key:`priority`,label:Y(`Priority`,`Priorità`),offer:{kind:`enum`,values:[{value:`min`,label:Y(`Minimal`,`Minima`)},{value:`low`,label:Y(`Low`,`Bassa`)},{value:`normal`,label:Y(`Normal`,`Normale`)},{value:`high`,label:Y(`High`,`Alta`)}]},optional:!0}]}],events:{onSent:{notOperatorFacing:`a delivery receipt of a send this system made — not a fact about the world`}}},"running-state":{scope:`device`,noun:Y(`Running`,`In funzione`),state:[{kind:`boolean`,field:`running`,label:Y(`Running`,`In funzione`),whenTrue:Y(`When {device} starts`,`Quando {device} inizia`),whenFalse:Y(`When {device} finishes`,`Quando {device} finisce`),icon:`play`}],events:{onStarted:{category:E.RunningStarted,label:Y(`Started running`,`Ha iniziato a funzionare`),phrase:Y(`When {device} starts running`,`Quando {device} inizia a funzionare`),icon:`play`},onFinished:{category:E.RunningFinished,label:Y(`Finished`,`Ha finito`),phrase:Y(`When {device} finishes`,`Quando {device} finisce`),icon:`square`}},overrides:{byType:{[P.Washer]:{state:{running:{whenTrue:Y(`When the washing machine starts`,`Quando la lavatrice inizia`),whenFalse:Y(`When the washing machine has finished`,`Quando la lavatrice ha finito`)}},events:{onStarted:{phrase:Y(`When the washing machine starts`,`Quando la lavatrice inizia`)},onFinished:{phrase:Y(`When the washing machine has finished`,`Quando la lavatrice ha finito`)}}},[P.Dryer]:{state:{running:{whenTrue:Y(`When the dryer starts`,`Quando l'asciugatrice inizia`),whenFalse:Y(`When the dryer has finished`,`Quando l'asciugatrice ha finito`)}},events:{onStarted:{phrase:Y(`When the dryer starts`,`Quando l'asciugatrice inizia`)},onFinished:{phrase:Y(`When the dryer has finished`,`Quando l'asciugatrice ha finito`)}}},[P.Dishwasher]:{state:{running:{whenTrue:Y(`When the dishwasher starts`,`Quando la lavastoviglie inizia`),whenFalse:Y(`When the dishwasher has finished`,`Quando la lavastoviglie ha finito`)}},events:{onStarted:{phrase:Y(`When the dishwasher starts`,`Quando la lavastoviglie inizia`)},onFinished:{phrase:Y(`When the dishwasher has finished`,`Quando la lavastoviglie ha finito`)}}}}}},update:{scope:`device`,noun:Y(`Firmware update`,`Aggiornamento firmware`),actions:[{id:`update.install`,method:`installUpdate`,label:Y(`Install update`,`Installa l’aggiornamento`),phrase:Y(`Install the available update on {device}`,`Installa l’aggiornamento disponibile su {device}`),icon:`download`}],state:[{kind:`boolean`,field:`updatable`,label:Y(`Update available`,`Aggiornamento disponibile`),whenTrue:Y(`When an update is available for {device}`,`Quando è disponibile un aggiornamento per {device}`),whenFalse:Y(`When {device} is up to date`,`Quando {device} è aggiornato`),icon:`download`},{kind:`boolean`,field:`inProgress`,label:Y(`Updating`,`In aggiornamento`),whenTrue:Y(`When {device} starts updating`,`Quando {device} inizia ad aggiornarsi`),whenFalse:Y(`When {device} finishes updating`,`Quando {device} finisce di aggiornarsi`),icon:`loader`}]}},R4=`live-stream session plumbing driven by a viewer, never a discrete step`,Afe={accessories:{scope:`device`,noun:Y(`Accessories`,`Accessori`),events:{onAccessoriesChanged:{notOperatorFacing:`the device’s child list changed — administration, not a happening`},onChildVisibilityChanged:{notOperatorFacing:`an operator hid or showed a child — administration, not a happening`}}},"audio-analysis":{scope:`device`,noun:Y(`Audio analysis`,`Analisi audio`),events:{onAudioLevel:{notOperatorFacing:`a sound-level sample at stream rate; loud-noise rules belong to the detection pipeline`}}},"audio-metrics":{scope:`device`,noun:Y(`Audio metrics`,`Metriche audio`)},"camera-credentials":{scope:`device`,noun:Y(`Camera credentials`,`Credenziali della telecamera`)},"camera-grid-layout":{scope:`device`,noun:Y(`Grid layout`,`Layout a griglia`)},"camera-pipeline-config":{scope:`device`,noun:Y(`Detection settings`,`Impostazioni di rilevamento`)},"camera-streams":{scope:`device`,noun:Y(`Camera streams`,`Flussi della telecamera`),events:{onCamStreamsChanged:{notOperatorFacing:`the stream catalog was rebuilt — plumbing, not a happening`},onProfileSlotsChanged:{notOperatorFacing:`stream profiles were reassigned — plumbing, not a happening`}}},"day-night":{scope:`device`,noun:Y(`Day/night`,`Giorno/notte`),actions:[{id:`dayNight.auto`,method:`setSettings`,label:Y(`Day/night auto`,`Giorno/notte automatico`),phrase:Y(`Let {device} switch day and night by itself`,`Fai passare {device} da giorno a notte in automatico`),icon:`sun-moon`,args:{settings:{mode:`auto`}}},{id:`dayNight.day`,method:`setSettings`,label:Y(`Day mode`,`Modalità giorno`),phrase:Y(`Force {device} into day mode`,`Forza {device} in modalità giorno`),icon:`sun`,args:{settings:{mode:`day`}}},{id:`dayNight.night`,method:`setSettings`,label:Y(`Night mode`,`Modalità notte`),phrase:Y(`Force {device} into night mode`,`Forza {device} in modalità notte`),icon:`moon`,args:{settings:{mode:`night`}}}],state:[{kind:`enum`,field:`mode`,label:Y(`Day/night mode`,`Modalità giorno/notte`),values:[{value:`auto`,label:Y(`Automatic`,`Automatica`)},{value:`day`,label:Y(`Day`,`Giorno`),phrase:Y(`When {device} switches to day mode`,`Quando {device} passa in modalità giorno`)},{value:`night`,label:Y(`Night`,`Notte`),phrase:Y(`When {device} switches to night mode`,`Quando {device} passa in modalità notte`)},{value:`schedule`,label:Y(`Scheduled`,`Programmata`)}],icon:`sun-moon`}]},"detection-pipeline":{scope:`device`,noun:Y(`Detection pipeline`,`Pipeline di rilevamento`)},"device-admin-link":{scope:`device`,noun:Y(`Admin link`,`Link di amministrazione`)},"device-discovery":{scope:`device`,noun:Y(`Discovery`,`Rilevamento dispositivi`)},"device-extension":{scope:`device`,noun:Y(`Device extension`,`Estensione del dispositivo`)},"device-ops":{scope:`device`,noun:Y(`Device operations`,`Operazioni del dispositivo`),notOperatorFacing:{runAction:`a provider-defined custom action whose id and input only the addon knows; it reaches the picker through the custom-actions surface, not a fixed phrase`}},"feature-probe":{scope:`device`,noun:Y(`Feature probe`,`Rilevamento funzioni`),events:{onProbeChanged:{notOperatorFacing:`the device’s capabilities were re-probed — plumbing, not a happening`}}},image:{scope:`device`,noun:Y(`Image`,`Immagine`)},"image-settings":{scope:`device`,noun:Y(`Image settings`,`Impostazioni immagine`)},intercom:{scope:`device`,noun:Y(`Intercom`,`Citofono`),notOperatorFacing:{startSession:R4,handleAnswer:R4,stopSession:R4,startTalkSession:`two-way talk is a person speaking through the viewer, not an automation step`,pushTalkAudio:R4,endTalkSession:R4},state:[{kind:`boolean`,field:`talking`,label:Y(`Talking`,`In conversazione`),whenTrue:Y(`When someone starts talking through {device}`,`Quando qualcuno inizia a parlare tramite {device}`),whenFalse:Y(`When the conversation on {device} ends`,`Quando la conversazione su {device} finisce`),icon:`mic`}],events:{onStatusChanged:{notOperatorFacing:"the `talking` state trigger phrases both edges of this change"}}},"motion-detection":{scope:`device`,noun:Y(`Motion analysis`,`Analisi del movimento`),notOperatorFacing:{analyze:`the pipeline feeds it frames — an internal stage, never called by a person`,removeCamera:`pipeline housekeeping when a camera leaves`,reset:`pipeline housekeeping`},events:{onMotion:{notOperatorFacing:"the analyzer’s raw verdict; the operator signal is the `motion` cap’s `detected` state"}}},"motion-zones":{scope:`device`,noun:Y(`Motion zones`,`Zone di movimento`)},"native-object-detection":{scope:`device`,noun:Y(`On-camera detection`,`Rilevamento a bordo`),actions:[{id:`nativeDetection.on`,method:`setEnabled`,label:Y(`On-camera detection on`,`Rilevamento a bordo attivo`),phrase:Y(`Turn on the on-camera detection of {device}`,`Attiva il rilevamento a bordo di {device}`),icon:`scan-eye`,args:{enabled:!0}},{id:`nativeDetection.off`,method:`setEnabled`,label:Y(`On-camera detection off`,`Rilevamento a bordo spento`),phrase:Y(`Turn off the on-camera detection of {device}`,`Disattiva il rilevamento a bordo di {device}`),icon:`scan-eye`,args:{enabled:!1}}],state:[{kind:`boolean`,field:`enabled`,label:Y(`On-camera detection`,`Rilevamento a bordo`),whenTrue:Y(`When the on-camera detection of {device} is turned on`,`Quando si attiva il rilevamento a bordo di {device}`),whenFalse:Y(`When the on-camera detection of {device} is turned off`,`Quando si disattiva il rilevamento a bordo di {device}`),icon:`scan-eye`}],events:{onDetected:{category:E.DetectionCameraNative,label:Y(`Camera spotted something`,`La telecamera ha rilevato qualcosa`),phrase:Y(`When {device} spots something with its own detector`,`Quando {device} rileva qualcosa con il proprio rilevatore`),icon:`scan-eye`}}},osd:{scope:`device`,noun:Y(`On-screen text`,`Testo in sovrimpressione`),events:{onStatusChanged:{notOperatorFacing:`an overlay setting changed — configuration, not a happening`}}},"pipeline-analytics":{scope:`device`,noun:Y(`Tracking`,`Tracciamento`),notOperatorFacing:{setTrackFlags:`curating a recorded track in the review UI, not a live step`,setTrackRelation:`curating recorded tracks in the review UI, not a live step`,clearTrackRelation:`curating recorded tracks in the review UI, not a live step`,setTrackPurity:`curating a recorded track in the review UI, not a live step`},events:{onFrameTracked:{notOperatorFacing:`one tracker frame — stream rate, never an automation trigger`},onTrackStarted:{category:E.PipelineAnalyticsTrackStarted,label:Y(`Subject appeared`,`Soggetto comparso`),phrase:Y(`When {device} starts following a subject`,`Quando {device} inizia a seguire un soggetto`),icon:`scan-eye`},onTrackEnded:{category:E.PipelineAnalyticsTrackEnded,label:Y(`Subject left`,`Soggetto uscito`),phrase:Y(`When a subject leaves the view of {device}`,`Quando un soggetto esce dall’inquadratura di {device}`),icon:`scan-eye`},onDetectionEvent:{category:E.PipelineAnalyticsDetectionEvent,label:Y(`Detection event`,`Evento di rilevamento`),phrase:Y(`When {device} records a detection event`,`Quando {device} registra un evento di rilevamento`),icon:`radar`}},extraEvents:[{category:E.PipelineAnalyticsPackageDelivered,label:Y(`Package delivered`,`Pacco consegnato`),phrase:Y(`When a package is left in front of {device}`,`Quando viene lasciato un pacco davanti a {device}`),icon:`package`},{category:E.PipelineAnalyticsPackagePickedUp,label:Y(`Package picked up`,`Pacco ritirato`),phrase:Y(`When a package is picked up in front of {device}`,`Quando viene ritirato un pacco davanti a {device}`),icon:`package-open`}]},"privacy-mask":{scope:`device`,noun:Y(`Privacy`,`Privacy`),actions:[{id:`privacy.maskOn`,method:`setMask`,label:Y(`Privacy mask on`,`Maschera privacy attiva`),phrase:Y(`Cover the privacy zones of {device}`,`Oscura le zone private di {device}`),icon:`eye-off`,args:{patch:{enabled:!0}}},{id:`privacy.maskOff`,method:`setMask`,label:Y(`Privacy mask off`,`Maschera privacy spenta`),phrase:Y(`Uncover the privacy zones of {device}`,`Scopri le zone private di {device}`),icon:`eye`,args:{patch:{enabled:!1}}},{id:`privacy.micOn`,method:`setAudioEnabled`,label:Y(`Microphone on`,`Microfono attivo`),phrase:Y(`Turn on the microphone of {device}`,`Attiva il microfono di {device}`),icon:`mic`,args:{enabled:!0}},{id:`privacy.micOff`,method:`setAudioEnabled`,label:Y(`Microphone off`,`Microfono spento`),phrase:Y(`Turn off the microphone of {device}`,`Disattiva il microfono di {device}`),icon:`mic-off`,args:{enabled:!1}}],state:[{kind:`boolean`,field:`enabled`,label:Y(`Privacy mask`,`Maschera privacy`),whenTrue:Y(`When the privacy mask of {device} is turned on`,`Quando si attiva la maschera privacy di {device}`),whenFalse:Y(`When the privacy mask of {device} is turned off`,`Quando si disattiva la maschera privacy di {device}`),icon:`eye-off`},{kind:`boolean`,field:`audioEnabled`,label:Y(`Microphone`,`Microfono`),whenTrue:Y(`When the microphone of {device} is turned on`,`Quando si attiva il microfono di {device}`),whenFalse:Y(`When the microphone of {device} is turned off`,`Quando si disattiva il microfono di {device}`),icon:`mic`}]},ptz:{scope:`device`,noun:Y(`Pan / tilt / zoom`,`Brandeggio`),actions:[{id:`ptz.goHome`,method:`goHome`,label:Y(`PTZ go home`,`Torna alla posizione iniziale`),phrase:Y(`Send {device} to its home position`,`Riporta {device} alla posizione iniziale`),icon:`house`},{id:`ptz.goToPreset`,method:`goToPreset`,label:Y(`PTZ go to preset`,`Vai a un preset`),phrase:Y(`Move {device} to {presetId}`,`Sposta {device} su {presetId}`),icon:`move`,openArgs:[{key:`presetId`,label:Y(`Preset`,`Preset`),offer:{kind:`dynamic`,from:`method`,method:`getPresets`,valueKey:`id`,labelKey:`name`}}]},{id:`ptz.stop`,method:`stop`,label:Y(`Stop moving`,`Ferma il movimento`),phrase:Y(`Stop {device} moving`,`Ferma il movimento di {device}`),icon:`square`},{id:`ptz.autofocusOn`,method:`setAutofocus`,label:Y(`Autofocus on`,`Autofocus attivo`),phrase:Y(`Turn on autofocus on {device}`,`Attiva l’autofocus su {device}`),icon:`focus`,args:{enabled:!0}},{id:`ptz.autofocusOff`,method:`setAutofocus`,label:Y(`Autofocus off`,`Autofocus spento`),phrase:Y(`Turn off autofocus on {device}`,`Disattiva l’autofocus su {device}`),icon:`focus`,args:{enabled:!1}}],notOperatorFacing:{move:`a relative nudge from the live-view joystick; a fixed place is a preset`,continuousMove:`joystick motion held until released — continuous, not a discrete step`}},"ptz-autotrack":{scope:`device`,noun:Y(`Autotracking`,`Inseguimento automatico`),actions:[{id:`ptz.autotrackOn`,method:`setEnabled`,label:Y(`Autotrack on`,`Inseguimento attivo`),phrase:Y(`Start autotracking on {device}`,`Attiva l’inseguimento automatico su {device}`),icon:`crosshair`,args:{enabled:!0}},{id:`ptz.autotrackOff`,method:`setEnabled`,label:Y(`Autotrack off`,`Inseguimento spento`),phrase:Y(`Stop autotracking on {device}`,`Disattiva l’inseguimento automatico su {device}`),icon:`crosshair`,args:{enabled:!1}}],notOperatorFacing:{setSettings:`tracking tuning (target type, delays) — set once on the camera’s PTZ page`},state:[{kind:`boolean`,field:`enabled`,label:Y(`Autotracking`,`Inseguimento automatico`),whenTrue:Y(`When autotracking is turned on for {device}`,`Quando si attiva l’inseguimento automatico di {device}`),whenFalse:Y(`When autotracking is turned off for {device}`,`Quando si disattiva l’inseguimento automatico di {device}`),icon:`crosshair`}],events:{onStatusChanged:{notOperatorFacing:"the `enabled` state trigger phrases both edges of this change"}}},reboot:{scope:`device`,noun:Y(`Reboot`,`Riavvio`),actions:[{id:`reboot.reboot`,method:`reboot`,label:Y(`Reboot device`,`Riavvia il dispositivo`),phrase:Y(`Reboot {device}`,`Riavvia {device}`),icon:`refresh-cw`}]},recording:{scope:`device`,noun:Y(`Recording`,`Registrazione`)},"recording-onboard":{scope:`device`,noun:Y(`On-camera recording`,`Registrazione a bordo`),actions:[{id:`recordingOnboard.on`,method:`setSettings`,label:Y(`On-camera recording on`,`Registrazione a bordo attiva`),phrase:Y(`Turn on recording to the card of {device}`,`Attiva la registrazione sulla scheda di {device}`),icon:`hard-drive`,args:{settings:{enabled:!0}}},{id:`recordingOnboard.off`,method:`setSettings`,label:Y(`On-camera recording off`,`Registrazione a bordo spenta`),phrase:Y(`Turn off recording to the card of {device}`,`Disattiva la registrazione sulla scheda di {device}`),icon:`hard-drive`,args:{settings:{enabled:!1}}}],state:[{kind:`boolean`,field:`recordingToNowhere`,label:Y(`Recording to nowhere`,`Registra nel vuoto`),whenTrue:Y(`When {device} is recording with no card to write to`,`Quando {device} registra senza una scheda su cui scrivere`),whenFalse:Y(`When {device} has a card to record to again`,`Quando {device} ha di nuovo una scheda su cui registrare`),icon:`hard-drive`}]},"recording-signal":{scope:`device`,noun:Y(`Recording signal`,`Segnale di registrazione`),state:[{kind:`boolean`,field:`active`,label:Y(`Recording`,`In registrazione`),whenTrue:Y(`When {device} starts recording`,`Quando {device} inizia a registrare`),whenFalse:Y(`When {device} stops recording`,`Quando {device} smette di registrare`),icon:`circle-dot`}]},"scene-monitor":{scope:`device`,noun:Y(`Scene watch`,`Controllo della scena`),actions:[{id:`sceneMonitor.recheck`,method:`recheckNow`,label:Y(`Re-check a scene`,`Ricontrolla una scena`),phrase:Y(`Re-check {monitorId} on {device} now`,`Ricontrolla subito {monitorId} su {device}`),icon:`scan-search`,openArgs:[{key:`monitorId`,label:Y(`Scene`,`Scena`),offer:{kind:`dynamic`,from:`status`,field:`monitors`,valueKey:`id`,labelKey:`label`}}]}],extraEvents:[{category:E.EnrichmentSceneStateChanged,label:Y(`Scene changed`,`Scena cambiata`),phrase:Y(`When a watched scene on {device} changes`,`Quando cambia una scena controllata su {device}`),icon:`scan-search`}]},snapshot:{scope:`device`,noun:Y(`Snapshot`,`Istantanea`)},"stream-catalog":{scope:`device`,noun:Y(`Stream catalog`,`Catalogo dei flussi`)},"stream-params":{scope:`device`,noun:Y(`Stream parameters`,`Parametri dei flussi`)},"stream-signals":{scope:`device`,noun:Y(`Stream signals`,`Segnali dei flussi`)},videoclips:{scope:`device`,noun:Y(`Video clips`,`Clip video`)},"webrtc-session":{scope:`device`,noun:Y(`Live session`,`Sessione live`),notOperatorFacing:{createSession:R4,handleOffer:R4,handleAnswer:R4,addIceCandidate:R4,closeSession:R4,applyDownlinkProbe:R4}},"zone-analytics":{scope:`device`,noun:Y(`Zone occupancy`,`Occupazione delle zone`),extraEvents:[{category:E.ZoneAnalyticsOccupancyChanged,label:Y(`Zone occupancy changed`,`Occupazione della zona cambiata`),phrase:Y(`When someone enters or leaves a zone of {device}`,`Quando qualcuno entra o esce da una zona di {device}`),icon:`square-dashed`}]},"zone-rules":{scope:`device`,noun:Y(`Zone rules`,`Regole delle zone`)},zones:{scope:`device`,noun:Y(`Zones`,`Zone`)}},z4=Y(`Detected`,`Rilevato`),jfe={"air-quality-sensor":{scope:`device`,noun:Y(`Air quality`,`Qualità dell’aria`),state:[{kind:`numeric`,field:`co2Ppm`,quantity:Y(`the CO₂`,`la CO₂`),label:Y(`CO₂`,`CO₂`),unit:`ppm`,icon:`wind`},{kind:`numeric`,field:`vocPpb`,quantity:Y(`the VOC level`,`il livello di COV`),label:Y(`VOC`,`COV`),unit:`ppb`,icon:`wind`},{kind:`numeric`,field:`pm25`,quantity:Y(`the PM2.5`,`il PM2,5`),label:Y(`PM2.5`,`PM2,5`),unit:`µg/m³`,icon:`cloud-fog`},{kind:`numeric`,field:`pm10`,quantity:Y(`the PM10`,`il PM10`),label:Y(`PM10`,`PM10`),unit:`µg/m³`,icon:`cloud-fog`},{kind:`numeric`,field:`aqi`,quantity:Y(`the air quality index`,`l’indice di qualità dell’aria`),label:Y(`AQI`,`IQA`),icon:`wind`}]},"ambient-light-sensor":{scope:`device`,noun:Y(`Light level`,`Luminosità ambiente`),state:[{kind:`numeric`,field:`lux`,quantity:Y(`the light level`,`la luminosità`),label:Y(`Illuminance`,`Illuminamento`),unit:`lx`,icon:`sun`}]},binary:{scope:`device`,noun:Y(`Binary sensor`,`Sensore binario`),state:[{kind:`boolean`,field:`on`,label:Y(`On`,`Acceso`),whenTrue:Y(`When {device} turns active`,`Quando {device} si attiva`),whenFalse:Y(`When {device} turns inactive`,`Quando {device} si disattiva`),icon:`toggle-right`}],overrides:{byRole:{[F.MotionSensor]:{state:{on:{label:Y(`Motion`,`Movimento`),whenTrue:Y(`When {device} detects motion`,`Quando {device} rileva movimento`),whenFalse:Y(`When motion clears on {device}`,`Quando il movimento su {device} cessa`),icon:`activity`}}},[F.ContactSensor]:{state:{on:{label:Y(`Open`,`Aperto`),whenTrue:Y(`When {device} opens`,`Quando {device} si apre`),whenFalse:Y(`When {device} closes`,`Quando {device} si chiude`),icon:`door-open`}}},[F.LeakSensor]:{state:{on:{label:Y(`Leak`,`Perdita`),whenTrue:Y(`When {device} detects a leak`,`Quando {device} rileva una perdita`),whenFalse:Y(`When {device} is dry again`,`Quando {device} torna asciutto`),icon:`droplets`}}},[F.SmokeSensor]:{state:{on:{label:Y(`Smoke`,`Fumo`),whenTrue:Y(`When {device} detects smoke`,`Quando {device} rileva fumo`),whenFalse:Y(`When smoke clears on {device}`,`Quando il fumo su {device} si dirada`),icon:`alarm-smoke`}}},[F.COSensor]:{state:{on:{label:Y(`Carbon monoxide`,`Monossido di carbonio`),whenTrue:Y(`When {device} detects carbon monoxide`,`Quando {device} rileva monossido di carbonio`),whenFalse:Y(`When the carbon monoxide clears on {device}`,`Quando il monossido su {device} rientra`),icon:`cloud-alert`}}},[F.GasSensor]:{state:{on:{label:Y(`Gas`,`Gas`),whenTrue:Y(`When {device} detects gas`,`Quando {device} rileva gas`),whenFalse:Y(`When the gas clears on {device}`,`Quando il gas su {device} rientra`),icon:`flame`}}},[F.TamperSensor]:{state:{on:{label:Y(`Tampered`,`Manomesso`),whenTrue:Y(`When {device} is tampered with`,`Quando {device} viene manomesso`),whenFalse:Y(`When the tamper alert on {device} clears`,`Quando l’allarme di manomissione di {device} rientra`),icon:`shield-alert`}}},[F.VibrationSensor]:{state:{on:{label:Y(`Vibration`,`Vibrazione`),whenTrue:Y(`When {device} vibrates`,`Quando {device} vibra`),whenFalse:Y(`When {device} is still again`,`Quando {device} torna fermo`),icon:`vibrate`}}},[F.ConnectivitySensor]:{state:{on:{label:Y(`Connected`,`Connesso`),whenTrue:Y(`When {device} connects`,`Quando {device} si connette`),whenFalse:Y(`When {device} disconnects`,`Quando {device} si disconnette`),icon:`wifi`}}},[F.SoundSensor]:{state:{on:{label:Y(`Sound`,`Suono`),whenTrue:Y(`When {device} hears a sound`,`Quando {device} sente un suono`),whenFalse:Y(`When {device} is quiet again`,`Quando {device} torna silenzioso`),icon:`ear`}}},[F.BatterySensor]:{state:{on:{label:Y(`Battery low`,`Batteria scarica`),whenTrue:Y(`When the battery of {device} runs low`,`Quando la batteria di {device} si scarica`),whenFalse:Y(`When the battery of {device} is fine again`,`Quando la batteria di {device} torna a posto`),icon:`battery-low`}}},[F.BinaryHelper]:{state:{on:{label:Y(`On`,`Acceso`),whenTrue:Y(`When {device} turns on`,`Quando {device} si accende`),whenFalse:Y(`When {device} turns off`,`Quando {device} si spegne`),icon:`toggle-right`}}}}}},"carbon-monoxide":{scope:`device`,noun:Y(`Carbon monoxide`,`Monossido di carbonio`),state:[{kind:`boolean`,field:`detected`,label:z4,whenTrue:Y(`When {device} detects carbon monoxide`,`Quando {device} rileva monossido di carbonio`),whenFalse:Y(`When the carbon monoxide clears on {device}`,`Quando il monossido su {device} rientra`),icon:`cloud-alert`}]},connectivity:{scope:`device`,noun:Y(`Connectivity`,`Connettività`),state:[{kind:`boolean`,field:`connected`,label:Y(`Connected`,`Connesso`),whenTrue:Y(`When {device} connects`,`Quando {device} si connette`),whenFalse:Y(`When {device} disconnects`,`Quando {device} si disconnette`),icon:`wifi`}]},contact:{scope:`device`,noun:Y(`Contact`,`Contatto`),state:[{kind:`boolean`,field:`entryOpen`,label:Y(`Open`,`Aperto`),whenTrue:Y(`When {device} opens`,`Quando {device} si apre`),whenFalse:Y(`When {device} closes`,`Quando {device} si chiude`),icon:`door-open`}]},"enum-sensor":{scope:`device`,noun:Y(`State sensor`,`Sensore di stato`),state:[{kind:`value`,field:`value`,label:Y(`State`,`Stato`),icon:`list`}]},flood:{scope:`device`,noun:Y(`Leak sensor`,`Sensore di allagamento`),state:[{kind:`boolean`,field:`flooded`,label:Y(`Leak`,`Perdita`),whenTrue:Y(`When {device} detects a leak`,`Quando {device} rileva una perdita`),whenFalse:Y(`When {device} is dry again`,`Quando {device} torna asciutto`),icon:`droplets`}]},gas:{scope:`device`,noun:Y(`Gas sensor`,`Sensore di gas`),state:[{kind:`boolean`,field:`detected`,label:z4,whenTrue:Y(`When {device} detects gas`,`Quando {device} rileva gas`),whenFalse:Y(`When the gas clears on {device}`,`Quando il gas su {device} rientra`),icon:`flame`}]},"group-active":{scope:`device`,noun:Y(`Group state`,`Stato del gruppo`)},"group-commands":{scope:`device`,noun:Y(`Group command`,`Comando di gruppo`)},"group-status":{scope:`device`,noun:Y(`Group`,`Gruppo`),state:[{kind:`numeric`,field:`included`,quantity:Y(`the members reporting`,`i membri che rispondono`),label:Y(`Reporting`,`Rispondono`),icon:`users`},{kind:`numeric`,field:`excluded`,quantity:Y(`the members left out`,`i membri esclusi`),label:Y(`Excluded`,`Esclusi`),icon:`users`},{kind:`numeric`,field:`total`,quantity:Y(`the member count`,`il numero di membri`),label:Y(`Members`,`Membri`),icon:`sigma`}]},"humidity-sensor":{scope:`device`,noun:Y(`Humidity`,`Umidità`),state:[{kind:`numeric`,field:`percent`,quantity:Y(`the humidity`,`l’umidità`),label:Y(`Humidity`,`Umidità`),unit:`%`,icon:`droplets`}]},motion:{scope:`device`,noun:Y(`Motion`,`Movimento`),state:[{kind:`boolean`,field:`detected`,label:Y(`Motion`,`Movimento`),whenTrue:Y(`When {device} detects motion`,`Quando {device} rileva movimento`),whenFalse:Y(`When motion clears on {device}`,`Quando il movimento su {device} cessa`),icon:`activity`}],events:{onMotionChanged:{notOperatorFacing:"the `detected` state trigger phrases both edges, from the mirror that survives a dropped event (D49)"}}},meter:{scope:`device`,noun:Y(`Meter`,`Contatore`),state:[{kind:`numeric`,field:`value`,quantity:Y(`the total`,`il totale`),label:Y(`Total`,`Totale`),icon:`gauge`}]},"numeric-sensor":{scope:`device`,noun:Y(`Sensor`,`Sensore`),state:[{kind:`numeric`,field:`value`,quantity:Y(`the reading`,`il valore`),label:Y(`Reading`,`Valore`),icon:`gauge`}]},"power-meter":{scope:`device`,noun:Y(`Power meter`,`Misuratore di energia`),state:[{kind:`numeric`,field:`watts`,quantity:Y(`the power draw`,`il consumo`),label:Y(`Power`,`Potenza`),unit:`W`,icon:`zap`},{kind:`numeric`,field:`kwhTotal`,quantity:Y(`the energy used`,`l’energia consumata`),label:Y(`Energy`,`Energia`),unit:`kWh`,icon:`zap`},{kind:`numeric`,field:`volts`,quantity:Y(`the voltage`,`la tensione`),label:Y(`Voltage`,`Tensione`),unit:`V`,icon:`zap`},{kind:`numeric`,field:`amps`,quantity:Y(`the current`,`la corrente`),label:Y(`Current`,`Corrente`),unit:`A`,icon:`zap`}]},presence:{scope:`device`,noun:Y(`Presence`,`Presenza`),state:[{kind:`value`,field:`state`,label:Y(`Where`,`Posizione`),phrase:Y(`When {device} is at {value}`,`Quando {device} è in {value}`),icon:`map-pin`},{kind:`numeric`,field:`batteryPercent`,quantity:Y(`the phone battery`,`la batteria del telefono`),label:Y(`Battery`,`Batteria`),unit:`%`,icon:`battery`}]},"pressure-sensor":{scope:`device`,noun:Y(`Pressure`,`Pressione`),state:[{kind:`numeric`,field:`hpa`,quantity:Y(`the pressure`,`la pressione`),label:Y(`Pressure`,`Pressione`),unit:`hPa`,icon:`gauge`}]},smoke:{scope:`device`,noun:Y(`Smoke detector`,`Rilevatore di fumo`),state:[{kind:`boolean`,field:`detected`,label:z4,whenTrue:Y(`When {device} detects smoke`,`Quando {device} rileva fumo`),whenFalse:Y(`When smoke clears on {device}`,`Quando il fumo su {device} si dirada`),icon:`alarm-smoke`}]},tamper:{scope:`device`,noun:Y(`Tamper`,`Manomissione`),state:[{kind:`boolean`,field:`tampered`,label:Y(`Tampered`,`Manomesso`),whenTrue:Y(`When {device} is tampered with`,`Quando {device} viene manomesso`),whenFalse:Y(`When the tamper alert on {device} clears`,`Quando l’allarme di manomissione di {device} rientra`),icon:`shield-alert`}]},"temperature-sensor":{scope:`device`,noun:Y(`Temperature`,`Temperatura`),state:[{kind:`numeric`,field:`celsius`,quantity:Y(`the temperature`,`la temperatura`),label:Y(`Temperature`,`Temperatura`),unit:`°C`,icon:`thermometer`}]},vibration:{scope:`device`,noun:Y(`Vibration`,`Vibrazione`),state:[{kind:`boolean`,field:`detected`,label:Y(`Vibration`,`Vibrazione`),whenTrue:Y(`When {device} vibrates`,`Quando {device} vibra`),whenFalse:Y(`When {device} is still again`,`Quando {device} torna fermo`),icon:`vibrate`}]},weather:{scope:`device`,noun:Y(`Weather`,`Meteo`),state:[{kind:`value`,field:`condition`,label:Y(`Conditions`,`Condizioni`),phrase:Y(`When the weather at {device} turns {value}`,`Quando il meteo di {device} diventa {value}`),icon:`cloud-sun`},{kind:`numeric`,field:`temperature`,quantity:Y(`the outdoor temperature`,`la temperatura esterna`),label:Y(`Temperature`,`Temperatura`),unit:`°C`,icon:`thermometer`},{kind:`numeric`,field:`humidity`,quantity:Y(`the outdoor humidity`,`l’umidità esterna`),label:Y(`Humidity`,`Umidità`),unit:`%`,icon:`droplets`},{kind:`numeric`,field:`windSpeed`,quantity:Y(`the wind speed`,`la velocità del vento`),label:Y(`Wind`,`Vento`),unit:`m/s`,icon:`wind`},{kind:`numeric`,field:`pressure`,quantity:Y(`the air pressure`,`la pressione atmosferica`),label:Y(`Pressure`,`Pressione`),unit:`hPa`,icon:`gauge`}]},battery:{scope:`device`,noun:Y(`Battery`,`Batteria`),notOperatorFacing:{wakeForStream:`a stream consumer wakes a sleeping camera to watch it; an automation that wants footage asks for the footage`},state:[{kind:`numeric`,field:`percentage`,quantity:Y(`the battery level`,`il livello della batteria`),label:Y(`Battery`,`Batteria`),unit:`%`,icon:`battery`},{kind:`boolean`,field:`sleeping`,label:Y(`Asleep`,`In sospensione`),whenTrue:Y(`When {device} goes to sleep`,`Quando {device} va in sospensione`),whenFalse:Y(`When {device} wakes up`,`Quando {device} si risveglia`),icon:`moon`},{kind:`enum`,field:`charging`,label:Y(`Charging`,`Ricarica`),values:[{value:`dc`,label:Y(`Charging from mains`,`In carica da rete`),phrase:Y(`When {device} starts charging`,`Quando {device} inizia a caricarsi`)},{value:`solar`,label:Y(`Charging from solar`,`In carica dal pannello solare`),phrase:Y(`When {device} charges from its solar panel`,`Quando {device} si carica dal pannello solare`)},{value:`none`,label:Y(`Not charging`,`Non in carica`),phrase:Y(`When {device} stops charging`,`Quando {device} smette di caricarsi`)},{value:`unknown`,label:Y(`Unknown`,`Sconosciuto`)}],icon:`battery-charging`}],events:{onStatusChanged:{notOperatorFacing:`the percentage / sleeping / charging state triggers each read one field of this change`}},extraEvents:[{category:E.DeviceAwake,label:Y(`Woke up`,`Risvegliato`),phrase:Y(`When {device} wakes up`,`Quando {device} si risveglia`),icon:`sun`},{category:E.DeviceSleeping,label:Y(`Went to sleep`,`In sospensione`),phrase:Y(`When {device} goes to sleep`,`Quando {device} va in sospensione`),icon:`moon`}]},"network-link":{scope:`device`,noun:Y(`Network link`,`Collegamento di rete`),state:[{kind:`numeric`,field:`signalPercent`,quantity:Y(`the signal strength`,`l’intensità del segnale`),label:Y(`Signal`,`Segnale`),unit:`%`,icon:`wifi`},{kind:`enum`,field:`type`,label:Y(`Link type`,`Tipo di collegamento`),values:[{value:`wifi`,label:Y(`Wi-Fi`,`Wi-Fi`)},{value:`ethernet`,label:Y(`Ethernet`,`Ethernet`)},{value:`cellular`,label:Y(`Cellular`,`Rete mobile`)},{value:`unknown`,label:Y(`Unknown`,`Sconosciuto`)}],icon:`network`}],events:{onStatusChanged:{notOperatorFacing:`the signal / link-type state triggers each read one field of this change`}}},"device-status":{scope:`device`,noun:Y(`Reachability`,`Raggiungibilità`),state:[{kind:`boolean`,field:`online`,label:Y(`Online`,`Online`),whenTrue:Y(`When {device} comes back online`,`Quando {device} torna online`),whenFalse:Y(`When {device} goes offline`,`Quando {device} va offline`),icon:`wifi`}],events:{onStatusChanged:{notOperatorFacing:"the `online` state trigger phrases both edges of this change"}},extraEvents:[{category:E.DeviceOnline,label:Y(`Came online`,`Tornato online`),phrase:Y(`When {device} comes back online`,`Quando {device} torna online`),icon:`wifi`},{category:E.DeviceOffline,label:Y(`Went offline`,`Andato offline`),phrase:Y(`When {device} goes offline`,`Quando {device} va offline`),icon:`wifi-off`}]},doorbell:{scope:`device`,noun:Y(`Doorbell`,`Campanello`),events:{onPressed:{category:E.DoorbellOnPressed,label:Y(`Rang`,`Ha suonato`),phrase:Y(`When someone rings {device}`,`Quando qualcuno suona a {device}`),icon:`bell-ring`}}},"event-emitter":{scope:`device`,noun:Y(`Event source`,`Sorgente di eventi`),events:{onEvent:{category:E.EventEmitted,label:Y(`Fired an event`,`Ha generato un evento`),phrase:Y(`When {device} fires an event`,`Quando {device} genera un evento`),icon:`zap`}}}};function X(e){return{scope:`system`,notOperatorFacing:e}}var B4=`admin UI plumbing — pages, widgets and routes, not something a device does`,V4=`addon administration — installed and configured from the Addons page`,H4=`detection pipeline machinery — tuned on the pipeline pages, never actuated per device`,U4=`storage administration — locations, retention and migrations, not a device action`,W4=`identity and access administration — users, sign-in and secrets`,G4=`network administration of the cluster — addresses, mesh, tunnels`,K4=`cluster administration — nodes, server package, metrics`,q4=`model and training machinery — no device action`,Z=`internal plumbing between addons — never operator-facing`,Mfe={"action-source":X(Z),actions:X(`declared actions — run from the Actions page and from the cameras that link them`),"addon-pages":X(B4),"addon-pages-source":X(B4),"addon-routes":X(B4),"addon-settings":X(V4),"addon-widgets":X(B4),"addon-widgets-source":X(B4),addons:X(V4),"admin-ui":X(B4),alerts:X(`the alert centre — read and acknowledged on its own page`),"audio-analyzer":X(H4),"audio-codec":X(Z),"auth-provider":X(W4),backup:X(`system backups — run and restored from the Backups page`),broker:X(`message-broker connections — configured, not actuated`),"calendar-source":X(Z),calendars:X(`calendars feed schedules and conditions, not device actions`),composer:X(`device composition — an authoring tool, not an action`),"connection-test":X(Z),"core-blocks":X(Z),"custom-model-registry":X(q4),"data-store-provider":X(Z),"database-snapshot":X(Z),decoder:X(H4),"device-adoption":X(`device adoption — an onboarding flow, not an action`),"device-credentials":X(W4),"device-export":X(`exports to other ecosystems — configured on the export pages`),"device-history":X(`recorded history of device state — read by charts, not actuated`),"device-manager":X(`the device registry itself — rename, move and remove are administration`),"device-provider":X(Z),"device-removal-hook":X(Z),"device-state":X(`the runtime-state mirror every trigger already reads through`),"display-palette":X(`the cluster display palette — one colour table for every client, not a device action`),"embedding-encoder":X(q4),"face-gallery":X(`the face gallery — curated on its own page`),"failure-contribution":X(Z),"filesystem-browse":X(Z),integrations:X(V4),keychain:X(W4),"keychain-admin":X(W4),llm:X(q4),"llm-runtime":X(q4),"load-contribution":X(Z),"local-network":X(G4),"log-channels":X(Z),"log-destination":X(Z),"login-method":X(W4),"mesh-network":X(G4),"metrics-provider":X(K4),"model-convert":X(q4),"model-distributor":X(q4),"mqtt-broker":X(G4),"network-access":X(G4),"network-quality":X(G4),"node-certificates":X(W4),nodes:X(K4),"notification-output":X(`notification delivery — reached through notifier devices and rules`),"notification-rules":X(`notification rules — authored on their own page`),"oauth-integration":X(W4),"oidc-connections":X(W4),"osd-manager":X(H4),"pipeline-executor":X(H4),"pipeline-orchestrator":X(H4),"pipeline-runner":X(H4),"plate-gallery":X(`the plate gallery — curated on its own page`),"platform-probe":X(K4),"record-entries":X(Z),"recording-archive":X(U4),"recording-export":X(`recording exports — requested from the timeline, not an automation step`),records:X(Z),"server-management":X(K4),"settings-store":X(Z),"smtp-provider":X(Z),"sso-bridge":X(W4),storage:X(U4),"storage-admin":X(U4),"storage-evictable":X(U4),"storage-migration":X(U4),"storage-occupancy":X(U4),"storage-provider":X(U4),"stream-broker":X(H4),system:X(K4),"terminal-session":X(K4),toast:X(B4),training:X(q4),"training-provider":X(q4),"turn-provider":X(G4),"user-management":X(W4),"user-passkeys":X(W4),"vector-store":X(Z),"viewer-ui":X(B4)},J4={...Ofe,...kfe,...Afe,...jfe,...Mfe},Y4=J4;function Nfe(e){return e.kind===`number`||e.kind===`dynamic`&&e.valueKind===`number`||e.kind===`enum`&&e.values.every(e=>typeof e.value==`number`)?`number`:`string`}function Pfe(e){return{key:e.key,label:e.label.en,kind:Nfe(e.offer),offer:e.offer,...e.optional===!0?{optional:!0}:{}}}function Ffe(e,t){let n=t.openArgs??[];return{id:t.id,label:t.label.en,cap:e,method:t.method,args:t.args??{},...n.length>0?{openArgs:n.map(Pfe)}:{}}}var X4=Object.entries(Y4).flatMap(([e,t])=>t.scope===`device`?(t.actions??[]).map(t=>Ffe(e,t)):[]);function Z4(e){for(let[t,n]of Object.entries(P4))if(n.capName===e.cap&&n.capScope===`device`&&n.access!==`view`&&t.slice(t.indexOf(`.`)+1)===e.method)return!0;return!1}function Q4(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(!Q4(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(!Q4(n[e],r[e]))return!1;return!0}function Ife(e,t){return Q4(e??{},t??{})}function Lfe(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(!Q4(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 Ife(e.args,t)}var $4={[P.Camera]:[`ptz`,`ptz-autotrack`,`privacy-mask`,`day-night`,`reboot`,`motion-trigger`],[P.Hub]:[],[P.Light]:[`switch`,`brightness`],[P.Siren]:[`switch`,`motion-trigger`],[P.Switch]:[`switch`,`motion-trigger`],[P.Sensor]:[],[P.Thermostat]:[`climate-control`],[P.Climate]:[`climate-control`],[P.Button]:[`button`],[P.EventEmitter]:[],[P.Update]:[],[P.Generic]:[],[P.Notifier]:[],[P.Script]:[`script-runner`],[P.Automation]:[`automation-control`],[P.Lock]:[`lock-control`],[P.Cover]:[`cover`],[P.Valve]:[`valve`],[P.Humidifier]:[`humidifier`],[P.WaterHeater]:[`water-heater`],[P.Fan]:[`fan-control`,`switch`],[P.MediaPlayer]:[`media-player`],[P.AlarmPanel]:[`alarm-panel`],[P.Control]:[],[P.Presence]:[],[P.Weather]:[],[P.Vacuum]:[`vacuum-control`],[P.LawnMower]:[`lawn-mower-control`],[P.Container]:[],[P.Image]:[],[P.PetFeeder]:[`pet-feeder`],[P.Dishwasher]:[`dishwasher`],[P.Washer]:[],[P.Dryer]:[]};function Rfe(e){return e!==P.Container}function e3(e){switch(e){case P.Climate:case P.Thermostat:case P.Humidifier:case P.WaterHeater:return`climate-family`;case P.Cover:case P.Valve:return`cover-family`;case P.Switch:case P.Siren:case P.Light:return`switch-family`;case P.Vacuum:case P.LawnMower:return`robot-family`;default:return e}}function zfe(e,t){return e3(e)===e3(t)}function t3(e){if(e.length===0)return[];let t=new Set(e);return X4.filter(e=>t.has(e.cap)&&Z4(e))}function n3(e){return Object.values(P).includes(e)?t3($4[e]):[]}function r3(e){let t=e.boundCaps!==void 0&&e.boundCaps.length>0?t3(e.boundCaps):[];return t.length>0?t:e.deviceType!==void 0&&e.deviceType.length>0?n3(e.deviceType):[]}function Bfe(e){if(e.length===0)return[];let t=null;for(let n of e){let e=r3({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 Vfe(){return X4.filter(Z4)}function i3(e,t,n){for(let r of X4)if(!(r.cap!==e||r.method!==t)&&Lfe(r,n))return r;return null}function Hfe(e,t,n){let r=i3(e,t,n);return r===null?`custom:${e}.${t}`:r.id}var a3=Y(`When {quantity} of {device} rises above {threshold}`,`Quando {quantity} di {device} sale sopra {threshold}`),o3=Y(`When {quantity} of {device} falls below {threshold}`,`Quando {quantity} di {device} scende sotto {threshold}`),s3=Y(`When {quantity} of {device} changes by {delta}`,`Quando {quantity} di {device} varia di {delta}`),c3=Y(`When {device} changes to {value}`,`Quando {device} passa a {value}`),l3=Y(`{trigger} and stays that way for {minutes} minutes`,`{trigger} e resta così per {minutes} minuti`),Ufe={NUMERIC_ABOVE:a3,NUMERIC_BELOW:o3,NUMERIC_CHANGES_BY:s3,BECOMES:c3,HELD_FOR:l3},Wfe=/\{([a-zA-Z0-9_]+)\}/g;function u3(e,t,n){return e[t].replace(Wfe,(e,t)=>n[t]??e)}function d3(e,t){return{en:u3(e,`en`,t.en),it:u3(e,`it`,t.it)}}function f3(e){return d3(l3,{en:{trigger:e.en},it:{trigger:e.it}})}function Gfe(e){return Array.isArray(e)}function Kfe(e){let t=[];if(Gfe(e)){for(let n of e)t.push(typeof n==`string`?n:n.capName);return t}for(let n of e.entries)t.push(n.capName);return t}function p3(e){let t=new Set(Kfe(e));return Object.entries(Y4).filter(([e,n])=>t.has(e)&&n.scope===`device`)}function m3(e,t,n){let r=[],i=t===void 0?void 0:e.overrides?.byType?.[t];i!==void 0&&r.push(i);let a=n==null?void 0:e.overrides?.byRole?.[n];return a!==void 0&&r.push(a),r}function qfe(e,t){return e.reduce((e,n)=>({...e,...n.actions?.[t]}),{})}function Jfe(e,t){return e.reduce((e,n)=>({...e,...n.state?.[t]}),{})}function Yfe(e,t){return e.reduce((e,n)=>({...e,...n.events?.[t]}),{})}function Xfe(e,t){return P4[`${Lb(e)}.${t}`]?.access}function Zfe(e,t,n){let r=Xfe(e,t.method);if(r===void 0||r===`view`)return null;let i=qfe(n,t.id);return{id:t.id,cap:e,method:t.method,label:i.label??t.label,phrase:i.phrase??t.phrase,icon:i.icon??t.icon,args:t.args??{},openArgs:t.openArgs??[],access:r}}function Qfe(e,t,n){let r=[];for(let[i,a]of p3(e)){let e=m3(a,t,n);for(let t of a.actions??[]){let n=Zfe(i,t,e);n!==null&&r.push(n)}}return r}function $fe(e){let t=e.phrase??d3(c3,{en:{value:e.label.en},it:{value:e.label.it}});return{value:e.value,label:e.label,phrase:t,phraseFor:f3(t)}}function epe(e,t,n){let r=Jfe(n,t.field),i=`${e}.state.${t.field}`,a=r.label??t.label,o=r.icon??t.icon;if(t.kind===`boolean`){let n=r.whenTrue??t.whenTrue,s=r.whenFalse??t.whenFalse;return{kind:`boolean`,id:i,cap:e,field:t.field,label:a,icon:o,whenTrue:n,whenFalse:s,whenTrueFor:f3(n),whenFalseFor:f3(s)}}if(t.kind===`numeric`){let n=r.quantity??t.quantity,s={en:{quantity:n.en},it:{quantity:n.it}};return{kind:`numeric`,id:i,cap:e,field:t.field,label:a,icon:o,unit:t.unit??null,unitField:t.unitField??null,above:d3(a3,s),below:d3(o3,s),changesBy:d3(s3,s)}}if(t.kind===`enum`)return{kind:`enum`,id:i,cap:e,field:t.field,label:a,icon:o,values:t.values.map($fe)};let s=t.phrase??c3;return{kind:`value`,id:i,cap:e,field:t.field,label:a,icon:o,phrase:s,phraseFor:f3(s),offer:t.offer??null}}function tpe(e,t,n){let r=[];for(let[i,a]of Object.entries(t.events??{})){if(`notOperatorFacing`in a)continue;let t=Yfe(n,i);r.push({kind:`event`,id:`${e}.event.${a.category}`,cap:e,category:a.category,label:t.label??a.label,phrase:t.phrase??a.phrase,icon:t.icon??a.icon})}for(let n of t.extraEvents??[])r.push({kind:`event`,id:`${e}.event.${n.category}`,cap:e,category:n.category,label:n.label,phrase:n.phrase,icon:n.icon});return r}function npe(e,t,n){let r=[],i=[];for(let[a,o]of p3(e)){let e=m3(o,t,n);for(let t of o.state??[])r.push(epe(a,t,e));i.push(...tpe(a,o,e))}return[...r,...i]}function h3(e,t){return!e||e.length===0?!1:e.includes(t.when.hasFeature)}var g3={id:`battery`,label:`Battery-operated camera`,when:{hasFeature:Ga.BatteryOperated},defaults:{audioMode:`disabled`,detectionMode:`on-motion`},settings:{}},_3=[g3];function rpe(e){for(let t of _3)if(h3(e,t))return t;return null}var v3=[P.Washer,P.Dryer,P.Dishwasher],ipe=`a power sensor (device_class power). Home Assistant has no laundry domain. running-state stays unexported until a null reading can be published as unavailable.`,ape=`HomeKit has no laundry-appliance service. The export tab would pair an accessory with nothing on it: running-state is withheld until a null reading can be unavailable, and power is not a HomeKit service this export honours.`,ope=`Alexa has no laundry category in this export, and neither power nor running has an Alexa interface.`,spe=`Google WASHER, DRYER and DISHWASHER require RunCycle. A power threshold is not that trait, and this export does not publish RunCycle.`,cpe=`No Matter export is built. The closest device types are Laundry Washer (0x0073) and Laundry Dryer (0x0074); a power threshold is not the Laundry Washer Mode cluster.`;function y3(e){return{[P.Washer]:{exported:!1,reason:e},[P.Dryer]:{exported:!1,reason:e},[P.Dishwasher]:{exported:!1,reason:e}}}function lpe(e){return{[P.Washer]:{exported:!0,as:e},[P.Dryer]:{exported:!0,as:e},[P.Dishwasher]:{exported:!0,as:e}}}var b3={ha:lpe(ipe),homekit:y3(ape),alexa:y3(ope),google:y3(spe),matter:y3(cpe)};function x3(e){return v3.some(t=>t===e)}function upe(e,t){return x3(t)?b3[e][t]:null}function S3(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function dpe(e,t){let n=t.split(`.`),r=e;for(let e of n){if(!S3(r))return;r=r[e]}return r}function C3(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=S3(o)?o:{};return{...e,[i]:C3(s,a,n)}}var fpe=3e4,ppe=3,mpe=1e4;async function hpe(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 gpe(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 hpe(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 w3=`lastFetchedAt`,_pe=6e4,vpe=10*6e4;function ype(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)?.[w3];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{[w3]: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(),_()}}}var bpe=`device.state-changed`,xpe=`capability.binding-changed`,Spe=`device.registered`,Cpe=`device.unregistered`,wpe=`device.updated`,Tpe=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=Ea(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?Aa(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&&!T3(n,e.id)||e.stableId!==void 0&&(!i||!T3(i.stableId,e.stableId))||e.addonId!==void 0&&(!i||!T3(i.addonId,e.addonId))||e.type!==void 0&&(!i||!T3(i.type,e.type)))continue;if(e.caps!==void 0){let t=E3(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=E3(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||!Epe(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||!E3(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=Reflect.get(r,e),a=typeof i==`object`&&i?Reflect.get(i,t):void 0;if(typeof a!=`function`)throw Error(`device '${r.deviceId}' does not expose '${e}.${t}'`);return await Reflect.apply(a,i,[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:bpe},{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:xpe},{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:Spe},{onData:e=>{let t=e.data;typeof t?.deviceId==`number`&&this.refreshDeviceMetadata(t.deviceId,`added`)}})),this.bridges.push(e.subscribe({category:Cpe},{onData:e=>{let t=e.data;typeof t?.deviceId==`number`&&this.applyDeviceRemoval(t.deviceId)}})),this.bridges.push(e.subscribe({category:wpe},{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 T3(e,t){return Array.isArray(t)?t.includes(e):e===t}function E3(e){return Array.isArray(e)?e:[e]}function Epe(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 D3(e){return Reflect.get(e,`def`)}function Dpe(e){return e}function Ope(e,t=`Configuration`,n=`main`){return{sections:[{id:n,title:t,fields:e.map(e=>kpe(e.key,e.schema,e.description))}]}}function kpe(e,t,n){let r=O3(t),i=Ppe(t),a={key:e,label:n??k3(e),description:n,default:i};if(r instanceof te&&Sr(t))return{...a,type:`password`,showToggle:!0};if(r instanceof te)return Ape(e,a);if(r instanceof ee)return jpe(r,a);if(r instanceof re)return{...a,type:`boolean`};if(r instanceof se)return Npe(r,a);if(r instanceof ce||r instanceof ae){let e=Sr(t)||Cr(t).length>0;return{...a,type:`textarea`,rows:6,isJson:!0,...e?{secret:!0}:{}}}return{...a,type:`text`}}function Ape(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 jpe(e,t){let n=Dpe(e),r=n.minValue,i=n.maxValue,a=r!=null&&isFinite(r)?r:void 0,o=i!=null&&isFinite(i)?i:void 0,s=Mpe(e);return{...t,type:`number`,...a===void 0?{}:{min:a},...o===void 0?{}:{max:o},...s===void 0?{}:{step:s}}}function Mpe(e){let t=D3(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 Npe(e,t){let n=e.options.map(e=>String(e));return{...t,type:`select`,options:n.map(e=>({label:k3(e),value:e}))}}function O3(e){return e instanceof _||e instanceof de||e instanceof le?O3(D3(e).innerType):e}function Ppe(e){if(e instanceof _)return D3(e).defaultValue}function k3(e){return e.replace(/([A-Z])/g,` $1`).replace(/[_-]/g,` `).replace(/^\w/,e=>e.toUpperCase()).trim()}var Fpe=`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.dishwasher.doorbell.enum-sensor.event-emitter.fan-control.feature-probe.flood.gas.group-active.group-commands.group-status.heating-valve.humidifier.humidity-sensor.image.image-settings.intercom.lawn-mower-control.lock-control.media-player.meter.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.running-state.scene-monitor.script-runner.smoke.snapshot.stream-params.switch.tamper.temperature-sensor.update.vacuum-control.valve.vibration.water-heater.weather`.split(`.`),Ipe={accessories:`accessories`,actionSource:`action-source`,actions:`actions`,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`,deviceCredentials:`device-credentials`,deviceDiscovery:`device-discovery`,deviceExport:`device-export`,deviceExtension:`device-extension`,deviceHistory:`device-history`,deviceManager:`device-manager`,deviceOps:`device-ops`,deviceProvider:`device-provider`,deviceRemovalHook:`device-removal-hook`,deviceState:`device-state`,deviceStatus:`device-status`,dishwasher:`dishwasher`,displayPalette:`display-palette`,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`,groupActive:`group-active`,groupCommands:`group-commands`,groupStatus:`group-status`,heatingValve:`heating-valve`,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`,meter:`meter`,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`,nodeCertificates:`node-certificates`,nodes:`nodes`,notificationOutput:`notification-output`,notificationRules:`notification-rules`,notifier:`notifier`,numericSensor:`numeric-sensor`,oauthIntegration:`oauth-integration`,oidcConnections:`oidc-connections`,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`,recordEntries:`record-entries`,recording:`recording`,recordingArchive:`recording-archive`,recordingExport:`recording-export`,recordingOnboard:`recording-onboard`,recordingSignal:`recording-signal`,records:`records`,runningState:`running-state`,sceneMonitor:`scene-monitor`,scriptRunner:`script-runner`,serverManagement:`server-management`,settingsStore:`settings-store`,smoke:`smoke`,smtpProvider:`smtp-provider`,snapshot:`snapshot`,ssoBridge:`sso-bridge`,storage:`storage`,storageAdmin:`storage-admin`,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`,training:`training`,trainingProvider:`training-provider`,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`},Lpe=[{key:`accessories`,name:`accessories`},{key:`actionSource`,name:`action-source`},{key:`actions`,name:`actions`},{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:`deviceCredentials`,name:`device-credentials`},{key:`deviceDiscovery`,name:`device-discovery`},{key:`deviceExport`,name:`device-export`},{key:`deviceExtension`,name:`device-extension`},{key:`deviceHistory`,name:`device-history`},{key:`deviceManager`,name:`device-manager`},{key:`deviceOps`,name:`device-ops`},{key:`deviceProvider`,name:`device-provider`},{key:`deviceRemovalHook`,name:`device-removal-hook`},{key:`deviceState`,name:`device-state`},{key:`deviceStatus`,name:`device-status`},{key:`dishwasher`,name:`dishwasher`},{key:`displayPalette`,name:`display-palette`},{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:`groupActive`,name:`group-active`},{key:`groupCommands`,name:`group-commands`},{key:`groupStatus`,name:`group-status`},{key:`heatingValve`,name:`heating-valve`},{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:`meter`,name:`meter`},{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:`nodeCertificates`,name:`node-certificates`},{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:`oidcConnections`,name:`oidc-connections`},{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:`recordEntries`,name:`record-entries`},{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:`records`,name:`records`},{key:`runningState`,name:`running-state`},{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:`storageAdmin`,name:`storage-admin`},{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:`training`,name:`training`},{key:`trainingProvider`,name:`training-provider`},{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`}],Rpe=[oU,WU,qU,cv,uv,dv,_v,wv,Sv,PU,ha,IU,oM,Av,RU,jv,Yv,ny,UU,iy,YU,Ry,QU,eW,nW,ab,rW,cW,_W,bW,EW,ob,Pb,OW,jW,LW,_x,HW,WW,iG,oG,uG,mw,pG,yw,xw,Ty,yG,AT,jT,PT,uE,fT,ZT,yE,iO,lT,ID,ba,cD,jO,lO,CG,PG,xG,zG,DO,HG,GG,nK,PO,aK,sK,LO,lK,dK,gK,mK,vK,bK,SK,wK,EK,FK,WK,JK,Yw,DT,QK,lA,Hk,pA,vq,xq,hA,SA,OA,Oq,Mq,Cq,FA,LA,BA,Rq,UA,Vq,Kq,XA,eJ,mJ,$A,bJ,wJ,gT,HJ,hj,zP,YJ,ZJ,VP,GP,rY,gY,SY,QL,jR,lV,OB,OY,yX,TX,OX,AX,IX,KX,ZX,cZ,Hw,bZ,VZ,lQ,SQ,GQ,Fw,sZ,h$,b$,kV,_y,S$,PV,IV,RV,zV,Rw,BV,VV,UV,tH,kb,T$,M$,iH,R$,T1,D1,k1,fH,j1,V0,T0,mH,N1,H1,gH,G1,J1,FH,X1,XH,_a,Q1,e0,iU,l0,d0,Zz],zpe=Object.freeze({"accessories.getStatus":[{name:`deviceId`,form:`single`,optional:!1}],"accessories.setChildHidden":[{name:`childDeviceId`,form:`single`,optional:!1},{name:`deviceId`,form:`single`,optional:!1}],"actions.get":[{name:`deviceId`,form:`single`,optional:!0}],"actions.getLinks":[{name:`deviceId`,form:`single`,optional:!1}],"actions.listForCamera":[{name:`deviceId`,form:`single`,optional:!1}],"actions.run":[{name:`deviceId`,form:`single`,optional:!0}],"actions.setLinks":[{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}],"deviceHistory.getDeviceEnabled":[{name:`deviceId`,form:`single`,optional:!1}],"deviceHistory.listSeries":[{name:`deviceId`,form:`single`,optional:!1}],"deviceHistory.query":[{name:`deviceId`,form:`single`,optional:!1}],"deviceHistory.setDeviceEnabled":[{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}],"deviceRemovalHook.onDeviceRemoved":[{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}],"dishwasher.getOptions":[{name:`deviceId`,form:`single`,optional:!1}],"dishwasher.getStatus":[{name:`deviceId`,form:`single`,optional:!1}],"dishwasher.pause":[{name:`deviceId`,form:`single`,optional:!1}],"dishwasher.resume":[{name:`deviceId`,form:`single`,optional:!1}],"dishwasher.setChildLock":[{name:`deviceId`,form:`single`,optional:!1}],"dishwasher.setExtraDry":[{name:`deviceId`,form:`single`,optional:!1}],"dishwasher.setHalfLoad":[{name:`deviceId`,form:`single`,optional:!1}],"dishwasher.setHygienePlus":[{name:`deviceId`,form:`single`,optional:!1}],"dishwasher.setIntensiveZone":[{name:`deviceId`,form:`single`,optional:!1}],"dishwasher.setOption":[{name:`deviceId`,form:`single`,optional:!1}],"dishwasher.setPower":[{name:`deviceId`,form:`single`,optional:!1}],"dishwasher.setProgram":[{name:`deviceId`,form:`single`,optional:!1}],"dishwasher.setVarioSpeedPlus":[{name:`deviceId`,form:`single`,optional:!1}],"dishwasher.start":[{name:`deviceId`,form:`single`,optional:!1}],"dishwasher.stop":[{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}],"groupActive.getStatus":[{name:`deviceId`,form:`single`,optional:!1}],"groupCommands.getStatus":[{name:`deviceId`,form:`single`,optional:!1}],"groupStatus.getStatus":[{name:`deviceId`,form:`single`,optional:!1}],"heatingValve.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}],"keychain.deleteDeviceScope":[{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}],"logDestination.read":[{name:`deviceId`,form:`single`,optional:!0}],"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}],"meter.getStatus":[{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}],"osdManager.setSlotCameraEnabled":[{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.backfillRetrainOrigins":[{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.listRetrainCorpusPage":[{name:`deviceIds`,form:`array`,optional:!0}],"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.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.getCameraDetectionSource":[{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.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.setCameraDetectionSource":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineOrchestrator.setCameraSensors":[{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}],"records.count":[{name:`deviceId`,form:`single`,optional:!0}],"records.deleteDevice":[{name:`deviceId`,form:`single`,optional:!1}],"records.deleteWhere":[{name:`deviceId`,form:`single`,optional:!0}],"records.histogram":[{name:`deviceId`,form:`single`,optional:!0}],"records.putMany":[{name:`records`,form:`object-array`,optional:!1,itemField:`deviceId`}],"records.query":[{name:`deviceId`,form:`single`,optional:!0}],"runningState.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}],"storageAdmin.readRecords":[{name:`deviceId`,form:`single`,optional:!0}],"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}]}),Bpe=`actions.get,actions.getLinks,actions.listForCamera,actions.run,actions.setLinks,addonSettings.getDeviceSettings,addonSettings.updateDeviceSettings,audioAnalyzer.attachDevice,audioAnalyzer.classify,audioAnalyzer.detachDevice,deviceAdoption.getStatus,deviceAdoption.release,deviceAdoption.resync,deviceExport.applyDeviceSettingsPatch,deviceExport.getDeviceLiveContribution,deviceExport.getDeviceSettingsContribution,deviceHistory.getDeviceEnabled,deviceHistory.listSeries,deviceHistory.query,deviceHistory.setDeviceEnabled,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,deviceRemovalHook.onDeviceRemoved,deviceState.claimFields,deviceState.getCapSlice,deviceState.getNativeCapSlice,deviceState.getSnapshot,deviceState.patchOwnedFields,deviceState.releaseClaim,deviceState.setCapSlice,faceGallery.getFaceByTrack,faceGallery.listRecentFaces,keychain.deleteDeviceScope,logDestination.read,networkQuality.getDeviceStats,networkQuality.reportClientStats,notificationRules.getAlarmSensors,notificationRules.setDeviceMuted,osdManager.clearSlotBinding,osdManager.copyDeviceConfiguration,osdManager.getDeviceOsd,osdManager.getSourceCatalog,osdManager.previewSlot,osdManager.renderDevice,osdManager.setSlotBinding,osdManager.setSlotCameraEnabled,pipelineExecutor.runPipeline,pipelineExecutor.runPipelineBatch,pipelineOrchestrator.applyDeviceSettingsPatch,pipelineOrchestrator.assignAudio,pipelineOrchestrator.assignPipeline,pipelineOrchestrator.getAudioAssignment,pipelineOrchestrator.getCameraDetectionSource,pipelineOrchestrator.getCameraMetrics,pipelineOrchestrator.getCameraSettings,pipelineOrchestrator.getCameraStatus,pipelineOrchestrator.getCameraStatuses,pipelineOrchestrator.getCameraSwitches,pipelineOrchestrator.getDeviceLiveContribution,pipelineOrchestrator.getDeviceSettingsContribution,pipelineOrchestrator.getPipelineAssignment,pipelineOrchestrator.getPipelineDevicePin,pipelineOrchestrator.requestOccupancyLook,pipelineOrchestrator.resolvePipeline,pipelineOrchestrator.setCameraDetectionSource,pipelineOrchestrator.setCameraSensors,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,records.count,records.deleteDevice,records.deleteWhere,records.histogram,records.putMany,records.query,storageAdmin.readRecords,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(`,`),A3=Object.freeze({broker:`broker`,"calendar-source":`calendar`,"device-export":`device-export`,llm:`ai`,"mesh-network":`mesh`,"mqtt-broker":`broker`,"network-access":`ingress`,"smtp-provider":`email`}),Vpe=[`broker`,`calendar-source`,`device-export`,`llm`,`mesh-network`,`mqtt-broker`,`network-access`,`smtp-provider`];function Hpe(e){let t=[];for(let[n,r]of Object.entries(A3))r===e&&t.push(n);return t}var j3={"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`]},dishwasher:{durability:`session`,volatileFields:[]},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`]},"group-active":{durability:`session`,volatileFields:[]},"group-commands":{durability:`session`,volatileFields:[]},"group-status":{durability:`session`,volatileFields:[]},"heating-valve":{durability:`session`,volatileFields:[`lastFetchedAt`]},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:[]},meter:{durability:`restored`,volatileFields:[`lastFetchedAt`]},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:[]},"running-state":{durability:`restored`,volatileFields:[`lastFetchedAt`]},"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 M3(e){return j3[e]??Upe}var Upe={durability:`session`,volatileFields:[]};function Wpe(e){return M3(e).durability===`restored`}var Gpe=`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.meter.motion-zones.native-object-detection.network-link.numeric-sensor.power-meter.presence.pressure-sensor.privacy-mask.recording-onboard.running-state.smoke.stream-catalog.stream-params.switch.tamper.temperature-sensor.vibration.zone-rules.zones`.split(`.`),N3=5*6e4,Kpe=12;function P3(e){return Math.floor(e/N3)*N3}function qpe(e){return e.kind===`device`?`d:${e.deviceId}`:`n:${e.nodeId}`}function F3(e,t,n){return`${e}\u0000${qpe(t)}\u0000${n}`}function Jpe(e){return{key:e.key,subject:e.subject,scope:e.scope,bucketStart:e.bucketStart,samples:e.samples,sum:e.sum,min:e.min,max:e.max,last:e.last,lastTs:e.lastTs}}var Ype=class{open=new Map;requeued=new Map;note(e,t,n,r,i){if(!Number.isFinite(r)||!Number.isFinite(i))return;let a=P3(i),o=`${F3(e,t,n)}\u0000${a}`,s=this.open.get(o);if(s===void 0){this.open.set(o,{key:e,subject:t,scope:n,bucketStart:a,samples:1,sum:r,min:r,max:r,last:r,lastTs:i});return}s.samples+=1,s.sum+=r,r<s.min&&(s.min=r),r>s.max&&(s.max=r),i>=s.lastTs&&(s.last=r,s.lastTs=i)}takeClosed(e){let t=[];for(let[n,r]of this.open)r.bucketStart+3e5<=e&&(t.push(Jpe(r)),this.open.delete(n));for(let e of this.requeued.values())t.push(...e);return this.requeued.clear(),t.toSorted((e,t)=>e.bucketStart-t.bucketStart)}requeue(e){let t=[];for(let n of e){let e=F3(n.key,n.subject,n.scope),r=[...this.requeued.get(e)??[],n].toSorted((e,t)=>e.bucketStart-t.bucketStart);for(;r.length>12;){let e=r.shift();e!==void 0&&t.push(e)}this.requeued.set(e,r)}return t}pendingBucketCount(){let e=this.open.size;for(let t of this.requeued.values())e+=t.length;return e}};function Xpe(e,t){return T2[e]?.[t]}var I3=d({addonId:l().min(1),stableId:l().min(1),cap:l().min(1),fieldPath:l().min(1)}),L3=m(`kind`,[d({kind:h(`identity`)}),d({kind:h(`invert`)}),d({kind:h(`threshold`),comparison:C([`gte`,`lte`]),threshold:i(),startDwellMs:i().nonnegative(),stopDwellMs:i().nonnegative()}),d({kind:h(`linear`),scale:i(),offset:i(),clampMin:i().optional(),clampMax:i().optional()}),d({kind:h(`enum-map`),mapping:x(l(),l().nullable())}),d({kind:h(`number`)})]),Zpe=d({kind:h(`scalar`),cap:l().min(1),targetId:l().min(1),source:I3,transform:L3}),Qpe=d({kind:h(`keyedArray`),cap:l().min(1),targetId:l().min(1),key:l().min(1),label:l().min(1),fieldPath:l().min(1),source:I3,transform:L3}),$pe=d({kind:h(`pulse`),cap:l().min(1),targetId:l().min(1),enabled:T(),debounceMs:i().nonnegative(),edges:w(C([`rising`,`button`,`native-event`])).min(1).optional(),sources:w(I3).min(1)}),eme=I3.extend({mode:C([`in-addition`,`confirm`,`replace`]).optional()}),tme=m(`kind`,[Zpe,Qpe,$pe,d({kind:h(`span`),cap:l().min(1),targetId:l().min(1),timeoutMs:i().nonnegative(),cooldownMs:i().nonnegative().optional(),sources:w(eme)})]),nme=d({targetId:l().min(1),configured:T(),source:C([`native`,`assigned`]),state:C([`active`,`stale`,`released`,`unavailable`]),reason:l().nullable()});function rme(e){if(e.stored.kind===`pending`)return R3(e.targetId,`pending`,null);if(e.stored.kind===`unknown`)return R3(e.targetId,`unknown`,e.stored.reason??`unknown`);if(e.stored.value===null)return ame(e.targetId);let t=J2({feature:e.stored.value,device:e.device,cap:e.cap,targetId:e.targetId});return t===null?{text:`unknown`,status:z3(e.targetId,!0,`assigned`,`unavailable`,`not-canonical`)}:ime(e,t.apply,ome(t.draft.source.cap,t.draft.source.fieldPath))}function ime(e,t,n){return e.sourcePresence===`pending`?{text:`pending`,status:z3(e.targetId,!0,`assigned`,`stale`,null)}:e.sourcePresence===`unknown`?{text:`unknown`,status:z3(e.targetId,!0,`assigned`,`stale`,e.sourceUnknownReason??`unknown`)}:e.sourcePresence===`absent`&&t===`replace`?{text:`Native · source missing`,status:z3(e.targetId,!0,`native`,`released`,`source-missing`)}:e.sourcePresence===`absent`?{text:`Assigned · ${n}`,status:z3(e.targetId,!0,`assigned`,`unavailable`,`source-missing`)}:{text:`Assigned · ${n}`,status:z3(e.targetId,!0,`assigned`,`active`,null)}}function ame(e){return{text:`Native`,status:z3(e,!1,`native`,`active`,null)}}function R3(e,t,n){return{text:t,status:z3(e,!1,`native`,t===`pending`?`unavailable`:`stale`,n)}}function ome(e,t){return`${e}.${t}`}function z3(e,t,n,r,i){return{targetId:e,configured:t,source:n,state:r,reason:i}}var sme={priorActive:void 0,lastPressedAt:null,count:0,acceptedAt:null},cme={open:!1,startedAt:null,endedAt:null,quietUntil:null,priorActive:void 0};function lme(e,t,n){if(t.kind===`unread`||n<0)return e;if(e.priorActive===void 0)return{...e,priorActive:t.active};if(!t.active)return{...e,priorActive:!1};if(e.priorActive)return e;let r=V3(t.changedAt);return r===null||e.acceptedAt!==null&&r-e.acceptedAt<n?{...e,priorActive:!0}:{priorActive:!0,lastPressedAt:r,count:e.count+1,acceptedAt:r}}function ume(e,t,n){let r=dme(e,n);if(t.kind===`unread`||n.timeoutMs<0||n.cooldownMs<0)return r;if(r.priorActive===void 0)return{...r,priorActive:t.active};if(r.open&&r.priorActive&&!t.active)return B3(r,V3(t.changedAt)??n.nowMs,n.cooldownMs,!1);if(!t.active)return{...r,priorActive:!1};if(r.priorActive||r.open)return{...r,priorActive:!0};let i=V3(t.changedAt)??n.nowMs;return r.quietUntil!==null&&i<r.quietUntil?{...r,priorActive:!0}:{open:!0,startedAt:i,endedAt:null,quietUntil:null,priorActive:!0}}function dme(e,t){if(!e.open||e.startedAt===null)return e;let n=e.startedAt+t.timeoutMs;return t.nowMs<n?e:B3(e,n,t.cooldownMs,e.priorActive===!0)}function B3(e,t,n,r){return{open:!1,startedAt:e.startedAt,endedAt:t,quietUntil:n>0?t+n:null,priorActive:r}}function V3(e){return e!==null&&Number.isFinite(e)?e:null}function fme(e){if(e.stored.kind===`pending`)return U3(e.targetId,`pending`,null);if(e.stored.kind===`unknown`)return U3(e.targetId,`unknown`,e.stored.reason??`unknown`);if(e.stored.value===null)return gme(e.targetId);let t=F2({feature:e.stored.value,device:e.device,cap:e.cap,targetId:e.targetId,timestampPath:e.timestampPath,counterPath:e.counterPath});if(t===null)return{text:`unknown`,status:W3(e.targetId,!0,`assigned`,`unavailable`,`not-canonical`)};if(e.sourcePresence===`pending`)return{text:`pending`,status:W3(e.targetId,!0,`assigned`,`stale`,null)};if(e.sourcePresence===`unknown`)return{text:`unknown`,status:W3(e.targetId,!0,`assigned`,`stale`,e.sourceUnknownReason??`unknown`)};if(e.sourcePresence===`absent`&&e.apply===`replace`)return{text:`Native · source missing`,status:W3(e.targetId,!0,`native`,`released`,`source-missing`)};if(e.sourcePresence===`absent`)return{text:`Assigned · source missing`,status:W3(e.targetId,!0,`assigned`,`unavailable`,`source-missing`)};let n=t.draft.sources[0];return{text:`Assigned · ${n===void 0?`assigned`:`${n.cap}.${n.fieldPath}`}`,status:W3(e.targetId,!0,`assigned`,`active`,null)}}function pme(e,t){if(t.kind===`pending`)return{text:`pending`,writable:!1,rows:[],status:W3(e,!1,`native`,`unavailable`,null)};if(t.kind===`unknown`)return{text:`unknown`,writable:!1,rows:[],status:W3(e,!1,`native`,`stale`,t.reason??`unknown`)};if(t.value.state===`unreadable`)return{text:`unreadable`,writable:!1,rows:[],status:W3(e,!1,`assigned`,`unavailable`,t.value.reason)};if(t.value.state===`not-configured`)return{text:`Native`,writable:!0,rows:[],status:W3(e,!1,`native`,`active`,null)};let n=t.value.sensors.map(hme),r=mme(t.value);return{text:n.length===0?`Native`:`Assigned`,writable:!0,rows:n,status:W3(e,n.length>0,`assigned`,`active`,r)}}function mme(e){return e.notForwarded===void 0?e.notEnforced===void 0?e.sensors.map(H3).find(e=>e!==null)??null:e.notEnforced:e.notForwarded}function hme(e){return{key:`${e.addonId}/${e.stableId}`,addonId:e.addonId,stableId:e.stableId,name:e.state===`missing`||e.state===`unreadable`?e.stableId:e.name,mode:e.mode,state:e.state,reason:H3(e)}}function H3(e){switch(e.state){case`ready`:return null;case`offline`:case`missing`:case`unsupported`:case`unreadable`:return e.reason}}function gme(e){return{text:`Native`,status:W3(e,!1,`native`,`active`,null)}}function U3(e,t,n){return{text:t,status:W3(e,!1,`native`,t===`pending`?`unavailable`:`stale`,n)}}function W3(e,t,n,r,i){return{targetId:e,configured:t,source:n,state:r,reason:i}}function _me(e){if(e.stored.kind===`pending`)return G3(e.targetId,`pending`,null);if(e.stored.kind===`unknown`)return G3(e.targetId,`unknown`,e.stored.reason??`unknown`);if(e.stored.value===null)return yme(e.targetId);let t=e4(e.stored.value,e.cap,e.targetId),n=t?.items.filter(e=>e.recognized).length??0;return t===null||!t.canonical||n===0?{text:`unknown`,assignedCount:0,status:K3(e.targetId,!0,`assigned`,`unavailable`,`not-canonical`)}:vme(e,n)}function vme(e,t){let n=`${t} assigned`;return e.sourcePresence===`pending`?{text:`pending`,assignedCount:t,status:K3(e.targetId,!0,`assigned`,`stale`,null)}:e.sourcePresence===`unknown`?{text:`unknown`,assignedCount:t,status:K3(e.targetId,!0,`assigned`,`stale`,e.sourceUnknownReason??`unknown`)}:e.sourcePresence===`absent`?{text:n,assignedCount:t,status:K3(e.targetId,!0,`assigned`,`unavailable`,`source-missing`)}:{text:n,assignedCount:t,status:K3(e.targetId,!0,`assigned`,`active`,null)}}function yme(e){return{text:`Native`,assignedCount:0,status:K3(e,!1,`native`,`active`,null)}}function G3(e,t,n){return{text:t,assignedCount:0,status:K3(e,!1,`native`,t===`pending`?`unavailable`:`stale`,n)}}function K3(e,t,n,r,i){return{targetId:e,configured:t,source:n,state:r,reason:i}}var bme=[{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 xme(e){function t(t,n,r,i,a){return ka(e,t,n,r,i,a)}return{actions:{list:e=>t(`actions`,`list`,`query`,e),stop:e=>t(`actions`,`stop`,`mutation`,e),getTraces:e=>t(`actions`,`getTraces`,`query`,e),create:e=>t(`actions`,`create`,`mutation`,e),update:e=>t(`actions`,`update`,`mutation`,e),delete:e=>t(`actions`,`delete`,`mutation`,e),setLinks:e=>t(`actions`,`setLinks`,`mutation`,e)},actionSource:{listActions:e=>t(`actionSource`,`listActions`,`query`,e),runAction:e=>t(`actionSource`,`runAction`,`mutation`,e),stopAction:e=>t(`actionSource`,`stopAction`,`mutation`,e)},addonPages:{listPages:e=>t(`addonPages`,`listPages`,`query`,e)},addons:{list:e=>t(`addons`,`list`,`query`,e),getLogs:e=>t(`addons`,`getLogs`,`query`,e),listPackages:e=>t(`addons`,`listPackages`,`query`,e),installPackage:e=>t(`addons`,`installPackage`,`mutation`,e),installFromWorkspace:e=>t(`addons`,`installFromWorkspace`,`mutation`,e),isWorkspaceAvailable:e=>t(`addons`,`isWorkspaceAvailable`,`query`,e),listWorkspacePackages:e=>t(`addons`,`listWorkspacePackages`,`query`,e),uninstallPackage:e=>t(`addons`,`uninstallPackage`,`mutation`,e),listInstallations:e=>t(`addons`,`listInstallations`,`query`,e),reloadPackages:e=>t(`addons`,`reloadPackages`,`mutation`,e),searchAvailable:e=>t(`addons`,`searchAvailable`,`query`,e),listUpdates:e=>t(`addons`,`listUpdates`,`query`,e),updatePackage:e=>t(`addons`,`updatePackage`,`mutation`,e),rollbackPackage:e=>t(`addons`,`rollbackPackage`,`mutation`,e),forceRefresh:e=>t(`addons`,`forceRefresh`,`mutation`,e),restartServer:e=>t(`addons`,`restartServer`,`mutation`,e),getLastRestart:e=>t(`addons`,`getLastRestart`,`query`,e),listFrameworkPackages:e=>t(`addons`,`listFrameworkPackages`,`query`,e),listCapabilityProviders:e=>t(`addons`,`listCapabilityProviders`,`query`,e),setCapabilityProviderEnabled:e=>t(`addons`,`setCapabilityProviderEnabled`,`mutation`,e),getVersions:e=>t(`addons`,`getVersions`,`query`,e),getPackageDocs:e=>t(`addons`,`getPackageDocs`,`query`,e),restartAddon:e=>t(`addons`,`restartAddon`,`mutation`,e),retryLoad:e=>t(`addons`,`retryLoad`,`mutation`,e),getAutoUpdateSettings:e=>t(`addons`,`getAutoUpdateSettings`,`query`,e),setAutoUpdateSettings:e=>t(`addons`,`setAutoUpdateSettings`,`mutation`,e),getAddonAutoUpdate:e=>t(`addons`,`getAddonAutoUpdate`,`query`,e),setAddonAutoUpdate:e=>t(`addons`,`setAddonAutoUpdate`,`mutation`,e),applyAutoUpdateToAll:e=>t(`addons`,`applyAutoUpdateToAll`,`mutation`,e),custom:e=>t(`addons`,`custom`,`mutation`,e),startJob:e=>t(`addons`,`startJob`,`mutation`,e),getJob:e=>t(`addons`,`getJob`,`query`,e),listJobs:e=>t(`addons`,`listJobs`,`query`,e),cancelJob:e=>t(`addons`,`cancelJob`,`mutation`,e),onAddonLogs:(e,n)=>t(`addons`,`onAddonLogs`,`subscription`,e,n)},addonSettings:{getGlobalSettings:e=>t(`addonSettings`,`getGlobalSettings`,`query`,e),updateGlobalSettings:e=>t(`addonSettings`,`updateGlobalSettings`,`mutation`,e),getIntegrationSettings:e=>t(`addonSettings`,`getIntegrationSettings`,`query`,e)},addonWidgets:{listWidgets:e=>t(`addonWidgets`,`listWidgets`,`query`,e)},alerts:{emit:e=>t(`alerts`,`emit`,`mutation`,e),update:e=>t(`alerts`,`update`,`mutation`,e),list:e=>t(`alerts`,`list`,`query`,e),getUnreadCount:e=>t(`alerts`,`getUnreadCount`,`query`,e),markRead:e=>t(`alerts`,`markRead`,`mutation`,e),markAllRead:e=>t(`alerts`,`markAllRead`,`mutation`,e),dismiss:e=>t(`alerts`,`dismiss`,`mutation`,e)},audioAnalyzer:{analyseChunk:e=>t(`audioAnalyzer`,`analyseChunk`,`mutation`,e),classify:e=>t(`audioAnalyzer`,`classify`,`query`,e),attachDevice:e=>t(`audioAnalyzer`,`attachDevice`,`mutation`,e),isReady:e=>t(`audioAnalyzer`,`isReady`,`query`,e),dispose:e=>t(`audioAnalyzer`,`dispose`,`mutation`,e),reprobeAudioEngine:e=>t(`audioAnalyzer`,`reprobeAudioEngine`,`mutation`,e)},audioCodec:{listSupportedCodecs:e=>t(`audioCodec`,`listSupportedCodecs`,`query`,e),canHandle:e=>t(`audioCodec`,`canHandle`,`query`,e),createDecodeSession:e=>t(`audioCodec`,`createDecodeSession`,`mutation`,e),createEncodeSession:e=>t(`audioCodec`,`createEncodeSession`,`mutation`,e),closeSession:e=>t(`audioCodec`,`closeSession`,`mutation`,e),pushEncodedFrame:e=>t(`audioCodec`,`pushEncodedFrame`,`mutation`,e),pullPcm:e=>t(`audioCodec`,`pullPcm`,`query`,e),pushPcm:e=>t(`audioCodec`,`pushPcm`,`mutation`,e),pullEncoded:e=>t(`audioCodec`,`pullEncoded`,`query`,e),flushEncode:e=>t(`audioCodec`,`flushEncode`,`mutation`,e),listActiveSessions:e=>t(`audioCodec`,`listActiveSessions`,`query`,e)},backup:{listDestinations:e=>t(`backup`,`listDestinations`,`query`,e),trigger:e=>t(`backup`,`trigger`,`mutation`,e),listRuns:e=>t(`backup`,`listRuns`,`query`,e),cancel:e=>t(`backup`,`cancel`,`mutation`,e),list:e=>t(`backup`,`list`,`query`,e),listLocations:e=>t(`backup`,`listLocations`,`query`,e),getEntries:e=>t(`backup`,`getEntries`,`query`,e),restore:e=>t(`backup`,`restore`,`mutation`,e),getEncryption:e=>t(`backup`,`getEncryption`,`query`,e),setupEncryption:e=>t(`backup`,`setupEncryption`,`mutation`,e),disableEncryption:e=>t(`backup`,`disableEncryption`,`mutation`,e),checkBackupKey:e=>t(`backup`,`checkBackupKey`,`mutation`,e),delete:e=>t(`backup`,`delete`,`mutation`,e),listArchives:e=>t(`backup`,`listArchives`,`query`,e),upsertDestinationPolicy:e=>t(`backup`,`upsertDestinationPolicy`,`mutation`,e),previewSchedule:e=>t(`backup`,`previewSchedule`,`query`,e),listSchedules:e=>t(`backup`,`listSchedules`,`query`,e),listAvailableDatabases:e=>t(`backup`,`listAvailableDatabases`,`query`,e),upsertSchedule:e=>t(`backup`,`upsertSchedule`,`mutation`,e),deleteSchedule:e=>t(`backup`,`deleteSchedule`,`mutation`,e)},broker:{list:e=>t(`broker`,`list`,`query`,e),get:e=>t(`broker`,`get`,`query`,e),listProviders:e=>t(`broker`,`listProviders`,`query`,e),add:e=>t(`broker`,`add`,`mutation`,e),remove:e=>t(`broker`,`remove`,`mutation`,e),testConnection:e=>t(`broker`,`testConnection`,`mutation`,e),getSettings:e=>t(`broker`,`getSettings`,`query`,e),setSettings:e=>t(`broker`,`setSettings`,`mutation`,e),getBrokerConfig:e=>t(`broker`,`getBrokerConfig`,`query`,e),getSettingsSchema:e=>t(`broker`,`getSettingsSchema`,`query`,e),testSettings:e=>t(`broker`,`testSettings`,`mutation`,e),publish:e=>t(`broker`,`publish`,`mutation`,e),subscribe:e=>t(`broker`,`subscribe`,`mutation`,e),unsubscribe:e=>t(`broker`,`unsubscribe`,`mutation`,e),getState:e=>t(`broker`,`getState`,`query`,e),getStatus:e=>t(`broker`,`getStatus`,`query`,e)},calendars:{listCalendars:e=>t(`calendars`,`listCalendars`,`query`,e),listEvents:e=>t(`calendars`,`listEvents`,`query`,e),getPreferences:e=>t(`calendars`,`getPreferences`,`query`,e),setCalendarPreference:e=>t(`calendars`,`setCalendarPreference`,`mutation`,e)},connectionTest:{testSettings:e=>t(`connectionTest`,`testSettings`,`mutation`,e),describeTest:e=>t(`connectionTest`,`describeTest`,`query`,e)},coreBlocks:{list:e=>t(`coreBlocks`,`list`,`query`,e),get:e=>t(`coreBlocks`,`get`,`query`,e),create:e=>t(`coreBlocks`,`create`,`mutation`,e),update:e=>t(`coreBlocks`,`update`,`mutation`,e),delete:e=>t(`coreBlocks`,`delete`,`mutation`,e),setEnabled:e=>t(`coreBlocks`,`setEnabled`,`mutation`,e),restart:e=>t(`coreBlocks`,`restart`,`mutation`,e),compile:e=>t(`coreBlocks`,`compile`,`mutation`,e),getBlockSettings:e=>t(`coreBlocks`,`getBlockSettings`,`query`,e),updateBlockSettings:e=>t(`coreBlocks`,`updateBlockSettings`,`mutation`,e),migrateRawSecrets:e=>t(`coreBlocks`,`migrateRawSecrets`,`mutation`,e),getTypeDefs:e=>t(`coreBlocks`,`getTypeDefs`,`query`,e),createComposition:e=>t(`coreBlocks`,`createComposition`,`mutation`,e),updateComposition:e=>t(`coreBlocks`,`updateComposition`,`mutation`,e),getComposition:e=>t(`coreBlocks`,`getComposition`,`query`,e),listCompositions:e=>t(`coreBlocks`,`listCompositions`,`query`,e),getCustomization:e=>t(`coreBlocks`,`getCustomization`,`query`,e),listComposableCaps:e=>t(`coreBlocks`,`listComposableCaps`,`query`,e),validateComposition:e=>t(`coreBlocks`,`validateComposition`,`mutation`,e),reportAutomationRun:e=>t(`coreBlocks`,`reportAutomationRun`,`mutation`,e),getAutomationRunState:e=>t(`coreBlocks`,`getAutomationRunState`,`query`,e),getTraces:e=>t(`coreBlocks`,`getTraces`,`query`,e)},decoder:{getInfo:e=>t(`decoder`,`getInfo`,`query`,e),reprobeHwaccel:e=>t(`decoder`,`reprobeHwaccel`,`mutation`,e)},deviceAdoption:{listCandidateFilters:e=>t(`deviceAdoption`,`listCandidateFilters`,`query`,e),listCandidates:e=>t(`deviceAdoption`,`listCandidates`,`query`,e),getCandidate:e=>t(`deviceAdoption`,`getCandidate`,`query`,e),refresh:e=>t(`deviceAdoption`,`refresh`,`mutation`,e),adopt:e=>t(`deviceAdoption`,`adopt`,`mutation`,e),release:e=>t(`deviceAdoption`,`release`,`mutation`,e),resync:e=>t(`deviceAdoption`,`resync`,`mutation`,e)},deviceCredentials:{listDeviceCredentials:e=>t(`deviceCredentials`,`listDeviceCredentials`,`query`,e),startEnrollment:e=>t(`deviceCredentials`,`startEnrollment`,`mutation`,e),revokeDeviceCredential:e=>t(`deviceCredentials`,`revokeDeviceCredential`,`mutation`,e),getDeviceCertificateSettings:e=>t(`deviceCredentials`,`getDeviceCertificateSettings`,`query`,e),setDeviceCertificateSettings:e=>t(`deviceCredentials`,`setDeviceCertificateSettings`,`mutation`,e),deleteDeviceCredential:e=>t(`deviceCredentials`,`deleteDeviceCredential`,`mutation`,e),getDeviceCaStatus:e=>t(`deviceCredentials`,`getDeviceCaStatus`,`query`,e),renameDeviceCredential:e=>t(`deviceCredentials`,`renameDeviceCredential`,`mutation`,e)},deviceExport:{getStatus:e=>t(`deviceExport`,`getStatus`,`query`,e),listSupportedDeviceKinds:e=>t(`deviceExport`,`listSupportedDeviceKinds`,`query`,e),listExposedDevices:e=>t(`deviceExport`,`listExposedDevices`,`query`,e),exposeDevice:e=>t(`deviceExport`,`exposeDevice`,`mutation`,e),unexposeDevice:e=>t(`deviceExport`,`unexposeDevice`,`mutation`,e)},deviceHistory:{listNodeSeries:e=>t(`deviceHistory`,`listNodeSeries`,`query`,e),queryNode:e=>t(`deviceHistory`,`queryNode`,`query`,e),queryMany:e=>t(`deviceHistory`,`queryMany`,`query`,e),declareSeries:e=>t(`deviceHistory`,`declareSeries`,`mutation`,e),record:e=>t(`deviceHistory`,`record`,`mutation`,e),recordBuckets:e=>t(`deviceHistory`,`recordBuckets`,`mutation`,e),getStatus:e=>t(`deviceHistory`,`getStatus`,`query`,e),listOrphanSeries:e=>t(`deviceHistory`,`listOrphanSeries`,`query`,e),deleteOrphanSeries:e=>t(`deviceHistory`,`deleteOrphanSeries`,`mutation`,e)},deviceManager:{allocateDeviceId:e=>t(`deviceManager`,`allocateDeviceId`,`mutation`,e),migrateDevice:e=>t(`deviceManager`,`migrateDevice`,`mutation`,e),registerDevice:e=>t(`deviceManager`,`registerDevice`,`mutation`,e),removeDevice:e=>t(`deviceManager`,`removeDevice`,`mutation`,e),persistConfig:e=>t(`deviceManager`,`persistConfig`,`mutation`,e),getRoleDisplayDefaults:e=>t(`deviceManager`,`getRoleDisplayDefaults`,`query`,e),setRoleDisplayDefaults:e=>t(`deviceManager`,`setRoleDisplayDefaults`,`mutation`,e),listLocations:e=>t(`deviceManager`,`listLocations`,`query`,e),addLocation:e=>t(`deviceManager`,`addLocation`,`mutation`,e),removeLocation:e=>t(`deviceManager`,`removeLocation`,`mutation`,e),renameLocation:e=>t(`deviceManager`,`renameLocation`,`mutation`,e),listLocationIcons:e=>t(`deviceManager`,`listLocationIcons`,`query`,e),setLocationIcon:e=>t(`deviceManager`,`setLocationIcon`,`mutation`,e),listLocationDescriptions:e=>t(`deviceManager`,`listLocationDescriptions`,`query`,e),setLocationDescription:e=>t(`deviceManager`,`setLocationDescription`,`mutation`,e),listSiteZones:e=>t(`deviceManager`,`listSiteZones`,`query`,e),setSiteZone:e=>t(`deviceManager`,`setSiteZone`,`mutation`,e),removeSiteZone:e=>t(`deviceManager`,`removeSiteZone`,`mutation`,e),renameSiteZone:e=>t(`deviceManager`,`renameSiteZone`,`mutation`,e),setLocationZone:e=>t(`deviceManager`,`setLocationZone`,`mutation`,e),listPersistedByAddon:e=>t(`deviceManager`,`listPersistedByAddon`,`query`,e),listAll:e=>t(`deviceManager`,`listAll`,`query`,e),getChildren:e=>t(`deviceManager`,`getChildren`,`query`,e),getChildrenBatch:e=>t(`deviceManager`,`getChildrenBatch`,`query`,e),getLinkedDevicesBatch:e=>t(`deviceManager`,`getLinkedDevicesBatch`,`query`,e),listDeletedSince:e=>t(`deviceManager`,`listDeletedSince`,`query`,e),cleanupDeletedDevicesData:e=>t(`deviceManager`,`cleanupDeletedDevicesData`,`mutation`,e),removeByIntegration:e=>t(`deviceManager`,`removeByIntegration`,`mutation`,e),getBindingsBatch:e=>t(`deviceManager`,`getBindingsBatch`,`query`,e),getAllBindings:e=>t(`deviceManager`,`getAllBindings`,`query`,e),listDeviceIdsByCaps:e=>t(`deviceManager`,`listDeviceIdsByCaps`,`query`,e),listWrappersForCap:e=>t(`deviceManager`,`listWrappersForCap`,`query`,e),listBindableCapsForDeviceType:e=>t(`deviceManager`,`listBindableCapsForDeviceType`,`query`,e),discoverDevices:e=>t(`deviceManager`,`discoverDevices`,`mutation`,e),adoptDevice:e=>t(`deviceManager`,`adoptDevice`,`mutation`,e),getCreationSchema:e=>t(`deviceManager`,`getCreationSchema`,`query`,e),createDevice:e=>t(`deviceManager`,`createDevice`,`mutation`,e),testCreationField:e=>t(`deviceManager`,`testCreationField`,`mutation`,e),adoptionListCandidateFilters:e=>t(`deviceManager`,`adoptionListCandidateFilters`,`query`,e),adoptionListCandidates:e=>t(`deviceManager`,`adoptionListCandidates`,`query`,e),adoptionRefresh:e=>t(`deviceManager`,`adoptionRefresh`,`mutation`,e),adoptionAdopt:e=>t(`deviceManager`,`adoptionAdopt`,`mutation`,e),adoptionRelease:e=>t(`deviceManager`,`adoptionRelease`,`mutation`,e),adoptionStartJob:e=>t(`deviceManager`,`adoptionStartJob`,`mutation`,e),adoptionListJobs:e=>t(`deviceManager`,`adoptionListJobs`,`query`,e),adoptionCancelJob:e=>t(`deviceManager`,`adoptionCancelJob`,`mutation`,e),adoptionResync:e=>t(`deviceManager`,`adoptionResync`,`mutation`,e),discoveryProviders:e=>t(`deviceManager`,`discoveryProviders`,`query`,e),discoverAllProviders:e=>t(`deviceManager`,`discoverAllProviders`,`mutation`,e),discoverProvider:e=>t(`deviceManager`,`discoverProvider`,`mutation`,e),providerCreationType:e=>t(`deviceManager`,`providerCreationType`,`query`,e),providerDiscoveryParamsSchema:e=>t(`deviceManager`,`providerDiscoveryParamsSchema`,`query`,e),getDeviceStatusAggregateBatch:e=>t(`deviceManager`,`getDeviceStatusAggregateBatch`,`query`,e)},deviceProvider:{start:e=>t(`deviceProvider`,`start`,`mutation`,e),stop:e=>t(`deviceProvider`,`stop`,`mutation`,e),getStatus:e=>t(`deviceProvider`,`getStatus`,`query`,e),getDevices:e=>t(`deviceProvider`,`getDevices`,`query`,e),reloadDevice:e=>t(`deviceProvider`,`reloadDevice`,`mutation`,e),supportsDiscovery:e=>t(`deviceProvider`,`supportsDiscovery`,`query`,e),discoverDevices:e=>t(`deviceProvider`,`discoverDevices`,`mutation`,e),getDiscoveryParamsSchema:e=>t(`deviceProvider`,`getDiscoveryParamsSchema`,`query`,e),getManualCreationType:e=>t(`deviceProvider`,`getManualCreationType`,`query`,e),adoptDiscoveredDevice:e=>t(`deviceProvider`,`adoptDiscoveredDevice`,`mutation`,e),supportsManualCreation:e=>t(`deviceProvider`,`supportsManualCreation`,`query`,e),getChildCreationSchema:e=>t(`deviceProvider`,`getChildCreationSchema`,`query`,e),createDevice:e=>t(`deviceProvider`,`createDevice`,`mutation`,e),testCreationField:e=>t(`deviceProvider`,`testCreationField`,`mutation`,e)},deviceState:{getAllSnapshots:e=>t(`deviceState`,`getAllSnapshots`,`query`,e),listClaims:e=>t(`deviceState`,`listClaims`,`query`,e)},displayPalette:{getPalette:e=>t(`displayPalette`,`getPalette`,`query`,e),listPresets:e=>t(`displayPalette`,`listPresets`,`query`,e),setPalette:e=>t(`displayPalette`,`setPalette`,`mutation`,e)},faceGallery:{listIdentities:e=>t(`faceGallery`,`listIdentities`,`query`,e),createIdentity:e=>t(`faceGallery`,`createIdentity`,`mutation`,e),renameIdentity:e=>t(`faceGallery`,`renameIdentity`,`mutation`,e),deleteIdentity:e=>t(`faceGallery`,`deleteIdentity`,`mutation`,e),listIdentitySamples:e=>t(`faceGallery`,`listIdentitySamples`,`query`,e),auditIdentitySamples:e=>t(`faceGallery`,`auditIdentitySamples`,`query`,e),removeSample:e=>t(`faceGallery`,`removeSample`,`mutation`,e),getFaceMedia:e=>t(`faceGallery`,`getFaceMedia`,`query`,e),assignFace:e=>t(`faceGallery`,`assignFace`,`mutation`,e),unassignFace:e=>t(`faceGallery`,`unassignFace`,`mutation`,e),deleteFace:e=>t(`faceGallery`,`deleteFace`,`mutation`,e),assignFaces:e=>t(`faceGallery`,`assignFaces`,`mutation`,e),unassignFaces:e=>t(`faceGallery`,`unassignFaces`,`mutation`,e),suggestFaceClusters:e=>t(`faceGallery`,`suggestFaceClusters`,`query`,e)},integrations:{list:e=>t(`integrations`,`list`,`query`,e),get:e=>t(`integrations`,`get`,`query`,e),getByAddonId:e=>t(`integrations`,`getByAddonId`,`query`,e),create:e=>t(`integrations`,`create`,`mutation`,e),update:e=>t(`integrations`,`update`,`mutation`,e),delete:e=>t(`integrations`,`delete`,`mutation`,e),getSettings:e=>t(`integrations`,`getSettings`,`query`,e),setSettings:e=>t(`integrations`,`setSettings`,`mutation`,e),getAvailableTypes:e=>t(`integrations`,`getAvailableTypes`,`query`,e),testConnection:e=>t(`integrations`,`testConnection`,`mutation`,e)},keychainAdmin:{status:e=>t(`keychainAdmin`,`status`,`query`,e),listSecrets:e=>t(`keychainAdmin`,`listSecrets`,`query`,e),listAudit:e=>t(`keychainAdmin`,`listAudit`,`query`,e),reveal:e=>t(`keychainAdmin`,`reveal`,`mutation`,e),setSystemSecret:e=>t(`keychainAdmin`,`setSystemSecret`,`mutation`,e),importSecret:e=>t(`keychainAdmin`,`importSecret`,`mutation`,e),deleteOrphans:e=>t(`keychainAdmin`,`deleteOrphans`,`mutation`,e),rotateMasterKey:e=>t(`keychainAdmin`,`rotateMasterKey`,`mutation`,e),purgeRetiredKeys:e=>t(`keychainAdmin`,`purgeRetiredKeys`,`mutation`,e),downloadRecoveryKey:e=>t(`keychainAdmin`,`downloadRecoveryKey`,`mutation`,e),resetKeychain:e=>t(`keychainAdmin`,`resetKeychain`,`mutation`,e),resetReport:e=>t(`keychainAdmin`,`resetReport`,`query`,e),acknowledgeReset:e=>t(`keychainAdmin`,`acknowledgeReset`,`mutation`,e)},llm:{generate:e=>t(`llm`,`generate`,`mutation`,e),generateVision:e=>t(`llm`,`generateVision`,`mutation`,e),cancel:e=>t(`llm`,`cancel`,`mutation`,e),listProfileKinds:e=>t(`llm`,`listProfileKinds`,`query`,e),listProfiles:e=>t(`llm`,`listProfiles`,`query`,e),upsertProfile:e=>t(`llm`,`upsertProfile`,`mutation`,e),migrateRawSecrets:e=>t(`llm`,`migrateRawSecrets`,`mutation`,e),deleteProfile:e=>t(`llm`,`deleteProfile`,`mutation`,e),testProfile:e=>t(`llm`,`testProfile`,`mutation`,e),listModels:e=>t(`llm`,`listModels`,`mutation`,e),getDefaults:e=>t(`llm`,`getDefaults`,`query`,e),setDefault:e=>t(`llm`,`setDefault`,`mutation`,e),getUsage:e=>t(`llm`,`getUsage`,`query`,e),listModelCatalog:e=>t(`llm`,`listModelCatalog`,`query`,e),listRuntimeNodes:e=>t(`llm`,`listRuntimeNodes`,`query`,e),listNodeModels:e=>t(`llm`,`listNodeModels`,`query`,e),resolveModelRef:e=>t(`llm`,`resolveModelRef`,`mutation`,e),installModel:e=>t(`llm`,`installModel`,`mutation`,e),deleteModel:e=>t(`llm`,`deleteModel`,`mutation`,e),getRuntimeStatus:e=>t(`llm`,`getRuntimeStatus`,`query`,e),startRuntime:e=>t(`llm`,`startRuntime`,`mutation`,e),stopRuntime:e=>t(`llm`,`stopRuntime`,`mutation`,e)},localNetwork:{list:e=>t(`localNetwork`,`list`,`query`,e),getPreferred:e=>t(`localNetwork`,`getPreferred`,`query`,e),getConnectionEndpoints:e=>t(`localNetwork`,`getConnectionEndpoints`,`query`,e),getNotificationEndpoint:e=>t(`localNetwork`,`getNotificationEndpoint`,`query`,e),setNotificationEndpoint:e=>t(`localNetwork`,`setNotificationEndpoint`,`mutation`,e),getViewerEndpoints:e=>t(`localNetwork`,`getViewerEndpoints`,`query`,e),setViewerEndpoints:e=>t(`localNetwork`,`setViewerEndpoints`,`mutation`,e),getAddresses:e=>t(`localNetwork`,`getAddresses`,`query`,e),addCustomAddress:e=>t(`localNetwork`,`addCustomAddress`,`mutation`,e),removeCustomAddress:e=>t(`localNetwork`,`removeCustomAddress`,`mutation`,e),setAddressRole:e=>t(`localNetwork`,`setAddressRole`,`mutation`,e),getHubAddresses:e=>t(`localNetwork`,`getHubAddresses`,`query`,e),getAllowedAddresses:e=>t(`localNetwork`,`getAllowedAddresses`,`query`,e),setAllowedAddresses:e=>t(`localNetwork`,`setAllowedAddresses`,`mutation`,e),resetAllowlistToBestMatch:e=>t(`localNetwork`,`resetAllowlistToBestMatch`,`mutation`,e),getTlsStatus:e=>t(`localNetwork`,`getTlsStatus`,`query`,e),regenerateCertificate:e=>t(`localNetwork`,`regenerateCertificate`,`mutation`,e),uploadCertificate:e=>t(`localNetwork`,`uploadCertificate`,`mutation`,e),downloadCa:e=>t(`localNetwork`,`downloadCa`,`query`,e),useStoredUploadedCertificate:e=>t(`localNetwork`,`useStoredUploadedCertificate`,`mutation`,e),revertToGeneratedCertificate:e=>t(`localNetwork`,`revertToGeneratedCertificate`,`mutation`,e)},meshNetwork:{getStatus:e=>t(`meshNetwork`,`getStatus`,`query`,e),join:e=>t(`meshNetwork`,`join`,`mutation`,e),startLogin:e=>t(`meshNetwork`,`startLogin`,`mutation`,e),leave:e=>t(`meshNetwork`,`leave`,`mutation`,e),logout:e=>t(`meshNetwork`,`logout`,`mutation`,e),listPeers:e=>t(`meshNetwork`,`listPeers`,`query`,e),testConnection:e=>t(`meshNetwork`,`testConnection`,`mutation`,e)},metricsProvider:{collectSnapshot:e=>t(`metricsProvider`,`collectSnapshot`,`query`,e),getCached:e=>t(`metricsProvider`,`getCached`,`query`,e),getCurrent:e=>t(`metricsProvider`,`getCurrent`,`query`,e),getDiskSpace:e=>t(`metricsProvider`,`getDiskSpace`,`query`,e),getGpuInfo:e=>t(`metricsProvider`,`getGpuInfo`,`query`,e),getCpuTemperature:e=>t(`metricsProvider`,`getCpuTemperature`,`query`,e),getProcessStats:e=>t(`metricsProvider`,`getProcessStats`,`query`,e),listAddonInstances:e=>t(`metricsProvider`,`listAddonInstances`,`query`,e),getAddonStats:e=>t(`metricsProvider`,`getAddonStats`,`query`,e),listNodeProcesses:e=>t(`metricsProvider`,`listNodeProcesses`,`query`,e),getLoadSeries:e=>t(`metricsProvider`,`getLoadSeries`,`query`,e)},mqttBroker:{listBrokers:e=>t(`mqttBroker`,`listBrokers`,`query`,e),getBrokerConfig:e=>t(`mqttBroker`,`getBrokerConfig`,`query`,e),addBroker:e=>t(`mqttBroker`,`addBroker`,`mutation`,e),removeBroker:e=>t(`mqttBroker`,`removeBroker`,`mutation`,e),testConnection:e=>t(`mqttBroker`,`testConnection`,`mutation`,e),startEmbeddedBroker:e=>t(`mqttBroker`,`startEmbeddedBroker`,`mutation`,e),stopEmbeddedBroker:e=>t(`mqttBroker`,`stopEmbeddedBroker`,`mutation`,e),getStatus:e=>t(`mqttBroker`,`getStatus`,`query`,e)},networkAccess:{start:e=>t(`networkAccess`,`start`,`mutation`,e),stop:e=>t(`networkAccess`,`stop`,`mutation`,e),getEndpoint:e=>t(`networkAccess`,`getEndpoint`,`query`,e),getStatus:e=>t(`networkAccess`,`getStatus`,`query`,e),listEndpoints:e=>t(`networkAccess`,`listEndpoints`,`query`,e)},networkQuality:{getAllStats:e=>t(`networkQuality`,`getAllStats`,`query`,e)},nodes:{topology:e=>t(`nodes`,`topology`,`query`,e),directory:e=>t(`nodes`,`directory`,`query`,e),deployAddon:e=>t(`nodes`,`deployAddon`,`mutation`,e),undeployAddon:e=>t(`nodes`,`undeployAddon`,`mutation`,e),restartAddon:e=>t(`nodes`,`restartAddon`,`mutation`,e),restartProcess:e=>t(`nodes`,`restartProcess`,`mutation`,e),restartNode:e=>t(`nodes`,`restartNode`,`mutation`,e),shutdownNode:e=>t(`nodes`,`shutdownNode`,`mutation`,e),renameNode:e=>t(`nodes`,`renameNode`,`mutation`,e),clusterAddonStatus:e=>t(`nodes`,`clusterAddonStatus`,`query`,e),getCapUsageGraph:e=>t(`nodes`,`getCapUsageGraph`,`query`,e),getNodeAddons:e=>t(`nodes`,`getNodeAddons`,`query`,e),setProcessLogLevel:e=>t(`nodes`,`setProcessLogLevel`,`mutation`,e),executeQuery:e=>t(`nodes`,`executeQuery`,`mutation`,e)},notificationOutput:{listTargetKinds:e=>t(`notificationOutput`,`listTargetKinds`,`query`,e),listTargets:e=>t(`notificationOutput`,`listTargets`,`query`,e),getTarget:e=>t(`notificationOutput`,`getTarget`,`query`,e),discoverTargets:e=>t(`notificationOutput`,`discoverTargets`,`query`,e),probeTargetConfig:e=>t(`notificationOutput`,`probeTargetConfig`,`mutation`,e),send:e=>t(`notificationOutput`,`send`,`mutation`,e),testTarget:e=>t(`notificationOutput`,`testTarget`,`mutation`,e),upsertTarget:e=>t(`notificationOutput`,`upsertTarget`,`mutation`,e),deleteTarget:e=>t(`notificationOutput`,`deleteTarget`,`mutation`,e),setTargetEnabled:e=>t(`notificationOutput`,`setTargetEnabled`,`mutation`,e)},notificationRules:{listRules:e=>t(`notificationRules`,`listRules`,`query`,e),getRule:e=>t(`notificationRules`,`getRule`,`query`,e),createRule:e=>t(`notificationRules`,`createRule`,`mutation`,e),updateRule:e=>t(`notificationRules`,`updateRule`,`mutation`,e),deleteRule:e=>t(`notificationRules`,`deleteRule`,`mutation`,e),setRuleEnabled:e=>t(`notificationRules`,`setRuleEnabled`,`mutation`,e),listSequences:e=>t(`notificationRules`,`listSequences`,`query`,e),getSequence:e=>t(`notificationRules`,`getSequence`,`query`,e),createSequence:e=>t(`notificationRules`,`createSequence`,`mutation`,e),updateSequence:e=>t(`notificationRules`,`updateSequence`,`mutation`,e),deleteSequence:e=>t(`notificationRules`,`deleteSequence`,`mutation`,e),getClipRetentionAsks:e=>t(`notificationRules`,`getClipRetentionAsks`,`query`,e),listDeviceMutes:e=>t(`notificationRules`,`listDeviceMutes`,`query`,e),testRule:e=>t(`notificationRules`,`testRule`,`mutation`,e),previewStateSummary:e=>t(`notificationRules`,`previewStateSummary`,`mutation`,e),getConditionCatalog:e=>t(`notificationRules`,`getConditionCatalog`,`query`,e),getTemplateCatalog:e=>t(`notificationRules`,`getTemplateCatalog`,`query`,e),previewTemplate:e=>t(`notificationRules`,`previewTemplate`,`mutation`,e),getHistory:e=>t(`notificationRules`,`getHistory`,`query`,e),getRuleLastRuns:e=>t(`notificationRules`,`getRuleLastRuns`,`query`,e),resolveArtifactUrl:e=>t(`notificationRules`,`resolveArtifactUrl`,`query`,e),listSnoozes:e=>t(`notificationRules`,`listSnoozes`,`query`,e),createSnooze:e=>t(`notificationRules`,`createSnooze`,`mutation`,e),cancelSnooze:e=>t(`notificationRules`,`cancelSnooze`,`mutation`,e),getAlarmConfig:e=>t(`notificationRules`,`getAlarmConfig`,`query`,e),setAlarmConfig:e=>t(`notificationRules`,`setAlarmConfig`,`mutation`,e),createAlarmProfile:e=>t(`notificationRules`,`createAlarmProfile`,`mutation`,e),renameAlarmProfile:e=>t(`notificationRules`,`renameAlarmProfile`,`mutation`,e),deleteAlarmProfile:e=>t(`notificationRules`,`deleteAlarmProfile`,`mutation`,e),activateAlarmProfile:e=>t(`notificationRules`,`activateAlarmProfile`,`mutation`,e),getAlarmSensors:e=>t(`notificationRules`,`getAlarmSensors`,`query`,e)},oidcConnections:{connectionFormSchema:e=>t(`oidcConnections`,`connectionFormSchema`,`query`,e),listConnections:e=>t(`oidcConnections`,`listConnections`,`query`,e),createConnection:e=>t(`oidcConnections`,`createConnection`,`mutation`,e),updateConnection:e=>t(`oidcConnections`,`updateConnection`,`mutation`,e),deleteConnection:e=>t(`oidcConnections`,`deleteConnection`,`mutation`,e)},osdManager:{getConditionSupport:e=>t(`osdManager`,`getConditionSupport`,`query`,e),copyDeviceConfiguration:e=>t(`osdManager`,`copyDeviceConfiguration`,`mutation`,e),listTemplates:e=>t(`osdManager`,`listTemplates`,`query`,e),upsertTemplate:e=>t(`osdManager`,`upsertTemplate`,`mutation`,e),deleteTemplate:e=>t(`osdManager`,`deleteTemplate`,`mutation`,e)},pipelineExecutor:{getAvailableEngines:e=>t(`pipelineExecutor`,`getAvailableEngines`,`query`,e),getSelectedEngine:e=>t(`pipelineExecutor`,`getSelectedEngine`,`query`,e),getEngineProvisioning:e=>t(`pipelineExecutor`,`getEngineProvisioning`,`query`,e),getVideoPipelineSteps:e=>t(`pipelineExecutor`,`getVideoPipelineSteps`,`query`,e),setVideoPipelineSteps:e=>t(`pipelineExecutor`,`setVideoPipelineSteps`,`mutation`,e),getInferenceDeviceHealth:e=>t(`pipelineExecutor`,`getInferenceDeviceHealth`,`query`,e),rearmInferenceDevice:e=>t(`pipelineExecutor`,`rearmInferenceDevice`,`mutation`,e),getSchema:e=>t(`pipelineExecutor`,`getSchema`,`query`,e),getOrchestratorConfigSchema:e=>t(`pipelineExecutor`,`getOrchestratorConfigSchema`,`query`,e),validatePipeline:e=>t(`pipelineExecutor`,`validatePipeline`,`query`,e),getCapabilities:e=>t(`pipelineExecutor`,`getCapabilities`,`query`,e),getAddonModels:e=>t(`pipelineExecutor`,`getAddonModels`,`query`,e),downloadModel:e=>t(`pipelineExecutor`,`downloadModel`,`mutation`,e),deleteModel:e=>t(`pipelineExecutor`,`deleteModel`,`mutation`,e),cacheFrameInPool:e=>t(`pipelineExecutor`,`cacheFrameInPool`,`mutation`,e),inferCached:e=>t(`pipelineExecutor`,`inferCached`,`mutation`,e),uncacheFrame:e=>t(`pipelineExecutor`,`uncacheFrame`,`mutation`,e),getEffectiveTuning:e=>t(`pipelineExecutor`,`getEffectiveTuning`,`query`,e),listLoadedEngines:e=>t(`pipelineExecutor`,`listLoadedEngines`,`query`,e),spinEngine:e=>t(`pipelineExecutor`,`spinEngine`,`mutation`,e),killEngine:e=>t(`pipelineExecutor`,`killEngine`,`mutation`,e),listReferenceImages:e=>t(`pipelineExecutor`,`listReferenceImages`,`query`,e),getReferenceImage:e=>t(`pipelineExecutor`,`getReferenceImage`,`query`,e),getReferenceAudioFiles:e=>t(`pipelineExecutor`,`getReferenceAudioFiles`,`query`,e),getReferenceAudio:e=>t(`pipelineExecutor`,`getReferenceAudio`,`query`,e),getAudioCapabilities:e=>t(`pipelineExecutor`,`getAudioCapabilities`,`query`,e),runAudioTest:e=>t(`pipelineExecutor`,`runAudioTest`,`mutation`,e),getDetectionConfigSchema:e=>t(`pipelineExecutor`,`getDetectionConfigSchema`,`query`,e)},pipelineOrchestrator:{requestOccupancyLook:e=>t(`pipelineOrchestrator`,`requestOccupancyLook`,`mutation`,e),pauseForStorageMigration:e=>t(`pipelineOrchestrator`,`pauseForStorageMigration`,`mutation`,e),resumeForStorageMigration:e=>t(`pipelineOrchestrator`,`resumeForStorageMigration`,`mutation`,e),rebalance:e=>t(`pipelineOrchestrator`,`rebalance`,`mutation`,e),getPipelineAssignments:e=>t(`pipelineOrchestrator`,`getPipelineAssignments`,`query`,e),getAgentLoad:e=>t(`pipelineOrchestrator`,`getAgentLoad`,`query`,e),getClusterModelChoice:e=>t(`pipelineOrchestrator`,`getClusterModelChoice`,`query`,e),getGlobalMetrics:e=>t(`pipelineOrchestrator`,`getGlobalMetrics`,`query`,e),getCapabilityBindings:e=>t(`pipelineOrchestrator`,`getCapabilityBindings`,`query`,e),setCapabilityBinding:e=>t(`pipelineOrchestrator`,`setCapabilityBinding`,`mutation`,e),getIngestOwner:e=>t(`pipelineOrchestrator`,`getIngestOwner`,`query`,e),getAudioNodeLoad:e=>t(`pipelineOrchestrator`,`getAudioNodeLoad`,`query`,e),getAudioAssignments:e=>t(`pipelineOrchestrator`,`getAudioAssignments`,`query`,e),getAgentSettings:e=>t(`pipelineOrchestrator`,`getAgentSettings`,`query`,e),listAgentSettings:e=>t(`pipelineOrchestrator`,`listAgentSettings`,`query`,e),removeAgentSettings:e=>t(`pipelineOrchestrator`,`removeAgentSettings`,`mutation`,e),setAgentMaxCameras:e=>t(`pipelineOrchestrator`,`setAgentMaxCameras`,`mutation`,e),setAgentCapabilities:e=>t(`pipelineOrchestrator`,`setAgentCapabilities`,`mutation`,e),setAgentDecodeLimits:e=>t(`pipelineOrchestrator`,`setAgentDecodeLimits`,`mutation`,e),setAgentReachableHost:e=>t(`pipelineOrchestrator`,`setAgentReachableHost`,`mutation`,e),setAgentInferenceDevices:e=>t(`pipelineOrchestrator`,`setAgentInferenceDevices`,`mutation`,e),setNodeStepSettings:e=>t(`pipelineOrchestrator`,`setNodeStepSettings`,`mutation`,e),getNodeInferenceDevices:e=>t(`pipelineOrchestrator`,`getNodeInferenceDevices`,`query`,e),forgetInferenceDevice:e=>t(`pipelineOrchestrator`,`forgetInferenceDevice`,`mutation`,e),resetNodePipelineDefaults:e=>t(`pipelineOrchestrator`,`resetNodePipelineDefaults`,`mutation`,e),planAutoTune:e=>t(`pipelineOrchestrator`,`planAutoTune`,`query`,e),applyAutoTune:e=>t(`pipelineOrchestrator`,`applyAutoTune`,`mutation`,e),setLoadBalancingShares:e=>t(`pipelineOrchestrator`,`setLoadBalancingShares`,`mutation`,e),getPlacementStats:e=>t(`pipelineOrchestrator`,`getPlacementStats`,`query`,e),suggestShares:e=>t(`pipelineOrchestrator`,`suggestShares`,`query`,e),getEffectiveShares:e=>t(`pipelineOrchestrator`,`getEffectiveShares`,`query`,e),setShareSource:e=>t(`pipelineOrchestrator`,`setShareSource`,`mutation`,e),getNodeBenchmarkPreflight:e=>t(`pipelineOrchestrator`,`getNodeBenchmarkPreflight`,`query`,e),startNodeBenchmark:e=>t(`pipelineOrchestrator`,`startNodeBenchmark`,`mutation`,e),getNodeBenchmarkStatus:e=>t(`pipelineOrchestrator`,`getNodeBenchmarkStatus`,`query`,e),abortNodeBenchmark:e=>t(`pipelineOrchestrator`,`abortNodeBenchmark`,`mutation`,e),getNodeBenchmarkCandidates:e=>t(`pipelineOrchestrator`,`getNodeBenchmarkCandidates`,`query`,e),listNodeBenchmarkResults:e=>t(`pipelineOrchestrator`,`listNodeBenchmarkResults`,`query`,e),deleteNodeBenchmarkResult:e=>t(`pipelineOrchestrator`,`deleteNodeBenchmarkResult`,`mutation`,e),getCameraStatuses:e=>t(`pipelineOrchestrator`,`getCameraStatuses`,`query`,e),setCameraSensors:e=>t(`pipelineOrchestrator`,`setCameraSensors`,`mutation`,e),reconcileFromDisk:e=>t(`pipelineOrchestrator`,`reconcileFromDisk`,`mutation`,e),getReconcileFromDiskStatus:e=>t(`pipelineOrchestrator`,`getReconcileFromDiskStatus`,`query`,e)},pipelineRunner:{attachCamera:e=>t(`pipelineRunner`,`attachCamera`,`mutation`,e),reportMotion:e=>t(`pipelineRunner`,`reportMotion`,`mutation`,e),getLocalLoad:e=>t(`pipelineRunner`,`getLocalLoad`,`query`,e),getLocalMetrics:e=>t(`pipelineRunner`,`getLocalMetrics`,`query`,e),getAllCameraMetrics:e=>t(`pipelineRunner`,`getAllCameraMetrics`,`query`,e),getLocalCameras:e=>t(`pipelineRunner`,`getLocalCameras`,`query`,e),getNativeCrop:e=>t(`pipelineRunner`,`getNativeCrop`,`query`,e),runStatelessStep:e=>t(`pipelineRunner`,`runStatelessStep`,`mutation`,e),startNodeBench:e=>t(`pipelineRunner`,`startNodeBench`,`mutation`,e),getNodeBenchStatus:e=>t(`pipelineRunner`,`getNodeBenchStatus`,`query`,e),abortNodeBench:e=>t(`pipelineRunner`,`abortNodeBench`,`mutation`,e)},plateGallery:{getPlateMedia:e=>t(`plateGallery`,`getPlateMedia`,`query`,e),searchPlates:e=>t(`plateGallery`,`searchPlates`,`query`,e),suggestPlateClusters:e=>t(`plateGallery`,`suggestPlateClusters`,`query`,e),correctPlateText:e=>t(`plateGallery`,`correctPlateText`,`mutation`,e),deletePlate:e=>t(`plateGallery`,`deletePlate`,`mutation`,e),listVehicles:e=>t(`plateGallery`,`listVehicles`,`query`,e),createVehicle:e=>t(`plateGallery`,`createVehicle`,`mutation`,e),renameVehicle:e=>t(`plateGallery`,`renameVehicle`,`mutation`,e),deleteVehicle:e=>t(`plateGallery`,`deleteVehicle`,`mutation`,e),listVehicleSamples:e=>t(`plateGallery`,`listVehicleSamples`,`query`,e),removeVehicleSample:e=>t(`plateGallery`,`removeVehicleSample`,`mutation`,e),assignPlate:e=>t(`plateGallery`,`assignPlate`,`mutation`,e),unassignPlate:e=>t(`plateGallery`,`unassignPlate`,`mutation`,e),assignPlates:e=>t(`plateGallery`,`assignPlates`,`mutation`,e),unassignPlates:e=>t(`plateGallery`,`unassignPlates`,`mutation`,e)},recordEntries:{listEntryKinds:e=>t(`recordEntries`,`listEntryKinds`,`query`,e),listEntries:e=>t(`recordEntries`,`listEntries`,`query`,e),putEntry:e=>t(`recordEntries`,`putEntry`,`mutation`,e),deleteEntry:e=>t(`recordEntries`,`deleteEntry`,`mutation`,e)},recordingArchive:{getAvailabilityBatch:e=>t(`recordingArchive`,`getAvailabilityBatch`,`query`,e),getDaysWithRecordingsBatch:e=>t(`recordingArchive`,`getDaysWithRecordingsBatch`,`query`,e),getStorageUsage:e=>t(`recordingArchive`,`getStorageUsage`,`query`,e),listOpsLog:e=>t(`recordingArchive`,`listOpsLog`,`query`,e),pauseForStorageMigration:e=>t(`recordingArchive`,`pauseForStorageMigration`,`mutation`,e),resumeForStorageMigration:e=>t(`recordingArchive`,`resumeForStorageMigration`,`mutation`,e),refreshStorageLocationsForMigration:e=>t(`recordingArchive`,`refreshStorageLocationsForMigration`,`mutation`,e),startStorageMigrationMove:e=>t(`recordingArchive`,`startStorageMigrationMove`,`mutation`,e),getStorageMigrationMoveStatus:e=>t(`recordingArchive`,`getStorageMigrationMoveStatus`,`query`,e),cancelStorageMigrationMove:e=>t(`recordingArchive`,`cancelStorageMigrationMove`,`mutation`,e),relocateFootage:e=>t(`recordingArchive`,`relocateFootage`,`mutation`,e),listRelocateJobs:e=>t(`recordingArchive`,`listRelocateJobs`,`query`,e),getRelocateResidue:e=>t(`recordingArchive`,`getRelocateResidue`,`query`,e),reconcileLedgerAgainstDisk:e=>t(`recordingArchive`,`reconcileLedgerAgainstDisk`,`mutation`,e),cancelRelocateJob:e=>t(`recordingArchive`,`cancelRelocateJob`,`mutation`,e),planStorageRebalance:e=>t(`recordingArchive`,`planStorageRebalance`,`query`,e),startStorageRebalance:e=>t(`recordingArchive`,`startStorageRebalance`,`mutation`,e),getPlacement:e=>t(`recordingArchive`,`getPlacement`,`query`,e),setDevicePlacement:e=>t(`recordingArchive`,`setDevicePlacement`,`mutation`,e)},recordingExport:{createExport:e=>t(`recordingExport`,`createExport`,`mutation`,e),getExport:e=>t(`recordingExport`,`getExport`,`query`,e),cancelExport:e=>t(`recordingExport`,`cancelExport`,`mutation`,e),deleteExport:e=>t(`recordingExport`,`deleteExport`,`mutation`,e),getDownloadUrl:e=>t(`recordingExport`,`getDownloadUrl`,`query`,e),readExportBytes:e=>t(`recordingExport`,`readExportBytes`,`query`,e)},serverManagement:{getServerPackageStatus:e=>t(`serverManagement`,`getServerPackageStatus`,`query`,e),checkServerUpdate:e=>t(`serverManagement`,`checkServerUpdate`,`mutation`,e),applyServerUpdate:e=>t(`serverManagement`,`applyServerUpdate`,`mutation`,e),rollbackServerUpdate:e=>t(`serverManagement`,`rollbackServerUpdate`,`mutation`,e),restartServer:e=>t(`serverManagement`,`restartServer`,`mutation`,e)},settingsStore:{get:e=>t(`settingsStore`,`get`,`query`,e),set:e=>t(`settingsStore`,`set`,`mutation`,e),query:e=>t(`settingsStore`,`query`,`query`,e),upsert:e=>t(`settingsStore`,`upsert`,`mutation`,e),upsertMany:e=>t(`settingsStore`,`upsertMany`,`mutation`,e),insert:e=>t(`settingsStore`,`insert`,`mutation`,e),insertMany:e=>t(`settingsStore`,`insertMany`,`mutation`,e),transact:e=>t(`settingsStore`,`transact`,`mutation`,e),update:e=>t(`settingsStore`,`update`,`mutation`,e),delete:e=>t(`settingsStore`,`delete`,`mutation`,e),deleteWhere:e=>t(`settingsStore`,`deleteWhere`,`mutation`,e),updateWhere:e=>t(`settingsStore`,`updateWhere`,`mutation`,e),count:e=>t(`settingsStore`,`count`,`query`,e),aggregate:e=>t(`settingsStore`,`aggregate`,`query`,e),histogram:e=>t(`settingsStore`,`histogram`,`query`,e),isEmpty:e=>t(`settingsStore`,`isEmpty`,`query`,e),declareCollection:e=>t(`settingsStore`,`declareCollection`,`mutation`,e)},storage:{resolve:e=>t(`storage`,`resolve`,`query`,e),write:e=>t(`storage`,`write`,`mutation`,e),read:e=>t(`storage`,`read`,`query`,e),exists:e=>t(`storage`,`exists`,`query`,e),list:e=>t(`storage`,`list`,`query`,e),delete:e=>t(`storage`,`delete`,`mutation`,e),getAvailableSpace:e=>t(`storage`,`getAvailableSpace`,`query`,e),beginUpload:e=>t(`storage`,`beginUpload`,`mutation`,e),writeChunk:e=>t(`storage`,`writeChunk`,`mutation`,e),finalizeUpload:e=>t(`storage`,`finalizeUpload`,`mutation`,e),abortUpload:e=>t(`storage`,`abortUpload`,`mutation`,e),beginDownload:e=>t(`storage`,`beginDownload`,`mutation`,e),readChunk:e=>t(`storage`,`readChunk`,`query`,e),endDownload:e=>t(`storage`,`endDownload`,`mutation`,e),listLocations:e=>t(`storage`,`listLocations`,`query`,e),listLocationDeclarations:e=>t(`storage`,`listLocationDeclarations`,`query`,e),upsertLocation:e=>t(`storage`,`upsertLocation`,`mutation`,e),deleteLocation:e=>t(`storage`,`deleteLocation`,`mutation`,e),listDrainProgress:e=>t(`storage`,`listDrainProgress`,`query`,e),testLocation:e=>t(`storage`,`testLocation`,`query`,e),listProviders:e=>t(`storage`,`listProviders`,`query`,e),testConfig:e=>t(`storage`,`testConfig`,`query`,e)},storageMigration:{plan:e=>t(`storageMigration`,`plan`,`query`,e),start:e=>t(`storageMigration`,`start`,`mutation`,e),status:e=>t(`storageMigration`,`status`,`query`,e),cancel:e=>t(`storageMigration`,`cancel`,`mutation`,e),movers:e=>t(`storageMigration`,`movers`,`query`,e),moverClearance:e=>t(`storageMigration`,`moverClearance`,`query`,e),residue:e=>t(`storageMigration`,`residue`,`query`,e),drain:e=>t(`storageMigration`,`drain`,`mutation`,e),cleanupStart:e=>t(`storageMigration`,`cleanupStart`,`mutation`,e),cleanupStatus:e=>t(`storageMigration`,`cleanupStatus`,`query`,e),cleanupCancel:e=>t(`storageMigration`,`cleanupCancel`,`mutation`,e),history:e=>t(`storageMigration`,`history`,`query`,e)},streamBroker:{fetchEventMedia:e=>t(`streamBroker`,`fetchEventMedia`,`mutation`,e),listAllCameraStreams:e=>t(`streamBroker`,`listAllCameraStreams`,`query`,e),listAllProfileSlots:e=>t(`streamBroker`,`listAllProfileSlots`,`query`,e),getBrokerStats:e=>t(`streamBroker`,`getBrokerStats`,`query`,e),probeStream:e=>t(`streamBroker`,`probeStream`,`mutation`,e),listClients:e=>t(`streamBroker`,`listClients`,`query`,e),getLiveViewerCounts:e=>t(`streamBroker`,`getLiveViewerCounts`,`query`,e),killClient:e=>t(`streamBroker`,`killClient`,`mutation`,e),getStreamUrl:e=>t(`streamBroker`,`getStreamUrl`,`query`,e),getStreamWithCodec:e=>t(`streamBroker`,`getStreamWithCodec`,`mutation`,e),releaseStreamWithCodec:e=>t(`streamBroker`,`releaseStreamWithCodec`,`mutation`,e),acquireEgressTranscode:e=>t(`streamBroker`,`acquireEgressTranscode`,`mutation`,e),releaseEgressTranscode:e=>t(`streamBroker`,`releaseEgressTranscode`,`mutation`,e),subscribeAudioChunks:e=>t(`streamBroker`,`subscribeAudioChunks`,`mutation`,e),pullAudioChunks:e=>t(`streamBroker`,`pullAudioChunks`,`query`,e),unsubscribeAudioChunks:e=>t(`streamBroker`,`unsubscribeAudioChunks`,`mutation`,e),setPreBufferDuration:e=>t(`streamBroker`,`setPreBufferDuration`,`mutation`,e),getPreBufferInfo:e=>t(`streamBroker`,`getPreBufferInfo`,`query`,e),getRtspPort:e=>t(`streamBroker`,`getRtspPort`,`query`,e),getAllRtspEntries:e=>t(`streamBroker`,`getAllRtspEntries`,`query`,e),getRtspEntry:e=>t(`streamBroker`,`getRtspEntry`,`query`,e),regenerateRtspToken:e=>t(`streamBroker`,`regenerateRtspToken`,`mutation`,e),setRtspEnabled:e=>t(`streamBroker`,`setRtspEnabled`,`mutation`,e),isRtspEnabled:e=>t(`streamBroker`,`isRtspEnabled`,`query`,e)},system:{info:e=>t(`system`,`info`,`query`,e),health:e=>t(`system`,`health`,`query`,e),featureFlags:e=>t(`system`,`featureFlags`,`query`,e),networkAddresses:e=>t(`system`,`networkAddresses`,`query`,e),getRetentionConfig:e=>t(`system`,`getRetentionConfig`,`query`,e),setRetentionConfig:e=>t(`system`,`setRetentionConfig`,`mutation`,e),forceRetentionCleanup:e=>t(`system`,`forceRetentionCleanup`,`mutation`,e),getSiteLocation:e=>t(`system`,`getSiteLocation`,`query`,e),setSiteLocation:e=>t(`system`,`setSiteLocation`,`mutation`,e),detectSiteLocation:e=>t(`system`,`detectSiteLocation`,`mutation`,e),getRequestCensus:e=>t(`system`,`getRequestCensus`,`query`,e),getLoadContributions:e=>t(`system`,`getLoadContributions`,`query`,e),getFailureContributions:e=>t(`system`,`getFailureContributions`,`query`,e),getLoggingSettings:e=>t(`system`,`getLoggingSettings`,`query`,e),setLoggingSettings:e=>t(`system`,`setLoggingSettings`,`mutation`,e)},terminalSession:{listProfiles:e=>t(`terminalSession`,`listProfiles`,`query`,e),listInstances:e=>t(`terminalSession`,`listInstances`,`query`,e),createInstance:e=>t(`terminalSession`,`createInstance`,`mutation`,e),updateInstance:e=>t(`terminalSession`,`updateInstance`,`mutation`,e),deleteInstance:e=>t(`terminalSession`,`deleteInstance`,`mutation`,e),setInstanceEnabled:e=>t(`terminalSession`,`setInstanceEnabled`,`mutation`,e),listLegacyCameras:e=>t(`terminalSession`,`listLegacyCameras`,`query`,e),adoptLegacyMonitor:e=>t(`terminalSession`,`adoptLegacyMonitor`,`mutation`,e),listSessions:e=>t(`terminalSession`,`listSessions`,`query`,e),openSession:e=>t(`terminalSession`,`openSession`,`mutation`,e),resize:e=>t(`terminalSession`,`resize`,`mutation`,e),pullOutput:e=>t(`terminalSession`,`pullOutput`,`mutation`,e),writeInput:e=>t(`terminalSession`,`writeInput`,`mutation`,e),close:e=>t(`terminalSession`,`close`,`mutation`,e)},toast:{onToast:(e,n)=>t(`toast`,`onToast`,`subscription`,e,n)},training:{listBaseModels:e=>t(`training`,`listBaseModels`,`query`,e),planJob:e=>t(`training`,`planJob`,`query`,e),startJob:e=>t(`training`,`startJob`,`mutation`,e),startJobBatch:e=>t(`training`,`startJobBatch`,`mutation`,e),listJobs:e=>t(`training`,`listJobs`,`query`,e),getJob:e=>t(`training`,`getJob`,`query`,e),cancelJob:e=>t(`training`,`cancelJob`,`mutation`,e),getJobResult:e=>t(`training`,`getJobResult`,`query`,e),listCanaryTargets:e=>t(`training`,`listCanaryTargets`,`query`,e),registerResult:e=>t(`training`,`registerResult`,`mutation`,e),canaryResult:e=>t(`training`,`canaryResult`,`mutation`,e),rollbackCanary:e=>t(`training`,`rollbackCanary`,`mutation`,e),discardResult:e=>t(`training`,`discardResult`,`mutation`,e)},turnProvider:{getTurnServers:e=>t(`turnProvider`,`getTurnServers`,`query`,e)},userManagement:{listUsers:e=>t(`userManagement`,`listUsers`,`query`,e),createUser:e=>t(`userManagement`,`createUser`,`mutation`,e),updateUser:e=>t(`userManagement`,`updateUser`,`mutation`,e),deleteUser:e=>t(`userManagement`,`deleteUser`,`mutation`,e),resetPassword:e=>t(`userManagement`,`resetPassword`,`mutation`,e),setUserScopes:e=>t(`userManagement`,`setUserScopes`,`mutation`,e),validateCredentials:e=>t(`userManagement`,`validateCredentials`,`mutation`,e),setupTotp:e=>t(`userManagement`,`setupTotp`,`mutation`,e),confirmTotp:e=>t(`userManagement`,`confirmTotp`,`mutation`,e),disableTotp:e=>t(`userManagement`,`disableTotp`,`mutation`,e),getTotpStatus:e=>t(`userManagement`,`getTotpStatus`,`query`,e),migrateRawSecrets:e=>t(`userManagement`,`migrateRawSecrets`,`mutation`,e),verifyTotp:e=>t(`userManagement`,`verifyTotp`,`mutation`,e),oauthIssueCode:e=>t(`userManagement`,`oauthIssueCode`,`mutation`,e),oauthExchangeCode:e=>t(`userManagement`,`oauthExchangeCode`,`mutation`,e),oauthRefresh:e=>t(`userManagement`,`oauthRefresh`,`mutation`,e),oauthVerifyAccessToken:e=>t(`userManagement`,`oauthVerifyAccessToken`,`query`,e),listExternalIdentities:e=>t(`userManagement`,`listExternalIdentities`,`query`,e),findUserByExternalIdentity:e=>t(`userManagement`,`findUserByExternalIdentity`,`query`,e),unlinkExternalIdentity:e=>t(`userManagement`,`unlinkExternalIdentity`,`mutation`,e),listOauthSessions:e=>t(`userManagement`,`listOauthSessions`,`query`,e),revokeOauthSession:e=>t(`userManagement`,`revokeOauthSession`,`mutation`,e)}}}var q3=`2026-09-11T00:00:00.000Z`,J3=Date.parse(q3),Y3={PCMU:20*Math.log10(4),PCMA:20*Math.log10(8)};function X3(e,t){return t+Y3[e]}function Sme(e){return!Number.isFinite(e)||e<=0?`unknown`:e>=J3?`itu`:`pre-itu`}var Z3=`audio-`;function Q3(e){return e.startsWith(Z3)?e.slice(6):e}function $3(e){return e.startsWith(Z3)?e:`${Z3}${e}`}var Cme=-96,wme=0,Tme=3,e6=Math.round(X3(`PCMU`,-55)),Eme=1,Dme=100,Ome=1,kme=300,Ame=2,jme=5,Mme=1,Nme=20,Pme=1,Fme=60,t6={hitPercent:60,samplingSeconds:10};function n6(e){return e??t6}function Ime(e){return e===void 0?null:e.labels!==void 0&&e.labels.length>0?`label`:e.dbThreshold===void 0?null:`level`}function Lme(e){return e===void 0?!1:e.dbThreshold===void 0&&(e.labels===void 0||e.labels.length===0)}function r6(e,t,n){return Number.isFinite(e)?Math.min(n,Math.max(t,Math.round(e))):t}function i6(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function Rme(e,t){let n=n6(e),r=i6(t,`labels`)?t.labels:n.labels,i=i6(t,`dbThreshold`)?t.dbThreshold:n.dbThreshold,a=r!==void 0&&r.length>0,o=t.mode??(i6(t,`labels`)&&a?`label`:i6(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`?e6:void 0):void 0;return{...s===void 0?{}:{labels:[...s]},...c===void 0?{}:{dbThreshold:r6(c,-96,0)},hitPercent:r6(t.hitPercent??n.hitPercent,1,100),samplingSeconds:r6(t.samplingSeconds??n.samplingSeconds,1,300),...(()=>{let e=i6(t,`confirmHits`)?t.confirmHits:n.confirmHits,r=i6(t,`confirmWindowSec`)?t.confirmWindowSec:n.confirmWindowSec;return{...e===void 0?{}:{confirmHits:r6(e,1,20)},...r===void 0?{}:{confirmWindowSec:r6(r,1,60)}}})()}}function zme(e,t){let n=e?.audioKinds??[],r=n.length>0?n.map(e=>{let t=Q3(e.kind);return{value:t,label:e.label,iconId:$3(t),unknown:!1}}):gj.map(e=>({value:e.id,label:e.name,iconId:$3(e.id),unknown:!1})),i=new Set(r.map(e=>e.value)),a=[];for(let e of t??[]){let t=Q3(e);i.has(t)||a.includes(t)||(a.push(t),r.push({value:t,label:t,iconId:$3(t),unknown:!0}))}return{choices:r,unknownLabels:a}}function a6(e,t){let n=Q3(t);return(e??[]).some(e=>Q3(e)===n)}function Bme(e,t){let n=Q3(t),r=e??[];if(a6(r,n)){let e=r.filter(e=>Q3(e)!==n);return e.length>0?e:void 0}return[...r,n]}var Vme=new Set([`classes`,`classesExclude`]),Hme=new Set([`sensorKinds`]),Ume=new Set([`occupancy`]);function o6(e){return{value:e.kind,label:e.label}}function Wme(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(o6(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 Gme(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,[o6(r)]),t.push(e)):i.push(o6(r))}return t.flatMap(e=>{let t=n.get(e);return t===void 0?[]:[{key:e,fallbackLabel:e,options:t}]})}function s6(e,t){if(!t)return null;if(Vme.has(e)){let e=Wme(t.videoClasses);return t.audioKinds.length>0&&e.push({key:`audio`,fallbackLabel:`Audio`,options:t.audioKinds.map(o6)}),e.length>0?{groups:e}:null}if(Ume.has(e)){let e=t.videoClasses.filter(e=>e.parentKind===null).map(o6);return e.length>0?{groups:[{key:`macro`,fallbackLabel:`Classes`,options:e}]}:null}if(Hme.has(e)){let e=Gme(t.labels);return e.length>0?{groups:e}:null}return null}var c6=`audio`;function Kme(e){let t=s6(`classes`,e);if(t===null)return null;let n=t.groups.filter(e=>e.key!==c6);return n.length>0?{groups:n}:null}function qme(e){return e.trim().toLowerCase().startsWith(`${c6}-`)}function Jme(e){let t=new Set;for(let n of e.groups)for(let e of n.options)t.add(e.value);return t}var l6=[`devices`,`classes`],Yme=new Set(l6);function Xme(e){return Yme.has(e)}function u6(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 Zme=[[/ /g,` `],[/&/g,`&`],[/</g,`<`],[/>/g,`>`],[/"/g,`"`],[/'/g,`'`]];function d6(e){let t=e.replace(/<\s*br\s*\/?\s*>/gi,`
|
|
644
|
+
`).replace(/<\s*\/\s*(p|div|li|h[1-6])\s*>/gi,`
|
|
645
|
+
`).replace(/<[^>]+>/g,``);for(let[e,n]of Zme)t=t.replace(e,n);return t.replace(/\n{3,}/g,`
|
|
646
|
+
|
|
647
|
+
`).trim()}var Qme=[[/&/g,`&`],[/</g,`<`],[/>/g,`>`],[/"/g,`"`],[/'/g,`'`]];function f6(e){let t=e;for(let[e,n]of Qme)t=t.replace(e,n);return t}function p6(e){return f6(e).replace(/\n/g,`<br>`)}function m6(e){return f6(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 h6={text:[`text`,`markdown`,`html`],markdown:[`markdown`,`html`,`text`],html:[`html`,`text`,`markdown`]};function g6(e,t){for(let n of h6[e]??h6.text)if(t.includes(n))return n;return t[0]??`text`}function _6(e,t,n){if(t===n)return e;if(n===`text`){if(t===`markdown`)return u6(e);if(t===`html`)return d6(e)}if(n===`html`){if(t===`text`)return p6(e);if(t===`markdown`)return m6(e)}if(n===`markdown`){if(t===`text`)return e;if(t===`html`)return d6(e)}return e}function v6(e){return{id:e.id,ordinal:e.ordinal,...e.flags?{flags:e.flags}:{},...e.requires?{requires:e.requires}:{}}}function $me(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 v6(n)}let n=e.filter(e=>e.ordinal!==null);if(n.length===0)return v6(e[0]);let r=t.priority;return v6([...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 ehe(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 the(e,t){let n=[],r=t.format,i=g6(r,e.format);i!==r&&n.push(`format`);let a=_6(t.body,r,i),o=$me(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,_=ehe(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 nhe=new Set(_M),y6=[`deviceIds`,`deviceTypes`,`nodeIds`,`packageNames`,`consumableLowPercent`];function b6(e,t){if(nhe.has(e))return!1;switch(t){case`deviceIds`:return e.startsWith(`device-`)||e.startsWith(`stream-`)||e===`detection-blind`||e.startsWith(`motion-`)||e.startsWith(`package-llm-`)||e.startsWith(`recording-`)||e===`alarm-triggered`;case`deviceTypes`:return e.startsWith(`device-`)||e===`detection-blind`||e.startsWith(`motion-`)||e.startsWith(`package-llm-`);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`||e.startsWith(`storage-location-`)||e.startsWith(`alert-`);case`packageNames`:return e.endsWith(`update-available`)||e===`addon-updated`||e===`node-updating`||e===`server-updated`;case`consumableLowPercent`:return yM.includes(e)}}function rhe(e,t){return e.some(e=>b6(e,t))}var x6=[`device-events`,`system`,`alarm`];function S6(e){return x6.some(t=>t===e)}var C6={"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`,"stream-online":`device-events`,"stream-offline":`device-events`,"detection-blind":`device-events`,"motion-noisy":`device-events`,"motion-calm":`device-events`,"package-llm-silent":`device-events`,"package-llm-answered":`device-events`,"recording-stalled":`device-events`,"recording-healthy":`device-events`,"recording-degraded":`device-events`,"device-attention-required":`device-events`,"device-attention-resolved":`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`,"alert-critical":`system`,"alert-error":`system`,"alert-critical-resolved":`system`,"rule-broken":`system`,"rule-repaired":`system`,"storage-location-low":`system`,"storage-location-critical":`system`,"storage-location-ok":`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},ihe=new Map(Object.entries(C6)),w6=[...y6,`excludeDeviceIds`],T6={"device-events":[`deviceIds`,`excludeDeviceIds`,`deviceTypes`,`consumableLowPercent`],system:[`nodeIds`,`packageNames`],alarm:[`deviceIds`]},E6=[{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:`detection-blind`,family:`device-events`,label:`Detecting nothing`,kinds:[`detection-blind`]},{id:`motion-noise`,family:`device-events`,label:`Motion without a subject`,kinds:[`motion-noisy`,`motion-calm`]},{id:`package-llm`,family:`device-events`,label:`Package confirm`,kinds:[`package-llm-silent`,`package-llm-answered`]},{id:`recording`,family:`device-events`,label:`Recording`,kinds:[`recording-stalled`,`recording-healthy`,`recording-degraded`]},{id:`device-attention`,family:`device-events`,label:`Needs attention`,kinds:[`device-attention-required`,`device-attention-resolved`]},{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:`storage`,family:`system`,label:`Storage locations`,kinds:[`storage-location-low`,`storage-location-critical`,`storage-location-ok`]},{id:`alerts`,family:`system`,label:`Alerts`,kinds:[`alert-critical`,`alert-error`,`alert-critical-resolved`]},{id:`rule-health`,family:`system`,label:`Notification rules`,kinds:[`rule-broken`,`rule-repaired`]},{id:`alarm`,family:`alarm`,label:`Alarm`,kinds:vM}];function D6(e){return E6.filter(t=>t.family===e).flatMap(e=>e.kinds)}function O6(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 k6(e){let t=new Set;for(let n of e){let e=ihe.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 ahe(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=C6[r];e===null?t.push({code:`legacy-kind`,kind:r}):n.add(e)}let r=x6.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=T6[i];for(let n of w6)e[n]!==void 0&&!a.includes(n)&&t.push({code:`filter-outside-family`,filter:n,family:i});return t}function ohe(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 A6=[`device-events`,`system`,`alarm`,`mixed`];function j6(e){return A6.some(t=>t===e)}function M6(e){return S6(e)?e:void 0}var she=`An occupancy edge is not a sensor event: it carries no sensor kind, so this condition can never match one.`,che=`An occupancy edge carries no device event-type token — that comes from an event-emitter slice, which a count crossing has none of.`,lhe=`An occupancy edge is a count crossing, not a sensor reading: it has no raise or clear, so this choice could never narrow it.`,uhe=`An occupancy edge is always produced by the pipeline, so any other source can never match and “pipeline” narrows nothing.`,dhe=`A confirmed sound window is always stamped as an audio subject, so any other source can never match.`,N6=`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.`,fhe=`A sound window’s evidence is a percentage of samples, not a detector score, so a confidence threshold can never be satisfied.`,P6=`A sound has no position in the frame, so a zone or a drawn polygon can never match it.`,F6=[{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:she,eventTypeTokens:che,sensorTransition:lhe,source:uhe},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:N6,classesExclude:N6,minConfidence:fhe,zones:P6,zonesExclude:P6,customZones:P6,crossing:P6,labelEquals:N6,identities:N6,identitiesExclude:N6,plates:N6,source:dhe},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 I6(e){return F6.find(t=>t.kind===e)??F6[0]}function phe(e){return F6.filter(t=>t.discriminator===e).map(e=>e.kind)}var L6=`system-event`;function R6(e){return e===L6}function z6(e){switch(e){case`sensor`:return pV;case`detection`:case`occupancy`:return[`detection-pipeline`];case`sound`:return[`audio-metrics`];case`device-events`:case`system`:case`alarm`:case`mixed`:return null}}var B6=`camera-streams`;function mhe(e){let t=z6(e);return t===null?null:e===`sensor`?[t,[B6]]:[t]}function V6(e){return R6(e.delivery)?H6(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 hhe(e){return e.delivery===`immediate`&&V6(e)===`detection`}function H6(e){let t=k6(O6(e)??[]);return t.kind===`family`?t.family:`mixed`}function ghe(e,t,n){let r=I6(n);return e.id===r.discriminator?!0:e.appliesTo.includes(t)?r.excluded[e.id]===void 0:!1}function _he(e,t){let n=I6(t);return e===n.discriminator?null:n.excluded[e]??null}function vhe(e,t){let n=I6(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 U6=[{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 yhe(e){return U6.find(t=>t.key===e)??U6[0]}function bhe(e){return U6.find(t=>t.key===e)?.key}function W6(e){return e.conditions.audio!==void 0}function G6(e){return e.conditions.occupancy!==void 0}function xhe(e,t){return t===`all`?!0:R6(e.delivery)?V6(e)===t:t===`audio`?W6(e):t===`occupancy`?G6(e):t===`sensor`?e.delivery===`device-event`&&!G6(e):t===`detection`?!W6(e)&&!G6(e)&&e.delivery!==`device-event`:!1}function She(e){return R6(e.delivery)?H6(e.conditions.systemEvent):W6(e)?`audio`:G6(e)?`occupancy`:e.delivery===`device-event`?`sensor`:`detection`}var K6={op:`became-occupied`,count:1,sustainSeconds:15},q6={hitPercent:t6.hitPercent,samplingSeconds:t6.samplingSeconds,dbThreshold:e6};function J6(e){switch(e){case`device-events`:return{delivery:L6,conditions:{systemEvent:{kinds:[`device-offline`,`device-online`]}}};case`system`:return{delivery:L6,conditions:{systemEvent:{kinds:[`node-offline`,`node-online`]}}};case`alarm`:return{delivery:L6,conditions:{systemEvent:{kinds:[`alarm-triggered`]}}};case`audio`:return{delivery:`immediate`,conditions:{audio:q6}};case`occupancy`:return{delivery:`device-event`,conditions:{occupancy:K6}};case`sensor`:return{delivery:`device-event`,conditions:{}};default:return{delivery:`immediate`,conditions:{source:`pipeline`}}}}function Che(e){return J6(e).delivery}var Y6=[`rule`,`devices`,`conditions`,`notification`,`actions`,`advanced`],whe={rule:`Rule`,devices:`Cameras`,conditions:`Conditions`,notification:`Notification`,actions:`Actions`,advanced:`Advanced`};function The(e){let t=I6(e),n=[];for(let r of Y6)r===`devices`&&j6(e)||n.push({key:r,label:r===`conditions`?t.label:whe[r]});return n}var X6=[`scene-boxes`,`crop`,`clean`,`none`];function Z6(e){let t=I6(e);return t.carriesMedia?t.carriesSubjectCrop?X6:X6.filter(e=>e!==`crop`):[]}function Q6(e){if(e.zones!==void 0)return e.zones.ids;let t=e.occupancy?.zoneId;return t===void 0?[]:[t]}function $6(e){return e.attach===`none`?`none`:e.zoneCrop===!0||e.frame===`full`?`clean`:e.frame===`boxed`?`scene-boxes`:e.frame===`cropped`?`crop`:e.attach===`keyFrame`?`clean`:`crop`}function e8(e,t){let n=Z6(t);return n.length===0||n.includes(e)?e:e===`crop`?`clean`:e}function t8(e,t){return e.image===void 0?t===`sensor`?`clean`:e8($6(e),t):e8(e.image,t)}function Ehe(e,t){let n=V6(t),r=t8(e,n),{attach:i,frame:a,zoneCrop:o,showTriggerZone:s,showSubjectPath:c,image:l,...u}=e,d=(s===!0||e.image===void 0&&o===!0)&&r!==`crop`&&r!==`none`&&Q6(t.conditions).length>0,f=c===!0&&r!==`none`&&n8(n);return{...u,image:r,...d?{showTriggerZone:!0}:{},...f?{showSubjectPath:!0}:{}}}function n8(e){let t=I6(e);return t.carriesMedia&&t.carriesSubjectCrop}function Dhe(e,t){let n=V6(t);if(e.image!==void 0){let t=Z6(n);if(t.length>0&&!t.includes(e.image))return`media.image '${e.image}' is not available for a ${n} rule (offered: ${t.join(`, `)})`}return e.showTriggerZone===!0&&Q6(t.conditions).length===0?`media.showTriggerZone needs a rule triggered by a zone (a zones condition or an occupancy zone)`:e.showSubjectPath===!0&&!n8(n)?`media.showSubjectPath needs a rule whose subject is a tracked object (not a ${n} rule)`:null}var Ohe={Sun:0,Mon:1,Tue:2,Wed:3,Thu:4,Fri:5,Sat:6},r8=new Map;function khe(e){let t=r8.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 r8.set(e,n),n}function Ahe(e,t){let n=new Date(e),r=t===void 0?null:khe(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:Ohe[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 jhe(e,t){if(e===void 0)return!0;let{day:n,minute:r}=Ahe(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 Mhe=.85,Nhe=.005,Phe=120,i8=e=>e<0?0:e>1?1:e;function Fhe(e,t){return{x:e.x+e.w/2,y:e.y+e.h/2,w:e.w,h:e.h,...t===void 0?{}:{timestamp:t}}}function Ihe(e){return e.w!==void 0&&e.h!==void 0&&e.w>=.85&&e.h>=.85}function Lhe(e,t){if(e.length<=t||t<2)return e;let n=(e.length-1)/(t-1),r=[];for(let i=0;i<t-1;i++){let t=e[Math.round(i*n)];t!==void 0&&r.push(t)}let i=e[e.length-1];return i!==void 0&&r.push(i),r}function Rhe(e){return Number.isFinite(e.x)&&Number.isFinite(e.y)}function zhe(e,t){let n=t?.untilTimestamp,r=[],i=0,a=null;for(let t=0;t<e.length;t++){let o=e[t];if(o===void 0||!Rhe(o)||n!==void 0&&o.timestamp!==void 0&&o.timestamp>n)continue;if(Ihe(o)){i+=1;continue}let s=o.timestamp!==void 0&&Number.isFinite(o.timestamp)?o.timestamp:t,c=i8(o.x),l=i8(o.y),u=r[r.length-1];if(u!==void 0&&Math.hypot(c-u.x,l-u.y)<.005){r[r.length-1]={...u,samples:u.samples+1,lastTs:Math.max(u.lastTs,s)},a={x:c,y:l,samples:1,firstTs:s,lastTs:s};continue}a=null,r.push({x:c,y:l,samples:1,firstTs:s,lastTs:s})}let o=r[r.length-1];return a!==null&&o!==void 0&&o.samples>1&&(a.x!==o.x||a.y!==o.y)&&(r[r.length-1]={...o,samples:o.samples-1},r.push(a)),{nodes:Lhe(r,t?.maxPoints??120),unlocalized:i}}function Bhe(e){return e.nodes.length>=2}function Vhe(e){return e.x>=0&&e.x<=1&&e.y>=0&&e.y<=1}function Hhe(e,t){let n=t.x-e.x,r=t.y-e.y,i=0,a=1,o=[[-n,e.x],[n,1-e.x],[-r,e.y],[r,1-e.y]];for(let[e,t]of o){if(e===0){if(t<0)return null;continue}let n=t/e;if(e<0){if(n>a)return null;n>i&&(i=n)}else{if(n<i)return null;n<a&&(a=n)}}return[{x:e.x+i*n,y:e.y+i*r},{x:e.x+a*n,y:e.y+a*r}]}function Uhe(e,t){return Math.abs(e.x-t.x)<1e-9&&Math.abs(e.y-t.y)<1e-9}function Whe(e,t){if(e.length<2||!(t.w>0)||!(t.h>0))return[];let n=e.map(e=>({x:(e.x-t.x)/t.w,y:(e.y-t.y)/t.h})),r=[],i=[];for(let e=1;e<n.length;e++){let t=n[e-1],a=n[e];if(t===void 0||a===void 0)continue;let o=Hhe(t,a);if(o===null){i.length>=2&&r.push(i),i=[];continue}let[s,c]=o,l=i[i.length-1];(l===void 0||!Uhe(l,s))&&(i.length>=2&&r.push(i),i=[s]),i.push(c),Vhe(a)||(i.length>=2&&r.push(i),i=[])}return i.length>=2&&r.push(i),r}function Ghe(e,t,n){let r=e=>String(Math.round(e*100)/100);return e.map(e=>`${r(e.x*t)},${r(e.y*n)}`).join(` `)}var Khe=`armed_`,a8=`alarm-panel`,o8=`trigger`,s8=[`contact`,`cover`,`lock`,`switch`],c8=[`cover`,`lock-control`,`switch`];function l8(e){return c8.includes(e)}function qhe(e,t){if(e.kind===`do`){let t=e.action;return t.kind===`cap`&&t.cap===a8&&t.method===o8}let n=t?.(e.sequenceId);return n===void 0?!1:n.some(e=>e.kind===`cap`&&e.cap===a8&&e.method===o8)}function u8(e){return(e.conditions.deviceState?.states??[]).some(e=>e.trim().toLowerCase().startsWith(Khe))}function d8(e){if(u8(e))return!0;for(let t of e.actions?.onTrigger??[])if(qhe(t,e.sequenceActionsOf))return!0;return!1}function Jhe(e){return u8(e)}function Yhe(e){let t=e.trim().toLowerCase();return s8.some(e=>e===t)}var Xhe=`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 Zhe(e){if(e.conditions.sensorTransition!==`cleared`)return!1;let t=e.conditions.sensorKinds??[];return t.length===0||!t.every(Yhe)?!1:d8(e)}function Qhe(e){return e.controllable?e.blocking.includes(e.deviceId):!e.nonBlocking.includes(e.deviceId)}function $he(e){return e.controllable?!e.secureOnArmOff.includes(e.deviceId):!1}function ege(e){if(!l8(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 f8=[`exitDelaySec`,`entryDelaySec`,`triggeredDurationSec`],tge=30,p8=[`notifyDuringEntryDelay`,`notifySensorRewatched`,`notifySensorIgnored`];function nge(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 m8(e,t){return e===void 0?t>0?`rearmAfter`:`doNothing`:e}function h8(e,t){return e===void 0?{value:t,source:`default`}:{value:e,source:`mode`}}function rge(e,t){let n=(e.modeDelays??[]).find(e=>e.mode===t),r=h8(n?.exitDelaySec,e.exitDelaySec),i=h8(n?.entryDelaySec,e.entryDelaySec),a=h8(n?.triggeredDurationSec,e.triggeredDurationSec),o=n?.postTriggeredAction,s=o===void 0?`default`:`mode`,c=m8(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 g8(e,t){return t===void 0?e:t===null?void 0:t}function ige(e,t){return t===void 0?e:t===null?void 0:t}function _8(e,t){return t===void 0?e:t===null?void 0:t}function age(e,t){return t===void 0?e:t===null?void 0:t}function oge(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 sge(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=g8(r.exitDelaySec,e.exitDelaySec),o=g8(r.entryDelaySec,e.entryDelaySec),s=g8(r.triggeredDurationSec,e.triggeredDurationSec),c=ige(r.postTriggeredAction,e.postTriggeredAction),l=age(r.schedule,e.schedule),u=_8(r.notifyDuringEntryDelay,e.notifyDuringEntryDelay),d=_8(r.notifySensorRewatched,e.notifySensorRewatched),f=_8(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 v8(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 cge(e,t){return v8(e,{mode:t.mode,deviceId:t.deviceId,present:t.nonBlocking})}function lge(e,t){return v8(e,{mode:t.mode,deviceId:t.deviceId,present:t.blocking})}function uge(e,t){return v8(e,{mode:t.mode,deviceId:t.deviceId,present:!t.secureOnArm})}function y8(e,t){let n=new Set(e),r=new Set(t);return n.size===r.size&&[...n].every(e=>r.has(e))}function b8(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 x8(e,t){let n=b8(e),r=b8(t);if(n.size!==r.size)return!1;for(let[e,t]of n){let n=r.get(e);if(n===void 0||!y8([...t],[...n]))return!1}return!0}function dge(e,t){if(e!==void 0)switch(t){case`exitDelaySec`:return e.exitDelaySec;case`entryDelaySec`:return e.entryDelaySec;case`triggeredDurationSec`:return e.triggeredDurationSec}}function fge(e,t){switch(t){case`exitDelaySec`:return e.exitDelaySec;case`entryDelaySec`:return e.entryDelaySec;case`triggeredDurationSec`:return e.triggeredDurationSec}}function S8(e,t,n){return e?.find(e=>e.mode===t)?.deviceIds.includes(n)??!1}function pge(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!==m8(t.postTriggeredAction,t.triggeredDurationSec)||e.announceTargets!==void 0&&!y8(e.announceTargets,t.announceTargets)||e.nonBlocking!==void 0&&!x8(e.nonBlocking,t.nonBlocking??[])||e.blocking!==void 0&&!x8(e.blocking,t.blocking??[])||e.secureOnArmOff!==void 0&&!x8(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 f8){let r=fge(n,t);if(r===void 0)continue;let i=dge(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 p8){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:!oge(t,n.schedule))return!1}}if(e.nonBlockingEdit!==void 0){let n=e.nonBlockingEdit;if(S8(t.nonBlocking,n.mode,n.deviceId)!==n.nonBlocking)return!1}if(e.blockingEdit!==void 0){let n=e.blockingEdit;if(S8(t.blocking,n.mode,n.deviceId)!==n.blocking)return!1}if(e.secureOnArmEdit!==void 0){let n=e.secureOnArmEdit;if(S8(t.secureOnArmOff,n.mode,n.deviceId)===n.secureOnArm)return!1}return!0}var C8=`default`,w8=`Default`,T8={exitDelaySec:30,entryDelaySec:20,triggeredDurationSec:10,postTriggeredAction:`rearmAfter`};function E8(){return{...T8,announceTargets:[],nonBlocking:[],blocking:[],secureOnArmOff:[],modeDelays:[]}}function D8(e){return e===C8}function O8(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 mge(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:C8,profiles:e.profiles}:{activeId:e.activeId,profiles:[{id:C8,name:w8,settings:O8(t)},...e.profiles]}:{activeId:C8,profiles:[{id:C8,name:w8,settings:O8(t)}]}}function k8(e){return e.trim()}function A8(e,t,n){let r=t.toLowerCase();return e.profiles.some(e=>e.id!==n&&e.name.trim().toLowerCase()===r)}function hge(e,t){let n=k8(t.name);if(n.length===0)return{kind:`refused`,reason:`name-empty`};if(A8(e,n))return{kind:`refused`,reason:`name-taken`,detail:n};if(D8(t.id))return{kind:`refused`,reason:`cannot-rename-default-id`};let r;if(t.source.kind===`defaults`)r=E8();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=O8(i.settings)}return{kind:`ok`,state:{activeId:e.activeId,profiles:[...e.profiles,{id:t.id,name:n,settings:r}]}}}function gge(e,t){let n=k8(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(A8(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 _ge(e,t){if(D8(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?C8:e.activeId,profiles:n}}}function vge(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 yge(e,t){return{activeId:e.activeId,profiles:e.profiles.map(n=>n.id===e.activeId?{...n,settings:O8(t)}:n)}}function bge(e,t){return e.profiles.find(e=>e.id===t)}var j8=Object.freeze(Object.fromEntries(Object.entries(fV).flatMap(([e,t])=>{let n=_o[e];return n===void 0||t.category!==`sensor`?[]:[[t.kind,n]]}))),M8=Object.freeze(Object.keys(j8));function N8(e){return e.trim().toLowerCase()}function xge(e,t){if(t===null)return;let n=j8[N8(e)];if(n===void 0)return;let r=Object.entries(t).find(([e])=>e===n)?.[1];return typeof r==`boolean`?r:void 0}function Sge(e){return e===void 0||e.length===0?!1:e.every(e=>M8.includes(N8(e)))}var Cge=`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.`,P8=d({phase:C([`raised`,`resolved`]),episodeId:l().min(1),alertId:l().min(1),severity:Tv,category:l(),title:l(),message:l(),sourceType:l().optional(),sourceId:l().optional(),nodeId:l().optional(),actionUrl:l().optional(),at:i()});function wge(e){let t=P8.safeParse(e);return t.success?t.data:null}function Tge(e){return e!==`completed`&&e!==`dismissed`}function Ege(e){return e===`critical`||e===`error`}function F8(e){let t=e.metadata?.episodeId;return typeof t==`string`&&t.length>0?t:`${e.id}@${String(e.createdAt)}`}function I8(e){let t=e.metadata?.nodeId;if(typeof t==`string`)return t;let n=e.metadata?.runner;if(typeof n==`object`&&n&&`nodeId`in n){let e=n.nodeId;if(typeof e==`string`)return e}return e.source?.type===`node`?e.source.id:void 0}function Dge(e,t){return e===`critical`?t===`raised`?`alert-critical`:`alert-critical-resolved`:e===`error`&&t===`raised`?`alert-error`:null}function Oge(e,t){return e===`critical`?t===`raised`?`device-attention-required`:`device-attention-resolved`:null}function kge(e,t,n){let r=I8(e);return{phase:t,episodeId:F8(e),alertId:e.id,severity:e.severity,category:e.category,title:e.title,message:e.message,...e.source===void 0?{}:{sourceType:e.source.type,sourceId:e.source.id},...r===void 0?{}:{nodeId:r},...e.action?.href===void 0?{}:{actionUrl:e.action.href},at:n}}var Age=[`body`],Q=[`title`,`body`],L8=[`device-battery-low`,`device-battery-normal`],R8=[`device-consumable-low`,`device-consumable-normal`],z8=[`alert-critical`,`alert-error`,`alert-critical-resolved`],B8=[`device-attention-required`,`device-attention-resolved`],V8=[`addon-update-available`,`server-update-available`,`wrapper-update-available`],H8=[`addon-update-available`,`server-update-available`],jge=[`alarm-triggered`,`alarm-armed`,`alarm-disarmed`,`alarm-arming`,`alarm-arm-refused`,`alarm-pending`,`alarm-rearmed`,`alarm-sensor-bypass`,`alarm-check-failed`],U8=[`alarm-triggered`],W8=[`device-online`,`device-offline`,`device-disabled`,`device-enabled`,...L8,...R8,`stream-online`,`stream-offline`,`detection-blind`,`motion-noisy`,`motion-calm`,`package-llm-silent`,`package-llm-answered`,`recording-stalled`,`recording-healthy`,`recording-degraded`,...B8,...jge],G8=[...D6(`device-events`),...D6(`system`)],Mge=[{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:`Front door (high) — since 06:40`,kinds:[`stream-offline`,`stream-online`]},{name:`summaryBattery`,label:`Summary: low batteries`,example:`Sensore porta — 8 %`,kinds:L8},{name:`summaryConsumables`,label:`Summary: consumables`,example:`Robot — filter 10 %`,kinds:R8},{name:`summaryDetection`,label:`Summary: cameras detecting nothing`,example:`Front door — since 05:10`,kinds:[`detection-blind`]},{name:`summaryNodes`,label:`Summary: nodes`,example:`agent-a — 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:
|
|
648
|
+
• @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`]}],Nge=[{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:[...G8],systemEventDeliveries:[`summary`]},{name:`summaryCount`,label:`Summary: items reported`,example:`3`,group:`system`,families:[`rule`],fields:[...Q],kinds:[`system`],systemEventKinds:[...G8],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:[...G8],systemEventDeliveries:[`summary`]},...Mge.map(e=>({name:e.name,label:e.label,example:e.example,group:`system`,families:[`rule`],fields:[...Q],kinds:[`system`],systemEventKinds:[...e.kinds],systemEventDeliveries:[`summary`]}))],K8=[{name:`camera`,label:`Camera`,example:`Front door`,group:`subject`,families:[`rule`,`timelapse`],systemEventKinds:[...W8,`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:[...U8]},{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:[...U8]},{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:[...U8]},{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:[...U8]},{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`,...H8,`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:[...U8]},{name:`zone`,label:`Zone`,example:`Cancello`,group:`place`,families:[`rule`],fields:[...Q],kinds:[`detection`,`occupancy`,`system`],systemEventKinds:[...U8]},{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:[...U8]},{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:`Front door 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:[...Age],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:`Front door`,group:`system`,families:[`rule`],fields:[...Q],kinds:[`system`],systemEventKinds:[...W8]},{name:`locations`,label:`Intrusion locations`,example:`Front door, Hallway, Hall`,group:`system`,families:[`rule`],fields:[...Q],kinds:[`system`],systemEventKinds:[...U8]},{name:`deviceId`,label:`Device id`,example:`102`,group:`system`,families:[`rule`],fields:[...Q],kinds:[`system`],systemEventKinds:[...W8,`export-completed`]},{name:`percentage`,label:`Percentage`,example:`15`,group:`system`,families:[`rule`],fields:[...Q],kinds:[`system`],systemEventKinds:[...L8,...R8]},{name:`item`,label:`Consumable`,description:`The device's own name for the item: a filter, a brush, the salt, a tank.`,example:`Filtro`,group:`system`,families:[`rule`],fields:[...Q],kinds:[`system`],systemEventKinds:[...R8]},{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`,...V8,`addon-updated`,`server-updated`,`storage-location-low`,`storage-location-critical`,`storage-location-ok`,...z8]},{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`,...V8,`server-updated`,`storage-location-low`,`storage-location-critical`,`storage-location-ok`,...z8]},{name:`nodeName`,label:`Node name`,example:`agent-a`,group:`system`,families:[`rule`],fields:[...Q],kinds:[`system`],systemEventKinds:[`node-online`,`node-offline`]},{name:`offlineFor`,label:`Offline for`,example:`44 min`,group:`system`,families:[`rule`],fields:[...Q],kinds:[`system`],systemEventKinds:[`node-online`]},{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:`Front door, 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`,`motion-noisy`,`motion-calm`,`recording-stalled`]},{name:`duty`,label:`Motion share (%)`,example:`55`,group:`system`,families:[`rule`],fields:[...Q],kinds:[`system`],systemEventKinds:[`motion-noisy`,`motion-calm`]},{name:`sessions`,label:`Detection sessions`,example:`96`,group:`system`,families:[`rule`],fields:[...Q],kinds:[`system`],systemEventKinds:[`detection-blind`,`motion-noisy`,`motion-calm`]},{name:`message`,label:`Detail`,example:`writer restart budget exhausted`,group:`system`,families:[`rule`],fields:[...Q],kinds:[`system`],systemEventKinds:[`recording-degraded`,...B8,...z8,`package-llm-silent`]},{name:`ruleName`,label:`Rule name`,example:`Robot`,group:`system`,families:[`rule`],fields:[...Q],kinds:[`system`],systemEventKinds:[`rule-broken`,`rule-repaired`]},{name:`ruleId`,label:`Rule id`,example:`3db3e226-9b82-4681-a200-de13b260aa48`,group:`system`,families:[`rule`],fields:[...Q],kinds:[`system`],systemEventKinds:[`rule-broken`,`rule-repaired`]},{name:`brokenReason`,label:`Why the rule is broken`,description:`unparseable, device-deleted or target-deleted`,example:`device-deleted`,group:`system`,families:[`rule`],fields:[...Q],kinds:[`system`],systemEventKinds:[`rule-broken`]},{name:`offendingIds`,label:`Deleted devices or destinations`,example:`4483`,group:`system`,families:[`rule`],fields:[...Q],kinds:[`system`],systemEventKinds:[`rule-broken`]},{name:`locationName`,label:`Storage location`,example:`Recordings`,group:`system`,families:[`rule`],fields:[...Q],kinds:[`system`],systemEventKinds:[`storage-location-low`,`storage-location-critical`,`storage-location-ok`]},{name:`locationId`,label:`Storage location id`,example:`recordings:default`,group:`system`,families:[`rule`],fields:[...Q],kinds:[`system`],systemEventKinds:[`storage-location-low`,`storage-location-critical`,`storage-location-ok`]},{name:`freePercent`,label:`Free space (%)`,example:`12`,group:`system`,families:[`rule`],fields:[...Q],kinds:[`system`],systemEventKinds:[`storage-location-low`]},{name:`reason`,label:`Reason`,example:`capacity-unreadable`,group:`system`,families:[`rule`],fields:[...Q],kinds:[`system`],systemEventKinds:[`storage-location-low`,`storage-location-critical`,`storage-location-ok`,`package-llm-silent`]},{name:`package`,label:`Package`,example:`@camstack/addon-recorder`,group:`system`,families:[`rule`],fields:[...Q],kinds:[`system`],systemEventKinds:[...V8,`addon-updated`,`node-updating`,`server-updated`]},{name:`packageName`,label:`Package`,example:`@camstack/addon-recorder`,group:`system`,families:[`rule`],fields:[...Q],kinds:[`system`],systemEventKinds:[...H8,`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, agent-a`,group:`system`,families:[`rule`],fields:[...Q],kinds:[`system`],systemEventKinds:[...H8]},{name:`currentVersion`,label:`Current version`,example:`1.2.377`,group:`system`,families:[`rule`],fields:[...Q],kinds:[`system`],systemEventKinds:[...V8]},{name:`latestVersion`,label:`Latest version`,example:`1.2.378`,group:`system`,families:[`rule`],fields:[...Q],kinds:[`system`],systemEventKinds:[...V8]},{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:[...H8,`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 or alert title`,example:`Front door 08:00`,group:`system`,families:[`rule`],fields:[...Q],kinds:[`system`],systemEventKinds:[`export-completed`,...B8,...z8]},{name:`severity`,label:`Alert severity`,example:`critical`,group:`system`,families:[`rule`],fields:[...Q],kinds:[`system`],systemEventKinds:[...z8]},{name:`category`,label:`Alert category`,example:`addon.runner-failed`,group:`system`,families:[`rule`],fields:[...Q],kinds:[`system`],systemEventKinds:[...B8,...z8]},{name:`source`,label:`Alert source (addon, node or runner)`,example:`recorder`,group:`system`,families:[`rule`],fields:[...Q],kinds:[`system`],systemEventKinds:[...z8]},{name:`actionUrl`,label:`Alert action link`,example:`/system/addons`,group:`system`,families:[`rule`],fields:[...Q],kinds:[`system`],systemEventKinds:[...B8,...z8]},{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:`Front door, 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, or Arm-anyway exclusions (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 porch`,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]},...Nge],q8=[`node-restarting`,`node-updating`,`alert-critical`,`alert-error`,`alert-critical-resolved`,`device-attention-required`,`device-attention-resolved`,`rule-broken`,`rule-repaired`,`package-llm-silent`,`package-llm-answered`];function Pge(){return K8.filter(e=>!J8(e)).map(e=>e.systemEventKinds===void 0?e:{...e,systemEventKinds:e.systemEventKinds.filter(e=>!q8.includes(e))})}function J8(e){return e.systemEventDeliveries!==void 0&&!e.systemEventDeliveries.includes(`instant`)}function Y8(e,t){if(!j6(t.kind))return!0;let n=t.systemEventDelivery??`instant`;return(e.systemEventDeliveries??(e.systemEventKinds===void 0?[n]:[`instant`])).includes(n)}var Fge={previewText:[`camera`,`rule`,`from`,`to`],captionText:[`rule`,`from`,`to`]};function X8(e,t){return e===void 0||t===void 0||e.includes(t)}function Z8(e,t){return e===void 0||t===void 0||e.some(e=>e===t)?!0:j6(t)&&e.includes(`system`)}function Q8(e,t){if(!j6(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:M6(t.kind);if(i===void 0)return!0;let a=D6(i);return n.some(e=>a.includes(e))}function $8(e){if(e.field===`previewText`||e.field===`captionText`){let t=Fge[e.field];return K8.filter(n=>n.families.includes(e.family)&&t.includes(n.name)&&n.dynamic===void 0)}return K8.filter(t=>t.families.includes(e.family)&&X8(t.fields,e.field)&&Z8(t.kinds,e.kind)&&X8(t.deliveries,e.delivery)&&Q8(t,e)&&Y8(t,e))}function Ige(e,t){return $8(t).some(t=>t.dynamic===void 0?t.name===e:e.startsWith(t.dynamic.prefix)&&e.length>t.dynamic.prefix.length)}var e5=[{id:`device-connectivity`,family:`device-events`,label:`Device connectivity (offline / back online)`,bad:[`device-offline`],recovery:[`device-online`],snapshotLabel:`Devices offline now`,snapshotSection:`device-state`},{id:`device-switch`,family:`device-events`,label:`Device switched off / back on`,bad:[`device-disabled`],recovery:[`device-enabled`],snapshotLabel:`Devices switched off now`,snapshotSection:`device-state`},{id:`stream-connectivity`,family:`device-events`,label:`Stream connectivity (offline / back online)`,bad:[`stream-offline`],recovery:[`stream-online`],snapshotLabel:`Streams offline now`,snapshotSection:`streams`},{id:`battery`,family:`device-events`,label:`Battery (low / back to normal)`,bad:[`device-battery-low`],recovery:[`device-battery-normal`],snapshotLabel:`Batteries low now`,snapshotSection:`battery`},{id:`consumables`,family:`device-events`,label:`Consumables (low / replaced)`,bad:[`device-consumable-low`],recovery:[`device-consumable-normal`],snapshotLabel:`Consumables low now`,snapshotSection:`consumables`},{id:`motion-noise`,family:`device-events`,label:`Motion without a subject (constant / calm again)`,bad:[`motion-noisy`],recovery:[`motion-calm`],snapshotLabel:`Cameras with constant motion now`,snapshotSection:null},{id:`package-llm-confirm`,family:`device-events`,label:`Package confirm (not answering / answering again)`,bad:[`package-llm-silent`],recovery:[`package-llm-answered`],snapshotLabel:`Cameras whose package confirm is not answering`,snapshotSection:null},{id:`recording-health`,family:`device-events`,label:`Recording health (stalled or degraded / recording again)`,bad:[`recording-stalled`,`recording-degraded`],recovery:[`recording-healthy`],snapshotLabel:`Recordings stalled now`,snapshotSection:null},{id:`device-attention`,family:`device-events`,label:`Device needs attention (raised / resolved)`,bad:[`device-attention-required`],recovery:[`device-attention-resolved`],snapshotLabel:`Devices needing attention now`,snapshotSection:null},{id:`node-connectivity`,family:`system`,label:`Node connectivity (offline / back online)`,bad:[`node-offline`],recovery:[`node-online`],snapshotLabel:`Nodes offline now`,snapshotSection:`nodes`},{id:`storage-space`,family:`system`,label:`Storage space (low or critical / ok again)`,bad:[`storage-location-low`,`storage-location-critical`],recovery:[`storage-location-ok`],snapshotLabel:`Storage locations low now`,snapshotSection:null},{id:`critical-alerts`,family:`system`,label:`Critical alerts (raised / resolved)`,bad:[`alert-critical`],recovery:[`alert-critical-resolved`],snapshotLabel:`Critical alerts open now`,snapshotSection:null},{id:`rule-health`,family:`system`,label:`Rule health (broken / repaired)`,bad:[`rule-broken`],recovery:[`rule-repaired`],snapshotLabel:`Notification rules broken now`,snapshotSection:null}],Lge=new Map(e5.flatMap(e=>[...e.bad,...e.recovery].map(t=>[t,e])));function Rge(e){return[...e.bad,...e.recovery]}function t5(e){return Lge.get(e)}function zge(e){return t5(e)?.recovery.some(t=>t===e)??!1}function Bge(e){return e5.filter(t=>t.family===e)}function n5(e){let t=[],n=new Set,r=e=>{n.has(e)||(n.add(e),t.push(e))},i=new Set(e);for(let t of e){r(t);let e=t5(t);if(e===void 0)continue;let n=e.bad.some(e=>i.has(e));if(e.bad.some(e=>e===t))for(let t of e.recovery)r(t);else if(!n)for(let t of e.bad)r(t)}return t}function Vge(e){return e.delivery===`system-event`?e.systemEventDelivery?.mode!==`summary`:!1}function Hge(e){let t=e.conditions.systemEvent;if(t===void 0||!Vge(e))return e;let n=new Set(t.kinds.map(e=>C6[e]));if(n.size!==1||n.has(null))return e;let r=n5(t.kinds);return r.length===t.kinds.length?e:{...e,conditions:{...e.conditions,systemEvent:{...t,kinds:r}}}}var r5=[`device-events`,`system`];function i5(e){if(!R6(e.delivery))return null;let t=e.systemEventDelivery;return t?.mode===`summary`?t.schedule:null}function Uge(e){let t=e.systemEventDelivery;return t?.mode===`summary`?t.split??`rule`:`rule`}function Wge(e){return i5(e)!==null}function Gge(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 Kge(e){if(e.systemEventDelivery?.mode!==`summary`)return[];if(!R6(e.delivery))return[{code:`not-a-system-rule`,delivery:e.delivery}];let t=[],n=k6(e.conditions.systemEvent?.kinds??[]),r=n.kind===`family`?n.family:`mixed`;(r===`mixed`||!r5.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`}),Gge(e.actions)&&t.push({code:`actions-beside-summary`}),t}function qge(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 a5=1440;function Jge(e,t){return{windows:e.map(e=>{let t=(e.minute+a5-1)%a5;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 o5(e){if(e.invert===!0)return null;let t=[];for(let n of e.windows){if((n.endMinute-n.startMinute+a5)%a5!==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 Yge(e){let t=o5(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 Xge=/\{\{\s*summary(?:Text|Devices|Streams|Battery|Consumables|Tanks|Detection|Nodes|Addons|AddonUpdates|Updates)\s*\}\}/;function Zge(e){return e===void 0||e.trim().length===0?!0:Xge.test(e)}function Qge(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 s5=`@camstack/server`,c5=[s5,`@camstack/system`,`camstack-wrapper`],$ge={"@camstack/server":`server`,"@camstack/system":`framework`,"camstack-wrapper":`wrapper`};function e_e(e){return c5.some(t=>t===e)}function t_e(e){let t=new Map(e.map(e=>[e.name,e.version])),n=c5.map(e=>{let n=t.get(e);return{id:e,name:e,type:$ge[e],location:null,...n===void 0?{}:{detail:n}}}),r=e.filter(e=>!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 l5=`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(`.`),u5={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`}},n_e=new Set(l5);function d5(e){return n_e.has(e)}function r_e(e,t){return d5(e)?u5[e][t]:e}var f5=`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(`.`),p5={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`}},i_e=new Set(f5);function m5(e){return i_e.has(e)}function a_e(e,t){let n=e.trim().toLowerCase();return m5(n)?p5[n][t]:e}var h5=yg,o_e=h5.options,s_e=`en`,c_e=x(l().min(1),l());function l_e(e,t){return t===void 0?e:e.replace(/\{(\w+)\}/g,(e,n)=>{let r=t[n];return r===void 0?e:String(r)})}function g5(e){let t=e.indexOf(`:`);return t<=0||t===e.length-1?null:{ns:e.slice(0,t),key:e.slice(t+1)}}function u_e(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}var d_e=[{keyField:`labelKey`,textField:`label`},{keyField:`descriptionKey`,textField:`description`},{keyField:`titleKey`,textField:`title`}];function _5(e,t){if(Array.isArray(e)){let n=!1,r=e.map(e=>{let r=_5(e,t);return r!==e&&(n=!0),r});return n?r:e}if(!u_e(e))return e;let n={};for(let[r,i]of Object.entries(e)){let e=_5(i,t);e!==i&&(n[r]=e)}for(let{keyField:r,textField:i}of d_e){let a=e[r];if(typeof a!=`string`)continue;let o=g5(a),s=o===null?void 0:t(o.ns,o.key);s!==void 0&&(n[i]=s)}return Object.keys(n).length===0?e:{...e,...n}}var v5=d({title:l().max(500).optional(),body:l().max(2e3).optional()}),y5=l().min(1).max(200),b5=w(i()).min(1),x5=i().int().min(2).max(3600),S5=i().int().min(1).max(60),C5=w(KM).min(1),w5=i().int().min(1).max(5),T5=.1,E5=i().min(T5).max(3600),D5=i().min(0).max(60),O5=l().max(200),k5=C([`image`,`gif`]),A5=w(l().min(1).max(40)).max(20),j5=d({name:y5,enabled:T().default(!0),deviceIds:b5,schedule:CM,cadenceSec:x5.default(15),framerate:S5.default(10),denseCadenceSec:E5.optional(),minDwellSec:D5.optional(),targets:C5,template:v5.optional(),previewText:O5.optional(),previewMode:k5.default(`image`),reportClasses:A5.optional(),priority:w5.default(3)}),f_e=`Timelapse {{camera}}`,p_e=d({name:y5.optional(),enabled:T().optional(),deviceIds:b5.optional(),schedule:CM.optional(),cadenceSec:x5.optional(),framerate:S5.optional(),denseCadenceSec:E5.optional(),minDwellSec:D5.optional(),targets:C5.optional(),template:v5.nullable().optional(),previewText:O5.optional(),previewMode:k5.optional(),reportClasses:A5.optional(),priority:w5.optional()}),m_e=j5.extend({id:l(),ownerUserId:l().optional(),lastGeneratedAt:i().optional(),generatedByDevice:x(l(),i()).optional(),createdBy:l(),createdAt:i(),updatedAt:i()});function h_e(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 g_e(e,t){let n=e.generatedByDevice;return n===void 0?e.lastGeneratedAt??0:n[String(t)]??0}function __e(e){return e.some(e=>e!==`analyzer`)}async function M5(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 N5(e,t){let n=await M5(e,t);if(n===null)return null;let r=Iq.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 P5(e,t){let n=(await M5(e,t))?.detected;if(typeof n!=`boolean`)throw Error(`motion state of device ${t} is not published yet (unknown)`);return n}function v_e(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),P5(e,t)),getStatus:async({deviceId:n})=>(r(n),N5(e,t))}}var y_e=Lq.omit({triggeredBy:!0});function b_e(e,t){return st(E.ProviderMotion,e,t)}function F5(e,t){return!!e.formats[t]}function x_e(e,t,n){if(t!=null){let r=e.find(e=>e.id===t);if(r!==void 0&&F5(r,n))return!0}return e.some(e=>e.legacy!==!0&&F5(e,n))}var I5={"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-s0`,`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 S_e(e,t){return I5[e]?.includes(t)??!1}var C_e=`ModelId`;function L5(e){return`${e}${C_e}`}function R5(e,t){let n=e?.[L5(t)];return typeof n==`string`&&n.length>0?n:void 0}function z5(e,t,n,r,i){let a=e?.[t],o=R5(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 w_e(e,t,n){if(e===void 0)return;let r={...e};for(let i of t){let t=R5(e,i);t!==void 0&&t!==n&&delete r[i],delete r[L5(i)]}return r}function T_e(e,t,n,r){return{...e,[t]:n,[L5(t)]:r}}function B5(e,t){let n={...e};return delete n[t],delete n[L5(t)],n}function E_e(e,t,n){return t.some(t=>z5(e,t,n,void 0,void 0).source===`override`)}function D_e(e,t,n){return t.reduce((e,t)=>z5(e,t,n,void 0,void 0).source===`override`?B5(e,t):e,{...e})}function V5(e){return e.flatMap(e=>e.type===`group`?V5(e.fields):`key`in e&&`bindsToModel`in e&&e.bindsToModel===!0?[e.key]:[])}var H5=[`camera`,`node`];function U5(e,t){return t.includes(e)?[e,L5(e)]:[e]}function O_e(e,t){return t.find(t=>L5(t)===e)??e}function W5(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)=>W5(e,t[n]));if(G5(e)&&G5(t)){let n=Object.keys(e),r=Object.keys(t);return n.length===r.length&&n.every(n=>W5(e[n],t[n]))}return!1}function G5(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function K5(...e){return e.reduce((e,t)=>({...e,...t}),{})}function k_e(e,t){return K5(...H5.slice(H5.indexOf(t)+1).toReversed().map(t=>e[t]))}function A_e(e){return K5(e.node,e.camera)}function j_e(e,t,n){let r=U5(t,n);for(let t of H5){let n=e[t];if(n!==void 0&&r.some(e=>n[e]!==void 0))return t}return`default`}function M_e(e,t,n,r){let i={...e};for(let e of U5(t,r))n[e]===void 0?delete i[e]:i[e]=n[e];return i}function N_e(e,t,n){let r={...e};for(let e of U5(t,n))delete r[e];return r}function q5(e,t){return[...new Set(Object.keys(e).map(e=>O_e(e,t)))]}function J5(e,t,n,r){return U5(n,r).every(n=>W5(e[n],t[n]))}function P_e(e,t,n){if(e===void 0)return;let r={};for(let i of q5(e,n))if(!J5(e,t,i,n))for(let t of U5(i,n))e[t]!==void 0&&(r[t]=e[t]);return Object.keys(r).length>0?r:void 0}function F_e(e,t,n){return e===void 0?[]:q5(e,n).filter(r=>J5(e,t,r,n)).toSorted()}var I_e=/^Apple M(\d+)(?:\s+(Pro|Max|Ultra))?\b/i,L_e=/Core\(TM\)\s+Ultra|Core Ultra/i,R_e=/Intel\(R\)\s+N\d{2,3}\b|\bIntel\s+N\d{2,3}\b/i,z_e=/Ryzen \d+ (7[0-9]40|8[0-9]40|8[0-9]45)[HSU]|Ryzen \d+ 8[0-9]00G/i;function B_e(e){let t=I_e.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 Y5(e){let t=e.cpuModel,n=B_e(t);return n===null?L_e.test(t)?{hardwareClass:`intel-core-ultra`,cpuModel:t}:R_e.test(t)?{hardwareClass:`intel-n-series`,cpuModel:t}:z_e.test(t)?{hardwareClass:`amd-phoenix`,cpuModel:t}:{hardwareClass:`unknown`,cpuModel:t}:{hardwareClass:n.variant===`base`?`apple-m-base`:`apple-m-pro`,cpuModel:t,apple:n}}function X5(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===`onnx`&&r===`webgpu`?`amd-igpu`:n===`vitisai`&&r===`npu`?`amd-npu`:n===`cpu`||r===`cpu`?t.arch===`arm64`?`arm-cpu`:`x86-cpu`:null}var Z5=`yolov9`,Q5=`yolov9s-320-edgetpu`,V_e=.02,H_e=.4,U_e=10,W_e=10,$5={"intel-igpu":1.4};function e7(e,t){return!(t>0)||t>=10?1:$5[e]??1}function t7(e,t,n,r=1){return!(e>0)||!(n>0)||!(r>0)?0:Math.max(0,Math.floor(e*r*(1-t)/n+1e-9))}function G_e(e,t){return e.accelerators?.find(e=>e.deviceKey===t)??null}function n7(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 K_e(e,t=3){let n=10**t;return Math.round(e*n)/n}function r7(e,t,n){return e===void 0?0:t7(e.fps,t.headroom,t.cameraFps,e7(n,t.cameraFps))}function i7(e,t,n){return r7(e.column[t],n,e.accelerator)>=n.minSessions}function q_e(e,t){return Object.keys(AY).filter(e=>e.startsWith(Z5)).filter(n=>e.every(e=>e.column[n]!==void 0&&(t[n]??[]).includes(e.device.format))).map(e=>({modelId:e,personRecall:AY[e]?.personRecall??0})).toSorted((e,t)=>t.personRecall-e.personRecall||e.modelId.localeCompare(t.modelId))}function a7(e,t){return e.reduce((e,n)=>e+(n.column[t]?.p50Ms??1/0),0)}function o7(e,t,n){return e.reduce((e,r)=>Math.min(e,r7(r.column[t],n,r.accelerator)),1/0)}function s7(e,t,n){let r=q_e(e,t);if(r.length===0)return null;let i=r.filter(t=>e.every(e=>i7(e,t.modelId,n)));if(i.length===0){let t=r.toSorted((t,r)=>o7(e,r.modelId,n)-o7(e,t.modelId,n)||a7(e,t.modelId)-a7(e,r.modelId))[0];return t===void 0?null:{modelId:t.modelId,reasons:[{kind:`no-fit-lightest`,sessions:o7(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)=>a7(e,t.modelId)-a7(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=>!i7(e,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:K_e(a.personRecall-o.personRecall)}),{modelId:o.modelId,reasons:s}}function c7(e,t,n){let r=e.column[t];if(r===void 0)return null;let i=r.source?.kind===`node-benchmark`?void 0:r.estimatedFrom,a=r.source??(i===void 0?{kind:`table`}:{kind:`estimated`,estimatedFrom:i});return{modelId:t,p50Ms:r.p50Ms,fps:r.fps,measured:r.measured,source:a,...i===void 0?{}:{estimatedFrom:i},capacitySessions:r7(r,n,e.accelerator),personRecall:AY[t]?.personRecall??0}}function l7(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 u7(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?X5(t.key,e.hardware):null,enabled:t.enabled,available:t.available,chosen:null,reasons:[]})),reasons:[t]}}function J_e(e){let{node:t}=e,n={headroom:e.headroom??.4,cameraFps:e.cameraFps??10,minSessions:e.minSessionsPerDevice??2},r=e.perf??kY;if(!t.reachable)return u7(t,{kind:`node-offline`},null);if(t.hardware===null)return u7(t,{kind:`no-hardware-facts`},null);let i=t.hardware,{hardwareClass:a,cpuModel:o}=Y5(i),s=e.measured??{},c=Object.values(s).some(e=>Object.keys(e).length>0),l=a===`unknown`?void 0:r[a],u=(i.accelerators??[]).some(e=>{let t=X5(e.deviceKey,i);return t!==null&&XY(e,t)});if(l===void 0&&!c&&!u)return u7(t,{kind:`no-measured-data`,hardwareClass:a},a);let d=l??{},f=t.devices.toSorted((e,t)=>e.key.localeCompare(t.key)),p=new Map,m=new Map,h=[];for(let e of f){let n=X5(e.key,i);if(!e.enabled){m.set(e.key,[{kind:`device-disabled`}]);continue}if(!e.available){m.set(e.key,[{kind:`device-unavailable`}]);continue}if(n===`coral`){let r=n7(d.coral,s[e.key]),i=t.formatsByModel[`yolov9s-320-edgetpu`]??[];if(r?.[`yolov9s-320-edgetpu`]===void 0||!i.includes(e.format)){m.set(e.key,[{kind:`no-family-build`,format:e.format}]);continue}h.push({device:e,accelerator:n,column:r});continue}let o=n===null?void 0:n7(tX({hardwareClass:a,accelerator:n,report:G_e(i,e.key),perf:r})?.column,s[e.key]);if(n===null||o===void 0){m.set(e.key,[{kind:`no-family-build`,format:e.format}]);continue}p.set(e.key,{device:e,accelerator:n,column:o})}let g=e=>e===`x86-cpu`||e===`arm-cpu`,_=new Map,v=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)_.set(t.device.key,[n]);return n},ee=[...p.values()].filter(e=>!g(e.accelerator)),te=v(ee),ne=te===null?ee:[],y=[...p.values()].filter(e=>g(e.accelerator)).filter(e=>v([e])===null),b=new Map,re=new Map,x=[],ie=null,ae=ne.length>0?s7(ne,t.formatsByModel,n):null;if(te!==null&&x.push(te),ae!==null){ie=ae.modelId,x.push(...ae.reasons);for(let e of ne){let t=c7(e,ae.modelId,n);t!==null&&(b.set(e.device.key,t),re.set(e.device.key,l7(t,n)))}}else for(let e of ne)re.set(e.device.key,[{kind:`no-family-build`,format:e.device.format}]);for(let e of h){let t=c7(e,Q5,n);t!==null&&(b.set(e.device.key,t),re.set(e.device.key,l7(t,n)))}for(let e of y){let r=s7([e],t.formatsByModel,n),i=r===null?null:c7(e,r.modelId,n);if(r===null||i===null){re.set(e.device.key,[{kind:`no-family-build`,format:e.device.format}]);continue}b.set(e.device.key,i),re.set(e.device.key,[{kind:`cpu-device`},...r.reasons,...l7(i,n)])}return{nodeId:t.nodeId,reachable:!0,hardwareClass:a,cpuModel:o,skipped:b.size===0,acceleratorModelId:ie,devices:f.map(e=>({deviceKey:e.key,accelerator:X5(e.key,i),enabled:e.enabled,available:e.available,chosen:b.get(e.key)??null,..._.has(e.key)?{kept:`custom-pin`}:{},reasons:m.get(e.key)??_.get(e.key)??re.get(e.key)??[]})),reasons:x}}var d7=1e-9;function f7(e,t){let n=t.deficit-e.deficit;return(Math.abs(n)<d7?0:n)||t.candidate.share-e.candidate.share||e.candidate.key.localeCompare(t.candidate.key)}function p7(e){return e.spare??1/0}function m7(e){return Math.max(e.running,0)+Math.max(e.recent??0,0)}function h7(e){let t=e.reduce((e,t)=>e+Math.max(t.share,0),0),n=e.reduce((e,t)=>e+m7(t),0);return e.map(r=>({candidate:r,deficit:(t>0?Math.max(r.share,0)/t:1/e.length)*(n+1)-m7(r)})).toSorted(f7)}function Y_e(e){return e.length===0?{kind:`none`}:g7(h7(e))}function g7(e){let t=e[0].candidate;if(!t.capped&&!t.saturated)return{kind:`elected`,key:t.key,reason:`share`};let n=e.filter(e=>!e.candidate.capped&&!e.candidate.saturated).toSorted((e,t)=>p7(t.candidate)-p7(e.candidate)||f7(e,t)),r=t.capped?`at-cap`:`saturated`;if(n.length>0)return{kind:`elected`,key:n[0].candidate.key,reason:`yield`,turnKey:t.key,yieldReason:r};let i=e.find(e=>!e.candidate.capped);return i===void 0?{kind:`none`}:{kind:`elected`,key:i.candidate.key,reason:`share`}}var X_e=1;function Z_e(e){return{key:e.candidate.key,share:e.candidate.share,running:e.candidate.running,recent:e.candidate.recent??0,deficit:e.deficit}}function Q_e(e,t,n=1){let r=e.length===0?[]:h7(e),i=r.length===0?{kind:`none`}:g7(r),a=i.kind===`elected`?i.key:null,o=(e,n,i)=>({election:e,sticky:n,affinityReason:i,previousKey:t,turnKey:a,scored:r.map(Z_e)});if(t===null)return o(i,!1,`no-previous`);if(a===t)return o(i,!0,`previous-is-turn`);let s=r.find(e=>e.candidate.key===t);if(s===void 0)return o(i,!1,`previous-ineligible`);if(s.candidate.capped||s.candidate.saturated)return o(i,!1,`previous-no-room`);let c=r.find(e=>e.candidate.key===a);return c===void 0?o(i,!1,`share-off`):s.deficit>=c.deficit-n-d7?o({kind:`elected`,key:t,reason:`share`},!0,`within-one-session`):o(i,!1,`share-off`)}var _7=1;function v7(e){return e!==void 0&&e>0?e:_7}function y7(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 $_e(e){let t=pz(e.source)&&e.auto!==null,n=t&&e.auto!==null?e.auto:e.stored,r={};for(let t of e.nodeIds)r[t]=v7(n.nodes[t]);let i=new Set(e.eligibleNodes),a=y7(e.nodeIds,e=>r[e]??_7,()=>!0),o=y7(e.nodeIds,e=>r[e]??_7,e=>i.has(e)),s={},c=e.nodeIds.map(r=>{let c=new Set(e.eligibleDevices[r]??[]),l=n.devices[r]??{},u=new Set(e.absentDevices?.[r]??[]),d=[...new Set([...Object.keys(l),...c])].filter(e=>!u.has(e)).toSorted(),f={};for(let e of d)f[e]=v7(l[e]);d.length>0&&(s[r]=f);let p=y7(d,e=>f[e]??_7,()=>!0),m=y7(d,e=>f[e]??_7,e=>i.has(r)&&c.has(e)),h=d.map(e=>({deviceKey:e,eligible:c.has(e),configuredPct:p.get(e)??0,effectivePct:m.get(e)??0})),g=t?e.autoCapacity?.[r]:void 0;return{nodeId:r,eligible:i.has(r),configuredPct:a.get(r)??0,effectivePct:o.get(r)??0,capacitySource:g?.source??null,capacityFallback:g?.fallback??null,devices:h}});return{source:e.source,policy:e.policy??`share`,autoPending:pz(e.source)&&e.auto===null,computedAt:e.computedAt??null,trigger:e.trigger??null,nodes:c,nodeWeights:r,deviceWeights:s}}function b7(e,t,n){if(!(e===void 0||n===null))return e.devices.filter(e=>e.deviceKey===t&&e.modelId===n).toSorted((e,t)=>t.measuredAtMs-e.measuredAtMs)[0]}function eve(e,t){let n=[];for(let r of e){let e=t.get(r.nodeId);if(e!==void 0)for(let t of e.devices){let e=r.devices.find(e=>e.deviceKey===t.deviceKey)?.chosen?.modelId??null;t.modelId===null||t.modelId===e||n.push({nodeId:r.nodeId,deviceKey:t.deviceKey,measuredModelId:t.modelId,runsModelId:e})}}return n}var tve={readMeasuredCapacity:async()=>new Map};function x7(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 nve(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:t7(r,t,n),weight:Math.max(r,0),modelId:e.chosen?.modelId??null,fps:e.chosen?.fps??null,measured:e.chosen?.measured??!1}})}function rve(e,t){let n=n=>{let r=e.skipped?[]:nve(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;for(let t of e.devices){let e=b7(r,t.deviceKey,t.chosen?.modelId??null);e!==void 0&&i.set(t.deviceKey,e)}let 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 ive(e){let t=e.recommendations.map(t=>rve(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=x7(n),i=t.map(e=>{let t=x7(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 ave(e,t){if(t===null||!e.includes(t))return e;let n=e.filter(e=>e!==t);return n.length>0?n:e}function ove(e,t,n){return e===null||t===null||e!==t?e:n.some(e=>e!==t)?null:e}function sve(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 S7=[1,2,4,6,8,12,16,24,32],C7=[1,2,3,4,6,8,10,12,16],cve=3*6e4,w7=2e4;function lve(e,t={}){let n=((t.settleSec??vz.settleSec)+(t.measureSec??vz.measureSec))*1e3,r=cve;if(e.phases.includes(`device`))for(let t of e.devices)r+=t.modelIds.length*(w7+S7.length*n);return e.phases.includes(`pipeline`)&&(r+=e.devices.length*(w7+C7.length*n)),Math.min(r,e.budgetMinutes*6e4)}function uve(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 T7(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 dve(e,t){let n=t.staleAfterMs??vz.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 E7(e,t){let n=new Map;for(let t of e){let e=T7(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(T7(i))?.id!==i.id){r.set(i.id,{standing:`superseded`,staleWhy:null});continue}let e=dve(i,t);r.set(i.id,e===null?{standing:`fresh`,staleWhy:null}:{standing:`stale`,staleWhy:e})}return r}function D7(e,t){let n=E7(e,t);return e.filter(e=>n.get(e.id)?.standing===`fresh`)}function fve(e,t,n){let r={};for(let i of D7(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 O7(e){return Math.max(0,Math.floor(e))}function pve(e,t,n){let r=new Map;for(let i of D7(e,n)){if(!t.includes(i.nodeId))continue;let e=mve(i),n=r.get(i.nodeId)??new Map,a=`${e.deviceKey}\u0000${e.modelId??``}`,o=n.get(a);(o===void 0||hve(e,o))&&n.set(a,e),r.set(i.nodeId,n)}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.deviceKey.localeCompare(t.deviceKey)||(e.modelId??``).localeCompare(t.modelId??``))})}return i}function mve(e){let{cell:t}=e;return t.phase===`pipeline`?{deviceKey:t.deviceKey,maxSessions:t.maxSessions,modelId:t.modelId,measuredAtMs:e.measuredAtMs,phase:`pipeline`}:{deviceKey:t.deviceKey,maxSessions:O7(t.kMax),modelId:t.modelId,measuredAtMs:e.measuredAtMs,phase:`device`}}function hve(e,t){return e.phase===t.phase?e.measuredAtMs>t.measuredAtMs:e.phase===`pipeline`}var k7=`object-detection`;function A7(e,t){return e.slots.find(e=>e.id===t)?.addons??[]}var j7=(e,t)=>t.inputClasses.some(t=>e.outputClasses.includes(t));function M7(e){let t=A7(e,`detector`).find(e=>e.id===k7);if(t===void 0)return null;let n=A7(e,`classifier`),r=A7(e,`cropper`).filter(e=>j7(t,e)).map(e=>({cropper:e,recognizers:n.filter(t=>j7(e,t))})),i=new Set(r.flatMap(e=>e.recognizers.map(e=>e.id)));return{root:t,croppers:r,classifiers:n.filter(e=>j7(t,e)&&!i.has(e.id)),refiners:A7(e,`refiner`)}}function gve(e){let t=M7(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 _ve(e,t,n){let r=M7(e);if(r===null)throw Error(`the node's catalog has no ${k7} 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 vve=`object-detection`,yve=640,bve=800,xve=.25,Sve=640,Cve=2,wve=500,Tve=.25,Eve=.35,Dve=2e3,N7=.5,Ove=.7,kve=2;function P7(e){return Math.max(0,e.w)*Math.max(0,e.h)}var F7=P7;function Ave(e,t){return 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))}function I7(e,t){let n=F7(e);if(n<=0)return 0;let r=0;for(let n of t)r+=Ave(e,n);return 1-Math.min(1,r/n)}function L7(e,t,n,r){return{left:Math.round(Math.max(0,Math.min(r.width-n,e-n/2))),top:Math.round(Math.max(0,Math.min(r.height-n,t-n/2))),side:n}}function jve(e,t,n){return t>=e.left&&t<=e.left+e.side&&n>=e.top&&n<=e.top+e.side}function Mve(e,t){let n=e.w*t.width,r=e.h*t.height,i=Math.max(n,r),a=i*1.5,o=Math.round(Math.min(Math.max(a,640),800)),s=(e.x+e.w/2)*t.width,c=(e.y+e.h/2)*t.height;if(a<=800)return[L7(s,c,o,t)];let l=n>=r,u=i/4;return[L7(l?s-u:s,l?c:c-u,o,t),L7(l?s+u:s,l?c:c+u,o,t)]}function R7(e,t){return F7(e)>.25?`too-large`:t<.35?`covered`:`eligible`}function Nve(e){let t=0,n=0,r=0;for(let i of e.regions)switch(R7(i,I7(i,e.detections))){case`too-large`:t+=1;break;case`covered`:n+=1;break;case`eligible`:r+=1;break}return{tooLarge:t,covered:n,eligible:r}}function Pve(e){let{native:t}=e;if(Math.min(t.width,t.height)<640)return[];let n=e.regions.map(t=>({region:t,uncovered:I7(t,e.detections)})).filter(({region:e,uncovered:t})=>R7(e,t)===`eligible`).toSorted((e,t)=>F7(t.region)*t.uncovered-F7(e.region)*e.uncovered),r=[];for(let{region:e}of n)for(let n of Mve(e,t)){if(r.length>=2)return r;let e=n.left+n.side/2,t=n.top+n.side/2;r.some(n=>jve(n,e,t))||r.push(n)}return r}function Fve(e,t,n,r,i){let a=t.side/Math.max(1,n.width),o=r.width/Math.max(1,i.width),s=r.height/Math.max(1,i.height),c=[];for(let r of e){let{x:e,y:i,width:l,height:u}=r.bbox;e<=2||i<=2||e+l>=n.width-2||i+u>=n.height-2||c.push({...r,nativeRecovery:{score:r.score,cropSidePx:t.side,viewPx:n.width},bbox:{x:(t.left+e*a)*o,y:(t.top+i*a)*s,width:l*a*o,height:u*a*s}})}return c}function Ive(e,t){return Math.max(0,Math.min(e.x+e.width,t.x+t.width)-Math.max(e.x,t.x))*Math.max(0,Math.min(e.y+e.height,t.y+t.height)-Math.max(e.y,t.y))}function Lve(e,t){let n=Ive(e,t);if(n<=0)return!1;let r=e.width*e.height,i=r+t.width*t.height-n;return i>0&&n/i>=.5?!0:r>0&&n/r>=.7}function Rve(e,t){let n=[];for(let[r,i]of t.entries())[...e,...n].some(e=>e.macroClass===i.macroClass&&Lve(i.bbox,e.bbox))||n.push({...i,id:`recovered-${r}-${i.id}`});return[...e,...n]}function zve(e){let t=e.find(e=>e.addonId===`object-detection`&&e.enabled!==!1);return t?{addonId:t.addonId,...t.modelId===void 0?{}:{modelId:t.modelId},enabled:!0}:null}var Bve=`motionCropDispatch`;function z7(e){return e?.motionCropDispatch===!0?`motion-crop`:`uncovered-region`}function Vve(e){return z7(e.find(e=>e.addonId===`object-detection`&&e.enabled!==!1)?.settings)}var B7=1.5,V7=1.25,Hve=3,H7=Object.freeze({person:.8,vehicle:.8});function Uve(e){let t=[],n=[];for(let r of e){let e=H7[r.macroClass];if(e!==void 0&&r.score<e){n.push({macroClass:r.macroClass,score:r.score,floor:e});continue}t.push(r)}return{kept:t,dropped:n}}function U7(e,t){let n=e.w*t,r=e.h*t;return{x:e.x+e.w/2-n/2,y:e.y+e.h/2-r/2,w:n,h:r}}function W7(e,t){return Math.min(e.x+e.w,t.x+t.w)>Math.max(e.x,t.x)&&Math.min(e.y+e.h,t.y+t.h)>Math.max(e.y,t.y)}function Wve(e,t){let n=Math.min(e.x,t.x),r=Math.min(e.y,t.y);return{x:n,y:r,w:Math.max(e.x+e.w,t.x+t.w)-n,h:Math.max(e.y+e.h,t.y+t.h)-r}}function Gve(e){let t=Math.max(0,e.x),n=Math.max(0,e.y);return{x:t,y:n,w:Math.min(1,e.x+e.w)-t,h:Math.min(1,e.y+e.h)-n}}function Kve(e){let t=[];for(let n of e){let e=n,r=!0;for(;r;){r=!1;for(let n=t.length-1;n>=0;--n){let i=t[n];i===void 0||!W7(e,i)||(e=Wve(e,i),t.splice(n,1),r=!0)}}t.push(e)}return t}function G7(e){if(e.regions.length===0)return[];let t=e.regions.map(e=>U7(e,B7));for(let n of e.detections)e.regions.some(e=>W7(n,e))&&t.push(U7(n,V7));return Kve(t).map(Gve).filter(e=>e.w>0&&e.h>0).toSorted((e,t)=>P7(t)-P7(e)).slice(0,3)}function qve(e,t){let n=e.w*t.width,r=e.h*t.height,i=Math.max(n,r),a=Math.round(Math.min(Math.max(i,640),800)),o=(e.x+e.w/2)*t.width,s=(e.y+e.h/2)*t.height;if(i<=800)return[L7(o,s,a,t)];let c=n>=r,l=i/4;return[L7(c?o-l:o,c?s:s-l,a,t),L7(c?o+l:o,c?s:s+l,a,t)]}function Jve(e,t){return t.left>=e.left&&t.top>=e.top&&t.left+t.side<=e.left+e.side&&t.top+t.side<=e.top+e.side}function Yve(e){let{native:t}=e;if(Math.min(t.width,t.height)<640)return[];let n=[];for(let r of G7(e))for(let e of qve(r,t))n.some(t=>Jve(t,e))||n.push(e);return n}var K7=1.6,Xve=160;function Zve(e,t,n){let r=Math.min(Math.max(e.w,e.h)*K7,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 Qve=`detail-crop`,q7=`detailCropPaddingRatio`,J7=`detailCropSquare`,Y7=d({paddingRatio:i().min(0).max(4),square:T()}),X7={paddingRatio:.15,square:!1};function Z7(e){let t=Y7.shape.paddingRatio.safeParse(e[q7]),n=Y7.shape.square.safeParse(e[J7]);return{paddingRatio:t.success?t.data:X7.paddingRatio,square:n.success?n.data:X7.square}}function $ve(e){return typeof e==`object`&&!!e&&`key`in e}function eye(e){if(e===null)return X7;let t={};for(let n of e.sections)for(let e of n.fields)!$ve(e)||typeof e.key!=`string`||(e.key===`detailCropPaddingRatio`||e.key===`detailCropSquare`)&&(t[e.key]=e.value);return Z7(t)}var tye=Object.freeze({x:0,y:0,w:1,h:1}),nye={min:0,max:1,step:.05,default:X7.paddingRatio};function rye(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?oye(iye(o,t,n),t,n):aye(o,t,n)}function iye(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 aye(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 oye(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 sye=`face-rescore`,cye=`faceRescoreIntervalMinutes`,Q7={min:0,max:1440,step:5,default:60},lye=10;function $7(e){return typeof e!=`number`||!Number.isFinite(e)||e<0?Q7.default:e===0?0:Math.min(Q7.max,Math.max(10,Math.floor(e)))}function uye(e){if(e===null)return Q7.default;for(let t of e.sections)for(let e of t.fields)if(!(typeof e!=`object`||!e||!(`key`in e))&&e.key===`faceRescoreIntervalMinutes`)return $7(`value`in e?e.value:void 0);return Q7.default}var dye=`native-lease`,e9=`nativeLeaseHoldFrames`,t9=`nativeLeaseBudgetMb`,n9=`nativeLeaseActivityMs`,r9=`nativeLeaseAdmission`,i9=`nativeTileBudgetMb`,a9=`nativeSceneBudgetMb`,o9=C([`all`,`inferred`]),s9=d({holdFrames:i().int().min(1).max(64),budgetMb:i().int().min(0).max(4096),activityMs:i().int().min(0).max(12e4),admission:o9,tileBudgetMb:i().int().min(0).max(1024),sceneBudgetMb:i().int().min(0).max(1024)}),c9={holdFrames:8,budgetMb:1024,activityMs:15e3,tileBudgetMb:64,sceneBudgetMb:48,admission:`inferred`},fye={min:1,max:64,step:1,default:c9.holdFrames},pye={min:0,max:4096,step:64,default:c9.budgetMb},mye={min:0,max:12e4,step:1e3,default:c9.activityMs},hye={min:0,max:1024,step:16,default:c9.tileBudgetMb},gye={min:0,max:1024,step:16,default:c9.sceneBudgetMb},_ye={options:[{value:`all`,label:`Every delivered frame`},{value:`inferred`,label:`Only frames sent to inference`}],default:c9.admission};function l9(e,t){let n=s9.shape[e].safeParse(t);return n.success?n.data===c9[e]?null:n.data:null}function vye(e){let t=o9.safeParse(e);return t.success?t.data===c9.admission?null:t.data:null}function u9(e){let t=l9(`holdFrames`,e[e9]),n=l9(`budgetMb`,e[t9]),r=l9(`activityMs`,e[n9]),i=vye(e[r9]),a=l9(`tileBudgetMb`,e[i9]),o=l9(`sceneBudgetMb`,e[a9]);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 yye(e){return typeof e==`object`&&!!e&&`key`in e}var bye=[e9,t9,n9,r9,i9,a9];function xye(e){if(e===null)return{};let t={};for(let n of e.sections)for(let e of n.fields)!yye(e)||typeof e.key!=`string`||bye.includes(e.key)&&(t[e.key]=e.value);return u9(t)}var d9=[{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 f9(e){let t=d9.find(t=>t.id===e);if(!t)throw Error(`Unknown access role '${e}'`);return t}function Sye(e){let t=f9(e.roleId);return[{type:`device`,selector:e.selector,access:[...t.deviceAccess],includeLinked:e.includeLinked},{type:`category`,target:`system`,access:[...t.systemAccess]}]}function p9(e,t){if(e.length!==t.length)return!1;let n=new Set(e);return t.every(e=>n.has(e))}function Cye(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=d9.find(e=>p9(e.deviceAccess,r.access)&&p9(e.systemAccess,i.access));return a?{roleId:a.id,selector:r.selector,includeLinked:r.includeLinked}:null}function m9(e){for(let t of e)if(t.type===`viewer`)return t;return null}function h9(e,t){let n=new Map;for(let e of t)n.set(e.id,e);let r=new Set;for(let i of t)Zh(e,i.id,e=>n.has(e)?b9(e,n):null)&&r.add(i.id);return r}var wye=8;function g9(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 _9(e,t){return e.some(e=>e.type===`category`&&e.target===`device`&&e.access.includes(t))}function v9(e,t){return e.filter(e=>e.type===`device`&&e.access.includes(t))}function y9(e,t){return e.includeLinked??t===`view`}function b9(e,t){let n=[],r=e;for(let e=0;e<wye;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 x9(e,t,n){let r=m9(e);return r===null?Tye(S9(e),t,n):h9(r,t)}function S9(e){let t=[];for(let n of e)n.type!==`viewer`&&t.push(n);return t}function Tye(e,t,n){if(_9(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=v9(e,n),a=new Set;for(let e of t)for(let t of i){if(g9(t.selector,e)){a.add(e.id);break}if(y9(t,n)&&b9(e.id,r).some(e=>{let n=r.get(e);return n!==void 0&&g9(t.selector,n)})){a.add(e.id);break}}return a}function Eye(e){if(!Array.isArray(e))return[];let t=[];for(let n of e){let e=ng.safeParse(n);e.success&&t.push(e.data)}return t}var C9=[`view`,`create`,`delete`];function w9(e,t,n,r){if(r)return{all:!0,deviceCount:t.length};let i=m9(e);if(i!==null){let e=h9(i,t);return{all:e.size===t.length,deviceCount:e.size}}let a=S9(e);return{all:_9(a,n)||v9(a,n).some(e=>e.selector.kind===`all`),deviceCount:x9(e,t,n).size}}function Dye(e){let t=[];for(let n of e)n.type===`capability`&&t.push({name:n.target,access:n.access});return t}function Oye(e){let t=[];for(let n of e)n.type===`addon`&&t.push({name:n.target,access:n.access});return t}function kye(e,t,n){let r={view:w9(e,t,`view`,n),create:w9(e,t,`create`,n),delete:w9(e,t,`delete`,n)},i=n?C9:C9.filter(t=>e.some(e=>e.type===`category`&&e.target===`system`&&e.access.includes(t))),a=n?null:m9(e);return{isAdmin:n,role:n?`admin`:a===null?`scoped`:`viewer`,features:a?.features??[],allDevicesViewable:r.view.all,viewableDeviceCount:r.view.deviceCount,device:r,system:i,capabilities:Dye(e),addons:Oye(e)}}var Aye={camera:{type:`camera`,label:`Camera`,icon:`camera`}};function jye(e,t,n){return!Number.isFinite(e)||t===n?e:l2(e,t,n)??e}function Mye(e,t,n){return!Number.isFinite(e)||t===n?e:l2(e,t,n)??e}var Nye=[{value:86400,unit:`d`},{value:3600,unit:`h`},{value:60,unit:`min`}],Pye=[{factor:1024**4,unit:`TiB`},{factor:1024**3,unit:`GiB`},{factor:1024**2,unit:`MiB`},{factor:1024,unit:`KiB`}];function T9(e,t){return Number.isFinite(e)?t===void 0?Number.isInteger(e)?String(e):e.toFixed(1):e.toFixed(t):``}function Fye(e){let t=Math.abs(e);for(let n of Nye)if(t>=n.value)return{value:e/n.value,unit:n.unit};return{value:e,unit:`s`}}function Iye(e){let t=Math.abs(e);for(let n of Pye)if(t>=n.factor)return{value:e/n.factor,unit:n.unit};return{value:e,unit:`B`}}function Lye(e){return e.quantity===`device`?e.deviceQuantity??`none`:e.quantity}function Rye(e){let t=Lye(e),n=e.precision;if(!Number.isFinite(e.value))return{text:``,unit:``,value:e.value};if(t===`duration`||t===`duration-ms`){let r=Fye(t===`duration-ms`?e.value/1e3:e.value);return{text:T9(r.value,n),unit:r.unit,value:r.value}}if(t===`information`){let t=Iye(e.value);return{text:T9(t.value,n),unit:t.unit,value:t.value}}let r=e.preference??`metric`,i=Ei(t),a=ji(t,r);if(i===void 0||a===void 0)return{text:T9(e.value,n),unit:``,value:e.value};let o=l2(e.value,i,a);return o===void 0?{text:T9(e.value,n),unit:i,value:e.value}:{text:T9(o,n),unit:a,value:o}}var zye={temperature:`temperature`,pressure:`pressure`,speed:`speed`,"precipitation-rate":`precipitation-rate`,length:`length`,area:`area`,illuminance:`illuminance`,irradiance:`irradiance`,power:`power`,"apparent-power":`apparent-power`,energy:`energy`,voltage:`voltage`,current:`current`,"concentration-volume":`concentration-volume`,"concentration-mass":`concentration-mass`,mass:`mass`,percentage:`percentage`,volume:`volume`,duration:`duration`,information:`information`,angle:`angle`,"sound-level":`sound-level`,"signal-level":`signal-level`,"colour-temperature":`colour-temperature`,bitrate:`bitrate`,rate:`rate`};function Bye(e){let t=GT(e);if(t===void 0)return;if(t===`ppb`)return`concentration-ppb`;if(t===`ms`)return`duration-ms`;let n=o2(t);if(n!==void 0)return zye[n]}function Vye(e){if(!Number.isFinite(e.value))return{ok:!1,reason:`non-finite`};if(e.quantity===`device`)return{ok:!1,reason:`unknown-unit`};let t=e.rawUnit?.trim();if(t===void 0||t.length===0)return{ok:!0,value:e.value};let n=GT(t);if(n===void 0)return{ok:!1,reason:`unknown-unit`};let r=Ei(e.quantity);if(r===void 0)return o2(n)===void 0?{ok:!1,reason:`unknown-unit`}:{ok:!1,reason:`cross-dimension`};let i=l2(e.value,n,r);return i===void 0?o2(n)===void 0?{ok:!1,reason:`unknown-unit`}:{ok:!1,reason:`cross-dimension`}:{ok:!0,value:i}}function Hye(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 E9(e,t){let n=e.trim().toLowerCase(),r=t.trim().toLowerCase();return n===r?1:n.length===0||r.length===0?0:1-Hye(n,r)/Math.max(n.length,r.length)}function Uye(e,t,n=.8){let r=null,i=0;for(let a of t){let t=E9(e,a);t>=n&&t>i&&(r=a,i=t)}return r}var Wye=`addon:`;function D9(e){return e.startsWith(Wye)?e.slice(6):e}function Gye(e,t){return D9(e)===D9(t)}function O9(e){return{runId:e.runId,state:e.state,startedAtMs:e.startedAtMs,finishedAtMs:e.finishedAtMs,progress:e.progress,result:e.result,error:e.error}}var Kye=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?.(O9(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)})),O9(r)}status(e){let t=this.runs.get(e);return t===void 0?null:O9(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(O9)}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 qye(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 Jye=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(),Yye(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 Yye(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}var k9=`/sso-complete`,A9=[`access_denied`,`invalid_state`,`invalid_request`,`unknown_broker`,`not_configured`,`exchange_failed`,`no_refresh_token`,`unavailable`,`unknown`];function j9(e){return A9.some(t=>t===e)}function Xye(e,t){let n=new URLSearchParams({return:`oauth`,status:t.status});return t.addonId!==void 0&&n.set(`addon`,t.addonId),t.brokerId!==void 0&&n.set(`broker`,t.brokerId),t.integration!==void 0&&n.set(`integration`,t.integration),t.status===`error`&&n.set(`reason`,t.reason??`unknown`),t.action===`disconnect`&&n.set(`action`,`disconnect`),`${e===null?``:e.replace(/\/+$/,``)}${k9}#${n.toString()}`}function Zye(e){if(!e.startsWith(`#`))return null;let t=new URLSearchParams(e.slice(1));if(t.get(`return`)!==`oauth`)return null;let n=t.get(`status`);if(n!==`success`&&n!==`error`)return null;let r=t.get(`addon`),i=t.get(`broker`),a=t.get(`integration`),o=t.get(`reason`);return{status:n,...r!==null&&r.length>0?{addonId:r}:{},...i!==null&&i.length>0?{brokerId:i}:{},...a!==null&&a.length>0?{integration:a}:{},...n===`error`?{reason:j9(o)?o:`unknown`}:{},...t.get(`action`)===`disconnect`?{action:`disconnect`}:{}}}var $=1024*1024,M9={sampleIntervalMs:6e4,baselineSettleSamples:5,baselineSampleCount:3,restartMultiple:4,floorBytes:1024*$,ceilingBytes:3072*$,cooldownMs:30*6e4,maxRestartsPerWindow:6,restartWindowMs:1440*6e4};function Qye(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=M9;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 $ye(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 N9(){return{settleSeen:0,baselineWindow:[],baselineBytes:null,restartsAt:[],lastRestartAt:null}}function ebe(e){let t=[...e].sort((e,t)=>e-t);return t[Math.floor(t.length/2)]}function tbe(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:ebe(r)}}function P9(e,t){return e===null?t.ceilingBytes:Math.min(t.ceilingBytes,Math.max(t.floorBytes,t.restartMultiple*e))}function nbe(e,t,n){return e.filter(e=>t-e<n.restartWindowMs)}function F9(e,t,n,r){let i=tbe(e,t,r),a=P9(i.baselineBytes,r);if(t<=a)return{state:i,action:i.baselineBytes===null?`baseline-pending`:`ok`,baselineBytes:i.baselineBytes,thresholdBytes:a};let o=nbe(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 I9(e,t){return{...N9(),restartsAt:[...e.restartsAt,t],lastRestartAt:t}}function L9(e){return{...N9(),restartsAt:e.restartsAt,lastRestartAt:e.lastRestartAt}}function R9(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 rbe=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??N9();t&&t.pids.length>0&&!ibe(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=L9(a));let o=F9(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=R9(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:I9(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 ibe(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 abe(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 obe(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 sbe=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 cbe(e,t){let n=performance.now();try{return{output:t===void 0?await e():await lbe(e(),t),durationMs:z9(performance.now()-n),ok:!0}}catch(e){return{output:void 0,durationMs:z9(performance.now()-n),ok:!1,error:qa(e)}}}function z9(e){return Math.round(e*100)/100}function lbe(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 B9={openvino:`openvino`,edgetpu:`tflite`,coreml:`coreml`,onnx:`onnx`,cpu:`onnx`,cuda:`onnx`};function ube(e){return B9[e]??`onnx`}var V9={onnx:`onnx`,coreml:`coreml`,openvino:`openvino`,tflite:`tflite`,pytorch:`pt`},H9={coreml:`coreml_inference.py`,pytorch:`pytorch_inference.py`,openvino:`openvino_inference.py`};function U9(e){return V9[e]}function dbe(e){return H9[e]}function fbe(e){return e===`coreml`||e===`pytorch`||e===`openvino`}function pbe(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 mbe(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 hbe(e){return Math.floor(Buffer.from(e,`base64`).byteLength/4)}function gbe(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=>W9(t,e,n,l)),f=s.some(t=>W9(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 W9(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&&_be(t,e.polygon))return!0}return!1}function _be(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 vbe(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 ybe=[`usb`,`pci`];function bbe(e,t){return t===0?e:`${e}:${t}`}function xbe(e,t){return e.units===void 0?t===(e.bus===`pci`?`pci`:`usb`)?Math.max(1,e.count??1):0:e.units.filter(e=>e.bus===t).reduce((e,t)=>e+Math.max(0,t.count),0)}function G9(e){if(e==null)return[];let t=[];for(let n of ybe){let r=xbe(e,n);for(let e=0;e<r;e++)t.push({bus:n,index:e,device:bbe(n,e)})}return t}var Sbe=/^(usb|pci)(?::(\d+))?$/;function Cbe(e){let t=Sbe.exec(e.trim());if(t===null)throw Error(`edgetpu device "${e}" is not usb[:N] or pci[:N]`);let[,n,r]=t;return`${n}:${r??`0`}`}var K9={value:`auto`,label:`Auto`},q9={value:`cpu`,label:`CPU`},wbe={value:`usb`,label:`Coral USB`};function Tbe(e){let t=e.bus===`pci`?`PCIe`:`USB`,n=e.index===0?`Coral ${t}`:`Coral ${t} ${e.index+1}`;return{value:e.device,label:n}}var J9=[{id:`onnx`,supports:()=>!0,devices:e=>{if(!e)return[q9];let t=[q9];return e.gpu?.type===`nvidia`&&t.push({value:`cuda`,label:`CUDA`}),e.gpu?.type===`amd`&&e.platform===`linux`&&t.push({value:`webgpu`,label:`WebGPU (AMD iGPU)`}),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`||e.gpu?.type===`amd`),devices:e=>{if(!e)return[K9];if(e.gpu?.type===`amd`)return[q9];let t=[K9,q9];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`},q9),n},defaultDevice:`all`},{id:`edgetpu`,supports:e=>G9(e?.coral).length>0,devices:e=>{let t=G9(e?.coral);return t.length>0?t.map(Tbe):[wbe]},defaultDevice:`usb`}];function Y9(e){let t=J9.find(t=>t.id===e);if(!t)throw Error(`Unknown runtime: ${e}`);return t}function Ebe(e){return J9.filter(t=>t.supports(e)).map(e=>e.id)}function Dbe(e,t){return Y9(e).devices(t)}function Obe(e){return Y9(e).defaultDevice}function kbe(e){return e===`edgetpu`?`tflite`:U9(e)}function X9(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.gpu?.type===`amd`&&(e.platform===`linux`&&t.push({runtime:`python`,backend:`onnx`,format:`onnx`,score:75,reason:`ONNX WebGPU (AMD iGPU)`,available:!0}),t.push({runtime:`python`,backend:`openvino`,format:`openvino`,score:65,reason:`OpenVINO CPU (AMD x64)`,available:!0})),G9(e.coral).length>0&&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 Abe={cuda:`gpu`,edgetpu:`usb`,coreml:`all`,cpu:`cpu`};function Z9(e,t,n,r){return{key:e===`cpu`?`cpu`:`${e}:${t}`,backend:e,device:t,format:n,runtime:`python`,score:r,available:!0}}function jbe(e){let{scores:t}=X9(e),n=[];for(let r of t){if(r.backend===`openvino`){e.npu?.type===`intel-npu`&&n.push(Z9(`openvino`,`npu`,r.format,r.score+2)),e.gpu?.type===`intel`&&n.push(Z9(`openvino`,`gpu`,r.format,r.score)),e.gpu?.type===`amd`&&n.push(Z9(`openvino`,`cpu`,r.format,r.score));continue}if(r.backend===`edgetpu`){for(let t of G9(e.coral))n.push(Z9(`edgetpu`,t.device,r.format,r.score));continue}if(r.backend===`onnx`&&r.reason.startsWith(`ONNX WebGPU`)){n.push(Z9(`onnx`,`webgpu`,r.format,r.score));continue}let t=Abe[r.backend]??r.backend;n.push(Z9(r.backend,t,r.format,r.score))}return n}var Q9=360*60*1e3;async function $9(e){let t=e.now??(()=>Date.now()),n=e.api;if(n===void 0)return e.logger.warn(`device removal reconcile skipped — no device-manager api`),{read:!1,applied:0,failed:0};let r;try{r=await n.deviceManager.listDeletedSince.query({sinceMs:t()-OD})}catch(t){return e.logger.warn(`device removal reconcile skipped — tombstones unreadable, nothing deleted`,{meta:{error:qa(t)}}),{read:!1,applied:0,failed:0}}let i=0,a=0;for(let t of r)try{let n=await e.remove(t);i+=1,Object.values(n.counts).reduce((e,t)=>e+t,0)>0&&e.logger.info(`device removal reconcile cleaned a missed deletion`,{tags:{deviceId:t.deviceId},meta:{counts:n.counts,deletedAt:t.deletedAt}})}catch(n){a+=1,e.logger.warn(`device removal reconcile failed for a device — retried next pass`,{tags:{deviceId:t.deviceId},meta:{error:qa(n)}})}return{read:!0,applied:i,failed:a}}function Mbe(e){let t=!1,n=()=>{t||(t=!0,$9(e).catch(t=>{e.logger.warn(`device removal reconcile pass crashed`,{meta:{error:qa(t)}})}).finally(()=>{t=!1}))};n();let r=setInterval(n,Q9);return r.unref?.(),()=>clearInterval(r)}export{Qde as ACCESSORY_LABEL,d9 as ACCESS_ROLES,bc as ACTIVE_CRITERIA,X0 as ACTUATOR_METHODS,yle as ACTUATOR_TEMPLATE_IDS,Are as ADMIN_SCOPE,Ioe as AGENT_MDNS_QUERY_NAME,Foe as AGENT_MDNS_SERVICE_TYPE,Loe as AGENT_MDNS_TXT_KEYS,xc as AGGREGATE_REDUCERS,$5 as AGGREGATE_THROUGHPUT_BY_KIND,bne as ALEXA_EGRESS_PROFILE,Rpe as ALL_CAPABILITY_DEFINITIONS,Nre as ALL_METHOD_ACCESS,Lm as APPEARANCE_BIN_COUNT,Rm as APPEARANCE_BLOCKS,Im as APPEARANCE_DESCRIPTOR_VERSION,zm as APPEARANCE_RESOLVES_AMBIGUITY_DEFAULT,vj as APPLE_SA_TO_MACRO,Ts as APPLIANCE_DEFAULTS,b3 as APPLIANCE_EXPORT,xs as APPLIANCE_KINDS,bs as APPLIANCE_TEMPLATE_ID,eie as APP_AUTH_CALLBACK_MAX_LENGTH,hg as APP_AUTH_CALLBACK_URLS,xg as APP_FLOW_DEFAULT_REDIRECT,Sg as APP_FLOW_REFUSAL_MESSAGES,nie as APP_FLOW_STATE_PREFIX,aie as APP_REFUSED_PATH,Cg as APP_START_REFUSAL_MESSAGES,vd as ARCHIVED_DEBUG_NOTES_DEFAULT_LIMIT,Mc as ARITHMETIC_OPS,Mu as AUDIO_ANALYSIS_CAP_NAME,qv as AUDIO_BACKEND_CHOICES,_e as AUDIO_CHUNK_FORMATS,Sj as AUDIO_GRADIENT_ALPHAS,gj as AUDIO_MACRO_LABELS,zv as AUDIO_NOT_CLASSIFIED_REASONS,Ja as AUDIO_PRESETS,q3 as AUDIO_SCALE_EPOCH_ISO,J3 as AUDIO_SCALE_EPOCH_MS,XO as AUTOMATIC_HUB_ADDRESS_FLAGS,nce as AUTO_SHARE_HEADROOM,Z5 as AUTO_TUNE_FAMILY,HY as AcceleratorComputeSchema,IR as AcceleratorKindSchema,aU as AccessoriesStatusSchema,h4 as AccessoryKind,Z_ as ActionEntrySchema,rv as ActionError,nv as ActionErrorCodeSchema,Q_ as ActionInputSchema,KU as ActionLinksSchema,iv as ActionRunChangedSchema,$_ as ActionRunOriginSchema,ev as ActionRunOutcomeSchema,tv as ActionRunResultSchema,W_ as ActionSourceKindSchema,Y_ as ActionStatusSchema,Zg as ActionStepSchema,V_ as ActionVariableSchema,z_ as ActionVariableTypeSchema,B_ as ActionVariableValueSchema,wc as ActiveCriterionSchema,KA as AddBrokerInputSchema,nL as AddRetrainFrameFromRecordingResultSchema,TU as AddonAutoUpdateSchema,vU as AddonListItemSchema,lv as AddonPageDeclarationSchema,sv as AddonPageInfoSchema,ag as AddonRoutesScopeSchema,MT as AdminLinkTargetEnum,aE as AdoptionAdoptInputSchema,oE as AdoptionAdoptResultSchema,Su as AdoptionCandidateResultSchema,QT as AdoptionFilterSchema,nE as AdoptionGetCandidateInputSchema,Cu as AdoptionJobSchema,bu as AdoptionJobStateSchema,eE as AdoptionListCandidatesInputSchema,tE as AdoptionListCandidatesOutputSchema,xu as AdoptionOutcomeSchema,sE as AdoptionReleaseInputSchema,rE as AdoptionStatusSchema,NB as AgentLoadSummarySchema,Cc as AggregateReducerSchema,FU as AirQualitySensorStatusSchema,iM as AlarmArmModeSchema,aM as AlarmPanelStatusSchema,rM as AlarmStateSchema,P8 as AlertEpisodePayloadSchema,kv as AlertSchema,Tv as AlertSeveritySchema,Ov as AlertSourceSchema,Dv as AlertStatusSchema,LU as AmbientLightSensorStatusSchema,qL as AnalyticsLtsSeriesSchema,vg as AppFlowPurposeSchema,wg as AppLoginPathSchema,yg as AppPageLangSchema,zk as AppleFmAvailabilitySchema,Rk as AppleFmUnavailableReasonSchema,Dc as ApplianceHelperSpecSchema,Ay as ArchiveEntrySchema,jy as ArchiveManifestSchema,wy as ArchiveSqliteSnapshotSchema,bd as ArchivedDebugNoteQueryInputSchema,yd as ArchivedDebugNoteSchema,hne as ArithmeticHelperSpecSchema,ej as AttachmentMediaTypeSchema,tj as AttachmentSchema,Vv as AudioAnalysisResultSchema,Hv as AudioAnalysisSettingsSchema,Uv as AudioAttachDeviceInputSchema,Wv as AudioAttachDeviceResultSchema,Ki as AudioChunkFormatSchema,Iv as AudioChunkInputSchema,zU as AudioClassSummarySchema,Rv as AudioClassificationLabelSchema,Kv as AudioClassificationResultSchema,Bv as AudioClassifyOutcomeSchema,Zv as AudioCodecInfoSchema,Qv as AudioDecodeSessionConfigSchema,Gv as AudioDetachDeviceResultSchema,nu as AudioEncodeSchema,$v as AudioEncodeSessionConfigSchema,ty as AudioEncodedChunkSchema,_I as AudioEventSchema,Lv as AudioLevelSchema,VU as AudioMetricsHistoryPointSchema,HU as AudioMetricsHistorySchema,BU as AudioMetricsSnapshotSchema,ey as AudioPcmChunkSchema,Ni as AudioStreamPickSchema,ry as AuthResultSchema,JR as AutoTuneApplyInputSchema,XR as AutoTuneApplyResultSchema,KR as AutoTuneOptionsSchema,YR as AutoTunePhaseResultSchema,qR as AutoTunePlanSchema,GR as AutoTuneWarningSchema,wU as AutoUpdateSettingsSchema,Qg as AutomationActionSchema,Xg as AutomationCapStepSchema,Kg as AutomationConditionOperatorSchema,qg as AutomationConditionSchema,A_ as AutomationConditionTraceNodeSchema,JU as AutomationControlStatusSchema,e_ as AutomationRecipeSchema,$g as AutomationRunModeSchema,D_ as AutomationRunOutcomeSchema,N_ as AutomationRunTraceSchema,j_ as AutomationRunVerdictSchema,P_ as AutomationStateDocSchema,M_ as AutomationStepTraceSchema,Jg as AutomationTriggerSchema,k_ as AutomationTriggerTraceSchema,Yg as AutomationWaitStepSchema,RK as AvailableIntegrationTypeSchema,jC as BASE_DEVICE_CAPS,cu as BASE_LIVE_EGRESS_PROFILE,g3 as BATTERY_DEVICE_PROFILE,lfe as BATTERY_UNREACHABLE_AFTER_MS,k7 as BENCH_ROOT_STEP_ID,yc as BINARY_AGGREGATES,dd as BIRTH_DECISION_DEFAULT_LIMIT,Ra as BOOT_RECOVERY_BACKOFF_MS,Sx as BUILTIN_RESULT_KINDS,Kye as BackgroundRunRegistry,AK as BacklightModeSchema,Dy as BackupArchiveEncryptionSchema,Ey as BackupDestinationInfoSchema,Oy as BackupEncryptionStatusSchema,ky as BackupEntrySchema,Py as BackupRunPhaseSchema,Fy as BackupRunSchema,Ny as BackupRunStateSchema,Iy as BackupTriggerResultSchema,fn as BaseAddon,nfe as BaseDevice,cfe as BaseDeviceProvider,gr as BatchTooLargeError,XU as BatteryStatusSchema,$U as BinaryStatusSchema,md as BirthDecisionCropSourceSchema,gd as BirthDecisionQueryInputSchema,hd as BirthDecisionRecordSchema,pd as BirthDecisionVerdictSchema,Pv as BoundingBoxSchema,tW as BrightnessStatusSchema,Gy as BrokerAddInputSchema,mb as BrokerAudioClientSchema,vb as BrokerClientsSchema,GA as BrokerConnectionDetailsSchema,gb as BrokerConsumerAttributionSchema,hb as BrokerConsumerKindSchema,_b as BrokerEncodedClientSchema,ib as BrokerGetStateInputSchema,By as BrokerInfoSchema,By as UnifiedBrokerInfoSchema,Hy as BrokerProviderInfoSchema,eb as BrokerPublishInputSchema,Vy as BrokerRegistryStatusSchema,pb as BrokerRtspClientSchema,Zi as BrokerStatsSchema,zy as BrokerStatusEnum,Xi as BrokerStatusSchema,tb as BrokerSubscribeInputSchema,nb as BrokerSubscribeResultSchema,Jy as BrokerTestConnectionResultSchema,rb as BrokerUnsubscribeInputSchema,Ype as BucketAccumulator,uy as BulkRecordSchema,Ys as CALENDAR_PERIODS,Zee as CALLER_STAMPED_CAPABILITIES,uF as CAMERA_SENSORS_NOT_LOADED,YP as CAMERA_SENSORS_SETTINGS_KEY,Fu as CAMERA_SWITCH_CATALOG,Tu as CAMERA_SWITCH_ORDER,qP as CAMERA_TRIGGER,RO as CAMSTACK_APP_LINK_ORIGIN,zu as CAMSTACK_EVENT_PREFIX,Mi as CAM_PROFILE_ORDER,Ipe as CAPABILITY_NAMES,Lpe as CAPABILITY_ROUTER_KEYS,w2 as CAP_CUSTOMIZE_CATALOG,Fpe as CAP_NAMES_WITH_STATUS,aa as CAP_NODE_PIN_CONTEXT_KEY,A3 as CAP_PROVIDER_KIND_MAP,T2 as CAP_RUNTIME_FIELD_UNITS,J4 as CAP_VOCABULARY,Y4 as CAP_VOCABULARY_BY_NAME,o_e as CATALOG_LANGS,of as CLASS_MAP_MACRO_TARGETS,WH as CLIP_BROKER_PACED_RATES,q0 as CLIP_LABEL_EVENT_FETCH_LIMIT,Gce as CLIP_PLAYBACK_OPTIONS,KH as CLIP_REALTIME_SOURCE_RATES,Rce as CLIP_REASON_HEADER_MAX,oh as CLIP_SEARCH_STRICTNESS,Vce as CLIP_STILL_DISPOSITION_HEADER,Bce as CLIP_STILL_REASON_CODE_HEADER,Lce as CLIP_STILL_REASON_HEADER,GH as CLIP_STREAM_SOURCE_RATES,Hce as CLIP_STREAM_TRANSPORT_HEADER,ch as CLIP_STRICTNESS_FACTOR,ih as CLIP_VECTOR_INDEX_PATTERN,fF as CLUSTER_MODEL_CHOICE_UNREADABLE_REASONS,pF as CLUSTER_MODEL_SCOPED_STEPS,mF as CLUSTER_MODEL_SECTION_ID,OF as CLUSTER_STEP_SETTING_FIELDS,h_ as COCO_80_LABELS,v_ as COCO_TO_MACRO,Wc as COMPOSED_DEVICE_STABLE_ID_PREFIX,Bx as COMPOSED_ITEM_FIXED_FIELDS,Hc as COMPOSER_ADDON_ID,Bae as COMPOSER_RUNNER_ID,Kb as COMPOSITION_EVENT_CATEGORY,sl as COMPOSITION_ITEM_ARRAY_PATH,al as COMPOSITION_ITEM_KEY_RE,RW as CONNECTION_TEST_TIMEOUT_MS,x4 as CONTAINER_CHILD_PRIORITY,Q5 as CORAL_DEFAULT_MODEL_ID,JC as CORE_BLOCKS_ADDON_ID,qC as CORE_BLOCK_ADDON_PREFIX,LY as CORE_ULTRA_265K_IGPU_CLOCK_MHZ,IY as CORE_ULTRA_265K_IGPU_EU,Bre as CREDENTIAL_TOKEN_AUDIENCE,lg as CREDENTIAL_TOKEN_KIND,H7 as CROP_CLASS_FLOORS,gh as CROP_SUPPLY_SOURCES,uh as CROP_SUPPLY_STEP_IDS,Uc as CUSTOMIZATION_BLOCK_NAME_PREFIX,fW as CalendarColorSchema,pW as CalendarEntrySchema,oW as CalendarEventSchema,aW as CalendarInfoSchema,sW as CalendarListEventsInputSchema,mW as CalendarPreferenceEntrySchema,hW as CalendarPreferencesSchema,gW as CalendarSetPreferenceInputSchema,iW as CalendarSourceKindSchema,nne as CalendarWindowSchema,j as CamProfileSchema,C$ as CamStreamDescriptorSchema,Pi as CamStreamKindSchema,Fi as CamStreamResolutionSchema,zB as CameraAssignmentStatusSchema,JB as CameraAudioStatusSchema,BB as CameraBrokerProfileSchema,VB as CameraBrokerStatusSchema,vW as CameraCredentialsSchema,yW as CameraCredentialsStatusSchema,HB as CameraDecoderStatusSchema,KB as CameraDetectionPhaseSchema,GB as CameraDetectionProvisioningSchema,WB as CameraDetectionProvisioningStateSchema,jB as CameraDetectionSourceSchema,qB as CameraDetectionStatusSchema,Kz as CameraMetricsSchema,qz as CameraMetricsWithDeviceIdSchema,UB as CameraMotionStatusSchema,a0 as CameraOccupancySnapshotForDeviceSchema,oF as CameraOwnMotionSchema,cF as CameraRawLevelSchema,YB as CameraRecordingModeSchema,XB as CameraRecordingStatusSchema,iF as CameraSensorAttachmentSchema,tF as CameraSensorEntrySchema,$P as CameraSensorModeSchema,ZP as CameraSensorRefSchema,nF as CameraSensorsConfigSchema,sF as CameraSensorsNotEnforcedSchema,aF as CameraSensorsNotForwardedSchema,lF as CameraSensorsStatusSchema,RB as CameraSourceStatusSchema,LB as CameraSourceStreamSchema,QB as CameraStatusDegradationReasonSchema,$B as CameraStatusDegradationSchema,tV as CameraStatusSchema,ZB as CameraStatusStageSchema,Ii as CameraStreamSchema,Eu as CameraSwitchAuthoritySchema,Au as CameraSwitchGroupSchema,wu as CameraSwitchIdSchema,ku as CameraSwitchSchema,Du as CameraSwitchUnavailableReasonSchema,Ou as CameraSwitchWarningSchema,Fa as CamstackError,$T as CandidateQueryFilterSchema,$h as CapScopeSchema,FB as CapabilityBindingsSchema,oz as CapacityFallbackSchema,az as CapacitySourceSchema,DW as CarbonMonoxideStatusSchema,c_e as CatalogFileSchema,h5 as CatalogLangSchema,Ka as ChargingStatus,oO as ClaimOutcomeSchema,cO as ClaimsListingSchema,AD as CleanupDeletedDevicesResultSchema,Ad as ClearTrackRelationInputSchema,jd as ClearTrackRelationResultSchema,SJ as ClientNetworkStatsSchema,AW as ClimateControlStatusSchema,BH as ClipBytesOfferSchema,zH as ClipBytesSchema,$Z as ClipExportFailureSchema,ah as ClipModelMetaSchema,qH as ClipPlaybackOptionsSchema,LH as ClipPlaybackSchema,IH as ClipSchema,sh as ClipSearchStrictnessSchema,JH as ClipSourceAvailabilitySchema,YH as ClipSourceSchema,Ice as ClipStillDispositionSchema,Fce as ClipStillRefusalCodeSchema,HH as ClipStreamAudioReasonSchema,VH as ClipStreamAudioSchema,UH as ClipStreamDialSchema,RH as ClipWakeSchema,MJ as ClusterAddonNodeDeploymentSchema,NJ as ClusterAddonStatusEntrySchema,iV as ClusterModelChoiceSchema,my as CollectionColumnSchema,hy as CollectionIndexSchema,FW as ColorStatusSchema,Tie as CompleteEnrollmentInputSchema,Ng as CompleteEnrollmentOutputSchema,Eie as CompleteEnrollmentResultSchema,UC as ComposableCapabilitiesSchema,HC as ComposableCapabilitySchema,VC as ComposableFieldSchema,mx as ComposerApplyInputSchema,gx as ComposerApplyResultSchema,dx as ComposerBlockSchema,hx as ComposerBlockVerdictSchema,fx as ComposerUnreadableBlockSchema,el as CompositionAggregateSourceSchema,Zc as CompositionBindingSchema,iw as CompositionBlockInputSchema,ux as CompositionBlockStateSchema,$c as CompositionCodeSourceSchema,il as CompositionCommandTargetSchema,dw as CompositionCustomizationReadSchema,qb as CompositionEventPlanSchema,ml as CompositionExistingTargetSchema,Qc as CompositionExpressionSourceSchema,ix as CompositionFeatureModeSchema,ax as CompositionFeaturePlanSchema,dl as CompositionFeatureSchema,tx as CompositionFieldItemSchema,Qb as CompositionFieldKindSchema,nx as CompositionFieldPlanSchema,Jc as CompositionFieldReadSchema,ex as CompositionFieldRoleSchema,nl as CompositionFieldSourceSchema,cx as CompositionFieldStateKindSchema,lx as CompositionFieldStateSchema,ll as CompositionFieldsFeatureSchema,rl as CompositionForwardCommandSchema,Yc as CompositionFromSourceSchema,uw as CompositionGetReadSchema,bC as CompositionGraphError,cl as CompositionItemEntrySchema,lw as CompositionListReadSchema,Xc as CompositionLiteralBindingSchema,pl as CompositionNewTargetSchema,ul as CompositionPassthroughFeatureSchema,Xb as CompositionProblemCodeSchema,Zb as CompositionProblemSchema,sx as CompositionRunStatusSchema,gl as CompositionSchema,tl as CompositionSeriesSourceSchema,gc as CompositionSourceRefSchema,ow as CompositionStateReadSchema,hl as CompositionTargetSchema,$b as CompositionUnavailableModeSchema,ox as CompositionValidationSchema,sw as CompositionViewSchema,eae as ConditionMirror,mD as ConfigEntrySchema,pv as ConfigSectionWithValuesSchema,fv as ConfigTabDeclarationSchema,VW as ConnectionTestDescriptorSchema,BW as ConnectionTestInputSchema,zW as ConnectionTestOutcomeSchema,UW as ConnectivityStatusSchema,KW as ConsumableFormSchema,eG as ConsumableItemSchema,GW as ConsumableKindSchema,JW as ConsumableLevelSchema,QW as ConsumableRemainingKindSchema,$W as ConsumableRemainingSchema,qW as ConsumableStatusSchema,tG as ConsumablesStatusSchema,aG as ContactStatusSchema,sG as ControlKindSchema,cG as ControlStatusSchema,Vh as ConvertArtifactSchema,Hh as ConvertResultSchema,zh as ConvertTargetSchema,pw as CoreBlockCompileInputSchema,fw as CoreBlockCompileResultSchema,QC as CoreBlockFilesSchema,ew as CoreBlockInputFieldsSchema,tw as CoreBlockInputSchema,YC as CoreBlockPlacementSchema,aw as CoreBlockSchema,rw as CoreBlockSourceSchema,XC as CoreBlockStatusSchema,dG as CoverStateSchema,fG as CoverStatusSchema,VK as CreateIntegrationInputSchema,F1 as CreateUserInputSchema,sg as CredentialScopeSchema,Hre as CredentialTokenClaimsSchema,NU as CustomActionInputSchema,hw as CustomModelDescriptorSchema,nme as CustomizeAssignmentStatusSchema,Sae as DATABASE_SNAPSHOT_PARTIAL_SUFFIX,xae as DATABASE_SNAPSHOT_SUFFIX,vy as DATABASE_SNAPSHOT_TIMEOUT_MS,lee as DATAPLANE_SECRET_HEADER,bae as DATA_STORE_DATABASES,wQ as DAYS_PER_WEEK,qs as DAY_MS,DQ as DAY_NAMES,mfe as DECLARED_DEVICE_SWEEP_LIMIT,D4 as DECLARED_INTEGRATION_FIXED_KEY,Rne as DEFAULT_ADDON_PLACEMENT,Jv as DEFAULT_AUDIO_ANALYZER_CONFIG,U_e as DEFAULT_CAMERA_FPS,eF as DEFAULT_CAMERA_SENSOR_MODE,s_e as DEFAULT_CATALOG_LANG,_F as DEFAULT_CLUSTER_STEP_MODELS,NF as DEFAULT_CLUSTER_STEP_SETTINGS,ZC as DEFAULT_CORE_BLOCK_ENTRY,kT as DEFAULT_DECODER_HWACCEL_CONFIG,X7 as DEFAULT_DETAIL_CROP_CONVENTION,Ai as DEFAULT_DISPLAY_PREFERENCE,Cf as DEFAULT_EVENTS_BAND_BUFFER_SEC,Bse as DEFAULT_EVENT_COLOR,Jd as DEFAULT_FEATURES,wo as DEFAULT_FIRST_SIGHTING_FRESHNESS_MS,H_e as DEFAULT_HEADROOM,$s as DEFAULT_HISTORY_RETENTION,DF as DEFAULT_MIN_LANDMARK_FACE_SIZE_PX,NR as DEFAULT_MIN_SESSIONS_PER_DEVICE,c9 as DEFAULT_NATIVE_LEASE_SETTINGS,Vm as DEFAULT_OVERLAY_LAYERS,M9 as DEFAULT_POOL_MEMORY_POLICY,kf as DEFAULT_RECORDING_PROFILES,Gne as DEFAULT_RETENTION,Ree as DEFAULT_RUNTIME_STATE_DURABILITY,Jl as DEFAULT_SESSION_LOST_DEBOUNCE_MS,QR as DEFAULT_SESSION_PLACEMENT_POLICY,fz as DEFAULT_SHARE_SOURCE,f_e as DEFAULT_TIMELAPSE_PREVIEW_TEXT,rte as DEFAULT_TOKEN_EXPIRY,Kie as DEFAULT_TRACE_KEEP,xre as DEFAULT_VIEWER_SCOPE,jg as DEFINITIVE_DEVICE_REFUSALS,Ic as DERIVATIVE_UNITS,Kne as DERIVED_CAMERA_SILENCED_CAP_NAMES,nye as DETAIL_CROP_PADDING_FIELD,q7 as DETAIL_CROP_PADDING_KEY,Qve as DETAIL_CROP_SECTION_ID,J7 as DETAIL_CROP_SQUARE_KEY,__ as DETECTION_MACRO_CLASSES,ju as DETECTION_PIPELINE_CAP_NAME,AY as DETECTOR_ACCURACY,kY as DETECTOR_PERF,B9 as DEVICE_BACKEND_TO_FORMAT,Tfe as DEVICE_CAP_NAMES,pie as DEVICE_CERT_RENEW_WINDOW_DAYS,Tg as DEVICE_CERT_SIGNATURE,fie as DEVICE_CERT_VALIDITY_DAYS,$ee as DEVICE_CHILDREN_BATCH_MAX,xie as DEVICE_DEFINITIVE_REFUSALS_BEFORE_DELETE,X4 as DEVICE_DO_ACTIONS,mie as DEVICE_ENROLLMENT_TTL_MS,hoe as DEVICE_HISTORY_ENERGY_KEY,Toe as DEVICE_HISTORY_ORPHAN_DELETE_MAX,woe as DEVICE_HISTORY_ORPHAN_LIST_MAX,yoe as DEVICE_HISTORY_QUERY_MANY_MAX_ITEMS,hie as DEVICE_NONCE_TTL_MS,_3 as DEVICE_PROFILES,S7 as DEVICE_RAMP,Cie as DEVICE_REFRESH_REFUSAL_PREFIX,afe as DEVICE_RESTORE_RETRY_CONCURRENCY,v4 as DEVICE_RESTORE_RETRY_DELAYS_MS,gie as DEVICE_SAN_CREDENTIAL_PREFIX,_ie as DEVICE_SAN_USER_PREFIX,ja as DEVICE_SCOPED_CAPS,la as DEVICE_SETTINGS_CONTRIBUTION_METHODS,Eg as DEVICE_SIGNATURE_MESSAGE_VERSION,f4 as DEVICE_STATE_READERS,ua as DEVICE_STATUS_METHOD,OD as DEVICE_TOMBSTONE_RETENTION_MS,A4 as DEVICE_TYPE_CONTROL_KIND,$4 as DEVICE_TYPE_DO_CAPS,Aye as DEVICE_TYPE_INFO,ki as DISPLAY_PREFERENCES,Rj as DISPLAY_PRESETS,FG as DOORBELL_RISE_DEBOUNCE_MS,dy as DataStoreDatabaseSchema,bw as DataStoreEngineInfoSchema,Cy as DatabaseSnapshotRequestSchema,xy as DatabaseSnapshotResultSchema,by as DatabaseSnapshotTableSchema,yy as DatabaseSnapshotTargetsSchema,Sy as DatabaseSnapshotWrittenSchema,mG as DayNightModeSchema,_G as DayNightOptionsSchema,vG as DayNightSettingsPatchSchema,gG as DayNightStatusSchema,mr as DeclarationRefusedError,gy as DeclareCollectionInputSchema,jw as DeclareKindResultSchema,k4 as DeclaredDevices,qi as DecodedAudioChunkSchema,UK as DeleteIntegrationResultSchema,Rc as DerivativeHelperSpecSchema,Y7 as DetailCropConventionSchema,lf as DetectionCatalogClassMapSchema,fI as DetectionSourceSchema,_B as DetectionSourcesSchema,S_ as DetectionTriggerFilter,NT as DeviceAdminLinkSchema,uT as DeviceCaStatusSchema,Pie as DeviceCertificateLoginMethodSchema,dT as DeviceCertificateSettingsSchema,kie as DeviceChallengeResultSchema,Pg as DeviceChallengeSchema,XK as DeviceCodeSeveritySchema,g4 as DeviceConfig,Lg as DeviceCredentialSchema,Ig as DeviceCredentialStatusSchema,AO as DeviceDataEntrySchema,XT as DeviceDiscoveryStatusSchema,Oie as DeviceEnrollProofSchema,_E as DeviceExportExposeInputSchema,mE as DeviceExportStatusSchema,vE as DeviceExportUnexposeInputSchema,Ga as DeviceFeature,Zw as DeviceHistoryKindSchema,sT as DeviceHistoryOrphanDeleteRefusalSchema,aT as DeviceHistoryOrphanReasonSchema,Qw as DeviceHistoryProducerKindSchema,eT as DeviceHistoryRefusalReasonSchema,$w as DeviceHistoryResolutionSchema,cT as DeviceHistoryStatusSchema,Xw as DeviceHistorySubjectSchema,pD as DeviceInfoSchema,BR as DeviceModelChoiceSchema,CJ as DeviceNetworkStatsSchema,Dg as DevicePlatformSchema,Aie as DeviceProofInputSchema,VR as DeviceRecommendationSchema,Ag as DeviceRefusalReasonSchema,Mg as DeviceRefusalSchema,OO as DeviceRemovedInputSchema,kO as DeviceRemovedResultSchema,y4 as DeviceRestoreRetryScheduler,F as DeviceRole,_4 as DeviceRuntimeState,eg as DeviceSelectorSchema,die as DeviceSignaturePurposeSchema,SG as DeviceStatusSchema,DD as DeviceTombstoneSchema,P as DeviceType,l1 as DiagnosticIdSchema,g1 as DiagnosticWindowPatchSchema,h1 as DiagnosticWindowSchema,YT as DiscoveredChildDeviceSchema,JT as DiscoveredChildStatusSchema,rD as DiscoveredDeviceSchema,uj as DiscoveredTargetSchema,AG as DishwasherAccessSchema,EG as DishwasherAvailabilitySchema,TG as DishwasherOperationStateSchema,jG as DishwasherOptionDescriptorSchema,NG as DishwasherOptionsSchema,MG as DishwasherProgramSchema,wG as DishwasherStateSchema,DG as DishwasherStatusSchema,kG as DishwasherValueSchema,eV as DiskReconcileJobSchema,cee as DisposerChain,RG as DoorbellPressEventSchema,LG as DoorbellStatusSchema,hO as EMBEDDING_MODEL_FAILED,_O as EMBEDDING_REQUIREMENTS_FAILED,gO as EMBEDDING_REQUIREMENTS_UNAVAILABLE,iae as EMPTY_AUTOMATION_STATE,MY as ESTIMATE_COMPUTE_RATIO_MAX,jY as ESTIMATE_COMPUTE_RATIO_MIN,pV as EVENTFUL_CAP_NAMES,EL as EVENT_DENSITY_BATCH_MAX,fV as EVENT_KIND_BY_CAP,p5 as EVENT_KIND_LABELS,f5 as EVENT_KIND_LABEL_KEYS,Il as EVENT_OWNER_TYPES,uf as EVENT_PAD_MS,Zj as EVENT_TAXONOMY,WZ as EXPORT_DENSE_MAX_RANGES,Lo as EXPRESSION_BUILTINS,Ro as EXPRESSION_BUILTIN_NAMES,Vte as EXPRESSION_COMPILE_CACHE_CAPACITY,Bo as EXPRESSION_IDENTIFIER_RE,gs as EXPRESSION_INJECTED_NOW,Pc as EXPRESSION_OUTPUTS,VD as EXTENSION_HOST_DEVICE_TYPES,zD as EXTENSION_SLOTS,LD as EXTENSION_SLOT_IDS,UD as EXTENSION_SLOT_LISTING_METHOD,HD as EXTENSION_SLOT_REF_SEPARATOR,hz as EffectiveDeviceShareSchema,gz as EffectiveNodeShareSchema,_z as EffectiveSharesSchema,aR as EffectiveTuningSchema,Tb as EgressEncodeSchema,Eb as EgressRateControlSchema,Db as EgressTranscodeRequestSchema,Ob as EgressTranscodeSchema,Jye as ElementConfigStore,fO as EmbeddingFailedModelSchema,pO as EmbeddingFailedRequirementSchema,mO as EmbeddingInfoSchema,vO as EmbeddingRefusalCodeSchema,uO as EmbeddingResultSchema,dO as EmbeddingTowerSchema,ru as EncodeProfileSchema,Cv as EnrichedWidgetMetadataSchema,Die as EnrollSelfInputSchema,Lr as EntryDescriptorSchema,zw as EntryKindInfoSchema,Bw as EntryViewSchema,BG as EnumSensorDateTimeFormatSchema,VG as EnumSensorStatusSchema,Na as ErrorCodeSchema,Pa as ErrorI18nPayloadSchema,E as EventCategory,TL as EventDensityBucketSchema,DL as EventDensityForDeviceSchema,WG as EventEmitterStatusSchema,UG as EventFireSchema,BF as EventKindCategorySchema,HF as EventKindDescriptorSchema,zF as EventKindIconSchema,LF as EventKindSchema,UF as EventKindsForDeviceSchema,lb as EventMediaArtifactSchema,ub as EventMediaCoverageSchema,cb as EventMediaKindSchema,db as EventMediaProductionSchema,Ll as EventOwnerTypeSchema,kl as EventSourceType,iQ as ExportBytesSchema,XZ as ExportClipSubjectSchema,UZ as ExportDenseRangeSchema,GZ as ExportDenseSchema,nQ as ExportDownloadSchema,YZ as ExportFootageSubjectSchema,qZ as ExportOptionsSchema,QZ as ExportRecordSchema,fE as ExportSetupFieldSchema,pE as ExportSetupSchema,HZ as ExportSpeedSchema,JZ as ExportStateSchema,ZZ as ExportSubjectSchema,KZ as ExportTimelapseSchema,gE as ExposedDeviceSchema,kK as ExposureModeSchema,Gg as ExpressionBindingSourceSchema,L as ExpressionEvalError,Hg as ExpressionFieldBindingSchema,Wg as ExpressionGlobalBindingSchema,gne as ExpressionHelperSpecSchema,Ug as ExpressionLiteralBindingSchema,I as ExpressionParseError,Vie as ExpressionSourceSchema,$D as ExtensionCandidateSchema,eO as ExtensionCandidatesSchema,tO as ExtensionSetResultSchema,rO as ExtensionSetSlotInputSchema,JD as ExtensionSlotActivationSchema,RD as ExtensionSlotIdSchema,nO as ExtensionSlotRefInputSchema,ZD as ExtensionSlotRowSchema,qD as ExtensionSlotSourceSchema,YD as ExtensionSlotStateSchema,XD as ExtensionSlotUnreachableSchema,BD as ExtensionSlotValueSchema,WD as ExtensionSourceAvailabilitySchema,KD as ExtensionSourceHealthSchema,GD as ExtensionSourceSchema,V1 as ExternalIdentityKeySchema,B1 as ExternalIdentitySchema,Q7 as FACE_RESCORE_INTERVAL_FIELD,cye as FACE_RESCORE_INTERVAL_KEY,lye as FACE_RESCORE_INTERVAL_MIN_RUNNING,sye as FACE_RESCORE_SECTION_ID,yS as FAN_OUT_CONCURRENCY,_2 as FEEDER_EXAMPLE_ADDON_ID,g2 as FEEDER_EXAMPLE_HA_DEVICE_ID,go as FFMPEG_PATH_ENV,sf as FIRST_LEVEL_MACRO_CLASSES,tye as FULL_IMAGE_BBOX,NO as FailureContributionSchema,ym as FailureCounters,MO as FailureReasonCountSchema,iK as FanControlStatusSchema,rK as FanDirectionSchema,J$ as FeatureManifestSchema,oK as FeatureProbeStatusSchema,aO as FieldClaimModeSchema,sO as FieldClaimSchema,sr as FilterRequiredError,cK as FloodStatusSchema,lo as Fmp4BoxSplitter,fr as ForeignSecretMarkerError,Gi as FrameHandleSchema,Nv as FrameInputSchema,wB as FrameLazyCountersSchema,TB as FrameLazyMetricsSchema,Y3 as G711_SCALE_CORRECTION_DB,Xx as GROUP_TEMPLATES,_c as GROUP_TEMPLATE_IDS,uK as GasStatusSchema,S1 as GetLoggingSettingsInputSchema,Cb as GetStreamWithCodecInputSchema,PB as GlobalMetricsSchema,TW as GridLayoutPatchSchema,wW as GridLayoutViewSchema,hK as GroupActiveSchema,fK as GroupCommandResultSchema,pK as GroupCommandsSchema,Ec as GroupHelperSpecSchema,_K as GroupStatusSchema,Sc as GroupTemplateIdSchema,Ene as HAP_AUDIO_BASE,Tne as HAP_AUDIO_BITRATE_KBPS,Dne as HAP_AUDIO_VBV_KBITS,One as HAP_KEYFRAME_INTERVAL_SEC,nte as HF_BASE_URL,Sa as HF_REPO,N3 as HISTORY_BUCKET_MS,ES as HISTORY_CATALOG,Vee as HISTORY_DEFAULT_MIN_INTERVAL_MS,Zs as HISTORY_FAST_MS,DS as HISTORY_ITEM_CATALOG,OS as HISTORY_NONE_CAPS,Qs as HISTORY_SLOW_MS,$te as HISTORY_TIERS,zee as HISTORY_UNIT_LABELS,TQ as HOURS_PER_DAY,Ks as HOUR_MS,qO as HUB_ADDRESS_ROLES,Moe as HUB_MDNS_QUERY_NAME,Poe as HUB_MDNS_ROLE,joe as HUB_MDNS_SERVICE_TYPE,Noe as HUB_MDNS_TXT_KEYS,zO as HUB_VIEWER_MOUNT,OT as HWACCEL_OPTIONS,FR as HardwareClassIdSchema,X$ as HealthStatusSchema,yK as HeatingValveStatusSchema,Tc as HelperMemberSchema,zc as HelperSpecSchema,oA as HfModelResolutionSchema,c0 as HistoryPointSchema,o0 as HistoryResolutionEnum,mT as HttpsLeafInfoSchema,dq as HubAddressRoleSchema,xK as HumidifierStatusSchema,CK as HumiditySensorStatusSchema,kW as HvacModeSchema,bE as ICON_CATALOG_SOURCE,BE as ICON_CATEGORIES,LE as ICON_ENTRIES,SE as ICON_KEYS,wE as ICON_VIEWER_MODULES,X_ as IDLE_ACTION_STATUS,nV as INFERENCE_DEVICE_EXCLUSION_REASONS,sme as INITIAL_PULSE,cme as INITIAL_SPAN,kc as INTEGRAL_OUTPUTS,G_ as INTERNAL_ACTION_PREFIX,v2 as INVERTIBLE_CAPS,NE as IconKeySchema,_V as ImageContractSchema,gV as ImageContractStateSchema,DK as ImageRotateSchema,NK as ImageSettingsOptionsSchema,PK as ImageSettingsPatchSchema,MK as ImageSettingsStatusSchema,TK as ImageStatusSchema,_w as ImportModelBundleInputSchema,vw as ImportModelBundleResultSchema,rV as InferenceDeviceExclusionReasonSchema,IB as IngestOwnerSchema,yU as InstalledPackageSchema,pne as IntegralHelperSpecSchema,LK as IntegrationLiteSchema,eu as IntegrationSessionReporter,IK as IntegrationWithStateSchema,GK as IntercomAbilitySchema,KK as IntercomStatusSchema,O as InvalidRecordError,moe as KEYCHAIN_MAX_REFS_PER_CALL,TT as KEYCHAIN_RESET_CONFIRMATION,Ooe as KEYCHAIN_RESET_TRIGGER_ACTOR,wfe as KNOWN_CAP_NAMES,As as KWH_PER_WATT_MS,RR as KeptReasonSchema,SL as KeyEventSchema,ST as KeychainAdminSecretSchema,CT as KeychainAuditActionSchema,wT as KeychainAuditEntrySchema,_T as KeychainKeySourceKindSchema,vT as KeychainKeySourceSchema,yT as KeychainResetRecordSchema,Gw as KeychainResolveEntrySchema,Kw as KeychainResolveResultSchema,qw as KeychainSecretMetaSchema,xT as KeychainSecretUsageSchema,Ww as KeychainStateSchema,bT as KeychainStatusSchema,Uw as KeychainUnavailableReasonSchema,Dt as KeychainWriteRefusedError,hh as LABEL_SUPPLY_MACRO,lh as LABEL_SUPPLY_STEP_IDS,mh as LABEL_SUPPLY_VOCABULARIES,jp as LEGACY_READ_ONLY_CONFIG_KEY,_S as LIGHT_SHARED_CAPS,vD as LINKED_DEVICES_SLOT,yh as LINKED_LABEL_STEP_PREFIX,Uk as LLM_PROFILE_KIND_PATTERN,dA as LOAD_CONTRIBUTION_ATTRIBUTIONS,uA as LOAD_CONTRIBUTION_ROLES,QE as LOCATION_DESCRIPTION_MAX,YE as LOCATION_ICON_FALLBACK,pm as LOG_CHANNEL_TICK_MS,Yd as LOG_LEVEL_RANK,JL as LTS_SCOPE_CLASS_SEPARATOR,iI as LabelAttributionSchema,af as LabelDefinitionSchema,rI as LabelTierSchema,zR as LatencySourceSchema,YK as LawnMowerActivitySchema,ZK as LawnMowerControlStatusSchema,_p as LedgerWalkDeviceReportSchema,pp as LedgerWalkInputSchema,mp as LedgerWalkRefusalSchema,vp as LedgerWalkReportSchema,gp as LedgerWalkSkipCountsSchema,hp as LedgerWalkSkipReasonSchema,Gp as LegacyStorageLocationDefaultSchema,gD as LinkedDeviceSchema,hD as LinkedDevicesModeSchema,_D as LinkedDevicesSlotValueSchema,Uz as ListNodeBenchmarkResultsInputSchema,Pd as ListTrackRelationsInputSchema,Fd as ListTrackRelationsResultSchema,yb as LiveViewerCountSchema,rA as LlmDefaultSchema,nA as LlmDefaultSelectorSchema,Nk as LlmDownloadProgressSchema,Sk as LlmErrorCodeSchema,kk as LlmGenerateBaseInputSchema,Tk as LlmGenerateErrSchema,Ck as LlmGenerateOkSchema,Ek as LlmGenerateResultSchema,Dk as LlmImageSchema,eA as LlmListModelsErrorCodeSchema,$k as LlmListModelsInputSchema,tA as LlmListModelsResultSchema,Gk as LlmModelFeaturesSchema,Kk as LlmModelInfoSchema,Fk as LlmNodeModelSchema,Yk as LlmProfileFieldSchema,Qk as LlmProfileKindDescriptorSchema,Wk as LlmProfileKindSchema,Jk as LlmProfileSchema,qk as LlmProviderConfigSchema,Xk as LlmProviderWidgetSchema,wk as LlmRefusalSourceSchema,Ok as LlmRetryPolicySchema,Bk as LlmRuntimeAppleCompleteInputSchema,Vk as LlmRuntimeCancelInputSchema,Lk as LlmRuntimeCompleteInputSchema,Ik as LlmRuntimeDiskUsageSchema,sA as LlmRuntimeNodeSchema,Pk as LlmRuntimeStatusSchema,Boe as LlmTimeoutDefaults,iA as LlmUsageRollupSchema,xk as LlmUsageSchema,$R as LoadBalancingSharesInputSchema,fA as LoadContributionSchema,LZ as LocateSegmentResultSchema,$E as LocationDescriptionAssignmentSchema,XE as LocationIconAssignmentSchema,My as LocationStatSchema,bq as LockControlStatusSchema,yq as LockStateSchema,mA as LogChannelApplyResultSchema,am as LogChannelDescriptorSchema,sm as LogChannelGate,im as LogChannelLevelSchema,cm as LogChannelRegistry,v1 as LogChannelWindowPatchSchema,om as LogChannelWindowSchema,_1 as LogChannelWindowStateSchema,_A as LogEntrySchema,gA as LogLevelSchema,xA as LogReadCapabilitiesSchema,yA as LogReadEntrySchema,vA as LogReadQuerySchema,bA as LogReadResultSchema,MU as LogStreamEntrySchema,p1 as LoggingEffectiveSchema,m1 as LoggingExplicitSchema,f1 as LoggingLevelLayerSchema,d1 as LoggingLevelSourceSchema,u1 as LoggingScopeKindSchema,y1 as LoggingSettingsPatchSchema,w1 as LoggingSettingsStateSchema,DA as LoginMethodContributionSchema,CA as LoginStageEnum,ZL as LtsBucketSchema,g_ as MACRO_LABELS,xh as MASK_EMITTING_POSTPROCESSORS,dh as MASK_SUPPLY_STEP_IDS,_d as MAX_ARCHIVED_DEBUG_NOTES,ud as MAX_BIRTH_DECISION_RECORDS,fd as MAX_BIRTH_LATENCY_PROXY_MS,XP as MAX_CAMERA_SENSORS,Nce as MAX_CLIP_EVENT_IDS,Pce as MAX_CLIP_LABELS,qc as MAX_COMPOSITION_CODE_LENGTH,Gc as MAX_COMPOSITION_FEATURES,Kc as MAX_COMPOSITION_FIELDS_PER_FEATURE,ol as MAX_COMPOSITION_ITEMS,Hie as MAX_CONDITION_DEPTH,Uie as MAX_CONDITION_LEAVES,Lte as MAX_EXPRESSION_AST_NODES,zte as MAX_EXPRESSION_BINDINGS,Bte as MAX_EXPRESSION_CALL_ARGS,Rte as MAX_EXPRESSION_EVAL_STEPS,zo as MAX_EXPRESSION_SOURCE_LENGTH,dne as MAX_HELPER_MEMBERS,gm as MAX_KEYS,hm as MAX_REASONS_PER_KEY,Kpe as MAX_REQUEUED_BUCKETS_PER_SERIES,gf as MAX_SENSOR_TRIGGER_DEVICES,qie as MAX_TRACE_KEEP,QF as MAX_TRACK_DEBUG_NOTE_LEN,Sd as MAX_TRACK_PURITIES,xd as MAX_TRACK_RELATIONS,Al as MEDIA_OWNER_TYPES,Rl as MEDIA_PRESENCE_OWNER_KINDS,P4 as METHOD_ACCESS_MAP,zpe as METHOD_DEVICE_SELECTORS,CQ as MINUTES_PER_DAY,Gs as MINUTE_MS,ene as MIN_CUSTOM_MINUTES,kn as MIN_SCRUBBED_LENGTH,PR as MIN_SESSIONS_PER_DEVICE_RANGE,ia as MODEL_FORMATS,Fh as MODEL_HOSTING,Nh as MODEL_PROVIDER_IDS,Fq as MOTION_CLOSE_AFTER_MS,Bve as MOTION_CROP_DISPATCH_KEY,Hve as MOTION_CROP_MAX_REGIONS,B7 as MOTION_CROP_MOTION_PAD,V7 as MOTION_CROP_TRACKED_PAD,gB as MOTION_SOURCE_LABELS,Nq as MOTION_SPAN_TIMEOUT_MS,j4 as MOTION_TRIGGER_FEATURE,aA as ManagedModelCatalogEntrySchema,Ak as ManagedModelExtraFileSchema,jk as ManagedModelRefSchema,Mk as ManagedRuntimeConfigSchema,mM as MaskGridDimsSchema,uM as MaskGridShapeSchema,dM as MaskLineShapeSchema,sM as MaskPointSchema,lM as MaskPolygonShapeSchema,pM as MaskPolygonVerticesSchema,cM as MaskRectShapeSchema,fM as MaskShapeKindSchema,Gse as MaskShapeSchema,xI as MediaFileInfoSchema,vI as MediaFileKindEnum,yI as MediaFileRefSchema,bI as MediaFileSchema,Tq as MediaPlayerRepeatSchema,wq as MediaPlayerStateSchema,Dq as MediaPlayerStatusSchema,zl as MediaPresenceOwnerKindSchema,Uf as MediaRelocateModeSchema,pT as MeshLeafInfoSchema,Aq as MeshPeerSchema,jq as MeshStatusSchema,Sq as MeterStatusSchema,Qh as MethodAccessSchema,FD as MigrateDeviceResultSchema,ND as MigrateSwitchOutcomeSchema,PD as MigrateSwitchReportSchema,gw as ModelBundleFileSchema,Rh as ModelCatalogEntrySchema,IA as ModelConvertInputSchema,Bh as ModelConvertMetadataSchema,RA as ModelDistributeInputSchema,zA as ModelDistributeResultSchema,Ah as ModelExtraFileSchema,Eh as ModelFormatEntrySchema,Oh as ModelFormatPrecisionSchema,jh as ModelFormatsSchema,Ih as ModelLicenseSchema,Dh as ModelOnDiskStateSchema,UR as ModelPinChangeSchema,Ph as ModelProviderIdSchema,hR as ModelSubstitutionSchema,Mh as ModelVariantGroupSchema,HA as MotionAnalysisResultSchema,dI as MotionEventSchema,Lq as MotionOnMotionChangedDataSchema,VA as MotionRegionSchema,pB as MotionSourceEnum,hB as MotionSourcesSchema,Iq as MotionStatusSchema,Bq as MotionTriggerRuntimeStateSchema,zq as MotionTriggerStatusSchema,KP as MotionTriggeredBySchema,Wq as MotionZoneOptionsSchema,Gq as MotionZonePatchSchema,Hq as MotionZoneRegionSchema,Uq as MotionZoneStatusSchema,WA as MqttBrokerInfoSchema,YA as MqttBrokerStatusSchema,oy as MutationFilterSchema,FY as N100_IGPU_CLOCK_MHZ,PY as N100_IGPU_EU,mye as NATIVE_LEASE_ACTIVITY_FIELD,n9 as NATIVE_LEASE_ACTIVITY_KEY,_ye as NATIVE_LEASE_ADMISSION_FIELD,r9 as NATIVE_LEASE_ADMISSION_KEY,pye as NATIVE_LEASE_BUDGET_FIELD,t9 as NATIVE_LEASE_BUDGET_KEY,fye as NATIVE_LEASE_HOLD_FIELD,e9 as NATIVE_LEASE_HOLD_KEY,gye as NATIVE_LEASE_SCENE_BUDGET_FIELD,a9 as NATIVE_LEASE_SCENE_BUDGET_KEY,dye as NATIVE_LEASE_SECTION_ID,hye as NATIVE_LEASE_TILE_BUDGET_FIELD,i9 as NATIVE_LEASE_TILE_BUDGET_KEY,aJ as NAVIGATION_ACTION_CATALOG,uJ as NAVIGATION_LIGHT_LEVEL_MAX,lJ as NAVIGATION_LIGHT_LEVEL_MIN,c8 as NC_ALARM_CONTROLLABLE_CAPS,C8 as NC_ALARM_DEFAULT_PROFILE_ID,w8 as NC_ALARM_DEFAULT_PROFILE_NAME,tge as NC_ALARM_DEFAULT_TRIGGERED_DURATION_SEC,f8 as NC_ALARM_DELAY_FIELDS,JN as NC_ALARM_DELAY_MAX_SEC,XN as NC_ALARM_NONBLOCKING_MAX,p8 as NC_ALARM_NOTIFY_FIELDS,s8 as NC_ALARM_OPENING_EVENT_KINDS,jP as NC_ALARM_SENSORS_MAX,T8 as NC_ALARM_SYSTEM_DEFAULT_DELAYS,vM as NC_ALARM_SYSTEM_EVENT_KINDS,YN as NC_ALARM_TRIGGERED_MAX_SEC,Ame as NC_AUDIO_CONFIRM_HITS_DEFAULT,Nme as NC_AUDIO_CONFIRM_HITS_MAX,Mme as NC_AUDIO_CONFIRM_HITS_MIN,Fme as NC_AUDIO_CONFIRM_WINDOW_MAX_SEC,Pme as NC_AUDIO_CONFIRM_WINDOW_MIN_SEC,jme as NC_AUDIO_CONFIRM_WINDOW_SEC_DEFAULT,kM as NC_AUDIO_DBFS_FLOOR,wme as NC_AUDIO_DB_MAX,Cme as NC_AUDIO_DB_MIN,e6 as NC_AUDIO_DB_OFFERED,Tme as NC_AUDIO_DB_STEP,t6 as NC_AUDIO_DEFAULTS,Dme as NC_AUDIO_HIT_PERCENT_MAX,Eme as NC_AUDIO_HIT_PERCENT_MIN,kme as NC_AUDIO_SAMPLING_MAX_SEC,Ome as NC_AUDIO_SAMPLING_MIN_SEC,q6 as NC_AUDIO_SEED,qse as NC_AUTHORABLE_SYSTEM_EVENT_KINDS,l6 as NC_BASE_CONDITION_KEYS,Jse as NC_BATTERY_CONSUMABLE_SYSTEM_EVENT_KINDS,B6 as NC_CAMERA_SCOPE_CAP_NAME,ZM as NC_CLIP_POST_ROLL_DEFAULT_SEC,XM as NC_CLIP_PRE_ROLL_DEFAULT_SEC,IP as NC_CLIP_RETENTION_MAX_SEC,PN as NC_CONDITION_CATALOG,iN as NC_CONFIRM_DEFAULT_MAX_IMAGE_PX,rN as NC_CONFIRM_DEFAULT_TIMEOUT_MS,nN as NC_CONFIRM_MAX_TIMEOUT_MS,tN as NC_CONFIRM_MIN_TIMEOUT_MS,Yse as NC_CONSUMABLE_LOW_PERCENT_DEFAULT,Xse as NC_CONSUMABLE_LOW_PERCENT_MAX,yM as NC_CONSUMABLE_SYSTEM_EVENT_KINDS,$se as NC_DEFAULT_SNOOZE_MINUTES,cN as NC_GROUPING_DEFAULT_SEC,lN as NC_GROUPING_MAX_SEC,sN as NC_GROUPING_MIN_SEC,zN as NC_HISTORY_LIMIT_DEFAULT,BN as NC_HISTORY_LIMIT_MAX,_M as NC_LEGACY_SYSTEM_EVENT_KINDS,Qse as NC_MAX_PER_TRACK_IMMEDIATE,X6 as NC_MEDIA_IMAGE_MODES,K6 as NC_OCCUPANCY_DEFAULTS,mN as NC_RULE_CLEARABLE_KEYS,Y6 as NC_RULE_EDITOR_SECTION_ORDER,F6 as NC_RULE_KIND_SPECS,fN as NC_RULE_RETIRED_CLEAR_KEYS,U6 as NC_RULE_SECTIONS,j8 as NC_SENSOR_RAISED_FIELD_BY_KIND,M8 as NC_SENSOR_TRANSITION_KINDS,Xhe as NC_SENSOR_TRANSITION_NEVER_FIRES_WARNING,Cge as NC_SENSOR_TRANSITION_UNSUPPORTED_REASON,s5 as NC_SERVER_PACKAGE_NAME,xM as NC_SNOOZE_MAX_MINUTES,vN as NC_STATE_SUMMARY_SECTION_IDS,L6 as NC_SYSTEM_DELIVERY,e5 as NC_SYSTEM_EVENT_CLASS_SPECS,w6 as NC_SYSTEM_EVENT_CONDITION_FILTER_KEYS,x6 as NC_SYSTEM_EVENT_FAMILIES,C6 as NC_SYSTEM_EVENT_FAMILY,T6 as NC_SYSTEM_EVENT_FAMILY_FILTERS,y6 as NC_SYSTEM_EVENT_FILTER_KEYS,E6 as NC_SYSTEM_EVENT_KIND_GROUP_SPECS,r5 as NC_SYSTEM_EVENT_SUMMARY_FAMILIES,A6 as NC_SYSTEM_RULE_KINDS,Wse as NC_TAXONOMY,q8 as NC_TEMPLATE_HELD_BACK_SYSTEM_EVENT_KINDS,K8 as NC_TEMPLATE_VARS,c5 as NC_UPDATE_EVENT_PACKAGE_NAMES,hJ as NETWORK_LINK_TYPES,_J as NETWORK_LINK_UNKNOWN,vz as NODE_BENCHMARK_DEFAULTS,Tl as NODE_COLOR_IDS,tve as NO_MEASURED_CAPACITY,vc as NUMERIC_AGGREGATES,Qz as NativeCropBboxSchema,eR as NativeCropRefSchema,$z as NativeCropResultSchema,Jq as NativeDetectionSchema,o9 as NativeLeaseAdmissionSchema,s9 as NativeLeaseSettingsSchema,qq as NativeObjectClassEnum,Zq as NativeObjectDetectionOptionsSchema,$q as NativeObjectDetectionRuntimeStateSchema,Qq as NativeObjectDetectionSettingsPatchSchema,Yq as NativeObjectDetectionStatusSchema,Xq as NativeObjectGeometryEnum,iJ as NavigationActionEntrySchema,nJ as NavigationActionIdSchema,rJ as NavigationEntryKindSchema,sJ as NavigationFeaturesSchema,cJ as NavigationLightModeSchema,dJ as NavigationModeSchema,tJ as NavigationMoveCommandSchema,oJ as NavigationPointSchema,pJ as NavigationRuntimeStateSchema,fJ as NavigationStatusSchema,LM as NcActionBindingSchema,oP as NcAlarmBlockingEditSchema,uP as NcAlarmBlockingSchema,AP as NcAlarmConfigSchema,vP as NcAlarmCreateProfileInputSchema,wP as NcAlarmModeCoverageSchema,rP as NcAlarmModeDelaysEditSchema,tP as NcAlarmModeDelaysSchema,cP as NcAlarmModeDeviceListSchema,aP as NcAlarmNonBlockingEditSchema,lP as NcAlarmNonBlockingSchema,eP as NcAlarmPostTriggeredActionSchema,bP as NcAlarmProfileIdInputSchema,gP as NcAlarmProfileMetaSchema,_P as NcAlarmProfilesViewSchema,yP as NcAlarmRenameProfileInputSchema,sP as NcAlarmSecureOnArmEditSchema,dP as NcAlarmSecureOnArmOffSchema,MP as NcAlarmSensorReadingSchema,NP as NcAlarmSensorStateSchema,PP as NcAlarmSensorsInputSchema,FP as NcAlarmSensorsSchema,xP as NcAlarmSettingsPatchSchema,hP as NcAlarmSettingsSchema,SP as NcAlarmSkipReasonSchema,CP as NcAlarmSkippedDeviceSchema,AM as NcAudioConditionSchema,LP as NcClipRetentionAskSchema,RP as NcClipRetentionPlanSchema,NN as NcConditionDescriptorSchema,GM as NcConditionsSchema,aN as NcConfirmExpectSchema,oN as NcConfirmSchema,jM as NcCrossingSchema,hM as NcDeliverySchema,UM as NcDeviceStateConditionSchema,RN as NcHistoryEntrySchema,VN as NcHistoryFilterSchema,IN as NcHistoryRecordKindSchema,FN as NcHistoryStatusSchema,LN as NcHistorySubjectSchema,RM as NcHookBindingsSchema,VM as NcLegacyRuleActionSequenceSchema,YM as NcLinkedCameraModeSchema,JM as NcMediaFrameSchema,qM as NcMediaImageSchema,QM as NcMediaPolicySchema,OM as NcOccupancyConditionSchema,DM as NcPlateMatcherSchema,PM as NcRuleActionSchema,HM as NcRuleActionSequenceSchema,BM as NcRuleActionsSchema,hN as NcRuleClearableKeySchema,uN as NcRuleInputSchema,wN as NcRuleKindSchema,HN as NcRuleLastRunSchema,UN as NcRuleLastRunsSchema,zM as NcRuleNotificationButtonSchema,dN as NcRulePatchSchema,_N as NcRuleSchema,KM as NcRuleTargetSchema,gN as NcRuleUpdateInputSchema,WM as NcSceneConditionSchema,CM as NcScheduleSchema,SM as NcScheduleWindowSchema,MM as NcSensorTransitionSchema,IM as NcSharedSequenceInputSchema,FM as NcSharedSequenceSchema,GN as NcSnoozeInputSchema,KN as NcSnoozeSchema,WN as NcSnoozeScopeSchema,qN as NcSnoozeSuppressedSchema,xN as NcStateSummaryPreviewRowSchema,SN as NcStateSummaryPreviewSchema,bN as NcStateSummaryPreviewSectionSchema,yN as NcStateSummarySectionIdSchema,TM as NcStateSummarySplitSchema,bM as NcSystemEventConditionSchema,wM as NcSystemEventDeliveryModeSchema,EM as NcSystemEventDeliverySchema,gM as NcSystemEventKindSchema,$j as NcTaxonomyEntrySchema,eM as NcTaxonomySchema,EN as NcTemplateFamilySchema,DN as NcTemplateFieldSchema,jN as NcTemplatePreviewInputSchema,MN as NcTemplatePreviewSchema,AN as NcTemplateVarContextSchema,kN as NcTemplateVarDescriptorSchema,ON as NcTemplateVarGroupSchema,TN as NcTemplateVarKindSchema,CN as NcTestResultSchema,$M as NcThrottleGranularitySchema,eN as NcThrottleSchema,NM as NcZoneConditionSchema,QA as NetworkAccessStatusSchema,Z$ as NetworkAddressSchema,ZA as NetworkEndpointSchema,gJ as NetworkLinkStatusSchema,ose as NetworkTunnelStartedDataSchema,hr as NoCallerError,Mz as NodeBenchCellSchema,Pz as NodeBenchClipSchema,Az as NodeBenchDeviceCellSchema,Nz as NodeBenchFingerprintSchema,Oz as NodeBenchLimitSchema,jz as NodeBenchPipelineCellSchema,Dz as NodeBenchProgressSchema,kz as NodeBenchRampStepSchema,Fz as NodeBenchRunnerInputSchema,Iz as NodeBenchRunnerStateSchema,Lz as NodeBenchRunnerStatusSchema,Gz as NodeBenchmarkCandidatesSchema,bz as NodeBenchmarkDevicePlanSchema,zz as NodeBenchmarkEndReasonSchema,oce as NodeBenchmarkManifestSchema,wz as NodeBenchmarkMovingCameraSchema,yz as NodeBenchmarkPhaseSchema,xz as NodeBenchmarkPlanSchema,Ez as NodeBenchmarkPreflightSchema,Sz as NodeBenchmarkRefusalKindSchema,Cz as NodeBenchmarkRefusalSchema,Hz as NodeBenchmarkResultSchema,Wz as NodeBenchmarkResultViewSchema,Bz as NodeBenchmarkRunSchema,Rz as NodeBenchmarkStateSchema,Vz as NodeBenchmarkStatusSchema,Tz as NodeBenchmarkStayingCameraSchema,El as NodeColorIdSchema,WR as NodeDeviceChangeSchema,BJ as NodeDirectoryEntrySchema,VJ as NodeDirectorySchema,hT as NodeHttpsStateSchema,HR as NodeRecommendationSchema,rj as NotificationActionIconSchema,ij as NotificationActionSchema,nj as NotificationFormatSchema,aj as NotificationSchema,KJ as NotifierStatusSchema,XJ as NumericSensorStatusSchema,k9 as OAUTH_LANDING_PATH,A9 as OAUTH_LANDING_REASONS,vve as OBJECT_DETECTION_STEP_ID,vpe as OPERATOR_WRITTEN_STALE_MS,rf as OPS_LOG_DEFAULT_LIMIT,nf as OPS_LOG_RING_DEFAULT_MAX,_m as OVERFLOW_REASON,Bm as OVERLAY_LAYERS,me as OWNER_ONLY_EVENT_CATEGORIES,BP as OauthIntegrationDescriptorSchema,gI as ObjectEventSchema,DB as OccupancyBurstRefusalSchema,cV as OccupancyLookAnswerSchema,oV as OccupancyLookRefusalSchema,sV as OccupancyLookRequestSchema,UP as OidcConnectionSchema,WP as OidcConnectionUpdateInputSchema,vQ as OnboardFieldSupportSchema,mQ as OnboardRecordTrackSchema,yQ as OnboardScheduleSupportSchema,pQ as OnboardStorageSchema,fQ as OnboardStorageVolumeSchema,Zd as OpsLogDomainSchema,ef as OpsLogEntrySchema,Qd as OpsLogOpSchema,tf as OpsLogQueryInputSchema,$d as OpsLogReasonSchema,sce as OrchestratorMetricsSchema,kD as OrphanDeviceDataSchema,cY as OsdNamedTemplateSchema,QJ as OsdOverlayKindEnum,nY as OsdOverlayPatchSchema,eY as OsdOverlaySchema,$J as OsdPositionEnum,fY as OsdRenderOutcomeEnum,pY as OsdRenderResultSchema,uY as OsdSlotBindingSchema,dY as OsdSlotViewSchema,hY as OsdSourceOptionSchema,lY as OsdSourceSchema,mY as OsdSourceValueTypeEnum,tY as OsdStatusSchema,sY as OsdTemplateBindingSchema,aY as OsdTemplateFormatSchema,oY as OsdTemplatePickSchema,iY as OsdTemplateTokenKindSchema,tme as OverrideDraftSchema,wj as PALETTE_BACKGROUNDS,bj as PALETTE_ENTRY_IDS,gse as PALETTE_MIN_CONTRAST,pse as PALETTE_MIN_DELTA_E,mse as PALETTE_MIN_DELTA_E_MARK,Cj as PALETTE_PRESET_IDS,dee as PEER_BYTES_CHUNK_BYTES,En as PEER_BYTES_MAX_OUTSTANDING,Dn as PEER_BYTES_STALL_MS,uee as PEER_BYTES_TICKET_TTL_MS,NC as PENDING_BLOCK_ID,vY as PET_FEEDER_MANUAL_FEED_MAX,_Y as PET_FEEDER_MANUAL_FEED_MIN,RY as PHOENIX_780M_CU,Pu as PIPELINE_ANALYTICS_CAP_NAME,H0 as PIPELINE_FLOW_CAPABILITY_NAMES,sle as PIPELINE_OWNER_CAPABILITY_NAMES,C7 as PIPELINE_RAMP,v3 as PLUG_APPLIANCE_TYPES,d4 as PLUS_CATALOG_CLASS_FLOORS,u4 as PLUS_CATALOG_STOCK_CLASS_FLOORS,c4 as PLUS_CATALOG_TO_MACRO,Wde as PLUS_CATALOG_UNMAPPED_LABELS,Gre as PREFERENCES_MAX_DEVICE_ID_LENGTH,Wre as PREFERENCES_MAX_NAMESPACES,Ure as PREFERENCES_MAX_VALUE_BYTES,ug as PREFERENCES_NAMESPACE_PATTERN,Mre as PREFERENCES_SELF_SCOPE,Nu as PRIVACY_MASK_CAP_NAME,Vpe as PROVIDER_KIND_CAP_NAMES,Hee as PROVIDER_PIN_FIELD,lk as PUBLIC_ENDPOINT_HTTP_REASON,H9 as PYTHON_SCRIPT,AU as PackageInstallationSchema,jU as PackageInstallationsSchema,dF as PackageLlmVerdictSchema,bU as PackageUpdateSchema,xU as PackageVersionInfoSchema,Uj as PaletteRejectedError,tB as ParkRefusalSchema,nB as ParkTrackFrameResultSchema,eB as ParkedFrameKindSchema,rB as ParkedTrackFrameSchema,EA as PasskeyLoginMethodSchema,hH as PasskeySummarySchema,Xv as PcmSampleFormatSchema,On as PeerBytesTicketSchema,t0 as PerScopeBreakdownSchema,xY as PetFeederStatusSchema,Mb as PickStreamPreferencesSchema,jb as PickStreamRequirementsSchema,Nb as PickedCamStreamSchema,MB as PipelineAssignmentSchema,sR as PipelineDefaultStepSchema,iR as PipelineEngineChoiceSchema,kh as PipelineModelFormatStatusSchema,AR as PipelineRunResultBridge,mR as PipelineStepInputSchema,gR as PipelineValidationIssueSchema,_R as PipelineValidationResultSchema,bb as PlaceholderReasonSchema,tz as PlacementDeviceStatsSchema,nz as PlacementNodeStatsSchema,ez as PlacementStatsInputSchema,iz as PlacementStatsSchema,dr as PlaintextSecretError,Yz as PolygonPointSchema,rbe as PoolMemoryWatchdog,bX as PowerMeterStatusSchema,VY as PrecisionGopsSchema,pg as PreferenceDeviceIdSchema,dg as PreferenceNamespaceSchema,mg as PreferenceRowSchema,fg as PreferenceValueSchema,Qre as PreferencesChangedSinceInputSchema,$re as PreferencesChangedSinceOutputSchema,Xre as PreferencesDeleteInputSchema,Zre as PreferencesDeleteOutputSchema,Kre as PreferencesGetInputSchema,qre as PreferencesGetOutputSchema,Jre as PreferencesPutInputSchema,Yre as PreferencesPutOutputSchema,og as PreferencesSelfScopeSchema,DX as PresenceStatusSchema,kX as PressureSensorStatusSchema,PX as PrivacyMaskOptionsSchema,FX as PrivacyMaskPatchSchema,MX as PrivacyMaskRegionSchema,jX as PrivacyMaskShapeSchema,NX as PrivacyMaskStatusSchema,mj as ProbeTargetConfigResultSchema,Qi as ProfileRtspEntrySchema,Ri as ProfileSlotSchema,Li as ProfileSlotStatusSchema,b0 as ProviderJobStateSchema,x0 as ProviderJobStatusSchema,y_e as ProviderMotionDataSchema,nD as ProviderStatusSchema,XX as PtzAutotrackRuntimeStateSchema,qX as PtzAutotrackSettingsSchema,YX as PtzAutotrackStatusSchema,JX as PtzAutotrackTargetOptionSchema,WX as PtzHomePresetSchema,GX as PtzHomeReturnSchema,VX as PtzMoveCommandSchema,UX as PtzOptionsSchema,BX as PtzPositionSchema,RX as PtzPresetFunctionSchema,zX as PtzPresetSchema,HX as PtzStatusSchema,Ti as QUANTITY_BASE,ay as QueryFilterSchema,Sne as RATE_CONTROL_RELAXED,xne as RATE_CONTROL_TIGHT,ppe as REACHABILITY_FAILURES_TO_OFFLINE,fpe as REACHABILITY_POLL_INTERVAL_MS,mpe as REACHABILITY_PROBE_TIMEOUT_MS,V_e as RECALL_TIE,Dp as RECOGNITION_TYPES,_f as RECORDING_AUDIO_TRIGGER_OFFERED_DBFS,rQ as RECORDING_EXPORT_MAX_READ_BYTES,lZ as RECORDING_SOURCE_CAMSTACK,uZ as RECORDING_SOURCE_CAMSTACK_ADDON,SZ as RECORDING_TIMELINE_BATCH_MAX,nr as RECORDS_ERROR_CODES,Jn as RECORD_BATCH_MAX,Yn as RECORD_BATCH_MAX_BYTES,Gn as RECORD_CLASSES,Wn as RECORD_DATABASES,Kn as RECORD_DEFAULT_MAX_DATA_BYTES,Zn as RECORD_DELETE_BATCH,mee as RECORD_ID_MAX_LENGTH,qn as RECORD_MAX_DATA_BYTES,hee as RECORD_MAX_INDEXES,$n as RECORD_MAX_INDEX_FIELDS,Xn as RECORD_QUERY_MAX,tr as RECORD_SECRET_COLLECTION_PREFIX,Qn as RECORD_SETTINGS_MAX_ROWS,er as RECORD_SWEEP_INTERVAL_MS,bve as RECOVERY_CROP_MAX_SIDE_PX,yve as RECOVERY_CROP_MIN_SIDE_PX,xve as RECOVERY_CROP_PADDING_RATIO,kve as RECOVERY_EDGE_MARGIN_PX,Ove as RECOVERY_FUSE_CONTAINMENT,N7 as RECOVERY_FUSE_IOU,Cve as RECOVERY_MAX_CROPS_PER_FRAME,Tve as RECOVERY_MAX_REGION_FRAME_FRACTION,wve as RECOVERY_MIN_INTERVAL_MS,Eve as RECOVERY_MIN_UNCOVERED_FRACTION,Dve as RECOVERY_MOTION_MAX_AGE_MS,Sve as RECOVERY_VIEW_PX,Te as REDACTED_SECRET,WY as REFERENCE_COMPUTE,NY as REFERENCE_MATCH_FRACTION,Q9 as REMOVAL_RECONCILE_INTERVAL_MS,I5 as REMOVED_MODEL_IDS,Dr as REMOVE_LEAF,Vo as RESERVED_BINDING_NAMES,KQ as RESERVED_COLLECTION_SOURCES,Xs as RESET_PERIODS,Gpe as RESTORED_CAP_NAMES,$ne as RETRAIN_REVIEW_ADJUSTED_IOU,Qne as RETRAIN_REVIEW_MATCH_IOU,Zu as RETRAIN_REVIEW_STATUSES,sd as RETRAIN_REVISION_CONFLICT,zn as REVALIDATE_AFTER_MS,Js as ROLLING_SPANS,Hle as ROOM_EXAMPLE_MOTION_SOURCES,Vle as ROOM_EXAMPLE_TEMPERATURE_SOURCES,Ble as ROOM_OCCUPANCY_WINDOW_MS,Sm as ROOT_BUCKET_KEY,fre as ROOT_CHILD_CONTAINMENT_MIN,Xve as ROOT_FACE_REFINE_INPUT_PX,K7 as ROOT_FACE_REFINE_SCALE,fh as ROOT_SUPPLIABLE_STEP_IDS,$X as RUNNING_POWER_START_DELAY_MS,eZ as RUNNING_POWER_STOP_DELAY_MS,QX as RUNNING_POWER_THRESHOLD_WATTS,tZ as RUNNING_STATE_COLD,ite as RUNTIME_DEFAULTS,j3 as RUNTIME_STATE_POLICY,_pe as RUNTIME_STATE_REFRESH_MISS_COOLDOWN_MS,V9 as RUNTIME_TO_FORMAT,GC as RawSecretMigrationInputSchema,KC as RawSecretMigrationReportSchema,ya as RawStateResultSchema,zZ as ReadGopBytesResultSchema,RZ as ReadSegmentBytesResultSchema,BZ as ReadWindowBytesResultSchema,Nee as ReadinessRegistry,$i as ReadinessTimeoutError,Si as ReadingQuantitySchema,VL as RebuildObjectEmbeddingsRefusalSchema,vL as RecentTracksPageSchema,_L as RecentTracksQueryInput,LR as RecommendationReasonSchema,Cw as RecordBodySchema,Pr as RecordFieldPathSchema,Sw as RecordIdSchema,Fr as RecordIndexSchema,ww as RecordInputSchema,zr as RecordKindDeclarationSchema,Vr as RecordKindNameSchema,lr as RecordNotFoundError,kw as RecordQueryInputSchema,Aw as RecordQueryResultSchema,Ir as RecordRetentionSchema,Pw as RecordSecretRefsSchema,pr as RecordSecretUnavailableError,ar as RecordTooLargeError,Nw as RecordTransactOpSchema,uQ as RecordTriggerSchema,ur as RecordUniqueViolationError,Tw as RecordViewSchema,Ew as RecordWhereSchema,dQ as RecordWindowSchema,CZ as RecordingAvailabilityForDeviceSchema,pZ as RecordingAvailabilitySchema,xf as RecordingBandAudioSchema,yf as RecordingBandModeSchema,Sf as RecordingBandSchema,bf as RecordingBandTriggersSchema,Df as RecordingConfigSchema,wZ as RecordingDaysForDeviceSchema,mZ as RecordingDaysSchema,TZ as RecordingDeviceUsageSchema,EZ as RecordingLocationUsageSchema,hZ as RecordingManifestSchema,mf as RecordingObjectTriggerClassSchema,bQ as RecordingOnboardOptionsSchema,xQ as RecordingOnboardPatchSchema,hQ as RecordingOnboardStatusSchema,yZ as RecordingPlaybackSchema,dZ as RecordingRangeSchema,fZ as RecordingReadSchema,MZ as RecordingRebalanceInputSchema,OZ as RecordingRebalanceMoveSchema,jZ as RecordingRebalancePlanSchema,kZ as RecordingRebalanceSkipReasonSchema,AZ as RecordingRebalanceSkipSchema,Ef as RecordingRetentionSchema,WQ as RecordingSignalRuntimeStateSchema,UQ as RecordingSignalStatusSchema,gZ as RecordingSourceAvailabilitySchema,vZ as RecordingSourceOptionsSchema,_Z as RecordingSourceSchema,xZ as RecordingStatusSchema,pf as RecordingStorageModeSchema,DZ as RecordingStorageUsageSchema,vf as RecordingTriggersSchema,df as RecordingWeekdaySchema,D as RecordsError,wA as RedirectLoginMethodSchema,bp as RelocatableMediaCountInputSchema,yp as RelocatableMediaCountSchema,zf as RelocateFootageClassSchema,Bf as RelocateFootageInputSchema,Rf as RelocateJobSchema,Lf as RelocateJobStateSchema,Wf as RelocateMediaInputSchema,dp as RelocateResidueInputSchema,fp as RelocateResidueSchema,dj as RenderedAsSchema,Fg as RenewDeviceCertificateOutputSchema,jie as RenewDeviceCertificateResultSchema,vB as ReportMotionInputSchema,x1 as ReportedFailureContributionSchema,b1 as ReportedLoadContributionSchema,i1 as RequestCensusGroupSchema,a1 as RequestCensusProcedureSchema,o1 as RequestCensusSnapshotSchema,s1 as RequestCensusStatusSchema,MI as RetrainAnnotationDraftSchema,CI as RetrainAnnotationKindSchema,jI as RetrainAnnotationSchema,wI as RetrainAnnotationSourceSchema,XI as RetrainArchiveResultSchema,YI as RetrainArchiveTargetSchema,rL as RetrainAssistProfileSchema,QI as RetrainAssistResultSchema,ZI as RetrainAssistSubjectSchema,kI as RetrainBoxReviewSchema,eL as RetrainCollectionCreateResultSchema,tL as RetrainCollectionRenameResultSchema,$I as RetrainCollectionSchema,RI as RetrainCopyRefusalSchema,HI as RetrainCorpusFilterSchema,GI as RetrainCorpusKpiCameraRowSchema,KI as RetrainCorpusKpiSchema,UI as RetrainCorpusPageFrameSchema,WI as RetrainCorpusPageSchema,sL as RetrainDatasetSelectionSchema,cL as RetrainDatasetStatsSchema,lL as RetrainDatasetVersionSchema,DI as RetrainDismissedSchema,qI as RetrainExportFilterSchema,JI as RetrainExportLayoutSchema,PI as RetrainFrameCandidateSchema,BI as RetrainFrameListSchema,II as RetrainFrameOriginSchema,AI as RetrainFrameReviewSchema,LI as RetrainFrameSchema,zI as RetrainFrameSelectionSchema,VI as RetrainFrameWorkStateSchema,oL as RetrainLlmAssistResultSchema,iL as RetrainLlmProposalSchema,aL as RetrainLlmReviewSchema,SI as RetrainMacroClassSchema,EI as RetrainOriginSchema,FI as RetrainPipelineBoxSchema,OI as RetrainReviewStatusSchema,ZF as RetrainStatusSchema,NI as RetrainTrackSchema,dL as RetrainTrainingCorpusResolveResultSchema,uL as RetrainTrainingCorpusSelectionSchema,fL as RetrainTransitionResultSchema,ir as RevConflictError,Mie as RevokeOwnDeviceCertificateResultSchema,sbe as RingBuffer,tc as RollingWindowSchema,Lh as RootStepSupplySchema,wb as RtpSourceSchema,fb as RtspRestreamEntrySchema,T_ as RunGate,CV as RunnerBootCheckSchema,SB as RunnerCameraConfigSchema,pce as RunnerCameraDeviceUIFields,yB as RunnerFrameSourceSchema,xB as RunnerInferenceDeviceSchema,bB as RunnerJumpStepProvisioningSchema,CB as RunnerLocalLoadSchema,EB as RunnerLocalMetricsSchema,SV as RunnerRefusalSchema,nZ as RunningStateSourceSchema,rZ as RunningStateStatusSchema,YQ as SCENE_CONDITIONS,l$ as SCENE_CONFIRM_DEFAULT_MAX_IMAGE_PX,c$ as SCENE_CONFIRM_DEFAULT_TIMEOUT_MS,o$ as SCENE_DEFAULT_ANCHOR_THRESHOLD,a$ as SCENE_DEFAULT_CHECK_INTERVAL_SEC,i$ as SCENE_DEFAULT_OBSERVATION_SPACING_SEC,r$ as SCENE_DEFAULT_QUIET_SECONDS,s$ as SCENE_DEFAULT_UNCOVERED_POLICY,ZQ as SCENE_DIVERGED,u$ as SCENE_RESET_RECAPTURES,bme as SCOPE_PRESETS,Re as SECRET_CLEAR,vee as SECRET_META,ht as SECRET_REF_SCHEME,M4 as SENSOR_FEATURES,Sfe as SENSOR_MAP,W_e as SERIAL_CAPACITY_CAMERA_FPS,Ns as SERIES_KINDS,B$ as SERVER_NAME_MAX_LENGTH,z$ as SERVER_NAME_SETTING_KEY,Kl as SESSION_LOST_ALERT_CATEGORY,ece as SESSION_PLACEMENT_SETTING_KEY,X_e as SHARE_AFFINITY_TOLERANCE_SESSIONS,rce as SHARE_SOURCE_SETTING_KEY,Tn as SHARE_VIEW_KINDS,jre as SHARE_VIEW_MAX_DEVICES,JO as SINGLE_HUB_ADDRESS_ROLES,yo as SOURCE_CAPS,_o as SOURCE_CAP_ACTIVE_FIELD,vo as SOURCE_CAP_CHANGED_AT_FIELD,bo as SOURCE_DEVICE_TYPES,KT as SOURCE_INFO_METADATA_KEY,lie as SSO_STATE_COOKIE,uie as SSO_STATE_COOKIE_MAX_AGE_SEC,u5 as STATE_LABELS,l5 as STATE_LABEL_KEYS,Hm as STATIONARY_OVERLAY_STYLE,Ms as STATISTIC_STATS,Qp as STORAGE_ACCESS_FALLBACK,qp as STORAGE_BYTES_PER_GB,Op as STORAGE_LOCATION_MODES,N$ as STREAM_PROFILE_META,Ld as STREAM_QUALITY_LABELS,Nhe as SUBJECT_PATH_DWELL_EPS,Mhe as SUBJECT_PATH_FULL_FRAME_COVERAGE,Phe as SUBJECT_PATH_MAX_POINTS,Ep as SUB_DETECTION_TYPES,Efe as SYSTEM_CAP_NAMES,Bpe as SYSTEM_SCOPE_DEVICE_METHODS,n$ as SceneCheckSchema,JQ as SceneConditionSchema,d$ as SceneConfirmSchema,f$ as SceneMonitorSchema,t$ as SceneMonitorStateSchema,m$ as SceneMonitorStatusForDeviceSchema,p$ as SceneMonitorStatusSchema,e$ as SceneReferenceSchema,$Q as SceneUnavailableSchema,XQ as SceneUncoveredPolicySchema,QQ as SceneVerdictSchema,kre as ScopedTokenSchema,AL as ScoredObjectEventSchema,y$ as ScriptRunnerStatusSchema,CU as SearchResultSchema,jV as SendEmailInputSchema,MV as SendEmailResultSchema,fj as SendResultSchema,WF as SensorEventSchema,mV as ServerBootModeSchema,U$ as ServerNameInfoSchema,H$ as ServerNameSchema,wV as ServerPackageStatusSchema,xV as ServerRollbackInfoSchema,OV as ServerUpdateActionResultSchema,TV as ServerUpdateCheckResultSchema,EV as ServerUpdateOutcomeSchema,hV as ServerUpdateStateSchema,Ql as SessionHealthTracker,ZR as SessionPlacementPolicySchema,mB as SessionTriggerSchema,aV as SetCameraSensorsInputSchema,C1 as SetLoggingSettingsInputSchema,mz as SetShareSourceInputSchema,t1 as SetSiteLocationInputSchema,Md as SetTrackPurityInputSchema,Nd as SetTrackPurityResultSchema,kd as SetTrackRelationInputSchema,hv as SettingsPatchSchema,ly as SettingsRecordSchema,mv as SettingsSchemaWithValuesSchema,gv as SettingsUpdateResultSchema,dz as ShareSourceSchema,rg as ShareViewGrantSchema,ig as ShareViewScopeSchema,ace as ShareWeightsSchema,$$ as SiteLocationSchema,Q$ as SiteLocationSourceSchema,e1 as SiteLocationStatusSchema,eD as SiteZoneSchema,x$ as SmokeStatusSchema,NV as SmtpStatusSchema,FV as SnapshotImageSchema,HT as SourceInfoSchema,Fv as SpatialDetectionSchema,LV as SsoBridgeClaimsSchema,rz as StaleDevicePinSchema,JA as StartEmbeddedInputSchema,Rg as StartEnrollmentOutputSchema,r0 as StationaryObjectSchema,fne as StatisticHelperSpecSchema,rc as StatisticWindowSchema,XV as StorageAbortUploadInputSchema,Zp as StorageAccessSchema,ZV as StorageBeginDownloadInputSchema,QV as StorageBeginDownloadResultSchema,KV as StorageBeginUploadInputSchema,qV as StorageBeginUploadResultSchema,Sp as StorageCleanupInputSchema,Cp as StorageCleanupJobSchema,xp as StorageCleanupPhaseSchema,wp as StorageCleanupStatusInputSchema,Yp as StorageDrainProgressSchema,eH as StorageEndDownloadInputSchema,Ap as StorageEvictionPolicySchema,YV as StorageFinalizeUploadInputSchema,Lw as StorageKindSchema,$p as StorageLocationDeclarationSchema,kp as StorageLocationModeSchema,Xp as StorageLocationRefSchema,Wp as StorageLocationSchema,Up as StorageLocationTypeSchema,Jf as StorageMigrationClassSchema,Yf as StorageMigrationDestinationsSchema,up as StorageMigrationDrainInputSchema,ip as StorageMigrationFindingCodeSchema,ap as StorageMigrationFindingSchema,Hf as StorageMigrationFootageMoveInputSchema,Qf as StorageMigrationInputSchema,rp as StorageMigrationJobSchema,sp as StorageMigrationLaneSchema,Vf as StorageMigrationLeaseInputSchema,qf as StorageMigrationMediaMoveInputSchema,Zf as StorageMigrationModeSchema,tp as StorageMigrationMoveProgressSchema,np as StorageMigrationMoveSchema,cp as StorageMigrationMoverSchema,ep as StorageMigrationParticipantSchema,$f as StorageMigrationPhaseSchema,op as StorageMigrationPlanSchema,lp as StorageMigrationResidueSchema,Xf as StorageMigrationSourcesSchema,HV as StorageOccupancyReportSchema,WV as StorageProviderInfoSchema,$V as StorageReadChunkInputSchema,Iw as StorageTableSchema,GV as StorageTestLocationResultSchema,JV as StorageWriteChunkInputSchema,Br as StoredRecordKindDeclarationSchema,Ab as StreamCodecSchema,sb as StreamFormatSchema,xJ as StreamNetworkStatsSchema,A$ as StreamParamsOptionsSchema,O$ as StreamParamsStatusSchema,D$ as StreamProfileConfigSchema,k$ as StreamProfileOptionsSchema,j$ as StreamProfilePatchSchema,E$ as StreamProfileSchema,nH as StreamSignalSchema,rH as StreamSignalsStatusSchema,Ui as StreamSourceEntrySchema,Wi as StreamSourceSchema,Ji as SubscribeAudioChunksInputSchema,Yi as SubscribeAudioChunksResultSchema,sz as SuggestSharesInputSchema,uz as SuggestSharesResultSchema,cz as SuggestedDeviceShareSchema,lz as SuggestedNodeShareSchema,$L as SuppliedRootOutputSchema,L$ as SwitchStatusSchema,ET as SystemHeldSecretNameSchema,PA as SystemMetricsSchema,Tpe as SystemMirror,T5 as TIMELAPSE_DENSE_FLOOR_SEC,nm as TIMEZONES,Cd as TRACK_RELATIONS_DEFAULT_LIMIT,Lu as TRAINING_JOB_SCHEMA,Ru as TRAINING_RESULT_SCHEMA,wne as TRANSCODE_DOWN_MAX_BITRATE_KBPS,Cne as TRANSCODE_DOWN_MAX_HEIGHT,E1 as TamperStatusSchema,sj as TargetKindCapsSchema,oj as TargetKindLevelSchema,cj as TargetKindSchema,lj as TargetSchema,O1 as TemperatureSensorStatusSchema,cH as TerminalInstanceInfoSchema,lH as TerminalLegacyCameraSchema,dH as TerminalOutputBatchSchema,uH as TerminalOutputEventSchema,sH as TerminalProfileInfoSchema,oH as TerminalSessionInfoSchema,BK as TestConnectionResultSchema,zK as TestConnectionStatusEnum,pj as TestResultSchema,mne as ThresholdHelperSpecSchema,j5 as TimelapseRuleInputSchema,p_e as TimelapseRulePatchSchema,m_e as TimelapseRuleSchema,v5 as TimelapseTemplateSchema,A1 as ToastSchema,tg as TokenScopeSchema,AJ as TopologyNodeSchema,EJ as TopologyProcessSchema,TJ as TopologyServiceSchema,O_ as TraceNodeOutcomeSchema,E_ as TraceValueSchema,ML as TrackCascadeCountsSchema,qF as TrackEnvelopeSchema,tI as TrackFlagsPatchSchema,nI as TrackFlagsSchema,cI as TrackPlacementSchema,JF as TrackProjectionSchema,Od as TrackPuritySchema,Ed as TrackPurityValueSchema,wd as TrackRelationKindSchema,Id as TrackRelationRefusalSchema,Dd as TrackRelationSchema,lI as TrackSchema,Td as TrackSideSchema,XF as TrackSourceSchema,IF as TrackStateSchema,RF as TrackZoneFilterSchema,OL as TrackedDetectionSchema,S0 as TrainerSourceRefSchema,I0 as TrainingAcceleratorRefSchema,D0 as TrainingBaseModelSchema,L0 as TrainingCanarySchema,R0 as TrainingCanaryTargetSchema,Wu as TrainingCatalogDraftSchema,E0 as TrainingCorpusSelectionSchema,y0 as TrainingCredentialCheckSchema,Gu as TrainingEvalClassSchema,Ku as TrainingEvalReportSchema,Xu as TrainingEventSchema,oI as TrainingExportDeviceTotalsSchema,Bu as TrainingExportSchema,sI as TrainingExportSummarySchema,P0 as TrainingFailureReasonSchema,f0 as TrainingGpuOptionSchema,M0 as TrainingJobPlanSchema,k0 as TrainingJobRequestSchema,z0 as TrainingJobSchema,Xne as TrainingJobSpecSchema,N0 as TrainingJobStateSchema,w0 as TrainingLogLineSchema,O0 as TrainingPresetSchema,F0 as TrainingProgressPointSchema,m0 as TrainingProviderDefaultsSchema,_0 as TrainingProviderDescriptorSchema,g0 as TrainingProviderEntrySchema,h0 as TrainingProviderTypeSchema,v0 as TrainingProviderUpdateEntryInputSchema,j0 as TrainingRefusalReasonSchema,p0 as TrainingRegionOptionSchema,Hu as TrainingResultFileSchema,qu as TrainingResultSchema,A0 as TrainingSplitPlanSchema,Ju as TrainingStageSchema,_r as TransactRefusedError,r1 as TransportPlaneCountsSchema,n1 as TransportPlaneSchema,pH as TurnServerSchema,xm as UNATTRIBUTED_BUCKET_KEY,r2 as UNIT_TABLE,Z0 as UNLOCK_CONFIRMATION,_h as USE_ROOT_MODEL_DEFAULTS,vh as USE_ROOT_MODEL_SETTING_KEY,or as UnindexedFilterError,DU as UninstallNodeOutcomeSchema,OU as UninstallNodeResultSchema,kU as UninstallPackageResultSchema,i2 as UnitConversionError,cr as UnknownRecordKindError,px as UnreleasedClaimSchema,Kf as UnstampedEventMediaCountSchema,Gf as UnstampedRowsSchema,DV as UpdateBlockerSchema,HK as UpdateIntegrationInputSchema,M1 as UpdateStatusSchema,I1 as UpdateUserInputSchema,Ore as UserRecordSchema,ng as UserScopeSchema,P1 as UserSummarySchema,MH as VECTOR_INDEX_DIM_CONFLICT,Wce as VIDEOCLIPS_MAX_OFFER_BYTES,Uce as VIDEOCLIPS_MAX_READ_BYTES,bre as VIEWER_FEATURES,Gh as VIEWER_FEATURE_IDS,Tf as VISIT_MERGE_GAP_MS,Ufe as VOCAB_TEMPLATES,W1 as VacuumControlStatusSchema,U1 as VacuumStateSchema,K1 as ValveStateSchema,q1 as ValveStatusSchema,SH as VectorDeclareIndexInputSchema,OH as VectorDeleteByFilterInputSchema,DH as VectorDeleteInputSchema,kH as VectorDeleteResultSchema,yH as VectorFilterSchema,AH as VectorGetInputSchema,jH as VectorGetResultSchema,bH as VectorItemSchema,xH as VectorMatchSchema,vH as VectorMetadataSchema,_H as VectorMetricSchema,TH as VectorQueryInputSchema,EH as VectorQueryResultSchema,NH as VectorStatsInputSchema,PH as VectorStatsResultSchema,CH as VectorUpsertInputSchema,wH as VectorUpsertResultSchema,Y1 as VibrationStatusSchema,tu as VideoEncodeSchema,qh as ViewerDeviceAllowSchema,Kh as ViewerFeatureIdSchema,Jh as ViewerTokenScopeSchema,Kce as WEBRTC_CLIMB_HOLD_CODES,yne as WEBRTC_EGRESS_PROFILE,qce as WEBRTC_TRY_BLOCKERS,EQ as WEEKLY_MASK_LENGTH,Je as WELL_KNOWN_TABS,Ye as WELL_KNOWN_TAB_MAP,Z1 as WaterHeaterStatusSchema,$1 as WeatherStatusSchema,tU as WebrtcClimbHoldSchema,eU as WebrtcLadderDecisionSchema,rU as WebrtcSessionDebugSchema,$H as WebrtcStreamChoiceSchema,QH as WebrtcStreamTargetSchema,nU as WebrtcTierFailureSchema,OK as WhiteBalanceModeSchema,vv as WidgetHostEnum,TA as WidgetLoginMethodSchema,xv as WidgetMetadataSchema,bv as WidgetRemoteSchema,yv as WidgetSizeEnum,xD as WrapperActivationReadSchema,yV as WrapperEvidenceSchema,bV as WrapperIdentitySchema,vV as WrapperKindSchema,_j as YAMNET_TO_MACRO,pI as ZoneCrossingDirectionSchema,mI as ZoneCrossingSchema,Jz as ZoneKindEnum,g$ as ZoneRuleModeEnum,_$ as ZoneRuleSchema,u0 as ZoneRuleStageEnum,v$ as ZoneRulesArraySchema,Xz as ZoneSchema,n0 as ZoneScopeBreakdownSchema,fm as __resetLogChannelRegistryForTests,X5 as acceleratorKindOf,oU as accessoriesCapability,ife as accessoryChildrenComplete,rfe as accessoryChildrenUnknown,$de as accessoryStableId,WU as actionSourceCapability,qU as actionsCapability,t3 as actionsForBoundCaps,r3 as actionsForDevice,n3 as actionsForDeviceType,Bfe as actionsForDevices,vge as activateAlarmProfile,xS as activeForReducer,ble as actuatorMethodRow,Roe as addonCatalogHref,J_ as addonIdOfActionId,cv as addonPagesCapability,uv as addonPagesSourceCapability,dv as addonRoutesCapability,_v as addonSettingsCapability,wv as addonWidgetsCapability,Sv as addonWidgetsSourceCapability,PU as addonsCapability,ha as adminUiCapability,zie as advertisedHubOrigins,e7 as aggregateThroughputFactor,IU as airQualitySensorCapability,Qhe as alarmDeviceBlocksArming,$he as alarmDeviceSecureOnArm,oM as alarmPanelCapability,pge as alarmPatchLanded,bge as alarmProfileById,F8 as alertEpisodeId,Dge as alertEpisodeKind,kge as alertEpisodePayload,I8 as alertNodeId,Av as alertsCapability,Vfe as allDoActions,ure as allowedSuppliedEffect,RU as ambientLightSensorCapability,J0 as annotateClipsWithEventLabels,cie as appFlowLocation,aae as appendTrace,Ds as applianceDeviceType,upe as applianceExport,lge as applyBlockingEdit,Uve as applyCropClassFloors,sge as applyModeDelaysEdits,v8 as applyModeDeviceListEdit,w_e as applyModelBoundSettings,cge as applyNonBlockingEdit,uge as applySecureOnArmEdit,ZS as arithmeticDraft,Mbe as armRemovalReconcile,St as arrayItemFieldPath,fte as asBoolean,lte as asJsonArray,Va as asJsonObject,dte as asNumber,yr as asRecordsError,ute as asString,h_e as assertTimelapseCadences,Jr as assertTransactScope,Hr as assertValidDeclaration,Ol as assignNodeColorId,jv as audioAnalysisCapability,Yv as audioAnalyzerCapability,ye as audioChunkBytesPerSample,ny as audioCodecCapability,Lme as audioIsFailClosed,$3 as audioKindId,zme as audioLabelChoices,UU as audioMetricsCapability,Ime as audioModeOf,n6 as audioOrDefaults,ao as audioPlanFromEncodeProfile,Sme as audioScaleEraOf,iy as authProviderCapability,qd as autoAssignProfiles,YU as automationControlCapability,Ry as backupCapability,D9 as bareAddonId,Ei as baseUnitOf,QU as batteryCapability,Uye as bestLocationMatch,eW as binaryCapability,vbe as bindAddonActions,nW as brightnessCapability,ab as brokerCapability,P3 as bucketStartOf,mae as buildActionSteps,Hl as buildAddonRouteProvider,eo as buildAudioArgs,_ve as buildBenchStepTree,AC as buildCapabilityLookup,BT as buildDeviceAdminUrl,yie as buildDeviceEnrollmentLink,vie as buildDeviceSignatureMessage,xce as buildEventKindDescriptor,Dte as buildFfmpegArgs,Za as buildInputArgs,th as buildModelVariantGroups,nM as buildNcTaxonomy,l4 as buildPlusCatalogClassMap,Sye as buildRoleScopes,Ct as buildSecretRef,Zl as buildSessionLostAlert,F$ as buildStreamParamsConfigSchema,zhe as buildSubjectPath,oae as buildTriggerTrace,$a as buildVideoArgs,KO as buildViewerLink,WC as builtCapabilityBlockers,Bj as bundledCamstack,rW as buttonCapability,uW as calendarEventLocalSpan,dW as calendarEventOnLocalDay,cW as calendarSourceCapability,_W as calendarsCapability,bW as cameraCredentialsCapability,EW as cameraGridLayoutCapability,__e as cameraOwnsMotionViaSensor,ob as cameraPipelineConfigCapability,Fm as cameraScopedStepSettings,QP as cameraSensorRefKey,Pb as cameraStreamsCapability,u2 as canConvertUnit,mu as canonicalEgressPlan,jE as canonicalIconKey,gg as canonicalizeAppCallback,Ire as capabilityScopesOf,b7 as capacityForModel,t7 as capacitySessionsOf,OW as carbonMonoxideCapability,obe as cellsToRects,uk as checkRoleAddress,Vg as claimedRequestOrigins,vre as classifyBearerPrincipal,sve as classifyCamerasForBenchmark,S2 as classifyFieldSource,Y5 as classifyInferenceHardware,ad as classifyRetrainReview,qe as classifySecretWrite,xn as classifyStoreError,Vd as classifyStream,Bd as classifyStreams,Ln as clearKnownSecrets,D_e as clearModelBoundOverrides,B5 as clearModelBoundSetting,jW as climateControlCapability,mle as clipEventLabelDepsFromApi,eQ as clipExportFailure,tQ as clipExportFailureOf,G0 as clipLabelsForWindow,zce as clipReasonHeaderValue,O8 as cloneAlarmSettings,ms as cloneStatefulExpressionMemory,hF as clusterModelSettingKey,AF as clusterStepSettingFieldsFor,kF as clusterStepSettingKey,su as codecIsAccepted,Ze as collectHydratedFieldEntries,$e as collectHydratedFieldValues,je as collectKeychainStoredKeys,o_ as collectMirrorSources,V5 as collectModelBoundKeys,Oe as collectSecretConfigKeys,Ar as collectSecretLeaves,jt as collectSecretMarkerRefs,Cr as collectZodSecretPaths,LW as colorCapability,Hse as colorForKind,I9 as commitWatchdogRestart,au as compareToTarget,$o as compileExpression,es as compileExpressionSafe,uC as compileHelper,$2 as compileKeyedArrayOverride,k2 as compilePulseOverride,R2 as compileScalarOverride,iue as compileSpanOverride,Yne as composeSwitchedOff,bl as composedDeviceRef,yl as composedDeviceStableId,_x as composerCapability,TC as compositionEdges,fl as compositionFeatureEnabled,rx as compositionFieldKey,Vde as compositionFillStatus,Sl as compositionItemFieldPath,vl as compositionReadKey,_l as compositionSliceKey,B as compositionSourceKey,Zae as compositionSourceRefs,ive as computeCapacityShares,qY as computeScores,t_ as conditionDepth,_he as conditionExclusionReason,ghe as conditionVisibleForKind,HW as connectionTestCapability,WW as connectivityCapability,ZW as consumableFormOf,YW as consumableKindOf,Zse as consumableLowPercentOf,iG as consumablesCapability,oG as contactCapability,pre as containingParentIndex,uG as controlCapability,Xle as convertPresetFeature,Nle as convertUnit,tue as convertUnitTargets,G9 as coralUsableUnits,soe as coreBlockAddonId,foe as coreBlockComposition,coe as coreBlockIdFromAddonId,doe as coreBlockSourceKind,mw as coreBlocksCapability,qye as cosineSimilarity,n_ as countConditionLeaves,Nve as countRecoverySkips,pG as coverCapability,hge as createAlarmProfile,vle as createDeviceExtensionProvider,Aa as createDeviceProxy,lt as createDurableState,st as createEvent,Ta as createEventBusSliceSource,ns as createExpressionScope,kne as createHwAccelCache,wa as createLazyTrpcSource,mm as createLogChannelsProvider,Ea as createMirrorSource,Zr as createRecordsAccess,ype as createRuntimeStateBridge,Vn as createSecretsAccess,N as createSliceHandle,ps as createStatefulExpressionMemory,xme as createSystemProxy,Jee as customAction,yw as customModelRegistryCapability,xw as dataStoreProviderCapability,Ty as databaseSnapshotCapability,yG as dayNightCapability,VQ as dayOfWeekToIndex,O4 as declarationOwnerNodeId,qr as declarationsOf,dm as declareLogChannel,FS as declaredSeriesKind,kde as decodeCompositionToCards,t4 as decodeKeyedArrayOverride,F2 as decodePulseOverride,J2 as decodeScalarOverride,mbe as decodeVectorBase64,AT as decoderCapability,Che as defaultDeliveryForSection,Obe as defaultDeviceFor,qee as defineCustomActions,Eee as defineEntryKind,_le as defineExtensionSlotProvider,Kr as defineRecordKinds,it as dehydrateConfigField,at as dehydrateSchema,_ge as deleteAlarmProfile,zS as derivativeDraft,PS as derivativeUnitLabel,ufe as deriveBatteryPresence,qne as deriveCameraSwitches,rye as deriveDetailCropRect,Sh as deriveMaskSupplies,m8 as derivePostTriggeredAction,Of as deriveRecordingMode,Zve as deriveRootFaceRefineRect,bh as deriveRootSupplies,ooe as describeComposableCaps,Xee as describeCustomActions,rh as describeModelVariant,HQ as describeOnboardClamp,OQ as describeOnboardRefusal,hre as describeRootSupplies,Th as describeRootSupply,Hb as describeStateField,qge as describeSystemEventDeliveryProblem,ohe as describeSystemEventFamilyProblem,Ub as describeTopLevelStateFields,Cye as detectAccessRole,b_ as detectionClassMatches,jT as detectionPipelineCapability,PT as deviceAdminLinkCapability,uE as deviceAdoptionCapability,Oge as deviceAttentionKind,ube as deviceBackendToFormat,fT as deviceCredentialsCapability,Yee as deviceCustomAction,ZT as deviceDiscoveryCapability,e3 as deviceDoFamily,yE as deviceExportCapability,iO as deviceExtensionCapability,lT as deviceHistoryCapability,ID as deviceManagerCapability,h3 as deviceMatchesProfile,ba as deviceOpsCapability,cD as deviceProviderCapability,wie as deviceRefusalFromMessage,jO as deviceRemovalHookCapability,g9 as deviceSelectorMatches,lO as deviceStateCapability,CG as deviceStatusCapability,P_e as diffStepSettings,Nte as disarmRoseMemory,PG as dishwasherCapability,xG as displayPaletteCapability,ji as displayUnitFor,Hfe as doActionSelectValue,W0 as dominantClipLabels,zG as doorbellCapability,vhe as droppedConditionsForKind,Cbe as edgetpuDelegateDevice,A_e as effectiveStepSettings,Fne as egressTranscodeSharingKey,fu as egressTransportFromRequest,Y_e as electByShare,Q_e as electByShareWithAffinity,ave as eligibleUnderBenchmark,DO as embeddingEncoderCapability,bO as embeddingModelFailedError,EO as embeddingModelFailedOf,wO as embeddingRefusalOf,SO as embeddingRequirementsFailedError,xO as embeddingRequirementsUnavailableError,Fee as emitDownForOwnedCaps,ct as emitReadiness,wae as emitsCollectionSelector,Ide as encodeCardsToComposition,iu as encodeProfileFromStreamShape,pbe as encodeVectorBase64,mge as ensureAlarmProfiles,Tee as entryBody,HG as enumSensorCapability,jbe as enumerateInferenceDevices,Lae as enumerateItemArrayFields,Bb as enumerateSchemaFields,qa as errMsg,lve as estimateNodeBenchmarkDurationMs,$0 as evaluateAggregate,fs as evaluateAst,zle as evaluateCompositionField,tae as evaluateConditionTree,Po as evaluateCount,Qte as evaluateDerivative,ys as evaluateExpressionSource,F9 as evaluatePoolMemory,Mo as evaluateRose,Eo as evaluateSensorEdge,To as evaluateSensorLevelEdge,hs as evaluateStatefulExpressionCall,qte as evaluateStatistic,gbe as evaluateZoneRules,ma as event,GG as eventEmitterCapability,a_e as eventKindLabel,U0 as eventOverlapsClipWindow,Pp as evictionPolicyForMode,Bp as evictionPolicyOfLocation,be as expandAudioChunkToF32le,da as expandCapMethods,E4 as expandContainer,n5 as expandSystemEventClasses,cQ as exportSubjectOf,gfe as exposeBlockDevices,kx as expressionContainsBuiltinCall,$S as expressionDraft,Y0 as extensionSlotRef,kae as extractNestedAddonId,qT as extractSourceInfoFromMetadata,nK as faceGalleryCapability,PO as failureContributionCapability,bm as failureRate,aK as fanControlCapability,wS as fanOutTargets,Cl as featureFieldEntries,Xh as featureOfRole,sK as featureProbeCapability,wl as featureSources,Gle as feederCustomizationExample,Wle as feederExampleSources,uu as ffmpegRate,C2 as fieldEntryToSource,xl as fieldReads,U5 as fieldUnitKeys,F_e as fieldsPinnedAtValueBelow,LO as filesystemBrowseCapability,kC as findCandidateCycles,EC as findCompositionCycles,rm as findTimezone,lK as floodCapability,Tm as foldSnapshotByFunction,eve as foreignCapacityCells,Fn as forgetKnownSecret,Nie as formatDeviceRevoker,U9 as formatForRuntime,Fl as formatMediaOwnerKey,PQ as formatMinutes,Hj as formatPaletteViolations,Um as formatParkedFor,Rye as formatReading,xt as formatSecretScope,Rde as formulaProblem,D7 as freshResults,Rve as fuseRecoveredDetections,dK as gasCapability,Jp as gbToBytes,Qie as generateAutomationBlock,use as getAudioMacroClassIds,dpe as getByPath,Hpe as getCapsByProviderKind,um as getLogChannelRegistry,Qj as getTaxonomyEntry,jne as gifDeriveSpeed,du as gifFilterComplex,Mne as gifFromMp4Args,_t as globalSecretScope,S9 as grantRowsOf,gK as groupActiveCapability,mK as groupCommandsCapability,vK as groupStatusCapability,$x as groupTemplate,E_e as hasModelBoundOverrides,bfe as hasMotionTrigger,tie as hasUrlScheme,bK as heatingValveCapability,Vc as helperMembers,_C as helperSaveProblems,za as hfModelUrl,kS as historyFieldsFor,Bee as historyItemFieldPath,Di as historyUnitFor,d6 as htmlToText,Aoe as hubAddressHostname,v_e as hubMotionNativeProvider,SK as humidifierCapability,wK as humiditySensorCapability,tt as hydrateSchema,JE as iconCategoryLabel,IE as iconEntry,VE as iconsInCategory,EK as imageCapability,Z6 as imageModesForKind,FK as imageSettingsCapability,Ax as inferExpressionKinds,gre as inferModelProvider,Vye as ingestReading,N9 as initialPoolMemoryState,une as integralCadenceMs,BS as integralDraft,Jte as integrateReading,WK as integrationsCapability,JK as intercomCapability,K_ as internalActionId,l_e as interpolate,vF as interpretStoredClusterModel,yF as invalidClusterStepModelEntries,Kle as invertPresetFeature,kte as invocationFromEncodeProfile,Bne as isAgentOnlyPlacement,l8 as isAlarmControllableCap,Tge as isAlertEpisodeOpen,Ege as isAlertEpisodeSeverity,BO as isAppLinkBase,oie as isAppStartRefusal,Os as isApplianceKind,Fb as isArrayOutputSchema,ve as isAudioChunkFormat,qme as isAudioClassName,a6 as isAudioLabelSelected,W6 as isAudioRule,pz as isAutomaticShareSource,Xme as isBaseConditionKey,dfe as isBatteryPresenceFault,gF as isClusterScopedStep,Dae as isCollectionArrayMethod,Vre as isCredentialTokenPayload,D8 as isDefaultAlarmProfileId,_k as isDefaultAppConnectionEndpoint,Sie as isDefinitiveDeviceRefusal,zne as isDeployableToAgent,nae as isDetectionMacroClass,Wee as isDeviceConfigCap,Ma as isDeviceScopedCap,Z4 as isDoActionActuatable,Rfe as isDoPickerDeviceType,Bhe as isDrawableSubjectPath,TO as isEmbeddingModelFailed,ot as isEvent,m5 as isEventKindLabelKey,Vl as isEventOwnerType,cf as isFirstLevelMacroClass,J8 as isHeldBackTemplateVar,Bc as isHistoryHelper,AE as isIconKey,q_ as isInternalActionId,Wne as isIsolatedBuiltin,De as isKeychainStoredField,Ige as isKnownTemplateVar,ph as isLabelSupplyStepId,Kp as isLocationEnabled,Nl as isMediaOwnerType,Nm as isModelScopedStepSettingKey,N4 as isNode,j9 as isOauthLandingReason,Eae as isObjectInput,G6 as isOccupancyRule,he as isOwnerOnlyEventCategory,x3 as isPlugApplianceType,wi as isReadingQuantity,S_e as isRemovedModelId,Wpe as isRestoredCap,pN as isRetiredClearKey,tre as isRootSuppliableStepId,Gye as isSameAddonId,jhe as isScheduleActive,We as isSecretClear,Ee as isSecretConfigField,Ge as isSecretFieldView,He as isSecretMarker,Ue as isSecretMarkerLike,wt as isSecretRef,Vt as isSecretRefOwnedBy,YO as isSingleHubAddressRole,F_ as isSkippedTrace,Xa as isSoftwareDecode,xo as isSourceCap,d5 as isStateLabelKey,Do as isStatefulBuiltin,Lp as isStorageLocationMode,R6 as isSystemDelivery,S6 as isSystemEventFamily,zge as isSystemEventRecoveryKind,Wge as isSystemEventSummaryRule,j6 as isSystemRuleKind,s4 as isUnfilledRequiredProblem,Mce as isVectorIndexDimConflict,Tae as isVoidInput,Sr as isZodSecret,X3 as ituDbfsFromPreEpoch,sU as jobKindSchema,Lb as kebabToCamel,DT as keychainAdminCapability,Yw as keychainCapability,wx as kindOfValue,phe as kindsForDiscriminator,In as knownSecretCount,Jme as knownValues,QK as lawnMowerControlCapability,pfe as legacyAutoLinkIds,$6 as legacyImageMode,Fp as legacyModeOf,mU as lifecycleJobSchema,pU as lifecycleJobScopeSchema,fU as lifecycleJobStateSchema,dU as lifecycleTaskSchema,ire as linkedLabelStepId,are as linkedStepOf,gve as listBenchDetailSteps,lA as llmCapability,Hk as llmRuntimeCapability,pA as loadContributionCapability,vq as localNetworkCapability,_5 as localizeConfigTree,ZE as locationIconKey,E9 as locationSimilarity,xq as lockControlCapability,Ya as logBannerArgs,hA as logChannelsCapability,SA as logDestinationCapability,Xd as logLevelAtMost,OA as loginMethodCapability,Oae as looseSchema,bi as makeInMemoryRecords,zi as makeProfileBrokerId,Ve as makeSecretMarker,Bi as makeSourceBrokerId,lse as mapAudioLabelToMacro,kr as mapSecretLeaves,a4 as markFieldEdited,m6 as markdownToHtmlLite,u6 as markdownToText,Ha as maskUrlCredentials,i3 as matchDoAction,pc as maxDurationMs,zp as mayReadLocation,Rp as mayWriteToLocation,pve as measuredCapacityFromResults,fve as measuredDetectorCells,Oq as mediaPlayerCapability,Ine as memoizePinnedFfmpeg,K0 as mergeClipLabels,que as mergeKeyedArrayItem,Kj as mergeOverrides,Aue as mergeScalarTarget,sn as mergeSecretStatePaths,K5 as mergeSettingsBags,R_ as mergeSkipTraces,WT as mergeSourceInfo,Mq as meshNetworkCapability,Cq as meterCapability,M as method,Uh as methodAccessForHttpMethod,Cle as methodRefusal,Yh as methodRoleOf,FA as metricsProviderCapability,If as migrateLegacyDeviceSignalConfig,BQ as minutesToTimeOfDay,Np as modeMayRead,Mp as modeMayWrite,L5 as modelBindingKey,LA as modelConvertCapability,BA as modelDistributorCapability,kbe as modelFormatForRuntime,Pm as modelScopedStepSettingKeys,Rq as motionCapability,UA as motionDetectionCapability,dce as motionSourceLabel,Vq as motionTriggerCapability,Kq as motionZonesCapability,XA as mqttBrokerCapability,eJ as nativeObjectDetectionCapability,mJ as navigationCapability,E8 as ncAlarmSystemDefaultSettings,Dhe as ncMediaPolicyError,$A as networkAccessCapability,bJ as networkLinkCapability,wJ as networkQualityCapability,cne as nextLocalMidnight,uve as nodeBenchmarkRefusals,gT as nodeCertificatesCapability,Qge as nodePickerItems,Iee as nodePin,HJ as nodesCapability,wn as normalizeAddonInitResult,Q3 as normalizeAudioLabel,uoe as normalizeCoreBlockWrite,Ehe as normalizeNcMediaPolicy,ut as normalizeNodeId,Bg as normalizeOrigin,vt as normalizeSecretOwner,Eye as normalizeTokenScopes,GT as normalizeUnit,P7 as normalizedArea,hj as notificationOutputCapability,zP as notificationRulesCapability,YJ as notifierCapability,ZJ as numericSensorCapability,VP as oauthIntegrationCapability,Xye as oauthLandingUrl,Aae as objectInputDeclaresAddonId,jae as objectInputDeclaresRequiredDeviceId,YL as occupancyScope,GP as oidcConnectionsCapability,ke as omitTransientConfig,sne as openReset,one as openStatistic,Gb as optionalAncestors,pa as optionalMethod,rY as osdCapability,gY as osdManagerCapability,FF as overlayClusterStepSettings,q2 as ownedSlice,t_e as packagePickerItems,Gj as paintHex,m4 as paletteEntryLabel,Fse as paletteFromInput,Lse as paletteFromStored,Zde as paletteLegend,Pj as paletteResultSchema,Mj as paletteSwatchSchema,GY as parseAcceleratorFactsJson,VT as parseAdminBase,wge as parseAlertEpisodePayload,_g as parseAppAuthCallback,sie as parseAppFlowRequest,bg as parseAppPageLang,Kd as parseCameraStreamConfig,IW as parseColorInput,zre as parseCredentialScopes,bie as parseDeviceEnrollmentLink,Xo as parseExpression,mte as parseJsonArray,pte as parseJsonObject,Ba as parseJsonUnknown,Pl as parseMediaOwnerKey,Zye as parseOauthLandingFragment,XL as parseOccupancyScope,$ye as parseProcStatus,Vi as parseProfileBrokerId,ld as parseRetrainRevisionConflict,bhe as parseRuleSection,wr as parseSecretPath,Et as parseSecretRef,an as parseSecretStatePath,tce as parseSessionPlacementPolicy,ice as parseShareSource,I$ as parseStreamParamsFormPatch,Zne as parseTrainingEventLine,Rme as patchAudio,SY as petFeederCapability,xfe as pickAccessoryControl,UO as pickAppLinkHub,SF as pickClusterStepModels,PF as pickClusterStepSettings,eye as pickDetailCropConvention,uye as pickFaceRescoreIntervalMinutes,CF as pickInvalidClusterStepModels,xye as pickNativeLeaseOverride,jm as pickPreferredRtspEntry,Bie as pickRequestOrigin,R9 as pickRestartCandidate,io as pickVideoEncoder,s6 as pickerForCondition,Kme as pickerForRuleClasses,ove as pinUnderBenchmark,QL as pipelineAnalyticsCapability,jR as pipelineExecutorCapability,lV as pipelineOrchestratorCapability,OB as pipelineRunnerCapability,zC as planComposition,Yb as planCompositionEvents,Gx as planItems,G7 as planMotionCropRegions,Yve as planMotionCrops,Pve as planRecoveryCrops,hc as planResetTier,mc as planStatisticTier,OY as plateGalleryCapability,yX as platformProbeCapability,Kde as plusCatalogDefaultClassFloors,Gde as plusCatalogLabelFields,P9 as poolMemoryThreshold,TX as powerMeterCapability,the as prepareNotification,OX as presenceCapability,zj as presetById,AX as pressureSensorCapability,Bde as primaryCapForRole,yre as principalMayReachAddon,IX as privacyMaskCapability,Hde as problemsBlockSave,Nae as procedureAuthKey,_me as projectKeyedArrayAssignment,fme as projectPulseAssignment,rme as projectScalarAssignment,pme as projectSpanAssignment,Whe as projectSubjectPath,b_e as providerMotionEvent,ZX as ptzAutotrackCapability,KX as ptzCapability,ge as publicEventCategories,dbe as pythonScriptForBackend,Bye as quantityFromUnit,vne as rankStreams,bF as readClusterStepModels,MF as readClusterStepSettings,Z7 as readDetailCropConvention,qde as readDeviceStateFrom,La as readErrorI18n,$7 as readFaceRescoreIntervalMinutes,P5 as readHubMotionDetected,N5 as readHubMotionStatus,e4 as readKeyedArrayItems,JP as readMotionTriggeredBy,u9 as readNativeLeaseOverride,Lee as readNodePin,z7 as readRecoveryRecipe,Vve as readRecoveryRecipeForSteps,g_e as readTimelapseGeneratedAt,wh as readUseRootModel,ea as readinessKey,A as readingMeta,cZ as rebootCapability,J_e as recommendNode,hfe as reconcileBlockDevices,$9 as reconcileRemovedDevices,Nr as recordArrayItemPath,Hw as recordEntriesCapability,jr as recordSecretCollection,Mr as recordSecretRef,VZ as recordingArchiveCapability,bZ as recordingCapability,lQ as recordingExportCapability,SQ as recordingOnboardCapability,GQ as recordingSignalCapability,Fw as recordsCapability,vr as recordsErrorFromMessage,abe as rectsToCells,Am as reducePoints,bS as reducerForActive,Pn as registerKnownSecret,Fve as remapCropDetections,jue as removeScalarTarget,gge as renameAlarmProfile,u3 as renderVocabPhrase,BC as replacedFieldKeys,XY as reportIsScalable,Rie as requestMountPrefix,Wb as requiredTopLevelKeys,fbe as requiresPython,qQ as reservedSourceOwner,L9 as resetPoolBaseline,U_ as resolveActionVariables,yu as resolveAddonExecution,Vne as resolveAddonGroup,Une as resolveAddonPlacement,yk as resolveAppConnections,km as resolveBucketMs,sa as resolveCapMount,ere as resolveClipSearchMinScore,EF as resolveClusterStepModelId,T4 as resolveContainerPrimaryChild,nw as resolveCoreBlockEntry,loe as resolveCoreBlockFiles,sQ as resolveCreateExportSubject,yfe as resolveDeviceControlKind,rpe as resolveDeviceProfile,ov as resolveDeviceTarget,$_e as resolveEffectiveShares,Ane as resolveEgressDecodeHwAccel,aQ as resolveExportProfiles,g6 as resolveFormat,koe as resolveHubAddressRoles,et as resolveHydratedFieldValue,ME as resolveIconKey,mk as resolveInternalAddress,tX as resolveLatencyColumn,Ip as resolveLocationMode,Mae as resolveMethodAuth,Sre as resolveMethodRole,rge as resolveModeDelays,nge as resolveModeNotifyPolicy,z5 as resolveModelBoundSetting,Cfe as resolveMutate,t8 as resolveNcMediaImage,gk as resolveNotificationTapAddress,Qye as resolvePoolMemoryPolicy,hk as resolvePublicEndpoint,Af as resolveRecordingProfiles,lre as resolveRootSupply,Hne as resolveRunnerId,Ht as resolveSecretMarkers,pee as resolveSecretViewsIn,q$ as resolveServerName,av as resolveStepArgs,Qa as resolveStreamMaps,nh as resolveVariantModelId,x9 as resolveViewableDeviceIds,T7 as resultCellKey,E7 as resultStandings,ed as retrainBoxIou,cd as retrainRevisionConflictMessage,f9 as roleSpec,fc as rollingDurationMs,Ule as roomCompositionExample,sre as rootSuppliesOf,dre as rootSupplyServes,Jhe as ruleAutoTriggersAlarm,d8 as ruleBelongsToAlarm,z6 as ruleDeviceCompatCapNames,mhe as ruleDeviceCompatCapQueries,The as ruleEditorSectionsForKind,u8 as ruleGatedOnArmedState,hhe as ruleGroupingApplies,V6 as ruleKindOf,I6 as ruleKindSpec,xhe as ruleMatchesSection,yhe as ruleSection,She as ruleSectionOf,J6 as ruleSeedForSection,Q6 as ruleTriggerZoneIds,TS as runFanOut,cbe as runInferenceStep,lae as runSteps,ule as runningFromDishwasherOperation,fle as runningFromLawnMower,ple as runningFromMediaPlayer,dle as runningFromVacuumState,sZ as runningStateCapability,Dbe as runtimeDevices,Xpe as runtimeFieldUnit,M3 as runtimeStatePolicyFor,zfe as sameDoFamily,pC as sameHelperBody,Zle as sameRead,H2 as scalarTargetCount,h$ as sceneMonitorCapability,Jge as scheduleForSendTimes,Ne as schemaDeclaresAnyField,y9 as scopeInherits,ta as scopeKey,Wh as scopesAllowAddon,Lre as scopesAllowAddonRoutes,_re as scopesAllowDeviceCap,Rre as scopesAllowOwnPreferences,Fre as scopesGrantAdmin,X9 as scoreRuntimes,b$ as scriptRunnerCapability,Rn as scrubKnownSecrets,qE as searchIcons,Tr as secretArrayPrefixes,cn as secretTreeFromPaths,rn as secretTreeFromSchema,ege as secureActuationFor,vk as selectAppConnectionEndpoints,Hi as selectAssignedProfileSlots,zve as selectRecoveryStep,Yge as sendTimesForEditor,o5 as sendTimesOfSchedule,xge as sensorRaisedOf,Zhe as sensorTransitionNeverFires,Sge as sensorTransitionOffered,Pge as servedTemplateVars,kV as serverManagementCapability,Xl as sessionLostAlertId,O7 as sessionsOfDeviceCell,C3 as setByPath,Lde as setFormulaExpr,Fj as setPaletteInputSchema,W5 as settingValuesEqual,k_e as settingsBelow,_y as settingsStoreCapability,cg as shareViewGrantOf,Sle as sharedActuatorFeatures,xle as sharedActuatorMethods,CS as sharedColorModes,SS as sharedLightCaps,K$ as shortHostname,Mn as shortSecretRefHash,vJ as signalPercentFromBars,yJ as signalPercentFromRssi,tD as siteZoneKey,L_ as skipSignature,Ua as sleep,Wa as sleepCancellable,So as sliceActiveValue,Co as sliceChangedAt,S$ as smokeCapability,PV as smtpProviderCapability,IV as snapshotCapability,ks as sourcePickForAppliance,e2 as sourcePickForHistory,Mle as sourcePickForMath,jle as sourcePickForTemplate,g5 as splitTranslationRef,L7 as squareAround,RV as ssoBridgeCapability,Tp as startMoverUnderClearance,gpe as startReachabilityPoll,r_e as stateLabel,Jde as stateVocabularyFor,lne as statisticCadenceMs,RS as statisticDraft,x_e as stepModelRunsOnFormat,lme as stepPulse,j_e as stepSettingSource,ume as stepSpan,Rw as storageAdminCapability,zV as storageCapability,BV as storageEvictableCapability,VV as storageMigrationCapability,UV as storageOccupancyCapability,tH as storageProviderCapability,Rse as storedFromReady,Ij as storedPaletteSchema,kb as streamBrokerCapability,T$ as streamCatalogCapability,M$ as streamParamsCapability,zd as streamPixels,Rd as streamQualityLabel,iH as streamSignalsCapability,wf as stripRetiredBandPreBufferSec,Vp as strippedOfLegacyReadOnly,Use as subKindsOf,n8 as subjectHasPath,Fhe as subjectPathSampleFromBox,Ghe as subjectPathSvgPoints,LX as summarisePrivacyAudio,kye as summarizeEffectiveScope,od as summarizeReview,Ch as supplyFor,Ebe as supportedRuntimes,kse as swatchHex,R$ as switchCapability,Jne as switchedOffIds,yge as syncActiveAlarmProfileSettings,UT as synthesizeSourceInfo,T1 as systemCapability,Rge as systemEventClassKinds,t5 as systemEventClassOf,Bge as systemEventClassesFor,Kge as systemEventDeliveryProblems,k6 as systemEventFamilyOf,ahe as systemEventFamilyProblems,b6 as systemEventFilterApplies,rhe as systemEventFilterAppliesToAnyKind,O6 as systemEventKindNamesOf,D6 as systemEventKindsOfFamily,i5 as systemEventSummaryScheduleOf,Uge as systemEventSummarySplitOf,M6 as systemFamilyOfKind,H6 as systemRuleKindOf,D1 as tamperCapability,Mue as targetFeature,uU as taskLogEntrySchema,cU as taskPhaseSchema,lU as taskTargetSchema,k1 as temperatureSensorCapability,Zge as templateCarriesSummary,mC as templateDeviceType,Y8 as templateVarDeliveryApplies,Z8 as templateVarKindApplies,Q8 as templateVarSystemEventApplies,$8 as templateVarsFor,fH as terminalSessionCapability,p6 as textToHtml,qS as thresholdDraft,jye as thresholdToBase,Mye as thresholdToDisplay,zQ as timeOfDayToMinutes,HO as toAppLinkHubOrigin,b4 as toDeviceSummary,_s as toExpressionValue,oa as toNodeId,x7 as toPercentShares,Ke as toSecretFieldView,Hd as toStreamSourceEntry,j1 as toastCapability,Bme as toggleAudioLabel,Wo as tokenize,V0 as trainingCapability,T0 as trainingProviderCapability,_6 as transcodeBody,Bt as transformSecretWrite,Ple as tryConvertDelta,l2 as tryConvertUnit,mH as turnProviderCapability,Yle as unitCompanionField,o2 as unitDimension,d2 as unitsForDimension,QD as unreachableExtensionSlotRow,Rb as unwrapSchema,N1 as updateCapability,Ia as userError,H1 as userManagementCapability,gH as userPasskeysCapability,G1 as vacuumControlCapability,aoe as validateComposition,ck as validateCustomAddress,vs as validateExpressionSource,Vj as validatePalette,i_ as validateRecipeBounds,J1 as valveCapability,hbe as vectorDimFromBase64,jce as vectorIndexDimConflictError,FH as vectorStoreCapability,X1 as vibrationCapability,XH as videoclipsCapability,Zh as viewerAdmitsDevice,Cre as viewerHoldsRole,VO as viewerLinkBaseOf,m9 as viewerScopeOf,_a as viewerUiCapability,Qfe as vocabularyActionsForDevice,npe as vocabularyTriggersForDevice,Q1 as waterHeaterCapability,js as wattMillisecondsToKwh,e0 as weatherCapability,ZH as webrtcClientHintsSchema,iU as webrtcSessionCapability,FQ as weeklyMaskIndex,IQ as weeklyMaskIsUniform,LQ as weeklyMaskToWindows,_fe as widenDeviceConstructor,RQ as windowsToWeeklyMask,_u as wiringAddonHealthSchema,Lne as wiringHealthSnapshotSchema,vu as wiringNodeHealthSchema,hu as wiringProbeKindSchema,gu as wiringProbeResultSchema,hle as withClipEventLabels,M_e as withFieldFrom,Hp as withLocationMode,Hge as withSystemEventClasses,Qee as withoutCallerStamp,N_e as withoutField,Jue as withoutKeyedArrayItem,T_e as writeModelBoundSetting,Ope as zodEntriesToConfigUI,l0 as zoneAnalyticsCapability,d0 as zoneRulesCapability,Zz as zonesCapability};
|