@camera.ui/server 2.2.5-beta.0 → 2.2.5-beta.2

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 (953) hide show
  1. package/dist/interface/assets/404-BDvtK1qR.js +1 -0
  2. package/dist/interface/assets/About-B4A35rRx.js +1 -0
  3. package/dist/interface/assets/Assistant-BKxssfw-.js +1 -0
  4. package/dist/interface/assets/Automation-CP59cgP7.js +3 -0
  5. package/dist/interface/assets/AutomationImport-CEJdhE_d.js +2 -0
  6. package/dist/interface/assets/AutomationStore-BZGR_5Xl.js +2 -0
  7. package/dist/interface/assets/AutomationStoreDetail-BenRMMtV.js +2 -0
  8. package/dist/interface/assets/Automations-BpXorYAS.js +2 -0
  9. package/dist/interface/assets/Camera-UBUfaR5a.js +2 -0
  10. package/dist/interface/assets/CameraConsole-D24yXOQn.js +7 -0
  11. package/dist/interface/assets/Cameras-B21Y8MdQ.js +651 -0
  12. package/dist/interface/assets/Camview-BySyPtU5.js +1 -0
  13. package/dist/interface/assets/CertificateUpload-26LAL4MY.js +1 -0
  14. package/dist/interface/assets/Config-BGyGmukb.js +2 -0
  15. package/dist/interface/assets/ConfigActionAssistant-Cl_kr3hp.js +1 -0
  16. package/dist/interface/assets/ConfigActionCameraControl-CL4vXcNe.js +1 -0
  17. package/dist/interface/assets/ConfigActionDelay-DtPgmqWh.js +1 -0
  18. package/dist/interface/assets/ConfigActionHttp-DnkZTP5l.js +1 -0
  19. package/dist/interface/assets/ConfigActionImageInput-3svn6YP9.js +1 -0
  20. package/dist/interface/assets/ConfigActionMqtt-BTsFTLgm.js +1 -0
  21. package/dist/interface/assets/ConfigActionNotification-Cr4xJrZp.js +1 -0
  22. package/dist/interface/assets/ConfigActionNotificationControl-Cxkb_g8p.js +1 -0
  23. package/dist/interface/assets/ConfigActionOutput-WTr7FGf_.js +1 -0
  24. package/dist/interface/assets/ConfigActionPlugin-BpcJepbD.js +1 -0
  25. package/dist/interface/assets/ConfigActionSensor-BgD_F-hD.js +1 -0
  26. package/dist/interface/assets/ConfigActionSnapshot-DjR-Z08N.js +1 -0
  27. package/dist/interface/assets/ConfigActionVariable-gPuPbjpm.js +1 -0
  28. package/dist/interface/assets/ConfigConditionIfElse-CUHKJmPx.js +1 -0
  29. package/dist/interface/assets/ConfigConditionSensorState-D-gPRqMu.js +1 -0
  30. package/dist/interface/assets/ConfigConditionSwitch-BRf1T5tJ.js +1 -0
  31. package/dist/interface/assets/ConfigConditionTime-BC0n6sWO.js +1 -0
  32. package/dist/interface/assets/ConfigSensorValueInput-BUHapx4M.js +1 -0
  33. package/dist/interface/assets/ConfigTriggerDetection-Byd6SLGg.js +1 -0
  34. package/dist/interface/assets/ConfigTriggerGeofence-CkzTFEZn.js +1 -0
  35. package/dist/interface/assets/ConfigTriggerManual-B2dWcFrl.js +1 -0
  36. package/dist/interface/assets/ConfigTriggerMqtt-B_aUDBu4.js +1 -0
  37. package/dist/interface/assets/ConfigTriggerSchedule-DAZo1PLj.js +1 -0
  38. package/dist/interface/assets/ConfigTriggerSensor-BCqAiPu4.js +1 -0
  39. package/dist/interface/assets/ConfigTriggerSystem-DuBydCiq.js +1 -0
  40. package/dist/interface/assets/ConfigTriggerWebhook-DDsnpwJr.js +1 -0
  41. package/dist/interface/assets/Console-HXmKYaK_.js +1 -0
  42. package/dist/interface/assets/CuiAssistantConversation-2qrRCsgw.js +5 -0
  43. package/dist/interface/assets/CuiAutomationRunsDialog-C_sMg7E1.js +1 -0
  44. package/dist/interface/assets/CuiBottomSheet-CTr-KHC8.js +1 -0
  45. package/dist/interface/assets/CuiBottomSheet-D_0LrjA_.js +1 -0
  46. package/dist/interface/assets/CuiCameraPipCard-BZCayhy_.js +1 -0
  47. package/dist/interface/assets/CuiCameraRecordings-BbaEL2ST.js +1 -0
  48. package/dist/interface/assets/CuiCameraShares-BIUB1xMa.js +1 -0
  49. package/dist/interface/assets/CuiCameraTable-C5tQHs63.js +1 -0
  50. package/dist/interface/assets/CuiCameraTable-D-UhqHk4.js +2 -0
  51. package/dist/interface/assets/CuiChartTable-CSK4Mzn3.js +1 -0
  52. package/dist/interface/assets/CuiConsole-DAbJXJBq.js +5 -0
  53. package/dist/interface/assets/CuiDataTable-DgcJsG-K.js +1 -0
  54. package/dist/interface/assets/CuiLightControl-v6k9hVGl.js +1 -0
  55. package/dist/interface/assets/CuiList-HdsA9vV1.js +1 -0
  56. package/dist/interface/assets/CuiMarkdownContent-BUYtK_wD.js +1 -0
  57. package/dist/interface/assets/CuiMarkdownContent-DSArmS0V.js +1 -0
  58. package/dist/interface/assets/CuiPluginCard-5MRYJcF2.js +2 -0
  59. package/dist/interface/assets/CuiPluginCategoryChip-C7R1jP7r.js +1 -0
  60. package/dist/interface/assets/CuiPluginOAuthButton-BJJw0IaC.js +2 -0
  61. package/dist/interface/assets/CuiPluginTrustBadge-Bmm1qYdC.js +1 -0
  62. package/dist/interface/assets/CuiQRCode-DTSEFMBt.js +1 -0
  63. package/dist/interface/assets/CuiSchema-BDXeXora.js +1 -0
  64. package/dist/interface/assets/CuiTopNavbarItem-BVknLbRO.js +1 -0
  65. package/dist/interface/assets/Faces-BEpYvbB0.js +1 -0
  66. package/dist/interface/assets/FirstSteps-U93RDOcP.js +1 -0
  67. package/dist/interface/assets/Floorplan-D8XoCNOB.js +1 -0
  68. package/dist/interface/assets/Instances-CFwZotvU.js +1 -0
  69. package/dist/interface/assets/Logs-BjcfuMQV.js +6 -0
  70. package/dist/interface/assets/Menu-BjjnSgdP.js +1 -0
  71. package/dist/interface/assets/Metrics-BUP_-7o7.css +1 -0
  72. package/dist/interface/assets/Metrics-Ca_d5CbP.js +12 -0
  73. package/dist/interface/assets/OAuthDeviceFlow-9v-Czy_u.js +1 -0
  74. package/dist/interface/assets/Plugin-BjLw46Sw.js +1 -0
  75. package/dist/interface/assets/PluginConsole-C7sO42RG.js +7 -0
  76. package/dist/interface/assets/PluginDetail-BuLW4lkN.js +2 -0
  77. package/dist/interface/assets/PluginSchema-D0eL9H-b.js +1 -0
  78. package/dist/interface/assets/PluginSearch--LLMEeyx.js +2 -0
  79. package/dist/interface/assets/PluginSearch-0akjE0ef.js +1 -0
  80. package/dist/interface/assets/PluginUpdateProgress--MM9D8hs.js +1 -0
  81. package/dist/interface/assets/Plugins-26O511gf.js +1 -0
  82. package/dist/interface/assets/RecentEventsFilter-CvIJS8Se.js +1 -0
  83. package/dist/interface/assets/Recordings-DQOGeSFm.js +1 -0
  84. package/dist/interface/assets/SensorEdit-DEW5D80x.js +1 -0
  85. package/dist/interface/assets/SensorHistory-Efw0bZ-X.js +1 -0
  86. package/dist/interface/assets/Sensors-C8yOyAwo.js +2 -0
  87. package/dist/interface/assets/Settings-B-RgMeVm.js +1 -0
  88. package/dist/interface/assets/SettingsAccount-B6aXFx3F.js +1 -0
  89. package/dist/interface/assets/SettingsAccount-_0ccrXYU.js +1 -0
  90. package/dist/interface/assets/SettingsAppearance-CkDwzx6f.js +1 -0
  91. package/dist/interface/assets/SettingsAppearance-DBFE3uVH.js +1 -0
  92. package/dist/interface/assets/SettingsAssistant-DN5OUJqt.js +1 -0
  93. package/dist/interface/assets/SettingsBackup-BqKBKis5.js +1 -0
  94. package/dist/interface/assets/SettingsList-BU191rmt.js +1 -0
  95. package/dist/interface/assets/SettingsMqtt-hsKZkU-o.js +1 -0
  96. package/dist/interface/assets/SettingsNotifications-DIeiUEAk.js +1 -0
  97. package/dist/interface/assets/SettingsPermissions-sI64FPZG.js +1 -0
  98. package/dist/interface/assets/SettingsRecordings-CghrKErw.js +1 -0
  99. package/dist/interface/assets/SettingsRemote-Doa0aBMC.js +2 -0
  100. package/dist/interface/assets/SettingsSystem-DP1p1Xns.js +2 -0
  101. package/dist/interface/assets/SettingsUsers-Dpej-he1.js +1 -0
  102. package/dist/interface/assets/Terminal-DPRPXCSt.js +4 -0
  103. package/dist/interface/assets/Training-DYlefOX1.js +1 -0
  104. package/dist/interface/assets/Updates-QTvCp1aS.js +2 -0
  105. package/dist/interface/assets/VariableInput-DhusSZPw.js +1 -0
  106. package/dist/interface/assets/VariableSuggestions-Bkzz4Mv3.js +1 -0
  107. package/dist/interface/assets/VersionsHandler-DjNSpSYy.js +7 -0
  108. package/dist/interface/assets/VirtualSensorCreate-soGT6h2c.js +1 -0
  109. package/dist/interface/assets/Workers-CUVvTuts.js +2 -0
  110. package/dist/interface/assets/account-Bu30He0P.js +1 -0
  111. package/dist/interface/assets/alert-circle-D2fAQwTX.js +1 -0
  112. package/dist/interface/assets/alert-outline-D7zaSJH_.js +1 -0
  113. package/dist/interface/assets/api-B0wYDGQj.css +2 -0
  114. package/dist/interface/assets/api-BNrZVfeD.js +4 -0
  115. package/dist/interface/assets/api-CK2tonlH.js +1 -0
  116. package/dist/interface/assets/arrow-left-BGLyEqqa.js +1 -0
  117. package/dist/interface/assets/assistant-BEe1ExZL.js +1 -0
  118. package/dist/interface/assets/assistantModels-D0soYqq7.js +1 -0
  119. package/dist/interface/assets/auth-QEpUGkWd.js +1 -0
  120. package/dist/interface/assets/automations-BBIBV4Uu.js +1 -0
  121. package/dist/interface/assets/back-filled-BPBVnQjx.js +1 -0
  122. package/dist/interface/assets/bell-ring-CyCFPUL_.js +1 -0
  123. package/dist/interface/assets/brain-CIJB1ree.js +1 -0
  124. package/dist/interface/assets/cameraSources-Cm18cW9L.js +1 -0
  125. package/dist/interface/assets/cctv-D6kxZ-lp.js +1 -0
  126. package/dist/interface/assets/check-circle-DHAAn6A6.js +1 -0
  127. package/dist/interface/assets/check-circle-outline-BbqeKfIK.js +1 -0
  128. package/dist/interface/assets/chevron-down-ZYTrU871.js +1 -0
  129. package/dist/interface/assets/chevron-up-LQXNz9CE.js +1 -0
  130. package/dist/interface/assets/clock-outline-CKTiLKoR.js +1 -0
  131. package/dist/interface/assets/close-BbEPZQqa.js +1 -0
  132. package/dist/interface/assets/close-circle-BSUSUs4K.js +1 -0
  133. package/dist/interface/assets/cloud-check-BTGbrAQ_.js +1 -0
  134. package/dist/interface/assets/cloudHandoff-Dnndt2el.js +1 -0
  135. package/dist/interface/assets/config-vwkU8aqP.js +1 -0
  136. package/dist/interface/assets/content-copy-V0DW9ZbH.js +1 -0
  137. package/dist/interface/assets/copy-DsmMEtSH.js +1 -0
  138. package/dist/interface/assets/cube-scan-DGhUFV1x.js +1 -0
  139. package/dist/interface/assets/delete-CY8fsIW6.js +1 -0
  140. package/dist/interface/assets/dist-DNyx_J8o.js +1 -0
  141. package/dist/interface/assets/dots-vertical-pP1vP0Qa.js +1 -0
  142. package/dist/interface/assets/download-CyjJ7yJW.js +1 -0
  143. package/dist/interface/assets/esm-4Hzzm93H.js +1 -0
  144. package/dist/interface/assets/esm-BrFPi5_4.js +1 -0
  145. package/dist/interface/assets/esm-C7pcdfXf.js +1 -0
  146. package/dist/interface/assets/esm-C8bsO829.js +1 -0
  147. package/dist/interface/assets/esm-CXzdnAMk.js +1 -0
  148. package/dist/interface/assets/esm-CZNGZkPu.js +1 -0
  149. package/dist/interface/assets/esm-D0iI7OVb.js +1 -0
  150. package/dist/interface/assets/esm-DKolm6KU.js +1 -0
  151. package/dist/interface/assets/esm-DTywI9gs.js +1 -0
  152. package/dist/interface/assets/esm-DifXcK9i.js +1 -0
  153. package/dist/interface/assets/esm-Dq5o-Xb4.js +1 -0
  154. package/dist/interface/assets/esm-IbQuUZ5l.js +1 -0
  155. package/dist/interface/assets/esm-Xre_AP5i.js +1 -0
  156. package/dist/interface/assets/esm-zYnXHhpH.js +1 -0
  157. package/dist/interface/assets/eventIcons-cdzqQc0W.js +1 -0
  158. package/dist/interface/assets/eye-off-JCu1iUer.js +1 -0
  159. package/dist/interface/assets/eye-off-outline-GErp76H2.js +1 -0
  160. package/dist/interface/assets/flowSchema-rzBroL0H.js +1 -0
  161. package/dist/interface/assets/help-circle-outline-G43EJuch.js +1 -0
  162. package/dist/interface/assets/history-CNJREqJG.js +1 -0
  163. package/dist/interface/assets/home-B-_OQpZ6.js +1 -0
  164. package/dist/interface/assets/information-outline-Blt4EtWJ.js +1 -0
  165. package/dist/interface/assets/intercomService-Du8V_HxF.js +1 -0
  166. package/dist/interface/assets/lan-C3jliANx.js +1 -0
  167. package/dist/interface/assets/main-CRlC4FBY.js +3 -0
  168. package/dist/interface/assets/microphone-B6xc9JQ2.js +1 -0
  169. package/dist/interface/assets/minus-BI5qXFwJ.js +1 -0
  170. package/dist/interface/assets/mqtt-BY6-Hrbv.js +1 -0
  171. package/dist/interface/assets/native-CAujTO6L.js +1 -0
  172. package/dist/interface/assets/native-sQ88qazf.js +1 -0
  173. package/dist/interface/assets/nodeDefinitions-Dop49tx8.js +1 -0
  174. package/dist/interface/assets/notifications-CN6eTJb_.js +1 -0
  175. package/dist/interface/assets/pause-DKzvPG2b.js +1 -0
  176. package/dist/interface/assets/pencil-DKbi9SsG.js +1 -0
  177. package/dist/interface/assets/pencil-outline-CD3Xv98d.js +1 -0
  178. package/dist/interface/assets/plugin-D7K50k_y.js +1 -0
  179. package/dist/interface/assets/plugins-DKtX7zQp.js +1 -0
  180. package/dist/interface/assets/plus--kDl8ben.js +1 -0
  181. package/dist/interface/assets/plus-CHPYoMO_.js +1 -0
  182. package/dist/interface/assets/power-C9wmNlFS.js +1 -0
  183. package/dist/interface/assets/radar-B3ra28GD.js +1 -0
  184. package/dist/interface/assets/refresh-DfqyhMOh.js +1 -0
  185. package/dist/interface/assets/restore-FMacmqd_.js +1 -0
  186. package/dist/interface/assets/ring-resize-DyqCo2UN.js +1 -0
  187. package/dist/interface/assets/rooms-BHP4q6yf.js +1 -0
  188. package/dist/interface/assets/round-alt-arrow-left-bold-56eF9Bol.js +1 -0
  189. package/dist/interface/assets/search-BXbDWhLk.js +1 -0
  190. package/dist/interface/assets/sensorIcons-ztqlMLDc.js +1 -0
  191. package/dist/interface/assets/sensorSlots-D-uxjuv3.js +1 -0
  192. package/dist/interface/assets/sensors-DV2Z0IJt.js +1 -0
  193. package/dist/interface/assets/server-CfZnIVzn.js +1 -0
  194. package/dist/interface/assets/settings-Cw63SIJl.js +1 -0
  195. package/dist/interface/assets/source-branch-oyzrlfCD.js +1 -0
  196. package/dist/interface/assets/theme-Bi7qdjBK.js +1 -0
  197. package/dist/interface/assets/trash-2-BQc04l9M.js +1 -0
  198. package/dist/interface/assets/trash-can-outline-Bk5eENNM.js +1 -0
  199. package/dist/interface/assets/trash-fill-CXk8BmtF.js +1 -0
  200. package/dist/interface/assets/trash2-2rUvghml.js +1 -0
  201. package/dist/interface/assets/types-CNLAvgyw.js +1 -0
  202. package/dist/interface/assets/types-DuwD8xp5.js +1 -0
  203. package/dist/interface/assets/types-DwbeYXvn.js +1 -0
  204. package/dist/interface/assets/undo-Dcf7vcsv.js +1 -0
  205. package/dist/interface/assets/ungrouped-DHLAmt__.js +1 -0
  206. package/dist/interface/assets/updates-BqCH6Vr8.js +1 -0
  207. package/dist/interface/assets/upload-B-ZYPekV.js +1 -0
  208. package/dist/interface/assets/upload-nnbfDypK.js +1 -0
  209. package/dist/interface/assets/useAppVersion-B-rmq3Bb.js +1 -0
  210. package/dist/interface/assets/useAssistantActions-Kf-5ijVf.js +1 -0
  211. package/dist/interface/assets/useBackupRestore-Dj-ZXODq.js +1 -0
  212. package/dist/interface/assets/useCameraOptions-Dt2J8sP_.js +1 -0
  213. package/dist/interface/assets/useKeyboardInset-DtD3I2WC.js +1 -0
  214. package/dist/interface/assets/useLogsSocket-CEhUQdiY.js +1 -0
  215. package/dist/interface/assets/useNavLayout-CtpYjS5W.js +1 -0
  216. package/dist/interface/assets/usePermissions-CJzuagwD.js +1 -0
  217. package/dist/interface/assets/usePluginUpdates-BwoWN5yb.js +1 -0
  218. package/dist/interface/assets/usePushRegistration-ANx4BS6_.js +2 -0
  219. package/dist/interface/assets/useServerRestart-7edyD8M0.js +1 -0
  220. package/dist/interface/assets/useStreamStatus-DCSWHdbW.js +1 -0
  221. package/dist/interface/assets/useTabSwipe-DfS3R3uP.js +1 -0
  222. package/dist/interface/assets/useUpdateChannel-Cr9mSIRC.js +1 -0
  223. package/dist/interface/assets/useUpdatesSocket-B5Rm9syb.js +1 -0
  224. package/dist/interface/assets/useUserOptions-CJjImz8V.js +1 -0
  225. package/dist/interface/assets/variable-CcE0ZwTr.js +1 -0
  226. package/dist/interface/assets/vendor-DGke_6M4.js +23 -0
  227. package/dist/interface/assets/vendor-cameraui-BbGOMenD.js +2326 -0
  228. package/dist/interface/assets/vendor-capacitor-COL6Kz75.js +2 -0
  229. package/dist/interface/assets/vendor-chart-80wrH3md.js +3 -0
  230. package/dist/interface/assets/vendor-core-tgH2YubJ.js +1 -0
  231. package/dist/interface/assets/vendor-dnd-CEJS9JKU.js +2 -0
  232. package/dist/interface/assets/vendor-draggabilly-BY7O1F_Z.js +1 -0
  233. package/dist/interface/assets/vendor-markdown-DD4teg2u.js +14 -0
  234. package/dist/interface/assets/vendor-primevue-DNJJiEZl.js +3942 -0
  235. package/dist/interface/assets/vendor-vueflow-Bmwd2les.js +26 -0
  236. package/dist/interface/assets/web-3M-ddn4G.js +1 -0
  237. package/dist/interface/assets/web-BY80VGyU.js +1 -0
  238. package/dist/interface/assets/web-B_tUYyM0.js +1 -0
  239. package/dist/interface/assets/web-BjKL51lK-Bb5NYhpJ.js +1 -0
  240. package/dist/interface/assets/web-Bv-4PJGI.js +1 -0
  241. package/dist/interface/assets/web-C3Pk8qeB.js +1 -0
  242. package/dist/interface/assets/web-CLcvGPH6.js +1 -0
  243. package/dist/interface/assets/web-DO8gTOVJ.js +1 -0
  244. package/dist/interface/assets/web-DR5q_DmI.js +1 -0
  245. package/dist/interface/assets/web-DRHbG4Te.js +1 -0
  246. package/dist/interface/assets/web-DaQ8d8yk.js +1 -0
  247. package/dist/interface/assets/web-EVRW5whF.js +1 -0
  248. package/dist/interface/assets/web-S6Dk3UWN.js +1 -0
  249. package/dist/interface/assets/web-pWIp0wf0.js +1 -0
  250. package/dist/interface/assets/webhook-oVbP79Yk.js +1 -0
  251. package/dist/interface/assets/workbox-window.prod.es5-Dz5rcO1z.js +1 -0
  252. package/dist/interface/assets/zoom-in-GKNy8xA7.js +1 -0
  253. package/dist/interface/ha/404-Dl6JtQWv.js +60 -0
  254. package/dist/interface/ha/About-wjv4kCO3.js +55 -0
  255. package/dist/interface/ha/Assistant-Dpb4IsDC.js +9209 -0
  256. package/dist/interface/ha/Automation-CqTPjCUh.js +2025 -0
  257. package/dist/interface/ha/AutomationImport-CvdeneoU.js +206 -0
  258. package/dist/interface/ha/AutomationStore-bVPE68io.js +336 -0
  259. package/dist/interface/ha/AutomationStoreDetail-BYaNUjoH.js +122 -0
  260. package/dist/interface/ha/Automations-BfsYh2A_.js +424 -0
  261. package/dist/interface/ha/Camera-C70onr_O.js +654 -0
  262. package/dist/interface/ha/CameraConsole-Dg3lV-wq.js +52 -0
  263. package/dist/interface/ha/Cameras-DpM6gt3G.js +1970 -0
  264. package/dist/interface/ha/Camview-CO_bHntH.js +1331 -0
  265. package/dist/interface/ha/CertificateUpload-PS47Kgbg.js +117 -0
  266. package/dist/interface/ha/Config-D-cpocuH.js +356 -0
  267. package/dist/interface/ha/ConfigActionAssistant-DVVVfVvT.js +182 -0
  268. package/dist/interface/ha/ConfigActionCameraControl-BPpzE9-F.js +152 -0
  269. package/dist/interface/ha/ConfigActionDelay-zU6H75hY.js +61 -0
  270. package/dist/interface/ha/ConfigActionHttp-BsNy03j4.js +134 -0
  271. package/dist/interface/ha/ConfigActionImageInput-JUvNYn0w.js +171 -0
  272. package/dist/interface/ha/ConfigActionMqtt-PZqAKfTo.js +81 -0
  273. package/dist/interface/ha/ConfigActionNotification-DIL7abEm.js +199 -0
  274. package/dist/interface/ha/ConfigActionNotificationControl-BQ2w5yeg.js +111 -0
  275. package/dist/interface/ha/ConfigActionOutput-DVilKhPV.js +98 -0
  276. package/dist/interface/ha/ConfigActionPlugin-BUfTEJQ_.js +172 -0
  277. package/dist/interface/ha/ConfigActionSensor-Dzp16VyX.js +139 -0
  278. package/dist/interface/ha/ConfigActionSnapshot-CRjD5AMC.js +48 -0
  279. package/dist/interface/ha/ConfigActionVariable-CR8g7gEh.js +88 -0
  280. package/dist/interface/ha/ConfigConditionIfElse-CHoSgzXF.js +124 -0
  281. package/dist/interface/ha/ConfigConditionSensorState-Dn8_OhQe.js +192 -0
  282. package/dist/interface/ha/ConfigConditionSwitch-Ds-nqWeU.js +128 -0
  283. package/dist/interface/ha/ConfigConditionTime-DWNfEluj.js +95 -0
  284. package/dist/interface/ha/ConfigSensorValueInput-DwXM9wP1.js +170 -0
  285. package/dist/interface/ha/ConfigTriggerDetection-D37OkR_u.js +241 -0
  286. package/dist/interface/ha/ConfigTriggerGeofence-EbXy_y3Q.js +4888 -0
  287. package/dist/interface/ha/ConfigTriggerManual-B0DDQtoz.js +14 -0
  288. package/dist/interface/ha/ConfigTriggerMqtt-BX6uNEZy.js +134 -0
  289. package/dist/interface/ha/ConfigTriggerSchedule-_ThdB8Bb.js +72 -0
  290. package/dist/interface/ha/ConfigTriggerSensor-BFGEtBVF.js +73 -0
  291. package/dist/interface/ha/ConfigTriggerSystem-fRnAgUGR.js +192 -0
  292. package/dist/interface/ha/ConfigTriggerWebhook-DegifRdj.js +94 -0
  293. package/dist/interface/ha/Console-Bo6S5psN.js +348 -0
  294. package/dist/interface/ha/CuiAutomationRunsDialog-DXpNJqDE.js +130 -0
  295. package/dist/interface/ha/CuiBottomSheet-DLkC2OmT.js +270 -0
  296. package/dist/interface/ha/CuiCameraRecordings-9tdkxXiT.js +552 -0
  297. package/dist/interface/ha/CuiCameraShares-BbqY_2b7.js +121 -0
  298. package/dist/interface/ha/CuiCameraTable-BmH1yAgl.js +169 -0
  299. package/dist/interface/ha/CuiChartTable-BjBBI7Fo.js +6786 -0
  300. package/dist/interface/ha/CuiConsole-By3m4UbE.js +244 -0
  301. package/dist/interface/ha/CuiDataTable-C_ndu5My.js +8732 -0
  302. package/dist/interface/ha/CuiList-CU2NJ1K6.js +57 -0
  303. package/dist/interface/ha/CuiMarkdownContent-CrkZwv5j.js +4724 -0
  304. package/dist/interface/ha/CuiPluginCard-BLQ1galy.js +769 -0
  305. package/dist/interface/ha/CuiPluginOAuthButton-BDghklSy.js +79 -0
  306. package/dist/interface/ha/CuiPluginTrustBadge-DolANNao.js +123 -0
  307. package/dist/interface/ha/CuiQRCode-CcjPngXI.js +86 -0
  308. package/dist/interface/ha/CuiSchema-D9JFf0dp.js +963 -0
  309. package/dist/interface/ha/CuiTopNavbarItem-DcUEq-4e.js +141 -0
  310. package/dist/interface/ha/Faces-DjXHzr77.js +1282 -0
  311. package/dist/interface/ha/FirstSteps-CQAP9Siw.js +251 -0
  312. package/dist/interface/ha/Floorplan-DyaPzlQO.js +3657 -0
  313. package/dist/interface/ha/Instances-DWjaU5gj.js +680 -0
  314. package/dist/interface/ha/Logs-Dlx-X1NS.js +418 -0
  315. package/dist/interface/ha/Menu-iqEe01qO.js +156 -0
  316. package/dist/interface/ha/Metrics-Br2Dyvzh.js +1444 -0
  317. package/dist/interface/ha/OAuthDeviceFlow-CIGk92FD.js +112 -0
  318. package/dist/interface/ha/Plugin-DklIr7j2.js +1405 -0
  319. package/dist/interface/ha/PluginConsole-DCfxPtGU.js +56 -0
  320. package/dist/interface/ha/PluginDetail-BFfRnkdG.js +230 -0
  321. package/dist/interface/ha/PluginSearch-BTKBnjxb.js +462 -0
  322. package/dist/interface/ha/PluginUpdateProgress-Dej5AcCt.js +34 -0
  323. package/dist/interface/ha/Plugins-C2fONspm.js +692 -0
  324. package/dist/interface/ha/RecentEventsFilter-ylgjiDo8.js +79 -0
  325. package/dist/interface/ha/Recordings-w39I43cc.js +1498 -0
  326. package/dist/interface/ha/SensorEdit-BkKi1l-A.js +1462 -0
  327. package/dist/interface/ha/SensorHistory-BGJjMlc3.js +54 -0
  328. package/dist/interface/ha/Sensors-D_Wi9XPa.js +1386 -0
  329. package/dist/interface/ha/Settings-Bn7WLWf0.js +218 -0
  330. package/dist/interface/ha/SettingsAccount-CRTex-1j.js +971 -0
  331. package/dist/interface/ha/SettingsAppearance-B1qmJnYk.js +220 -0
  332. package/dist/interface/ha/SettingsAssistant-DDd1X0BC.js +1857 -0
  333. package/dist/interface/ha/SettingsBackup-DZbhSB13.js +556 -0
  334. package/dist/interface/ha/SettingsList-BQdyPe0H.js +40 -0
  335. package/dist/interface/ha/SettingsMqtt-CSZcY6ht.js +526 -0
  336. package/dist/interface/ha/SettingsNotifications-CfEhl0-y.js +529 -0
  337. package/dist/interface/ha/SettingsPermissions-Jh0FuIF7.js +84 -0
  338. package/dist/interface/ha/SettingsRecordings-BnAGDvcH.js +152 -0
  339. package/dist/interface/ha/SettingsRemote-w86TQVUA.js +1810 -0
  340. package/dist/interface/ha/SettingsSystem-CENjHL3k.js +376 -0
  341. package/dist/interface/ha/SettingsUsers-CqSHRklV.js +379 -0
  342. package/dist/interface/ha/Terminal-WsuxG3k-.js +617 -0
  343. package/dist/interface/ha/Training-hu_XOYBk.js +1505 -0
  344. package/dist/interface/ha/Updates-Dl_lLLR2.js +343 -0
  345. package/dist/interface/ha/VariableInput-C8Q81GUt.js +52 -0
  346. package/dist/interface/ha/VariableSuggestions-DXV2b7S4.js +201 -0
  347. package/dist/interface/ha/VersionsHandler-BOvjesvp.js +216 -0
  348. package/dist/interface/ha/VirtualSensorCreate-sgwATaky.js +101 -0
  349. package/dist/interface/ha/Workers-CkDuQ9NG.js +765 -0
  350. package/dist/interface/ha/accordion-Xem2SzgR.js +577 -0
  351. package/dist/interface/ha/account-DJh6O-cw.js +19 -0
  352. package/dist/interface/ha/alert-circle-C7oDe-WY.js +19 -0
  353. package/dist/interface/ha/alert-outline-FcLLjoOK.js +89 -0
  354. package/dist/interface/ha/api-BmYisoxj.js +62452 -0
  355. package/dist/interface/ha/api-oqpIZTkx.js +29 -0
  356. package/dist/interface/ha/arrow-left-OsxzW9Af.js +19 -0
  357. package/dist/interface/ha/assistant-0jE4C19U.js +345 -0
  358. package/dist/interface/ha/auth-B4Msg7R-.js +271 -0
  359. package/dist/interface/ha/autocomplete-B94Amei3.js +1373 -0
  360. package/dist/interface/ha/automationBlueprint-C-12Yjl7.js +250 -0
  361. package/dist/interface/ha/back-filled-CaxrZv0Q.js +20 -0
  362. package/dist/interface/ha/bell-ring-CBt11ejv.js +19 -0
  363. package/dist/interface/ha/brain-BiKXGva0.js +19 -0
  364. package/dist/interface/ha/button-BouAFgf5.js +406 -0
  365. package/dist/interface/ha/cameraui-cards.js +1 -1
  366. package/dist/interface/ha/cards-BrOcoiQJ.js +13352 -0
  367. package/dist/interface/ha/cctv-BD2g3nbO.js +19 -0
  368. package/dist/interface/ha/check-circle-B5OGJJIu.js +19 -0
  369. package/dist/interface/ha/check-circle-outline-DS7eEinv.js +19 -0
  370. package/dist/interface/ha/checkbox-CAKzZcqk.js +279 -0
  371. package/dist/interface/ha/chevron-down-BNj8w2js.js +19 -0
  372. package/dist/interface/ha/chevron-up-DDKj43BW.js +19 -0
  373. package/dist/interface/ha/chip-BTHURsTF.js +149 -0
  374. package/dist/interface/ha/clock-outline-DNStdM39.js +19 -0
  375. package/dist/interface/ha/close-CxFbonhd.js +19 -0
  376. package/dist/interface/ha/close-circle-DfYSNAKm.js +19 -0
  377. package/dist/interface/ha/cloud-check-aaxn1VZr.js +33 -0
  378. package/dist/interface/ha/config-IG56wp6m.js +116 -0
  379. package/dist/interface/ha/content-copy-CHPYjxRC.js +19 -0
  380. package/dist/interface/ha/copy-ApwNNqcL.js +22 -0
  381. package/dist/interface/ha/datepicker-B4Azs5zr.js +2961 -0
  382. package/dist/interface/ha/delete-DWdURc9X.js +19 -0
  383. package/dist/interface/ha/dist-C6MBHJhs.js +3251 -0
  384. package/dist/interface/ha/divider-DeFEXTGs.js +110 -0
  385. package/dist/interface/ha/dots-vertical-B0dv1-jL.js +19 -0
  386. package/dist/interface/ha/download-B64w9GvF.js +19 -0
  387. package/dist/interface/ha/eventIcons-BFNUgeGr.js +676 -0
  388. package/dist/interface/ha/eye-off-UG_p9nl8.js +33 -0
  389. package/dist/interface/ha/eye-off-outline-ACbzsGuK.js +19 -0
  390. package/dist/interface/ha/help-circle-outline-BniRuJRv.js +19 -0
  391. package/dist/interface/ha/history-XMyO_cLc.js +19 -0
  392. package/dist/interface/ha/home-36M6iydk.js +19 -0
  393. package/dist/interface/ha/information-outline-DSSRyysT.js +19 -0
  394. package/dist/interface/ha/inputicon-1w06U-Jl.js +324 -0
  395. package/dist/interface/ha/inputnumber-DZRwKgXr.js +1033 -0
  396. package/dist/interface/ha/inputtext-C_ygnPrC.js +257 -0
  397. package/dist/interface/ha/intercomService-B7HkLs6z.js +1414 -0
  398. package/dist/interface/ha/message-D6dIy_hz.js +244 -0
  399. package/dist/interface/ha/microphone-C4oQPpzp.js +19 -0
  400. package/dist/interface/ha/minus-Bp1AYyQv.js +46 -0
  401. package/dist/interface/ha/minus-D3V6azhV.js +19 -0
  402. package/dist/interface/ha/mqtt-pl13wSmG.js +56 -0
  403. package/dist/interface/ha/multiselect-Dp4XDBRR.js +1492 -0
  404. package/dist/interface/ha/notifications-B6wxSmou.js +159 -0
  405. package/dist/interface/ha/pause-BbFQ0FqK.js +19 -0
  406. package/dist/interface/ha/pencil-outline-SN9ingm5.js +19 -0
  407. package/dist/interface/ha/pinia-C6gt7A_Q.js +7641 -0
  408. package/dist/interface/ha/plugins-BwwaWxye.js +592 -0
  409. package/dist/interface/ha/plus-CgxY7W0L.js +19 -0
  410. package/dist/interface/ha/plus-brDoEzN2.js +46 -0
  411. package/dist/interface/ha/progressbar-CaUaM8Bt.js +95 -0
  412. package/dist/interface/ha/protocol-BB4jdtUC-DW3jl2tV.js +708 -0
  413. package/dist/interface/ha/radar-BG-Tcwg_.js +19 -0
  414. package/dist/interface/ha/refresh-CpjKkasY.js +19 -0
  415. package/dist/interface/ha/restore-BxzmXRET.js +19 -0
  416. package/dist/interface/ha/ring-resize-Dr2PxWIg.js +16 -0
  417. package/dist/interface/ha/ripple-ZDATPc2w.js +2928 -0
  418. package/dist/interface/ha/rooms-NIzjFYAd.js +45 -0
  419. package/dist/interface/ha/round-alt-arrow-left-bold-DDy2dLUM.js +37 -0
  420. package/dist/interface/ha/runtime-core.esm-bundler-_TfE0DWz.js +3306 -0
  421. package/dist/interface/ha/search-BViwEHdF.js +19 -0
  422. package/dist/interface/ha/select-UR3ZRDew.js +1382 -0
  423. package/dist/interface/ha/server-YOLwDVAW.js +239 -0
  424. package/dist/interface/ha/settings-lWJfHaif.js +22 -0
  425. package/dist/interface/ha/source-branch-C2kcmBcO.js +19 -0
  426. package/dist/interface/ha/speeddial-LCbl5g8p.js +682 -0
  427. package/dist/interface/ha/spinner-DIILjDT9.js +46 -0
  428. package/dist/interface/ha/tag-mchuCAPR.js +95 -0
  429. package/dist/interface/ha/textarea-ByXnzJzx.js +130 -0
  430. package/dist/interface/ha/tooltip-Z7VN-E1u.js +277 -0
  431. package/dist/interface/ha/trash-2-pgydLlch.js +23 -0
  432. package/dist/interface/ha/trash-can-outline-CBwv40Ck.js +19 -0
  433. package/dist/interface/ha/trash-fill-TFkvFuRj.js +21 -0
  434. package/dist/interface/ha/types-B8B9MqK0.js +1062 -0
  435. package/dist/interface/ha/types-XqA3YJPD.js +123 -0
  436. package/dist/interface/ha/ungrouped-DttNEB62.js +1320 -0
  437. package/dist/interface/ha/updates-DVhiQhMM.js +341 -0
  438. package/dist/interface/ha/upload-B-9Mumdm.js +19 -0
  439. package/dist/interface/ha/upload-BF0iIQFa.js +23 -0
  440. package/dist/interface/ha/useAppVersion-CG4D44Aa.js +22 -0
  441. package/dist/interface/ha/useAssistantActions-S1FrNe9b.js +29 -0
  442. package/dist/interface/ha/useLogsSocket-PKsRDttg.js +59 -0
  443. package/dist/interface/ha/useNavLayout-DoEcPx9Z.js +125 -0
  444. package/dist/interface/ha/usePermissions-DaE_wFch.js +72 -0
  445. package/dist/interface/ha/useServerRestart-CMl589qX.js +23 -0
  446. package/dist/interface/ha/useTabSwipe-Cmqdn0J5.js +45 -0
  447. package/dist/interface/ha/useUpdateChannel-BBW2EX7N.js +22 -0
  448. package/dist/interface/ha/useUpdatesSocket-B6ICpKKC.js +34 -0
  449. package/dist/interface/ha/useUserOptions-CzclRfar.js +15 -0
  450. package/dist/interface/ha/virtualscroller-C5j7FXj4.js +996 -0
  451. package/dist/interface/ha/vue-flow-background-8ZUqhPBF.js +6835 -0
  452. package/dist/interface/ha/vue-i18n-D5EAy78K.js +2422 -0
  453. package/dist/interface/ha/zoom-in-BCxZo2jC.js +41 -0
  454. package/dist/interface/index.html +68 -68
  455. package/dist/interface/sw.js +1 -1
  456. package/dist/server/package.json +22 -21
  457. package/dist/server/requirements.txt +2 -2
  458. package/dist/server/src/_camera_ui_tools/camera_ui_sdk/camera/streaming.py +4 -0
  459. package/dist/server/src/api/controllers/cameras.controller.d.ts +1 -1
  460. package/dist/server/src/api/controllers/cameras.controller.js +5 -1
  461. package/dist/server/src/api/controllers/cameras.controller.js.map +1 -1
  462. package/dist/server/src/api/controllers/shares.controller.js +2 -2
  463. package/dist/server/src/api/controllers/shares.controller.js.map +1 -1
  464. package/dist/server/src/api/services/cameras.service.d.ts +1 -0
  465. package/dist/server/src/api/services/cameras.service.js +21 -20
  466. package/dist/server/src/api/services/cameras.service.js.map +1 -1
  467. package/dist/server/src/api/services/shares.service.d.ts +4 -2
  468. package/dist/server/src/api/services/shares.service.js +9 -11
  469. package/dist/server/src/api/services/shares.service.js.map +1 -1
  470. package/dist/server/src/api/websocket/nsp/main.d.ts +7 -2
  471. package/dist/server/src/api/websocket/nsp/main.js +38 -18
  472. package/dist/server/src/api/websocket/nsp/main.js.map +1 -1
  473. package/dist/server/src/api/websocket/nsp/metrics.d.ts +4 -0
  474. package/dist/server/src/api/websocket/nsp/metrics.js +33 -0
  475. package/dist/server/src/api/websocket/nsp/metrics.js.map +1 -1
  476. package/dist/server/src/api/websocket/types.d.ts +9 -0
  477. package/dist/server/src/assistant/tools/system.js +6 -9
  478. package/dist/server/src/assistant/tools/system.js.map +1 -1
  479. package/dist/server/src/camera/controller.d.ts +8 -3
  480. package/dist/server/src/camera/controller.js +98 -68
  481. package/dist/server/src/camera/controller.js.map +1 -1
  482. package/dist/server/src/camera/utils.d.ts +6 -4
  483. package/dist/server/src/camera/utils.js +80 -272
  484. package/dist/server/src/camera/utils.js.map +1 -1
  485. package/dist/server/src/go2rtc/api/routes/streams.d.ts +1 -2
  486. package/dist/server/src/go2rtc/api/routes/streams.js +0 -7
  487. package/dist/server/src/go2rtc/api/routes/streams.js.map +1 -1
  488. package/dist/server/src/go2rtc/index.js +2 -0
  489. package/dist/server/src/go2rtc/index.js.map +1 -1
  490. package/dist/server/src/go2rtc/state.d.ts +66 -0
  491. package/dist/server/src/go2rtc/state.js +194 -0
  492. package/dist/server/src/go2rtc/state.js.map +1 -0
  493. package/dist/server/src/go2rtc/stream-rates.d.ts +12 -0
  494. package/dist/server/src/go2rtc/stream-rates.js +44 -0
  495. package/dist/server/src/go2rtc/stream-rates.js.map +1 -0
  496. package/dist/server/src/go2rtc/types.d.ts +23 -0
  497. package/dist/server/src/go2rtc/types.js.map +1 -1
  498. package/dist/server/src/main.d.ts +1 -0
  499. package/dist/server/src/main.js +3 -0
  500. package/dist/server/src/main.js.map +1 -1
  501. package/package.json +22 -21
  502. package/dist/interface/assets/404-Bdbp69ox.js +0 -1
  503. package/dist/interface/assets/About-DmtCok-y.js +0 -1
  504. package/dist/interface/assets/Assistant-D-Lv6JtY.js +0 -1
  505. package/dist/interface/assets/Automation-LQ3TssrU.js +0 -3
  506. package/dist/interface/assets/AutomationImport-B_ra3G3_.js +0 -2
  507. package/dist/interface/assets/AutomationStore-DSXSaQjp.js +0 -2
  508. package/dist/interface/assets/AutomationStoreDetail-B5_Meb6R.js +0 -2
  509. package/dist/interface/assets/Automations-DHfPRe8W.js +0 -2
  510. package/dist/interface/assets/Camera-CDbfvtJv.js +0 -2
  511. package/dist/interface/assets/CameraConsole-DX-IRmd_.js +0 -7
  512. package/dist/interface/assets/Cameras-D9m2bxWj.js +0 -651
  513. package/dist/interface/assets/Camview-DKOYY6TI.js +0 -1
  514. package/dist/interface/assets/CertificateUpload-B8ccb3n-.js +0 -1
  515. package/dist/interface/assets/Config-DCIUUWCv.js +0 -2
  516. package/dist/interface/assets/ConfigActionAssistant-6IUzZeNW.js +0 -1
  517. package/dist/interface/assets/ConfigActionCameraControl-EXuiNMuG.js +0 -1
  518. package/dist/interface/assets/ConfigActionDelay-Cs4sYEk-.js +0 -1
  519. package/dist/interface/assets/ConfigActionHttp-gUM6RQ6Y.js +0 -1
  520. package/dist/interface/assets/ConfigActionImageInput-CPl5kVgO.js +0 -1
  521. package/dist/interface/assets/ConfigActionMqtt-BeBMCOJ-.js +0 -1
  522. package/dist/interface/assets/ConfigActionNotification-DJFHdFDN.js +0 -1
  523. package/dist/interface/assets/ConfigActionNotificationControl-BXoztPTs.js +0 -1
  524. package/dist/interface/assets/ConfigActionOutput-BGrFWqZ1.js +0 -1
  525. package/dist/interface/assets/ConfigActionPlugin-CdIIMcJZ.js +0 -1
  526. package/dist/interface/assets/ConfigActionSensor-MRVGJ22A.js +0 -1
  527. package/dist/interface/assets/ConfigActionSnapshot-CxA4f5ag.js +0 -1
  528. package/dist/interface/assets/ConfigActionVariable-DmU4seLh.js +0 -1
  529. package/dist/interface/assets/ConfigConditionIfElse-Tgdrk7lo.js +0 -1
  530. package/dist/interface/assets/ConfigConditionSensorState-CyyzoL6Q.js +0 -1
  531. package/dist/interface/assets/ConfigConditionSwitch-DprK5AbR.js +0 -1
  532. package/dist/interface/assets/ConfigConditionTime-CDruEvBp.js +0 -1
  533. package/dist/interface/assets/ConfigSensorValueInput-BhlgTOW9.js +0 -1
  534. package/dist/interface/assets/ConfigTriggerDetection-4vdEST9Y.js +0 -1
  535. package/dist/interface/assets/ConfigTriggerGeofence-1B0BdCOw.js +0 -1
  536. package/dist/interface/assets/ConfigTriggerManual-BQLDqwZh.js +0 -1
  537. package/dist/interface/assets/ConfigTriggerMqtt-B3YNOB6U.js +0 -1
  538. package/dist/interface/assets/ConfigTriggerSchedule-DhbJGOT7.js +0 -1
  539. package/dist/interface/assets/ConfigTriggerSensor-iMPg_Pmb.js +0 -1
  540. package/dist/interface/assets/ConfigTriggerSystem-MaNZTO3h.js +0 -1
  541. package/dist/interface/assets/ConfigTriggerWebhook-B3WfXjPv.js +0 -1
  542. package/dist/interface/assets/Console-BQLINPCG.js +0 -1
  543. package/dist/interface/assets/CuiAssistantConversation-yCRlgjtr.js +0 -5
  544. package/dist/interface/assets/CuiAutomationRunsDialog-CJ0mzDLL.js +0 -1
  545. package/dist/interface/assets/CuiBottomSheet-BbP0T2v3.js +0 -1
  546. package/dist/interface/assets/CuiBottomSheet-BpMMQhmJ.js +0 -1
  547. package/dist/interface/assets/CuiCameraPipCard-1EhYM5kQ.js +0 -1
  548. package/dist/interface/assets/CuiCameraRecordings-D2jG47AV.js +0 -1
  549. package/dist/interface/assets/CuiCameraShares-IpkomKkl.js +0 -1
  550. package/dist/interface/assets/CuiCameraTable-CNclH1KS.js +0 -1
  551. package/dist/interface/assets/CuiCameraTable-DlL-z_na.js +0 -2
  552. package/dist/interface/assets/CuiChartTable-B0EPcrgv.js +0 -1
  553. package/dist/interface/assets/CuiConsole-D8Xk2LXY.js +0 -5
  554. package/dist/interface/assets/CuiDataTable-DtRTB560.js +0 -1
  555. package/dist/interface/assets/CuiLightControl-CtL3sA8k.js +0 -1
  556. package/dist/interface/assets/CuiList-Bn7DT_Ao.js +0 -1
  557. package/dist/interface/assets/CuiMarkdownContent-BFa5gUZe.js +0 -1
  558. package/dist/interface/assets/CuiMarkdownContent-CyJxfnFA.js +0 -1
  559. package/dist/interface/assets/CuiPluginCard-B-4x6Mno.js +0 -2
  560. package/dist/interface/assets/CuiPluginCategoryChip-Dih4zKtO.js +0 -1
  561. package/dist/interface/assets/CuiPluginOAuthButton-D-Y9KYJz.js +0 -2
  562. package/dist/interface/assets/CuiPluginTrustBadge-_g3Ctrg4.js +0 -1
  563. package/dist/interface/assets/CuiQRCode-D6hzmPzV.js +0 -1
  564. package/dist/interface/assets/CuiSchema-Dh8Mu4BK.js +0 -1
  565. package/dist/interface/assets/CuiTopNavbarItem-CgX21E5K.js +0 -1
  566. package/dist/interface/assets/Faces-CgDoKVkp.js +0 -1
  567. package/dist/interface/assets/FirstSteps-CZSTX7Ot.js +0 -1
  568. package/dist/interface/assets/Floorplan-CRvmaf45.js +0 -1
  569. package/dist/interface/assets/Instances-DRkhTQKC.js +0 -1
  570. package/dist/interface/assets/Logs-CIDJSpdH.js +0 -6
  571. package/dist/interface/assets/Menu-CM_F1jfd.js +0 -1
  572. package/dist/interface/assets/Metrics-DgJEg-ZK.js +0 -9
  573. package/dist/interface/assets/Metrics-Ebv4qK2a.css +0 -1
  574. package/dist/interface/assets/OAuthDeviceFlow-BZ9LcgmJ.js +0 -1
  575. package/dist/interface/assets/Plugin-BBDpg6U_.js +0 -1
  576. package/dist/interface/assets/PluginConsole-DxVlTuNy.js +0 -7
  577. package/dist/interface/assets/PluginDetail-fLGD3R-u.js +0 -2
  578. package/dist/interface/assets/PluginSchema-CewD2H-K.js +0 -1
  579. package/dist/interface/assets/PluginSearch-5wX7WEcz.js +0 -2
  580. package/dist/interface/assets/PluginSearch-rDbuXm2z.js +0 -1
  581. package/dist/interface/assets/PluginUpdateProgress-B7Lj0ttd.js +0 -1
  582. package/dist/interface/assets/Plugins-DVQ476iL.js +0 -1
  583. package/dist/interface/assets/RecentEventsFilter-CWNBI2Ge.js +0 -1
  584. package/dist/interface/assets/Recordings-DSRgRVhN.js +0 -1
  585. package/dist/interface/assets/SensorEdit-B1mYmxDV.js +0 -1
  586. package/dist/interface/assets/SensorHistory-D1kKroxp.js +0 -1
  587. package/dist/interface/assets/Sensors-yAc1M-oO.js +0 -2
  588. package/dist/interface/assets/Settings-DBKgECRK.js +0 -1
  589. package/dist/interface/assets/SettingsAccount-CM3XGNL6.js +0 -1
  590. package/dist/interface/assets/SettingsAccount-i2nzGFdV.js +0 -1
  591. package/dist/interface/assets/SettingsAppearance-C-nllv3m.js +0 -1
  592. package/dist/interface/assets/SettingsAppearance-DCgu01FJ.js +0 -1
  593. package/dist/interface/assets/SettingsAssistant-ClRO04fv.js +0 -1
  594. package/dist/interface/assets/SettingsBackup-Cq_eLVCR.js +0 -1
  595. package/dist/interface/assets/SettingsList-Bklt3TQO.js +0 -1
  596. package/dist/interface/assets/SettingsMqtt-BLkP0en6.js +0 -1
  597. package/dist/interface/assets/SettingsNotifications-CeUKfEnH.js +0 -1
  598. package/dist/interface/assets/SettingsPermissions-Cpka-k3Q.js +0 -1
  599. package/dist/interface/assets/SettingsRecordings-k20qTe7K.js +0 -1
  600. package/dist/interface/assets/SettingsRemote-CdUj0nZ1.js +0 -2
  601. package/dist/interface/assets/SettingsSystem-6OChvWL7.js +0 -2
  602. package/dist/interface/assets/SettingsUsers-B57uZ8jn.js +0 -1
  603. package/dist/interface/assets/Terminal-WMgVSORW.js +0 -4
  604. package/dist/interface/assets/Training-BkWlywj_.js +0 -1
  605. package/dist/interface/assets/Updates-Dwrd6PQl.js +0 -2
  606. package/dist/interface/assets/VariableInput-CDJXnzEV.js +0 -1
  607. package/dist/interface/assets/VariableSuggestions-CNq7O1o-.js +0 -1
  608. package/dist/interface/assets/VersionsHandler-C0A8Ryhn.js +0 -7
  609. package/dist/interface/assets/VirtualSensorCreate-zEehu8Fg.js +0 -1
  610. package/dist/interface/assets/Workers-Be7q2vOK.js +0 -2
  611. package/dist/interface/assets/account-6TLZf1iz.js +0 -1
  612. package/dist/interface/assets/alert-circle-CWUV5Xzc.js +0 -1
  613. package/dist/interface/assets/alert-outline-8Rb4Kt7A.js +0 -1
  614. package/dist/interface/assets/api-CSl3-BNZ.js +0 -1
  615. package/dist/interface/assets/api-DcaDMCnj.css +0 -2
  616. package/dist/interface/assets/api-vegsDz6n.js +0 -4
  617. package/dist/interface/assets/arrow-left-CR_6L2Na.js +0 -1
  618. package/dist/interface/assets/assistant-jARIkvB1.js +0 -1
  619. package/dist/interface/assets/assistantModels-frQFfeed.js +0 -1
  620. package/dist/interface/assets/auth-Bov4B1jy.js +0 -1
  621. package/dist/interface/assets/automations-CJe7TvLk.js +0 -1
  622. package/dist/interface/assets/back-filled-xrzKyz1B.js +0 -1
  623. package/dist/interface/assets/bell-ring-CP1gJErL.js +0 -1
  624. package/dist/interface/assets/brain-BTo05kAx.js +0 -1
  625. package/dist/interface/assets/cameraSources-CDiYtBzG.js +0 -1
  626. package/dist/interface/assets/cctv-jOxIizQH.js +0 -1
  627. package/dist/interface/assets/check-circle-CXfnFKFA.js +0 -1
  628. package/dist/interface/assets/check-circle-outline-BXLVwqwM.js +0 -1
  629. package/dist/interface/assets/chevron-down-BmHRUHVR.js +0 -1
  630. package/dist/interface/assets/chevron-up-BIxCAmMr.js +0 -1
  631. package/dist/interface/assets/clock-outline-D9YYXYjG.js +0 -1
  632. package/dist/interface/assets/close-Gg5h2MPz.js +0 -1
  633. package/dist/interface/assets/close-circle-DmuCMtNe.js +0 -1
  634. package/dist/interface/assets/cloud-check-CB0qNXSP.js +0 -1
  635. package/dist/interface/assets/cloudHandoff-BoV37fDI.js +0 -1
  636. package/dist/interface/assets/config-iO2vrtak.js +0 -1
  637. package/dist/interface/assets/content-copy-DBYFzNui.js +0 -1
  638. package/dist/interface/assets/copy-CF7J0cxP.js +0 -1
  639. package/dist/interface/assets/cube-scan-Bzsgslh2.js +0 -1
  640. package/dist/interface/assets/delete-CRNIa5a0.js +0 -1
  641. package/dist/interface/assets/dist-CKsmPF0O.js +0 -1
  642. package/dist/interface/assets/dots-vertical-C4DlXZyp.js +0 -1
  643. package/dist/interface/assets/download-C4gHcSTT.js +0 -1
  644. package/dist/interface/assets/esm-2nC0_qfD.js +0 -1
  645. package/dist/interface/assets/esm-5ij5yeYw.js +0 -1
  646. package/dist/interface/assets/esm-B7WAXxd1.js +0 -1
  647. package/dist/interface/assets/esm-BF0RZje6.js +0 -1
  648. package/dist/interface/assets/esm-BSpFwAXD.js +0 -1
  649. package/dist/interface/assets/esm-C6ZQtRp-.js +0 -1
  650. package/dist/interface/assets/esm-Cp0yoO9D.js +0 -1
  651. package/dist/interface/assets/esm-Cwvl7oSa.js +0 -1
  652. package/dist/interface/assets/esm-DICA8W-V.js +0 -1
  653. package/dist/interface/assets/esm-DP8Ax-oq.js +0 -1
  654. package/dist/interface/assets/esm-DWOHxqOV.js +0 -1
  655. package/dist/interface/assets/esm-cynfGnag.js +0 -1
  656. package/dist/interface/assets/esm-gQ1ovTKo.js +0 -1
  657. package/dist/interface/assets/esm-jaStWfus.js +0 -1
  658. package/dist/interface/assets/eventIcons-BPQ-zSnz.js +0 -1
  659. package/dist/interface/assets/eye-off-D7-qb6Nm.js +0 -1
  660. package/dist/interface/assets/eye-off-outline-DO1W1tdl.js +0 -1
  661. package/dist/interface/assets/flowSchema-B0vIoy4y.js +0 -1
  662. package/dist/interface/assets/help-circle-outline-BrCQn_fb.js +0 -1
  663. package/dist/interface/assets/history-uQmxYRH-.js +0 -1
  664. package/dist/interface/assets/home-CPvD8R_d.js +0 -1
  665. package/dist/interface/assets/information-outline-Bo2TPoHa.js +0 -1
  666. package/dist/interface/assets/intercomService-IAAXcRPG.js +0 -1
  667. package/dist/interface/assets/lan-pTYzHgPx.js +0 -1
  668. package/dist/interface/assets/main-DQgH1fon.js +0 -3
  669. package/dist/interface/assets/microphone-Crj84LWD.js +0 -1
  670. package/dist/interface/assets/minus-DTDhg2EM.js +0 -1
  671. package/dist/interface/assets/mqtt-DfpSLxes.js +0 -1
  672. package/dist/interface/assets/native-CEh02TWu.js +0 -1
  673. package/dist/interface/assets/native-DxU_bhe3.js +0 -1
  674. package/dist/interface/assets/nodeDefinitions-Jb3-KbSO.js +0 -1
  675. package/dist/interface/assets/notifications-jTSwwN1i.js +0 -1
  676. package/dist/interface/assets/pause-B7ud2O8d.js +0 -1
  677. package/dist/interface/assets/pencil-CuQeB4kE.js +0 -1
  678. package/dist/interface/assets/pencil-outline-BsdKHhHl.js +0 -1
  679. package/dist/interface/assets/plugin-DRu2N4CD.js +0 -1
  680. package/dist/interface/assets/plugins-ChyJXprl.js +0 -1
  681. package/dist/interface/assets/plus-Jda3x3mB.js +0 -1
  682. package/dist/interface/assets/plus-x5XqrG-6.js +0 -1
  683. package/dist/interface/assets/power-et3ptczv.js +0 -1
  684. package/dist/interface/assets/radar-D0eG7gya.js +0 -1
  685. package/dist/interface/assets/refresh-zUwVhGRH.js +0 -1
  686. package/dist/interface/assets/restore-D2nuKfs4.js +0 -1
  687. package/dist/interface/assets/ring-resize-MiubMIoG.js +0 -1
  688. package/dist/interface/assets/rooms-BMWJpAXC.js +0 -1
  689. package/dist/interface/assets/round-alt-arrow-left-bold-DJ2t35Ab.js +0 -1
  690. package/dist/interface/assets/search-CSFYlWFv.js +0 -1
  691. package/dist/interface/assets/sensorIcons-dUp8Tone.js +0 -1
  692. package/dist/interface/assets/sensorSlots-CosoVMys.js +0 -1
  693. package/dist/interface/assets/sensors-DLdbNuoj.js +0 -1
  694. package/dist/interface/assets/server-D-qkU2-U.js +0 -1
  695. package/dist/interface/assets/settings-b9NE6YOU.js +0 -1
  696. package/dist/interface/assets/source-branch-DA1N9TmJ.js +0 -1
  697. package/dist/interface/assets/theme-DhneHMji.js +0 -1
  698. package/dist/interface/assets/trash-2-D3UqAJmg.js +0 -1
  699. package/dist/interface/assets/trash-can-outline-B7IPK5NP.js +0 -1
  700. package/dist/interface/assets/trash-fill-DIW5RIZu.js +0 -1
  701. package/dist/interface/assets/trash2-D_pJJ_Dw.js +0 -1
  702. package/dist/interface/assets/types-CngwbyEy.js +0 -1
  703. package/dist/interface/assets/types-DDpq8alD.js +0 -1
  704. package/dist/interface/assets/types-DdyAGRju.js +0 -1
  705. package/dist/interface/assets/undo-CNP-pN7J.js +0 -1
  706. package/dist/interface/assets/ungrouped-e2tQIZD2.js +0 -1
  707. package/dist/interface/assets/updates-DnVisGT3.js +0 -1
  708. package/dist/interface/assets/upload-BzANK-MP.js +0 -1
  709. package/dist/interface/assets/upload-DeHCHra3.js +0 -1
  710. package/dist/interface/assets/useAppVersion-gtzMlM4b.js +0 -1
  711. package/dist/interface/assets/useAssistantActions-BIHVky9T.js +0 -1
  712. package/dist/interface/assets/useBackupRestore-DfgufKp3.js +0 -1
  713. package/dist/interface/assets/useCameraOptions-B9yEPgGd.js +0 -1
  714. package/dist/interface/assets/useKeyboardInset-1sUlRSeV.js +0 -1
  715. package/dist/interface/assets/useLogsSocket-C2QUQqkZ.js +0 -1
  716. package/dist/interface/assets/useNavLayout-Br4MtSjQ.js +0 -1
  717. package/dist/interface/assets/usePermissions-B8pw9jk1.js +0 -1
  718. package/dist/interface/assets/usePluginUpdates-Cx9PwENn.js +0 -1
  719. package/dist/interface/assets/usePushRegistration-CLEyagJM.js +0 -2
  720. package/dist/interface/assets/useServerRestart-BBp4cko_.js +0 -1
  721. package/dist/interface/assets/useStreamStatus-BrPjpyzs.js +0 -1
  722. package/dist/interface/assets/useTabSwipe-B4edrv6o.js +0 -1
  723. package/dist/interface/assets/useUpdateChannel-DugwYo8J.js +0 -1
  724. package/dist/interface/assets/useUpdatesSocket-CgCXGGVg.js +0 -1
  725. package/dist/interface/assets/useUserOptions-DTlKtp_u.js +0 -1
  726. package/dist/interface/assets/variable-Dv4JwY3Y.js +0 -1
  727. package/dist/interface/assets/vendor-CP-WYrgy.js +0 -23
  728. package/dist/interface/assets/vendor-cameraui-D0VXSxSF.js +0 -2326
  729. package/dist/interface/assets/vendor-capacitor--M3rv96M.js +0 -2
  730. package/dist/interface/assets/vendor-chart-UrRD4pPC.js +0 -3
  731. package/dist/interface/assets/vendor-core-Ba81bBNM.js +0 -1
  732. package/dist/interface/assets/vendor-dnd-DiqNDDW5.js +0 -2
  733. package/dist/interface/assets/vendor-draggabilly-Cc8Eip6N.js +0 -1
  734. package/dist/interface/assets/vendor-markdown-BcxN-Nmd.js +0 -14
  735. package/dist/interface/assets/vendor-primevue-LZEE4d1W.js +0 -3942
  736. package/dist/interface/assets/vendor-vueflow-C5XdKBYg.js +0 -26
  737. package/dist/interface/assets/web-771Nph0i.js +0 -1
  738. package/dist/interface/assets/web-BGEzD1BX.js +0 -1
  739. package/dist/interface/assets/web-BjKL51lK-Q2ZqYaHQ.js +0 -1
  740. package/dist/interface/assets/web-BvtLpTUy.js +0 -1
  741. package/dist/interface/assets/web-C9hWWX9T.js +0 -1
  742. package/dist/interface/assets/web-CIwUdOBC.js +0 -1
  743. package/dist/interface/assets/web-CpaCeLiq.js +0 -1
  744. package/dist/interface/assets/web-DJN-qQx6.js +0 -1
  745. package/dist/interface/assets/web-DMGPhsii.js +0 -1
  746. package/dist/interface/assets/web-Dd6usIKp.js +0 -1
  747. package/dist/interface/assets/web-DeXV8b3y.js +0 -1
  748. package/dist/interface/assets/web-EZ83Sgj4.js +0 -1
  749. package/dist/interface/assets/web-EZcS3dL0.js +0 -1
  750. package/dist/interface/assets/web-Ycu87MZJ.js +0 -1
  751. package/dist/interface/assets/webhook-UyZZIMaa.js +0 -1
  752. package/dist/interface/assets/workbox-window.prod.es5-fQWwwJhH.js +0 -1
  753. package/dist/interface/assets/zoom-in-BdZ7kiwk.js +0 -1
  754. package/dist/interface/ha/404-CkAIe5nc.js +0 -60
  755. package/dist/interface/ha/About-C7HxP7hM.js +0 -55
  756. package/dist/interface/ha/Assistant-DJYxiCOY.js +0 -9107
  757. package/dist/interface/ha/Automation-CfNHCeIm.js +0 -2025
  758. package/dist/interface/ha/AutomationImport-Dn3C1604.js +0 -206
  759. package/dist/interface/ha/AutomationStore-D63G9w2Y.js +0 -336
  760. package/dist/interface/ha/AutomationStoreDetail-HoUC8cSY.js +0 -122
  761. package/dist/interface/ha/Automations-BOlE1Evb.js +0 -424
  762. package/dist/interface/ha/Camera-6Vvo7nee.js +0 -654
  763. package/dist/interface/ha/CameraConsole-DYSNDW4P.js +0 -52
  764. package/dist/interface/ha/Cameras-CxgwXUaG.js +0 -1970
  765. package/dist/interface/ha/Camview-DPjoUMSP.js +0 -1331
  766. package/dist/interface/ha/CertificateUpload-BVJWfTRx.js +0 -117
  767. package/dist/interface/ha/Config-BzBFIWVF.js +0 -356
  768. package/dist/interface/ha/ConfigActionAssistant-BpHf4Pdi.js +0 -182
  769. package/dist/interface/ha/ConfigActionCameraControl-CmbCTwZ8.js +0 -152
  770. package/dist/interface/ha/ConfigActionDelay-2xePO25t.js +0 -61
  771. package/dist/interface/ha/ConfigActionHttp-BxN2KOA6.js +0 -134
  772. package/dist/interface/ha/ConfigActionImageInput-CrXUZ-cM.js +0 -171
  773. package/dist/interface/ha/ConfigActionMqtt-DYq-6_S6.js +0 -81
  774. package/dist/interface/ha/ConfigActionNotification-DPUSAVLI.js +0 -199
  775. package/dist/interface/ha/ConfigActionNotificationControl-h4zta4Db.js +0 -111
  776. package/dist/interface/ha/ConfigActionOutput-Dwa0-7cq.js +0 -98
  777. package/dist/interface/ha/ConfigActionPlugin-DXx1a-Hr.js +0 -172
  778. package/dist/interface/ha/ConfigActionSensor-CfLIHqS8.js +0 -139
  779. package/dist/interface/ha/ConfigActionSnapshot-O0OBVq-R.js +0 -48
  780. package/dist/interface/ha/ConfigActionVariable-CbaIxRRe.js +0 -88
  781. package/dist/interface/ha/ConfigConditionIfElse-B7ax92bG.js +0 -124
  782. package/dist/interface/ha/ConfigConditionSensorState-B5XIrEGU.js +0 -192
  783. package/dist/interface/ha/ConfigConditionSwitch-DJSz6bI5.js +0 -128
  784. package/dist/interface/ha/ConfigConditionTime-CRn4k6uE.js +0 -95
  785. package/dist/interface/ha/ConfigSensorValueInput-fE2SBn1B.js +0 -170
  786. package/dist/interface/ha/ConfigTriggerDetection-BuShu78G.js +0 -241
  787. package/dist/interface/ha/ConfigTriggerGeofence-pBgXBkb6.js +0 -4888
  788. package/dist/interface/ha/ConfigTriggerManual-3hhEe1f3.js +0 -14
  789. package/dist/interface/ha/ConfigTriggerMqtt-Dyf_TLfU.js +0 -134
  790. package/dist/interface/ha/ConfigTriggerSchedule-ldJM8l6b.js +0 -72
  791. package/dist/interface/ha/ConfigTriggerSensor-C5YUm9ff.js +0 -73
  792. package/dist/interface/ha/ConfigTriggerSystem-CylHWw4i.js +0 -192
  793. package/dist/interface/ha/ConfigTriggerWebhook-ZlHsaLu4.js +0 -94
  794. package/dist/interface/ha/Console-PNAQjW_1.js +0 -348
  795. package/dist/interface/ha/CuiAutomationRunsDialog-D_q8K7QO.js +0 -130
  796. package/dist/interface/ha/CuiBottomSheet-BbJG-998.js +0 -270
  797. package/dist/interface/ha/CuiCameraRecordings-BSI8Yn3v.js +0 -552
  798. package/dist/interface/ha/CuiCameraShares-DKHZJT-z.js +0 -121
  799. package/dist/interface/ha/CuiCameraTable-BTdP1pEP.js +0 -153
  800. package/dist/interface/ha/CuiChartTable-aFRfsewt.js +0 -6786
  801. package/dist/interface/ha/CuiConsole-BD9jYvrD.js +0 -244
  802. package/dist/interface/ha/CuiDataTable-C2lOduPV.js +0 -8732
  803. package/dist/interface/ha/CuiList-Dr0Kypm1.js +0 -57
  804. package/dist/interface/ha/CuiMarkdownContent-CU4eGw6l.js +0 -4724
  805. package/dist/interface/ha/CuiPluginCard-C-gpcLCH.js +0 -769
  806. package/dist/interface/ha/CuiPluginOAuthButton-B763Rz1n.js +0 -79
  807. package/dist/interface/ha/CuiPluginTrustBadge-j5PKYI-V.js +0 -123
  808. package/dist/interface/ha/CuiQRCode-D7WV4czh.js +0 -86
  809. package/dist/interface/ha/CuiSchema-BfsT0mAh.js +0 -963
  810. package/dist/interface/ha/CuiTopNavbarItem-BwpXgGJ-.js +0 -141
  811. package/dist/interface/ha/Faces-C0e-m9EY.js +0 -1282
  812. package/dist/interface/ha/FirstSteps-DsDmM44G.js +0 -251
  813. package/dist/interface/ha/Floorplan-Bei9kIhS.js +0 -3657
  814. package/dist/interface/ha/Instances-BY5G1zFD.js +0 -680
  815. package/dist/interface/ha/Logs-DDycObDv.js +0 -418
  816. package/dist/interface/ha/Menu-9r_oFG_-.js +0 -156
  817. package/dist/interface/ha/Metrics-BMTIXqn6.js +0 -1335
  818. package/dist/interface/ha/OAuthDeviceFlow-Dee5fynX.js +0 -112
  819. package/dist/interface/ha/Plugin-B5o4pLyu.js +0 -1405
  820. package/dist/interface/ha/PluginConsole-REtxP1Wi.js +0 -56
  821. package/dist/interface/ha/PluginDetail-BHrKifvP.js +0 -230
  822. package/dist/interface/ha/PluginSearch-oNHMMeJD.js +0 -462
  823. package/dist/interface/ha/PluginUpdateProgress-CqllA4eR.js +0 -34
  824. package/dist/interface/ha/Plugins-B6y7z5yD.js +0 -692
  825. package/dist/interface/ha/RecentEventsFilter-C1deXNIS.js +0 -79
  826. package/dist/interface/ha/Recordings-CyhOVNoM.js +0 -1498
  827. package/dist/interface/ha/SensorEdit-CnUU2PEv.js +0 -1462
  828. package/dist/interface/ha/SensorHistory-z5hDuybW.js +0 -54
  829. package/dist/interface/ha/Sensors-wpoB-X4r.js +0 -1386
  830. package/dist/interface/ha/Settings-C6wTksxb.js +0 -218
  831. package/dist/interface/ha/SettingsAccount-DByg5uzj.js +0 -971
  832. package/dist/interface/ha/SettingsAppearance-QgPo4M8O.js +0 -220
  833. package/dist/interface/ha/SettingsAssistant-Bg4BhUgb.js +0 -1857
  834. package/dist/interface/ha/SettingsBackup-BgtZSRub.js +0 -556
  835. package/dist/interface/ha/SettingsList-DB3j7buh.js +0 -40
  836. package/dist/interface/ha/SettingsMqtt-DVx0z8vf.js +0 -526
  837. package/dist/interface/ha/SettingsNotifications-osO2kMMO.js +0 -529
  838. package/dist/interface/ha/SettingsPermissions-D_RGxpFE.js +0 -84
  839. package/dist/interface/ha/SettingsRecordings-BFEp160g.js +0 -152
  840. package/dist/interface/ha/SettingsRemote-DQW4FhFn.js +0 -1810
  841. package/dist/interface/ha/SettingsSystem-Cs1MHOTi.js +0 -376
  842. package/dist/interface/ha/SettingsUsers-BtbuHlRZ.js +0 -379
  843. package/dist/interface/ha/Terminal-BuXCoMle.js +0 -617
  844. package/dist/interface/ha/Training-CnsWyeaJ.js +0 -1505
  845. package/dist/interface/ha/Updates-BxU1Jpru.js +0 -343
  846. package/dist/interface/ha/VariableInput-DgENnHvk.js +0 -52
  847. package/dist/interface/ha/VariableSuggestions-Cn7J50Mp.js +0 -201
  848. package/dist/interface/ha/VersionsHandler-DQTSSqti.js +0 -216
  849. package/dist/interface/ha/VirtualSensorCreate-Bsr6zTQp.js +0 -101
  850. package/dist/interface/ha/Workers-0jZDuLbP.js +0 -765
  851. package/dist/interface/ha/accordion-X9Wa7KVq.js +0 -577
  852. package/dist/interface/ha/account-DLg459mU.js +0 -19
  853. package/dist/interface/ha/alert-circle-CSp7J0pZ.js +0 -19
  854. package/dist/interface/ha/alert-outline-BssBb-kV.js +0 -89
  855. package/dist/interface/ha/api-B8xb-N_g.js +0 -29
  856. package/dist/interface/ha/api-VnpXqKYj.js +0 -62425
  857. package/dist/interface/ha/arrow-left-B4_-vTM1.js +0 -19
  858. package/dist/interface/ha/assistant-DDwonneA.js +0 -345
  859. package/dist/interface/ha/auth-CXX7ago-.js +0 -271
  860. package/dist/interface/ha/autocomplete-gFZBpGxE.js +0 -1373
  861. package/dist/interface/ha/automationBlueprint-BUkXOKb1.js +0 -250
  862. package/dist/interface/ha/back-filled-B-jI6Dqb.js +0 -20
  863. package/dist/interface/ha/bell-ring-CjnpDomC.js +0 -19
  864. package/dist/interface/ha/brain-DBagansp.js +0 -19
  865. package/dist/interface/ha/button-DJDZxmKj.js +0 -406
  866. package/dist/interface/ha/cards-CMel6uVq.js +0 -13352
  867. package/dist/interface/ha/cctv-DBlnZEJ3.js +0 -19
  868. package/dist/interface/ha/check-circle-outline-DHmzynUf.js +0 -19
  869. package/dist/interface/ha/check-circle-w7z_NLrm.js +0 -19
  870. package/dist/interface/ha/checkbox-D012nd17.js +0 -279
  871. package/dist/interface/ha/chevron-down-CN3LNAsG.js +0 -19
  872. package/dist/interface/ha/chevron-up-D5-4qnos.js +0 -19
  873. package/dist/interface/ha/chip-BIYZHiP1.js +0 -149
  874. package/dist/interface/ha/clock-outline-CLOrwuhP.js +0 -19
  875. package/dist/interface/ha/close-C_ajB9j7.js +0 -19
  876. package/dist/interface/ha/close-circle-Qqtz5NiQ.js +0 -19
  877. package/dist/interface/ha/cloud-check-gKe6M70h.js +0 -33
  878. package/dist/interface/ha/config-9vwosYC8.js +0 -116
  879. package/dist/interface/ha/content-copy-ChfuNPUb.js +0 -19
  880. package/dist/interface/ha/copy-DfdE7y98.js +0 -22
  881. package/dist/interface/ha/datepicker-44Ub2Hx0.js +0 -2961
  882. package/dist/interface/ha/delete-LxFfoBRM.js +0 -19
  883. package/dist/interface/ha/dist-jxJIsKjm.js +0 -3248
  884. package/dist/interface/ha/divider-Cf59Ua0f.js +0 -110
  885. package/dist/interface/ha/dots-vertical-BEPlUtxU.js +0 -19
  886. package/dist/interface/ha/download-BnXoyA8p.js +0 -19
  887. package/dist/interface/ha/eventIcons-DrjNuTS2.js +0 -676
  888. package/dist/interface/ha/eye-off-BIuZGpjA.js +0 -33
  889. package/dist/interface/ha/eye-off-outline-cbzzWTdq.js +0 -19
  890. package/dist/interface/ha/help-circle-outline-Du1jH6xY.js +0 -19
  891. package/dist/interface/ha/history-Bm6QaZ6b.js +0 -19
  892. package/dist/interface/ha/home-CUD0JuUy.js +0 -19
  893. package/dist/interface/ha/information-outline-B1TiBdcz.js +0 -19
  894. package/dist/interface/ha/inputicon-BPVltPdr.js +0 -324
  895. package/dist/interface/ha/inputnumber-MSv4Pb-P.js +0 -1033
  896. package/dist/interface/ha/inputtext-vdcrNX6K.js +0 -257
  897. package/dist/interface/ha/intercomService-Dwd0bhSN.js +0 -1406
  898. package/dist/interface/ha/message-BExXUXHN.js +0 -244
  899. package/dist/interface/ha/microphone-TB58caA2.js +0 -19
  900. package/dist/interface/ha/minus-BsY_Bojv.js +0 -46
  901. package/dist/interface/ha/minus-C6Qh7zWS.js +0 -19
  902. package/dist/interface/ha/mqtt-Fm_GzbBi.js +0 -56
  903. package/dist/interface/ha/multiselect-B0fAnW75.js +0 -1492
  904. package/dist/interface/ha/notifications-CwSeoLx0.js +0 -159
  905. package/dist/interface/ha/pause-Ch6v65wA.js +0 -19
  906. package/dist/interface/ha/pencil-outline-3AYc7WXi.js +0 -19
  907. package/dist/interface/ha/pinia-D2fpp6nV.js +0 -7641
  908. package/dist/interface/ha/plugins-CgqO91Hg.js +0 -592
  909. package/dist/interface/ha/plus-CEoLXIS3.js +0 -46
  910. package/dist/interface/ha/plus-QEeSdL0x.js +0 -19
  911. package/dist/interface/ha/progressbar-C2663Zd7.js +0 -95
  912. package/dist/interface/ha/protocol-BB4jdtUC-BcZnYd-h.js +0 -706
  913. package/dist/interface/ha/radar-BCSebLvk.js +0 -19
  914. package/dist/interface/ha/refresh-Cf7GQyew.js +0 -19
  915. package/dist/interface/ha/restore-DMczh46P.js +0 -19
  916. package/dist/interface/ha/ring-resize-11TaovpK.js +0 -16
  917. package/dist/interface/ha/ripple-B_itunQV.js +0 -2928
  918. package/dist/interface/ha/rooms-DGnhPCGr.js +0 -45
  919. package/dist/interface/ha/round-alt-arrow-left-bold-z7BNLjup.js +0 -37
  920. package/dist/interface/ha/runtime-core.esm-bundler-DCktklpY.js +0 -3295
  921. package/dist/interface/ha/search-DMJuYUDF.js +0 -19
  922. package/dist/interface/ha/select-CaVzuLaS.js +0 -1382
  923. package/dist/interface/ha/server-BqNJbXKJ.js +0 -239
  924. package/dist/interface/ha/settings-DkoB1zyf.js +0 -22
  925. package/dist/interface/ha/source-branch-CimaS9J1.js +0 -19
  926. package/dist/interface/ha/speeddial-CpW9sIFY.js +0 -682
  927. package/dist/interface/ha/spinner-BSEdDTno.js +0 -46
  928. package/dist/interface/ha/tag-Bko2QYOK.js +0 -95
  929. package/dist/interface/ha/textarea-DrKQ6YMZ.js +0 -130
  930. package/dist/interface/ha/tooltip-X5MY9FoG.js +0 -277
  931. package/dist/interface/ha/trash-2-Droax8m8.js +0 -23
  932. package/dist/interface/ha/trash-can-outline-XdMf3dMc.js +0 -19
  933. package/dist/interface/ha/trash-fill-B__41VdN.js +0 -21
  934. package/dist/interface/ha/types-B9Rna2FN.js +0 -123
  935. package/dist/interface/ha/types-Ca-1kOA9.js +0 -1062
  936. package/dist/interface/ha/ungrouped-B1RIFH36.js +0 -1320
  937. package/dist/interface/ha/updates-Dn9WR43I.js +0 -341
  938. package/dist/interface/ha/upload-CDAlIs3e.js +0 -23
  939. package/dist/interface/ha/upload-DMKlzavA.js +0 -19
  940. package/dist/interface/ha/useAppVersion-FMZfQhEd.js +0 -22
  941. package/dist/interface/ha/useAssistantActions-B6KFp1pU.js +0 -29
  942. package/dist/interface/ha/useLogsSocket-Ch8C8inE.js +0 -59
  943. package/dist/interface/ha/useNavLayout-DPjjtXVR.js +0 -125
  944. package/dist/interface/ha/usePermissions-DuuC_X9H.js +0 -72
  945. package/dist/interface/ha/useServerRestart-DoozgL8o.js +0 -23
  946. package/dist/interface/ha/useTabSwipe-CxXAmZNc.js +0 -45
  947. package/dist/interface/ha/useUpdateChannel-CBwS4cI2.js +0 -22
  948. package/dist/interface/ha/useUpdatesSocket-GrlBqyU4.js +0 -34
  949. package/dist/interface/ha/useUserOptions-54hnf6hX.js +0 -15
  950. package/dist/interface/ha/virtualscroller-DuRtMnNf.js +0 -996
  951. package/dist/interface/ha/vue-flow-background-ETLnaEUH.js +0 -6835
  952. package/dist/interface/ha/vue-i18n-BBObX4QY.js +0 -2409
  953. package/dist/interface/ha/zoom-in-ZVdIPder.js +0 -41
@@ -0,0 +1,3657 @@
1
+ import { m as e } from "./ripple-ZDATPc2w.js";
2
+ import { B as t, G as n, H as r, Jt as i, M as a, N as o, Wt as s, Y as c, _t as l, d as u, f as d, ft as f, gt as p, kt as m, l as h, lt as g, ot as ee, p as _, qt as v, r as y, rt as te, u as b, ut as x, v as S, wt as ne, x as C, xt as w, y as T, yt as re, z as ie } from "./runtime-core.esm-bundler-_TfE0DWz.js";
3
+ import { t as E } from "./tooltip-Z7VN-E1u.js";
4
+ import { t as ae } from "./message-D6dIy_hz.js";
5
+ import { t as D } from "./chevron-down-BNj8w2js.js";
6
+ import { At as oe, Br as se, En as ce, Ft as le, It as ue, J as de, Lr as fe, Lt as O, Mt as pe, Nt as me, Or as he, Pt as k, Rt as A, Zi as j, bi as M, br as ge, cn as _e, ht as ve, ir as ye, jt as be, kr as xe, kt as Se, mn as Ce, mt as N, o as we, p as Te, qt as P, tr as F, ui as Ee, ur as I, yr as De } from "./api-BmYisoxj.js";
7
+ import { n as Oe } from "./vue-i18n-D5EAy78K.js";
8
+ import { o as L } from "./dist-BTp4AyuI.js";
9
+ import { t as ke } from "./button-BouAFgf5.js";
10
+ import { v as Ae } from "./dist-C6MBHJhs.js";
11
+ import { t as je } from "./inputtext-C_ygnPrC.js";
12
+ import { t as Me } from "./close-CxFbonhd.js";
13
+ import { t as Ne } from "./divider-DeFEXTGs.js";
14
+ import { t as R } from "./select-UR3ZRDew.js";
15
+ import { i as Pe, n as Fe, r as Ie, t as Le } from "./accordion-Xem2SzgR.js";
16
+ import { t as Re } from "./speeddial-LCbl5g8p.js";
17
+ import { t as ze } from "./textarea-ByXnzJzx.js";
18
+ import { t as Be } from "./CuiBottomSheet-DLkC2OmT.js";
19
+ import { t as Ve } from "./cctv-BD2g3nbO.js";
20
+ import { u as He } from "./cards-BrOcoiQJ.js";
21
+ import { t as Ue } from "./restore-BxzmXRET.js";
22
+ import { t as We } from "./pencil-outline-SN9ingm5.js";
23
+ import { t as Ge } from "./trash-can-outline-CBwv40Ck.js";
24
+ import { t as Ke } from "./back-filled-CaxrZv0Q.js";
25
+ import { t as qe } from "./chevron-up-DDKj43BW.js";
26
+ import { a as Je, d as Ye, f as Xe, l as z, p as Ze, t as B, u as Qe } from "./vue-flow-background-8ZUqhPBF.js";
27
+ import { n as $e } from "./rooms-NIzjFYAd.js";
28
+ import { t as V } from "./minus-D3V6azhV.js";
29
+ import { t as H } from "./eye-off-outline-ACbzsGuK.js";
30
+ //#region ~icons/mdi/open-in-new
31
+ var U = {
32
+ viewBox: "0 0 24 24",
33
+ width: "1.2em",
34
+ height: "1.2em"
35
+ };
36
+ function W(e, t) {
37
+ return r(), _("svg", U, [...t[0] ||= [b("path", {
38
+ fill: "currentColor",
39
+ d: "M14 3v2h3.59l-9.83 9.83l1.41 1.41L19 6.41V10h2V3m-2 16H5V5h7V3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7h-2z"
40
+ }, null, -1)]]);
41
+ }
42
+ var et = l({
43
+ name: "mdi-open-in-new",
44
+ render: W
45
+ }), tt = {
46
+ viewBox: "0 0 24 24",
47
+ width: "1.2em",
48
+ height: "1.2em"
49
+ };
50
+ function G(e, t) {
51
+ return r(), _("svg", tt, [...t[0] ||= [b("path", {
52
+ fill: "currentColor",
53
+ d: "M2 2h6v2h8V2h6v6h-2v8h2v6h-6v-2H8v2H2v-6h2V8H2zm14 6V6H8v2H6v8h2v2h8v-2h2V8zM4 4v2h2V4zm14 0v2h2V4zM4 18v2h2v-2zm14 0v2h2v-2z"
54
+ }, null, -1)]]);
55
+ }
56
+ var nt = l({
57
+ name: "mdi-vector-square",
58
+ render: G
59
+ }), rt = {
60
+ viewBox: "0 0 24 24",
61
+ width: "1.2em",
62
+ height: "1.2em"
63
+ };
64
+ function it(e, t) {
65
+ return r(), _("svg", rt, [...t[0] ||= [b("path", {
66
+ fill: "currentColor",
67
+ d: "M12 3c-1.11 0-2 .89-2 2H3v14H2v2h20v-2h-1V5c0-1.11-.89-2-2-2zm0 2h7v14h-7zm-7 6h2v2H5z"
68
+ }, null, -1)]]);
69
+ }
70
+ var at = l({
71
+ name: "mdi-door-open",
72
+ render: it
73
+ }), ot = .55, st = {
74
+ min: .2,
75
+ max: 3
76
+ }, K = {
77
+ min: 100,
78
+ max: 3e3
79
+ }, ct = [
80
+ "door",
81
+ "opening",
82
+ "stairs"
83
+ ], q = {
84
+ min: 40,
85
+ max: 400
86
+ }, lt = "application/floorplanitem";
87
+ //#endregion
88
+ //#region src/components/CuiFloorplan/utils.ts
89
+ function J(e) {
90
+ return e / 100;
91
+ }
92
+ function ut(e, t = 2) {
93
+ return `${J(e).toFixed(t)} m`;
94
+ }
95
+ function dt(e) {
96
+ return {
97
+ x: e.x + e.width / 2,
98
+ y: e.y + e.height / 2
99
+ };
100
+ }
101
+ function ft(e, t) {
102
+ let n = Math.min(e.y + e.height, t.y + t.height) - Math.max(e.y, t.y), r = Math.min(e.x + e.width, t.x + t.width) - Math.max(e.x, t.x);
103
+ if (n > 0 && (e.x + e.width === t.x || t.x + t.width === e.x)) return {
104
+ x: e.x + e.width === t.x ? t.x : e.x,
105
+ y: Math.max(e.y, t.y),
106
+ stepX: 0,
107
+ stepY: 1,
108
+ length: n
109
+ };
110
+ if (r > 0 && (e.y + e.height === t.y || t.y + t.height === e.y)) {
111
+ let n = e.y + e.height === t.y ? t.y : e.y;
112
+ return {
113
+ x: Math.max(e.x, t.x),
114
+ y: n,
115
+ stepX: 1,
116
+ stepY: 0,
117
+ length: r
118
+ };
119
+ }
120
+ return null;
121
+ }
122
+ function pt(e, t, n) {
123
+ let r = Math.min(n, e.length) / 2, i = Math.min(Math.max(t ?? e.length / 2, r), e.length - r);
124
+ return {
125
+ x1: e.x + e.stepX * (i - r),
126
+ y1: e.y + e.stepY * (i - r),
127
+ x2: e.x + e.stepX * (i + r),
128
+ y2: e.y + e.stepY * (i + r)
129
+ };
130
+ }
131
+ function mt(e, t, n) {
132
+ let r = t.filter((t) => t.roomId === e.fromRoomId), i = t.filter((t) => t.roomId === e.toRoomId);
133
+ if (!r.length || !i.length) return null;
134
+ let a = r.some((e) => e.levelId === n), o = i.some((e) => e.levelId === n);
135
+ if (!a && !o) return null;
136
+ if (a !== o) {
137
+ let t = a ? e.fromShapeId : e.toShapeId, n = a ? r : i;
138
+ return {
139
+ kind: "badge",
140
+ roomId: a ? e.fromRoomId : e.toRoomId,
141
+ shapeId: n.find((e) => e.id === t)?.id ?? n[0].id
142
+ };
143
+ }
144
+ let s = r.find((t) => t.id === e.fromShapeId), c = i.find((t) => t.id === e.toShapeId), l = s && c ? [[s, c]] : r.flatMap((e) => i.map((t) => [e, t]));
145
+ for (let [t, n] of l) {
146
+ let r = ft(t, n);
147
+ if (r) return {
148
+ kind: "edge",
149
+ ...pt(r, e.offset, e.width),
150
+ wall: r
151
+ };
152
+ }
153
+ let u = dt(r[0]), d = dt(i[0]);
154
+ return {
155
+ kind: "link",
156
+ x1: u.x,
157
+ y1: u.y,
158
+ x2: d.x,
159
+ y2: d.y
160
+ };
161
+ }
162
+ function ht(e, t, n) {
163
+ let r = gt(e);
164
+ return {
165
+ fill: r.map((e) => _t(e, t, [])).join(" "),
166
+ wall: r.map((e) => _t(e, t, n)).join(" ")
167
+ };
168
+ }
169
+ function gt(e) {
170
+ if (!e.length) return [];
171
+ let t = [...new Set(e.flatMap((e) => [e.x, e.x + e.width]))].sort((e, t) => e - t), n = [...new Set(e.flatMap((e) => [e.y, e.y + e.height]))].sort((e, t) => e - t), r = (r, i) => {
172
+ if (r < 0 || i < 0 || r >= t.length - 1 || i >= n.length - 1) return !1;
173
+ let a = (t[r] + t[r + 1]) / 2, o = (n[i] + n[i + 1]) / 2;
174
+ return e.some((e) => a > e.x && a < e.x + e.width && o > e.y && o < e.y + e.height);
175
+ }, i = (e) => `${e.x},${e.y}`, a = /* @__PURE__ */ new Map();
176
+ for (let e = 0; e < t.length - 1; e++) for (let o = 0; o < n.length - 1; o++) {
177
+ if (!r(e, o)) continue;
178
+ let s = t[e], c = t[e + 1], l = n[o], u = n[o + 1];
179
+ r(e, o - 1) || a.set(i({
180
+ x: s,
181
+ y: l
182
+ }), {
183
+ x: c,
184
+ y: l
185
+ }), r(e + 1, o) || a.set(i({
186
+ x: c,
187
+ y: l
188
+ }), {
189
+ x: c,
190
+ y: u
191
+ }), r(e, o + 1) || a.set(i({
192
+ x: c,
193
+ y: u
194
+ }), {
195
+ x: s,
196
+ y: u
197
+ }), r(e - 1, o) || a.set(i({
198
+ x: s,
199
+ y: u
200
+ }), {
201
+ x: s,
202
+ y: l
203
+ });
204
+ }
205
+ let o = [];
206
+ for (; a.size;) {
207
+ let [e] = a.keys(), t = [], n = {
208
+ x: Number(e.split(",")[0]),
209
+ y: Number(e.split(",")[1])
210
+ };
211
+ for (; n;) {
212
+ let e = a.get(i(n));
213
+ if (!e) break;
214
+ a.delete(i(n)), t.push(n), n = a.has(i(e)) ? e : void 0;
215
+ }
216
+ t.length > 2 && o.push(Y(t));
217
+ }
218
+ return o;
219
+ }
220
+ function Y(e) {
221
+ return e.filter((t, n) => {
222
+ let r = e[(n - 1 + e.length) % e.length], i = e[(n + 1) % e.length];
223
+ return (r.x !== t.x || i.x !== t.x) && (r.y !== t.y || i.y !== t.y);
224
+ });
225
+ }
226
+ function _t(e, t, n) {
227
+ let r = [], i = [], a = [];
228
+ for (let n = 0; n < e.length; n++) {
229
+ let o = e[n], s = e[(n - 1 + e.length) % e.length], c = e[(n + 1) % e.length], l = yt(s, o), u = yt(o, c), d = Math.min(t, l / 2, u / 2);
230
+ r.push({
231
+ x: o.x + (s.x - o.x) / l * d,
232
+ y: o.y + (s.y - o.y) / l * d
233
+ }), i.push({
234
+ x: o.x + (c.x - o.x) / u * d,
235
+ y: o.y + (c.y - o.y) / u * d
236
+ }), a.push(d);
237
+ }
238
+ let o = n.length === 0, s = [], c = !1;
239
+ for (let t = 0; t < e.length; t++) {
240
+ let l = (t + 1) % e.length;
241
+ for (let e of vt(i[t], r[l], n)) (!c || !o) && s.push(`M ${X(e.x1)} ${X(e.y1)}`), s.push(`L ${X(e.x2)} ${X(e.y2)}`), c = !0;
242
+ if (a[l] > 0) {
243
+ let n = e[(l + 1) % e.length], o = (e[l].x - e[t].x) * (n.y - e[l].y) - (e[l].y - e[t].y) * (n.x - e[l].x);
244
+ c || s.push(`M ${X(r[l].x)} ${X(r[l].y)}`), s.push(`A ${X(a[l])} ${X(a[l])} 0 0 ${+(o > 0)} ${X(i[l].x)} ${X(i[l].y)}`), c = !0;
245
+ }
246
+ }
247
+ return o ? `${s.join(" ")} Z` : s.join(" ");
248
+ }
249
+ function vt(e, t, n) {
250
+ let r = yt(e, t);
251
+ if (r === 0) return [];
252
+ let i = (t.x - e.x) / r, a = (t.y - e.y) / r, o = (t) => ({
253
+ x: e.x + i * t,
254
+ y: e.y + a * t
255
+ }), s = (t) => (t.x - e.x) * i + (t.y - e.y) * a, c = [];
256
+ for (let i of n) {
257
+ let n = e.x === t.x && i.x1 === i.x2 && Math.abs(i.x1 - e.x) < 1, a = e.y === t.y && i.y1 === i.y2 && Math.abs(i.y1 - e.y) < 1;
258
+ if (!n && !a) continue;
259
+ let o = s({
260
+ x: i.x1,
261
+ y: i.y1
262
+ }), l = s({
263
+ x: i.x2,
264
+ y: i.y2
265
+ }), u = Math.max(0, Math.min(o, l)), d = Math.min(r, Math.max(o, l));
266
+ d > u && c.push({
267
+ start: u,
268
+ end: d
269
+ });
270
+ }
271
+ c.sort((e, t) => e.start - t.start);
272
+ let l = [], u = 0;
273
+ for (let e of c) {
274
+ if (e.start > u) {
275
+ let t = o(u), n = o(e.start);
276
+ l.push({
277
+ x1: t.x,
278
+ y1: t.y,
279
+ x2: n.x,
280
+ y2: n.y
281
+ });
282
+ }
283
+ u = Math.max(u, e.end);
284
+ }
285
+ if (u < r) {
286
+ let e = o(u), t = o(r);
287
+ l.push({
288
+ x1: e.x,
289
+ y1: e.y,
290
+ x2: t.x,
291
+ y2: t.y
292
+ });
293
+ }
294
+ return l;
295
+ }
296
+ function yt(e, t) {
297
+ return Math.abs(t.x - e.x) + Math.abs(t.y - e.y);
298
+ }
299
+ function X(e) {
300
+ return Math.round(e * 100) / 100;
301
+ }
302
+ //#endregion
303
+ //#region src/components/CuiFloorplan/CuiFloorplanInspector.vue?vue&type=script&setup=true&lang.ts
304
+ var bt = { class: "h-full flex flex-col overflow-hidden" }, Z = { class: "flex items-center gap-2 px-4 py-3 border-bottom-color" }, xt = { class: "flex items-center justify-center w-8 h-8 rounded-md shrink-0 inspector-icon" }, St = { class: "flex-1 min-w-0" }, Ct = { class: "text-sm font-semibold truncate text-color" }, wt = { class: "text-xs text-muted truncate" }, Tt = { class: "flex-1 overflow-y-auto" }, Et = { class: "text-color font-normal text-sm" }, Dt = { class: "flex flex-col gap-6" }, Ot = {
305
+ key: 0,
306
+ class: "flex flex-col field-gap"
307
+ }, kt = { class: "cui-label" }, At = { class: "flex flex-col field-gap" }, jt = { class: "cui-label" }, Mt = { class: "flex flex-col field-gap" }, Nt = { class: "cui-label" }, Pt = { class: "flex flex-col field-gap" }, Ft = { class: "cui-label" }, It = { class: "flex flex-col field-gap" }, Lt = { class: "cui-label" }, Rt = { class: "flex flex-col field-gap" }, Q = { class: "cui-label" }, zt = { class: "text-sm text-muted" }, Bt = { class: "text-color font-normal text-sm" }, Vt = { class: "flex flex-col field-gap" }, Ht = { class: "cui-label" }, Ut = {
308
+ key: 1,
309
+ class: "text-sm text-color"
310
+ }, Wt = {
311
+ key: 0,
312
+ class: "flex flex-col field-gap mt-6"
313
+ }, Gt = { class: "cui-label" }, Kt = { class: "flex flex-col field-gap mt-6" }, qt = { class: "cui-label" }, Jt = { class: "text-color font-normal text-sm" }, Yt = { class: "flex flex-col gap-6" }, Xt = { class: "flex flex-col field-gap" }, Zt = { class: "cui-label" }, Qt = {
314
+ key: 0,
315
+ class: "flex flex-col field-gap"
316
+ }, $t = { class: "cui-label" }, en = { class: "flex flex-col field-gap" }, $ = { class: "cui-label" }, tn = { class: "text-color font-normal text-sm" }, nn = { class: "flex flex-col gap-6" }, rn = { class: "flex flex-col field-gap" }, an = { class: "cui-label" }, on = { class: "flex flex-col field-gap" }, sn = { class: "cui-label" }, cn = { class: "text-color font-normal text-sm" }, ln = { class: "flex flex-col gap-6" }, un = { class: "flex flex-col field-gap" }, dn = { class: "cui-label" }, fn = { class: "flex flex-col field-gap" }, pn = { class: "cui-label" }, mn = { class: "flex flex-col field-gap" }, hn = { class: "cui-label" }, gn = {
317
+ key: 0,
318
+ class: "p-4 border-top-color"
319
+ }, _n = /*#__PURE__*/ De(/* @__PURE__ */ C({
320
+ __name: "CuiFloorplanInspector",
321
+ props: {
322
+ fluid: { type: Boolean },
323
+ rooms: {},
324
+ connections: {},
325
+ cameras: {},
326
+ sensors: {},
327
+ levels: {},
328
+ selection: {},
329
+ readOnly: { type: Boolean }
330
+ },
331
+ emits: [
332
+ "close",
333
+ "update-room",
334
+ "update-camera",
335
+ "update-sensor",
336
+ "update-connection",
337
+ "remove"
338
+ ],
339
+ setup(e, { emit: t }) {
340
+ let n = e, a = t, { t: o } = Oe(), c = w(["general", "view"]), l = h(() => n.selection?.kind === "room" ? n.rooms.find((e) => e.id === n.selection?.id) : void 0), f = h(() => n.selection?.kind === "camera" ? n.cameras.find((e) => e.id === n.selection?.id) : void 0), p = h(() => n.levels.map((e) => ({
341
+ label: e.name,
342
+ value: e.id
343
+ }))), ee = h(() => l.value?.outdoor ? l.value.publicSpace ? "public" : "outdoor" : "indoor"), v = h(() => [
344
+ "indoor",
345
+ "outdoor",
346
+ "public"
347
+ ].map((e) => ({
348
+ label: o(`views.floorplan.room_kind_${e}`),
349
+ value: e
350
+ }))), te = h(() => l.value ? n.rooms.filter((e) => e.roomId === l.value?.roomId).length : 0), x = h(() => {
351
+ let e = l.value;
352
+ if (!e) return [];
353
+ let t = /* @__PURE__ */ new Set(), r = [{
354
+ label: e.name,
355
+ value: e.roomId
356
+ }];
357
+ t.add(e.roomId);
358
+ for (let i of n.rooms) i.roomId === e.roomId || t.has(i.roomId) || i.levelId !== e.levelId || ft(e, i) && (t.add(i.roomId), r.push({
359
+ label: i.name,
360
+ value: i.roomId
361
+ }));
362
+ return r;
363
+ }), ne = h(() => {
364
+ let e = /* @__PURE__ */ new Set();
365
+ return n.rooms.filter((t) => t.levelId === f.value?.levelId && !e.has(t.roomId) && e.add(t.roomId)).map((e) => ({
366
+ label: e.name,
367
+ value: e.roomId
368
+ }));
369
+ }), C = h(() => n.selection?.kind === "sensor" ? n.sensors.find((e) => e.id === n.selection?.id) : void 0), re = h(() => {
370
+ let e = /* @__PURE__ */ new Set();
371
+ return n.rooms.filter((t) => t.levelId === C.value?.levelId && !e.has(t.roomId) && e.add(t.roomId)).map((e) => ({
372
+ label: e.name,
373
+ value: e.roomId
374
+ }));
375
+ }), ie = h(() => C.value ? n.connections.filter((e) => e.fromRoomId === C.value?.roomId || e.toRoomId === C.value?.roomId).map((e) => {
376
+ let t = e.fromRoomId === C.value?.roomId ? e.toRoomId : e.fromRoomId;
377
+ return {
378
+ label: n.rooms.find((e) => e.roomId === t)?.name ?? t,
379
+ value: e.id
380
+ };
381
+ }) : []), E = h(() => n.selection?.kind === "connection" ? n.connections.find((e) => e.id === n.selection?.id) : void 0), D = h(() => {
382
+ if (!E.value) return !1;
383
+ let e = n.rooms.find((e) => e.roomId === E.value?.fromRoomId), t = n.rooms.find((e) => e.roomId === E.value?.toRoomId);
384
+ return !!e && !!t && e.levelId !== t.levelId;
385
+ }), oe = h(() => ct.filter((e) => e !== "stairs").map((e) => ({
386
+ label: o(`views.floorplan.connection_${e}`),
387
+ value: e
388
+ }))), se = h(() => E.value ? `${n.rooms.find((e) => e.roomId === E.value?.fromRoomId)?.name ?? ""} · ${n.rooms.find((e) => e.roomId === E.value?.toRoomId)?.name ?? ""}` : ""), ce = h(() => ((f.value?.rotation ?? 0) % 360 + 360) % 360), le = h(() => C.value ? C.value.owner || (n.rooms.find((e) => e.roomId === C.value?.roomId)?.name ?? "") : l.value ? n.levels.find((e) => e.id === l.value?.levelId)?.name ?? "" : E.value ? o(`views.floorplan.connection_${E.value.type}`) : f.value ? n.rooms.find((e) => e.roomId === f.value?.roomId)?.name ?? o("views.floorplan.no_room") : "");
389
+ function ue(e) {
390
+ C.value && a("update-sensor", {
391
+ id: C.value.id,
392
+ patch: e
393
+ });
394
+ }
395
+ function de(e) {
396
+ return {
397
+ outdoor: e !== "indoor",
398
+ publicSpace: e === "public"
399
+ };
400
+ }
401
+ function fe(e) {
402
+ l.value && a("update-room", {
403
+ id: l.value.id,
404
+ patch: e
405
+ });
406
+ }
407
+ function O(e) {
408
+ f.value && a("update-camera", {
409
+ id: f.value.id,
410
+ patch: e
411
+ });
412
+ }
413
+ function pe() {
414
+ l.value ? a("remove", {
415
+ kind: "room",
416
+ id: l.value.id
417
+ }) : C.value ? a("remove", {
418
+ kind: "sensor",
419
+ id: C.value.id
420
+ }) : f.value ? a("remove", {
421
+ kind: "camera",
422
+ id: f.value.id
423
+ }) : E.value && a("remove", {
424
+ kind: "connection",
425
+ id: E.value.id
426
+ });
427
+ }
428
+ return (t, n) => {
429
+ let o = Ve, h = at, w = nt, me = Me, he = ke, k = Ie, A = R, j = ae, M = je, ge = ze, _e = Pe, ve = Fe, ye = F, be = Le;
430
+ return r(), _("div", bt, [
431
+ b("div", Z, [
432
+ b("div", xt, [m(f) ? (r(), u(o, {
433
+ key: 0,
434
+ class: "w-4 h-4"
435
+ })) : m(E) ? (r(), u(h, {
436
+ key: 1,
437
+ class: "w-4 h-4"
438
+ })) : (r(), u(w, {
439
+ key: 2,
440
+ class: "w-4 h-4"
441
+ }))]),
442
+ b("div", St, [b("div", Ct, i(m(l)?.name ?? m(f)?.name ?? m(C)?.name ?? m(se)), 1), b("div", wt, i(m(le)), 1)]),
443
+ T(he, {
444
+ severity: "secondary",
445
+ text: "",
446
+ rounded: "",
447
+ class: "shrink-0 cui-icon-sm",
448
+ onClick: n[0] ||= (e) => a("close")
449
+ }, {
450
+ icon: g(() => [T(me, {
451
+ width: "100%",
452
+ height: "100%"
453
+ })]),
454
+ _: 1
455
+ })
456
+ ]),
457
+ b("div", Tt, [T(be, {
458
+ multiple: "",
459
+ value: m(c),
460
+ class: s(e.fluid ? "w-full" : "w-[300px]")
461
+ }, {
462
+ default: g(() => [
463
+ m(l) ? (r(), u(ve, {
464
+ key: 0,
465
+ value: "general"
466
+ }, {
467
+ default: g(() => [T(k, { class: "px-4 rounded-none!" }, {
468
+ default: g(() => [b("span", Et, i(t.$t("views.floorplan.section_room")), 1)]),
469
+ _: 1
470
+ }), T(_e, { pt: { content: { class: e.fluid ? "px-4 w-full" : "px-4 w-[300px]" } } }, {
471
+ default: g(() => [b("div", Dt, [
472
+ m(x).length > 1 ? (r(), _("div", Ot, [
473
+ b("label", kt, i(t.$t("views.floorplan.belongs_to")), 1),
474
+ T(A, {
475
+ "model-value": m(l).roomId,
476
+ options: m(x),
477
+ "option-label": "label",
478
+ "option-value": "value",
479
+ disabled: e.readOnly,
480
+ "onUpdate:modelValue": n[1] ||= (e) => e && fe({ roomId: e })
481
+ }, null, 8, [
482
+ "model-value",
483
+ "options",
484
+ "disabled"
485
+ ]),
486
+ T(j, {
487
+ severity: "secondary",
488
+ variant: "simple",
489
+ size: "small",
490
+ class: "cui-input-hint"
491
+ }, {
492
+ default: g(() => [S(i(t.$t("views.floorplan.belongs_to_hint")), 1)]),
493
+ _: 1
494
+ })
495
+ ])) : d("", !0),
496
+ b("div", At, [
497
+ b("label", jt, i(t.$t("views.floorplan.room_name")), 1),
498
+ T(M, {
499
+ "model-value": m(l).name,
500
+ disabled: e.readOnly,
501
+ "onUpdate:modelValue": n[2] ||= (e) => fe({ name: e ?? "" })
502
+ }, null, 8, ["model-value", "disabled"]),
503
+ m(te) > 1 ? (r(), u(j, {
504
+ key: 0,
505
+ severity: "secondary",
506
+ variant: "simple",
507
+ size: "small",
508
+ class: "cui-input-hint"
509
+ }, {
510
+ default: g(() => [S(i(t.$t("views.floorplan.room_parts", { count: m(te) })), 1)]),
511
+ _: 1
512
+ })) : d("", !0)
513
+ ]),
514
+ b("div", Mt, [b("label", Nt, i(t.$t("views.floorplan.level")), 1), T(A, {
515
+ "model-value": m(l).levelId,
516
+ options: m(p),
517
+ "option-label": "label",
518
+ "option-value": "value",
519
+ disabled: e.readOnly,
520
+ "onUpdate:modelValue": n[3] ||= (e) => fe({ levelId: e })
521
+ }, null, 8, [
522
+ "model-value",
523
+ "options",
524
+ "disabled"
525
+ ])]),
526
+ b("div", Pt, [
527
+ b("label", Ft, i(t.$t("views.floorplan.room_kind")), 1),
528
+ T(A, {
529
+ "model-value": m(ee),
530
+ options: m(v),
531
+ "option-label": "label",
532
+ "option-value": "value",
533
+ disabled: e.readOnly,
534
+ "onUpdate:modelValue": n[4] ||= (e) => fe(de(e))
535
+ }, null, 8, [
536
+ "model-value",
537
+ "options",
538
+ "disabled"
539
+ ]),
540
+ T(j, {
541
+ severity: "secondary",
542
+ variant: "simple",
543
+ size: "small",
544
+ class: "cui-input-hint"
545
+ }, {
546
+ default: g(() => [S(i(t.$t(`views.floorplan.room_kind_${m(ee)}_hint`)), 1)]),
547
+ _: 1
548
+ })
549
+ ]),
550
+ b("div", It, [
551
+ b("label", Lt, i(t.$t("views.floorplan.note")), 1),
552
+ T(ge, {
553
+ "model-value": m(l).note,
554
+ disabled: e.readOnly,
555
+ maxlength: m(240),
556
+ rows: "3",
557
+ "auto-resize": "",
558
+ "onUpdate:modelValue": n[5] ||= (e) => fe({ note: e ?? "" })
559
+ }, null, 8, [
560
+ "model-value",
561
+ "disabled",
562
+ "maxlength"
563
+ ]),
564
+ T(j, {
565
+ severity: "secondary",
566
+ variant: "simple",
567
+ size: "small",
568
+ class: "cui-input-hint"
569
+ }, {
570
+ default: g(() => [S(i(t.$t("views.floorplan.note_hint")), 1)]),
571
+ _: 1
572
+ })
573
+ ]),
574
+ b("div", Rt, [b("label", Q, i(t.$t("views.floorplan.size")), 1), b("span", zt, i(m(ut)(m(l).width)) + " x " + i(m(ut)(m(l).height)), 1)])
575
+ ])]),
576
+ _: 1
577
+ }, 8, ["pt"])]),
578
+ _: 1
579
+ })) : d("", !0),
580
+ m(E) ? (r(), u(ve, {
581
+ key: 1,
582
+ value: "general"
583
+ }, {
584
+ default: g(() => [T(k, { class: "px-4 rounded-none!" }, {
585
+ default: g(() => [b("span", Bt, i(t.$t("views.floorplan.section_connection")), 1)]),
586
+ _: 1
587
+ }), T(_e, { pt: { content: { class: e.fluid ? "px-4 w-full" : "px-4 w-[300px]" } } }, {
588
+ default: g(() => [
589
+ b("div", Vt, [
590
+ b("label", Ht, i(t.$t("views.floorplan.connection_type")), 1),
591
+ m(D) ? (r(), _("span", Ut, i(t.$t("views.floorplan.connection_stairs")), 1)) : (r(), u(A, {
592
+ key: 0,
593
+ "model-value": m(E).type,
594
+ options: m(oe),
595
+ "option-label": "label",
596
+ "option-value": "value",
597
+ disabled: e.readOnly,
598
+ "onUpdate:modelValue": n[6] ||= (e) => a("update-connection", {
599
+ id: m(E).id,
600
+ patch: { type: e }
601
+ })
602
+ }, null, 8, [
603
+ "model-value",
604
+ "options",
605
+ "disabled"
606
+ ])),
607
+ T(j, {
608
+ severity: "secondary",
609
+ variant: "simple",
610
+ size: "small",
611
+ class: "cui-input-hint"
612
+ }, {
613
+ default: g(() => [S(i(m(D) ? t.$t("views.floorplan.connection_level_hint") : t.$t("views.floorplan.connection_type_hint")), 1)]),
614
+ _: 1
615
+ })
616
+ ]),
617
+ m(D) ? d("", !0) : (r(), _("div", Wt, [
618
+ b("label", Gt, i(t.$t("views.floorplan.connection_width", { value: m(J)(m(E).width).toFixed(2) })), 1),
619
+ T(ye, {
620
+ "model-value": m(E).width,
621
+ disabled: e.readOnly,
622
+ min: m(q).min,
623
+ max: m(q).max,
624
+ step: 5,
625
+ "onUpdate:modelValue": n[7] ||= (e) => a("update-connection", {
626
+ id: m(E).id,
627
+ patch: { width: Number(e) }
628
+ })
629
+ }, null, 8, [
630
+ "model-value",
631
+ "disabled",
632
+ "min",
633
+ "max"
634
+ ]),
635
+ T(j, {
636
+ severity: "secondary",
637
+ variant: "simple",
638
+ size: "small",
639
+ class: "cui-input-hint"
640
+ }, {
641
+ default: g(() => [S(i(t.$t("views.floorplan.connection_width_hint")), 1)]),
642
+ _: 1
643
+ })
644
+ ])),
645
+ b("div", Kt, [
646
+ b("label", qt, i(t.$t("views.floorplan.note")), 1),
647
+ T(ge, {
648
+ "model-value": m(E).note,
649
+ disabled: e.readOnly,
650
+ maxlength: m(240),
651
+ rows: "3",
652
+ "auto-resize": "",
653
+ "onUpdate:modelValue": n[8] ||= (e) => a("update-connection", {
654
+ id: m(E).id,
655
+ patch: { note: e ?? "" }
656
+ })
657
+ }, null, 8, [
658
+ "model-value",
659
+ "disabled",
660
+ "maxlength"
661
+ ]),
662
+ T(j, {
663
+ severity: "secondary",
664
+ variant: "simple",
665
+ size: "small",
666
+ class: "cui-input-hint"
667
+ }, {
668
+ default: g(() => [S(i(t.$t("views.floorplan.note_hint")), 1)]),
669
+ _: 1
670
+ })
671
+ ])
672
+ ]),
673
+ _: 1
674
+ }, 8, ["pt"])]),
675
+ _: 1
676
+ })) : d("", !0),
677
+ m(C) ? (r(), u(ve, {
678
+ key: 2,
679
+ value: "general"
680
+ }, {
681
+ default: g(() => [T(k, { class: "px-4 rounded-none!" }, {
682
+ default: g(() => [b("span", Jt, i(t.$t("views.floorplan.section_sensor")), 1)]),
683
+ _: 1
684
+ }), T(_e, { pt: { content: { class: e.fluid ? "px-4 w-full" : "px-4 w-[300px]" } } }, {
685
+ default: g(() => [b("div", Yt, [
686
+ b("div", Xt, [b("label", Zt, i(t.$t("views.floorplan.assigned_room")), 1), T(A, {
687
+ "model-value": m(C).roomId,
688
+ options: m(re),
689
+ disabled: e.readOnly,
690
+ "option-label": "label",
691
+ "option-value": "value",
692
+ "onUpdate:modelValue": n[9] ||= (e) => e && ue({ roomId: e })
693
+ }, null, 8, [
694
+ "model-value",
695
+ "options",
696
+ "disabled"
697
+ ])]),
698
+ m(ie).length ? (r(), _("div", Qt, [
699
+ b("label", $t, i(t.$t("views.floorplan.sensor_passage")), 1),
700
+ T(A, {
701
+ "model-value": m(C).connectionId,
702
+ options: m(ie),
703
+ disabled: e.readOnly,
704
+ "option-label": "label",
705
+ "option-value": "value",
706
+ "show-clear": "",
707
+ "onUpdate:modelValue": n[10] ||= (e) => ue({ connectionId: e ?? null })
708
+ }, null, 8, [
709
+ "model-value",
710
+ "options",
711
+ "disabled"
712
+ ]),
713
+ T(j, {
714
+ severity: "secondary",
715
+ variant: "simple",
716
+ size: "small",
717
+ class: "cui-input-hint"
718
+ }, {
719
+ default: g(() => [S(i(t.$t("views.floorplan.sensor_passage_hint")), 1)]),
720
+ _: 1
721
+ })
722
+ ])) : d("", !0),
723
+ b("div", en, [
724
+ b("label", $, i(t.$t("views.floorplan.note")), 1),
725
+ T(ge, {
726
+ "model-value": m(C).note,
727
+ disabled: e.readOnly,
728
+ maxlength: m(240),
729
+ rows: "3",
730
+ "auto-resize": "",
731
+ "onUpdate:modelValue": n[11] ||= (e) => ue({ note: e ?? "" })
732
+ }, null, 8, [
733
+ "model-value",
734
+ "disabled",
735
+ "maxlength"
736
+ ]),
737
+ T(j, {
738
+ severity: "secondary",
739
+ variant: "simple",
740
+ size: "small",
741
+ class: "cui-input-hint"
742
+ }, {
743
+ default: g(() => [S(i(t.$t("views.floorplan.note_hint")), 1)]),
744
+ _: 1
745
+ })
746
+ ])
747
+ ])]),
748
+ _: 1
749
+ }, 8, ["pt"])]),
750
+ _: 1
751
+ })) : d("", !0),
752
+ m(f) ? (r(), _(y, { key: 3 }, [T(ve, { value: "general" }, {
753
+ default: g(() => [T(k, { class: "px-4 rounded-none!" }, {
754
+ default: g(() => [b("span", tn, i(t.$t("views.floorplan.section_camera")), 1)]),
755
+ _: 1
756
+ }), T(_e, { pt: { content: { class: e.fluid ? "px-4 w-full" : "px-4 w-[300px]" } } }, {
757
+ default: g(() => [b("div", nn, [b("div", rn, [
758
+ b("label", an, i(t.$t("views.floorplan.assigned_room")), 1),
759
+ T(A, {
760
+ "model-value": m(f).roomId,
761
+ options: m(ne),
762
+ disabled: e.readOnly,
763
+ "option-label": "label",
764
+ "option-value": "value",
765
+ "onUpdate:modelValue": n[12] ||= (e) => e && O({ roomId: e })
766
+ }, null, 8, [
767
+ "model-value",
768
+ "options",
769
+ "disabled"
770
+ ]),
771
+ T(j, {
772
+ severity: "secondary",
773
+ variant: "simple",
774
+ size: "small",
775
+ class: "cui-input-hint"
776
+ }, {
777
+ default: g(() => [S(i(t.$t("views.floorplan.assigned_room_hint")), 1)]),
778
+ _: 1
779
+ })
780
+ ]), b("div", on, [
781
+ b("label", sn, i(t.$t("views.floorplan.note")), 1),
782
+ T(ge, {
783
+ "model-value": m(f).note,
784
+ disabled: e.readOnly,
785
+ maxlength: m(240),
786
+ rows: "3",
787
+ "auto-resize": "",
788
+ "onUpdate:modelValue": n[13] ||= (e) => O({ note: e ?? "" })
789
+ }, null, 8, [
790
+ "model-value",
791
+ "disabled",
792
+ "maxlength"
793
+ ]),
794
+ T(j, {
795
+ severity: "secondary",
796
+ variant: "simple",
797
+ size: "small",
798
+ class: "cui-input-hint"
799
+ }, {
800
+ default: g(() => [S(i(t.$t("views.floorplan.note_hint")), 1)]),
801
+ _: 1
802
+ })
803
+ ])])]),
804
+ _: 1
805
+ }, 8, ["pt"])]),
806
+ _: 1
807
+ }), T(ve, { value: "view" }, {
808
+ default: g(() => [T(k, { class: "px-4 rounded-none!" }, {
809
+ default: g(() => [b("span", cn, i(t.$t("views.floorplan.section_view")), 1)]),
810
+ _: 1
811
+ }), T(_e, { pt: { content: { class: e.fluid ? "px-4 w-full" : "px-4 w-[300px]" } } }, {
812
+ default: g(() => [b("div", ln, [
813
+ b("div", un, [b("label", dn, i(t.$t("views.floorplan.direction", { value: m(ce) })), 1), T(ye, {
814
+ "model-value": m(ce),
815
+ disabled: e.readOnly,
816
+ min: 0,
817
+ max: 359,
818
+ "onUpdate:modelValue": n[14] ||= (e) => O({ rotation: Number(e) })
819
+ }, null, 8, ["model-value", "disabled"])]),
820
+ b("div", fn, [b("label", pn, i(t.$t("views.floorplan.fov", { value: m(f).fov })), 1), T(ye, {
821
+ "model-value": m(f).fov,
822
+ disabled: e.readOnly,
823
+ min: 30,
824
+ max: 180,
825
+ "onUpdate:modelValue": n[15] ||= (e) => O({ fov: Number(e) })
826
+ }, null, 8, ["model-value", "disabled"])]),
827
+ b("div", mn, [b("label", hn, i(t.$t("views.floorplan.range", { value: m(J)(m(f).range).toFixed(1) })), 1), T(ye, {
828
+ disabled: e.readOnly,
829
+ "model-value": m(f).range,
830
+ min: m(K).min,
831
+ max: m(K).max,
832
+ step: 50,
833
+ "onUpdate:modelValue": n[16] ||= (e) => O({ range: Number(e) })
834
+ }, null, 8, [
835
+ "disabled",
836
+ "model-value",
837
+ "min",
838
+ "max"
839
+ ])])
840
+ ])]),
841
+ _: 1
842
+ }, 8, ["pt"])]),
843
+ _: 1
844
+ })], 64)) : d("", !0)
845
+ ]),
846
+ _: 1
847
+ }, 8, ["value", "class"])]),
848
+ e.readOnly ? d("", !0) : (r(), _("div", gn, [T(he, {
849
+ severity: "danger",
850
+ fluid: "",
851
+ class: "w-full cui-button-medium",
852
+ label: m(l) ? t.$t("views.floorplan.delete_room") : m(E) ? t.$t("views.floorplan.remove_connection") : m(C) ? t.$t("views.floorplan.remove_sensor") : t.$t("views.floorplan.remove_camera"),
853
+ onClick: pe
854
+ }, null, 8, ["label"])]))
855
+ ]);
856
+ };
857
+ }
858
+ }), [["__scopeId", "data-v-74664afa"]]), vn = {
859
+ viewBox: "0 0 24 24",
860
+ width: "1.2em",
861
+ height: "1.2em"
862
+ };
863
+ function yn(e, t) {
864
+ return r(), _("svg", vn, [...t[0] ||= [b("path", {
865
+ fill: "currentColor",
866
+ d: "M10 13a2 2 0 0 1 2 2c0 1.11-.89 2-2 2s-2-.89-2-2s.9-2 2-2m8-12c-2.76 0-5 2.24-5 5v2H4c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2h-1V6c0-1.66 1.34-3 3-3s3 1.34 3 3v2h2V6c0-2.76-2.24-5-5-5m-2 9v10H4V10z"
867
+ }, null, -1)]]);
868
+ }
869
+ var bn = l({
870
+ name: "mdi-lock-open-variant-outline",
871
+ render: yn
872
+ }), xn = {
873
+ viewBox: "0 0 24 24",
874
+ width: "1.2em",
875
+ height: "1.2em"
876
+ };
877
+ function Sn(e, t) {
878
+ return r(), _("svg", xn, [...t[0] ||= [b("path", {
879
+ fill: "currentColor",
880
+ d: "M17 4h3c1.1 0 2 .9 2 2v2h-2V6h-3zM4 8V6h3V4H4c-1.1 0-2 .9-2 2v2zm16 8v2h-3v2h3c1.1 0 2-.9 2-2v-2zM7 18H4v-2H2v2c0 1.1.9 2 2 2h3zm9-8v4H8v-4zm2-2H6v8h12z"
881
+ }, null, -1)]]);
882
+ }
883
+ var Cn = l({
884
+ name: "mdi-fit-to-screen-outline",
885
+ render: Sn
886
+ }), wn = ["width", "height"], Tn = ["width", "height"], En = ["y2", "stroke-width"], Dn = ["id"], On = ["d"], kn = ["width", "height"], An = ["y2", "stroke-width"], jn = [
887
+ "x",
888
+ "y",
889
+ "width",
890
+ "height"
891
+ ], Mn = ["d"], Nn = ["clip-path"], Pn = ["d", "transform"], Fn = ["transform"], In = ["d"], Ln = ["d", "stroke-width"], Rn = ["clip-path"], zn = ["d", "transform"], Bn = [
892
+ "x",
893
+ "y",
894
+ "width",
895
+ "height"
896
+ ], Vn = [
897
+ "x",
898
+ "y",
899
+ "width",
900
+ "height",
901
+ "onPointerdown"
902
+ ], Hn = [
903
+ "x",
904
+ "y",
905
+ "font-size",
906
+ "transform"
907
+ ], Un = ["onPointerdown"], Wn = ["d", "stroke-width"], Gn = ["d", "stroke-width"], Kn = [
908
+ "cx",
909
+ "cy",
910
+ "r",
911
+ "stroke-width",
912
+ "onPointerdown"
913
+ ], qn = [
914
+ "d",
915
+ "stroke-width",
916
+ "onPointerdown"
917
+ ], Jn = ["onPointerdown", "onPointerenter"], Yn = [
918
+ "cx",
919
+ "cy",
920
+ "r",
921
+ "stroke-width"
922
+ ], Xn = [
923
+ "cx",
924
+ "cy",
925
+ "r"
926
+ ], Zn = {
927
+ key: 0,
928
+ class: "camera-chip"
929
+ }, Qn = [
930
+ "x",
931
+ "y",
932
+ "width",
933
+ "height",
934
+ "rx"
935
+ ], $n = [
936
+ "x",
937
+ "y",
938
+ "width",
939
+ "height"
940
+ ], er = [
941
+ "x",
942
+ "y",
943
+ "font-size"
944
+ ], tr = [
945
+ "cx",
946
+ "cy",
947
+ "r",
948
+ "stroke-width",
949
+ "onPointerdown"
950
+ ], nr = ["d", "stroke-width"], rr = ["onPointerdown", "onPointerenter"], ir = [
951
+ "cx",
952
+ "cy",
953
+ "r",
954
+ "stroke-width"
955
+ ], ar = [
956
+ "x",
957
+ "y",
958
+ "width",
959
+ "height"
960
+ ], or = {
961
+ key: 0,
962
+ class: "camera-chip"
963
+ }, sr = [
964
+ "x",
965
+ "y",
966
+ "width",
967
+ "height",
968
+ "rx"
969
+ ], cr = [
970
+ "x",
971
+ "y",
972
+ "font-size"
973
+ ], lr = ["onPointerenter"], ur = [
974
+ "cx",
975
+ "cy",
976
+ "r",
977
+ "stroke-width"
978
+ ], dr = [
979
+ "cx",
980
+ "cy",
981
+ "r"
982
+ ], fr = {
983
+ key: 0,
984
+ class: "camera-chip"
985
+ }, pr = [
986
+ "x",
987
+ "y",
988
+ "width",
989
+ "height",
990
+ "rx"
991
+ ], mr = [
992
+ "x",
993
+ "y",
994
+ "font-size"
995
+ ], hr = ["onPointerdown"], gr = [
996
+ "cx",
997
+ "cy",
998
+ "r",
999
+ "stroke-width"
1000
+ ], _r = ["d", "stroke-width"], vr = [
1001
+ "x",
1002
+ "y",
1003
+ "font-size"
1004
+ ], yr = {
1005
+ key: 1,
1006
+ class: "camera-chip"
1007
+ }, br = [
1008
+ "x",
1009
+ "y",
1010
+ "width",
1011
+ "height",
1012
+ "rx"
1013
+ ], xr = [
1014
+ "x",
1015
+ "y",
1016
+ "font-size"
1017
+ ], Sr = ["d", "stroke-width"], Cr = ["d", "stroke-width"], wr = [
1018
+ "x",
1019
+ "y",
1020
+ "width",
1021
+ "height",
1022
+ "rx",
1023
+ "stroke-width"
1024
+ ], Tr = [
1025
+ "cx",
1026
+ "cy",
1027
+ "r",
1028
+ "stroke-width"
1029
+ ], Er = {
1030
+ width: "46",
1031
+ height: "46",
1032
+ viewBox: "0 0 46 46"
1033
+ }, Dr = ["transform"], Or = { class: "flex flex-col overflow-hidden floorplan-controls" }, kr = { class: "floorplan-scale flex items-center gap-2 px-2 py-1" }, Ar = ["width"], jr = ["d"], Mr = { class: "text-xs text-muted whitespace-nowrap" }, Nr = 60, Pr = /*#__PURE__*/ De(/* @__PURE__ */ C({
1034
+ __name: "CuiFloorplanCanvas",
1035
+ props: {
1036
+ mobile: { type: Boolean },
1037
+ bottomInset: {},
1038
+ bottomInsetDragging: { type: Boolean },
1039
+ levels: {},
1040
+ rooms: {},
1041
+ connections: {},
1042
+ cameras: {},
1043
+ sensors: {},
1044
+ levelId: {},
1045
+ selection: {},
1046
+ north: {},
1047
+ readOnly: { type: Boolean }
1048
+ },
1049
+ emits: [
1050
+ "select",
1051
+ "history",
1052
+ "move-room",
1053
+ "resize-room",
1054
+ "move-camera",
1055
+ "rotate-camera",
1056
+ "create-connection",
1057
+ "move-connection",
1058
+ "resize-connection",
1059
+ "drop",
1060
+ "update-north",
1061
+ "request-stairs",
1062
+ "settle-room",
1063
+ "hover-camera",
1064
+ "move-sensor",
1065
+ "hover-sensor"
1066
+ ],
1067
+ setup(a, { expose: l, emit: f }) {
1068
+ let p = a, S = f, ne = te("wrapperRef"), C = w(!1), re = w(!1), ae = te("compassRef"), D = w({
1069
+ x: null,
1070
+ y: null
1071
+ }), oe = w(null), se = w(null), ce = w(null), le = w(null), de = /* @__PURE__ */ new Set(["motion", "audio"]), fe = /* @__PURE__ */ new Set([
1072
+ "object",
1073
+ "face",
1074
+ "licensePlate",
1075
+ "classifier",
1076
+ "objectAssist",
1077
+ "clip"
1078
+ ]), O = null, he = !1, A = null, { viewport: j, zoomIn: M, zoomOut: ge, fitBounds: ve } = z(), { sensors: ye } = Ae(), be = h(() => p.sensors.filter((e) => e.levelId === p.levelId)), xe = h(() => {
1079
+ let e = /* @__PURE__ */ new Map();
1080
+ for (let t of ye.value) {
1081
+ let n = String(t.type), r = de.has(n), i = fe.has(n);
1082
+ if (!r && !i || t.getProperty("detected") !== !0) continue;
1083
+ let a = Ge(t, n);
1084
+ for (let n of t.assignedCameraIds.value) {
1085
+ let t = e.get(n);
1086
+ e.set(n, {
1087
+ level: t?.level === "detection" || i ? "detection" : "motion",
1088
+ labels: [.../* @__PURE__ */ new Set([...t?.labels ?? [], ...a])]
1089
+ });
1090
+ }
1091
+ }
1092
+ return e;
1093
+ }), Se = h(() => {
1094
+ let e = F.value.find((e) => e.id === le.value);
1095
+ if (!e) return null;
1096
+ let t = `${ut(e.width, 1)} x ${ut(e.height, 1)}`;
1097
+ return {
1098
+ text: t,
1099
+ width: it(t),
1100
+ x: e.x + e.width / 2,
1101
+ y: e.y + e.height + 10 / N.value
1102
+ };
1103
+ }), N = h(() => j.value.zoom), we = h(() => ({
1104
+ x: j.value.x,
1105
+ y: j.value.y
1106
+ })), Te = h(() => p.north ?? 0), P = h(() => p.readOnly === !0 || C.value), F = h(() => p.rooms.filter((e) => e.levelId === p.levelId)), Ee = h(() => p.cameras.filter((e) => e.levelId === p.levelId)), I = h(() => {
1107
+ let e = 4e3, t = [0], n = [0];
1108
+ for (let e of F.value) t.push(e.x, e.x + e.width), n.push(e.y, e.y + e.height);
1109
+ for (let e of Ee.value) t.push(e.x - e.range, e.x + e.range), n.push(e.y - e.range, e.y + e.range);
1110
+ let r = Math.min(...t) - e, i = Math.min(...n) - e;
1111
+ return {
1112
+ x: r,
1113
+ y: i,
1114
+ width: Math.max(...t) + e - r,
1115
+ height: Math.max(...n) + e - i
1116
+ };
1117
+ }), De = [{
1118
+ id: "scene",
1119
+ type: "scene",
1120
+ position: {
1121
+ x: 0,
1122
+ y: 0
1123
+ },
1124
+ draggable: !1,
1125
+ selectable: !1,
1126
+ data: {}
1127
+ }], Oe = h(() => p.selection?.kind === "room" ? F.value.find((e) => e.id === p.selection?.id) : void 0), L = h(() => p.selection?.kind === "camera" ? Ee.value.find((e) => e.id === p.selection?.id) : void 0), ke = h(() => N.value >= .45), je = h(() => {
1128
+ let e = [
1129
+ .5,
1130
+ 1,
1131
+ 2,
1132
+ 5,
1133
+ 10,
1134
+ 20,
1135
+ 50
1136
+ ], t = e.filter((e) => e * 100 * N.value <= 130).pop() ?? e[0];
1137
+ return {
1138
+ meters: t,
1139
+ width: Math.round(t * 100 * N.value),
1140
+ label: `${t} m`
1141
+ };
1142
+ }), Me = h(() => p.connections.map((e) => ({
1143
+ connection: e,
1144
+ geometry: mt(e, p.rooms, p.levelId)
1145
+ })).filter((e) => e.geometry !== null)), Ne = h(() => new Map([...R.value].map(([e, t]) => [e, G(t.reduce((e, t) => t.width * t.height > e.width * e.height ? t : e))]))), R = h(() => {
1146
+ let e = /* @__PURE__ */ new Map();
1147
+ for (let t of F.value) e.set(t.roomId, [...e.get(t.roomId) ?? [], t]);
1148
+ return e;
1149
+ }), Pe = h(() => {
1150
+ let e = /* @__PURE__ */ new Map();
1151
+ for (let t of Me.value) {
1152
+ if (t.geometry.kind !== "edge") continue;
1153
+ let n = {
1154
+ x1: t.geometry.x1,
1155
+ y1: t.geometry.y1,
1156
+ x2: t.geometry.x2,
1157
+ y2: t.geometry.y2
1158
+ };
1159
+ for (let r of [t.connection.fromRoomId, t.connection.toRoomId]) e.set(r, [...e.get(r) ?? [], n]);
1160
+ }
1161
+ return e;
1162
+ }), Fe = h(() => [...R.value].map(([e, t]) => ({
1163
+ roomId: e,
1164
+ parts: t,
1165
+ ...ht(t, 8 / N.value, Pe.value.get(e) ?? []),
1166
+ outdoor: t.every((e) => e.outdoor),
1167
+ publicSpace: t.every((e) => e.publicSpace),
1168
+ selected: t.some((e) => J("room", e.id))
1169
+ })).sort((e, t) => Number(e.selected) - Number(t.selected))), Ie = h(() => {
1170
+ let e = /* @__PURE__ */ new Map();
1171
+ for (let t of R.value.keys()) e.set(t, t);
1172
+ let t = (t) => {
1173
+ let n = t;
1174
+ for (; e.get(n) !== n;) n = e.get(n);
1175
+ return n;
1176
+ }, n = (e) => (R.value.get(e) ?? []).every((e) => e.outdoor);
1177
+ for (let r of p.connections) {
1178
+ if (!e.has(r.fromRoomId) || !e.has(r.toRoomId) || !n(r.fromRoomId) || !n(r.toRoomId)) continue;
1179
+ let i = t(r.fromRoomId), a = t(r.toRoomId);
1180
+ i !== a && e.set(i, a);
1181
+ }
1182
+ let r = /* @__PURE__ */ new Map();
1183
+ for (let [e, n] of R.value) {
1184
+ let i = t(e);
1185
+ r.set(i, [...r.get(i) ?? [], ...n]);
1186
+ }
1187
+ let i = /* @__PURE__ */ new Map();
1188
+ for (let [e, t] of r) i.set(e, ht(t, 8 / N.value, []).fill);
1189
+ return [...R.value.keys()].map((e) => ({
1190
+ roomId: e,
1191
+ path: i.get(t(e)) ?? ""
1192
+ }));
1193
+ }), Le = h(() => Me.value.flatMap((e) => {
1194
+ if (e.geometry.kind !== "edge") return [];
1195
+ let { x1: t, y1: n, x2: r, y2: i, wall: a } = e.geometry;
1196
+ return [{
1197
+ id: e.connection.id,
1198
+ type: e.connection.type,
1199
+ wall: a,
1200
+ line: `M ${t} ${n} L ${r} ${i}`,
1201
+ handles: [{
1202
+ x: t,
1203
+ y: n
1204
+ }, {
1205
+ x: r,
1206
+ y: i
1207
+ }]
1208
+ }];
1209
+ })), Re = h(() => {
1210
+ let e = Oe.value;
1211
+ return !e || P.value ? [] : F.value.filter((t) => t.roomId !== e.roomId).map((t) => ({
1212
+ other: t,
1213
+ wall: ft(e, t)
1214
+ })).filter((e) => e.wall !== null).map((t) => ({
1215
+ fromRoomId: e.roomId,
1216
+ fromShapeId: e.id,
1217
+ roomId: t.other.roomId,
1218
+ shapeId: t.other.id,
1219
+ x: t.wall.x + t.wall.stepX * t.wall.length / 2,
1220
+ y: t.wall.y + t.wall.stepY * t.wall.length / 2
1221
+ }));
1222
+ }), ze = h(() => {
1223
+ let e = /* @__PURE__ */ new Map(), t = (t) => {
1224
+ for (; e.get(t) !== t;) t = e.get(t);
1225
+ return t;
1226
+ };
1227
+ for (let n of p.connections) if (n.type === "stairs") {
1228
+ for (let t of [n.fromRoomId, n.toRoomId]) e.has(t) || e.set(t, t);
1229
+ e.set(t(n.fromRoomId), t(n.toRoomId));
1230
+ }
1231
+ let n = [];
1232
+ for (let r of F.value) {
1233
+ if (!e.has(r.roomId)) continue;
1234
+ let i = t(r.roomId), a = p.cameras.filter((n) => n.roomId !== r.roomId && e.has(n.roomId) && t(n.roomId) === i);
1235
+ a.length && n.push({
1236
+ key: `${r.id}-flight`,
1237
+ label: a.map((e) => e.name).join(", "),
1238
+ x: r.x + r.width / 2,
1239
+ y: r.y + r.height / 2
1240
+ });
1241
+ }
1242
+ return n;
1243
+ }), Be = h(() => {
1244
+ let e = [], t = /* @__PURE__ */ new Map(), n = (n, r, i, a) => {
1245
+ let o = F.value.find((e) => e.id === r) ?? F.value.find((e) => e.roomId === n);
1246
+ if (!o || o.width * N.value < 80 || o.height * N.value < 60) return;
1247
+ let s = t.get(o.id) ?? 0;
1248
+ t.set(o.id, s + 1), e.push({
1249
+ key: i ?? `stairs-${n}`,
1250
+ roomId: n,
1251
+ connectionId: i,
1252
+ direction: a,
1253
+ x: o.x + o.width - (16 + s * 30) / N.value,
1254
+ y: o.y + 16 / N.value
1255
+ });
1256
+ };
1257
+ for (let e of Me.value) e.geometry.kind === "badge" && n(e.geometry.roomId, e.geometry.shapeId, e.connection.id, W(e.connection, e.geometry.roomId));
1258
+ return Ve.value && n(Ve.value.roomId, Ve.value.shapeId, void 0, void 0), e;
1259
+ }), Ve = h(() => {
1260
+ let e = Oe.value;
1261
+ if (!e || P.value) return null;
1262
+ let t = new Set(p.connections.flatMap((e) => [e.fromRoomId, e.toRoomId].join("|")));
1263
+ return p.rooms.some((n) => n.levelId !== e.levelId && !t.has([e.roomId, n.roomId].join("|")) && !t.has([n.roomId, e.roomId].join("|"))) ? {
1264
+ roomId: e.roomId,
1265
+ shapeId: e.id
1266
+ } : null;
1267
+ }), Ue = h(() => {
1268
+ let e = ne.value?.getBoundingClientRect(), t = e?.width ?? 0, n = e?.height ?? 0;
1269
+ return {
1270
+ left: -we.value.x / N.value,
1271
+ top: -we.value.y / N.value,
1272
+ right: (t - we.value.x) / N.value,
1273
+ bottom: (n - we.value.y) / N.value
1274
+ };
1275
+ }), We = h(() => new Set(Ee.value.filter((e) => xe.value.has(e.id)).map((e) => e.roomId)));
1276
+ function Ge(e, t) {
1277
+ switch (t) {
1278
+ case "object":
1279
+ case "classifier": {
1280
+ let t = e.getProperty("labels");
1281
+ return Array.isArray(t) && t.length ? t : ["other"];
1282
+ }
1283
+ case "face": return ["face"];
1284
+ case "licensePlate": return ["license_plate"];
1285
+ case "motion":
1286
+ case "audio": return ["motion"];
1287
+ case "clip":
1288
+ case "objectAssist": return [];
1289
+ default: return ["other"];
1290
+ }
1291
+ }
1292
+ function Ke(e) {
1293
+ return xe.value.get(e)?.level;
1294
+ }
1295
+ function qe(e) {
1296
+ return xe.value.get(e.id)?.labels ?? [];
1297
+ }
1298
+ function Ye(e) {
1299
+ let t = (8 + qe(e).length * 17) / N.value;
1300
+ return {
1301
+ width: t + it(e.name) - 10 / N.value,
1302
+ textOffset: t
1303
+ };
1304
+ }
1305
+ function Xe(e, t) {
1306
+ ce.value = t.id, e.pointerType === "mouse" && S("hover-sensor", {
1307
+ sensorId: t.id,
1308
+ x: e.clientX,
1309
+ y: e.clientY
1310
+ });
1311
+ }
1312
+ function Ze() {
1313
+ ce.value = null, S("hover-sensor", null);
1314
+ }
1315
+ function Qe(e) {
1316
+ return ye.value.find((t) => t.id === e);
1317
+ }
1318
+ function $e(e) {
1319
+ return ue(e.sensorType, k(Qe(e.id)));
1320
+ }
1321
+ function U(e) {
1322
+ let t = me(Qe(e.id));
1323
+ return t ? `${e.name} · ${t}` : e.name;
1324
+ }
1325
+ function W(e, t) {
1326
+ let n = e.fromRoomId === t ? e.toRoomId : e.fromRoomId, r = p.rooms.find((e) => e.roomId === t)?.levelId, i = p.rooms.find((e) => e.roomId === n)?.levelId;
1327
+ if (!r || !i) return;
1328
+ let a = p.levels.findIndex((e) => e.id === r), o = p.levels.findIndex((e) => e.id === i);
1329
+ if (!(a < 0 || o < 0 || a === o)) return o > a ? "↑" : "↓";
1330
+ }
1331
+ function et(e, t) {
1332
+ if (t.connectionId) return xt(e, t.connectionId);
1333
+ S("request-stairs", {
1334
+ roomId: t.roomId,
1335
+ event: e
1336
+ });
1337
+ }
1338
+ function tt(e) {
1339
+ let t = Ne.value.get(e.roomId);
1340
+ return t ? [t] : [];
1341
+ }
1342
+ function G(e) {
1343
+ let t = e.width >= e.height, n = t ? e.width : e.height, r = t ? e.height : e.width, i = 9 / N.value, a = Math.max(Math.min(15, r * .3), i);
1344
+ if (a > r) return null;
1345
+ let o = n - a, s = a * ot, c = e.name;
1346
+ if (s * c.length > o) {
1347
+ let e = Math.floor(o / s) - 1;
1348
+ if (e < 2) return null;
1349
+ c = `${c.slice(0, e)}…`;
1350
+ }
1351
+ return {
1352
+ text: c,
1353
+ size: a,
1354
+ x: e.x + e.width / 2,
1355
+ y: e.y + e.height / 2 + a * .35,
1356
+ upright: t
1357
+ };
1358
+ }
1359
+ function nt(e, t) {
1360
+ e.pointerType === "mouse" && (oe.value = t.id, S("hover-camera", {
1361
+ cameraId: t.id,
1362
+ x: e.clientX,
1363
+ y: e.clientY
1364
+ }));
1365
+ }
1366
+ function rt() {
1367
+ oe.value = null, S("hover-camera", null);
1368
+ }
1369
+ function it(e) {
1370
+ return (e.length * 7 + 20) / N.value;
1371
+ }
1372
+ function at(e, t) {
1373
+ let n = 4 / N.value;
1374
+ return `M ${e - n * 2} ${t + n * 1.5} L ${e - n} ${t + n * 1.5} L ${e - n} ${t} L ${e + n} ${t} L ${e + n} ${t - n * 1.5} L ${e + n * 2} ${t - n * 1.5}`;
1375
+ }
1376
+ function ct(e) {
1377
+ return e * Math.PI / 180;
1378
+ }
1379
+ function J(e, t) {
1380
+ return p.selection?.kind === e && p.selection.id === t;
1381
+ }
1382
+ function dt(e) {
1383
+ let t = ct(e.fov / 2), n = Math.cos(-t) * e.range, r = Math.sin(-t) * e.range, i = Math.cos(t) * e.range, a = Math.sin(t) * e.range, o = +(e.fov > 180);
1384
+ return `M 0 0 L ${n} ${r} A ${e.range} ${e.range} 0 ${o} 1 ${i} ${a} Z`;
1385
+ }
1386
+ function gt(e) {
1387
+ let t = ne.value?.getBoundingClientRect();
1388
+ return t ? {
1389
+ x: (e.clientX - t.left - we.value.x) / N.value,
1390
+ y: (e.clientY - t.top - we.value.y) / N.value
1391
+ } : {
1392
+ x: 0,
1393
+ y: 0
1394
+ };
1395
+ }
1396
+ function Y(e) {
1397
+ return Math.round(e / 10) * 10;
1398
+ }
1399
+ function _t(e, t) {
1400
+ return F.value.some((n) => n.id !== t && e.x < n.x + n.width && e.x + e.width > n.x && e.y < n.y + n.height && e.y + e.height > n.y);
1401
+ }
1402
+ function vt(e, t, n) {
1403
+ let r = 10 / N.value, i = n === "end" ? [e.x + e.width] : [e.x, e.x + e.width], a = n === "end" ? [e.y + e.height] : [e.y, e.y + e.height], o, s;
1404
+ for (let e of F.value) if (e.id !== t) {
1405
+ for (let t of i) for (let n of [e.x, e.x + e.width]) {
1406
+ let e = n - t;
1407
+ Math.abs(e) <= r && (o === void 0 || Math.abs(e) < Math.abs(o)) && (o = e);
1408
+ }
1409
+ for (let t of a) for (let n of [e.y, e.y + e.height]) {
1410
+ let e = n - t;
1411
+ Math.abs(e) <= r && (s === void 0 || Math.abs(e) < Math.abs(s)) && (s = e);
1412
+ }
1413
+ }
1414
+ return D.value = {
1415
+ x: o === void 0 ? null : (n === "end" ? e.x + e.width : e.x) + o,
1416
+ y: s === void 0 ? null : (n === "end" ? e.y + e.height : e.y) + s
1417
+ }, n === "end" ? {
1418
+ ...e,
1419
+ width: e.width + (o ?? 0),
1420
+ height: e.height + (s ?? 0)
1421
+ } : {
1422
+ ...e,
1423
+ x: e.x + (o ?? 0),
1424
+ y: e.y + (s ?? 0)
1425
+ };
1426
+ }
1427
+ function yt(e, t, n) {
1428
+ return Math.min(Math.max(e, t), n);
1429
+ }
1430
+ function X(e, t, n) {
1431
+ let r = R.value.get(e);
1432
+ if (!r?.length || r.some((e) => t >= e.x && t <= e.x + e.width && n >= e.y && n <= e.y + e.height)) return {
1433
+ x: t,
1434
+ y: n
1435
+ };
1436
+ let i = {
1437
+ x: t,
1438
+ y: n
1439
+ }, a = Infinity;
1440
+ for (let e of r) {
1441
+ let r = {
1442
+ x: yt(t, e.x, e.x + e.width),
1443
+ y: yt(n, e.y, e.y + e.height)
1444
+ }, o = Math.hypot(r.x - t, r.y - n);
1445
+ o < a && (a = o, i = r);
1446
+ }
1447
+ return i;
1448
+ }
1449
+ function bt(e) {
1450
+ return Ee.value.filter((t) => t.roomId === e);
1451
+ }
1452
+ function Z(e) {
1453
+ ne.value?.setPointerCapture?.(e.pointerId);
1454
+ }
1455
+ function xt(e, t) {
1456
+ Pt(e, {
1457
+ kind: "connection",
1458
+ id: t
1459
+ });
1460
+ }
1461
+ function St(e, t) {
1462
+ if (Pt(e, {
1463
+ kind: "room",
1464
+ id: t.id
1465
+ }), P.value) return;
1466
+ e.stopPropagation();
1467
+ let n = gt(e);
1468
+ O = {
1469
+ mode: "room",
1470
+ id: t.id,
1471
+ offsetX: n.x - t.x,
1472
+ offsetY: n.y - t.y
1473
+ }, Z(e);
1474
+ }
1475
+ function Ct(e, t) {
1476
+ S("select", {
1477
+ kind: "room",
1478
+ id: t.id
1479
+ }), !P.value && (e.stopPropagation(), le.value = t.id, O = {
1480
+ mode: "resize",
1481
+ id: t.id,
1482
+ originX: t.x,
1483
+ originY: t.y
1484
+ }, Z(e));
1485
+ }
1486
+ function wt(e, t) {
1487
+ if (Pt(e, {
1488
+ kind: "camera",
1489
+ id: t.id
1490
+ }), P.value) return;
1491
+ e.stopPropagation();
1492
+ let n = gt(e);
1493
+ O = {
1494
+ mode: "camera",
1495
+ id: t.id,
1496
+ offsetX: n.x - t.x,
1497
+ offsetY: n.y - t.y
1498
+ }, Z(e);
1499
+ }
1500
+ function Tt(e, t) {
1501
+ S("select", {
1502
+ kind: "camera",
1503
+ id: t.id
1504
+ }), !P.value && (e.stopPropagation(), O = {
1505
+ mode: "rotate",
1506
+ id: t.id
1507
+ }, Z(e));
1508
+ }
1509
+ function Et(e) {
1510
+ if (!O) return;
1511
+ if (O.mode === "north") {
1512
+ let t = ae.value?.getBoundingClientRect();
1513
+ if (!t) return;
1514
+ let n = Math.atan2(e.clientY - (t.top + t.height / 2), e.clientX - (t.left + t.width / 2)) * 180 / Math.PI;
1515
+ S("update-north", Math.round((n + 450) % 360));
1516
+ return;
1517
+ }
1518
+ he || (he = !0, S("history"));
1519
+ let t = gt(e);
1520
+ if (O.mode === "room") {
1521
+ let e = O.id, n = F.value.find((t) => t.id === e);
1522
+ if (!n) return;
1523
+ let r = vt({
1524
+ x: Y(t.x - O.offsetX),
1525
+ y: Y(t.y - O.offsetY),
1526
+ width: n.width,
1527
+ height: n.height
1528
+ }, n.id, "both"), i = _t(n, n.id) ? {
1529
+ x: r.x,
1530
+ y: r.y
1531
+ } : Dt(n, r);
1532
+ i && S("move-room", {
1533
+ id: n.id,
1534
+ x: i.x,
1535
+ y: i.y
1536
+ });
1537
+ return;
1538
+ }
1539
+ if (O.mode === "resize") {
1540
+ let e = O.id, n = F.value.find((t) => t.id === e);
1541
+ if (!n) return;
1542
+ let r = vt({
1543
+ x: n.x,
1544
+ y: n.y,
1545
+ width: Math.max(60, Y(t.x - O.originX)),
1546
+ height: Math.max(60, Y(t.y - O.originY))
1547
+ }, n.id, "end"), i = _t({
1548
+ ...r,
1549
+ height: n.height
1550
+ }, n.id) ? n.width : Math.max(60, r.width), a = _t({
1551
+ ...r,
1552
+ width: i
1553
+ }, n.id) ? n.height : Math.max(60, r.height);
1554
+ S("resize-room", {
1555
+ id: n.id,
1556
+ width: i,
1557
+ height: a
1558
+ });
1559
+ return;
1560
+ }
1561
+ if (O.mode === "passage") {
1562
+ let e = O, n = p.connections.find((t) => t.id === e.id);
1563
+ if (!n) return;
1564
+ let r = pt(e.wall, n.offset, n.width), i = Nt(e.wall, {
1565
+ x: (r.x1 + r.x2) / 2,
1566
+ y: (r.y1 + r.y2) / 2
1567
+ }), a = Nt(e.wall, t);
1568
+ S("move-connection", {
1569
+ id: e.id,
1570
+ offset: Math.round(i + (a - e.grab))
1571
+ }), e.grab = a;
1572
+ return;
1573
+ }
1574
+ if (O.mode === "passage-resize") {
1575
+ let e = O, n = p.connections.find((t) => t.id === e.id);
1576
+ if (!n) return;
1577
+ let r = pt(e.wall, n.offset, n.width), i = Nt(e.wall, e.end === 0 ? {
1578
+ x: r.x2,
1579
+ y: r.y2
1580
+ } : {
1581
+ x: r.x1,
1582
+ y: r.y1
1583
+ }), a = Math.min(Math.max(Nt(e.wall, t), 0), e.wall.length), o = Math.min(Math.max(Math.abs(a - i), q.min), q.max), s = a < i ? i - o : i;
1584
+ S("resize-connection", {
1585
+ id: e.id,
1586
+ offset: Math.round(s + o / 2),
1587
+ width: Math.round(o)
1588
+ });
1589
+ return;
1590
+ }
1591
+ if (O.mode === "sensor") {
1592
+ let e = O.id, n = X(be.value.find((t) => t.id === e)?.roomId ?? "", Y(t.x - O.offsetX), Y(t.y - O.offsetY));
1593
+ S("move-sensor", {
1594
+ id: e,
1595
+ ...n
1596
+ });
1597
+ return;
1598
+ }
1599
+ if (O.mode === "camera") {
1600
+ let e = O.id, n = X(Ee.value.find((t) => t.id === e)?.roomId ?? "", Y(t.x - O.offsetX), Y(t.y - O.offsetY));
1601
+ S("move-camera", {
1602
+ id: e,
1603
+ ...n
1604
+ });
1605
+ return;
1606
+ }
1607
+ let n = O.id, r = Ee.value.find((e) => e.id === n);
1608
+ if (!r) return;
1609
+ let i = t.x - r.x, a = t.y - r.y;
1610
+ S("rotate-camera", {
1611
+ id: n,
1612
+ rotation: Math.round(Math.atan2(a, i) * 180 / Math.PI),
1613
+ range: Math.round(yt(Math.hypot(i, a), K.min, K.max))
1614
+ });
1615
+ }
1616
+ function Dt(e, t) {
1617
+ for (let n of [
1618
+ t,
1619
+ {
1620
+ ...t,
1621
+ y: e.y
1622
+ },
1623
+ {
1624
+ ...t,
1625
+ x: e.x
1626
+ }
1627
+ ]) if (!_t(n, e.id)) return {
1628
+ x: n.x,
1629
+ y: n.y
1630
+ };
1631
+ }
1632
+ function Ot(e) {
1633
+ P.value || (e.stopPropagation(), S("history"), O = { mode: "north" }, ae.value?.setPointerCapture?.(e.pointerId));
1634
+ }
1635
+ function kt(e) {
1636
+ let t = e.dataTransfer?.getData(lt);
1637
+ if (!t || p.readOnly) return;
1638
+ e.preventDefault();
1639
+ let n = JSON.parse(t), r = ne.value?.getBoundingClientRect();
1640
+ r && S("drop", {
1641
+ ...n,
1642
+ x: Y((e.clientX - r.left - we.value.x) / N.value),
1643
+ y: Y((e.clientY - r.top - we.value.y) / N.value)
1644
+ });
1645
+ }
1646
+ function At(e, t) {
1647
+ if (Pt(e, {
1648
+ kind: "sensor",
1649
+ id: t.id
1650
+ }), P.value) return;
1651
+ e.stopPropagation();
1652
+ let n = gt(e);
1653
+ O = {
1654
+ mode: "sensor",
1655
+ id: t.id,
1656
+ offsetX: n.x - t.x,
1657
+ offsetY: n.y - t.y
1658
+ }, Z(e);
1659
+ }
1660
+ function jt(e, t) {
1661
+ Pt(e, {
1662
+ kind: "connection",
1663
+ id: t.id
1664
+ }), !P.value && (e.stopPropagation(), O = {
1665
+ mode: "passage",
1666
+ id: t.id,
1667
+ wall: t.wall,
1668
+ grab: Nt(t.wall, gt(e))
1669
+ }, Z(e));
1670
+ }
1671
+ function Mt(e, t, n) {
1672
+ P.value || (e.stopPropagation(), O = {
1673
+ mode: "passage-resize",
1674
+ id: t.id,
1675
+ wall: t.wall,
1676
+ end: n
1677
+ }, Z(e));
1678
+ }
1679
+ function Nt(e, t) {
1680
+ return (t.x - e.x) * e.stepX + (t.y - e.y) * e.stepY;
1681
+ }
1682
+ function Pt(e, t) {
1683
+ A = {
1684
+ target: t,
1685
+ x: e.clientX,
1686
+ y: e.clientY
1687
+ };
1688
+ }
1689
+ function Ft(e) {
1690
+ le.value = null, A &&= (e && Math.abs(e.clientX - A.x) < 4 && Math.abs(e.clientY - A.y) < 4 && S("select", A.target), null), O?.mode === "room" && he && S("settle-room", O.id), O = null, he = !1, D.value = {
1691
+ x: null,
1692
+ y: null
1693
+ };
1694
+ }
1695
+ function It() {
1696
+ let e = [], t = [];
1697
+ for (let n of F.value) e.push(n.x, n.x + n.width), t.push(n.y, n.y + n.height);
1698
+ for (let n of Ee.value) e.push(n.x - Nr, n.x + Nr), t.push(n.y - Nr, n.y + Nr);
1699
+ if (!e.length) return;
1700
+ let n = Math.min(...e), r = Math.min(...t);
1701
+ ve({
1702
+ x: n,
1703
+ y: r,
1704
+ width: Math.max(Math.max(...e) - n, 1),
1705
+ height: Math.max(Math.max(...t) - r, 1)
1706
+ }, { padding: .15 });
1707
+ }
1708
+ return ee(() => p.levelId, () => o(It)), ie(() => {
1709
+ window.addEventListener("pointerup", Ft), o(It);
1710
+ }), t(() => window.removeEventListener("pointerup", Ft)), l({ fit: It }), (t, o) => {
1711
+ let l = He, f = V, p = Cn, h = _e, ee = bn, te = H, w = E;
1712
+ return r(), _("div", {
1713
+ ref_key: "wrapperRef",
1714
+ ref: ne,
1715
+ class: s(["floorplan-canvas relative w-full h-full overflow-hidden border-left-color border-bottom-color border-right-color rounded-b-xl", { "rounded-none! border-0!": a.mobile }]),
1716
+ onPointermove: Et,
1717
+ onPointerup: Ft,
1718
+ onPointercancel: Ft,
1719
+ onDrop: kt,
1720
+ onDragover: o[14] ||= e(() => {}, ["prevent"]),
1721
+ onDragenter: o[15] ||= e(() => {}, ["prevent"])
1722
+ }, [
1723
+ T(m(Je), {
1724
+ nodes: De,
1725
+ "nodes-draggable": !1,
1726
+ "nodes-connectable": !1,
1727
+ "elements-selectable": !1,
1728
+ "zoom-on-double-click": !1,
1729
+ "min-zoom": m(st).min,
1730
+ "max-zoom": m(st).max,
1731
+ "default-viewport": {
1732
+ x: 0,
1733
+ y: 0,
1734
+ zoom: 1
1735
+ },
1736
+ class: "floorplan-flow",
1737
+ onPaneClick: o[3] ||= (e) => S("select", null)
1738
+ }, {
1739
+ "node-scene": g(() => [(r(), _("svg", {
1740
+ class: "floorplan-scene",
1741
+ style: v({
1742
+ left: `${m(I).x}px`,
1743
+ top: `${m(I).y}px`,
1744
+ width: `${m(I).width}px`,
1745
+ height: `${m(I).height}px`
1746
+ })
1747
+ }, [b("defs", null, [
1748
+ b("pattern", {
1749
+ id: "floorplan-public",
1750
+ width: 14 / m(N),
1751
+ height: 14 / m(N),
1752
+ patternUnits: "userSpaceOnUse",
1753
+ patternTransform: "rotate(45)"
1754
+ }, [b("rect", {
1755
+ width: 14 / m(N),
1756
+ height: 14 / m(N),
1757
+ class: "public-base"
1758
+ }, null, 8, Tn), b("line", {
1759
+ x1: "0",
1760
+ y1: "0",
1761
+ x2: "0",
1762
+ y2: 14 / m(N),
1763
+ class: "public-hatch",
1764
+ "stroke-width": 1.5 / m(N)
1765
+ }, null, 8, En)], 8, wn),
1766
+ (r(!0), _(y, null, n(m(Ie), (e) => (r(), _("clipPath", {
1767
+ id: `floorplan-sight-${e.roomId}`,
1768
+ key: e.roomId
1769
+ }, [b("path", { d: e.path }, null, 8, On)], 8, Dn))), 128)),
1770
+ b("pattern", {
1771
+ id: "floorplan-gaps-hatch",
1772
+ width: 10 / m(N),
1773
+ height: 10 / m(N),
1774
+ patternUnits: "userSpaceOnUse",
1775
+ patternTransform: "rotate(-45)"
1776
+ }, [b("line", {
1777
+ x1: "0",
1778
+ y1: "0",
1779
+ x2: "0",
1780
+ y2: 10 / m(N),
1781
+ class: "gaps-hatch",
1782
+ "stroke-width": 1.5 / m(N)
1783
+ }, null, 8, An)], 8, kn),
1784
+ m(re) ? (r(), _("mask", {
1785
+ key: 0,
1786
+ id: "floorplan-gaps",
1787
+ maskUnits: "userSpaceOnUse",
1788
+ x: m(I).x,
1789
+ y: m(I).y,
1790
+ width: m(I).width,
1791
+ height: m(I).height
1792
+ }, [(r(!0), _(y, null, n(m(Fe), (e) => (r(), _(y, { key: `gap-room-${e.roomId}` }, [e.publicSpace ? d("", !0) : (r(), _("path", {
1793
+ key: 0,
1794
+ d: e.fill,
1795
+ fill: "white"
1796
+ }, null, 8, Mn))], 64))), 128)), (r(!0), _(y, null, n(m(Ie), (e) => (r(), _("g", {
1797
+ key: `gap-sight-${e.roomId}`,
1798
+ "clip-path": `url(#floorplan-sight-${e.roomId})`
1799
+ }, [(r(!0), _(y, null, n(bt(e.roomId), (e) => (r(), _("path", {
1800
+ key: `gap-cone-${e.id}`,
1801
+ d: dt(e),
1802
+ fill: "black",
1803
+ transform: `translate(${e.x} ${e.y}) rotate(${e.rotation})`
1804
+ }, null, 8, Pn))), 128))], 8, Nn))), 128))], 8, jn)) : d("", !0)
1805
+ ]), b("g", { transform: `translate(${-m(I).x} ${-m(I).y})` }, [
1806
+ (r(!0), _(y, null, n(m(Fe), (e) => (r(), _("g", { key: e.roomId }, [b("path", {
1807
+ d: e.fill,
1808
+ class: s(["room", {
1809
+ "room-outdoor": e.outdoor && !e.publicSpace,
1810
+ "room-public": e.publicSpace,
1811
+ "room-active": m(We).has(e.roomId)
1812
+ }])
1813
+ }, null, 10, In), b("path", {
1814
+ d: e.wall,
1815
+ class: s(["room-wall", {
1816
+ "room-selected": e.selected,
1817
+ "room-public-wall": e.publicSpace
1818
+ }]),
1819
+ "stroke-width": (e.selected ? 2.5 : 1.5) / m(N)
1820
+ }, null, 10, Ln)]))), 128)),
1821
+ (r(!0), _(y, null, n(m(Ie), (e) => (r(), _("g", {
1822
+ key: `sight-${e.roomId}`,
1823
+ "clip-path": `url(#floorplan-sight-${e.roomId})`
1824
+ }, [(r(!0), _(y, null, n(bt(e.roomId), (e) => (r(), _("path", {
1825
+ key: e.id,
1826
+ d: dt(e),
1827
+ class: s(["cone", [`cone-${Ke(e.id) ?? "idle"}`, { "cone-selected": J("camera", e.id) }]]),
1828
+ transform: `translate(${e.x} ${e.y}) rotate(${e.rotation})`
1829
+ }, null, 10, zn))), 128))], 8, Rn))), 128)),
1830
+ m(re) ? (r(), _("rect", {
1831
+ key: 0,
1832
+ x: m(I).x,
1833
+ y: m(I).y,
1834
+ width: m(I).width,
1835
+ height: m(I).height,
1836
+ fill: "url(#floorplan-gaps-hatch)",
1837
+ mask: "url(#floorplan-gaps)",
1838
+ class: "gaps-layer"
1839
+ }, null, 8, Bn)) : d("", !0),
1840
+ (r(!0), _(y, null, n(m(Fe), (e) => (r(), _("g", { key: `hits-${e.roomId}` }, [(r(!0), _(y, null, n(e.parts, (e) => (r(), _("rect", {
1841
+ key: e.id,
1842
+ x: e.x,
1843
+ y: e.y,
1844
+ width: e.width,
1845
+ height: e.height,
1846
+ class: s(["room-hit", { nopan: !m(P) }]),
1847
+ onPointerdown: (t) => St(t, e)
1848
+ }, null, 42, Vn))), 128)), (r(!0), _(y, null, n(tt(e), (e) => (r(), _("text", {
1849
+ key: e.text,
1850
+ x: e.x,
1851
+ y: e.y,
1852
+ "font-size": e.size,
1853
+ transform: e.upright ? void 0 : `rotate(-90 ${e.x} ${e.y})`,
1854
+ class: "room-label",
1855
+ "text-anchor": "middle"
1856
+ }, i(e.text), 9, Hn))), 128))]))), 128)),
1857
+ (r(!0), _(y, null, n(m(Le), (e) => (r(), _("g", {
1858
+ key: e.id,
1859
+ class: s({ nopan: !m(P) }),
1860
+ onPointerdown: (t) => jt(t, e)
1861
+ }, [
1862
+ b("path", {
1863
+ d: e.line,
1864
+ class: "connection-hit",
1865
+ "stroke-width": 24 / m(N)
1866
+ }, null, 8, Wn),
1867
+ b("path", {
1868
+ d: e.line,
1869
+ class: s(["connection", [`connection-${e.type}`, { "connection-selected": J("connection", e.id) }]]),
1870
+ "stroke-width": 7 / m(N)
1871
+ }, null, 10, Gn),
1872
+ (r(!0), _(y, null, n(J("connection", e.id) && !m(P) ? e.handles : [], (t, n) => (r(), _("circle", {
1873
+ key: n,
1874
+ cx: t.x,
1875
+ cy: t.y,
1876
+ r: 7 / m(N),
1877
+ class: "passage-handle nopan",
1878
+ "stroke-width": 2 / m(N),
1879
+ onPointerdown: (t) => Mt(t, e, n)
1880
+ }, null, 40, Kn))), 128))
1881
+ ], 42, Un))), 128)),
1882
+ (r(!0), _(y, null, n(m(Me), (e) => (r(), _(y, { key: e.connection.id }, [e.geometry.kind === "link" ? (r(), _("path", {
1883
+ key: 0,
1884
+ d: `M ${e.geometry.x1} ${e.geometry.y1} L ${e.geometry.x2} ${e.geometry.y2}`,
1885
+ class: s(["connection connection-stairs", { "connection-selected": J("connection", e.connection.id) }]),
1886
+ "stroke-width": 2 / m(N),
1887
+ onPointerdown: (t) => xt(t, e.connection.id)
1888
+ }, null, 42, qn)) : d("", !0)], 64))), 128)),
1889
+ (r(!0), _(y, null, n(m(Ee), (e) => (r(), _("g", {
1890
+ key: e.id,
1891
+ class: s({ nopan: !m(P) }),
1892
+ onPointerdown: (t) => wt(t, e),
1893
+ onPointerenter: (t) => nt(t, e),
1894
+ onPointerleave: rt
1895
+ }, [
1896
+ b("circle", {
1897
+ cx: e.x,
1898
+ cy: e.y,
1899
+ r: 13 / m(N),
1900
+ class: s(["camera-body", [`camera-${Ke(e.id) ?? "idle"}`, { "camera-selected": J("camera", e.id) }]]),
1901
+ "stroke-width": 2 / m(N)
1902
+ }, null, 10, Yn),
1903
+ b("circle", {
1904
+ cx: e.x,
1905
+ cy: e.y,
1906
+ r: 4 / m(N),
1907
+ class: "camera-lens"
1908
+ }, null, 8, Xn),
1909
+ m(oe) === e.id || J("camera", e.id) || m(xe).has(e.id) ? (r(), _("g", Zn, [
1910
+ b("rect", {
1911
+ x: e.x - Ye(e).width / 2,
1912
+ y: e.y - 42 / m(N),
1913
+ width: Ye(e).width,
1914
+ height: 20 / m(N),
1915
+ rx: 10 / m(N)
1916
+ }, null, 8, Qn),
1917
+ (r(!0), _(y, null, n(qe(e), (t, n) => (r(), _("foreignObject", {
1918
+ key: t,
1919
+ x: e.x - Ye(e).width / 2 + (8 + n * 17) / m(N),
1920
+ y: e.y - 39.5 / m(N),
1921
+ width: 15 / m(N),
1922
+ height: 15 / m(N),
1923
+ class: "chip-glyph"
1924
+ }, [(r(), u(c(m(Ce)(t).icon), {
1925
+ width: "100%",
1926
+ height: "100%"
1927
+ }))], 8, $n))), 128)),
1928
+ b("text", {
1929
+ x: e.x - Ye(e).width / 2 + Ye(e).textOffset,
1930
+ y: e.y - 28 / m(N),
1931
+ "font-size": 12 / m(N)
1932
+ }, i(e.name), 9, er)
1933
+ ])) : d("", !0)
1934
+ ], 42, Jn))), 128)),
1935
+ (r(!0), _(y, null, n(m(ke) ? m(Re) : [], (t) => (r(), _("g", { key: t.roomId }, [b("circle", {
1936
+ cx: t.x,
1937
+ cy: t.y,
1938
+ r: 11 / m(N),
1939
+ class: "connection-ghost nopan",
1940
+ "stroke-width": 1.5 / m(N),
1941
+ onPointerdown: e((e) => S("create-connection", {
1942
+ fromRoomId: t.fromRoomId,
1943
+ toRoomId: t.roomId,
1944
+ fromShapeId: t.fromShapeId,
1945
+ toShapeId: t.shapeId
1946
+ }), ["stop"])
1947
+ }, null, 40, tr), b("path", {
1948
+ d: `M ${t.x - 5 / m(N)} ${t.y} L ${t.x + 5 / m(N)} ${t.y} M ${t.x} ${t.y - 5 / m(N)} L ${t.x} ${t.y + 5 / m(N)}`,
1949
+ class: "connection-ghost-plus",
1950
+ "stroke-width": 1.5 / m(N)
1951
+ }, null, 8, nr)]))), 128)),
1952
+ (r(!0), _(y, null, n(m(be), (e) => (r(), _("g", {
1953
+ key: `sensor-${e.id}`,
1954
+ class: s({ nopan: !m(P) }),
1955
+ onPointerdown: (t) => At(t, e),
1956
+ onPointerenter: (t) => Xe(t, e),
1957
+ onPointerleave: Ze
1958
+ }, [
1959
+ b("circle", {
1960
+ cx: e.x,
1961
+ cy: e.y,
1962
+ r: 11 / m(N),
1963
+ class: s(["sensor-body", { "sensor-selected": J("sensor", e.id) }]),
1964
+ "stroke-width": 2 / m(N)
1965
+ }, null, 10, ir),
1966
+ (r(), _("foreignObject", {
1967
+ x: e.x - 7 / m(N),
1968
+ y: e.y - 7 / m(N),
1969
+ width: 14 / m(N),
1970
+ height: 14 / m(N),
1971
+ class: "sensor-glyph"
1972
+ }, [(r(), u(c(m(pe)(e.sensorType, Qe(e.id))), {
1973
+ width: "100%",
1974
+ height: "100%",
1975
+ style: v($e(e))
1976
+ }, null, 8, ["style"]))], 8, ar)),
1977
+ m(ce) === e.id || J("sensor", e.id) ? (r(), _("g", or, [b("rect", {
1978
+ x: e.x - it(U(e)) / 2,
1979
+ y: e.y - 42 / m(N),
1980
+ width: it(U(e)),
1981
+ height: 20 / m(N),
1982
+ rx: 10 / m(N)
1983
+ }, null, 8, sr), b("text", {
1984
+ x: e.x,
1985
+ y: e.y - 28 / m(N),
1986
+ "text-anchor": "middle",
1987
+ "font-size": 12 / m(N)
1988
+ }, i(U(e)), 9, cr)])) : d("", !0)
1989
+ ], 42, rr))), 128)),
1990
+ (r(!0), _(y, null, n(m(ze), (e) => (r(), _("g", {
1991
+ key: e.key,
1992
+ class: "flight-camera",
1993
+ onPointerenter: (t) => se.value = e.key,
1994
+ onPointerleave: o[0] ||= (e) => se.value = null
1995
+ }, [
1996
+ b("circle", {
1997
+ cx: e.x,
1998
+ cy: e.y,
1999
+ r: 11 / m(N),
2000
+ class: "flight-camera-body",
2001
+ "stroke-width": 1.5 / m(N)
2002
+ }, null, 8, ur),
2003
+ b("circle", {
2004
+ cx: e.x,
2005
+ cy: e.y,
2006
+ r: 3.5 / m(N),
2007
+ class: "flight-camera-lens"
2008
+ }, null, 8, dr),
2009
+ m(se) === e.key ? (r(), _("g", fr, [b("rect", {
2010
+ x: e.x - it(e.label) / 2,
2011
+ y: e.y - 42 / m(N),
2012
+ width: it(e.label),
2013
+ height: 20 / m(N),
2014
+ rx: 10 / m(N)
2015
+ }, null, 8, pr), b("text", {
2016
+ x: e.x,
2017
+ y: e.y - 28 / m(N),
2018
+ "text-anchor": "middle",
2019
+ "font-size": 12 / m(N)
2020
+ }, i(e.label), 9, mr)])) : d("", !0)
2021
+ ], 40, lr))), 128)),
2022
+ (r(!0), _(y, null, n(m(Be), (e) => (r(), _("g", {
2023
+ key: e.key,
2024
+ class: s({ nopan: !m(P) }),
2025
+ onPointerdown: (t) => et(t, e)
2026
+ }, [
2027
+ b("circle", {
2028
+ cx: e.x,
2029
+ cy: e.y,
2030
+ r: 12 / m(N),
2031
+ class: s([e.connectionId ? "connection-badge" : "connection-ghost", { "connection-selected": e.connectionId && J("connection", e.connectionId) }]),
2032
+ "stroke-width": (e.connectionId ? 2 : 1.5) / m(N)
2033
+ }, null, 10, gr),
2034
+ b("path", {
2035
+ d: at(e.x, e.y),
2036
+ class: "badge-glyph",
2037
+ "stroke-width": 1.5 / m(N),
2038
+ fill: "none",
2039
+ "stroke-linejoin": "round"
2040
+ }, null, 8, _r),
2041
+ e.direction ? (r(), _("text", {
2042
+ key: 0,
2043
+ x: e.x + 13 / m(N),
2044
+ y: e.y - 7 / m(N),
2045
+ class: "badge-direction",
2046
+ "font-size": 12 / m(N)
2047
+ }, i(e.direction), 9, vr)) : d("", !0),
2048
+ m(Se) ? (r(), _("g", yr, [b("rect", {
2049
+ x: m(Se).x - m(Se).width / 2,
2050
+ y: m(Se).y,
2051
+ width: m(Se).width,
2052
+ height: 20 / m(N),
2053
+ rx: 10 / m(N)
2054
+ }, null, 8, br), b("text", {
2055
+ x: m(Se).x,
2056
+ y: m(Se).y + 14 / m(N),
2057
+ "text-anchor": "middle",
2058
+ "font-size": 12 / m(N)
2059
+ }, i(m(Se).text), 9, xr)])) : d("", !0)
2060
+ ], 42, hr))), 128)),
2061
+ m(D).x === null ? d("", !0) : (r(), _("path", {
2062
+ key: 1,
2063
+ d: `M ${m(D).x} ${m(Ue).top} L ${m(D).x} ${m(Ue).bottom}`,
2064
+ class: "guide",
2065
+ "stroke-width": 1 / m(N)
2066
+ }, null, 8, Sr)),
2067
+ m(D).y === null ? d("", !0) : (r(), _("path", {
2068
+ key: 2,
2069
+ d: `M ${m(Ue).left} ${m(D).y} L ${m(Ue).right} ${m(D).y}`,
2070
+ class: "guide",
2071
+ "stroke-width": 1 / m(N)
2072
+ }, null, 8, Cr)),
2073
+ m(Oe) && !m(P) ? (r(), _("rect", {
2074
+ key: 3,
2075
+ x: m(Oe).x + m(Oe).width - 7 / m(N),
2076
+ y: m(Oe).y + m(Oe).height - 7 / m(N),
2077
+ width: 14 / m(N),
2078
+ height: 14 / m(N),
2079
+ rx: 3 / m(N),
2080
+ class: "handle nopan",
2081
+ "stroke-width": 1.5 / m(N),
2082
+ onPointerdown: o[1] ||= (e) => Ct(e, m(Oe))
2083
+ }, null, 40, wr)) : d("", !0),
2084
+ m(L) && !m(P) ? (r(), _("circle", {
2085
+ key: 4,
2086
+ cx: m(L).x + Math.cos(ct(m(L).rotation)) * m(L).range,
2087
+ cy: m(L).y + Math.sin(ct(m(L).rotation)) * m(L).range,
2088
+ r: 9 / m(N),
2089
+ class: "handle nopan",
2090
+ "stroke-width": 1.5 / m(N),
2091
+ onPointerdown: o[2] ||= (e) => Tt(e, m(L))
2092
+ }, null, 40, Tr)) : d("", !0)
2093
+ ], 8, Fn)], 4))]),
2094
+ default: g(() => [T(m(B), {
2095
+ gap: m(16),
2096
+ size: m(1),
2097
+ "pattern-color": "#81818a"
2098
+ }, null, 8, ["gap", "size"])]),
2099
+ _: 1
2100
+ }, 8, ["min-zoom", "max-zoom"]),
2101
+ x((r(), _("div", {
2102
+ ref_key: "compassRef",
2103
+ ref: ae,
2104
+ class: s(["floorplan-compass absolute top-3 right-3", { "cursor-grab active:cursor-grabbing": !m(P) }]),
2105
+ onPointerdown: e(Ot, ["stop"])
2106
+ }, [(r(), _("svg", Er, [o[17] ||= b("circle", {
2107
+ cx: "23",
2108
+ cy: "23",
2109
+ r: "21",
2110
+ class: "compass-ring",
2111
+ "stroke-width": "1"
2112
+ }, null, -1), b("g", { transform: `rotate(${m(Te)} 23 23)` }, [...o[16] ||= [b("path", {
2113
+ d: "M 23 6 L 27 23 L 23 19 L 19 23 Z",
2114
+ class: "compass-needle"
2115
+ }, null, -1), b("text", {
2116
+ x: "23",
2117
+ y: "41",
2118
+ "text-anchor": "middle",
2119
+ class: "compass-label",
2120
+ "font-size": "9"
2121
+ }, "N", -1)]], 8, Dr)]))], 34)), [[
2122
+ w,
2123
+ { value: m(P) ? t.$t("views.floorplan.north_reading", { value: m(Te) }) : t.$t("views.floorplan.north_hint") },
2124
+ void 0,
2125
+ { left: !0 }
2126
+ ]]),
2127
+ b("div", {
2128
+ class: "absolute left-3 flex flex-col gap-2 items-start",
2129
+ style: v({
2130
+ bottom: `${12 + (a.bottomInset ?? 0)}px`,
2131
+ transition: a.bottomInsetDragging ? "none" : "bottom 0.2s ease-in-out"
2132
+ })
2133
+ }, [b("div", Or, [
2134
+ x((r(), _("button", {
2135
+ type: "button",
2136
+ class: "control-button",
2137
+ onPointerdown: o[4] ||= e(() => {}, ["stop"]),
2138
+ onClick: o[5] ||= e((e) => m(M)(), ["stop"])
2139
+ }, [T(l, { class: "w-4 h-4" })], 32)), [[
2140
+ w,
2141
+ { value: t.$t("views.floorplan.zoom_in") },
2142
+ void 0,
2143
+ { right: !0 }
2144
+ ]]),
2145
+ x((r(), _("button", {
2146
+ type: "button",
2147
+ class: "control-button",
2148
+ onPointerdown: o[6] ||= e(() => {}, ["stop"]),
2149
+ onClick: o[7] ||= e((e) => m(ge)(), ["stop"])
2150
+ }, [T(f, { class: "w-4 h-4" })], 32)), [[
2151
+ w,
2152
+ { value: t.$t("views.floorplan.zoom_out") },
2153
+ void 0,
2154
+ { right: !0 }
2155
+ ]]),
2156
+ x((r(), _("button", {
2157
+ type: "button",
2158
+ class: "control-button",
2159
+ onPointerdown: o[8] ||= e(() => {}, ["stop"]),
2160
+ onClick: o[9] ||= e((e) => It(), ["stop"])
2161
+ }, [T(p, { class: "w-4 h-4" })], 32)), [[
2162
+ w,
2163
+ { value: t.$t("views.floorplan.fit") },
2164
+ void 0,
2165
+ { right: !0 }
2166
+ ]]),
2167
+ x((r(), _("button", {
2168
+ type: "button",
2169
+ class: s(["control-button", { "control-active": m(C) }]),
2170
+ onPointerdown: o[10] ||= e(() => {}, ["stop"]),
2171
+ onClick: o[11] ||= e((e) => C.value = !m(C), ["stop"])
2172
+ }, [m(C) ? (r(), u(h, {
2173
+ key: 0,
2174
+ class: "w-4 h-4"
2175
+ })) : (r(), u(ee, {
2176
+ key: 1,
2177
+ class: "w-4 h-4"
2178
+ }))], 34)), [[
2179
+ w,
2180
+ { value: m(C) ? t.$t("views.floorplan.unlock") : t.$t("views.floorplan.lock") },
2181
+ void 0,
2182
+ { right: !0 }
2183
+ ]]),
2184
+ x((r(), _("button", {
2185
+ type: "button",
2186
+ class: s(["control-button", { "control-active": m(re) }]),
2187
+ onPointerdown: o[12] ||= e(() => {}, ["stop"]),
2188
+ onClick: o[13] ||= e((e) => re.value = !m(re), ["stop"])
2189
+ }, [T(te, { class: "w-4 h-4" })], 34)), [[
2190
+ w,
2191
+ { value: t.$t("views.floorplan.blind_spots") },
2192
+ void 0,
2193
+ { right: !0 }
2194
+ ]])
2195
+ ]), b("div", kr, [(r(), _("svg", {
2196
+ width: m(je).width,
2197
+ height: "10",
2198
+ class: "shrink-0"
2199
+ }, [b("path", {
2200
+ d: `M 1 1 L 1 9 M 1 5 L ${m(je).width - 1} 5 M ${m(je).width - 1} 1 L ${m(je).width - 1} 9`,
2201
+ class: "scale-line",
2202
+ "stroke-width": "1"
2203
+ }, null, 8, jr)], 8, Ar)), b("span", Mr, i(m(je).label), 1)])], 4)
2204
+ ], 34);
2205
+ };
2206
+ }
2207
+ }), [["__scopeId", "data-v-27e461bb"]]), Fr = {
2208
+ viewBox: "0 0 24 24",
2209
+ width: "1.2em",
2210
+ height: "1.2em"
2211
+ };
2212
+ function Ir(e, t) {
2213
+ return r(), _("svg", Fr, [...t[0] ||= [b("path", {
2214
+ fill: "currentColor",
2215
+ d: "M13 19c0-.3 0-.7.1-1H8v-2H6V8h2V6h8v2h2v5.1c.3-.1.7-.1 1-.1s.7 0 1 .1V8h2V2h-6v2H8V2H2v6h2v8H2v6h6v-2h5.1c-.1-.3-.1-.7-.1-1m5-15h2v2h-2zM4 4h2v2H4zm2 16H4v-2h2zm14-5v3h3v2h-3v3h-2v-3h-3v-2h3v-3z"
2216
+ }, null, -1)]]);
2217
+ }
2218
+ var Lr = l({
2219
+ name: "mdi-vector-square-plus",
2220
+ render: Ir
2221
+ }), Rr = {
2222
+ key: 0,
2223
+ class: "text-xs font-semibold text-muted uppercase tracking-wider mb-3"
2224
+ }, zr = { class: "mb-4" }, Br = { class: "text-xs font-medium text-muted mb-2" }, Vr = ["draggable"], Hr = { class: "flex items-center gap-2.5 flex-1 min-w-0 px-3 py-2.5" }, Ur = { class: "flex items-center justify-center w-8 h-8 rounded-lg shrink-0 palette-icon" }, Wr = { class: "text-[13px] font-medium truncate text-color leading-tight" }, Gr = {
2225
+ key: 0,
2226
+ class: "flex flex-col gap-1.5 mt-1.5"
2227
+ }, Kr = [
2228
+ "draggable",
2229
+ "onDragstart",
2230
+ "onClick"
2231
+ ], qr = { class: "flex items-center gap-2.5 flex-1 min-w-0 px-3 py-2.5" }, Jr = { class: "flex items-center justify-center w-8 h-8 rounded-lg shrink-0 palette-icon" }, Yr = { class: "text-[13px] font-medium truncate text-color leading-tight" }, Xr = { class: "mb-4" }, Zr = { class: "text-xs font-medium text-muted mb-2" }, Qr = {
2232
+ key: 0,
2233
+ class: "text-xs text-muted px-1"
2234
+ }, $r = {
2235
+ key: 1,
2236
+ class: "flex flex-col gap-1.5"
2237
+ }, ei = [
2238
+ "draggable",
2239
+ "onDragstart",
2240
+ "onClick"
2241
+ ], ti = { class: "flex items-center gap-2.5 flex-1 min-w-0 px-3 py-2.5" }, ni = { class: "flex items-center justify-center w-8 h-8 rounded-lg shrink-0 palette-icon" }, ri = { class: "text-[13px] font-medium truncate text-color leading-tight" }, ii = { class: "text-xs font-medium text-muted mb-2" }, ai = {
2242
+ key: 0,
2243
+ class: "text-xs text-muted px-1"
2244
+ }, oi = {
2245
+ key: 1,
2246
+ class: "flex flex-col gap-1.5"
2247
+ }, si = [
2248
+ "draggable",
2249
+ "onDragstart",
2250
+ "onClick"
2251
+ ], ci = { class: "flex items-center gap-2.5 flex-1 min-w-0 px-3 py-2.5" }, li = { class: "flex items-center justify-center w-8 h-8 rounded-lg shrink-0 palette-icon" }, ui = { class: "flex flex-col min-w-0" }, di = { class: "text-[13px] font-medium truncate text-color leading-tight" }, fi = {
2252
+ key: 0,
2253
+ class: "text-[11px] text-muted truncate leading-tight"
2254
+ }, pi = /*#__PURE__*/ De(/* @__PURE__ */ C({
2255
+ __name: "CuiFloorplanPalette",
2256
+ props: {
2257
+ cameras: {},
2258
+ sensors: {},
2259
+ rooms: {},
2260
+ mode: { default: "drag" },
2261
+ disabled: { type: Boolean }
2262
+ },
2263
+ emits: ["pick"],
2264
+ setup(e, { emit: t }) {
2265
+ let a = e, o = t;
2266
+ function l(e, t, n, r, i) {
2267
+ !a.disabled && e.dataTransfer && (e.dataTransfer.setData(lt, JSON.stringify({
2268
+ kind: t,
2269
+ cameraId: n,
2270
+ roomId: r,
2271
+ sensorId: i?.id,
2272
+ sensorType: i?.sensorType
2273
+ })), e.dataTransfer.effectAllowed = "move");
2274
+ }
2275
+ return (t, a) => {
2276
+ let f = ae, p = nt, h = Lr, ee = Ve, v = E;
2277
+ return r(), _("div", { class: s(["overflow-y-auto p-3", e.mode === "drag" ? "h-full" : ""]) }, [
2278
+ e.mode === "drag" ? (r(), _("div", Rr, i(t.$t("views.floorplan.palette")), 1)) : d("", !0),
2279
+ e.disabled ? (r(), u(f, {
2280
+ key: 1,
2281
+ severity: "secondary",
2282
+ variant: "simple",
2283
+ size: "small",
2284
+ class: "cui-input-hint mb-3"
2285
+ }, {
2286
+ default: g(() => [S(i(t.$t("views.floorplan.needs_level")), 1)]),
2287
+ _: 1
2288
+ })) : d("", !0),
2289
+ b("div", zr, [
2290
+ b("div", Br, i(t.$t("views.floorplan.section_room")), 1),
2291
+ b("div", {
2292
+ class: s(["floorplan-palette-item", [e.mode === "drag" ? "cursor-grab active:cursor-grabbing" : "cursor-pointer", { "palette-disabled": e.disabled }]]),
2293
+ draggable: e.mode === "drag" && !e.disabled,
2294
+ onDragstart: a[0] ||= (e) => l(e, "room"),
2295
+ onClick: a[1] ||= (t) => !e.disabled && o("pick", { kind: "room" })
2296
+ }, [b("div", Hr, [b("div", Ur, [T(p, { class: "w-4 h-4" })]), b("span", Wr, i(t.$t("views.floorplan.new_room")), 1)])], 42, Vr),
2297
+ e.rooms.length ? (r(), _("div", Gr, [(r(!0), _(y, null, n(e.rooms, (n) => x((r(), _("div", {
2298
+ key: n.id,
2299
+ class: s(["floorplan-palette-item", [e.mode === "drag" ? "cursor-grab active:cursor-grabbing" : "cursor-pointer", { "palette-disabled": e.disabled }]]),
2300
+ draggable: e.mode === "drag" && !e.disabled,
2301
+ onDragstart: (e) => l(e, "room", void 0, n.id),
2302
+ onClick: (t) => !e.disabled && o("pick", {
2303
+ kind: "room",
2304
+ roomId: n.id
2305
+ })
2306
+ }, [b("div", qr, [b("div", Jr, [T(h, { class: "w-4 h-4" })]), b("span", Yr, i(n.name), 1)])], 42, Kr)), [[
2307
+ v,
2308
+ { value: t.$t("views.floorplan.room_not_drawn") },
2309
+ void 0,
2310
+ { right: !0 }
2311
+ ]])), 128))])) : d("", !0)
2312
+ ]),
2313
+ b("div", Xr, [b("div", Zr, i(t.$t("views.floorplan.section_cameras")), 1), e.cameras.length ? (r(), _("div", $r, [(r(!0), _(y, null, n(e.cameras, (t) => (r(), _("div", {
2314
+ key: t.id,
2315
+ class: s(["floorplan-palette-item", [e.mode === "drag" ? "cursor-grab active:cursor-grabbing" : "cursor-pointer", { "palette-disabled": e.disabled }]]),
2316
+ draggable: e.mode === "drag" && !e.disabled,
2317
+ onDragstart: (e) => l(e, "camera", t.id),
2318
+ onClick: (n) => !e.disabled && o("pick", {
2319
+ kind: "camera",
2320
+ cameraId: t.id
2321
+ })
2322
+ }, [b("div", ti, [b("div", ni, [T(ee, { class: "w-4 h-4" })]), b("span", ri, i(t.name), 1)])], 42, ei))), 128))])) : (r(), _("span", Qr, i(t.$t("views.floorplan.all_cameras_placed")), 1))]),
2323
+ b("div", null, [b("div", ii, i(t.$t("views.floorplan.section_sensors")), 1), e.sensors.length ? (r(), _("div", oi, [(r(!0), _(y, null, n(e.sensors, (t) => (r(), _("div", {
2324
+ key: t.id,
2325
+ class: s(["floorplan-palette-item", [e.mode === "drag" ? "cursor-grab active:cursor-grabbing" : "cursor-pointer", { "palette-disabled": e.disabled }]]),
2326
+ draggable: e.mode === "drag" && !e.disabled,
2327
+ onDragstart: (e) => l(e, "sensor", void 0, void 0, t),
2328
+ onClick: (n) => !e.disabled && o("pick", {
2329
+ kind: "sensor",
2330
+ sensorId: t.id,
2331
+ sensorType: t.sensorType
2332
+ })
2333
+ }, [b("div", ci, [b("div", li, [(r(), u(c(m(pe)(t.sensorType, void 0)), { class: "w-4 h-4" }))]), b("div", ui, [b("span", di, i(t.name), 1), t.subtitle ? (r(), _("span", fi, i(t.subtitle), 1)) : d("", !0)])])], 42, si))), 128))])) : (r(), _("span", ai, i(t.$t("views.floorplan.all_sensors_placed")), 1))])
2334
+ ], 2);
2335
+ };
2336
+ }
2337
+ }), [["__scopeId", "data-v-531420ee"]]), mi = {
2338
+ viewBox: "0 0 24 24",
2339
+ width: "1.2em",
2340
+ height: "1.2em"
2341
+ };
2342
+ function hi(e, t) {
2343
+ return r(), _("svg", mi, [...t[0] ||= [b("path", {
2344
+ fill: "currentColor",
2345
+ d: "m12 18.54l7.37-5.74L21 14.07l-9 7l-9-7l1.62-1.26zM12 16L3 9l9-7l9 7zm0-11.47L6.26 9L12 13.47L17.74 9z"
2346
+ }, null, -1)]]);
2347
+ }
2348
+ var gi = l({
2349
+ name: "mdi-layers-outline",
2350
+ render: hi
2351
+ }), _i = {
2352
+ viewBox: "0 0 24 24",
2353
+ width: "1.2em",
2354
+ height: "1.2em"
2355
+ };
2356
+ function vi(e, t) {
2357
+ return r(), _("svg", _i, [...t[0] ||= [b("path", {
2358
+ fill: "currentColor",
2359
+ d: "M15 5v4h-4v4H7v4H3v3h7v-4h4v-4h4V8h4V5z"
2360
+ }, null, -1)]]);
2361
+ }
2362
+ var yi = l({
2363
+ name: "mdi-stairs",
2364
+ render: vi
2365
+ });
2366
+ //#endregion
2367
+ //#region src/api/routes/floorplan.ts
2368
+ async function bi({ signal: e } = {}) {
2369
+ return (await j.get("/floorplan", { signal: e })).data;
2370
+ }
2371
+ async function xi(e) {
2372
+ return (await j.put("/floorplan", e)).data;
2373
+ }
2374
+ //#endregion
2375
+ //#region src/components/CuiDialog/templates/FloorplanLevel/FloorplanLevel.vue?vue&type=script&setup=true&lang.ts
2376
+ var Si = { class: "flex flex-col gap-2 w-full" }, Ci = {
2377
+ for: "floorplanLevelName",
2378
+ class: "cui-label"
2379
+ }, wi = /* @__PURE__ */ C({
2380
+ __name: "FloorplanLevel",
2381
+ props: { name: { default: "" } },
2382
+ setup(e, { expose: t }) {
2383
+ let n = w(e.name);
2384
+ return t({ onConfirm: async () => n.value.trim() || null }), (e, t) => {
2385
+ let a = je;
2386
+ return r(), _("div", Si, [b("label", Ci, i(e.$t("components.form.label.name")), 1), T(a, {
2387
+ id: "floorplanLevelName",
2388
+ modelValue: m(n),
2389
+ "onUpdate:modelValue": t[0] ||= (e) => p(n) ? n.value = e : null,
2390
+ class: "w-full",
2391
+ placeholder: e.$t("views.floorplan.level_name_placeholder"),
2392
+ autofocus: ""
2393
+ }, null, 8, ["modelValue", "placeholder"])]);
2394
+ };
2395
+ }
2396
+ }), Ti = re({ plan: null }), Ei = null, Di = null, Oi = /* @__PURE__ */ new Set();
2397
+ function ki() {
2398
+ Di || (Ei = f(!0), Ei.run(() => {
2399
+ let e = Ee("/camera.ui");
2400
+ Di = e, e.on("floorplan-changed", (e) => {
2401
+ Ti.plan = e;
2402
+ for (let t of Oi) try {
2403
+ t(e);
2404
+ } catch {}
2405
+ });
2406
+ }));
2407
+ }
2408
+ function Ai() {
2409
+ function e() {
2410
+ ki();
2411
+ }
2412
+ function t(e) {
2413
+ return Oi.add(e), () => Oi.delete(e);
2414
+ }
2415
+ return {
2416
+ plan: h(() => Ti.plan),
2417
+ connect: e,
2418
+ onPlan: t
2419
+ };
2420
+ }
2421
+ //#endregion
2422
+ //#region src/views/Floorplan.vue?vue&type=script&setup=true&lang.ts
2423
+ var ji = { class: "h-full w-full relative overflow-hidden flex flex-col" }, Mi = { class: "flex items-center gap-2 px-3 py-2 border-bottom-color card-background min-h-[48px]" }, Ni = {
2424
+ key: 0,
2425
+ class: "flex-1 flex items-center justify-center"
2426
+ }, Pi = {
2427
+ key: 1,
2428
+ class: "flex flex-1 min-h-0"
2429
+ }, Fi = { class: "relative w-6 h-6" }, Ii = { class: "flex items-center gap-2.5" }, Li = { class: "flex items-center justify-center w-8 h-8 rounded-lg shrink-0 palette-icon" }, Ri = { class: "flex-1 min-w-0" }, zi = { class: "text-sm font-semibold truncate text-color" }, Bi = {
2430
+ key: 0,
2431
+ class: "text-[11px] text-muted truncate"
2432
+ }, Vi = { class: "text-xs text-muted truncate" }, Hi = {
2433
+ key: 0,
2434
+ class: "text-xs text-muted"
2435
+ }, Ui = {
2436
+ key: 1,
2437
+ class: "flex flex-col gap-1"
2438
+ }, Wi = { class: "flex items-center justify-center" }, Gi = {
2439
+ key: 0,
2440
+ class: "flex items-center gap-2 pl-3 pr-2 py-1.5"
2441
+ }, Ki = { class: "flex-1 min-w-0 text-sm font-semibold truncate text-color" }, qi = 50, Ji = 92, Yi = /*#__PURE__*/ De(/* @__PURE__ */ C({
2442
+ __name: "Floorplan",
2443
+ setup(e) {
2444
+ let { t: f } = Oe(), { smBreakpoint: S } = he(), { bottombarHeight: C } = xe(), re = ve(), ae = M(), ue = se(), me = Ai(), k = new P(), { sensors: j } = Ae(), { data: _e } = k.getCamerasQuery({
2445
+ page: 1,
2446
+ pageSize: -1
2447
+ }), Ce = w(), F = w(), Ee = w(null), De = w(null), je = w({
2448
+ x: 0,
2449
+ y: 0
2450
+ }), Me = w(null), R = w({
2451
+ x: 0,
2452
+ y: 0
2453
+ }), Pe = w(), Fe = w(null), Ie = w({
2454
+ x: 0,
2455
+ y: 0
2456
+ }), Le = w(), ze = w(null), Ve = w(null), Je = w({
2457
+ version: 0,
2458
+ updatedAt: 0,
2459
+ levels: [],
2460
+ rooms: []
2461
+ }), z = w([]), B = w([]), V = w([]), H = w([]), U = w([]), W = w(""), tt = w(null), G = w(null), nt = w(!1), rt = w(!0), it = w(!1), at = w(""), ot = te("sheetRef"), st = w(0), K = w(0), ct = w(!1), q = ne([]), lt = ne([]), J = [
2462
+ {
2463
+ value: L.Disarmed,
2464
+ labelKey: "views.floorplan.security_disarmed"
2465
+ },
2466
+ {
2467
+ value: L.StayArm,
2468
+ labelKey: "views.floorplan.security_stay"
2469
+ },
2470
+ {
2471
+ value: L.AwayArm,
2472
+ labelKey: "views.floorplan.security_away"
2473
+ },
2474
+ {
2475
+ value: L.NightArm,
2476
+ labelKey: "views.floorplan.security_night"
2477
+ }
2478
+ ], ut = 0, dt = !1, mt, ht, gt, Y = I(void 0, "admin"), _t = h(() => Math.max(st.value - Ji, 0)), vt = h(() => q.value.length > 0), yt = h(() => lt.value.length > 0), X = h(() => (_e.value?.result ?? []).find((e) => e._id === Ve.value)), bt = h(() => z.value.find((e) => e.id === W.value)), Z = h(() => Ft() !== at.value), xt = h(() => new Map((_e.value?.result ?? []).map((e) => [e._id, e.name]))), St = h(() => j.value.filter((e) => oe.has(String(e.type)))), Ct = h(() => new Map(St.value.map((e) => [e.id, {
2479
+ name: Nt(e),
2480
+ owner: Pt(e)
2481
+ }]))), wt = h(() => {
2482
+ let e = new Set(U.value.map((e) => e.id));
2483
+ return St.value.filter((t) => !e.has(t.id)).map((e) => ({
2484
+ id: e.id,
2485
+ name: Nt(e),
2486
+ subtitle: Pt(e),
2487
+ sensorType: String(e.type)
2488
+ }));
2489
+ }), Tt = h(() => {
2490
+ let e = new Set(B.value.map((e) => e.roomId));
2491
+ return Je.value.rooms.filter((t) => !e.has(t.id)).map((e) => ({
2492
+ id: e.id,
2493
+ name: e.name
2494
+ }));
2495
+ }), Et = h(() => {
2496
+ let e = new Set(H.value.map((e) => e.id));
2497
+ return (_e.value?.result ?? []).filter((t) => !e.has(t._id)).map((e) => ({
2498
+ id: e._id,
2499
+ name: e.name
2500
+ }));
2501
+ }), Dt = h(() => S.value || !G.value ? void 0 : "calc(300px + 1.25rem + var(--safe-area-inset-right))"), Ot = h(() => z.value.findIndex((e) => e.id === W.value)), kt = h(() => [...z.value].reverse().map((e) => ({
2502
+ key: e.id,
2503
+ label: e.name,
2504
+ icon: l(gi),
2505
+ active: e.id === W.value,
2506
+ onClick: () => W.value = e.id
2507
+ }))), At = h(() => [
2508
+ {
2509
+ label: f("views.floorplan.undo"),
2510
+ icon: Qe,
2511
+ buttonProps: { disabled: !vt.value },
2512
+ command: zt
2513
+ },
2514
+ {
2515
+ label: f("views.floorplan.redo"),
2516
+ icon: Xe,
2517
+ buttonProps: { disabled: !yt.value },
2518
+ command: Bt
2519
+ },
2520
+ {
2521
+ label: f("views.floorplan.clear_level"),
2522
+ icon: Ze,
2523
+ buttonProps: { disabled: !z.value.length },
2524
+ command: Mn
2525
+ },
2526
+ {
2527
+ label: f("views.floorplan.revert"),
2528
+ icon: Ue,
2529
+ buttonProps: { disabled: !Z.value },
2530
+ command: In
2531
+ }
2532
+ ]), jt = h(() => {
2533
+ let e = B.value.find((e) => e.roomId === Ee.value);
2534
+ if (!e) return [];
2535
+ let t = new Set(V.value.flatMap((e) => [e.fromRoomId, e.toRoomId].join("|"))), n = /* @__PURE__ */ new Set();
2536
+ return B.value.filter((r) => r.levelId === e.levelId || n.has(r.roomId) || t.has([e.roomId, r.roomId].join("|")) || t.has([r.roomId, e.roomId].join("|")) ? !1 : (n.add(r.roomId), !0)).map((t) => ({
2537
+ key: t.roomId,
2538
+ label: t.name,
2539
+ description: z.value.find((e) => e.id === t.levelId)?.name,
2540
+ icon: l(yi),
2541
+ onClick: () => mn({
2542
+ fromRoomId: e.roomId,
2543
+ toRoomId: t.roomId
2544
+ })
2545
+ }));
2546
+ }), Mt = h(() => {
2547
+ let e = B.value.filter((e) => e.levelId === W.value);
2548
+ if (!e.length) return {
2549
+ x: 0,
2550
+ y: 0
2551
+ };
2552
+ let t = Math.min(...e.map((e) => e.x)), n = Math.min(...e.map((e) => e.y)), r = Math.max(...e.map((e) => e.x + e.width)), i = Math.max(...e.map((e) => e.y + e.height));
2553
+ return {
2554
+ x: Math.round((t + r) / 2),
2555
+ y: Math.round((n + i) / 2)
2556
+ };
2557
+ });
2558
+ function Nt(e) {
2559
+ return e.displayName.value || e.name;
2560
+ }
2561
+ function Pt(e) {
2562
+ return e.assignedCameraIds.value.map((e) => xt.value.get(e)).filter(Boolean).join(", ");
2563
+ }
2564
+ function Ft() {
2565
+ return JSON.stringify(It());
2566
+ }
2567
+ function It() {
2568
+ return {
2569
+ catalogVersion: Je.value.version,
2570
+ north: tt.value,
2571
+ levels: z.value.map((e, t) => ({
2572
+ id: e.id,
2573
+ name: e.name,
2574
+ order: t
2575
+ })),
2576
+ rooms: B.value.map((e) => ({
2577
+ id: e.id,
2578
+ roomId: e.roomId,
2579
+ name: e.name,
2580
+ note: e.note,
2581
+ publicSpace: e.publicSpace,
2582
+ levelId: e.levelId,
2583
+ outdoor: e.outdoor,
2584
+ x: e.x,
2585
+ y: e.y,
2586
+ width: e.width,
2587
+ height: e.height
2588
+ })),
2589
+ connections: V.value.map((e) => ({ ...e })),
2590
+ sensors: U.value.map((e) => ({
2591
+ sensorId: e.id,
2592
+ sensorType: e.sensorType,
2593
+ roomId: e.roomId,
2594
+ connectionId: e.connectionId,
2595
+ note: e.note,
2596
+ x: e.x,
2597
+ y: e.y
2598
+ })),
2599
+ cameras: H.value.map((e) => ({
2600
+ cameraId: e.id,
2601
+ roomId: e.roomId,
2602
+ note: e.note,
2603
+ x: e.x,
2604
+ y: e.y,
2605
+ rotation: e.rotation,
2606
+ fov: e.fov,
2607
+ range: e.range
2608
+ }))
2609
+ };
2610
+ }
2611
+ function Lt(e) {
2612
+ tt.value = e.north, z.value = e.levels.map((e) => ({
2613
+ id: e.id,
2614
+ name: e.name
2615
+ })), B.value = e.rooms.map((e) => ({ ...e }));
2616
+ let t = new Map(B.value.map((e) => [e.roomId, e.levelId]));
2617
+ V.value = e.connections.map((e) => Ht({ ...e })), H.value = e.cameras.map((e) => ({
2618
+ id: e.cameraId,
2619
+ name: xt.value.get(e.cameraId) ?? e.cameraId,
2620
+ levelId: t.get(e.roomId) ?? "",
2621
+ roomId: e.roomId,
2622
+ note: e.note ?? "",
2623
+ x: e.x,
2624
+ y: e.y,
2625
+ rotation: e.rotation,
2626
+ fov: e.fov,
2627
+ range: e.range
2628
+ })), U.value = e.sensors.map((e) => ({
2629
+ id: e.sensorId,
2630
+ name: Ct.value.get(e.sensorId)?.name ?? e.sensorId,
2631
+ owner: Ct.value.get(e.sensorId)?.owner ?? "",
2632
+ sensorType: e.sensorType,
2633
+ levelId: t.get(e.roomId) ?? "",
2634
+ roomId: e.roomId,
2635
+ connectionId: e.connectionId,
2636
+ note: e.note ?? "",
2637
+ x: e.x,
2638
+ y: e.y
2639
+ })), z.value.some((e) => e.id === W.value) || (W.value = z.value[0]?.id ?? ""), G.value = null;
2640
+ }
2641
+ function Rt(e, t) {
2642
+ Je.value = t;
2643
+ let n = new Map(t.rooms.map((e) => [e.id, e]));
2644
+ Lt({
2645
+ catalogVersion: t.version,
2646
+ north: e.north,
2647
+ levels: [...t.levels].sort((e, t) => e.order - t.order),
2648
+ rooms: e.rooms.flatMap((e) => {
2649
+ let t = n.get(e.roomId);
2650
+ return t?.levelId ? [{
2651
+ id: e.id,
2652
+ roomId: t.id,
2653
+ name: t.name,
2654
+ note: t.note ?? "",
2655
+ levelId: t.levelId,
2656
+ outdoor: t.outdoor,
2657
+ publicSpace: t.publicSpace ?? !1,
2658
+ x: e.x,
2659
+ y: e.y,
2660
+ width: e.width,
2661
+ height: e.height
2662
+ }] : [];
2663
+ }),
2664
+ connections: e.connections,
2665
+ cameras: e.cameras,
2666
+ sensors: e.sensors ?? []
2667
+ }), at.value = Ft(), q.value = [], lt.value = [];
2668
+ }
2669
+ function Q(e = !1) {
2670
+ let t = Date.now();
2671
+ if (e && t - ut < 600) return;
2672
+ ut = t;
2673
+ let n = [...q.value, Ft()];
2674
+ n.length > qi && n.shift(), q.value = n, lt.value = [];
2675
+ }
2676
+ function zt() {
2677
+ let e = [...q.value], t = e.pop();
2678
+ t && (lt.value = [...lt.value, Ft()], q.value = e, ut = 0, Lt(JSON.parse(t)));
2679
+ }
2680
+ function Bt() {
2681
+ let e = [...lt.value], t = e.pop();
2682
+ t && (q.value = [...q.value, Ft()], lt.value = e, ut = 0, Lt(JSON.parse(t)));
2683
+ }
2684
+ function Vt(e) {
2685
+ return B.value.find((t) => t.id === e);
2686
+ }
2687
+ function Ht(e) {
2688
+ if (e.width ||= 90, e.offset ??= null, e.note ??= "", e.fromShapeId && e.toShapeId) return e;
2689
+ let t = B.value.filter((t) => t.roomId === e.fromRoomId), n = B.value.filter((t) => t.roomId === e.toRoomId);
2690
+ for (let r of t) for (let t of n) if (ft(r, t)) return {
2691
+ ...e,
2692
+ fromShapeId: r.id,
2693
+ toShapeId: t.id
2694
+ };
2695
+ return {
2696
+ ...e,
2697
+ fromShapeId: t[0]?.id ?? null,
2698
+ toShapeId: n[0]?.id ?? null
2699
+ };
2700
+ }
2701
+ function Ut(e) {
2702
+ return B.value.filter((t) => t.roomId === e);
2703
+ }
2704
+ function Wt(e) {
2705
+ let t = Vt(e);
2706
+ if (!t) return;
2707
+ let n = Ut(t.roomId).filter((e) => e.id !== t.id);
2708
+ if (!n.length || n.some((e) => ft(t, e))) return;
2709
+ let r = new Set(B.value.map((e) => e.name.toLowerCase())), i = t.name;
2710
+ for (let e = 2; r.has(i.toLowerCase()); e++) i = `${t.name} ${e}`;
2711
+ let a = Te();
2712
+ for (let e of H.value) e.roomId === t.roomId && yn(t, e) && (e.roomId = a);
2713
+ Object.assign(t, {
2714
+ roomId: a,
2715
+ name: i
2716
+ }), ae.add({
2717
+ severity: "info",
2718
+ detail: f("views.floorplan.room_detached", { name: i }),
2719
+ life: 4e3
2720
+ });
2721
+ }
2722
+ function Gt(e, t) {
2723
+ let n = Ut(t)[0];
2724
+ if (!n) return;
2725
+ let r = e.roomId;
2726
+ Object.assign(e, {
2727
+ roomId: t,
2728
+ name: n.name,
2729
+ note: n.note,
2730
+ levelId: n.levelId,
2731
+ outdoor: n.outdoor,
2732
+ publicSpace: n.publicSpace
2733
+ });
2734
+ for (let n of H.value) n.roomId === r && yn(e, n) && (n.roomId = t);
2735
+ Ut(r).length || (H.value = H.value.filter((e) => e.roomId !== r), V.value = V.value.filter((e) => e.fromRoomId !== r && e.toRoomId !== r));
2736
+ }
2737
+ function Kt(e) {
2738
+ return H.value.find((t) => t.id === e);
2739
+ }
2740
+ function qt({ id: e, x: t, y: n }) {
2741
+ let r = Vt(e);
2742
+ if (!r) return;
2743
+ let i = t - r.x, a = n - r.y;
2744
+ r.x = t, r.y = n;
2745
+ for (let e of H.value) e.roomId === r.roomId && yn(r, e) && (e.x += i, e.y += a);
2746
+ }
2747
+ function Jt({ id: e, width: t, height: n }) {
2748
+ let r = Vt(e);
2749
+ if (r) {
2750
+ r.width = t, r.height = n;
2751
+ for (let e of H.value) e.roomId === r.id && (e.x = Math.min(Math.max(e.x, r.x), r.x + r.width), e.y = Math.min(Math.max(e.y, r.y), r.y + r.height));
2752
+ }
2753
+ }
2754
+ function Yt({ id: e, x: t, y: n }) {
2755
+ let r = Kt(e);
2756
+ r && (r.x = t, r.y = n);
2757
+ }
2758
+ function Xt({ id: e, rotation: t, range: n }) {
2759
+ let r = Kt(e);
2760
+ r && (r.rotation = t, r.range = n);
2761
+ }
2762
+ function Zt({ id: e, patch: t }) {
2763
+ Q(!0);
2764
+ let n = Vt(e);
2765
+ if (!n) return;
2766
+ if (t.roomId && t.roomId !== n.roomId) {
2767
+ Gt(n, t.roomId);
2768
+ return;
2769
+ }
2770
+ let r = {
2771
+ name: t.name,
2772
+ note: t.note,
2773
+ levelId: t.levelId,
2774
+ outdoor: t.outdoor,
2775
+ publicSpace: t.publicSpace
2776
+ }, i = Object.fromEntries(Object.entries(r).filter(([, e]) => e !== void 0));
2777
+ if (Object.assign(n, t), Object.keys(i).length) {
2778
+ for (let e of Ut(n.roomId)) Object.assign(e, i);
2779
+ if (t.levelId) for (let e of H.value) e.roomId === n.roomId && (e.levelId = t.levelId);
2780
+ }
2781
+ }
2782
+ function Qt({ id: e, patch: t }) {
2783
+ Q(!0);
2784
+ let n = Kt(e);
2785
+ if (n && (Object.assign(n, t), t.roomId)) {
2786
+ let e = Ut(t.roomId), r = e.find((e) => yn(e, n)) ?? e[0];
2787
+ r && !yn(r, n) && (n.x = Math.round(r.x + r.width / 2), n.y = Math.round(r.y + r.height / 2), n.levelId = r.levelId);
2788
+ }
2789
+ }
2790
+ function $t({ id: e, x: t, y: n }) {
2791
+ let r = U.value.find((t) => t.id === e);
2792
+ r && Object.assign(r, {
2793
+ x: t,
2794
+ y: n
2795
+ });
2796
+ }
2797
+ function en({ id: e, patch: t }) {
2798
+ Q(!0);
2799
+ let n = U.value.find((t) => t.id === e);
2800
+ n && Object.assign(n, t);
2801
+ }
2802
+ let $ = h(() => U.value.find((e) => e.id === ze.value));
2803
+ function tn(e) {
2804
+ return j.value.find((t) => t.id === e);
2805
+ }
2806
+ function nn(e) {
2807
+ return Y && !Se.has(e);
2808
+ }
2809
+ async function rn(e) {
2810
+ Y && await A(tn(e));
2811
+ }
2812
+ async function an(e, t) {
2813
+ Y && await O(tn(e), t);
2814
+ }
2815
+ function on() {
2816
+ clearTimeout(ht);
2817
+ }
2818
+ function sn() {
2819
+ clearTimeout(ht), ht = setTimeout(() => {
2820
+ ze.value = null, Le.value?.hide();
2821
+ }, 220);
2822
+ }
2823
+ function cn(e) {
2824
+ if (!e) return sn();
2825
+ on(), ze.value = e.sensorId, Ie.value = {
2826
+ x: e.x,
2827
+ y: e.y
2828
+ }, o(() => {
2829
+ Fe.value && Le.value?.show({ currentTarget: Fe.value });
2830
+ });
2831
+ }
2832
+ function ln(e) {
2833
+ if (clearTimeout(mt), !e) {
2834
+ dn();
2835
+ return;
2836
+ }
2837
+ R.value = {
2838
+ x: e.x,
2839
+ y: e.y
2840
+ }, Ve.value = e.cameraId, mt = setTimeout(() => {
2841
+ Me.value && Pe.value?.show({ currentTarget: Me.value });
2842
+ }, 350);
2843
+ }
2844
+ function un() {
2845
+ clearTimeout(mt);
2846
+ }
2847
+ function dn() {
2848
+ mt = setTimeout(() => {
2849
+ Pe.value?.hide(), Ve.value = null;
2850
+ }, 200);
2851
+ }
2852
+ function fn({ roomId: e, event: t }) {
2853
+ Ee.value = e, je.value = {
2854
+ x: t.clientX,
2855
+ y: t.clientY
2856
+ }, o(() => F.value?.toggleMenu(t, De.value));
2857
+ }
2858
+ function pn({ id: e, patch: t }) {
2859
+ Q(!0);
2860
+ let n = V.value.find((t) => t.id === e);
2861
+ n && Object.assign(n, t);
2862
+ }
2863
+ function mn({ fromRoomId: e, toRoomId: t, fromShapeId: n, toShapeId: r }) {
2864
+ Q();
2865
+ let i = B.value.find((e) => e.id === n) ?? Ut(e)[0], a = B.value.find((e) => e.id === r) ?? Ut(t)[0], o = i && a ? ft(i, a) : null, s = {
2866
+ id: Te(),
2867
+ fromRoomId: e,
2868
+ toRoomId: t,
2869
+ fromShapeId: i?.id ?? null,
2870
+ toShapeId: a?.id ?? null,
2871
+ offset: o ? hn(o, i?.id, a?.id) : null,
2872
+ width: 90,
2873
+ note: "",
2874
+ type: i && a && i.levelId !== a.levelId ? "stairs" : "door"
2875
+ };
2876
+ V.value.push(s), G.value = {
2877
+ kind: "connection",
2878
+ id: s.id
2879
+ };
2880
+ }
2881
+ function hn(e, t, n) {
2882
+ let r = V.value.filter((e) => e.fromShapeId === t && e.toShapeId === n).map((t) => pt(e, t.offset, t.width)).map((t) => {
2883
+ let n = (t.x1 - e.x) * e.stepX + (t.y1 - e.y) * e.stepY, r = (t.x2 - e.x) * e.stepX + (t.y2 - e.y) * e.stepY;
2884
+ return {
2885
+ start: Math.min(n, r),
2886
+ end: Math.max(n, r)
2887
+ };
2888
+ }).sort((e, t) => e.start - t.start), i = Math.min(90, e.length) / 2, a = 0;
2889
+ for (let e of r) {
2890
+ if (e.start - a >= i * 2) break;
2891
+ a = Math.max(a, e.end);
2892
+ }
2893
+ return Math.round(Math.min(Math.max(a + i, i), e.length - i));
2894
+ }
2895
+ function gn({ id: e, offset: t }) {
2896
+ Q(!0);
2897
+ let n = V.value.find((t) => t.id === e);
2898
+ n && (n.offset = t);
2899
+ }
2900
+ function vn({ id: e, offset: t, width: n }) {
2901
+ Q(!0);
2902
+ let r = V.value.find((t) => t.id === e);
2903
+ r && Object.assign(r, {
2904
+ offset: t,
2905
+ width: n
2906
+ });
2907
+ }
2908
+ function yn(e, t) {
2909
+ return t.x >= e.x && t.x <= e.x + e.width && t.y >= e.y && t.y <= e.y + e.height;
2910
+ }
2911
+ function bn(e) {
2912
+ if (Q(), e.kind === "room") {
2913
+ let t = Vt(e.id);
2914
+ if (!t) return;
2915
+ B.value = B.value.filter((t) => t.id !== e.id), H.value = H.value.filter((e) => e.roomId !== t.roomId || !yn(t, e)), Ut(t.roomId).length || (H.value = H.value.filter((e) => e.roomId !== t.roomId), V.value = V.value.filter((e) => e.fromRoomId !== t.roomId && e.toRoomId !== t.roomId));
2916
+ } else e.kind === "connection" ? V.value = V.value.filter((t) => t.id !== e.id) : e.kind === "sensor" ? U.value = U.value.filter((t) => t.id !== e.id) : H.value = H.value.filter((t) => t.id !== e.id);
2917
+ G.value = null;
2918
+ }
2919
+ function xn(e, t, n) {
2920
+ Q();
2921
+ let r = Sn(Math.round(e - 120), Math.round(t - 100), 240, 200), i = n ? Je.value.rooms.find((e) => e.id === n) : void 0, a = {
2922
+ id: Te(),
2923
+ roomId: i?.id ?? Te(),
2924
+ name: i?.name ?? f("views.floorplan.new_room"),
2925
+ note: i?.note ?? "",
2926
+ publicSpace: i?.publicSpace ?? !1,
2927
+ levelId: W.value,
2928
+ outdoor: i?.outdoor ?? !1,
2929
+ x: r.x,
2930
+ y: r.y,
2931
+ width: 240,
2932
+ height: 200
2933
+ };
2934
+ B.value.push(a), G.value = {
2935
+ kind: "room",
2936
+ id: a.id
2937
+ };
2938
+ }
2939
+ function Sn(e, t, n, r) {
2940
+ let i = B.value.filter((e) => e.levelId === W.value), a = (e, t) => i.some((i) => e < i.x + i.width && e + n > i.x && t < i.y + i.height && t + r > i.y);
2941
+ if (!a(e, t)) return {
2942
+ x: e,
2943
+ y: t
2944
+ };
2945
+ for (let i = 1; i <= 12; i++) for (let [o, s] of [
2946
+ [1, 0],
2947
+ [0, 1],
2948
+ [-1, 0],
2949
+ [0, -1],
2950
+ [1, 1],
2951
+ [-1, 1],
2952
+ [1, -1],
2953
+ [-1, -1]
2954
+ ]) {
2955
+ let c = e + o * i * (n + 20), l = t + s * i * (r + 20);
2956
+ if (!a(c, l)) return {
2957
+ x: c,
2958
+ y: l
2959
+ };
2960
+ }
2961
+ return {
2962
+ x: e,
2963
+ y: t
2964
+ };
2965
+ }
2966
+ function Cn(e, t, n) {
2967
+ let r = B.value.find((e) => e.levelId === W.value && t >= e.x && t <= e.x + e.width && n >= e.y && n <= e.y + e.height);
2968
+ if (!r) return;
2969
+ Q();
2970
+ let i = {
2971
+ id: e,
2972
+ name: xt.value.get(e) ?? e,
2973
+ levelId: W.value,
2974
+ roomId: r.roomId,
2975
+ note: "",
2976
+ x: Math.round(t),
2977
+ y: Math.round(n),
2978
+ rotation: 0,
2979
+ fov: 90,
2980
+ range: 800
2981
+ };
2982
+ H.value.push(i), G.value = {
2983
+ kind: "camera",
2984
+ id: i.id
2985
+ };
2986
+ }
2987
+ function wn(e, t, n, r) {
2988
+ let i = B.value.find((e) => e.levelId === W.value && n >= e.x && n <= e.x + e.width && r >= e.y && r <= e.y + e.height);
2989
+ if (!i) return;
2990
+ Q();
2991
+ let a = {
2992
+ id: e,
2993
+ name: Ct.value.get(e)?.name ?? e,
2994
+ owner: Ct.value.get(e)?.owner ?? "",
2995
+ sensorType: t,
2996
+ levelId: W.value,
2997
+ roomId: i.roomId,
2998
+ connectionId: null,
2999
+ note: "",
3000
+ x: Math.round(n),
3001
+ y: Math.round(r)
3002
+ };
3003
+ U.value.push(a), G.value = {
3004
+ kind: "sensor",
3005
+ id: a.id
3006
+ };
3007
+ }
3008
+ function Tn({ kind: e, cameraId: t, sensorId: n, sensorType: r, roomId: i, x: a, y: o }) {
3009
+ z.value.length && (e === "room" ? xn(a, o, i) : e === "sensor" && n && r ? wn(n, r, a, o) : t && Cn(t, a, o));
3010
+ }
3011
+ function En(e) {
3012
+ Tn({
3013
+ ...e,
3014
+ x: Mt.value.x,
3015
+ y: Mt.value.y
3016
+ });
3017
+ }
3018
+ function Dn(e) {
3019
+ nt.value = !1, En(e);
3020
+ }
3021
+ function On() {
3022
+ re.openComponentDialog(wi, {
3023
+ data: {
3024
+ title: f("views.floorplan.add_level"),
3025
+ confirmText: f("components.form.button.add"),
3026
+ contentProps: {}
3027
+ },
3028
+ onConfirm: (e) => {
3029
+ if (!e) return;
3030
+ Q();
3031
+ let t = {
3032
+ id: Te(),
3033
+ name: e
3034
+ };
3035
+ z.value.push(t), W.value = t.id, G.value = null;
3036
+ }
3037
+ });
3038
+ }
3039
+ function kn() {
3040
+ let e = bt.value;
3041
+ e && re.openComponentDialog(wi, {
3042
+ data: {
3043
+ title: f("views.floorplan.rename_level"),
3044
+ confirmText: f("components.form.button.save"),
3045
+ contentProps: { name: e.name }
3046
+ },
3047
+ onConfirm: (t) => {
3048
+ t && (Q(), e.name = t);
3049
+ }
3050
+ });
3051
+ }
3052
+ function An() {
3053
+ if (!bt.value) return;
3054
+ Q();
3055
+ let e = W.value, t = new Set(B.value.filter((t) => t.levelId === e).map((e) => e.id));
3056
+ z.value = z.value.filter((t) => t.id !== e), B.value = B.value.filter((t) => t.levelId !== e), H.value = H.value.filter((t) => t.levelId !== e), V.value = V.value.filter((e) => !t.has(e.fromRoomId) && !t.has(e.toRoomId)), W.value = z.value[0]?.id ?? "", G.value = null;
3057
+ }
3058
+ function jn(e) {
3059
+ let t = Ot.value, n = t + e;
3060
+ if (t < 0 || n < 0 || n >= z.value.length) return;
3061
+ Q();
3062
+ let r = [...z.value];
3063
+ [r[t], r[n]] = [r[n], r[t]], z.value = r;
3064
+ }
3065
+ function Mn() {
3066
+ Q();
3067
+ let e = new Set(B.value.filter((e) => e.levelId === W.value).map((e) => e.id));
3068
+ B.value = B.value.filter((e) => e.levelId !== W.value), H.value = H.value.filter((e) => e.levelId !== W.value), V.value = V.value.filter((t) => !e.has(t.fromRoomId) && !e.has(t.toRoomId)), G.value = null;
3069
+ }
3070
+ async function Nn() {
3071
+ it.value = !0;
3072
+ try {
3073
+ Rt(await xi(It()), await $e()), await Pn(), ae.add({
3074
+ severity: "success",
3075
+ detail: f("views.floorplan.saved"),
3076
+ life: 3e3
3077
+ });
3078
+ } catch (e) {
3079
+ ae.add({
3080
+ severity: "error",
3081
+ detail: we(e),
3082
+ life: 5e3
3083
+ });
3084
+ } finally {
3085
+ it.value = !1;
3086
+ }
3087
+ }
3088
+ async function Pn() {
3089
+ await Promise.all([
3090
+ k.queryClient.refetchQueries({ queryKey: ["camerasList"] }),
3091
+ k.queryClient.refetchQueries({ queryKey: ["cameras"] }),
3092
+ k.queryClient.refetchQueries({
3093
+ queryKey: ["rooms"],
3094
+ exact: !0
3095
+ })
3096
+ ]);
3097
+ }
3098
+ async function Fn() {
3099
+ try {
3100
+ let [e, t] = await Promise.all([bi(), $e()]);
3101
+ Rt(e, t);
3102
+ } catch (e) {
3103
+ ae.add({
3104
+ severity: "error",
3105
+ detail: we(e),
3106
+ life: 5e3
3107
+ });
3108
+ } finally {
3109
+ rt.value = !1;
3110
+ }
3111
+ }
3112
+ async function In() {
3113
+ await Fn();
3114
+ }
3115
+ function Ln(e) {
3116
+ if (!Y) return;
3117
+ let t = e.target;
3118
+ if (t?.isContentEditable || [
3119
+ "INPUT",
3120
+ "TEXTAREA",
3121
+ "SELECT"
3122
+ ].includes(t?.tagName ?? "")) return;
3123
+ let n = e.metaKey || e.ctrlKey;
3124
+ if (n && e.key.toLowerCase() === "z") {
3125
+ e.preventDefault(), e.shiftKey ? Bt() : zt();
3126
+ return;
3127
+ }
3128
+ if (n && e.key.toLowerCase() === "y") {
3129
+ e.preventDefault(), Bt();
3130
+ return;
3131
+ }
3132
+ (e.key === "Delete" || e.key === "Backspace") && G.value && (e.preventDefault(), bn(G.value));
3133
+ }
3134
+ let Rn = me.onPlan(async (e) => {
3135
+ Z.value || (Rt(e, await $e()), await Pn());
3136
+ });
3137
+ function zn(e) {
3138
+ let t = e.clientY, n = K.value, r = !1;
3139
+ ct.value = !0, e.currentTarget.setPointerCapture(e.pointerId);
3140
+ let i = (e) => {
3141
+ Math.abs(e.clientY - t) > 3 && (r = !0), K.value = Math.min(Math.max(n + (e.clientY - t), 0), _t.value);
3142
+ }, a = () => {
3143
+ window.removeEventListener("pointermove", i), window.removeEventListener("pointerup", a), window.removeEventListener("pointercancel", a), ct.value = !1, r ? K.value = K.value > _t.value * .35 ? _t.value : 0 : K.value = n > 0 ? 0 : _t.value;
3144
+ };
3145
+ window.addEventListener("pointermove", i), window.addEventListener("pointerup", a), window.addEventListener("pointercancel", a);
3146
+ }
3147
+ return ee(xt, (e) => {
3148
+ for (let t of H.value) t.name = e.get(t.id) ?? t.id;
3149
+ }), ee(Ct, (e) => {
3150
+ for (let t of U.value) t.name = e.get(t.id)?.name ?? t.id, t.owner = e.get(t.id)?.owner ?? "";
3151
+ }), ee(ot, (e) => {
3152
+ if (gt?.disconnect(), !e) {
3153
+ st.value = 0;
3154
+ return;
3155
+ }
3156
+ gt = new ResizeObserver(([e]) => st.value = Math.round(e.contentRect.height)), gt.observe(e);
3157
+ }), ee(() => G.value && `${G.value.kind}:${G.value.id}`, () => K.value = 0), ie(() => {
3158
+ me.connect(), window.addEventListener("keydown", Ln), Fn();
3159
+ }), fe((e) => !Z.value || dt ? !0 : (re.openTextDialog({
3160
+ data: {
3161
+ title: f("views.floorplan.unsaved_title"),
3162
+ contentText: f("views.floorplan.unsaved_message"),
3163
+ confirmText: f("views.floorplan.discard")
3164
+ },
3165
+ onConfirm: async () => {
3166
+ dt = !0, ue.push(e.fullPath);
3167
+ }
3168
+ }), !1)), t(() => {
3169
+ clearTimeout(mt), clearTimeout(ht), Rn(), gt?.disconnect(), window.removeEventListener("keydown", Ln);
3170
+ }), (e, t) => {
3171
+ let o = Ke, l = ke, f = de, h = gi, ee = D, te = qe, ne = Ne, w = Ge, re = We, ie = He, ae = ge, oe = pi, se = Pr, ue = _n, fe = Re, O = Ye, me = Be, he = ye, k = N, A = et, j = ce, M = E;
3172
+ return r(), _("div", ji, [
3173
+ T(f, { position: "left" }, {
3174
+ default: g(() => [T(l, {
3175
+ severity: "secondary",
3176
+ text: "",
3177
+ class: "cui-button p-2 text-color non-draggable-region",
3178
+ onClick: t[0] ||= (t) => e.$router.push("/menu")
3179
+ }, {
3180
+ icon: g(() => [T(o, { class: "w-6 h-6" })]),
3181
+ _: 1
3182
+ })]),
3183
+ _: 1
3184
+ }),
3185
+ b("div", Mi, [
3186
+ T(l, {
3187
+ severity: "secondary",
3188
+ text: "",
3189
+ class: "cui-button-medium shrink-0",
3190
+ label: m(bt)?.name ?? e.$t("views.floorplan.no_levels"),
3191
+ disabled: !m(z).length,
3192
+ onClick: t[1] ||= (e) => m(Ce)?.toggleMenu(e)
3193
+ }, {
3194
+ icon: g(() => [T(h)]),
3195
+ _: 1
3196
+ }, 8, ["label", "disabled"]),
3197
+ t[13] ||= b("div", { class: "flex-1" }, null, -1),
3198
+ m(Y) ? (r(), _(y, { key: 0 }, [
3199
+ x((r(), u(l, {
3200
+ severity: "secondary",
3201
+ text: "",
3202
+ rounded: "",
3203
+ class: "cui-icon-md shrink-0",
3204
+ disabled: m(Ot) < 1,
3205
+ onClick: t[2] ||= (e) => jn(-1)
3206
+ }, {
3207
+ icon: g(() => [T(ee, {
3208
+ width: "100%",
3209
+ height: "100%"
3210
+ })]),
3211
+ _: 1
3212
+ }, 8, ["disabled"])), [[
3213
+ M,
3214
+ { value: e.$t("views.floorplan.level_down") },
3215
+ void 0,
3216
+ { bottom: !0 }
3217
+ ]]),
3218
+ x((r(), u(l, {
3219
+ severity: "secondary",
3220
+ text: "",
3221
+ rounded: "",
3222
+ class: "cui-icon-md shrink-0",
3223
+ disabled: m(Ot) < 0 || m(Ot) >= m(z).length - 1,
3224
+ onClick: t[3] ||= (e) => jn(1)
3225
+ }, {
3226
+ icon: g(() => [T(te, {
3227
+ width: "100%",
3228
+ height: "100%"
3229
+ })]),
3230
+ _: 1
3231
+ }, 8, ["disabled"])), [[
3232
+ M,
3233
+ { value: e.$t("views.floorplan.level_up") },
3234
+ void 0,
3235
+ { bottom: !0 }
3236
+ ]]),
3237
+ T(ne, {
3238
+ layout: "vertical",
3239
+ class: "floorplan-divider"
3240
+ }),
3241
+ x((r(), u(l, {
3242
+ severity: "secondary",
3243
+ text: "",
3244
+ rounded: "",
3245
+ class: "cui-icon-md shrink-0",
3246
+ disabled: !m(z).length,
3247
+ onClick: An
3248
+ }, {
3249
+ icon: g(() => [T(w, {
3250
+ width: "100%",
3251
+ height: "100%"
3252
+ })]),
3253
+ _: 1
3254
+ }, 8, ["disabled"])), [[
3255
+ M,
3256
+ { value: e.$t("views.floorplan.remove_level") },
3257
+ void 0,
3258
+ { bottom: !0 }
3259
+ ]]),
3260
+ x((r(), u(l, {
3261
+ severity: "secondary",
3262
+ text: "",
3263
+ rounded: "",
3264
+ class: "cui-icon-md shrink-0",
3265
+ disabled: !m(z).length,
3266
+ onClick: kn
3267
+ }, {
3268
+ icon: g(() => [T(re, {
3269
+ width: "100%",
3270
+ height: "100%"
3271
+ })]),
3272
+ _: 1
3273
+ }, 8, ["disabled"])), [[
3274
+ M,
3275
+ { value: e.$t("views.floorplan.rename_level") },
3276
+ void 0,
3277
+ { bottom: !0 }
3278
+ ]]),
3279
+ x((r(), u(l, {
3280
+ severity: "secondary",
3281
+ text: "",
3282
+ rounded: "",
3283
+ class: "cui-icon-md shrink-0",
3284
+ onClick: On
3285
+ }, {
3286
+ icon: g(() => [T(ie, {
3287
+ width: "100%",
3288
+ height: "100%"
3289
+ })]),
3290
+ _: 1
3291
+ })), [[
3292
+ M,
3293
+ { value: e.$t("views.floorplan.add_level") },
3294
+ void 0,
3295
+ { bottom: !0 }
3296
+ ]])
3297
+ ], 64)) : d("", !0)
3298
+ ]),
3299
+ m(rt) ? (r(), _("div", Ni, [T(ae, {
3300
+ class: "w-[30px] h-[30px] m-0",
3301
+ "stroke-width": "5"
3302
+ })])) : (r(), _("div", Pi, [
3303
+ m(Y) && !m(S) ? (r(), u(oe, {
3304
+ key: 0,
3305
+ cameras: m(Et),
3306
+ sensors: m(wt),
3307
+ rooms: m(Tt),
3308
+ disabled: !m(z).length,
3309
+ class: "w-[240px] shrink-0",
3310
+ onPick: En
3311
+ }, null, 8, [
3312
+ "cameras",
3313
+ "sensors",
3314
+ "rooms",
3315
+ "disabled"
3316
+ ])) : d("", !0),
3317
+ T(se, {
3318
+ mobile: m(S),
3319
+ "bottom-inset": m(S) && m(G) ? Math.max(m(st) - m(K), 0) : 0,
3320
+ "bottom-inset-dragging": m(ct),
3321
+ levels: m(z),
3322
+ rooms: m(B),
3323
+ connections: m(V),
3324
+ cameras: m(H),
3325
+ sensors: m(U),
3326
+ "level-id": m(W),
3327
+ selection: m(G),
3328
+ "read-only": !m(Y),
3329
+ north: m(tt),
3330
+ class: "flex-1 min-w-0",
3331
+ onSelect: t[4] ||= (e) => G.value = e,
3332
+ onHistory: t[5] ||= (e) => Q(),
3333
+ onCreateConnection: mn,
3334
+ onDrop: Tn,
3335
+ onUpdateNorth: t[6] ||= (e) => tt.value = e,
3336
+ onRequestStairs: fn,
3337
+ onHoverCamera: ln,
3338
+ onMoveRoom: qt,
3339
+ onResizeRoom: Jt,
3340
+ onSettleRoom: Wt,
3341
+ onMoveCamera: Yt,
3342
+ onMoveSensor: $t,
3343
+ onHoverSensor: cn,
3344
+ onRotateCamera: Xt,
3345
+ onMoveConnection: gn,
3346
+ onResizeConnection: vn
3347
+ }, null, 8, [
3348
+ "mobile",
3349
+ "bottom-inset",
3350
+ "bottom-inset-dragging",
3351
+ "levels",
3352
+ "rooms",
3353
+ "connections",
3354
+ "cameras",
3355
+ "sensors",
3356
+ "level-id",
3357
+ "selection",
3358
+ "read-only",
3359
+ "north"
3360
+ ]),
3361
+ m(S) ? d("", !0) : (r(), _("div", {
3362
+ key: 1,
3363
+ class: "shrink-0 overflow-hidden transition-[width] duration-200 ease-in-out",
3364
+ style: v({ width: m(G) ? "300px" : "0px" })
3365
+ }, [m(G) ? (r(), u(ue, {
3366
+ key: 0,
3367
+ rooms: m(B),
3368
+ connections: m(V),
3369
+ cameras: m(H),
3370
+ sensors: m(U),
3371
+ levels: m(z),
3372
+ selection: m(G),
3373
+ "read-only": !m(Y),
3374
+ class: "w-[300px]",
3375
+ onClose: t[7] ||= (e) => G.value = null,
3376
+ onUpdateRoom: Zt,
3377
+ onUpdateCamera: Qt,
3378
+ onUpdateSensor: en,
3379
+ onUpdateConnection: pn,
3380
+ onRemove: bn
3381
+ }, null, 8, [
3382
+ "rooms",
3383
+ "connections",
3384
+ "cameras",
3385
+ "sensors",
3386
+ "levels",
3387
+ "selection",
3388
+ "read-only"
3389
+ ])) : d("", !0)], 4))
3390
+ ])),
3391
+ m(S) && m(G) ? (r(), _("div", {
3392
+ key: 2,
3393
+ ref_key: "sheetRef",
3394
+ ref: ot,
3395
+ class: "fixed inset-x-0 z-[16] rounded-t-xl overflow-hidden shadow-lg border-top-color card-background",
3396
+ style: v({
3397
+ bottom: `calc(${m(C)}px + var(--safe-area-inset-bottom))`,
3398
+ transform: `translateY(${m(K)}px)`,
3399
+ transition: m(ct) ? "none" : "transform 0.2s ease-in-out"
3400
+ })
3401
+ }, [b("div", {
3402
+ class: "flex justify-center py-2 cursor-grab active:cursor-grabbing sheet-grip",
3403
+ onPointerdown: zn
3404
+ }, [...t[14] ||= [b("div", { class: "w-10 h-1 rounded-full sheet-grip-bar" }, null, -1)]], 32), T(ue, {
3405
+ rooms: m(B),
3406
+ connections: m(V),
3407
+ cameras: m(H),
3408
+ sensors: m(U),
3409
+ levels: m(z),
3410
+ selection: m(G),
3411
+ "read-only": !m(Y),
3412
+ fluid: "",
3413
+ class: "max-h-[55vh]",
3414
+ onClose: t[8] ||= (e) => G.value = null,
3415
+ onUpdateRoom: Zt,
3416
+ onUpdateCamera: Qt,
3417
+ onUpdateSensor: en,
3418
+ onUpdateConnection: pn,
3419
+ onRemove: bn
3420
+ }, null, 8, [
3421
+ "rooms",
3422
+ "connections",
3423
+ "cameras",
3424
+ "sensors",
3425
+ "levels",
3426
+ "selection",
3427
+ "read-only"
3428
+ ])], 4)) : d("", !0),
3429
+ m(Y) && !m(rt) ? (r(), u(fe, {
3430
+ key: 3,
3431
+ model: m(At),
3432
+ direction: "up",
3433
+ "transition-delay": 80,
3434
+ "tooltip-options": {
3435
+ position: "left",
3436
+ event: void 0
3437
+ },
3438
+ style: v({
3439
+ position: "fixed",
3440
+ zIndex: 15,
3441
+ bottom: `calc(${m(C)}px + ${m(Z) ? "4.25rem" : "1.25rem"} + var(--safe-area-inset-bottom))`,
3442
+ right: m(Dt) || "calc(1.25rem + var(--safe-area-inset-right))",
3443
+ transition: "right 0.2s ease-in-out, bottom 0.2s ease-in-out"
3444
+ }),
3445
+ pt: { root: { style: "pointer-events: none" } }
3446
+ }, {
3447
+ button: g(({ visible: e, toggleCallback: t }) => [T(l, {
3448
+ rounded: "",
3449
+ severity: "secondary",
3450
+ class: "pointer-events-auto",
3451
+ onClick: t
3452
+ }, {
3453
+ icon: g(() => [b("div", Fi, [
3454
+ b("div", {
3455
+ class: s(["absolute top-0.5 left-1/2 -translate-x-1/2 w-1.5 h-1.5 rounded-full transform transition-all duration-100 origin-center", { "w-4 h-[2px] rotate-45 top-1/2 -translate-y-1/2 rounded-none": e }]),
3456
+ style: { backgroundColor: "var(--text-color)" }
3457
+ }, null, 2),
3458
+ b("div", {
3459
+ class: s(["absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 w-1.5 h-1.5 rounded-full transition-all duration-100", { "opacity-0 scale-0": e }]),
3460
+ style: { backgroundColor: "var(--text-color)" }
3461
+ }, null, 2),
3462
+ b("div", {
3463
+ class: s(["absolute bottom-0.5 left-1/2 -translate-x-1/2 w-1.5 h-1.5 rounded-full transform transition-all duration-100 origin-center", { "w-4 h-[2px] -rotate-45 bottom-1/2 translate-y-1/2 rounded-none": e }]),
3464
+ style: { backgroundColor: "var(--text-color)" }
3465
+ }, null, 2)
3466
+ ])]),
3467
+ _: 2
3468
+ }, 1032, ["onClick"])]),
3469
+ item: g(({ item: e, toggleCallback: t }) => [x((r(), u(l, a({ severity: "secondary" }, e.buttonProps, {
3470
+ rounded: "",
3471
+ class: "pointer-events-auto",
3472
+ onClick: t
3473
+ }), {
3474
+ icon: g(() => [(r(), u(c(e.icon)))]),
3475
+ _: 2
3476
+ }, 1040, ["onClick"])), [[M, { value: e.label }]])]),
3477
+ _: 1
3478
+ }, 8, ["model", "style"])) : d("", !0),
3479
+ m(Y) && m(Z) ? x((r(), u(l, {
3480
+ key: 4,
3481
+ rounded: "",
3482
+ severity: "success",
3483
+ class: "text-white",
3484
+ loading: m(it),
3485
+ style: v({
3486
+ position: "fixed",
3487
+ zIndex: 15,
3488
+ bottom: `calc(${m(C)}px + ${Math.max(m(st) - m(K), 0)}px + 1.25rem + var(--safe-area-inset-bottom))`,
3489
+ right: m(Dt) || "calc(1.25rem + var(--safe-area-inset-right))",
3490
+ transition: m(ct) ? "right 0.2s ease-in-out" : "right 0.2s ease-in-out, bottom 0.2s ease-in-out"
3491
+ }),
3492
+ onClick: Nn
3493
+ }, {
3494
+ icon: g(() => [T(O, { class: "w-5 h-5" })]),
3495
+ _: 1
3496
+ }, 8, ["loading", "style"])), [[M, { value: e.$t("views.floorplan.save") }]]) : d("", !0),
3497
+ m(Y) && m(S) && !m(rt) ? x((r(), u(l, {
3498
+ key: 5,
3499
+ rounded: "",
3500
+ class: "pointer-events-auto text-white",
3501
+ style: v({
3502
+ position: "fixed",
3503
+ zIndex: 15,
3504
+ bottom: `calc(${m(C)}px + 1.25rem + var(--safe-area-inset-bottom))`,
3505
+ right: "calc(4.75rem + var(--safe-area-inset-right))"
3506
+ }),
3507
+ onClick: t[9] ||= (e) => nt.value = !0
3508
+ }, {
3509
+ icon: g(() => [T(ie, { class: "w-5 h-5" })]),
3510
+ _: 1
3511
+ }, 8, ["style"])), [[M, { value: e.$t("views.floorplan.palette") }]]) : d("", !0),
3512
+ T(me, {
3513
+ modelValue: m(nt),
3514
+ "onUpdate:modelValue": t[10] ||= (e) => p(nt) ? nt.value = e : null,
3515
+ title: e.$t("views.floorplan.palette"),
3516
+ "max-height": "70vh"
3517
+ }, {
3518
+ default: g(() => [T(oe, {
3519
+ cameras: m(Et),
3520
+ sensors: m(wt),
3521
+ rooms: m(Tt),
3522
+ disabled: !m(z).length,
3523
+ mode: "click",
3524
+ onPick: Dn
3525
+ }, null, 8, [
3526
+ "cameras",
3527
+ "sensors",
3528
+ "rooms",
3529
+ "disabled"
3530
+ ])]),
3531
+ _: 1
3532
+ }, 8, ["modelValue", "title"]),
3533
+ b("div", {
3534
+ ref_key: "menuAnchorRef",
3535
+ ref: De,
3536
+ class: "fixed w-0 h-0",
3537
+ style: v({
3538
+ left: `${m(je).x}px`,
3539
+ top: `${m(je).y}px`
3540
+ })
3541
+ }, null, 4),
3542
+ b("div", {
3543
+ ref_key: "previewAnchorRef",
3544
+ ref: Me,
3545
+ class: "fixed w-0 h-0",
3546
+ style: v({
3547
+ left: `${m(R).x}px`,
3548
+ top: `${m(R).y}px`
3549
+ })
3550
+ }, null, 4),
3551
+ b("div", {
3552
+ ref_key: "sensorAnchorRef",
3553
+ ref: Fe,
3554
+ class: "fixed w-0 h-0",
3555
+ style: v({
3556
+ left: `${m(Ie).x}px`,
3557
+ top: `${m(Ie).y}px`
3558
+ })
3559
+ }, null, 4),
3560
+ T(he, {
3561
+ ref_key: "sensorPopoverRef",
3562
+ ref: Le,
3563
+ class: "shadow-lg cui-rounded-corner",
3564
+ pt: { content: { class: "p-3" } }
3565
+ }, {
3566
+ default: g(() => [m($) ? (r(), _("div", {
3567
+ key: 0,
3568
+ class: "w-[220px] flex flex-col gap-3",
3569
+ onPointerenter: on,
3570
+ onPointerleave: sn
3571
+ }, [
3572
+ b("div", Ii, [b("div", Li, [(r(), u(c(m(pe)(m($).sensorType, tn(m($).id))), { class: "w-4 h-4" }))]), b("div", Ri, [
3573
+ b("div", zi, i(m($).name), 1),
3574
+ m($).owner ? (r(), _("div", Bi, i(m($).owner), 1)) : d("", !0),
3575
+ b("div", Vi, i(m(le)(m($).sensorType, tn(m($).id))), 1)
3576
+ ])]),
3577
+ m($).note ? (r(), _("div", Hi, i(m($).note), 1)) : d("", !0),
3578
+ m($).sensorType === "securitySystem" ? (r(), _("div", Ui, [(r(), _(y, null, n(J, (t) => T(l, {
3579
+ key: t.value,
3580
+ severity: "secondary",
3581
+ outlined: m(be)(tn(m($).id)) !== t.value,
3582
+ size: "small",
3583
+ class: "cui-button-medium",
3584
+ label: e.$t(t.labelKey),
3585
+ onClick: (e) => an(m($).id, t.value)
3586
+ }, null, 8, [
3587
+ "outlined",
3588
+ "label",
3589
+ "onClick"
3590
+ ])), 64))])) : nn(m($).sensorType) ? (r(), u(l, {
3591
+ key: 2,
3592
+ severity: "secondary",
3593
+ size: "small",
3594
+ class: "cui-button-medium",
3595
+ label: e.$t("views.floorplan.sensor_toggle"),
3596
+ onClick: t[11] ||= (e) => rn(m($).id)
3597
+ }, null, 8, ["label"])) : d("", !0)
3598
+ ], 32)) : d("", !0)]),
3599
+ _: 1
3600
+ }, 512),
3601
+ T(he, {
3602
+ ref_key: "previewRef",
3603
+ ref: Pe,
3604
+ class: "shadow-lg cui-rounded-corner overflow-hidden",
3605
+ pt: { content: { class: "p-0" } }
3606
+ }, {
3607
+ default: g(() => [b("div", {
3608
+ class: "w-[280px] flex flex-col",
3609
+ onPointerenter: un,
3610
+ onPointerleave: dn
3611
+ }, [b("div", Wi, [m(X) ? (r(), u(k, {
3612
+ key: 0,
3613
+ "camera-info": m(X),
3614
+ "source-role": "low-resolution",
3615
+ "streaming-mode": "auto",
3616
+ toolbar: !1,
3617
+ control: !1,
3618
+ subcontrol: !1,
3619
+ "isolated-stream": !0,
3620
+ "live-indicator-overlay": "",
3621
+ class: "w-full",
3622
+ "flat-card": ""
3623
+ }, null, 8, ["camera-info"])) : d("", !0)]), m(X) ? (r(), _("div", Gi, [b("span", Ki, i(m(X).name), 1), x((r(), u(l, {
3624
+ severity: "secondary",
3625
+ text: "",
3626
+ class: "cui-button p-1.5",
3627
+ onClick: t[12] ||= (t) => e.$router.push(`/cameras/${m(X).name}`)
3628
+ }, {
3629
+ icon: g(() => [T(A, { class: "w-4 h-4" })]),
3630
+ _: 1
3631
+ })), [[
3632
+ M,
3633
+ { value: e.$t("views.floorplan.open_camera") },
3634
+ void 0,
3635
+ { top: !0 }
3636
+ ]])])) : d("", !0)], 32)]),
3637
+ _: 1
3638
+ }, 512),
3639
+ T(j, {
3640
+ ref_key: "stairsMenuRef",
3641
+ ref: F,
3642
+ items: m(jt),
3643
+ "max-height": "320px",
3644
+ popover: { pt: { content: { class: "p-0! rounded-xl! overflow-hidden!" } } }
3645
+ }, null, 8, ["items"]),
3646
+ T(j, {
3647
+ ref_key: "levelMenuRef",
3648
+ ref: Ce,
3649
+ items: m(kt),
3650
+ popover: { pt: { content: { class: "p-0! rounded-xl! overflow-hidden!" } } }
3651
+ }, null, 8, ["items"])
3652
+ ]);
3653
+ };
3654
+ }
3655
+ }), [["__scopeId", "data-v-e56f8b21"]]);
3656
+ //#endregion
3657
+ export { Yi as default };