@camera.ui/server 2.1.14-beta.3 → 2.1.15

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 (443) hide show
  1. package/dist/interface/assets/{404-Ct2rp3W6.js → 404-DwgMdXqW.js} +1 -1
  2. package/dist/interface/assets/{About-BkrFfbam.js → About-REFUgZk_.js} +1 -1
  3. package/dist/interface/assets/{Automation-D2PHM9TZ.js → Automation-DThD-djr.js} +3 -3
  4. package/dist/interface/assets/{AutomationImport-DbRJF8i2.js → AutomationImport-CHKkZqA4.js} +2 -2
  5. package/dist/interface/assets/{AutomationStore-D-PBrft2.js → AutomationStore-Aon4kqZU.js} +2 -2
  6. package/dist/interface/assets/{AutomationStoreDetail-RU-UXz0W.js → AutomationStoreDetail-CfZ45tLW.js} +2 -2
  7. package/dist/interface/assets/{Automations-D-AAcPfb.js → Automations-BkRuMd-d.js} +2 -2
  8. package/dist/interface/assets/{Camera-Bz5NfM2e.js → Camera-G6xTnRAk.js} +2 -2
  9. package/dist/interface/assets/{CameraConsole-_v6lLT9V.js → CameraConsole-S61HjIGA.js} +1 -1
  10. package/dist/interface/assets/{Cameras-BICfDnxO.js → Cameras-57rPP3Y_.js} +1 -1
  11. package/dist/interface/assets/{Camview-CKX9B9Ak.js → Camview-BjCuw7nI.js} +1 -1
  12. package/dist/interface/assets/{CertificateUpload-CWt_CAt6.js → CertificateUpload-CBSLHn_I.js} +1 -1
  13. package/dist/interface/assets/{Config-CKn4Gc_s.js → Config-BTXb1LHN.js} +1 -1
  14. package/dist/interface/assets/{ConfigActionCameraControl-BpZrhaAg.js → ConfigActionCameraControl-B7KwK7vb.js} +1 -1
  15. package/dist/interface/assets/{ConfigActionDelay-D-Rn2YP6.js → ConfigActionDelay-DwTGfeP4.js} +1 -1
  16. package/dist/interface/assets/{ConfigActionHttp-DzoBcypZ.js → ConfigActionHttp-idm-FKXM.js} +1 -1
  17. package/dist/interface/assets/{ConfigActionImageInput-DHBsjlY-.js → ConfigActionImageInput-C-v-_UEM.js} +1 -1
  18. package/dist/interface/assets/{ConfigActionMqtt-DBssl5vL.js → ConfigActionMqtt-CG1o9_6A.js} +1 -1
  19. package/dist/interface/assets/{ConfigActionNotification-nDKENsVa.js → ConfigActionNotification-DtoP3c7I.js} +1 -1
  20. package/dist/interface/assets/{ConfigActionNotificationControl-Gd955Nu4.js → ConfigActionNotificationControl-BvHIqHE7.js} +1 -1
  21. package/dist/interface/assets/{ConfigActionOutput-CPlUnJPX.js → ConfigActionOutput-BQvDZGKV.js} +1 -1
  22. package/dist/interface/assets/{ConfigActionPlugin-DMT0GG9J.js → ConfigActionPlugin-C7mcZ0Kz.js} +1 -1
  23. package/dist/interface/assets/{ConfigActionSensor-B9qfwZPK.js → ConfigActionSensor-BFnb75FI.js} +1 -1
  24. package/dist/interface/assets/{ConfigActionSnapshot-DmzC7Ka8.js → ConfigActionSnapshot-BfzPScY6.js} +1 -1
  25. package/dist/interface/assets/{ConfigActionVariable-BcTGZbYR.js → ConfigActionVariable-CjIeZnOV.js} +1 -1
  26. package/dist/interface/assets/{ConfigConditionIfElse-C-0FNq8c.js → ConfigConditionIfElse-Dgcqs9QP.js} +1 -1
  27. package/dist/interface/assets/{ConfigConditionSensorState-DoOyDkd8.js → ConfigConditionSensorState-DtLt1AvW.js} +1 -1
  28. package/dist/interface/assets/{ConfigConditionSwitch-DonNSgEC.js → ConfigConditionSwitch-C6BfIozf.js} +1 -1
  29. package/dist/interface/assets/{ConfigConditionTime-b05J39ya.js → ConfigConditionTime-NcjSe4RM.js} +1 -1
  30. package/dist/interface/assets/{ConfigSensorValueInput-DbKeWPpA.js → ConfigSensorValueInput-DuvBl4YL.js} +1 -1
  31. package/dist/interface/assets/{ConfigTriggerDetection-DvoA49uo.js → ConfigTriggerDetection-DsVb-Svo.js} +1 -1
  32. package/dist/interface/assets/{ConfigTriggerGeofence-CZRFnbWY.js → ConfigTriggerGeofence-DLuNWaN6.js} +1 -1
  33. package/dist/interface/assets/{ConfigTriggerManual-DYDhaI_A.js → ConfigTriggerManual-vG37zALd.js} +1 -1
  34. package/dist/interface/assets/{ConfigTriggerMqtt-CkClS0me.js → ConfigTriggerMqtt-BPl_Puje.js} +1 -1
  35. package/dist/interface/assets/{ConfigTriggerSchedule-Co2A9pH7.js → ConfigTriggerSchedule-Bn2drGV5.js} +1 -1
  36. package/dist/interface/assets/{ConfigTriggerSensor-B6KlmsnV.js → ConfigTriggerSensor-DP0CXRLo.js} +1 -1
  37. package/dist/interface/assets/{ConfigTriggerSystem-CC-NtLwh.js → ConfigTriggerSystem-DQikAjbB.js} +1 -1
  38. package/dist/interface/assets/{ConfigTriggerWebhook-CPjRwtA-.js → ConfigTriggerWebhook-Cl7KWuRQ.js} +1 -1
  39. package/dist/interface/assets/{Console-BbdPBqEC.js → Console-hUeddOJc.js} +1 -1
  40. package/dist/interface/assets/{CuiAutomationRunsDialog-DoPIIX-T.js → CuiAutomationRunsDialog-D_rNvqan.js} +1 -1
  41. package/dist/interface/assets/CuiBottomSheet-BGVpKjqe.js +1 -0
  42. package/dist/interface/assets/{CuiBottomSheet-B6X4pbeR.js → CuiBottomSheet-DOW6gNj0.js} +1 -1
  43. package/dist/interface/assets/{CuiCameraPipCard-BlZJUCJP.js → CuiCameraPipCard-BBMkU-eN.js} +1 -1
  44. package/dist/interface/assets/{CuiCameraRecordings-BvQ_6Elk.js → CuiCameraRecordings-h6Yel4J4.js} +1 -1
  45. package/dist/interface/assets/{CuiCameraShares-CGYScB2u.js → CuiCameraShares-C9Th3jEn.js} +1 -1
  46. package/dist/interface/assets/{CuiCameraTable-Cm-wfsDL.js → CuiCameraTable-CfXoLbtY.js} +1 -1
  47. package/dist/interface/assets/CuiCameraTable-Cti7FZma.js +1 -0
  48. package/dist/interface/assets/{CuiChartTable-CKP8f68c.js → CuiChartTable-BWRwoTLX.js} +1 -1
  49. package/dist/interface/assets/{CuiConsole-BWrpJYcX.js → CuiConsole-Cb3wDLZr.js} +1 -1
  50. package/dist/interface/assets/{CuiDataTable-BozSktV7.js → CuiDataTable-aAZV_F3r.js} +1 -1
  51. package/dist/interface/assets/{CuiLightControl-DRNXOigw.js → CuiLightControl-BhBIiPv-.js} +1 -1
  52. package/dist/interface/assets/{CuiList-DRkSKm6_.js → CuiList-BZYxCLqz.js} +1 -1
  53. package/dist/interface/assets/CuiMarkdownContent-BXUJahQp.js +1 -0
  54. package/dist/interface/assets/{CuiMarkdownContent-gJ8gvmYA.js → CuiMarkdownContent-Diua-pVD.js} +1 -1
  55. package/dist/interface/assets/{CuiPluginCard-DQLIw-q8.js → CuiPluginCard-yYGvVtDJ.js} +2 -2
  56. package/dist/interface/assets/{CuiPluginCategoryChip-CcKK1e-h.js → CuiPluginCategoryChip-C9trJ_ql.js} +1 -1
  57. package/dist/interface/assets/{CuiPluginOAuthButton-Bbh4geGP.js → CuiPluginOAuthButton-C8VRPoMj.js} +2 -2
  58. package/dist/interface/assets/{CuiPluginTrustBadge-UJafoYxB.js → CuiPluginTrustBadge-D5gkIhJv.js} +1 -1
  59. package/dist/interface/assets/{CuiQRCode-gqnAR_Zp.js → CuiQRCode-DY5Q-Xel.js} +1 -1
  60. package/dist/interface/assets/{CuiSchema-Bhs017IB.js → CuiSchema-Dy2eRCu2.js} +1 -1
  61. package/dist/interface/assets/{CuiTopNavbarItem-C-7LPPKD.js → CuiTopNavbarItem-Btig8IUi.js} +1 -1
  62. package/dist/interface/assets/{Faces-BfBHLOZg.js → Faces-D5PMl5Bx.js} +1 -1
  63. package/dist/interface/assets/{FirstSteps-zHSDaE1p.js → FirstSteps-BcjeaLz_.js} +1 -1
  64. package/dist/interface/assets/{Floorplan-BlT1vOq0.js → Floorplan-DHl3zibU.js} +1 -1
  65. package/dist/interface/assets/{Instances-BNylwtFA.js → Instances-DXksjsQR.js} +1 -1
  66. package/dist/interface/assets/{Logs-Bh8kvHG-.js → Logs-CfYTWOv2.js} +1 -1
  67. package/dist/interface/assets/{Menu-BDdiFqwe.js → Menu-HzmLhy40.js} +1 -1
  68. package/dist/interface/assets/{Metrics-dqXxkjt9.js → Metrics-BWTImHsV.js} +1 -1
  69. package/dist/interface/assets/{OAuthDeviceFlow-BRTodx33.js → OAuthDeviceFlow-DBac627V.js} +1 -1
  70. package/dist/interface/assets/{Plugin-BZZ9P2-2.js → Plugin-D5WuhMPO.js} +1 -1
  71. package/dist/interface/assets/{PluginConsole-DxxCx7q1.js → PluginConsole-C5dZgdl9.js} +1 -1
  72. package/dist/interface/assets/{PluginDetail-l_l3WOqM.js → PluginDetail-3qrahg0_.js} +2 -2
  73. package/dist/interface/assets/{PluginSchema-D0stZt2c.js → PluginSchema-DJ8NY8hW.js} +1 -1
  74. package/dist/interface/assets/{PluginSearch-lqGiQjP4.js → PluginSearch-D8zmSpkN.js} +2 -2
  75. package/dist/interface/assets/PluginSearch-D_ba5x-O.js +1 -0
  76. package/dist/interface/assets/{PluginUpdateProgress-CUUVf_wg.js → PluginUpdateProgress-DgqaTwSS.js} +1 -1
  77. package/dist/interface/assets/{Plugins-Y634pLhv.js → Plugins-5MzJrkSA.js} +1 -1
  78. package/dist/interface/assets/{Recordings-Ct6GmMEP.js → Recordings-BuGuUwYE.js} +1 -1
  79. package/dist/interface/assets/{SensorEdit-DnPyIBu5.js → SensorEdit-DF4sw0EW.js} +1 -1
  80. package/dist/interface/assets/{SensorHistory-Bwmg24QZ.js → SensorHistory-bCcPH0_I.js} +1 -1
  81. package/dist/interface/assets/{Sensors-BaMYFgjD.js → Sensors-D6GwAXQ2.js} +2 -2
  82. package/dist/interface/assets/{Settings-DulVBel0.js → Settings-BZf-ziEZ.js} +1 -1
  83. package/dist/interface/assets/SettingsAccount--5p79E6E.js +1 -0
  84. package/dist/interface/assets/{SettingsAccount-CL2RTnFz.js → SettingsAccount-Dlc0Wddo.js} +1 -1
  85. package/dist/interface/assets/{SettingsAppearance-cq1t3BEj.js → SettingsAppearance-B59zzxu4.js} +1 -1
  86. package/dist/interface/assets/SettingsAppearance-xPKxmDpp.js +1 -0
  87. package/dist/interface/assets/{SettingsBackup-21a3QmN1.js → SettingsBackup-CJJ5VBzp.js} +1 -1
  88. package/dist/interface/assets/{SettingsList-dO_4W9uY.js → SettingsList-Nc7OCZrn.js} +1 -1
  89. package/dist/interface/assets/{SettingsMqtt-CAxcvp74.js → SettingsMqtt-DUUAcYuG.js} +1 -1
  90. package/dist/interface/assets/{SettingsNotifications-C8OyC6Uo.js → SettingsNotifications-BH63oRsc.js} +1 -1
  91. package/dist/interface/assets/{SettingsPermissions-BPZlOEWO.js → SettingsPermissions-BZXAgxUl.js} +1 -1
  92. package/dist/interface/assets/{SettingsRecordings-Boja0QZp.js → SettingsRecordings-Biyy3rTF.js} +1 -1
  93. package/dist/interface/assets/{SettingsRemote-Dga6BXDI.js → SettingsRemote-Dbaxaq5H.js} +1 -1
  94. package/dist/interface/assets/{SettingsSystem-DnipKTG6.js → SettingsSystem-DzHIleOc.js} +2 -2
  95. package/dist/interface/assets/{SettingsUsers-Bxf1RaY3.js → SettingsUsers-D5YuEr7c.js} +1 -1
  96. package/dist/interface/assets/{Terminal-Cr3hOv8-.js → Terminal-AsI0lb5n.js} +1 -1
  97. package/dist/interface/assets/{Updates-DiBrlchb.js → Updates-DnAut-3U.js} +2 -2
  98. package/dist/interface/assets/{VariableInput-C7XFQ66c.js → VariableInput-__I-FsBF.js} +1 -1
  99. package/dist/interface/assets/{VariableSuggestions-DohkCyGS.js → VariableSuggestions-B-7auf15.js} +1 -1
  100. package/dist/interface/assets/VersionsHandler-BTe1Ev3b.js +7 -0
  101. package/dist/interface/assets/{VirtualSensorCreate-9X6C1NR1.js → VirtualSensorCreate-DdLgJECI.js} +1 -1
  102. package/dist/interface/assets/{Workers-D5OtbF4f.js → Workers-6aoL2zvF.js} +1 -1
  103. package/dist/interface/assets/{account-BW_r05fC.js → account-BD2MtsdK.js} +1 -1
  104. package/dist/interface/assets/{alert-circle-We_nDFAy.js → alert-circle-CDCxdnIi.js} +1 -1
  105. package/dist/interface/assets/{alert-outline-DtiCgufF.js → alert-outline-E6GK9c5n.js} +1 -1
  106. package/dist/interface/assets/{api-ZL-_Y0-o.js → api-84bL4zpk.js} +1 -1
  107. package/dist/interface/assets/api-BI5TkcMD.js +4 -0
  108. package/dist/interface/assets/{api-SOlhy6R4.css → api-BTWXbCPQ.css} +1 -1
  109. package/dist/interface/assets/{arrow-left-V1y_rwzT.js → arrow-left-3p85-F5N.js} +1 -1
  110. package/dist/interface/assets/{auth-CUXeNcmI.js → auth-F2wU_mtw.js} +1 -1
  111. package/dist/interface/assets/{automations-Bz9Wo-Xf.js → automations-D6fqhxhY.js} +1 -1
  112. package/dist/interface/assets/{back-filled-MAIFvJqE.js → back-filled-CE63214a.js} +1 -1
  113. package/dist/interface/assets/{bell-ring-DBCDVZQy.js → bell-ring-CGVdWMCy.js} +1 -1
  114. package/dist/interface/assets/{brain-Bqf50oqB.js → brain-DqTk5Zyq.js} +1 -1
  115. package/dist/interface/assets/{cameraSources-BpaS7lCe.js → cameraSources-C3PFkewy.js} +1 -1
  116. package/dist/interface/assets/{cctv-Tng3HqLa.js → cctv-Dh6i5n3w.js} +1 -1
  117. package/dist/interface/assets/{check-circle-DNTQ812v.js → check-circle-B4u2U1O6.js} +1 -1
  118. package/dist/interface/assets/{chevron-down-DqCuosKP.js → chevron-down-CA4ntUJ5.js} +1 -1
  119. package/dist/interface/assets/{clock-outline-DwnISu0k.js → clock-outline-D45HCnXi.js} +1 -1
  120. package/dist/interface/assets/{close-ChGy_BeH.js → close-BiHUNAkN.js} +1 -1
  121. package/dist/interface/assets/{close-circle-B9jFTQT1.js → close-circle-BRfsyoFY.js} +1 -1
  122. package/dist/interface/assets/{cloud-check-DABrVuto.js → cloud-check-v8fBsHY8.js} +1 -1
  123. package/dist/interface/assets/cloudHandoff-B1HA65AZ.js +1 -0
  124. package/dist/interface/assets/{config-bmrb5S6z.js → config-Jzs6YXbB.js} +1 -1
  125. package/dist/interface/assets/{content-copy-CsUEmnFS.js → content-copy-VcYnXV6l.js} +1 -1
  126. package/dist/interface/assets/{copy-CzGo5Njh.js → copy-KnN8Met6.js} +1 -1
  127. package/dist/interface/assets/{cube-scan-BR5la6Qx.js → cube-scan-DcvByv2J.js} +1 -1
  128. package/dist/interface/assets/{delete-CiJ6ng5_.js → delete-B_wgbT_W.js} +1 -1
  129. package/dist/interface/assets/{dist-2BkH6KaN.js → dist-CA3CfqGE.js} +1 -1
  130. package/dist/interface/assets/{download-CaV8-tw6.js → download-Cg8JrPGl.js} +1 -1
  131. package/dist/interface/assets/esm-B9CzQCu4.js +1 -0
  132. package/dist/interface/assets/esm-BBtiU--A.js +1 -0
  133. package/dist/interface/assets/esm-BW1JB7cT.js +1 -0
  134. package/dist/interface/assets/esm-BrTItqsO.js +1 -0
  135. package/dist/interface/assets/esm-C-1txZoa.js +1 -0
  136. package/dist/interface/assets/esm-C-e-sIcG.js +1 -0
  137. package/dist/interface/assets/esm-CE4Rajd0.js +1 -0
  138. package/dist/interface/assets/esm-Ccyy-x2Y.js +1 -0
  139. package/dist/interface/assets/esm-CixxvBfo.js +1 -0
  140. package/dist/interface/assets/esm-CkFoKPdV.js +1 -0
  141. package/dist/interface/assets/esm-CvZd2jWJ.js +1 -0
  142. package/dist/interface/assets/esm-Dhi49FLm.js +1 -0
  143. package/dist/interface/assets/esm-DqEbZj6J.js +1 -0
  144. package/dist/interface/assets/esm-tauuy5_Z.js +1 -0
  145. package/dist/interface/assets/{eye-off-DAhBNvxJ.js → eye-off-C-VpEYqY.js} +1 -1
  146. package/dist/interface/assets/{eye-off-outline-Bj1tXD9w.js → eye-off-outline-Dnsc9na3.js} +1 -1
  147. package/dist/interface/assets/{flowSchema-D4Ys_7rr.js → flowSchema-C1fWwuQa.js} +1 -1
  148. package/dist/interface/assets/{history-F0qTKQGT.js → history-DSKZX4F9.js} +1 -1
  149. package/dist/interface/assets/{home-DEKGoPL_.js → home-CGNmzgku.js} +1 -1
  150. package/dist/interface/assets/{information-outline-CQ5e79wc.js → information-outline-CdLdxg1d.js} +1 -1
  151. package/dist/interface/assets/{intercomService-CmFnb1sI.js → intercomService-fFto_C1t.js} +1 -1
  152. package/dist/interface/assets/{lan-D9PCM8iA.js → lan-Cj3DpVaf.js} +1 -1
  153. package/dist/interface/assets/{main-CrXBqh3b.js → main-C6AqiNZK.js} +2 -2
  154. package/dist/interface/assets/{microphone-CGwzrMxl.js → microphone-DGgazpZX.js} +1 -1
  155. package/dist/interface/assets/{minus-HH0UdIjG.js → minus-CWip8tXS.js} +1 -1
  156. package/dist/interface/assets/{mqtt-Cotm4qW5.js → mqtt-DGNlVikj.js} +1 -1
  157. package/dist/interface/assets/native-BMdJvE8u.js +1 -0
  158. package/dist/interface/assets/native-i7j7-uHJ.js +1 -0
  159. package/dist/interface/assets/{nodeDefinitions-a8iyp3yk.js → nodeDefinitions-CtfX1M97.js} +1 -1
  160. package/dist/interface/assets/{notifications-D4SOTDPx.js → notifications-CIJEGR7A.js} +1 -1
  161. package/dist/interface/assets/{pencil-outline-B5N-eyTy.js → pencil-outline-Pf6B58h3.js} +1 -1
  162. package/dist/interface/assets/plugin-lrS8bUX2.js +1 -0
  163. package/dist/interface/assets/{plugins-Bxyydn6v.js → plugins-HYHSAzD-.js} +1 -1
  164. package/dist/interface/assets/{plus-Ct9djYce.js → plus-CTpkwuud.js} +1 -1
  165. package/dist/interface/assets/{plus-CxnlTOHI.js → plus-TyoK27n7.js} +1 -1
  166. package/dist/interface/assets/{power-C-XO8yWI.js → power-BdKoekqT.js} +1 -1
  167. package/dist/interface/assets/{radar-8nK_pSbi.js → radar-CH2BXtex.js} +1 -1
  168. package/dist/interface/assets/{refresh-CygeIRWu.js → refresh-B7-CESap.js} +1 -1
  169. package/dist/interface/assets/{restore-D_Dq23W9.js → restore-kAL9Wrd4.js} +1 -1
  170. package/dist/interface/assets/{ring-resize-DsW_XYdA.js → ring-resize-DDYKCwBE.js} +1 -1
  171. package/dist/interface/assets/{rooms-DdSOohLs.js → rooms-DL_uUrGc.js} +1 -1
  172. package/dist/interface/assets/{round-alt-arrow-left-bold-2FHg8vBl.js → round-alt-arrow-left-bold-MZGO7rU3.js} +1 -1
  173. package/dist/interface/assets/{search-Ck7b7yvI.js → search-70mLVEz7.js} +1 -1
  174. package/dist/interface/assets/{sensorIcons-CtVSmjCW.js → sensorIcons-ByPd6LR6.js} +1 -1
  175. package/dist/interface/assets/{sensors-C4ZGeFC2.js → sensors-BgjfSfk6.js} +1 -1
  176. package/dist/interface/assets/{server-DWPgetQJ.js → server-CIDx_I6S.js} +1 -1
  177. package/dist/interface/assets/{settings-Bw6giVLH.js → settings-B7tifwXn.js} +1 -1
  178. package/dist/interface/assets/{source-branch-K7YOvHCE.js → source-branch-CgHfENTa.js} +1 -1
  179. package/dist/interface/assets/{theme-BTgw7al1.js → theme-GSy1mQOB.js} +1 -1
  180. package/dist/interface/assets/{trash-2-eaKaSMof.js → trash-2-DUSJ2XLn.js} +1 -1
  181. package/dist/interface/assets/{trash-can-outline-_aiv_oEu.js → trash-can-outline-wuIbai1c.js} +1 -1
  182. package/dist/interface/assets/{trash-fill-OkxLbTTj.js → trash-fill-CKyYCHKC.js} +1 -1
  183. package/dist/interface/assets/{trash2-Czz-2j5D.js → trash2-BZMXAPZP.js} +1 -1
  184. package/dist/interface/assets/{types-sQfxKKSk.js → types-Dlk_iSoE.js} +1 -1
  185. package/dist/interface/assets/{types-BX3Shvk-.js → types-Do9v0d7I.js} +1 -1
  186. package/dist/interface/assets/{types-DJucLQEM.js → types-QIK1kdY6.js} +1 -1
  187. package/dist/interface/assets/{undo-RdNzlJdm.js → undo-OK_WWA5K.js} +1 -1
  188. package/dist/interface/assets/{ungrouped-CfLdttI0.js → ungrouped-CupkuPIQ.js} +1 -1
  189. package/dist/interface/assets/{updates-DSQhfbpi.js → updates-73Yq11IN.js} +1 -1
  190. package/dist/interface/assets/{upload-D_9SZvdG.js → upload-BJQKy0Z4.js} +1 -1
  191. package/dist/interface/assets/{upload-DCTSXaJV.js → upload-Dp1Z1JOP.js} +1 -1
  192. package/dist/interface/assets/{useAppVersion-Dm0wl8Ks.js → useAppVersion-B0_bYa9V.js} +1 -1
  193. package/dist/interface/assets/{useBackupRestore-ARFlxu4a.js → useBackupRestore-jdHT_hab.js} +1 -1
  194. package/dist/interface/assets/{useCameraOptions-CkKmF0Hk.js → useCameraOptions-DKeZhfOM.js} +1 -1
  195. package/dist/interface/assets/{useLogsSocket-BQGKfynj.js → useLogsSocket-CmyTTUGN.js} +1 -1
  196. package/dist/interface/assets/{useNavLayout-CB6pDWQI.js → useNavLayout-DOFS3269.js} +1 -1
  197. package/dist/interface/assets/{usePermissions-CKQU5_yK.js → usePermissions-D5I3gACT.js} +1 -1
  198. package/dist/interface/assets/{usePluginUpdates-DsX5Nf9S.js → usePluginUpdates-BWxJ04h7.js} +1 -1
  199. package/dist/interface/assets/{usePushRegistration-CR4ZsM1s.js → usePushRegistration-DWreQ-Hn.js} +2 -2
  200. package/dist/interface/assets/{useServerRestart-B0ux2xXZ.js → useServerRestart-DDW-nw_t.js} +1 -1
  201. package/dist/interface/assets/{useStreamStatus-B13lBsjn.js → useStreamStatus-COIha2d8.js} +1 -1
  202. package/dist/interface/assets/{useTabSwipe-CC9fSJyW.js → useTabSwipe-aoMqro29.js} +1 -1
  203. package/dist/interface/assets/{useUpdateChannel-4932QugL.js → useUpdateChannel-CM9MYCZy.js} +1 -1
  204. package/dist/interface/assets/{useUpdatesSocket-BYOu1jFQ.js → useUpdatesSocket-DY4i32ml.js} +1 -1
  205. package/dist/interface/assets/useUserOptions-DHfprGgA.js +1 -0
  206. package/dist/interface/assets/{variable-CYzMRxrK.js → variable-DQYEQC2B.js} +1 -1
  207. package/dist/interface/assets/{vendor-cameraui-C5_h4c-5.js → vendor-cameraui-BRv7o4zz.js} +2 -2
  208. package/dist/interface/assets/{vendor-capacitor-B-ykF6jr.js → vendor-capacitor-NWfzfsQC.js} +2 -2
  209. package/dist/interface/assets/{vendor-chart-C-1xJhJN.js → vendor-chart-dE6RS38u.js} +1 -1
  210. package/dist/interface/assets/{vendor-core-DeodbhZZ.js → vendor-core-BUse5adB.js} +1 -1
  211. package/dist/interface/assets/{vendor-dnd-onyWAbsd.js → vendor-dnd-BopggnhP.js} +1 -1
  212. package/dist/interface/assets/{vendor-draggabilly-B7q3Src-.js → vendor-draggabilly-Ci8TnnTO.js} +1 -1
  213. package/dist/interface/assets/{vendor-markdown-aj6qAoLx.js → vendor-markdown-CuuUoQv-.js} +1 -1
  214. package/dist/interface/assets/{vendor-AX0A8AMd.js → vendor-nVfLT5jI.js} +1 -1
  215. package/dist/interface/assets/{vendor-primevue-C9-jpd5L.js → vendor-primevue-C85v-zl5.js} +1 -1
  216. package/dist/interface/assets/{vendor-vueflow-8uLknwcA.js → vendor-vueflow-BedhB9R6.js} +1 -1
  217. package/dist/interface/assets/web-7C8V33mW.js +1 -0
  218. package/dist/interface/assets/web-BY2ge2z3.js +1 -0
  219. package/dist/interface/assets/web-Be7M1t3d.js +1 -0
  220. package/dist/interface/assets/web-BgvG5te3.js +1 -0
  221. package/dist/interface/assets/web-BjKL51lK-BH0_-sFs.js +1 -0
  222. package/dist/interface/assets/web-C8Kk4oGz.js +1 -0
  223. package/dist/interface/assets/web-CTyRzCSS.js +1 -0
  224. package/dist/interface/assets/web-CUqrzL_F.js +1 -0
  225. package/dist/interface/assets/web-CrNXFCs3.js +1 -0
  226. package/dist/interface/assets/web-D7fKj4KF.js +1 -0
  227. package/dist/interface/assets/web-DAr7KVsu.js +1 -0
  228. package/dist/interface/assets/web-DiXOyiwy.js +1 -0
  229. package/dist/interface/assets/web-Dx3qFqYr.js +1 -0
  230. package/dist/interface/assets/web-FQYwBib0.js +1 -0
  231. package/dist/interface/assets/{webhook-CPF2kUgU.js → webhook-B9NooZUT.js} +1 -1
  232. package/dist/interface/assets/workbox-window.prod.es5-CubmHh5i.js +1 -0
  233. package/dist/interface/assets/{zoom-in-D-OIVcXF.js → zoom-in-DkOfo9Ku.js} +1 -1
  234. package/dist/interface/ha/{404-BJV77Tm3.js → 404-TwTUCqDv.js} +1 -1
  235. package/dist/interface/ha/{About-B9m7sPyi.js → About-BeZkyUdW.js} +3 -3
  236. package/dist/interface/ha/{Automation-CpRTKtII.js → Automation-CL7j0Vgh.js} +25 -25
  237. package/dist/interface/ha/{AutomationImport-Cwx9PKHq.js → AutomationImport-D7arOHP-.js} +6 -6
  238. package/dist/interface/ha/{AutomationStore-D1DJAo3Y.js → AutomationStore-DN0yBk6X.js} +4 -4
  239. package/dist/interface/ha/{AutomationStoreDetail-BWkMk3zp.js → AutomationStoreDetail-DUuLEnvx.js} +6 -6
  240. package/dist/interface/ha/{Automations-2-dpUnyN.js → Automations-Dfbren5V.js} +3 -3
  241. package/dist/interface/ha/{Camera-BFQCXQ-9.js → Camera-BxWpvZM8.js} +3 -3
  242. package/dist/interface/ha/{CameraConsole-DN2AUzCO.js → CameraConsole-DT7BFGXD.js} +3 -3
  243. package/dist/interface/ha/{Cameras-Cp2tLuzn.js → Cameras-ClmwBeNf.js} +6 -6
  244. package/dist/interface/ha/{Camview-9-QATaMt.js → Camview-CFAKNI6-.js} +3 -3
  245. package/dist/interface/ha/{Config-B7BWUVjy.js → Config-D83QNz1P.js} +6 -6
  246. package/dist/interface/ha/{ConfigActionCameraControl-B4bligkf.js → ConfigActionCameraControl-D-2_gkM-.js} +3 -3
  247. package/dist/interface/ha/{ConfigActionHttp-Ci1pT2TU.js → ConfigActionHttp-CDmzaJOb.js} +2 -2
  248. package/dist/interface/ha/{ConfigActionImageInput-JL7XqPlF.js → ConfigActionImageInput-7mA-jNIj.js} +1 -1
  249. package/dist/interface/ha/{ConfigActionMqtt-CErH-8g0.js → ConfigActionMqtt-CGLqAswk.js} +4 -4
  250. package/dist/interface/ha/{ConfigActionNotification-DbB5il5h.js → ConfigActionNotification-DyhLsVfe.js} +3 -3
  251. package/dist/interface/ha/{ConfigActionNotificationControl-BidGFW5w.js → ConfigActionNotificationControl-C381uizv.js} +2 -2
  252. package/dist/interface/ha/{ConfigActionOutput-BbEPcSqB.js → ConfigActionOutput-Cg6IMq5u.js} +1 -1
  253. package/dist/interface/ha/{ConfigActionPlugin-BQUbQheX.js → ConfigActionPlugin-vFD_OHt8.js} +4 -4
  254. package/dist/interface/ha/{ConfigActionSensor-ZwXZF672.js → ConfigActionSensor-B0JYbb-_.js} +4 -4
  255. package/dist/interface/ha/{ConfigActionSnapshot-CKCKSlvU.js → ConfigActionSnapshot-DlYRwdII.js} +2 -2
  256. package/dist/interface/ha/{ConfigActionVariable-DB-leNOV.js → ConfigActionVariable-6HNVpSjs.js} +1 -1
  257. package/dist/interface/ha/{ConfigConditionIfElse-268mse2c.js → ConfigConditionIfElse-b5UhYSf4.js} +3 -3
  258. package/dist/interface/ha/{ConfigConditionSensorState-DwPY2W53.js → ConfigConditionSensorState-CI1CS9qa.js} +4 -4
  259. package/dist/interface/ha/{ConfigConditionSwitch-C9zW3TAK.js → ConfigConditionSwitch-DGoKb_ZM.js} +3 -3
  260. package/dist/interface/ha/{ConfigSensorValueInput-cKpE0FZE.js → ConfigSensorValueInput-BGQytgns.js} +2 -2
  261. package/dist/interface/ha/{ConfigTriggerDetection-C0S-k9O5.js → ConfigTriggerDetection-l_h4kt0X.js} +2 -2
  262. package/dist/interface/ha/{ConfigTriggerGeofence-CjmlCNj3.js → ConfigTriggerGeofence-Y2Od0L2_.js} +2 -2
  263. package/dist/interface/ha/{ConfigTriggerMqtt-YpTYEXuH.js → ConfigTriggerMqtt-DttCVDHe.js} +1 -1
  264. package/dist/interface/ha/{ConfigTriggerSensor-jTkbOjQw.js → ConfigTriggerSensor-O4mWaXnJ.js} +1 -1
  265. package/dist/interface/ha/{ConfigTriggerSystem-ChQOH5XE.js → ConfigTriggerSystem-C_uWI6kc.js} +2 -2
  266. package/dist/interface/ha/{ConfigTriggerWebhook--Xitqvob.js → ConfigTriggerWebhook-CY5vDxZe.js} +1 -1
  267. package/dist/interface/ha/{Console-BLBwNOGF.js → Console-DdOU0_jE.js} +2 -2
  268. package/dist/interface/ha/{CuiAutomationRunsDialog-DZpflYbm.js → CuiAutomationRunsDialog-_WF5J4hV.js} +2 -2
  269. package/dist/interface/ha/{CuiBottomSheet-x112x30L.js → CuiBottomSheet-Bzr2zhm3.js} +1 -1
  270. package/dist/interface/ha/{CuiCameraRecordings-kyJmGt96.js → CuiCameraRecordings-HqWrHpr-.js} +2 -2
  271. package/dist/interface/ha/{CuiCameraShares-C64w7YIg.js → CuiCameraShares-Bw1RlqC-.js} +2 -2
  272. package/dist/interface/ha/{CuiCameraTable-BcucTb-H.js → CuiCameraTable-DvIlmfmW.js} +2 -2
  273. package/dist/interface/ha/{CuiChartTable-HtK2jIrg.js → CuiChartTable-C6vRR9ny.js} +3 -3
  274. package/dist/interface/ha/{CuiConsole-B6UN73LC.js → CuiConsole-B6fDJfvq.js} +1 -1
  275. package/dist/interface/ha/{CuiDataTable-C06T8Rgf.js → CuiDataTable-BLL7vWD1.js} +1 -1
  276. package/dist/interface/ha/{CuiPluginCard-Ca1syMp2.js → CuiPluginCard-CsJ-dlra.js} +6 -6
  277. package/dist/interface/ha/{CuiPluginOAuthButton-B_kD1J7y.js → CuiPluginOAuthButton-ChNW42ux.js} +2 -2
  278. package/dist/interface/ha/{CuiPluginTrustBadge-BGnfwBkE.js → CuiPluginTrustBadge-CQtfi3UI.js} +1 -1
  279. package/dist/interface/ha/{CuiQRCode-C8afEdjI.js → CuiQRCode-DOj5PJo2.js} +2 -2
  280. package/dist/interface/ha/{CuiSchema-BDqA8ICl.js → CuiSchema-Dg43r2Vo.js} +2 -2
  281. package/dist/interface/ha/{CuiTopNavbarItem-Cowg2EeV.js → CuiTopNavbarItem-CMu_hCIP.js} +1 -1
  282. package/dist/interface/ha/{Faces-COKq1uOY.js → Faces-Ed0ytbse.js} +2 -2
  283. package/dist/interface/ha/{FirstSteps-B6Rpbo6X.js → FirstSteps-Dkw2Enre.js} +4 -4
  284. package/dist/interface/ha/{Floorplan-C7Z973FS.js → Floorplan-IdC1tgDr.js} +4 -4
  285. package/dist/interface/ha/{Instances-D5jpC7_k.js → Instances-dvDlInn-.js} +1 -1
  286. package/dist/interface/ha/{Logs-BQ7844YD.js → Logs-rUL_mLTJ.js} +6 -6
  287. package/dist/interface/ha/{Menu-BA3FMf84.js → Menu-CfMgYCN9.js} +2 -2
  288. package/dist/interface/ha/{Metrics-CW7eFTFq.js → Metrics-DYNvEdb-.js} +7 -7
  289. package/dist/interface/ha/{OAuthDeviceFlow-DY0EmFd2.js → OAuthDeviceFlow-vgBWOkzP.js} +3 -3
  290. package/dist/interface/ha/{Plugin-CDTqk1Za.js → Plugin-PqUW_696.js} +5 -5
  291. package/dist/interface/ha/{PluginConsole-BHPYWTQI.js → PluginConsole-CFJKNhQw.js} +4 -4
  292. package/dist/interface/ha/{PluginDetail-CCanv1XC.js → PluginDetail-cC8nut35.js} +5 -5
  293. package/dist/interface/ha/{PluginSearch-CN5u42N5.js → PluginSearch-BzSs0ibh.js} +4 -4
  294. package/dist/interface/ha/{PluginUpdateProgress-CYIL5ZH9.js → PluginUpdateProgress-CtM7lrl9.js} +3 -3
  295. package/dist/interface/ha/{Plugins-Cej_rQF0.js → Plugins-CzvlXEaH.js} +7 -7
  296. package/dist/interface/ha/{Recordings-CUBsiex_.js → Recordings-BtsW8I5D.js} +2 -2
  297. package/dist/interface/ha/{SensorEdit-CHw_qb02.js → SensorEdit-DMwyTDIG.js} +2 -2
  298. package/dist/interface/ha/{SensorHistory-CN-cU83N.js → SensorHistory-DoJhFbTC.js} +2 -2
  299. package/dist/interface/ha/{Sensors-CsDHqjPN.js → Sensors-BoRfutfx.js} +3 -3
  300. package/dist/interface/ha/{Settings-xYx7OlnI.js → Settings-vmfs1rfj.js} +2 -2
  301. package/dist/interface/ha/{SettingsAccount-CS3pzQOR.js → SettingsAccount-xJy6kGf6.js} +4 -4
  302. package/dist/interface/ha/{SettingsAppearance-DJ7N-8pK.js → SettingsAppearance-v9zeetcx.js} +3 -3
  303. package/dist/interface/ha/{SettingsBackup-CIa5Xieg.js → SettingsBackup-eO4r8MZe.js} +2 -2
  304. package/dist/interface/ha/{SettingsList-B15eyCEc.js → SettingsList-burOi4S6.js} +1 -1
  305. package/dist/interface/ha/{SettingsMqtt-CAV58dIf.js → SettingsMqtt-CjZERKR8.js} +2 -2
  306. package/dist/interface/ha/{SettingsNotifications-CaFA1fgA.js → SettingsNotifications-QCKfSffa.js} +6 -6
  307. package/dist/interface/ha/{SettingsRecordings-CdU1gIj-.js → SettingsRecordings-DzsXkzeu.js} +3 -3
  308. package/dist/interface/ha/{SettingsRemote-CfZF4rVJ.js → SettingsRemote-B0HZwZj3.js} +4 -4
  309. package/dist/interface/ha/{SettingsSystem-pAKtXD6a.js → SettingsSystem-Bc_c8XYh.js} +7 -7
  310. package/dist/interface/ha/{SettingsUsers-bb02QZmu.js → SettingsUsers-CxL65q1C.js} +3 -3
  311. package/dist/interface/ha/{Terminal-D8nt8rJZ.js → Terminal-DsX-_5R2.js} +2 -2
  312. package/dist/interface/ha/{Updates-CN1ovwX3.js → Updates-DG9i-tQu.js} +4 -4
  313. package/dist/interface/ha/{VariableInput-CknW9Awp.js → VariableInput-CcevSEwK.js} +1 -1
  314. package/dist/interface/ha/VersionsHandler-5GeFt6Lw.js +216 -0
  315. package/dist/interface/ha/{VirtualSensorCreate-DhYEEPoo.js → VirtualSensorCreate-dWN8FANX.js} +1 -1
  316. package/dist/interface/ha/{Workers-22Qvr1uT.js → Workers-D1y6eFKT.js} +6 -6
  317. package/dist/interface/ha/{api-jFJQoLDe.js → api-BgQ9AVgK.js} +1 -1
  318. package/dist/interface/ha/{api-BqtwQvFZ.js → api-DDUXI4DG.js} +7636 -7411
  319. package/dist/interface/ha/{auth-DYjwhf8n.js → auth-C8Vp1TkJ.js} +1 -1
  320. package/dist/interface/ha/{automationBlueprint-BinFQ4tN.js → automationBlueprint-DhRjWL2p.js} +1 -1
  321. package/dist/interface/ha/{base-c1lsE5TW.js → base-JFhfGFcr.js} +2 -2
  322. package/dist/interface/ha/{base-D_LAf3cS.js → base-SuFG39qr.js} +2 -2
  323. package/dist/interface/ha/cameraui-cards.js +1 -1
  324. package/dist/interface/ha/{cards-JO0NQxtH.js → cards-BGikU5nh.js} +4 -4
  325. package/dist/interface/ha/{config-BZ6AkzPk.js → config-WqhFqx8D.js} +1 -1
  326. package/dist/interface/ha/{dist-B7lgvbyI.js → dist-B6-R-H0I.js} +1 -1
  327. package/dist/interface/ha/{esm-DiBhi9zp.js → esm-B0AOriHG.js} +2 -2
  328. package/dist/interface/ha/{esm-CChFtwcx.js → esm-BJURq5pU.js} +4 -4
  329. package/dist/interface/ha/{esm-BGlkcEes.js → esm-BUN34MPG.js} +2 -2
  330. package/dist/interface/ha/{esm-6hnPZcZr.js → esm-Bih3VOl2.js} +1 -1
  331. package/dist/interface/ha/{esm-BKPZuThK.js → esm-CMQeJH3c.js} +2 -2
  332. package/dist/interface/ha/{esm-CvxDASXR.js → esm-CX7xaJ8m.js} +4 -4
  333. package/dist/interface/ha/{esm-XFPB9fYb.js → esm-CYrEjG_f.js} +2 -2
  334. package/dist/interface/ha/{esm-1sIZN4t7.js → esm-DHGj1GPK.js} +2 -2
  335. package/dist/interface/ha/{esm-BMx7MsZ_.js → esm-DIdsnkc_.js} +2 -2
  336. package/dist/interface/ha/{esm-CMTmAdHP.js → esm-DXHGazhG.js} +2 -2
  337. package/dist/interface/ha/{esm-B72ViJ7F.js → esm-Df31rl0C.js} +2 -2
  338. package/dist/interface/ha/{esm-CkoEL9YX.js → esm-WT4CLule.js} +2 -2
  339. package/dist/interface/ha/{esm-Demxl4zQ.js → esm-kzP5q0tS.js} +2 -2
  340. package/dist/interface/ha/{mqtt-DvoRfg48.js → mqtt-CQopAljB.js} +1 -1
  341. package/dist/interface/ha/{native-C8PbNqsJ.js → native-BVp2L4zs.js} +1 -1
  342. package/dist/interface/ha/{native-BaNeloQn.js → native-DpeL5PMH.js} +1 -1
  343. package/dist/interface/ha/{notifications-BXyPUJeI.js → notifications-C4IU7Zbu.js} +1 -1
  344. package/dist/interface/ha/{plugin-DAGqBiG_.js → plugin-l2y6Y_8_.js} +2 -2
  345. package/dist/interface/ha/{plugins-B7xVEI2U.js → plugins-C2n0mAnr.js} +1 -1
  346. package/dist/interface/ha/{rooms-wdWj7L04.js → rooms-qqdOrA2J.js} +1 -1
  347. package/dist/interface/ha/{server-BoeQx2s1.js → server-D6Yglz-z.js} +1 -1
  348. package/dist/interface/ha/{types-BLB8t9IM.js → types-BtcJ7st-.js} +1 -1
  349. package/dist/interface/ha/{ungrouped-BTlRpp_C.js → ungrouped-aASsOUNF.js} +1 -1
  350. package/dist/interface/ha/{updates-DJQ3mgFB.js → updates-BuAFU-ZQ.js} +5 -5
  351. package/dist/interface/ha/{useAppVersion-DBQHtFHV.js → useAppVersion-D0EOwpoO.js} +1 -1
  352. package/dist/interface/ha/{useLogsSocket-DUVEzjQv.js → useLogsSocket-CCewWMZM.js} +1 -1
  353. package/dist/interface/ha/{useNavLayout-Tm6brv5T.js → useNavLayout-B_QzdVtJ.js} +1 -1
  354. package/dist/interface/ha/{useServerRestart-qfZkaizw.js → useServerRestart-B0OMNlwZ.js} +1 -1
  355. package/dist/interface/ha/{useTabSwipe-DZZV2CAu.js → useTabSwipe-DG6Gx2Md.js} +1 -1
  356. package/dist/interface/ha/{useUpdateChannel-CAAsjUty.js → useUpdateChannel-CXDGlWX2.js} +2 -2
  357. package/dist/interface/ha/{useUpdatesSocket-UVjukmiK.js → useUpdatesSocket-BgCJLp_W.js} +1 -1
  358. package/dist/interface/ha/{useUserOptions-fca_GryG.js → useUserOptions-rirRksyl.js} +1 -1
  359. package/dist/interface/ha/{web-B7Dt2zZN.js → web-BTc3X5b5.js} +2 -2
  360. package/dist/interface/ha/{web-BPBZBCtX.js → web-BXYQbRzG.js} +1 -1
  361. package/dist/interface/ha/{web-DtVT7WYt.js → web-BcNKpSQe.js} +1 -1
  362. package/dist/interface/ha/{web-BjKL51lK-qwJdIpM1.js → web-BjKL51lK-BaEnqwsB.js} +1 -1
  363. package/dist/interface/ha/{web-DqRMXrnx.js → web-C-wyOM11.js} +1 -1
  364. package/dist/interface/ha/{web-I7Urp4AE.js → web-CR01Y58E.js} +1 -1
  365. package/dist/interface/ha/{web-C01i9qI1.js → web-CyoXGIAe.js} +1 -1
  366. package/dist/interface/ha/{web-DxJQZCiR.js → web-D0dRLhy1.js} +2 -2
  367. package/dist/interface/ha/{web-aSaPk7kr.js → web-DbfBnw4i.js} +1 -1
  368. package/dist/interface/ha/{web-0Kyq65na.js → web-DdHWxSOZ.js} +1 -1
  369. package/dist/interface/ha/{web-pMey9p3Y.js → web-DhyFnSBX.js} +1 -1
  370. package/dist/interface/ha/{web-Cpm1-DVe.js → web-Dk8xCKUO.js} +1 -1
  371. package/dist/interface/ha/{web-CH3JeXWa.js → web-DyAa7xFA.js} +2 -2
  372. package/dist/interface/ha/{web-BNdrPSpb.js → web-_pDCYOmR.js} +1 -1
  373. package/dist/interface/index.html +48 -48
  374. package/dist/interface/sw.js +1 -1
  375. package/dist/server/package.json +4 -4
  376. package/dist/server/requirements.txt +1 -1
  377. package/dist/server/src/api/controllers/cameras.controller.js +1 -1
  378. package/dist/server/src/api/controllers/cameras.controller.js.map +1 -1
  379. package/dist/server/src/api/routes/sensors.routes.js +1 -1
  380. package/dist/server/src/api/routes/sensors.routes.js.map +1 -1
  381. package/dist/server/src/camera/controller.js +1 -1
  382. package/dist/server/src/camera/controller.js.map +1 -1
  383. package/dist/server/src/camera/decoder/detection-pipeline.d.ts +5 -1
  384. package/dist/server/src/camera/decoder/detection-pipeline.js +20 -0
  385. package/dist/server/src/camera/decoder/detection-pipeline.js.map +1 -1
  386. package/dist/server/src/camera/decoder/event-manager.js +8 -1
  387. package/dist/server/src/camera/decoder/event-manager.js.map +1 -1
  388. package/dist/server/src/camera/decoder/nvr-sink.d.ts +1 -0
  389. package/dist/server/src/camera/decoder/nvr-sink.js +1 -1
  390. package/dist/server/src/camera/decoder/nvr-sink.js.map +1 -1
  391. package/dist/server/src/camera/decoder/worker.d.ts +7 -0
  392. package/dist/server/src/camera/decoder/worker.js +74 -29
  393. package/dist/server/src/camera/decoder/worker.js.map +1 -1
  394. package/dist/server/src/manager/types.d.ts +1 -0
  395. package/dist/server/src/manager/types.js +2 -0
  396. package/dist/server/src/manager/types.js.map +1 -1
  397. package/dist/server/src/remote/api/credentialStore.d.ts +1 -0
  398. package/dist/server/src/remote/api/credentialStore.js +24 -0
  399. package/dist/server/src/remote/api/credentialStore.js.map +1 -1
  400. package/package.json +4 -4
  401. package/dist/interface/assets/CuiBottomSheet-CNc2pbC7.js +0 -1
  402. package/dist/interface/assets/CuiCameraTable-Cgm7BoLZ.js +0 -1
  403. package/dist/interface/assets/CuiMarkdownContent-D2bWw1GN.js +0 -1
  404. package/dist/interface/assets/PluginSearch-C_4Txq7k.js +0 -1
  405. package/dist/interface/assets/SettingsAccount-DbArOHXx.js +0 -1
  406. package/dist/interface/assets/SettingsAppearance-CPrCyxBA.js +0 -1
  407. package/dist/interface/assets/VersionsHandler-DFef44HF.js +0 -7
  408. package/dist/interface/assets/api-Br1U09Hq.js +0 -4
  409. package/dist/interface/assets/cloudHandoff-Colhf5P9.js +0 -1
  410. package/dist/interface/assets/esm-BbJ0evRe.js +0 -1
  411. package/dist/interface/assets/esm-BhHeaCLC.js +0 -1
  412. package/dist/interface/assets/esm-BoDnt3g2.js +0 -1
  413. package/dist/interface/assets/esm-BvXpx-4p.js +0 -1
  414. package/dist/interface/assets/esm-BvcRUTNT.js +0 -1
  415. package/dist/interface/assets/esm-C0UOpApX.js +0 -1
  416. package/dist/interface/assets/esm-C43w04L-.js +0 -1
  417. package/dist/interface/assets/esm-CdrLDSBm.js +0 -1
  418. package/dist/interface/assets/esm-Cwg8vrH-.js +0 -1
  419. package/dist/interface/assets/esm-DKQwb4z2.js +0 -1
  420. package/dist/interface/assets/esm-DcJy8m_I.js +0 -1
  421. package/dist/interface/assets/esm-Dp7jb0si.js +0 -1
  422. package/dist/interface/assets/esm-cbRd6tNR.js +0 -1
  423. package/dist/interface/assets/esm-iDhBQslT.js +0 -1
  424. package/dist/interface/assets/native-BNjvFMoD.js +0 -1
  425. package/dist/interface/assets/native-XKbagpr7.js +0 -1
  426. package/dist/interface/assets/plugin-BStPT8lW.js +0 -1
  427. package/dist/interface/assets/useUserOptions-7qZi1YVO.js +0 -1
  428. package/dist/interface/assets/web-BFaZfzEP.js +0 -1
  429. package/dist/interface/assets/web-BdoMdiEl.js +0 -1
  430. package/dist/interface/assets/web-BjKL51lK-BiZEVgwj.js +0 -1
  431. package/dist/interface/assets/web-Bo0giiE9.js +0 -1
  432. package/dist/interface/assets/web-Bq6cS9c5.js +0 -1
  433. package/dist/interface/assets/web-Ckkk3gWT.js +0 -1
  434. package/dist/interface/assets/web-CsH298dH.js +0 -1
  435. package/dist/interface/assets/web-Cti9cQXr.js +0 -1
  436. package/dist/interface/assets/web-CtlJwfNS.js +0 -1
  437. package/dist/interface/assets/web-DUuNw0Ig.js +0 -1
  438. package/dist/interface/assets/web-Dz9QrW1k.js +0 -1
  439. package/dist/interface/assets/web-MA3uDo37.js +0 -1
  440. package/dist/interface/assets/web-UiUgCX6p.js +0 -1
  441. package/dist/interface/assets/web-zisLysQx.js +0 -1
  442. package/dist/interface/assets/workbox-window.prod.es5-CocanelX.js +0 -1
  443. package/dist/interface/ha/VersionsHandler-DL_zS-ms.js +0 -211
@@ -1 +1 @@
1
- import{Br as e,Ft as t,Gt as n,I as r,c as i,p as a,s as o,ti as s,xt as c,zt as l}from"./vendor-cameraui-C5_h4c-5.js";import{$ as u,An as d,C as f,Cr as p,Dn as m,Fn as h,Gt as g,In as _,Lt as v,Mt as ee,Nn as te,Pn as y,Vn as b,_n as x,an as S,br as ne,g as re,hn as C,k as ie,ln as w,mn as T,o as ae,pn as E,qn as oe,un as se,wn as ce}from"./api-Br1U09Hq.js";import{$t as le,An as ue,Cn as de,Dn as fe,Kn as pe,Kt as me,Mn as D,Pn as O,Qt as k,Rn as he,Wn as A,Xn as j,Xt as ge,Yn as M,an as N,ar as _e,b as ve,dr as ye,fn as P,gr as F,hr as I,in as L,jn as be,mn as R,on as z,pr as B,rn as V,rr as H,sn as U,sr as W,ur as xe,v as Se,vr as G,wn as Ce,xn as we,y as Te,yn as Ee,yr as K}from"./vendor-AX0A8AMd.js";import{a as De}from"./intercomService-CmFnb1sI.js";import{p as Oe}from"./vendor-core-DeodbhZZ.js";import{K as ke,R as Ae,U as je,o as Me,x as Ne}from"./vendor-primevue-C9-jpd5L.js";import{a as q,i as J,n as Y,r as X,t as Z}from"./vendor-dnd-onyWAbsd.js";import{t as Pe}from"./close-ChGy_BeH.js";import{n as Fe,t as Ie}from"./microphone-CGwzrMxl.js";import{t as Le}from"./plus-CxnlTOHI.js";import{t as Re}from"./delete-CiJ6ng5_.js";import{t as ze}from"./CuiCameraPipCard-BlZJUCJP.js";import{n as Be,t as Ve}from"./CuiTopNavbarItem-C-7LPPKD.js";import{t as He}from"./vendor-gridstack-C5hqQCSi.js";var Ue={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function We(e,t){return D(),U(`svg`,Ue,[...t[0]||=[L(`path`,{fill:`currentColor`,d:`m9.5 13.09l1.41 1.41l-4.5 4.5H10v2H3v-7h2v3.59zm1.41-3.59L9.5 10.91L5 6.41V10H3V3h7v2H6.41zm3.59 3.59l4.5 4.5V14h2v7h-7v-2h3.59l-4.5-4.5zM13.09 9.5l4.5-4.5H14V3h7v7h-2V6.41l-4.5 4.5z`},null,-1)]])}var Ge=H({name:`mdi-arrow-expand-all`,render:We}),Ke={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function qe(e,t){return D(),U(`svg`,Ke,[...t[0]||=[L(`path`,{fill:`currentColor`,d:`M7.5 5.6L5 7l1.4-2.5L5 2l2.5 1.4L10 2L8.6 4.5L10 7zm12 9.8L22 14l-1.4 2.5L22 19l-2.5-1.4L17 19l1.4-2.5L17 14zM22 2l-1.4 2.5L22 7l-2.5-1.4L17 7l1.4-2.5L17 2l2.5 1.4zm-8.66 10.78l2.44-2.44l-2.12-2.12l-2.44 2.44zm1.03-5.49l2.34 2.34c.39.37.39 1.02 0 1.41L5.04 22.71c-.39.39-1.04.39-1.41 0l-2.34-2.34c-.39-.37-.39-1.02 0-1.41L12.96 7.29c.39-.39 1.04-.39 1.41 0`},null,-1)]])}var Je=H({name:`mdi-auto-fix`,render:qe}),Ye={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function Xe(e,t){return D(),U(`svg`,Ye,[...t[0]||=[L(`path`,{fill:`currentColor`,"fill-rule":`evenodd`,d:`M9 3a2 2 0 0 1 2 2v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2zm10 0a2 2 0 0 1 2 2v2a2 2 0 0 1-2 2h-4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2zm2 10a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2h4a2 2 0 0 0 2-2zM9 15a2 2 0 0 1 2 2v2a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-2a2 2 0 0 1 2-2z`,"clip-rule":`evenodd`},null,-1)]])}var Ze=H({name:`mingcute-grid2-fill`,render:Xe}),Qe={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function $e(e,t){return D(),U(`svg`,Qe,[...t[0]||=[L(`path`,{fill:`currentColor`,d:`M13 6v5h5V7.75L22.25 12L18 16.25V13h-5v5h3.25L12 22.25L7.75 18H11v-5H6v3.25L1.75 12L6 7.75V11h5V6H7.75L12 1.75L16.25 6z`},null,-1)]])}var et=H({name:`mdi-cursor-move`,render:$e}),tt={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function nt(e,t){return D(),U(`svg`,tt,[...t[0]||=[L(`path`,{fill:`currentColor`,d:`M17.41 2H6.59A4.58 4.58 0 0 0 2 6.59v10.82A4.58 4.58 0 0 0 6.59 22h10.82A4.58 4.58 0 0 0 22 17.41V6.59A4.58 4.58 0 0 0 17.41 2m-2.653 12.447a1.924 1.924 0 0 1-1.924 1.923h-5.86a1.924 1.924 0 0 1-1.923-1.923v-4.87a1.923 1.923 0 0 1 1.927-1.924h5.856a1.925 1.925 0 0 1 1.924 1.924Zm4.2.74a.771.771 0 0 1-1.266.59l-2.211-1.854a.85.85 0 0 1-.3-.653v-2.52a.85.85 0 0 1 .31-.657l2.206-1.82a.769.769 0 0 1 1.26.594Z`},null,-1)]])}var rt=H({name:`cbi-iosfacetime`,render:nt}),it={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function at(e,t){return D(),U(`svg`,it,[...t[0]||=[L(`path`,{fill:`currentColor`,d:`m8.471 7.237l3.056 12.992c.233.993 1.63 1.04 1.929.065l2.945-9.58l.384 1.527a1 1 0 0 0 .97.756H21a1 1 0 1 0 0-2h-2.466l-1.069-4.241c-.247-.981-1.628-1.017-1.925-.05l-2.912 9.472L9.475 2.771c-.24-1.02-1.688-1.03-1.943-.014l-2.065 8.24H3a1 1 0 0 0 0 2h3.247a1 1 0 0 0 .97-.757z`},null,-1)]])}var ot=H({name:`fluent-pulse-24-filled`,render:at}),st={viewBox:`0 0 16 16`,width:`1.2em`,height:`1.2em`};function ct(e,t){return D(),U(`svg`,st,[...t[0]||=[L(`path`,{fill:`currentColor`,d:`M7.557 2.066A.75.75 0 0 1 8 2.75v10.5a.75.75 0 0 1-1.248.56L3.59 11H2a1 1 0 0 1-1-1V6a1 1 0 0 1 1-1h1.59l3.162-2.81a.75.75 0 0 1 .805-.124m5.393.984a.75.75 0 1 0-1.06 1.06a5.5 5.5 0 0 1 0 7.78a.75.75 0 1 0 1.06 1.06a7 7 0 0 0 0-9.9`},null,-1),L(`path`,{fill:`currentColor`,d:`M10.828 5.172a.75.75 0 1 0-1.06 1.06a2.5 2.5 0 0 1 0 3.536a.75.75 0 1 0 1.06 1.06a4 4 0 0 0 0-5.656`},null,-1)]])}var lt=H({name:`heroicons-speaker-wave-16-solid`,render:ct}),Q={viewBox:`0 0 16 16`,width:`1.2em`,height:`1.2em`};function ut(e,t){return D(),U(`svg`,Q,[...t[0]||=[L(`path`,{fill:`currentColor`,d:`M7.557 2.066A.75.75 0 0 1 8 2.75v10.5a.75.75 0 0 1-1.248.56L3.59 11H2a1 1 0 0 1-1-1V6a1 1 0 0 1 1-1h1.59l3.162-2.81a.75.75 0 0 1 .805-.124M11.28 5.72a.75.75 0 1 0-1.06 1.06L11.44 8l-1.22 1.22a.75.75 0 1 0 1.06 1.06l1.22-1.22l1.22 1.22a.75.75 0 1 0 1.06-1.06L13.56 8l1.22-1.22a.75.75 0 0 0-1.06-1.06L12.5 6.94z`},null,-1)]])}var dt=H({name:`heroicons-speaker-x-mark-16-solid`,render:ut}),ft={viewBox:`0 0 48 48`,width:`1.2em`,height:`1.2em`};function pt(e,t){return D(),U(`svg`,ft,[...t[0]||=[L(`g`,{fill:`none`,stroke:`currentColor`,"stroke-linejoin":`round`,"stroke-width":`4`},[L(`path`,{fill:`currentColor`,d:`M16.866 7.47A18 18 0 0 0 16 13c0 9.941 8.059 18 18 18a17.9 17.9 0 0 0 7.134-1.47C38.801 36.767 32.012 42 24 42c-9.941 0-18-8.059-18-18c0-7.407 4.473-13.768 10.866-16.53Z`}),L(`path`,{"stroke-linecap":`round`,d:`M31.66 10H41l-10 8h10`})],-1)]])}var mt=H({name:`icon-park-solid-sleep`,render:pt}),$={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function ht(e,t){return D(),U(`svg`,$,[...t[0]||=[L(`path`,{fill:`currentColor`,d:`M10.4 13.45h3.2l.6 1.625q.075.2.238.313t.362.112q.35 0 .538-.275t.062-.6l-2.55-6.7q-.075-.2-.237-.312T12.25 7.5h-.5q-.2 0-.363.113t-.237.312L8.625 14.65q-.125.3.05.575t.525.275q.2 0 .363-.112t.237-.313zm.4-1.15L11.95 9h.1l1.15 3.3zM12 22q-2.075 0-3.9-.788t-3.175-2.137T2.788 15.9T2 12q0-.8.125-1.6T2.5 8.825q.125-.4.513-.537t.737.062q.375.2.538.588t.037.812q-.15.55-.238 1.113T4 12q0 3.35 2.325 5.675T12 20t5.675-2.325T20 12t-2.325-5.675T12 4q-.6 0-1.187.087T9.65 4.35q-.425.125-.8-.025T8.3 3.8t-.013-.762t.563-.513q.75-.275 1.55-.4T12 2q2.075 0 3.9.788t3.175 2.137T21.213 8.1T22 12t-.788 3.9t-2.137 3.175t-3.175 2.138T12 22M4.438 6.563Q4 6.125 4 5.5t.438-1.062T5.5 4t1.063.438T7 5.5t-.437 1.063T5.5 7t-1.062-.437M12 12`},null,-1)]])}var gt=H({name:`material-symbols-motion-photos-auto-outline-rounded`,render:ht}),_t={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function vt(e,t){return D(),U(`svg`,_t,[...t[0]||=[L(`path`,{fill:`currentColor`,d:`M21 15v3h3v2h-3v3h-2v-3h-3v-2h3v-3zm-7 3H3V6h16v7h2V6c0-1.11-.89-2-2-2H3a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h11z`},null,-1)]])}var yt=H({name:`mdi-card-plus-outline`,render:vt}),bt={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function xt(e,t){return D(),U(`svg`,bt,[...t[0]||=[L(`path`,{fill:`currentColor`,d:`M12 2a7 7 0 0 1 7 7a7 7 0 0 1-7 7a7 7 0 0 1-7-7a7 7 0 0 1 7-7m0 2a5 5 0 0 0-5 5a5 5 0 0 0 5 5a5 5 0 0 0 5-5a5 5 0 0 0-5-5m0 2a3 3 0 0 1 3 3a3 3 0 0 1-3 3a3 3 0 0 1-3-3a3 3 0 0 1 3-3M6 22a2 2 0 0 1-2-2c0-.38.1-.73.29-1.03l1.82-3.16A9 9 0 0 0 12 18c2.25 0 4.31-.83 5.89-2.19l1.82 3.16c.19.3.29.65.29 1.03a2 2 0 0 1-2 2z`},null,-1)]])}var St=H({name:`mdi-webcam`,render:xt}),Ct={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function wt(e,t){return D(),U(`svg`,Ct,[...t[0]||=[L(`path`,{fill:`currentColor`,d:`M9.367 2.25h5.266c1.092 0 1.958 0 2.655.057c.714.058 1.317.18 1.869.46a4.75 4.75 0 0 1 2.075 2.077c.281.55.403 1.154.461 1.868c.057.697.057 1.563.057 2.655v5.266c0 1.092 0 1.958-.057 2.655c-.058.714-.18 1.317-.46 1.869a4.75 4.75 0 0 1-2.076 2.075c-.552.281-1.155.403-1.869.461c-.697.057-1.563.057-2.655.057H9.367c-1.092 0-1.958 0-2.655-.057c-.714-.058-1.317-.18-1.868-.46a4.75 4.75 0 0 1-2.076-2.076c-.281-.552-.403-1.155-.461-1.869c-.057-.697-.057-1.563-.057-2.655V9.367c0-1.092 0-1.958.057-2.655c.058-.714.18-1.317.46-1.868a4.75 4.75 0 0 1 2.077-2.076c.55-.281 1.154-.403 1.868-.461c.697-.057 1.563-.057 2.655-.057M10.25 8a.75.75 0 0 0-1.5 0v8a.75.75 0 0 0 1.5 0v-3.25h3.5V16a.75.75 0 0 0 1.5 0V8a.75.75 0 0 0-1.5 0v3.25h-3.5z`},null,-1)]])}var Tt=H({name:`mynaui-letter-h-square-solid`,render:wt}),Et={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function Dt(e,t){return D(),U(`svg`,Et,[...t[0]||=[L(`path`,{fill:`currentColor`,d:`M9.367 2.25h5.266c1.092 0 1.958 0 2.655.057c.714.058 1.317.18 1.869.46a4.75 4.75 0 0 1 2.075 2.077c.281.55.403 1.154.461 1.868c.057.697.057 1.563.057 2.655v5.266c0 1.092 0 1.958-.057 2.655c-.058.714-.18 1.317-.46 1.869a4.75 4.75 0 0 1-2.076 2.075c-.552.281-1.155.403-1.869.461c-.697.057-1.563.057-2.655.057H9.367c-1.092 0-1.958 0-2.655-.057c-.714-.058-1.317-.18-1.868-.46a4.75 4.75 0 0 1-2.076-2.076c-.281-.552-.403-1.155-.461-1.869c-.057-.697-.057-1.563-.057-2.655V9.367c0-1.092 0-1.958.057-2.655c.058-.714.18-1.317.46-1.868a4.75 4.75 0 0 1 2.077-2.076c.55-.281 1.154-.403 1.868-.461c.697-.057 1.563-.057 2.655-.057M10.25 8a.75.75 0 0 0-1.5 0v7.5c0 .414.336.75.75.75H15a.75.75 0 0 0 0-1.5h-4.75z`},null,-1)]])}var Ot=H({name:`mynaui-letter-l-square-solid`,render:Dt}),kt={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function At(e,t){return D(),U(`svg`,kt,[...t[0]||=[L(`path`,{fill:`currentColor`,d:`M9.367 2.25h5.266c1.092 0 1.958 0 2.655.057c.714.058 1.317.18 1.869.46a4.75 4.75 0 0 1 2.075 2.077c.281.55.403 1.154.461 1.868c.057.697.057 1.563.057 2.655v5.266c0 1.092 0 1.958-.057 2.655c-.058.714-.18 1.317-.46 1.869a4.75 4.75 0 0 1-2.076 2.075c-.552.281-1.155.403-1.869.461c-.697.057-1.563.057-2.655.057H9.367c-1.092 0-1.958 0-2.655-.057c-.714-.058-1.317-.18-1.868-.46a4.75 4.75 0 0 1-2.076-2.076c-.281-.552-.403-1.155-.461-1.869c-.057-.697-.057-1.563-.057-2.655V9.367c0-1.092 0-1.958.057-2.655c.058-.714.18-1.317.46-1.868a4.75 4.75 0 0 1 2.077-2.076c.55-.281 1.154-.403 1.868-.461c.697-.057 1.563-.057 2.655-.057m.233 5.3A.75.75 0 0 0 8.25 8v8a.75.75 0 0 0 1.5 0v-5.75l1.65 2.2a.75.75 0 0 0 1.2 0l1.65-2.2V16a.75.75 0 0 0 1.5 0V8a.75.75 0 0 0-1.35-.45l-2.4 3.2z`},null,-1)]])}var jt=H({name:`mynaui-letter-m-square-solid`,render:At}),Mt={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function Nt(e,t){return D(),U(`svg`,Mt,[...t[0]||=[L(`path`,{fill:`currentColor`,d:`M12 .36A5.4 5.4 0 0 0 6.62 5.3a5.4 5.4 0 0 0-1.22-.14a5.4 5.4 0 0 0-2.143 10.357a5.4 5.4 0 0 0-.737 2.723a5.4 5.4 0 0 0 9.54 3.466a5.4 5.4 0 0 0 8.833-6.137a5.4 5.4 0 0 0-3.505-10.152A5.4 5.4 0 0 0 12 .36M6.283 7.228h10.592c.746 0 1.352.605 1.352 1.349v7.646a1.35 1.35 0 0 1-1.352 1.348h-3.608l-7.24 3.55l1.1-3.55h-.844a1.35 1.35 0 0 1-1.352-1.348V8.577c0-.744.606-1.349 1.352-1.349`},null,-1)]])}var Pt=H({name:`simple-icons-webrtc`,render:Nt}),Ft={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function It(e,t){return D(),U(`svg`,Ft,[...t[0]||=[L(`path`,{fill:`currentColor`,d:`M9 3h2v2H9zm4 0h2v2h-2zM9 7h2v2H9zm4 0h2v2h-2zm-4 4h2v2H9zm4 0h2v2h-2zm-4 4h2v2H9zm4 0h2v2h-2zm-4 4h2v2H9zm4 0h2v2h-2z`},null,-1)]])}var Lt=H({name:`mdi-drag-vertical`,render:It}),Rt={class:`text-sm text-muted truncate`},zt=d(R({__name:`ViewDnDDrag`,props:{camera:{},isDropped:{type:Boolean},canDrag:{type:Boolean}},setup(e){let{camera:t,canDrag:n}=B(e),r=A(`boxRef`),i=xe(null),a=W(0),o=W(0),s=W(!1),{x:c,y:u}=_(),{isTouch:d}=h(),[f,p]=J(()=>({type:`camera-sidebar`,options:{dropEffect:`copy`},item:t.value,canDrag:n.value,collect:e=>({style:{opacity:e.isDragging()?.4:1},isDragging:e.isDragging()})})),g=V(()=>f.value.isDragging),v=V(()=>g.value&&d.value);function ee(e){d.value&&e.preventDefault()}function te(){i.value&&document.body.contains(i.value)&&document.body.removeChild(i.value),i.value=null}function y(){if(te(),!r.value)return;let e=r.value.cloneNode(!0),t=r.value.getBoundingClientRect();e.style.width=`${t.width}px`,e.style.height=`${t.height}px`,e.classList.add(`drag-preview`),e.style.position=`fixed`,e.style.left=`${c.value-a.value}px`,e.style.top=`${u.value-o.value}px`,document.body.appendChild(e),i.value=e}function b(){s.value=!1,te()}function x(){b(),s.value=!0;let e=r.value?.getBoundingClientRect();e&&(a.value=c.value-e.left,o.value=u.value-e.top,y())}function S(){!i.value||!s.value||requestAnimationFrame(()=>{i.value&&(i.value.style.left=`${c.value-a.value}px`,i.value.style.top=`${u.value-o.value}px`)})}return pe(v,e=>e?x():b()),pe([c,u],()=>S(),{flush:`sync`}),fe(()=>b()),(n,i)=>{let a=Lt,o=m,s=l;return D(),U(`div`,{ref_key:`boxRef`,ref:r,onDragstart:ee},[L(`div`,{ref:I(p),style:G(I(f).style)},[P(s,{disabled:e.isDropped,fluid:``,severity:`secondary`,class:`cui-rounded-corner dark-mode shadow-sm items-center justify-normal`,style:G({cursor:e.isDropped?`not-allowed`:`grab`})},{default:M(()=>[P(a,{size:`20`,class:`text-muted mr-2`}),P(o,{camera:I(t),width:`110px`,class:F([`cui-rounded-corner shadow-md overflow-hidden`,{"opacity-30":e.isDropped}])},null,8,[`camera`,`class`]),L(`span`,Rt,K(I(t).name),1)]),_:1},8,[`disabled`,`style`])],4)],544)}}}),[[`__scopeId`,`data-v-5498a5c0`]]),Bt={editMode:!1,rearrangeMode:!1,viewSize:1},Vt=Object.fromEntries(Object.entries({1:{cols:1,rows:1},4:{cols:2,rows:2},6:{cols:3,rows:3},7:{cols:4,rows:4},9:{cols:3,rows:3},10:{cols:4,rows:4},12:{cols:6,rows:6},13:{cols:4,rows:4},15:{cols:12,rows:12},16:{cols:4,rows:4},20:{cols:6,rows:6},26:{cols:12,rows:12}}).map(([e,t])=>[e,{cols:t.cols*16,rows:t.rows*16}])),Ht=e=>e.map(e=>({x:e.x*16,y:e.y*16,w:e.w*16,h:e.h*16})),Ut=Object.fromEntries(Object.entries({1:[{x:0,y:0,w:1,h:1}],4:[{x:0,y:0,w:1,h:1},{x:1,y:0,w:1,h:1},{x:0,y:1,w:1,h:1},{x:1,y:1,w:1,h:1}],6:[{x:0,y:0,w:2,h:2},{x:2,y:0,w:1,h:1},{x:2,y:1,w:1,h:1},{x:0,y:2,w:1,h:1},{x:1,y:2,w:1,h:1},{x:2,y:2,w:1,h:1}],7:[{x:0,y:0,w:2,h:2},{x:2,y:0,w:2,h:2},{x:0,y:2,w:2,h:2},{x:2,y:2,w:1,h:1},{x:3,y:2,w:1,h:1},{x:2,y:3,w:1,h:1},{x:3,y:3,w:1,h:1}],9:[{x:0,y:0,w:1,h:1},{x:1,y:0,w:1,h:1},{x:2,y:0,w:1,h:1},{x:0,y:1,w:1,h:1},{x:1,y:1,w:1,h:1},{x:2,y:1,w:1,h:1},{x:0,y:2,w:1,h:1},{x:1,y:2,w:1,h:1},{x:2,y:2,w:1,h:1}],10:[{x:0,y:0,w:2,h:2},{x:0,y:2,w:2,h:2},{x:2,y:0,w:1,h:1},{x:3,y:0,w:1,h:1},{x:2,y:1,w:1,h:1},{x:3,y:1,w:1,h:1},{x:2,y:2,w:1,h:1},{x:3,y:2,w:1,h:1},{x:2,y:3,w:1,h:1},{x:3,y:3,w:1,h:1}],12:[{x:0,y:0,w:3,h:3},{x:3,y:0,w:3,h:3},{x:0,y:3,w:3,h:3},{x:3,y:3,w:1,h:1},{x:4,y:3,w:1,h:1},{x:5,y:3,w:1,h:1},{x:3,y:4,w:1,h:1},{x:4,y:4,w:1,h:1},{x:5,y:4,w:1,h:1},{x:3,y:5,w:1,h:1},{x:4,y:5,w:1,h:1},{x:5,y:5,w:1,h:1}],13:[{x:0,y:0,w:2,h:2},{x:2,y:0,w:1,h:1},{x:3,y:0,w:1,h:1},{x:2,y:1,w:1,h:1},{x:3,y:1,w:1,h:1},{x:0,y:2,w:1,h:1},{x:1,y:2,w:1,h:1},{x:2,y:2,w:1,h:1},{x:3,y:2,w:1,h:1},{x:0,y:3,w:1,h:1},{x:1,y:3,w:1,h:1},{x:2,y:3,w:1,h:1},{x:3,y:3,w:1,h:1}],15:[{x:0,y:0,w:6,h:6},{x:6,y:0,w:6,h:6},{x:0,y:6,w:3,h:3},{x:3,y:6,w:3,h:3},{x:0,y:9,w:3,h:3},{x:3,y:9,w:3,h:3},{x:6,y:6,w:2,h:2},{x:8,y:6,w:2,h:2},{x:10,y:6,w:2,h:2},{x:6,y:8,w:2,h:2},{x:8,y:8,w:2,h:2},{x:10,y:8,w:2,h:2},{x:6,y:10,w:2,h:2},{x:8,y:10,w:2,h:2},{x:10,y:10,w:2,h:2}],16:[{x:0,y:0,w:1,h:1},{x:1,y:0,w:1,h:1},{x:2,y:0,w:1,h:1},{x:3,y:0,w:1,h:1},{x:0,y:1,w:1,h:1},{x:1,y:1,w:1,h:1},{x:2,y:1,w:1,h:1},{x:3,y:1,w:1,h:1},{x:0,y:2,w:1,h:1},{x:1,y:2,w:1,h:1},{x:2,y:2,w:1,h:1},{x:3,y:2,w:1,h:1},{x:0,y:3,w:1,h:1},{x:1,y:3,w:1,h:1},{x:2,y:3,w:1,h:1},{x:3,y:3,w:1,h:1}],20:[{x:0,y:0,w:3,h:3},{x:0,y:3,w:3,h:3},{x:3,y:0,w:1,h:1},{x:4,y:0,w:1,h:1},{x:5,y:0,w:1,h:1},{x:3,y:1,w:1,h:1},{x:4,y:1,w:1,h:1},{x:5,y:1,w:1,h:1},{x:3,y:2,w:1,h:1},{x:4,y:2,w:1,h:1},{x:5,y:2,w:1,h:1},{x:3,y:3,w:1,h:1},{x:4,y:3,w:1,h:1},{x:5,y:3,w:1,h:1},{x:3,y:4,w:1,h:1},{x:4,y:4,w:1,h:1},{x:5,y:4,w:1,h:1},{x:3,y:5,w:1,h:1},{x:4,y:5,w:1,h:1},{x:5,y:5,w:1,h:1}],26:[{x:0,y:0,w:3,h:3},{x:3,y:0,w:3,h:3},{x:0,y:3,w:3,h:3},{x:3,y:3,w:3,h:3},{x:6,y:0,w:2,h:2},{x:8,y:0,w:2,h:2},{x:10,y:0,w:2,h:2},{x:6,y:2,w:2,h:2},{x:8,y:2,w:2,h:2},{x:10,y:2,w:2,h:2},{x:6,y:4,w:2,h:2},{x:8,y:4,w:2,h:2},{x:10,y:4,w:2,h:2},{x:0,y:6,w:2,h:2},{x:2,y:6,w:2,h:2},{x:4,y:6,w:2,h:2},{x:0,y:8,w:2,h:2},{x:2,y:8,w:2,h:2},{x:4,y:8,w:2,h:2},{x:0,y:10,w:2,h:2},{x:2,y:10,w:2,h:2},{x:4,y:10,w:2,h:2},{x:6,y:6,w:3,h:3},{x:9,y:6,w:3,h:3},{x:6,y:9,w:3,h:3},{x:9,y:9,w:3,h:3}]}).map(([e,t])=>[e,Ht(t)])),Wt={class:`text-lg font-semibold text-white`},Gt={class:`flex flex-col gap-3 w-full h-full overflow-y-auto`},Kt={class:`cui-label`},qt={key:0,class:`text-muted text-sm`},Jt=R({__name:`ViewDnDSidebar`,props:{cameras:{},droppedCameras:{},title:{}},emits:[`changeViewSize`],setup(e,{emit:t}){let n=e,r=t,{droppedCameras:i}=B(n);function a(e){return i.value.some(t=>t.name===e.name)}return(t,n)=>{let i=l,o=zt;return D(),U(`div`,{class:`sidebar-view-background flex flex-col p-2 border-[1px] border-color gap-2 rounded-xl`,style:G({width:`${I(400)}px`})},[L(`span`,Wt,K(e.title),1),L(`div`,Gt,[P(i,{fluid:``,label:`Change grid size`,class:`cui-button-small dark-mode shrink-0 my-4`,onClick:n[0]||=e=>r(`changeViewSize`)}),L(`label`,Kt,K(t.$t(`components.view_box.available_streams`)),1),(D(!0),U(le,null,O(e.cameras,(e,t)=>(D(),U(`div`,{key:t},[P(o,{camera:e,"is-dropped":a(e),"can-drag":!a(e)},null,8,[`camera`,`is-dropped`,`can-drag`])]))),128)),e.cameras.length?z(``,!0):(D(),U(`span`,qt,K(t.$t(`components.view_box.no_cameras`)),1))])],4)}}}),Yt={key:1,class:`w-full h-full bg-[#1a1a1a] flex items-center justify-center`},Xt={key:2,class:`w-full h-full bg-[#111]`},Zt={key:1,class:`w-full h-full flex items-center justify-center`},Qt={key:0},$t=d(R({__name:`ViewDnDCard`,props:{camera:{},cameras:{},droppedCameras:{},mode:{},index:{},cameraCardProps:{},cameraCardModels:{},onDrop:{type:Function}},emits:[`drop`,`remove`,`expand`],setup(e,{expose:t,emit:r}){let i=e,a=r,{lgBreakpoint:o}=te(),{camera:c,mode:u,cameras:d,droppedCameras:f}=B(i),p=A(`boxRef`),h=A(`containerRef`),g=A(`playerRef`),_=A(`menuRef`),{width:v}=s(h),[ee,y]=X({accept:`camera-sidebar`,drop:i.onDrop,collect:e=>({isOver:e.isOver(),canDrop:e.canDrop()&&!c.value}),canDrop:()=>u.value===`edit`&&!c.value}),b=V(()=>ee.value.canDrop&&ee.value.isOver),x=V(()=>u.value===`edit`?b.value?`#171717`:`#202020`:`#000`),S=V(()=>v.value<=200),ne=V(()=>d.value.filter(e=>!f.value.some(t=>t.name===e.name))),re=V(()=>ne.value.map(e=>({label:e.name,onClick:()=>a(`drop`,e)})));function ie(e){g.value?.toggleMute(e)}async function w(e,t){await g.value?.toggleMicrophone(e,t)}function T(e){g.value?.toggleActivityMode(e)}async function ae(e){await g.value?.toggleSourceRole(e)}async function E(e){await g.value?.toggleStreamingMode(e)}function oe(e){g.value?.toggleBbox(e)}function se(e){g.value?.togglePip(e)}return t({togglePlayerMute:ie,toggleMicrophone:w,togglePlayerActivityMode:T,togglePlayerSourceRole:ae,togglePlayerStreamingMode:E,togglePlayerBbox:oe,togglePip:se}),(t,r)=>{let i=ze,s=Le,f=Pe,v=l,ee=m,te=C,b=n;return D(),U(`div`,{ref_key:`boxRef`,ref:p,class:`view-dnd-card`},[I(u)===`normal`||I(u)===`rearrange`?(D(),U(le,{key:0},[I(c)?(D(),N(i,de({key:0,ref_key:`playerRef`,ref:g},e.cameraCardProps,{"activity-mode":e.cameraCardModels?.activityMode,"source-role":e.cameraCardModels?.sourceRole,"streaming-mode":e.cameraCardModels?.streamingMode,"camera-info":I(c),class:`w-full h-full`,onExpand:r[0]||=e=>a(`expand`,I(c),e)}),null,16,[`activity-mode`,`source-role`,`streaming-mode`,`camera-info`])):I(u)===`rearrange`?(D(),U(`div`,Yt,[P(s,{class:`w-6 h-6 text-white/20`})])):(D(),U(`div`,Xt))],64)):I(u)===`edit`?(D(),U(le,{key:1},[L(`div`,{ref:I(y),style:G({backgroundColor:I(x)}),class:`w-full h-full`},[I(c)?(D(),U(`div`,{key:0,ref_key:`containerRef`,ref:h,class:`w-full h-full flex items-center justify-center relative min-w-0`},[P(v,{class:F([`z-1`,{"cui-icon-lg":I(S),"cui-button-small max-w-[85%]":!I(S)}]),label:I(S)?void 0:I(c).name,onClick:r[1]||=k(e=>a(`remove`,I(c)),[`prevent`])},{icon:M(()=>[P(f)]),_:1},8,[`class`,`label`]),P(ee,{camera:I(c),class:`absolute w-full h-full top-0 left-0 bg-black/50 opacity-20`},null,8,[`camera`])],512)):I(o)?z(``,!0):(D(),U(`div`,Zt,[I(d).length?(D(),N(v,{key:1,text:``,rounded:``,class:`cui-icon-md`,onClick:I(_)?.toggleMenu},{icon:M(()=>[P(s,{width:`100%`,height:`100%`})]),_:1},8,[`onClick`])):j((D(),U(`div`,Qt,[P(v,{text:``,rounded:``,disabled:``,class:`cui-icon-md`},{icon:M(()=>[P(s,{width:`100%`,height:`100%`})]),_:1})])),[[b,{value:t.$t(`views.camview.no_cameras`)},void 0,{top:!0}]])]))],4),P(te,{ref_key:`menuRef`,ref:_,items:I(re),popover:{pt:{content:{class:`p-0! rounded-xl! overflow-hidden!`}}}},null,8,[`items`])],64)):z(``,!0)],512)}}}),[[`__scopeId`,`data-v-ca177470`]]),en={class:`w-full h-full flex flex-row`},tn=[`gs-id`,`gs-x`,`gs-y`,`gs-w`,`gs-h`],nn={class:`grid-stack-item-content`},rn={key:0,class:`absolute top-2 left-2 z-20 px-2 py-1 rounded-md bg-black/75 text-white text-xs tabular-nums pointer-events-none select-none`},an=d(R({__name:`CuiCameraViewDnD`,props:we({cameras:{},viewSize:{},cards:{},title:{},editMode:{type:Boolean},rearrangeMode:{type:Boolean},cameraCardProps:{},cameraCardModels:{}},Bt),emits:[`drop`,`remove`,`changeViewSize`,`expand`,`rearrange`],setup(e,{expose:t,emit:n}){let r=e,i=n,{isTouch:a}=h(),{smBreakpoint:u,lgBreakpoint:d}=te(),p=Ee(o,void 0),m=f(),{routeFrom:g,routeTo:_}=Oe(m),{editMode:v,rearrangeMode:ee,viewSize:y,cards:b,cameraCardProps:x}=B(r),S=A(`viewRef`),ne=A(`wrapperRef`),re=A(`gridRef`),C=A(`cardRefs`),ie=W(),w=W(),T=null,ae=W(),E=W({w:0,h:0}),{isFullscreen:oe,toggle:ce}=c(S,{mode:`scroll`}),de=s(S),me=s(ne),k=V(()=>v.value?`edit`:ee.value?`rearrange`:`normal`),he=V(()=>b.value.map((e,t)=>({card:e,index:t})).filter(({card:e})=>k.value===`edit`||e.lastDroppedCamera!==void 0)),_e=V(()=>ie.value??w.value),ve=V(()=>e=>{let t={...ye(x.value)};if(e){let n=g.value?.includes(`/cameras/${e.name}`)??!1,r=_.value?.includes(`/cameras/${e.name}`)??!1,i=t.viewTransition&&(n||r),a=`/cameras/${e.name}`;t.routerLink=p?.isActive.value?`${a}?startTs=${Math.floor(p.currentTimestamp.value/1e3)}`:a,t.viewTransition=i}return t}),be=V(()=>(de.height.value-16)*(16/9)),R=V(()=>b.value.filter(e=>e.lastDroppedCamera).map(e=>e.lastDroppedCamera));function H(e){let t=b.value[e];if(u.value)return{x:0,y:t?.y??e,w:1,h:1};let n=Ut[y.value]?.[e];return{x:t?.x??n?.x??0,y:t?.y??n?.y??0,w:t?.colSpan??n?.w??1,h:t?.rowSpan??n?.h??1}}function xe(){if(!T)return;let e=[];for(let t of T.getGridItems()){let n=t.gridstackNode;if(!n)continue;let r=parseInt(n.id),i=b.value[r];i?.lastDroppedCamera&&e.push({index:r,cameraId:i.lastDroppedCamera._id,colSpan:n.w,rowSpan:n.h,x:n.x,y:n.y})}i(`rearrange`,e)}function Se(){k.value===`rearrange`&&xe()}function we(e){let t=parseInt(e.gridstackNode?.id??``);if(Number.isNaN(t))return;let n=e.getBoundingClientRect();ae.value=t,E.value={w:Math.round(n.width),h:Math.round(n.height)}}function Te(){if(!re.value)return;let e=Vt[y.value];if(!e)return;let t=u.value,n=t?1:e.cols,r=t?he.value.length:e.rows,i=ne.value?.clientWidth??0,a=t?i*9/16:i>0?i*9/16/e.rows:60,o=k.value===`rearrange`;T=He.init({column:n,minRow:r,cellHeight:a,margin:o?3:1,float:!t,animate:!1,staticGrid:!o,resizable:t?{handles:``}:{handles:`se`},disableResize:t,alwaysShowResizeHandle:!t},re.value),T&&(T.on(`change`,Se),T.on(`resizestart`,(e,t)=>we(t)),T.on(`resize`,(e,t)=>we(t)),T.on(`resizestop`,()=>{ae.value=void 0}),requestAnimationFrame(()=>T?.setAnimation(!0)))}function De(){T&&=(ae.value=void 0,T.offAll(),T.destroy(!1),null)}function ke(e){let t=b.value.findIndex(t=>t.lastDroppedCamera?._id===e);if(t===-1||ie.value===t)return;let n=b.value[t].lastDroppedCamera;w.value=void 0,ie.value=t,i(`expand`,n,!0)}function Ae(e,t,n){n?ie.value=t:(w.value=t,ie.value=void 0,setTimeout(()=>{w.value=void 0},250)),i(`expand`,e,n)}async function je(){await ce()}function Me(e){for(let t of C.value||[])t.togglePlayerMute(e)}async function Ne(e,t){await Promise.allSettled((C.value||[]).map(n=>n.toggleMicrophone(e,t)))}function J(e){for(let t of C.value||[])t.togglePlayerActivityMode(e)}async function X(e){await Promise.allSettled((C.value||[]).map(t=>t.togglePlayerSourceRole(e)))}async function Pe(e){await Promise.allSettled((C.value||[]).map(t=>t.togglePlayerStreamingMode(e)))}function Fe(e){for(let t of C.value||[])t.togglePlayerBbox(e)}function Ie(e){for(let t of C.value||[])t.togglePip(e)}function Le(){T&&(T.compact(),xe())}function Re(){if(!T)return;let e=Vt[y.value];if(!e)return;let t=e.cols,n=[];for(let e of T.getGridItems()){let t=e.gridstackNode;if(!t)continue;let r=parseInt(t.id),[i,a]=((b.value[r]?.lastDroppedCamera)?.interfaceSettings?.aspectRatio||`16:9`).split(`:`).map(Number);n.push({idx:r,el:e,cellRatio:i/a*(9/16)})}if(!n.length)return;let r=e.rows;function i(e){let r=[],i=0,a=0;for(;a<n.length;){let o=[],s=0,c=!1;for(;a<n.length;){let r=n[a].cellRatio;if(e*(s+r)>t&&o.length>0){c=!0;break}o.push(n[a]),s+=r,a++}let l=c?t/s:e;r.push({row:o,ratioSum:s,rowH:l,filled:c}),i+=l}return{rows:r,totalH:i}}let a=.25,o=r,s=a;for(let e=0;e<40;e++){let e=(a+o)/2;i(e).totalH<=r?(s=e,a=e):o=e}let{rows:c}=i(s),l=c.reduce((e,t)=>e+t.rowH,0)||1,u=l>r?r/l:1,d=c.map(e=>e.rowH*u),f=d.reduce((e,t)=>e+t,0),p=new Map,m=Math.max(0,Math.round((r-f)/2)),h=m;for(let e=0;e<c.length;e++){h+=d[e];let n=Math.min(r,Math.round(h)),i=Math.max(1,n-m),{row:a,ratioSum:o,filled:s}=c[e];if(s){let e=0;for(let n=0;n<a.length;n++){let r=n===a.length-1?Math.max(1,t-e):Math.max(1,Math.round(a[n].cellRatio/o*t));p.set(a[n].idx,{x:e,y:m,w:r,h:i}),e+=r}}else{let e=a.map(e=>Math.max(1,Math.round(e.cellRatio*i))),n=e.reduce((e,t)=>e+t,0),r=Math.max(0,Math.round((t-n)/2));for(let t=0;t<a.length;t++)p.set(a[t].idx,{x:r,y:m,w:e[t],h:i}),r+=e[t]}m=n}T.batchUpdate();for(let[e,t]of p){let r=n.find(t=>t.idx===e);r&&T.update(r.el,t)}T.batchUpdate(!1),xe()}return pe([y,()=>he.value.length,u],()=>{De(),Ce(()=>Te())},{immediate:!1}),pe(k,e=>{if(!T)return;let t=e===`rearrange`;T.setStatic(!t),T.margin(t?3:1)}),pe(()=>me.width.value,e=>{if(!(!T||e<=0)){if(T.setAnimation(!1),u.value)T.cellHeight(e*9/16);else{let t=Vt[y.value]?.rows??1;T.cellHeight(e*9/16/t)}requestAnimationFrame(()=>T?.setAnimation(!0))}}),ue(()=>{Ce(()=>Te())}),fe(()=>{De()}),t({expandCameraById:ke,toggleFullscreen:je,toggleAllPlayerMute:Me,toggleAllPlayerMicrophone:Ne,toggleAllPlayerActivityMode:J,toggleAllPlayerSourceRole:X,toggleAllPlayerStreamingMode:Pe,toggleAllPlayerBbox:Fe,toggleAllPip:Ie,compactGrid:Le,fitAspectRatios:Re,isFullscreen:oe}),(t,n)=>{let r=se,o=l,s=$t,c=Jt;return D(),N(I(q),{backend:I(a)?I(Z):I(Y),options:I(a)?{enableMouseEvents:!0}:void 0},{default:M(()=>[L(`div`,en,[L(`div`,{ref_key:`viewRef`,ref:S,class:F([`view-container w-full flex flex-col min-w-0 overflow-y-auto items-center`,{"px-2":I(v)&&I(d)}])},[I(oe)?(D(),N(o,{key:0,severity:`secondary`,rounded:``,class:`cui-fs-exit`,"aria-label":t.$t(`components.form.tooltip.fullscreen_off`),onClick:I(ce)},{icon:M(()=>[P(r,{class:`w-5 h-5`})]),_:1},8,[`aria-label`,`onClick`])):z(``,!0),I(_e)===void 0?z(``,!0):(D(),U(`div`,{key:1,class:`w-full aspect-video relative my-auto`,style:G({maxWidth:`${I(be)}px`})},[P(s,{ref:`fsCardRef`,class:F([`w-full h-full`,{"card-expanded":I(ie)!==void 0,"card-collapsing":I(w)!==void 0}]),camera:I(b)[I(_e)]?.lastDroppedCamera,cameras:e.cameras,"dropped-cameras":I(R),mode:`normal`,index:I(_e),"camera-card-props":{...I(ve)(I(b)[I(_e)]?.lastDroppedCamera),expanded:!0},"camera-card-models":e.cameraCardModels,onExpand:n[0]||=(e,t)=>Ae(e,I(_e),t)},null,8,[`class`,`camera`,`cameras`,`dropped-cameras`,`index`,`camera-card-props`,`camera-card-models`])],4)),j(L(`div`,{ref_key:`wrapperRef`,ref:ne,class:F([`w-full relative my-auto`,I(u)?`h-auto`:`aspect-video`]),style:G(I(u)?void 0:{maxWidth:`${I(be)}px`})},[L(`div`,{ref_key:`gridRef`,ref:re,class:`grid-stack w-full h-full`},[(D(!0),U(le,null,O(I(he),({card:t,index:r})=>(D(),U(`div`,{key:r,class:`grid-stack-item`,"gs-id":String(r),"gs-x":H(r).x,"gs-y":H(r).y,"gs-w":H(r).w,"gs-h":H(r).h},[L(`div`,nn,[P(s,{ref_for:!0,ref_key:`cardRefs`,ref:C,camera:t.lastDroppedCamera,cameras:e.cameras,"dropped-cameras":I(R),mode:I(k),index:r,"camera-card-props":{...I(ve)(t.lastDroppedCamera),expanded:I(_e)===r},"camera-card-models":e.cameraCardModels,"on-drop":e=>i(`drop`,r,e),onExpand:(e,t)=>Ae(e,r,t),onDrop:e=>i(`drop`,r,e),onRemove:n[1]||=e=>i(`remove`,e)},null,8,[`camera`,`cameras`,`dropped-cameras`,`mode`,`index`,`camera-card-props`,`camera-card-models`,`on-drop`,`onExpand`,`onDrop`]),I(ae)===r?(D(),U(`div`,rn,K(I(E).w)+` × `+K(I(E).h),1)):z(``,!0)])],8,tn))),128))],512)],6),[[ge,I(_e)===void 0]])],2),I(v)&&I(d)?(D(),N(c,{key:0,cameras:e.cameras,"dropped-cameras":I(R),title:e.title,class:`view-box shadow-xl`,style:G({"margin-right":I(v)?`0px`:`-${I(400)}px`}),onChangeViewSize:n[2]||=e=>i(`changeViewSize`)},null,8,[`cameras`,`dropped-cameras`,`title`,`style`])):z(``,!0)])]),_:1},8,[`backend`,`options`])}}}),[[`__scopeId`,`data-v-d475eed2`]]),on={class:`flex flex-col gap-3`},sn={class:`text-wrap`},cn={class:`w-full h-full flex items-center justify-center relative`},ln=R({__name:`AudioVisualizer`,emits:[`listening`],setup(e,{expose:t,emit:n}){let r=n,i=De(),a=p(),o=Ee(`dialogRefProps`),s=A(`canvasRef`),c=xe(),u=xe(),d=W(!1),f=V(()=>!!o.loading?.value);async function m(){if(d.value)g();else try{c.value&&g();let e;try{e=await navigator.mediaDevices.getUserMedia({audio:!0})}catch(e){a.add({severity:`warn`,detail:`Can not enable AudioVisualizer, see console.`,life:3e3}),i.warn(`Can not enable AudioVisualizer`,e);return}d.value=!0,r(`listening`,!0),c.value=new AudioContext;let t=c.value.createAnalyser();t.fftSize=1024,u.value=e.getTracks(),c.value.createMediaStreamSource(e).connect(t);let n,o=s.value?.getContext(`2d`),l=()=>{if(s.value&&o){let e=[],r=[];o.clearRect(0,0,s.value.width,s.value.height),requestAnimationFrame(l);let i=t.frequencyBinCount,a=new Uint8Array(i);t.getByteFrequencyData(a),e.push(a);for(let t=0;t<e[0].length;t++)r.push(0),e.forEach(e=>{r[t]+=e[t]});let c=s.value.width/2,u=s.value.height/2;o.beginPath(),o.arc(c,u,30,0,2*Math.PI),o.lineWidth=1,o.stroke(),o.closePath();for(let e=0;e<90;e++){n=r[e]*.4;let t=Math.PI*2/90,i=c+Math.cos(t*e)*30,a=u+Math.sin(t*e)*30,s=c+Math.cos(t*e)*(30+n),l=u+Math.sin(t*e)*(30+n);h(o,i,a,s,l,3)}d.value||o.clearRect(0,0,s.value.width,s.value.height)}};l()}catch(e){g(),i.error(e)}}function h(e,t,n,r,i,a){let o=e.createLinearGradient(t,n,r,i);o.addColorStop(0,`#5b040f`),o.addColorStop(.5,`#b50b21`),o.addColorStop(.9,`#df2a4c`),o.addColorStop(1,`#df6380`),e.lineWidth=a,e.strokeStyle=o,e.beginPath(),e.moveTo(t,n),e.lineTo(r,i),e.stroke(),e.closePath()}function g(){c.value?.close(),c.value=void 0,u.value?.forEach(e=>e.stop()),u.value=void 0,d.value=!1,r(`listening`,!1)}return be(()=>{g()}),t({isLoading:f}),(e,t)=>{let n=Ie,r=l;return D(),U(`div`,on,[L(`span`,sn,K(e.$t(`components.dialog.message.intercom_info`)),1),L(`div`,cn,[P(r,{rounded:``,class:`w-[60px] h-[60px] absolute z-1`,onClick:m},{icon:M(()=>[P(n,{width:`100%`,height:`100%`})]),_:1}),L(`canvas`,{ref_key:`canvasRef`,ref:s,height:`300`,width:`300`},null,512)])])}}}),un=[`fill`],dn=R({__name:`CuiCameraGridIcon1`,props:{color:{default:`currentColor`}},setup(e){let{color:t}=B(e);return(e,n)=>(D(),U(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 970 550`,role:`img`,"area-hidden":`true`,fill:I(t)},[...n[0]||=[L(`path`,{d:`M9 1a8 8 0 0 0-8 8v532a8 8 0 0 0 8 8h952a8 8 0 0 0 8-8V9a8 8 0 0 0-8-8H9Zm0 8h952v532H9V9Z`},null,-1)]],8,un))}}),fn=[`fill`],pn=R({__name:`CuiCameraGridIcon10`,props:{color:{default:`currentColor`}},setup(e){let{color:t}=B(e);return(e,n)=>(D(),U(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 970 550`,role:`img`,"area-hidden":`true`,fill:I(t)},[...n[0]||=[L(`path`,{d:`M9 1a8 8 0 0 0-8 8v532a8 8 0 0 0 8 8h952a8 8 0 0 0 8-8V9a8 8 0 0 0-8-8H9Zm726 275h226v130H735V276Zm-242 0h234v130H493V276Zm0 265V414h234v127H493ZM9 541V276h476v265H9Zm726 0V414h226v127H735ZM961 9v121H735V9h226ZM735 138h226v130H735V138ZM727 9v121H493V9h234ZM493 138h234v130H493V138ZM485 9v259H9V9h476Z`},null,-1)]],8,fn))}}),mn=[`fill`],hn=R({__name:`CuiCameraGridIcon12`,props:{color:{default:`currentColor`}},setup(e){let{color:t}=B(e);return(e,n)=>(D(),U(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 970 550`,role:`img`,"area-hidden":`true`,fill:I(t)},[...n[0]||=[L(`path`,{d:`M9 1a8 8 0 0 0-8 8v532a8 8 0 0 0 8 8h952a8 8 0 0 0 8-8V9a8 8 0 0 0-8-8H9Zm952 275v129H810.5V276H961Zm-158.5 0v129h-152V276h152Zm-152 265V413h152v128h-152Zm-8-265v129H493V276h149.5ZM493 541V413h149.5v128H493ZM9 276h476v265H9V276Zm801.5 265V413H961v128H810.5ZM961 9v259H493V9h468ZM9 268V9h476v259H9Z`},null,-1)]],8,mn))}}),gn=[`fill`],_n=R({__name:`CuiCameraGridIcon13`,props:{color:{default:`currentColor`}},setup(e){let{color:t}=B(e);return(e,n)=>(D(),U(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 970 550`,role:`img`,"area-hidden":`true`,fill:I(t)},[...n[0]||=[L(`path`,{d:`M250 549.5h.5v-.5H961a8 8 0 0 0 8-8V9a8 8 0 0 0-8-8H9a8 8 0 0 0-8 8v532a8 8 0 0 0 8 8h233.5v.5h7.5Zm.5-273.5H485v129.5H250.5V276Zm-8 0v129.5H9V276h233.5ZM961 9v121H735V9h226ZM727 9v121H493V9h234ZM493 138h234v130H493V138ZM485 9v259H9V9h476Zm250 129h226v130H735V138Zm0 267.5V276h226v129.5H735ZM493 276h234v129.5H493V276Zm0 265V413.5h234V541H493Zm-242.5 0V413.5H485V541H250.5ZM9 541V413.5h233.5V541H9Zm726 0V413.5h226V541H735Z`},null,-1)]],8,gn))}}),vn=[`fill`],yn=R({__name:`CuiCameraGridIcon15`,props:{color:{default:`currentColor`}},setup(e){let{color:t}=B(e);return(e,n)=>(D(),U(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 970 550`,role:`img`,"area-hidden":`true`,fill:I(t)},[...n[0]||=[L(`path`,{d:`M250 549.5h.5v-.5H961a8 8 0 0 0 8-8V9a8 8 0 0 0-8-8H9a8 8 0 0 0-8 8v532a8 8 0 0 0 8 8h233.5v.5h7.5Zm.5-144V276H485v129.5H250.5Zm-8-129.5v129.5H9V276h233.5Zm570 90H961v82H812.5v-82Zm-160 0h152v82h-152v-82ZM961 276v82H812.5v-82H961Zm-308.5 0h152v82h-152v-82Zm0 180h152v85h-152v-85ZM961 541H812.5v-85H961v85Zm-316.5-93H493v-82h151.5v82Zm0-172v82H493v-82h151.5Zm0 180v85H493v-85h151.5ZM485 413.5V541H250.5V413.5H485Zm-242.5 0V541H9V413.5h233.5ZM961 9v259H493V9h468ZM9 9h476v259H9V9Z`},null,-1)]],8,vn))}}),bn=[`fill`],xn=R({__name:`CuiCameraGridIcon16`,props:{color:{default:`currentColor`}},setup(e){let{color:t}=B(e);return(e,n)=>(D(),U(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 970 550`,role:`img`,"area-hidden":`true`,fill:I(t)},[...n[0]||=[L(`path`,{d:`M9 1a8 8 0 0 0-8 8v532a8 8 0 0 0 8 8h952a8 8 0 0 0 8-8V9a8 8 0 0 0-8-8H9Zm952 8v121.5H732.5V9H961ZM724.5 9v121.5H493V9h231.5ZM493 268V138.5h231.5V268H493Zm0 137.5V276h231.5v129.5H493Zm468 0H732.5V276H961v129.5ZM493 541V413.5h231.5V541H493Zm468 0H732.5V413.5H961V541Zm0-273H732.5V138.5H961V268ZM485 9v121.5H250.5V9H485ZM250.5 138.5H485V268H250.5V138.5ZM242.5 9v121.5H9V9h233.5ZM9 138.5h233.5V268H9V138.5ZM250.5 276H485v129.5H250.5V276Zm0 137.5H485V541H250.5V413.5Zm-8-137.5v129.5H9V276h233.5ZM9 541V413.5h233.5V541H9Z`},null,-1)]],8,bn))}}),Sn=[`fill`],Cn=R({__name:`CuiCameraGridIcon20`,props:{color:{default:`currentColor`}},setup(e){let{color:t}=B(e);return(e,n)=>(D(),U(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 970 550`,role:`img`,"area-hidden":`true`,fill:I(t)},[...n[0]||=[L(`path`,{d:`M9 1a8 8 0 0 0-8 8v532a8 8 0 0 0 8 8h952a8 8 0 0 0 8-8V9a8 8 0 0 0-8-8H9Zm952 94v82H812.5V95H961Zm-156.5 82h-152V95h152v82ZM961 9v78H812.5V9H961ZM652.5 9h152v78h-152V9Zm0 176h152v83h-152v-83ZM961 268H812.5v-83H961v83Zm-308.5 8h152v82h-152v-82Zm160 0H961v82H812.5v-82Zm-168-181v82H493V95h151.5Zm0-86v78H493V9h151.5ZM493 268v-83h151.5v83H493Zm0 90v-82h151.5v82H493ZM9 9h476v259H9V9Zm952 357v82H812.5v-82H961Zm-156.5 0v82h-152v-82h152Zm-152 90h152v85h-152v-85ZM961 541H812.5v-85H961v85ZM644.5 366v82H493v-82h151.5ZM493 541v-85h151.5v85H493ZM9 276h476v265H9V276Z`},null,-1)]],8,Sn))}}),wn=[`fill`],Tn=R({__name:`CuiCameraGridIcon26`,props:{color:{default:`currentColor`}},setup(e){let{color:t}=B(e);return(e,n)=>(D(),U(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 970 550`,role:`img`,"area-hidden":`true`,fill:I(t)},[...n[0]||=[L(`path`,{"fill-rule":`evenodd`,d:`M1.5 9A7.5 7.5 0 0 1 9 1.5h952a7.5 7.5 0 0 1 7.5 7.5v532a7.5 7.5 0 0 1-7.5 7.5H9a7.5 7.5 0 0 1-7.5-7.5V9Zm960 168V94h-153v83h153Zm-160 0h-153V94h153v83Zm7-90h153V9a.5.5 0 0 0-.5-.5H808.5V87Zm-7-78.5V87h-153V8.5h153Zm0 175.5v84.5h-153V184h153Zm7 84.5V184h153v84.5h-153Zm-167-91.5V94h-149v83h149Zm0-90V8.5h-149V87h149Zm-149 97h149v84.5h-149V184Zm0 91.5H719V402H492.5V275.5Zm0 133.5v132.5H719V409H492.5Zm233.5 0v132.5h235a.5.5 0 0 0 .5-.5V409H726Zm235.5-7V275.5H726V402h235.5Zm-476-270V8.5H252V132h233.5ZM245 139H8.5v129.5H245V139Zm0-7V8.5H9a.5.5 0 0 0-.5.5v123H245Zm240.5 136.5V139H252v129.5h233.5Zm-477 7h157v81H8.5v-81Zm164 81v-81h153v81h-153Zm153 7h-153v83h153v-83Zm7 83v-83h153v83h-153Zm-7 7h-153v88h153v-88Zm7 88v-88h153v88h-153Zm0-185v-81h153v81h-153Zm-324 7h157v83H8.5v-83Zm0 90h157v88H9a.5.5 0 0 1-.5-.5v-87.5Z`},null,-1)]],8,wn))}}),En=[`fill`],Dn=R({__name:`CuiCameraGridIcon4`,props:{color:{default:`currentColor`}},setup(e){let{color:t}=B(e);return(e,n)=>(D(),U(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 970 550`,role:`img`,"area-hidden":`true`,fill:I(t)},[...n[0]||=[L(`path`,{d:`M9 1a8 8 0 0 0-8 8v532a8 8 0 0 0 8 8h952a8 8 0 0 0 8-8V9a8 8 0 0 0-8-8H9Zm952 8v259H493V9h468ZM493 541V276h468v265H493ZM485 9v259H9V9h476ZM9 541V276h476v265H9Z`},null,-1)]],8,En))}}),On=[`fill`],kn=R({__name:`CuiCameraGridIcon6`,props:{color:{default:`currentColor`}},setup(e){let{color:t}=B(e);return(e,n)=>(D(),U(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 970 550`,role:`img`,"area-hidden":`true`,fill:I(t)},[...n[0]||=[L(`path`,{d:`M9 1a8 8 0 0 0-8 8v532a8 8 0 0 0 8 8h952a8 8 0 0 0 8-8V9a8 8 0 0 0-8-8H9Zm641.5 187.5H961v171H650.5v-171ZM961 9v171.5H650.5V9H961ZM642.5 9v350.5H9V9h633.5ZM9 541V367.5h315.5V541H9Zm323.5-173.5h310V541h-310V367.5Zm318 0H961V541H650.5V367.5Z`},null,-1)]],8,On))}}),An=[`fill`],jn=R({__name:`CuiCameraGridIcon7`,props:{color:{default:`currentColor`}},setup(e){let{color:t}=B(e);return(e,n)=>(D(),U(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 970 550`,role:`img`,"area-hidden":`true`,fill:I(t)},[...n[0]||=[L(`path`,{d:`M9 1a8 8 0 0 0-8 8v532a8 8 0 0 0 8 8h952a8 8 0 0 0 8-8V9a8 8 0 0 0-8-8H9Zm725.5 275H961v130H734.5V276Zm0 265V414H961v127H734.5Zm-8-265v130H493V276h233.5ZM493 541V414h233.5v127H493ZM9 276h476v265H9V276ZM961 9v259H493V9h468ZM9 268V9h476v259H9Z`},null,-1)]],8,An))}}),Mn=[`fill`],Nn=R({__name:`CuiCameraGridIcon9`,props:{color:{default:`currentColor`}},setup(e){let{color:t}=B(e);return(e,n)=>(D(),U(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 970 550`,role:`img`,"area-hidden":`true`,fill:I(t)},[...n[0]||=[L(`path`,{d:`M969.5 359v-.5h-.5V9a8 8 0 0 0-8-8H9a8 8 0 0 0-8 8v532a8 8 0 0 0 8 8h952a8 8 0 0 0 8-8V366.5h.5V359ZM961 187v171.5H651V187h310ZM651 541V366.5h310V541H651Zm-8-354v171.5H330V187h313ZM330 541V366.5h313V541H330Zm-8-354v171.5H9V187h313ZM9 541V366.5h313V541H9ZM961 9v170H651V9h310ZM643 9v170H330V9h313ZM322 9v170H9V9h313Z`},null,-1)]],8,Mn))}}),Pn={for:`name`,class:`cui-label`},Fn={key:0,class:`flex flex-col gap-6 justify-center`},In={key:0,class:`text-red-500 text-center mb-5`},Ln={class:`md:max-h-[350px] overflow-y-auto`},Rn={class:`block cui-label mb-3`},zn={key:1,class:`flex flex-col gap-6 justify-center`},Bn={key:0,class:`text-red-500 text-center mb-5`},Vn={class:`md:max-h-[450px] overflow-y-auto`},Hn={class:`block cui-label mb-3`},Un={class:`view-select-container`},Wn=[`onClick`],Gn=d(R({__name:`CamviewForm`,props:{form:{},type:{},cameras:{},views:{}},setup(t,{expose:n}){let i=new ne,a=t,o=De(),s=p(),{t:c}=e(),l=Ee(`dialogRefProps`),u=re(),{user:d}=Oe(u),{mutateAsync:f,isPending:m}=i.createViewQuery(),{mutateAsync:h,isPending:g}=i.patchViewQuery(),{form:_,type:v,cameras:ee,views:te}=B(a),y=A(`formRef`),b=W([1,4,6,7,9,10,12,13,15,16,20,26]),S=W(!0),C=W(!0),w=W([]),T=W(!!_.value),E=W(_.value?ae(_.value):{});!T.value&&v.value===`view`&&(E.value.viewSize=b.value[0]);let oe=V(()=>!!(l.loading?.value||m.value||g.value));function se(e){let t=w.value.findIndex(t=>t.name===e.name);t===-1?w.value.push(e):w.value.splice(t,1)}function ce(e){switch(e){case 1:return dn;case 4:return Dn;case 6:return kn;case 7:return jn;case 9:return Nn;case 10:return pn;case 12:return hn;case 13:return _n;case 15:return yn;case 16:return xn;case 20:return Cn;case 26:return Tn;default:return dn}}async function fe(){if(!y.value||!d.value)return;let e=te.value.find(e=>e.name===E.value.name);if(e&&!T.value)return o.error(`View already exists`,e),s.add({severity:`error`,detail:c(`components.toast.validation_failed`),life:3e3}),null;if(v.value===`dnd`){if(C.value)return o.error(`No cameras selected`),s.add({severity:`error`,detail:c(`components.toast.validation_failed`),life:3e3}),null;let e=w.value.map((e,t)=>({cameraId:e._id,index:t}));E.value.cameras=e,E.value.type=`dnd`,E.value.viewSize=1,y.value.setFieldValue(`type`,`dnd`),y.value.setFieldValue(`viewSize`,1),y.value.setFieldValue(`cameras`,e);let t=await y.value.validate();return t?.valid?T.value?await h({username:d.value.username,viewid:E.value._id,viewData:E.value}):await f({username:d.value.username,viewData:E.value}):(o.error(`Validation failed`,t),s.add({severity:`error`,detail:c(`components.toast.validation_failed`),life:3e3}),null)}{if(S.value)return o.error(`No view selected`),s.add({severity:`error`,detail:c(`components.toast.validation_failed`),life:3e3}),null;E.value.cameras=[],E.value.type=`view`,y.value.setFieldValue(`type`,`view`),y.value.setFieldValue(`cameras`,[]);let e=await y.value.validate();return e?.valid?ae(E.value):(o.error(`Validation failed`,e),s.add({severity:`error`,detail:c(`components.toast.validation_failed`),life:3e3}),null)}}return pe(E,e=>{for(let[t,n]of Object.entries(e))y.value?.setFieldValue(t,n);e.viewSize&&(S.value=!1),e.cameras?.length&&(C.value=!1)},{deep:!0,immediate:!0}),pe(w,e=>{C.value=e.length===0},{deep:!0}),ue(()=>{w.value=ee.value?.filter(e=>E.value?.cameras?.some(t=>t.cameraId===e._id))||[]}),n({isLoading:oe,onConfirm:fe}),(e,t)=>{let n=r,i=Ae,a=je,o=ke,s=x;return D(),N(I(ve),{ref_key:`formRef`,ref:y,class:`flex flex-col gap-6`,"validation-schema":I(ie),"initial-values":I(E)},{default:M(()=>[P(I(Te),{modelValue:I(E).name,"onUpdate:modelValue":t[0]||=e=>I(E).name=e,modelModifiers:{trim:!0},name:`name`,as:`div`,class:`flex flex-col field-gap`},{default:M(({field:t,errors:r})=>[L(`label`,Pn,K(e.$t(`components.form.label.name`)),1),P(i,null,{default:M(()=>[P(n,de(t,{invalid:r.length>0,loading:I(oe),type:`text`}),null,16,[`invalid`,`loading`])]),_:2},1024),P(me,{name:`fade`},{default:M(()=>[P(I(Se),{name:`name`,class:`cui-input-error`})]),_:1})]),_:1},8,[`modelValue`]),P(a,{class:`m-0 py-3`}),I(v)===`dnd`?(D(),U(`div`,Fn,[P(me,{name:`fade`},{default:M(()=>[I(C)?(D(),U(`span`,In,K(e.$t(`components.form.error.no_cameras_selected`)),1)):z(``,!0)]),_:1}),L(`div`,Ln,[L(`label`,Rn,K(e.$t(`components.form.label.cameras`)),1),(D(!0),U(le,null,O(I(ee),(e,t)=>(D(),U(`div`,{key:t,class:`cui-list-item`},[P(s,{class:`h-14`,active:I(w).some(t=>t.name===e.name),onClick:t=>se(e)},{append:M(()=>[P(o,{"model-value":I(w).some(t=>t.name===e.name),"onUpdate:modelValue":t=>se(e)},null,8,[`model-value`,`onUpdate:modelValue`])]),default:M(()=>[L(`span`,null,K(e.name),1)]),_:2},1032,[`active`,`onClick`])]))),128))])])):(D(),U(`div`,zn,[P(me,{name:`fade`},{default:M(()=>[I(S)?(D(),U(`span`,Bn,K(e.$t(`components.form.error.no_view_selected`)),1)):z(``,!0)]),_:1}),L(`div`,Vn,[L(`label`,Hn,K(e.$t(`components.form.label.views`)),1),L(`div`,Un,[(D(!0),U(le,null,O(I(b),t=>(D(),U(`div`,{key:t,class:`view-select-item w-full`,onClick:e=>I(E).viewSize=t},[L(`div`,{class:F([`view-select-item-icon w-full p-3`,{"selected-view":I(E).viewSize===t}])},[(D(),N(he(ce(t)),{style:{width:`100%`,height:`100%`}}))],2),L(`span`,{class:F([`view-select-item-label text-muted mt-3 px-2 py-1 cui-rounded-corners`,{"selected-view-label":I(E).viewSize===t}])},K(t)+` `+K(e.$t(`views.camview.cameras`)),3)],8,Wn))),128))])])]))]),_:1},8,[`validation-schema`,`initial-values`])}}}),[[`__scopeId`,`data-v-641aac54`]]),Kn={class:`h-full w-full dark-mode relative`},qn={key:0,class:`flex flex-col w-full h-full items-center justify-center`},Jn={key:1,class:`flex flex-col w-full h-full`},Yn={class:`flex flex-1 min-h-0 flex-col items-center justify-center w-full gap-4`},Xn={class:`text-muted text-sm`},Zn={class:`relative w-6 h-6`},Qn=d(R({__name:`Camview`,props:{navbarWidth:{default:0},navbarLeft:{default:0}},setup(r){let o=new ne,s=new v,c=r,d=e(),{t:f}=d,p=Ne(),m=u(),{bottombarHeight:h}=y(),{smBreakpoint:_,lgBreakpoint:x,mdBreakpoint:ie}=te(),le=re(),{user:ue}=Oe(le),fe=b(),{uiSettings:O}=Oe(fe),{data:k,isLoading:ge}=s.getCamerasQuery({page:1,pageSize:-1}),{data:ve,isLoading:ye}=o.getViewsQuery(ue.value?.username??``,{page:1,pageSize:-1}),{mutate:be,isPending:R}=o.removeViewQuery(),{mutateAsync:H,isPending:xe}=o.createViewQuery(),{mutateAsync:Se,isPending:Ce}=o.patchViewQuery(),{mutateAsync:we}=o.patchViewQuerySilent(),{navbarWidth:Te,navbarLeft:Ee}=B(c),De=A(`menuRef`),ke=A(`newViewMenuRef`),Ae=A(`cardFitMenuRef`),q=A(`viewDndRef`),J=W({}),Y=W(!1),X=W(!1),Z=W(!1),Pe=W(!1),Ie=W(!1),ze=W(!1),He=W(!0),Ue=W(`always-on`),We=W(`low-resolution`),Ke=W(`auto`),qe=W([]),Ye=W(),Xe=W(null),Qe=_e({sourceRole:We.value,activityMode:Ue.value,streamingMode:Ke.value}),$e=V(()=>ge.value||ye.value||R.value||xe.value||Ce.value),tt=V(()=>Te.value+Ee.value),nt=V(()=>({locale:d.locale.value,dayNames:p.config.locale?.dayNames,dayNamesShort:p.config.locale?.dayNamesShort,monthNames:p.config.locale?.monthNames,monthNamesShort:p.config.locale?.monthNamesShort})),it=V(()=>Ye.value??$.value?.cardFit??`aspect`),at=V(()=>[`aspect`,`contain`,`fill`,`cover`].map(e=>({label:f(`views.camview.card_fit_${e}`),description:f(`views.camview.card_fit_${e}_info`),active:it.value===e,onClick:()=>Vt(e)}))),st=V(()=>({doubleClickZoom:!1,flatCard:!0,cardFit:it.value,cameraNameOverlay:!0,control:!0,toolbar:!1,expandableCard:($.value?.cameras?.length??0)>1,detectionIndicatorOverlay:!Z.value&&ft.value,detectionIconsOverlay:!Z.value&&ft.value,boundingBoxOverlay:!1,cardClickAction:`expand`,viewTransition:!0,cardProps:{pt:{root:{style:`background: #000`}}}})),ct=V(()=>ve.value?.result.length?x.value?{width:Ie.value?`calc(100% - 400px)`:`100%`,height:`100%`,overflowY:`scroll`}:{height:`100%`,paddingBottom:Ie.value?h.value>0?`200px`:`192px`:`0px`,overflowY:`scroll`}:{width:`100%`,height:`100%`,overflowY:`scroll`}),Q=V(()=>Y.value||X.value),ut=V(()=>!!q.value?.isFullscreen),ft=V(()=>O.value.camview.detections!==!1),pt=V(()=>[{label:ut.value?f(`components.form.tooltip.fullscreen_off`):f(`components.form.tooltip.fullscreen_on`),icon:ut.value?se:w,command:Ht},{label:He.value?f(`components.form.tooltip.unmute`):f(`components.form.tooltip.mute`),icon:He.value?dt:lt,command:Ut},{label:f(`components.form.tooltip.intercom`),icon:S,command:()=>Dt(`intercom`)},{label:Ke.value===`auto`?`${f(`components.form.tooltip.mode`)}: ${f(`components.form.tooltip.streaming_mode_auto`)}`:Ke.value===`webrtc`?`${f(`components.form.tooltip.mode`)}: ${f(`components.form.tooltip.streaming_mode_webrtc`)}`:`${f(`components.form.tooltip.mode`)}: ${f(`components.form.tooltip.streaming_mode_mse`)}`,icon:Ke.value===`auto`?gt:Ke.value===`webrtc`?Pt:rt,command:()=>Kt()},{label:Ue.value===`always-on`?f(`components.form.tooltip.activity_mode_always_on`):Ue.value===`standby`?f(`components.form.tooltip.activity_mode_standby`):f(`components.form.tooltip.activity_mode_activity`),icon:Ue.value===`always-on`?St:Ue.value===`standby`?mt:ot,command:()=>Wt()},{label:We.value===`low-resolution`?`${f(`components.form.tooltip.resolution`)}: ${f(`components.form.tooltip.source_role_low`)}`:We.value===`mid-resolution`?`${f(`components.form.tooltip.resolution`)}: ${f(`components.form.tooltip.source_role_mid`)}`:`${f(`components.form.tooltip.resolution`)}: ${f(`components.form.tooltip.source_role_high`)}`,icon:We.value===`low-resolution`?Ot:We.value===`mid-resolution`?jt:Tt,command:()=>Gt()},{label:`${f(`components.form.tooltip.detections`)}: ${ft.value?f(`components.form.tooltip.detections_on`):f(`components.form.tooltip.detections_off`)}`,icon:ft.value?g:ee,command:()=>O.value.camview.detections=!ft.value}]),$=V(()=>{let e=ve.value?.result.find(e=>e._id===O.value.camview.viewid)||ve.value?.result[0];return e?(J.value=e,O.value.camview.viewid=e._id):J.value={},e}),ht=V(()=>$.value?.cameras?.map(e=>e.cameraId)??[]),_t=V(()=>{let e=Xe.value;return e&&ht.value.includes(e)?[e]:ht.value}),vt=V(()=>{let e={};for(let t of k.value?.result??[])e[t._id]=t.name;return e}),{master:bt}=i(ht,{sourceRole:`low`,activeIds:_t}),xt=V(()=>bt.mode.value!==`idle`&&bt.currentTimestamp.value>0?Math.floor(bt.currentTimestamp.value/1e3):void 0),Ct=V(()=>Q.value&&J.value.viewSize>0?J.value.viewSize:$.value?$.value.viewSize:1),wt=V(()=>{let e=[];for(let t of ve.value?.result||[])e.push({label:t.name,active:t._id===$.value?._id,onClick:()=>kt(t)});return e}),Et=V(()=>[{label:f(`views.camview.new_view`),icon:yt,onClick:()=>Dt(`newView`)}]);function Dt(e){switch(e){case`newView`:case`editView`:{let t=e===`editView`,n=f(t?`components.dialog.title.edit_view`:`components.dialog.title.new_view`);t?Y.value=!0:X.value=!0,m.openComponentDialog(Gn,{data:{title:n,loading:$e,confirmText:f(`components.form.button.next`),contentProps:{form:t?J.value:void 0,type:`view`,cameras:k.value?.result||[],views:ve.value?.result||[]}},onConfirm:e=>{e&&(J.value=e)},onCancel:()=>{X.value=!1}});break}case`intercom`:m.openComponentDialog(ln,{data:{title:f(`components.dialog.title.intercom`),hideConfirmButton:!0,loading:$e,contentProps:{}},events:{listening:qt}});break;case`removeView`:m.openTextDialog({data:{title:f(`components.dialog.title.confirm`),confirmText:f(`components.form.button.remove`),contentText:f(`components.dialog.message.confirm_remove_layout`),confirmButtonProps:{severity:`danger`}},onConfirm:At})}}function kt(e){O.value.camview.viewid=e._id}function At(){!$.value||!ue.value||be({username:ue.value.username,viewid:$.value._id},{onSuccess:e=>{e.length?O.value.camview.viewid=e[0]._id:O.value.camview.viewid=void 0}})}async function Mt(){if(!ue.value||Object.keys(J.value).length===0)return;let e=qe.value.filter(e=>e.lastDroppedCamera).map(e=>({cameraId:e.lastDroppedCamera._id,index:e.index,colSpan:e.colSpan,rowSpan:e.rowSpan})).sort((e,t)=>e.index-t.index);if(!e.length)return;let t=ae(J.value);t.cameras=e,t._id?Bt(await Se({username:ue.value.username,viewid:t._id,viewData:t})):Bt(await H({username:ue.value.username,viewData:t}))}function Nt(e,t){qe.value[e].lastDroppedCamera=t}function Ft(e){qe.value=qe.value.map(t=>(t.lastDroppedCamera?.name===e.name&&(t.lastDroppedCamera=void 0),t))}function It(e){return`${_.value?`mobile`:`desktop`}:${e}`}function Lt(e){let t=$.value?._id;t&&(O.value.camview.layouts||(O.value.camview.layouts={}),O.value.camview.layouts[It(t)]=e.map(e=>({index:e.index,cameraId:e.cameraId,x:e.x??0,y:e.y??0,w:e.colSpan??1,h:e.rowSpan??1})))}function Rt(e,t){Xe.value=t?e._id:null}function zt(e){let t=Xe.value;!t||!e.cameraId||e.cameraId===t||ht.value.includes(e.cameraId)&&q.value?.expandCameraById(e.cameraId)}function Bt(e){O.value.camview.viewid=e._id,X.value=!1,Y.value=!1}async function Vt(e){let t=$.value,n=ue.value?.username;if(!(!t||!n||it.value===e)){Ye.value=e;try{await we({username:n,viewid:t._id,viewData:{cardFit:e}})}catch{Ye.value=void 0}}}function Ht(){q.value?.toggleFullscreen()}function Ut(){He.value=!He.value,q.value?.toggleAllPlayerMute(He.value)}function Wt(e){let t=Ue.value;t=e||(t===`always-on`?`standby`:t===`standby`?`activity`:`always-on`),q.value?.toggleAllPlayerActivityMode(t),Ue.value=t}async function Gt(e){let t=We.value;t=e||(t===`low-resolution`?`mid-resolution`:t===`mid-resolution`?`high-resolution`:`low-resolution`),await q.value?.toggleAllPlayerSourceRole(t),We.value=t}async function Kt(e){let t=Ke.value;t===`auto`&&(t=`webrtc`);let n=e||(t===`mse`?`webrtc`:`mse`);await q.value?.toggleAllPlayerStreamingMode(n),Ke.value=n}async function qt(e){await q.value?.toggleAllPlayerMicrophone(e)}return pe(Pe,e=>{e&&(ze.value=!0)}),pe(()=>$.value?._id,()=>{Ye.value=void 0}),pe([Ct,$,k,Q,O,_],()=>{let e=Array.from({length:Ct.value}).map((e,t)=>({accept:`camera`,index:t,lastDroppedCamera:void 0}));if(!X.value){let t=$.value?._id,n=t?It(t):void 0,r=n?O.value.camview.layouts?.[n]:void 0,i=new Set(k.value?.result.map(e=>e._id)??[]),a=!1;for(let t of $.value?.cameras||[]){if(!e[t.index])continue;let n=k.value?.result.find(e=>e._id===t.cameraId);e[t.index].lastDroppedCamera=n;let o=r?.find(e=>e.index===t.index);o&&(!o.cameraId||i.has(o.cameraId)?(e[t.index].x=o.x,e[t.index].y=o.y,e[t.index].colSpan=o.w,e[t.index].rowSpan=o.h):a=!0)}a&&n&&O.value.camview.layouts?.[n]&&(O.value.camview.layouts[n]=O.value.camview.layouts[n].filter(e=>!e.cameraId||i.has(e.cameraId)))}qe.value=e},{deep:!0,immediate:!0}),(e,r)=>{let i=Ve,o=et,s=ce,c=Ze,u=Je,d=Ge,f=E,p=T,m=je,g=Re,v=Fe,ee=Le,te=Be,y=t,b=oe,S=l,ne=Me,re=C,w=n;return D(),U(`div`,Kn,[P(te,{"left-offset":I(tt),animate:``},{left:M(()=>[!I(X)&&I($)?(D(),N(i,{key:0,type:`dropdown`,label:I($).name,"menu-open":I(De)?.isOpen,disabled:I($e)||I(Y),onClick:r[0]||=e=>I(De)?.toggleMenu(e)},null,8,[`label`,`menu-open`,`disabled`])):I(X)&&I(J).name?(D(),N(i,{key:1,label:I(J).name,disabled:I($e)},null,8,[`label`,`disabled`])):z(``,!0)]),right:M(()=>[!I(Q)&&I($)?j((D(),N(i,{key:0,active:I(Z),onClick:r[1]||=e=>Z.value=!I(Z)},{icon:M(()=>[I(Z)?(D(),N(s,{key:1,width:`100%`,height:`100%`})):(D(),N(o,{key:0,width:`100%`,height:`100%`}))]),_:1},8,[`active`])),[[w,{value:I(Z)?e.$t(`views.camview.rearrange_done`):e.$t(`views.camview.rearrange`)},void 0,{bottom:!0}]]):z(``,!0),!I(Q)&&I($)&&I(Z)&&!I(_)?j((D(),N(i,{key:1,onClick:r[2]||=e=>I(q)?.fitAspectRatios()},{icon:M(()=>[P(c,{width:`100%`,height:`100%`})]),_:1})),[[w,{value:e.$t(`views.camview.rearrange_fit_aspect`)},void 0,{bottom:!0}]]):z(``,!0),!I(Q)&&I($)&&I(Z)&&!I(_)?j((D(),N(i,{key:2,onClick:r[3]||=e=>I(q)?.compactGrid()},{icon:M(()=>[P(u,{width:`100%`,height:`100%`})]),_:1})),[[w,{value:e.$t(`views.camview.rearrange_auto`)},void 0,{bottom:!0}]]):z(``,!0),!I(Q)&&I($)&&I(Z)&&!I(_)?j((D(),N(i,{key:3,active:I(it)!==`aspect`,"menu-open":I(Ae)?.isOpen,onClick:r[4]||=e=>I(Ae)?.toggleMenu(e)},{icon:M(()=>[P(d,{width:`100%`,height:`100%`})]),_:1},8,[`active`,`menu-open`])),[[w,{value:e.$t(`views.camview.card_fit`)},void 0,{bottom:!0}]]):z(``,!0),!I(Q)&&I($)?j((D(),N(i,{key:4,active:I(Pe),onClick:r[5]||=e=>Pe.value=!I(Pe)},{icon:M(()=>[I(Pe)?(D(),N(p,{key:1,width:`100%`,height:`100%`})):(D(),N(f,{key:0,width:`100%`,height:`100%`}))]),_:1},8,[`active`])),[[w,{value:I(Pe)?e.$t(`components.form.tooltip.hide_timeline`):e.$t(`components.form.tooltip.show_timeline`)},void 0,{bottom:!0}]]):z(``,!0),!I(Q)&&I($)?(D(),N(m,{key:5,layout:`vertical`})):z(``,!0),!I(Q)&&I($)?j((D(),N(i,{key:6,disabled:I(Z),onClick:r[6]||=e=>Dt(`removeView`)},{icon:M(()=>[P(g,{width:`100%`,height:`100%`})]),_:1},8,[`disabled`])),[[w,{value:e.$t(`components.form.tooltip.delete`)},void 0,{bottom:!0}]]):z(``,!0),!I(Y)&&!I(X)&&I($)?j((D(),N(i,{key:7,disabled:I(Z),onClick:r[7]||=e=>Y.value=!0},{icon:M(()=>[P(v,{width:`100%`,height:`100%`})]),_:1},8,[`disabled`])),[[w,{value:e.$t(`components.form.tooltip.edit`)},void 0,{bottom:!0}]]):z(``,!0),!I(Y)&&!I(X)?j((D(),N(i,{key:8,disabled:I(Z),onClick:I(ke)?.toggleMenu},{icon:M(()=>[P(ee,{class:F([`transform transition-transform duration-300`,{"rotate-45":I(ke)?.isOpen}]),width:`100%`,height:`100%`},null,8,[`class`])]),_:1},8,[`disabled`,`onClick`])),[[w,{value:e.$t(`components.form.tooltip.new`)},void 0,{bottom:!0}]]):z(``,!0),I(Y)||I(X)?(D(),N(i,{key:9,label:e.$t(`components.form.button.cancel`),onClick:r[8]||=e=>I(Y)?Y.value=!1:X.value=!1},null,8,[`label`])):z(``,!0),I(Y)||I(X)?(D(),N(i,{key:10,label:e.$t(`components.form.button.save`),disabled:I(qe).every(e=>e.lastDroppedCamera===void 0),primary:``,onClick:Mt},null,8,[`label`,`disabled`])):z(``,!0)]),_:1},8,[`left-offset`]),L(`div`,{class:F([`w-full h-full flex relative`,{"flex-row":I(x),"flex-col":!I(x)}]),style:G({paddingTop:`${I(55)}px`})},[L(`div`,{class:F([`flex relative z-1 camview-content-transition`,{"h-full items-center justify-center":I(x)||!I(ve)?.result.length,"w-full items-start justify-start":!I(x)&&I(ve)?.result.length}]),style:G(I(ct))},[I($e)?(D(),U(`div`,qn,[(D(),N(y,{key:0,class:`w-[30px] h-[30px] m-0`,"stroke-width":`5`}))])):!I($)&&!I(X)?(D(),U(`div`,Jn,[L(`div`,Yn,[P(b,{class:`w-12 h-12 text-muted`}),L(`span`,Xn,K(e.$t(`views.camview.no_views_configured`)),1)])])):I($)||I(X)?(D(),U(`div`,{key:2,class:F([`w-full h-full`,{"p-2 pb-0":!I(_)}])},[(D(),N(an,{ref_key:`viewDndRef`,ref:q,key:I(O).camview.viewid+(I(X)?`-new`:I(Y)?`-edit`:`-view`),cameras:I(k)?.result||[],"edit-mode":I(X)||I(Y),"rearrange-mode":I(Z),"view-size":I(X)?I(J).viewSize:I(Ct),title:I(J).name,cards:I(qe),"camera-card-props":I(st),"camera-card-models":I(Qe),onDrop:Nt,onRemove:Ft,onChangeViewSize:r[9]||=e=>Dt(`editView`),onExpand:Rt,onRearrange:Lt},null,8,[`cameras`,`edit-mode`,`rearrange-mode`,`view-size`,`title`,`cards`,`camera-card-props`,`camera-card-models`]))],2)):z(``,!0)],6),P(me,{name:I(x)?`slide-left`:`slide-up`,onBeforeEnter:r[10]||=e=>Ie.value=!0,onAfterEnter:r[11]||=e=>ze.value=!1,onBeforeLeave:r[12]||=e=>Ie.value=!1},{default:M(()=>[I(Pe)?(D(),N(I(a),{key:0,"camera-ids":I(_t),"event-camera-ids":I(ht),"camera-names":I(vt),"initial-timestamp":I(xt),onEventSelect:zt,loading:I(ze),type:I(x)?`vertical`:`horizontal`,"dark-mode":``,"md-breakpoint":I(ie),class:F([`shrink-0 transition-[left] duration-200`,{"h-full w-[400px] pt-2 pr-2":I(x),"h-[200px] pt-2 px-2 pb-2 pb-safe-offset fixed right-safe-offset-0 z-10":!I(x),"p-0! pt-2! border-color":I(_)}]),"card-class":{"!shadow-xl":!0,"!rounded-none border-l-0! border-r-0!":I(_)},style:G(I(x)?void 0:{left:`${I(tt)}px`,bottom:`calc(${I(h)}px + env(safe-area-inset-bottom, 0px))`}),"locale-settings":I(nt)},null,8,[`camera-ids`,`event-camera-ids`,`camera-names`,`initial-timestamp`,`loading`,`type`,`md-breakpoint`,`class`,`card-class`,`style`,`locale-settings`])):z(``,!0)]),_:1},8,[`name`])],6),!I(Q)&&I($)?(D(),N(ne,{key:0,model:I(pt),direction:`up`,"transition-delay":80,"tooltip-options":{position:`left`,event:void 0},class:`absolute right-2 z-11 dark-mode`,pt:{root:{style:`pointer-events: none`}},style:G({bottom:I(x)?`0`:`calc(${I(Ie)?192:0}px + ${I(h)>0?`0.5rem`:`0px`})`,right:I(x)?`calc(${I(Ie)?400:0}px + 0.5rem)`:`0.5rem`,transition:`bottom 0.25s ease-out, right 0.25s ease-out`})},{button:M(({visible:e,toggleCallback:t})=>[P(S,{severity:`secondary`,class:F([`dark-mode opacity-40 hover:opacity-100 active:opacity-100 focus:opacity-100 transition pointer-events-auto`,{"opacity-100":e}]),rounded:``,loading:I($e),onClick:t},{icon:M(()=>[L(`div`,Zn,[L(`div`,{class:F([`bg-white 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}])},null,2),L(`div`,{class:F([`bg-white 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}])},null,2),L(`div`,{class:F([`bg-white 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}])},null,2)])]),_:2},1032,[`class`,`loading`,`onClick`])]),item:M(({item:e,toggleCallback:t})=>[j((D(),N(S,de({loading:I($e),severity:`secondary`},e.buttonProps,{rounded:``,onClick:t}),{icon:M(()=>[(D(),N(he(e.icon)))]),_:2},1040,[`loading`,`onClick`])),[[w,{value:e.label}]])]),_:1},8,[`model`,`style`])):z(``,!0),P(re,{ref_key:`menuRef`,ref:De,items:I(wt),popover:{pt:{content:{class:`p-0! rounded-xl! overflow-hidden!`}}}},null,8,[`items`]),P(re,{ref_key:`cardFitMenuRef`,ref:Ae,items:I(at),popover:{pt:{content:{class:`p-0! rounded-xl! overflow-hidden!`}}}},null,8,[`items`]),P(re,{ref_key:`newViewMenuRef`,ref:ke,items:I(Et),popover:{pt:{content:{class:`p-0! rounded-xl! overflow-hidden!`}}}},null,8,[`items`])])}}}),[[`__scopeId`,`data-v-ea6025c5`]]);export{Qn as default};
1
+ import{Br as e,Ft as t,Gt as n,I as r,c as i,p as a,s as o,ti as s,xt as c,zt as l}from"./vendor-cameraui-BRv7o4zz.js";import{$ as u,An as d,C as f,Cr as p,Dn as m,Fn as h,Gt as g,In as _,Lt as v,Mt as ee,Nn as te,Pn as y,Vn as b,_n as x,an as S,br as ne,g as re,hn as C,k as ie,ln as w,mn as T,o as ae,pn as E,qn as oe,un as se,wn as ce}from"./api-BI5TkcMD.js";import{$t as le,An as ue,Cn as de,Dn as fe,Kn as pe,Kt as me,Mn as D,Pn as O,Qt as k,Rn as he,Wn as A,Xn as j,Xt as ge,Yn as M,an as N,ar as _e,b as ve,dr as ye,fn as P,gr as F,hr as I,in as L,jn as be,mn as R,on as z,pr as B,rn as V,rr as H,sn as U,sr as W,ur as xe,v as Se,vr as G,wn as Ce,xn as we,y as Te,yn as Ee,yr as K}from"./vendor-nVfLT5jI.js";import{a as De}from"./intercomService-fFto_C1t.js";import{p as Oe}from"./vendor-core-BUse5adB.js";import{K as ke,R as Ae,U as je,o as Me,x as Ne}from"./vendor-primevue-C85v-zl5.js";import{a as q,i as J,n as Y,r as X,t as Z}from"./vendor-dnd-BopggnhP.js";import{t as Pe}from"./close-BiHUNAkN.js";import{n as Fe,t as Ie}from"./microphone-DGgazpZX.js";import{t as Le}from"./plus-TyoK27n7.js";import{t as Re}from"./delete-B_wgbT_W.js";import{t as ze}from"./CuiCameraPipCard-BBMkU-eN.js";import{n as Be,t as Ve}from"./CuiTopNavbarItem-Btig8IUi.js";import{t as He}from"./vendor-gridstack-C5hqQCSi.js";var Ue={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function We(e,t){return D(),U(`svg`,Ue,[...t[0]||=[L(`path`,{fill:`currentColor`,d:`m9.5 13.09l1.41 1.41l-4.5 4.5H10v2H3v-7h2v3.59zm1.41-3.59L9.5 10.91L5 6.41V10H3V3h7v2H6.41zm3.59 3.59l4.5 4.5V14h2v7h-7v-2h3.59l-4.5-4.5zM13.09 9.5l4.5-4.5H14V3h7v7h-2V6.41l-4.5 4.5z`},null,-1)]])}var Ge=H({name:`mdi-arrow-expand-all`,render:We}),Ke={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function qe(e,t){return D(),U(`svg`,Ke,[...t[0]||=[L(`path`,{fill:`currentColor`,d:`M7.5 5.6L5 7l1.4-2.5L5 2l2.5 1.4L10 2L8.6 4.5L10 7zm12 9.8L22 14l-1.4 2.5L22 19l-2.5-1.4L17 19l1.4-2.5L17 14zM22 2l-1.4 2.5L22 7l-2.5-1.4L17 7l1.4-2.5L17 2l2.5 1.4zm-8.66 10.78l2.44-2.44l-2.12-2.12l-2.44 2.44zm1.03-5.49l2.34 2.34c.39.37.39 1.02 0 1.41L5.04 22.71c-.39.39-1.04.39-1.41 0l-2.34-2.34c-.39-.37-.39-1.02 0-1.41L12.96 7.29c.39-.39 1.04-.39 1.41 0`},null,-1)]])}var Je=H({name:`mdi-auto-fix`,render:qe}),Ye={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function Xe(e,t){return D(),U(`svg`,Ye,[...t[0]||=[L(`path`,{fill:`currentColor`,"fill-rule":`evenodd`,d:`M9 3a2 2 0 0 1 2 2v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2zm10 0a2 2 0 0 1 2 2v2a2 2 0 0 1-2 2h-4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2zm2 10a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2h4a2 2 0 0 0 2-2zM9 15a2 2 0 0 1 2 2v2a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-2a2 2 0 0 1 2-2z`,"clip-rule":`evenodd`},null,-1)]])}var Ze=H({name:`mingcute-grid2-fill`,render:Xe}),Qe={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function $e(e,t){return D(),U(`svg`,Qe,[...t[0]||=[L(`path`,{fill:`currentColor`,d:`M13 6v5h5V7.75L22.25 12L18 16.25V13h-5v5h3.25L12 22.25L7.75 18H11v-5H6v3.25L1.75 12L6 7.75V11h5V6H7.75L12 1.75L16.25 6z`},null,-1)]])}var et=H({name:`mdi-cursor-move`,render:$e}),tt={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function nt(e,t){return D(),U(`svg`,tt,[...t[0]||=[L(`path`,{fill:`currentColor`,d:`M17.41 2H6.59A4.58 4.58 0 0 0 2 6.59v10.82A4.58 4.58 0 0 0 6.59 22h10.82A4.58 4.58 0 0 0 22 17.41V6.59A4.58 4.58 0 0 0 17.41 2m-2.653 12.447a1.924 1.924 0 0 1-1.924 1.923h-5.86a1.924 1.924 0 0 1-1.923-1.923v-4.87a1.923 1.923 0 0 1 1.927-1.924h5.856a1.925 1.925 0 0 1 1.924 1.924Zm4.2.74a.771.771 0 0 1-1.266.59l-2.211-1.854a.85.85 0 0 1-.3-.653v-2.52a.85.85 0 0 1 .31-.657l2.206-1.82a.769.769 0 0 1 1.26.594Z`},null,-1)]])}var rt=H({name:`cbi-iosfacetime`,render:nt}),it={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function at(e,t){return D(),U(`svg`,it,[...t[0]||=[L(`path`,{fill:`currentColor`,d:`m8.471 7.237l3.056 12.992c.233.993 1.63 1.04 1.929.065l2.945-9.58l.384 1.527a1 1 0 0 0 .97.756H21a1 1 0 1 0 0-2h-2.466l-1.069-4.241c-.247-.981-1.628-1.017-1.925-.05l-2.912 9.472L9.475 2.771c-.24-1.02-1.688-1.03-1.943-.014l-2.065 8.24H3a1 1 0 0 0 0 2h3.247a1 1 0 0 0 .97-.757z`},null,-1)]])}var ot=H({name:`fluent-pulse-24-filled`,render:at}),st={viewBox:`0 0 16 16`,width:`1.2em`,height:`1.2em`};function ct(e,t){return D(),U(`svg`,st,[...t[0]||=[L(`path`,{fill:`currentColor`,d:`M7.557 2.066A.75.75 0 0 1 8 2.75v10.5a.75.75 0 0 1-1.248.56L3.59 11H2a1 1 0 0 1-1-1V6a1 1 0 0 1 1-1h1.59l3.162-2.81a.75.75 0 0 1 .805-.124m5.393.984a.75.75 0 1 0-1.06 1.06a5.5 5.5 0 0 1 0 7.78a.75.75 0 1 0 1.06 1.06a7 7 0 0 0 0-9.9`},null,-1),L(`path`,{fill:`currentColor`,d:`M10.828 5.172a.75.75 0 1 0-1.06 1.06a2.5 2.5 0 0 1 0 3.536a.75.75 0 1 0 1.06 1.06a4 4 0 0 0 0-5.656`},null,-1)]])}var lt=H({name:`heroicons-speaker-wave-16-solid`,render:ct}),Q={viewBox:`0 0 16 16`,width:`1.2em`,height:`1.2em`};function ut(e,t){return D(),U(`svg`,Q,[...t[0]||=[L(`path`,{fill:`currentColor`,d:`M7.557 2.066A.75.75 0 0 1 8 2.75v10.5a.75.75 0 0 1-1.248.56L3.59 11H2a1 1 0 0 1-1-1V6a1 1 0 0 1 1-1h1.59l3.162-2.81a.75.75 0 0 1 .805-.124M11.28 5.72a.75.75 0 1 0-1.06 1.06L11.44 8l-1.22 1.22a.75.75 0 1 0 1.06 1.06l1.22-1.22l1.22 1.22a.75.75 0 1 0 1.06-1.06L13.56 8l1.22-1.22a.75.75 0 0 0-1.06-1.06L12.5 6.94z`},null,-1)]])}var dt=H({name:`heroicons-speaker-x-mark-16-solid`,render:ut}),ft={viewBox:`0 0 48 48`,width:`1.2em`,height:`1.2em`};function pt(e,t){return D(),U(`svg`,ft,[...t[0]||=[L(`g`,{fill:`none`,stroke:`currentColor`,"stroke-linejoin":`round`,"stroke-width":`4`},[L(`path`,{fill:`currentColor`,d:`M16.866 7.47A18 18 0 0 0 16 13c0 9.941 8.059 18 18 18a17.9 17.9 0 0 0 7.134-1.47C38.801 36.767 32.012 42 24 42c-9.941 0-18-8.059-18-18c0-7.407 4.473-13.768 10.866-16.53Z`}),L(`path`,{"stroke-linecap":`round`,d:`M31.66 10H41l-10 8h10`})],-1)]])}var mt=H({name:`icon-park-solid-sleep`,render:pt}),$={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function ht(e,t){return D(),U(`svg`,$,[...t[0]||=[L(`path`,{fill:`currentColor`,d:`M10.4 13.45h3.2l.6 1.625q.075.2.238.313t.362.112q.35 0 .538-.275t.062-.6l-2.55-6.7q-.075-.2-.237-.312T12.25 7.5h-.5q-.2 0-.363.113t-.237.312L8.625 14.65q-.125.3.05.575t.525.275q.2 0 .363-.112t.237-.313zm.4-1.15L11.95 9h.1l1.15 3.3zM12 22q-2.075 0-3.9-.788t-3.175-2.137T2.788 15.9T2 12q0-.8.125-1.6T2.5 8.825q.125-.4.513-.537t.737.062q.375.2.538.588t.037.812q-.15.55-.238 1.113T4 12q0 3.35 2.325 5.675T12 20t5.675-2.325T20 12t-2.325-5.675T12 4q-.6 0-1.187.087T9.65 4.35q-.425.125-.8-.025T8.3 3.8t-.013-.762t.563-.513q.75-.275 1.55-.4T12 2q2.075 0 3.9.788t3.175 2.137T21.213 8.1T22 12t-.788 3.9t-2.137 3.175t-3.175 2.138T12 22M4.438 6.563Q4 6.125 4 5.5t.438-1.062T5.5 4t1.063.438T7 5.5t-.437 1.063T5.5 7t-1.062-.437M12 12`},null,-1)]])}var gt=H({name:`material-symbols-motion-photos-auto-outline-rounded`,render:ht}),_t={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function vt(e,t){return D(),U(`svg`,_t,[...t[0]||=[L(`path`,{fill:`currentColor`,d:`M21 15v3h3v2h-3v3h-2v-3h-3v-2h3v-3zm-7 3H3V6h16v7h2V6c0-1.11-.89-2-2-2H3a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h11z`},null,-1)]])}var yt=H({name:`mdi-card-plus-outline`,render:vt}),bt={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function xt(e,t){return D(),U(`svg`,bt,[...t[0]||=[L(`path`,{fill:`currentColor`,d:`M12 2a7 7 0 0 1 7 7a7 7 0 0 1-7 7a7 7 0 0 1-7-7a7 7 0 0 1 7-7m0 2a5 5 0 0 0-5 5a5 5 0 0 0 5 5a5 5 0 0 0 5-5a5 5 0 0 0-5-5m0 2a3 3 0 0 1 3 3a3 3 0 0 1-3 3a3 3 0 0 1-3-3a3 3 0 0 1 3-3M6 22a2 2 0 0 1-2-2c0-.38.1-.73.29-1.03l1.82-3.16A9 9 0 0 0 12 18c2.25 0 4.31-.83 5.89-2.19l1.82 3.16c.19.3.29.65.29 1.03a2 2 0 0 1-2 2z`},null,-1)]])}var St=H({name:`mdi-webcam`,render:xt}),Ct={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function wt(e,t){return D(),U(`svg`,Ct,[...t[0]||=[L(`path`,{fill:`currentColor`,d:`M9.367 2.25h5.266c1.092 0 1.958 0 2.655.057c.714.058 1.317.18 1.869.46a4.75 4.75 0 0 1 2.075 2.077c.281.55.403 1.154.461 1.868c.057.697.057 1.563.057 2.655v5.266c0 1.092 0 1.958-.057 2.655c-.058.714-.18 1.317-.46 1.869a4.75 4.75 0 0 1-2.076 2.075c-.552.281-1.155.403-1.869.461c-.697.057-1.563.057-2.655.057H9.367c-1.092 0-1.958 0-2.655-.057c-.714-.058-1.317-.18-1.868-.46a4.75 4.75 0 0 1-2.076-2.076c-.281-.552-.403-1.155-.461-1.869c-.057-.697-.057-1.563-.057-2.655V9.367c0-1.092 0-1.958.057-2.655c.058-.714.18-1.317.46-1.868a4.75 4.75 0 0 1 2.077-2.076c.55-.281 1.154-.403 1.868-.461c.697-.057 1.563-.057 2.655-.057M10.25 8a.75.75 0 0 0-1.5 0v8a.75.75 0 0 0 1.5 0v-3.25h3.5V16a.75.75 0 0 0 1.5 0V8a.75.75 0 0 0-1.5 0v3.25h-3.5z`},null,-1)]])}var Tt=H({name:`mynaui-letter-h-square-solid`,render:wt}),Et={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function Dt(e,t){return D(),U(`svg`,Et,[...t[0]||=[L(`path`,{fill:`currentColor`,d:`M9.367 2.25h5.266c1.092 0 1.958 0 2.655.057c.714.058 1.317.18 1.869.46a4.75 4.75 0 0 1 2.075 2.077c.281.55.403 1.154.461 1.868c.057.697.057 1.563.057 2.655v5.266c0 1.092 0 1.958-.057 2.655c-.058.714-.18 1.317-.46 1.869a4.75 4.75 0 0 1-2.076 2.075c-.552.281-1.155.403-1.869.461c-.697.057-1.563.057-2.655.057H9.367c-1.092 0-1.958 0-2.655-.057c-.714-.058-1.317-.18-1.868-.46a4.75 4.75 0 0 1-2.076-2.076c-.281-.552-.403-1.155-.461-1.869c-.057-.697-.057-1.563-.057-2.655V9.367c0-1.092 0-1.958.057-2.655c.058-.714.18-1.317.46-1.868a4.75 4.75 0 0 1 2.077-2.076c.55-.281 1.154-.403 1.868-.461c.697-.057 1.563-.057 2.655-.057M10.25 8a.75.75 0 0 0-1.5 0v7.5c0 .414.336.75.75.75H15a.75.75 0 0 0 0-1.5h-4.75z`},null,-1)]])}var Ot=H({name:`mynaui-letter-l-square-solid`,render:Dt}),kt={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function At(e,t){return D(),U(`svg`,kt,[...t[0]||=[L(`path`,{fill:`currentColor`,d:`M9.367 2.25h5.266c1.092 0 1.958 0 2.655.057c.714.058 1.317.18 1.869.46a4.75 4.75 0 0 1 2.075 2.077c.281.55.403 1.154.461 1.868c.057.697.057 1.563.057 2.655v5.266c0 1.092 0 1.958-.057 2.655c-.058.714-.18 1.317-.46 1.869a4.75 4.75 0 0 1-2.076 2.075c-.552.281-1.155.403-1.869.461c-.697.057-1.563.057-2.655.057H9.367c-1.092 0-1.958 0-2.655-.057c-.714-.058-1.317-.18-1.868-.46a4.75 4.75 0 0 1-2.076-2.076c-.281-.552-.403-1.155-.461-1.869c-.057-.697-.057-1.563-.057-2.655V9.367c0-1.092 0-1.958.057-2.655c.058-.714.18-1.317.46-1.868a4.75 4.75 0 0 1 2.077-2.076c.55-.281 1.154-.403 1.868-.461c.697-.057 1.563-.057 2.655-.057m.233 5.3A.75.75 0 0 0 8.25 8v8a.75.75 0 0 0 1.5 0v-5.75l1.65 2.2a.75.75 0 0 0 1.2 0l1.65-2.2V16a.75.75 0 0 0 1.5 0V8a.75.75 0 0 0-1.35-.45l-2.4 3.2z`},null,-1)]])}var jt=H({name:`mynaui-letter-m-square-solid`,render:At}),Mt={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function Nt(e,t){return D(),U(`svg`,Mt,[...t[0]||=[L(`path`,{fill:`currentColor`,d:`M12 .36A5.4 5.4 0 0 0 6.62 5.3a5.4 5.4 0 0 0-1.22-.14a5.4 5.4 0 0 0-2.143 10.357a5.4 5.4 0 0 0-.737 2.723a5.4 5.4 0 0 0 9.54 3.466a5.4 5.4 0 0 0 8.833-6.137a5.4 5.4 0 0 0-3.505-10.152A5.4 5.4 0 0 0 12 .36M6.283 7.228h10.592c.746 0 1.352.605 1.352 1.349v7.646a1.35 1.35 0 0 1-1.352 1.348h-3.608l-7.24 3.55l1.1-3.55h-.844a1.35 1.35 0 0 1-1.352-1.348V8.577c0-.744.606-1.349 1.352-1.349`},null,-1)]])}var Pt=H({name:`simple-icons-webrtc`,render:Nt}),Ft={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function It(e,t){return D(),U(`svg`,Ft,[...t[0]||=[L(`path`,{fill:`currentColor`,d:`M9 3h2v2H9zm4 0h2v2h-2zM9 7h2v2H9zm4 0h2v2h-2zm-4 4h2v2H9zm4 0h2v2h-2zm-4 4h2v2H9zm4 0h2v2h-2zm-4 4h2v2H9zm4 0h2v2h-2z`},null,-1)]])}var Lt=H({name:`mdi-drag-vertical`,render:It}),Rt={class:`text-sm text-muted truncate`},zt=d(R({__name:`ViewDnDDrag`,props:{camera:{},isDropped:{type:Boolean},canDrag:{type:Boolean}},setup(e){let{camera:t,canDrag:n}=B(e),r=A(`boxRef`),i=xe(null),a=W(0),o=W(0),s=W(!1),{x:c,y:u}=_(),{isTouch:d}=h(),[f,p]=J(()=>({type:`camera-sidebar`,options:{dropEffect:`copy`},item:t.value,canDrag:n.value,collect:e=>({style:{opacity:e.isDragging()?.4:1},isDragging:e.isDragging()})})),g=V(()=>f.value.isDragging),v=V(()=>g.value&&d.value);function ee(e){d.value&&e.preventDefault()}function te(){i.value&&document.body.contains(i.value)&&document.body.removeChild(i.value),i.value=null}function y(){if(te(),!r.value)return;let e=r.value.cloneNode(!0),t=r.value.getBoundingClientRect();e.style.width=`${t.width}px`,e.style.height=`${t.height}px`,e.classList.add(`drag-preview`),e.style.position=`fixed`,e.style.left=`${c.value-a.value}px`,e.style.top=`${u.value-o.value}px`,document.body.appendChild(e),i.value=e}function b(){s.value=!1,te()}function x(){b(),s.value=!0;let e=r.value?.getBoundingClientRect();e&&(a.value=c.value-e.left,o.value=u.value-e.top,y())}function S(){!i.value||!s.value||requestAnimationFrame(()=>{i.value&&(i.value.style.left=`${c.value-a.value}px`,i.value.style.top=`${u.value-o.value}px`)})}return pe(v,e=>e?x():b()),pe([c,u],()=>S(),{flush:`sync`}),fe(()=>b()),(n,i)=>{let a=Lt,o=m,s=l;return D(),U(`div`,{ref_key:`boxRef`,ref:r,onDragstart:ee},[L(`div`,{ref:I(p),style:G(I(f).style)},[P(s,{disabled:e.isDropped,fluid:``,severity:`secondary`,class:`cui-rounded-corner dark-mode shadow-sm items-center justify-normal`,style:G({cursor:e.isDropped?`not-allowed`:`grab`})},{default:M(()=>[P(a,{size:`20`,class:`text-muted mr-2`}),P(o,{camera:I(t),width:`110px`,class:F([`cui-rounded-corner shadow-md overflow-hidden`,{"opacity-30":e.isDropped}])},null,8,[`camera`,`class`]),L(`span`,Rt,K(I(t).name),1)]),_:1},8,[`disabled`,`style`])],4)],544)}}}),[[`__scopeId`,`data-v-5498a5c0`]]),Bt={editMode:!1,rearrangeMode:!1,viewSize:1},Vt=Object.fromEntries(Object.entries({1:{cols:1,rows:1},4:{cols:2,rows:2},6:{cols:3,rows:3},7:{cols:4,rows:4},9:{cols:3,rows:3},10:{cols:4,rows:4},12:{cols:6,rows:6},13:{cols:4,rows:4},15:{cols:12,rows:12},16:{cols:4,rows:4},20:{cols:6,rows:6},26:{cols:12,rows:12}}).map(([e,t])=>[e,{cols:t.cols*16,rows:t.rows*16}])),Ht=e=>e.map(e=>({x:e.x*16,y:e.y*16,w:e.w*16,h:e.h*16})),Ut=Object.fromEntries(Object.entries({1:[{x:0,y:0,w:1,h:1}],4:[{x:0,y:0,w:1,h:1},{x:1,y:0,w:1,h:1},{x:0,y:1,w:1,h:1},{x:1,y:1,w:1,h:1}],6:[{x:0,y:0,w:2,h:2},{x:2,y:0,w:1,h:1},{x:2,y:1,w:1,h:1},{x:0,y:2,w:1,h:1},{x:1,y:2,w:1,h:1},{x:2,y:2,w:1,h:1}],7:[{x:0,y:0,w:2,h:2},{x:2,y:0,w:2,h:2},{x:0,y:2,w:2,h:2},{x:2,y:2,w:1,h:1},{x:3,y:2,w:1,h:1},{x:2,y:3,w:1,h:1},{x:3,y:3,w:1,h:1}],9:[{x:0,y:0,w:1,h:1},{x:1,y:0,w:1,h:1},{x:2,y:0,w:1,h:1},{x:0,y:1,w:1,h:1},{x:1,y:1,w:1,h:1},{x:2,y:1,w:1,h:1},{x:0,y:2,w:1,h:1},{x:1,y:2,w:1,h:1},{x:2,y:2,w:1,h:1}],10:[{x:0,y:0,w:2,h:2},{x:0,y:2,w:2,h:2},{x:2,y:0,w:1,h:1},{x:3,y:0,w:1,h:1},{x:2,y:1,w:1,h:1},{x:3,y:1,w:1,h:1},{x:2,y:2,w:1,h:1},{x:3,y:2,w:1,h:1},{x:2,y:3,w:1,h:1},{x:3,y:3,w:1,h:1}],12:[{x:0,y:0,w:3,h:3},{x:3,y:0,w:3,h:3},{x:0,y:3,w:3,h:3},{x:3,y:3,w:1,h:1},{x:4,y:3,w:1,h:1},{x:5,y:3,w:1,h:1},{x:3,y:4,w:1,h:1},{x:4,y:4,w:1,h:1},{x:5,y:4,w:1,h:1},{x:3,y:5,w:1,h:1},{x:4,y:5,w:1,h:1},{x:5,y:5,w:1,h:1}],13:[{x:0,y:0,w:2,h:2},{x:2,y:0,w:1,h:1},{x:3,y:0,w:1,h:1},{x:2,y:1,w:1,h:1},{x:3,y:1,w:1,h:1},{x:0,y:2,w:1,h:1},{x:1,y:2,w:1,h:1},{x:2,y:2,w:1,h:1},{x:3,y:2,w:1,h:1},{x:0,y:3,w:1,h:1},{x:1,y:3,w:1,h:1},{x:2,y:3,w:1,h:1},{x:3,y:3,w:1,h:1}],15:[{x:0,y:0,w:6,h:6},{x:6,y:0,w:6,h:6},{x:0,y:6,w:3,h:3},{x:3,y:6,w:3,h:3},{x:0,y:9,w:3,h:3},{x:3,y:9,w:3,h:3},{x:6,y:6,w:2,h:2},{x:8,y:6,w:2,h:2},{x:10,y:6,w:2,h:2},{x:6,y:8,w:2,h:2},{x:8,y:8,w:2,h:2},{x:10,y:8,w:2,h:2},{x:6,y:10,w:2,h:2},{x:8,y:10,w:2,h:2},{x:10,y:10,w:2,h:2}],16:[{x:0,y:0,w:1,h:1},{x:1,y:0,w:1,h:1},{x:2,y:0,w:1,h:1},{x:3,y:0,w:1,h:1},{x:0,y:1,w:1,h:1},{x:1,y:1,w:1,h:1},{x:2,y:1,w:1,h:1},{x:3,y:1,w:1,h:1},{x:0,y:2,w:1,h:1},{x:1,y:2,w:1,h:1},{x:2,y:2,w:1,h:1},{x:3,y:2,w:1,h:1},{x:0,y:3,w:1,h:1},{x:1,y:3,w:1,h:1},{x:2,y:3,w:1,h:1},{x:3,y:3,w:1,h:1}],20:[{x:0,y:0,w:3,h:3},{x:0,y:3,w:3,h:3},{x:3,y:0,w:1,h:1},{x:4,y:0,w:1,h:1},{x:5,y:0,w:1,h:1},{x:3,y:1,w:1,h:1},{x:4,y:1,w:1,h:1},{x:5,y:1,w:1,h:1},{x:3,y:2,w:1,h:1},{x:4,y:2,w:1,h:1},{x:5,y:2,w:1,h:1},{x:3,y:3,w:1,h:1},{x:4,y:3,w:1,h:1},{x:5,y:3,w:1,h:1},{x:3,y:4,w:1,h:1},{x:4,y:4,w:1,h:1},{x:5,y:4,w:1,h:1},{x:3,y:5,w:1,h:1},{x:4,y:5,w:1,h:1},{x:5,y:5,w:1,h:1}],26:[{x:0,y:0,w:3,h:3},{x:3,y:0,w:3,h:3},{x:0,y:3,w:3,h:3},{x:3,y:3,w:3,h:3},{x:6,y:0,w:2,h:2},{x:8,y:0,w:2,h:2},{x:10,y:0,w:2,h:2},{x:6,y:2,w:2,h:2},{x:8,y:2,w:2,h:2},{x:10,y:2,w:2,h:2},{x:6,y:4,w:2,h:2},{x:8,y:4,w:2,h:2},{x:10,y:4,w:2,h:2},{x:0,y:6,w:2,h:2},{x:2,y:6,w:2,h:2},{x:4,y:6,w:2,h:2},{x:0,y:8,w:2,h:2},{x:2,y:8,w:2,h:2},{x:4,y:8,w:2,h:2},{x:0,y:10,w:2,h:2},{x:2,y:10,w:2,h:2},{x:4,y:10,w:2,h:2},{x:6,y:6,w:3,h:3},{x:9,y:6,w:3,h:3},{x:6,y:9,w:3,h:3},{x:9,y:9,w:3,h:3}]}).map(([e,t])=>[e,Ht(t)])),Wt={class:`text-lg font-semibold text-white`},Gt={class:`flex flex-col gap-3 w-full h-full overflow-y-auto`},Kt={class:`cui-label`},qt={key:0,class:`text-muted text-sm`},Jt=R({__name:`ViewDnDSidebar`,props:{cameras:{},droppedCameras:{},title:{}},emits:[`changeViewSize`],setup(e,{emit:t}){let n=e,r=t,{droppedCameras:i}=B(n);function a(e){return i.value.some(t=>t.name===e.name)}return(t,n)=>{let i=l,o=zt;return D(),U(`div`,{class:`sidebar-view-background flex flex-col p-2 border-[1px] border-color gap-2 rounded-xl`,style:G({width:`${I(400)}px`})},[L(`span`,Wt,K(e.title),1),L(`div`,Gt,[P(i,{fluid:``,label:`Change grid size`,class:`cui-button-small dark-mode shrink-0 my-4`,onClick:n[0]||=e=>r(`changeViewSize`)}),L(`label`,Kt,K(t.$t(`components.view_box.available_streams`)),1),(D(!0),U(le,null,O(e.cameras,(e,t)=>(D(),U(`div`,{key:t},[P(o,{camera:e,"is-dropped":a(e),"can-drag":!a(e)},null,8,[`camera`,`is-dropped`,`can-drag`])]))),128)),e.cameras.length?z(``,!0):(D(),U(`span`,qt,K(t.$t(`components.view_box.no_cameras`)),1))])],4)}}}),Yt={key:1,class:`w-full h-full bg-[#1a1a1a] flex items-center justify-center`},Xt={key:2,class:`w-full h-full bg-[#111]`},Zt={key:1,class:`w-full h-full flex items-center justify-center`},Qt={key:0},$t=d(R({__name:`ViewDnDCard`,props:{camera:{},cameras:{},droppedCameras:{},mode:{},index:{},cameraCardProps:{},cameraCardModels:{},onDrop:{type:Function}},emits:[`drop`,`remove`,`expand`],setup(e,{expose:t,emit:r}){let i=e,a=r,{lgBreakpoint:o}=te(),{camera:c,mode:u,cameras:d,droppedCameras:f}=B(i),p=A(`boxRef`),h=A(`containerRef`),g=A(`playerRef`),_=A(`menuRef`),{width:v}=s(h),[ee,y]=X({accept:`camera-sidebar`,drop:i.onDrop,collect:e=>({isOver:e.isOver(),canDrop:e.canDrop()&&!c.value}),canDrop:()=>u.value===`edit`&&!c.value}),b=V(()=>ee.value.canDrop&&ee.value.isOver),x=V(()=>u.value===`edit`?b.value?`#171717`:`#202020`:`#000`),S=V(()=>v.value<=200),ne=V(()=>d.value.filter(e=>!f.value.some(t=>t.name===e.name))),re=V(()=>ne.value.map(e=>({label:e.name,onClick:()=>a(`drop`,e)})));function ie(e){g.value?.toggleMute(e)}async function w(e,t){await g.value?.toggleMicrophone(e,t)}function T(e){g.value?.toggleActivityMode(e)}async function ae(e){await g.value?.toggleSourceRole(e)}async function E(e){await g.value?.toggleStreamingMode(e)}function oe(e){g.value?.toggleBbox(e)}function se(e){g.value?.togglePip(e)}return t({togglePlayerMute:ie,toggleMicrophone:w,togglePlayerActivityMode:T,togglePlayerSourceRole:ae,togglePlayerStreamingMode:E,togglePlayerBbox:oe,togglePip:se}),(t,r)=>{let i=ze,s=Le,f=Pe,v=l,ee=m,te=C,b=n;return D(),U(`div`,{ref_key:`boxRef`,ref:p,class:`view-dnd-card`},[I(u)===`normal`||I(u)===`rearrange`?(D(),U(le,{key:0},[I(c)?(D(),N(i,de({key:0,ref_key:`playerRef`,ref:g},e.cameraCardProps,{"activity-mode":e.cameraCardModels?.activityMode,"source-role":e.cameraCardModels?.sourceRole,"streaming-mode":e.cameraCardModels?.streamingMode,"camera-info":I(c),class:`w-full h-full`,onExpand:r[0]||=e=>a(`expand`,I(c),e)}),null,16,[`activity-mode`,`source-role`,`streaming-mode`,`camera-info`])):I(u)===`rearrange`?(D(),U(`div`,Yt,[P(s,{class:`w-6 h-6 text-white/20`})])):(D(),U(`div`,Xt))],64)):I(u)===`edit`?(D(),U(le,{key:1},[L(`div`,{ref:I(y),style:G({backgroundColor:I(x)}),class:`w-full h-full`},[I(c)?(D(),U(`div`,{key:0,ref_key:`containerRef`,ref:h,class:`w-full h-full flex items-center justify-center relative min-w-0`},[P(v,{class:F([`z-1`,{"cui-icon-lg":I(S),"cui-button-small max-w-[85%]":!I(S)}]),label:I(S)?void 0:I(c).name,onClick:r[1]||=k(e=>a(`remove`,I(c)),[`prevent`])},{icon:M(()=>[P(f)]),_:1},8,[`class`,`label`]),P(ee,{camera:I(c),class:`absolute w-full h-full top-0 left-0 bg-black/50 opacity-20`},null,8,[`camera`])],512)):I(o)?z(``,!0):(D(),U(`div`,Zt,[I(d).length?(D(),N(v,{key:1,text:``,rounded:``,class:`cui-icon-md`,onClick:I(_)?.toggleMenu},{icon:M(()=>[P(s,{width:`100%`,height:`100%`})]),_:1},8,[`onClick`])):j((D(),U(`div`,Qt,[P(v,{text:``,rounded:``,disabled:``,class:`cui-icon-md`},{icon:M(()=>[P(s,{width:`100%`,height:`100%`})]),_:1})])),[[b,{value:t.$t(`views.camview.no_cameras`)},void 0,{top:!0}]])]))],4),P(te,{ref_key:`menuRef`,ref:_,items:I(re),popover:{pt:{content:{class:`p-0! rounded-xl! overflow-hidden!`}}}},null,8,[`items`])],64)):z(``,!0)],512)}}}),[[`__scopeId`,`data-v-ca177470`]]),en={class:`w-full h-full flex flex-row`},tn=[`gs-id`,`gs-x`,`gs-y`,`gs-w`,`gs-h`],nn={class:`grid-stack-item-content`},rn={key:0,class:`absolute top-2 left-2 z-20 px-2 py-1 rounded-md bg-black/75 text-white text-xs tabular-nums pointer-events-none select-none`},an=d(R({__name:`CuiCameraViewDnD`,props:we({cameras:{},viewSize:{},cards:{},title:{},editMode:{type:Boolean},rearrangeMode:{type:Boolean},cameraCardProps:{},cameraCardModels:{}},Bt),emits:[`drop`,`remove`,`changeViewSize`,`expand`,`rearrange`],setup(e,{expose:t,emit:n}){let r=e,i=n,{isTouch:a}=h(),{smBreakpoint:u,lgBreakpoint:d}=te(),p=Ee(o,void 0),m=f(),{routeFrom:g,routeTo:_}=Oe(m),{editMode:v,rearrangeMode:ee,viewSize:y,cards:b,cameraCardProps:x}=B(r),S=A(`viewRef`),ne=A(`wrapperRef`),re=A(`gridRef`),C=A(`cardRefs`),ie=W(),w=W(),T=null,ae=W(),E=W({w:0,h:0}),{isFullscreen:oe,toggle:ce}=c(S,{mode:`scroll`}),de=s(S),me=s(ne),k=V(()=>v.value?`edit`:ee.value?`rearrange`:`normal`),he=V(()=>b.value.map((e,t)=>({card:e,index:t})).filter(({card:e})=>k.value===`edit`||e.lastDroppedCamera!==void 0)),_e=V(()=>ie.value??w.value),ve=V(()=>e=>{let t={...ye(x.value)};if(e){let n=g.value?.includes(`/cameras/${e.name}`)??!1,r=_.value?.includes(`/cameras/${e.name}`)??!1,i=t.viewTransition&&(n||r),a=`/cameras/${e.name}`;t.routerLink=p?.isActive.value?`${a}?startTs=${Math.floor(p.currentTimestamp.value/1e3)}`:a,t.viewTransition=i}return t}),be=V(()=>(de.height.value-16)*(16/9)),R=V(()=>b.value.filter(e=>e.lastDroppedCamera).map(e=>e.lastDroppedCamera));function H(e){let t=b.value[e];if(u.value)return{x:0,y:t?.y??e,w:1,h:1};let n=Ut[y.value]?.[e];return{x:t?.x??n?.x??0,y:t?.y??n?.y??0,w:t?.colSpan??n?.w??1,h:t?.rowSpan??n?.h??1}}function xe(){if(!T)return;let e=[];for(let t of T.getGridItems()){let n=t.gridstackNode;if(!n)continue;let r=parseInt(n.id),i=b.value[r];i?.lastDroppedCamera&&e.push({index:r,cameraId:i.lastDroppedCamera._id,colSpan:n.w,rowSpan:n.h,x:n.x,y:n.y})}i(`rearrange`,e)}function Se(){k.value===`rearrange`&&xe()}function we(e){let t=parseInt(e.gridstackNode?.id??``);if(Number.isNaN(t))return;let n=e.getBoundingClientRect();ae.value=t,E.value={w:Math.round(n.width),h:Math.round(n.height)}}function Te(){if(!re.value)return;let e=Vt[y.value];if(!e)return;let t=u.value,n=t?1:e.cols,r=t?he.value.length:e.rows,i=ne.value?.clientWidth??0,a=t?i*9/16:i>0?i*9/16/e.rows:60,o=k.value===`rearrange`;T=He.init({column:n,minRow:r,cellHeight:a,margin:o?3:1,float:!t,animate:!1,staticGrid:!o,resizable:t?{handles:``}:{handles:`se`},disableResize:t,alwaysShowResizeHandle:!t},re.value),T&&(T.on(`change`,Se),T.on(`resizestart`,(e,t)=>we(t)),T.on(`resize`,(e,t)=>we(t)),T.on(`resizestop`,()=>{ae.value=void 0}),requestAnimationFrame(()=>T?.setAnimation(!0)))}function De(){T&&=(ae.value=void 0,T.offAll(),T.destroy(!1),null)}function ke(e){let t=b.value.findIndex(t=>t.lastDroppedCamera?._id===e);if(t===-1||ie.value===t)return;let n=b.value[t].lastDroppedCamera;w.value=void 0,ie.value=t,i(`expand`,n,!0)}function Ae(e,t,n){n?ie.value=t:(w.value=t,ie.value=void 0,setTimeout(()=>{w.value=void 0},250)),i(`expand`,e,n)}async function je(){await ce()}function Me(e){for(let t of C.value||[])t.togglePlayerMute(e)}async function Ne(e,t){await Promise.allSettled((C.value||[]).map(n=>n.toggleMicrophone(e,t)))}function J(e){for(let t of C.value||[])t.togglePlayerActivityMode(e)}async function X(e){await Promise.allSettled((C.value||[]).map(t=>t.togglePlayerSourceRole(e)))}async function Pe(e){await Promise.allSettled((C.value||[]).map(t=>t.togglePlayerStreamingMode(e)))}function Fe(e){for(let t of C.value||[])t.togglePlayerBbox(e)}function Ie(e){for(let t of C.value||[])t.togglePip(e)}function Le(){T&&(T.compact(),xe())}function Re(){if(!T)return;let e=Vt[y.value];if(!e)return;let t=e.cols,n=[];for(let e of T.getGridItems()){let t=e.gridstackNode;if(!t)continue;let r=parseInt(t.id),[i,a]=((b.value[r]?.lastDroppedCamera)?.interfaceSettings?.aspectRatio||`16:9`).split(`:`).map(Number);n.push({idx:r,el:e,cellRatio:i/a*(9/16)})}if(!n.length)return;let r=e.rows;function i(e){let r=[],i=0,a=0;for(;a<n.length;){let o=[],s=0,c=!1;for(;a<n.length;){let r=n[a].cellRatio;if(e*(s+r)>t&&o.length>0){c=!0;break}o.push(n[a]),s+=r,a++}let l=c?t/s:e;r.push({row:o,ratioSum:s,rowH:l,filled:c}),i+=l}return{rows:r,totalH:i}}let a=.25,o=r,s=a;for(let e=0;e<40;e++){let e=(a+o)/2;i(e).totalH<=r?(s=e,a=e):o=e}let{rows:c}=i(s),l=c.reduce((e,t)=>e+t.rowH,0)||1,u=l>r?r/l:1,d=c.map(e=>e.rowH*u),f=d.reduce((e,t)=>e+t,0),p=new Map,m=Math.max(0,Math.round((r-f)/2)),h=m;for(let e=0;e<c.length;e++){h+=d[e];let n=Math.min(r,Math.round(h)),i=Math.max(1,n-m),{row:a,ratioSum:o,filled:s}=c[e];if(s){let e=0;for(let n=0;n<a.length;n++){let r=n===a.length-1?Math.max(1,t-e):Math.max(1,Math.round(a[n].cellRatio/o*t));p.set(a[n].idx,{x:e,y:m,w:r,h:i}),e+=r}}else{let e=a.map(e=>Math.max(1,Math.round(e.cellRatio*i))),n=e.reduce((e,t)=>e+t,0),r=Math.max(0,Math.round((t-n)/2));for(let t=0;t<a.length;t++)p.set(a[t].idx,{x:r,y:m,w:e[t],h:i}),r+=e[t]}m=n}T.batchUpdate();for(let[e,t]of p){let r=n.find(t=>t.idx===e);r&&T.update(r.el,t)}T.batchUpdate(!1),xe()}return pe([y,()=>he.value.length,u],()=>{De(),Ce(()=>Te())},{immediate:!1}),pe(k,e=>{if(!T)return;let t=e===`rearrange`;T.setStatic(!t),T.margin(t?3:1)}),pe(()=>me.width.value,e=>{if(!(!T||e<=0)){if(T.setAnimation(!1),u.value)T.cellHeight(e*9/16);else{let t=Vt[y.value]?.rows??1;T.cellHeight(e*9/16/t)}requestAnimationFrame(()=>T?.setAnimation(!0))}}),ue(()=>{Ce(()=>Te())}),fe(()=>{De()}),t({expandCameraById:ke,toggleFullscreen:je,toggleAllPlayerMute:Me,toggleAllPlayerMicrophone:Ne,toggleAllPlayerActivityMode:J,toggleAllPlayerSourceRole:X,toggleAllPlayerStreamingMode:Pe,toggleAllPlayerBbox:Fe,toggleAllPip:Ie,compactGrid:Le,fitAspectRatios:Re,isFullscreen:oe}),(t,n)=>{let r=se,o=l,s=$t,c=Jt;return D(),N(I(q),{backend:I(a)?I(Z):I(Y),options:I(a)?{enableMouseEvents:!0}:void 0},{default:M(()=>[L(`div`,en,[L(`div`,{ref_key:`viewRef`,ref:S,class:F([`view-container w-full flex flex-col min-w-0 overflow-y-auto items-center`,{"px-2":I(v)&&I(d)}])},[I(oe)?(D(),N(o,{key:0,severity:`secondary`,rounded:``,class:`cui-fs-exit`,"aria-label":t.$t(`components.form.tooltip.fullscreen_off`),onClick:I(ce)},{icon:M(()=>[P(r,{class:`w-5 h-5`})]),_:1},8,[`aria-label`,`onClick`])):z(``,!0),I(_e)===void 0?z(``,!0):(D(),U(`div`,{key:1,class:`w-full aspect-video relative my-auto`,style:G({maxWidth:`${I(be)}px`})},[P(s,{ref:`fsCardRef`,class:F([`w-full h-full`,{"card-expanded":I(ie)!==void 0,"card-collapsing":I(w)!==void 0}]),camera:I(b)[I(_e)]?.lastDroppedCamera,cameras:e.cameras,"dropped-cameras":I(R),mode:`normal`,index:I(_e),"camera-card-props":{...I(ve)(I(b)[I(_e)]?.lastDroppedCamera),expanded:!0},"camera-card-models":e.cameraCardModels,onExpand:n[0]||=(e,t)=>Ae(e,I(_e),t)},null,8,[`class`,`camera`,`cameras`,`dropped-cameras`,`index`,`camera-card-props`,`camera-card-models`])],4)),j(L(`div`,{ref_key:`wrapperRef`,ref:ne,class:F([`w-full relative my-auto`,I(u)?`h-auto`:`aspect-video`]),style:G(I(u)?void 0:{maxWidth:`${I(be)}px`})},[L(`div`,{ref_key:`gridRef`,ref:re,class:`grid-stack w-full h-full`},[(D(!0),U(le,null,O(I(he),({card:t,index:r})=>(D(),U(`div`,{key:r,class:`grid-stack-item`,"gs-id":String(r),"gs-x":H(r).x,"gs-y":H(r).y,"gs-w":H(r).w,"gs-h":H(r).h},[L(`div`,nn,[P(s,{ref_for:!0,ref_key:`cardRefs`,ref:C,camera:t.lastDroppedCamera,cameras:e.cameras,"dropped-cameras":I(R),mode:I(k),index:r,"camera-card-props":{...I(ve)(t.lastDroppedCamera),expanded:I(_e)===r},"camera-card-models":e.cameraCardModels,"on-drop":e=>i(`drop`,r,e),onExpand:(e,t)=>Ae(e,r,t),onDrop:e=>i(`drop`,r,e),onRemove:n[1]||=e=>i(`remove`,e)},null,8,[`camera`,`cameras`,`dropped-cameras`,`mode`,`index`,`camera-card-props`,`camera-card-models`,`on-drop`,`onExpand`,`onDrop`]),I(ae)===r?(D(),U(`div`,rn,K(I(E).w)+` × `+K(I(E).h),1)):z(``,!0)])],8,tn))),128))],512)],6),[[ge,I(_e)===void 0]])],2),I(v)&&I(d)?(D(),N(c,{key:0,cameras:e.cameras,"dropped-cameras":I(R),title:e.title,class:`view-box shadow-xl`,style:G({"margin-right":I(v)?`0px`:`-${I(400)}px`}),onChangeViewSize:n[2]||=e=>i(`changeViewSize`)},null,8,[`cameras`,`dropped-cameras`,`title`,`style`])):z(``,!0)])]),_:1},8,[`backend`,`options`])}}}),[[`__scopeId`,`data-v-d475eed2`]]),on={class:`flex flex-col gap-3`},sn={class:`text-wrap`},cn={class:`w-full h-full flex items-center justify-center relative`},ln=R({__name:`AudioVisualizer`,emits:[`listening`],setup(e,{expose:t,emit:n}){let r=n,i=De(),a=p(),o=Ee(`dialogRefProps`),s=A(`canvasRef`),c=xe(),u=xe(),d=W(!1),f=V(()=>!!o.loading?.value);async function m(){if(d.value)g();else try{c.value&&g();let e;try{e=await navigator.mediaDevices.getUserMedia({audio:!0})}catch(e){a.add({severity:`warn`,detail:`Can not enable AudioVisualizer, see console.`,life:3e3}),i.warn(`Can not enable AudioVisualizer`,e);return}d.value=!0,r(`listening`,!0),c.value=new AudioContext;let t=c.value.createAnalyser();t.fftSize=1024,u.value=e.getTracks(),c.value.createMediaStreamSource(e).connect(t);let n,o=s.value?.getContext(`2d`),l=()=>{if(s.value&&o){let e=[],r=[];o.clearRect(0,0,s.value.width,s.value.height),requestAnimationFrame(l);let i=t.frequencyBinCount,a=new Uint8Array(i);t.getByteFrequencyData(a),e.push(a);for(let t=0;t<e[0].length;t++)r.push(0),e.forEach(e=>{r[t]+=e[t]});let c=s.value.width/2,u=s.value.height/2;o.beginPath(),o.arc(c,u,30,0,2*Math.PI),o.lineWidth=1,o.stroke(),o.closePath();for(let e=0;e<90;e++){n=r[e]*.4;let t=Math.PI*2/90,i=c+Math.cos(t*e)*30,a=u+Math.sin(t*e)*30,s=c+Math.cos(t*e)*(30+n),l=u+Math.sin(t*e)*(30+n);h(o,i,a,s,l,3)}d.value||o.clearRect(0,0,s.value.width,s.value.height)}};l()}catch(e){g(),i.error(e)}}function h(e,t,n,r,i,a){let o=e.createLinearGradient(t,n,r,i);o.addColorStop(0,`#5b040f`),o.addColorStop(.5,`#b50b21`),o.addColorStop(.9,`#df2a4c`),o.addColorStop(1,`#df6380`),e.lineWidth=a,e.strokeStyle=o,e.beginPath(),e.moveTo(t,n),e.lineTo(r,i),e.stroke(),e.closePath()}function g(){c.value?.close(),c.value=void 0,u.value?.forEach(e=>e.stop()),u.value=void 0,d.value=!1,r(`listening`,!1)}return be(()=>{g()}),t({isLoading:f}),(e,t)=>{let n=Ie,r=l;return D(),U(`div`,on,[L(`span`,sn,K(e.$t(`components.dialog.message.intercom_info`)),1),L(`div`,cn,[P(r,{rounded:``,class:`w-[60px] h-[60px] absolute z-1`,onClick:m},{icon:M(()=>[P(n,{width:`100%`,height:`100%`})]),_:1}),L(`canvas`,{ref_key:`canvasRef`,ref:s,height:`300`,width:`300`},null,512)])])}}}),un=[`fill`],dn=R({__name:`CuiCameraGridIcon1`,props:{color:{default:`currentColor`}},setup(e){let{color:t}=B(e);return(e,n)=>(D(),U(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 970 550`,role:`img`,"area-hidden":`true`,fill:I(t)},[...n[0]||=[L(`path`,{d:`M9 1a8 8 0 0 0-8 8v532a8 8 0 0 0 8 8h952a8 8 0 0 0 8-8V9a8 8 0 0 0-8-8H9Zm0 8h952v532H9V9Z`},null,-1)]],8,un))}}),fn=[`fill`],pn=R({__name:`CuiCameraGridIcon10`,props:{color:{default:`currentColor`}},setup(e){let{color:t}=B(e);return(e,n)=>(D(),U(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 970 550`,role:`img`,"area-hidden":`true`,fill:I(t)},[...n[0]||=[L(`path`,{d:`M9 1a8 8 0 0 0-8 8v532a8 8 0 0 0 8 8h952a8 8 0 0 0 8-8V9a8 8 0 0 0-8-8H9Zm726 275h226v130H735V276Zm-242 0h234v130H493V276Zm0 265V414h234v127H493ZM9 541V276h476v265H9Zm726 0V414h226v127H735ZM961 9v121H735V9h226ZM735 138h226v130H735V138ZM727 9v121H493V9h234ZM493 138h234v130H493V138ZM485 9v259H9V9h476Z`},null,-1)]],8,fn))}}),mn=[`fill`],hn=R({__name:`CuiCameraGridIcon12`,props:{color:{default:`currentColor`}},setup(e){let{color:t}=B(e);return(e,n)=>(D(),U(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 970 550`,role:`img`,"area-hidden":`true`,fill:I(t)},[...n[0]||=[L(`path`,{d:`M9 1a8 8 0 0 0-8 8v532a8 8 0 0 0 8 8h952a8 8 0 0 0 8-8V9a8 8 0 0 0-8-8H9Zm952 275v129H810.5V276H961Zm-158.5 0v129h-152V276h152Zm-152 265V413h152v128h-152Zm-8-265v129H493V276h149.5ZM493 541V413h149.5v128H493ZM9 276h476v265H9V276Zm801.5 265V413H961v128H810.5ZM961 9v259H493V9h468ZM9 268V9h476v259H9Z`},null,-1)]],8,mn))}}),gn=[`fill`],_n=R({__name:`CuiCameraGridIcon13`,props:{color:{default:`currentColor`}},setup(e){let{color:t}=B(e);return(e,n)=>(D(),U(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 970 550`,role:`img`,"area-hidden":`true`,fill:I(t)},[...n[0]||=[L(`path`,{d:`M250 549.5h.5v-.5H961a8 8 0 0 0 8-8V9a8 8 0 0 0-8-8H9a8 8 0 0 0-8 8v532a8 8 0 0 0 8 8h233.5v.5h7.5Zm.5-273.5H485v129.5H250.5V276Zm-8 0v129.5H9V276h233.5ZM961 9v121H735V9h226ZM727 9v121H493V9h234ZM493 138h234v130H493V138ZM485 9v259H9V9h476Zm250 129h226v130H735V138Zm0 267.5V276h226v129.5H735ZM493 276h234v129.5H493V276Zm0 265V413.5h234V541H493Zm-242.5 0V413.5H485V541H250.5ZM9 541V413.5h233.5V541H9Zm726 0V413.5h226V541H735Z`},null,-1)]],8,gn))}}),vn=[`fill`],yn=R({__name:`CuiCameraGridIcon15`,props:{color:{default:`currentColor`}},setup(e){let{color:t}=B(e);return(e,n)=>(D(),U(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 970 550`,role:`img`,"area-hidden":`true`,fill:I(t)},[...n[0]||=[L(`path`,{d:`M250 549.5h.5v-.5H961a8 8 0 0 0 8-8V9a8 8 0 0 0-8-8H9a8 8 0 0 0-8 8v532a8 8 0 0 0 8 8h233.5v.5h7.5Zm.5-144V276H485v129.5H250.5Zm-8-129.5v129.5H9V276h233.5Zm570 90H961v82H812.5v-82Zm-160 0h152v82h-152v-82ZM961 276v82H812.5v-82H961Zm-308.5 0h152v82h-152v-82Zm0 180h152v85h-152v-85ZM961 541H812.5v-85H961v85Zm-316.5-93H493v-82h151.5v82Zm0-172v82H493v-82h151.5Zm0 180v85H493v-85h151.5ZM485 413.5V541H250.5V413.5H485Zm-242.5 0V541H9V413.5h233.5ZM961 9v259H493V9h468ZM9 9h476v259H9V9Z`},null,-1)]],8,vn))}}),bn=[`fill`],xn=R({__name:`CuiCameraGridIcon16`,props:{color:{default:`currentColor`}},setup(e){let{color:t}=B(e);return(e,n)=>(D(),U(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 970 550`,role:`img`,"area-hidden":`true`,fill:I(t)},[...n[0]||=[L(`path`,{d:`M9 1a8 8 0 0 0-8 8v532a8 8 0 0 0 8 8h952a8 8 0 0 0 8-8V9a8 8 0 0 0-8-8H9Zm952 8v121.5H732.5V9H961ZM724.5 9v121.5H493V9h231.5ZM493 268V138.5h231.5V268H493Zm0 137.5V276h231.5v129.5H493Zm468 0H732.5V276H961v129.5ZM493 541V413.5h231.5V541H493Zm468 0H732.5V413.5H961V541Zm0-273H732.5V138.5H961V268ZM485 9v121.5H250.5V9H485ZM250.5 138.5H485V268H250.5V138.5ZM242.5 9v121.5H9V9h233.5ZM9 138.5h233.5V268H9V138.5ZM250.5 276H485v129.5H250.5V276Zm0 137.5H485V541H250.5V413.5Zm-8-137.5v129.5H9V276h233.5ZM9 541V413.5h233.5V541H9Z`},null,-1)]],8,bn))}}),Sn=[`fill`],Cn=R({__name:`CuiCameraGridIcon20`,props:{color:{default:`currentColor`}},setup(e){let{color:t}=B(e);return(e,n)=>(D(),U(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 970 550`,role:`img`,"area-hidden":`true`,fill:I(t)},[...n[0]||=[L(`path`,{d:`M9 1a8 8 0 0 0-8 8v532a8 8 0 0 0 8 8h952a8 8 0 0 0 8-8V9a8 8 0 0 0-8-8H9Zm952 94v82H812.5V95H961Zm-156.5 82h-152V95h152v82ZM961 9v78H812.5V9H961ZM652.5 9h152v78h-152V9Zm0 176h152v83h-152v-83ZM961 268H812.5v-83H961v83Zm-308.5 8h152v82h-152v-82Zm160 0H961v82H812.5v-82Zm-168-181v82H493V95h151.5Zm0-86v78H493V9h151.5ZM493 268v-83h151.5v83H493Zm0 90v-82h151.5v82H493ZM9 9h476v259H9V9Zm952 357v82H812.5v-82H961Zm-156.5 0v82h-152v-82h152Zm-152 90h152v85h-152v-85ZM961 541H812.5v-85H961v85ZM644.5 366v82H493v-82h151.5ZM493 541v-85h151.5v85H493ZM9 276h476v265H9V276Z`},null,-1)]],8,Sn))}}),wn=[`fill`],Tn=R({__name:`CuiCameraGridIcon26`,props:{color:{default:`currentColor`}},setup(e){let{color:t}=B(e);return(e,n)=>(D(),U(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 970 550`,role:`img`,"area-hidden":`true`,fill:I(t)},[...n[0]||=[L(`path`,{"fill-rule":`evenodd`,d:`M1.5 9A7.5 7.5 0 0 1 9 1.5h952a7.5 7.5 0 0 1 7.5 7.5v532a7.5 7.5 0 0 1-7.5 7.5H9a7.5 7.5 0 0 1-7.5-7.5V9Zm960 168V94h-153v83h153Zm-160 0h-153V94h153v83Zm7-90h153V9a.5.5 0 0 0-.5-.5H808.5V87Zm-7-78.5V87h-153V8.5h153Zm0 175.5v84.5h-153V184h153Zm7 84.5V184h153v84.5h-153Zm-167-91.5V94h-149v83h149Zm0-90V8.5h-149V87h149Zm-149 97h149v84.5h-149V184Zm0 91.5H719V402H492.5V275.5Zm0 133.5v132.5H719V409H492.5Zm233.5 0v132.5h235a.5.5 0 0 0 .5-.5V409H726Zm235.5-7V275.5H726V402h235.5Zm-476-270V8.5H252V132h233.5ZM245 139H8.5v129.5H245V139Zm0-7V8.5H9a.5.5 0 0 0-.5.5v123H245Zm240.5 136.5V139H252v129.5h233.5Zm-477 7h157v81H8.5v-81Zm164 81v-81h153v81h-153Zm153 7h-153v83h153v-83Zm7 83v-83h153v83h-153Zm-7 7h-153v88h153v-88Zm7 88v-88h153v88h-153Zm0-185v-81h153v81h-153Zm-324 7h157v83H8.5v-83Zm0 90h157v88H9a.5.5 0 0 1-.5-.5v-87.5Z`},null,-1)]],8,wn))}}),En=[`fill`],Dn=R({__name:`CuiCameraGridIcon4`,props:{color:{default:`currentColor`}},setup(e){let{color:t}=B(e);return(e,n)=>(D(),U(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 970 550`,role:`img`,"area-hidden":`true`,fill:I(t)},[...n[0]||=[L(`path`,{d:`M9 1a8 8 0 0 0-8 8v532a8 8 0 0 0 8 8h952a8 8 0 0 0 8-8V9a8 8 0 0 0-8-8H9Zm952 8v259H493V9h468ZM493 541V276h468v265H493ZM485 9v259H9V9h476ZM9 541V276h476v265H9Z`},null,-1)]],8,En))}}),On=[`fill`],kn=R({__name:`CuiCameraGridIcon6`,props:{color:{default:`currentColor`}},setup(e){let{color:t}=B(e);return(e,n)=>(D(),U(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 970 550`,role:`img`,"area-hidden":`true`,fill:I(t)},[...n[0]||=[L(`path`,{d:`M9 1a8 8 0 0 0-8 8v532a8 8 0 0 0 8 8h952a8 8 0 0 0 8-8V9a8 8 0 0 0-8-8H9Zm641.5 187.5H961v171H650.5v-171ZM961 9v171.5H650.5V9H961ZM642.5 9v350.5H9V9h633.5ZM9 541V367.5h315.5V541H9Zm323.5-173.5h310V541h-310V367.5Zm318 0H961V541H650.5V367.5Z`},null,-1)]],8,On))}}),An=[`fill`],jn=R({__name:`CuiCameraGridIcon7`,props:{color:{default:`currentColor`}},setup(e){let{color:t}=B(e);return(e,n)=>(D(),U(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 970 550`,role:`img`,"area-hidden":`true`,fill:I(t)},[...n[0]||=[L(`path`,{d:`M9 1a8 8 0 0 0-8 8v532a8 8 0 0 0 8 8h952a8 8 0 0 0 8-8V9a8 8 0 0 0-8-8H9Zm725.5 275H961v130H734.5V276Zm0 265V414H961v127H734.5Zm-8-265v130H493V276h233.5ZM493 541V414h233.5v127H493ZM9 276h476v265H9V276ZM961 9v259H493V9h468ZM9 268V9h476v259H9Z`},null,-1)]],8,An))}}),Mn=[`fill`],Nn=R({__name:`CuiCameraGridIcon9`,props:{color:{default:`currentColor`}},setup(e){let{color:t}=B(e);return(e,n)=>(D(),U(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 970 550`,role:`img`,"area-hidden":`true`,fill:I(t)},[...n[0]||=[L(`path`,{d:`M969.5 359v-.5h-.5V9a8 8 0 0 0-8-8H9a8 8 0 0 0-8 8v532a8 8 0 0 0 8 8h952a8 8 0 0 0 8-8V366.5h.5V359ZM961 187v171.5H651V187h310ZM651 541V366.5h310V541H651Zm-8-354v171.5H330V187h313ZM330 541V366.5h313V541H330Zm-8-354v171.5H9V187h313ZM9 541V366.5h313V541H9ZM961 9v170H651V9h310ZM643 9v170H330V9h313ZM322 9v170H9V9h313Z`},null,-1)]],8,Mn))}}),Pn={for:`name`,class:`cui-label`},Fn={key:0,class:`flex flex-col gap-6 justify-center`},In={key:0,class:`text-red-500 text-center mb-5`},Ln={class:`md:max-h-[350px] overflow-y-auto`},Rn={class:`block cui-label mb-3`},zn={key:1,class:`flex flex-col gap-6 justify-center`},Bn={key:0,class:`text-red-500 text-center mb-5`},Vn={class:`md:max-h-[450px] overflow-y-auto`},Hn={class:`block cui-label mb-3`},Un={class:`view-select-container`},Wn=[`onClick`],Gn=d(R({__name:`CamviewForm`,props:{form:{},type:{},cameras:{},views:{}},setup(t,{expose:n}){let i=new ne,a=t,o=De(),s=p(),{t:c}=e(),l=Ee(`dialogRefProps`),u=re(),{user:d}=Oe(u),{mutateAsync:f,isPending:m}=i.createViewQuery(),{mutateAsync:h,isPending:g}=i.patchViewQuery(),{form:_,type:v,cameras:ee,views:te}=B(a),y=A(`formRef`),b=W([1,4,6,7,9,10,12,13,15,16,20,26]),S=W(!0),C=W(!0),w=W([]),T=W(!!_.value),E=W(_.value?ae(_.value):{});!T.value&&v.value===`view`&&(E.value.viewSize=b.value[0]);let oe=V(()=>!!(l.loading?.value||m.value||g.value));function se(e){let t=w.value.findIndex(t=>t.name===e.name);t===-1?w.value.push(e):w.value.splice(t,1)}function ce(e){switch(e){case 1:return dn;case 4:return Dn;case 6:return kn;case 7:return jn;case 9:return Nn;case 10:return pn;case 12:return hn;case 13:return _n;case 15:return yn;case 16:return xn;case 20:return Cn;case 26:return Tn;default:return dn}}async function fe(){if(!y.value||!d.value)return;let e=te.value.find(e=>e.name===E.value.name);if(e&&!T.value)return o.error(`View already exists`,e),s.add({severity:`error`,detail:c(`components.toast.validation_failed`),life:3e3}),null;if(v.value===`dnd`){if(C.value)return o.error(`No cameras selected`),s.add({severity:`error`,detail:c(`components.toast.validation_failed`),life:3e3}),null;let e=w.value.map((e,t)=>({cameraId:e._id,index:t}));E.value.cameras=e,E.value.type=`dnd`,E.value.viewSize=1,y.value.setFieldValue(`type`,`dnd`),y.value.setFieldValue(`viewSize`,1),y.value.setFieldValue(`cameras`,e);let t=await y.value.validate();return t?.valid?T.value?await h({username:d.value.username,viewid:E.value._id,viewData:E.value}):await f({username:d.value.username,viewData:E.value}):(o.error(`Validation failed`,t),s.add({severity:`error`,detail:c(`components.toast.validation_failed`),life:3e3}),null)}{if(S.value)return o.error(`No view selected`),s.add({severity:`error`,detail:c(`components.toast.validation_failed`),life:3e3}),null;E.value.cameras=[],E.value.type=`view`,y.value.setFieldValue(`type`,`view`),y.value.setFieldValue(`cameras`,[]);let e=await y.value.validate();return e?.valid?ae(E.value):(o.error(`Validation failed`,e),s.add({severity:`error`,detail:c(`components.toast.validation_failed`),life:3e3}),null)}}return pe(E,e=>{for(let[t,n]of Object.entries(e))y.value?.setFieldValue(t,n);e.viewSize&&(S.value=!1),e.cameras?.length&&(C.value=!1)},{deep:!0,immediate:!0}),pe(w,e=>{C.value=e.length===0},{deep:!0}),ue(()=>{w.value=ee.value?.filter(e=>E.value?.cameras?.some(t=>t.cameraId===e._id))||[]}),n({isLoading:oe,onConfirm:fe}),(e,t)=>{let n=r,i=Ae,a=je,o=ke,s=x;return D(),N(I(ve),{ref_key:`formRef`,ref:y,class:`flex flex-col gap-6`,"validation-schema":I(ie),"initial-values":I(E)},{default:M(()=>[P(I(Te),{modelValue:I(E).name,"onUpdate:modelValue":t[0]||=e=>I(E).name=e,modelModifiers:{trim:!0},name:`name`,as:`div`,class:`flex flex-col field-gap`},{default:M(({field:t,errors:r})=>[L(`label`,Pn,K(e.$t(`components.form.label.name`)),1),P(i,null,{default:M(()=>[P(n,de(t,{invalid:r.length>0,loading:I(oe),type:`text`}),null,16,[`invalid`,`loading`])]),_:2},1024),P(me,{name:`fade`},{default:M(()=>[P(I(Se),{name:`name`,class:`cui-input-error`})]),_:1})]),_:1},8,[`modelValue`]),P(a,{class:`m-0 py-3`}),I(v)===`dnd`?(D(),U(`div`,Fn,[P(me,{name:`fade`},{default:M(()=>[I(C)?(D(),U(`span`,In,K(e.$t(`components.form.error.no_cameras_selected`)),1)):z(``,!0)]),_:1}),L(`div`,Ln,[L(`label`,Rn,K(e.$t(`components.form.label.cameras`)),1),(D(!0),U(le,null,O(I(ee),(e,t)=>(D(),U(`div`,{key:t,class:`cui-list-item`},[P(s,{class:`h-14`,active:I(w).some(t=>t.name===e.name),onClick:t=>se(e)},{append:M(()=>[P(o,{"model-value":I(w).some(t=>t.name===e.name),"onUpdate:modelValue":t=>se(e)},null,8,[`model-value`,`onUpdate:modelValue`])]),default:M(()=>[L(`span`,null,K(e.name),1)]),_:2},1032,[`active`,`onClick`])]))),128))])])):(D(),U(`div`,zn,[P(me,{name:`fade`},{default:M(()=>[I(S)?(D(),U(`span`,Bn,K(e.$t(`components.form.error.no_view_selected`)),1)):z(``,!0)]),_:1}),L(`div`,Vn,[L(`label`,Hn,K(e.$t(`components.form.label.views`)),1),L(`div`,Un,[(D(!0),U(le,null,O(I(b),t=>(D(),U(`div`,{key:t,class:`view-select-item w-full`,onClick:e=>I(E).viewSize=t},[L(`div`,{class:F([`view-select-item-icon w-full p-3`,{"selected-view":I(E).viewSize===t}])},[(D(),N(he(ce(t)),{style:{width:`100%`,height:`100%`}}))],2),L(`span`,{class:F([`view-select-item-label text-muted mt-3 px-2 py-1 cui-rounded-corners`,{"selected-view-label":I(E).viewSize===t}])},K(t)+` `+K(e.$t(`views.camview.cameras`)),3)],8,Wn))),128))])])]))]),_:1},8,[`validation-schema`,`initial-values`])}}}),[[`__scopeId`,`data-v-641aac54`]]),Kn={class:`h-full w-full dark-mode relative`},qn={key:0,class:`flex flex-col w-full h-full items-center justify-center`},Jn={key:1,class:`flex flex-col w-full h-full`},Yn={class:`flex flex-1 min-h-0 flex-col items-center justify-center w-full gap-4`},Xn={class:`text-muted text-sm`},Zn={class:`relative w-6 h-6`},Qn=d(R({__name:`Camview`,props:{navbarWidth:{default:0},navbarLeft:{default:0}},setup(r){let o=new ne,s=new v,c=r,d=e(),{t:f}=d,p=Ne(),m=u(),{bottombarHeight:h}=y(),{smBreakpoint:_,lgBreakpoint:x,mdBreakpoint:ie}=te(),le=re(),{user:ue}=Oe(le),fe=b(),{uiSettings:O}=Oe(fe),{data:k,isLoading:ge}=s.getCamerasQuery({page:1,pageSize:-1}),{data:ve,isLoading:ye}=o.getViewsQuery(ue.value?.username??``,{page:1,pageSize:-1}),{mutate:be,isPending:R}=o.removeViewQuery(),{mutateAsync:H,isPending:xe}=o.createViewQuery(),{mutateAsync:Se,isPending:Ce}=o.patchViewQuery(),{mutateAsync:we}=o.patchViewQuerySilent(),{navbarWidth:Te,navbarLeft:Ee}=B(c),De=A(`menuRef`),ke=A(`newViewMenuRef`),Ae=A(`cardFitMenuRef`),q=A(`viewDndRef`),J=W({}),Y=W(!1),X=W(!1),Z=W(!1),Pe=W(!1),Ie=W(!1),ze=W(!1),He=W(!0),Ue=W(`always-on`),We=W(`low-resolution`),Ke=W(`auto`),qe=W([]),Ye=W(),Xe=W(null),Qe=_e({sourceRole:We.value,activityMode:Ue.value,streamingMode:Ke.value}),$e=V(()=>ge.value||ye.value||R.value||xe.value||Ce.value),tt=V(()=>Te.value+Ee.value),nt=V(()=>({locale:d.locale.value,dayNames:p.config.locale?.dayNames,dayNamesShort:p.config.locale?.dayNamesShort,monthNames:p.config.locale?.monthNames,monthNamesShort:p.config.locale?.monthNamesShort})),it=V(()=>Ye.value??$.value?.cardFit??`aspect`),at=V(()=>[`aspect`,`contain`,`fill`,`cover`].map(e=>({label:f(`views.camview.card_fit_${e}`),description:f(`views.camview.card_fit_${e}_info`),active:it.value===e,onClick:()=>Vt(e)}))),st=V(()=>({doubleClickZoom:!1,flatCard:!0,cardFit:it.value,cameraNameOverlay:!0,control:!0,toolbar:!1,expandableCard:($.value?.cameras?.length??0)>1,detectionIndicatorOverlay:!Z.value&&ft.value,detectionIconsOverlay:!Z.value&&ft.value,boundingBoxOverlay:!1,cardClickAction:`expand`,viewTransition:!0,cardProps:{pt:{root:{style:`background: #000`}}}})),ct=V(()=>ve.value?.result.length?x.value?{width:Ie.value?`calc(100% - 400px)`:`100%`,height:`100%`,overflowY:`scroll`}:{height:`100%`,paddingBottom:Ie.value?h.value>0?`200px`:`192px`:`0px`,overflowY:`scroll`}:{width:`100%`,height:`100%`,overflowY:`scroll`}),Q=V(()=>Y.value||X.value),ut=V(()=>!!q.value?.isFullscreen),ft=V(()=>O.value.camview.detections!==!1),pt=V(()=>[{label:ut.value?f(`components.form.tooltip.fullscreen_off`):f(`components.form.tooltip.fullscreen_on`),icon:ut.value?se:w,command:Ht},{label:He.value?f(`components.form.tooltip.unmute`):f(`components.form.tooltip.mute`),icon:He.value?dt:lt,command:Ut},{label:f(`components.form.tooltip.intercom`),icon:S,command:()=>Dt(`intercom`)},{label:Ke.value===`auto`?`${f(`components.form.tooltip.mode`)}: ${f(`components.form.tooltip.streaming_mode_auto`)}`:Ke.value===`webrtc`?`${f(`components.form.tooltip.mode`)}: ${f(`components.form.tooltip.streaming_mode_webrtc`)}`:`${f(`components.form.tooltip.mode`)}: ${f(`components.form.tooltip.streaming_mode_mse`)}`,icon:Ke.value===`auto`?gt:Ke.value===`webrtc`?Pt:rt,command:()=>Kt()},{label:Ue.value===`always-on`?f(`components.form.tooltip.activity_mode_always_on`):Ue.value===`standby`?f(`components.form.tooltip.activity_mode_standby`):f(`components.form.tooltip.activity_mode_activity`),icon:Ue.value===`always-on`?St:Ue.value===`standby`?mt:ot,command:()=>Wt()},{label:We.value===`low-resolution`?`${f(`components.form.tooltip.resolution`)}: ${f(`components.form.tooltip.source_role_low`)}`:We.value===`mid-resolution`?`${f(`components.form.tooltip.resolution`)}: ${f(`components.form.tooltip.source_role_mid`)}`:`${f(`components.form.tooltip.resolution`)}: ${f(`components.form.tooltip.source_role_high`)}`,icon:We.value===`low-resolution`?Ot:We.value===`mid-resolution`?jt:Tt,command:()=>Gt()},{label:`${f(`components.form.tooltip.detections`)}: ${ft.value?f(`components.form.tooltip.detections_on`):f(`components.form.tooltip.detections_off`)}`,icon:ft.value?g:ee,command:()=>O.value.camview.detections=!ft.value}]),$=V(()=>{let e=ve.value?.result.find(e=>e._id===O.value.camview.viewid)||ve.value?.result[0];return e?(J.value=e,O.value.camview.viewid=e._id):J.value={},e}),ht=V(()=>$.value?.cameras?.map(e=>e.cameraId)??[]),_t=V(()=>{let e=Xe.value;return e&&ht.value.includes(e)?[e]:ht.value}),vt=V(()=>{let e={};for(let t of k.value?.result??[])e[t._id]=t.name;return e}),{master:bt}=i(ht,{sourceRole:`low`,activeIds:_t}),xt=V(()=>bt.mode.value!==`idle`&&bt.currentTimestamp.value>0?Math.floor(bt.currentTimestamp.value/1e3):void 0),Ct=V(()=>Q.value&&J.value.viewSize>0?J.value.viewSize:$.value?$.value.viewSize:1),wt=V(()=>{let e=[];for(let t of ve.value?.result||[])e.push({label:t.name,active:t._id===$.value?._id,onClick:()=>kt(t)});return e}),Et=V(()=>[{label:f(`views.camview.new_view`),icon:yt,onClick:()=>Dt(`newView`)}]);function Dt(e){switch(e){case`newView`:case`editView`:{let t=e===`editView`,n=f(t?`components.dialog.title.edit_view`:`components.dialog.title.new_view`);t?Y.value=!0:X.value=!0,m.openComponentDialog(Gn,{data:{title:n,loading:$e,confirmText:f(`components.form.button.next`),contentProps:{form:t?J.value:void 0,type:`view`,cameras:k.value?.result||[],views:ve.value?.result||[]}},onConfirm:e=>{e&&(J.value=e)},onCancel:()=>{X.value=!1}});break}case`intercom`:m.openComponentDialog(ln,{data:{title:f(`components.dialog.title.intercom`),hideConfirmButton:!0,loading:$e,contentProps:{}},events:{listening:qt}});break;case`removeView`:m.openTextDialog({data:{title:f(`components.dialog.title.confirm`),confirmText:f(`components.form.button.remove`),contentText:f(`components.dialog.message.confirm_remove_layout`),confirmButtonProps:{severity:`danger`}},onConfirm:At})}}function kt(e){O.value.camview.viewid=e._id}function At(){!$.value||!ue.value||be({username:ue.value.username,viewid:$.value._id},{onSuccess:e=>{e.length?O.value.camview.viewid=e[0]._id:O.value.camview.viewid=void 0}})}async function Mt(){if(!ue.value||Object.keys(J.value).length===0)return;let e=qe.value.filter(e=>e.lastDroppedCamera).map(e=>({cameraId:e.lastDroppedCamera._id,index:e.index,colSpan:e.colSpan,rowSpan:e.rowSpan})).sort((e,t)=>e.index-t.index);if(!e.length)return;let t=ae(J.value);t.cameras=e,t._id?Bt(await Se({username:ue.value.username,viewid:t._id,viewData:t})):Bt(await H({username:ue.value.username,viewData:t}))}function Nt(e,t){qe.value[e].lastDroppedCamera=t}function Ft(e){qe.value=qe.value.map(t=>(t.lastDroppedCamera?.name===e.name&&(t.lastDroppedCamera=void 0),t))}function It(e){return`${_.value?`mobile`:`desktop`}:${e}`}function Lt(e){let t=$.value?._id;t&&(O.value.camview.layouts||(O.value.camview.layouts={}),O.value.camview.layouts[It(t)]=e.map(e=>({index:e.index,cameraId:e.cameraId,x:e.x??0,y:e.y??0,w:e.colSpan??1,h:e.rowSpan??1})))}function Rt(e,t){Xe.value=t?e._id:null}function zt(e){let t=Xe.value;!t||!e.cameraId||e.cameraId===t||ht.value.includes(e.cameraId)&&q.value?.expandCameraById(e.cameraId)}function Bt(e){O.value.camview.viewid=e._id,X.value=!1,Y.value=!1}async function Vt(e){let t=$.value,n=ue.value?.username;if(!(!t||!n||it.value===e)){Ye.value=e;try{await we({username:n,viewid:t._id,viewData:{cardFit:e}})}catch{Ye.value=void 0}}}function Ht(){q.value?.toggleFullscreen()}function Ut(){He.value=!He.value,q.value?.toggleAllPlayerMute(He.value)}function Wt(e){let t=Ue.value;t=e||(t===`always-on`?`standby`:t===`standby`?`activity`:`always-on`),q.value?.toggleAllPlayerActivityMode(t),Ue.value=t}async function Gt(e){let t=We.value;t=e||(t===`low-resolution`?`mid-resolution`:t===`mid-resolution`?`high-resolution`:`low-resolution`),await q.value?.toggleAllPlayerSourceRole(t),We.value=t}async function Kt(e){let t=Ke.value;t===`auto`&&(t=`webrtc`);let n=e||(t===`mse`?`webrtc`:`mse`);await q.value?.toggleAllPlayerStreamingMode(n),Ke.value=n}async function qt(e){await q.value?.toggleAllPlayerMicrophone(e)}return pe(Pe,e=>{e&&(ze.value=!0)}),pe(()=>$.value?._id,()=>{Ye.value=void 0}),pe([Ct,$,k,Q,O,_],()=>{let e=Array.from({length:Ct.value}).map((e,t)=>({accept:`camera`,index:t,lastDroppedCamera:void 0}));if(!X.value){let t=$.value?._id,n=t?It(t):void 0,r=n?O.value.camview.layouts?.[n]:void 0,i=new Set(k.value?.result.map(e=>e._id)??[]),a=!1;for(let t of $.value?.cameras||[]){if(!e[t.index])continue;let n=k.value?.result.find(e=>e._id===t.cameraId);e[t.index].lastDroppedCamera=n;let o=r?.find(e=>e.index===t.index);o&&(!o.cameraId||i.has(o.cameraId)?(e[t.index].x=o.x,e[t.index].y=o.y,e[t.index].colSpan=o.w,e[t.index].rowSpan=o.h):a=!0)}a&&n&&O.value.camview.layouts?.[n]&&(O.value.camview.layouts[n]=O.value.camview.layouts[n].filter(e=>!e.cameraId||i.has(e.cameraId)))}qe.value=e},{deep:!0,immediate:!0}),(e,r)=>{let i=Ve,o=et,s=ce,c=Ze,u=Je,d=Ge,f=E,p=T,m=je,g=Re,v=Fe,ee=Le,te=Be,y=t,b=oe,S=l,ne=Me,re=C,w=n;return D(),U(`div`,Kn,[P(te,{"left-offset":I(tt),animate:``},{left:M(()=>[!I(X)&&I($)?(D(),N(i,{key:0,type:`dropdown`,label:I($).name,"menu-open":I(De)?.isOpen,disabled:I($e)||I(Y),onClick:r[0]||=e=>I(De)?.toggleMenu(e)},null,8,[`label`,`menu-open`,`disabled`])):I(X)&&I(J).name?(D(),N(i,{key:1,label:I(J).name,disabled:I($e)},null,8,[`label`,`disabled`])):z(``,!0)]),right:M(()=>[!I(Q)&&I($)?j((D(),N(i,{key:0,active:I(Z),onClick:r[1]||=e=>Z.value=!I(Z)},{icon:M(()=>[I(Z)?(D(),N(s,{key:1,width:`100%`,height:`100%`})):(D(),N(o,{key:0,width:`100%`,height:`100%`}))]),_:1},8,[`active`])),[[w,{value:I(Z)?e.$t(`views.camview.rearrange_done`):e.$t(`views.camview.rearrange`)},void 0,{bottom:!0}]]):z(``,!0),!I(Q)&&I($)&&I(Z)&&!I(_)?j((D(),N(i,{key:1,onClick:r[2]||=e=>I(q)?.fitAspectRatios()},{icon:M(()=>[P(c,{width:`100%`,height:`100%`})]),_:1})),[[w,{value:e.$t(`views.camview.rearrange_fit_aspect`)},void 0,{bottom:!0}]]):z(``,!0),!I(Q)&&I($)&&I(Z)&&!I(_)?j((D(),N(i,{key:2,onClick:r[3]||=e=>I(q)?.compactGrid()},{icon:M(()=>[P(u,{width:`100%`,height:`100%`})]),_:1})),[[w,{value:e.$t(`views.camview.rearrange_auto`)},void 0,{bottom:!0}]]):z(``,!0),!I(Q)&&I($)&&I(Z)&&!I(_)?j((D(),N(i,{key:3,active:I(it)!==`aspect`,"menu-open":I(Ae)?.isOpen,onClick:r[4]||=e=>I(Ae)?.toggleMenu(e)},{icon:M(()=>[P(d,{width:`100%`,height:`100%`})]),_:1},8,[`active`,`menu-open`])),[[w,{value:e.$t(`views.camview.card_fit`)},void 0,{bottom:!0}]]):z(``,!0),!I(Q)&&I($)?j((D(),N(i,{key:4,active:I(Pe),onClick:r[5]||=e=>Pe.value=!I(Pe)},{icon:M(()=>[I(Pe)?(D(),N(p,{key:1,width:`100%`,height:`100%`})):(D(),N(f,{key:0,width:`100%`,height:`100%`}))]),_:1},8,[`active`])),[[w,{value:I(Pe)?e.$t(`components.form.tooltip.hide_timeline`):e.$t(`components.form.tooltip.show_timeline`)},void 0,{bottom:!0}]]):z(``,!0),!I(Q)&&I($)?(D(),N(m,{key:5,layout:`vertical`})):z(``,!0),!I(Q)&&I($)?j((D(),N(i,{key:6,disabled:I(Z),onClick:r[6]||=e=>Dt(`removeView`)},{icon:M(()=>[P(g,{width:`100%`,height:`100%`})]),_:1},8,[`disabled`])),[[w,{value:e.$t(`components.form.tooltip.delete`)},void 0,{bottom:!0}]]):z(``,!0),!I(Y)&&!I(X)&&I($)?j((D(),N(i,{key:7,disabled:I(Z),onClick:r[7]||=e=>Y.value=!0},{icon:M(()=>[P(v,{width:`100%`,height:`100%`})]),_:1},8,[`disabled`])),[[w,{value:e.$t(`components.form.tooltip.edit`)},void 0,{bottom:!0}]]):z(``,!0),!I(Y)&&!I(X)?j((D(),N(i,{key:8,disabled:I(Z),onClick:I(ke)?.toggleMenu},{icon:M(()=>[P(ee,{class:F([`transform transition-transform duration-300`,{"rotate-45":I(ke)?.isOpen}]),width:`100%`,height:`100%`},null,8,[`class`])]),_:1},8,[`disabled`,`onClick`])),[[w,{value:e.$t(`components.form.tooltip.new`)},void 0,{bottom:!0}]]):z(``,!0),I(Y)||I(X)?(D(),N(i,{key:9,label:e.$t(`components.form.button.cancel`),onClick:r[8]||=e=>I(Y)?Y.value=!1:X.value=!1},null,8,[`label`])):z(``,!0),I(Y)||I(X)?(D(),N(i,{key:10,label:e.$t(`components.form.button.save`),disabled:I(qe).every(e=>e.lastDroppedCamera===void 0),primary:``,onClick:Mt},null,8,[`label`,`disabled`])):z(``,!0)]),_:1},8,[`left-offset`]),L(`div`,{class:F([`w-full h-full flex relative`,{"flex-row":I(x),"flex-col":!I(x)}]),style:G({paddingTop:`${I(55)}px`})},[L(`div`,{class:F([`flex relative z-1 camview-content-transition`,{"h-full items-center justify-center":I(x)||!I(ve)?.result.length,"w-full items-start justify-start":!I(x)&&I(ve)?.result.length}]),style:G(I(ct))},[I($e)?(D(),U(`div`,qn,[(D(),N(y,{key:0,class:`w-[30px] h-[30px] m-0`,"stroke-width":`5`}))])):!I($)&&!I(X)?(D(),U(`div`,Jn,[L(`div`,Yn,[P(b,{class:`w-12 h-12 text-muted`}),L(`span`,Xn,K(e.$t(`views.camview.no_views_configured`)),1)])])):I($)||I(X)?(D(),U(`div`,{key:2,class:F([`w-full h-full`,{"p-2 pb-0":!I(_)}])},[(D(),N(an,{ref_key:`viewDndRef`,ref:q,key:I(O).camview.viewid+(I(X)?`-new`:I(Y)?`-edit`:`-view`),cameras:I(k)?.result||[],"edit-mode":I(X)||I(Y),"rearrange-mode":I(Z),"view-size":I(X)?I(J).viewSize:I(Ct),title:I(J).name,cards:I(qe),"camera-card-props":I(st),"camera-card-models":I(Qe),onDrop:Nt,onRemove:Ft,onChangeViewSize:r[9]||=e=>Dt(`editView`),onExpand:Rt,onRearrange:Lt},null,8,[`cameras`,`edit-mode`,`rearrange-mode`,`view-size`,`title`,`cards`,`camera-card-props`,`camera-card-models`]))],2)):z(``,!0)],6),P(me,{name:I(x)?`slide-left`:`slide-up`,onBeforeEnter:r[10]||=e=>Ie.value=!0,onAfterEnter:r[11]||=e=>ze.value=!1,onBeforeLeave:r[12]||=e=>Ie.value=!1},{default:M(()=>[I(Pe)?(D(),N(I(a),{key:0,"camera-ids":I(_t),"event-camera-ids":I(ht),"camera-names":I(vt),"initial-timestamp":I(xt),onEventSelect:zt,loading:I(ze),type:I(x)?`vertical`:`horizontal`,"dark-mode":``,"md-breakpoint":I(ie),class:F([`shrink-0 transition-[left] duration-200`,{"h-full w-[400px] pt-2 pr-2":I(x),"h-[200px] pt-2 px-2 pb-2 pb-safe-offset fixed right-safe-offset-0 z-10":!I(x),"p-0! pt-2! border-color":I(_)}]),"card-class":{"!shadow-xl":!0,"!rounded-none border-l-0! border-r-0!":I(_)},style:G(I(x)?void 0:{left:`${I(tt)}px`,bottom:`calc(${I(h)}px + env(safe-area-inset-bottom, 0px))`}),"locale-settings":I(nt)},null,8,[`camera-ids`,`event-camera-ids`,`camera-names`,`initial-timestamp`,`loading`,`type`,`md-breakpoint`,`class`,`card-class`,`style`,`locale-settings`])):z(``,!0)]),_:1},8,[`name`])],6),!I(Q)&&I($)?(D(),N(ne,{key:0,model:I(pt),direction:`up`,"transition-delay":80,"tooltip-options":{position:`left`,event:void 0},class:`absolute right-2 z-11 dark-mode`,pt:{root:{style:`pointer-events: none`}},style:G({bottom:I(x)?`0`:`calc(${I(Ie)?192:0}px + ${I(h)>0?`0.5rem`:`0px`})`,right:I(x)?`calc(${I(Ie)?400:0}px + 0.5rem)`:`0.5rem`,transition:`bottom 0.25s ease-out, right 0.25s ease-out`})},{button:M(({visible:e,toggleCallback:t})=>[P(S,{severity:`secondary`,class:F([`dark-mode opacity-40 hover:opacity-100 active:opacity-100 focus:opacity-100 transition pointer-events-auto`,{"opacity-100":e}]),rounded:``,loading:I($e),onClick:t},{icon:M(()=>[L(`div`,Zn,[L(`div`,{class:F([`bg-white 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}])},null,2),L(`div`,{class:F([`bg-white 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}])},null,2),L(`div`,{class:F([`bg-white 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}])},null,2)])]),_:2},1032,[`class`,`loading`,`onClick`])]),item:M(({item:e,toggleCallback:t})=>[j((D(),N(S,de({loading:I($e),severity:`secondary`},e.buttonProps,{rounded:``,onClick:t}),{icon:M(()=>[(D(),N(he(e.icon)))]),_:2},1040,[`loading`,`onClick`])),[[w,{value:e.label}]])]),_:1},8,[`model`,`style`])):z(``,!0),P(re,{ref_key:`menuRef`,ref:De,items:I(wt),popover:{pt:{content:{class:`p-0! rounded-xl! overflow-hidden!`}}}},null,8,[`items`]),P(re,{ref_key:`cardFitMenuRef`,ref:Ae,items:I(at),popover:{pt:{content:{class:`p-0! rounded-xl! overflow-hidden!`}}}},null,8,[`items`]),P(re,{ref_key:`newViewMenuRef`,ref:ke,items:I(Et),popover:{pt:{content:{class:`p-0! rounded-xl! overflow-hidden!`}}}},null,8,[`items`])])}}}),[[`__scopeId`,`data-v-ea6025c5`]]);export{Qn as default};
@@ -1 +1 @@
1
- import{Br as e}from"./vendor-cameraui-C5_h4c-5.js";import{$t as t,Mn as n,Pn as r,Qt as i,Wn as a,Yn as o,an as s,dn as c,fn as l,hr as u,in as d,mn as f,on as p,rn as m,rr as h,sn as g,sr as _,un as v,yr as y}from"./vendor-AX0A8AMd.js";import{z as b}from"./vendor-primevue-C9-jpd5L.js";import{t as x}from"./upload-D_9SZvdG.js";var S={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function C(e,t){return n(),g(`svg`,S,[...t[0]||=[v(`<g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><path d="M14 3v4a1 1 0 0 0 1 1h4"></path><path d="M5 8V5a2 2 0 0 1 2-2h7l5 5v11a2 2 0 0 1-2 2h-5"></path><path d="M3 14a3 3 0 1 0 6 0a3 3 0 1 0-6 0"></path><path d="M4.5 17L3 22l3-1.5L9 22l-1.5-5"></path></g>`,1)]])}var w=h({name:`tabler-file-certificate`,render:C}),T={class:`flex flex-col gap-6`},E={class:`text-sm text-muted`},D={class:`cui-label mb-1`},O=[`onClick`,`onDrop`],k={key:0,class:`flex items-center justify-center gap-2 text-sm text-muted`},A={key:1,class:`flex items-center justify-center gap-2 text-sm`},j={class:`truncate`},M={key:0,class:`text-xs text-muted`},N=524288,P=f({__name:`CertificateUpload`,setup(f,{expose:h}){let{t:v}=e(),S=a(`fileInput`),C=_({cert:null,key:null,chain:null}),P=_(``),F=`cert`,I=m(()=>[{key:`cert`,label:v(`views.settings.certificate_file`),hint:v(`views.settings.certificate_file_hint`),optional:!1},{key:`key`,label:v(`views.settings.certificate_key_file`),hint:v(`views.settings.certificate_key_file_hint`),optional:!1},{key:`chain`,label:v(`views.settings.certificate_chain_file`),hint:v(`views.settings.certificate_chain_file_hint`),optional:!0}]);function L(e){F=e,S.value&&(S.value.value=``),S.value?.click()}function R(e){let t=e.target.files?.[0];t&&B(F,t)}function z(e,t){let n=t.dataTransfer?.files[0];n&&B(e,n)}function B(e,t){if(t.size>N){P.value=v(`views.settings.certificate_file_too_large`);return}P.value=``,C.value={...C.value,[e]:t}}return h({onConfirm:async()=>{let{cert:e,key:t,chain:n}=C.value;return!e||!t?(P.value=v(`views.settings.certificate_missing_files`),null):{cert:e,key:t,chain:n??void 0}}}),(e,a)=>{let f=x,m=w,h=b;return n(),g(`div`,T,[d(`span`,E,y(e.$t(`views.settings.certificate_upload_info`)),1),(n(!0),g(t,null,r(u(I),t=>(n(),g(`div`,{key:t.key},[d(`label`,D,y(t.label),1),d(`div`,{class:`border-2 border-dashed border-surface-300 dark:border-surface-600 rounded-lg p-4 text-center cursor-pointer hover:border-primary transition-colors`,onClick:e=>L(t.key),onDragover:a[0]||=i(()=>{},[`prevent`]),onDrop:i(e=>z(t.key,e),[`prevent`])},[u(C)[t.key]?(n(),g(`div`,A,[l(m,{class:`w-4 h-4 shrink-0 text-success`}),d(`span`,j,y(u(C)[t.key].name),1)])):(n(),g(`div`,k,[l(f,{class:`w-4 h-4 shrink-0`}),d(`span`,null,y(t.hint),1)]))],40,O),t.optional?(n(),g(`span`,M,y(e.$t(`views.settings.certificate_chain_hint`)),1)):p(``,!0)]))),128)),d(`input`,{ref_key:`fileInput`,ref:S,type:`file`,accept:`.pem,.crt,.cer,.key`,class:`hidden`,onChange:R},null,544),u(P)?(n(),s(h,{key:0,severity:`error`,closable:!1},{default:o(()=>[c(y(u(P)),1)]),_:1})):p(``,!0)])}}});export{P as default};
1
+ import{Br as e}from"./vendor-cameraui-BRv7o4zz.js";import{$t as t,Mn as n,Pn as r,Qt as i,Wn as a,Yn as o,an as s,dn as c,fn as l,hr as u,in as d,mn as f,on as p,rn as m,rr as h,sn as g,sr as _,un as v,yr as y}from"./vendor-nVfLT5jI.js";import{z as b}from"./vendor-primevue-C85v-zl5.js";import{t as x}from"./upload-BJQKy0Z4.js";var S={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function C(e,t){return n(),g(`svg`,S,[...t[0]||=[v(`<g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><path d="M14 3v4a1 1 0 0 0 1 1h4"></path><path d="M5 8V5a2 2 0 0 1 2-2h7l5 5v11a2 2 0 0 1-2 2h-5"></path><path d="M3 14a3 3 0 1 0 6 0a3 3 0 1 0-6 0"></path><path d="M4.5 17L3 22l3-1.5L9 22l-1.5-5"></path></g>`,1)]])}var w=h({name:`tabler-file-certificate`,render:C}),T={class:`flex flex-col gap-6`},E={class:`text-sm text-muted`},D={class:`cui-label mb-1`},O=[`onClick`,`onDrop`],k={key:0,class:`flex items-center justify-center gap-2 text-sm text-muted`},A={key:1,class:`flex items-center justify-center gap-2 text-sm`},j={class:`truncate`},M={key:0,class:`text-xs text-muted`},N=524288,P=f({__name:`CertificateUpload`,setup(f,{expose:h}){let{t:v}=e(),S=a(`fileInput`),C=_({cert:null,key:null,chain:null}),P=_(``),F=`cert`,I=m(()=>[{key:`cert`,label:v(`views.settings.certificate_file`),hint:v(`views.settings.certificate_file_hint`),optional:!1},{key:`key`,label:v(`views.settings.certificate_key_file`),hint:v(`views.settings.certificate_key_file_hint`),optional:!1},{key:`chain`,label:v(`views.settings.certificate_chain_file`),hint:v(`views.settings.certificate_chain_file_hint`),optional:!0}]);function L(e){F=e,S.value&&(S.value.value=``),S.value?.click()}function R(e){let t=e.target.files?.[0];t&&B(F,t)}function z(e,t){let n=t.dataTransfer?.files[0];n&&B(e,n)}function B(e,t){if(t.size>N){P.value=v(`views.settings.certificate_file_too_large`);return}P.value=``,C.value={...C.value,[e]:t}}return h({onConfirm:async()=>{let{cert:e,key:t,chain:n}=C.value;return!e||!t?(P.value=v(`views.settings.certificate_missing_files`),null):{cert:e,key:t,chain:n??void 0}}}),(e,a)=>{let f=x,m=w,h=b;return n(),g(`div`,T,[d(`span`,E,y(e.$t(`views.settings.certificate_upload_info`)),1),(n(!0),g(t,null,r(u(I),t=>(n(),g(`div`,{key:t.key},[d(`label`,D,y(t.label),1),d(`div`,{class:`border-2 border-dashed border-surface-300 dark:border-surface-600 rounded-lg p-4 text-center cursor-pointer hover:border-primary transition-colors`,onClick:e=>L(t.key),onDragover:a[0]||=i(()=>{},[`prevent`]),onDrop:i(e=>z(t.key,e),[`prevent`])},[u(C)[t.key]?(n(),g(`div`,A,[l(m,{class:`w-4 h-4 shrink-0 text-success`}),d(`span`,j,y(u(C)[t.key].name),1)])):(n(),g(`div`,k,[l(f,{class:`w-4 h-4 shrink-0`}),d(`span`,null,y(t.hint),1)]))],40,O),t.optional?(n(),g(`span`,M,y(e.$t(`views.settings.certificate_chain_hint`)),1)):p(``,!0)]))),128)),d(`input`,{ref_key:`fileInput`,ref:S,type:`file`,accept:`.pem,.crt,.cer,.key`,class:`hidden`,onChange:R},null,544),u(P)?(n(),s(h,{key:0,severity:`error`,closable:!1},{default:o(()=>[c(y(u(P)),1)]),_:1})):p(``,!0)])}}});export{P as default};
@@ -1,2 +1,2 @@
1
1
  const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./ace.config-DIcQ8yOb.js","./rolldown-runtime-C0FnF6B9.js","./vendor-ace-Bxj8w-af.js","./ace-BSiU5ylo.js"])))=>i.map(i=>d[i]);
2
- import{o as e}from"./rolldown-runtime-C0FnF6B9.js";import{Br as t,Ft as n,Gt as r,mi as i,tr as a,zt as ee}from"./vendor-cameraui-C5_h4c-5.js";import{$ as o,B as s,Nn as c,Vn as l}from"./api-Br1U09Hq.js";import{An as u,Cn as d,Hn as f,Jn as p,Kn as m,Mn as h,Rn as g,Rt as _,Sn as v,Wn as y,Xn as b,Xt as x,Yn as S,Yt as C,an as w,en as T,fn as E,gr as D,hr as O,in as k,jn as A,mn as j,nr as M,pr as te,rn as N,rr as P,sn as F,sr as I,ur as L,vr as R,xn as z}from"./vendor-AX0A8AMd.js";import{a as ne}from"./intercomService-CmFnb1sI.js";import{p as re}from"./vendor-core-DeodbhZZ.js";import{o as ie}from"./vendor-primevue-C9-jpd5L.js";import{t as ae}from"./server-DWPgetQJ.js";import{n as B}from"./useServerRestart-B0ux2xXZ.js";import{n as V}from"./theme-BTgw7al1.js";import{t as H}from"./config-bmrb5S6z.js";import{t as oe}from"./back-filled-MAIFvJqE.js";import{n as se,t as ce}from"./zoom-in-D-OIVcXF.js";import{n as le,t as ue}from"./CuiTopNavbarItem-C-7LPPKD.js";var U={lang:`yaml`,readOnly:!1,printMargin:!1,borderRadius:!1,border:!0},W={useWorker:!0,wrap:!0,showPrintMargin:!1,tabSize:2,highlightGutterLine:!0,useSoftTabs:!0,dragEnabled:!1,showGutter:!0,scrollPastEnd:.1},de=j({__name:`CuiEditor`,props:v(z({lang:{},readOnly:{type:Boolean},printMargin:{type:[Number,Boolean]},options:{},placeholder:{},borderRadius:{type:Boolean},borderTopRightRadius:{type:Boolean},borderBottomRightRadius:{type:Boolean},borderBottomLeftRadius:{type:Boolean},borderTopLeftRadius:{type:Boolean},border:{type:Boolean}},U),{modelValue:{required:!0},modelModifiers:{}}),emits:v([`init`,`blur`,`input`,`change`,`changeSelectionStyle`,`changeSession`,`copy`,`focus`,`paste`,`update:value`],[`update:modelValue`]),async setup(t,{emit:n}){let r,a;C(e=>({v3cc736da:O(H),v66726fab:O(ae),v58e243dc:O(ie),v527a6c67:O(B),v244c42c0:O(ne)})),[r,a]=p(()=>_(()=>import(`./ace.config-DIcQ8yOb.js`),__vite__mapDeps([0,1,2]),import.meta.url)),await r,a();let ee=([r,a]=p(()=>_(()=>import(`./ace-BSiU5ylo.js`).then(t=>e(t.default,1)),__vite__mapDeps([3,2,1]),import.meta.url)),r=await r,a(),r),o=t,s=n,c=f(t,`modelValue`),l=V(),{theme:d}=re(l),{readOnly:g,options:v,lang:b,printMargin:x,placeholder:S,borderRadius:w,borderBottomLeftRadius:T,borderTopLeftRadius:E,borderTopRightRadius:D,borderBottomRightRadius:k,border:j}=te(o),M=y(`editorRef`),P=L(),R=I(!1),z=I(``),ne=N(()=>w.value||D.value?`10px`:`0px`),ie=N(()=>w.value||k.value?`10px`:`0px`),ae=N(()=>w.value||T.value?`10px`:`0px`),B=N(()=>w.value||E.value?`10px`:`0px`),H=N(()=>j.value?`1px solid var(--border-color)`:`none`);return i(M,()=>{P.value&&P.value.resize(!0)}),m(c,e=>{if(z.value!==e){try{R.value=!0,P.value?.setValue(e,1)}finally{R.value=!1}z.value=e}}),m(b,e=>{P.value?.setOption(`mode`,`ace/mode/`+e)}),m(v,e=>{e&&P.value?.setOptions(e)}),m(S,e=>{e!==void 0&&P.value?.setOption(`placeholder`,e)}),m(g,e=>{P.value?.setReadOnly(e)}),m(x,e=>{P.value?.setOption(`printMargin`,e)}),m(d,e=>{if(P.value){let t=e===`dark`?`twilight`:`github`;P.value.setOption(`theme`,`ace/theme/`+t)}}),u(()=>{M.value&&(P.value=ee.edit(M.value,{placeholder:S.value,readOnly:g.value,value:c.value,mode:`ace/mode/`+b.value,theme:d.value===`dark`?`ace/theme/twilight`:`ace/theme/github`,printMargin:x.value,fadeFoldWidgets:!0,...W,...v.value}),P.value.on(`change`,()=>{if(R.value)return;let e=P.value.getValue();z.value=e,c.value=e}),P.value.on(`blur`,e=>{s(`blur`,e)}),P.value.on(`input`,()=>{s(`input`)}),P.value.on(`change`,e=>{s(`change`,e)}),P.value.on(`changeSelectionStyle`,e=>{s(`changeSelectionStyle`,e)}),P.value.on(`changeSession`,e=>{s(`changeSession`,e)}),P.value.on(`copy`,e=>{s(`copy`,e)}),P.value.on(`focus`,e=>{s(`focus`,e)}),P.value.on(`paste`,e=>{s(`paste`,e.text)}),s(`init`,P.value))}),A(()=>{P.value?.removeAllListeners(),P.value?.destroy()}),(e,t)=>(h(),F(`div`,{ref_key:`editorRef`,ref:M,class:`h-full bg-none`},null,512))}}),G={viewBox:`0 0 20 20`,width:`1.2em`,height:`1.2em`};function K(e,t){return h(),F(`svg`,G,[...t[0]||=[k(`path`,{fill:`currentColor`,d:`m15.3 5.3l-6.8 6.8l-2.8-2.8l-1.4 1.4l4.2 4.2l8.2-8.2z`},null,-1)]])}var fe=P({name:`dashicons-saved`,render:K}),pe={class:`relative w-6 h-6`},me={class:`w-full h-full flex items-center justify-center`},q=j({__name:`Config`,props:{navbarWidth:{default:0},navbarLeft:{default:0}},setup(e){let i=new H,f=new ae,p=e,_=ne(),v=o(),{t:y}=t(),{smBreakpoint:C}=c(),{beginServerRestart:A}=B(),j=l(),{uiSettings:P}=re(j),{navbarWidth:L,navbarLeft:z}=te(p),V=N(()=>L.value+z.value),U=I(!1),{data:W,isBusy:G}=i.getConfigQuery(U),{data:K,isBusy:q}=i.getGo2RtcConfigQuery(U),{mutateAsync:he,isPending:ge}=i.patchConfigQuery(),{mutateAsync:_e,isPending:ve}=i.patchGo2RtcConfigQuery(),{mutateAsync:ye,isPending:be}=f.restartServerQuery(),{mutateAsync:xe,isPending:Se}=f.restartGo2RtcQuery(),J=I(`camera.ui`),Y=I(``),X=I(``),Z=I(!1),Ce=I([{label:y(`components.dialog.title.confirm`),icon:fe,buttonProps:{severity:`success`},command:()=>{v.openTextDialog({data:{title:y(`components.dialog.title.confirm`),contentText:y(`components.dialog.message.confirm_restart_server`),confirmText:y(`components.form.button.save_and_restart`),confirmButtonProps:{loading:Q.value},cancelButtonProps:{loading:Q.value}},onConfirm:we})}},{label:y(`components.form.tooltip.zoom_out`),icon:se,command:()=>{Ee()}},{label:y(`components.form.tooltip.zoom_in`),icon:ce,command:()=>{Te()}}]),Q=N(()=>G.value||q.value||ge.value||ve.value||be.value||Se.value),$=N(()=>({fontSize:P.value.config.zoom}));async function we(){try{J.value===`camera.ui`?(await he({configData:Y.value}),await a(500),A(),await ye()):(await _e({configData:X.value}),await a(500),await xe())}catch(e){_.error(e)}}function Te(){P.value.config.zoom!==20&&P.value.config.zoom++}function Ee(){P.value.config.zoom!==8&&P.value.config.zoom--}return m(W,()=>{Y.value=W.value||``},{deep:!0,immediate:!0}),m(K,()=>{X.value=K.value||``},{deep:!0,immediate:!0}),u(async()=>{await a(100),Z.value=!0}),(e,t)=>{let i=oe,a=ee,o=s,c=ue,l=le,u=ie,f=de,p=n,m=r;return h(),F(`div`,null,[E(o,{position:`left`},{default:S(()=>[E(a,{severity:`secondary`,text:``,class:`cui-button p-2 text-color non-draggable-region`,onClick:t[0]||=t=>e.$router.push(`/menu`)},{icon:S(()=>[E(i,{class:`w-6 h-6`})]),_:1})]),_:1}),E(l,{"left-offset":O(V),animate:``},{left:S(()=>[E(c,{type:`button`,label:`camera.ui`,active:O(J)===`camera.ui`,onClick:t[1]||=e=>J.value=`camera.ui`},null,8,[`active`]),E(c,{type:`button`,label:`go2rtc`,active:O(J)===`go2rtc`,onClick:t[2]||=e=>J.value=`go2rtc`},null,8,[`active`])]),_:1},8,[`left-offset`]),E(u,{model:O(Ce),direction:`up`,"transition-delay":80,"tooltip-options":{position:`left`,event:void 0},class:`absolute right-3 bottom-3 z-2`,pt:{root:{style:`pointer-events: none`}}},{button:S(({visible:e,toggleCallback:t})=>[E(a,{severity:`secondary`,class:D([`opacity-40 hover:opacity-100 active:opacity-100 focus:opacity-100 transition pointer-events-auto`,{"opacity-100":e}]),rounded:``,loading:O(Q),onClick:t},{icon:S(()=>[k(`div`,pe,[k(`div`,{class:D([`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}]),style:{backgroundColor:`var(--text-color)`}},null,2),k(`div`,{class:D([`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}]),style:{backgroundColor:`var(--text-color)`}},null,2),k(`div`,{class:D([`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}]),style:{backgroundColor:`var(--text-color)`}},null,2)])]),_:2},1032,[`class`,`loading`,`onClick`])]),item:S(({item:e,toggleCallback:t})=>[b((h(),w(a,d({loading:O(Q),severity:`secondary`},e.buttonProps,{rounded:``,onClick:t}),{icon:S(()=>[(h(),w(g(e.icon)))]),_:2},1040,[`loading`,`onClick`])),[[m,{value:e.label}]])]),_:1},8,[`model`]),k(`div`,{class:`w-full h-full`,style:R({paddingTop:`${O(55)}px`})},[(h(),w(T,null,{fallback:S(()=>[k(`div`,me,[E(p,{class:`w-[30px] h-[30px] m-0`,"stroke-width":`5`})])]),default:S(()=>[O(J)===`camera.ui`?b((h(),w(f,{key:0,modelValue:O(Y),"onUpdate:modelValue":t[3]||=e=>M(Y)?Y.value=e:null,lang:`yaml`,options:O($),"read-only":O(Q),border:!O(C),"border-bottom-left-radius":!O(C),"border-bottom-right-radius":!O(C),"border-top-right-radius":!1,"border-top-left-radius":!1},null,8,[`modelValue`,`options`,`read-only`,`border`,`border-bottom-left-radius`,`border-bottom-right-radius`])),[[x,O(Z)]]):b((h(),w(f,{key:1,modelValue:O(X),"onUpdate:modelValue":t[4]||=e=>M(X)?X.value=e:null,lang:`yaml`,options:O($),"read-only":O(Q),border:!O(C),"border-bottom-left-radius":!O(C),"border-bottom-right-radius":!O(C),"border-top-right-radius":!1,"border-top-left-radius":!1},null,8,[`modelValue`,`options`,`read-only`,`border`,`border-bottom-left-radius`,`border-bottom-right-radius`])),[[x,O(Z)]])]),_:1}))],4)])}}});export{q as default};
2
+ import{o as e}from"./rolldown-runtime-C0FnF6B9.js";import{Br as t,Ft as n,Gt as r,mi as i,tr as a,zt as ee}from"./vendor-cameraui-BRv7o4zz.js";import{$ as o,B as s,Nn as c,Vn as l}from"./api-BI5TkcMD.js";import{An as u,Cn as d,Hn as f,Jn as p,Kn as m,Mn as h,Rn as g,Rt as _,Sn as v,Wn as y,Xn as b,Xt as x,Yn as S,Yt as C,an as w,en as T,fn as E,gr as D,hr as O,in as k,jn as A,mn as j,nr as M,pr as te,rn as N,rr as P,sn as F,sr as I,ur as L,vr as R,xn as z}from"./vendor-nVfLT5jI.js";import{a as ne}from"./intercomService-fFto_C1t.js";import{p as re}from"./vendor-core-BUse5adB.js";import{o as ie}from"./vendor-primevue-C85v-zl5.js";import{t as ae}from"./server-CIDx_I6S.js";import{n as B}from"./useServerRestart-DDW-nw_t.js";import{n as V}from"./theme-GSy1mQOB.js";import{t as H}from"./config-Jzs6YXbB.js";import{t as oe}from"./back-filled-CE63214a.js";import{n as se,t as ce}from"./zoom-in-DkOfo9Ku.js";import{n as le,t as ue}from"./CuiTopNavbarItem-Btig8IUi.js";var U={lang:`yaml`,readOnly:!1,printMargin:!1,borderRadius:!1,border:!0},W={useWorker:!0,wrap:!0,showPrintMargin:!1,tabSize:2,highlightGutterLine:!0,useSoftTabs:!0,dragEnabled:!1,showGutter:!0,scrollPastEnd:.1},de=j({__name:`CuiEditor`,props:v(z({lang:{},readOnly:{type:Boolean},printMargin:{type:[Number,Boolean]},options:{},placeholder:{},borderRadius:{type:Boolean},borderTopRightRadius:{type:Boolean},borderBottomRightRadius:{type:Boolean},borderBottomLeftRadius:{type:Boolean},borderTopLeftRadius:{type:Boolean},border:{type:Boolean}},U),{modelValue:{required:!0},modelModifiers:{}}),emits:v([`init`,`blur`,`input`,`change`,`changeSelectionStyle`,`changeSession`,`copy`,`focus`,`paste`,`update:value`],[`update:modelValue`]),async setup(t,{emit:n}){let r,a;C(e=>({v3cc736da:O(H),v66726fab:O(ae),v58e243dc:O(ie),v527a6c67:O(B),v244c42c0:O(ne)})),[r,a]=p(()=>_(()=>import(`./ace.config-DIcQ8yOb.js`),__vite__mapDeps([0,1,2]),import.meta.url)),await r,a();let ee=([r,a]=p(()=>_(()=>import(`./ace-BSiU5ylo.js`).then(t=>e(t.default,1)),__vite__mapDeps([3,2,1]),import.meta.url)),r=await r,a(),r),o=t,s=n,c=f(t,`modelValue`),l=V(),{theme:d}=re(l),{readOnly:g,options:v,lang:b,printMargin:x,placeholder:S,borderRadius:w,borderBottomLeftRadius:T,borderTopLeftRadius:E,borderTopRightRadius:D,borderBottomRightRadius:k,border:j}=te(o),M=y(`editorRef`),P=L(),R=I(!1),z=I(``),ne=N(()=>w.value||D.value?`10px`:`0px`),ie=N(()=>w.value||k.value?`10px`:`0px`),ae=N(()=>w.value||T.value?`10px`:`0px`),B=N(()=>w.value||E.value?`10px`:`0px`),H=N(()=>j.value?`1px solid var(--border-color)`:`none`);return i(M,()=>{P.value&&P.value.resize(!0)}),m(c,e=>{if(z.value!==e){try{R.value=!0,P.value?.setValue(e,1)}finally{R.value=!1}z.value=e}}),m(b,e=>{P.value?.setOption(`mode`,`ace/mode/`+e)}),m(v,e=>{e&&P.value?.setOptions(e)}),m(S,e=>{e!==void 0&&P.value?.setOption(`placeholder`,e)}),m(g,e=>{P.value?.setReadOnly(e)}),m(x,e=>{P.value?.setOption(`printMargin`,e)}),m(d,e=>{if(P.value){let t=e===`dark`?`twilight`:`github`;P.value.setOption(`theme`,`ace/theme/`+t)}}),u(()=>{M.value&&(P.value=ee.edit(M.value,{placeholder:S.value,readOnly:g.value,value:c.value,mode:`ace/mode/`+b.value,theme:d.value===`dark`?`ace/theme/twilight`:`ace/theme/github`,printMargin:x.value,fadeFoldWidgets:!0,...W,...v.value}),P.value.on(`change`,()=>{if(R.value)return;let e=P.value.getValue();z.value=e,c.value=e}),P.value.on(`blur`,e=>{s(`blur`,e)}),P.value.on(`input`,()=>{s(`input`)}),P.value.on(`change`,e=>{s(`change`,e)}),P.value.on(`changeSelectionStyle`,e=>{s(`changeSelectionStyle`,e)}),P.value.on(`changeSession`,e=>{s(`changeSession`,e)}),P.value.on(`copy`,e=>{s(`copy`,e)}),P.value.on(`focus`,e=>{s(`focus`,e)}),P.value.on(`paste`,e=>{s(`paste`,e.text)}),s(`init`,P.value))}),A(()=>{P.value?.removeAllListeners(),P.value?.destroy()}),(e,t)=>(h(),F(`div`,{ref_key:`editorRef`,ref:M,class:`h-full bg-none`},null,512))}}),G={viewBox:`0 0 20 20`,width:`1.2em`,height:`1.2em`};function K(e,t){return h(),F(`svg`,G,[...t[0]||=[k(`path`,{fill:`currentColor`,d:`m15.3 5.3l-6.8 6.8l-2.8-2.8l-1.4 1.4l4.2 4.2l8.2-8.2z`},null,-1)]])}var fe=P({name:`dashicons-saved`,render:K}),pe={class:`relative w-6 h-6`},me={class:`w-full h-full flex items-center justify-center`},q=j({__name:`Config`,props:{navbarWidth:{default:0},navbarLeft:{default:0}},setup(e){let i=new H,f=new ae,p=e,_=ne(),v=o(),{t:y}=t(),{smBreakpoint:C}=c(),{beginServerRestart:A}=B(),j=l(),{uiSettings:P}=re(j),{navbarWidth:L,navbarLeft:z}=te(p),V=N(()=>L.value+z.value),U=I(!1),{data:W,isBusy:G}=i.getConfigQuery(U),{data:K,isBusy:q}=i.getGo2RtcConfigQuery(U),{mutateAsync:he,isPending:ge}=i.patchConfigQuery(),{mutateAsync:_e,isPending:ve}=i.patchGo2RtcConfigQuery(),{mutateAsync:ye,isPending:be}=f.restartServerQuery(),{mutateAsync:xe,isPending:Se}=f.restartGo2RtcQuery(),J=I(`camera.ui`),Y=I(``),X=I(``),Z=I(!1),Ce=I([{label:y(`components.dialog.title.confirm`),icon:fe,buttonProps:{severity:`success`},command:()=>{v.openTextDialog({data:{title:y(`components.dialog.title.confirm`),contentText:y(`components.dialog.message.confirm_restart_server`),confirmText:y(`components.form.button.save_and_restart`),confirmButtonProps:{loading:Q.value},cancelButtonProps:{loading:Q.value}},onConfirm:we})}},{label:y(`components.form.tooltip.zoom_out`),icon:se,command:()=>{Ee()}},{label:y(`components.form.tooltip.zoom_in`),icon:ce,command:()=>{Te()}}]),Q=N(()=>G.value||q.value||ge.value||ve.value||be.value||Se.value),$=N(()=>({fontSize:P.value.config.zoom}));async function we(){try{J.value===`camera.ui`?(await he({configData:Y.value}),await a(500),A(),await ye()):(await _e({configData:X.value}),await a(500),await xe())}catch(e){_.error(e)}}function Te(){P.value.config.zoom!==20&&P.value.config.zoom++}function Ee(){P.value.config.zoom!==8&&P.value.config.zoom--}return m(W,()=>{Y.value=W.value||``},{deep:!0,immediate:!0}),m(K,()=>{X.value=K.value||``},{deep:!0,immediate:!0}),u(async()=>{await a(100),Z.value=!0}),(e,t)=>{let i=oe,a=ee,o=s,c=ue,l=le,u=ie,f=de,p=n,m=r;return h(),F(`div`,null,[E(o,{position:`left`},{default:S(()=>[E(a,{severity:`secondary`,text:``,class:`cui-button p-2 text-color non-draggable-region`,onClick:t[0]||=t=>e.$router.push(`/menu`)},{icon:S(()=>[E(i,{class:`w-6 h-6`})]),_:1})]),_:1}),E(l,{"left-offset":O(V),animate:``},{left:S(()=>[E(c,{type:`button`,label:`camera.ui`,active:O(J)===`camera.ui`,onClick:t[1]||=e=>J.value=`camera.ui`},null,8,[`active`]),E(c,{type:`button`,label:`go2rtc`,active:O(J)===`go2rtc`,onClick:t[2]||=e=>J.value=`go2rtc`},null,8,[`active`])]),_:1},8,[`left-offset`]),E(u,{model:O(Ce),direction:`up`,"transition-delay":80,"tooltip-options":{position:`left`,event:void 0},class:`absolute right-3 bottom-3 z-2`,pt:{root:{style:`pointer-events: none`}}},{button:S(({visible:e,toggleCallback:t})=>[E(a,{severity:`secondary`,class:D([`opacity-40 hover:opacity-100 active:opacity-100 focus:opacity-100 transition pointer-events-auto`,{"opacity-100":e}]),rounded:``,loading:O(Q),onClick:t},{icon:S(()=>[k(`div`,pe,[k(`div`,{class:D([`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}]),style:{backgroundColor:`var(--text-color)`}},null,2),k(`div`,{class:D([`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}]),style:{backgroundColor:`var(--text-color)`}},null,2),k(`div`,{class:D([`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}]),style:{backgroundColor:`var(--text-color)`}},null,2)])]),_:2},1032,[`class`,`loading`,`onClick`])]),item:S(({item:e,toggleCallback:t})=>[b((h(),w(a,d({loading:O(Q),severity:`secondary`},e.buttonProps,{rounded:``,onClick:t}),{icon:S(()=>[(h(),w(g(e.icon)))]),_:2},1040,[`loading`,`onClick`])),[[m,{value:e.label}]])]),_:1},8,[`model`]),k(`div`,{class:`w-full h-full`,style:R({paddingTop:`${O(55)}px`})},[(h(),w(T,null,{fallback:S(()=>[k(`div`,me,[E(p,{class:`w-[30px] h-[30px] m-0`,"stroke-width":`5`})])]),default:S(()=>[O(J)===`camera.ui`?b((h(),w(f,{key:0,modelValue:O(Y),"onUpdate:modelValue":t[3]||=e=>M(Y)?Y.value=e:null,lang:`yaml`,options:O($),"read-only":O(Q),border:!O(C),"border-bottom-left-radius":!O(C),"border-bottom-right-radius":!O(C),"border-top-right-radius":!1,"border-top-left-radius":!1},null,8,[`modelValue`,`options`,`read-only`,`border`,`border-bottom-left-radius`,`border-bottom-right-radius`])),[[x,O(Z)]]):b((h(),w(f,{key:1,modelValue:O(X),"onUpdate:modelValue":t[4]||=e=>M(X)?X.value=e:null,lang:`yaml`,options:O($),"read-only":O(Q),border:!O(C),"border-bottom-left-radius":!O(C),"border-bottom-right-radius":!O(C),"border-top-right-radius":!1,"border-top-left-radius":!1},null,8,[`modelValue`,`options`,`read-only`,`border`,`border-bottom-left-radius`,`border-bottom-right-radius`])),[[x,O(Z)]])]),_:1}))],4)])}}});export{q as default};
@@ -1 +1 @@
1
- import{Br as e,V as t}from"./vendor-cameraui-C5_h4c-5.js";import{$t as n,Mn as r,Pn as i,an as a,fn as o,hr as s,in as c,mn as l,on as u,sn as d,yr as f}from"./vendor-AX0A8AMd.js";import{K as p,_ as m,j as h,l as g}from"./vendor-primevue-C9-jpd5L.js";import{n as _}from"./useCameraOptions-CkKmF0Hk.js";import{t as v}from"./types-BX3Shvk-.js";var y={class:`flex flex-col gap-4`},b={class:`flex flex-col field-gap`},x={class:`cui-label`},S={class:`flex flex-col field-gap`},C={class:`cui-label`},w={class:`text-xs text-muted`},T={class:`flex items-center gap-2`},E=[`onClick`],D={key:0,class:`pl-7`},O=l({__name:`ConfigActionCameraControl`,props:{data:{}},emits:[`update:data`],setup(l,{emit:O}){let k=l,A=O,{t:j}=e();function M(e){return(e.options??[]).map(e=>({label:j(e.labelKey),value:e.value}))}let{cameraOptions:N}=_();function P(e){return k.data.properties.some(t=>t.property===e)}function F(e){return k.data.properties.find(t=>t.property===e)?.value??``}function I(e){try{let t=JSON.parse(F(e)||`[]`);return Array.isArray(t)?t:[]}catch{return[]}}function L(e,t){let n=[...k.data.properties];if(t){if(!n.some(t=>t.property===e)){let t=v.find(t=>t.key===e);n.push({property:e,value:t?.defaultValue??``})}}else{let t=n.findIndex(t=>t.property===e);t>=0&&n.splice(t,1)}A(`update:data`,{properties:n})}function R(e,t){let n=k.data.properties.map(n=>n.property===e?{...n,value:t}:n);A(`update:data`,{properties:n})}function z(e,t){A(`update:data`,{[e]:t})}return(e,_)=>{let O=h,k=t,A=p,B=g,V=m;return r(),d(`div`,y,[c(`div`,b,[c(`label`,x,f(s(j)(`components.automation_nodes.camera`)),1),o(O,{"model-value":l.data.cameraId,options:s(N),"option-label":`label`,"option-value":`value`,placeholder:s(j)(`components.automation_nodes.camera_select`),class:`w-full`,"onUpdate:modelValue":_[0]||=e=>z(`cameraId`,e)},null,8,[`model-value`,`options`,`placeholder`])]),c(`div`,S,[c(`label`,C,f(s(j)(`components.automation_nodes.camera_control_properties`)),1),c(`span`,w,f(s(j)(`components.automation_nodes.camera_control_properties_hint`)),1)]),(r(!0),d(n,null,i(s(v),e=>(r(),d(`div`,{key:e.key,class:`flex flex-col gap-2`},[c(`div`,T,[o(k,{"model-value":P(e.key),binary:``,"onUpdate:modelValue":t=>L(e.key,t)},null,8,[`model-value`,`onUpdate:modelValue`]),c(`label`,{class:`cui-label-switch cursor-pointer flex-1 min-w-0 truncate`,onClick:t=>L(e.key,!P(e.key))},f(s(j)(e.labelKey)),9,E),P(e.key)&&e.inputType===`boolean`?(r(),a(A,{key:0,"model-value":F(e.key)===`true`,class:`shrink-0`,"onUpdate:modelValue":t=>R(e.key,String(t))},null,8,[`model-value`,`onUpdate:modelValue`])):u(``,!0)]),P(e.key)&&e.inputType!==`boolean`?(r(),d(`div`,D,[e.inputType===`select`?(r(),a(O,{key:0,"model-value":F(e.key),options:M(e),"option-label":`label`,"option-value":`value`,class:`w-full`,"onUpdate:modelValue":t=>R(e.key,t)},null,8,[`model-value`,`options`,`onUpdate:modelValue`])):e.inputType===`multiselect`?(r(),a(B,{key:1,"model-value":I(e.key),options:M(e),"option-label":`label`,"option-value":`value`,"show-toggle-all":!1,class:`w-full`,"onUpdate:modelValue":t=>R(e.key,JSON.stringify(t))},null,8,[`model-value`,`options`,`onUpdate:modelValue`])):e.inputType===`number`?(r(),a(V,{key:2,"model-value":Number(F(e.key))||e.min,min:e.min,max:e.max,step:e.step??1,"min-fraction-digits":e.step&&e.step<1?2:0,"max-fraction-digits":e.step&&e.step<1?2:0,class:`w-full`,"onUpdate:modelValue":t=>R(e.key,String(t))},null,8,[`model-value`,`min`,`max`,`step`,`min-fraction-digits`,`max-fraction-digits`,`onUpdate:modelValue`])):u(``,!0)])):u(``,!0)]))),128))])}}});export{O as default};
1
+ import{Br as e,V as t}from"./vendor-cameraui-BRv7o4zz.js";import{$t as n,Mn as r,Pn as i,an as a,fn as o,hr as s,in as c,mn as l,on as u,sn as d,yr as f}from"./vendor-nVfLT5jI.js";import{K as p,_ as m,j as h,l as g}from"./vendor-primevue-C85v-zl5.js";import{n as _}from"./useCameraOptions-DKeZhfOM.js";import{t as v}from"./types-Do9v0d7I.js";var y={class:`flex flex-col gap-4`},b={class:`flex flex-col field-gap`},x={class:`cui-label`},S={class:`flex flex-col field-gap`},C={class:`cui-label`},w={class:`text-xs text-muted`},T={class:`flex items-center gap-2`},E=[`onClick`],D={key:0,class:`pl-7`},O=l({__name:`ConfigActionCameraControl`,props:{data:{}},emits:[`update:data`],setup(l,{emit:O}){let k=l,A=O,{t:j}=e();function M(e){return(e.options??[]).map(e=>({label:j(e.labelKey),value:e.value}))}let{cameraOptions:N}=_();function P(e){return k.data.properties.some(t=>t.property===e)}function F(e){return k.data.properties.find(t=>t.property===e)?.value??``}function I(e){try{let t=JSON.parse(F(e)||`[]`);return Array.isArray(t)?t:[]}catch{return[]}}function L(e,t){let n=[...k.data.properties];if(t){if(!n.some(t=>t.property===e)){let t=v.find(t=>t.key===e);n.push({property:e,value:t?.defaultValue??``})}}else{let t=n.findIndex(t=>t.property===e);t>=0&&n.splice(t,1)}A(`update:data`,{properties:n})}function R(e,t){let n=k.data.properties.map(n=>n.property===e?{...n,value:t}:n);A(`update:data`,{properties:n})}function z(e,t){A(`update:data`,{[e]:t})}return(e,_)=>{let O=h,k=t,A=p,B=g,V=m;return r(),d(`div`,y,[c(`div`,b,[c(`label`,x,f(s(j)(`components.automation_nodes.camera`)),1),o(O,{"model-value":l.data.cameraId,options:s(N),"option-label":`label`,"option-value":`value`,placeholder:s(j)(`components.automation_nodes.camera_select`),class:`w-full`,"onUpdate:modelValue":_[0]||=e=>z(`cameraId`,e)},null,8,[`model-value`,`options`,`placeholder`])]),c(`div`,S,[c(`label`,C,f(s(j)(`components.automation_nodes.camera_control_properties`)),1),c(`span`,w,f(s(j)(`components.automation_nodes.camera_control_properties_hint`)),1)]),(r(!0),d(n,null,i(s(v),e=>(r(),d(`div`,{key:e.key,class:`flex flex-col gap-2`},[c(`div`,T,[o(k,{"model-value":P(e.key),binary:``,"onUpdate:modelValue":t=>L(e.key,t)},null,8,[`model-value`,`onUpdate:modelValue`]),c(`label`,{class:`cui-label-switch cursor-pointer flex-1 min-w-0 truncate`,onClick:t=>L(e.key,!P(e.key))},f(s(j)(e.labelKey)),9,E),P(e.key)&&e.inputType===`boolean`?(r(),a(A,{key:0,"model-value":F(e.key)===`true`,class:`shrink-0`,"onUpdate:modelValue":t=>R(e.key,String(t))},null,8,[`model-value`,`onUpdate:modelValue`])):u(``,!0)]),P(e.key)&&e.inputType!==`boolean`?(r(),d(`div`,D,[e.inputType===`select`?(r(),a(O,{key:0,"model-value":F(e.key),options:M(e),"option-label":`label`,"option-value":`value`,class:`w-full`,"onUpdate:modelValue":t=>R(e.key,t)},null,8,[`model-value`,`options`,`onUpdate:modelValue`])):e.inputType===`multiselect`?(r(),a(B,{key:1,"model-value":I(e.key),options:M(e),"option-label":`label`,"option-value":`value`,"show-toggle-all":!1,class:`w-full`,"onUpdate:modelValue":t=>R(e.key,JSON.stringify(t))},null,8,[`model-value`,`options`,`onUpdate:modelValue`])):e.inputType===`number`?(r(),a(V,{key:2,"model-value":Number(F(e.key))||e.min,min:e.min,max:e.max,step:e.step??1,"min-fraction-digits":e.step&&e.step<1?2:0,"max-fraction-digits":e.step&&e.step<1?2:0,class:`w-full`,"onUpdate:modelValue":t=>R(e.key,String(t))},null,8,[`model-value`,`min`,`max`,`step`,`min-fraction-digits`,`max-fraction-digits`,`onUpdate:modelValue`])):u(``,!0)])):u(``,!0)]))),128))])}}});export{O as default};
@@ -1 +1 @@
1
- import{Br as e}from"./vendor-cameraui-C5_h4c-5.js";import{Mn as t,Yn as n,dn as r,fn as i,hr as a,in as o,mn as s,sn as c,yr as l}from"./vendor-AX0A8AMd.js";import{_ as u,j as d,z as f}from"./vendor-primevue-C9-jpd5L.js";var p={class:`flex flex-col gap-4`},m={class:`flex flex-col field-gap`},h={class:`cui-label`},g={class:`flex flex-col field-gap`},_={class:`cui-label`},v=s({__name:`ConfigActionDelay`,props:{data:{}},emits:[`update:data`],setup(s,{emit:v}){let y=v,{t:b}=e(),x=[{label:b(`components.automation_nodes.unit_seconds`),value:`seconds`},{label:b(`components.automation_nodes.unit_minutes`),value:`minutes`},{label:b(`components.automation_nodes.unit_hours`),value:`hours`}];function S(e,t){y(`update:data`,{[e]:t})}return(e,v)=>{let y=u,C=d,w=f;return t(),c(`div`,p,[o(`div`,m,[o(`label`,h,l(a(b)(`components.automation_nodes.delay_duration`)),1),i(y,{"model-value":s.data.duration,min:1,max:9999,class:`w-full`,"onUpdate:modelValue":v[0]||=e=>S(`duration`,e)},null,8,[`model-value`])]),o(`div`,g,[o(`label`,_,l(a(b)(`components.automation_nodes.delay_unit`)),1),i(C,{"model-value":s.data.unit,options:x,"option-label":`label`,"option-value":`value`,class:`w-full`,"onUpdate:modelValue":v[1]||=e=>S(`unit`,e)},null,8,[`model-value`]),i(w,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:n(()=>[r(l(a(b)(`components.automation_nodes.action_delay_desc`)),1)]),_:1})])])}}});export{v as default};
1
+ import{Br as e}from"./vendor-cameraui-BRv7o4zz.js";import{Mn as t,Yn as n,dn as r,fn as i,hr as a,in as o,mn as s,sn as c,yr as l}from"./vendor-nVfLT5jI.js";import{_ as u,j as d,z as f}from"./vendor-primevue-C85v-zl5.js";var p={class:`flex flex-col gap-4`},m={class:`flex flex-col field-gap`},h={class:`cui-label`},g={class:`flex flex-col field-gap`},_={class:`cui-label`},v=s({__name:`ConfigActionDelay`,props:{data:{}},emits:[`update:data`],setup(s,{emit:v}){let y=v,{t:b}=e(),x=[{label:b(`components.automation_nodes.unit_seconds`),value:`seconds`},{label:b(`components.automation_nodes.unit_minutes`),value:`minutes`},{label:b(`components.automation_nodes.unit_hours`),value:`hours`}];function S(e,t){y(`update:data`,{[e]:t})}return(e,v)=>{let y=u,C=d,w=f;return t(),c(`div`,p,[o(`div`,m,[o(`label`,h,l(a(b)(`components.automation_nodes.delay_duration`)),1),i(y,{"model-value":s.data.duration,min:1,max:9999,class:`w-full`,"onUpdate:modelValue":v[0]||=e=>S(`duration`,e)},null,8,[`model-value`])]),o(`div`,g,[o(`label`,_,l(a(b)(`components.automation_nodes.delay_unit`)),1),i(C,{"model-value":s.data.unit,options:x,"option-label":`label`,"option-value":`value`,class:`w-full`,"onUpdate:modelValue":v[1]||=e=>S(`unit`,e)},null,8,[`model-value`]),i(w,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:n(()=>[r(l(a(b)(`components.automation_nodes.action_delay_desc`)),1)]),_:1})])])}}});export{v as default};
@@ -1 +1 @@
1
- import{Br as e,I as t,zt as n}from"./vendor-cameraui-C5_h4c-5.js";import{$t as r,Mn as i,Pn as a,Yn as o,fn as s,hr as c,in as l,mn as u,sn as d,sr as f,yr as p}from"./vendor-AX0A8AMd.js";import{i as m,j as h}from"./vendor-primevue-C9-jpd5L.js";import{t as g}from"./delete-CiJ6ng5_.js";import{i as _}from"./flowSchema-D4Ys_7rr.js";import{t as v}from"./VariableInput-C7XFQ66c.js";import{t as y}from"./VariableSuggestions-DohkCyGS.js";var b={class:`flex flex-col gap-4`},x={class:`flex flex-col field-gap`},S={class:`cui-label`},C={class:`flex flex-col field-gap`},w={class:`cui-label`},T={class:`flex flex-col field-gap`},E={class:`cui-label`},D={class:`flex flex-col field-gap`},O={class:`cui-label`},k=u({__name:`ConfigActionHttp`,props:{data:{},nodeId:{}},emits:[`update:data`],setup(u,{emit:k}){let A=u,j=k,{t:M}=e(),N=[`GET`,`POST`,`PUT`,`DELETE`,`PATCH`],{options:P}=_(()=>A.nodeId),F=f(Object.entries(A.data.headers??{}).map(([e,t])=>({name:e,value:t})));function I(){F.value.push({name:``,value:``})}function L(e,t,n){let r=F.value[e];r&&(r[t]=n,z())}function R(e){F.value.splice(e,1),z()}function z(){let e={};for(let t of F.value)t.name.trim()&&(e[t.name.trim()]=t.value);j(`update:data`,{headers:e})}function B(e){let t=A.data.body??``;j(`update:data`,{body:t+e})}function V(e,t){j(`update:data`,{[e]:t})}return(e,f)=>{let _=h,k=t,A=g,j=n,z=m;return i(),d(`div`,b,[l(`div`,x,[l(`label`,S,p(c(M)(`components.automation_nodes.http_url`)),1),s(v,{"model-value":u.data.url,"node-id":u.nodeId,placeholder:`https://example.com/webhook`,"onUpdate:modelValue":f[0]||=e=>V(`url`,e)},null,8,[`model-value`,`node-id`])]),l(`div`,C,[l(`label`,w,p(c(M)(`components.automation_nodes.http_method`)),1),s(_,{"model-value":u.data.method,options:N,class:`w-full`,"onUpdate:modelValue":f[1]||=e=>V(`method`,e)},null,8,[`model-value`])]),l(`div`,T,[l(`label`,E,p(c(M)(`components.automation_nodes.http_headers`)),1),(i(!0),d(r,null,a(c(F),(e,t)=>(i(),d(`div`,{key:t,class:`flex items-center gap-2`},[s(k,{"model-value":e.name,placeholder:c(M)(`components.automation_nodes.http_header_name`),class:`flex-1 min-w-0`,"onUpdate:modelValue":e=>L(t,`name`,e??``)},null,8,[`model-value`,`placeholder`,`onUpdate:modelValue`]),s(k,{"model-value":e.value,placeholder:c(M)(`components.automation_nodes.http_header_value`),class:`flex-1 min-w-0`,"onUpdate:modelValue":e=>L(t,`value`,e??``)},null,8,[`model-value`,`placeholder`,`onUpdate:modelValue`]),s(j,{text:``,severity:`danger`,size:`small`,onClick:e=>R(t)},{default:o(()=>[s(A,{class:`w-4 h-4`})]),_:1},8,[`onClick`])]))),128)),s(j,{severity:`secondary`,outlined:``,size:`small`,class:`self-start`,label:c(M)(`components.automation_nodes.http_add_header`),onClick:I},null,8,[`label`])]),l(`div`,D,[l(`label`,O,p(c(M)(`components.automation_nodes.http_body`)),1),s(z,{"model-value":u.data.body,placeholder:`{"key": "value"}`,rows:`4`,class:`w-full font-mono text-xs`,"onUpdate:modelValue":f[2]||=e=>V(`body`,e)},null,8,[`model-value`]),s(y,{variables:c(P),onSelect:f[3]||=e=>B(e)},null,8,[`variables`])])])}}});export{k as default};
1
+ import{Br as e,I as t,zt as n}from"./vendor-cameraui-BRv7o4zz.js";import{$t as r,Mn as i,Pn as a,Yn as o,fn as s,hr as c,in as l,mn as u,sn as d,sr as f,yr as p}from"./vendor-nVfLT5jI.js";import{i as m,j as h}from"./vendor-primevue-C85v-zl5.js";import{t as g}from"./delete-B_wgbT_W.js";import{i as _}from"./flowSchema-C1fWwuQa.js";import{t as v}from"./VariableInput-__I-FsBF.js";import{t as y}from"./VariableSuggestions-B-7auf15.js";var b={class:`flex flex-col gap-4`},x={class:`flex flex-col field-gap`},S={class:`cui-label`},C={class:`flex flex-col field-gap`},w={class:`cui-label`},T={class:`flex flex-col field-gap`},E={class:`cui-label`},D={class:`flex flex-col field-gap`},O={class:`cui-label`},k=u({__name:`ConfigActionHttp`,props:{data:{},nodeId:{}},emits:[`update:data`],setup(u,{emit:k}){let A=u,j=k,{t:M}=e(),N=[`GET`,`POST`,`PUT`,`DELETE`,`PATCH`],{options:P}=_(()=>A.nodeId),F=f(Object.entries(A.data.headers??{}).map(([e,t])=>({name:e,value:t})));function I(){F.value.push({name:``,value:``})}function L(e,t,n){let r=F.value[e];r&&(r[t]=n,z())}function R(e){F.value.splice(e,1),z()}function z(){let e={};for(let t of F.value)t.name.trim()&&(e[t.name.trim()]=t.value);j(`update:data`,{headers:e})}function B(e){let t=A.data.body??``;j(`update:data`,{body:t+e})}function V(e,t){j(`update:data`,{[e]:t})}return(e,f)=>{let _=h,k=t,A=g,j=n,z=m;return i(),d(`div`,b,[l(`div`,x,[l(`label`,S,p(c(M)(`components.automation_nodes.http_url`)),1),s(v,{"model-value":u.data.url,"node-id":u.nodeId,placeholder:`https://example.com/webhook`,"onUpdate:modelValue":f[0]||=e=>V(`url`,e)},null,8,[`model-value`,`node-id`])]),l(`div`,C,[l(`label`,w,p(c(M)(`components.automation_nodes.http_method`)),1),s(_,{"model-value":u.data.method,options:N,class:`w-full`,"onUpdate:modelValue":f[1]||=e=>V(`method`,e)},null,8,[`model-value`])]),l(`div`,T,[l(`label`,E,p(c(M)(`components.automation_nodes.http_headers`)),1),(i(!0),d(r,null,a(c(F),(e,t)=>(i(),d(`div`,{key:t,class:`flex items-center gap-2`},[s(k,{"model-value":e.name,placeholder:c(M)(`components.automation_nodes.http_header_name`),class:`flex-1 min-w-0`,"onUpdate:modelValue":e=>L(t,`name`,e??``)},null,8,[`model-value`,`placeholder`,`onUpdate:modelValue`]),s(k,{"model-value":e.value,placeholder:c(M)(`components.automation_nodes.http_header_value`),class:`flex-1 min-w-0`,"onUpdate:modelValue":e=>L(t,`value`,e??``)},null,8,[`model-value`,`placeholder`,`onUpdate:modelValue`]),s(j,{text:``,severity:`danger`,size:`small`,onClick:e=>R(t)},{default:o(()=>[s(A,{class:`w-4 h-4`})]),_:1},8,[`onClick`])]))),128)),s(j,{severity:`secondary`,outlined:``,size:`small`,class:`self-start`,label:c(M)(`components.automation_nodes.http_add_header`),onClick:I},null,8,[`label`])]),l(`div`,D,[l(`label`,O,p(c(M)(`components.automation_nodes.http_body`)),1),s(z,{"model-value":u.data.body,placeholder:`{"key": "value"}`,rows:`4`,class:`w-full font-mono text-xs`,"onUpdate:modelValue":f[2]||=e=>V(`body`,e)},null,8,[`model-value`]),s(y,{variables:c(P),onSelect:f[3]||=e=>B(e)},null,8,[`variables`])])])}}});export{k as default};
@@ -1 +1 @@
1
- import{Br as e,Gt as t,I as n,zt as r}from"./vendor-cameraui-C5_h4c-5.js";import{Mn as i,Wn as a,Xn as o,Yn as s,an as c,dn as l,fn as u,hr as d,in as f,mn as p,on as m,rn as h,sn as g,yr as _}from"./vendor-AX0A8AMd.js";import{U as v,_ as y,j as b,z as x}from"./vendor-primevue-C9-jpd5L.js";import{t as S}from"./VariableInput-C7XFQ66c.js";import{t as C}from"./upload-DCTSXaJV.js";var w={class:`flex flex-col gap-4`},T={class:`flex flex-col field-gap`},E={class:`cui-label`},D={class:`flex gap-2`},O={key:0,class:`rounded-lg overflow-hidden border-[1px] border-color bg-black`},k=[`src`],A={class:`flex flex-col field-gap`},j={class:`cui-label`},M={class:`flex flex-col field-gap`},N={class:`cui-label`},P={class:`flex flex-col field-gap`},F={class:`cui-label`},I={class:`flex flex-col field-gap`},L={class:`cui-label`},R=p({__name:`ConfigActionImageInput`,props:{data:{},nodeId:{}},emits:[`update:data`],setup(p,{emit:R}){let z=p,B=R,{t:V}=e(),H=[{label:`JPEG`,value:`jpeg`},{label:`Raw RGB`,value:`raw-rgb`},{label:`Raw RGBA`,value:`raw-rgba`},{label:`Raw Grayscale`,value:`raw-gray`}],U=a(`fileInput`),W=h(()=>{let e=z.data.source;if(e){if(e.startsWith(`http://`)||e.startsWith(`https://`)||e.startsWith(`data:`))return e;if(e.length>100&&!e.startsWith(`{{`))return`data:image/jpeg;base64,${e}`}});function G(){U.value?.click()}function K(e){let t=e.target.files?.[0];if(!t)return;let n=new FileReader;n.onload=()=>{let e=n.result.split(`,`)[1];e&&B(`update:data`,{source:e})},n.readAsDataURL(t)}function q(e,t){B(`update:data`,{[e]:t})}return(e,a)=>{let h=C,R=r,z=x,B=n,J=v,Y=y,X=b,Z=t;return i(),g(`div`,w,[f(`div`,T,[f(`label`,E,_(d(V)(`components.automation_nodes.image_source`)),1),f(`div`,D,[u(S,{"model-value":p.data.source,"node-id":p.nodeId,placeholder:d(V)(`components.automation_nodes.image_source_placeholder`),class:`flex-1`,"onUpdate:modelValue":a[0]||=e=>q(`source`,e)},null,8,[`model-value`,`node-id`,`placeholder`]),o((i(),c(R,{severity:`secondary`,outlined:``,class:`shrink-0 h-[42px] w-[42px] p-0`,onClick:G},{icon:s(()=>[u(h,{class:`w-4 h-4`})]),_:1})),[[Z,d(V)(`components.automation_nodes.image_upload`),void 0,{top:!0}]]),f(`input`,{ref_key:`fileInput`,ref:U,type:`file`,accept:`image/*`,class:`hidden`,onChange:K},null,544)]),u(z,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:s(()=>[l(_(d(V)(`components.automation_nodes.image_source_hint`)),1)]),_:1})]),d(W)?(i(),g(`div`,O,[f(`img`,{src:d(W),class:`w-full max-h-32 object-cover`},null,8,k)])):m(``,!0),f(`div`,A,[f(`label`,j,_(d(V)(`components.automation_nodes.variable_name`)),1),u(B,{"model-value":p.data.variableName,placeholder:`image`,"onUpdate:modelValue":a[1]||=e=>q(`variableName`,e)},null,8,[`model-value`]),u(z,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:s(()=>[l(_(d(V)(`components.automation_nodes.image_variable_hint`)),1)]),_:1})]),u(J),f(`div`,M,[f(`label`,N,_(d(V)(`components.automation_nodes.image_width`)),1),u(Y,{"model-value":p.data.resizeWidth??0,min:0,max:7680,class:`w-full`,"onUpdate:modelValue":a[2]||=e=>q(`resizeWidth`,e)},null,8,[`model-value`])]),f(`div`,P,[f(`label`,F,_(d(V)(`components.automation_nodes.image_height`)),1),u(Y,{"model-value":p.data.resizeHeight??0,min:0,max:4320,class:`w-full`,"onUpdate:modelValue":a[3]||=e=>q(`resizeHeight`,e)},null,8,[`model-value`])]),u(z,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:s(()=>[l(_(d(V)(`components.automation_nodes.image_resize_hint`)),1)]),_:1}),f(`div`,I,[f(`label`,L,_(d(V)(`components.automation_nodes.image_output_format`)),1),u(X,{"model-value":p.data.outputFormat??`jpeg`,options:H,"option-label":`label`,"option-value":`value`,class:`w-full`,"onUpdate:modelValue":a[4]||=e=>q(`outputFormat`,e)},null,8,[`model-value`])])])}}});export{R as default};
1
+ import{Br as e,Gt as t,I as n,zt as r}from"./vendor-cameraui-BRv7o4zz.js";import{Mn as i,Wn as a,Xn as o,Yn as s,an as c,dn as l,fn as u,hr as d,in as f,mn as p,on as m,rn as h,sn as g,yr as _}from"./vendor-nVfLT5jI.js";import{U as v,_ as y,j as b,z as x}from"./vendor-primevue-C85v-zl5.js";import{t as S}from"./VariableInput-__I-FsBF.js";import{t as C}from"./upload-Dp1Z1JOP.js";var w={class:`flex flex-col gap-4`},T={class:`flex flex-col field-gap`},E={class:`cui-label`},D={class:`flex gap-2`},O={key:0,class:`rounded-lg overflow-hidden border-[1px] border-color bg-black`},k=[`src`],A={class:`flex flex-col field-gap`},j={class:`cui-label`},M={class:`flex flex-col field-gap`},N={class:`cui-label`},P={class:`flex flex-col field-gap`},F={class:`cui-label`},I={class:`flex flex-col field-gap`},L={class:`cui-label`},R=p({__name:`ConfigActionImageInput`,props:{data:{},nodeId:{}},emits:[`update:data`],setup(p,{emit:R}){let z=p,B=R,{t:V}=e(),H=[{label:`JPEG`,value:`jpeg`},{label:`Raw RGB`,value:`raw-rgb`},{label:`Raw RGBA`,value:`raw-rgba`},{label:`Raw Grayscale`,value:`raw-gray`}],U=a(`fileInput`),W=h(()=>{let e=z.data.source;if(e){if(e.startsWith(`http://`)||e.startsWith(`https://`)||e.startsWith(`data:`))return e;if(e.length>100&&!e.startsWith(`{{`))return`data:image/jpeg;base64,${e}`}});function G(){U.value?.click()}function K(e){let t=e.target.files?.[0];if(!t)return;let n=new FileReader;n.onload=()=>{let e=n.result.split(`,`)[1];e&&B(`update:data`,{source:e})},n.readAsDataURL(t)}function q(e,t){B(`update:data`,{[e]:t})}return(e,a)=>{let h=C,R=r,z=x,B=n,J=v,Y=y,X=b,Z=t;return i(),g(`div`,w,[f(`div`,T,[f(`label`,E,_(d(V)(`components.automation_nodes.image_source`)),1),f(`div`,D,[u(S,{"model-value":p.data.source,"node-id":p.nodeId,placeholder:d(V)(`components.automation_nodes.image_source_placeholder`),class:`flex-1`,"onUpdate:modelValue":a[0]||=e=>q(`source`,e)},null,8,[`model-value`,`node-id`,`placeholder`]),o((i(),c(R,{severity:`secondary`,outlined:``,class:`shrink-0 h-[42px] w-[42px] p-0`,onClick:G},{icon:s(()=>[u(h,{class:`w-4 h-4`})]),_:1})),[[Z,d(V)(`components.automation_nodes.image_upload`),void 0,{top:!0}]]),f(`input`,{ref_key:`fileInput`,ref:U,type:`file`,accept:`image/*`,class:`hidden`,onChange:K},null,544)]),u(z,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:s(()=>[l(_(d(V)(`components.automation_nodes.image_source_hint`)),1)]),_:1})]),d(W)?(i(),g(`div`,O,[f(`img`,{src:d(W),class:`w-full max-h-32 object-cover`},null,8,k)])):m(``,!0),f(`div`,A,[f(`label`,j,_(d(V)(`components.automation_nodes.variable_name`)),1),u(B,{"model-value":p.data.variableName,placeholder:`image`,"onUpdate:modelValue":a[1]||=e=>q(`variableName`,e)},null,8,[`model-value`]),u(z,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:s(()=>[l(_(d(V)(`components.automation_nodes.image_variable_hint`)),1)]),_:1})]),u(J),f(`div`,M,[f(`label`,N,_(d(V)(`components.automation_nodes.image_width`)),1),u(Y,{"model-value":p.data.resizeWidth??0,min:0,max:7680,class:`w-full`,"onUpdate:modelValue":a[2]||=e=>q(`resizeWidth`,e)},null,8,[`model-value`])]),f(`div`,P,[f(`label`,F,_(d(V)(`components.automation_nodes.image_height`)),1),u(Y,{"model-value":p.data.resizeHeight??0,min:0,max:4320,class:`w-full`,"onUpdate:modelValue":a[3]||=e=>q(`resizeHeight`,e)},null,8,[`model-value`])]),u(z,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:s(()=>[l(_(d(V)(`components.automation_nodes.image_resize_hint`)),1)]),_:1}),f(`div`,I,[f(`label`,L,_(d(V)(`components.automation_nodes.image_output_format`)),1),u(X,{"model-value":p.data.outputFormat??`jpeg`,options:H,"option-label":`label`,"option-value":`value`,class:`w-full`,"onUpdate:modelValue":a[4]||=e=>q(`outputFormat`,e)},null,8,[`model-value`])])])}}});export{R as default};
@@ -1 +1 @@
1
- import{Br as e,zt as t}from"./vendor-cameraui-C5_h4c-5.js";import{$t as n,Mn as r,Pn as i,Yn as a,an as o,dn as s,fn as c,hr as l,in as u,mn as d,on as f,rn as p,sn as m,yr as h}from"./vendor-AX0A8AMd.js";import{K as g,i as _,z as v}from"./vendor-primevue-C9-jpd5L.js";import{i as y}from"./flowSchema-D4Ys_7rr.js";import{t as b}from"./VariableInput-C7XFQ66c.js";import{t as x}from"./VariableSuggestions-DohkCyGS.js";import{t as S}from"./mqtt-Cotm4qW5.js";var C={class:`flex flex-col gap-4`},w={class:`flex flex-col field-gap`},T={class:`cui-label`},E={key:0,class:`flex flex-col field-gap`},D={class:`cui-label`},O={class:`flex flex-wrap gap-1.5`},k={class:`flex flex-col field-gap`},A={class:`cui-label`},j={class:`flex items-center gap-4 cui-toggle-switch`},M={class:`flex flex-col field-switch-gap`},N={class:`cui-label-switch`},P=d({__name:`ConfigActionMqtt`,props:{data:{},nodeId:{}},emits:[`update:data`],setup(d,{emit:P}){let F=new S,I=d,L=P,{t:R}=e(),{options:z}=y(()=>I.nodeId),{data:B}=F.getMqttTopicsQuery(),V=p(()=>(B.value??[]).slice(0,15));function H(e){let t=I.data.payload??``;L(`update:data`,{payload:t+e})}function U(e,t){L(`update:data`,{[e]:t})}return(e,p)=>{let y=t,S=_,P=v,F=g;return r(),m(`div`,C,[u(`div`,w,[u(`label`,T,h(l(R)(`components.automation_nodes.mqtt_topic`)),1),c(b,{"model-value":d.data.topic,"node-id":d.nodeId,placeholder:`home/notify/doorbell`,"onUpdate:modelValue":p[0]||=e=>U(`topic`,e)},null,8,[`model-value`,`node-id`])]),l(V).length?(r(),m(`div`,E,[u(`label`,D,h(l(R)(`components.automation_nodes.mqtt_recent_topics`)),1),u(`div`,O,[(r(!0),m(n,null,i(l(V),e=>(r(),o(y,{key:e,severity:`secondary`,outlined:``,size:`small`,label:e,class:`font-mono`,onClick:t=>U(`topic`,e)},null,8,[`label`,`onClick`]))),128))])])):f(``,!0),u(`div`,k,[u(`label`,A,h(l(R)(`components.automation_nodes.mqtt_payload`)),1),c(S,{"model-value":d.data.payload,placeholder:`{"event": "{{event.label}}"}`,rows:`4`,class:`w-full font-mono text-xs`,"onUpdate:modelValue":p[1]||=e=>U(`payload`,e)},null,8,[`model-value`]),c(x,{variables:l(z),onSelect:p[2]||=e=>H(e)},null,8,[`variables`])]),u(`div`,j,[u(`div`,M,[u(`label`,N,h(l(R)(`components.automation_nodes.mqtt_retain`)),1),c(P,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-switch-hint`},{default:a(()=>[s(h(l(R)(`components.automation_nodes.mqtt_retain_hint`)),1)]),_:1})]),c(F,{"model-value":d.data.retain,class:`ml-auto shrink-0`,"onUpdate:modelValue":p[3]||=e=>U(`retain`,e)},null,8,[`model-value`])])])}}});export{P as default};
1
+ import{Br as e,zt as t}from"./vendor-cameraui-BRv7o4zz.js";import{$t as n,Mn as r,Pn as i,Yn as a,an as o,dn as s,fn as c,hr as l,in as u,mn as d,on as f,rn as p,sn as m,yr as h}from"./vendor-nVfLT5jI.js";import{K as g,i as _,z as v}from"./vendor-primevue-C85v-zl5.js";import{i as y}from"./flowSchema-C1fWwuQa.js";import{t as b}from"./VariableInput-__I-FsBF.js";import{t as x}from"./VariableSuggestions-B-7auf15.js";import{t as S}from"./mqtt-DGNlVikj.js";var C={class:`flex flex-col gap-4`},w={class:`flex flex-col field-gap`},T={class:`cui-label`},E={key:0,class:`flex flex-col field-gap`},D={class:`cui-label`},O={class:`flex flex-wrap gap-1.5`},k={class:`flex flex-col field-gap`},A={class:`cui-label`},j={class:`flex items-center gap-4 cui-toggle-switch`},M={class:`flex flex-col field-switch-gap`},N={class:`cui-label-switch`},P=d({__name:`ConfigActionMqtt`,props:{data:{},nodeId:{}},emits:[`update:data`],setup(d,{emit:P}){let F=new S,I=d,L=P,{t:R}=e(),{options:z}=y(()=>I.nodeId),{data:B}=F.getMqttTopicsQuery(),V=p(()=>(B.value??[]).slice(0,15));function H(e){let t=I.data.payload??``;L(`update:data`,{payload:t+e})}function U(e,t){L(`update:data`,{[e]:t})}return(e,p)=>{let y=t,S=_,P=v,F=g;return r(),m(`div`,C,[u(`div`,w,[u(`label`,T,h(l(R)(`components.automation_nodes.mqtt_topic`)),1),c(b,{"model-value":d.data.topic,"node-id":d.nodeId,placeholder:`home/notify/doorbell`,"onUpdate:modelValue":p[0]||=e=>U(`topic`,e)},null,8,[`model-value`,`node-id`])]),l(V).length?(r(),m(`div`,E,[u(`label`,D,h(l(R)(`components.automation_nodes.mqtt_recent_topics`)),1),u(`div`,O,[(r(!0),m(n,null,i(l(V),e=>(r(),o(y,{key:e,severity:`secondary`,outlined:``,size:`small`,label:e,class:`font-mono`,onClick:t=>U(`topic`,e)},null,8,[`label`,`onClick`]))),128))])])):f(``,!0),u(`div`,k,[u(`label`,A,h(l(R)(`components.automation_nodes.mqtt_payload`)),1),c(S,{"model-value":d.data.payload,placeholder:`{"event": "{{event.label}}"}`,rows:`4`,class:`w-full font-mono text-xs`,"onUpdate:modelValue":p[1]||=e=>U(`payload`,e)},null,8,[`model-value`]),c(x,{variables:l(z),onSelect:p[2]||=e=>H(e)},null,8,[`variables`])]),u(`div`,j,[u(`div`,M,[u(`label`,N,h(l(R)(`components.automation_nodes.mqtt_retain`)),1),c(P,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-switch-hint`},{default:a(()=>[s(h(l(R)(`components.automation_nodes.mqtt_retain_hint`)),1)]),_:1})]),c(F,{"model-value":d.data.retain,class:`ml-auto shrink-0`,"onUpdate:modelValue":p[3]||=e=>U(`retain`,e)},null,8,[`model-value`])])])}}});export{P as default};
@@ -1 +1 @@
1
- import{Br as e,Gt as t,I as n,zt as ee}from"./vendor-cameraui-C5_h4c-5.js";import{Mn as r,Wn as i,Xn as a,Yn as o,an as s,dn as c,fn as l,hr as u,in as d,mn as f,on as p,rn as m,sn as h,yr as g}from"./vendor-AX0A8AMd.js";import{i as te,j as ne,l as _,z as v}from"./vendor-primevue-C9-jpd5L.js";import{t as y}from"./notifications-D4SOTDPx.js";import{i as b}from"./flowSchema-D4Ys_7rr.js";import{t as x}from"./VariableInput-C7XFQ66c.js";import{t as S}from"./VariableSuggestions-DohkCyGS.js";import{t as C}from"./upload-DCTSXaJV.js";var w={class:`flex flex-col gap-4`},re={class:`flex flex-col field-gap`},T={class:`cui-label`},E={class:`flex flex-col field-gap`},D={class:`cui-label`},O={class:`flex flex-col field-gap`},k={class:`cui-label`},A={class:`flex flex-col field-gap`},j={class:`cui-label`},M={class:`flex gap-2`},N={key:0,class:`rounded-lg overflow-hidden border-[1px] border-color bg-black`},P=[`src`],F={class:`flex flex-col field-gap`},I={class:`cui-label`},L={class:`flex flex-col field-gap`},R={class:`cui-label`},z={class:`text-xs text-muted-color`},B=f({__name:`ConfigActionNotification`,props:{data:{},nodeId:{}},emits:[`update:data`],setup(f,{emit:B}){let V=new y,H=f,U=B,{t:W}=e(),{data:G,isLoading:K}=V.listDevicesQuery(),q=[{label:W(`components.automation_nodes.severity_info`),value:`info`},{label:W(`components.automation_nodes.severity_warning`),value:`warn`},{label:W(`components.automation_nodes.severity_error`),value:`error`},{label:W(`components.automation_nodes.severity_critical`),value:`critical`}],J=i(`fileInput`),Y=m(()=>(G.value??[]).map(e=>({id:e.id,label:e.name}))),{options:X}=b(()=>H.nodeId),Z=m(()=>{let e=H.data.image;if(e){if(e.startsWith(`http://`)||e.startsWith(`https://`)||e.startsWith(`data:`))return e;if(e.length>100&&!e.startsWith(`{{`))return`data:image/jpeg;base64,${e}`}});function Q(e,t){let n=H.data[e]??``;U(`update:data`,{[e]:n+t})}function $(e,t){U(`update:data`,{[e]:t})}function ie(){J.value?.click()}function ae(e){let t=e.target.files?.[0];if(!t)return;let n=new FileReader;n.onload=()=>{let e=n.result.split(`,`)[1];e&&U(`update:data`,{image:e})},n.readAsDataURL(t)}return(e,i)=>{let m=n,y=te,b=ne,B=C,V=ee,H=v,U=_,G=t;return r(),h(`div`,w,[d(`div`,re,[d(`label`,T,g(u(W)(`components.automation_nodes.notification_title`)),1),l(m,{"model-value":f.data.title,placeholder:u(W)(`components.automation_nodes.notification_title_placeholder`),"onUpdate:modelValue":i[0]||=e=>$(`title`,e)},null,8,[`model-value`,`placeholder`]),l(S,{variables:u(X),onSelect:i[1]||=e=>Q(`title`,e)},null,8,[`variables`])]),d(`div`,E,[d(`label`,D,g(u(W)(`components.automation_nodes.notification_body`)),1),l(y,{"model-value":f.data.body,placeholder:u(W)(`components.automation_nodes.notification_body_placeholder`),rows:`3`,class:`w-full`,"onUpdate:modelValue":i[2]||=e=>$(`body`,e)},null,8,[`model-value`,`placeholder`]),l(S,{variables:u(X),onSelect:i[3]||=e=>Q(`body`,e)},null,8,[`variables`])]),d(`div`,O,[d(`label`,k,g(u(W)(`components.automation_nodes.notification_severity`)),1),l(b,{"model-value":f.data.severity??`info`,options:q,"option-label":`label`,"option-value":`value`,class:`w-full`,"onUpdate:modelValue":i[4]||=e=>$(`severity`,e)},null,8,[`model-value`])]),d(`div`,A,[d(`label`,j,g(u(W)(`components.automation_nodes.notification_image`)),1),d(`div`,M,[l(x,{"model-value":f.data.image??``,"node-id":f.nodeId,placeholder:u(W)(`components.automation_nodes.notification_image_placeholder`),class:`flex-1`,"onUpdate:modelValue":i[5]||=e=>$(`image`,e)},null,8,[`model-value`,`node-id`,`placeholder`]),a((r(),s(V,{severity:`secondary`,outlined:``,class:`shrink-0 h-[42px] w-[42px] p-0`,onClick:ie},{icon:o(()=>[l(B,{class:`w-4 h-4`})]),_:1})),[[G,u(W)(`components.automation_nodes.image_upload`),void 0,{top:!0}]]),d(`input`,{ref_key:`fileInput`,ref:J,type:`file`,accept:`image/*`,class:`hidden`,onChange:ae},null,544)]),l(H,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:o(()=>[c(g(u(W)(`components.automation_nodes.notification_image_hint`)),1)]),_:1}),u(Z)?(r(),h(`div`,N,[d(`img`,{src:u(Z),class:`w-full max-h-32 object-cover`},null,8,P)])):p(``,!0)]),d(`div`,F,[d(`label`,I,g(u(W)(`components.automation_nodes.notification_deep_link`)),1),l(m,{"model-value":f.data.deepLink,placeholder:`/cameras/cam-1`,"onUpdate:modelValue":i[6]||=e=>$(`deepLink`,e)},null,8,[`model-value`]),l(S,{variables:u(X),onSelect:i[7]||=e=>Q(`deepLink`,e)},null,8,[`variables`])]),d(`div`,L,[d(`label`,R,g(u(W)(`components.automation_nodes.notification_targets`)),1),d(`span`,z,g(u(W)(`components.automation_nodes.notification_targets_hint`)),1),l(U,{"model-value":f.data.targets??[],options:u(Y),"option-label":`label`,"option-value":`id`,loading:u(K),placeholder:u(W)(`components.automation_nodes.notification_targets_placeholder`),display:`chip`,filter:``,class:`w-full`,"onUpdate:modelValue":i[8]||=e=>$(`targets`,e)},null,8,[`model-value`,`options`,`loading`,`placeholder`])])])}}});export{B as default};
1
+ import{Br as e,Gt as t,I as n,zt as ee}from"./vendor-cameraui-BRv7o4zz.js";import{Mn as r,Wn as i,Xn as a,Yn as o,an as s,dn as c,fn as l,hr as u,in as d,mn as f,on as p,rn as m,sn as h,yr as g}from"./vendor-nVfLT5jI.js";import{i as te,j as ne,l as _,z as v}from"./vendor-primevue-C85v-zl5.js";import{t as y}from"./notifications-CIJEGR7A.js";import{i as b}from"./flowSchema-C1fWwuQa.js";import{t as x}from"./VariableInput-__I-FsBF.js";import{t as S}from"./VariableSuggestions-B-7auf15.js";import{t as C}from"./upload-Dp1Z1JOP.js";var w={class:`flex flex-col gap-4`},re={class:`flex flex-col field-gap`},T={class:`cui-label`},E={class:`flex flex-col field-gap`},D={class:`cui-label`},O={class:`flex flex-col field-gap`},k={class:`cui-label`},A={class:`flex flex-col field-gap`},j={class:`cui-label`},M={class:`flex gap-2`},N={key:0,class:`rounded-lg overflow-hidden border-[1px] border-color bg-black`},P=[`src`],F={class:`flex flex-col field-gap`},I={class:`cui-label`},L={class:`flex flex-col field-gap`},R={class:`cui-label`},z={class:`text-xs text-muted-color`},B=f({__name:`ConfigActionNotification`,props:{data:{},nodeId:{}},emits:[`update:data`],setup(f,{emit:B}){let V=new y,H=f,U=B,{t:W}=e(),{data:G,isLoading:K}=V.listDevicesQuery(),q=[{label:W(`components.automation_nodes.severity_info`),value:`info`},{label:W(`components.automation_nodes.severity_warning`),value:`warn`},{label:W(`components.automation_nodes.severity_error`),value:`error`},{label:W(`components.automation_nodes.severity_critical`),value:`critical`}],J=i(`fileInput`),Y=m(()=>(G.value??[]).map(e=>({id:e.id,label:e.name}))),{options:X}=b(()=>H.nodeId),Z=m(()=>{let e=H.data.image;if(e){if(e.startsWith(`http://`)||e.startsWith(`https://`)||e.startsWith(`data:`))return e;if(e.length>100&&!e.startsWith(`{{`))return`data:image/jpeg;base64,${e}`}});function Q(e,t){let n=H.data[e]??``;U(`update:data`,{[e]:n+t})}function $(e,t){U(`update:data`,{[e]:t})}function ie(){J.value?.click()}function ae(e){let t=e.target.files?.[0];if(!t)return;let n=new FileReader;n.onload=()=>{let e=n.result.split(`,`)[1];e&&U(`update:data`,{image:e})},n.readAsDataURL(t)}return(e,i)=>{let m=n,y=te,b=ne,B=C,V=ee,H=v,U=_,G=t;return r(),h(`div`,w,[d(`div`,re,[d(`label`,T,g(u(W)(`components.automation_nodes.notification_title`)),1),l(m,{"model-value":f.data.title,placeholder:u(W)(`components.automation_nodes.notification_title_placeholder`),"onUpdate:modelValue":i[0]||=e=>$(`title`,e)},null,8,[`model-value`,`placeholder`]),l(S,{variables:u(X),onSelect:i[1]||=e=>Q(`title`,e)},null,8,[`variables`])]),d(`div`,E,[d(`label`,D,g(u(W)(`components.automation_nodes.notification_body`)),1),l(y,{"model-value":f.data.body,placeholder:u(W)(`components.automation_nodes.notification_body_placeholder`),rows:`3`,class:`w-full`,"onUpdate:modelValue":i[2]||=e=>$(`body`,e)},null,8,[`model-value`,`placeholder`]),l(S,{variables:u(X),onSelect:i[3]||=e=>Q(`body`,e)},null,8,[`variables`])]),d(`div`,O,[d(`label`,k,g(u(W)(`components.automation_nodes.notification_severity`)),1),l(b,{"model-value":f.data.severity??`info`,options:q,"option-label":`label`,"option-value":`value`,class:`w-full`,"onUpdate:modelValue":i[4]||=e=>$(`severity`,e)},null,8,[`model-value`])]),d(`div`,A,[d(`label`,j,g(u(W)(`components.automation_nodes.notification_image`)),1),d(`div`,M,[l(x,{"model-value":f.data.image??``,"node-id":f.nodeId,placeholder:u(W)(`components.automation_nodes.notification_image_placeholder`),class:`flex-1`,"onUpdate:modelValue":i[5]||=e=>$(`image`,e)},null,8,[`model-value`,`node-id`,`placeholder`]),a((r(),s(V,{severity:`secondary`,outlined:``,class:`shrink-0 h-[42px] w-[42px] p-0`,onClick:ie},{icon:o(()=>[l(B,{class:`w-4 h-4`})]),_:1})),[[G,u(W)(`components.automation_nodes.image_upload`),void 0,{top:!0}]]),d(`input`,{ref_key:`fileInput`,ref:J,type:`file`,accept:`image/*`,class:`hidden`,onChange:ae},null,544)]),l(H,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:o(()=>[c(g(u(W)(`components.automation_nodes.notification_image_hint`)),1)]),_:1}),u(Z)?(r(),h(`div`,N,[d(`img`,{src:u(Z),class:`w-full max-h-32 object-cover`},null,8,P)])):p(``,!0)]),d(`div`,F,[d(`label`,I,g(u(W)(`components.automation_nodes.notification_deep_link`)),1),l(m,{"model-value":f.data.deepLink,placeholder:`/cameras/cam-1`,"onUpdate:modelValue":i[6]||=e=>$(`deepLink`,e)},null,8,[`model-value`]),l(S,{variables:u(X),onSelect:i[7]||=e=>Q(`deepLink`,e)},null,8,[`variables`])]),d(`div`,L,[d(`label`,R,g(u(W)(`components.automation_nodes.notification_targets`)),1),d(`span`,z,g(u(W)(`components.automation_nodes.notification_targets_hint`)),1),l(U,{"model-value":f.data.targets??[],options:u(Y),"option-label":`label`,"option-value":`id`,loading:u(K),placeholder:u(W)(`components.automation_nodes.notification_targets_placeholder`),display:`chip`,filter:``,class:`w-full`,"onUpdate:modelValue":i[8]||=e=>$(`targets`,e)},null,8,[`model-value`,`options`,`loading`,`placeholder`])])])}}});export{B as default};
@@ -1 +1 @@
1
- import{Br as e}from"./vendor-cameraui-C5_h4c-5.js";import{br as t}from"./api-Br1U09Hq.js";import{Mn as n,Yn as r,dn as i,fn as a,hr as o,in as s,mn as c,on as l,rn as u,sn as d,yr as f}from"./vendor-AX0A8AMd.js";import{j as p,z as m}from"./vendor-primevue-C9-jpd5L.js";import{n as h}from"./useCameraOptions-CkKmF0Hk.js";var g={class:`flex flex-col gap-4`},_={class:`flex flex-col field-gap`},v={class:`cui-label`},y={class:`flex flex-col field-gap`},b={class:`cui-label`},x={key:0,class:`flex flex-col field-gap`},S={class:`cui-label`},C={key:1,class:`flex flex-col field-gap`},w={class:`cui-label`},T=c({__name:`ConfigActionNotificationControl`,props:{data:{}},emits:[`update:data`],setup(c,{emit:T}){let E=new t,D=c,O=T,{t:k}=e(),{cameraOptions:A}=h(),{data:j,isLoading:M}=E.getUsersQuery({pageSize:1e3}),N=[{label:k(`components.automation_nodes.notification_control_enable`),value:`enable`},{label:k(`components.automation_nodes.notification_control_disable`),value:`disable`}],P=[{label:k(`components.automation_nodes.notification_control_scope_global`),value:`global`},{label:k(`components.automation_nodes.notification_control_scope_camera`),value:`camera`},{label:k(`components.automation_nodes.notification_control_scope_user`),value:`user`}],F=u(()=>(j.value?.result??[]).map(e=>({value:e._id,label:e.username}))),I=u(()=>D.data.scope===`user`?k(`components.automation_nodes.notification_control_scope_user_hint`):D.data.scope===`camera`?k(`components.automation_nodes.notification_control_scope_camera_hint`):k(`components.automation_nodes.notification_control_scope_global_hint`));function L(e,t){O(`update:data`,{[e]:t})}return(e,t)=>{let u=p,h=m;return n(),d(`div`,g,[s(`div`,_,[s(`label`,v,f(o(k)(`components.automation_nodes.notification_control_mode`)),1),a(u,{"model-value":c.data.mode??`disable`,options:N,"option-label":`label`,"option-value":`value`,class:`w-full`,"onUpdate:modelValue":t[0]||=e=>L(`mode`,e)},null,8,[`model-value`])]),s(`div`,y,[s(`label`,b,f(o(k)(`components.automation_nodes.notification_control_scope`)),1),a(u,{"model-value":c.data.scope??`global`,options:P,"option-label":`label`,"option-value":`value`,class:`w-full`,"onUpdate:modelValue":t[1]||=e=>L(`scope`,e)},null,8,[`model-value`]),a(h,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:r(()=>[i(f(o(I)),1)]),_:1})]),c.data.scope===`user`?(n(),d(`div`,x,[s(`label`,S,f(o(k)(`components.automation_nodes.notification_control_user`)),1),a(u,{"model-value":c.data.userId??``,options:o(F),"option-label":`label`,"option-value":`value`,loading:o(M),placeholder:o(k)(`components.automation_nodes.notification_control_user_placeholder`),filter:``,class:`w-full`,"onUpdate:modelValue":t[2]||=e=>L(`userId`,e)},null,8,[`model-value`,`options`,`loading`,`placeholder`])])):l(``,!0),c.data.scope===`camera`?(n(),d(`div`,C,[s(`label`,w,f(o(k)(`components.automation_nodes.notification_control_camera`)),1),a(u,{"model-value":c.data.cameraId??``,options:o(A),"option-label":`label`,"option-value":`value`,placeholder:o(k)(`components.automation_nodes.camera_select`),filter:``,class:`w-full`,"onUpdate:modelValue":t[3]||=e=>L(`cameraId`,e)},null,8,[`model-value`,`options`,`placeholder`])])):l(``,!0)])}}});export{T as default};
1
+ import{Br as e}from"./vendor-cameraui-BRv7o4zz.js";import{br as t}from"./api-BI5TkcMD.js";import{Mn as n,Yn as r,dn as i,fn as a,hr as o,in as s,mn as c,on as l,rn as u,sn as d,yr as f}from"./vendor-nVfLT5jI.js";import{j as p,z as m}from"./vendor-primevue-C85v-zl5.js";import{n as h}from"./useCameraOptions-DKeZhfOM.js";var g={class:`flex flex-col gap-4`},_={class:`flex flex-col field-gap`},v={class:`cui-label`},y={class:`flex flex-col field-gap`},b={class:`cui-label`},x={key:0,class:`flex flex-col field-gap`},S={class:`cui-label`},C={key:1,class:`flex flex-col field-gap`},w={class:`cui-label`},T=c({__name:`ConfigActionNotificationControl`,props:{data:{}},emits:[`update:data`],setup(c,{emit:T}){let E=new t,D=c,O=T,{t:k}=e(),{cameraOptions:A}=h(),{data:j,isLoading:M}=E.getUsersQuery({pageSize:1e3}),N=[{label:k(`components.automation_nodes.notification_control_enable`),value:`enable`},{label:k(`components.automation_nodes.notification_control_disable`),value:`disable`}],P=[{label:k(`components.automation_nodes.notification_control_scope_global`),value:`global`},{label:k(`components.automation_nodes.notification_control_scope_camera`),value:`camera`},{label:k(`components.automation_nodes.notification_control_scope_user`),value:`user`}],F=u(()=>(j.value?.result??[]).map(e=>({value:e._id,label:e.username}))),I=u(()=>D.data.scope===`user`?k(`components.automation_nodes.notification_control_scope_user_hint`):D.data.scope===`camera`?k(`components.automation_nodes.notification_control_scope_camera_hint`):k(`components.automation_nodes.notification_control_scope_global_hint`));function L(e,t){O(`update:data`,{[e]:t})}return(e,t)=>{let u=p,h=m;return n(),d(`div`,g,[s(`div`,_,[s(`label`,v,f(o(k)(`components.automation_nodes.notification_control_mode`)),1),a(u,{"model-value":c.data.mode??`disable`,options:N,"option-label":`label`,"option-value":`value`,class:`w-full`,"onUpdate:modelValue":t[0]||=e=>L(`mode`,e)},null,8,[`model-value`])]),s(`div`,y,[s(`label`,b,f(o(k)(`components.automation_nodes.notification_control_scope`)),1),a(u,{"model-value":c.data.scope??`global`,options:P,"option-label":`label`,"option-value":`value`,class:`w-full`,"onUpdate:modelValue":t[1]||=e=>L(`scope`,e)},null,8,[`model-value`]),a(h,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:r(()=>[i(f(o(I)),1)]),_:1})]),c.data.scope===`user`?(n(),d(`div`,x,[s(`label`,S,f(o(k)(`components.automation_nodes.notification_control_user`)),1),a(u,{"model-value":c.data.userId??``,options:o(F),"option-label":`label`,"option-value":`value`,loading:o(M),placeholder:o(k)(`components.automation_nodes.notification_control_user_placeholder`),filter:``,class:`w-full`,"onUpdate:modelValue":t[2]||=e=>L(`userId`,e)},null,8,[`model-value`,`options`,`loading`,`placeholder`])])):l(``,!0),c.data.scope===`camera`?(n(),d(`div`,C,[s(`label`,w,f(o(k)(`components.automation_nodes.notification_control_camera`)),1),a(u,{"model-value":c.data.cameraId??``,options:o(A),"option-label":`label`,"option-value":`value`,placeholder:o(k)(`components.automation_nodes.camera_select`),filter:``,class:`w-full`,"onUpdate:modelValue":t[3]||=e=>L(`cameraId`,e)},null,8,[`model-value`,`options`,`placeholder`])])):l(``,!0)])}}});export{T as default};
@@ -1 +1 @@
1
- import{Br as e,I as t,zt as n}from"./vendor-cameraui-C5_h4c-5.js";import{$t as r,Mn as i,Pn as a,Yn as o,an as s,dn as c,fn as l,hr as u,in as d,mn as f,on as p,sn as m,yr as h}from"./vendor-AX0A8AMd.js";import{U as g,z as _}from"./vendor-primevue-C9-jpd5L.js";import{t as v}from"./close-ChGy_BeH.js";import{t as y}from"./VariableInput-C7XFQ66c.js";var b={class:`flex flex-col gap-4`},x={class:`flex items-center justify-between`},S={class:`text-xs font-medium text-muted`},C={class:`flex flex-col field-gap`},w={class:`cui-label`},T={class:`flex flex-col field-gap`},E={class:`cui-label`},D=f({__name:`ConfigActionOutput`,props:{data:{},nodeId:{}},emits:[`update:data`],setup(f,{emit:D}){let O=f,k=D,{t:A}=e();function j(){k(`update:data`,{variables:[...O.data.variables,{label:``,value:``}]})}function M(e){let t=O.data.variables.filter((t,n)=>n!==e);k(`update:data`,{variables:t})}function N(e,t,n){let r=O.data.variables.map((r,i)=>i===e?{...r,[t]:n}:r);k(`update:data`,{variables:r})}return(e,D)=>{let O=v,k=n,P=t,F=g,I=_;return i(),m(`div`,b,[(i(!0),m(r,null,a(f.data.variables,(e,t)=>(i(),m(`div`,{key:t,class:`flex flex-col gap-2`},[d(`div`,x,[d(`span`,S,h(u(A)(`components.automation_nodes.variable`))+` #`+h(t+1),1),l(k,{severity:`danger`,text:``,rounded:``,class:`cui-icon-sm`,onClick:e=>M(t)},{icon:o(()=>[l(O,{width:`100%`,height:`100%`})]),_:1},8,[`onClick`])]),d(`div`,C,[d(`label`,w,h(u(A)(`components.automation_nodes.output_label`)),1),l(P,{"model-value":e.label,placeholder:u(A)(`components.automation_nodes.output_label_placeholder`),"onUpdate:modelValue":e=>N(t,`label`,String(e??``))},null,8,[`model-value`,`placeholder`,`onUpdate:modelValue`])]),d(`div`,T,[d(`label`,E,h(u(A)(`components.automation_nodes.condition_value`)),1),l(y,{"model-value":e.value,"node-id":f.nodeId,placeholder:`{{plugin.result}}`,"onUpdate:modelValue":e=>N(t,`value`,String(e??``))},null,8,[`model-value`,`node-id`,`onUpdate:modelValue`])]),t<f.data.variables.length-1?(i(),s(F,{key:0})):p(``,!0)]))),128)),l(k,{severity:`secondary`,outlined:``,class:`cui-button-small`,label:u(A)(`components.automation_nodes.output_add`),onClick:j},null,8,[`label`]),l(I,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:o(()=>[c(h(u(A)(`components.automation_nodes.output_hint`)),1)]),_:1})])}}});export{D as default};
1
+ import{Br as e,I as t,zt as n}from"./vendor-cameraui-BRv7o4zz.js";import{$t as r,Mn as i,Pn as a,Yn as o,an as s,dn as c,fn as l,hr as u,in as d,mn as f,on as p,sn as m,yr as h}from"./vendor-nVfLT5jI.js";import{U as g,z as _}from"./vendor-primevue-C85v-zl5.js";import{t as v}from"./close-BiHUNAkN.js";import{t as y}from"./VariableInput-__I-FsBF.js";var b={class:`flex flex-col gap-4`},x={class:`flex items-center justify-between`},S={class:`text-xs font-medium text-muted`},C={class:`flex flex-col field-gap`},w={class:`cui-label`},T={class:`flex flex-col field-gap`},E={class:`cui-label`},D=f({__name:`ConfigActionOutput`,props:{data:{},nodeId:{}},emits:[`update:data`],setup(f,{emit:D}){let O=f,k=D,{t:A}=e();function j(){k(`update:data`,{variables:[...O.data.variables,{label:``,value:``}]})}function M(e){let t=O.data.variables.filter((t,n)=>n!==e);k(`update:data`,{variables:t})}function N(e,t,n){let r=O.data.variables.map((r,i)=>i===e?{...r,[t]:n}:r);k(`update:data`,{variables:r})}return(e,D)=>{let O=v,k=n,P=t,F=g,I=_;return i(),m(`div`,b,[(i(!0),m(r,null,a(f.data.variables,(e,t)=>(i(),m(`div`,{key:t,class:`flex flex-col gap-2`},[d(`div`,x,[d(`span`,S,h(u(A)(`components.automation_nodes.variable`))+` #`+h(t+1),1),l(k,{severity:`danger`,text:``,rounded:``,class:`cui-icon-sm`,onClick:e=>M(t)},{icon:o(()=>[l(O,{width:`100%`,height:`100%`})]),_:1},8,[`onClick`])]),d(`div`,C,[d(`label`,w,h(u(A)(`components.automation_nodes.output_label`)),1),l(P,{"model-value":e.label,placeholder:u(A)(`components.automation_nodes.output_label_placeholder`),"onUpdate:modelValue":e=>N(t,`label`,String(e??``))},null,8,[`model-value`,`placeholder`,`onUpdate:modelValue`])]),d(`div`,T,[d(`label`,E,h(u(A)(`components.automation_nodes.condition_value`)),1),l(y,{"model-value":e.value,"node-id":f.nodeId,placeholder:`{{plugin.result}}`,"onUpdate:modelValue":e=>N(t,`value`,String(e??``))},null,8,[`model-value`,`node-id`,`onUpdate:modelValue`])]),t<f.data.variables.length-1?(i(),s(F,{key:0})):p(``,!0)]))),128)),l(k,{severity:`secondary`,outlined:``,class:`cui-button-small`,label:u(A)(`components.automation_nodes.output_add`),onClick:j},null,8,[`label`]),l(I,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:o(()=>[c(h(u(A)(`components.automation_nodes.output_hint`)),1)]),_:1})])}}});export{D as default};
@@ -1 +1 @@
1
- import{Br as e,Ot as t}from"./vendor-cameraui-C5_h4c-5.js";import{$t as n,Kn as r,Mn as i,Pn as a,fn as o,hr as s,in as c,mn as l,on as u,rn as d,sn as f,sr as p,ur as m,yr as h}from"./vendor-AX0A8AMd.js";import{U as g,j as _}from"./vendor-primevue-C9-jpd5L.js";import{t as v}from"./CuiSchema-Bhs017IB.js";import{t as y}from"./plugins-Bxyydn6v.js";import{t as b}from"./automations-Bz9Wo-Xf.js";import{t as x}from"./VariableInput-C7XFQ66c.js";var S={class:`flex flex-col gap-4`},C={class:`flex flex-col field-gap`},w={class:`cui-label`},T={class:`flex flex-col field-gap`},E={class:`cui-label`},D={class:`flex flex-col field-gap`},O={class:`cui-label`},k={class:`cui-label`},A={class:`flex flex-col gap-3`},j={class:`text-xs font-semibold text-muted uppercase`},M=l({__name:`ConfigActionPlugin`,props:{data:{},nodeId:{}},emits:[`update:data`],setup(l,{emit:M}){let N=new y,P=new b,F=l,I=M,{t:L}=e(),{plugin:R}=t(d(()=>F.data.pluginName)),{data:z,isBusy:B}=N.getPluginsQuery({page:1,pageSize:-1}),{data:V}=P.getPluginMethodsQuery(),H=m(),U=p(!1),W=d(()=>z.value?.result?z.value.result.filter(e=>e.contract?.interfaces?.length).map(e=>({label:e.pluginName,value:e.pluginName})):[]),G=d(()=>{if(!(!F.data.pluginName||!z.value?.result))return z.value.result.find(e=>e.pluginName===F.data.pluginName)}),K=d(()=>(G.value?.contract?.interfaces??[]).filter(e=>Y(e).length>0).map(e=>({label:e.replace(/([A-Z])/g,` $1`).trim(),value:e}))),q=d(()=>F.data.pluginInterface?Y(F.data.pluginInterface).map(e=>({label:L(e.labelKey),value:e.id})):[]),J=d(()=>{if(!(!F.data.pluginInterface||!F.data.method))return Y(F.data.pluginInterface).find(e=>e.id===F.data.method)});function Y(e){return V.value?.[e]??[]}async function X(){let e=J.value?.settingsMethod;if(!e||!R.value){H.value=void 0;return}U.value=!0;try{let t=R.value[e];H.value=t?await t():void 0}catch{H.value=void 0}finally{U.value=!1}}function Z(e){I(`update:data`,{pluginName:e,pluginInterface:``,method:``,params:{},config:{}})}function Q(e){I(`update:data`,{pluginInterface:e,method:``,params:{},config:{}})}function $(e){I(`update:data`,{method:e,params:{},config:{}})}function ee(e,t){I(`update:data`,{params:{...F.data.params,[e]:t}})}function te(e){I(`update:data`,{config:{...F.data.config,...e}})}return r([J,R],()=>X(),{immediate:!0}),(e,t)=>{let r=_,d=g,p=v;return i(),f(`div`,S,[c(`div`,C,[c(`label`,w,h(s(L)(`components.automation_nodes.plugin_name`)),1),o(r,{"model-value":l.data.pluginName,options:s(W),"option-label":`label`,"option-value":`value`,placeholder:s(L)(`components.automation_nodes.plugin_name_placeholder`),class:`w-full`,loading:s(B),"onUpdate:modelValue":Z},null,8,[`model-value`,`options`,`placeholder`,`loading`])]),c(`div`,T,[c(`label`,E,h(s(L)(`components.automation_nodes.plugin_interface`)),1),o(r,{"model-value":l.data.pluginInterface,options:s(K),"option-label":`label`,"option-value":`value`,placeholder:s(L)(`components.automation_nodes.plugin_interface_placeholder`),class:`w-full`,disabled:!l.data.pluginName,"onUpdate:modelValue":Q},null,8,[`model-value`,`options`,`placeholder`,`disabled`])]),c(`div`,D,[c(`label`,O,h(s(L)(`components.automation_nodes.plugin_method`)),1),o(r,{"model-value":l.data.method,options:s(q),"option-label":`label`,"option-value":`value`,placeholder:s(L)(`components.automation_nodes.plugin_method_placeholder`),class:`w-full`,disabled:!l.data.pluginInterface,"onUpdate:modelValue":$},null,8,[`model-value`,`options`,`placeholder`,`disabled`])]),s(J)?(i(!0),f(n,{key:0},a(s(J).params,e=>(i(),f(`div`,{key:e.name,class:`flex flex-col field-gap`},[c(`label`,k,h(s(L)(e.labelKey)),1),o(x,{"model-value":l.data.params[e.name]??``,"node-id":l.nodeId,placeholder:e.placeholder,"onUpdate:modelValue":t=>ee(e.name,String(t??``))},null,8,[`model-value`,`node-id`,`placeholder`,`onUpdate:modelValue`])]))),128)):u(``,!0),s(J)?.settingsMethod&&s(H)?.length?(i(),f(n,{key:1},[o(d),c(`div`,A,[c(`span`,j,h(s(L)(`components.automation_nodes.plugin_settings`)),1),o(p,{"schema-form":{schema:s(H),config:l.data.config??{}},loading:s(U),"save-button-label":s(L)(`components.automation_nodes.plugin_apply_settings`),"show-button":``,onOnFormSubmit:te},null,8,[`schema-form`,`loading`,`save-button-label`])])],64)):u(``,!0)])}}});export{M as default};
1
+ import{Br as e,Ot as t}from"./vendor-cameraui-BRv7o4zz.js";import{$t as n,Kn as r,Mn as i,Pn as a,fn as o,hr as s,in as c,mn as l,on as u,rn as d,sn as f,sr as p,ur as m,yr as h}from"./vendor-nVfLT5jI.js";import{U as g,j as _}from"./vendor-primevue-C85v-zl5.js";import{t as v}from"./CuiSchema-Dy2eRCu2.js";import{t as y}from"./plugins-HYHSAzD-.js";import{t as b}from"./automations-D6fqhxhY.js";import{t as x}from"./VariableInput-__I-FsBF.js";var S={class:`flex flex-col gap-4`},C={class:`flex flex-col field-gap`},w={class:`cui-label`},T={class:`flex flex-col field-gap`},E={class:`cui-label`},D={class:`flex flex-col field-gap`},O={class:`cui-label`},k={class:`cui-label`},A={class:`flex flex-col gap-3`},j={class:`text-xs font-semibold text-muted uppercase`},M=l({__name:`ConfigActionPlugin`,props:{data:{},nodeId:{}},emits:[`update:data`],setup(l,{emit:M}){let N=new y,P=new b,F=l,I=M,{t:L}=e(),{plugin:R}=t(d(()=>F.data.pluginName)),{data:z,isBusy:B}=N.getPluginsQuery({page:1,pageSize:-1}),{data:V}=P.getPluginMethodsQuery(),H=m(),U=p(!1),W=d(()=>z.value?.result?z.value.result.filter(e=>e.contract?.interfaces?.length).map(e=>({label:e.pluginName,value:e.pluginName})):[]),G=d(()=>{if(!(!F.data.pluginName||!z.value?.result))return z.value.result.find(e=>e.pluginName===F.data.pluginName)}),K=d(()=>(G.value?.contract?.interfaces??[]).filter(e=>Y(e).length>0).map(e=>({label:e.replace(/([A-Z])/g,` $1`).trim(),value:e}))),q=d(()=>F.data.pluginInterface?Y(F.data.pluginInterface).map(e=>({label:L(e.labelKey),value:e.id})):[]),J=d(()=>{if(!(!F.data.pluginInterface||!F.data.method))return Y(F.data.pluginInterface).find(e=>e.id===F.data.method)});function Y(e){return V.value?.[e]??[]}async function X(){let e=J.value?.settingsMethod;if(!e||!R.value){H.value=void 0;return}U.value=!0;try{let t=R.value[e];H.value=t?await t():void 0}catch{H.value=void 0}finally{U.value=!1}}function Z(e){I(`update:data`,{pluginName:e,pluginInterface:``,method:``,params:{},config:{}})}function Q(e){I(`update:data`,{pluginInterface:e,method:``,params:{},config:{}})}function $(e){I(`update:data`,{method:e,params:{},config:{}})}function ee(e,t){I(`update:data`,{params:{...F.data.params,[e]:t}})}function te(e){I(`update:data`,{config:{...F.data.config,...e}})}return r([J,R],()=>X(),{immediate:!0}),(e,t)=>{let r=_,d=g,p=v;return i(),f(`div`,S,[c(`div`,C,[c(`label`,w,h(s(L)(`components.automation_nodes.plugin_name`)),1),o(r,{"model-value":l.data.pluginName,options:s(W),"option-label":`label`,"option-value":`value`,placeholder:s(L)(`components.automation_nodes.plugin_name_placeholder`),class:`w-full`,loading:s(B),"onUpdate:modelValue":Z},null,8,[`model-value`,`options`,`placeholder`,`loading`])]),c(`div`,T,[c(`label`,E,h(s(L)(`components.automation_nodes.plugin_interface`)),1),o(r,{"model-value":l.data.pluginInterface,options:s(K),"option-label":`label`,"option-value":`value`,placeholder:s(L)(`components.automation_nodes.plugin_interface_placeholder`),class:`w-full`,disabled:!l.data.pluginName,"onUpdate:modelValue":Q},null,8,[`model-value`,`options`,`placeholder`,`disabled`])]),c(`div`,D,[c(`label`,O,h(s(L)(`components.automation_nodes.plugin_method`)),1),o(r,{"model-value":l.data.method,options:s(q),"option-label":`label`,"option-value":`value`,placeholder:s(L)(`components.automation_nodes.plugin_method_placeholder`),class:`w-full`,disabled:!l.data.pluginInterface,"onUpdate:modelValue":$},null,8,[`model-value`,`options`,`placeholder`,`disabled`])]),s(J)?(i(!0),f(n,{key:0},a(s(J).params,e=>(i(),f(`div`,{key:e.name,class:`flex flex-col field-gap`},[c(`label`,k,h(s(L)(e.labelKey)),1),o(x,{"model-value":l.data.params[e.name]??``,"node-id":l.nodeId,placeholder:e.placeholder,"onUpdate:modelValue":t=>ee(e.name,String(t??``))},null,8,[`model-value`,`node-id`,`placeholder`,`onUpdate:modelValue`])]))),128)):u(``,!0),s(J)?.settingsMethod&&s(H)?.length?(i(),f(n,{key:1},[o(d),c(`div`,A,[c(`span`,j,h(s(L)(`components.automation_nodes.plugin_settings`)),1),o(p,{"schema-form":{schema:s(H),config:l.data.config??{}},loading:s(U),"save-button-label":s(L)(`components.automation_nodes.plugin_apply_settings`),"show-button":``,onOnFormSubmit:te},null,8,[`schema-form`,`loading`,`save-button-label`])])],64)):u(``,!0)])}}});export{M as default};
@@ -1 +1 @@
1
- import{Br as e,Gt as t,V as n,j as r}from"./vendor-cameraui-C5_h4c-5.js";import{$t as i,Mn as a,Pn as o,Rn as s,Xn as c,Yn as l,an as u,ar as d,fn as f,hr as p,in as m,mn as h,on as g,rn as _,sn as v,yr as y}from"./vendor-AX0A8AMd.js";import{B as b}from"./types-DJucLQEM.js";import{j as x}from"./vendor-primevue-C9-jpd5L.js";import{t as S}from"./variable-CYzMRxrK.js";import{n as C}from"./useCameraOptions-CkKmF0Hk.js";import{n as w,r as T,t as E}from"./ConfigSensorValueInput-DbKeWPpA.js";var D={class:`flex flex-col gap-4`},O={class:`flex flex-col field-gap`},k={class:`cui-label`},A={key:0,class:`flex flex-col gap-3`},j={class:`cui-label`},M={class:`flex items-center gap-2`},N={class:`flex items-center gap-2 cursor-pointer select-none flex-1 min-w-0`},P={class:`text-sm font-medium truncate`},F=h({__name:`ConfigActionSensor`,props:{data:{},nodeId:{}},emits:[`update:data`],setup(h,{emit:F}){let I=h,L=F,{t:R}=e(),{useSensorOptions:z,getPropertiesForSensor:B}=C(),V=d({}),H=[{value:`fixed`,icon:T,tooltipKey:`components.automation_nodes.sensor_value_fixed`},{value:`variable`,icon:S,tooltipKey:`components.automation_nodes.sensor_value_variable`}],{sensorOptions:U,sensorById:W,isLoading:G}=z(e=>b(e.type,e.pluginId)),K=_(()=>I.data.sensorType?B(I.data.sensorType,`writable`):[]),q=_(()=>{let e=new Map;for(let t of I.data.properties??[])e.set(t.property,t.value);return e});function J(e){return q.value.has(e)}function Y(e){return q.value.get(e)??``}function X(e){return V[e]??/\{\{.*\}\}/.test(Y(e))}function Z(e,t){V[e]=t,!t&&/\{\{.*\}\}/.test(Y(e))&&$(e,``)}function Q(e,t){let n=[...I.data.properties??[]];if(t)n.some(t=>t.property===e)||n.push({property:e,value:w(String(I.data.sensorType??``),e)});else{let t=n.findIndex(t=>t.property===e);t>=0&&n.splice(t,1)}L(`update:data`,{properties:n})}function $(e,t){let n=[...I.data.properties??[]],r=n.find(t=>t.property===e);r?r.value=t:n.push({property:e,value:t}),L(`update:data`,{properties:n})}function ee(e){let t=W(String(e??``));L(`update:data`,{sensorId:e,sensorType:t?String(t.type):``,properties:[]})}return(e,d)=>{let _=x,b=n,S=r,C=t;return a(),v(`div`,D,[m(`div`,O,[m(`label`,k,y(p(R)(`components.automation_nodes.sensor_label`)),1),f(_,{"model-value":h.data.sensorId,options:p(U),"option-label":`label`,"option-value":`value`,placeholder:p(R)(`components.automation_nodes.sensor_placeholder`),class:`w-full`,loading:p(G),filter:``,"onUpdate:modelValue":ee},null,8,[`model-value`,`options`,`placeholder`,`loading`])]),h.data.sensorId&&p(K).length?(a(),v(`div`,A,[m(`label`,j,y(p(R)(`components.automation_nodes.sensor_properties`)),1),(a(!0),v(i,null,o(p(K),t=>(a(),v(`div`,{key:t.value,class:`flex flex-col gap-1.5 p-2 rounded-md border-color`},[m(`div`,M,[m(`label`,N,[f(b,{"model-value":J(t.value),binary:``,class:`shrink-0`,"onUpdate:modelValue":e=>Q(t.value,e)},null,8,[`model-value`,`onUpdate:modelValue`]),m(`span`,P,y(t.label),1)]),J(t.value)?(a(),u(S,{key:0,"model-value":X(t.value)?`variable`:`fixed`,options:H,"option-label":`value`,"option-value":`value`,"allow-empty":!1,class:`cui-select-button-small shrink-0`,"onUpdate:modelValue":e=>Z(t.value,e===`variable`)},{option:l(({option:t})=>[c((a(),u(s(t.icon),{class:`w-3.5 h-3.5`},null,512)),[[C,e.$t(t.tooltipKey),void 0,{top:!0}]])]),_:1},8,[`model-value`,`onUpdate:modelValue`])):g(``,!0)]),J(t.value)?(a(),u(E,{key:0,"sensor-type":h.data.sensorType,property:t.value,"model-value":Y(t.value),"variable-mode":X(t.value),"node-id":h.nodeId,"sensor-id":h.data.sensorId,"onUpdate:modelValue":e=>$(t.value,e)},null,8,[`sensor-type`,`property`,`model-value`,`variable-mode`,`node-id`,`sensor-id`,`onUpdate:modelValue`])):g(``,!0)]))),128))])):g(``,!0)])}}});export{F as default};
1
+ import{Br as e,Gt as t,V as n,j as r}from"./vendor-cameraui-BRv7o4zz.js";import{$t as i,Mn as a,Pn as o,Rn as s,Xn as c,Yn as l,an as u,ar as d,fn as f,hr as p,in as m,mn as h,on as g,rn as _,sn as v,yr as y}from"./vendor-nVfLT5jI.js";import{B as b}from"./types-QIK1kdY6.js";import{j as x}from"./vendor-primevue-C85v-zl5.js";import{t as S}from"./variable-DQYEQC2B.js";import{n as C}from"./useCameraOptions-DKeZhfOM.js";import{n as w,r as T,t as E}from"./ConfigSensorValueInput-DuvBl4YL.js";var D={class:`flex flex-col gap-4`},O={class:`flex flex-col field-gap`},k={class:`cui-label`},A={key:0,class:`flex flex-col gap-3`},j={class:`cui-label`},M={class:`flex items-center gap-2`},N={class:`flex items-center gap-2 cursor-pointer select-none flex-1 min-w-0`},P={class:`text-sm font-medium truncate`},F=h({__name:`ConfigActionSensor`,props:{data:{},nodeId:{}},emits:[`update:data`],setup(h,{emit:F}){let I=h,L=F,{t:R}=e(),{useSensorOptions:z,getPropertiesForSensor:B}=C(),V=d({}),H=[{value:`fixed`,icon:T,tooltipKey:`components.automation_nodes.sensor_value_fixed`},{value:`variable`,icon:S,tooltipKey:`components.automation_nodes.sensor_value_variable`}],{sensorOptions:U,sensorById:W,isLoading:G}=z(e=>b(e.type,e.pluginId)),K=_(()=>I.data.sensorType?B(I.data.sensorType,`writable`):[]),q=_(()=>{let e=new Map;for(let t of I.data.properties??[])e.set(t.property,t.value);return e});function J(e){return q.value.has(e)}function Y(e){return q.value.get(e)??``}function X(e){return V[e]??/\{\{.*\}\}/.test(Y(e))}function Z(e,t){V[e]=t,!t&&/\{\{.*\}\}/.test(Y(e))&&$(e,``)}function Q(e,t){let n=[...I.data.properties??[]];if(t)n.some(t=>t.property===e)||n.push({property:e,value:w(String(I.data.sensorType??``),e)});else{let t=n.findIndex(t=>t.property===e);t>=0&&n.splice(t,1)}L(`update:data`,{properties:n})}function $(e,t){let n=[...I.data.properties??[]],r=n.find(t=>t.property===e);r?r.value=t:n.push({property:e,value:t}),L(`update:data`,{properties:n})}function ee(e){let t=W(String(e??``));L(`update:data`,{sensorId:e,sensorType:t?String(t.type):``,properties:[]})}return(e,d)=>{let _=x,b=n,S=r,C=t;return a(),v(`div`,D,[m(`div`,O,[m(`label`,k,y(p(R)(`components.automation_nodes.sensor_label`)),1),f(_,{"model-value":h.data.sensorId,options:p(U),"option-label":`label`,"option-value":`value`,placeholder:p(R)(`components.automation_nodes.sensor_placeholder`),class:`w-full`,loading:p(G),filter:``,"onUpdate:modelValue":ee},null,8,[`model-value`,`options`,`placeholder`,`loading`])]),h.data.sensorId&&p(K).length?(a(),v(`div`,A,[m(`label`,j,y(p(R)(`components.automation_nodes.sensor_properties`)),1),(a(!0),v(i,null,o(p(K),t=>(a(),v(`div`,{key:t.value,class:`flex flex-col gap-1.5 p-2 rounded-md border-color`},[m(`div`,M,[m(`label`,N,[f(b,{"model-value":J(t.value),binary:``,class:`shrink-0`,"onUpdate:modelValue":e=>Q(t.value,e)},null,8,[`model-value`,`onUpdate:modelValue`]),m(`span`,P,y(t.label),1)]),J(t.value)?(a(),u(S,{key:0,"model-value":X(t.value)?`variable`:`fixed`,options:H,"option-label":`value`,"option-value":`value`,"allow-empty":!1,class:`cui-select-button-small shrink-0`,"onUpdate:modelValue":e=>Z(t.value,e===`variable`)},{option:l(({option:t})=>[c((a(),u(s(t.icon),{class:`w-3.5 h-3.5`},null,512)),[[C,e.$t(t.tooltipKey),void 0,{top:!0}]])]),_:1},8,[`model-value`,`onUpdate:modelValue`])):g(``,!0)]),J(t.value)?(a(),u(E,{key:0,"sensor-type":h.data.sensorType,property:t.value,"model-value":Y(t.value),"variable-mode":X(t.value),"node-id":h.nodeId,"sensor-id":h.data.sensorId,"onUpdate:modelValue":e=>$(t.value,e)},null,8,[`sensor-type`,`property`,`model-value`,`variable-mode`,`node-id`,`sensor-id`,`onUpdate:modelValue`])):g(``,!0)]))),128))])):g(``,!0)])}}});export{F as default};
@@ -1 +1 @@
1
- import{Br as e}from"./vendor-cameraui-C5_h4c-5.js";import{Mn as t,Yn as n,dn as r,fn as i,hr as a,in as o,mn as s,sn as c,yr as l}from"./vendor-AX0A8AMd.js";import{K as u,j as d,z as f}from"./vendor-primevue-C9-jpd5L.js";import{n as p}from"./useCameraOptions-CkKmF0Hk.js";var m={class:`flex flex-col gap-4`},h={class:`flex flex-col field-gap`},g={class:`cui-label`},_={class:`cui-toggle-switch`},v={class:`flex items-center gap-4`},y={class:`flex flex-col field-switch-gap`},b={class:`cui-label-switch`},x=s({__name:`ConfigActionSnapshot`,props:{data:{}},emits:[`update:data`],setup(s,{emit:x}){let S=x,{t:C}=e(),{cameraOptions:w}=p();function T(e,t){S(`update:data`,{[e]:t})}return(e,p)=>{let x=d,S=f,E=u;return t(),c(`div`,m,[o(`div`,h,[o(`label`,g,l(a(C)(`components.automation_nodes.camera`)),1),i(x,{"model-value":s.data.cameraId,options:a(w),"option-label":`label`,"option-value":`value`,placeholder:a(C)(`components.automation_nodes.camera_placeholder`),class:`w-full`,"onUpdate:modelValue":p[0]||=e=>T(`cameraId`,e)},null,8,[`model-value`,`options`,`placeholder`])]),o(`div`,_,[o(`div`,v,[o(`div`,y,[o(`label`,b,l(a(C)(`components.automation_nodes.snapshot_force_new`)),1),i(S,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-switch-hint`},{default:n(()=>[r(l(a(C)(`components.automation_nodes.snapshot_force_new_hint`)),1)]),_:1})]),i(E,{"model-value":s.data.forceNew,class:`ml-auto shrink-0`,"onUpdate:modelValue":p[1]||=e=>T(`forceNew`,e)},null,8,[`model-value`])])])])}}});export{x as default};
1
+ import{Br as e}from"./vendor-cameraui-BRv7o4zz.js";import{Mn as t,Yn as n,dn as r,fn as i,hr as a,in as o,mn as s,sn as c,yr as l}from"./vendor-nVfLT5jI.js";import{K as u,j as d,z as f}from"./vendor-primevue-C85v-zl5.js";import{n as p}from"./useCameraOptions-DKeZhfOM.js";var m={class:`flex flex-col gap-4`},h={class:`flex flex-col field-gap`},g={class:`cui-label`},_={class:`cui-toggle-switch`},v={class:`flex items-center gap-4`},y={class:`flex flex-col field-switch-gap`},b={class:`cui-label-switch`},x=s({__name:`ConfigActionSnapshot`,props:{data:{}},emits:[`update:data`],setup(s,{emit:x}){let S=x,{t:C}=e(),{cameraOptions:w}=p();function T(e,t){S(`update:data`,{[e]:t})}return(e,p)=>{let x=d,S=f,E=u;return t(),c(`div`,m,[o(`div`,h,[o(`label`,g,l(a(C)(`components.automation_nodes.camera`)),1),i(x,{"model-value":s.data.cameraId,options:a(w),"option-label":`label`,"option-value":`value`,placeholder:a(C)(`components.automation_nodes.camera_placeholder`),class:`w-full`,"onUpdate:modelValue":p[0]||=e=>T(`cameraId`,e)},null,8,[`model-value`,`options`,`placeholder`])]),o(`div`,_,[o(`div`,v,[o(`div`,y,[o(`label`,b,l(a(C)(`components.automation_nodes.snapshot_force_new`)),1),i(S,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-switch-hint`},{default:n(()=>[r(l(a(C)(`components.automation_nodes.snapshot_force_new_hint`)),1)]),_:1})]),i(E,{"model-value":s.data.forceNew,class:`ml-auto shrink-0`,"onUpdate:modelValue":p[1]||=e=>T(`forceNew`,e)},null,8,[`model-value`])])])])}}});export{x as default};