@camstack/addon-admin-ui 0.1.40 → 0.1.46
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/{__mfe_internal__admin_ui_host__loadShare___mf_0_tanstack_mf_1_react_mf_2_query__loadShare__.mjs-Cv6qLu_-.js → __mfe_internal__admin_ui_host__loadShare___mf_0_tanstack_mf_1_react_mf_2_query__loadShare__.mjs-CRKSbdgN.js} +1 -1
- package/dist/assets/{__mfe_internal__admin_ui_host__loadShare___mf_0_tanstack_mf_1_react_mf_2_query__loadShare__.mjs_commonjs-proxy-CChEG9e0.js → __mfe_internal__admin_ui_host__loadShare___mf_0_tanstack_mf_1_react_mf_2_query__loadShare__.mjs_commonjs-proxy-BGPfTw3V.js} +1 -1
- package/dist/assets/{__mfe_internal__admin_ui_host__loadShare___mf_0_trpc_mf_1_react_mf_2_query__loadShare__.mjs-C1BmHlGM.js → __mfe_internal__admin_ui_host__loadShare___mf_0_trpc_mf_1_react_mf_2_query__loadShare__.mjs-jPpiOa0I.js} +1 -1
- package/dist/assets/{__mfe_internal__admin_ui_host__loadShare___mf_0_trpc_mf_1_react_mf_2_query__loadShare__.mjs_commonjs-proxy-Bxv_3KWz.js → __mfe_internal__admin_ui_host__loadShare___mf_0_trpc_mf_1_react_mf_2_query__loadShare__.mjs_commonjs-proxy-DYNYuSL7.js} +1 -1
- package/dist/assets/{__mfe_internal__admin_ui_host__loadShare__react__loadShare__.mjs-DC63qZbr.js → __mfe_internal__admin_ui_host__loadShare__react__loadShare__.mjs-ij0ODm-n.js} +1 -1
- package/dist/assets/{__mfe_internal__admin_ui_host__loadShare__react__loadShare__.mjs_commonjs-proxy-D2C49VyZ.js → __mfe_internal__admin_ui_host__loadShare__react__loadShare__.mjs_commonjs-proxy-C4Ko8zXp.js} +1 -1
- package/dist/assets/{__mfe_internal__admin_ui_host__loadShare__react_mf_2_dom__loadShare__.mjs-D3WbXy3O.js → __mfe_internal__admin_ui_host__loadShare__react_mf_2_dom__loadShare__.mjs-Cf5gSqc_.js} +1 -1
- package/dist/assets/{__mfe_internal__admin_ui_host__loadShare__react_mf_2_dom__loadShare__.mjs_commonjs-proxy-Csg6EbPB.js → __mfe_internal__admin_ui_host__loadShare__react_mf_2_dom__loadShare__.mjs_commonjs-proxy-CYaX3FDr.js} +1 -1
- package/dist/assets/{__mfe_internal__admin_ui_host__loadShare__react_mf_2_dom_mf_1_client__loadShare__.mjs-CUc0oFNo.js → __mfe_internal__admin_ui_host__loadShare__react_mf_2_dom_mf_1_client__loadShare__.mjs-rHwdrynu.js} +1 -1
- package/dist/assets/{__mfe_internal__admin_ui_host__loadShare__react_mf_2_dom_mf_1_client__loadShare__.mjs_commonjs-proxy-vh0hhA5d.js → __mfe_internal__admin_ui_host__loadShare__react_mf_2_dom_mf_1_client__loadShare__.mjs_commonjs-proxy-DRDS6j-Y.js} +1 -1
- package/dist/assets/{__mfe_internal__admin_ui_host__loadShare__react_mf_2_konva__loadShare__.mjs-CpGtTxci.js → __mfe_internal__admin_ui_host__loadShare__react_mf_2_konva__loadShare__.mjs-cUuqcEcL.js} +2 -2
- package/dist/assets/{__mfe_internal__admin_ui_host__loadShare__react_mf_2_konva__loadShare__.mjs_commonjs-proxy-RUDPE9aM.js → __mfe_internal__admin_ui_host__loadShare__react_mf_2_konva__loadShare__.mjs_commonjs-proxy-CzMP41OH.js} +1 -1
- package/dist/assets/{_virtual_mf-localSharedImportMap___mfe_internal__admin_ui_host-yD7UmaAo.js → _virtual_mf-localSharedImportMap___mfe_internal__admin_ui_host-DNAkeUTZ.js} +1 -1
- package/dist/assets/{devices-a77yscD5.js → devices-DaqavVOg.js} +1 -1
- package/dist/assets/{hostInit-DaDF_bfJ.js → hostInit-ByQycOVJ.js} +1 -1
- package/dist/assets/index-B6kubsZI.js +151 -0
- package/dist/assets/index-BI1a6Whs.js +1 -0
- package/dist/assets/index-BVNg3Krt.js +1185 -0
- package/dist/assets/{index-DsOnjZM4.js → index-BbwPCEeT.js} +1 -1
- package/dist/assets/{index-CehI0ALS.js → index-BpC2rqYA.js} +1 -1
- package/dist/assets/index-CukoHCyD.js +1 -0
- package/dist/assets/{index-DVUREV1A.js → index-Cyva9RmE.js} +1 -1
- package/dist/assets/index-DLnW8nGB.css +1 -0
- package/dist/assets/index-DNydUTOB.js +1 -0
- package/dist/assets/{index-IsVfuhTX.js → index-DVLRgczW.js} +1 -1
- package/dist/assets/index-PXbclFuZ.js +87 -0
- package/dist/assets/index-QqQmcu5i.js +1 -0
- package/dist/assets/method-access-map-DjDdPRYC.js +1 -0
- package/dist/assets/{remoteEntry-VsZWB5do.js → remoteEntry-iRKuVHUX.js} +1 -1
- package/dist/assets/{schemas-BEt-CulV.js → schemas-BdJePqbR.js} +5 -5
- package/dist/assets/{virtual_mf-REMOTE_ENTRY_ID___mfe_internal__admin_ui_host__remoteEntry-_hash_-VQvlRqZ-.js → virtual_mf-REMOTE_ENTRY_ID___mfe_internal__admin_ui_host__remoteEntry-_hash_-QVZxTxLo.js} +2 -2
- package/dist/index.html +152 -9
- package/dist/mf-entry-bootstrap-0.js +2 -2
- package/dist/server/addon.js +413 -44
- package/dist/server/addon.js.map +1 -1
- package/dist/sw.js +1 -1
- package/package.json +1 -1
- package/dist/assets/index-C8NE-4Ma.js +0 -1
- package/dist/assets/index-COoei6lw.css +0 -1
- package/dist/assets/index-D4yaxCPF.js +0 -87
- package/dist/assets/index-DAMgd5aW.js +0 -1
- package/dist/assets/index-DAenO2kJ.js +0 -151
- package/dist/assets/index-DWdPkQ_j.js +0 -1
- package/dist/assets/index-Dj1ZxUR8.js +0 -1150
- package/dist/assets/index-EjW6hqu2.js +0 -1
- package/dist/assets/method-access-map-BgqTQNPE.js +0 -1
- package/dist/registerSW.js +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var Ye=(n,a)=>()=>(a||n((a={exports:{}}).exports,a),a.exports);var La=Ye(i=>{Object.defineProperty(i,Symbol.toStringTag,{value:"Module"});const s=require("./index-CMM1Y9W6.js"),b=require("zod");class Qe{disposers=[];disposed=!1;onError;constructor(a={}){this.onError=a.onError??((e,c)=>{console.error(`[DisposerChain] disposer #${c} threw`,e)})}add(a){if(this.disposed){try{const e=a();e&&typeof e.then=="function"&&e.catch(c=>this.onError(c,-1))}catch(e){this.onError(e,-1)}return()=>{}}return this.disposers.push(a),()=>{const e=this.disposers.indexOf(a);e>=0&&this.disposers.splice(e,1)}}get isDisposed(){return this.disposed}get size(){return this.disposers.length}async dispose(){if(this.disposed)return;this.disposed=!0;const a=this.disposers.slice().reverse();this.disposers=[];for(let e=0;e<a.length;e++){const c=a[e];try{const r=c();r&&typeof r.then=="function"&&await r}catch(r){this.onError(r,a.length-1-e)}}}}const be="hub-only";function _(n){return{placement:n.execution?.placement??be,group:n.execution?.group}}function Je(n){const a=_(n).placement;return a==="any-node"||a==="agent-only"}function Xe(n){return _(n).placement==="agent-only"}function et(n){return _(n).group}function tt(n,a){return n.execution?.group??a}function at(n){return _(n).placement}var B=(n=>(n.SystemBoot="system.boot",n.SystemAddonsReady="system.addons-ready",n.SystemRestarting="system.restarting",n.SystemRestartCompleted="system.restart-completed",n.SystemReadyState="system.ready-state",n.AddonStarted="addon.started",n.AddonStopped="addon.stopped",n.AddonRestarted="addon.restarted",n.AddonUpdated="addon.updated",n.AddonInstalled="addon.installed",n.AddonUninstalled="addon.uninstalled",n.AddonCrashed="addon.crashed",n.AddonError="addon.error",n.AddonPageReady="addon.page-ready",n.AddonWidgetReady="addon.widget-ready",n.AddonLoadFailed="addon.load-failed",n.AddonLoadRecovered="addon.load-recovered",n.AddonRetryScheduled="addon.retry-scheduled",n.AddonRetryAttempting="addon.retry-attempting",n.DeviceRegistered="device.registered",n.DeviceUnregistered="device.unregistered",n.DeviceEnabled="device.enabled",n.DeviceDisabled="device.disabled",n.DeviceSettingsUpdated="device.settings-updated",n.DeviceBindingsChanged="device.bindings-changed",n.DeviceMetaChanged="device.meta-changed",n.DeviceStreamsRegistered="device.streams-registered",n.IntegrationEnabled="integration.enabled",n.IntegrationDisabled="integration.disabled",n.IntegrationDeleted="integration.deleted",n.ProviderStarted="provider.started",n.ProviderStopped="provider.stopped",n.ProcessCrashed="process.crashed",n.ProcessRestartScheduled="process.restart_scheduled",n.ProcessRestarted="process.restarted",n.RecordingStarted="recording.started",n.RecordingStopped="recording.stopped",n.RecordingError="recording.error",n.RecordingHealthDegraded="recording.health.degraded",n.RecordingStorageCritical="recording.storage.critical",n.RecordingSegmentWritten="recording.segment.written",n.RecordingPolicyFallback="recording.policy.fallback",n.RecordingRetentionCompleted="recording.retention.completed",n.DetectionEvent="detection.event",n.SessionTrackNew="session.track.new",n.SessionTrackExpired="session.track.expired",n.BenchmarkProgress="benchmark.progress",n.PlatformProbePhase="platform-probe.phase",n.PipelineProgress="pipeline.progress",n.PipelineTrace="pipeline.trace",n.PipelineInferenceResult="pipeline.inference-result",n.PipelineCameraAssigned="pipeline.camera-assigned",n.PipelineCameraUnassigned="pipeline.camera-unassigned",n.PipelineCameraUpdated="pipeline.camera-updated",n.PipelineRunnerLoadSnapshot="pipeline.runner-load-snapshot",n.PipelineCameraMetricsSnapshot="pipeline.camera-metrics-snapshot",n.StreamBrokerMetricsSnapshot="stream-broker.metrics-snapshot",n.StreamBrokerOnCamStreamDemand="stream-broker.onCamStreamDemand",n.StreamBrokerOnCamStreamIdle="stream-broker.onCamStreamIdle",n.StreamBrokerOnRequestStreamSourceRefresh="stream-broker.onRequestStreamSourceRefresh",n.DeviceStateChanged="device.state-changed",n.BatteryOnStatusChanged="battery.onStatusChanged",n.DoorbellOnPressed="doorbell.onPressed",n.PipelineEngineMetricsSnapshot="pipeline.engine-metrics-snapshot",n.ClusterTopologySnapshot="cluster.topology-snapshot",n.MetricsNodeResourcesSnapshot="metrics.node-resources-snapshot",n.MetricsNodeProcessesSnapshot="metrics.node-processes-snapshot",n.CapabilityBindingChanged="capability.binding-changed",n.ModelDownloadProgress="model.download.progress",n.AgentRegistered="agent.registered",n.AgentUnregistered="agent.unregistered",n.AgentOnline="agent.online",n.AgentOffline="agent.offline",n.WorkerOnline="worker.online",n.WorkerOffline="worker.offline",n.AgentTaskDispatched="agent.task.dispatched",n.AgentTaskAssigned="agent.task.assigned",n.AgentTrpcConnected="agent.trpc.connected",n.AgentWsConnected="agent.ws.connected",n.AgentWsDisconnected="agent.ws.disconnected",n.AgentBackupActivated="agent.backup.activated",n.OrchestrationSettingsUpdated="orchestration.settings-updated",n.PipelineAgentHwaccelChanged="pipeline.agent-hwaccel-changed",n.MotionAnalysis="detection.motion-analysis",n.MotionZonesRaw="detection.motion-zones-raw",n.MotionOnMotionChanged="motion.on-motion-changed",n.DetectionResult="detection.result",n.DetectionRaw="detection.raw",n.DetectionCameraNative="detection.camera-native",n.PipelineAudioInferenceResult="pipeline.audio-inference-result",n.DetectionPhaseTransition="detection.phase-transition",n.ProviderMotion="provider.motion",n.ProviderDetection="provider.detection",n.EnrichmentEmbeddingStored="enrichment.embedding.stored",n.EnrichmentSceneStateChanged="enrichment.scene.state-changed",n.EnrichmentActivitySummary="enrichment.activity.summary",n.PipelineAnalyticsTrackStarted="pipeline-analytics.track-started",n.PipelineAnalyticsTrackEnded="pipeline-analytics.track-ended",n.PipelineAnalyticsDetectionEvent="pipeline-analytics.detection-event",n.PipelineAnalyticsFrameTracked="pipeline-analytics.frame-tracked",n.FrigateLiveEvent="frigate.live-event",n.CameraStreamsProfileSlotsChanged="camera-streams.onProfileSlotsChanged",n.StreamOnline="stream.online",n.StreamOffline="stream.offline",n.NetworkTunnelStarted="network.tunnel.started",n.NetworkTunnelStopped="network.tunnel.stopped",n.LocalNetworkChanged="network.local.changed",n.BackupCompleted="backup.completed",n.BackupRestored="backup.restored",n.NotificationDispatched="notification.dispatched",n.NotificationFailed="notification.failed",n.DeviceUpdated="device.updated",n.DeviceOnline="device.online",n.DeviceOffline="device.offline",n.DeviceAwake="device.awake",n.DeviceSleeping="device.sleeping",n.RetentionCleanup="retention.cleanup",n))(B||{});function st(n,a){return n.category===a}function V(n,a,e){return{id:typeof crypto<"u"&&crypto.randomUUID?crypto.randomUUID():Math.random().toString(36).slice(2),timestamp:new Date,source:a,category:n,data:e}}function Ie(n,a){const e=a.ts??Date.now();n.emit(V("system.ready-state",{type:"capability",id:a.capName,nodeId:a.sourceNodeId},{capName:a.capName,scope:a.scope,state:a.state,generation:a.generation,sourceNodeId:a.sourceNodeId,ts:e}))}class Ce{_ctx=null;_config;_readinessGeneration=typeof crypto<"u"&&crypto.randomUUID?crypto.randomUUID():Math.random().toString(36).slice(2,14);_registeredCapNames=[];defaults;constructor(a){this.defaults=a,this._config={...a}}get autoEmitReadiness(){return!0}get ctx(){if(!this._ctx)throw new Error(`${this.constructor.name}: ctx accessed before initialize()`);return this._ctx}get ctxIfReady(){return this._ctx}get config(){return this._config}async initialize(a){this._ctx=a,await this.resolveConfig();const e=await this.onInitialize();this.emitLifecycle(B.AddonStarted);const c=we(e),r=c&&"providers"in c&&c.providers?c.providers:[];return this._registeredCapNames=r.map(p=>p.capability.name),c}postBrokerStart(){this.autoEmitReadiness&&this._registeredCapNames.length>0&&this.emitReadinessForProviders("ready")}async onHubReachable(){}async shutdown(){this.emitLifecycle(B.AddonStopped),this.autoEmitReadiness&&this.emitReadinessForProviders("down"),await this.onShutdown();for(const a of this._subscriptions)a();this._subscriptions=[],this._ctx=null}async onShutdown(){}async onConfigChanged(){}field(a){return a}schema(a){return a}globalSettingsSchema(){return null}deviceSettingsSchema(){return null}async getGlobalSettings(a){const e=this.globalSettingsSchema();if(!e)return{sections:[]};const c=await this._ctx?.settings?.readAddonStore()??{};return s.hydrateSchema(e,a?{...c,...a}:c)}async updateGlobalSettings(a){await this._ctx?.settings?.writeAddonStore(a),await this.resolveConfig(),await this.onConfigChanged(),this.emitLifecycle(B.AddonUpdated,{level:"global"}),this.maybeAutoRestart(a,this.globalSettingsSchema())}maybeAutoRestart(a,e){if(!e)return;const c=new Set;for(const d of e.sections)for(const m of d.fields)m.type==="separator"||m.type==="info"||m.requiresRestart&&c.add(m.key);if(c.size===0||!Object.keys(a).some(d=>c.has(d)))return;const p=this._ctx;if(!p)return;const l=p.id;setImmediate(()=>{p.api.addons?.restartAddon?.mutate({addonId:l}).then(()=>{p.logger.info("addon auto-restart triggered by restart-required setting change",{meta:{changedFields:Object.keys(a).filter(m=>c.has(m))}})}).catch(m=>{p.logger.error("addon auto-restart failed",{meta:{error:m instanceof Error?m.message:String(m)}})})})}async getDeviceSettings(a){const e=this.deviceSettingsSchema();if(!e)return{sections:[]};const c=await this._ctx?.settings?.readDeviceStore(a)??{};return s.hydrateSchema(e,c)}async updateDeviceSettings(a,e){await this._ctx?.settings?.writeDeviceStore(a,e)}_subscriptions=[];watchCapability(a,e){const c=Array.isArray(a)?a:[a],r=new Set(c);this.subscribe({category:"system.ready-state"},p=>{const l=p.data;if(typeof l.capName!="string"||!r.has(l.capName)||l.scope?.type!=="node")return;const d=l.scope.nodeId;if(typeof d!="string"||d.length===0)return;const m=l.capName;l.state==="down"?e.onDown?.(d,m):l.state==="ready"&&e.onReady?.(d,m)})}subscribe(a,e){const c=this.ctx.eventBus.subscribe(a,e);this._subscriptions.push(c)}emitLifecycle(a,e){try{this._ctx?.eventBus.emit({id:`${this._ctx.id}-${Date.now()}`,timestamp:new Date,source:{type:"addon",id:this._ctx.id,nodeId:this._ctx.kernel.localNodeId??"hub"},category:a,data:e??{}})}catch{}}emitReadinessForProviders(a){const e=this._ctx;if(!e||this._registeredCapNames.length===0)return;const c=e.kernel?.localNodeId??"hub",r=c.includes("/")?c.split("/")[0]:c;for(const p of this._registeredCapNames)try{Ie(e.eventBus,{capName:p,scope:{type:"node",nodeId:r},state:a,generation:this._readinessGeneration,sourceNodeId:r})}catch{}}async resolveModelsDir(){return this.ctx.api.storage.resolve.query({location:"models",relativePath:""}).catch(()=>"camstack-data/models")}get capabilities(){return this.ctx.capabilities??null}async resolveConfig(){const a=await this.readAddonStoreWithRetry(),e={...this.defaults};for(const c of Object.keys(this.defaults)){const r=a[c];if(r!=null){const p=typeof this.defaults[c];typeof r===p&&(e[c]=r)}}this._config=e}async readAddonStoreWithRetry(){const a=this._ctx?.settings;if(!a)return{};const e=[150,350,600,900];let c;for(let r=0;r<=e.length;r++)try{return await a.readAddonStore()??{}}catch(p){c=p;const l=p instanceof Error?p.message:String(p);if(!(l.includes("SqliteSettingsBackend not initialized")||l.includes("provider not available")))throw p;if(r===e.length)break;await new Promise(m=>setTimeout(m,e[r]))}return this._ctx?.logger?.warn?.("readAddonStore: settings-store unavailable after retries — using defaults",{meta:{error:c instanceof Error?c.message:String(c)}}),{}}}function we(n){if(n!=null)return Array.isArray(n)?{providers:n}:n}function it(n,a){return{id:n,getRoutes:()=>a,invoke:async e=>{const c=nt(a,e.method,e.path);if(!c)return{status:404,headers:{},redirectUrl:null,body:{error:`No route matches ${e.method} ${e.path}`}};const r={status:200,headers:{},redirectUrl:null},p=ct(r),l={params:{...e.params,...c.params},query:e.query,body:e.body,headers:e.headers,...e.user?{user:e.user}:{},...e.scopedToken!==void 0?{scopedToken:e.scopedToken}:{}};return await c.route.handler(l,p),r}}}function nt(n,a,e){const c=a.toUpperCase();for(const r of n){if(r.method!==c)continue;const p=ot(r.path,e);if(p!==null)return{route:r,params:p}}return null}function ot(n,a){const e=n.split("/").filter(Boolean),c=a.split("/").filter(Boolean);if(e.length!==c.length)return null;const r={};for(let p=0;p<e.length;p++){const l=e[p],d=c[p];if(l.startsWith(":"))r[l.slice(1)]=d;else if(l!==d)return null}return r}function ct(n){const a={status(e){return n.status=e,a},code(e){return n.status=e,a},send(e){n.body=e},redirect(e){n.redirectUrl=e,n.status===200&&(n.status=302)},header(e,c){return n.headers[e.toLowerCase()]=c,a},type(e){return n.contentType=e,a}};return a}class ke extends Error{capName;scope;waitedMs;constructor(a,e,c){super(`Timed out waiting for ${a} (${D(e)}) to become ready after ${c}ms`),this.name="ReadinessTimeoutError",this.capName=a,this.scope=e,this.waitedMs=c}}function $(n,a){return`${n}|${D(a)}`}function D(n){switch(n.type){case"global":return"global";case"node":return`node:${n.nodeId}`;case"device":return`device:${n.deviceId}`}}function Z(n,a){return n.type!==a.type?!1:n.type==="global"||a.type==="global"?!0:n.type==="node"&&a.type==="node"?n.nodeId===a.nodeId:n.type==="device"&&a.type==="device"?n.deviceId===a.deviceId:!1}class rt{bus;sourceNodeId;logger;now;generation;snapshot=new Map;subscriptions=new Set;unsubscribeBus;unsubscribeAgentOffline;constructor(a){if(this.bus=a.eventBus,this.sourceNodeId=a.sourceNodeId,this.logger=a.logger,this.now=a.now??(()=>Date.now()),this.generation=a.generation??dt(),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{const e=this.bus.getRecent({category:"system.ready-state"});for(const c of e)this.ingest(c.data)}catch{}}close(){this.unsubscribeBus(),this.unsubscribeAgentOffline(),this.subscriptions.clear()}get(a,e){return this.snapshot.get($(a,e))??null}getSnapshotForTransport(){return Array.from(this.snapshot.values())}hydrate(a){const e=this.now();for(const c of a){const r=$(c.capName,c.scope);if(this.snapshot.has(r))continue;const p={capName:c.capName,scope:c.scope,state:c.state,generation:c.generation,epoch:1,lastChange:e,sourceNodeId:c.sourceNodeId};this.snapshot.set(r,p),this.logger&&this.logger.debug(`readiness: ${c.capName} (${D(c.scope)}) → ${c.state} (hydrated, gen=${c.generation.slice(0,6)})`);const l={capName:c.capName,scope:c.scope,state:c.state,epoch:1,generation:c.generation,sourceNodeId:"hydrated",ts:e,durationInPrevState:0};for(const d of this.subscriptions)if(d.capName===c.capName&&Z(d.scope,c.scope))try{d.handler(l)}catch(m){this.logger?.warn(`readiness hydrate handler threw for ${c.capName}: ${m.message??String(m)}`)}}}getAll(){return new Map(this.snapshot)}emitReady(a,e){this.emitTransition(a,e,"ready")}emitStarting(a,e){this.emitTransition(a,e,"starting")}emitDown(a,e){this.emitTransition(a,e,"down")}awaitReady(a,e,c={}){const r=c.timeoutMs??Number.POSITIVE_INFINITY,p=this.now();return this.get(a,e)?.state==="ready"?Promise.resolve():c.signal?.aborted?Promise.reject(c.signal.reason??new Error("aborted")):new Promise((d,m)=>{let u=!1;const g=this.onReadyState(a,e,N=>{N.state==="ready"&&(u||(u=!0,I(),d()))}),h=!Number.isFinite(r)?null:setTimeout(()=>{u||(u=!0,I(),m(new ke(a,e,this.now()-p)))},r),v=()=>{u||(u=!0,I(),m(c.signal?.reason??new Error("aborted")))};c.signal?.addEventListener("abort",v,{once:!0});function I(){g(),h!==null&&clearTimeout(h),c.signal?.removeEventListener("abort",v)}})}onReadyState(a,e,c){const r={capName:a,scope:e,handler:c};this.subscriptions.add(r);const p=this.get(a,e);return p!==null&&queueMicrotask(()=>{this.subscriptions.has(r)&&c({capName:a,scope:e,state:p.state,epoch:p.epoch,generation:p.generation,sourceNodeId:this.sourceNodeId,ts:p.lastChange,durationInPrevState:0})}),()=>{this.subscriptions.delete(r)}}emitTransition(a,e,c){const r=this.now();this.bus.emit(V("system.ready-state",{type:"capability",id:a,nodeId:this.sourceNodeId},{capName:a,scope:e,state:c,generation:this.generation,sourceNodeId:this.sourceNodeId,ts:r}))}ingest(a){if(typeof a?.capName!="string"||a.state!=="ready"&&a.state!=="starting"&&a.state!=="down"||typeof a.generation!="string"||a.scope?.type!=="global"&&a.scope?.type!=="node"&&a.scope?.type!=="device")return;const e=$(a.capName,a.scope),c=this.snapshot.get(e)??null,r=this.now();let p;if(c===null?p=a.state==="ready"?1:0:c.generation!==a.generation&&a.state==="ready"?p=c.epoch+1:p=c.epoch,c!==null&&c.generation===a.generation&&c.state===a.state)return;const l=c===null?0:Math.max(0,r-c.lastChange),d={capName:a.capName,scope:a.scope,state:a.state,generation:a.generation,epoch:p,lastChange:r,sourceNodeId:a.sourceNodeId};this.snapshot.set(e,d);const m={capName:a.capName,scope:a.scope,state:a.state,epoch:p,generation:a.generation,sourceNodeId:a.sourceNodeId,ts:a.ts,durationInPrevState:l};this.logger&&this.logger.debug(`readiness: ${a.capName} (${D(a.scope)}) → ${a.state} epoch=${p} gen=${a.generation.slice(0,6)} (prev ${l}ms)`);for(const u of this.subscriptions)if(u.capName===a.capName&&Z(u.scope,a.scope))try{u.handler(m)}catch(g){this.logger?.warn(`readiness handler threw for ${a.capName}: ${g.message??String(g)}`)}}synthesizeDownForNode(a){const e=this.now();for(const[c,r]of this.snapshot){if(r.state==="down"||!(r.scope.type==="node"&&r.scope.nodeId===a||r.scope.type==="device"&&r.sourceNodeId===a))continue;const l=Math.max(0,e-r.lastChange),d={...r,state:"down",lastChange:e};this.snapshot.set(c,d);const m={capName:r.capName,scope:r.scope,state:"down",epoch:r.epoch,generation:r.generation,sourceNodeId:this.sourceNodeId,ts:e,durationInPrevState:l};this.logger&&this.logger.debug(`readiness: ${r.capName} (${D(r.scope)}) → down (synthesized from agent.offline ${a})`);for(const u of this.subscriptions)if(u.capName===r.capName&&Z(u.scope,r.scope))try{u.handler(m)}catch(g){this.logger?.warn(`readiness handler threw during agent.offline demux for ${r.capName}: ${g.message??String(g)}`)}}}}function dt(){return typeof crypto<"u"&&crypto.randomUUID?crypto.randomUUID():Math.random().toString(36).slice(2,14)}function pt(n,a){for(const{capName:e,scope:c}of a)n.emitDown(e,c)}const lt=["data","media","recordings","recordings-high","recordings-low","recordings-clips","event-images","models","addons-data","cache","logs","backups"],mt={data:"db",media:"media",recordings:"recordings","recordings-high":"recordings-high","recordings-low":"recordings-low","recordings-clips":"recordings-clips","event-images":"event-images",models:"models","addons-data":"addons-data",cache:"/tmp/camstack-cache",logs:"logs",backups:"backups"},Ae={high:"High",mid:"Mid",low:"Low"};function ut(n){return Ae[n]??n.charAt(0).toUpperCase()+n.slice(1)}function Ne(n){return(n.width??0)*(n.height??0)}function Pe(n){if(n.length===0)return[];const a=n.map((c,r)=>({s:c,i:r,px:Ne(c.metadata??{})})).sort((c,r)=>r.px-c.px),e=Array.from({length:n.length});for(let c=0;c<a.length;c++){const{s:r,i:p}=a[c];let l;c===0?l="high":c===a.length-1?l="low":l="mid",e[p]={...r,quality:l}}return e}function gt(n){const a=n.height??0,e=n.width??0;return a>=1080||e>=1920?"high":a>=480||e>=640?"mid":"low"}function St(n){const a=n.protocols.find(r=>r.type==="rtsp"&&r.url)??n.protocols.find(r=>r.url),e=a?.type,c=e==="rtsp"?"rtsp":e==="http"||e==="flv"?"http-mjpeg":"custom";return{id:n.id,label:n.label??n.id,protocol:c,url:a?.url,profileHint:n.quality}}function f(n){return typeof n=="string"}function ht(n){return typeof n=="object"&&n!==null&&!Array.isArray(n)}function yt(n){return f(n)&&n.trim()?{url:n}:ht(n)&&f(n.url)&&n.url.trim()?{url:n.url,label:f(n.label)?n.label:void 0}:null}function vt(n){const a=f(n.snapshot_url)?n.snapshot_url:void 0;if(Array.isArray(n.streams)){const l=[];for(const d of n.streams){const m=yt(d);m&&l.push(m)}return{streams:l,snapshot_url:a}}const e=[],c=f(n.main_stream_url)?n.main_stream_url:void 0;c&&e.push({url:c,label:f(n.main_stream_name)?n.main_stream_name:void 0});const r=f(n.sub_stream_url)?n.sub_stream_url:void 0;r&&e.push({url:r,label:f(n.sub_stream_name)?n.sub_stream_name:void 0});const p=f(n.third_stream_url)?n.third_stream_url:void 0;return p&&e.push({url:p,label:f(n.third_stream_name)?n.third_stream_name:void 0}),{streams:e,snapshot_url:a}}function ft(n){if(n.length===0)return{};const a=Pe(n),e={},c=a.find(d=>d.quality==="high"),r=a.find(d=>d.quality==="mid"),p=a.find(d=>d.quality==="low");c&&(e.high=c.id),r&&(e.mid=r.id),p&&(e.low=p.id);const l=c??r??p??a[0];return l&&(e.high||(e.high=l.id),e.mid||(e.mid=l.id),e.low||(e.low=l.id)),e}const bt={streaming:!0,notifications:!0,objectDetection:!1,remoteAccess:!0,agentCluster:!1,smartHome:!0,recordings:!0,backup:!0,repl:!0},It=["face","plate"],Ct=["face","plate","clip","custom"],wt={cleanupIntervalMs:3600*1e3,detectionEventsDays:30,audioLevelsDays:7,snapshotsDays:14};var De=(n=>(n.Addon="addon",n.Core="core",n.Device="device",n.Provider="provider",n.System="system",n))(De||{});const Ee="camstack/camstack-models",kt=`https://huggingface.co/${Ee}/resolve/main`,At={"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:[],"recording.segmentDurationSeconds":4,"recording.defaultRetentionDays":30,"ffmpeg.binaryPath":"ffmpeg","ffmpeg.hwAccel":"auto","ffmpeg.threadCount":0,"auth.tokenExpiry":"24h"};function Y(n){return JSON.parse(n)}function Me(n){return n===null||typeof n!="object"||Array.isArray(n)?null:{...n}}function Nt(n){return Array.isArray(n)?n:[]}function Pt(n,a=""){return typeof n=="string"?n:a}function Dt(n,a=0){return typeof n=="number"?n:a}function Et(n,a=!1){return typeof n=="boolean"?n:a}function Mt(n){try{return Me(Y(n))}catch{return null}}function Rt(n){try{const a=Y(n);return Array.isArray(a)?a:null}catch{return null}}function Tt(n,a){return`https://huggingface.co/${n}/resolve/main/${a}`}function Ot(n,a){if(n.length!==a.length)return 0;let e=0,c=0,r=0;for(let l=0;l<n.length;l++)e+=n[l]*a[l],c+=n[l]*n[l],r+=a[l]*a[l];const p=Math.sqrt(c)*Math.sqrt(r);return p===0?0:e/p}class qt{constructor(a,e){this.elementId=a,this.getBackend=typeof e=="function"?e:()=>e}cache={};listeners=new Set;loaded=!1;getBackend;async ensureLoaded(){if(this.loaded)return;const a=this.getBackend();if(!a)throw new Error(`ElementConfigStore(${this.elementId}): settings backend not available`);const e=await a.query({collection:"config",filter:{where:{id:this.elementId},limit:1}});e.length>0&&(this.cache=e[0].data??{}),this.loaded=!0}getAll(){return{...this.cache}}get(a){const e=a.split(".");let c=this.cache;for(const r of e){if(c===null||typeof c!="object"||Array.isArray(c))return;c=Reflect.get(c,r)}return c}async set(a,e){await this.ensureLoaded(),Bt(this.cache,a,e),await this.persist(),this.notifyListeners()}async setAll(a){await this.ensureLoaded(),this.cache={...a},await this.persist(),this.notifyListeners()}onChange(a){return this.listeners.add(a),()=>{this.listeners.delete(a)}}async load(){await this.ensureLoaded()}async loadDefaults(a){await this.ensureLoaded(),Object.keys(this.cache).length===0&&(this.cache={...a},await this.persist())}async persist(){const a=this.getBackend();if(!a)throw new Error(`ElementConfigStore(${this.elementId}): settings backend not available — cannot persist config`);await a.set({collection:"config",key:this.elementId,value:this.cache})}notifyListeners(){const a=this.getAll();for(const e of this.listeners)try{e(a)}catch{}}}function Bt(n,a,e){const c=a.split(".");let r=n;for(let p=0;p<c.length-1;p++){const l=c[p],d=r[l];if(d===null||typeof d!="object"||Array.isArray(d)){const m={};r[l]=m,r=m}else r=d}r[c[c.length-1]]=e}const Q={cpu:"onnx",coreml:"onnx",cuda:"onnx",tensorrt:"onnx","onnx-py":"onnx",pytorch:"pt",openvino:"openvino"},Re={onnx:"onnx",coreml:"coreml",openvino:"openvino",tflite:"tflite",pytorch:"pt"},Te={coreml:"coreml_inference.py",pytorch:"pytorch_inference.py",openvino:"openvino_inference.py"};function Oe(n,a){return n==="node"?"onnx":{coreml:"coreml",openvino:"openvino",pytorch:"pytorch","onnx-py":"onnx",cpu:"onnx"}[a]??a}function xt(n,a){return n==="node"?Q[a]??"onnx":{coreml:"coreml",openvino:"openvino",pytorch:"pt","onnx-py":"onnx",cpu:"onnx"}[a]??"onnx"}function _t(n,a){return!n||n==="auto"?"auto":Oe(n,a??"cpu")}function zt(n){return Q[n]??"onnx"}function Lt(n){return Re[n]}function Ft(n){return Te[n]}function Ut(n){return n==="coreml"||n==="pytorch"||n==="openvino"}async function $t(n,a){const e=performance.now();try{return{output:a!==void 0?await Wt(n(),a):await n(),durationMs:ve(performance.now()-e),ok:!0}}catch(c){return{output:void 0,durationMs:ve(performance.now()-e),ok:!1,error:s.errMsg(c)}}}function ve(n){return Math.round(n*100)/100}function Wt(n,a){return new Promise((e,c)=>{const r=setTimeout(()=>c(new Error(`Inference timeout after ${a}ms`)),a);n.then(p=>{clearTimeout(r),e(p)}).catch(p=>{clearTimeout(r),c(p)})})}const Ht=[{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"}],Kt=[{id:"person",name:"Person"},{id:"vehicle",name:"Vehicle"},{id:"animal",name:"Animal"}],Zt={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"},preserveOriginal:!1},Gt={camera:{type:"camera",label:"Camera",icon:"camera"}};class E{schema;data;persistFn;constructor(a,e,c){this.schema=a,this.data=e,this.persistFn=c}static fromSchema(a,e,c={},r){const p=a.safeParse(c);if(p.success)return new E(a,p.data,e);const l=new Set;for(const g of p.error.issues){const S=g.path[0];typeof S=="string"&&l.add(S)}const d={...c};for(const g of l)delete d[g];const m=a.safeParse(d);if(r?.({droppedKeys:[...l],issues:p.error.issues}),m.success)return e(m.data).catch(()=>{}),new E(a,m.data,e);const u=a.parse({});return new E(a,u,e)}get values(){return this.data}get(a){return this.data[a]}async set(a,e){const c=this.schema.parse({...this.data,[a]:e});this.data=c,await this.persistFn(this.data)}async setAll(a){const e=this.schema.parse({...this.data,...a});this.data=e,await this.persistFn(this.data)}async deleteKey(a){const{[a]:e,...c}=this.data,r=this.schema.parse(c);this.data=r,await this.persistFn(this.data)}entries(){const a=this.schema.shape;return Object.entries(a).map(([e,c])=>({key:e,schema:c,value:this.data[e],description:c.description}))}}class H{writer;pendingWrites=new Set;slices;schemas=new Map;listeners=new Set;capListeners=new Map;constructor(a,e){this.writer=e,this.slices=new Map;for(const[c,r]of Object.entries(a))r&&typeof r=="object"&&!Array.isArray(r)&&this.slices.set(c,{...r})}static fromInitial(a,e){return new H(a,e)}installCapSchema(a,e){const c=this.schemas.get(a);if(c){if(c!==e)throw new Error(`[DeviceRuntimeState] capability "${a}" registered a different runtime-state schema; each cap must declare ONE shape across every provider`);return}this.schemas.set(a,e);const r=this.slices.get(a);if(r){const p=e.safeParse(r);p.success?this.slices.set(a,p.data):this.slices.delete(a)}}getCapState(a){const e=this.slices.get(a);if(e)return Object.freeze({...e})}getCapField(a,e){return this.slices.get(a)?.[e]}setCapState(a,e){this.applyCapWrite(a,e,!1)}patchCapState(a,e){this.applyCapWrite(a,e,!0)}applyCapWrite(a,e,c){const r=this.schemas.get(a);if(!r)throw new Error(`[DeviceRuntimeState] no schema registered for cap "${a}" — did the device register it via ctx.registerNativeCap before writing?`);const p=this.slices.get(a)??{},l=c?{...p,...e}:{...e},d=r.parse(l);if(jt(p,d))return;this.slices.set(a,d),this.fireListeners([a]);const m=this.writer(a,{...d}).catch(()=>{});this.pendingWrites.add(m),m.finally(()=>{this.pendingWrites.delete(m)})}fireListeners(a){const e=this.snapshot();for(const c of this.listeners)try{c(a,e)}catch{}for(const c of a){const r=this.capListeners.get(c);if(!r)continue;const p=this.getCapState(c);for(const l of r)try{l(p)}catch{}}}subscribe(a){return this.listeners.add(a),()=>{this.listeners.delete(a)}}subscribeCap(a,e){let c=this.capListeners.get(a);c||(c=new Set,this.capListeners.set(a,c));const r=p=>{e(p)};return c.add(r),()=>{const p=this.capListeners.get(a);p&&(p.delete(r),p.size===0&&this.capListeners.delete(a))}}snapshot(){const a={};for(const[e,c]of this.slices)a[e]=Object.freeze({...c});return Object.freeze(a)}async flush(){if(this.pendingWrites.size===0)return;const a=[...this.pendingWrites];await Promise.allSettled(a)}}function jt(n,a){const e=Object.keys(n),c=Object.keys(a);if(e.length!==c.length)return!1;for(const r of e)if(n[r]!==a[r])return!1;return!0}const G="lastFetchedAt";function Vt(n){const{runtimeState:a,cap:e,ownDeviceId:c,refresh:r,staleMs:p,empty:l}=n,d=async()=>{const g=a.getCapState(e.name),S=typeof g?.[G]=="number"?g[G]:0;(!g||Date.now()-S>p)&&await r()},m=()=>{const g=a.getCapState(e.name);if(!g)return l();const{[G]:S,...h}=g;return h};return{ensureFresh:d,getStatus:async({deviceId:g})=>{if(g!==c)throw new Error(`${e.name}: deviceId mismatch, expected ${c}, got ${g}`);return await d(),m()}}}const Yt={audioMetrics:s.audioMetricsCapability,battery:s.batteryCapability,brightness:s.brightnessCapability,cameraStreams:s.cameraStreamsCapability,deviceDiscovery:s.deviceDiscoveryCapability,deviceStatus:s.deviceStatusCapability,doorbell:s.doorbellCapability,featureProbe:s.featureProbeCapability,motion:s.motionCapability,motionTrigger:s.motionTriggerCapability,motionZones:s.motionZonesCapability,ptzAutotrack:s.ptzAutotrackCapability,streamParams:s.streamParamsCapability,switch:s.switchCapability,zoneAnalytics:s.zoneAnalyticsCapability,zoneRules:s.zoneRulesCapability,zones:s.zonesCapability};class Qt{id;stableId;type;name;parentDeviceId;role;get online(){return this.runtimeState.getCapState("device-status")?.online??!1}set online(a){this.markOnline(a)}get state(){if(!this._stateProxyCache){const a={},e={get:(c,r)=>{const p=r;if(p in a)return a[p];const l=Yt[p];if(!l)return;const d=this.sliceProxy(l);return a[p]=d,d}};this._stateProxyCache=new Proxy(a,e)}return this._stateProxyCache}_stateProxyCache;config;runtimeState;ctx;location;disabled;constructor(a,e,c){if(this.ctx=a,this.id=a.id,this.stableId=a.stableId,this.type=c.type,!a.deviceMeta)throw new Error(`BaseDevice constructor: ctx.deviceMeta is required (id=${a.id} stableId=${a.stableId})`);this.name=a.deviceMeta.name,this.location=a.deviceMeta.location,this.disabled=a.deviceMeta.disabled,this.role=c.role,this.parentDeviceId=a.parentDeviceId;const r=a.persistedConfig??{};this.config=E.fromSchema(e,g=>a.persistConfig(g),r,({droppedKeys:g,issues:S})=>{a.logger.warn("Device config recovery: dropping invalid persisted fields",{tags:{deviceId:a.id,stableId:a.stableId},meta:{droppedKeys:[...g],firstIssue:S[0]?.message??null}})});let p=null;const l=async(g,S)=>{p||(p=a.fetchDevice(a.id)),await(await p).deviceState.setCapSlice({capName:g,slice:S})},d=a.initialRuntimeState??{};this.runtimeState=H.fromInitial(d,l),a.bindRuntimeState?.(this.runtimeState),a.registerNativeCap?.(s.deviceStatusCapability,{});const m={online:!1,lastChangedAt:Date.now()};this.runtimeState.setCapState("device-status",m),a.registerNativeCap?.(s.featureProbeCapability,{});const u={flags:{},deviceType:null,model:null,channelCount:null,lastProbedAt:0,lastFetchedAt:0};this.runtimeState.setCapState("feature-probe",u)}async removeDevice(){}markOnline(a){if(this.online===a)return;const e={online:a,lastChangedAt:Date.now()};this.runtimeState.setCapState("device-status",e)}async refreshFeatures(){const 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(a){return this.runtimeState.getCapState(a.name)??null}setCapSlice(a,e){this.runtimeState.setCapState(a.name,e)}sliceProxy(a){const e={},c={get:(r,p)=>this.runtimeState.getCapState(a.name)?.[p],set:(r,p,l)=>(this.runtimeState.patchCapState(a.name,{[p]:l}),!0),has:(r,p)=>{const l=this.runtimeState.getCapState(a.name);return l?p in l:!1},ownKeys:()=>{const r=this.runtimeState.getCapState(a.name);return r?Object.keys(r):[]},getOwnPropertyDescriptor:(r,p)=>{const l=this.runtimeState.getCapState(a.name);if(!(!l||!(p in l)))return{configurable:!0,enumerable:!0,value:l[p]}}};return new Proxy(e,c)}getSettingsUISchema(){return{sections:[]}}async applySettingsPatch(a){await this.config.setAll(a)}async onProbe(){}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 qe(n,a){const e={};for(const c of n.config.entries())e[c.key]=c.value;return{id:n.id,stableId:n.stableId,addonId:a,type:String(n.type),name:n.name,parentDeviceId:n.parentDeviceId,online:n.online,features:[...n.features],config:e}}class Jt extends Ce{async onInitialize(){return this.ctx.logger.info(`${this.providerName} Provider initialized`),[{capability:s.deviceProviderCapability,provider:this}]}async onShutdown(){const a=await this.ctx.kernel.devices?.getAll()??[];for(const e of a)try{await this.ctx.kernel.devices?.decommission(e.id)}catch(c){this.ctx.logger.warn(`${this.providerName}: decommission failed`,{tags:{deviceId:e.id,stableId:e.stableId},meta:{error:c instanceof Error?c.message:String(c)}})}this.ctx.logger.info(`${this.providerName} Provider shut down`,{meta:{decommissionedCount:a.length}})}async start(){}async stop(){}async getStatus(){return{connected:!0,deviceCount:(await this.ctx.kernel.devices?.getAll()??[]).length}}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(){return[]}async adoptDiscoveredDevice(a){throw new Error(`${this.providerName} provider does not support discovery-based adoption`)}async supportsManualCreation(){return!0}async getChildCreationSchema(a){return this.onGetCreationSchema(a.type)}async createDevice(a){const e=await this.onCreateDevice(a.type,a.config),c=this.deviceClasses[e.meta.type];if(!c)throw new Error(`${this.providerName} provider: no device class registered for type "${e.meta.type}" — add it to the deviceClasses map`);const r=this.generateStableId(e.meta.type,e.config),p=await this.ctx.kernel.devices.create(r,c,e.config,null,e.meta);if(e.onAfterCreate)try{await e.onAfterCreate(p)}catch(l){this.ctx.logger.warn("createDevice: onAfterCreate hook threw — device is already registered",{tags:{deviceId:p.id,stableId:r},meta:{error:l instanceof Error?l.message:String(l)}})}return this.toSummary(p)}generateStableId(a,e){return`${this.addonId}-${Date.now()}`}async testCreationField(a){return{status:"ok",labels:["probe not implemented"]}}async restoreDevices(a){await this.onRestoreDevices(a),a.length>0&&this.ctx.logger.info(`Restored ${a.length} ${this.providerName} device(s)`)}async onRestoreDevices(a){const e=new Set;for(const r of a){if(r.parentDeviceId!==null)continue;const p=this.deviceClasses[r.type];if(!p){this.ctx.logger.warn("No device class registered for restored type — skipping",{tags:{stableId:r.stableId},meta:{type:r.type}});continue}try{await this.ctx.kernel.devices.create(r.stableId,p,{}),e.add(r.id)}catch(l){this.ctx.logger.warn("Failed to restore device",{tags:{stableId:r.stableId},meta:{type:r.type,error:l instanceof Error?l.message:String(l)}})}}const c=a.filter(r=>r.parentDeviceId!==null);for(const r of c){const p=this.deviceClasses[r.type];if(p&&r.parentDeviceId!==null&&e.has(r.parentDeviceId))try{await this.ctx.kernel.devices.create(r.stableId,p,{},r.parentDeviceId),e.add(r.id)}catch(l){this.ctx.logger.warn("Failed to restore hub-adopted child",{tags:{stableId:r.stableId,parentDeviceId:r.parentDeviceId},meta:{type:r.type,error:l instanceof Error?l.message:String(l)}})}}}toSummary(a){return qe(a,this.addonId)}}function x(n){return n.def}function Xt(n,a="Configuration",e="main"){const c=n.map(r=>ea(r.key,r.schema,r.description));return{sections:[{id:e,title:a,fields:c}]}}function ea(n,a,e){const c=W(a),r=na(a),p=e??Be(n),l={key:n,label:p,description:e,default:r};return c instanceof b.z.ZodString?ta(n,l):c instanceof b.z.ZodNumber?aa(c,l):c instanceof b.z.ZodBoolean?{...l,type:"boolean"}:c instanceof b.z.ZodEnum?ia(c,l):c instanceof b.z.ZodArray||c instanceof b.z.ZodObject?{...l,type:"textarea",rows:6,isJson:!0}:{...l,type:"text"}}function ta(n,a){const e=n.toLowerCase();return e.includes("password")||e.includes("secret")||e.includes("token")||e.includes("apikey")||e.includes("api_key")?{...a,type:"password",showToggle:!0}:{...a,type:"text"}}function aa(n,a){const e=n,c=e.minValue,r=e.maxValue,p=c!=null&&isFinite(c)?c:void 0,l=r!=null&&isFinite(r)?r:void 0,d=sa(n);return{...a,type:"number",...p!==void 0?{min:p}:{},...l!==void 0?{max:l}:{},...d!==void 0?{step:d}:{}}}function sa(n){const e=x(n).checks??[];for(const c of e)if(c._zod?.def?.check==="multiple_of"&&c._zod.def.value!==void 0)return c._zod.def.value}function ia(n,a){const e=n.options.map(r=>String(r));return{...a,type:"select",options:e.map(r=>({label:Be(r),value:r}))}}function W(n){return n instanceof b.z.ZodDefault||n instanceof b.z.ZodOptional||n instanceof b.z.ZodNullable?W(x(n).innerType):n}function na(n){if(n instanceof b.z.ZodDefault)return x(n).defaultValue}function Be(n){return n.replace(/([A-Z])/g," $1").replace(/[_-]/g," ").replace(/^\w/,a=>a.toUpperCase()).trim()}const oa="device.state-changed";function J(n){const a=new Map,e=new Map;let c=null;const r=(d,m)=>`${d}:${m}`,p=()=>{c||n.live?.onEvent&&(c=n.live.onEvent.subscribe({category:oa},{onData:d=>{const m=d.data;if(!m||typeof m.deviceId!="number"||typeof m.capName!="string")return;const u=r(m.deviceId,m.capName);a.set(u,m.slice);const g=e.get(u);if(g)for(const S of g)try{S(m.slice)}catch{}}}))},l=()=>{c&&(e.size>0||(c.unsubscribe(),c=null))};return{read(d,m){return a.get(r(d,m))},async refresh(d,m){const u=await n.deviceState.getCapSlice.query({deviceId:d,capName:m}),g=r(d,m);a.set(g,u??void 0);const S=e.get(g);if(S)for(const h of S)try{h(u??void 0)}catch{}},watch(d,m,u){const g=r(d,m);let S=e.get(g);return S||(S=new Set,e.set(g,S)),S.add(u),p(),()=>{S.delete(u),S.size===0&&e.delete(g),l()}},async write(d,m,u){await n.deviceState.setCapSlice.mutate({deviceId:d,capName:m,slice:u})}}}function xe(n,a,e){const c=(r,p)=>`${r}:${p}`;return{read(r,p){return n.get(r)?.get(p)},async refresh(){},watch(r,p,l){const d=c(r,p);let m=a.get(d);return m||(m=new Set,a.set(d,m)),m.add(l),()=>{m.delete(l),m.size===0&&a.delete(d)}},async write(r,p,l){if(!e)throw new Error("createMirrorSource: write requires an api reference — pass it as the third argument when constructing the source");await e.deviceState.setCapSlice.mutate({deviceId:r,capName:p,slice:l})}}}function y(n,a,e){const c=ca(n)?n:J(n);return{get value(){return c.read(a,e)},refresh(){return c.refresh(a,e)},subscribe(r){const p=c.watch(a,e,l=>{try{r(l)}catch{}});try{r(c.read(a,e))}catch{}return c.read(a,e)===void 0&&c.refresh(a,e).catch(()=>{}),p},async set(r){await c.write(a,e,r)},async patch(r){const l={...c.read(a,e)??{},...r};await c.write(a,e,l)}}}function ca(n){return typeof n.read=="function"&&typeof n.watch=="function"}function _e(n,a,e){const c=n,r=e?.stateSource??J(n);function p(o,C){const w=typeof o=="object"&&o!==null?o:{};return C!==void 0?{...w,deviceId:a.deviceId,nodeId:C}:{...w,deviceId:a.deviceId}}function l(o,C,w,A,O){const F=c[o]?.[C];if(!F)throw new Error(`DeviceProxy: api has no '${o}.${C}'`);const q=F;return w==="mutation"?q.mutate(A):w==="subscription"?q.subscribe(A,O):q.query(A)}function d(o,C,w,A,O,F){const q=a.entries.find(Ve=>Ve.capName===o);return l(C,w,A,p(O,q?.providerNodeId),F)}function m(o,C,w,A,O){return l(o,C,w,p(A,void 0),O)}const u={getStatus:o=>d("accessories","accessories","getStatus","query",o)},g={resolveDeviceSettings:o=>d("audio-analysis","audioAnalysis","resolveDeviceSettings","query",o),getDeviceSettingsContribution:o=>d("audio-analysis","audioAnalysis","getDeviceSettingsContribution","query",o),getDeviceLiveContribution:o=>d("audio-analysis","audioAnalysis","getDeviceLiveContribution","query",o),applyDeviceSettingsPatch:o=>d("audio-analysis","audioAnalysis","applyDeviceSettingsPatch","mutation",o)},S={getCurrentSnapshot:o=>d("audio-metrics","audioMetrics","getCurrentSnapshot","query",o),getHistory:o=>d("audio-metrics","audioMetrics","getHistory","query",o)},h={getStatus:o=>d("battery","battery","getStatus","query",o)},v={setBrightness:o=>d("brightness","brightness","setBrightness","mutation",o),getStatus:o=>d("brightness","brightness","getStatus","query",o)},I={getCredentials:o=>d("camera-credentials","cameraCredentials","getCredentials","query",o),getStatus:o=>d("camera-credentials","cameraCredentials","getStatus","query",o)},N={getCameraStreams:o=>d("camera-streams","cameraStreams","getCameraStreams","query",o),getBrokerStreams:o=>d("camera-streams","cameraStreams","getBrokerStreams","query",o),getRtspEntries:o=>d("camera-streams","cameraStreams","getRtspEntries","query",o)},M={getDeviceSettingsContribution:o=>d("detection-pipeline","detectionPipeline","getDeviceSettingsContribution","query",o),getDeviceLiveContribution:o=>d("detection-pipeline","detectionPipeline","getDeviceLiveContribution","query",o),applyDeviceSettingsPatch:o=>d("detection-pipeline","detectionPipeline","applyDeviceSettingsPatch","mutation",o)},P={listDiscovered:o=>d("device-discovery","deviceDiscovery","listDiscovered","query",o),refreshDiscovery:o=>d("device-discovery","deviceDiscovery","refreshDiscovery","mutation",o),adoptDevice:o=>d("device-discovery","deviceDiscovery","adoptDevice","mutation",o),releaseDevice:o=>d("device-discovery","deviceDiscovery","releaseDevice","mutation",o),getStatus:o=>d("device-discovery","deviceDiscovery","getStatus","query",o)},X={getStreamSources:o=>d("device-ops","deviceOps","getStreamSources","query",o),getConfigEntries:o=>d("device-ops","deviceOps","getConfigEntries","query",o),setConfig:o=>d("device-ops","deviceOps","setConfig","mutation",o),removeDevice:o=>d("device-ops","deviceOps","removeDevice","mutation",o),getSettingsSchema:o=>d("device-ops","deviceOps","getSettingsSchema","query",o)},ee={getStatus:o=>d("device-status","deviceStatus","getStatus","query",o)},te={getStatus:o=>d("doorbell","doorbell","getStatus","query",o)},ae={getEvents:o=>d("events","events","getEvents","query",o),getEventThumbnail:o=>d("events","events","getEventThumbnail","query",o),getEventClipUrl:o=>d("events","events","getEventClipUrl","query",o)},se={getStatus:o=>d("feature-probe","featureProbe","getStatus","query",o)},ie={startSession:o=>d("intercom","intercom","startSession","mutation",o),handleAnswer:o=>d("intercom","intercom","handleAnswer","mutation",o),stopSession:o=>d("intercom","intercom","stopSession","mutation",o),startTalkSession:o=>d("intercom","intercom","startTalkSession","mutation",o),pushTalkPcm:o=>d("intercom","intercom","pushTalkPcm","mutation",o),endTalkSession:o=>d("intercom","intercom","endTalkSession","mutation",o),getStatus:o=>d("intercom","intercom","getStatus","query",o)},ne={isDetected:o=>d("motion","motion","isDetected","query",o),getStatus:o=>d("motion","motion","getStatus","query",o)},oe={analyze:o=>d("motion-detection","motionDetection","analyze","mutation",o),removeCamera:o=>d("motion-detection","motionDetection","removeCamera","mutation",o),reset:o=>d("motion-detection","motionDetection","reset","mutation",o),getDeviceSettingsContribution:o=>d("motion-detection","motionDetection","getDeviceSettingsContribution","query",o),getDeviceLiveContribution:o=>d("motion-detection","motionDetection","getDeviceLiveContribution","query",o),applyDeviceSettingsPatch:o=>d("motion-detection","motionDetection","applyDeviceSettingsPatch","mutation",o)},ce={setMotionTrigger:o=>d("motion-trigger","motionTrigger","setMotionTrigger","mutation",o),getStatus:o=>d("motion-trigger","motionTrigger","getStatus","query",o)},re={getOptions:o=>d("motion-zones","motionZones","getOptions","query",o),setZone:o=>d("motion-zones","motionZones","setZone","mutation",o),getStatus:o=>d("motion-zones","motionZones","getStatus","query",o)},de={getStatus:o=>d("native-object-detection","nativeObjectDetection","getStatus","query",o)},pe={setOverlay:o=>d("osd","osd","setOverlay","mutation",o),getStatus:o=>d("osd","osd","getStatus","query",o)},le={getActiveTracks:o=>d("pipeline-analytics","pipelineAnalytics","getActiveTracks","query",o),getTrack:o=>d("pipeline-analytics","pipelineAnalytics","getTrack","query",o),listTracks:o=>d("pipeline-analytics","pipelineAnalytics","listTracks","query",o),clearTracks:o=>d("pipeline-analytics","pipelineAnalytics","clearTracks","mutation",o),getMotionEvents:o=>d("pipeline-analytics","pipelineAnalytics","getMotionEvents","query",o),getObjectEvents:o=>d("pipeline-analytics","pipelineAnalytics","getObjectEvents","query",o),getAudioEvents:o=>d("pipeline-analytics","pipelineAnalytics","getAudioEvents","query",o),getEventMedia:o=>d("pipeline-analytics","pipelineAnalytics","getEventMedia","query",o),getTrackMedia:o=>d("pipeline-analytics","pipelineAnalytics","getTrackMedia","query",o),getDeviceSettingsContribution:o=>d("pipeline-analytics","pipelineAnalytics","getDeviceSettingsContribution","query",o),getDeviceLiveContribution:o=>d("pipeline-analytics","pipelineAnalytics","getDeviceLiveContribution","query",o),applyDeviceSettingsPatch:o=>d("pipeline-analytics","pipelineAnalytics","applyDeviceSettingsPatch","mutation",o)},me={move:o=>d("ptz","ptz","move","mutation",o),continuousMove:o=>d("ptz","ptz","continuousMove","mutation",o),stop:o=>d("ptz","ptz","stop","mutation",o),getPresets:o=>d("ptz","ptz","getPresets","query",o),goToPreset:o=>d("ptz","ptz","goToPreset","mutation",o),savePreset:o=>d("ptz","ptz","savePreset","mutation",o),deletePreset:o=>d("ptz","ptz","deletePreset","mutation",o),getOptions:o=>d("ptz","ptz","getOptions","query",o),goHome:o=>d("ptz","ptz","goHome","mutation",o),getPosition:o=>d("ptz","ptz","getPosition","query",o),setAutofocus:o=>d("ptz","ptz","setAutofocus","mutation",o),getStatus:o=>d("ptz","ptz","getStatus","query",o)},ue={getStatus:o=>d("ptz-autotrack","ptzAutotrack","getStatus","query",o),setEnabled:o=>d("ptz-autotrack","ptzAutotrack","setEnabled","mutation",o),getSettings:o=>d("ptz-autotrack","ptzAutotrack","getSettings","query",o),setSettings:o=>d("ptz-autotrack","ptzAutotrack","setSettings","mutation",o)},ge={reboot:o=>d("reboot","reboot","reboot","mutation",o)},Se={getSegments:o=>d("recording","recording","getSegments","query",o),getPlaybackUrl:o=>d("recording","recording","getPlaybackUrl","query",o),getThumbnailAt:o=>d("recording","recording","getThumbnailAt","query",o)},he={getSnapshot:o=>d("snapshot","snapshot","getSnapshot","query",o),invalidateCache:o=>d("snapshot","snapshot","invalidateCache","mutation",o),getStatus:o=>d("snapshot","snapshot","getStatus","query",o),getDeviceSettingsContribution:o=>d("snapshot","snapshot","getDeviceSettingsContribution","query",o),getDeviceLiveContribution:o=>d("snapshot","snapshot","getDeviceLiveContribution","query",o),applyDeviceSettingsPatch:o=>d("snapshot","snapshot","applyDeviceSettingsPatch","mutation",o)},ye={getOptions:o=>d("stream-params","streamParams","getOptions","query",o),setProfile:o=>d("stream-params","streamParams","setProfile","mutation",o),getConfigSchema:o=>d("stream-params","streamParams","getConfigSchema","query",o),getStatus:o=>d("stream-params","streamParams","getStatus","query",o)},t={setState:o=>d("switch","switch","setState","mutation",o),getStatus:o=>d("switch","switch","getStatus","query",o)},k={listStreams:o=>d("webrtc-session","webrtcSession","listStreams","query",o),createSession:o=>d("webrtc-session","webrtcSession","createSession","mutation",o),handleOffer:o=>d("webrtc-session","webrtcSession","handleOffer","mutation",o),handleAnswer:o=>d("webrtc-session","webrtcSession","handleAnswer","mutation",o),closeSession:o=>d("webrtc-session","webrtcSession","closeSession","mutation",o),hasAdaptiveBitrate:o=>d("webrtc-session","webrtcSession","hasAdaptiveBitrate","query",o)},z={getCurrentSnapshot:o=>d("zone-analytics","zoneAnalytics","getCurrentSnapshot","query",o),getZoneHistory:o=>d("zone-analytics","zoneAnalytics","getZoneHistory","query",o),getCameraHistory:o=>d("zone-analytics","zoneAnalytics","getCameraHistory","query",o),getUnzonedHistory:o=>d("zone-analytics","zoneAnalytics","getUnzonedHistory","query",o)},R={listRules:o=>d("zone-rules","zoneRules","listRules","query",o),setRules:o=>d("zone-rules","zoneRules","setRules","mutation",o)},K={listZones:o=>d("zones","zones","listZones","query",o),addZone:o=>d("zones","zones","addZone","mutation",o),removeZone:o=>d("zones","zones","removeZone","mutation",o),updateZone:o=>d("zones","zones","updateZone","mutation",o)},L={getDeviceSettings:o=>m("addonSettings","getDeviceSettings","query",o),updateDeviceSettings:o=>m("addonSettings","updateDeviceSettings","mutation",o)},T={getDeviceSettingsContribution:o=>m("deviceExport","getDeviceSettingsContribution","query",o),getDeviceLiveContribution:o=>m("deviceExport","getDeviceLiveContribution","query",o),applyDeviceSettingsPatch:o=>m("deviceExport","applyDeviceSettingsPatch","mutation",o)},Fe={loadConfig:o=>m("deviceManager","loadConfig","query",o),loadRuntimeState:o=>m("deviceManager","loadRuntimeState","query",o),loadMeta:o=>m("deviceManager","loadMeta","query",o),setName:o=>m("deviceManager","setName","mutation",o),setLocation:o=>m("deviceManager","setLocation","mutation",o),setMetadata:o=>m("deviceManager","setMetadata","mutation",o),setDisabled:o=>m("deviceManager","setDisabled","mutation",o),getDevice:o=>m("deviceManager","getDevice","query",o),getStreamSources:o=>m("deviceManager","getStreamSources","query",o),getConfigSchema:o=>m("deviceManager","getConfigSchema","query",o),getSettingsSchema:o=>m("deviceManager","getSettingsSchema","query",o),updateConfig:o=>m("deviceManager","updateConfig","mutation",o),enable:o=>m("deviceManager","enable","mutation",o),disable:o=>m("deviceManager","disable","mutation",o),remove:o=>m("deviceManager","remove","mutation",o),getStreamProfileMap:o=>m("deviceManager","getStreamProfileMap","query",o),setStreamProfileMap:o=>m("deviceManager","setStreamProfileMap","mutation",o),probeStreams:o=>m("deviceManager","probeStreams","mutation",o),getBindings:o=>m("deviceManager","getBindings","query",o),getAllBindings:o=>m("deviceManager","getAllBindings","query",o),setWrapperActive:o=>m("deviceManager","setWrapperActive","mutation",o),getDeviceSettingsAggregate:o=>m("deviceManager","getDeviceSettingsAggregate","query",o),getDeviceLiveInfoAggregate:o=>m("deviceManager","getDeviceLiveInfoAggregate","query",o),getDeviceAggregate:o=>m("deviceManager","getDeviceAggregate","query",o),updateDeviceField:o=>m("deviceManager","updateDeviceField","mutation",o),updateDeviceFieldsBatch:o=>m("deviceManager","updateDeviceFieldsBatch","mutation",o),testField:o=>m("deviceManager","testField","mutation",o),getDeviceStatusAggregate:o=>m("deviceManager","getDeviceStatusAggregate","query",o)},Ue={getSnapshot:o=>m("deviceState","getSnapshot","query",o),getCapSlice:o=>m("deviceState","getCapSlice","query",o),setCapSlice:o=>m("deviceState","setCapSlice","mutation",o)},$e={getDeviceStats:o=>m("networkQuality","getDeviceStats","query",o),reportClientStats:o=>m("networkQuality","reportClientStats","mutation",o)},We={runPipeline:o=>m("pipelineExecutor","runPipeline","mutation",o),runPipelineBatch:o=>m("pipelineExecutor","runPipelineBatch","mutation",o)},He={assignPipeline:o=>m("pipelineOrchestrator","assignPipeline","mutation",o),unassignPipeline:o=>m("pipelineOrchestrator","unassignPipeline","mutation",o),getPipelineAssignment:o=>m("pipelineOrchestrator","getPipelineAssignment","query",o),getCameraMetrics:o=>m("pipelineOrchestrator","getCameraMetrics","query",o),assignDecoder:o=>m("pipelineOrchestrator","assignDecoder","mutation",o),unassignDecoder:o=>m("pipelineOrchestrator","unassignDecoder","mutation",o),assignAudio:o=>m("pipelineOrchestrator","assignAudio","mutation",o),unassignAudio:o=>m("pipelineOrchestrator","unassignAudio","mutation",o),getAudioAssignment:o=>m("pipelineOrchestrator","getAudioAssignment","query",o),getAudioAssignments:o=>m("pipelineOrchestrator","getAudioAssignments","query",o),getDecoderAssignment:o=>m("pipelineOrchestrator","getDecoderAssignment","query",o),getCameraSettings:o=>m("pipelineOrchestrator","getCameraSettings","query",o),setCameraStepToggle:o=>m("pipelineOrchestrator","setCameraStepToggle","mutation",o),getCameraStepOverrides:o=>m("pipelineOrchestrator","getCameraStepOverrides","query",o),setCameraStepOverride:o=>m("pipelineOrchestrator","setCameraStepOverride","mutation",o),setCameraPipelineForAgent:o=>m("pipelineOrchestrator","setCameraPipelineForAgent","mutation",o),resolvePipeline:o=>m("pipelineOrchestrator","resolvePipeline","query",o),getDeviceSettingsContribution:o=>m("pipelineOrchestrator","getDeviceSettingsContribution","query",o),getDeviceLiveContribution:o=>m("pipelineOrchestrator","getDeviceLiveContribution","query",o),applyDeviceSettingsPatch:o=>m("pipelineOrchestrator","applyDeviceSettingsPatch","mutation",o)},Ke={detachCamera:o=>m("pipelineRunner","detachCamera","mutation",o),getCameraMetrics:o=>m("pipelineRunner","getCameraMetrics","query",o)},Ze={getPolicyStatus:o=>m("recordingEngine","getPolicyStatus","query",o)},Ge={supportsDevice:o=>m("snapshotProvider","supportsDevice","query",o),getSnapshot:o=>m("snapshotProvider","getSnapshot","query",o)},je={publishCameraStream:o=>m("streamBroker","publishCameraStream","mutation",o),retractCameraStream:o=>m("streamBroker","retractCameraStream","mutation",o),assignProfile:o=>m("streamBroker","assignProfile","mutation",o),unassignProfile:o=>m("streamBroker","unassignProfile","mutation",o),restartProfile:o=>m("streamBroker","restartProfile","mutation",o),getDeviceSettingsContribution:o=>m("streamBroker","getDeviceSettingsContribution","query",o),getDeviceLiveContribution:o=>m("streamBroker","getDeviceLiveContribution","query",o),applyDeviceSettingsPatch:o=>m("streamBroker","applyDeviceSettingsPatch","mutation",o)};return{deviceId:a.deviceId,binding:a,state:{audioMetrics:y(r,a.deviceId,"audio-metrics"),battery:y(r,a.deviceId,"battery"),brightness:y(r,a.deviceId,"brightness"),cameraStreams:y(r,a.deviceId,"camera-streams"),deviceDiscovery:y(r,a.deviceId,"device-discovery"),deviceStatus:y(r,a.deviceId,"device-status"),doorbell:y(r,a.deviceId,"doorbell"),featureProbe:y(r,a.deviceId,"feature-probe"),motion:y(r,a.deviceId,"motion"),motionTrigger:y(r,a.deviceId,"motion-trigger"),motionZones:y(r,a.deviceId,"motion-zones"),ptzAutotrack:y(r,a.deviceId,"ptz-autotrack"),streamParams:y(r,a.deviceId,"stream-params"),switch:y(r,a.deviceId,"switch"),zoneAnalytics:y(r,a.deviceId,"zone-analytics"),zoneRules:y(r,a.deviceId,"zone-rules"),zones:y(r,a.deviceId,"zones")},accessories:u,audioAnalysis:g,audioMetrics:S,battery:h,brightness:v,cameraCredentials:I,cameraStreams:N,detectionPipeline:M,deviceDiscovery:P,deviceOps:X,deviceStatus:ee,doorbell:te,events:ae,featureProbe:se,intercom:ie,motion:ne,motionDetection:oe,motionTrigger:ce,motionZones:re,nativeObjectDetection:de,osd:pe,pipelineAnalytics:le,ptz:me,ptzAutotrack:ue,reboot:ge,recording:Se,snapshot:he,streamParams:ye,switch:t,webrtcSession:k,zoneAnalytics:z,zoneRules:R,zones:K,addonSettings:L,deviceExport:T,deviceManager:Fe,deviceState:Ue,networkQuality:$e,pipelineExecutor:We,pipelineOrchestrator:He,pipelineRunner:Ke,recordingEngine:Ze,snapshotProvider:Ge,streamBroker:je}}function ra(n,a,e,c,r){if(e.length===0||a.length===0)return{passed:n,excluded:[]};const p=e.filter(h=>h.enabled!==!1),l=p.filter(h=>h.mode==="include"),d=p.filter(h=>h.mode==="exclude"),m=l.length>0,u=new Map(a.map(h=>[h.id,h])),g=[],S=[];for(const h of n){const v=c(h),I=r?.(h),N=l.some(P=>fe(P,v,I,u)),M=d.some(P=>fe(P,v,I,u));m?N&&!M?g.push(h):S.push(h):M?S.push(h):g.push(h)}return{passed:g,excluded:S}}function fe(n,a,e,c){if(n.classFilter&&n.classFilter.length>0&&e!==void 0&&!n.classFilter.includes(e))return!1;for(const r of n.zoneIds){const p=c.get(r);if(p&&da(a,p.polygon))return!0}return!1}function da(n,a){if(a.length<3)return!1;let e=!1;const{x:c,y:r}=n;for(let p=0,l=a.length-1;p<a.length;l=p++){const d=a[p],m=a[l];d.y>r!=m.y>r&&c<(m.x-d.x)*(r-d.y)/(m.y-d.y||Number.EPSILON)+d.x&&(e=!e)}return e}function pa(n){const a=n;function e(t,k,z,R,K){const L=a[t]?.[k];if(!L)throw new Error(`SystemProxy: api has no '${t}.${k}'`);const T=L;return z==="mutation"?T.mutate(R):z==="subscription"?T.subscribe(R,K):T.query(R)}return{addonPages:{listPages:t=>e("addonPages","listPages","query",t)},addons:{list:t=>e("addons","list","query",t),getLogs:t=>e("addons","getLogs","query",t),listPackages:t=>e("addons","listPackages","query",t),installPackage:t=>e("addons","installPackage","mutation",t),installFromWorkspace:t=>e("addons","installFromWorkspace","mutation",t),isWorkspaceAvailable:t=>e("addons","isWorkspaceAvailable","query",t),listWorkspacePackages:t=>e("addons","listWorkspacePackages","query",t),uninstallPackage:t=>e("addons","uninstallPackage","mutation",t),reloadPackages:t=>e("addons","reloadPackages","mutation",t),searchAvailable:t=>e("addons","searchAvailable","query",t),listUpdates:t=>e("addons","listUpdates","query",t),updatePackage:t=>e("addons","updatePackage","mutation",t),rollbackPackage:t=>e("addons","rollbackPackage","mutation",t),forceRefresh:t=>e("addons","forceRefresh","mutation",t),restartServer:t=>e("addons","restartServer","mutation",t),getLastRestart:t=>e("addons","getLastRestart","query",t),listFrameworkPackages:t=>e("addons","listFrameworkPackages","query",t),listCapabilityProviders:t=>e("addons","listCapabilityProviders","query",t),setCapabilityProviderEnabled:t=>e("addons","setCapabilityProviderEnabled","mutation",t),updateFrameworkPackage:t=>e("addons","updateFrameworkPackage","mutation",t),getVersions:t=>e("addons","getVersions","query",t),restartAddon:t=>e("addons","restartAddon","mutation",t),retryLoad:t=>e("addons","retryLoad","mutation",t),getAutoUpdateSettings:t=>e("addons","getAutoUpdateSettings","query",t),setAutoUpdateSettings:t=>e("addons","setAutoUpdateSettings","mutation",t),getAddonAutoUpdate:t=>e("addons","getAddonAutoUpdate","query",t),setAddonAutoUpdate:t=>e("addons","setAddonAutoUpdate","mutation",t),applyAutoUpdateToAll:t=>e("addons","applyAutoUpdateToAll","mutation",t),custom:t=>e("addons","custom","mutation",t),onAddonLogs:(t,k)=>e("addons","onAddonLogs","subscription",t,k)},addonSettings:{getGlobalSettings:t=>e("addonSettings","getGlobalSettings","query",t),updateGlobalSettings:t=>e("addonSettings","updateGlobalSettings","mutation",t)},addonWidgets:{listWidgets:t=>e("addonWidgets","listWidgets","query",t)},alerts:{emit:t=>e("alerts","emit","mutation",t),update:t=>e("alerts","update","mutation",t),list:t=>e("alerts","list","query",t),getUnreadCount:t=>e("alerts","getUnreadCount","query",t),markRead:t=>e("alerts","markRead","mutation",t),markAllRead:t=>e("alerts","markAllRead","mutation",t),dismiss:t=>e("alerts","dismiss","mutation",t)},audioAnalyzer:{analyseChunk:t=>e("audioAnalyzer","analyseChunk","mutation",t),classify:t=>e("audioAnalyzer","classify","query",t),isReady:t=>e("audioAnalyzer","isReady","query",t),dispose:t=>e("audioAnalyzer","dispose","mutation",t),reprobeAudioEngine:t=>e("audioAnalyzer","reprobeAudioEngine","mutation",t)},audioCodec:{listSupportedCodecs:t=>e("audioCodec","listSupportedCodecs","query",t),canHandle:t=>e("audioCodec","canHandle","query",t),createDecodeSession:t=>e("audioCodec","createDecodeSession","mutation",t),createEncodeSession:t=>e("audioCodec","createEncodeSession","mutation",t),closeSession:t=>e("audioCodec","closeSession","mutation",t),pushEncodedFrame:t=>e("audioCodec","pushEncodedFrame","mutation",t),pullPcm:t=>e("audioCodec","pullPcm","query",t),pushPcm:t=>e("audioCodec","pushPcm","mutation",t),pullEncoded:t=>e("audioCodec","pullEncoded","query",t),flushEncode:t=>e("audioCodec","flushEncode","mutation",t),listActiveSessions:t=>e("audioCodec","listActiveSessions","query",t)},backup:{listDestinations:t=>e("backup","listDestinations","query",t),trigger:t=>e("backup","trigger","mutation",t),list:t=>e("backup","list","query",t),listLocations:t=>e("backup","listLocations","query",t),getEntries:t=>e("backup","getEntries","query",t),restore:t=>e("backup","restore","mutation",t),delete:t=>e("backup","delete","mutation",t),listArchives:t=>e("backup","listArchives","query",t),upsertDestinationPolicy:t=>e("backup","upsertDestinationPolicy","mutation",t),previewSchedule:t=>e("backup","previewSchedule","query",t)},decoder:{supportsCodec:t=>e("decoder","supportsCodec","query",t),getInfo:t=>e("decoder","getInfo","query",t),createSession:t=>e("decoder","createSession","query",t),destroySession:t=>e("decoder","destroySession","query",t),pushPacket:t=>e("decoder","pushPacket","query",t),openStream:t=>e("decoder","openStream","query",t),pullFrames:t=>e("decoder","pullFrames","query",t),pullHandles:t=>e("decoder","pullHandles","query",t),getFrame:t=>e("decoder","getFrame","query",t),getShmStats:t=>e("decoder","getShmStats","query",t),updateConfig:t=>e("decoder","updateConfig","query",t),getStats:t=>e("decoder","getStats","query",t),listActiveSessions:t=>e("decoder","listActiveSessions","query",t),reprobeHwaccel:t=>e("decoder","reprobeHwaccel","mutation",t)},deviceExport:{getStatus:t=>e("deviceExport","getStatus","query",t),listSupportedDeviceKinds:t=>e("deviceExport","listSupportedDeviceKinds","query",t),listExposedDevices:t=>e("deviceExport","listExposedDevices","query",t),exposeDevice:t=>e("deviceExport","exposeDevice","mutation",t),unexposeDevice:t=>e("deviceExport","unexposeDevice","mutation",t)},deviceManager:{allocateDeviceId:t=>e("deviceManager","allocateDeviceId","mutation",t),registerDevice:t=>e("deviceManager","registerDevice","mutation",t),removeDevice:t=>e("deviceManager","removeDevice","mutation",t),persistConfig:t=>e("deviceManager","persistConfig","mutation",t),listLocations:t=>e("deviceManager","listLocations","query",t),addLocation:t=>e("deviceManager","addLocation","mutation",t),removeLocation:t=>e("deviceManager","removeLocation","mutation",t),listPersistedByAddon:t=>e("deviceManager","listPersistedByAddon","query",t),listAll:t=>e("deviceManager","listAll","query",t),getChildren:t=>e("deviceManager","getChildren","query",t),listWrappersForCap:t=>e("deviceManager","listWrappersForCap","query",t),listBindableCapsForDeviceType:t=>e("deviceManager","listBindableCapsForDeviceType","query",t),discoverDevices:t=>e("deviceManager","discoverDevices","mutation",t),adoptDevice:t=>e("deviceManager","adoptDevice","mutation",t),getCreationSchema:t=>e("deviceManager","getCreationSchema","query",t),createDevice:t=>e("deviceManager","createDevice","mutation",t),testCreationField:t=>e("deviceManager","testCreationField","mutation",t)},deviceProvider:{start:t=>e("deviceProvider","start","mutation",t),stop:t=>e("deviceProvider","stop","mutation",t),getStatus:t=>e("deviceProvider","getStatus","query",t),getDevices:t=>e("deviceProvider","getDevices","query",t),supportsDiscovery:t=>e("deviceProvider","supportsDiscovery","query",t),discoverDevices:t=>e("deviceProvider","discoverDevices","mutation",t),adoptDiscoveredDevice:t=>e("deviceProvider","adoptDiscoveredDevice","mutation",t),supportsManualCreation:t=>e("deviceProvider","supportsManualCreation","query",t),getChildCreationSchema:t=>e("deviceProvider","getChildCreationSchema","query",t),createDevice:t=>e("deviceProvider","createDevice","mutation",t),testCreationField:t=>e("deviceProvider","testCreationField","mutation",t)},deviceState:{getAllSnapshots:t=>e("deviceState","getAllSnapshots","query",t)},integrations:{list:t=>e("integrations","list","query",t),get:t=>e("integrations","get","query",t),getByAddonId:t=>e("integrations","getByAddonId","query",t),create:t=>e("integrations","create","mutation",t),update:t=>e("integrations","update","mutation",t),delete:t=>e("integrations","delete","mutation",t),getSettings:t=>e("integrations","getSettings","query",t),setSettings:t=>e("integrations","setSettings","mutation",t),getAvailableTypes:t=>e("integrations","getAvailableTypes","query",t),testConnection:t=>e("integrations","testConnection","mutation",t)},localNetwork:{list:t=>e("localNetwork","list","query",t),getPreferred:t=>e("localNetwork","getPreferred","query",t),getConnectionEndpoints:t=>e("localNetwork","getConnectionEndpoints","query",t),getAllowedAddresses:t=>e("localNetwork","getAllowedAddresses","query",t),setAllowedAddresses:t=>e("localNetwork","setAllowedAddresses","mutation",t),resetAllowlistToBestMatch:t=>e("localNetwork","resetAllowlistToBestMatch","mutation",t)},meshNetwork:{getStatus:t=>e("meshNetwork","getStatus","query",t),join:t=>e("meshNetwork","join","mutation",t),startLogin:t=>e("meshNetwork","startLogin","mutation",t),leave:t=>e("meshNetwork","leave","mutation",t),logout:t=>e("meshNetwork","logout","mutation",t),listPeers:t=>e("meshNetwork","listPeers","query",t),testConnection:t=>e("meshNetwork","testConnection","mutation",t)},metricsProvider:{collectSnapshot:t=>e("metricsProvider","collectSnapshot","query",t),getCached:t=>e("metricsProvider","getCached","query",t),getCurrent:t=>e("metricsProvider","getCurrent","query",t),getDiskSpace:t=>e("metricsProvider","getDiskSpace","query",t),getGpuInfo:t=>e("metricsProvider","getGpuInfo","query",t),getCpuTemperature:t=>e("metricsProvider","getCpuTemperature","query",t),getProcessStats:t=>e("metricsProvider","getProcessStats","query",t),listAddonInstances:t=>e("metricsProvider","listAddonInstances","query",t),getAddonStats:t=>e("metricsProvider","getAddonStats","query",t),listNodeProcesses:t=>e("metricsProvider","listNodeProcesses","query",t),killProcess:t=>e("metricsProvider","killProcess","mutation",t)},mqttBroker:{listBrokers:t=>e("mqttBroker","listBrokers","query",t),getBrokerConfig:t=>e("mqttBroker","getBrokerConfig","query",t),addBroker:t=>e("mqttBroker","addBroker","mutation",t),removeBroker:t=>e("mqttBroker","removeBroker","mutation",t),testConnection:t=>e("mqttBroker","testConnection","mutation",t),startEmbeddedBroker:t=>e("mqttBroker","startEmbeddedBroker","mutation",t),stopEmbeddedBroker:t=>e("mqttBroker","stopEmbeddedBroker","mutation",t),getStatus:t=>e("mqttBroker","getStatus","query",t)},networkAccess:{start:t=>e("networkAccess","start","mutation",t),stop:t=>e("networkAccess","stop","mutation",t),getEndpoint:t=>e("networkAccess","getEndpoint","query",t),getStatus:t=>e("networkAccess","getStatus","query",t),listEndpoints:t=>e("networkAccess","listEndpoints","query",t)},networkQuality:{getAllStats:t=>e("networkQuality","getAllStats","query",t)},nodes:{topology:t=>e("nodes","topology","query",t),deployAddon:t=>e("nodes","deployAddon","mutation",t),undeployAddon:t=>e("nodes","undeployAddon","mutation",t),restartAddon:t=>e("nodes","restartAddon","mutation",t),restartProcess:t=>e("nodes","restartProcess","mutation",t),restartNode:t=>e("nodes","restartNode","mutation",t),shutdownNode:t=>e("nodes","shutdownNode","mutation",t),renameNode:t=>e("nodes","renameNode","mutation",t),clusterAddonStatus:t=>e("nodes","clusterAddonStatus","query",t),getCapUsageGraph:t=>e("nodes","getCapUsageGraph","query",t),getNodeAddons:t=>e("nodes","getNodeAddons","query",t),setProcessLogLevel:t=>e("nodes","setProcessLogLevel","mutation",t),executeQuery:t=>e("nodes","executeQuery","mutation",t)},notificationOutput:{send:t=>e("notificationOutput","send","mutation",t),sendTest:t=>e("notificationOutput","sendTest","mutation",t)},pipelineExecutor:{getAvailableEngines:t=>e("pipelineExecutor","getAvailableEngines","query",t),getSelectedEngine:t=>e("pipelineExecutor","getSelectedEngine","query",t),getDefaultSteps:t=>e("pipelineExecutor","getDefaultSteps","query",t),reprobeEngine:t=>e("pipelineExecutor","reprobeEngine","mutation",t),getVideoPipelineSteps:t=>e("pipelineExecutor","getVideoPipelineSteps","query",t),setVideoPipelineSteps:t=>e("pipelineExecutor","setVideoPipelineSteps","mutation",t),getSchema:t=>e("pipelineExecutor","getSchema","query",t),getGlobalSteps:t=>e("pipelineExecutor","getGlobalSteps","query",t),getGlobalPipelineConfig:t=>e("pipelineExecutor","getGlobalPipelineConfig","query",t),getOrchestratorConfigSchema:t=>e("pipelineExecutor","getOrchestratorConfigSchema","query",t),listTemplates:t=>e("pipelineExecutor","listTemplates","query",t),saveTemplate:t=>e("pipelineExecutor","saveTemplate","mutation",t),updateTemplate:t=>e("pipelineExecutor","updateTemplate","mutation",t),deleteTemplate:t=>e("pipelineExecutor","deleteTemplate","mutation",t),getCapabilities:t=>e("pipelineExecutor","getCapabilities","query",t),getAddonModels:t=>e("pipelineExecutor","getAddonModels","query",t),downloadModel:t=>e("pipelineExecutor","downloadModel","mutation",t),deleteModel:t=>e("pipelineExecutor","deleteModel","mutation",t),detect:t=>e("pipelineExecutor","detect","query",t),cacheFrameInPool:t=>e("pipelineExecutor","cacheFrameInPool","mutation",t),inferCached:t=>e("pipelineExecutor","inferCached","mutation",t),uncacheFrame:t=>e("pipelineExecutor","uncacheFrame","mutation",t),getEffectiveTuning:t=>e("pipelineExecutor","getEffectiveTuning","query",t),listLoadedEngines:t=>e("pipelineExecutor","listLoadedEngines","query",t),spinEngine:t=>e("pipelineExecutor","spinEngine","mutation",t),killEngine:t=>e("pipelineExecutor","killEngine","mutation",t),listReferenceImages:t=>e("pipelineExecutor","listReferenceImages","query",t),getReferenceImage:t=>e("pipelineExecutor","getReferenceImage","query",t),getReferenceAudioFiles:t=>e("pipelineExecutor","getReferenceAudioFiles","query",t),getReferenceAudio:t=>e("pipelineExecutor","getReferenceAudio","query",t),getAudioCapabilities:t=>e("pipelineExecutor","getAudioCapabilities","query",t),runAudioTest:t=>e("pipelineExecutor","runAudioTest","mutation",t),getDetectionConfigSchema:t=>e("pipelineExecutor","getDetectionConfigSchema","query",t)},pipelineOrchestrator:{rebalance:t=>e("pipelineOrchestrator","rebalance","mutation",t),getPipelineAssignments:t=>e("pipelineOrchestrator","getPipelineAssignments","query",t),getAgentLoad:t=>e("pipelineOrchestrator","getAgentLoad","query",t),getGlobalMetrics:t=>e("pipelineOrchestrator","getGlobalMetrics","query",t),getCapabilityBindings:t=>e("pipelineOrchestrator","getCapabilityBindings","query",t),setCapabilityBinding:t=>e("pipelineOrchestrator","setCapabilityBinding","mutation",t),getDecoderAssignments:t=>e("pipelineOrchestrator","getDecoderAssignments","query",t),getAudioNodeLoad:t=>e("pipelineOrchestrator","getAudioNodeLoad","query",t),getAgentSettings:t=>e("pipelineOrchestrator","getAgentSettings","query",t),listAgentSettings:t=>e("pipelineOrchestrator","listAgentSettings","query",t),setAgentAddonDefaults:t=>e("pipelineOrchestrator","setAgentAddonDefaults","mutation",t),removeAgentSettings:t=>e("pipelineOrchestrator","removeAgentSettings","mutation",t),listTemplates:t=>e("pipelineOrchestrator","listTemplates","query",t),saveTemplate:t=>e("pipelineOrchestrator","saveTemplate","mutation",t),updateTemplate:t=>e("pipelineOrchestrator","updateTemplate","mutation",t),deleteTemplate:t=>e("pipelineOrchestrator","deleteTemplate","mutation",t)},pipelineRunner:{attachCamera:t=>e("pipelineRunner","attachCamera","mutation",t),reportMotion:t=>e("pipelineRunner","reportMotion","mutation",t),getLocalLoad:t=>e("pipelineRunner","getLocalLoad","query",t),getLocalMetrics:t=>e("pipelineRunner","getLocalMetrics","query",t),getAllCameraMetrics:t=>e("pipelineRunner","getAllCameraMetrics","query",t),getLocalCameras:t=>e("pipelineRunner","getLocalCameras","query",t)},platformProbe:{getCapabilities:t=>e("platformProbe","getCapabilities","query",t),getHardware:t=>e("platformProbe","getHardware","query",t),resolveInferenceConfig:t=>e("platformProbe","resolveInferenceConfig","query",t),resolveHwAccel:t=>e("platformProbe","resolveHwAccel","query",t),getHardwareEncoders:t=>e("platformProbe","getHardwareEncoders","query",t),refreshHardwareEncoders:t=>e("platformProbe","refreshHardwareEncoders","mutation",t)},recordingEngine:{getStatus:t=>e("recordingEngine","getStatus","query",t),enable:t=>e("recordingEngine","enable","mutation",t),disable:t=>e("recordingEngine","disable","mutation",t),getConfig:t=>e("recordingEngine","getConfig","query",t),updateConfig:t=>e("recordingEngine","updateConfig","mutation",t),getPlaylist:t=>e("recordingEngine","getPlaylist","query",t),getThumbnail:t=>e("recordingEngine","getThumbnail","query",t),getSegments:t=>e("recordingEngine","getSegments","query",t),getAvailability:t=>e("recordingEngine","getAvailability","query",t),estimateStorage:t=>e("recordingEngine","estimateStorage","query",t),estimateGlobalStorage:t=>e("recordingEngine","estimateGlobalStorage","query",t),getStorageUsage:t=>e("recordingEngine","getStorageUsage","query",t),setPolicy:t=>e("recordingEngine","setPolicy","mutation",t),getPolicy:t=>e("recordingEngine","getPolicy","query",t),getRetentionConfig:t=>e("recordingEngine","getRetentionConfig","query",t),updateRetentionConfig:t=>e("recordingEngine","updateRetentionConfig","mutation",t),getMotionStats:t=>e("recordingEngine","getMotionStats","query",t)},settingsStore:{get:t=>e("settingsStore","get","query",t),set:t=>e("settingsStore","set","mutation",t),query:t=>e("settingsStore","query","query",t),insert:t=>e("settingsStore","insert","mutation",t),update:t=>e("settingsStore","update","mutation",t),delete:t=>e("settingsStore","delete","mutation",t),count:t=>e("settingsStore","count","query",t),isEmpty:t=>e("settingsStore","isEmpty","query",t),declareCollection:t=>e("settingsStore","declareCollection","mutation",t)},storage:{resolve:t=>e("storage","resolve","query",t),write:t=>e("storage","write","mutation",t),read:t=>e("storage","read","query",t),exists:t=>e("storage","exists","query",t),list:t=>e("storage","list","query",t),delete:t=>e("storage","delete","mutation",t),getAvailableSpace:t=>e("storage","getAvailableSpace","query",t),beginUpload:t=>e("storage","beginUpload","mutation",t),writeChunk:t=>e("storage","writeChunk","mutation",t),finalizeUpload:t=>e("storage","finalizeUpload","mutation",t),abortUpload:t=>e("storage","abortUpload","mutation",t),beginDownload:t=>e("storage","beginDownload","mutation",t),readChunk:t=>e("storage","readChunk","query",t),endDownload:t=>e("storage","endDownload","mutation",t),listLocations:t=>e("storage","listLocations","query",t),getDefaultLocation:t=>e("storage","getDefaultLocation","query",t),upsertLocation:t=>e("storage","upsertLocation","mutation",t),deleteLocation:t=>e("storage","deleteLocation","mutation",t),testLocation:t=>e("storage","testLocation","query",t),listProviders:t=>e("storage","listProviders","query",t),testConfig:t=>e("storage","testConfig","query",t)},streamBroker:{listAllCameraStreams:t=>e("streamBroker","listAllCameraStreams","query",t),listAllProfileSlots:t=>e("streamBroker","listAllProfileSlots","query",t),getBrokerStats:t=>e("streamBroker","getBrokerStats","query",t),listClients:t=>e("streamBroker","listClients","query",t),killClient:t=>e("streamBroker","killClient","mutation",t),getStreamUrl:t=>e("streamBroker","getStreamUrl","query",t),getStreamWithCodec:t=>e("streamBroker","getStreamWithCodec","mutation",t),releaseStreamWithCodec:t=>e("streamBroker","releaseStreamWithCodec","mutation",t),subscribeAudioChunks:t=>e("streamBroker","subscribeAudioChunks","mutation",t),pullAudioChunks:t=>e("streamBroker","pullAudioChunks","query",t),unsubscribeAudioChunks:t=>e("streamBroker","unsubscribeAudioChunks","mutation",t),subscribeFrames:t=>e("streamBroker","subscribeFrames","mutation",t),pullFrameHandles:t=>e("streamBroker","pullFrameHandles","query",t),unsubscribeFrames:t=>e("streamBroker","unsubscribeFrames","mutation",t),setPreBufferDuration:t=>e("streamBroker","setPreBufferDuration","mutation",t),getPreBufferInfo:t=>e("streamBroker","getPreBufferInfo","query",t),getRtspPort:t=>e("streamBroker","getRtspPort","query",t),getAllRtspEntries:t=>e("streamBroker","getAllRtspEntries","query",t),getRtspEntry:t=>e("streamBroker","getRtspEntry","query",t),regenerateRtspToken:t=>e("streamBroker","regenerateRtspToken","mutation",t),setRtspEnabled:t=>e("streamBroker","setRtspEnabled","mutation",t),isRtspEnabled:t=>e("streamBroker","isRtspEnabled","query",t)},system:{info:t=>e("system","info","query",t),health:t=>e("system","health","query",t),featureFlags:t=>e("system","featureFlags","query",t),networkAddresses:t=>e("system","networkAddresses","query",t),getRetentionConfig:t=>e("system","getRetentionConfig","query",t),setRetentionConfig:t=>e("system","setRetentionConfig","mutation",t),forceRetentionCleanup:t=>e("system","forceRetentionCleanup","mutation",t)},toast:{onToast:(t,k)=>e("toast","onToast","subscription",t,k)},turnProvider:{getTurnServers:t=>e("turnProvider","getTurnServers","query",t)},userManagement:{listUsers:t=>e("userManagement","listUsers","query",t),createUser:t=>e("userManagement","createUser","mutation",t),updateUser:t=>e("userManagement","updateUser","mutation",t),deleteUser:t=>e("userManagement","deleteUser","mutation",t),resetPassword:t=>e("userManagement","resetPassword","mutation",t),setUserScopes:t=>e("userManagement","setUserScopes","mutation",t),validateCredentials:t=>e("userManagement","validateCredentials","mutation",t),listApiKeys:t=>e("userManagement","listApiKeys","query",t),createApiKey:t=>e("userManagement","createApiKey","mutation",t),revokeApiKey:t=>e("userManagement","revokeApiKey","mutation",t),validateApiKey:t=>e("userManagement","validateApiKey","mutation",t),createScopedToken:t=>e("userManagement","createScopedToken","mutation",t),revokeScopedToken:t=>e("userManagement","revokeScopedToken","mutation",t),validateScopedToken:t=>e("userManagement","validateScopedToken","query",t),listScopedTokens:t=>e("userManagement","listScopedTokens","query",t),setupTotp:t=>e("userManagement","setupTotp","mutation",t),confirmTotp:t=>e("userManagement","confirmTotp","mutation",t),disableTotp:t=>e("userManagement","disableTotp","mutation",t),getTotpStatus:t=>e("userManagement","getTotpStatus","query",t),verifyTotp:t=>e("userManagement","verifyTotp","mutation",t),oauthIssueCode:t=>e("userManagement","oauthIssueCode","mutation",t),oauthExchangeCode:t=>e("userManagement","oauthExchangeCode","mutation",t),oauthRefresh:t=>e("userManagement","oauthRefresh","mutation",t),oauthVerifyAccessToken:t=>e("userManagement","oauthVerifyAccessToken","query",t),listOauthSessions:t=>e("userManagement","listOauthSessions","query",t),revokeOauthSession:t=>e("userManagement","revokeOauthSession","mutation",t)}}}const la="device.state-changed",ma="capability.binding-changed",ua="device.registered",ga="device.unregistered",Sa="device.updated";class ha{constructor(a){this.api=a,this.stateSource=xe(this.stateMirror,this.handleListeners,this.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;async init(a=15e3){if(!this.initialized){if(this.initPromise)return this.initPromise;this.initPromise=(async()=>{const e=(l,d)=>Number.isFinite(a)?new Promise((m,u)=>{const g=setTimeout(()=>u(new Error(`SystemMirror.init: '${d}' timed out after ${a}ms`)),a);l.then(S=>{clearTimeout(g),m(S)},S=>{clearTimeout(g),u(S)})}):l,[c,r,p]=await Promise.all([e(this.api.deviceManager.getAllBindings.query({}),"deviceManager.getAllBindings"),e(this.api.deviceState.getAllSnapshots.query({}),"deviceState.getAllSnapshots"),e(this.api.deviceManager.listAll.query({}),"deviceManager.listAll")]);for(const l of c)this.bindings.set(l.deviceId,l);for(const[l,d]of Object.entries(r)){const m=Number(l);if(!Number.isFinite(m))continue;const u=new Map;for(const[g,S]of Object.entries(d))u.set(g,S);this.stateMirror.set(m,u)}for(const l of p)this.devices.set(l.id,l);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(const a of this.bridges)try{a.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(a){const e=this.bindings.get(a);return e?_e(this.api,e,{stateSource:this.stateSource}):null}getDeviceByName(a){for(const e of this.devices.values())if(e.name===a)return this.getDeviceById(e.id);return null}getDeviceByStableId(a){for(const e of this.devices.values())if(e.stableId===a)return this.getDeviceById(e.id);return null}getDevicesByAddon(a){return this.query({addonId:a})}getDevicesByType(a){return this.query({type:a})}getDeviceInfo(a){return this.devices.get(a)??null}getAllDevices(){const a=[];for(const e of this.bindings.keys()){const c=this.getDeviceById(e);c&&a.push(c)}return a}filterByCap(a){return this.query({caps:a})}query(a={}){const e=[];for(const[c,r]of this.bindings){const p=this.devices.get(c);if(a.id!==void 0&&!U(c,a.id)||a.stableId!==void 0&&(!p||!U(p.stableId,a.stableId))||a.addonId!==void 0&&(!p||!U(p.addonId,a.addonId))||a.type!==void 0&&(!p||!U(p.type,a.type)))continue;if(a.caps!==void 0){const d=j(a.caps),m=new Set(r.entries.map(u=>u.capName));if(!d.every(u=>m.has(u)))continue}if(a.anyCap!==void 0){const d=j(a.anyCap),m=new Set(r.entries.map(u=>u.capName));if(!d.some(u=>m.has(u)))continue}if(a.name!==void 0&&(!p||!ya(p.name,a.name))||a.online!==void 0&&(!p||p.online!==a.online))continue;if(a.parentDeviceId!==void 0){if(!p)continue;const d=a.parentDeviceId;if((p.parentDeviceId??null)!==d)continue}if(a.feature!==void 0&&(!p||!j(a.feature).every(m=>p.features.includes(m)))||a.isCamera!==void 0&&(!p||p.isCamera!==a.isCamera))continue;const l=this.getDeviceById(c);if(l){if(a.where&&p){if(!a.where(p,l))continue}else if(a.where&&!p)continue;e.push(l)}}return e}whereState(a,e){const c=[];for(const[r,p]of this.stateMirror){const l=p.get(a);if(!l||!e(l,r))continue;const d=this.getDeviceById(r);d&&c.push(d)}return c}mapState(a,e){const c=[];for(const[r,p]of this.stateMirror){const l=p.get(a);l&&c.push(e(l,r))}return c}findState(a,e){for(const[c,r]of this.stateMirror){const p=r.get(a);if(p&&e(p,c))return this.getDeviceById(c)}return null}countByCap(a){let e=0;for(const c of this.bindings.values())c.entries.some(r=>r.capName===a)&&e++;return e}countByState(a,e){let c=0;for(const[r,p]of this.stateMirror){const l=p.get(a);l&&e(l,r)&&c++}return c}listen(a){return this.globalStateListeners.add(a),()=>{this.globalStateListeners.delete(a)}}listenCap(a,e){let c=this.capListeners.get(a);return c||(c=new Set,this.capListeners.set(a,c)),c.add(e),()=>{c.delete(e),c.size===0&&this.capListeners.delete(a)}}listenDevice(a,e){let c=this.deviceListeners.get(a);return c||(c=new Set,this.deviceListeners.set(a,c)),c.add(e),()=>{c.delete(e),c.size===0&&this.deviceListeners.delete(a)}}onDeviceAdded(a){return this.addedListeners.add(a),()=>{this.addedListeners.delete(a)}}onDeviceRemoved(a){return this.removedListeners.add(a),()=>{this.removedListeners.delete(a)}}waitForState(a,e,c,r=3e4){return new Promise((p,l)=>{const m=(()=>{const S=this.stateMirror.get(a)?.get(e);return S&&c(S)?S:null})();if(m){p(m);return}let u=null;const g=this.listenDevice(a,(S,h,v)=>{h===e&&v&&c(v)&&(u&&clearTimeout(u),g(),p(v))});Number.isFinite(r)&&(u=setTimeout(()=>{g(),l(new Error(`waitForState timed out after ${r}ms (deviceId=${a}, capName=${e})`))},r))})}waitForDevice(a,e=3e4){return new Promise((c,r)=>{const p=this.getDeviceById(a);if(p){c(p);return}let l=null;const d=this.onDeviceAdded(m=>{if(m!==a)return;const u=this.getDeviceById(m);u&&(l&&clearTimeout(l),d(),c(u))});Number.isFinite(e)&&(l=setTimeout(()=>{d(),r(new Error(`waitForDevice timed out after ${e}ms (deviceId=${a})`))},e))})}async forEachCap(a,e){for(const c of this.filterByCap(a))await e(c)}async invokeCap(a,e,c,r={}){const p=this.filterByCap(a),l=Math.max(1,r.parallelism??p.length),d=[];for(let m=0;m<p.length;m+=l){const u=p.slice(m,m+l),g=await Promise.allSettled(u.map(async S=>{const h=S[a];if(!h||typeof h[e]!="function")throw new Error(`device '${S.deviceId}' does not expose '${a}.${e}'`);return await h[e](c)}));for(let S=0;S<g.length;S++){const h=u[S],v=g[S];v.status==="fulfilled"?d.push({deviceId:h.deviceId,ok:!0,result:v.value}):d.push({deviceId:h.deviceId,ok:!1,error:v.reason})}}return d}summary(){const a={},e={},c={};let r=0,p=0;for(const l of this.bindings.values())for(const d of l.entries)a[d.capName]=(a[d.capName]??0)+1;for(const l of this.devices.values())e[l.addonId]=(e[l.addonId]??0)+1,c[l.type]=(c[l.type]??0)+1,l.online?r++:p++;return{totalDevices:this.bindings.size,online:r,offline:p,byCap:a,byAddon:e,byType:c,statedDevices:this.stateMirror.size}}dump(a){const e=r=>{const p=this.devices.get(r)??null,l=this.bindings.get(r)??null,d={},m=this.stateMirror.get(r);if(m)for(const[u,g]of m)d[u]={...g};return{deviceId:r,info:p,binding:l?{...l,entries:l.entries.map(u=>({...u}))}:null,state:d}};if(a!==void 0)return e(a);const c=[];for(const r of this.bindings.keys())c.push(e(r));return c}getRawMirror(){return this.stateMirror}getSystemState(){const a=new Map;for(const[e,c]of this.stateMirror){const r=new Map;for(const[p,l]of c)r.set(p,{...l});a.set(e,r)}return a}subscribeBus(){if(!this.api.live?.onEvent)return;const a=this.api.live.onEvent;this.bridges.push(a.subscribe({category:la},{onData:e=>{const c=e.data;!c||typeof c.deviceId!="number"||typeof c.capName!="string"||this.applyStateUpdate(c.deviceId,c.capName,c.slice)}})),this.bridges.push(a.subscribe({category:ma},{onData:e=>{const c=e.data,r=typeof c?.deviceId=="number"?c.deviceId:c?.source?.type==="device"&&typeof c.source.id=="number"?c.source.id:null;r!==null&&this.refreshBinding(r)}})),this.bridges.push(a.subscribe({category:ua},{onData:e=>{const c=e.data;typeof c?.deviceId=="number"&&this.refreshDeviceMetadata(c.deviceId,"added")}})),this.bridges.push(a.subscribe({category:ga},{onData:e=>{const c=e.data;typeof c?.deviceId=="number"&&this.applyDeviceRemoval(c.deviceId)}})),this.bridges.push(a.subscribe({category:Sa},{onData:e=>{const c=e.data;typeof c?.deviceId=="number"&&this.refreshDeviceMetadata(c.deviceId,"updated")}}))}applyStateUpdate(a,e,c){let r=this.stateMirror.get(a);r||(r=new Map,this.stateMirror.set(a,r)),c===void 0?r.delete(e):r.set(e,c);const p=`${a}:${e}`,l=this.handleListeners.get(p);if(l)for(const u of l)try{u(c)}catch{}for(const u of this.globalStateListeners)try{u(a,e,c)}catch{}const d=this.capListeners.get(e);if(d)for(const u of d)try{u(a,c)}catch{}const m=this.deviceListeners.get(a);if(m)for(const u of m)try{u(a,e,c)}catch{}}applyDeviceRemoval(a){const e=this.devices.get(a)??null;this.bindings.delete(a),this.devices.delete(a),this.stateMirror.delete(a);for(const c of this.removedListeners)try{c(a,e)}catch{}}async refreshBinding(a){try{const c=(await this.api.deviceManager.getAllBindings.query({})).find(r=>r.deviceId===a);c?this.bindings.set(a,c):this.applyDeviceRemoval(a)}catch{}}async refreshDeviceMetadata(a,e){try{const r=(await this.api.deviceManager.listAll.query({})).find(l=>l.id===a);if(!r)return;const p=!this.devices.has(a);if(this.devices.set(a,r),e==="added"&&p){await this.refreshBinding(a);for(const l of this.addedListeners)try{l(a,r)}catch{}}}catch{}}}function U(n,a){return Array.isArray(a)?a.includes(n):n===a}function j(n){return Array.isArray(n)?n:[n]}function ya(n,a){return typeof a=="string"?n===a:a instanceof RegExp?a.test(n):"exact"in a?n===a.exact:"contains"in a?n.toLowerCase().includes(a.contains.toLowerCase()):!1}function va(n){return n}function fa(n,a,e){return{input:n,output:a,kind:e?.kind??"query",auth:e?.auth??"protected",scope:e?.scope??{kind:"system"}}}const ze=[{profile:"main",prefix:"streamMain",label:"Main stream"},{profile:"sub",prefix:"streamSub",label:"Sub stream"},{profile:"ext",prefix:"streamExt",label:"Third stream"}];function ba(n,a,e){const c=[];if(a.resolutions.length>0){const r=a.resolutions.map(l=>({value:`${String(l.width)}x${String(l.height)}`,label:`${String(l.width)}×${String(l.height)}`})),p=e?`${String(e.width)}x${String(e.height)}`:void 0;p&&!r.some(l=>l.value===p)&&r.unshift({value:p,label:`${p.replace("x","×")} (current)`}),c.push({type:"select",key:`${n.prefix}_resolution`,label:"Resolution",options:r,default:p??r[0]?.value??""})}if(a.codecs.length>0&&c.push({type:"select",key:`${n.prefix}_codec`,label:"Codec",options:a.codecs.map(r=>({value:r,label:r==="h264"?"H.264":"H.265"})),default:e?.codec??a.codecs[0]}),a.framerates.length>0){const r=a.framerates.map(l=>({value:String(l),label:`${String(l)} fps`})),p=e?.framerate;p!==void 0&&!a.framerates.includes(p)&&r.unshift({value:String(p),label:`${String(p)} fps (current)`}),c.push({type:"select",key:`${n.prefix}_framerate`,label:"Frame rate",options:r,default:p!==void 0?String(p):r[0]?.value??""})}if(a.bitrates.length>0){const r=a.bitrates.map(l=>({value:String(l),label:`${String(l)} kbps`})),p=e?.bitrate;p!==void 0&&!a.bitrates.includes(p)&&r.unshift({value:String(p),label:`${String(p)} kbps (current)`}),c.push({type:"select",key:`${n.prefix}_bitrate`,label:"Bitrate",options:r,default:p!==void 0?String(p):r[0]?.value??""})}else{const r=a.bitrateRange;c.push({type:"number",key:`${n.prefix}_bitrate`,label:"Bitrate",unit:"kbps",...r?{min:r[0],max:r[1]}:{},default:e?.bitrate??r?.[0]??0})}if(a.supportsBitrateMode&&c.push({type:"select",key:`${n.prefix}_bitrateMode`,label:"Bitrate mode",options:[{value:"vbr",label:"VBR (variable)"},{value:"cbr",label:"CBR (constant)"}],default:e?.bitrateMode??"vbr"}),a.supportsEncoderProfile&&c.push({type:"select",key:`${n.prefix}_encoderProfile`,label:"Encoder profile",options:[{value:"baseline",label:"Baseline"},{value:"main",label:"Main"},{value:"high",label:"High"}],default:e?.encoderProfile??"main"}),a.supportsGop){const r=a.gop;if(r){const p=[];for(let d=r.min;d<=r.max;d+=r.step)p.push({value:String(d),label:`${String(d)} s`});const l=e?.gop;l!==void 0&&!p.some(d=>d.value===String(l))&&p.unshift({value:String(l),label:`${String(l)} s (current)`}),c.push({type:"select",key:`${n.prefix}_gop`,label:"I-frame interval (GOP)",options:p,default:l!==void 0?String(l):p[0]?.value??""})}else c.push({type:"number",key:`${n.prefix}_gop`,label:"I-frame interval (GOP)",unit:"s",min:1,default:e?.gop??1})}return c.length===0?null:{id:`stream-${n.profile}`,tab:"streaming",title:n.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:c}}function Ia(n,a){const e=[];for(const c of ze){const r=n[c.profile];if(!r)continue;const p=ba(c,r,a?.[c.profile]);p&&e.push(p)}return e.length===0?null:{sections:e}}function Ca(n,a){const e={};let c=!1;const r=`${a}_resolution`;if(r in n&&typeof n[r]=="string"){const[S,h]=n[r].split("x").map(Number);Number.isFinite(S)&&Number.isFinite(h)&&(e.width=S,e.height=h,c=!0)}const p=`${a}_codec`;p in n&&(n[p]==="h264"||n[p]==="h265")&&(e.codec=n[p],c=!0);const l=`${a}_framerate`;if(l in n){const S=Number(n[l]);Number.isFinite(S)&&(e.framerate=S,c=!0)}const d=`${a}_bitrate`;if(d in n){const S=Number(n[d]);Number.isFinite(S)&&(e.bitrate=S,c=!0)}const m=`${a}_bitrateMode`;m in n&&(n[m]==="vbr"||n[m]==="cbr")&&(e.bitrateMode=n[m],c=!0);const u=`${a}_encoderProfile`;u in n&&(n[u]==="high"||n[u]==="main"||n[u]==="baseline")&&(e.encoderProfile=n[u],c=!0);const g=`${a}_gop`;if(g in n){const S=Number(n[g]);Number.isFinite(S)&&(e.gop=S,c=!0)}return c?e:null}const wa={accessories:"accessories",addonPages:"addon-pages",addonPagesSource:"addon-pages-source",addonRoutes:"addon-routes",addonSettings:"addon-settings",addonWidgets:"addon-widgets",addonWidgetsSource:"addon-widgets-source",addons:"addons",adminUi:"admin-ui",advancedNotifier:"advanced-notifier",alerts:"alerts",audioAnalysis:"audio-analysis",audioAnalyzer:"audio-analyzer",audioCodec:"audio-codec",audioMetrics:"audio-metrics",authProvider:"auth-provider",backup:"backup",battery:"battery",brightness:"brightness",cameraCredentials:"camera-credentials",cameraStreams:"camera-streams",decoder:"decoder",detectionPipeline:"detection-pipeline",deviceDiscovery:"device-discovery",deviceExport:"device-export",deviceManager:"device-manager",deviceOps:"device-ops",deviceProvider:"device-provider",deviceState:"device-state",deviceStatus:"device-status",doorbell:"doorbell",embeddingEncoder:"embedding-encoder",events:"events",featureProbe:"feature-probe",integrations:"integrations",intercom:"intercom",localNetwork:"local-network",logDestination:"log-destination",meshNetwork:"mesh-network",metricsProvider:"metrics-provider",motion:"motion",motionDetection:"motion-detection",motionTrigger:"motion-trigger",motionZones:"motion-zones",mqttBroker:"mqtt-broker",nativeObjectDetection:"native-object-detection",networkAccess:"network-access",networkQuality:"network-quality",nodes:"nodes",notificationOutput:"notification-output",oauthIntegration:"oauth-integration",osd:"osd",pipelineAnalytics:"pipeline-analytics",pipelineExecutor:"pipeline-executor",pipelineOrchestrator:"pipeline-orchestrator",pipelineRunner:"pipeline-runner",platformProbe:"platform-probe",ptz:"ptz",ptzAutotrack:"ptz-autotrack",reboot:"reboot",recording:"recording",recordingEngine:"recording-engine",restreamer:"restreamer",settingsStore:"settings-store",smtpProvider:"smtp-provider",snapshot:"snapshot",snapshotProvider:"snapshot-provider",ssoBridge:"sso-bridge",storage:"storage",storageProvider:"storage-provider",streamBroker:"stream-broker",streamParams:"stream-params",streamingEngine:"streaming-engine",switch:"switch",system:"system",toast:"toast",turnProvider:"turn-provider",userManagement:"user-management",userPasskeys:"user-passkeys",webrtc:"webrtc",webrtcSession:"webrtc-session",zoneAnalytics:"zone-analytics",zoneRules:"zone-rules",zones:"zones"},ka=[{key:"accessories",name:"accessories"},{key:"addonPages",name:"addon-pages"},{key:"addonPagesSource",name:"addon-pages-source"},{key:"addonRoutes",name:"addon-routes"},{key:"addonSettings",name:"addon-settings"},{key:"addonWidgets",name:"addon-widgets"},{key:"addonWidgetsSource",name:"addon-widgets-source"},{key:"addons",name:"addons"},{key:"adminUi",name:"admin-ui"},{key:"advancedNotifier",name:"advanced-notifier"},{key:"alerts",name:"alerts"},{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:"backup",name:"backup"},{key:"battery",name:"battery"},{key:"brightness",name:"brightness"},{key:"cameraCredentials",name:"camera-credentials"},{key:"cameraStreams",name:"camera-streams"},{key:"decoder",name:"decoder"},{key:"detectionPipeline",name:"detection-pipeline"},{key:"deviceDiscovery",name:"device-discovery"},{key:"deviceExport",name:"device-export"},{key:"deviceManager",name:"device-manager"},{key:"deviceOps",name:"device-ops"},{key:"deviceProvider",name:"device-provider"},{key:"deviceState",name:"device-state"},{key:"deviceStatus",name:"device-status"},{key:"doorbell",name:"doorbell"},{key:"embeddingEncoder",name:"embedding-encoder"},{key:"events",name:"events"},{key:"featureProbe",name:"feature-probe"},{key:"integrations",name:"integrations"},{key:"intercom",name:"intercom"},{key:"localNetwork",name:"local-network"},{key:"logDestination",name:"log-destination"},{key:"meshNetwork",name:"mesh-network"},{key:"metricsProvider",name:"metrics-provider"},{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:"networkAccess",name:"network-access"},{key:"networkQuality",name:"network-quality"},{key:"nodes",name:"nodes"},{key:"notificationOutput",name:"notification-output"},{key:"oauthIntegration",name:"oauth-integration"},{key:"osd",name:"osd"},{key:"pipelineAnalytics",name:"pipeline-analytics"},{key:"pipelineExecutor",name:"pipeline-executor"},{key:"pipelineOrchestrator",name:"pipeline-orchestrator"},{key:"pipelineRunner",name:"pipeline-runner"},{key:"platformProbe",name:"platform-probe"},{key:"ptz",name:"ptz"},{key:"ptzAutotrack",name:"ptz-autotrack"},{key:"reboot",name:"reboot"},{key:"recording",name:"recording"},{key:"recordingEngine",name:"recording-engine"},{key:"restreamer",name:"restreamer"},{key:"settingsStore",name:"settings-store"},{key:"smtpProvider",name:"smtp-provider"},{key:"snapshot",name:"snapshot"},{key:"snapshotProvider",name:"snapshot-provider"},{key:"ssoBridge",name:"sso-bridge"},{key:"storage",name:"storage"},{key:"storageProvider",name:"storage-provider"},{key:"streamBroker",name:"stream-broker"},{key:"streamParams",name:"stream-params"},{key:"streamingEngine",name:"streaming-engine"},{key:"switch",name:"switch"},{key:"system",name:"system"},{key:"toast",name:"toast"},{key:"turnProvider",name:"turn-provider"},{key:"userManagement",name:"user-management"},{key:"userPasskeys",name:"user-passkeys"},{key:"webrtc",name:"webrtc"},{key:"webrtcSession",name:"webrtc-session"},{key:"zoneAnalytics",name:"zone-analytics"},{key:"zoneRules",name:"zone-rules"},{key:"zones",name:"zones"}],Aa=[s.accessoriesCapability,s.addonPagesCapability,s.addonPagesSourceCapability,s.addonRoutesCapability,s.addonSettingsCapability,s.addonWidgetsCapability,s.addonWidgetsSourceCapability,s.addonsCapability,s.adminUiCapability,s.advancedNotifierCapability,s.alertsCapability,s.audioAnalysisCapability,s.audioAnalyzerCapability,s.audioCodecCapability,s.audioMetricsCapability,s.authProviderCapability,s.backupCapability,s.batteryCapability,s.brightnessCapability,s.cameraCredentialsCapability,s.cameraStreamsCapability,s.decoderCapability,s.detectionPipelineCapability,s.deviceDiscoveryCapability,s.deviceExportCapability,s.deviceManagerCapability,s.deviceOpsCapability,s.deviceProviderCapability,s.deviceStateCapability,s.deviceStatusCapability,s.doorbellCapability,s.embeddingEncoderCapability,s.eventsCapability,s.featureProbeCapability,s.integrationsCapability,s.intercomCapability,s.localNetworkCapability,s.logDestinationCapability,s.meshNetworkCapability,s.metricsProviderCapability,s.motionCapability,s.motionDetectionCapability,s.motionTriggerCapability,s.motionZonesCapability,s.mqttBrokerCapability,s.nativeObjectDetectionCapability,s.networkAccessCapability,s.networkQualityCapability,s.nodesCapability,s.notificationOutputCapability,s.oauthIntegrationCapability,s.osdCapability,s.pipelineAnalyticsCapability,s.pipelineExecutorCapability,s.pipelineOrchestratorCapability,s.pipelineRunnerCapability,s.platformProbeCapability,s.ptzCapability,s.ptzAutotrackCapability,s.rebootCapability,s.recordingCapability,s.recordingEngineCapability,s.restreamerCapability,s.settingsStoreCapability,s.smtpProviderCapability,s.snapshotCapability,s.snapshotProviderCapability,s.ssoBridgeCapability,s.storageCapability,s.storageProviderCapability,s.streamBrokerCapability,s.streamParamsCapability,s.streamingEngineCapability,s.switchCapability,s.systemCapability,s.toastCapability,s.turnProviderCapability,s.userManagementCapability,s.userPasskeysCapability,s.webrtcCapability,s.webrtcSessionCapability,s.zoneAnalyticsCapability,s.zoneRulesCapability,s.zonesCapability],Na=["accessories","battery","brightness","camera-credentials","device-discovery","device-export","device-status","doorbell","feature-probe","intercom","motion","motion-trigger","motion-zones","mqtt-broker","native-object-detection","osd","ptz","ptz-autotrack","snapshot","stream-params","switch"],Pa=Object.freeze({"addonPages.listPages":{capName:"addon-pages",capScope:"system",addonId:null,access:"view"},"addonPagesSource.listPages":{capName:"addon-pages-source",capScope:"system",addonId:null,access:"view"},"addonRoutes.getRoutes":{capName:"addon-routes",capScope:"system",addonId:null,access:"view"},"addonRoutes.invoke":{capName:"addon-routes",capScope:"system",addonId:null,access:"create"},"addons.applyAutoUpdateToAll":{capName:"addons",capScope:"system",addonId:null,access:"create"},"addons.custom":{capName:"addons",capScope:"system",addonId:null,access:"create"},"addons.forceRefresh":{capName:"addons",capScope:"system",addonId:null,access:"create"},"addons.getAddonAutoUpdate":{capName:"addons",capScope:"system",addonId:null,access:"view"},"addons.getAutoUpdateSettings":{capName:"addons",capScope:"system",addonId:null,access:"view"},"addons.getLastRestart":{capName:"addons",capScope:"system",addonId:null,access:"view"},"addons.getLogs":{capName:"addons",capScope:"system",addonId:null,access:"view"},"addons.getVersions":{capName:"addons",capScope:"system",addonId:null,access:"view"},"addons.installFromWorkspace":{capName:"addons",capScope:"system",addonId:null,access:"create"},"addons.installPackage":{capName:"addons",capScope:"system",addonId:null,access:"create"},"addons.isWorkspaceAvailable":{capName:"addons",capScope:"system",addonId:null,access:"view"},"addons.list":{capName:"addons",capScope:"system",addonId:null,access:"view"},"addons.listCapabilityProviders":{capName:"addons",capScope:"system",addonId:null,access:"view"},"addons.listFrameworkPackages":{capName:"addons",capScope:"system",addonId:null,access:"view"},"addons.listPackages":{capName:"addons",capScope:"system",addonId:null,access:"view"},"addons.listUpdates":{capName:"addons",capScope:"system",addonId:null,access:"view"},"addons.listWorkspacePackages":{capName:"addons",capScope:"system",addonId:null,access:"view"},"addons.onAddonLogs":{capName:"addons",capScope:"system",addonId:null,access:"view"},"addons.reloadPackages":{capName:"addons",capScope:"system",addonId:null,access:"create"},"addons.restartAddon":{capName:"addons",capScope:"system",addonId:null,access:"create"},"addons.restartServer":{capName:"addons",capScope:"system",addonId:null,access:"create"},"addons.retryLoad":{capName:"addons",capScope:"system",addonId:null,access:"create"},"addons.rollbackPackage":{capName:"addons",capScope:"system",addonId:null,access:"create"},"addons.searchAvailable":{capName:"addons",capScope:"system",addonId:null,access:"view"},"addons.setAddonAutoUpdate":{capName:"addons",capScope:"system",addonId:null,access:"create"},"addons.setAutoUpdateSettings":{capName:"addons",capScope:"system",addonId:null,access:"create"},"addons.setCapabilityProviderEnabled":{capName:"addons",capScope:"system",addonId:null,access:"create"},"addons.uninstallPackage":{capName:"addons",capScope:"system",addonId:null,access:"delete"},"addons.updateFrameworkPackage":{capName:"addons",capScope:"system",addonId:null,access:"create"},"addons.updatePackage":{capName:"addons",capScope:"system",addonId:null,access:"create"},"addonSettings.getDeviceSettings":{capName:"addon-settings",capScope:"system",addonId:null,access:"view"},"addonSettings.getGlobalSettings":{capName:"addon-settings",capScope:"system",addonId:null,access:"view"},"addonSettings.updateDeviceSettings":{capName:"addon-settings",capScope:"system",addonId:null,access:"create"},"addonSettings.updateGlobalSettings":{capName:"addon-settings",capScope:"system",addonId:null,access:"create"},"addonWidgets.listWidgets":{capName:"addon-widgets",capScope:"system",addonId:null,access:"view"},"addonWidgetsSource.listWidgets":{capName:"addon-widgets-source",capScope:"system",addonId:null,access:"view"},"adminUi.getStaticDir":{capName:"admin-ui",capScope:"system",addonId:null,access:"view"},"adminUi.getVersion":{capName:"admin-ui",capScope:"system",addonId:null,access:"view"},"advancedNotifier.deleteRule":{capName:"advanced-notifier",capScope:"system",addonId:null,access:"delete"},"advancedNotifier.getHistory":{capName:"advanced-notifier",capScope:"system",addonId:null,access:"view"},"advancedNotifier.getRules":{capName:"advanced-notifier",capScope:"system",addonId:null,access:"view"},"advancedNotifier.testRule":{capName:"advanced-notifier",capScope:"system",addonId:null,access:"create"},"advancedNotifier.upsertRule":{capName:"advanced-notifier",capScope:"system",addonId:null,access:"create"},"alerts.dismiss":{capName:"alerts",capScope:"system",addonId:null,access:"create"},"alerts.emit":{capName:"alerts",capScope:"system",addonId:null,access:"create"},"alerts.getUnreadCount":{capName:"alerts",capScope:"system",addonId:null,access:"view"},"alerts.list":{capName:"alerts",capScope:"system",addonId:null,access:"view"},"alerts.markAllRead":{capName:"alerts",capScope:"system",addonId:null,access:"create"},"alerts.markRead":{capName:"alerts",capScope:"system",addonId:null,access:"create"},"alerts.update":{capName:"alerts",capScope:"system",addonId:null,access:"create"},"audioAnalysis.resolveDeviceSettings":{capName:"audio-analysis",capScope:"device",addonId:null,access:"view"},"audioAnalyzer.analyseChunk":{capName:"audio-analyzer",capScope:"system",addonId:null,access:"create"},"audioAnalyzer.classify":{capName:"audio-analyzer",capScope:"system",addonId:null,access:"view"},"audioAnalyzer.dispose":{capName:"audio-analyzer",capScope:"system",addonId:null,access:"create"},"audioAnalyzer.isReady":{capName:"audio-analyzer",capScope:"system",addonId:null,access:"view"},"audioAnalyzer.reprobeAudioEngine":{capName:"audio-analyzer",capScope:"system",addonId:null,access:"create"},"audioCodec.canHandle":{capName:"audio-codec",capScope:"system",addonId:null,access:"view"},"audioCodec.closeSession":{capName:"audio-codec",capScope:"system",addonId:null,access:"create"},"audioCodec.createDecodeSession":{capName:"audio-codec",capScope:"system",addonId:null,access:"create"},"audioCodec.createEncodeSession":{capName:"audio-codec",capScope:"system",addonId:null,access:"create"},"audioCodec.flushEncode":{capName:"audio-codec",capScope:"system",addonId:null,access:"create"},"audioCodec.listActiveSessions":{capName:"audio-codec",capScope:"system",addonId:null,access:"view"},"audioCodec.listSupportedCodecs":{capName:"audio-codec",capScope:"system",addonId:null,access:"view"},"audioCodec.pullEncoded":{capName:"audio-codec",capScope:"system",addonId:null,access:"view"},"audioCodec.pullPcm":{capName:"audio-codec",capScope:"system",addonId:null,access:"view"},"audioCodec.pushEncodedFrame":{capName:"audio-codec",capScope:"system",addonId:null,access:"create"},"audioCodec.pushPcm":{capName:"audio-codec",capScope:"system",addonId:null,access:"create"},"audioMetrics.getCurrentSnapshot":{capName:"audio-metrics",capScope:"device",addonId:null,access:"view"},"audioMetrics.getHistory":{capName:"audio-metrics",capScope:"device",addonId:null,access:"view"},"authProvider.getLoginUrl":{capName:"auth-provider",capScope:"system",addonId:null,access:"view"},"authProvider.handleCallback":{capName:"auth-provider",capScope:"system",addonId:null,access:"create"},"authProvider.validateCredentials":{capName:"auth-provider",capScope:"system",addonId:null,access:"create"},"authProvider.validateToken":{capName:"auth-provider",capScope:"system",addonId:null,access:"view"},"backup.delete":{capName:"backup",capScope:"system",addonId:null,access:"delete"},"backup.getEntries":{capName:"backup",capScope:"system",addonId:null,access:"view"},"backup.list":{capName:"backup",capScope:"system",addonId:null,access:"view"},"backup.listArchives":{capName:"backup",capScope:"system",addonId:null,access:"view"},"backup.listDestinations":{capName:"backup",capScope:"system",addonId:null,access:"view"},"backup.listLocations":{capName:"backup",capScope:"system",addonId:null,access:"view"},"backup.previewSchedule":{capName:"backup",capScope:"system",addonId:null,access:"view"},"backup.restore":{capName:"backup",capScope:"system",addonId:null,access:"create"},"backup.trigger":{capName:"backup",capScope:"system",addonId:null,access:"create"},"backup.upsertDestinationPolicy":{capName:"backup",capScope:"system",addonId:null,access:"create"},"brightness.setBrightness":{capName:"brightness",capScope:"device",addonId:null,access:"create"},"cameraCredentials.getCredentials":{capName:"camera-credentials",capScope:"device",addonId:null,access:"view"},"cameraStreams.getBrokerStreams":{capName:"camera-streams",capScope:"device",addonId:null,access:"view"},"cameraStreams.getCameraStreams":{capName:"camera-streams",capScope:"device",addonId:null,access:"view"},"cameraStreams.getRtspEntries":{capName:"camera-streams",capScope:"device",addonId:null,access:"view"},"decoder.createSession":{capName:"decoder",capScope:"system",addonId:null,access:"view"},"decoder.destroySession":{capName:"decoder",capScope:"system",addonId:null,access:"delete"},"decoder.getFrame":{capName:"decoder",capScope:"system",addonId:null,access:"view"},"decoder.getInfo":{capName:"decoder",capScope:"system",addonId:null,access:"view"},"decoder.getShmStats":{capName:"decoder",capScope:"system",addonId:null,access:"view"},"decoder.getStats":{capName:"decoder",capScope:"system",addonId:null,access:"view"},"decoder.listActiveSessions":{capName:"decoder",capScope:"system",addonId:null,access:"view"},"decoder.openStream":{capName:"decoder",capScope:"system",addonId:null,access:"view"},"decoder.pullFrames":{capName:"decoder",capScope:"system",addonId:null,access:"view"},"decoder.pullHandles":{capName:"decoder",capScope:"system",addonId:null,access:"view"},"decoder.pushPacket":{capName:"decoder",capScope:"system",addonId:null,access:"view"},"decoder.reprobeHwaccel":{capName:"decoder",capScope:"system",addonId:null,access:"create"},"decoder.supportsCodec":{capName:"decoder",capScope:"system",addonId:null,access:"view"},"decoder.updateConfig":{capName:"decoder",capScope:"system",addonId:null,access:"view"},"deviceDiscovery.adoptDevice":{capName:"device-discovery",capScope:"device",addonId:null,access:"create"},"deviceDiscovery.listDiscovered":{capName:"device-discovery",capScope:"device",addonId:null,access:"view"},"deviceDiscovery.refreshDiscovery":{capName:"device-discovery",capScope:"device",addonId:null,access:"create"},"deviceDiscovery.releaseDevice":{capName:"device-discovery",capScope:"device",addonId:null,access:"create"},"deviceExport.exposeDevice":{capName:"device-export",capScope:"system",addonId:null,access:"create"},"deviceExport.getStatus":{capName:"device-export",capScope:"system",addonId:null,access:"view"},"deviceExport.listExposedDevices":{capName:"device-export",capScope:"system",addonId:null,access:"view"},"deviceExport.listSupportedDeviceKinds":{capName:"device-export",capScope:"system",addonId:null,access:"view"},"deviceExport.unexposeDevice":{capName:"device-export",capScope:"system",addonId:null,access:"create"},"deviceManager.addLocation":{capName:"device-manager",capScope:"system",addonId:null,access:"create"},"deviceManager.adoptDevice":{capName:"device-manager",capScope:"system",addonId:null,access:"create"},"deviceManager.allocateDeviceId":{capName:"device-manager",capScope:"system",addonId:null,access:"create"},"deviceManager.createDevice":{capName:"device-manager",capScope:"system",addonId:null,access:"create"},"deviceManager.disable":{capName:"device-manager",capScope:"system",addonId:null,access:"create"},"deviceManager.discoverDevices":{capName:"device-manager",capScope:"system",addonId:null,access:"create"},"deviceManager.enable":{capName:"device-manager",capScope:"system",addonId:null,access:"create"},"deviceManager.getAllBindings":{capName:"device-manager",capScope:"system",addonId:null,access:"view"},"deviceManager.getBindings":{capName:"device-manager",capScope:"system",addonId:null,access:"view"},"deviceManager.getChildren":{capName:"device-manager",capScope:"system",addonId:null,access:"view"},"deviceManager.getConfigSchema":{capName:"device-manager",capScope:"system",addonId:null,access:"view"},"deviceManager.getCreationSchema":{capName:"device-manager",capScope:"system",addonId:null,access:"view"},"deviceManager.getDevice":{capName:"device-manager",capScope:"system",addonId:null,access:"view"},"deviceManager.getDeviceAggregate":{capName:"device-manager",capScope:"system",addonId:null,access:"view"},"deviceManager.getDeviceLiveInfoAggregate":{capName:"device-manager",capScope:"system",addonId:null,access:"view"},"deviceManager.getDeviceSettingsAggregate":{capName:"device-manager",capScope:"system",addonId:null,access:"view"},"deviceManager.getDeviceStatusAggregate":{capName:"device-manager",capScope:"system",addonId:null,access:"view"},"deviceManager.getSettingsSchema":{capName:"device-manager",capScope:"system",addonId:null,access:"view"},"deviceManager.getStreamProfileMap":{capName:"device-manager",capScope:"system",addonId:null,access:"view"},"deviceManager.getStreamSources":{capName:"device-manager",capScope:"system",addonId:null,access:"view"},"deviceManager.listAll":{capName:"device-manager",capScope:"system",addonId:null,access:"view"},"deviceManager.listBindableCapsForDeviceType":{capName:"device-manager",capScope:"system",addonId:null,access:"view"},"deviceManager.listLocations":{capName:"device-manager",capScope:"system",addonId:null,access:"view"},"deviceManager.listPersistedByAddon":{capName:"device-manager",capScope:"system",addonId:null,access:"view"},"deviceManager.listWrappersForCap":{capName:"device-manager",capScope:"system",addonId:null,access:"view"},"deviceManager.loadConfig":{capName:"device-manager",capScope:"system",addonId:null,access:"view"},"deviceManager.loadMeta":{capName:"device-manager",capScope:"system",addonId:null,access:"view"},"deviceManager.loadRuntimeState":{capName:"device-manager",capScope:"system",addonId:null,access:"view"},"deviceManager.persistConfig":{capName:"device-manager",capScope:"system",addonId:null,access:"create"},"deviceManager.probeStreams":{capName:"device-manager",capScope:"system",addonId:null,access:"create"},"deviceManager.registerDevice":{capName:"device-manager",capScope:"system",addonId:null,access:"create"},"deviceManager.remove":{capName:"device-manager",capScope:"system",addonId:null,access:"delete"},"deviceManager.removeDevice":{capName:"device-manager",capScope:"system",addonId:null,access:"delete"},"deviceManager.removeLocation":{capName:"device-manager",capScope:"system",addonId:null,access:"delete"},"deviceManager.setDisabled":{capName:"device-manager",capScope:"system",addonId:null,access:"create"},"deviceManager.setLocation":{capName:"device-manager",capScope:"system",addonId:null,access:"create"},"deviceManager.setMetadata":{capName:"device-manager",capScope:"system",addonId:null,access:"create"},"deviceManager.setName":{capName:"device-manager",capScope:"system",addonId:null,access:"create"},"deviceManager.setStreamProfileMap":{capName:"device-manager",capScope:"system",addonId:null,access:"create"},"deviceManager.setWrapperActive":{capName:"device-manager",capScope:"system",addonId:null,access:"create"},"deviceManager.testCreationField":{capName:"device-manager",capScope:"system",addonId:null,access:"create"},"deviceManager.testField":{capName:"device-manager",capScope:"system",addonId:null,access:"create"},"deviceManager.updateConfig":{capName:"device-manager",capScope:"system",addonId:null,access:"create"},"deviceManager.updateDeviceField":{capName:"device-manager",capScope:"system",addonId:null,access:"create"},"deviceManager.updateDeviceFieldsBatch":{capName:"device-manager",capScope:"system",addonId:null,access:"create"},"deviceOps.getConfigEntries":{capName:"device-ops",capScope:"device",addonId:null,access:"view"},"deviceOps.getSettingsSchema":{capName:"device-ops",capScope:"device",addonId:null,access:"view"},"deviceOps.getStreamSources":{capName:"device-ops",capScope:"device",addonId:null,access:"view"},"deviceOps.removeDevice":{capName:"device-ops",capScope:"device",addonId:null,access:"delete"},"deviceOps.setConfig":{capName:"device-ops",capScope:"device",addonId:null,access:"create"},"deviceProvider.adoptDiscoveredDevice":{capName:"device-provider",capScope:"system",addonId:null,access:"create"},"deviceProvider.createDevice":{capName:"device-provider",capScope:"system",addonId:null,access:"create"},"deviceProvider.discoverDevices":{capName:"device-provider",capScope:"system",addonId:null,access:"create"},"deviceProvider.getChildCreationSchema":{capName:"device-provider",capScope:"system",addonId:null,access:"view"},"deviceProvider.getDevices":{capName:"device-provider",capScope:"system",addonId:null,access:"view"},"deviceProvider.getStatus":{capName:"device-provider",capScope:"system",addonId:null,access:"view"},"deviceProvider.start":{capName:"device-provider",capScope:"system",addonId:null,access:"create"},"deviceProvider.stop":{capName:"device-provider",capScope:"system",addonId:null,access:"create"},"deviceProvider.supportsDiscovery":{capName:"device-provider",capScope:"system",addonId:null,access:"view"},"deviceProvider.supportsManualCreation":{capName:"device-provider",capScope:"system",addonId:null,access:"view"},"deviceProvider.testCreationField":{capName:"device-provider",capScope:"system",addonId:null,access:"create"},"deviceState.getAllSnapshots":{capName:"device-state",capScope:"system",addonId:null,access:"view"},"deviceState.getCapSlice":{capName:"device-state",capScope:"system",addonId:null,access:"view"},"deviceState.getSnapshot":{capName:"device-state",capScope:"system",addonId:null,access:"view"},"deviceState.setCapSlice":{capName:"device-state",capScope:"system",addonId:null,access:"create"},"embeddingEncoder.encode":{capName:"embedding-encoder",capScope:"system",addonId:null,access:"view"},"embeddingEncoder.encodeText":{capName:"embedding-encoder",capScope:"system",addonId:null,access:"view"},"embeddingEncoder.getInfo":{capName:"embedding-encoder",capScope:"system",addonId:null,access:"view"},"events.getEventClipUrl":{capName:"events",capScope:"device",addonId:null,access:"view"},"events.getEvents":{capName:"events",capScope:"device",addonId:null,access:"view"},"events.getEventThumbnail":{capName:"events",capScope:"device",addonId:null,access:"view"},"integrations.create":{capName:"integrations",capScope:"system",addonId:null,access:"create"},"integrations.delete":{capName:"integrations",capScope:"system",addonId:null,access:"delete"},"integrations.get":{capName:"integrations",capScope:"system",addonId:null,access:"view"},"integrations.getAvailableTypes":{capName:"integrations",capScope:"system",addonId:null,access:"view"},"integrations.getByAddonId":{capName:"integrations",capScope:"system",addonId:null,access:"view"},"integrations.getSettings":{capName:"integrations",capScope:"system",addonId:null,access:"view"},"integrations.list":{capName:"integrations",capScope:"system",addonId:null,access:"view"},"integrations.setSettings":{capName:"integrations",capScope:"system",addonId:null,access:"create"},"integrations.testConnection":{capName:"integrations",capScope:"system",addonId:null,access:"create"},"integrations.update":{capName:"integrations",capScope:"system",addonId:null,access:"create"},"intercom.endTalkSession":{capName:"intercom",capScope:"device",addonId:null,access:"create"},"intercom.handleAnswer":{capName:"intercom",capScope:"device",addonId:null,access:"create"},"intercom.pushTalkPcm":{capName:"intercom",capScope:"device",addonId:null,access:"create"},"intercom.startSession":{capName:"intercom",capScope:"device",addonId:null,access:"create"},"intercom.startTalkSession":{capName:"intercom",capScope:"device",addonId:null,access:"create"},"intercom.stopSession":{capName:"intercom",capScope:"device",addonId:null,access:"create"},"localNetwork.getAllowedAddresses":{capName:"local-network",capScope:"system",addonId:null,access:"view"},"localNetwork.getConnectionEndpoints":{capName:"local-network",capScope:"system",addonId:null,access:"view"},"localNetwork.getPreferred":{capName:"local-network",capScope:"system",addonId:null,access:"view"},"localNetwork.list":{capName:"local-network",capScope:"system",addonId:null,access:"view"},"localNetwork.resetAllowlistToBestMatch":{capName:"local-network",capScope:"system",addonId:null,access:"delete"},"localNetwork.setAllowedAddresses":{capName:"local-network",capScope:"system",addonId:null,access:"create"},"logDestination.query":{capName:"log-destination",capScope:"system",addonId:null,access:"view"},"logDestination.write":{capName:"log-destination",capScope:"system",addonId:null,access:"create"},"meshNetwork.getStatus":{capName:"mesh-network",capScope:"system",addonId:null,access:"view"},"meshNetwork.join":{capName:"mesh-network",capScope:"system",addonId:null,access:"create"},"meshNetwork.leave":{capName:"mesh-network",capScope:"system",addonId:null,access:"create"},"meshNetwork.listPeers":{capName:"mesh-network",capScope:"system",addonId:null,access:"view"},"meshNetwork.logout":{capName:"mesh-network",capScope:"system",addonId:null,access:"create"},"meshNetwork.startLogin":{capName:"mesh-network",capScope:"system",addonId:null,access:"create"},"meshNetwork.testConnection":{capName:"mesh-network",capScope:"system",addonId:null,access:"create"},"metricsProvider.collectSnapshot":{capName:"metrics-provider",capScope:"system",addonId:null,access:"view"},"metricsProvider.getAddonStats":{capName:"metrics-provider",capScope:"system",addonId:null,access:"view"},"metricsProvider.getCached":{capName:"metrics-provider",capScope:"system",addonId:null,access:"view"},"metricsProvider.getCpuTemperature":{capName:"metrics-provider",capScope:"system",addonId:null,access:"view"},"metricsProvider.getCurrent":{capName:"metrics-provider",capScope:"system",addonId:null,access:"view"},"metricsProvider.getDiskSpace":{capName:"metrics-provider",capScope:"system",addonId:null,access:"view"},"metricsProvider.getGpuInfo":{capName:"metrics-provider",capScope:"system",addonId:null,access:"view"},"metricsProvider.getProcessStats":{capName:"metrics-provider",capScope:"system",addonId:null,access:"view"},"metricsProvider.killProcess":{capName:"metrics-provider",capScope:"system",addonId:null,access:"create"},"metricsProvider.listAddonInstances":{capName:"metrics-provider",capScope:"system",addonId:null,access:"view"},"metricsProvider.listNodeProcesses":{capName:"metrics-provider",capScope:"system",addonId:null,access:"view"},"motion.isDetected":{capName:"motion",capScope:"device",addonId:null,access:"view"},"motionDetection.analyze":{capName:"motion-detection",capScope:"device",addonId:null,access:"create"},"motionDetection.removeCamera":{capName:"motion-detection",capScope:"device",addonId:null,access:"delete"},"motionDetection.reset":{capName:"motion-detection",capScope:"device",addonId:null,access:"delete"},"motionTrigger.setMotionTrigger":{capName:"motion-trigger",capScope:"device",addonId:null,access:"create"},"motionZones.getOptions":{capName:"motion-zones",capScope:"device",addonId:null,access:"view"},"motionZones.setZone":{capName:"motion-zones",capScope:"device",addonId:null,access:"create"},"mqttBroker.addBroker":{capName:"mqtt-broker",capScope:"system",addonId:null,access:"create"},"mqttBroker.getBrokerConfig":{capName:"mqtt-broker",capScope:"system",addonId:null,access:"view"},"mqttBroker.getStatus":{capName:"mqtt-broker",capScope:"system",addonId:null,access:"view"},"mqttBroker.listBrokers":{capName:"mqtt-broker",capScope:"system",addonId:null,access:"view"},"mqttBroker.removeBroker":{capName:"mqtt-broker",capScope:"system",addonId:null,access:"delete"},"mqttBroker.startEmbeddedBroker":{capName:"mqtt-broker",capScope:"system",addonId:null,access:"create"},"mqttBroker.stopEmbeddedBroker":{capName:"mqtt-broker",capScope:"system",addonId:null,access:"create"},"mqttBroker.testConnection":{capName:"mqtt-broker",capScope:"system",addonId:null,access:"create"},"networkAccess.getEndpoint":{capName:"network-access",capScope:"system",addonId:null,access:"view"},"networkAccess.getStatus":{capName:"network-access",capScope:"system",addonId:null,access:"view"},"networkAccess.listEndpoints":{capName:"network-access",capScope:"system",addonId:null,access:"view"},"networkAccess.start":{capName:"network-access",capScope:"system",addonId:null,access:"create"},"networkAccess.stop":{capName:"network-access",capScope:"system",addonId:null,access:"create"},"networkQuality.getAllStats":{capName:"network-quality",capScope:"system",addonId:null,access:"view"},"networkQuality.getDeviceStats":{capName:"network-quality",capScope:"system",addonId:null,access:"view"},"networkQuality.reportClientStats":{capName:"network-quality",capScope:"system",addonId:null,access:"create"},"nodes.clusterAddonStatus":{capName:"nodes",capScope:"system",addonId:null,access:"view"},"nodes.deployAddon":{capName:"nodes",capScope:"system",addonId:null,access:"create"},"nodes.executeQuery":{capName:"nodes",capScope:"system",addonId:null,access:"create"},"nodes.getCapUsageGraph":{capName:"nodes",capScope:"system",addonId:null,access:"view"},"nodes.getNodeAddons":{capName:"nodes",capScope:"system",addonId:null,access:"view"},"nodes.renameNode":{capName:"nodes",capScope:"system",addonId:null,access:"create"},"nodes.restartAddon":{capName:"nodes",capScope:"system",addonId:null,access:"create"},"nodes.restartNode":{capName:"nodes",capScope:"system",addonId:null,access:"create"},"nodes.restartProcess":{capName:"nodes",capScope:"system",addonId:null,access:"create"},"nodes.setProcessLogLevel":{capName:"nodes",capScope:"system",addonId:null,access:"create"},"nodes.shutdownNode":{capName:"nodes",capScope:"system",addonId:null,access:"create"},"nodes.topology":{capName:"nodes",capScope:"system",addonId:null,access:"view"},"nodes.undeployAddon":{capName:"nodes",capScope:"system",addonId:null,access:"create"},"notificationOutput.send":{capName:"notification-output",capScope:"system",addonId:null,access:"create"},"notificationOutput.sendTest":{capName:"notification-output",capScope:"system",addonId:null,access:"create"},"oauthIntegration.getDescriptor":{capName:"oauth-integration",capScope:"system",addonId:null,access:"view"},"osd.setOverlay":{capName:"osd",capScope:"device",addonId:null,access:"create"},"pipelineAnalytics.clearTracks":{capName:"pipeline-analytics",capScope:"device",addonId:null,access:"delete"},"pipelineAnalytics.getActiveTracks":{capName:"pipeline-analytics",capScope:"device",addonId:null,access:"view"},"pipelineAnalytics.getAudioEvents":{capName:"pipeline-analytics",capScope:"device",addonId:null,access:"view"},"pipelineAnalytics.getEventMedia":{capName:"pipeline-analytics",capScope:"device",addonId:null,access:"view"},"pipelineAnalytics.getMotionEvents":{capName:"pipeline-analytics",capScope:"device",addonId:null,access:"view"},"pipelineAnalytics.getObjectEvents":{capName:"pipeline-analytics",capScope:"device",addonId:null,access:"view"},"pipelineAnalytics.getTrack":{capName:"pipeline-analytics",capScope:"device",addonId:null,access:"view"},"pipelineAnalytics.getTrackMedia":{capName:"pipeline-analytics",capScope:"device",addonId:null,access:"view"},"pipelineAnalytics.listTracks":{capName:"pipeline-analytics",capScope:"device",addonId:null,access:"view"},"pipelineExecutor.cacheFrameInPool":{capName:"pipeline-executor",capScope:"system",addonId:null,access:"create"},"pipelineExecutor.deleteModel":{capName:"pipeline-executor",capScope:"system",addonId:null,access:"delete"},"pipelineExecutor.deleteTemplate":{capName:"pipeline-executor",capScope:"system",addonId:null,access:"delete"},"pipelineExecutor.detect":{capName:"pipeline-executor",capScope:"system",addonId:null,access:"view"},"pipelineExecutor.downloadModel":{capName:"pipeline-executor",capScope:"system",addonId:null,access:"create"},"pipelineExecutor.getAddonModels":{capName:"pipeline-executor",capScope:"system",addonId:null,access:"view"},"pipelineExecutor.getAudioCapabilities":{capName:"pipeline-executor",capScope:"system",addonId:null,access:"view"},"pipelineExecutor.getAvailableEngines":{capName:"pipeline-executor",capScope:"system",addonId:null,access:"view"},"pipelineExecutor.getCapabilities":{capName:"pipeline-executor",capScope:"system",addonId:null,access:"view"},"pipelineExecutor.getDefaultSteps":{capName:"pipeline-executor",capScope:"system",addonId:null,access:"view"},"pipelineExecutor.getDetectionConfigSchema":{capName:"pipeline-executor",capScope:"system",addonId:null,access:"view"},"pipelineExecutor.getEffectiveTuning":{capName:"pipeline-executor",capScope:"system",addonId:null,access:"view"},"pipelineExecutor.getGlobalPipelineConfig":{capName:"pipeline-executor",capScope:"system",addonId:null,access:"view"},"pipelineExecutor.getGlobalSteps":{capName:"pipeline-executor",capScope:"system",addonId:null,access:"view"},"pipelineExecutor.getOrchestratorConfigSchema":{capName:"pipeline-executor",capScope:"system",addonId:null,access:"view"},"pipelineExecutor.getReferenceAudio":{capName:"pipeline-executor",capScope:"system",addonId:null,access:"view"},"pipelineExecutor.getReferenceAudioFiles":{capName:"pipeline-executor",capScope:"system",addonId:null,access:"view"},"pipelineExecutor.getReferenceImage":{capName:"pipeline-executor",capScope:"system",addonId:null,access:"view"},"pipelineExecutor.getSchema":{capName:"pipeline-executor",capScope:"system",addonId:null,access:"view"},"pipelineExecutor.getSelectedEngine":{capName:"pipeline-executor",capScope:"system",addonId:null,access:"view"},"pipelineExecutor.getVideoPipelineSteps":{capName:"pipeline-executor",capScope:"system",addonId:null,access:"view"},"pipelineExecutor.inferCached":{capName:"pipeline-executor",capScope:"system",addonId:null,access:"create"},"pipelineExecutor.killEngine":{capName:"pipeline-executor",capScope:"system",addonId:null,access:"create"},"pipelineExecutor.listLoadedEngines":{capName:"pipeline-executor",capScope:"system",addonId:null,access:"view"},"pipelineExecutor.listReferenceImages":{capName:"pipeline-executor",capScope:"system",addonId:null,access:"view"},"pipelineExecutor.listTemplates":{capName:"pipeline-executor",capScope:"system",addonId:null,access:"view"},"pipelineExecutor.reprobeEngine":{capName:"pipeline-executor",capScope:"system",addonId:null,access:"create"},"pipelineExecutor.runAudioTest":{capName:"pipeline-executor",capScope:"system",addonId:null,access:"create"},"pipelineExecutor.runPipeline":{capName:"pipeline-executor",capScope:"system",addonId:null,access:"create"},"pipelineExecutor.runPipelineBatch":{capName:"pipeline-executor",capScope:"system",addonId:null,access:"create"},"pipelineExecutor.saveTemplate":{capName:"pipeline-executor",capScope:"system",addonId:null,access:"create"},"pipelineExecutor.setVideoPipelineSteps":{capName:"pipeline-executor",capScope:"system",addonId:null,access:"create"},"pipelineExecutor.spinEngine":{capName:"pipeline-executor",capScope:"system",addonId:null,access:"create"},"pipelineExecutor.uncacheFrame":{capName:"pipeline-executor",capScope:"system",addonId:null,access:"create"},"pipelineExecutor.updateTemplate":{capName:"pipeline-executor",capScope:"system",addonId:null,access:"create"},"pipelineOrchestrator.assignAudio":{capName:"pipeline-orchestrator",capScope:"system",addonId:null,access:"create"},"pipelineOrchestrator.assignDecoder":{capName:"pipeline-orchestrator",capScope:"system",addonId:null,access:"create"},"pipelineOrchestrator.assignPipeline":{capName:"pipeline-orchestrator",capScope:"system",addonId:null,access:"create"},"pipelineOrchestrator.deleteTemplate":{capName:"pipeline-orchestrator",capScope:"system",addonId:null,access:"delete"},"pipelineOrchestrator.getAgentLoad":{capName:"pipeline-orchestrator",capScope:"system",addonId:null,access:"view"},"pipelineOrchestrator.getAgentSettings":{capName:"pipeline-orchestrator",capScope:"system",addonId:null,access:"view"},"pipelineOrchestrator.getAudioAssignment":{capName:"pipeline-orchestrator",capScope:"system",addonId:null,access:"view"},"pipelineOrchestrator.getAudioAssignments":{capName:"pipeline-orchestrator",capScope:"system",addonId:null,access:"view"},"pipelineOrchestrator.getAudioNodeLoad":{capName:"pipeline-orchestrator",capScope:"system",addonId:null,access:"view"},"pipelineOrchestrator.getCameraMetrics":{capName:"pipeline-orchestrator",capScope:"system",addonId:null,access:"view"},"pipelineOrchestrator.getCameraSettings":{capName:"pipeline-orchestrator",capScope:"system",addonId:null,access:"view"},"pipelineOrchestrator.getCameraStepOverrides":{capName:"pipeline-orchestrator",capScope:"system",addonId:null,access:"view"},"pipelineOrchestrator.getCapabilityBindings":{capName:"pipeline-orchestrator",capScope:"system",addonId:null,access:"view"},"pipelineOrchestrator.getDecoderAssignment":{capName:"pipeline-orchestrator",capScope:"system",addonId:null,access:"view"},"pipelineOrchestrator.getDecoderAssignments":{capName:"pipeline-orchestrator",capScope:"system",addonId:null,access:"view"},"pipelineOrchestrator.getGlobalMetrics":{capName:"pipeline-orchestrator",capScope:"system",addonId:null,access:"view"},"pipelineOrchestrator.getPipelineAssignment":{capName:"pipeline-orchestrator",capScope:"system",addonId:null,access:"view"},"pipelineOrchestrator.getPipelineAssignments":{capName:"pipeline-orchestrator",capScope:"system",addonId:null,access:"view"},"pipelineOrchestrator.listAgentSettings":{capName:"pipeline-orchestrator",capScope:"system",addonId:null,access:"view"},"pipelineOrchestrator.listTemplates":{capName:"pipeline-orchestrator",capScope:"system",addonId:null,access:"view"},"pipelineOrchestrator.rebalance":{capName:"pipeline-orchestrator",capScope:"system",addonId:null,access:"create"},"pipelineOrchestrator.removeAgentSettings":{capName:"pipeline-orchestrator",capScope:"system",addonId:null,access:"delete"},"pipelineOrchestrator.resolvePipeline":{capName:"pipeline-orchestrator",capScope:"system",addonId:null,access:"view"},"pipelineOrchestrator.saveTemplate":{capName:"pipeline-orchestrator",capScope:"system",addonId:null,access:"create"},"pipelineOrchestrator.setAgentAddonDefaults":{capName:"pipeline-orchestrator",capScope:"system",addonId:null,access:"create"},"pipelineOrchestrator.setCameraPipelineForAgent":{capName:"pipeline-orchestrator",capScope:"system",addonId:null,access:"create"},"pipelineOrchestrator.setCameraStepOverride":{capName:"pipeline-orchestrator",capScope:"system",addonId:null,access:"create"},"pipelineOrchestrator.setCameraStepToggle":{capName:"pipeline-orchestrator",capScope:"system",addonId:null,access:"create"},"pipelineOrchestrator.setCapabilityBinding":{capName:"pipeline-orchestrator",capScope:"system",addonId:null,access:"create"},"pipelineOrchestrator.unassignAudio":{capName:"pipeline-orchestrator",capScope:"system",addonId:null,access:"create"},"pipelineOrchestrator.unassignDecoder":{capName:"pipeline-orchestrator",capScope:"system",addonId:null,access:"create"},"pipelineOrchestrator.unassignPipeline":{capName:"pipeline-orchestrator",capScope:"system",addonId:null,access:"create"},"pipelineOrchestrator.updateTemplate":{capName:"pipeline-orchestrator",capScope:"system",addonId:null,access:"create"},"pipelineRunner.attachCamera":{capName:"pipeline-runner",capScope:"system",addonId:null,access:"create"},"pipelineRunner.detachCamera":{capName:"pipeline-runner",capScope:"system",addonId:null,access:"create"},"pipelineRunner.getAllCameraMetrics":{capName:"pipeline-runner",capScope:"system",addonId:null,access:"view"},"pipelineRunner.getCameraMetrics":{capName:"pipeline-runner",capScope:"system",addonId:null,access:"view"},"pipelineRunner.getLocalCameras":{capName:"pipeline-runner",capScope:"system",addonId:null,access:"view"},"pipelineRunner.getLocalLoad":{capName:"pipeline-runner",capScope:"system",addonId:null,access:"view"},"pipelineRunner.getLocalMetrics":{capName:"pipeline-runner",capScope:"system",addonId:null,access:"view"},"pipelineRunner.reportMotion":{capName:"pipeline-runner",capScope:"system",addonId:null,access:"create"},"platformProbe.getCapabilities":{capName:"platform-probe",capScope:"system",addonId:null,access:"view"},"platformProbe.getHardware":{capName:"platform-probe",capScope:"system",addonId:null,access:"view"},"platformProbe.getHardwareEncoders":{capName:"platform-probe",capScope:"system",addonId:null,access:"view"},"platformProbe.refreshHardwareEncoders":{capName:"platform-probe",capScope:"system",addonId:null,access:"create"},"platformProbe.resolveHwAccel":{capName:"platform-probe",capScope:"system",addonId:null,access:"view"},"platformProbe.resolveInferenceConfig":{capName:"platform-probe",capScope:"system",addonId:null,access:"view"},"ptz.continuousMove":{capName:"ptz",capScope:"device",addonId:null,access:"create"},"ptz.deletePreset":{capName:"ptz",capScope:"device",addonId:null,access:"delete"},"ptz.getOptions":{capName:"ptz",capScope:"device",addonId:null,access:"view"},"ptz.getPosition":{capName:"ptz",capScope:"device",addonId:null,access:"view"},"ptz.getPresets":{capName:"ptz",capScope:"device",addonId:null,access:"view"},"ptz.goHome":{capName:"ptz",capScope:"device",addonId:null,access:"create"},"ptz.goToPreset":{capName:"ptz",capScope:"device",addonId:null,access:"create"},"ptz.move":{capName:"ptz",capScope:"device",addonId:null,access:"create"},"ptz.savePreset":{capName:"ptz",capScope:"device",addonId:null,access:"create"},"ptz.setAutofocus":{capName:"ptz",capScope:"device",addonId:null,access:"create"},"ptz.stop":{capName:"ptz",capScope:"device",addonId:null,access:"create"},"ptzAutotrack.getSettings":{capName:"ptz-autotrack",capScope:"device",addonId:null,access:"view"},"ptzAutotrack.getStatus":{capName:"ptz-autotrack",capScope:"device",addonId:null,access:"view"},"ptzAutotrack.setEnabled":{capName:"ptz-autotrack",capScope:"device",addonId:null,access:"create"},"ptzAutotrack.setSettings":{capName:"ptz-autotrack",capScope:"device",addonId:null,access:"create"},"reboot.reboot":{capName:"reboot",capScope:"device",addonId:null,access:"create"},"recording.getPlaybackUrl":{capName:"recording",capScope:"device",addonId:null,access:"view"},"recording.getSegments":{capName:"recording",capScope:"device",addonId:null,access:"view"},"recording.getThumbnailAt":{capName:"recording",capScope:"device",addonId:null,access:"view"},"recordingEngine.disable":{capName:"recording-engine",capScope:"system",addonId:null,access:"create"},"recordingEngine.enable":{capName:"recording-engine",capScope:"system",addonId:null,access:"create"},"recordingEngine.estimateGlobalStorage":{capName:"recording-engine",capScope:"system",addonId:null,access:"view"},"recordingEngine.estimateStorage":{capName:"recording-engine",capScope:"system",addonId:null,access:"view"},"recordingEngine.getAvailability":{capName:"recording-engine",capScope:"system",addonId:null,access:"view"},"recordingEngine.getConfig":{capName:"recording-engine",capScope:"system",addonId:null,access:"view"},"recordingEngine.getMotionStats":{capName:"recording-engine",capScope:"system",addonId:null,access:"view"},"recordingEngine.getPlaylist":{capName:"recording-engine",capScope:"system",addonId:null,access:"view"},"recordingEngine.getPolicy":{capName:"recording-engine",capScope:"system",addonId:null,access:"view"},"recordingEngine.getPolicyStatus":{capName:"recording-engine",capScope:"system",addonId:null,access:"view"},"recordingEngine.getRetentionConfig":{capName:"recording-engine",capScope:"system",addonId:null,access:"view"},"recordingEngine.getSegments":{capName:"recording-engine",capScope:"system",addonId:null,access:"view"},"recordingEngine.getStatus":{capName:"recording-engine",capScope:"system",addonId:null,access:"view"},"recordingEngine.getStorageUsage":{capName:"recording-engine",capScope:"system",addonId:null,access:"view"},"recordingEngine.getThumbnail":{capName:"recording-engine",capScope:"system",addonId:null,access:"view"},"recordingEngine.setPolicy":{capName:"recording-engine",capScope:"system",addonId:null,access:"create"},"recordingEngine.updateConfig":{capName:"recording-engine",capScope:"system",addonId:null,access:"create"},"recordingEngine.updateRetentionConfig":{capName:"recording-engine",capScope:"system",addonId:null,access:"create"},"restreamer.getExposedResources":{capName:"restreamer",capScope:"system",addonId:null,access:"view"},"restreamer.registerDevice":{capName:"restreamer",capScope:"system",addonId:null,access:"create"},"restreamer.unregisterDevice":{capName:"restreamer",capScope:"system",addonId:null,access:"delete"},"settingsStore.count":{capName:"settings-store",capScope:"system",addonId:null,access:"view"},"settingsStore.declareCollection":{capName:"settings-store",capScope:"system",addonId:null,access:"create"},"settingsStore.delete":{capName:"settings-store",capScope:"system",addonId:null,access:"delete"},"settingsStore.get":{capName:"settings-store",capScope:"system",addonId:null,access:"view"},"settingsStore.insert":{capName:"settings-store",capScope:"system",addonId:null,access:"create"},"settingsStore.isEmpty":{capName:"settings-store",capScope:"system",addonId:null,access:"view"},"settingsStore.query":{capName:"settings-store",capScope:"system",addonId:null,access:"view"},"settingsStore.set":{capName:"settings-store",capScope:"system",addonId:null,access:"create"},"settingsStore.update":{capName:"settings-store",capScope:"system",addonId:null,access:"create"},"smtpProvider.getStatus":{capName:"smtp-provider",capScope:"system",addonId:null,access:"view"},"smtpProvider.sendEmail":{capName:"smtp-provider",capScope:"system",addonId:null,access:"create"},"smtpProvider.verify":{capName:"smtp-provider",capScope:"system",addonId:null,access:"view"},"snapshot.getSnapshot":{capName:"snapshot",capScope:"device",addonId:null,access:"view"},"snapshot.invalidateCache":{capName:"snapshot",capScope:"device",addonId:null,access:"create"},"snapshotProvider.getSnapshot":{capName:"snapshot-provider",capScope:"system",addonId:null,access:"view"},"snapshotProvider.supportsDevice":{capName:"snapshot-provider",capScope:"system",addonId:null,access:"view"},"ssoBridge.signBridgeToken":{capName:"sso-bridge",capScope:"system",addonId:null,access:"view"},"ssoBridge.verifyBridgeToken":{capName:"sso-bridge",capScope:"system",addonId:null,access:"view"},"storage.abortUpload":{capName:"storage",capScope:"system",addonId:null,access:"create"},"storage.beginDownload":{capName:"storage",capScope:"system",addonId:null,access:"create"},"storage.beginUpload":{capName:"storage",capScope:"system",addonId:null,access:"create"},"storage.delete":{capName:"storage",capScope:"system",addonId:null,access:"delete"},"storage.deleteLocation":{capName:"storage",capScope:"system",addonId:null,access:"delete"},"storage.endDownload":{capName:"storage",capScope:"system",addonId:null,access:"create"},"storage.exists":{capName:"storage",capScope:"system",addonId:null,access:"view"},"storage.finalizeUpload":{capName:"storage",capScope:"system",addonId:null,access:"create"},"storage.getAvailableSpace":{capName:"storage",capScope:"system",addonId:null,access:"view"},"storage.getDefaultLocation":{capName:"storage",capScope:"system",addonId:null,access:"view"},"storage.list":{capName:"storage",capScope:"system",addonId:null,access:"view"},"storage.listLocations":{capName:"storage",capScope:"system",addonId:null,access:"view"},"storage.listProviders":{capName:"storage",capScope:"system",addonId:null,access:"view"},"storage.read":{capName:"storage",capScope:"system",addonId:null,access:"view"},"storage.readChunk":{capName:"storage",capScope:"system",addonId:null,access:"view"},"storage.resolve":{capName:"storage",capScope:"system",addonId:null,access:"view"},"storage.testConfig":{capName:"storage",capScope:"system",addonId:null,access:"view"},"storage.testLocation":{capName:"storage",capScope:"system",addonId:null,access:"view"},"storage.upsertLocation":{capName:"storage",capScope:"system",addonId:null,access:"create"},"storage.write":{capName:"storage",capScope:"system",addonId:null,access:"create"},"storage.writeChunk":{capName:"storage",capScope:"system",addonId:null,access:"create"},"storageProvider.abortUpload":{capName:"storage-provider",capScope:"system",addonId:null,access:"create"},"storageProvider.beginDownload":{capName:"storage-provider",capScope:"system",addonId:null,access:"create"},"storageProvider.beginUpload":{capName:"storage-provider",capScope:"system",addonId:null,access:"create"},"storageProvider.delete":{capName:"storage-provider",capScope:"system",addonId:null,access:"delete"},"storageProvider.endDownload":{capName:"storage-provider",capScope:"system",addonId:null,access:"create"},"storageProvider.exists":{capName:"storage-provider",capScope:"system",addonId:null,access:"view"},"storageProvider.finalizeUpload":{capName:"storage-provider",capScope:"system",addonId:null,access:"create"},"storageProvider.getAvailableSpace":{capName:"storage-provider",capScope:"system",addonId:null,access:"view"},"storageProvider.getProviderInfo":{capName:"storage-provider",capScope:"system",addonId:null,access:"view"},"storageProvider.list":{capName:"storage-provider",capScope:"system",addonId:null,access:"view"},"storageProvider.read":{capName:"storage-provider",capScope:"system",addonId:null,access:"view"},"storageProvider.readChunk":{capName:"storage-provider",capScope:"system",addonId:null,access:"view"},"storageProvider.resolve":{capName:"storage-provider",capScope:"system",addonId:null,access:"view"},"storageProvider.testLocation":{capName:"storage-provider",capScope:"system",addonId:null,access:"view"},"storageProvider.write":{capName:"storage-provider",capScope:"system",addonId:null,access:"create"},"storageProvider.writeChunk":{capName:"storage-provider",capScope:"system",addonId:null,access:"create"},"streamBroker.assignProfile":{capName:"stream-broker",capScope:"system",addonId:null,access:"create"},"streamBroker.getAllRtspEntries":{capName:"stream-broker",capScope:"system",addonId:null,access:"view"},"streamBroker.getBrokerStats":{capName:"stream-broker",capScope:"system",addonId:null,access:"view"},"streamBroker.getPreBufferInfo":{capName:"stream-broker",capScope:"system",addonId:null,access:"view"},"streamBroker.getRtspEntry":{capName:"stream-broker",capScope:"system",addonId:null,access:"view"},"streamBroker.getRtspPort":{capName:"stream-broker",capScope:"system",addonId:null,access:"view"},"streamBroker.getStreamUrl":{capName:"stream-broker",capScope:"system",addonId:null,access:"view"},"streamBroker.getStreamWithCodec":{capName:"stream-broker",capScope:"system",addonId:null,access:"create"},"streamBroker.isRtspEnabled":{capName:"stream-broker",capScope:"system",addonId:null,access:"view"},"streamBroker.killClient":{capName:"stream-broker",capScope:"system",addonId:null,access:"create"},"streamBroker.listAllCameraStreams":{capName:"stream-broker",capScope:"system",addonId:null,access:"view"},"streamBroker.listAllProfileSlots":{capName:"stream-broker",capScope:"system",addonId:null,access:"view"},"streamBroker.listClients":{capName:"stream-broker",capScope:"system",addonId:null,access:"view"},"streamBroker.publishCameraStream":{capName:"stream-broker",capScope:"system",addonId:null,access:"create"},"streamBroker.pullAudioChunks":{capName:"stream-broker",capScope:"system",addonId:null,access:"view"},"streamBroker.pullFrameHandles":{capName:"stream-broker",capScope:"system",addonId:null,access:"view"},"streamBroker.regenerateRtspToken":{capName:"stream-broker",capScope:"system",addonId:null,access:"create"},"streamBroker.releaseStreamWithCodec":{capName:"stream-broker",capScope:"system",addonId:null,access:"create"},"streamBroker.restartProfile":{capName:"stream-broker",capScope:"system",addonId:null,access:"create"},"streamBroker.retractCameraStream":{capName:"stream-broker",capScope:"system",addonId:null,access:"create"},"streamBroker.setPreBufferDuration":{capName:"stream-broker",capScope:"system",addonId:null,access:"create"},"streamBroker.setRtspEnabled":{capName:"stream-broker",capScope:"system",addonId:null,access:"create"},"streamBroker.subscribeAudioChunks":{capName:"stream-broker",capScope:"system",addonId:null,access:"create"},"streamBroker.subscribeFrames":{capName:"stream-broker",capScope:"system",addonId:null,access:"create"},"streamBroker.unassignProfile":{capName:"stream-broker",capScope:"system",addonId:null,access:"create"},"streamBroker.unsubscribeAudioChunks":{capName:"stream-broker",capScope:"system",addonId:null,access:"create"},"streamBroker.unsubscribeFrames":{capName:"stream-broker",capScope:"system",addonId:null,access:"create"},"streamingEngine.getStreamUrl":{capName:"streaming-engine",capScope:"system",addonId:null,access:"view"},"streamingEngine.listStreams":{capName:"streaming-engine",capScope:"system",addonId:null,access:"view"},"streamingEngine.registerStream":{capName:"streaming-engine",capScope:"system",addonId:null,access:"create"},"streamingEngine.unregisterStream":{capName:"streaming-engine",capScope:"system",addonId:null,access:"delete"},"streamParams.getConfigSchema":{capName:"stream-params",capScope:"device",addonId:null,access:"view"},"streamParams.getOptions":{capName:"stream-params",capScope:"device",addonId:null,access:"view"},"streamParams.setProfile":{capName:"stream-params",capScope:"device",addonId:null,access:"create"},"switch.setState":{capName:"switch",capScope:"device",addonId:null,access:"create"},"system.featureFlags":{capName:"system",capScope:"system",addonId:null,access:"view"},"system.forceRetentionCleanup":{capName:"system",capScope:"system",addonId:null,access:"create"},"system.getRetentionConfig":{capName:"system",capScope:"system",addonId:null,access:"view"},"system.health":{capName:"system",capScope:"system",addonId:null,access:"view"},"system.info":{capName:"system",capScope:"system",addonId:null,access:"view"},"system.networkAddresses":{capName:"system",capScope:"system",addonId:null,access:"view"},"system.setRetentionConfig":{capName:"system",capScope:"system",addonId:null,access:"create"},"toast.onToast":{capName:"toast",capScope:"system",addonId:null,access:"view"},"turnProvider.getTurnServers":{capName:"turn-provider",capScope:"system",addonId:null,access:"view"},"userManagement.confirmTotp":{capName:"user-management",capScope:"system",addonId:null,access:"create"},"userManagement.createApiKey":{capName:"user-management",capScope:"system",addonId:null,access:"create"},"userManagement.createScopedToken":{capName:"user-management",capScope:"system",addonId:null,access:"create"},"userManagement.createUser":{capName:"user-management",capScope:"system",addonId:null,access:"create"},"userManagement.deleteUser":{capName:"user-management",capScope:"system",addonId:null,access:"delete"},"userManagement.disableTotp":{capName:"user-management",capScope:"system",addonId:null,access:"delete"},"userManagement.getTotpStatus":{capName:"user-management",capScope:"system",addonId:null,access:"view"},"userManagement.listApiKeys":{capName:"user-management",capScope:"system",addonId:null,access:"view"},"userManagement.listOauthSessions":{capName:"user-management",capScope:"system",addonId:null,access:"view"},"userManagement.listScopedTokens":{capName:"user-management",capScope:"system",addonId:null,access:"view"},"userManagement.listUsers":{capName:"user-management",capScope:"system",addonId:null,access:"view"},"userManagement.oauthExchangeCode":{capName:"user-management",capScope:"system",addonId:null,access:"view"},"userManagement.oauthIssueCode":{capName:"user-management",capScope:"system",addonId:null,access:"create"},"userManagement.oauthRefresh":{capName:"user-management",capScope:"system",addonId:null,access:"view"},"userManagement.oauthVerifyAccessToken":{capName:"user-management",capScope:"system",addonId:null,access:"view"},"userManagement.resetPassword":{capName:"user-management",capScope:"system",addonId:null,access:"create"},"userManagement.revokeApiKey":{capName:"user-management",capScope:"system",addonId:null,access:"delete"},"userManagement.revokeOauthSession":{capName:"user-management",capScope:"system",addonId:null,access:"delete"},"userManagement.revokeScopedToken":{capName:"user-management",capScope:"system",addonId:null,access:"delete"},"userManagement.setupTotp":{capName:"user-management",capScope:"system",addonId:null,access:"create"},"userManagement.setUserScopes":{capName:"user-management",capScope:"system",addonId:null,access:"create"},"userManagement.updateUser":{capName:"user-management",capScope:"system",addonId:null,access:"create"},"userManagement.validateApiKey":{capName:"user-management",capScope:"system",addonId:null,access:"view"},"userManagement.validateCredentials":{capName:"user-management",capScope:"system",addonId:null,access:"view"},"userManagement.validateScopedToken":{capName:"user-management",capScope:"system",addonId:null,access:"view"},"userManagement.verifyTotp":{capName:"user-management",capScope:"system",addonId:null,access:"view"},"userPasskeys.beginAuthentication":{capName:"user-passkeys",capScope:"system",addonId:null,access:"view"},"userPasskeys.beginRegistration":{capName:"user-passkeys",capScope:"system",addonId:null,access:"create"},"userPasskeys.finishAuthentication":{capName:"user-passkeys",capScope:"system",addonId:null,access:"view"},"userPasskeys.finishRegistration":{capName:"user-passkeys",capScope:"system",addonId:null,access:"create"},"userPasskeys.listPasskeys":{capName:"user-passkeys",capScope:"system",addonId:null,access:"view"},"userPasskeys.removePasskey":{capName:"user-passkeys",capScope:"system",addonId:null,access:"delete"},"webrtc.closeSession":{capName:"webrtc",capScope:"system",addonId:null,access:"create"},"webrtc.createSession":{capName:"webrtc",capScope:"system",addonId:null,access:"create"},"webrtc.handleAnswer":{capName:"webrtc",capScope:"system",addonId:null,access:"create"},"webrtc.handleOffer":{capName:"webrtc",capScope:"system",addonId:null,access:"create"},"webrtc.hasAdaptiveBitrate":{capName:"webrtc",capScope:"system",addonId:null,access:"view"},"webrtc.registerStream":{capName:"webrtc",capScope:"system",addonId:null,access:"create"},"webrtc.supportsStream":{capName:"webrtc",capScope:"system",addonId:null,access:"view"},"webrtc.unregisterStream":{capName:"webrtc",capScope:"system",addonId:null,access:"delete"},"webrtcSession.closeSession":{capName:"webrtc-session",capScope:"device",addonId:null,access:"create"},"webrtcSession.createSession":{capName:"webrtc-session",capScope:"device",addonId:null,access:"create"},"webrtcSession.handleAnswer":{capName:"webrtc-session",capScope:"device",addonId:null,access:"create"},"webrtcSession.handleOffer":{capName:"webrtc-session",capScope:"device",addonId:null,access:"create"},"webrtcSession.hasAdaptiveBitrate":{capName:"webrtc-session",capScope:"device",addonId:null,access:"view"},"webrtcSession.listStreams":{capName:"webrtc-session",capScope:"device",addonId:null,access:"view"},"zoneAnalytics.getCameraHistory":{capName:"zone-analytics",capScope:"device",addonId:null,access:"view"},"zoneAnalytics.getCurrentSnapshot":{capName:"zone-analytics",capScope:"device",addonId:null,access:"view"},"zoneAnalytics.getUnzonedHistory":{capName:"zone-analytics",capScope:"device",addonId:null,access:"view"},"zoneAnalytics.getZoneHistory":{capName:"zone-analytics",capScope:"device",addonId:null,access:"view"},"zoneRules.listRules":{capName:"zone-rules",capScope:"device",addonId:null,access:"view"},"zoneRules.setRules":{capName:"zone-rules",capScope:"device",addonId:null,access:"create"},"zones.addZone":{capName:"zones",capScope:"device",addonId:null,access:"create"},"zones.listZones":{capName:"zones",capScope:"device",addonId:null,access:"view"},"zones.removeZone":{capName:"zones",capScope:"device",addonId:null,access:"delete"},"zones.updateZone":{capName:"zones",capScope:"device",addonId:null,access:"create"}}),Da=["addon-pages","addon-pages-source","addon-routes","addon-settings","addon-widgets","addon-widgets-source","addons","admin-ui","advanced-notifier","alerts","audio-analysis","audio-analyzer","audio-codec","audio-metrics","auth-provider","backup","brightness","camera-credentials","camera-streams","decoder","device-discovery","device-export","device-manager","device-ops","device-provider","device-state","embedding-encoder","events","integrations","intercom","local-network","log-destination","mesh-network","metrics-provider","motion","motion-detection","motion-trigger","motion-zones","mqtt-broker","network-access","network-quality","nodes","notification-output","oauth-integration","osd","pipeline-analytics","pipeline-executor","pipeline-orchestrator","pipeline-runner","platform-probe","ptz","ptz-autotrack","reboot","recording","recording-engine","restreamer","settings-store","smtp-provider","snapshot","snapshot-provider","sso-bridge","storage","storage-provider","stream-broker","stream-params","streaming-engine","switch","system","toast","turn-provider","user-management","user-passkeys","webrtc","webrtc-session","zone-analytics","zone-rules","zones"],Ea=["audio-analysis","audio-metrics","brightness","camera-credentials","camera-streams","device-discovery","device-ops","events","intercom","motion","motion-detection","motion-trigger","motion-zones","osd","pipeline-analytics","ptz","ptz-autotrack","reboot","recording","snapshot","stream-params","switch","webrtc-session","zone-analytics","zone-rules","zones"],Ma=["addon-pages","addon-pages-source","addon-routes","addon-settings","addon-widgets","addon-widgets-source","addons","admin-ui","advanced-notifier","alerts","audio-analyzer","audio-codec","auth-provider","backup","decoder","device-export","device-manager","device-provider","device-state","embedding-encoder","integrations","local-network","log-destination","mesh-network","metrics-provider","mqtt-broker","network-access","network-quality","nodes","notification-output","oauth-integration","pipeline-executor","pipeline-orchestrator","pipeline-runner","platform-probe","recording-engine","restreamer","settings-store","smtp-provider","snapshot-provider","sso-bridge","storage","storage-provider","stream-broker","streaming-engine","system","toast","turn-provider","user-management","user-passkeys","webrtc"],Ra=[{id:"camera-viewer",label:"Camera viewer",description:"Read-only over every device — live streams, recordings, motion events, battery state. Combine with `allowedDevices` to restrict to specific cameras.",rows:[{type:"category",target:"device",access:["view"]}]},{id:"camera-operator",label:"Camera operator",description:"Everything `camera-viewer` does plus PTZ control, intercom, snapshots and recording start/stop. Cannot delete devices or recordings.",rows:[{type:"category",target:"device",access:["view","create"]}]},{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:"events",access:["view"]},{type:"capability",target:"motion-detection",access:["view"]},{type:"capability",target:"audio-analysis",access:["view"]}]}],Le=Object.freeze({"device-export":"device-export","mesh-network":"mesh","mqtt-broker":"broker","network-access":"ingress","smtp-provider":"email"}),Ta=["device-export","mesh-network","mqtt-broker","network-access","smtp-provider"];function Oa(n){const a=[];for(const[e,c]of Object.entries(Le))c===n&&a.push(e);return a}const qa=[/^user$/i,/^usr$/i,/^username$/i,/^password$/i,/^pwd$/i,/^pass$/i,/^passwd$/i,/^secret$/i,/^token$/i,/^auth$/i,/^auth[_-]?token$/i,/^bearer$/i,/^api[_-]?key$/i,/^access[_-]?token$/i,/^refresh[_-]?token$/i];function Ba(n){return qa.some(a=>a.test(n))}function xa(n){try{const a=new URL(n);let e=!1;(a.username||a.password)&&(a.username="",a.password="",e=!0);for(const c of[...a.searchParams.keys()])Ba(c)&&(a.searchParams.set(c,"***"),e=!0);return e?a.toString():n}catch{return n}}class _a{constructor(a){this.capacity=a,this.items=Array.from({length:a})}items;head=0;tail=0;count=0;get size(){return this.count}push(a){this.items[this.tail]=a,this.tail=(this.tail+1)%this.capacity,this.count<this.capacity?this.count++:this.head=(this.head+1)%this.capacity}drain(a){const e=[],c=Math.min(a,this.count);for(let r=0;r<c;r++)e.push(this.items[this.head]),this.items[this.head]=void 0,this.head=(this.head+1)%this.capacity;return this.count-=c,e}}function za(n,a,e){const c={};for(const r of Object.keys(e))c[r]=p=>n.addons.custom.mutate({addonId:a,action:r,input:p});return c}i.ACCESSORY_LABEL=s.ACCESSORY_LABEL;i.APPLE_SA_TO_MACRO=s.APPLE_SA_TO_MACRO;i.AUDIO_BACKEND_CHOICES=s.AUDIO_BACKEND_CHOICES;i.AUDIO_MACRO_LABELS=s.AUDIO_MACRO_LABELS;i.AccessoriesStatusSchema=s.AccessoriesStatusSchema;i.AccessoryKind=s.AccessoryKind;i.AddBrokerInputSchema=s.AddBrokerInputSchema;i.AddonAutoUpdateSchema=s.AddonAutoUpdateSchema;i.AddonListItemSchema=s.AddonListItemSchema;i.AddonPageDeclarationSchema=s.AddonPageDeclarationSchema;i.AddonPageInfoSchema=s.AddonPageInfoSchema;i.AgentLoadSummarySchema=s.AgentLoadSummarySchema;i.AlertSchema=s.AlertSchema;i.AlertSeveritySchema=s.AlertSeveritySchema;i.AlertSourceSchema=s.AlertSourceSchema;i.AlertStatusSchema=s.AlertStatusSchema;i.ApiKeyRecordSchema=s.ApiKeyRecordSchema;i.ApiKeySummarySchema=s.ApiKeySummarySchema;i.ArchiveEntrySchema=s.ArchiveEntrySchema;i.ArchiveManifestSchema=s.ArchiveManifestSchema;i.AudioAnalysisResultSchema=s.AudioAnalysisResultSchema;i.AudioAnalysisSettingsSchema=s.AudioAnalysisSettingsSchema;i.AudioChunkInputSchema=s.AudioChunkInputSchema;i.AudioClassSummarySchema=s.AudioClassSummarySchema;i.AudioClassificationLabelSchema=s.AudioClassificationLabelSchema;i.AudioClassificationResultSchema=s.AudioClassificationResultSchema;i.AudioCodecInfoSchema=s.AudioCodecInfoSchema;i.AudioDecodeSessionConfigSchema=s.AudioDecodeSessionConfigSchema;i.AudioEncodeSessionConfigSchema=s.AudioEncodeSessionConfigSchema;i.AudioEncodedChunkSchema=s.AudioEncodedChunkSchema;i.AudioEventSchema=s.AudioEventSchema;i.AudioLevelSchema=s.AudioLevelSchema;i.AudioMetricsHistoryPointSchema=s.AudioMetricsHistoryPointSchema;i.AudioMetricsHistorySchema=s.AudioMetricsHistorySchema;i.AudioMetricsSnapshotSchema=s.AudioMetricsSnapshotSchema;i.AudioPcmChunkSchema=s.AudioPcmChunkSchema;i.AuthResultSchema=s.AuthResultSchema;i.AutoUpdateSettingsSchema=s.AutoUpdateSettingsSchema;i.AvailableIntegrationTypeSchema=s.AvailableIntegrationTypeSchema;i.BATTERY_DEVICE_PROFILE=s.BATTERY_DEVICE_PROFILE;i.BackupDestinationInfoSchema=s.BackupDestinationInfoSchema;i.BackupEntrySchema=s.BackupEntrySchema;i.BatteryStatusSchema=s.BatteryStatusSchema;i.BoundingBoxSchema=s.BoundingBoxSchema;i.BrightnessStatusSchema=s.BrightnessStatusSchema;i.BrokerAudioClientSchema=s.BrokerAudioClientSchema;i.BrokerClientsSchema=s.BrokerClientsSchema;i.BrokerConnectionDetailsSchema=s.BrokerConnectionDetailsSchema;i.BrokerDecodedClientSchema=s.BrokerDecodedClientSchema;i.BrokerInfoSchema=s.BrokerInfoSchema;i.BrokerRtspClientSchema=s.BrokerRtspClientSchema;i.BrokerStatsSchema=s.BrokerStatsSchema;i.BrokerStatusSchema=s.BrokerStatusSchema;i.CAM_PROFILE_ORDER=s.CAM_PROFILE_ORDER;i.CamProfileSchema=s.CamProfileSchema;i.CamStreamKindSchema=s.CamStreamKindSchema;i.CamStreamResolutionSchema=s.CamStreamResolutionSchema;i.CameraCredentialsSchema=s.CameraCredentialsSchema;i.CameraCredentialsStatusSchema=s.CameraCredentialsStatusSchema;i.CameraMetricsSchema=s.CameraMetricsSchema;i.CameraMetricsWithDeviceIdSchema=s.CameraMetricsWithDeviceIdSchema;i.CameraStreamSchema=s.CameraStreamSchema;i.CapScopeSchema=s.CapScopeSchema;i.CapabilityBindingsSchema=s.CapabilityBindingsSchema;i.ChargingStatus=s.ChargingStatus;i.ClientNetworkStatsSchema=s.ClientNetworkStatsSchema;i.ClusterAddonNodeDeploymentSchema=s.ClusterAddonNodeDeploymentSchema;i.ClusterAddonStatusEntrySchema=s.ClusterAddonStatusEntrySchema;i.CollectionColumnSchema=s.CollectionColumnSchema;i.CollectionIndexSchema=s.CollectionIndexSchema;i.ConfigEntrySchema=s.ConfigEntrySchema;i.ConfigSectionWithValuesSchema=s.ConfigSectionWithValuesSchema;i.ConfigTabDeclarationSchema=s.ConfigTabDeclarationSchema;i.CreateApiKeyInputSchema=s.CreateApiKeyInputSchema;i.CreateApiKeyResultSchema=s.CreateApiKeyResultSchema;i.CreateIntegrationInputSchema=s.CreateIntegrationInputSchema;i.CreateScopedTokenInputSchema=s.CreateScopedTokenInputSchema;i.CreateScopedTokenResultSchema=s.CreateScopedTokenResultSchema;i.CreateUserInputSchema=s.CreateUserInputSchema;i.CustomActionInputSchema=s.CustomActionInputSchema;i.DEFAULT_AUDIO_ANALYZER_CONFIG=s.DEFAULT_AUDIO_ANALYZER_CONFIG;i.DEFAULT_DECODER_HWACCEL_CONFIG=s.DEFAULT_DECODER_HWACCEL_CONFIG;i.DEVICE_PROFILES=s.DEVICE_PROFILES;i.DEVICE_SETTINGS_CONTRIBUTION_METHODS=s.DEVICE_SETTINGS_CONTRIBUTION_METHODS;i.DEVICE_STATUS_METHOD=s.DEVICE_STATUS_METHOD;i.DecodedAudioChunkSchema=s.DecodedAudioChunkSchema;i.DecodedFrameSchema=s.DecodedFrameSchema;i.DecoderAssignmentSchema=s.DecoderAssignmentSchema;i.DecoderSessionConfigSchema=s.DecoderSessionConfigSchema;i.DecoderStatsSchema=s.DecoderStatsSchema;i.DeleteIntegrationResultSchema=s.DeleteIntegrationResultSchema;i.DetectorOutputSchema=s.DetectorOutputSchema;i.DeviceDiscoveryStatusSchema=s.DeviceDiscoveryStatusSchema;i.DeviceExportExposeInputSchema=s.ExposeInputSchema;i.DeviceExportStatusSchema=s.DeviceExportStatusSchema;i.DeviceExportUnexposeInputSchema=s.UnexposeInputSchema;i.DeviceFeature=s.DeviceFeature;i.DeviceInfoSchema=s.DeviceInfoSchema;i.DeviceNetworkStatsSchema=s.DeviceNetworkStatsSchema;i.DeviceRole=s.DeviceRole;i.DeviceStatusSchema=s.DeviceStatusSchema;i.DeviceType=s.DeviceType;i.DiscoveredChildDeviceSchema=s.DiscoveredChildDeviceSchema;i.DiscoveredChildStatusSchema=s.DiscoveredChildStatusSchema;i.DiscoveredDeviceSchema=s.DiscoveredDeviceSchema;i.DoorbellPressEventSchema=s.DoorbellPressEventSchema;i.DoorbellStatusSchema=s.DoorbellStatusSchema;i.EmbeddingInfoSchema=s.EmbeddingInfoSchema;i.EmbeddingResultSchema=s.EmbeddingResultSchema;i.EncodedPacketSchema=s.EncodedPacketSchema;i.EnrichedWidgetMetadataSchema=s.EnrichedWidgetMetadataSchema;i.EventItemSchema=s.EventItemSchema;i.EventKindSchema=s.EventKindSchema;i.ExportSetupFieldSchema=s.ExportSetupFieldSchema;i.ExportSetupSchema=s.ExportSetupSchema;i.ExposedDeviceSchema=s.ExposedDeviceSchema;i.ExposedResourceSchema=s.ExposedResourceSchema;i.FeatureManifestSchema=s.FeatureManifestSchema;i.FeatureProbeStatusSchema=s.FeatureProbeStatusSchema;i.FrameHandleFormatSchema=s.FrameHandleFormatSchema;i.FrameHandleSchema=s.FrameHandleSchema;i.FrameInputSchema=s.FrameInputSchema;i.GetStreamWithCodecInputSchema=s.GetStreamWithCodecInputSchema;i.GlobalMetricsSchema=s.GlobalMetricsSchema;i.HWACCEL_OPTIONS=s.HWACCEL_OPTIONS;i.HealthStatusSchema=s.HealthStatusSchema;i.HistoryPointSchema=s.HistoryPointSchema;i.HistoryResolutionEnum=s.HistoryResolutionEnum;i.InstalledPackageSchema=s.InstalledPackageSchema;i.IntegrationLiteSchema=s.IntegrationLiteSchema;i.IntegrationWithStateSchema=s.IntegrationWithStateSchema;i.IntercomAbilitySchema=s.IntercomAbilitySchema;i.IntercomStatusSchema=s.IntercomStatusSchema;i.LocationStatSchema=s.LocationStatSchema;i.LogEntrySchema=s.LogEntrySchema;i.LogLevelSchema=s.LogLevelSchema;i.LogStreamEntrySchema=s.LogStreamEntrySchema;i.MODEL_FORMATS=s.MODEL_FORMATS;i.MediaFileSchema=s.MediaFileSchema;i.MeshPeerSchema=s.MeshPeerSchema;i.MeshStatusSchema=s.MeshStatusSchema;i.MethodAccessSchema=s.MethodAccessSchema;i.MotionAnalysisResultSchema=s.MotionAnalysisResultSchema;i.MotionEventSchema=s.MotionEventSchema;i.MotionOnMotionChangedDataSchema=s.MotionOnMotionChangedDataSchema;i.MotionRegionSchema=s.MotionRegionSchema;i.MotionSourceEnum=s.MotionSourceEnum;i.MotionSourcesSchema=s.MotionSourcesSchema;i.MotionStatusSchema=s.MotionStatusSchema;i.MotionTriggerRuntimeStateSchema=s.MotionTriggerRuntimeStateSchema;i.MotionTriggerStatusSchema=s.MotionTriggerStatusSchema;i.MotionZoneOptionsSchema=s.MotionZoneOptionsSchema;i.MotionZonePatchSchema=s.MotionZonePatchSchema;i.MotionZoneStatusSchema=s.MotionZoneStatusSchema;i.MqttBrokerStatusSchema=s.StatusSchema;i.NativeDetectionSchema=s.NativeDetectionSchema;i.NativeObjectClassEnum=s.NativeObjectClassEnum;i.NativeObjectDetectionStatusSchema=s.NativeObjectDetectionStatusSchema;i.NetworkAccessStatusSchema=s.NetworkAccessStatusSchema;i.NetworkAddressSchema=s.NetworkAddressSchema;i.NetworkEndpointSchema=s.NetworkEndpointSchema;i.NotificationHistoryEntrySchema=s.NotificationHistoryEntrySchema;i.NotificationRuleSchema=s.NotificationRuleSchema;i.NotificationSchema=s.NotificationSchema;i.OauthIntegrationDescriptorSchema=s.OauthIntegrationDescriptorSchema;i.ObjectEventSchema=s.ObjectEventSchema;i.OrchestratorMetricsSchema=s.OrchestratorMetricsSchema;i.OsdOverlayKindEnum=s.OsdOverlayKindEnum;i.OsdOverlayPatchSchema=s.OsdOverlayPatchSchema;i.OsdOverlaySchema=s.OsdOverlaySchema;i.OsdPositionEnum=s.OsdPositionEnum;i.OsdStatusSchema=s.OsdStatusSchema;i.PIPELINE_FLOW_CAPABILITY_NAMES=s.PIPELINE_FLOW_CAPABILITY_NAMES;i.PIPELINE_OWNER_CAPABILITY_NAMES=s.PIPELINE_OWNER_CAPABILITY_NAMES;i.PackageUpdateSchema=s.PackageUpdateSchema;i.PackageVersionInfoSchema=s.PackageVersionInfoSchema;i.PasskeySummarySchema=s.PasskeySummarySchema;i.PcmSampleFormatSchema=s.PcmSampleFormatSchema;i.PerScopeBreakdownSchema=s.PerScopeBreakdownSchema;i.PipelineAssignmentSchema=s.PipelineAssignmentSchema;i.PipelineDefaultStepSchema=s.PipelineDefaultStepSchema;i.PipelineEngineChoiceSchema=s.PipelineEngineChoiceSchema;i.PipelineRunResultBridge=s.PipelineRunResultBridge;i.PipelineStepInputSchema=s.PipelineStepInputSchema;i.PlaceholderReasonSchema=s.PlaceholderReasonSchema;i.PolygonPointSchema=s.PolygonPointSchema;i.ProfileSlotSchema=s.ProfileSlotSchema;i.ProfileSlotStatusSchema=s.ProfileSlotStatusSchema;i.ProviderStatusSchema=s.ProviderStatusSchema;i.PtzAutotrackRuntimeStateSchema=s.PtzAutotrackRuntimeStateSchema;i.PtzAutotrackSettingsSchema=s.PtzAutotrackSettingsSchema;i.PtzAutotrackStatusSchema=s.PtzAutotrackStatusSchema;i.PtzAutotrackTargetOptionSchema=s.PtzAutotrackTargetOptionSchema;i.PtzMoveCommandSchema=s.PtzMoveCommandSchema;i.PtzPositionSchema=s.PtzPositionSchema;i.PtzPresetSchema=s.PtzPresetSchema;i.PtzStatusSchema=s.PtzStatusSchema;i.QueryFilterSchema=s.QueryFilterSchema;i.RegisteredStreamSchema=s.RegisteredStreamSchema;i.ReportMotionInputSchema=s.ReportMotionInputSchema;i.RtpSourceSchema=s.RtpSourceSchema;i.RtspRestreamEntrySchema=s.RtspRestreamEntrySchema;i.RunnerCameraConfigSchema=s.RunnerCameraConfigSchema;i.RunnerCameraDeviceUIFields=s.RunnerCameraDeviceUIFields;i.RunnerLocalLoadSchema=s.RunnerLocalLoadSchema;i.RunnerLocalMetricsSchema=s.RunnerLocalMetricsSchema;i.STORAGE_LOCATION_CARDINALITY=s.STORAGE_LOCATION_CARDINALITY;i.ScopedTokenSchema=s.ScopedTokenSchema;i.ScopedTokenSummarySchema=s.ScopedTokenSummarySchema;i.SearchResultSchema=s.SearchResultSchema;i.SegmentSchema=s.SegmentSchema;i.SendEmailInputSchema=s.SendEmailInputSchema;i.SendEmailResultSchema=s.SendEmailResultSchema;i.SettingsPatchSchema=s.SettingsPatchSchema;i.SettingsRecordSchema=s.SettingsRecordSchema;i.SettingsSchemaWithValuesSchema=s.SettingsSchemaWithValuesSchema;i.SettingsUpdateResultSchema=s.SettingsUpdateResultSchema;i.ShmRingStatsSchema=s.ShmRingStatsSchema;i.SmtpStatusSchema=s.SmtpStatusSchema;i.SnapshotImageSchema=s.SnapshotImageSchema;i.SpatialDetectionSchema=s.SpatialDetectionSchema;i.SsoBridgeClaimsSchema=s.SsoBridgeClaimsSchema;i.StartEmbeddedInputSchema=s.StartEmbeddedInputSchema;i.StorageAbortUploadInputSchema=s.AbortUploadInputSchema;i.StorageBeginDownloadInputSchema=s.BeginDownloadInputSchema;i.StorageBeginDownloadResultSchema=s.BeginDownloadResultSchema;i.StorageBeginUploadInputSchema=s.BeginUploadInputSchema;i.StorageBeginUploadResultSchema=s.BeginUploadResultSchema;i.StorageEndDownloadInputSchema=s.EndDownloadInputSchema;i.StorageFinalizeUploadInputSchema=s.FinalizeUploadInputSchema;i.StorageLocationRefSchema=s.StorageLocationRefSchema;i.StorageLocationSchema=s.StorageLocationSchema;i.StorageLocationTypeSchema=s.StorageLocationTypeSchema;i.StorageProviderInfoSchema=s.ProviderInfoSchema;i.StorageReadChunkInputSchema=s.ReadChunkInputSchema;i.StorageTestLocationResultSchema=s.TestLocationResultSchema;i.StorageWriteChunkInputSchema=s.WriteChunkInputSchema;i.StreamFormatSchema=s.StreamFormatSchema;i.StreamInfoSchema=s.StreamInfoSchema;i.StreamNetworkStatsSchema=s.StreamNetworkStatsSchema;i.StreamParamsOptionsSchema=s.StreamParamsOptionsSchema;i.StreamParamsStatusSchema=s.StreamParamsStatusSchema;i.StreamProfileConfigSchema=s.StreamProfileConfigSchema;i.StreamProfileOptionsSchema=s.StreamProfileOptionsSchema;i.StreamProfilePatchSchema=s.StreamProfilePatchSchema;i.StreamProfileSchema=s.StreamProfileSchema;i.StreamSourceEntrySchema=s.StreamSourceEntrySchema;i.StreamSourceSchema=s.StreamSourceSchema;i.SubscribeAudioChunksInputSchema=s.SubscribeAudioChunksInputSchema;i.SubscribeAudioChunksResultSchema=s.SubscribeAudioChunksResultSchema;i.SubscribeFramesInputSchema=s.SubscribeFramesInputSchema;i.SubscribeFramesResultSchema=s.SubscribeFramesResultSchema;i.SwitchStatusSchema=s.SwitchStatusSchema;i.SystemMetricsSchema=s.SystemMetricsSchema;i.TestConnectionResultSchema=s.TestConnectionResultSchema;i.ToastSchema=s.ToastSchema;i.TokenScopeSchema=s.TokenScopeSchema;i.TopologyNodeSchema=s.TopologyNodeSchema;i.TopologyProcessSchema=s.TopologyProcessSchema;i.TopologyServiceSchema=s.TopologyServiceSchema;i.TrackSchema=s.TrackSchema;i.TrackStateSchema=s.TrackStateSchema;i.TrackedDetectionSchema=s.TrackedDetectionSchema;i.TurnServerSchema=s.TurnServerSchema;i.UpdateIntegrationInputSchema=s.UpdateIntegrationInputSchema;i.UpdateUserInputSchema=s.UpdateUserInputSchema;i.UserRecordSchema=s.UserRecordSchema;i.UserSummarySchema=s.UserSummarySchema;i.WELL_KNOWN_TABS=s.WELL_KNOWN_TABS;i.WELL_KNOWN_TAB_MAP=s.WELL_KNOWN_TAB_MAP;i.WebrtcStreamChoiceSchema=s.WebrtcStreamChoiceSchema;i.WebrtcStreamTargetSchema=s.WebrtcStreamTargetSchema;i.WidgetHostEnum=s.WidgetHostEnum;i.WidgetMetadataSchema=s.WidgetMetadataSchema;i.WidgetRemoteSchema=s.WidgetRemoteSchema;i.WidgetSizeEnum=s.WidgetSizeEnum;i.YAMNET_TO_MACRO=s.YAMNET_TO_MACRO;i.ZoneKindEnum=s.ZoneKindEnum;i.ZoneRuleModeEnum=s.ZoneRuleModeEnum;i.ZoneRuleSchema=s.ZoneRuleSchema;i.ZoneRuleStageEnum=s.ZoneRuleStageEnum;i.ZoneRulesArraySchema=s.ZoneRulesArraySchema;i.ZoneSchema=s.ZoneSchema;i.ZoneScopeBreakdownSchema=s.ZoneScopeBreakdownSchema;i.accessoriesCapability=s.accessoriesCapability;i.accessoryStableId=s.accessoryStableId;i.addonPagesCapability=s.addonPagesCapability;i.addonPagesSourceCapability=s.addonPagesSourceCapability;i.addonRoutesCapability=s.addonRoutesCapability;i.addonSettingsCapability=s.addonSettingsCapability;i.addonWidgetsCapability=s.addonWidgetsCapability;i.addonWidgetsSourceCapability=s.addonWidgetsSourceCapability;i.addonsCapability=s.addonsCapability;i.adminUiCapability=s.adminUiCapability;i.advancedNotifierCapability=s.advancedNotifierCapability;i.alertsCapability=s.alertsCapability;i.audioAnalysisCapability=s.audioAnalysisCapability;i.audioAnalyzerCapability=s.audioAnalyzerCapability;i.audioCodecCapability=s.audioCodecCapability;i.audioMetricsCapability=s.audioMetricsCapability;i.authProviderCapability=s.authProviderCapability;i.backupCapability=s.backupCapability;i.batteryCapability=s.batteryCapability;i.brightnessCapability=s.brightnessCapability;i.cameraCredentialsCapability=s.cameraCredentialsCapability;i.cameraStreamsCapability=s.cameraStreamsCapability;i.decoderCapability=s.decoderCapability;i.detectionPipelineCapability=s.detectionPipelineCapability;i.deviceDiscoveryCapability=s.deviceDiscoveryCapability;i.deviceExportCapability=s.deviceExportCapability;i.deviceManagerCapability=s.deviceManagerCapability;i.deviceMatchesProfile=s.deviceMatchesProfile;i.deviceOpsCapability=s.deviceOpsCapability;i.deviceProviderCapability=s.deviceProviderCapability;i.deviceStateCapability=s.deviceStateCapability;i.deviceStatusCapability=s.deviceStatusCapability;i.doorbellCapability=s.doorbellCapability;i.embeddingEncoderCapability=s.embeddingEncoderCapability;i.errMsg=s.errMsg;i.event=s.event;i.eventsCapability=s.eventsCapability;i.expandCapMethods=s.expandCapMethods;i.featureProbeCapability=s.featureProbeCapability;i.getAudioMacroClassIds=s.getAudioMacroClassIds;i.hydrateSchema=s.hydrateSchema;i.integrationsCapability=s.integrationsCapability;i.intercomCapability=s.intercomCapability;i.isDeviceConfigCap=s.isDeviceConfigCap;i.localNetworkCapability=s.localNetworkCapability;i.logDestinationCapability=s.logDestinationCapability;i.mapAudioLabelToMacro=s.mapAudioLabelToMacro;i.meshNetworkCapability=s.meshNetworkCapability;i.method=s.method;i.metricsProviderCapability=s.metricsProviderCapability;i.motionCapability=s.motionCapability;i.motionDetectionCapability=s.motionDetectionCapability;i.motionTriggerCapability=s.motionTriggerCapability;i.motionZonesCapability=s.motionZonesCapability;i.mqttBrokerCapability=s.mqttBrokerCapability;i.nativeObjectDetectionCapability=s.nativeObjectDetectionCapability;i.networkAccessCapability=s.networkAccessCapability;i.networkQualityCapability=s.networkQualityCapability;i.nodesCapability=s.nodesCapability;i.notificationOutputCapability=s.notificationOutputCapability;i.oauthIntegrationCapability=s.oauthIntegrationCapability;i.osdCapability=s.osdCapability;i.pipelineAnalyticsCapability=s.pipelineAnalyticsCapability;i.pipelineExecutorCapability=s.pipelineExecutorCapability;i.pipelineOrchestratorCapability=s.pipelineOrchestratorCapability;i.pipelineRunnerCapability=s.pipelineRunnerCapability;i.platformProbeCapability=s.platformProbeCapability;i.ptzAutotrackCapability=s.ptzAutotrackCapability;i.ptzCapability=s.ptzCapability;i.rebootCapability=s.rebootCapability;i.recordingCapability=s.recordingCapability;i.recordingEngineCapability=s.recordingEngineCapability;i.resolveDeviceProfile=s.resolveDeviceProfile;i.restreamerCapability=s.restreamerCapability;i.settingsStoreCapability=s.settingsStoreCapability;i.smtpProviderCapability=s.smtpProviderCapability;i.snapshotCapability=s.snapshotCapability;i.snapshotProviderCapability=s.snapshotProviderCapability;i.ssoBridgeCapability=s.ssoBridgeCapability;i.storageCapability=s.storageCapability;i.storageProviderCapability=s.storageProviderCapability;i.streamBrokerCapability=s.streamBrokerCapability;i.streamParamsCapability=s.streamParamsCapability;i.streamingEngineCapability=s.streamingEngineCapability;i.switchCapability=s.switchCapability;i.systemCapability=s.systemCapability;i.toastCapability=s.toastCapability;i.turnProviderCapability=s.turnProviderCapability;i.userManagementCapability=s.userManagementCapability;i.userPasskeysCapability=s.userPasskeysCapability;i.webrtcCapability=s.webrtcCapability;i.webrtcClientHintsSchema=s.webrtcClientHintsSchema;i.webrtcSessionCapability=s.webrtcSessionCapability;i.zoneAnalyticsCapability=s.zoneAnalyticsCapability;i.zoneRulesCapability=s.zoneRulesCapability;i.zonesCapability=s.zonesCapability;i.ALL_CAPABILITY_DEFINITIONS=Aa;i.BACKEND_TO_FORMAT=Q;i.BaseAddon=Ce;i.BaseDevice=Qt;i.BaseDeviceProvider=Jt;i.CAPABILITY_NAMES=wa;i.CAPABILITY_ROUTER_KEYS=ka;i.CAP_NAMES_WITH_STATUS=Na;i.CAP_PROVIDER_KIND_MAP=Le;i.COCO_80_LABELS=Ht;i.COCO_TO_MACRO=Zt;i.DEFAULT_ADDON_PLACEMENT=be;i.DEFAULT_FEATURES=bt;i.DEFAULT_LOCATION_SUBDIRS=mt;i.DEFAULT_RETENTION=wt;i.DEVICE_CAP_NAMES=Ea;i.DEVICE_TYPE_INFO=Gt;i.DeviceConfig=E;i.DeviceRuntimeState=H;i.DisposerChain=Qe;i.ElementConfigStore=qt;i.EventCategory=B;i.EventSourceType=De;i.HF_BASE_URL=kt;i.HF_REPO=Ee;i.KNOWN_CAP_NAMES=Da;i.MACRO_LABELS=Kt;i.METHOD_ACCESS_MAP=Pa;i.PROVIDER_KIND_CAP_NAMES=Ta;i.PYTHON_SCRIPT=Te;i.RECOGNITION_TYPES=Ct;i.RUNTIME_DEFAULTS=At;i.RUNTIME_TO_FORMAT=Re;i.ReadinessRegistry=rt;i.ReadinessTimeoutError=ke;i.RingBuffer=_a;i.SCOPE_PRESETS=Ra;i.STORAGE_LOCATION_TYPES=lt;i.STREAM_PROFILE_META=ze;i.STREAM_QUALITY_LABELS=Ae;i.SUB_DETECTION_TYPES=It;i.SYSTEM_CAP_NAMES=Ma;i.SystemMirror=ha;i.asBoolean=Et;i.asJsonArray=Nt;i.asJsonObject=Me;i.asNumber=Dt;i.asString=Pt;i.autoAssignProfiles=ft;i.bindAddonActions=za;i.buildAddonRouteProvider=it;i.buildStreamParamsConfigSchema=Ia;i.classifyStream=gt;i.classifyStreams=Pe;i.cosineSimilarity=Ot;i.createDeviceProxy=_e;i.createEvent=V;i.createLazyTrpcSource=J;i.createMirrorSource=xe;i.createRuntimeStateBridge=Vt;i.createSliceHandle=y;i.createSystemProxy=pa;i.customAction=fa;i.defineCustomActions=va;i.emitDownForOwnedCaps=pt;i.emitReadiness=Ie;i.evaluateZoneRules=ra;i.formatForBackend=zt;i.formatForRuntime=Lt;i.getCapsByProviderKind=Oa;i.hfModelUrl=Tt;i.isAgentOnlyPlacement=Xe;i.isDeployableToAgent=Je;i.isEvent=st;i.maskUrlCredentials=xa;i.normalizeAddonInitResult=we;i.parseCameraStreamConfig=vt;i.parseJsonArray=Rt;i.parseJsonObject=Mt;i.parseJsonUnknown=Y;i.parseStreamParamsFormPatch=Ca;i.pythonScriptForBackend=Ft;i.readinessKey=$;i.requiresPython=Ut;i.resolveAddonExecution=_;i.resolveAddonGroup=et;i.resolveAddonPlacement=at;i.resolveAddonRuntime=_t;i.resolveDetectionRuntime=Oe;i.resolveModelFormat=xt;i.resolveRunnerId=tt;i.runInferenceStep=$t;i.scopeKey=D;i.streamPixels=Ne;i.streamQualityLabel=ut;i.toDeviceSummary=qe;i.toStreamSourceEntry=St;i.zodEntriesToConfigUI=Xt});export default La();
|