@camera.ui/server 0.0.110 → 0.0.112

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 (224) hide show
  1. package/dist/interface/assets/{404-CZDMFg2Z.js → 404-Dd3AyWdE.js} +1 -1
  2. package/dist/interface/assets/{About-TDIJXs5o.js → About-DAV31RZ5.js} +1 -1
  3. package/dist/interface/assets/{Adminpanel-Cciuxh1q.js → Adminpanel-zLLSmbSt.js} +1 -1
  4. package/dist/interface/assets/Automation-Dx--ghuY.js +2 -0
  5. package/dist/interface/assets/AutomationImport-chsxrEfX.js +2 -0
  6. package/dist/interface/assets/AutomationStore-BhL1O1qq.js +2 -0
  7. package/dist/interface/assets/AutomationStore-Q25Okhz8.css +1 -0
  8. package/dist/interface/assets/AutomationStoreDetail--egqUOqn.css +1 -0
  9. package/dist/interface/assets/AutomationStoreDetail-pW5g8G4I.js +2 -0
  10. package/dist/interface/assets/Automations-CQioiNmw.js +2 -0
  11. package/dist/interface/assets/{Camera-BlN_KppY.js → Camera-DVJbyl93.js} +2 -2
  12. package/dist/interface/assets/{CameraConsole-DGbeilsL.js → CameraConsole-DOiCJAQS.js} +1 -1
  13. package/dist/interface/assets/{Cameras-CVID1akl.js → Cameras-Dz7bZyRE.js} +2 -2
  14. package/dist/interface/assets/Camview-CBywGGI8.js +1 -0
  15. package/dist/interface/assets/{Camview-Gxca3bvT.css → Camview-CDM4Q_tc.css} +1 -1
  16. package/dist/interface/assets/Config-BfijMggp.js +2 -0
  17. package/dist/interface/assets/{ConfigActionCameraControl-BRgTU6MP.js → ConfigActionCameraControl-B2xFxVNO.js} +1 -1
  18. package/dist/interface/assets/{ConfigActionDelay-CYz0z9Od.js → ConfigActionDelay-DOUAx4lh.js} +1 -1
  19. package/dist/interface/assets/{ConfigActionHttp-C9nEQ-7w.js → ConfigActionHttp-BGz4r_Nr.js} +1 -1
  20. package/dist/interface/assets/{ConfigActionImageInput-D8ipnlfe.js → ConfigActionImageInput-BhO3ekJT.js} +1 -1
  21. package/dist/interface/assets/{ConfigActionNotification-FzGgJM9i.js → ConfigActionNotification-hmTEfMw3.js} +1 -1
  22. package/dist/interface/assets/{ConfigActionOutput-BB-jkCdD.js → ConfigActionOutput-P0WY0DlF.js} +1 -1
  23. package/dist/interface/assets/{ConfigActionPlugin-C1OSUQ3_.js → ConfigActionPlugin-BgKKvqAy.js} +1 -1
  24. package/dist/interface/assets/{ConfigActionSensor-C6DOrCYd.js → ConfigActionSensor-Du072tTI.js} +1 -1
  25. package/dist/interface/assets/{ConfigActionSnapshot-k8RM-NMf.js → ConfigActionSnapshot-9aGopbuJ.js} +1 -1
  26. package/dist/interface/assets/{ConfigActionVariable-D-1zVFz-.js → ConfigActionVariable-B2BoiQPb.js} +1 -1
  27. package/dist/interface/assets/{ConfigConditionIfElse-pp0wRFeJ.js → ConfigConditionIfElse-Bhd2FYyz.js} +1 -1
  28. package/dist/interface/assets/{ConfigConditionSensorState-CIbkk6LA.js → ConfigConditionSensorState-D2IIsthA.js} +1 -1
  29. package/dist/interface/assets/{ConfigConditionSwitch-BPdEa--b.js → ConfigConditionSwitch-CC0w-Hvy.js} +1 -1
  30. package/dist/interface/assets/{ConfigConditionTime-bHKJ8kBR.js → ConfigConditionTime-lhWiIy2x.js} +1 -1
  31. package/dist/interface/assets/{ConfigTriggerDetection-BrtBsd1t.js → ConfigTriggerDetection-CYJOEkHi.js} +1 -1
  32. package/dist/interface/assets/ConfigTriggerGeofence-4t1aW1Iw.js +1 -0
  33. package/dist/interface/assets/{ConfigTriggerManual-DDmBGqnC.js → ConfigTriggerManual-ChsUsNCK.js} +1 -1
  34. package/dist/interface/assets/{ConfigTriggerSchedule-vC9yyRct.js → ConfigTriggerSchedule-CE47WiIV.js} +1 -1
  35. package/dist/interface/assets/{ConfigTriggerSensor-BbKksZMP.js → ConfigTriggerSensor-CVzeR8ac.js} +1 -1
  36. package/dist/interface/assets/{ConfigTriggerSystem-CO06Crjg.js → ConfigTriggerSystem-5TI9H8mj.js} +1 -1
  37. package/dist/interface/assets/{ConfigTriggerWebhook-CrtHc6Q3.js → ConfigTriggerWebhook-D3cHvW8H.js} +1 -1
  38. package/dist/interface/assets/{Console-B4SQZA5X.js → Console-COaJF4Fu.js} +1 -1
  39. package/dist/interface/assets/{CuiActionButton-CNTiGrTt.js → CuiActionButton-Bl7gqhIV.js} +1 -1
  40. package/dist/interface/assets/{CuiAvatar-DUucUxIP.js → CuiAvatar-Drdaxxcm.js} +1 -1
  41. package/dist/interface/assets/{CuiBBoxPlayground-DOcoHCTQ.js → CuiBBoxPlayground-CIU5kteO.js} +1 -1
  42. package/dist/interface/assets/CuiBottomSheet-CrsJjITg.js +1 -0
  43. package/dist/interface/assets/{CuiBottomSheet-zPb4AI5w.js → CuiBottomSheet-ljGYA9W5.js} +1 -1
  44. package/dist/interface/assets/CuiCameraCard-O22PEfyi.js +1 -0
  45. package/dist/interface/assets/{CuiCameraPipCard-DehPfhfs.js → CuiCameraPipCard-BDZ3W5sh.js} +1 -1
  46. package/dist/interface/assets/{CuiCameraRecordings-bqChEXwx.js → CuiCameraRecordings-BWlxU4qP.js} +1 -1
  47. package/dist/interface/assets/{CuiCameraShares-BvwB4H_0.js → CuiCameraShares-BIXFV72I.js} +1 -1
  48. package/dist/interface/assets/{CuiCameraSnapshot-C33nUgVt.js → CuiCameraSnapshot-BAwo37N7.js} +1 -1
  49. package/dist/interface/assets/{CuiCameraTable-B5wQAGfM.js → CuiCameraTable-6tWx74Nl.js} +1 -1
  50. package/dist/interface/assets/{CuiDataTable-D9GqApg1.js → CuiDataTable-saRt0sBc.js} +1 -1
  51. package/dist/interface/assets/{CuiFloatingButton-BLCO4wJw.js → CuiFloatingButton-B5YMdr0X.js} +1 -1
  52. package/dist/interface/assets/{CuiImage-B3eMhhIS.js → CuiImage-KyBpvv-t.js} +1 -1
  53. package/dist/interface/assets/{CuiMarkdownContent-YieurDkL.js → CuiMarkdownContent-DaJ8HzaP.js} +1 -1
  54. package/dist/interface/assets/CuiMarkdownContent-qIS8eQHX.js +1 -0
  55. package/dist/interface/assets/{CuiMenu-BO2e4LK5.js → CuiMenu-BBequFn_.js} +1 -1
  56. package/dist/interface/assets/{CuiPluginCard-Bu_rNdQH.js → CuiPluginCard-Bnb0YKK1.js} +2 -2
  57. package/dist/interface/assets/CuiPluginCategoryChip-CdGrTCxH.css +1 -0
  58. package/dist/interface/assets/CuiPluginCategoryChip-rfdhCEi-.js +1 -0
  59. package/dist/interface/assets/{CuiPluginOAuthButton-Q2CBmZzv.js → CuiPluginOAuthButton-CvVnSP0h.js} +2 -2
  60. package/dist/interface/assets/CuiPluginTrustBadge-QHTLaN1n.css +1 -0
  61. package/dist/interface/assets/CuiPluginTrustBadge-YhfqGTyR.js +1 -0
  62. package/dist/interface/assets/{CuiQRCode-CVHjvjZP.js → CuiQRCode-Di0RLqfL.js} +1 -1
  63. package/dist/interface/assets/{CuiRecordingsGrid-BFHPh2dn.js → CuiRecordingsGrid-DNw21B-r.js} +1 -1
  64. package/dist/interface/assets/{CuiSchema-DEYDened.js → CuiSchema-Cr90oo-T.js} +1 -1
  65. package/dist/interface/assets/{CuiTopNavbarItem-CqM9AHmU.js → CuiTopNavbarItem-Q7M4nMw5.js} +1 -1
  66. package/dist/interface/assets/{CuiTopbarSlot-DbzQRnbt.js → CuiTopbarSlot-ac4GLLbf.js} +1 -1
  67. package/dist/interface/assets/{Faces-u9Rxm4Ti.js → Faces-CFN1J-o4.js} +1 -1
  68. package/dist/interface/assets/FirstSteps-uzffNroi.js +1 -0
  69. package/dist/interface/assets/{Instances-CWzMYIvB.js → Instances-CsAKq-HH.js} +1 -1
  70. package/dist/interface/assets/Logs-DKwNBSz9.js +6 -0
  71. package/dist/interface/assets/{Menu-uW8DUGLM.js → Menu-Db1mi08W.js} +1 -1
  72. package/dist/interface/assets/{OAuthDeviceFlow-CxJbM1jZ.js → OAuthDeviceFlow-B4cT3UTT.js} +1 -1
  73. package/dist/interface/assets/Plugin-BDwSHzi9.js +1 -0
  74. package/dist/interface/assets/{PluginConsole-C-ndOnmZ.js → PluginConsole-Bs9HqX_F.js} +1 -1
  75. package/dist/interface/assets/PluginDetail-B2odw9DA.css +1 -0
  76. package/dist/interface/assets/PluginDetail-C3j4zIxC.js +2 -0
  77. package/dist/interface/assets/{PluginSchema-BcLXAX-Q.js → PluginSchema-D3BCVJNa.js} +1 -1
  78. package/dist/interface/assets/PluginSearch-BLWXmn9w.js +2 -0
  79. package/dist/interface/assets/PluginSearch-BOWQC1zl.css +1 -0
  80. package/dist/interface/assets/PluginSearch-BwG61G-G.js +1 -0
  81. package/dist/interface/assets/Plugins-DD8FPbtv.js +1 -0
  82. package/dist/interface/assets/{Recordings-Daf0TCPA.js → Recordings-Bt8clj2R.js} +1 -1
  83. package/dist/interface/assets/{Settings-Bz7u44Pl.js → Settings-Bj_41fdw.js} +1 -1
  84. package/dist/interface/assets/{SettingsAccount-C_pQPGoW.js → SettingsAccount-CWVj8S8j.js} +1 -1
  85. package/dist/interface/assets/SettingsAccount-DnZKU_tM.js +1 -0
  86. package/dist/interface/assets/{SettingsAppearance-CwPSvzkX.js → SettingsAppearance-DNaNlO1q.js} +1 -1
  87. package/dist/interface/assets/SettingsAppearance-k5WMN34x.js +1 -0
  88. package/dist/interface/assets/{SettingsBackup-CCEtuJsQ.js → SettingsBackup-stUbnWJf.js} +1 -1
  89. package/dist/interface/assets/{SettingsNotifications-OV4-nraE.js → SettingsNotifications-Do2Cy2yf.js} +1 -1
  90. package/dist/interface/assets/{SettingsRecordings-uNRwROAh.js → SettingsRecordings-DWX69m9b.js} +1 -1
  91. package/dist/interface/assets/SettingsRemote-RqXtq3dF.js +1 -0
  92. package/dist/interface/assets/{SettingsSystem-DwXSeR_Z.js → SettingsSystem-BZ14jaFr.js} +2 -2
  93. package/dist/interface/assets/{SettingsUsers-CimG6HaL.js → SettingsUsers-Cb6zolu8.js} +1 -1
  94. package/dist/interface/assets/{Terminal-h5vqtN-o.js → Terminal-D2zkV1fJ.js} +1 -1
  95. package/dist/interface/assets/{VariableInput-tPI6hxP8.js → VariableInput-CFs-kzqd.js} +1 -1
  96. package/dist/interface/assets/{VariableSuggestions-K3CHs8XG.js → VariableSuggestions-PEzupqiE.js} +1 -1
  97. package/dist/interface/assets/VersionsHandler-nZK8BEJK.js +7 -0
  98. package/dist/interface/assets/{Workers-xo6c0O5M.js → Workers-CKR9yslJ.js} +1 -1
  99. package/dist/interface/assets/account-DqOHQKv8.js +1 -0
  100. package/dist/interface/assets/api-Cntxdwiu.js +2 -0
  101. package/dist/interface/assets/api-CrAOxyt8.css +2 -0
  102. package/dist/interface/assets/api-CvihG9kg.js +1 -0
  103. package/dist/interface/assets/{auth-Czmir2ST.js → auth-BeYrbk7B.js} +1 -1
  104. package/dist/interface/assets/automationBlueprint-DMjszOs4.js +1 -0
  105. package/dist/interface/assets/{automations-C2J4u5Uj.js → automations-C309DNNg.js} +1 -1
  106. package/dist/interface/assets/automations-egbiXwMx.js +1 -0
  107. package/dist/interface/assets/{backup-BcXXJ1y6.js → backup-82y2bZBX.js} +1 -1
  108. package/dist/interface/assets/bell-ring-CenQn4Yt.js +1 -0
  109. package/dist/interface/assets/bug-DPw8k4Lk.js +1 -0
  110. package/dist/interface/assets/cameras-DRRy289F.js +1 -0
  111. package/dist/interface/assets/{cameras.schema-CuVLJONJ.js → cameras.schema-qOAUe-E9.js} +1 -1
  112. package/dist/interface/assets/cctv-CBtg_v6o.js +1 -0
  113. package/dist/interface/assets/clock-outline-MhJC2-0d.js +1 -0
  114. package/dist/interface/assets/cloudHandoff-CiV159TL.js +1 -0
  115. package/dist/interface/assets/{deviceId-BM0pOHhg.js → deviceId-DXf6AlPA.js} +1 -1
  116. package/dist/interface/assets/github-DLhaVazy.js +1 -0
  117. package/dist/interface/assets/{hasPermission-B724PtFJ.js → hasPermission-CPgoH1JH.js} +1 -1
  118. package/dist/interface/assets/{instances-5MeVN25v.js → instances-Crs3gwnp.js} +1 -1
  119. package/dist/interface/assets/{locale-hdhgxXOX.js → locale-BCQeXbI8.js} +1 -1
  120. package/dist/interface/assets/main-D0vO1lt0.js +3 -0
  121. package/dist/interface/assets/motion-sensor-DD8SfD-m.js +1 -0
  122. package/dist/interface/assets/nodeDefinitions-Dvawtk76.js +1 -0
  123. package/dist/interface/assets/{notifications-Cq1bDRQk.js → notifications-AiaxATml.js} +1 -1
  124. package/dist/interface/assets/plugins-C_Mh_UEw.js +1 -0
  125. package/dist/interface/assets/puzzle-filled-C1z2qa5-.js +1 -0
  126. package/dist/interface/assets/refresh-rounded-Bqiw9DUu.js +1 -0
  127. package/dist/interface/assets/{round-restart-alt-bbbi50F4.js → round-restart-alt-BJAngKc7.js} +1 -1
  128. package/dist/interface/assets/router-C2x34pNg.js +2 -0
  129. package/dist/interface/assets/{routerState-ByP_jZ8E.js → routerState-dQtObsFs.js} +1 -1
  130. package/dist/interface/assets/{server-BW0jfXav.js → server-GaO6jF81.js} +1 -1
  131. package/dist/interface/assets/shares-Cw2NYamp.js +1 -0
  132. package/dist/interface/assets/source-branch-Cd8fHY0E.js +1 -0
  133. package/dist/interface/assets/{theme-B2fORWV9.js → theme-cGiCxaXN.js} +1 -1
  134. package/dist/interface/assets/types-6RvFwckU.js +1 -0
  135. package/dist/interface/assets/types-aZM1hCux.js +1 -0
  136. package/dist/interface/assets/types-v-mK9gdq.css +1 -0
  137. package/dist/interface/assets/{ui-CnzJLu9N.js → ui-DrzKhUXW.js} +1 -1
  138. package/dist/interface/assets/{useBiometricCredentials-BGl37Skw.js → useBiometricCredentials-CEmbsdFy.js} +1 -1
  139. package/dist/interface/assets/{useCameraOptions-D0rQaUuh.js → useCameraOptions-quplvW_7.js} +1 -1
  140. package/dist/interface/assets/{useCuiCameraDrawer-2I0LB3ff.js → useCuiCameraDrawer-DnN9lwiy.js} +1 -1
  141. package/dist/interface/assets/useCuiDialog-j9ybKsCK.js +2 -0
  142. package/dist/interface/assets/{useFileDownload-BLbAIlSX.js → useFileDownload-BcOErnCc.js} +1 -1
  143. package/dist/interface/assets/{useLogsSocket-BnU6ynWU.js → useLogsSocket-gXiAENMr.js} +1 -1
  144. package/dist/interface/assets/{useSharedComposables-DjDddcdT.js → useSharedComposables-gpJ--qZh.js} +1 -1
  145. package/dist/interface/assets/{useStreamStatus-Dy3K_ILd.js → useStreamStatus-bjptbs6u.js} +1 -1
  146. package/dist/interface/assets/useUserOptions-CA-AJeEh.js +1 -0
  147. package/dist/interface/assets/users.schema-DaXV2Jq7.js +1 -0
  148. package/dist/interface/assets/{vendor-cameraui-B9wC4-mi.js → vendor-cameraui-DgSMexWY.js} +1 -1
  149. package/dist/interface/assets/{vendor-core-CBFMCwgj.js → vendor-core-BKHiXSX7.js} +1 -1
  150. package/dist/interface/assets/{vendor-primevue-DYHQyonV.js → vendor-primevue-7iEzPOvf.js} +1 -1
  151. package/dist/interface/assets/{vendor-zod-V2qTUMVc.js → vendor-zod-DycFxUhi.js} +1 -1
  152. package/dist/interface/assets/{view-grid-D39XDBn9.js → view-grid-Coh7iX5e.js} +1 -1
  153. package/dist/interface/assets/webhook-Dgi5u5S_.js +1 -0
  154. package/dist/interface/index.html +49 -43
  155. package/dist/interface/sw.js +1 -1
  156. package/dist/interface/{workbox-5f44db27.js → workbox-778a14ff.js} +1 -1
  157. package/dist/server/package.json +2 -2
  158. package/dist/server/src/api/controllers/automations.controller.d.ts +3 -1
  159. package/dist/server/src/api/controllers/automations.controller.js +26 -1
  160. package/dist/server/src/api/controllers/automations.controller.js.map +1 -1
  161. package/dist/server/src/api/controllers/cameras.controller.d.ts +1 -5
  162. package/dist/server/src/api/controllers/cameras.controller.js +0 -359
  163. package/dist/server/src/api/controllers/cameras.controller.js.map +1 -1
  164. package/dist/server/src/api/controllers/plugins.controller.d.ts +4 -0
  165. package/dist/server/src/api/controllers/plugins.controller.js +165 -53
  166. package/dist/server/src/api/controllers/plugins.controller.js.map +1 -1
  167. package/dist/server/src/api/routes/automations.routes.js +23 -1
  168. package/dist/server/src/api/routes/automations.routes.js.map +1 -1
  169. package/dist/server/src/api/routes/cameras.routes.js +1 -12
  170. package/dist/server/src/api/routes/cameras.routes.js.map +1 -1
  171. package/dist/server/src/api/schemas/automations.schema.d.ts +8 -0
  172. package/dist/server/src/api/schemas/automations.schema.js +6 -0
  173. package/dist/server/src/api/schemas/automations.schema.js.map +1 -1
  174. package/dist/server/src/api/schemas/cameras.schema.d.ts +0 -14
  175. package/dist/server/src/api/schemas/cameras.schema.js +0 -103
  176. package/dist/server/src/api/schemas/cameras.schema.js.map +1 -1
  177. package/dist/server/src/api/schemas/plugins.schema.d.ts +1 -0
  178. package/dist/server/src/api/schemas/plugins.schema.js +1 -0
  179. package/dist/server/src/api/schemas/plugins.schema.js.map +1 -1
  180. package/dist/server/src/api/services/backup.service.js +7 -1
  181. package/dist/server/src/api/services/backup.service.js.map +1 -1
  182. package/dist/server/src/api/services/cameras.service.d.ts +2 -3
  183. package/dist/server/src/api/services/cameras.service.js +0 -67
  184. package/dist/server/src/api/services/cameras.service.js.map +1 -1
  185. package/dist/server/src/api/types/index.d.ts +28 -29
  186. package/dist/server/src/api/types/index.js.map +1 -1
  187. package/dist/server/src/utils/automation-registry/index.d.ts +17 -0
  188. package/dist/server/src/utils/automation-registry/index.js +58 -0
  189. package/dist/server/src/utils/automation-registry/index.js.map +1 -0
  190. package/dist/server/src/utils/plugin-registry/index.d.ts +27 -0
  191. package/dist/server/src/utils/plugin-registry/index.js +127 -0
  192. package/dist/server/src/utils/plugin-registry/index.js.map +1 -0
  193. package/package.json +2 -2
  194. package/dist/interface/assets/Automation-CMMDPrn0.js +0 -2
  195. package/dist/interface/assets/Automations-by_LN5br.js +0 -1
  196. package/dist/interface/assets/Camview-B-Pqm0Fw.js +0 -1
  197. package/dist/interface/assets/Config-CfunWNtM.js +0 -2
  198. package/dist/interface/assets/ConfigTriggerGeofence-DCqAqAG3.js +0 -1
  199. package/dist/interface/assets/CuiBottomSheet-DSG6iONb.js +0 -1
  200. package/dist/interface/assets/CuiCameraCard-kI_GNoa7.js +0 -1
  201. package/dist/interface/assets/FirstSteps-YNR-3tqt.js +0 -1
  202. package/dist/interface/assets/Logs-CpAkrsEJ.js +0 -6
  203. package/dist/interface/assets/Plugin-CWjFyBeK.js +0 -1
  204. package/dist/interface/assets/Plugins-B7ZOk3ld.js +0 -2
  205. package/dist/interface/assets/Plugins-s1k811lf.css +0 -1
  206. package/dist/interface/assets/SettingsAccount-BgpeeHsR.js +0 -1
  207. package/dist/interface/assets/SettingsAppearance-DSNXI3t4.js +0 -1
  208. package/dist/interface/assets/SettingsRemote-Dg3BfdmI.js +0 -1
  209. package/dist/interface/assets/VersionsHandler-BrfHmvOf.js +0 -7
  210. package/dist/interface/assets/api-B8LDDNgZ.js +0 -2
  211. package/dist/interface/assets/api-BB9AG_h5.css +0 -2
  212. package/dist/interface/assets/api-Cm9H8gwG.js +0 -1
  213. package/dist/interface/assets/automations-DVc4ovPU.js +0 -1
  214. package/dist/interface/assets/cameras-BEBBV7mz.js +0 -1
  215. package/dist/interface/assets/cloudHandoff-Cnd7f4Es.js +0 -1
  216. package/dist/interface/assets/github-DNzKZdHG.js +0 -1
  217. package/dist/interface/assets/main-D0dJIe_X.js +0 -3
  218. package/dist/interface/assets/nodeDefinitions-blmt-d7H.js +0 -1
  219. package/dist/interface/assets/plugins-BMys-WCs.js +0 -1
  220. package/dist/interface/assets/router-DUCivZj8.js +0 -2
  221. package/dist/interface/assets/shares-D0r3nTB0.js +0 -1
  222. package/dist/interface/assets/types-CztXMZ5X.js +0 -1
  223. package/dist/interface/assets/useCuiDialog-DZvxI8xi.js +0 -2
  224. package/dist/interface/assets/users.schema-2wYWhJ9W.js +0 -1
@@ -1,3 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/cloudHandoff-Cnd7f4Es.js","assets/api-B8LDDNgZ.js","assets/rolldown-runtime-DAXXjFlN.js","assets/vendor-cameraui-B9wC4-mi.js","assets/vendor-DoIl6acN.js","assets/vendor-core-CBFMCwgj.js","assets/api-BB9AG_h5.css"])))=>i.map(i=>d[i]);
2
- import{o as e}from"./rolldown-runtime-DAXXjFlN.js";import{An as t,Bi as n,Ct as r,Dn as i,Dt as a,Et as o,Gt as s,Hn as c,In as l,Ji as u,Ki as d,Kn as f,Kt as p,Mn as m,Mt as h,Ni as g,On as _,Ot as v,Pi as y,Q as b,Si as ee,Sn as x,St as S,Tt as C,Vn as te,X as w,Yi as T,Z as ne,_a as re,_n as E,_t as ie,ba as ae,bn as oe,bt as se,cn as D,dn as O,dt as ce,en as k,fi as le,fn as ue,ft as de,gn as fe,gt as pe,hi as me,hn as he,ht as A,in as ge,jt as j,k as _e,kn as ve,kt as ye,ln as be,mn as xe,mt as Se,nn as Ce,pn as we,pt as Te,qi as Ee,rn as De,tn as Oe,tt as ke,un as Ae,ut as je,vi as Me,vn as Ne,vt as Pe,wn as Fe,wt as Ie,xa as Le,xn as Re,xt as ze,ya as Be,yt as Ve,zi as He}from"./vendor-cameraui-B9wC4-mi.js";import{C as Ue,E as We,F as Ge,L as Ke,O as qe,P as Je,S as Ye,T as Xe,a as Ze,c as Qe,f as $e,i as et,l as tt,n as nt,r as rt,s as it,t as at,v as ot,y as st}from"./api-B8LDDNgZ.js";import{$ as ct,$n as M,$t as N,An as lt,Cr as P,En as ut,Er as F,Gn as dt,J as ft,L as I,Ln as pt,Nn as mt,On as ht,Pn as gt,Q as _t,R as L,Rn as vt,Sr as R,Tr as z,Un as yt,Vn as B,Wt as bt,Yn as xt,Zn as St,_r as Ct,an as wt,ar as Tt,b as Et,br as Dt,cn as Ot,dn as V,fn as H,fr as kt,jn as At,kn as jt,lr as Mt,mn as U,mr as W,nr as G,on as K,pn as q,q as Nt,rn as Pt,rr as Ft,tn as It,un as J,ur as Y,vn as X,x as Lt,xn as Z,yn as Q,z as Rt,zn as $}from"./vendor-DoIl6acN.js";import{c as zt,f as Bt,l as Vt,n as Ht,t as Ut,u as Wt}from"./vendor-core-CBFMCwgj.js";import{I as Gt,L as Kt,_ as qt,a as Jt,b as Yt,c as Xt,d as Zt,f as Qt,g as $t,h as en,i as tn,l as nn,m as rn,o as an,p as on,r as sn,s as cn,t as ln,u as un,v as dn,x as fn,y as pn,z as mn}from"./CuiCameraCard-kI_GNoa7.js";import{t as hn}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{n as gn,o as _n,r as vn,s as yn,t as bn}from"./useSharedComposables-DjDddcdT.js";import{n as xn}from"./ui-CnzJLu9N.js";import{a as Sn,i as Cn,n as wn,o as Tn,r as En,t as Dn}from"./router-DUCivZj8.js";import{t as On}from"./cloud-outline-BPAJ6_kc.js";import{t as kn}from"./close-DuwOOM-P.js";import{t as An}from"./useElectron-mh8HQUAI.js";import{t as jn}from"./chevron-down-KZwkCQ3v.js";import{B as Mn,D as Nn,E as Pn,G as Fn,H as In,J as Ln,K as Rn,L as zn,O as Bn,R as Vn,S as Hn,U as Un,V as Wn,W as Gn,_ as Kn,a as qn,f as Jn,g as Yn,j as Xn,k as Zn,m as Qn,n as $n,p as er,r as tr,t as nr,u as rr,v as ir,x as ar,y as or,z as sr}from"./vendor-primevue-DYHQyonV.js";import{t as cr}from"./power-BcSFRPtI.js";import{t as lr}from"./CuiAvatar-DUucUxIP.js";import{t as ur}from"./api-Cm9H8gwG.js";import{t as dr}from"./instances-5MeVN25v.js";import{t as fr}from"./cctv-BsGdaLfw.js";import{t as pr}from"./cog-Ce2a8uiA.js";import{t as mr}from"./lightbulb-outline-B0CFho4y.js";import{t as hr}from"./face-recognition-D5evlO1d.js";import{r as gr}from"./github-DNzKZdHG.js";import{t as _r}from"./CuiCameraSnapshot-C33nUgVt.js";import{t as vr}from"./hasPermission-B724PtFJ.js";import{n as yr,t as br}from"./CuiMenu-BO2e4LK5.js";import{t as xr}from"./shield-check-ChlSHOnR.js";import{t as Sr}from"./vendor-draggabilly-Dl6FWJwx.js";import{a as Cr,t as wr}from"./cameras-BEBBV7mz.js";import{t as Tr}from"./CuiActionButton-CNTiGrTt.js";import{t as Er}from"./copy-16-filled-CZzRMAt_.js";import{n as Dr,t as Or}from"./useCuiCameraDrawer-2I0LB3ff.js";import{t as kr}from"./useCuiDialog-DZvxI8xi.js";import{n as Ar}from"./CuiTopbarSlot-DbzQRnbt.js";import{A as jr,M as Mr,P as Nr,j as Pr,k as Fr}from"./types-CztXMZ5X.js";import{t as Ir}from"./theme-B2fORWV9.js";import{t as Lr}from"./check-BMoCATAa.js";import{t as Rr}from"./trash2-CaXm_MmJ.js";import{t as zr}from"./notifications-Cq1bDRQk.js";import{n as Br,t as Vr}from"./microphone-CAVr4YFv.js";import{a as Hr,i as Ur,r as Wr,t as Gr}from"./CuiSchema-DEYDened.js";import{t as Kr}from"./plugins-BMys-WCs.js";import{t as qr}from"./PluginSchema-BcLXAX-Q.js";import{t as Jr}from"./information-outline-ChTb2u7w.js";import{t as Yr}from"./plus-Dqgz6pez.js";import{a as Xr,i as Zr,n as Qr,t as $r}from"./cameras.schema-CuVLJONJ.js";import{t as ei}from"./delete-5a2q7_46.js";import{t as ti}from"./useStreamStatus-Dy3K_ILd.js";import{t as ni}from"./home-Dey3bw1P.js";import{t as ri}from"./CuiDataTable-D9GqApg1.js";import{t as ii}from"./locale-hdhgxXOX.js";(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})(),re(localStorage),Le(),typeof window<`u`&&window.addEventListener(`pagehide`,Be);var ai={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function oi(e,t){return $(),U(`svg`,ai,[...t[0]||=[V(`path`,{fill:`currentColor`,d:`M17.81 4.47c-.08 0-.16-.02-.23-.06C15.66 3.42 14 3 12 3c-1.97 0-3.85.47-5.56 1.41c-.24.13-.54.04-.68-.2a.506.506 0 0 1 .2-.68C7.82 2.5 9.86 2 12 2s4 .47 6.04 1.5c.25.15.34.45.21.69a.48.48 0 0 1-.44.28M3.5 9.72c-.1 0-.2-.03-.29-.09a.517.517 0 0 1-.12-.7c.99-1.4 2.25-2.5 3.75-3.27C10 4.04 14 4.03 17.15 5.65c1.5.77 2.76 1.85 3.75 3.25c.16.22.1.54-.12.7c-.23.16-.54.11-.7-.1a9.26 9.26 0 0 0-3.39-2.96c-2.87-1.47-6.54-1.47-9.4.01c-1.36.7-2.5 1.7-3.4 2.95c-.08.15-.23.22-.39.22m6.25 12.07c-.13 0-.25-.05-.35-.15c-.87-.87-1.34-1.43-2.01-2.64c-.69-1.23-1.05-2.73-1.05-4.34c0-2.97 2.54-5.39 5.66-5.39s5.66 2.42 5.66 5.39a.5.5 0 0 1-.5.5a.5.5 0 0 1-.5-.5c0-2.42-2.09-4.39-4.66-4.39s-4.66 1.97-4.66 4.39c0 1.44.32 2.77.93 3.84c.64 1.16 1.08 1.65 1.85 2.43c.19.2.19.51 0 .71c-.12.1-.24.15-.37.15m7.17-1.85c-1.19 0-2.24-.3-3.1-.89c-1.49-1.01-2.38-2.65-2.38-4.39a.5.5 0 0 1 .5-.5a.5.5 0 0 1 .5.5c0 1.41.72 2.74 1.94 3.56c.71.48 1.54.71 2.54.71c.24 0 .64-.03 1.04-.1c.27-.05.54.13.58.41c.05.26-.13.53-.41.58c-.57.11-1.07.12-1.21.12M14.91 22h-.13c-1.59-.46-2.63-1.05-3.72-2.12a7.28 7.28 0 0 1-2.17-5.22c0-1.62 1.38-2.94 3.08-2.94s3.08 1.32 3.08 2.94c0 1.07.95 1.94 2.08 1.94c1.15 0 2.08-.87 2.08-1.94c0-3.77-3.25-6.83-7.25-6.83c-2.84 0-5.46 1.58-6.61 4.03c-.39.81-.59 1.76-.59 2.8c0 .78.07 2.01.67 3.61c.1.26-.03.55-.29.64a.504.504 0 0 1-.64-.29c-.5-1.31-.73-2.62-.73-3.96c0-1.2.23-2.29.68-3.24c1.33-2.79 4.28-4.6 7.51-4.6c4.54 0 8.25 3.51 8.25 7.83c0 1.62-1.38 2.94-3.08 2.94s-3.08-1.32-3.08-2.94c0-1.07-.93-1.94-2.08-1.94s-2.08.87-2.08 1.94c0 1.71.66 3.31 1.87 4.51c.95.94 1.86 1.46 3.27 1.84c.27.08.42.36.35.62c-.05.23-.26.38-.47.38`},null,-1)]])}var si=Y({name:`mdi-fingerprint`,render:oi}),ci=`cameraui:unlocked`;function li(){try{sessionStorage.setItem(ci,`1`)}catch{}}var ui=W(!1),di=W(!1);function fi(){return{isLocked:ui,isAvailable:di,unlock:pi,init:mi}}async function pi(){return ui.value=!1,li(),!0}async function mi(){}var hi={key:0,class:`app-lock-overlay`},gi={class:`flex flex-col items-center gap-6 p-8`},_i={class:`text-center`},vi={class:`text-lg font-semibold`},yi={class:`text-sm text-muted mt-2`},bi=hn(Z({__name:`CuiAppLockOverlay`,setup(e){let{isLocked:t,unlock:n}=fi(),r=W(!1);async function i(){r.value=!0;try{await n()}finally{r.value=!1}}return M(t,async e=>{e&&(await At(),await i())},{immediate:!0}),(e,n)=>{let a=mn,o=si,s=c;return R(t)?($(),U(`div`,hi,[V(`div`,gi,[Q(a,{class:`w-16 h-16 text-muted`}),V(`div`,_i,[V(`h2`,vi,F(e.$t(`views.app_lock.title`)),1),V(`p`,yi,F(e.$t(`views.app_lock.subtitle`)),1)]),Q(s,{label:e.$t(`views.app_lock.unlock`),loading:R(r),fluid:``,class:`cui-button-medium`,onClick:i},{icon:G(()=>[Q(o,{class:`mr-2`})]),_:1},8,[`label`,`loading`])])])):q(``,!0)}}}),[[`__scopeId`,`data-v-baef4383`]]),xi={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function Si(e,t){return $(),U(`svg`,xi,[...t[0]||=[V(`path`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`1.5`,d:`M6 20h12M12 4v12m0 0l3.5-3.5M12 16l-3.5-3.5`},null,-1)]])}var Ci=Y({name:`iconoir-download`,render:Si}),wi={class:`cui-update-indicator__content`},Ti={class:`cui-update-indicator__text`},Ei=hn(Z({__name:`CuiUpdateIndicator`,setup(e){let{t}=le(),{bottombarHeight:n}=gn(),{updateAvailable:r,isApplying:i,applyUpdate:a}=Tn(),{isLoggedIn:o}=Bt($e()),s=We(),l=J(()=>o.value&&r.value&&s.bannerMode.value===null),u=J(()=>`calc(${n.value}px + 1rem + env(safe-area-inset-bottom, 0px))`);function d(){a()}return(e,n)=>{let r=te,a=Ci,o=c;return $(),H(N,{name:`fade`},{default:G(()=>[R(l)?($(),U(`div`,{key:0,class:`cui-update-indicator shadow-xl`,style:z({bottom:R(u)})},[V(`div`,wi,[R(i)?($(),H(r,{key:0,class:`cui-update-indicator__spinner`,"stroke-width":`5`})):($(),H(a,{key:1,class:`cui-update-indicator__icon`})),V(`span`,Ti,F(R(i)?R(t)(`components.toast.update_applying`):R(t)(`components.toast.update_available_title`)),1),R(i)?q(``,!0):($(),H(o,{key:2,size:`small`,class:`cui-update-indicator__button`,label:R(t)(`components.toast.update_now`),onClick:d},null,8,[`label`]))])],4)):q(``,!0)]),_:1})}}}),[[`__scopeId`,`data-v-8ce1000d`]]),Di={class:`cui-connection-indicator__content`},Oi={class:`cui-connection-indicator__text`},ki=hn(Z({__name:`CuiConnectionIndicator`,setup(e){let{t}=le(),{bottombarHeight:n}=gn(),{bannerMode:r,inTrouble:i}=We(),a=et(),{isLoggedIn:o}=Bt($e()),s=J(()=>`calc(${n.value}px + 1rem + env(safe-area-inset-bottom, 0px))`),l=J(()=>o.value&&r.value!==null),u=J(()=>r.value===`connecting`?t(`connection.connecting_remote`):t(`connection.reconnecting`)),d=J(()=>i.value&&a===`cloud`);async function f(){let{bounceToCloudFrontend:e}=await bt(async()=>{let{bounceToCloudFrontend:e}=await import(`./cloudHandoff-Cnd7f4Es.js`);return{bounceToCloudFrontend:e}},__vite__mapDeps([0,1,2,3,4,5,6]));await e()}return(e,n)=>{let r=te,i=On,a=c;return $(),H(N,{name:`fade`},{default:G(()=>[R(l)?($(),U(`div`,{key:0,class:`cui-connection-indicator shadow-xl`,style:z({bottom:R(s)})},[V(`div`,Di,[Q(r,{class:`!w-5 !h-5 shrink-0`,"stroke-width":`5`}),V(`span`,Oi,F(R(u)),1),R(d)?($(),H(a,{key:0,size:`small`,rounded:``,class:`cui-connection-indicator__button`,"aria-label":R(t)(`connection.pick_server`),onClick:f},{default:G(()=>[Q(i,{class:`w-4 h-4`})]),_:1},8,[`aria-label`])):q(``,!0)])],4)):q(``,!0)]),_:1})}}}),[[`__scopeId`,`data-v-89935ae5`]]),Ai={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function ji(e,t){return $(),U(`svg`,Ai,[...t[0]||=[V(`path`,{fill:`currentColor`,d:`M5.41 7.41L10 12l-4.59 4.59L4 15.17L7.17 12L4 8.83zm13.18 9.18L14 12l4.59-4.58L20 8.83L16.83 12L20 15.17z`},null,-1)]])}var Mi=Y({name:`mdi-unfold-less-vertical`,render:ji}),Ni={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function Pi(e,t){return $(),U(`svg`,Ni,[...t[0]||=[V(`path`,{fill:`currentColor`,d:`M12 18.17L8.83 15l-1.41 1.41L12 21l4.59-4.59L15.17 15M12 5.83L15.17 9l1.41-1.41L12 3L7.41 7.59L8.83 9z`},null,-1)]])}var Fi=Y({name:`mdi-unfold-more-horizontal`,render:Pi}),Ii={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function Li(e,t){return $(),U(`svg`,Ii,[...t[0]||=[V(`path`,{fill:`currentColor`,d:`M19 13H5v-2h14z`},null,-1)]])}var Ri=Y({name:`mdi-minus`,render:Li}),zi={class:`fixed flex flex-row items-center z-[99999] top-0 left-[7px] gap-2 p-2 pl-[0.4rem]! non-draggable-region`},Bi=hn(Z({__name:`CuiWindowButtons`,setup(e){let{electron:t}=An(),n=W(!1),r=W(!1);function i(){r.value||t?.send(`change-window`,`minify`)}function a(){t?.send(`change-window`,`close`)}function o(){t?.send(`change-window`,`expand`)}function s(e,t){r.value=t}return pt(()=>{t?.on(`fullscreen`,s)}),gt(()=>{t?.removeListener(`fullscreen`,s)}),(e,t)=>{let s=kn,c=Ri,l=Fi,u=Mi;return Ft(($(),U(`div`,zi,[V(`div`,{class:`close-button`,onClick:a},[Q(s,{color:`#7f050a`,width:`100%`,height:`100%`,class:P([`transition-opacity opacity-0`,{"opacity-100":R(n)}])},null,8,[`class`])]),V(`div`,{class:P({"disabled-button":R(r),"minify-button":!R(r)}),onClick:i},[R(r)?q(``,!0):($(),H(c,{key:0,color:`#995712`,width:`100%`,height:`100%`,class:P([`transition-opacity opacity-0`,{"opacity-100":R(n)}])},null,8,[`class`]))],2),V(`div`,{class:`expand-button`,style:z(`${R(r)?`transform: rotate(45deg)`:`transform: rotate(-45deg)`}`),onClick:o},[R(r)?($(),H(u,{key:1,color:`#0d650d`,width:`100%`,height:`100%`,class:P([`transition-opacity opacity-0`,{"opacity-100":R(n)}])},null,8,[`class`])):($(),H(l,{key:0,color:`#0d650d`,width:`100%`,height:`100%`,class:P([`transition-opacity opacity-0`,{"opacity-100":R(n)}])},null,8,[`class`]))],4)])),[[R(Ut),e=>n.value=e]])}}}),[[`__scopeId`,`data-v-d1e31a06`]]),Vi={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function Hi(e,t){return $(),U(`svg`,Vi,[...t[0]||=[V(`path`,{fill:`currentColor`,d:`M7.41 15.41L12 10.83l4.59 4.58L18 14l-6-6l-6 6z`},null,-1)]])}var Ui=Y({name:`mdi-chevron-up`,render:Hi}),Wi={key:0,class:`shrink-0 relative left-[-9px]`},Gi={key:1,class:`shrink-0`},Ki={key:2,class:`shrink-0`},qi={key:0,class:`overflow-hidden flex-1 ml-10`},Ji={class:`flex flex-row items-center justify-between`},Yi={class:`text-start flex-1`},Xi={key:0,class:`text-xs text-muted`},Zi=hn(Z({__name:`CuiNavItem`,props:{label:{},to:{},expanded:{type:Boolean},description:{},icon:{},iconSize:{default:24},iconClass:{},labelClass:{},activeIcon:{},avatar:{},avatarSize:{default:24},showLogout:{type:Boolean},darkMode:{type:Boolean},buttonProps:{},showTooltip:{type:Boolean},fallbackActivePath:{},activeColor:{},activeIconColor:{},bottomBar:{type:Boolean}},setup(e){let t=e,n=zt(),r=$e(),{icon:i,iconSize:a,iconClass:o,activeIcon:s,avatarSize:l,avatar:u,labelClass:d,label:f,description:p,expanded:m,to:h,showLogout:g,darkMode:_,buttonProps:v,showTooltip:y,fallbackActivePath:b,activeColor:ee,activeIconColor:x,bottomBar:S}=Dt(t),C=J(()=>n.path===h.value||h.value!==`/`&&(n.path.startsWith(h.value+`/`)||n.path.startsWith((b.value??h.value)+`/`)));function te(){r.logout()}return(e,t)=>{let n=lr,r=cr,b=c,w=yt(`RouterLink`),T=Ln;return $(),H(w,{to:R(h)},{default:G(({isActive:e})=>[Ft(($(),H(b,lt({text:``,severity:`secondary`,class:[`cui-button navitem-button w-full h-full flex items-center relative`,{"dark-mode":R(_),"!text-white navitem-active":(e||R(C))&&!R(u),"hover:!text-color active:!text-color focus:!text-color":!e&&!R(C),"navitem-inactive":!e&&!R(C)}],style:R(ee)&&(e||R(C))?{"--navitem-active-color":R(ee)}:void 0,fluid:``},R(v)),{default:G(()=>[V(`div`,{class:P([`flex items-center justify-center h-full`,{"absolute left-[14px]":!R(S)}])},[R(u)?($(),U(`div`,Wi,[Q(n,{src:R(u),size:R(l),style:z({width:`${R(l)}px`,height:`${R(l)}px`})},null,8,[`src`,`size`,`style`])])):R(i)&&!e&&!R(C)||!R(s)?($(),U(`div`,Gi,[Q(R(i),{class:P(R(o)),style:z({width:`${R(a)}px`,height:`${R(a)}px`,color:(e||R(C))&&R(x)?R(x):void 0})},null,8,[`class`,`style`])])):R(s)&&(e||R(C))?($(),U(`div`,Ki,[Q(R(s),{style:z({width:`${R(a)}px`,height:`${R(a)}px`,color:R(x)})},null,8,[`style`])])):q(``,!0)],2),Q(N,{name:`fade`},{default:G(()=>[R(m)?($(),U(`div`,qi,[V(`div`,Ji,[V(`div`,Yi,[V(`div`,{class:P([`text-sm max-w-100 truncate font-semibold`,[R(d),{"text-color font-bold":R(u)}]])},F(R(f)),3),R(p)?($(),U(`div`,Xi,F(R(p)),1)):q(``,!0)]),R(g)?($(),H(b,{key:0,text:``,rounded:``,class:`dark-mode cui-icon-md`,onClick:wt(te,[`stop`,`prevent`])},{icon:G(()=>[Q(r,{width:`100%`,height:`100%`})]),_:1})):q(``,!0)])])):q(``,!0)]),_:1})]),_:2},1040,[`class`,`style`])),[[T,{value:R(y)&&!R(m)?R(f):``,pt:{root:{class:`dark-mode`}}}]])]),_:1},8,[`to`])}}}),[[`__scopeId`,`data-v-9e0c467b`]]),{isElectronApp:Qi}=An(),$i=Qi?25:0,ea={CLOSED:0,MINIFIED:60,EXPANDED:288},ta=kt({serverUpdateAvailable:!1,pluginUpdateAvailable:!1,serverUpdate:null,pluginUpdates:[]}),na=null,ra=null;async function ia(){if(ra?.ready.value)try{let e=await ra.request(`get-updates`);ta.pluginUpdates=e.plugins,ta.pluginUpdateAvailable=e.plugins.length>0,ta.serverUpdate=e.server,ta.serverUpdateAvailable=e.server.updateAvailable||e.server.betaUpdateAvailable||!1}catch{}}function aa(){return ra||(na=Tt(!0),na.run(()=>{let e=ot(`/server`);ra=e,e.on(`plugin-updates`,e=>{ta.pluginUpdates=e,ta.pluginUpdateAvailable=e.length>0}),e.on(`server-updates`,e=>{ta.serverUpdate=e,ta.serverUpdateAvailable=e.updateAvailable||e.betaUpdateAvailable||!1}),e.onReady(()=>{ia()})}),ra)}function oa(){function e(){aa()}function t(){}return{isConnected:J(()=>ra?.connected.value??!1),serverUpdateAvailable:J(()=>ta.serverUpdateAvailable),pluginUpdateAvailable:J(()=>ta.pluginUpdateAvailable),serverUpdate:J(()=>ta.serverUpdate),pluginUpdates:J(()=>ta.pluginUpdates),connect:e,disconnect:t,fetchUpdates:ia}}var sa={class:`h-full flex flex-col overflow-y-scroll`},ca={class:`w-full flex items-center shrink-0 h-[60px]`},la={class:`overflow-hidden w-full pr-4`},ua={key:0,class:`ml-2 w-full flex flex-row items-center`},da={class:`flex flex-col flex-1 my-4 px-1`},fa={class:`flex flex-col space-y-1`},pa={class:`flex flex-col space-y-1`},ma={class:`w-full h-[50px]`},ha={class:`flex items-center justify-center h-full absolute left-[14px]`},ga={key:0,class:`flex flex-col space-y-1 overflow-hidden`},_a={class:`w-full h-[50px] relative`},va=hn(Z({__name:`CuiNavbar`,setup(e,{expose:t}){let n=Vt(),{bus:r}=_n(),{mdBreakpoint:i,xlBreakpoint:a}=bn(),{navbarState:o}=gn(),{isElectronApp:s,electron:l}=An(),{user:u}=Bt($e()),{uiSettings:d}=Bt(xn()),p=oa(),{data:m}=new ur().apiInfoQuery(),h=St(`navbarRef`),g=W(`closed`),_=W(!1),v=W(!1),b=W(!1),ee=J(()=>m.value?.electron??!1),x=J(()=>s&&ee.value),S=J(()=>d.value.interface.selectedSettingsView),C=e=>ee.value&&!!e.meta?.disabledInElectron,te=J(()=>wn.filter(e=>e.meta?.navbar?.position===`top`&&e.meta&&vr(e)&&!C(e))),w=J(()=>wn.filter(e=>e.meta?.navbar?.position===`bottom`&&vr(e)&&!C(e))),T=J(()=>w.value.filter(e=>!e.meta?.navbar?.group)),ne=J(()=>w.value.filter(e=>e.meta?.navbar?.group===`more`)),re=J(()=>ne.value.some(e=>n.currentRoute.value.path===e.path||n.currentRoute.value.path.startsWith(e.path+`/`))),E=J(()=>d.value.interface.navbarStayCollapsed&&g.value!==`opened`?`closed`:a.value?`opened`:g.value),ie=J(()=>E.value===`closed`?i.value?ea.CLOSED:ea.MINIFIED:ea.EXPANDED);function ae(){b.value=!b.value,b.value?setTimeout(()=>{let e=h.value?.firstElementChild;e&&e.scrollTo({top:e.scrollHeight,behavior:`smooth`})},250):setTimeout(()=>O(),250)}function oe(){r.emit({navbarState:`closed`})}function se(e,t){x.value&&t.channel===`update-check`&&t.status===`available`&&(_.value=!0)}async function D(){if(x.value){l.removeListener(`app-status`,se),l.on(`app-status`,se),l.send(`check-for-updates`);try{_.value=(await l.invoke(`get-update-available`)).isUpdateAvailable}catch{}}}function O(){At(()=>{let e=h.value?.querySelector(`.navitem-active`);e&&e.scrollIntoView({block:`center`,behavior:`smooth`})})}let ce=Ee(O,100);return me(h,e=>{if(E.value!==`opened`)return;let t=e.target,n=t.closest(`#menu-icon`),r=t.closest(`#submenu-icon`),i=t.closest(`#navbar-icon`);!n&&!r&&!i&&oe()}),y(h,()=>{ce()}),M(re,e=>{e&&(b.value=!0)},{immediate:!0}),M(p.serverUpdateAvailable,e=>{x.value||(_.value=e)},{immediate:!0}),M(x,e=>{e&&D()},{immediate:!0}),M(p.pluginUpdateAvailable,e=>{v.value=e}),M(o,e=>{e&&e!==g.value&&(g.value=e===`minified`||e===`closed`?`closed`:`opened`)}),M(n.currentRoute,(e,t)=>{e.path!==t.path&&oe()}),M(u,()=>{u.value?.role===`admin`||u.value?.role===`master`?p.connect():p.disconnect()},{deep:!0,immediate:!0}),pt(()=>{O()}),vt(()=>{l?.removeListener(`app-status`,se)}),t({navbarState:E}),(e,t)=>{let n=yt(`RouterLink`),r=f,a=Zi,o=jn,s=Ui,l=c;return $(),U(`nav`,{ref_key:`navbarRef`,ref:h,class:P([`navbar-background fixed transition-[width,left] duration-200 overflow-x-hidden overflow-y-scroll shadow shadow-black/20 overflow-hidden border-[1px] border-base-color rounded-[15px] [clip-path:inset(0_round_15px)] before:content-[''] before:absolute before:top-0 before:left-0 before:right-0 before:h-[20px] before:blur-2xl before:opacity-70 before:bg-primary-500 before:-z-1`,{"shadow-xl":R(i)&&R(ie)===R(ea).EXPANDED}]),style:z({top:`calc(max(8px, env(safe-area-inset-top, 0px)) + ${R($i)}px)`,left:R(ie)===R(ea).CLOSED?`-2px`:`max(8px, env(safe-area-inset-left, 0px))`,width:`${R(ie)}px`,height:`calc(100dvh - max(8px, env(safe-area-inset-top, 0px)) - max(8px, env(safe-area-inset-bottom, 0px)) - ${R($i)}px)`,viewTransitionName:`cui-navbar`})},[V(`div`,sa,[V(`div`,ca,[Q(n,{to:`/home`,class:`pl-[13px]`},{default:G(()=>[Q(R(ft),{src:R(it)(`logo_animated.svg`),width:`32px`,height:`32px`,title:`camera.ui`,"aria-label":`camera.ui`,class:`hover:scale-105 active:scale-105 focus:scale-105 transition-all non-draggable-region`},null,8,[`src`])]),_:1}),V(`div`,la,[Q(N,{name:`fade`},{default:G(()=>[R(ie)===R(ea).EXPANDED?($(),U(`div`,ua,[Q(n,{to:`/home`,class:`text-white font-bold text-lg text-shadow`},{default:G(()=>[...t[0]||=[X(`camera.ui`,-1)]]),_:1})])):q(``,!0)]),_:1})])]),V(`div`,da,[V(`div`,fa,[($(!0),U(K,null,B(R(te),t=>($(),U(`div`,{key:t.name,class:`w-full h-[50px] relative`},[R(v)&&t.name===`Plugins`?($(),H(r,{key:0,class:`absolute min-w-[8px] w-[8px] h-[8px] left-[31px] top-[10px] z-1`})):q(``,!0),Q(a,{icon:t.meta.navbar.icon.default,"active-icon":t.meta.navbar.icon.active,to:t.path,label:e.$t(`navigation.${t.name.toLowerCase()}`),expanded:R(ie)===R(ea).EXPANDED,"dark-mode":``,"show-tooltip":``,"icon-size":22,"button-props":{style:{color:`#a4a4a4`}},class:P([`w-[50px] h-[50px]`,{"w-full":R(ie)===R(ea).EXPANDED}])},null,8,[`icon`,`active-icon`,`to`,`label`,`expanded`,`class`])]))),128))]),t[2]||=V(`div`,{class:`flex-1 mt-10`},null,-1),V(`div`,pa,[R(ne).length?($(),U(K,{key:0},[V(`div`,ma,[Q(l,{text:``,severity:`secondary`,class:P([`cui-button navitem-button w-full h-full flex items-center justify-center dark-mode`,{"!text-white navitem-active":R(b)||R(re),"hover:!text-color active:!text-color focus:!text-color navitem-inactive":!R(b)&&!R(re)}]),style:{color:`#a4a4a4`},onClick:ae},{default:G(()=>[V(`div`,ha,[R(b)?($(),H(o,{key:0,class:`w-[22px] h-[22px]`})):($(),H(s,{key:1,class:`w-[22px] h-[22px]`}))])]),_:1},8,[`class`])]),Q(N,{name:`navbar-group`},{default:G(()=>[R(b)?($(),U(`div`,ga,[($(!0),U(K,null,B(R(ne),t=>($(),U(`div`,{key:t.name,class:`w-full h-[50px] relative`},[Q(a,{icon:t.meta.navbar.icon.default,"active-icon":t.meta.navbar.icon.active,to:t.path,label:e.$t(`navigation.${t.name.toLowerCase()}`),expanded:R(ie)===R(ea).EXPANDED,"dark-mode":``,"show-tooltip":``,"icon-size":22,"button-props":{style:{color:`#a4a4a4`}},class:P([`w-[50px] h-[50px]`,{"w-full":R(ie)===R(ea).EXPANDED}])},null,8,[`icon`,`active-icon`,`to`,`label`,`expanded`,`class`])]))),128))])):q(``,!0)]),_:1})],64)):q(``,!0),($(!0),U(K,null,B(R(T),t=>($(),U(`div`,{key:t.name,class:`w-full h-[50px] relative`},[R(_)&&t.name===`Settings`?($(),H(r,{key:0,class:`absolute min-w-[8px] w-[8px] h-[8px] left-[31px] top-[10px] z-1`})):q(``,!0),Q(a,{icon:t.meta.navbar.icon.default,"active-icon":t.meta.navbar.icon.active,to:t.path===`/settings`?`/settings/${R(S)}`:t.path,"fallback-active-path":t.path,label:e.$t(`navigation.${t.name.toLowerCase()}`),expanded:R(ie)===R(ea).EXPANDED,"dark-mode":``,"show-tooltip":``,"icon-size":22,"button-props":{style:{color:`#a4a4a4`}},class:P([`w-[50px] h-[50px]`,{"w-full":R(ie)===R(ea).EXPANDED}])},null,8,[`icon`,`active-icon`,`to`,`fallback-active-path`,`label`,`expanded`,`class`])]))),128)),t[1]||=V(`div`,{class:`mb-4 mt-2`,style:{borderTop:`1px solid #313131`}},null,-1),V(`div`,_a,[Q(a,{avatar:`avatar`,label:R(u)?.username??`unknown`,description:R(u)?.role??`unknown`,expanded:R(ie)===R(ea).EXPANDED,"show-logout":``,to:`/settings/account`,"dark-mode":``,"avatar-size":38,class:P([`w-[50px] h-[50px]`,{"w-full":R(ie)===R(ea).EXPANDED}])},null,8,[`label`,`description`,`expanded`,`class`])])])])])],6)}}}),[[`__scopeId`,`data-v-6870cf26`]]),ya={class:`px-2 h-full flex items-center justify-around`,style:{paddingBottom:`calc(max(8px, env(safe-area-inset-bottom, 0px)))`}},ba=hn(Z({__name:`CuiBottombar`,setup(e,{expose:t}){let{bottombarHeight:n}=gn(),r=St(`bottombarRef`),i=J(()=>wn.filter(e=>e.meta?.bottombar&&e.meta.auth&&vr(e)));return t({bottombarRef:r}),(e,t)=>{let a=Zi;return $(),U(`nav`,{ref_key:`bottombarRef`,ref:r,class:`cui-bottombar bottombar-background fixed bottom-0 left-0 right-0 border-t-[1px] border-color bottombar-background`,style:z({height:`calc(${R(n)}px + env(safe-area-inset-bottom, 0px))`,viewTransitionName:`cui-bottombar`})},[V(`div`,ya,[($(!0),U(K,null,B(R(i),e=>($(),H(a,{key:e.name,icon:e.meta.bottombar.icon.default,"active-icon":e.meta.bottombar.icon.active,"active-icon-color":`var(--p-primary-color)`,to:e.path,label:``,expanded:!1,"icon-class":`text-color`,class:`w-[50px] h-[50px] transition-all duration-300`,"bottom-bar":``},null,8,[`icon`,`active-icon`,`to`]))),128))])],4)}}}),[[`__scopeId`,`data-v-b0d768aa`]]),xa={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function Sa(e,t){return $(),U(`svg`,xa,[...t[0]||=[V(`path`,{fill:`currentColor`,d:`M8.463 15.538Q7 14.075 7 12t1.463-3.537T12 7t3.538 1.463T17 12t-1.463 3.538T12 17t-3.537-1.463M2 13q-.425 0-.712-.288T1 12t.288-.712T2 11h2q.425 0 .713.288T5 12t-.288.713T4 13zm18 0q-.425 0-.712-.288T19 12t.288-.712T20 11h2q.425 0 .713.288T23 12t-.288.713T22 13zm-8.712-8.287Q11 4.425 11 4V2q0-.425.288-.712T12 1t.713.288T13 2v2q0 .425-.288.713T12 5t-.712-.288m0 18Q11 22.426 11 22v-2q0-.425.288-.712T12 19t.713.288T13 20v2q0 .425-.288.713T12 23t-.712-.288M5.65 7.05L4.575 6q-.3-.275-.288-.7t.288-.725q.3-.3.725-.3t.7.3L7.05 5.65q.275.3.275.7t-.275.7t-.687.288t-.713-.288M18 19.425l-1.05-1.075q-.275-.3-.275-.712t.275-.688q.275-.3.688-.287t.712.287L19.425 18q.3.275.288.7t-.288.725q-.3.3-.725.3t-.7-.3M16.95 7.05q-.3-.275-.288-.687t.288-.713L18 4.575q.275-.3.7-.288t.725.288q.3.3.3.725t-.3.7L18.35 7.05q-.3.275-.7.275t-.7-.275M4.575 19.425q-.3-.3-.3-.725t.3-.7l1.075-1.05q.3-.275.712-.275t.688.275q.3.275.288.688t-.288.712L6 19.425q-.275.3-.7.288t-.725-.288`},null,-1)]])}var Ca=Y({name:`material-symbols-light-mode-rounded`,render:Sa}),wa={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function Ta(e,t){return $(),U(`svg`,wa,[...t[0]||=[V(`path`,{fill:`currentColor`,d:`M12 21q-3.75 0-6.375-2.625T3 12t2.625-6.375T12 3q.35 0 .688.025t.662.075q-1.025.725-1.638 1.888T11.1 7.5q0 2.25 1.575 3.825T16.5 12.9q1.375 0 2.525-.613T20.9 10.65q.05.325.075.662T21 12q0 3.75-2.625 6.375T12 21`},null,-1)]])}var Ea=Y({name:`material-symbols-dark-mode`,render:Ta}),Da={viewBox:`0 0 48 48`,width:`1.2em`,height:`1.2em`},Oa=[`id`],ka=[`mask`];function Aa(e,t){return $(),U(`svg`,Da,[V(`defs`,null,[V(`mask`,{id:e.idMap.SVGh8KaKdEb},[...t[0]||=[V(`g`,{fill:`none`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-miterlimit":`10`,"stroke-width":`4`},[V(`path`,{fill:`#fff`,stroke:`#fff`,d:`m24.003 4l5.27 5.27h9.457v9.456l5.27 5.27l-5.27 5.278v9.456h-9.456L24.004 44l-5.278-5.27H9.27v-9.456L4 23.997l5.27-5.27V9.27h9.456z`}),V(`path`,{fill:`#000`,stroke:`#000`,d:`M27 17c0 8-5 9-10 9c0 4 6.5 8 12 4s2-13-2-13`})],-1)]],8,Oa)]),V(`path`,{fill:`currentColor`,d:`M0 0h48v48H0z`,mask:`url(#`+e.idMap.SVGh8KaKdEb+`)`},null,8,ka)])}var ja=Y({name:`icon-park-solid-dark-mode`,render:Aa,setup(){return{idMap:{SVGh8KaKdEb:`uicons-`+Math.random().toString(36).substr(2,10)}}}}),Ma=Z({__name:`CuiThemeSwitch`,setup(e){let t=Ir(),{theme:n,autoMode:r}=Bt(t);function i(){t.toggleTheme()}return(e,t)=>{let a=ja,o=Ea,s=Ca,l=c;return $(),H(l,{severity:`secondary`,text:``,class:`cui-button p-2 text-color`,onClick:i},{default:G(()=>[R(r)?($(),H(a,{key:0,class:`w-6 h-6`})):R(n)===`dark`?($(),H(o,{key:1,class:`w-6 h-6`})):R(n)===`light`?($(),H(s,{key:2,class:`w-6 h-6`})):q(``,!0)]),_:1})}}}),Na={class:`relative flex overflow-hidden items-center justify-center w-5 h-5`},Pa={class:`flex flex-col justify-between w-4 h-3 transform transition-all duration-100 origin-center overflow-hidden`},Fa=Z({__name:`CuiNavbarToggle`,setup(e){let{bus:t}=_n(),{navbarState:n}=gn(),{xlBreakpoint:r}=bn(),{uiSettings:i}=Bt(xn()),a=W(`closed`),o=J(()=>a.value===`opened`);function s(){t.emit({navbarState:a.value===`opened`?`closed`:`opened`})}return M(n,e=>{e&&e!==a.value&&(a.value=e===`minified`||e===`closed`?`closed`:`opened`)}),(e,t)=>{let n=c;return!R(r)||R(i).interface.navbarStayCollapsed?($(),H(n,{key:0,id:`menu-icon`,class:`cui-button relative group p-2 transition-colors duration-100`,severity:`secondary`,text:``,onClick:s},{default:G(()=>[V(`div`,Na,[V(`div`,Pa,[V(`div`,{class:P([`h-0.5 w-2 transform transition-all duration-100 origin-center`,{"w-4 rotate-45 translate-y-[5px]":R(o)}]),style:{backgroundColor:`var(--text-color)`}},null,2),V(`div`,{class:P([`h-0.5 w-4 rounded transform transition-all duration-100`,{"opacity-0":R(o)}]),style:{backgroundColor:`var(--text-color)`}},null,2),V(`div`,{class:P([`h-0.5 w-3 transform transition-all duration-100 origin-center`,{"w-4 -rotate-45 -translate-y-[5px]":R(o)}]),style:{backgroundColor:`var(--text-color)`}},null,2)])])]),_:1})):q(``,!0)}}}),Ia={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function La(e,t){return $(),U(`svg`,Ia,[...t[0]||=[V(`path`,{fill:`currentColor`,d:`M.41 13.41L6 19l1.41-1.42L1.83 12m20.41-6.42L11.66 16.17L7.5 12l-1.43 1.41L11.66 19l12-12M18 7l-1.41-1.42l-6.35 6.35l1.42 1.41z`},null,-1)]])}var Ra=Y({name:`mdi-check-all`,render:La}),za={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function Ba(e,t){return $(),U(`svg`,za,[...t[0]||=[V(`path`,{fill:`currentColor`,d:`M22.11 21.46L2.39 1.73L1.11 3l4.72 4.72A7 7 0 0 0 5 11v6l-2 2v1h15.11l2.73 2.73zM7 18v-7c0-.61.11-1.21.34-1.77L16.11 18zm3 3h4a2 2 0 0 1-2 2a2 2 0 0 1-2-2M8.29 5.09c.53-.34 1.11-.59 1.71-.8V4a2 2 0 0 1 2-2a2 2 0 0 1 2 2v.29c2.97.88 5 3.61 5 6.71v4.8l-2-2V11a5 5 0 0 0-5-5c-.78 0-1.55.2-2.24.56z`},null,-1)]])}var Va=Y({name:`mdi-bell-off-outline`,render:Ba}),Ha={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function Ua(e,t){return $(),U(`svg`,Ha,[...t[0]||=[V(`path`,{fill:`currentColor`,d:`M8.352 20.242A4.63 4.63 0 0 0 12 22a4.63 4.63 0 0 0 3.648-1.758a27.2 27.2 0 0 1-7.296 0M18.75 9v.704c0 .845.24 1.671.692 2.374l1.108 1.723c1.011 1.574.239 3.713-1.52 4.21a25.8 25.8 0 0 1-14.06 0c-1.759-.497-2.531-2.636-1.52-4.21l1.108-1.723a4.4 4.4 0 0 0 .693-2.374V9c0-3.866 3.022-7 6.749-7s6.75 3.134 6.75 7`},null,-1)]])}var Wa=Y({name:`solar-bell-bold`,render:Ua}),Ga=100,Ka=kt({notifications:[]}),qa=null,Ja=null;function Ya(){return Ja||(qa=Tt(!0),qa.run(()=>{let e=ot(`/notifications`);Ja=e,e.on(`notification`,e=>{if(e.tag){let t=Ka.notifications.findIndex(t=>t.tag===e.tag);t!==-1&&Ka.notifications.splice(t,1)}Ka.notifications.unshift(e),Ka.notifications.length>Ga&&(Ka.notifications.length=Ga),Xa(e)}),e.on(`history`,e=>{Ka.notifications=e}),e.onReady(()=>{Qa()}),M(()=>Ka.notifications.filter(e=>e.seenAt==null).length,e=>{Za(e)},{immediate:!0})}),Ja)}function Xa(e){let{isElectronApp:t,electron:n}=An();!t||!n||n.send(`show-notification`,{id:e.id,title:e.title,subtitle:e.subtitle,body:e.body,deepLink:e.deepLink,tag:e.tag,severity:e.severity})}async function Za(e){}async function Qa(){if(Ja?.ready.value)try{Ka.notifications=await Ja.request(`get-notifications`)}catch{}}function $a(){function e(){Ya()}function t(){}function n(e){let t=Ka.notifications.findIndex(t=>t.id===e.id);t!==-1&&Ka.notifications.splice(t,1),e.tag&&Ja?.emit(`remove-notification`,e.tag)}function r(){Ka.notifications.splice(0,Ka.notifications.length),Ja?.emit(`clear-notifications`)}function i(){let e=Date.now();for(let t of Ka.notifications)t.seenAt??=e;Ja?.emit(`mark-all-seen`)}function a(e){let t=Ka.notifications.find(t=>t.id===e.id);t&&t.seenAt==null&&(t.seenAt=Date.now()),Ja?.emit(`mark-seen`,e.id)}function o(e){Ka.notifications.find(t=>t.id===e.id)||Ka.notifications.unshift(e)}return{isConnected:J(()=>Ja?.connected.value??!1),notifications:J(()=>Ka.notifications),notificationCount:J(()=>Ka.notifications.length),unreadCount:J(()=>Ka.notifications.filter(e=>e.seenAt==null).length),connect:e,disconnect:t,fetchNotifications:Qa,removeNotification:n,clearNotifications:r,markAllSeen:i,markSeen:a,addLocalNotification:o}}function eo(){qa?.stop(),qa=null,Ja=null,Ka.notifications=[]}var to={key:0,class:`flex items-center justify-center py-8`},no={key:1,class:`flex flex-col items-center text-center gap-3 py-6 px-2`},ro={class:`text-sm font-semibold text-color`},io={class:`text-xs text-muted mt-1`},ao={class:`flex justify-between items-center mb-4 h-9`},oo={class:`flex items-center gap-2`},so={class:`text-base font-semibold`},co={class:`flex items-center gap-1`},lo={class:`overflow-y-auto`,style:{maxHeight:`234px`}},uo={class:`flex gap-3`},fo={class:`flex-1 min-w-0`},po={class:`flex justify-between items-center gap-2`},mo={class:`flex items-center gap-1.5 shrink-0`},ho={key:0,class:`w-2 h-2 rounded-full bg-primary-500`},go={class:`text-xs text-muted`},_o={class:`text-xs text-muted mt-1 text-left line-clamp-2 overflow-hidden`},vo={key:0,class:`text-center py-8 text-muted text-sm`},yo=Z({__name:`CuiNotificationMenu`,setup(e){let t=Vt(),n=kr(),{t:r}=le(),{isTouch:i}=vn(),{isElectronApp:a,electron:o}=An(),s=new zr,l=$a(),{data:u,isLoading:d}=s.getSettingsQuery(),p=St(`notificationsMenuRef`),m=W({}),h=J(()=>l.notifications.value),v=J(()=>l.unreadCount.value),y=J(()=>u.value?.enabled??!1),ee=J(()=>!d.value||u.value!==void 0);function x(e,[t]){if(!t.isIntersecting){m.value[e]?.resetFn(),m.value[e]?.stopFn(),delete m.value[e];return}if(m.value[e])return;let n=t.target;if(!n.parentElement)return;let r=me(n,()=>{m.value[e]&&m.value[e].resetFn()}),a,{direction:o,stop:s}=(i.value?He:g)(n,{threshold:10,disableTextSelect:!0,onSwipe(){for(let t in m.value)t!==e&&m.value[t]?.resetFn();o.value===`left`?m.value[e]={left:`-75px`,opacity:1,deleteOpacity:1,isSwiping:!0,resetFn(){this.left=`0`,this.opacity=1,this.deleteOpacity=0},stopFn:()=>{delete m.value[e],s(),r(),clearTimeout(a)}}:m.value[e]?.resetFn()},onSwipeEnd(){clearTimeout(a),a=setTimeout(()=>{m.value[e]&&(m.value[e].isSwiping=!1)},10)}})}function S(e){p.value?.toggle(e)}function C(){l.markAllSeen()}function w(e){l.markSeen(e)}function T(){p.value?.hide(),t.push({path:`/settings/notifications`})}function ne(e){let t=Date.now()-e,n=Math.floor(t/(1e3*60)),i=Math.floor(t/(1e3*60*60)),a=Math.floor(t/(1e3*60*60*24));return n<60?`${n}${r(`components.notification_menu.short_minutes`)}`:i<24?`${i}${r(`components.notification_menu.short_hours`)}`:a<7?`${a}${r(`components.notification_menu.short_days`)}`:a<30?`${Math.floor(a/7)}${r(`components.notification_menu.short_weeks`)}`:a<365?`${Math.floor(a/30)}${r(`components.notification_menu.short_months`)}`:`${Math.floor(a/365)}${r(`components.notification_menu.short_years`)}`}function re(e){let n=e.deepLink;p.value?.hide(),E(e),n&&t.push(n)}function E(e){e&&(m.value[e.id]?.stopFn(),l.removeNotification(e))}function ie(){for(let e in m.value)m.value[e]?.stopFn();l.clearNotifications()}function ae(e){switch(e){case _.Info:return`rgb(33, 150, 243)`;case _.Warn:return`rgb(251, 140, 0)`;case _.Error:case _.Critical:return`rgb(176, 0, 32)`;default:return`rgb(69, 69, 69)`}}function oe(e){if(m.value[e.id]?.isSwiping)return;let t=[e.subtitle,e.body].filter(Boolean).join(`
3
- `);n.openTextDialog({data:{title:e.title,contentText:t,confirmText:e?.deepLink?r(`components.form.button.go_to_message`):r(`components.form.button.mark_as_read`)},onConfirm:()=>re(e),onCancel:()=>E(e)})}function se(){for(let e in m.value)m.value[e]?.resetFn(),m.value[e]?.stopFn()}function D(){return{id:`electron-update`,title:`Update`,body:`New camera.ui app update available`,severity:_.Info,deepLink:`/settings/system`,tag:`electron-update`,createdAt:Date.now(),seenAt:null,source:{kind:`system`,id:`system.electron.update_available`}}}function O(e,t){a&&t.channel===`update-check`&&t.status===`available`&&l.addLocalNotification(D())}async function ce(){if(a){o.removeListener(`app-status`,O),o.on(`app-status`,O),o.send(`check-for-updates`);try{(await o.invoke(`get-update-available`)).isUpdateAvailable&&l.addLocalNotification(D())}catch{}}}return M(y,e=>{e?l.connect():eo()},{immediate:!0}),pt(()=>{a&&ce()}),vt(()=>{o?.removeListener(`app-status`,O)}),(e,t)=>{let n=Wa,r=f,i=c,a=te,o=Va,s=Ra,l=Rr,u=Lr,d=Un,g=b,_=Ln;return $(),U(`div`,null,[Q(i,{severity:`secondary`,text:``,class:`cui-button p-2 text-color`,onClick:S},{icon:G(()=>[Q(n,{class:`w-6 h-6`}),R(y)&&R(v)?($(),H(r,{key:0,class:`absolute min-w-[8px] w-[8px] h-[8px] right-[10px] top-[7px]`})):q(``,!0)]),_:1}),Q(g,{ref_key:`notificationsMenuRef`,ref:p,"append-to":`self`,class:`w-[20rem] shadow-lg cui-rounded-corner notification-menu isolate overscroll-contain non-draggable-region`,onHide:se},{default:G(()=>[R(ee)?R(y)?($(),U(K,{key:2},[V(`div`,ao,[V(`div`,oo,[V(`h3`,so,F(e.$t(`components.notification_menu.notifications`)),1),Q(r,{class:`rounded-full text-xs p-1`,value:R(h).length>99?`99+`:String(R(h).length)},null,8,[`value`])]),V(`div`,co,[R(v)?Ft(($(),H(i,{key:0,severity:`secondary`,text:``,rounded:``,class:`p-2 cui-icon-md`,onClick:C},{icon:G(()=>[Q(s,{width:`100%`,height:`100%`})]),_:1})),[[_,{value:e.$t(`components.notification_menu.mark_all_read`)},void 0,{left:!0}]]):q(``,!0),R(h).length?Ft(($(),H(i,{key:1,severity:`danger`,text:``,rounded:``,class:`p-2 cui-icon-md`,onClick:ie},{icon:G(()=>[Q(l,{width:`100%`,height:`100%`})]),_:1})),[[_,{value:e.$t(`components.notification_menu.clear_notifications`)},void 0,{left:!0}]]):q(``,!0)])]),V(`div`,lo,[($(!0),U(K,null,B(R(h),t=>($(),U(`div`,{key:t.id,class:`relative overflow-hidden`},[Ft(($(),U(`div`,{class:`relative transition-all duration-200`,style:z({left:R(m)[t.id]?.left||`0`,opacity:R(m)[t.id]?.opacity||1})},[Q(i,{severity:`secondary`,text:``,class:`cui-button p-2 block w-full`,onClick:e=>oe(t)},{default:G(()=>[V(`div`,uo,[V(`div`,{class:`w-2 h-2 rounded-full mt-2`,style:z({backgroundColor:ae(t.severity)})},null,4),V(`div`,fo,[V(`div`,po,[V(`h4`,{class:P([`text-sm truncate max-w-[200px]`,t.seenAt==null?`font-semibold text-color`:`font-medium text-muted`])},F(t.title),3),V(`div`,mo,[t.seenAt==null?($(),U(`span`,ho)):q(``,!0),V(`span`,go,F(ne(t.createdAt)),1)])]),V(`p`,_o,F(t.subtitle||t.body),1)])])]),_:2},1032,[`onClick`])],4)),[[R(Ht),e=>x(t.id,e)]]),V(`div`,{class:`absolute right-0 top-0 h-full flex items-center gap-1 pr-4`,style:z({opacity:R(m)[t.id]?.deleteOpacity||0,pointerEvents:(R(m)[t.id]?.deleteOpacity||0)>0?`auto`:`none`})},[t.seenAt==null?Ft(($(),H(i,{key:0,severity:`secondary`,class:`cui-icon-sm`,text:``,rounded:``,onClick:e=>w(t)},{icon:G(()=>[Q(u,{width:`100%`,height:`100%`})]),_:1},8,[`onClick`])),[[_,{value:e.$t(`components.notification_menu.mark_read`)},void 0,{left:!0}]]):q(``,!0),Ft(($(),H(i,{severity:`danger`,class:`cui-icon-sm`,text:``,rounded:``,onClick:e=>E(t)},{icon:G(()=>[Q(l,{width:`100%`,height:`100%`})]),_:1},8,[`onClick`])),[[_,{value:e.$t(`components.notification_menu.delete`)},void 0,{left:!0}]])],4),R(h).indexOf(t)===R(h).length-1?q(``,!0):($(),H(d,{key:0,class:`my-0 py-1`}))]))),128))]),R(h).length===0?($(),U(`div`,vo,F(e.$t(`components.notification_menu.no_notifications`)),1)):q(``,!0)],64)):($(),U(`div`,no,[Q(o,{class:`w-8 h-8 text-muted`}),V(`div`,null,[V(`h3`,ro,F(e.$t(`components.notification_menu.disabled`)),1),V(`p`,io,F(e.$t(`components.notification_menu.disabled_hint`)),1)]),Q(i,{class:`cui-button-small`,label:e.$t(`components.notification_menu.open_settings`),onClick:T},null,8,[`label`])])):($(),U(`div`,to,[Q(a,{class:`w-[30px] h-[30px] m-0`,"stroke-width":`5`})]))]),_:1},512)])}}}),bo={key:0},xo={class:`text-sm font-medium truncate max-w-40 pointer-events-none`},So=Z({__name:`CuiInstanceSwitcher`,setup(e){let{t}=le(),{smBreakpoint:n}=bn(),r=dr(),i={style:`background: color-mix(in srgb,var(--p-red-500),transparent 84%); color: var(--p-red-400);`},a=St(`menuRef`),o=kt({}),s=null,l=J(()=>{let e=r.activeInstance,n=!r.isHomeActive||r.redirectInfo,a={label:e.name,position:`header`,active:!0},s=r.favoriteInstances.filter(e=>e.id!==r.activeId).map(e=>{let t=o[e.id],n=e.hasCredentials&&t===`checking`,a=e.hasCredentials&&t===`offline`,s,c;return a&&(s=`Offline`,c=i),{label:e.name,badge:s,badgeProps:c,loading:n,disabled:n||a,onClick:()=>r.switchInstance(e.id)}}),c=n?[{label:t(`components.instance_switcher.go_back`),icon:En,position:`footer`,onClick:()=>{let e=r.redirectInfo;e?window.location.href=e.sourceUrl:r.switchInstance(null)}}]:[],l={label:t(`components.instance_switcher.manage`),icon:pr,position:`footer`,to:`/instances`};return[a,...s,...c,l]});function u(){s?.abort(),s=new AbortController;let{signal:e}=s,t=r.favoriteInstances.filter(e=>e.id!==r.activeId&&e.hasCredentials);for(let e of t)o[e.id]=`checking`;for(let n of t)r.probeInstance(n.id,e).then(t=>{e.aborted||(o[n.id]=t?`online`:`offline`)}).catch(()=>{e.aborted||(o[n.id]=`offline`)})}return(e,t)=>{let i=Cn,o=c,s=jn,d=Ui,f=br;return R(r).isMultiInstance?($(),U(`div`,bo,[R(n)?($(),H(o,{key:0,severity:`secondary`,text:``,class:`cui-button p-2 text-color non-draggable-region`,onClick:R(a)?.toggleMenu},{icon:G(()=>[Q(i,{class:`w-6 h-6`})]),_:1},8,[`onClick`])):($(),H(o,{key:1,severity:`secondary`,text:``,class:`cui-button p-2 text-color non-draggable-region`,onClick:R(a)?.toggleMenu},{default:G(()=>[Q(i,{class:`w-5 h-5 shrink-0 pointer-events-none`}),V(`span`,xo,F(R(r).activeInstance?.name??`Local`),1),R(a)?.isOpen?R(a)?.isOpen?($(),H(d,{key:1,class:`w-4 h-4 opacity-60 shrink-0 pointer-events-none`})):q(``,!0):($(),H(s,{key:0,class:`w-4 h-4 opacity-60 shrink-0 pointer-events-none`}))]),_:1},8,[`onClick`])),Q(f,{ref_key:`menuRef`,ref:a,items:R(l),popover:{appendTo:`body`,pt:{root:{class:`w-[18rem]`},content:{class:`p-0! rounded-xl! overflow-hidden!`}}},onShow:u,dividers:`sections`},null,8,[`items`])])):q(``,!0)}}}),Co={key:0,class:`flex flex-row items-center flex-1 p-2 gap-1`},wo={class:`flex-1 flex items-center justify-start min-w-0`},To={key:0,class:`cui-topbar-default font-semibold text-xl truncate`},Eo={class:`flex-1 flex items-center justify-end min-w-0`},Do={class:`cui-topbar-default`},Oo=hn(Z({__name:`CuiTopbar`,props:{offsetLeft:{},animate:{type:Boolean},background:{}},setup(e){let t=e,n=Vt(),{smBreakpoint:r}=bn(),{hasSlot:i,scrollToTop:a}=Ar(),{minifiedTopbar:o}=yn(),{topbarHeight:s}=gn(),{isElectronApp:c}=An(),{isMultiInstance:l}=Bt(dr()),{offsetLeft:u,animate:d}=Dt(t);return(e,t)=>{let f=So,p=yo,m=Fa,h=Ma;return $(),U(`header`,{class:P([`cui-topbar fixed flex flex-row items-center top-0 left-0 right-0 pt-safe pr-safe draggable-region`,{"!border-none":R(r)}]),style:z({height:`calc(${R(s)}px + env(safe-area-inset-top, 0px) + ${R(c)?`30px`:`0px`})`,viewTransitionName:`cui-topbar`,background:R(r)?`var(--ground-background)`:void 0,paddingTop:R(c)?`calc(30px + env(safe-area-inset-top, 0px))`:void 0})},[R(r)&&!R(o)?($(),U(`div`,Co,[V(`div`,wo,[!R(i)(`left`)&&(`hasPermission`in e?e.hasPermission:R(vr))(void 0,`admin`)&&R(n).currentRoute.value.name===`Home`&&R(l)?($(),H(f,{key:0,class:`cui-topbar-default non-draggable-region`})):q(``,!0),t[1]||=V(`div`,{id:`cui-topbar-left`,class:`cui-topbar-slot non-draggable-region`},null,-1)]),V(`div`,{class:`shrink-0 flex items-center justify-center min-w-0 cursor-pointer`,onClick:t[0]||=(...e)=>R(a)&&R(a)(...e)},[t[2]||=V(`div`,{id:`cui-topbar-center`,class:`cui-topbar-slot truncate non-draggable-region`},null,-1),R(i)(`center`)?q(``,!0):($(),U(`span`,To,F(e.$t(`views.${String(e.$route.name).toLowerCase()}.title`)),1))]),V(`div`,Eo,[t[3]||=V(`div`,{id:`cui-topbar-right`,class:`cui-topbar-slot non-draggable-region`},null,-1),V(`div`,Do,[Q(p,{class:`non-draggable-region`})])])])):R(o)?q(``,!0):($(),U(`div`,{key:1,class:`flex flex-row items-center flex-1 p-2`,style:z({"margin-left":`calc(${R(u)}px + max(8px, env(safe-area-inset-left, 0px)))`,transition:R(d)?`margin-left 200ms`:void 0})},[Q(m,{class:`non-draggable-region`}),(`hasPermission`in e?e.hasPermission:R(vr))(void 0,`admin`)&&R(l)?($(),H(f,{key:0,class:`non-draggable-region`})):q(``,!0),Q(h,{class:`ml-auto non-draggable-region`}),Q(p,{class:`non-draggable-region`})],4))],6)}}}),[[`__scopeId`,`data-v-20013c43`]]),ko={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function Ao(e,t){return $(),U(`svg`,ko,[...t[0]||=[V(`path`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`M10 4H6a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-4m-8-2l8-8m0 0v5m0-5h-5`},null,-1)]])}var jo=Y({name:`majesticons-open`,render:Ao}),Mo={class:`flex flex-col gap-2 w-full`},No={for:`sensorDisplayName`,class:`cui-label`},Po=Z({__name:`RenameSensor`,props:{currentDisplayName:{}},setup(e,{expose:t}){let n=W(e.currentDisplayName);return t({onConfirm:async()=>n.value.trim()||null}),(e,t)=>{let r=ke;return $(),U(`div`,Mo,[V(`label`,No,F(e.$t(`components.camera_options.sensor_display_name`)),1),Q(r,{id:`sensorDisplayName`,modelValue:R(n),"onUpdate:modelValue":t[0]||=e=>Mt(n)?n.value=e:null,class:`w-full`,autofocus:``},null,8,[`modelValue`])])}}}),Fo={class:`p-4 flex flex-col gap-2`},Io={class:`cui-label`},Lo={key:0,class:`flex flex-col gap-2`},Ro={class:`cui-label`},zo={class:`text-sm text-muted text-center min-h-[30px]`},Bo={class:`cui-label`},Vo={class:`cui-label`},Ho={key:0,class:`w-full flex items-center justify-center my-5`},Uo={key:1,class:`text-sm text-muted text-center`},Wo={key:1,class:`flex flex-col gap-2`},Go={class:`cui-label`},Ko={class:`text-sm text-muted text-center min-h-[30px]`},qo={class:`cui-label`},Jo={class:`cui-label`},Yo={key:0,class:`w-full flex items-center justify-center my-5`},Xo={key:1,class:`text-sm text-muted text-center`},Zo={key:2,class:`flex flex-col gap-2`},Qo={class:`cui-label`},$o={class:`text-sm text-muted text-center min-h-[30px]`},es={class:`cui-label`},ts={class:`cui-label`},ns={class:`cui-label`},rs={key:0,class:`w-full flex items-center justify-center my-5`},is={key:1,class:`text-sm text-muted text-center`},as={class:`cui-label`},os={key:2,class:`text-sm text-muted text-center min-h-[30px]`},ss={class:`cui-label`},cs={key:0,class:`w-full flex items-center justify-center my-5`},ls={key:1,class:`text-sm text-muted text-center`},us={key:3,class:`flex flex-col gap-2`},ds={class:`cui-label`},fs={class:`text-sm text-muted text-center min-h-[30px]`},ps={class:`cui-label`},ms={class:`cui-label`},hs={class:`cui-label`},gs={key:0,class:`w-full flex items-center justify-center my-5`},_s={key:1,class:`text-sm text-muted text-center`},vs={class:`cui-label`},ys={key:2,class:`text-sm text-muted text-center min-h-[30px]`},bs={class:`cui-label`},xs={key:0,class:`w-full flex items-center justify-center my-5`},Ss={key:1,class:`text-sm text-muted text-center`},Cs={key:4,class:`flex flex-col gap-2`},ws={class:`cui-label`},Ts={class:`text-sm text-muted text-center min-h-[30px]`},Es={class:`cui-label`},Ds={class:`cui-label`},Os={class:`cui-label`},ks={key:0,class:`w-full flex items-center justify-center my-5`},As={key:1,class:`text-sm text-muted text-center`},js={class:`cui-label`},Ms={key:2,class:`text-sm text-muted text-center min-h-[30px]`},Ns={class:`cui-label`},Ps={key:0,class:`w-full flex items-center justify-center my-5`},Fs={key:1,class:`text-sm text-muted text-center`},Is={key:5,class:`flex flex-col gap-2`},Ls={class:`cui-label`},Rs={key:0,class:`w-full flex items-center justify-center`},zs={key:1,class:`text-sm text-muted text-center`},Bs={key:1,class:`w-full h-full`},Vs={class:`cui-list-item`},Hs=Z({__name:`Plugins`,props:{camera:{},cameraDevice:{},loading:{type:Boolean},latestSnapshotSrc:{}},emits:[`close`],setup(e){let n=Mr(),r=Pr(),i=Fr(),a=new wr,o=new Kr,l=e,u=Ue(),d=kr(),{t:f}=le(),{camera:g,cameraDevice:_,loading:v}=Dt(l),{data:y}=o.getPluginsQuery({page:1,pageSize:-1}),{data:b,isBusy:ee,suspense:x}=a.getCameraExtensionsQuery(g.value.name),{data:S,isBusy:C}=o.getPluginsExtensionsQuery({page:1,pageSize:-1}),{mutateAsync:w,isPending:T}=a.enableCameraExtensionQuery(),{mutateAsync:ne,isPending:re}=a.disableCameraExtensionQuery(),{mutateAsync:E,isPending:ie}=a.activateCameraExtensionQuery(),{mutateAsync:ae,isPending:oe}=a.deactivateCameraExtensionQuery(),{sensors:se}=p(_),D=St(`schemaRef`),O=W(`hub`),ce=W([`hub`,`detection`,`core`,`accessories`,`more`]),k=W(``),ue=W(),de=W(),fe=W(),pe=W(),me=W(),he=W(),A=W(),ge=W(),j=W(),_e=W(),ye=J(()=>{if(!A.value)return``;let e=Ee.value.find(e=>e.id===A.value);return e?.pluginId&&ft(e.pluginId)||``}),be=J(()=>A.value&&Ee.value.find(e=>e.id===A.value)?.pluginId||``),xe=J(()=>b.value?.filter(e=>i.some(t=>e.contract.provides.includes(t)))||[]),Se=J(()=>{let e=new Set;for(let t of xe.value)for(let n of i)t.contract.provides.includes(n)&&e.add(n);return Array.from(e).sort((e,t)=>{let n=f(`components.camera_options.sensor_type_${e}`),r=f(`components.camera_options.sensor_type_${t}`);return n.localeCompare(r)})}),Ce=J(()=>{let e=he.value;return e?pt(b.value?.filter(t=>t.contract.provides.includes(e))||[]):[]}),we=J(()=>he.value?Nr(he.value):!1),Te=J(()=>{if(!he.value)return[];let e=jr(he.value),t=g.value.assignments[e],n=[];Array.isArray(t)?n=t.map(e=>e.name):t&&typeof t==`object`&&`name`in t&&(n=[t.name]);let r=Ce.value.map(e=>e.pluginName);return n.sort((e,t)=>r.indexOf(e)-r.indexOf(t))}),Ee=J(()=>se.value.filter(e=>e.type===he.value).sort((e,t)=>e.displayName.value.localeCompare(t.displayName.value))),De=h(_,k),Oe=De.config,ke=De.isLoading,Ae=s(_,A,be),je=Ae.config,Me=Ae.isLoading,Ne=J(()=>ee.value||C.value||T.value||re.value||ie.value||oe.value),Pe=J(()=>Ne.value||v.value||De.isLoading.value||Ae.isLoading.value||Ze.isLoading.value||et.isLoading.value||it.isLoading.value||st.isLoading.value||lt.isLoading.value),Fe=J(()=>(S.value?.result.filter(e=>ve(e.contract)&&e.pluginName===g.value.pluginInfo?.name)||[])[0]),Ie=J(()=>pt(b.value?.filter(e=>m(e.contract))||[])),Le=J(()=>Fe.value&&I(Fe.value.pluginName)?[Fe.value]:[]),Re=J(()=>b.value?.filter(e=>n.some(t=>e.contract.provides.includes(t)))||[]),ze=J(()=>{let e=new Set;for(let t of Re.value)for(let r of n)t.contract.provides.includes(r)&&e.add(r);return Array.from(e).sort((e,t)=>{let n=f(`components.camera_options.sensor_type_${e}`),r=f(`components.camera_options.sensor_type_${t}`);return n.localeCompare(r)})}),Be=J(()=>{let e=de.value;return e?pt(b.value?.filter(t=>t.contract.provides.includes(e))||[]):[]}),Ve=J(()=>se.value.filter(e=>e.type===de.value).sort((e,t)=>e.displayName.value.localeCompare(t.displayName.value))),He=J(()=>{if(!ge.value)return``;let e=Ve.value.find(e=>e.id===ge.value);return e?.pluginId&&ft(e.pluginId)||``}),We=J(()=>ge.value&&Ve.value.find(e=>e.id===ge.value)?.pluginId||``),Ge=J(()=>b.value?.filter(e=>r.some(t=>e.contract.provides.includes(t)))||[]),Ke=J(()=>{let e=new Set;for(let t of Ge.value)for(let n of r)t.contract.provides.includes(n)&&e.add(n);return Array.from(e).sort((e,t)=>{let n=f(`components.camera_options.sensor_type_${e}`),r=f(`components.camera_options.sensor_type_${t}`);return n.localeCompare(r)})}),qe=J(()=>{let e=pe.value;return e?pt(b.value?.filter(t=>t.contract.provides.includes(e))||[]):[]}),Je=J(()=>se.value.filter(e=>e.type===pe.value).sort((e,t)=>e.displayName.value.localeCompare(t.displayName.value))),Ye=J(()=>{if(!j.value)return``;let e=Je.value.find(e=>e.id===j.value);return e?.pluginId&&ft(e.pluginId)||``}),Xe=J(()=>j.value&&Je.value.find(e=>e.id===j.value)?.pluginId||``),Ze=h(_,J(()=>fe.value??``)),Qe=Ze.config,$e=Ze.isLoading,et=s(_,ge,We),nt=et.config,rt=et.isLoading,it=h(_,J(()=>me.value??``)),at=it.config,ot=it.isLoading,st=s(_,j,Xe),ct=st.config,N=st.isLoading,lt=h(_,J(()=>_e.value??``)),P=lt.config,ut=lt.isLoading,dt=J(()=>{let e=y.value?.result||[];return(S.value?.result||[]).filter(n=>{let r=e.find(e=>e.pluginName===n.pluginName),i=n.contract.provides.length>0,a=n.contract.consumes.length>0;return g.value.pluginInfo?.name===n.pluginName||ve(n.contract)&&!t(n.contract)?!1:r&&(i||a||m(n.contract))})});function ft(e){return g.value.plugins.find(t=>t.id===e)?.name}function I(e){let t=typeof e==`string`?e:e?.name;if(t&&y.value&&y.value.result.some(e=>e.pluginName===t&&!e.disabled))return t}function pt(e){return e.sort((e,t)=>!I(e.pluginName)&&I(t.pluginName)?1:I(e.pluginName)&&!I(t.pluginName)?-1:e.displayName.localeCompare(t.displayName))}function ht(e){let t=jr(e),n=g.value.assignments[t];return Array.isArray(n)?void 0:n}function gt(e){let t=jr(e),n=g.value.assignments[t];return Array.isArray(n)?void 0:n}async function _t(e){if(e!==void 0)k.value=e;else switch(O.value){case`cameraController`:k.value=I(Fe.value?.pluginName)||``;break;case`hub`:k.value=I(Ie.value[0]?.pluginName)||``;break;case`detection`:{let e=I(de.value?ht(de.value):void 0);k.value=e||``,fe.value=e||void 0;break}case`core`:{let e=I(pe.value?gt(pe.value):void 0);k.value=e||``,me.value=e||void 0;break}case`accessories`:k.value=``;break;default:k.value=``;break}k.value&&O.value!==`accessories`&&I(k.value)&&await De.getConfig()}function L(){switch(O.value){case`cameraController`:Le.value.length&&!k.value&&(k.value=Le.value[0].pluginName);break;case`hub`:Ie.value.length&&(ue.value=Ie.value.find(e=>I(e.pluginName))?.pluginName);break;case`detection`:{ze.value.length&&(!de.value||!ze.value.includes(de.value))&&(de.value=ze.value[0]);let e=de.value?ht(de.value):void 0;e&&I(e.name)?fe.value=e.name:fe.value=void 0,At(()=>{Ve.value.length&&!ge.value&&(ge.value=Ve.value[0].id)});break}case`core`:{Ke.value.length&&(!pe.value||!Ke.value.includes(pe.value))&&(pe.value=Ke.value[0]);let e=pe.value?gt(pe.value):void 0;e&&I(e.name)?me.value=e.name:me.value=void 0,At(()=>{Je.value.length&&!j.value&&(j.value=Je.value[0].id)});break}case`accessories`:Se.value.length&&(!he.value||!Se.value.includes(he.value))&&(he.value=Se.value[0]),At(()=>{Te.value.length&&!_e.value&&(_e.value=Te.value[0])}),At(()=>{Ee.value.length&&!A.value&&(A.value=Ee.value[0].id)});break}}async function vt(e){b.value&&(b.value.some(t=>t.pluginName===e.pluginName)?(await ae({cameraname:g.value.name,pluginname:e.pluginName}),D.value?.reset()):await E({cameraname:g.value.name,pluginname:e.pluginName}))}async function z(e){if(!he.value)return;let t=Te.value;if(we.value){let n=e,r=t[0];if(n===r)return;r&&(await ne({cameraname:g.value.name,pluginname:r,type:he.value}),A.value=void 0),n?(await w({cameraname:g.value.name,pluginname:n,type:he.value}),_e.value=n):_e.value=void 0;return}let n=e||[],r=n.filter(e=>!t.includes(e)),i=t.filter(e=>!n.includes(e));for(let e of r)await w({cameraname:g.value.name,pluginname:e,type:he.value});for(let e of i){if(await ne({cameraname:g.value.name,pluginname:e,type:he.value}),A.value){let t=Ee.value.find(e=>e.id===A.value);t&&ft(t.pluginId||``)===e&&(A.value=void 0)}_e.value===e&&(_e.value=void 0)}r.length&&!_e.value?_e.value=r[0]:n.length&&!_e.value&&(_e.value=n[0])}async function yt(e,t){try{await De.setValue(e.key,void 0),u.add({severity:`success`,detail:f(`components.toast.config_updated`),life:3e3})}catch(e){u.add({severity:`error`,detail:e,life:3e3})}}async function bt(e,t){try{let n=await De.submitValue(e.key,e.payload);if(n?.toast){let e=tt(n.toast.type);u.add({severity:e,detail:n.toast.message,life:3e3})}n?.schema&&n.schema.length&&d.openComponentDialog(qr,{data:{title:f(`components.dialog.title.config`),hideConfirmButton:!0,contentProps:{schemaConfig:{schema:n.schema,config:e.payload},pluginName:t,cameraName:g.value.name,buttonKey:e.key}}})}catch(e){u.add({severity:`error`,detail:e,life:3e3})}}async function xt(e,t){try{await De.setConfig(t),u.add({severity:`success`,detail:f(`components.toast.config_updated`),life:3e3})}catch(e){u.add({severity:`error`,detail:e,life:3e3})}}async function Ct(e){if(!(!We.value||!ge.value))try{await et.setValue(e.key,void 0),u.add({severity:`success`,detail:f(`components.toast.config_updated`),life:3e3})}catch(e){u.add({severity:`error`,detail:e,life:3e3})}}async function Tt(e){if(!(!We.value||!ge.value))try{let t=await et.submitValue(e.key,e.payload);if(t?.toast){let e=tt(t.toast.type);u.add({severity:e,detail:t.toast.message,life:3e3})}}catch(e){u.add({severity:`error`,detail:e,life:3e3})}}async function Et(e){if(!(!We.value||!ge.value))try{await et.setConfig(e),u.add({severity:`success`,detail:f(`components.toast.config_updated`),life:3e3})}catch(e){u.add({severity:`error`,detail:e,life:3e3})}}async function Ot(e){if(!(!Xe.value||!j.value))try{await st.setValue(e.key,void 0),u.add({severity:`success`,detail:f(`components.toast.config_updated`),life:3e3})}catch(e){u.add({severity:`error`,detail:e,life:3e3})}}async function kt(e){if(!(!Xe.value||!j.value))try{let t=await st.submitValue(e.key,e.payload);if(t?.toast){let e=tt(t.toast.type);u.add({severity:e,detail:t.toast.message,life:3e3})}}catch(e){u.add({severity:`error`,detail:e,life:3e3})}}async function jt(e){if(!(!Xe.value||!j.value))try{await st.setConfig(e),u.add({severity:`success`,detail:f(`components.toast.config_updated`),life:3e3})}catch(e){u.add({severity:`error`,detail:e,life:3e3})}}async function Nt(e){if(!(!be.value||!A.value))try{await Ae.setValue(e.key,void 0),u.add({severity:`success`,detail:f(`components.toast.config_updated`),life:3e3})}catch(e){u.add({severity:`error`,detail:e,life:3e3})}}async function Pt(e){if(!(!be.value||!A.value))try{let t=await Ae.submitValue(e.key,e.payload);if(t?.toast){let e=tt(t.toast.type);u.add({severity:e,detail:t.toast.message,life:3e3})}t?.schema&&t.schema.length&&d.openComponentDialog(qr,{data:{title:f(`components.dialog.title.config`),hideConfirmButton:!0,contentProps:{schemaConfig:{schema:t.schema,config:e.payload},pluginName:ye.value,cameraName:g.value.name,buttonKey:e.key,sensorId:A.value,pluginId:be.value}}})}catch(e){u.add({severity:`error`,detail:e,life:3e3})}}async function It(e){if(!(!be.value||!A.value))try{await Ae.setConfig(e),u.add({severity:`success`,detail:f(`components.toast.config_updated`),life:3e3})}catch(e){u.add({severity:`error`,detail:e,life:3e3})}}async function Y(e){fe.value&&await Ze.setValue(e.key,void 0)}async function Lt(e){if(fe.value)try{let t=await Ze.submitValue(e.key,e.payload);if(t?.toast){let e=tt(t.toast.type);u.add({severity:e,detail:t.toast.message,life:3e3})}t?.schema&&t.schema.length&&d.openComponentDialog(qr,{data:{title:f(`components.dialog.title.config`),hideConfirmButton:!0,contentProps:{schemaConfig:{schema:t.schema,config:e.payload},pluginName:fe.value,cameraName:g.value.name,buttonKey:e.key}}})}catch(e){u.add({severity:`error`,detail:e,life:3e3})}}async function Z(e){fe.value&&await Ze.setConfig(e)}async function Rt(e){me.value&&await it.setValue(e.key,void 0)}async function zt(e){if(me.value)try{let t=await it.submitValue(e.key,e.payload);if(t?.toast){let e=tt(t.toast.type);u.add({severity:e,detail:t.toast.message,life:3e3})}t?.schema&&t.schema.length&&d.openComponentDialog(qr,{data:{title:f(`components.dialog.title.config`),hideConfirmButton:!0,contentProps:{schemaConfig:{schema:t.schema,config:e.payload},pluginName:me.value,cameraName:g.value.name,buttonKey:e.key}}})}catch(e){u.add({severity:`error`,detail:e,life:3e3})}}async function Bt(e){me.value&&await it.setConfig(e)}async function Vt(e){_e.value&&await lt.setValue(e.key,void 0)}async function Ht(e){if(_e.value)try{let t=await lt.submitValue(e.key,e.payload);if(t?.toast){let e=tt(t.toast.type);u.add({severity:e,detail:t.toast.message,life:3e3})}t?.schema&&t.schema.length&&d.openComponentDialog(qr,{data:{title:f(`components.dialog.title.config`),hideConfirmButton:!0,contentProps:{schemaConfig:{schema:t.schema,config:e.payload},pluginName:_e.value,cameraName:g.value.name,buttonKey:e.key}}})}catch(e){u.add({severity:`error`,detail:e,life:3e3})}}async function Ut(e){_e.value&&await lt.setConfig(e)}function Wt(e){e&&d.openComponentDialog(Po,{data:{title:f(`components.camera_options.sensor_display_name`),confirmText:f(`components.form.button.save`),contentProps:{currentDisplayName:e.displayName.value}},onConfirm:async t=>{t&&t!==e.displayName.value&&await e.setDisplayName(t)}})}return M(O,()=>{At(()=>{L(),_t()})},{immediate:!0}),M([Ie,y],async([e,t])=>{if(O.value===`hub`&&e.length&&t?.result&&!ue.value){let t=e.find(e=>I(e.pluginName));t&&(ue.value=t.pluginName,k.value=t.pluginName,await De.getConfig())}},{immediate:!0}),M([Le,()=>O.value],async([e,t])=>{t===`cameraController`&&e.length&&!k.value&&(k.value=e[0].pluginName,await De.getConfig())},{immediate:!0}),M(()=>k.value,async(e,t)=>{O.value===`cameraController`&&e&&e!==t&&await De.getConfig()}),M(ue,async(e,t)=>{e&&e!==t&&I(e)&&(k.value=e,await De.getConfig())}),M(de,()=>{if(ge.value=void 0,de.value){let e=ht(de.value);e&&I(e.name)?fe.value=e.name:fe.value=void 0}else fe.value=void 0;_t(),At(()=>{Ve.value.length&&(ge.value=Ve.value[0].id)})}),M(fe,async(e,t)=>{if(e!==t&&de.value){let n=ht(de.value);!e&&t?(await ne({cameraname:g.value.name,pluginname:t,type:de.value}),D.value?.reset(),ge.value=void 0):e&&(n?.name!==e&&await w({cameraname:g.value.name,pluginname:e,type:de.value}),await Ze.getConfig()),At(()=>_t(e)),At(()=>{Ve.value.length&&(ge.value=Ve.value[0].id)})}}),M(pe,()=>{if(j.value=void 0,pe.value){let e=gt(pe.value);e&&I(e.name)?me.value=e.name:me.value=void 0}else me.value=void 0;_t(),At(()=>{Je.value.length&&(j.value=Je.value[0].id)})}),M(me,async(e,t)=>{if(e!==t&&pe.value){let n=gt(pe.value);!e&&t?(await ne({cameraname:g.value.name,pluginname:t,type:pe.value}),D.value?.reset(),j.value=void 0):e&&(n?.name!==e&&await w({cameraname:g.value.name,pluginname:e,type:pe.value}),await it.getConfig()),At(()=>_t(e)),At(()=>{Je.value.length&&(j.value=Je.value[0].id)})}}),M([ge,We],async([e,t])=>{e&&t&&await et.getConfig()}),M([j,Xe],async([e,t])=>{e&&t&&await st.getConfig()}),M(he,()=>{A.value=void 0,Te.value.length?_e.value=Te.value[0]:_e.value=void 0,Ee.value.length&&(A.value=Ee.value[0].id)}),M(_e,async e=>{e&&await lt.getConfig()}),M(A,async e=>{e&&be.value&&await Ae.getConfig()}),M(Le,e=>{let t=ce.value.indexOf(`cameraController`)!==-1;e.length&&!t?(ce.value.unshift(`cameraController`),(!O.value||O.value===`hub`)&&(O.value=`cameraController`,e.length&&!k.value&&(k.value=e[0].pluginName))):!e.length&&t&&(ce.value=ce.value.filter(e=>e!==`cameraController`),O.value===`cameraController`&&(O.value=`hub`))},{immediate:!0}),mt(async()=>{await x(),L(),_t()}),(e,t)=>{let n=Ur,r=Hr,i=Un,a=te,o=Br,s=c,l=Rn,u=yr,d=jo,f=Ln;return $(),U(`div`,Fo,[V(`span`,Io,F(e.$t(`components.camera_options.categories`)),1),Q(r,{modelValue:R(O),"onUpdate:modelValue":[t[0]||=e=>Mt(O)?O.value=e:null,t[1]||=e=>_t()],disabled:R(Ne),mandatory:``},{default:G(()=>[($(!0),U(K,null,B(R(ce),t=>($(),H(n,{key:t,size:`small`,disabled:R(Pe),value:t},{default:G(()=>[X(F(e.$t(`components.camera_options.chip_${t}`)),1)]),_:2},1032,[`disabled`,`value`]))),128))]),_:1},8,[`modelValue`,`disabled`]),Q(i,{class:`m-0 py-3`}),R(O)===`cameraController`?($(),U(`div`,Lo,[R(Le).length?($(),U(K,{key:1},[V(`span`,Bo,F(e.$t(`components.camera_options.chip_plugins`)),1),Q(r,{modelValue:R(k),"onUpdate:modelValue":t[2]||=e=>Mt(k)?k.value=e:null,disabled:R(Ne),mandatory:``,class:`min-h-[30px]`},{default:G(()=>[($(!0),U(K,null,B(R(Le),e=>($(),H(n,{key:e.pluginName,size:`small`,disabled:!I(e.pluginName)||R(Pe),value:e.pluginName},{default:G(()=>[X(F(e.displayName),1)]),_:2},1032,[`disabled`,`value`]))),128))]),_:1},8,[`modelValue`,`disabled`]),Q(i,{class:`m-0 py-3`}),V(`span`,Vo,F(e.$t(`components.camera_options.plugin_settings`)),1),!R(k)||!R(Oe)?.schema?.length?($(),U(`div`,Ho,[R(ke)?($(),H(a,{key:0,class:`w-[30px] h-[30px] m-0`,"stroke-width":`5`})):($(),U(`span`,Uo,F(e.$t(`components.camera_options.no_config`)),1))])):($(),H(Gr,{ref_key:`schemaRef`,ref:D,key:R(k),"schema-form":{schema:R(Oe).schema,config:R(Oe).config},loading:R(Pe),onOnFormSubmit:t[3]||=e=>xt(R(k),e),onOnSubmit:t[4]||=e=>bt(e,R(k)),onOnAction:t[5]||=e=>yt(e,R(k))},null,8,[`schema-form`,`loading`]))],64)):($(),U(K,{key:0},[V(`span`,Ro,F(e.$t(`components.camera_options.chip_plugins`)),1),V(`span`,zo,F(e.$t(`components.camera_options.no_plugins_enabled`)),1)],64))])):R(O)===`hub`?($(),U(`div`,Wo,[R(Ie).length?($(),U(K,{key:1},[V(`span`,qo,F(e.$t(`components.camera_options.chip_plugins`)),1),Q(r,{modelValue:R(ue),"onUpdate:modelValue":t[6]||=e=>Mt(ue)?ue.value=e:null,disabled:R(Ne),mandatory:``,class:`min-h-[30px]`},{default:G(()=>[($(!0),U(K,null,B(R(Ie),e=>($(),H(n,{key:e.pluginName,size:`small`,disabled:!I(e.pluginName)||R(Pe),value:e.pluginName},{default:G(()=>[X(F(e.displayName),1)]),_:2},1032,[`disabled`,`value`]))),128))]),_:1},8,[`modelValue`,`disabled`]),Q(i,{class:`m-0 py-3`}),V(`span`,Jo,F(e.$t(`components.camera_options.plugin_settings`)),1),!R(k)||!R(Oe)?.schema?.length?($(),U(`div`,Yo,[R(ke)?($(),H(a,{key:0,class:`w-[30px] h-[30px] m-0`,"stroke-width":`5`})):($(),U(`span`,Xo,F(e.$t(`components.camera_options.no_config`)),1))])):($(),H(Gr,{ref_key:`schemaRef`,ref:D,key:R(k),"schema-form":{schema:R(Oe).schema,config:R(Oe).config},loading:R(Pe),onOnFormSubmit:t[7]||=e=>xt(R(k),e),onOnSubmit:t[8]||=e=>bt(e,R(k)),onOnAction:t[9]||=e=>yt(e,R(k))},null,8,[`schema-form`,`loading`]))],64)):($(),U(K,{key:0},[V(`span`,Go,F(e.$t(`components.camera_options.chip_plugins`)),1),V(`span`,Ko,F(e.$t(`components.camera_options.no_plugins_enabled`)),1)],64))])):R(O)===`detection`?($(),U(`div`,Zo,[R(ze).length?($(),U(K,{key:1},[V(`span`,es,F(e.$t(`components.camera_options.sensor_types`)),1),Q(r,{modelValue:R(de),"onUpdate:modelValue":t[10]||=e=>Mt(de)?de.value=e:null,disabled:R(Ne),mandatory:``,class:`min-h-[30px]`},{default:G(()=>[($(!0),U(K,null,B(R(ze),t=>($(),H(n,{key:t,size:`small`,disabled:R(Pe),value:t},{default:G(()=>[X(F(e.$t(`components.camera_options.sensor_type_${t}`)),1)]),_:2},1032,[`disabled`,`value`]))),128))]),_:1},8,[`modelValue`,`disabled`]),R(Be).length?($(),U(K,{key:0},[Q(i,{class:`m-0 py-3`}),V(`span`,ts,F(e.$t(`components.camera_options.chip_plugins`)),1),Q(r,{modelValue:R(fe),"onUpdate:modelValue":t[11]||=e=>Mt(fe)?fe.value=e:null,disabled:R(Ne),class:`min-h-[30px]`},{default:G(()=>[($(!0),U(K,null,B(R(Be),e=>($(),H(n,{key:e.pluginName,size:`small`,filter:``,disabled:!I(e.pluginName)||R(Pe),value:e.pluginName},{default:G(()=>[X(F(e.displayName),1)]),_:2},1032,[`disabled`,`value`]))),128))]),_:1},8,[`modelValue`,`disabled`]),R(fe)&&R(fe)!==R(g).pluginInfo?.name?($(),U(K,{key:0},[Q(i,{class:`m-0 py-3`}),V(`span`,ns,F(e.$t(`components.camera_options.plugin_settings`)),1),R(Qe)?.schema?.length?($(),H(Gr,{key:`detection-plugin-${R(fe)}`,"schema-form":{schema:R(Qe).schema,config:R(Qe).config},loading:R(Pe),onOnFormSubmit:t[12]||=e=>Z(e),onOnSubmit:t[13]||=e=>Lt(e),onOnAction:t[14]||=e=>Y(e)},null,8,[`schema-form`,`loading`])):($(),U(`div`,rs,[R($e)?($(),H(a,{key:0,class:`w-[30px] h-[30px] m-0`,"stroke-width":`5`})):($(),U(`span`,is,F(e.$t(`components.camera_options.no_config`)),1))]))],64)):q(``,!0),Q(i,{class:`m-0 py-3`}),V(`span`,as,F(e.$t(`components.camera_options.sensors`)),1),R(Ve).length?($(),H(r,{key:1,modelValue:R(ge),"onUpdate:modelValue":t[15]||=e=>Mt(ge)?ge.value=e:null,disabled:R(Ne),mandatory:``,class:`min-h-[30px]`},{default:G(()=>[($(!0),U(K,null,B(R(Ve),e=>($(),H(n,{key:e.id,size:`small`,disabled:R(Pe),value:e.id},{append:G(()=>[Q(s,{text:R(A)!==e.id,rounded:``,severity:R(A)===e.id?`primary`:`secondary`,class:`cui-icon-sm text-white`,onClick:wt(t=>Wt(e),[`stop`])},{icon:G(()=>[Q(o,{width:`100%`,height:`100%`})]),_:1},8,[`text`,`severity`,`onClick`])]),default:G(()=>[X(F(e.displayName.value)+` `,1)]),_:2},1032,[`disabled`,`value`]))),128))]),_:1},8,[`modelValue`,`disabled`])):($(),U(`span`,os,F(e.$t(`components.camera_options.no_sensors`)),1)),R(ge)?($(),U(K,{key:3},[Q(i,{class:`m-0 py-3`}),V(`span`,ss,F(e.$t(`components.camera_options.sensor_settings`)),1),!R(He)||!R(nt)?.schema?.length?($(),U(`div`,cs,[R(rt)?($(),H(a,{key:0,class:`w-[30px] h-[30px] m-0`,"stroke-width":`5`})):($(),U(`span`,ls,F(e.$t(`components.camera_options.no_config`)),1))])):($(),H(Gr,{key:`sensor-${R(ge)}`,"schema-form":{schema:R(nt).schema,config:R(nt).config},loading:R(Pe),onOnFormSubmit:t[16]||=e=>Et(e),onOnSubmit:t[17]||=e=>Tt(e),onOnAction:t[18]||=e=>Ct(e)},null,8,[`schema-form`,`loading`]))],64)):q(``,!0)],64)):q(``,!0)],64)):($(),U(K,{key:0},[V(`span`,Qo,F(e.$t(`components.camera_options.sensor_types`)),1),V(`span`,$o,F(e.$t(`components.camera_options.no_plugins_enabled`)),1)],64))])):R(O)===`core`?($(),U(`div`,us,[R(Ke).length?($(),U(K,{key:1},[V(`span`,ps,F(e.$t(`components.camera_options.sensor_types`)),1),Q(r,{modelValue:R(pe),"onUpdate:modelValue":t[19]||=e=>Mt(pe)?pe.value=e:null,disabled:R(Ne),mandatory:``,class:`min-h-[30px]`},{default:G(()=>[($(!0),U(K,null,B(R(Ke),t=>($(),H(n,{key:t,size:`small`,disabled:R(Pe),value:t},{default:G(()=>[X(F(e.$t(`components.camera_options.sensor_type_${t}`)),1)]),_:2},1032,[`disabled`,`value`]))),128))]),_:1},8,[`modelValue`,`disabled`]),R(qe).length?($(),U(K,{key:0},[Q(i,{class:`m-0 py-3`}),V(`span`,ms,F(e.$t(`components.camera_options.chip_plugins`)),1),Q(r,{modelValue:R(me),"onUpdate:modelValue":t[20]||=e=>Mt(me)?me.value=e:null,disabled:R(Ne),class:`min-h-[30px]`},{default:G(()=>[($(!0),U(K,null,B(R(qe),e=>($(),H(n,{key:e.pluginName,size:`small`,filter:``,disabled:!I(e.pluginName)||R(Pe),value:e.pluginName},{default:G(()=>[X(F(e.displayName),1)]),_:2},1032,[`disabled`,`value`]))),128))]),_:1},8,[`modelValue`,`disabled`]),R(me)&&R(me)!==R(g).pluginInfo?.name?($(),U(K,{key:0},[Q(i,{class:`m-0 py-3`}),V(`span`,hs,F(e.$t(`components.camera_options.plugin_settings`)),1),R(at)?.schema?.length?($(),H(Gr,{key:`core-plugin-${R(me)}`,"schema-form":{schema:R(at).schema,config:R(at).config},loading:R(Pe),onOnFormSubmit:t[21]||=e=>Bt(e),onOnSubmit:t[22]||=e=>zt(e),onOnAction:t[23]||=e=>Rt(e)},null,8,[`schema-form`,`loading`])):($(),U(`div`,gs,[R(ot)?($(),H(a,{key:0,class:`w-[30px] h-[30px] m-0`,"stroke-width":`5`})):($(),U(`span`,_s,F(e.$t(`components.camera_options.no_config`)),1))]))],64)):q(``,!0),Q(i,{class:`m-0 py-3`}),V(`span`,vs,F(e.$t(`components.camera_options.sensors`)),1),R(Je).length?($(),H(r,{key:1,modelValue:R(j),"onUpdate:modelValue":t[24]||=e=>Mt(j)?j.value=e:null,disabled:R(Ne),mandatory:``,class:`min-h-[30px]`},{default:G(()=>[($(!0),U(K,null,B(R(Je),e=>($(),H(n,{key:e.id,size:`small`,disabled:R(Pe),value:e.id},{append:G(()=>[Q(s,{text:R(A)!==e.id,rounded:``,severity:R(A)===e.id?`primary`:`secondary`,class:`cui-icon-sm text-white`,onClick:wt(t=>Wt(e),[`stop`])},{icon:G(()=>[Q(o,{width:`100%`,height:`100%`})]),_:1},8,[`text`,`severity`,`onClick`])]),default:G(()=>[X(F(e.displayName.value)+` `,1)]),_:2},1032,[`disabled`,`value`]))),128))]),_:1},8,[`modelValue`,`disabled`])):($(),U(`span`,ys,F(e.$t(`components.camera_options.no_sensors`)),1)),R(j)?($(),U(K,{key:3},[Q(i,{class:`m-0 py-3`}),V(`span`,bs,F(e.$t(`components.camera_options.sensor_settings`)),1),!R(Ye)||!R(ct)?.schema?.length?($(),U(`div`,xs,[R(N)?($(),H(a,{key:0,class:`w-[30px] h-[30px] m-0`,"stroke-width":`5`})):($(),U(`span`,Ss,F(e.$t(`components.camera_options.no_config`)),1))])):($(),H(Gr,{key:`sensor-${R(j)}`,"schema-form":{schema:R(ct).schema,config:R(ct).config},loading:R(Pe),onOnFormSubmit:t[25]||=e=>jt(e),onOnSubmit:t[26]||=e=>kt(e),onOnAction:t[27]||=e=>Ot(e)},null,8,[`schema-form`,`loading`]))],64)):q(``,!0)],64)):q(``,!0)],64)):($(),U(K,{key:0},[V(`span`,ds,F(e.$t(`components.camera_options.sensor_types`)),1),V(`span`,fs,F(e.$t(`components.camera_options.no_plugins_enabled`)),1)],64))])):R(O)===`accessories`?($(),U(`div`,Cs,[R(Se).length?($(),U(K,{key:1},[V(`span`,Es,F(e.$t(`components.camera_options.sensor_types`)),1),Q(r,{modelValue:R(he),"onUpdate:modelValue":t[28]||=e=>Mt(he)?he.value=e:null,disabled:R(Ne),mandatory:``,class:`min-h-[30px]`},{default:G(()=>[($(!0),U(K,null,B(R(Se),t=>($(),H(n,{key:t,size:`small`,disabled:R(Pe),value:t},{default:G(()=>[X(F(e.$t(`components.camera_options.sensor_type_${t}`)),1)]),_:2},1032,[`disabled`,`value`]))),128))]),_:1},8,[`modelValue`,`disabled`]),R(Ce).length?($(),U(K,{key:0},[Q(i,{class:`m-0 py-3`}),V(`span`,Ds,F(e.$t(`components.camera_options.chip_plugins`)),1),Q(r,{"model-value":R(we)?R(Te)[0]:R(Te),disabled:R(Ne),multiple:!R(we),class:`min-h-[30px]`,"onUpdate:modelValue":z},{default:G(()=>[($(!0),U(K,null,B(R(Ce),e=>($(),H(n,{key:e.pluginName,size:`small`,filter:``,disabled:!I(e.pluginName)||R(Pe),value:e.pluginName},{default:G(()=>[X(F(e.displayName),1)]),_:2},1032,[`disabled`,`value`]))),128))]),_:1},8,[`model-value`,`disabled`,`multiple`]),R(_e)&&R(_e)!==R(g).pluginInfo?.name?($(),U(K,{key:0},[Q(i,{class:`m-0 py-3`}),V(`span`,Os,F(e.$t(`components.camera_options.plugin_settings`)),1),R(P)?.schema?.length?($(),H(Gr,{key:`accessory-plugin-${R(_e)}`,"schema-form":{schema:R(P).schema,config:R(P).config},loading:R(Pe),onOnFormSubmit:t[29]||=e=>Ut(e),onOnSubmit:t[30]||=e=>Ht(e),onOnAction:t[31]||=e=>Vt(e)},null,8,[`schema-form`,`loading`])):($(),U(`div`,ks,[R(ut)?($(),H(a,{key:0,class:`w-[30px] h-[30px] m-0`,"stroke-width":`5`})):($(),U(`span`,As,F(e.$t(`components.camera_options.no_config`)),1))]))],64)):q(``,!0)],64)):q(``,!0),Q(i,{class:`m-0 py-3`}),V(`span`,js,F(e.$t(`components.camera_options.sensors`)),1),R(Ee).length?($(),H(r,{key:1,modelValue:R(A),"onUpdate:modelValue":t[32]||=e=>Mt(A)?A.value=e:null,disabled:R(Ne),mandatory:``,class:`min-h-[30px]`},{default:G(()=>[($(!0),U(K,null,B(R(Ee),e=>($(),H(n,{key:e.id,size:`small`,disabled:R(Pe),value:e.id},{append:G(()=>[Q(s,{text:R(A)!==e.id,rounded:``,severity:R(A)===e.id?`primary`:`secondary`,class:`cui-icon-sm text-white`,onClick:wt(t=>Wt(e),[`stop`])},{icon:G(()=>[Q(o,{width:`100%`,height:`100%`})]),_:1},8,[`text`,`severity`,`onClick`])]),default:G(()=>[X(F(e.displayName.value)+` `,1)]),_:2},1032,[`disabled`,`value`]))),128))]),_:1},8,[`modelValue`,`disabled`])):($(),U(`span`,Ms,F(e.$t(`components.camera_options.no_sensors`)),1)),R(A)?($(),U(K,{key:3},[Q(i,{class:`m-0 py-3`}),V(`span`,Ns,F(e.$t(`components.camera_options.sensor_settings`)),1),!R(ye)||!R(je)?.schema?.length?($(),U(`div`,Ps,[R(Me)?($(),H(a,{key:0,class:`w-[30px] h-[30px] m-0`,"stroke-width":`5`})):($(),U(`span`,Fs,F(e.$t(`components.camera_options.no_config`)),1))])):($(),H(Gr,{key:`sensor-${R(A)}`,"schema-form":{schema:R(je).schema,config:R(je).config},loading:R(Pe),onOnFormSubmit:t[33]||=e=>It(e),onOnSubmit:t[34]||=e=>Pt(e),onOnAction:t[35]||=e=>Nt(e)},null,8,[`schema-form`,`loading`]))],64)):q(``,!0)],64)):($(),U(K,{key:0},[V(`span`,ws,F(e.$t(`components.camera_options.sensor_types`)),1),V(`span`,Ts,F(e.$t(`components.camera_options.no_plugins_enabled`)),1)],64))])):R(O)===`more`?($(),U(`div`,Is,[V(`span`,Ls,F(e.$t(`components.camera_options.manage_plugins`)),1),R(C)||!R(dt).length?($(),U(`div`,Rs,[R(C)?($(),H(a,{key:0,class:`w-[30px] h-[30px] m-0`,"stroke-width":`5`})):($(),U(`span`,zs,F(e.$t(`components.camera_options.no_plugins_found`)),1))])):($(),U(`div`,Bs,[($(!0),U(K,null,B(R(dt),t=>Ft(($(),U(`div`,{key:t.pluginName,class:`cui-list-item`},[Q(u,{disabled:R(Ne)||!I(t.pluginName),class:`h-14`,onClick:n=>e.$router.push(`/plugins/${t.pluginName}`)},{append:G(()=>[Q(l,{"model-value":R(b)?.some(e=>e.pluginName===t.pluginName),disabled:R(Ne)||!I(t.pluginName),"onUpdate:modelValue":e=>vt(t)},null,8,[`model-value`,`disabled`,`onUpdate:modelValue`])]),default:G(()=>[V(`span`,null,F(t.displayName),1)]),_:2},1032,[`disabled`,`onClick`])])),[[f,{value:I(t.pluginName)===void 0?e.$t(`components.form.tooltip.disabled`):``},void 0,{top:!0}]])),128))])),V(`div`,Vs,[Q(u,{class:`h-14`,onClick:t[36]||=t=>e.$router.push(`/plugins`)},{append:G(()=>[Q(s,{text:``,rounded:``,severity:`secondary`,class:`cui-icon-md`},{icon:G(()=>[Q(d,{width:`100%`,height:`100%`})]),_:1})]),default:G(()=>[V(`span`,null,F(e.$t(`components.camera_options.more_plugins`)),1)]),_:1})])])):q(``,!0)])}}}),Us={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function Ws(e,t){return $(),U(`svg`,Us,[...t[0]||=[V(`path`,{fill:`currentColor`,d:`M19 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V5a2 2 0 0 0-2-2m0 16H5V5h14zm-2-2H7V7h10z`},null,-1)]])}var Gs=Y({name:`mdi-checkbox-intermediate`,render:Ws}),Ks={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function qs(e,t){return $(),U(`svg`,Ks,[...t[0]||=[V(`path`,{fill:`currentColor`,d:`M3.14 1A2.14 2.14 0 0 0 1 3.14V5h2V3h2V1zM7 1v2h3V1zm5 0v2h2v2h2V3.14C16 1.96 15.04 1 13.86 1zM1 7v3h2V7zm8 0c-1.11 0-2 .89-2 2v7h6.86A2.14 2.14 0 0 0 16 13.86V7zm9 0v2h2v2h2V9c0-1.11-.89-2-2-2zM9 9h5v5H9zm-8 3v1.86C1 15.04 1.96 16 3.14 16H5v-2H3v-2zm19 1v3h2v-3zM7 18v2c0 1.11.89 2 2 2h2v-2H9v-2zm13 0v2h-2v2h2c1.11 0 2-.89 2-2v-2zm-7 2v2h3v-2z`},null,-1)]])}var Js=Y({name:`mdi-vector-intersection`,render:qs}),Ys={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function Xs(e,t){return $(),U(`svg`,Ys,[...t[0]||=[V(`path`,{fill:`currentColor`,d:`M4 6v13h16V6zm14 11H6V8h12z`},null,-1)]])}var Zs=Y({name:`mdi-rectangle-outline`,render:Xs}),Qs={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function $s(e,t){return $(),U(`svg`,Qs,[...t[0]||=[V(`path`,{fill:`currentColor`,d:`M4 6v13h16V6z`},null,-1)]])}var ec=Y({name:`mdi-rectangle`,render:$s}),tc={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function nc(e,t){return $(),U(`svg`,tc,[...t[0]||=[V(`path`,{fill:`currentColor`,d:`m6.03 12.03l2 3.47l-2.53 3.18L2 12.62zM17 18v-2.71c.88-.39 1.5-1.26 1.5-2.29c0-.57-.2-1.1-.53-1.5l1.97-1.15c1.01-.59 1.36-1.88.77-2.89l-1.38-2.4a2.125 2.125 0 0 0-2.89-.78L8.31 9c-.95.53-1.28 1.75-.73 2.71l1.5 2.6c.55.95 1.78 1.28 2.73.73l1.88-1.08c.25.59.72 1.07 1.31 1.33V18c0 1.1.9 2 2 2h5v-2z`},null,-1)]])}var rc=Y({name:`mdi-cctv`,render:nc}),ic={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function ac(e,t){return $(),U(`svg`,ic,[...t[0]||=[V(`path`,{fill:`currentColor`,d:`M20.84 22.73L18.11 20H17c-1.1 0-2-.9-2-2v-1.11l-2.34-2.34l-.85.49c-.95.55-2.18.22-2.73-.73l-1.5-2.6c-.4-.71-.33-1.53.1-2.14L1.11 3l1.28-1.27l19.72 19.73zM18.5 13c0-.57-.2-1.1-.53-1.5l1.97-1.15c1.01-.59 1.36-1.88.77-2.89l-1.38-2.4a2.125 2.125 0 0 0-2.89-.78l-5.67 3.29l7.09 7.09c.4-.44.64-1.02.64-1.66M2 12.62l3.5 6.06l2.53-3.18l-2-3.47z`},null,-1)]])}var oc=Y({name:`mdi-cctv-off`,render:ac}),sc={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function cc(e,t){return $(),U(`svg`,sc,[...t[0]||=[V(`path`,{fill:`currentColor`,d:`M12 2c5.5 0 10 4.5 10 10s-4.5 10-10 10S2 17.5 2 12S6.5 2 12 2m0 2c-1.9 0-3.6.6-4.9 1.7l11.2 11.2c1-1.4 1.7-3.1 1.7-4.9c0-4.4-3.6-8-8-8m4.9 14.3L5.7 7.1C4.6 8.4 4 10.1 4 12c0 4.4 3.6 8 8 8c1.9 0 3.6-.6 4.9-1.7`},null,-1)]])}var lc=Y({name:`mdi-cancel`,render:cc}),uc={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function dc(e,t){return $(),U(`svg`,uc,[...t[0]||=[V(`path`,{fill:`currentColor`,d:`M12.5 8c-2.65 0-5.05 1-6.9 2.6L2 7v9h9l-3.62-3.62c1.39-1.16 3.16-1.88 5.12-1.88c3.54 0 6.55 2.31 7.6 5.5l2.37-.78C21.08 11.03 17.15 8 12.5 8`},null,-1)]])}var fc=Y({name:`mdi-undo`,render:dc}),pc=e(Sr(),1),mc=[`audio`],hc=[`audio`,`motion`],gc={ref:`container`,class:`w-full h-full relative min-w-0`},_c={class:`flex flex-col justify-center items-center`},vc={class:`relative w-full`},yc={class:`relative w-full flex flex-col items-center justify-center`},bc={class:`absolute top-0 left-0 right-0 bottom-0`},xc={class:`sandbox w-full h-full`},Sc={class:`handles`},Cc=[`data-id`,`data-point`,`data-point-index`,`data-zone-index`,`onDblclick`],wc={class:`clipboard`},Tc={width:`100%`,height:`100%`,class:`polygon-container`},Ec=[`d`,`onClick`,`onDblclick`,`onMousedown`,`onTouchstart`],Dc=[`id`],Oc=[`fill`],kc=[`id`],Ac=[`fill`],jc=[`x1`,`y1`,`x2`,`y2`,`stroke`],Mc=[`x1`,`y1`,`x2`,`y2`,`stroke`,`stroke-opacity`,`marker-end`,`marker-start`,`onClick`],Nc=[`x`,`y`,`fill`],Pc=[`x`,`y`],Fc=[`x`,`y`,`fill`],Ic=[`x`,`y`],Lc=[`cx`,`cy`,`fill`,`stroke`,`onMousedown`,`onTouchstart`],Rc=[`cx`,`cy`,`fill`,`stroke`,`onMousedown`,`onTouchstart`],zc={class:`w-full h-full flex flex-col items-center justify-center min-w-0`,style:{width:`calc(100% - 20px)`,"margin-top":`10px`,"margin-bottom":`10px`}},Bc={class:`flex flex-col field-gap w-full`},Vc=[`for`],Hc={key:0,class:`cui-input-error`},Uc={class:`flex flex-col field-gap w-full`},Wc=[`for`],Gc={class:`flex flex-col field-gap w-full`},Kc=[`for`],qc={class:`flex flex-row h-[50px] rounded-full overflow-hidden justify-self-center max-w-max border-[1px] border-color-inner mt-auto`},Jc={class:`flex flex-row h-[50px] rounded-full overflow-hidden justify-self-center max-w-max border-[1px] border-color-inner`},Yc={class:`flex flex-col field-gap w-full`},Xc=[`for`],Zc={key:0,class:`cui-input-error`},Qc={class:`flex flex-col field-gap w-full`},$c=[`for`],el={class:`flex flex-col field-gap w-full`},tl=[`for`],nl={class:`flex flex-row h-[50px] rounded-full overflow-hidden justify-self-center max-w-max border-[1px] border-color-inner mt-auto`},rl={class:`flex flex-row h-[50px] rounded-full overflow-hidden justify-self-center max-w-max border-[1px] border-color-inner`},il=hn(Z({__name:`ZoneEditor`,props:{cameraName:{},zones:{},lines:{}},setup(e,{expose:t}){let n=new wr,r=e,i=Ue(),{t:a}=le(),o=ut(`dialogRefProps`),{mutateAsync:s,isPending:l}=n.patchZonesQuery(),{mutateAsync:u,isPending:d}=n.patchLinesQuery(),{cameraName:f,zones:p}=Dt(r),m=St(`cameraCardRef`),h=St(`container`),g=St(`draggablesRef`),_=St(`outsideRef`),v=St(`playgroundContainerRef`),y=W(`zones`),b=Ct([]),x=W([]),S=W([]),C=W(!1),te=W([]),w=W(void 0),T=W(-1),re=W(-1),E=W(-1),ie={x:0,y:0},ae=!1,se=null,D=ee(h),O=ee(v),ce=Qr.element.shape.name,k=$r.element.shape.name,ue=J(()=>{if(T.value<0)return``;let e=x.value[T.value];if(!e||e.isPrivacyMask)return``;let t=ce.safeParse(e.name);return t.success?``:t.error.issues[0]?.message??``}),de=J(()=>{if(E.value<0)return``;let e=S.value[E.value];if(!e)return``;let t=k.safeParse(e.name);return t.success?``:t.error.issues[0]?.message??``}),fe=J(()=>Math.max(0,O.width.value-20)),pe=J(()=>Math.max(0,O.height.value-20)),he=J(()=>[{label:a(`components.zone_editor.tab_zones`),value:`zones`},{label:a(`components.zone_editor.tab_lines`),value:`lines`}]),A=J(()=>{let e=oe.filter(e=>!mc.includes(e));return e.length===0?[]:[{label:a(`components.zone_editor.base_labels`),items:e.map(e=>({label:e,value:e}))}]}),ge=J(()=>{let e=oe.filter(e=>!hc.includes(e));return e.length===0?[]:[{label:a(`components.zone_editor.base_labels`),items:e.map(e=>({label:e,value:e}))}]}),j=J(()=>!!(o.loading?.value||l.value||d.value)),_e=J(()=>{let e=[];return C.value&&e.push(`customizing`),x.value?.length||e.push(`start`),e.join(` `)});function ve(){if(x.value){if(x.value.length===0){te.value=[];return}te.value=x.value.flatMap((e,t)=>e.points.map((e,n)=>({_id:`z${t}-p${n}`,zoneIndex:t,pointIndex:n,point:[e[0],e[1]]})))}}function ye(e){if(`touches`in e){let t=e.touches[0];return{x:t.clientX,y:t.clientY}}return{x:e.clientX,y:e.clientY}}function be(e,t){if(e.stopPropagation(),!v.value)return;je(C.value),ae=!0,T.value=t;let n=v.value.getBoundingClientRect(),{x:r,y:i}=ye(e),a=fe.value,o=pe.value;ie.x=(r-n.left-10)/a*100,ie.y=(i-n.top-10)/o*100}function xe(e){if(!ae||!v.value||T.value===-1||!x.value.length)return;let t=v.value.getBoundingClientRect(),{x:n,y:r}=ye(e),i=fe.value,a=pe.value,o=(n-t.left-10)/i*100,s=(r-t.top-10)/a*100,c=o-ie.x,l=s-ie.y,u=x.value[T.value].points,d=!1;for(let e=0;e<u.length;e++){let t=u[e][0]+c,n=u[e][1]+l;if(t<0||t>100||n<0||n>100){d=!0;break}}if(!d)for(let e=0;e<u.length;e++){u[e][0]+=c,u[e][1]+=l,u[e][0]=Math.max(0,Math.min(100,u[e][0])),u[e][1]=Math.max(0,Math.min(100,u[e][1]));let t=u[e][0]/100*i,n=u[e][1]/100*a;b.value.find(t=>t.id===`z${T.value}-p${e}`)?.setPosition(t,n)}ie.x=o,ie.y=s}function Se(){setTimeout(()=>{ae=!1},100)}function Ce(){!x.value.length||T.value===-1||(x.value[T.value].isPrivacyMask=!x.value[T.value].isPrivacyMask)}function we(){x.value[T.value]&&(x.value[T.value].filter=x.value[T.value].filter===`include`?`exclude`:`include`)}function Te(){x.value[T.value]&&(x.value[T.value].type=x.value[T.value].type===`intersect`?`contain`:`intersect`)}function Ee(e){if(!C.value||ae)return;let t=w.value===void 0?x.value.length:w.value,n=Math.min(Math.max(Math.round((e.offsetX-10)/fe.value*100),0),100),r=Math.min(Math.max(Math.round((e.offsetY-10)/pe.value*100),0),100);if(w.value===void 0){let e=`zone-${Date.now()}`;x.value.push({name:e,points:[],filter:`include`,type:`contain`,labels:[`motion`,`person`,`vehicle`,`animal`],isPrivacyMask:!1,color:Ie()}),w.value=x.value.length-1}x.value[t].points.push([n,r]),ve(),At(()=>{let e=x.value[t].points.length-1;De({_id:`z${t}-p${e}`,zoneIndex:t,pointIndex:e,point:[n,r]})})}function De(e){if(e.zoneIndex===void 0||e.pointIndex===void 0)return;let t=g.value?.filter(t=>t.dataset.pointIndex===e.pointIndex.toString()&&t.dataset.zoneIndex===e.zoneIndex.toString());!t||t.length===0||He(t[0],e.point)}function Oe(e){if(!x.value.length)return;let t=Math.round(e.point[0]/fe.value*100),n=Math.round(e.point[1]/pe.value*100);x.value[e.zoneIndex].points[e.pointIndex]=[t,n]}function Ae(){C.value=!0,w.value=void 0}function je(e){if(w.value===void 0){C.value=!1;return}C.value=e||!1;let t=w.value;!x.value[t]||!x.value[t].points||(x.value[t].points.length<3?(x.value.splice(t,1),ve()):(g.value?.forEach(e=>Ge(e)),T.value=t),w.value=void 0)}function Me(){C.value=!0,w.value=T.value}function Ne(){T.value===-1||!x.value.length||(x.value.splice(T.value,1),T.value=Math.max(-1,T.value-1),ve(),At(()=>{ze()}))}function Pe(){if(x.value?.length){if(C.value&&w.value!==void 0){let e=x.value[w.value];e.points.length&&(e.points.pop(),e.points.length===0&&(x.value.splice(w.value,1),w.value=void 0),ve());return}x.value.length>0&&(x.value.pop(),ve(),At(()=>{ze()}))}}function Fe(){ae=!1,C.value=!1,w.value=void 0,x.value&&(x.value.length=0,te.value=[],At(()=>{Be()}))}function Ie(){return`#`+[Math.floor(Math.random()*256),Math.floor(Math.random()*256),Math.floor(Math.random()*256)].map(e=>e.toString(16).padStart(2,`0`)).join(``)}function Le(e){if(!e||!e.length)return``;let t=e.map(e=>{let t=Math.round(e[0]/100*fe.value),n=Math.round(e[1]/100*pe.value);return`${t+10},${n+10}`});if(t.length===0)return``;let n=`M ${t[0]}`;for(let e=1;e<t.length;e++)n+=` L ${t[e]}`;return n+=` Z`,n}function Re(e){C.value||(T.value=e)}function ze(){Be(),g.value?.forEach(e=>{if(!e.dataset.zoneIndex||!e.dataset.pointIndex)return;let t=parseInt(e.dataset.zoneIndex),n=parseInt(e.dataset.pointIndex);if(!x.value[t]||!x.value[t].points[n])return;let r=x.value[t].points[n];r&&(He(e,r),Ge(e))})}function Be(){b.value.forEach(e=>e.destroy()),b.value=[]}function Ve(e){!x.value.length||!x.value[e.zoneIndex]||x.value[e.zoneIndex].points.length<4||(x.value[e.zoneIndex].points.splice(e.pointIndex,1),ve(),At(()=>{ze()}))}function He(e,t){Object.assign(e.style,We(t))}function We(e){return{left:Math.round(e[0]/100*fe.value)+`px`,top:Math.round(e[1]/100*pe.value)+`px`}}function Ge(e){e.classList.add(`draggable`);let t=new pc.default(e,{containment:!0,grid:[0,0]}).on(`pointerDown`,()=>{document.querySelectorAll(`[data-point="${e.dataset.zoneIndex}-${e.dataset.pointIndex}"]`)[0]?.classList.add(`changing`)}).on(`dragMove`,()=>{if(!e.dataset.zoneIndex||!e.dataset.pointIndex||!e.dataset.id)return;let n=t.position.x,r=t.position.y;Oe({_id:e.dataset.id,point:[n,r],pointIndex:parseInt(e.dataset.pointIndex),zoneIndex:parseInt(e.dataset.zoneIndex)})}).on(`pointerUp`,()=>{document.querySelectorAll(`.point`).forEach(e=>e.classList.remove(`changing`))});t.id=e.dataset.id,b.value.push(t)}function Ke(e,t,n){e.preventDefault(),E.value=t,se={lineIndex:t,pointIndex:n};let r=e=>{if(!se||!v.value)return;let t=v.value.getBoundingClientRect(),{x:n,y:r}=ye(e),i=Math.min(Math.max((n-t.left-10)/fe.value*100,0),100),a=Math.min(Math.max((r-t.top-10)/pe.value*100,0),100);S.value[se.lineIndex].points[se.pointIndex]=[Math.round(i),Math.round(a)]},i=()=>{se=null,document.removeEventListener(`mousemove`,r),document.removeEventListener(`mouseup`,i),document.removeEventListener(`touchmove`,r),document.removeEventListener(`touchend`,i)};document.addEventListener(`mousemove`,r),document.addEventListener(`mouseup`,i),document.addEventListener(`touchmove`,r),document.addEventListener(`touchend`,i)}function qe(){S.value.push({name:`line-${Date.now()}`,points:[[40,30],[60,70]],direction:`both`,labels:[`person`,`vehicle`,`animal`,`package`],color:Ie()}),E.value=S.value.length-1}function Je(){E.value<0||!S.value.length||(S.value.splice(E.value,1),E.value=Math.max(-1,E.value-1))}function Ye(){if(E.value<0)return;let e=S.value[E.value];if(!e)return;let t=[`both`,`a-to-b`,`b-to-a`];e.direction=t[(t.indexOf(e.direction)+1)%t.length]}function Xe(e){let t=fe.value,n=pe.value,r=e.points[0][0]/100*t+10,i=e.points[0][1]/100*n+10,a=e.points[1][0]/100*t+10,o=e.points[1][1]/100*n+10,s=(r+a)/2,c=(i+o)/2,l=a-r,u=o-i,d=Math.sqrt(l*l+u*u)||1,f=-u,p=l,m=s-f/2,h=c-p/2,g=s+f/2,_=c+p/2,v=f/d,y=p/d,b=10+t,ee=10+n,x=(e,t)=>({x:Math.max(19,Math.min(b-9,e)),y:Math.max(19,Math.min(ee-9,t))}),S=x(m-v*21,h-y*21),C=x(g+v*21,_+y*21);return{h1x:r,h1y:i,h2x:a,h2y:o,ax:S.x+v*15,ay:S.y+y*15,bx:C.x-v*15,by:C.y-y*15,labelAx:S.x,labelAy:S.y,labelBx:C.x,labelBy:C.y}}async function Qe(){try{let e=[];e.push(s({cameraname:f.value,zoneData:x.value})),e.push(u({cameraname:f.value,lineData:S.value})),await Promise.all(e)}catch(e){return i.add({severity:`error`,detail:e,life:3e3}),null}}return me(_,e=>{let t=e.target,n=t.closest(`.polygon`),r=t.closest(`.edit-button`),i=t.closest(`.remove-button`),a=t.closest(`.handle`),o=t.closest(`.zone-buttons`),s=t.closest(`.p-multiselect-list`),c=t.closest(`.p-colorpicker-panel`);!n&&!r&&!i&&!a&&!C.value&&!o&&!s&&!c&&(T.value=-1)}),M(re,()=>{re.value=-1}),M(T,(e,t)=>{if(e===-1&&x.value?.length&&x.value[t]){T.value=t;return}e===-1&&x.value?.length&&(re.value=0)}),M(p,()=>{x.value=Ze(p.value),ve()},{deep:!0,immediate:!0}),M(()=>r.lines,()=>{S.value=Ze(r.lines)},{deep:!0,immediate:!0}),M(y,e=>{e===`zones`?x.value.length&&(T.value<0||T.value>=x.value.length)&&(T.value=0):S.value.length&&(E.value<0||E.value>=S.value.length)&&(E.value=0)},{immediate:!0}),M([O.width,O.height],()=>{ze()}),pt(async()=>{setTimeout(()=>{ze()})}),t({isLoading:j,onConfirm:Qe}),(e,t)=>{let n=ln,r=ne,i=ke,a=Vn,o=rr,s=Hn,l=zn,u=Yr,d=c,p=ei,h=Lr,b=Br,ee=fc,re=lc,ie=oc,ae=rc,oe=ec,se=Zs,O=Js,ce=Gs,k=Ln;return $(),U(`div`,gc,[V(`div`,_c,[V(`div`,vc,[V(`div`,{ref_key:`outsideRef`,ref:_},null,512),V(`div`,{class:P([`w-full flex justify-center gap-3`,{"flex-row items-stretch":R(D).width.value>740,"flex-col":R(D).width.value<=740}])},[V(`div`,yc,[V(`div`,bc,[V(`div`,{ref_key:`playgroundContainerRef`,ref:v,class:`playground-container flex w-full h-full min-w-0`},[V(`section`,{class:P([`playground w-full h-full`,R(_e)]),onClick:Ee},[V(`div`,xc,[V(`div`,Sc,[($(!0),U(K,null,B(R(te),e=>Ft(($(),U(`div`,{key:e._id,ref_for:!0,ref_key:`draggablesRef`,ref:g,class:`handle`,"data-id":e._id,"data-point":`${e.zoneIndex}-${e.pointIndex}`,"data-point-index":e.pointIndex,"data-zone-index":e.zoneIndex,onDblclick:wt(t=>Ve(e),[`prevent`])},[...t[8]||=[V(`div`,{class:`delete-point`},null,-1)]],40,Cc)),[[Pt,R(y)===`zones`]])),128)),V(`div`,wc,[($(),U(`svg`,Tc,[R(y)===`zones`?($(!0),U(K,{key:0},B(R(x),(e,t)=>($(),U(`path`,{key:`zone-${t}`,d:Le(e.points),class:P([`cursor-pointer`,{dash:e.type===`intersect`&&!e.isPrivacyMask,selected:R(T)===t}]),style:z({fill:e.isPrivacyMask?`rgba(16, 16, 16, 0.9)`:e.filter===`exclude`?`transparent`:`${e.color}4D`,stroke:e.isPrivacyMask?`#333333`:e.color,"stroke-width":`2`}),onClick:e=>Re(t),onDblclick:()=>e.isPrivacyMask=!e.isPrivacyMask,onMousedown:e=>be(e,t),onMousemove:xe,onMouseup:Se,onTouchstart:e=>be(e,t),onTouchmove:xe,onTouchend:Se},null,46,Ec))),128)):q(``,!0),R(y)===`lines`?($(),U(K,{key:1},[V(`defs`,null,[($(!0),U(K,null,B(R(S),(e,t)=>($(),U(`marker`,{id:`editor-arrow-ab-${t}`,key:`marker-ab-${t}`,markerWidth:`6`,markerHeight:`5`,refX:`5`,refY:`2.5`,orient:`auto`,markerUnits:`strokeWidth`},[V(`path`,{d:`M0,0 L6,2.5 L0,5 Z`,fill:e.color},null,8,Oc)],8,Dc))),128)),($(!0),U(K,null,B(R(S),(e,t)=>($(),U(`marker`,{id:`editor-arrow-ba-${t}`,key:`marker-ba-${t}`,markerWidth:`6`,markerHeight:`5`,refX:`1`,refY:`2.5`,orient:`auto`,markerUnits:`strokeWidth`},[V(`path`,{d:`M6,0 L0,2.5 L6,5 Z`,fill:e.color},null,8,Ac)],8,kc))),128))]),($(!0),U(K,null,B(R(S),(e,t)=>($(),U(K,{key:`line-${t}`},[V(`line`,{x1:Xe(e).h1x,y1:Xe(e).h1y,x2:Xe(e).h2x,y2:Xe(e).h2y,stroke:e.color,"stroke-width":`2`,"stroke-dasharray":`6,4`,opacity:`0.6`},null,8,jc),V(`line`,{x1:Xe(e).ax,y1:Xe(e).ay,x2:Xe(e).bx,y2:Xe(e).by,stroke:e.color,"stroke-width":`3`,class:`cursor-pointer`,"stroke-opacity":R(E)===t?1:.7,"marker-end":e.direction===`b-to-a`?void 0:`url(#editor-arrow-ab-${t})`,"marker-start":e.direction===`a-to-b`?void 0:`url(#editor-arrow-ba-${t})`,onClick:e=>E.value=t},null,8,Mc),V(`rect`,{x:Xe(e).labelAx-9,y:Xe(e).labelAy-9,width:`18`,height:`18`,rx:`4`,fill:e.color},null,8,Nc),V(`text`,{x:Xe(e).labelAx,y:Xe(e).labelAy,fill:`#fff`,"font-size":`11`,"font-weight":`bold`,"text-anchor":`middle`,"dominant-baseline":`central`},` A `,8,Pc),V(`rect`,{x:Xe(e).labelBx-9,y:Xe(e).labelBy-9,width:`18`,height:`18`,rx:`4`,fill:e.color},null,8,Fc),V(`text`,{x:Xe(e).labelBx,y:Xe(e).labelBy,fill:`#fff`,"font-size":`11`,"font-weight":`bold`,"text-anchor":`middle`,"dominant-baseline":`central`},` B `,8,Ic),V(`circle`,{cx:Xe(e).h1x,cy:Xe(e).h1y,r:`8`,fill:e.color,stroke:R(E)===t?`#fff`:e.color,"stroke-width":`2`,class:`cursor-grab`,onMousedown:wt(e=>Ke(e,t,0),[`stop`]),onTouchstart:wt(e=>Ke(e,t,0),[`stop`])},null,40,Lc),V(`circle`,{cx:Xe(e).h2x,cy:Xe(e).h2y,r:`8`,fill:e.color,stroke:R(E)===t?`#fff`:e.color,"stroke-width":`2`,class:`cursor-grab`,onMousedown:wt(e=>Ke(e,t,1),[`stop`]),onTouchstart:wt(e=>Ke(e,t,1),[`stop`])},null,40,Rc)],64))),128))],64)):q(``,!0)]))])]),t[9]||=V(`div`,{class:`shadowboard on`},null,-1)])],2)],512)]),V(`div`,zc,[Q(n,{ref_key:`cameraCardRef`,ref:m,"camera-info":R(f),"source-role":`low-resolution`,"streaming-mode":`webrtc`,toolbar:!1,control:!1,subcontrol:!1,"flat-card":``,class:`w-full h-full border-[1px] border-color-inner`,"card-background-color":`#000`},null,8,[`camera-info`])])]),V(`div`,{class:P([`w-full flex flex-col gap-6 zone-buttons items-center self-stretch`,{"!gap-3":R(D).width.value>740}]),style:z({"max-width":R(D).width.value>740?`300px`:void 0})},[Q(r,{modelValue:R(y),"onUpdate:modelValue":t[0]||=e=>Mt(y)?y.value=e:null,options:R(he),"option-label":`label`,"option-value":`value`,class:`w-full`,pt:{root:{class:`flex w-full`},pcToggleButton:{root:{class:`flex-1 !text-sm`}}}},null,8,[`modelValue`,`options`]),R(y)===`lines`?($(),U(K,{key:0},[V(`div`,Bc,[V(`label`,{for:`line[${R(E)}].name`,class:`cui-label`},F(e.$t(`components.form.label.name`)),9,Vc),Q(a,null,{default:G(()=>[Q(i,{"model-value":R(S)[R(E)]?.name,invalid:!!R(de),loading:R(j),disabled:R(E)<0,type:`text`,onValueChange:t[1]||=e=>{R(S)[R(E)]&&(R(S)[R(E)].name=e??``)}},null,8,[`model-value`,`invalid`,`loading`,`disabled`])]),_:1}),Q(N,{name:`fade`},{default:G(()=>[R(de)?($(),U(`span`,Hc,F(R(de)),1)):q(``,!0)]),_:1})]),V(`div`,Uc,[V(`label`,{for:`line[${R(E)}].labels`,class:`cui-label`},F(e.$t(`components.form.label.labels`)),9,Wc),Q(a,null,{default:G(()=>[Q(o,{"model-value":R(S)[R(E)]?.labels,options:R(ge),loading:R(j),"max-selected-labels":2,"show-toggle-all":!1,"option-label":`label`,"option-value":`value`,"option-group-label":`label`,"option-group-children":`items`,"show-clear":``,type:`text`,onValueChange:t[2]||=e=>{R(S)[R(E)]&&(R(S)[R(E)].labels=e)}},null,8,[`model-value`,`options`,`loading`])]),_:1})]),V(`div`,Gc,[V(`label`,{for:`line[${R(E)}].color`,class:`cui-label`},F(e.$t(`components.form.label.color`)),9,Kc),Q(a,null,{default:G(()=>[Q(i,{"model-value":R(S)[R(E)]?.color,loading:R(j),readonly:``,type:`text`},null,8,[`model-value`,`loading`]),Q(l,null,{default:G(()=>[($(),H(s,{key:R(E),"model-value":R(S)[R(E)]?.color,format:`hex`,onValueChange:t[3]||=e=>e&&R(S)[R(E)]?R(S)[R(E)].color=`#${e}`:null},null,8,[`model-value`]))]),_:1})]),_:1})]),V(`div`,qc,[Ft(($(),H(d,{loading:R(j),severity:`secondary`,class:`!rounded-none !h-full w-[60px]`,onClick:qe},{icon:G(()=>[Q(u,{width:`20px`,height:`20px`})]),_:1},8,[`loading`])),[[k,{value:e.$t(`components.form.tooltip.new`)},void 0,{top:!0}]]),Ft(($(),H(d,{loading:R(j),disabled:!R(S).length||R(E)<0,severity:`secondary`,class:`!rounded-none !h-full w-[60px]`,onClick:Je},{icon:G(()=>[Q(p,{width:`20px`,height:`20px`})]),_:1},8,[`loading`,`disabled`])),[[k,{value:e.$t(`components.form.tooltip.delete`)},void 0,{top:!0}]])]),V(`div`,Jc,[Ft(($(),H(d,{loading:R(j),disabled:R(E)<0,severity:`secondary`,class:`!rounded-none !h-full w-[80px] text-sm`,onClick:Ye},{default:G(()=>[X(F(R(S)[R(E)]?.direction===`both`?`A ↔ B`:R(S)[R(E)]?.direction===`a-to-b`?`A → B`:`B → A`),1)]),_:1},8,[`loading`,`disabled`])),[[k,{value:R(S)[R(E)]?.direction===`both`?`A ↔ B`:R(S)[R(E)]?.direction===`a-to-b`?`A → B`:`B → A`},void 0,{top:!0}]])])],64)):q(``,!0),R(y)===`zones`?($(),U(K,{key:1},[V(`div`,Yc,[V(`label`,{for:`zone[${R(T)}].name`,class:`cui-label`},F(e.$t(`components.form.label.name`)),9,Xc),Q(a,null,{default:G(()=>[Q(i,{"model-value":R(x)[R(T)]?.name,invalid:!!R(ue),loading:R(j),disabled:R(T)<0||R(x)[R(T)]?.isPrivacyMask,type:`text`,onValueChange:t[4]||=e=>{R(x)[R(T)]&&(R(x)[R(T)].name=e??``)}},null,8,[`model-value`,`invalid`,`loading`,`disabled`])]),_:1}),Q(N,{name:`fade`},{default:G(()=>[R(ue)?($(),U(`span`,Zc,F(R(ue)),1)):q(``,!0)]),_:1})]),V(`div`,Qc,[V(`label`,{for:`zone[${R(T)}].labels`,class:`cui-label`},F(e.$t(`components.form.label.labels`)),9,$c),Q(a,null,{default:G(()=>[Q(o,{"model-value":R(x)[R(T)]?.labels,options:R(A),disabled:R(x)[R(T)]?.isPrivacyMask,loading:R(j),"max-selected-labels":2,"show-toggle-all":!1,"option-label":`label`,"option-value":`value`,"option-group-label":`label`,"option-group-children":`items`,"show-clear":``,type:`text`,onValueChange:t[5]||=e=>R(x)[R(T)].labels=e},null,8,[`model-value`,`options`,`disabled`,`loading`])]),_:1})]),V(`div`,el,[V(`label`,{for:`zone[${R(T)}].color`,class:`cui-label`},F(e.$t(`components.form.label.color`)),9,tl),Q(a,null,{default:G(()=>[Q(i,{"model-value":R(x)[R(T)]?.color,disabled:R(x)[R(T)]?.isPrivacyMask,loading:R(j),readonly:``,type:`text`},null,8,[`model-value`,`disabled`,`loading`]),Q(l,null,{default:G(()=>[($(),H(s,{key:R(T),"model-value":R(x)[R(T)]?.color,format:`hex`,disabled:R(x)[R(T)]?.isPrivacyMask,onValueChange:t[6]||=e=>e?R(x)[R(T)].color=`#${e}`:null},null,8,[`model-value`,`disabled`]))]),_:1})]),_:1})]),V(`div`,nl,[R(C)?Ft(($(),H(d,{key:1,disabled:R(w)!==void 0&&R(x)[R(w)]?.points?.length<3,loading:R(j),severity:`secondary`,class:`!rounded-none !h-full w-[60px]`,onClick:t[7]||=e=>je(!1)},{icon:G(()=>[Q(h,{width:`20px`,height:`20px`})]),_:1},8,[`disabled`,`loading`])),[[k,{value:e.$t(`components.form.tooltip.finish`)},void 0,{top:!0}]]):Ft(($(),H(d,{key:0,loading:R(j),severity:`secondary`,class:`!rounded-none !h-full w-[60px]`,onClick:Ae},{icon:G(()=>[Q(u,{width:`20px`,height:`20px`})]),_:1},8,[`loading`])),[[k,{value:e.$t(`components.form.tooltip.new`)},void 0,{top:!0}]]),Ft(($(),H(d,{loading:R(j),disabled:!R(x).length||R(T)<0||R(C),severity:`secondary`,class:`!rounded-none !h-full w-[60px]`,onClick:Me},{icon:G(()=>[Q(b,{width:`20px`,height:`20px`})]),_:1},8,[`loading`,`disabled`])),[[k,{value:e.$t(`components.form.tooltip.edit`)},void 0,{top:!0}]]),Ft(($(),H(d,{loading:R(j),disabled:!R(x).length||R(T)<0,severity:`secondary`,class:`!rounded-none !h-full w-[60px]`,onClick:Ne},{icon:G(()=>[Q(p,{width:`20px`,height:`20px`})]),_:1},8,[`loading`,`disabled`])),[[k,{value:e.$t(`components.form.tooltip.delete`)},void 0,{top:!0}]]),Ft(($(),H(d,{loading:R(j),disabled:!R(x).length,severity:`secondary`,class:`!rounded-none !h-full w-[60px]`,onClick:Pe},{icon:G(()=>[Q(ee,{width:`20px`,height:`20px`})]),_:1},8,[`loading`,`disabled`])),[[k,{value:e.$t(`components.form.tooltip.undo`)},void 0,{top:!0}]]),Ft(($(),H(d,{loading:R(j),disabled:!R(x).length,severity:`secondary`,class:`!rounded-none !h-full w-[60px]`,onClick:Fe},{icon:G(()=>[Q(re,{width:`20px`,height:`20px`})]),_:1},8,[`loading`,`disabled`])),[[k,{value:e.$t(`components.form.tooltip.clear`)},void 0,{top:!0}]])]),V(`div`,rl,[Ft(($(),H(d,{loading:R(j),disabled:!(R(x).length&&R(T)>=0&&R(x)[R(T)]),severity:`secondary`,class:`!rounded-none !h-full w-[60px]`,onClick:Ce},{icon:G(()=>[R(x)[R(T)]?.isPrivacyMask?($(),H(ie,{key:0,width:`20px`,height:`20px`})):($(),H(ae,{key:1,width:`20px`,height:`20px`}))]),_:1},8,[`loading`,`disabled`])),[[k,{value:R(x)[R(T)]?.isPrivacyMask?e.$t(`components.form.tooltip.privacy_mask`):e.$t(`components.form.tooltip.public_mask`)},void 0,{top:!0}]]),Ft(($(),H(d,{loading:R(j),disabled:R(x)[R(T)]?.isPrivacyMask,severity:`secondary`,class:`!rounded-none !h-full w-[60px]`,onClick:we},{icon:G(()=>[R(x)[R(T)]?.filter===`include`?($(),H(oe,{key:0,width:`20px`,height:`20px`})):($(),H(se,{key:1,width:`20px`,height:`20px`}))]),_:1},8,[`loading`,`disabled`])),[[k,{value:R(x)[R(T)]?.filter===`include`?e.$t(`components.form.tooltip.include`):e.$t(`components.form.tooltip.exclude`)},void 0,{top:!0}]]),Ft(($(),H(d,{loading:R(j),disabled:R(x)[R(T)]?.isPrivacyMask,severity:`secondary`,class:`!rounded-none !h-full w-[60px]`,onClick:Te},{icon:G(()=>[R(x)[R(T)]?.type===`intersect`?($(),H(O,{key:0,width:`20px`,height:`20px`})):($(),H(ce,{key:1,width:`20px`,height:`20px`}))]),_:1},8,[`loading`,`disabled`])),[[k,{value:R(x)[R(T)]?.type===`intersect`?e.$t(`components.form.tooltip.intersect`):e.$t(`components.form.tooltip.contain`)},void 0,{top:!0}]])])],64)):q(``,!0)],6)],2)])])],512)}}}),[[`__scopeId`,`data-v-e02167ca`]]),al={class:`text-color font-normal`},ol={class:`flex flex-col gap-6`},sl={for:`name`,class:`cui-label`},cl={for:`room`,class:`cui-label`},ll={class:`flex gap-2`},ul={for:`type`,class:`cui-label`},dl={class:`w-full flex flex-col gap-2`},fl={class:`flex items-center gap-4`},pl={class:`flex flex-col field-switch-gap`},ml={for:`disabled`,class:`cui-label-switch`},hl={class:`text-color font-normal`},gl={class:`flex flex-col gap-6`},_l={for:`info.manufacturer`,class:`cui-label`},vl={for:`info.model`,class:`cui-label`},yl={for:`info.hardware`,class:`cui-label`},bl={for:`info.serialNumber`,class:`cui-label`},xl={for:`info.firmwareVersion`,class:`cui-label`},Sl={for:`info.supportUrl`,class:`cui-label`},Cl={class:`text-color font-normal`},wl={class:`flex flex-col gap-6`},Tl={for:`interfaceSettings.streamingMode`,class:`cui-label`},El={for:`interfaceSettings.streamingSource`,class:`cui-label`},Dl={for:`interfaceSettings.aspectRatio`,class:`cui-label`},Ol={class:`text-color font-normal`},kl={class:`flex flex-col gap-6`},Al={class:`w-full flex flex-col gap-2`},jl={class:`flex items-center gap-4`},Ml={class:`flex flex-col field-switch-gap`},Nl={for:`detectionSettings.snooze`,class:`cui-label-switch`},Pl={for:`detectionSettings.motion.resolution`,class:`cui-label`},Fl={for:`detectionSettings.motion.timeout`,class:`cui-label`},Il={for:`detectionSettings.object.confidence`,class:`cui-label`},Ll={for:`detectionSettings.audio.minDecibels`,class:`cui-label`},Rl={for:`detectionSettings.audio.timeout`,class:`cui-label`},zl={for:`detectionSettings.sensor.timeout`,class:`cui-label`},Bl={for:`detectionSettings.sensor.triggers`,class:`cui-label`},Vl={class:`text-color font-normal`},Hl={class:`w-full flex flex-col gap-4`},Ul={class:`flex items-center gap-4`},Wl={class:`flex flex-col field-switch-gap`},Gl={for:`ptzAutotrack.enabled`,class:`cui-label-switch`},Kl={class:`cui-label`},ql={class:`cui-label`},Jl={class:`cui-label`},Yl={class:`flex items-center gap-4`},Xl={class:`flex flex-col field-switch-gap`},Zl={for:`ptzAutotrack.returnToHome`,class:`cui-label-switch`},Ql={class:`cui-label`},$l={class:`text-color font-normal`},eu={class:`flex flex-col gap-6 w-full items-center justify-center`},tu={class:`text-color font-normal`},nu={class:`flex flex-col gap-6`},ru={class:`w-full flex flex-col gap-2`},iu={class:`flex items-center gap-4`},au={class:`flex flex-col field-switch-gap`},ou={for:`snapshotSettings.autoRefresh`,class:`cui-label-switch`},su={for:`snapshotSettings.ttl`,class:`cui-label`},cu={for:`snapshotSettings.interval`,class:`cui-label`},lu={class:`text-color font-normal`},uu={class:`flex flex-col gap-6`},du={for:`frameWorkerSettings.fps`,class:`cui-label`},fu=Z({__name:`Settings`,props:jt({camera:{},cameraDevice:{},loading:{type:Boolean},latestSnapshotSrc:{}},{modelValue:{required:!0},modelModifiers:{}}),emits:jt([`close`],[`update:modelValue`]),setup(e,{emit:t}){let n=new Set([i.Contact,i.Occupancy,i.Smoke,i.Leak,i.Doorbell,i.Switch,i.Light,i.Siren,i.Lock,i.Garage,i.SecuritySystem]),r=new wr,a=new wr,o=e,s=t,l=xt(e,`modelValue`),u=zt(),d=Vt(),f=kr(),{t:m}=le(),{camera:h,cameraDevice:g,loading:_}=Dt(o),{sensors:v}=p(g),{data:y,isBusy:b}=a.getRoomsQuery(),{mutateAsync:ee,isPending:x}=r.removeCameraQuery(),S=W([`camera`,`doorbell`]),C=W([`auto`,`mse`,`webrtc`,`webrtc/tcp`]),te=W([`high-resolution`,`mid-resolution`,`low-resolution`]),w=W([`16:9`,`9:16`,`8:3`,`4:3`,`1:1`]),T=W([`low`,`medium`,`high`]),ne=W([]),re=J(()=>v.value.some(e=>e.type===i.PTZ)),E=J(()=>[{label:m(`components.automation_nodes.label_person`),value:`person`},{label:m(`components.automation_nodes.label_vehicle`),value:`vehicle`},{label:m(`components.automation_nodes.label_animal`),value:`animal`},{label:m(`components.automation_nodes.label_package`),value:`package`}]),ie=J(()=>v.value.filter(e=>n.has(e.type)).map(e=>({label:e.displayName.value,value:O(e.type,e.name,e.pluginId)}))),ae=J(()=>new Set(ie.value.map(e=>e.value))),oe=J(()=>(l.value.detectionSettings.sensor?.triggers??[]).map(e=>O(e.sensorType,e.sensorName,e.pluginId)).filter(e=>ae.value.has(e))),se=J(()=>{let e=y.value??[`Default`],t=new Set(e.map(e=>e.toLowerCase()));return[...e,...ne.value.filter(e=>!t.has(e.toLowerCase()))].map(e=>({label:e===`Default`?m(`components.form.label.room_default`):e,value:e}))}),D=J(()=>_.value||x.value);function O(e,t,n){return`${e}::${t}::${n}`}function ce(e){let t=(l.value.detectionSettings.sensor?.triggers??[]).filter(e=>!ae.value.has(O(e.sensorType,e.sensorName,e.pluginId))),n=e.map(e=>{let[t,n,r]=e.split(`::`);return{sensorType:t,sensorName:n,pluginId:r}});l.value.detectionSettings.sensor||(l.value.detectionSettings.sensor={timeout:30,triggers:[]}),l.value.detectionSettings.sensor.triggers=[...t,...n]}function k(){f.openComponentDialog(Xr,{data:{title:m(`components.dialog.title.create_room`),confirmText:m(`components.form.button.add`),contentProps:{}},onConfirm:e=>{if(!e)return;let t=se.value.find(t=>t.value.toLowerCase()===e.toLowerCase()),n=t?.value??e;t||ne.value.push(n),l.value.room=n}})}function ue(){f.openTextDialog({data:{title:m(`components.dialog.title.confirm`),confirmText:m(`components.form.button.remove`),contentText:m(`components.dialog.message.confirm_remove`),confirmButtonProps:{severity:`danger`}},onConfirm:async()=>{try{await ee({cameraname:h.value.name}),u.path.includes(h.value.name)&&d.push({path:`/home`}),s(`close`)}catch{}}})}function de(e=[]){f.openComponentDialog(il,{data:{title:m(`components.zone_editor.edit_zones`),loading:D,contentProps:{cameraName:h.value.name,zones:e,lines:h.value.detectionLines??[]}}})}return(e,t)=>{let n=Bn,r=ke,i=Vn,a=Xn,o=Yr,s=c,u=sr,d=Rn,f=Zn,p=Nn,m=Yn,g=rr,_=Jr,v=Pn,y=Ln;return $(),H(v,{multiple:``,class:`p-4`},{default:G(()=>[Q(p,{value:`general`},{default:G(()=>[Q(n,{class:`px-0 pt-0`},{default:G(()=>[V(`span`,al,F(e.$t(`components.camera_options.general`)),1)]),_:1}),Q(f,{pt:{content:{class:`px-0`}}},{default:G(()=>[V(`div`,ol,[Q(R(L),{modelValue:l.value.name,"onUpdate:modelValue":t[0]||=e=>l.value.name=e,modelModifiers:{trim:!0},name:`name`,as:`div`,class:`flex flex-col field-gap`},{default:G(({field:t,errors:n})=>[V(`label`,sl,F(e.$t(`components.form.label.name`)),1),Q(i,null,{default:G(()=>[Q(r,lt(t,{invalid:n.length>0,loading:R(D),type:`text`}),null,16,[`invalid`,`loading`])]),_:2},1024),Q(N,{name:`fade`},{default:G(()=>[Q(R(I),{name:`name`,class:`cui-input-error`})]),_:1})]),_:1},8,[`modelValue`]),Q(R(L),{"model-value":l.value.room,name:`room`,as:`div`,class:`flex flex-col field-gap`},{default:G(({errors:n})=>[V(`label`,cl,F(e.$t(`components.form.label.room`)),1),V(`div`,ll,[Q(a,{"model-value":l.value.room,options:R(se),"option-label":`label`,"option-value":`value`,invalid:n.length>0,loading:R(b),class:`w-full`,"onUpdate:modelValue":t[1]||=e=>l.value.room=e},null,8,[`model-value`,`options`,`invalid`,`loading`]),Ft(($(),H(s,{severity:`secondary`,outlined:``,class:`shrink-0 h-[42px] w-[42px] p-0`,onClick:k},{icon:G(()=>[Q(o,{class:`w-4 h-4`})]),_:1})),[[y,e.$t(`components.form.button.create_room`),void 0,{top:!0}]])]),n.length?q(``,!0):($(),H(u,{key:0,severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:G(()=>[X(F(e.$t(`components.form.hint.room`)),1)]),_:1}))]),_:1},8,[`model-value`]),Q(R(L),{"model-value":l.value.type,name:`type`,as:`div`,class:`flex flex-col field-gap`},{default:G(({errors:n})=>[V(`label`,ul,F(e.$t(`components.form.label.type`)),1),Q(i,null,{default:G(()=>[Q(a,{"model-value":l.value.type,options:R(S),invalid:n.length>0,loading:R(D),type:`text`,onValueChange:t[2]||=e=>l.value.type=e},null,8,[`model-value`,`options`,`invalid`,`loading`])]),_:2},1024),Q(N,{name:`fade`},{default:G(()=>[Q(R(I),{name:`type`,class:`cui-input-error`})]),_:1})]),_:1},8,[`model-value`]),V(`div`,dl,[Q(R(L),{"model-value":l.value.disabled,value:!0,"unchecked-value":!1,type:`checkbox`,name:`disabled`,as:`div`,class:`flex flex-col field-gap cui-toggle-switch`},{default:G(({field:n,errors:r})=>[V(`div`,fl,[V(`div`,pl,[V(`label`,ml,F(e.$t(`components.form.label.disabled`)),1),Q(u,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-switch-hint`},{default:G(()=>[X(F(e.$t(`components.form.hint.disable_camera`)),1)]),_:1}),Q(N,{name:`fade`},{default:G(()=>[Q(R(I),{name:`disabled`,class:`cui-input-switch-error`})]),_:1})]),Q(d,lt({"model-value":l.value.disabled},n,{invalid:r.length>0,loading:R(D),class:`ml-auto shrink-0`,onValueChange:t[3]||=e=>l.value.disabled=e}),null,16,[`model-value`,`invalid`,`loading`])])]),_:1},8,[`model-value`])]),Q(s,{fluid:``,severity:`danger`,loading:R(D),class:`cui-button-medium`,label:e.$t(`components.form.button.remove`),onClick:t[4]||=e=>ue()},null,8,[`loading`,`label`])])]),_:1})]),_:1}),Q(p,{value:`branding`},{default:G(()=>[Q(n,{class:`px-0`},{default:G(()=>[V(`span`,hl,F(e.$t(`components.camera_options.branding`)),1)]),_:1}),Q(f,{pt:{content:{class:`px-0`}}},{default:G(()=>[V(`div`,gl,[Q(R(L),{modelValue:l.value.info.manufacturer,"onUpdate:modelValue":t[5]||=e=>l.value.info.manufacturer=e,modelModifiers:{trim:!0},name:`info.manufacturer`,as:`div`,class:`flex flex-col field-gap`},{default:G(({field:t,errors:n})=>[V(`label`,_l,F(e.$t(`components.form.label.manufacturer`)),1),Q(i,null,{default:G(()=>[Q(r,lt(t,{invalid:n.length>0,loading:R(D),type:`text`}),null,16,[`invalid`,`loading`])]),_:2},1024),Q(N,{name:`fade`},{default:G(()=>[Q(R(I),{name:`info.manufacturer`,class:`cui-input-error`})]),_:1})]),_:1},8,[`modelValue`]),Q(R(L),{modelValue:l.value.info.model,"onUpdate:modelValue":t[6]||=e=>l.value.info.model=e,modelModifiers:{trim:!0},name:`info.model`,as:`div`,class:`flex flex-col field-gap`},{default:G(({field:t,errors:n})=>[V(`label`,vl,F(e.$t(`components.form.label.model`)),1),Q(i,null,{default:G(()=>[Q(r,lt(t,{invalid:n.length>0,loading:R(D),type:`text`}),null,16,[`invalid`,`loading`])]),_:2},1024),Q(N,{name:`fade`},{default:G(()=>[Q(R(I),{name:`info.model`,class:`cui-input-error`})]),_:1})]),_:1},8,[`modelValue`]),Q(R(L),{modelValue:l.value.info.hardware,"onUpdate:modelValue":t[7]||=e=>l.value.info.hardware=e,modelModifiers:{trim:!0},name:`info.hardware`,as:`div`,class:`flex flex-col field-gap`},{default:G(({field:t,errors:n})=>[V(`label`,yl,F(e.$t(`components.form.label.hardware_version`)),1),Q(i,null,{default:G(()=>[Q(r,lt(t,{invalid:n.length>0,loading:R(D),type:`text`}),null,16,[`invalid`,`loading`])]),_:2},1024),Q(N,{name:`fade`},{default:G(()=>[Q(R(I),{name:`info.hardware`,class:`cui-input-error`})]),_:1})]),_:1},8,[`modelValue`]),Q(R(L),{modelValue:l.value.info.serialNumber,"onUpdate:modelValue":t[8]||=e=>l.value.info.serialNumber=e,modelModifiers:{trim:!0},name:`info.serialNumber`,as:`div`,class:`flex flex-col field-gap`},{default:G(({field:t,errors:n})=>[V(`label`,bl,F(e.$t(`components.form.label.serial_number`)),1),Q(i,null,{default:G(()=>[Q(r,lt(t,{invalid:n.length>0,loading:R(D),type:`text`}),null,16,[`invalid`,`loading`])]),_:2},1024),Q(N,{name:`fade`},{default:G(()=>[Q(R(I),{name:`info.serialNumber`,class:`cui-input-error`})]),_:1})]),_:1},8,[`modelValue`]),Q(R(L),{modelValue:l.value.info.firmwareVersion,"onUpdate:modelValue":t[9]||=e=>l.value.info.firmwareVersion=e,modelModifiers:{trim:!0},name:`info.firmwareVersion`,as:`div`,class:`flex flex-col field-gap`},{default:G(({field:t,errors:n})=>[V(`label`,xl,F(e.$t(`components.form.label.firmware_version`)),1),Q(i,null,{default:G(()=>[Q(r,lt(t,{invalid:n.length>0,loading:R(D),type:`text`}),null,16,[`invalid`,`loading`])]),_:2},1024),Q(N,{name:`fade`},{default:G(()=>[Q(R(I),{name:`info.firmwareVersion`,class:`cui-input-error`})]),_:1})]),_:1},8,[`modelValue`]),Q(R(L),{modelValue:l.value.info.supportUrl,"onUpdate:modelValue":t[10]||=e=>l.value.info.supportUrl=e,modelModifiers:{trim:!0},name:`info.supportUrl`,as:`div`,class:`flex flex-col field-gap`},{default:G(({field:t,errors:n})=>[V(`label`,Sl,F(e.$t(`components.form.label.support_url`)),1),Q(i,null,{default:G(()=>[Q(r,lt(t,{invalid:n.length>0,loading:R(D),type:`text`}),null,16,[`invalid`,`loading`])]),_:2},1024),Q(N,{name:`fade`},{default:G(()=>[Q(R(I),{name:`info.supportUrl`,class:`cui-input-error`})]),_:1})]),_:1},8,[`modelValue`])])]),_:1})]),_:1}),Q(p,{value:`interface`},{default:G(()=>[Q(n,{class:`px-0`},{default:G(()=>[V(`span`,Cl,F(e.$t(`components.camera_options.interface`)),1)]),_:1}),Q(f,{pt:{content:{class:`px-0`}}},{default:G(()=>[V(`div`,wl,[Q(R(L),{"model-value":l.value.interfaceSettings.streamingMode,name:`interfaceSettings.streamingMode`,as:`div`,class:`flex flex-col field-gap`},{default:G(({errors:n})=>[V(`label`,Tl,F(e.$t(`components.form.label.streaming_mode`)),1),Q(i,null,{default:G(()=>[Q(a,{"model-value":l.value.interfaceSettings.streamingMode,options:R(C),invalid:n.length>0,loading:R(D),type:`text`,onValueChange:t[11]||=e=>l.value.interfaceSettings.streamingMode=e},null,8,[`model-value`,`options`,`invalid`,`loading`])]),_:2},1024),Q(N,{name:`fade`},{default:G(()=>[Q(R(I),{name:`interfaceSettings.streamingMode`,class:`cui-input-error`})]),_:1}),n.length?q(``,!0):($(),H(u,{key:0,severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:G(()=>[X(F(e.$t(`components.form.hint.streaming_mode`)),1)]),_:1}))]),_:1},8,[`model-value`]),Q(R(L),{"model-value":l.value.interfaceSettings.streamingSource,name:`interfaceSettings.streamingSource`,as:`div`,class:`flex flex-col field-gap`},{default:G(({errors:n})=>[V(`label`,El,F(e.$t(`components.form.label.streaming_source`)),1),Q(i,null,{default:G(()=>[Q(a,{"model-value":l.value.interfaceSettings.streamingSource,options:R(te),invalid:n.length>0,loading:R(D),type:`text`,onValueChange:t[12]||=e=>l.value.interfaceSettings.streamingSource=e},null,8,[`model-value`,`options`,`invalid`,`loading`])]),_:2},1024),Q(N,{name:`fade`},{default:G(()=>[Q(R(I),{name:`interfaceSettings.streamingSource`,class:`cui-input-error`})]),_:1}),n.length?q(``,!0):($(),H(u,{key:0,severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:G(()=>[X(F(e.$t(`components.form.hint.streaming_source`)),1)]),_:1}))]),_:1},8,[`model-value`]),Q(R(L),{"model-value":l.value.interfaceSettings.aspectRatio,name:`interfaceSettings.aspectRatio`,as:`div`,class:`flex flex-col field-gap`},{default:G(({errors:n})=>[V(`label`,Dl,F(e.$t(`components.form.label.aspect_ratio`)),1),Q(i,null,{default:G(()=>[Q(a,{"model-value":l.value.interfaceSettings.aspectRatio,options:R(w),invalid:n.length>0,loading:R(D),type:`text`,onValueChange:t[13]||=e=>l.value.interfaceSettings.aspectRatio=e},null,8,[`model-value`,`options`,`invalid`,`loading`])]),_:2},1024),Q(N,{name:`fade`},{default:G(()=>[Q(R(I),{name:`interfaceSettings.aspectRatio`,class:`cui-input-error`})]),_:1}),n.length?q(``,!0):($(),H(u,{key:0,severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:G(()=>[X(F(e.$t(`components.form.hint.aspect_ratio`)),1)]),_:1}))]),_:1},8,[`model-value`])])]),_:1})]),_:1}),Q(p,{value:`detection`},{default:G(()=>[Q(n,{class:`px-0`},{default:G(()=>[V(`span`,Ol,F(e.$t(`components.camera_options.detection`)),1)]),_:1}),Q(f,{pt:{content:{class:`px-0`}}},{default:G(()=>[V(`div`,kl,[V(`div`,Al,[Q(R(L),{"model-value":l.value.detectionSettings?.snooze,value:!0,"unchecked-value":!1,type:`checkbox`,name:`detectionSettings.snooze`,as:`div`,class:`flex flex-col field-gap cui-toggle-switch`},{default:G(({field:n,errors:r})=>[V(`div`,jl,[V(`div`,Ml,[V(`label`,Nl,F(e.$t(`components.form.label.snooze`)),1),Q(u,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-switch-hint`},{default:G(()=>[X(F(e.$t(`components.form.hint.snooze_camera`)),1)]),_:1}),Q(N,{name:`fade`},{default:G(()=>[Q(R(I),{name:`detectionSettings.snooze`,class:`cui-input-switch-error`})]),_:1})]),Q(d,lt({"model-value":l.value.detectionSettings?.snooze},n,{invalid:r.length>0,loading:R(D),class:`ml-auto shrink-0`,onValueChange:t[14]||=e=>{l.value.detectionSettings&&(l.value.detectionSettings.snooze=e)}}),null,16,[`model-value`,`invalid`,`loading`])])]),_:1},8,[`model-value`])]),Q(R(L),{"model-value":l.value.detectionSettings.motion.resolution,name:`detectionSettings.motion.resolution`,as:`div`,class:`flex flex-col field-gap`},{default:G(({errors:n})=>[V(`label`,Pl,F(e.$t(`components.form.label.motion_resolution`)),1),Q(i,null,{default:G(()=>[Q(a,{"model-value":l.value.detectionSettings.motion.resolution,options:R(T),invalid:n.length>0,loading:R(D),type:`text`,onValueChange:t[15]||=e=>l.value.detectionSettings.motion.resolution=e},null,8,[`model-value`,`options`,`invalid`,`loading`])]),_:2},1024),Q(N,{name:`fade`},{default:G(()=>[Q(R(I),{name:`detectionSettings.motion.resolution`,class:`cui-input-error`})]),_:1}),n.length?q(``,!0):($(),H(u,{key:0,severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:G(()=>[X(F(e.$t(`components.form.hint.motion_resolution`)),1)]),_:1}))]),_:1},8,[`model-value`]),Q(R(L),{"model-value":l.value.detectionSettings.motion.timeout,name:`detectionSettings.motion.timeout`,as:`div`,class:`flex flex-col field-gap`},{default:G(({errors:n})=>[V(`label`,Fl,F(e.$t(`components.form.label.motion_timeout`)),1),Q(i,null,{default:G(()=>[Q(m,{"model-value":l.value.detectionSettings.motion.timeout,invalid:n.length>0,loading:R(D),"show-buttons":``,min:10,"use-grouping":!1,onValueChange:t[16]||=e=>l.value.detectionSettings.motion.timeout=e??void 0,onInput:t[17]||=e=>l.value.detectionSettings.motion.timeout=e.value??void 0},null,8,[`model-value`,`invalid`,`loading`])]),_:2},1024),Q(N,{name:`fade`},{default:G(()=>[Q(R(I),{name:`detectionSettings.motion.timeout`,class:`cui-input-error`})]),_:1}),n.length?q(``,!0):($(),H(u,{key:0,severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:G(()=>[X(F(e.$t(`components.form.hint.motion_timeout`)),1)]),_:1}))]),_:1},8,[`model-value`]),Q(R(L),{"model-value":l.value.detectionSettings.object.confidence,name:`detectionSettings.object.confidence`,as:`div`,class:`flex flex-col field-gap`},{default:G(({errors:n})=>[V(`label`,Il,F(e.$t(`components.form.label.confidence`)),1),Q(i,null,{default:G(()=>[Q(m,{"model-value":l.value.detectionSettings.object.confidence,invalid:n.length>0,loading:R(D),"show-buttons":``,step:.01,max:1,mode:`decimal`,"use-grouping":!1,onValueChange:t[18]||=e=>l.value.detectionSettings.object.confidence=e??void 0,onInput:t[19]||=e=>l.value.detectionSettings.object.confidence=e.value??void 0},null,8,[`model-value`,`invalid`,`loading`])]),_:2},1024),Q(N,{name:`fade`},{default:G(()=>[Q(R(I),{name:`detectionSettings.object.confidence`,class:`cui-input-error`})]),_:1}),n.length?q(``,!0):($(),H(u,{key:0,severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:G(()=>[X(F(e.$t(`components.form.hint.confidence`)),1)]),_:1}))]),_:1},8,[`model-value`]),Q(R(L),{"model-value":l.value.detectionSettings.audio.minDecibels,name:`detectionSettings.audio.minDecibels`,as:`div`,class:`flex flex-col field-gap`},{default:G(({errors:n})=>[V(`label`,Ll,F(e.$t(`components.form.label.audio_min_decibels`)),1),Q(i,null,{default:G(()=>[Q(m,{"model-value":l.value.detectionSettings.audio.minDecibels,invalid:n.length>0,loading:R(D),"show-buttons":``,step:1,min:-100,max:0,mode:`decimal`,"use-grouping":!1,onValueChange:t[20]||=e=>l.value.detectionSettings.audio.minDecibels=e??void 0,onInput:t[21]||=e=>l.value.detectionSettings.audio.minDecibels=e.value??void 0},null,8,[`model-value`,`invalid`,`loading`])]),_:2},1024),Q(N,{name:`fade`},{default:G(()=>[Q(R(I),{name:`detectionSettings.audio.minDecibels`,class:`cui-input-error`})]),_:1}),n.length?q(``,!0):($(),H(u,{key:0,severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:G(()=>[X(F(e.$t(`components.form.hint.audio_min_decibels`)),1)]),_:1}))]),_:1},8,[`model-value`]),Q(R(L),{"model-value":l.value.detectionSettings.audio.timeout,name:`detectionSettings.audio.timeout`,as:`div`,class:`flex flex-col field-gap`},{default:G(({errors:n})=>[V(`label`,Rl,F(e.$t(`components.form.label.audio_timeout`)),1),Q(i,null,{default:G(()=>[Q(m,{"model-value":l.value.detectionSettings.audio.timeout,invalid:n.length>0,loading:R(D),"show-buttons":``,min:10,"use-grouping":!1,onValueChange:t[22]||=e=>l.value.detectionSettings.audio.timeout=e??void 0,onInput:t[23]||=e=>l.value.detectionSettings.audio.timeout=e.value??void 0},null,8,[`model-value`,`invalid`,`loading`])]),_:2},1024),Q(N,{name:`fade`},{default:G(()=>[Q(R(I),{name:`detectionSettings.audio.timeout`,class:`cui-input-error`})]),_:1}),n.length?q(``,!0):($(),H(u,{key:0,severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:G(()=>[X(F(e.$t(`components.form.hint.audio_timeout`)),1)]),_:1}))]),_:1},8,[`model-value`]),Q(R(L),{"model-value":l.value.detectionSettings.sensor?.timeout,name:`detectionSettings.sensor.timeout`,as:`div`,class:`flex flex-col field-gap`},{default:G(({errors:n})=>[V(`label`,zl,F(e.$t(`components.form.label.sensor_timeout`)),1),Q(i,null,{default:G(()=>[Q(m,{"model-value":l.value.detectionSettings.sensor?.timeout,invalid:n.length>0,loading:R(D),"show-buttons":``,min:10,"use-grouping":!1,onValueChange:t[24]||=e=>{l.value.detectionSettings.sensor||(l.value.detectionSettings.sensor={timeout:30,triggers:[]}),l.value.detectionSettings.sensor.timeout=e??30},onInput:t[25]||=e=>{l.value.detectionSettings.sensor||(l.value.detectionSettings.sensor={timeout:30,triggers:[]}),l.value.detectionSettings.sensor.timeout=e.value??30}},null,8,[`model-value`,`invalid`,`loading`])]),_:2},1024),Q(N,{name:`fade`},{default:G(()=>[Q(R(I),{name:`detectionSettings.sensor.timeout`,class:`cui-input-error`})]),_:1}),n.length?q(``,!0):($(),H(u,{key:0,severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:G(()=>[X(F(e.$t(`components.form.hint.sensor_timeout`)),1)]),_:1}))]),_:1},8,[`model-value`]),Q(R(L),{"model-value":l.value.detectionSettings.sensor?.triggers??[],name:`detectionSettings.sensor.triggers`,as:`div`,class:`flex flex-col field-gap`},{default:G(({errors:t})=>[V(`label`,Bl,F(e.$t(`components.form.label.sensor_triggers`)),1),Q(g,{"model-value":R(oe),invalid:t.length>0,options:R(ie),"option-label":`label`,"option-value":`value`,placeholder:e.$t(`components.form.hint.sensor_triggers_placeholder`),class:`w-full`,"show-toggle-all":!1,"onUpdate:modelValue":ce},null,8,[`model-value`,`invalid`,`options`,`placeholder`]),Q(N,{name:`fade`},{default:G(()=>[Q(R(I),{name:`detectionSettings.sensor.triggers`,class:`cui-input-error`})]),_:1}),t.length?q(``,!0):($(),H(u,{key:0,severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:G(()=>[X(F(e.$t(`components.form.hint.sensor_triggers`)),1)]),_:1}))]),_:1},8,[`model-value`])])]),_:1})]),_:1}),Q(p,{value:`ptzAutotrack`},{default:G(()=>[Q(n,{class:`px-0`},{default:G(()=>[V(`span`,Vl,F(e.$t(`components.camera_options.ptz_autotrack`)),1)]),_:1}),Q(f,{pt:{content:{class:`px-0`}}},{default:G(()=>[V(`div`,Hl,[R(re)?q(``,!0):($(),H(u,{key:0,severity:`secondary`,variant:`simple`,size:`small`,class:`cui-banner cui-banner-warn`},{default:G(()=>[Q(_,{class:`w-4 h-4 shrink-0 inline-block mr-1`}),X(` `+F(e.$t(`components.form.hint.ptz_autotrack_requires`)),1)]),_:1})),Q(R(L),{"model-value":l.value.ptzAutotrack?.enabled,value:!0,"unchecked-value":!1,type:`checkbox`,name:`ptzAutotrack.enabled`,as:`div`,class:`flex flex-col field-gap cui-toggle-switch`},{default:G(({field:n,errors:r})=>[V(`div`,Ul,[V(`div`,Wl,[V(`label`,Gl,F(e.$t(`components.form.label.ptz_autotrack_enabled`)),1),Q(u,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-switch-hint`},{default:G(()=>[X(F(e.$t(`components.form.hint.ptz_autotrack`)),1)]),_:1}),Q(N,{name:`fade`},{default:G(()=>[Q(R(I),{name:`ptzAutotrack.enabled`,class:`cui-input-switch-error`})]),_:1})]),Q(d,lt({"model-value":l.value.ptzAutotrack?.enabled},n,{invalid:r.length>0,loading:R(D),disabled:!R(re),class:`ml-auto shrink-0`,onValueChange:t[26]||=e=>{l.value.ptzAutotrack&&(l.value.ptzAutotrack.enabled=e)}}),null,16,[`model-value`,`invalid`,`loading`,`disabled`])])]),_:1},8,[`model-value`]),l.value.ptzAutotrack?.enabled&&R(re)?($(),U(K,{key:1},[Q(R(L),{"model-value":l.value.ptzAutotrack?.targetLabels,name:`ptzAutotrack.targetLabels`,as:`div`,class:`flex flex-col field-gap`},{default:G(({errors:n})=>[V(`label`,Kl,F(e.$t(`components.form.label.ptz_autotrack_target_labels`)),1),Q(g,{"model-value":l.value.ptzAutotrack?.targetLabels,options:R(E),"option-label":`label`,"option-value":`value`,invalid:n.length>0,loading:R(D),class:`w-full`,onValueChange:t[27]||=e=>{l.value.ptzAutotrack&&(l.value.ptzAutotrack.targetLabels=e)}},null,8,[`model-value`,`options`,`invalid`,`loading`]),Q(u,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:G(()=>[X(F(e.$t(`components.form.hint.ptz_autotrack_target_labels`)),1)]),_:1})]),_:1},8,[`model-value`]),Q(R(L),{"model-value":l.value.ptzAutotrack?.minConfidence,name:`ptzAutotrack.minConfidence`,as:`div`,class:`flex flex-col field-gap`},{default:G(({errors:n})=>[V(`label`,ql,F(e.$t(`components.form.label.ptz_autotrack_min_confidence`)),1),Q(m,{"model-value":l.value.ptzAutotrack?.minConfidence,min:.3,max:1,step:.05,"min-fraction-digits":2,"max-fraction-digits":2,invalid:n.length>0,loading:R(D),class:`w-full`,onValueChange:t[28]||=e=>{l.value.ptzAutotrack&&e!=null&&(l.value.ptzAutotrack.minConfidence=e)}},null,8,[`model-value`,`invalid`,`loading`]),Q(u,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:G(()=>[X(F(e.$t(`components.form.hint.ptz_autotrack_min_confidence`)),1)]),_:1})]),_:1},8,[`model-value`]),Q(R(L),{"model-value":l.value.ptzAutotrack?.triggerDeadZone,name:`ptzAutotrack.triggerDeadZone`,as:`div`,class:`flex flex-col field-gap`},{default:G(({errors:n})=>[V(`label`,Jl,F(e.$t(`components.form.label.ptz_autotrack_trigger_dead_zone`)),1),Q(m,{"model-value":l.value.ptzAutotrack?.triggerDeadZone,min:0,max:.3,step:.01,"min-fraction-digits":2,"max-fraction-digits":2,invalid:n.length>0,loading:R(D),class:`w-full`,onValueChange:t[29]||=e=>{l.value.ptzAutotrack&&e!=null&&(l.value.ptzAutotrack.triggerDeadZone=e)}},null,8,[`model-value`,`invalid`,`loading`]),Q(u,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:G(()=>[X(F(e.$t(`components.form.hint.ptz_autotrack_trigger_dead_zone`)),1)]),_:1})]),_:1},8,[`model-value`]),Q(R(L),{"model-value":l.value.ptzAutotrack?.returnToHome,value:!0,"unchecked-value":!1,type:`checkbox`,name:`ptzAutotrack.returnToHome`,as:`div`,class:`flex flex-col field-gap cui-toggle-switch`},{default:G(({field:n,errors:r})=>[V(`div`,Yl,[V(`div`,Xl,[V(`label`,Zl,F(e.$t(`components.form.label.ptz_autotrack_return_home`)),1),Q(u,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-switch-hint`},{default:G(()=>[X(F(e.$t(`components.form.hint.ptz_autotrack_return_home`)),1)]),_:1}),Q(N,{name:`fade`},{default:G(()=>[Q(R(I),{name:`ptzAutotrack.returnToHome`,class:`cui-input-switch-error`})]),_:1})]),Q(d,lt({"model-value":l.value.ptzAutotrack?.returnToHome},n,{invalid:r.length>0,loading:R(D),class:`ml-auto shrink-0`,onValueChange:t[30]||=e=>{l.value.ptzAutotrack&&(l.value.ptzAutotrack.returnToHome=e)}}),null,16,[`model-value`,`invalid`,`loading`])])]),_:1},8,[`model-value`]),l.value.ptzAutotrack?.returnToHome?($(),H(R(L),{key:0,"model-value":l.value.ptzAutotrack?.homeWaitMs,name:`ptzAutotrack.homeWaitMs`,as:`div`,class:`flex flex-col field-gap`},{default:G(({errors:n})=>[V(`label`,Ql,F(e.$t(`components.form.label.ptz_autotrack_home_wait`)),1),Q(m,{"model-value":(l.value.ptzAutotrack?.homeWaitMs??0)/1e3,min:1,max:60,step:1,suffix:` s`,invalid:n.length>0,loading:R(D),class:`w-full`,onValueChange:t[31]||=e=>{l.value.ptzAutotrack&&e!=null&&(l.value.ptzAutotrack.homeWaitMs=e*1e3)}},null,8,[`model-value`,`invalid`,`loading`]),Q(u,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:G(()=>[X(F(e.$t(`components.form.hint.ptz_autotrack_home_wait`)),1)]),_:1})]),_:1},8,[`model-value`])):q(``,!0)],64)):q(``,!0)])]),_:1})]),_:1}),Q(p,{value:`zones`},{default:G(()=>[Q(n,{class:`px-0`},{default:G(()=>[V(`span`,$l,F(e.$t(`components.camera_options.zones`)),1)]),_:1}),Q(f,{pt:{content:{class:`px-0`}}},{default:G(()=>[V(`div`,eu,[Q(s,{fluid:``,class:`cui-button-medium`,loading:R(D),label:e.$t(`components.form.button.edit_zones`),onClick:t[32]||=e=>de(R(h).detectionZones)},null,8,[`loading`,`label`])])]),_:1})]),_:1}),Q(p,{value:`snapshot`},{default:G(()=>[Q(n,{class:`px-0`},{default:G(()=>[V(`span`,tu,F(e.$t(`components.camera_options.snapshot`)),1)]),_:1}),Q(f,{pt:{content:{class:`px-0`}}},{default:G(()=>[V(`div`,nu,[V(`div`,ru,[Q(R(L),{"model-value":l.value.snapshotSettings.autoRefresh,value:!0,"unchecked-value":!1,type:`checkbox`,name:`snapshotSettings.autoRefresh`,as:`div`,class:`flex flex-col field-gap cui-toggle-switch`},{default:G(({field:n,errors:r})=>[V(`div`,iu,[V(`div`,au,[V(`label`,ou,F(e.$t(`components.form.label.auto_refresh`)),1),Q(u,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-switch-hint`},{default:G(()=>[X(F(e.$t(`components.form.hint.auto_refresh`)),1)]),_:1}),Q(N,{name:`fade`},{default:G(()=>[Q(R(I),{name:`snapshotSettings.autoRefresh`,class:`cui-input-switch-error`})]),_:1})]),Q(d,lt({"model-value":l.value.snapshotSettings.autoRefresh},n,{invalid:r.length>0,loading:R(D),class:`ml-auto shrink-0`,onValueChange:t[33]||=e=>l.value.snapshotSettings.autoRefresh=e}),null,16,[`model-value`,`invalid`,`loading`])])]),_:1},8,[`model-value`])]),Q(R(L),{"model-value":l.value.snapshotSettings.ttl,name:`snapshotSettings.ttl`,as:`div`,class:`flex flex-col field-gap`},{default:G(({errors:n})=>[V(`label`,su,F(e.$t(`components.form.label.cache_time`)),1),Q(i,null,{default:G(()=>[Q(m,{"model-value":l.value.snapshotSettings.ttl,invalid:n.length>0,loading:R(D),min:10,"show-buttons":``,"use-grouping":!1,onValueChange:t[34]||=e=>l.value.snapshotSettings.ttl=e??10,onInput:t[35]||=e=>l.value.snapshotSettings.ttl=e.value??10},null,8,[`model-value`,`invalid`,`loading`])]),_:2},1024),Q(N,{name:`fade`},{default:G(()=>[Q(R(I),{name:`snapshotSettings.ttl`,class:`cui-input-error`})]),_:1}),n.length?q(``,!0):($(),H(u,{key:0,severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:G(()=>[X(F(e.$t(`components.form.hint.cache_time`)),1)]),_:1}))]),_:1},8,[`model-value`]),Q(R(L),{"model-value":l.value.snapshotSettings.interval,name:`snapshotSettings.interval`,as:`div`,class:`flex flex-col field-gap`},{default:G(({errors:n})=>[V(`label`,cu,F(e.$t(`components.form.label.refresh_interval`)),1),Q(i,null,{default:G(()=>[Q(m,{"model-value":l.value.snapshotSettings.interval,invalid:n.length>0,loading:R(D),min:10,max:60,"show-buttons":``,"use-grouping":!1,onValueChange:t[36]||=e=>l.value.snapshotSettings.interval=e??30,onInput:t[37]||=e=>l.value.snapshotSettings.interval=e.value??30},null,8,[`model-value`,`invalid`,`loading`])]),_:2},1024),Q(N,{name:`fade`},{default:G(()=>[Q(R(I),{name:`snapshotSettings.interval`,class:`cui-input-error`})]),_:1}),n.length?q(``,!0):($(),H(u,{key:0,severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:G(()=>[X(F(e.$t(`components.form.hint.refresh_interval`)),1)]),_:1}))]),_:1},8,[`model-value`])])]),_:1})]),_:1}),Q(p,{value:`frameworker`},{default:G(()=>[Q(n,{class:`px-0`},{default:G(()=>[V(`span`,lu,F(e.$t(`components.camera_options.frame_worker`)),1)]),_:1}),Q(f,{pt:{content:{class:`px-0`}}},{default:G(()=>[V(`div`,uu,[Q(R(L),{"model-value":l.value.frameWorkerSettings.fps,name:`frameWorkerSettings.fps`,as:`div`,class:`flex flex-col field-gap`},{default:G(({errors:n})=>[V(`label`,du,F(e.$t(`components.form.label.fps`)),1),Q(i,null,{default:G(()=>[Q(m,{"model-value":l.value.frameWorkerSettings.fps,invalid:n.length>0,loading:R(D),min:0,"show-buttons":``,"use-grouping":!1,onValueChange:t[38]||=e=>l.value.frameWorkerSettings.fps=e??void 0,onInput:t[39]||=e=>l.value.frameWorkerSettings.fps=e.value??void 0},null,8,[`model-value`,`invalid`,`loading`])]),_:2},1024),Q(N,{name:`fade`},{default:G(()=>[Q(R(I),{name:`frameWorkerSettings.fps`,class:`cui-input-error`})]),_:1}),n.length?q(``,!0):($(),H(u,{key:0,severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:G(()=>[X(F(e.$t(`components.form.hint.frameworker_fps`)),1)]),_:1}))]),_:1},8,[`model-value`])])]),_:1})]),_:1})]),_:1})}}}),pu={viewBox:`0 0 16 16`,width:`1.2em`,height:`1.2em`};function mu(e,t){return $(),U(`svg`,pu,[...t[0]||=[V(`path`,{fill:`currentColor`,d:`M6.97.47a.75.75 0 0 1 1.06 0l1.75 1.75a.75.75 0 0 1 0 1.06L8.03 5.03a.75.75 0 0 1-1.06-1.06l.43-.43a4.5 4.5 0 0 0-2.28 7.918a.75.75 0 0 1-.961 1.152A6 6 0 0 1 7.463 2.024L6.97 1.53a.75.75 0 0 1 0-1.06m3.815 3.016a.75.75 0 0 1 1.056-.096a6 6 0 0 1-3.304 10.586l.493.494a.75.75 0 1 1-1.06 1.06l-1.75-1.75a.75.75 0 0 1 0-1.06l1.75-1.75a.75.75 0 0 1 1.06 1.06l-.43.43a4.5 4.5 0 0 0 2.28-7.918a.75.75 0 0 1-.095-1.056`},null,-1)]])}var hu=Y({name:`fluent-arrow-sync-16-filled`,render:mu}),gu={class:`flex items-center justify-between`},_u={class:`cui-label`},vu={class:`flex flex-col field-gap`},yu={class:`cui-label`},bu={class:`cui-label`},xu={class:`cui-label`},Su={key:0,class:`flex flex-col field-gap`},Cu={class:`cui-label`},wu={key:1,class:`flex flex-col field-gap`},Tu={class:`cui-label`},Eu=Z({__name:`CameraSource`,props:{cameraId:{},cameraName:{},source:{},loading:{type:Boolean}},setup(e){let t=new wr,n=e,{t:r}=le(),{getSourceStatus:i,connect:a}=ti(),{copy:o}=Me({legacy:!0}),s=ct(),l=Ue(),u=[`probe`,`preload`],{cameraId:d,cameraName:f,source:p,loading:m}=Dt(n),h=W(!1),{data:g,isBusy:_}=t.probeCameraSourceQuery(f.value,p.value.name,{video:!0,audio:!0,microphone:!0});a();let v=J(()=>i(d.value,p.value.name)),y=J(()=>{switch(v.value){case`connected`:return`success`;case`connecting`:return`warn`;case`error`:return`danger`;default:return`secondary`}}),b=J(()=>{switch(v.value){case`connected`:return r(`components.camera_table.online`);case`connecting`:return r(`components.camera_table.connecting`);case`error`:return r(`components.camera_table.error`);default:return r(`components.camera_table.idle`)}}),ee=J(()=>!!(m.value||_.value)),x=J(()=>g.value?.probe.consumers.filter(e=>!u.includes(e.format_name)).length||0),S=J(()=>te(`video`)),C=J(()=>te(`audio`));function te(e){let t=(g.value?.probe.producers??[]).flatMap(e=>e.receivers??[]).filter(t=>t.codec.codec_type===e).map(e=>e.codec.codec_name);return[...new Set(t)]}async function w(){if(!h.value){h.value=!0;try{let e=await Cr({cameraname:f.value,sourcename:p.value.name,probeConfig:{video:!0,audio:!0,microphone:!0},force:!0});s.setQueryData([`cameras`,f.value,`probe`,p.value.name],e)}catch{l.add({severity:`error`,detail:r(`components.toast.probe_failed`),life:3e3})}finally{h.value=!1}}}return(e,t)=>{let n=qn,r=ke,i=c,a=zn,s=Vn,l=sr,u=Tr,d=Ln;return $(),U(K,null,[V(`div`,gu,[V(`label`,_u,F(e.$t(`components.form.label.stream_status`)),1),Q(n,{severity:R(y),value:R(b)},null,8,[`severity`,`value`])]),V(`div`,vu,[V(`label`,yu,F(e.$t(`components.form.label.connections`)),1),Q(s,null,{default:G(()=>[Q(r,{value:R(x),loading:R(ee),readonly:``,type:`text`},null,8,[`value`,`loading`]),Q(a,null,{default:G(()=>[Ft(($(),H(i,{severity:`secondary`,text:``,loading:R(h),disabled:R(ee),onClick:w},{icon:G(()=>[Q(R(hu),{class:`w-4 h-4`})]),_:1},8,[`loading`,`disabled`])),[[d,e.$t(`components.form.button.reload`),void 0,{left:!0}]])]),_:1})]),_:1}),Q(l,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:G(()=>[X(F(e.$t(`components.form.hint.connections`)),1)]),_:1})]),($(!0),U(K,null,B(R(S),(t,n)=>($(),U(`div`,{key:n,class:`flex flex-col field-gap`},[V(`label`,bu,F(e.$t(`components.form.label.video_codec`)),1),Q(s,null,{default:G(()=>[Q(r,{"model-value":t,loading:R(ee),readonly:``,type:`text`},null,8,[`model-value`,`loading`])]),_:2},1024),n===R(S).length-1?($(),H(l,{key:0,severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:G(()=>[X(F(e.$t(`components.form.hint.video_codec`)),1)]),_:1})):q(``,!0)]))),128)),($(!0),U(K,null,B(R(C),(t,n)=>($(),U(`div`,{key:n,class:`flex flex-col field-gap`},[V(`label`,xu,F(e.$t(`components.form.label.audio_codec`)),1),Q(s,null,{default:G(()=>[Q(r,{"model-value":t,loading:R(ee),readonly:``,type:`text`},null,8,[`model-value`,`loading`])]),_:2},1024),n===R(C).length-1?($(),H(l,{key:0,severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:G(()=>[X(F(e.$t(`components.form.hint.audio_codec`)),1)]),_:1})):q(``,!0)]))),128)),R(p).role===`snapshot`?q(``,!0):($(),U(`div`,Su,[V(`label`,Cu,F(e.$t(`components.form.label.rtsp_url`)),1),Q(s,null,{default:G(()=>[Q(r,{"model-value":R(g)?.rtspUrl,loading:R(ee),readonly:``,type:`text`},null,8,[`model-value`,`loading`]),Q(a,null,{default:G(()=>[Q(u,{"action-text":e.$t(`components.form.tooltip.copied`),icon:R(Er),"button-props":{severity:`secondary`,disabled:!R(g)?.rtspUrl,loading:R(ee),text:!0},onAction:t[0]||=e=>R(o)(R(g).rtspUrl)},null,8,[`action-text`,`icon`,`button-props`])]),_:1})]),_:1}),Q(l,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:G(()=>[X(F(e.$t(`components.form.hint.rtsp_url`)),1)]),_:1})])),R(p).role===`snapshot`?q(``,!0):($(),U(`div`,wu,[V(`label`,Tu,F(e.$t(`components.form.label.onvif_url`)),1),Q(s,null,{default:G(()=>[Q(r,{"model-value":R(g)?.onvifUrl,loading:R(ee),readonly:``,type:`text`},null,8,[`model-value`,`loading`]),Q(a,null,{default:G(()=>[Q(u,{"action-text":e.$t(`components.form.tooltip.copied`),icon:R(Er),"button-props":{severity:`secondary`,disabled:!R(g)?.onvifUrl,loading:R(ee),text:!0},onAction:t[1]||=e=>R(o)(R(g).onvifUrl)},null,8,[`action-text`,`icon`,`button-props`])]),_:1})]),_:1}),Q(l,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:G(()=>[X(F(e.$t(`components.form.hint.onvif_url`)),1)]),_:1})]))],64)}}}),Du={class:`flex gap-2 items-center w-full`},Ou={class:`text-color font-normal`},ku={class:`flex flex-col gap-6`},Au=[`for`],ju=[`for`],Mu={class:`w-full flex flex-col gap-2`},Nu={class:`flex items-center gap-4`},Pu={class:`flex flex-col field-switch-gap`},Fu=[`for`],Iu={class:`flex items-center gap-4`},Lu={class:`flex flex-col field-switch-gap`},Ru=[`for`],zu={class:`flex items-center gap-4`},Bu={class:`flex flex-col field-switch-gap`},Vu=[`for`],Hu=[`for`],Uu={class:`flex flex-col gap-6`},Wu={class:`flex flex-col field-gap`},Gu=[`for`],Ku={class:`w-full flex items-center justify-center my-3`},qu=Z({__name:`Sources`,props:jt({camera:{},cameraDevice:{},loading:{type:Boolean},latestSnapshotSrc:{}},{modelValue:{required:!0},modelModifiers:{}}),emits:jt([`close`],[`update:modelValue`]),setup(e){let t=e,n=xt(e,`modelValue`),{t:r}=le(),{camera:i,loading:a}=Dt(t),o=W([`high-resolution`,`mid-resolution`,`low-resolution`,`snapshot`]);function s(e){return e.name.replace(/ /g,`_`).toLowerCase()}function l(e){let t=[{label:r(`components.form.label.none`),value:void 0}],i=n.value.sources[e],a=n.value;for(let e of a.sources)e.role!==`snapshot`&&e._id!==i._id&&(!e.name||!e._id||t.push({label:e.name,value:e._id}));return t}function u(e){return n.value.sources[e].childSourceId}function d(e,t){t==null?n.value.sources[e].childSourceId=null:n.value.sources[e].childSourceId=t}function f(e){n.value.sources[e].urls.push(``)}function p(e){n.value.sources.splice(e,1)}function m(e,t){n.value.sources[e].urls.splice(t,1)}function h(){n.value&&n.value.sources.push({_id:``,name:``,role:null,urls:[],useForSnapshot:!1,hotMode:!0,preload:!0})}return(e,t)=>{let r=kn,g=c,_=Bn,v=ke,y=Vn,b=sr,ee=Eu,x=Xn,S=Rn,C=zn,te=Zn,w=Nn,T=Pn,ne=Wr;return $(),U(K,null,[Q(T,{multiple:``,class:`p-4`},{default:G(()=>[($(!0),U(K,null,B(n.value.sources,(t,c)=>($(),H(w,{key:c,value:c},{default:G(()=>[Q(_,{class:P({"px-0 pt-0":c===0,"px-0":c!==0})},{default:G(()=>[V(`div`,Du,[V(`span`,Ou,F(e.$t(`components.camera_options.source`)+`: `+s(t)),1),Q(g,{text:``,rounded:``,loading:R(a),disabled:n.value.sources.length<2,severity:`danger`,class:`cui-icon-md ml-auto mr-2`,onClick:e=>p(c)},{icon:G(()=>[Q(r,{width:`100%`,height:`100%`})]),_:1},8,[`loading`,`disabled`,`onClick`])])]),_:2},1032,[`class`]),Q(te,{pt:{content:{class:`px-0`}}},{default:G(()=>[V(`div`,ku,[Q(R(L),{modelValue:t.name,"onUpdate:modelValue":e=>t.name=e,modelModifiers:{trim:!0},name:`sources[${c}].name`,as:`div`,class:`flex flex-col field-gap`},{default:G(({field:n,errors:r})=>[V(`label`,{for:`sources[${c}].name`,class:`cui-label`},F(e.$t(`components.form.label.source_name`)),9,Au),Q(y,null,{default:G(()=>[Q(v,lt({ref_for:!0},n,{invalid:r.length>0,loading:R(a),readonly:R(i).sources.some(e=>e.name===t.name),type:`text`}),null,16,[`invalid`,`loading`,`readonly`])]),_:2},1024),Q(N,{name:`fade`},{default:G(()=>[Q(R(I),{name:`sources[${c}].name`,class:`cui-input-error`},null,8,[`name`])]),_:2},1024),r.length?q(``,!0):($(),H(b,{key:0,severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:G(()=>[X(F(e.$t(`components.form.hint.source_name`)),1)]),_:1}))]),_:2},1032,[`modelValue`,`onUpdate:modelValue`,`name`]),t._id?($(),H(ee,{key:0,"camera-id":R(i)._id,"camera-name":R(i).name,source:t,loading:R(a)},null,8,[`camera-id`,`camera-name`,`source`,`loading`])):q(``,!0),Q(R(L),{"model-value":t.role,name:`sources[${c}].role`,as:`div`,class:`flex flex-col field-gap`},{default:G(({errors:r})=>[V(`label`,{for:`sources[${c}].role`,class:`cui-label`},F(e.$t(`components.form.label.source_role`)),9,ju),Q(y,null,{default:G(()=>[Q(x,{"model-value":t.role,options:R(o).filter(e=>!n.value.sources.some(n=>n.role===e&&n._id!==t._id)),invalid:r.length>0,loading:R(a),onValueChange:e=>t.role=e},null,8,[`model-value`,`options`,`invalid`,`loading`,`onValueChange`])]),_:2},1024),Q(N,{name:`fade`},{default:G(()=>[Q(R(I),{name:`sources[${c}].role`,class:`cui-input-error`},null,8,[`name`])]),_:2},1024),r.length?q(``,!0):($(),H(b,{key:0,severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:G(()=>[X(F(e.$t(`components.form.hint.source_role`)),1)]),_:1}))]),_:2},1032,[`model-value`,`name`]),V(`div`,Mu,[t.role!==`snapshot`&&n.value.sources.length>1?($(),H(R(L),{key:0,"model-value":t.useForSnapshot,value:!0,"unchecked-value":!1,type:`checkbox`,name:`sources[${c}].useForSnapshot`,as:`div`,class:`flex flex-col field-gap cui-toggle-switch`},{default:G(({field:r,errors:i})=>[V(`div`,Nu,[V(`div`,Pu,[V(`label`,{for:`sources[${c}].useForSnapshot`,class:`cui-label-switch`},F(e.$t(`components.form.label.use_for_snapshot`)),9,Fu),Q(b,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-switch-hint`},{default:G(()=>[X(F(e.$t(`components.form.hint.use_for_snapshot`)),1)]),_:1}),Q(N,{name:`fade`},{default:G(()=>[Q(R(I),{name:`sources[${c}].useForSnapshot`,class:`cui-input-switch-error`},null,8,[`name`])]),_:2},1024)]),Q(S,lt({"model-value":t.useForSnapshot},{ref_for:!0},r,{invalid:i.length>0,loading:R(a),disabled:n.value.sources.some(e=>(e.useForSnapshot||e.role===`snapshot`)&&e._id!==t._id),class:`ml-auto shrink-0`,onValueChange:e=>t.useForSnapshot=e}),null,16,[`model-value`,`invalid`,`loading`,`disabled`,`onValueChange`])])]),_:2},1032,[`model-value`,`name`])):q(``,!0),t.role===`snapshot`?q(``,!0):($(),H(R(L),{key:1,"model-value":t.hotMode,value:!0,"unchecked-value":!1,type:`checkbox`,name:`sources[${c}].hotMode`,as:`div`,class:`flex flex-col field-gap cui-toggle-switch`},{default:G(({field:n,errors:r})=>[V(`div`,Iu,[V(`div`,Lu,[V(`label`,{for:`sources[${c}].hotMode`,class:`cui-label-switch`},F(e.$t(`components.form.label.hot_mode`)),9,Ru),Q(b,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-switch-hint`},{default:G(()=>[X(F(e.$t(`components.form.hint.hot_mode`)),1)]),_:1}),Q(N,{name:`fade`},{default:G(()=>[Q(R(I),{name:`sources[${c}].hotMode`,class:`cui-input-switch-error`},null,8,[`name`])]),_:2},1024)]),Q(S,lt({"model-value":t.hotMode},{ref_for:!0},n,{invalid:r.length>0,loading:R(a),class:`ml-auto shrink-0`,onValueChange:e=>t.hotMode=e}),null,16,[`model-value`,`invalid`,`loading`,`onValueChange`])])]),_:2},1032,[`model-value`,`name`])),t.role===`snapshot`?q(``,!0):($(),H(R(L),{key:2,"model-value":t.preload,value:!0,"unchecked-value":!1,type:`checkbox`,name:`sources[${c}].preload`,as:`div`,class:`flex flex-col field-gap cui-toggle-switch`},{default:G(({field:n,errors:r})=>[V(`div`,zu,[V(`div`,Bu,[V(`label`,{for:`sources[${c}].preload`,class:`cui-label-switch`},F(e.$t(`components.form.label.preload`)),9,Vu),Q(b,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-switch-hint`},{default:G(()=>[X(F(e.$t(`components.form.hint.preload`)),1)]),_:1}),Q(N,{name:`fade`},{default:G(()=>[Q(R(I),{name:`sources[${c}].preload`,class:`cui-input-switch-error`},null,8,[`name`])]),_:2},1024)]),Q(S,lt({"model-value":t.preload},{ref_for:!0},n,{invalid:r.length>0,loading:R(a),class:`ml-auto shrink-0`,onValueChange:e=>t.preload=e}),null,16,[`model-value`,`invalid`,`loading`,`onValueChange`])])]),_:2},1032,[`model-value`,`name`]))]),t.role===`snapshot`?q(``,!0):($(),H(R(L),{key:1,"model-value":u(c),name:`sources[${c}].childSourceId`,as:`div`,class:`flex flex-col field-gap`},{default:G(({errors:t})=>[V(`label`,{for:`sources[${c}].childSourceId`,class:`cui-label`},F(e.$t(`components.form.label.pip_source`)),9,Hu),Q(y,null,{default:G(()=>[Q(x,{"model-value":u(c),options:l(c),"option-label":`label`,"option-value":`value`,invalid:t.length>0,loading:R(a),placeholder:e.$t(`components.form.label.none`),"show-clear":``,onValueChange:e=>d(c,e)},null,8,[`model-value`,`options`,`invalid`,`loading`,`placeholder`,`onValueChange`])]),_:2},1024),Q(N,{name:`fade`},{default:G(()=>[Q(R(I),{name:`sources[${c}].childSourceId`,class:`cui-input-error`},null,8,[`name`])]),_:2},1024),t.length?q(``,!0):($(),H(b,{key:0,severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:G(()=>[X(F(e.$t(`components.form.hint.pip_source`)),1)]),_:1}))]),_:2},1032,[`model-value`,`name`])),V(`div`,Uu,[V(`div`,Wu,[V(`label`,{for:`sources[${c}].urls[]`,class:`cui-label`},F(e.$t(`components.form.label.sources`)),9,Gu),Q(b,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:G(()=>[X(F(e.$t(`components.form.hint.source_urls`)),1)]),_:1})]),($(!0),U(K,null,B(t.urls,(e,n)=>($(),H(R(L),{key:n,modelValue:t.urls[n],"onUpdate:modelValue":e=>t.urls[n]=e,modelModifiers:{trim:!0},name:`sources[${c}].urls[${n}]`,as:`div`,class:`flex flex-col field-gap`},{default:G(({field:e,errors:i})=>[Q(y,null,{default:G(()=>[Q(v,lt({ref_for:!0},e,{invalid:i.length>0,loading:R(a),type:`text`}),null,16,[`invalid`,`loading`]),t.urls.length>1?($(),H(C,{key:0},{default:G(()=>[Q(g,{text:``,severity:`secondary`,loading:R(a),class:`cui-icon-md`,onClick:e=>m(c,n)},{icon:G(()=>[Q(r,{width:`100%`,height:`100%`})]),_:1},8,[`loading`,`onClick`])]),_:2},1024)):q(``,!0)]),_:2},1024),Q(N,{name:`fade`},{default:G(()=>[Q(R(I),{name:`sources[${c}].urls[${n}]`,class:`cui-input-error`},null,8,[`name`])]),_:2},1024)]),_:2},1032,[`modelValue`,`onUpdate:modelValue`,`name`]))),128)),Q(g,{loading:R(a),label:e.$t(`components.form.button.add_source`),class:`ml-auto cui-button-medium`,onClick:e=>f(c)},null,8,[`loading`,`label`,`onClick`])])])]),_:2},1024)]),_:2},1032,[`value`]))),128))]),_:1}),V(`div`,Ku,[Q(g,{text:``,rounded:``,loading:R(a),class:`cui-icon-xl`,onClick:h},{icon:G(()=>[Q(ne,{width:`100%`,height:`100%`})]),_:1},8,[`loading`])])],64)}}}),Ju={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function Yu(e,t){return $(),U(`svg`,Ju,[...t[0]||=[V(`path`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`M10 17h.01M10 7v6m4-7h2a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2h-2m8-4v-4M6 18H4a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h2`},null,-1)]])}var Xu=Y({name:`lucide-battery-warning`,render:Yu}),Zu={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function Qu(e,t){return $(),U(`svg`,Zu,[...t[0]||=[V(`g`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`},[V(`path`,{d:`M22 14v-4M6 14v-4`}),V(`rect`,{width:`16`,height:`12`,x:`2`,y:`6`,rx:`2`})],-1)]])}var $u=Y({name:`lucide-battery-low`,render:Qu}),ed={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function td(e,t){return $(),U(`svg`,ed,[...t[0]||=[V(`g`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`},[V(`path`,{d:`M10 14v-4m12 4v-4M6 14v-4`}),V(`rect`,{width:`16`,height:`12`,x:`2`,y:`6`,rx:`2`})],-1)]])}var nd=Y({name:`lucide-battery-medium`,render:td}),rd={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function id(e,t){return $(),U(`svg`,rd,[...t[0]||=[V(`g`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`},[V(`path`,{d:`M10 10v4m4-4v4m8 0v-4M6 10v4`}),V(`rect`,{width:`16`,height:`12`,x:`2`,y:`6`,rx:`2`})],-1)]])}var ad=Y({name:`lucide-battery-full`,render:id}),od={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function sd(e,t){return $(),U(`svg`,od,[...t[0]||=[V(`path`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`m11 7l-3 5h4l-3 5m5.856-11H16a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2h-2.935M22 14v-4M5.14 18H4a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h2.936`},null,-1)]])}var cd=Y({name:`lucide-battery-charging`,render:sd}),ld={class:`cui-battery-info__header`},ud={class:`cui-battery-info__icon`},dd={class:`cui-battery-info__info`},fd={key:0,class:`cui-battery-info__label`},pd={class:`cui-battery-info__bar`},md=hn(Z({__name:`CuiBatteryInfo`,props:{level:{default:100},charging:{default:`NOT_CHARGING`},low:{type:Boolean,default:!1},label:{},disabled:{type:Boolean,default:!1},size:{default:`medium`}},setup(e){let t=e,{t:n}=le(),{level:r,label:i,disabled:a,size:o,charging:s,low:c}=Dt(t),l=J(()=>s.value===`CHARGING`),u=J(()=>s.value===`FULL`||r.value===100),d=J(()=>c.value||r.value<=20),f=J(()=>s.value===`CHARGING`?n(`components.battery_info.charging`):s.value===`FULL`?n(`components.battery_info.fully_charged`):s.value===`NOT_CHARGEABLE`?n(`components.battery_info.not_chargeable`):r.value<=10?n(`components.battery_info.critically_low`):r.value<=20?n(`components.battery_info.low`):n(`components.battery_info.ready`)),p=J(()=>l.value?`cui-battery-info__status--charging`:u.value?`cui-battery-info__status--full`:r.value<=10?`cui-battery-info__status--critical`:d.value?`cui-battery-info__status--low`:``),m=J(()=>l.value?`cui-battery-info__level--charging`:u.value?`cui-battery-info__level--full`:r.value<=10?`cui-battery-info__level--critical`:d.value?`cui-battery-info__level--low`:``),h=J(()=>({color:`rgb(59, 130, 246)`,filter:`drop-shadow(0 0 6px rgba(59, 130, 246, 0.5))`})),g=J(()=>({color:`rgb(34, 197, 94)`,filter:`drop-shadow(0 0 6px rgba(34, 197, 94, 0.5))`})),_=J(()=>({color:`rgb(34, 197, 94)`})),v=J(()=>({color:`rgb(234, 179, 8)`})),y=J(()=>({color:`rgb(239, 68, 68)`,filter:`drop-shadow(0 0 6px rgba(239, 68, 68, 0.5))`})),b=J(()=>{let e=`rgb(34, 197, 94)`;return l.value?e=`rgb(59, 130, 246)`:r.value<=10?e=`rgb(239, 68, 68)`:r.value<=20&&(e=`rgb(234, 179, 8)`),{width:`${r.value}%`,backgroundColor:e}});return(e,t)=>{let n=cd,s=ad,c=nd,u=$u,ee=Xu;return $(),U(`div`,{class:P([`cui-battery-info`,[`cui-battery-info--${R(o)}`,{"cui-battery-info--disabled":R(a),"cui-battery-info--low":R(d),"cui-battery-info--charging":R(l)}]])},[V(`div`,ld,[V(`div`,ud,[R(l)?($(),H(n,{key:0,class:`cui-battery-info__icon-svg`,style:z(R(h))},null,8,[`style`])):R(r)>=90?($(),H(s,{key:1,class:`cui-battery-info__icon-svg`,style:z(R(g))},null,8,[`style`])):R(r)>=50?($(),H(c,{key:2,class:`cui-battery-info__icon-svg`,style:z(R(_))},null,8,[`style`])):R(r)>=20?($(),H(u,{key:3,class:`cui-battery-info__icon-svg`,style:z(R(v))},null,8,[`style`])):($(),H(ee,{key:4,class:`cui-battery-info__icon-svg cui-battery-info__icon-svg--critical`,style:z(R(y))},null,8,[`style`]))]),V(`div`,dd,[R(i)?($(),U(`span`,fd,F(R(i)),1)):q(``,!0),V(`span`,{class:P([`cui-battery-info__status`,R(p)])},F(R(f)),3)]),V(`div`,{class:P([`cui-battery-info__level`,R(m)])},F(R(r))+`%`,3)]),V(`div`,pd,[V(`div`,{class:`cui-battery-info__bar-fill`,style:z(R(b))},null,4)])],2)}}}),[[`__scopeId`,`data-v-c181f3d4`]]),hd={class:`cui-humidity-info__header`},gd={class:`cui-humidity-info__icon`},_d={class:`cui-humidity-info__info`},vd={key:0,class:`cui-humidity-info__label`},yd=hn(Z({__name:`CuiHumidityInfo`,props:{current:{},label:{},disabled:{type:Boolean,default:!1},size:{default:`medium`}},setup(e){let{label:t,current:n,disabled:r,size:i}=Dt(e),a=J(()=>n.value==null?`rgb(156, 163, 175)`:n.value<30?`rgb(251, 146, 60)`:n.value<=60?`rgb(34, 197, 94)`:`rgb(59, 130, 246)`),o=J(()=>({color:a.value,filter:`drop-shadow(0 0 6px ${a.value.replace(`rgb`,`rgba`).replace(`)`,`, 0.5)`)})`})),s=J(()=>({color:a.value}));return(e,c)=>{let l=un;return $(),U(`div`,{class:P([`cui-humidity-info`,[`cui-humidity-info--${R(i)}`,{"cui-humidity-info--disabled":R(r)}]])},[V(`div`,hd,[V(`div`,gd,[Q(l,{class:`cui-humidity-info__icon-svg`,style:z(R(o))},null,8,[`style`])]),V(`div`,_d,[R(t)?($(),U(`span`,vd,F(R(t)),1)):q(``,!0),V(`span`,{class:`cui-humidity-info__status`,style:z({color:R(a)})},F(R(n)==null?`--`:`${R(n)}%`),5)]),V(`div`,{class:`cui-humidity-info__value`,style:z(R(s))},F(R(n)==null?`--`:`${R(n)}%`),5)])],2)}}}),[[`__scopeId`,`data-v-1f41d794`]]),bd={class:`cui-temperature-info__header`},xd={class:`cui-temperature-info__icon`},Sd={class:`cui-temperature-info__info`},Cd={key:0,class:`cui-temperature-info__label`},wd=hn(Z({__name:`CuiTemperatureInfo`,props:{current:{},label:{},disabled:{type:Boolean,default:!1},size:{default:`medium`}},setup(e){let{label:t,current:n,disabled:r,size:i}=Dt(e),a=J(()=>n.value==null?`rgb(156, 163, 175)`:n.value<5?`rgb(59, 130, 246)`:n.value<15?`rgb(6, 182, 212)`:n.value<25?`rgb(34, 197, 94)`:n.value<35?`rgb(251, 146, 60)`:`rgb(239, 68, 68)`),o=J(()=>({color:a.value,filter:`drop-shadow(0 0 6px ${a.value.replace(`rgb`,`rgba`).replace(`)`,`, 0.5)`)})`})),s=J(()=>({color:a.value}));return(e,c)=>{let l=nn;return $(),U(`div`,{class:P([`cui-temperature-info`,[`cui-temperature-info--${R(i)}`,{"cui-temperature-info--disabled":R(r)}]])},[V(`div`,bd,[V(`div`,xd,[Q(l,{class:`cui-temperature-info__icon-svg`,style:z(R(o))},null,8,[`style`])]),V(`div`,Sd,[R(t)?($(),U(`span`,Cd,F(R(t)),1)):q(``,!0),V(`span`,{class:`cui-temperature-info__status`,style:z({color:R(a)})},F(R(n)==null?`--`:`${R(n)}°C`),5)]),V(`div`,{class:`cui-temperature-info__value`,style:z(R(s))},F(R(n)==null?`--`:`${R(n)}°C`),5)])],2)}}}),[[`__scopeId`,`data-v-0edddec9`]]),Td={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function Ed(e,t){return $(),U(`svg`,Td,[...t[0]||=[V(`path`,{fill:`currentColor`,d:`M20 9v11h-2v-9H2v9H0V9l10-4zm-3 3H3v2h14zm0 3H3v2h14zm5 0v-5h2v5zm0 4v-2h2v2z`},null,-1)]])}var Dd=Y({name:`mdi-garage-alert-variant`,render:Ed}),Od=function(e){return e[e.Open=0]=`Open`,e[e.Closed=1]=`Closed`,e[e.Opening=2]=`Opening`,e[e.Closing=3]=`Closing`,e[e.Stopped=4]=`Stopped`,e}({}),kd=function(e){return e[e.Open=0]=`Open`,e[e.Closed=1]=`Closed`,e}({}),Ad={currentState:1,targetState:1,obstructionDetected:!1,disabled:!1,size:`medium`},jd={class:`cui-garage-control__header`},Md={class:`cui-garage-control__icon`},Nd={key:3,class:`cui-garage-control__obstruction`},Pd={class:`cui-garage-control__info`},Fd={key:0,class:`cui-garage-control__label`},Id=hn(Z({__name:`CuiGarageControl`,props:ht({currentState:{},targetState:{},obstructionDetected:{type:Boolean},label:{},disabled:{type:Boolean},size:{}},Ad),emits:[`update:targetState`],setup(e,{emit:t}){let n=e,r=t,{t:i}=le(),{currentState:a}=Dt(n),o=J(()=>a.value===Od.Open||a.value===Od.Opening),s=J(()=>{switch(a.value){case Od.Open:return i(`components.garage_control.open`);case Od.Closed:return i(`components.garage_control.closed`);case Od.Opening:return i(`components.garage_control.opening`);case Od.Closing:return i(`components.garage_control.closing`);case Od.Stopped:return i(`components.garage_control.stopped`);default:return``}}),c=J(()=>{switch(a.value){case Od.Open:return`cui-garage-control__status--open`;case Od.Opening:case Od.Closing:return`cui-garage-control__status--transitioning`;case Od.Stopped:return`cui-garage-control__status--stopped`;default:return``}}),l=J(()=>({color:`rgb(34, 197, 94)`,filter:`drop-shadow(0 0 8px rgba(34, 197, 94, 0.5))`})),u=J(()=>({color:`rgb(250, 204, 21)`,filter:`drop-shadow(0 0 8px rgba(250, 204, 21, 0.5))`})),d=J(()=>({color:`rgb(251, 146, 60)`}));function f(e){r(`update:targetState`,e?kd.Open:kd.Closed)}return(t,n)=>{let r=Dd,i=qt,p=dn,m=Rn;return $(),U(`div`,{class:P([`cui-garage-control`,[`cui-garage-control--${e.size}`,{"cui-garage-control--disabled":e.disabled}]])},[V(`div`,jd,[V(`div`,Md,[R(a)===R(Od).Stopped?($(),H(r,{key:0,class:`cui-garage-control__icon-svg`,style:z(R(d))},null,8,[`style`])):R(a)===R(Od).Open||R(a)===R(Od).Opening?($(),H(i,{key:1,class:`cui-garage-control__icon-svg`,style:z(R(a)===R(Od).Open?R(l):R(u))},null,8,[`style`])):($(),H(p,{key:2,class:`cui-garage-control__icon-svg`,style:z(R(a)===R(Od).Closing?R(u):void 0)},null,8,[`style`])),e.obstructionDetected?($(),U(`span`,Nd)):q(``,!0)]),V(`div`,Pd,[e.label?($(),U(`span`,Fd,F(e.label),1)):q(``,!0),V(`span`,{class:P([`cui-garage-control__status`,R(c)])},F(R(s)),3)]),Q(m,{"model-value":R(o),disabled:e.disabled,class:`ml-auto shrink-0`,"onUpdate:modelValue":f},null,8,[`model-value`,`disabled`])])],2)}}}),[[`__scopeId`,`data-v-4c6505c2`]]),Ld={detected:!1,disabled:!1,size:`medium`},Rd={class:`cui-leak-sensor__header`},zd={class:`cui-leak-sensor__icon`},Bd={class:`cui-leak-sensor__info`},Vd={key:0,class:`cui-leak-sensor__label`},Hd=hn(Z({__name:`CuiLeakSensor`,props:ht({detected:{type:Boolean},label:{},disabled:{type:Boolean},size:{}},Ld),setup(e){let t=e,{t:n}=le(),{detected:r}=Dt(t),i=J(()=>({color:`rgb(59, 130, 246)`,filter:`drop-shadow(0 0 6px rgba(59, 130, 246, 0.5))`})),a=J(()=>({color:`var(--text-secondary-color)`})),o=J(()=>r.value?`cui-leak-sensor__status--detected`:`cui-leak-sensor__status--clear`),s=J(()=>r.value?`cui-leak-sensor__indicator--detected`:`cui-leak-sensor__indicator--clear`);return(t,c)=>{let l=en,u=$t;return $(),U(`div`,{class:P([`cui-leak-sensor`,[`cui-leak-sensor--${e.size}`,{"cui-leak-sensor--disabled":e.disabled,"cui-leak-sensor--clear":!R(r),"cui-leak-sensor--detected":R(r)}]])},[V(`div`,Rd,[V(`div`,zd,[R(r)?($(),H(l,{key:0,class:`cui-leak-sensor__icon-svg`,style:z(R(i))},null,8,[`style`])):($(),H(u,{key:1,class:`cui-leak-sensor__icon-svg`,style:z(R(a))},null,8,[`style`]))]),V(`div`,Bd,[e.label?($(),U(`span`,Vd,F(e.label),1)):q(``,!0),V(`span`,{class:P([`cui-leak-sensor__status`,R(o)])},F(R(r)?R(n)(`components.leak_sensor.detected`):R(n)(`components.leak_sensor.clear`)),3)]),V(`div`,{class:P([`cui-leak-sensor__indicator`,R(s)])},null,2)])],2)}}}),[[`__scopeId`,`data-v-14a46a3f`]]),Ud={detected:!1,disabled:!1,size:`medium`},Wd={class:`cui-smoke-sensor__header`},Gd={class:`cui-smoke-sensor__icon`},Kd={class:`cui-smoke-sensor__info`},qd={key:0,class:`cui-smoke-sensor__label`},Jd=hn(Z({__name:`CuiSmokeSensor`,props:ht({detected:{type:Boolean},label:{},disabled:{type:Boolean},size:{}},Ud),setup(e){let t=e,{t:n}=le(),{detected:r}=Dt(t),i=J(()=>({color:`rgb(239, 68, 68)`,filter:`drop-shadow(0 0 6px rgba(239, 68, 68, 0.5))`})),a=J(()=>({color:`var(--text-secondary-color)`})),o=J(()=>r.value?`cui-smoke-sensor__status--detected`:`cui-smoke-sensor__status--clear`),s=J(()=>r.value?`cui-smoke-sensor__indicator--detected`:`cui-smoke-sensor__indicator--clear`);return(t,c)=>{let l=on,u=rn;return $(),U(`div`,{class:P([`cui-smoke-sensor`,[`cui-smoke-sensor--${e.size}`,{"cui-smoke-sensor--disabled":e.disabled,"cui-smoke-sensor--clear":!R(r),"cui-smoke-sensor--detected":R(r)}]])},[V(`div`,Wd,[V(`div`,Gd,[R(r)?($(),H(l,{key:0,class:`cui-smoke-sensor__icon-svg`,style:z(R(i))},null,8,[`style`])):($(),H(u,{key:1,class:`cui-smoke-sensor__icon-svg`,style:z(R(a))},null,8,[`style`]))]),V(`div`,Kd,[e.label?($(),U(`span`,qd,F(e.label),1)):q(``,!0),V(`span`,{class:P([`cui-smoke-sensor__status`,R(o)])},F(R(r)?R(n)(`components.smoke_sensor.detected`):R(n)(`components.smoke_sensor.clear`)),3)]),V(`div`,{class:P([`cui-smoke-sensor__indicator`,R(s)])},null,2)])],2)}}}),[[`__scopeId`,`data-v-4db50b68`]]),Yd={detected:!1,disabled:!1,size:`medium`},Xd={class:`cui-occupancy-sensor__header`},Zd={class:`cui-occupancy-sensor__icon`},Qd={class:`cui-occupancy-sensor__info`},$d={key:0,class:`cui-occupancy-sensor__label`},ef=hn(Z({__name:`CuiOccupancySensor`,props:ht({detected:{type:Boolean},label:{},disabled:{type:Boolean},size:{}},Yd),setup(e){let t=e,{t:n}=le(),{detected:r}=Dt(t),i=J(()=>({color:`rgb(34, 197, 94)`,filter:`drop-shadow(0 0 6px rgba(34, 197, 94, 0.5))`})),a=J(()=>({color:`var(--text-secondary-color)`})),o=J(()=>r.value?`cui-occupancy-sensor__status--occupied`:`cui-occupancy-sensor__status--empty`),s=J(()=>r.value?`cui-occupancy-sensor__indicator--occupied`:`cui-occupancy-sensor__indicator--empty`);return(t,c)=>{let l=Zt,u=Qt;return $(),U(`div`,{class:P([`cui-occupancy-sensor`,[`cui-occupancy-sensor--${e.size}`,{"cui-occupancy-sensor--disabled":e.disabled,"cui-occupancy-sensor--empty":!R(r),"cui-occupancy-sensor--occupied":R(r)}]])},[V(`div`,Xd,[V(`div`,Zd,[R(r)?($(),H(l,{key:0,class:`cui-occupancy-sensor__icon-svg`,style:z(R(i))},null,8,[`style`])):($(),H(u,{key:1,class:`cui-occupancy-sensor__icon-svg`,style:z(R(a))},null,8,[`style`]))]),V(`div`,Qd,[e.label?($(),U(`span`,$d,F(e.label),1)):q(``,!0),V(`span`,{class:P([`cui-occupancy-sensor__status`,R(o)])},F(R(r)?R(n)(`components.occupancy_sensor.occupied`):R(n)(`components.occupancy_sensor.empty`)),3)]),V(`div`,{class:P([`cui-occupancy-sensor__indicator`,R(s)])},null,2)])],2)}}}),[[`__scopeId`,`data-v-8ca5a1ce`]]),tf={detected:!1,disabled:!1,size:`medium`},nf={class:`cui-contact-sensor__header`},rf={class:`cui-contact-sensor__icon`},af={class:`cui-contact-sensor__info`},of={key:0,class:`cui-contact-sensor__label`},sf=hn(Z({__name:`CuiContactSensor`,props:ht({detected:{type:Boolean},label:{},disabled:{type:Boolean},size:{}},tf),setup(e){let t=e,{t:n}=le(),{detected:r}=Dt(t),i=J(()=>({color:`rgb(34, 197, 94)`,filter:`drop-shadow(0 0 6px rgba(34, 197, 94, 0.5))`})),a=J(()=>({color:`rgb(251, 146, 60)`,filter:`drop-shadow(0 0 8px rgba(251, 146, 60, 0.6))`})),o=J(()=>r.value?`cui-contact-sensor__status--closed`:`cui-contact-sensor__status--open`),s=J(()=>r.value?`cui-contact-sensor__indicator--closed`:`cui-contact-sensor__indicator--open`);return(t,c)=>{let l=tn,u=sn;return $(),U(`div`,{class:P([`cui-contact-sensor`,[`cui-contact-sensor--${e.size}`,{"cui-contact-sensor--disabled":e.disabled,"cui-contact-sensor--open":!R(r),"cui-contact-sensor--closed":R(r)}]])},[V(`div`,nf,[V(`div`,rf,[R(r)?($(),H(l,{key:0,class:`cui-contact-sensor__icon-svg`,style:z(R(i))},null,8,[`style`])):($(),H(u,{key:1,class:`cui-contact-sensor__icon-svg`,style:z(R(a))},null,8,[`style`]))]),V(`div`,af,[e.label?($(),U(`span`,of,F(e.label),1)):q(``,!0),V(`span`,{class:P([`cui-contact-sensor__status`,R(o)])},F(R(r)?R(n)(`components.contact_sensor.closed`):R(n)(`components.contact_sensor.open`)),3)]),V(`div`,{class:P([`cui-contact-sensor__indicator`,R(s)])},null,2)])],2)}}}),[[`__scopeId`,`data-v-0cc50676`]]),cf={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function lf(e,t){return $(),U(`svg`,cf,[...t[0]||=[V(`path`,{fill:`currentColor`,d:`M21 19v1H3v-1l2-2v-6c0-3.1 2.03-5.83 5-6.71V4a2 2 0 0 1 2-2a2 2 0 0 1 2 2v.29c2.97.88 5 3.61 5 6.71v6zm-7 2a2 2 0 0 1-2 2a2 2 0 0 1-2-2m9.75-17.81l-1.42 1.42A8.98 8.98 0 0 1 21 11h2c0-2.93-1.16-5.75-3.25-7.81M1 11h2c0-2.4.96-4.7 2.67-6.39L4.25 3.19A10.96 10.96 0 0 0 1 11`},null,-1)]])}var uf=Y({name:`mdi-bell-ring`,render:lf}),df={ring:!1,disabled:!1,size:`medium`},ff={class:`cui-doorbell__header`},pf={class:`cui-doorbell__icon`},mf={class:`cui-doorbell__info`},hf={key:0,class:`cui-doorbell__label`},gf=hn(Z({__name:`CuiDoorbellTrigger`,props:ht({ring:{type:Boolean},label:{},disabled:{type:Boolean},size:{}},df),emits:[`update:ring`,`trigger`],setup(e,{emit:t}){let n=e,r=t,{t:i}=le(),{ring:a}=Dt(n),o=J(()=>a.value),s=J(()=>({color:`rgb(234, 179, 8)`,filter:`drop-shadow(0 0 10px rgba(234, 179, 8, 0.8))`}));function l(){r(`update:ring`,!0),r(`trigger`),setTimeout(()=>{r(`update:ring`,!1)},2e3)}return(t,n)=>{let r=pn,a=uf,u=c;return $(),U(`div`,{class:P([`cui-doorbell`,[`cui-doorbell--${e.size}`,{"cui-doorbell--disabled":e.disabled,"cui-doorbell--ringing":R(o)}]])},[V(`div`,ff,[V(`div`,pf,[R(o)?($(),H(r,{key:0,class:`cui-doorbell__icon-svg cui-doorbell__icon-svg--ringing`,style:z(R(s))},null,8,[`style`])):($(),H(r,{key:1,class:`cui-doorbell__icon-svg`}))]),V(`div`,mf,[e.label?($(),U(`span`,hf,F(e.label),1)):q(``,!0),V(`span`,{class:P([`cui-doorbell__status`,{"cui-doorbell__status--ringing":R(o)}])},F(R(o)?R(i)(`components.doorbell_trigger.ringing`):R(i)(`components.doorbell_trigger.ready`)),3)]),Q(u,{disabled:e.disabled||R(o),size:`small`,severity:`warn`,class:`cui-doorbell__button`,onClick:l},{icon:G(()=>[Q(a,{class:`cui-doorbell__button-icon`})]),_:1},8,[`disabled`])])],2)}}}),[[`__scopeId`,`data-v-b227d18a`]]),_f={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function vf(e,t){return $(),U(`svg`,_f,[...t[0]||=[V(`path`,{fill:`currentColor`,d:`m17.75 4.09l-2.53 1.94l.91 3.06l-2.63-1.81l-2.63 1.81l.91-3.06l-2.53-1.94L12.44 4l1.06-3l1.06 3zm3.5 6.91l-1.64 1.25l.59 1.98l-1.7-1.17l-1.7 1.17l.59-1.98L15.75 11l2.06-.05L18.5 9l.69 1.95zm-2.28 4.95c.83-.08 1.72 1.1 1.19 1.85c-.32.45-.66.87-1.08 1.27C15.17 23 8.84 23 4.94 19.07c-3.91-3.9-3.91-10.24 0-14.14c.4-.4.82-.76 1.27-1.08c.75-.53 1.93.36 1.85 1.19c-.27 2.86.69 5.83 2.89 8.02a9.96 9.96 0 0 0 8.02 2.89m-1.64 2.02a12.08 12.08 0 0 1-7.8-3.47c-2.17-2.19-3.33-5-3.49-7.82c-2.81 3.14-2.7 7.96.31 10.98c3.02 3.01 7.84 3.12 10.98.31`},null,-1)]])}var yf=Y({name:`mdi-weather-night`,render:vf}),bf={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function xf(e,t){return $(),U(`svg`,bf,[...t[0]||=[V(`path`,{fill:`currentColor`,d:`M13.34 8.17c-.93 0-1.69-.77-1.69-1.7a1.69 1.69 0 0 1 1.69-1.69c.94 0 1.7.76 1.7 1.69s-.76 1.7-1.7 1.7M10.3 19.93l-5.93-1.18l.34-1.7l4.15.85l1.35-6.86l-1.52.6v2.86H7v-3.96l4.4-1.87l.67-.08c.6 0 1.1.34 1.43.85l.86 1.35c.68 1.21 2.03 2.03 3.64 2.03v1.68c-1.86 0-3.56-.83-4.66-2.1l-.5 2.54l1.77 1.69V23h-1.69v-5.1l-1.78-1.69zM21 23h-2V3H6v13.11l-2-.42V1h17zM6 23H4v-3.22l2 .42z`},null,-1)]])}var Sf=Y({name:`mdi-exit-run`,render:xf}),Cf=function(e){return e[e.StayArm=0]=`StayArm`,e[e.AwayArm=1]=`AwayArm`,e[e.NightArm=2]=`NightArm`,e[e.Disarmed=3]=`Disarmed`,e[e.AlarmTriggered=4]=`AlarmTriggered`,e}({}),wf={class:`cui-security-system__header`},Tf={class:`cui-security-system__icon`},Ef={class:`cui-security-system__info`},Df={key:0,class:`cui-security-system__label`},Of={key:0,class:`cui-security-system__alarm`},kf={class:`cui-security-system__modes`},Af=[`disabled`],jf=[`disabled`],Mf=[`disabled`],Nf=[`disabled`],Pf=hn(Z({__name:`CuiSecuritySystem`,props:{currentState:{default:Cf.Disarmed},targetState:{default:Cf.Disarmed},label:{},disabled:{type:Boolean,default:!1},size:{default:`medium`}},emits:[`update:currentState`,`update:targetState`],setup(e,{emit:t}){let n=e,r=t,{t:i}=le(),{currentState:a,targetState:o}=Dt(n),s=J({get:()=>a.value,set:e=>r(`update:currentState`,e)}),l=J({get:()=>o.value,set:e=>r(`update:targetState`,e)}),u=J(()=>s.value===Cf.AlarmTriggered),d=J(()=>s.value===Cf.StayArm||s.value===Cf.AwayArm||s.value===Cf.NightArm),f=J(()=>!u.value&&l.value!==s.value),p=J(()=>{if(f.value)return l.value===Cf.Disarmed?i(`components.security_system.status_disarming`):i(`components.security_system.status_arming`);switch(s.value){case Cf.StayArm:return i(`components.security_system.status_home_armed`);case Cf.AwayArm:return i(`components.security_system.status_away_armed`);case Cf.NightArm:return i(`components.security_system.status_night_armed`);case Cf.Disarmed:return i(`components.security_system.status_disarmed`);case Cf.AlarmTriggered:return i(`components.security_system.status_alarm`);default:return i(`components.security_system.status_unknown`)}}),m=J(()=>u.value?`cui-security-system__status--alarm`:f.value?`cui-security-system__status--transitioning`:d.value?`cui-security-system__status--armed`:`cui-security-system__status--disarmed`),h=J(()=>({color:`rgb(239, 68, 68)`,filter:`drop-shadow(0 0 12px rgba(239, 68, 68, 0.8))`,animation:`pulse 0.5s ease-in-out infinite alternate`})),g=J(()=>({color:`rgb(34, 197, 94)`,filter:`drop-shadow(0 0 8px rgba(34, 197, 94, 0.5))`}));function _(e){l.value=e}function v(){s.value=l.value}return(t,n)=>{let r=Yt,a=xr,o=fn,s=cn,f=c,y=ni,b=Sf,ee=yf;return $(),U(`div`,{class:P([`cui-security-system`,[`cui-security-system--${e.size}`,{"cui-security-system--disabled":e.disabled}]])},[V(`div`,wf,[V(`div`,Tf,[R(u)?($(),H(r,{key:0,class:`cui-security-system__icon-svg`,style:z(R(h))},null,8,[`style`])):R(d)?($(),H(a,{key:1,class:`cui-security-system__icon-svg`,style:z(R(g))},null,8,[`style`])):($(),H(o,{key:2,class:`cui-security-system__icon-svg`}))]),V(`div`,Ef,[e.label?($(),U(`span`,Df,F(e.label),1)):q(``,!0),V(`span`,{class:P([`cui-security-system__status`,R(m)])},F(R(p)),3)])]),R(u)?($(),U(`div`,Of,[Q(s,{class:`cui-security-system__alarm-icon`}),V(`span`,null,F(R(i)(`components.security_system.alarm_triggered`)),1),Q(f,{size:`small`,severity:`danger`,label:R(i)(`components.security_system.reset`),onClick:v},null,8,[`label`])])):q(``,!0),V(`div`,kf,[V(`button`,{type:`button`,class:P([`cui-security-system__mode`,{"cui-security-system__mode--active":R(l)===R(Cf).Disarmed}]),disabled:e.disabled||R(u),onClick:n[0]||=e=>_(R(Cf).Disarmed)},[Q(o,{class:`cui-security-system__mode-icon`}),V(`span`,null,F(R(i)(`components.security_system.off`)),1)],10,Af),V(`button`,{type:`button`,class:P([`cui-security-system__mode`,{"cui-security-system__mode--active":R(l)===R(Cf).StayArm}]),disabled:e.disabled||R(u),onClick:n[1]||=e=>_(R(Cf).StayArm)},[Q(y,{class:`cui-security-system__mode-icon`}),V(`span`,null,F(R(i)(`components.security_system.home`)),1)],10,jf),V(`button`,{type:`button`,class:P([`cui-security-system__mode`,{"cui-security-system__mode--active":R(l)===R(Cf).AwayArm}]),disabled:e.disabled||R(u),onClick:n[2]||=e=>_(R(Cf).AwayArm)},[Q(b,{class:`cui-security-system__mode-icon`}),V(`span`,null,F(R(i)(`components.security_system.away`)),1)],10,Mf),V(`button`,{type:`button`,class:P([`cui-security-system__mode`,{"cui-security-system__mode--active":R(l)===R(Cf).NightArm}]),disabled:e.disabled||R(u),onClick:n[3]||=e=>_(R(Cf).NightArm)},[Q(ee,{class:`cui-security-system__mode-icon`}),V(`span`,null,F(R(i)(`components.security_system.night`)),1)],10,Nf)])],2)}}}),[[`__scopeId`,`data-v-67cacde3`]]),Ff={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function If(e,t){return $(),U(`svg`,Ff,[...t[0]||=[V(`path`,{fill:`currentColor`,d:`M14 3.23v2.06c2.89.86 5 3.54 5 6.71s-2.11 5.84-5 6.7v2.07c4-.91 7-4.49 7-8.77s-3-7.86-7-8.77M16.5 12c0-1.77-1-3.29-2.5-4.03V16c1.5-.71 2.5-2.24 2.5-4M3 9v6h4l5 5V4L7 9z`},null,-1)]])}var Lf=Y({name:`mdi-volume-high`,render:If}),Rf={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function zf(e,t){return $(),U(`svg`,Rf,[...t[0]||=[V(`path`,{fill:`currentColor`,d:`M6 6.9L3.87 4.78l1.41-1.41L7.4 5.5zM13 1v3h-2V1zm7.13 3.78L18 6.9l-1.4-1.4l2.12-2.13zM4.5 10.5v2h-3v-2zm15 0h3v2h-3zM6 20h12a2 2 0 0 1 2 2H4a2 2 0 0 1 2-2m6-15a6 6 0 0 1 6 6v8H6v-8a6 6 0 0 1 6-6m0 2a4 4 0 0 0-4 4v6h8v-6a4 4 0 0 0-4-4`},null,-1)]])}var Bf=Y({name:`mdi-alarm-light-outline`,render:zf}),Vf={active:!1,volume:100,hasVolume:!1,disabled:!1,size:`medium`},Hf={class:`cui-siren-control__header`},Uf={class:`cui-siren-control__icon`},Wf={key:0,class:`cui-siren-control__label`},Gf={key:0,class:`cui-siren-control__volume`},Kf={class:`cui-siren-control__volume-header`},qf={class:`cui-siren-control__volume-value`},Jf=hn(Z({__name:`CuiSirenControl`,props:ht({active:{type:Boolean},volume:{},hasVolume:{type:Boolean},label:{},disabled:{type:Boolean},size:{}},Vf),emits:[`update:active`,`update:volume`],setup(e,{emit:t}){let n=e,r=t,{active:i,volume:a,hasVolume:o}=Dt(n),s=J({get:()=>i.value,set:e=>r(`update:active`,e)}),c=J({get:()=>a.value,set:e=>r(`update:volume`,e)}),l=J(()=>{let e=(o.value?a.value:100)/100;return{color:`rgb(239, 68, 68)`,filter:`drop-shadow(0 0 ${4+e*12}px rgba(239, 68, 68, ${.3+e*.7}))`,opacity:.4+e*.6}});return(t,n)=>{let r=cn,i=Bf,a=Rn,u=Lf,d=w;return $(),U(`div`,{class:P([`cui-siren-control`,[`cui-siren-control--${e.size}`,{"cui-siren-control--disabled":e.disabled}]])},[V(`div`,Hf,[V(`div`,Uf,[R(s)?($(),H(r,{key:0,class:`cui-siren-control__icon-svg cui-siren-control__icon-svg--active`,style:z(R(l))},null,8,[`style`])):($(),H(i,{key:1,class:`cui-siren-control__icon-svg`}))]),e.label?($(),U(`span`,Wf,F(e.label),1)):q(``,!0),Q(a,{modelValue:R(s),"onUpdate:modelValue":n[0]||=e=>Mt(s)?s.value=e:null,disabled:e.disabled,class:`cui-siren-control__toggle`},null,8,[`modelValue`,`disabled`])]),R(o)?($(),U(`div`,Gf,[V(`div`,Kf,[Q(u,{class:`cui-siren-control__volume-icon`}),V(`span`,qf,F(R(c))+`%`,1)]),Q(d,{modelValue:R(c),"onUpdate:modelValue":n[1]||=e=>Mt(c)?c.value=e:null,min:0,max:100,step:1,disabled:e.disabled,class:`cui-siren-control__slider`},null,8,[`modelValue`,`disabled`])])):q(``,!0)],2)}}}),[[`__scopeId`,`data-v-7f88e563`]]),Yf=function(e){return e[e.Secured=0]=`Secured`,e[e.Unsecured=1]=`Unsecured`,e[e.Unknown=2]=`Unknown`,e}({}),Xf={currentState:2,targetState:0,disabled:!1,size:`medium`},Zf={class:`cui-lock-control__header`},Qf={class:`cui-lock-control__icon`},$f={class:`cui-lock-control__info`},ep={key:0,class:`cui-lock-control__label`},tp=hn(Z({__name:`CuiLockControl`,props:ht({currentState:{},targetState:{},label:{},disabled:{type:Boolean},size:{}},Xf),emits:[`update:targetState`],setup(e,{emit:t}){let n=e,r=t,{t:i}=le(),{currentState:a,targetState:o}=Dt(n),s=J(()=>o.value===Yf.Secured),c=J(()=>a.value!==o.value&&a.value!==Yf.Unknown),l=J(()=>{if(c.value)return o.value===Yf.Secured?i(`components.lock.status_locking`):i(`components.lock.status_unlocking`);switch(a.value){case Yf.Secured:return i(`components.lock.status_locked`);case Yf.Unsecured:return i(`components.lock.status_unlocked`);default:return i(`components.lock.status_unknown`)}}),u=J(()=>c.value?`cui-lock-control__status--transitioning`:a.value===Yf.Secured?`cui-lock-control__status--secured`:a.value===Yf.Unsecured?`cui-lock-control__status--unsecured`:``),d=J(()=>({color:`rgb(34, 197, 94)`,filter:`drop-shadow(0 0 8px rgba(34, 197, 94, 0.5))`}));function f(e){r(`update:targetState`,e?Yf.Secured:Yf.Unsecured)}return(t,n)=>{let r=mn,i=Xt,a=Rn;return $(),U(`div`,{class:P([`cui-lock-control`,[`cui-lock-control--${e.size}`,{"cui-lock-control--disabled":e.disabled}]])},[V(`div`,Zf,[V(`div`,Qf,[R(s)?($(),H(r,{key:0,class:`cui-lock-control__icon-svg`,style:z(R(d))},null,8,[`style`])):($(),H(i,{key:1,class:`cui-lock-control__icon-svg`}))]),V(`div`,$f,[e.label?($(),U(`span`,ep,F(e.label),1)):q(``,!0),V(`span`,{class:P([`cui-lock-control__status`,R(u)])},F(R(l)),3)]),Q(a,{"model-value":R(s),disabled:e.disabled,class:`ml-auto shrink-0`,"onUpdate:modelValue":f},null,8,[`model-value`,`disabled`])])],2)}}}),[[`__scopeId`,`data-v-4b2a60ff`]]),np={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function rp(e,t){return $(),U(`svg`,np,[...t[0]||=[V(`path`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`M18.36 6.64A9 9 0 0 1 20.77 15M6.16 6.16a9 9 0 1 0 12.68 12.68M12 2v4M2 2l20 20`},null,-1)]])}var ip=Y({name:`lucide-power-off`,render:rp}),ap={class:`cui-switch-control__header`},op={class:`cui-switch-control__icon`},sp={key:0,class:`cui-switch-control__label`},cp=hn(Z({__name:`CuiSwitchControl`,props:{on:{type:Boolean,default:!1},label:{},disabled:{type:Boolean,default:!1},size:{default:`medium`}},emits:[`update:on`],setup(e,{emit:t}){let n=e,r=t,{on:i,size:a}=Dt(n),o=J({get:()=>i.value,set:e=>r(`update:on`,e)}),s=J(()=>({color:`rgb(34, 197, 94)`,filter:`drop-shadow(0 0 10px rgba(34, 197, 94, 0.7))`}));return(t,n)=>{let r=an,i=ip,c=Rn;return $(),U(`div`,{class:P([`cui-switch-control`,[`cui-switch-control--${R(a)}`,{"cui-switch-control--disabled":e.disabled}]])},[V(`div`,ap,[V(`div`,op,[R(o)?($(),H(r,{key:0,class:`cui-switch-control__icon-svg cui-switch-control__icon-svg--on`,style:z(R(s))},null,8,[`style`])):($(),H(i,{key:1,class:`cui-switch-control__icon-svg`}))]),e.label?($(),U(`span`,sp,F(e.label),1)):q(``,!0),Q(c,{modelValue:R(o),"onUpdate:modelValue":n[0]||=e=>Mt(o)?o.value=e:null,disabled:e.disabled,class:`cui-switch-control__toggle`},null,8,[`modelValue`,`disabled`])])],2)}}}),[[`__scopeId`,`data-v-86992927`]]),lp={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function up(e,t){return $(),U(`svg`,lp,[...t[0]||=[V(`path`,{fill:`currentColor`,d:`M12 18V6a6 6 0 0 1 6 6a6 6 0 0 1-6 6m8-2.69L23.31 12L20 8.69V4h-4.69L12 .69L8.69 4H4v4.69L.69 12L4 15.31V20h4.69L12 23.31L15.31 20H20z`},null,-1)]])}var dp=Y({name:`mdi-brightness6`,render:up}),fp={on:!1,brightness:100,hasBrightness:!1,disabled:!1,size:`medium`},pp={class:`cui-light-control__header`},mp={class:`cui-light-control__icon`},hp={key:0,class:`cui-light-control__label`},gp={key:0,class:`cui-light-control__brightness`},_p={class:`cui-light-control__brightness-header`},vp={class:`cui-light-control__brightness-value`},yp=hn(Z({__name:`CuiLightControl`,props:ht({on:{type:Boolean},brightness:{},hasBrightness:{type:Boolean},label:{},disabled:{type:Boolean},size:{}},fp),emits:[`update:on`,`update:brightness`],setup(e,{emit:t}){let n=e,r=t,{on:i,brightness:a,hasBrightness:o}=Dt(n),s=W(a.value>0?a.value:100),c=J({get:()=>i.value,set:e=>{r(`update:on`,e),e&&a.value===0&&r(`update:brightness`,s.value)}}),l=J({get:()=>a.value,set:e=>{e>0&&(s.value=e),r(`update:brightness`,e),e===0&&i.value?r(`update:on`,!1):e>0&&!i.value&&r(`update:on`,!0)}}),u=J(()=>{let e=(o.value?a.value:100)/100;return{color:`rgb(250, 204, 21)`,filter:`drop-shadow(0 0 ${4+e*12}px rgba(250, 204, 21, ${.3+e*.7}))`,opacity:.4+e*.6}});return(t,n)=>{let r=Jt,i=mr,a=Rn,s=dp,d=w;return $(),U(`div`,{class:P([`cui-light-control`,[`cui-light-control--${e.size}`,{"cui-light-control--disabled":e.disabled}]])},[V(`div`,pp,[V(`div`,mp,[R(c)?($(),H(r,{key:0,class:`cui-light-control__icon-svg cui-light-control__icon-svg--on`,style:z(R(u))},null,8,[`style`])):($(),H(i,{key:1,class:`cui-light-control__icon-svg`}))]),e.label?($(),U(`span`,hp,F(e.label),1)):q(``,!0),Q(a,{modelValue:R(c),"onUpdate:modelValue":n[0]||=e=>Mt(c)?c.value=e:null,disabled:e.disabled,class:`cui-light-control__toggle`},null,8,[`modelValue`,`disabled`])]),R(o)?($(),U(`div`,gp,[V(`div`,_p,[Q(s,{class:`cui-light-control__brightness-icon`}),V(`span`,vp,F(R(l))+`%`,1)]),Q(d,{modelValue:R(l),"onUpdate:modelValue":n[1]||=e=>Mt(l)?l.value=e:null,min:0,max:100,step:1,disabled:e.disabled,class:`cui-light-control__slider`},null,8,[`modelValue`,`disabled`])])):q(``,!0)],2)}}}),[[`__scopeId`,`data-v-231e0be1`]]),bp={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function xp(e,t){return $(),U(`svg`,bp,[...t[0]||=[V(`path`,{fill:`currentColor`,d:`m5 11l1.5-4.5h11L19 11m-1.5 5a1.5 1.5 0 0 1-1.5-1.5a1.5 1.5 0 0 1 1.5-1.5a1.5 1.5 0 0 1 1.5 1.5a1.5 1.5 0 0 1-1.5 1.5m-11 0A1.5 1.5 0 0 1 5 14.5A1.5 1.5 0 0 1 6.5 13A1.5 1.5 0 0 1 8 14.5A1.5 1.5 0 0 1 6.5 16M18.92 6c-.2-.58-.76-1-1.42-1h-11c-.66 0-1.22.42-1.42 1L3 12v8a1 1 0 0 0 1 1h1a1 1 0 0 0 1-1v-1h12v1a1 1 0 0 0 1 1h1a1 1 0 0 0 1-1v-8z`},null,-1)]])}var Sp=Y({name:`mdi-car`,render:xp}),Cp={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function wp(e,t){return $(),U(`svg`,Cp,[...t[0]||=[V(`path`,{fill:`currentColor`,d:`M17 22v-2h3v-3h2v3.5c0 .39-.16.74-.46 1.04s-.65.46-1.04.46zM7 22H3.5c-.39 0-.74-.16-1.04-.46S2 20.89 2 20.5V17h2v3h3zM17 2h3.5c.39 0 .74.16 1.04.46s.46.65.46 1.04V7h-2V4h-3zM7 2v2H4v3H2V3.5c0-.39.16-.74.46-1.04S3.11 2 3.5 2zm6 15.25l4-2.3v-4.59l-4 2.3zm-1-6.33l4-2.29l-4-2.35l-4 2.35zm-5 4.03l4 2.3v-4.59l-4-2.3zm11.23-7.36c.5.32.77.75.77 1.32v6.32c0 .57-.27 1-.77 1.32l-5.48 3.18q-.75.48-1.5 0l-5.48-3.18c-.5-.32-.77-.75-.77-1.32V8.91c0-.57.27-1 .77-1.32l5.48-3.18c.25-.13.5-.19.75-.19s.5.06.75.19z`},null,-1)]])}var Tp=Y({name:`mdi-cube-scan`,render:wp}),Ep={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function Dp(e,t){return $(),U(`svg`,Ep,[...t[0]||=[V(`g`,{fill:`none`},[V(`path`,{d:`m12.593 23.258l-.011.002l-.071.035l-.02.004l-.014-.004l-.071-.035q-.016-.005-.024.005l-.004.01l-.017.428l.005.02l.01.013l.104.074l.015.004l.012-.004l.104-.074l.012-.016l.004-.017l-.017-.427q-.004-.016-.017-.018m.265-.113l-.013.002l-.185.093l-.01.01l-.003.011l.018.43l.005.012l.008.007l.201.093q.019.005.029-.008l.004-.014l-.034-.614q-.005-.018-.02-.022m-.715.002a.02.02 0 0 0-.027.006l-.006.014l-.034.614q.001.018.017.024l.015-.002l.201-.093l.01-.008l.004-.011l.017-.43l-.003-.012l-.01-.01z`}),V(`path`,{fill:`currentColor`,d:`M13 2a3 3 0 0 1 .64 5.932l-.171.032l1.436 2.297l1.724-.69a1 1 0 0 1 .848 1.808l-.106.05l-1.723.689a2 2 0 0 1-2.343-.657l-.096-.14l-.163-.26l-.606 2.424a2 2 0 0 1-.256.595l-.09.13l1.653 1.228a2 2 0 0 1 .766 1.202l.029.182l.353 3.178H15a1 1 0 0 1 .117 1.993L15 22h-.91a1.1 1.1 0 0 1-1.074-.861l-.02-.117l-.442-3.979l-3.15-2.34a1 1 0 0 1-.154-.14a2 2 0 0 1-.723-1.891l.033-.157l.794-3.177l-1.57.47l-.835 2.508a1 1 0 0 1-1.928-.52l.03-.112l.836-2.508a2 2 0 0 1 1.17-1.23l.153-.053l3.437-1.031A3 3 0 0 1 13 2M9.6 15.2a1 1 0 0 1 .2 1.4l-1.216 1.622a1.5 1.5 0 0 1-2.032.348l-1.93-1.287a1 1 0 0 1-1.33-1.49l.495-.494a1.01 1.01 0 0 1 1.275-.127l2.206 1.471L8.2 15.4a1 1 0 0 1 1.4-.2`})],-1)]])}var Op=Y({name:`mingcute-run-fill`,render:Dp}),kp={detected:!1,disabled:!1,size:`medium`},Ap={class:`cui-detection__header`},jp={class:`cui-detection__info`},Mp={key:0,class:`cui-detection__label`},Np={key:0,class:`cui-detection__detections`},Pp=hn(Z({__name:`CuiDetection`,props:ht({type:{},label:{},detected:{type:Boolean},detections:{},size:{},disabled:{type:Boolean}},kp),setup(e){let t=e,{t:n}=le(),{detected:r}=Dt(t),i=J(()=>r.value?n(`components.detection.detected`):n(`components.detection.idle`));return(t,n)=>{let a=Op,o=Tp,s=Vr,c=hr,l=Sp;return $(),U(`div`,{class:P([`cui-detection`,[`cui-detection--${e.size}`,`cui-detection--${e.type}`,{"cui-detection--disabled":e.disabled,"cui-detection--detected":R(r)}]])},[V(`div`,Ap,[V(`div`,{class:P([`cui-detection__icon`,{"cui-detection__icon--detected":R(r)}])},[e.type===`motion`?($(),H(a,{key:0,class:`cui-detection__icon-svg`})):e.type===`object`?($(),H(o,{key:1,class:`cui-detection__icon-svg`})):e.type===`audio`?($(),H(s,{key:2,class:`cui-detection__icon-svg`})):e.type===`face`?($(),H(c,{key:3,class:`cui-detection__icon-svg`})):e.type===`licensePlate`?($(),H(l,{key:4,class:`cui-detection__icon-svg`})):q(``,!0)],2),V(`div`,jp,[e.label?($(),U(`span`,Mp,F(e.label),1)):q(``,!0),V(`span`,{class:P([`cui-detection__status`,{"cui-detection__status--detected":R(r)}])},F(R(i)),3)]),V(`div`,{class:P([`cui-detection__indicator`,{"cui-detection__indicator--detected":R(r)}])},null,2)]),e.detections&&e.detections.length>0?($(),U(`div`,Np,[($(!0),U(K,null,B(e.detections,(e,t)=>($(),U(`span`,{key:t,class:`cui-detection__detection-tag`},F(e),1))),128))])):q(``,!0)],2)}}}),[[`__scopeId`,`data-v-4bdc871b`]]),Fp={key:0,class:`flex items-center justify-center h-full`},Ip={key:1,class:`overview-container`},Lp={class:`relative`},Rp={key:0,class:`absolute inset-0 z-2 flex items-center justify-center bg-black/80 pointer-events-none`},zp={key:1,class:`absolute top-2 right-2 z-3 flex items-center gap-1 px-2 py-1 bg-black/60 rounded-full pointer-events-none`},Bp={class:`text-xs text-white/80`},Vp={key:2,class:`absolute top-2 right-2 z-2 flex items-center gap-1 px-2 py-1 bg-black/60 rounded-full pointer-events-none`},Hp={class:`text-xs text-white/80`},Up={class:`overview-section`},Wp={class:`overview-section-title`},Gp={key:1},Kp={key:0,class:`overview-section`},qp={class:`overview-section-title`},Jp={class:`flex flex-col gap-2`},Yp={key:1,class:`overview-section`},Xp={class:`overview-section-title`},Zp={class:`flex flex-col gap-2`},Qp={key:2,class:`overview-section`},$p={class:`overview-section-title`},em={class:`flex flex-col gap-2`},tm={key:3,class:`overview-section`},nm={class:`overview-section-title`},rm={class:`flex flex-col gap-2`},im={key:4,class:`overview-section`},am={class:`overview-section-title`},om={class:`flex flex-col gap-2`},sm={key:5,class:`overview-section`},cm={class:`overview-section-title`},lm={class:`flex flex-col gap-2`},um={key:6,class:`overview-section`},dm={class:`overview-section-title`},fm={class:`flex flex-col gap-2`},pm={key:7,class:`overview-section`},mm={class:`overview-section-title`},hm={class:`flex flex-col gap-2`},gm={key:8,class:`overview-section`},_m={class:`overview-section-title`},vm={class:`flex flex-col gap-2`},ym={key:9,class:`overview-section`},bm={class:`overview-section-title`},xm={class:`flex flex-col gap-2`},Sm={key:10,class:`overview-section`},Cm={class:`overview-section-title`},wm={class:`flex flex-col gap-2`},Tm={key:11,class:`overview-section`},Em={class:`overview-section-title`},Dm={class:`flex flex-col gap-2`},Om={key:12,class:`overview-section`},km={class:`overview-section-title`},Am={class:`flex flex-col gap-2`},jm={key:13,class:`overview-section`},Mm={class:`overview-section-title`},Nm={class:`flex flex-col gap-2`},Pm={key:14,class:`overview-section`},Fm={class:`overview-section-title`},Im={class:`flex flex-col gap-2`},Lm={key:15,class:`overview-section`},Rm={class:`no-sensors`},zm=hn(Z({__name:`Overview`,props:{camera:{},cameraDevice:{},loading:{type:Boolean},latestSnapshotSrc:{}},setup(e){let t=e,{t:i}=le(),{getCameraStatus:s,connect:c}=ti(),{cameraDevice:l,latestSnapshotSrc:u}=Dt(t),{sensors:d}=p(l);c();let f=J(()=>l.value?.camera.value),m=J(()=>s(f.value?._id)),h=J(()=>{switch(m.value){case`connected`:return`success`;case`connecting`:return`warn`;case`error`:return`danger`;case`partial`:return`contrast`;default:return`secondary`}}),g=J(()=>{switch(m.value){case`connected`:return i(`components.camera_table.online`);case`connecting`:return i(`components.camera_table.connecting`);case`error`:return i(`components.camera_table.error`);case`partial`:return i(`components.camera_table.partial`);default:return i(`components.camera_table.idle`)}}),_=J(()=>d.value.filter(S)),y=J(()=>d.value.filter(r)),b=J(()=>d.value.filter(ce)),ee=J(()=>d.value.filter(A)),w=J(()=>d.value.filter(Ve)),T=J(()=>d.value.filter(de)),ne=J(()=>d.value.filter(se)),re=J(()=>d.value.filter(o)),ae=J(()=>d.value.filter(v)),oe=J(()=>d.value.filter(ze)),me=J(()=>d.value.filter(Se)),j=J(()=>d.value.filter(Te)),_e=J(()=>d.value.filter(ye)),ve=J(()=>d.value.filter(ie)),Ee=J(()=>d.value.filter(Ie)),ke=J(()=>d.value.filter(a)),je=J(()=>d.value.filter(Pe)),Me=J(()=>d.value.filter(pe)),Le=J(()=>d.value.filter(C)),Be=J(()=>_.value.some(e=>e.getProperty(Ae.Detected))),He=J(()=>{let e;for(let t of _.value){let n=t.getProperty(Ae.LastTriggered);n&&(!e||n>e)&&(e=n)}return e}),Ue=n(J(()=>new Date(He.value??0))),We=J(()=>{let e=[{label:i(`components.camera_options.overview_status`),value:g.value,tag:!0,tagSeverity:h.value},{label:i(`components.camera_options.overview_sources`),value:String(f.value?.sources.length??0)}],t=f.value?.info;return t?.manufacturer&&e.push({label:i(`components.form.label.manufacturer`),value:t.manufacturer}),t?.model&&e.push({label:i(`components.camera_options.model`),value:t.model}),t?.hardware&&e.push({label:i(`components.form.label.hardware_version`),value:t.hardware}),t?.serialNumber&&e.push({label:i(`components.form.label.serial_number`),value:t.serialNumber}),t?.firmwareVersion&&e.push({label:i(`components.form.label.firmware_version`),value:t.firmwareVersion}),t?.supportUrl&&e.push({label:i(`components.form.label.support_url`),value:t.supportUrl}),_.value.length>0&&(Be.value?e.push({label:i(`components.camera_options.overview_last_motion`),value:i(`components.camera_options.overview_motion_active`),tag:!0,tagSeverity:`danger`}):He.value?e.push({label:i(`components.camera_options.overview_last_motion`),value:Ue.value}):e.push({label:i(`components.camera_options.overview_last_motion`),value:i(`components.camera_options.overview_no_motion`)})),e}),Ge=J(()=>_.value.length>0||y.value.length>0||b.value.length>0||ee.value.length>0||w.value.length>0),Ke=J(()=>T.value.length>0||_e.value.length>0||ve.value.length>0||Ee.value.length>0||ke.value.length>0||je.value.length>0||ne.value.length>0||oe.value.length>0||Me.value.length>0||re.value.length>0||ae.value.length>0||me.value.length>0||j.value.length>0||Le.value.length>0);return(e,t)=>{let n=te,r=Gt,i=Kt,a=_r,o=ar,s=qn,c=ri,l=yp,d=cp,p=tp,m=Jf,h=Pf,g=gf,v=sf,S=ef,C=Jd,ie=Hd,se=Id,ce=wd,le=yd,de=md;return R(f)?($(),U(`div`,Ip,[V(`div`,Lp,[R(f)?.disabled?($(),U(`div`,Rp,[Q(r,{class:`w-8 h-8 text-white/60`})])):q(``,!0),R(f)?.disabled?($(),U(`div`,zp,[Q(r,{class:`w-3.5 h-3.5 text-red-400`}),V(`span`,Bp,F(e.$t(`views.camera.camera_disabled`)),1)])):R(f)?.detectionSettings?.snooze?($(),U(`div`,Vp,[Q(i,{class:`w-3.5 h-3.5 text-amber-400`}),V(`span`,Hp,F(e.$t(`views.camera.camera_snoozed`)),1)])):q(``,!0),Q(a,{camera:R(f),src:R(u)},null,8,[`camera`,`src`])]),V(`div`,Up,[V(`h3`,Wp,F(e.$t(`components.camera_options.overview`)),1),Q(c,{value:R(We),"striped-rows":``,"show-headers":!1,class:`card-border rounded-lg overflow-hidden`},{default:G(()=>[Q(o,{field:`label`,class:`p-2 font-medium text-sm`}),Q(o,{field:`value`,class:`p-2 text-muted text-sm text-right`},{body:G(({data:e})=>[e.tag?($(),H(s,{key:0,severity:e.tagSeverity,value:e.value},null,8,[`severity`,`value`])):($(),U(`span`,Gp,F(e.value),1))]),_:1})]),_:1},8,[`value`])]),R(Ge)?($(),U(`div`,Kp,[V(`h3`,qp,F(e.$t(`components.camera_options.detection`)),1),V(`div`,Jp,[($(!0),U(K,null,B(R(_),e=>($(),H(Pp,{key:e.id,type:`motion`,label:e.displayName.value,detected:e.getProperty(R(Ae).Detected)??!1,size:`small`,class:`card-border`},null,8,[`label`,`detected`]))),128)),($(!0),U(K,null,B(R(y),e=>($(),H(Pp,{key:e.id,type:`object`,label:e.displayName.value,detected:(e.getProperty(R(be).Detections)?.length??0)>0,detections:e.getProperty(R(be).Detections)?.map(e=>e.label??e.class??`unknown`),size:`small`,class:`card-border`},null,8,[`label`,`detected`,`detections`]))),128)),($(!0),U(K,null,B(R(b),e=>($(),H(Pp,{key:e.id,type:`audio`,label:e.displayName.value,detected:e.getProperty(R(Fe).Detected)??!1,size:`small`,class:`card-border`},null,8,[`label`,`detected`]))),128)),($(!0),U(K,null,B(R(ee),e=>($(),H(Pp,{key:e.id,type:`face`,label:e.displayName.value,detected:e.getProperty(R(E).Detected)??!1,detections:e.getProperty(R(E).Detections)?.map(e=>e.identity??`unknown`),size:`small`,class:`card-border`},null,8,[`label`,`detected`,`detections`]))),128)),($(!0),U(K,null,B(R(w),e=>($(),H(Pp,{key:e.id,type:`licensePlate`,label:e.displayName.value,detected:e.getProperty(R(we).Detected)??!1,detections:e.getProperty(R(we).Detections)?.map(e=>e.plateText??`unknown`),size:`small`,class:`card-border`},null,8,[`label`,`detected`,`detections`]))),128))])])):q(``,!0),R(ne).length?($(),U(`div`,Yp,[V(`h3`,Xp,F(e.$t(`components.camera_options.sensor_type_light`)),1),V(`div`,Zp,[($(!0),U(K,null,B(R(ne),e=>($(),H(l,{key:e.id,label:e.displayName.value,on:e.getProperty(R(ue).On)??!1,brightness:e.getProperty(R(ue).Brightness)??100,"has-brightness":e.hasCapability(`brightness`),size:`small`,class:`card-border`,"onUpdate:on":t=>e.setProperty(R(ue).On,t),"onUpdate:brightness":t=>e.setProperty(R(ue).Brightness,t)},null,8,[`label`,`on`,`brightness`,`has-brightness`,`onUpdate:on`,`onUpdate:brightness`]))),128))])])):q(``,!0),R(ae).length?($(),U(`div`,Qp,[V(`h3`,$p,F(e.$t(`components.camera_options.sensor_type_switch`)),1),V(`div`,em,[($(!0),U(K,null,B(R(ae),e=>($(),H(d,{key:e.id,label:e.displayName.value,on:e.getProperty(R(Oe).On)??!1,size:`small`,class:`card-border`,"onUpdate:on":t=>e.setProperty(R(Oe).On,t)},null,8,[`label`,`on`,`onUpdate:on`]))),128))])])):q(``,!0),R(oe).length?($(),U(`div`,tm,[V(`h3`,nm,F(e.$t(`components.camera_options.sensor_type_lock`)),1),V(`div`,rm,[($(!0),U(K,null,B(R(oe),e=>($(),H(p,{key:e.id,label:e.displayName.value,"current-state":e.getProperty(R(O).CurrentState)??2,"target-state":e.getProperty(R(O).TargetState)??0,size:`small`,class:`card-border`,"onUpdate:targetState":t=>e.setProperty(R(O).TargetState,t)},null,8,[`label`,`current-state`,`target-state`,`onUpdate:targetState`]))),128))])])):q(``,!0),R(re).length?($(),U(`div`,im,[V(`h3`,am,F(e.$t(`components.camera_options.sensor_type_siren`)),1),V(`div`,om,[($(!0),U(K,null,B(R(re),e=>($(),H(m,{key:e.id,label:e.displayName.value,active:e.getProperty(R(De).Active)??!1,volume:e.getProperty(R(De).Volume)??100,"has-volume":e.hasCapability(`volume`),size:`small`,class:`card-border`,"onUpdate:active":t=>e.setProperty(R(De).Active,t),"onUpdate:volume":t=>e.setProperty(R(De).Volume,t)},null,8,[`label`,`active`,`volume`,`has-volume`,`onUpdate:active`,`onUpdate:volume`]))),128))])])):q(``,!0),R(Le).length?($(),U(`div`,sm,[V(`h3`,cm,F(e.$t(`components.camera_options.sensor_type_securitySystem`)),1),V(`div`,lm,[($(!0),U(K,null,B(R(Le),e=>($(),H(h,{key:e.id,label:e.displayName.value,"current-state":e.getProperty(R(ge).CurrentState)??3,"target-state":e.getProperty(R(ge).TargetState)??3,size:`small`,class:`card-border`,"onUpdate:targetState":t=>e.setProperty(R(ge).TargetState,t)},null,8,[`label`,`current-state`,`target-state`,`onUpdate:targetState`]))),128))])])):q(``,!0),R(me).length?($(),U(`div`,um,[V(`h3`,dm,F(e.$t(`components.camera_options.sensor_type_doorbell`)),1),V(`div`,fm,[($(!0),U(K,null,B(R(me),e=>($(),H(g,{key:e.id,label:e.displayName.value,ring:e.getProperty(R(Ne).Ring)??!1,size:`small`,class:`card-border`,onTrigger:()=>e.setProperty(R(Ne).Ring,!0)},null,8,[`label`,`ring`,`onTrigger`]))),128))])])):q(``,!0),R(j).length?($(),U(`div`,pm,[V(`h3`,mm,F(e.$t(`components.camera_options.sensor_type_contact`)),1),V(`div`,hm,[($(!0),U(K,null,B(R(j),e=>($(),H(v,{key:e.id,label:e.displayName.value,detected:e.getProperty(R(Re).Detected)??!1,size:`small`,class:`card-border`},null,8,[`label`,`detected`]))),128))])])):q(``,!0),R(Ee).length?($(),U(`div`,gm,[V(`h3`,_m,F(e.$t(`components.camera_options.sensor_type_occupancy`)),1),V(`div`,vm,[($(!0),U(K,null,B(R(Ee),e=>($(),H(S,{key:e.id,label:e.displayName.value,detected:e.getProperty(R(D).Detected)??!1,size:`small`,class:`card-border`},null,8,[`label`,`detected`]))),128))])])):q(``,!0),R(ke).length?($(),U(`div`,ym,[V(`h3`,bm,F(e.$t(`components.camera_options.sensor_type_smoke`)),1),V(`div`,xm,[($(!0),U(K,null,B(R(ke),e=>($(),H(C,{key:e.id,label:e.displayName.value,detected:e.getProperty(R(Ce).Detected)??!1,size:`small`,class:`card-border`},null,8,[`label`,`detected`]))),128))])])):q(``,!0),R(je).length?($(),U(`div`,Sm,[V(`h3`,Cm,F(e.$t(`components.camera_options.sensor_type_leak`)),1),V(`div`,wm,[($(!0),U(K,null,B(R(je),e=>($(),H(ie,{key:e.id,label:e.displayName.value,detected:e.getProperty(R(xe).Detected)??!1,size:`small`,class:`card-border`},null,8,[`label`,`detected`]))),128))])])):q(``,!0),R(Me).length?($(),U(`div`,Tm,[V(`h3`,Em,F(e.$t(`components.camera_options.sensor_type_garage`)),1),V(`div`,Dm,[($(!0),U(K,null,B(R(Me),e=>($(),H(se,{key:e.id,label:e.displayName.value,"current-state":e.getProperty(R(fe).CurrentState)??1,"target-state":e.getProperty(R(fe).TargetState)??1,"obstruction-detected":e.getProperty(R(fe).ObstructionDetected)??!1,size:`small`,class:`card-border`,"onUpdate:targetState":t=>e.setProperty(R(fe).TargetState,t)},null,8,[`label`,`current-state`,`target-state`,`obstruction-detected`,`onUpdate:targetState`]))),128))])])):q(``,!0),R(_e).length?($(),U(`div`,Om,[V(`h3`,km,F(e.$t(`components.camera_options.sensor_type_temperature`)),1),V(`div`,Am,[($(!0),U(K,null,B(R(_e),e=>($(),H(ce,{key:e.id,label:e.displayName.value,current:e.getProperty(R(k).Current),size:`small`,class:`card-border`},null,8,[`label`,`current`]))),128))])])):q(``,!0),R(ve).length?($(),U(`div`,jm,[V(`h3`,Mm,F(e.$t(`components.camera_options.sensor_type_humidity`)),1),V(`div`,Nm,[($(!0),U(K,null,B(R(ve),e=>($(),H(le,{key:e.id,label:e.displayName.value,current:e.getProperty(R(he).Current),size:`small`,class:`card-border`},null,8,[`label`,`current`]))),128))])])):q(``,!0),R(T).length?($(),U(`div`,Pm,[V(`h3`,Fm,F(e.$t(`components.camera_options.sensor_type_battery`)),1),V(`div`,Im,[($(!0),U(K,null,B(R(T),e=>($(),H(de,{key:e.id,label:e.displayName.value,level:e.getProperty(R(x).Level)??100,charging:e.getProperty(R(x).Charging)??`NOT_CHARGING`,low:e.getProperty(R(x).Low)??!1,size:`small`,class:`card-border`},null,8,[`label`,`level`,`charging`,`low`]))),128))])])):q(``,!0),!R(Ke)&&!R(Ge)?($(),U(`div`,Lm,[V(`div`,Rm,F(e.$t(`components.camera_options.no_sensors`)),1)])):q(``,!0)])):($(),U(`div`,Fp,[Q(n,{class:`w-[30px] h-[30px] m-0`,"stroke-width":`5`})]))}}}),[[`__scopeId`,`data-v-5d86732a`]]),Bm={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function Vm(e,t){return $(),U(`svg`,Bm,[...t[0]||=[V(`g`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`},[V(`path`,{"stroke-width":`3`,d:`M5 10h.01M5 16h.01`}),V(`path`,{"stroke-width":`2`,d:`m10 17l4-10m2 10l4-10`})],-1)]])}var Hm=Y({name:`humbleicons-url`,render:Vm}),Um={class:`drawer-header flex items-center w-full h-[45px] border-b-[1px] border-color px-3`},Wm={class:`font-semibold text-lg truncate`},Gm=[`onClick`],Km={class:`text-xs truncate`},qm={class:`w-full h-full max-h-full overflow-y-scroll`},Jm={key:0,class:`flex w-full h-full items-center justify-center mt-5`},Ym={key:1,class:`w-full h-full`},Xm={key:0,class:`w-full flex items-center justify-center p-4 h-[70px]`},Zm=hn(Z({__name:`CameraOptions`,props:{cameraName:{},latestSnapshotSrc:{}},emits:[`close`],setup(e,{emit:t}){let n=new wr,r=e,i=t,a=qe(),o=Ue(),{t:s}=le(),{cameraName:l,latestSnapshotSrc:u}=Dt(r),{camera:d,isLoading:f}=j(l),{data:p,isBusy:m}=n.getCameraQuery(l),{mutate:h,isPending:g}=n.patchCameraQuery(),_=St(`formRef`),v=W(),y=W(`overview`),b=W([{name:`overview`,icon:fr},{name:`sources`,icon:Hm},{name:`settings`,icon:pr},{name:`plugins`,icon:gr}]),ee=J(()=>m.value||f.value||g.value),x=J(()=>y.value===`sources`||y.value===`settings`);async function S(){let e=await _.value?.validate();e?.valid&&e.values?h({cameraname:l.value,cameraData:e.values}):(a.error(`Validation failed`,e),o.add({severity:`error`,detail:s(`components.toast.validation_failed`),life:3e3}))}return M(p,e=>{e&&(v.value=Ze(e))},{deep:!0,immediate:!0}),(e,t)=>{let n=kn,r=c,a=Mn,o=Wn,s=te,f=zm,m=qu,h=fu,g=Hs,C=In,w=Gn,T=Fn;return $(),U(K,null,[V(`div`,Um,[V(`span`,Wm,F(R(l)),1),Q(r,{text:``,rounded:``,severity:`secondary`,class:`ml-auto cui-icon-md shrink-0`,onClick:t[0]||=e=>i(`close`)},{icon:G(()=>[Q(n,{width:`100%`,height:`100%`})]),_:1})]),Q(R(Rt),{ref_key:`formRef`,ref:_,class:`w-full`,style:z({height:`calc(100% - 45px - ${R(x)?`70px`:`0px`})`}),"validation-schema":R(Zr)},{default:G(()=>[Q(T,{value:R(y),"onUpdate:value":t[7]||=e=>Mt(y)?y.value=e:null,scrollable:``,class:`w-full h-full`},{default:G(()=>[Q(o,{class:`justify-between`,pt:{tablist:{class:`h-[65px]`},activeBar:{class:`!w-auto`}}},{default:G(()=>[($(!0),U(K,null,B(R(b),(t,n)=>($(),H(a,{key:n,value:t.name,"as-child":``},{default:G(n=>[V(`div`,lt({ref_for:!0},n.a11yAttrs,{class:[`flex flex-col items-center justify-center flex-1 content-background !py-3`,[{"hover:!text-color active:!text-color focus:!text-color":!n.active},n.class]],onClick:n.onClick}),[($(),H(dt(t.icon),{class:`w-5 h-5`})),V(`span`,Km,F(e.$t(`components.options_sidebar.segment_tab_${t.name}`)),1)],16,Gm)]),_:2},1032,[`value`]))),128))]),_:1}),Q(w,{class:`p-0 h-[calc(100%-65px)]`},{default:G(()=>[V(`div`,qm,[($(!0),U(K,null,B(R(b),(e,n)=>($(),H(C,{key:n,value:e.name,"as-child":``},{default:G(e=>[e.active?($(),U(`div`,lt({key:0,class:e.class},{ref_for:!0},e.a11yAttrs),[!R(v)||!R(p)||!R(d)?($(),U(`div`,Jm,[Q(s,{class:`w-[30px] h-[30px] m-0`,"stroke-width":`5`})])):($(),U(`div`,Ym,[R(y)===`overview`?($(),H(f,{key:0,camera:R(p),"camera-device":R(d),loading:R(ee),"latest-snapshot-src":R(u),onClose:t[1]||=e=>i(`close`)},null,8,[`camera`,`camera-device`,`loading`,`latest-snapshot-src`])):q(``,!0),R(y)===`sources`?($(),H(m,{key:1,modelValue:R(v),"onUpdate:modelValue":t[2]||=e=>Mt(v)?v.value=e:null,camera:R(p),"camera-device":R(d),loading:R(ee),onClose:t[3]||=e=>i(`close`)},null,8,[`modelValue`,`camera`,`camera-device`,`loading`])):q(``,!0),R(y)===`settings`?($(),H(h,{key:2,modelValue:R(v),"onUpdate:modelValue":t[4]||=e=>Mt(v)?v.value=e:null,camera:R(p),"camera-device":R(d),loading:R(ee),onClose:t[5]||=e=>i(`close`)},null,8,[`modelValue`,`camera`,`camera-device`,`loading`])):q(``,!0),R(y)===`plugins`?($(),H(g,{key:3,camera:R(p),"camera-device":R(d),loading:R(ee),onClose:t[6]||=e=>i(`close`)},null,8,[`camera`,`camera-device`,`loading`])):q(``,!0)]))],16)):q(``,!0)]),_:1},8,[`value`]))),128))])]),_:1})]),_:1},8,[`value`]),R(x)?($(),U(`div`,Xm,[Q(r,{fluid:``,severity:`success`,class:`cui-button-medium`,label:e.$t(`components.form.button.save`),onClick:S},null,8,[`label`])])):q(``,!0)]),_:1},8,[`style`,`validation-schema`])],64)}}}),[[`__scopeId`,`data-v-38cd7548`]]),Qm={class:`w-full h-full p-safe !pb-0 md:!pl-0`},$m={class:`w-full h-full border-0 md:border-r-[1px] border-color overflow-y-auto pb-safe`},eh=Z({__name:`CuiCameraDrawer`,setup(e){let t=Vt(),n=Dr(),r=n.getEventBus(),i=W(!1),a=W(),o=W(),s=J(()=>Or.pt);function c(){i.value=!1,n.close()}return M(t.currentRoute,(e,t)=>{e.path!==t.path&&n.close()}),pt(()=>{r.on(e=>{e.type===`open`?(a.value=e.options,o.value=e.props,i.value=!0):e.type===`close`&&(i.value=!1,a.value=void 0)})}),(e,t)=>{let n=Zm,r=er;return $(),H(r,lt({visible:R(i),"onUpdate:visible":t[0]||=e=>Mt(i)?i.value=e:null},R(o),{class:`border-0 md:border-l-[1px]`,pt:R(s),onHide:c}),{container:G(({closeCallback:e})=>[V(`div`,Qm,[V(`div`,$m,[R(a)?($(),H(n,lt({key:0},R(a),{onClose:e}),null,16,[`onClose`])):q(``,!0)])])]),_:1},16,[`visible`,`pt`])}}}),th=Z({__name:`CuiToast`,setup(e){let t=qe(),{t:n}=le(),{mdBreakpoint:r}=bn(),{theme:i}=Bt(Ir()),a={success:Lt.success,error:Lt.error,warn:Lt.warning,warning:Lt.warning,info:Lt.info};function o(e){return n(`components.toast.title_${e===`warning`?`warn`:e}`)}function s(e){return e.type===`dismiss`}return d(Ye.on(e=>{if(s(e)){Lt.dismiss(e.id);return}let r=e,i=a[r.severity]||Lt,c=r.summary||o(r.severity),l;if(r.action){let{label:e,loadingLabel:i,onClick:a}=r.action,o=r.id;l={label:e,onClick:r=>{r.preventDefault(),r.stopPropagation();let s=a();s instanceof Promise&&o&&(Lt.loading(i??e,{id:o,duration:1/0}),s.catch(e=>{t.error(`action failed`,e),Lt.error(n(`components.toast.title_error`),{id:o})}))}}}i(c,{id:r.id,description:r.detail,duration:r.persistent?1/0:r.life??3e3,action:l})})),(e,t)=>($(),H(R(Et),{"rich-colors":``,position:R(r)?`top-center`:`bottom-right`,"visible-toasts":3,theme:R(i)},null,8,[`position`,`theme`]))}}),nh={class:`loader flex flex-col justify-center items-center`},rh={key:0,class:`absolute flex flex-col items-center justify-center pb-safe bottom-10`},ih={key:0,class:`offline`},ah={key:1,class:`text-center text-white text-sm font-bold mt-2`},oh=hn(Z({__name:`CuiLoadingScreen`,props:{reload:{type:Boolean,default:!1},height:{default:`200px`},width:{default:`200px`},text:{},icon:{}},setup(e){let{reload:t,width:n,height:r,text:i,icon:a}=Dt(e),{start:o}=T(()=>{document.getElementById(`lens`)?.classList.add(`cameraLens`),document.getElementById(`CameraUI_U`)?.classList.add(`cameraLetter`)},100,{immediate:!1}),{resume:s}=u(()=>{document.getElementById(`lens`)?.classList.remove(`cameraLens`),document.getElementById(`CameraUI_U`)?.classList.remove(`cameraLetter`),o()},2300,{immediate:!1});return pt(()=>{t.value&&s()}),(e,t)=>($(),U(`div`,nh,[Q(R(ft),{src:R(it)(`logo_loading_circle.svg`),width:R(n),height:R(r),title:`camera.ui`,"aria-label":`camera.ui`},null,8,[`src`,`width`,`height`]),R(a)||R(i)?($(),U(`div`,rh,[R(a)?($(),U(`div`,ih,[($(),H(dt(R(a)),{class:`w-8 h-8 text-primary`}))])):q(``,!0),R(i)?($(),U(`div`,ah,F(R(i)),1)):q(``,!0)])):q(``,!0)]))}}),[[`__scopeId`,`data-v-839ba1ea`]]);qe(`PushHandler`);function sh(){let e=Vt(),{isElectronApp:t,electron:n}=An();function r(t,n){n?.deepLink&&e.push(n.deepLink)}pt(()=>{!t||!n||(n.removeListener(`notification-click`,r),n.on(`notification-click`,r))}),vt(()=>{n?.removeListener(`notification-click`,r)})}function ch(){let e=Vt(),{isElectronApp:t,electron:n}=An();function r(t,n){n?.path&&e.push(n.path)}pt(()=>{!t||!n||(n.removeListener(`deep-link`,r),n.on(`deep-link`,r))}),vt(()=>{n?.removeListener(`deep-link`,r)})}var lh={key:1,class:`app`},uh=hn(Z({__name:`App`,setup(e){let{navbarState:t,subbarState:n,showBottombar:r,showNavbar:i,showTopbar:a}=gn(),o=yn(),s=zt(),c=Vt(),{mdBreakpoint:l}=bn(),{isPWA:u}=vn(),{t:d}=le(),f=We(),{isElectronApp:p}=An();ii(),Sn(),sh(),ch();let{theme:m}=Bt(Ir()),{isLoggedIn:h}=Bt($e()),g=dr(),_=St(`navbarRef`),v=St(`topbarRef`),y=St(`bottombarRef`),b=W(!0),x=W(!1),S=ee(v,{width:0,height:0},{box:`border-box`}),C=ee(y,{width:0,height:0},{box:`border-box`}),te=J(()=>t.value===`closed`||t.value===`minified`?l.value?ea.CLOSED:ea.MINIFIED:ea.EXPANDED),w=J(()=>t.value===`closed`?0:8),T=J(()=>!_.value||l.value?`env(safe-area-inset-left, 0px)`:`calc(${te.value}px + max(${w.value}px, env(safe-area-inset-left, 0px)))`),ne=J(()=>o.showTopbar.value?`var(--topbar-background)`:o.background.value?o.background.value:`var(--ground-background)`),re=J(()=>`calc(100dvh - ${v.value?`${S.height.value}px`:`env(safe-area-inset-top, 0px)`} - ${y.value?`${C.height.value}px`:o.ignoreSafeAreaBottom.value?`0px`:`env(safe-area-inset-bottom, 0px)`} - ${y.value||!o.disableScroll.value||o.noExtraPadding.value?`0px`:`8px`})`),E=J(()=>s.meta.auth?.requiresAuth&&!h.value||b.value||g.isSwitching),ie=J(()=>{if(!(!g.isSwitching||!g.switchTargetName))return`${d(`components.instance_switcher.switching_to`)} ${g.switchTargetName}...`});async function ae(){}return M([h,()=>f.isOnline.value],([e,t],n)=>{if(g.isSwitching)return;let r=n?.[0]===!0&&n?.[1]===!0;e&&t&&!r&&(g.saveCurrentTokens(),g.fetchInstances())},{immediate:!0}),M([ne,m],()=>{At(()=>{if(/^var\([^)]+\)$/.test(ne.value)){let e=window.getComputedStyle(document.body),t=ne.value.split(`var(`)[1].split(`)`)[0],n=e.getPropertyValue(t);document.querySelector(`meta[name="theme-color"]`)?.setAttribute(`content`,n)}else document.querySelector(`meta[name="theme-color"]`)?.setAttribute(`content`,ne.value)})},{immediate:!0}),M(()=>o.disableScroll.value,e=>{document.body.classList.toggle(`disable-overflow-scroll`,e),document.documentElement.classList.toggle(`disable-overflow-scroll`,e)},{immediate:!0}),pt(async()=>{await c.isReady(),ae(),b.value=!1,requestAnimationFrame(()=>{x.value=!0})}),(e,s)=>{let c=oh,d=th,f=Kn,m=Jn,h=eh,b=Oo,ee=ba,ne=va,ae=yt(`RouterView`),oe=Bi,se=ki,D=Ei,O=bi;return R(E)?($(),U(`div`,{key:0,class:`flex w-full h-full justify-center items-center absolute z-50`,style:z({minHeight:R(u)?`100vh !important`:`100dvh !important`})},[Q(c,{reload:``,text:R(ie)},null,8,[`text`])],4)):($(),U(`div`,lh,[Q(d),Q(f),Q(m),Q(h),R(a)?($(),H(b,{key:0,ref_key:`topbarRef`,ref:v,class:`z-2 top-0`,"offset-left":R(l)?0:R(te),animate:R(x)},null,8,[`offset-left`,`animate`])):q(``,!0),R(r)?($(),H(ee,{key:1,ref_key:`bottombarRef`,ref:y,class:`z-2`},null,512)):q(``,!0),R(i)?($(),H(ne,{key:2,ref_key:`navbarRef`,ref:_,class:`z-3 top-0 left-0`},null,512)):q(``,!0),V(`main`,{id:`container`,class:`relative w-dvw z-1 overflow-x-hidden`,style:z({transition:R(x)?`padding-left 200ms`:void 0,paddingTop:R(v)?`${R(S).height.value}px`:`env(safe-area-inset-top, 0px)`,paddingLeft:R(T),paddingRight:`env(safe-area-inset-right, 0px)`,paddingBottom:R(y)?`${R(C).height.value}px`:R(o).ignoreSafeAreaBottom.value?`0px`:`env(safe-area-inset-bottom, 0px)`})},[V(`div`,{class:P([`w-full max-w-full h-full grid`,{"p-2":R(o).padding.value,"pt-0":R(o).paddingTop.value===!1,"pb-0":R(o).paddingBottom.value===!1&&!R(y),"pb-4":(R(o).paddingBottom.value||R(y))&&!R(o).disableScroll,"pl-0":R(o).paddingLeft.value===!1,"pr-0":R(o).paddingRight.value===!1}]),style:z({minHeight:R(re),maxHeight:R(o).disableScroll.value?R(re):void 0,height:R(o).disableScroll.value?R(re):void 0,overflow:R(o).disableScroll.value?`hidden`:void 0})},[Q(ae,null,{default:G(({Component:e})=>[($(),H(dt(e),{key:R(g).switchKey,class:P([`w-full h-full relative min-w-0`,{"overflow-x-hidden":!R(o).allowOverflowX.value}]),"navbar-width":R(te),"navbar-left":R(w)},null,8,[`class`,`navbar-width`,`navbar-left`]))]),_:1})],6)],4),R(p)?($(),H(oe,{key:3})):q(``,!0),R(t)===`opened`||R(n)===`opened`&&R(l)?($(),H(Ot,{key:4,to:R(t)===`opened`?`#app`:`#container`,defer:``},[R(l)?($(),U(`div`,{key:0,class:P([`fixed top-0 left-0 right-0 bottom-0 w-full h-full bg-black/50 z-1`,{"z-2":R(t)===`opened`}])},null,2)):q(``,!0)],8,[`to`])):q(``,!0),V(`div`,{class:`fixed-bg`,style:z({background:R(o).background.value})},null,4),Q(se),Q(D),Q(O)]))}}}),[[`__scopeId`,`data-v-c73e44d2`]]);function dh(e,t){e.use(je({natsTransport:t.nats,target:t.target,wsTransport:t.ws})),e.use(_e({natsTransport:t.nats,target:t.target,wsTransport:t.ws,workerBridge:Je(),workerRegistry:Ke}))}var fh=Wt(),ph=$n(nr,{primitive:{borderRadius:{none:`0`,xs:`2px`,sm:`4px`,md:`6px`,lg:`8px`,xl:`12px`},emerald:{50:`#ecfdf5`,100:`#d1fae5`,200:`#a7f3d0`,300:`#6ee7b7`,400:`#34d399`,500:`#10b981`,600:`#059669`,700:`#047857`,800:`#065f46`,900:`#064e3b`,950:`#022c22`},green:{50:`#f0fdf4`,100:`#dcfce7`,200:`#bbf7d0`,300:`#86efac`,400:`#4ade80`,500:`#22c55e`,600:`#16a34a`,700:`#15803d`,800:`#166534`,900:`#14532d`,950:`#052e16`},lime:{50:`#f7fee7`,100:`#ecfccb`,200:`#d9f99d`,300:`#bef264`,400:`#a3e635`,500:`#84cc16`,600:`#65a30d`,700:`#4d7c0f`,800:`#3f6212`,900:`#365314`,950:`#1a2e05`},red:{50:`#fef2f2`,100:`#fee2e2`,200:`#fecaca`,300:`#fca5a5`,400:`#f87171`,500:`#ef4444`,600:`#dc2626`,700:`#b91c1c`,800:`#991b1b`,900:`#7f1d1d`,950:`#450a0a`},orange:{50:`#fff7ed`,100:`#ffedd5`,200:`#fed7aa`,300:`#fdba74`,400:`#fb923c`,500:`#f97316`,600:`#ea580c`,700:`#c2410c`,800:`#9a3412`,900:`#7c2d12`,950:`#431407`},amber:{50:`#fffbeb`,100:`#fef3c7`,200:`#fde68a`,300:`#fcd34d`,400:`#fbbf24`,500:`#f59e0b`,600:`#d97706`,700:`#b45309`,800:`#92400e`,900:`#78350f`,950:`#451a03`},yellow:{50:`#fefce8`,100:`#fef9c3`,200:`#fef08a`,300:`#fde047`,400:`#facc15`,500:`#eab308`,600:`#ca8a04`,700:`#a16207`,800:`#854d0e`,900:`#713f12`,950:`#422006`},teal:{50:`#f0fdfa`,100:`#ccfbf1`,200:`#99f6e4`,300:`#5eead4`,400:`#2dd4bf`,500:`#14b8a6`,600:`#0d9488`,700:`#0f766e`,800:`#115e59`,900:`#134e4a`,950:`#042f2e`},cyan:{50:`#ecfeff`,100:`#cffafe`,200:`#a5f3fc`,300:`#67e8f9`,400:`#22d3ee`,500:`#06b6d4`,600:`#0891b2`,700:`#0e7490`,800:`#155e75`,900:`#164e63`,950:`#083344`},sky:{50:`#f0f9ff`,100:`#e0f2fe`,200:`#bae6fd`,300:`#7dd3fc`,400:`#38bdf8`,500:`#0ea5e9`,600:`#0284c7`,700:`#0369a1`,800:`#075985`,900:`#0c4a6e`,950:`#082f49`},blue:{50:`#eff6ff`,100:`#dbeafe`,200:`#bfdbfe`,300:`#93c5fd`,400:`#60a5fa`,500:`#3b82f6`,600:`#2563eb`,700:`#1d4ed8`,800:`#1e40af`,900:`#1e3a8a`,950:`#172554`},indigo:{50:`#eef2ff`,100:`#e0e7ff`,200:`#c7d2fe`,300:`#a5b4fc`,400:`#818cf8`,500:`#6366f1`,600:`#4f46e5`,700:`#4338ca`,800:`#3730a3`,900:`#312e81`,950:`#1e1b4b`},violet:{50:`#f5f3ff`,100:`#ede9fe`,200:`#ddd6fe`,300:`#c4b5fd`,400:`#a78bfa`,500:`#8b5cf6`,600:`#7c3aed`,700:`#6d28d9`,800:`#5b21b6`,900:`#4c1d95`,950:`#2e1065`},purple:{50:`#faf5ff`,100:`#f3e8ff`,200:`#e9d5ff`,300:`#d8b4fe`,400:`#c084fc`,500:`#a855f7`,600:`#9333ea`,700:`#7e22ce`,800:`#6b21a8`,900:`#581c87`,950:`#3b0764`},fuchsia:{50:`#fdf4ff`,100:`#fae8ff`,200:`#f5d0fe`,300:`#f0abfc`,400:`#e879f9`,500:`#d946ef`,600:`#c026d3`,700:`#a21caf`,800:`#86198f`,900:`#701a75`,950:`#4a044e`},pink:{50:`#fdf2f8`,100:`#fce7f3`,200:`#fbcfe8`,300:`#f9a8d4`,400:`#f472b6`,500:`#ec4899`,600:`#db2777`,700:`#be185d`,800:`#9d174d`,900:`#831843`,950:`#500724`},rose:{50:`#fff1f2`,100:`#ffe4e6`,200:`#fecdd3`,300:`#fda4af`,400:`#fb7185`,500:`#f43f5e`,600:`#e11d48`,700:`#be123c`,800:`#9f1239`,900:`#881337`,950:`#4c0519`},slate:{50:`#f8fafc`,100:`#f1f5f9`,200:`#e2e8f0`,300:`#cbd5e1`,400:`#94a3b8`,500:`#64748b`,600:`#475569`,700:`#334155`,800:`#1e293b`,900:`#0f172a`,950:`#020617`},gray:{50:`#f9fafb`,100:`#f3f4f6`,200:`#e5e7eb`,300:`#d1d5db`,400:`#9ca3af`,500:`#6b7280`,600:`#4b5563`,700:`#374151`,800:`#1f2937`,900:`#111827`,950:`#030712`},zinc:{50:`#fafafa`,100:`#f4f4f5`,200:`#e4e4e7`,300:`#d4d4d8`,400:`#a1a1aa`,500:`#71717a`,600:`#52525b`,700:`#3f3f46`,800:`#27272a`,900:`#18181b`,950:`#09090b`},neutral:{50:`#fafafa`,100:`#f5f5f5`,200:`#e5e5e5`,300:`#d4d4d4`,400:`#a3a3a3`,500:`#737373`,600:`#525252`,700:`#404040`,800:`#262626`,900:`#171717`,950:`#0a0a0a`},stone:{50:`#fafaf9`,100:`#f5f5f4`,200:`#e7e5e4`,300:`#d6d3d1`,400:`#a8a29e`,500:`#78716c`,600:`#57534e`,700:`#44403c`,800:`#292524`,900:`#1c1917`,950:`#0c0a09`}},semantic:{transitionDuration:`0.2s`,focusRing:{width:`1px`,style:`solid`,color:`{primary.color}`,offset:`2px`,shadow:`none`},disabledOpacity:`0.6`,iconSize:`1rem`,anchorGutter:`2px`,primary:{50:`#fdf4f6`,100:`#f7ccd4`,200:`#f1a3b2`,300:`#eb7b90`,400:`#e5526e`,500:`#df2a4c`,600:`#be2441`,700:`#9c1d35`,800:`#7b172a`,900:`#59111e`,950:`#380b13`},formField:{paddingX:`0.75rem`,paddingY:`0.5rem`,sm:{fontSize:`0.875rem`,paddingX:`0.625rem`,paddingY:`0.375rem`},lg:{fontSize:`1.125rem`,paddingX:`0.875rem`,paddingY:`0.625rem`},borderRadius:`{border.radius.md}`,focusRing:{width:`0`,style:`none`,color:`transparent`,offset:`0`,shadow:`none`},transitionDuration:`{transition.duration}`},list:{padding:`0.25rem 0.25rem`,gap:`2px`,header:{padding:`0.5rem 1rem 0.25rem 1rem`},option:{padding:`0.5rem 0.75rem`,borderRadius:`{border.radius.sm}`},optionGroup:{padding:`0.5rem 0.75rem`,fontWeight:`600`}},content:{borderRadius:`{border.radius.md}`},mask:{transitionDuration:`0.15s`},navigation:{list:{padding:`0.25rem 0.25rem`,gap:`2px`},item:{padding:`0.5rem 0.75rem`,borderRadius:`{border.radius.sm}`,gap:`0.5rem`},submenuLabel:{padding:`0.5rem 0.75rem`,fontWeight:`600`},submenuIcon:{size:`0.875rem`}},overlay:{select:{borderRadius:`{border.radius.md}`,shadow:`0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1)`},popover:{borderRadius:`{border.radius.md}`,padding:`0.75rem`,shadow:`0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1)`},modal:{borderRadius:`{border.radius.xl}`,padding:`1.25rem`,shadow:`0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1)`},navigation:{shadow:`0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1)`}},colorScheme:{light:{surface:{0:`#ffffff`,50:`#f8fafc`,100:`#f1f5f9`,200:`#e2e8f0`,300:`#cbd5e1`,400:`#94a3b8`,500:`#64748b`,600:`#475569`,700:`#334155`,800:`#1e293b`,850:`#0f172a`,900:`#0f172a`,925:`#0c1421`,950:`#020617`,1e3:`#000000`},primary:{color:`{primary.500}`,contrastColor:`#ffffff`,hoverColor:`{primary.600}`,activeColor:`{primary.700}`},highlight:{background:`{primary.50}`,focusBackground:`{primary.100}`,color:`{primary.700}`,focusColor:`{primary.800}`},mask:{background:`rgba(0,0,0,0.4)`,color:`{surface.200}`},formField:{background:`{surface.50}`,disabledBackground:`{surface.200}`,filledBackground:`{surface.50}`,filledHoverBackground:`{surface.50}`,filledFocusBackground:`{surface.50}`,borderColor:`{surface.300}`,hoverBorderColor:`{surface.400}`,focusBorderColor:`{primary.color}`,invalidBorderColor:`{red.400}`,color:`{surface.700}`,disabledColor:`{surface.500}`,placeholderColor:`{surface.500}`,invalidPlaceholderColor:`{red.600}`,floatLabelColor:`{surface.500}`,floatLabelFocusColor:`{primary.600}`,floatLabelActiveColor:`{surface.500}`,floatLabelInvalidColor:`{form.field.invalid.placeholder.color}`,iconColor:`{surface.400}`,shadow:`0 0 #0000, 0 0 #0000, 0 1px 2px 0 rgba(18, 18, 23, 0.05)`},text:{color:`{surface.700}`,hoverColor:`{surface.800}`,mutedColor:`{surface.500}`,hoverMutedColor:`{surface.600}`},content:{background:`{surface.0}`,hoverBackground:`{surface.100}`,borderColor:`{surface.200}`,color:`{text.color}`,hoverColor:`{text.hover.color}`},overlay:{select:{background:`{surface.0}`,borderColor:`{surface.200}`,color:`{text.color}`},popover:{background:`{surface.0}`,borderColor:`{surface.200}`,color:`{text.color}`},modal:{background:`{surface.0}`,borderColor:`{surface.200}`,color:`{text.color}`}},list:{option:{focusBackground:`{surface.100}`,selectedBackground:`{highlight.background}`,selectedFocusBackground:`{highlight.focus.background}`,color:`{text.color}`,focusColor:`{text.hover.color}`,selectedColor:`{highlight.color}`,selectedFocusColor:`{highlight.focus.color}`,icon:{color:`{surface.400}`,focusColor:`{surface.500}`}},optionGroup:{background:`transparent`,color:`{text.muted.color}`}},navigation:{item:{focusBackground:`{surface.100}`,activeBackground:`{surface.100}`,color:`{text.color}`,focusColor:`{text.hover.color}`,activeColor:`{text.hover.color}`,icon:{color:`{surface.400}`,focusColor:`{surface.500}`,activeColor:`{surface.500}`}},submenuLabel:{background:`transparent`,color:`{text.muted.color}`},submenuIcon:{color:`{surface.400}`,focusColor:`{surface.500}`,activeColor:`{surface.500}`}}},dark:{surface:{0:`#ffffff`,50:`#f5f5f5`,100:`#d1d1d1`,200:`#adadad`,300:`#898989`,400:`#646464`,500:`#404040`,600:`#363636`,700:`#2d2d2d`,800:`#232323`,850:`#1d1d1d`,900:`#1a1a1a`,925:`#161616`,950:`#101010`,1e3:`#0d0d0d`},primary:{color:`{primary.500}`,contrastColor:`{surface.900}`,hoverColor:`{primary.600}`,activeColor:`{primary.700}`},highlight:{background:`color-mix(in srgb, {primary.400}, transparent 84%)`,focusBackground:`color-mix(in srgb, {primary.400}, transparent 76%)`,color:`rgba(255,255,255,.87)`,focusColor:`rgba(255,255,255,.87)`},mask:{background:`rgba(0,0,0,0.6)`,color:`{surface.200}`},formField:{background:`{surface.925}`,disabledBackground:`{surface.700}`,filledBackground:`{surface.800}`,filledHoverBackground:`{surface.800}`,filledFocusBackground:`{surface.800}`,borderColor:`{surface.800}`,hoverBorderColor:`{surface.500}`,focusBorderColor:`{primary.color}`,invalidBorderColor:`{red.300}`,color:`{surface.0}`,disabledColor:`{surface.400}`,placeholderColor:`{surface.400}`,invalidPlaceholderColor:`{red.400}`,floatLabelColor:`{surface.400}`,floatLabelFocusColor:`{primary.color}`,floatLabelActiveColor:`{surface.400}`,floatLabelInvalidColor:`{form.field.invalid.placeholder.color}`,iconColor:`{surface.400}`,shadow:`0 0 #0000, 0 0 #0000, 0 1px 2px 0 rgba(18, 18, 23, 0.05)`},text:{color:`{surface.0}`,hoverColor:`{surface.0}`,mutedColor:`{surface.400}`,hoverMutedColor:`{surface.300}`},content:{background:`{surface.900}`,hoverBackground:`{surface.800}`,borderColor:`{surface.700}`,color:`{text.color}`,hoverColor:`{text.hover.color}`},overlay:{select:{background:`{surface.900}`,borderColor:`{surface.700}`,color:`{text.color}`},popover:{background:`{surface.900}`,borderColor:`{surface.700}`,color:`{text.color}`},modal:{background:`{surface.900}`,borderColor:`{surface.700}`,color:`{text.color}`}},list:{option:{focusBackground:`{surface.800}`,selectedBackground:`{highlight.background}`,selectedFocusBackground:`{highlight.focus.background}`,color:`{text.color}`,focusColor:`{text.hover.color}`,selectedColor:`{highlight.color}`,selectedFocusColor:`{highlight.focus.color}`,icon:{color:`{surface.500}`,focusColor:`{surface.400}`}},optionGroup:{background:`transparent`,color:`{text.muted.color}`}},navigation:{item:{focusBackground:`{surface.800}`,activeBackground:`{surface.800}`,color:`{text.color}`,focusColor:`{text.hover.color}`,activeColor:`{text.hover.color}`,icon:{color:`{surface.500}`,focusColor:`{surface.400}`,activeColor:`{surface.400}`}},submenuLabel:{background:`transparent`,color:`{text.muted.color}`},submenuIcon:{color:`{surface.500}`,focusColor:`{surface.400}`,activeColor:`{surface.400}`}}}}}});function mh(e){Qe(e)||Ue().add({severity:`error`,detail:e,life:3e3})}function hh(){return{enableDevtoolsV6Plugin:!0,queryClientConfig:{defaultOptions:{queries:{refetchOnWindowFocus:!1,refetchOnReconnect:!0,gcTime:300*1e3,staleTime:1e4,networkMode:`online`,retry:(e,t)=>gh(t)===401?!1:e<2?!0:(mh(t),!1)},mutations:{retry:0,networkMode:`online`,onError:mh}}}}}function gh(e){if(typeof e==`object`&&e&&`response`in e){let t=e.response;if(typeof t?.status==`number`)return t.status}}function _h(){return{theme:{preset:ph,options:{cssLayer:{name:`primevue`,order:`theme, base, primevue`},darkModeSelector:`.dark-mode`}}}}function vh(e){e.directive(`tooltip`,Ln).directive(`focustrap`,l),e.use(tr).use(ir).use(Qn).use(or,_h()).use(Xe).use(Nt()).use(_t,hh()).use(fh)}window.addEventListener(`vite:preloadError`,()=>{sessionStorage.getItem(`cui-chunk-reload`)||(sessionStorage.setItem(`cui-chunk-reload`,`1`),window.location.reload())});var{connection:yh}=await rt({logger:new ae(`Connection`)});nt();var bh=It(uh),xh=new ae(`Vue`);bh.config.errorHandler=(e,t,n)=>xh.error(`[${n}]`,e),vh(bh),at(yh),dh(bh,yh),bh.use(Dn),dr().restoreActiveOverride();var Sh=await st(yh,{onUser:e=>$e().setUserFromLogin(e),onRedirectInfo:e=>{dr().redirectInfo=e},onReset:()=>{dr().activeId=null,Ge.value=null}});bh.mount(`#app`),Sh||yh.boot(`default`);
@@ -1 +0,0 @@
1
- import{dn as e,mn as t,ur as n,zn as r}from"./vendor-DoIl6acN.js";import{t as i}from"./bell-outline-U3Gb4nI1.js";import{n as a,t as o}from"./lightbulb-outline-B0CFho4y.js";var ee={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function s(n,i){return r(),t(`svg`,ee,[...i[0]||=[e(`path`,{fill:`currentColor`,d:`M4.93 4.93A9.97 9.97 0 0 0 2 12c0 2.76 1.12 5.26 2.93 7.07l1.41-1.41A7.94 7.94 0 0 1 4 12c0-2.21.89-4.22 2.34-5.66zm14.14 0l-1.41 1.41A7.96 7.96 0 0 1 20 12c0 2.22-.89 4.22-2.34 5.66l1.41 1.41A9.97 9.97 0 0 0 22 12c0-2.76-1.12-5.26-2.93-7.07M7.76 7.76A5.98 5.98 0 0 0 6 12c0 1.65.67 3.15 1.76 4.24l1.41-1.41A4 4 0 0 1 8 12c0-1.11.45-2.11 1.17-2.83zm8.48 0l-1.41 1.41A4 4 0 0 1 16 12c0 1.11-.45 2.11-1.17 2.83l1.41 1.41A5.98 5.98 0 0 0 18 12c0-1.65-.67-3.15-1.76-4.24M12 10a2 2 0 0 0-2 2a2 2 0 0 0 2 2a2 2 0 0 0 2-2a2 2 0 0 0-2-2`},null,-1)]])}var c=n({name:`mdi-access-point`,render:s}),l={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function u(n,i){return r(),t(`svg`,l,[...i[0]||=[e(`path`,{fill:`currentColor`,d:`M4 4h3l2-2h6l2 2h3a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2m8 3a5 5 0 0 0-5 5a5 5 0 0 0 5 5a5 5 0 0 0 5-5a5 5 0 0 0-5-5m0 2a3 3 0 0 1 3 3a3 3 0 0 1-3 3a3 3 0 0 1-3-3a3 3 0 0 1 3-3`},null,-1)]])}var d=n({name:`mdi-camera`,render:u}),f={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function p(n,i){return r(),t(`svg`,f,[...i[0]||=[e(`path`,{fill:`currentColor`,d:`M9 12c0-.81.3-1.5.89-2.11C10.5 9.3 11.19 9 12 9s1.5.3 2.11.89c.59.61.89 1.3.89 2.11s-.3 1.5-.89 2.11c-.61.59-1.3.89-2.11.89s-1.5-.3-2.11-.89C9.3 13.5 9 12.81 9 12M5.53 8.44l1.78 1.78L5.53 12l1.78 1.78l-1.78 1.78L2 12zm2.91 10.03l1.78-1.78L12 18.47l1.78-1.78l1.78 1.78L12 22zm10.03-2.91l-1.78-1.78L18.47 12l-1.78-1.78l1.78-1.78L22 12zM15.56 5.53l-1.78 1.78L12 5.53l-1.78 1.78l-1.78-1.78L12 2z`},null,-1)]])}var m=n({name:`mdi-camera-control`,render:p}),h={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function g(n,i){return r(),t(`svg`,h,[...i[0]||=[e(`path`,{fill:`currentColor`,d:`m23.5 17l-5 5l-3.5-3.5l1.5-1.5l2 2l3.5-3.5zm-10.4 2.9c-.4.1-.7.1-1.1.1c-4.4 0-8-3.6-8-8s3.6-8 8-8s8 3.6 8 8c0 .4 0 .7-.1 1.1c.7.1 1.3.3 1.9.6c.1-.6.2-1.1.2-1.7c0-5.5-4.5-10-10-10S2 6.5 2 12s4.5 10 10 10c.6 0 1.2-.1 1.7-.2c-.3-.5-.5-1.2-.6-1.9m2.5-5.8l-3.1-1.8V7H11v6l3.5 2.1c.3-.4.7-.7 1.1-1`},null,-1)]])}var _=n({name:`mdi-clock-check-outline`,render:g}),v={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function y(n,i){return r(),t(`svg`,v,[...i[0]||=[e(`path`,{fill:`currentColor`,d:`M12 20a8 8 0 0 0 8-8a8 8 0 0 0-8-8a8 8 0 0 0-8 8a8 8 0 0 0 8 8m0-18a10 10 0 0 1 10 10a10 10 0 0 1-10 10C6.47 22 2 17.5 2 12A10 10 0 0 1 12 2m.5 5v5.25l4.5 2.67l-.75 1.23L11 13V7z`},null,-1)]])}var b=n({name:`mdi-clock-outline`,render:y}),x={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function S(n,i){return r(),t(`svg`,x,[...i[0]||=[e(`path`,{fill:`currentColor`,d:`M8 3a2 2 0 0 0-2 2v4a2 2 0 0 1-2 2H3v2h1a2 2 0 0 1 2 2v4a2 2 0 0 0 2 2h2v-2H8v-5a2 2 0 0 0-2-2a2 2 0 0 0 2-2V5h2V3m6 0a2 2 0 0 1 2 2v4a2 2 0 0 0 2 2h1v2h-1a2 2 0 0 0-2 2v4a2 2 0 0 1-2 2h-2v-2h2v-5a2 2 0 0 1 2-2a2 2 0 0 1-2-2V5h-2V3z`},null,-1)]])}var C=n({name:`mdi-code-braces`,render:S}),w={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function T(n,i){return r(),t(`svg`,w,[...i[0]||=[e(`path`,{fill:`currentColor`,d:`M12 1L8 5h3v9h2V5h3m2 18H6a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2h3v2H6v12h12V9h-3V7h3a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2`},null,-1)]])}var E=n({name:`mdi-export-variant`,render:T}),D={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function O(n,i){return r(),t(`svg`,D,[...i[0]||=[e(`path`,{fill:`currentColor`,d:`M7 2v11h3v9l7-12h-4l4-8z`},null,-1)]])}var k=n({name:`mdi-flash`,render:O}),A={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function te(n,i){return r(),t(`svg`,A,[...i[0]||=[e(`path`,{fill:`currentColor`,d:`M10 9a1 1 0 0 1 1-1a1 1 0 0 1 1 1v4.47l1.21.13l4.94 2.19c.53.24.85.77.85 1.35v4.36c-.03.82-.68 1.47-1.5 1.5H11c-.38 0-.74-.15-1-.43l-4.9-4.2l.74-.77c.19-.21.46-.32.74-.32h.22L10 19zm1-4a4 4 0 0 1 4 4c0 1.5-.8 2.77-2 3.46v-1.22c.61-.55 1-1.35 1-2.24a3 3 0 0 0-3-3a3 3 0 0 0-3 3c0 .89.39 1.69 1 2.24v1.22C7.8 11.77 7 10.5 7 9a4 4 0 0 1 4-4`},null,-1)]])}var j=n({name:`mdi-gesture-tap`,render:te}),M={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function N(n,i){return r(),t(`svg`,M,[...i[0]||=[e(`path`,{fill:`currentColor`,d:`M19 19H5V5h14m0-2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V5a2 2 0 0 0-2-2m-5.04 9.29l-2.75 3.54l-1.96-2.36L6.5 17h11z`},null,-1)]])}var P=n({name:`mdi-image-outline`,render:N}),F={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function I(n,i){return r(),t(`svg`,F,[...i[0]||=[e(`path`,{fill:`currentColor`,d:`M12 2c3.31 0 6 2.66 6 5.95C18 12.41 12 19 12 19S6 12.41 6 7.95C6 4.66 8.69 2 12 2m0 4a2 2 0 0 0-2 2a2 2 0 0 0 2 2a2 2 0 0 0 2-2a2 2 0 0 0-2-2m8 13c0 2.21-3.58 4-8 4s-8-1.79-8-4c0-1.29 1.22-2.44 3.11-3.17l.64.91C6.67 17.19 6 17.81 6 18.5c0 1.38 2.69 2.5 6 2.5s6-1.12 6-2.5c0-.69-.67-1.31-1.75-1.76l.64-.91C18.78 16.56 20 17.71 20 19`},null,-1)]])}var L=n({name:`mdi-map-marker-radius`,render:I}),R={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function z(n,i){return r(),t(`svg`,R,[...i[0]||=[e(`path`,{fill:`currentColor`,d:`M22 13.5c0 1.76-1.3 3.22-3 3.46V20a2 2 0 0 1-2 2h-3.8v-.3a2.7 2.7 0 0 0-2.7-2.7c-1.5 0-2.7 1.21-2.7 2.7v.3H4a2 2 0 0 1-2-2v-3.8h.3C3.79 16.2 5 15 5 13.5s-1.21-2.7-2.7-2.7H2V7a2 2 0 0 1 2-2h3.04c.24-1.7 1.7-3 3.46-3s3.22 1.3 3.46 3H17a2 2 0 0 1 2 2v3.04c1.7.24 3 1.7 3 3.46M17 15h1.5a1.5 1.5 0 0 0 1.5-1.5a1.5 1.5 0 0 0-1.5-1.5H17V7h-5V5.5A1.5 1.5 0 0 0 10.5 4A1.5 1.5 0 0 0 9 5.5V7H4v2.12c1.76.68 3 2.38 3 4.38s-1.25 3.7-3 4.38V20h2.12a4.7 4.7 0 0 1 4.38-3c2 0 3.7 1.25 4.38 3H17z`},null,-1)]])}var B=n({name:`mdi-puzzle-outline`,render:z}),V={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function H(n,i){return r(),t(`svg`,V,[...i[0]||=[e(`path`,{fill:`currentColor`,d:`M13 14c-3.36 0-4.46 1.35-4.82 2.24C9.25 16.7 10 17.76 10 19a3 3 0 0 1-3 3a3 3 0 0 1-3-3c0-1.31.83-2.42 2-2.83V7.83A2.99 2.99 0 0 1 4 5a3 3 0 0 1 3-3a3 3 0 0 1 3 3c0 1.31-.83 2.42-2 2.83v5.29c.88-.65 2.16-1.12 4-1.12c2.67 0 3.56-1.34 3.85-2.23A3.01 3.01 0 0 1 14 7a3 3 0 0 1 3-3a3 3 0 0 1 3 3c0 1.34-.88 2.5-2.09 2.86C17.65 11.29 16.68 14 13 14m-6 4a1 1 0 0 0-1 1a1 1 0 0 0 1 1a1 1 0 0 0 1-1a1 1 0 0 0-1-1M7 4a1 1 0 0 0-1 1a1 1 0 0 0 1 1a1 1 0 0 0 1-1a1 1 0 0 0-1-1m10 2a1 1 0 0 0-1 1a1 1 0 0 0 1 1a1 1 0 0 0 1-1a1 1 0 0 0-1-1`},null,-1)]])}var U=n({name:`mdi-source-branch`,render:H}),W={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function G(n,i){return r(),t(`svg`,W,[...i[0]||=[e(`path`,{fill:`currentColor`,d:`M6 2h12v6l-4 4l4 4v6H6v-6l4-4l-4-4zm10 14.5l-4-4l-4 4V20h8zm-4-5l4-4V4H8v3.5zM10 6h4v.75l-2 2l-2-2z`},null,-1)]])}var K=n({name:`mdi-timer-sand`,render:G}),q={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function J(n,i){return r(),t(`svg`,q,[...i[0]||=[e(`path`,{fill:`currentColor`,d:`M20.41 3c1.39 2.71 1.94 5.84 1.59 9c-.2 3.16-1.3 6.29-3.17 9l-1.53-1c1.61-2.43 2.55-5.2 2.7-8c.34-2.8-.11-5.57-1.3-8zM5.17 3L6.7 4C5.09 6.43 4.15 9.2 4 12c-.34 2.8.12 5.57 1.3 8l-1.69 1c-1.4-2.71-1.96-5.83-1.61-9c.2-3.16 1.3-6.29 3.17-9m6.91 7.68l2.32-3.23h2.53l-3.78 5l2.2 4.92h-2.26L11.71 14l-2.43 3.33H6.76l3.9-5.12l-2.13-4.76h2.27z`},null,-1)]])}var Y=n({name:`mdi-variable`,render:J}),X={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function Z(n,i){return r(),t(`svg`,X,[...i[0]||=[e(`path`,{fill:`currentColor`,d:`M16.36 14c.08-.66.14-1.32.14-2s-.06-1.34-.14-2h3.38c.16.64.26 1.31.26 2s-.1 1.36-.26 2m-5.15 5.56c.6-1.11 1.06-2.31 1.38-3.56h2.95a8.03 8.03 0 0 1-4.33 3.56M14.34 14H9.66c-.1-.66-.16-1.32-.16-2s.06-1.35.16-2h4.68c.09.65.16 1.32.16 2s-.07 1.34-.16 2M12 19.96c-.83-1.2-1.5-2.53-1.91-3.96h3.82c-.41 1.43-1.08 2.76-1.91 3.96M8 8H5.08A7.92 7.92 0 0 1 9.4 4.44C8.8 5.55 8.35 6.75 8 8m-2.92 8H8c.35 1.25.8 2.45 1.4 3.56A8 8 0 0 1 5.08 16m-.82-2C4.1 13.36 4 12.69 4 12s.1-1.36.26-2h3.38c-.08.66-.14 1.32-.14 2s.06 1.34.14 2M12 4.03c.83 1.2 1.5 2.54 1.91 3.97h-3.82c.41-1.43 1.08-2.77 1.91-3.97M18.92 8h-2.95a15.7 15.7 0 0 0-1.38-3.56c1.84.63 3.37 1.9 4.33 3.56M12 2C6.47 2 2 6.5 2 12a10 10 0 0 0 10 10a10 10 0 0 0 10-10A10 10 0 0 0 12 2`},null,-1)]])}var Q=n({name:`mdi-web`,render:Z}),ne={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function re(n,i){return r(),t(`svg`,ne,[...i[0]||=[e(`path`,{fill:`currentColor`,d:`M10.46 19C9 21.07 6.15 21.59 4.09 20.15c-2.05-1.44-2.53-4.31-1.09-6.4a4.59 4.59 0 0 1 3.58-1.98l.05 1.43c-.91.07-1.79.54-2.36 1.36c-1 1.44-.69 3.38.68 4.35c1.38.96 3.31.59 4.31-.84c.31-.45.49-.94.56-1.44v-1.01l5.58-.04l.07-.11c.53-.92 1.68-1.24 2.58-.72a1.9 1.9 0 0 1 .68 2.6c-.53.91-1.69 1.23-2.59.71c-.41-.23-.7-.6-.83-1.02l-4.07.02a5 5 0 0 1-.78 1.94m7.28-7.14c2.53.31 4.33 2.58 4.02 5.07c-.31 2.5-2.61 4.27-5.14 3.96a4.63 4.63 0 0 1-3.43-2.21l1.24-.72a3.22 3.22 0 0 0 2.32 1.45c1.75.21 3.3-.98 3.51-2.65s-1.03-3.2-2.76-3.41c-.54-.06-1.06.01-1.53.18l-.85.44l-2.58-4.77h-.22a1.906 1.906 0 0 1-1.85-1.95c.03-1.04.93-1.85 1.98-1.81c1.05.06 1.88.91 1.85 1.95c-.02.44-.19.84-.46 1.15l1.9 3.51c.62-.2 1.3-.27 2-.19M8.25 9.14c-1-2.35.06-5.04 2.37-6.02c2.32-.98 5 .13 6 2.48c.59 1.37.47 2.87-.2 4.07l-1.24-.72c.42-.81.49-1.8.09-2.73c-.68-1.6-2.49-2.37-4.04-1.72c-1.56.66-2.26 2.5-1.58 4.1c.28.66.75 1.17 1.32 1.51l.39.21l-3.07 4.99c.03.05.07.11.1.19c.49.91.15 2.06-.77 2.55c-.91.49-2.06.13-2.56-.81c-.49-.93-.15-2.08.77-2.57c.39-.21.82-.26 1.23-.17l2.31-3.77c-.47-.43-.87-.97-1.12-1.59`},null,-1)]])}var ie=n({name:`mdi-webhook`,render:re}),$=[{type:`trigger-detection`,category:`trigger`,labelKey:`components.automation_nodes.trigger_detection`,descriptionKey:`components.automation_nodes.trigger_detection_desc`,icon:k,color:`#22c55e`,defaults:{type:`trigger-detection`,cameraId:``,eventPhase:[`start`],detectionLabels:[],confidenceThreshold:0,audioLabels:[],faceFilter:[],licensePlateFilter:[]}},{type:`trigger-sensor`,category:`trigger`,labelKey:`components.automation_nodes.trigger_sensor`,descriptionKey:`components.automation_nodes.trigger_sensor_desc`,icon:c,color:`#22c55e`,defaults:{type:`trigger-sensor`,cameraId:``,sensorType:``,sensorName:``,sensorPluginId:``,properties:[]}},{type:`trigger-schedule`,category:`trigger`,labelKey:`components.automation_nodes.trigger_schedule`,descriptionKey:`components.automation_nodes.trigger_schedule_desc`,icon:b,color:`#22c55e`,defaults:{type:`trigger-schedule`,cron:`0 * * * *`}},{type:`trigger-webhook`,category:`trigger`,labelKey:`components.automation_nodes.trigger_webhook`,descriptionKey:`components.automation_nodes.trigger_webhook_desc`,icon:ie,color:`#22c55e`,defaults:{type:`trigger-webhook`,webhookId:``}},{type:`trigger-system`,category:`trigger`,labelKey:`components.automation_nodes.trigger_system`,descriptionKey:`components.automation_nodes.trigger_system_desc`,icon:a,color:`#22c55e`,defaults:{type:`trigger-system`,category:`system`,eventType:``,targetId:``}},{type:`trigger-manual`,category:`trigger`,labelKey:`components.automation_nodes.trigger_manual`,descriptionKey:`components.automation_nodes.trigger_manual_desc`,icon:j,color:`#22c55e`,defaults:{type:`trigger-manual`}},{type:`trigger-geofence`,category:`trigger`,labelKey:`components.automation_nodes.trigger_geofence`,descriptionKey:`components.automation_nodes.trigger_geofence_desc`,icon:L,color:`#22c55e`,defaults:{type:`trigger-geofence`,geofenceId:``,zoneName:``,latitude:0,longitude:0,radius:200,event:`both`,users:[]}},{type:`condition-ifelse`,category:`condition`,labelKey:`components.automation_nodes.condition_ifelse`,descriptionKey:`components.automation_nodes.condition_ifelse_desc`,icon:U,color:`#f59e0b`,defaults:{type:`condition-ifelse`,leftOperand:``,operator:`==`,rightOperand:``}},{type:`condition-switch`,category:`condition`,labelKey:`components.automation_nodes.condition_switch`,descriptionKey:`components.automation_nodes.condition_switch_desc`,icon:C,color:`#f59e0b`,defaults:{type:`condition-switch`,variable:``,cases:[]}},{type:`condition-sensorstate`,category:`condition`,labelKey:`components.automation_nodes.condition_sensorstate`,descriptionKey:`components.automation_nodes.condition_sensorstate_desc`,icon:c,color:`#f59e0b`,defaults:{type:`condition-sensorstate`,cameraId:``,sensorType:``,sensorName:``,sensorPluginId:``,conditions:[],logic:`AND`}},{type:`condition-time`,category:`condition`,labelKey:`components.automation_nodes.condition_time`,descriptionKey:`components.automation_nodes.condition_time_desc`,icon:_,color:`#f59e0b`,defaults:{type:`condition-time`,startTime:`08:00`,endTime:`18:00`,days:[]}},{type:`action-snapshot`,category:`action`,labelKey:`components.automation_nodes.action_snapshot`,descriptionKey:`components.automation_nodes.action_snapshot_desc`,icon:d,color:`#3b82f6`,defaults:{type:`action-snapshot`,cameraId:``,forceNew:!0},supportsRepeat:!0},{type:`action-sensor`,category:`action`,labelKey:`components.automation_nodes.action_sensor`,descriptionKey:`components.automation_nodes.action_sensor_desc`,icon:o,color:`#3b82f6`,defaults:{type:`action-sensor`,cameraId:``,sensorType:``,sensorName:``,sensorPluginId:``,properties:[]}},{type:`action-notification`,category:`action`,labelKey:`components.automation_nodes.action_notification`,descriptionKey:`components.automation_nodes.action_notification_desc`,icon:i,color:`#3b82f6`,defaults:{type:`action-notification`,title:``,body:``,severity:`info`,deepLink:``,targets:[]}},{type:`action-http`,category:`action`,labelKey:`components.automation_nodes.action_http`,descriptionKey:`components.automation_nodes.action_http_desc`,icon:Q,color:`#3b82f6`,defaults:{type:`action-http`,url:``,method:`POST`,headers:{},body:``},supportsRepeat:!0},{type:`action-delay`,category:`action`,labelKey:`components.automation_nodes.action_delay`,descriptionKey:`components.automation_nodes.action_delay_desc`,icon:K,color:`#3b82f6`,defaults:{type:`action-delay`,duration:5,unit:`seconds`}},{type:`action-variable`,category:`action`,labelKey:`components.automation_nodes.action_variable`,descriptionKey:`components.automation_nodes.action_variable_desc`,icon:Y,color:`#3b82f6`,defaults:{type:`action-variable`,variableName:``,operator:`=`,value:``}},{type:`action-plugin`,category:`action`,labelKey:`components.automation_nodes.action_plugin`,descriptionKey:`components.automation_nodes.action_plugin_desc`,icon:B,color:`#3b82f6`,defaults:{type:`action-plugin`,pluginName:``,pluginInterface:``,method:``,params:{},config:{}},supportsRepeat:!0},{type:`action-camera-control`,category:`action`,labelKey:`components.automation_nodes.action_camera_control`,descriptionKey:`components.automation_nodes.action_camera_control_desc`,icon:m,color:`#3b82f6`,defaults:{type:`action-camera-control`,cameraId:``,properties:[]}},{type:`action-image-input`,category:`utility`,labelKey:`components.automation_nodes.action_image_input`,descriptionKey:`components.automation_nodes.action_image_input_desc`,icon:P,color:`#8b5cf6`,defaults:{type:`action-image-input`,source:``,variableName:`image`}},{type:`action-output`,category:`utility`,labelKey:`components.automation_nodes.action_output`,descriptionKey:`components.automation_nodes.action_output_desc`,icon:E,color:`#8b5cf6`,defaults:{type:`action-output`,variables:[]}}];function ae(e){return $.find(t=>t.type===e)}function oe(e){return $.filter(t=>t.category===e)}export{oe as n,ae as t};