@camstack/addon-admin-ui 1.2.164 → 1.2.165

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.
Files changed (110) hide show
  1. package/dist/assets/{AddonCollectionPage-Dkw_Gdq3.js → AddonCollectionPage-CNo_lV3Z.js} +1 -1
  2. package/dist/assets/{Addons-dRF-5FmP.js → Addons-BwQltart.js} +1 -1
  3. package/dist/assets/{AdminTabs-CM5gAHj3.js → AdminTabs-Do-U1F__.js} +1 -1
  4. package/dist/assets/{AiProfiles-CqYocjTo.js → AiProfiles-FPKDVoNP.js} +1 -1
  5. package/dist/assets/{BrokerForm-p3IuI5bF.js → BrokerForm-9h0ZO8YS.js} +1 -1
  6. package/dist/assets/{Build-D6-t2Jgd.js → Build-BSW9Um6X.js} +1 -1
  7. package/dist/assets/{Capabilities-DzOXNwwD.js → Capabilities-DHaD8iQF.js} +1 -1
  8. package/dist/assets/{CapabilityBadges-DrFfgb4S.js → CapabilityBadges-DaUkCypm.js} +1 -1
  9. package/dist/assets/{Cluster-BzJE-zkJ.js → Cluster-Ce5Q_Ggq.js} +1 -1
  10. package/dist/assets/{Data-BDuBPAZP.js → Data-BKv1773c.js} +1 -1
  11. package/dist/assets/{DetectionIntelligence-LXyGHNBm.js → DetectionIntelligence-BxBLaQz8.js} +1 -1
  12. package/dist/assets/{DeviceAggregateSection-UizbQHXz.js → DeviceAggregateSection-D6yshLlg.js} +1 -1
  13. package/dist/assets/{DeviceDetail-BrMRzhh3.js → DeviceDetail-zIwQj7-2.js} +1 -1
  14. package/dist/assets/{Devices-BuSfcnTv.js → Devices-DV-1VlJx.js} +1 -1
  15. package/dist/assets/{EmbedPlayerPage-BqnzuuJJ.js → EmbedPlayerPage-D7N32vP7.js} +1 -1
  16. package/dist/assets/{Events-fiNVDF7V.js → Events-D45dq2Wl.js} +1 -1
  17. package/dist/assets/{FormBuilder-CB73ijlw.js → FormBuilder-A8zhYcZX.js} +1 -1
  18. package/dist/assets/{Identity-CJs6eh1J.js → Identity-54WUvX3j.js} +1 -1
  19. package/dist/assets/{IntegrationDetail-2LT08GOt.js → IntegrationDetail-DTf_JdAu.js} +1 -1
  20. package/dist/assets/{Integrations-BBNsoj5h.js → Integrations-CJY683Nv.js} +1 -1
  21. package/dist/assets/{Integrations-tCBfwu_-.js → Integrations-my1-PzP5.js} +1 -1
  22. package/dist/assets/{Locations-Pv3wxVNV.js → Locations-BirX1tbD.js} +1 -1
  23. package/dist/assets/{Logs-Bt2jENO9.js → Logs-D1-1XAyN.js} +1 -1
  24. package/dist/assets/{MotionZonesSettings-DbAzh16t.js → MotionZonesSettings-C1bLBEli.js} +1 -1
  25. package/dist/assets/{MyAccess-DSLg2lid.js → MyAccess-CYZF22OD.js} +1 -1
  26. package/dist/assets/{Network-DoGMP-Zy.js → Network-D-VdmBTH.js} +1 -1
  27. package/dist/assets/{NodeAddonsSettingsPanel-Bm5lkzr_.js → NodeAddonsSettingsPanel-DILvxdXo.js} +1 -1
  28. package/dist/assets/{NodeInferenceDevices-yuVA78mx.js → NodeInferenceDevices-wMWd1Q4b.js} +1 -1
  29. package/dist/assets/{Notifications-DwL3_mci.js → Notifications-CqhV4Nj0.js} +1 -1
  30. package/dist/assets/{Pipeline-1cJSh9yX.js → Pipeline-BHuBKt90.js} +1 -1
  31. package/dist/assets/{Plates-CXjswkG7.js → Plates-D6x77BHk.js} +1 -1
  32. package/dist/assets/{PrivacyMaskSettings-DAUFZ6wz.js → PrivacyMaskSettings-BPlPqXkS.js} +1 -1
  33. package/dist/assets/{ProviderIcon-DU1thxXy.js → ProviderIcon-BpvbQKUJ.js} +1 -1
  34. package/dist/assets/{Recordings-CUfCWKay.js → Recordings-B5V42ZV5.js} +1 -1
  35. package/dist/assets/{ScanNetworkModal-6W2FViYX.js → ScanNetworkModal-BzeZClBF.js} +1 -1
  36. package/dist/assets/{SceneMonitorEditor-PVPsicEf.js → SceneMonitorEditor-BVYlC6CJ.js} +1 -1
  37. package/dist/assets/{Scenes-CXJ5LRm_.js → Scenes-ID516L1Z.js} +1 -1
  38. package/dist/assets/{Settings-C6GWTx6h.js → Settings-C2-ZuU_5.js} +1 -1
  39. package/dist/assets/{Showroom-Cgke37uK.js → Showroom-DQLnMH3m.js} +1 -1
  40. package/dist/assets/{StorageLocationsPanel-Bk_1Jtij.js → StorageLocationsPanel-Cxn5RTY-.js} +1 -1
  41. package/dist/assets/{Terminal-ByKxRR48.js → Terminal-CWnKDQvT.js} +1 -1
  42. package/dist/assets/{_virtual_mf-localSharedImportMap___mfe_internal__admin_ui_host-BIxwxeXV.js → _virtual_mf-localSharedImportMap___mfe_internal__admin_ui_host-CVlIK8dd.js} +1 -1
  43. package/dist/assets/{authed-media-H0voTu7M.js → authed-media-OPVMfM7-.js} +1 -1
  44. package/dist/assets/{bell-off-DiIlkzVK.js → bell-off--5p9Fybs.js} +1 -1
  45. package/dist/assets/{bell-ring-Cf2-w8rW.js → bell-ring-55I9D5Sr.js} +1 -1
  46. package/dist/assets/{boxes-BH6sfrGV.js → boxes-irya0jxX.js} +1 -1
  47. package/dist/assets/circle-check-big-BxeyzDUd.js +1 -0
  48. package/dist/assets/circle-dot-CVP47hcz.js +1 -0
  49. package/dist/assets/circle-slash-CYfvIYWg.js +1 -0
  50. package/dist/assets/{circle-x-D4pWWaTd.js → circle-x-VgFvLEB8.js} +1 -1
  51. package/dist/assets/clock-CAWrpFrg.js +1 -0
  52. package/dist/assets/{copy-M5uL-Y2G.js → copy-B5KNHr2h.js} +1 -1
  53. package/dist/assets/{debounced-invalidate-rjQUUgms.js → debounced-invalidate-4rBkn4WS.js} +1 -1
  54. package/dist/assets/{dist-BUkDp1q9.js → dist-BFzAj5_r.js} +1 -1
  55. package/dist/assets/{dist-DnSj1S0J.js → dist-CNqmKKYr.js} +1 -1
  56. package/dist/assets/{download-BrxHUueR.js → download-ClCdQbh3.js} +1 -1
  57. package/dist/assets/{face-bbox-OLndRPS5.js → face-bbox-UgUCffF_.js} +1 -1
  58. package/dist/assets/{flame-CQKX8lvQ.js → flame--OZ53Cuk.js} +1 -1
  59. package/dist/assets/{format-size-B0-TTn9Z.js → format-size-BHvPMK8K.js} +1 -1
  60. package/dist/assets/{hard-drive-DuK2CqxL.js → hard-drive-JzxuyLzv.js} +1 -1
  61. package/dist/assets/{hostInit-DBSKfSb9.js → hostInit-COPoL889.js} +1 -1
  62. package/dist/assets/{index-Bd4F4KZw.js → index-DueHxOqG.js} +3 -3
  63. package/dist/assets/{key-round-DFO8LyFt.js → key-round-DNug-4Y5.js} +1 -1
  64. package/dist/assets/{layers-BoYyKCDe.js → layers-BNrDJv8N.js} +1 -1
  65. package/dist/assets/{location-owned-usage-VErF0ovC.js → location-owned-usage-DioAVaom.js} +1 -1
  66. package/dist/assets/{mf-entry-bootstrap-0-2a172b10.js → mf-entry-bootstrap-0-70a4f2d5.js} +2 -2
  67. package/dist/assets/{pencil-BFLbnMTZ.js → pencil-D3iw87hC.js} +1 -1
  68. package/dist/assets/play-AqVPtprK.js +1 -0
  69. package/dist/assets/{player-overlays-jCIm4d2Z.js → player-overlays-C5MRtuIg.js} +1 -1
  70. package/dist/assets/plus-v8p0zBZk.js +1 -0
  71. package/dist/assets/power-kI4NrjWR.js +1 -0
  72. package/dist/assets/{radio-D2WCsnVt.js → radio-CDbeUigr.js} +1 -1
  73. package/dist/assets/{refresh-cw-BFPIudS2.js → refresh-cw-Db0ey18G.js} +1 -1
  74. package/dist/assets/remoteEntry-DUHVjaqi.js +1 -0
  75. package/dist/assets/rotate-ccw-Bu30_YZp.js +1 -0
  76. package/dist/assets/rotate-cw-ByhQpcVv.js +1 -0
  77. package/dist/assets/{send-BAGKIhPj.js → send-Bsj1taBk.js} +1 -1
  78. package/dist/assets/{server-Dr1C89l2.js → server-BF2W_h1Y.js} +1 -1
  79. package/dist/assets/{shield-alert-D9_xkjCv.js → shield-alert-B-YAVGOq.js} +1 -1
  80. package/dist/assets/{shield-BA9otlof.js → shield-y9Hkduw1.js} +1 -1
  81. package/dist/assets/square-DmEiPrW_.js +1 -0
  82. package/dist/assets/{square-check-big-BMQyaAFl.js → square-check-big-DqfkUAG4.js} +1 -1
  83. package/dist/assets/{src-BurbTgHr.js → src-B9H5089T.js} +3 -3
  84. package/dist/assets/src-Bf8vCrUd.js +349 -0
  85. package/dist/assets/{undo-2-jy2tdvZx.js → undo-2-MnO_tnRi.js} +1 -1
  86. package/dist/assets/{use-scenes-feed-DOkswLPM.js → use-scenes-feed-y8qznUn-.js} +1 -1
  87. package/dist/assets/useEventInvalidation-C4vyVLJY.js +1 -0
  88. package/dist/assets/{useNodeUrlSelection-CCu6rVIb.js → useNodeUrlSelection-BwMlrDgK.js} +1 -1
  89. package/dist/assets/user-round-DcY4MC_d.js +1 -0
  90. package/dist/assets/{video-BqC9unnc.js → video-B_Uibsjj.js} +1 -1
  91. package/dist/assets/{virtual_mf-REMOTE_ENTRY_ID___mfe_internal__admin_ui_host__remoteEntry-_hash_--hiLzLBb.js → virtual_mf-REMOTE_ENTRY_ID___mfe_internal__admin_ui_host__remoteEntry-_hash_-BeFbR3qm.js} +2 -2
  92. package/dist/assets/{wifi-CwmZQMHu.js → wifi-BW-1gv2a.js} +1 -1
  93. package/dist/assets/{zap-B4yqj-3u.js → zap-C1C68IxQ.js} +1 -1
  94. package/dist/index.html +5 -5
  95. package/dist/server/addon.js +20 -3
  96. package/package.json +1 -1
  97. package/dist/assets/circle-check-big-Bhmzr7Ys.js +0 -1
  98. package/dist/assets/circle-dot-DKg8YPU7.js +0 -1
  99. package/dist/assets/circle-slash-BDtVMoE2.js +0 -1
  100. package/dist/assets/clock-DlkmcyH3.js +0 -1
  101. package/dist/assets/play-CdksQ1o6.js +0 -1
  102. package/dist/assets/plus-IFGFoQQS.js +0 -1
  103. package/dist/assets/power-VkXvsNF7.js +0 -1
  104. package/dist/assets/remoteEntry-CetTBajg.js +0 -1
  105. package/dist/assets/rotate-ccw-BgyQVUnR.js +0 -1
  106. package/dist/assets/rotate-cw-BrrNPgzP.js +0 -1
  107. package/dist/assets/square-DH4ZehoC.js +0 -1
  108. package/dist/assets/src-DSOXw8KA.js +0 -349
  109. package/dist/assets/useEventInvalidation-xE7MyVTv.js +0 -1
  110. package/dist/assets/user-round-D3F0r2tQ.js +0 -1
@@ -342,7 +342,7 @@ ${r.triggers.map((e,t)=>Nc(e,t)).join(`
342
342
  for (const dispose of disposers) dispose()
343
343
  }
344
344
  }
345
- `}var Ic=i({id:g(),label:g(),icon:g(),path:g(),remoteName:g(),bundle:g(),section:g().optional(),sectionLabel:g().optional()}),Lc=i({addonId:g(),page:Ic,bundleUrl:g()}),Rc={name:`addon-pages`,scope:`system`,mode:`singleton`,methods:{listPages:T(h(),p(Lc).readonly())}},zc=i({id:g(),label:g(),icon:g(),path:g(),remoteName:g(),bundle:g(),section:g().optional(),sectionLabel:g().optional()}),Bc={name:`addon-pages-source`,scope:`system`,mode:`collection`,internal:!0,methods:{listPages:T(h(),p(zc).readonly(),{auth:`admin`})}},Vc=i({method:m([`GET`,`POST`,`PUT`,`DELETE`,`PATCH`]),path:g(),access:m([`public`,`authenticated`,`admin`]).optional(),description:g().optional()}),Hc=i({method:g(),path:g(),params:n(g(),g()),query:n(g(),g()),body:u(),headers:n(g(),g()),user:i({id:g(),username:g(),isAdmin:v()}).optional(),scopedToken:u().optional()}),Uc=i({status:a().int(),headers:n(g(),g()),redirectUrl:g().nullable(),body:u().optional(),contentType:g().optional()}),Wc={name:`addon-routes`,scope:`system`,mode:`collection`,internal:!0,methods:{getRoutes:T(h(),p(Vc)),invoke:T(Hc,Uc,{kind:`mutation`})},mount:{kind:`skip`}},Gc=i({id:g(),label:g(),icon:g(),order:a().optional()}),Kc=i({id:g(),title:g(),description:g().optional(),style:m([`card`,`accordion`]).optional(),defaultCollapsed:v().optional(),columns:c([y(1),y(2),y(3),y(4)]).optional(),tab:g().optional(),location:m([`settings`,`top-tab`]).optional(),order:a().optional(),fields:p(ie())}),B=i({tabs:p(Gc).optional(),sections:p(Kc)}),qc=n(g(),u()),Jc=i({success:y(!0)}),Yc={name:`addon-settings`,scope:`system`,mode:`singleton`,nodeIdMode:`data`,methods:{getGlobalSettings:T(i({addonId:g(),nodeId:g().optional(),overlay:n(g(),u()).optional(),cap:g().optional()}),B.nullable()),updateGlobalSettings:T(i({addonId:g(),nodeId:g().optional(),patch:qc}),Jc,{kind:`mutation`,auth:`admin`}),getIntegrationSettings:T(i({addonId:g(),nodeId:g().optional()}),B.nullable()),getDeviceSettings:T(i({addonId:g(),deviceId:a(),nodeId:g().optional()}),B.nullable()),updateDeviceSettings:T(i({addonId:g(),deviceId:a(),nodeId:g().optional(),patch:qc}),Jc,{kind:`mutation`,auth:`admin`})}},Xc=m([`device-tab`,`dashboard`,`integration-detail`]),Zc=m([`xs`,`sm`,`md`,`lg`,`xl`]),Qc=i({remoteName:g(),exposedModule:g(),componentKey:g().optional()}),$c=i({tab:g(),subTab:g().optional(),label:g(),order:a().optional(),kind:y(`remote`),remote:Qc,stableId:g(),description:g().optional(),icon:g().optional(),bundle:g(),hosts:p(Xc).readonly(),requires:i({deviceContext:v().default(!1),integrationContext:v().default(!1)}),preAuth:v().optional().default(!1),defaultSize:Zc.default(`md`),allowedSizes:p(Zc).readonly().default([`sm`,`md`,`lg`]),defaultColumns:a().int().min(1).max(12).default(6),defaultRows:a().int().min(1).max(12).default(1)}),el={name:`addon-widgets-source`,scope:`system`,mode:`collection`,internal:!0,methods:{listWidgets:T(h(),p($c).readonly(),{auth:`admin`})}},tl=$c.extend({addonId:g(),bundleUrl:g()}),nl={name:`addon-widgets`,scope:`system`,mode:`singleton`,methods:{listWidgets:T(h(),p(tl).readonly())}},rl=m([`info`,`success`,`warning`,`error`]),il=m([`active`,`in-progress`,`completed`,`failed`,`dismissed`]),al=i({type:g(),id:g()}),ol=i({id:g(),category:g(),severity:rl,title:g(),message:g(),status:il,progress:a().optional(),read:v(),createdAt:a(),updatedAt:a(),source:al.optional(),metadata:n(g(),u()).optional()}),sl={name:`alerts`,scope:`system`,mode:`singleton`,methods:{emit:T(ol,h(),{kind:`mutation`}),update:T(i({alertId:g(),patch:ol.partial()}),h(),{kind:`mutation`}),list:T(i({unreadOnly:v().optional(),limit:a().optional()}).optional(),p(ol).readonly()),getUnreadCount:T(h(),a()),markRead:T(i({alertId:g()}),h(),{kind:`mutation`}),markAllRead:T(h(),h(),{kind:`mutation`}),dismiss:T(i({alertId:g()}),h(),{kind:`mutation`})}},cl={name:`audio-analysis`,scope:`device`,mode:`singleton`,kind:`wrapper`,defaultActive:!0,deviceTypes:[D.Camera],exposesDeviceSettings:!0,methods:{resolveDeviceSettings:T(i({deviceId:a()}),x())},events:{onAudioLevel:E(i({deviceId:a(),rms:a(),dbfs:a()}))}},ll=m([`jpeg`,`rgb`,`bgr`,`yuv420`,`gray`]),ul=i({data:x(),format:ll,width:a(),height:a(),timestamp:a()}),V=i({x:a(),y:a(),w:a(),h:a()}),dl=i({class:g(),originalClass:g(),score:a(),bbox:V}),fl=i({data:_(Uint8Array),sampleRate:a(),channels:a(),timestamp:a(),deviceId:a().optional()}),pl=i({rms:a(),dbfs:a()}),ml=i({className:g(),originalClass:g().optional(),score:a()}),hl=i({level:pl,classification:i({labels:p(ml).readonly(),inferenceMs:a()}).optional(),timestamp:a()}),gl=i({minConfidence:a().min(0).max(1).default(.3),allowedClasses:p(g()).default([])}),_l=i({labels:p(ml).readonly(),rawLabels:p(ml).readonly().optional(),inferenceMs:a()}),vl=[{value:`auto`,label:`Auto (platform default)`},{value:`apple-soundanalysis`,label:`Apple SoundAnalysis (macOS 12+)`},{value:`yamnet-onnx`,label:`YAMNet ONNX (cross-platform)`}],yl={audioBackend:`auto`,probedBestAudioBackend:``},bl={name:`audio-analyzer`,scope:`system`,mode:`singleton`,methods:{analyseChunk:T(i({chunk:fl,settings:gl}),hl.nullable(),{kind:`mutation`}),classify:T(fl,_l,{timeoutMs:3e4}),isReady:T(h(),v()),dispose:T(h(),h(),{kind:`mutation`}),reprobeAudioEngine:T(h(),i({backend:g()}),{kind:`mutation`,auth:`admin`})}},xl=m([`f32le`,`s16le`]),Sl=i({codec:g(),canDecode:v(),canEncode:v(),label:g().optional()}),Cl=i({codec:g(),sourceSampleRate:a().int().positive(),sourceChannels:a().int().positive(),extraData:_(Uint8Array).optional(),targetSampleRate:a().int().positive(),targetChannels:a().int().positive(),targetFormat:xl.optional(),idleMs:a().int().positive().optional(),tag:g().optional()}),wl=i({codec:g(),sourceSampleRate:a().int().positive(),sourceChannels:a().int().positive(),sourceFormat:xl.optional(),targetSampleRate:a().int().positive(),targetChannels:a().int().positive(),bitrateKbps:a().int().positive().optional(),idleMs:a().int().positive().optional(),tag:g().optional()}),Tl=i({data:_(Uint8Array),sampleRate:a().int().positive(),channels:a().int().positive(),format:xl,pts:a()}),El=i({data:_(Uint8Array),codec:g(),pts:a(),frameComplete:v()}),Dl=i({sessionId:g(),kind:m([`decode`,`encode`]),codec:g(),sourceSampleRate:a(),sourceChannels:a(),targetSampleRate:a(),targetChannels:a(),format:xl,tag:g().optional(),createdAtMs:a(),lastActivityMs:a(),framesIn:a(),framesOut:a()}),Ol={name:`audio-codec`,scope:`system`,mode:`singleton`,preferredProvider:`decoder-nodeav`,methods:{listSupportedCodecs:T(h(),p(Sl).readonly()),canHandle:T(i({codec:g(),kind:m([`decode`,`encode`])}),v()),createDecodeSession:T(Cl,i({sessionId:g(),nodeId:g()}),{kind:`mutation`}),createEncodeSession:T(wl,i({sessionId:g(),nodeId:g()}),{kind:`mutation`}),closeSession:T(i({sessionId:g(),nodeId:g().optional()}),h(),{kind:`mutation`}),pushEncodedFrame:T(i({sessionId:g(),nodeId:g().optional(),data:_(Uint8Array),pts:a().optional()}),h(),{kind:`mutation`}),pullPcm:T(i({sessionId:g(),nodeId:g().optional(),maxCount:a().int().positive().default(8)}),p(Tl)),pushPcm:T(i({sessionId:g(),nodeId:g().optional(),data:_(Uint8Array),pts:a().optional()}),h(),{kind:`mutation`}),pullEncoded:T(i({sessionId:g(),nodeId:g().optional(),maxCount:a().int().positive().default(8)}),p(El)),flushEncode:T(i({sessionId:g(),nodeId:g().optional()}),p(El),{kind:`mutation`}),listActiveSessions:T(h(),p(Dl).readonly())}},kl=i({userId:g(),username:g(),email:g().optional(),displayName:g().optional(),isAdmin:v().default(!1)}),Al={name:`auth-provider`,scope:`system`,mode:`collection`,internal:!0,methods:{validateCredentials:T(i({username:g(),password:g()}),kl.nullable(),{kind:`mutation`}),getLoginUrl:T(i({state:g()}),g()),handleCallback:T(n(g(),g()),kl,{kind:`mutation`}),validateToken:T(i({token:g()}),kl.nullable())},mount:{kind:`skip`}},jl=i({subId:g(),displayName:g(),description:g().optional(),kind:g(),triggerSupported:v(),restoreSupported:v()}).extend({id:g(),addonId:g(),enabled:v(),retentionCount:a(),label:g().optional(),lastSuccessAt:a().optional(),lastSuccessSizeBytes:a().optional(),cron:g().optional(),nextRunAt:a().optional(),lastAttemptAt:a().optional(),lastError:g().optional()}),Ml=i({id:g(),filename:g(),createdAt:a(),sizeBytes:a(),label:g().optional(),locations:p(g()).readonly()}),Nl=i({id:g(),destinationId:g().optional(),label:g().optional(),createdAt:a(),sizeBytes:a(),locations:p(g()).optional()}),Pl=i({path:g(),kind:m([`file`,`dir`,`symlink`]),sizeBytes:a(),mtime:a()}),Fl=i({archiveVersion:y(1),createdAt:a(),dataDir:g(),locations:p(g()),entries:p(Pl),totalBytes:a(),totalFiles:a()}),Il=i({name:g(),sizeBytes:a(),fileCount:a(),present:v()}),Ll=m([`queued`,`running`,`succeeded`,`failed`,`cancelled`]),Rl=m([`queued`,`building`,`uploading`,`done`]),zl=i({id:g(),state:Ll,phase:Rl,destinationIds:p(g()).readonly(),label:g().optional(),requestedAt:a(),startedAt:a().optional(),finishedAt:a().optional(),stagedBytes:a(),archiveSizeBytes:a().optional(),uploadedBytes:a(),completedDestinationIds:p(g()).readonly(),failedDestinationIds:p(g()).readonly(),error:g().optional(),queuePosition:a().int().min(1).optional()}),Bl=i({runId:g(),queued:v(),joined:v(),cancelled:v(),entries:p(Nl).readonly()}),Vl=i({id:g(),label:g(),cron:g(),enabled:v(),locationIds:p(g()).readonly(),retentionCount:a().int().min(1).max(1e3),dataSources:p(g()).readonly().optional(),lastAttemptAt:a().optional(),lastSuccessAt:a().optional(),lastError:g().optional(),nextRunAt:a().optional()}),Hl={name:`backup`,scope:`system`,mode:`singleton`,methods:{listDestinations:T(h(),p(jl).readonly(),{auth:`admin`}),trigger:T(i({destinations:p(g()).optional(),locations:p(g()).optional(),label:g().optional(),retentionCount:a().int().min(1).max(1e3).optional()}).optional(),Bl,{kind:`mutation`,auth:`admin`}),listRuns:T(h(),p(zl).readonly(),{auth:`admin`}),cancel:T(i({runId:g()}),i({cancelled:v()}),{kind:`mutation`,auth:`admin`}),list:T(h(),p(Nl).readonly(),{auth:`admin`}),listLocations:T(h(),p(Il).readonly(),{auth:`admin`}),getEntries:T(i({destinationId:g(),backupId:g()}),Fl.nullable(),{auth:`admin`}),restore:T(i({destinationId:g(),backupId:g(),locations:p(g()).optional()}),h(),{kind:`mutation`,auth:`admin`}),delete:T(i({destinationId:g(),backupId:g()}),h(),{kind:`mutation`,auth:`admin`}),listArchives:T(i({destinationId:g()}),p(Ml).readonly(),{auth:`admin`}),upsertDestinationPolicy:T(i({locationId:g(),enabled:v(),retentionCount:a().int().min(1).max(1e3),label:g().optional()}),h(),{kind:`mutation`,auth:`admin`}),previewSchedule:T(i({cron:g(),count:a().int().min(1).max(20).optional()}),i({ok:v(),error:g().optional(),nextRuns:p(a()).readonly()})),listSchedules:T(h(),p(Vl).readonly(),{auth:`admin`}),upsertSchedule:T(i({id:g().optional(),label:g(),cron:g(),enabled:v(),locationIds:p(g()).readonly(),retentionCount:a().int().min(1).max(1e3),dataSources:p(g()).readonly().optional()}),Vl,{kind:`mutation`,auth:`admin`}),deleteSchedule:T(i({id:g()}),h(),{kind:`mutation`,auth:`admin`})}},Ul=m([`connected`,`disconnected`,`connecting`,`auth-failed`,`unreachable`,`error`]),Wl=i({id:g(),addonId:g(),name:g(),kind:g(),status:Ul,info:n(g(),u()),lastCheckedAt:a().nullable(),error:g().nullable()}),Gl=i({brokerCount:a().int().nonnegative(),connectedCount:a().int().nonnegative()}),Kl=i({addonId:g(),kinds:p(i({kind:g(),label:g()}))}),ql=i({kind:g().optional()}),Jl=i({id:g()}),Yl=i({kind:g().min(1),name:g().min(1),id:g().min(1).optional(),settings:n(g(),u())}),Xl=i({id:g()}),Zl=i({id:g()}),Ql=b(`ok`,[i({ok:y(!0),latencyMs:a().nonnegative()}),i({ok:y(!1),error:g()})]),$l=n(g(),u()),eu=i({kind:g()}),tu=i({kind:g(),settings:$l}),nu=b(`ok`,[i({ok:y(!0),latencyMs:a().nonnegative().optional()}).strict(),i({ok:y(!1),error:g()})]),ru=u().nullable(),iu=i({brokerId:g(),target:n(g(),u()),payload:u().optional()}),au=i({brokerId:g(),filter:n(g(),u())}),ou=i({subscriptionId:g()}),su=i({brokerId:g(),subscriptionId:g()}),cu=i({brokerId:g(),key:g()}),lu={name:`broker`,scope:`system`,mode:`collection`,providerKind:`broker`,status:{schema:Gl,kind:`poll`},methods:{list:T(ql,p(Wl)),get:T(Jl,Wl.nullable()),listProviders:T(h(),p(Kl),{auth:`admin`}),add:T(Yl,Xl,{kind:`mutation`,auth:`admin`}),remove:T(Zl,h(),{kind:`mutation`,auth:`admin`}),testConnection:T(Jl,Ql,{kind:`mutation`,auth:`admin`}),getSettings:T(Jl,$l.nullable(),{auth:`admin`}),setSettings:T(i({id:g(),settings:$l}),h(),{kind:`mutation`,auth:`admin`}),getBrokerConfig:T(Jl,$l.nullable(),{auth:`admin`}),getSettingsSchema:T(eu,ru,{auth:`admin`}),testSettings:T(tu,nu,{kind:`mutation`,auth:`admin`}),publish:T(iu,u(),{kind:`mutation`,auth:`admin`}),subscribe:T(au,ou,{kind:`mutation`,auth:`admin`}),unsubscribe:T(su,h(),{kind:`mutation`,auth:`admin`}),getState:T(cu,u().nullable()),getStatus:T(h(),Gl)}},uu={name:`camera-pipeline-config`,scope:`device`,mode:`singleton`,kind:`wrapper`,defaultActive:!0,deviceTypes:[D.Camera],exposesDeviceSettings:!0,methods:{}},du=m([`webrtc`,`hls`,`mjpeg`,`rtsp`]),fu=m([`mp4`,`gif`]),pu=i({kind:fu,handle:g(),nodeId:g(),mime:g(),bytes:a().int(),width:a().int(),height:a().int()}),mu=i({fromTs:a(),toTs:a(),packets:a().int()}),hu=i({media:p(pu).readonly(),coverage:mu,profile:S,video:m([`copy`,`encode`])}),gu=i({brokerId:g(),url:g(),mutedUrl:g(),enabled:v(),codec:g().optional(),resolution:i({width:a().int().positive(),height:a().int().positive()}).optional()}),_u=i({sessionId:g(),remoteAddr:g(),userAgent:g().nullish(),playing:v(),muted:v(),connectedAt:a(),lastRtpAt:a(),bytesSent:a()}),vu=i({tag:g(),subscribedAt:a(),maxFps:a(),framesDelivered:a(),framesDropped:a()}),yu=i({tag:g(),subscribedAt:a(),chunksDelivered:a()}),bu=m([`alexa`,`homekit`,`webrtc-browser`,`webrtc-mobile`,`webrtc-whep`,`rtsp-listen`,`derived-broker`,`recording`,`pipeline`,`snapshot`,`warmup`,`unknown`]),xu=i({kind:bu,label:g().optional(),media:m([`audio`,`video`,`both`]).optional(),targetCodec:g().optional(),transport:m([`passthrough`,`repacketize`,`transcode`]).optional(),remoteAddr:g().optional(),userAgent:g().optional(),userId:g().optional(),sessionId:g().optional(),extra:n(g(),g()).optional()}).readonly(),Su=i({id:g(),channel:m([`annexb`,`rtp`]),attribution:xu,subscribedAt:a(),packetsDelivered:a()}),Cu=i({rtsp:p(_u).readonly(),decoded:p(vu).readonly(),audio:p(yu).readonly(),encoded:p(Su).readonly(),pipeClients:a(),encodedSubscribers:a()}),wu=m([`reconnecting`,`sleeping`,`offline`,`disabled`,`waking`]),Tu=m([`h264`,`h265`,`copy`]),Eu=m([`aac`,`opus`,`pcmu`,`copy`,`none`]),Du=i({deviceId:a().int().nonnegative(),video:Tu,audio:Eu.optional(),profile:S.optional(),targetResolution:i({width:a().int().positive(),height:a().int().positive()}).optional(),outputArgs:p(g()).optional(),audioEgress:v().optional(),hostname:g().optional(),tag:g().optional()}),Ou=i({url:g(),videoCodec:m([`H264`,`H265`]),audioCodec:g(),resolution:i({width:a().int().positive(),height:a().int().positive()}),transcoded:v(),encoder:g(),pipelineKey:g()}),ku=Kn.omit({inputArgs:!0,outputArgs:!0}),Au=m([`tight`,`relaxed`]),ju=i({deviceId:a().int().nonnegative(),source:b(`kind`,[i({kind:y(`profile`),profile:S}),i({kind:y(`cam-stream`),camStreamId:g().min(1)})]),encode:ku,rateControl:Au.optional(),bitstreamFilter:m([`dump_extra`,`h264_mp4toannexb`,`hevc_mp4toannexb`]).optional(),publishLocally:v().optional(),pixelFormat:m([`yuv420p`,`nv12`]).optional(),decodeHwAccel:m([`auto`,`none`,`videotoolbox`,`vaapi`,`qsv`,`cuda`]).optional(),hostname:g().optional(),tag:g().optional()}),Mu=i({url:g(),pipelineKey:g(),videoCodec:m([`H264`,`H265`]),resolution:i({width:a().int().positive(),height:a().int().positive()}),transcoded:v(),encoder:g(),decodeHwAccel:g().nullable(),camStreamId:g().nullable()}),Nu={name:`stream-broker`,scope:`system`,mode:`singleton`,exposesDeviceSettings:!0,methods:{publishCameraStream:T(i({deviceId:a().int().nonnegative(),camStreamId:g().min(1),kind:Ue,url:g().optional(),codec:g().optional(),resolution:C.optional(),fps:a().positive().optional(),label:g().optional(),deviceFeatures:p(g()).optional(),autoEligible:v().optional(),profileHint:S.optional(),metadata:n(g(),u()).optional(),sourceCamStreamId:g().min(1).optional(),encodeProfile:Kn.optional()}),i({success:y(!0)}),{kind:`mutation`,auth:`admin`}),retractCameraStream:T(i({deviceId:a().int().nonnegative(),camStreamId:g().min(1)}),i({success:y(!0)}),{kind:`mutation`,auth:`admin`}),assignProfile:T(i({deviceId:a().int().nonnegative(),profile:S,camStreamId:g().min(1)}),i({success:y(!0)}),{kind:`mutation`,auth:`admin`}),unassignProfile:T(i({deviceId:a().int().nonnegative(),profile:S}),i({success:y(!0)}),{kind:`mutation`,auth:`admin`}),forgetDeviceHardware:T(i({deviceId:a().int().nonnegative()}),i({derivedStreamsDeleted:p(g()).readonly(),assignmentsPurged:v(),probeSnapshotsDropped:a().int().nonnegative(),rtspTokenRowsDeleted:a().int().nonnegative()}),{kind:`mutation`,auth:`admin`}),renderPreBufferClip:T(i({deviceId:a(),profile:S.optional(),aroundMs:a(),preRollSec:a().min(0).max(20).default(3),postRollSec:a().min(0).max(20).default(5),format:m([`gif`,`mp4`]).default(`gif`),maxWidth:a().int().min(120).max(1920).default(480),fps:a().int().min(1).max(15).default(5),speed:a().min(1).max(8).default(2)}),i({base64:g(),mime:g(),bytes:a().int(),profile:S,durationMs:a()}),{kind:`mutation`,auth:`admin`}),produceEventMedia:T(i({deviceId:a(),profile:S.optional(),aroundMs:a(),preSeconds:a().min(0).max(20).default(4),postSeconds:a().min(0).max(20).default(6),kinds:p(fu).min(1).default([`mp4`]),gifMaxWidth:a().int().min(120).max(1280).default(640),gifFps:a().int().min(1).max(15).default(12),gifSpeed:a().min(1).max(8).default(4),speed:a().min(1).max(8).default(4)}),hu,{kind:`mutation`,auth:`admin`}),fetchEventMedia:T(i({handle:g()}),i({base64:g(),mime:g(),bytes:a().int()}).nullable(),{kind:`mutation`,auth:`admin`}),listAllCameraStreams:T(h(),p(We).readonly()),listAllProfileSlots:T(h(),p(Ke).readonly()),getBrokerStats:T(i({brokerId:g()}),ct),probeStream:T(i({brokerId:g()}),i({probed:v(),summary:g()}),{kind:`mutation`,auth:`admin`}),listClients:T(i({brokerId:g()}),Cu),killClient:T(i({brokerId:g(),channel:m([`rtsp`,`decoded`,`audio`]),handle:g()}),i({killed:v()}),{kind:`mutation`,auth:`admin`}),restartProfile:T(i({deviceId:a().int().nonnegative(),profile:S}),i({success:v()}),{kind:`mutation`,auth:`admin`}),getStreamUrl:T(i({streamId:g(),format:du}),i({url:g()})),getStreamWithCodec:T(Du,Ou,{kind:`mutation`,auth:`admin`}),releaseStreamWithCodec:T(i({pipelineKey:g()}),i({released:v(),refcount:a().int().nonnegative()}),{kind:`mutation`,auth:`admin`}),acquireEgressTranscode:T(ju,Mu,{kind:`mutation`,auth:`admin`}),releaseEgressTranscode:T(i({pipelineKey:g()}),i({released:v(),refcount:a().int().nonnegative()}),{kind:`mutation`,auth:`admin`}),subscribeAudioChunks:T(at,ot,{kind:`mutation`}),pullAudioChunks:T(i({subscriptionId:g(),maxCount:a().int().positive().default(8)}),p(it).readonly()),unsubscribeAudioChunks:T(i({subscriptionId:g()}),i({released:v()}),{kind:`mutation`}),subscribeFrames:T(nt,rt,{kind:`mutation`}),pullFrameHandles:T(i({subscriptionId:g(),maxCount:a().int().positive().default(4)}),p(w).readonly()),unsubscribeFrames:T(i({subscriptionId:g()}),i({released:v()}),{kind:`mutation`}),setPreBufferDuration:T(i({brokerId:g(),seconds:a().min(0).max(30)}),h(),{kind:`mutation`,auth:`admin`}),getPreBufferInfo:T(i({brokerId:g()}),i({configuredSec:a(),bufferedMs:a(),packetCount:a()})),getRtspPort:T(h(),a()),getAllRtspEntries:T(i({hostname:g().optional()}),p(gu).readonly()),getRtspEntry:T(i({brokerId:g(),hostname:g().optional()}),gu.nullable()),regenerateRtspToken:T(i({brokerId:g()}),g().nullable(),{kind:`mutation`,auth:`admin`}),setRtspEnabled:T(i({brokerId:g(),enabled:v()}),h(),{kind:`mutation`,auth:`admin`}),isRtspEnabled:T(i({brokerId:g()}),v()),getDeviceAudioMute:T(i({deviceId:a().int()}),i({muted:v(),appliedBrokers:a().int().nonnegative()})),setDeviceAudioMute:T(i({deviceId:a().int(),muted:v()}),i({muted:v(),appliedBrokers:a().int().nonnegative()}),{kind:`mutation`,auth:`admin`})},events:{onCamStreamDemand:E(i({deviceId:a().int().nonnegative(),camStreamId:g(),profile:S})),onCamStreamIdle:E(i({deviceId:a().int().nonnegative(),camStreamId:g()})),onRequestStreamSourceRefresh:E(i({deviceId:a().int().nonnegative(),camStreamId:g(),brokerId:g()}))}},Pu=m([`h264`,`h265`,`hevc`,`av1`,`mjpeg`,`vp8`,`vp9`]),Fu=i({acceptCodecs:p(Pu).readonly().optional(),minHeight:a().int().positive().optional(),minWidth:a().int().positive().optional(),excludeDerived:v().optional(),requireSiblingCodec:p(Pu).readonly().optional()}).readonly(),Iu=i({preferredProviders:p(g()).readonly().optional(),resolutionPreference:m([`highest`,`lowest`]).optional()}).readonly(),Lu=i({camStreamId:g(),codec:g().optional(),resolution:C.optional(),reason:g()}),Ru={name:`camera-streams`,scope:`device`,mode:`singleton`,kind:`wrapper`,defaultActive:!0,deviceTypes:[D.Camera],methods:{getCameraStreams:T(i({deviceId:a().int().nonnegative()}),p(We).readonly()),getBrokerStreams:T(i({deviceId:a().int().nonnegative()}),p(Ke).readonly()),getRtspEntries:T(i({deviceId:a().int().nonnegative(),hostname:g().optional()}),p(gu).readonly()),getProfileRtspEntries:T(i({deviceId:a().int().nonnegative(),hostname:g().optional()}),p(lt).readonly()),pickStream:T(i({deviceId:a().int().nonnegative(),requirements:Fu,preferences:Iu.optional()}),Lu.nullable())},events:{onCamStreamsChanged:E(i({deviceId:a().int().nonnegative(),camStreams:p(We).readonly()})),onProfileSlotsChanged:E(i({deviceId:a().int().nonnegative(),profileSlots:p(Ke).readonly()}))},runtimeState:i({online:v(),slotStatuses:i({high:Ge.optional(),mid:Ge.optional(),low:Ge.optional()}),slotErrors:i({high:g().optional(),mid:g().optional(),low:g().optional()}),lastChangedAt:a()}),durability:`session`};function zu(e){let t=e._def;return e.constructor?.name===`ZodVoid`||t?.type===`void`||t?.typeName===`ZodVoid`}function Bu(e){let t=e._def;return e.constructor?.name===`ZodObject`||t?.type===`object`||t?.typeName===`ZodObject`}function Vu(e){let t=e;for(let e=0;e<8&&t!=null;e+=1){let e=t._def,n=t.constructor?.name;if(n===`ZodArray`||e?.type===`array`)return!0;if(!(n===`ZodReadonly`||e?.type===`readonly`||n===`ZodOptional`||e?.type===`optional`||n===`ZodNullable`||e?.type===`nullable`||n===`ZodDefault`||e?.type==="default")||e?.innerType==null)return!1;t=e.innerType}return!1}function Hu(e,t){if(e===void 0||e.mode!==`collection`)return!1;let n=Ot(e)[t];return n!==void 0&&n.kind!==`subscription`&&Vu(n.output)}function Uu(e){let t=e.loose;return typeof t==`function`?t.call(e):e}function Wu(e){if(!(typeof e!=`object`||!e)){for(let t of Object.values(e))if(typeof t==`object`&&t){let e=t.addonId;if(typeof e==`string`)return e}}}function Gu(e){if(e===null||typeof e!=`object`&&typeof e!=`function`)return!1;let t=e.shape??Ku(e._def?.shape);return typeof t==`object`&&!!t&&Object.prototype.hasOwnProperty.call(t,`addonId`)}function Ku(e){return typeof e==`function`?e():e}function qu(e,t){return t.auth===void 0?e.internal===!0?`admin`:`protected`:t.auth}function Ju(e){return e===`public`?`public`:e===`admin`||e===`superAdmin`?`admin`:`protected`}function Yu(e){return e.replace(/-([a-z])/g,(e,t)=>t.toUpperCase())}var Xu=`core-block-`,Zu=`core-blocks`;function Qu(e){return`${Xu}${e}`}function $u(e){if(!e.startsWith(`core-block-`))return null;let t=e.slice(11);return t.length>0?t:null}var ed=c([y(`hub`),g().min(1)]),td=m([`stopped`,`starting`,`running`,`failed`]),nd=i({name:g().min(1).max(120),code:g().max(2e5),enabled:v(),placement:ed,integrationId:g().optional()}),H=nd.extend({id:g(),createdAt:a(),updatedAt:a(),createdBy:g(),status:td,lastError:g().optional(),lastChangedAt:a()}),rd=i({ok:v(),error:g().optional(),line:a().optional(),column:a().optional()}),id={name:`core-blocks`,scope:`system`,mode:`singleton`,methods:{list:T(i({}),i({blocks:p(H)}),{auth:`admin`}),get:T(i({blockId:g()}),i({block:H.nullable()}),{auth:`admin`}),create:T(i({block:nd}),i({block:H}),{kind:`mutation`,auth:`admin`,caller:`required`}),update:T(i({blockId:g(),block:nd.partial()}),i({block:H}),{kind:`mutation`,auth:`admin`,caller:`required`}),delete:T(i({blockId:g()}),i({success:y(!0)}),{kind:`mutation`,auth:`admin`}),setEnabled:T(i({blockId:g(),enabled:v()}),i({block:H}),{kind:`mutation`,auth:`admin`}),restart:T(i({blockId:g()}),i({block:H}),{kind:`mutation`,auth:`admin`}),compile:T(i({code:g()}),rd,{kind:`mutation`,auth:`admin`}),getTypeDefs:T(i({}),i({libs:p(i({filePath:g(),content:g()}))}),{auth:`admin`})}};function ad(e){return e}function od(e,t,n){return{input:e,output:t,kind:n?.kind??`query`,auth:n?.auth??`protected`,scope:n?.scope??{kind:`system`},...n?.caller?{caller:`required`}:{}}}function sd(e,t,n){return{input:e,output:t,kind:n?.kind??`query`,auth:n?.auth??`protected`,scope:{kind:`device`,...n?.deviceTypes?{deviceTypes:n.deviceTypes}:{}}}}var cd=i({stepId:g(),entry:fs}),ld={name:`custom-model-registry`,scope:`system`,mode:`collection`,internal:!0,methods:{listModels:T(h(),p(cd).readonly(),{auth:`admin`})}},U=i({where:n(g(),u()).optional(),whereIn:n(g(),p(u())).optional(),whereBetween:n(g(),s([u(),u()])).optional(),whereNot:n(g(),u()).optional(),orderBy:i({field:g(),direction:m([`asc`,`desc`])}).optional(),limit:a().optional(),offset:a().optional()}),ud=i({where:n(g(),u()).optional(),whereIn:n(g(),p(u())).optional(),whereBetween:n(g(),s([u(),u()])).optional(),whereNot:n(g(),u()).optional()}),dd=i({as:g().min(1),field:g().min(1),op:m([`sum`,`min`,`max`])}),fd=i({count:a().int(),values:n(g(),a().nullable())}),pd=i({id:g(),data:n(g(),u())}),md=i({id:g().optional(),data:n(g(),u())}),hd=i({name:g(),type:m([`TEXT`,`INTEGER`,`REAL`,`JSON`,`BOOLEAN`]),primaryKey:v().optional(),notNull:v().optional(),unique:v().optional(),defaultValue:c([g(),a(),v()]).optional()}),gd=i({name:g(),columns:p(g()).readonly(),unique:v().optional()}),_d={name:`settings-store`,scope:`system`,mode:`singleton`,methods:{get:T(i({namespace:g().optional(),collection:g(),key:g()}),u()),set:T(i({namespace:g().optional(),collection:g(),key:g(),value:u()}),h(),{kind:`mutation`}),query:T(i({namespace:g().optional(),collection:g(),filter:U.optional(),columns:p(g()).readonly().optional()}),p(pd).readonly()),insert:T(i({namespace:g().optional(),collection:g(),record:pd}),h(),{kind:`mutation`}),insertMany:T(i({namespace:g().optional(),collection:g(),records:p(md).readonly()}),i({inserted:a().int()}),{kind:`mutation`}),update:T(i({namespace:g().optional(),collection:g(),id:g(),data:n(g(),u())}),h(),{kind:`mutation`}),delete:T(i({namespace:g().optional(),collection:g(),key:g()}),h(),{kind:`mutation`}),deleteWhere:T(i({namespace:g().optional(),collection:g(),filter:ud}),i({deleted:a().int()}),{kind:`mutation`}),updateWhere:T(i({namespace:g().optional(),collection:g(),filter:ud,data:n(g(),u())}),i({updated:a().int()}),{kind:`mutation`}),count:T(i({namespace:g().optional(),collection:g(),filter:U.optional()}),a()),aggregate:T(i({namespace:g().optional(),collection:g(),fields:p(dd).readonly(),filter:U.optional()}),fd),histogram:T(i({namespace:g().optional(),collection:g(),field:g(),bucketSize:a().int().positive(),origin:a().int(),filter:U.optional()}),p(i({bucket:a().int(),count:a().int()})).readonly()),isEmpty:T(i({namespace:g().optional(),collection:g()}),v()),declareCollection:T(i({namespace:g().optional(),collection:g(),columns:p(hd).readonly(),indexes:p(gd).readonly().optional()}),h(),{kind:`mutation`})}},vd=i({engineId:g(),kind:m([`relational`,`vector`]),displayName:g()}),yd={name:`data-store-provider`,scope:`system`,mode:`collection`,internal:!0,methods:{getEngineInfo:T(h(),vd,{auth:`admin`}),get:T(i({namespace:g().optional(),collection:g(),key:g()}),u(),{auth:`admin`}),set:T(i({namespace:g().optional(),collection:g(),key:g(),value:u()}),h(),{kind:`mutation`,auth:`admin`}),query:T(i({namespace:g().optional(),collection:g(),filter:U.optional(),columns:p(g()).readonly().optional()}),p(pd).readonly(),{auth:`admin`}),insert:T(i({namespace:g().optional(),collection:g(),record:pd}),h(),{kind:`mutation`,auth:`admin`}),insertMany:T(i({namespace:g().optional(),collection:g(),records:p(md).readonly()}),i({inserted:a().int()}),{kind:`mutation`,auth:`admin`}),update:T(i({namespace:g().optional(),collection:g(),id:g(),data:n(g(),u())}),h(),{kind:`mutation`,auth:`admin`}),delete:T(i({namespace:g().optional(),collection:g(),key:g()}),h(),{kind:`mutation`,auth:`admin`}),deleteWhere:T(i({namespace:g().optional(),collection:g(),filter:ud}),i({deleted:a().int()}),{kind:`mutation`,auth:`admin`}),updateWhere:T(i({namespace:g().optional(),collection:g(),filter:ud,data:n(g(),u())}),i({updated:a().int()}),{kind:`mutation`,auth:`admin`}),count:T(i({namespace:g().optional(),collection:g(),filter:U.optional()}),a(),{auth:`admin`}),aggregate:T(i({namespace:g().optional(),collection:g(),fields:p(dd).readonly(),filter:U.optional()}),fd,{auth:`admin`}),histogram:T(i({namespace:g().optional(),collection:g(),field:g(),bucketSize:a().int().positive(),origin:a().int(),filter:U.optional()}),p(i({bucket:a().int(),count:a().int()})).readonly(),{auth:`admin`}),isEmpty:T(i({namespace:g().optional(),collection:g()}),v(),{auth:`admin`}),declareCollection:T(i({namespace:g().optional(),collection:g(),columns:p(hd).readonly(),indexes:p(gd).readonly().optional()}),h(),{kind:`mutation`,auth:`admin`})}},bd=[{value:`auto`,label:`Auto (defer to probed best)`},{value:`none`,label:`Off (software)`},{value:`videotoolbox`,label:`VideoToolbox (macOS)`},{value:`cuda`,label:`CUDA (NVIDIA)`},{value:`nvdec`,label:`NVDEC (NVIDIA legacy)`},{value:`vaapi`,label:`VAAPI (Linux Intel/AMD)`},{value:`qsv`,label:`QuickSync (Intel)`},{value:`d3d11va`,label:`D3D11VA (Windows)`},{value:`dxva2`,label:`DXVA2 (Windows legacy)`},{value:`amf`,label:`AMF (AMD)`},{value:`vdpau`,label:`VDPAU (Linux NVIDIA legacy)`},{value:`drm`,label:`DRM (Linux generic)`}],xd={hwaccel:`auto`,probedBestHwaccel:``},Sd=i({sessionId:g(),slotCount:a().int(),slotByteLength:a().int(),segmentBytes:a().int(),budgetMb:a().int(),framesWritten:a().int(),getFrameHits:a().int(),getFrameMisses:a().int()}),Cd={name:`decoder`,scope:`system`,mode:`singleton`,preferredProvider:`decoder-nodeav`,methods:{supportsCodec:T(i({codec:g()}),v()),getInfo:T(h(),i({id:g(),name:g(),isPullMode:v().optional(),priority:a().optional(),hwaccel:g().optional(),probedBestHwaccel:g().optional()})),createSession:T(uo,i({sessionId:g(),nodeId:g()})),destroySession:T(i({sessionId:g()}),h()),pushPacket:T(i({sessionId:g(),packet:$e}),h()),openStream:T(i({sessionId:g(),url:g()}),h()),pullFrames:T(i({sessionId:g(),maxCount:a().default(1),waitMs:a().optional()}),p(et)),pullHandles:T(i({sessionId:g(),maxCount:a().default(1),waitMs:a().optional()}),p(w)),getFrame:T(i({handle:w}),et.nullable()),getShmStats:T(i({sessionId:g()}),Sd.nullable()),updateConfig:T(i({sessionId:g(),config:uo.partial()}),h()),getStats:T(i({sessionId:g()}),lo),listActiveSessions:T(h(),p(i({sessionId:g(),codec:g(),outputFormat:g(),createdAtMs:a()})).readonly()),reprobeHwaccel:T(h(),i({backend:g()}),{kind:`mutation`,auth:`admin`})}},wd={name:`detection-pipeline`,scope:`device`,mode:`singleton`,kind:`wrapper`,defaultActive:!0,deviceTypes:[D.Camera],exposesDeviceSettings:!0,methods:{}},Td=i({id:g(),system:g(),uniqueId:g().optional(),raw:n(g(),u()).optional()});function Ed(e){return{id:e.stableId,system:e.addonId}}function Dd(e,t){let n={...e};for(let[r,i]of Object.entries(t))if(i!==void 0){if(r===`raw`&&typeof i==`object`&&i){n.raw={...e.raw,...i};continue}n[r]=i}return n}function Od(e){if(e==null)return;let t=e.trim();if(t===``)return;let n=t.toLowerCase();return n===`°c`||n===`c`||n===`celsius`?`°C`:n===`°f`||n===`f`||n===`fahrenheit`?`°F`:n===`k`||n===`kelvin`?`K`:n===`%`||n===`percent`||n===`percentage`?`%`:n===`lx`||n===`lux`?`lx`:n===`hpa`||n===`hectopascal`?`hPa`:n===`kpa`?`kPa`:n===`pa`?`Pa`:n===`mbar`||n===`millibar`?`mbar`:n===`w`||n===`watt`?`W`:n===`kw`||n===`kilowatt`?`kW`:n===`wh`||n===`watt-hour`?`Wh`:n===`kwh`||n===`kilowatt-hour`?`kWh`:n===`v`||n===`volt`?`V`:n===`a`||n===`amp`||n===`ampere`?`A`:n===`ma`||n===`milliampere`?`mA`:n===`va`?`VA`:n===`ppm`?`ppm`:n===`ppb`?`ppb`:n===`µg/m³`||n===`ug/m3`||n===`µg/m3`?`µg/m³`:n===`km/h`||n===`kph`?`km/h`:n===`mph`?`mph`:n===`m/s`?`m/s`:n===`m`?`m`:n===`km`?`km`:n===`kg`?`kg`:n===`g`?`g`:t}var kd=`sourceInfo`;function Ad(e){if(!e)return null;let t=e[kd];if(!t)return null;let n=Td.safeParse(t);return n.success?n.data:null}var jd=m([`online`,`sleeping`,`offline`,`unknown`]),Md=r(()=>i({childNativeId:g(),name:g(),type:m(D),status:jd,metadata:i({model:g().optional(),serialNumber:g().optional(),uid:g().optional(),rtspChannel:a().int().nonnegative().optional(),isBattery:v().optional(),isDoorbell:v().optional(),isMultifocal:v().optional(),externalLocation:g().optional(),manufacturer:g().optional(),integration:g().optional()}).default({}),alreadyAdopted:v(),adoptedDeviceId:a().int().nonnegative().nullable(),capabilities:p(g()).readonly().optional(),features:p(g()).readonly().optional(),sourceInfo:Td.optional(),children:p(Md).readonly().optional()})),Nd=i({discovered:p(Md),lastDiscoveryAt:a().int().nonnegative().nullable(),lastError:g().nullable()}),Pd={name:`device-discovery`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[D.Hub],status:{schema:Nd,kind:`poll`},runtimeState:Nd.extend({lastFetchedAt:a().int().nonnegative()}),durability:`session`,methods:{listDiscovered:T(i({deviceId:a().int().nonnegative()}),p(Md).readonly()),refreshDiscovery:T(i({deviceId:a().int().nonnegative()}),p(Md).readonly(),{kind:`mutation`,auth:`admin`}),adoptDevice:T(i({deviceId:a().int().nonnegative(),childNativeId:g(),name:g().optional()}),i({deviceId:a().int().nonnegative(),stableId:g()}),{kind:`mutation`,auth:`admin`}),releaseDevice:T(i({deviceId:a().int().nonnegative(),childDeviceId:a().int().nonnegative()}),h(),{kind:`mutation`,auth:`admin`})}},Fd=i({id:g(),label:g(),isDefault:v().optional()}),Id=i({search:g().optional(),area:g().optional(),manufacturer:g().optional(),adoptedOnly:v().optional(),unadoptedOnly:v().optional()}),Ld=i({integrationId:g(),page:a().int().positive().default(1),pageSize:a().int().positive().max(2e4).default(50),filter:g().optional(),filterText:Id.optional()}),Rd=i({candidates:p(Md).readonly(),totalCount:a().int().nonnegative(),page:a().int().positive(),pageSize:a().int().positive()}),zd=i({integrationId:g(),childNativeId:g()}),Bd=i({lastDiscoveryAt:a().int().nonnegative().nullable(),candidateCount:a().int().nonnegative(),adoptedCount:a().int().nonnegative(),lastError:g().nullable()}),Vd=i({name:g().min(1).optional(),hiddenChildIds:p(g()).optional()}),Hd=i({integrationId:g(),childNativeIds:p(g()).min(1),filter:g().optional(),importLocations:v().optional(),perCandidate:n(g(),Vd).optional()}),Ud=i({adopted:p(i({childNativeId:g(),parentDeviceId:a().int().nonnegative(),accessoryDeviceIds:p(a().int().nonnegative()).readonly()})).readonly()}),Wd=i({integrationId:g(),camDeviceId:a().int().nonnegative()}),Gd=i({camDeviceId:a().int().nonnegative(),resetToSource:v().optional()}),Kd=i({changed:v(),rebuiltChildren:a().int().nonnegative(),removedChildren:a().int().nonnegative().optional()}),qd={name:`device-adoption`,scope:`system`,mode:`singleton`,status:{schema:Bd,kind:`poll`},methods:{listCandidateFilters:T(i({integrationId:g()}),i({filters:p(Fd)}),{auth:`admin`}),listCandidates:T(Ld,Rd,{auth:`admin`}),getCandidate:T(zd,Md.nullable(),{auth:`admin`}),refresh:T(i({integrationId:g()}),Bd,{kind:`mutation`,auth:`admin`}),adopt:T(Hd,Ud,{kind:`mutation`,auth:`admin`}),release:T(Wd,h(),{kind:`mutation`,auth:`admin`}),resync:T(Gd,Kd,{kind:`mutation`,auth:`admin`})}},Jd=m([`unlinked`,`linked`,`error`]),Yd=i({label:g(),value:g(),secret:v().optional()}),Xd=i({qr:g().optional(),fields:p(Yd).readonly().optional(),note:g().optional()}),Zd=i({linkState:Jd,exposedDeviceCount:a(),error:g().optional(),setup:Xd.optional()}),Qd=g(),$d=i({deviceId:g(),exposedAs:g().optional(),capabilities:p(g()).optional()}),ef=i({deviceId:g(),capabilities:p(g()).optional()}),tf=i({deviceId:g()}),nf={name:`device-export`,scope:`system`,mode:`collection`,providerKind:`device-export`,status:{schema:Zd,kind:`poll`},exposesDeviceSettings:!0,methods:{getStatus:T(h(),Zd),listSupportedDeviceKinds:T(h(),p(Qd)),listExposedDevices:T(h(),p($d)),exposeDevice:T(ef,h(),{kind:`mutation`}),unexposeDevice:T(tf,h(),{kind:`mutation`})}},rf=i({connected:v(),deviceCount:a(),error:g().optional()}),af=i({externalId:g(),name:g(),type:g(),metadata:n(g(),u()).optional()}),of=i({stableId:g(),type:m(D),suggestedName:g(),prefilledConfig:n(g(),u()),sourceInfo:Td.optional(),alreadyOnboarded:v().optional(),onboardedDeviceId:a().optional(),onboardedName:g().optional()}),sf=i({id:a(),stableId:g(),addonId:g(),type:g(),name:g(),parentDeviceId:a().nullable(),online:v(),features:p(g()),config:n(g(),u()),sourceInfo:Td.optional()}),cf=i({status:m([`ok`,`error`]),labels:p(g()).optional(),error:g().optional()}),lf=u(),uf={name:`device-provider`,scope:`system`,mode:`collection`,methods:{start:T(h(),h(),{kind:`mutation`}),stop:T(h(),h(),{kind:`mutation`}),getStatus:T(h(),rf),getDevices:T(h(),p(i({id:g(),name:g(),type:g()}))),reloadDevice:T(i({stableId:g()}),i({deviceId:a()}),{kind:`mutation`,timeoutMs:3*6e4}),supportsDiscovery:T(i({}),v()),discoverDevices:T(i({params:n(g(),u()).optional()}),p(of),{kind:`mutation`,auth:`admin`}),getDiscoveryParamsSchema:T(i({}),lf),getManualCreationType:T(i({}),i({deviceType:m(D).nullable()})),adoptDiscoveredDevice:T(i({candidate:of}),sf,{kind:`mutation`,auth:`admin`}),supportsManualCreation:T(i({}),v()),getChildCreationSchema:T(i({type:m(D)}),lf),createDevice:T(i({type:m(D),config:n(g(),u())}),sf,{kind:`mutation`,auth:`admin`}),testCreationField:T(i({type:m(D),key:g(),value:u(),formValues:n(g(),u()).optional()}),cf,{kind:`mutation`,auth:`admin`})}},df=i({childKey:g(),section:g(),order:a().optional(),collapsed:v().optional()}),ff=i({unit:g().min(1).optional(),precision:a().int().min(0).max(10).optional()}),pf=i({icon:g().min(1).optional(),label:g().min(1).optional(),unit:g().min(1).optional(),precision:a().int().min(0).max(10).optional(),hidden:v().optional(),perCap:n(g(),ff).optional()}),mf=i({unit:g().min(1).optional(),precision:a().int().min(0).max(10).optional(),icon:g().min(1).optional()}),hf=i({id:a(),stableId:g(),addonId:g(),type:m(D),name:g(),location:g().nullable(),disabled:v(),parentDeviceId:a().nullable(),role:g().nullable().optional(),online:v(),probed:v().optional(),features:p(g()),isCamera:v(),config:n(g(),u()),metadata:n(g(),u()).nullable().optional(),sourceInfo:Td.optional(),integrationId:g().optional(),linkDeviceId:a().nullable().optional(),primaryChildEntityId:g().nullable().optional(),childLayout:p(df).readonly().optional(),display:pf.optional()}),gf=i({key:g(),value:u(),description:g().optional()}),_f=m([`manual`]),vf=i({deviceId:a(),name:g(),location:g().nullable(),features:p(g()),producesTrackedEvents:v().optional()}),yf=i({deviceId:a(),mode:_f,devices:p(vf)}),bf=i({deviceId:a(),entries:p(i({capName:g(),kind:m([`native`,`wrapped`]),providerAddonId:g(),providerNodeId:g(),nativeAddonId:g()}))}),xf=i({id:a(),stableId:g(),type:g(),name:g(),location:g().nullable(),disabled:v(),parentDeviceId:a().nullable(),role:g().nullable().optional()}),Sf=i({id:a(),stableId:g(),addonId:g(),type:g(),name:g(),userNamed:v().optional(),location:g().nullable(),disabled:v(),parentDeviceId:a().nullable(),metadata:n(g(),u()).nullable().optional(),sourceInfo:Td.optional(),integrationId:g().optional(),linkDeviceId:a().nullable().optional(),primaryChildEntityId:g().nullable().optional(),childLayout:p(df).readonly().optional(),role:g().nullable().optional(),display:pf.optional()}),Cf=u().nullable(),wf=i({streamId:g(),width:a().optional(),height:a().optional(),codec:g().optional(),fps:a().optional(),bitrateKbps:a().optional()}),Tf=i({addonId:g(),stableId:g(),id:a(),type:g(),name:g(),location:g().nullable().optional(),disabled:v().optional(),parentDeviceId:a().nullable(),role:g().nullable().optional(),features:p(g()).optional(),config:n(g(),u())}),Ef=i({deviceId:a()}),Df=i({deviceId:a(),data:n(g(),u())}),Of=m([`off`,`on`,`not-offered`,`unreachable`]),kf=i({deviceId:a(),switchId:Mr,outcome:Of,detail:g().optional()}),Af=i({sourceId:a(),targetId:a(),switches:p(kf).readonly(),sourceStillLive:p(Mr).readonly(),swapped:v()}),jf={name:`device-manager`,scope:`system`,mode:`singleton`,exposesDeviceSettings:!0,methods:{allocateDeviceId:T(i({addonId:g(),stableId:g()}),i({id:a()}),{kind:`mutation`}),migrateDevice:T(i({sourceId:a(),targetId:a()}),Af,{kind:`mutation`,auth:`admin`,timeoutMs:12*6e4}),registerDevice:T(Tf,h(),{kind:`mutation`}),removeDevice:T(Ef,h(),{kind:`mutation`}),persistConfig:T(Df,h(),{kind:`mutation`}),loadConfig:T(i({deviceId:a()}),n(g(),u())),loadRuntimeState:T(i({deviceId:a()}),n(g(),u())),loadMeta:T(i({deviceId:a()}),Sf.nullable()),setName:T(i({deviceId:a(),name:g()}),h(),{kind:`mutation`,auth:`admin`}),setLocation:T(i({deviceId:a(),location:g().nullable()}),h(),{kind:`mutation`,auth:`admin`}),setType:T(i({deviceId:a(),type:m(D)}),h(),{kind:`mutation`,auth:`admin`}),setIntegrationId:T(i({deviceId:a(),integrationId:g()}),h(),{kind:`mutation`,auth:`admin`}),setLinkDeviceId:T(i({deviceId:a(),linkDeviceId:a().nullable()}),h(),{kind:`mutation`,auth:`admin`}),setPrimaryChildEntityId:T(i({deviceId:a(),primaryChildEntityId:g().nullable()}),h(),{kind:`mutation`,auth:`admin`}),setChildLayout:T(i({deviceId:a(),childLayout:p(df).readonly()}),h(),{kind:`mutation`,auth:`admin`}),setDisplay:T(i({deviceId:a(),display:pf.nullable()}),h(),{kind:`mutation`,auth:`admin`}),getRoleDisplayDefaults:T(i({}),i({defaults:n(g(),mf)}),{kind:`query`}),setRoleDisplayDefaults:T(i({defaults:n(g(),mf)}),h(),{kind:`mutation`,auth:`admin`}),getWireableFields:T(i({deviceId:a(),includeSynthesizable:v().optional()}),i({caps:p(i({cap:g(),fields:p(i({path:g(),kind:m([`string`,`number`,`boolean`,`enum`]),enumValues:p(g()).optional(),item:v().optional()})).readonly(),itemArray:i({path:g(),keyField:g()}).optional()})).readonly()}),{kind:`query`}),setRole:T(i({deviceId:a(),role:g().nullable()}),h(),{kind:`mutation`,auth:`admin`}),applyInitialMeta:T(i({deviceId:a(),name:g().optional(),location:g().nullable().optional(),type:m(D).optional(),integrationId:g().optional(),linkDeviceId:a().nullable().optional(),role:g().nullable().optional()}),h(),{kind:`mutation`,auth:`admin`}),setMetadata:T(i({deviceId:a(),patch:n(g(),u())}),h(),{kind:`mutation`,auth:`admin`}),listLocations:T(h(),p(g())),addLocation:T(i({name:g()}),h(),{kind:`mutation`,auth:`admin`}),removeLocation:T(i({name:g(),cascade:v().optional()}),h(),{kind:`mutation`,auth:`admin`}),renameLocation:T(i({from:g(),to:g()}),i({moved:a()}),{kind:`mutation`,auth:`admin`}),setDisabled:T(i({deviceId:a(),disabled:v()}),h(),{kind:`mutation`,auth:`admin`}),listPersistedByAddon:T(i({addonId:g()}),p(xf)),listAll:T(i({addonId:g().optional(),projection:m([`full`,`slim`]).optional(),isCamera:v().optional(),deviceIds:p(a()).optional()}),p(hf)),getDevice:T(i({deviceId:a()}),hf.nullable()),getChildren:T(i({parentDeviceId:a()}),p(hf)),getChildrenBatch:T(i({parentDeviceIds:p(a()).max(256)}),n(g(),p(hf))),getLinkedDevices:T(i({deviceId:a()}),i({mode:_f,devices:p(vf)})),getLinkedDevicesBatch:T(i({deviceIds:p(a())}),p(yf)),getStreamSources:T(i({deviceId:a()}),p(Ze)),getConfigSchema:T(i({deviceId:a()}),p(gf)),getSettingsSchema:T(i({deviceId:a()}),Cf),updateConfig:T(i({deviceId:a(),values:n(g(),u())}),i({success:y(!0)}),{kind:`mutation`,auth:`admin`}),enable:T(i({deviceId:a()}),i({success:y(!0)}),{kind:`mutation`,auth:`admin`}),disable:T(i({deviceId:a()}),i({success:y(!0)}),{kind:`mutation`,auth:`admin`}),remove:T(i({deviceId:a()}),i({success:y(!0)}),{kind:`mutation`,auth:`admin`}),removeByIntegration:T(i({integrationId:g()}),i({removed:a()}),{kind:`mutation`,auth:`admin`}),getStreamProfileMap:T(i({deviceId:a()}),n(g(),g().nullable())),setStreamProfileMap:T(i({deviceId:a(),profileMap:n(g(),g().nullable())}),i({success:y(!0)}),{kind:`mutation`,auth:`admin`}),probeStreams:T(i({deviceId:a()}),p(wf),{kind:`mutation`,auth:`admin`}),getBindings:T(i({deviceId:a()}),bf),getBindingsBatch:T(i({deviceIds:p(a())}),p(bf)),getAllBindings:T(i({}),p(bf)),setWrapperActive:T(i({deviceId:a(),capName:g(),wrapperAddonId:g(),active:v()}),h(),{kind:`mutation`,auth:`admin`}),listWrappersForCap:T(i({capName:g()}),p(g())),listBindableCapsForDeviceType:T(i({deviceType:g()}),p(i({capName:g(),wrappers:p(g())}))),getDeviceSettingsAggregate:T(i({deviceId:a()}),B.nullable()),getDeviceLiveInfoAggregate:T(i({deviceId:a()}),B.nullable()),getDeviceAggregate:T(i({deviceId:a()}),i({settings:B.nullable(),live:B.nullable()})),runDeviceAction:T(i({deviceId:a().int().nonnegative(),action:g().min(1),input:u()}),u(),{kind:`mutation`}),updateDeviceField:T(i({deviceId:a(),writerCapName:g(),writerAddonId:g(),key:g(),value:u()}),i({success:y(!0)}),{kind:`mutation`,auth:`admin`}),updateDeviceFieldsBatch:T(i({deviceId:a(),changes:p(i({writerCapName:g(),writerAddonId:g(),key:g(),value:u()}))}),i({success:y(!0),failures:p(i({writerCapName:g(),writerAddonId:g(),error:g()}))}),{kind:`mutation`,auth:`admin`}),discoverDevices:T(i({addonId:g()}),p(of),{kind:`mutation`,auth:`admin`}),adoptDevice:T(i({addonId:g(),candidate:of,integrationId:g().optional()}),sf,{kind:`mutation`,auth:`admin`}),getCreationSchema:T(i({addonId:g(),type:m(D)}),u().nullable()),createDevice:T(i({addonId:g(),type:m(D),config:n(g(),u()),integrationId:g().optional()}),sf,{kind:`mutation`,auth:`admin`}),testCreationField:T(i({addonId:g(),type:m(D),key:g(),value:u(),formValues:n(g(),u()).optional()}),cf,{kind:`mutation`,auth:`admin`}),adoptionListCandidateFilters:T(i({addonId:g(),integrationId:g()}),i({filters:p(Fd)}),{auth:`admin`}),adoptionListCandidates:T(Ld.extend({addonId:g()}),Rd,{auth:`admin`}),adoptionRefresh:T(i({addonId:g(),integrationId:g()}),Bd,{kind:`mutation`,auth:`admin`}),adoptionAdopt:T(Hd.extend({addonId:g()}),Ud,{kind:`mutation`,auth:`admin`}),adoptionRelease:T(Wd.extend({addonId:g()}),h(),{kind:`mutation`,auth:`admin`}),adoptionStartJob:T(Hd.extend({addonId:g()}),i({jobId:g()}),{kind:`mutation`,auth:`admin`}),adoptionListJobs:T(i({addonId:g(),integrationId:g().optional()}),p(Ar).readonly(),{auth:`admin`}),adoptionCancelJob:T(i({jobId:g()}),i({cancelled:v()}),{kind:`mutation`,auth:`admin`}),adoptionResync:T(Gd,Kd,{kind:`mutation`,auth:`admin`}),discoveryProviders:T(i({}),i({providers:p(i({addonId:g(),label:g()})).readonly()}),{auth:`admin`}),discoverAllProviders:T(i({}),i({groups:p(i({addonId:g(),label:g(),candidates:p(of).readonly(),error:g().nullable()})).readonly()}),{kind:`mutation`,auth:`admin`}),discoverProvider:T(i({addonId:g(),params:n(g(),u()).optional()}),i({candidates:p(of).readonly()}),{kind:`mutation`,auth:`admin`}),providerCreationType:T(i({addonId:g()}),i({deviceType:m(D).nullable()}),{auth:`admin`}),providerDiscoveryParamsSchema:T(i({addonId:g()}),u(),{auth:`admin`}),testField:T(i({deviceId:a(),key:g(),value:u()}),cf,{kind:`mutation`,auth:`admin`}),getDeviceStatusAggregate:T(i({deviceId:a(),caps:p(g()).readonly().optional()}),n(g(),u().nullable())),getDeviceStatusAggregateBatch:T(i({deviceIds:p(a()).readonly(),caps:p(g()).readonly().optional()}),n(g(),n(g(),u().nullable())))}},Mf={name:`device-state`,scope:`system`,mode:`singleton`,methods:{getSnapshot:T(i({deviceId:a()}),n(g(),n(g(),u()))),getCapSlice:T(i({deviceId:a(),capName:g()}),n(g(),u()).nullable()),getAllSnapshots:T(i({}),n(g(),n(g(),n(g(),u())))),setCapSlice:T(i({deviceId:a(),capName:g(),slice:n(g(),u())}),h(),{kind:`mutation`})},events:{onChanged:E(i({deviceId:a(),capName:g(),slice:n(g(),u())}))}},Nf=i({embedding:p(a()),inferenceMs:a()}),Pf=i({modelId:g(),embeddingDim:a(),ready:v()}),Ff={name:`embedding-encoder`,scope:`system`,mode:`collection`,internal:!0,methods:{encode:T(i({crop:_(Uint8Array),width:a(),height:a()}),Nf,{auth:`admin`}),encodeText:T(i({text:g()}),Nf,{auth:`admin`}),getInfo:T(h(),Pf,{auth:`admin`})}},If=i({reason:g(),count:a().int().nonnegative()}),Lf=i({family:g(),deviceId:a().int().positive(),variant:g().optional(),sinceMs:a(),atMs:a(),attempts:a().int().nonnegative(),succeeded:a().int().nonnegative(),reasons:p(If).readonly()}),Rf={name:`failure-contribution`,scope:`system`,mode:`collection`,internal:!0,methods:{list:T(h(),p(Lf).readonly())},mount:{kind:`skip`}},zf=i({name:g(),path:g()}),Bf=i({path:g(),entries:p(zf).readonly(),freeBytes:a(),totalBytes:a()}),Vf={name:`filesystem-browse`,scope:`system`,mode:`singleton`,internal:!0,methods:{listAllowedRoots:T(h(),p(g()).readonly(),{auth:`admin`}),browse:T(i({path:g()}),Bf,{auth:`admin`}),createDir:T(i({path:g()}),i({path:g()}),{kind:`mutation`,auth:`admin`})}},Hf=6e5,Uf=60*6e4,Wf=i({inputTokens:a(),outputTokens:a()}),Gf=m([`timeout`,`rate-limited`,`auth`,`refusal`,`bad-request`,`unavailable`,`no-profile`,`budget-exceeded`,`adapter-error`]),Kf=i({ok:y(!0),text:g(),model:g(),usage:Wf,truncated:v(),latencyMs:a()}),qf=i({ok:y(!1),code:Gf,message:g(),retryAfterMs:a().optional()}),Jf=b(`ok`,[Kf,qf]),Yf=i({bytes:_(Uint8Array),mimeType:g()}),Xf=i({enabled:v().default(!1),maxAttempts:a().int().min(1).max(5).default(1)}),Zf={totalMs:6e4,connectMs:1e4,firstTokenMs:12e4,idleMs:6e4},Qf=i({addonId:g().optional(),profileId:g().optional(),consumer:g(),system:g().optional(),prompt:g(),jsonSchema:n(g(),u()).optional(),maxTokens:a().int().positive().optional(),temperature:a().optional(),topP:a().min(0).max(1).optional(),topK:a().int().positive().optional(),timeoutMs:a().int().positive().optional(),retry:Xf.optional(),requestId:g().optional()}),$f=i({url:g(),filename:g(),sizeBytes:a(),sha256:g().optional()}),ep=b(`kind`,[i({kind:y(`catalog`),catalogId:g()}),i({kind:y(`url`),url:g(),sha256:g().optional(),label:g().optional(),sizeBytes:a().optional(),extraFiles:p($f).optional()}),i({kind:y(`path`),path:g()})]),tp=i({nodeId:g(),engine:m([`llama-cpp`]),model:ep,contextSize:a().int().default(4096),gpuLayers:a().int().default(0),threads:a().int().optional(),parallel:a().int().default(1),batchSize:a().int().positive().optional(),ubatchSize:a().int().positive().optional(),flashAttention:v().default(!1),mlock:v().default(!1),noMmap:v().default(!1),cacheTypeK:m([`f32`,`f16`,`q8_0`,`q5_1`,`q5_0`,`q4_1`,`q4_0`]).optional(),cacheTypeV:m([`f32`,`f16`,`q8_0`,`q5_1`,`q5_0`,`q4_1`,`q4_0`]).optional(),extraArgs:p(g()).default([]),autoStart:v().default(!1),idleStopMinutes:a().int().default(30)}),np=i({phase:m([`downloading`,`verifying`]),file:g(),fileIndex:a().int(),fileCount:a().int(),downloadedBytes:a(),totalBytes:a().optional()}),rp=i({nodeId:g(),state:m([`stopped`,`downloading`,`starting`,`ready`,`crashed`,`failed`]),pid:a().optional(),port:a().optional(),modelPath:g().optional(),modelId:g().optional(),downloadProgress:a().min(0).max(1).optional(),download:np.optional(),lastError:g().optional(),crashesInWindow:a(),memoryBytes:a().optional(),vramBytes:a().optional()}),ip=i({file:g(),sizeBytes:a(),catalogId:g().optional(),installedAt:a().optional(),path:g().optional()}),ap=i({nodeId:g(),modelsBytes:a(),freeBytes:a().optional()}),op=Qf.extend({images:p(Yf).optional(),runtime:tp,timeoutMs:a().int().positive().optional()}),sp={name:`llm-runtime`,scope:`system`,mode:`singleton`,internal:!0,methods:{complete:T(op,Jf,{kind:`mutation`,auth:`admin`,timeoutMs:Hf}),ensureStarted:T(i({runtime:tp}),rp,{kind:`mutation`,auth:`admin`,timeoutMs:Hf}),stop:T(i({}),h(),{kind:`mutation`,auth:`admin`}),status:T(i({}),rp,{auth:`admin`}),installModel:T(i({model:ep}),h(),{kind:`mutation`,auth:`admin`,timeoutMs:Uf}),deleteModel:T(i({file:g()}),h(),{kind:`mutation`,auth:`admin`}),listLocalModels:T(i({}),p(ip),{auth:`admin`}),getDiskUsage:T(i({}),ap,{auth:`admin`})}},cp=m([`openai-compatible`,`openai`,`anthropic`,`google`,`managed-local`]),lp=i({id:g(),name:g(),kind:cp,addonId:g(),enabled:v(),model:g(),baseUrl:g().optional(),apiKey:g().optional(),supportsVision:v(),temperature:a().min(0).max(2).optional(),topP:a().min(0).max(1).optional(),topK:a().int().positive().optional(),maxTokens:a().int().positive().optional(),contextLength:a().int().positive().optional(),systemPrompt:g().optional(),timeoutMs:a().int().positive().default(6e4),connectTimeoutMs:a().int().positive().default(1e4),firstTokenTimeoutMs:a().int().positive().default(12e4),idleTimeoutMs:a().int().positive().default(6e4),retry:Xf.default({enabled:!1,maxAttempts:1}),toolsEnabled:v().default(!1),extraHeaders:n(g(),g()).optional(),runtime:tp.optional()}),up=u(),dp=i({kind:cp,label:g(),icon:g(),addonId:g(),configSchema:up}),fp=c([i({consumer:g()}),i({purpose:m([`text`,`vision`])})]),pp=i({selector:fp,profileId:g()}),mp=i({day:g(),consumer:g(),profileId:g(),calls:a(),okCalls:a(),errorCalls:a(),inputTokens:a(),outputTokens:a(),avgLatencyMs:a()}),hp=i({id:g(),label:g(),family:g(),purpose:m([`text`,`vision`]),url:g(),sha256:g(),sizeBytes:a(),quantization:g(),minRamBytes:a(),contextSizeDefault:a().int(),mmprojUrl:g().optional()}),gp=b(`ok`,[i({ok:y(!0),model:ep,label:g(),repo:g(),quantization:g(),purpose:m([`text`,`vision`]),totalBytes:a(),extraFilenames:p(g())}),i({ok:y(!1),code:g(),message:g(),candidates:p(g()).optional(),requiredBytes:a().optional()})]),_p=i({nodeId:g(),reachable:v(),status:rp.optional(),disk:ap.optional(),error:g().optional()}),vp=Qf.extend({images:p(Yf).min(1)}),yp=i({addonId:g(),profileId:g()}),bp={name:`llm`,scope:`system`,mode:`collection`,internal:!1,providerKind:`ai`,nodeIdMode:`data`,methods:{generate:T(Qf,Jf,{kind:`mutation`,timeoutMs:Hf}),generateVision:T(vp,Jf,{kind:`mutation`,timeoutMs:Hf}),cancel:T(i({addonId:g().optional(),requestId:g()}),h(),{kind:`mutation`}),listProfileKinds:T(i({}),p(dp)),listProfiles:T(i({}),p(lp)),upsertProfile:T(i({profile:lp}),lp,{kind:`mutation`,auth:`admin`}),deleteProfile:T(yp,h(),{kind:`mutation`,auth:`admin`}),testProfile:T(yp,Jf,{kind:`mutation`,auth:`admin`,timeoutMs:Hf}),listModels:T(yp,p(g())),getDefaults:T(i({}),p(pp)),setDefault:T(i({selector:fp,profileId:g().nullable()}),h(),{kind:`mutation`,auth:`admin`}),getUsage:T(i({since:a().optional(),until:a().optional(),consumer:g().optional(),profileId:g().optional()}),p(mp)),listModelCatalog:T(i({}),p(hp)),listRuntimeNodes:T(i({}),p(_p)),listNodeModels:T(i({nodeId:g()}),p(ip)),resolveModelRef:T(i({ref:g(),maxBytes:a().positive().optional()}),gp,{kind:`mutation`,auth:`admin`}),installModel:T(i({nodeId:g(),model:ep}),h(),{kind:`mutation`,auth:`admin`}),deleteModel:T(i({nodeId:g(),file:g()}),h(),{kind:`mutation`,auth:`admin`}),getRuntimeStatus:T(yp,rp),startRuntime:T(yp,rp,{kind:`mutation`,auth:`admin`}),stopRuntime:T(yp,h(),{kind:`mutation`,auth:`admin`})}},xp=[`decode`,`transcode`,`recording`,`streaming`,`detection`],Sp=[`measured`,`accounted`,`unattributable`],Cp=i({role:m(xp),deviceId:a().int().positive().nullable(),attribution:m(Sp),unit:g(),pid:a().int().positive().optional(),startedAtMs:a().optional(),cpuSeconds:a().optional(),rssBytes:a().optional()}),wp={name:`load-contribution`,scope:`system`,mode:`collection`,internal:!0,methods:{list:T(h(),p(Cp).readonly())},mount:{kind:`skip`}},Tp=i({armed:a().int().min(0),unknown:p(g()).readonly()}),Ep={name:`log-channels`,scope:`system`,mode:`collection`,internal:!0,methods:{list:T(h(),p(_o).readonly()),apply:T(i({windows:p(vo).readonly()}),Tp,{kind:`mutation`})},mount:{kind:`skip`}},Dp=m([`debug`,`info`,`warn`,`error`]),Op=i({timestamp:te(),level:Dp,scope:p(g()),message:g(),meta:n(g(),u()).optional(),tags:n(g(),g()).optional()}),kp={name:`log-destination`,scope:`system`,mode:`collection`,internal:!0,methods:{write:T(Op,h(),{kind:`mutation`}),query:T(i({scope:p(g()).optional(),level:Dp.optional(),since:te().optional(),until:te().optional(),limit:a().optional(),tags:n(g(),g()).optional()}),p(Op).readonly())},mount:{kind:`skip`}},Ap=m([`primary`,`second-factor`]),jp=i({kind:y(`redirect`),id:g(),label:g(),icon:g().optional(),startUrl:g(),stage:Ap}),Mp=i({kind:y(`widget`),id:g(),addonId:g(),bundle:g(),remote:Qc,stage:Ap}),Np=i({kind:y(`passkey`),id:g(),label:g(),stage:Ap,rpId:g(),origin:g().nullable()}),Pp=b(`kind`,[jp,Mp,Np]),Fp={name:`login-method`,scope:`system`,mode:`collection`,internal:!0,methods:{getLoginMethods:T(h(),p(Pp).readonly())},mount:{kind:`skip`}},Ip=i({total:a(),user:a(),system:a(),irq:a(),nice:a(),loadAvg:s([a(),a(),a()]),cores:a()}),Lp=i({percent:a(),totalBytes:a(),usedBytes:a(),availableBytes:a(),swapUsedBytes:a(),swapTotalBytes:a()}),Rp=i({readBytes:a(),writeBytes:a(),readOps:a(),writeOps:a(),timestampMs:a()}),zp=i({rxBytes:a(),txBytes:a(),rxPackets:a(),txPackets:a(),rxErrors:a(),txErrors:a(),timestampMs:a()}),Bp=i({utilization:a(),model:g(),memoryUsedBytes:a(),memoryTotalBytes:a(),temperature:a().nullable()}),Vp=i({openFds:a(),threadCount:a(),activeHandles:a(),activeRequests:a()}),Hp=i({avg10:a(),avg60:a(),avg300:a()}),Up=i({some:Hp,full:Hp.nullable()}),Wp=i({cpu:Ip,memory:Lp,gpu:Bp.nullable(),network:zp,disk:Rp,pressure:i({cpu:Up.nullable(),memory:Up.nullable(),io:Up.nullable()}),process:Vp,cpuTemperature:a().nullable(),timestampMs:a()}),Gp=i({path:g(),totalBytes:a(),usedBytes:a(),availableBytes:a(),percent:a()}),Kp=i({pid:a(),cpu:a(),memory:a(),privateBytes:a().optional(),sharedBytes:a().optional()}),qp=i({addonId:g(),nodeId:g(),role:m([`hub`,`worker`]),pid:a(),state:m([`starting`,`running`,`stopping`,`stopped`,`crashed`]),uptimeSec:a()}),Jp=i({pid:a(),ppid:a(),pgid:a(),classification:m([`root`,`managed`,`system`]),addonId:g().nullable(),nodeId:g().nullable(),command:g(),cpuPercent:a(),memoryRssBytes:a(),cpuMainPercent:a().nullable(),cpuGcPercent:a().nullable(),threadCount:a().nullable(),uptimeSec:a()}),Yp=i({source:m([`cgroup-v2`,`cgroup-v1`]),currentBytes:a(),limitBytes:a().nullable(),anonBytes:a().nullable(),fileBytes:a().nullable(),shmemBytes:a().nullable(),slabBytes:a().nullable(),gpuShmemBytes:a().nullable()}).extend({atMs:a()}),Xp=i({atMs:a(),samples:a().int(),cpuMainPercent:a().nullable(),cpuMainPercentMin:a().nullable(),cpuGcPercent:a().nullable(),cpuGcPercentMin:a().nullable(),cpuLifetimePercent:a(),cpuLifetimePercentMin:a(),memoryRssBytes:a(),memoryRssBytesMin:a(),processCount:a().int(),processCountMin:a().int()}),Zp=i({key:g(),kind:m([`addon`,`root`,`unattributed`]),points:p(Xp).readonly()}),Qp=i({nodeId:g(),series:p(Zp).readonly(),containerMemory:p(Yp).readonly(),bucketMs:a(),retainedSamples:a(),oldestAtMs:a().nullable(),cadenceMs:a(),durable:v()}),$p=i({forNodeId:g(),sinceMs:a().optional(),maxPoints:a().int().positive().optional()}),em=i({cpuPercent:a(),memoryPercent:a(),memoryUsedMB:a(),memoryTotalMB:a(),diskPercent:a().optional(),temperature:a().optional(),gpuPercent:a().optional(),gpuMemoryPercent:a().optional()}),tm={name:`metrics-provider`,scope:`system`,mode:`singleton`,methods:{collectSnapshot:T(h(),Wp),getCached:T(h(),Wp.nullable()),getCurrent:T(h(),em),getDiskSpace:T(i({dirPath:g()}),Gp),getGpuInfo:T(h(),Bp.nullable()),getCpuTemperature:T(h(),a().nullable()),getProcessStats:T(i({pids:p(a())}),p(Kp)),listAddonInstances:T(h(),p(qp).readonly()),getAddonStats:T(i({addonId:g()}),Kp.nullable()),listNodeProcesses:T(h(),p(Jp).readonly()),getLoadSeries:T($p,Qp)}},nm=i({sourceUrl:g(),metadata:ms,targets:p(ps).min(1).readonly(),calibrationRef:g().optional(),sessionId:g().optional()}),rm={name:`model-convert`,scope:`system`,mode:`singleton`,internal:!0,methods:{convert:T(nm,gs,{kind:`mutation`,auth:`admin`,timeoutMs:6e5})}},im=i({nodeId:g(),modelId:g(),format:m(is),entry:fs}),am=i({ok:v(),sha256:g(),bytes:a(),path:g()}),om={name:`model-distributor`,scope:`system`,mode:`singleton`,internal:!0,methods:{distributeModel:T(im,am,{kind:`mutation`,auth:`admin`})}},sm=i({bbox:V,pixelCount:a(),intensity:a()}),cm=i({detected:v(),regionCount:a(),regions:p(sm).readonly(),rawRegions:p(sm).readonly(),frameWidth:a(),frameHeight:a(),analysisMs:a()}),lm={name:`motion-detection`,scope:`device`,mode:`singleton`,kind:`wrapper`,defaultActive:!0,deviceTypes:[D.Camera],exposesDeviceSettings:!0,methods:{analyze:T(i({deviceId:a(),frame:ul.optional(),frameHandle:w.optional()}),cm,{kind:`mutation`}),removeCamera:T(i({deviceId:a()}),h(),{kind:`mutation`}),reset:T(h(),h(),{kind:`mutation`})},events:{onMotion:{data:i({deviceId:a(),detected:v(),regionCount:a()})}}},um=m([`external`,`embedded`]),dm=m([`connected`,`disconnected`,`auth-failed`,`unreachable`,`tls-error`]),fm=i({id:g(),name:g(),url:g(),kind:um,status:dm,latencyMs:a().nullable(),error:g().optional(),connectedClients:a().int().nonnegative().optional(),lastCheckedAt:a().optional()}),pm=i({url:g(),username:g().optional(),password:g().optional(),clientIdPrefix:g().optional()}),mm=i({name:g().min(1),url:g().regex(/^(mqtt|mqtts|ws|wss):\/\//,`URL must start with mqtt(s):// or ws(s)://`),username:g().optional(),password:g().optional(),clientIdPrefix:g().optional()}),hm=i({id:g()}),gm=i({id:g()}),_m=b(`ok`,[i({ok:y(!0),latencyMs:a()}),i({ok:y(!1),error:g()})]),vm=i({port:a().int().min(1).max(65535).default(1883),allowAnonymous:v().default(!1),username:g().optional(),password:g().optional()}),ym=i({id:g(),url:g()}),bm=i({brokerCount:a(),embeddedRunning:v()}),xm={name:`mqtt-broker`,scope:`system`,mode:`collection`,providerKind:`broker`,status:{schema:bm,kind:`poll`},methods:{listBrokers:T(h(),p(fm)),getBrokerConfig:T(gm,pm),addBroker:T(mm,hm,{kind:`mutation`}),removeBroker:T(gm,h(),{kind:`mutation`}),testConnection:T(gm,_m,{kind:`mutation`}),startEmbeddedBroker:T(vm,ym,{kind:`mutation`}),stopEmbeddedBroker:T(gm,h(),{kind:`mutation`}),getStatus:T(h(),bm)}},Sm=i({url:g(),hostname:g(),port:a(),protocol:m([`http`,`https`])}),Cm=i({connected:v(),endpoint:Sm.nullable(),error:g().optional()}),wm=Sm.extend({id:g(),label:g(),mode:g().optional(),sourcePort:a().optional()}),Tm={name:`network-access`,scope:`system`,mode:`collection`,providerKind:`ingress`,methods:{start:T(h(),Sm,{kind:`mutation`}),stop:T(h(),h(),{kind:`mutation`}),getEndpoint:T(h(),Sm.nullable()),getStatus:T(h(),Cm),listEndpoints:T(h(),p(wm).readonly())}},Em=m([`image`,`video`,`gif`,`audio`,`icon`]),Dm=i({mediaType:Em,url:g().optional(),bytes:_(Uint8Array).optional(),mime:g().optional(),name:g().optional()}).refine(e=>e.url!==void 0||e.bytes!==void 0,{message:"Attachment requires either `url` or `bytes`"}),Om=m([`text`,`markdown`,`html`]),km=m([`acknowledge`,`dismiss`,`silence`,`snooze`,`view`,`play`,`open`,`close`,`lock`,`unlock`,`arm`,`arm-home`,`arm-away`,`arm-night`,`disarm`,`light`,`alert`,`camera`]),Am=i({id:g(),label:g(),url:g().optional(),icon:km.optional(),destructive:v().optional(),mode:m([`navigate`,`background`]).optional()}),jm=i({body:g(),title:g().optional(),format:Om.default(`text`),priority:a().int().min(1).max(5).default(3),level:g().optional(),attachments:p(Dm).optional(),clickUrl:g().optional(),actions:p(Am).optional(),sound:g().optional(),ttl:a().optional(),tag:g().optional(),deviceId:a().optional(),eventId:g().optional(),metadata:n(g(),u()).optional()}),Mm=i({id:g(),label:g(),ordinal:a().int().min(1).max(5).nullable(),flags:i({critical:v().optional(),silent:v().optional(),noPush:v().optional()}).optional(),requires:p(g()).optional(),description:g().optional()}),Nm=i({attachments:i({mediaTypes:p(Em),mode:m([`url`,`bytes`,`both`]),max:a().int().nonnegative(),maxBytes:a().int().positive().optional()}),actions:a().int().nonnegative(),actionIcons:v().optional(),levels:p(Mm),format:p(Om),clickUrl:v(),sound:v(),ttl:v(),bodyMaxLen:a().int().positive()}),Pm=u(),Fm=i({kind:g(),label:g(),icon:g(),addonId:g(),iconUrl:g().optional(),iconMediaType:g().optional(),configSchema:Pm,supportsDiscovery:v(),caps:Nm}),Im=i({id:g(),name:g(),kind:g(),addonId:g(),enabled:v(),config:n(g(),u())}),Lm=i({kind:g(),suggestedName:g(),config:n(g(),u())}),Rm=i({level:g(),format:Om,attachmentsSent:a().int().nonnegative(),actionsSent:a().int().nonnegative(),truncated:v(),dropped:p(g())}),zm=i({success:v(),error:g().optional(),renderedAs:Rm.optional()}),Bm=zm,Vm={name:`notification-output`,scope:`system`,mode:`collection`,methods:{listTargetKinds:T(i({}),p(Fm)),listTargets:T(i({}),p(Im)),discoverTargets:T(i({kind:g(),config:n(g(),u()).optional()}),p(Lm)),send:T(i({targetId:g(),notification:jm}),zm,{kind:`mutation`}),testTarget:T(i({targetId:g(),sample:jm.optional()}),Bm,{kind:`mutation`}),upsertTarget:T(i({target:Im}),Im,{kind:`mutation`}),deleteTarget:T(i({targetId:g()}),h(),{kind:`mutation`}),setTargetEnabled:T(i({targetId:g(),enabled:v()}),h(),{kind:`mutation`})}},Hm=[{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`}],Um=[{id:`person`,name:`Person`},{id:`vehicle`,name:`Vehicle`},{id:`animal`,name:`Animal`},{id:`package`,name:`Package`}],Wm=new Set(Um.map(e=>e.id));function Gm(e){return Wm.has(e.trim().toLowerCase())}var Km={mapping:{person:`person`,bicycle:`vehicle`,car:`vehicle`,motorcycle:`vehicle`,airplane:`vehicle`,bus:`vehicle`,train:`vehicle`,truck:`vehicle`,boat:`vehicle`,bird:`animal`,cat:`animal`,dog:`animal`,horse:`animal`,sheep:`animal`,cow:`animal`,elephant:`animal`,bear:`animal`,zebra:`animal`,giraffe:`animal`,suitcase:`package`,backpack:`package`,handbag:`package`},preserveOriginal:!1},qm=[{id:`speech`,name:`Speech`},{id:`scream`,name:`Scream / Shout`},{id:`crying`,name:`Crying / Baby`},{id:`laughter`,name:`Laughter`},{id:`music`,name:`Music`},{id:`dog`,name:`Dog`},{id:`cat`,name:`Cat`},{id:`bird`,name:`Bird`},{id:`animal`,name:`Animal (other)`},{id:`alarm`,name:`Alarm / Siren`},{id:`doorbell`,name:`Doorbell / Knock`},{id:`glass_breaking`,name:`Glass Breaking`},{id:`gunshot`,name:`Gunshot / Explosion`},{id:`vehicle`,name:`Vehicle`},{id:`siren`,name:`Emergency Siren`},{id:`fire`,name:`Fire / Smoke`},{id:`water`,name:`Water`},{id:`wind`,name:`Wind / Weather`},{id:`door`,name:`Door`},{id:`footsteps`,name:`Footsteps`},{id:`crowd`,name:`Crowd / Chatter`},{id:`telephone`,name:`Telephone`},{id:`engine`,name:`Engine / Motor`},{id:`tools`,name:`Tools / Construction`},{id:`silence`,name:`Silence`}],Jm={mapping:{Speech:`speech`,"Child speech, kid speaking":`speech`,Conversation:`speech`,"Narration, monologue":`speech`,Babbling:`speech`,Whispering:`speech`,"Speech synthesizer":`speech`,Humming:`speech`,Rapping:`speech`,Singing:`speech`,Choir:`speech`,"Child singing":`speech`,Shout:`scream`,Bellow:`scream`,Yell:`scream`,Screaming:`scream`,"Children shouting":`scream`,Whoop:`scream`,"Crying, sobbing":`crying`,"Baby cry, infant cry":`crying`,Whimper:`crying`,"Wail, moan":`crying`,Groan:`crying`,Laughter:`laughter`,"Baby laughter":`laughter`,Giggle:`laughter`,Snicker:`laughter`,"Belly laugh":`laughter`,"Chuckle, chortle":`laughter`,Music:`music`,"Musical instrument":`music`,Guitar:`music`,Piano:`music`,Drum:`music`,"Drum kit":`music`,"Violin, fiddle":`music`,Flute:`music`,Saxophone:`music`,Trumpet:`music`,Synthesizer:`music`,"Pop music":`music`,"Rock music":`music`,"Hip hop music":`music`,"Classical music":`music`,Jazz:`music`,"Electronic music":`music`,"Background music":`music`,Dog:`dog`,Bark:`dog`,Yip:`dog`,Howl:`dog`,"Bow-wow":`dog`,Growling:`dog`,"Whimper (dog)":`dog`,Cat:`cat`,Purr:`cat`,Meow:`cat`,Hiss:`cat`,Caterwaul:`cat`,Bird:`bird`,"Bird vocalization, bird call, bird song":`bird`,"Chirp, tweet":`bird`,Squawk:`bird`,Crow:`bird`,Owl:`bird`,"Pigeon, dove":`bird`,Animal:`animal`,"Domestic animals, pets":`animal`,"Livestock, farm animals, working animals":`animal`,Horse:`animal`,"Cattle, bovinae":`animal`,Pig:`animal`,Sheep:`animal`,Goat:`animal`,Frog:`animal`,Insect:`animal`,Cricket:`animal`,Alarm:`alarm`,"Alarm clock":`alarm`,"Smoke detector, smoke alarm":`alarm`,"Fire alarm":`alarm`,Buzzer:`alarm`,"Civil defense siren":`alarm`,"Car alarm":`alarm`,Siren:`siren`,"Police car (siren)":`siren`,"Ambulance (siren)":`siren`,"Fire engine, fire truck (siren)":`siren`,"Emergency vehicle":`siren`,Foghorn:`siren`,Doorbell:`doorbell`,"Ding-dong":`doorbell`,Knock:`doorbell`,Tap:`doorbell`,Glass:`glass_breaking`,Shatter:`glass_breaking`,"Chink, clink":`glass_breaking`,"Gunshot, gunfire":`gunshot`,"Machine gun":`gunshot`,Explosion:`gunshot`,Fireworks:`gunshot`,Firecracker:`gunshot`,"Artillery fire":`gunshot`,"Cap gun":`gunshot`,Boom:`gunshot`,Vehicle:`vehicle`,Car:`vehicle`,Truck:`vehicle`,Bus:`vehicle`,Motorcycle:`vehicle`,"Car passing by":`vehicle`,"Vehicle horn, car horn, honking":`vehicle`,"Traffic noise, roadway noise":`vehicle`,Train:`vehicle`,Aircraft:`vehicle`,Helicopter:`vehicle`,Bicycle:`vehicle`,Skateboard:`vehicle`,Fire:`fire`,Crackle:`fire`,Water:`water`,Rain:`water`,Raindrop:`water`,"Rain on surface":`water`,Stream:`water`,Waterfall:`water`,Ocean:`water`,"Waves, surf":`water`,"Splash, splatter":`water`,Wind:`wind`,Thunderstorm:`wind`,Thunder:`wind`,"Wind noise (microphone)":`wind`,"Rustling leaves":`wind`,Door:`door`,"Sliding door":`door`,Slam:`door`,"Cupboard open or close":`door`,"Walk, footsteps":`footsteps`,Run:`footsteps`,Shuffle:`footsteps`,Crowd:`crowd`,Chatter:`crowd`,Cheering:`crowd`,Applause:`crowd`,"Children playing":`crowd`,"Hubbub, speech noise, speech babble":`crowd`,Telephone:`telephone`,"Telephone bell ringing":`telephone`,Ringtone:`telephone`,"Telephone dialing, DTMF":`telephone`,"Busy signal":`telephone`,Engine:`engine`,"Engine starting":`engine`,Idling:`engine`,"Accelerating, revving, vroom":`engine`,"Light engine (high frequency)":`engine`,"Medium engine (mid frequency)":`engine`,"Heavy engine (low frequency)":`engine`,"Lawn mower":`engine`,Chainsaw:`engine`,Hammer:`tools`,Jackhammer:`tools`,Sawing:`tools`,"Power tool":`tools`,Drill:`tools`,Sanding:`tools`,Silence:`silence`},preserveOriginal:!1},Ym={mapping:{speech:`speech`,child_speech:`speech`,conversation:`speech`,whispering:`speech`,singing:`speech`,humming:`speech`,shout:`scream`,yell:`scream`,screaming:`scream`,crying:`crying`,baby_crying:`crying`,sobbing:`crying`,laughter:`laughter`,baby_laughter:`laughter`,giggling:`laughter`,music:`music`,guitar:`music`,piano:`music`,drums:`music`,dog_bark:`dog`,dog_bow_wow:`dog`,dog_growling:`dog`,dog_howl:`dog`,cat_meow:`cat`,cat_purr:`cat`,cat_hiss:`cat`,bird:`bird`,bird_chirp:`bird`,bird_squawk:`bird`,animal:`animal`,horse:`animal`,cow_moo:`animal`,insect:`animal`,alarm:`alarm`,smoke_alarm:`alarm`,fire_alarm:`alarm`,car_alarm:`alarm`,siren:`siren`,police_siren:`siren`,ambulance_siren:`siren`,doorbell:`doorbell`,door_knock:`doorbell`,knocking:`doorbell`,glass_breaking:`glass_breaking`,glass_shatter:`glass_breaking`,gunshot:`gunshot`,explosion:`gunshot`,fireworks:`gunshot`,car:`vehicle`,truck:`vehicle`,motorcycle:`vehicle`,car_horn:`vehicle`,vehicle_horn:`vehicle`,traffic:`vehicle`,fire:`fire`,fire_crackle:`fire`,water:`water`,rain:`water`,ocean:`water`,splash:`water`,wind:`wind`,thunder:`wind`,thunderstorm:`wind`,door:`door`,door_slam:`door`,sliding_door:`door`,footsteps:`footsteps`,walking:`footsteps`,running:`footsteps`,crowd:`crowd`,chatter:`crowd`,cheering:`crowd`,applause:`crowd`,telephone_ring:`telephone`,ringtone:`telephone`,engine:`engine`,engine_starting:`engine`,lawn_mower:`engine`,chainsaw:`engine`,hammer:`tools`,jackhammer:`tools`,drill:`tools`,power_tool:`tools`,silence:`silence`},preserveOriginal:!1},Xm=new Map;for(let[e,t]of Object.entries(Jm.mapping))Xm.set(e.toLowerCase(),t);for(let[e,t]of Object.entries(Ym.mapping))Xm.set(e.toLowerCase(),t);function Zm(e){return Xm.get(e.toLowerCase())??null}function Qm(){return qm.map(e=>e.id)}var W={motion:`#f59e0b`,audio:`#06b6d4`,person:`#22c55e`,vehicle:`#3b82f6`,animal:`#f97316`,package:`#a855f7`,sensor:`#8b5cf6`,control:`#10b981`,genericDetection:`#64748b`},$m=`#22ff55`,eh={car:`#f59e0b`,truck:`#d97706`,bus:`#b45309`,motorcycle:`#eab308`,bicycle:`#ca8a04`,airplane:`#60a5fa`,boat:`#2563eb`,train:`#1d4ed8`,bird:`#14b8a6`,dog:`#84cc16`,cat:`#f97316`,horse:`#a16207`,sheep:`#a3a3a3`,cow:`#78716c`,elephant:`#6b7280`,bear:`#7c2d12`,zebra:`#404040`,giraffe:`#d4a373`};function th(e){return e.split(/[-_ ]/).filter(e=>e.length>0).map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(` `)}var nh=new Map;function G(e,t,n,r,i){nh.set(e,{kind:e,parentKind:null,level:`macro`,category:t,color:n,iconId:r,labelKey:`eventKind.${e}`,label:i})}function K(e,t,n,r,i,a){nh.set(e,{kind:e,parentKind:t,level:`sub`,category:n,color:r,iconId:i,labelKey:`eventKind.${e}`,label:a})}G(`motion`,`motion`,W.motion,`motion`,`Motion`),G(`audio`,`audio`,W.audio,`audio`,`Audio`),G(`person`,`detection`,W.person,`person`,`Person`),G(`vehicle`,`detection`,W.vehicle,`vehicle`,`Vehicle`),G(`animal`,`detection`,W.animal,`animal`,`Animal`),G(`package`,`package`,W.package,`package`,`Package`),G(`sensor`,`sensor`,W.sensor,`sensor`,`Sensor`),G(`control`,`control`,W.control,`control`,`Control`);for(let[e,t]of Object.entries(Km.mapping))t!==`vehicle`&&t!==`animal`||nh.has(e)||K(e,t,`detection`,eh[e]??W.genericDetection,e,th(e));K(`package-delivered`,`package`,`package`,W.package,`package`,`Package delivered`),K(`package-picked-up`,`package`,`package`,W.package,`package`,`Package picked up`),K(`contact`,`sensor`,`sensor`,`#f59e0b`,`door`,`Contact`),K(`motion-sensor`,`sensor`,`sensor`,W.sensor,`pir`,`Motion sensor`),K(`smoke`,`sensor`,`sensor`,`#ef4444`,`smoke`,`Smoke`),K(`flood`,`sensor`,`sensor`,`#3b82f6`,`water`,`Water leak`),K(`gas`,`sensor`,`sensor`,`#ef4444`,`gas`,`Gas`),K(`carbon-monoxide`,`sensor`,`sensor`,`#dc2626`,`smoke`,`Carbon monoxide`),K(`vibration`,`sensor`,`sensor`,`#eab308`,`vibration`,`Vibration`),K(`tamper`,`sensor`,`sensor`,`#f97316`,`tamper`,`Tamper`),K(`presence`,`sensor`,`sensor`,`#22c55e`,`presence`,`Presence`),K(`enum-sensor`,`sensor`,`sensor`,W.sensor,`generic`,`Sensor state`),K(`device-event`,`sensor`,`sensor`,`#10b981`,`button`,`Device event`),K(`lock`,`control`,`control`,`#0ea5e9`,`lock`,`Lock`),K(`switch`,`control`,`control`,W.control,`switch`,`Switch`),K(`siren`,`control`,`control`,`#dc2626`,`siren`,`Siren`),K(`button`,`control`,`control`,`#10b981`,`button`,`Button`),K(`doorbell`,`control`,`control`,`#a855f7`,`doorbell`,`Doorbell`);for(let e of qm){let t=`audio-${e.id}`;nh.has(t)||K(t,`audio`,`audio`,W.audio,t,e.name)}var rh=Object.freeze(Object.fromEntries(nh));function ih(e){return rh[e]}function ah(e){return rh[e]?.color??`#22ff55`}function oh(e){let t=[];for(let n of Object.values(rh))n.parentKind===e&&t.push(n);return t}var sh=i({kind:g(),label:g(),parentKind:g().nullable()}),ch=i({videoClasses:p(sh),audioKinds:p(sh),labels:p(sh)});function lh(e,t,n){return{kind:e,label:t,parentKind:n}}function uh(){let e=Object.values(rh);return{videoClasses:e.filter(e=>e.category===`detection`).map(e=>lh(e.kind,e.label,e.parentKind)),audioKinds:e.filter(e=>e.category===`audio`&&e.level===`sub`).map(e=>lh(e.kind,e.label,e.parentKind)),labels:e.filter(e=>e.category===`sensor`||e.category===`control`).map(e=>lh(e.kind,e.label,e.parentKind))}}var dh=Object.freeze(uh()),fh=m([`disarmed`,`armed_home`,`armed_away`,`armed_night`,`armed_vacation`,`armed_custom_bypass`,`arming`,`disarming`,`pending`,`triggered`]),ph=m([`home`,`away`,`night`,`vacation`,`custom_bypass`]),mh=i({state:fh,availableModes:p(ph),requiresCode:v(),lastChangedAt:a()}),hh={name:`alarm-panel`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[D.AlarmPanel],methods:{arm:T(i({deviceId:a().int().nonnegative(),mode:ph,code:g().min(1).optional()}),h(),{kind:`mutation`,auth:`admin`}),disarm:T(i({deviceId:a().int().nonnegative(),code:g().min(1).optional()}),h(),{kind:`mutation`,auth:`admin`}),trigger:T(i({deviceId:a().int().nonnegative()}),h(),{kind:`mutation`,auth:`admin`})},status:{schema:mh,kind:`push`},runtimeState:mh,durability:`restored`,volatileStateFields:[`lastChangedAt`]},gh=i({x:a(),y:a()}),_h=i({kind:y(`rect`),x:a(),y:a(),width:a(),height:a()}),vh=i({kind:y(`polygon`),points:p(gh)}),yh=i({kind:y(`grid`),gridWidth:a(),gridHeight:a(),cells:p(v())}),bh=i({kind:y(`line`),points:p(gh)}),xh=b(`kind`,[_h,vh,yh,bh]),Sh=m([`rect`,`polygon`,`grid`,`line`]),Ch=i({min:a(),max:a()}),wh=i({width:a(),height:a()}),Th=m([`immediate`,`track-end`,`device-event`,`package-event`,`system-event`]),Eh=m(`device-online.device-offline.device-disabled.device-enabled.device-battery-low.device-battery-normal.stream-online.stream-offline.node-online.node-offline.node-inference-unavailable.detection-blind.addon-crash-loop.addon-update-available.server-update-available.alarm-triggered.alarm-armed.alarm-disarmed.alarm-arming.alarm-arm-refused.addon-updated.server-updated.export-completed.camera-online.camera-offline.camera-disabled.camera-enabled`.split(`.`)),Dh=new Set([`camera-online`,`camera-offline`,`camera-disabled`,`camera-enabled`]),Oh=Eh.options.filter(e=>!Dh.has(e)),kh=[`alarm-arm-refused`,`alarm-arming`,`alarm-armed`,`alarm-triggered`,`alarm-disarmed`],Ah=i({kinds:p(Eh).min(1),deviceIds:p(a().int()).min(1).optional(),deviceTypes:p(g().min(1)).min(1).optional(),nodeIds:p(g().min(1)).min(1).optional(),packageNames:p(g().min(1)).min(1).optional()}),jh=1,Mh=1440,Nh=[10,30,60],Ph=i({days:p(a().int().min(0).max(6)).min(1),startMinute:a().int().min(0).max(1439),endMinute:a().int().min(0).max(1439)}),Fh=i({windows:p(Ph).min(1),timezone:g().optional(),invert:v().optional()}),Ih=i({values:p(g().min(1)),maxDistance:a().int().min(0).max(3).default(1)}),Lh=i({zoneId:g().optional(),className:g().optional(),op:m([`became-occupied`,`became-free`,`>=`,`<=`]).default(`became-occupied`),count:a().int().min(0).default(1),sustainSeconds:a().int().min(0).max(3600).default(15)}),Rh=-96,zh=i({labels:p(g().min(1)).min(1).optional(),dbThreshold:a().min(-96).max(0).optional(),hitPercent:a().int().min(1).max(100).default(60),samplingSeconds:a().int().min(1).max(300).default(10),confirmHits:a().int().min(1).max(20).optional(),confirmWindowSec:a().int().min(1).max(60).optional()}),Bh=m([`enter`,`exit`,`any`]),Vh=i({ids:p(g().min(1)).min(1),match:m([`any`,`all`]).default(`any`)}),Hh=b(`kind`,[i({kind:y(`wait`),seconds:a().min(0).max(300)}),i({kind:y(`cap`),deviceId:a().int(),cap:g().min(1),method:g().min(1),args:n(g(),u()).optional()})]),Uh=i({name:g().min(1).max(120),enabled:v(),minDelaySec:a().int().min(0).max(86400).optional(),actions:p(Hh).min(1)}),Wh=i({id:g().min(1).max(64),label:g().min(1).max(40),sequence:g().min(1).max(120),icon:km.optional(),destructive:v().optional()}),Gh=i({onTrigger:p(Uh).optional(),buttons:p(Wh).max(8).optional()}),Kh=i({deviceId:a().int(),states:p(g().min(1)).min(1)}),qh=i({sceneId:g().min(1),deviceId:a().int().optional(),requiredState:m([`matched`,`diverged`]),latched:v().optional()}),Jh=i({deviceState:Kh.optional(),scene:qh.optional(),devices:p(a()).optional(),classes:p(g().min(1)).optional(),classesExclude:p(g().min(1)).optional(),minConfidence:a().min(0).max(1).optional(),zones:Vh.optional(),zonesExclude:p(g().min(1)).optional(),crossing:Bh.optional(),labelEquals:p(g().min(1)).optional(),identities:p(g().min(1)).optional(),plates:Ih.optional(),identitiesExclude:p(g().min(1)).optional(),minImportance:a().min(0).max(1).optional(),minDwellSeconds:a().min(0).optional(),source:m([`pipeline`,`onboard`,`sensor`,`audio`,`any`]).optional(),minLabelConfidence:a().min(0).max(1).optional(),eventTypeTokens:p(g().min(1)).optional(),sensorKinds:p(g().min(1)).optional(),packagePhase:m([`delivered`,`picked-up`,`both`]).optional(),systemEvent:Ah.optional(),customZones:p(vh).optional(),occupancy:Lh.optional(),audio:zh.optional()}),Yh=i({targetId:g().min(1),params:n(g(),u()).optional()}),Xh=m([`cropped`,`full`,`boxed`]),Zh=i({attach:m([`best`,`best-matching`,`keyFrame`,`none`]).default(`best`),frame:Xh.optional(),zoneCrop:v().optional(),gif:v().optional(),clip:v().optional(),clipPreRollSec:a().int().min(0).max(30).optional(),clipPostRollSec:a().int().min(0).max(30).optional(),clipSpeed:a().min(1).max(8).optional(),profile:S.optional()}),Qh=m([`shared`,`per-class`]),$h=i({cooldownSec:a().int().min(0).max(86400).default(60),scope:m([`rule`,`rule-device`]).default(`rule-device`),granularity:Qh.optional()}),eg=1e3,tg=2e4,ng=8e3,rg=448,ig=i({op:m([`>=`,`>`,`<=`,`<`,`==`]),count:a().int().min(0).max(1e3)}),ag=i({enabled:v().default(!1),profileId:g().optional(),prompt:g().max(1e3).optional(),expect:ig.optional(),timeoutMs:a().int().min(eg).max(tg).default(ng),onTimeout:m([`fire`,`suppress`]).default(`fire`),maxImagePx:a().int().min(64).max(2048).default(448)}),og=i({name:g().min(1).max(200),enabled:v().default(!0),delivery:Th,conditions:Jh.default({}),schedule:Fh.optional(),targets:p(Yh),targetUsers:p(g()).optional(),media:Zh.default({attach:`best`}),throttle:$h.default({cooldownSec:60,scope:`rule-device`}),template:i({title:g().max(500).optional(),body:g().max(2e3).optional()}).optional(),priority:a().int().min(1).max(5).default(3),ownerUserId:g().optional(),snoozeAllowGlobal:v().optional(),snoozeOptions:p(a().int().min(1).max(Mh)).max(4).optional(),actions:Gh.optional(),confirm:ag.optional(),waitForEnhancement:v().optional(),groupIdleSec:a().int().min(0).max(600).optional()}),sg=og.partial().extend({disabledTargetIds:p(g()).optional(),enabled:v().optional(),conditions:Jh.optional(),media:Zh.optional(),throttle:$h.optional(),priority:a().int().min(1).max(5).optional()}),cg=og.extend({id:g(),createdBy:g(),createdAt:a(),updatedAt:a(),disabledTargetIds:p(g()).default([])}),lg=i({recordId:g(),recordKind:m([`object-event`,`track`,`device-event`,`package-event`,`system-event`]),deviceId:a(),timestamp:a(),wouldFire:v(),failedCondition:g().optional(),className:g().optional(),label:g().optional()}),ug=i({id:g(),group:m([`scope`,`class`,`zones`,`quality`,`label`,`schedule`,`device`,`package`,`occupancy`,`audio`,`system`]),label:g(),valueType:m([`deviceIdList`,`stringList`,`number01`,`number`,`sourceSelect`,`zoneSelection`,`zoneIdList`,`schedule`,`plateMatcher`,`packagePhase`,`crossingSelect`,`polygonDraw`,`occupancy`,`audio`,`deviceState`,`scene`,`systemEvent`]),operator:m([`in`,`notIn`,`anyOf`,`allOf`,`gte`,`fuzzyIn`,`withinSchedule`]),appliesTo:p(Th),phase:g(),description:g().optional(),options:p(i({value:g(),label:g(),hint:g().optional()})).readonly().optional()}),dg=[{id:`systemEvent`,group:`system`,label:`System event`,valueType:`systemEvent`,options:[{value:`device-online`,label:`Device online`},{value:`device-offline`,label:`Device offline`},{value:`device-disabled`,label:`Device switched off`},{value:`device-enabled`,label:`Device switched on`},{value:`stream-online`,label:`Stream online`},{value:`stream-offline`,label:`Stream offline`},{value:`node-online`,label:`Node online`},{value:`node-offline`,label:`Node offline`},{value:`node-inference-unavailable`,label:`Node has no usable inference device`},{value:`detection-blind`,label:`Camera detecting nothing`},{value:`addon-crash-loop`,label:`Addon stopped after repeated crashes`},{value:`addon-update-available`,label:`Addon update available`},{value:`server-update-available`,label:`Server update available`},{value:`addon-updated`,label:`Addons updated`},{value:`server-updated`,label:`Server updated`},{value:`export-completed`,label:`Export completed`},{value:`alarm-arming`,label:`Alarm arming (exit delay)`},{value:`alarm-armed`,label:`Alarm armed`},{value:`alarm-triggered`,label:`Alarm triggered`},{value:`alarm-disarmed`,label:`Alarm disarmed`}],operator:`in`,appliesTo:[`system-event`],phase:`P1`,description:`Infrastructure and update events. Device liveness covers EVERY device type — narrow it by device type (cameras only, say) and/or by device, node events by node id, and addon updates by package name.`},{id:`devices`,group:`scope`,label:`Devices`,valueType:`deviceIdList`,operator:`in`,appliesTo:[`immediate`,`track-end`,`device-event`,`package-event`],phase:`P1`,description:`Restrict the rule to these devices; absent = all devices. A sensor event matches either the SENSOR that fired or the camera it is attributed to, so a rule may name either one.`},{id:`classes`,group:`class`,label:`Object classes`,valueType:`stringList`,operator:`in`,appliesTo:[`immediate`,`track-end`,`package-event`],phase:`P1`,description:`Any overlap with the detection class set passes.`},{id:`classesExclude`,group:`class`,label:`Excluded classes`,valueType:`stringList`,operator:`notIn`,appliesTo:[`immediate`,`track-end`,`package-event`],phase:`P1`},{id:`minConfidence`,group:`quality`,label:`Minimum confidence`,valueType:`number01`,operator:`gte`,appliesTo:[`immediate`,`track-end`,`package-event`],phase:`P1`},{id:`zones`,group:`zones`,label:`Zones`,valueType:`zoneSelection`,operator:`anyOf`,appliesTo:[`immediate`,`track-end`,`package-event`],phase:`P1`,description:`Admin zone ids; quantifier any/all over the visited set.`},{id:`zonesExclude`,group:`zones`,label:`Excluded zones`,valueType:`zoneIdList`,operator:`notIn`,appliesTo:[`immediate`,`track-end`,`package-event`],phase:`P1`},{id:`crossing`,group:`zones`,label:`Zone crossing`,valueType:`crossingSelect`,options:[{value:``,label:`Not set — entering`,hint:`Entries, and every detection that is not a crossing at all. Exits are excluded. This is what a rule without a crossing condition already does, and choosing it writes nothing to the rule.`},{value:`enter`,label:`Entered a zone`,hint:`The same matches as "not set", stated explicitly: entries and non-crossing detections pass, exits do not.`},{value:`exit`,label:`Left a zone`,hint:`ONLY an exit crossing. A detection that is not a crossing fails, so this rule cannot fire on ordinary movement — pair it with the zones the subject must have left. Also matches a tripwire crossed against its drawn direction.`},{value:`any`,label:`Entered or left`,hint:`No direction filter: entries, exits and non-crossing detections alike. This is the only choice that adds exits to what the rule already matched.`}],operator:`in`,appliesTo:[`immediate`],phase:`P1`,description:`Direction of the zone crossing: enter (the default, and what every rule authored before this did) / exit / any. An exit rule matches only crossings.`},{id:`labelEquals`,group:`label`,label:`Label equals`,valueType:`stringList`,operator:`in`,appliesTo:[`immediate`,`track-end`],phase:`P1`,description:`Exact match on the collapsed label (identity / plate / subclass).`},{id:`identities`,group:`label`,label:`Known faces`,valueType:`stringList`,operator:`in`,appliesTo:[`immediate`,`track-end`],phase:`P1`,description:`Only recognised people. Selecting NOBODY means every identity in the face gallery; selecting some narrows to those. Matched on the gallery id, so renaming a person does not break the rule. On immediate delivery the name is not known yet when the notification is enqueued — see the rule’s "wait for recognition" switch.`},{id:`plates`,group:`label`,label:`Known plates`,valueType:`plateMatcher`,operator:`fuzzyIn`,appliesTo:[`immediate`,`track-end`],phase:`P1`,description:`Only vehicles whose plate was read. Selecting NO plate means any readable plate; listed plates are matched Levenshtein-tolerantly, because OCR noise makes an exact match useless.`},{id:`identitiesExclude`,group:`label`,label:`Excluded faces`,valueType:`stringList`,operator:`notIn`,appliesTo:[`immediate`,`track-end`],phase:`P1`,description:`Veto by identity (mirror of Known faces, same gallery ids). A subject nobody recognised passes — there is nothing to exclude.`},{id:`minLabelConfidence`,group:`label`,label:`Minimum label confidence`,valueType:`number01`,operator:`gte`,appliesTo:[`track-end`],phase:`P1`,description:`Best identity/plate recognition match confidence [0,1] for the label the track carries at close (peak assigned-identity cosine / peak plate OCR score; the higher of the two when both were read). Distinct from detection confidence. Fails closed for a track that ended un-recognized.`},{id:`minImportance`,group:`quality`,label:`Minimum importance`,valueType:`number01`,operator:`gte`,appliesTo:[`track-end`],phase:`P1`,description:`Server-computed key-event importance [0,1]; track-end rules only (importance is scored at close). Fails when the record has none.`},{id:`minDwellSeconds`,group:`quality`,label:`Minimum dwell (seconds)`,valueType:`number`,operator:`gte`,appliesTo:[`track-end`],phase:`P1`,description:`Track lifespan in seconds (lastSeen − firstSeen); track-end rules only.`},{id:`source`,group:`scope`,label:`Detection source`,valueType:`sourceSelect`,options:[{value:`any`,label:`Any source`},{value:`pipeline`,label:`Pipeline`},{value:`onboard`,label:`Onboard (camera)`},{value:`sensor`,label:`Sensor`},{value:`audio`,label:`Audio marker`}],operator:`in`,appliesTo:[`immediate`,`track-end`,`device-event`,`package-event`],phase:`P1`,description:`pipeline / onboard / sensor / audio; a record with no stamped source counts as pipeline.`},{id:`deviceState`,group:`scope`,label:`Device state`,valueType:`deviceState`,operator:`in`,appliesTo:[`immediate`,`track-end`,`device-event`,`package-event`],phase:`P2`,description:`Only fire while another device is in one of the chosen states — the alarm armed, a switch on, a contact closed. A state that cannot be read does NOT fire.`},{id:`scene`,group:`scope`,label:`Scene state`,valueType:`scene`,operator:`in`,appliesTo:[`immediate`,`track-end`,`device-event`,`package-event`],phase:`P3`,description:`Only fire while a scene is matched (the baseline is what we see) or diverged (it demonstrably is not) — “tell me about a person at the door, but only while the bin is still out”. A scene that cannot judge, or one this hub has not read yet, does NOT fire.`},{id:`sensorKinds`,group:`device`,label:`Sensor kinds`,valueType:`stringList`,operator:`in`,appliesTo:[`device-event`],phase:`P1`,description:`Sensor/control taxonomy kinds (doorbell / contact / button / …) matched against the persisted device event.`},{id:`eventTypeTokens`,group:`device`,label:`Event-type tokens`,valueType:`stringList`,operator:`in`,appliesTo:[`device-event`],phase:`P1`,description:`Raw device event-type tokens (e.g. doorbell press / press_long) from the event-emitter slice; absent on doorbell-pulse / passive sensors.`},{id:`packagePhase`,group:`package`,label:`Package phase`,valueType:`packagePhase`,options:[{value:`delivered`,label:`Delivered`},{value:`picked-up`,label:`Picked up`},{value:`both`,label:`Both`}],operator:`in`,appliesTo:[`package-event`],phase:`P1`,description:`Delivered / picked-up / both.`},{id:`occupancy`,group:`occupancy`,label:`Occupancy`,valueType:`occupancy`,operator:`anyOf`,appliesTo:[`device-event`],phase:`P1`,description:`ZoneAnalytics occupancy edge (optionally zone/class-scoped): count crosses the threshold and holds for sustainSeconds. Fail-closed on a missing snapshot.`},{id:`audio`,group:`audio`,label:`Sound`,valueType:`audio`,operator:`anyOf`,appliesTo:[`immediate`],phase:`P2`,description:`Fires when at least hitPercent% of the samples in a samplingSeconds window are hits — a hit clears the dBFS floor AND carries one of the chosen sounds. Both filters are optional and independent, but naming NEITHER never matches: every sample would be a hit, so the engine refuses rather than notifying on silence. dBFS is negative-going (0 = full scale, -96 = silence).`},{id:`customZones`,group:`zones`,label:`Custom zones`,valueType:`polygonDraw`,operator:`anyOf`,appliesTo:[`immediate`,`track-end`,`package-event`],phase:`P1`,description:`User-drawn polygons; a detection whose bbox overlaps any polygon matches.`},{id:`schedule`,group:`schedule`,label:`Schedule`,valueType:`schedule`,operator:`withinSchedule`,appliesTo:[`immediate`,`track-end`,`device-event`,`package-event`,`system-event`],phase:`P1`,description:`Weekly activation windows (invertible); absent = always active.`}],fg=m([`pending`,`sent`,`dead`]),pg=m([`object-event`,`track-end`,`device-event`,`package-event`,`system-event`]),mg=i({className:g(),label:g().optional(),confidence:a().optional(),zones:p(g()),timestamp:a(),systemEvent:i({kind:Eh,subject:g(),title:g(),body:g(),data:n(g(),u())}).optional()}),hg=i({id:g(),ruleId:g(),ruleName:g(),delivery:Th,targetId:g(),deviceId:a(),recordKind:pg,recordId:g(),trackId:g().optional(),status:fg,attempts:a().int(),createdAt:a(),updatedAt:a(),error:g().optional(),subject:mg,artifactIds:p(g().min(1)).optional()}),gg=100,_g=500,vg=i({ruleId:g().optional(),deviceId:a().optional(),status:fg.optional(),since:a().optional(),until:a().optional(),limit:a().int().min(1).max(500).default(100)}),yg=m([`rule`,`device`,`all`]),bg=i({scope:yg,ruleId:g().optional(),deviceId:a().int().optional(),classes:p(g().min(1)).min(1).optional(),durationMinutes:a().int().min(1).max(Mh),global:v().optional(),summary:v().optional()}),xg=i({id:g(),userId:g(),scope:yg,ruleId:g().optional(),deviceId:a().int().optional(),classes:p(g().min(1)).min(1).optional(),startedAt:a(),expiresAt:a(),global:v(),summary:v(),digestSentAt:a().optional()}),Sg=i({snoozeId:g(),targetId:g(),ruleId:g(),ruleName:g(),deviceId:a().int(),count:a().int(),firstAt:a(),lastAt:a()}),Cg=i({exitDelaySec:a().int().min(0).max(600),entryDelaySec:a().int().min(0).max(600),triggeredDurationSec:a().int().min(0).max(3600),announceArm:v(),announceTargets:p(g().min(1)).max(16)}),wg=Cg.partial(),Tg=m([`muted`,`detection-off`,`offline`]),Eg=i({deviceId:a().int(),reason:Tg}),Dg=i({mode:ph,ruleCount:a().int().min(0),allDevices:v(),deviceIds:p(a().int()),skippedDevices:p(Eg).default([])}),Og=i({deviceId:a().int().nullable(),settings:Cg,coverage:p(Dg)}),kg={name:`notification-rules`,scope:`system`,mode:`singleton`,methods:{listRules:T(i({}),i({rules:p(cg)}),{auth:`admin`}),getRule:T(i({ruleId:g()}),i({rule:cg.nullable()}),{auth:`admin`}),createRule:T(i({rule:og}),i({rule:cg}),{kind:`mutation`,auth:`admin`,caller:`required`}),updateRule:T(i({ruleId:g(),patch:sg}),i({rule:cg}),{kind:`mutation`,auth:`admin`,caller:`required`}),deleteRule:T(i({ruleId:g()}),i({success:y(!0)}),{kind:`mutation`,auth:`admin`}),setRuleEnabled:T(i({ruleId:g(),enabled:v()}),i({success:y(!0)}),{kind:`mutation`,auth:`admin`}),listDeviceMutes:T(i({}),i({mutedDeviceIds:p(a().int()).readonly()}),{auth:`admin`}),setDeviceMuted:T(i({deviceId:a().int(),muted:v()}),i({success:y(!0)}),{kind:`mutation`,auth:`admin`}),testRule:T(i({rule:og,lookbackMinutes:a().int().min(1).max(1440).default(60)}),i({results:p(lg)}),{kind:`mutation`,auth:`admin`}),getConditionCatalog:T(i({}),i({catalog:p(ug),taxonomy:ch.optional()})),getHistory:T(i({filter:vg.default({limit:100})}),i({entries:p(hg)}),{auth:`admin`}),resolveArtifactUrl:T(i({artifactId:g().min(1)}),i({url:g().nullable()}),{auth:`admin`}),listSnoozes:T(i({}),i({snoozes:p(xg)}),{caller:`required`}),createSnooze:T(i({snooze:bg}),i({snooze:xg}),{kind:`mutation`,caller:`required`}),cancelSnooze:T(i({snoozeId:g()}),i({success:y(!0)}),{kind:`mutation`,caller:`required`}),getAlarmConfig:T(i({}),Og,{auth:`admin`}),setAlarmConfig:T(i({patch:wg}),Og,{kind:`mutation`,auth:`admin`})}},Ag=m([`view`,`create`,`delete`]),jg=c([y(`*`),p(g())]),Mg=n(g(),c([y(`*`),p(g())])),Ng=m([`device`,`system`]),Pg=b(`kind`,[i({kind:y(`all`)}),i({kind:y(`ids`),ids:p(a().int()).min(1)}),i({kind:y(`types`),types:p(m(D)).min(1)}),i({kind:y(`locations`),locations:p(g().min(1)).min(1)})]),Fg=i({type:y(`device`),selector:Pg,access:p(Ag).min(1),includeLinked:v().optional()});function Ig(e){if(typeof e!=`object`||!e||Array.isArray(e)||Reflect.get(e,`type`)!==`device`||Reflect.get(e,`selector`)!==void 0)return e;let t=Reflect.get(e,`targets`);return Array.isArray(t)?{type:`device`,selector:{kind:`ids`,ids:t.map(e=>typeof e==`string`?Number(e):e).filter(e=>typeof e==`number`&&Number.isInteger(e))},access:Reflect.get(e,`access`)}:e}var q=oe(Ig,b(`type`,[i({type:y(`category`),target:Ng,access:p(Ag).min(1)}),i({type:y(`capability`),target:g(),access:p(Ag).min(1)}),i({type:y(`addon`),target:g(),access:p(Ag).min(1)}),Fg])),Lg=i({id:g(),username:g(),passwordHash:g(),isAdmin:v().default(!1),allowedProviders:jg,allowedDevices:Mg,scopes:p(q).default([]),createdAt:a(),updatedAt:a()}),Rg=i({id:g(),label:g(),isAdmin:v().default(!1),allowedProviders:jg,allowedDevices:Mg,tokenHash:g(),tokenPrefix:g(),createdAt:a(),lastUsedAt:a().optional()}),zg=i({id:g(),userId:g(),name:g(),tokenHash:g(),tokenPrefix:g(),scopes:p(q),expiresAt:a().nullish(),lastUsedAt:a().nullish(),createdAt:a()}),Bg=i({integrationId:g(),displayName:g(),requestedScopes:p(q),allowedRedirectPrefixes:p(g()).min(1),allowedPrivateHostPaths:p(g()).optional(),requiresPkce:v().optional(),hubUrl:g().optional(),refreshTokenTtlSec:c([a().int().positive(),y(`never`)]).optional()}),Vg={name:`oauth-integration`,scope:`system`,mode:`collection`,internal:!0,methods:{getDescriptor:T(h(),Bg,{auth:`admin`})}},Hg=i({handle:w,cropFrameSpace:i({x:a(),y:a(),w:a(),h:a()})});i({crop:i({left:a(),top:a(),width:a().positive(),height:a().positive()}).optional(),content:i({width:a().int().positive(),height:a().int().positive()}),fit:m([`stretch`,`contain`]),format:m([`rgb`,`gray`,`jpeg`])});var Ug=i({registryId:g().min(1),id:g().min(1),width:a().int().positive(),height:a().int().positive(),format:m([`rgb`,`gray`]),timestamp:a(),capturedAt:a().optional()}),Wg=m([`onnx`,`coreml`,`openvino`,`tflite`,`pt`,`gguf`]),Gg=m([`detector`,`cropper`,`classifier`,`refiner`,`audio-classifier`]),J=i({runtime:m([`node`,`python`]),backend:g(),format:Wg,device:g().optional()}),Kg=i({engine:J,devices:p(i({id:g(),label:g(),description:g().optional()})).readonly(),defaultDevice:g()}),qg=r(()=>i({addonId:g(),addonName:g(),slot:Gg,inputClasses:p(g()).readonly(),outputClasses:p(g()).readonly(),enabled:v(),modelId:g(),children:p(qg).readonly(),group:g().optional(),settings:n(g(),u()).optional()})),Jg=r(()=>i({addonId:g(),enabled:v(),modelId:g(),children:p(Jg).readonly(),settings:n(g(),u()).optional()})),Yg=i({id:g(),name:g(),createdAt:g(),updatedAt:g(),engine:J,steps:p(Jg).readonly()}),Xg=i({id:g(),name:g(),formats:n(g(),i({downloaded:v(),sizeMB:a()})),group:cs.optional(),legacy:v().optional(),provider:us.optional()}),Zg=x(),Qg=i({id:g(),name:g(),slot:Gg,inputClasses:p(g()).readonly(),outputClasses:p(g()).readonly(),childSlots:p(Gg).readonly(),models:p(Xg).readonly(),defaultModelId:g(),defaultModelIdByFormat:n(g(),g()).optional(),enabledByDefault:v().optional(),backfillIntoExistingOverrides:v().optional(),defaultConfidence:a(),group:g().optional(),configSchema:p(Zg).readonly().optional()}),$g=i({id:Gg,label:g(),priority:a(),parentSlot:Gg.nullable(),addons:p(Qg).readonly()}),e_=i({availableEngines:p(Kg).readonly(),selectedEngine:J,slots:p($g).readonly()}),t_=i({runtimeId:m([`onnx`,`openvino`,`coreml`,`edgetpu`]).nullable(),device:g().nullable(),state:m([`idle`,`installing`,`verifying`,`ready`,`failed`]),progress:a().optional(),error:g().optional(),nextRetryAt:a().optional(),configIssues:p(g()).optional()}),Y=r(()=>i({addonId:g(),modelId:g().optional(),enabled:v().default(!0),children:p(Y).optional(),settings:n(g(),u()).optional(),jumpDeviceKey:g().optional()})),n_=i({addonId:g(),chosen:g(),running:g(),format:g()}),r_=i({addonId:g(),kind:m([`unknown-addon`,`no-format-build`]),detail:g()}),i_=i({ok:v(),issues:p(r_).readonly(),substitutions:p(n_).readonly(),format:g()}),a_=i({filename:g(),stepIds:p(g()).readonly().optional()}),o_=i({base64:g(),filename:g()}),s_=i({filename:g(),sizeKb:a()}),c_=i({base64:g()}),l_=i({id:g(),name:g(),description:g(),available:v(),rawLabels:p(g()).readonly().optional()}),u_=i({activeBackend:g(),availableBackends:p(l_).readonly(),sampleRate:a(),chunkDurationMs:a()}),d_=i({filePath:g(),sizeMB:a(),durationMs:a()}),f_=i({success:v(),error:g().optional(),frame:x().optional()}),p_=x(),m_=x(),h_=x(),g_=x(),__=x(),v_=x(),y_={name:`pipeline-executor`,scope:`system`,mode:`singleton`,methods:{getAvailableEngines:T(h(),p(J)),getSelectedEngine:T(h(),J),getDefaultSteps:T(J,p(qg)),getEngineProvisioning:T(i({nodeId:g()}),t_),getVideoPipelineSteps:T(h(),n(g(),i({modelId:g(),settings:n(g(),u()).readonly()}))),setVideoPipelineSteps:T(i({steps:n(g(),i({modelId:g(),settings:n(g(),u()).readonly()}))}),i({success:y(!0)}),{kind:`mutation`,auth:`admin`}),clearDeviceOverrides:T(i({nodeId:g()}),i({success:y(!0),clearedDevices:a()}),{kind:`mutation`,auth:`admin`}),getInferenceDeviceHealth:T(i({nodeId:g()}),i({unhealthy:p(i({deviceKey:g(),state:m([`failed`,`backoff`]),since:a(),deaths:a(),lastError:g()})).readonly()})),rearmInferenceDevice:T(i({nodeId:g(),deviceKey:g()}),i({rearmed:v()}),{kind:`mutation`,auth:`admin`}),getSchema:T(h(),e_),getGlobalSteps:T(h(),p(qg).readonly().nullable()),getGlobalPipelineConfig:T(h(),p_),getOrchestratorConfigSchema:T(h(),m_),validatePipeline:T(i({steps:p(Y)}),i_),listTemplates:T(h(),p(Yg).readonly()),saveTemplate:T(i({name:g(),steps:p(Jg).readonly(),engine:J}),Yg,{kind:`mutation`}),updateTemplate:T(i({id:g(),name:g().optional(),steps:p(Jg).readonly().optional()}),Yg,{kind:`mutation`}),deleteTemplate:T(i({id:g()}),h(),{kind:`mutation`}),getCapabilities:T(h(),g_),getAddonModels:T(i({addonId:g()}),__),downloadModel:T(i({addonId:g(),modelId:g(),format:Wg}),d_,{kind:`mutation`}),deleteModel:T(i({addonId:g(),modelId:g(),format:Wg}),i({success:y(!0)}),{kind:`mutation`}),runPipeline:T(i({engine:J.optional(),steps:p(Y).min(1),frame:ul.optional(),frameRef:Ug.optional(),frameHandle:w.optional(),imageBase64:g().optional(),image:_(Uint8Array).optional(),referenceImage:g().optional(),deviceId:a().optional(),sessionId:g().optional(),plane:m([`full`,`frame`]).optional(),deviceKey:g().optional(),nativeCropRef:Hg.optional()}),v_,{kind:`mutation`}),runPipelineBatch:T(i({engine:J.optional(),steps:p(Y).min(1),frames:p(ul).min(1).max(255),deviceId:a().optional(),sessionId:g().optional(),frameId:a().int().nonnegative().optional(),deviceKey:g().optional()}),i({results:p(v_).readonly()}),{kind:`mutation`}),cacheFrameInPool:T(i({data:_(Uint8Array),width:a().int().positive(),height:a().int().positive(),format:m([`rgb`,`bgr`,`gray`])}),i({frameId:a(),width:a(),height:a()}),{kind:`mutation`}),inferCached:T(i({stepId:g(),frameId:a().int()}),n(g(),u()),{kind:`mutation`}),uncacheFrame:T(i({frameId:a().int()}),h(),{kind:`mutation`}),getEffectiveTuning:T(h(),i({batchMode:g(),windowMs:a(),maxBatchSize:a(),concurrency:a()})),listLoadedEngines:T(h(),p(i({engineKey:g(),engine:J,modelsLoaded:p(g()).readonly(),inUseByCameras:p(a()).readonly(),kind:m([`runtime`,`warm-override`,`device-pool`]),poolPid:a().nullable(),idleMs:a().nullable(),idleTtlMs:a().nullable()})).readonly()),spinEngine:T(i({engine:J}),i({success:y(!0)}),{kind:`mutation`,auth:`admin`}),killEngine:T(i({engine:J,force:v().optional()}),i({success:v(),reason:g().optional()}),{kind:`mutation`,auth:`admin`}),listReferenceImages:T(h(),p(a_).readonly()),getReferenceImage:T(i({filename:g()}),o_.nullable()),getReferenceAudioFiles:T(h(),p(s_).readonly()),getReferenceAudio:T(i({filename:g()}),c_.nullable()),getAudioCapabilities:T(h(),u_),runAudioTest:T(i({addonId:g(),modelId:g(),filename:g().optional(),settings:n(g(),u()).optional()}),f_,{kind:`mutation`}),getDetectionConfigSchema:T(h(),h_)}},b_=m([`include`,`exclude`]),X=i({id:g(),name:g().optional(),zoneIds:p(g()).min(1).readonly(),mode:b_,classFilter:p(g()).readonly().optional(),overlapThreshold:a().min(0).max(1).optional(),bboxInclusionPct:a().min(0).max(100).optional(),preferMask:v().optional(),enabled:v().default(!0)}),x_=p(X).readonly(),S_=m([`polygon`,`tripwire`]),C_=i({x:a(),y:a()}),w_=i({id:g(),name:g(),kind:S_.default(`polygon`),polygon:p(C_).readonly(),color:g().default(`#3b82f6`)}),T_={name:`zones`,scope:`device`,mode:`singleton`,deviceTypes:[D.Camera],methods:{listZones:T(i({deviceId:a()}),p(w_).readonly()),addZone:T(i({deviceId:a(),zone:w_}),h(),{kind:`mutation`,auth:`admin`}),removeZone:T(i({deviceId:a(),zoneId:g()}),h(),{kind:`mutation`,auth:`admin`}),updateZone:T(i({deviceId:a(),zone:w_}),h(),{kind:`mutation`,auth:`admin`})},runtimeState:i({zones:p(w_).readonly()}),durability:`restored`},E_=m([`new`,`entered`,`left`,`moving`,`idle`]),D_=m([`motion`,`object`,`audio`]),O_=b(`kind`,[_h,vh]),k_=m([`motion`,`audio`,`person`,`vehicle`,`animal`,`door`,`pir`,`smoke`,`water`,`button`,`package`,`generic`]),A_=m([`motion`,`audio`,`detection`,`sensor`,`control`,`custom`,`package`]),j_=m([`macro`,`sub`]),M_=i({kind:g(),labelKey:g(),label:g(),color:g(),iconId:g(),icon:k_,category:A_,parentKind:g().nullable(),level:j_,source:i({capName:g(),deviceId:a()})}),N_=i({deviceId:a(),kinds:p(M_).readonly()}),P_=i({id:g(),deviceId:a(),sourceDeviceId:a(),kind:g(),value:n(g(),u()).nullable(),timestamp:a()}),F_=i({x:a(),y:a(),timestamp:a(),bbox:V}),I_=i({timestamp:a(),position:F_,mediaKey:g()}),L_=i({minX:a(),minY:a(),maxX:a(),maxY:a()}),R_=m([`full`,`slim`]),z_=i({label:g(),peakScore:a(),count:a(),firstAt:a(),lastAt:a()}),B_=m([`pipeline`,`sensor`,`audio`]),V_=m([`none`,`staging`,`trained`]),H_=500,U_={markForTrain:v().optional(),debug:v().optional(),debugNote:g().max(500).optional(),favourited:v().optional()},W_={retrainStatus:V_.optional()},G_=i(U_),K_=i({trackId:g(),markForTrain:v(),debug:v(),debugNote:g(),favourited:v(),retrainStatus:V_}),q_=c([y(1),y(2)]),J_=i({stepId:g(),modelId:g().optional(),decidedAt:a(),identityId:g().optional()}),Y_={label:g().optional(),labelScore:a().optional(),labelMeta:J_.optional(),subLabel:g().optional(),subLabelScore:a().optional(),subLabelMeta:J_.optional()},X_=i({deviceId:a(),tracks:a().int(),files:a().int(),bytes:a().int()}),Z_=i({generatedAt:a(),trackCount:a().int(),fileCount:a().int(),byteCount:a().int(),truncated:v(),devices:p(X_).readonly()}),Q_=i({trackId:g(),deviceId:a(),className:g(),...Y_,producingDeviceName:g().optional(),source:B_.optional(),firstSeen:a(),lastSeen:a(),positions:p(F_).readonly(),snapshots:p(I_).readonly(),zonesVisited:p(g()).readonly(),zoneNames:p(g()).readonly().optional(),classes:p(g()).readonly().optional(),totalDistance:a(),state:E_,active:v(),importance:a().optional(),bestEventId:g().optional(),importanceReason:g().optional(),audioLabels:p(z_).readonly().optional(),envelope:L_.optional(),hasFace:v().optional(),hasEmbeddedFace:v().optional(),hasRider:v().optional(),previewMissReason:g().optional(),...U_,...W_}),$_={id:g(),deviceId:a(),timestamp:a()},ev=i({...$_,kind:y(`motion`),regionCount:a(),regions:p(i({bbox:V,pixelCount:a(),intensity:a()})).readonly().optional(),frameWidth:a().optional(),frameHeight:a().optional(),mediaUrl:g().optional()}),tv=m([`pipeline`,`onboard`]),nv=m([`enter`,`exit`]),rv=i({direction:nv,zoneId:g(),zoneName:g().optional()}),iv=i({...$_,kind:y(`object`),source:tv.optional(),frameId:g().optional(),trackId:g().optional(),className:g(),...Y_,confidence:a().optional(),bbox:V.optional(),zones:p(g()).readonly().optional(),state:E_.optional(),zoneCrossing:rv.optional(),frameWidth:a().optional(),frameHeight:a().optional(),mediaKey:g().optional(),keyFrameMediaKey:g().optional(),mediaUrl:g().optional(),importance:a().optional()}),av=i({...$_,kind:y(`audio`),rms:a(),dbfs:a(),classification:i({className:g(),originalClass:g().optional(),score:a()}).optional(),mediaUrl:g().optional()}),ov=m([`crop`,`thumbnail`,`snapshot`,`firstFrame`,`lastFrame`,`fullFrame`,`fullFrameBoxed`,`faceCrop`,`plateCrop`,`keyFrame`,`keyFrameSmall`,`thumbnailSmall`,`sceneFrame`]),sv=i({key:g(),kind:ov,sizeBytes:a(),timestamp:a()}),cv=sv.extend({url:g(),base64:g()}),lv=cv.omit({base64:!0}),uv=m([`person`,`vehicle`,`animal`,`package`,`face`,`plate`]),dv=m([`subject`,`model_error`]),fv=m([`operator`,`assist`]),pv=i({x:a(),y:a(),w:a(),h:a()}),mv=i({id:g(),trackId:g(),deviceId:a(),mediaKey:g(),bbox:pv,macroClass:uv,label:g().optional(),subLabel:g().optional(),kind:dv,source:fv,assistModelId:g().optional(),assistScore:a().optional(),exportedInBatch:g().optional(),createdAt:a()}),hv=mv.omit({id:!0,trackId:!0,deviceId:!0,mediaKey:!0,createdAt:!0,exportedInBatch:!0}),gv=i({trackId:g(),deviceId:a(),className:g(),label:g().optional(),firstSeen:a(),lastSeen:a(),frameCount:a().int(),annotationCount:a().int()}),_v=i({mediaKey:g(),kind:ov,timestamp:a(),sizeBytes:a().int(),copied:v()}),vv=i({frameId:g(),deviceId:a(),trackId:g(),sourceMediaKey:g(),sourceKind:ov,sizeBytes:a().int(),width:a().int(),height:a().int(),copiedAt:a()}),yv=m([`source-missing`,`unreadable-image`,`write-failed`]),bv=i({copied:p(vv).readonly(),refused:p(i({sourceMediaKey:g(),reason:yv})).readonly()}),xv=i({candidates:p(_v).readonly(),copies:p(vv).readonly(),autoPickMediaKey:g().optional()}),Sv=b(`kind`,[i({kind:y(`package`),zone:pv.optional()}),i({kind:y(`objects`),modelId:g(),minScore:a().optional()})]),Cv=b(`kind`,[i({kind:y(`proposed`),modelId:g(),stepId:g(),minScore:a(),proposals:p(hv).readonly(),belowThreshold:a().int()}),i({kind:y(`refused`),reason:g(),detail:g().optional()})]),wv=i({trackId:g(),retrainStatus:V_,changed:v(),reason:m([`unknown-track`,`no-frames-copied`,`not-staging`,`not-trained`,`unchanged`]).optional()}),Tv=1e3,Ev=5e3,Dv=i({deviceId:a(),since:a().optional(),until:a().optional(),limit:a().int().min(1).max(Ev).default(Tv),projection:m([`full`,`slim`]).optional()}),Ov=Dv.extend({classFilter:g().optional()}),kv=i({deviceIds:p(a()),since:a().optional(),until:a().optional(),limit:a().int().min(1).max(1e3).default(200),cursor:g().optional(),projection:R_.optional(),includeStationary:v().optional(),classes:p(g()).optional()}),Av=i({id:g(),deviceId:a(),openedAt:a(),lastActiveAt:a(),sealedAt:a().nullable(),memberCount:a().int().nonnegative(),groupShotKey:g().nullable()}),jv=200,Mv=50,Nv=i({deviceIds:p(a()).min(1),since:a().optional(),until:a().optional(),limit:a().int().min(1).max(200).default(50)}),Pv=i({summaries:p(Av).readonly()}),Fv=i({summary:Av,trackIds:p(g()).readonly()}),Iv=i({tracks:p(Q_).readonly(),nextCursor:g().nullable()}),Lv=50,Rv=200,zv=i({deviceId:a(),since:a(),until:a(),limit:a().int().min(1).max(Rv).default(Lv),minImportance:a().min(0).max(1).optional(),classFilter:g().optional()}),Bv=i({id:g(),trackId:g(),timestamp:a(),className:g(),...Y_,importance:a(),bestEventId:g(),windowMs:a().optional(),...U_,...W_}),Vv=i({deviceIds:p(a()).min(1).max(200),since:a(),until:a(),limit:a().int().min(1).max(Rv).default(Lv),minImportance:a().min(0).max(1).optional(),classFilter:g().optional()}),Hv=i({deviceId:a(),events:p(Bv).readonly()}),Uv=i({bucketStart:a(),motion:a().int(),object:a().int(),audio:a().int()}),Wv=200,Gv=i({deviceId:a(),read:m([`read`,`unreadable`]),buckets:p(Uv).readonly()}),Kv=i({trackId:g(),className:g(),confidence:a(),bbox:V,zones:p(g()).readonly(),state:E_}),qv=f({id:g(),kind:m([`first-level`,`detail`]),macroClass:g(),score:a(),bbox:i({x:a(),y:a(),width:a(),height:a()}),labels:p(f({label:g(),score:a()})).readonly(),parentId:g().optional()}),Jv=iv.extend({score:a()}),Yv=i({text:g(),deviceId:a().optional(),since:a().optional(),until:a().optional(),classFilter:g().optional(),limit:a().default(50),minScore:a().min(0).max(1).default(.2)}),Xv=i({tracks:a().int(),events:a().int(),media:a().int(),faces:a().int(),plates:a().int(),embeddings:a().int()}),Zv=i({mediaDropped:a().int(),tracks:a().int(),events:a().int()}),Qv=i({deviceId:a(),rows:a().int(),bytes:a().int()}),$v=i({totalRows:a().int(),totalBytes:a().int(),devices:p(Qv).readonly()}),ey=i({kind:ov,rows:a().int(),bytes:a().int()}),ty=i({totalRows:a().int(),totalBytes:a().int(),kinds:p(ey).readonly(),unaccountedRows:a().int(),unaccountedBytes:a().int()}),ny=i({motion:a().int(),object:a().int(),audio:a().int()}),ry=i({deviceId:a().optional(),since:a().optional(),until:a().optional(),maxTracks:a().int().positive().optional(),executeOnNodeId:g().optional(),pacingMs:a().int().nonnegative().optional()}),iy=i({deleted:a()}),ay=i({started:v(),alreadyRunning:v()}),oy=i({running:v(),scanned:a(),rebuilt:a(),missingKeyFrame:a(),missingBbox:a(),notRunnable:a(),noCapableNode:a(),failed:a(),complete:v().nullable(),startedAtMs:a().nullable(),finishedAtMs:a().nullable(),error:g().nullable()}),sy=i({started:v(),alreadyRunning:v()}),cy=i({mode:m([`report`,`reclaim`]).default(`report`),scopes:p(m([`motion-still`,`track-filmstrip`])).min(1).optional(),deviceIds:p(a().int()).min(1).optional(),restart:v().optional(),pageSize:a().int().min(50).max(5e3).optional(),maxRowsPerDevice:a().int().min(1).max(5e5).optional(),maxReclaimPerDevice:a().int().min(1).max(5e5).optional(),maxBytesPerRun:a().int().min(1).optional(),budgetMinutes:a().int().min(1).max(720).optional(),throttleBytesPerSec:a().int().min(64*1024).optional(),graceMinutes:a().int().min(1).max(10080).optional()}),ly=i({running:v(),mode:m([`report`,`reclaim`]).nullable(),totalExamined:a(),totalEligible:a(),totalReclaimed:a(),totalBytesReclaimed:a(),totalRefused:a(),devicesDone:a(),complete:v().nullable(),startedAtMs:a().nullable(),finishedAtMs:a().nullable(),error:g().nullable()}),uy=i({timestamp:a(),frame:v_}),dy=i({tracks:p(i({className:g(),firstSeenMs:a(),lastSeenMs:a(),bbox:V,framesMatched:a().int()})).readonly()}),fy={name:`pipeline-analytics`,scope:`device`,mode:`singleton`,kind:`wrapper`,defaultActive:!0,deviceTypes:[D.Camera],exposesDeviceSettings:!0,methods:{getActiveTracks:T(i({deviceId:a()}),p(Q_).readonly()),getTrack:T(i({deviceId:a(),trackId:g()}),Q_.nullable()),listTracks:T(i({deviceId:a(),since:a().optional(),until:a().optional(),limit:a().optional(),zone:O_.optional(),projection:R_.optional(),includeStationary:v().optional(),classes:p(g()).optional()}),p(Q_).readonly()),listRecentTracks:T(kv,Iv),listSummaries:T(Nv,Pv),getSummary:T(i({id:g()}),Fv.nullable()),clearTracks:T(i({deviceId:a()}),h(),{kind:`mutation`,auth:`admin`}),getMotionEvents:T(Dv,p(ev).readonly()),getObjectEvents:T(Ov,p(iv).readonly()),getAudioEvents:T(Dv,p(av).readonly()),listEventKinds:T(i({deviceId:a()}),p(M_).readonly()),listEventKindsBatch:T(i({deviceIds:p(a()).min(1).max(200)}),p(N_).readonly()),getSensorEvents:T(i({deviceId:a(),since:a().optional(),until:a().optional(),kinds:p(g()).optional(),limit:a().int().min(1).max(Ev).default(Tv)}),p(P_).readonly()),getKeyEvents:T(zv,p(Bv).readonly()),getKeyEventsBatch:T(Vv,p(Hv).readonly()),getEventDensity:T(i({deviceId:a(),since:a(),until:a(),bucketMs:a().int().positive()}),p(Uv).readonly()),getEventDensityBatch:T(i({deviceIds:p(a()).min(1).max(200),since:a(),until:a(),bucketMs:a().int().positive()}),p(Gv).readonly()),pruneEventsBefore:T(i({deviceId:a(),cutoffMs:a()}),i({motion:a().int(),object:a().int(),audio:a().int()}),{kind:`mutation`,auth:`admin`}),pruneTracksBefore:T(i({deviceId:a(),cutoffMs:a()}),Xv,{kind:`mutation`,auth:`admin`}),wipeAllAnalytics:T(i({deviceId:a()}),Xv,{kind:`mutation`,auth:`admin`}),reconcileFromDisk:T(i({deviceId:a()}),Zv,{kind:`mutation`,auth:`admin`}),deleteTracks:T(i({deviceId:a(),trackIds:p(g()).min(1)}),i({deleted:a().int(),failed:p(g()).readonly()}),{kind:`mutation`,auth:`admin`}),setTrackFlags:T(i({deviceId:a(),trackId:g(),flags:G_}),K_,{kind:`mutation`}),getEventStoreFootprint:T(i({}),$v,{kind:`query`,auth:`admin`}),getEventMediaFootprintByKind:T(i({deviceId:a().int().optional()}),ty,{kind:`query`,auth:`admin`}),pruneEvents:T(i({olderThanMs:a(),reason:hi.optional()}),ny,{kind:`mutation`,auth:`admin`}),deleteDeviceEvents:T(i({deviceId:a()}),ny,{kind:`mutation`,auth:`admin`}),pauseForStorageMigration:T(j,i({paused:y(!0)}),{kind:`mutation`,auth:`admin`}),resumeForStorageMigration:T(j,i({resumed:y(!0)}),{kind:`mutation`,auth:`admin`}),refreshStorageLocationsForMigration:T(j,i({refreshed:y(!0)}),{kind:`mutation`,auth:`admin`}),startStorageMigrationMove:T(aa,i({jobId:g()}),{kind:`mutation`,auth:`admin`}),getStorageMigrationMoveStatus:T(i({jobId:g()}),Zi.nullable(),{auth:`admin`}),cancelStorageMigrationMove:T(i({jobId:g()}),i({cancelled:v()}),{kind:`mutation`,auth:`admin`}),relocateMedia:T(na,i({jobId:g()}),{kind:`mutation`,auth:`admin`}),countUnstampedEventMedia:T(i({}),ia,{auth:`admin`}),countRelocatableMedia:T(Ma,ja,{kind:`query`,auth:`admin`}),listRelocateMediaJobs:T(i({}),p(Zi).readonly(),{kind:`query`,auth:`admin`}),cancelRelocateMedia:T(i({jobId:g()}),i({cancelled:v()}),{kind:`mutation`,auth:`admin`}),listOpsLog:T(_i,p(gi).readonly(),{kind:`query`,auth:`admin`}),reclaimDebugMedia:T(cy,sy,{kind:`mutation`,auth:`admin`}),getMediaReclaimStatus:T(i({}),ly,{kind:`query`,auth:`admin`}),getTrainingExportSummary:T(i({deviceIds:p(a()).optional()}),Z_,{kind:`query`,auth:`admin`}),getTrainingExportUrl:T(i({deviceIds:p(a()).optional()}),i({url:g()}),{kind:`query`,auth:`admin`}),listRetrainStaging:T(i({deviceIds:p(a()).optional(),limit:a().int().min(1).max(500).optional()}),p(gv).readonly(),{kind:`query`,auth:`admin`}),listRetrainFrames:T(i({trackId:g()}),xv,{kind:`query`,auth:`admin`}),selectRetrainFrames:T(i({deviceId:a(),trackId:g(),mediaKeys:p(g()).min(1)}),bv,{kind:`mutation`,auth:`admin`}),deselectRetrainFrame:T(i({deviceId:a(),trackId:g(),frameId:g()}),i({removed:v(),removedAnnotations:a().int()}),{kind:`mutation`,auth:`admin`}),getRetrainFrameImage:T(i({frameId:g()}),i({base64:g(),width:a().int(),height:a().int()}),{kind:`query`,auth:`admin`}),proposeRetrainAnnotations:T(i({deviceId:a(),trackId:g(),frameId:g(),subject:Sv,nodeId:g().optional()}),Cv,{kind:`mutation`,auth:`admin`}),runReplayFrameProcessor:T(i({deviceId:a(),source:tv,zones:p(w_).readonly().optional(),detectionRules:p(X).readonly().optional(),zoneMembershipMinOverlap:a().min(0).max(1).optional(),frames:p(uy).min(1)}),dy,{kind:`mutation`,auth:`admin`}),listRetrainAnnotations:T(i({trackId:g()}),p(mv).readonly(),{kind:`query`,auth:`admin`}),saveRetrainAnnotations:T(i({deviceId:a(),trackId:g(),frameId:g(),annotations:p(hv)}),p(mv).readonly(),{kind:`mutation`,auth:`admin`}),completeRetrainTrack:T(i({deviceId:a(),trackId:g()}),wv,{kind:`mutation`,auth:`admin`}),restageRetrainTrack:T(i({deviceId:a(),trackId:g()}),wv,{kind:`mutation`,auth:`admin`}),getRetrainExportUrl:T(i({deviceIds:p(a()).optional()}),i({url:g()}),{kind:`query`,auth:`admin`}),getEventMedia:T(i({eventId:g(),kind:ov.optional(),deviceId:a()}),p(cv).readonly()),getTrackMedia:T(i({trackId:g(),kinds:p(ov).optional(),deviceId:a()}),p(cv).readonly()),listTrackMedia:T(i({trackId:g(),deviceId:a()}),p(lv).readonly()),listEventMedia:T(i({eventId:g(),deviceId:a()}),p(lv).readonly()),searchObjectEvents:T(Yv,p(Jv).readonly()),wipeObjectEmbeddings:T(i({}),iy,{kind:`mutation`,auth:`admin`}),rebuildObjectEmbeddings:T(ry,ay,{kind:`mutation`,auth:`admin`}),getObjectEmbeddingRebuildStatus:T(i({}),oy)},events:{onFrameTracked:{data:i({deviceId:a(),timestamp:a(),frameWidth:a(),frameHeight:a(),detections:p(qv).readonly()})},onTrackStarted:{data:i({deviceId:a(),trackId:g(),className:g()})},onTrackEnded:{data:i({deviceId:a(),trackId:g(),className:g(),durationMs:a()})},onDetectionEvent:{data:i({deviceId:a(),kind:D_,eventId:g(),timestamp:a()})}}},py=i({activeCameras:a(),throttledCameras:a(),avgInferenceTimeMs:a(),queueDepth:a()}),my=i({detectionMode:m([`disabled`,`always-on`,`on-motion`]),configuredFps:a(),actualFps:a(),queueDepth:a(),avgInferenceTimeMs:a(),droppedFrames:a(),phase:m([`idle`,`watching`,`active`])}),hy=my.extend({deviceId:a()}),gy=i({x:a(),y:a(),w:a(),h:a()}),_y=i({bytes:_(Uint8Array).optional(),jpeg:g().optional(),width:a().int().positive(),height:a().int().positive(),tier:m([`native`,`ram-fullframe`]).optional()}),vy=i({bbox:gy,className:g()}),yy=i({stepId:g(),className:g(),score:a(),bbox:gy.optional(),embedding:g().optional(),embeddingMagnitude:a().optional(),embeddingModelId:g().optional(),label:g().optional(),labelTier:c([y(1),y(2)]).optional(),labelModelId:g().optional(),alignedCropJpeg:g().optional(),nativeFaceShortSidePx:a().optional()}),by=m([`unknown-step`,`model-not-servable`,`unreadable-frame`,`execution-failed`]),xy=b(`kind`,[i({kind:y(`ran`),nodeId:g(),modelId:g(),details:p(yy)}),i({kind:y(`refused`),nodeId:g(),reason:by,detail:g()})]),Sy={min:0,max:6e4,default:3e4,step:500},Cy={min:0,max:6e5,default:12e4,step:5e3},wy={min:5e3,max:6e5,default:9e4,step:5e3},Ty={min:1,max:30,default:4,step:1},Ey={min:1,max:30,default:10,step:1},Dy={min:0,max:300,default:300,step:5},Oy={min:1,max:10,default:4,step:1},ky=m([`onboard`,`analyzer`]),Ay=p(ky),jy=i({deviceId:a(),detected:v(),source:ky.default(`analyzer`),regions:p(sm).readonly().optional()}),My=b(`kind`,[i({kind:y(`local-broker`)}),i({kind:y(`remote-restream`),ownerNodeId:g(),ownerReachableHost:g().optional(),hubHostnameOverride:g().optional()})]).describe(`Per-camera frame-source mode for the runner (P2c)`),Ny=i({deviceKey:g(),weight:a().positive().default(1),maxSessions:a().int().positive().nullable().default(null)}),Py=i({deviceId:a(),detectionMode:m([`disabled`,`always-on`,`on-motion`]).default(`on-motion`),audioMode:m([`disabled`,`always-on`,`on-motion`]).default(`always-on`),motionCooldownMs:a().min(Sy.min).default(Sy.default),maxSessionHoldMs:a().min(Cy.min).max(Cy.max).optional(),audioMotionWindowMs:a().min(wy.min).max(wy.max).optional(),motionFps:a().min(Ty.min).max(Ty.max).default(Ty.default),detectionFps:a().min(Ey.min).max(Ey.max).default(Ey.default),motionStreamId:g(),detectionStreamId:g(),motionSources:Ay.default([`analyzer`]),pipelineEnabled:v().default(!0),steps:p(Y).readonly().optional(),audio:i({modelId:g().optional(),enabled:v()}).nullable().optional(),zones:p(w_).readonly().default([]),onboardMotionDrivesAnalyzer:v().default(!0),occupancyRecheckEnabled:v().default(!0),occupancyRecheckSec:a().min(Dy.min).max(Dy.max).default(Dy.default),occupancyRecheckFrames:a().min(Oy.min).max(Oy.max).default(Oy.default),frameSource:My.default({kind:`local-broker`}),deviceKey:g().optional(),inferenceDevices:p(Ny).readonly().optional()}),Fy=[{key:`motionSources`,type:`multiselect`,label:`Motion Sources`,default:[`analyzer`],options:[{value:`analyzer`,label:`Frame-diff Analyzer (motion addon)`},{value:`onboard`,label:`Camera Onboard Sensor`}]},{key:`motionFps`,type:`slider`,label:`Motion FPS (analyzer)`,min:Ty.min,max:Ty.max,step:Ty.step,default:Ty.default,showValue:!0,unit:`fps`,nullable:!0,nullLabel:`Default`,showWhen:{field:`motionSources`,includes:`analyzer`}},{key:`detectionFps`,type:`slider`,label:`Detection FPS`,min:Ey.min,max:Ey.max,step:Ey.step,default:Ey.default,showValue:!0,unit:`fps`,nullable:!0,nullLabel:`Default`},{key:`motionCooldownMs`,type:`slider`,label:`Motion Cooldown`,description:`Time without a fresh motion event before the active phase ends. Applies to all motion sources — every motion event re-arms the timer.`,min:Sy.min,max:Sy.max,step:Sy.step,default:Sy.default,showValue:!0,unit:`s`,displayScale:1e3,nullable:!0,nullLabel:`Default`},{key:`maxSessionHoldMs`,type:`slider`,label:`Max session hold`,description:`Upper bound on how long detection keeps running past the motion cooldown while a subject is still moving in-frame but no longer triggering motion. Prevents the detection box from stopping on a slow-moving subject. Set to 0 to disable.`,min:Cy.min,max:Cy.max,step:Cy.step,default:Cy.default,showValue:!0,unit:`s`,displayScale:1e3,nullable:!0,nullLabel:`Default`},{key:`audioMotionWindowMs`,type:`slider`,label:`Audio window after motion`,description:`How long audio keeps being analysed after the last motion event. Each new motion event extends the window without restarting the audio stream.`,min:wy.min,max:wy.max,step:wy.step,default:wy.default,showValue:!0,unit:`s`,displayScale:1e3,nullable:!0,nullLabel:`Default`,showWhen:{field:`audioMode`,equals:`on-motion`}},{key:`onboardMotionDrivesAnalyzer`,type:`boolean`,label:`Run motion analyzer on onboard motion`,description:`When onboard motion is detected, temporarily start the frame-diff analyzer to emit zone results. Stops after the motion cooldown window.`,default:!0,showWhen:{field:`motionSources`,includes:`onboard`}},{key:`occupancyRecheckEnabled`,type:`boolean`,style:`checkbox`,label:`Occupancy re-check`,description:`Periodically re-sample a few frames during the watching phase, so objects that are simply parked are still counted (motion gating alone loses them after a restart). On by default at a wide interval; turn it off on cameras where the extra decoder re-dial is expensive.`,default:!0},{key:`occupancyRecheckSec`,type:`slider`,label:`Occupancy re-check interval`,description:`How often (in seconds) the runner re-samples a few frames to confirm the scene is truly empty during the watching phase.`,min:Dy.min,max:Dy.max,step:Dy.step,default:Dy.default,showValue:!0,unit:`s`,showWhen:{field:`occupancyRecheckEnabled`,equals:!0}},{key:`occupancyRecheckFrames`,type:`slider`,label:`Occupancy re-check frames`,description:`Number of frames sampled per occupancy re-check burst.`,min:Oy.min,max:Oy.max,step:Oy.step,default:Oy.default,showValue:!0,showWhen:{field:`occupancyRecheckEnabled`,equals:!0}}],Iy=i({nodeId:g(),attachedCameras:a(),activeCameras:a(),avgInferenceFps:a(),avgInferenceTimeMs:a(),queueDepthTotal:a(),devices:p(i({deviceKey:g(),backend:g(),attachedCameras:a(),queueDepthTotal:a()})).default([]),hardware:i({hasGpu:v(),inferenceBackend:g().optional(),cpuCores:a().optional()})}),Ly=i({framesDecoded:a(),framesAdmitted:a(),framesDroppedPixelFree:a(),viewsMaterialized:a(),viewsSkipped:a(),workerToRunnerBytes:a(),runnerToPoolRawBytes:a(),runnerToPoolJpegBytes:a(),onDemandFullFrameRequests:a(),onDemandCropRequests:a(),nativeHits:a(),nativeMisses:a(),tileHits:a(),tileMisses:a(),fallbackHits:a(),fallbackMisses:a(),retainedWritesAvoided:a(),residentRefs:a(),residentBytes:a(),releases:a(),evictions:a(),staleMisses:a()}),Ry=i({node:Ly,cameras:p(Ly.extend({deviceId:a()}))}),zy=i({nodeId:g(),activeCameras:a(),throttledCameras:a(),avgInferenceTimeMs:a(),queueDepth:a(),frameLazy:Ry.optional()}),By={name:`pipeline-runner`,scope:`system`,mode:`singleton`,methods:{attachCamera:T(Py,i({success:y(!0)}),{kind:`mutation`}),detachCamera:T(i({deviceId:a()}),i({success:y(!0)}),{kind:`mutation`}),reportMotion:T(jy,i({success:y(!0)}),{kind:`mutation`}),getLocalLoad:T(h(),Iy),getLocalMetrics:T(h(),zy),getCameraMetrics:T(i({deviceId:a()}),my.nullable()),getAllCameraMetrics:T(h(),p(hy).readonly()),getLocalCameras:T(h(),p(a()).readonly()),getNativeCrop:T(i({handle:w,bbox:gy,maxWidth:a().int().positive().optional(),encodeJpeg:v().optional()}),_y.nullable()),runDetailSubtree:T(i({deviceId:a(),frameHandle:w.optional(),frameJpeg:g().optional(),cropJpeg:g().optional(),parent:vy,steps:p(g()).optional()}),i({details:p(yy)}).nullable(),{kind:`mutation`}),runStatelessStep:T(i({stepId:g(),modelId:g(),frameJpeg:g(),bbox:gy,className:g(),sourceDeviceId:a()}),xy,{kind:`mutation`})}},Vy=i({engine:J.optional(),steps:p(Y).readonly(),audio:i({engine:J.optional(),modelId:g().optional(),enabled:v(),settings:n(g(),u()).readonly().optional()}).nullable().optional()}),Hy=i({id:g(),name:g(),description:g().optional(),config:Vy,createdAt:g(),updatedAt:g()}),Uy=i({modelId:g().optional(),settings:n(g(),u()).optional(),jumpDeviceKey:g().optional()}),Wy=i({maxCameras:a().int().nonnegative().nullable().default(null),detectWeight:a().positive().optional(),detect:v().optional(),decode:v().optional(),audio:v().optional(),ingest:v().optional(),decodeBudgetMb:a().int().min(1024).max(65536).optional(),maxLiveDecodeWorkers:a().int().min(1).max(32).optional(),reachableHost:g().optional(),inferenceDevices:n(g(),i({enabled:v(),weight:a().positive().optional(),maxSessions:a().int().positive().optional(),steps:n(g(),Uy).optional()})).optional()}),Gy=i({steps:p(Y).readonly(),audio:i({modelId:g(),enabled:v()}).nullable()}),Ky=i({modelId:g().optional(),settings:n(g(),u()).readonly().optional()}),qy=i({pinnedAgentNodeId:g().optional(),stepToggles:n(g(),v()).optional(),stepOverridesByDevice:n(g(),n(g(),n(g(),Ky))).optional(),pipelineByAgent:n(g(),Gy).optional()}),Jy=i({deviceId:a(),agentNodeId:g(),pinned:v(),reason:m([`manual`,`capacity`,`hardware-affinity`,`failover`,`rebalance`]),assignedAt:a()}),Yy=i({nodeId:g(),online:v(),load:Iy,score:a(),decodeHwaccel:g().nullable()}),Xy=i({totalAgents:a(),onlineAgents:a(),totalCameras:a(),attachedCameras:a(),activeCameras:a(),avgInferenceTimeMs:a(),queueDepth:a()}),Zy=n(g(),g()),Qy=i({ownerNodeId:g(),reachableHost:g().optional(),configIssue:g().optional()}),$y=i({camStreamId:g(),codec:g(),width:a(),height:a(),fps:a(),kind:g()}),eb=i({streams:p($y).readonly()}),tb=i({detectionNodeId:g().nullable(),decoderNodeId:g().nullable(),audioNodeId:g().nullable(),sourceNodeId:g().nullable(),pinned:i({detection:v(),decoder:v(),audio:v()}),reasons:i({detection:g().optional(),decoder:g().optional(),audio:g().optional()})}),nb=i({profile:g(),status:g(),codec:g(),width:a(),height:a(),subscribers:a(),inFps:a(),outFps:a()}),rb=i({profiles:p(nb).readonly(),webrtcSessions:a(),rtspRestream:v()}),ib=i({framesWritten:a(),getFrameHits:a(),getFrameMisses:a(),budgetMb:a()}),ab=i({nodeId:g(),formats:p(g()).readonly(),sessionCount:a(),shm:ib}),ob=i({enabled:v(),fps:a()}),sb=m([`idle`,`installing`,`verifying`,`ready`,`failed`]),cb=i({state:sb,error:g().optional()}),lb=m([`idle`,`watching`,`active`]),ub=i({nodeId:g(),engine:i({backend:g(),device:g()}),phase:lb,configuredFps:a(),actualFps:a(),queueDepth:a(),avgInferenceMs:a(),provisioning:cb}),db=i({nodeId:g(),enabled:v()}),fb=Oi,pb=i({mode:fb,active:v(),storageBytes:a()}),mb=m([`source`,`broker`,`detection`,`recording`,`switches`]),hb=m([`timeout`,`error`,`partial`]),gb=i({stage:mb,reason:hb,elapsedMs:a()}),_b=i({state:m([`idle`,`running`,`done`,`error`]),total:a().int().nonnegative(),completed:a().int().nonnegative(),currentDeviceId:a().int().nullable(),failed:p(a().int()).readonly(),mediaDropped:a().int().nonnegative(),tracks:a().int().nonnegative(),events:a().int().nonnegative(),startedAtMs:a().int().nullable(),finishedAtMs:a().int().nullable(),error:g().nullable()}),vb=i({deviceId:a(),assignment:tb,source:eb,broker:rb.nullable(),decoder:ab.nullable(),motion:ob.nullable(),detection:ub.nullable(),audio:db.nullable(),recording:pb.nullable(),switchedOff:p(Mr).readonly(),degraded:p(gb).readonly(),fetchedAt:a()}),yb=[`disabled`,`unavailable`,`cannot-host-camera-root`,`accelerator-preferred`],bb=m(yb),xb=i({key:g(),backend:g(),device:g(),format:m(is),available:v(),enabled:v(),weight:a(),maxSessions:a().nullable(),defaultModelId:g(),steps:n(g(),Uy).optional(),exclusion:bb.nullable()}),Sb=i({nodeId:g(),reachable:v(),devices:p(xb).readonly()}),Cb={name:`pipeline-orchestrator`,scope:`system`,mode:`singleton`,nodeIdMode:`data`,exposesDeviceSettings:!0,methods:{pauseForStorageMigration:T(j,i({paused:y(!0)}),{kind:`mutation`,auth:`admin`}),resumeForStorageMigration:T(j,i({resumed:y(!0)}),{kind:`mutation`,auth:`admin`}),assignPipeline:T(i({deviceId:a(),agentNodeId:g()}),i({success:y(!0)}),{kind:`mutation`,auth:`admin`}),unassignPipeline:T(i({deviceId:a()}),i({success:y(!0)}),{kind:`mutation`,auth:`admin`}),setPipelineDevicePin:T(i({deviceId:a(),deviceKey:g()}),i({success:y(!0)}),{kind:`mutation`,auth:`admin`}),getPipelineDevicePin:T(i({deviceId:a()}),i({deviceKey:g().nullable()})),rebalance:T(h(),i({migrated:a()}),{kind:`mutation`,auth:`admin`}),getPipelineAssignments:T(h(),p(Jy).readonly()),getPipelineAssignment:T(i({deviceId:a()}),Jy.nullable()),getAgentLoad:T(h(),p(Yy).readonly()),getGlobalMetrics:T(h(),Xy),getCameraMetrics:T(i({deviceId:a()}),my.nullable()),getCapabilityBindings:T(i({nodeId:g()}),Zy),setCapabilityBinding:T(i({nodeId:g(),capName:g(),addonId:g()}),i({success:y(!0)}),{kind:`mutation`,auth:`admin`}),getIngestOwner:T(h(),Qy),assignAudio:T(i({deviceId:a(),nodeId:g()}),i({success:y(!0)}),{kind:`mutation`,auth:`admin`}),unassignAudio:T(i({deviceId:a()}),i({success:y(!0)}),{kind:`mutation`,auth:`admin`}),getAudioAssignment:T(i({deviceId:a()}),i({nodeId:g(),pinned:v(),assignedAt:a()}).nullable()),getAudioNodeLoad:T(h(),p(i({nodeId:g(),deviceCount:a()}))),getAudioAssignments:T(h(),p(i({deviceId:a(),nodeId:g(),pinned:v(),assignedAt:a()}))),getAgentSettings:T(i({agentNodeId:g()}),Wy.nullable()),listAgentSettings:T(h(),p(i({nodeId:g(),settings:Wy})).readonly()),removeAgentSettings:T(i({agentNodeId:g()}),i({success:v(),removed:v()}),{kind:`mutation`,auth:`admin`}),setAgentMaxCameras:T(i({agentNodeId:g(),maxCameras:a().int().nonnegative().nullable()}),i({success:y(!0)}),{kind:`mutation`,auth:`admin`}),setAgentDetectWeight:T(i({agentNodeId:g(),detectWeight:a().positive().nullable()}),i({success:y(!0)}),{kind:`mutation`,auth:`admin`}),setAgentCapabilities:T(i({agentNodeId:g(),detect:v().nullable().optional(),audio:v().nullable().optional(),ingest:v().nullable().optional()}),i({success:y(!0)}),{kind:`mutation`,auth:`admin`}),setAgentDecodeLimits:T(i({agentNodeId:g(),decodeBudgetMb:a().int().min(1024).max(65536).nullable().optional(),maxLiveDecodeWorkers:a().int().min(1).max(32).nullable().optional()}),i({success:y(!0)}),{kind:`mutation`,auth:`admin`}),setAgentReachableHost:T(i({agentNodeId:g(),reachableHost:g().nullable()}),i({success:y(!0)}),{kind:`mutation`,auth:`admin`}),setAgentInferenceDevices:T(i({agentNodeId:g(),inferenceDevices:n(g(),i({enabled:v(),weight:a().positive().optional(),maxSessions:a().int().positive().optional(),steps:n(g(),Uy).optional()}))}),i({success:y(!0)}),{kind:`mutation`,auth:`admin`}),getNodeInferenceDevices:T(i({nodeId:g()}),Sb),resetNodePipelineDefaults:T(i({agentNodeId:g()}),i({success:y(!0),effectiveModelId:g().nullable(),clearedCameraOverrides:a()}),{kind:`mutation`,auth:`admin`}),getCameraSettings:T(i({deviceId:a()}),qy.nullable()),setCameraStepToggle:T(i({deviceId:a(),addonId:g(),enabled:v().nullable()}),i({success:y(!0)}),{kind:`mutation`,auth:`admin`}),getCameraStepOverrides:T(i({deviceId:a()}),n(g(),n(g(),n(g(),Ky))).nullable()),setCameraStepOverride:T(i({deviceId:a(),agentNodeId:g(),deviceKey:g(),addonId:g(),patch:Ky.nullable()}),i({success:y(!0)}),{kind:`mutation`,auth:`admin`}),setCameraPipelineForAgent:T(i({deviceId:a(),agentNodeId:g(),pipeline:Gy.nullable()}),i({success:y(!0)}),{kind:`mutation`,auth:`admin`}),resolvePipeline:T(i({deviceId:a(),agentNodeId:g().optional()}),Vy),getCameraSwitches:T(i({deviceId:a()}),Lr),setCameraSwitch:T(i({deviceId:a(),switchId:Mr,enabled:v()}),Lr,{kind:`mutation`,auth:`admin`}),getCameraStatus:T(i({deviceId:a()}),vb),getCameraStatuses:T(i({deviceIds:p(a()).optional()}),p(vb).readonly()),reconcileFromDisk:T(h(),_b,{kind:`mutation`,auth:`admin`}),getReconcileFromDiskStatus:T(h(),_b,{auth:`admin`}),listTemplates:T(h(),p(Hy).readonly()),saveTemplate:T(i({name:g(),description:g().optional(),config:Vy}),Hy,{kind:`mutation`,auth:`admin`}),updateTemplate:T(i({id:g(),name:g().optional(),description:g().optional(),config:Vy.optional()}),Hy,{kind:`mutation`,auth:`admin`}),deleteTemplate:T(i({id:g()}),i({success:y(!0)}),{kind:`mutation`,auth:`admin`})}},wb={motion:`motion`,audio:`audio`,person:`person`,vehicle:`vehicle`,animal:`animal`,package:`package`,door:`door`,pir:`pir`,smoke:`smoke`,water:`water`,button:`button`,generic:`generic`,gas:`smoke`,vibration:`generic`,tamper:`generic`,presence:`person`,lock:`generic`,siren:`generic`,switch:`generic`,doorbell:`button`};function Tb(e){return wb[e]??`generic`}var Eb={contact:`contact`,motion:`motion-sensor`,smoke:`smoke`,flood:`flood`,gas:`gas`,"carbon-monoxide":`carbon-monoxide`,vibration:`vibration`,tamper:`tamper`,presence:`presence`,"enum-sensor":`enum-sensor`,"event-emitter":`device-event`,"lock-control":`lock`,switch:`switch`,button:`button`,doorbell:`doorbell`};function Db(e,t){let n=rh[t];if(n===void 0)throw Error(`EVENT_KIND_BY_CAP: cap '${e}' maps to unknown taxonomy kind '${t}'`);return{...n,icon:Tb(n.iconId)}}var Ob=Object.freeze(Object.fromEntries(Object.entries(Eb).map(([e,t])=>[e,Db(e,t)]))),kb=Object.keys(Eb);function Ab(e,t){let n=rh[e];return n===void 0?null:{kind:n.kind,labelKey:n.labelKey,label:n.label,color:n.color,iconId:n.iconId,icon:Tb(n.iconId),category:n.category,parentKind:n.parentKind,level:n.level,source:{capName:t.capName,deviceId:t.deviceId}}}var jb=m([`workspace`,`baked`,`data-root`]),Mb=m([`idle`,`checking`,`staging`,`pending-restart`,`awaiting-confirmation`]),Nb=m([`in-sync`,`behind-patch`,`behind-series`,`ahead`,`unknown`]),Pb=i({state:Nb,seedVersion:g().nullable(),contractVersion:g().nullable(),contractSource:m([`registry`,`running`]).nullable(),message:g()}),Fb=i({fromVersion:g(),toVersion:g().nullable(),atMs:a(),reason:g()}),Ib=i({packageName:g(),runningVersion:g().nullable(),nodeRuntimeVersion:g().nullable(),activeVersion:g().nullable(),previousVersion:g().nullable(),seedVersion:g().nullable(),latestVersion:g().nullable(),updateAvailable:v(),bootMode:jb,updateState:Mb,pendingVersion:g().nullable(),rolledBack:Fb.nullable(),stateFileCorrupt:v(),lastCheckedAtMs:a().nullable(),imageContract:Pb.optional()}),Lb=i({packageName:g(),runningVersion:g().nullable(),latestVersion:g().nullable(),updateAvailable:v(),checkedAtMs:a(),error:g().nullable()}),Rb=i({accepted:v(),targetVersion:g().nullable(),restarting:v(),message:g()}),zb={name:`server-management`,scope:`system`,mode:`singleton`,methods:{getServerPackageStatus:T(h(),Ib,{auth:`admin`}),checkServerUpdate:T(h(),Lb,{kind:`mutation`,auth:`admin`}),applyServerUpdate:T(i({version:g().optional()}),Rb,{kind:`mutation`,auth:`admin`,timeoutMs:16*6e4}),rollbackServerUpdate:T(h(),Rb,{kind:`mutation`,auth:`admin`}),restartServer:T(h(),Rb,{kind:`mutation`,auth:`admin`})},mount:{kind:`server-provided`}},Bb=d(),Vb=i({to:c([Bb,p(Bb).min(1)]),cc:p(Bb).optional(),bcc:p(Bb).optional(),from:g().optional(),replyTo:g().optional(),subject:g(),text:g(),html:g().optional()}),Hb=i({messageId:g(),accepted:p(Bb).default([]),rejected:p(Bb).default([])}),Ub=i({ready:v(),host:g(),error:g().optional(),lastVerifiedAt:a().optional()}),Wb={name:`smtp-provider`,scope:`system`,mode:`collection`,internal:!0,providerKind:`email`,methods:{sendEmail:T(Vb,Hb,{kind:`mutation`,auth:`admin`,access:`create`}),verify:T(h(),Ub,{kind:`mutation`,auth:`admin`,access:`view`}),getStatus:T(h(),Ub,{auth:`admin`})}},Gb=i({base64:g(),contentType:g()}),Kb=i({lastCapturedAt:a().nullable(),cacheAgeMs:a().nullable(),lastBytes:a().nullable(),lastStreamId:g().nullable()}),qb={name:`snapshot`,scope:`device`,deviceNative:!0,mode:`singleton`,kind:`wrapper`,defaultActive:!0,deviceTypes:[D.Camera],exposesDeviceSettings:!0,methods:{getSnapshot:T(i({deviceId:a(),streamId:g().optional(),force:v().optional()}),Gb.nullable()),invalidateCache:T(i({deviceId:a()}),h(),{kind:`mutation`,auth:`admin`}),getSnapshotOverview:kt(i({deviceIds:p(a()).min(1).max(200)}),p(i({deviceId:a(),lastCapturedAt:a().nullable(),cacheAgeMs:a().nullable(),etag:g().nullable()}))),getDebugState:kt(i({deviceId:a()}),i({battery:i({sleeping:v(),lastUpdated:a(),lastContactAt:a().optional()}).nullable(),state:i({isBattery:v(),reason:m([`disabled`,`offline`,`sleeping`,`unreachable`,`waking`]).nullable()}),frame:i({capturedAt:a().nullable(),ageMs:a().nullable()}),waking:v()})),getSnapshotLinks:kt(i({targets:p(i({deviceId:a(),width:a().int().positive().optional()})).min(1).max(200)}),p(i({deviceId:a(),url:g().nullable(),capturedAt:a().nullable(),ageMs:a().nullable(),expiresAt:a().nullable(),width:a().nullable(),neverCaptured:v(),sleeping:v(),stateReason:m([`disabled`,`offline`,`sleeping`,`unreachable`,`waking`]).nullable(),battery:v()})))},status:{schema:Kb,kind:`poll`}},Jb=i({userId:g(),username:g(),isAdmin:v(),provider:g(),email:g().optional(),displayName:g().optional(),hubUrl:g().optional(),scopes:p(q).optional(),redirectUri:g().optional(),integrationId:g().optional(),jti:g().optional(),codeChallenge:g().optional(),sessionId:g().optional(),refreshTtl:c([a().int().positive(),y(`never`)]).optional()}),Yb={name:`sso-bridge`,scope:`system`,mode:`singleton`,internal:!0,methods:{signBridgeToken:T(i({claims:Jb,ttlSec:c([a().int().positive(),y(`never`)]).optional()}),i({token:g()}),{auth:`admin`}),verifyBridgeToken:T(i({token:g()}),Jb.nullable(),{auth:`admin`})}},Xb=b(`shouldSaveDiskSpace`,[i({providerId:g().min(1),displayName:g().min(1),configSchema:u(),nodeLocal:v(),shouldSaveDiskSpace:y(!0),minFreePercent:a().min(0).max(100)}),i({providerId:g().min(1),displayName:g().min(1),configSchema:u(),nodeLocal:v(),shouldSaveDiskSpace:y(!1),minFreePercent:y(null)})]),Zb={name:`storage`,scope:`system`,mode:`singleton`,methods:{resolve:T(i({location:N,relativePath:g()}),g()),write:T(i({location:N,relativePath:g(),data:_(Uint8Array)}),h(),{kind:`mutation`}),read:T(i({location:N,relativePath:g()}),_(Uint8Array)),exists:T(i({location:N,relativePath:g()}),v()),list:T(i({location:N,prefix:g().optional()}),p(g()).readonly()),delete:T(i({location:N,relativePath:g()}),h(),{kind:`mutation`}),getAvailableSpace:T(i({location:N}),a().nullable()),beginUpload:T(i({location:N,relativePath:g(),sizeBytes:a().optional()}),i({uploadId:g()}),{kind:`mutation`}),writeChunk:T(i({uploadId:g(),offset:a(),data:_(Uint8Array)}),h(),{kind:`mutation`}),finalizeUpload:T(i({uploadId:g()}),h(),{kind:`mutation`}),abortUpload:T(i({uploadId:g()}),h(),{kind:`mutation`}),beginDownload:T(i({location:N,relativePath:g()}),i({downloadId:g(),sizeBytes:a()}),{kind:`mutation`}),readChunk:T(i({downloadId:g(),offset:a(),length:a()}),_(Uint8Array)),endDownload:T(i({downloadId:g()}),h(),{kind:`mutation`}),listLocations:T(i({type:eo.optional()}),p(M).readonly()),listLocationDeclarations:T(h(),p(co).readonly()),upsertLocation:T(M.omit({createdAt:!0,updatedAt:!0}),M,{kind:`mutation`,auth:`admin`}),deleteLocation:T(i({id:g(),force:v().optional()}),h(),{kind:`mutation`,auth:`admin`}),listDrainProgress:T(h(),p(ao).readonly()),testLocation:T(i({id:g()}),i({ok:v(),error:g().optional()}),{auth:`admin`}),listProviders:T(h(),p(Xb).readonly()),testConfig:T(i({providerId:g(),locationId:g().optional(),config:n(g(),u())}),i({ok:v(),error:g().optional()}),{auth:`admin`})}},Qb=i({bytes:a().int().nonnegative()}),$b=i({reclaimedBytes:a().int().nonnegative(),exhausted:v()}),ex={name:`storage-evictable`,scope:`system`,mode:`collection`,internal:!0,methods:{getEvictableUsage:T(i({locationId:g()}),Qb,{auth:`admin`}),evict:T(i({locationId:g(),targetBytes:a().int().positive()}),$b,{kind:`mutation`,auth:`admin`})}},tx={name:`storage-migration`,scope:`system`,mode:`singleton`,methods:{plan:T(ua,va,{auth:`admin`}),start:T(ua,i({jobId:g()}),{kind:`mutation`,auth:`admin`}),status:T(i({jobId:g().optional()}),ha.nullable(),{auth:`admin`}),cancel:T(i({jobId:g()}),i({cancelled:v()}),{kind:`mutation`,auth:`admin`}),movers:T(i({}),p(ba).readonly(),{auth:`admin`}),residue:T(i({}),p(xa).readonly(),{auth:`admin`}),drain:T(Sa,i({jobId:g()}),{kind:`mutation`,auth:`admin`}),cleanupStart:T(Pa,i({jobId:g()}),{kind:`mutation`,auth:`admin`}),cleanupStatus:T(Ia,Fa.nullable(),{auth:`admin`}),cleanupCancel:T(i({jobId:g()}),i({cancelled:v()}),{kind:`mutation`,auth:`admin`}),history:T(i({}),p(ha).readonly(),{auth:`admin`})}},nx=i({locationId:g(),ownedBytes:a().int().nonnegative(),measuredAtMs:a().int().nonnegative()}),rx={name:`storage-occupancy`,scope:`system`,mode:`collection`,internal:!0,methods:{getOccupancy:T(i({locationIds:p(g()).readonly()}),p(nx).readonly(),{auth:`admin`})}},ix=b(`shouldSaveDiskSpace`,[i({providerId:g().min(1),displayName:g().min(1),configSchema:u(),nodeLocal:v(),shouldSaveDiskSpace:y(!0),minFreePercent:a().min(0).max(100)}),i({providerId:g().min(1),displayName:g().min(1),configSchema:u(),nodeLocal:v(),shouldSaveDiskSpace:y(!1),minFreePercent:y(null)})]),ax=i({ok:v(),error:g().optional()}),ox=i({location:M,relativePath:g(),sizeBytes:a().optional()}),sx=i({uploadId:g()}),cx=i({uploadId:g(),offset:a(),data:_(Uint8Array)}),lx=i({uploadId:g()}),ux=i({uploadId:g()}),dx=i({location:M,relativePath:g()}),fx=i({downloadId:g(),sizeBytes:a()}),px=i({downloadId:g(),offset:a(),length:a()}),mx=i({downloadId:g()}),hx={name:`storage-provider`,scope:`system`,mode:`collection`,internal:!0,methods:{getProviderInfo:T(h(),ix,{auth:`admin`}),testLocation:T(i({config:n(g(),u())}),ax,{auth:`admin`}),resolve:T(i({location:M,relativePath:g()}),g(),{auth:`admin`}),write:T(i({location:M,relativePath:g(),data:_(Uint8Array)}),h(),{kind:`mutation`,auth:`admin`}),read:T(i({location:M,relativePath:g()}),_(Uint8Array),{auth:`admin`}),exists:T(i({location:M,relativePath:g()}),v(),{auth:`admin`}),list:T(i({location:M,prefix:g().optional()}),p(g()).readonly(),{auth:`admin`}),delete:T(i({location:M,relativePath:g()}),h(),{kind:`mutation`,auth:`admin`}),getAvailableSpace:T(i({location:M}),a().nullable(),{auth:`admin`}),beginUpload:T(ox,sx,{kind:`mutation`,auth:`admin`}),writeChunk:T(cx,h(),{kind:`mutation`,auth:`admin`}),finalizeUpload:T(lx,h(),{kind:`mutation`,auth:`admin`}),abortUpload:T(ux,h(),{kind:`mutation`,auth:`admin`}),beginDownload:T(dx,fx,{kind:`mutation`,auth:`admin`}),readChunk:T(px,_(Uint8Array),{auth:`admin`}),endDownload:T(mx,h(),{kind:`mutation`,auth:`admin`})}},gx=u().nullable(),_x=n(g(),u()),vx=i({sessionId:g(),profileId:g(),label:g(),cols:a().int().positive(),rows:a().int().positive(),startedAt:a()}),yx=i({profileId:g(),label:g(),description:g().optional(),executable:g().optional(),args:p(g()).readonly().optional(),cwd:g().optional(),environment:p(g()).readonly().optional(),settingsSchema:gx.optional()}),bx=i({instanceId:g(),cameraStableId:g(),nodeId:g(),profileId:g(),profileLabel:g(),name:g(),enabled:v(),executable:g(),args:p(g()).readonly(),cwd:g(),environment:p(g()).readonly(),profileSettings:_x}),xx=i({stableId:g(),nodeId:g(),profileId:g(),profileLabel:g(),name:g(),adoptable:v()}),Sx=b(`kind`,[i({seq:a().int().positive(),kind:y(`data`),data:g()}),i({seq:a().int().positive(),kind:y(`exit`),exitCode:a().int(),signal:a().int().optional()})]),Cx=i({cursor:a().int().nonnegative(),reset:v(),snapshot:g().optional(),events:p(Sx).readonly()}),wx={name:`terminal-session`,scope:`system`,mode:`singleton`,methods:{listProfiles:T(h(),p(yx).readonly(),{auth:`admin`}),listInstances:T(h(),p(bx).readonly(),{auth:`admin`}),createInstance:T(i({targetNodeId:g().min(1),profileId:g().min(1),name:g().trim().min(1).max(160).optional(),executable:g().max(1024).optional(),args:p(g().max(2048)).max(64).optional(),cwd:g().max(1024).optional(),environment:p(g().max(4096)).max(64).optional(),profileSettings:_x.optional()}),bx,{kind:`mutation`,auth:`admin`}),updateInstance:T(i({instanceId:g().min(1),name:g().trim().min(1).max(160).optional(),executable:g().max(1024).optional(),args:p(g().max(2048)).max(64).optional(),cwd:g().max(1024).optional(),environment:p(g().max(4096)).max(64).optional(),profileSettings:_x.optional()}),bx,{kind:`mutation`,auth:`admin`}),deleteInstance:T(i({instanceId:g().min(1)}),h(),{kind:`mutation`,auth:`admin`}),setInstanceEnabled:T(i({instanceId:g().min(1),enabled:v()}),bx,{kind:`mutation`,auth:`admin`}),listLegacyCameras:T(h(),p(xx).readonly(),{auth:`admin`}),adoptLegacyMonitor:T(i({stableId:g().min(1),name:g().trim().min(1).max(160).optional()}),bx,{kind:`mutation`,auth:`admin`}),listSessions:T(h(),p(vx).readonly(),{auth:`admin`}),openSession:T(i({profileId:g(),cols:a().int().positive(),rows:a().int().positive(),executable:g().max(1024).optional(),args:p(g().max(2048)).max(64).optional(),cwd:g().max(1024).optional(),environment:p(g().max(4096)).max(64).optional()}),vx,{kind:`mutation`,auth:`admin`}),resize:T(i({sessionId:g(),cols:a().int().positive(),rows:a().int().positive()}),h(),{kind:`mutation`,auth:`admin`}),pullOutput:T(i({sessionId:g(),afterSeq:a().int().nonnegative(),waitMs:a().int().min(0).max(2e3).default(0),waitForOutput:v().optional()}),Cx,{kind:`mutation`,auth:`admin`,timeoutMs:15e3}),writeInput:T(i({sessionId:g(),data:g().max(64*1024)}),h(),{kind:`mutation`,auth:`admin`}),close:T(i({sessionId:g()}),h(),{kind:`mutation`,auth:`admin`})}},Tx=i({urls:c([g(),p(g())]),username:g().optional(),credential:g().optional()}),Ex={name:`turn-provider`,scope:`system`,mode:`collection`,methods:{getTurnServers:T(h(),p(Tx).readonly())}},Dx=i({credentialId:g(),label:g(),createdAt:a(),lastUsedAt:a().nullable(),transports:p(g()).default([])}),Ox={name:`user-passkeys`,scope:`system`,mode:`collection`,internal:!0,methods:{beginRegistration:T(i({userId:g(),username:g()}),i({optionsJSON:n(g(),u())}),{kind:`mutation`,auth:`admin`,access:`create`}),finishRegistration:T(i({userId:g(),response:n(g(),u()),label:g()}),i({success:y(!0),credentialId:g()}),{kind:`mutation`,auth:`admin`,access:`create`}),beginAuthentication:T(i({userId:g().optional()}),i({optionsJSON:n(g(),u())}),{kind:`mutation`,access:`view`,auth:`admin`}),finishAuthentication:T(i({userId:g(),response:n(g(),u())}),i({verified:v()}),{kind:`mutation`,access:`view`,auth:`admin`}),beginDiscoverableAuthentication:T(i({}),i({optionsJSON:n(g(),u())}),{kind:`mutation`,access:`view`,auth:`admin`}),finishDiscoverableAuthentication:T(i({response:n(g(),u())}),i({verified:v(),userId:g().nullable()}),{kind:`mutation`,access:`view`,auth:`admin`}),listPasskeys:T(i({userId:g()}),p(Dx),{auth:`admin`}),removePasskey:T(i({userId:g(),credentialId:g()}),i({success:y(!0)}),{kind:`mutation`,auth:`admin`,access:`delete`}),getSecondFactorPreference:T(i({userId:g()}),i({enabled:v()}),{auth:`admin`}),setSecondFactorPreference:T(i({userId:g(),enabled:v()}),i({success:y(!0)}),{kind:`mutation`,auth:`admin`,access:`create`})}},kx=m([`cosine`,`dot`,`euclidean`]),Ax=n(g(),c([g(),a(),v()])),jx=i({equals:n(g(),c([g(),a(),v()])).optional(),between:n(g(),s([a(),a()])).optional()}),Mx=i({id:g(),vector:g(),metadata:Ax}),Nx=i({id:g(),score:a(),metadata:Ax}),Px=i({index:g(),dim:a().int().positive(),metric:kx.default(`cosine`)}),Fx=i({index:g(),items:p(Mx)}),Ix=i({upserted:a(),rejected:a()}),Lx=i({index:g(),vector:g(),topK:a().int().positive(),minScore:a().optional(),filter:jx.optional()}),Rx=i({matches:p(Nx),scanned:a(),truncated:v(),effectiveTopK:a().int().positive()}),zx=i({index:g(),ids:p(g())}),Bx=i({index:g(),filter:jx}),Vx=i({deleted:a()}),Hx=i({index:g(),ids:p(g())}),Ux=i({items:p(i({id:g(),metadata:Ax}))}),Wx=i({index:g(),ids:p(g())}),Gx=i({items:p(i({id:g(),vector:g(),metadata:Ax}))}),Kx=i({index:g(),cursor:a().int().nonnegative().default(0),limit:a().int().positive()}),qx=i({items:p(i({id:g(),metadata:Ax})),nextCursor:a().int().nonnegative().nullable()}),Jx=i({index:g()}),Yx=i({backend:g(),count:a(),dim:a(),metric:kx,bytes:a().optional(),exact:v()}),Xx={name:`vector-store`,scope:`system`,mode:`singleton`,internal:!0,methods:{declareIndex:T(Px,h(),{kind:`mutation`,auth:`admin`}),upsert:T(Fx,Ix,{kind:`mutation`,auth:`admin`}),query:T(Lx,Rx,{auth:`admin`}),getByIds:T(Hx,Ux,{auth:`admin`}),fetchByIds:T(Wx,Gx,{auth:`admin`}),scan:T(Kx,qx,{auth:`admin`}),deleteByIds:T(zx,Vx,{kind:`mutation`,auth:`admin`}),deleteByFilter:T(Bx,Vx,{kind:`mutation`,auth:`admin`}),stats:T(Jx,Yx,{auth:`admin`})}},Zx=24,Qx=3,$x=i({id:g(),source:g(),kind:m([`motion`,`object`,`audio`,`native`]),timeRange:i({startMs:a(),endMs:a()}),labels:p(g()).max(3).optional(),thumbnail:g().optional(),stillAtMs:a().optional(),eventIds:p(g()).optional(),eventCount:a().int().nonnegative().optional(),holes:p(i({startMs:a(),endMs:a()})).optional()}),eS=i({playbackUrl:g(),playbackEndpoints:p(g()).optional(),token:g().optional()}),tS={name:`videoclips`,scope:`device`,mode:`singleton`,kind:`wrapper`,defaultActive:!0,deviceTypes:[D.Camera],methods:{listClips:T(i({deviceId:a(),since:a(),until:a(),limit:a().int().positive().optional()}),p($x).readonly(),{kind:`query`,auth:`admin`}),getClipPlayback:T(i({deviceId:a(),clipId:g()}),eS,{kind:`query`,auth:`admin`})}},nS=i({viewportWidth:a().int().positive().optional(),viewportHeight:a().int().positive().optional(),devicePixelRatio:a().positive().optional(),downlinkMbps:a().nonnegative().optional(),prefersTier:g().optional()}).partial(),rS=b(`kind`,[i({kind:y(`adaptive`)}),i({kind:y(`profile`),profile:S}),i({kind:y(`cam-stream`),camStreamId:g().min(1)})]),iS=i({id:g(),label:g(),target:rS,codec:g().nullable(),resolution:i({width:a(),height:a()}).nullable(),status:m([`idle`,`connecting`,`streaming`,`error`,`stopped`]).nullable(),inputFps:a().nullable(),decodeFps:a().nullable(),bitrateKbps:a().nullable()}),aS={name:`webrtc-session`,scope:`device`,mode:`singleton`,kind:`wrapper`,defaultActive:!0,preferredProvider:`stream-broker`,deviceTypes:[D.Camera],methods:{listStreams:T(i({deviceId:a().int().nonnegative()}),p(iS)),createSession:T(i({deviceId:a().int().nonnegative(),target:rS,hints:nS.optional(),relayOnly:v().optional(),consumerAttribution:xu.optional()}),i({sessionId:g(),sdpOffer:g()}),{kind:`mutation`}),handleOffer:T(i({deviceId:a().int().nonnegative(),target:rS.optional(),sdpOffer:g(),sessionId:g().optional(),relayOnly:v().optional(),nonTrickle:v().optional(),disableTurn:v().optional(),disableIpv6:v().optional(),consumerAttribution:xu.optional(),hints:nS.optional()}),i({sessionId:g(),sdpAnswer:g()}),{kind:`mutation`}),handleAnswer:T(i({deviceId:a().int().nonnegative(),sessionId:g(),sdpAnswer:g()}),h(),{kind:`mutation`}),addIceCandidate:T(i({deviceId:a().int().nonnegative(),sessionId:g(),candidate:g(),sdpMid:g().nullable().optional(),sdpMLineIndex:a().int().nullable().optional()}),h(),{kind:`mutation`}),getIceCandidates:T(i({deviceId:a().int().nonnegative(),sessionId:g()}),i({candidates:p(i({candidate:g(),sdpMid:g().nullable(),sdpMLineIndex:a().int().nullable()})),done:v()}),{kind:`query`}),closeSession:T(i({deviceId:a().int().nonnegative(),sessionId:g()}),h(),{kind:`mutation`}),hasAdaptiveBitrate:T(i({deviceId:a().int().nonnegative(),profile:S}),v()),getSessionState:T(i({deviceId:a().int().nonnegative(),sessionId:g()}),i({pendingRenegotiation:i({target:rS,epoch:a()}).nullable()}))},mount:{kind:`server-provided`}},oS=i({childDeviceIds:p(a()).readonly(),hiddenChildIds:p(a()).readonly()}),sS={name:`accessories`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[D.Camera,D.Hub,D.Switch,D.Light,D.Sensor,D.Thermostat,D.Cover,D.Lock,D.Fan,D.MediaPlayer,D.AlarmPanel,D.Generic],methods:{setChildHidden:T(i({deviceId:a().int().nonnegative(),childDeviceId:a().int().nonnegative(),hidden:v()}),h(),{kind:`mutation`,auth:`admin`})},events:{onAccessoriesChanged:{data:i({deviceId:a(),childDeviceIds:p(a()).readonly(),hiddenChildIds:p(a()).readonly()})},onChildVisibilityChanged:{data:i({deviceId:a(),childDeviceId:a(),hidden:v()})}},status:{schema:oS,kind:`command-driven`}},cS=m([`install`,`update`,`uninstall`,`restart`]),lS=m([`queued`,`fetching`,`staged`,`validating`,`applying`,`restarting`,`applied`,`done`,`failed`,`skipped`]),uS=m([`framework`,`addon`]),dS=i({tsMs:a(),nodeId:g(),packageName:g(),phase:lS,message:g()}),fS=i({taskId:g(),nodeId:g(),packageName:g(),fromVersion:g().nullable(),toVersion:g(),target:uS,phase:lS,stagedPath:g().nullable(),attempts:a(),steps:p(dS),error:g().nullable(),startedAtMs:a().nullable(),finishedAtMs:a().nullable()}),pS=m([`running`,`completed`,`failed`,`partially-failed`,`cancelled`]),mS=m([`single`,`bulk`,`cluster`]),hS=i({jobId:g(),kind:cS,createdAtMs:a(),createdBy:g(),scope:mS,tasks:p(fS),state:pS,schemaVersion:y(1)}),gS=m([`debug`,`info`,`warn`,`error`]),_S=m([`off`,`latest`,`beta`]),vS=m([`off`,`latest`,`beta`,`inherit`]),yS=i({id:g(),name:g().optional(),version:g().optional(),description:g().optional(),icon:g().optional(),color:g().optional(),capabilities:p(u()).readonly().optional(),packageName:g(),packageVersion:g(),packageDisplayName:g().optional(),bundle:i({displayName:g(),description:g().optional(),icon:g().optional()}).optional(),protected:v().optional(),removable:v().optional()}),bS=i({pid:a().optional(),mode:g(),state:g()}),xS=i({phase:m([`pending`,`healthy`,`failed`]),retryCount:a(),firstFailureAt:a().nullable(),lastAttemptAt:a().nullable(),lastError:i({message:g(),stack:g().optional()}).nullable(),nextRetryAt:a().nullable(),alertEmitted:v(),retrying:v(),inGracePeriod:v()}),SS=i({manifest:yS,declaration:u().optional(),source:g(),installSource:g().optional(),process:bS.optional(),hasBackup:v().optional(),health:xS.nullable().optional()}),CS=i({name:g(),version:g(),dir:g(),installSource:g().optional()}),wS=i({name:g(),currentVersion:g(),latestVersion:g(),category:m([`addon`,`core`]),requiresRestart:v(),isSystem:v()}),TS=i({version:g(),publishedAt:g(),deprecated:g().optional(),distTags:p(g()).readonly()}),ES=i({name:g(),version:g(),description:g(),keywords:p(g()).readonly(),publishedAt:g(),author:g(),installed:v(),installedVersion:g().optional()}),DS=i({channel:_S,intervalSeconds:a(),updateCheckIntervalSeconds:a()}),OS=vS,kS=u(),AS=u(),jS=u(),MS=m([`queued`,`updating`,`done`,`done-pending-restart`,`failed`]),NS=i({name:g(),isSystem:v(),fromVersion:g(),toVersion:g(),status:MS,error:g().optional(),startedAtMs:a().optional(),completedAtMs:a().optional()}),PS=m([`regular`,`system`,`restarting`,`finalizing`]);i({id:g(),nodeId:g(),startedAtMs:a(),completedAtMs:a().optional(),total:a(),completed:a(),failed:a(),current:g().nullable(),phase:PS,cancelled:v(),items:p(NS).readonly()});var FS=i({packageName:g(),currentVersion:g(),latestVersion:g().nullable(),hasUpdate:v(),description:g().optional(),buildId:g().nullable()}),IS=i({timestamp:g(),level:g(),message:g(),scope:g().optional()}),LS=u(),RS=i({addonId:g().min(1),action:g().min(1),input:u()}),zS={name:`addons`,scope:`system`,mode:`singleton`,nodeIdMode:`data`,methods:{list:T(h(),p(SS).readonly()),getLogs:T(i({addonId:g(),limit:a().min(1).max(500).default(100),level:gS.optional()}),p(LS)),listPackages:T(h(),p(CS).readonly()),installPackage:T(i({packageName:g(),version:g().optional()}),AS,{kind:`mutation`,auth:`admin`}),installFromWorkspace:T(i({packageName:g()}),AS,{kind:`mutation`,auth:`admin`}),isWorkspaceAvailable:T(h(),v()),listWorkspacePackages:T(h(),p(u()).readonly()),uninstallPackage:T(i({packageName:g()}),u(),{kind:`mutation`,auth:`admin`}),reloadPackages:T(h(),jS,{kind:`mutation`,auth:`admin`}),searchAvailable:T(i({query:g().optional()}),p(ES)),listUpdates:T(i({nodeId:g().optional()}),p(wS).readonly(),{auth:`admin`}),updatePackage:T(i({name:g().min(1),version:g().optional(),nodeId:g().optional()}),u(),{kind:`mutation`,auth:`admin`}),rollbackPackage:T(i({name:g().min(1)}),i({rolledBackTo:g().nullable()}),{kind:`mutation`,auth:`admin`}),forceRefresh:T(i({nodeId:g().optional()}),u(),{kind:`mutation`,auth:`admin`}),restartServer:T(i({confirm:y(!0)}),u(),{kind:`mutation`,auth:`admin`}),getLastRestart:T(h(),i({kind:m([`framework-update`,`manual`,`system`,`framework-bulk-update`]),packageName:g().optional(),fromVersion:g().optional(),toVersion:g().optional(),requestedBy:g().optional(),requestedAt:a()}).nullable(),{auth:`admin`}),listFrameworkPackages:T(h(),p(FS).readonly(),{auth:`admin`}),listCapabilityProviders:T(i({capName:g().min(1)}),p(i({addonId:g(),mode:m([`singleton`,`collection`]),isActive:v()})).readonly()),setCapabilityProviderEnabled:T(i({capName:g().min(1),addonId:g().min(1),enabled:v()}),i({success:y(!0)}),{kind:`mutation`,auth:`admin`}),getVersions:T(i({name:g()}),p(TS).readonly()),restartAddon:T(i({addonId:g()}),kS,{kind:`mutation`,auth:`admin`}),retryLoad:T(i({packageName:g()}),i({success:y(!0)}),{kind:`mutation`,auth:`admin`}),getAutoUpdateSettings:T(h(),DS,{auth:`admin`}),setAutoUpdateSettings:T(i({channel:_S,intervalSeconds:a().min(300).max(86400).optional(),updateCheckIntervalSeconds:a().min(900).max(604800).optional()}),u(),{kind:`mutation`,auth:`admin`}),getAddonAutoUpdate:T(i({addonId:g()}),OS,{auth:`admin`}),setAddonAutoUpdate:T(i({addonId:g(),channel:vS}),u(),{kind:`mutation`,auth:`admin`}),applyAutoUpdateToAll:T(i({channel:_S}),i({success:y(!0)}),{kind:`mutation`,auth:`admin`}),custom:T(RS,u(),{kind:`mutation`}),startJob:T(i({kind:m([`install`,`update`,`uninstall`,`restart`]),targets:p(i({name:g().min(1),version:g().min(1)})).min(1),nodeIds:p(g()).optional()}),i({jobId:g()}),{kind:`mutation`,auth:`admin`}),getJob:T(i({jobId:g()}),hS.nullable(),{auth:`admin`}),listJobs:T(i({activeOnly:v().optional()}),p(hS),{auth:`admin`}),cancelJob:T(i({jobId:g()}),i({cancelled:v()}),{kind:`mutation`,auth:`admin`}),onAddonLogs:T(i({addonId:g(),level:gS.optional()}),IS,{kind:`subscription`})},mount:{kind:`server-provided`}},BS=i({co2Ppm:a().min(0).optional(),vocPpb:a().min(0).optional(),pm25:a().min(0).optional(),pm10:a().min(0).optional(),aqi:a().optional(),lastFetchedAt:a(),unit:g().optional(),precision:a().int().min(0).max(10).optional()}),VS={name:`air-quality-sensor`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[D.Sensor],methods:{},status:{schema:BS,kind:`push`},runtimeState:BS,durability:`restored`,volatileStateFields:[`lastFetchedAt`]},HS=i({lux:a().min(0),lastFetchedAt:a(),unit:g().optional(),precision:a().int().min(0).max(10).optional()}),US={name:`ambient-light-sensor`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[D.Sensor],methods:{},status:{schema:HS,kind:`push`},runtimeState:HS,durability:`restored`,volatileStateFields:[`lastFetchedAt`]},WS=i({className:g(),hits:a().int().nonnegative(),avgScore:a().min(0).max(1),peakScore:a().min(0).max(1)}),GS=i({ts:a().int(),windowSec:a().int().positive(),level:i({rms:a(),dbfs:a()}),peakDbfs:a(),avgDbfs:a(),current:i({className:g(),score:a().min(0).max(1),timestamp:a().int()}).nullable(),byClass:p(WS).readonly()}),KS=i({ts:a().int(),dbfs:a().nullable(),peakDbfs:a(),avgDbfs:a(),topClass:g().nullable(),topScore:a().min(0).max(1).nullable()}),qS=i({points:p(KS).readonly(),effectiveSampleEveryMs:a().int().positive(),windowMsActual:a().int().nonnegative()}),JS={name:`audio-metrics`,scope:`device`,mode:`singleton`,deviceTypes:[D.Camera],methods:{getCurrentSnapshot:T(i({deviceId:a()}),GS.nullable()),getHistory:T(i({deviceId:a(),windowSec:a().int().positive().optional(),sampleEveryMs:a().int().positive().optional()}),qS)},runtimeState:GS,durability:`session`},YS=i({enabled:v(),isRunning:v(),lastTriggeredAt:a(),lastError:g().nullable(),lastChangedAt:a()}),XS={name:`automation-control`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[D.Automation],methods:{enable:T(i({deviceId:a().int().nonnegative()}),h(),{kind:`mutation`,auth:`admin`}),disable:T(i({deviceId:a().int().nonnegative()}),h(),{kind:`mutation`,auth:`admin`}),trigger:T(i({deviceId:a().int().nonnegative(),skipCondition:v().optional()}),h(),{kind:`mutation`,auth:`admin`})},status:{schema:YS,kind:`push`},runtimeState:YS,durability:`session`},ZS=i({percentage:a().min(0).max(100).nullable(),charging:m([`dc`,`solar`,`none`,`unknown`]),sleeping:v(),lastUpdated:a(),lastContactAt:a().optional(),binary:v().optional()}),QS={name:`battery`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[D.Camera,D.Sensor,D.Button,D.Switch],methods:{wakeForStream:T(i({deviceId:a(),timeoutMs:a().int().min(500).max(3e4).default(8e3)}),i({awoke:v(),durationMs:a()}),{kind:`mutation`})},events:{onStatusChanged:{data:i({deviceId:a(),status:ZS})}},status:{schema:ZS,kind:`push`,empty:{percentage:0,charging:`unknown`,sleeping:!1,lastUpdated:0}},runtimeState:ZS,durability:`restored`,volatileStateFields:[`lastUpdated`]},$S=i({on:v(),lastChangedAt:a()}),eC={name:`binary`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[D.Sensor],methods:{},status:{schema:$S,kind:`push`},runtimeState:$S,durability:`restored`,volatileStateFields:[`lastChangedAt`]},tC=i({percentage:a().min(0).max(100),lastChangedAt:a()}),nC={name:`brightness`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[D.Light],methods:{setBrightness:T(i({deviceId:a().int().nonnegative(),percentage:a().min(0).max(100)}),h(),{kind:`mutation`,auth:`admin`})},events:{onBrightnessChanged:{data:i({deviceId:a(),percentage:a().min(0).max(100),lastChangedAt:a()})}},status:{schema:tC,kind:`command-driven`},runtimeState:tC,durability:`session`},rC={name:`button`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[D.Button],methods:{press:T(i({deviceId:a().int().nonnegative()}),h(),{kind:`mutation`,auth:`admin`})}},iC=i({host:g(),port:a().int().positive().optional(),onvifPort:a().int().positive().optional(),rtspPort:a().int().positive().optional(),https:v().optional(),username:g().optional(),password:g().optional(),onvifProfile:g().optional()}),aC=i({host:g(),port:a().int().positive().nullable(),onvifPort:a().int().positive().nullable(),rtspPort:a().int().positive().nullable(),https:v().nullable(),hasUsername:v(),hasPassword:v(),onvifProfile:g().nullable()}),oC={name:`camera-credentials`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[D.Camera],methods:{getCredentials:T(i({deviceId:a()}),iC.nullable(),{kind:`query`,auth:`admin`})},status:{schema:aC,kind:`command-driven`}},sC=i({detected:v(),lastChangedAt:a()}),cC={name:`carbon-monoxide`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[D.Sensor],methods:{},status:{schema:sC,kind:`push`},runtimeState:sC,durability:`restored`,volatileStateFields:[`lastChangedAt`]},lC=m([`off`,`heat`,`cool`,`auto`,`heat_cool`,`fan_only`,`dry`]),uC=i({mode:lC,availableModes:p(lC),fanMode:g(),availableFanModes:p(g()),preset:g(),availablePresets:p(g()),target:a().nullable(),targetHigh:a().nullable(),targetLow:a().nullable(),targetHumidity:a().min(0).max(100).nullable(),currentTemp:a().nullable(),currentHumidity:a().min(0).max(100).nullable(),swingVertical:v().nullable(),swingHorizontal:v().nullable(),lastFetchedAt:a()}),dC={name:`climate-control`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[D.Thermostat,D.Climate],methods:{setMode:T(i({deviceId:a().int().nonnegative(),mode:lC}),h(),{kind:`mutation`,auth:`admin`}),setFanMode:T(i({deviceId:a().int().nonnegative(),fanMode:g().min(1)}),h(),{kind:`mutation`,auth:`admin`}),setPreset:T(i({deviceId:a().int().nonnegative(),preset:g().min(1)}),h(),{kind:`mutation`,auth:`admin`}),setTarget:T(i({deviceId:a().int().nonnegative(),target:a()}),h(),{kind:`mutation`,auth:`admin`}),setTargetRange:T(i({deviceId:a().int().nonnegative(),targetLow:a(),targetHigh:a()}),h(),{kind:`mutation`,auth:`admin`}),setTargetHumidity:T(i({deviceId:a().int().nonnegative(),targetHumidity:a().min(0).max(100)}),h(),{kind:`mutation`,auth:`admin`}),setSwingVertical:T(i({deviceId:a().int().nonnegative(),on:v()}),h(),{kind:`mutation`,auth:`admin`}),setSwingHorizontal:T(i({deviceId:a().int().nonnegative(),on:v()}),h(),{kind:`mutation`,auth:`admin`})},status:{schema:uC,kind:`push`},runtimeState:uC,durability:`session`},fC=i({r:a().int().min(0).max(255),g:a().int().min(0).max(255),b:a().int().min(0).max(255)}),pC=i({h:a().min(0).max(360),s:a().min(0).max(100),v:a().min(0).max(100)}),mC=b(`mode`,[i({mode:y(`rgb`),rgb:fC}),i({mode:y(`hsv`),hsv:pC}),i({mode:y(`mired`),mireds:a().int().min(50).max(1e3)})]),hC=i({mode:m([`rgb`,`hsv`,`mired`]),rgb:fC.optional(),hsv:pC.optional(),mireds:a().int().optional(),lastChangedAt:a()}),gC={name:`color`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[D.Light],methods:{setColor:T(i({deviceId:a().int().nonnegative(),color:mC}),h(),{kind:`mutation`,auth:`admin`})},events:{onColorChanged:{data:i({deviceId:a(),mode:m([`rgb`,`hsv`,`mired`]),rgb:fC.optional(),hsv:pC.optional(),mireds:a().int().optional(),lastChangedAt:a()})}},status:{schema:hC,kind:`command-driven`},runtimeState:hC,durability:`session`},_C=2e4,vC=b(`outcome`,[i({outcome:y(`validated`),latencyMs:a().nonnegative().optional(),detail:g().optional()}).strict(),i({outcome:y(`rejected`),error:g()}).strict(),i({outcome:y(`inconclusive`),error:g()}).strict()]),yC=i({settings:n(g(),u())}),bC=i({label:g()}),xC={name:`connection-test`,scope:`system`,mode:`collection`,methods:{testSettings:T(yC,vC,{kind:`mutation`,auth:`admin`}),describeTest:T(h(),bC,{auth:`admin`})}},SC=i({connected:v(),lastChangedAt:a()}),CC={name:`connectivity`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[D.Sensor],methods:{},status:{schema:SC,kind:`push`},runtimeState:SC,durability:`restored`,volatileStateFields:[`lastChangedAt`]},wC=i({key:g().min(1),label:g().min(1),level:a().min(0).max(100).nullable(),status:m([`ok`,`replace`]).nullable(),lastResetAt:a().nullable(),resettable:v()}),TC=i({items:p(wC),lastChangedAt:a()}),EC={name:`consumables`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:Object.values(D),deviceConfig:{ui:{kind:`widget`,widgetId:`host/consumables-panel`,tab:`consumables`,topTab:!0,label:`Consumables`,order:5}},methods:{reset:T(i({deviceId:a().int().nonnegative(),key:g().min(1)}),h(),{kind:`mutation`,auth:`admin`})},status:{schema:TC,kind:`push`,empty:{items:[],lastChangedAt:0},itemArray:{path:`items`,keyField:`key`,labelField:`label`,itemSchema:wC,emptyItem:{key:``,label:``,level:null,status:null,lastResetAt:null,resettable:!1}}},runtimeState:TC.extend({lastFetchedAt:a()}),durability:`session`},DC=i({entryOpen:v(),lastChangedAt:a()}),OC={name:`contact`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[D.Sensor],methods:{},status:{schema:DC,kind:`push`},runtimeState:DC,durability:`restored`,volatileStateFields:[`lastChangedAt`]},kC=m([`numeric`,`select`,`text`,`datetime`]),AC=i({kind:kC,value:c([a(),g()]),options:p(g()),lastChangedAt:a(),unit:g().optional(),min:a().optional(),max:a().optional(),step:a().optional(),precision:a().int().min(0).max(10).optional(),format:m([`date`,`time`,`datetime`]).optional()}),jC=b(`kind`,[i({kind:y(`numeric`),value:a()}),i({kind:y(`select`),value:g().min(1)}),i({kind:y(`text`),value:g()}),i({kind:y(`datetime`),value:g().min(1)})]),MC={name:`control`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[D.Control],methods:{setValue:T(i({deviceId:a().int().nonnegative(),control:jC}),h(),{kind:`mutation`,auth:`admin`})},status:{schema:AC,kind:`push`},runtimeState:AC,durability:`session`},NC=m([`open`,`opening`,`closing`,`closed`,`stopped`]),PC=i({state:NC,position:a().min(0).max(100).nullable(),tiltPosition:a().min(0).max(100).nullable(),lastChangedAt:a()}),FC={name:`cover`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[D.Cover],methods:{open:T(i({deviceId:a().int().nonnegative()}),h(),{kind:`mutation`,auth:`admin`}),close:T(i({deviceId:a().int().nonnegative()}),h(),{kind:`mutation`,auth:`admin`}),stop:T(i({deviceId:a().int().nonnegative()}),h(),{kind:`mutation`,auth:`admin`}),setPosition:T(i({deviceId:a().int().nonnegative(),position:a().min(0).max(100)}),h(),{kind:`mutation`,auth:`admin`}),setTiltPosition:T(i({deviceId:a().int().nonnegative(),tiltPosition:a().min(0).max(100)}),h(),{kind:`mutation`,auth:`admin`})},status:{schema:PC,kind:`push`},runtimeState:PC,durability:`restored`,volatileStateFields:[`lastChangedAt`]},IC=m([`auto`,`day`,`night`,`schedule`]),LC=i({min:a(),max:a(),step:a()}),RC=i({mode:IC,sensitivity:a().optional(),switchDelaySec:a().optional(),lastFetchedAt:a()}),zC=i({modes:p(IC),supportsSensitivity:v(),sensitivity:LC.optional(),supportsSwitchDelay:v(),switchDelaySec:LC.optional()}),BC=i({mode:IC.optional(),sensitivity:a().optional(),switchDelaySec:a().optional()}),VC={name:`day-night`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[D.Camera],deviceConfig:{ui:{kind:`derived-form`,builderId:`day-night`,tab:`image`}},methods:{getOptions:T(i({deviceId:a()}),zC),setSettings:T(i({deviceId:a(),settings:BC}),h(),{kind:`mutation`,auth:`admin`})},status:{schema:RC,kind:`poll`},runtimeState:RC,durability:`restored`,volatileStateFields:[`lastFetchedAt`]},HC=i({online:v(),lastChangedAt:a()}),UC={name:`device-status`,scope:`device`,deviceNative:!0,mode:`singleton`,methods:{},events:{onStatusChanged:{data:i({deviceId:a(),status:HC})}},status:{schema:HC,kind:`push`},runtimeState:HC,durability:`restored`,volatileStateFields:[`lastChangedAt`]},WC=i({lastPressedAt:a().nullable(),pressCountSinceStart:a()}),GC=i({deviceId:a(),timestamp:a()}),KC={name:`doorbell`,scope:`device`,deviceNative:!0,mode:`singleton`,kind:`wrapper`,defaultActive:!1,deviceTypes:[D.Button,D.Camera],exposesDeviceSettings:!0,methods:{},events:{onPressed:{data:GC}},status:{schema:WC,kind:`push`},runtimeState:WC,durability:`restored`},qC=m([`date`,`time`,`datetime`]),JC=i({value:g(),format:qC.optional(),lastFetchedAt:a()}),YC={name:`enum-sensor`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[D.Sensor],methods:{},status:{schema:JC,kind:`push`},runtimeState:JC,durability:`restored`,volatileStateFields:[`lastFetchedAt`]},XC=i({deviceId:a(),eventType:g(),data:n(g(),u()).nullable(),timestamp:a(),seq:a()}),ZC=i({eventTypes:p(g()),lastEvent:XC.nullable(),eventCountSinceStart:a()}),QC={name:`event-emitter`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[D.EventEmitter],methods:{},events:{onEvent:{data:XC}},status:{schema:ZC,kind:`push`},runtimeState:ZC,durability:`session`},$C=i({id:g(),type:g(),timestamp:a(),label:g().optional(),thumbnailUrl:g().optional(),clipUrl:g().optional(),metadata:n(g(),u()).optional()}),ew={name:`events`,scope:`device`,mode:`singleton`,deviceTypes:[D.Camera],methods:{getEvents:T(i({deviceId:a(),from:a().optional(),to:a().optional(),limit:a().optional()}),p($C)),getEventThumbnail:T(i({deviceId:a(),eventId:g()}),i({base64:g(),contentType:g()}).nullable()),getEventClipUrl:T(i({deviceId:a(),eventId:g()}),g().nullable())}},tw=i({id:g(),name:g(),sampleCount:a().int().nonnegative(),coverMediaKey:g().optional(),coverBase64:g().optional()}),nw=i({id:g(),source:m([`detected`,`photo`]),addedAt:a().int(),deviceId:a().int().optional(),base64:g().optional()}),rw=i({faceId:g(),deviceId:a().int(),trackId:g(),timestamp:a().int(),recognizedIdentityId:g().optional(),identityName:g().optional(),assigned:v(),base64:g().optional(),cropUrl:g().optional(),faceBbox:V.optional(),keyFrameMediaKey:g().optional(),bestMatchScore:a().optional(),nativeFaceShortSidePx:a().optional(),suggestedIdentityId:g().optional(),suggestedMatchScore:a().optional()}),iw=m([`unassigned`,`recognized`,`identified`,`all`]),aw=m([`timestamp`,`suggestionConfidence`]),ow=m([`asc`,`desc`]),sw=i({faceIds:p(g()).readonly(),representativeFaceId:g(),size:a().int(),cohesion:a()}),cw=i({key:g(),kind:g(),url:g(),sizeBytes:a(),timestamp:a()}),lw={name:`face-gallery`,scope:`system`,mode:`singleton`,methods:{listIdentities:T(i({includeCrops:v().optional()}).optional(),p(tw).readonly()),createIdentity:T(i({name:g().min(1)}),tw,{kind:`mutation`,auth:`admin`}),renameIdentity:T(i({id:g(),name:g().min(1)}),h(),{kind:`mutation`,auth:`admin`}),deleteIdentity:T(i({id:g()}),h(),{kind:`mutation`,auth:`admin`}),listIdentitySamples:T(i({identityId:g()}),p(nw).readonly()),removeSample:T(i({identityId:g(),sampleId:g()}),h(),{kind:`mutation`,auth:`admin`}),listRecentFaces:T(i({deviceId:a().int().optional(),deviceIds:p(a().int()).optional(),limit:a().int().positive().optional(),filter:iw.optional(),since:a().int().optional(),until:a().int().optional(),sortBy:aw.optional(),sortDirection:ow.optional(),includeCrops:v().optional()}).optional(),p(rw).readonly()),getFaceByTrack:T(i({deviceId:a().int(),trackId:g()}),rw.nullable()),getFaceMedia:T(i({faceId:g()}),p(cw).readonly()),assignFace:T(i({faceId:g(),identityId:g()}),h(),{kind:`mutation`,auth:`admin`}),unassignFace:T(i({faceId:g()}),h(),{kind:`mutation`,auth:`admin`}),deleteFace:T(i({faceId:g()}),h(),{kind:`mutation`,auth:`admin`}),assignFaces:T(i({faceIds:p(g()).min(1),identityId:g()}),i({assigned:a().int(),failed:p(g()).readonly()}),{kind:`mutation`,auth:`admin`}),unassignFaces:T(i({faceIds:p(g()).min(1)}),i({unassigned:a().int(),failed:p(g()).readonly()}),{kind:`mutation`,auth:`admin`}),suggestFaceClusters:T(i({threshold:a().min(0).max(1).optional(),minClusterSize:a().int().min(2).optional(),maxClusters:a().int().positive().optional(),limit:a().int().positive().optional(),maxFacesScanned:a().int().positive().optional()}).optional(),p(sw).readonly())}},uw=m([`forward`,`reverse`]),dw=i({percentage:a().min(0).max(100).nullable(),percentageStep:a().positive().optional(),preset:g(),availablePresets:p(g()),direction:uw.nullable(),oscillating:v().nullable(),lastChangedAt:a()}),fw={name:`fan-control`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[D.Fan],methods:{setPercentage:T(i({deviceId:a().int().nonnegative(),percentage:a().min(0).max(100)}),h(),{kind:`mutation`,auth:`admin`}),setPreset:T(i({deviceId:a().int().nonnegative(),preset:g().min(1)}),h(),{kind:`mutation`,auth:`admin`}),setDirection:T(i({deviceId:a().int().nonnegative(),direction:uw}),h(),{kind:`mutation`,auth:`admin`}),setOscillating:T(i({deviceId:a().int().nonnegative(),oscillating:v()}),h(),{kind:`mutation`,auth:`admin`})},status:{schema:dw,kind:`push`},runtimeState:dw,durability:`session`},pw=i({flags:n(g(),u()),deviceType:g().nullable(),model:g().nullable(),channelCount:a().nullable(),lastProbedAt:a(),lastFetchedAt:a()}),mw={name:`feature-probe`,scope:`device`,deviceNative:!0,mode:`singleton`,methods:{},events:{onProbeChanged:{data:i({deviceId:a(),status:pw})}},status:{schema:pw,kind:`push`},runtimeState:pw,durability:`session`},hw=i({flooded:v(),lastChangedAt:a()}),gw={name:`flood`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[D.Sensor],methods:{},status:{schema:hw,kind:`push`},runtimeState:hw,durability:`restored`,volatileStateFields:[`lastChangedAt`]},_w=i({detected:v(),lastChangedAt:a()}),vw={name:`gas`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[D.Sensor],methods:{},status:{schema:_w,kind:`push`},runtimeState:_w,durability:`restored`,volatileStateFields:[`lastChangedAt`]},yw=i({on:v(),currentHumidity:a().min(0).max(100).nullable(),targetHumidity:a().min(0).max(100).nullable(),mode:g().nullable(),availableModes:p(g()),action:g().nullable(),minHumidity:a().nullable(),maxHumidity:a().nullable(),lastChangedAt:a()}),bw={name:`humidifier`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[D.Humidifier],methods:{setOn:T(i({deviceId:a().int().nonnegative(),on:v()}),h(),{kind:`mutation`,auth:`admin`}),setTargetHumidity:T(i({deviceId:a().int().nonnegative(),humidity:a().min(0).max(100)}),h(),{kind:`mutation`,auth:`admin`}),setMode:T(i({deviceId:a().int().nonnegative(),mode:g().min(1)}),h(),{kind:`mutation`,auth:`admin`})},status:{schema:yw,kind:`push`},runtimeState:yw,durability:`session`},xw=i({percent:a().min(0).max(100),lastFetchedAt:a(),unit:g().optional(),precision:a().int().min(0).max(10).optional()}),Sw={name:`humidity-sensor`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[D.Sensor,D.Thermostat],methods:{},status:{schema:xw,kind:`push`},runtimeState:xw,durability:`restored`,volatileStateFields:[`lastFetchedAt`]},Cw=i({url:g().nullable(),lastUpdated:a().nullable()}),ww={name:`image`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[D.Image],methods:{},status:{schema:Cw,kind:`push`},runtimeState:Cw,durability:`session`},Tw=m([`0`,`90`,`180`,`270`]),Ew=m([`auto`,`manual`]),Dw=m([`auto`,`manual`]),Ow=m([`off`,`blc`,`wdr`,`hlc`]),kw=i({min:a(),max:a(),step:a()}),Aw=i({brightness:a().optional(),contrast:a().optional(),saturation:a().optional(),sharpness:a().optional(),mirror:v().optional(),flip:v().optional(),rotate:Tw.optional(),whiteBalance:Ew.optional(),warmth:a().optional(),exposureMode:Dw.optional(),backlightMode:Ow.optional(),lastFetchedAt:a()}),jw=i({supportsBrightness:v(),brightness:kw.optional(),supportsContrast:v(),contrast:kw.optional(),supportsSaturation:v(),saturation:kw.optional(),supportsSharpness:v(),sharpness:kw.optional(),supportsMirror:v(),supportsFlip:v(),rotateOptions:p(Tw),whiteBalanceModes:p(Ew),supportsWarmth:v(),warmth:kw.optional(),exposureModes:p(Dw),backlightModes:p(Ow)}),Mw=i({brightness:a().optional(),contrast:a().optional(),saturation:a().optional(),sharpness:a().optional(),mirror:v().optional(),flip:v().optional(),rotate:Tw.optional(),whiteBalance:Ew.optional(),warmth:a().optional(),exposureMode:Dw.optional(),backlightMode:Ow.optional()}),Nw={name:`image-settings`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[D.Camera],deviceConfig:{ui:{kind:`derived-form`,builderId:`image-settings`,tab:`image`}},methods:{getOptions:T(i({deviceId:a()}),jw),setSettings:T(i({deviceId:a(),settings:Mw}),h(),{kind:`mutation`,auth:`admin`})},status:{schema:Aw,kind:`poll`},runtimeState:Aw,durability:`restored`,volatileStateFields:[`lastFetchedAt`]},Pw=i({id:g(),addonId:g(),name:g(),enabled:v(),info:n(g(),u()).readonly(),createdAt:a(),updatedAt:a(),processState:g()}),Fw=i({id:g(),addonId:g(),name:g(),enabled:v(),info:n(g(),u()).readonly(),createdAt:a(),updatedAt:a()}),Iw=i({addonId:g(),name:g(),description:g(),iconUrl:g().nullable(),color:g(),instanceMode:g(),mode:m([`standalone`,`account`,`broker`]),discoveryMode:g(),kind:m([`device-adoption`,`device-provider`]),brokerKind:g().nullable(),supportsLocationImport:v(),canTest:v(),existingInstances:p(i({id:g(),name:g()})),canAdd:v()}),Lw=m([`validated`,`rejected`,`inconclusive`,`unsupported`]),Rw=i({success:v(),error:g().optional(),status:Lw.optional(),testedBy:g().nullable().optional(),latencyMs:a().nonnegative().optional(),detail:g().optional()}),zw=i({addonId:g(),name:g(),enabled:v().optional(),info:n(g(),u()).optional(),settings:n(g(),u()).optional(),skipRestart:v().optional()}),Bw=i({id:g(),name:g().optional(),enabled:v().optional(),info:n(g(),u()).optional()}),Vw=i({success:v(),deletedId:g()}),Hw={name:`integrations`,scope:`system`,mode:`singleton`,methods:{list:T(h(),p(Pw)),get:T(i({id:g()}),Pw),getByAddonId:T(i({addonId:g()}),Fw.nullable()),create:T(zw,Fw,{kind:`mutation`,auth:`admin`}),update:T(Bw,Fw,{kind:`mutation`,auth:`admin`}),delete:T(i({id:g()}),Vw,{kind:`mutation`,auth:`admin`}),getSettings:T(i({id:g()}),n(g(),u()),{auth:`admin`}),setSettings:T(i({id:g(),settings:n(g(),u())}),i({success:v()}),{kind:`mutation`,auth:`admin`}),getAvailableTypes:T(h(),p(Iw),{auth:`admin`}),testConnection:T(i({addonId:g(),settings:n(g(),u())}),Rw,{kind:`mutation`,auth:`admin`})},mount:{kind:`server-provided`}},Uw=i({codecs:p(g()),sampleRate:a(),duplex:m([`half`,`full`]),maxBacklogMs:a()}),Ww=i({talking:v(),lastSessionAt:a().nullable(),ability:Uw.nullable()}),Gw=m([`opus`,`s16le`,`g711ulaw`,`g711alaw`]),Kw={name:`intercom`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[D.Camera],methods:{startSession:T(i({deviceId:a()}),i({sessionId:g(),sdpOffer:g()}),{kind:`mutation`,auth:`protected`}),handleAnswer:T(i({deviceId:a(),sessionId:g(),sdpAnswer:g()}),h(),{kind:`mutation`,auth:`protected`}),stopSession:T(i({deviceId:a(),sessionId:g()}),h(),{kind:`mutation`,auth:`protected`}),startTalkSession:T(i({deviceId:a()}),i({sessionId:g()}),{kind:`mutation`,auth:`protected`}),pushTalkAudio:T(i({deviceId:a(),audioBase64:g(),codec:Gw.optional(),sampleRate:a().int().positive().optional(),channels:a().int().positive().optional(),sequenceNumber:a().int()}),i({accepted:v()}),{kind:`mutation`,auth:`protected`}),endTalkSession:T(i({deviceId:a()}),h(),{kind:`mutation`,auth:`protected`})},events:{onStatusChanged:{data:i({deviceId:a(),status:Ww})}},status:{schema:Ww,kind:`command-driven`},runtimeState:Ww,durability:`session`},qw=m([`idle`,`mowing`,`paused`,`docked`,`error`]),Jw=m([`info`,`warning`,`error`]),Yw=i({activity:qw,batteryLevel:a().min(0).max(100).nullable(),progressPercent:a().min(0).max(100).nullable(),currentCode:a().nullable(),currentCodeLabel:g().nullable(),severity:Jw,lastChangedAt:a()}),Xw={name:`lawn-mower-control`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[D.LawnMower],methods:{startMowing:T(i({deviceId:a().int().nonnegative()}),h(),{kind:`mutation`,auth:`admin`}),pause:T(i({deviceId:a().int().nonnegative()}),h(),{kind:`mutation`,auth:`admin`}),dock:T(i({deviceId:a().int().nonnegative()}),h(),{kind:`mutation`,auth:`admin`})},status:{schema:Yw,kind:`push`},runtimeState:Yw,durability:`session`},Zw=m([`lan`,`wifi`,`docker`,`vpn`,`loopback`,`other`]),Qw=i({name:g(),family:m([`IPv4`,`IPv6`]),address:g(),cidr:g(),netmask:g(),internal:v(),mac:g(),kind:Zw,preferred:v(),plausible:v(),plausibleReason:g()}),$w=i({interfaces:p(Qw).readonly(),probedAt:a()}),eT=Qw.nullable(),tT=i({label:g(),baseUrl:g(),kind:m([`lan-ipv4`,`lan-ipv6`,`public`,`loopback`]),interfaceKind:m([`lan`,`wifi`,`docker`,`vpn`,`other`,`loopback`,`public`]),plausible:v(),plausibleReason:g(),priority:a()}),nT=m([`server-config`,`server-env`,`caller-hint`,`default`]),rT=i({port:a().int().min(1).max(65535),source:nT}),iT=i({endpoints:p(tT).readonly(),localPort:rT}),aT=i({baseUrl:g().nullable(),resolved:g().nullable()}),oT=i({baseUrls:p(g()).readonly(),resolved:p(g()).readonly()}),sT=i({addresses:p(g()).readonly()}),cT=i({mode:m([`generated`,`uploaded`,`disabled`]),leafFingerprintSha256:g().nullable(),caFingerprintSha256:g().nullable(),validTo:g().nullable(),sans:p(g()),caCertPem:g().nullable(),reissueError:g().nullable(),restartRequired:v()}),lT={name:`local-network`,scope:`system`,mode:`singleton`,methods:{list:T(h(),$w),getPreferred:T(h(),eT),getConnectionEndpoints:T(i({port:a().int().min(1).max(65535).optional(),includeLoopback:v().optional(),ipv4Only:v().optional(),scheme:m([`http`,`https`]).optional()}),iT),getNotificationEndpoint:T(h(),aT),setNotificationEndpoint:T(i({baseUrl:g().nullable()}),aT,{kind:`mutation`}),getViewerEndpoints:T(h(),oT),setViewerEndpoints:T(i({baseUrls:p(g()).readonly()}),oT,{kind:`mutation`}),getAllowedAddresses:T(h(),sT),setAllowedAddresses:T(sT,i({success:y(!0)}),{kind:`mutation`}),resetAllowlistToBestMatch:T(h(),sT,{kind:`mutation`}),getTlsStatus:T(h(),cT),regenerateCertificate:T(i({reason:g().optional()}),cT,{kind:`mutation`,auth:`admin`}),uploadCertificate:T(i({certPem:g().min(1),keyPem:g().min(1),caPem:g().optional()}),cT,{kind:`mutation`,auth:`admin`}),downloadCa:T(h(),i({pem:g()})),revertToGeneratedCertificate:T(h(),cT,{kind:`mutation`,auth:`admin`})},mount:{kind:`hub-only`}},uT=m([`locked`,`unlocked`,`locking`,`unlocking`,`jammed`]),dT=i({state:uT,lastChangedAt:a()}),fT={name:`lock-control`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[D.Lock],methods:{lock:T(i({deviceId:a().int().nonnegative(),code:g().min(1).optional()}),h(),{kind:`mutation`,auth:`admin`}),unlock:T(i({deviceId:a().int().nonnegative(),code:g().min(1).optional()}),h(),{kind:`mutation`,auth:`admin`}),open:T(i({deviceId:a().int().nonnegative()}),h(),{kind:`mutation`,auth:`admin`})},status:{schema:dT,kind:`push`},runtimeState:dT,durability:`restored`,volatileStateFields:[`lastChangedAt`]},pT=m([`off`,`on`,`idle`,`playing`,`paused`,`buffering`,`standby`]),mT=m([`off`,`all`,`one`]),hT=i({type:g(),title:g(),artist:g().optional(),album:g().optional(),imageUrl:g().optional()}),gT=i({state:pT,volumeLevel:a().min(0).max(100).nullable(),isMuted:v().nullable(),source:g(),availableSources:p(g()),currentMedia:hT.nullable(),positionMs:a().int().nonnegative().nullable(),durationMs:a().int().nonnegative().nullable(),shuffle:v().nullable(),repeat:mT.nullable(),lastChangedAt:a()}),_T={name:`media-player`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[D.MediaPlayer],methods:{play:T(i({deviceId:a().int().nonnegative()}),h(),{kind:`mutation`,auth:`admin`}),pause:T(i({deviceId:a().int().nonnegative()}),h(),{kind:`mutation`,auth:`admin`}),stop:T(i({deviceId:a().int().nonnegative()}),h(),{kind:`mutation`,auth:`admin`}),next:T(i({deviceId:a().int().nonnegative()}),h(),{kind:`mutation`,auth:`admin`}),previous:T(i({deviceId:a().int().nonnegative()}),h(),{kind:`mutation`,auth:`admin`}),seek:T(i({deviceId:a().int().nonnegative(),positionMs:a().int().nonnegative()}),h(),{kind:`mutation`,auth:`admin`}),setVolume:T(i({deviceId:a().int().nonnegative(),volumeLevel:a().min(0).max(100)}),h(),{kind:`mutation`,auth:`admin`}),setMute:T(i({deviceId:a().int().nonnegative(),muted:v()}),h(),{kind:`mutation`,auth:`admin`}),setShuffle:T(i({deviceId:a().int().nonnegative(),shuffle:v()}),h(),{kind:`mutation`,auth:`admin`}),setRepeat:T(i({deviceId:a().int().nonnegative(),repeat:mT}),h(),{kind:`mutation`,auth:`admin`}),selectSource:T(i({deviceId:a().int().nonnegative(),source:g().min(1)}),h(),{kind:`mutation`,auth:`admin`}),playMedia:T(i({deviceId:a().int().nonnegative(),mediaId:g().min(1),mediaType:g().min(1)}),h(),{kind:`mutation`,auth:`admin`})},status:{schema:gT,kind:`push`},runtimeState:gT,durability:`session`},vT=i({id:g(),label:g(),scope:m([`mesh`,`public`]),url:g(),hostname:g(),port:a(),protocol:m([`http`,`https`])}),yT=i({id:g(),hostname:g(),magicDns:g(),addresses:p(g()).readonly(),os:g().optional(),online:v(),lastSeenMs:a(),isSelf:v(),connection:m([`direct`,`relay`,`idle`]),relay:g().nullable(),lastHandshakeMs:a(),rxBytes:a(),txBytes:a(),tags:p(g()).readonly(),exitNodeOption:v(),advertisedRoutes:p(g()).readonly(),userLogin:g().nullable(),keyExpiry:a().nullable()}),bT=i({joined:v(),meshIp:g(),magicDnsHostname:g(),peerCount:a(),endpoints:p(vT).readonly(),error:g().optional(),tenantName:g(),magicDnsSuffix:g(),userLogin:g().nullable(),controlPlaneUrl:g(),keyExpiry:a().nullable(),daemonSocket:g().optional(),daemonCliPath:g().optional()}),xT={name:`mesh-network`,scope:`system`,mode:`collection`,providerKind:`mesh`,methods:{getStatus:T(h(),bT),join:T(i({authKey:g().min(8),hostname:g().optional()}),i({joined:y(!0)}),{kind:`mutation`}),startLogin:T(i({hostname:g().optional()}),i({loginUrl:g()}),{kind:`mutation`}),leave:T(h(),i({left:y(!0)}),{kind:`mutation`}),logout:T(h(),i({loggedOut:y(!0)}),{kind:`mutation`}),listPeers:T(h(),i({peers:p(yT).readonly()})),testConnection:T(i({authKey:g().optional()}),i({ok:v(),tenant:g().optional(),daemonVersion:g().optional(),error:g().optional()}),{kind:`mutation`})}},ST=i({detected:v(),lastDetectedAt:a().nullable(),autoClearAfterMs:a().nullable()}),CT=i({deviceId:a(),detected:v(),timestamp:a(),source:ky,regions:p(sm).readonly().optional()}),wT={name:`motion`,scope:`device`,mode:`singleton`,deviceNative:!0,deviceTypes:[D.Camera,D.Sensor],methods:{isDetected:T(i({deviceId:a()}),v())},events:{onMotionChanged:{data:CT}},status:{schema:ST,kind:`push`},runtimeState:ST,durability:`session`},TT=i({enabled:v(),lastChangedAt:a()}),ET=TT.extend({lastFetchedAt:a()}),DT={name:`motion-trigger`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[D.Light,D.Siren,D.Switch],methods:{setMotionTrigger:T(i({deviceId:a().int().nonnegative(),enabled:v()}),h(),{kind:`mutation`,auth:`admin`})},events:{onMotionTriggerChanged:{data:i({deviceId:a(),enabled:v(),lastChangedAt:a()})}},status:{schema:TT,kind:`command-driven`},runtimeState:ET,durability:`session`},OT=i({id:a(),enabled:v(),shape:yh}),kT=i({enabled:v(),sensitivity:a(),regions:p(OT),lastFetchedAt:a()}),AT=i({maxRegions:a(),supportedShapes:p(Sh),grid:wh,sensitivity:i({min:a(),max:a(),step:a()})}),jT=i({enabled:v().optional(),sensitivity:a().optional(),regions:p(OT).optional()}),MT={name:`motion-zones`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[D.Camera],deviceConfig:{ui:{kind:`widget`,widgetId:`host/motion-zones-grid`,tab:`motion`,label:`Motion Zones`}},methods:{getOptions:T(i({deviceId:a()}),AT),setZone:T(i({deviceId:a(),patch:jT}),h(),{kind:`mutation`,auth:`admin`})},status:{schema:kT,kind:`poll`},runtimeState:kT,durability:`restored`,volatileStateFields:[`lastFetchedAt`]},NT=m([`person`,`vehicle`,`animal`,`face`,`package`,`other`]),PT=i({class:NT,timestamp:a(),confidence:a().min(0).max(1).optional()}),FT=i({lastByClass:l(NT,PT.nullable()),supportedClasses:p(NT).readonly(),enabled:v()}),IT=FT.extend({lastFetchedAt:a()}),LT={name:`native-object-detection`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[D.Camera],methods:{setEnabled:T(i({deviceId:a(),enabled:v()}),h(),{kind:`mutation`,auth:`admin`})},events:{onDetected:{data:i({deviceId:a(),detection:PT})}},status:{schema:FT,kind:`push`},runtimeState:IT,durability:`restored`,volatileStateFields:[`lastFetchedAt`]},RT=i({pan:a().min(-1).max(1).optional(),tilt:a().min(-1).max(1).optional(),speed:a().min(0).max(1).optional()}),zT=m([`goHome`,`locate`,`spotClean`,`findPet`,`personFollow`,`stop`,`startClean`,`pauseClean`,`dockWash`,`autoEmpty`,`flashOn`,`flashOff`]),BT=m([`action`,`sound`]),VT=i({id:g(),kind:BT,label:g(),icon:g(),soundId:a().int().optional(),enabled:v()}),HT=[{id:`startClean`,kind:`action`,label:`Start cleaning`,icon:`play`,enabled:!0},{id:`pauseClean`,kind:`action`,label:`Pause cleaning`,icon:`pause`,enabled:!0},{id:`stop`,kind:`action`,label:`Stop`,icon:`hand`,enabled:!0},{id:`goHome`,kind:`action`,label:`Return to dock`,icon:`home`,enabled:!0},{id:`locate`,kind:`action`,label:`Locate`,icon:`bell`,enabled:!0},{id:`spotClean`,kind:`action`,label:`Spot clean here`,icon:`crosshair`,enabled:!0},{id:`findPet`,kind:`action`,label:`Find pet`,icon:`paw-print`,enabled:!0},{id:`personFollow`,kind:`action`,label:`Follow me`,icon:`footprints`,enabled:!0},{id:`dockWash`,kind:`action`,label:`Wash mop`,icon:`droplets`,enabled:!0},{id:`autoEmpty`,kind:`action`,label:`Empty dustbin`,icon:`trash-2`,enabled:!0},{id:`flashOn`,kind:`action`,label:`Flash on`,icon:`flashlight`,enabled:!0},{id:`flashOff`,kind:`action`,label:`Flash off`,icon:`flashlight-off`,enabled:!0},{id:`sound:meow`,kind:`sound`,label:`Meow`,icon:`cat`,soundId:684,enabled:!0},{id:`sound:bark`,kind:`sound`,label:`Woof`,icon:`dog`,soundId:685,enabled:!0},{id:`sound:footsteps`,kind:`sound`,label:`Footsteps`,icon:`footprints`,soundId:686,enabled:!0},{id:`sound:purring`,kind:`sound`,label:`Purring`,icon:`cat`,soundId:687,enabled:!0},{id:`sound:tickTock`,kind:`sound`,label:`Tick-tock`,icon:`clock`,soundId:688,enabled:!0}],UT=i({x:a(),y:a()}),WT=i({move:v(),stop:v(),goToPoint:v(),runAction:v(),playSound:v(),light:v(),lightMode:v()}),GT=m([`auto`,`manual`]),KT=40,qT=100,JT=m([`idle`,`cleaning`,`spot`,`following`,`goto`,`returning`,`paused`,`unknown`]),YT=i({mode:JT,following:v(),flash:v(),lightMode:GT,lightLevel:a().min(40).max(100),lastChangedAt:a()}),XT=YT.extend({lastFetchedAt:a()}),ZT={name:`navigation`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[D.Camera],deviceConfig:{ui:{kind:`widget`,widgetId:`host/navigation-panel`,tab:`navigation`,topTab:!0,label:`Navigation`,order:0}},methods:{move:T(RT.extend({deviceId:a()}),h(),{kind:`mutation`}),stop:T(i({deviceId:a()}),h(),{kind:`mutation`}),goToPoint:T(UT.extend({deviceId:a()}),h(),{kind:`mutation`}),listActions:T(i({deviceId:a()}),p(VT)),runAction:T(i({deviceId:a(),actionId:zT}),h(),{kind:`mutation`}),playSound:T(i({deviceId:a(),soundId:a().int()}),h(),{kind:`mutation`}),setLightOn:T(i({deviceId:a(),on:v()}),h(),{kind:`mutation`}),setLightMode:T(i({deviceId:a(),mode:GT,level:a().min(40).max(100).optional()}),h(),{kind:`mutation`}),setLightLevel:T(i({deviceId:a(),level:a().min(40).max(100)}),h(),{kind:`mutation`}),getFeatures:T(i({deviceId:a()}),WT)},events:{onStatusChanged:{data:i({deviceId:a(),status:YT})}},status:{schema:YT,kind:`push`},runtimeState:XT,durability:`session`},QT=[`wifi`,`ethernet`,`cellular`,`unknown`],$T=i({type:m(QT),signalPercent:a().min(0).max(100).nullable(),rssiDbm:a().optional(),ssid:g().optional(),lastUpdated:a()}),eE={type:`unknown`,signalPercent:null,lastUpdated:0};function tE(e,t){return e===void 0||!Number.isFinite(e)||t<=0||e<0||e>t?null:Math.round(e/t*100)}function nE(e){return e===void 0||!Number.isFinite(e)||e>0?null:Math.round((Math.min(-50,Math.max(-100,e))+100)*2)}var rE={name:`network-link`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[D.Camera,D.Sensor,D.Button,D.Switch,D.Light,D.Lock,D.Siren],methods:{},events:{onStatusChanged:{data:i({deviceId:a(),status:$T})}},status:{schema:$T,kind:`push`,empty:eE},runtimeState:$T,durability:`restored`,volatileStateFields:[`lastUpdated`]},iE=i({nominalBitrateKbps:a(),observedBitrateKbps:a(),peakBitrateKbps:a(),packetLossPercent:a(),lastUpdated:a()}),aE=i({rttMs:a(),jitterMs:a(),estimatedBandwidthKbps:a(),packetLossPercent:a().min(0).max(100),lastUpdated:a()}),oE=i({deviceId:a(),streams:n(g(),iE),client:aE.optional()}),sE={name:`network-quality`,scope:`system`,mode:`singleton`,methods:{getDeviceStats:T(i({deviceId:a()}),oE.nullable()),getAllStats:T(h(),p(oE).readonly()),reportClientStats:T(i({deviceId:a(),rttMs:a().min(0).max(6e4),jitterMs:a().min(0).max(1e4),estimatedBandwidthKbps:a().min(0).max(1e6),packetLossPercent:a().min(0).max(100)}),h(),{kind:`mutation`})},mount:{kind:`server-provided`}},cE=i({addonId:g(),capabilities:p(g()).readonly(),status:g()}),lE=i({pid:a(),name:g(),state:g(),cpuPercent:a(),memoryRss:a(),uptimeSeconds:a(),services:p(cE).readonly(),groupId:g().optional()}),uE=i({id:g(),status:g(),cpuPercent:a(),memoryRss:a()}),dE=i({category:g(),total:a(),healthy:a(),addons:p(uE).readonly()}),fE=i({name:g(),version:g()}),pE=i({id:g(),name:g(),hostname:g(),platform:g(),arch:g(),cpuModel:g().nullable(),cpuCores:a(),memoryMB:a(),engines:p(g()).readonly(),isHub:v(),isOnline:v(),cpuPercent:a(),memoryPercent:a(),uptime:a(),lastSeen:g(),localIps:p(g()).readonly(),addons:p(i({id:g(),capabilities:p(g()).readonly(),status:g()})).readonly(),processes:p(lE).readonly(),categories:p(dE).readonly(),rootPackage:fE.nullable()}),mE=i({callerAddonId:g(),providerAddonId:g(),capName:g(),callsPerMin:a(),lastCallAtMs:a()}),hE=i({nodeId:g(),name:g(),version:g(),status:g(),synced:v()}),gE=i({hubVersion:g(),nodes:p(hE)}),_E=i({nodeId:g(),addonId:g()}),vE=i({id:g(),status:g(),version:g().optional(),packageName:g().optional()}),yE=i({success:v()}),bE=i({success:v(),reason:g().optional()}),xE=i({restarted:p(g()).readonly(),failed:p(g()).readonly()}),SE=i({nodeId:g(),name:g()}),CE={name:`nodes`,scope:`system`,mode:`singleton`,nodeIdMode:`data`,methods:{topology:T(h(),p(pE).readonly(),{auth:`admin`}),deployAddon:T(_E,yE,{kind:`mutation`,auth:`admin`}),undeployAddon:T(_E,yE,{kind:`mutation`,auth:`admin`}),restartAddon:T(_E,yE,{kind:`mutation`,auth:`admin`}),restartProcess:T(i({nodeId:g(),processName:g()}),bE,{kind:`mutation`,auth:`admin`}),restartNode:T(i({nodeId:g()}),xE,{kind:`mutation`,auth:`admin`}),shutdownNode:T(i({nodeId:g()}),yE,{kind:`mutation`,auth:`admin`}),renameNode:T(i({nodeId:g(),name:g().min(1).max(64)}),SE,{kind:`mutation`,auth:`admin`}),clusterAddonStatus:T(h(),n(g(),gE),{auth:`admin`}),getCapUsageGraph:T(i({windowSeconds:a().int().positive().max(300).default(60)}),p(mE).readonly(),{auth:`admin`}),getNodeAddons:T(i({nodeId:g()}),p(vE).readonly(),{auth:`admin`}),setProcessLogLevel:T(i({nodeId:g(),level:g()}),yE,{kind:`mutation`,auth:`admin`}),executeQuery:T(i({nodeId:g(),addonId:g(),queryName:g(),params:n(g(),u()).optional()}),u(),{kind:`mutation`,auth:`admin`})},mount:{kind:`server-provided`}},wE=m([`min`,`low`,`normal`,`high`]),TE=i({id:g().min(1),title:g().min(1),uri:o().optional(),destructive:v().optional()}),EE=i({image:v(),priority:v(),data:v(),actions:v(),recipients:v()}),DE=i({lastSentAt:a(),lastError:g().nullable(),queueDepth:a().int().nonnegative(),supports:EE}),OE=i({deviceId:a().int().nonnegative(),title:g().optional(),body:g().min(1),image:g().optional(),priority:wE.optional(),channel:g().optional(),recipients:p(g()).optional(),actions:p(TE).optional(),data:n(g(),u()).optional()}),kE=i({notificationId:g(),acceptedAt:a()}),AE={name:`notifier`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[D.Notifier],methods:{send:T(OE,kE,{kind:`mutation`,auth:`admin`}),cancel:T(i({deviceId:a().int().nonnegative(),notificationId:g().min(1)}),h(),{kind:`mutation`,auth:`admin`})},events:{onSent:{data:i({deviceId:a(),notificationId:g(),success:v(),error:g().nullable(),acceptedAt:a()})}},status:{schema:DE,kind:`command-driven`},runtimeState:DE,durability:`session`},jE=i({value:a(),unit:g().optional(),precision:a().int().min(0).max(10).optional(),lastFetchedAt:a()}),ME={name:`numeric-sensor`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[D.Sensor],methods:{},status:{schema:jE,kind:`push`},runtimeState:jE,durability:`restored`,volatileStateFields:[`lastFetchedAt`]},NE=m([`text`,`timestamp`,`watermark`]),PE=m([`top-left`,`top-center`,`top-right`,`bottom-left`,`bottom-center`,`bottom-right`,`custom`]),FE=i({id:g(),kind:NE,enabled:v(),text:g().optional(),position:PE.optional(),availablePositions:p(PE).readonly(),readOnly:v().optional()}),IE=i({overlays:p(FE).readonly()}),LE=i({enabled:v().optional(),text:g().optional(),position:PE.optional()}).partial(),RE={name:`osd`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[D.Camera],methods:{setOverlay:T(i({deviceId:a(),overlayId:g(),patch:LE}),h(),{kind:`mutation`,auth:`admin`})},events:{onStatusChanged:{data:i({deviceId:a(),status:IE})}},status:{schema:IE,kind:`command-driven`},settings:{bindings:[{kind:`array`,statusPath:`overlays`,idField:`id`,method:`setOverlay`,idArg:`overlayId`,patchArg:`patch`,sectionId:`osd`,sectionTitle:`Video overlays`,itemFields:{enabled:{label:e=>`${String(e.id)} enabled`,kind:`boolean`},text:{label:e=>`${String(e.id)} text`,kind:`text`,when:e=>e.kind!==`timestamp`&&!e.readOnly},position:{label:e=>`${String(e.id)} position`,kind:`select`,options:e=>e.availablePositions??[],when:e=>Array.isArray(e.availablePositions)&&e.availablePositions.length>0}}}]}},zE=b(`kind`,[i({kind:y(`static`),text:g().max(64)}),i({kind:y(`clock`),pattern:g().min(1).max(32).default(`HH:mm`),timezone:g().min(1).max(64).optional()}),i({kind:y(`device-state`),deviceId:a().int().optional(),capName:g().min(1).max(64),valuePath:g().min(1).max(64)}),i({kind:y(`latest-recognition`),recognition:m([`person`,`plate`])})]),BE=i({enabled:v().default(!0),source:zE,template:g().max(96).default("${value}"),maxCharacters:a().int().min(4).max(64).optional(),maxDecimals:a().int().min(0).max(4).default(1),unitLabel:g().max(8).optional(),valueMap:n(g(),g()).optional(),schedule:Fh.optional(),conditions:Jh.optional(),fallbackText:g().max(64).default(``)}),VE=i({slotId:g(),kind:NE,readOnly:v(),cameraEnabled:v(),cameraText:g().optional(),binding:BE.nullable()}),HE=m([`written`,`unchanged`,`gated`,`unreadable`,`disabled`,`unbound`,`failed`]),UE=i({slotId:g(),outcome:HE,text:g(),reason:g().optional()}),WE=m([`number`,`boolean`,`string`,`enum`]),GE=i({deviceId:a().int(),deviceName:g(),capName:g(),valuePath:g(),label:g(),valueType:WE,enumValues:p(g()).readonly().optional()}),KE={name:`osd-manager`,scope:`system`,mode:`singleton`,methods:{getDeviceOsd:T(i({deviceId:a().int()}),i({supported:v(),slots:p(VE)}),{auth:`admin`}),getSourceCatalog:T(i({deviceId:a().int()}),i({sources:p(GE)}),{auth:`admin`}),getConditionSupport:T(i({}),i({supported:p(g()),catalog:p(ug)}),{auth:`admin`}),setSlotBinding:T(i({deviceId:a().int(),slotId:g().min(1),binding:BE}),i({slot:VE,render:UE}),{kind:`mutation`,auth:`admin`}),clearSlotBinding:T(i({deviceId:a().int(),slotId:g().min(1)}),i({success:y(!0)}),{kind:`mutation`,auth:`admin`}),copyDeviceConfiguration:T(i({sourceDeviceId:a().int(),targetDeviceId:a().int()}),i({copied:a().int().nonnegative(),skipped:a().int().nonnegative()}),{kind:`mutation`,auth:`admin`}),previewSlot:T(i({deviceId:a().int(),slotId:g().min(1),binding:BE.optional()}),UE,{kind:`mutation`,auth:`admin`}),renderDevice:T(i({deviceId:a().int()}),i({results:p(UE)}),{kind:`mutation`,auth:`admin`})}},qE=4,JE=200,YE=m([`normal`,`offline`,`on_batteries`]),XE=a().int().min(4).max(200),ZE=i({foodLevel:a().nullable(),food1:a().nullable(),food2:a().nullable(),lowFood:v(),batteryPower:a().min(0).max(100).nullable(),desiccantLeftDays:a().nullable(),feeding:v(),status:YE.nullable(),error:g().nullable(),errorCode:a().nullable(),isDualHopper:v(),childLock:v(),indicatorLight:v(),feedSound:v(),volume:a(),lastFetchedAt:a()}),QE={name:`pet-feeder`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[D.PetFeeder],methods:{feed:T(i({deviceId:a().int().nonnegative(),grams:XE.optional(),hopper1:XE.optional(),hopper2:XE.optional()}),h(),{kind:`mutation`,auth:`admin`}),cancelFeed:T(i({deviceId:a().int().nonnegative()}),h(),{kind:`mutation`,auth:`admin`}),resetDesiccant:T(i({deviceId:a().int().nonnegative()}),h(),{kind:`mutation`,auth:`admin`}),markFoodReplenished:T(i({deviceId:a().int().nonnegative()}),h(),{kind:`mutation`,auth:`admin`}),callPet:T(i({deviceId:a().int().nonnegative()}),h(),{kind:`mutation`,auth:`admin`}),playSound:T(i({deviceId:a().int().nonnegative(),soundId:a().int().nonnegative()}),h(),{kind:`mutation`,auth:`admin`}),setChildLock:T(i({deviceId:a().int().nonnegative(),on:v()}),h(),{kind:`mutation`,auth:`admin`}),setIndicatorLight:T(i({deviceId:a().int().nonnegative(),on:v()}),h(),{kind:`mutation`,auth:`admin`}),setFeedSound:T(i({deviceId:a().int().nonnegative(),on:v()}),h(),{kind:`mutation`,auth:`admin`}),setVolume:T(i({deviceId:a().int().nonnegative(),level:a().int().nonnegative()}),h(),{kind:`mutation`,auth:`admin`})},status:{schema:ZE,kind:`poll`},runtimeState:ZE,durability:`session`},$E=i({id:g(),name:g(),sampleCount:a().int().nonnegative(),coverMediaKey:g().optional(),coverBase64:g().optional()}),eD=i({id:g(),text:g(),score:a(),addedAt:a().int(),deviceId:a().int().optional(),base64:g().optional()}),tD=i({plateId:g(),deviceId:a().int(),trackId:g(),timestamp:a().int(),text:g(),score:a(),corrected:v(),recognizedVehicleId:g().optional(),vehicleName:g().optional(),assigned:v(),plateBbox:V.optional(),keyFrameMediaKey:g().optional(),base64:g().optional(),cropUrl:g().optional()}),nD=i({key:g(),kind:g(),url:g(),sizeBytes:a(),timestamp:a()}),rD=i({plateIds:p(g()).readonly(),representativePlateId:g(),representativeText:g(),size:a().int(),cohesion:a()}),iD={name:`plate-gallery`,scope:`system`,mode:`singleton`,methods:{listPlates:T(i({deviceId:a().int().optional(),limit:a().int().positive().optional(),includeCrops:v().optional()}).optional(),p(tD).readonly()),getPlateByTrack:T(i({deviceId:a().int(),trackId:g()}),tD.nullable()),getPlateMedia:T(i({plateId:g()}),p(nD).readonly()),searchPlates:T(i({text:g().min(1),maxDistance:a().int().min(0).optional(),limit:a().int().positive().optional(),includeCrops:v().optional()}),p(tD).readonly()),suggestPlateClusters:T(i({maxDistance:a().int().min(0).optional(),minClusterSize:a().int().min(2).optional(),limit:a().int().positive().optional()}).optional(),p(rD).readonly()),correctPlateText:T(i({plateId:g(),text:g().min(1)}),h(),{kind:`mutation`,auth:`admin`}),deletePlate:T(i({plateId:g()}),h(),{kind:`mutation`,auth:`admin`}),listVehicles:T(i({includeCrops:v().optional()}).optional(),p($E).readonly()),createVehicle:T(i({name:g().min(1)}),$E,{kind:`mutation`,auth:`admin`}),renameVehicle:T(i({id:g(),name:g().min(1)}),h(),{kind:`mutation`,auth:`admin`}),deleteVehicle:T(i({id:g()}),h(),{kind:`mutation`,auth:`admin`}),listVehicleSamples:T(i({vehicleId:g()}),p(eD).readonly()),removeVehicleSample:T(i({vehicleId:g(),sampleId:g()}),h(),{kind:`mutation`,auth:`admin`}),assignPlate:T(i({plateId:g(),vehicleId:g()}),h(),{kind:`mutation`,auth:`admin`}),unassignPlate:T(i({plateId:g()}),h(),{kind:`mutation`,auth:`admin`}),assignPlates:T(i({plateIds:p(g()).min(1),vehicleId:g()}),i({assigned:a().int(),failed:p(g()).readonly()}),{kind:`mutation`,auth:`admin`}),unassignPlates:T(i({plateIds:p(g()).min(1)}),i({unassigned:a().int(),failed:p(g()).readonly()}),{kind:`mutation`,auth:`admin`})}},aD=m(is),oD=m([`videotoolbox`,`cuda`,`nvdec`,`vaapi`,`qsv`,`d3d11va`,`dxva2`,`amf`,`vdpau`,`drm`,`coreml`,`tensorrt`,`openvino`,`directml`,`webgpu`,`none`]).nullable().optional(),sD=i({preferred:p(g()).readonly(),rationale:g()}),cD=m([`h264_videotoolbox`,`hevc_videotoolbox`,`h264_vaapi`,`hevc_vaapi`,`h264_nvenc`,`hevc_nvenc`,`h264_qsv`,`hevc_qsv`,`h264_amf`,`hevc_amf`,`libx264`,`libx265`]);i({encoders:p(i({encoder:cD,codec:m([`H264`,`H265`]),family:m([`videotoolbox`,`vaapi`,`nvenc`,`qsv`,`amf`,`software`]),available:v(),reason:g().optional()})).readonly(),defaultH264:cD,defaultH265:cD,probedAt:a()}),i({methods:p(g()).readonly(),probedAt:a()});var lD=m([`darwin`,`linux`,`win32`]),uD=m([`arm64`,`x64`]),dD=i({type:m([`nvidia`,`amd`,`intel`,`apple`]),name:g(),memoryMB:a().optional()}),fD=i({type:m([`apple-ane`,`intel-npu`])}),pD=i({type:y(`coral-edgetpu`),bus:g().optional()}),mD=i({platform:lD,arch:uD,cpuModel:g(),cpuCores:a(),totalRAM_MB:a(),availableRAM_MB:a(),gpu:dD.nullable(),npu:fD.nullable(),coral:pD.nullable().optional()}),hD=i({runtime:m([`node`,`python`]),backend:g(),format:m([`onnx`,`coreml`,`openvino`,`tflite`]),score:a(),reason:g(),available:v()}),gD=i({key:g(),backend:g(),device:g(),format:aD,runtime:y(`python`),score:a(),available:v()}),_D=i({hardware:mD,scores:p(hD).readonly(),bestScore:hD,pythonPath:g().nullable(),devices:p(gD).readonly()}),vD=i({modelId:g(),name:g(),minRAM_MB:a(),accuracyScore:a(),formats:p(g()).readonly()}),yD=i({modelId:g(),runtime:m([`node`,`python`]),backend:g(),format:aD,reason:g()}),bD={name:`platform-probe`,scope:`system`,mode:`singleton`,methods:{getCapabilities:T(h(),_D),getHardware:T(h(),mD),resolveInferenceConfig:T(i({requirements:p(vD).readonly()}),yD),resolveHwAccel:T(i({prefer:oD}),sD)}},xD=i({watts:a().optional(),kwhTotal:a().optional(),volts:a().optional(),amps:a().optional(),va:a().optional(),powerFactor:a().min(0).max(1).optional(),lastFetchedAt:a(),unit:g().optional(),precision:a().int().min(0).max(10).optional()}),SD={name:`power-meter`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[D.Sensor],methods:{},status:{schema:xD,kind:`push`},runtimeState:xD,durability:`restored`,volatileStateFields:[`lastFetchedAt`]},CD=i({latitude:a().min(-90).max(90),longitude:a().min(-180).max(180),accuracyMeters:a().nonnegative()}),wD=i({state:g(),location:g().nullable(),gps:CD.nullable(),batteryPercent:a().min(0).max(100).nullable(),lastChangedAt:a()}),TD={name:`presence`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[D.Presence],methods:{},status:{schema:wD,kind:`push`},runtimeState:wD,durability:`restored`,volatileStateFields:[`lastChangedAt`]},ED=i({hpa:a(),lastFetchedAt:a(),unit:g().optional(),precision:a().int().min(0).max(10).optional()}),DD={name:`pressure-sensor`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[D.Sensor],methods:{},status:{schema:ED,kind:`push`},runtimeState:ED,durability:`restored`,volatileStateFields:[`lastFetchedAt`]},OD=b(`kind`,[_h,vh]),kD=i({id:a(),enabled:v(),shape:OD}),AD=i({enabled:v(),regions:p(kD),audioEnabled:v().nullable(),lastFetchedAt:a()}),jD=i({maxRegions:a(),supportedShapes:p(Sh),polygonVertices:Ch.optional(),supportsAudioMute:v()}),MD=i({enabled:v().optional(),regions:p(kD).optional()}),ND={name:`privacy-mask`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[D.Camera],deviceConfig:{ui:{kind:`widget`,widgetId:`host/privacy-mask-grid`,tab:`image`,label:`Privacy Mask`}},methods:{getOptions:T(i({deviceId:a()}),jD),setMask:T(i({deviceId:a(),patch:MD}),h(),{kind:`mutation`,auth:`admin`}),setAudioEnabled:T(i({deviceId:a(),enabled:v()}),h(),{kind:`mutation`,auth:`admin`})},status:{schema:AD,kind:`poll`},runtimeState:AD,durability:`restored`,volatileStateFields:[`lastFetchedAt`]};function PD(e){return e.length===0?null:e.some(e=>e.audioEnabled)}var FD=i({id:g(),name:g()}),ID=i({pan:a(),tilt:a(),zoom:a()}),LD=i({pan:a().optional(),tilt:a().optional(),zoom:a().optional(),speed:a().optional()}),RD=ID.extend({autofocus:v()}),zD=i({hasPan:v(),hasTilt:v(),hasZoom:v(),supportsPresets:v(),maxPresets:a().optional(),hasAutofocus:v()}),BD={name:`ptz`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[D.Camera],deviceConfig:{ui:{kind:`widget`,widgetId:`host/ptz-panel`,tab:`ptz`,topTab:!0,label:`PTZ`,order:0}},methods:{move:T(LD.extend({deviceId:a()}),h(),{kind:`mutation`}),continuousMove:T(LD.extend({deviceId:a()}),h(),{kind:`mutation`}),stop:T(i({deviceId:a()}),h(),{kind:`mutation`}),getPresets:T(i({deviceId:a()}),p(FD)),goToPreset:T(i({deviceId:a(),presetId:g()}),h(),{kind:`mutation`}),savePreset:T(i({deviceId:a(),presetId:g(),name:g()}),h(),{kind:`mutation`,auth:`admin`}),deletePreset:T(i({deviceId:a(),presetId:g()}),h(),{kind:`mutation`,auth:`admin`}),getOptions:T(i({deviceId:a()}),zD),goHome:T(i({deviceId:a()}),h(),{kind:`mutation`}),getPosition:T(i({deviceId:a()}),ID),setAutofocus:T(i({deviceId:a(),enabled:v()}),h(),{kind:`mutation`})},status:{schema:RD,kind:`command-driven`}},VD=i({targetType:g().describe(`Vendor target string (people/vehicle/pet); empty = camera default`),stopDelaySeconds:a().int().min(0).max(300),disappearDelaySeconds:a().int().min(0).max(300)}),HD=i({value:g(),label:g()}),UD=i({enabled:v(),lastChangedAt:a(),currentSettings:VD.nullable(),supportedTargetTypes:p(HD)}),WD=UD.extend({lastFetchedAt:a()}),GD={name:`ptz-autotrack`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[D.Camera],deviceConfig:{ui:{kind:`widget`,widgetId:`host/ptz-autotrack`,tab:`ptz`,topTab:!0,label:`Auto-Tracking`,order:5}},methods:{getStatus:T(i({deviceId:a()}),UD),setEnabled:T(i({deviceId:a(),enabled:v()}),h(),{kind:`mutation`}),getSettings:T(i({deviceId:a()}),VD.nullable()),setSettings:T(i({deviceId:a(),settings:VD.partial()}),h(),{kind:`mutation`})},events:{onStatusChanged:{data:i({deviceId:a(),status:UD})}},status:{schema:UD,kind:`command-driven`},runtimeState:WD,durability:`session`},KD={name:`reboot`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[D.Camera,D.Sensor,D.Switch],methods:{reboot:T(i({deviceId:a().int().nonnegative()}),i({success:y(!0)}),{kind:`mutation`,auth:`admin`})}},qD=i({deviceId:a(),enabled:v(),activeMode:Oi,nodeId:g(),storageBytes:a()}),JD=i({profile:g(),startMs:a(),endMs:a()}),YD=i({deviceId:a(),ranges:p(JD)}),XD=i({deviceId:a(),days:p(a())}),ZD=200,QD=i({deviceId:a(),read:m([`read`,`unreadable`]),ranges:p(JD).readonly()}),$D=i({deviceId:a(),read:m([`read`,`unreadable`]),days:p(a()).readonly()}),eO=i({deviceId:a(),localMasterPath:g().nullable(),playbackUrl:g().nullable(),playbackEndpoints:p(g())}),tO=i({deviceId:a(),usedBytes:a(),oldestMs:a().nullable().optional()}),nO=i({locationId:g().nullable(),locationIds:p(g()).optional(),root:g().optional(),usedBytes:a(),availableBytes:a().nullable(),totalBytes:a().nullable()}),rO=i({nodeId:g(),totalUsedBytes:a(),devices:p(tO),locations:p(nO).optional()}),iO=i({deviceId:a(),profile:g(),fromLocationId:g(),toLocationId:g(),bytes:a(),files:a().int()}),aO=m([`unassigned`,`target-not-writable`,`below-threshold`,`no-headroom`]),oO=i({deviceId:a(),profile:g(),fromLocationId:g(),toLocationId:g().nullable(),bytes:a(),reason:aO}),sO=i({moves:p(iO),skipped:p(oO),bytesToMove:a(),jobIds:p(g())}),cO=i({throttleMbps:a().min(1).max(1e3).optional(),minMoveGb:a().min(0).optional()}),lO=i({deviceId:a().int(),profile:g(),locationId:g()}),uO=i({deviceId:a().int(),locationId:g()}),dO=i({assignments:p(lO),pins:p(uO),defaultLocations:n(g(),g())}),fO=i({deviceId:a().int(),locationId:g().nullable()}),pO=b(`kind`,[i({kind:y(`segment`),startMs:a(),durMs:a(),bytes:a()}),i({kind:y(`gap`),nearestEdgeMs:a().nullable(),prevEndMs:a().nullable().optional()})]),mO=i({data:_(Uint8Array)}),hO=i({data:_(Uint8Array),gopStartMs:a(),gopDurMs:a()}),gO=b(`kind`,[i({kind:y(`ok`),data:_(Uint8Array),gopStartMs:a(),gopDurMs:a(),reachesRequestedEnd:v()}),i({kind:y(`spans-multiple-segments`),segmentEndMs:a()})]),_O={name:`recording`,scope:`system`,mode:`singleton`,exposesDeviceSettings:!0,status:{schema:qD,kind:`command-driven`},methods:{getAvailability:T(i({deviceId:a(),fromMs:a(),toMs:a()}),YD,{kind:`query`,auth:`protected`}),getAvailabilityBatch:T(i({deviceIds:p(a()).min(1).max(200),fromMs:a(),toMs:a()}),p(QD).readonly(),{kind:`query`,auth:`protected`}),getDaysWithRecordings:T(i({deviceId:a(),fromMs:a(),toMs:a(),tzOffsetMinutes:a()}),XD,{kind:`query`,auth:`protected`}),getDaysWithRecordingsBatch:T(i({deviceIds:p(a()).min(1).max(200),fromMs:a(),toMs:a(),tzOffsetMinutes:a()}),p($D).readonly(),{kind:`query`,auth:`protected`}),getPlaybackManifest:T(i({deviceId:a(),fromMs:a(),toMs:a()}),eO,{kind:`query`,auth:`protected`}),getStorageUsage:T(i({}),rO,{kind:`query`,auth:`admin`}),getDeviceConfig:T(i({deviceId:a()}),Bi,{kind:`query`,auth:`admin`}),locateSegment:T(i({deviceId:a(),profile:g(),epochMs:a()}),pO,{kind:`query`,auth:`admin`}),readSegmentBytes:T(i({deviceId:a(),profile:g(),startMs:a()}),mO,{kind:`query`,auth:`admin`}),readGopBytes:T(i({deviceId:a(),profile:g(),startMs:a(),epochMs:a()}),hO,{kind:`query`,auth:`admin`}),readWindowBytes:T(i({deviceId:a(),profile:g(),startMs:a(),fromMs:a(),toMs:a()}),gO,{kind:`query`,auth:`admin`}),setDeviceConfig:T(i({deviceId:a(),config:Bi}),Bi,{kind:`mutation`,auth:`admin`}),rescanStorage:T(i({deviceId:a()}),qD,{kind:`mutation`,auth:`admin`}),pruneFootage:T(i({deviceId:a(),reason:hi.optional()}),i({floorMs:a().nullable(),deletedBuckets:a().int(),reclaimedBytes:a().int()}),{kind:`mutation`,auth:`admin`}),deleteFootprint:T(i({deviceId:a(),fromMs:a().optional(),toMs:a().optional()}),i({deletedBuckets:a().int(),reclaimedBytes:a().int()}),{kind:`mutation`,auth:`admin`}),listOpsLog:T(_i,p(gi).readonly(),{kind:`query`,auth:`admin`}),renderGif:T(i({deviceId:a(),aroundMs:a(),preRollSec:a().min(0).max(30).default(2),postRollSec:a().min(0).max(30).default(5),maxWidth:a().int().min(120).max(1280).default(480),fps:a().int().min(1).max(15).default(5)}),i({gifBase64:g(),fromMs:a(),toMs:a()}),{kind:`mutation`,auth:`admin`}),renderClip:T(i({deviceId:a(),aroundMs:a(),preRollSec:a().min(0).max(30).default(3),postRollSec:a().min(0).max(30).default(7),maxWidth:a().int().min(160).max(1920).default(640)}),i({clipBase64:g(),mime:g(),fromMs:a(),toMs:a(),bytes:a().int()}),{kind:`mutation`,auth:`admin`}),pauseForStorageMigration:T(j,i({paused:y(!0)}),{kind:`mutation`,auth:`admin`}),resumeForStorageMigration:T(j,i({resumed:y(!0)}),{kind:`mutation`,auth:`admin`}),refreshStorageLocationsForMigration:T(j,i({refreshed:y(!0)}),{kind:`mutation`,auth:`admin`}),startStorageMigrationMove:T(ea,i({jobId:g()}),{kind:`mutation`,auth:`admin`}),getStorageMigrationMoveStatus:T(i({jobId:g()}),Zi.nullable(),{auth:`admin`}),cancelStorageMigrationMove:T(i({jobId:g()}),i({cancelled:v()}),{kind:`mutation`,auth:`admin`}),relocateFootage:T($i,i({jobId:g()}),{kind:`mutation`,auth:`admin`}),listRelocateJobs:T(i({}),p(Zi).readonly(),{kind:`query`,auth:`admin`}),getRelocateResidue:T(Ca,wa,{kind:`query`,auth:`admin`}),reconcileLedgerAgainstDisk:T(Ta,Aa,{kind:`mutation`,auth:`admin`}),cancelRelocateJob:T(i({jobId:g()}),i({cancelled:v()}),{kind:`mutation`,auth:`admin`}),planStorageRebalance:T(cO,sO,{kind:`query`,auth:`admin`}),startStorageRebalance:T(cO,sO,{kind:`mutation`,auth:`admin`}),getPlacement:T(i({}),dO,{kind:`query`,auth:`admin`}),setDevicePlacement:T(fO,i({ok:y(!0)}),{kind:`mutation`,auth:`admin`})}},vO=a().min(.25).max(32),yO=i({fromSec:a().nonnegative(),toSec:a().nonnegative()}).refine(e=>e.toSec>e.fromSec,{message:`dense range must have toSec > fromSec`}),bO=200,xO=i({everyMs:a().int().positive(),ranges:p(yO).min(1).max(200)}),SO=i({everyMs:a().int().positive(),outputFps:a().int().min(1).max(60).optional(),dense:xO.optional()}).superRefine((e,t)=>{e.dense!==void 0&&e.dense.everyMs>=e.everyMs&&t.addIssue({code:le.custom,message:`dense.everyMs must be strictly smaller than the base everyMs`,path:[`dense`,`everyMs`]})}),CO=i({speed:vO.optional(),timelapse:SO.optional(),includeAudio:v(),maxLifeMs:a().int().positive(),deleteAfterDownload:v(),title:g().max(200).optional(),notifyTargetIds:p(g().min(1)).max(20).optional()}).superRefine((e,t)=>{e.speed!==void 0&&e.timelapse!==void 0&&t.addIssue({code:le.custom,message:`speed and timelapse are mutually exclusive`,path:[`timelapse`]})}),wO=m([`queued`,`rendering`,`ready`,`failed`,`expired`,`deleted`]),TO=i({id:g(),deviceId:a(),profile:g(),fromMs:a(),toMs:a(),options:CO,state:wO,progressPct:a().nullable(),fileBytes:a().nullable(),expiresAt:a(),deleteAfterDownload:v(),downloadedAt:a().nullable(),createdAt:a(),createdBy:g(),error:g().nullable()}),EO=i({url:g(),endpoints:p(g())}),DO=50*1024*1024,OO=i({base64:g(),contentType:g(),name:g(),bytes:a().int().nonnegative()}),kO={name:`recording-export`,scope:`system`,mode:`singleton`,methods:{createExport:T(i({deviceId:a(),profile:g().optional(),profiles:p(g()).min(1).optional(),fromMs:a(),toMs:a(),options:CO}).superRefine((e,t)=>{(e.profiles!==void 0&&e.profiles.length>0?e.profiles:e.profile===void 0?[]:[e.profile]).length<1&&t.addIssue({code:le.custom,message:`pass profiles[] (min 1) or legacy profile`,path:[`profiles`]})}),TO,{kind:`mutation`,auth:`protected`}),listExports:T(i({deviceId:a().optional()}),p(TO),{kind:`query`,auth:`protected`}),getExport:T(i({exportId:g()}),TO,{kind:`query`,auth:`protected`}),cancelExport:T(i({exportId:g()}),TO,{kind:`mutation`,auth:`protected`}),deleteExport:T(i({exportId:g()}),TO,{kind:`mutation`,auth:`protected`}),getDownloadUrl:T(i({exportId:g()}),EO,{kind:`query`,auth:`protected`}),readExportBytes:T(i({exportId:g()}),OO,{kind:`query`,auth:`protected`})}},AO=i({active:v(),reason:g(),lastChangedAt:a()}),jO=AO.extend({lastFetchedAt:a()}),MO={name:`recording-signal`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[D.Camera],methods:{getStatus:T(i({deviceId:a()}),AO)},status:{schema:AO,kind:`push`,empty:{active:!1,reason:`unknown`,lastChangedAt:0}},runtimeState:jO,durability:`session`},NO=g(),PO=[`day`,`ir`,`night`,`dawn`,`dusk`],FO=m([`skip`,`judge-anyway`]),IO=`__diverged__`,LO=m([`matched`,`diverged`,`unknown`]),RO=m([`no-reference-for-condition`,`view-shifted`,`no-vision-profile`,`encoder-model-changed`,`no-snapshot`]),zO=i({embedding:p(a()),modelId:g(),condition:NO,capturedAt:a(),thumbnailMediaId:g().optional(),anchorEmbedding:p(a()).optional()}),BO=i({id:g(),label:g(),references:p(zO),textPrompts:p(g()).optional(),referenceCount:a(),currentlyMatched:v()}),VO=b(`mode`,[i({mode:y(`similarity`),threshold:a().min(0).max(1),hysteresisCount:a().int().positive()}),i({mode:y(`llm`),prompt:g(),profileId:g().optional(),hysteresisCount:a().int().positive()})]),HO=60,UO=120,WO=60,GO=.85,KO=`skip`,qO=8e3,JO=448,YO=!0,XO=i({enabled:v().default(!1),prompt:g().min(1).max(1e3),profileId:g().optional(),timeoutMs:a().int().min(1e3).max(2e4).default(qO),maxImagePx:a().int().min(64).max(2048).default(448),onTimeout:m([`flip`,`hold`]).default(`hold`)}),ZO=i({id:g(),label:g(),roi:_h,enabled:v(),triggerMode:m([`periodic`,`on-motion`,`both`]),checkIntervalSec:a().optional(),check:VO,states:p(BO),currentStateId:g().nullable(),lastCheckedAt:a().nullable(),lastConfidence:a().nullable(),currentCondition:NO.nullable(),availability:m([`ok`,`unavailable`]),unavailableReason:g().nullable(),baselineStateId:g().nullable(),emit:m([`latched`,`live`]).default(`latched`),verdict:LO,latched:v(),armedAt:a(),divergedAt:a().nullable(),restoredAt:a().nullable(),quietSeconds:a().int().min(0).max(3600).default(60),minObservationSpacingSec:a().int().min(0).max(3600).default(120),confirm:XO.optional(),anchorThreshold:a().min(0).max(1).default(GO),autoRestore:v().default(!1),onUncoveredCondition:FO.default(KO),suspendedCondition:NO.nullable().default(null),unavailable:RO.nullable(),coveredConditions:p(NO)}),QO=i({monitors:p(ZO),lastFetchedAt:a()}),$O=i({deviceId:a(),status:QO.nullable()}),ek={name:`scene-monitor`,scope:`device`,mode:`singleton`,kind:`wrapper`,defaultActive:!0,deviceTypes:[D.Camera],methods:{listScenes:T(i({deviceId:a()}),QO),listScenesBatch:T(i({deviceIds:p(a()).min(1).max(200)}),p($O).readonly()),createScene:T(i({deviceId:a(),label:g(),roi:_h,check:VO,triggerMode:m([`periodic`,`on-motion`,`both`]).optional(),checkIntervalSec:a().optional()}),ZO,{kind:`mutation`,auth:`admin`}),updateScene:T(i({deviceId:a(),monitorId:g(),patch:i({label:g().optional(),roi:_h.optional(),enabled:v().optional(),triggerMode:m([`periodic`,`on-motion`,`both`]).optional(),checkIntervalSec:a().optional(),check:VO.optional(),emit:m([`latched`,`live`]).optional(),quietSeconds:a().int().min(0).max(3600).optional(),minObservationSpacingSec:a().int().min(0).max(3600).optional(),anchorThreshold:a().min(0).max(1).optional(),autoRestore:v().optional(),onUncoveredCondition:FO.optional(),confirm:XO.nullable().optional()})}),h(),{kind:`mutation`,auth:`admin`}),deleteScene:T(i({deviceId:a(),monitorId:g()}),h(),{kind:`mutation`,auth:`admin`}),captureReference:T(i({deviceId:a(),monitorId:g(),stateId:g().optional(),label:g().optional(),condition:NO.optional()}),i({stateId:g(),referenceCount:a()}),{kind:`mutation`,auth:`admin`}),deleteReference:T(i({deviceId:a(),monitorId:g(),stateId:g(),index:a()}),h(),{kind:`mutation`,auth:`admin`}),recheckNow:T(i({deviceId:a(),monitorId:g()}),h(),{kind:`mutation`,auth:`admin`}),resetScene:T(i({deviceId:a(),monitorId:g(),recapture:v().optional()}),h(),{kind:`mutation`,auth:`admin`})},status:{schema:QO,kind:`push`},runtimeState:QO,durability:`session`},tk=i({isRunning:v(),lastRunAt:a(),lastRunSuccess:v().nullable(),lastError:g().nullable(),lastChangedAt:a()}),nk={name:`script-runner`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[D.Script],methods:{run:T(i({deviceId:a().int().nonnegative(),variables:n(g(),u()).optional()}),h(),{kind:`mutation`,auth:`admin`}),stop:T(i({deviceId:a().int().nonnegative()}),h(),{kind:`mutation`,auth:`admin`})},status:{schema:tk,kind:`push`},runtimeState:tk,durability:`session`},rk=i({detected:v(),lastChangedAt:a()}),ik={name:`smoke`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[D.Sensor],methods:{},status:{schema:rk,kind:`push`},runtimeState:rk,durability:`restored`,volatileStateFields:[`lastChangedAt`]},ak=i({camStreamId:g().min(1),kind:Ue,url:g().optional(),codec:g().optional(),resolution:C.optional(),fps:a().positive().optional(),label:g().optional(),deviceFeatures:p(g()).optional(),autoEligible:v().optional(),profileHint:S.optional(),metadata:n(g(),u()).optional()}),ok=i({descriptors:p(ak),lastFetchedAt:a()}),sk={name:`stream-catalog`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[D.Camera],methods:{getCatalog:T(i({deviceId:a().int().nonnegative()}),p(ak).readonly())},runtimeState:ok,durability:`restored`,volatileStateFields:[`lastFetchedAt`]},ck=m([`main`,`sub`,`ext`]),lk=i({width:a(),height:a(),codec:m([`h264`,`h265`]),framerate:a(),bitrate:a(),bitrateMode:m([`vbr`,`cbr`]).optional(),encoderProfile:m([`high`,`main`,`baseline`]).optional(),gop:a().optional(),audio:v().optional()}),uk=i({main:lk.optional(),sub:lk.optional(),ext:lk.optional(),lastFetchedAt:a()}),dk=i({resolutions:p(i({width:a(),height:a()})),codecs:p(m([`h264`,`h265`])),framerates:p(a()),bitrates:p(a()),bitrateRange:s([a(),a()]).optional(),supportsBitrateMode:v(),supportsEncoderProfile:v(),supportsGop:v(),gop:i({min:a(),max:a(),step:a()}).optional()}),fk=i({main:dk.optional(),sub:dk.optional(),ext:dk.optional()}),pk=i({width:a().optional(),height:a().optional(),codec:m([`h264`,`h265`]).optional(),framerate:a().optional(),bitrate:a().optional(),bitrateMode:m([`vbr`,`cbr`]).optional(),encoderProfile:m([`high`,`main`,`baseline`]).optional(),gop:a().optional()}),mk={name:`stream-params`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[D.Camera],deviceConfig:{ui:{kind:`derived-form`,builderId:`stream-params`,tab:`streaming`}},methods:{getOptions:T(i({deviceId:a()}),fk),setProfile:T(i({deviceId:a(),profile:ck,patch:pk}),h(),{kind:`mutation`,auth:`admin`}),getConfigSchema:T(i({deviceId:a()}),u().nullable())},status:{schema:uk,kind:`poll`},runtimeState:uk,durability:`restored`,volatileStateFields:[`lastFetchedAt`]},hk=[{profile:`main`,prefix:`streamMain`,label:`Main stream`},{profile:`sub`,prefix:`streamSub`,label:`Sub stream`},{profile:`ext`,prefix:`streamExt`,label:`Third stream`}];function gk(e,t,n){let r=[];if(t.resolutions.length>0){let i=t.resolutions.map(e=>({value:`${String(e.width)}x${String(e.height)}`,label:`${String(e.width)}×${String(e.height)}`})),a=n?`${String(n.width)}x${String(n.height)}`:void 0;a&&!i.some(e=>e.value===a)&&i.unshift({value:a,label:`${a.replace(`x`,`×`)} (current)`}),r.push({type:`select`,key:`${e.prefix}_resolution`,label:`Resolution`,options:i,default:a??i[0]?.value??``})}if(t.codecs.length>0&&r.push({type:`select`,key:`${e.prefix}_codec`,label:`Codec`,options:t.codecs.map(e=>({value:e,label:e===`h264`?`H.264`:`H.265`})),default:n?.codec??t.codecs[0]}),t.framerates.length>0){let i=t.framerates.map(e=>({value:String(e),label:`${String(e)} fps`})),a=n?.framerate;a!==void 0&&!t.framerates.includes(a)&&i.unshift({value:String(a),label:`${String(a)} fps (current)`}),r.push({type:`select`,key:`${e.prefix}_framerate`,label:`Frame rate`,options:i,default:a===void 0?i[0]?.value??``:String(a)})}if(t.bitrates.length>0){let i=t.bitrates.map(e=>({value:String(e),label:`${String(e)} kbps`})),a=n?.bitrate;a!==void 0&&!t.bitrates.includes(a)&&i.unshift({value:String(a),label:`${String(a)} kbps (current)`}),r.push({type:`select`,key:`${e.prefix}_bitrate`,label:`Bitrate`,options:i,default:a===void 0?i[0]?.value??``:String(a)})}else{let i=t.bitrateRange;r.push({type:`number`,key:`${e.prefix}_bitrate`,label:`Bitrate`,unit:`kbps`,...i?{min:i[0],max:i[1]}:{},default:n?.bitrate??i?.[0]??0})}if(t.supportsBitrateMode&&r.push({type:`select`,key:`${e.prefix}_bitrateMode`,label:`Bitrate mode`,options:[{value:`vbr`,label:`VBR (variable)`},{value:`cbr`,label:`CBR (constant)`}],default:n?.bitrateMode??`vbr`}),t.supportsEncoderProfile&&r.push({type:`select`,key:`${e.prefix}_encoderProfile`,label:`Encoder profile`,options:[{value:`baseline`,label:`Baseline`},{value:`main`,label:`Main`},{value:`high`,label:`High`}],default:n?.encoderProfile??`main`}),t.supportsGop){let i=t.gop;if(i){let t=[];for(let e=i.min;e<=i.max;e+=i.step)t.push({value:String(e),label:`${String(e)} s`});let a=n?.gop;a!==void 0&&!t.some(e=>e.value===String(a))&&t.unshift({value:String(a),label:`${String(a)} s (current)`}),r.push({type:`select`,key:`${e.prefix}_gop`,label:`I-frame interval (GOP)`,options:t,default:a===void 0?t[0]?.value??``:String(a)})}else r.push({type:`number`,key:`${e.prefix}_gop`,label:`I-frame interval (GOP)`,unit:`s`,min:1,default:n?.gop??1})}return r.length===0?null:{id:`stream-${e.profile}`,tab:`streaming`,title:e.label,description:`Encoder parameters pushed to the camera. Option lists are read live from the camera — fields the firmware doesn't expose are hidden.`,columns:2,fields:r}}function _k(e,t){let n=[];for(let r of hk){let i=e[r.profile];if(!i)continue;let a=gk(r,i,t?.[r.profile]);a&&n.push(a)}return n.length===0?null:{sections:n}}function vk(e,t){let n={},r=!1,i=`${t}_resolution`;if(i in e&&typeof e[i]==`string`){let[t,a]=e[i].split(`x`).map(Number);Number.isFinite(t)&&Number.isFinite(a)&&(n.width=t,n.height=a,r=!0)}let a=`${t}_codec`;a in e&&(e[a]===`h264`||e[a]===`h265`)&&(n.codec=e[a],r=!0);let o=`${t}_framerate`;if(o in e){let t=Number(e[o]);Number.isFinite(t)&&(n.framerate=t,r=!0)}let s=`${t}_bitrate`;if(s in e){let t=Number(e[s]);Number.isFinite(t)&&(n.bitrate=t,r=!0)}let c=`${t}_bitrateMode`;c in e&&(e[c]===`vbr`||e[c]===`cbr`)&&(n.bitrateMode=e[c],r=!0);let l=`${t}_encoderProfile`;l in e&&(e[l]===`high`||e[l]===`main`||e[l]===`baseline`)&&(n.encoderProfile=e[l],r=!0);let u=`${t}_gop`;if(u in e){let t=Number(e[u]);Number.isFinite(t)&&(n.gop=t,r=!0)}return r?n:null}var yk=i({on:v(),lastChangedAt:a()}),bk={name:`switch`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[D.Switch,D.Siren,D.Light],methods:{setState:T(i({deviceId:a(),on:v()}),h(),{kind:`mutation`,auth:`admin`})},events:{onStateChanged:{data:i({deviceId:a(),on:v(),lastChangedAt:a()})}},status:{schema:yk,kind:`command-driven`},runtimeState:yk,durability:`restored`,volatileStateFields:[`lastChangedAt`],settings:{bindings:[{kind:`scalar`,statusPath:`on`,method:`setState`,valueArg:`on`,field:{label:`On`,kind:`boolean`}}]}},xk=i({streaming:v(),notifications:v(),objectDetection:v(),remoteAccess:v(),agentCluster:v(),smartHome:v(),recordings:v(),backup:v(),repl:v()}),Sk=i({status:y(`ok`),uptime:a()}),Ck=i({name:g(),address:g(),family:g(),internal:v()}),wk=m([`operator-set`,`derived-from-ip`]),Tk=i({latitude:a().min(-90).max(90),longitude:a().min(-180).max(180),source:wk,updatedAt:a(),label:g().optional()}),Ek=i({location:Tk.nullable(),derivationAttemptedAt:a().nullable(),derivationError:g().nullable()}),Dk=i({latitude:a().min(-90).max(90),longitude:a().min(-180).max(180)}).nullable(),Ok=m([`http`,`ws`,`mesh`,`unknown`]),kk=i({http:a(),ws:a(),mesh:a(),unknown:a()}),Ak=i({plane:Ok,procedure:g(),userAgent:g(),ip:g(),principal:g(),calls:a(),subscriptions:a(),perMin:a()}),jk=i({procedure:g(),calls:a(),planes:kk,subscriptions:a(),perMin:a()}),Mk=i({armed:v(),elapsedMs:a(),windowMs:a(),armedUntilMs:a(),httpRequests:a(),batchedRequests:a(),procedureCalls:a(),planes:kk,planesExplainTotal:v(),wsConnections:a(),wsMessages:a(),subscriptions:a(),subscriptionStops:a(),distinctGroups:a(),unattributedCalls:a(),procedures:p(jk).readonly(),groups:p(Ak).readonly()}),Nk=Mk.extend({persisted:v()}),Pk=m([`debug`,`info`,`warn`,`error`]),Fk=m([`request-census`]),Ik=m([`cluster`,`node`,`component`]),Lk=m([`default`,`cluster`,`node`,`component`]),Rk=i({scope:Ik,nodeId:g().nullable(),component:g().nullable(),level:Pk.nullable()}),zk=i({level:Pk,levelSource:Lk}),Bk=i({layers:p(Rk).readonly()}),Vk=i({id:Fk,armed:v(),armedUntilMs:a(),remainingMs:a(),persisted:v()}),Hk=i({id:Fk,armMs:a().int().min(0),reportEveryMs:a().int().positive().optional()}),Uk=i({channel:g(),armed:v(),armedUntilMs:a(),remainingMs:a(),deviceIds:p(a().int()).readonly().nullable()}),Wk=i({channel:g().min(1),armMs:a().int().min(0),deviceIds:p(a().int()).readonly().nullable().optional()}),Gk=i({level:Pk.nullable().optional(),diagnostics:p(Hk).readonly().optional(),channels:p(Wk).readonly().optional()}),Kk=Cp.extend({addonId:g()}),qk=Lf.extend({addonId:g()}),Jk=i({scopeNodeId:g().optional(),scopeComponent:g().optional()}),Yk=i({scopeNodeId:g().optional(),scopeComponent:g().optional(),patch:Gk}),Xk=i({scopeNodeId:g().nullable(),scopeComponent:g().nullable(),effective:zk,explicit:Bk,activeWindows:p(Vk).readonly(),channels:p(_o).readonly(),activeChannels:p(Uk).readonly(),persisted:v()}),Zk={name:`system`,scope:`system`,mode:`singleton`,methods:{info:T(h(),xk),health:T(h(),Sk),featureFlags:T(h(),xk),networkAddresses:T(h(),p(Ck).readonly()),getRetentionConfig:T(h(),u().nullable(),{auth:`admin`}),setRetentionConfig:T(n(g(),u()),ce(),{kind:`mutation`,auth:`admin`}),forceRetentionCleanup:T(h(),h(),{kind:`mutation`,auth:`admin`}),getSiteLocation:T(h(),Ek),setSiteLocation:T(Dk,Ek,{kind:`mutation`,auth:`admin`}),detectSiteLocation:T(h(),Ek,{kind:`mutation`,auth:`admin`}),getRequestCensus:T(h(),Nk,{auth:`admin`}),getLoadContributions:T(h(),p(Kk).readonly(),{auth:`admin`}),getFailureContributions:T(h(),p(qk).readonly(),{auth:`admin`}),getLoggingSettings:T(Jk,Xk,{auth:`admin`}),setLoggingSettings:T(Yk,Xk,{kind:`mutation`,auth:`admin`})},mount:{kind:`server-provided`}},Qk=i({tampered:v(),lastChangedAt:a()}),$k={name:`tamper`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[D.Sensor],methods:{},status:{schema:Qk,kind:`push`},runtimeState:Qk,durability:`restored`,volatileStateFields:[`lastChangedAt`]},eA=i({celsius:a(),lastFetchedAt:a(),unit:g().optional(),precision:a().int().min(0).max(10).optional()}),tA={name:`temperature-sensor`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[D.Sensor,D.Thermostat],methods:{},status:{schema:eA,kind:`push`},runtimeState:eA,durability:`restored`,volatileStateFields:[`lastFetchedAt`]},nA=i({title:g(),message:g(),severity:m([`info`,`warning`,`critical`]),duration:a().optional(),action:i({label:g(),url:g()}).optional()}),rA={name:`toast`,scope:`system`,mode:`singleton`,methods:{onToast:T(h(),nA,{kind:`subscription`})},mount:{kind:`server-provided`}},iA=i({currentVersion:g().nullable(),availableVersion:g().nullable(),updatable:v(),state:g().nullable(),inProgress:v()}),aA={name:`update`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[D.Update],methods:{installUpdate:T(h(),h(),{kind:`mutation`,auth:`admin`})},status:{schema:iA,kind:`poll`},runtimeState:iA,durability:`session`},oA=i({id:g(),username:g(),isAdmin:v().default(!1),allowedProviders:c([p(g()),y(`*`)]),allowedDevices:n(g(),c([p(g()),y(`*`)])),scopes:p(q).default([]),totpEnabled:v().default(!1),createdAt:a(),updatedAt:a()}),sA=i({username:g(),password:g().min(6),isAdmin:v().default(!1),allowedProviders:c([p(g()),y(`*`)]).optional(),allowedDevices:n(g(),c([p(g()),y(`*`)])).optional(),scopes:p(q).optional()}),cA=i({id:g(),isAdmin:v().optional(),allowedProviders:c([p(g()),y(`*`)]).optional(),allowedDevices:n(g(),c([p(g()),y(`*`)])).optional(),scopes:p(q).optional()}),lA=i({id:g(),label:g(),isAdmin:v().default(!1),allowedProviders:c([p(g()),y(`*`)]).optional(),allowedDevices:n(g(),c([p(g()),y(`*`)])).optional(),tokenPrefix:g(),createdAt:a(),lastUsedAt:a().optional()}),uA=i({label:g(),isAdmin:v().default(!1),allowedProviders:c([p(g()),y(`*`)]).optional(),allowedDevices:n(g(),c([p(g()),y(`*`)])).optional()}),dA=i({token:g(),record:lA}),fA=i({id:g(),userId:g(),name:g(),tokenPrefix:g(),scopes:p(q),expiresAt:a().nullish(),lastUsedAt:a().nullish(),createdAt:a()}),pA=i({userId:g(),name:g(),scopes:p(q),expiresAt:a().optional()}),mA=i({token:g(),record:fA}),hA=i({id:g(),userId:g(),username:g(),integrationId:g(),scopes:p(q),createdAt:a(),lastUsedAt:a(),revokedAt:a().nullable()}),gA=i({secret:g(),otpauthUrl:g()}),_A=i({enabled:v(),confirmedAt:a().nullable()}),vA={name:`user-management`,scope:`system`,mode:`singleton`,methods:{listUsers:T(h(),p(oA),{auth:`admin`}),createUser:T(sA,oA,{kind:`mutation`,auth:`admin`,access:`create`}),updateUser:T(cA,i({success:y(!0)}),{kind:`mutation`,auth:`admin`,access:`create`}),deleteUser:T(i({id:g()}),i({success:y(!0)}),{kind:`mutation`,auth:`admin`,access:`delete`}),resetPassword:T(i({id:g(),newPassword:g().min(6)}),i({success:y(!0)}),{kind:`mutation`,auth:`admin`,access:`create`}),setUserScopes:T(i({userId:g(),scopes:p(q)}),i({success:y(!0)}),{kind:`mutation`,auth:`admin`,access:`create`}),validateCredentials:T(i({username:g(),password:g()}),oA.extend({passwordHash:g()}).nullable(),{kind:`mutation`,access:`view`}),listApiKeys:T(h(),p(lA),{auth:`admin`}),createApiKey:T(uA,dA,{kind:`mutation`,auth:`admin`,access:`create`}),revokeApiKey:T(i({id:g()}),i({success:y(!0)}),{kind:`mutation`,auth:`admin`,access:`delete`}),validateApiKey:T(i({token:g()}),lA.nullable(),{kind:`mutation`,access:`view`}),createScopedToken:T(pA,mA,{kind:`mutation`,auth:`admin`,access:`create`}),revokeScopedToken:T(i({id:g()}),i({success:y(!0)}),{kind:`mutation`,auth:`admin`,access:`delete`}),validateScopedToken:T(i({token:g()}),fA.nullable(),{access:`view`}),listScopedTokens:T(i({userId:g()}),p(fA),{auth:`admin`}),setupTotp:T(i({userId:g()}),gA,{kind:`mutation`,auth:`admin`,access:`create`}),confirmTotp:T(i({userId:g(),code:g()}),i({success:y(!0)}),{kind:`mutation`,auth:`admin`,access:`create`}),disableTotp:T(i({userId:g()}),i({success:y(!0)}),{kind:`mutation`,auth:`admin`,access:`delete`}),getTotpStatus:T(i({userId:g()}),_A,{auth:`admin`}),verifyTotp:T(i({userId:g(),code:g()}),i({valid:v()}),{kind:`mutation`,access:`view`}),oauthIssueCode:T(i({integrationId:g(),userId:g(),username:g(),scopes:p(q),redirectUri:g(),hubUrl:g(),codeChallenge:g().optional(),refreshTtlSec:c([a().int().positive(),y(`never`)]).optional()}),i({code:g()}),{kind:`mutation`,access:`create`}),oauthExchangeCode:T(i({code:g(),redirectUri:g(),codeVerifier:g().optional()}),i({accessToken:g(),refreshToken:g(),expiresIn:a()}).nullable(),{kind:`mutation`,access:`view`}),oauthRefresh:T(i({refreshToken:g()}),i({accessToken:g(),refreshToken:g(),expiresIn:a()}).nullable(),{kind:`mutation`,access:`view`}),oauthVerifyAccessToken:T(i({token:g()}),i({userId:g(),username:g(),scopes:p(q)}).nullable(),{access:`view`}),listOauthSessions:T(h(),p(hA),{auth:`admin`}),revokeOauthSession:T(i({id:g()}),i({success:v()}),{kind:`mutation`,auth:`admin`,access:`delete`})}},yA=m([`idle`,`cleaning`,`paused`,`returning`,`docked`,`drying`,`error`]),bA=i({level:a().min(0).max(100).nullable(),status:m([`ok`,`low`,`full`]).nullable()}),xA=i({state:yA,batteryLevel:a().min(0).max(100).nullable(),fanSpeed:g().nullable(),availableFanSpeeds:p(g()),cleanWater:bA.nullable(),dirtyWater:bA.nullable(),detergent:bA.nullable(),dustBin:bA.nullable(),progressPercent:a().min(0).max(100).nullable(),errorCode:a().nullable(),errorLabel:g().nullable(),lastChangedAt:a()}),SA={name:`vacuum-control`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[D.Vacuum],methods:{start:T(i({deviceId:a().int().nonnegative()}),h(),{kind:`mutation`,auth:`admin`}),pause:T(i({deviceId:a().int().nonnegative()}),h(),{kind:`mutation`,auth:`admin`}),stop:T(i({deviceId:a().int().nonnegative()}),h(),{kind:`mutation`,auth:`admin`}),returnToBase:T(i({deviceId:a().int().nonnegative()}),h(),{kind:`mutation`,auth:`admin`}),locate:T(i({deviceId:a().int().nonnegative()}),h(),{kind:`mutation`,auth:`admin`}),setFanSpeed:T(i({deviceId:a().int().nonnegative(),speed:g().min(1)}),h(),{kind:`mutation`,auth:`admin`})},status:{schema:xA,kind:`push`},runtimeState:xA,durability:`session`},CA=m([`open`,`opening`,`closing`,`closed`,`stopped`]),wA=i({state:CA,position:a().min(0).max(100).nullable(),lastChangedAt:a()}),TA={name:`valve`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[D.Valve],methods:{open:T(i({deviceId:a().int().nonnegative()}),h(),{kind:`mutation`,auth:`admin`}),close:T(i({deviceId:a().int().nonnegative()}),h(),{kind:`mutation`,auth:`admin`}),stop:T(i({deviceId:a().int().nonnegative()}),h(),{kind:`mutation`,auth:`admin`}),setPosition:T(i({deviceId:a().int().nonnegative(),position:a().min(0).max(100)}),h(),{kind:`mutation`,auth:`admin`})},status:{schema:wA,kind:`push`},runtimeState:wA,durability:`session`},EA=i({detected:v(),lastChangedAt:a()}),DA={name:`vibration`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[D.Sensor],methods:{},status:{schema:EA,kind:`push`},runtimeState:EA,durability:`restored`,volatileStateFields:[`lastChangedAt`]},OA=i({currentTemp:a().nullable(),targetTemp:a().nullable(),operationMode:g().nullable(),availableModes:p(g()),away:v().nullable(),minTemp:a().nullable(),maxTemp:a().nullable(),lastChangedAt:a()}),kA={name:`water-heater`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[D.WaterHeater],methods:{setTargetTemp:T(i({deviceId:a().int().nonnegative(),temp:a().finite()}),h(),{kind:`mutation`,auth:`admin`}),setOperationMode:T(i({deviceId:a().int().nonnegative(),mode:g().min(1)}),h(),{kind:`mutation`,auth:`admin`}),setAway:T(i({deviceId:a().int().nonnegative(),on:v()}),h(),{kind:`mutation`,auth:`admin`})},status:{schema:OA,kind:`push`},runtimeState:OA,durability:`session`},AA=i({condition:g().nullable(),temperature:a().nullable(),temperatureUnit:g().nullable(),humidity:a().min(0).max(100).nullable(),pressure:a().nullable(),pressureUnit:g().nullable(),windSpeed:a().nullable(),windSpeedUnit:g().nullable(),windBearing:a().nullable(),lastFetchedAt:a()}),jA={name:`weather`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[D.Weather],methods:{},status:{schema:AA,kind:`push`},runtimeState:AA,durability:`session`},MA=i({totalObjects:a().int().nonnegative(),byClass:n(g(),a().int().nonnegative())}),NA=MA.extend({zoneId:g(),zoneName:g(),trackIds:p(g()).readonly()}),PA=i({id:g(),className:g(),bbox:i({x:a(),y:a(),w:a(),h:a()}),frameWidth:a().int().nonnegative(),frameHeight:a().int().nonnegative(),firstSeenAt:a().int(),becameStationaryAt:a().int(),lastConfirmedAt:a().int(),label:g().optional(),keyFrameMediaKey:g().optional()}),FA=i({ts:a().int(),frameWidth:a().int().nonnegative(),frameHeight:a().int().nonnegative(),zones:p(NA).readonly(),frame:MA,unzoned:MA,stationaryObjects:p(PA).readonly().optional()}),IA=i({deviceId:a(),read:m([`read`,`unreadable`]),snapshot:FA.nullable()}),LA=m([`minute`,`5min`,`hour`]),RA=i({from:a().int(),to:a().int(),resolution:LA}),zA=i({ts:a().int(),count:a().int().nonnegative()}),BA={name:`zone-analytics`,scope:`device`,mode:`singleton`,deviceTypes:[D.Camera],methods:{getCurrentSnapshot:T(i({deviceId:a()}),FA.nullable()),getCurrentSnapshotBatch:T(i({deviceIds:p(a()).min(1).max(200)}),p(IA).readonly()),getZoneHistory:T(i({deviceId:a(),zoneId:g(),className:g().optional()}).extend(RA.shape),p(zA).readonly()),getCameraHistory:T(i({deviceId:a(),className:g().optional()}).extend(RA.shape),p(zA).readonly()),getUnzonedHistory:T(i({deviceId:a(),className:g().optional()}).extend(RA.shape),p(zA).readonly())},runtimeState:FA,durability:`session`},VA=m([`motion`,`detection`,`package`]),HA={name:`zone-rules`,scope:`device`,mode:`singleton`,deviceTypes:[D.Camera],methods:{listRules:T(i({deviceId:a(),stage:VA}),p(X).readonly()),setRules:T(i({deviceId:a(),stage:VA,rules:p(X).readonly()}),h(),{kind:`mutation`,auth:`admin`})},runtimeState:i({motion:p(X).readonly(),detection:p(X).readonly(),package:p(X).readonly()}),durability:`restored`},UA=[`decoder`,`motion-detection`,`pipeline-executor`,`audio-analyzer`,`pipeline-analytics`,`notification-output`],WA=[...UA,`pipeline-orchestrator`,`pipeline-runner`],GA=[{cap:`alarm-panel`,field:`state`},{cap:`cover`,field:`state`},{cap:`presence`,field:`state`},{cap:`lock`,field:`locked`,booleanWords:[`locked`,`unlocked`]},{cap:`contact`,field:`entryOpen`,booleanWords:[`open`,`closed`]},{cap:`switch`,field:`on`,booleanWords:[`on`,`off`]},{cap:`binary`,field:`on`,booleanWords:[`on`,`off`]}];function KA(e){for(let t of GA){let n=e[t.cap];if(typeof n!=`object`||!n)continue;let r=n[t.field];if(typeof r==`string`&&r.length>0)return r;if(typeof r==`boolean`&&t.booleanWords!==void 0)return r?t.booleanWords[0]:t.booleanWords[1]}}function qA(e,t=[]){for(let n of GA){let r=e[n.cap];if(typeof r!=`object`||!r)continue;if(n.booleanWords!==void 0)return[...n.booleanWords];if(n.cap===`alarm-panel`)return[...t];let i=r[n.field];return typeof i==`string`?[i]:[]}return[]}var JA={contact:`entryOpen`,binary:`on`,switch:`on`,motion:`detected`,flood:`flooded`,gas:`detected`,smoke:`detected`,"carbon-monoxide":`detected`,vibration:`detected`,tamper:`tampered`},YA={contact:`lastChangedAt`,binary:`lastChangedAt`,switch:`lastChangedAt`,motion:`lastDetectedAt`,flood:`lastChangedAt`,gas:`lastChangedAt`,smoke:`lastChangedAt`,"carbon-monoxide":`lastChangedAt`,vibration:`lastChangedAt`,tamper:`lastChangedAt`},XA=Object.keys(JA),ZA=[`sensor`,`switch`,`control`];function QA(e){return Object.prototype.hasOwnProperty.call(JA,e)}function $A(e,t){let n=JA[e];if(n===void 0)return null;let r=t[n];return typeof r==`boolean`?r:null}function ej(e,t){let n=YA[e];if(n===void 0)return null;let r=t[n];return typeof r!=`number`||!Number.isFinite(r)||r<=0?null:r}var tj=3e4;function nj(e){let t=$A(e.capName,e.slice);if(t===null)return{edge:`none`,value:null,reason:QA(e.capName)?`non-boolean-value`:`unknown-cap`};if(e.prior===void 0){if(!t)return{edge:`none`,value:t,reason:`baseline-seeded-inactive`};let n=ej(e.capName,e.slice),r=Math.max(e.startedAtMs,e.nowMs-e.firstSightingFreshnessMs);return n===null||n<r?{edge:`none`,value:t,reason:`baseline-seeded-stale-active`}:{edge:`rising`,value:!0}}return e.prior===t?{edge:`none`,value:t,reason:`no-change`}:t?{edge:`rising`,value:!0}:{edge:`none`,value:t,reason:`falling-edge`}}var rj=`camstack/camstack-models`,ij=`https://huggingface.co/${rj}/resolve/main`,aj=`30d`,oj={"features.streaming":!0,"features.notifications":!0,"features.objectDetection":!1,"features.remoteAccess":!0,"features.agentCluster":!1,"features.smartHome":!0,"features.recordings":!0,"features.backup":!0,"features.repl":!0,"retention.detectionEventsDays":30,"retention.audioLevelsDays":7,"logging.level":`info`,"logging.retentionDays":30,"eventBus.ringBufferSize":1e4,"storage.provider":`sqlite-storage`,"storage.locations":{data:`camstack-data/data`,media:`camstack-data/media`,recordings:`camstack-data/recordings`,cache:`/tmp/camstack-cache`,logs:`camstack-data/logs`,models:`camstack-data/models`},providers:[],"ffmpeg.binaryPath":`ffmpeg`,"ffmpeg.hwAccel":`auto`,"ffmpeg.threadCount":0,"auth.tokenExpiry":`30d`},Z={Siren:O.Siren,Floodlight:O.Floodlight,Spotlight:O.Spotlight,PirSensor:O.PirSensor,Chime:O.Chime,Autotrack:O.Autotrack,Nightvision:O.Nightvision,PrivacyMask:O.PrivacyMask},sj={[Z.Siren]:`Siren`,[Z.Floodlight]:`Floodlight`,[Z.Spotlight]:`Spotlight`,[Z.PirSensor]:`PIR`,[Z.Chime]:`Chime`,[Z.Autotrack]:`Autotracking`,[Z.Nightvision]:`Night Vision`,[Z.PrivacyMask]:`Privacy Mask`};function cj(e,t,n){let r=`${e}:${t}`;return typeof n==`number`?`${r}:${n}`:r}var lj=class e{schema;data;persistFn;constructor(e,t,n){this.schema=e,this.data=t,this.persistFn=n}static fromSchema(t,n,r={},i){let a=t.safeParse(r);if(a.success)return new e(t,a.data,n);let o=new Set;for(let e of a.error.issues){let t=e.path[0];typeof t==`string`&&o.add(t)}let s={...r};for(let e of o)delete s[e];let c=t.safeParse(s);return i?.({droppedKeys:[...o],issues:a.error.issues}),c.success?(n(c.data).catch(()=>{}),new e(t,c.data,n)):new e(t,t.parse({}),n)}get values(){return this.data}get(e){return this.data[e]}async set(e,t){let n=this.schema.parse({...this.data,[e]:t});this.data=n,await this.persistFn(this.data)}async setAll(e){let t=this.schema.parse({...this.data,...e});this.data=t,await this.persistFn(this.data)}async deleteKey(e){let{[e]:t,...n}=this.data,r=this.schema.parse(n);this.data=r,await this.persistFn(this.data)}entries(){let e=this.schema.shape;return Object.entries(e).map(([e,t])=>({key:e,schema:t,value:this.data[e],description:t.description}))}},uj=class e{writer;pendingWrites=new Set;slices;schemas=new Map;listeners=new Set;capListeners=new Map;constructor(e,t){this.writer=t,this.slices=new Map;for(let[t,n]of Object.entries(e))n&&typeof n==`object`&&!Array.isArray(n)&&this.slices.set(t,{...n})}static fromInitial(t,n){return new e(t,n)}installCapSchema(e,t){let n=this.schemas.get(e);if(n){if(n!==t)throw Error(`[DeviceRuntimeState] capability "${e}" registered a different runtime-state schema; each cap must declare ONE shape across every provider`);return}this.schemas.set(e,t);let r=this.slices.get(e);if(r){let n=t.safeParse(r);n.success?this.slices.set(e,n.data):this.slices.delete(e)}}getCapState(e){let t=this.slices.get(e);if(t)return Object.freeze({...t})}getCapField(e,t){return this.slices.get(e)?.[t]}setCapState(e,t){this.applyCapWrite(e,t,!1)}patchCapState(e,t){this.applyCapWrite(e,t,!0)}applyCapWrite(e,t,n){let r=this.schemas.get(e);if(!r)throw Error(`[DeviceRuntimeState] no schema registered for cap "${e}" — did the device register it via ctx.registerNativeCap before writing?`);let i=this.slices.get(e)??{},a=n?{...i,...t}:{...t},o=r.parse(a);if(dj(i,o))return;this.slices.set(e,o),this.fireListeners([e]);let s=this.writer(e,{...o}).catch(()=>{});this.pendingWrites.add(s),s.finally(()=>{this.pendingWrites.delete(s)})}fireListeners(e){let t=this.snapshot();for(let n of this.listeners)try{n(e,t)}catch{}for(let t of e){let e=this.capListeners.get(t);if(!e)continue;let n=this.getCapState(t);for(let t of e)try{t(n)}catch{}}}subscribe(e){return this.listeners.add(e),()=>{this.listeners.delete(e)}}subscribeCap(e,t){let n=this.capListeners.get(e);n||(n=new Set,this.capListeners.set(e,n));let r=e=>{t(e)};return n.add(r),()=>{let t=this.capListeners.get(e);t&&(t.delete(r),t.size===0&&this.capListeners.delete(e))}}snapshot(){let e={};for(let[t,n]of this.slices)e[t]=Object.freeze({...n});return Object.freeze(e)}async flush(){if(this.pendingWrites.size===0)return;let e=[...this.pendingWrites];await Promise.allSettled(e)}};function dj(e,t){let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let r of n)if(e[r]!==t[r])return!1;return!0}var fj={airQualitySensor:VS,alarmPanel:hh,ambientLightSensor:US,audioMetrics:JS,automationControl:XS,battery:QS,binary:eC,brightness:nC,cameraStreams:Ru,carbonMonoxide:cC,climateControl:dC,color:gC,connectivity:CC,consumables:EC,contact:OC,control:MC,cover:FC,dayNight:VC,deviceDiscovery:Pd,deviceStatus:UC,doorbell:KC,enumSensor:YC,eventEmitter:QC,fanControl:fw,featureProbe:mw,flood:gw,gas:vw,humidifier:bw,humiditySensor:Sw,image:ww,imageSettings:Nw,intercom:Kw,lawnMowerControl:Xw,lockControl:fT,mediaPlayer:_T,motion:wT,motionTrigger:DT,motionZones:MT,nativeObjectDetection:LT,navigation:ZT,networkLink:rE,notifier:AE,numericSensor:ME,petFeeder:QE,powerMeter:SD,presence:TD,pressureSensor:DD,privacyMask:ND,ptzAutotrack:GD,recordingSignal:MO,sceneMonitor:ek,scriptRunner:nk,smoke:ik,streamCatalog:sk,streamParams:mk,switch:bk,tamper:$k,temperatureSensor:tA,update:aA,vacuumControl:SA,valve:TA,vibration:DA,waterHeater:kA,weather:jA,zoneAnalytics:BA,zoneRules:HA,zones:T_},pj=class{id;stableId;type;name;parentDeviceId;role;get online(){return this.runtimeState.getCapState(`device-status`)?.online??!1}set online(e){this.markOnline(e)}get state(){if(!this._stateProxyCache){let e={},t={get:(t,n)=>{let r=n;if(r in e)return e[r];let i=fj[r];if(!i)return;let a=this.sliceProxy(i);return e[r]=a,a}};this._stateProxyCache=new Proxy(e,t)}return this._stateProxyCache}_stateProxyCache;config;runtimeState;ctx;location;disabled;_sourceInfoCache=null;constructor(e,t,n){if(this.ctx=e,this.id=e.id,this.stableId=e.stableId,this.type=n.type,!e.deviceMeta)throw Error(`BaseDevice constructor: ctx.deviceMeta is required (id=${e.id} stableId=${e.stableId})`);this.name=e.deviceMeta.name,this.location=e.deviceMeta.location,this.disabled=e.deviceMeta.disabled,this.role=n.role,this.parentDeviceId=e.parentDeviceId;let r=e.persistedConfig??{};this.config=lj.fromSchema(t,t=>e.persistConfig(t),r,({droppedKeys:t,issues:n})=>{e.logger.warn(`Device config recovery: dropping invalid persisted fields`,{tags:{deviceId:e.id,stableId:e.stableId},meta:{droppedKeys:[...t],firstIssue:n[0]?.message??null}})});let i=null,a=async(t,n)=>{i||=e.fetchDevice(e.id),await(await i).deviceState.setCapSlice({capName:t,slice:n})},o=e.initialRuntimeState??{};this.runtimeState=uj.fromInitial(o,a),e.bindRuntimeState?.(this.runtimeState),e.registerNativeCap?.(UC,{});let s={online:!0,lastChangedAt:Date.now()};this.runtimeState.setCapState(`device-status`,s),e.registerNativeCap?.(mw,{}),this.runtimeState.setCapState(`feature-probe`,{flags:{},deviceType:null,model:null,channelCount:null,lastProbedAt:0,lastFetchedAt:0})}deviceActions=new Map;registerDeviceAction(e,t,n){this.deviceActions.set(e,{spec:t,handler:n})}async runDeviceAction(e,t){let n=this.deviceActions.get(e);if(!n)throw Error(`unknown device action "${e}" on device ${this.id}`);let r=n.spec.input.parse(t);return n.handler(r)}async removeDevice(){}markOnline(e){if(this.online===e)return;let t={online:e,lastChangedAt:Date.now()};this.runtimeState.setCapState(`device-status`,t)}get sourceInfo(){if(this._sourceInfoCache)return this._sourceInfoCache;let e=Ad(this.ctx.deviceMeta.metadata)??Ed({stableId:this.stableId,addonId:this.ctx.deviceMeta.addonId});return this._sourceInfoCache=Object.freeze({...e}),this._sourceInfoCache}get sourceId(){return this.sourceInfo.id}async updateSourceInfo(e){let t=Dd(this.sourceInfo,e);this._sourceInfoCache=Object.freeze({...t});let n=this.ctx.api?.deviceManager?.setMetadata;if(n)try{await n.mutate({deviceId:this.id,patch:{[kd]:t}})}catch{}this.ctx.eventBus.emit(De(`device.source-info-changed`,{type:`device`,id:this.stableId},{deviceId:this.id,sourceInfo:t}))}async refreshFeatures(){let e=this.ctx.api?.deviceManager?.registerDevice;if(e)try{await e.mutate({addonId:this.ctx.deviceMeta.addonId,stableId:this.stableId,id:this.id,type:this.type,name:this.name,parentDeviceId:this.parentDeviceId,features:[...this.features],config:{}})}catch{}}getCapSlice(e){return this.runtimeState.getCapState(e.name)??null}setCapSlice(e,t){this.runtimeState.setCapState(e.name,t)}sliceProxy(e){return new Proxy({},{get:(t,n)=>this.runtimeState.getCapState(e.name)?.[n],set:(t,n,r)=>(this.runtimeState.patchCapState(e.name,{[n]:r}),!0),has:(t,n)=>{let r=this.runtimeState.getCapState(e.name);return r?n in r:!1},ownKeys:()=>{let t=this.runtimeState.getCapState(e.name);return t?Object.keys(t):[]},getOwnPropertyDescriptor:(t,n)=>{let r=this.runtimeState.getCapState(e.name);if(!(!r||!(n in r)))return{configurable:!0,enumerable:!0,value:r[n]}}})}getSettingsUISchema(){return{sections:[]}}async applySettingsPatch(e){await this.config.setAll(e)}async onProbe(){let e=this.runtimeState.getCapState(`feature-probe`)??{flags:{},deviceType:null,model:null,channelCount:null,lastProbedAt:0,lastFetchedAt:0};this.runtimeState.setCapState(`feature-probe`,{...e,lastProbedAt:Date.now()})}async onActivate(){}async reprobe(){this._kernelReprobe?await this._kernelReprobe():await this.onProbe()}_kernelReprobe;getAccessoryChildren(){return[]}getProbeFlags(){return this.runtimeState.getCapState(`feature-probe`)?.flags??{}}hasProbed(){return(this.runtimeState.getCapState(`feature-probe`)?.lastProbedAt??0)>0}},mj=[1e4,3e4,9e4],hj=4;function gj(e,t){return new Promise(n=>{if(t.aborted){n();return}let r=()=>{clearTimeout(i),n()},i=setTimeout(()=>{t.removeEventListener(`abort`,r),n()},e);i.unref?.(),t.addEventListener(`abort`,r,{once:!0})})}async function _j(e,t,n){let r=[...e],i=Math.max(1,Math.min(t,r.length));await Promise.all(Array.from({length:i},async()=>{for(;;){let e=r.shift();if(e===void 0)return;await n(e)}}))}var vj=class{#e;#t;#n;#r;#i;#a;#o=new AbortController;constructor(e){this.#e=e.logger,this.#t=e.attempt,this.#n=e.onPermanentFailure,this.#r=e.delaysMs??mj,this.#i=e.concurrency??4,this.#a=e.now??Date.now}cancel(){this.#o.abort()}async run(e){let t=e.map(e=>({saved:e.saved,lastError:e.error,attempts:1}));for(let e=0;e<this.#r.length&&!(t.length===0||this.#o.signal.aborted||(await gj(this.#r[e]??0,this.#o.signal),this.#o.signal.aborted));e+=1)t=await this.#s(t,e);if(this.#o.signal.aborted)return[];let n=t.map(e=>({deviceId:e.saved.id,stableId:e.saved.stableId,type:String(e.saved.type),attempts:e.attempts,lastError:e.lastError,failedAt:this.#a()}));for(let e of n)this.#n(e);return n}async#s(e,t){let n=[],r=e.filter(e=>e.saved.parentDeviceId===null),i=e.filter(e=>e.saved.parentDeviceId!==null);for(let e of[r,i])await _j(e,this.#i,async e=>{if(this.#o.signal.aborted){n.push(e);return}let r=e.attempts+1;try{await this.#t(e.saved),this.#e.info(`Device restored on retry`,{tags:{deviceId:e.saved.id,stableId:e.saved.stableId},meta:{attempt:r}})}catch(i){let a=i instanceof Error?i.message:String(i),o=this.#r.length-(t+1);this.#e.warn(`Device restore retry failed`,{tags:{deviceId:e.saved.id,stableId:e.saved.stableId},meta:{attempt:r,remainingRetries:o,error:a}}),n.push({saved:e.saved,lastError:a,attempts:r})}});return n}};function yj(e,t){let n={};for(let t of e.config.entries())n[t.key]=t.value;return{id:e.id,stableId:e.stableId,addonId:t,type:String(e.type),name:e.name,parentDeviceId:e.parentDeviceId,online:e.online,features:[...e.features],config:n,sourceInfo:e.sourceInfo}}var bj=class extends Fe{async onInitialize(){return this.ctx.logger.info(`${this.providerName} Provider initialized`),[{capability:uf,provider:this}]}async onShutdown(){this.cancelRestoreRetries();let e=await this.ctx.kernel.devices?.getAll()??[];for(let t of e)try{await this.ctx.kernel.devices?.decommission(t.id)}catch(e){this.ctx.logger.warn(`${this.providerName}: decommission failed`,{tags:{deviceId:t.id,stableId:t.stableId},meta:{error:e instanceof Error?e.message:String(e)}})}this.ctx.logger.info(`${this.providerName} Provider shut down`,{meta:{decommissionedCount:e.length}})}async start(){}async stop(){}async getStatus(){let e=await this.ctx.kernel.devices?.getAll()??[],t=this.restoreFailureSummary();return t===null?{connected:!0,deviceCount:e.length}:{connected:!0,deviceCount:e.length,error:t}}async getDevices(){return(await this.ctx.kernel.devices?.getAll()??[]).map(e=>({id:e.stableId,name:e.name,type:String(e.type)}))}async supportsDiscovery(){return!1}async discoverDevices(e){return[]}async getDiscoveryParamsSchema(){return null}async getManualCreationType(){return await this.supportsManualCreation()?{deviceType:Object.values(D).find(e=>this.deviceClasses[e]!==void 0)??null}:{deviceType:null}}async adoptDiscoveredDevice(e){throw Error(`${this.providerName} provider does not support discovery-based adoption`)}async supportsManualCreation(){return!0}async getChildCreationSchema(e){return this.onGetCreationSchema(e.type)}async createDevice(e){let t=await this.onCreateDevice(e.type,e.config),n=this.deviceClasses[t.meta.type];if(!n)throw Error(`${this.providerName} provider: no device class registered for type "${t.meta.type}" — add it to the deviceClasses map`);let r=this.generateStableId(t.meta.type,t.config),i=await this.ctx.kernel.devices.create(r,n,t.config,null,t.meta);if(t.onAfterCreate)try{await t.onAfterCreate(i)}catch(e){this.ctx.logger.warn(`createDevice: onAfterCreate hook threw — device is already registered`,{tags:{deviceId:i.id,stableId:r},meta:{error:e instanceof Error?e.message:String(e)}})}return this.toSummary(i)}generateStableId(e,t){return`${this.addonId}-${Date.now()}`}async testCreationField(e){return{status:`ok`,labels:[`probe not implemented`]}}async restoreDevices(e){let t=await this.onRestoreDevices(e);if(e.length===0)return;if(t&&t.failedCount>0){this.ctx.logger.warn(`Restored ${t.restoredCount}/${e.length} ${this.providerName} device(s) — ${t.failedCount} failed, bounded retry scheduled`);return}let n=t?t.restoredCount:e.length;this.ctx.logger.info(`Restored ${n} ${this.providerName} device(s)`)}restoreRetryDelaysMs=mj;restoreRetryConcurrency=4;_restoreRetryScheduler=null;_restoreRetryCompletion=null;_permanentRestoreFailures=new Map;get restoreRetryCompletion(){return this._restoreRetryCompletion}get permanentRestoreFailures(){return[...this._permanentRestoreFailures.values()]}restoreFailureSummary(){if(this._permanentRestoreFailures.size===0)return null;let e=[...this._permanentRestoreFailures.keys()].join(`, `);return`${this._permanentRestoreFailures.size} device(s) permanently failed restore (deviceIds: ${e}) — restart the ${this.providerName} provider to retry`}quarantineConfiglessTopLevelRestores=!0;isUnrestorableShell(e){if(!this.quarantineConfiglessTopLevelRestores||e.parentDeviceId!==null)return!1;let t=e.config;return t===void 0?!1:Object.keys(t).length===0}quarantineShell(e){this._permanentRestoreFailures.set(e.id,{deviceId:e.id,stableId:e.stableId,type:e.type,attempts:0,lastError:`persisted row has no configuration`,failedAt:Date.now()}),this.ctx.logger.error(`Persisted device row has NO configuration — quarantined: not restored, not retried. Remove it (deviceManager.removeDevice) or re-add the device.`,{tags:{deviceId:e.id,stableId:e.stableId},meta:{type:e.type,provider:this.providerName}})}cancelRestoreRetries(){this._restoreRetryScheduler?.cancel(),this._restoreRetryScheduler=null}recordPermanentRestoreFailure(e){this._permanentRestoreFailures.set(e.deviceId,e),this.ctx.logger.error(`Device restore permanently failed — its capabilities will not register until the provider restarts`,{tags:{deviceId:e.deviceId,stableId:e.stableId},meta:{type:e.type,attempts:e.attempts,error:e.lastError}})}scheduleRestoreRetries(e,t){let n=new vj({logger:this.ctx.logger,delaysMs:this.restoreRetryDelaysMs,concurrency:this.restoreRetryConcurrency,attempt:t,onPermanentFailure:e=>this.recordPermanentRestoreFailure(e)});this._restoreRetryScheduler=n,this._restoreRetryCompletion=n.run(e).then(()=>void 0).catch(e=>{this.ctx.logger.error(`Restore retry scheduler crashed`,{meta:{error:e instanceof Error?e.message:String(e)}})})}async reloadDevice(e){let{stableId:t}=e,n=this.ctx.kernel.devices;if(!n)throw Error(`${this.providerName}: kernel.devices unavailable — cannot reload`);let r=(await n.getAll()).find(e=>e.stableId===t);r&&await n.decommission(r.id);let{id:i}=await this.ctx.api.deviceManager.allocateDeviceId.mutate({addonId:this.addonId,stableId:t}),a=await this.ctx.api.deviceManager.loadMeta.query({deviceId:i});if(a===null)throw Error(`${this.providerName}: no persisted meta for "${t}" (id ${i}) — cannot reload`);let o=Object.values(D).find(e=>e===a.type),s=o===void 0?void 0:this.deviceClasses[o];if(!s)throw Error(`${this.providerName}: no device class for type "${a.type}" — "${t}" is an accessory child; reload its parent instead`);await n.create(t,s,{},a.parentDeviceId??null);let c=await this.ctx.api.deviceManager.listPersistedByAddon.query({addonId:this.addonId});for(let e of c){if(e.parentDeviceId!==i)continue;let t=Object.values(D).find(t=>t===e.type),r=t===void 0?void 0:this.deviceClasses[t];if(r)try{await n.create(e.stableId,r,{},i)}catch(t){this.ctx.logger.warn(`reloadDevice: failed to re-create first-class child`,{tags:{deviceId:e.id,stableId:e.stableId},meta:{parentDeviceId:i,error:t instanceof Error?t.message:String(t)}})}}return this.ctx.logger.info(`device reloaded in place from persisted rows`,{tags:{deviceId:i},meta:{stableId:t,type:a.type}}),{deviceId:i}}async healSavedConfig(e,t){}async onRestoreDevices(e){let t=new Set,n=[],r=new Set((await this.ctx.kernel.devices.getAll()).map(e=>e.stableId)),i=async n=>{if(t.has(n.id))return;if(r.has(n.stableId)){this.ctx.logger.debug(`Restore row already live — not dialled again`,{tags:{deviceId:n.id,stableId:n.stableId}}),t.add(n.id);return}let i=this.deviceClasses[n.type];if(!i)throw Error(`no device class registered for type "${n.type}"`);if(n.parentDeviceId!==null&&!t.has(n.parentDeviceId))throw Error(`parent device ${n.parentDeviceId} not restored`);await this.healSavedConfig(n,e);try{await this.ctx.kernel.devices.create(n.stableId,i,{},n.parentDeviceId)}catch(e){if(!(await this.ctx.kernel.devices.getAll()).some(e=>e.stableId===n.stableId))throw e;this.ctx.logger.debug(`Restore row came to life during its own dial — kept`,{tags:{deviceId:n.id,stableId:n.stableId}})}t.add(n.id)},a=e.filter(e=>e.parentDeviceId===null),o=async e=>{if(!this.deviceClasses[e.type]){this.ctx.logger.warn(`No device class registered for restored type — skipping`,{tags:{deviceId:e.id,stableId:e.stableId},meta:{type:e.type}});return}if(this.isUnrestorableShell(e)){this.quarantineShell(e);return}try{await i(e)}catch(t){let r=t instanceof Error?t.message:String(t);this.ctx.logger.warn(`Failed to restore device — bounded retry scheduled`,{tags:{deviceId:e.id,stableId:e.stableId},meta:{type:e.type,attempt:1,error:r}}),n.push({saved:e,error:r})}};await Promise.all(a.map(e=>o(e)));let s=new Set(n.map(e=>e.saved.id)),c=e.filter(e=>e.parentDeviceId!==null);for(let e of c)if(this.deviceClasses[e.type]&&e.parentDeviceId!==null){if(t.has(e.parentDeviceId)){try{await i(e)}catch(t){let r=t instanceof Error?t.message:String(t);this.ctx.logger.warn(`Failed to restore hub-adopted child — bounded retry scheduled`,{tags:{deviceId:e.id,stableId:e.stableId,parentDeviceId:e.parentDeviceId},meta:{type:e.type,attempt:1,error:r}}),n.push({saved:e,error:r})}continue}if(s.has(e.parentDeviceId)){this.ctx.logger.warn(`Hub-adopted child deferred — parent failed initial restore`,{tags:{deviceId:e.id,stableId:e.stableId,parentDeviceId:e.parentDeviceId},meta:{type:e.type}}),n.push({saved:e,error:`parent device ${e.parentDeviceId} not restored`});continue}}return n.length>0&&this.scheduleRestoreRetries(n,i),{restoredCount:t.size,failedCount:n.length}}toSummary(e){return yj(e,this.addonId)}},xj=360*6e4;function Sj(e){let t=e.status;if(!t)return`sleeping`;if(t.sleeping!==!0)return`awake`;let n=t.lastContactAt;if(typeof n!=`number`||n<=0)return`sleeping`;let r=e.unreachableAfterMs??216e5;return e.nowMs-n>r?`unreachable`:`sleeping`}function Cj(e){return e===`unreachable`}var wj=[`media-player`,`alarm-panel`,`thermostat`,`climate`,`humidifier`,`water-heater`,`lock`,`cover`,`valve`,`fan`,`vacuum`,`lawn-mower`,`light`,`switch`,`siren`,`button`,`control`,`notifier`,`script`,`automation`,`update`,`presence`,`weather`,`image`,`sensor`],Tj=[`contact-sensor`,`motion-sensor`,`occupancy-sensor`,`smoke-sensor`,`co-sensor`,`gas-sensor`,`leak-sensor`,`vibration-sensor`,`tamper-sensor`,`sound-sensor`];function Ej(e){if(e===void 0)return Tj.length;let t=Tj.indexOf(e);return t===-1?Tj.length:t}function Dj(e){let t=wj.indexOf(e);return t===-1?wj.length:t}function Oj(e,t,n){if(t!=null){let n=e.find(e=>e.stableId===t)??e.find(e=>e.entityId!==void 0&&e.entityId===t);if(n!==void 0)return n}let r=e=>n!==void 0&&n.length>0&&e.name!==void 0&&e.name.toLowerCase()===n.toLowerCase()?0:1;return[...e].toSorted((e,t)=>Ej(e.role)-Ej(t.role)||r(e)-r(t)||Dj(e.type)-Dj(t.type))[0]??null}var kj=`fixed`;function Aj(e){let t=e??`hub`;return t.includes(`/`)?t.split(`/`)[0]??`hub`:t}var jj=32,Mj=class{ports;constructor(e){let t=e.addonId;if(typeof t!=`string`||t.length===0)throw Error(`DeclaredDevices: addonId must be the declaring addon's id, got ${JSON.stringify(t)}. On an addon context it is \`ctx.id\` — there is no \`ctx.addonId\`.`);this.ports=e}async reconcile(e){if((e.placement??`hub`)===`hub`){let e=Aj(this.ports.localNodeId);if(e!==`hub`)return this.ports.logger.info(`declared devices are hub-owned — skipping on this node`,{meta:{nodeId:e,rawNodeId:this.ports.localNodeId??null}}),{integrationId:null,devices:[],removed:[],owned:!1}}let t=e.integrationId??await this.ensureIntegration(e.integrationName),n=await this.readIndex(),r=await this.readLiveByStableId(),i=[];for(let a of e.devices){let e=await this.applyDeclaration(a,t,n,r);e!==null&&i.push(e)}return{integrationId:t,devices:i,removed:await this.sweepWithdrawn(e.devices,t,n),owned:!0}}async ensureIntegration(e){let t=await this.ports.getIntegration(this.ports.addonId);if(t===null){let t=await this.ports.createIntegration({addonId:this.ports.addonId,name:e,info:{[kj]:!0}});return this.ports.logger.info(`declared a fixed integration`,{meta:{integrationId:t.id,name:e}}),t.id}return t.info?.fixed!==!0&&(await this.ports.updateIntegration({id:t.id,info:{[kj]:!0}}),this.ports.logger.info("re-asserted `fixed` on a declared integration",{meta:{integrationId:t.id}})),t.id}async readIndex(){let e=await this.ports.listOwnDevices();return new Map(e.map(e=>[e.stableId,e]))}async readLiveByStableId(){try{let e=await this.ports.devices.getAll();return new Map(e.map(e=>[e.stableId,e]))}catch(e){return this.ports.logger.warn(`could not read live devices — falling back to adopt-by-row`,{meta:{error:e instanceof Error?e.message:String(e)}}),new Map}}async applyDeclaration(e,t,n,r){try{let i=r.get(e.stableId);if(i!==void 0)return{stableId:e.stableId,deviceId:i.id,device:i,created:!1};let a=n.get(e.stableId);if(a===void 0&&(a=(await this.readIndex()).get(e.stableId),a!==void 0&&this.ports.logger.warn(`device index disagreed with itself — adopting instead of re-creating`,{tags:{deviceId:a.id},meta:{stableId:e.stableId,addonId:this.ports.addonId}})),a!==void 0){let n=await this.ports.devices.create(e.stableId,e.DeviceClass,{},null,void 0);return this.ports.logger.info(`declared device adopted`,{tags:{deviceId:n.id},meta:{stableId:e.stableId,integrationId:t}}),{stableId:e.stableId,deviceId:n.id,device:n,created:!1}}let o=await this.ports.devices.create(e.stableId,e.DeviceClass,e.config??{},null,{type:e.type,name:e.name,integrationId:t,...e.role===void 0?{}:{role:e.role}});return this.ports.logger.info(`declared device created`,{tags:{deviceId:o.id},meta:{stableId:e.stableId,integrationId:t}}),{stableId:e.stableId,deviceId:o.id,device:o,created:!0}}catch(t){return this.ports.logger.warn(`a declared device could not be brought up`,{meta:{stableId:e.stableId,error:t instanceof Error?t.message:String(t)}}),null}}async sweepWithdrawn(e,t,n){let r=new Set(e.map(e=>e.stableId)),i=[...n.values()].filter(e=>e.integrationId===t&&!r.has(e.stableId));if(i.length===0)return[];if(i.length>32)return this.ports.logger.warn(`withdrawal sweep exceeded its bound — removing nothing`,{meta:{integrationId:t,candidates:i.length,bound:32}}),[];let a=[];for(let e of i)try{await this.ports.devices.remove(e.id),a.push(e.id),this.ports.logger.info(`declared device removed — its declaration was withdrawn`,{tags:{deviceId:e.id},meta:{stableId:e.stableId,integrationId:t}})}catch(t){this.ports.logger.warn(`a withdrawn declared device could not be removed`,{tags:{deviceId:e.id},meta:{stableId:e.stableId,error:t instanceof Error?t.message:String(t)}})}return a}},Nj={[D.Cover]:`cover`,[D.Valve]:`valve`,[D.Humidifier]:`humidifier`,[D.WaterHeater]:`water-heater`,[D.Camera]:`dummy`,[D.Hub]:`dummy`,[D.Switch]:`switch`,[D.Siren]:`switch`,[D.Light]:`light`,[D.Fan]:`fan`,[D.Sensor]:`sensor`,[D.Thermostat]:`thermostat`,[D.Climate]:`climate`,[D.Button]:`button`,[D.EventEmitter]:`dummy`,[D.Update]:`update`,[D.Generic]:`dummy`,[D.Notifier]:`dummy`,[D.Script]:`script`,[D.Automation]:`automation`,[D.Lock]:`lock`,[D.MediaPlayer]:`media-player`,[D.AlarmPanel]:`alarm`,[D.Control]:`control`,[D.Presence]:`sensor`,[D.Weather]:`weather`,[D.Vacuum]:`vacuum`,[D.LawnMower]:`lawn-mower`,[D.Container]:`dummy`,[D.Image]:`image`,[D.PetFeeder]:`pet-feeder`},Pj=new Set(Object.values(D));function Fj(e){return Pj.has(e)?Nj[e]:null}var Ij=`motion-trigger`;function Lj(e){return e.includes(Ij)}var Rj=[`temperature-sensor`,`humidity-sensor`,`ambient-light-sensor`,`numeric-sensor`,`enum-sensor`];function zj(e){let t=new Set(e.features);switch(e.type){case D.Cover:return{kind:`cover`};case D.Valve:return{kind:`valve`};case D.Lock:return{kind:`lock`};case D.AlarmPanel:return{kind:`alarm`};case D.Light:return t.has(`brightness`)?{kind:`brightness`}:{kind:`switch`};case D.Switch:case D.Siren:return{kind:`switch`};case D.Sensor:case D.Presence:{let e=Rj.find(e=>t.has(e));return e?{kind:`sensor`,sensorFeature:e}:{kind:`none`}}default:return{kind:`none`}}}var Bj={"temperature-sensor":{capKey:`temperatureSensor`,field:`celsius`,fallbackUnit:`°C`},"humidity-sensor":{capKey:`humiditySensor`,field:`percent`,fallbackUnit:`%`},"ambient-light-sensor":{capKey:`ambientLightSensor`,field:`lux`,fallbackUnit:`lx`},"numeric-sensor":{capKey:`numericSensor`,field:`value`}};function Vj(e){return e!==null&&(typeof e==`object`||typeof e==`function`)}function Hj(e,t){if(!Vj(e))return null;let n=e[t];if(!Vj(n))return null;let r=n.mutate;return typeof r==`function`?r:null}function Uj(e,t){return!e||e.length===0?!1:e.includes(t.when.hasFeature)}var Wj={id:`battery`,label:`Battery-operated camera`,when:{hasFeature:Pt.BatteryOperated},defaults:{audioMode:`disabled`,detectionMode:`on-motion`},settings:{}},Gj=[Wj];function Kj(e){for(let t of Gj)if(Uj(e,t))return t;return null}function qj(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function Jj(e,t){let n=t.split(`.`),r=e;for(let e of n){if(!qj(r))return;r=r[e]}return r}function Yj(e,t,n){let r=t.indexOf(`.`);if(r===-1)return{...e,[t]:n};let i=t.slice(0,r),a=t.slice(r+1),o=e[i],s=qj(o)?o:{};return{...e,[i]:Yj(s,a,n)}}var Xj=3e4,Zj=3,Qj=1e4;async function $j(e,t,n){let r,i=new Promise((e,i)=>{r=setTimeout(()=>i(Error(`${n} timed out after ${String(t)}ms`)),t)});try{return await Promise.race([e,i])}finally{r!==void 0&&clearTimeout(r)}}function eM(e){let t=e.intervalMs??3e4,n=e.failuresToOffline??3,r=e.probeTimeoutMs??1e4,i=e.runImmediately??!0,a=!1,o=!1,s=0,c,l=async()=>{if(!a&&!o&&!(e.isEnabled&&!e.isEnabled())){o=!0;try{let t=await $j(Promise.resolve().then(e.probe),r,`reachability probe`);if(a)return;t?(s=0,e.setOnline(!0)):u(`probe resolved unreachable`)}catch(e){if(a)return;u(e instanceof Error?e.message:`probe threw`)}finally{o=!1}}},u=t=>{s+=1,e.logger?.debug(`reachability probe failed`,{reason:t,consecutiveFailures:s,failuresToOffline:n}),s>=n&&e.setOnline(!1)};return c=setInterval(()=>{l()},t),typeof c==`object`&&c&&`unref`in c&&c.unref(),i&&l(),{stop:()=>{a||(a=!0,c!==void 0&&clearInterval(c),c=void 0)}}}var tM=`lastFetchedAt`,nM=6e4,rM=10*6e4;function iM(e){let{runtimeState:t,cap:n,ownDeviceId:r,refresh:i,staleMs:a,empty:o,logger:s}=e,c=e.refreshMissCooldownMs??6e4,l=e.staleRead??`await-refresh`,u=0,d=null,f=()=>{let e=t.getCapState(n.name)?.[tM];return typeof e==`number`?e:0},p=e=>{u=Date.now()+c,s?.warn(`${n.name}: refresh did not land — serving the last slice and not re-reading the camera for ${String(c)}ms`,{tags:{deviceId:r},meta:{cooldownMs:c,error:e===void 0?null:e instanceof Error?e.message:String(e)}})},ee=async e=>{try{await i()}catch(e){throw p(e),e}if(f()>e){u!==0&&(u=0,s?.info(`${n.name}: refresh landed again — resuming normal polling`,{tags:{deviceId:r}}));return}p(void 0)},te=e=>{let t=d;if(t!==null)return t;let n=ee(e).catch(()=>void 0).finally(()=>{d=null});return d=n,n},ne=async()=>{let e=t.getCapState(n.name),r=f();if(e&&Date.now()-r<=a){u=0;return}if(!(Date.now()<u)){if(l===`serve-and-revalidate`){if(d!==null)return;if(e&&r>0){te(r);return}await te(r);return}await ee(r)}},re=()=>{let e=t.getCapState(n.name);if(!e)return o();let{[tM]:r,...i}=e;return i};return{ensureFresh:ne,getStatus:async({deviceId:e})=>{if(e!==r)throw Error(`${n.name}: deviceId mismatch, expected ${r}, got ${e}`);return await ne(),re()}}}function aM(e){let t=e;for(;t instanceof fe||t instanceof me||t instanceof ee;)t=t.unwrap();return t}function oM(e){let t=aM(e);return t instanceof ue?{kind:`enum`,enumValues:t.options}:t instanceof ne?{kind:`number`}:t instanceof re?{kind:`string`}:t instanceof ae?{kind:`boolean`}:null}function sM(e,t=``){let n=aM(e);if(!(n instanceof se))return[];let r=[],i=n.shape;for(let[e,n]of Object.entries(i)){let i=t?`${t}.${e}`:e,a=aM(n);if(a instanceof se){r.push(...sM(a,i));continue}let o=oM(n);o&&r.push({path:i,kind:o.kind,...o.enumValues?{enumValues:o.enumValues}:{}})}return r}function cM(e){return sM(e.itemSchema).filter(t=>t.path!==e.keyField).map(e=>({...e,item:!0}))}var lM=`device.state-changed`,uM=`capability.binding-changed`,dM=`device.registered`,fM=`device.unregistered`,pM=`device.updated`,mM=class{api;stateMirror=new Map;bindings=new Map;devices=new Map;handleListeners=new Map;globalStateListeners=new Set;capListeners=new Map;deviceListeners=new Map;addedListeners=new Set;removedListeners=new Set;pendingWaits=new Set;stateSource;bridges=[];initialized=!1;initPromise=null;constructor(e){this.api=e,this.stateSource=qt(this.stateMirror,this.handleListeners,this.api)}async init(e=15e3){if(!this.initialized){if(this.initPromise)return this.initPromise;this.initPromise=(async()=>{let t=(t,n)=>Number.isFinite(e)?new Promise((r,i)=>{let a=setTimeout(()=>i(Error(`SystemMirror.init: '${n}' timed out after ${e}ms`)),e);t.then(e=>{clearTimeout(a),r(e)},e=>{clearTimeout(a),i(e)})}):t,[n,r,i]=await Promise.all([t(this.api.deviceManager.getAllBindings.query({}),`deviceManager.getAllBindings`),t(this.api.deviceState.getAllSnapshots.query({}),`deviceState.getAllSnapshots`),t(this.api.deviceManager.listAll.query({}),`deviceManager.listAll`)]);for(let e of n)this.bindings.set(e.deviceId,e);for(let[e,t]of Object.entries(r)){let n=Number(e);if(!Number.isFinite(n))continue;let r=new Map;for(let[e,n]of Object.entries(t))r.set(e,n);this.stateMirror.set(n,r)}for(let e of i)this.devices.set(e.id,e);try{this.subscribeBus()}catch{}this.initialized=!0})();try{await this.initPromise}finally{this.initPromise=null}}}isReady(){return this.initialized}async awaitReady(){if(!this.initialized)return this.initPromise?this.initPromise:this.init()}dispose(){for(let e of this.bridges)try{e.unsubscribe()}catch{}this.bridges=[],this.handleListeners.clear(),this.globalStateListeners.clear(),this.capListeners.clear(),this.deviceListeners.clear(),this.addedListeners.clear(),this.removedListeners.clear(),this.pendingWaits.clear(),this.initialized=!1}getDeviceById(e){let t=this.bindings.get(e);return t?Yt(this.api,t,{stateSource:this.stateSource}):null}getDeviceByName(e){for(let t of this.devices.values())if(t.name===e)return this.getDeviceById(t.id);return null}getDeviceByStableId(e){for(let t of this.devices.values())if(t.stableId===e)return this.getDeviceById(t.id);return null}getDevicesByAddon(e){return this.query({addonId:e})}getDevicesByType(e){return this.query({type:e})}getDeviceInfo(e){return this.devices.get(e)??null}getAllDevices(){let e=[];for(let t of this.bindings.keys()){let n=this.getDeviceById(t);n&&e.push(n)}return e}filterByCap(e){return this.query({caps:e})}query(e={}){let t=[];for(let[n,r]of this.bindings){let i=this.devices.get(n);if(e.id!==void 0&&!hM(n,e.id)||e.stableId!==void 0&&(!i||!hM(i.stableId,e.stableId))||e.addonId!==void 0&&(!i||!hM(i.addonId,e.addonId))||e.type!==void 0&&(!i||!hM(i.type,e.type)))continue;if(e.caps!==void 0){let t=gM(e.caps),n=new Set(r.entries.map(e=>e.capName));if(!t.every(e=>n.has(e)))continue}if(e.anyCap!==void 0){let t=gM(e.anyCap),n=new Set(r.entries.map(e=>e.capName));if(!t.some(e=>n.has(e)))continue}if(e.name!==void 0&&(!i||!_M(i.name,e.name))||e.online!==void 0&&(!i||i.online!==e.online))continue;if(e.parentDeviceId!==void 0){if(!i)continue;let t=e.parentDeviceId;if((i.parentDeviceId??null)!==t)continue}if(e.feature!==void 0&&(!i||!gM(e.feature).every(e=>i.features.includes(e)))||e.isCamera!==void 0&&(!i||i.isCamera!==e.isCamera))continue;let a=this.getDeviceById(n);if(a){if(e.where&&i){if(!e.where(i,a))continue}else if(e.where&&!i)continue;t.push(a)}}return t}whereState(e,t){let n=[];for(let[r,i]of this.stateMirror){let a=i.get(e);if(!a||!t(a,r))continue;let o=this.getDeviceById(r);o&&n.push(o)}return n}mapState(e,t){let n=[];for(let[r,i]of this.stateMirror){let a=i.get(e);a&&n.push(t(a,r))}return n}findState(e,t){for(let[n,r]of this.stateMirror){let i=r.get(e);if(i&&t(i,n))return this.getDeviceById(n)}return null}countByCap(e){let t=0;for(let n of this.bindings.values())n.entries.some(t=>t.capName===e)&&t++;return t}countByState(e,t){let n=0;for(let[r,i]of this.stateMirror){let a=i.get(e);a&&t(a,r)&&n++}return n}listen(e){return this.globalStateListeners.add(e),()=>{this.globalStateListeners.delete(e)}}listenCap(e,t){let n=this.capListeners.get(e);return n||(n=new Set,this.capListeners.set(e,n)),n.add(t),()=>{n.delete(t),n.size===0&&this.capListeners.delete(e)}}listenDevice(e,t){let n=this.deviceListeners.get(e);return n||(n=new Set,this.deviceListeners.set(e,n)),n.add(t),()=>{n.delete(t),n.size===0&&this.deviceListeners.delete(e)}}onDeviceAdded(e){return this.addedListeners.add(e),()=>{this.addedListeners.delete(e)}}onDeviceRemoved(e){return this.removedListeners.add(e),()=>{this.removedListeners.delete(e)}}waitForState(e,t,n,r=3e4){return new Promise((i,a)=>{let o=(()=>{let r=this.stateMirror.get(e)?.get(t);return r&&n(r)?r:null})();if(o){i(o);return}let s=null,c=this.listenDevice(e,(e,r,a)=>{r===t&&a&&n(a)&&(s&&clearTimeout(s),c(),i(a))});Number.isFinite(r)&&(s=setTimeout(()=>{c(),a(Error(`waitForState timed out after ${r}ms (deviceId=${e}, capName=${t})`))},r))})}waitForDevice(e,t=3e4){return new Promise((n,r)=>{let i=this.getDeviceById(e);if(i){n(i);return}let a=null,o=this.onDeviceAdded(t=>{if(t!==e)return;let r=this.getDeviceById(t);r&&(a&&clearTimeout(a),o(),n(r))});Number.isFinite(t)&&(a=setTimeout(()=>{o(),r(Error(`waitForDevice timed out after ${t}ms (deviceId=${e})`))},t))})}async forEachCap(e,t){for(let n of this.filterByCap(e))await t(n)}async invokeCap(e,t,n,r={}){let i=this.filterByCap(e),a=Math.max(1,r.parallelism??i.length),o=[];for(let r=0;r<i.length;r+=a){let s=i.slice(r,r+a),c=await Promise.allSettled(s.map(async r=>{let i=r[e];if(!i||typeof i[t]!=`function`)throw Error(`device '${r.deviceId}' does not expose '${e}.${t}'`);return await i[t](n)}));for(let e=0;e<c.length;e++){let t=s[e],n=c[e];n.status===`fulfilled`?o.push({deviceId:t.deviceId,ok:!0,result:n.value}):o.push({deviceId:t.deviceId,ok:!1,error:n.reason})}}return o}summary(){let e={},t={},n={},r=0,i=0;for(let t of this.bindings.values())for(let n of t.entries)e[n.capName]=(e[n.capName]??0)+1;for(let e of this.devices.values())t[e.addonId]=(t[e.addonId]??0)+1,n[e.type]=(n[e.type]??0)+1,e.online?r++:i++;return{totalDevices:this.bindings.size,online:r,offline:i,byCap:e,byAddon:t,byType:n,statedDevices:this.stateMirror.size}}dump(e){let t=e=>{let t=this.devices.get(e)??null,n=this.bindings.get(e)??null,r={},i=this.stateMirror.get(e);if(i)for(let[e,t]of i)r[e]={...t};return{deviceId:e,info:t,binding:n?{...n,entries:n.entries.map(e=>({...e}))}:null,state:r}};if(e!==void 0)return t(e);let n=[];for(let e of this.bindings.keys())n.push(t(e));return n}getRawMirror(){return this.stateMirror}getSystemState(){let e=new Map;for(let[t,n]of this.stateMirror){let r=new Map;for(let[e,t]of n)r.set(e,{...t});e.set(t,r)}return e}subscribeBus(){if(!this.api.live?.onEvent)return;let e=this.api.live.onEvent;this.bridges.push(e.subscribe({category:lM},{onData:e=>{let t=e.data;!t||typeof t.deviceId!=`number`||typeof t.capName!=`string`||this.applyStateUpdate(t.deviceId,t.capName,t.slice)}})),this.bridges.push(e.subscribe({category:uM},{onData:e=>{let t=e.data,n=typeof t?.deviceId==`number`?t.deviceId:t?.source?.type===`device`&&typeof t.source.id==`number`?t.source.id:null;n!==null&&this.refreshBinding(n)}})),this.bridges.push(e.subscribe({category:dM},{onData:e=>{let t=e.data;typeof t?.deviceId==`number`&&this.refreshDeviceMetadata(t.deviceId,`added`)}})),this.bridges.push(e.subscribe({category:fM},{onData:e=>{let t=e.data;typeof t?.deviceId==`number`&&this.applyDeviceRemoval(t.deviceId)}})),this.bridges.push(e.subscribe({category:pM},{onData:e=>{let t=e.data;typeof t?.deviceId==`number`&&this.refreshDeviceMetadata(t.deviceId,`updated`)}}))}applyStateUpdate(e,t,n){let r=this.stateMirror.get(e);r||(r=new Map,this.stateMirror.set(e,r)),n===void 0?r.delete(t):r.set(t,n);let i=`${e}:${t}`,a=this.handleListeners.get(i);if(a)for(let e of a)try{e(n)}catch{}for(let r of this.globalStateListeners)try{r(e,t,n)}catch{}let o=this.capListeners.get(t);if(o)for(let t of o)try{t(e,n)}catch{}let s=this.deviceListeners.get(e);if(s)for(let r of s)try{r(e,t,n)}catch{}}applyDeviceRemoval(e){let t=this.devices.get(e)??null;this.bindings.delete(e),this.devices.delete(e),this.stateMirror.delete(e);for(let n of this.removedListeners)try{n(e,t)}catch{}}async refreshBinding(e){try{let t=await this.api.deviceManager.getBindings.query({deviceId:e});if(t.entries.length>0){this.bindings.set(e,t);return}if(await this.api.deviceManager.getDevice.query({deviceId:e})===null){this.applyDeviceRemoval(e);return}this.bindings.set(e,t)}catch{}}async refreshDeviceMetadata(e,t){try{let n=await this.api.deviceManager.getDevice.query({deviceId:e});if(!n)return;let r=!this.devices.has(e);if(this.devices.set(e,n),t===`added`&&r){await this.refreshBinding(e);for(let t of this.addedListeners)try{t(e,n)}catch{}}}catch{}}};function hM(e,t){return Array.isArray(t)?t.includes(e):e===t}function gM(e){return Array.isArray(e)?e:[e]}function _M(e,t){return typeof t==`string`?e===t:t instanceof RegExp?t.test(e):`exact`in t?e===t.exact:`contains`in t?e.toLowerCase().includes(t.contains.toLowerCase()):!1}function vM(e){return e.def}function yM(e){return e}function bM(e,t=`Configuration`,n=`main`){return{sections:[{id:n,title:t,fields:e.map(e=>xM(e.key,e.schema,e.description))}]}}function xM(e,t,n){let r=EM(t),i=DM(t),a={key:e,label:n??OM(e),description:n,default:i};return r instanceof re?SM(e,a):r instanceof ne?CM(r,a):r instanceof ae?{...a,type:`boolean`}:r instanceof ue?TM(r,a):r instanceof de||r instanceof se?{...a,type:`textarea`,rows:6,isJson:!0}:{...a,type:`text`}}function SM(e,t){let n=e.toLowerCase();return n.includes(`password`)||n.includes(`secret`)||n.includes(`token`)||n.includes(`apikey`)||n.includes(`api_key`)?{...t,type:`password`,showToggle:!0}:{...t,type:`text`}}function CM(e,t){let n=yM(e),r=n.minValue,i=n.maxValue,a=r!=null&&isFinite(r)?r:void 0,o=i!=null&&isFinite(i)?i:void 0,s=wM(e);return{...t,type:`number`,...a===void 0?{}:{min:a},...o===void 0?{}:{max:o},...s===void 0?{}:{step:s}}}function wM(e){let t=vM(e).checks??[];for(let e of t)if(e._zod?.def?.check===`multiple_of`&&e._zod.def.value!==void 0)return e._zod.def.value}function TM(e,t){let n=e.options.map(e=>String(e));return{...t,type:`select`,options:n.map(e=>({label:OM(e),value:e}))}}function EM(e){return e instanceof ee||e instanceof me||e instanceof fe?EM(vM(e).innerType):e}function DM(e){if(e instanceof ee)return vM(e).defaultValue}function OM(e){return e.replace(/([A-Z])/g,` $1`).replace(/[_-]/g,` `).replace(/^\w/,e=>e.toUpperCase()).trim()}var kM=`accessories.air-quality-sensor.alarm-panel.ambient-light-sensor.automation-control.battery.binary.brightness.broker.camera-credentials.carbon-monoxide.climate-control.color.connectivity.consumables.contact.control.cover.day-night.device-adoption.device-discovery.device-export.device-status.doorbell.enum-sensor.event-emitter.fan-control.feature-probe.flood.gas.humidifier.humidity-sensor.image.image-settings.intercom.lawn-mower-control.lock-control.media-player.motion.motion-trigger.motion-zones.mqtt-broker.native-object-detection.navigation.network-link.notifier.numeric-sensor.osd.pet-feeder.power-meter.presence.pressure-sensor.privacy-mask.ptz.ptz-autotrack.recording.recording-signal.scene-monitor.script-runner.smoke.snapshot.stream-params.switch.tamper.temperature-sensor.update.vacuum-control.valve.vibration.water-heater.weather`.split(`.`),AM={accessories:`accessories`,addonPages:`addon-pages`,addonPagesSource:`addon-pages-source`,addonRoutes:`addon-routes`,addonSettings:`addon-settings`,addonWidgets:`addon-widgets`,addonWidgetsSource:`addon-widgets-source`,addons:`addons`,adminUi:`admin-ui`,airQualitySensor:`air-quality-sensor`,alarmPanel:`alarm-panel`,alerts:`alerts`,ambientLightSensor:`ambient-light-sensor`,audioAnalysis:`audio-analysis`,audioAnalyzer:`audio-analyzer`,audioCodec:`audio-codec`,audioMetrics:`audio-metrics`,authProvider:`auth-provider`,automationControl:`automation-control`,backup:`backup`,battery:`battery`,binary:`binary`,brightness:`brightness`,broker:`broker`,button:`button`,cameraCredentials:`camera-credentials`,cameraPipelineConfig:`camera-pipeline-config`,cameraStreams:`camera-streams`,carbonMonoxide:`carbon-monoxide`,climateControl:`climate-control`,color:`color`,connectionTest:`connection-test`,connectivity:`connectivity`,consumables:`consumables`,contact:`contact`,control:`control`,coreBlocks:`core-blocks`,cover:`cover`,customModelRegistry:`custom-model-registry`,dataStoreProvider:`data-store-provider`,dayNight:`day-night`,decoder:`decoder`,detectionPipeline:`detection-pipeline`,deviceAdoption:`device-adoption`,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`,enumSensor:`enum-sensor`,eventEmitter:`event-emitter`,events:`events`,faceGallery:`face-gallery`,failureContribution:`failure-contribution`,fanControl:`fan-control`,featureProbe:`feature-probe`,filesystemBrowse:`filesystem-browse`,flood:`flood`,gas:`gas`,humidifier:`humidifier`,humiditySensor:`humidity-sensor`,image:`image`,imageSettings:`image-settings`,integrations:`integrations`,intercom:`intercom`,lawnMowerControl:`lawn-mower-control`,llm:`llm`,llmRuntime:`llm-runtime`,loadContribution:`load-contribution`,localNetwork:`local-network`,lockControl:`lock-control`,logChannels:`log-channels`,logDestination:`log-destination`,loginMethod:`login-method`,mediaPlayer:`media-player`,meshNetwork:`mesh-network`,metricsProvider:`metrics-provider`,modelConvert:`model-convert`,modelDistributor:`model-distributor`,motion:`motion`,motionDetection:`motion-detection`,motionTrigger:`motion-trigger`,motionZones:`motion-zones`,mqttBroker:`mqtt-broker`,nativeObjectDetection:`native-object-detection`,navigation:`navigation`,networkAccess:`network-access`,networkLink:`network-link`,networkQuality:`network-quality`,nodes:`nodes`,notificationOutput:`notification-output`,notificationRules:`notification-rules`,notifier:`notifier`,numericSensor:`numeric-sensor`,oauthIntegration:`oauth-integration`,osd:`osd`,osdManager:`osd-manager`,petFeeder:`pet-feeder`,pipelineAnalytics:`pipeline-analytics`,pipelineExecutor:`pipeline-executor`,pipelineOrchestrator:`pipeline-orchestrator`,pipelineRunner:`pipeline-runner`,plateGallery:`plate-gallery`,platformProbe:`platform-probe`,powerMeter:`power-meter`,presence:`presence`,pressureSensor:`pressure-sensor`,privacyMask:`privacy-mask`,ptz:`ptz`,ptzAutotrack:`ptz-autotrack`,reboot:`reboot`,recording:`recording`,recordingExport:`recording-export`,recordingSignal:`recording-signal`,sceneMonitor:`scene-monitor`,scriptRunner:`script-runner`,serverManagement:`server-management`,settingsStore:`settings-store`,smoke:`smoke`,smtpProvider:`smtp-provider`,snapshot:`snapshot`,ssoBridge:`sso-bridge`,storage:`storage`,storageEvictable:`storage-evictable`,storageMigration:`storage-migration`,storageOccupancy:`storage-occupancy`,storageProvider:`storage-provider`,streamBroker:`stream-broker`,streamCatalog:`stream-catalog`,streamParams:`stream-params`,switch:`switch`,system:`system`,tamper:`tamper`,temperatureSensor:`temperature-sensor`,terminalSession:`terminal-session`,toast:`toast`,turnProvider:`turn-provider`,update:`update`,userManagement:`user-management`,userPasskeys:`user-passkeys`,vacuumControl:`vacuum-control`,valve:`valve`,vectorStore:`vector-store`,vibration:`vibration`,videoclips:`videoclips`,viewerUi:`viewer-ui`,waterHeater:`water-heater`,weather:`weather`,webrtcSession:`webrtc-session`,zoneAnalytics:`zone-analytics`,zoneRules:`zone-rules`,zones:`zones`},jM=[{key:`accessories`,name:`accessories`},{key:`addonPages`,name:`addon-pages`},{key:`addonPagesSource`,name:`addon-pages-source`},{key:`addonRoutes`,name:`addon-routes`},{key:`addonSettings`,name:`addon-settings`},{key:`addonWidgets`,name:`addon-widgets`},{key:`addonWidgetsSource`,name:`addon-widgets-source`},{key:`addons`,name:`addons`},{key:`adminUi`,name:`admin-ui`},{key:`airQualitySensor`,name:`air-quality-sensor`},{key:`alarmPanel`,name:`alarm-panel`},{key:`alerts`,name:`alerts`},{key:`ambientLightSensor`,name:`ambient-light-sensor`},{key:`audioAnalysis`,name:`audio-analysis`},{key:`audioAnalyzer`,name:`audio-analyzer`},{key:`audioCodec`,name:`audio-codec`},{key:`audioMetrics`,name:`audio-metrics`},{key:`authProvider`,name:`auth-provider`},{key:`automationControl`,name:`automation-control`},{key:`backup`,name:`backup`},{key:`battery`,name:`battery`},{key:`binary`,name:`binary`},{key:`brightness`,name:`brightness`},{key:`broker`,name:`broker`},{key:`button`,name:`button`},{key:`cameraCredentials`,name:`camera-credentials`},{key:`cameraPipelineConfig`,name:`camera-pipeline-config`},{key:`cameraStreams`,name:`camera-streams`},{key:`carbonMonoxide`,name:`carbon-monoxide`},{key:`climateControl`,name:`climate-control`},{key:`color`,name:`color`},{key:`connectionTest`,name:`connection-test`},{key:`connectivity`,name:`connectivity`},{key:`consumables`,name:`consumables`},{key:`contact`,name:`contact`},{key:`control`,name:`control`},{key:`coreBlocks`,name:`core-blocks`},{key:`cover`,name:`cover`},{key:`customModelRegistry`,name:`custom-model-registry`},{key:`dataStoreProvider`,name:`data-store-provider`},{key:`dayNight`,name:`day-night`},{key:`decoder`,name:`decoder`},{key:`detectionPipeline`,name:`detection-pipeline`},{key:`deviceAdoption`,name:`device-adoption`},{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:`enumSensor`,name:`enum-sensor`},{key:`eventEmitter`,name:`event-emitter`},{key:`events`,name:`events`},{key:`faceGallery`,name:`face-gallery`},{key:`failureContribution`,name:`failure-contribution`},{key:`fanControl`,name:`fan-control`},{key:`featureProbe`,name:`feature-probe`},{key:`filesystemBrowse`,name:`filesystem-browse`},{key:`flood`,name:`flood`},{key:`gas`,name:`gas`},{key:`humidifier`,name:`humidifier`},{key:`humiditySensor`,name:`humidity-sensor`},{key:`image`,name:`image`},{key:`imageSettings`,name:`image-settings`},{key:`integrations`,name:`integrations`},{key:`intercom`,name:`intercom`},{key:`lawnMowerControl`,name:`lawn-mower-control`},{key:`llm`,name:`llm`},{key:`llmRuntime`,name:`llm-runtime`},{key:`loadContribution`,name:`load-contribution`},{key:`localNetwork`,name:`local-network`},{key:`lockControl`,name:`lock-control`},{key:`logChannels`,name:`log-channels`},{key:`logDestination`,name:`log-destination`},{key:`loginMethod`,name:`login-method`},{key:`mediaPlayer`,name:`media-player`},{key:`meshNetwork`,name:`mesh-network`},{key:`metricsProvider`,name:`metrics-provider`},{key:`modelConvert`,name:`model-convert`},{key:`modelDistributor`,name:`model-distributor`},{key:`motion`,name:`motion`},{key:`motionDetection`,name:`motion-detection`},{key:`motionTrigger`,name:`motion-trigger`},{key:`motionZones`,name:`motion-zones`},{key:`mqttBroker`,name:`mqtt-broker`},{key:`nativeObjectDetection`,name:`native-object-detection`},{key:`navigation`,name:`navigation`},{key:`networkAccess`,name:`network-access`},{key:`networkLink`,name:`network-link`},{key:`networkQuality`,name:`network-quality`},{key:`nodes`,name:`nodes`},{key:`notificationOutput`,name:`notification-output`},{key:`notificationRules`,name:`notification-rules`},{key:`notifier`,name:`notifier`},{key:`numericSensor`,name:`numeric-sensor`},{key:`oauthIntegration`,name:`oauth-integration`},{key:`osd`,name:`osd`},{key:`osdManager`,name:`osd-manager`},{key:`petFeeder`,name:`pet-feeder`},{key:`pipelineAnalytics`,name:`pipeline-analytics`},{key:`pipelineExecutor`,name:`pipeline-executor`},{key:`pipelineOrchestrator`,name:`pipeline-orchestrator`},{key:`pipelineRunner`,name:`pipeline-runner`},{key:`plateGallery`,name:`plate-gallery`},{key:`platformProbe`,name:`platform-probe`},{key:`powerMeter`,name:`power-meter`},{key:`presence`,name:`presence`},{key:`pressureSensor`,name:`pressure-sensor`},{key:`privacyMask`,name:`privacy-mask`},{key:`ptz`,name:`ptz`},{key:`ptzAutotrack`,name:`ptz-autotrack`},{key:`reboot`,name:`reboot`},{key:`recording`,name:`recording`},{key:`recordingExport`,name:`recording-export`},{key:`recordingSignal`,name:`recording-signal`},{key:`sceneMonitor`,name:`scene-monitor`},{key:`scriptRunner`,name:`script-runner`},{key:`serverManagement`,name:`server-management`},{key:`settingsStore`,name:`settings-store`},{key:`smoke`,name:`smoke`},{key:`smtpProvider`,name:`smtp-provider`},{key:`snapshot`,name:`snapshot`},{key:`ssoBridge`,name:`sso-bridge`},{key:`storage`,name:`storage`},{key:`storageEvictable`,name:`storage-evictable`},{key:`storageMigration`,name:`storage-migration`},{key:`storageOccupancy`,name:`storage-occupancy`},{key:`storageProvider`,name:`storage-provider`},{key:`streamBroker`,name:`stream-broker`},{key:`streamCatalog`,name:`stream-catalog`},{key:`streamParams`,name:`stream-params`},{key:`switch`,name:`switch`},{key:`system`,name:`system`},{key:`tamper`,name:`tamper`},{key:`temperatureSensor`,name:`temperature-sensor`},{key:`terminalSession`,name:`terminal-session`},{key:`toast`,name:`toast`},{key:`turnProvider`,name:`turn-provider`},{key:`update`,name:`update`},{key:`userManagement`,name:`user-management`},{key:`userPasskeys`,name:`user-passkeys`},{key:`vacuumControl`,name:`vacuum-control`},{key:`valve`,name:`valve`},{key:`vectorStore`,name:`vector-store`},{key:`vibration`,name:`vibration`},{key:`videoclips`,name:`videoclips`},{key:`viewerUi`,name:`viewer-ui`},{key:`waterHeater`,name:`water-heater`},{key:`weather`,name:`weather`},{key:`webrtcSession`,name:`webrtc-session`},{key:`zoneAnalytics`,name:`zone-analytics`},{key:`zoneRules`,name:`zone-rules`},{key:`zones`,name:`zones`}],MM=[sS,Rc,Bc,Wc,Yc,nl,el,zS,Nt,VS,hh,sl,US,cl,bl,Ol,JS,Al,XS,Hl,QS,eC,nC,lu,rC,oC,uu,Ru,cC,dC,gC,xC,CC,EC,OC,MC,id,FC,ld,yd,VC,Cd,wd,qd,Pd,nf,jf,Ut,uf,Mf,UC,KC,Ff,YC,QC,ew,lw,Rf,fw,mw,Vf,gw,vw,bw,Sw,ww,Nw,Hw,Kw,Xw,bp,sp,wp,lT,fT,Ep,kp,Fp,_T,xT,tm,rm,om,wT,lm,DT,MT,xm,LT,ZT,Tm,rE,sE,CE,Vm,kg,AE,ME,Vg,RE,KE,QE,fy,y_,Cb,By,iD,bD,SD,TD,DD,ND,BD,GD,KD,_O,kO,MO,ek,nk,zb,_d,ik,Wb,qb,Yb,Zb,ex,tx,rx,hx,Nu,sk,mk,bk,Zk,$k,tA,wx,rA,Ex,aA,vA,Ox,SA,TA,Xx,DA,tS,zt,kA,jA,aS,BA,HA,T_],NM=Object.freeze({"accessories.setChildHidden":{capName:`accessories`,capScope:`device`,addonId:null,access:`create`},"addonPages.listPages":{capName:`addon-pages`,capScope:`system`,addonId:null,access:`view`},"addonPagesSource.listPages":{capName:`addon-pages-source`,capScope:`system`,addonId:null,access:`view`},"addonRoutes.getRoutes":{capName:`addon-routes`,capScope:`system`,addonId:null,access:`view`},"addonRoutes.invoke":{capName:`addon-routes`,capScope:`system`,addonId:null,access:`create`},"addons.applyAutoUpdateToAll":{capName:`addons`,capScope:`system`,addonId:null,access:`create`},"addons.cancelJob":{capName:`addons`,capScope:`system`,addonId:null,access:`create`},"addons.custom":{capName:`addons`,capScope:`system`,addonId:null,access:`create`},"addons.forceRefresh":{capName:`addons`,capScope:`system`,addonId:null,access:`create`},"addons.getAddonAutoUpdate":{capName:`addons`,capScope:`system`,addonId:null,access:`view`},"addons.getAutoUpdateSettings":{capName:`addons`,capScope:`system`,addonId:null,access:`view`},"addons.getJob":{capName:`addons`,capScope:`system`,addonId:null,access:`view`},"addons.getLastRestart":{capName:`addons`,capScope:`system`,addonId:null,access:`view`},"addons.getLogs":{capName:`addons`,capScope:`system`,addonId:null,access:`view`},"addons.getVersions":{capName:`addons`,capScope:`system`,addonId:null,access:`view`},"addons.installFromWorkspace":{capName:`addons`,capScope:`system`,addonId:null,access:`create`},"addons.installPackage":{capName:`addons`,capScope:`system`,addonId:null,access:`create`},"addons.isWorkspaceAvailable":{capName:`addons`,capScope:`system`,addonId:null,access:`view`},"addons.list":{capName:`addons`,capScope:`system`,addonId:null,access:`view`},"addons.listCapabilityProviders":{capName:`addons`,capScope:`system`,addonId:null,access:`view`},"addons.listFrameworkPackages":{capName:`addons`,capScope:`system`,addonId:null,access:`view`},"addons.listJobs":{capName:`addons`,capScope:`system`,addonId:null,access:`view`},"addons.listPackages":{capName:`addons`,capScope:`system`,addonId:null,access:`view`},"addons.listUpdates":{capName:`addons`,capScope:`system`,addonId:null,access:`view`},"addons.listWorkspacePackages":{capName:`addons`,capScope:`system`,addonId:null,access:`view`},"addons.onAddonLogs":{capName:`addons`,capScope:`system`,addonId:null,access:`view`},"addons.reloadPackages":{capName:`addons`,capScope:`system`,addonId:null,access:`create`},"addons.restartAddon":{capName:`addons`,capScope:`system`,addonId:null,access:`create`},"addons.restartServer":{capName:`addons`,capScope:`system`,addonId:null,access:`create`},"addons.retryLoad":{capName:`addons`,capScope:`system`,addonId:null,access:`create`},"addons.rollbackPackage":{capName:`addons`,capScope:`system`,addonId:null,access:`create`},"addons.searchAvailable":{capName:`addons`,capScope:`system`,addonId:null,access:`view`},"addons.setAddonAutoUpdate":{capName:`addons`,capScope:`system`,addonId:null,access:`create`},"addons.setAutoUpdateSettings":{capName:`addons`,capScope:`system`,addonId:null,access:`create`},"addons.setCapabilityProviderEnabled":{capName:`addons`,capScope:`system`,addonId:null,access:`create`},"addons.startJob":{capName:`addons`,capScope:`system`,addonId:null,access:`create`},"addons.uninstallPackage":{capName:`addons`,capScope:`system`,addonId:null,access:`delete`},"addons.updatePackage":{capName:`addons`,capScope:`system`,addonId:null,access:`create`},"addonSettings.getDeviceSettings":{capName:`addon-settings`,capScope:`system`,addonId:null,access:`view`},"addonSettings.getGlobalSettings":{capName:`addon-settings`,capScope:`system`,addonId:null,access:`view`},"addonSettings.getIntegrationSettings":{capName:`addon-settings`,capScope:`system`,addonId:null,access:`view`},"addonSettings.updateDeviceSettings":{capName:`addon-settings`,capScope:`system`,addonId:null,access:`create`},"addonSettings.updateGlobalSettings":{capName:`addon-settings`,capScope:`system`,addonId:null,access:`create`},"addonWidgets.listWidgets":{capName:`addon-widgets`,capScope:`system`,addonId:null,access:`view`},"addonWidgetsSource.listWidgets":{capName:`addon-widgets-source`,capScope:`system`,addonId:null,access:`view`},"adminUi.getStaticDir":{capName:`admin-ui`,capScope:`system`,addonId:null,access:`view`},"adminUi.getVersion":{capName:`admin-ui`,capScope:`system`,addonId:null,access:`view`},"alarmPanel.arm":{capName:`alarm-panel`,capScope:`device`,addonId:null,access:`create`},"alarmPanel.disarm":{capName:`alarm-panel`,capScope:`device`,addonId:null,access:`create`},"alarmPanel.trigger":{capName:`alarm-panel`,capScope:`device`,addonId:null,access:`create`},"alerts.dismiss":{capName:`alerts`,capScope:`system`,addonId:null,access:`create`},"alerts.emit":{capName:`alerts`,capScope:`system`,addonId:null,access:`create`},"alerts.getUnreadCount":{capName:`alerts`,capScope:`system`,addonId:null,access:`view`},"alerts.list":{capName:`alerts`,capScope:`system`,addonId:null,access:`view`},"alerts.markAllRead":{capName:`alerts`,capScope:`system`,addonId:null,access:`create`},"alerts.markRead":{capName:`alerts`,capScope:`system`,addonId:null,access:`create`},"alerts.update":{capName:`alerts`,capScope:`system`,addonId:null,access:`create`},"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`},"automationControl.disable":{capName:`automation-control`,capScope:`device`,addonId:null,access:`create`},"automationControl.enable":{capName:`automation-control`,capScope:`device`,addonId:null,access:`create`},"automationControl.trigger":{capName:`automation-control`,capScope:`device`,addonId:null,access:`create`},"backup.cancel":{capName:`backup`,capScope:`system`,addonId:null,access:`create`},"backup.delete":{capName:`backup`,capScope:`system`,addonId:null,access:`delete`},"backup.deleteSchedule":{capName:`backup`,capScope:`system`,addonId:null,access:`delete`},"backup.getEntries":{capName:`backup`,capScope:`system`,addonId:null,access:`view`},"backup.list":{capName:`backup`,capScope:`system`,addonId:null,access:`view`},"backup.listArchives":{capName:`backup`,capScope:`system`,addonId:null,access:`view`},"backup.listDestinations":{capName:`backup`,capScope:`system`,addonId:null,access:`view`},"backup.listLocations":{capName:`backup`,capScope:`system`,addonId:null,access:`view`},"backup.listRuns":{capName:`backup`,capScope:`system`,addonId:null,access:`view`},"backup.listSchedules":{capName:`backup`,capScope:`system`,addonId:null,access:`view`},"backup.previewSchedule":{capName:`backup`,capScope:`system`,addonId:null,access:`view`},"backup.restore":{capName:`backup`,capScope:`system`,addonId:null,access:`create`},"backup.trigger":{capName:`backup`,capScope:`system`,addonId:null,access:`create`},"backup.upsertDestinationPolicy":{capName:`backup`,capScope:`system`,addonId:null,access:`create`},"backup.upsertSchedule":{capName:`backup`,capScope:`system`,addonId:null,access:`create`},"battery.wakeForStream":{capName:`battery`,capScope:`device`,addonId:null,access:`create`},"brightness.setBrightness":{capName:`brightness`,capScope:`device`,addonId:null,access:`create`},"broker.add":{capName:`broker`,capScope:`system`,addonId:null,access:`create`},"broker.get":{capName:`broker`,capScope:`system`,addonId:null,access:`view`},"broker.getBrokerConfig":{capName:`broker`,capScope:`system`,addonId:null,access:`view`},"broker.getSettings":{capName:`broker`,capScope:`system`,addonId:null,access:`view`},"broker.getSettingsSchema":{capName:`broker`,capScope:`system`,addonId:null,access:`view`},"broker.getState":{capName:`broker`,capScope:`system`,addonId:null,access:`view`},"broker.getStatus":{capName:`broker`,capScope:`system`,addonId:null,access:`view`},"broker.list":{capName:`broker`,capScope:`system`,addonId:null,access:`view`},"broker.listProviders":{capName:`broker`,capScope:`system`,addonId:null,access:`view`},"broker.publish":{capName:`broker`,capScope:`system`,addonId:null,access:`create`},"broker.remove":{capName:`broker`,capScope:`system`,addonId:null,access:`delete`},"broker.setSettings":{capName:`broker`,capScope:`system`,addonId:null,access:`create`},"broker.subscribe":{capName:`broker`,capScope:`system`,addonId:null,access:`create`},"broker.testConnection":{capName:`broker`,capScope:`system`,addonId:null,access:`create`},"broker.testSettings":{capName:`broker`,capScope:`system`,addonId:null,access:`create`},"broker.unsubscribe":{capName:`broker`,capScope:`system`,addonId:null,access:`create`},"button.press":{capName:`button`,capScope:`device`,addonId:null,access:`create`},"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.getProfileRtspEntries":{capName:`camera-streams`,capScope:`device`,addonId:null,access:`view`},"cameraStreams.getRtspEntries":{capName:`camera-streams`,capScope:`device`,addonId:null,access:`view`},"cameraStreams.pickStream":{capName:`camera-streams`,capScope:`device`,addonId:null,access:`view`},"climateControl.setFanMode":{capName:`climate-control`,capScope:`device`,addonId:null,access:`create`},"climateControl.setMode":{capName:`climate-control`,capScope:`device`,addonId:null,access:`create`},"climateControl.setPreset":{capName:`climate-control`,capScope:`device`,addonId:null,access:`create`},"climateControl.setSwingHorizontal":{capName:`climate-control`,capScope:`device`,addonId:null,access:`create`},"climateControl.setSwingVertical":{capName:`climate-control`,capScope:`device`,addonId:null,access:`create`},"climateControl.setTarget":{capName:`climate-control`,capScope:`device`,addonId:null,access:`create`},"climateControl.setTargetHumidity":{capName:`climate-control`,capScope:`device`,addonId:null,access:`create`},"climateControl.setTargetRange":{capName:`climate-control`,capScope:`device`,addonId:null,access:`create`},"color.setColor":{capName:`color`,capScope:`device`,addonId:null,access:`create`},"connectionTest.describeTest":{capName:`connection-test`,capScope:`system`,addonId:null,access:`view`},"connectionTest.testSettings":{capName:`connection-test`,capScope:`system`,addonId:null,access:`create`},"consumables.reset":{capName:`consumables`,capScope:`device`,addonId:null,access:`delete`},"control.setValue":{capName:`control`,capScope:`device`,addonId:null,access:`create`},"coreBlocks.compile":{capName:`core-blocks`,capScope:`system`,addonId:null,access:`create`},"coreBlocks.create":{capName:`core-blocks`,capScope:`system`,addonId:null,access:`create`},"coreBlocks.delete":{capName:`core-blocks`,capScope:`system`,addonId:null,access:`delete`},"coreBlocks.get":{capName:`core-blocks`,capScope:`system`,addonId:null,access:`view`},"coreBlocks.getTypeDefs":{capName:`core-blocks`,capScope:`system`,addonId:null,access:`view`},"coreBlocks.list":{capName:`core-blocks`,capScope:`system`,addonId:null,access:`view`},"coreBlocks.restart":{capName:`core-blocks`,capScope:`system`,addonId:null,access:`create`},"coreBlocks.setEnabled":{capName:`core-blocks`,capScope:`system`,addonId:null,access:`create`},"coreBlocks.update":{capName:`core-blocks`,capScope:`system`,addonId:null,access:`create`},"cover.close":{capName:`cover`,capScope:`device`,addonId:null,access:`create`},"cover.open":{capName:`cover`,capScope:`device`,addonId:null,access:`create`},"cover.setPosition":{capName:`cover`,capScope:`device`,addonId:null,access:`create`},"cover.setTiltPosition":{capName:`cover`,capScope:`device`,addonId:null,access:`create`},"cover.stop":{capName:`cover`,capScope:`device`,addonId:null,access:`create`},"customModelRegistry.listModels":{capName:`custom-model-registry`,capScope:`system`,addonId:null,access:`view`},"dataStoreProvider.aggregate":{capName:`data-store-provider`,capScope:`system`,addonId:null,access:`view`},"dataStoreProvider.count":{capName:`data-store-provider`,capScope:`system`,addonId:null,access:`view`},"dataStoreProvider.declareCollection":{capName:`data-store-provider`,capScope:`system`,addonId:null,access:`create`},"dataStoreProvider.delete":{capName:`data-store-provider`,capScope:`system`,addonId:null,access:`delete`},"dataStoreProvider.deleteWhere":{capName:`data-store-provider`,capScope:`system`,addonId:null,access:`delete`},"dataStoreProvider.get":{capName:`data-store-provider`,capScope:`system`,addonId:null,access:`view`},"dataStoreProvider.getEngineInfo":{capName:`data-store-provider`,capScope:`system`,addonId:null,access:`view`},"dataStoreProvider.histogram":{capName:`data-store-provider`,capScope:`system`,addonId:null,access:`view`},"dataStoreProvider.insert":{capName:`data-store-provider`,capScope:`system`,addonId:null,access:`create`},"dataStoreProvider.insertMany":{capName:`data-store-provider`,capScope:`system`,addonId:null,access:`create`},"dataStoreProvider.isEmpty":{capName:`data-store-provider`,capScope:`system`,addonId:null,access:`view`},"dataStoreProvider.query":{capName:`data-store-provider`,capScope:`system`,addonId:null,access:`view`},"dataStoreProvider.set":{capName:`data-store-provider`,capScope:`system`,addonId:null,access:`create`},"dataStoreProvider.update":{capName:`data-store-provider`,capScope:`system`,addonId:null,access:`create`},"dataStoreProvider.updateWhere":{capName:`data-store-provider`,capScope:`system`,addonId:null,access:`create`},"dayNight.getOptions":{capName:`day-night`,capScope:`device`,addonId:null,access:`view`},"dayNight.setSettings":{capName:`day-night`,capScope:`device`,addonId:null,access:`create`},"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`},"deviceAdoption.adopt":{capName:`device-adoption`,capScope:`system`,addonId:null,access:`create`},"deviceAdoption.getCandidate":{capName:`device-adoption`,capScope:`system`,addonId:null,access:`view`},"deviceAdoption.listCandidateFilters":{capName:`device-adoption`,capScope:`system`,addonId:null,access:`view`},"deviceAdoption.listCandidates":{capName:`device-adoption`,capScope:`system`,addonId:null,access:`view`},"deviceAdoption.refresh":{capName:`device-adoption`,capScope:`system`,addonId:null,access:`create`},"deviceAdoption.release":{capName:`device-adoption`,capScope:`system`,addonId:null,access:`create`},"deviceAdoption.resync":{capName:`device-adoption`,capScope:`system`,addonId:null,access:`create`},"deviceDiscovery.adoptDevice":{capName:`device-discovery`,capScope:`device`,addonId:null,access:`create`},"deviceDiscovery.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.adoptionAdopt":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.adoptionCancelJob":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.adoptionListCandidateFilters":{capName:`device-manager`,capScope:`system`,addonId:null,access:`view`},"deviceManager.adoptionListCandidates":{capName:`device-manager`,capScope:`system`,addonId:null,access:`view`},"deviceManager.adoptionListJobs":{capName:`device-manager`,capScope:`system`,addonId:null,access:`view`},"deviceManager.adoptionRefresh":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.adoptionRelease":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.adoptionResync":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.adoptionStartJob":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.allocateDeviceId":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.applyInitialMeta":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.createDevice":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.disable":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.discoverAllProviders":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.discoverDevices":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.discoverProvider":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.discoveryProviders":{capName:`device-manager`,capScope:`system`,addonId:null,access:`view`},"deviceManager.enable":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.getAllBindings":{capName:`device-manager`,capScope:`system`,addonId:null,access:`view`},"deviceManager.getBindings":{capName:`device-manager`,capScope:`system`,addonId:null,access:`view`},"deviceManager.getBindingsBatch":{capName:`device-manager`,capScope:`system`,addonId:null,access:`view`},"deviceManager.getChildren":{capName:`device-manager`,capScope:`system`,addonId:null,access:`view`},"deviceManager.getChildrenBatch":{capName:`device-manager`,capScope:`system`,addonId:null,access:`view`},"deviceManager.getConfigSchema":{capName:`device-manager`,capScope:`system`,addonId:null,access:`view`},"deviceManager.getCreationSchema":{capName:`device-manager`,capScope:`system`,addonId:null,access:`view`},"deviceManager.getDevice":{capName:`device-manager`,capScope:`system`,addonId:null,access:`view`},"deviceManager.getDeviceAggregate":{capName:`device-manager`,capScope:`system`,addonId:null,access:`view`},"deviceManager.getDeviceLiveInfoAggregate":{capName:`device-manager`,capScope:`system`,addonId:null,access:`view`},"deviceManager.getDeviceSettingsAggregate":{capName:`device-manager`,capScope:`system`,addonId:null,access:`view`},"deviceManager.getDeviceStatusAggregate":{capName:`device-manager`,capScope:`system`,addonId:null,access:`view`},"deviceManager.getDeviceStatusAggregateBatch":{capName:`device-manager`,capScope:`system`,addonId:null,access:`view`},"deviceManager.getLinkedDevices":{capName:`device-manager`,capScope:`system`,addonId:null,access:`view`},"deviceManager.getLinkedDevicesBatch":{capName:`device-manager`,capScope:`system`,addonId:null,access:`view`},"deviceManager.getRoleDisplayDefaults":{capName:`device-manager`,capScope:`system`,addonId:null,access:`view`},"deviceManager.getSettingsSchema":{capName:`device-manager`,capScope:`system`,addonId:null,access:`view`},"deviceManager.getStreamProfileMap":{capName:`device-manager`,capScope:`system`,addonId:null,access:`view`},"deviceManager.getStreamSources":{capName:`device-manager`,capScope:`system`,addonId:null,access:`view`},"deviceManager.getWireableFields":{capName:`device-manager`,capScope:`system`,addonId:null,access:`view`},"deviceManager.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.migrateDevice":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.persistConfig":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.probeStreams":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.providerCreationType":{capName:`device-manager`,capScope:`system`,addonId:null,access:`view`},"deviceManager.providerDiscoveryParamsSchema":{capName:`device-manager`,capScope:`system`,addonId:null,access:`view`},"deviceManager.registerDevice":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.remove":{capName:`device-manager`,capScope:`system`,addonId:null,access:`delete`},"deviceManager.removeByIntegration":{capName:`device-manager`,capScope:`system`,addonId:null,access:`delete`},"deviceManager.removeDevice":{capName:`device-manager`,capScope:`system`,addonId:null,access:`delete`},"deviceManager.removeLocation":{capName:`device-manager`,capScope:`system`,addonId:null,access:`delete`},"deviceManager.renameLocation":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.runDeviceAction":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.setChildLayout":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.setDisabled":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.setDisplay":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.setIntegrationId":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.setLinkDeviceId":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.setLocation":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.setMetadata":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.setName":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.setPrimaryChildEntityId":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.setRole":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.setRoleDisplayDefaults":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.setStreamProfileMap":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.setType":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.setWrapperActive":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.testCreationField":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.testField":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.updateConfig":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.updateDeviceField":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.updateDeviceFieldsBatch":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceOps.getConfigEntries":{capName:`device-ops`,capScope:`device`,addonId:null,access:`view`},"deviceOps.getRawState":{capName:`device-ops`,capScope:`device`,addonId:null,access:`view`},"deviceOps.getSettingsSchema":{capName:`device-ops`,capScope:`device`,addonId:null,access:`view`},"deviceOps.getStreamSources":{capName:`device-ops`,capScope:`device`,addonId:null,access:`view`},"deviceOps.removeDevice":{capName:`device-ops`,capScope:`device`,addonId:null,access:`delete`},"deviceOps.runAction":{capName:`device-ops`,capScope:`device`,addonId:null,access:`create`},"deviceOps.setConfig":{capName:`device-ops`,capScope:`device`,addonId:null,access:`create`},"deviceProvider.adoptDiscoveredDevice":{capName:`device-provider`,capScope:`system`,addonId:null,access:`create`},"deviceProvider.createDevice":{capName:`device-provider`,capScope:`system`,addonId:null,access:`create`},"deviceProvider.discoverDevices":{capName:`device-provider`,capScope:`system`,addonId:null,access:`create`},"deviceProvider.getChildCreationSchema":{capName:`device-provider`,capScope:`system`,addonId:null,access:`view`},"deviceProvider.getDevices":{capName:`device-provider`,capScope:`system`,addonId:null,access:`view`},"deviceProvider.getDiscoveryParamsSchema":{capName:`device-provider`,capScope:`system`,addonId:null,access:`view`},"deviceProvider.getManualCreationType":{capName:`device-provider`,capScope:`system`,addonId:null,access:`view`},"deviceProvider.getStatus":{capName:`device-provider`,capScope:`system`,addonId:null,access:`view`},"deviceProvider.reloadDevice":{capName:`device-provider`,capScope:`system`,addonId:null,access:`create`},"deviceProvider.start":{capName:`device-provider`,capScope:`system`,addonId:null,access:`create`},"deviceProvider.stop":{capName:`device-provider`,capScope:`system`,addonId:null,access:`create`},"deviceProvider.supportsDiscovery":{capName:`device-provider`,capScope:`system`,addonId:null,access:`view`},"deviceProvider.supportsManualCreation":{capName:`device-provider`,capScope:`system`,addonId:null,access:`view`},"deviceProvider.testCreationField":{capName:`device-provider`,capScope:`system`,addonId:null,access:`create`},"deviceState.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`},"faceGallery.assignFace":{capName:`face-gallery`,capScope:`system`,addonId:null,access:`create`},"faceGallery.assignFaces":{capName:`face-gallery`,capScope:`system`,addonId:null,access:`create`},"faceGallery.createIdentity":{capName:`face-gallery`,capScope:`system`,addonId:null,access:`create`},"faceGallery.deleteFace":{capName:`face-gallery`,capScope:`system`,addonId:null,access:`delete`},"faceGallery.deleteIdentity":{capName:`face-gallery`,capScope:`system`,addonId:null,access:`delete`},"faceGallery.getFaceByTrack":{capName:`face-gallery`,capScope:`system`,addonId:null,access:`view`},"faceGallery.getFaceMedia":{capName:`face-gallery`,capScope:`system`,addonId:null,access:`view`},"faceGallery.listIdentities":{capName:`face-gallery`,capScope:`system`,addonId:null,access:`view`},"faceGallery.listIdentitySamples":{capName:`face-gallery`,capScope:`system`,addonId:null,access:`view`},"faceGallery.listRecentFaces":{capName:`face-gallery`,capScope:`system`,addonId:null,access:`view`},"faceGallery.removeSample":{capName:`face-gallery`,capScope:`system`,addonId:null,access:`delete`},"faceGallery.renameIdentity":{capName:`face-gallery`,capScope:`system`,addonId:null,access:`create`},"faceGallery.suggestFaceClusters":{capName:`face-gallery`,capScope:`system`,addonId:null,access:`view`},"faceGallery.unassignFace":{capName:`face-gallery`,capScope:`system`,addonId:null,access:`create`},"faceGallery.unassignFaces":{capName:`face-gallery`,capScope:`system`,addonId:null,access:`create`},"failureContribution.list":{capName:`failure-contribution`,capScope:`system`,addonId:null,access:`view`},"fanControl.setDirection":{capName:`fan-control`,capScope:`device`,addonId:null,access:`create`},"fanControl.setOscillating":{capName:`fan-control`,capScope:`device`,addonId:null,access:`create`},"fanControl.setPercentage":{capName:`fan-control`,capScope:`device`,addonId:null,access:`create`},"fanControl.setPreset":{capName:`fan-control`,capScope:`device`,addonId:null,access:`create`},"filesystemBrowse.browse":{capName:`filesystem-browse`,capScope:`system`,addonId:null,access:`view`},"filesystemBrowse.createDir":{capName:`filesystem-browse`,capScope:`system`,addonId:null,access:`create`},"filesystemBrowse.listAllowedRoots":{capName:`filesystem-browse`,capScope:`system`,addonId:null,access:`view`},"humidifier.setMode":{capName:`humidifier`,capScope:`device`,addonId:null,access:`create`},"humidifier.setOn":{capName:`humidifier`,capScope:`device`,addonId:null,access:`create`},"humidifier.setTargetHumidity":{capName:`humidifier`,capScope:`device`,addonId:null,access:`create`},"imageSettings.getOptions":{capName:`image-settings`,capScope:`device`,addonId:null,access:`view`},"imageSettings.setSettings":{capName:`image-settings`,capScope:`device`,addonId:null,access:`create`},"integrations.create":{capName:`integrations`,capScope:`system`,addonId:null,access:`create`},"integrations.delete":{capName:`integrations`,capScope:`system`,addonId:null,access:`delete`},"integrations.get":{capName:`integrations`,capScope:`system`,addonId:null,access:`view`},"integrations.getAvailableTypes":{capName:`integrations`,capScope:`system`,addonId:null,access:`view`},"integrations.getByAddonId":{capName:`integrations`,capScope:`system`,addonId:null,access:`view`},"integrations.getSettings":{capName:`integrations`,capScope:`system`,addonId:null,access:`view`},"integrations.list":{capName:`integrations`,capScope:`system`,addonId:null,access:`view`},"integrations.setSettings":{capName:`integrations`,capScope:`system`,addonId:null,access:`create`},"integrations.testConnection":{capName:`integrations`,capScope:`system`,addonId:null,access:`create`},"integrations.update":{capName:`integrations`,capScope:`system`,addonId:null,access:`create`},"intercom.endTalkSession":{capName:`intercom`,capScope:`device`,addonId:null,access:`create`},"intercom.handleAnswer":{capName:`intercom`,capScope:`device`,addonId:null,access:`create`},"intercom.pushTalkAudio":{capName:`intercom`,capScope:`device`,addonId:null,access:`create`},"intercom.startSession":{capName:`intercom`,capScope:`device`,addonId:null,access:`create`},"intercom.startTalkSession":{capName:`intercom`,capScope:`device`,addonId:null,access:`create`},"intercom.stopSession":{capName:`intercom`,capScope:`device`,addonId:null,access:`create`},"lawnMowerControl.dock":{capName:`lawn-mower-control`,capScope:`device`,addonId:null,access:`create`},"lawnMowerControl.pause":{capName:`lawn-mower-control`,capScope:`device`,addonId:null,access:`create`},"lawnMowerControl.startMowing":{capName:`lawn-mower-control`,capScope:`device`,addonId:null,access:`create`},"llm.cancel":{capName:`llm`,capScope:`system`,addonId:null,access:`create`},"llm.deleteModel":{capName:`llm`,capScope:`system`,addonId:null,access:`delete`},"llm.deleteProfile":{capName:`llm`,capScope:`system`,addonId:null,access:`delete`},"llm.generate":{capName:`llm`,capScope:`system`,addonId:null,access:`create`},"llm.generateVision":{capName:`llm`,capScope:`system`,addonId:null,access:`create`},"llm.getDefaults":{capName:`llm`,capScope:`system`,addonId:null,access:`view`},"llm.getRuntimeStatus":{capName:`llm`,capScope:`system`,addonId:null,access:`view`},"llm.getUsage":{capName:`llm`,capScope:`system`,addonId:null,access:`view`},"llm.installModel":{capName:`llm`,capScope:`system`,addonId:null,access:`create`},"llm.listModelCatalog":{capName:`llm`,capScope:`system`,addonId:null,access:`view`},"llm.listModels":{capName:`llm`,capScope:`system`,addonId:null,access:`view`},"llm.listNodeModels":{capName:`llm`,capScope:`system`,addonId:null,access:`view`},"llm.listProfileKinds":{capName:`llm`,capScope:`system`,addonId:null,access:`view`},"llm.listProfiles":{capName:`llm`,capScope:`system`,addonId:null,access:`view`},"llm.listRuntimeNodes":{capName:`llm`,capScope:`system`,addonId:null,access:`view`},"llm.resolveModelRef":{capName:`llm`,capScope:`system`,addonId:null,access:`create`},"llm.setDefault":{capName:`llm`,capScope:`system`,addonId:null,access:`create`},"llm.startRuntime":{capName:`llm`,capScope:`system`,addonId:null,access:`create`},"llm.stopRuntime":{capName:`llm`,capScope:`system`,addonId:null,access:`create`},"llm.testProfile":{capName:`llm`,capScope:`system`,addonId:null,access:`create`},"llm.upsertProfile":{capName:`llm`,capScope:`system`,addonId:null,access:`create`},"llmRuntime.complete":{capName:`llm-runtime`,capScope:`system`,addonId:null,access:`create`},"llmRuntime.deleteModel":{capName:`llm-runtime`,capScope:`system`,addonId:null,access:`delete`},"llmRuntime.ensureStarted":{capName:`llm-runtime`,capScope:`system`,addonId:null,access:`create`},"llmRuntime.getDiskUsage":{capName:`llm-runtime`,capScope:`system`,addonId:null,access:`view`},"llmRuntime.installModel":{capName:`llm-runtime`,capScope:`system`,addonId:null,access:`create`},"llmRuntime.listLocalModels":{capName:`llm-runtime`,capScope:`system`,addonId:null,access:`view`},"llmRuntime.status":{capName:`llm-runtime`,capScope:`system`,addonId:null,access:`view`},"llmRuntime.stop":{capName:`llm-runtime`,capScope:`system`,addonId:null,access:`create`},"loadContribution.list":{capName:`load-contribution`,capScope:`system`,addonId:null,access:`view`},"localNetwork.downloadCa":{capName:`local-network`,capScope:`system`,addonId:null,access:`view`},"localNetwork.getAllowedAddresses":{capName:`local-network`,capScope:`system`,addonId:null,access:`view`},"localNetwork.getConnectionEndpoints":{capName:`local-network`,capScope:`system`,addonId:null,access:`view`},"localNetwork.getNotificationEndpoint":{capName:`local-network`,capScope:`system`,addonId:null,access:`view`},"localNetwork.getPreferred":{capName:`local-network`,capScope:`system`,addonId:null,access:`view`},"localNetwork.getTlsStatus":{capName:`local-network`,capScope:`system`,addonId:null,access:`view`},"localNetwork.getViewerEndpoints":{capName:`local-network`,capScope:`system`,addonId:null,access:`view`},"localNetwork.list":{capName:`local-network`,capScope:`system`,addonId:null,access:`view`},"localNetwork.regenerateCertificate":{capName:`local-network`,capScope:`system`,addonId:null,access:`create`},"localNetwork.resetAllowlistToBestMatch":{capName:`local-network`,capScope:`system`,addonId:null,access:`delete`},"localNetwork.revertToGeneratedCertificate":{capName:`local-network`,capScope:`system`,addonId:null,access:`create`},"localNetwork.setAllowedAddresses":{capName:`local-network`,capScope:`system`,addonId:null,access:`create`},"localNetwork.setNotificationEndpoint":{capName:`local-network`,capScope:`system`,addonId:null,access:`create`},"localNetwork.setViewerEndpoints":{capName:`local-network`,capScope:`system`,addonId:null,access:`create`},"localNetwork.uploadCertificate":{capName:`local-network`,capScope:`system`,addonId:null,access:`create`},"lockControl.lock":{capName:`lock-control`,capScope:`device`,addonId:null,access:`create`},"lockControl.open":{capName:`lock-control`,capScope:`device`,addonId:null,access:`create`},"lockControl.unlock":{capName:`lock-control`,capScope:`device`,addonId:null,access:`create`},"logChannels.apply":{capName:`log-channels`,capScope:`system`,addonId:null,access:`create`},"logChannels.list":{capName:`log-channels`,capScope:`system`,addonId:null,access:`view`},"logDestination.query":{capName:`log-destination`,capScope:`system`,addonId:null,access:`view`},"logDestination.write":{capName:`log-destination`,capScope:`system`,addonId:null,access:`create`},"loginMethod.getLoginMethods":{capName:`login-method`,capScope:`system`,addonId:null,access:`view`},"mediaPlayer.next":{capName:`media-player`,capScope:`device`,addonId:null,access:`create`},"mediaPlayer.pause":{capName:`media-player`,capScope:`device`,addonId:null,access:`create`},"mediaPlayer.play":{capName:`media-player`,capScope:`device`,addonId:null,access:`create`},"mediaPlayer.playMedia":{capName:`media-player`,capScope:`device`,addonId:null,access:`create`},"mediaPlayer.previous":{capName:`media-player`,capScope:`device`,addonId:null,access:`create`},"mediaPlayer.seek":{capName:`media-player`,capScope:`device`,addonId:null,access:`create`},"mediaPlayer.selectSource":{capName:`media-player`,capScope:`device`,addonId:null,access:`create`},"mediaPlayer.setMute":{capName:`media-player`,capScope:`device`,addonId:null,access:`create`},"mediaPlayer.setRepeat":{capName:`media-player`,capScope:`device`,addonId:null,access:`create`},"mediaPlayer.setShuffle":{capName:`media-player`,capScope:`device`,addonId:null,access:`create`},"mediaPlayer.setVolume":{capName:`media-player`,capScope:`device`,addonId:null,access:`create`},"mediaPlayer.stop":{capName:`media-player`,capScope:`device`,addonId:null,access:`create`},"meshNetwork.getStatus":{capName:`mesh-network`,capScope:`system`,addonId:null,access:`view`},"meshNetwork.join":{capName:`mesh-network`,capScope:`system`,addonId:null,access:`create`},"meshNetwork.leave":{capName:`mesh-network`,capScope:`system`,addonId:null,access:`create`},"meshNetwork.listPeers":{capName:`mesh-network`,capScope:`system`,addonId:null,access:`view`},"meshNetwork.logout":{capName:`mesh-network`,capScope:`system`,addonId:null,access:`create`},"meshNetwork.startLogin":{capName:`mesh-network`,capScope:`system`,addonId:null,access:`create`},"meshNetwork.testConnection":{capName:`mesh-network`,capScope:`system`,addonId:null,access:`create`},"metricsProvider.collectSnapshot":{capName:`metrics-provider`,capScope:`system`,addonId:null,access:`view`},"metricsProvider.getAddonStats":{capName:`metrics-provider`,capScope:`system`,addonId:null,access:`view`},"metricsProvider.getCached":{capName:`metrics-provider`,capScope:`system`,addonId:null,access:`view`},"metricsProvider.getCpuTemperature":{capName:`metrics-provider`,capScope:`system`,addonId:null,access:`view`},"metricsProvider.getCurrent":{capName:`metrics-provider`,capScope:`system`,addonId:null,access:`view`},"metricsProvider.getDiskSpace":{capName:`metrics-provider`,capScope:`system`,addonId:null,access:`view`},"metricsProvider.getGpuInfo":{capName:`metrics-provider`,capScope:`system`,addonId:null,access:`view`},"metricsProvider.getLoadSeries":{capName:`metrics-provider`,capScope:`system`,addonId:null,access:`view`},"metricsProvider.getProcessStats":{capName:`metrics-provider`,capScope:`system`,addonId:null,access:`view`},"metricsProvider.listAddonInstances":{capName:`metrics-provider`,capScope:`system`,addonId:null,access:`view`},"metricsProvider.listNodeProcesses":{capName:`metrics-provider`,capScope:`system`,addonId:null,access:`view`},"modelConvert.convert":{capName:`model-convert`,capScope:`system`,addonId:null,access:`create`},"modelDistributor.distributeModel":{capName:`model-distributor`,capScope:`system`,addonId:null,access:`create`},"motion.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`},"nativeObjectDetection.setEnabled":{capName:`native-object-detection`,capScope:`device`,addonId:null,access:`create`},"navigation.getFeatures":{capName:`navigation`,capScope:`device`,addonId:null,access:`view`},"navigation.goToPoint":{capName:`navigation`,capScope:`device`,addonId:null,access:`create`},"navigation.listActions":{capName:`navigation`,capScope:`device`,addonId:null,access:`view`},"navigation.move":{capName:`navigation`,capScope:`device`,addonId:null,access:`create`},"navigation.playSound":{capName:`navigation`,capScope:`device`,addonId:null,access:`create`},"navigation.runAction":{capName:`navigation`,capScope:`device`,addonId:null,access:`create`},"navigation.setLightLevel":{capName:`navigation`,capScope:`device`,addonId:null,access:`create`},"navigation.setLightMode":{capName:`navigation`,capScope:`device`,addonId:null,access:`create`},"navigation.setLightOn":{capName:`navigation`,capScope:`device`,addonId:null,access:`create`},"navigation.stop":{capName:`navigation`,capScope:`device`,addonId:null,access:`create`},"networkAccess.getEndpoint":{capName:`network-access`,capScope:`system`,addonId:null,access:`view`},"networkAccess.getStatus":{capName:`network-access`,capScope:`system`,addonId:null,access:`view`},"networkAccess.listEndpoints":{capName:`network-access`,capScope:`system`,addonId:null,access:`view`},"networkAccess.start":{capName:`network-access`,capScope:`system`,addonId:null,access:`create`},"networkAccess.stop":{capName:`network-access`,capScope:`system`,addonId:null,access:`create`},"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.deleteTarget":{capName:`notification-output`,capScope:`system`,addonId:null,access:`delete`},"notificationOutput.discoverTargets":{capName:`notification-output`,capScope:`system`,addonId:null,access:`view`},"notificationOutput.listTargetKinds":{capName:`notification-output`,capScope:`system`,addonId:null,access:`view`},"notificationOutput.listTargets":{capName:`notification-output`,capScope:`system`,addonId:null,access:`view`},"notificationOutput.send":{capName:`notification-output`,capScope:`system`,addonId:null,access:`create`},"notificationOutput.setTargetEnabled":{capName:`notification-output`,capScope:`system`,addonId:null,access:`create`},"notificationOutput.testTarget":{capName:`notification-output`,capScope:`system`,addonId:null,access:`create`},"notificationOutput.upsertTarget":{capName:`notification-output`,capScope:`system`,addonId:null,access:`create`},"notificationRules.cancelSnooze":{capName:`notification-rules`,capScope:`system`,addonId:null,access:`create`},"notificationRules.createRule":{capName:`notification-rules`,capScope:`system`,addonId:null,access:`create`},"notificationRules.createSnooze":{capName:`notification-rules`,capScope:`system`,addonId:null,access:`create`},"notificationRules.deleteRule":{capName:`notification-rules`,capScope:`system`,addonId:null,access:`delete`},"notificationRules.getAlarmConfig":{capName:`notification-rules`,capScope:`system`,addonId:null,access:`view`},"notificationRules.getConditionCatalog":{capName:`notification-rules`,capScope:`system`,addonId:null,access:`view`},"notificationRules.getHistory":{capName:`notification-rules`,capScope:`system`,addonId:null,access:`view`},"notificationRules.getRule":{capName:`notification-rules`,capScope:`system`,addonId:null,access:`view`},"notificationRules.listDeviceMutes":{capName:`notification-rules`,capScope:`system`,addonId:null,access:`view`},"notificationRules.listRules":{capName:`notification-rules`,capScope:`system`,addonId:null,access:`view`},"notificationRules.listSnoozes":{capName:`notification-rules`,capScope:`system`,addonId:null,access:`view`},"notificationRules.resolveArtifactUrl":{capName:`notification-rules`,capScope:`system`,addonId:null,access:`view`},"notificationRules.setAlarmConfig":{capName:`notification-rules`,capScope:`system`,addonId:null,access:`create`},"notificationRules.setDeviceMuted":{capName:`notification-rules`,capScope:`system`,addonId:null,access:`create`},"notificationRules.setRuleEnabled":{capName:`notification-rules`,capScope:`system`,addonId:null,access:`create`},"notificationRules.testRule":{capName:`notification-rules`,capScope:`system`,addonId:null,access:`create`},"notificationRules.updateRule":{capName:`notification-rules`,capScope:`system`,addonId:null,access:`create`},"notifier.cancel":{capName:`notifier`,capScope:`device`,addonId:null,access:`create`},"notifier.send":{capName:`notifier`,capScope:`device`,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`},"osdManager.clearSlotBinding":{capName:`osd-manager`,capScope:`system`,addonId:null,access:`delete`},"osdManager.copyDeviceConfiguration":{capName:`osd-manager`,capScope:`system`,addonId:null,access:`create`},"osdManager.getConditionSupport":{capName:`osd-manager`,capScope:`system`,addonId:null,access:`view`},"osdManager.getDeviceOsd":{capName:`osd-manager`,capScope:`system`,addonId:null,access:`view`},"osdManager.getSourceCatalog":{capName:`osd-manager`,capScope:`system`,addonId:null,access:`view`},"osdManager.previewSlot":{capName:`osd-manager`,capScope:`system`,addonId:null,access:`create`},"osdManager.renderDevice":{capName:`osd-manager`,capScope:`system`,addonId:null,access:`create`},"osdManager.setSlotBinding":{capName:`osd-manager`,capScope:`system`,addonId:null,access:`create`},"petFeeder.callPet":{capName:`pet-feeder`,capScope:`device`,addonId:null,access:`create`},"petFeeder.cancelFeed":{capName:`pet-feeder`,capScope:`device`,addonId:null,access:`create`},"petFeeder.feed":{capName:`pet-feeder`,capScope:`device`,addonId:null,access:`create`},"petFeeder.markFoodReplenished":{capName:`pet-feeder`,capScope:`device`,addonId:null,access:`create`},"petFeeder.playSound":{capName:`pet-feeder`,capScope:`device`,addonId:null,access:`create`},"petFeeder.resetDesiccant":{capName:`pet-feeder`,capScope:`device`,addonId:null,access:`delete`},"petFeeder.setChildLock":{capName:`pet-feeder`,capScope:`device`,addonId:null,access:`create`},"petFeeder.setFeedSound":{capName:`pet-feeder`,capScope:`device`,addonId:null,access:`create`},"petFeeder.setIndicatorLight":{capName:`pet-feeder`,capScope:`device`,addonId:null,access:`create`},"petFeeder.setVolume":{capName:`pet-feeder`,capScope:`device`,addonId:null,access:`create`},"pipelineAnalytics.cancelRelocateMedia":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`create`},"pipelineAnalytics.cancelStorageMigrationMove":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`create`},"pipelineAnalytics.clearTracks":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`delete`},"pipelineAnalytics.completeRetrainTrack":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`create`},"pipelineAnalytics.countRelocatableMedia":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`},"pipelineAnalytics.countUnstampedEventMedia":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`},"pipelineAnalytics.deleteDeviceEvents":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`delete`},"pipelineAnalytics.deleteTracks":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`delete`},"pipelineAnalytics.deselectRetrainFrame":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`create`},"pipelineAnalytics.getActiveTracks":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`},"pipelineAnalytics.getAudioEvents":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`},"pipelineAnalytics.getEventDensity":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`},"pipelineAnalytics.getEventDensityBatch":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`},"pipelineAnalytics.getEventMedia":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`},"pipelineAnalytics.getEventMediaFootprintByKind":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`},"pipelineAnalytics.getEventStoreFootprint":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`},"pipelineAnalytics.getKeyEvents":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`},"pipelineAnalytics.getKeyEventsBatch":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`},"pipelineAnalytics.getMediaReclaimStatus":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`},"pipelineAnalytics.getMotionEvents":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`},"pipelineAnalytics.getObjectEmbeddingRebuildStatus":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`},"pipelineAnalytics.getObjectEvents":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`},"pipelineAnalytics.getRetrainExportUrl":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`},"pipelineAnalytics.getRetrainFrameImage":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`},"pipelineAnalytics.getSensorEvents":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`},"pipelineAnalytics.getStorageMigrationMoveStatus":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`},"pipelineAnalytics.getSummary":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`},"pipelineAnalytics.getTrack":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`},"pipelineAnalytics.getTrackMedia":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`},"pipelineAnalytics.getTrainingExportSummary":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`},"pipelineAnalytics.getTrainingExportUrl":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`},"pipelineAnalytics.listEventKinds":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`},"pipelineAnalytics.listEventKindsBatch":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`},"pipelineAnalytics.listEventMedia":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`},"pipelineAnalytics.listOpsLog":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`},"pipelineAnalytics.listRecentTracks":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`},"pipelineAnalytics.listRelocateMediaJobs":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`},"pipelineAnalytics.listRetrainAnnotations":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`},"pipelineAnalytics.listRetrainFrames":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`},"pipelineAnalytics.listRetrainStaging":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`},"pipelineAnalytics.listSummaries":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`},"pipelineAnalytics.listTrackMedia":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`},"pipelineAnalytics.listTracks":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`},"pipelineAnalytics.pauseForStorageMigration":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`create`},"pipelineAnalytics.proposeRetrainAnnotations":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`create`},"pipelineAnalytics.pruneEvents":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`create`},"pipelineAnalytics.pruneEventsBefore":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`create`},"pipelineAnalytics.pruneTracksBefore":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`create`},"pipelineAnalytics.rebuildObjectEmbeddings":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`create`},"pipelineAnalytics.reclaimDebugMedia":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`create`},"pipelineAnalytics.reconcileFromDisk":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`create`},"pipelineAnalytics.refreshStorageLocationsForMigration":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`create`},"pipelineAnalytics.relocateMedia":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`create`},"pipelineAnalytics.restageRetrainTrack":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`create`},"pipelineAnalytics.resumeForStorageMigration":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`create`},"pipelineAnalytics.runReplayFrameProcessor":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`create`},"pipelineAnalytics.saveRetrainAnnotations":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`create`},"pipelineAnalytics.searchObjectEvents":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`},"pipelineAnalytics.selectRetrainFrames":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`create`},"pipelineAnalytics.setTrackFlags":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`create`},"pipelineAnalytics.startStorageMigrationMove":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`create`},"pipelineAnalytics.wipeAllAnalytics":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`delete`},"pipelineAnalytics.wipeObjectEmbeddings":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`delete`},"pipelineExecutor.cacheFrameInPool":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`create`},"pipelineExecutor.clearDeviceOverrides":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`delete`},"pipelineExecutor.deleteModel":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`delete`},"pipelineExecutor.deleteTemplate":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`delete`},"pipelineExecutor.downloadModel":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`create`},"pipelineExecutor.getAddonModels":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`view`},"pipelineExecutor.getAudioCapabilities":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`view`},"pipelineExecutor.getAvailableEngines":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`view`},"pipelineExecutor.getCapabilities":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`view`},"pipelineExecutor.getDefaultSteps":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`view`},"pipelineExecutor.getDetectionConfigSchema":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`view`},"pipelineExecutor.getEffectiveTuning":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`view`},"pipelineExecutor.getEngineProvisioning":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`view`},"pipelineExecutor.getGlobalPipelineConfig":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`view`},"pipelineExecutor.getGlobalSteps":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`view`},"pipelineExecutor.getInferenceDeviceHealth":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`view`},"pipelineExecutor.getOrchestratorConfigSchema":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`view`},"pipelineExecutor.getReferenceAudio":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`view`},"pipelineExecutor.getReferenceAudioFiles":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`view`},"pipelineExecutor.getReferenceImage":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`view`},"pipelineExecutor.getSchema":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`view`},"pipelineExecutor.getSelectedEngine":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`view`},"pipelineExecutor.getVideoPipelineSteps":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`view`},"pipelineExecutor.inferCached":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`create`},"pipelineExecutor.killEngine":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`create`},"pipelineExecutor.listLoadedEngines":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`view`},"pipelineExecutor.listReferenceImages":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`view`},"pipelineExecutor.listTemplates":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`view`},"pipelineExecutor.rearmInferenceDevice":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`create`},"pipelineExecutor.runAudioTest":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`create`},"pipelineExecutor.runPipeline":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`create`},"pipelineExecutor.runPipelineBatch":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`create`},"pipelineExecutor.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`},"pipelineExecutor.validatePipeline":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`view`},"pipelineOrchestrator.assignAudio":{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.getCameraStatus":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`view`},"pipelineOrchestrator.getCameraStatuses":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`view`},"pipelineOrchestrator.getCameraStepOverrides":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`view`},"pipelineOrchestrator.getCameraSwitches":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`view`},"pipelineOrchestrator.getCapabilityBindings":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`view`},"pipelineOrchestrator.getGlobalMetrics":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`view`},"pipelineOrchestrator.getIngestOwner":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`view`},"pipelineOrchestrator.getNodeInferenceDevices":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`view`},"pipelineOrchestrator.getPipelineAssignment":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`view`},"pipelineOrchestrator.getPipelineAssignments":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`view`},"pipelineOrchestrator.getPipelineDevicePin":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`view`},"pipelineOrchestrator.getReconcileFromDiskStatus":{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.pauseForStorageMigration":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`create`},"pipelineOrchestrator.rebalance":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`create`},"pipelineOrchestrator.reconcileFromDisk":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`create`},"pipelineOrchestrator.removeAgentSettings":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`delete`},"pipelineOrchestrator.resetNodePipelineDefaults":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`delete`},"pipelineOrchestrator.resolvePipeline":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`view`},"pipelineOrchestrator.resumeForStorageMigration":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`create`},"pipelineOrchestrator.saveTemplate":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`create`},"pipelineOrchestrator.setAgentCapabilities":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`create`},"pipelineOrchestrator.setAgentDecodeLimits":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`create`},"pipelineOrchestrator.setAgentDetectWeight":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`create`},"pipelineOrchestrator.setAgentInferenceDevices":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`create`},"pipelineOrchestrator.setAgentMaxCameras":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`create`},"pipelineOrchestrator.setAgentReachableHost":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`create`},"pipelineOrchestrator.setCameraPipelineForAgent":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`create`},"pipelineOrchestrator.setCameraStepOverride":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`create`},"pipelineOrchestrator.setCameraStepToggle":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`create`},"pipelineOrchestrator.setCameraSwitch":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`create`},"pipelineOrchestrator.setCapabilityBinding":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`create`},"pipelineOrchestrator.setPipelineDevicePin":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`create`},"pipelineOrchestrator.unassignAudio":{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.getNativeCrop":{capName:`pipeline-runner`,capScope:`system`,addonId:null,access:`view`},"pipelineRunner.reportMotion":{capName:`pipeline-runner`,capScope:`system`,addonId:null,access:`create`},"pipelineRunner.runDetailSubtree":{capName:`pipeline-runner`,capScope:`system`,addonId:null,access:`create`},"pipelineRunner.runStatelessStep":{capName:`pipeline-runner`,capScope:`system`,addonId:null,access:`create`},"plateGallery.assignPlate":{capName:`plate-gallery`,capScope:`system`,addonId:null,access:`create`},"plateGallery.assignPlates":{capName:`plate-gallery`,capScope:`system`,addonId:null,access:`create`},"plateGallery.correctPlateText":{capName:`plate-gallery`,capScope:`system`,addonId:null,access:`create`},"plateGallery.createVehicle":{capName:`plate-gallery`,capScope:`system`,addonId:null,access:`create`},"plateGallery.deletePlate":{capName:`plate-gallery`,capScope:`system`,addonId:null,access:`delete`},"plateGallery.deleteVehicle":{capName:`plate-gallery`,capScope:`system`,addonId:null,access:`delete`},"plateGallery.getPlateByTrack":{capName:`plate-gallery`,capScope:`system`,addonId:null,access:`view`},"plateGallery.getPlateMedia":{capName:`plate-gallery`,capScope:`system`,addonId:null,access:`view`},"plateGallery.listPlates":{capName:`plate-gallery`,capScope:`system`,addonId:null,access:`view`},"plateGallery.listVehicles":{capName:`plate-gallery`,capScope:`system`,addonId:null,access:`view`},"plateGallery.listVehicleSamples":{capName:`plate-gallery`,capScope:`system`,addonId:null,access:`view`},"plateGallery.removeVehicleSample":{capName:`plate-gallery`,capScope:`system`,addonId:null,access:`delete`},"plateGallery.renameVehicle":{capName:`plate-gallery`,capScope:`system`,addonId:null,access:`create`},"plateGallery.searchPlates":{capName:`plate-gallery`,capScope:`system`,addonId:null,access:`view`},"plateGallery.suggestPlateClusters":{capName:`plate-gallery`,capScope:`system`,addonId:null,access:`view`},"plateGallery.unassignPlate":{capName:`plate-gallery`,capScope:`system`,addonId:null,access:`create`},"plateGallery.unassignPlates":{capName:`plate-gallery`,capScope:`system`,addonId:null,access:`create`},"platformProbe.getCapabilities":{capName:`platform-probe`,capScope:`system`,addonId:null,access:`view`},"platformProbe.getHardware":{capName:`platform-probe`,capScope:`system`,addonId:null,access:`view`},"platformProbe.resolveHwAccel":{capName:`platform-probe`,capScope:`system`,addonId:null,access:`view`},"platformProbe.resolveInferenceConfig":{capName:`platform-probe`,capScope:`system`,addonId:null,access:`view`},"privacyMask.getOptions":{capName:`privacy-mask`,capScope:`device`,addonId:null,access:`view`},"privacyMask.setAudioEnabled":{capName:`privacy-mask`,capScope:`device`,addonId:null,access:`create`},"privacyMask.setMask":{capName:`privacy-mask`,capScope:`device`,addonId:null,access:`create`},"ptz.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.cancelRelocateJob":{capName:`recording`,capScope:`system`,addonId:null,access:`create`},"recording.cancelStorageMigrationMove":{capName:`recording`,capScope:`system`,addonId:null,access:`create`},"recording.deleteFootprint":{capName:`recording`,capScope:`system`,addonId:null,access:`delete`},"recording.getAvailability":{capName:`recording`,capScope:`system`,addonId:null,access:`view`},"recording.getAvailabilityBatch":{capName:`recording`,capScope:`system`,addonId:null,access:`view`},"recording.getDaysWithRecordings":{capName:`recording`,capScope:`system`,addonId:null,access:`view`},"recording.getDaysWithRecordingsBatch":{capName:`recording`,capScope:`system`,addonId:null,access:`view`},"recording.getDeviceConfig":{capName:`recording`,capScope:`system`,addonId:null,access:`view`},"recording.getPlacement":{capName:`recording`,capScope:`system`,addonId:null,access:`view`},"recording.getPlaybackManifest":{capName:`recording`,capScope:`system`,addonId:null,access:`view`},"recording.getRelocateResidue":{capName:`recording`,capScope:`system`,addonId:null,access:`view`},"recording.getStorageMigrationMoveStatus":{capName:`recording`,capScope:`system`,addonId:null,access:`view`},"recording.getStorageUsage":{capName:`recording`,capScope:`system`,addonId:null,access:`view`},"recording.listOpsLog":{capName:`recording`,capScope:`system`,addonId:null,access:`view`},"recording.listRelocateJobs":{capName:`recording`,capScope:`system`,addonId:null,access:`view`},"recording.locateSegment":{capName:`recording`,capScope:`system`,addonId:null,access:`view`},"recording.pauseForStorageMigration":{capName:`recording`,capScope:`system`,addonId:null,access:`create`},"recording.planStorageRebalance":{capName:`recording`,capScope:`system`,addonId:null,access:`view`},"recording.pruneFootage":{capName:`recording`,capScope:`system`,addonId:null,access:`create`},"recording.readGopBytes":{capName:`recording`,capScope:`system`,addonId:null,access:`view`},"recording.readSegmentBytes":{capName:`recording`,capScope:`system`,addonId:null,access:`view`},"recording.readWindowBytes":{capName:`recording`,capScope:`system`,addonId:null,access:`view`},"recording.reconcileLedgerAgainstDisk":{capName:`recording`,capScope:`system`,addonId:null,access:`create`},"recording.refreshStorageLocationsForMigration":{capName:`recording`,capScope:`system`,addonId:null,access:`create`},"recording.relocateFootage":{capName:`recording`,capScope:`system`,addonId:null,access:`create`},"recording.renderClip":{capName:`recording`,capScope:`system`,addonId:null,access:`create`},"recording.renderGif":{capName:`recording`,capScope:`system`,addonId:null,access:`create`},"recording.rescanStorage":{capName:`recording`,capScope:`system`,addonId:null,access:`create`},"recording.resumeForStorageMigration":{capName:`recording`,capScope:`system`,addonId:null,access:`create`},"recording.setDeviceConfig":{capName:`recording`,capScope:`system`,addonId:null,access:`create`},"recording.setDevicePlacement":{capName:`recording`,capScope:`system`,addonId:null,access:`create`},"recording.startStorageMigrationMove":{capName:`recording`,capScope:`system`,addonId:null,access:`create`},"recording.startStorageRebalance":{capName:`recording`,capScope:`system`,addonId:null,access:`create`},"recordingExport.cancelExport":{capName:`recording-export`,capScope:`system`,addonId:null,access:`create`},"recordingExport.createExport":{capName:`recording-export`,capScope:`system`,addonId:null,access:`create`},"recordingExport.deleteExport":{capName:`recording-export`,capScope:`system`,addonId:null,access:`delete`},"recordingExport.getDownloadUrl":{capName:`recording-export`,capScope:`system`,addonId:null,access:`view`},"recordingExport.getExport":{capName:`recording-export`,capScope:`system`,addonId:null,access:`view`},"recordingExport.listExports":{capName:`recording-export`,capScope:`system`,addonId:null,access:`view`},"recordingExport.readExportBytes":{capName:`recording-export`,capScope:`system`,addonId:null,access:`view`},"recordingSignal.getStatus":{capName:`recording-signal`,capScope:`device`,addonId:null,access:`view`},"sceneMonitor.captureReference":{capName:`scene-monitor`,capScope:`device`,addonId:null,access:`create`},"sceneMonitor.createScene":{capName:`scene-monitor`,capScope:`device`,addonId:null,access:`create`},"sceneMonitor.deleteReference":{capName:`scene-monitor`,capScope:`device`,addonId:null,access:`delete`},"sceneMonitor.deleteScene":{capName:`scene-monitor`,capScope:`device`,addonId:null,access:`delete`},"sceneMonitor.listScenes":{capName:`scene-monitor`,capScope:`device`,addonId:null,access:`view`},"sceneMonitor.listScenesBatch":{capName:`scene-monitor`,capScope:`device`,addonId:null,access:`view`},"sceneMonitor.recheckNow":{capName:`scene-monitor`,capScope:`device`,addonId:null,access:`create`},"sceneMonitor.resetScene":{capName:`scene-monitor`,capScope:`device`,addonId:null,access:`delete`},"sceneMonitor.updateScene":{capName:`scene-monitor`,capScope:`device`,addonId:null,access:`create`},"scriptRunner.run":{capName:`script-runner`,capScope:`device`,addonId:null,access:`create`},"scriptRunner.stop":{capName:`script-runner`,capScope:`device`,addonId:null,access:`create`},"serverManagement.applyServerUpdate":{capName:`server-management`,capScope:`system`,addonId:null,access:`create`},"serverManagement.checkServerUpdate":{capName:`server-management`,capScope:`system`,addonId:null,access:`create`},"serverManagement.getServerPackageStatus":{capName:`server-management`,capScope:`system`,addonId:null,access:`view`},"serverManagement.restartServer":{capName:`server-management`,capScope:`system`,addonId:null,access:`create`},"serverManagement.rollbackServerUpdate":{capName:`server-management`,capScope:`system`,addonId:null,access:`create`},"settingsStore.aggregate":{capName:`settings-store`,capScope:`system`,addonId:null,access:`view`},"settingsStore.count":{capName:`settings-store`,capScope:`system`,addonId:null,access:`view`},"settingsStore.declareCollection":{capName:`settings-store`,capScope:`system`,addonId:null,access:`create`},"settingsStore.delete":{capName:`settings-store`,capScope:`system`,addonId:null,access:`delete`},"settingsStore.deleteWhere":{capName:`settings-store`,capScope:`system`,addonId:null,access:`delete`},"settingsStore.get":{capName:`settings-store`,capScope:`system`,addonId:null,access:`view`},"settingsStore.histogram":{capName:`settings-store`,capScope:`system`,addonId:null,access:`view`},"settingsStore.insert":{capName:`settings-store`,capScope:`system`,addonId:null,access:`create`},"settingsStore.insertMany":{capName:`settings-store`,capScope:`system`,addonId:null,access:`create`},"settingsStore.isEmpty":{capName:`settings-store`,capScope:`system`,addonId:null,access:`view`},"settingsStore.query":{capName:`settings-store`,capScope:`system`,addonId:null,access:`view`},"settingsStore.set":{capName:`settings-store`,capScope:`system`,addonId:null,access:`create`},"settingsStore.update":{capName:`settings-store`,capScope:`system`,addonId:null,access:`create`},"settingsStore.updateWhere":{capName:`settings-store`,capScope:`system`,addonId:null,access:`create`},"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.getDebugState":{capName:`snapshot`,capScope:`device`,addonId:null,access:`view`},"snapshot.getSnapshot":{capName:`snapshot`,capScope:`device`,addonId:null,access:`view`},"snapshot.getSnapshotLinks":{capName:`snapshot`,capScope:`device`,addonId:null,access:`view`},"snapshot.getSnapshotOverview":{capName:`snapshot`,capScope:`device`,addonId:null,access:`view`},"snapshot.invalidateCache":{capName:`snapshot`,capScope:`device`,addonId:null,access:`create`},"ssoBridge.signBridgeToken":{capName:`sso-bridge`,capScope:`system`,addonId:null,access:`view`},"ssoBridge.verifyBridgeToken":{capName:`sso-bridge`,capScope:`system`,addonId:null,access:`view`},"storage.abortUpload":{capName:`storage`,capScope:`system`,addonId:null,access:`create`},"storage.beginDownload":{capName:`storage`,capScope:`system`,addonId:null,access:`create`},"storage.beginUpload":{capName:`storage`,capScope:`system`,addonId:null,access:`create`},"storage.delete":{capName:`storage`,capScope:`system`,addonId:null,access:`delete`},"storage.deleteLocation":{capName:`storage`,capScope:`system`,addonId:null,access:`delete`},"storage.endDownload":{capName:`storage`,capScope:`system`,addonId:null,access:`create`},"storage.exists":{capName:`storage`,capScope:`system`,addonId:null,access:`view`},"storage.finalizeUpload":{capName:`storage`,capScope:`system`,addonId:null,access:`create`},"storage.getAvailableSpace":{capName:`storage`,capScope:`system`,addonId:null,access:`view`},"storage.list":{capName:`storage`,capScope:`system`,addonId:null,access:`view`},"storage.listDrainProgress":{capName:`storage`,capScope:`system`,addonId:null,access:`view`},"storage.listLocationDeclarations":{capName:`storage`,capScope:`system`,addonId:null,access:`view`},"storage.listLocations":{capName:`storage`,capScope:`system`,addonId:null,access:`view`},"storage.listProviders":{capName:`storage`,capScope:`system`,addonId:null,access:`view`},"storage.read":{capName:`storage`,capScope:`system`,addonId:null,access:`view`},"storage.readChunk":{capName:`storage`,capScope:`system`,addonId:null,access:`view`},"storage.resolve":{capName:`storage`,capScope:`system`,addonId:null,access:`view`},"storage.testConfig":{capName:`storage`,capScope:`system`,addonId:null,access:`view`},"storage.testLocation":{capName:`storage`,capScope:`system`,addonId:null,access:`view`},"storage.upsertLocation":{capName:`storage`,capScope:`system`,addonId:null,access:`create`},"storage.write":{capName:`storage`,capScope:`system`,addonId:null,access:`create`},"storage.writeChunk":{capName:`storage`,capScope:`system`,addonId:null,access:`create`},"storageEvictable.evict":{capName:`storage-evictable`,capScope:`system`,addonId:null,access:`create`},"storageEvictable.getEvictableUsage":{capName:`storage-evictable`,capScope:`system`,addonId:null,access:`view`},"storageMigration.cancel":{capName:`storage-migration`,capScope:`system`,addonId:null,access:`create`},"storageMigration.cleanupCancel":{capName:`storage-migration`,capScope:`system`,addonId:null,access:`create`},"storageMigration.cleanupStart":{capName:`storage-migration`,capScope:`system`,addonId:null,access:`create`},"storageMigration.cleanupStatus":{capName:`storage-migration`,capScope:`system`,addonId:null,access:`view`},"storageMigration.drain":{capName:`storage-migration`,capScope:`system`,addonId:null,access:`create`},"storageMigration.history":{capName:`storage-migration`,capScope:`system`,addonId:null,access:`view`},"storageMigration.movers":{capName:`storage-migration`,capScope:`system`,addonId:null,access:`view`},"storageMigration.plan":{capName:`storage-migration`,capScope:`system`,addonId:null,access:`view`},"storageMigration.residue":{capName:`storage-migration`,capScope:`system`,addonId:null,access:`view`},"storageMigration.start":{capName:`storage-migration`,capScope:`system`,addonId:null,access:`create`},"storageMigration.status":{capName:`storage-migration`,capScope:`system`,addonId:null,access:`view`},"storageOccupancy.getOccupancy":{capName:`storage-occupancy`,capScope:`system`,addonId:null,access:`view`},"storageProvider.abortUpload":{capName:`storage-provider`,capScope:`system`,addonId:null,access:`create`},"storageProvider.beginDownload":{capName:`storage-provider`,capScope:`system`,addonId:null,access:`create`},"storageProvider.beginUpload":{capName:`storage-provider`,capScope:`system`,addonId:null,access:`create`},"storageProvider.delete":{capName:`storage-provider`,capScope:`system`,addonId:null,access:`delete`},"storageProvider.endDownload":{capName:`storage-provider`,capScope:`system`,addonId:null,access:`create`},"storageProvider.exists":{capName:`storage-provider`,capScope:`system`,addonId:null,access:`view`},"storageProvider.finalizeUpload":{capName:`storage-provider`,capScope:`system`,addonId:null,access:`create`},"storageProvider.getAvailableSpace":{capName:`storage-provider`,capScope:`system`,addonId:null,access:`view`},"storageProvider.getProviderInfo":{capName:`storage-provider`,capScope:`system`,addonId:null,access:`view`},"storageProvider.list":{capName:`storage-provider`,capScope:`system`,addonId:null,access:`view`},"storageProvider.read":{capName:`storage-provider`,capScope:`system`,addonId:null,access:`view`},"storageProvider.readChunk":{capName:`storage-provider`,capScope:`system`,addonId:null,access:`view`},"storageProvider.resolve":{capName:`storage-provider`,capScope:`system`,addonId:null,access:`view`},"storageProvider.testLocation":{capName:`storage-provider`,capScope:`system`,addonId:null,access:`view`},"storageProvider.write":{capName:`storage-provider`,capScope:`system`,addonId:null,access:`create`},"storageProvider.writeChunk":{capName:`storage-provider`,capScope:`system`,addonId:null,access:`create`},"streamBroker.acquireEgressTranscode":{capName:`stream-broker`,capScope:`system`,addonId:null,access:`create`},"streamBroker.assignProfile":{capName:`stream-broker`,capScope:`system`,addonId:null,access:`create`},"streamBroker.fetchEventMedia":{capName:`stream-broker`,capScope:`system`,addonId:null,access:`create`},"streamBroker.forgetDeviceHardware":{capName:`stream-broker`,capScope:`system`,addonId:null,access:`delete`},"streamBroker.getAllRtspEntries":{capName:`stream-broker`,capScope:`system`,addonId:null,access:`view`},"streamBroker.getBrokerStats":{capName:`stream-broker`,capScope:`system`,addonId:null,access:`view`},"streamBroker.getDeviceAudioMute":{capName:`stream-broker`,capScope:`system`,addonId:null,access:`view`},"streamBroker.getPreBufferInfo":{capName:`stream-broker`,capScope:`system`,addonId:null,access:`view`},"streamBroker.getRtspEntry":{capName:`stream-broker`,capScope:`system`,addonId:null,access:`view`},"streamBroker.getRtspPort":{capName:`stream-broker`,capScope:`system`,addonId:null,access:`view`},"streamBroker.getStreamUrl":{capName:`stream-broker`,capScope:`system`,addonId:null,access:`view`},"streamBroker.getStreamWithCodec":{capName:`stream-broker`,capScope:`system`,addonId:null,access:`create`},"streamBroker.isRtspEnabled":{capName:`stream-broker`,capScope:`system`,addonId:null,access:`view`},"streamBroker.killClient":{capName:`stream-broker`,capScope:`system`,addonId:null,access:`create`},"streamBroker.listAllCameraStreams":{capName:`stream-broker`,capScope:`system`,addonId:null,access:`view`},"streamBroker.listAllProfileSlots":{capName:`stream-broker`,capScope:`system`,addonId:null,access:`view`},"streamBroker.listClients":{capName:`stream-broker`,capScope:`system`,addonId:null,access:`view`},"streamBroker.probeStream":{capName:`stream-broker`,capScope:`system`,addonId:null,access:`create`},"streamBroker.produceEventMedia":{capName:`stream-broker`,capScope:`system`,addonId:null,access:`create`},"streamBroker.publishCameraStream":{capName:`stream-broker`,capScope:`system`,addonId:null,access:`create`},"streamBroker.pullAudioChunks":{capName:`stream-broker`,capScope:`system`,addonId:null,access:`view`},"streamBroker.pullFrameHandles":{capName:`stream-broker`,capScope:`system`,addonId:null,access:`view`},"streamBroker.regenerateRtspToken":{capName:`stream-broker`,capScope:`system`,addonId:null,access:`create`},"streamBroker.releaseEgressTranscode":{capName:`stream-broker`,capScope:`system`,addonId:null,access:`create`},"streamBroker.releaseStreamWithCodec":{capName:`stream-broker`,capScope:`system`,addonId:null,access:`create`},"streamBroker.renderPreBufferClip":{capName:`stream-broker`,capScope:`system`,addonId:null,access:`create`},"streamBroker.restartProfile":{capName:`stream-broker`,capScope:`system`,addonId:null,access:`create`},"streamBroker.retractCameraStream":{capName:`stream-broker`,capScope:`system`,addonId:null,access:`create`},"streamBroker.setDeviceAudioMute":{capName:`stream-broker`,capScope:`system`,addonId:null,access:`create`},"streamBroker.setPreBufferDuration":{capName:`stream-broker`,capScope:`system`,addonId:null,access:`create`},"streamBroker.setRtspEnabled":{capName:`stream-broker`,capScope:`system`,addonId:null,access:`create`},"streamBroker.subscribeAudioChunks":{capName:`stream-broker`,capScope:`system`,addonId:null,access:`create`},"streamBroker.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`},"streamCatalog.getCatalog":{capName:`stream-catalog`,capScope:`device`,addonId:null,access:`view`},"streamParams.getConfigSchema":{capName:`stream-params`,capScope:`device`,addonId:null,access:`view`},"streamParams.getOptions":{capName:`stream-params`,capScope:`device`,addonId:null,access:`view`},"streamParams.setProfile":{capName:`stream-params`,capScope:`device`,addonId:null,access:`create`},"switch.setState":{capName:`switch`,capScope:`device`,addonId:null,access:`create`},"system.detectSiteLocation":{capName:`system`,capScope:`system`,addonId:null,access:`create`},"system.featureFlags":{capName:`system`,capScope:`system`,addonId:null,access:`view`},"system.forceRetentionCleanup":{capName:`system`,capScope:`system`,addonId:null,access:`create`},"system.getFailureContributions":{capName:`system`,capScope:`system`,addonId:null,access:`view`},"system.getLoadContributions":{capName:`system`,capScope:`system`,addonId:null,access:`view`},"system.getLoggingSettings":{capName:`system`,capScope:`system`,addonId:null,access:`view`},"system.getRequestCensus":{capName:`system`,capScope:`system`,addonId:null,access:`view`},"system.getRetentionConfig":{capName:`system`,capScope:`system`,addonId:null,access:`view`},"system.getSiteLocation":{capName:`system`,capScope:`system`,addonId:null,access:`view`},"system.health":{capName:`system`,capScope:`system`,addonId:null,access:`view`},"system.info":{capName:`system`,capScope:`system`,addonId:null,access:`view`},"system.networkAddresses":{capName:`system`,capScope:`system`,addonId:null,access:`view`},"system.setLoggingSettings":{capName:`system`,capScope:`system`,addonId:null,access:`create`},"system.setRetentionConfig":{capName:`system`,capScope:`system`,addonId:null,access:`create`},"system.setSiteLocation":{capName:`system`,capScope:`system`,addonId:null,access:`create`},"terminalSession.adoptLegacyMonitor":{capName:`terminal-session`,capScope:`system`,addonId:null,access:`create`},"terminalSession.close":{capName:`terminal-session`,capScope:`system`,addonId:null,access:`create`},"terminalSession.createInstance":{capName:`terminal-session`,capScope:`system`,addonId:null,access:`create`},"terminalSession.deleteInstance":{capName:`terminal-session`,capScope:`system`,addonId:null,access:`delete`},"terminalSession.listInstances":{capName:`terminal-session`,capScope:`system`,addonId:null,access:`view`},"terminalSession.listLegacyCameras":{capName:`terminal-session`,capScope:`system`,addonId:null,access:`view`},"terminalSession.listProfiles":{capName:`terminal-session`,capScope:`system`,addonId:null,access:`view`},"terminalSession.listSessions":{capName:`terminal-session`,capScope:`system`,addonId:null,access:`view`},"terminalSession.openSession":{capName:`terminal-session`,capScope:`system`,addonId:null,access:`create`},"terminalSession.pullOutput":{capName:`terminal-session`,capScope:`system`,addonId:null,access:`create`},"terminalSession.resize":{capName:`terminal-session`,capScope:`system`,addonId:null,access:`create`},"terminalSession.setInstanceEnabled":{capName:`terminal-session`,capScope:`system`,addonId:null,access:`create`},"terminalSession.updateInstance":{capName:`terminal-session`,capScope:`system`,addonId:null,access:`create`},"terminalSession.writeInput":{capName:`terminal-session`,capScope:`system`,addonId:null,access:`create`},"toast.onToast":{capName:`toast`,capScope:`system`,addonId:null,access:`view`},"turnProvider.getTurnServers":{capName:`turn-provider`,capScope:`system`,addonId:null,access:`view`},"update.installUpdate":{capName:`update`,capScope:`device`,addonId:null,access:`create`},"userManagement.confirmTotp":{capName:`user-management`,capScope:`system`,addonId:null,access:`create`},"userManagement.createApiKey":{capName:`user-management`,capScope:`system`,addonId:null,access:`create`},"userManagement.createScopedToken":{capName:`user-management`,capScope:`system`,addonId:null,access:`create`},"userManagement.createUser":{capName:`user-management`,capScope:`system`,addonId:null,access:`create`},"userManagement.deleteUser":{capName:`user-management`,capScope:`system`,addonId:null,access:`delete`},"userManagement.disableTotp":{capName:`user-management`,capScope:`system`,addonId:null,access:`delete`},"userManagement.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.beginDiscoverableAuthentication":{capName:`user-passkeys`,capScope:`system`,addonId:null,access:`view`},"userPasskeys.beginRegistration":{capName:`user-passkeys`,capScope:`system`,addonId:null,access:`create`},"userPasskeys.finishAuthentication":{capName:`user-passkeys`,capScope:`system`,addonId:null,access:`view`},"userPasskeys.finishDiscoverableAuthentication":{capName:`user-passkeys`,capScope:`system`,addonId:null,access:`view`},"userPasskeys.finishRegistration":{capName:`user-passkeys`,capScope:`system`,addonId:null,access:`create`},"userPasskeys.getSecondFactorPreference":{capName:`user-passkeys`,capScope:`system`,addonId:null,access:`view`},"userPasskeys.listPasskeys":{capName:`user-passkeys`,capScope:`system`,addonId:null,access:`view`},"userPasskeys.removePasskey":{capName:`user-passkeys`,capScope:`system`,addonId:null,access:`delete`},"userPasskeys.setSecondFactorPreference":{capName:`user-passkeys`,capScope:`system`,addonId:null,access:`create`},"vacuumControl.locate":{capName:`vacuum-control`,capScope:`device`,addonId:null,access:`create`},"vacuumControl.pause":{capName:`vacuum-control`,capScope:`device`,addonId:null,access:`create`},"vacuumControl.returnToBase":{capName:`vacuum-control`,capScope:`device`,addonId:null,access:`create`},"vacuumControl.setFanSpeed":{capName:`vacuum-control`,capScope:`device`,addonId:null,access:`create`},"vacuumControl.start":{capName:`vacuum-control`,capScope:`device`,addonId:null,access:`create`},"vacuumControl.stop":{capName:`vacuum-control`,capScope:`device`,addonId:null,access:`create`},"valve.close":{capName:`valve`,capScope:`device`,addonId:null,access:`create`},"valve.open":{capName:`valve`,capScope:`device`,addonId:null,access:`create`},"valve.setPosition":{capName:`valve`,capScope:`device`,addonId:null,access:`create`},"valve.stop":{capName:`valve`,capScope:`device`,addonId:null,access:`create`},"vectorStore.declareIndex":{capName:`vector-store`,capScope:`system`,addonId:null,access:`create`},"vectorStore.deleteByFilter":{capName:`vector-store`,capScope:`system`,addonId:null,access:`delete`},"vectorStore.deleteByIds":{capName:`vector-store`,capScope:`system`,addonId:null,access:`delete`},"vectorStore.fetchByIds":{capName:`vector-store`,capScope:`system`,addonId:null,access:`view`},"vectorStore.getByIds":{capName:`vector-store`,capScope:`system`,addonId:null,access:`view`},"vectorStore.query":{capName:`vector-store`,capScope:`system`,addonId:null,access:`view`},"vectorStore.scan":{capName:`vector-store`,capScope:`system`,addonId:null,access:`view`},"vectorStore.stats":{capName:`vector-store`,capScope:`system`,addonId:null,access:`view`},"vectorStore.upsert":{capName:`vector-store`,capScope:`system`,addonId:null,access:`create`},"videoclips.getClipPlayback":{capName:`videoclips`,capScope:`device`,addonId:null,access:`view`},"videoclips.listClips":{capName:`videoclips`,capScope:`device`,addonId:null,access:`view`},"viewerUi.getStaticDir":{capName:`viewer-ui`,capScope:`system`,addonId:null,access:`view`},"viewerUi.getVersion":{capName:`viewer-ui`,capScope:`system`,addonId:null,access:`view`},"waterHeater.setAway":{capName:`water-heater`,capScope:`device`,addonId:null,access:`create`},"waterHeater.setOperationMode":{capName:`water-heater`,capScope:`device`,addonId:null,access:`create`},"waterHeater.setTargetTemp":{capName:`water-heater`,capScope:`device`,addonId:null,access:`create`},"webrtcSession.addIceCandidate":{capName:`webrtc-session`,capScope:`device`,addonId:null,access:`create`},"webrtcSession.closeSession":{capName:`webrtc-session`,capScope:`device`,addonId:null,access:`create`},"webrtcSession.createSession":{capName:`webrtc-session`,capScope:`device`,addonId:null,access:`create`},"webrtcSession.getIceCandidates":{capName:`webrtc-session`,capScope:`device`,addonId:null,access:`view`},"webrtcSession.getSessionState":{capName:`webrtc-session`,capScope:`device`,addonId:null,access:`view`},"webrtcSession.handleAnswer":{capName:`webrtc-session`,capScope:`device`,addonId:null,access:`create`},"webrtcSession.handleOffer":{capName:`webrtc-session`,capScope:`device`,addonId:null,access:`create`},"webrtcSession.hasAdaptiveBitrate":{capName:`webrtc-session`,capScope:`device`,addonId:null,access:`view`},"webrtcSession.listStreams":{capName:`webrtc-session`,capScope:`device`,addonId:null,access:`view`},"zoneAnalytics.getCameraHistory":{capName:`zone-analytics`,capScope:`device`,addonId:null,access:`view`},"zoneAnalytics.getCurrentSnapshot":{capName:`zone-analytics`,capScope:`device`,addonId:null,access:`view`},"zoneAnalytics.getCurrentSnapshotBatch":{capName:`zone-analytics`,capScope:`device`,addonId:null,access:`view`},"zoneAnalytics.getUnzonedHistory":{capName:`zone-analytics`,capScope:`device`,addonId:null,access:`view`},"zoneAnalytics.getZoneHistory":{capName:`zone-analytics`,capScope:`device`,addonId:null,access:`view`},"zoneRules.listRules":{capName:`zone-rules`,capScope:`device`,addonId:null,access:`view`},"zoneRules.setRules":{capName:`zone-rules`,capScope:`device`,addonId:null,access:`create`},"zones.addZone":{capName:`zones`,capScope:`device`,addonId:null,access:`create`},"zones.listZones":{capName:`zones`,capScope:`device`,addonId:null,access:`view`},"zones.removeZone":{capName:`zones`,capScope:`device`,addonId:null,access:`delete`},"zones.updateZone":{capName:`zones`,capScope:`device`,addonId:null,access:`create`}}),PM=`accessories.addon-pages.addon-pages-source.addon-routes.addon-settings.addon-widgets.addon-widgets-source.addons.admin-ui.alarm-panel.alerts.audio-analysis.audio-analyzer.audio-codec.audio-metrics.auth-provider.automation-control.backup.battery.brightness.broker.button.camera-credentials.camera-streams.climate-control.color.connection-test.consumables.control.core-blocks.cover.custom-model-registry.data-store-provider.day-night.decoder.device-adoption.device-discovery.device-export.device-manager.device-ops.device-provider.device-state.embedding-encoder.events.face-gallery.failure-contribution.fan-control.filesystem-browse.humidifier.image-settings.integrations.intercom.lawn-mower-control.llm.llm-runtime.load-contribution.local-network.lock-control.log-channels.log-destination.login-method.media-player.mesh-network.metrics-provider.model-convert.model-distributor.motion.motion-detection.motion-trigger.motion-zones.mqtt-broker.native-object-detection.navigation.network-access.network-quality.nodes.notification-output.notification-rules.notifier.oauth-integration.osd.osd-manager.pet-feeder.pipeline-analytics.pipeline-executor.pipeline-orchestrator.pipeline-runner.plate-gallery.platform-probe.privacy-mask.ptz.ptz-autotrack.reboot.recording.recording-export.recording-signal.scene-monitor.script-runner.server-management.settings-store.smtp-provider.snapshot.sso-bridge.storage.storage-evictable.storage-migration.storage-occupancy.storage-provider.stream-broker.stream-catalog.stream-params.switch.system.terminal-session.toast.turn-provider.update.user-management.user-passkeys.vacuum-control.valve.vector-store.videoclips.viewer-ui.water-heater.webrtc-session.zone-analytics.zone-rules.zones`.split(`.`),FM=`accessories.alarm-panel.audio-analysis.audio-metrics.automation-control.battery.brightness.button.camera-credentials.camera-streams.climate-control.color.consumables.control.cover.day-night.device-discovery.device-ops.events.fan-control.humidifier.image-settings.intercom.lawn-mower-control.lock-control.media-player.motion.motion-detection.motion-trigger.motion-zones.native-object-detection.navigation.notifier.osd.pet-feeder.pipeline-analytics.privacy-mask.ptz.ptz-autotrack.reboot.recording-signal.scene-monitor.script-runner.snapshot.stream-catalog.stream-params.switch.update.vacuum-control.valve.videoclips.water-heater.webrtc-session.zone-analytics.zone-rules.zones`.split(`.`),IM=`addon-pages.addon-pages-source.addon-routes.addon-settings.addon-widgets.addon-widgets-source.addons.admin-ui.alerts.audio-analyzer.audio-codec.auth-provider.backup.broker.connection-test.core-blocks.custom-model-registry.data-store-provider.decoder.device-adoption.device-export.device-manager.device-provider.device-state.embedding-encoder.face-gallery.failure-contribution.filesystem-browse.integrations.llm.llm-runtime.load-contribution.local-network.log-channels.log-destination.login-method.mesh-network.metrics-provider.model-convert.model-distributor.mqtt-broker.network-access.network-quality.nodes.notification-output.notification-rules.oauth-integration.osd-manager.pipeline-executor.pipeline-orchestrator.pipeline-runner.plate-gallery.platform-probe.recording.recording-export.server-management.settings-store.smtp-provider.sso-bridge.storage.storage-evictable.storage-migration.storage-occupancy.storage-provider.stream-broker.system.terminal-session.toast.turn-provider.user-management.user-passkeys.vector-store.viewer-ui`.split(`.`),LM=Object.freeze({"accessories.setChildHidden":[{name:`childDeviceId`,form:`single`,optional:!1},{name:`deviceId`,form:`single`,optional:!1}],"addonSettings.getDeviceSettings":[{name:`deviceId`,form:`single`,optional:!1}],"addonSettings.updateDeviceSettings":[{name:`deviceId`,form:`single`,optional:!1}],"alarmPanel.arm":[{name:`deviceId`,form:`single`,optional:!1}],"alarmPanel.disarm":[{name:`deviceId`,form:`single`,optional:!1}],"alarmPanel.trigger":[{name:`deviceId`,form:`single`,optional:!1}],"audioAnalysis.resolveDeviceSettings":[{name:`deviceId`,form:`single`,optional:!1}],"audioAnalyzer.classify":[{name:`deviceId`,form:`single`,optional:!0}],"audioMetrics.getCurrentSnapshot":[{name:`deviceId`,form:`single`,optional:!1}],"audioMetrics.getHistory":[{name:`deviceId`,form:`single`,optional:!1}],"automationControl.disable":[{name:`deviceId`,form:`single`,optional:!1}],"automationControl.enable":[{name:`deviceId`,form:`single`,optional:!1}],"automationControl.trigger":[{name:`deviceId`,form:`single`,optional:!1}],"battery.wakeForStream":[{name:`deviceId`,form:`single`,optional:!1}],"brightness.setBrightness":[{name:`deviceId`,form:`single`,optional:!1}],"button.press":[{name:`deviceId`,form:`single`,optional:!1}],"cameraCredentials.getCredentials":[{name:`deviceId`,form:`single`,optional:!1}],"cameraStreams.getBrokerStreams":[{name:`deviceId`,form:`single`,optional:!1}],"cameraStreams.getCameraStreams":[{name:`deviceId`,form:`single`,optional:!1}],"cameraStreams.getProfileRtspEntries":[{name:`deviceId`,form:`single`,optional:!1}],"cameraStreams.getRtspEntries":[{name:`deviceId`,form:`single`,optional:!1}],"cameraStreams.pickStream":[{name:`deviceId`,form:`single`,optional:!1}],"climateControl.setFanMode":[{name:`deviceId`,form:`single`,optional:!1}],"climateControl.setMode":[{name:`deviceId`,form:`single`,optional:!1}],"climateControl.setPreset":[{name:`deviceId`,form:`single`,optional:!1}],"climateControl.setSwingHorizontal":[{name:`deviceId`,form:`single`,optional:!1}],"climateControl.setSwingVertical":[{name:`deviceId`,form:`single`,optional:!1}],"climateControl.setTarget":[{name:`deviceId`,form:`single`,optional:!1}],"climateControl.setTargetHumidity":[{name:`deviceId`,form:`single`,optional:!1}],"climateControl.setTargetRange":[{name:`deviceId`,form:`single`,optional:!1}],"color.setColor":[{name:`deviceId`,form:`single`,optional:!1}],"consumables.reset":[{name:`deviceId`,form:`single`,optional:!1}],"control.setValue":[{name:`deviceId`,form:`single`,optional:!1}],"cover.close":[{name:`deviceId`,form:`single`,optional:!1}],"cover.open":[{name:`deviceId`,form:`single`,optional:!1}],"cover.setPosition":[{name:`deviceId`,form:`single`,optional:!1}],"cover.setTiltPosition":[{name:`deviceId`,form:`single`,optional:!1}],"cover.stop":[{name:`deviceId`,form:`single`,optional:!1}],"dayNight.getOptions":[{name:`deviceId`,form:`single`,optional:!1}],"dayNight.setSettings":[{name:`deviceId`,form:`single`,optional:!1}],"decoder.createSession":[{name:`deviceId`,form:`single`,optional:!0}],"deviceAdoption.release":[{name:`camDeviceId`,form:`single`,optional:!1}],"deviceAdoption.resync":[{name:`camDeviceId`,form:`single`,optional:!1}],"deviceDiscovery.adoptDevice":[{name:`deviceId`,form:`single`,optional:!1}],"deviceDiscovery.listDiscovered":[{name:`deviceId`,form:`single`,optional:!1}],"deviceDiscovery.refreshDiscovery":[{name:`deviceId`,form:`single`,optional:!1}],"deviceDiscovery.releaseDevice":[{name:`childDeviceId`,form:`single`,optional:!1},{name:`deviceId`,form:`single`,optional:!1}],"deviceManager.adoptionRelease":[{name:`camDeviceId`,form:`single`,optional:!1}],"deviceManager.adoptionResync":[{name:`camDeviceId`,form:`single`,optional:!1}],"deviceManager.applyInitialMeta":[{name:`deviceId`,form:`single`,optional:!1},{name:`linkDeviceId`,form:`single`,optional:!0}],"deviceManager.disable":[{name:`deviceId`,form:`single`,optional:!1}],"deviceManager.enable":[{name:`deviceId`,form:`single`,optional:!1}],"deviceManager.getBindings":[{name:`deviceId`,form:`single`,optional:!1}],"deviceManager.getBindingsBatch":[{name:`deviceIds`,form:`array`,optional:!1}],"deviceManager.getChildren":[{name:`parentDeviceId`,form:`single`,optional:!1}],"deviceManager.getChildrenBatch":[{name:`parentDeviceIds`,form:`array`,optional:!1}],"deviceManager.getConfigSchema":[{name:`deviceId`,form:`single`,optional:!1}],"deviceManager.getDevice":[{name:`deviceId`,form:`single`,optional:!1}],"deviceManager.getDeviceAggregate":[{name:`deviceId`,form:`single`,optional:!1}],"deviceManager.getDeviceLiveInfoAggregate":[{name:`deviceId`,form:`single`,optional:!1}],"deviceManager.getDeviceSettingsAggregate":[{name:`deviceId`,form:`single`,optional:!1}],"deviceManager.getDeviceStatusAggregate":[{name:`deviceId`,form:`single`,optional:!1}],"deviceManager.getDeviceStatusAggregateBatch":[{name:`deviceIds`,form:`array`,optional:!1}],"deviceManager.getLinkedDevices":[{name:`deviceId`,form:`single`,optional:!1}],"deviceManager.getLinkedDevicesBatch":[{name:`deviceIds`,form:`array`,optional:!1}],"deviceManager.getSettingsSchema":[{name:`deviceId`,form:`single`,optional:!1}],"deviceManager.getStreamProfileMap":[{name:`deviceId`,form:`single`,optional:!1}],"deviceManager.getStreamSources":[{name:`deviceId`,form:`single`,optional:!1}],"deviceManager.getWireableFields":[{name:`deviceId`,form:`single`,optional:!1}],"deviceManager.listAll":[{name:`deviceIds`,form:`array`,optional:!0}],"deviceManager.loadConfig":[{name:`deviceId`,form:`single`,optional:!1}],"deviceManager.loadMeta":[{name:`deviceId`,form:`single`,optional:!1}],"deviceManager.loadRuntimeState":[{name:`deviceId`,form:`single`,optional:!1}],"deviceManager.persistConfig":[{name:`deviceId`,form:`single`,optional:!1}],"deviceManager.probeStreams":[{name:`deviceId`,form:`single`,optional:!1}],"deviceManager.registerDevice":[{name:`parentDeviceId`,form:`single`,optional:!0}],"deviceManager.remove":[{name:`deviceId`,form:`single`,optional:!1}],"deviceManager.removeDevice":[{name:`deviceId`,form:`single`,optional:!1}],"deviceManager.runDeviceAction":[{name:`deviceId`,form:`single`,optional:!1}],"deviceManager.setChildLayout":[{name:`deviceId`,form:`single`,optional:!1}],"deviceManager.setDisabled":[{name:`deviceId`,form:`single`,optional:!1}],"deviceManager.setDisplay":[{name:`deviceId`,form:`single`,optional:!1}],"deviceManager.setIntegrationId":[{name:`deviceId`,form:`single`,optional:!1}],"deviceManager.setLinkDeviceId":[{name:`deviceId`,form:`single`,optional:!1},{name:`linkDeviceId`,form:`single`,optional:!0}],"deviceManager.setLocation":[{name:`deviceId`,form:`single`,optional:!1}],"deviceManager.setMetadata":[{name:`deviceId`,form:`single`,optional:!1}],"deviceManager.setName":[{name:`deviceId`,form:`single`,optional:!1}],"deviceManager.setPrimaryChildEntityId":[{name:`deviceId`,form:`single`,optional:!1}],"deviceManager.setRole":[{name:`deviceId`,form:`single`,optional:!1}],"deviceManager.setStreamProfileMap":[{name:`deviceId`,form:`single`,optional:!1}],"deviceManager.setType":[{name:`deviceId`,form:`single`,optional:!1}],"deviceManager.setWrapperActive":[{name:`deviceId`,form:`single`,optional:!1}],"deviceManager.testField":[{name:`deviceId`,form:`single`,optional:!1}],"deviceManager.updateConfig":[{name:`deviceId`,form:`single`,optional:!1}],"deviceManager.updateDeviceField":[{name:`deviceId`,form:`single`,optional:!1}],"deviceManager.updateDeviceFieldsBatch":[{name:`deviceId`,form:`single`,optional:!1}],"deviceOps.getConfigEntries":[{name:`deviceId`,form:`single`,optional:!1}],"deviceOps.getRawState":[{name:`deviceId`,form:`single`,optional:!1}],"deviceOps.getSettingsSchema":[{name:`deviceId`,form:`single`,optional:!1}],"deviceOps.getStreamSources":[{name:`deviceId`,form:`single`,optional:!1}],"deviceOps.removeDevice":[{name:`deviceId`,form:`single`,optional:!1}],"deviceOps.runAction":[{name:`deviceId`,form:`single`,optional:!1}],"deviceOps.setConfig":[{name:`deviceId`,form:`single`,optional:!1}],"deviceState.getCapSlice":[{name:`deviceId`,form:`single`,optional:!1}],"deviceState.getSnapshot":[{name:`deviceId`,form:`single`,optional:!1}],"deviceState.setCapSlice":[{name:`deviceId`,form:`single`,optional:!1}],"events.getEventClipUrl":[{name:`deviceId`,form:`single`,optional:!1}],"events.getEvents":[{name:`deviceId`,form:`single`,optional:!1}],"events.getEventThumbnail":[{name:`deviceId`,form:`single`,optional:!1}],"faceGallery.getFaceByTrack":[{name:`deviceId`,form:`single`,optional:!1}],"faceGallery.listRecentFaces":[{name:`deviceId`,form:`single`,optional:!0},{name:`deviceIds`,form:`array`,optional:!0}],"fanControl.setDirection":[{name:`deviceId`,form:`single`,optional:!1}],"fanControl.setOscillating":[{name:`deviceId`,form:`single`,optional:!1}],"fanControl.setPercentage":[{name:`deviceId`,form:`single`,optional:!1}],"fanControl.setPreset":[{name:`deviceId`,form:`single`,optional:!1}],"humidifier.setMode":[{name:`deviceId`,form:`single`,optional:!1}],"humidifier.setOn":[{name:`deviceId`,form:`single`,optional:!1}],"humidifier.setTargetHumidity":[{name:`deviceId`,form:`single`,optional:!1}],"imageSettings.getOptions":[{name:`deviceId`,form:`single`,optional:!1}],"imageSettings.setSettings":[{name:`deviceId`,form:`single`,optional:!1}],"intercom.endTalkSession":[{name:`deviceId`,form:`single`,optional:!1}],"intercom.handleAnswer":[{name:`deviceId`,form:`single`,optional:!1}],"intercom.pushTalkAudio":[{name:`deviceId`,form:`single`,optional:!1}],"intercom.startSession":[{name:`deviceId`,form:`single`,optional:!1}],"intercom.startTalkSession":[{name:`deviceId`,form:`single`,optional:!1}],"intercom.stopSession":[{name:`deviceId`,form:`single`,optional:!1}],"lawnMowerControl.dock":[{name:`deviceId`,form:`single`,optional:!1}],"lawnMowerControl.pause":[{name:`deviceId`,form:`single`,optional:!1}],"lawnMowerControl.startMowing":[{name:`deviceId`,form:`single`,optional:!1}],"lockControl.lock":[{name:`deviceId`,form:`single`,optional:!1}],"lockControl.open":[{name:`deviceId`,form:`single`,optional:!1}],"lockControl.unlock":[{name:`deviceId`,form:`single`,optional:!1}],"mediaPlayer.next":[{name:`deviceId`,form:`single`,optional:!1}],"mediaPlayer.pause":[{name:`deviceId`,form:`single`,optional:!1}],"mediaPlayer.play":[{name:`deviceId`,form:`single`,optional:!1}],"mediaPlayer.playMedia":[{name:`deviceId`,form:`single`,optional:!1}],"mediaPlayer.previous":[{name:`deviceId`,form:`single`,optional:!1}],"mediaPlayer.seek":[{name:`deviceId`,form:`single`,optional:!1}],"mediaPlayer.selectSource":[{name:`deviceId`,form:`single`,optional:!1}],"mediaPlayer.setMute":[{name:`deviceId`,form:`single`,optional:!1}],"mediaPlayer.setRepeat":[{name:`deviceId`,form:`single`,optional:!1}],"mediaPlayer.setShuffle":[{name:`deviceId`,form:`single`,optional:!1}],"mediaPlayer.setVolume":[{name:`deviceId`,form:`single`,optional:!1}],"mediaPlayer.stop":[{name:`deviceId`,form:`single`,optional:!1}],"motion.isDetected":[{name:`deviceId`,form:`single`,optional:!1}],"motionDetection.analyze":[{name:`deviceId`,form:`single`,optional:!1}],"motionDetection.removeCamera":[{name:`deviceId`,form:`single`,optional:!1}],"motionTrigger.setMotionTrigger":[{name:`deviceId`,form:`single`,optional:!1}],"motionZones.getOptions":[{name:`deviceId`,form:`single`,optional:!1}],"motionZones.setZone":[{name:`deviceId`,form:`single`,optional:!1}],"nativeObjectDetection.setEnabled":[{name:`deviceId`,form:`single`,optional:!1}],"navigation.getFeatures":[{name:`deviceId`,form:`single`,optional:!1}],"navigation.goToPoint":[{name:`deviceId`,form:`single`,optional:!1}],"navigation.listActions":[{name:`deviceId`,form:`single`,optional:!1}],"navigation.move":[{name:`deviceId`,form:`single`,optional:!1}],"navigation.playSound":[{name:`deviceId`,form:`single`,optional:!1}],"navigation.runAction":[{name:`deviceId`,form:`single`,optional:!1}],"navigation.setLightLevel":[{name:`deviceId`,form:`single`,optional:!1}],"navigation.setLightMode":[{name:`deviceId`,form:`single`,optional:!1}],"navigation.setLightOn":[{name:`deviceId`,form:`single`,optional:!1}],"navigation.stop":[{name:`deviceId`,form:`single`,optional:!1}],"networkQuality.getDeviceStats":[{name:`deviceId`,form:`single`,optional:!1}],"networkQuality.reportClientStats":[{name:`deviceId`,form:`single`,optional:!1}],"notificationRules.setDeviceMuted":[{name:`deviceId`,form:`single`,optional:!1}],"notifier.cancel":[{name:`deviceId`,form:`single`,optional:!1}],"notifier.send":[{name:`deviceId`,form:`single`,optional:!1}],"osd.setOverlay":[{name:`deviceId`,form:`single`,optional:!1}],"osdManager.clearSlotBinding":[{name:`deviceId`,form:`single`,optional:!1}],"osdManager.copyDeviceConfiguration":[{name:`sourceDeviceId`,form:`single`,optional:!1},{name:`targetDeviceId`,form:`single`,optional:!1}],"osdManager.getDeviceOsd":[{name:`deviceId`,form:`single`,optional:!1}],"osdManager.getSourceCatalog":[{name:`deviceId`,form:`single`,optional:!1}],"osdManager.previewSlot":[{name:`deviceId`,form:`single`,optional:!1}],"osdManager.renderDevice":[{name:`deviceId`,form:`single`,optional:!1}],"osdManager.setSlotBinding":[{name:`deviceId`,form:`single`,optional:!1}],"petFeeder.callPet":[{name:`deviceId`,form:`single`,optional:!1}],"petFeeder.cancelFeed":[{name:`deviceId`,form:`single`,optional:!1}],"petFeeder.feed":[{name:`deviceId`,form:`single`,optional:!1}],"petFeeder.markFoodReplenished":[{name:`deviceId`,form:`single`,optional:!1}],"petFeeder.playSound":[{name:`deviceId`,form:`single`,optional:!1}],"petFeeder.resetDesiccant":[{name:`deviceId`,form:`single`,optional:!1}],"petFeeder.setChildLock":[{name:`deviceId`,form:`single`,optional:!1}],"petFeeder.setFeedSound":[{name:`deviceId`,form:`single`,optional:!1}],"petFeeder.setIndicatorLight":[{name:`deviceId`,form:`single`,optional:!1}],"petFeeder.setVolume":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineAnalytics.clearTracks":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineAnalytics.completeRetrainTrack":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineAnalytics.deleteDeviceEvents":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineAnalytics.deleteTracks":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineAnalytics.deselectRetrainFrame":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineAnalytics.getActiveTracks":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineAnalytics.getAudioEvents":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineAnalytics.getEventDensity":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineAnalytics.getEventDensityBatch":[{name:`deviceIds`,form:`array`,optional:!1}],"pipelineAnalytics.getEventMedia":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineAnalytics.getEventMediaFootprintByKind":[{name:`deviceId`,form:`single`,optional:!0}],"pipelineAnalytics.getKeyEvents":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineAnalytics.getKeyEventsBatch":[{name:`deviceIds`,form:`array`,optional:!1}],"pipelineAnalytics.getMotionEvents":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineAnalytics.getObjectEvents":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineAnalytics.getRetrainExportUrl":[{name:`deviceIds`,form:`array`,optional:!0}],"pipelineAnalytics.getSensorEvents":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineAnalytics.getTrack":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineAnalytics.getTrackMedia":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineAnalytics.getTrainingExportSummary":[{name:`deviceIds`,form:`array`,optional:!0}],"pipelineAnalytics.getTrainingExportUrl":[{name:`deviceIds`,form:`array`,optional:!0}],"pipelineAnalytics.listEventKinds":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineAnalytics.listEventKindsBatch":[{name:`deviceIds`,form:`array`,optional:!1}],"pipelineAnalytics.listEventMedia":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineAnalytics.listOpsLog":[{name:`deviceId`,form:`single`,optional:!0}],"pipelineAnalytics.listRecentTracks":[{name:`deviceIds`,form:`array`,optional:!1}],"pipelineAnalytics.listRetrainStaging":[{name:`deviceIds`,form:`array`,optional:!0}],"pipelineAnalytics.listSummaries":[{name:`deviceIds`,form:`array`,optional:!1}],"pipelineAnalytics.listTrackMedia":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineAnalytics.listTracks":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineAnalytics.proposeRetrainAnnotations":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineAnalytics.pruneEventsBefore":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineAnalytics.pruneTracksBefore":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineAnalytics.rebuildObjectEmbeddings":[{name:`deviceId`,form:`single`,optional:!0}],"pipelineAnalytics.reclaimDebugMedia":[{name:`deviceIds`,form:`array`,optional:!0}],"pipelineAnalytics.reconcileFromDisk":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineAnalytics.restageRetrainTrack":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineAnalytics.runReplayFrameProcessor":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineAnalytics.saveRetrainAnnotations":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineAnalytics.searchObjectEvents":[{name:`deviceId`,form:`single`,optional:!0}],"pipelineAnalytics.selectRetrainFrames":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineAnalytics.setTrackFlags":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineAnalytics.wipeAllAnalytics":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineExecutor.runPipeline":[{name:`deviceId`,form:`single`,optional:!0}],"pipelineExecutor.runPipelineBatch":[{name:`deviceId`,form:`single`,optional:!0}],"pipelineOrchestrator.assignAudio":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineOrchestrator.assignPipeline":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineOrchestrator.getAudioAssignment":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineOrchestrator.getCameraMetrics":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineOrchestrator.getCameraSettings":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineOrchestrator.getCameraStatus":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineOrchestrator.getCameraStatuses":[{name:`deviceIds`,form:`array`,optional:!0}],"pipelineOrchestrator.getCameraStepOverrides":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineOrchestrator.getCameraSwitches":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineOrchestrator.getPipelineAssignment":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineOrchestrator.getPipelineDevicePin":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineOrchestrator.resolvePipeline":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineOrchestrator.setCameraPipelineForAgent":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineOrchestrator.setCameraStepOverride":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineOrchestrator.setCameraStepToggle":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineOrchestrator.setCameraSwitch":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineOrchestrator.setPipelineDevicePin":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineOrchestrator.unassignAudio":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineOrchestrator.unassignPipeline":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineRunner.attachCamera":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineRunner.detachCamera":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineRunner.getCameraMetrics":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineRunner.reportMotion":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineRunner.runDetailSubtree":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineRunner.runStatelessStep":[{name:`sourceDeviceId`,form:`single`,optional:!1}],"plateGallery.getPlateByTrack":[{name:`deviceId`,form:`single`,optional:!1}],"plateGallery.listPlates":[{name:`deviceId`,form:`single`,optional:!0}],"privacyMask.getOptions":[{name:`deviceId`,form:`single`,optional:!1}],"privacyMask.setAudioEnabled":[{name:`deviceId`,form:`single`,optional:!1}],"privacyMask.setMask":[{name:`deviceId`,form:`single`,optional:!1}],"ptz.continuousMove":[{name:`deviceId`,form:`single`,optional:!1}],"ptz.deletePreset":[{name:`deviceId`,form:`single`,optional:!1}],"ptz.getOptions":[{name:`deviceId`,form:`single`,optional:!1}],"ptz.getPosition":[{name:`deviceId`,form:`single`,optional:!1}],"ptz.getPresets":[{name:`deviceId`,form:`single`,optional:!1}],"ptz.goHome":[{name:`deviceId`,form:`single`,optional:!1}],"ptz.goToPreset":[{name:`deviceId`,form:`single`,optional:!1}],"ptz.move":[{name:`deviceId`,form:`single`,optional:!1}],"ptz.savePreset":[{name:`deviceId`,form:`single`,optional:!1}],"ptz.setAutofocus":[{name:`deviceId`,form:`single`,optional:!1}],"ptz.stop":[{name:`deviceId`,form:`single`,optional:!1}],"ptzAutotrack.getSettings":[{name:`deviceId`,form:`single`,optional:!1}],"ptzAutotrack.getStatus":[{name:`deviceId`,form:`single`,optional:!1}],"ptzAutotrack.setEnabled":[{name:`deviceId`,form:`single`,optional:!1}],"ptzAutotrack.setSettings":[{name:`deviceId`,form:`single`,optional:!1}],"reboot.reboot":[{name:`deviceId`,form:`single`,optional:!1}],"recording.deleteFootprint":[{name:`deviceId`,form:`single`,optional:!1}],"recording.getAvailability":[{name:`deviceId`,form:`single`,optional:!1}],"recording.getAvailabilityBatch":[{name:`deviceIds`,form:`array`,optional:!1}],"recording.getDaysWithRecordings":[{name:`deviceId`,form:`single`,optional:!1}],"recording.getDaysWithRecordingsBatch":[{name:`deviceIds`,form:`array`,optional:!1}],"recording.getDeviceConfig":[{name:`deviceId`,form:`single`,optional:!1}],"recording.getPlaybackManifest":[{name:`deviceId`,form:`single`,optional:!1}],"recording.listOpsLog":[{name:`deviceId`,form:`single`,optional:!0}],"recording.locateSegment":[{name:`deviceId`,form:`single`,optional:!1}],"recording.pruneFootage":[{name:`deviceId`,form:`single`,optional:!1}],"recording.readGopBytes":[{name:`deviceId`,form:`single`,optional:!1}],"recording.readSegmentBytes":[{name:`deviceId`,form:`single`,optional:!1}],"recording.readWindowBytes":[{name:`deviceId`,form:`single`,optional:!1}],"recording.reconcileLedgerAgainstDisk":[{name:`deviceId`,form:`single`,optional:!0}],"recording.relocateFootage":[{name:`deviceId`,form:`single`,optional:!0}],"recording.renderClip":[{name:`deviceId`,form:`single`,optional:!1}],"recording.renderGif":[{name:`deviceId`,form:`single`,optional:!1}],"recording.rescanStorage":[{name:`deviceId`,form:`single`,optional:!1}],"recording.setDeviceConfig":[{name:`deviceId`,form:`single`,optional:!1}],"recording.setDevicePlacement":[{name:`deviceId`,form:`single`,optional:!1}],"recording.startStorageMigrationMove":[{name:`deviceId`,form:`single`,optional:!0}],"recordingExport.createExport":[{name:`deviceId`,form:`single`,optional:!1}],"recordingExport.listExports":[{name:`deviceId`,form:`single`,optional:!0}],"recordingSignal.getStatus":[{name:`deviceId`,form:`single`,optional:!1}],"sceneMonitor.captureReference":[{name:`deviceId`,form:`single`,optional:!1}],"sceneMonitor.createScene":[{name:`deviceId`,form:`single`,optional:!1}],"sceneMonitor.deleteReference":[{name:`deviceId`,form:`single`,optional:!1}],"sceneMonitor.deleteScene":[{name:`deviceId`,form:`single`,optional:!1}],"sceneMonitor.listScenes":[{name:`deviceId`,form:`single`,optional:!1}],"sceneMonitor.listScenesBatch":[{name:`deviceIds`,form:`array`,optional:!1}],"sceneMonitor.recheckNow":[{name:`deviceId`,form:`single`,optional:!1}],"sceneMonitor.resetScene":[{name:`deviceId`,form:`single`,optional:!1}],"sceneMonitor.updateScene":[{name:`deviceId`,form:`single`,optional:!1}],"scriptRunner.run":[{name:`deviceId`,form:`single`,optional:!1}],"scriptRunner.stop":[{name:`deviceId`,form:`single`,optional:!1}],"snapshot.getDebugState":[{name:`deviceId`,form:`single`,optional:!1}],"snapshot.getSnapshot":[{name:`deviceId`,form:`single`,optional:!1}],"snapshot.getSnapshotLinks":[{name:`targets`,form:`object-array`,optional:!1,itemField:`deviceId`}],"snapshot.getSnapshotOverview":[{name:`deviceIds`,form:`array`,optional:!1}],"snapshot.invalidateCache":[{name:`deviceId`,form:`single`,optional:!1}],"streamBroker.acquireEgressTranscode":[{name:`deviceId`,form:`single`,optional:!1}],"streamBroker.assignProfile":[{name:`deviceId`,form:`single`,optional:!1}],"streamBroker.forgetDeviceHardware":[{name:`deviceId`,form:`single`,optional:!1}],"streamBroker.getDeviceAudioMute":[{name:`deviceId`,form:`single`,optional:!1}],"streamBroker.getStreamWithCodec":[{name:`deviceId`,form:`single`,optional:!1}],"streamBroker.produceEventMedia":[{name:`deviceId`,form:`single`,optional:!1}],"streamBroker.publishCameraStream":[{name:`deviceId`,form:`single`,optional:!1}],"streamBroker.renderPreBufferClip":[{name:`deviceId`,form:`single`,optional:!1}],"streamBroker.restartProfile":[{name:`deviceId`,form:`single`,optional:!1}],"streamBroker.retractCameraStream":[{name:`deviceId`,form:`single`,optional:!1}],"streamBroker.setDeviceAudioMute":[{name:`deviceId`,form:`single`,optional:!1}],"streamBroker.unassignProfile":[{name:`deviceId`,form:`single`,optional:!1}],"streamCatalog.getCatalog":[{name:`deviceId`,form:`single`,optional:!1}],"streamParams.getConfigSchema":[{name:`deviceId`,form:`single`,optional:!1}],"streamParams.getOptions":[{name:`deviceId`,form:`single`,optional:!1}],"streamParams.setProfile":[{name:`deviceId`,form:`single`,optional:!1}],"switch.setState":[{name:`deviceId`,form:`single`,optional:!1}],"vacuumControl.locate":[{name:`deviceId`,form:`single`,optional:!1}],"vacuumControl.pause":[{name:`deviceId`,form:`single`,optional:!1}],"vacuumControl.returnToBase":[{name:`deviceId`,form:`single`,optional:!1}],"vacuumControl.setFanSpeed":[{name:`deviceId`,form:`single`,optional:!1}],"vacuumControl.start":[{name:`deviceId`,form:`single`,optional:!1}],"vacuumControl.stop":[{name:`deviceId`,form:`single`,optional:!1}],"valve.close":[{name:`deviceId`,form:`single`,optional:!1}],"valve.open":[{name:`deviceId`,form:`single`,optional:!1}],"valve.setPosition":[{name:`deviceId`,form:`single`,optional:!1}],"valve.stop":[{name:`deviceId`,form:`single`,optional:!1}],"videoclips.getClipPlayback":[{name:`deviceId`,form:`single`,optional:!1}],"videoclips.listClips":[{name:`deviceId`,form:`single`,optional:!1}],"waterHeater.setAway":[{name:`deviceId`,form:`single`,optional:!1}],"waterHeater.setOperationMode":[{name:`deviceId`,form:`single`,optional:!1}],"waterHeater.setTargetTemp":[{name:`deviceId`,form:`single`,optional:!1}],"webrtcSession.addIceCandidate":[{name:`deviceId`,form:`single`,optional:!1}],"webrtcSession.closeSession":[{name:`deviceId`,form:`single`,optional:!1}],"webrtcSession.createSession":[{name:`deviceId`,form:`single`,optional:!1}],"webrtcSession.getIceCandidates":[{name:`deviceId`,form:`single`,optional:!1}],"webrtcSession.getSessionState":[{name:`deviceId`,form:`single`,optional:!1}],"webrtcSession.handleAnswer":[{name:`deviceId`,form:`single`,optional:!1}],"webrtcSession.handleOffer":[{name:`deviceId`,form:`single`,optional:!1}],"webrtcSession.hasAdaptiveBitrate":[{name:`deviceId`,form:`single`,optional:!1}],"webrtcSession.listStreams":[{name:`deviceId`,form:`single`,optional:!1}],"zoneAnalytics.getCameraHistory":[{name:`deviceId`,form:`single`,optional:!1}],"zoneAnalytics.getCurrentSnapshot":[{name:`deviceId`,form:`single`,optional:!1}],"zoneAnalytics.getCurrentSnapshotBatch":[{name:`deviceIds`,form:`array`,optional:!1}],"zoneAnalytics.getUnzonedHistory":[{name:`deviceId`,form:`single`,optional:!1}],"zoneAnalytics.getZoneHistory":[{name:`deviceId`,form:`single`,optional:!1}],"zoneRules.listRules":[{name:`deviceId`,form:`single`,optional:!1}],"zoneRules.setRules":[{name:`deviceId`,form:`single`,optional:!1}],"zones.addZone":[{name:`deviceId`,form:`single`,optional:!1}],"zones.listZones":[{name:`deviceId`,form:`single`,optional:!1}],"zones.removeZone":[{name:`deviceId`,form:`single`,optional:!1}],"zones.updateZone":[{name:`deviceId`,form:`single`,optional:!1}]}),RM=`addonSettings.getDeviceSettings,addonSettings.updateDeviceSettings,audioAnalyzer.classify,decoder.createSession,deviceAdoption.release,deviceAdoption.resync,deviceManager.adoptionRelease,deviceManager.adoptionResync,deviceManager.applyInitialMeta,deviceManager.disable,deviceManager.enable,deviceManager.getBindings,deviceManager.getBindingsBatch,deviceManager.getChildren,deviceManager.getChildrenBatch,deviceManager.getConfigSchema,deviceManager.getDevice,deviceManager.getDeviceAggregate,deviceManager.getDeviceLiveInfoAggregate,deviceManager.getDeviceSettingsAggregate,deviceManager.getDeviceStatusAggregate,deviceManager.getDeviceStatusAggregateBatch,deviceManager.getLinkedDevices,deviceManager.getLinkedDevicesBatch,deviceManager.getSettingsSchema,deviceManager.getStreamProfileMap,deviceManager.getStreamSources,deviceManager.getWireableFields,deviceManager.listAll,deviceManager.loadConfig,deviceManager.loadMeta,deviceManager.loadRuntimeState,deviceManager.persistConfig,deviceManager.probeStreams,deviceManager.registerDevice,deviceManager.remove,deviceManager.removeDevice,deviceManager.runDeviceAction,deviceManager.setChildLayout,deviceManager.setDisabled,deviceManager.setDisplay,deviceManager.setIntegrationId,deviceManager.setLinkDeviceId,deviceManager.setLocation,deviceManager.setMetadata,deviceManager.setName,deviceManager.setPrimaryChildEntityId,deviceManager.setRole,deviceManager.setStreamProfileMap,deviceManager.setType,deviceManager.setWrapperActive,deviceManager.testField,deviceManager.updateConfig,deviceManager.updateDeviceField,deviceManager.updateDeviceFieldsBatch,deviceState.getCapSlice,deviceState.getSnapshot,deviceState.setCapSlice,faceGallery.getFaceByTrack,faceGallery.listRecentFaces,networkQuality.getDeviceStats,networkQuality.reportClientStats,notificationRules.setDeviceMuted,osdManager.clearSlotBinding,osdManager.copyDeviceConfiguration,osdManager.getDeviceOsd,osdManager.getSourceCatalog,osdManager.previewSlot,osdManager.renderDevice,osdManager.setSlotBinding,pipelineExecutor.runPipeline,pipelineExecutor.runPipelineBatch,pipelineOrchestrator.assignAudio,pipelineOrchestrator.assignPipeline,pipelineOrchestrator.getAudioAssignment,pipelineOrchestrator.getCameraMetrics,pipelineOrchestrator.getCameraSettings,pipelineOrchestrator.getCameraStatus,pipelineOrchestrator.getCameraStatuses,pipelineOrchestrator.getCameraStepOverrides,pipelineOrchestrator.getCameraSwitches,pipelineOrchestrator.getPipelineAssignment,pipelineOrchestrator.getPipelineDevicePin,pipelineOrchestrator.resolvePipeline,pipelineOrchestrator.setCameraPipelineForAgent,pipelineOrchestrator.setCameraStepOverride,pipelineOrchestrator.setCameraStepToggle,pipelineOrchestrator.setCameraSwitch,pipelineOrchestrator.setPipelineDevicePin,pipelineOrchestrator.unassignAudio,pipelineOrchestrator.unassignPipeline,pipelineRunner.attachCamera,pipelineRunner.detachCamera,pipelineRunner.getCameraMetrics,pipelineRunner.reportMotion,pipelineRunner.runDetailSubtree,pipelineRunner.runStatelessStep,plateGallery.getPlateByTrack,plateGallery.listPlates,recording.deleteFootprint,recording.getAvailability,recording.getAvailabilityBatch,recording.getDaysWithRecordings,recording.getDaysWithRecordingsBatch,recording.getDeviceConfig,recording.getPlaybackManifest,recording.listOpsLog,recording.locateSegment,recording.pruneFootage,recording.readGopBytes,recording.readSegmentBytes,recording.readWindowBytes,recording.reconcileLedgerAgainstDisk,recording.relocateFootage,recording.renderClip,recording.renderGif,recording.rescanStorage,recording.setDeviceConfig,recording.setDevicePlacement,recording.startStorageMigrationMove,recordingExport.createExport,recordingExport.listExports,streamBroker.acquireEgressTranscode,streamBroker.assignProfile,streamBroker.forgetDeviceHardware,streamBroker.getDeviceAudioMute,streamBroker.getStreamWithCodec,streamBroker.produceEventMedia,streamBroker.publishCameraStream,streamBroker.renderPreBufferClip,streamBroker.restartProfile,streamBroker.retractCameraStream,streamBroker.setDeviceAudioMute,streamBroker.unassignProfile`.split(`,`),zM=Object.freeze({broker:`broker`,"device-export":`device-export`,llm:`ai`,"mesh-network":`mesh`,"mqtt-broker":`broker`,"network-access":`ingress`,"smtp-provider":`email`}),BM=[`broker`,`device-export`,`llm`,`mesh-network`,`mqtt-broker`,`network-access`,`smtp-provider`];function VM(e){let t=[];for(let[n,r]of Object.entries(zM))r===e&&t.push(n);return t}var HM={"air-quality-sensor":{durability:`restored`,volatileFields:[`lastFetchedAt`]},"alarm-panel":{durability:`restored`,volatileFields:[`lastChangedAt`]},"ambient-light-sensor":{durability:`restored`,volatileFields:[`lastFetchedAt`]},"audio-metrics":{durability:`session`,volatileFields:[]},"automation-control":{durability:`session`,volatileFields:[]},battery:{durability:`restored`,volatileFields:[`lastUpdated`]},binary:{durability:`restored`,volatileFields:[`lastChangedAt`]},brightness:{durability:`session`,volatileFields:[]},"camera-streams":{durability:`session`,volatileFields:[]},"carbon-monoxide":{durability:`restored`,volatileFields:[`lastChangedAt`]},"climate-control":{durability:`session`,volatileFields:[]},color:{durability:`session`,volatileFields:[]},connectivity:{durability:`restored`,volatileFields:[`lastChangedAt`]},consumables:{durability:`session`,volatileFields:[]},contact:{durability:`restored`,volatileFields:[`lastChangedAt`]},control:{durability:`session`,volatileFields:[]},cover:{durability:`restored`,volatileFields:[`lastChangedAt`]},"day-night":{durability:`restored`,volatileFields:[`lastFetchedAt`]},"device-discovery":{durability:`session`,volatileFields:[]},"device-status":{durability:`restored`,volatileFields:[`lastChangedAt`]},doorbell:{durability:`restored`,volatileFields:[]},"enum-sensor":{durability:`restored`,volatileFields:[`lastFetchedAt`]},"event-emitter":{durability:`session`,volatileFields:[]},"fan-control":{durability:`session`,volatileFields:[]},"feature-probe":{durability:`session`,volatileFields:[]},flood:{durability:`restored`,volatileFields:[`lastChangedAt`]},gas:{durability:`restored`,volatileFields:[`lastChangedAt`]},humidifier:{durability:`session`,volatileFields:[]},"humidity-sensor":{durability:`restored`,volatileFields:[`lastFetchedAt`]},image:{durability:`session`,volatileFields:[]},"image-settings":{durability:`restored`,volatileFields:[`lastFetchedAt`]},intercom:{durability:`session`,volatileFields:[]},"lawn-mower-control":{durability:`session`,volatileFields:[]},"lock-control":{durability:`restored`,volatileFields:[`lastChangedAt`]},"media-player":{durability:`session`,volatileFields:[]},motion:{durability:`session`,volatileFields:[]},"motion-trigger":{durability:`session`,volatileFields:[]},"motion-zones":{durability:`restored`,volatileFields:[`lastFetchedAt`]},"native-object-detection":{durability:`restored`,volatileFields:[`lastFetchedAt`]},navigation:{durability:`session`,volatileFields:[]},"network-link":{durability:`restored`,volatileFields:[`lastUpdated`]},notifier:{durability:`session`,volatileFields:[]},"numeric-sensor":{durability:`restored`,volatileFields:[`lastFetchedAt`]},"pet-feeder":{durability:`session`,volatileFields:[]},"power-meter":{durability:`restored`,volatileFields:[`lastFetchedAt`]},presence:{durability:`restored`,volatileFields:[`lastChangedAt`]},"pressure-sensor":{durability:`restored`,volatileFields:[`lastFetchedAt`]},"privacy-mask":{durability:`restored`,volatileFields:[`lastFetchedAt`]},"ptz-autotrack":{durability:`session`,volatileFields:[]},"recording-signal":{durability:`session`,volatileFields:[]},"scene-monitor":{durability:`session`,volatileFields:[]},"script-runner":{durability:`session`,volatileFields:[]},smoke:{durability:`restored`,volatileFields:[`lastChangedAt`]},"stream-catalog":{durability:`restored`,volatileFields:[`lastFetchedAt`]},"stream-params":{durability:`restored`,volatileFields:[`lastFetchedAt`]},switch:{durability:`restored`,volatileFields:[`lastChangedAt`]},tamper:{durability:`restored`,volatileFields:[`lastChangedAt`]},"temperature-sensor":{durability:`restored`,volatileFields:[`lastFetchedAt`]},update:{durability:`session`,volatileFields:[]},"vacuum-control":{durability:`session`,volatileFields:[]},valve:{durability:`session`,volatileFields:[]},vibration:{durability:`restored`,volatileFields:[`lastChangedAt`]},"water-heater":{durability:`session`,volatileFields:[]},weather:{durability:`session`,volatileFields:[]},"zone-analytics":{durability:`session`,volatileFields:[]},"zone-rules":{durability:`restored`,volatileFields:[]},zones:{durability:`restored`,volatileFields:[]}};function UM(e){return HM[e]??WM}var WM={durability:`session`,volatileFields:[]};function GM(e){return UM(e).durability===`restored`}var KM=`air-quality-sensor.alarm-panel.ambient-light-sensor.battery.binary.carbon-monoxide.connectivity.contact.cover.day-night.device-status.doorbell.enum-sensor.flood.gas.humidity-sensor.image-settings.lock-control.motion-zones.native-object-detection.network-link.numeric-sensor.power-meter.presence.pressure-sensor.privacy-mask.smoke.stream-catalog.stream-params.switch.tamper.temperature-sensor.vibration.zone-rules.zones`.split(`.`),qM=[{id:`camera-viewer`,label:`Camera viewer`,description:"Read-only over every device — live streams, recordings, motion events, battery state. Pair with a `device` grant (an `ids` / `types` / `locations` selector) to restrict to specific cameras.",rows:[{type:`category`,target:`device`,access:[`view`]}]},{id:`camera-operator`,label:`Camera operator`,description:"Everything `camera-viewer` does plus live control of every granted camera — PTZ movement, intercom talk-back and on-demand snapshots. Cannot delete devices, and grants nothing on system-scope caps (recording control, users, addons).",rows:[{type:`category`,target:`device`,access:[`view`,`create`]}]},{id:`full-management`,label:`Full management`,description:`Complete device + system control short of admin: view/create/delete on every device and every system capability. Use for a trusted operator who manages the whole deployment but should not hold the admin bypass.`,rows:[{type:`category`,target:`device`,access:[`view`,`create`,`delete`]},{type:`category`,target:`system`,access:[`view`,`create`,`delete`]}]},{id:`cli-deployer`,label:`CLI deployer`,description:"Push addons to the hub and tail their logs. Used by the `camstack` CLI on dev machines. No delete access — a stolen token cannot uninstall.",rows:[{type:`capability`,target:`addons`,access:[`view`,`create`]}]},{id:`event-listener`,label:`Event listener`,description:`Subscribe to motion / audio events. Used by webhook bridges and Home Assistant integrations.`,rows:[{type:`capability`,target:`events`,access:[`view`]},{type:`capability`,target:`motion-detection`,access:[`view`]},{type:`capability`,target:`audio-analysis`,access:[`view`]}]}];function JM(e){let t=e;function n(e,n,r,i,a){let o=t[e]?.[n];if(!o)throw Error(`SystemProxy: api has no '${e}.${n}'`);let s=o;return r===`mutation`?s.mutate(i):r===`subscription`?s.subscribe(i,a):s.query(i)}return{addonPages:{listPages:e=>n(`addonPages`,`listPages`,`query`,e)},addons:{list:e=>n(`addons`,`list`,`query`,e),getLogs:e=>n(`addons`,`getLogs`,`query`,e),listPackages:e=>n(`addons`,`listPackages`,`query`,e),installPackage:e=>n(`addons`,`installPackage`,`mutation`,e),installFromWorkspace:e=>n(`addons`,`installFromWorkspace`,`mutation`,e),isWorkspaceAvailable:e=>n(`addons`,`isWorkspaceAvailable`,`query`,e),listWorkspacePackages:e=>n(`addons`,`listWorkspacePackages`,`query`,e),uninstallPackage:e=>n(`addons`,`uninstallPackage`,`mutation`,e),reloadPackages:e=>n(`addons`,`reloadPackages`,`mutation`,e),searchAvailable:e=>n(`addons`,`searchAvailable`,`query`,e),listUpdates:e=>n(`addons`,`listUpdates`,`query`,e),updatePackage:e=>n(`addons`,`updatePackage`,`mutation`,e),rollbackPackage:e=>n(`addons`,`rollbackPackage`,`mutation`,e),forceRefresh:e=>n(`addons`,`forceRefresh`,`mutation`,e),restartServer:e=>n(`addons`,`restartServer`,`mutation`,e),getLastRestart:e=>n(`addons`,`getLastRestart`,`query`,e),listFrameworkPackages:e=>n(`addons`,`listFrameworkPackages`,`query`,e),listCapabilityProviders:e=>n(`addons`,`listCapabilityProviders`,`query`,e),setCapabilityProviderEnabled:e=>n(`addons`,`setCapabilityProviderEnabled`,`mutation`,e),getVersions:e=>n(`addons`,`getVersions`,`query`,e),restartAddon:e=>n(`addons`,`restartAddon`,`mutation`,e),retryLoad:e=>n(`addons`,`retryLoad`,`mutation`,e),getAutoUpdateSettings:e=>n(`addons`,`getAutoUpdateSettings`,`query`,e),setAutoUpdateSettings:e=>n(`addons`,`setAutoUpdateSettings`,`mutation`,e),getAddonAutoUpdate:e=>n(`addons`,`getAddonAutoUpdate`,`query`,e),setAddonAutoUpdate:e=>n(`addons`,`setAddonAutoUpdate`,`mutation`,e),applyAutoUpdateToAll:e=>n(`addons`,`applyAutoUpdateToAll`,`mutation`,e),custom:e=>n(`addons`,`custom`,`mutation`,e),startJob:e=>n(`addons`,`startJob`,`mutation`,e),getJob:e=>n(`addons`,`getJob`,`query`,e),listJobs:e=>n(`addons`,`listJobs`,`query`,e),cancelJob:e=>n(`addons`,`cancelJob`,`mutation`,e),onAddonLogs:(e,t)=>n(`addons`,`onAddonLogs`,`subscription`,e,t)},addonSettings:{getGlobalSettings:e=>n(`addonSettings`,`getGlobalSettings`,`query`,e),updateGlobalSettings:e=>n(`addonSettings`,`updateGlobalSettings`,`mutation`,e),getIntegrationSettings:e=>n(`addonSettings`,`getIntegrationSettings`,`query`,e)},addonWidgets:{listWidgets:e=>n(`addonWidgets`,`listWidgets`,`query`,e)},alerts:{emit:e=>n(`alerts`,`emit`,`mutation`,e),update:e=>n(`alerts`,`update`,`mutation`,e),list:e=>n(`alerts`,`list`,`query`,e),getUnreadCount:e=>n(`alerts`,`getUnreadCount`,`query`,e),markRead:e=>n(`alerts`,`markRead`,`mutation`,e),markAllRead:e=>n(`alerts`,`markAllRead`,`mutation`,e),dismiss:e=>n(`alerts`,`dismiss`,`mutation`,e)},audioAnalyzer:{analyseChunk:e=>n(`audioAnalyzer`,`analyseChunk`,`mutation`,e),classify:e=>n(`audioAnalyzer`,`classify`,`query`,e),isReady:e=>n(`audioAnalyzer`,`isReady`,`query`,e),dispose:e=>n(`audioAnalyzer`,`dispose`,`mutation`,e),reprobeAudioEngine:e=>n(`audioAnalyzer`,`reprobeAudioEngine`,`mutation`,e)},audioCodec:{listSupportedCodecs:e=>n(`audioCodec`,`listSupportedCodecs`,`query`,e),canHandle:e=>n(`audioCodec`,`canHandle`,`query`,e),createDecodeSession:e=>n(`audioCodec`,`createDecodeSession`,`mutation`,e),createEncodeSession:e=>n(`audioCodec`,`createEncodeSession`,`mutation`,e),closeSession:e=>n(`audioCodec`,`closeSession`,`mutation`,e),pushEncodedFrame:e=>n(`audioCodec`,`pushEncodedFrame`,`mutation`,e),pullPcm:e=>n(`audioCodec`,`pullPcm`,`query`,e),pushPcm:e=>n(`audioCodec`,`pushPcm`,`mutation`,e),pullEncoded:e=>n(`audioCodec`,`pullEncoded`,`query`,e),flushEncode:e=>n(`audioCodec`,`flushEncode`,`mutation`,e),listActiveSessions:e=>n(`audioCodec`,`listActiveSessions`,`query`,e)},backup:{listDestinations:e=>n(`backup`,`listDestinations`,`query`,e),trigger:e=>n(`backup`,`trigger`,`mutation`,e),listRuns:e=>n(`backup`,`listRuns`,`query`,e),cancel:e=>n(`backup`,`cancel`,`mutation`,e),list:e=>n(`backup`,`list`,`query`,e),listLocations:e=>n(`backup`,`listLocations`,`query`,e),getEntries:e=>n(`backup`,`getEntries`,`query`,e),restore:e=>n(`backup`,`restore`,`mutation`,e),delete:e=>n(`backup`,`delete`,`mutation`,e),listArchives:e=>n(`backup`,`listArchives`,`query`,e),upsertDestinationPolicy:e=>n(`backup`,`upsertDestinationPolicy`,`mutation`,e),previewSchedule:e=>n(`backup`,`previewSchedule`,`query`,e),listSchedules:e=>n(`backup`,`listSchedules`,`query`,e),upsertSchedule:e=>n(`backup`,`upsertSchedule`,`mutation`,e),deleteSchedule:e=>n(`backup`,`deleteSchedule`,`mutation`,e)},broker:{list:e=>n(`broker`,`list`,`query`,e),get:e=>n(`broker`,`get`,`query`,e),listProviders:e=>n(`broker`,`listProviders`,`query`,e),add:e=>n(`broker`,`add`,`mutation`,e),remove:e=>n(`broker`,`remove`,`mutation`,e),testConnection:e=>n(`broker`,`testConnection`,`mutation`,e),getSettings:e=>n(`broker`,`getSettings`,`query`,e),setSettings:e=>n(`broker`,`setSettings`,`mutation`,e),getBrokerConfig:e=>n(`broker`,`getBrokerConfig`,`query`,e),getSettingsSchema:e=>n(`broker`,`getSettingsSchema`,`query`,e),testSettings:e=>n(`broker`,`testSettings`,`mutation`,e),publish:e=>n(`broker`,`publish`,`mutation`,e),subscribe:e=>n(`broker`,`subscribe`,`mutation`,e),unsubscribe:e=>n(`broker`,`unsubscribe`,`mutation`,e),getState:e=>n(`broker`,`getState`,`query`,e),getStatus:e=>n(`broker`,`getStatus`,`query`,e)},connectionTest:{testSettings:e=>n(`connectionTest`,`testSettings`,`mutation`,e),describeTest:e=>n(`connectionTest`,`describeTest`,`query`,e)},coreBlocks:{list:e=>n(`coreBlocks`,`list`,`query`,e),get:e=>n(`coreBlocks`,`get`,`query`,e),create:e=>n(`coreBlocks`,`create`,`mutation`,e),update:e=>n(`coreBlocks`,`update`,`mutation`,e),delete:e=>n(`coreBlocks`,`delete`,`mutation`,e),setEnabled:e=>n(`coreBlocks`,`setEnabled`,`mutation`,e),restart:e=>n(`coreBlocks`,`restart`,`mutation`,e),compile:e=>n(`coreBlocks`,`compile`,`mutation`,e),getTypeDefs:e=>n(`coreBlocks`,`getTypeDefs`,`query`,e)},decoder:{supportsCodec:e=>n(`decoder`,`supportsCodec`,`query`,e),getInfo:e=>n(`decoder`,`getInfo`,`query`,e),createSession:e=>n(`decoder`,`createSession`,`query`,e),destroySession:e=>n(`decoder`,`destroySession`,`query`,e),pushPacket:e=>n(`decoder`,`pushPacket`,`query`,e),openStream:e=>n(`decoder`,`openStream`,`query`,e),pullFrames:e=>n(`decoder`,`pullFrames`,`query`,e),pullHandles:e=>n(`decoder`,`pullHandles`,`query`,e),getFrame:e=>n(`decoder`,`getFrame`,`query`,e),getShmStats:e=>n(`decoder`,`getShmStats`,`query`,e),updateConfig:e=>n(`decoder`,`updateConfig`,`query`,e),getStats:e=>n(`decoder`,`getStats`,`query`,e),listActiveSessions:e=>n(`decoder`,`listActiveSessions`,`query`,e),reprobeHwaccel:e=>n(`decoder`,`reprobeHwaccel`,`mutation`,e)},deviceAdoption:{listCandidateFilters:e=>n(`deviceAdoption`,`listCandidateFilters`,`query`,e),listCandidates:e=>n(`deviceAdoption`,`listCandidates`,`query`,e),getCandidate:e=>n(`deviceAdoption`,`getCandidate`,`query`,e),refresh:e=>n(`deviceAdoption`,`refresh`,`mutation`,e),adopt:e=>n(`deviceAdoption`,`adopt`,`mutation`,e),release:e=>n(`deviceAdoption`,`release`,`mutation`,e),resync:e=>n(`deviceAdoption`,`resync`,`mutation`,e)},deviceExport:{getStatus:e=>n(`deviceExport`,`getStatus`,`query`,e),listSupportedDeviceKinds:e=>n(`deviceExport`,`listSupportedDeviceKinds`,`query`,e),listExposedDevices:e=>n(`deviceExport`,`listExposedDevices`,`query`,e),exposeDevice:e=>n(`deviceExport`,`exposeDevice`,`mutation`,e),unexposeDevice:e=>n(`deviceExport`,`unexposeDevice`,`mutation`,e)},deviceManager:{allocateDeviceId:e=>n(`deviceManager`,`allocateDeviceId`,`mutation`,e),migrateDevice:e=>n(`deviceManager`,`migrateDevice`,`mutation`,e),registerDevice:e=>n(`deviceManager`,`registerDevice`,`mutation`,e),removeDevice:e=>n(`deviceManager`,`removeDevice`,`mutation`,e),persistConfig:e=>n(`deviceManager`,`persistConfig`,`mutation`,e),getRoleDisplayDefaults:e=>n(`deviceManager`,`getRoleDisplayDefaults`,`query`,e),setRoleDisplayDefaults:e=>n(`deviceManager`,`setRoleDisplayDefaults`,`mutation`,e),listLocations:e=>n(`deviceManager`,`listLocations`,`query`,e),addLocation:e=>n(`deviceManager`,`addLocation`,`mutation`,e),removeLocation:e=>n(`deviceManager`,`removeLocation`,`mutation`,e),renameLocation:e=>n(`deviceManager`,`renameLocation`,`mutation`,e),listPersistedByAddon:e=>n(`deviceManager`,`listPersistedByAddon`,`query`,e),listAll:e=>n(`deviceManager`,`listAll`,`query`,e),getChildren:e=>n(`deviceManager`,`getChildren`,`query`,e),getChildrenBatch:e=>n(`deviceManager`,`getChildrenBatch`,`query`,e),getLinkedDevicesBatch:e=>n(`deviceManager`,`getLinkedDevicesBatch`,`query`,e),removeByIntegration:e=>n(`deviceManager`,`removeByIntegration`,`mutation`,e),getBindingsBatch:e=>n(`deviceManager`,`getBindingsBatch`,`query`,e),getAllBindings:e=>n(`deviceManager`,`getAllBindings`,`query`,e),listWrappersForCap:e=>n(`deviceManager`,`listWrappersForCap`,`query`,e),listBindableCapsForDeviceType:e=>n(`deviceManager`,`listBindableCapsForDeviceType`,`query`,e),discoverDevices:e=>n(`deviceManager`,`discoverDevices`,`mutation`,e),adoptDevice:e=>n(`deviceManager`,`adoptDevice`,`mutation`,e),getCreationSchema:e=>n(`deviceManager`,`getCreationSchema`,`query`,e),createDevice:e=>n(`deviceManager`,`createDevice`,`mutation`,e),testCreationField:e=>n(`deviceManager`,`testCreationField`,`mutation`,e),adoptionListCandidateFilters:e=>n(`deviceManager`,`adoptionListCandidateFilters`,`query`,e),adoptionListCandidates:e=>n(`deviceManager`,`adoptionListCandidates`,`query`,e),adoptionRefresh:e=>n(`deviceManager`,`adoptionRefresh`,`mutation`,e),adoptionAdopt:e=>n(`deviceManager`,`adoptionAdopt`,`mutation`,e),adoptionRelease:e=>n(`deviceManager`,`adoptionRelease`,`mutation`,e),adoptionStartJob:e=>n(`deviceManager`,`adoptionStartJob`,`mutation`,e),adoptionListJobs:e=>n(`deviceManager`,`adoptionListJobs`,`query`,e),adoptionCancelJob:e=>n(`deviceManager`,`adoptionCancelJob`,`mutation`,e),adoptionResync:e=>n(`deviceManager`,`adoptionResync`,`mutation`,e),discoveryProviders:e=>n(`deviceManager`,`discoveryProviders`,`query`,e),discoverAllProviders:e=>n(`deviceManager`,`discoverAllProviders`,`mutation`,e),discoverProvider:e=>n(`deviceManager`,`discoverProvider`,`mutation`,e),providerCreationType:e=>n(`deviceManager`,`providerCreationType`,`query`,e),providerDiscoveryParamsSchema:e=>n(`deviceManager`,`providerDiscoveryParamsSchema`,`query`,e),getDeviceStatusAggregateBatch:e=>n(`deviceManager`,`getDeviceStatusAggregateBatch`,`query`,e)},deviceProvider:{start:e=>n(`deviceProvider`,`start`,`mutation`,e),stop:e=>n(`deviceProvider`,`stop`,`mutation`,e),getStatus:e=>n(`deviceProvider`,`getStatus`,`query`,e),getDevices:e=>n(`deviceProvider`,`getDevices`,`query`,e),supportsDiscovery:e=>n(`deviceProvider`,`supportsDiscovery`,`query`,e),discoverDevices:e=>n(`deviceProvider`,`discoverDevices`,`mutation`,e),getDiscoveryParamsSchema:e=>n(`deviceProvider`,`getDiscoveryParamsSchema`,`query`,e),getManualCreationType:e=>n(`deviceProvider`,`getManualCreationType`,`query`,e),adoptDiscoveredDevice:e=>n(`deviceProvider`,`adoptDiscoveredDevice`,`mutation`,e),supportsManualCreation:e=>n(`deviceProvider`,`supportsManualCreation`,`query`,e),getChildCreationSchema:e=>n(`deviceProvider`,`getChildCreationSchema`,`query`,e),createDevice:e=>n(`deviceProvider`,`createDevice`,`mutation`,e),testCreationField:e=>n(`deviceProvider`,`testCreationField`,`mutation`,e)},deviceState:{getAllSnapshots:e=>n(`deviceState`,`getAllSnapshots`,`query`,e)},faceGallery:{listIdentities:e=>n(`faceGallery`,`listIdentities`,`query`,e),createIdentity:e=>n(`faceGallery`,`createIdentity`,`mutation`,e),renameIdentity:e=>n(`faceGallery`,`renameIdentity`,`mutation`,e),deleteIdentity:e=>n(`faceGallery`,`deleteIdentity`,`mutation`,e),listIdentitySamples:e=>n(`faceGallery`,`listIdentitySamples`,`query`,e),removeSample:e=>n(`faceGallery`,`removeSample`,`mutation`,e),getFaceMedia:e=>n(`faceGallery`,`getFaceMedia`,`query`,e),assignFace:e=>n(`faceGallery`,`assignFace`,`mutation`,e),unassignFace:e=>n(`faceGallery`,`unassignFace`,`mutation`,e),deleteFace:e=>n(`faceGallery`,`deleteFace`,`mutation`,e),assignFaces:e=>n(`faceGallery`,`assignFaces`,`mutation`,e),unassignFaces:e=>n(`faceGallery`,`unassignFaces`,`mutation`,e),suggestFaceClusters:e=>n(`faceGallery`,`suggestFaceClusters`,`query`,e)},integrations:{list:e=>n(`integrations`,`list`,`query`,e),get:e=>n(`integrations`,`get`,`query`,e),getByAddonId:e=>n(`integrations`,`getByAddonId`,`query`,e),create:e=>n(`integrations`,`create`,`mutation`,e),update:e=>n(`integrations`,`update`,`mutation`,e),delete:e=>n(`integrations`,`delete`,`mutation`,e),getSettings:e=>n(`integrations`,`getSettings`,`query`,e),setSettings:e=>n(`integrations`,`setSettings`,`mutation`,e),getAvailableTypes:e=>n(`integrations`,`getAvailableTypes`,`query`,e),testConnection:e=>n(`integrations`,`testConnection`,`mutation`,e)},llm:{generate:e=>n(`llm`,`generate`,`mutation`,e),generateVision:e=>n(`llm`,`generateVision`,`mutation`,e),cancel:e=>n(`llm`,`cancel`,`mutation`,e),listProfileKinds:e=>n(`llm`,`listProfileKinds`,`query`,e),listProfiles:e=>n(`llm`,`listProfiles`,`query`,e),upsertProfile:e=>n(`llm`,`upsertProfile`,`mutation`,e),deleteProfile:e=>n(`llm`,`deleteProfile`,`mutation`,e),testProfile:e=>n(`llm`,`testProfile`,`mutation`,e),listModels:e=>n(`llm`,`listModels`,`query`,e),getDefaults:e=>n(`llm`,`getDefaults`,`query`,e),setDefault:e=>n(`llm`,`setDefault`,`mutation`,e),getUsage:e=>n(`llm`,`getUsage`,`query`,e),listModelCatalog:e=>n(`llm`,`listModelCatalog`,`query`,e),listRuntimeNodes:e=>n(`llm`,`listRuntimeNodes`,`query`,e),listNodeModels:e=>n(`llm`,`listNodeModels`,`query`,e),resolveModelRef:e=>n(`llm`,`resolveModelRef`,`mutation`,e),installModel:e=>n(`llm`,`installModel`,`mutation`,e),deleteModel:e=>n(`llm`,`deleteModel`,`mutation`,e),getRuntimeStatus:e=>n(`llm`,`getRuntimeStatus`,`query`,e),startRuntime:e=>n(`llm`,`startRuntime`,`mutation`,e),stopRuntime:e=>n(`llm`,`stopRuntime`,`mutation`,e)},localNetwork:{list:e=>n(`localNetwork`,`list`,`query`,e),getPreferred:e=>n(`localNetwork`,`getPreferred`,`query`,e),getConnectionEndpoints:e=>n(`localNetwork`,`getConnectionEndpoints`,`query`,e),getNotificationEndpoint:e=>n(`localNetwork`,`getNotificationEndpoint`,`query`,e),setNotificationEndpoint:e=>n(`localNetwork`,`setNotificationEndpoint`,`mutation`,e),getViewerEndpoints:e=>n(`localNetwork`,`getViewerEndpoints`,`query`,e),setViewerEndpoints:e=>n(`localNetwork`,`setViewerEndpoints`,`mutation`,e),getAllowedAddresses:e=>n(`localNetwork`,`getAllowedAddresses`,`query`,e),setAllowedAddresses:e=>n(`localNetwork`,`setAllowedAddresses`,`mutation`,e),resetAllowlistToBestMatch:e=>n(`localNetwork`,`resetAllowlistToBestMatch`,`mutation`,e),getTlsStatus:e=>n(`localNetwork`,`getTlsStatus`,`query`,e),regenerateCertificate:e=>n(`localNetwork`,`regenerateCertificate`,`mutation`,e),uploadCertificate:e=>n(`localNetwork`,`uploadCertificate`,`mutation`,e),downloadCa:e=>n(`localNetwork`,`downloadCa`,`query`,e),revertToGeneratedCertificate:e=>n(`localNetwork`,`revertToGeneratedCertificate`,`mutation`,e)},meshNetwork:{getStatus:e=>n(`meshNetwork`,`getStatus`,`query`,e),join:e=>n(`meshNetwork`,`join`,`mutation`,e),startLogin:e=>n(`meshNetwork`,`startLogin`,`mutation`,e),leave:e=>n(`meshNetwork`,`leave`,`mutation`,e),logout:e=>n(`meshNetwork`,`logout`,`mutation`,e),listPeers:e=>n(`meshNetwork`,`listPeers`,`query`,e),testConnection:e=>n(`meshNetwork`,`testConnection`,`mutation`,e)},metricsProvider:{collectSnapshot:e=>n(`metricsProvider`,`collectSnapshot`,`query`,e),getCached:e=>n(`metricsProvider`,`getCached`,`query`,e),getCurrent:e=>n(`metricsProvider`,`getCurrent`,`query`,e),getDiskSpace:e=>n(`metricsProvider`,`getDiskSpace`,`query`,e),getGpuInfo:e=>n(`metricsProvider`,`getGpuInfo`,`query`,e),getCpuTemperature:e=>n(`metricsProvider`,`getCpuTemperature`,`query`,e),getProcessStats:e=>n(`metricsProvider`,`getProcessStats`,`query`,e),listAddonInstances:e=>n(`metricsProvider`,`listAddonInstances`,`query`,e),getAddonStats:e=>n(`metricsProvider`,`getAddonStats`,`query`,e),listNodeProcesses:e=>n(`metricsProvider`,`listNodeProcesses`,`query`,e),getLoadSeries:e=>n(`metricsProvider`,`getLoadSeries`,`query`,e)},mqttBroker:{listBrokers:e=>n(`mqttBroker`,`listBrokers`,`query`,e),getBrokerConfig:e=>n(`mqttBroker`,`getBrokerConfig`,`query`,e),addBroker:e=>n(`mqttBroker`,`addBroker`,`mutation`,e),removeBroker:e=>n(`mqttBroker`,`removeBroker`,`mutation`,e),testConnection:e=>n(`mqttBroker`,`testConnection`,`mutation`,e),startEmbeddedBroker:e=>n(`mqttBroker`,`startEmbeddedBroker`,`mutation`,e),stopEmbeddedBroker:e=>n(`mqttBroker`,`stopEmbeddedBroker`,`mutation`,e),getStatus:e=>n(`mqttBroker`,`getStatus`,`query`,e)},networkAccess:{start:e=>n(`networkAccess`,`start`,`mutation`,e),stop:e=>n(`networkAccess`,`stop`,`mutation`,e),getEndpoint:e=>n(`networkAccess`,`getEndpoint`,`query`,e),getStatus:e=>n(`networkAccess`,`getStatus`,`query`,e),listEndpoints:e=>n(`networkAccess`,`listEndpoints`,`query`,e)},networkQuality:{getAllStats:e=>n(`networkQuality`,`getAllStats`,`query`,e)},nodes:{topology:e=>n(`nodes`,`topology`,`query`,e),deployAddon:e=>n(`nodes`,`deployAddon`,`mutation`,e),undeployAddon:e=>n(`nodes`,`undeployAddon`,`mutation`,e),restartAddon:e=>n(`nodes`,`restartAddon`,`mutation`,e),restartProcess:e=>n(`nodes`,`restartProcess`,`mutation`,e),restartNode:e=>n(`nodes`,`restartNode`,`mutation`,e),shutdownNode:e=>n(`nodes`,`shutdownNode`,`mutation`,e),renameNode:e=>n(`nodes`,`renameNode`,`mutation`,e),clusterAddonStatus:e=>n(`nodes`,`clusterAddonStatus`,`query`,e),getCapUsageGraph:e=>n(`nodes`,`getCapUsageGraph`,`query`,e),getNodeAddons:e=>n(`nodes`,`getNodeAddons`,`query`,e),setProcessLogLevel:e=>n(`nodes`,`setProcessLogLevel`,`mutation`,e),executeQuery:e=>n(`nodes`,`executeQuery`,`mutation`,e)},notificationOutput:{listTargetKinds:e=>n(`notificationOutput`,`listTargetKinds`,`query`,e),listTargets:e=>n(`notificationOutput`,`listTargets`,`query`,e),discoverTargets:e=>n(`notificationOutput`,`discoverTargets`,`query`,e),send:e=>n(`notificationOutput`,`send`,`mutation`,e),testTarget:e=>n(`notificationOutput`,`testTarget`,`mutation`,e),upsertTarget:e=>n(`notificationOutput`,`upsertTarget`,`mutation`,e),deleteTarget:e=>n(`notificationOutput`,`deleteTarget`,`mutation`,e),setTargetEnabled:e=>n(`notificationOutput`,`setTargetEnabled`,`mutation`,e)},osdManager:{getConditionSupport:e=>n(`osdManager`,`getConditionSupport`,`query`,e),copyDeviceConfiguration:e=>n(`osdManager`,`copyDeviceConfiguration`,`mutation`,e)},pipelineExecutor:{getAvailableEngines:e=>n(`pipelineExecutor`,`getAvailableEngines`,`query`,e),getSelectedEngine:e=>n(`pipelineExecutor`,`getSelectedEngine`,`query`,e),getDefaultSteps:e=>n(`pipelineExecutor`,`getDefaultSteps`,`query`,e),getEngineProvisioning:e=>n(`pipelineExecutor`,`getEngineProvisioning`,`query`,e),getVideoPipelineSteps:e=>n(`pipelineExecutor`,`getVideoPipelineSteps`,`query`,e),setVideoPipelineSteps:e=>n(`pipelineExecutor`,`setVideoPipelineSteps`,`mutation`,e),clearDeviceOverrides:e=>n(`pipelineExecutor`,`clearDeviceOverrides`,`mutation`,e),getInferenceDeviceHealth:e=>n(`pipelineExecutor`,`getInferenceDeviceHealth`,`query`,e),rearmInferenceDevice:e=>n(`pipelineExecutor`,`rearmInferenceDevice`,`mutation`,e),getSchema:e=>n(`pipelineExecutor`,`getSchema`,`query`,e),getGlobalSteps:e=>n(`pipelineExecutor`,`getGlobalSteps`,`query`,e),getGlobalPipelineConfig:e=>n(`pipelineExecutor`,`getGlobalPipelineConfig`,`query`,e),getOrchestratorConfigSchema:e=>n(`pipelineExecutor`,`getOrchestratorConfigSchema`,`query`,e),validatePipeline:e=>n(`pipelineExecutor`,`validatePipeline`,`query`,e),listTemplates:e=>n(`pipelineExecutor`,`listTemplates`,`query`,e),saveTemplate:e=>n(`pipelineExecutor`,`saveTemplate`,`mutation`,e),updateTemplate:e=>n(`pipelineExecutor`,`updateTemplate`,`mutation`,e),deleteTemplate:e=>n(`pipelineExecutor`,`deleteTemplate`,`mutation`,e),getCapabilities:e=>n(`pipelineExecutor`,`getCapabilities`,`query`,e),getAddonModels:e=>n(`pipelineExecutor`,`getAddonModels`,`query`,e),downloadModel:e=>n(`pipelineExecutor`,`downloadModel`,`mutation`,e),deleteModel:e=>n(`pipelineExecutor`,`deleteModel`,`mutation`,e),cacheFrameInPool:e=>n(`pipelineExecutor`,`cacheFrameInPool`,`mutation`,e),inferCached:e=>n(`pipelineExecutor`,`inferCached`,`mutation`,e),uncacheFrame:e=>n(`pipelineExecutor`,`uncacheFrame`,`mutation`,e),getEffectiveTuning:e=>n(`pipelineExecutor`,`getEffectiveTuning`,`query`,e),listLoadedEngines:e=>n(`pipelineExecutor`,`listLoadedEngines`,`query`,e),spinEngine:e=>n(`pipelineExecutor`,`spinEngine`,`mutation`,e),killEngine:e=>n(`pipelineExecutor`,`killEngine`,`mutation`,e),listReferenceImages:e=>n(`pipelineExecutor`,`listReferenceImages`,`query`,e),getReferenceImage:e=>n(`pipelineExecutor`,`getReferenceImage`,`query`,e),getReferenceAudioFiles:e=>n(`pipelineExecutor`,`getReferenceAudioFiles`,`query`,e),getReferenceAudio:e=>n(`pipelineExecutor`,`getReferenceAudio`,`query`,e),getAudioCapabilities:e=>n(`pipelineExecutor`,`getAudioCapabilities`,`query`,e),runAudioTest:e=>n(`pipelineExecutor`,`runAudioTest`,`mutation`,e),getDetectionConfigSchema:e=>n(`pipelineExecutor`,`getDetectionConfigSchema`,`query`,e)},pipelineOrchestrator:{pauseForStorageMigration:e=>n(`pipelineOrchestrator`,`pauseForStorageMigration`,`mutation`,e),resumeForStorageMigration:e=>n(`pipelineOrchestrator`,`resumeForStorageMigration`,`mutation`,e),rebalance:e=>n(`pipelineOrchestrator`,`rebalance`,`mutation`,e),getPipelineAssignments:e=>n(`pipelineOrchestrator`,`getPipelineAssignments`,`query`,e),getAgentLoad:e=>n(`pipelineOrchestrator`,`getAgentLoad`,`query`,e),getGlobalMetrics:e=>n(`pipelineOrchestrator`,`getGlobalMetrics`,`query`,e),getCapabilityBindings:e=>n(`pipelineOrchestrator`,`getCapabilityBindings`,`query`,e),setCapabilityBinding:e=>n(`pipelineOrchestrator`,`setCapabilityBinding`,`mutation`,e),getIngestOwner:e=>n(`pipelineOrchestrator`,`getIngestOwner`,`query`,e),getAudioNodeLoad:e=>n(`pipelineOrchestrator`,`getAudioNodeLoad`,`query`,e),getAgentSettings:e=>n(`pipelineOrchestrator`,`getAgentSettings`,`query`,e),listAgentSettings:e=>n(`pipelineOrchestrator`,`listAgentSettings`,`query`,e),removeAgentSettings:e=>n(`pipelineOrchestrator`,`removeAgentSettings`,`mutation`,e),setAgentMaxCameras:e=>n(`pipelineOrchestrator`,`setAgentMaxCameras`,`mutation`,e),setAgentDetectWeight:e=>n(`pipelineOrchestrator`,`setAgentDetectWeight`,`mutation`,e),setAgentCapabilities:e=>n(`pipelineOrchestrator`,`setAgentCapabilities`,`mutation`,e),setAgentDecodeLimits:e=>n(`pipelineOrchestrator`,`setAgentDecodeLimits`,`mutation`,e),setAgentReachableHost:e=>n(`pipelineOrchestrator`,`setAgentReachableHost`,`mutation`,e),setAgentInferenceDevices:e=>n(`pipelineOrchestrator`,`setAgentInferenceDevices`,`mutation`,e),getNodeInferenceDevices:e=>n(`pipelineOrchestrator`,`getNodeInferenceDevices`,`query`,e),resetNodePipelineDefaults:e=>n(`pipelineOrchestrator`,`resetNodePipelineDefaults`,`mutation`,e),getCameraStatuses:e=>n(`pipelineOrchestrator`,`getCameraStatuses`,`query`,e),reconcileFromDisk:e=>n(`pipelineOrchestrator`,`reconcileFromDisk`,`mutation`,e),getReconcileFromDiskStatus:e=>n(`pipelineOrchestrator`,`getReconcileFromDiskStatus`,`query`,e),listTemplates:e=>n(`pipelineOrchestrator`,`listTemplates`,`query`,e),saveTemplate:e=>n(`pipelineOrchestrator`,`saveTemplate`,`mutation`,e),updateTemplate:e=>n(`pipelineOrchestrator`,`updateTemplate`,`mutation`,e),deleteTemplate:e=>n(`pipelineOrchestrator`,`deleteTemplate`,`mutation`,e)},pipelineRunner:{attachCamera:e=>n(`pipelineRunner`,`attachCamera`,`mutation`,e),reportMotion:e=>n(`pipelineRunner`,`reportMotion`,`mutation`,e),getLocalLoad:e=>n(`pipelineRunner`,`getLocalLoad`,`query`,e),getLocalMetrics:e=>n(`pipelineRunner`,`getLocalMetrics`,`query`,e),getAllCameraMetrics:e=>n(`pipelineRunner`,`getAllCameraMetrics`,`query`,e),getLocalCameras:e=>n(`pipelineRunner`,`getLocalCameras`,`query`,e),getNativeCrop:e=>n(`pipelineRunner`,`getNativeCrop`,`query`,e),runStatelessStep:e=>n(`pipelineRunner`,`runStatelessStep`,`mutation`,e)},plateGallery:{getPlateMedia:e=>n(`plateGallery`,`getPlateMedia`,`query`,e),searchPlates:e=>n(`plateGallery`,`searchPlates`,`query`,e),suggestPlateClusters:e=>n(`plateGallery`,`suggestPlateClusters`,`query`,e),correctPlateText:e=>n(`plateGallery`,`correctPlateText`,`mutation`,e),deletePlate:e=>n(`plateGallery`,`deletePlate`,`mutation`,e),listVehicles:e=>n(`plateGallery`,`listVehicles`,`query`,e),createVehicle:e=>n(`plateGallery`,`createVehicle`,`mutation`,e),renameVehicle:e=>n(`plateGallery`,`renameVehicle`,`mutation`,e),deleteVehicle:e=>n(`plateGallery`,`deleteVehicle`,`mutation`,e),listVehicleSamples:e=>n(`plateGallery`,`listVehicleSamples`,`query`,e),removeVehicleSample:e=>n(`plateGallery`,`removeVehicleSample`,`mutation`,e),assignPlate:e=>n(`plateGallery`,`assignPlate`,`mutation`,e),unassignPlate:e=>n(`plateGallery`,`unassignPlate`,`mutation`,e),assignPlates:e=>n(`plateGallery`,`assignPlates`,`mutation`,e),unassignPlates:e=>n(`plateGallery`,`unassignPlates`,`mutation`,e)},recording:{getAvailabilityBatch:e=>n(`recording`,`getAvailabilityBatch`,`query`,e),getDaysWithRecordingsBatch:e=>n(`recording`,`getDaysWithRecordingsBatch`,`query`,e),getStorageUsage:e=>n(`recording`,`getStorageUsage`,`query`,e),listOpsLog:e=>n(`recording`,`listOpsLog`,`query`,e),pauseForStorageMigration:e=>n(`recording`,`pauseForStorageMigration`,`mutation`,e),resumeForStorageMigration:e=>n(`recording`,`resumeForStorageMigration`,`mutation`,e),refreshStorageLocationsForMigration:e=>n(`recording`,`refreshStorageLocationsForMigration`,`mutation`,e),startStorageMigrationMove:e=>n(`recording`,`startStorageMigrationMove`,`mutation`,e),getStorageMigrationMoveStatus:e=>n(`recording`,`getStorageMigrationMoveStatus`,`query`,e),cancelStorageMigrationMove:e=>n(`recording`,`cancelStorageMigrationMove`,`mutation`,e),relocateFootage:e=>n(`recording`,`relocateFootage`,`mutation`,e),listRelocateJobs:e=>n(`recording`,`listRelocateJobs`,`query`,e),getRelocateResidue:e=>n(`recording`,`getRelocateResidue`,`query`,e),reconcileLedgerAgainstDisk:e=>n(`recording`,`reconcileLedgerAgainstDisk`,`mutation`,e),cancelRelocateJob:e=>n(`recording`,`cancelRelocateJob`,`mutation`,e),planStorageRebalance:e=>n(`recording`,`planStorageRebalance`,`query`,e),startStorageRebalance:e=>n(`recording`,`startStorageRebalance`,`mutation`,e),getPlacement:e=>n(`recording`,`getPlacement`,`query`,e),setDevicePlacement:e=>n(`recording`,`setDevicePlacement`,`mutation`,e)},recordingExport:{createExport:e=>n(`recordingExport`,`createExport`,`mutation`,e),getExport:e=>n(`recordingExport`,`getExport`,`query`,e),cancelExport:e=>n(`recordingExport`,`cancelExport`,`mutation`,e),deleteExport:e=>n(`recordingExport`,`deleteExport`,`mutation`,e),getDownloadUrl:e=>n(`recordingExport`,`getDownloadUrl`,`query`,e),readExportBytes:e=>n(`recordingExport`,`readExportBytes`,`query`,e)},serverManagement:{getServerPackageStatus:e=>n(`serverManagement`,`getServerPackageStatus`,`query`,e),checkServerUpdate:e=>n(`serverManagement`,`checkServerUpdate`,`mutation`,e),applyServerUpdate:e=>n(`serverManagement`,`applyServerUpdate`,`mutation`,e),rollbackServerUpdate:e=>n(`serverManagement`,`rollbackServerUpdate`,`mutation`,e),restartServer:e=>n(`serverManagement`,`restartServer`,`mutation`,e)},settingsStore:{get:e=>n(`settingsStore`,`get`,`query`,e),set:e=>n(`settingsStore`,`set`,`mutation`,e),query:e=>n(`settingsStore`,`query`,`query`,e),insert:e=>n(`settingsStore`,`insert`,`mutation`,e),insertMany:e=>n(`settingsStore`,`insertMany`,`mutation`,e),update:e=>n(`settingsStore`,`update`,`mutation`,e),delete:e=>n(`settingsStore`,`delete`,`mutation`,e),deleteWhere:e=>n(`settingsStore`,`deleteWhere`,`mutation`,e),updateWhere:e=>n(`settingsStore`,`updateWhere`,`mutation`,e),count:e=>n(`settingsStore`,`count`,`query`,e),aggregate:e=>n(`settingsStore`,`aggregate`,`query`,e),histogram:e=>n(`settingsStore`,`histogram`,`query`,e),isEmpty:e=>n(`settingsStore`,`isEmpty`,`query`,e),declareCollection:e=>n(`settingsStore`,`declareCollection`,`mutation`,e)},storage:{resolve:e=>n(`storage`,`resolve`,`query`,e),write:e=>n(`storage`,`write`,`mutation`,e),read:e=>n(`storage`,`read`,`query`,e),exists:e=>n(`storage`,`exists`,`query`,e),list:e=>n(`storage`,`list`,`query`,e),delete:e=>n(`storage`,`delete`,`mutation`,e),getAvailableSpace:e=>n(`storage`,`getAvailableSpace`,`query`,e),beginUpload:e=>n(`storage`,`beginUpload`,`mutation`,e),writeChunk:e=>n(`storage`,`writeChunk`,`mutation`,e),finalizeUpload:e=>n(`storage`,`finalizeUpload`,`mutation`,e),abortUpload:e=>n(`storage`,`abortUpload`,`mutation`,e),beginDownload:e=>n(`storage`,`beginDownload`,`mutation`,e),readChunk:e=>n(`storage`,`readChunk`,`query`,e),endDownload:e=>n(`storage`,`endDownload`,`mutation`,e),listLocations:e=>n(`storage`,`listLocations`,`query`,e),listLocationDeclarations:e=>n(`storage`,`listLocationDeclarations`,`query`,e),upsertLocation:e=>n(`storage`,`upsertLocation`,`mutation`,e),deleteLocation:e=>n(`storage`,`deleteLocation`,`mutation`,e),listDrainProgress:e=>n(`storage`,`listDrainProgress`,`query`,e),testLocation:e=>n(`storage`,`testLocation`,`query`,e),listProviders:e=>n(`storage`,`listProviders`,`query`,e),testConfig:e=>n(`storage`,`testConfig`,`query`,e)},storageMigration:{plan:e=>n(`storageMigration`,`plan`,`query`,e),start:e=>n(`storageMigration`,`start`,`mutation`,e),status:e=>n(`storageMigration`,`status`,`query`,e),cancel:e=>n(`storageMigration`,`cancel`,`mutation`,e),movers:e=>n(`storageMigration`,`movers`,`query`,e),residue:e=>n(`storageMigration`,`residue`,`query`,e),drain:e=>n(`storageMigration`,`drain`,`mutation`,e),cleanupStart:e=>n(`storageMigration`,`cleanupStart`,`mutation`,e),cleanupStatus:e=>n(`storageMigration`,`cleanupStatus`,`query`,e),cleanupCancel:e=>n(`storageMigration`,`cleanupCancel`,`mutation`,e),history:e=>n(`storageMigration`,`history`,`query`,e)},streamBroker:{fetchEventMedia:e=>n(`streamBroker`,`fetchEventMedia`,`mutation`,e),listAllCameraStreams:e=>n(`streamBroker`,`listAllCameraStreams`,`query`,e),listAllProfileSlots:e=>n(`streamBroker`,`listAllProfileSlots`,`query`,e),getBrokerStats:e=>n(`streamBroker`,`getBrokerStats`,`query`,e),probeStream:e=>n(`streamBroker`,`probeStream`,`mutation`,e),listClients:e=>n(`streamBroker`,`listClients`,`query`,e),killClient:e=>n(`streamBroker`,`killClient`,`mutation`,e),getStreamUrl:e=>n(`streamBroker`,`getStreamUrl`,`query`,e),getStreamWithCodec:e=>n(`streamBroker`,`getStreamWithCodec`,`mutation`,e),releaseStreamWithCodec:e=>n(`streamBroker`,`releaseStreamWithCodec`,`mutation`,e),acquireEgressTranscode:e=>n(`streamBroker`,`acquireEgressTranscode`,`mutation`,e),releaseEgressTranscode:e=>n(`streamBroker`,`releaseEgressTranscode`,`mutation`,e),subscribeAudioChunks:e=>n(`streamBroker`,`subscribeAudioChunks`,`mutation`,e),pullAudioChunks:e=>n(`streamBroker`,`pullAudioChunks`,`query`,e),unsubscribeAudioChunks:e=>n(`streamBroker`,`unsubscribeAudioChunks`,`mutation`,e),subscribeFrames:e=>n(`streamBroker`,`subscribeFrames`,`mutation`,e),pullFrameHandles:e=>n(`streamBroker`,`pullFrameHandles`,`query`,e),unsubscribeFrames:e=>n(`streamBroker`,`unsubscribeFrames`,`mutation`,e),setPreBufferDuration:e=>n(`streamBroker`,`setPreBufferDuration`,`mutation`,e),getPreBufferInfo:e=>n(`streamBroker`,`getPreBufferInfo`,`query`,e),getRtspPort:e=>n(`streamBroker`,`getRtspPort`,`query`,e),getAllRtspEntries:e=>n(`streamBroker`,`getAllRtspEntries`,`query`,e),getRtspEntry:e=>n(`streamBroker`,`getRtspEntry`,`query`,e),regenerateRtspToken:e=>n(`streamBroker`,`regenerateRtspToken`,`mutation`,e),setRtspEnabled:e=>n(`streamBroker`,`setRtspEnabled`,`mutation`,e),isRtspEnabled:e=>n(`streamBroker`,`isRtspEnabled`,`query`,e)},system:{info:e=>n(`system`,`info`,`query`,e),health:e=>n(`system`,`health`,`query`,e),featureFlags:e=>n(`system`,`featureFlags`,`query`,e),networkAddresses:e=>n(`system`,`networkAddresses`,`query`,e),getRetentionConfig:e=>n(`system`,`getRetentionConfig`,`query`,e),setRetentionConfig:e=>n(`system`,`setRetentionConfig`,`mutation`,e),forceRetentionCleanup:e=>n(`system`,`forceRetentionCleanup`,`mutation`,e),getSiteLocation:e=>n(`system`,`getSiteLocation`,`query`,e),setSiteLocation:e=>n(`system`,`setSiteLocation`,`mutation`,e),detectSiteLocation:e=>n(`system`,`detectSiteLocation`,`mutation`,e),getRequestCensus:e=>n(`system`,`getRequestCensus`,`query`,e),getLoadContributions:e=>n(`system`,`getLoadContributions`,`query`,e),getFailureContributions:e=>n(`system`,`getFailureContributions`,`query`,e),getLoggingSettings:e=>n(`system`,`getLoggingSettings`,`query`,e),setLoggingSettings:e=>n(`system`,`setLoggingSettings`,`mutation`,e)},terminalSession:{listProfiles:e=>n(`terminalSession`,`listProfiles`,`query`,e),listInstances:e=>n(`terminalSession`,`listInstances`,`query`,e),createInstance:e=>n(`terminalSession`,`createInstance`,`mutation`,e),updateInstance:e=>n(`terminalSession`,`updateInstance`,`mutation`,e),deleteInstance:e=>n(`terminalSession`,`deleteInstance`,`mutation`,e),setInstanceEnabled:e=>n(`terminalSession`,`setInstanceEnabled`,`mutation`,e),listLegacyCameras:e=>n(`terminalSession`,`listLegacyCameras`,`query`,e),adoptLegacyMonitor:e=>n(`terminalSession`,`adoptLegacyMonitor`,`mutation`,e),listSessions:e=>n(`terminalSession`,`listSessions`,`query`,e),openSession:e=>n(`terminalSession`,`openSession`,`mutation`,e),resize:e=>n(`terminalSession`,`resize`,`mutation`,e),pullOutput:e=>n(`terminalSession`,`pullOutput`,`mutation`,e),writeInput:e=>n(`terminalSession`,`writeInput`,`mutation`,e),close:e=>n(`terminalSession`,`close`,`mutation`,e)},toast:{onToast:(e,t)=>n(`toast`,`onToast`,`subscription`,e,t)},turnProvider:{getTurnServers:e=>n(`turnProvider`,`getTurnServers`,`query`,e)},userManagement:{listUsers:e=>n(`userManagement`,`listUsers`,`query`,e),createUser:e=>n(`userManagement`,`createUser`,`mutation`,e),updateUser:e=>n(`userManagement`,`updateUser`,`mutation`,e),deleteUser:e=>n(`userManagement`,`deleteUser`,`mutation`,e),resetPassword:e=>n(`userManagement`,`resetPassword`,`mutation`,e),setUserScopes:e=>n(`userManagement`,`setUserScopes`,`mutation`,e),validateCredentials:e=>n(`userManagement`,`validateCredentials`,`mutation`,e),listApiKeys:e=>n(`userManagement`,`listApiKeys`,`query`,e),createApiKey:e=>n(`userManagement`,`createApiKey`,`mutation`,e),revokeApiKey:e=>n(`userManagement`,`revokeApiKey`,`mutation`,e),validateApiKey:e=>n(`userManagement`,`validateApiKey`,`mutation`,e),createScopedToken:e=>n(`userManagement`,`createScopedToken`,`mutation`,e),revokeScopedToken:e=>n(`userManagement`,`revokeScopedToken`,`mutation`,e),validateScopedToken:e=>n(`userManagement`,`validateScopedToken`,`query`,e),listScopedTokens:e=>n(`userManagement`,`listScopedTokens`,`query`,e),setupTotp:e=>n(`userManagement`,`setupTotp`,`mutation`,e),confirmTotp:e=>n(`userManagement`,`confirmTotp`,`mutation`,e),disableTotp:e=>n(`userManagement`,`disableTotp`,`mutation`,e),getTotpStatus:e=>n(`userManagement`,`getTotpStatus`,`query`,e),verifyTotp:e=>n(`userManagement`,`verifyTotp`,`mutation`,e),oauthIssueCode:e=>n(`userManagement`,`oauthIssueCode`,`mutation`,e),oauthExchangeCode:e=>n(`userManagement`,`oauthExchangeCode`,`mutation`,e),oauthRefresh:e=>n(`userManagement`,`oauthRefresh`,`mutation`,e),oauthVerifyAccessToken:e=>n(`userManagement`,`oauthVerifyAccessToken`,`query`,e),listOauthSessions:e=>n(`userManagement`,`listOauthSessions`,`query`,e),revokeOauthSession:e=>n(`userManagement`,`revokeOauthSession`,`mutation`,e)}}}var YM=`audio-`;function XM(e){return e.startsWith(YM)?e.slice(6):e}function ZM(e){return e.startsWith(YM)?e:`${YM}${e}`}var QM=-96,$M=0,eN=3,tN=-55,nN=1,rN=100,iN=1,aN=300,oN=2,sN=5,cN=1,lN=20,uN=1,dN=60,fN={hitPercent:60,samplingSeconds:10};function pN(e){return e??fN}function mN(e){return e===void 0?null:e.labels!==void 0&&e.labels.length>0?`label`:e.dbThreshold===void 0?null:`level`}function hN(e){return e===void 0?!1:e.dbThreshold===void 0&&(e.labels===void 0||e.labels.length===0)}function gN(e,t,n){return Number.isFinite(e)?Math.min(n,Math.max(t,Math.round(e))):t}function _N(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function vN(e,t){let n=pN(e),r=_N(t,`labels`)?t.labels:n.labels,i=_N(t,`dbThreshold`)?t.dbThreshold:n.dbThreshold,a=r!==void 0&&r.length>0,o=t.mode??(_N(t,`labels`)&&a?`label`:_N(t,`dbThreshold`)&&i!==void 0?`level`:a?`label`:i===void 0?null:`level`),s=o===`label`&&a?r:void 0,c=o===`level`?i??(t.mode===`level`?-55:void 0):void 0;return{...s===void 0?{}:{labels:[...s]},...c===void 0?{}:{dbThreshold:gN(c,-96,0)},hitPercent:gN(t.hitPercent??n.hitPercent,1,100),samplingSeconds:gN(t.samplingSeconds??n.samplingSeconds,1,300),...(()=>{let e=_N(t,`confirmHits`)?t.confirmHits:n.confirmHits,r=_N(t,`confirmWindowSec`)?t.confirmWindowSec:n.confirmWindowSec;return{...e===void 0?{}:{confirmHits:gN(e,1,20)},...r===void 0?{}:{confirmWindowSec:gN(r,1,60)}}})()}}function yN(e,t){let n=e?.audioKinds??[],r=n.length>0?n.map(e=>{let t=XM(e.kind);return{value:t,label:e.label,iconId:ZM(t),unknown:!1}}):qm.map(e=>({value:e.id,label:e.name,iconId:ZM(e.id),unknown:!1})),i=new Set(r.map(e=>e.value)),a=[];for(let e of t??[]){let t=XM(e);i.has(t)||a.includes(t)||(a.push(t),r.push({value:t,label:t,iconId:ZM(t),unknown:!0}))}return{choices:r,unknownLabels:a}}function bN(e,t){let n=XM(t);return(e??[]).some(e=>XM(e)===n)}function xN(e,t){let n=XM(t),r=e??[];if(bN(r,n)){let e=r.filter(e=>XM(e)!==n);return e.length>0?e:void 0}return[...r,n]}var SN=new Set([`classes`,`classesExclude`]),CN=new Set([`sensorKinds`]),wN=new Set([`occupancy`]);function TN(e){return{value:e.kind,label:e.label}}function EN(e){let t=[],n=new Map,r=(e,r)=>{let i=n.get(e);if(i!==void 0)return i;let a={fallbackLabel:r,options:[]};return n.set(e,a),t.push(e),a};for(let t of e){let e=t.parentKind??t.kind,n=r(e,t.parentKind===null?t.label:e);n.options.push(TN(t)),t.parentKind===null&&(n.fallbackLabel=t.label)}return t.flatMap(e=>{let t=n.get(e);return t===void 0?[]:[{key:e,fallbackLabel:t.fallbackLabel,options:t.options}]})}function DN(e){let t=[],n=new Map;for(let r of e){let e=r.parentKind??`other`,i=n.get(e);i===void 0?(n.set(e,[TN(r)]),t.push(e)):i.push(TN(r))}return t.flatMap(e=>{let t=n.get(e);return t===void 0?[]:[{key:e,fallbackLabel:e,options:t}]})}function ON(e,t){if(!t)return null;if(SN.has(e)){let e=EN(t.videoClasses);return t.audioKinds.length>0&&e.push({key:`audio`,fallbackLabel:`Audio`,options:t.audioKinds.map(TN)}),e.length>0?{groups:e}:null}if(wN.has(e)){let e=t.videoClasses.filter(e=>e.parentKind===null).map(TN);return e.length>0?{groups:[{key:`macro`,fallbackLabel:`Classes`,options:e}]}:null}if(CN.has(e)){let e=DN(t.labels);return e.length>0?{groups:e}:null}return null}function kN(e){let t=new Set;for(let n of e.groups)for(let e of n.options)t.add(e.value);return t}var AN=[`devices`,`classes`],jN=new Set(AN);function MN(e){return jN.has(e)}function NN(e){return e.replace(/!\[([^\]]*)\]\([^)]*\)/g,`$1`).replace(/\[([^\]]*)\]\([^)]*\)/g,`$1`).replace(/(\*\*|__)(.*?)\1/g,`$2`).replace(/(\*|_)(.*?)\1/g,`$2`).replace(/`([^`]*)`/g,`$1`).replace(/^\s{0,3}#{1,6}\s*/gm,``).replace(/^\s{0,3}>\s?/gm,``).replace(/^\s{0,3}[-*+]\s+/gm,``).replace(/^\s{0,3}\d+\.\s+/gm,``).trim()}var PN=[[/&nbsp;/g,` `],[/&amp;/g,`&`],[/&lt;/g,`<`],[/&gt;/g,`>`],[/&quot;/g,`"`],[/&#39;/g,`'`]];function FN(e){let t=e.replace(/<\s*br\s*\/?\s*>/gi,`
345
+ `}var Ic=i({id:g(),label:g(),icon:g(),path:g(),remoteName:g(),bundle:g(),section:g().optional(),sectionLabel:g().optional()}),Lc=i({addonId:g(),page:Ic,bundleUrl:g()}),Rc={name:`addon-pages`,scope:`system`,mode:`singleton`,methods:{listPages:T(h(),p(Lc).readonly())}},zc=i({id:g(),label:g(),icon:g(),path:g(),remoteName:g(),bundle:g(),section:g().optional(),sectionLabel:g().optional()}),Bc={name:`addon-pages-source`,scope:`system`,mode:`collection`,internal:!0,methods:{listPages:T(h(),p(zc).readonly(),{auth:`admin`})}},Vc=i({method:m([`GET`,`POST`,`PUT`,`DELETE`,`PATCH`]),path:g(),access:m([`public`,`authenticated`,`admin`]).optional(),description:g().optional()}),Hc=i({method:g(),path:g(),params:n(g(),g()),query:n(g(),g()),body:u(),headers:n(g(),g()),user:i({id:g(),username:g(),isAdmin:v()}).optional(),scopedToken:u().optional()}),Uc=i({status:a().int(),headers:n(g(),g()),redirectUrl:g().nullable(),body:u().optional(),contentType:g().optional()}),Wc={name:`addon-routes`,scope:`system`,mode:`collection`,internal:!0,methods:{getRoutes:T(h(),p(Vc)),invoke:T(Hc,Uc,{kind:`mutation`})},mount:{kind:`skip`}},Gc=i({id:g(),label:g(),icon:g(),order:a().optional()}),Kc=i({id:g(),title:g(),description:g().optional(),style:m([`card`,`accordion`]).optional(),defaultCollapsed:v().optional(),columns:c([y(1),y(2),y(3),y(4)]).optional(),tab:g().optional(),location:m([`settings`,`top-tab`]).optional(),order:a().optional(),fields:p(ie())}),B=i({tabs:p(Gc).optional(),sections:p(Kc)}),qc=n(g(),u()),Jc=i({success:y(!0)}),Yc={name:`addon-settings`,scope:`system`,mode:`singleton`,nodeIdMode:`data`,methods:{getGlobalSettings:T(i({addonId:g(),nodeId:g().optional(),overlay:n(g(),u()).optional(),cap:g().optional()}),B.nullable()),updateGlobalSettings:T(i({addonId:g(),nodeId:g().optional(),patch:qc}),Jc,{kind:`mutation`,auth:`admin`}),getIntegrationSettings:T(i({addonId:g(),nodeId:g().optional()}),B.nullable()),getDeviceSettings:T(i({addonId:g(),deviceId:a(),nodeId:g().optional()}),B.nullable()),updateDeviceSettings:T(i({addonId:g(),deviceId:a(),nodeId:g().optional(),patch:qc}),Jc,{kind:`mutation`,auth:`admin`})}},Xc=m([`device-tab`,`dashboard`,`integration-detail`]),Zc=m([`xs`,`sm`,`md`,`lg`,`xl`]),Qc=i({remoteName:g(),exposedModule:g(),componentKey:g().optional()}),$c=i({tab:g(),subTab:g().optional(),label:g(),order:a().optional(),kind:y(`remote`),remote:Qc,stableId:g(),description:g().optional(),icon:g().optional(),bundle:g(),hosts:p(Xc).readonly(),requires:i({deviceContext:v().default(!1),integrationContext:v().default(!1)}),preAuth:v().optional().default(!1),defaultSize:Zc.default(`md`),allowedSizes:p(Zc).readonly().default([`sm`,`md`,`lg`]),defaultColumns:a().int().min(1).max(12).default(6),defaultRows:a().int().min(1).max(12).default(1)}),el={name:`addon-widgets-source`,scope:`system`,mode:`collection`,internal:!0,methods:{listWidgets:T(h(),p($c).readonly(),{auth:`admin`})}},tl=$c.extend({addonId:g(),bundleUrl:g()}),nl={name:`addon-widgets`,scope:`system`,mode:`singleton`,methods:{listWidgets:T(h(),p(tl).readonly())}},rl=m([`info`,`success`,`warning`,`error`]),il=m([`active`,`in-progress`,`completed`,`failed`,`dismissed`]),al=i({type:g(),id:g()}),ol=i({id:g(),category:g(),severity:rl,title:g(),message:g(),status:il,progress:a().optional(),read:v(),createdAt:a(),updatedAt:a(),source:al.optional(),metadata:n(g(),u()).optional()}),sl={name:`alerts`,scope:`system`,mode:`singleton`,methods:{emit:T(ol,h(),{kind:`mutation`}),update:T(i({alertId:g(),patch:ol.partial()}),h(),{kind:`mutation`}),list:T(i({unreadOnly:v().optional(),limit:a().optional()}).optional(),p(ol).readonly()),getUnreadCount:T(h(),a()),markRead:T(i({alertId:g()}),h(),{kind:`mutation`}),markAllRead:T(h(),h(),{kind:`mutation`}),dismiss:T(i({alertId:g()}),h(),{kind:`mutation`})}},cl={name:`audio-analysis`,scope:`device`,mode:`singleton`,kind:`wrapper`,defaultActive:!0,deviceTypes:[D.Camera],exposesDeviceSettings:!0,methods:{resolveDeviceSettings:T(i({deviceId:a()}),x())},events:{onAudioLevel:E(i({deviceId:a(),rms:a(),dbfs:a()}))}},ll=m([`jpeg`,`rgb`,`bgr`,`yuv420`,`gray`]),ul=i({data:x(),format:ll,width:a(),height:a(),timestamp:a()}),V=i({x:a(),y:a(),w:a(),h:a()}),dl=i({class:g(),originalClass:g(),score:a(),bbox:V}),fl=i({data:_(Uint8Array),sampleRate:a(),channels:a(),timestamp:a(),deviceId:a().optional()}),pl=i({rms:a(),dbfs:a()}),ml=i({className:g(),originalClass:g().optional(),score:a()}),hl=i({level:pl,classification:i({labels:p(ml).readonly(),inferenceMs:a()}).optional(),timestamp:a()}),gl=i({minConfidence:a().min(0).max(1).default(.3),allowedClasses:p(g()).default([])}),_l=i({labels:p(ml).readonly(),rawLabels:p(ml).readonly().optional(),inferenceMs:a()}),vl=[{value:`auto`,label:`Auto (platform default)`},{value:`apple-soundanalysis`,label:`Apple SoundAnalysis (macOS 12+)`},{value:`yamnet-onnx`,label:`YAMNet ONNX (cross-platform)`}],yl={audioBackend:`auto`,probedBestAudioBackend:``},bl={name:`audio-analyzer`,scope:`system`,mode:`singleton`,methods:{analyseChunk:T(i({chunk:fl,settings:gl}),hl.nullable(),{kind:`mutation`}),classify:T(fl,_l,{timeoutMs:3e4}),isReady:T(h(),v()),dispose:T(h(),h(),{kind:`mutation`}),reprobeAudioEngine:T(h(),i({backend:g()}),{kind:`mutation`,auth:`admin`})}},xl=m([`f32le`,`s16le`]),Sl=i({codec:g(),canDecode:v(),canEncode:v(),label:g().optional()}),Cl=i({codec:g(),sourceSampleRate:a().int().positive(),sourceChannels:a().int().positive(),extraData:_(Uint8Array).optional(),targetSampleRate:a().int().positive(),targetChannels:a().int().positive(),targetFormat:xl.optional(),idleMs:a().int().positive().optional(),tag:g().optional()}),wl=i({codec:g(),sourceSampleRate:a().int().positive(),sourceChannels:a().int().positive(),sourceFormat:xl.optional(),targetSampleRate:a().int().positive(),targetChannels:a().int().positive(),bitrateKbps:a().int().positive().optional(),idleMs:a().int().positive().optional(),tag:g().optional()}),Tl=i({data:_(Uint8Array),sampleRate:a().int().positive(),channels:a().int().positive(),format:xl,pts:a()}),El=i({data:_(Uint8Array),codec:g(),pts:a(),frameComplete:v()}),Dl=i({sessionId:g(),kind:m([`decode`,`encode`]),codec:g(),sourceSampleRate:a(),sourceChannels:a(),targetSampleRate:a(),targetChannels:a(),format:xl,tag:g().optional(),createdAtMs:a(),lastActivityMs:a(),framesIn:a(),framesOut:a()}),Ol={name:`audio-codec`,scope:`system`,mode:`singleton`,preferredProvider:`decoder-nodeav`,methods:{listSupportedCodecs:T(h(),p(Sl).readonly()),canHandle:T(i({codec:g(),kind:m([`decode`,`encode`])}),v()),createDecodeSession:T(Cl,i({sessionId:g(),nodeId:g()}),{kind:`mutation`}),createEncodeSession:T(wl,i({sessionId:g(),nodeId:g()}),{kind:`mutation`}),closeSession:T(i({sessionId:g(),nodeId:g().optional()}),h(),{kind:`mutation`}),pushEncodedFrame:T(i({sessionId:g(),nodeId:g().optional(),data:_(Uint8Array),pts:a().optional()}),h(),{kind:`mutation`}),pullPcm:T(i({sessionId:g(),nodeId:g().optional(),maxCount:a().int().positive().default(8)}),p(Tl)),pushPcm:T(i({sessionId:g(),nodeId:g().optional(),data:_(Uint8Array),pts:a().optional()}),h(),{kind:`mutation`}),pullEncoded:T(i({sessionId:g(),nodeId:g().optional(),maxCount:a().int().positive().default(8)}),p(El)),flushEncode:T(i({sessionId:g(),nodeId:g().optional()}),p(El),{kind:`mutation`}),listActiveSessions:T(h(),p(Dl).readonly())}},kl=i({userId:g(),username:g(),email:g().optional(),displayName:g().optional(),isAdmin:v().default(!1)}),Al={name:`auth-provider`,scope:`system`,mode:`collection`,internal:!0,methods:{validateCredentials:T(i({username:g(),password:g()}),kl.nullable(),{kind:`mutation`}),getLoginUrl:T(i({state:g()}),g()),handleCallback:T(n(g(),g()),kl,{kind:`mutation`}),validateToken:T(i({token:g()}),kl.nullable())},mount:{kind:`skip`}},jl=i({subId:g(),displayName:g(),description:g().optional(),kind:g(),triggerSupported:v(),restoreSupported:v()}).extend({id:g(),addonId:g(),enabled:v(),retentionCount:a(),label:g().optional(),lastSuccessAt:a().optional(),lastSuccessSizeBytes:a().optional(),cron:g().optional(),nextRunAt:a().optional(),lastAttemptAt:a().optional(),lastError:g().optional()}),Ml=i({id:g(),filename:g(),createdAt:a(),sizeBytes:a(),label:g().optional(),locations:p(g()).readonly()}),Nl=i({id:g(),destinationId:g().optional(),label:g().optional(),createdAt:a(),sizeBytes:a(),locations:p(g()).optional()}),Pl=i({path:g(),kind:m([`file`,`dir`,`symlink`]),sizeBytes:a(),mtime:a()}),Fl=i({archiveVersion:y(1),createdAt:a(),dataDir:g(),locations:p(g()),entries:p(Pl),totalBytes:a(),totalFiles:a()}),Il=i({name:g(),sizeBytes:a(),fileCount:a(),present:v()}),Ll=m([`queued`,`running`,`succeeded`,`failed`,`cancelled`]),Rl=m([`queued`,`building`,`uploading`,`done`]),zl=i({id:g(),state:Ll,phase:Rl,destinationIds:p(g()).readonly(),label:g().optional(),requestedAt:a(),startedAt:a().optional(),finishedAt:a().optional(),stagedBytes:a(),archiveSizeBytes:a().optional(),uploadedBytes:a(),completedDestinationIds:p(g()).readonly(),failedDestinationIds:p(g()).readonly(),error:g().optional(),queuePosition:a().int().min(1).optional()}),Bl=i({runId:g(),queued:v(),joined:v(),cancelled:v(),entries:p(Nl).readonly()}),Vl=i({id:g(),label:g(),cron:g(),enabled:v(),locationIds:p(g()).readonly(),retentionCount:a().int().min(1).max(1e3),dataSources:p(g()).readonly().optional(),lastAttemptAt:a().optional(),lastSuccessAt:a().optional(),lastError:g().optional(),nextRunAt:a().optional()}),Hl={name:`backup`,scope:`system`,mode:`singleton`,methods:{listDestinations:T(h(),p(jl).readonly(),{auth:`admin`}),trigger:T(i({destinations:p(g()).optional(),locations:p(g()).optional(),label:g().optional(),retentionCount:a().int().min(1).max(1e3).optional()}).optional(),Bl,{kind:`mutation`,auth:`admin`}),listRuns:T(h(),p(zl).readonly(),{auth:`admin`}),cancel:T(i({runId:g()}),i({cancelled:v()}),{kind:`mutation`,auth:`admin`}),list:T(h(),p(Nl).readonly(),{auth:`admin`}),listLocations:T(h(),p(Il).readonly(),{auth:`admin`}),getEntries:T(i({destinationId:g(),backupId:g()}),Fl.nullable(),{auth:`admin`}),restore:T(i({destinationId:g(),backupId:g(),locations:p(g()).optional()}),h(),{kind:`mutation`,auth:`admin`}),delete:T(i({destinationId:g(),backupId:g()}),h(),{kind:`mutation`,auth:`admin`}),listArchives:T(i({destinationId:g()}),p(Ml).readonly(),{auth:`admin`}),upsertDestinationPolicy:T(i({locationId:g(),enabled:v(),retentionCount:a().int().min(1).max(1e3),label:g().optional()}),h(),{kind:`mutation`,auth:`admin`}),previewSchedule:T(i({cron:g(),count:a().int().min(1).max(20).optional()}),i({ok:v(),error:g().optional(),nextRuns:p(a()).readonly()})),listSchedules:T(h(),p(Vl).readonly(),{auth:`admin`}),upsertSchedule:T(i({id:g().optional(),label:g(),cron:g(),enabled:v(),locationIds:p(g()).readonly(),retentionCount:a().int().min(1).max(1e3),dataSources:p(g()).readonly().optional()}),Vl,{kind:`mutation`,auth:`admin`}),deleteSchedule:T(i({id:g()}),h(),{kind:`mutation`,auth:`admin`})}},Ul=m([`connected`,`disconnected`,`connecting`,`auth-failed`,`unreachable`,`error`]),Wl=i({id:g(),addonId:g(),name:g(),kind:g(),status:Ul,info:n(g(),u()),lastCheckedAt:a().nullable(),error:g().nullable()}),Gl=i({brokerCount:a().int().nonnegative(),connectedCount:a().int().nonnegative()}),Kl=i({addonId:g(),kinds:p(i({kind:g(),label:g()}))}),ql=i({kind:g().optional()}),Jl=i({id:g()}),Yl=i({kind:g().min(1),name:g().min(1),id:g().min(1).optional(),settings:n(g(),u())}),Xl=i({id:g()}),Zl=i({id:g()}),Ql=b(`ok`,[i({ok:y(!0),latencyMs:a().nonnegative()}),i({ok:y(!1),error:g()})]),$l=n(g(),u()),eu=i({kind:g()}),tu=i({kind:g(),settings:$l}),nu=b(`ok`,[i({ok:y(!0),latencyMs:a().nonnegative().optional()}).strict(),i({ok:y(!1),error:g()})]),ru=u().nullable(),iu=i({brokerId:g(),target:n(g(),u()),payload:u().optional()}),au=i({brokerId:g(),filter:n(g(),u())}),ou=i({subscriptionId:g()}),su=i({brokerId:g(),subscriptionId:g()}),cu=i({brokerId:g(),key:g()}),lu={name:`broker`,scope:`system`,mode:`collection`,providerKind:`broker`,status:{schema:Gl,kind:`poll`},methods:{list:T(ql,p(Wl)),get:T(Jl,Wl.nullable()),listProviders:T(h(),p(Kl),{auth:`admin`}),add:T(Yl,Xl,{kind:`mutation`,auth:`admin`}),remove:T(Zl,h(),{kind:`mutation`,auth:`admin`}),testConnection:T(Jl,Ql,{kind:`mutation`,auth:`admin`}),getSettings:T(Jl,$l.nullable(),{auth:`admin`}),setSettings:T(i({id:g(),settings:$l}),h(),{kind:`mutation`,auth:`admin`}),getBrokerConfig:T(Jl,$l.nullable(),{auth:`admin`}),getSettingsSchema:T(eu,ru,{auth:`admin`}),testSettings:T(tu,nu,{kind:`mutation`,auth:`admin`}),publish:T(iu,u(),{kind:`mutation`,auth:`admin`}),subscribe:T(au,ou,{kind:`mutation`,auth:`admin`}),unsubscribe:T(su,h(),{kind:`mutation`,auth:`admin`}),getState:T(cu,u().nullable()),getStatus:T(h(),Gl)}},uu={name:`camera-pipeline-config`,scope:`device`,mode:`singleton`,kind:`wrapper`,defaultActive:!0,deviceTypes:[D.Camera],exposesDeviceSettings:!0,methods:{}},du=m([`webrtc`,`hls`,`mjpeg`,`rtsp`]),fu=m([`mp4`,`gif`]),pu=i({kind:fu,handle:g(),nodeId:g(),mime:g(),bytes:a().int(),width:a().int(),height:a().int()}),mu=i({fromTs:a(),toTs:a(),packets:a().int()}),hu=i({media:p(pu).readonly(),coverage:mu,profile:S,video:m([`copy`,`encode`])}),gu=i({brokerId:g(),url:g(),mutedUrl:g(),enabled:v(),codec:g().optional(),resolution:i({width:a().int().positive(),height:a().int().positive()}).optional()}),_u=i({sessionId:g(),remoteAddr:g(),userAgent:g().nullish(),playing:v(),muted:v(),connectedAt:a(),lastRtpAt:a(),bytesSent:a()}),vu=i({tag:g(),subscribedAt:a(),maxFps:a(),framesDelivered:a(),framesDropped:a()}),yu=i({tag:g(),subscribedAt:a(),chunksDelivered:a()}),bu=m([`alexa`,`homekit`,`webrtc-browser`,`webrtc-mobile`,`webrtc-whep`,`rtsp-listen`,`derived-broker`,`recording`,`pipeline`,`snapshot`,`warmup`,`unknown`]),xu=i({kind:bu,label:g().optional(),media:m([`audio`,`video`,`both`]).optional(),targetCodec:g().optional(),transport:m([`passthrough`,`repacketize`,`transcode`]).optional(),remoteAddr:g().optional(),userAgent:g().optional(),userId:g().optional(),sessionId:g().optional(),extra:n(g(),g()).optional()}).readonly(),Su=i({id:g(),channel:m([`annexb`,`rtp`]),attribution:xu,subscribedAt:a(),packetsDelivered:a()}),Cu=i({rtsp:p(_u).readonly(),decoded:p(vu).readonly(),audio:p(yu).readonly(),encoded:p(Su).readonly(),pipeClients:a(),encodedSubscribers:a()}),wu=m([`reconnecting`,`sleeping`,`offline`,`disabled`,`waking`]),Tu=m([`h264`,`h265`,`copy`]),Eu=m([`aac`,`opus`,`pcmu`,`copy`,`none`]),Du=i({deviceId:a().int().nonnegative(),video:Tu,audio:Eu.optional(),profile:S.optional(),targetResolution:i({width:a().int().positive(),height:a().int().positive()}).optional(),outputArgs:p(g()).optional(),audioEgress:v().optional(),hostname:g().optional(),tag:g().optional()}),Ou=i({url:g(),videoCodec:m([`H264`,`H265`]),audioCodec:g(),resolution:i({width:a().int().positive(),height:a().int().positive()}),transcoded:v(),encoder:g(),pipelineKey:g()}),ku=Kn.omit({inputArgs:!0,outputArgs:!0}),Au=m([`tight`,`relaxed`]),ju=i({deviceId:a().int().nonnegative(),source:b(`kind`,[i({kind:y(`profile`),profile:S}),i({kind:y(`cam-stream`),camStreamId:g().min(1)})]),encode:ku,rateControl:Au.optional(),bitstreamFilter:m([`dump_extra`,`h264_mp4toannexb`,`hevc_mp4toannexb`]).optional(),publishLocally:v().optional(),pixelFormat:m([`yuv420p`,`nv12`]).optional(),decodeHwAccel:m([`auto`,`none`,`videotoolbox`,`vaapi`,`qsv`,`cuda`]).optional(),hostname:g().optional(),tag:g().optional()}),Mu=i({url:g(),pipelineKey:g(),videoCodec:m([`H264`,`H265`]),resolution:i({width:a().int().positive(),height:a().int().positive()}),transcoded:v(),encoder:g(),decodeHwAccel:g().nullable(),camStreamId:g().nullable()}),Nu={name:`stream-broker`,scope:`system`,mode:`singleton`,exposesDeviceSettings:!0,methods:{publishCameraStream:T(i({deviceId:a().int().nonnegative(),camStreamId:g().min(1),kind:Ue,url:g().optional(),codec:g().optional(),resolution:C.optional(),fps:a().positive().optional(),label:g().optional(),deviceFeatures:p(g()).optional(),autoEligible:v().optional(),profileHint:S.optional(),metadata:n(g(),u()).optional(),sourceCamStreamId:g().min(1).optional(),encodeProfile:Kn.optional()}),i({success:y(!0)}),{kind:`mutation`,auth:`admin`}),retractCameraStream:T(i({deviceId:a().int().nonnegative(),camStreamId:g().min(1)}),i({success:y(!0)}),{kind:`mutation`,auth:`admin`}),assignProfile:T(i({deviceId:a().int().nonnegative(),profile:S,camStreamId:g().min(1)}),i({success:y(!0)}),{kind:`mutation`,auth:`admin`}),unassignProfile:T(i({deviceId:a().int().nonnegative(),profile:S}),i({success:y(!0)}),{kind:`mutation`,auth:`admin`}),forgetDeviceHardware:T(i({deviceId:a().int().nonnegative()}),i({derivedStreamsDeleted:p(g()).readonly(),assignmentsPurged:v(),probeSnapshotsDropped:a().int().nonnegative(),rtspTokenRowsDeleted:a().int().nonnegative()}),{kind:`mutation`,auth:`admin`}),renderPreBufferClip:T(i({deviceId:a(),profile:S.optional(),aroundMs:a(),preRollSec:a().min(0).max(20).default(3),postRollSec:a().min(0).max(20).default(5),format:m([`gif`,`mp4`]).default(`gif`),maxWidth:a().int().min(120).max(1920).default(480),fps:a().int().min(1).max(15).default(5),speed:a().min(1).max(8).default(2)}),i({base64:g(),mime:g(),bytes:a().int(),profile:S,durationMs:a()}),{kind:`mutation`,auth:`admin`}),produceEventMedia:T(i({deviceId:a(),profile:S.optional(),aroundMs:a(),preSeconds:a().min(0).max(20).default(4),postSeconds:a().min(0).max(20).default(6),kinds:p(fu).min(1).default([`mp4`]),gifMaxWidth:a().int().min(120).max(1280).default(640),gifFps:a().int().min(1).max(15).default(12),gifSpeed:a().min(1).max(8).default(4),speed:a().min(1).max(8).default(4)}),hu,{kind:`mutation`,auth:`admin`}),fetchEventMedia:T(i({handle:g()}),i({base64:g(),mime:g(),bytes:a().int()}).nullable(),{kind:`mutation`,auth:`admin`}),listAllCameraStreams:T(h(),p(We).readonly()),listAllProfileSlots:T(h(),p(Ke).readonly()),getBrokerStats:T(i({brokerId:g()}),ct),probeStream:T(i({brokerId:g()}),i({probed:v(),summary:g()}),{kind:`mutation`,auth:`admin`}),listClients:T(i({brokerId:g()}),Cu),killClient:T(i({brokerId:g(),channel:m([`rtsp`,`decoded`,`audio`]),handle:g()}),i({killed:v()}),{kind:`mutation`,auth:`admin`}),restartProfile:T(i({deviceId:a().int().nonnegative(),profile:S}),i({success:v()}),{kind:`mutation`,auth:`admin`}),getStreamUrl:T(i({streamId:g(),format:du}),i({url:g()})),getStreamWithCodec:T(Du,Ou,{kind:`mutation`,auth:`admin`}),releaseStreamWithCodec:T(i({pipelineKey:g()}),i({released:v(),refcount:a().int().nonnegative()}),{kind:`mutation`,auth:`admin`}),acquireEgressTranscode:T(ju,Mu,{kind:`mutation`,auth:`admin`}),releaseEgressTranscode:T(i({pipelineKey:g()}),i({released:v(),refcount:a().int().nonnegative()}),{kind:`mutation`,auth:`admin`}),subscribeAudioChunks:T(at,ot,{kind:`mutation`}),pullAudioChunks:T(i({subscriptionId:g(),maxCount:a().int().positive().default(8)}),p(it).readonly()),unsubscribeAudioChunks:T(i({subscriptionId:g()}),i({released:v()}),{kind:`mutation`}),subscribeFrames:T(nt,rt,{kind:`mutation`}),pullFrameHandles:T(i({subscriptionId:g(),maxCount:a().int().positive().default(4)}),p(w).readonly()),unsubscribeFrames:T(i({subscriptionId:g()}),i({released:v()}),{kind:`mutation`}),setPreBufferDuration:T(i({brokerId:g(),seconds:a().min(0).max(30)}),h(),{kind:`mutation`,auth:`admin`}),getPreBufferInfo:T(i({brokerId:g()}),i({configuredSec:a(),bufferedMs:a(),packetCount:a()})),getRtspPort:T(h(),a()),getAllRtspEntries:T(i({hostname:g().optional()}),p(gu).readonly()),getRtspEntry:T(i({brokerId:g(),hostname:g().optional()}),gu.nullable()),regenerateRtspToken:T(i({brokerId:g()}),g().nullable(),{kind:`mutation`,auth:`admin`}),setRtspEnabled:T(i({brokerId:g(),enabled:v()}),h(),{kind:`mutation`,auth:`admin`}),isRtspEnabled:T(i({brokerId:g()}),v()),getDeviceAudioMute:T(i({deviceId:a().int()}),i({muted:v(),appliedBrokers:a().int().nonnegative()})),setDeviceAudioMute:T(i({deviceId:a().int(),muted:v()}),i({muted:v(),appliedBrokers:a().int().nonnegative()}),{kind:`mutation`,auth:`admin`})},events:{onCamStreamDemand:E(i({deviceId:a().int().nonnegative(),camStreamId:g(),profile:S})),onCamStreamIdle:E(i({deviceId:a().int().nonnegative(),camStreamId:g()})),onRequestStreamSourceRefresh:E(i({deviceId:a().int().nonnegative(),camStreamId:g(),brokerId:g()}))}},Pu=m([`h264`,`h265`,`hevc`,`av1`,`mjpeg`,`vp8`,`vp9`]),Fu=i({acceptCodecs:p(Pu).readonly().optional(),minHeight:a().int().positive().optional(),minWidth:a().int().positive().optional(),excludeDerived:v().optional(),requireSiblingCodec:p(Pu).readonly().optional()}).readonly(),Iu=i({preferredProviders:p(g()).readonly().optional(),resolutionPreference:m([`highest`,`lowest`]).optional()}).readonly(),Lu=i({camStreamId:g(),codec:g().optional(),resolution:C.optional(),reason:g()}),Ru={name:`camera-streams`,scope:`device`,mode:`singleton`,kind:`wrapper`,defaultActive:!0,deviceTypes:[D.Camera],methods:{getCameraStreams:T(i({deviceId:a().int().nonnegative()}),p(We).readonly()),getBrokerStreams:T(i({deviceId:a().int().nonnegative()}),p(Ke).readonly()),getRtspEntries:T(i({deviceId:a().int().nonnegative(),hostname:g().optional()}),p(gu).readonly()),getProfileRtspEntries:T(i({deviceId:a().int().nonnegative(),hostname:g().optional()}),p(lt).readonly()),pickStream:T(i({deviceId:a().int().nonnegative(),requirements:Fu,preferences:Iu.optional()}),Lu.nullable())},events:{onCamStreamsChanged:E(i({deviceId:a().int().nonnegative(),camStreams:p(We).readonly()})),onProfileSlotsChanged:E(i({deviceId:a().int().nonnegative(),profileSlots:p(Ke).readonly()}))},runtimeState:i({online:v(),slotStatuses:i({high:Ge.optional(),mid:Ge.optional(),low:Ge.optional()}),slotErrors:i({high:g().optional(),mid:g().optional(),low:g().optional()}),lastChangedAt:a()}),durability:`session`};function zu(e){let t=e._def;return e.constructor?.name===`ZodVoid`||t?.type===`void`||t?.typeName===`ZodVoid`}function Bu(e){let t=e._def;return e.constructor?.name===`ZodObject`||t?.type===`object`||t?.typeName===`ZodObject`}function Vu(e){let t=e;for(let e=0;e<8&&t!=null;e+=1){let e=t._def,n=t.constructor?.name;if(n===`ZodArray`||e?.type===`array`)return!0;if(!(n===`ZodReadonly`||e?.type===`readonly`||n===`ZodOptional`||e?.type===`optional`||n===`ZodNullable`||e?.type===`nullable`||n===`ZodDefault`||e?.type==="default")||e?.innerType==null)return!1;t=e.innerType}return!1}function Hu(e,t){if(e===void 0||e.mode!==`collection`)return!1;let n=Ot(e)[t];return n!==void 0&&n.kind!==`subscription`&&Vu(n.output)}function Uu(e){let t=e.loose;return typeof t==`function`?t.call(e):e}function Wu(e){if(!(typeof e!=`object`||!e)){for(let t of Object.values(e))if(typeof t==`object`&&t){let e=t.addonId;if(typeof e==`string`)return e}}}function Gu(e){if(e===null||typeof e!=`object`&&typeof e!=`function`)return!1;let t=e.shape??Ku(e._def?.shape);return typeof t==`object`&&!!t&&Object.prototype.hasOwnProperty.call(t,`addonId`)}function Ku(e){return typeof e==`function`?e():e}function qu(e,t){return t.auth===void 0?e.internal===!0?`admin`:`protected`:t.auth}function Ju(e){return e===`public`?`public`:e===`admin`||e===`superAdmin`?`admin`:`protected`}function Yu(e){return e.replace(/-([a-z])/g,(e,t)=>t.toUpperCase())}var Xu=`core-block-`,Zu=`core-blocks`;function Qu(e){return`${Xu}${e}`}function $u(e){if(!e.startsWith(`core-block-`))return null;let t=e.slice(11);return t.length>0?t:null}var ed=c([y(`hub`),g().min(1)]),td=m([`stopped`,`starting`,`running`,`failed`]),nd=i({name:g().min(1).max(120),code:g().max(2e5),enabled:v(),placement:ed,integrationId:g().optional()}),H=nd.extend({id:g(),createdAt:a(),updatedAt:a(),createdBy:g(),status:td,lastError:g().optional(),lastChangedAt:a()}),rd=i({ok:v(),error:g().optional(),line:a().optional(),column:a().optional()}),id={name:`core-blocks`,scope:`system`,mode:`singleton`,methods:{list:T(i({}),i({blocks:p(H)}),{auth:`admin`}),get:T(i({blockId:g()}),i({block:H.nullable()}),{auth:`admin`}),create:T(i({block:nd}),i({block:H}),{kind:`mutation`,auth:`admin`,caller:`required`}),update:T(i({blockId:g(),block:nd.partial()}),i({block:H}),{kind:`mutation`,auth:`admin`,caller:`required`}),delete:T(i({blockId:g()}),i({success:y(!0)}),{kind:`mutation`,auth:`admin`}),setEnabled:T(i({blockId:g(),enabled:v()}),i({block:H}),{kind:`mutation`,auth:`admin`}),restart:T(i({blockId:g()}),i({block:H}),{kind:`mutation`,auth:`admin`}),compile:T(i({code:g()}),rd,{kind:`mutation`,auth:`admin`}),getTypeDefs:T(i({}),i({libs:p(i({filePath:g(),content:g()}))}),{auth:`admin`})}};function ad(e){return e}function od(e,t,n){return{input:e,output:t,kind:n?.kind??`query`,auth:n?.auth??`protected`,scope:n?.scope??{kind:`system`},...n?.caller?{caller:`required`}:{}}}function sd(e,t,n){return{input:e,output:t,kind:n?.kind??`query`,auth:n?.auth??`protected`,scope:{kind:`device`,...n?.deviceTypes?{deviceTypes:n.deviceTypes}:{}}}}var cd=i({stepId:g(),entry:fs}),ld={name:`custom-model-registry`,scope:`system`,mode:`collection`,internal:!0,methods:{listModels:T(h(),p(cd).readonly(),{auth:`admin`})}},U=i({where:n(g(),u()).optional(),whereIn:n(g(),p(u())).optional(),whereBetween:n(g(),s([u(),u()])).optional(),whereNot:n(g(),u()).optional(),orderBy:i({field:g(),direction:m([`asc`,`desc`])}).optional(),limit:a().optional(),offset:a().optional()}),ud=i({where:n(g(),u()).optional(),whereIn:n(g(),p(u())).optional(),whereBetween:n(g(),s([u(),u()])).optional(),whereNot:n(g(),u()).optional()}),dd=i({as:g().min(1),field:g().min(1),op:m([`sum`,`min`,`max`])}),fd=i({count:a().int(),values:n(g(),a().nullable())}),pd=i({id:g(),data:n(g(),u())}),md=i({id:g().optional(),data:n(g(),u())}),hd=i({name:g(),type:m([`TEXT`,`INTEGER`,`REAL`,`JSON`,`BOOLEAN`]),primaryKey:v().optional(),notNull:v().optional(),unique:v().optional(),defaultValue:c([g(),a(),v()]).optional()}),gd=i({name:g(),columns:p(g()).readonly(),unique:v().optional()}),_d={name:`settings-store`,scope:`system`,mode:`singleton`,methods:{get:T(i({namespace:g().optional(),collection:g(),key:g()}),u()),set:T(i({namespace:g().optional(),collection:g(),key:g(),value:u()}),h(),{kind:`mutation`}),query:T(i({namespace:g().optional(),collection:g(),filter:U.optional(),columns:p(g()).readonly().optional()}),p(pd).readonly()),insert:T(i({namespace:g().optional(),collection:g(),record:pd}),h(),{kind:`mutation`}),insertMany:T(i({namespace:g().optional(),collection:g(),records:p(md).readonly()}),i({inserted:a().int()}),{kind:`mutation`}),update:T(i({namespace:g().optional(),collection:g(),id:g(),data:n(g(),u())}),h(),{kind:`mutation`}),delete:T(i({namespace:g().optional(),collection:g(),key:g()}),h(),{kind:`mutation`}),deleteWhere:T(i({namespace:g().optional(),collection:g(),filter:ud}),i({deleted:a().int()}),{kind:`mutation`}),updateWhere:T(i({namespace:g().optional(),collection:g(),filter:ud,data:n(g(),u())}),i({updated:a().int()}),{kind:`mutation`}),count:T(i({namespace:g().optional(),collection:g(),filter:U.optional()}),a()),aggregate:T(i({namespace:g().optional(),collection:g(),fields:p(dd).readonly(),filter:U.optional()}),fd),histogram:T(i({namespace:g().optional(),collection:g(),field:g(),bucketSize:a().int().positive(),origin:a().int(),filter:U.optional()}),p(i({bucket:a().int(),count:a().int()})).readonly()),isEmpty:T(i({namespace:g().optional(),collection:g()}),v()),declareCollection:T(i({namespace:g().optional(),collection:g(),columns:p(hd).readonly(),indexes:p(gd).readonly().optional()}),h(),{kind:`mutation`})}},vd=i({engineId:g(),kind:m([`relational`,`vector`]),displayName:g()}),yd={name:`data-store-provider`,scope:`system`,mode:`collection`,internal:!0,methods:{getEngineInfo:T(h(),vd,{auth:`admin`}),get:T(i({namespace:g().optional(),collection:g(),key:g()}),u(),{auth:`admin`}),set:T(i({namespace:g().optional(),collection:g(),key:g(),value:u()}),h(),{kind:`mutation`,auth:`admin`}),query:T(i({namespace:g().optional(),collection:g(),filter:U.optional(),columns:p(g()).readonly().optional()}),p(pd).readonly(),{auth:`admin`}),insert:T(i({namespace:g().optional(),collection:g(),record:pd}),h(),{kind:`mutation`,auth:`admin`}),insertMany:T(i({namespace:g().optional(),collection:g(),records:p(md).readonly()}),i({inserted:a().int()}),{kind:`mutation`,auth:`admin`}),update:T(i({namespace:g().optional(),collection:g(),id:g(),data:n(g(),u())}),h(),{kind:`mutation`,auth:`admin`}),delete:T(i({namespace:g().optional(),collection:g(),key:g()}),h(),{kind:`mutation`,auth:`admin`}),deleteWhere:T(i({namespace:g().optional(),collection:g(),filter:ud}),i({deleted:a().int()}),{kind:`mutation`,auth:`admin`}),updateWhere:T(i({namespace:g().optional(),collection:g(),filter:ud,data:n(g(),u())}),i({updated:a().int()}),{kind:`mutation`,auth:`admin`}),count:T(i({namespace:g().optional(),collection:g(),filter:U.optional()}),a(),{auth:`admin`}),aggregate:T(i({namespace:g().optional(),collection:g(),fields:p(dd).readonly(),filter:U.optional()}),fd,{auth:`admin`}),histogram:T(i({namespace:g().optional(),collection:g(),field:g(),bucketSize:a().int().positive(),origin:a().int(),filter:U.optional()}),p(i({bucket:a().int(),count:a().int()})).readonly(),{auth:`admin`}),isEmpty:T(i({namespace:g().optional(),collection:g()}),v(),{auth:`admin`}),declareCollection:T(i({namespace:g().optional(),collection:g(),columns:p(hd).readonly(),indexes:p(gd).readonly().optional()}),h(),{kind:`mutation`,auth:`admin`})}},bd=[{value:`auto`,label:`Auto (defer to probed best)`},{value:`none`,label:`Off (software)`},{value:`videotoolbox`,label:`VideoToolbox (macOS)`},{value:`cuda`,label:`CUDA (NVIDIA)`},{value:`nvdec`,label:`NVDEC (NVIDIA legacy)`},{value:`vaapi`,label:`VAAPI (Linux Intel/AMD)`},{value:`qsv`,label:`QuickSync (Intel)`},{value:`d3d11va`,label:`D3D11VA (Windows)`},{value:`dxva2`,label:`DXVA2 (Windows legacy)`},{value:`amf`,label:`AMF (AMD)`},{value:`vdpau`,label:`VDPAU (Linux NVIDIA legacy)`},{value:`drm`,label:`DRM (Linux generic)`}],xd={hwaccel:`auto`,probedBestHwaccel:``},Sd=i({sessionId:g(),slotCount:a().int(),slotByteLength:a().int(),segmentBytes:a().int(),budgetMb:a().int(),framesWritten:a().int(),getFrameHits:a().int(),getFrameMisses:a().int()}),Cd={name:`decoder`,scope:`system`,mode:`singleton`,preferredProvider:`decoder-nodeav`,methods:{supportsCodec:T(i({codec:g()}),v()),getInfo:T(h(),i({id:g(),name:g(),isPullMode:v().optional(),priority:a().optional(),hwaccel:g().optional(),probedBestHwaccel:g().optional()})),createSession:T(uo,i({sessionId:g(),nodeId:g()})),destroySession:T(i({sessionId:g()}),h()),pushPacket:T(i({sessionId:g(),packet:$e}),h()),openStream:T(i({sessionId:g(),url:g()}),h()),pullFrames:T(i({sessionId:g(),maxCount:a().default(1),waitMs:a().optional()}),p(et)),pullHandles:T(i({sessionId:g(),maxCount:a().default(1),waitMs:a().optional()}),p(w)),getFrame:T(i({handle:w}),et.nullable()),getShmStats:T(i({sessionId:g()}),Sd.nullable()),updateConfig:T(i({sessionId:g(),config:uo.partial()}),h()),getStats:T(i({sessionId:g()}),lo),listActiveSessions:T(h(),p(i({sessionId:g(),codec:g(),outputFormat:g(),createdAtMs:a()})).readonly()),reprobeHwaccel:T(h(),i({backend:g()}),{kind:`mutation`,auth:`admin`})}},wd={name:`detection-pipeline`,scope:`device`,mode:`singleton`,kind:`wrapper`,defaultActive:!0,deviceTypes:[D.Camera],exposesDeviceSettings:!0,methods:{}},Td=i({id:g(),system:g(),uniqueId:g().optional(),raw:n(g(),u()).optional()});function Ed(e){return{id:e.stableId,system:e.addonId}}function Dd(e,t){let n={...e};for(let[r,i]of Object.entries(t))if(i!==void 0){if(r===`raw`&&typeof i==`object`&&i){n.raw={...e.raw,...i};continue}n[r]=i}return n}function Od(e){if(e==null)return;let t=e.trim();if(t===``)return;let n=t.toLowerCase();return n===`°c`||n===`c`||n===`celsius`?`°C`:n===`°f`||n===`f`||n===`fahrenheit`?`°F`:n===`k`||n===`kelvin`?`K`:n===`%`||n===`percent`||n===`percentage`?`%`:n===`lx`||n===`lux`?`lx`:n===`hpa`||n===`hectopascal`?`hPa`:n===`kpa`?`kPa`:n===`pa`?`Pa`:n===`mbar`||n===`millibar`?`mbar`:n===`w`||n===`watt`?`W`:n===`kw`||n===`kilowatt`?`kW`:n===`wh`||n===`watt-hour`?`Wh`:n===`kwh`||n===`kilowatt-hour`?`kWh`:n===`v`||n===`volt`?`V`:n===`a`||n===`amp`||n===`ampere`?`A`:n===`ma`||n===`milliampere`?`mA`:n===`va`?`VA`:n===`ppm`?`ppm`:n===`ppb`?`ppb`:n===`µg/m³`||n===`ug/m3`||n===`µg/m3`?`µg/m³`:n===`km/h`||n===`kph`?`km/h`:n===`mph`?`mph`:n===`m/s`?`m/s`:n===`m`?`m`:n===`km`?`km`:n===`kg`?`kg`:n===`g`?`g`:t}var kd=`sourceInfo`;function Ad(e){if(!e)return null;let t=e[kd];if(!t)return null;let n=Td.safeParse(t);return n.success?n.data:null}var jd=m([`online`,`sleeping`,`offline`,`unknown`]),Md=r(()=>i({childNativeId:g(),name:g(),type:m(D),status:jd,metadata:i({model:g().optional(),serialNumber:g().optional(),uid:g().optional(),rtspChannel:a().int().nonnegative().optional(),isBattery:v().optional(),isDoorbell:v().optional(),isMultifocal:v().optional(),externalLocation:g().optional(),manufacturer:g().optional(),integration:g().optional()}).default({}),alreadyAdopted:v(),adoptedDeviceId:a().int().nonnegative().nullable(),capabilities:p(g()).readonly().optional(),features:p(g()).readonly().optional(),sourceInfo:Td.optional(),children:p(Md).readonly().optional()})),Nd=i({discovered:p(Md),lastDiscoveryAt:a().int().nonnegative().nullable(),lastError:g().nullable()}),Pd={name:`device-discovery`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[D.Hub],status:{schema:Nd,kind:`poll`},runtimeState:Nd.extend({lastFetchedAt:a().int().nonnegative()}),durability:`session`,methods:{listDiscovered:T(i({deviceId:a().int().nonnegative()}),p(Md).readonly()),refreshDiscovery:T(i({deviceId:a().int().nonnegative()}),p(Md).readonly(),{kind:`mutation`,auth:`admin`}),adoptDevice:T(i({deviceId:a().int().nonnegative(),childNativeId:g(),name:g().optional()}),i({deviceId:a().int().nonnegative(),stableId:g()}),{kind:`mutation`,auth:`admin`}),releaseDevice:T(i({deviceId:a().int().nonnegative(),childDeviceId:a().int().nonnegative()}),h(),{kind:`mutation`,auth:`admin`})}},Fd=i({id:g(),label:g(),isDefault:v().optional()}),Id=i({search:g().optional(),area:g().optional(),manufacturer:g().optional(),adoptedOnly:v().optional(),unadoptedOnly:v().optional()}),Ld=i({integrationId:g(),page:a().int().positive().default(1),pageSize:a().int().positive().max(2e4).default(50),filter:g().optional(),filterText:Id.optional()}),Rd=i({candidates:p(Md).readonly(),totalCount:a().int().nonnegative(),page:a().int().positive(),pageSize:a().int().positive()}),zd=i({integrationId:g(),childNativeId:g()}),Bd=i({lastDiscoveryAt:a().int().nonnegative().nullable(),candidateCount:a().int().nonnegative(),adoptedCount:a().int().nonnegative(),lastError:g().nullable()}),Vd=i({name:g().min(1).optional(),hiddenChildIds:p(g()).optional()}),Hd=i({integrationId:g(),childNativeIds:p(g()).min(1),filter:g().optional(),importLocations:v().optional(),perCandidate:n(g(),Vd).optional()}),Ud=i({adopted:p(i({childNativeId:g(),parentDeviceId:a().int().nonnegative(),accessoryDeviceIds:p(a().int().nonnegative()).readonly()})).readonly()}),Wd=i({integrationId:g(),camDeviceId:a().int().nonnegative()}),Gd=i({camDeviceId:a().int().nonnegative(),resetToSource:v().optional()}),Kd=i({changed:v(),rebuiltChildren:a().int().nonnegative(),removedChildren:a().int().nonnegative().optional()}),qd={name:`device-adoption`,scope:`system`,mode:`singleton`,status:{schema:Bd,kind:`poll`},methods:{listCandidateFilters:T(i({integrationId:g()}),i({filters:p(Fd)}),{auth:`admin`}),listCandidates:T(Ld,Rd,{auth:`admin`}),getCandidate:T(zd,Md.nullable(),{auth:`admin`}),refresh:T(i({integrationId:g()}),Bd,{kind:`mutation`,auth:`admin`}),adopt:T(Hd,Ud,{kind:`mutation`,auth:`admin`}),release:T(Wd,h(),{kind:`mutation`,auth:`admin`}),resync:T(Gd,Kd,{kind:`mutation`,auth:`admin`})}},Jd=m([`unlinked`,`linked`,`error`]),Yd=i({label:g(),value:g(),secret:v().optional()}),Xd=i({qr:g().optional(),fields:p(Yd).readonly().optional(),note:g().optional()}),Zd=i({linkState:Jd,exposedDeviceCount:a(),error:g().optional(),setup:Xd.optional()}),Qd=g(),$d=i({deviceId:g(),exposedAs:g().optional(),capabilities:p(g()).optional()}),ef=i({deviceId:g(),capabilities:p(g()).optional()}),tf=i({deviceId:g()}),nf={name:`device-export`,scope:`system`,mode:`collection`,providerKind:`device-export`,status:{schema:Zd,kind:`poll`},exposesDeviceSettings:!0,methods:{getStatus:T(h(),Zd),listSupportedDeviceKinds:T(h(),p(Qd)),listExposedDevices:T(h(),p($d)),exposeDevice:T(ef,h(),{kind:`mutation`}),unexposeDevice:T(tf,h(),{kind:`mutation`})}},rf=i({connected:v(),deviceCount:a(),error:g().optional()}),af=i({externalId:g(),name:g(),type:g(),metadata:n(g(),u()).optional()}),of=i({stableId:g(),type:m(D),suggestedName:g(),prefilledConfig:n(g(),u()),sourceInfo:Td.optional(),alreadyOnboarded:v().optional(),onboardedDeviceId:a().optional(),onboardedName:g().optional()}),sf=i({id:a(),stableId:g(),addonId:g(),type:g(),name:g(),parentDeviceId:a().nullable(),online:v(),features:p(g()),config:n(g(),u()),sourceInfo:Td.optional()}),cf=i({status:m([`ok`,`error`]),labels:p(g()).optional(),error:g().optional()}),lf=u(),uf={name:`device-provider`,scope:`system`,mode:`collection`,methods:{start:T(h(),h(),{kind:`mutation`}),stop:T(h(),h(),{kind:`mutation`}),getStatus:T(h(),rf),getDevices:T(h(),p(i({id:g(),name:g(),type:g()}))),reloadDevice:T(i({stableId:g()}),i({deviceId:a()}),{kind:`mutation`,timeoutMs:3*6e4}),supportsDiscovery:T(i({}),v()),discoverDevices:T(i({params:n(g(),u()).optional()}),p(of),{kind:`mutation`,auth:`admin`}),getDiscoveryParamsSchema:T(i({}),lf),getManualCreationType:T(i({}),i({deviceType:m(D).nullable()})),adoptDiscoveredDevice:T(i({candidate:of}),sf,{kind:`mutation`,auth:`admin`}),supportsManualCreation:T(i({}),v()),getChildCreationSchema:T(i({type:m(D)}),lf),createDevice:T(i({type:m(D),config:n(g(),u())}),sf,{kind:`mutation`,auth:`admin`}),testCreationField:T(i({type:m(D),key:g(),value:u(),formValues:n(g(),u()).optional()}),cf,{kind:`mutation`,auth:`admin`})}},df=i({childKey:g(),section:g(),order:a().optional(),collapsed:v().optional()}),ff=i({unit:g().min(1).optional(),precision:a().int().min(0).max(10).optional()}),pf=i({icon:g().min(1).optional(),label:g().min(1).optional(),unit:g().min(1).optional(),precision:a().int().min(0).max(10).optional(),hidden:v().optional(),perCap:n(g(),ff).optional()}),mf=i({unit:g().min(1).optional(),precision:a().int().min(0).max(10).optional(),icon:g().min(1).optional()}),hf=i({id:a(),stableId:g(),addonId:g(),type:m(D),name:g(),location:g().nullable(),disabled:v(),parentDeviceId:a().nullable(),role:g().nullable().optional(),online:v(),probed:v().optional(),features:p(g()),isCamera:v(),config:n(g(),u()),metadata:n(g(),u()).nullable().optional(),sourceInfo:Td.optional(),integrationId:g().optional(),linkDeviceId:a().nullable().optional(),primaryChildEntityId:g().nullable().optional(),childLayout:p(df).readonly().optional(),display:pf.optional()}),gf=i({key:g(),value:u(),description:g().optional()}),_f=m([`manual`]),vf=i({deviceId:a(),name:g(),location:g().nullable(),features:p(g()),producesTrackedEvents:v().optional()}),yf=i({deviceId:a(),mode:_f,devices:p(vf)}),bf=i({deviceId:a(),entries:p(i({capName:g(),kind:m([`native`,`wrapped`]),providerAddonId:g(),providerNodeId:g(),nativeAddonId:g()}))}),xf=i({id:a(),stableId:g(),type:g(),name:g(),location:g().nullable(),disabled:v(),parentDeviceId:a().nullable(),role:g().nullable().optional()}),Sf=i({id:a(),stableId:g(),addonId:g(),type:g(),name:g(),userNamed:v().optional(),location:g().nullable(),disabled:v(),parentDeviceId:a().nullable(),metadata:n(g(),u()).nullable().optional(),sourceInfo:Td.optional(),integrationId:g().optional(),linkDeviceId:a().nullable().optional(),primaryChildEntityId:g().nullable().optional(),childLayout:p(df).readonly().optional(),role:g().nullable().optional(),display:pf.optional()}),Cf=u().nullable(),wf=i({streamId:g(),width:a().optional(),height:a().optional(),codec:g().optional(),fps:a().optional(),bitrateKbps:a().optional()}),Tf=i({addonId:g(),stableId:g(),id:a(),type:g(),name:g(),location:g().nullable().optional(),disabled:v().optional(),parentDeviceId:a().nullable(),role:g().nullable().optional(),features:p(g()).optional(),config:n(g(),u())}),Ef=i({deviceId:a()}),Df=i({deviceId:a(),data:n(g(),u())}),Of=m([`off`,`on`,`not-offered`,`unreachable`]),kf=i({deviceId:a(),switchId:Mr,outcome:Of,detail:g().optional()}),Af=i({sourceId:a(),targetId:a(),switches:p(kf).readonly(),sourceStillLive:p(Mr).readonly(),swapped:v()}),jf={name:`device-manager`,scope:`system`,mode:`singleton`,exposesDeviceSettings:!0,methods:{allocateDeviceId:T(i({addonId:g(),stableId:g()}),i({id:a()}),{kind:`mutation`}),migrateDevice:T(i({sourceId:a(),targetId:a()}),Af,{kind:`mutation`,auth:`admin`,timeoutMs:12*6e4}),registerDevice:T(Tf,h(),{kind:`mutation`}),removeDevice:T(Ef,h(),{kind:`mutation`}),persistConfig:T(Df,h(),{kind:`mutation`}),loadConfig:T(i({deviceId:a()}),n(g(),u())),loadRuntimeState:T(i({deviceId:a()}),n(g(),u())),loadMeta:T(i({deviceId:a()}),Sf.nullable()),setName:T(i({deviceId:a(),name:g()}),h(),{kind:`mutation`,auth:`admin`}),setLocation:T(i({deviceId:a(),location:g().nullable()}),h(),{kind:`mutation`,auth:`admin`}),setType:T(i({deviceId:a(),type:m(D)}),h(),{kind:`mutation`,auth:`admin`}),setIntegrationId:T(i({deviceId:a(),integrationId:g()}),h(),{kind:`mutation`,auth:`admin`}),setLinkDeviceId:T(i({deviceId:a(),linkDeviceId:a().nullable()}),h(),{kind:`mutation`,auth:`admin`}),setPrimaryChildEntityId:T(i({deviceId:a(),primaryChildEntityId:g().nullable()}),h(),{kind:`mutation`,auth:`admin`}),setChildLayout:T(i({deviceId:a(),childLayout:p(df).readonly()}),h(),{kind:`mutation`,auth:`admin`}),setDisplay:T(i({deviceId:a(),display:pf.nullable()}),h(),{kind:`mutation`,auth:`admin`}),getRoleDisplayDefaults:T(i({}),i({defaults:n(g(),mf)}),{kind:`query`}),setRoleDisplayDefaults:T(i({defaults:n(g(),mf)}),h(),{kind:`mutation`,auth:`admin`}),getWireableFields:T(i({deviceId:a(),includeSynthesizable:v().optional()}),i({caps:p(i({cap:g(),fields:p(i({path:g(),kind:m([`string`,`number`,`boolean`,`enum`]),enumValues:p(g()).optional(),item:v().optional()})).readonly(),itemArray:i({path:g(),keyField:g()}).optional()})).readonly()}),{kind:`query`}),setRole:T(i({deviceId:a(),role:g().nullable()}),h(),{kind:`mutation`,auth:`admin`}),applyInitialMeta:T(i({deviceId:a(),name:g().optional(),location:g().nullable().optional(),type:m(D).optional(),integrationId:g().optional(),linkDeviceId:a().nullable().optional(),role:g().nullable().optional()}),h(),{kind:`mutation`,auth:`admin`}),setMetadata:T(i({deviceId:a(),patch:n(g(),u())}),h(),{kind:`mutation`,auth:`admin`}),listLocations:T(h(),p(g())),addLocation:T(i({name:g()}),h(),{kind:`mutation`,auth:`admin`}),removeLocation:T(i({name:g(),cascade:v().optional()}),h(),{kind:`mutation`,auth:`admin`}),renameLocation:T(i({from:g(),to:g()}),i({moved:a()}),{kind:`mutation`,auth:`admin`}),setDisabled:T(i({deviceId:a(),disabled:v()}),h(),{kind:`mutation`,auth:`admin`}),listPersistedByAddon:T(i({addonId:g()}),p(xf)),listAll:T(i({addonId:g().optional(),projection:m([`full`,`slim`]).optional(),isCamera:v().optional(),deviceIds:p(a()).optional()}),p(hf)),getDevice:T(i({deviceId:a()}),hf.nullable()),getChildren:T(i({parentDeviceId:a()}),p(hf)),getChildrenBatch:T(i({parentDeviceIds:p(a()).max(256)}),n(g(),p(hf))),getLinkedDevices:T(i({deviceId:a()}),i({mode:_f,devices:p(vf)})),getLinkedDevicesBatch:T(i({deviceIds:p(a())}),p(yf)),getStreamSources:T(i({deviceId:a()}),p(Ze)),getConfigSchema:T(i({deviceId:a()}),p(gf)),getSettingsSchema:T(i({deviceId:a()}),Cf),updateConfig:T(i({deviceId:a(),values:n(g(),u())}),i({success:y(!0)}),{kind:`mutation`,auth:`admin`}),enable:T(i({deviceId:a()}),i({success:y(!0)}),{kind:`mutation`,auth:`admin`}),disable:T(i({deviceId:a()}),i({success:y(!0)}),{kind:`mutation`,auth:`admin`}),remove:T(i({deviceId:a()}),i({success:y(!0)}),{kind:`mutation`,auth:`admin`}),removeByIntegration:T(i({integrationId:g()}),i({removed:a()}),{kind:`mutation`,auth:`admin`}),getStreamProfileMap:T(i({deviceId:a()}),n(g(),g().nullable())),setStreamProfileMap:T(i({deviceId:a(),profileMap:n(g(),g().nullable())}),i({success:y(!0)}),{kind:`mutation`,auth:`admin`}),probeStreams:T(i({deviceId:a()}),p(wf),{kind:`mutation`,auth:`admin`}),getBindings:T(i({deviceId:a()}),bf),getBindingsBatch:T(i({deviceIds:p(a())}),p(bf)),getAllBindings:T(i({}),p(bf)),setWrapperActive:T(i({deviceId:a(),capName:g(),wrapperAddonId:g(),active:v()}),h(),{kind:`mutation`,auth:`admin`}),listWrappersForCap:T(i({capName:g()}),p(g())),listBindableCapsForDeviceType:T(i({deviceType:g()}),p(i({capName:g(),wrappers:p(g())}))),getDeviceSettingsAggregate:T(i({deviceId:a()}),B.nullable()),getDeviceLiveInfoAggregate:T(i({deviceId:a()}),B.nullable()),getDeviceAggregate:T(i({deviceId:a()}),i({settings:B.nullable(),live:B.nullable()})),runDeviceAction:T(i({deviceId:a().int().nonnegative(),action:g().min(1),input:u()}),u(),{kind:`mutation`}),updateDeviceField:T(i({deviceId:a(),writerCapName:g(),writerAddonId:g(),key:g(),value:u()}),i({success:y(!0)}),{kind:`mutation`,auth:`admin`}),updateDeviceFieldsBatch:T(i({deviceId:a(),changes:p(i({writerCapName:g(),writerAddonId:g(),key:g(),value:u()}))}),i({success:y(!0),failures:p(i({writerCapName:g(),writerAddonId:g(),error:g()}))}),{kind:`mutation`,auth:`admin`}),discoverDevices:T(i({addonId:g()}),p(of),{kind:`mutation`,auth:`admin`}),adoptDevice:T(i({addonId:g(),candidate:of,integrationId:g().optional()}),sf,{kind:`mutation`,auth:`admin`}),getCreationSchema:T(i({addonId:g(),type:m(D)}),u().nullable()),createDevice:T(i({addonId:g(),type:m(D),config:n(g(),u()),integrationId:g().optional()}),sf,{kind:`mutation`,auth:`admin`}),testCreationField:T(i({addonId:g(),type:m(D),key:g(),value:u(),formValues:n(g(),u()).optional()}),cf,{kind:`mutation`,auth:`admin`}),adoptionListCandidateFilters:T(i({addonId:g(),integrationId:g()}),i({filters:p(Fd)}),{auth:`admin`}),adoptionListCandidates:T(Ld.extend({addonId:g()}),Rd,{auth:`admin`}),adoptionRefresh:T(i({addonId:g(),integrationId:g()}),Bd,{kind:`mutation`,auth:`admin`}),adoptionAdopt:T(Hd.extend({addonId:g()}),Ud,{kind:`mutation`,auth:`admin`}),adoptionRelease:T(Wd.extend({addonId:g()}),h(),{kind:`mutation`,auth:`admin`}),adoptionStartJob:T(Hd.extend({addonId:g()}),i({jobId:g()}),{kind:`mutation`,auth:`admin`}),adoptionListJobs:T(i({addonId:g(),integrationId:g().optional()}),p(Ar).readonly(),{auth:`admin`}),adoptionCancelJob:T(i({jobId:g()}),i({cancelled:v()}),{kind:`mutation`,auth:`admin`}),adoptionResync:T(Gd,Kd,{kind:`mutation`,auth:`admin`}),discoveryProviders:T(i({}),i({providers:p(i({addonId:g(),label:g()})).readonly()}),{auth:`admin`}),discoverAllProviders:T(i({}),i({groups:p(i({addonId:g(),label:g(),candidates:p(of).readonly(),error:g().nullable()})).readonly()}),{kind:`mutation`,auth:`admin`}),discoverProvider:T(i({addonId:g(),params:n(g(),u()).optional()}),i({candidates:p(of).readonly()}),{kind:`mutation`,auth:`admin`}),providerCreationType:T(i({addonId:g()}),i({deviceType:m(D).nullable()}),{auth:`admin`}),providerDiscoveryParamsSchema:T(i({addonId:g()}),u(),{auth:`admin`}),testField:T(i({deviceId:a(),key:g(),value:u()}),cf,{kind:`mutation`,auth:`admin`}),getDeviceStatusAggregate:T(i({deviceId:a(),caps:p(g()).readonly().optional()}),n(g(),u().nullable())),getDeviceStatusAggregateBatch:T(i({deviceIds:p(a()).readonly(),caps:p(g()).readonly().optional()}),n(g(),n(g(),u().nullable())))}},Mf={name:`device-state`,scope:`system`,mode:`singleton`,methods:{getSnapshot:T(i({deviceId:a()}),n(g(),n(g(),u()))),getCapSlice:T(i({deviceId:a(),capName:g()}),n(g(),u()).nullable()),getAllSnapshots:T(i({}),n(g(),n(g(),n(g(),u())))),setCapSlice:T(i({deviceId:a(),capName:g(),slice:n(g(),u())}),h(),{kind:`mutation`})},events:{onChanged:E(i({deviceId:a(),capName:g(),slice:n(g(),u())}))}},Nf=i({embedding:p(a()),inferenceMs:a()}),Pf=i({modelId:g(),embeddingDim:a(),ready:v()}),Ff={name:`embedding-encoder`,scope:`system`,mode:`collection`,internal:!0,methods:{encode:T(i({crop:_(Uint8Array),width:a(),height:a()}),Nf,{auth:`admin`}),encodeText:T(i({text:g()}),Nf,{auth:`admin`}),getInfo:T(h(),Pf,{auth:`admin`})}},If=i({reason:g(),count:a().int().nonnegative()}),Lf=i({family:g(),deviceId:a().int().positive(),variant:g().optional(),sinceMs:a(),atMs:a(),attempts:a().int().nonnegative(),succeeded:a().int().nonnegative(),reasons:p(If).readonly()}),Rf={name:`failure-contribution`,scope:`system`,mode:`collection`,internal:!0,methods:{list:T(h(),p(Lf).readonly())},mount:{kind:`skip`}},zf=i({name:g(),path:g()}),Bf=i({path:g(),entries:p(zf).readonly(),freeBytes:a(),totalBytes:a()}),Vf={name:`filesystem-browse`,scope:`system`,mode:`singleton`,internal:!0,methods:{listAllowedRoots:T(h(),p(g()).readonly(),{auth:`admin`}),browse:T(i({path:g()}),Bf,{auth:`admin`}),createDir:T(i({path:g()}),i({path:g()}),{kind:`mutation`,auth:`admin`})}},Hf=6e5,Uf=60*6e4,Wf=i({inputTokens:a(),outputTokens:a()}),Gf=m([`timeout`,`rate-limited`,`auth`,`refusal`,`bad-request`,`unavailable`,`no-profile`,`budget-exceeded`,`adapter-error`]),Kf=i({ok:y(!0),text:g(),model:g(),usage:Wf,truncated:v(),latencyMs:a()}),qf=i({ok:y(!1),code:Gf,message:g(),retryAfterMs:a().optional()}),Jf=b(`ok`,[Kf,qf]),Yf=i({bytes:_(Uint8Array),mimeType:g()}),Xf=i({enabled:v().default(!1),maxAttempts:a().int().min(1).max(5).default(1)}),Zf={totalMs:6e4,connectMs:1e4,firstTokenMs:12e4,idleMs:6e4},Qf=i({addonId:g().optional(),profileId:g().optional(),consumer:g(),system:g().optional(),prompt:g(),jsonSchema:n(g(),u()).optional(),maxTokens:a().int().positive().optional(),temperature:a().optional(),topP:a().min(0).max(1).optional(),topK:a().int().positive().optional(),timeoutMs:a().int().positive().optional(),retry:Xf.optional(),requestId:g().optional()}),$f=i({url:g(),filename:g(),sizeBytes:a(),sha256:g().optional()}),ep=b(`kind`,[i({kind:y(`catalog`),catalogId:g()}),i({kind:y(`url`),url:g(),sha256:g().optional(),label:g().optional(),sizeBytes:a().optional(),extraFiles:p($f).optional()}),i({kind:y(`path`),path:g()})]),tp=i({nodeId:g(),engine:m([`llama-cpp`]),model:ep,contextSize:a().int().default(4096),gpuLayers:a().int().default(0),threads:a().int().optional(),parallel:a().int().default(1),batchSize:a().int().positive().optional(),ubatchSize:a().int().positive().optional(),flashAttention:v().default(!1),mlock:v().default(!1),noMmap:v().default(!1),cacheTypeK:m([`f32`,`f16`,`q8_0`,`q5_1`,`q5_0`,`q4_1`,`q4_0`]).optional(),cacheTypeV:m([`f32`,`f16`,`q8_0`,`q5_1`,`q5_0`,`q4_1`,`q4_0`]).optional(),extraArgs:p(g()).default([]),autoStart:v().default(!1),idleStopMinutes:a().int().default(30)}),np=i({phase:m([`downloading`,`verifying`]),file:g(),fileIndex:a().int(),fileCount:a().int(),downloadedBytes:a(),totalBytes:a().optional()}),rp=i({nodeId:g(),state:m([`stopped`,`downloading`,`starting`,`ready`,`crashed`,`failed`]),pid:a().optional(),port:a().optional(),modelPath:g().optional(),modelId:g().optional(),downloadProgress:a().min(0).max(1).optional(),download:np.optional(),lastError:g().optional(),crashesInWindow:a(),memoryBytes:a().optional(),vramBytes:a().optional()}),ip=i({file:g(),sizeBytes:a(),catalogId:g().optional(),installedAt:a().optional(),path:g().optional()}),ap=i({nodeId:g(),modelsBytes:a(),freeBytes:a().optional()}),op=Qf.extend({images:p(Yf).optional(),runtime:tp,timeoutMs:a().int().positive().optional()}),sp={name:`llm-runtime`,scope:`system`,mode:`singleton`,internal:!0,methods:{complete:T(op,Jf,{kind:`mutation`,auth:`admin`,timeoutMs:Hf}),ensureStarted:T(i({runtime:tp}),rp,{kind:`mutation`,auth:`admin`,timeoutMs:Hf}),stop:T(i({}),h(),{kind:`mutation`,auth:`admin`}),status:T(i({}),rp,{auth:`admin`}),installModel:T(i({model:ep}),h(),{kind:`mutation`,auth:`admin`,timeoutMs:Uf}),deleteModel:T(i({file:g()}),h(),{kind:`mutation`,auth:`admin`}),listLocalModels:T(i({}),p(ip),{auth:`admin`}),getDiskUsage:T(i({}),ap,{auth:`admin`})}},cp=m([`openai-compatible`,`openai`,`anthropic`,`google`,`managed-local`]),lp=i({id:g(),name:g(),kind:cp,addonId:g(),enabled:v(),model:g(),baseUrl:g().optional(),apiKey:g().optional(),supportsVision:v(),temperature:a().min(0).max(2).optional(),topP:a().min(0).max(1).optional(),topK:a().int().positive().optional(),maxTokens:a().int().positive().optional(),contextLength:a().int().positive().optional(),systemPrompt:g().optional(),timeoutMs:a().int().positive().default(6e4),connectTimeoutMs:a().int().positive().default(1e4),firstTokenTimeoutMs:a().int().positive().default(12e4),idleTimeoutMs:a().int().positive().default(6e4),retry:Xf.default({enabled:!1,maxAttempts:1}),toolsEnabled:v().default(!1),extraHeaders:n(g(),g()).optional(),runtime:tp.optional()}),up=u(),dp=i({kind:cp,label:g(),icon:g(),addonId:g(),configSchema:up}),fp=c([i({consumer:g()}),i({purpose:m([`text`,`vision`])})]),pp=i({selector:fp,profileId:g()}),mp=i({day:g(),consumer:g(),profileId:g(),calls:a(),okCalls:a(),errorCalls:a(),inputTokens:a(),outputTokens:a(),avgLatencyMs:a()}),hp=i({id:g(),label:g(),family:g(),purpose:m([`text`,`vision`]),url:g(),sha256:g(),sizeBytes:a(),quantization:g(),minRamBytes:a(),contextSizeDefault:a().int(),mmprojUrl:g().optional()}),gp=b(`ok`,[i({ok:y(!0),model:ep,label:g(),repo:g(),quantization:g(),purpose:m([`text`,`vision`]),totalBytes:a(),extraFilenames:p(g())}),i({ok:y(!1),code:g(),message:g(),candidates:p(g()).optional(),requiredBytes:a().optional()})]),_p=i({nodeId:g(),reachable:v(),status:rp.optional(),disk:ap.optional(),error:g().optional()}),vp=Qf.extend({images:p(Yf).min(1)}),yp=i({addonId:g(),profileId:g()}),bp={name:`llm`,scope:`system`,mode:`collection`,internal:!1,providerKind:`ai`,nodeIdMode:`data`,methods:{generate:T(Qf,Jf,{kind:`mutation`,timeoutMs:Hf}),generateVision:T(vp,Jf,{kind:`mutation`,timeoutMs:Hf}),cancel:T(i({addonId:g().optional(),requestId:g()}),h(),{kind:`mutation`}),listProfileKinds:T(i({}),p(dp)),listProfiles:T(i({}),p(lp)),upsertProfile:T(i({profile:lp}),lp,{kind:`mutation`,auth:`admin`}),deleteProfile:T(yp,h(),{kind:`mutation`,auth:`admin`}),testProfile:T(yp,Jf,{kind:`mutation`,auth:`admin`,timeoutMs:Hf}),listModels:T(yp,p(g())),getDefaults:T(i({}),p(pp)),setDefault:T(i({selector:fp,profileId:g().nullable()}),h(),{kind:`mutation`,auth:`admin`}),getUsage:T(i({since:a().optional(),until:a().optional(),consumer:g().optional(),profileId:g().optional()}),p(mp)),listModelCatalog:T(i({}),p(hp)),listRuntimeNodes:T(i({}),p(_p)),listNodeModels:T(i({nodeId:g()}),p(ip)),resolveModelRef:T(i({ref:g(),maxBytes:a().positive().optional()}),gp,{kind:`mutation`,auth:`admin`}),installModel:T(i({nodeId:g(),model:ep}),h(),{kind:`mutation`,auth:`admin`}),deleteModel:T(i({nodeId:g(),file:g()}),h(),{kind:`mutation`,auth:`admin`}),getRuntimeStatus:T(yp,rp),startRuntime:T(yp,rp,{kind:`mutation`,auth:`admin`}),stopRuntime:T(yp,h(),{kind:`mutation`,auth:`admin`})}},xp=[`decode`,`transcode`,`recording`,`streaming`,`detection`],Sp=[`measured`,`accounted`,`unattributable`],Cp=i({role:m(xp),deviceId:a().int().positive().nullable(),attribution:m(Sp),unit:g(),pid:a().int().positive().optional(),startedAtMs:a().optional(),cpuSeconds:a().optional(),rssBytes:a().optional()}),wp={name:`load-contribution`,scope:`system`,mode:`collection`,internal:!0,methods:{list:T(h(),p(Cp).readonly())},mount:{kind:`skip`}},Tp=i({armed:a().int().min(0),unknown:p(g()).readonly()}),Ep={name:`log-channels`,scope:`system`,mode:`collection`,internal:!0,methods:{list:T(h(),p(_o).readonly()),apply:T(i({windows:p(vo).readonly()}),Tp,{kind:`mutation`})},mount:{kind:`skip`}},Dp=m([`debug`,`info`,`warn`,`error`]),Op=i({timestamp:te(),level:Dp,scope:p(g()),message:g(),meta:n(g(),u()).optional(),tags:n(g(),g()).optional()}),kp={name:`log-destination`,scope:`system`,mode:`collection`,internal:!0,methods:{write:T(Op,h(),{kind:`mutation`}),query:T(i({scope:p(g()).optional(),level:Dp.optional(),since:te().optional(),until:te().optional(),limit:a().optional(),tags:n(g(),g()).optional()}),p(Op).readonly())},mount:{kind:`skip`}},Ap=m([`primary`,`second-factor`]),jp=i({kind:y(`redirect`),id:g(),label:g(),icon:g().optional(),startUrl:g(),stage:Ap}),Mp=i({kind:y(`widget`),id:g(),addonId:g(),bundle:g(),remote:Qc,stage:Ap}),Np=i({kind:y(`passkey`),id:g(),label:g(),stage:Ap,rpId:g(),origin:g().nullable()}),Pp=b(`kind`,[jp,Mp,Np]),Fp={name:`login-method`,scope:`system`,mode:`collection`,internal:!0,methods:{getLoginMethods:T(h(),p(Pp).readonly())},mount:{kind:`skip`}},Ip=i({total:a(),user:a(),system:a(),irq:a(),nice:a(),loadAvg:s([a(),a(),a()]),cores:a()}),Lp=i({percent:a(),totalBytes:a(),usedBytes:a(),availableBytes:a(),swapUsedBytes:a(),swapTotalBytes:a()}),Rp=i({readBytes:a(),writeBytes:a(),readOps:a(),writeOps:a(),timestampMs:a()}),zp=i({rxBytes:a(),txBytes:a(),rxPackets:a(),txPackets:a(),rxErrors:a(),txErrors:a(),timestampMs:a()}),Bp=i({utilization:a(),model:g(),memoryUsedBytes:a(),memoryTotalBytes:a(),temperature:a().nullable()}),Vp=i({openFds:a(),threadCount:a(),activeHandles:a(),activeRequests:a()}),Hp=i({avg10:a(),avg60:a(),avg300:a()}),Up=i({some:Hp,full:Hp.nullable()}),Wp=i({cpu:Ip,memory:Lp,gpu:Bp.nullable(),network:zp,disk:Rp,pressure:i({cpu:Up.nullable(),memory:Up.nullable(),io:Up.nullable()}),process:Vp,cpuTemperature:a().nullable(),timestampMs:a()}),Gp=i({path:g(),totalBytes:a(),usedBytes:a(),availableBytes:a(),percent:a()}),Kp=i({pid:a(),cpu:a(),memory:a(),privateBytes:a().optional(),sharedBytes:a().optional()}),qp=i({addonId:g(),nodeId:g(),role:m([`hub`,`worker`]),pid:a(),state:m([`starting`,`running`,`stopping`,`stopped`,`crashed`]),uptimeSec:a()}),Jp=i({pid:a(),ppid:a(),pgid:a(),classification:m([`root`,`managed`,`system`]),addonId:g().nullable(),nodeId:g().nullable(),command:g(),cpuPercent:a(),memoryRssBytes:a(),cpuMainPercent:a().nullable(),cpuGcPercent:a().nullable(),threadCount:a().nullable(),uptimeSec:a()}),Yp=i({source:m([`cgroup-v2`,`cgroup-v1`]),currentBytes:a(),limitBytes:a().nullable(),anonBytes:a().nullable(),fileBytes:a().nullable(),shmemBytes:a().nullable(),slabBytes:a().nullable(),gpuShmemBytes:a().nullable()}).extend({atMs:a()}),Xp=i({atMs:a(),samples:a().int(),cpuMainPercent:a().nullable(),cpuMainPercentMin:a().nullable(),cpuGcPercent:a().nullable(),cpuGcPercentMin:a().nullable(),cpuLifetimePercent:a(),cpuLifetimePercentMin:a(),memoryRssBytes:a(),memoryRssBytesMin:a(),processCount:a().int(),processCountMin:a().int()}),Zp=i({key:g(),kind:m([`addon`,`root`,`unattributed`]),points:p(Xp).readonly()}),Qp=i({nodeId:g(),series:p(Zp).readonly(),containerMemory:p(Yp).readonly(),bucketMs:a(),retainedSamples:a(),oldestAtMs:a().nullable(),cadenceMs:a(),durable:v()}),$p=i({forNodeId:g(),sinceMs:a().optional(),maxPoints:a().int().positive().optional()}),em=i({cpuPercent:a(),memoryPercent:a(),memoryUsedMB:a(),memoryTotalMB:a(),diskPercent:a().optional(),temperature:a().optional(),gpuPercent:a().optional(),gpuMemoryPercent:a().optional()}),tm={name:`metrics-provider`,scope:`system`,mode:`singleton`,methods:{collectSnapshot:T(h(),Wp),getCached:T(h(),Wp.nullable()),getCurrent:T(h(),em),getDiskSpace:T(i({dirPath:g()}),Gp),getGpuInfo:T(h(),Bp.nullable()),getCpuTemperature:T(h(),a().nullable()),getProcessStats:T(i({pids:p(a())}),p(Kp)),listAddonInstances:T(h(),p(qp).readonly()),getAddonStats:T(i({addonId:g()}),Kp.nullable()),listNodeProcesses:T(h(),p(Jp).readonly()),getLoadSeries:T($p,Qp)}},nm=i({sourceUrl:g(),metadata:ms,targets:p(ps).min(1).readonly(),calibrationRef:g().optional(),sessionId:g().optional()}),rm={name:`model-convert`,scope:`system`,mode:`singleton`,internal:!0,methods:{convert:T(nm,gs,{kind:`mutation`,auth:`admin`,timeoutMs:6e5})}},im=i({nodeId:g(),modelId:g(),format:m(is),entry:fs}),am=i({ok:v(),sha256:g(),bytes:a(),path:g()}),om={name:`model-distributor`,scope:`system`,mode:`singleton`,internal:!0,methods:{distributeModel:T(im,am,{kind:`mutation`,auth:`admin`})}},sm=i({bbox:V,pixelCount:a(),intensity:a()}),cm=i({detected:v(),regionCount:a(),regions:p(sm).readonly(),rawRegions:p(sm).readonly(),frameWidth:a(),frameHeight:a(),analysisMs:a()}),lm={name:`motion-detection`,scope:`device`,mode:`singleton`,kind:`wrapper`,defaultActive:!0,deviceTypes:[D.Camera],exposesDeviceSettings:!0,methods:{analyze:T(i({deviceId:a(),frame:ul.optional(),frameHandle:w.optional()}),cm,{kind:`mutation`}),removeCamera:T(i({deviceId:a()}),h(),{kind:`mutation`}),reset:T(h(),h(),{kind:`mutation`})},events:{onMotion:{data:i({deviceId:a(),detected:v(),regionCount:a()})}}},um=m([`external`,`embedded`]),dm=m([`connected`,`disconnected`,`auth-failed`,`unreachable`,`tls-error`]),fm=i({id:g(),name:g(),url:g(),kind:um,status:dm,latencyMs:a().nullable(),error:g().optional(),connectedClients:a().int().nonnegative().optional(),lastCheckedAt:a().optional()}),pm=i({url:g(),username:g().optional(),password:g().optional(),clientIdPrefix:g().optional()}),mm=i({name:g().min(1),url:g().regex(/^(mqtt|mqtts|ws|wss):\/\//,`URL must start with mqtt(s):// or ws(s)://`),username:g().optional(),password:g().optional(),clientIdPrefix:g().optional()}),hm=i({id:g()}),gm=i({id:g()}),_m=b(`ok`,[i({ok:y(!0),latencyMs:a()}),i({ok:y(!1),error:g()})]),vm=i({port:a().int().min(1).max(65535).default(1883),allowAnonymous:v().default(!1),username:g().optional(),password:g().optional()}),ym=i({id:g(),url:g()}),bm=i({brokerCount:a(),embeddedRunning:v()}),xm={name:`mqtt-broker`,scope:`system`,mode:`collection`,providerKind:`broker`,status:{schema:bm,kind:`poll`},methods:{listBrokers:T(h(),p(fm)),getBrokerConfig:T(gm,pm),addBroker:T(mm,hm,{kind:`mutation`}),removeBroker:T(gm,h(),{kind:`mutation`}),testConnection:T(gm,_m,{kind:`mutation`}),startEmbeddedBroker:T(vm,ym,{kind:`mutation`}),stopEmbeddedBroker:T(gm,h(),{kind:`mutation`}),getStatus:T(h(),bm)}},Sm=i({url:g(),hostname:g(),port:a(),protocol:m([`http`,`https`])}),Cm=i({connected:v(),endpoint:Sm.nullable(),error:g().optional()}),wm=Sm.extend({id:g(),label:g(),mode:g().optional(),sourcePort:a().optional()}),Tm={name:`network-access`,scope:`system`,mode:`collection`,providerKind:`ingress`,methods:{start:T(h(),Sm,{kind:`mutation`}),stop:T(h(),h(),{kind:`mutation`}),getEndpoint:T(h(),Sm.nullable()),getStatus:T(h(),Cm),listEndpoints:T(h(),p(wm).readonly())}},Em=m([`image`,`video`,`gif`,`audio`,`icon`]),Dm=i({mediaType:Em,url:g().optional(),bytes:_(Uint8Array).optional(),mime:g().optional(),name:g().optional()}).refine(e=>e.url!==void 0||e.bytes!==void 0,{message:"Attachment requires either `url` or `bytes`"}),Om=m([`text`,`markdown`,`html`]),km=m([`acknowledge`,`dismiss`,`silence`,`snooze`,`view`,`play`,`open`,`close`,`lock`,`unlock`,`arm`,`arm-home`,`arm-away`,`arm-night`,`disarm`,`light`,`alert`,`camera`]),Am=i({id:g(),label:g(),url:g().optional(),icon:km.optional(),destructive:v().optional(),mode:m([`navigate`,`background`]).optional()}),jm=i({body:g(),title:g().optional(),format:Om.default(`text`),priority:a().int().min(1).max(5).default(3),level:g().optional(),attachments:p(Dm).optional(),clickUrl:g().optional(),actions:p(Am).optional(),sound:g().optional(),ttl:a().optional(),tag:g().optional(),deviceId:a().optional(),eventId:g().optional(),metadata:n(g(),u()).optional()}),Mm=i({id:g(),label:g(),ordinal:a().int().min(1).max(5).nullable(),flags:i({critical:v().optional(),silent:v().optional(),noPush:v().optional()}).optional(),requires:p(g()).optional(),description:g().optional()}),Nm=i({attachments:i({mediaTypes:p(Em),mode:m([`url`,`bytes`,`both`]),max:a().int().nonnegative(),maxBytes:a().int().positive().optional()}),actions:a().int().nonnegative(),actionIcons:v().optional(),levels:p(Mm),format:p(Om),clickUrl:v(),sound:v(),ttl:v(),bodyMaxLen:a().int().positive()}),Pm=u(),Fm=i({kind:g(),label:g(),icon:g(),addonId:g(),iconUrl:g().optional(),iconMediaType:g().optional(),configSchema:Pm,supportsDiscovery:v(),caps:Nm}),Im=i({id:g(),name:g(),kind:g(),addonId:g(),enabled:v(),config:n(g(),u())}),Lm=i({kind:g(),suggestedName:g(),config:n(g(),u())}),Rm=i({level:g(),format:Om,attachmentsSent:a().int().nonnegative(),actionsSent:a().int().nonnegative(),truncated:v(),dropped:p(g())}),zm=i({success:v(),error:g().optional(),renderedAs:Rm.optional()}),Bm=zm,Vm={name:`notification-output`,scope:`system`,mode:`collection`,methods:{listTargetKinds:T(i({}),p(Fm)),listTargets:T(i({}),p(Im)),discoverTargets:T(i({kind:g(),config:n(g(),u()).optional()}),p(Lm)),send:T(i({targetId:g(),notification:jm}),zm,{kind:`mutation`}),testTarget:T(i({targetId:g(),sample:jm.optional()}),Bm,{kind:`mutation`}),upsertTarget:T(i({target:Im}),Im,{kind:`mutation`}),deleteTarget:T(i({targetId:g()}),h(),{kind:`mutation`}),setTargetEnabled:T(i({targetId:g(),enabled:v()}),h(),{kind:`mutation`})}},Hm=[{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`}],Um=[{id:`person`,name:`Person`},{id:`vehicle`,name:`Vehicle`},{id:`animal`,name:`Animal`},{id:`package`,name:`Package`}],Wm=new Set(Um.map(e=>e.id));function Gm(e){return Wm.has(e.trim().toLowerCase())}var Km={mapping:{person:`person`,bicycle:`vehicle`,car:`vehicle`,motorcycle:`vehicle`,airplane:`vehicle`,bus:`vehicle`,train:`vehicle`,truck:`vehicle`,boat:`vehicle`,bird:`animal`,cat:`animal`,dog:`animal`,horse:`animal`,sheep:`animal`,cow:`animal`,elephant:`animal`,bear:`animal`,zebra:`animal`,giraffe:`animal`,suitcase:`package`,backpack:`package`,handbag:`package`},preserveOriginal:!1},qm=[{id:`speech`,name:`Speech`},{id:`scream`,name:`Scream / Shout`},{id:`crying`,name:`Crying / Baby`},{id:`laughter`,name:`Laughter`},{id:`music`,name:`Music`},{id:`dog`,name:`Dog`},{id:`cat`,name:`Cat`},{id:`bird`,name:`Bird`},{id:`animal`,name:`Animal (other)`},{id:`alarm`,name:`Alarm / Siren`},{id:`doorbell`,name:`Doorbell / Knock`},{id:`glass_breaking`,name:`Glass Breaking`},{id:`gunshot`,name:`Gunshot / Explosion`},{id:`vehicle`,name:`Vehicle`},{id:`siren`,name:`Emergency Siren`},{id:`fire`,name:`Fire / Smoke`},{id:`water`,name:`Water`},{id:`wind`,name:`Wind / Weather`},{id:`door`,name:`Door`},{id:`footsteps`,name:`Footsteps`},{id:`crowd`,name:`Crowd / Chatter`},{id:`telephone`,name:`Telephone`},{id:`engine`,name:`Engine / Motor`},{id:`tools`,name:`Tools / Construction`},{id:`silence`,name:`Silence`}],Jm={mapping:{Speech:`speech`,"Child speech, kid speaking":`speech`,Conversation:`speech`,"Narration, monologue":`speech`,Babbling:`speech`,Whispering:`speech`,"Speech synthesizer":`speech`,Humming:`speech`,Rapping:`speech`,Singing:`speech`,Choir:`speech`,"Child singing":`speech`,Shout:`scream`,Bellow:`scream`,Yell:`scream`,Screaming:`scream`,"Children shouting":`scream`,Whoop:`scream`,"Crying, sobbing":`crying`,"Baby cry, infant cry":`crying`,Whimper:`crying`,"Wail, moan":`crying`,Groan:`crying`,Laughter:`laughter`,"Baby laughter":`laughter`,Giggle:`laughter`,Snicker:`laughter`,"Belly laugh":`laughter`,"Chuckle, chortle":`laughter`,Music:`music`,"Musical instrument":`music`,Guitar:`music`,Piano:`music`,Drum:`music`,"Drum kit":`music`,"Violin, fiddle":`music`,Flute:`music`,Saxophone:`music`,Trumpet:`music`,Synthesizer:`music`,"Pop music":`music`,"Rock music":`music`,"Hip hop music":`music`,"Classical music":`music`,Jazz:`music`,"Electronic music":`music`,"Background music":`music`,Dog:`dog`,Bark:`dog`,Yip:`dog`,Howl:`dog`,"Bow-wow":`dog`,Growling:`dog`,"Whimper (dog)":`dog`,Cat:`cat`,Purr:`cat`,Meow:`cat`,Hiss:`cat`,Caterwaul:`cat`,Bird:`bird`,"Bird vocalization, bird call, bird song":`bird`,"Chirp, tweet":`bird`,Squawk:`bird`,Crow:`bird`,Owl:`bird`,"Pigeon, dove":`bird`,Animal:`animal`,"Domestic animals, pets":`animal`,"Livestock, farm animals, working animals":`animal`,Horse:`animal`,"Cattle, bovinae":`animal`,Pig:`animal`,Sheep:`animal`,Goat:`animal`,Frog:`animal`,Insect:`animal`,Cricket:`animal`,Alarm:`alarm`,"Alarm clock":`alarm`,"Smoke detector, smoke alarm":`alarm`,"Fire alarm":`alarm`,Buzzer:`alarm`,"Civil defense siren":`alarm`,"Car alarm":`alarm`,Siren:`siren`,"Police car (siren)":`siren`,"Ambulance (siren)":`siren`,"Fire engine, fire truck (siren)":`siren`,"Emergency vehicle":`siren`,Foghorn:`siren`,Doorbell:`doorbell`,"Ding-dong":`doorbell`,Knock:`doorbell`,Tap:`doorbell`,Glass:`glass_breaking`,Shatter:`glass_breaking`,"Chink, clink":`glass_breaking`,"Gunshot, gunfire":`gunshot`,"Machine gun":`gunshot`,Explosion:`gunshot`,Fireworks:`gunshot`,Firecracker:`gunshot`,"Artillery fire":`gunshot`,"Cap gun":`gunshot`,Boom:`gunshot`,Vehicle:`vehicle`,Car:`vehicle`,Truck:`vehicle`,Bus:`vehicle`,Motorcycle:`vehicle`,"Car passing by":`vehicle`,"Vehicle horn, car horn, honking":`vehicle`,"Traffic noise, roadway noise":`vehicle`,Train:`vehicle`,Aircraft:`vehicle`,Helicopter:`vehicle`,Bicycle:`vehicle`,Skateboard:`vehicle`,Fire:`fire`,Crackle:`fire`,Water:`water`,Rain:`water`,Raindrop:`water`,"Rain on surface":`water`,Stream:`water`,Waterfall:`water`,Ocean:`water`,"Waves, surf":`water`,"Splash, splatter":`water`,Wind:`wind`,Thunderstorm:`wind`,Thunder:`wind`,"Wind noise (microphone)":`wind`,"Rustling leaves":`wind`,Door:`door`,"Sliding door":`door`,Slam:`door`,"Cupboard open or close":`door`,"Walk, footsteps":`footsteps`,Run:`footsteps`,Shuffle:`footsteps`,Crowd:`crowd`,Chatter:`crowd`,Cheering:`crowd`,Applause:`crowd`,"Children playing":`crowd`,"Hubbub, speech noise, speech babble":`crowd`,Telephone:`telephone`,"Telephone bell ringing":`telephone`,Ringtone:`telephone`,"Telephone dialing, DTMF":`telephone`,"Busy signal":`telephone`,Engine:`engine`,"Engine starting":`engine`,Idling:`engine`,"Accelerating, revving, vroom":`engine`,"Light engine (high frequency)":`engine`,"Medium engine (mid frequency)":`engine`,"Heavy engine (low frequency)":`engine`,"Lawn mower":`engine`,Chainsaw:`engine`,Hammer:`tools`,Jackhammer:`tools`,Sawing:`tools`,"Power tool":`tools`,Drill:`tools`,Sanding:`tools`,Silence:`silence`},preserveOriginal:!1},Ym={mapping:{speech:`speech`,child_speech:`speech`,conversation:`speech`,whispering:`speech`,singing:`speech`,humming:`speech`,shout:`scream`,yell:`scream`,screaming:`scream`,crying:`crying`,baby_crying:`crying`,sobbing:`crying`,laughter:`laughter`,baby_laughter:`laughter`,giggling:`laughter`,music:`music`,guitar:`music`,piano:`music`,drums:`music`,dog_bark:`dog`,dog_bow_wow:`dog`,dog_growling:`dog`,dog_howl:`dog`,cat_meow:`cat`,cat_purr:`cat`,cat_hiss:`cat`,bird:`bird`,bird_chirp:`bird`,bird_squawk:`bird`,animal:`animal`,horse:`animal`,cow_moo:`animal`,insect:`animal`,alarm:`alarm`,smoke_alarm:`alarm`,fire_alarm:`alarm`,car_alarm:`alarm`,siren:`siren`,police_siren:`siren`,ambulance_siren:`siren`,doorbell:`doorbell`,door_knock:`doorbell`,knocking:`doorbell`,glass_breaking:`glass_breaking`,glass_shatter:`glass_breaking`,gunshot:`gunshot`,explosion:`gunshot`,fireworks:`gunshot`,car:`vehicle`,truck:`vehicle`,motorcycle:`vehicle`,car_horn:`vehicle`,vehicle_horn:`vehicle`,traffic:`vehicle`,fire:`fire`,fire_crackle:`fire`,water:`water`,rain:`water`,ocean:`water`,splash:`water`,wind:`wind`,thunder:`wind`,thunderstorm:`wind`,door:`door`,door_slam:`door`,sliding_door:`door`,footsteps:`footsteps`,walking:`footsteps`,running:`footsteps`,crowd:`crowd`,chatter:`crowd`,cheering:`crowd`,applause:`crowd`,telephone_ring:`telephone`,ringtone:`telephone`,engine:`engine`,engine_starting:`engine`,lawn_mower:`engine`,chainsaw:`engine`,hammer:`tools`,jackhammer:`tools`,drill:`tools`,power_tool:`tools`,silence:`silence`},preserveOriginal:!1},Xm=new Map;for(let[e,t]of Object.entries(Jm.mapping))Xm.set(e.toLowerCase(),t);for(let[e,t]of Object.entries(Ym.mapping))Xm.set(e.toLowerCase(),t);function Zm(e){return Xm.get(e.toLowerCase())??null}function Qm(){return qm.map(e=>e.id)}var W={motion:`#f59e0b`,audio:`#06b6d4`,person:`#22c55e`,vehicle:`#3b82f6`,animal:`#f97316`,package:`#a855f7`,sensor:`#8b5cf6`,control:`#10b981`,genericDetection:`#64748b`},$m=`#22ff55`,eh={car:`#f59e0b`,truck:`#d97706`,bus:`#b45309`,motorcycle:`#eab308`,bicycle:`#ca8a04`,airplane:`#60a5fa`,boat:`#2563eb`,train:`#1d4ed8`,bird:`#14b8a6`,dog:`#84cc16`,cat:`#f97316`,horse:`#a16207`,sheep:`#a3a3a3`,cow:`#78716c`,elephant:`#6b7280`,bear:`#7c2d12`,zebra:`#404040`,giraffe:`#d4a373`};function th(e){return e.split(/[-_ ]/).filter(e=>e.length>0).map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(` `)}var nh=new Map;function G(e,t,n,r,i){nh.set(e,{kind:e,parentKind:null,level:`macro`,category:t,color:n,iconId:r,labelKey:`eventKind.${e}`,label:i})}function K(e,t,n,r,i,a){nh.set(e,{kind:e,parentKind:t,level:`sub`,category:n,color:r,iconId:i,labelKey:`eventKind.${e}`,label:a})}G(`motion`,`motion`,W.motion,`motion`,`Motion`),G(`audio`,`audio`,W.audio,`audio`,`Audio`),G(`person`,`detection`,W.person,`person`,`Person`),G(`vehicle`,`detection`,W.vehicle,`vehicle`,`Vehicle`),G(`animal`,`detection`,W.animal,`animal`,`Animal`),G(`package`,`package`,W.package,`package`,`Package`),G(`sensor`,`sensor`,W.sensor,`sensor`,`Sensor`),G(`control`,`control`,W.control,`control`,`Control`);for(let[e,t]of Object.entries(Km.mapping))t!==`vehicle`&&t!==`animal`||nh.has(e)||K(e,t,`detection`,eh[e]??W.genericDetection,e,th(e));K(`package-delivered`,`package`,`package`,W.package,`package`,`Package delivered`),K(`package-picked-up`,`package`,`package`,W.package,`package`,`Package picked up`),K(`contact`,`sensor`,`sensor`,`#f59e0b`,`door`,`Contact`),K(`motion-sensor`,`sensor`,`sensor`,W.sensor,`pir`,`Motion sensor`),K(`smoke`,`sensor`,`sensor`,`#ef4444`,`smoke`,`Smoke`),K(`flood`,`sensor`,`sensor`,`#3b82f6`,`water`,`Water leak`),K(`gas`,`sensor`,`sensor`,`#ef4444`,`gas`,`Gas`),K(`carbon-monoxide`,`sensor`,`sensor`,`#dc2626`,`smoke`,`Carbon monoxide`),K(`vibration`,`sensor`,`sensor`,`#eab308`,`vibration`,`Vibration`),K(`tamper`,`sensor`,`sensor`,`#f97316`,`tamper`,`Tamper`),K(`presence`,`sensor`,`sensor`,`#22c55e`,`presence`,`Presence`),K(`enum-sensor`,`sensor`,`sensor`,W.sensor,`generic`,`Sensor state`),K(`device-event`,`sensor`,`sensor`,`#10b981`,`button`,`Device event`),K(`lock`,`control`,`control`,`#0ea5e9`,`lock`,`Lock`),K(`switch`,`control`,`control`,W.control,`switch`,`Switch`),K(`siren`,`control`,`control`,`#dc2626`,`siren`,`Siren`),K(`button`,`control`,`control`,`#10b981`,`button`,`Button`),K(`doorbell`,`control`,`control`,`#a855f7`,`doorbell`,`Doorbell`);for(let e of qm){let t=`audio-${e.id}`;nh.has(t)||K(t,`audio`,`audio`,W.audio,t,e.name)}var rh=Object.freeze(Object.fromEntries(nh));function ih(e){return rh[e]}function ah(e){return rh[e]?.color??`#22ff55`}function oh(e){let t=[];for(let n of Object.values(rh))n.parentKind===e&&t.push(n);return t}var sh=i({kind:g(),label:g(),parentKind:g().nullable()}),ch=i({videoClasses:p(sh),audioKinds:p(sh),labels:p(sh)});function lh(e,t,n){return{kind:e,label:t,parentKind:n}}function uh(){let e=Object.values(rh);return{videoClasses:e.filter(e=>e.category===`detection`).map(e=>lh(e.kind,e.label,e.parentKind)),audioKinds:e.filter(e=>e.category===`audio`&&e.level===`sub`).map(e=>lh(e.kind,e.label,e.parentKind)),labels:e.filter(e=>e.category===`sensor`||e.category===`control`).map(e=>lh(e.kind,e.label,e.parentKind))}}var dh=Object.freeze(uh()),fh=m([`disarmed`,`armed_home`,`armed_away`,`armed_night`,`armed_vacation`,`armed_custom_bypass`,`arming`,`disarming`,`pending`,`triggered`]),ph=m([`home`,`away`,`night`,`vacation`,`custom_bypass`]),mh=i({state:fh,availableModes:p(ph),requiresCode:v(),lastChangedAt:a()}),hh={name:`alarm-panel`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[D.AlarmPanel],methods:{arm:T(i({deviceId:a().int().nonnegative(),mode:ph,code:g().min(1).optional()}),h(),{kind:`mutation`,auth:`admin`}),disarm:T(i({deviceId:a().int().nonnegative(),code:g().min(1).optional()}),h(),{kind:`mutation`,auth:`admin`}),trigger:T(i({deviceId:a().int().nonnegative()}),h(),{kind:`mutation`,auth:`admin`})},status:{schema:mh,kind:`push`},runtimeState:mh,durability:`restored`,volatileStateFields:[`lastChangedAt`]},gh=i({x:a(),y:a()}),_h=i({kind:y(`rect`),x:a(),y:a(),width:a(),height:a()}),vh=i({kind:y(`polygon`),points:p(gh)}),yh=i({kind:y(`grid`),gridWidth:a(),gridHeight:a(),cells:p(v())}),bh=i({kind:y(`line`),points:p(gh)}),xh=b(`kind`,[_h,vh,yh,bh]),Sh=m([`rect`,`polygon`,`grid`,`line`]),Ch=i({min:a(),max:a()}),wh=i({width:a(),height:a()}),Th=m([`immediate`,`track-end`,`device-event`,`package-event`,`system-event`]),Eh=m(`device-online.device-offline.device-disabled.device-enabled.device-battery-low.device-battery-normal.stream-online.stream-offline.node-online.node-offline.node-inference-unavailable.detection-blind.addon-crash-loop.addon-update-available.server-update-available.alarm-triggered.alarm-armed.alarm-disarmed.alarm-arming.alarm-arm-refused.addon-updated.server-updated.export-completed.camera-online.camera-offline.camera-disabled.camera-enabled`.split(`.`)),Dh=new Set([`camera-online`,`camera-offline`,`camera-disabled`,`camera-enabled`]),Oh=Eh.options.filter(e=>!Dh.has(e)),kh=[`alarm-arm-refused`,`alarm-arming`,`alarm-armed`,`alarm-triggered`,`alarm-disarmed`],Ah=i({kinds:p(Eh).min(1),deviceIds:p(a().int()).min(1).optional(),deviceTypes:p(g().min(1)).min(1).optional(),nodeIds:p(g().min(1)).min(1).optional(),packageNames:p(g().min(1)).min(1).optional()}),jh=1,Mh=1440,Nh=[10,30,60],Ph=i({days:p(a().int().min(0).max(6)).min(1),startMinute:a().int().min(0).max(1439),endMinute:a().int().min(0).max(1439)}),Fh=i({windows:p(Ph).min(1),timezone:g().optional(),invert:v().optional()}),Ih=i({values:p(g().min(1)),maxDistance:a().int().min(0).max(3).default(1)}),Lh=i({zoneId:g().optional(),className:g().optional(),op:m([`became-occupied`,`became-free`,`>=`,`<=`]).default(`became-occupied`),count:a().int().min(0).default(1),sustainSeconds:a().int().min(0).max(3600).default(15)}),Rh=-96,zh=i({labels:p(g().min(1)).min(1).optional(),dbThreshold:a().min(-96).max(0).optional(),hitPercent:a().int().min(1).max(100).default(60),samplingSeconds:a().int().min(1).max(300).default(10),confirmHits:a().int().min(1).max(20).optional(),confirmWindowSec:a().int().min(1).max(60).optional()}),Bh=m([`enter`,`exit`,`any`]),Vh=i({ids:p(g().min(1)).min(1),match:m([`any`,`all`]).default(`any`)}),Hh=b(`kind`,[i({kind:y(`wait`),seconds:a().min(0).max(300)}),i({kind:y(`cap`),deviceId:a().int(),cap:g().min(1),method:g().min(1),args:n(g(),u()).optional()})]),Uh=i({name:g().min(1).max(120),enabled:v(),minDelaySec:a().int().min(0).max(86400).optional(),actions:p(Hh).min(1)}),Wh=i({id:g().min(1).max(64),label:g().min(1).max(40),sequence:g().min(1).max(120),icon:km.optional(),destructive:v().optional()}),Gh=i({onTrigger:p(Uh).optional(),buttons:p(Wh).max(8).optional()}),Kh=i({deviceId:a().int(),states:p(g().min(1)).min(1)}),qh=i({sceneId:g().min(1),deviceId:a().int().optional(),requiredState:m([`matched`,`diverged`]),latched:v().optional()}),Jh=i({deviceState:Kh.optional(),scene:qh.optional(),devices:p(a()).optional(),classes:p(g().min(1)).optional(),classesExclude:p(g().min(1)).optional(),minConfidence:a().min(0).max(1).optional(),zones:Vh.optional(),zonesExclude:p(g().min(1)).optional(),crossing:Bh.optional(),labelEquals:p(g().min(1)).optional(),identities:p(g().min(1)).optional(),plates:Ih.optional(),identitiesExclude:p(g().min(1)).optional(),minImportance:a().min(0).max(1).optional(),minDwellSeconds:a().min(0).optional(),source:m([`pipeline`,`onboard`,`sensor`,`audio`,`any`]).optional(),minLabelConfidence:a().min(0).max(1).optional(),eventTypeTokens:p(g().min(1)).optional(),sensorKinds:p(g().min(1)).optional(),packagePhase:m([`delivered`,`picked-up`,`both`]).optional(),systemEvent:Ah.optional(),customZones:p(vh).optional(),occupancy:Lh.optional(),audio:zh.optional()}),Yh=i({targetId:g().min(1),params:n(g(),u()).optional()}),Xh=m([`cropped`,`full`,`boxed`]),Zh=i({attach:m([`best`,`best-matching`,`keyFrame`,`none`]).default(`best`),frame:Xh.optional(),zoneCrop:v().optional(),gif:v().optional(),clip:v().optional(),clipPreRollSec:a().int().min(0).max(30).optional(),clipPostRollSec:a().int().min(0).max(30).optional(),clipSpeed:a().min(1).max(8).optional(),profile:S.optional()}),Qh=m([`shared`,`per-class`]),$h=i({cooldownSec:a().int().min(0).max(86400).default(60),scope:m([`rule`,`rule-device`]).default(`rule-device`),granularity:Qh.optional()}),eg=1e3,tg=2e4,ng=8e3,rg=448,ig=i({op:m([`>=`,`>`,`<=`,`<`,`==`]),count:a().int().min(0).max(1e3)}),ag=i({enabled:v().default(!1),profileId:g().optional(),prompt:g().max(1e3).optional(),expect:ig.optional(),timeoutMs:a().int().min(eg).max(tg).default(ng),onTimeout:m([`fire`,`suppress`]).default(`fire`),maxImagePx:a().int().min(64).max(2048).default(448)}),og=i({name:g().min(1).max(200),enabled:v().default(!0),delivery:Th,conditions:Jh.default({}),schedule:Fh.optional(),targets:p(Yh),targetUsers:p(g()).optional(),media:Zh.default({attach:`best`}),throttle:$h.default({cooldownSec:60,scope:`rule-device`}),template:i({title:g().max(500).optional(),body:g().max(2e3).optional()}).optional(),priority:a().int().min(1).max(5).default(3),ownerUserId:g().optional(),snoozeAllowGlobal:v().optional(),snoozeOptions:p(a().int().min(1).max(Mh)).max(4).optional(),actions:Gh.optional(),confirm:ag.optional(),waitForEnhancement:v().optional(),groupIdleSec:a().int().min(0).max(600).optional()}),sg=og.partial().extend({disabledTargetIds:p(g()).optional(),enabled:v().optional(),conditions:Jh.optional(),media:Zh.optional(),throttle:$h.optional(),priority:a().int().min(1).max(5).optional()}),cg=og.extend({id:g(),createdBy:g(),createdAt:a(),updatedAt:a(),disabledTargetIds:p(g()).default([])}),lg=i({recordId:g(),recordKind:m([`object-event`,`track`,`device-event`,`package-event`,`system-event`]),deviceId:a(),timestamp:a(),wouldFire:v(),failedCondition:g().optional(),className:g().optional(),label:g().optional()}),ug=i({id:g(),group:m([`scope`,`class`,`zones`,`quality`,`label`,`schedule`,`device`,`package`,`occupancy`,`audio`,`system`]),label:g(),valueType:m([`deviceIdList`,`stringList`,`number01`,`number`,`sourceSelect`,`zoneSelection`,`zoneIdList`,`schedule`,`plateMatcher`,`packagePhase`,`crossingSelect`,`polygonDraw`,`occupancy`,`audio`,`deviceState`,`scene`,`systemEvent`]),operator:m([`in`,`notIn`,`anyOf`,`allOf`,`gte`,`fuzzyIn`,`withinSchedule`]),appliesTo:p(Th),phase:g(),description:g().optional(),options:p(i({value:g(),label:g(),hint:g().optional()})).readonly().optional()}),dg=[{id:`systemEvent`,group:`system`,label:`System event`,valueType:`systemEvent`,options:[{value:`device-online`,label:`Device online`},{value:`device-offline`,label:`Device offline`},{value:`device-disabled`,label:`Device switched off`},{value:`device-enabled`,label:`Device switched on`},{value:`stream-online`,label:`Stream online`},{value:`stream-offline`,label:`Stream offline`},{value:`node-online`,label:`Node online`},{value:`node-offline`,label:`Node offline`},{value:`node-inference-unavailable`,label:`Node has no usable inference device`},{value:`detection-blind`,label:`Camera detecting nothing`},{value:`addon-crash-loop`,label:`Addon stopped after repeated crashes`},{value:`addon-update-available`,label:`Addon update available`},{value:`server-update-available`,label:`Server update available`},{value:`addon-updated`,label:`Addons updated`},{value:`server-updated`,label:`Server updated`},{value:`export-completed`,label:`Export completed`},{value:`alarm-arming`,label:`Alarm arming (exit delay)`},{value:`alarm-armed`,label:`Alarm armed`},{value:`alarm-triggered`,label:`Alarm triggered`},{value:`alarm-disarmed`,label:`Alarm disarmed`}],operator:`in`,appliesTo:[`system-event`],phase:`P1`,description:`Infrastructure and update events. Device liveness covers EVERY device type — narrow it by device type (cameras only, say) and/or by device, node events by node id, and addon updates by package name.`},{id:`devices`,group:`scope`,label:`Devices`,valueType:`deviceIdList`,operator:`in`,appliesTo:[`immediate`,`track-end`,`device-event`,`package-event`],phase:`P1`,description:`Restrict the rule to these devices; absent = all devices. A sensor event matches either the SENSOR that fired or the camera it is attributed to, so a rule may name either one.`},{id:`classes`,group:`class`,label:`Object classes`,valueType:`stringList`,operator:`in`,appliesTo:[`immediate`,`track-end`,`package-event`],phase:`P1`,description:`Any overlap with the detection class set passes.`},{id:`classesExclude`,group:`class`,label:`Excluded classes`,valueType:`stringList`,operator:`notIn`,appliesTo:[`immediate`,`track-end`,`package-event`],phase:`P1`},{id:`minConfidence`,group:`quality`,label:`Minimum confidence`,valueType:`number01`,operator:`gte`,appliesTo:[`immediate`,`track-end`,`package-event`],phase:`P1`},{id:`zones`,group:`zones`,label:`Zones`,valueType:`zoneSelection`,operator:`anyOf`,appliesTo:[`immediate`,`track-end`,`package-event`],phase:`P1`,description:`Admin zone ids; quantifier any/all over the visited set.`},{id:`zonesExclude`,group:`zones`,label:`Excluded zones`,valueType:`zoneIdList`,operator:`notIn`,appliesTo:[`immediate`,`track-end`,`package-event`],phase:`P1`},{id:`crossing`,group:`zones`,label:`Zone crossing`,valueType:`crossingSelect`,options:[{value:``,label:`Not set — entering`,hint:`Entries, and every detection that is not a crossing at all. Exits are excluded. This is what a rule without a crossing condition already does, and choosing it writes nothing to the rule.`},{value:`enter`,label:`Entered a zone`,hint:`The same matches as "not set", stated explicitly: entries and non-crossing detections pass, exits do not.`},{value:`exit`,label:`Left a zone`,hint:`ONLY an exit crossing. A detection that is not a crossing fails, so this rule cannot fire on ordinary movement — pair it with the zones the subject must have left. Also matches a tripwire crossed against its drawn direction.`},{value:`any`,label:`Entered or left`,hint:`No direction filter: entries, exits and non-crossing detections alike. This is the only choice that adds exits to what the rule already matched.`}],operator:`in`,appliesTo:[`immediate`],phase:`P1`,description:`Direction of the zone crossing: enter (the default, and what every rule authored before this did) / exit / any. An exit rule matches only crossings.`},{id:`labelEquals`,group:`label`,label:`Label equals`,valueType:`stringList`,operator:`in`,appliesTo:[`immediate`,`track-end`],phase:`P1`,description:`Exact match on the collapsed label (identity / plate / subclass).`},{id:`identities`,group:`label`,label:`Known faces`,valueType:`stringList`,operator:`in`,appliesTo:[`immediate`,`track-end`],phase:`P1`,description:`Only recognised people. Selecting NOBODY means every identity in the face gallery; selecting some narrows to those. Matched on the gallery id, so renaming a person does not break the rule. On immediate delivery the name is not known yet when the notification is enqueued — see the rule’s "wait for recognition" switch.`},{id:`plates`,group:`label`,label:`Known plates`,valueType:`plateMatcher`,operator:`fuzzyIn`,appliesTo:[`immediate`,`track-end`],phase:`P1`,description:`Only vehicles whose plate was read. Selecting NO plate means any readable plate; listed plates are matched Levenshtein-tolerantly, because OCR noise makes an exact match useless.`},{id:`identitiesExclude`,group:`label`,label:`Excluded faces`,valueType:`stringList`,operator:`notIn`,appliesTo:[`immediate`,`track-end`],phase:`P1`,description:`Veto by identity (mirror of Known faces, same gallery ids). A subject nobody recognised passes — there is nothing to exclude.`},{id:`minLabelConfidence`,group:`label`,label:`Minimum label confidence`,valueType:`number01`,operator:`gte`,appliesTo:[`track-end`],phase:`P1`,description:`Best identity/plate recognition match confidence [0,1] for the label the track carries at close (peak assigned-identity cosine / peak plate OCR score; the higher of the two when both were read). Distinct from detection confidence. Fails closed for a track that ended un-recognized.`},{id:`minImportance`,group:`quality`,label:`Minimum importance`,valueType:`number01`,operator:`gte`,appliesTo:[`track-end`],phase:`P1`,description:`Server-computed key-event importance [0,1]; track-end rules only (importance is scored at close). Fails when the record has none.`},{id:`minDwellSeconds`,group:`quality`,label:`Minimum dwell (seconds)`,valueType:`number`,operator:`gte`,appliesTo:[`track-end`],phase:`P1`,description:`Track lifespan in seconds (lastSeen − firstSeen); track-end rules only.`},{id:`source`,group:`scope`,label:`Detection source`,valueType:`sourceSelect`,options:[{value:`any`,label:`Any source`},{value:`pipeline`,label:`Pipeline`},{value:`onboard`,label:`Onboard (camera)`},{value:`sensor`,label:`Sensor`},{value:`audio`,label:`Audio marker`}],operator:`in`,appliesTo:[`immediate`,`track-end`,`device-event`,`package-event`],phase:`P1`,description:`pipeline / onboard / sensor / audio; a record with no stamped source counts as pipeline.`},{id:`deviceState`,group:`scope`,label:`Device state`,valueType:`deviceState`,operator:`in`,appliesTo:[`immediate`,`track-end`,`device-event`,`package-event`],phase:`P2`,description:`Only fire while another device is in one of the chosen states — the alarm armed, a switch on, a contact closed. A state that cannot be read does NOT fire.`},{id:`scene`,group:`scope`,label:`Scene state`,valueType:`scene`,operator:`in`,appliesTo:[`immediate`,`track-end`,`device-event`,`package-event`],phase:`P3`,description:`Only fire while a scene is matched (the baseline is what we see) or diverged (it demonstrably is not) — “tell me about a person at the door, but only while the bin is still out”. A scene that cannot judge, or one this hub has not read yet, does NOT fire.`},{id:`sensorKinds`,group:`device`,label:`Sensor kinds`,valueType:`stringList`,operator:`in`,appliesTo:[`device-event`],phase:`P1`,description:`Sensor/control taxonomy kinds (doorbell / contact / button / …) matched against the persisted device event.`},{id:`eventTypeTokens`,group:`device`,label:`Event-type tokens`,valueType:`stringList`,operator:`in`,appliesTo:[`device-event`],phase:`P1`,description:`Raw device event-type tokens (e.g. doorbell press / press_long) from the event-emitter slice; absent on doorbell-pulse / passive sensors.`},{id:`packagePhase`,group:`package`,label:`Package phase`,valueType:`packagePhase`,options:[{value:`delivered`,label:`Delivered`},{value:`picked-up`,label:`Picked up`},{value:`both`,label:`Both`}],operator:`in`,appliesTo:[`package-event`],phase:`P1`,description:`Delivered / picked-up / both.`},{id:`occupancy`,group:`occupancy`,label:`Occupancy`,valueType:`occupancy`,operator:`anyOf`,appliesTo:[`device-event`],phase:`P1`,description:`ZoneAnalytics occupancy edge (optionally zone/class-scoped): count crosses the threshold and holds for sustainSeconds. Fail-closed on a missing snapshot.`},{id:`audio`,group:`audio`,label:`Sound`,valueType:`audio`,operator:`anyOf`,appliesTo:[`immediate`],phase:`P2`,description:`Fires when at least hitPercent% of the samples in a samplingSeconds window are hits — a hit clears the dBFS floor AND carries one of the chosen sounds. Both filters are optional and independent, but naming NEITHER never matches: every sample would be a hit, so the engine refuses rather than notifying on silence. dBFS is negative-going (0 = full scale, -96 = silence).`},{id:`customZones`,group:`zones`,label:`Custom zones`,valueType:`polygonDraw`,operator:`anyOf`,appliesTo:[`immediate`,`track-end`,`package-event`],phase:`P1`,description:`User-drawn polygons; a detection whose bbox overlaps any polygon matches.`},{id:`schedule`,group:`schedule`,label:`Schedule`,valueType:`schedule`,operator:`withinSchedule`,appliesTo:[`immediate`,`track-end`,`device-event`,`package-event`,`system-event`],phase:`P1`,description:`Weekly activation windows (invertible); absent = always active.`}],fg=m([`pending`,`sent`,`dead`]),pg=m([`object-event`,`track-end`,`device-event`,`package-event`,`system-event`]),mg=i({className:g(),label:g().optional(),confidence:a().optional(),zones:p(g()),timestamp:a(),systemEvent:i({kind:Eh,subject:g(),title:g(),body:g(),data:n(g(),u())}).optional()}),hg=i({id:g(),ruleId:g(),ruleName:g(),delivery:Th,targetId:g(),deviceId:a(),recordKind:pg,recordId:g(),trackId:g().optional(),status:fg,attempts:a().int(),createdAt:a(),updatedAt:a(),error:g().optional(),subject:mg,artifactIds:p(g().min(1)).optional()}),gg=100,_g=500,vg=i({ruleId:g().optional(),deviceId:a().optional(),status:fg.optional(),since:a().optional(),until:a().optional(),limit:a().int().min(1).max(500).default(100)}),yg=m([`rule`,`device`,`all`]),bg=i({scope:yg,ruleId:g().optional(),deviceId:a().int().optional(),classes:p(g().min(1)).min(1).optional(),durationMinutes:a().int().min(1).max(Mh),global:v().optional(),summary:v().optional()}),xg=i({id:g(),userId:g(),scope:yg,ruleId:g().optional(),deviceId:a().int().optional(),classes:p(g().min(1)).min(1).optional(),startedAt:a(),expiresAt:a(),global:v(),summary:v(),digestSentAt:a().optional()}),Sg=i({snoozeId:g(),targetId:g(),ruleId:g(),ruleName:g(),deviceId:a().int(),count:a().int(),firstAt:a(),lastAt:a()}),Cg=i({exitDelaySec:a().int().min(0).max(600),entryDelaySec:a().int().min(0).max(600),triggeredDurationSec:a().int().min(0).max(3600),announceArm:v(),announceTargets:p(g().min(1)).max(16)}),wg=Cg.partial(),Tg=m([`muted`,`detection-off`,`offline`]),Eg=i({deviceId:a().int(),reason:Tg}),Dg=i({mode:ph,ruleCount:a().int().min(0),allDevices:v(),deviceIds:p(a().int()),skippedDevices:p(Eg).default([])}),Og=i({deviceId:a().int().nullable(),settings:Cg,coverage:p(Dg)}),kg={name:`notification-rules`,scope:`system`,mode:`singleton`,methods:{listRules:T(i({}),i({rules:p(cg)}),{auth:`admin`}),getRule:T(i({ruleId:g()}),i({rule:cg.nullable()}),{auth:`admin`}),createRule:T(i({rule:og}),i({rule:cg}),{kind:`mutation`,auth:`admin`,caller:`required`}),updateRule:T(i({ruleId:g(),patch:sg}),i({rule:cg}),{kind:`mutation`,auth:`admin`,caller:`required`}),deleteRule:T(i({ruleId:g()}),i({success:y(!0)}),{kind:`mutation`,auth:`admin`}),setRuleEnabled:T(i({ruleId:g(),enabled:v()}),i({success:y(!0)}),{kind:`mutation`,auth:`admin`}),listDeviceMutes:T(i({}),i({mutedDeviceIds:p(a().int()).readonly()}),{auth:`admin`}),setDeviceMuted:T(i({deviceId:a().int(),muted:v()}),i({success:y(!0)}),{kind:`mutation`,auth:`admin`}),testRule:T(i({rule:og,lookbackMinutes:a().int().min(1).max(1440).default(60)}),i({results:p(lg)}),{kind:`mutation`,auth:`admin`}),getConditionCatalog:T(i({}),i({catalog:p(ug),taxonomy:ch.optional()})),getHistory:T(i({filter:vg.default({limit:100})}),i({entries:p(hg)}),{auth:`admin`}),resolveArtifactUrl:T(i({artifactId:g().min(1)}),i({url:g().nullable()}),{auth:`admin`}),listSnoozes:T(i({}),i({snoozes:p(xg)}),{caller:`required`}),createSnooze:T(i({snooze:bg}),i({snooze:xg}),{kind:`mutation`,caller:`required`}),cancelSnooze:T(i({snoozeId:g()}),i({success:y(!0)}),{kind:`mutation`,caller:`required`}),getAlarmConfig:T(i({}),Og,{auth:`admin`}),setAlarmConfig:T(i({patch:wg}),Og,{kind:`mutation`,auth:`admin`})}},Ag=m([`view`,`create`,`delete`]),jg=c([y(`*`),p(g())]),Mg=n(g(),c([y(`*`),p(g())])),Ng=m([`device`,`system`]),Pg=b(`kind`,[i({kind:y(`all`)}),i({kind:y(`ids`),ids:p(a().int()).min(1)}),i({kind:y(`types`),types:p(m(D)).min(1)}),i({kind:y(`locations`),locations:p(g().min(1)).min(1)})]),Fg=i({type:y(`device`),selector:Pg,access:p(Ag).min(1),includeLinked:v().optional()});function Ig(e){if(typeof e!=`object`||!e||Array.isArray(e)||Reflect.get(e,`type`)!==`device`||Reflect.get(e,`selector`)!==void 0)return e;let t=Reflect.get(e,`targets`);return Array.isArray(t)?{type:`device`,selector:{kind:`ids`,ids:t.map(e=>typeof e==`string`?Number(e):e).filter(e=>typeof e==`number`&&Number.isInteger(e))},access:Reflect.get(e,`access`)}:e}var q=oe(Ig,b(`type`,[i({type:y(`category`),target:Ng,access:p(Ag).min(1)}),i({type:y(`capability`),target:g(),access:p(Ag).min(1)}),i({type:y(`addon`),target:g(),access:p(Ag).min(1)}),Fg])),Lg=i({id:g(),username:g(),passwordHash:g(),isAdmin:v().default(!1),allowedProviders:jg,allowedDevices:Mg,scopes:p(q).default([]),createdAt:a(),updatedAt:a()}),Rg=i({id:g(),label:g(),isAdmin:v().default(!1),allowedProviders:jg,allowedDevices:Mg,tokenHash:g(),tokenPrefix:g(),createdAt:a(),lastUsedAt:a().optional()}),zg=i({id:g(),userId:g(),name:g(),tokenHash:g(),tokenPrefix:g(),scopes:p(q),expiresAt:a().nullish(),lastUsedAt:a().nullish(),createdAt:a()}),Bg=i({integrationId:g(),displayName:g(),requestedScopes:p(q),allowedRedirectPrefixes:p(g()).min(1),allowedPrivateHostPaths:p(g()).optional(),requiresPkce:v().optional(),hubUrl:g().optional(),refreshTokenTtlSec:c([a().int().positive(),y(`never`)]).optional()}),Vg={name:`oauth-integration`,scope:`system`,mode:`collection`,internal:!0,methods:{getDescriptor:T(h(),Bg,{auth:`admin`})}},Hg=i({handle:w,cropFrameSpace:i({x:a(),y:a(),w:a(),h:a()})});i({crop:i({left:a(),top:a(),width:a().positive(),height:a().positive()}).optional(),content:i({width:a().int().positive(),height:a().int().positive()}),fit:m([`stretch`,`contain`]),format:m([`rgb`,`gray`,`jpeg`])});var Ug=i({registryId:g().min(1),id:g().min(1),width:a().int().positive(),height:a().int().positive(),format:m([`rgb`,`gray`]),timestamp:a(),capturedAt:a().optional()}),Wg=m([`onnx`,`coreml`,`openvino`,`tflite`,`pt`,`gguf`]),Gg=m([`detector`,`cropper`,`classifier`,`refiner`,`audio-classifier`]),J=i({runtime:m([`node`,`python`]),backend:g(),format:Wg,device:g().optional()}),Kg=i({engine:J,devices:p(i({id:g(),label:g(),description:g().optional()})).readonly(),defaultDevice:g()}),qg=r(()=>i({addonId:g(),addonName:g(),slot:Gg,inputClasses:p(g()).readonly(),outputClasses:p(g()).readonly(),enabled:v(),modelId:g(),children:p(qg).readonly(),group:g().optional(),settings:n(g(),u()).optional()})),Jg=r(()=>i({addonId:g(),enabled:v(),modelId:g(),children:p(Jg).readonly(),settings:n(g(),u()).optional()})),Yg=i({id:g(),name:g(),createdAt:g(),updatedAt:g(),engine:J,steps:p(Jg).readonly()}),Xg=i({id:g(),name:g(),formats:n(g(),i({downloaded:v(),sizeMB:a()})),group:cs.optional(),legacy:v().optional(),provider:us.optional()}),Zg=x(),Qg=i({id:g(),name:g(),slot:Gg,inputClasses:p(g()).readonly(),outputClasses:p(g()).readonly(),childSlots:p(Gg).readonly(),models:p(Xg).readonly(),defaultModelId:g(),defaultModelIdByFormat:n(g(),g()).optional(),enabledByDefault:v().optional(),backfillIntoExistingOverrides:v().optional(),defaultConfidence:a(),group:g().optional(),configSchema:p(Zg).readonly().optional()}),$g=i({id:Gg,label:g(),priority:a(),parentSlot:Gg.nullable(),addons:p(Qg).readonly()}),e_=i({availableEngines:p(Kg).readonly(),selectedEngine:J,slots:p($g).readonly()}),t_=i({runtimeId:m([`onnx`,`openvino`,`coreml`,`edgetpu`]).nullable(),device:g().nullable(),state:m([`idle`,`installing`,`verifying`,`ready`,`failed`]),progress:a().optional(),error:g().optional(),nextRetryAt:a().optional(),configIssues:p(g()).optional()}),Y=r(()=>i({addonId:g(),modelId:g().optional(),enabled:v().default(!0),children:p(Y).optional(),settings:n(g(),u()).optional(),jumpDeviceKey:g().optional()})),n_=i({addonId:g(),chosen:g(),running:g(),format:g()}),r_=i({addonId:g(),kind:m([`unknown-addon`,`no-format-build`]),detail:g()}),i_=i({ok:v(),issues:p(r_).readonly(),substitutions:p(n_).readonly(),format:g()}),a_=i({filename:g(),stepIds:p(g()).readonly().optional()}),o_=i({base64:g(),filename:g()}),s_=i({filename:g(),sizeKb:a()}),c_=i({base64:g()}),l_=i({id:g(),name:g(),description:g(),available:v(),rawLabels:p(g()).readonly().optional()}),u_=i({activeBackend:g(),availableBackends:p(l_).readonly(),sampleRate:a(),chunkDurationMs:a()}),d_=i({filePath:g(),sizeMB:a(),durationMs:a()}),f_=i({success:v(),error:g().optional(),frame:x().optional()}),p_=x(),m_=x(),h_=x(),g_=x(),__=x(),v_=x(),y_={name:`pipeline-executor`,scope:`system`,mode:`singleton`,methods:{getAvailableEngines:T(h(),p(J)),getSelectedEngine:T(h(),J),getDefaultSteps:T(J,p(qg)),getEngineProvisioning:T(i({nodeId:g()}),t_),getVideoPipelineSteps:T(h(),n(g(),i({modelId:g(),settings:n(g(),u()).readonly()}))),setVideoPipelineSteps:T(i({steps:n(g(),i({modelId:g(),settings:n(g(),u()).readonly()}))}),i({success:y(!0)}),{kind:`mutation`,auth:`admin`}),clearDeviceOverrides:T(i({nodeId:g()}),i({success:y(!0),clearedDevices:a()}),{kind:`mutation`,auth:`admin`}),getInferenceDeviceHealth:T(i({nodeId:g()}),i({unhealthy:p(i({deviceKey:g(),state:m([`failed`,`backoff`]),since:a(),deaths:a(),lastError:g()})).readonly()})),rearmInferenceDevice:T(i({nodeId:g(),deviceKey:g()}),i({rearmed:v()}),{kind:`mutation`,auth:`admin`}),getSchema:T(h(),e_),getGlobalSteps:T(h(),p(qg).readonly().nullable()),getGlobalPipelineConfig:T(h(),p_),getOrchestratorConfigSchema:T(h(),m_),validatePipeline:T(i({steps:p(Y)}),i_),listTemplates:T(h(),p(Yg).readonly()),saveTemplate:T(i({name:g(),steps:p(Jg).readonly(),engine:J}),Yg,{kind:`mutation`}),updateTemplate:T(i({id:g(),name:g().optional(),steps:p(Jg).readonly().optional()}),Yg,{kind:`mutation`}),deleteTemplate:T(i({id:g()}),h(),{kind:`mutation`}),getCapabilities:T(h(),g_),getAddonModels:T(i({addonId:g()}),__),downloadModel:T(i({addonId:g(),modelId:g(),format:Wg}),d_,{kind:`mutation`}),deleteModel:T(i({addonId:g(),modelId:g(),format:Wg}),i({success:y(!0)}),{kind:`mutation`}),runPipeline:T(i({engine:J.optional(),steps:p(Y).min(1),frame:ul.optional(),frameRef:Ug.optional(),frameHandle:w.optional(),imageBase64:g().optional(),image:_(Uint8Array).optional(),referenceImage:g().optional(),deviceId:a().optional(),sessionId:g().optional(),plane:m([`full`,`frame`]).optional(),deviceKey:g().optional(),nativeCropRef:Hg.optional()}),v_,{kind:`mutation`}),runPipelineBatch:T(i({engine:J.optional(),steps:p(Y).min(1),frames:p(ul).min(1).max(255),deviceId:a().optional(),sessionId:g().optional(),frameId:a().int().nonnegative().optional(),deviceKey:g().optional()}),i({results:p(v_).readonly()}),{kind:`mutation`}),cacheFrameInPool:T(i({data:_(Uint8Array),width:a().int().positive(),height:a().int().positive(),format:m([`rgb`,`bgr`,`gray`])}),i({frameId:a(),width:a(),height:a()}),{kind:`mutation`}),inferCached:T(i({stepId:g(),frameId:a().int()}),n(g(),u()),{kind:`mutation`}),uncacheFrame:T(i({frameId:a().int()}),h(),{kind:`mutation`}),getEffectiveTuning:T(h(),i({batchMode:g(),windowMs:a(),maxBatchSize:a(),concurrency:a()})),listLoadedEngines:T(h(),p(i({engineKey:g(),engine:J,modelsLoaded:p(g()).readonly(),inUseByCameras:p(a()).readonly(),kind:m([`runtime`,`warm-override`,`device-pool`]),poolPid:a().nullable(),idleMs:a().nullable(),idleTtlMs:a().nullable()})).readonly()),spinEngine:T(i({engine:J}),i({success:y(!0)}),{kind:`mutation`,auth:`admin`}),killEngine:T(i({engine:J,force:v().optional()}),i({success:v(),reason:g().optional()}),{kind:`mutation`,auth:`admin`}),listReferenceImages:T(h(),p(a_).readonly()),getReferenceImage:T(i({filename:g()}),o_.nullable()),getReferenceAudioFiles:T(h(),p(s_).readonly()),getReferenceAudio:T(i({filename:g()}),c_.nullable()),getAudioCapabilities:T(h(),u_),runAudioTest:T(i({addonId:g(),modelId:g(),filename:g().optional(),settings:n(g(),u()).optional()}),f_,{kind:`mutation`}),getDetectionConfigSchema:T(h(),h_)}},b_=m([`include`,`exclude`]),X=i({id:g(),name:g().optional(),zoneIds:p(g()).min(1).readonly(),mode:b_,classFilter:p(g()).readonly().optional(),overlapThreshold:a().min(0).max(1).optional(),bboxInclusionPct:a().min(0).max(100).optional(),preferMask:v().optional(),enabled:v().default(!0)}),x_=p(X).readonly(),S_=m([`polygon`,`tripwire`]),C_=i({x:a(),y:a()}),w_=i({id:g(),name:g(),kind:S_.default(`polygon`),polygon:p(C_).readonly(),color:g().default(`#3b82f6`)}),T_={name:`zones`,scope:`device`,mode:`singleton`,deviceTypes:[D.Camera],methods:{listZones:T(i({deviceId:a()}),p(w_).readonly()),addZone:T(i({deviceId:a(),zone:w_}),h(),{kind:`mutation`,auth:`admin`}),removeZone:T(i({deviceId:a(),zoneId:g()}),h(),{kind:`mutation`,auth:`admin`}),updateZone:T(i({deviceId:a(),zone:w_}),h(),{kind:`mutation`,auth:`admin`})},runtimeState:i({zones:p(w_).readonly()}),durability:`restored`},E_=m([`new`,`entered`,`left`,`moving`,`idle`]),D_=m([`motion`,`object`,`audio`]),O_=b(`kind`,[_h,vh]),k_=m([`motion`,`audio`,`person`,`vehicle`,`animal`,`door`,`pir`,`smoke`,`water`,`button`,`package`,`generic`]),A_=m([`motion`,`audio`,`detection`,`sensor`,`control`,`custom`,`package`]),j_=m([`macro`,`sub`]),M_=i({kind:g(),labelKey:g(),label:g(),color:g(),iconId:g(),icon:k_,category:A_,parentKind:g().nullable(),level:j_,source:i({capName:g(),deviceId:a()})}),N_=i({deviceId:a(),kinds:p(M_).readonly()}),P_=i({id:g(),deviceId:a(),sourceDeviceId:a(),kind:g(),value:n(g(),u()).nullable(),timestamp:a()}),F_=i({x:a(),y:a(),timestamp:a(),bbox:V}),I_=i({timestamp:a(),position:F_,mediaKey:g()}),L_=i({minX:a(),minY:a(),maxX:a(),maxY:a()}),R_=m([`full`,`slim`]),z_=i({label:g(),peakScore:a(),count:a(),firstAt:a(),lastAt:a()}),B_=m([`pipeline`,`sensor`,`audio`]),V_=m([`none`,`staging`,`trained`]),H_=500,U_={markForTrain:v().optional(),debug:v().optional(),debugNote:g().max(500).optional(),favourited:v().optional()},W_={retrainStatus:V_.optional()},G_=i(U_),K_=i({trackId:g(),markForTrain:v(),debug:v(),debugNote:g(),favourited:v(),retrainStatus:V_}),q_=c([y(1),y(2)]),J_=i({stepId:g(),modelId:g().optional(),decidedAt:a(),identityId:g().optional()}),Y_={label:g().optional(),labelScore:a().optional(),labelMeta:J_.optional(),subLabel:g().optional(),subLabelScore:a().optional(),subLabelMeta:J_.optional()},X_=i({deviceId:a(),tracks:a().int(),files:a().int(),bytes:a().int()}),Z_=i({generatedAt:a(),trackCount:a().int(),fileCount:a().int(),byteCount:a().int(),truncated:v(),devices:p(X_).readonly()}),Q_=i({trackId:g(),deviceId:a(),className:g(),...Y_,producingDeviceName:g().optional(),source:B_.optional(),firstSeen:a(),lastSeen:a(),positions:p(F_).readonly(),snapshots:p(I_).readonly(),zonesVisited:p(g()).readonly(),zoneNames:p(g()).readonly().optional(),classes:p(g()).readonly().optional(),totalDistance:a(),state:E_,active:v(),importance:a().optional(),bestEventId:g().optional(),importanceReason:g().optional(),audioLabels:p(z_).readonly().optional(),envelope:L_.optional(),hasFace:v().optional(),hasEmbeddedFace:v().optional(),hasRider:v().optional(),previewMissReason:g().optional(),...U_,...W_}),$_={id:g(),deviceId:a(),timestamp:a()},ev=i({...$_,kind:y(`motion`),regionCount:a(),regions:p(i({bbox:V,pixelCount:a(),intensity:a()})).readonly().optional(),frameWidth:a().optional(),frameHeight:a().optional(),mediaUrl:g().optional()}),tv=m([`pipeline`,`onboard`]),nv=m([`enter`,`exit`]),rv=i({direction:nv,zoneId:g(),zoneName:g().optional()}),iv=i({...$_,kind:y(`object`),source:tv.optional(),frameId:g().optional(),trackId:g().optional(),className:g(),...Y_,confidence:a().optional(),bbox:V.optional(),zones:p(g()).readonly().optional(),state:E_.optional(),zoneCrossing:rv.optional(),frameWidth:a().optional(),frameHeight:a().optional(),mediaKey:g().optional(),keyFrameMediaKey:g().optional(),mediaUrl:g().optional(),importance:a().optional()}),av=i({...$_,kind:y(`audio`),rms:a(),dbfs:a(),classification:i({className:g(),originalClass:g().optional(),score:a()}).optional(),mediaUrl:g().optional()}),ov=m([`crop`,`thumbnail`,`snapshot`,`firstFrame`,`lastFrame`,`fullFrame`,`fullFrameBoxed`,`faceCrop`,`plateCrop`,`keyFrame`,`keyFrameSmall`,`thumbnailSmall`,`sceneFrame`]),sv=i({key:g(),kind:ov,sizeBytes:a(),timestamp:a()}),cv=sv.extend({url:g(),base64:g()}),lv=cv.omit({base64:!0}),uv=m([`person`,`vehicle`,`animal`,`package`,`face`,`plate`]),dv=m([`subject`,`model_error`]),fv=m([`operator`,`assist`]),pv=i({x:a(),y:a(),w:a(),h:a()}),mv=i({id:g(),trackId:g(),deviceId:a(),mediaKey:g(),bbox:pv,macroClass:uv,label:g().optional(),subLabel:g().optional(),kind:dv,source:fv,assistModelId:g().optional(),assistScore:a().optional(),exportedInBatch:g().optional(),createdAt:a()}),hv=mv.omit({id:!0,trackId:!0,deviceId:!0,mediaKey:!0,createdAt:!0,exportedInBatch:!0}),gv=i({trackId:g(),deviceId:a(),className:g(),label:g().optional(),firstSeen:a(),lastSeen:a(),frameCount:a().int(),annotationCount:a().int()}),_v=i({mediaKey:g(),kind:ov,timestamp:a(),sizeBytes:a().int(),copied:v()}),vv=i({frameId:g(),deviceId:a(),trackId:g(),sourceMediaKey:g(),sourceKind:ov,sizeBytes:a().int(),width:a().int(),height:a().int(),copiedAt:a()}),yv=m([`source-missing`,`unreadable-image`,`write-failed`]),bv=i({copied:p(vv).readonly(),refused:p(i({sourceMediaKey:g(),reason:yv})).readonly()}),xv=i({candidates:p(_v).readonly(),copies:p(vv).readonly(),autoPickMediaKey:g().optional()}),Sv=b(`kind`,[i({kind:y(`package`),zone:pv.optional()}),i({kind:y(`objects`),modelId:g(),minScore:a().optional()})]),Cv=b(`kind`,[i({kind:y(`proposed`),modelId:g(),stepId:g(),minScore:a(),proposals:p(hv).readonly(),belowThreshold:a().int()}),i({kind:y(`refused`),reason:g(),detail:g().optional()})]),wv=i({trackId:g(),retrainStatus:V_,changed:v(),reason:m([`unknown-track`,`no-frames-copied`,`not-staging`,`not-trained`,`unchanged`]).optional()}),Tv=1e3,Ev=5e3,Dv=i({deviceId:a(),since:a().optional(),until:a().optional(),limit:a().int().min(1).max(Ev).default(Tv),projection:m([`full`,`slim`]).optional()}),Ov=Dv.extend({classFilter:g().optional()}),kv=i({deviceIds:p(a()),since:a().optional(),until:a().optional(),limit:a().int().min(1).max(1e3).default(200),cursor:g().optional(),projection:R_.optional(),includeStationary:v().optional(),classes:p(g()).optional()}),Av=i({id:g(),deviceId:a(),openedAt:a(),lastActiveAt:a(),sealedAt:a().nullable(),memberCount:a().int().nonnegative(),groupShotKey:g().nullable()}),jv=200,Mv=50,Nv=i({deviceIds:p(a()).min(1),since:a().optional(),until:a().optional(),limit:a().int().min(1).max(200).default(50)}),Pv=i({summaries:p(Av).readonly()}),Fv=i({summary:Av,trackIds:p(g()).readonly()}),Iv=i({tracks:p(Q_).readonly(),nextCursor:g().nullable()}),Lv=50,Rv=200,zv=i({deviceId:a(),since:a(),until:a(),limit:a().int().min(1).max(Rv).default(Lv),minImportance:a().min(0).max(1).optional(),classFilter:g().optional()}),Bv=i({id:g(),trackId:g(),timestamp:a(),className:g(),...Y_,importance:a(),bestEventId:g(),windowMs:a().optional(),...U_,...W_}),Vv=i({deviceIds:p(a()).min(1).max(200),since:a(),until:a(),limit:a().int().min(1).max(Rv).default(Lv),minImportance:a().min(0).max(1).optional(),classFilter:g().optional()}),Hv=i({deviceId:a(),events:p(Bv).readonly()}),Uv=i({bucketStart:a(),motion:a().int(),object:a().int(),audio:a().int()}),Wv=200,Gv=i({deviceId:a(),read:m([`read`,`unreadable`]),buckets:p(Uv).readonly()}),Kv=i({trackId:g(),className:g(),confidence:a(),bbox:V,zones:p(g()).readonly(),state:E_}),qv=f({id:g(),kind:m([`first-level`,`detail`]),macroClass:g(),score:a(),bbox:i({x:a(),y:a(),width:a(),height:a()}),labels:p(f({label:g(),score:a()})).readonly(),parentId:g().optional()}),Jv=iv.extend({score:a()}),Yv=i({text:g(),deviceId:a().optional(),since:a().optional(),until:a().optional(),classFilter:g().optional(),limit:a().default(50),minScore:a().min(0).max(1).default(.2)}),Xv=i({tracks:a().int(),events:a().int(),media:a().int(),faces:a().int(),plates:a().int(),embeddings:a().int()}),Zv=i({mediaDropped:a().int(),tracks:a().int(),events:a().int()}),Qv=i({deviceId:a(),rows:a().int(),bytes:a().int()}),$v=i({totalRows:a().int(),totalBytes:a().int(),devices:p(Qv).readonly()}),ey=i({kind:ov,rows:a().int(),bytes:a().int()}),ty=i({totalRows:a().int(),totalBytes:a().int(),kinds:p(ey).readonly(),unaccountedRows:a().int(),unaccountedBytes:a().int()}),ny=i({motion:a().int(),object:a().int(),audio:a().int()}),ry=i({deviceId:a().optional(),since:a().optional(),until:a().optional(),maxTracks:a().int().positive().optional(),executeOnNodeId:g().optional(),pacingMs:a().int().nonnegative().optional()}),iy=i({deleted:a()}),ay=i({started:v(),alreadyRunning:v()}),oy=i({running:v(),scanned:a(),rebuilt:a(),missingKeyFrame:a(),missingBbox:a(),notRunnable:a(),noCapableNode:a(),failed:a(),complete:v().nullable(),startedAtMs:a().nullable(),finishedAtMs:a().nullable(),error:g().nullable()}),sy=i({started:v(),alreadyRunning:v()}),cy=i({mode:m([`report`,`reclaim`]).default(`report`),scopes:p(m([`motion-still`,`track-filmstrip`])).min(1).optional(),deviceIds:p(a().int()).min(1).optional(),restart:v().optional(),pageSize:a().int().min(50).max(5e3).optional(),maxRowsPerDevice:a().int().min(1).max(5e5).optional(),maxReclaimPerDevice:a().int().min(1).max(5e5).optional(),maxBytesPerRun:a().int().min(1).optional(),budgetMinutes:a().int().min(1).max(720).optional(),throttleBytesPerSec:a().int().min(64*1024).optional(),graceMinutes:a().int().min(1).max(10080).optional()}),ly=i({running:v(),mode:m([`report`,`reclaim`]).nullable(),totalExamined:a(),totalEligible:a(),totalReclaimed:a(),totalBytesReclaimed:a(),totalRefused:a(),devicesDone:a(),complete:v().nullable(),startedAtMs:a().nullable(),finishedAtMs:a().nullable(),error:g().nullable()}),uy=i({timestamp:a(),frame:v_}),dy=i({tracks:p(i({className:g(),firstSeenMs:a(),lastSeenMs:a(),bbox:V,framesMatched:a().int()})).readonly()}),fy={name:`pipeline-analytics`,scope:`device`,mode:`singleton`,kind:`wrapper`,defaultActive:!0,deviceTypes:[D.Camera],exposesDeviceSettings:!0,methods:{getActiveTracks:T(i({deviceId:a()}),p(Q_).readonly()),getTrack:T(i({deviceId:a(),trackId:g()}),Q_.nullable()),listTracks:T(i({deviceId:a(),since:a().optional(),until:a().optional(),limit:a().optional(),zone:O_.optional(),projection:R_.optional(),includeStationary:v().optional(),classes:p(g()).optional()}),p(Q_).readonly()),listRecentTracks:T(kv,Iv),listSummaries:T(Nv,Pv),getSummary:T(i({id:g()}),Fv.nullable()),clearTracks:T(i({deviceId:a()}),h(),{kind:`mutation`,auth:`admin`}),getMotionEvents:T(Dv,p(ev).readonly()),getObjectEvents:T(Ov,p(iv).readonly()),getAudioEvents:T(Dv,p(av).readonly()),listEventKinds:T(i({deviceId:a()}),p(M_).readonly()),listEventKindsBatch:T(i({deviceIds:p(a()).min(1).max(200)}),p(N_).readonly()),getSensorEvents:T(i({deviceId:a(),since:a().optional(),until:a().optional(),kinds:p(g()).optional(),limit:a().int().min(1).max(Ev).default(Tv)}),p(P_).readonly()),getKeyEvents:T(zv,p(Bv).readonly()),getKeyEventsBatch:T(Vv,p(Hv).readonly()),getEventDensity:T(i({deviceId:a(),since:a(),until:a(),bucketMs:a().int().positive()}),p(Uv).readonly()),getEventDensityBatch:T(i({deviceIds:p(a()).min(1).max(200),since:a(),until:a(),bucketMs:a().int().positive()}),p(Gv).readonly()),pruneEventsBefore:T(i({deviceId:a(),cutoffMs:a()}),i({motion:a().int(),object:a().int(),audio:a().int()}),{kind:`mutation`,auth:`admin`}),pruneTracksBefore:T(i({deviceId:a(),cutoffMs:a()}),Xv,{kind:`mutation`,auth:`admin`}),wipeAllAnalytics:T(i({deviceId:a()}),Xv,{kind:`mutation`,auth:`admin`}),reconcileFromDisk:T(i({deviceId:a()}),Zv,{kind:`mutation`,auth:`admin`}),deleteTracks:T(i({deviceId:a(),trackIds:p(g()).min(1)}),i({deleted:a().int(),failed:p(g()).readonly()}),{kind:`mutation`,auth:`admin`}),setTrackFlags:T(i({deviceId:a(),trackId:g(),flags:G_}),K_,{kind:`mutation`}),getEventStoreFootprint:T(i({}),$v,{kind:`query`,auth:`admin`}),getEventMediaFootprintByKind:T(i({deviceId:a().int().optional()}),ty,{kind:`query`,auth:`admin`}),pruneEvents:T(i({olderThanMs:a(),reason:hi.optional()}),ny,{kind:`mutation`,auth:`admin`}),deleteDeviceEvents:T(i({deviceId:a()}),ny,{kind:`mutation`,auth:`admin`}),pauseForStorageMigration:T(j,i({paused:y(!0)}),{kind:`mutation`,auth:`admin`}),resumeForStorageMigration:T(j,i({resumed:y(!0)}),{kind:`mutation`,auth:`admin`}),refreshStorageLocationsForMigration:T(j,i({refreshed:y(!0)}),{kind:`mutation`,auth:`admin`}),startStorageMigrationMove:T(aa,i({jobId:g()}),{kind:`mutation`,auth:`admin`}),getStorageMigrationMoveStatus:T(i({jobId:g()}),Zi.nullable(),{auth:`admin`}),cancelStorageMigrationMove:T(i({jobId:g()}),i({cancelled:v()}),{kind:`mutation`,auth:`admin`}),relocateMedia:T(na,i({jobId:g()}),{kind:`mutation`,auth:`admin`}),countUnstampedEventMedia:T(i({}),ia,{auth:`admin`}),countRelocatableMedia:T(Ma,ja,{kind:`query`,auth:`admin`}),listRelocateMediaJobs:T(i({}),p(Zi).readonly(),{kind:`query`,auth:`admin`}),cancelRelocateMedia:T(i({jobId:g()}),i({cancelled:v()}),{kind:`mutation`,auth:`admin`}),listOpsLog:T(_i,p(gi).readonly(),{kind:`query`,auth:`admin`}),reclaimDebugMedia:T(cy,sy,{kind:`mutation`,auth:`admin`}),getMediaReclaimStatus:T(i({}),ly,{kind:`query`,auth:`admin`}),getTrainingExportSummary:T(i({deviceIds:p(a()).optional()}),Z_,{kind:`query`,auth:`admin`}),getTrainingExportUrl:T(i({deviceIds:p(a()).optional()}),i({url:g()}),{kind:`query`,auth:`admin`}),listRetrainStaging:T(i({deviceIds:p(a()).optional(),limit:a().int().min(1).max(500).optional()}),p(gv).readonly(),{kind:`query`,auth:`admin`}),listRetrainFrames:T(i({trackId:g()}),xv,{kind:`query`,auth:`admin`}),selectRetrainFrames:T(i({deviceId:a(),trackId:g(),mediaKeys:p(g()).min(1)}),bv,{kind:`mutation`,auth:`admin`}),deselectRetrainFrame:T(i({deviceId:a(),trackId:g(),frameId:g()}),i({removed:v(),removedAnnotations:a().int()}),{kind:`mutation`,auth:`admin`}),getRetrainFrameImage:T(i({frameId:g()}),i({base64:g(),width:a().int(),height:a().int()}),{kind:`query`,auth:`admin`}),proposeRetrainAnnotations:T(i({deviceId:a(),trackId:g(),frameId:g(),subject:Sv,nodeId:g().optional()}),Cv,{kind:`mutation`,auth:`admin`}),runReplayFrameProcessor:T(i({deviceId:a(),source:tv,zones:p(w_).readonly().optional(),detectionRules:p(X).readonly().optional(),zoneMembershipMinOverlap:a().min(0).max(1).optional(),frames:p(uy).min(1)}),dy,{kind:`mutation`,auth:`admin`}),listRetrainAnnotations:T(i({trackId:g()}),p(mv).readonly(),{kind:`query`,auth:`admin`}),saveRetrainAnnotations:T(i({deviceId:a(),trackId:g(),frameId:g(),annotations:p(hv)}),p(mv).readonly(),{kind:`mutation`,auth:`admin`}),completeRetrainTrack:T(i({deviceId:a(),trackId:g()}),wv,{kind:`mutation`,auth:`admin`}),restageRetrainTrack:T(i({deviceId:a(),trackId:g()}),wv,{kind:`mutation`,auth:`admin`}),getRetrainExportUrl:T(i({deviceIds:p(a()).optional()}),i({url:g()}),{kind:`query`,auth:`admin`}),getEventMedia:T(i({eventId:g(),kind:ov.optional(),deviceId:a()}),p(cv).readonly()),getTrackMedia:T(i({trackId:g(),kinds:p(ov).optional(),deviceId:a()}),p(cv).readonly()),listTrackMedia:T(i({trackId:g(),deviceId:a()}),p(lv).readonly()),listEventMedia:T(i({eventId:g(),deviceId:a()}),p(lv).readonly()),searchObjectEvents:T(Yv,p(Jv).readonly()),wipeObjectEmbeddings:T(i({}),iy,{kind:`mutation`,auth:`admin`}),rebuildObjectEmbeddings:T(ry,ay,{kind:`mutation`,auth:`admin`}),getObjectEmbeddingRebuildStatus:T(i({}),oy)},events:{onFrameTracked:{data:i({deviceId:a(),timestamp:a(),frameWidth:a(),frameHeight:a(),detections:p(qv).readonly()})},onTrackStarted:{data:i({deviceId:a(),trackId:g(),className:g()})},onTrackEnded:{data:i({deviceId:a(),trackId:g(),className:g(),durationMs:a()})},onDetectionEvent:{data:i({deviceId:a(),kind:D_,eventId:g(),timestamp:a()})}}},py=i({activeCameras:a(),throttledCameras:a(),avgInferenceTimeMs:a(),queueDepth:a()}),my=i({detectionMode:m([`disabled`,`always-on`,`on-motion`]),configuredFps:a(),actualFps:a(),queueDepth:a(),avgInferenceTimeMs:a(),droppedFrames:a(),phase:m([`idle`,`watching`,`active`])}),hy=my.extend({deviceId:a()}),gy=i({x:a(),y:a(),w:a(),h:a()}),_y=i({bytes:_(Uint8Array).optional(),jpeg:g().optional(),width:a().int().positive(),height:a().int().positive(),tier:m([`native`,`ram-fullframe`]).optional()}),vy=i({bbox:gy,className:g()}),yy=i({stepId:g(),className:g(),score:a(),bbox:gy.optional(),embedding:g().optional(),embeddingMagnitude:a().optional(),embeddingModelId:g().optional(),label:g().optional(),labelTier:c([y(1),y(2)]).optional(),labelModelId:g().optional(),alignedCropJpeg:g().optional(),nativeFaceShortSidePx:a().optional()}),by=m([`unknown-step`,`model-not-servable`,`unreadable-frame`,`execution-failed`]),xy=b(`kind`,[i({kind:y(`ran`),nodeId:g(),modelId:g(),details:p(yy)}),i({kind:y(`refused`),nodeId:g(),reason:by,detail:g()})]),Sy={min:0,max:6e4,default:3e4,step:500},Cy={min:0,max:6e5,default:12e4,step:5e3},wy={min:5e3,max:6e5,default:9e4,step:5e3},Ty={min:1,max:30,default:4,step:1},Ey={min:1,max:30,default:10,step:1},Dy={min:0,max:300,default:300,step:5},Oy={min:1,max:10,default:4,step:1},ky=m([`onboard`,`analyzer`,`device-activity`]),Ay=p(ky),jy=i({deviceId:a(),detected:v(),source:ky.default(`analyzer`),regions:p(sm).readonly().optional()}),My=b(`kind`,[i({kind:y(`local-broker`)}),i({kind:y(`remote-restream`),ownerNodeId:g(),ownerReachableHost:g().optional(),hubHostnameOverride:g().optional()})]).describe(`Per-camera frame-source mode for the runner (P2c)`),Ny=i({deviceKey:g(),weight:a().positive().default(1),maxSessions:a().int().positive().nullable().default(null)}),Py=i({deviceId:a(),detectionMode:m([`disabled`,`always-on`,`on-motion`]).default(`on-motion`),audioMode:m([`disabled`,`always-on`,`on-motion`]).default(`always-on`),motionCooldownMs:a().min(Sy.min).default(Sy.default),maxSessionHoldMs:a().min(Cy.min).max(Cy.max).optional(),audioMotionWindowMs:a().min(wy.min).max(wy.max).optional(),motionFps:a().min(Ty.min).max(Ty.max).default(Ty.default),detectionFps:a().min(Ey.min).max(Ey.max).default(Ey.default),motionStreamId:g(),detectionStreamId:g(),motionSources:Ay.default([`analyzer`]),pipelineEnabled:v().default(!0),steps:p(Y).readonly().optional(),audio:i({modelId:g().optional(),enabled:v()}).nullable().optional(),zones:p(w_).readonly().default([]),onboardMotionDrivesAnalyzer:v().default(!0),occupancyRecheckEnabled:v().default(!0),occupancyRecheckSec:a().min(Dy.min).max(Dy.max).default(Dy.default),occupancyRecheckFrames:a().min(Oy.min).max(Oy.max).default(Oy.default),frameSource:My.default({kind:`local-broker`}),deviceKey:g().optional(),inferenceDevices:p(Ny).readonly().optional()}),Fy=[{key:`motionSources`,type:`multiselect`,label:`Motion Sources`,default:[`analyzer`],options:[{value:`analyzer`,label:`Frame-diff Analyzer (motion addon)`},{value:`onboard`,label:`Camera Onboard Sensor`},{value:`device-activity`,label:`Device activity (the device says it is working)`}]},{key:`motionFps`,type:`slider`,label:`Motion FPS (analyzer)`,min:Ty.min,max:Ty.max,step:Ty.step,default:Ty.default,showValue:!0,unit:`fps`,nullable:!0,nullLabel:`Default`,showWhen:{field:`motionSources`,includes:`analyzer`}},{key:`detectionFps`,type:`slider`,label:`Detection FPS`,min:Ey.min,max:Ey.max,step:Ey.step,default:Ey.default,showValue:!0,unit:`fps`,nullable:!0,nullLabel:`Default`},{key:`motionCooldownMs`,type:`slider`,label:`Motion Cooldown`,description:`Time without a fresh motion event before the active phase ends. Applies to all motion sources — every motion event re-arms the timer.`,min:Sy.min,max:Sy.max,step:Sy.step,default:Sy.default,showValue:!0,unit:`s`,displayScale:1e3,nullable:!0,nullLabel:`Default`},{key:`maxSessionHoldMs`,type:`slider`,label:`Max session hold`,description:`Upper bound on how long detection keeps running past the motion cooldown while a subject is still moving in-frame but no longer triggering motion. Prevents the detection box from stopping on a slow-moving subject. Set to 0 to disable.`,min:Cy.min,max:Cy.max,step:Cy.step,default:Cy.default,showValue:!0,unit:`s`,displayScale:1e3,nullable:!0,nullLabel:`Default`},{key:`audioMotionWindowMs`,type:`slider`,label:`Audio window after motion`,description:`How long audio keeps being analysed after the last motion event. Each new motion event extends the window without restarting the audio stream.`,min:wy.min,max:wy.max,step:wy.step,default:wy.default,showValue:!0,unit:`s`,displayScale:1e3,nullable:!0,nullLabel:`Default`,showWhen:{field:`audioMode`,equals:`on-motion`}},{key:`onboardMotionDrivesAnalyzer`,type:`boolean`,label:`Run motion analyzer on onboard motion`,description:`When onboard motion is detected, temporarily start the frame-diff analyzer to emit zone results. Stops after the motion cooldown window.`,default:!0,showWhen:{field:`motionSources`,includes:`onboard`}},{key:`occupancyRecheckEnabled`,type:`boolean`,style:`checkbox`,label:`Occupancy re-check`,description:`Periodically re-sample a few frames during the watching phase, so objects that are simply parked are still counted (motion gating alone loses them after a restart). On by default at a wide interval; turn it off on cameras where the extra decoder re-dial is expensive.`,default:!0},{key:`occupancyRecheckSec`,type:`slider`,label:`Occupancy re-check interval`,description:`How often (in seconds) the runner re-samples a few frames to confirm the scene is truly empty during the watching phase.`,min:Dy.min,max:Dy.max,step:Dy.step,default:Dy.default,showValue:!0,unit:`s`,showWhen:{field:`occupancyRecheckEnabled`,equals:!0}},{key:`occupancyRecheckFrames`,type:`slider`,label:`Occupancy re-check frames`,description:`Number of frames sampled per occupancy re-check burst.`,min:Oy.min,max:Oy.max,step:Oy.step,default:Oy.default,showValue:!0,showWhen:{field:`occupancyRecheckEnabled`,equals:!0}}],Iy=i({nodeId:g(),attachedCameras:a(),activeCameras:a(),avgInferenceFps:a(),avgInferenceTimeMs:a(),queueDepthTotal:a(),devices:p(i({deviceKey:g(),backend:g(),attachedCameras:a(),queueDepthTotal:a()})).default([]),hardware:i({hasGpu:v(),inferenceBackend:g().optional(),cpuCores:a().optional()})}),Ly=i({framesDecoded:a(),framesAdmitted:a(),framesDroppedPixelFree:a(),viewsMaterialized:a(),viewsSkipped:a(),workerToRunnerBytes:a(),runnerToPoolRawBytes:a(),runnerToPoolJpegBytes:a(),onDemandFullFrameRequests:a(),onDemandCropRequests:a(),nativeHits:a(),nativeMisses:a(),tileHits:a(),tileMisses:a(),fallbackHits:a(),fallbackMisses:a(),retainedWritesAvoided:a(),residentRefs:a(),residentBytes:a(),releases:a(),evictions:a(),staleMisses:a()}),Ry=i({node:Ly,cameras:p(Ly.extend({deviceId:a()}))}),zy=i({nodeId:g(),activeCameras:a(),throttledCameras:a(),avgInferenceTimeMs:a(),queueDepth:a(),frameLazy:Ry.optional()}),By={name:`pipeline-runner`,scope:`system`,mode:`singleton`,methods:{attachCamera:T(Py,i({success:y(!0)}),{kind:`mutation`}),detachCamera:T(i({deviceId:a()}),i({success:y(!0)}),{kind:`mutation`}),reportMotion:T(jy,i({success:y(!0)}),{kind:`mutation`}),getLocalLoad:T(h(),Iy),getLocalMetrics:T(h(),zy),getCameraMetrics:T(i({deviceId:a()}),my.nullable()),getAllCameraMetrics:T(h(),p(hy).readonly()),getLocalCameras:T(h(),p(a()).readonly()),getNativeCrop:T(i({handle:w,bbox:gy,maxWidth:a().int().positive().optional(),encodeJpeg:v().optional()}),_y.nullable()),runDetailSubtree:T(i({deviceId:a(),frameHandle:w.optional(),frameJpeg:g().optional(),cropJpeg:g().optional(),parent:vy,steps:p(g()).optional()}),i({details:p(yy)}).nullable(),{kind:`mutation`}),runStatelessStep:T(i({stepId:g(),modelId:g(),frameJpeg:g(),bbox:gy,className:g(),sourceDeviceId:a()}),xy,{kind:`mutation`})}},Vy=i({engine:J.optional(),steps:p(Y).readonly(),audio:i({engine:J.optional(),modelId:g().optional(),enabled:v(),settings:n(g(),u()).readonly().optional()}).nullable().optional()}),Hy=i({id:g(),name:g(),description:g().optional(),config:Vy,createdAt:g(),updatedAt:g()}),Uy=i({modelId:g().optional(),settings:n(g(),u()).optional(),jumpDeviceKey:g().optional()}),Wy=i({maxCameras:a().int().nonnegative().nullable().default(null),detectWeight:a().positive().optional(),detect:v().optional(),decode:v().optional(),audio:v().optional(),ingest:v().optional(),decodeBudgetMb:a().int().min(1024).max(65536).optional(),maxLiveDecodeWorkers:a().int().min(1).max(32).optional(),reachableHost:g().optional(),inferenceDevices:n(g(),i({enabled:v(),weight:a().positive().optional(),maxSessions:a().int().positive().optional(),steps:n(g(),Uy).optional()})).optional()}),Gy=i({steps:p(Y).readonly(),audio:i({modelId:g(),enabled:v()}).nullable()}),Ky=i({modelId:g().optional(),settings:n(g(),u()).readonly().optional()}),qy=i({pinnedAgentNodeId:g().optional(),stepToggles:n(g(),v()).optional(),stepOverridesByDevice:n(g(),n(g(),n(g(),Ky))).optional(),pipelineByAgent:n(g(),Gy).optional()}),Jy=i({deviceId:a(),agentNodeId:g(),pinned:v(),reason:m([`manual`,`capacity`,`hardware-affinity`,`failover`,`rebalance`]),assignedAt:a()}),Yy=i({nodeId:g(),online:v(),load:Iy,score:a(),decodeHwaccel:g().nullable()}),Xy=i({totalAgents:a(),onlineAgents:a(),totalCameras:a(),attachedCameras:a(),activeCameras:a(),avgInferenceTimeMs:a(),queueDepth:a()}),Zy=n(g(),g()),Qy=i({ownerNodeId:g(),reachableHost:g().optional(),configIssue:g().optional()}),$y=i({camStreamId:g(),codec:g(),width:a(),height:a(),fps:a(),kind:g()}),eb=i({streams:p($y).readonly()}),tb=i({detectionNodeId:g().nullable(),decoderNodeId:g().nullable(),audioNodeId:g().nullable(),sourceNodeId:g().nullable(),pinned:i({detection:v(),decoder:v(),audio:v()}),reasons:i({detection:g().optional(),decoder:g().optional(),audio:g().optional()})}),nb=i({profile:g(),status:g(),codec:g(),width:a(),height:a(),subscribers:a(),inFps:a(),outFps:a()}),rb=i({profiles:p(nb).readonly(),webrtcSessions:a(),rtspRestream:v()}),ib=i({framesWritten:a(),getFrameHits:a(),getFrameMisses:a(),budgetMb:a()}),ab=i({nodeId:g(),formats:p(g()).readonly(),sessionCount:a(),shm:ib}),ob=i({enabled:v(),fps:a()}),sb=m([`idle`,`installing`,`verifying`,`ready`,`failed`]),cb=i({state:sb,error:g().optional()}),lb=m([`idle`,`watching`,`active`]),ub=i({nodeId:g(),engine:i({backend:g(),device:g()}),phase:lb,configuredFps:a(),actualFps:a(),queueDepth:a(),avgInferenceMs:a(),provisioning:cb}),db=i({nodeId:g(),enabled:v()}),fb=Oi,pb=i({mode:fb,active:v(),storageBytes:a()}),mb=m([`source`,`broker`,`detection`,`recording`,`switches`]),hb=m([`timeout`,`error`,`partial`]),gb=i({stage:mb,reason:hb,elapsedMs:a()}),_b=i({state:m([`idle`,`running`,`done`,`error`]),total:a().int().nonnegative(),completed:a().int().nonnegative(),currentDeviceId:a().int().nullable(),failed:p(a().int()).readonly(),mediaDropped:a().int().nonnegative(),tracks:a().int().nonnegative(),events:a().int().nonnegative(),startedAtMs:a().int().nullable(),finishedAtMs:a().int().nullable(),error:g().nullable()}),vb=i({deviceId:a(),assignment:tb,source:eb,broker:rb.nullable(),decoder:ab.nullable(),motion:ob.nullable(),detection:ub.nullable(),audio:db.nullable(),recording:pb.nullable(),switchedOff:p(Mr).readonly(),degraded:p(gb).readonly(),fetchedAt:a()}),yb=[`disabled`,`unavailable`,`cannot-host-camera-root`,`accelerator-preferred`],bb=m(yb),xb=i({key:g(),backend:g(),device:g(),format:m(is),available:v(),enabled:v(),weight:a(),maxSessions:a().nullable(),defaultModelId:g(),steps:n(g(),Uy).optional(),exclusion:bb.nullable()}),Sb=i({nodeId:g(),reachable:v(),devices:p(xb).readonly()}),Cb={name:`pipeline-orchestrator`,scope:`system`,mode:`singleton`,nodeIdMode:`data`,exposesDeviceSettings:!0,methods:{pauseForStorageMigration:T(j,i({paused:y(!0)}),{kind:`mutation`,auth:`admin`}),resumeForStorageMigration:T(j,i({resumed:y(!0)}),{kind:`mutation`,auth:`admin`}),assignPipeline:T(i({deviceId:a(),agentNodeId:g()}),i({success:y(!0)}),{kind:`mutation`,auth:`admin`}),unassignPipeline:T(i({deviceId:a()}),i({success:y(!0)}),{kind:`mutation`,auth:`admin`}),setPipelineDevicePin:T(i({deviceId:a(),deviceKey:g()}),i({success:y(!0)}),{kind:`mutation`,auth:`admin`}),getPipelineDevicePin:T(i({deviceId:a()}),i({deviceKey:g().nullable()})),rebalance:T(h(),i({migrated:a()}),{kind:`mutation`,auth:`admin`}),getPipelineAssignments:T(h(),p(Jy).readonly()),getPipelineAssignment:T(i({deviceId:a()}),Jy.nullable()),getAgentLoad:T(h(),p(Yy).readonly()),getGlobalMetrics:T(h(),Xy),getCameraMetrics:T(i({deviceId:a()}),my.nullable()),getCapabilityBindings:T(i({nodeId:g()}),Zy),setCapabilityBinding:T(i({nodeId:g(),capName:g(),addonId:g()}),i({success:y(!0)}),{kind:`mutation`,auth:`admin`}),getIngestOwner:T(h(),Qy),assignAudio:T(i({deviceId:a(),nodeId:g()}),i({success:y(!0)}),{kind:`mutation`,auth:`admin`}),unassignAudio:T(i({deviceId:a()}),i({success:y(!0)}),{kind:`mutation`,auth:`admin`}),getAudioAssignment:T(i({deviceId:a()}),i({nodeId:g(),pinned:v(),assignedAt:a()}).nullable()),getAudioNodeLoad:T(h(),p(i({nodeId:g(),deviceCount:a()}))),getAudioAssignments:T(h(),p(i({deviceId:a(),nodeId:g(),pinned:v(),assignedAt:a()}))),getAgentSettings:T(i({agentNodeId:g()}),Wy.nullable()),listAgentSettings:T(h(),p(i({nodeId:g(),settings:Wy})).readonly()),removeAgentSettings:T(i({agentNodeId:g()}),i({success:v(),removed:v()}),{kind:`mutation`,auth:`admin`}),setAgentMaxCameras:T(i({agentNodeId:g(),maxCameras:a().int().nonnegative().nullable()}),i({success:y(!0)}),{kind:`mutation`,auth:`admin`}),setAgentDetectWeight:T(i({agentNodeId:g(),detectWeight:a().positive().nullable()}),i({success:y(!0)}),{kind:`mutation`,auth:`admin`}),setAgentCapabilities:T(i({agentNodeId:g(),detect:v().nullable().optional(),audio:v().nullable().optional(),ingest:v().nullable().optional()}),i({success:y(!0)}),{kind:`mutation`,auth:`admin`}),setAgentDecodeLimits:T(i({agentNodeId:g(),decodeBudgetMb:a().int().min(1024).max(65536).nullable().optional(),maxLiveDecodeWorkers:a().int().min(1).max(32).nullable().optional()}),i({success:y(!0)}),{kind:`mutation`,auth:`admin`}),setAgentReachableHost:T(i({agentNodeId:g(),reachableHost:g().nullable()}),i({success:y(!0)}),{kind:`mutation`,auth:`admin`}),setAgentInferenceDevices:T(i({agentNodeId:g(),inferenceDevices:n(g(),i({enabled:v(),weight:a().positive().optional(),maxSessions:a().int().positive().optional(),steps:n(g(),Uy).optional()}))}),i({success:y(!0)}),{kind:`mutation`,auth:`admin`}),getNodeInferenceDevices:T(i({nodeId:g()}),Sb),resetNodePipelineDefaults:T(i({agentNodeId:g()}),i({success:y(!0),effectiveModelId:g().nullable(),clearedCameraOverrides:a()}),{kind:`mutation`,auth:`admin`}),getCameraSettings:T(i({deviceId:a()}),qy.nullable()),setCameraStepToggle:T(i({deviceId:a(),addonId:g(),enabled:v().nullable()}),i({success:y(!0)}),{kind:`mutation`,auth:`admin`}),getCameraStepOverrides:T(i({deviceId:a()}),n(g(),n(g(),n(g(),Ky))).nullable()),setCameraStepOverride:T(i({deviceId:a(),agentNodeId:g(),deviceKey:g(),addonId:g(),patch:Ky.nullable()}),i({success:y(!0)}),{kind:`mutation`,auth:`admin`}),setCameraPipelineForAgent:T(i({deviceId:a(),agentNodeId:g(),pipeline:Gy.nullable()}),i({success:y(!0)}),{kind:`mutation`,auth:`admin`}),resolvePipeline:T(i({deviceId:a(),agentNodeId:g().optional()}),Vy),getCameraSwitches:T(i({deviceId:a()}),Lr),setCameraSwitch:T(i({deviceId:a(),switchId:Mr,enabled:v()}),Lr,{kind:`mutation`,auth:`admin`}),getCameraStatus:T(i({deviceId:a()}),vb),getCameraStatuses:T(i({deviceIds:p(a()).optional()}),p(vb).readonly()),reconcileFromDisk:T(h(),_b,{kind:`mutation`,auth:`admin`}),getReconcileFromDiskStatus:T(h(),_b,{auth:`admin`}),listTemplates:T(h(),p(Hy).readonly()),saveTemplate:T(i({name:g(),description:g().optional(),config:Vy}),Hy,{kind:`mutation`,auth:`admin`}),updateTemplate:T(i({id:g(),name:g().optional(),description:g().optional(),config:Vy.optional()}),Hy,{kind:`mutation`,auth:`admin`}),deleteTemplate:T(i({id:g()}),i({success:y(!0)}),{kind:`mutation`,auth:`admin`})}},wb={motion:`motion`,audio:`audio`,person:`person`,vehicle:`vehicle`,animal:`animal`,package:`package`,door:`door`,pir:`pir`,smoke:`smoke`,water:`water`,button:`button`,generic:`generic`,gas:`smoke`,vibration:`generic`,tamper:`generic`,presence:`person`,lock:`generic`,siren:`generic`,switch:`generic`,doorbell:`button`};function Tb(e){return wb[e]??`generic`}var Eb={contact:`contact`,motion:`motion-sensor`,smoke:`smoke`,flood:`flood`,gas:`gas`,"carbon-monoxide":`carbon-monoxide`,vibration:`vibration`,tamper:`tamper`,presence:`presence`,"enum-sensor":`enum-sensor`,"event-emitter":`device-event`,"lock-control":`lock`,switch:`switch`,button:`button`,doorbell:`doorbell`};function Db(e,t){let n=rh[t];if(n===void 0)throw Error(`EVENT_KIND_BY_CAP: cap '${e}' maps to unknown taxonomy kind '${t}'`);return{...n,icon:Tb(n.iconId)}}var Ob=Object.freeze(Object.fromEntries(Object.entries(Eb).map(([e,t])=>[e,Db(e,t)]))),kb=Object.keys(Eb);function Ab(e,t){let n=rh[e];return n===void 0?null:{kind:n.kind,labelKey:n.labelKey,label:n.label,color:n.color,iconId:n.iconId,icon:Tb(n.iconId),category:n.category,parentKind:n.parentKind,level:n.level,source:{capName:t.capName,deviceId:t.deviceId}}}var jb=m([`workspace`,`baked`,`data-root`]),Mb=m([`idle`,`checking`,`staging`,`pending-restart`,`awaiting-confirmation`]),Nb=m([`in-sync`,`behind-patch`,`behind-series`,`ahead`,`unknown`]),Pb=i({state:Nb,seedVersion:g().nullable(),contractVersion:g().nullable(),contractSource:m([`registry`,`running`]).nullable(),message:g()}),Fb=i({fromVersion:g(),toVersion:g().nullable(),atMs:a(),reason:g()}),Ib=i({packageName:g(),runningVersion:g().nullable(),nodeRuntimeVersion:g().nullable(),activeVersion:g().nullable(),previousVersion:g().nullable(),seedVersion:g().nullable(),latestVersion:g().nullable(),updateAvailable:v(),bootMode:jb,updateState:Mb,pendingVersion:g().nullable(),rolledBack:Fb.nullable(),stateFileCorrupt:v(),lastCheckedAtMs:a().nullable(),imageContract:Pb.optional()}),Lb=i({packageName:g(),runningVersion:g().nullable(),latestVersion:g().nullable(),updateAvailable:v(),checkedAtMs:a(),error:g().nullable()}),Rb=i({accepted:v(),targetVersion:g().nullable(),restarting:v(),message:g()}),zb={name:`server-management`,scope:`system`,mode:`singleton`,methods:{getServerPackageStatus:T(h(),Ib,{auth:`admin`}),checkServerUpdate:T(h(),Lb,{kind:`mutation`,auth:`admin`}),applyServerUpdate:T(i({version:g().optional()}),Rb,{kind:`mutation`,auth:`admin`,timeoutMs:16*6e4}),rollbackServerUpdate:T(h(),Rb,{kind:`mutation`,auth:`admin`}),restartServer:T(h(),Rb,{kind:`mutation`,auth:`admin`})},mount:{kind:`server-provided`}},Bb=d(),Vb=i({to:c([Bb,p(Bb).min(1)]),cc:p(Bb).optional(),bcc:p(Bb).optional(),from:g().optional(),replyTo:g().optional(),subject:g(),text:g(),html:g().optional()}),Hb=i({messageId:g(),accepted:p(Bb).default([]),rejected:p(Bb).default([])}),Ub=i({ready:v(),host:g(),error:g().optional(),lastVerifiedAt:a().optional()}),Wb={name:`smtp-provider`,scope:`system`,mode:`collection`,internal:!0,providerKind:`email`,methods:{sendEmail:T(Vb,Hb,{kind:`mutation`,auth:`admin`,access:`create`}),verify:T(h(),Ub,{kind:`mutation`,auth:`admin`,access:`view`}),getStatus:T(h(),Ub,{auth:`admin`})}},Gb=i({base64:g(),contentType:g()}),Kb=i({lastCapturedAt:a().nullable(),cacheAgeMs:a().nullable(),lastBytes:a().nullable(),lastStreamId:g().nullable()}),qb={name:`snapshot`,scope:`device`,deviceNative:!0,mode:`singleton`,kind:`wrapper`,defaultActive:!0,deviceTypes:[D.Camera],exposesDeviceSettings:!0,methods:{getSnapshot:T(i({deviceId:a(),streamId:g().optional(),force:v().optional()}),Gb.nullable()),invalidateCache:T(i({deviceId:a()}),h(),{kind:`mutation`,auth:`admin`}),getSnapshotOverview:kt(i({deviceIds:p(a()).min(1).max(200)}),p(i({deviceId:a(),lastCapturedAt:a().nullable(),cacheAgeMs:a().nullable(),etag:g().nullable()}))),getDebugState:kt(i({deviceId:a()}),i({battery:i({sleeping:v(),lastUpdated:a(),lastContactAt:a().optional()}).nullable(),state:i({isBattery:v(),reason:m([`disabled`,`offline`,`sleeping`,`unreachable`,`waking`]).nullable()}),frame:i({capturedAt:a().nullable(),ageMs:a().nullable()}),waking:v()})),getSnapshotLinks:kt(i({targets:p(i({deviceId:a(),width:a().int().positive().optional()})).min(1).max(200)}),p(i({deviceId:a(),url:g().nullable(),capturedAt:a().nullable(),ageMs:a().nullable(),expiresAt:a().nullable(),width:a().nullable(),neverCaptured:v(),sleeping:v(),stateReason:m([`disabled`,`offline`,`sleeping`,`unreachable`,`waking`]).nullable(),battery:v()})))},status:{schema:Kb,kind:`poll`}},Jb=i({userId:g(),username:g(),isAdmin:v(),provider:g(),email:g().optional(),displayName:g().optional(),hubUrl:g().optional(),scopes:p(q).optional(),redirectUri:g().optional(),integrationId:g().optional(),jti:g().optional(),codeChallenge:g().optional(),sessionId:g().optional(),refreshTtl:c([a().int().positive(),y(`never`)]).optional()}),Yb={name:`sso-bridge`,scope:`system`,mode:`singleton`,internal:!0,methods:{signBridgeToken:T(i({claims:Jb,ttlSec:c([a().int().positive(),y(`never`)]).optional()}),i({token:g()}),{auth:`admin`}),verifyBridgeToken:T(i({token:g()}),Jb.nullable(),{auth:`admin`})}},Xb=b(`shouldSaveDiskSpace`,[i({providerId:g().min(1),displayName:g().min(1),configSchema:u(),nodeLocal:v(),shouldSaveDiskSpace:y(!0),minFreePercent:a().min(0).max(100)}),i({providerId:g().min(1),displayName:g().min(1),configSchema:u(),nodeLocal:v(),shouldSaveDiskSpace:y(!1),minFreePercent:y(null)})]),Zb={name:`storage`,scope:`system`,mode:`singleton`,methods:{resolve:T(i({location:N,relativePath:g()}),g()),write:T(i({location:N,relativePath:g(),data:_(Uint8Array)}),h(),{kind:`mutation`}),read:T(i({location:N,relativePath:g()}),_(Uint8Array)),exists:T(i({location:N,relativePath:g()}),v()),list:T(i({location:N,prefix:g().optional()}),p(g()).readonly()),delete:T(i({location:N,relativePath:g()}),h(),{kind:`mutation`}),getAvailableSpace:T(i({location:N}),a().nullable()),beginUpload:T(i({location:N,relativePath:g(),sizeBytes:a().optional()}),i({uploadId:g()}),{kind:`mutation`}),writeChunk:T(i({uploadId:g(),offset:a(),data:_(Uint8Array)}),h(),{kind:`mutation`}),finalizeUpload:T(i({uploadId:g()}),h(),{kind:`mutation`}),abortUpload:T(i({uploadId:g()}),h(),{kind:`mutation`}),beginDownload:T(i({location:N,relativePath:g()}),i({downloadId:g(),sizeBytes:a()}),{kind:`mutation`}),readChunk:T(i({downloadId:g(),offset:a(),length:a()}),_(Uint8Array)),endDownload:T(i({downloadId:g()}),h(),{kind:`mutation`}),listLocations:T(i({type:eo.optional()}),p(M).readonly()),listLocationDeclarations:T(h(),p(co).readonly()),upsertLocation:T(M.omit({createdAt:!0,updatedAt:!0}),M,{kind:`mutation`,auth:`admin`}),deleteLocation:T(i({id:g(),force:v().optional()}),h(),{kind:`mutation`,auth:`admin`}),listDrainProgress:T(h(),p(ao).readonly()),testLocation:T(i({id:g()}),i({ok:v(),error:g().optional()}),{auth:`admin`}),listProviders:T(h(),p(Xb).readonly()),testConfig:T(i({providerId:g(),locationId:g().optional(),config:n(g(),u())}),i({ok:v(),error:g().optional()}),{auth:`admin`})}},Qb=i({bytes:a().int().nonnegative()}),$b=i({reclaimedBytes:a().int().nonnegative(),exhausted:v()}),ex={name:`storage-evictable`,scope:`system`,mode:`collection`,internal:!0,methods:{getEvictableUsage:T(i({locationId:g()}),Qb,{auth:`admin`}),evict:T(i({locationId:g(),targetBytes:a().int().positive()}),$b,{kind:`mutation`,auth:`admin`})}},tx={name:`storage-migration`,scope:`system`,mode:`singleton`,methods:{plan:T(ua,va,{auth:`admin`}),start:T(ua,i({jobId:g()}),{kind:`mutation`,auth:`admin`}),status:T(i({jobId:g().optional()}),ha.nullable(),{auth:`admin`}),cancel:T(i({jobId:g()}),i({cancelled:v()}),{kind:`mutation`,auth:`admin`}),movers:T(i({}),p(ba).readonly(),{auth:`admin`}),residue:T(i({}),p(xa).readonly(),{auth:`admin`}),drain:T(Sa,i({jobId:g()}),{kind:`mutation`,auth:`admin`}),cleanupStart:T(Pa,i({jobId:g()}),{kind:`mutation`,auth:`admin`}),cleanupStatus:T(Ia,Fa.nullable(),{auth:`admin`}),cleanupCancel:T(i({jobId:g()}),i({cancelled:v()}),{kind:`mutation`,auth:`admin`}),history:T(i({}),p(ha).readonly(),{auth:`admin`})}},nx=i({locationId:g(),ownedBytes:a().int().nonnegative(),measuredAtMs:a().int().nonnegative()}),rx={name:`storage-occupancy`,scope:`system`,mode:`collection`,internal:!0,methods:{getOccupancy:T(i({locationIds:p(g()).readonly()}),p(nx).readonly(),{auth:`admin`})}},ix=b(`shouldSaveDiskSpace`,[i({providerId:g().min(1),displayName:g().min(1),configSchema:u(),nodeLocal:v(),shouldSaveDiskSpace:y(!0),minFreePercent:a().min(0).max(100)}),i({providerId:g().min(1),displayName:g().min(1),configSchema:u(),nodeLocal:v(),shouldSaveDiskSpace:y(!1),minFreePercent:y(null)})]),ax=i({ok:v(),error:g().optional()}),ox=i({location:M,relativePath:g(),sizeBytes:a().optional()}),sx=i({uploadId:g()}),cx=i({uploadId:g(),offset:a(),data:_(Uint8Array)}),lx=i({uploadId:g()}),ux=i({uploadId:g()}),dx=i({location:M,relativePath:g()}),fx=i({downloadId:g(),sizeBytes:a()}),px=i({downloadId:g(),offset:a(),length:a()}),mx=i({downloadId:g()}),hx={name:`storage-provider`,scope:`system`,mode:`collection`,internal:!0,methods:{getProviderInfo:T(h(),ix,{auth:`admin`}),testLocation:T(i({config:n(g(),u())}),ax,{auth:`admin`}),resolve:T(i({location:M,relativePath:g()}),g(),{auth:`admin`}),write:T(i({location:M,relativePath:g(),data:_(Uint8Array)}),h(),{kind:`mutation`,auth:`admin`}),read:T(i({location:M,relativePath:g()}),_(Uint8Array),{auth:`admin`}),exists:T(i({location:M,relativePath:g()}),v(),{auth:`admin`}),list:T(i({location:M,prefix:g().optional()}),p(g()).readonly(),{auth:`admin`}),delete:T(i({location:M,relativePath:g()}),h(),{kind:`mutation`,auth:`admin`}),getAvailableSpace:T(i({location:M}),a().nullable(),{auth:`admin`}),beginUpload:T(ox,sx,{kind:`mutation`,auth:`admin`}),writeChunk:T(cx,h(),{kind:`mutation`,auth:`admin`}),finalizeUpload:T(lx,h(),{kind:`mutation`,auth:`admin`}),abortUpload:T(ux,h(),{kind:`mutation`,auth:`admin`}),beginDownload:T(dx,fx,{kind:`mutation`,auth:`admin`}),readChunk:T(px,_(Uint8Array),{auth:`admin`}),endDownload:T(mx,h(),{kind:`mutation`,auth:`admin`})}},gx=u().nullable(),_x=n(g(),u()),vx=i({sessionId:g(),profileId:g(),label:g(),cols:a().int().positive(),rows:a().int().positive(),startedAt:a()}),yx=i({profileId:g(),label:g(),description:g().optional(),executable:g().optional(),args:p(g()).readonly().optional(),cwd:g().optional(),environment:p(g()).readonly().optional(),settingsSchema:gx.optional()}),bx=i({instanceId:g(),cameraStableId:g(),nodeId:g(),profileId:g(),profileLabel:g(),name:g(),enabled:v(),executable:g(),args:p(g()).readonly(),cwd:g(),environment:p(g()).readonly(),profileSettings:_x}),xx=i({stableId:g(),nodeId:g(),profileId:g(),profileLabel:g(),name:g(),adoptable:v()}),Sx=b(`kind`,[i({seq:a().int().positive(),kind:y(`data`),data:g()}),i({seq:a().int().positive(),kind:y(`exit`),exitCode:a().int(),signal:a().int().optional()})]),Cx=i({cursor:a().int().nonnegative(),reset:v(),snapshot:g().optional(),events:p(Sx).readonly()}),wx={name:`terminal-session`,scope:`system`,mode:`singleton`,methods:{listProfiles:T(h(),p(yx).readonly(),{auth:`admin`}),listInstances:T(h(),p(bx).readonly(),{auth:`admin`}),createInstance:T(i({targetNodeId:g().min(1),profileId:g().min(1),name:g().trim().min(1).max(160).optional(),executable:g().max(1024).optional(),args:p(g().max(2048)).max(64).optional(),cwd:g().max(1024).optional(),environment:p(g().max(4096)).max(64).optional(),profileSettings:_x.optional()}),bx,{kind:`mutation`,auth:`admin`}),updateInstance:T(i({instanceId:g().min(1),name:g().trim().min(1).max(160).optional(),executable:g().max(1024).optional(),args:p(g().max(2048)).max(64).optional(),cwd:g().max(1024).optional(),environment:p(g().max(4096)).max(64).optional(),profileSettings:_x.optional()}),bx,{kind:`mutation`,auth:`admin`}),deleteInstance:T(i({instanceId:g().min(1)}),h(),{kind:`mutation`,auth:`admin`}),setInstanceEnabled:T(i({instanceId:g().min(1),enabled:v()}),bx,{kind:`mutation`,auth:`admin`}),listLegacyCameras:T(h(),p(xx).readonly(),{auth:`admin`}),adoptLegacyMonitor:T(i({stableId:g().min(1),name:g().trim().min(1).max(160).optional()}),bx,{kind:`mutation`,auth:`admin`}),listSessions:T(h(),p(vx).readonly(),{auth:`admin`}),openSession:T(i({profileId:g(),cols:a().int().positive(),rows:a().int().positive(),executable:g().max(1024).optional(),args:p(g().max(2048)).max(64).optional(),cwd:g().max(1024).optional(),environment:p(g().max(4096)).max(64).optional()}),vx,{kind:`mutation`,auth:`admin`}),resize:T(i({sessionId:g(),cols:a().int().positive(),rows:a().int().positive()}),h(),{kind:`mutation`,auth:`admin`}),pullOutput:T(i({sessionId:g(),afterSeq:a().int().nonnegative(),waitMs:a().int().min(0).max(2e3).default(0),waitForOutput:v().optional()}),Cx,{kind:`mutation`,auth:`admin`,timeoutMs:15e3}),writeInput:T(i({sessionId:g(),data:g().max(64*1024)}),h(),{kind:`mutation`,auth:`admin`}),close:T(i({sessionId:g()}),h(),{kind:`mutation`,auth:`admin`})}},Tx=i({urls:c([g(),p(g())]),username:g().optional(),credential:g().optional()}),Ex={name:`turn-provider`,scope:`system`,mode:`collection`,methods:{getTurnServers:T(h(),p(Tx).readonly())}},Dx=i({credentialId:g(),label:g(),createdAt:a(),lastUsedAt:a().nullable(),transports:p(g()).default([])}),Ox={name:`user-passkeys`,scope:`system`,mode:`collection`,internal:!0,methods:{beginRegistration:T(i({userId:g(),username:g()}),i({optionsJSON:n(g(),u())}),{kind:`mutation`,auth:`admin`,access:`create`}),finishRegistration:T(i({userId:g(),response:n(g(),u()),label:g()}),i({success:y(!0),credentialId:g()}),{kind:`mutation`,auth:`admin`,access:`create`}),beginAuthentication:T(i({userId:g().optional()}),i({optionsJSON:n(g(),u())}),{kind:`mutation`,access:`view`,auth:`admin`}),finishAuthentication:T(i({userId:g(),response:n(g(),u())}),i({verified:v()}),{kind:`mutation`,access:`view`,auth:`admin`}),beginDiscoverableAuthentication:T(i({}),i({optionsJSON:n(g(),u())}),{kind:`mutation`,access:`view`,auth:`admin`}),finishDiscoverableAuthentication:T(i({response:n(g(),u())}),i({verified:v(),userId:g().nullable()}),{kind:`mutation`,access:`view`,auth:`admin`}),listPasskeys:T(i({userId:g()}),p(Dx),{auth:`admin`}),removePasskey:T(i({userId:g(),credentialId:g()}),i({success:y(!0)}),{kind:`mutation`,auth:`admin`,access:`delete`}),getSecondFactorPreference:T(i({userId:g()}),i({enabled:v()}),{auth:`admin`}),setSecondFactorPreference:T(i({userId:g(),enabled:v()}),i({success:y(!0)}),{kind:`mutation`,auth:`admin`,access:`create`})}},kx=m([`cosine`,`dot`,`euclidean`]),Ax=n(g(),c([g(),a(),v()])),jx=i({equals:n(g(),c([g(),a(),v()])).optional(),between:n(g(),s([a(),a()])).optional()}),Mx=i({id:g(),vector:g(),metadata:Ax}),Nx=i({id:g(),score:a(),metadata:Ax}),Px=i({index:g(),dim:a().int().positive(),metric:kx.default(`cosine`)}),Fx=i({index:g(),items:p(Mx)}),Ix=i({upserted:a(),rejected:a()}),Lx=i({index:g(),vector:g(),topK:a().int().positive(),minScore:a().optional(),filter:jx.optional()}),Rx=i({matches:p(Nx),scanned:a(),truncated:v(),effectiveTopK:a().int().positive()}),zx=i({index:g(),ids:p(g())}),Bx=i({index:g(),filter:jx}),Vx=i({deleted:a()}),Hx=i({index:g(),ids:p(g())}),Ux=i({items:p(i({id:g(),metadata:Ax}))}),Wx=i({index:g(),ids:p(g())}),Gx=i({items:p(i({id:g(),vector:g(),metadata:Ax}))}),Kx=i({index:g(),cursor:a().int().nonnegative().default(0),limit:a().int().positive()}),qx=i({items:p(i({id:g(),metadata:Ax})),nextCursor:a().int().nonnegative().nullable()}),Jx=i({index:g()}),Yx=i({backend:g(),count:a(),dim:a(),metric:kx,bytes:a().optional(),exact:v()}),Xx={name:`vector-store`,scope:`system`,mode:`singleton`,internal:!0,methods:{declareIndex:T(Px,h(),{kind:`mutation`,auth:`admin`}),upsert:T(Fx,Ix,{kind:`mutation`,auth:`admin`}),query:T(Lx,Rx,{auth:`admin`}),getByIds:T(Hx,Ux,{auth:`admin`}),fetchByIds:T(Wx,Gx,{auth:`admin`}),scan:T(Kx,qx,{auth:`admin`}),deleteByIds:T(zx,Vx,{kind:`mutation`,auth:`admin`}),deleteByFilter:T(Bx,Vx,{kind:`mutation`,auth:`admin`}),stats:T(Jx,Yx,{auth:`admin`})}},Zx=24,Qx=3,$x=i({id:g(),source:g(),kind:m([`motion`,`object`,`audio`,`native`]),timeRange:i({startMs:a(),endMs:a()}),labels:p(g()).max(3).optional(),thumbnail:g().optional(),stillAtMs:a().optional(),eventIds:p(g()).optional(),eventCount:a().int().nonnegative().optional(),holes:p(i({startMs:a(),endMs:a()})).optional()}),eS=i({playbackUrl:g(),playbackEndpoints:p(g()).optional(),token:g().optional()}),tS={name:`videoclips`,scope:`device`,mode:`singleton`,kind:`wrapper`,defaultActive:!0,deviceTypes:[D.Camera],methods:{listClips:T(i({deviceId:a(),since:a(),until:a(),limit:a().int().positive().optional()}),p($x).readonly(),{kind:`query`,auth:`admin`}),getClipPlayback:T(i({deviceId:a(),clipId:g()}),eS,{kind:`query`,auth:`admin`})}},nS=i({viewportWidth:a().int().positive().optional(),viewportHeight:a().int().positive().optional(),devicePixelRatio:a().positive().optional(),downlinkMbps:a().nonnegative().optional(),prefersTier:g().optional()}).partial(),rS=b(`kind`,[i({kind:y(`adaptive`)}),i({kind:y(`profile`),profile:S}),i({kind:y(`cam-stream`),camStreamId:g().min(1)})]),iS=i({id:g(),label:g(),target:rS,codec:g().nullable(),resolution:i({width:a(),height:a()}).nullable(),status:m([`idle`,`connecting`,`streaming`,`error`,`stopped`]).nullable(),inputFps:a().nullable(),decodeFps:a().nullable(),bitrateKbps:a().nullable()}),aS={name:`webrtc-session`,scope:`device`,mode:`singleton`,kind:`wrapper`,defaultActive:!0,preferredProvider:`stream-broker`,deviceTypes:[D.Camera],methods:{listStreams:T(i({deviceId:a().int().nonnegative()}),p(iS)),createSession:T(i({deviceId:a().int().nonnegative(),target:rS,hints:nS.optional(),relayOnly:v().optional(),consumerAttribution:xu.optional()}),i({sessionId:g(),sdpOffer:g()}),{kind:`mutation`}),handleOffer:T(i({deviceId:a().int().nonnegative(),target:rS.optional(),sdpOffer:g(),sessionId:g().optional(),relayOnly:v().optional(),nonTrickle:v().optional(),disableTurn:v().optional(),disableIpv6:v().optional(),consumerAttribution:xu.optional(),hints:nS.optional()}),i({sessionId:g(),sdpAnswer:g()}),{kind:`mutation`}),handleAnswer:T(i({deviceId:a().int().nonnegative(),sessionId:g(),sdpAnswer:g()}),h(),{kind:`mutation`}),addIceCandidate:T(i({deviceId:a().int().nonnegative(),sessionId:g(),candidate:g(),sdpMid:g().nullable().optional(),sdpMLineIndex:a().int().nullable().optional()}),h(),{kind:`mutation`}),getIceCandidates:T(i({deviceId:a().int().nonnegative(),sessionId:g()}),i({candidates:p(i({candidate:g(),sdpMid:g().nullable(),sdpMLineIndex:a().int().nullable()})),done:v()}),{kind:`query`}),closeSession:T(i({deviceId:a().int().nonnegative(),sessionId:g()}),h(),{kind:`mutation`}),hasAdaptiveBitrate:T(i({deviceId:a().int().nonnegative(),profile:S}),v()),getSessionState:T(i({deviceId:a().int().nonnegative(),sessionId:g()}),i({pendingRenegotiation:i({target:rS,epoch:a()}).nullable()}))},mount:{kind:`server-provided`}},oS=i({childDeviceIds:p(a()).readonly(),hiddenChildIds:p(a()).readonly()}),sS={name:`accessories`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[D.Camera,D.Hub,D.Switch,D.Light,D.Sensor,D.Thermostat,D.Cover,D.Lock,D.Fan,D.MediaPlayer,D.AlarmPanel,D.Generic],methods:{setChildHidden:T(i({deviceId:a().int().nonnegative(),childDeviceId:a().int().nonnegative(),hidden:v()}),h(),{kind:`mutation`,auth:`admin`})},events:{onAccessoriesChanged:{data:i({deviceId:a(),childDeviceIds:p(a()).readonly(),hiddenChildIds:p(a()).readonly()})},onChildVisibilityChanged:{data:i({deviceId:a(),childDeviceId:a(),hidden:v()})}},status:{schema:oS,kind:`command-driven`}},cS=m([`install`,`update`,`uninstall`,`restart`]),lS=m([`queued`,`fetching`,`staged`,`validating`,`applying`,`restarting`,`applied`,`done`,`failed`,`skipped`]),uS=m([`framework`,`addon`]),dS=i({tsMs:a(),nodeId:g(),packageName:g(),phase:lS,message:g()}),fS=i({taskId:g(),nodeId:g(),packageName:g(),fromVersion:g().nullable(),toVersion:g(),target:uS,phase:lS,stagedPath:g().nullable(),attempts:a(),steps:p(dS),error:g().nullable(),startedAtMs:a().nullable(),finishedAtMs:a().nullable()}),pS=m([`running`,`completed`,`failed`,`partially-failed`,`cancelled`]),mS=m([`single`,`bulk`,`cluster`]),hS=i({jobId:g(),kind:cS,createdAtMs:a(),createdBy:g(),scope:mS,tasks:p(fS),state:pS,schemaVersion:y(1)}),gS=m([`debug`,`info`,`warn`,`error`]),_S=m([`off`,`latest`,`beta`]),vS=m([`off`,`latest`,`beta`,`inherit`]),yS=i({id:g(),name:g().optional(),version:g().optional(),description:g().optional(),icon:g().optional(),color:g().optional(),capabilities:p(u()).readonly().optional(),packageName:g(),packageVersion:g(),packageDisplayName:g().optional(),bundle:i({displayName:g(),description:g().optional(),icon:g().optional()}).optional(),protected:v().optional(),removable:v().optional()}),bS=i({pid:a().optional(),mode:g(),state:g()}),xS=i({phase:m([`pending`,`healthy`,`failed`]),retryCount:a(),firstFailureAt:a().nullable(),lastAttemptAt:a().nullable(),lastError:i({message:g(),stack:g().optional()}).nullable(),nextRetryAt:a().nullable(),alertEmitted:v(),retrying:v(),inGracePeriod:v()}),SS=i({manifest:yS,declaration:u().optional(),source:g(),installSource:g().optional(),process:bS.optional(),hasBackup:v().optional(),health:xS.nullable().optional()}),CS=i({name:g(),version:g(),dir:g(),installSource:g().optional()}),wS=i({name:g(),currentVersion:g(),latestVersion:g(),category:m([`addon`,`core`]),requiresRestart:v(),isSystem:v()}),TS=i({version:g(),publishedAt:g(),deprecated:g().optional(),distTags:p(g()).readonly()}),ES=i({name:g(),version:g(),description:g(),keywords:p(g()).readonly(),publishedAt:g(),author:g(),installed:v(),installedVersion:g().optional()}),DS=i({channel:_S,intervalSeconds:a(),updateCheckIntervalSeconds:a()}),OS=vS,kS=u(),AS=u(),jS=u(),MS=m([`queued`,`updating`,`done`,`done-pending-restart`,`failed`]),NS=i({name:g(),isSystem:v(),fromVersion:g(),toVersion:g(),status:MS,error:g().optional(),startedAtMs:a().optional(),completedAtMs:a().optional()}),PS=m([`regular`,`system`,`restarting`,`finalizing`]);i({id:g(),nodeId:g(),startedAtMs:a(),completedAtMs:a().optional(),total:a(),completed:a(),failed:a(),current:g().nullable(),phase:PS,cancelled:v(),items:p(NS).readonly()});var FS=i({packageName:g(),currentVersion:g(),latestVersion:g().nullable(),hasUpdate:v(),description:g().optional(),buildId:g().nullable()}),IS=i({timestamp:g(),level:g(),message:g(),scope:g().optional()}),LS=u(),RS=i({addonId:g().min(1),action:g().min(1),input:u()}),zS={name:`addons`,scope:`system`,mode:`singleton`,nodeIdMode:`data`,methods:{list:T(h(),p(SS).readonly()),getLogs:T(i({addonId:g(),limit:a().min(1).max(500).default(100),level:gS.optional()}),p(LS)),listPackages:T(h(),p(CS).readonly()),installPackage:T(i({packageName:g(),version:g().optional()}),AS,{kind:`mutation`,auth:`admin`}),installFromWorkspace:T(i({packageName:g()}),AS,{kind:`mutation`,auth:`admin`}),isWorkspaceAvailable:T(h(),v()),listWorkspacePackages:T(h(),p(u()).readonly()),uninstallPackage:T(i({packageName:g()}),u(),{kind:`mutation`,auth:`admin`}),reloadPackages:T(h(),jS,{kind:`mutation`,auth:`admin`}),searchAvailable:T(i({query:g().optional()}),p(ES)),listUpdates:T(i({nodeId:g().optional()}),p(wS).readonly(),{auth:`admin`}),updatePackage:T(i({name:g().min(1),version:g().optional(),nodeId:g().optional()}),u(),{kind:`mutation`,auth:`admin`}),rollbackPackage:T(i({name:g().min(1)}),i({rolledBackTo:g().nullable()}),{kind:`mutation`,auth:`admin`}),forceRefresh:T(i({nodeId:g().optional()}),u(),{kind:`mutation`,auth:`admin`}),restartServer:T(i({confirm:y(!0)}),u(),{kind:`mutation`,auth:`admin`}),getLastRestart:T(h(),i({kind:m([`framework-update`,`manual`,`system`,`framework-bulk-update`]),packageName:g().optional(),fromVersion:g().optional(),toVersion:g().optional(),requestedBy:g().optional(),requestedAt:a()}).nullable(),{auth:`admin`}),listFrameworkPackages:T(h(),p(FS).readonly(),{auth:`admin`}),listCapabilityProviders:T(i({capName:g().min(1)}),p(i({addonId:g(),mode:m([`singleton`,`collection`]),isActive:v()})).readonly()),setCapabilityProviderEnabled:T(i({capName:g().min(1),addonId:g().min(1),enabled:v()}),i({success:y(!0)}),{kind:`mutation`,auth:`admin`}),getVersions:T(i({name:g()}),p(TS).readonly()),restartAddon:T(i({addonId:g()}),kS,{kind:`mutation`,auth:`admin`}),retryLoad:T(i({packageName:g()}),i({success:y(!0)}),{kind:`mutation`,auth:`admin`}),getAutoUpdateSettings:T(h(),DS,{auth:`admin`}),setAutoUpdateSettings:T(i({channel:_S,intervalSeconds:a().min(300).max(86400).optional(),updateCheckIntervalSeconds:a().min(900).max(604800).optional()}),u(),{kind:`mutation`,auth:`admin`}),getAddonAutoUpdate:T(i({addonId:g()}),OS,{auth:`admin`}),setAddonAutoUpdate:T(i({addonId:g(),channel:vS}),u(),{kind:`mutation`,auth:`admin`}),applyAutoUpdateToAll:T(i({channel:_S}),i({success:y(!0)}),{kind:`mutation`,auth:`admin`}),custom:T(RS,u(),{kind:`mutation`}),startJob:T(i({kind:m([`install`,`update`,`uninstall`,`restart`]),targets:p(i({name:g().min(1),version:g().min(1)})).min(1),nodeIds:p(g()).optional()}),i({jobId:g()}),{kind:`mutation`,auth:`admin`}),getJob:T(i({jobId:g()}),hS.nullable(),{auth:`admin`}),listJobs:T(i({activeOnly:v().optional()}),p(hS),{auth:`admin`}),cancelJob:T(i({jobId:g()}),i({cancelled:v()}),{kind:`mutation`,auth:`admin`}),onAddonLogs:T(i({addonId:g(),level:gS.optional()}),IS,{kind:`subscription`})},mount:{kind:`server-provided`}},BS=i({co2Ppm:a().min(0).optional(),vocPpb:a().min(0).optional(),pm25:a().min(0).optional(),pm10:a().min(0).optional(),aqi:a().optional(),lastFetchedAt:a(),unit:g().optional(),precision:a().int().min(0).max(10).optional()}),VS={name:`air-quality-sensor`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[D.Sensor],methods:{},status:{schema:BS,kind:`push`},runtimeState:BS,durability:`restored`,volatileStateFields:[`lastFetchedAt`]},HS=i({lux:a().min(0),lastFetchedAt:a(),unit:g().optional(),precision:a().int().min(0).max(10).optional()}),US={name:`ambient-light-sensor`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[D.Sensor],methods:{},status:{schema:HS,kind:`push`},runtimeState:HS,durability:`restored`,volatileStateFields:[`lastFetchedAt`]},WS=i({className:g(),hits:a().int().nonnegative(),avgScore:a().min(0).max(1),peakScore:a().min(0).max(1)}),GS=i({ts:a().int(),windowSec:a().int().positive(),level:i({rms:a(),dbfs:a()}),peakDbfs:a(),avgDbfs:a(),current:i({className:g(),score:a().min(0).max(1),timestamp:a().int()}).nullable(),byClass:p(WS).readonly()}),KS=i({ts:a().int(),dbfs:a().nullable(),peakDbfs:a(),avgDbfs:a(),topClass:g().nullable(),topScore:a().min(0).max(1).nullable()}),qS=i({points:p(KS).readonly(),effectiveSampleEveryMs:a().int().positive(),windowMsActual:a().int().nonnegative()}),JS={name:`audio-metrics`,scope:`device`,mode:`singleton`,deviceTypes:[D.Camera],methods:{getCurrentSnapshot:T(i({deviceId:a()}),GS.nullable()),getHistory:T(i({deviceId:a(),windowSec:a().int().positive().optional(),sampleEveryMs:a().int().positive().optional()}),qS)},runtimeState:GS,durability:`session`},YS=i({enabled:v(),isRunning:v(),lastTriggeredAt:a(),lastError:g().nullable(),lastChangedAt:a()}),XS={name:`automation-control`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[D.Automation],methods:{enable:T(i({deviceId:a().int().nonnegative()}),h(),{kind:`mutation`,auth:`admin`}),disable:T(i({deviceId:a().int().nonnegative()}),h(),{kind:`mutation`,auth:`admin`}),trigger:T(i({deviceId:a().int().nonnegative(),skipCondition:v().optional()}),h(),{kind:`mutation`,auth:`admin`})},status:{schema:YS,kind:`push`},runtimeState:YS,durability:`session`},ZS=i({percentage:a().min(0).max(100).nullable(),charging:m([`dc`,`solar`,`none`,`unknown`]),sleeping:v(),lastUpdated:a(),lastContactAt:a().optional(),binary:v().optional()}),QS={name:`battery`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[D.Camera,D.Sensor,D.Button,D.Switch],methods:{wakeForStream:T(i({deviceId:a(),timeoutMs:a().int().min(500).max(3e4).default(8e3)}),i({awoke:v(),durationMs:a()}),{kind:`mutation`})},events:{onStatusChanged:{data:i({deviceId:a(),status:ZS})}},status:{schema:ZS,kind:`push`,empty:{percentage:0,charging:`unknown`,sleeping:!1,lastUpdated:0}},runtimeState:ZS,durability:`restored`,volatileStateFields:[`lastUpdated`]},$S=i({on:v(),lastChangedAt:a()}),eC={name:`binary`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[D.Sensor],methods:{},status:{schema:$S,kind:`push`},runtimeState:$S,durability:`restored`,volatileStateFields:[`lastChangedAt`]},tC=i({percentage:a().min(0).max(100),lastChangedAt:a()}),nC={name:`brightness`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[D.Light],methods:{setBrightness:T(i({deviceId:a().int().nonnegative(),percentage:a().min(0).max(100)}),h(),{kind:`mutation`,auth:`admin`})},events:{onBrightnessChanged:{data:i({deviceId:a(),percentage:a().min(0).max(100),lastChangedAt:a()})}},status:{schema:tC,kind:`command-driven`},runtimeState:tC,durability:`session`},rC={name:`button`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[D.Button],methods:{press:T(i({deviceId:a().int().nonnegative()}),h(),{kind:`mutation`,auth:`admin`})}},iC=i({host:g(),port:a().int().positive().optional(),onvifPort:a().int().positive().optional(),rtspPort:a().int().positive().optional(),https:v().optional(),username:g().optional(),password:g().optional(),onvifProfile:g().optional()}),aC=i({host:g(),port:a().int().positive().nullable(),onvifPort:a().int().positive().nullable(),rtspPort:a().int().positive().nullable(),https:v().nullable(),hasUsername:v(),hasPassword:v(),onvifProfile:g().nullable()}),oC={name:`camera-credentials`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[D.Camera],methods:{getCredentials:T(i({deviceId:a()}),iC.nullable(),{kind:`query`,auth:`admin`})},status:{schema:aC,kind:`command-driven`}},sC=i({detected:v(),lastChangedAt:a()}),cC={name:`carbon-monoxide`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[D.Sensor],methods:{},status:{schema:sC,kind:`push`},runtimeState:sC,durability:`restored`,volatileStateFields:[`lastChangedAt`]},lC=m([`off`,`heat`,`cool`,`auto`,`heat_cool`,`fan_only`,`dry`]),uC=i({mode:lC,availableModes:p(lC),fanMode:g(),availableFanModes:p(g()),preset:g(),availablePresets:p(g()),target:a().nullable(),targetHigh:a().nullable(),targetLow:a().nullable(),targetHumidity:a().min(0).max(100).nullable(),currentTemp:a().nullable(),currentHumidity:a().min(0).max(100).nullable(),swingVertical:v().nullable(),swingHorizontal:v().nullable(),lastFetchedAt:a()}),dC={name:`climate-control`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[D.Thermostat,D.Climate],methods:{setMode:T(i({deviceId:a().int().nonnegative(),mode:lC}),h(),{kind:`mutation`,auth:`admin`}),setFanMode:T(i({deviceId:a().int().nonnegative(),fanMode:g().min(1)}),h(),{kind:`mutation`,auth:`admin`}),setPreset:T(i({deviceId:a().int().nonnegative(),preset:g().min(1)}),h(),{kind:`mutation`,auth:`admin`}),setTarget:T(i({deviceId:a().int().nonnegative(),target:a()}),h(),{kind:`mutation`,auth:`admin`}),setTargetRange:T(i({deviceId:a().int().nonnegative(),targetLow:a(),targetHigh:a()}),h(),{kind:`mutation`,auth:`admin`}),setTargetHumidity:T(i({deviceId:a().int().nonnegative(),targetHumidity:a().min(0).max(100)}),h(),{kind:`mutation`,auth:`admin`}),setSwingVertical:T(i({deviceId:a().int().nonnegative(),on:v()}),h(),{kind:`mutation`,auth:`admin`}),setSwingHorizontal:T(i({deviceId:a().int().nonnegative(),on:v()}),h(),{kind:`mutation`,auth:`admin`})},status:{schema:uC,kind:`push`},runtimeState:uC,durability:`session`},fC=i({r:a().int().min(0).max(255),g:a().int().min(0).max(255),b:a().int().min(0).max(255)}),pC=i({h:a().min(0).max(360),s:a().min(0).max(100),v:a().min(0).max(100)}),mC=b(`mode`,[i({mode:y(`rgb`),rgb:fC}),i({mode:y(`hsv`),hsv:pC}),i({mode:y(`mired`),mireds:a().int().min(50).max(1e3)})]),hC=i({mode:m([`rgb`,`hsv`,`mired`]),rgb:fC.optional(),hsv:pC.optional(),mireds:a().int().optional(),lastChangedAt:a()}),gC={name:`color`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[D.Light],methods:{setColor:T(i({deviceId:a().int().nonnegative(),color:mC}),h(),{kind:`mutation`,auth:`admin`})},events:{onColorChanged:{data:i({deviceId:a(),mode:m([`rgb`,`hsv`,`mired`]),rgb:fC.optional(),hsv:pC.optional(),mireds:a().int().optional(),lastChangedAt:a()})}},status:{schema:hC,kind:`command-driven`},runtimeState:hC,durability:`session`},_C=2e4,vC=b(`outcome`,[i({outcome:y(`validated`),latencyMs:a().nonnegative().optional(),detail:g().optional()}).strict(),i({outcome:y(`rejected`),error:g()}).strict(),i({outcome:y(`inconclusive`),error:g()}).strict()]),yC=i({settings:n(g(),u())}),bC=i({label:g()}),xC={name:`connection-test`,scope:`system`,mode:`collection`,methods:{testSettings:T(yC,vC,{kind:`mutation`,auth:`admin`}),describeTest:T(h(),bC,{auth:`admin`})}},SC=i({connected:v(),lastChangedAt:a()}),CC={name:`connectivity`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[D.Sensor],methods:{},status:{schema:SC,kind:`push`},runtimeState:SC,durability:`restored`,volatileStateFields:[`lastChangedAt`]},wC=i({key:g().min(1),label:g().min(1),level:a().min(0).max(100).nullable(),status:m([`ok`,`replace`]).nullable(),lastResetAt:a().nullable(),resettable:v()}),TC=i({items:p(wC),lastChangedAt:a()}),EC={name:`consumables`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:Object.values(D),deviceConfig:{ui:{kind:`widget`,widgetId:`host/consumables-panel`,tab:`consumables`,topTab:!0,label:`Consumables`,order:5}},methods:{reset:T(i({deviceId:a().int().nonnegative(),key:g().min(1)}),h(),{kind:`mutation`,auth:`admin`})},status:{schema:TC,kind:`push`,empty:{items:[],lastChangedAt:0},itemArray:{path:`items`,keyField:`key`,labelField:`label`,itemSchema:wC,emptyItem:{key:``,label:``,level:null,status:null,lastResetAt:null,resettable:!1}}},runtimeState:TC.extend({lastFetchedAt:a()}),durability:`session`},DC=i({entryOpen:v(),lastChangedAt:a()}),OC={name:`contact`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[D.Sensor],methods:{},status:{schema:DC,kind:`push`},runtimeState:DC,durability:`restored`,volatileStateFields:[`lastChangedAt`]},kC=m([`numeric`,`select`,`text`,`datetime`]),AC=i({kind:kC,value:c([a(),g()]),options:p(g()),lastChangedAt:a(),unit:g().optional(),min:a().optional(),max:a().optional(),step:a().optional(),precision:a().int().min(0).max(10).optional(),format:m([`date`,`time`,`datetime`]).optional()}),jC=b(`kind`,[i({kind:y(`numeric`),value:a()}),i({kind:y(`select`),value:g().min(1)}),i({kind:y(`text`),value:g()}),i({kind:y(`datetime`),value:g().min(1)})]),MC={name:`control`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[D.Control],methods:{setValue:T(i({deviceId:a().int().nonnegative(),control:jC}),h(),{kind:`mutation`,auth:`admin`})},status:{schema:AC,kind:`push`},runtimeState:AC,durability:`session`},NC=m([`open`,`opening`,`closing`,`closed`,`stopped`]),PC=i({state:NC,position:a().min(0).max(100).nullable(),tiltPosition:a().min(0).max(100).nullable(),lastChangedAt:a()}),FC={name:`cover`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[D.Cover],methods:{open:T(i({deviceId:a().int().nonnegative()}),h(),{kind:`mutation`,auth:`admin`}),close:T(i({deviceId:a().int().nonnegative()}),h(),{kind:`mutation`,auth:`admin`}),stop:T(i({deviceId:a().int().nonnegative()}),h(),{kind:`mutation`,auth:`admin`}),setPosition:T(i({deviceId:a().int().nonnegative(),position:a().min(0).max(100)}),h(),{kind:`mutation`,auth:`admin`}),setTiltPosition:T(i({deviceId:a().int().nonnegative(),tiltPosition:a().min(0).max(100)}),h(),{kind:`mutation`,auth:`admin`})},status:{schema:PC,kind:`push`},runtimeState:PC,durability:`restored`,volatileStateFields:[`lastChangedAt`]},IC=m([`auto`,`day`,`night`,`schedule`]),LC=i({min:a(),max:a(),step:a()}),RC=i({mode:IC,sensitivity:a().optional(),switchDelaySec:a().optional(),lastFetchedAt:a()}),zC=i({modes:p(IC),supportsSensitivity:v(),sensitivity:LC.optional(),supportsSwitchDelay:v(),switchDelaySec:LC.optional()}),BC=i({mode:IC.optional(),sensitivity:a().optional(),switchDelaySec:a().optional()}),VC={name:`day-night`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[D.Camera],deviceConfig:{ui:{kind:`derived-form`,builderId:`day-night`,tab:`image`}},methods:{getOptions:T(i({deviceId:a()}),zC),setSettings:T(i({deviceId:a(),settings:BC}),h(),{kind:`mutation`,auth:`admin`})},status:{schema:RC,kind:`poll`},runtimeState:RC,durability:`restored`,volatileStateFields:[`lastFetchedAt`]},HC=i({online:v(),lastChangedAt:a()}),UC={name:`device-status`,scope:`device`,deviceNative:!0,mode:`singleton`,methods:{},events:{onStatusChanged:{data:i({deviceId:a(),status:HC})}},status:{schema:HC,kind:`push`},runtimeState:HC,durability:`restored`,volatileStateFields:[`lastChangedAt`]},WC=i({lastPressedAt:a().nullable(),pressCountSinceStart:a()}),GC=i({deviceId:a(),timestamp:a()}),KC={name:`doorbell`,scope:`device`,deviceNative:!0,mode:`singleton`,kind:`wrapper`,defaultActive:!1,deviceTypes:[D.Button,D.Camera],exposesDeviceSettings:!0,methods:{},events:{onPressed:{data:GC}},status:{schema:WC,kind:`push`},runtimeState:WC,durability:`restored`},qC=m([`date`,`time`,`datetime`]),JC=i({value:g(),format:qC.optional(),lastFetchedAt:a()}),YC={name:`enum-sensor`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[D.Sensor],methods:{},status:{schema:JC,kind:`push`},runtimeState:JC,durability:`restored`,volatileStateFields:[`lastFetchedAt`]},XC=i({deviceId:a(),eventType:g(),data:n(g(),u()).nullable(),timestamp:a(),seq:a()}),ZC=i({eventTypes:p(g()),lastEvent:XC.nullable(),eventCountSinceStart:a()}),QC={name:`event-emitter`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[D.EventEmitter],methods:{},events:{onEvent:{data:XC}},status:{schema:ZC,kind:`push`},runtimeState:ZC,durability:`session`},$C=i({id:g(),type:g(),timestamp:a(),label:g().optional(),thumbnailUrl:g().optional(),clipUrl:g().optional(),metadata:n(g(),u()).optional()}),ew={name:`events`,scope:`device`,mode:`singleton`,deviceTypes:[D.Camera],methods:{getEvents:T(i({deviceId:a(),from:a().optional(),to:a().optional(),limit:a().optional()}),p($C)),getEventThumbnail:T(i({deviceId:a(),eventId:g()}),i({base64:g(),contentType:g()}).nullable()),getEventClipUrl:T(i({deviceId:a(),eventId:g()}),g().nullable())}},tw=i({id:g(),name:g(),sampleCount:a().int().nonnegative(),coverMediaKey:g().optional(),coverBase64:g().optional()}),nw=i({id:g(),source:m([`detected`,`photo`]),addedAt:a().int(),deviceId:a().int().optional(),base64:g().optional()}),rw=i({faceId:g(),deviceId:a().int(),trackId:g(),timestamp:a().int(),recognizedIdentityId:g().optional(),identityName:g().optional(),assigned:v(),base64:g().optional(),cropUrl:g().optional(),faceBbox:V.optional(),keyFrameMediaKey:g().optional(),bestMatchScore:a().optional(),nativeFaceShortSidePx:a().optional(),suggestedIdentityId:g().optional(),suggestedMatchScore:a().optional()}),iw=m([`unassigned`,`recognized`,`identified`,`all`]),aw=m([`timestamp`,`suggestionConfidence`]),ow=m([`asc`,`desc`]),sw=i({faceIds:p(g()).readonly(),representativeFaceId:g(),size:a().int(),cohesion:a()}),cw=i({key:g(),kind:g(),url:g(),sizeBytes:a(),timestamp:a()}),lw={name:`face-gallery`,scope:`system`,mode:`singleton`,methods:{listIdentities:T(i({includeCrops:v().optional()}).optional(),p(tw).readonly()),createIdentity:T(i({name:g().min(1)}),tw,{kind:`mutation`,auth:`admin`}),renameIdentity:T(i({id:g(),name:g().min(1)}),h(),{kind:`mutation`,auth:`admin`}),deleteIdentity:T(i({id:g()}),h(),{kind:`mutation`,auth:`admin`}),listIdentitySamples:T(i({identityId:g()}),p(nw).readonly()),removeSample:T(i({identityId:g(),sampleId:g()}),h(),{kind:`mutation`,auth:`admin`}),listRecentFaces:T(i({deviceId:a().int().optional(),deviceIds:p(a().int()).optional(),limit:a().int().positive().optional(),filter:iw.optional(),since:a().int().optional(),until:a().int().optional(),sortBy:aw.optional(),sortDirection:ow.optional(),includeCrops:v().optional()}).optional(),p(rw).readonly()),getFaceByTrack:T(i({deviceId:a().int(),trackId:g()}),rw.nullable()),getFaceMedia:T(i({faceId:g()}),p(cw).readonly()),assignFace:T(i({faceId:g(),identityId:g()}),h(),{kind:`mutation`,auth:`admin`}),unassignFace:T(i({faceId:g()}),h(),{kind:`mutation`,auth:`admin`}),deleteFace:T(i({faceId:g()}),h(),{kind:`mutation`,auth:`admin`}),assignFaces:T(i({faceIds:p(g()).min(1),identityId:g()}),i({assigned:a().int(),failed:p(g()).readonly()}),{kind:`mutation`,auth:`admin`}),unassignFaces:T(i({faceIds:p(g()).min(1)}),i({unassigned:a().int(),failed:p(g()).readonly()}),{kind:`mutation`,auth:`admin`}),suggestFaceClusters:T(i({threshold:a().min(0).max(1).optional(),minClusterSize:a().int().min(2).optional(),maxClusters:a().int().positive().optional(),limit:a().int().positive().optional(),maxFacesScanned:a().int().positive().optional()}).optional(),p(sw).readonly())}},uw=m([`forward`,`reverse`]),dw=i({percentage:a().min(0).max(100).nullable(),percentageStep:a().positive().optional(),preset:g(),availablePresets:p(g()),direction:uw.nullable(),oscillating:v().nullable(),lastChangedAt:a()}),fw={name:`fan-control`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[D.Fan],methods:{setPercentage:T(i({deviceId:a().int().nonnegative(),percentage:a().min(0).max(100)}),h(),{kind:`mutation`,auth:`admin`}),setPreset:T(i({deviceId:a().int().nonnegative(),preset:g().min(1)}),h(),{kind:`mutation`,auth:`admin`}),setDirection:T(i({deviceId:a().int().nonnegative(),direction:uw}),h(),{kind:`mutation`,auth:`admin`}),setOscillating:T(i({deviceId:a().int().nonnegative(),oscillating:v()}),h(),{kind:`mutation`,auth:`admin`})},status:{schema:dw,kind:`push`},runtimeState:dw,durability:`session`},pw=i({flags:n(g(),u()),deviceType:g().nullable(),model:g().nullable(),channelCount:a().nullable(),lastProbedAt:a(),lastFetchedAt:a()}),mw={name:`feature-probe`,scope:`device`,deviceNative:!0,mode:`singleton`,methods:{},events:{onProbeChanged:{data:i({deviceId:a(),status:pw})}},status:{schema:pw,kind:`push`},runtimeState:pw,durability:`session`},hw=i({flooded:v(),lastChangedAt:a()}),gw={name:`flood`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[D.Sensor],methods:{},status:{schema:hw,kind:`push`},runtimeState:hw,durability:`restored`,volatileStateFields:[`lastChangedAt`]},_w=i({detected:v(),lastChangedAt:a()}),vw={name:`gas`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[D.Sensor],methods:{},status:{schema:_w,kind:`push`},runtimeState:_w,durability:`restored`,volatileStateFields:[`lastChangedAt`]},yw=i({on:v(),currentHumidity:a().min(0).max(100).nullable(),targetHumidity:a().min(0).max(100).nullable(),mode:g().nullable(),availableModes:p(g()),action:g().nullable(),minHumidity:a().nullable(),maxHumidity:a().nullable(),lastChangedAt:a()}),bw={name:`humidifier`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[D.Humidifier],methods:{setOn:T(i({deviceId:a().int().nonnegative(),on:v()}),h(),{kind:`mutation`,auth:`admin`}),setTargetHumidity:T(i({deviceId:a().int().nonnegative(),humidity:a().min(0).max(100)}),h(),{kind:`mutation`,auth:`admin`}),setMode:T(i({deviceId:a().int().nonnegative(),mode:g().min(1)}),h(),{kind:`mutation`,auth:`admin`})},status:{schema:yw,kind:`push`},runtimeState:yw,durability:`session`},xw=i({percent:a().min(0).max(100),lastFetchedAt:a(),unit:g().optional(),precision:a().int().min(0).max(10).optional()}),Sw={name:`humidity-sensor`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[D.Sensor,D.Thermostat],methods:{},status:{schema:xw,kind:`push`},runtimeState:xw,durability:`restored`,volatileStateFields:[`lastFetchedAt`]},Cw=i({url:g().nullable(),lastUpdated:a().nullable()}),ww={name:`image`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[D.Image],methods:{},status:{schema:Cw,kind:`push`},runtimeState:Cw,durability:`session`},Tw=m([`0`,`90`,`180`,`270`]),Ew=m([`auto`,`manual`]),Dw=m([`auto`,`manual`]),Ow=m([`off`,`blc`,`wdr`,`hlc`]),kw=i({min:a(),max:a(),step:a()}),Aw=i({brightness:a().optional(),contrast:a().optional(),saturation:a().optional(),sharpness:a().optional(),mirror:v().optional(),flip:v().optional(),rotate:Tw.optional(),whiteBalance:Ew.optional(),warmth:a().optional(),exposureMode:Dw.optional(),backlightMode:Ow.optional(),lastFetchedAt:a()}),jw=i({supportsBrightness:v(),brightness:kw.optional(),supportsContrast:v(),contrast:kw.optional(),supportsSaturation:v(),saturation:kw.optional(),supportsSharpness:v(),sharpness:kw.optional(),supportsMirror:v(),supportsFlip:v(),rotateOptions:p(Tw),whiteBalanceModes:p(Ew),supportsWarmth:v(),warmth:kw.optional(),exposureModes:p(Dw),backlightModes:p(Ow)}),Mw=i({brightness:a().optional(),contrast:a().optional(),saturation:a().optional(),sharpness:a().optional(),mirror:v().optional(),flip:v().optional(),rotate:Tw.optional(),whiteBalance:Ew.optional(),warmth:a().optional(),exposureMode:Dw.optional(),backlightMode:Ow.optional()}),Nw={name:`image-settings`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[D.Camera],deviceConfig:{ui:{kind:`derived-form`,builderId:`image-settings`,tab:`image`}},methods:{getOptions:T(i({deviceId:a()}),jw),setSettings:T(i({deviceId:a(),settings:Mw}),h(),{kind:`mutation`,auth:`admin`})},status:{schema:Aw,kind:`poll`},runtimeState:Aw,durability:`restored`,volatileStateFields:[`lastFetchedAt`]},Pw=i({id:g(),addonId:g(),name:g(),enabled:v(),info:n(g(),u()).readonly(),createdAt:a(),updatedAt:a(),processState:g()}),Fw=i({id:g(),addonId:g(),name:g(),enabled:v(),info:n(g(),u()).readonly(),createdAt:a(),updatedAt:a()}),Iw=i({addonId:g(),name:g(),description:g(),iconUrl:g().nullable(),color:g(),instanceMode:g(),mode:m([`standalone`,`account`,`broker`]),discoveryMode:g(),kind:m([`device-adoption`,`device-provider`]),brokerKind:g().nullable(),supportsLocationImport:v(),canTest:v(),existingInstances:p(i({id:g(),name:g()})),canAdd:v()}),Lw=m([`validated`,`rejected`,`inconclusive`,`unsupported`]),Rw=i({success:v(),error:g().optional(),status:Lw.optional(),testedBy:g().nullable().optional(),latencyMs:a().nonnegative().optional(),detail:g().optional()}),zw=i({addonId:g(),name:g(),enabled:v().optional(),info:n(g(),u()).optional(),settings:n(g(),u()).optional(),skipRestart:v().optional()}),Bw=i({id:g(),name:g().optional(),enabled:v().optional(),info:n(g(),u()).optional()}),Vw=i({success:v(),deletedId:g()}),Hw={name:`integrations`,scope:`system`,mode:`singleton`,methods:{list:T(h(),p(Pw)),get:T(i({id:g()}),Pw),getByAddonId:T(i({addonId:g()}),Fw.nullable()),create:T(zw,Fw,{kind:`mutation`,auth:`admin`}),update:T(Bw,Fw,{kind:`mutation`,auth:`admin`}),delete:T(i({id:g()}),Vw,{kind:`mutation`,auth:`admin`}),getSettings:T(i({id:g()}),n(g(),u()),{auth:`admin`}),setSettings:T(i({id:g(),settings:n(g(),u())}),i({success:v()}),{kind:`mutation`,auth:`admin`}),getAvailableTypes:T(h(),p(Iw),{auth:`admin`}),testConnection:T(i({addonId:g(),settings:n(g(),u())}),Rw,{kind:`mutation`,auth:`admin`})},mount:{kind:`server-provided`}},Uw=i({codecs:p(g()),sampleRate:a(),duplex:m([`half`,`full`]),maxBacklogMs:a()}),Ww=i({talking:v(),lastSessionAt:a().nullable(),ability:Uw.nullable()}),Gw=m([`opus`,`s16le`,`g711ulaw`,`g711alaw`]),Kw={name:`intercom`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[D.Camera],methods:{startSession:T(i({deviceId:a()}),i({sessionId:g(),sdpOffer:g()}),{kind:`mutation`,auth:`protected`}),handleAnswer:T(i({deviceId:a(),sessionId:g(),sdpAnswer:g()}),h(),{kind:`mutation`,auth:`protected`}),stopSession:T(i({deviceId:a(),sessionId:g()}),h(),{kind:`mutation`,auth:`protected`}),startTalkSession:T(i({deviceId:a()}),i({sessionId:g()}),{kind:`mutation`,auth:`protected`}),pushTalkAudio:T(i({deviceId:a(),audioBase64:g(),codec:Gw.optional(),sampleRate:a().int().positive().optional(),channels:a().int().positive().optional(),sequenceNumber:a().int()}),i({accepted:v()}),{kind:`mutation`,auth:`protected`}),endTalkSession:T(i({deviceId:a()}),h(),{kind:`mutation`,auth:`protected`})},events:{onStatusChanged:{data:i({deviceId:a(),status:Ww})}},status:{schema:Ww,kind:`command-driven`},runtimeState:Ww,durability:`session`},qw=m([`idle`,`mowing`,`paused`,`docked`,`error`]),Jw=m([`info`,`warning`,`error`]),Yw=i({activity:qw,batteryLevel:a().min(0).max(100).nullable(),progressPercent:a().min(0).max(100).nullable(),currentCode:a().nullable(),currentCodeLabel:g().nullable(),severity:Jw,lastChangedAt:a()}),Xw={name:`lawn-mower-control`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[D.LawnMower],methods:{startMowing:T(i({deviceId:a().int().nonnegative()}),h(),{kind:`mutation`,auth:`admin`}),pause:T(i({deviceId:a().int().nonnegative()}),h(),{kind:`mutation`,auth:`admin`}),dock:T(i({deviceId:a().int().nonnegative()}),h(),{kind:`mutation`,auth:`admin`})},status:{schema:Yw,kind:`push`},runtimeState:Yw,durability:`session`},Zw=m([`lan`,`wifi`,`docker`,`vpn`,`loopback`,`other`]),Qw=i({name:g(),family:m([`IPv4`,`IPv6`]),address:g(),cidr:g(),netmask:g(),internal:v(),mac:g(),kind:Zw,preferred:v(),plausible:v(),plausibleReason:g()}),$w=i({interfaces:p(Qw).readonly(),probedAt:a()}),eT=Qw.nullable(),tT=i({label:g(),baseUrl:g(),kind:m([`lan-ipv4`,`lan-ipv6`,`public`,`loopback`]),interfaceKind:m([`lan`,`wifi`,`docker`,`vpn`,`other`,`loopback`,`public`]),plausible:v(),plausibleReason:g(),priority:a()}),nT=m([`server-config`,`server-env`,`caller-hint`,`default`]),rT=i({port:a().int().min(1).max(65535),source:nT}),iT=i({endpoints:p(tT).readonly(),localPort:rT}),aT=i({baseUrl:g().nullable(),resolved:g().nullable()}),oT=i({baseUrls:p(g()).readonly(),resolved:p(g()).readonly()}),sT=i({addresses:p(g()).readonly()}),cT=i({mode:m([`generated`,`uploaded`,`disabled`]),leafFingerprintSha256:g().nullable(),caFingerprintSha256:g().nullable(),validTo:g().nullable(),sans:p(g()),caCertPem:g().nullable(),reissueError:g().nullable(),restartRequired:v()}),lT={name:`local-network`,scope:`system`,mode:`singleton`,methods:{list:T(h(),$w),getPreferred:T(h(),eT),getConnectionEndpoints:T(i({port:a().int().min(1).max(65535).optional(),includeLoopback:v().optional(),ipv4Only:v().optional(),scheme:m([`http`,`https`]).optional()}),iT),getNotificationEndpoint:T(h(),aT),setNotificationEndpoint:T(i({baseUrl:g().nullable()}),aT,{kind:`mutation`}),getViewerEndpoints:T(h(),oT),setViewerEndpoints:T(i({baseUrls:p(g()).readonly()}),oT,{kind:`mutation`}),getAllowedAddresses:T(h(),sT),setAllowedAddresses:T(sT,i({success:y(!0)}),{kind:`mutation`}),resetAllowlistToBestMatch:T(h(),sT,{kind:`mutation`}),getTlsStatus:T(h(),cT),regenerateCertificate:T(i({reason:g().optional()}),cT,{kind:`mutation`,auth:`admin`}),uploadCertificate:T(i({certPem:g().min(1),keyPem:g().min(1),caPem:g().optional()}),cT,{kind:`mutation`,auth:`admin`}),downloadCa:T(h(),i({pem:g()})),revertToGeneratedCertificate:T(h(),cT,{kind:`mutation`,auth:`admin`})},mount:{kind:`hub-only`}},uT=m([`locked`,`unlocked`,`locking`,`unlocking`,`jammed`]),dT=i({state:uT,lastChangedAt:a()}),fT={name:`lock-control`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[D.Lock],methods:{lock:T(i({deviceId:a().int().nonnegative(),code:g().min(1).optional()}),h(),{kind:`mutation`,auth:`admin`}),unlock:T(i({deviceId:a().int().nonnegative(),code:g().min(1).optional()}),h(),{kind:`mutation`,auth:`admin`}),open:T(i({deviceId:a().int().nonnegative()}),h(),{kind:`mutation`,auth:`admin`})},status:{schema:dT,kind:`push`},runtimeState:dT,durability:`restored`,volatileStateFields:[`lastChangedAt`]},pT=m([`off`,`on`,`idle`,`playing`,`paused`,`buffering`,`standby`]),mT=m([`off`,`all`,`one`]),hT=i({type:g(),title:g(),artist:g().optional(),album:g().optional(),imageUrl:g().optional()}),gT=i({state:pT,volumeLevel:a().min(0).max(100).nullable(),isMuted:v().nullable(),source:g(),availableSources:p(g()),currentMedia:hT.nullable(),positionMs:a().int().nonnegative().nullable(),durationMs:a().int().nonnegative().nullable(),shuffle:v().nullable(),repeat:mT.nullable(),lastChangedAt:a()}),_T={name:`media-player`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[D.MediaPlayer],methods:{play:T(i({deviceId:a().int().nonnegative()}),h(),{kind:`mutation`,auth:`admin`}),pause:T(i({deviceId:a().int().nonnegative()}),h(),{kind:`mutation`,auth:`admin`}),stop:T(i({deviceId:a().int().nonnegative()}),h(),{kind:`mutation`,auth:`admin`}),next:T(i({deviceId:a().int().nonnegative()}),h(),{kind:`mutation`,auth:`admin`}),previous:T(i({deviceId:a().int().nonnegative()}),h(),{kind:`mutation`,auth:`admin`}),seek:T(i({deviceId:a().int().nonnegative(),positionMs:a().int().nonnegative()}),h(),{kind:`mutation`,auth:`admin`}),setVolume:T(i({deviceId:a().int().nonnegative(),volumeLevel:a().min(0).max(100)}),h(),{kind:`mutation`,auth:`admin`}),setMute:T(i({deviceId:a().int().nonnegative(),muted:v()}),h(),{kind:`mutation`,auth:`admin`}),setShuffle:T(i({deviceId:a().int().nonnegative(),shuffle:v()}),h(),{kind:`mutation`,auth:`admin`}),setRepeat:T(i({deviceId:a().int().nonnegative(),repeat:mT}),h(),{kind:`mutation`,auth:`admin`}),selectSource:T(i({deviceId:a().int().nonnegative(),source:g().min(1)}),h(),{kind:`mutation`,auth:`admin`}),playMedia:T(i({deviceId:a().int().nonnegative(),mediaId:g().min(1),mediaType:g().min(1)}),h(),{kind:`mutation`,auth:`admin`})},status:{schema:gT,kind:`push`},runtimeState:gT,durability:`session`},vT=i({id:g(),label:g(),scope:m([`mesh`,`public`]),url:g(),hostname:g(),port:a(),protocol:m([`http`,`https`])}),yT=i({id:g(),hostname:g(),magicDns:g(),addresses:p(g()).readonly(),os:g().optional(),online:v(),lastSeenMs:a(),isSelf:v(),connection:m([`direct`,`relay`,`idle`]),relay:g().nullable(),lastHandshakeMs:a(),rxBytes:a(),txBytes:a(),tags:p(g()).readonly(),exitNodeOption:v(),advertisedRoutes:p(g()).readonly(),userLogin:g().nullable(),keyExpiry:a().nullable()}),bT=i({joined:v(),meshIp:g(),magicDnsHostname:g(),peerCount:a(),endpoints:p(vT).readonly(),error:g().optional(),tenantName:g(),magicDnsSuffix:g(),userLogin:g().nullable(),controlPlaneUrl:g(),keyExpiry:a().nullable(),daemonSocket:g().optional(),daemonCliPath:g().optional()}),xT={name:`mesh-network`,scope:`system`,mode:`collection`,providerKind:`mesh`,methods:{getStatus:T(h(),bT),join:T(i({authKey:g().min(8),hostname:g().optional()}),i({joined:y(!0)}),{kind:`mutation`}),startLogin:T(i({hostname:g().optional()}),i({loginUrl:g()}),{kind:`mutation`}),leave:T(h(),i({left:y(!0)}),{kind:`mutation`}),logout:T(h(),i({loggedOut:y(!0)}),{kind:`mutation`}),listPeers:T(h(),i({peers:p(yT).readonly()})),testConnection:T(i({authKey:g().optional()}),i({ok:v(),tenant:g().optional(),daemonVersion:g().optional(),error:g().optional()}),{kind:`mutation`})}},ST=i({detected:v(),lastDetectedAt:a().nullable(),autoClearAfterMs:a().nullable()}),CT=i({deviceId:a(),detected:v(),timestamp:a(),source:ky,regions:p(sm).readonly().optional()}),wT={name:`motion`,scope:`device`,mode:`singleton`,deviceNative:!0,deviceTypes:[D.Camera,D.Sensor],methods:{isDetected:T(i({deviceId:a()}),v())},events:{onMotionChanged:{data:CT}},status:{schema:ST,kind:`push`},runtimeState:ST,durability:`session`},TT=i({enabled:v(),lastChangedAt:a()}),ET=TT.extend({lastFetchedAt:a()}),DT={name:`motion-trigger`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[D.Light,D.Siren,D.Switch],methods:{setMotionTrigger:T(i({deviceId:a().int().nonnegative(),enabled:v()}),h(),{kind:`mutation`,auth:`admin`})},events:{onMotionTriggerChanged:{data:i({deviceId:a(),enabled:v(),lastChangedAt:a()})}},status:{schema:TT,kind:`command-driven`},runtimeState:ET,durability:`session`},OT=i({id:a(),enabled:v(),shape:yh}),kT=i({enabled:v(),sensitivity:a(),regions:p(OT),lastFetchedAt:a()}),AT=i({maxRegions:a(),supportedShapes:p(Sh),grid:wh,sensitivity:i({min:a(),max:a(),step:a()})}),jT=i({enabled:v().optional(),sensitivity:a().optional(),regions:p(OT).optional()}),MT={name:`motion-zones`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[D.Camera],deviceConfig:{ui:{kind:`widget`,widgetId:`host/motion-zones-grid`,tab:`motion`,label:`Motion Zones`}},methods:{getOptions:T(i({deviceId:a()}),AT),setZone:T(i({deviceId:a(),patch:jT}),h(),{kind:`mutation`,auth:`admin`})},status:{schema:kT,kind:`poll`},runtimeState:kT,durability:`restored`,volatileStateFields:[`lastFetchedAt`]},NT=m([`person`,`vehicle`,`animal`,`face`,`package`,`other`]),PT=i({class:NT,timestamp:a(),confidence:a().min(0).max(1).optional()}),FT=i({lastByClass:l(NT,PT.nullable()),supportedClasses:p(NT).readonly(),enabled:v()}),IT=FT.extend({lastFetchedAt:a()}),LT={name:`native-object-detection`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[D.Camera],methods:{setEnabled:T(i({deviceId:a(),enabled:v()}),h(),{kind:`mutation`,auth:`admin`})},events:{onDetected:{data:i({deviceId:a(),detection:PT})}},status:{schema:FT,kind:`push`},runtimeState:IT,durability:`restored`,volatileStateFields:[`lastFetchedAt`]},RT=i({pan:a().min(-1).max(1).optional(),tilt:a().min(-1).max(1).optional(),speed:a().min(0).max(1).optional()}),zT=m([`goHome`,`locate`,`spotClean`,`findPet`,`personFollow`,`stop`,`startClean`,`pauseClean`,`dockWash`,`autoEmpty`,`flashOn`,`flashOff`]),BT=m([`action`,`sound`]),VT=i({id:g(),kind:BT,label:g(),icon:g(),soundId:a().int().optional(),enabled:v()}),HT=[{id:`startClean`,kind:`action`,label:`Start cleaning`,icon:`play`,enabled:!0},{id:`pauseClean`,kind:`action`,label:`Pause cleaning`,icon:`pause`,enabled:!0},{id:`stop`,kind:`action`,label:`Stop`,icon:`hand`,enabled:!0},{id:`goHome`,kind:`action`,label:`Return to dock`,icon:`home`,enabled:!0},{id:`locate`,kind:`action`,label:`Locate`,icon:`bell`,enabled:!0},{id:`spotClean`,kind:`action`,label:`Spot clean here`,icon:`crosshair`,enabled:!0},{id:`findPet`,kind:`action`,label:`Find pet`,icon:`paw-print`,enabled:!0},{id:`personFollow`,kind:`action`,label:`Follow me`,icon:`footprints`,enabled:!0},{id:`dockWash`,kind:`action`,label:`Wash mop`,icon:`droplets`,enabled:!0},{id:`autoEmpty`,kind:`action`,label:`Empty dustbin`,icon:`trash-2`,enabled:!0},{id:`flashOn`,kind:`action`,label:`Flash on`,icon:`flashlight`,enabled:!0},{id:`flashOff`,kind:`action`,label:`Flash off`,icon:`flashlight-off`,enabled:!0},{id:`sound:meow`,kind:`sound`,label:`Meow`,icon:`cat`,soundId:684,enabled:!0},{id:`sound:bark`,kind:`sound`,label:`Woof`,icon:`dog`,soundId:685,enabled:!0},{id:`sound:footsteps`,kind:`sound`,label:`Footsteps`,icon:`footprints`,soundId:686,enabled:!0},{id:`sound:purring`,kind:`sound`,label:`Purring`,icon:`cat`,soundId:687,enabled:!0},{id:`sound:tickTock`,kind:`sound`,label:`Tick-tock`,icon:`clock`,soundId:688,enabled:!0}],UT=i({x:a(),y:a()}),WT=i({move:v(),stop:v(),goToPoint:v(),runAction:v(),playSound:v(),light:v(),lightMode:v()}),GT=m([`auto`,`manual`]),KT=40,qT=100,JT=m([`idle`,`cleaning`,`spot`,`following`,`goto`,`returning`,`paused`,`unknown`]),YT=i({mode:JT,following:v(),flash:v(),lightMode:GT,lightLevel:a().min(40).max(100),lastChangedAt:a()}),XT=YT.extend({lastFetchedAt:a()}),ZT={name:`navigation`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[D.Camera],deviceConfig:{ui:{kind:`widget`,widgetId:`host/navigation-panel`,tab:`navigation`,topTab:!0,label:`Navigation`,order:0}},methods:{move:T(RT.extend({deviceId:a()}),h(),{kind:`mutation`}),stop:T(i({deviceId:a()}),h(),{kind:`mutation`}),goToPoint:T(UT.extend({deviceId:a()}),h(),{kind:`mutation`}),listActions:T(i({deviceId:a()}),p(VT)),runAction:T(i({deviceId:a(),actionId:zT}),h(),{kind:`mutation`}),playSound:T(i({deviceId:a(),soundId:a().int()}),h(),{kind:`mutation`}),setLightOn:T(i({deviceId:a(),on:v()}),h(),{kind:`mutation`}),setLightMode:T(i({deviceId:a(),mode:GT,level:a().min(40).max(100).optional()}),h(),{kind:`mutation`}),setLightLevel:T(i({deviceId:a(),level:a().min(40).max(100)}),h(),{kind:`mutation`}),getFeatures:T(i({deviceId:a()}),WT)},events:{onStatusChanged:{data:i({deviceId:a(),status:YT})}},status:{schema:YT,kind:`push`},runtimeState:XT,durability:`session`},QT=[`wifi`,`ethernet`,`cellular`,`unknown`],$T=i({type:m(QT),signalPercent:a().min(0).max(100).nullable(),rssiDbm:a().optional(),ssid:g().optional(),lastUpdated:a()}),eE={type:`unknown`,signalPercent:null,lastUpdated:0};function tE(e,t){return e===void 0||!Number.isFinite(e)||t<=0||e<0||e>t?null:Math.round(e/t*100)}function nE(e){return e===void 0||!Number.isFinite(e)||e>0?null:Math.round((Math.min(-50,Math.max(-100,e))+100)*2)}var rE={name:`network-link`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[D.Camera,D.Sensor,D.Button,D.Switch,D.Light,D.Lock,D.Siren],methods:{},events:{onStatusChanged:{data:i({deviceId:a(),status:$T})}},status:{schema:$T,kind:`push`,empty:eE},runtimeState:$T,durability:`restored`,volatileStateFields:[`lastUpdated`]},iE=i({nominalBitrateKbps:a(),observedBitrateKbps:a(),peakBitrateKbps:a(),packetLossPercent:a(),lastUpdated:a()}),aE=i({rttMs:a(),jitterMs:a(),estimatedBandwidthKbps:a(),packetLossPercent:a().min(0).max(100),lastUpdated:a()}),oE=i({deviceId:a(),streams:n(g(),iE),client:aE.optional()}),sE={name:`network-quality`,scope:`system`,mode:`singleton`,methods:{getDeviceStats:T(i({deviceId:a()}),oE.nullable()),getAllStats:T(h(),p(oE).readonly()),reportClientStats:T(i({deviceId:a(),rttMs:a().min(0).max(6e4),jitterMs:a().min(0).max(1e4),estimatedBandwidthKbps:a().min(0).max(1e6),packetLossPercent:a().min(0).max(100)}),h(),{kind:`mutation`})},mount:{kind:`server-provided`}},cE=i({addonId:g(),capabilities:p(g()).readonly(),status:g()}),lE=i({pid:a(),name:g(),state:g(),cpuPercent:a(),memoryRss:a(),uptimeSeconds:a(),services:p(cE).readonly(),groupId:g().optional()}),uE=i({id:g(),status:g(),cpuPercent:a(),memoryRss:a()}),dE=i({category:g(),total:a(),healthy:a(),addons:p(uE).readonly()}),fE=i({name:g(),version:g()}),pE=i({id:g(),name:g(),hostname:g(),platform:g(),arch:g(),cpuModel:g().nullable(),cpuCores:a(),memoryMB:a(),engines:p(g()).readonly(),isHub:v(),isOnline:v(),cpuPercent:a(),memoryPercent:a(),uptime:a(),lastSeen:g(),localIps:p(g()).readonly(),addons:p(i({id:g(),capabilities:p(g()).readonly(),status:g()})).readonly(),processes:p(lE).readonly(),categories:p(dE).readonly(),rootPackage:fE.nullable()}),mE=i({callerAddonId:g(),providerAddonId:g(),capName:g(),callsPerMin:a(),lastCallAtMs:a()}),hE=i({nodeId:g(),name:g(),version:g(),status:g(),synced:v()}),gE=i({hubVersion:g(),nodes:p(hE)}),_E=i({nodeId:g(),addonId:g()}),vE=i({id:g(),status:g(),version:g().optional(),packageName:g().optional()}),yE=i({success:v()}),bE=i({success:v(),reason:g().optional()}),xE=i({restarted:p(g()).readonly(),failed:p(g()).readonly()}),SE=i({nodeId:g(),name:g()}),CE={name:`nodes`,scope:`system`,mode:`singleton`,nodeIdMode:`data`,methods:{topology:T(h(),p(pE).readonly(),{auth:`admin`}),deployAddon:T(_E,yE,{kind:`mutation`,auth:`admin`}),undeployAddon:T(_E,yE,{kind:`mutation`,auth:`admin`}),restartAddon:T(_E,yE,{kind:`mutation`,auth:`admin`}),restartProcess:T(i({nodeId:g(),processName:g()}),bE,{kind:`mutation`,auth:`admin`}),restartNode:T(i({nodeId:g()}),xE,{kind:`mutation`,auth:`admin`}),shutdownNode:T(i({nodeId:g()}),yE,{kind:`mutation`,auth:`admin`}),renameNode:T(i({nodeId:g(),name:g().min(1).max(64)}),SE,{kind:`mutation`,auth:`admin`}),clusterAddonStatus:T(h(),n(g(),gE),{auth:`admin`}),getCapUsageGraph:T(i({windowSeconds:a().int().positive().max(300).default(60)}),p(mE).readonly(),{auth:`admin`}),getNodeAddons:T(i({nodeId:g()}),p(vE).readonly(),{auth:`admin`}),setProcessLogLevel:T(i({nodeId:g(),level:g()}),yE,{kind:`mutation`,auth:`admin`}),executeQuery:T(i({nodeId:g(),addonId:g(),queryName:g(),params:n(g(),u()).optional()}),u(),{kind:`mutation`,auth:`admin`})},mount:{kind:`server-provided`}},wE=m([`min`,`low`,`normal`,`high`]),TE=i({id:g().min(1),title:g().min(1),uri:o().optional(),destructive:v().optional()}),EE=i({image:v(),priority:v(),data:v(),actions:v(),recipients:v()}),DE=i({lastSentAt:a(),lastError:g().nullable(),queueDepth:a().int().nonnegative(),supports:EE}),OE=i({deviceId:a().int().nonnegative(),title:g().optional(),body:g().min(1),image:g().optional(),priority:wE.optional(),channel:g().optional(),recipients:p(g()).optional(),actions:p(TE).optional(),data:n(g(),u()).optional()}),kE=i({notificationId:g(),acceptedAt:a()}),AE={name:`notifier`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[D.Notifier],methods:{send:T(OE,kE,{kind:`mutation`,auth:`admin`}),cancel:T(i({deviceId:a().int().nonnegative(),notificationId:g().min(1)}),h(),{kind:`mutation`,auth:`admin`})},events:{onSent:{data:i({deviceId:a(),notificationId:g(),success:v(),error:g().nullable(),acceptedAt:a()})}},status:{schema:DE,kind:`command-driven`},runtimeState:DE,durability:`session`},jE=i({value:a(),unit:g().optional(),precision:a().int().min(0).max(10).optional(),lastFetchedAt:a()}),ME={name:`numeric-sensor`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[D.Sensor],methods:{},status:{schema:jE,kind:`push`},runtimeState:jE,durability:`restored`,volatileStateFields:[`lastFetchedAt`]},NE=m([`text`,`timestamp`,`watermark`]),PE=m([`top-left`,`top-center`,`top-right`,`bottom-left`,`bottom-center`,`bottom-right`,`custom`]),FE=i({id:g(),kind:NE,enabled:v(),text:g().optional(),position:PE.optional(),availablePositions:p(PE).readonly(),readOnly:v().optional()}),IE=i({overlays:p(FE).readonly()}),LE=i({enabled:v().optional(),text:g().optional(),position:PE.optional()}).partial(),RE={name:`osd`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[D.Camera],methods:{setOverlay:T(i({deviceId:a(),overlayId:g(),patch:LE}),h(),{kind:`mutation`,auth:`admin`})},events:{onStatusChanged:{data:i({deviceId:a(),status:IE})}},status:{schema:IE,kind:`command-driven`},settings:{bindings:[{kind:`array`,statusPath:`overlays`,idField:`id`,method:`setOverlay`,idArg:`overlayId`,patchArg:`patch`,sectionId:`osd`,sectionTitle:`Video overlays`,itemFields:{enabled:{label:e=>`${String(e.id)} enabled`,kind:`boolean`},text:{label:e=>`${String(e.id)} text`,kind:`text`,when:e=>e.kind!==`timestamp`&&!e.readOnly},position:{label:e=>`${String(e.id)} position`,kind:`select`,options:e=>e.availablePositions??[],when:e=>Array.isArray(e.availablePositions)&&e.availablePositions.length>0}}}]}},zE=b(`kind`,[i({kind:y(`static`),text:g().max(64)}),i({kind:y(`clock`),pattern:g().min(1).max(32).default(`HH:mm`),timezone:g().min(1).max(64).optional()}),i({kind:y(`device-state`),deviceId:a().int().optional(),capName:g().min(1).max(64),valuePath:g().min(1).max(64)}),i({kind:y(`latest-recognition`),recognition:m([`person`,`plate`])})]),BE=i({enabled:v().default(!0),source:zE,template:g().max(96).default("${value}"),maxCharacters:a().int().min(4).max(64).optional(),maxDecimals:a().int().min(0).max(4).default(1),unitLabel:g().max(8).optional(),valueMap:n(g(),g()).optional(),schedule:Fh.optional(),conditions:Jh.optional(),fallbackText:g().max(64).default(``)}),VE=i({slotId:g(),kind:NE,readOnly:v(),cameraEnabled:v(),cameraText:g().optional(),binding:BE.nullable()}),HE=m([`written`,`unchanged`,`gated`,`unreadable`,`disabled`,`unbound`,`failed`]),UE=i({slotId:g(),outcome:HE,text:g(),reason:g().optional()}),WE=m([`number`,`boolean`,`string`,`enum`]),GE=i({deviceId:a().int(),deviceName:g(),capName:g(),valuePath:g(),label:g(),valueType:WE,enumValues:p(g()).readonly().optional()}),KE={name:`osd-manager`,scope:`system`,mode:`singleton`,methods:{getDeviceOsd:T(i({deviceId:a().int()}),i({supported:v(),slots:p(VE)}),{auth:`admin`}),getSourceCatalog:T(i({deviceId:a().int()}),i({sources:p(GE)}),{auth:`admin`}),getConditionSupport:T(i({}),i({supported:p(g()),catalog:p(ug)}),{auth:`admin`}),setSlotBinding:T(i({deviceId:a().int(),slotId:g().min(1),binding:BE}),i({slot:VE,render:UE}),{kind:`mutation`,auth:`admin`}),clearSlotBinding:T(i({deviceId:a().int(),slotId:g().min(1)}),i({success:y(!0)}),{kind:`mutation`,auth:`admin`}),copyDeviceConfiguration:T(i({sourceDeviceId:a().int(),targetDeviceId:a().int()}),i({copied:a().int().nonnegative(),skipped:a().int().nonnegative()}),{kind:`mutation`,auth:`admin`}),previewSlot:T(i({deviceId:a().int(),slotId:g().min(1),binding:BE.optional()}),UE,{kind:`mutation`,auth:`admin`}),renderDevice:T(i({deviceId:a().int()}),i({results:p(UE)}),{kind:`mutation`,auth:`admin`})}},qE=4,JE=200,YE=m([`normal`,`offline`,`on_batteries`]),XE=a().int().min(4).max(200),ZE=i({foodLevel:a().nullable(),food1:a().nullable(),food2:a().nullable(),lowFood:v(),batteryPower:a().min(0).max(100).nullable(),desiccantLeftDays:a().nullable(),feeding:v(),status:YE.nullable(),error:g().nullable(),errorCode:a().nullable(),isDualHopper:v(),childLock:v(),indicatorLight:v(),feedSound:v(),volume:a(),lastFetchedAt:a()}),QE={name:`pet-feeder`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[D.PetFeeder],methods:{feed:T(i({deviceId:a().int().nonnegative(),grams:XE.optional(),hopper1:XE.optional(),hopper2:XE.optional()}),h(),{kind:`mutation`,auth:`admin`}),cancelFeed:T(i({deviceId:a().int().nonnegative()}),h(),{kind:`mutation`,auth:`admin`}),resetDesiccant:T(i({deviceId:a().int().nonnegative()}),h(),{kind:`mutation`,auth:`admin`}),markFoodReplenished:T(i({deviceId:a().int().nonnegative()}),h(),{kind:`mutation`,auth:`admin`}),callPet:T(i({deviceId:a().int().nonnegative()}),h(),{kind:`mutation`,auth:`admin`}),playSound:T(i({deviceId:a().int().nonnegative(),soundId:a().int().nonnegative()}),h(),{kind:`mutation`,auth:`admin`}),setChildLock:T(i({deviceId:a().int().nonnegative(),on:v()}),h(),{kind:`mutation`,auth:`admin`}),setIndicatorLight:T(i({deviceId:a().int().nonnegative(),on:v()}),h(),{kind:`mutation`,auth:`admin`}),setFeedSound:T(i({deviceId:a().int().nonnegative(),on:v()}),h(),{kind:`mutation`,auth:`admin`}),setVolume:T(i({deviceId:a().int().nonnegative(),level:a().int().nonnegative()}),h(),{kind:`mutation`,auth:`admin`})},status:{schema:ZE,kind:`poll`},runtimeState:ZE,durability:`session`},$E=i({id:g(),name:g(),sampleCount:a().int().nonnegative(),coverMediaKey:g().optional(),coverBase64:g().optional()}),eD=i({id:g(),text:g(),score:a(),addedAt:a().int(),deviceId:a().int().optional(),base64:g().optional()}),tD=i({plateId:g(),deviceId:a().int(),trackId:g(),timestamp:a().int(),text:g(),score:a(),corrected:v(),recognizedVehicleId:g().optional(),vehicleName:g().optional(),assigned:v(),plateBbox:V.optional(),keyFrameMediaKey:g().optional(),base64:g().optional(),cropUrl:g().optional()}),nD=i({key:g(),kind:g(),url:g(),sizeBytes:a(),timestamp:a()}),rD=i({plateIds:p(g()).readonly(),representativePlateId:g(),representativeText:g(),size:a().int(),cohesion:a()}),iD={name:`plate-gallery`,scope:`system`,mode:`singleton`,methods:{listPlates:T(i({deviceId:a().int().optional(),limit:a().int().positive().optional(),includeCrops:v().optional()}).optional(),p(tD).readonly()),getPlateByTrack:T(i({deviceId:a().int(),trackId:g()}),tD.nullable()),getPlateMedia:T(i({plateId:g()}),p(nD).readonly()),searchPlates:T(i({text:g().min(1),maxDistance:a().int().min(0).optional(),limit:a().int().positive().optional(),includeCrops:v().optional()}),p(tD).readonly()),suggestPlateClusters:T(i({maxDistance:a().int().min(0).optional(),minClusterSize:a().int().min(2).optional(),limit:a().int().positive().optional()}).optional(),p(rD).readonly()),correctPlateText:T(i({plateId:g(),text:g().min(1)}),h(),{kind:`mutation`,auth:`admin`}),deletePlate:T(i({plateId:g()}),h(),{kind:`mutation`,auth:`admin`}),listVehicles:T(i({includeCrops:v().optional()}).optional(),p($E).readonly()),createVehicle:T(i({name:g().min(1)}),$E,{kind:`mutation`,auth:`admin`}),renameVehicle:T(i({id:g(),name:g().min(1)}),h(),{kind:`mutation`,auth:`admin`}),deleteVehicle:T(i({id:g()}),h(),{kind:`mutation`,auth:`admin`}),listVehicleSamples:T(i({vehicleId:g()}),p(eD).readonly()),removeVehicleSample:T(i({vehicleId:g(),sampleId:g()}),h(),{kind:`mutation`,auth:`admin`}),assignPlate:T(i({plateId:g(),vehicleId:g()}),h(),{kind:`mutation`,auth:`admin`}),unassignPlate:T(i({plateId:g()}),h(),{kind:`mutation`,auth:`admin`}),assignPlates:T(i({plateIds:p(g()).min(1),vehicleId:g()}),i({assigned:a().int(),failed:p(g()).readonly()}),{kind:`mutation`,auth:`admin`}),unassignPlates:T(i({plateIds:p(g()).min(1)}),i({unassigned:a().int(),failed:p(g()).readonly()}),{kind:`mutation`,auth:`admin`})}},aD=m(is),oD=m([`videotoolbox`,`cuda`,`nvdec`,`vaapi`,`qsv`,`d3d11va`,`dxva2`,`amf`,`vdpau`,`drm`,`coreml`,`tensorrt`,`openvino`,`directml`,`webgpu`,`none`]).nullable().optional(),sD=i({preferred:p(g()).readonly(),rationale:g()}),cD=m([`h264_videotoolbox`,`hevc_videotoolbox`,`h264_vaapi`,`hevc_vaapi`,`h264_nvenc`,`hevc_nvenc`,`h264_qsv`,`hevc_qsv`,`h264_amf`,`hevc_amf`,`libx264`,`libx265`]);i({encoders:p(i({encoder:cD,codec:m([`H264`,`H265`]),family:m([`videotoolbox`,`vaapi`,`nvenc`,`qsv`,`amf`,`software`]),available:v(),reason:g().optional()})).readonly(),defaultH264:cD,defaultH265:cD,probedAt:a()}),i({methods:p(g()).readonly(),probedAt:a()});var lD=m([`darwin`,`linux`,`win32`]),uD=m([`arm64`,`x64`]),dD=i({type:m([`nvidia`,`amd`,`intel`,`apple`]),name:g(),memoryMB:a().optional()}),fD=i({type:m([`apple-ane`,`intel-npu`])}),pD=i({type:y(`coral-edgetpu`),bus:g().optional()}),mD=i({platform:lD,arch:uD,cpuModel:g(),cpuCores:a(),totalRAM_MB:a(),availableRAM_MB:a(),gpu:dD.nullable(),npu:fD.nullable(),coral:pD.nullable().optional()}),hD=i({runtime:m([`node`,`python`]),backend:g(),format:m([`onnx`,`coreml`,`openvino`,`tflite`]),score:a(),reason:g(),available:v()}),gD=i({key:g(),backend:g(),device:g(),format:aD,runtime:y(`python`),score:a(),available:v()}),_D=i({hardware:mD,scores:p(hD).readonly(),bestScore:hD,pythonPath:g().nullable(),devices:p(gD).readonly()}),vD=i({modelId:g(),name:g(),minRAM_MB:a(),accuracyScore:a(),formats:p(g()).readonly()}),yD=i({modelId:g(),runtime:m([`node`,`python`]),backend:g(),format:aD,reason:g()}),bD={name:`platform-probe`,scope:`system`,mode:`singleton`,methods:{getCapabilities:T(h(),_D),getHardware:T(h(),mD),resolveInferenceConfig:T(i({requirements:p(vD).readonly()}),yD),resolveHwAccel:T(i({prefer:oD}),sD)}},xD=i({watts:a().optional(),kwhTotal:a().optional(),volts:a().optional(),amps:a().optional(),va:a().optional(),powerFactor:a().min(0).max(1).optional(),lastFetchedAt:a(),unit:g().optional(),precision:a().int().min(0).max(10).optional()}),SD={name:`power-meter`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[D.Sensor],methods:{},status:{schema:xD,kind:`push`},runtimeState:xD,durability:`restored`,volatileStateFields:[`lastFetchedAt`]},CD=i({latitude:a().min(-90).max(90),longitude:a().min(-180).max(180),accuracyMeters:a().nonnegative()}),wD=i({state:g(),location:g().nullable(),gps:CD.nullable(),batteryPercent:a().min(0).max(100).nullable(),lastChangedAt:a()}),TD={name:`presence`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[D.Presence],methods:{},status:{schema:wD,kind:`push`},runtimeState:wD,durability:`restored`,volatileStateFields:[`lastChangedAt`]},ED=i({hpa:a(),lastFetchedAt:a(),unit:g().optional(),precision:a().int().min(0).max(10).optional()}),DD={name:`pressure-sensor`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[D.Sensor],methods:{},status:{schema:ED,kind:`push`},runtimeState:ED,durability:`restored`,volatileStateFields:[`lastFetchedAt`]},OD=b(`kind`,[_h,vh]),kD=i({id:a(),enabled:v(),shape:OD}),AD=i({enabled:v(),regions:p(kD),audioEnabled:v().nullable(),lastFetchedAt:a()}),jD=i({maxRegions:a(),supportedShapes:p(Sh),polygonVertices:Ch.optional(),supportsAudioMute:v()}),MD=i({enabled:v().optional(),regions:p(kD).optional()}),ND={name:`privacy-mask`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[D.Camera],deviceConfig:{ui:{kind:`widget`,widgetId:`host/privacy-mask-grid`,tab:`image`,label:`Privacy Mask`}},methods:{getOptions:T(i({deviceId:a()}),jD),setMask:T(i({deviceId:a(),patch:MD}),h(),{kind:`mutation`,auth:`admin`}),setAudioEnabled:T(i({deviceId:a(),enabled:v()}),h(),{kind:`mutation`,auth:`admin`})},status:{schema:AD,kind:`poll`},runtimeState:AD,durability:`restored`,volatileStateFields:[`lastFetchedAt`]};function PD(e){return e.length===0?null:e.some(e=>e.audioEnabled)}var FD=i({id:g(),name:g()}),ID=i({pan:a(),tilt:a(),zoom:a()}),LD=i({pan:a().optional(),tilt:a().optional(),zoom:a().optional(),speed:a().optional()}),RD=ID.extend({autofocus:v()}),zD=i({hasPan:v(),hasTilt:v(),hasZoom:v(),supportsPresets:v(),maxPresets:a().optional(),hasAutofocus:v()}),BD={name:`ptz`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[D.Camera],deviceConfig:{ui:{kind:`widget`,widgetId:`host/ptz-panel`,tab:`ptz`,topTab:!0,label:`PTZ`,order:0}},methods:{move:T(LD.extend({deviceId:a()}),h(),{kind:`mutation`}),continuousMove:T(LD.extend({deviceId:a()}),h(),{kind:`mutation`}),stop:T(i({deviceId:a()}),h(),{kind:`mutation`}),getPresets:T(i({deviceId:a()}),p(FD)),goToPreset:T(i({deviceId:a(),presetId:g()}),h(),{kind:`mutation`}),savePreset:T(i({deviceId:a(),presetId:g(),name:g()}),h(),{kind:`mutation`,auth:`admin`}),deletePreset:T(i({deviceId:a(),presetId:g()}),h(),{kind:`mutation`,auth:`admin`}),getOptions:T(i({deviceId:a()}),zD),goHome:T(i({deviceId:a()}),h(),{kind:`mutation`}),getPosition:T(i({deviceId:a()}),ID),setAutofocus:T(i({deviceId:a(),enabled:v()}),h(),{kind:`mutation`})},status:{schema:RD,kind:`command-driven`}},VD=i({targetType:g().describe(`Vendor target string (people/vehicle/pet); empty = camera default`),stopDelaySeconds:a().int().min(0).max(300),disappearDelaySeconds:a().int().min(0).max(300)}),HD=i({value:g(),label:g()}),UD=i({enabled:v(),lastChangedAt:a(),currentSettings:VD.nullable(),supportedTargetTypes:p(HD)}),WD=UD.extend({lastFetchedAt:a()}),GD={name:`ptz-autotrack`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[D.Camera],deviceConfig:{ui:{kind:`widget`,widgetId:`host/ptz-autotrack`,tab:`ptz`,topTab:!0,label:`Auto-Tracking`,order:5}},methods:{getStatus:T(i({deviceId:a()}),UD),setEnabled:T(i({deviceId:a(),enabled:v()}),h(),{kind:`mutation`}),getSettings:T(i({deviceId:a()}),VD.nullable()),setSettings:T(i({deviceId:a(),settings:VD.partial()}),h(),{kind:`mutation`})},events:{onStatusChanged:{data:i({deviceId:a(),status:UD})}},status:{schema:UD,kind:`command-driven`},runtimeState:WD,durability:`session`},KD={name:`reboot`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[D.Camera,D.Sensor,D.Switch],methods:{reboot:T(i({deviceId:a().int().nonnegative()}),i({success:y(!0)}),{kind:`mutation`,auth:`admin`})}},qD=i({deviceId:a(),enabled:v(),activeMode:Oi,nodeId:g(),storageBytes:a()}),JD=i({profile:g(),startMs:a(),endMs:a()}),YD=i({deviceId:a(),ranges:p(JD)}),XD=i({deviceId:a(),days:p(a())}),ZD=200,QD=i({deviceId:a(),read:m([`read`,`unreadable`]),ranges:p(JD).readonly()}),$D=i({deviceId:a(),read:m([`read`,`unreadable`]),days:p(a()).readonly()}),eO=i({deviceId:a(),localMasterPath:g().nullable(),playbackUrl:g().nullable(),playbackEndpoints:p(g())}),tO=i({deviceId:a(),usedBytes:a(),oldestMs:a().nullable().optional()}),nO=i({locationId:g().nullable(),locationIds:p(g()).optional(),root:g().optional(),usedBytes:a(),availableBytes:a().nullable(),totalBytes:a().nullable()}),rO=i({nodeId:g(),totalUsedBytes:a(),devices:p(tO),locations:p(nO).optional()}),iO=i({deviceId:a(),profile:g(),fromLocationId:g(),toLocationId:g(),bytes:a(),files:a().int()}),aO=m([`unassigned`,`target-not-writable`,`below-threshold`,`no-headroom`]),oO=i({deviceId:a(),profile:g(),fromLocationId:g(),toLocationId:g().nullable(),bytes:a(),reason:aO}),sO=i({moves:p(iO),skipped:p(oO),bytesToMove:a(),jobIds:p(g())}),cO=i({throttleMbps:a().min(1).max(1e3).optional(),minMoveGb:a().min(0).optional()}),lO=i({deviceId:a().int(),profile:g(),locationId:g()}),uO=i({deviceId:a().int(),locationId:g()}),dO=i({assignments:p(lO),pins:p(uO),defaultLocations:n(g(),g())}),fO=i({deviceId:a().int(),locationId:g().nullable()}),pO=b(`kind`,[i({kind:y(`segment`),startMs:a(),durMs:a(),bytes:a()}),i({kind:y(`gap`),nearestEdgeMs:a().nullable(),prevEndMs:a().nullable().optional()})]),mO=i({data:_(Uint8Array)}),hO=i({data:_(Uint8Array),gopStartMs:a(),gopDurMs:a()}),gO=b(`kind`,[i({kind:y(`ok`),data:_(Uint8Array),gopStartMs:a(),gopDurMs:a(),reachesRequestedEnd:v()}),i({kind:y(`spans-multiple-segments`),segmentEndMs:a()})]),_O={name:`recording`,scope:`system`,mode:`singleton`,exposesDeviceSettings:!0,status:{schema:qD,kind:`command-driven`},methods:{getAvailability:T(i({deviceId:a(),fromMs:a(),toMs:a()}),YD,{kind:`query`,auth:`protected`}),getAvailabilityBatch:T(i({deviceIds:p(a()).min(1).max(200),fromMs:a(),toMs:a()}),p(QD).readonly(),{kind:`query`,auth:`protected`}),getDaysWithRecordings:T(i({deviceId:a(),fromMs:a(),toMs:a(),tzOffsetMinutes:a()}),XD,{kind:`query`,auth:`protected`}),getDaysWithRecordingsBatch:T(i({deviceIds:p(a()).min(1).max(200),fromMs:a(),toMs:a(),tzOffsetMinutes:a()}),p($D).readonly(),{kind:`query`,auth:`protected`}),getPlaybackManifest:T(i({deviceId:a(),fromMs:a(),toMs:a()}),eO,{kind:`query`,auth:`protected`}),getStorageUsage:T(i({}),rO,{kind:`query`,auth:`admin`}),getDeviceConfig:T(i({deviceId:a()}),Bi,{kind:`query`,auth:`admin`}),locateSegment:T(i({deviceId:a(),profile:g(),epochMs:a()}),pO,{kind:`query`,auth:`admin`}),readSegmentBytes:T(i({deviceId:a(),profile:g(),startMs:a()}),mO,{kind:`query`,auth:`admin`}),readGopBytes:T(i({deviceId:a(),profile:g(),startMs:a(),epochMs:a()}),hO,{kind:`query`,auth:`admin`}),readWindowBytes:T(i({deviceId:a(),profile:g(),startMs:a(),fromMs:a(),toMs:a()}),gO,{kind:`query`,auth:`admin`}),setDeviceConfig:T(i({deviceId:a(),config:Bi}),Bi,{kind:`mutation`,auth:`admin`}),rescanStorage:T(i({deviceId:a()}),qD,{kind:`mutation`,auth:`admin`}),pruneFootage:T(i({deviceId:a(),reason:hi.optional()}),i({floorMs:a().nullable(),deletedBuckets:a().int(),reclaimedBytes:a().int()}),{kind:`mutation`,auth:`admin`}),deleteFootprint:T(i({deviceId:a(),fromMs:a().optional(),toMs:a().optional()}),i({deletedBuckets:a().int(),reclaimedBytes:a().int()}),{kind:`mutation`,auth:`admin`}),listOpsLog:T(_i,p(gi).readonly(),{kind:`query`,auth:`admin`}),renderGif:T(i({deviceId:a(),aroundMs:a(),preRollSec:a().min(0).max(30).default(2),postRollSec:a().min(0).max(30).default(5),maxWidth:a().int().min(120).max(1280).default(480),fps:a().int().min(1).max(15).default(5)}),i({gifBase64:g(),fromMs:a(),toMs:a()}),{kind:`mutation`,auth:`admin`}),renderClip:T(i({deviceId:a(),aroundMs:a(),preRollSec:a().min(0).max(30).default(3),postRollSec:a().min(0).max(30).default(7),maxWidth:a().int().min(160).max(1920).default(640)}),i({clipBase64:g(),mime:g(),fromMs:a(),toMs:a(),bytes:a().int()}),{kind:`mutation`,auth:`admin`}),pauseForStorageMigration:T(j,i({paused:y(!0)}),{kind:`mutation`,auth:`admin`}),resumeForStorageMigration:T(j,i({resumed:y(!0)}),{kind:`mutation`,auth:`admin`}),refreshStorageLocationsForMigration:T(j,i({refreshed:y(!0)}),{kind:`mutation`,auth:`admin`}),startStorageMigrationMove:T(ea,i({jobId:g()}),{kind:`mutation`,auth:`admin`}),getStorageMigrationMoveStatus:T(i({jobId:g()}),Zi.nullable(),{auth:`admin`}),cancelStorageMigrationMove:T(i({jobId:g()}),i({cancelled:v()}),{kind:`mutation`,auth:`admin`}),relocateFootage:T($i,i({jobId:g()}),{kind:`mutation`,auth:`admin`}),listRelocateJobs:T(i({}),p(Zi).readonly(),{kind:`query`,auth:`admin`}),getRelocateResidue:T(Ca,wa,{kind:`query`,auth:`admin`}),reconcileLedgerAgainstDisk:T(Ta,Aa,{kind:`mutation`,auth:`admin`}),cancelRelocateJob:T(i({jobId:g()}),i({cancelled:v()}),{kind:`mutation`,auth:`admin`}),planStorageRebalance:T(cO,sO,{kind:`query`,auth:`admin`}),startStorageRebalance:T(cO,sO,{kind:`mutation`,auth:`admin`}),getPlacement:T(i({}),dO,{kind:`query`,auth:`admin`}),setDevicePlacement:T(fO,i({ok:y(!0)}),{kind:`mutation`,auth:`admin`})}},vO=a().min(.25).max(32),yO=i({fromSec:a().nonnegative(),toSec:a().nonnegative()}).refine(e=>e.toSec>e.fromSec,{message:`dense range must have toSec > fromSec`}),bO=200,xO=i({everyMs:a().int().positive(),ranges:p(yO).min(1).max(200)}),SO=i({everyMs:a().int().positive(),outputFps:a().int().min(1).max(60).optional(),dense:xO.optional()}).superRefine((e,t)=>{e.dense!==void 0&&e.dense.everyMs>=e.everyMs&&t.addIssue({code:le.custom,message:`dense.everyMs must be strictly smaller than the base everyMs`,path:[`dense`,`everyMs`]})}),CO=i({speed:vO.optional(),timelapse:SO.optional(),includeAudio:v(),maxLifeMs:a().int().positive(),deleteAfterDownload:v(),title:g().max(200).optional(),notifyTargetIds:p(g().min(1)).max(20).optional()}).superRefine((e,t)=>{e.speed!==void 0&&e.timelapse!==void 0&&t.addIssue({code:le.custom,message:`speed and timelapse are mutually exclusive`,path:[`timelapse`]})}),wO=m([`queued`,`rendering`,`ready`,`failed`,`expired`,`deleted`]),TO=i({id:g(),deviceId:a(),profile:g(),fromMs:a(),toMs:a(),options:CO,state:wO,progressPct:a().nullable(),fileBytes:a().nullable(),expiresAt:a(),deleteAfterDownload:v(),downloadedAt:a().nullable(),createdAt:a(),createdBy:g(),error:g().nullable()}),EO=i({url:g(),endpoints:p(g())}),DO=50*1024*1024,OO=i({base64:g(),contentType:g(),name:g(),bytes:a().int().nonnegative()}),kO={name:`recording-export`,scope:`system`,mode:`singleton`,methods:{createExport:T(i({deviceId:a(),profile:g().optional(),profiles:p(g()).min(1).optional(),fromMs:a(),toMs:a(),options:CO}).superRefine((e,t)=>{(e.profiles!==void 0&&e.profiles.length>0?e.profiles:e.profile===void 0?[]:[e.profile]).length<1&&t.addIssue({code:le.custom,message:`pass profiles[] (min 1) or legacy profile`,path:[`profiles`]})}),TO,{kind:`mutation`,auth:`protected`}),listExports:T(i({deviceId:a().optional()}),p(TO),{kind:`query`,auth:`protected`}),getExport:T(i({exportId:g()}),TO,{kind:`query`,auth:`protected`}),cancelExport:T(i({exportId:g()}),TO,{kind:`mutation`,auth:`protected`}),deleteExport:T(i({exportId:g()}),TO,{kind:`mutation`,auth:`protected`}),getDownloadUrl:T(i({exportId:g()}),EO,{kind:`query`,auth:`protected`}),readExportBytes:T(i({exportId:g()}),OO,{kind:`query`,auth:`protected`})}},AO=i({active:v(),reason:g(),lastChangedAt:a()}),jO=AO.extend({lastFetchedAt:a()}),MO={name:`recording-signal`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[D.Camera],methods:{getStatus:T(i({deviceId:a()}),AO)},status:{schema:AO,kind:`push`,empty:{active:!1,reason:`unknown`,lastChangedAt:0}},runtimeState:jO,durability:`session`},NO=g(),PO=[`day`,`ir`,`night`,`dawn`,`dusk`],FO=m([`skip`,`judge-anyway`]),IO=`__diverged__`,LO=m([`matched`,`diverged`,`unknown`]),RO=m([`no-reference-for-condition`,`view-shifted`,`no-vision-profile`,`encoder-model-changed`,`no-snapshot`]),zO=i({embedding:p(a()),modelId:g(),condition:NO,capturedAt:a(),thumbnailMediaId:g().optional(),anchorEmbedding:p(a()).optional()}),BO=i({id:g(),label:g(),references:p(zO),textPrompts:p(g()).optional(),referenceCount:a(),currentlyMatched:v()}),VO=b(`mode`,[i({mode:y(`similarity`),threshold:a().min(0).max(1),hysteresisCount:a().int().positive()}),i({mode:y(`llm`),prompt:g(),profileId:g().optional(),hysteresisCount:a().int().positive()})]),HO=60,UO=120,WO=60,GO=.85,KO=`skip`,qO=8e3,JO=448,YO=!0,XO=i({enabled:v().default(!1),prompt:g().min(1).max(1e3),profileId:g().optional(),timeoutMs:a().int().min(1e3).max(2e4).default(qO),maxImagePx:a().int().min(64).max(2048).default(448),onTimeout:m([`flip`,`hold`]).default(`hold`)}),ZO=i({id:g(),label:g(),roi:_h,enabled:v(),triggerMode:m([`periodic`,`on-motion`,`both`]),checkIntervalSec:a().optional(),check:VO,states:p(BO),currentStateId:g().nullable(),lastCheckedAt:a().nullable(),lastConfidence:a().nullable(),currentCondition:NO.nullable(),availability:m([`ok`,`unavailable`]),unavailableReason:g().nullable(),baselineStateId:g().nullable(),emit:m([`latched`,`live`]).default(`latched`),verdict:LO,latched:v(),armedAt:a(),divergedAt:a().nullable(),restoredAt:a().nullable(),quietSeconds:a().int().min(0).max(3600).default(60),minObservationSpacingSec:a().int().min(0).max(3600).default(120),confirm:XO.optional(),anchorThreshold:a().min(0).max(1).default(GO),autoRestore:v().default(!1),onUncoveredCondition:FO.default(KO),suspendedCondition:NO.nullable().default(null),unavailable:RO.nullable(),coveredConditions:p(NO)}),QO=i({monitors:p(ZO),lastFetchedAt:a()}),$O=i({deviceId:a(),status:QO.nullable()}),ek={name:`scene-monitor`,scope:`device`,mode:`singleton`,kind:`wrapper`,defaultActive:!0,deviceTypes:[D.Camera],methods:{listScenes:T(i({deviceId:a()}),QO),listScenesBatch:T(i({deviceIds:p(a()).min(1).max(200)}),p($O).readonly()),createScene:T(i({deviceId:a(),label:g(),roi:_h,check:VO,triggerMode:m([`periodic`,`on-motion`,`both`]).optional(),checkIntervalSec:a().optional()}),ZO,{kind:`mutation`,auth:`admin`}),updateScene:T(i({deviceId:a(),monitorId:g(),patch:i({label:g().optional(),roi:_h.optional(),enabled:v().optional(),triggerMode:m([`periodic`,`on-motion`,`both`]).optional(),checkIntervalSec:a().optional(),check:VO.optional(),emit:m([`latched`,`live`]).optional(),quietSeconds:a().int().min(0).max(3600).optional(),minObservationSpacingSec:a().int().min(0).max(3600).optional(),anchorThreshold:a().min(0).max(1).optional(),autoRestore:v().optional(),onUncoveredCondition:FO.optional(),confirm:XO.nullable().optional()})}),h(),{kind:`mutation`,auth:`admin`}),deleteScene:T(i({deviceId:a(),monitorId:g()}),h(),{kind:`mutation`,auth:`admin`}),captureReference:T(i({deviceId:a(),monitorId:g(),stateId:g().optional(),label:g().optional(),condition:NO.optional()}),i({stateId:g(),referenceCount:a()}),{kind:`mutation`,auth:`admin`}),deleteReference:T(i({deviceId:a(),monitorId:g(),stateId:g(),index:a()}),h(),{kind:`mutation`,auth:`admin`}),recheckNow:T(i({deviceId:a(),monitorId:g()}),h(),{kind:`mutation`,auth:`admin`}),resetScene:T(i({deviceId:a(),monitorId:g(),recapture:v().optional()}),h(),{kind:`mutation`,auth:`admin`})},status:{schema:QO,kind:`push`},runtimeState:QO,durability:`session`},tk=i({isRunning:v(),lastRunAt:a(),lastRunSuccess:v().nullable(),lastError:g().nullable(),lastChangedAt:a()}),nk={name:`script-runner`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[D.Script],methods:{run:T(i({deviceId:a().int().nonnegative(),variables:n(g(),u()).optional()}),h(),{kind:`mutation`,auth:`admin`}),stop:T(i({deviceId:a().int().nonnegative()}),h(),{kind:`mutation`,auth:`admin`})},status:{schema:tk,kind:`push`},runtimeState:tk,durability:`session`},rk=i({detected:v(),lastChangedAt:a()}),ik={name:`smoke`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[D.Sensor],methods:{},status:{schema:rk,kind:`push`},runtimeState:rk,durability:`restored`,volatileStateFields:[`lastChangedAt`]},ak=i({camStreamId:g().min(1),kind:Ue,url:g().optional(),codec:g().optional(),resolution:C.optional(),fps:a().positive().optional(),label:g().optional(),deviceFeatures:p(g()).optional(),autoEligible:v().optional(),profileHint:S.optional(),metadata:n(g(),u()).optional()}),ok=i({descriptors:p(ak),lastFetchedAt:a()}),sk={name:`stream-catalog`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[D.Camera],methods:{getCatalog:T(i({deviceId:a().int().nonnegative()}),p(ak).readonly())},runtimeState:ok,durability:`restored`,volatileStateFields:[`lastFetchedAt`]},ck=m([`main`,`sub`,`ext`]),lk=i({width:a(),height:a(),codec:m([`h264`,`h265`]),framerate:a(),bitrate:a(),bitrateMode:m([`vbr`,`cbr`]).optional(),encoderProfile:m([`high`,`main`,`baseline`]).optional(),gop:a().optional(),audio:v().optional()}),uk=i({main:lk.optional(),sub:lk.optional(),ext:lk.optional(),lastFetchedAt:a()}),dk=i({resolutions:p(i({width:a(),height:a()})),codecs:p(m([`h264`,`h265`])),framerates:p(a()),bitrates:p(a()),bitrateRange:s([a(),a()]).optional(),supportsBitrateMode:v(),supportsEncoderProfile:v(),supportsGop:v(),gop:i({min:a(),max:a(),step:a()}).optional()}),fk=i({main:dk.optional(),sub:dk.optional(),ext:dk.optional()}),pk=i({width:a().optional(),height:a().optional(),codec:m([`h264`,`h265`]).optional(),framerate:a().optional(),bitrate:a().optional(),bitrateMode:m([`vbr`,`cbr`]).optional(),encoderProfile:m([`high`,`main`,`baseline`]).optional(),gop:a().optional()}),mk={name:`stream-params`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[D.Camera],deviceConfig:{ui:{kind:`derived-form`,builderId:`stream-params`,tab:`streaming`}},methods:{getOptions:T(i({deviceId:a()}),fk),setProfile:T(i({deviceId:a(),profile:ck,patch:pk}),h(),{kind:`mutation`,auth:`admin`}),getConfigSchema:T(i({deviceId:a()}),u().nullable())},status:{schema:uk,kind:`poll`},runtimeState:uk,durability:`restored`,volatileStateFields:[`lastFetchedAt`]},hk=[{profile:`main`,prefix:`streamMain`,label:`Main stream`},{profile:`sub`,prefix:`streamSub`,label:`Sub stream`},{profile:`ext`,prefix:`streamExt`,label:`Third stream`}];function gk(e,t,n){let r=[];if(t.resolutions.length>0){let i=t.resolutions.map(e=>({value:`${String(e.width)}x${String(e.height)}`,label:`${String(e.width)}×${String(e.height)}`})),a=n?`${String(n.width)}x${String(n.height)}`:void 0;a&&!i.some(e=>e.value===a)&&i.unshift({value:a,label:`${a.replace(`x`,`×`)} (current)`}),r.push({type:`select`,key:`${e.prefix}_resolution`,label:`Resolution`,options:i,default:a??i[0]?.value??``})}if(t.codecs.length>0&&r.push({type:`select`,key:`${e.prefix}_codec`,label:`Codec`,options:t.codecs.map(e=>({value:e,label:e===`h264`?`H.264`:`H.265`})),default:n?.codec??t.codecs[0]}),t.framerates.length>0){let i=t.framerates.map(e=>({value:String(e),label:`${String(e)} fps`})),a=n?.framerate;a!==void 0&&!t.framerates.includes(a)&&i.unshift({value:String(a),label:`${String(a)} fps (current)`}),r.push({type:`select`,key:`${e.prefix}_framerate`,label:`Frame rate`,options:i,default:a===void 0?i[0]?.value??``:String(a)})}if(t.bitrates.length>0){let i=t.bitrates.map(e=>({value:String(e),label:`${String(e)} kbps`})),a=n?.bitrate;a!==void 0&&!t.bitrates.includes(a)&&i.unshift({value:String(a),label:`${String(a)} kbps (current)`}),r.push({type:`select`,key:`${e.prefix}_bitrate`,label:`Bitrate`,options:i,default:a===void 0?i[0]?.value??``:String(a)})}else{let i=t.bitrateRange;r.push({type:`number`,key:`${e.prefix}_bitrate`,label:`Bitrate`,unit:`kbps`,...i?{min:i[0],max:i[1]}:{},default:n?.bitrate??i?.[0]??0})}if(t.supportsBitrateMode&&r.push({type:`select`,key:`${e.prefix}_bitrateMode`,label:`Bitrate mode`,options:[{value:`vbr`,label:`VBR (variable)`},{value:`cbr`,label:`CBR (constant)`}],default:n?.bitrateMode??`vbr`}),t.supportsEncoderProfile&&r.push({type:`select`,key:`${e.prefix}_encoderProfile`,label:`Encoder profile`,options:[{value:`baseline`,label:`Baseline`},{value:`main`,label:`Main`},{value:`high`,label:`High`}],default:n?.encoderProfile??`main`}),t.supportsGop){let i=t.gop;if(i){let t=[];for(let e=i.min;e<=i.max;e+=i.step)t.push({value:String(e),label:`${String(e)} s`});let a=n?.gop;a!==void 0&&!t.some(e=>e.value===String(a))&&t.unshift({value:String(a),label:`${String(a)} s (current)`}),r.push({type:`select`,key:`${e.prefix}_gop`,label:`I-frame interval (GOP)`,options:t,default:a===void 0?t[0]?.value??``:String(a)})}else r.push({type:`number`,key:`${e.prefix}_gop`,label:`I-frame interval (GOP)`,unit:`s`,min:1,default:n?.gop??1})}return r.length===0?null:{id:`stream-${e.profile}`,tab:`streaming`,title:e.label,description:`Encoder parameters pushed to the camera. Option lists are read live from the camera — fields the firmware doesn't expose are hidden.`,columns:2,fields:r}}function _k(e,t){let n=[];for(let r of hk){let i=e[r.profile];if(!i)continue;let a=gk(r,i,t?.[r.profile]);a&&n.push(a)}return n.length===0?null:{sections:n}}function vk(e,t){let n={},r=!1,i=`${t}_resolution`;if(i in e&&typeof e[i]==`string`){let[t,a]=e[i].split(`x`).map(Number);Number.isFinite(t)&&Number.isFinite(a)&&(n.width=t,n.height=a,r=!0)}let a=`${t}_codec`;a in e&&(e[a]===`h264`||e[a]===`h265`)&&(n.codec=e[a],r=!0);let o=`${t}_framerate`;if(o in e){let t=Number(e[o]);Number.isFinite(t)&&(n.framerate=t,r=!0)}let s=`${t}_bitrate`;if(s in e){let t=Number(e[s]);Number.isFinite(t)&&(n.bitrate=t,r=!0)}let c=`${t}_bitrateMode`;c in e&&(e[c]===`vbr`||e[c]===`cbr`)&&(n.bitrateMode=e[c],r=!0);let l=`${t}_encoderProfile`;l in e&&(e[l]===`high`||e[l]===`main`||e[l]===`baseline`)&&(n.encoderProfile=e[l],r=!0);let u=`${t}_gop`;if(u in e){let t=Number(e[u]);Number.isFinite(t)&&(n.gop=t,r=!0)}return r?n:null}var yk=i({on:v(),lastChangedAt:a()}),bk={name:`switch`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[D.Switch,D.Siren,D.Light],methods:{setState:T(i({deviceId:a(),on:v()}),h(),{kind:`mutation`,auth:`admin`})},events:{onStateChanged:{data:i({deviceId:a(),on:v(),lastChangedAt:a()})}},status:{schema:yk,kind:`command-driven`},runtimeState:yk,durability:`restored`,volatileStateFields:[`lastChangedAt`],settings:{bindings:[{kind:`scalar`,statusPath:`on`,method:`setState`,valueArg:`on`,field:{label:`On`,kind:`boolean`}}]}},xk=i({streaming:v(),notifications:v(),objectDetection:v(),remoteAccess:v(),agentCluster:v(),smartHome:v(),recordings:v(),backup:v(),repl:v()}),Sk=i({status:y(`ok`),uptime:a()}),Ck=i({name:g(),address:g(),family:g(),internal:v()}),wk=m([`operator-set`,`derived-from-ip`]),Tk=i({latitude:a().min(-90).max(90),longitude:a().min(-180).max(180),source:wk,updatedAt:a(),label:g().optional()}),Ek=i({location:Tk.nullable(),derivationAttemptedAt:a().nullable(),derivationError:g().nullable()}),Dk=i({latitude:a().min(-90).max(90),longitude:a().min(-180).max(180)}).nullable(),Ok=m([`http`,`ws`,`mesh`,`unknown`]),kk=i({http:a(),ws:a(),mesh:a(),unknown:a()}),Ak=i({plane:Ok,procedure:g(),userAgent:g(),ip:g(),principal:g(),calls:a(),subscriptions:a(),perMin:a()}),jk=i({procedure:g(),calls:a(),planes:kk,subscriptions:a(),perMin:a()}),Mk=i({armed:v(),elapsedMs:a(),windowMs:a(),armedUntilMs:a(),httpRequests:a(),batchedRequests:a(),procedureCalls:a(),planes:kk,planesExplainTotal:v(),wsConnections:a(),wsMessages:a(),subscriptions:a(),subscriptionStops:a(),distinctGroups:a(),unattributedCalls:a(),procedures:p(jk).readonly(),groups:p(Ak).readonly()}),Nk=Mk.extend({persisted:v()}),Pk=m([`debug`,`info`,`warn`,`error`]),Fk=m([`request-census`]),Ik=m([`cluster`,`node`,`component`]),Lk=m([`default`,`cluster`,`node`,`component`]),Rk=i({scope:Ik,nodeId:g().nullable(),component:g().nullable(),level:Pk.nullable()}),zk=i({level:Pk,levelSource:Lk}),Bk=i({layers:p(Rk).readonly()}),Vk=i({id:Fk,armed:v(),armedUntilMs:a(),remainingMs:a(),persisted:v()}),Hk=i({id:Fk,armMs:a().int().min(0),reportEveryMs:a().int().positive().optional()}),Uk=i({channel:g(),armed:v(),armedUntilMs:a(),remainingMs:a(),deviceIds:p(a().int()).readonly().nullable()}),Wk=i({channel:g().min(1),armMs:a().int().min(0),deviceIds:p(a().int()).readonly().nullable().optional()}),Gk=i({level:Pk.nullable().optional(),diagnostics:p(Hk).readonly().optional(),channels:p(Wk).readonly().optional()}),Kk=Cp.extend({addonId:g()}),qk=Lf.extend({addonId:g()}),Jk=i({scopeNodeId:g().optional(),scopeComponent:g().optional()}),Yk=i({scopeNodeId:g().optional(),scopeComponent:g().optional(),patch:Gk}),Xk=i({scopeNodeId:g().nullable(),scopeComponent:g().nullable(),effective:zk,explicit:Bk,activeWindows:p(Vk).readonly(),channels:p(_o).readonly(),activeChannels:p(Uk).readonly(),persisted:v()}),Zk={name:`system`,scope:`system`,mode:`singleton`,methods:{info:T(h(),xk),health:T(h(),Sk),featureFlags:T(h(),xk),networkAddresses:T(h(),p(Ck).readonly()),getRetentionConfig:T(h(),u().nullable(),{auth:`admin`}),setRetentionConfig:T(n(g(),u()),ce(),{kind:`mutation`,auth:`admin`}),forceRetentionCleanup:T(h(),h(),{kind:`mutation`,auth:`admin`}),getSiteLocation:T(h(),Ek),setSiteLocation:T(Dk,Ek,{kind:`mutation`,auth:`admin`}),detectSiteLocation:T(h(),Ek,{kind:`mutation`,auth:`admin`}),getRequestCensus:T(h(),Nk,{auth:`admin`}),getLoadContributions:T(h(),p(Kk).readonly(),{auth:`admin`}),getFailureContributions:T(h(),p(qk).readonly(),{auth:`admin`}),getLoggingSettings:T(Jk,Xk,{auth:`admin`}),setLoggingSettings:T(Yk,Xk,{kind:`mutation`,auth:`admin`})},mount:{kind:`server-provided`}},Qk=i({tampered:v(),lastChangedAt:a()}),$k={name:`tamper`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[D.Sensor],methods:{},status:{schema:Qk,kind:`push`},runtimeState:Qk,durability:`restored`,volatileStateFields:[`lastChangedAt`]},eA=i({celsius:a(),lastFetchedAt:a(),unit:g().optional(),precision:a().int().min(0).max(10).optional()}),tA={name:`temperature-sensor`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[D.Sensor,D.Thermostat],methods:{},status:{schema:eA,kind:`push`},runtimeState:eA,durability:`restored`,volatileStateFields:[`lastFetchedAt`]},nA=i({title:g(),message:g(),severity:m([`info`,`warning`,`critical`]),duration:a().optional(),action:i({label:g(),url:g()}).optional()}),rA={name:`toast`,scope:`system`,mode:`singleton`,methods:{onToast:T(h(),nA,{kind:`subscription`})},mount:{kind:`server-provided`}},iA=i({currentVersion:g().nullable(),availableVersion:g().nullable(),updatable:v(),state:g().nullable(),inProgress:v()}),aA={name:`update`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[D.Update],methods:{installUpdate:T(h(),h(),{kind:`mutation`,auth:`admin`})},status:{schema:iA,kind:`poll`},runtimeState:iA,durability:`session`},oA=i({id:g(),username:g(),isAdmin:v().default(!1),allowedProviders:c([p(g()),y(`*`)]),allowedDevices:n(g(),c([p(g()),y(`*`)])),scopes:p(q).default([]),totpEnabled:v().default(!1),createdAt:a(),updatedAt:a()}),sA=i({username:g(),password:g().min(6),isAdmin:v().default(!1),allowedProviders:c([p(g()),y(`*`)]).optional(),allowedDevices:n(g(),c([p(g()),y(`*`)])).optional(),scopes:p(q).optional()}),cA=i({id:g(),isAdmin:v().optional(),allowedProviders:c([p(g()),y(`*`)]).optional(),allowedDevices:n(g(),c([p(g()),y(`*`)])).optional(),scopes:p(q).optional()}),lA=i({id:g(),label:g(),isAdmin:v().default(!1),allowedProviders:c([p(g()),y(`*`)]).optional(),allowedDevices:n(g(),c([p(g()),y(`*`)])).optional(),tokenPrefix:g(),createdAt:a(),lastUsedAt:a().optional()}),uA=i({label:g(),isAdmin:v().default(!1),allowedProviders:c([p(g()),y(`*`)]).optional(),allowedDevices:n(g(),c([p(g()),y(`*`)])).optional()}),dA=i({token:g(),record:lA}),fA=i({id:g(),userId:g(),name:g(),tokenPrefix:g(),scopes:p(q),expiresAt:a().nullish(),lastUsedAt:a().nullish(),createdAt:a()}),pA=i({userId:g(),name:g(),scopes:p(q),expiresAt:a().optional()}),mA=i({token:g(),record:fA}),hA=i({id:g(),userId:g(),username:g(),integrationId:g(),scopes:p(q),createdAt:a(),lastUsedAt:a(),revokedAt:a().nullable()}),gA=i({secret:g(),otpauthUrl:g()}),_A=i({enabled:v(),confirmedAt:a().nullable()}),vA={name:`user-management`,scope:`system`,mode:`singleton`,methods:{listUsers:T(h(),p(oA),{auth:`admin`}),createUser:T(sA,oA,{kind:`mutation`,auth:`admin`,access:`create`}),updateUser:T(cA,i({success:y(!0)}),{kind:`mutation`,auth:`admin`,access:`create`}),deleteUser:T(i({id:g()}),i({success:y(!0)}),{kind:`mutation`,auth:`admin`,access:`delete`}),resetPassword:T(i({id:g(),newPassword:g().min(6)}),i({success:y(!0)}),{kind:`mutation`,auth:`admin`,access:`create`}),setUserScopes:T(i({userId:g(),scopes:p(q)}),i({success:y(!0)}),{kind:`mutation`,auth:`admin`,access:`create`}),validateCredentials:T(i({username:g(),password:g()}),oA.extend({passwordHash:g()}).nullable(),{kind:`mutation`,access:`view`}),listApiKeys:T(h(),p(lA),{auth:`admin`}),createApiKey:T(uA,dA,{kind:`mutation`,auth:`admin`,access:`create`}),revokeApiKey:T(i({id:g()}),i({success:y(!0)}),{kind:`mutation`,auth:`admin`,access:`delete`}),validateApiKey:T(i({token:g()}),lA.nullable(),{kind:`mutation`,access:`view`}),createScopedToken:T(pA,mA,{kind:`mutation`,auth:`admin`,access:`create`}),revokeScopedToken:T(i({id:g()}),i({success:y(!0)}),{kind:`mutation`,auth:`admin`,access:`delete`}),validateScopedToken:T(i({token:g()}),fA.nullable(),{access:`view`}),listScopedTokens:T(i({userId:g()}),p(fA),{auth:`admin`}),setupTotp:T(i({userId:g()}),gA,{kind:`mutation`,auth:`admin`,access:`create`}),confirmTotp:T(i({userId:g(),code:g()}),i({success:y(!0)}),{kind:`mutation`,auth:`admin`,access:`create`}),disableTotp:T(i({userId:g()}),i({success:y(!0)}),{kind:`mutation`,auth:`admin`,access:`delete`}),getTotpStatus:T(i({userId:g()}),_A,{auth:`admin`}),verifyTotp:T(i({userId:g(),code:g()}),i({valid:v()}),{kind:`mutation`,access:`view`}),oauthIssueCode:T(i({integrationId:g(),userId:g(),username:g(),scopes:p(q),redirectUri:g(),hubUrl:g(),codeChallenge:g().optional(),refreshTtlSec:c([a().int().positive(),y(`never`)]).optional()}),i({code:g()}),{kind:`mutation`,access:`create`}),oauthExchangeCode:T(i({code:g(),redirectUri:g(),codeVerifier:g().optional()}),i({accessToken:g(),refreshToken:g(),expiresIn:a()}).nullable(),{kind:`mutation`,access:`view`}),oauthRefresh:T(i({refreshToken:g()}),i({accessToken:g(),refreshToken:g(),expiresIn:a()}).nullable(),{kind:`mutation`,access:`view`}),oauthVerifyAccessToken:T(i({token:g()}),i({userId:g(),username:g(),scopes:p(q)}).nullable(),{access:`view`}),listOauthSessions:T(h(),p(hA),{auth:`admin`}),revokeOauthSession:T(i({id:g()}),i({success:v()}),{kind:`mutation`,auth:`admin`,access:`delete`})}},yA=m([`idle`,`cleaning`,`paused`,`returning`,`docked`,`drying`,`error`]),bA=i({level:a().min(0).max(100).nullable(),status:m([`ok`,`low`,`full`]).nullable()}),xA=i({state:yA,batteryLevel:a().min(0).max(100).nullable(),fanSpeed:g().nullable(),availableFanSpeeds:p(g()),cleanWater:bA.nullable(),dirtyWater:bA.nullable(),detergent:bA.nullable(),dustBin:bA.nullable(),progressPercent:a().min(0).max(100).nullable(),errorCode:a().nullable(),errorLabel:g().nullable(),lastChangedAt:a()}),SA={name:`vacuum-control`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[D.Vacuum],methods:{start:T(i({deviceId:a().int().nonnegative()}),h(),{kind:`mutation`,auth:`admin`}),pause:T(i({deviceId:a().int().nonnegative()}),h(),{kind:`mutation`,auth:`admin`}),stop:T(i({deviceId:a().int().nonnegative()}),h(),{kind:`mutation`,auth:`admin`}),returnToBase:T(i({deviceId:a().int().nonnegative()}),h(),{kind:`mutation`,auth:`admin`}),locate:T(i({deviceId:a().int().nonnegative()}),h(),{kind:`mutation`,auth:`admin`}),setFanSpeed:T(i({deviceId:a().int().nonnegative(),speed:g().min(1)}),h(),{kind:`mutation`,auth:`admin`})},status:{schema:xA,kind:`push`},runtimeState:xA,durability:`session`},CA=m([`open`,`opening`,`closing`,`closed`,`stopped`]),wA=i({state:CA,position:a().min(0).max(100).nullable(),lastChangedAt:a()}),TA={name:`valve`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[D.Valve],methods:{open:T(i({deviceId:a().int().nonnegative()}),h(),{kind:`mutation`,auth:`admin`}),close:T(i({deviceId:a().int().nonnegative()}),h(),{kind:`mutation`,auth:`admin`}),stop:T(i({deviceId:a().int().nonnegative()}),h(),{kind:`mutation`,auth:`admin`}),setPosition:T(i({deviceId:a().int().nonnegative(),position:a().min(0).max(100)}),h(),{kind:`mutation`,auth:`admin`})},status:{schema:wA,kind:`push`},runtimeState:wA,durability:`session`},EA=i({detected:v(),lastChangedAt:a()}),DA={name:`vibration`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[D.Sensor],methods:{},status:{schema:EA,kind:`push`},runtimeState:EA,durability:`restored`,volatileStateFields:[`lastChangedAt`]},OA=i({currentTemp:a().nullable(),targetTemp:a().nullable(),operationMode:g().nullable(),availableModes:p(g()),away:v().nullable(),minTemp:a().nullable(),maxTemp:a().nullable(),lastChangedAt:a()}),kA={name:`water-heater`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[D.WaterHeater],methods:{setTargetTemp:T(i({deviceId:a().int().nonnegative(),temp:a().finite()}),h(),{kind:`mutation`,auth:`admin`}),setOperationMode:T(i({deviceId:a().int().nonnegative(),mode:g().min(1)}),h(),{kind:`mutation`,auth:`admin`}),setAway:T(i({deviceId:a().int().nonnegative(),on:v()}),h(),{kind:`mutation`,auth:`admin`})},status:{schema:OA,kind:`push`},runtimeState:OA,durability:`session`},AA=i({condition:g().nullable(),temperature:a().nullable(),temperatureUnit:g().nullable(),humidity:a().min(0).max(100).nullable(),pressure:a().nullable(),pressureUnit:g().nullable(),windSpeed:a().nullable(),windSpeedUnit:g().nullable(),windBearing:a().nullable(),lastFetchedAt:a()}),jA={name:`weather`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[D.Weather],methods:{},status:{schema:AA,kind:`push`},runtimeState:AA,durability:`session`},MA=i({totalObjects:a().int().nonnegative(),byClass:n(g(),a().int().nonnegative())}),NA=MA.extend({zoneId:g(),zoneName:g(),trackIds:p(g()).readonly()}),PA=i({id:g(),className:g(),bbox:i({x:a(),y:a(),w:a(),h:a()}),frameWidth:a().int().nonnegative(),frameHeight:a().int().nonnegative(),firstSeenAt:a().int(),becameStationaryAt:a().int(),lastConfirmedAt:a().int(),label:g().optional(),keyFrameMediaKey:g().optional()}),FA=i({ts:a().int(),frameWidth:a().int().nonnegative(),frameHeight:a().int().nonnegative(),zones:p(NA).readonly(),frame:MA,unzoned:MA,stationaryObjects:p(PA).readonly().optional()}),IA=i({deviceId:a(),read:m([`read`,`unreadable`]),snapshot:FA.nullable()}),LA=m([`minute`,`5min`,`hour`]),RA=i({from:a().int(),to:a().int(),resolution:LA}),zA=i({ts:a().int(),count:a().int().nonnegative()}),BA={name:`zone-analytics`,scope:`device`,mode:`singleton`,deviceTypes:[D.Camera],methods:{getCurrentSnapshot:T(i({deviceId:a()}),FA.nullable()),getCurrentSnapshotBatch:T(i({deviceIds:p(a()).min(1).max(200)}),p(IA).readonly()),getZoneHistory:T(i({deviceId:a(),zoneId:g(),className:g().optional()}).extend(RA.shape),p(zA).readonly()),getCameraHistory:T(i({deviceId:a(),className:g().optional()}).extend(RA.shape),p(zA).readonly()),getUnzonedHistory:T(i({deviceId:a(),className:g().optional()}).extend(RA.shape),p(zA).readonly())},runtimeState:FA,durability:`session`},VA=m([`motion`,`detection`,`package`]),HA={name:`zone-rules`,scope:`device`,mode:`singleton`,deviceTypes:[D.Camera],methods:{listRules:T(i({deviceId:a(),stage:VA}),p(X).readonly()),setRules:T(i({deviceId:a(),stage:VA,rules:p(X).readonly()}),h(),{kind:`mutation`,auth:`admin`})},runtimeState:i({motion:p(X).readonly(),detection:p(X).readonly(),package:p(X).readonly()}),durability:`restored`},UA=[`decoder`,`motion-detection`,`pipeline-executor`,`audio-analyzer`,`pipeline-analytics`,`notification-output`],WA=[...UA,`pipeline-orchestrator`,`pipeline-runner`],GA=[{cap:`alarm-panel`,field:`state`},{cap:`cover`,field:`state`},{cap:`presence`,field:`state`},{cap:`lock`,field:`locked`,booleanWords:[`locked`,`unlocked`]},{cap:`contact`,field:`entryOpen`,booleanWords:[`open`,`closed`]},{cap:`switch`,field:`on`,booleanWords:[`on`,`off`]},{cap:`binary`,field:`on`,booleanWords:[`on`,`off`]}];function KA(e){for(let t of GA){let n=e[t.cap];if(typeof n!=`object`||!n)continue;let r=n[t.field];if(typeof r==`string`&&r.length>0)return r;if(typeof r==`boolean`&&t.booleanWords!==void 0)return r?t.booleanWords[0]:t.booleanWords[1]}}function qA(e,t=[]){for(let n of GA){let r=e[n.cap];if(typeof r!=`object`||!r)continue;if(n.booleanWords!==void 0)return[...n.booleanWords];if(n.cap===`alarm-panel`)return[...t];let i=r[n.field];return typeof i==`string`?[i]:[]}return[]}var JA={contact:`entryOpen`,binary:`on`,switch:`on`,motion:`detected`,flood:`flooded`,gas:`detected`,smoke:`detected`,"carbon-monoxide":`detected`,vibration:`detected`,tamper:`tampered`},YA={contact:`lastChangedAt`,binary:`lastChangedAt`,switch:`lastChangedAt`,motion:`lastDetectedAt`,flood:`lastChangedAt`,gas:`lastChangedAt`,smoke:`lastChangedAt`,"carbon-monoxide":`lastChangedAt`,vibration:`lastChangedAt`,tamper:`lastChangedAt`},XA=Object.keys(JA),ZA=[`sensor`,`switch`,`control`];function QA(e){return Object.prototype.hasOwnProperty.call(JA,e)}function $A(e,t){let n=JA[e];if(n===void 0)return null;let r=t[n];return typeof r==`boolean`?r:null}function ej(e,t){let n=YA[e];if(n===void 0)return null;let r=t[n];return typeof r!=`number`||!Number.isFinite(r)||r<=0?null:r}var tj=3e4;function nj(e){let t=$A(e.capName,e.slice);if(t===null)return{edge:`none`,value:null,reason:QA(e.capName)?`non-boolean-value`:`unknown-cap`};if(e.prior===void 0){if(!t)return{edge:`none`,value:t,reason:`baseline-seeded-inactive`};let n=ej(e.capName,e.slice),r=Math.max(e.startedAtMs,e.nowMs-e.firstSightingFreshnessMs);return n===null||n<r?{edge:`none`,value:t,reason:`baseline-seeded-stale-active`}:{edge:`rising`,value:!0}}return e.prior===t?{edge:`none`,value:t,reason:`no-change`}:t?{edge:`rising`,value:!0}:{edge:`none`,value:t,reason:`falling-edge`}}var rj=`camstack/camstack-models`,ij=`https://huggingface.co/${rj}/resolve/main`,aj=`30d`,oj={"features.streaming":!0,"features.notifications":!0,"features.objectDetection":!1,"features.remoteAccess":!0,"features.agentCluster":!1,"features.smartHome":!0,"features.recordings":!0,"features.backup":!0,"features.repl":!0,"retention.detectionEventsDays":30,"retention.audioLevelsDays":7,"logging.level":`info`,"logging.retentionDays":30,"eventBus.ringBufferSize":1e4,"storage.provider":`sqlite-storage`,"storage.locations":{data:`camstack-data/data`,media:`camstack-data/media`,recordings:`camstack-data/recordings`,cache:`/tmp/camstack-cache`,logs:`camstack-data/logs`,models:`camstack-data/models`},providers:[],"ffmpeg.binaryPath":`ffmpeg`,"ffmpeg.hwAccel":`auto`,"ffmpeg.threadCount":0,"auth.tokenExpiry":`30d`},Z={Siren:O.Siren,Floodlight:O.Floodlight,Spotlight:O.Spotlight,PirSensor:O.PirSensor,Chime:O.Chime,Autotrack:O.Autotrack,Nightvision:O.Nightvision,PrivacyMask:O.PrivacyMask},sj={[Z.Siren]:`Siren`,[Z.Floodlight]:`Floodlight`,[Z.Spotlight]:`Spotlight`,[Z.PirSensor]:`PIR`,[Z.Chime]:`Chime`,[Z.Autotrack]:`Autotracking`,[Z.Nightvision]:`Night Vision`,[Z.PrivacyMask]:`Privacy Mask`};function cj(e,t,n){let r=`${e}:${t}`;return typeof n==`number`?`${r}:${n}`:r}var lj=class e{schema;data;persistFn;constructor(e,t,n){this.schema=e,this.data=t,this.persistFn=n}static fromSchema(t,n,r={},i){let a=t.safeParse(r);if(a.success)return new e(t,a.data,n);let o=new Set;for(let e of a.error.issues){let t=e.path[0];typeof t==`string`&&o.add(t)}let s={...r};for(let e of o)delete s[e];let c=t.safeParse(s);return i?.({droppedKeys:[...o],issues:a.error.issues}),c.success?(n(c.data).catch(()=>{}),new e(t,c.data,n)):new e(t,t.parse({}),n)}get values(){return this.data}get(e){return this.data[e]}async set(e,t){let n=this.schema.parse({...this.data,[e]:t});this.data=n,await this.persistFn(this.data)}async setAll(e){let t=this.schema.parse({...this.data,...e});this.data=t,await this.persistFn(this.data)}async deleteKey(e){let{[e]:t,...n}=this.data,r=this.schema.parse(n);this.data=r,await this.persistFn(this.data)}entries(){let e=this.schema.shape;return Object.entries(e).map(([e,t])=>({key:e,schema:t,value:this.data[e],description:t.description}))}},uj=class e{writer;pendingWrites=new Set;slices;schemas=new Map;listeners=new Set;capListeners=new Map;constructor(e,t){this.writer=t,this.slices=new Map;for(let[t,n]of Object.entries(e))n&&typeof n==`object`&&!Array.isArray(n)&&this.slices.set(t,{...n})}static fromInitial(t,n){return new e(t,n)}installCapSchema(e,t){let n=this.schemas.get(e);if(n){if(n!==t)throw Error(`[DeviceRuntimeState] capability "${e}" registered a different runtime-state schema; each cap must declare ONE shape across every provider`);return}this.schemas.set(e,t);let r=this.slices.get(e);if(r){let n=t.safeParse(r);n.success?this.slices.set(e,n.data):this.slices.delete(e)}}getCapState(e){let t=this.slices.get(e);if(t)return Object.freeze({...t})}getCapField(e,t){return this.slices.get(e)?.[t]}setCapState(e,t){this.applyCapWrite(e,t,!1)}patchCapState(e,t){this.applyCapWrite(e,t,!0)}applyCapWrite(e,t,n){let r=this.schemas.get(e);if(!r)throw Error(`[DeviceRuntimeState] no schema registered for cap "${e}" — did the device register it via ctx.registerNativeCap before writing?`);let i=this.slices.get(e)??{},a=n?{...i,...t}:{...t},o=r.parse(a);if(dj(i,o))return;this.slices.set(e,o),this.fireListeners([e]);let s=this.writer(e,{...o}).catch(()=>{});this.pendingWrites.add(s),s.finally(()=>{this.pendingWrites.delete(s)})}fireListeners(e){let t=this.snapshot();for(let n of this.listeners)try{n(e,t)}catch{}for(let t of e){let e=this.capListeners.get(t);if(!e)continue;let n=this.getCapState(t);for(let t of e)try{t(n)}catch{}}}subscribe(e){return this.listeners.add(e),()=>{this.listeners.delete(e)}}subscribeCap(e,t){let n=this.capListeners.get(e);n||(n=new Set,this.capListeners.set(e,n));let r=e=>{t(e)};return n.add(r),()=>{let t=this.capListeners.get(e);t&&(t.delete(r),t.size===0&&this.capListeners.delete(e))}}snapshot(){let e={};for(let[t,n]of this.slices)e[t]=Object.freeze({...n});return Object.freeze(e)}async flush(){if(this.pendingWrites.size===0)return;let e=[...this.pendingWrites];await Promise.allSettled(e)}};function dj(e,t){let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let r of n)if(e[r]!==t[r])return!1;return!0}var fj={airQualitySensor:VS,alarmPanel:hh,ambientLightSensor:US,audioMetrics:JS,automationControl:XS,battery:QS,binary:eC,brightness:nC,cameraStreams:Ru,carbonMonoxide:cC,climateControl:dC,color:gC,connectivity:CC,consumables:EC,contact:OC,control:MC,cover:FC,dayNight:VC,deviceDiscovery:Pd,deviceStatus:UC,doorbell:KC,enumSensor:YC,eventEmitter:QC,fanControl:fw,featureProbe:mw,flood:gw,gas:vw,humidifier:bw,humiditySensor:Sw,image:ww,imageSettings:Nw,intercom:Kw,lawnMowerControl:Xw,lockControl:fT,mediaPlayer:_T,motion:wT,motionTrigger:DT,motionZones:MT,nativeObjectDetection:LT,navigation:ZT,networkLink:rE,notifier:AE,numericSensor:ME,petFeeder:QE,powerMeter:SD,presence:TD,pressureSensor:DD,privacyMask:ND,ptzAutotrack:GD,recordingSignal:MO,sceneMonitor:ek,scriptRunner:nk,smoke:ik,streamCatalog:sk,streamParams:mk,switch:bk,tamper:$k,temperatureSensor:tA,update:aA,vacuumControl:SA,valve:TA,vibration:DA,waterHeater:kA,weather:jA,zoneAnalytics:BA,zoneRules:HA,zones:T_},pj=class{id;stableId;type;name;parentDeviceId;role;get online(){return this.runtimeState.getCapState(`device-status`)?.online??!1}set online(e){this.markOnline(e)}get state(){if(!this._stateProxyCache){let e={},t={get:(t,n)=>{let r=n;if(r in e)return e[r];let i=fj[r];if(!i)return;let a=this.sliceProxy(i);return e[r]=a,a}};this._stateProxyCache=new Proxy(e,t)}return this._stateProxyCache}_stateProxyCache;config;runtimeState;ctx;location;disabled;_sourceInfoCache=null;constructor(e,t,n){if(this.ctx=e,this.id=e.id,this.stableId=e.stableId,this.type=n.type,!e.deviceMeta)throw Error(`BaseDevice constructor: ctx.deviceMeta is required (id=${e.id} stableId=${e.stableId})`);this.name=e.deviceMeta.name,this.location=e.deviceMeta.location,this.disabled=e.deviceMeta.disabled,this.role=n.role,this.parentDeviceId=e.parentDeviceId;let r=e.persistedConfig??{};this.config=lj.fromSchema(t,t=>e.persistConfig(t),r,({droppedKeys:t,issues:n})=>{e.logger.warn(`Device config recovery: dropping invalid persisted fields`,{tags:{deviceId:e.id,stableId:e.stableId},meta:{droppedKeys:[...t],firstIssue:n[0]?.message??null}})});let i=null,a=async(t,n)=>{i||=e.fetchDevice(e.id),await(await i).deviceState.setCapSlice({capName:t,slice:n})},o=e.initialRuntimeState??{};this.runtimeState=uj.fromInitial(o,a),e.bindRuntimeState?.(this.runtimeState),e.registerNativeCap?.(UC,{});let s={online:!0,lastChangedAt:Date.now()};this.runtimeState.setCapState(`device-status`,s),e.registerNativeCap?.(mw,{}),this.runtimeState.setCapState(`feature-probe`,{flags:{},deviceType:null,model:null,channelCount:null,lastProbedAt:0,lastFetchedAt:0})}deviceActions=new Map;registerDeviceAction(e,t,n){this.deviceActions.set(e,{spec:t,handler:n})}async runDeviceAction(e,t){let n=this.deviceActions.get(e);if(!n)throw Error(`unknown device action "${e}" on device ${this.id}`);let r=n.spec.input.parse(t);return n.handler(r)}async removeDevice(){}markOnline(e){if(this.online===e)return;let t={online:e,lastChangedAt:Date.now()};this.runtimeState.setCapState(`device-status`,t)}get sourceInfo(){if(this._sourceInfoCache)return this._sourceInfoCache;let e=Ad(this.ctx.deviceMeta.metadata)??Ed({stableId:this.stableId,addonId:this.ctx.deviceMeta.addonId});return this._sourceInfoCache=Object.freeze({...e}),this._sourceInfoCache}get sourceId(){return this.sourceInfo.id}async updateSourceInfo(e){let t=Dd(this.sourceInfo,e);this._sourceInfoCache=Object.freeze({...t});let n=this.ctx.api?.deviceManager?.setMetadata;if(n)try{await n.mutate({deviceId:this.id,patch:{[kd]:t}})}catch{}this.ctx.eventBus.emit(De(`device.source-info-changed`,{type:`device`,id:this.stableId},{deviceId:this.id,sourceInfo:t}))}async refreshFeatures(){let e=this.ctx.api?.deviceManager?.registerDevice;if(e)try{await e.mutate({addonId:this.ctx.deviceMeta.addonId,stableId:this.stableId,id:this.id,type:this.type,name:this.name,parentDeviceId:this.parentDeviceId,features:[...this.features],config:{}})}catch{}}getCapSlice(e){return this.runtimeState.getCapState(e.name)??null}setCapSlice(e,t){this.runtimeState.setCapState(e.name,t)}sliceProxy(e){return new Proxy({},{get:(t,n)=>this.runtimeState.getCapState(e.name)?.[n],set:(t,n,r)=>(this.runtimeState.patchCapState(e.name,{[n]:r}),!0),has:(t,n)=>{let r=this.runtimeState.getCapState(e.name);return r?n in r:!1},ownKeys:()=>{let t=this.runtimeState.getCapState(e.name);return t?Object.keys(t):[]},getOwnPropertyDescriptor:(t,n)=>{let r=this.runtimeState.getCapState(e.name);if(!(!r||!(n in r)))return{configurable:!0,enumerable:!0,value:r[n]}}})}getSettingsUISchema(){return{sections:[]}}async applySettingsPatch(e){await this.config.setAll(e)}async onProbe(){let e=this.runtimeState.getCapState(`feature-probe`)??{flags:{},deviceType:null,model:null,channelCount:null,lastProbedAt:0,lastFetchedAt:0};this.runtimeState.setCapState(`feature-probe`,{...e,lastProbedAt:Date.now()})}async onActivate(){}async reprobe(){this._kernelReprobe?await this._kernelReprobe():await this.onProbe()}_kernelReprobe;getAccessoryChildren(){return[]}getProbeFlags(){return this.runtimeState.getCapState(`feature-probe`)?.flags??{}}hasProbed(){return(this.runtimeState.getCapState(`feature-probe`)?.lastProbedAt??0)>0}},mj=[1e4,3e4,9e4],hj=4;function gj(e,t){return new Promise(n=>{if(t.aborted){n();return}let r=()=>{clearTimeout(i),n()},i=setTimeout(()=>{t.removeEventListener(`abort`,r),n()},e);i.unref?.(),t.addEventListener(`abort`,r,{once:!0})})}async function _j(e,t,n){let r=[...e],i=Math.max(1,Math.min(t,r.length));await Promise.all(Array.from({length:i},async()=>{for(;;){let e=r.shift();if(e===void 0)return;await n(e)}}))}var vj=class{#e;#t;#n;#r;#i;#a;#o=new AbortController;constructor(e){this.#e=e.logger,this.#t=e.attempt,this.#n=e.onPermanentFailure,this.#r=e.delaysMs??mj,this.#i=e.concurrency??4,this.#a=e.now??Date.now}cancel(){this.#o.abort()}async run(e){let t=e.map(e=>({saved:e.saved,lastError:e.error,attempts:1}));for(let e=0;e<this.#r.length&&!(t.length===0||this.#o.signal.aborted||(await gj(this.#r[e]??0,this.#o.signal),this.#o.signal.aborted));e+=1)t=await this.#s(t,e);if(this.#o.signal.aborted)return[];let n=t.map(e=>({deviceId:e.saved.id,stableId:e.saved.stableId,type:String(e.saved.type),attempts:e.attempts,lastError:e.lastError,failedAt:this.#a()}));for(let e of n)this.#n(e);return n}async#s(e,t){let n=[],r=e.filter(e=>e.saved.parentDeviceId===null),i=e.filter(e=>e.saved.parentDeviceId!==null);for(let e of[r,i])await _j(e,this.#i,async e=>{if(this.#o.signal.aborted){n.push(e);return}let r=e.attempts+1;try{await this.#t(e.saved),this.#e.info(`Device restored on retry`,{tags:{deviceId:e.saved.id,stableId:e.saved.stableId},meta:{attempt:r}})}catch(i){let a=i instanceof Error?i.message:String(i),o=this.#r.length-(t+1);this.#e.warn(`Device restore retry failed`,{tags:{deviceId:e.saved.id,stableId:e.saved.stableId},meta:{attempt:r,remainingRetries:o,error:a}}),n.push({saved:e.saved,lastError:a,attempts:r})}});return n}};function yj(e,t){let n={};for(let t of e.config.entries())n[t.key]=t.value;return{id:e.id,stableId:e.stableId,addonId:t,type:String(e.type),name:e.name,parentDeviceId:e.parentDeviceId,online:e.online,features:[...e.features],config:n,sourceInfo:e.sourceInfo}}var bj=class extends Fe{async onInitialize(){return this.ctx.logger.info(`${this.providerName} Provider initialized`),[{capability:uf,provider:this}]}async onShutdown(){this.cancelRestoreRetries();let e=await this.ctx.kernel.devices?.getAll()??[];for(let t of e)try{await this.ctx.kernel.devices?.decommission(t.id)}catch(e){this.ctx.logger.warn(`${this.providerName}: decommission failed`,{tags:{deviceId:t.id,stableId:t.stableId},meta:{error:e instanceof Error?e.message:String(e)}})}this.ctx.logger.info(`${this.providerName} Provider shut down`,{meta:{decommissionedCount:e.length}})}async start(){}async stop(){}async getStatus(){let e=await this.ctx.kernel.devices?.getAll()??[],t=this.restoreFailureSummary();return t===null?{connected:!0,deviceCount:e.length}:{connected:!0,deviceCount:e.length,error:t}}async getDevices(){return(await this.ctx.kernel.devices?.getAll()??[]).map(e=>({id:e.stableId,name:e.name,type:String(e.type)}))}async supportsDiscovery(){return!1}async discoverDevices(e){return[]}async getDiscoveryParamsSchema(){return null}async getManualCreationType(){return await this.supportsManualCreation()?{deviceType:Object.values(D).find(e=>this.deviceClasses[e]!==void 0)??null}:{deviceType:null}}async adoptDiscoveredDevice(e){throw Error(`${this.providerName} provider does not support discovery-based adoption`)}async supportsManualCreation(){return!0}async getChildCreationSchema(e){return this.onGetCreationSchema(e.type)}async createDevice(e){let t=await this.onCreateDevice(e.type,e.config),n=this.deviceClasses[t.meta.type];if(!n)throw Error(`${this.providerName} provider: no device class registered for type "${t.meta.type}" — add it to the deviceClasses map`);let r=this.generateStableId(t.meta.type,t.config),i=await this.ctx.kernel.devices.create(r,n,t.config,null,t.meta);if(t.onAfterCreate)try{await t.onAfterCreate(i)}catch(e){this.ctx.logger.warn(`createDevice: onAfterCreate hook threw — device is already registered`,{tags:{deviceId:i.id,stableId:r},meta:{error:e instanceof Error?e.message:String(e)}})}return this.toSummary(i)}generateStableId(e,t){return`${this.addonId}-${Date.now()}`}async testCreationField(e){return{status:`ok`,labels:[`probe not implemented`]}}async restoreDevices(e){let t=await this.onRestoreDevices(e);if(e.length===0)return;if(t&&t.failedCount>0){this.ctx.logger.warn(`Restored ${t.restoredCount}/${e.length} ${this.providerName} device(s) — ${t.failedCount} failed, bounded retry scheduled`);return}let n=t?t.restoredCount:e.length;this.ctx.logger.info(`Restored ${n} ${this.providerName} device(s)`)}restoreRetryDelaysMs=mj;restoreRetryConcurrency=4;_restoreRetryScheduler=null;_restoreRetryCompletion=null;_permanentRestoreFailures=new Map;get restoreRetryCompletion(){return this._restoreRetryCompletion}get permanentRestoreFailures(){return[...this._permanentRestoreFailures.values()]}restoreFailureSummary(){if(this._permanentRestoreFailures.size===0)return null;let e=[...this._permanentRestoreFailures.keys()].join(`, `);return`${this._permanentRestoreFailures.size} device(s) permanently failed restore (deviceIds: ${e}) — restart the ${this.providerName} provider to retry`}quarantineConfiglessTopLevelRestores=!0;isUnrestorableShell(e){if(!this.quarantineConfiglessTopLevelRestores||e.parentDeviceId!==null)return!1;let t=e.config;return t===void 0?!1:Object.keys(t).length===0}quarantineShell(e){this._permanentRestoreFailures.set(e.id,{deviceId:e.id,stableId:e.stableId,type:e.type,attempts:0,lastError:`persisted row has no configuration`,failedAt:Date.now()}),this.ctx.logger.error(`Persisted device row has NO configuration — quarantined: not restored, not retried. Remove it (deviceManager.removeDevice) or re-add the device.`,{tags:{deviceId:e.id,stableId:e.stableId},meta:{type:e.type,provider:this.providerName}})}cancelRestoreRetries(){this._restoreRetryScheduler?.cancel(),this._restoreRetryScheduler=null}recordPermanentRestoreFailure(e){this._permanentRestoreFailures.set(e.deviceId,e),this.ctx.logger.error(`Device restore permanently failed — its capabilities will not register until the provider restarts`,{tags:{deviceId:e.deviceId,stableId:e.stableId},meta:{type:e.type,attempts:e.attempts,error:e.lastError}})}scheduleRestoreRetries(e,t){let n=new vj({logger:this.ctx.logger,delaysMs:this.restoreRetryDelaysMs,concurrency:this.restoreRetryConcurrency,attempt:t,onPermanentFailure:e=>this.recordPermanentRestoreFailure(e)});this._restoreRetryScheduler=n,this._restoreRetryCompletion=n.run(e).then(()=>void 0).catch(e=>{this.ctx.logger.error(`Restore retry scheduler crashed`,{meta:{error:e instanceof Error?e.message:String(e)}})})}async reloadDevice(e){let{stableId:t}=e,n=this.ctx.kernel.devices;if(!n)throw Error(`${this.providerName}: kernel.devices unavailable — cannot reload`);let r=(await n.getAll()).find(e=>e.stableId===t);r&&await n.decommission(r.id);let{id:i}=await this.ctx.api.deviceManager.allocateDeviceId.mutate({addonId:this.addonId,stableId:t}),a=await this.ctx.api.deviceManager.loadMeta.query({deviceId:i});if(a===null)throw Error(`${this.providerName}: no persisted meta for "${t}" (id ${i}) — cannot reload`);let o=Object.values(D).find(e=>e===a.type),s=o===void 0?void 0:this.deviceClasses[o];if(!s)throw Error(`${this.providerName}: no device class for type "${a.type}" — "${t}" is an accessory child; reload its parent instead`);await n.create(t,s,{},a.parentDeviceId??null);let c=await this.ctx.api.deviceManager.listPersistedByAddon.query({addonId:this.addonId});for(let e of c){if(e.parentDeviceId!==i)continue;let t=Object.values(D).find(t=>t===e.type),r=t===void 0?void 0:this.deviceClasses[t];if(r)try{await n.create(e.stableId,r,{},i)}catch(t){this.ctx.logger.warn(`reloadDevice: failed to re-create first-class child`,{tags:{deviceId:e.id,stableId:e.stableId},meta:{parentDeviceId:i,error:t instanceof Error?t.message:String(t)}})}}return this.ctx.logger.info(`device reloaded in place from persisted rows`,{tags:{deviceId:i},meta:{stableId:t,type:a.type}}),{deviceId:i}}async healSavedConfig(e,t){}async onRestoreDevices(e){let t=new Set,n=[],r=new Set((await this.ctx.kernel.devices.getAll()).map(e=>e.stableId)),i=async n=>{if(t.has(n.id))return;if(r.has(n.stableId)){this.ctx.logger.debug(`Restore row already live — not dialled again`,{tags:{deviceId:n.id,stableId:n.stableId}}),t.add(n.id);return}let i=this.deviceClasses[n.type];if(!i)throw Error(`no device class registered for type "${n.type}"`);if(n.parentDeviceId!==null&&!t.has(n.parentDeviceId))throw Error(`parent device ${n.parentDeviceId} not restored`);await this.healSavedConfig(n,e);try{await this.ctx.kernel.devices.create(n.stableId,i,{},n.parentDeviceId)}catch(e){if(!(await this.ctx.kernel.devices.getAll()).some(e=>e.stableId===n.stableId))throw e;this.ctx.logger.debug(`Restore row came to life during its own dial — kept`,{tags:{deviceId:n.id,stableId:n.stableId}})}t.add(n.id)},a=e.filter(e=>e.parentDeviceId===null),o=async e=>{if(!this.deviceClasses[e.type]){this.ctx.logger.warn(`No device class registered for restored type — skipping`,{tags:{deviceId:e.id,stableId:e.stableId},meta:{type:e.type}});return}if(this.isUnrestorableShell(e)){this.quarantineShell(e);return}try{await i(e)}catch(t){let r=t instanceof Error?t.message:String(t);this.ctx.logger.warn(`Failed to restore device — bounded retry scheduled`,{tags:{deviceId:e.id,stableId:e.stableId},meta:{type:e.type,attempt:1,error:r}}),n.push({saved:e,error:r})}};await Promise.all(a.map(e=>o(e)));let s=new Set(n.map(e=>e.saved.id)),c=e.filter(e=>e.parentDeviceId!==null);for(let e of c)if(this.deviceClasses[e.type]&&e.parentDeviceId!==null){if(t.has(e.parentDeviceId)){try{await i(e)}catch(t){let r=t instanceof Error?t.message:String(t);this.ctx.logger.warn(`Failed to restore hub-adopted child — bounded retry scheduled`,{tags:{deviceId:e.id,stableId:e.stableId,parentDeviceId:e.parentDeviceId},meta:{type:e.type,attempt:1,error:r}}),n.push({saved:e,error:r})}continue}if(s.has(e.parentDeviceId)){this.ctx.logger.warn(`Hub-adopted child deferred — parent failed initial restore`,{tags:{deviceId:e.id,stableId:e.stableId,parentDeviceId:e.parentDeviceId},meta:{type:e.type}}),n.push({saved:e,error:`parent device ${e.parentDeviceId} not restored`});continue}}return n.length>0&&this.scheduleRestoreRetries(n,i),{restoredCount:t.size,failedCount:n.length}}toSummary(e){return yj(e,this.addonId)}},xj=360*6e4;function Sj(e){let t=e.status;if(!t)return`sleeping`;if(t.sleeping!==!0)return`awake`;let n=t.lastContactAt;if(typeof n!=`number`||n<=0)return`sleeping`;let r=e.unreachableAfterMs??216e5;return e.nowMs-n>r?`unreachable`:`sleeping`}function Cj(e){return e===`unreachable`}var wj=[`media-player`,`alarm-panel`,`thermostat`,`climate`,`humidifier`,`water-heater`,`lock`,`cover`,`valve`,`fan`,`vacuum`,`lawn-mower`,`light`,`switch`,`siren`,`button`,`control`,`notifier`,`script`,`automation`,`update`,`presence`,`weather`,`image`,`sensor`],Tj=[`contact-sensor`,`motion-sensor`,`occupancy-sensor`,`smoke-sensor`,`co-sensor`,`gas-sensor`,`leak-sensor`,`vibration-sensor`,`tamper-sensor`,`sound-sensor`];function Ej(e){if(e===void 0)return Tj.length;let t=Tj.indexOf(e);return t===-1?Tj.length:t}function Dj(e){let t=wj.indexOf(e);return t===-1?wj.length:t}function Oj(e,t,n){if(t!=null){let n=e.find(e=>e.stableId===t)??e.find(e=>e.entityId!==void 0&&e.entityId===t);if(n!==void 0)return n}let r=e=>n!==void 0&&n.length>0&&e.name!==void 0&&e.name.toLowerCase()===n.toLowerCase()?0:1;return[...e].toSorted((e,t)=>Ej(e.role)-Ej(t.role)||r(e)-r(t)||Dj(e.type)-Dj(t.type))[0]??null}var kj=`fixed`;function Aj(e){let t=e??`hub`;return t.includes(`/`)?t.split(`/`)[0]??`hub`:t}var jj=32,Mj=class{ports;constructor(e){let t=e.addonId;if(typeof t!=`string`||t.length===0)throw Error(`DeclaredDevices: addonId must be the declaring addon's id, got ${JSON.stringify(t)}. On an addon context it is \`ctx.id\` — there is no \`ctx.addonId\`.`);this.ports=e}async reconcile(e){if((e.placement??`hub`)===`hub`){let e=Aj(this.ports.localNodeId);if(e!==`hub`)return this.ports.logger.info(`declared devices are hub-owned — skipping on this node`,{meta:{nodeId:e,rawNodeId:this.ports.localNodeId??null}}),{integrationId:null,devices:[],removed:[],owned:!1}}let t=e.integrationId??await this.ensureIntegration(e.integrationName),n=await this.readIndex(),r=await this.readLiveByStableId(),i=[];for(let a of e.devices){let e=await this.applyDeclaration(a,t,n,r);e!==null&&i.push(e)}return{integrationId:t,devices:i,removed:await this.sweepWithdrawn(e.devices,t,n),owned:!0}}async ensureIntegration(e){let t=await this.ports.getIntegration(this.ports.addonId);if(t===null){let t=await this.ports.createIntegration({addonId:this.ports.addonId,name:e,info:{[kj]:!0}});return this.ports.logger.info(`declared a fixed integration`,{meta:{integrationId:t.id,name:e}}),t.id}return t.info?.fixed!==!0&&(await this.ports.updateIntegration({id:t.id,info:{[kj]:!0}}),this.ports.logger.info("re-asserted `fixed` on a declared integration",{meta:{integrationId:t.id}})),t.id}async readIndex(){let e=await this.ports.listOwnDevices();return new Map(e.map(e=>[e.stableId,e]))}async readLiveByStableId(){try{let e=await this.ports.devices.getAll();return new Map(e.map(e=>[e.stableId,e]))}catch(e){return this.ports.logger.warn(`could not read live devices — falling back to adopt-by-row`,{meta:{error:e instanceof Error?e.message:String(e)}}),new Map}}async applyDeclaration(e,t,n,r){try{let i=r.get(e.stableId);if(i!==void 0)return{stableId:e.stableId,deviceId:i.id,device:i,created:!1};let a=n.get(e.stableId);if(a===void 0&&(a=(await this.readIndex()).get(e.stableId),a!==void 0&&this.ports.logger.warn(`device index disagreed with itself — adopting instead of re-creating`,{tags:{deviceId:a.id},meta:{stableId:e.stableId,addonId:this.ports.addonId}})),a!==void 0){let n=await this.ports.devices.create(e.stableId,e.DeviceClass,{},null,void 0);return this.ports.logger.info(`declared device adopted`,{tags:{deviceId:n.id},meta:{stableId:e.stableId,integrationId:t}}),{stableId:e.stableId,deviceId:n.id,device:n,created:!1}}let o=await this.ports.devices.create(e.stableId,e.DeviceClass,e.config??{},null,{type:e.type,name:e.name,integrationId:t,...e.role===void 0?{}:{role:e.role}});return this.ports.logger.info(`declared device created`,{tags:{deviceId:o.id},meta:{stableId:e.stableId,integrationId:t}}),{stableId:e.stableId,deviceId:o.id,device:o,created:!0}}catch(t){return this.ports.logger.warn(`a declared device could not be brought up`,{meta:{stableId:e.stableId,error:t instanceof Error?t.message:String(t)}}),null}}async sweepWithdrawn(e,t,n){let r=new Set(e.map(e=>e.stableId)),i=[...n.values()].filter(e=>e.integrationId===t&&!r.has(e.stableId));if(i.length===0)return[];if(i.length>32)return this.ports.logger.warn(`withdrawal sweep exceeded its bound — removing nothing`,{meta:{integrationId:t,candidates:i.length,bound:32}}),[];let a=[];for(let e of i)try{await this.ports.devices.remove(e.id),a.push(e.id),this.ports.logger.info(`declared device removed — its declaration was withdrawn`,{tags:{deviceId:e.id},meta:{stableId:e.stableId,integrationId:t}})}catch(t){this.ports.logger.warn(`a withdrawn declared device could not be removed`,{tags:{deviceId:e.id},meta:{stableId:e.stableId,error:t instanceof Error?t.message:String(t)}})}return a}},Nj={[D.Cover]:`cover`,[D.Valve]:`valve`,[D.Humidifier]:`humidifier`,[D.WaterHeater]:`water-heater`,[D.Camera]:`dummy`,[D.Hub]:`dummy`,[D.Switch]:`switch`,[D.Siren]:`switch`,[D.Light]:`light`,[D.Fan]:`fan`,[D.Sensor]:`sensor`,[D.Thermostat]:`thermostat`,[D.Climate]:`climate`,[D.Button]:`button`,[D.EventEmitter]:`dummy`,[D.Update]:`update`,[D.Generic]:`dummy`,[D.Notifier]:`dummy`,[D.Script]:`script`,[D.Automation]:`automation`,[D.Lock]:`lock`,[D.MediaPlayer]:`media-player`,[D.AlarmPanel]:`alarm`,[D.Control]:`control`,[D.Presence]:`sensor`,[D.Weather]:`weather`,[D.Vacuum]:`vacuum`,[D.LawnMower]:`lawn-mower`,[D.Container]:`dummy`,[D.Image]:`image`,[D.PetFeeder]:`pet-feeder`},Pj=new Set(Object.values(D));function Fj(e){return Pj.has(e)?Nj[e]:null}var Ij=`motion-trigger`;function Lj(e){return e.includes(Ij)}var Rj=[`temperature-sensor`,`humidity-sensor`,`ambient-light-sensor`,`numeric-sensor`,`enum-sensor`];function zj(e){let t=new Set(e.features);switch(e.type){case D.Cover:return{kind:`cover`};case D.Valve:return{kind:`valve`};case D.Lock:return{kind:`lock`};case D.AlarmPanel:return{kind:`alarm`};case D.Light:return t.has(`brightness`)?{kind:`brightness`}:{kind:`switch`};case D.Switch:case D.Siren:return{kind:`switch`};case D.Sensor:case D.Presence:{let e=Rj.find(e=>t.has(e));return e?{kind:`sensor`,sensorFeature:e}:{kind:`none`}}default:return{kind:`none`}}}var Bj={"temperature-sensor":{capKey:`temperatureSensor`,field:`celsius`,fallbackUnit:`°C`},"humidity-sensor":{capKey:`humiditySensor`,field:`percent`,fallbackUnit:`%`},"ambient-light-sensor":{capKey:`ambientLightSensor`,field:`lux`,fallbackUnit:`lx`},"numeric-sensor":{capKey:`numericSensor`,field:`value`}};function Vj(e){return e!==null&&(typeof e==`object`||typeof e==`function`)}function Hj(e,t){if(!Vj(e))return null;let n=e[t];if(!Vj(n))return null;let r=n.mutate;return typeof r==`function`?r:null}function Uj(e,t){return!e||e.length===0?!1:e.includes(t.when.hasFeature)}var Wj={id:`battery`,label:`Battery-operated camera`,when:{hasFeature:Pt.BatteryOperated},defaults:{audioMode:`disabled`,detectionMode:`on-motion`},settings:{}},Gj=[Wj];function Kj(e){for(let t of Gj)if(Uj(e,t))return t;return null}function qj(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function Jj(e,t){let n=t.split(`.`),r=e;for(let e of n){if(!qj(r))return;r=r[e]}return r}function Yj(e,t,n){let r=t.indexOf(`.`);if(r===-1)return{...e,[t]:n};let i=t.slice(0,r),a=t.slice(r+1),o=e[i],s=qj(o)?o:{};return{...e,[i]:Yj(s,a,n)}}var Xj=3e4,Zj=3,Qj=1e4;async function $j(e,t,n){let r,i=new Promise((e,i)=>{r=setTimeout(()=>i(Error(`${n} timed out after ${String(t)}ms`)),t)});try{return await Promise.race([e,i])}finally{r!==void 0&&clearTimeout(r)}}function eM(e){let t=e.intervalMs??3e4,n=e.failuresToOffline??3,r=e.probeTimeoutMs??1e4,i=e.runImmediately??!0,a=!1,o=!1,s=0,c,l=async()=>{if(!a&&!o&&!(e.isEnabled&&!e.isEnabled())){o=!0;try{let t=await $j(Promise.resolve().then(e.probe),r,`reachability probe`);if(a)return;t?(s=0,e.setOnline(!0)):u(`probe resolved unreachable`)}catch(e){if(a)return;u(e instanceof Error?e.message:`probe threw`)}finally{o=!1}}},u=t=>{s+=1,e.logger?.debug(`reachability probe failed`,{reason:t,consecutiveFailures:s,failuresToOffline:n}),s>=n&&e.setOnline(!1)};return c=setInterval(()=>{l()},t),typeof c==`object`&&c&&`unref`in c&&c.unref(),i&&l(),{stop:()=>{a||(a=!0,c!==void 0&&clearInterval(c),c=void 0)}}}var tM=`lastFetchedAt`,nM=6e4,rM=10*6e4;function iM(e){let{runtimeState:t,cap:n,ownDeviceId:r,refresh:i,staleMs:a,empty:o,logger:s}=e,c=e.refreshMissCooldownMs??6e4,l=e.staleRead??`await-refresh`,u=0,d=null,f=()=>{let e=t.getCapState(n.name)?.[tM];return typeof e==`number`?e:0},p=e=>{u=Date.now()+c,s?.warn(`${n.name}: refresh did not land — serving the last slice and not re-reading the camera for ${String(c)}ms`,{tags:{deviceId:r},meta:{cooldownMs:c,error:e===void 0?null:e instanceof Error?e.message:String(e)}})},ee=async e=>{try{await i()}catch(e){throw p(e),e}if(f()>e){u!==0&&(u=0,s?.info(`${n.name}: refresh landed again — resuming normal polling`,{tags:{deviceId:r}}));return}p(void 0)},te=e=>{let t=d;if(t!==null)return t;let n=ee(e).catch(()=>void 0).finally(()=>{d=null});return d=n,n},ne=async()=>{let e=t.getCapState(n.name),r=f();if(e&&Date.now()-r<=a){u=0;return}if(!(Date.now()<u)){if(l===`serve-and-revalidate`){if(d!==null)return;if(e&&r>0){te(r);return}await te(r);return}await ee(r)}},re=()=>{let e=t.getCapState(n.name);if(!e)return o();let{[tM]:r,...i}=e;return i};return{ensureFresh:ne,getStatus:async({deviceId:e})=>{if(e!==r)throw Error(`${n.name}: deviceId mismatch, expected ${r}, got ${e}`);return await ne(),re()}}}function aM(e){let t=e;for(;t instanceof fe||t instanceof me||t instanceof ee;)t=t.unwrap();return t}function oM(e){let t=aM(e);return t instanceof ue?{kind:`enum`,enumValues:t.options}:t instanceof ne?{kind:`number`}:t instanceof re?{kind:`string`}:t instanceof ae?{kind:`boolean`}:null}function sM(e,t=``){let n=aM(e);if(!(n instanceof se))return[];let r=[],i=n.shape;for(let[e,n]of Object.entries(i)){let i=t?`${t}.${e}`:e,a=aM(n);if(a instanceof se){r.push(...sM(a,i));continue}let o=oM(n);o&&r.push({path:i,kind:o.kind,...o.enumValues?{enumValues:o.enumValues}:{}})}return r}function cM(e){return sM(e.itemSchema).filter(t=>t.path!==e.keyField).map(e=>({...e,item:!0}))}var lM=`device.state-changed`,uM=`capability.binding-changed`,dM=`device.registered`,fM=`device.unregistered`,pM=`device.updated`,mM=class{api;stateMirror=new Map;bindings=new Map;devices=new Map;handleListeners=new Map;globalStateListeners=new Set;capListeners=new Map;deviceListeners=new Map;addedListeners=new Set;removedListeners=new Set;pendingWaits=new Set;stateSource;bridges=[];initialized=!1;initPromise=null;constructor(e){this.api=e,this.stateSource=qt(this.stateMirror,this.handleListeners,this.api)}async init(e=15e3){if(!this.initialized){if(this.initPromise)return this.initPromise;this.initPromise=(async()=>{let t=(t,n)=>Number.isFinite(e)?new Promise((r,i)=>{let a=setTimeout(()=>i(Error(`SystemMirror.init: '${n}' timed out after ${e}ms`)),e);t.then(e=>{clearTimeout(a),r(e)},e=>{clearTimeout(a),i(e)})}):t,[n,r,i]=await Promise.all([t(this.api.deviceManager.getAllBindings.query({}),`deviceManager.getAllBindings`),t(this.api.deviceState.getAllSnapshots.query({}),`deviceState.getAllSnapshots`),t(this.api.deviceManager.listAll.query({}),`deviceManager.listAll`)]);for(let e of n)this.bindings.set(e.deviceId,e);for(let[e,t]of Object.entries(r)){let n=Number(e);if(!Number.isFinite(n))continue;let r=new Map;for(let[e,n]of Object.entries(t))r.set(e,n);this.stateMirror.set(n,r)}for(let e of i)this.devices.set(e.id,e);try{this.subscribeBus()}catch{}this.initialized=!0})();try{await this.initPromise}finally{this.initPromise=null}}}isReady(){return this.initialized}async awaitReady(){if(!this.initialized)return this.initPromise?this.initPromise:this.init()}dispose(){for(let e of this.bridges)try{e.unsubscribe()}catch{}this.bridges=[],this.handleListeners.clear(),this.globalStateListeners.clear(),this.capListeners.clear(),this.deviceListeners.clear(),this.addedListeners.clear(),this.removedListeners.clear(),this.pendingWaits.clear(),this.initialized=!1}getDeviceById(e){let t=this.bindings.get(e);return t?Yt(this.api,t,{stateSource:this.stateSource}):null}getDeviceByName(e){for(let t of this.devices.values())if(t.name===e)return this.getDeviceById(t.id);return null}getDeviceByStableId(e){for(let t of this.devices.values())if(t.stableId===e)return this.getDeviceById(t.id);return null}getDevicesByAddon(e){return this.query({addonId:e})}getDevicesByType(e){return this.query({type:e})}getDeviceInfo(e){return this.devices.get(e)??null}getAllDevices(){let e=[];for(let t of this.bindings.keys()){let n=this.getDeviceById(t);n&&e.push(n)}return e}filterByCap(e){return this.query({caps:e})}query(e={}){let t=[];for(let[n,r]of this.bindings){let i=this.devices.get(n);if(e.id!==void 0&&!hM(n,e.id)||e.stableId!==void 0&&(!i||!hM(i.stableId,e.stableId))||e.addonId!==void 0&&(!i||!hM(i.addonId,e.addonId))||e.type!==void 0&&(!i||!hM(i.type,e.type)))continue;if(e.caps!==void 0){let t=gM(e.caps),n=new Set(r.entries.map(e=>e.capName));if(!t.every(e=>n.has(e)))continue}if(e.anyCap!==void 0){let t=gM(e.anyCap),n=new Set(r.entries.map(e=>e.capName));if(!t.some(e=>n.has(e)))continue}if(e.name!==void 0&&(!i||!_M(i.name,e.name))||e.online!==void 0&&(!i||i.online!==e.online))continue;if(e.parentDeviceId!==void 0){if(!i)continue;let t=e.parentDeviceId;if((i.parentDeviceId??null)!==t)continue}if(e.feature!==void 0&&(!i||!gM(e.feature).every(e=>i.features.includes(e)))||e.isCamera!==void 0&&(!i||i.isCamera!==e.isCamera))continue;let a=this.getDeviceById(n);if(a){if(e.where&&i){if(!e.where(i,a))continue}else if(e.where&&!i)continue;t.push(a)}}return t}whereState(e,t){let n=[];for(let[r,i]of this.stateMirror){let a=i.get(e);if(!a||!t(a,r))continue;let o=this.getDeviceById(r);o&&n.push(o)}return n}mapState(e,t){let n=[];for(let[r,i]of this.stateMirror){let a=i.get(e);a&&n.push(t(a,r))}return n}findState(e,t){for(let[n,r]of this.stateMirror){let i=r.get(e);if(i&&t(i,n))return this.getDeviceById(n)}return null}countByCap(e){let t=0;for(let n of this.bindings.values())n.entries.some(t=>t.capName===e)&&t++;return t}countByState(e,t){let n=0;for(let[r,i]of this.stateMirror){let a=i.get(e);a&&t(a,r)&&n++}return n}listen(e){return this.globalStateListeners.add(e),()=>{this.globalStateListeners.delete(e)}}listenCap(e,t){let n=this.capListeners.get(e);return n||(n=new Set,this.capListeners.set(e,n)),n.add(t),()=>{n.delete(t),n.size===0&&this.capListeners.delete(e)}}listenDevice(e,t){let n=this.deviceListeners.get(e);return n||(n=new Set,this.deviceListeners.set(e,n)),n.add(t),()=>{n.delete(t),n.size===0&&this.deviceListeners.delete(e)}}onDeviceAdded(e){return this.addedListeners.add(e),()=>{this.addedListeners.delete(e)}}onDeviceRemoved(e){return this.removedListeners.add(e),()=>{this.removedListeners.delete(e)}}waitForState(e,t,n,r=3e4){return new Promise((i,a)=>{let o=(()=>{let r=this.stateMirror.get(e)?.get(t);return r&&n(r)?r:null})();if(o){i(o);return}let s=null,c=this.listenDevice(e,(e,r,a)=>{r===t&&a&&n(a)&&(s&&clearTimeout(s),c(),i(a))});Number.isFinite(r)&&(s=setTimeout(()=>{c(),a(Error(`waitForState timed out after ${r}ms (deviceId=${e}, capName=${t})`))},r))})}waitForDevice(e,t=3e4){return new Promise((n,r)=>{let i=this.getDeviceById(e);if(i){n(i);return}let a=null,o=this.onDeviceAdded(t=>{if(t!==e)return;let r=this.getDeviceById(t);r&&(a&&clearTimeout(a),o(),n(r))});Number.isFinite(t)&&(a=setTimeout(()=>{o(),r(Error(`waitForDevice timed out after ${t}ms (deviceId=${e})`))},t))})}async forEachCap(e,t){for(let n of this.filterByCap(e))await t(n)}async invokeCap(e,t,n,r={}){let i=this.filterByCap(e),a=Math.max(1,r.parallelism??i.length),o=[];for(let r=0;r<i.length;r+=a){let s=i.slice(r,r+a),c=await Promise.allSettled(s.map(async r=>{let i=r[e];if(!i||typeof i[t]!=`function`)throw Error(`device '${r.deviceId}' does not expose '${e}.${t}'`);return await i[t](n)}));for(let e=0;e<c.length;e++){let t=s[e],n=c[e];n.status===`fulfilled`?o.push({deviceId:t.deviceId,ok:!0,result:n.value}):o.push({deviceId:t.deviceId,ok:!1,error:n.reason})}}return o}summary(){let e={},t={},n={},r=0,i=0;for(let t of this.bindings.values())for(let n of t.entries)e[n.capName]=(e[n.capName]??0)+1;for(let e of this.devices.values())t[e.addonId]=(t[e.addonId]??0)+1,n[e.type]=(n[e.type]??0)+1,e.online?r++:i++;return{totalDevices:this.bindings.size,online:r,offline:i,byCap:e,byAddon:t,byType:n,statedDevices:this.stateMirror.size}}dump(e){let t=e=>{let t=this.devices.get(e)??null,n=this.bindings.get(e)??null,r={},i=this.stateMirror.get(e);if(i)for(let[e,t]of i)r[e]={...t};return{deviceId:e,info:t,binding:n?{...n,entries:n.entries.map(e=>({...e}))}:null,state:r}};if(e!==void 0)return t(e);let n=[];for(let e of this.bindings.keys())n.push(t(e));return n}getRawMirror(){return this.stateMirror}getSystemState(){let e=new Map;for(let[t,n]of this.stateMirror){let r=new Map;for(let[e,t]of n)r.set(e,{...t});e.set(t,r)}return e}subscribeBus(){if(!this.api.live?.onEvent)return;let e=this.api.live.onEvent;this.bridges.push(e.subscribe({category:lM},{onData:e=>{let t=e.data;!t||typeof t.deviceId!=`number`||typeof t.capName!=`string`||this.applyStateUpdate(t.deviceId,t.capName,t.slice)}})),this.bridges.push(e.subscribe({category:uM},{onData:e=>{let t=e.data,n=typeof t?.deviceId==`number`?t.deviceId:t?.source?.type===`device`&&typeof t.source.id==`number`?t.source.id:null;n!==null&&this.refreshBinding(n)}})),this.bridges.push(e.subscribe({category:dM},{onData:e=>{let t=e.data;typeof t?.deviceId==`number`&&this.refreshDeviceMetadata(t.deviceId,`added`)}})),this.bridges.push(e.subscribe({category:fM},{onData:e=>{let t=e.data;typeof t?.deviceId==`number`&&this.applyDeviceRemoval(t.deviceId)}})),this.bridges.push(e.subscribe({category:pM},{onData:e=>{let t=e.data;typeof t?.deviceId==`number`&&this.refreshDeviceMetadata(t.deviceId,`updated`)}}))}applyStateUpdate(e,t,n){let r=this.stateMirror.get(e);r||(r=new Map,this.stateMirror.set(e,r)),n===void 0?r.delete(t):r.set(t,n);let i=`${e}:${t}`,a=this.handleListeners.get(i);if(a)for(let e of a)try{e(n)}catch{}for(let r of this.globalStateListeners)try{r(e,t,n)}catch{}let o=this.capListeners.get(t);if(o)for(let t of o)try{t(e,n)}catch{}let s=this.deviceListeners.get(e);if(s)for(let r of s)try{r(e,t,n)}catch{}}applyDeviceRemoval(e){let t=this.devices.get(e)??null;this.bindings.delete(e),this.devices.delete(e),this.stateMirror.delete(e);for(let n of this.removedListeners)try{n(e,t)}catch{}}async refreshBinding(e){try{let t=await this.api.deviceManager.getBindings.query({deviceId:e});if(t.entries.length>0){this.bindings.set(e,t);return}if(await this.api.deviceManager.getDevice.query({deviceId:e})===null){this.applyDeviceRemoval(e);return}this.bindings.set(e,t)}catch{}}async refreshDeviceMetadata(e,t){try{let n=await this.api.deviceManager.getDevice.query({deviceId:e});if(!n)return;let r=!this.devices.has(e);if(this.devices.set(e,n),t===`added`&&r){await this.refreshBinding(e);for(let t of this.addedListeners)try{t(e,n)}catch{}}}catch{}}};function hM(e,t){return Array.isArray(t)?t.includes(e):e===t}function gM(e){return Array.isArray(e)?e:[e]}function _M(e,t){return typeof t==`string`?e===t:t instanceof RegExp?t.test(e):`exact`in t?e===t.exact:`contains`in t?e.toLowerCase().includes(t.contains.toLowerCase()):!1}function vM(e){return e.def}function yM(e){return e}function bM(e,t=`Configuration`,n=`main`){return{sections:[{id:n,title:t,fields:e.map(e=>xM(e.key,e.schema,e.description))}]}}function xM(e,t,n){let r=EM(t),i=DM(t),a={key:e,label:n??OM(e),description:n,default:i};return r instanceof re?SM(e,a):r instanceof ne?CM(r,a):r instanceof ae?{...a,type:`boolean`}:r instanceof ue?TM(r,a):r instanceof de||r instanceof se?{...a,type:`textarea`,rows:6,isJson:!0}:{...a,type:`text`}}function SM(e,t){let n=e.toLowerCase();return n.includes(`password`)||n.includes(`secret`)||n.includes(`token`)||n.includes(`apikey`)||n.includes(`api_key`)?{...t,type:`password`,showToggle:!0}:{...t,type:`text`}}function CM(e,t){let n=yM(e),r=n.minValue,i=n.maxValue,a=r!=null&&isFinite(r)?r:void 0,o=i!=null&&isFinite(i)?i:void 0,s=wM(e);return{...t,type:`number`,...a===void 0?{}:{min:a},...o===void 0?{}:{max:o},...s===void 0?{}:{step:s}}}function wM(e){let t=vM(e).checks??[];for(let e of t)if(e._zod?.def?.check===`multiple_of`&&e._zod.def.value!==void 0)return e._zod.def.value}function TM(e,t){let n=e.options.map(e=>String(e));return{...t,type:`select`,options:n.map(e=>({label:OM(e),value:e}))}}function EM(e){return e instanceof ee||e instanceof me||e instanceof fe?EM(vM(e).innerType):e}function DM(e){if(e instanceof ee)return vM(e).defaultValue}function OM(e){return e.replace(/([A-Z])/g,` $1`).replace(/[_-]/g,` `).replace(/^\w/,e=>e.toUpperCase()).trim()}var kM=`accessories.air-quality-sensor.alarm-panel.ambient-light-sensor.automation-control.battery.binary.brightness.broker.camera-credentials.carbon-monoxide.climate-control.color.connectivity.consumables.contact.control.cover.day-night.device-adoption.device-discovery.device-export.device-status.doorbell.enum-sensor.event-emitter.fan-control.feature-probe.flood.gas.humidifier.humidity-sensor.image.image-settings.intercom.lawn-mower-control.lock-control.media-player.motion.motion-trigger.motion-zones.mqtt-broker.native-object-detection.navigation.network-link.notifier.numeric-sensor.osd.pet-feeder.power-meter.presence.pressure-sensor.privacy-mask.ptz.ptz-autotrack.recording.recording-signal.scene-monitor.script-runner.smoke.snapshot.stream-params.switch.tamper.temperature-sensor.update.vacuum-control.valve.vibration.water-heater.weather`.split(`.`),AM={accessories:`accessories`,addonPages:`addon-pages`,addonPagesSource:`addon-pages-source`,addonRoutes:`addon-routes`,addonSettings:`addon-settings`,addonWidgets:`addon-widgets`,addonWidgetsSource:`addon-widgets-source`,addons:`addons`,adminUi:`admin-ui`,airQualitySensor:`air-quality-sensor`,alarmPanel:`alarm-panel`,alerts:`alerts`,ambientLightSensor:`ambient-light-sensor`,audioAnalysis:`audio-analysis`,audioAnalyzer:`audio-analyzer`,audioCodec:`audio-codec`,audioMetrics:`audio-metrics`,authProvider:`auth-provider`,automationControl:`automation-control`,backup:`backup`,battery:`battery`,binary:`binary`,brightness:`brightness`,broker:`broker`,button:`button`,cameraCredentials:`camera-credentials`,cameraPipelineConfig:`camera-pipeline-config`,cameraStreams:`camera-streams`,carbonMonoxide:`carbon-monoxide`,climateControl:`climate-control`,color:`color`,connectionTest:`connection-test`,connectivity:`connectivity`,consumables:`consumables`,contact:`contact`,control:`control`,coreBlocks:`core-blocks`,cover:`cover`,customModelRegistry:`custom-model-registry`,dataStoreProvider:`data-store-provider`,dayNight:`day-night`,decoder:`decoder`,detectionPipeline:`detection-pipeline`,deviceAdoption:`device-adoption`,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`,enumSensor:`enum-sensor`,eventEmitter:`event-emitter`,events:`events`,faceGallery:`face-gallery`,failureContribution:`failure-contribution`,fanControl:`fan-control`,featureProbe:`feature-probe`,filesystemBrowse:`filesystem-browse`,flood:`flood`,gas:`gas`,humidifier:`humidifier`,humiditySensor:`humidity-sensor`,image:`image`,imageSettings:`image-settings`,integrations:`integrations`,intercom:`intercom`,lawnMowerControl:`lawn-mower-control`,llm:`llm`,llmRuntime:`llm-runtime`,loadContribution:`load-contribution`,localNetwork:`local-network`,lockControl:`lock-control`,logChannels:`log-channels`,logDestination:`log-destination`,loginMethod:`login-method`,mediaPlayer:`media-player`,meshNetwork:`mesh-network`,metricsProvider:`metrics-provider`,modelConvert:`model-convert`,modelDistributor:`model-distributor`,motion:`motion`,motionDetection:`motion-detection`,motionTrigger:`motion-trigger`,motionZones:`motion-zones`,mqttBroker:`mqtt-broker`,nativeObjectDetection:`native-object-detection`,navigation:`navigation`,networkAccess:`network-access`,networkLink:`network-link`,networkQuality:`network-quality`,nodes:`nodes`,notificationOutput:`notification-output`,notificationRules:`notification-rules`,notifier:`notifier`,numericSensor:`numeric-sensor`,oauthIntegration:`oauth-integration`,osd:`osd`,osdManager:`osd-manager`,petFeeder:`pet-feeder`,pipelineAnalytics:`pipeline-analytics`,pipelineExecutor:`pipeline-executor`,pipelineOrchestrator:`pipeline-orchestrator`,pipelineRunner:`pipeline-runner`,plateGallery:`plate-gallery`,platformProbe:`platform-probe`,powerMeter:`power-meter`,presence:`presence`,pressureSensor:`pressure-sensor`,privacyMask:`privacy-mask`,ptz:`ptz`,ptzAutotrack:`ptz-autotrack`,reboot:`reboot`,recording:`recording`,recordingExport:`recording-export`,recordingSignal:`recording-signal`,sceneMonitor:`scene-monitor`,scriptRunner:`script-runner`,serverManagement:`server-management`,settingsStore:`settings-store`,smoke:`smoke`,smtpProvider:`smtp-provider`,snapshot:`snapshot`,ssoBridge:`sso-bridge`,storage:`storage`,storageEvictable:`storage-evictable`,storageMigration:`storage-migration`,storageOccupancy:`storage-occupancy`,storageProvider:`storage-provider`,streamBroker:`stream-broker`,streamCatalog:`stream-catalog`,streamParams:`stream-params`,switch:`switch`,system:`system`,tamper:`tamper`,temperatureSensor:`temperature-sensor`,terminalSession:`terminal-session`,toast:`toast`,turnProvider:`turn-provider`,update:`update`,userManagement:`user-management`,userPasskeys:`user-passkeys`,vacuumControl:`vacuum-control`,valve:`valve`,vectorStore:`vector-store`,vibration:`vibration`,videoclips:`videoclips`,viewerUi:`viewer-ui`,waterHeater:`water-heater`,weather:`weather`,webrtcSession:`webrtc-session`,zoneAnalytics:`zone-analytics`,zoneRules:`zone-rules`,zones:`zones`},jM=[{key:`accessories`,name:`accessories`},{key:`addonPages`,name:`addon-pages`},{key:`addonPagesSource`,name:`addon-pages-source`},{key:`addonRoutes`,name:`addon-routes`},{key:`addonSettings`,name:`addon-settings`},{key:`addonWidgets`,name:`addon-widgets`},{key:`addonWidgetsSource`,name:`addon-widgets-source`},{key:`addons`,name:`addons`},{key:`adminUi`,name:`admin-ui`},{key:`airQualitySensor`,name:`air-quality-sensor`},{key:`alarmPanel`,name:`alarm-panel`},{key:`alerts`,name:`alerts`},{key:`ambientLightSensor`,name:`ambient-light-sensor`},{key:`audioAnalysis`,name:`audio-analysis`},{key:`audioAnalyzer`,name:`audio-analyzer`},{key:`audioCodec`,name:`audio-codec`},{key:`audioMetrics`,name:`audio-metrics`},{key:`authProvider`,name:`auth-provider`},{key:`automationControl`,name:`automation-control`},{key:`backup`,name:`backup`},{key:`battery`,name:`battery`},{key:`binary`,name:`binary`},{key:`brightness`,name:`brightness`},{key:`broker`,name:`broker`},{key:`button`,name:`button`},{key:`cameraCredentials`,name:`camera-credentials`},{key:`cameraPipelineConfig`,name:`camera-pipeline-config`},{key:`cameraStreams`,name:`camera-streams`},{key:`carbonMonoxide`,name:`carbon-monoxide`},{key:`climateControl`,name:`climate-control`},{key:`color`,name:`color`},{key:`connectionTest`,name:`connection-test`},{key:`connectivity`,name:`connectivity`},{key:`consumables`,name:`consumables`},{key:`contact`,name:`contact`},{key:`control`,name:`control`},{key:`coreBlocks`,name:`core-blocks`},{key:`cover`,name:`cover`},{key:`customModelRegistry`,name:`custom-model-registry`},{key:`dataStoreProvider`,name:`data-store-provider`},{key:`dayNight`,name:`day-night`},{key:`decoder`,name:`decoder`},{key:`detectionPipeline`,name:`detection-pipeline`},{key:`deviceAdoption`,name:`device-adoption`},{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:`enumSensor`,name:`enum-sensor`},{key:`eventEmitter`,name:`event-emitter`},{key:`events`,name:`events`},{key:`faceGallery`,name:`face-gallery`},{key:`failureContribution`,name:`failure-contribution`},{key:`fanControl`,name:`fan-control`},{key:`featureProbe`,name:`feature-probe`},{key:`filesystemBrowse`,name:`filesystem-browse`},{key:`flood`,name:`flood`},{key:`gas`,name:`gas`},{key:`humidifier`,name:`humidifier`},{key:`humiditySensor`,name:`humidity-sensor`},{key:`image`,name:`image`},{key:`imageSettings`,name:`image-settings`},{key:`integrations`,name:`integrations`},{key:`intercom`,name:`intercom`},{key:`lawnMowerControl`,name:`lawn-mower-control`},{key:`llm`,name:`llm`},{key:`llmRuntime`,name:`llm-runtime`},{key:`loadContribution`,name:`load-contribution`},{key:`localNetwork`,name:`local-network`},{key:`lockControl`,name:`lock-control`},{key:`logChannels`,name:`log-channels`},{key:`logDestination`,name:`log-destination`},{key:`loginMethod`,name:`login-method`},{key:`mediaPlayer`,name:`media-player`},{key:`meshNetwork`,name:`mesh-network`},{key:`metricsProvider`,name:`metrics-provider`},{key:`modelConvert`,name:`model-convert`},{key:`modelDistributor`,name:`model-distributor`},{key:`motion`,name:`motion`},{key:`motionDetection`,name:`motion-detection`},{key:`motionTrigger`,name:`motion-trigger`},{key:`motionZones`,name:`motion-zones`},{key:`mqttBroker`,name:`mqtt-broker`},{key:`nativeObjectDetection`,name:`native-object-detection`},{key:`navigation`,name:`navigation`},{key:`networkAccess`,name:`network-access`},{key:`networkLink`,name:`network-link`},{key:`networkQuality`,name:`network-quality`},{key:`nodes`,name:`nodes`},{key:`notificationOutput`,name:`notification-output`},{key:`notificationRules`,name:`notification-rules`},{key:`notifier`,name:`notifier`},{key:`numericSensor`,name:`numeric-sensor`},{key:`oauthIntegration`,name:`oauth-integration`},{key:`osd`,name:`osd`},{key:`osdManager`,name:`osd-manager`},{key:`petFeeder`,name:`pet-feeder`},{key:`pipelineAnalytics`,name:`pipeline-analytics`},{key:`pipelineExecutor`,name:`pipeline-executor`},{key:`pipelineOrchestrator`,name:`pipeline-orchestrator`},{key:`pipelineRunner`,name:`pipeline-runner`},{key:`plateGallery`,name:`plate-gallery`},{key:`platformProbe`,name:`platform-probe`},{key:`powerMeter`,name:`power-meter`},{key:`presence`,name:`presence`},{key:`pressureSensor`,name:`pressure-sensor`},{key:`privacyMask`,name:`privacy-mask`},{key:`ptz`,name:`ptz`},{key:`ptzAutotrack`,name:`ptz-autotrack`},{key:`reboot`,name:`reboot`},{key:`recording`,name:`recording`},{key:`recordingExport`,name:`recording-export`},{key:`recordingSignal`,name:`recording-signal`},{key:`sceneMonitor`,name:`scene-monitor`},{key:`scriptRunner`,name:`script-runner`},{key:`serverManagement`,name:`server-management`},{key:`settingsStore`,name:`settings-store`},{key:`smoke`,name:`smoke`},{key:`smtpProvider`,name:`smtp-provider`},{key:`snapshot`,name:`snapshot`},{key:`ssoBridge`,name:`sso-bridge`},{key:`storage`,name:`storage`},{key:`storageEvictable`,name:`storage-evictable`},{key:`storageMigration`,name:`storage-migration`},{key:`storageOccupancy`,name:`storage-occupancy`},{key:`storageProvider`,name:`storage-provider`},{key:`streamBroker`,name:`stream-broker`},{key:`streamCatalog`,name:`stream-catalog`},{key:`streamParams`,name:`stream-params`},{key:`switch`,name:`switch`},{key:`system`,name:`system`},{key:`tamper`,name:`tamper`},{key:`temperatureSensor`,name:`temperature-sensor`},{key:`terminalSession`,name:`terminal-session`},{key:`toast`,name:`toast`},{key:`turnProvider`,name:`turn-provider`},{key:`update`,name:`update`},{key:`userManagement`,name:`user-management`},{key:`userPasskeys`,name:`user-passkeys`},{key:`vacuumControl`,name:`vacuum-control`},{key:`valve`,name:`valve`},{key:`vectorStore`,name:`vector-store`},{key:`vibration`,name:`vibration`},{key:`videoclips`,name:`videoclips`},{key:`viewerUi`,name:`viewer-ui`},{key:`waterHeater`,name:`water-heater`},{key:`weather`,name:`weather`},{key:`webrtcSession`,name:`webrtc-session`},{key:`zoneAnalytics`,name:`zone-analytics`},{key:`zoneRules`,name:`zone-rules`},{key:`zones`,name:`zones`}],MM=[sS,Rc,Bc,Wc,Yc,nl,el,zS,Nt,VS,hh,sl,US,cl,bl,Ol,JS,Al,XS,Hl,QS,eC,nC,lu,rC,oC,uu,Ru,cC,dC,gC,xC,CC,EC,OC,MC,id,FC,ld,yd,VC,Cd,wd,qd,Pd,nf,jf,Ut,uf,Mf,UC,KC,Ff,YC,QC,ew,lw,Rf,fw,mw,Vf,gw,vw,bw,Sw,ww,Nw,Hw,Kw,Xw,bp,sp,wp,lT,fT,Ep,kp,Fp,_T,xT,tm,rm,om,wT,lm,DT,MT,xm,LT,ZT,Tm,rE,sE,CE,Vm,kg,AE,ME,Vg,RE,KE,QE,fy,y_,Cb,By,iD,bD,SD,TD,DD,ND,BD,GD,KD,_O,kO,MO,ek,nk,zb,_d,ik,Wb,qb,Yb,Zb,ex,tx,rx,hx,Nu,sk,mk,bk,Zk,$k,tA,wx,rA,Ex,aA,vA,Ox,SA,TA,Xx,DA,tS,zt,kA,jA,aS,BA,HA,T_],NM=Object.freeze({"accessories.setChildHidden":{capName:`accessories`,capScope:`device`,addonId:null,access:`create`},"addonPages.listPages":{capName:`addon-pages`,capScope:`system`,addonId:null,access:`view`},"addonPagesSource.listPages":{capName:`addon-pages-source`,capScope:`system`,addonId:null,access:`view`},"addonRoutes.getRoutes":{capName:`addon-routes`,capScope:`system`,addonId:null,access:`view`},"addonRoutes.invoke":{capName:`addon-routes`,capScope:`system`,addonId:null,access:`create`},"addons.applyAutoUpdateToAll":{capName:`addons`,capScope:`system`,addonId:null,access:`create`},"addons.cancelJob":{capName:`addons`,capScope:`system`,addonId:null,access:`create`},"addons.custom":{capName:`addons`,capScope:`system`,addonId:null,access:`create`},"addons.forceRefresh":{capName:`addons`,capScope:`system`,addonId:null,access:`create`},"addons.getAddonAutoUpdate":{capName:`addons`,capScope:`system`,addonId:null,access:`view`},"addons.getAutoUpdateSettings":{capName:`addons`,capScope:`system`,addonId:null,access:`view`},"addons.getJob":{capName:`addons`,capScope:`system`,addonId:null,access:`view`},"addons.getLastRestart":{capName:`addons`,capScope:`system`,addonId:null,access:`view`},"addons.getLogs":{capName:`addons`,capScope:`system`,addonId:null,access:`view`},"addons.getVersions":{capName:`addons`,capScope:`system`,addonId:null,access:`view`},"addons.installFromWorkspace":{capName:`addons`,capScope:`system`,addonId:null,access:`create`},"addons.installPackage":{capName:`addons`,capScope:`system`,addonId:null,access:`create`},"addons.isWorkspaceAvailable":{capName:`addons`,capScope:`system`,addonId:null,access:`view`},"addons.list":{capName:`addons`,capScope:`system`,addonId:null,access:`view`},"addons.listCapabilityProviders":{capName:`addons`,capScope:`system`,addonId:null,access:`view`},"addons.listFrameworkPackages":{capName:`addons`,capScope:`system`,addonId:null,access:`view`},"addons.listJobs":{capName:`addons`,capScope:`system`,addonId:null,access:`view`},"addons.listPackages":{capName:`addons`,capScope:`system`,addonId:null,access:`view`},"addons.listUpdates":{capName:`addons`,capScope:`system`,addonId:null,access:`view`},"addons.listWorkspacePackages":{capName:`addons`,capScope:`system`,addonId:null,access:`view`},"addons.onAddonLogs":{capName:`addons`,capScope:`system`,addonId:null,access:`view`},"addons.reloadPackages":{capName:`addons`,capScope:`system`,addonId:null,access:`create`},"addons.restartAddon":{capName:`addons`,capScope:`system`,addonId:null,access:`create`},"addons.restartServer":{capName:`addons`,capScope:`system`,addonId:null,access:`create`},"addons.retryLoad":{capName:`addons`,capScope:`system`,addonId:null,access:`create`},"addons.rollbackPackage":{capName:`addons`,capScope:`system`,addonId:null,access:`create`},"addons.searchAvailable":{capName:`addons`,capScope:`system`,addonId:null,access:`view`},"addons.setAddonAutoUpdate":{capName:`addons`,capScope:`system`,addonId:null,access:`create`},"addons.setAutoUpdateSettings":{capName:`addons`,capScope:`system`,addonId:null,access:`create`},"addons.setCapabilityProviderEnabled":{capName:`addons`,capScope:`system`,addonId:null,access:`create`},"addons.startJob":{capName:`addons`,capScope:`system`,addonId:null,access:`create`},"addons.uninstallPackage":{capName:`addons`,capScope:`system`,addonId:null,access:`delete`},"addons.updatePackage":{capName:`addons`,capScope:`system`,addonId:null,access:`create`},"addonSettings.getDeviceSettings":{capName:`addon-settings`,capScope:`system`,addonId:null,access:`view`},"addonSettings.getGlobalSettings":{capName:`addon-settings`,capScope:`system`,addonId:null,access:`view`},"addonSettings.getIntegrationSettings":{capName:`addon-settings`,capScope:`system`,addonId:null,access:`view`},"addonSettings.updateDeviceSettings":{capName:`addon-settings`,capScope:`system`,addonId:null,access:`create`},"addonSettings.updateGlobalSettings":{capName:`addon-settings`,capScope:`system`,addonId:null,access:`create`},"addonWidgets.listWidgets":{capName:`addon-widgets`,capScope:`system`,addonId:null,access:`view`},"addonWidgetsSource.listWidgets":{capName:`addon-widgets-source`,capScope:`system`,addonId:null,access:`view`},"adminUi.getStaticDir":{capName:`admin-ui`,capScope:`system`,addonId:null,access:`view`},"adminUi.getVersion":{capName:`admin-ui`,capScope:`system`,addonId:null,access:`view`},"alarmPanel.arm":{capName:`alarm-panel`,capScope:`device`,addonId:null,access:`create`},"alarmPanel.disarm":{capName:`alarm-panel`,capScope:`device`,addonId:null,access:`create`},"alarmPanel.trigger":{capName:`alarm-panel`,capScope:`device`,addonId:null,access:`create`},"alerts.dismiss":{capName:`alerts`,capScope:`system`,addonId:null,access:`create`},"alerts.emit":{capName:`alerts`,capScope:`system`,addonId:null,access:`create`},"alerts.getUnreadCount":{capName:`alerts`,capScope:`system`,addonId:null,access:`view`},"alerts.list":{capName:`alerts`,capScope:`system`,addonId:null,access:`view`},"alerts.markAllRead":{capName:`alerts`,capScope:`system`,addonId:null,access:`create`},"alerts.markRead":{capName:`alerts`,capScope:`system`,addonId:null,access:`create`},"alerts.update":{capName:`alerts`,capScope:`system`,addonId:null,access:`create`},"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`},"automationControl.disable":{capName:`automation-control`,capScope:`device`,addonId:null,access:`create`},"automationControl.enable":{capName:`automation-control`,capScope:`device`,addonId:null,access:`create`},"automationControl.trigger":{capName:`automation-control`,capScope:`device`,addonId:null,access:`create`},"backup.cancel":{capName:`backup`,capScope:`system`,addonId:null,access:`create`},"backup.delete":{capName:`backup`,capScope:`system`,addonId:null,access:`delete`},"backup.deleteSchedule":{capName:`backup`,capScope:`system`,addonId:null,access:`delete`},"backup.getEntries":{capName:`backup`,capScope:`system`,addonId:null,access:`view`},"backup.list":{capName:`backup`,capScope:`system`,addonId:null,access:`view`},"backup.listArchives":{capName:`backup`,capScope:`system`,addonId:null,access:`view`},"backup.listDestinations":{capName:`backup`,capScope:`system`,addonId:null,access:`view`},"backup.listLocations":{capName:`backup`,capScope:`system`,addonId:null,access:`view`},"backup.listRuns":{capName:`backup`,capScope:`system`,addonId:null,access:`view`},"backup.listSchedules":{capName:`backup`,capScope:`system`,addonId:null,access:`view`},"backup.previewSchedule":{capName:`backup`,capScope:`system`,addonId:null,access:`view`},"backup.restore":{capName:`backup`,capScope:`system`,addonId:null,access:`create`},"backup.trigger":{capName:`backup`,capScope:`system`,addonId:null,access:`create`},"backup.upsertDestinationPolicy":{capName:`backup`,capScope:`system`,addonId:null,access:`create`},"backup.upsertSchedule":{capName:`backup`,capScope:`system`,addonId:null,access:`create`},"battery.wakeForStream":{capName:`battery`,capScope:`device`,addonId:null,access:`create`},"brightness.setBrightness":{capName:`brightness`,capScope:`device`,addonId:null,access:`create`},"broker.add":{capName:`broker`,capScope:`system`,addonId:null,access:`create`},"broker.get":{capName:`broker`,capScope:`system`,addonId:null,access:`view`},"broker.getBrokerConfig":{capName:`broker`,capScope:`system`,addonId:null,access:`view`},"broker.getSettings":{capName:`broker`,capScope:`system`,addonId:null,access:`view`},"broker.getSettingsSchema":{capName:`broker`,capScope:`system`,addonId:null,access:`view`},"broker.getState":{capName:`broker`,capScope:`system`,addonId:null,access:`view`},"broker.getStatus":{capName:`broker`,capScope:`system`,addonId:null,access:`view`},"broker.list":{capName:`broker`,capScope:`system`,addonId:null,access:`view`},"broker.listProviders":{capName:`broker`,capScope:`system`,addonId:null,access:`view`},"broker.publish":{capName:`broker`,capScope:`system`,addonId:null,access:`create`},"broker.remove":{capName:`broker`,capScope:`system`,addonId:null,access:`delete`},"broker.setSettings":{capName:`broker`,capScope:`system`,addonId:null,access:`create`},"broker.subscribe":{capName:`broker`,capScope:`system`,addonId:null,access:`create`},"broker.testConnection":{capName:`broker`,capScope:`system`,addonId:null,access:`create`},"broker.testSettings":{capName:`broker`,capScope:`system`,addonId:null,access:`create`},"broker.unsubscribe":{capName:`broker`,capScope:`system`,addonId:null,access:`create`},"button.press":{capName:`button`,capScope:`device`,addonId:null,access:`create`},"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.getProfileRtspEntries":{capName:`camera-streams`,capScope:`device`,addonId:null,access:`view`},"cameraStreams.getRtspEntries":{capName:`camera-streams`,capScope:`device`,addonId:null,access:`view`},"cameraStreams.pickStream":{capName:`camera-streams`,capScope:`device`,addonId:null,access:`view`},"climateControl.setFanMode":{capName:`climate-control`,capScope:`device`,addonId:null,access:`create`},"climateControl.setMode":{capName:`climate-control`,capScope:`device`,addonId:null,access:`create`},"climateControl.setPreset":{capName:`climate-control`,capScope:`device`,addonId:null,access:`create`},"climateControl.setSwingHorizontal":{capName:`climate-control`,capScope:`device`,addonId:null,access:`create`},"climateControl.setSwingVertical":{capName:`climate-control`,capScope:`device`,addonId:null,access:`create`},"climateControl.setTarget":{capName:`climate-control`,capScope:`device`,addonId:null,access:`create`},"climateControl.setTargetHumidity":{capName:`climate-control`,capScope:`device`,addonId:null,access:`create`},"climateControl.setTargetRange":{capName:`climate-control`,capScope:`device`,addonId:null,access:`create`},"color.setColor":{capName:`color`,capScope:`device`,addonId:null,access:`create`},"connectionTest.describeTest":{capName:`connection-test`,capScope:`system`,addonId:null,access:`view`},"connectionTest.testSettings":{capName:`connection-test`,capScope:`system`,addonId:null,access:`create`},"consumables.reset":{capName:`consumables`,capScope:`device`,addonId:null,access:`delete`},"control.setValue":{capName:`control`,capScope:`device`,addonId:null,access:`create`},"coreBlocks.compile":{capName:`core-blocks`,capScope:`system`,addonId:null,access:`create`},"coreBlocks.create":{capName:`core-blocks`,capScope:`system`,addonId:null,access:`create`},"coreBlocks.delete":{capName:`core-blocks`,capScope:`system`,addonId:null,access:`delete`},"coreBlocks.get":{capName:`core-blocks`,capScope:`system`,addonId:null,access:`view`},"coreBlocks.getTypeDefs":{capName:`core-blocks`,capScope:`system`,addonId:null,access:`view`},"coreBlocks.list":{capName:`core-blocks`,capScope:`system`,addonId:null,access:`view`},"coreBlocks.restart":{capName:`core-blocks`,capScope:`system`,addonId:null,access:`create`},"coreBlocks.setEnabled":{capName:`core-blocks`,capScope:`system`,addonId:null,access:`create`},"coreBlocks.update":{capName:`core-blocks`,capScope:`system`,addonId:null,access:`create`},"cover.close":{capName:`cover`,capScope:`device`,addonId:null,access:`create`},"cover.open":{capName:`cover`,capScope:`device`,addonId:null,access:`create`},"cover.setPosition":{capName:`cover`,capScope:`device`,addonId:null,access:`create`},"cover.setTiltPosition":{capName:`cover`,capScope:`device`,addonId:null,access:`create`},"cover.stop":{capName:`cover`,capScope:`device`,addonId:null,access:`create`},"customModelRegistry.listModels":{capName:`custom-model-registry`,capScope:`system`,addonId:null,access:`view`},"dataStoreProvider.aggregate":{capName:`data-store-provider`,capScope:`system`,addonId:null,access:`view`},"dataStoreProvider.count":{capName:`data-store-provider`,capScope:`system`,addonId:null,access:`view`},"dataStoreProvider.declareCollection":{capName:`data-store-provider`,capScope:`system`,addonId:null,access:`create`},"dataStoreProvider.delete":{capName:`data-store-provider`,capScope:`system`,addonId:null,access:`delete`},"dataStoreProvider.deleteWhere":{capName:`data-store-provider`,capScope:`system`,addonId:null,access:`delete`},"dataStoreProvider.get":{capName:`data-store-provider`,capScope:`system`,addonId:null,access:`view`},"dataStoreProvider.getEngineInfo":{capName:`data-store-provider`,capScope:`system`,addonId:null,access:`view`},"dataStoreProvider.histogram":{capName:`data-store-provider`,capScope:`system`,addonId:null,access:`view`},"dataStoreProvider.insert":{capName:`data-store-provider`,capScope:`system`,addonId:null,access:`create`},"dataStoreProvider.insertMany":{capName:`data-store-provider`,capScope:`system`,addonId:null,access:`create`},"dataStoreProvider.isEmpty":{capName:`data-store-provider`,capScope:`system`,addonId:null,access:`view`},"dataStoreProvider.query":{capName:`data-store-provider`,capScope:`system`,addonId:null,access:`view`},"dataStoreProvider.set":{capName:`data-store-provider`,capScope:`system`,addonId:null,access:`create`},"dataStoreProvider.update":{capName:`data-store-provider`,capScope:`system`,addonId:null,access:`create`},"dataStoreProvider.updateWhere":{capName:`data-store-provider`,capScope:`system`,addonId:null,access:`create`},"dayNight.getOptions":{capName:`day-night`,capScope:`device`,addonId:null,access:`view`},"dayNight.setSettings":{capName:`day-night`,capScope:`device`,addonId:null,access:`create`},"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`},"deviceAdoption.adopt":{capName:`device-adoption`,capScope:`system`,addonId:null,access:`create`},"deviceAdoption.getCandidate":{capName:`device-adoption`,capScope:`system`,addonId:null,access:`view`},"deviceAdoption.listCandidateFilters":{capName:`device-adoption`,capScope:`system`,addonId:null,access:`view`},"deviceAdoption.listCandidates":{capName:`device-adoption`,capScope:`system`,addonId:null,access:`view`},"deviceAdoption.refresh":{capName:`device-adoption`,capScope:`system`,addonId:null,access:`create`},"deviceAdoption.release":{capName:`device-adoption`,capScope:`system`,addonId:null,access:`create`},"deviceAdoption.resync":{capName:`device-adoption`,capScope:`system`,addonId:null,access:`create`},"deviceDiscovery.adoptDevice":{capName:`device-discovery`,capScope:`device`,addonId:null,access:`create`},"deviceDiscovery.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.adoptionAdopt":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.adoptionCancelJob":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.adoptionListCandidateFilters":{capName:`device-manager`,capScope:`system`,addonId:null,access:`view`},"deviceManager.adoptionListCandidates":{capName:`device-manager`,capScope:`system`,addonId:null,access:`view`},"deviceManager.adoptionListJobs":{capName:`device-manager`,capScope:`system`,addonId:null,access:`view`},"deviceManager.adoptionRefresh":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.adoptionRelease":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.adoptionResync":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.adoptionStartJob":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.allocateDeviceId":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.applyInitialMeta":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.createDevice":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.disable":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.discoverAllProviders":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.discoverDevices":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.discoverProvider":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.discoveryProviders":{capName:`device-manager`,capScope:`system`,addonId:null,access:`view`},"deviceManager.enable":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.getAllBindings":{capName:`device-manager`,capScope:`system`,addonId:null,access:`view`},"deviceManager.getBindings":{capName:`device-manager`,capScope:`system`,addonId:null,access:`view`},"deviceManager.getBindingsBatch":{capName:`device-manager`,capScope:`system`,addonId:null,access:`view`},"deviceManager.getChildren":{capName:`device-manager`,capScope:`system`,addonId:null,access:`view`},"deviceManager.getChildrenBatch":{capName:`device-manager`,capScope:`system`,addonId:null,access:`view`},"deviceManager.getConfigSchema":{capName:`device-manager`,capScope:`system`,addonId:null,access:`view`},"deviceManager.getCreationSchema":{capName:`device-manager`,capScope:`system`,addonId:null,access:`view`},"deviceManager.getDevice":{capName:`device-manager`,capScope:`system`,addonId:null,access:`view`},"deviceManager.getDeviceAggregate":{capName:`device-manager`,capScope:`system`,addonId:null,access:`view`},"deviceManager.getDeviceLiveInfoAggregate":{capName:`device-manager`,capScope:`system`,addonId:null,access:`view`},"deviceManager.getDeviceSettingsAggregate":{capName:`device-manager`,capScope:`system`,addonId:null,access:`view`},"deviceManager.getDeviceStatusAggregate":{capName:`device-manager`,capScope:`system`,addonId:null,access:`view`},"deviceManager.getDeviceStatusAggregateBatch":{capName:`device-manager`,capScope:`system`,addonId:null,access:`view`},"deviceManager.getLinkedDevices":{capName:`device-manager`,capScope:`system`,addonId:null,access:`view`},"deviceManager.getLinkedDevicesBatch":{capName:`device-manager`,capScope:`system`,addonId:null,access:`view`},"deviceManager.getRoleDisplayDefaults":{capName:`device-manager`,capScope:`system`,addonId:null,access:`view`},"deviceManager.getSettingsSchema":{capName:`device-manager`,capScope:`system`,addonId:null,access:`view`},"deviceManager.getStreamProfileMap":{capName:`device-manager`,capScope:`system`,addonId:null,access:`view`},"deviceManager.getStreamSources":{capName:`device-manager`,capScope:`system`,addonId:null,access:`view`},"deviceManager.getWireableFields":{capName:`device-manager`,capScope:`system`,addonId:null,access:`view`},"deviceManager.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.migrateDevice":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.persistConfig":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.probeStreams":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.providerCreationType":{capName:`device-manager`,capScope:`system`,addonId:null,access:`view`},"deviceManager.providerDiscoveryParamsSchema":{capName:`device-manager`,capScope:`system`,addonId:null,access:`view`},"deviceManager.registerDevice":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.remove":{capName:`device-manager`,capScope:`system`,addonId:null,access:`delete`},"deviceManager.removeByIntegration":{capName:`device-manager`,capScope:`system`,addonId:null,access:`delete`},"deviceManager.removeDevice":{capName:`device-manager`,capScope:`system`,addonId:null,access:`delete`},"deviceManager.removeLocation":{capName:`device-manager`,capScope:`system`,addonId:null,access:`delete`},"deviceManager.renameLocation":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.runDeviceAction":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.setChildLayout":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.setDisabled":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.setDisplay":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.setIntegrationId":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.setLinkDeviceId":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.setLocation":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.setMetadata":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.setName":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.setPrimaryChildEntityId":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.setRole":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.setRoleDisplayDefaults":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.setStreamProfileMap":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.setType":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.setWrapperActive":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.testCreationField":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.testField":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.updateConfig":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.updateDeviceField":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.updateDeviceFieldsBatch":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceOps.getConfigEntries":{capName:`device-ops`,capScope:`device`,addonId:null,access:`view`},"deviceOps.getRawState":{capName:`device-ops`,capScope:`device`,addonId:null,access:`view`},"deviceOps.getSettingsSchema":{capName:`device-ops`,capScope:`device`,addonId:null,access:`view`},"deviceOps.getStreamSources":{capName:`device-ops`,capScope:`device`,addonId:null,access:`view`},"deviceOps.removeDevice":{capName:`device-ops`,capScope:`device`,addonId:null,access:`delete`},"deviceOps.runAction":{capName:`device-ops`,capScope:`device`,addonId:null,access:`create`},"deviceOps.setConfig":{capName:`device-ops`,capScope:`device`,addonId:null,access:`create`},"deviceProvider.adoptDiscoveredDevice":{capName:`device-provider`,capScope:`system`,addonId:null,access:`create`},"deviceProvider.createDevice":{capName:`device-provider`,capScope:`system`,addonId:null,access:`create`},"deviceProvider.discoverDevices":{capName:`device-provider`,capScope:`system`,addonId:null,access:`create`},"deviceProvider.getChildCreationSchema":{capName:`device-provider`,capScope:`system`,addonId:null,access:`view`},"deviceProvider.getDevices":{capName:`device-provider`,capScope:`system`,addonId:null,access:`view`},"deviceProvider.getDiscoveryParamsSchema":{capName:`device-provider`,capScope:`system`,addonId:null,access:`view`},"deviceProvider.getManualCreationType":{capName:`device-provider`,capScope:`system`,addonId:null,access:`view`},"deviceProvider.getStatus":{capName:`device-provider`,capScope:`system`,addonId:null,access:`view`},"deviceProvider.reloadDevice":{capName:`device-provider`,capScope:`system`,addonId:null,access:`create`},"deviceProvider.start":{capName:`device-provider`,capScope:`system`,addonId:null,access:`create`},"deviceProvider.stop":{capName:`device-provider`,capScope:`system`,addonId:null,access:`create`},"deviceProvider.supportsDiscovery":{capName:`device-provider`,capScope:`system`,addonId:null,access:`view`},"deviceProvider.supportsManualCreation":{capName:`device-provider`,capScope:`system`,addonId:null,access:`view`},"deviceProvider.testCreationField":{capName:`device-provider`,capScope:`system`,addonId:null,access:`create`},"deviceState.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`},"faceGallery.assignFace":{capName:`face-gallery`,capScope:`system`,addonId:null,access:`create`},"faceGallery.assignFaces":{capName:`face-gallery`,capScope:`system`,addonId:null,access:`create`},"faceGallery.createIdentity":{capName:`face-gallery`,capScope:`system`,addonId:null,access:`create`},"faceGallery.deleteFace":{capName:`face-gallery`,capScope:`system`,addonId:null,access:`delete`},"faceGallery.deleteIdentity":{capName:`face-gallery`,capScope:`system`,addonId:null,access:`delete`},"faceGallery.getFaceByTrack":{capName:`face-gallery`,capScope:`system`,addonId:null,access:`view`},"faceGallery.getFaceMedia":{capName:`face-gallery`,capScope:`system`,addonId:null,access:`view`},"faceGallery.listIdentities":{capName:`face-gallery`,capScope:`system`,addonId:null,access:`view`},"faceGallery.listIdentitySamples":{capName:`face-gallery`,capScope:`system`,addonId:null,access:`view`},"faceGallery.listRecentFaces":{capName:`face-gallery`,capScope:`system`,addonId:null,access:`view`},"faceGallery.removeSample":{capName:`face-gallery`,capScope:`system`,addonId:null,access:`delete`},"faceGallery.renameIdentity":{capName:`face-gallery`,capScope:`system`,addonId:null,access:`create`},"faceGallery.suggestFaceClusters":{capName:`face-gallery`,capScope:`system`,addonId:null,access:`view`},"faceGallery.unassignFace":{capName:`face-gallery`,capScope:`system`,addonId:null,access:`create`},"faceGallery.unassignFaces":{capName:`face-gallery`,capScope:`system`,addonId:null,access:`create`},"failureContribution.list":{capName:`failure-contribution`,capScope:`system`,addonId:null,access:`view`},"fanControl.setDirection":{capName:`fan-control`,capScope:`device`,addonId:null,access:`create`},"fanControl.setOscillating":{capName:`fan-control`,capScope:`device`,addonId:null,access:`create`},"fanControl.setPercentage":{capName:`fan-control`,capScope:`device`,addonId:null,access:`create`},"fanControl.setPreset":{capName:`fan-control`,capScope:`device`,addonId:null,access:`create`},"filesystemBrowse.browse":{capName:`filesystem-browse`,capScope:`system`,addonId:null,access:`view`},"filesystemBrowse.createDir":{capName:`filesystem-browse`,capScope:`system`,addonId:null,access:`create`},"filesystemBrowse.listAllowedRoots":{capName:`filesystem-browse`,capScope:`system`,addonId:null,access:`view`},"humidifier.setMode":{capName:`humidifier`,capScope:`device`,addonId:null,access:`create`},"humidifier.setOn":{capName:`humidifier`,capScope:`device`,addonId:null,access:`create`},"humidifier.setTargetHumidity":{capName:`humidifier`,capScope:`device`,addonId:null,access:`create`},"imageSettings.getOptions":{capName:`image-settings`,capScope:`device`,addonId:null,access:`view`},"imageSettings.setSettings":{capName:`image-settings`,capScope:`device`,addonId:null,access:`create`},"integrations.create":{capName:`integrations`,capScope:`system`,addonId:null,access:`create`},"integrations.delete":{capName:`integrations`,capScope:`system`,addonId:null,access:`delete`},"integrations.get":{capName:`integrations`,capScope:`system`,addonId:null,access:`view`},"integrations.getAvailableTypes":{capName:`integrations`,capScope:`system`,addonId:null,access:`view`},"integrations.getByAddonId":{capName:`integrations`,capScope:`system`,addonId:null,access:`view`},"integrations.getSettings":{capName:`integrations`,capScope:`system`,addonId:null,access:`view`},"integrations.list":{capName:`integrations`,capScope:`system`,addonId:null,access:`view`},"integrations.setSettings":{capName:`integrations`,capScope:`system`,addonId:null,access:`create`},"integrations.testConnection":{capName:`integrations`,capScope:`system`,addonId:null,access:`create`},"integrations.update":{capName:`integrations`,capScope:`system`,addonId:null,access:`create`},"intercom.endTalkSession":{capName:`intercom`,capScope:`device`,addonId:null,access:`create`},"intercom.handleAnswer":{capName:`intercom`,capScope:`device`,addonId:null,access:`create`},"intercom.pushTalkAudio":{capName:`intercom`,capScope:`device`,addonId:null,access:`create`},"intercom.startSession":{capName:`intercom`,capScope:`device`,addonId:null,access:`create`},"intercom.startTalkSession":{capName:`intercom`,capScope:`device`,addonId:null,access:`create`},"intercom.stopSession":{capName:`intercom`,capScope:`device`,addonId:null,access:`create`},"lawnMowerControl.dock":{capName:`lawn-mower-control`,capScope:`device`,addonId:null,access:`create`},"lawnMowerControl.pause":{capName:`lawn-mower-control`,capScope:`device`,addonId:null,access:`create`},"lawnMowerControl.startMowing":{capName:`lawn-mower-control`,capScope:`device`,addonId:null,access:`create`},"llm.cancel":{capName:`llm`,capScope:`system`,addonId:null,access:`create`},"llm.deleteModel":{capName:`llm`,capScope:`system`,addonId:null,access:`delete`},"llm.deleteProfile":{capName:`llm`,capScope:`system`,addonId:null,access:`delete`},"llm.generate":{capName:`llm`,capScope:`system`,addonId:null,access:`create`},"llm.generateVision":{capName:`llm`,capScope:`system`,addonId:null,access:`create`},"llm.getDefaults":{capName:`llm`,capScope:`system`,addonId:null,access:`view`},"llm.getRuntimeStatus":{capName:`llm`,capScope:`system`,addonId:null,access:`view`},"llm.getUsage":{capName:`llm`,capScope:`system`,addonId:null,access:`view`},"llm.installModel":{capName:`llm`,capScope:`system`,addonId:null,access:`create`},"llm.listModelCatalog":{capName:`llm`,capScope:`system`,addonId:null,access:`view`},"llm.listModels":{capName:`llm`,capScope:`system`,addonId:null,access:`view`},"llm.listNodeModels":{capName:`llm`,capScope:`system`,addonId:null,access:`view`},"llm.listProfileKinds":{capName:`llm`,capScope:`system`,addonId:null,access:`view`},"llm.listProfiles":{capName:`llm`,capScope:`system`,addonId:null,access:`view`},"llm.listRuntimeNodes":{capName:`llm`,capScope:`system`,addonId:null,access:`view`},"llm.resolveModelRef":{capName:`llm`,capScope:`system`,addonId:null,access:`create`},"llm.setDefault":{capName:`llm`,capScope:`system`,addonId:null,access:`create`},"llm.startRuntime":{capName:`llm`,capScope:`system`,addonId:null,access:`create`},"llm.stopRuntime":{capName:`llm`,capScope:`system`,addonId:null,access:`create`},"llm.testProfile":{capName:`llm`,capScope:`system`,addonId:null,access:`create`},"llm.upsertProfile":{capName:`llm`,capScope:`system`,addonId:null,access:`create`},"llmRuntime.complete":{capName:`llm-runtime`,capScope:`system`,addonId:null,access:`create`},"llmRuntime.deleteModel":{capName:`llm-runtime`,capScope:`system`,addonId:null,access:`delete`},"llmRuntime.ensureStarted":{capName:`llm-runtime`,capScope:`system`,addonId:null,access:`create`},"llmRuntime.getDiskUsage":{capName:`llm-runtime`,capScope:`system`,addonId:null,access:`view`},"llmRuntime.installModel":{capName:`llm-runtime`,capScope:`system`,addonId:null,access:`create`},"llmRuntime.listLocalModels":{capName:`llm-runtime`,capScope:`system`,addonId:null,access:`view`},"llmRuntime.status":{capName:`llm-runtime`,capScope:`system`,addonId:null,access:`view`},"llmRuntime.stop":{capName:`llm-runtime`,capScope:`system`,addonId:null,access:`create`},"loadContribution.list":{capName:`load-contribution`,capScope:`system`,addonId:null,access:`view`},"localNetwork.downloadCa":{capName:`local-network`,capScope:`system`,addonId:null,access:`view`},"localNetwork.getAllowedAddresses":{capName:`local-network`,capScope:`system`,addonId:null,access:`view`},"localNetwork.getConnectionEndpoints":{capName:`local-network`,capScope:`system`,addonId:null,access:`view`},"localNetwork.getNotificationEndpoint":{capName:`local-network`,capScope:`system`,addonId:null,access:`view`},"localNetwork.getPreferred":{capName:`local-network`,capScope:`system`,addonId:null,access:`view`},"localNetwork.getTlsStatus":{capName:`local-network`,capScope:`system`,addonId:null,access:`view`},"localNetwork.getViewerEndpoints":{capName:`local-network`,capScope:`system`,addonId:null,access:`view`},"localNetwork.list":{capName:`local-network`,capScope:`system`,addonId:null,access:`view`},"localNetwork.regenerateCertificate":{capName:`local-network`,capScope:`system`,addonId:null,access:`create`},"localNetwork.resetAllowlistToBestMatch":{capName:`local-network`,capScope:`system`,addonId:null,access:`delete`},"localNetwork.revertToGeneratedCertificate":{capName:`local-network`,capScope:`system`,addonId:null,access:`create`},"localNetwork.setAllowedAddresses":{capName:`local-network`,capScope:`system`,addonId:null,access:`create`},"localNetwork.setNotificationEndpoint":{capName:`local-network`,capScope:`system`,addonId:null,access:`create`},"localNetwork.setViewerEndpoints":{capName:`local-network`,capScope:`system`,addonId:null,access:`create`},"localNetwork.uploadCertificate":{capName:`local-network`,capScope:`system`,addonId:null,access:`create`},"lockControl.lock":{capName:`lock-control`,capScope:`device`,addonId:null,access:`create`},"lockControl.open":{capName:`lock-control`,capScope:`device`,addonId:null,access:`create`},"lockControl.unlock":{capName:`lock-control`,capScope:`device`,addonId:null,access:`create`},"logChannels.apply":{capName:`log-channels`,capScope:`system`,addonId:null,access:`create`},"logChannels.list":{capName:`log-channels`,capScope:`system`,addonId:null,access:`view`},"logDestination.query":{capName:`log-destination`,capScope:`system`,addonId:null,access:`view`},"logDestination.write":{capName:`log-destination`,capScope:`system`,addonId:null,access:`create`},"loginMethod.getLoginMethods":{capName:`login-method`,capScope:`system`,addonId:null,access:`view`},"mediaPlayer.next":{capName:`media-player`,capScope:`device`,addonId:null,access:`create`},"mediaPlayer.pause":{capName:`media-player`,capScope:`device`,addonId:null,access:`create`},"mediaPlayer.play":{capName:`media-player`,capScope:`device`,addonId:null,access:`create`},"mediaPlayer.playMedia":{capName:`media-player`,capScope:`device`,addonId:null,access:`create`},"mediaPlayer.previous":{capName:`media-player`,capScope:`device`,addonId:null,access:`create`},"mediaPlayer.seek":{capName:`media-player`,capScope:`device`,addonId:null,access:`create`},"mediaPlayer.selectSource":{capName:`media-player`,capScope:`device`,addonId:null,access:`create`},"mediaPlayer.setMute":{capName:`media-player`,capScope:`device`,addonId:null,access:`create`},"mediaPlayer.setRepeat":{capName:`media-player`,capScope:`device`,addonId:null,access:`create`},"mediaPlayer.setShuffle":{capName:`media-player`,capScope:`device`,addonId:null,access:`create`},"mediaPlayer.setVolume":{capName:`media-player`,capScope:`device`,addonId:null,access:`create`},"mediaPlayer.stop":{capName:`media-player`,capScope:`device`,addonId:null,access:`create`},"meshNetwork.getStatus":{capName:`mesh-network`,capScope:`system`,addonId:null,access:`view`},"meshNetwork.join":{capName:`mesh-network`,capScope:`system`,addonId:null,access:`create`},"meshNetwork.leave":{capName:`mesh-network`,capScope:`system`,addonId:null,access:`create`},"meshNetwork.listPeers":{capName:`mesh-network`,capScope:`system`,addonId:null,access:`view`},"meshNetwork.logout":{capName:`mesh-network`,capScope:`system`,addonId:null,access:`create`},"meshNetwork.startLogin":{capName:`mesh-network`,capScope:`system`,addonId:null,access:`create`},"meshNetwork.testConnection":{capName:`mesh-network`,capScope:`system`,addonId:null,access:`create`},"metricsProvider.collectSnapshot":{capName:`metrics-provider`,capScope:`system`,addonId:null,access:`view`},"metricsProvider.getAddonStats":{capName:`metrics-provider`,capScope:`system`,addonId:null,access:`view`},"metricsProvider.getCached":{capName:`metrics-provider`,capScope:`system`,addonId:null,access:`view`},"metricsProvider.getCpuTemperature":{capName:`metrics-provider`,capScope:`system`,addonId:null,access:`view`},"metricsProvider.getCurrent":{capName:`metrics-provider`,capScope:`system`,addonId:null,access:`view`},"metricsProvider.getDiskSpace":{capName:`metrics-provider`,capScope:`system`,addonId:null,access:`view`},"metricsProvider.getGpuInfo":{capName:`metrics-provider`,capScope:`system`,addonId:null,access:`view`},"metricsProvider.getLoadSeries":{capName:`metrics-provider`,capScope:`system`,addonId:null,access:`view`},"metricsProvider.getProcessStats":{capName:`metrics-provider`,capScope:`system`,addonId:null,access:`view`},"metricsProvider.listAddonInstances":{capName:`metrics-provider`,capScope:`system`,addonId:null,access:`view`},"metricsProvider.listNodeProcesses":{capName:`metrics-provider`,capScope:`system`,addonId:null,access:`view`},"modelConvert.convert":{capName:`model-convert`,capScope:`system`,addonId:null,access:`create`},"modelDistributor.distributeModel":{capName:`model-distributor`,capScope:`system`,addonId:null,access:`create`},"motion.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`},"nativeObjectDetection.setEnabled":{capName:`native-object-detection`,capScope:`device`,addonId:null,access:`create`},"navigation.getFeatures":{capName:`navigation`,capScope:`device`,addonId:null,access:`view`},"navigation.goToPoint":{capName:`navigation`,capScope:`device`,addonId:null,access:`create`},"navigation.listActions":{capName:`navigation`,capScope:`device`,addonId:null,access:`view`},"navigation.move":{capName:`navigation`,capScope:`device`,addonId:null,access:`create`},"navigation.playSound":{capName:`navigation`,capScope:`device`,addonId:null,access:`create`},"navigation.runAction":{capName:`navigation`,capScope:`device`,addonId:null,access:`create`},"navigation.setLightLevel":{capName:`navigation`,capScope:`device`,addonId:null,access:`create`},"navigation.setLightMode":{capName:`navigation`,capScope:`device`,addonId:null,access:`create`},"navigation.setLightOn":{capName:`navigation`,capScope:`device`,addonId:null,access:`create`},"navigation.stop":{capName:`navigation`,capScope:`device`,addonId:null,access:`create`},"networkAccess.getEndpoint":{capName:`network-access`,capScope:`system`,addonId:null,access:`view`},"networkAccess.getStatus":{capName:`network-access`,capScope:`system`,addonId:null,access:`view`},"networkAccess.listEndpoints":{capName:`network-access`,capScope:`system`,addonId:null,access:`view`},"networkAccess.start":{capName:`network-access`,capScope:`system`,addonId:null,access:`create`},"networkAccess.stop":{capName:`network-access`,capScope:`system`,addonId:null,access:`create`},"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.deleteTarget":{capName:`notification-output`,capScope:`system`,addonId:null,access:`delete`},"notificationOutput.discoverTargets":{capName:`notification-output`,capScope:`system`,addonId:null,access:`view`},"notificationOutput.listTargetKinds":{capName:`notification-output`,capScope:`system`,addonId:null,access:`view`},"notificationOutput.listTargets":{capName:`notification-output`,capScope:`system`,addonId:null,access:`view`},"notificationOutput.send":{capName:`notification-output`,capScope:`system`,addonId:null,access:`create`},"notificationOutput.setTargetEnabled":{capName:`notification-output`,capScope:`system`,addonId:null,access:`create`},"notificationOutput.testTarget":{capName:`notification-output`,capScope:`system`,addonId:null,access:`create`},"notificationOutput.upsertTarget":{capName:`notification-output`,capScope:`system`,addonId:null,access:`create`},"notificationRules.cancelSnooze":{capName:`notification-rules`,capScope:`system`,addonId:null,access:`create`},"notificationRules.createRule":{capName:`notification-rules`,capScope:`system`,addonId:null,access:`create`},"notificationRules.createSnooze":{capName:`notification-rules`,capScope:`system`,addonId:null,access:`create`},"notificationRules.deleteRule":{capName:`notification-rules`,capScope:`system`,addonId:null,access:`delete`},"notificationRules.getAlarmConfig":{capName:`notification-rules`,capScope:`system`,addonId:null,access:`view`},"notificationRules.getConditionCatalog":{capName:`notification-rules`,capScope:`system`,addonId:null,access:`view`},"notificationRules.getHistory":{capName:`notification-rules`,capScope:`system`,addonId:null,access:`view`},"notificationRules.getRule":{capName:`notification-rules`,capScope:`system`,addonId:null,access:`view`},"notificationRules.listDeviceMutes":{capName:`notification-rules`,capScope:`system`,addonId:null,access:`view`},"notificationRules.listRules":{capName:`notification-rules`,capScope:`system`,addonId:null,access:`view`},"notificationRules.listSnoozes":{capName:`notification-rules`,capScope:`system`,addonId:null,access:`view`},"notificationRules.resolveArtifactUrl":{capName:`notification-rules`,capScope:`system`,addonId:null,access:`view`},"notificationRules.setAlarmConfig":{capName:`notification-rules`,capScope:`system`,addonId:null,access:`create`},"notificationRules.setDeviceMuted":{capName:`notification-rules`,capScope:`system`,addonId:null,access:`create`},"notificationRules.setRuleEnabled":{capName:`notification-rules`,capScope:`system`,addonId:null,access:`create`},"notificationRules.testRule":{capName:`notification-rules`,capScope:`system`,addonId:null,access:`create`},"notificationRules.updateRule":{capName:`notification-rules`,capScope:`system`,addonId:null,access:`create`},"notifier.cancel":{capName:`notifier`,capScope:`device`,addonId:null,access:`create`},"notifier.send":{capName:`notifier`,capScope:`device`,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`},"osdManager.clearSlotBinding":{capName:`osd-manager`,capScope:`system`,addonId:null,access:`delete`},"osdManager.copyDeviceConfiguration":{capName:`osd-manager`,capScope:`system`,addonId:null,access:`create`},"osdManager.getConditionSupport":{capName:`osd-manager`,capScope:`system`,addonId:null,access:`view`},"osdManager.getDeviceOsd":{capName:`osd-manager`,capScope:`system`,addonId:null,access:`view`},"osdManager.getSourceCatalog":{capName:`osd-manager`,capScope:`system`,addonId:null,access:`view`},"osdManager.previewSlot":{capName:`osd-manager`,capScope:`system`,addonId:null,access:`create`},"osdManager.renderDevice":{capName:`osd-manager`,capScope:`system`,addonId:null,access:`create`},"osdManager.setSlotBinding":{capName:`osd-manager`,capScope:`system`,addonId:null,access:`create`},"petFeeder.callPet":{capName:`pet-feeder`,capScope:`device`,addonId:null,access:`create`},"petFeeder.cancelFeed":{capName:`pet-feeder`,capScope:`device`,addonId:null,access:`create`},"petFeeder.feed":{capName:`pet-feeder`,capScope:`device`,addonId:null,access:`create`},"petFeeder.markFoodReplenished":{capName:`pet-feeder`,capScope:`device`,addonId:null,access:`create`},"petFeeder.playSound":{capName:`pet-feeder`,capScope:`device`,addonId:null,access:`create`},"petFeeder.resetDesiccant":{capName:`pet-feeder`,capScope:`device`,addonId:null,access:`delete`},"petFeeder.setChildLock":{capName:`pet-feeder`,capScope:`device`,addonId:null,access:`create`},"petFeeder.setFeedSound":{capName:`pet-feeder`,capScope:`device`,addonId:null,access:`create`},"petFeeder.setIndicatorLight":{capName:`pet-feeder`,capScope:`device`,addonId:null,access:`create`},"petFeeder.setVolume":{capName:`pet-feeder`,capScope:`device`,addonId:null,access:`create`},"pipelineAnalytics.cancelRelocateMedia":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`create`},"pipelineAnalytics.cancelStorageMigrationMove":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`create`},"pipelineAnalytics.clearTracks":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`delete`},"pipelineAnalytics.completeRetrainTrack":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`create`},"pipelineAnalytics.countRelocatableMedia":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`},"pipelineAnalytics.countUnstampedEventMedia":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`},"pipelineAnalytics.deleteDeviceEvents":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`delete`},"pipelineAnalytics.deleteTracks":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`delete`},"pipelineAnalytics.deselectRetrainFrame":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`create`},"pipelineAnalytics.getActiveTracks":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`},"pipelineAnalytics.getAudioEvents":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`},"pipelineAnalytics.getEventDensity":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`},"pipelineAnalytics.getEventDensityBatch":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`},"pipelineAnalytics.getEventMedia":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`},"pipelineAnalytics.getEventMediaFootprintByKind":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`},"pipelineAnalytics.getEventStoreFootprint":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`},"pipelineAnalytics.getKeyEvents":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`},"pipelineAnalytics.getKeyEventsBatch":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`},"pipelineAnalytics.getMediaReclaimStatus":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`},"pipelineAnalytics.getMotionEvents":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`},"pipelineAnalytics.getObjectEmbeddingRebuildStatus":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`},"pipelineAnalytics.getObjectEvents":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`},"pipelineAnalytics.getRetrainExportUrl":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`},"pipelineAnalytics.getRetrainFrameImage":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`},"pipelineAnalytics.getSensorEvents":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`},"pipelineAnalytics.getStorageMigrationMoveStatus":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`},"pipelineAnalytics.getSummary":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`},"pipelineAnalytics.getTrack":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`},"pipelineAnalytics.getTrackMedia":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`},"pipelineAnalytics.getTrainingExportSummary":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`},"pipelineAnalytics.getTrainingExportUrl":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`},"pipelineAnalytics.listEventKinds":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`},"pipelineAnalytics.listEventKindsBatch":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`},"pipelineAnalytics.listEventMedia":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`},"pipelineAnalytics.listOpsLog":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`},"pipelineAnalytics.listRecentTracks":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`},"pipelineAnalytics.listRelocateMediaJobs":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`},"pipelineAnalytics.listRetrainAnnotations":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`},"pipelineAnalytics.listRetrainFrames":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`},"pipelineAnalytics.listRetrainStaging":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`},"pipelineAnalytics.listSummaries":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`},"pipelineAnalytics.listTrackMedia":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`},"pipelineAnalytics.listTracks":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`},"pipelineAnalytics.pauseForStorageMigration":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`create`},"pipelineAnalytics.proposeRetrainAnnotations":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`create`},"pipelineAnalytics.pruneEvents":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`create`},"pipelineAnalytics.pruneEventsBefore":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`create`},"pipelineAnalytics.pruneTracksBefore":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`create`},"pipelineAnalytics.rebuildObjectEmbeddings":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`create`},"pipelineAnalytics.reclaimDebugMedia":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`create`},"pipelineAnalytics.reconcileFromDisk":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`create`},"pipelineAnalytics.refreshStorageLocationsForMigration":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`create`},"pipelineAnalytics.relocateMedia":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`create`},"pipelineAnalytics.restageRetrainTrack":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`create`},"pipelineAnalytics.resumeForStorageMigration":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`create`},"pipelineAnalytics.runReplayFrameProcessor":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`create`},"pipelineAnalytics.saveRetrainAnnotations":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`create`},"pipelineAnalytics.searchObjectEvents":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`},"pipelineAnalytics.selectRetrainFrames":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`create`},"pipelineAnalytics.setTrackFlags":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`create`},"pipelineAnalytics.startStorageMigrationMove":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`create`},"pipelineAnalytics.wipeAllAnalytics":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`delete`},"pipelineAnalytics.wipeObjectEmbeddings":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`delete`},"pipelineExecutor.cacheFrameInPool":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`create`},"pipelineExecutor.clearDeviceOverrides":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`delete`},"pipelineExecutor.deleteModel":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`delete`},"pipelineExecutor.deleteTemplate":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`delete`},"pipelineExecutor.downloadModel":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`create`},"pipelineExecutor.getAddonModels":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`view`},"pipelineExecutor.getAudioCapabilities":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`view`},"pipelineExecutor.getAvailableEngines":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`view`},"pipelineExecutor.getCapabilities":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`view`},"pipelineExecutor.getDefaultSteps":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`view`},"pipelineExecutor.getDetectionConfigSchema":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`view`},"pipelineExecutor.getEffectiveTuning":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`view`},"pipelineExecutor.getEngineProvisioning":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`view`},"pipelineExecutor.getGlobalPipelineConfig":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`view`},"pipelineExecutor.getGlobalSteps":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`view`},"pipelineExecutor.getInferenceDeviceHealth":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`view`},"pipelineExecutor.getOrchestratorConfigSchema":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`view`},"pipelineExecutor.getReferenceAudio":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`view`},"pipelineExecutor.getReferenceAudioFiles":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`view`},"pipelineExecutor.getReferenceImage":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`view`},"pipelineExecutor.getSchema":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`view`},"pipelineExecutor.getSelectedEngine":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`view`},"pipelineExecutor.getVideoPipelineSteps":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`view`},"pipelineExecutor.inferCached":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`create`},"pipelineExecutor.killEngine":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`create`},"pipelineExecutor.listLoadedEngines":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`view`},"pipelineExecutor.listReferenceImages":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`view`},"pipelineExecutor.listTemplates":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`view`},"pipelineExecutor.rearmInferenceDevice":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`create`},"pipelineExecutor.runAudioTest":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`create`},"pipelineExecutor.runPipeline":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`create`},"pipelineExecutor.runPipelineBatch":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`create`},"pipelineExecutor.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`},"pipelineExecutor.validatePipeline":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`view`},"pipelineOrchestrator.assignAudio":{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.getCameraStatus":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`view`},"pipelineOrchestrator.getCameraStatuses":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`view`},"pipelineOrchestrator.getCameraStepOverrides":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`view`},"pipelineOrchestrator.getCameraSwitches":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`view`},"pipelineOrchestrator.getCapabilityBindings":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`view`},"pipelineOrchestrator.getGlobalMetrics":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`view`},"pipelineOrchestrator.getIngestOwner":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`view`},"pipelineOrchestrator.getNodeInferenceDevices":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`view`},"pipelineOrchestrator.getPipelineAssignment":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`view`},"pipelineOrchestrator.getPipelineAssignments":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`view`},"pipelineOrchestrator.getPipelineDevicePin":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`view`},"pipelineOrchestrator.getReconcileFromDiskStatus":{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.pauseForStorageMigration":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`create`},"pipelineOrchestrator.rebalance":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`create`},"pipelineOrchestrator.reconcileFromDisk":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`create`},"pipelineOrchestrator.removeAgentSettings":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`delete`},"pipelineOrchestrator.resetNodePipelineDefaults":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`delete`},"pipelineOrchestrator.resolvePipeline":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`view`},"pipelineOrchestrator.resumeForStorageMigration":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`create`},"pipelineOrchestrator.saveTemplate":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`create`},"pipelineOrchestrator.setAgentCapabilities":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`create`},"pipelineOrchestrator.setAgentDecodeLimits":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`create`},"pipelineOrchestrator.setAgentDetectWeight":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`create`},"pipelineOrchestrator.setAgentInferenceDevices":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`create`},"pipelineOrchestrator.setAgentMaxCameras":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`create`},"pipelineOrchestrator.setAgentReachableHost":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`create`},"pipelineOrchestrator.setCameraPipelineForAgent":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`create`},"pipelineOrchestrator.setCameraStepOverride":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`create`},"pipelineOrchestrator.setCameraStepToggle":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`create`},"pipelineOrchestrator.setCameraSwitch":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`create`},"pipelineOrchestrator.setCapabilityBinding":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`create`},"pipelineOrchestrator.setPipelineDevicePin":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`create`},"pipelineOrchestrator.unassignAudio":{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.getNativeCrop":{capName:`pipeline-runner`,capScope:`system`,addonId:null,access:`view`},"pipelineRunner.reportMotion":{capName:`pipeline-runner`,capScope:`system`,addonId:null,access:`create`},"pipelineRunner.runDetailSubtree":{capName:`pipeline-runner`,capScope:`system`,addonId:null,access:`create`},"pipelineRunner.runStatelessStep":{capName:`pipeline-runner`,capScope:`system`,addonId:null,access:`create`},"plateGallery.assignPlate":{capName:`plate-gallery`,capScope:`system`,addonId:null,access:`create`},"plateGallery.assignPlates":{capName:`plate-gallery`,capScope:`system`,addonId:null,access:`create`},"plateGallery.correctPlateText":{capName:`plate-gallery`,capScope:`system`,addonId:null,access:`create`},"plateGallery.createVehicle":{capName:`plate-gallery`,capScope:`system`,addonId:null,access:`create`},"plateGallery.deletePlate":{capName:`plate-gallery`,capScope:`system`,addonId:null,access:`delete`},"plateGallery.deleteVehicle":{capName:`plate-gallery`,capScope:`system`,addonId:null,access:`delete`},"plateGallery.getPlateByTrack":{capName:`plate-gallery`,capScope:`system`,addonId:null,access:`view`},"plateGallery.getPlateMedia":{capName:`plate-gallery`,capScope:`system`,addonId:null,access:`view`},"plateGallery.listPlates":{capName:`plate-gallery`,capScope:`system`,addonId:null,access:`view`},"plateGallery.listVehicles":{capName:`plate-gallery`,capScope:`system`,addonId:null,access:`view`},"plateGallery.listVehicleSamples":{capName:`plate-gallery`,capScope:`system`,addonId:null,access:`view`},"plateGallery.removeVehicleSample":{capName:`plate-gallery`,capScope:`system`,addonId:null,access:`delete`},"plateGallery.renameVehicle":{capName:`plate-gallery`,capScope:`system`,addonId:null,access:`create`},"plateGallery.searchPlates":{capName:`plate-gallery`,capScope:`system`,addonId:null,access:`view`},"plateGallery.suggestPlateClusters":{capName:`plate-gallery`,capScope:`system`,addonId:null,access:`view`},"plateGallery.unassignPlate":{capName:`plate-gallery`,capScope:`system`,addonId:null,access:`create`},"plateGallery.unassignPlates":{capName:`plate-gallery`,capScope:`system`,addonId:null,access:`create`},"platformProbe.getCapabilities":{capName:`platform-probe`,capScope:`system`,addonId:null,access:`view`},"platformProbe.getHardware":{capName:`platform-probe`,capScope:`system`,addonId:null,access:`view`},"platformProbe.resolveHwAccel":{capName:`platform-probe`,capScope:`system`,addonId:null,access:`view`},"platformProbe.resolveInferenceConfig":{capName:`platform-probe`,capScope:`system`,addonId:null,access:`view`},"privacyMask.getOptions":{capName:`privacy-mask`,capScope:`device`,addonId:null,access:`view`},"privacyMask.setAudioEnabled":{capName:`privacy-mask`,capScope:`device`,addonId:null,access:`create`},"privacyMask.setMask":{capName:`privacy-mask`,capScope:`device`,addonId:null,access:`create`},"ptz.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.cancelRelocateJob":{capName:`recording`,capScope:`system`,addonId:null,access:`create`},"recording.cancelStorageMigrationMove":{capName:`recording`,capScope:`system`,addonId:null,access:`create`},"recording.deleteFootprint":{capName:`recording`,capScope:`system`,addonId:null,access:`delete`},"recording.getAvailability":{capName:`recording`,capScope:`system`,addonId:null,access:`view`},"recording.getAvailabilityBatch":{capName:`recording`,capScope:`system`,addonId:null,access:`view`},"recording.getDaysWithRecordings":{capName:`recording`,capScope:`system`,addonId:null,access:`view`},"recording.getDaysWithRecordingsBatch":{capName:`recording`,capScope:`system`,addonId:null,access:`view`},"recording.getDeviceConfig":{capName:`recording`,capScope:`system`,addonId:null,access:`view`},"recording.getPlacement":{capName:`recording`,capScope:`system`,addonId:null,access:`view`},"recording.getPlaybackManifest":{capName:`recording`,capScope:`system`,addonId:null,access:`view`},"recording.getRelocateResidue":{capName:`recording`,capScope:`system`,addonId:null,access:`view`},"recording.getStorageMigrationMoveStatus":{capName:`recording`,capScope:`system`,addonId:null,access:`view`},"recording.getStorageUsage":{capName:`recording`,capScope:`system`,addonId:null,access:`view`},"recording.listOpsLog":{capName:`recording`,capScope:`system`,addonId:null,access:`view`},"recording.listRelocateJobs":{capName:`recording`,capScope:`system`,addonId:null,access:`view`},"recording.locateSegment":{capName:`recording`,capScope:`system`,addonId:null,access:`view`},"recording.pauseForStorageMigration":{capName:`recording`,capScope:`system`,addonId:null,access:`create`},"recording.planStorageRebalance":{capName:`recording`,capScope:`system`,addonId:null,access:`view`},"recording.pruneFootage":{capName:`recording`,capScope:`system`,addonId:null,access:`create`},"recording.readGopBytes":{capName:`recording`,capScope:`system`,addonId:null,access:`view`},"recording.readSegmentBytes":{capName:`recording`,capScope:`system`,addonId:null,access:`view`},"recording.readWindowBytes":{capName:`recording`,capScope:`system`,addonId:null,access:`view`},"recording.reconcileLedgerAgainstDisk":{capName:`recording`,capScope:`system`,addonId:null,access:`create`},"recording.refreshStorageLocationsForMigration":{capName:`recording`,capScope:`system`,addonId:null,access:`create`},"recording.relocateFootage":{capName:`recording`,capScope:`system`,addonId:null,access:`create`},"recording.renderClip":{capName:`recording`,capScope:`system`,addonId:null,access:`create`},"recording.renderGif":{capName:`recording`,capScope:`system`,addonId:null,access:`create`},"recording.rescanStorage":{capName:`recording`,capScope:`system`,addonId:null,access:`create`},"recording.resumeForStorageMigration":{capName:`recording`,capScope:`system`,addonId:null,access:`create`},"recording.setDeviceConfig":{capName:`recording`,capScope:`system`,addonId:null,access:`create`},"recording.setDevicePlacement":{capName:`recording`,capScope:`system`,addonId:null,access:`create`},"recording.startStorageMigrationMove":{capName:`recording`,capScope:`system`,addonId:null,access:`create`},"recording.startStorageRebalance":{capName:`recording`,capScope:`system`,addonId:null,access:`create`},"recordingExport.cancelExport":{capName:`recording-export`,capScope:`system`,addonId:null,access:`create`},"recordingExport.createExport":{capName:`recording-export`,capScope:`system`,addonId:null,access:`create`},"recordingExport.deleteExport":{capName:`recording-export`,capScope:`system`,addonId:null,access:`delete`},"recordingExport.getDownloadUrl":{capName:`recording-export`,capScope:`system`,addonId:null,access:`view`},"recordingExport.getExport":{capName:`recording-export`,capScope:`system`,addonId:null,access:`view`},"recordingExport.listExports":{capName:`recording-export`,capScope:`system`,addonId:null,access:`view`},"recordingExport.readExportBytes":{capName:`recording-export`,capScope:`system`,addonId:null,access:`view`},"recordingSignal.getStatus":{capName:`recording-signal`,capScope:`device`,addonId:null,access:`view`},"sceneMonitor.captureReference":{capName:`scene-monitor`,capScope:`device`,addonId:null,access:`create`},"sceneMonitor.createScene":{capName:`scene-monitor`,capScope:`device`,addonId:null,access:`create`},"sceneMonitor.deleteReference":{capName:`scene-monitor`,capScope:`device`,addonId:null,access:`delete`},"sceneMonitor.deleteScene":{capName:`scene-monitor`,capScope:`device`,addonId:null,access:`delete`},"sceneMonitor.listScenes":{capName:`scene-monitor`,capScope:`device`,addonId:null,access:`view`},"sceneMonitor.listScenesBatch":{capName:`scene-monitor`,capScope:`device`,addonId:null,access:`view`},"sceneMonitor.recheckNow":{capName:`scene-monitor`,capScope:`device`,addonId:null,access:`create`},"sceneMonitor.resetScene":{capName:`scene-monitor`,capScope:`device`,addonId:null,access:`delete`},"sceneMonitor.updateScene":{capName:`scene-monitor`,capScope:`device`,addonId:null,access:`create`},"scriptRunner.run":{capName:`script-runner`,capScope:`device`,addonId:null,access:`create`},"scriptRunner.stop":{capName:`script-runner`,capScope:`device`,addonId:null,access:`create`},"serverManagement.applyServerUpdate":{capName:`server-management`,capScope:`system`,addonId:null,access:`create`},"serverManagement.checkServerUpdate":{capName:`server-management`,capScope:`system`,addonId:null,access:`create`},"serverManagement.getServerPackageStatus":{capName:`server-management`,capScope:`system`,addonId:null,access:`view`},"serverManagement.restartServer":{capName:`server-management`,capScope:`system`,addonId:null,access:`create`},"serverManagement.rollbackServerUpdate":{capName:`server-management`,capScope:`system`,addonId:null,access:`create`},"settingsStore.aggregate":{capName:`settings-store`,capScope:`system`,addonId:null,access:`view`},"settingsStore.count":{capName:`settings-store`,capScope:`system`,addonId:null,access:`view`},"settingsStore.declareCollection":{capName:`settings-store`,capScope:`system`,addonId:null,access:`create`},"settingsStore.delete":{capName:`settings-store`,capScope:`system`,addonId:null,access:`delete`},"settingsStore.deleteWhere":{capName:`settings-store`,capScope:`system`,addonId:null,access:`delete`},"settingsStore.get":{capName:`settings-store`,capScope:`system`,addonId:null,access:`view`},"settingsStore.histogram":{capName:`settings-store`,capScope:`system`,addonId:null,access:`view`},"settingsStore.insert":{capName:`settings-store`,capScope:`system`,addonId:null,access:`create`},"settingsStore.insertMany":{capName:`settings-store`,capScope:`system`,addonId:null,access:`create`},"settingsStore.isEmpty":{capName:`settings-store`,capScope:`system`,addonId:null,access:`view`},"settingsStore.query":{capName:`settings-store`,capScope:`system`,addonId:null,access:`view`},"settingsStore.set":{capName:`settings-store`,capScope:`system`,addonId:null,access:`create`},"settingsStore.update":{capName:`settings-store`,capScope:`system`,addonId:null,access:`create`},"settingsStore.updateWhere":{capName:`settings-store`,capScope:`system`,addonId:null,access:`create`},"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.getDebugState":{capName:`snapshot`,capScope:`device`,addonId:null,access:`view`},"snapshot.getSnapshot":{capName:`snapshot`,capScope:`device`,addonId:null,access:`view`},"snapshot.getSnapshotLinks":{capName:`snapshot`,capScope:`device`,addonId:null,access:`view`},"snapshot.getSnapshotOverview":{capName:`snapshot`,capScope:`device`,addonId:null,access:`view`},"snapshot.invalidateCache":{capName:`snapshot`,capScope:`device`,addonId:null,access:`create`},"ssoBridge.signBridgeToken":{capName:`sso-bridge`,capScope:`system`,addonId:null,access:`view`},"ssoBridge.verifyBridgeToken":{capName:`sso-bridge`,capScope:`system`,addonId:null,access:`view`},"storage.abortUpload":{capName:`storage`,capScope:`system`,addonId:null,access:`create`},"storage.beginDownload":{capName:`storage`,capScope:`system`,addonId:null,access:`create`},"storage.beginUpload":{capName:`storage`,capScope:`system`,addonId:null,access:`create`},"storage.delete":{capName:`storage`,capScope:`system`,addonId:null,access:`delete`},"storage.deleteLocation":{capName:`storage`,capScope:`system`,addonId:null,access:`delete`},"storage.endDownload":{capName:`storage`,capScope:`system`,addonId:null,access:`create`},"storage.exists":{capName:`storage`,capScope:`system`,addonId:null,access:`view`},"storage.finalizeUpload":{capName:`storage`,capScope:`system`,addonId:null,access:`create`},"storage.getAvailableSpace":{capName:`storage`,capScope:`system`,addonId:null,access:`view`},"storage.list":{capName:`storage`,capScope:`system`,addonId:null,access:`view`},"storage.listDrainProgress":{capName:`storage`,capScope:`system`,addonId:null,access:`view`},"storage.listLocationDeclarations":{capName:`storage`,capScope:`system`,addonId:null,access:`view`},"storage.listLocations":{capName:`storage`,capScope:`system`,addonId:null,access:`view`},"storage.listProviders":{capName:`storage`,capScope:`system`,addonId:null,access:`view`},"storage.read":{capName:`storage`,capScope:`system`,addonId:null,access:`view`},"storage.readChunk":{capName:`storage`,capScope:`system`,addonId:null,access:`view`},"storage.resolve":{capName:`storage`,capScope:`system`,addonId:null,access:`view`},"storage.testConfig":{capName:`storage`,capScope:`system`,addonId:null,access:`view`},"storage.testLocation":{capName:`storage`,capScope:`system`,addonId:null,access:`view`},"storage.upsertLocation":{capName:`storage`,capScope:`system`,addonId:null,access:`create`},"storage.write":{capName:`storage`,capScope:`system`,addonId:null,access:`create`},"storage.writeChunk":{capName:`storage`,capScope:`system`,addonId:null,access:`create`},"storageEvictable.evict":{capName:`storage-evictable`,capScope:`system`,addonId:null,access:`create`},"storageEvictable.getEvictableUsage":{capName:`storage-evictable`,capScope:`system`,addonId:null,access:`view`},"storageMigration.cancel":{capName:`storage-migration`,capScope:`system`,addonId:null,access:`create`},"storageMigration.cleanupCancel":{capName:`storage-migration`,capScope:`system`,addonId:null,access:`create`},"storageMigration.cleanupStart":{capName:`storage-migration`,capScope:`system`,addonId:null,access:`create`},"storageMigration.cleanupStatus":{capName:`storage-migration`,capScope:`system`,addonId:null,access:`view`},"storageMigration.drain":{capName:`storage-migration`,capScope:`system`,addonId:null,access:`create`},"storageMigration.history":{capName:`storage-migration`,capScope:`system`,addonId:null,access:`view`},"storageMigration.movers":{capName:`storage-migration`,capScope:`system`,addonId:null,access:`view`},"storageMigration.plan":{capName:`storage-migration`,capScope:`system`,addonId:null,access:`view`},"storageMigration.residue":{capName:`storage-migration`,capScope:`system`,addonId:null,access:`view`},"storageMigration.start":{capName:`storage-migration`,capScope:`system`,addonId:null,access:`create`},"storageMigration.status":{capName:`storage-migration`,capScope:`system`,addonId:null,access:`view`},"storageOccupancy.getOccupancy":{capName:`storage-occupancy`,capScope:`system`,addonId:null,access:`view`},"storageProvider.abortUpload":{capName:`storage-provider`,capScope:`system`,addonId:null,access:`create`},"storageProvider.beginDownload":{capName:`storage-provider`,capScope:`system`,addonId:null,access:`create`},"storageProvider.beginUpload":{capName:`storage-provider`,capScope:`system`,addonId:null,access:`create`},"storageProvider.delete":{capName:`storage-provider`,capScope:`system`,addonId:null,access:`delete`},"storageProvider.endDownload":{capName:`storage-provider`,capScope:`system`,addonId:null,access:`create`},"storageProvider.exists":{capName:`storage-provider`,capScope:`system`,addonId:null,access:`view`},"storageProvider.finalizeUpload":{capName:`storage-provider`,capScope:`system`,addonId:null,access:`create`},"storageProvider.getAvailableSpace":{capName:`storage-provider`,capScope:`system`,addonId:null,access:`view`},"storageProvider.getProviderInfo":{capName:`storage-provider`,capScope:`system`,addonId:null,access:`view`},"storageProvider.list":{capName:`storage-provider`,capScope:`system`,addonId:null,access:`view`},"storageProvider.read":{capName:`storage-provider`,capScope:`system`,addonId:null,access:`view`},"storageProvider.readChunk":{capName:`storage-provider`,capScope:`system`,addonId:null,access:`view`},"storageProvider.resolve":{capName:`storage-provider`,capScope:`system`,addonId:null,access:`view`},"storageProvider.testLocation":{capName:`storage-provider`,capScope:`system`,addonId:null,access:`view`},"storageProvider.write":{capName:`storage-provider`,capScope:`system`,addonId:null,access:`create`},"storageProvider.writeChunk":{capName:`storage-provider`,capScope:`system`,addonId:null,access:`create`},"streamBroker.acquireEgressTranscode":{capName:`stream-broker`,capScope:`system`,addonId:null,access:`create`},"streamBroker.assignProfile":{capName:`stream-broker`,capScope:`system`,addonId:null,access:`create`},"streamBroker.fetchEventMedia":{capName:`stream-broker`,capScope:`system`,addonId:null,access:`create`},"streamBroker.forgetDeviceHardware":{capName:`stream-broker`,capScope:`system`,addonId:null,access:`delete`},"streamBroker.getAllRtspEntries":{capName:`stream-broker`,capScope:`system`,addonId:null,access:`view`},"streamBroker.getBrokerStats":{capName:`stream-broker`,capScope:`system`,addonId:null,access:`view`},"streamBroker.getDeviceAudioMute":{capName:`stream-broker`,capScope:`system`,addonId:null,access:`view`},"streamBroker.getPreBufferInfo":{capName:`stream-broker`,capScope:`system`,addonId:null,access:`view`},"streamBroker.getRtspEntry":{capName:`stream-broker`,capScope:`system`,addonId:null,access:`view`},"streamBroker.getRtspPort":{capName:`stream-broker`,capScope:`system`,addonId:null,access:`view`},"streamBroker.getStreamUrl":{capName:`stream-broker`,capScope:`system`,addonId:null,access:`view`},"streamBroker.getStreamWithCodec":{capName:`stream-broker`,capScope:`system`,addonId:null,access:`create`},"streamBroker.isRtspEnabled":{capName:`stream-broker`,capScope:`system`,addonId:null,access:`view`},"streamBroker.killClient":{capName:`stream-broker`,capScope:`system`,addonId:null,access:`create`},"streamBroker.listAllCameraStreams":{capName:`stream-broker`,capScope:`system`,addonId:null,access:`view`},"streamBroker.listAllProfileSlots":{capName:`stream-broker`,capScope:`system`,addonId:null,access:`view`},"streamBroker.listClients":{capName:`stream-broker`,capScope:`system`,addonId:null,access:`view`},"streamBroker.probeStream":{capName:`stream-broker`,capScope:`system`,addonId:null,access:`create`},"streamBroker.produceEventMedia":{capName:`stream-broker`,capScope:`system`,addonId:null,access:`create`},"streamBroker.publishCameraStream":{capName:`stream-broker`,capScope:`system`,addonId:null,access:`create`},"streamBroker.pullAudioChunks":{capName:`stream-broker`,capScope:`system`,addonId:null,access:`view`},"streamBroker.pullFrameHandles":{capName:`stream-broker`,capScope:`system`,addonId:null,access:`view`},"streamBroker.regenerateRtspToken":{capName:`stream-broker`,capScope:`system`,addonId:null,access:`create`},"streamBroker.releaseEgressTranscode":{capName:`stream-broker`,capScope:`system`,addonId:null,access:`create`},"streamBroker.releaseStreamWithCodec":{capName:`stream-broker`,capScope:`system`,addonId:null,access:`create`},"streamBroker.renderPreBufferClip":{capName:`stream-broker`,capScope:`system`,addonId:null,access:`create`},"streamBroker.restartProfile":{capName:`stream-broker`,capScope:`system`,addonId:null,access:`create`},"streamBroker.retractCameraStream":{capName:`stream-broker`,capScope:`system`,addonId:null,access:`create`},"streamBroker.setDeviceAudioMute":{capName:`stream-broker`,capScope:`system`,addonId:null,access:`create`},"streamBroker.setPreBufferDuration":{capName:`stream-broker`,capScope:`system`,addonId:null,access:`create`},"streamBroker.setRtspEnabled":{capName:`stream-broker`,capScope:`system`,addonId:null,access:`create`},"streamBroker.subscribeAudioChunks":{capName:`stream-broker`,capScope:`system`,addonId:null,access:`create`},"streamBroker.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`},"streamCatalog.getCatalog":{capName:`stream-catalog`,capScope:`device`,addonId:null,access:`view`},"streamParams.getConfigSchema":{capName:`stream-params`,capScope:`device`,addonId:null,access:`view`},"streamParams.getOptions":{capName:`stream-params`,capScope:`device`,addonId:null,access:`view`},"streamParams.setProfile":{capName:`stream-params`,capScope:`device`,addonId:null,access:`create`},"switch.setState":{capName:`switch`,capScope:`device`,addonId:null,access:`create`},"system.detectSiteLocation":{capName:`system`,capScope:`system`,addonId:null,access:`create`},"system.featureFlags":{capName:`system`,capScope:`system`,addonId:null,access:`view`},"system.forceRetentionCleanup":{capName:`system`,capScope:`system`,addonId:null,access:`create`},"system.getFailureContributions":{capName:`system`,capScope:`system`,addonId:null,access:`view`},"system.getLoadContributions":{capName:`system`,capScope:`system`,addonId:null,access:`view`},"system.getLoggingSettings":{capName:`system`,capScope:`system`,addonId:null,access:`view`},"system.getRequestCensus":{capName:`system`,capScope:`system`,addonId:null,access:`view`},"system.getRetentionConfig":{capName:`system`,capScope:`system`,addonId:null,access:`view`},"system.getSiteLocation":{capName:`system`,capScope:`system`,addonId:null,access:`view`},"system.health":{capName:`system`,capScope:`system`,addonId:null,access:`view`},"system.info":{capName:`system`,capScope:`system`,addonId:null,access:`view`},"system.networkAddresses":{capName:`system`,capScope:`system`,addonId:null,access:`view`},"system.setLoggingSettings":{capName:`system`,capScope:`system`,addonId:null,access:`create`},"system.setRetentionConfig":{capName:`system`,capScope:`system`,addonId:null,access:`create`},"system.setSiteLocation":{capName:`system`,capScope:`system`,addonId:null,access:`create`},"terminalSession.adoptLegacyMonitor":{capName:`terminal-session`,capScope:`system`,addonId:null,access:`create`},"terminalSession.close":{capName:`terminal-session`,capScope:`system`,addonId:null,access:`create`},"terminalSession.createInstance":{capName:`terminal-session`,capScope:`system`,addonId:null,access:`create`},"terminalSession.deleteInstance":{capName:`terminal-session`,capScope:`system`,addonId:null,access:`delete`},"terminalSession.listInstances":{capName:`terminal-session`,capScope:`system`,addonId:null,access:`view`},"terminalSession.listLegacyCameras":{capName:`terminal-session`,capScope:`system`,addonId:null,access:`view`},"terminalSession.listProfiles":{capName:`terminal-session`,capScope:`system`,addonId:null,access:`view`},"terminalSession.listSessions":{capName:`terminal-session`,capScope:`system`,addonId:null,access:`view`},"terminalSession.openSession":{capName:`terminal-session`,capScope:`system`,addonId:null,access:`create`},"terminalSession.pullOutput":{capName:`terminal-session`,capScope:`system`,addonId:null,access:`create`},"terminalSession.resize":{capName:`terminal-session`,capScope:`system`,addonId:null,access:`create`},"terminalSession.setInstanceEnabled":{capName:`terminal-session`,capScope:`system`,addonId:null,access:`create`},"terminalSession.updateInstance":{capName:`terminal-session`,capScope:`system`,addonId:null,access:`create`},"terminalSession.writeInput":{capName:`terminal-session`,capScope:`system`,addonId:null,access:`create`},"toast.onToast":{capName:`toast`,capScope:`system`,addonId:null,access:`view`},"turnProvider.getTurnServers":{capName:`turn-provider`,capScope:`system`,addonId:null,access:`view`},"update.installUpdate":{capName:`update`,capScope:`device`,addonId:null,access:`create`},"userManagement.confirmTotp":{capName:`user-management`,capScope:`system`,addonId:null,access:`create`},"userManagement.createApiKey":{capName:`user-management`,capScope:`system`,addonId:null,access:`create`},"userManagement.createScopedToken":{capName:`user-management`,capScope:`system`,addonId:null,access:`create`},"userManagement.createUser":{capName:`user-management`,capScope:`system`,addonId:null,access:`create`},"userManagement.deleteUser":{capName:`user-management`,capScope:`system`,addonId:null,access:`delete`},"userManagement.disableTotp":{capName:`user-management`,capScope:`system`,addonId:null,access:`delete`},"userManagement.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.beginDiscoverableAuthentication":{capName:`user-passkeys`,capScope:`system`,addonId:null,access:`view`},"userPasskeys.beginRegistration":{capName:`user-passkeys`,capScope:`system`,addonId:null,access:`create`},"userPasskeys.finishAuthentication":{capName:`user-passkeys`,capScope:`system`,addonId:null,access:`view`},"userPasskeys.finishDiscoverableAuthentication":{capName:`user-passkeys`,capScope:`system`,addonId:null,access:`view`},"userPasskeys.finishRegistration":{capName:`user-passkeys`,capScope:`system`,addonId:null,access:`create`},"userPasskeys.getSecondFactorPreference":{capName:`user-passkeys`,capScope:`system`,addonId:null,access:`view`},"userPasskeys.listPasskeys":{capName:`user-passkeys`,capScope:`system`,addonId:null,access:`view`},"userPasskeys.removePasskey":{capName:`user-passkeys`,capScope:`system`,addonId:null,access:`delete`},"userPasskeys.setSecondFactorPreference":{capName:`user-passkeys`,capScope:`system`,addonId:null,access:`create`},"vacuumControl.locate":{capName:`vacuum-control`,capScope:`device`,addonId:null,access:`create`},"vacuumControl.pause":{capName:`vacuum-control`,capScope:`device`,addonId:null,access:`create`},"vacuumControl.returnToBase":{capName:`vacuum-control`,capScope:`device`,addonId:null,access:`create`},"vacuumControl.setFanSpeed":{capName:`vacuum-control`,capScope:`device`,addonId:null,access:`create`},"vacuumControl.start":{capName:`vacuum-control`,capScope:`device`,addonId:null,access:`create`},"vacuumControl.stop":{capName:`vacuum-control`,capScope:`device`,addonId:null,access:`create`},"valve.close":{capName:`valve`,capScope:`device`,addonId:null,access:`create`},"valve.open":{capName:`valve`,capScope:`device`,addonId:null,access:`create`},"valve.setPosition":{capName:`valve`,capScope:`device`,addonId:null,access:`create`},"valve.stop":{capName:`valve`,capScope:`device`,addonId:null,access:`create`},"vectorStore.declareIndex":{capName:`vector-store`,capScope:`system`,addonId:null,access:`create`},"vectorStore.deleteByFilter":{capName:`vector-store`,capScope:`system`,addonId:null,access:`delete`},"vectorStore.deleteByIds":{capName:`vector-store`,capScope:`system`,addonId:null,access:`delete`},"vectorStore.fetchByIds":{capName:`vector-store`,capScope:`system`,addonId:null,access:`view`},"vectorStore.getByIds":{capName:`vector-store`,capScope:`system`,addonId:null,access:`view`},"vectorStore.query":{capName:`vector-store`,capScope:`system`,addonId:null,access:`view`},"vectorStore.scan":{capName:`vector-store`,capScope:`system`,addonId:null,access:`view`},"vectorStore.stats":{capName:`vector-store`,capScope:`system`,addonId:null,access:`view`},"vectorStore.upsert":{capName:`vector-store`,capScope:`system`,addonId:null,access:`create`},"videoclips.getClipPlayback":{capName:`videoclips`,capScope:`device`,addonId:null,access:`view`},"videoclips.listClips":{capName:`videoclips`,capScope:`device`,addonId:null,access:`view`},"viewerUi.getStaticDir":{capName:`viewer-ui`,capScope:`system`,addonId:null,access:`view`},"viewerUi.getVersion":{capName:`viewer-ui`,capScope:`system`,addonId:null,access:`view`},"waterHeater.setAway":{capName:`water-heater`,capScope:`device`,addonId:null,access:`create`},"waterHeater.setOperationMode":{capName:`water-heater`,capScope:`device`,addonId:null,access:`create`},"waterHeater.setTargetTemp":{capName:`water-heater`,capScope:`device`,addonId:null,access:`create`},"webrtcSession.addIceCandidate":{capName:`webrtc-session`,capScope:`device`,addonId:null,access:`create`},"webrtcSession.closeSession":{capName:`webrtc-session`,capScope:`device`,addonId:null,access:`create`},"webrtcSession.createSession":{capName:`webrtc-session`,capScope:`device`,addonId:null,access:`create`},"webrtcSession.getIceCandidates":{capName:`webrtc-session`,capScope:`device`,addonId:null,access:`view`},"webrtcSession.getSessionState":{capName:`webrtc-session`,capScope:`device`,addonId:null,access:`view`},"webrtcSession.handleAnswer":{capName:`webrtc-session`,capScope:`device`,addonId:null,access:`create`},"webrtcSession.handleOffer":{capName:`webrtc-session`,capScope:`device`,addonId:null,access:`create`},"webrtcSession.hasAdaptiveBitrate":{capName:`webrtc-session`,capScope:`device`,addonId:null,access:`view`},"webrtcSession.listStreams":{capName:`webrtc-session`,capScope:`device`,addonId:null,access:`view`},"zoneAnalytics.getCameraHistory":{capName:`zone-analytics`,capScope:`device`,addonId:null,access:`view`},"zoneAnalytics.getCurrentSnapshot":{capName:`zone-analytics`,capScope:`device`,addonId:null,access:`view`},"zoneAnalytics.getCurrentSnapshotBatch":{capName:`zone-analytics`,capScope:`device`,addonId:null,access:`view`},"zoneAnalytics.getUnzonedHistory":{capName:`zone-analytics`,capScope:`device`,addonId:null,access:`view`},"zoneAnalytics.getZoneHistory":{capName:`zone-analytics`,capScope:`device`,addonId:null,access:`view`},"zoneRules.listRules":{capName:`zone-rules`,capScope:`device`,addonId:null,access:`view`},"zoneRules.setRules":{capName:`zone-rules`,capScope:`device`,addonId:null,access:`create`},"zones.addZone":{capName:`zones`,capScope:`device`,addonId:null,access:`create`},"zones.listZones":{capName:`zones`,capScope:`device`,addonId:null,access:`view`},"zones.removeZone":{capName:`zones`,capScope:`device`,addonId:null,access:`delete`},"zones.updateZone":{capName:`zones`,capScope:`device`,addonId:null,access:`create`}}),PM=`accessories.addon-pages.addon-pages-source.addon-routes.addon-settings.addon-widgets.addon-widgets-source.addons.admin-ui.alarm-panel.alerts.audio-analysis.audio-analyzer.audio-codec.audio-metrics.auth-provider.automation-control.backup.battery.brightness.broker.button.camera-credentials.camera-streams.climate-control.color.connection-test.consumables.control.core-blocks.cover.custom-model-registry.data-store-provider.day-night.decoder.device-adoption.device-discovery.device-export.device-manager.device-ops.device-provider.device-state.embedding-encoder.events.face-gallery.failure-contribution.fan-control.filesystem-browse.humidifier.image-settings.integrations.intercom.lawn-mower-control.llm.llm-runtime.load-contribution.local-network.lock-control.log-channels.log-destination.login-method.media-player.mesh-network.metrics-provider.model-convert.model-distributor.motion.motion-detection.motion-trigger.motion-zones.mqtt-broker.native-object-detection.navigation.network-access.network-quality.nodes.notification-output.notification-rules.notifier.oauth-integration.osd.osd-manager.pet-feeder.pipeline-analytics.pipeline-executor.pipeline-orchestrator.pipeline-runner.plate-gallery.platform-probe.privacy-mask.ptz.ptz-autotrack.reboot.recording.recording-export.recording-signal.scene-monitor.script-runner.server-management.settings-store.smtp-provider.snapshot.sso-bridge.storage.storage-evictable.storage-migration.storage-occupancy.storage-provider.stream-broker.stream-catalog.stream-params.switch.system.terminal-session.toast.turn-provider.update.user-management.user-passkeys.vacuum-control.valve.vector-store.videoclips.viewer-ui.water-heater.webrtc-session.zone-analytics.zone-rules.zones`.split(`.`),FM=`accessories.alarm-panel.audio-analysis.audio-metrics.automation-control.battery.brightness.button.camera-credentials.camera-streams.climate-control.color.consumables.control.cover.day-night.device-discovery.device-ops.events.fan-control.humidifier.image-settings.intercom.lawn-mower-control.lock-control.media-player.motion.motion-detection.motion-trigger.motion-zones.native-object-detection.navigation.notifier.osd.pet-feeder.pipeline-analytics.privacy-mask.ptz.ptz-autotrack.reboot.recording-signal.scene-monitor.script-runner.snapshot.stream-catalog.stream-params.switch.update.vacuum-control.valve.videoclips.water-heater.webrtc-session.zone-analytics.zone-rules.zones`.split(`.`),IM=`addon-pages.addon-pages-source.addon-routes.addon-settings.addon-widgets.addon-widgets-source.addons.admin-ui.alerts.audio-analyzer.audio-codec.auth-provider.backup.broker.connection-test.core-blocks.custom-model-registry.data-store-provider.decoder.device-adoption.device-export.device-manager.device-provider.device-state.embedding-encoder.face-gallery.failure-contribution.filesystem-browse.integrations.llm.llm-runtime.load-contribution.local-network.log-channels.log-destination.login-method.mesh-network.metrics-provider.model-convert.model-distributor.mqtt-broker.network-access.network-quality.nodes.notification-output.notification-rules.oauth-integration.osd-manager.pipeline-executor.pipeline-orchestrator.pipeline-runner.plate-gallery.platform-probe.recording.recording-export.server-management.settings-store.smtp-provider.sso-bridge.storage.storage-evictable.storage-migration.storage-occupancy.storage-provider.stream-broker.system.terminal-session.toast.turn-provider.user-management.user-passkeys.vector-store.viewer-ui`.split(`.`),LM=Object.freeze({"accessories.setChildHidden":[{name:`childDeviceId`,form:`single`,optional:!1},{name:`deviceId`,form:`single`,optional:!1}],"addonSettings.getDeviceSettings":[{name:`deviceId`,form:`single`,optional:!1}],"addonSettings.updateDeviceSettings":[{name:`deviceId`,form:`single`,optional:!1}],"alarmPanel.arm":[{name:`deviceId`,form:`single`,optional:!1}],"alarmPanel.disarm":[{name:`deviceId`,form:`single`,optional:!1}],"alarmPanel.trigger":[{name:`deviceId`,form:`single`,optional:!1}],"audioAnalysis.resolveDeviceSettings":[{name:`deviceId`,form:`single`,optional:!1}],"audioAnalyzer.classify":[{name:`deviceId`,form:`single`,optional:!0}],"audioMetrics.getCurrentSnapshot":[{name:`deviceId`,form:`single`,optional:!1}],"audioMetrics.getHistory":[{name:`deviceId`,form:`single`,optional:!1}],"automationControl.disable":[{name:`deviceId`,form:`single`,optional:!1}],"automationControl.enable":[{name:`deviceId`,form:`single`,optional:!1}],"automationControl.trigger":[{name:`deviceId`,form:`single`,optional:!1}],"battery.wakeForStream":[{name:`deviceId`,form:`single`,optional:!1}],"brightness.setBrightness":[{name:`deviceId`,form:`single`,optional:!1}],"button.press":[{name:`deviceId`,form:`single`,optional:!1}],"cameraCredentials.getCredentials":[{name:`deviceId`,form:`single`,optional:!1}],"cameraStreams.getBrokerStreams":[{name:`deviceId`,form:`single`,optional:!1}],"cameraStreams.getCameraStreams":[{name:`deviceId`,form:`single`,optional:!1}],"cameraStreams.getProfileRtspEntries":[{name:`deviceId`,form:`single`,optional:!1}],"cameraStreams.getRtspEntries":[{name:`deviceId`,form:`single`,optional:!1}],"cameraStreams.pickStream":[{name:`deviceId`,form:`single`,optional:!1}],"climateControl.setFanMode":[{name:`deviceId`,form:`single`,optional:!1}],"climateControl.setMode":[{name:`deviceId`,form:`single`,optional:!1}],"climateControl.setPreset":[{name:`deviceId`,form:`single`,optional:!1}],"climateControl.setSwingHorizontal":[{name:`deviceId`,form:`single`,optional:!1}],"climateControl.setSwingVertical":[{name:`deviceId`,form:`single`,optional:!1}],"climateControl.setTarget":[{name:`deviceId`,form:`single`,optional:!1}],"climateControl.setTargetHumidity":[{name:`deviceId`,form:`single`,optional:!1}],"climateControl.setTargetRange":[{name:`deviceId`,form:`single`,optional:!1}],"color.setColor":[{name:`deviceId`,form:`single`,optional:!1}],"consumables.reset":[{name:`deviceId`,form:`single`,optional:!1}],"control.setValue":[{name:`deviceId`,form:`single`,optional:!1}],"cover.close":[{name:`deviceId`,form:`single`,optional:!1}],"cover.open":[{name:`deviceId`,form:`single`,optional:!1}],"cover.setPosition":[{name:`deviceId`,form:`single`,optional:!1}],"cover.setTiltPosition":[{name:`deviceId`,form:`single`,optional:!1}],"cover.stop":[{name:`deviceId`,form:`single`,optional:!1}],"dayNight.getOptions":[{name:`deviceId`,form:`single`,optional:!1}],"dayNight.setSettings":[{name:`deviceId`,form:`single`,optional:!1}],"decoder.createSession":[{name:`deviceId`,form:`single`,optional:!0}],"deviceAdoption.release":[{name:`camDeviceId`,form:`single`,optional:!1}],"deviceAdoption.resync":[{name:`camDeviceId`,form:`single`,optional:!1}],"deviceDiscovery.adoptDevice":[{name:`deviceId`,form:`single`,optional:!1}],"deviceDiscovery.listDiscovered":[{name:`deviceId`,form:`single`,optional:!1}],"deviceDiscovery.refreshDiscovery":[{name:`deviceId`,form:`single`,optional:!1}],"deviceDiscovery.releaseDevice":[{name:`childDeviceId`,form:`single`,optional:!1},{name:`deviceId`,form:`single`,optional:!1}],"deviceManager.adoptionRelease":[{name:`camDeviceId`,form:`single`,optional:!1}],"deviceManager.adoptionResync":[{name:`camDeviceId`,form:`single`,optional:!1}],"deviceManager.applyInitialMeta":[{name:`deviceId`,form:`single`,optional:!1},{name:`linkDeviceId`,form:`single`,optional:!0}],"deviceManager.disable":[{name:`deviceId`,form:`single`,optional:!1}],"deviceManager.enable":[{name:`deviceId`,form:`single`,optional:!1}],"deviceManager.getBindings":[{name:`deviceId`,form:`single`,optional:!1}],"deviceManager.getBindingsBatch":[{name:`deviceIds`,form:`array`,optional:!1}],"deviceManager.getChildren":[{name:`parentDeviceId`,form:`single`,optional:!1}],"deviceManager.getChildrenBatch":[{name:`parentDeviceIds`,form:`array`,optional:!1}],"deviceManager.getConfigSchema":[{name:`deviceId`,form:`single`,optional:!1}],"deviceManager.getDevice":[{name:`deviceId`,form:`single`,optional:!1}],"deviceManager.getDeviceAggregate":[{name:`deviceId`,form:`single`,optional:!1}],"deviceManager.getDeviceLiveInfoAggregate":[{name:`deviceId`,form:`single`,optional:!1}],"deviceManager.getDeviceSettingsAggregate":[{name:`deviceId`,form:`single`,optional:!1}],"deviceManager.getDeviceStatusAggregate":[{name:`deviceId`,form:`single`,optional:!1}],"deviceManager.getDeviceStatusAggregateBatch":[{name:`deviceIds`,form:`array`,optional:!1}],"deviceManager.getLinkedDevices":[{name:`deviceId`,form:`single`,optional:!1}],"deviceManager.getLinkedDevicesBatch":[{name:`deviceIds`,form:`array`,optional:!1}],"deviceManager.getSettingsSchema":[{name:`deviceId`,form:`single`,optional:!1}],"deviceManager.getStreamProfileMap":[{name:`deviceId`,form:`single`,optional:!1}],"deviceManager.getStreamSources":[{name:`deviceId`,form:`single`,optional:!1}],"deviceManager.getWireableFields":[{name:`deviceId`,form:`single`,optional:!1}],"deviceManager.listAll":[{name:`deviceIds`,form:`array`,optional:!0}],"deviceManager.loadConfig":[{name:`deviceId`,form:`single`,optional:!1}],"deviceManager.loadMeta":[{name:`deviceId`,form:`single`,optional:!1}],"deviceManager.loadRuntimeState":[{name:`deviceId`,form:`single`,optional:!1}],"deviceManager.persistConfig":[{name:`deviceId`,form:`single`,optional:!1}],"deviceManager.probeStreams":[{name:`deviceId`,form:`single`,optional:!1}],"deviceManager.registerDevice":[{name:`parentDeviceId`,form:`single`,optional:!0}],"deviceManager.remove":[{name:`deviceId`,form:`single`,optional:!1}],"deviceManager.removeDevice":[{name:`deviceId`,form:`single`,optional:!1}],"deviceManager.runDeviceAction":[{name:`deviceId`,form:`single`,optional:!1}],"deviceManager.setChildLayout":[{name:`deviceId`,form:`single`,optional:!1}],"deviceManager.setDisabled":[{name:`deviceId`,form:`single`,optional:!1}],"deviceManager.setDisplay":[{name:`deviceId`,form:`single`,optional:!1}],"deviceManager.setIntegrationId":[{name:`deviceId`,form:`single`,optional:!1}],"deviceManager.setLinkDeviceId":[{name:`deviceId`,form:`single`,optional:!1},{name:`linkDeviceId`,form:`single`,optional:!0}],"deviceManager.setLocation":[{name:`deviceId`,form:`single`,optional:!1}],"deviceManager.setMetadata":[{name:`deviceId`,form:`single`,optional:!1}],"deviceManager.setName":[{name:`deviceId`,form:`single`,optional:!1}],"deviceManager.setPrimaryChildEntityId":[{name:`deviceId`,form:`single`,optional:!1}],"deviceManager.setRole":[{name:`deviceId`,form:`single`,optional:!1}],"deviceManager.setStreamProfileMap":[{name:`deviceId`,form:`single`,optional:!1}],"deviceManager.setType":[{name:`deviceId`,form:`single`,optional:!1}],"deviceManager.setWrapperActive":[{name:`deviceId`,form:`single`,optional:!1}],"deviceManager.testField":[{name:`deviceId`,form:`single`,optional:!1}],"deviceManager.updateConfig":[{name:`deviceId`,form:`single`,optional:!1}],"deviceManager.updateDeviceField":[{name:`deviceId`,form:`single`,optional:!1}],"deviceManager.updateDeviceFieldsBatch":[{name:`deviceId`,form:`single`,optional:!1}],"deviceOps.getConfigEntries":[{name:`deviceId`,form:`single`,optional:!1}],"deviceOps.getRawState":[{name:`deviceId`,form:`single`,optional:!1}],"deviceOps.getSettingsSchema":[{name:`deviceId`,form:`single`,optional:!1}],"deviceOps.getStreamSources":[{name:`deviceId`,form:`single`,optional:!1}],"deviceOps.removeDevice":[{name:`deviceId`,form:`single`,optional:!1}],"deviceOps.runAction":[{name:`deviceId`,form:`single`,optional:!1}],"deviceOps.setConfig":[{name:`deviceId`,form:`single`,optional:!1}],"deviceState.getCapSlice":[{name:`deviceId`,form:`single`,optional:!1}],"deviceState.getSnapshot":[{name:`deviceId`,form:`single`,optional:!1}],"deviceState.setCapSlice":[{name:`deviceId`,form:`single`,optional:!1}],"events.getEventClipUrl":[{name:`deviceId`,form:`single`,optional:!1}],"events.getEvents":[{name:`deviceId`,form:`single`,optional:!1}],"events.getEventThumbnail":[{name:`deviceId`,form:`single`,optional:!1}],"faceGallery.getFaceByTrack":[{name:`deviceId`,form:`single`,optional:!1}],"faceGallery.listRecentFaces":[{name:`deviceId`,form:`single`,optional:!0},{name:`deviceIds`,form:`array`,optional:!0}],"fanControl.setDirection":[{name:`deviceId`,form:`single`,optional:!1}],"fanControl.setOscillating":[{name:`deviceId`,form:`single`,optional:!1}],"fanControl.setPercentage":[{name:`deviceId`,form:`single`,optional:!1}],"fanControl.setPreset":[{name:`deviceId`,form:`single`,optional:!1}],"humidifier.setMode":[{name:`deviceId`,form:`single`,optional:!1}],"humidifier.setOn":[{name:`deviceId`,form:`single`,optional:!1}],"humidifier.setTargetHumidity":[{name:`deviceId`,form:`single`,optional:!1}],"imageSettings.getOptions":[{name:`deviceId`,form:`single`,optional:!1}],"imageSettings.setSettings":[{name:`deviceId`,form:`single`,optional:!1}],"intercom.endTalkSession":[{name:`deviceId`,form:`single`,optional:!1}],"intercom.handleAnswer":[{name:`deviceId`,form:`single`,optional:!1}],"intercom.pushTalkAudio":[{name:`deviceId`,form:`single`,optional:!1}],"intercom.startSession":[{name:`deviceId`,form:`single`,optional:!1}],"intercom.startTalkSession":[{name:`deviceId`,form:`single`,optional:!1}],"intercom.stopSession":[{name:`deviceId`,form:`single`,optional:!1}],"lawnMowerControl.dock":[{name:`deviceId`,form:`single`,optional:!1}],"lawnMowerControl.pause":[{name:`deviceId`,form:`single`,optional:!1}],"lawnMowerControl.startMowing":[{name:`deviceId`,form:`single`,optional:!1}],"lockControl.lock":[{name:`deviceId`,form:`single`,optional:!1}],"lockControl.open":[{name:`deviceId`,form:`single`,optional:!1}],"lockControl.unlock":[{name:`deviceId`,form:`single`,optional:!1}],"mediaPlayer.next":[{name:`deviceId`,form:`single`,optional:!1}],"mediaPlayer.pause":[{name:`deviceId`,form:`single`,optional:!1}],"mediaPlayer.play":[{name:`deviceId`,form:`single`,optional:!1}],"mediaPlayer.playMedia":[{name:`deviceId`,form:`single`,optional:!1}],"mediaPlayer.previous":[{name:`deviceId`,form:`single`,optional:!1}],"mediaPlayer.seek":[{name:`deviceId`,form:`single`,optional:!1}],"mediaPlayer.selectSource":[{name:`deviceId`,form:`single`,optional:!1}],"mediaPlayer.setMute":[{name:`deviceId`,form:`single`,optional:!1}],"mediaPlayer.setRepeat":[{name:`deviceId`,form:`single`,optional:!1}],"mediaPlayer.setShuffle":[{name:`deviceId`,form:`single`,optional:!1}],"mediaPlayer.setVolume":[{name:`deviceId`,form:`single`,optional:!1}],"mediaPlayer.stop":[{name:`deviceId`,form:`single`,optional:!1}],"motion.isDetected":[{name:`deviceId`,form:`single`,optional:!1}],"motionDetection.analyze":[{name:`deviceId`,form:`single`,optional:!1}],"motionDetection.removeCamera":[{name:`deviceId`,form:`single`,optional:!1}],"motionTrigger.setMotionTrigger":[{name:`deviceId`,form:`single`,optional:!1}],"motionZones.getOptions":[{name:`deviceId`,form:`single`,optional:!1}],"motionZones.setZone":[{name:`deviceId`,form:`single`,optional:!1}],"nativeObjectDetection.setEnabled":[{name:`deviceId`,form:`single`,optional:!1}],"navigation.getFeatures":[{name:`deviceId`,form:`single`,optional:!1}],"navigation.goToPoint":[{name:`deviceId`,form:`single`,optional:!1}],"navigation.listActions":[{name:`deviceId`,form:`single`,optional:!1}],"navigation.move":[{name:`deviceId`,form:`single`,optional:!1}],"navigation.playSound":[{name:`deviceId`,form:`single`,optional:!1}],"navigation.runAction":[{name:`deviceId`,form:`single`,optional:!1}],"navigation.setLightLevel":[{name:`deviceId`,form:`single`,optional:!1}],"navigation.setLightMode":[{name:`deviceId`,form:`single`,optional:!1}],"navigation.setLightOn":[{name:`deviceId`,form:`single`,optional:!1}],"navigation.stop":[{name:`deviceId`,form:`single`,optional:!1}],"networkQuality.getDeviceStats":[{name:`deviceId`,form:`single`,optional:!1}],"networkQuality.reportClientStats":[{name:`deviceId`,form:`single`,optional:!1}],"notificationRules.setDeviceMuted":[{name:`deviceId`,form:`single`,optional:!1}],"notifier.cancel":[{name:`deviceId`,form:`single`,optional:!1}],"notifier.send":[{name:`deviceId`,form:`single`,optional:!1}],"osd.setOverlay":[{name:`deviceId`,form:`single`,optional:!1}],"osdManager.clearSlotBinding":[{name:`deviceId`,form:`single`,optional:!1}],"osdManager.copyDeviceConfiguration":[{name:`sourceDeviceId`,form:`single`,optional:!1},{name:`targetDeviceId`,form:`single`,optional:!1}],"osdManager.getDeviceOsd":[{name:`deviceId`,form:`single`,optional:!1}],"osdManager.getSourceCatalog":[{name:`deviceId`,form:`single`,optional:!1}],"osdManager.previewSlot":[{name:`deviceId`,form:`single`,optional:!1}],"osdManager.renderDevice":[{name:`deviceId`,form:`single`,optional:!1}],"osdManager.setSlotBinding":[{name:`deviceId`,form:`single`,optional:!1}],"petFeeder.callPet":[{name:`deviceId`,form:`single`,optional:!1}],"petFeeder.cancelFeed":[{name:`deviceId`,form:`single`,optional:!1}],"petFeeder.feed":[{name:`deviceId`,form:`single`,optional:!1}],"petFeeder.markFoodReplenished":[{name:`deviceId`,form:`single`,optional:!1}],"petFeeder.playSound":[{name:`deviceId`,form:`single`,optional:!1}],"petFeeder.resetDesiccant":[{name:`deviceId`,form:`single`,optional:!1}],"petFeeder.setChildLock":[{name:`deviceId`,form:`single`,optional:!1}],"petFeeder.setFeedSound":[{name:`deviceId`,form:`single`,optional:!1}],"petFeeder.setIndicatorLight":[{name:`deviceId`,form:`single`,optional:!1}],"petFeeder.setVolume":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineAnalytics.clearTracks":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineAnalytics.completeRetrainTrack":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineAnalytics.deleteDeviceEvents":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineAnalytics.deleteTracks":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineAnalytics.deselectRetrainFrame":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineAnalytics.getActiveTracks":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineAnalytics.getAudioEvents":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineAnalytics.getEventDensity":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineAnalytics.getEventDensityBatch":[{name:`deviceIds`,form:`array`,optional:!1}],"pipelineAnalytics.getEventMedia":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineAnalytics.getEventMediaFootprintByKind":[{name:`deviceId`,form:`single`,optional:!0}],"pipelineAnalytics.getKeyEvents":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineAnalytics.getKeyEventsBatch":[{name:`deviceIds`,form:`array`,optional:!1}],"pipelineAnalytics.getMotionEvents":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineAnalytics.getObjectEvents":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineAnalytics.getRetrainExportUrl":[{name:`deviceIds`,form:`array`,optional:!0}],"pipelineAnalytics.getSensorEvents":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineAnalytics.getTrack":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineAnalytics.getTrackMedia":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineAnalytics.getTrainingExportSummary":[{name:`deviceIds`,form:`array`,optional:!0}],"pipelineAnalytics.getTrainingExportUrl":[{name:`deviceIds`,form:`array`,optional:!0}],"pipelineAnalytics.listEventKinds":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineAnalytics.listEventKindsBatch":[{name:`deviceIds`,form:`array`,optional:!1}],"pipelineAnalytics.listEventMedia":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineAnalytics.listOpsLog":[{name:`deviceId`,form:`single`,optional:!0}],"pipelineAnalytics.listRecentTracks":[{name:`deviceIds`,form:`array`,optional:!1}],"pipelineAnalytics.listRetrainStaging":[{name:`deviceIds`,form:`array`,optional:!0}],"pipelineAnalytics.listSummaries":[{name:`deviceIds`,form:`array`,optional:!1}],"pipelineAnalytics.listTrackMedia":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineAnalytics.listTracks":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineAnalytics.proposeRetrainAnnotations":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineAnalytics.pruneEventsBefore":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineAnalytics.pruneTracksBefore":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineAnalytics.rebuildObjectEmbeddings":[{name:`deviceId`,form:`single`,optional:!0}],"pipelineAnalytics.reclaimDebugMedia":[{name:`deviceIds`,form:`array`,optional:!0}],"pipelineAnalytics.reconcileFromDisk":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineAnalytics.restageRetrainTrack":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineAnalytics.runReplayFrameProcessor":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineAnalytics.saveRetrainAnnotations":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineAnalytics.searchObjectEvents":[{name:`deviceId`,form:`single`,optional:!0}],"pipelineAnalytics.selectRetrainFrames":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineAnalytics.setTrackFlags":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineAnalytics.wipeAllAnalytics":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineExecutor.runPipeline":[{name:`deviceId`,form:`single`,optional:!0}],"pipelineExecutor.runPipelineBatch":[{name:`deviceId`,form:`single`,optional:!0}],"pipelineOrchestrator.assignAudio":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineOrchestrator.assignPipeline":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineOrchestrator.getAudioAssignment":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineOrchestrator.getCameraMetrics":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineOrchestrator.getCameraSettings":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineOrchestrator.getCameraStatus":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineOrchestrator.getCameraStatuses":[{name:`deviceIds`,form:`array`,optional:!0}],"pipelineOrchestrator.getCameraStepOverrides":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineOrchestrator.getCameraSwitches":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineOrchestrator.getPipelineAssignment":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineOrchestrator.getPipelineDevicePin":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineOrchestrator.resolvePipeline":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineOrchestrator.setCameraPipelineForAgent":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineOrchestrator.setCameraStepOverride":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineOrchestrator.setCameraStepToggle":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineOrchestrator.setCameraSwitch":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineOrchestrator.setPipelineDevicePin":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineOrchestrator.unassignAudio":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineOrchestrator.unassignPipeline":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineRunner.attachCamera":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineRunner.detachCamera":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineRunner.getCameraMetrics":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineRunner.reportMotion":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineRunner.runDetailSubtree":[{name:`deviceId`,form:`single`,optional:!1}],"pipelineRunner.runStatelessStep":[{name:`sourceDeviceId`,form:`single`,optional:!1}],"plateGallery.getPlateByTrack":[{name:`deviceId`,form:`single`,optional:!1}],"plateGallery.listPlates":[{name:`deviceId`,form:`single`,optional:!0}],"privacyMask.getOptions":[{name:`deviceId`,form:`single`,optional:!1}],"privacyMask.setAudioEnabled":[{name:`deviceId`,form:`single`,optional:!1}],"privacyMask.setMask":[{name:`deviceId`,form:`single`,optional:!1}],"ptz.continuousMove":[{name:`deviceId`,form:`single`,optional:!1}],"ptz.deletePreset":[{name:`deviceId`,form:`single`,optional:!1}],"ptz.getOptions":[{name:`deviceId`,form:`single`,optional:!1}],"ptz.getPosition":[{name:`deviceId`,form:`single`,optional:!1}],"ptz.getPresets":[{name:`deviceId`,form:`single`,optional:!1}],"ptz.goHome":[{name:`deviceId`,form:`single`,optional:!1}],"ptz.goToPreset":[{name:`deviceId`,form:`single`,optional:!1}],"ptz.move":[{name:`deviceId`,form:`single`,optional:!1}],"ptz.savePreset":[{name:`deviceId`,form:`single`,optional:!1}],"ptz.setAutofocus":[{name:`deviceId`,form:`single`,optional:!1}],"ptz.stop":[{name:`deviceId`,form:`single`,optional:!1}],"ptzAutotrack.getSettings":[{name:`deviceId`,form:`single`,optional:!1}],"ptzAutotrack.getStatus":[{name:`deviceId`,form:`single`,optional:!1}],"ptzAutotrack.setEnabled":[{name:`deviceId`,form:`single`,optional:!1}],"ptzAutotrack.setSettings":[{name:`deviceId`,form:`single`,optional:!1}],"reboot.reboot":[{name:`deviceId`,form:`single`,optional:!1}],"recording.deleteFootprint":[{name:`deviceId`,form:`single`,optional:!1}],"recording.getAvailability":[{name:`deviceId`,form:`single`,optional:!1}],"recording.getAvailabilityBatch":[{name:`deviceIds`,form:`array`,optional:!1}],"recording.getDaysWithRecordings":[{name:`deviceId`,form:`single`,optional:!1}],"recording.getDaysWithRecordingsBatch":[{name:`deviceIds`,form:`array`,optional:!1}],"recording.getDeviceConfig":[{name:`deviceId`,form:`single`,optional:!1}],"recording.getPlaybackManifest":[{name:`deviceId`,form:`single`,optional:!1}],"recording.listOpsLog":[{name:`deviceId`,form:`single`,optional:!0}],"recording.locateSegment":[{name:`deviceId`,form:`single`,optional:!1}],"recording.pruneFootage":[{name:`deviceId`,form:`single`,optional:!1}],"recording.readGopBytes":[{name:`deviceId`,form:`single`,optional:!1}],"recording.readSegmentBytes":[{name:`deviceId`,form:`single`,optional:!1}],"recording.readWindowBytes":[{name:`deviceId`,form:`single`,optional:!1}],"recording.reconcileLedgerAgainstDisk":[{name:`deviceId`,form:`single`,optional:!0}],"recording.relocateFootage":[{name:`deviceId`,form:`single`,optional:!0}],"recording.renderClip":[{name:`deviceId`,form:`single`,optional:!1}],"recording.renderGif":[{name:`deviceId`,form:`single`,optional:!1}],"recording.rescanStorage":[{name:`deviceId`,form:`single`,optional:!1}],"recording.setDeviceConfig":[{name:`deviceId`,form:`single`,optional:!1}],"recording.setDevicePlacement":[{name:`deviceId`,form:`single`,optional:!1}],"recording.startStorageMigrationMove":[{name:`deviceId`,form:`single`,optional:!0}],"recordingExport.createExport":[{name:`deviceId`,form:`single`,optional:!1}],"recordingExport.listExports":[{name:`deviceId`,form:`single`,optional:!0}],"recordingSignal.getStatus":[{name:`deviceId`,form:`single`,optional:!1}],"sceneMonitor.captureReference":[{name:`deviceId`,form:`single`,optional:!1}],"sceneMonitor.createScene":[{name:`deviceId`,form:`single`,optional:!1}],"sceneMonitor.deleteReference":[{name:`deviceId`,form:`single`,optional:!1}],"sceneMonitor.deleteScene":[{name:`deviceId`,form:`single`,optional:!1}],"sceneMonitor.listScenes":[{name:`deviceId`,form:`single`,optional:!1}],"sceneMonitor.listScenesBatch":[{name:`deviceIds`,form:`array`,optional:!1}],"sceneMonitor.recheckNow":[{name:`deviceId`,form:`single`,optional:!1}],"sceneMonitor.resetScene":[{name:`deviceId`,form:`single`,optional:!1}],"sceneMonitor.updateScene":[{name:`deviceId`,form:`single`,optional:!1}],"scriptRunner.run":[{name:`deviceId`,form:`single`,optional:!1}],"scriptRunner.stop":[{name:`deviceId`,form:`single`,optional:!1}],"snapshot.getDebugState":[{name:`deviceId`,form:`single`,optional:!1}],"snapshot.getSnapshot":[{name:`deviceId`,form:`single`,optional:!1}],"snapshot.getSnapshotLinks":[{name:`targets`,form:`object-array`,optional:!1,itemField:`deviceId`}],"snapshot.getSnapshotOverview":[{name:`deviceIds`,form:`array`,optional:!1}],"snapshot.invalidateCache":[{name:`deviceId`,form:`single`,optional:!1}],"streamBroker.acquireEgressTranscode":[{name:`deviceId`,form:`single`,optional:!1}],"streamBroker.assignProfile":[{name:`deviceId`,form:`single`,optional:!1}],"streamBroker.forgetDeviceHardware":[{name:`deviceId`,form:`single`,optional:!1}],"streamBroker.getDeviceAudioMute":[{name:`deviceId`,form:`single`,optional:!1}],"streamBroker.getStreamWithCodec":[{name:`deviceId`,form:`single`,optional:!1}],"streamBroker.produceEventMedia":[{name:`deviceId`,form:`single`,optional:!1}],"streamBroker.publishCameraStream":[{name:`deviceId`,form:`single`,optional:!1}],"streamBroker.renderPreBufferClip":[{name:`deviceId`,form:`single`,optional:!1}],"streamBroker.restartProfile":[{name:`deviceId`,form:`single`,optional:!1}],"streamBroker.retractCameraStream":[{name:`deviceId`,form:`single`,optional:!1}],"streamBroker.setDeviceAudioMute":[{name:`deviceId`,form:`single`,optional:!1}],"streamBroker.unassignProfile":[{name:`deviceId`,form:`single`,optional:!1}],"streamCatalog.getCatalog":[{name:`deviceId`,form:`single`,optional:!1}],"streamParams.getConfigSchema":[{name:`deviceId`,form:`single`,optional:!1}],"streamParams.getOptions":[{name:`deviceId`,form:`single`,optional:!1}],"streamParams.setProfile":[{name:`deviceId`,form:`single`,optional:!1}],"switch.setState":[{name:`deviceId`,form:`single`,optional:!1}],"vacuumControl.locate":[{name:`deviceId`,form:`single`,optional:!1}],"vacuumControl.pause":[{name:`deviceId`,form:`single`,optional:!1}],"vacuumControl.returnToBase":[{name:`deviceId`,form:`single`,optional:!1}],"vacuumControl.setFanSpeed":[{name:`deviceId`,form:`single`,optional:!1}],"vacuumControl.start":[{name:`deviceId`,form:`single`,optional:!1}],"vacuumControl.stop":[{name:`deviceId`,form:`single`,optional:!1}],"valve.close":[{name:`deviceId`,form:`single`,optional:!1}],"valve.open":[{name:`deviceId`,form:`single`,optional:!1}],"valve.setPosition":[{name:`deviceId`,form:`single`,optional:!1}],"valve.stop":[{name:`deviceId`,form:`single`,optional:!1}],"videoclips.getClipPlayback":[{name:`deviceId`,form:`single`,optional:!1}],"videoclips.listClips":[{name:`deviceId`,form:`single`,optional:!1}],"waterHeater.setAway":[{name:`deviceId`,form:`single`,optional:!1}],"waterHeater.setOperationMode":[{name:`deviceId`,form:`single`,optional:!1}],"waterHeater.setTargetTemp":[{name:`deviceId`,form:`single`,optional:!1}],"webrtcSession.addIceCandidate":[{name:`deviceId`,form:`single`,optional:!1}],"webrtcSession.closeSession":[{name:`deviceId`,form:`single`,optional:!1}],"webrtcSession.createSession":[{name:`deviceId`,form:`single`,optional:!1}],"webrtcSession.getIceCandidates":[{name:`deviceId`,form:`single`,optional:!1}],"webrtcSession.getSessionState":[{name:`deviceId`,form:`single`,optional:!1}],"webrtcSession.handleAnswer":[{name:`deviceId`,form:`single`,optional:!1}],"webrtcSession.handleOffer":[{name:`deviceId`,form:`single`,optional:!1}],"webrtcSession.hasAdaptiveBitrate":[{name:`deviceId`,form:`single`,optional:!1}],"webrtcSession.listStreams":[{name:`deviceId`,form:`single`,optional:!1}],"zoneAnalytics.getCameraHistory":[{name:`deviceId`,form:`single`,optional:!1}],"zoneAnalytics.getCurrentSnapshot":[{name:`deviceId`,form:`single`,optional:!1}],"zoneAnalytics.getCurrentSnapshotBatch":[{name:`deviceIds`,form:`array`,optional:!1}],"zoneAnalytics.getUnzonedHistory":[{name:`deviceId`,form:`single`,optional:!1}],"zoneAnalytics.getZoneHistory":[{name:`deviceId`,form:`single`,optional:!1}],"zoneRules.listRules":[{name:`deviceId`,form:`single`,optional:!1}],"zoneRules.setRules":[{name:`deviceId`,form:`single`,optional:!1}],"zones.addZone":[{name:`deviceId`,form:`single`,optional:!1}],"zones.listZones":[{name:`deviceId`,form:`single`,optional:!1}],"zones.removeZone":[{name:`deviceId`,form:`single`,optional:!1}],"zones.updateZone":[{name:`deviceId`,form:`single`,optional:!1}]}),RM=`addonSettings.getDeviceSettings,addonSettings.updateDeviceSettings,audioAnalyzer.classify,decoder.createSession,deviceAdoption.release,deviceAdoption.resync,deviceManager.adoptionRelease,deviceManager.adoptionResync,deviceManager.applyInitialMeta,deviceManager.disable,deviceManager.enable,deviceManager.getBindings,deviceManager.getBindingsBatch,deviceManager.getChildren,deviceManager.getChildrenBatch,deviceManager.getConfigSchema,deviceManager.getDevice,deviceManager.getDeviceAggregate,deviceManager.getDeviceLiveInfoAggregate,deviceManager.getDeviceSettingsAggregate,deviceManager.getDeviceStatusAggregate,deviceManager.getDeviceStatusAggregateBatch,deviceManager.getLinkedDevices,deviceManager.getLinkedDevicesBatch,deviceManager.getSettingsSchema,deviceManager.getStreamProfileMap,deviceManager.getStreamSources,deviceManager.getWireableFields,deviceManager.listAll,deviceManager.loadConfig,deviceManager.loadMeta,deviceManager.loadRuntimeState,deviceManager.persistConfig,deviceManager.probeStreams,deviceManager.registerDevice,deviceManager.remove,deviceManager.removeDevice,deviceManager.runDeviceAction,deviceManager.setChildLayout,deviceManager.setDisabled,deviceManager.setDisplay,deviceManager.setIntegrationId,deviceManager.setLinkDeviceId,deviceManager.setLocation,deviceManager.setMetadata,deviceManager.setName,deviceManager.setPrimaryChildEntityId,deviceManager.setRole,deviceManager.setStreamProfileMap,deviceManager.setType,deviceManager.setWrapperActive,deviceManager.testField,deviceManager.updateConfig,deviceManager.updateDeviceField,deviceManager.updateDeviceFieldsBatch,deviceState.getCapSlice,deviceState.getSnapshot,deviceState.setCapSlice,faceGallery.getFaceByTrack,faceGallery.listRecentFaces,networkQuality.getDeviceStats,networkQuality.reportClientStats,notificationRules.setDeviceMuted,osdManager.clearSlotBinding,osdManager.copyDeviceConfiguration,osdManager.getDeviceOsd,osdManager.getSourceCatalog,osdManager.previewSlot,osdManager.renderDevice,osdManager.setSlotBinding,pipelineExecutor.runPipeline,pipelineExecutor.runPipelineBatch,pipelineOrchestrator.assignAudio,pipelineOrchestrator.assignPipeline,pipelineOrchestrator.getAudioAssignment,pipelineOrchestrator.getCameraMetrics,pipelineOrchestrator.getCameraSettings,pipelineOrchestrator.getCameraStatus,pipelineOrchestrator.getCameraStatuses,pipelineOrchestrator.getCameraStepOverrides,pipelineOrchestrator.getCameraSwitches,pipelineOrchestrator.getPipelineAssignment,pipelineOrchestrator.getPipelineDevicePin,pipelineOrchestrator.resolvePipeline,pipelineOrchestrator.setCameraPipelineForAgent,pipelineOrchestrator.setCameraStepOverride,pipelineOrchestrator.setCameraStepToggle,pipelineOrchestrator.setCameraSwitch,pipelineOrchestrator.setPipelineDevicePin,pipelineOrchestrator.unassignAudio,pipelineOrchestrator.unassignPipeline,pipelineRunner.attachCamera,pipelineRunner.detachCamera,pipelineRunner.getCameraMetrics,pipelineRunner.reportMotion,pipelineRunner.runDetailSubtree,pipelineRunner.runStatelessStep,plateGallery.getPlateByTrack,plateGallery.listPlates,recording.deleteFootprint,recording.getAvailability,recording.getAvailabilityBatch,recording.getDaysWithRecordings,recording.getDaysWithRecordingsBatch,recording.getDeviceConfig,recording.getPlaybackManifest,recording.listOpsLog,recording.locateSegment,recording.pruneFootage,recording.readGopBytes,recording.readSegmentBytes,recording.readWindowBytes,recording.reconcileLedgerAgainstDisk,recording.relocateFootage,recording.renderClip,recording.renderGif,recording.rescanStorage,recording.setDeviceConfig,recording.setDevicePlacement,recording.startStorageMigrationMove,recordingExport.createExport,recordingExport.listExports,streamBroker.acquireEgressTranscode,streamBroker.assignProfile,streamBroker.forgetDeviceHardware,streamBroker.getDeviceAudioMute,streamBroker.getStreamWithCodec,streamBroker.produceEventMedia,streamBroker.publishCameraStream,streamBroker.renderPreBufferClip,streamBroker.restartProfile,streamBroker.retractCameraStream,streamBroker.setDeviceAudioMute,streamBroker.unassignProfile`.split(`,`),zM=Object.freeze({broker:`broker`,"device-export":`device-export`,llm:`ai`,"mesh-network":`mesh`,"mqtt-broker":`broker`,"network-access":`ingress`,"smtp-provider":`email`}),BM=[`broker`,`device-export`,`llm`,`mesh-network`,`mqtt-broker`,`network-access`,`smtp-provider`];function VM(e){let t=[];for(let[n,r]of Object.entries(zM))r===e&&t.push(n);return t}var HM={"air-quality-sensor":{durability:`restored`,volatileFields:[`lastFetchedAt`]},"alarm-panel":{durability:`restored`,volatileFields:[`lastChangedAt`]},"ambient-light-sensor":{durability:`restored`,volatileFields:[`lastFetchedAt`]},"audio-metrics":{durability:`session`,volatileFields:[]},"automation-control":{durability:`session`,volatileFields:[]},battery:{durability:`restored`,volatileFields:[`lastUpdated`]},binary:{durability:`restored`,volatileFields:[`lastChangedAt`]},brightness:{durability:`session`,volatileFields:[]},"camera-streams":{durability:`session`,volatileFields:[]},"carbon-monoxide":{durability:`restored`,volatileFields:[`lastChangedAt`]},"climate-control":{durability:`session`,volatileFields:[]},color:{durability:`session`,volatileFields:[]},connectivity:{durability:`restored`,volatileFields:[`lastChangedAt`]},consumables:{durability:`session`,volatileFields:[]},contact:{durability:`restored`,volatileFields:[`lastChangedAt`]},control:{durability:`session`,volatileFields:[]},cover:{durability:`restored`,volatileFields:[`lastChangedAt`]},"day-night":{durability:`restored`,volatileFields:[`lastFetchedAt`]},"device-discovery":{durability:`session`,volatileFields:[]},"device-status":{durability:`restored`,volatileFields:[`lastChangedAt`]},doorbell:{durability:`restored`,volatileFields:[]},"enum-sensor":{durability:`restored`,volatileFields:[`lastFetchedAt`]},"event-emitter":{durability:`session`,volatileFields:[]},"fan-control":{durability:`session`,volatileFields:[]},"feature-probe":{durability:`session`,volatileFields:[]},flood:{durability:`restored`,volatileFields:[`lastChangedAt`]},gas:{durability:`restored`,volatileFields:[`lastChangedAt`]},humidifier:{durability:`session`,volatileFields:[]},"humidity-sensor":{durability:`restored`,volatileFields:[`lastFetchedAt`]},image:{durability:`session`,volatileFields:[]},"image-settings":{durability:`restored`,volatileFields:[`lastFetchedAt`]},intercom:{durability:`session`,volatileFields:[]},"lawn-mower-control":{durability:`session`,volatileFields:[]},"lock-control":{durability:`restored`,volatileFields:[`lastChangedAt`]},"media-player":{durability:`session`,volatileFields:[]},motion:{durability:`session`,volatileFields:[]},"motion-trigger":{durability:`session`,volatileFields:[]},"motion-zones":{durability:`restored`,volatileFields:[`lastFetchedAt`]},"native-object-detection":{durability:`restored`,volatileFields:[`lastFetchedAt`]},navigation:{durability:`session`,volatileFields:[]},"network-link":{durability:`restored`,volatileFields:[`lastUpdated`]},notifier:{durability:`session`,volatileFields:[]},"numeric-sensor":{durability:`restored`,volatileFields:[`lastFetchedAt`]},"pet-feeder":{durability:`session`,volatileFields:[]},"power-meter":{durability:`restored`,volatileFields:[`lastFetchedAt`]},presence:{durability:`restored`,volatileFields:[`lastChangedAt`]},"pressure-sensor":{durability:`restored`,volatileFields:[`lastFetchedAt`]},"privacy-mask":{durability:`restored`,volatileFields:[`lastFetchedAt`]},"ptz-autotrack":{durability:`session`,volatileFields:[]},"recording-signal":{durability:`session`,volatileFields:[]},"scene-monitor":{durability:`session`,volatileFields:[]},"script-runner":{durability:`session`,volatileFields:[]},smoke:{durability:`restored`,volatileFields:[`lastChangedAt`]},"stream-catalog":{durability:`restored`,volatileFields:[`lastFetchedAt`]},"stream-params":{durability:`restored`,volatileFields:[`lastFetchedAt`]},switch:{durability:`restored`,volatileFields:[`lastChangedAt`]},tamper:{durability:`restored`,volatileFields:[`lastChangedAt`]},"temperature-sensor":{durability:`restored`,volatileFields:[`lastFetchedAt`]},update:{durability:`session`,volatileFields:[]},"vacuum-control":{durability:`session`,volatileFields:[]},valve:{durability:`session`,volatileFields:[]},vibration:{durability:`restored`,volatileFields:[`lastChangedAt`]},"water-heater":{durability:`session`,volatileFields:[]},weather:{durability:`session`,volatileFields:[]},"zone-analytics":{durability:`session`,volatileFields:[]},"zone-rules":{durability:`restored`,volatileFields:[]},zones:{durability:`restored`,volatileFields:[]}};function UM(e){return HM[e]??WM}var WM={durability:`session`,volatileFields:[]};function GM(e){return UM(e).durability===`restored`}var KM=`air-quality-sensor.alarm-panel.ambient-light-sensor.battery.binary.carbon-monoxide.connectivity.contact.cover.day-night.device-status.doorbell.enum-sensor.flood.gas.humidity-sensor.image-settings.lock-control.motion-zones.native-object-detection.network-link.numeric-sensor.power-meter.presence.pressure-sensor.privacy-mask.smoke.stream-catalog.stream-params.switch.tamper.temperature-sensor.vibration.zone-rules.zones`.split(`.`),qM=[{id:`camera-viewer`,label:`Camera viewer`,description:"Read-only over every device — live streams, recordings, motion events, battery state. Pair with a `device` grant (an `ids` / `types` / `locations` selector) to restrict to specific cameras.",rows:[{type:`category`,target:`device`,access:[`view`]}]},{id:`camera-operator`,label:`Camera operator`,description:"Everything `camera-viewer` does plus live control of every granted camera — PTZ movement, intercom talk-back and on-demand snapshots. Cannot delete devices, and grants nothing on system-scope caps (recording control, users, addons).",rows:[{type:`category`,target:`device`,access:[`view`,`create`]}]},{id:`full-management`,label:`Full management`,description:`Complete device + system control short of admin: view/create/delete on every device and every system capability. Use for a trusted operator who manages the whole deployment but should not hold the admin bypass.`,rows:[{type:`category`,target:`device`,access:[`view`,`create`,`delete`]},{type:`category`,target:`system`,access:[`view`,`create`,`delete`]}]},{id:`cli-deployer`,label:`CLI deployer`,description:"Push addons to the hub and tail their logs. Used by the `camstack` CLI on dev machines. No delete access — a stolen token cannot uninstall.",rows:[{type:`capability`,target:`addons`,access:[`view`,`create`]}]},{id:`event-listener`,label:`Event listener`,description:`Subscribe to motion / audio events. Used by webhook bridges and Home Assistant integrations.`,rows:[{type:`capability`,target:`events`,access:[`view`]},{type:`capability`,target:`motion-detection`,access:[`view`]},{type:`capability`,target:`audio-analysis`,access:[`view`]}]}];function JM(e){let t=e;function n(e,n,r,i,a){let o=t[e]?.[n];if(!o)throw Error(`SystemProxy: api has no '${e}.${n}'`);let s=o;return r===`mutation`?s.mutate(i):r===`subscription`?s.subscribe(i,a):s.query(i)}return{addonPages:{listPages:e=>n(`addonPages`,`listPages`,`query`,e)},addons:{list:e=>n(`addons`,`list`,`query`,e),getLogs:e=>n(`addons`,`getLogs`,`query`,e),listPackages:e=>n(`addons`,`listPackages`,`query`,e),installPackage:e=>n(`addons`,`installPackage`,`mutation`,e),installFromWorkspace:e=>n(`addons`,`installFromWorkspace`,`mutation`,e),isWorkspaceAvailable:e=>n(`addons`,`isWorkspaceAvailable`,`query`,e),listWorkspacePackages:e=>n(`addons`,`listWorkspacePackages`,`query`,e),uninstallPackage:e=>n(`addons`,`uninstallPackage`,`mutation`,e),reloadPackages:e=>n(`addons`,`reloadPackages`,`mutation`,e),searchAvailable:e=>n(`addons`,`searchAvailable`,`query`,e),listUpdates:e=>n(`addons`,`listUpdates`,`query`,e),updatePackage:e=>n(`addons`,`updatePackage`,`mutation`,e),rollbackPackage:e=>n(`addons`,`rollbackPackage`,`mutation`,e),forceRefresh:e=>n(`addons`,`forceRefresh`,`mutation`,e),restartServer:e=>n(`addons`,`restartServer`,`mutation`,e),getLastRestart:e=>n(`addons`,`getLastRestart`,`query`,e),listFrameworkPackages:e=>n(`addons`,`listFrameworkPackages`,`query`,e),listCapabilityProviders:e=>n(`addons`,`listCapabilityProviders`,`query`,e),setCapabilityProviderEnabled:e=>n(`addons`,`setCapabilityProviderEnabled`,`mutation`,e),getVersions:e=>n(`addons`,`getVersions`,`query`,e),restartAddon:e=>n(`addons`,`restartAddon`,`mutation`,e),retryLoad:e=>n(`addons`,`retryLoad`,`mutation`,e),getAutoUpdateSettings:e=>n(`addons`,`getAutoUpdateSettings`,`query`,e),setAutoUpdateSettings:e=>n(`addons`,`setAutoUpdateSettings`,`mutation`,e),getAddonAutoUpdate:e=>n(`addons`,`getAddonAutoUpdate`,`query`,e),setAddonAutoUpdate:e=>n(`addons`,`setAddonAutoUpdate`,`mutation`,e),applyAutoUpdateToAll:e=>n(`addons`,`applyAutoUpdateToAll`,`mutation`,e),custom:e=>n(`addons`,`custom`,`mutation`,e),startJob:e=>n(`addons`,`startJob`,`mutation`,e),getJob:e=>n(`addons`,`getJob`,`query`,e),listJobs:e=>n(`addons`,`listJobs`,`query`,e),cancelJob:e=>n(`addons`,`cancelJob`,`mutation`,e),onAddonLogs:(e,t)=>n(`addons`,`onAddonLogs`,`subscription`,e,t)},addonSettings:{getGlobalSettings:e=>n(`addonSettings`,`getGlobalSettings`,`query`,e),updateGlobalSettings:e=>n(`addonSettings`,`updateGlobalSettings`,`mutation`,e),getIntegrationSettings:e=>n(`addonSettings`,`getIntegrationSettings`,`query`,e)},addonWidgets:{listWidgets:e=>n(`addonWidgets`,`listWidgets`,`query`,e)},alerts:{emit:e=>n(`alerts`,`emit`,`mutation`,e),update:e=>n(`alerts`,`update`,`mutation`,e),list:e=>n(`alerts`,`list`,`query`,e),getUnreadCount:e=>n(`alerts`,`getUnreadCount`,`query`,e),markRead:e=>n(`alerts`,`markRead`,`mutation`,e),markAllRead:e=>n(`alerts`,`markAllRead`,`mutation`,e),dismiss:e=>n(`alerts`,`dismiss`,`mutation`,e)},audioAnalyzer:{analyseChunk:e=>n(`audioAnalyzer`,`analyseChunk`,`mutation`,e),classify:e=>n(`audioAnalyzer`,`classify`,`query`,e),isReady:e=>n(`audioAnalyzer`,`isReady`,`query`,e),dispose:e=>n(`audioAnalyzer`,`dispose`,`mutation`,e),reprobeAudioEngine:e=>n(`audioAnalyzer`,`reprobeAudioEngine`,`mutation`,e)},audioCodec:{listSupportedCodecs:e=>n(`audioCodec`,`listSupportedCodecs`,`query`,e),canHandle:e=>n(`audioCodec`,`canHandle`,`query`,e),createDecodeSession:e=>n(`audioCodec`,`createDecodeSession`,`mutation`,e),createEncodeSession:e=>n(`audioCodec`,`createEncodeSession`,`mutation`,e),closeSession:e=>n(`audioCodec`,`closeSession`,`mutation`,e),pushEncodedFrame:e=>n(`audioCodec`,`pushEncodedFrame`,`mutation`,e),pullPcm:e=>n(`audioCodec`,`pullPcm`,`query`,e),pushPcm:e=>n(`audioCodec`,`pushPcm`,`mutation`,e),pullEncoded:e=>n(`audioCodec`,`pullEncoded`,`query`,e),flushEncode:e=>n(`audioCodec`,`flushEncode`,`mutation`,e),listActiveSessions:e=>n(`audioCodec`,`listActiveSessions`,`query`,e)},backup:{listDestinations:e=>n(`backup`,`listDestinations`,`query`,e),trigger:e=>n(`backup`,`trigger`,`mutation`,e),listRuns:e=>n(`backup`,`listRuns`,`query`,e),cancel:e=>n(`backup`,`cancel`,`mutation`,e),list:e=>n(`backup`,`list`,`query`,e),listLocations:e=>n(`backup`,`listLocations`,`query`,e),getEntries:e=>n(`backup`,`getEntries`,`query`,e),restore:e=>n(`backup`,`restore`,`mutation`,e),delete:e=>n(`backup`,`delete`,`mutation`,e),listArchives:e=>n(`backup`,`listArchives`,`query`,e),upsertDestinationPolicy:e=>n(`backup`,`upsertDestinationPolicy`,`mutation`,e),previewSchedule:e=>n(`backup`,`previewSchedule`,`query`,e),listSchedules:e=>n(`backup`,`listSchedules`,`query`,e),upsertSchedule:e=>n(`backup`,`upsertSchedule`,`mutation`,e),deleteSchedule:e=>n(`backup`,`deleteSchedule`,`mutation`,e)},broker:{list:e=>n(`broker`,`list`,`query`,e),get:e=>n(`broker`,`get`,`query`,e),listProviders:e=>n(`broker`,`listProviders`,`query`,e),add:e=>n(`broker`,`add`,`mutation`,e),remove:e=>n(`broker`,`remove`,`mutation`,e),testConnection:e=>n(`broker`,`testConnection`,`mutation`,e),getSettings:e=>n(`broker`,`getSettings`,`query`,e),setSettings:e=>n(`broker`,`setSettings`,`mutation`,e),getBrokerConfig:e=>n(`broker`,`getBrokerConfig`,`query`,e),getSettingsSchema:e=>n(`broker`,`getSettingsSchema`,`query`,e),testSettings:e=>n(`broker`,`testSettings`,`mutation`,e),publish:e=>n(`broker`,`publish`,`mutation`,e),subscribe:e=>n(`broker`,`subscribe`,`mutation`,e),unsubscribe:e=>n(`broker`,`unsubscribe`,`mutation`,e),getState:e=>n(`broker`,`getState`,`query`,e),getStatus:e=>n(`broker`,`getStatus`,`query`,e)},connectionTest:{testSettings:e=>n(`connectionTest`,`testSettings`,`mutation`,e),describeTest:e=>n(`connectionTest`,`describeTest`,`query`,e)},coreBlocks:{list:e=>n(`coreBlocks`,`list`,`query`,e),get:e=>n(`coreBlocks`,`get`,`query`,e),create:e=>n(`coreBlocks`,`create`,`mutation`,e),update:e=>n(`coreBlocks`,`update`,`mutation`,e),delete:e=>n(`coreBlocks`,`delete`,`mutation`,e),setEnabled:e=>n(`coreBlocks`,`setEnabled`,`mutation`,e),restart:e=>n(`coreBlocks`,`restart`,`mutation`,e),compile:e=>n(`coreBlocks`,`compile`,`mutation`,e),getTypeDefs:e=>n(`coreBlocks`,`getTypeDefs`,`query`,e)},decoder:{supportsCodec:e=>n(`decoder`,`supportsCodec`,`query`,e),getInfo:e=>n(`decoder`,`getInfo`,`query`,e),createSession:e=>n(`decoder`,`createSession`,`query`,e),destroySession:e=>n(`decoder`,`destroySession`,`query`,e),pushPacket:e=>n(`decoder`,`pushPacket`,`query`,e),openStream:e=>n(`decoder`,`openStream`,`query`,e),pullFrames:e=>n(`decoder`,`pullFrames`,`query`,e),pullHandles:e=>n(`decoder`,`pullHandles`,`query`,e),getFrame:e=>n(`decoder`,`getFrame`,`query`,e),getShmStats:e=>n(`decoder`,`getShmStats`,`query`,e),updateConfig:e=>n(`decoder`,`updateConfig`,`query`,e),getStats:e=>n(`decoder`,`getStats`,`query`,e),listActiveSessions:e=>n(`decoder`,`listActiveSessions`,`query`,e),reprobeHwaccel:e=>n(`decoder`,`reprobeHwaccel`,`mutation`,e)},deviceAdoption:{listCandidateFilters:e=>n(`deviceAdoption`,`listCandidateFilters`,`query`,e),listCandidates:e=>n(`deviceAdoption`,`listCandidates`,`query`,e),getCandidate:e=>n(`deviceAdoption`,`getCandidate`,`query`,e),refresh:e=>n(`deviceAdoption`,`refresh`,`mutation`,e),adopt:e=>n(`deviceAdoption`,`adopt`,`mutation`,e),release:e=>n(`deviceAdoption`,`release`,`mutation`,e),resync:e=>n(`deviceAdoption`,`resync`,`mutation`,e)},deviceExport:{getStatus:e=>n(`deviceExport`,`getStatus`,`query`,e),listSupportedDeviceKinds:e=>n(`deviceExport`,`listSupportedDeviceKinds`,`query`,e),listExposedDevices:e=>n(`deviceExport`,`listExposedDevices`,`query`,e),exposeDevice:e=>n(`deviceExport`,`exposeDevice`,`mutation`,e),unexposeDevice:e=>n(`deviceExport`,`unexposeDevice`,`mutation`,e)},deviceManager:{allocateDeviceId:e=>n(`deviceManager`,`allocateDeviceId`,`mutation`,e),migrateDevice:e=>n(`deviceManager`,`migrateDevice`,`mutation`,e),registerDevice:e=>n(`deviceManager`,`registerDevice`,`mutation`,e),removeDevice:e=>n(`deviceManager`,`removeDevice`,`mutation`,e),persistConfig:e=>n(`deviceManager`,`persistConfig`,`mutation`,e),getRoleDisplayDefaults:e=>n(`deviceManager`,`getRoleDisplayDefaults`,`query`,e),setRoleDisplayDefaults:e=>n(`deviceManager`,`setRoleDisplayDefaults`,`mutation`,e),listLocations:e=>n(`deviceManager`,`listLocations`,`query`,e),addLocation:e=>n(`deviceManager`,`addLocation`,`mutation`,e),removeLocation:e=>n(`deviceManager`,`removeLocation`,`mutation`,e),renameLocation:e=>n(`deviceManager`,`renameLocation`,`mutation`,e),listPersistedByAddon:e=>n(`deviceManager`,`listPersistedByAddon`,`query`,e),listAll:e=>n(`deviceManager`,`listAll`,`query`,e),getChildren:e=>n(`deviceManager`,`getChildren`,`query`,e),getChildrenBatch:e=>n(`deviceManager`,`getChildrenBatch`,`query`,e),getLinkedDevicesBatch:e=>n(`deviceManager`,`getLinkedDevicesBatch`,`query`,e),removeByIntegration:e=>n(`deviceManager`,`removeByIntegration`,`mutation`,e),getBindingsBatch:e=>n(`deviceManager`,`getBindingsBatch`,`query`,e),getAllBindings:e=>n(`deviceManager`,`getAllBindings`,`query`,e),listWrappersForCap:e=>n(`deviceManager`,`listWrappersForCap`,`query`,e),listBindableCapsForDeviceType:e=>n(`deviceManager`,`listBindableCapsForDeviceType`,`query`,e),discoverDevices:e=>n(`deviceManager`,`discoverDevices`,`mutation`,e),adoptDevice:e=>n(`deviceManager`,`adoptDevice`,`mutation`,e),getCreationSchema:e=>n(`deviceManager`,`getCreationSchema`,`query`,e),createDevice:e=>n(`deviceManager`,`createDevice`,`mutation`,e),testCreationField:e=>n(`deviceManager`,`testCreationField`,`mutation`,e),adoptionListCandidateFilters:e=>n(`deviceManager`,`adoptionListCandidateFilters`,`query`,e),adoptionListCandidates:e=>n(`deviceManager`,`adoptionListCandidates`,`query`,e),adoptionRefresh:e=>n(`deviceManager`,`adoptionRefresh`,`mutation`,e),adoptionAdopt:e=>n(`deviceManager`,`adoptionAdopt`,`mutation`,e),adoptionRelease:e=>n(`deviceManager`,`adoptionRelease`,`mutation`,e),adoptionStartJob:e=>n(`deviceManager`,`adoptionStartJob`,`mutation`,e),adoptionListJobs:e=>n(`deviceManager`,`adoptionListJobs`,`query`,e),adoptionCancelJob:e=>n(`deviceManager`,`adoptionCancelJob`,`mutation`,e),adoptionResync:e=>n(`deviceManager`,`adoptionResync`,`mutation`,e),discoveryProviders:e=>n(`deviceManager`,`discoveryProviders`,`query`,e),discoverAllProviders:e=>n(`deviceManager`,`discoverAllProviders`,`mutation`,e),discoverProvider:e=>n(`deviceManager`,`discoverProvider`,`mutation`,e),providerCreationType:e=>n(`deviceManager`,`providerCreationType`,`query`,e),providerDiscoveryParamsSchema:e=>n(`deviceManager`,`providerDiscoveryParamsSchema`,`query`,e),getDeviceStatusAggregateBatch:e=>n(`deviceManager`,`getDeviceStatusAggregateBatch`,`query`,e)},deviceProvider:{start:e=>n(`deviceProvider`,`start`,`mutation`,e),stop:e=>n(`deviceProvider`,`stop`,`mutation`,e),getStatus:e=>n(`deviceProvider`,`getStatus`,`query`,e),getDevices:e=>n(`deviceProvider`,`getDevices`,`query`,e),supportsDiscovery:e=>n(`deviceProvider`,`supportsDiscovery`,`query`,e),discoverDevices:e=>n(`deviceProvider`,`discoverDevices`,`mutation`,e),getDiscoveryParamsSchema:e=>n(`deviceProvider`,`getDiscoveryParamsSchema`,`query`,e),getManualCreationType:e=>n(`deviceProvider`,`getManualCreationType`,`query`,e),adoptDiscoveredDevice:e=>n(`deviceProvider`,`adoptDiscoveredDevice`,`mutation`,e),supportsManualCreation:e=>n(`deviceProvider`,`supportsManualCreation`,`query`,e),getChildCreationSchema:e=>n(`deviceProvider`,`getChildCreationSchema`,`query`,e),createDevice:e=>n(`deviceProvider`,`createDevice`,`mutation`,e),testCreationField:e=>n(`deviceProvider`,`testCreationField`,`mutation`,e)},deviceState:{getAllSnapshots:e=>n(`deviceState`,`getAllSnapshots`,`query`,e)},faceGallery:{listIdentities:e=>n(`faceGallery`,`listIdentities`,`query`,e),createIdentity:e=>n(`faceGallery`,`createIdentity`,`mutation`,e),renameIdentity:e=>n(`faceGallery`,`renameIdentity`,`mutation`,e),deleteIdentity:e=>n(`faceGallery`,`deleteIdentity`,`mutation`,e),listIdentitySamples:e=>n(`faceGallery`,`listIdentitySamples`,`query`,e),removeSample:e=>n(`faceGallery`,`removeSample`,`mutation`,e),getFaceMedia:e=>n(`faceGallery`,`getFaceMedia`,`query`,e),assignFace:e=>n(`faceGallery`,`assignFace`,`mutation`,e),unassignFace:e=>n(`faceGallery`,`unassignFace`,`mutation`,e),deleteFace:e=>n(`faceGallery`,`deleteFace`,`mutation`,e),assignFaces:e=>n(`faceGallery`,`assignFaces`,`mutation`,e),unassignFaces:e=>n(`faceGallery`,`unassignFaces`,`mutation`,e),suggestFaceClusters:e=>n(`faceGallery`,`suggestFaceClusters`,`query`,e)},integrations:{list:e=>n(`integrations`,`list`,`query`,e),get:e=>n(`integrations`,`get`,`query`,e),getByAddonId:e=>n(`integrations`,`getByAddonId`,`query`,e),create:e=>n(`integrations`,`create`,`mutation`,e),update:e=>n(`integrations`,`update`,`mutation`,e),delete:e=>n(`integrations`,`delete`,`mutation`,e),getSettings:e=>n(`integrations`,`getSettings`,`query`,e),setSettings:e=>n(`integrations`,`setSettings`,`mutation`,e),getAvailableTypes:e=>n(`integrations`,`getAvailableTypes`,`query`,e),testConnection:e=>n(`integrations`,`testConnection`,`mutation`,e)},llm:{generate:e=>n(`llm`,`generate`,`mutation`,e),generateVision:e=>n(`llm`,`generateVision`,`mutation`,e),cancel:e=>n(`llm`,`cancel`,`mutation`,e),listProfileKinds:e=>n(`llm`,`listProfileKinds`,`query`,e),listProfiles:e=>n(`llm`,`listProfiles`,`query`,e),upsertProfile:e=>n(`llm`,`upsertProfile`,`mutation`,e),deleteProfile:e=>n(`llm`,`deleteProfile`,`mutation`,e),testProfile:e=>n(`llm`,`testProfile`,`mutation`,e),listModels:e=>n(`llm`,`listModels`,`query`,e),getDefaults:e=>n(`llm`,`getDefaults`,`query`,e),setDefault:e=>n(`llm`,`setDefault`,`mutation`,e),getUsage:e=>n(`llm`,`getUsage`,`query`,e),listModelCatalog:e=>n(`llm`,`listModelCatalog`,`query`,e),listRuntimeNodes:e=>n(`llm`,`listRuntimeNodes`,`query`,e),listNodeModels:e=>n(`llm`,`listNodeModels`,`query`,e),resolveModelRef:e=>n(`llm`,`resolveModelRef`,`mutation`,e),installModel:e=>n(`llm`,`installModel`,`mutation`,e),deleteModel:e=>n(`llm`,`deleteModel`,`mutation`,e),getRuntimeStatus:e=>n(`llm`,`getRuntimeStatus`,`query`,e),startRuntime:e=>n(`llm`,`startRuntime`,`mutation`,e),stopRuntime:e=>n(`llm`,`stopRuntime`,`mutation`,e)},localNetwork:{list:e=>n(`localNetwork`,`list`,`query`,e),getPreferred:e=>n(`localNetwork`,`getPreferred`,`query`,e),getConnectionEndpoints:e=>n(`localNetwork`,`getConnectionEndpoints`,`query`,e),getNotificationEndpoint:e=>n(`localNetwork`,`getNotificationEndpoint`,`query`,e),setNotificationEndpoint:e=>n(`localNetwork`,`setNotificationEndpoint`,`mutation`,e),getViewerEndpoints:e=>n(`localNetwork`,`getViewerEndpoints`,`query`,e),setViewerEndpoints:e=>n(`localNetwork`,`setViewerEndpoints`,`mutation`,e),getAllowedAddresses:e=>n(`localNetwork`,`getAllowedAddresses`,`query`,e),setAllowedAddresses:e=>n(`localNetwork`,`setAllowedAddresses`,`mutation`,e),resetAllowlistToBestMatch:e=>n(`localNetwork`,`resetAllowlistToBestMatch`,`mutation`,e),getTlsStatus:e=>n(`localNetwork`,`getTlsStatus`,`query`,e),regenerateCertificate:e=>n(`localNetwork`,`regenerateCertificate`,`mutation`,e),uploadCertificate:e=>n(`localNetwork`,`uploadCertificate`,`mutation`,e),downloadCa:e=>n(`localNetwork`,`downloadCa`,`query`,e),revertToGeneratedCertificate:e=>n(`localNetwork`,`revertToGeneratedCertificate`,`mutation`,e)},meshNetwork:{getStatus:e=>n(`meshNetwork`,`getStatus`,`query`,e),join:e=>n(`meshNetwork`,`join`,`mutation`,e),startLogin:e=>n(`meshNetwork`,`startLogin`,`mutation`,e),leave:e=>n(`meshNetwork`,`leave`,`mutation`,e),logout:e=>n(`meshNetwork`,`logout`,`mutation`,e),listPeers:e=>n(`meshNetwork`,`listPeers`,`query`,e),testConnection:e=>n(`meshNetwork`,`testConnection`,`mutation`,e)},metricsProvider:{collectSnapshot:e=>n(`metricsProvider`,`collectSnapshot`,`query`,e),getCached:e=>n(`metricsProvider`,`getCached`,`query`,e),getCurrent:e=>n(`metricsProvider`,`getCurrent`,`query`,e),getDiskSpace:e=>n(`metricsProvider`,`getDiskSpace`,`query`,e),getGpuInfo:e=>n(`metricsProvider`,`getGpuInfo`,`query`,e),getCpuTemperature:e=>n(`metricsProvider`,`getCpuTemperature`,`query`,e),getProcessStats:e=>n(`metricsProvider`,`getProcessStats`,`query`,e),listAddonInstances:e=>n(`metricsProvider`,`listAddonInstances`,`query`,e),getAddonStats:e=>n(`metricsProvider`,`getAddonStats`,`query`,e),listNodeProcesses:e=>n(`metricsProvider`,`listNodeProcesses`,`query`,e),getLoadSeries:e=>n(`metricsProvider`,`getLoadSeries`,`query`,e)},mqttBroker:{listBrokers:e=>n(`mqttBroker`,`listBrokers`,`query`,e),getBrokerConfig:e=>n(`mqttBroker`,`getBrokerConfig`,`query`,e),addBroker:e=>n(`mqttBroker`,`addBroker`,`mutation`,e),removeBroker:e=>n(`mqttBroker`,`removeBroker`,`mutation`,e),testConnection:e=>n(`mqttBroker`,`testConnection`,`mutation`,e),startEmbeddedBroker:e=>n(`mqttBroker`,`startEmbeddedBroker`,`mutation`,e),stopEmbeddedBroker:e=>n(`mqttBroker`,`stopEmbeddedBroker`,`mutation`,e),getStatus:e=>n(`mqttBroker`,`getStatus`,`query`,e)},networkAccess:{start:e=>n(`networkAccess`,`start`,`mutation`,e),stop:e=>n(`networkAccess`,`stop`,`mutation`,e),getEndpoint:e=>n(`networkAccess`,`getEndpoint`,`query`,e),getStatus:e=>n(`networkAccess`,`getStatus`,`query`,e),listEndpoints:e=>n(`networkAccess`,`listEndpoints`,`query`,e)},networkQuality:{getAllStats:e=>n(`networkQuality`,`getAllStats`,`query`,e)},nodes:{topology:e=>n(`nodes`,`topology`,`query`,e),deployAddon:e=>n(`nodes`,`deployAddon`,`mutation`,e),undeployAddon:e=>n(`nodes`,`undeployAddon`,`mutation`,e),restartAddon:e=>n(`nodes`,`restartAddon`,`mutation`,e),restartProcess:e=>n(`nodes`,`restartProcess`,`mutation`,e),restartNode:e=>n(`nodes`,`restartNode`,`mutation`,e),shutdownNode:e=>n(`nodes`,`shutdownNode`,`mutation`,e),renameNode:e=>n(`nodes`,`renameNode`,`mutation`,e),clusterAddonStatus:e=>n(`nodes`,`clusterAddonStatus`,`query`,e),getCapUsageGraph:e=>n(`nodes`,`getCapUsageGraph`,`query`,e),getNodeAddons:e=>n(`nodes`,`getNodeAddons`,`query`,e),setProcessLogLevel:e=>n(`nodes`,`setProcessLogLevel`,`mutation`,e),executeQuery:e=>n(`nodes`,`executeQuery`,`mutation`,e)},notificationOutput:{listTargetKinds:e=>n(`notificationOutput`,`listTargetKinds`,`query`,e),listTargets:e=>n(`notificationOutput`,`listTargets`,`query`,e),discoverTargets:e=>n(`notificationOutput`,`discoverTargets`,`query`,e),send:e=>n(`notificationOutput`,`send`,`mutation`,e),testTarget:e=>n(`notificationOutput`,`testTarget`,`mutation`,e),upsertTarget:e=>n(`notificationOutput`,`upsertTarget`,`mutation`,e),deleteTarget:e=>n(`notificationOutput`,`deleteTarget`,`mutation`,e),setTargetEnabled:e=>n(`notificationOutput`,`setTargetEnabled`,`mutation`,e)},osdManager:{getConditionSupport:e=>n(`osdManager`,`getConditionSupport`,`query`,e),copyDeviceConfiguration:e=>n(`osdManager`,`copyDeviceConfiguration`,`mutation`,e)},pipelineExecutor:{getAvailableEngines:e=>n(`pipelineExecutor`,`getAvailableEngines`,`query`,e),getSelectedEngine:e=>n(`pipelineExecutor`,`getSelectedEngine`,`query`,e),getDefaultSteps:e=>n(`pipelineExecutor`,`getDefaultSteps`,`query`,e),getEngineProvisioning:e=>n(`pipelineExecutor`,`getEngineProvisioning`,`query`,e),getVideoPipelineSteps:e=>n(`pipelineExecutor`,`getVideoPipelineSteps`,`query`,e),setVideoPipelineSteps:e=>n(`pipelineExecutor`,`setVideoPipelineSteps`,`mutation`,e),clearDeviceOverrides:e=>n(`pipelineExecutor`,`clearDeviceOverrides`,`mutation`,e),getInferenceDeviceHealth:e=>n(`pipelineExecutor`,`getInferenceDeviceHealth`,`query`,e),rearmInferenceDevice:e=>n(`pipelineExecutor`,`rearmInferenceDevice`,`mutation`,e),getSchema:e=>n(`pipelineExecutor`,`getSchema`,`query`,e),getGlobalSteps:e=>n(`pipelineExecutor`,`getGlobalSteps`,`query`,e),getGlobalPipelineConfig:e=>n(`pipelineExecutor`,`getGlobalPipelineConfig`,`query`,e),getOrchestratorConfigSchema:e=>n(`pipelineExecutor`,`getOrchestratorConfigSchema`,`query`,e),validatePipeline:e=>n(`pipelineExecutor`,`validatePipeline`,`query`,e),listTemplates:e=>n(`pipelineExecutor`,`listTemplates`,`query`,e),saveTemplate:e=>n(`pipelineExecutor`,`saveTemplate`,`mutation`,e),updateTemplate:e=>n(`pipelineExecutor`,`updateTemplate`,`mutation`,e),deleteTemplate:e=>n(`pipelineExecutor`,`deleteTemplate`,`mutation`,e),getCapabilities:e=>n(`pipelineExecutor`,`getCapabilities`,`query`,e),getAddonModels:e=>n(`pipelineExecutor`,`getAddonModels`,`query`,e),downloadModel:e=>n(`pipelineExecutor`,`downloadModel`,`mutation`,e),deleteModel:e=>n(`pipelineExecutor`,`deleteModel`,`mutation`,e),cacheFrameInPool:e=>n(`pipelineExecutor`,`cacheFrameInPool`,`mutation`,e),inferCached:e=>n(`pipelineExecutor`,`inferCached`,`mutation`,e),uncacheFrame:e=>n(`pipelineExecutor`,`uncacheFrame`,`mutation`,e),getEffectiveTuning:e=>n(`pipelineExecutor`,`getEffectiveTuning`,`query`,e),listLoadedEngines:e=>n(`pipelineExecutor`,`listLoadedEngines`,`query`,e),spinEngine:e=>n(`pipelineExecutor`,`spinEngine`,`mutation`,e),killEngine:e=>n(`pipelineExecutor`,`killEngine`,`mutation`,e),listReferenceImages:e=>n(`pipelineExecutor`,`listReferenceImages`,`query`,e),getReferenceImage:e=>n(`pipelineExecutor`,`getReferenceImage`,`query`,e),getReferenceAudioFiles:e=>n(`pipelineExecutor`,`getReferenceAudioFiles`,`query`,e),getReferenceAudio:e=>n(`pipelineExecutor`,`getReferenceAudio`,`query`,e),getAudioCapabilities:e=>n(`pipelineExecutor`,`getAudioCapabilities`,`query`,e),runAudioTest:e=>n(`pipelineExecutor`,`runAudioTest`,`mutation`,e),getDetectionConfigSchema:e=>n(`pipelineExecutor`,`getDetectionConfigSchema`,`query`,e)},pipelineOrchestrator:{pauseForStorageMigration:e=>n(`pipelineOrchestrator`,`pauseForStorageMigration`,`mutation`,e),resumeForStorageMigration:e=>n(`pipelineOrchestrator`,`resumeForStorageMigration`,`mutation`,e),rebalance:e=>n(`pipelineOrchestrator`,`rebalance`,`mutation`,e),getPipelineAssignments:e=>n(`pipelineOrchestrator`,`getPipelineAssignments`,`query`,e),getAgentLoad:e=>n(`pipelineOrchestrator`,`getAgentLoad`,`query`,e),getGlobalMetrics:e=>n(`pipelineOrchestrator`,`getGlobalMetrics`,`query`,e),getCapabilityBindings:e=>n(`pipelineOrchestrator`,`getCapabilityBindings`,`query`,e),setCapabilityBinding:e=>n(`pipelineOrchestrator`,`setCapabilityBinding`,`mutation`,e),getIngestOwner:e=>n(`pipelineOrchestrator`,`getIngestOwner`,`query`,e),getAudioNodeLoad:e=>n(`pipelineOrchestrator`,`getAudioNodeLoad`,`query`,e),getAgentSettings:e=>n(`pipelineOrchestrator`,`getAgentSettings`,`query`,e),listAgentSettings:e=>n(`pipelineOrchestrator`,`listAgentSettings`,`query`,e),removeAgentSettings:e=>n(`pipelineOrchestrator`,`removeAgentSettings`,`mutation`,e),setAgentMaxCameras:e=>n(`pipelineOrchestrator`,`setAgentMaxCameras`,`mutation`,e),setAgentDetectWeight:e=>n(`pipelineOrchestrator`,`setAgentDetectWeight`,`mutation`,e),setAgentCapabilities:e=>n(`pipelineOrchestrator`,`setAgentCapabilities`,`mutation`,e),setAgentDecodeLimits:e=>n(`pipelineOrchestrator`,`setAgentDecodeLimits`,`mutation`,e),setAgentReachableHost:e=>n(`pipelineOrchestrator`,`setAgentReachableHost`,`mutation`,e),setAgentInferenceDevices:e=>n(`pipelineOrchestrator`,`setAgentInferenceDevices`,`mutation`,e),getNodeInferenceDevices:e=>n(`pipelineOrchestrator`,`getNodeInferenceDevices`,`query`,e),resetNodePipelineDefaults:e=>n(`pipelineOrchestrator`,`resetNodePipelineDefaults`,`mutation`,e),getCameraStatuses:e=>n(`pipelineOrchestrator`,`getCameraStatuses`,`query`,e),reconcileFromDisk:e=>n(`pipelineOrchestrator`,`reconcileFromDisk`,`mutation`,e),getReconcileFromDiskStatus:e=>n(`pipelineOrchestrator`,`getReconcileFromDiskStatus`,`query`,e),listTemplates:e=>n(`pipelineOrchestrator`,`listTemplates`,`query`,e),saveTemplate:e=>n(`pipelineOrchestrator`,`saveTemplate`,`mutation`,e),updateTemplate:e=>n(`pipelineOrchestrator`,`updateTemplate`,`mutation`,e),deleteTemplate:e=>n(`pipelineOrchestrator`,`deleteTemplate`,`mutation`,e)},pipelineRunner:{attachCamera:e=>n(`pipelineRunner`,`attachCamera`,`mutation`,e),reportMotion:e=>n(`pipelineRunner`,`reportMotion`,`mutation`,e),getLocalLoad:e=>n(`pipelineRunner`,`getLocalLoad`,`query`,e),getLocalMetrics:e=>n(`pipelineRunner`,`getLocalMetrics`,`query`,e),getAllCameraMetrics:e=>n(`pipelineRunner`,`getAllCameraMetrics`,`query`,e),getLocalCameras:e=>n(`pipelineRunner`,`getLocalCameras`,`query`,e),getNativeCrop:e=>n(`pipelineRunner`,`getNativeCrop`,`query`,e),runStatelessStep:e=>n(`pipelineRunner`,`runStatelessStep`,`mutation`,e)},plateGallery:{getPlateMedia:e=>n(`plateGallery`,`getPlateMedia`,`query`,e),searchPlates:e=>n(`plateGallery`,`searchPlates`,`query`,e),suggestPlateClusters:e=>n(`plateGallery`,`suggestPlateClusters`,`query`,e),correctPlateText:e=>n(`plateGallery`,`correctPlateText`,`mutation`,e),deletePlate:e=>n(`plateGallery`,`deletePlate`,`mutation`,e),listVehicles:e=>n(`plateGallery`,`listVehicles`,`query`,e),createVehicle:e=>n(`plateGallery`,`createVehicle`,`mutation`,e),renameVehicle:e=>n(`plateGallery`,`renameVehicle`,`mutation`,e),deleteVehicle:e=>n(`plateGallery`,`deleteVehicle`,`mutation`,e),listVehicleSamples:e=>n(`plateGallery`,`listVehicleSamples`,`query`,e),removeVehicleSample:e=>n(`plateGallery`,`removeVehicleSample`,`mutation`,e),assignPlate:e=>n(`plateGallery`,`assignPlate`,`mutation`,e),unassignPlate:e=>n(`plateGallery`,`unassignPlate`,`mutation`,e),assignPlates:e=>n(`plateGallery`,`assignPlates`,`mutation`,e),unassignPlates:e=>n(`plateGallery`,`unassignPlates`,`mutation`,e)},recording:{getAvailabilityBatch:e=>n(`recording`,`getAvailabilityBatch`,`query`,e),getDaysWithRecordingsBatch:e=>n(`recording`,`getDaysWithRecordingsBatch`,`query`,e),getStorageUsage:e=>n(`recording`,`getStorageUsage`,`query`,e),listOpsLog:e=>n(`recording`,`listOpsLog`,`query`,e),pauseForStorageMigration:e=>n(`recording`,`pauseForStorageMigration`,`mutation`,e),resumeForStorageMigration:e=>n(`recording`,`resumeForStorageMigration`,`mutation`,e),refreshStorageLocationsForMigration:e=>n(`recording`,`refreshStorageLocationsForMigration`,`mutation`,e),startStorageMigrationMove:e=>n(`recording`,`startStorageMigrationMove`,`mutation`,e),getStorageMigrationMoveStatus:e=>n(`recording`,`getStorageMigrationMoveStatus`,`query`,e),cancelStorageMigrationMove:e=>n(`recording`,`cancelStorageMigrationMove`,`mutation`,e),relocateFootage:e=>n(`recording`,`relocateFootage`,`mutation`,e),listRelocateJobs:e=>n(`recording`,`listRelocateJobs`,`query`,e),getRelocateResidue:e=>n(`recording`,`getRelocateResidue`,`query`,e),reconcileLedgerAgainstDisk:e=>n(`recording`,`reconcileLedgerAgainstDisk`,`mutation`,e),cancelRelocateJob:e=>n(`recording`,`cancelRelocateJob`,`mutation`,e),planStorageRebalance:e=>n(`recording`,`planStorageRebalance`,`query`,e),startStorageRebalance:e=>n(`recording`,`startStorageRebalance`,`mutation`,e),getPlacement:e=>n(`recording`,`getPlacement`,`query`,e),setDevicePlacement:e=>n(`recording`,`setDevicePlacement`,`mutation`,e)},recordingExport:{createExport:e=>n(`recordingExport`,`createExport`,`mutation`,e),getExport:e=>n(`recordingExport`,`getExport`,`query`,e),cancelExport:e=>n(`recordingExport`,`cancelExport`,`mutation`,e),deleteExport:e=>n(`recordingExport`,`deleteExport`,`mutation`,e),getDownloadUrl:e=>n(`recordingExport`,`getDownloadUrl`,`query`,e),readExportBytes:e=>n(`recordingExport`,`readExportBytes`,`query`,e)},serverManagement:{getServerPackageStatus:e=>n(`serverManagement`,`getServerPackageStatus`,`query`,e),checkServerUpdate:e=>n(`serverManagement`,`checkServerUpdate`,`mutation`,e),applyServerUpdate:e=>n(`serverManagement`,`applyServerUpdate`,`mutation`,e),rollbackServerUpdate:e=>n(`serverManagement`,`rollbackServerUpdate`,`mutation`,e),restartServer:e=>n(`serverManagement`,`restartServer`,`mutation`,e)},settingsStore:{get:e=>n(`settingsStore`,`get`,`query`,e),set:e=>n(`settingsStore`,`set`,`mutation`,e),query:e=>n(`settingsStore`,`query`,`query`,e),insert:e=>n(`settingsStore`,`insert`,`mutation`,e),insertMany:e=>n(`settingsStore`,`insertMany`,`mutation`,e),update:e=>n(`settingsStore`,`update`,`mutation`,e),delete:e=>n(`settingsStore`,`delete`,`mutation`,e),deleteWhere:e=>n(`settingsStore`,`deleteWhere`,`mutation`,e),updateWhere:e=>n(`settingsStore`,`updateWhere`,`mutation`,e),count:e=>n(`settingsStore`,`count`,`query`,e),aggregate:e=>n(`settingsStore`,`aggregate`,`query`,e),histogram:e=>n(`settingsStore`,`histogram`,`query`,e),isEmpty:e=>n(`settingsStore`,`isEmpty`,`query`,e),declareCollection:e=>n(`settingsStore`,`declareCollection`,`mutation`,e)},storage:{resolve:e=>n(`storage`,`resolve`,`query`,e),write:e=>n(`storage`,`write`,`mutation`,e),read:e=>n(`storage`,`read`,`query`,e),exists:e=>n(`storage`,`exists`,`query`,e),list:e=>n(`storage`,`list`,`query`,e),delete:e=>n(`storage`,`delete`,`mutation`,e),getAvailableSpace:e=>n(`storage`,`getAvailableSpace`,`query`,e),beginUpload:e=>n(`storage`,`beginUpload`,`mutation`,e),writeChunk:e=>n(`storage`,`writeChunk`,`mutation`,e),finalizeUpload:e=>n(`storage`,`finalizeUpload`,`mutation`,e),abortUpload:e=>n(`storage`,`abortUpload`,`mutation`,e),beginDownload:e=>n(`storage`,`beginDownload`,`mutation`,e),readChunk:e=>n(`storage`,`readChunk`,`query`,e),endDownload:e=>n(`storage`,`endDownload`,`mutation`,e),listLocations:e=>n(`storage`,`listLocations`,`query`,e),listLocationDeclarations:e=>n(`storage`,`listLocationDeclarations`,`query`,e),upsertLocation:e=>n(`storage`,`upsertLocation`,`mutation`,e),deleteLocation:e=>n(`storage`,`deleteLocation`,`mutation`,e),listDrainProgress:e=>n(`storage`,`listDrainProgress`,`query`,e),testLocation:e=>n(`storage`,`testLocation`,`query`,e),listProviders:e=>n(`storage`,`listProviders`,`query`,e),testConfig:e=>n(`storage`,`testConfig`,`query`,e)},storageMigration:{plan:e=>n(`storageMigration`,`plan`,`query`,e),start:e=>n(`storageMigration`,`start`,`mutation`,e),status:e=>n(`storageMigration`,`status`,`query`,e),cancel:e=>n(`storageMigration`,`cancel`,`mutation`,e),movers:e=>n(`storageMigration`,`movers`,`query`,e),residue:e=>n(`storageMigration`,`residue`,`query`,e),drain:e=>n(`storageMigration`,`drain`,`mutation`,e),cleanupStart:e=>n(`storageMigration`,`cleanupStart`,`mutation`,e),cleanupStatus:e=>n(`storageMigration`,`cleanupStatus`,`query`,e),cleanupCancel:e=>n(`storageMigration`,`cleanupCancel`,`mutation`,e),history:e=>n(`storageMigration`,`history`,`query`,e)},streamBroker:{fetchEventMedia:e=>n(`streamBroker`,`fetchEventMedia`,`mutation`,e),listAllCameraStreams:e=>n(`streamBroker`,`listAllCameraStreams`,`query`,e),listAllProfileSlots:e=>n(`streamBroker`,`listAllProfileSlots`,`query`,e),getBrokerStats:e=>n(`streamBroker`,`getBrokerStats`,`query`,e),probeStream:e=>n(`streamBroker`,`probeStream`,`mutation`,e),listClients:e=>n(`streamBroker`,`listClients`,`query`,e),killClient:e=>n(`streamBroker`,`killClient`,`mutation`,e),getStreamUrl:e=>n(`streamBroker`,`getStreamUrl`,`query`,e),getStreamWithCodec:e=>n(`streamBroker`,`getStreamWithCodec`,`mutation`,e),releaseStreamWithCodec:e=>n(`streamBroker`,`releaseStreamWithCodec`,`mutation`,e),acquireEgressTranscode:e=>n(`streamBroker`,`acquireEgressTranscode`,`mutation`,e),releaseEgressTranscode:e=>n(`streamBroker`,`releaseEgressTranscode`,`mutation`,e),subscribeAudioChunks:e=>n(`streamBroker`,`subscribeAudioChunks`,`mutation`,e),pullAudioChunks:e=>n(`streamBroker`,`pullAudioChunks`,`query`,e),unsubscribeAudioChunks:e=>n(`streamBroker`,`unsubscribeAudioChunks`,`mutation`,e),subscribeFrames:e=>n(`streamBroker`,`subscribeFrames`,`mutation`,e),pullFrameHandles:e=>n(`streamBroker`,`pullFrameHandles`,`query`,e),unsubscribeFrames:e=>n(`streamBroker`,`unsubscribeFrames`,`mutation`,e),setPreBufferDuration:e=>n(`streamBroker`,`setPreBufferDuration`,`mutation`,e),getPreBufferInfo:e=>n(`streamBroker`,`getPreBufferInfo`,`query`,e),getRtspPort:e=>n(`streamBroker`,`getRtspPort`,`query`,e),getAllRtspEntries:e=>n(`streamBroker`,`getAllRtspEntries`,`query`,e),getRtspEntry:e=>n(`streamBroker`,`getRtspEntry`,`query`,e),regenerateRtspToken:e=>n(`streamBroker`,`regenerateRtspToken`,`mutation`,e),setRtspEnabled:e=>n(`streamBroker`,`setRtspEnabled`,`mutation`,e),isRtspEnabled:e=>n(`streamBroker`,`isRtspEnabled`,`query`,e)},system:{info:e=>n(`system`,`info`,`query`,e),health:e=>n(`system`,`health`,`query`,e),featureFlags:e=>n(`system`,`featureFlags`,`query`,e),networkAddresses:e=>n(`system`,`networkAddresses`,`query`,e),getRetentionConfig:e=>n(`system`,`getRetentionConfig`,`query`,e),setRetentionConfig:e=>n(`system`,`setRetentionConfig`,`mutation`,e),forceRetentionCleanup:e=>n(`system`,`forceRetentionCleanup`,`mutation`,e),getSiteLocation:e=>n(`system`,`getSiteLocation`,`query`,e),setSiteLocation:e=>n(`system`,`setSiteLocation`,`mutation`,e),detectSiteLocation:e=>n(`system`,`detectSiteLocation`,`mutation`,e),getRequestCensus:e=>n(`system`,`getRequestCensus`,`query`,e),getLoadContributions:e=>n(`system`,`getLoadContributions`,`query`,e),getFailureContributions:e=>n(`system`,`getFailureContributions`,`query`,e),getLoggingSettings:e=>n(`system`,`getLoggingSettings`,`query`,e),setLoggingSettings:e=>n(`system`,`setLoggingSettings`,`mutation`,e)},terminalSession:{listProfiles:e=>n(`terminalSession`,`listProfiles`,`query`,e),listInstances:e=>n(`terminalSession`,`listInstances`,`query`,e),createInstance:e=>n(`terminalSession`,`createInstance`,`mutation`,e),updateInstance:e=>n(`terminalSession`,`updateInstance`,`mutation`,e),deleteInstance:e=>n(`terminalSession`,`deleteInstance`,`mutation`,e),setInstanceEnabled:e=>n(`terminalSession`,`setInstanceEnabled`,`mutation`,e),listLegacyCameras:e=>n(`terminalSession`,`listLegacyCameras`,`query`,e),adoptLegacyMonitor:e=>n(`terminalSession`,`adoptLegacyMonitor`,`mutation`,e),listSessions:e=>n(`terminalSession`,`listSessions`,`query`,e),openSession:e=>n(`terminalSession`,`openSession`,`mutation`,e),resize:e=>n(`terminalSession`,`resize`,`mutation`,e),pullOutput:e=>n(`terminalSession`,`pullOutput`,`mutation`,e),writeInput:e=>n(`terminalSession`,`writeInput`,`mutation`,e),close:e=>n(`terminalSession`,`close`,`mutation`,e)},toast:{onToast:(e,t)=>n(`toast`,`onToast`,`subscription`,e,t)},turnProvider:{getTurnServers:e=>n(`turnProvider`,`getTurnServers`,`query`,e)},userManagement:{listUsers:e=>n(`userManagement`,`listUsers`,`query`,e),createUser:e=>n(`userManagement`,`createUser`,`mutation`,e),updateUser:e=>n(`userManagement`,`updateUser`,`mutation`,e),deleteUser:e=>n(`userManagement`,`deleteUser`,`mutation`,e),resetPassword:e=>n(`userManagement`,`resetPassword`,`mutation`,e),setUserScopes:e=>n(`userManagement`,`setUserScopes`,`mutation`,e),validateCredentials:e=>n(`userManagement`,`validateCredentials`,`mutation`,e),listApiKeys:e=>n(`userManagement`,`listApiKeys`,`query`,e),createApiKey:e=>n(`userManagement`,`createApiKey`,`mutation`,e),revokeApiKey:e=>n(`userManagement`,`revokeApiKey`,`mutation`,e),validateApiKey:e=>n(`userManagement`,`validateApiKey`,`mutation`,e),createScopedToken:e=>n(`userManagement`,`createScopedToken`,`mutation`,e),revokeScopedToken:e=>n(`userManagement`,`revokeScopedToken`,`mutation`,e),validateScopedToken:e=>n(`userManagement`,`validateScopedToken`,`query`,e),listScopedTokens:e=>n(`userManagement`,`listScopedTokens`,`query`,e),setupTotp:e=>n(`userManagement`,`setupTotp`,`mutation`,e),confirmTotp:e=>n(`userManagement`,`confirmTotp`,`mutation`,e),disableTotp:e=>n(`userManagement`,`disableTotp`,`mutation`,e),getTotpStatus:e=>n(`userManagement`,`getTotpStatus`,`query`,e),verifyTotp:e=>n(`userManagement`,`verifyTotp`,`mutation`,e),oauthIssueCode:e=>n(`userManagement`,`oauthIssueCode`,`mutation`,e),oauthExchangeCode:e=>n(`userManagement`,`oauthExchangeCode`,`mutation`,e),oauthRefresh:e=>n(`userManagement`,`oauthRefresh`,`mutation`,e),oauthVerifyAccessToken:e=>n(`userManagement`,`oauthVerifyAccessToken`,`query`,e),listOauthSessions:e=>n(`userManagement`,`listOauthSessions`,`query`,e),revokeOauthSession:e=>n(`userManagement`,`revokeOauthSession`,`mutation`,e)}}}var YM=`audio-`;function XM(e){return e.startsWith(YM)?e.slice(6):e}function ZM(e){return e.startsWith(YM)?e:`${YM}${e}`}var QM=-96,$M=0,eN=3,tN=-55,nN=1,rN=100,iN=1,aN=300,oN=2,sN=5,cN=1,lN=20,uN=1,dN=60,fN={hitPercent:60,samplingSeconds:10};function pN(e){return e??fN}function mN(e){return e===void 0?null:e.labels!==void 0&&e.labels.length>0?`label`:e.dbThreshold===void 0?null:`level`}function hN(e){return e===void 0?!1:e.dbThreshold===void 0&&(e.labels===void 0||e.labels.length===0)}function gN(e,t,n){return Number.isFinite(e)?Math.min(n,Math.max(t,Math.round(e))):t}function _N(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function vN(e,t){let n=pN(e),r=_N(t,`labels`)?t.labels:n.labels,i=_N(t,`dbThreshold`)?t.dbThreshold:n.dbThreshold,a=r!==void 0&&r.length>0,o=t.mode??(_N(t,`labels`)&&a?`label`:_N(t,`dbThreshold`)&&i!==void 0?`level`:a?`label`:i===void 0?null:`level`),s=o===`label`&&a?r:void 0,c=o===`level`?i??(t.mode===`level`?-55:void 0):void 0;return{...s===void 0?{}:{labels:[...s]},...c===void 0?{}:{dbThreshold:gN(c,-96,0)},hitPercent:gN(t.hitPercent??n.hitPercent,1,100),samplingSeconds:gN(t.samplingSeconds??n.samplingSeconds,1,300),...(()=>{let e=_N(t,`confirmHits`)?t.confirmHits:n.confirmHits,r=_N(t,`confirmWindowSec`)?t.confirmWindowSec:n.confirmWindowSec;return{...e===void 0?{}:{confirmHits:gN(e,1,20)},...r===void 0?{}:{confirmWindowSec:gN(r,1,60)}}})()}}function yN(e,t){let n=e?.audioKinds??[],r=n.length>0?n.map(e=>{let t=XM(e.kind);return{value:t,label:e.label,iconId:ZM(t),unknown:!1}}):qm.map(e=>({value:e.id,label:e.name,iconId:ZM(e.id),unknown:!1})),i=new Set(r.map(e=>e.value)),a=[];for(let e of t??[]){let t=XM(e);i.has(t)||a.includes(t)||(a.push(t),r.push({value:t,label:t,iconId:ZM(t),unknown:!0}))}return{choices:r,unknownLabels:a}}function bN(e,t){let n=XM(t);return(e??[]).some(e=>XM(e)===n)}function xN(e,t){let n=XM(t),r=e??[];if(bN(r,n)){let e=r.filter(e=>XM(e)!==n);return e.length>0?e:void 0}return[...r,n]}var SN=new Set([`classes`,`classesExclude`]),CN=new Set([`sensorKinds`]),wN=new Set([`occupancy`]);function TN(e){return{value:e.kind,label:e.label}}function EN(e){let t=[],n=new Map,r=(e,r)=>{let i=n.get(e);if(i!==void 0)return i;let a={fallbackLabel:r,options:[]};return n.set(e,a),t.push(e),a};for(let t of e){let e=t.parentKind??t.kind,n=r(e,t.parentKind===null?t.label:e);n.options.push(TN(t)),t.parentKind===null&&(n.fallbackLabel=t.label)}return t.flatMap(e=>{let t=n.get(e);return t===void 0?[]:[{key:e,fallbackLabel:t.fallbackLabel,options:t.options}]})}function DN(e){let t=[],n=new Map;for(let r of e){let e=r.parentKind??`other`,i=n.get(e);i===void 0?(n.set(e,[TN(r)]),t.push(e)):i.push(TN(r))}return t.flatMap(e=>{let t=n.get(e);return t===void 0?[]:[{key:e,fallbackLabel:e,options:t}]})}function ON(e,t){if(!t)return null;if(SN.has(e)){let e=EN(t.videoClasses);return t.audioKinds.length>0&&e.push({key:`audio`,fallbackLabel:`Audio`,options:t.audioKinds.map(TN)}),e.length>0?{groups:e}:null}if(wN.has(e)){let e=t.videoClasses.filter(e=>e.parentKind===null).map(TN);return e.length>0?{groups:[{key:`macro`,fallbackLabel:`Classes`,options:e}]}:null}if(CN.has(e)){let e=DN(t.labels);return e.length>0?{groups:e}:null}return null}function kN(e){let t=new Set;for(let n of e.groups)for(let e of n.options)t.add(e.value);return t}var AN=[`devices`,`classes`],jN=new Set(AN);function MN(e){return jN.has(e)}function NN(e){return e.replace(/!\[([^\]]*)\]\([^)]*\)/g,`$1`).replace(/\[([^\]]*)\]\([^)]*\)/g,`$1`).replace(/(\*\*|__)(.*?)\1/g,`$2`).replace(/(\*|_)(.*?)\1/g,`$2`).replace(/`([^`]*)`/g,`$1`).replace(/^\s{0,3}#{1,6}\s*/gm,``).replace(/^\s{0,3}>\s?/gm,``).replace(/^\s{0,3}[-*+]\s+/gm,``).replace(/^\s{0,3}\d+\.\s+/gm,``).trim()}var PN=[[/&nbsp;/g,` `],[/&amp;/g,`&`],[/&lt;/g,`<`],[/&gt;/g,`>`],[/&quot;/g,`"`],[/&#39;/g,`'`]];function FN(e){let t=e.replace(/<\s*br\s*\/?\s*>/gi,`
346
346
  `).replace(/<\s*\/\s*(p|div|li|h[1-6])\s*>/gi,`
347
347
  `).replace(/<[^>]+>/g,``);for(let[e,n]of PN)t=t.replace(e,n);return t.replace(/\n{3,}/g,`
348
348